summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/NYTimes/gziphandler/gzip.go7
-rw-r--r--vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go70
-rw-r--r--vendor/github.com/NYTimes/gziphandler/gzip_test.go540
-rw-r--r--vendor/github.com/NYTimes/gziphandler/testdata/benchmark.json5456
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go14
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go57
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go42
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go18
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go13
-rw-r--r--vendor/github.com/alecthomas/log4go/examples/example.xml47
-rw-r--r--vendor/github.com/alecthomas/log4go/filelog.go51
-rw-r--r--vendor/github.com/alecthomas/log4go/log4go_test.go534
-rw-r--r--vendor/github.com/armon/go-metrics/circonus/circonus.go119
-rw-r--r--vendor/github.com/armon/go-metrics/circonus/circonus_test.go153
-rw-r--r--vendor/github.com/armon/go-metrics/datadog/dogstatsd.go140
-rw-r--r--vendor/github.com/armon/go-metrics/datadog/dogstatsd_test.go150
-rw-r--r--vendor/github.com/armon/go-metrics/inmem.go33
-rw-r--r--vendor/github.com/armon/go-metrics/inmem_endpoint_test.go133
-rw-r--r--vendor/github.com/armon/go-metrics/inmem_signal_test.go58
-rw-r--r--vendor/github.com/armon/go-metrics/inmem_test.go190
-rw-r--r--vendor/github.com/armon/go-metrics/metrics_test.go411
-rw-r--r--vendor/github.com/armon/go-metrics/prometheus/prometheus.go193
-rw-r--r--vendor/github.com/armon/go-metrics/sink_test.go272
-rw-r--r--vendor/github.com/armon/go-metrics/start_test.go202
-rw-r--r--vendor/github.com/armon/go-metrics/statsd_test.go175
-rw-r--r--vendor/github.com/armon/go-metrics/statsite_test.go171
-rw-r--r--vendor/github.com/avct/uasurfer/uasurfer_test.go1074
-rw-r--r--vendor/github.com/beorn7/perks/.gitignore2
-rw-r--r--vendor/github.com/beorn7/perks/README.md31
-rw-r--r--vendor/github.com/beorn7/perks/histogram/bench_test.go26
-rw-r--r--vendor/github.com/beorn7/perks/histogram/histogram.go108
-rw-r--r--vendor/github.com/beorn7/perks/histogram/histogram_test.go38
-rw-r--r--vendor/github.com/beorn7/perks/quantile/bench_test.go63
-rw-r--r--vendor/github.com/beorn7/perks/quantile/example_test.go121
-rw-r--r--vendor/github.com/beorn7/perks/quantile/stream.go34
-rw-r--r--vendor/github.com/beorn7/perks/quantile/stream_test.go215
-rw-r--r--vendor/github.com/beorn7/perks/topk/topk.go90
-rw-r--r--vendor/github.com/beorn7/perks/topk/topk_test.go57
-rwxr-xr-xvendor/github.com/corpix/uarand/scripts/extract-user-agents22
-rwxr-xr-xvendor/github.com/corpix/uarand/scripts/generate-useragents-go50
-rw-r--r--vendor/github.com/corpix/uarand/uarand_test.go13
-rw-r--r--vendor/github.com/corpix/uarand/useragents_test.go11
-rw-r--r--vendor/github.com/davecgh/go-spew/.gitignore22
-rw-r--r--vendor/github.com/davecgh/go-spew/.travis.yml27
-rw-r--r--vendor/github.com/davecgh/go-spew/LICENSE2
-rw-r--r--vendor/github.com/davecgh/go-spew/README.md201
-rw-r--r--vendor/github.com/davecgh/go-spew/cov_report.sh22
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/bypass.go187
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/bypasssafe.go2
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/common.go2
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/common_test.go298
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/dump.go10
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/dump_test.go1042
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go101
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go26
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/example_test.go226
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/format.go4
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/format_test.go1558
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/internal_test.go84
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go101
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/spew_test.go320
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go82
-rw-r--r--vendor/github.com/davecgh/go-spew/test_coverage.txt61
-rw-r--r--vendor/github.com/dgryski/dgoogauth/googauth_test.go251
-rw-r--r--vendor/github.com/dimchansky/utfbom/utfbom_test.go233
-rw-r--r--vendor/github.com/disintegration/imaging/.travis.yml16
-rw-r--r--vendor/github.com/disintegration/imaging/LICENSE2
-rw-r--r--vendor/github.com/disintegration/imaging/README.md63
-rw-r--r--vendor/github.com/disintegration/imaging/adjust.go256
-rw-r--r--vendor/github.com/disintegration/imaging/adjust_test.go564
-rw-r--r--vendor/github.com/disintegration/imaging/clone.go312
-rw-r--r--vendor/github.com/disintegration/imaging/clone_test.go247
-rw-r--r--vendor/github.com/disintegration/imaging/convolution.go6
-rw-r--r--vendor/github.com/disintegration/imaging/convolution_test.go275
-rw-r--r--vendor/github.com/disintegration/imaging/doc.go7
-rw-r--r--vendor/github.com/disintegration/imaging/effects.go174
-rw-r--r--vendor/github.com/disintegration/imaging/effects_test.go254
-rw-r--r--vendor/github.com/disintegration/imaging/example_test.go58
-rw-r--r--vendor/github.com/disintegration/imaging/helpers.go134
-rw-r--r--vendor/github.com/disintegration/imaging/helpers_test.go159
-rw-r--r--vendor/github.com/disintegration/imaging/histogram.go46
-rw-r--r--vendor/github.com/disintegration/imaging/histogram_test.go42
-rw-r--r--vendor/github.com/disintegration/imaging/resize.go221
-rw-r--r--vendor/github.com/disintegration/imaging/resize_test.go628
-rw-r--r--vendor/github.com/disintegration/imaging/scanner.go250
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/lena_128.pngbin50383 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/lena_512.pngbin476195 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_blur_0.5.pngbin29110 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_blur_1.5.pngbin21067 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_brightness_m10.pngbin31562 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_brightness_p10.pngbin31532 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_contrast_m10.pngbin30812 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_contrast_p10.pngbin32615 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_example.jpgbin137574 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_gamma_0.75.pngbin31901 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_gamma_1.25.pngbin31295 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_resize_catrom.pngbin31179 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_resize_lanczos.pngbin32070 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_resize_linear.pngbin29475 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_resize_nearest.pngbin35790 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_sharpen_0.5.pngbin33936 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/testdata/out_sharpen_1.5.pngbin36632 -> 0 bytes
-rw-r--r--vendor/github.com/disintegration/imaging/tools.go133
-rw-r--r--vendor/github.com/disintegration/imaging/tools_test.go652
-rw-r--r--vendor/github.com/disintegration/imaging/transform.go217
-rw-r--r--vendor/github.com/disintegration/imaging/transform_test.go581
-rw-r--r--vendor/github.com/disintegration/imaging/utils.go88
-rw-r--r--vendor/github.com/disintegration/imaging/utils_test.go61
-rw-r--r--vendor/github.com/dustin/go-humanize/.travis.yml21
-rw-r--r--vendor/github.com/dustin/go-humanize/LICENSE (renamed from vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/LICENSE)11
-rw-r--r--vendor/github.com/dustin/go-humanize/README.markdown124
-rw-r--r--vendor/github.com/dustin/go-humanize/big.go31
-rw-r--r--vendor/github.com/dustin/go-humanize/bigbytes.go173
-rw-r--r--vendor/github.com/dustin/go-humanize/bytes.go143
-rw-r--r--vendor/github.com/dustin/go-humanize/comma.go108
-rw-r--r--vendor/github.com/dustin/go-humanize/commaf.go40
-rw-r--r--vendor/github.com/dustin/go-humanize/ftoa.go23
-rw-r--r--vendor/github.com/dustin/go-humanize/humanize.go8
-rw-r--r--vendor/github.com/dustin/go-humanize/number.go192
-rw-r--r--vendor/github.com/dustin/go-humanize/ordinals.go25
-rw-r--r--vendor/github.com/dustin/go-humanize/si.go113
-rw-r--r--vendor/github.com/dustin/go-humanize/times.go117
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/.gitignore24
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/README.md118
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/examples/advanced.go58
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/examples/simple.go27
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go3
-rw-r--r--vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph_test.go131
-rw-r--r--vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md11
-rw-r--r--vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md8
-rw-r--r--vendor/github.com/fsnotify/fsnotify/example_test.go42
-rw-r--r--vendor/github.com/fsnotify/fsnotify/fsnotify_test.go70
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go229
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify_test.go449
-rw-r--r--vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go147
-rw-r--r--vendor/github.com/fsnotify/fsnotify/integration_test.go1237
-rw-r--r--vendor/github.com/go-ini/ini/.github/ISSUE_TEMPLATE.md5
-rw-r--r--vendor/github.com/go-ini/ini/.github/PULL_REQUEST_TEMPLATE.md3
-rw-r--r--vendor/github.com/go-ini/ini/.travis.yml3
-rw-r--r--vendor/github.com/go-ini/ini/Makefile2
-rw-r--r--vendor/github.com/go-ini/ini/README.md737
-rw-r--r--vendor/github.com/go-ini/ini/README_ZH.md750
-rw-r--r--vendor/github.com/go-ini/ini/bench_test.go118
-rw-r--r--vendor/github.com/go-ini/ini/file.go15
-rw-r--r--vendor/github.com/go-ini/ini/file_test.go278
-rw-r--r--vendor/github.com/go-ini/ini/ini.go5
-rw-r--r--vendor/github.com/go-ini/ini/ini_internal_test.go35
-rw-r--r--vendor/github.com/go-ini/ini/ini_test.go339
-rw-r--r--vendor/github.com/go-ini/ini/key_test.go523
-rw-r--r--vendor/github.com/go-ini/ini/parser_test.go77
-rw-r--r--vendor/github.com/go-ini/ini/section_test.go313
-rw-r--r--vendor/github.com/go-ini/ini/struct_test.go387
-rw-r--r--vendor/github.com/go-ini/ini/testdata/TestFile_WriteTo.golden86
-rw-r--r--vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.inibin56 -> 0 bytes
-rw-r--r--vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.inibin56 -> 0 bytes
-rw-r--r--vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini2
-rw-r--r--vendor/github.com/go-ini/ini/testdata/full.ini83
-rw-r--r--vendor/github.com/go-ini/ini/testdata/minimal.ini2
-rwxr-xr-xvendor/github.com/go-ldap/ldap/.githooks/pre-push6
-rw-r--r--vendor/github.com/go-ldap/ldap/conn_test.go336
-rw-r--r--vendor/github.com/go-ldap/ldap/control_test.go97
-rw-r--r--vendor/github.com/go-ldap/ldap/dn_test.go211
-rw-r--r--vendor/github.com/go-ldap/ldap/error_test.go102
-rw-r--r--vendor/github.com/go-ldap/ldap/example_test.go305
-rw-r--r--vendor/github.com/go-ldap/ldap/filter_test.go254
-rw-r--r--vendor/github.com/go-ldap/ldap/ldap_test.go275
-rw-r--r--vendor/github.com/go-ldap/ldap/search_test.go31
-rw-r--r--vendor/github.com/go-redis/redis/.travis.yml1
-rw-r--r--vendor/github.com/go-redis/redis/Makefile3
-rw-r--r--vendor/github.com/go-redis/redis/bench_test.go216
-rw-r--r--vendor/github.com/go-redis/redis/cluster.go547
-rw-r--r--vendor/github.com/go-redis/redis/cluster_test.go813
-rw-r--r--vendor/github.com/go-redis/redis/command.go26
-rw-r--r--vendor/github.com/go-redis/redis/command_test.go60
-rw-r--r--vendor/github.com/go-redis/redis/commands.go146
-rw-r--r--vendor/github.com/go-redis/redis/commands_test.go2968
-rw-r--r--vendor/github.com/go-redis/redis/example_instrumentation_test.go48
-rw-r--r--vendor/github.com/go-redis/redis/example_test.go414
-rw-r--r--vendor/github.com/go-redis/redis/export_test.go46
-rw-r--r--vendor/github.com/go-redis/redis/internal/consistenthash/consistenthash_test.go110
-rw-r--r--vendor/github.com/go-redis/redis/internal/error.go14
-rw-r--r--vendor/github.com/go-redis/redis/internal/hashtag/hashtag_test.go74
-rw-r--r--vendor/github.com/go-redis/redis/internal/internal_test.go18
-rw-r--r--vendor/github.com/go-redis/redis/internal/pool/bench_test.go80
-rw-r--r--vendor/github.com/go-redis/redis/internal/pool/main_test.go35
-rw-r--r--vendor/github.com/go-redis/redis/internal/pool/pool_test.go241
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/proto_test.go13
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/reader.go48
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/reader_test.go87
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/scan.go63
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/scan_test.go48
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/write_buffer.go18
-rw-r--r--vendor/github.com/go-redis/redis/internal/proto/write_buffer_test.go63
-rw-r--r--vendor/github.com/go-redis/redis/internal/singleflight/singleflight.go64
-rw-r--r--vendor/github.com/go-redis/redis/internal/util.go37
-rw-r--r--vendor/github.com/go-redis/redis/internal/util/safe.go (renamed from vendor/github.com/go-redis/redis/internal/safe.go)2
-rw-r--r--vendor/github.com/go-redis/redis/internal/util/strconv.go19
-rw-r--r--vendor/github.com/go-redis/redis/internal/util/unsafe.go (renamed from vendor/github.com/go-redis/redis/internal/unsafe.go)2
-rw-r--r--vendor/github.com/go-redis/redis/iterator_test.go136
-rw-r--r--vendor/github.com/go-redis/redis/main_test.go351
-rw-r--r--vendor/github.com/go-redis/redis/options_test.go94
-rw-r--r--vendor/github.com/go-redis/redis/parser.go26
-rw-r--r--vendor/github.com/go-redis/redis/pipeline_test.go80
-rw-r--r--vendor/github.com/go-redis/redis/pool_test.go143
-rw-r--r--vendor/github.com/go-redis/redis/pubsub.go70
-rw-r--r--vendor/github.com/go-redis/redis/pubsub_test.go443
-rw-r--r--vendor/github.com/go-redis/redis/race_test.go250
-rw-r--r--vendor/github.com/go-redis/redis/redis.go85
-rw-r--r--vendor/github.com/go-redis/redis/redis_context.go38
-rw-r--r--vendor/github.com/go-redis/redis/redis_no_context.go18
-rw-r--r--vendor/github.com/go-redis/redis/redis_test.go364
-rw-r--r--vendor/github.com/go-redis/redis/ring.go370
-rw-r--r--vendor/github.com/go-redis/redis/ring_test.go193
-rw-r--r--vendor/github.com/go-redis/redis/script.go4
-rw-r--r--vendor/github.com/go-redis/redis/sentinel_test.go88
-rw-r--r--vendor/github.com/go-redis/redis/testdata/redis.conf10
-rw-r--r--vendor/github.com/go-redis/redis/tx.go4
-rw-r--r--vendor/github.com/go-redis/redis/tx_test.go151
-rw-r--r--vendor/github.com/go-redis/redis/universal.go1
-rw-r--r--vendor/github.com/go-redis/redis/universal_test.go41
-rw-r--r--vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md21
-rw-r--r--vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md9
-rw-r--r--vendor/github.com/go-sql-driver/mysql/.travis.yml9
-rw-r--r--vendor/github.com/go-sql-driver/mysql/.travis/docker.cnf5
-rwxr-xr-xvendor/github.com/go-sql-driver/mysql/.travis/wait_mysql.sh8
-rw-r--r--vendor/github.com/go-sql-driver/mysql/AUTHORS5
-rw-r--r--vendor/github.com/go-sql-driver/mysql/benchmark_go18_test.go93
-rw-r--r--vendor/github.com/go-sql-driver/mysql/benchmark_test.go242
-rw-r--r--vendor/github.com/go-sql-driver/mysql/connection_go18_test.go30
-rw-r--r--vendor/github.com/go-sql-driver/mysql/connection_test.go67
-rw-r--r--vendor/github.com/go-sql-driver/mysql/driver.go13
-rw-r--r--vendor/github.com/go-sql-driver/mysql/driver_go18_test.go798
-rw-r--r--vendor/github.com/go-sql-driver/mysql/driver_test.go2020
-rw-r--r--vendor/github.com/go-sql-driver/mysql/dsn_test.go287
-rw-r--r--vendor/github.com/go-sql-driver/mysql/errors_test.go42
-rw-r--r--vendor/github.com/go-sql-driver/mysql/packets_test.go282
-rw-r--r--vendor/github.com/go-sql-driver/mysql/statement.go41
-rw-r--r--vendor/github.com/go-sql-driver/mysql/statement_test.go126
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils.go4
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils_go18.go3
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils_go18_test.go54
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils_test.go277
-rw-r--r--vendor/github.com/golang/freetype/cmd/print-glyph-points/main.c87
-rw-r--r--vendor/github.com/golang/freetype/example/capjoin/main.go85
-rw-r--r--vendor/github.com/golang/freetype/example/drawer/main.go158
-rw-r--r--vendor/github.com/golang/freetype/example/freetype/main.go150
-rw-r--r--vendor/github.com/golang/freetype/example/gamma/main.go86
-rw-r--r--vendor/github.com/golang/freetype/example/genbasicfont/main.go237
-rw-r--r--vendor/github.com/golang/freetype/example/raster/main.go185
-rw-r--r--vendor/github.com/golang/freetype/example/round/main.go110
-rw-r--r--vendor/github.com/golang/freetype/example/truetype/main.go89
-rw-r--r--vendor/github.com/golang/freetype/freetype_test.go59
-rw-r--r--vendor/github.com/golang/freetype/licenses/ftl.txt169
-rw-r--r--vendor/github.com/golang/freetype/licenses/gpl.txt340
-rw-r--r--vendor/github.com/golang/freetype/testdata/README13
-rw-r--r--vendor/github.com/golang/freetype/testdata/luximr.ttfbin71784 -> 0 bytes
-rw-r--r--vendor/github.com/golang/freetype/testdata/luximr.ttx24616
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxirr.ttfbin88732 -> 0 bytes
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxirr.ttx30264
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxisr-12pt-sans-hinting.txt392
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxisr-12pt-with-hinting.txt392
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxisr.ttfbin67548 -> 0 bytes
-rw-r--r--vendor/github.com/golang/freetype/testdata/luxisr.ttx22503
-rwxr-xr-xvendor/github.com/golang/freetype/testdata/make-other-hinting-txts.sh34
-rw-r--r--vendor/github.com/golang/freetype/truetype/face_test.go48
-rw-r--r--vendor/github.com/golang/freetype/truetype/hint_test.go675
-rw-r--r--vendor/github.com/golang/freetype/truetype/truetype_test.go400
-rw-r--r--vendor/github.com/golang/protobuf/.gitignore16
-rw-r--r--vendor/github.com/golang/protobuf/.travis.yml18
-rw-r--r--vendor/github.com/golang/protobuf/Make.protobuf40
-rw-r--r--vendor/github.com/golang/protobuf/Makefile55
-rw-r--r--vendor/github.com/golang/protobuf/README.md244
-rw-r--r--vendor/github.com/golang/protobuf/_conformance/Makefile33
-rw-r--r--vendor/github.com/golang/protobuf/_conformance/conformance.go161
-rw-r--r--vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go1885
-rw-r--r--vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto285
-rw-r--r--vendor/github.com/golang/protobuf/descriptor/descriptor.go93
-rw-r--r--vendor/github.com/golang/protobuf/descriptor/descriptor_test.go32
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb.go1083
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go896
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile33
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go266
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto69
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go852
-rw-r--r--vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto147
-rw-r--r--vendor/github.com/golang/protobuf/proto/all_test.go2278
-rw-r--r--vendor/github.com/golang/protobuf/proto/any_test.go300
-rw-r--r--vendor/github.com/golang/protobuf/proto/clone_test.go300
-rw-r--r--vendor/github.com/golang/protobuf/proto/decode_test.go258
-rw-r--r--vendor/github.com/golang/protobuf/proto/encode_test.go85
-rw-r--r--vendor/github.com/golang/protobuf/proto/equal_test.go224
-rw-r--r--vendor/github.com/golang/protobuf/proto/extensions_test.go536
-rw-r--r--vendor/github.com/golang/protobuf/proto/map_test.go46
-rw-r--r--vendor/github.com/golang/protobuf/proto/message_set_test.go66
-rw-r--r--vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go347
-rw-r--r--vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto87
-rw-r--r--vendor/github.com/golang/protobuf/proto/proto3_test.go135
-rw-r--r--vendor/github.com/golang/protobuf/proto/size2_test.go63
-rw-r--r--vendor/github.com/golang/protobuf/proto/size_test.go164
-rw-r--r--vendor/github.com/golang/protobuf/proto/testdata/Makefile50
-rw-r--r--vendor/github.com/golang/protobuf/proto/testdata/golden_test.go86
-rw-r--r--vendor/github.com/golang/protobuf/proto/testdata/test.pb.go4147
-rw-r--r--vendor/github.com/golang/protobuf/proto/testdata/test.proto548
-rw-r--r--vendor/github.com/golang/protobuf/proto/text_parser_test.go673
-rw-r--r--vendor/github.com/golang/protobuf/proto/text_test.go474
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/Makefile33
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile37
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go2215
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto849
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/doc.go51
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile40
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go2870
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go114
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go463
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go34
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/main.go98
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile45
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go293
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden83
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto167
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile73
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto46
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto38
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go210
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto100
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto59
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden113
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto70
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto43
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto38
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go46
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto44
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto46
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto43
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go870
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden870
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto156
-rw-r--r--vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto53
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any.go139
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any/any.pb.go178
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any/any.proto149
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/any_test.go113
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/doc.go35
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration.go102
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go144
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration/duration.proto117
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration_test.go121
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go66
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/empty/empty.proto52
-rwxr-xr-xvendor/github.com/golang/protobuf/ptypes/regen.sh43
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go380
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/struct/struct.proto96
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp.go134
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go160
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto133
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/timestamp_test.go153
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go260
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto118
-rw-r--r--vendor/github.com/gorilla/context/.travis.yml8
-rw-r--r--vendor/github.com/gorilla/context/README.md3
-rw-r--r--vendor/github.com/gorilla/context/context_test.go161
-rw-r--r--vendor/github.com/gorilla/context/doc.go6
-rw-r--r--vendor/github.com/gorilla/handlers/canonical_test.go127
-rw-r--r--vendor/github.com/gorilla/handlers/compress_test.go154
-rw-r--r--vendor/github.com/gorilla/handlers/cors_test.go371
-rw-r--r--vendor/github.com/gorilla/handlers/handlers_go18_test.go34
-rw-r--r--vendor/github.com/gorilla/handlers/handlers_test.go378
-rw-r--r--vendor/github.com/gorilla/handlers/proxy_headers_test.go111
-rw-r--r--vendor/github.com/gorilla/handlers/recovery_test.go44
-rw-r--r--vendor/github.com/gorilla/mux/bench_test.go49
-rw-r--r--vendor/github.com/gorilla/mux/context_gorilla_test.go40
-rw-r--r--vendor/github.com/gorilla/mux/context_native_test.go32
-rw-r--r--vendor/github.com/gorilla/mux/example_route_test.go51
-rw-r--r--vendor/github.com/gorilla/mux/middleware_test.go336
-rw-r--r--vendor/github.com/gorilla/mux/mux_test.go2347
-rw-r--r--vendor/github.com/gorilla/mux/old_test.go704
-rw-r--r--vendor/github.com/gorilla/schema/cache.go36
-rw-r--r--vendor/github.com/gorilla/schema/decoder.go89
-rw-r--r--vendor/github.com/gorilla/schema/decoder_test.go1693
-rw-r--r--vendor/github.com/gorilla/schema/encoder_test.go420
-rw-r--r--vendor/github.com/gorilla/websocket/.gitignore2
-rw-r--r--vendor/github.com/gorilla/websocket/.travis.yml11
-rw-r--r--vendor/github.com/gorilla/websocket/README.md2
-rw-r--r--vendor/github.com/gorilla/websocket/client.go12
-rw-r--r--vendor/github.com/gorilla/websocket/client_server_test.go602
-rw-r--r--vendor/github.com/gorilla/websocket/client_test.go32
-rw-r--r--vendor/github.com/gorilla/websocket/compression_test.go80
-rw-r--r--vendor/github.com/gorilla/websocket/conn.go17
-rw-r--r--vendor/github.com/gorilla/websocket/conn_broadcast_test.go134
-rw-r--r--vendor/github.com/gorilla/websocket/conn_test.go496
-rw-r--r--vendor/github.com/gorilla/websocket/conn_write.go15
-rw-r--r--vendor/github.com/gorilla/websocket/conn_write_legacy.go18
-rw-r--r--vendor/github.com/gorilla/websocket/example_test.go46
-rw-r--r--vendor/github.com/gorilla/websocket/examples/autobahn/README.md13
-rw-r--r--vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json15
-rw-r--r--vendor/github.com/gorilla/websocket/examples/autobahn/server.go265
-rw-r--r--vendor/github.com/gorilla/websocket/examples/chat/README.md102
-rw-r--r--vendor/github.com/gorilla/websocket/examples/chat/client.go137
-rw-r--r--vendor/github.com/gorilla/websocket/examples/chat/home.html98
-rw-r--r--vendor/github.com/gorilla/websocket/examples/chat/hub.go53
-rw-r--r--vendor/github.com/gorilla/websocket/examples/chat/main.go40
-rw-r--r--vendor/github.com/gorilla/websocket/examples/command/README.md19
-rw-r--r--vendor/github.com/gorilla/websocket/examples/command/home.html102
-rw-r--r--vendor/github.com/gorilla/websocket/examples/command/main.go193
-rw-r--r--vendor/github.com/gorilla/websocket/examples/echo/README.md17
-rw-r--r--vendor/github.com/gorilla/websocket/examples/echo/client.go81
-rw-r--r--vendor/github.com/gorilla/websocket/examples/echo/server.go133
-rw-r--r--vendor/github.com/gorilla/websocket/examples/filewatch/README.md9
-rw-r--r--vendor/github.com/gorilla/websocket/examples/filewatch/main.go193
-rw-r--r--vendor/github.com/gorilla/websocket/json_test.go119
-rw-r--r--vendor/github.com/gorilla/websocket/mask_test.go73
-rw-r--r--vendor/github.com/gorilla/websocket/prepared_test.go74
-rw-r--r--vendor/github.com/gorilla/websocket/server.go2
-rw-r--r--vendor/github.com/gorilla/websocket/server_test.go69
-rw-r--r--vendor/github.com/gorilla/websocket/util_test.go95
-rw-r--r--vendor/github.com/hako/durafmt/durafmt_test.go174
-rw-r--r--vendor/github.com/hashicorp/errwrap/errwrap_test.go94
-rw-r--r--vendor/github.com/hashicorp/go-immutable-radix/iradix_test.go1531
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/README.md14
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/codec/bench_test.go319
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/codec/codecs_test.go1002
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/codec/ext_dep_test.go75
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/codec/z_helper_test.go103
-rw-r--r--vendor/github.com/hashicorp/go-msgpack/msgpack.org.md47
-rw-r--r--vendor/github.com/hashicorp/go-multierror/append_test.go82
-rw-r--r--vendor/github.com/hashicorp/go-multierror/flatten_test.go48
-rw-r--r--vendor/github.com/hashicorp/go-multierror/format_test.go38
-rw-r--r--vendor/github.com/hashicorp/go-multierror/multierror_test.go70
-rw-r--r--vendor/github.com/hashicorp/go-multierror/prefix_test.go33
-rwxr-xr-xvendor/github.com/hashicorp/go-multierror/scripts/deps.sh54
-rw-r--r--vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/LICENSE354
-rw-r--r--vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/README.md89
-rw-r--r--vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/errwrap.go169
-rw-r--r--vendor/github.com/hashicorp/go-multierror/vendor/vendor.json13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/.gitignore2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/GNUmakefile29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/README.md239
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/autohelp.go121
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/dump.go274
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/eval.go158
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/multi_arg.go17
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc.go121
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc_list.go94
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/tech_support.go216
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/version.go27
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/commands.go49
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/main.go47
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/.gitignore1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/GNUmakefile10
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr.out9
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_-v.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-00-help.out14
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-01.out21
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-02.out21
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-03.out20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-04.out20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-05.out8
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-06.out20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-07.out19
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-08.out3
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-09.out3
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-10.out2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-11.out63
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-12.out63
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-13.out62
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-14.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-00-help.out19
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-01.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-02.out2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-03.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-04.out2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-05.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-00.out13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-01.out13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-00.out3
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-01.out28
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-02.out3
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-00.out1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-01.out1
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_all.sh23
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_one.sh66
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-00-help.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-01.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-02.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-03.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-04.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-05.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-06.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-07.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-08.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-09.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-10.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-11.sh8
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-12.sh8
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-13.sh12
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-14.sh12
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-00-help.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-01.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-02.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-03.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-04.sh7
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-05.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-00.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-01.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-00.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-01.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-02.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-00.sh5
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-01.sh5
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/LICENSE20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/README.md38
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/radix.go496
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/LICENSE_WINDOWS201
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/Readme.md30
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy.go49
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go93
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go41
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/LICENSE354
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/errwrap.go169
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/LICENSE9
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/README.md37
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/doc.go2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_appengine.go9
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_bsd.go18
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_linux.go18
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_solaris.go16
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_windows.go19
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/LICENSE354
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/Makefile20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md64
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go466
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command.go47
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command_mock.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/help.go79
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui.go187
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_colored.go69
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_concurrent.go54
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_mock.go64
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_writer.go18
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/README.md39
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go73
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/LICENSE20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/README.md69
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/columnize.go178
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/LICENSE27
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/PATENTS22
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm.s10
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_386.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm.s30
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s30
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_386.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_386.s35
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm64.s24
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s28
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s28
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_s390x.s28
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_386.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_386.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s29
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s17
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/bluetooth_linux.go35
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/constants.go13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unix.go27
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unset.go14
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock.go24
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock_linux_32bit.go13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo.go46
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_c.c41
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go20
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go20
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkall.sh292
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkerrors.sh483
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkpost.go62
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall.pl323
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl294
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl264
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl39
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl50
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl63
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_linux.pl58
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl58
-rwxr-xr-xvendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl50
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race.go30
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race0.go25
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_linux.go36
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_unix.go103
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/str.go26
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall.go76
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_bsd.go628
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin.go511
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_386.go77
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go79
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go71
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go77
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly.go412
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go61
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd.go683
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go61
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go61
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go61
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux.go1110
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_386.go399
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go157
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm.go263
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go190
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go208
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go135
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go329
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go169
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd.go492
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_no_getwd.go11
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd.go304
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go42
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris.go725
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go35
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_unix.go297
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_darwin.go250
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_dragonfly.go242
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_freebsd.go353
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_linux.go457
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_netbsd.go232
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_openbsd.go244
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_solaris.go262
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go1576
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go1576
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go1293
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go1576
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go1530
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go1743
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go1748
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go1729
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_386.go1819
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go1820
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go1743
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go1897
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go1917
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go1917
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go1970
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go1969
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go2027
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go2077
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go1712
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go1702
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go1688
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go1584
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go1583
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go1436
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go1427
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go1443
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go1427
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go1427
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go1413
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go1665
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go1665
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go1665
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go1660
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go1854
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go1761
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go1734
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go1803
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go1803
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go1865
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go1865
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go1645
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go1834
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go1327
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go1327
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go1327
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go1387
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go1387
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go1599
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go270
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go398
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go398
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go358
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go398
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go304
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go351
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go351
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go351
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go355
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go321
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go356
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go272
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go327
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go327
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go360
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go353
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go328
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go348
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go273
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go273
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go273
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go207
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go207
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go13
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go447
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go462
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go449
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go457
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go443
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go502
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go505
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go497
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_386.go627
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go645
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go616
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go624
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go627
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go627
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go634
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go634
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go649
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go640
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go396
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go403
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go401
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go441
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go448
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go423
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json55
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/version.go43
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ifaddr_test.go594
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ifaddrs_test.go1987
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ifattr_test.go112
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ipaddr_test.go222
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ipaddrs_test.go460
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ipv4addr_test.go991
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/ipv6addr_test.go725
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/rfc_test.go63
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/route_info_test.go196
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/sockaddr_test.go440
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/sockaddrs_test.go338
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile2
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/template/README.md6
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/template/doc.go311
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/template/template.go155
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/template/template_test.go278
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/unixsock_test.go108
-rw-r--r--vendor/github.com/hashicorp/golang-lru/2q_test.go306
-rw-r--r--vendor/github.com/hashicorp/golang-lru/arc_test.go377
-rw-r--r--vendor/github.com/hashicorp/golang-lru/lru_test.go221
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go167
-rw-r--r--vendor/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md21
-rw-r--r--vendor/github.com/hashicorp/hcl/decoder_test.go1203
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go200
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go162
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go440
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go9
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/parser.go6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go575
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hclbin10 -> 0 bytes
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go190
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/printer_test.go149
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.golden36
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.input37
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.golden32
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.input28
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden13
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input13
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_crlf.input37
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.golden6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.input5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden12
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.input13
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.golden7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.input6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.golden10
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.input10
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.golden3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.input2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.golden9
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.input9
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.golden17
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.input16
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.golden54
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.input53
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.golden12
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.input14
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.golden43
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.input37
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.golden7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.input6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.golden10
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.input10
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.golden7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.input7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.golden26
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.input19
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.golden6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.input6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go29
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go591
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go96
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/token/token_test.go69
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl_test.go19
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/parser_test.go384
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/array.json4
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_128.json1
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_tf_8110.json7
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json3
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/good_input_tf_8110.json7
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/object.json5
-rw-r--r--vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/types.json10
-rw-r--r--vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go362
-rw-r--r--vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json4
-rw-r--r--vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json3
-rw-r--r--vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json5
-rw-r--r--vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json10
-rw-r--r--vendor/github.com/hashicorp/hcl/json/token/token_test.go34
-rw-r--r--vendor/github.com/hashicorp/hcl/lex_test.go37
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/assign_deep.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/basic.json4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/block_assign.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json19
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl10
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json14
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/escape_backslash.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/float.json4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/git_crypt.hclbin10 -> 0 bytes
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/interpolate.json3
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/list_of_lists.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/list_of_maps.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline.json3
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_bad.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_indented.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal_with_hil.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_eof.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_hanging_indent.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_marker.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/nested_block_comment.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/nested_provider_bad.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/null_strings.json7
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/object_list.json15
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/object_with_bool.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/scientific.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/scientific.json8
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/slice_expand.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure.json8
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure2.hcl9
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure2.json10
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_flat.json8
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_flatmap.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.json7
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_deep.json16
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_empty.json3
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.json11
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.json6
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/terraform_variable_invalid.json5
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/tfvars.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_block_comment.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_brace.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go15
-rw-r--r--vendor/github.com/hashicorp/memberlist/awareness_test.go41
-rw-r--r--vendor/github.com/hashicorp/memberlist/broadcast_test.go27
-rw-r--r--vendor/github.com/hashicorp/memberlist/integ_test.go89
-rw-r--r--vendor/github.com/hashicorp/memberlist/keyring_test.go154
-rw-r--r--vendor/github.com/hashicorp/memberlist/logging_test.go47
-rw-r--r--vendor/github.com/hashicorp/memberlist/memberlist_test.go1545
-rw-r--r--vendor/github.com/hashicorp/memberlist/net_test.go814
-rw-r--r--vendor/github.com/hashicorp/memberlist/queue_test.go172
-rw-r--r--vendor/github.com/hashicorp/memberlist/security_test.go70
-rw-r--r--vendor/github.com/hashicorp/memberlist/state_test.go1900
-rw-r--r--vendor/github.com/hashicorp/memberlist/suspicion_test.go198
-rwxr-xr-xvendor/github.com/hashicorp/memberlist/test/setup_subnet.sh28
-rw-r--r--vendor/github.com/hashicorp/memberlist/transport_test.go124
-rw-r--r--vendor/github.com/hashicorp/memberlist/util_test.go358
-rw-r--r--vendor/github.com/icrowley/fake/addresses_test.go56
-rw-r--r--vendor/github.com/icrowley/fake/credit_cards_test.go26
-rw-r--r--vendor/github.com/icrowley/fake/currencies_test.go21
-rw-r--r--vendor/github.com/icrowley/fake/data/en/adjectives19
-rw-r--r--vendor/github.com/icrowley/fake/data/en/characters36
-rw-r--r--vendor/github.com/icrowley/fake/data/en/cities478
-rw-r--r--vendor/github.com/icrowley/fake/data/en/colors19
-rw-r--r--vendor/github.com/icrowley/fake/data/en/companies399
-rw-r--r--vendor/github.com/icrowley/fake/data/en/continents7
-rw-r--r--vendor/github.com/icrowley/fake/data/en/countries249
-rw-r--r--vendor/github.com/icrowley/fake/data/en/currencies106
-rw-r--r--vendor/github.com/icrowley/fake/data/en/currency_codes130
-rw-r--r--vendor/github.com/icrowley/fake/data/en/domain_zones251
-rw-r--r--vendor/github.com/icrowley/fake/data/en/female_first_names100
-rw-r--r--vendor/github.com/icrowley/fake/data/en/female_last_names250
-rw-r--r--vendor/github.com/icrowley/fake/data/en/female_name_prefixes1
-rw-r--r--vendor/github.com/icrowley/fake/data/en/female_name_suffixes1
-rw-r--r--vendor/github.com/icrowley/fake/data/en/female_patronymics100
-rw-r--r--vendor/github.com/icrowley/fake/data/en/genders2
-rw-r--r--vendor/github.com/icrowley/fake/data/en/industries222
-rw-r--r--vendor/github.com/icrowley/fake/data/en/jobs114
-rw-r--r--vendor/github.com/icrowley/fake/data/en/jobs_suffixes4
-rw-r--r--vendor/github.com/icrowley/fake/data/en/languages97
-rw-r--r--vendor/github.com/icrowley/fake/data/en/male_first_names100
-rw-r--r--vendor/github.com/icrowley/fake/data/en/male_last_names250
-rw-r--r--vendor/github.com/icrowley/fake/data/en/male_name_prefixes1
-rw-r--r--vendor/github.com/icrowley/fake/data/en/male_name_suffixes1
-rw-r--r--vendor/github.com/icrowley/fake/data/en/male_patronymics100
-rw-r--r--vendor/github.com/icrowley/fake/data/en/months12
-rw-r--r--vendor/github.com/icrowley/fake/data/en/months_short12
-rw-r--r--vendor/github.com/icrowley/fake/data/en/nouns16
-rw-r--r--vendor/github.com/icrowley/fake/data/en/phones_format2
-rw-r--r--vendor/github.com/icrowley/fake/data/en/state_abbrevs50
-rw-r--r--vendor/github.com/icrowley/fake/data/en/states50
-rw-r--r--vendor/github.com/icrowley/fake/data/en/street_suffixes21
-rw-r--r--vendor/github.com/icrowley/fake/data/en/streets500
-rw-r--r--vendor/github.com/icrowley/fake/data/en/top_level_domains9
-rw-r--r--vendor/github.com/icrowley/fake/data/en/weekdays7
-rw-r--r--vendor/github.com/icrowley/fake/data/en/weekdays_short7
-rw-r--r--vendor/github.com/icrowley/fake/data/en/words249
-rw-r--r--vendor/github.com/icrowley/fake/data/en/zips_format1
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/characters43
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/cities135
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/colors14
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/continents7
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/countries193
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/currencies129
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/female_first_names36
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/female_last_names100
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/female_patronymics11
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/genders2
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/languages23
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/male_first_names32
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/male_last_names101
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/male_patronymics57
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/months12
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/phones_format2
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/states89
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/streets40
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/weekdays7
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/weekdays_short7
-rw-r--r--vendor/github.com/icrowley/fake/data/ru/zips_format1
-rw-r--r--vendor/github.com/icrowley/fake/dates_test.go46
-rw-r--r--vendor/github.com/icrowley/fake/fake_test.go63
-rw-r--r--vendor/github.com/icrowley/fake/general_test.go46
-rw-r--r--vendor/github.com/icrowley/fake/geo_test.go61
-rw-r--r--vendor/github.com/icrowley/fake/internet_test.go61
-rw-r--r--vendor/github.com/icrowley/fake/jobs_test.go26
-rw-r--r--vendor/github.com/icrowley/fake/lorem_ipsum_test.go76
-rw-r--r--vendor/github.com/icrowley/fake/names_test.go101
-rw-r--r--vendor/github.com/icrowley/fake/personal_test.go26
-rw-r--r--vendor/github.com/icrowley/fake/products_test.go31
-rw-r--r--vendor/github.com/jehiah/go-strftime/LICENSE (renamed from vendor/github.com/olivere/elastic/LICENSE)17
-rw-r--r--vendor/github.com/jehiah/go-strftime/README.md24
-rw-r--r--vendor/github.com/jehiah/go-strftime/strftime.go13
-rw-r--r--vendor/github.com/jehiah/go-strftime/strftime_test.go40
-rwxr-xr-xvendor/github.com/lib/pq/.travis.sh12
-rw-r--r--vendor/github.com/lib/pq/.travis.yml15
-rw-r--r--vendor/github.com/lib/pq/array_test.go1311
-rw-r--r--vendor/github.com/lib/pq/bench_test.go435
-rw-r--r--vendor/github.com/lib/pq/certs/README3
-rw-r--r--vendor/github.com/lib/pq/certs/bogus_root.crt19
-rw-r--r--vendor/github.com/lib/pq/certs/postgresql.crt69
-rw-r--r--vendor/github.com/lib/pq/certs/postgresql.key15
-rw-r--r--vendor/github.com/lib/pq/certs/root.crt24
-rw-r--r--vendor/github.com/lib/pq/certs/server.crt81
-rw-r--r--vendor/github.com/lib/pq/certs/server.key27
-rw-r--r--vendor/github.com/lib/pq/conn.go31
-rw-r--r--vendor/github.com/lib/pq/conn_go18.go5
-rw-r--r--vendor/github.com/lib/pq/conn_test.go1658
-rw-r--r--vendor/github.com/lib/pq/copy_test.go463
-rw-r--r--vendor/github.com/lib/pq/encode_test.go763
-rw-r--r--vendor/github.com/lib/pq/error.go8
-rw-r--r--vendor/github.com/lib/pq/example/listen/doc.go98
-rw-r--r--vendor/github.com/lib/pq/go18_test.go319
-rw-r--r--vendor/github.com/lib/pq/hstore/hstore.go118
-rw-r--r--vendor/github.com/lib/pq/hstore/hstore_test.go148
-rw-r--r--vendor/github.com/lib/pq/issues_test.go26
-rw-r--r--vendor/github.com/lib/pq/notify.go2
-rw-r--r--vendor/github.com/lib/pq/notify_test.go570
-rw-r--r--vendor/github.com/lib/pq/rows_test.go220
-rw-r--r--vendor/github.com/lib/pq/ssl.go57
-rw-r--r--vendor/github.com/lib/pq/ssl_test.go279
-rw-r--r--vendor/github.com/lib/pq/url_test.go66
-rw-r--r--vendor/github.com/lib/pq/uuid_test.go46
-rw-r--r--vendor/github.com/magiconair/properties/assert/assert.go90
-rw-r--r--vendor/github.com/magiconair/properties/assert/assert_test.go55
-rw-r--r--vendor/github.com/magiconair/properties/benchmark_test.go24
-rw-r--r--vendor/github.com/magiconair/properties/decode_test.go299
-rw-r--r--vendor/github.com/magiconair/properties/example_test.go93
-rw-r--r--vendor/github.com/magiconair/properties/integrate_test.go76
-rw-r--r--vendor/github.com/magiconair/properties/load_test.go231
-rw-r--r--vendor/github.com/magiconair/properties/properties_test.go977
-rw-r--r--vendor/github.com/mailru/easyjson/Makefile6
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/codec_test.go279
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data.go148
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_codec.go6914
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go6723
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_var.go350
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/default_test.go118
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/dummy_test.go11
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go184
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/example.json415
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go190
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go119
-rwxr-xr-xvendor/github.com/mailru/easyjson/benchmark/ujson.sh7
-rw-r--r--vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go188
-rw-r--r--vendor/github.com/mailru/easyjson/buffer/pool_test.go107
-rw-r--r--vendor/github.com/mailru/easyjson/easyjson/main.go106
-rw-r--r--vendor/github.com/mailru/easyjson/gen/decoder.go489
-rw-r--r--vendor/github.com/mailru/easyjson/gen/encoder.go382
-rw-r--r--vendor/github.com/mailru/easyjson/gen/generator.go523
-rw-r--r--vendor/github.com/mailru/easyjson/gen/generator_test.go87
-rw-r--r--vendor/github.com/mailru/easyjson/jlexer/lexer.go39
-rw-r--r--vendor/github.com/mailru/easyjson/jlexer/lexer_test.go311
-rw-r--r--vendor/github.com/mailru/easyjson/jwriter/writer.go17
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_String.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/optional/opt.go80
-rw-r--r--vendor/github.com/mailru/easyjson/opt/opts.go22
-rw-r--r--vendor/github.com/mailru/easyjson/parser/parser.go97
-rw-r--r--vendor/github.com/mailru/easyjson/parser/parser_unix.go42
-rw-r--r--vendor/github.com/mailru/easyjson/parser/parser_windows.go49
-rw-r--r--vendor/github.com/mailru/easyjson/tests/basic_test.go231
-rw-r--r--vendor/github.com/mailru/easyjson/tests/data.go759
-rw-r--r--vendor/github.com/mailru/easyjson/tests/errors.go26
-rw-r--r--vendor/github.com/mailru/easyjson/tests/errors_test.go285
-rw-r--r--vendor/github.com/mailru/easyjson/tests/named_type.go22
-rw-r--r--vendor/github.com/mailru/easyjson/tests/nested_easy.go25
-rw-r--r--vendor/github.com/mailru/easyjson/tests/nothing.go3
-rw-r--r--vendor/github.com/mailru/easyjson/tests/omitempty.go12
-rw-r--r--vendor/github.com/mailru/easyjson/tests/opt_test.go70
-rw-r--r--vendor/github.com/mailru/easyjson/tests/required_test.go28
-rw-r--r--vendor/github.com/mailru/easyjson/tests/snake.go10
-rw-r--r--vendor/github.com/mattermost/gorp/dialect_mysql_test.go204
-rw-r--r--vendor/github.com/mattermost/gorp/gorp_suite_test.go13
-rw-r--r--vendor/github.com/mattermost/gorp/gorp_test.go2696
-rw-r--r--vendor/github.com/mattermost/gorp/table.go23
-rw-r--r--vendor/github.com/mattermost/html2text/html2text_test.go674
-rwxr-xr-xvendor/github.com/mattermost/html2text/testdata/utf8.html22
-rwxr-xr-xvendor/github.com/mattermost/html2text/testdata/utf8_with_bom.xhtml24
-rw-r--r--vendor/github.com/mattermost/rsc/.gitignore22
-rw-r--r--vendor/github.com/mattermost/rsc/README.md4
-rw-r--r--vendor/github.com/mattermost/rsc/app/app.go39
-rw-r--r--vendor/github.com/mattermost/rsc/app/app.yaml23
-rw-r--r--vendor/github.com/mattermost/rsc/app/index.yaml16
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/appfile/main.go156
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/appmount/main.go287
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/client/client.go150
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/fs/fs.go273
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/fs/local.go82
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/proto/data.go55
-rw-r--r--vendor/github.com/mattermost/rsc/appfs/server/app.go982
-rw-r--r--vendor/github.com/mattermost/rsc/arq/arq.go663
-rw-r--r--vendor/github.com/mattermost/rsc/arq/arqfs/main.go247
-rw-r--r--vendor/github.com/mattermost/rsc/arq/crypto.go93
-rw-r--r--vendor/github.com/mattermost/rsc/arq/data.go240
-rw-r--r--vendor/github.com/mattermost/rsc/arq/hist/hist.go160
-rw-r--r--vendor/github.com/mattermost/rsc/arq/unpack.go227
-rw-r--r--vendor/github.com/mattermost/rsc/blog/atom/atom.go58
-rw-r--r--vendor/github.com/mattermost/rsc/blog/main.go15
-rw-r--r--vendor/github.com/mattermost/rsc/blog/post/post.go534
-rw-r--r--vendor/github.com/mattermost/rsc/blog/post/qr.go34
-rw-r--r--vendor/github.com/mattermost/rsc/cmd/crypt/crypt.go79
-rw-r--r--vendor/github.com/mattermost/rsc/cmd/issue/issue.go185
-rw-r--r--vendor/github.com/mattermost/rsc/cmd/jfmt/main.go37
-rw-r--r--vendor/github.com/mattermost/rsc/crypt/crypt.go150
-rw-r--r--vendor/github.com/mattermost/rsc/devweb/main.go317
-rw-r--r--vendor/github.com/mattermost/rsc/devweb/slave/slave.go26
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/debug.go20
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse.go1650
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse_kernel.go539
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse_kernel_darwin.go58
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse_kernel_linux.go50
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse_kernel_std.go1
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/fuse_test.go594
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/hellofs/hello.go62
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/mount_darwin.go122
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/mount_linux.go67
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/serve.go1022
-rw-r--r--vendor/github.com/mattermost/rsc/fuse/tree.go93
-rw-r--r--vendor/github.com/mattermost/rsc/gf256/blog_test.go85
-rw-r--r--vendor/github.com/mattermost/rsc/gf256/gf256_test.go194
-rw-r--r--vendor/github.com/mattermost/rsc/google/acme/Chat/main.go575
-rw-r--r--vendor/github.com/mattermost/rsc/google/chat.go39
-rw-r--r--vendor/github.com/mattermost/rsc/google/gmail/gmail.go1241
-rw-r--r--vendor/github.com/mattermost/rsc/google/gmailsend/send.go370
-rw-r--r--vendor/github.com/mattermost/rsc/google/googleserver/chat.go80
-rw-r--r--vendor/github.com/mattermost/rsc/google/googleserver/main.go139
-rw-r--r--vendor/github.com/mattermost/rsc/google/main.go181
-rw-r--r--vendor/github.com/mattermost/rsc/gtfs/gtfs.pb.go440
-rw-r--r--vendor/github.com/mattermost/rsc/imap/Makefile15
-rw-r--r--vendor/github.com/mattermost/rsc/imap/decode.go227
-rw-r--r--vendor/github.com/mattermost/rsc/imap/decode_test.go26
-rw-r--r--vendor/github.com/mattermost/rsc/imap/imap.go1110
-rw-r--r--vendor/github.com/mattermost/rsc/imap/imap_test.go433
-rw-r--r--vendor/github.com/mattermost/rsc/imap/mail.go468
-rw-r--r--vendor/github.com/mattermost/rsc/imap/mail_test.go335
-rw-r--r--vendor/github.com/mattermost/rsc/imap/rfc2045.txt1739
-rw-r--r--vendor/github.com/mattermost/rsc/imap/rfc2971.txt451
-rw-r--r--vendor/github.com/mattermost/rsc/imap/rfc3501.txt6051
-rw-r--r--vendor/github.com/mattermost/rsc/imap/sx.go350
-rw-r--r--vendor/github.com/mattermost/rsc/imap/sx_test.go60
-rw-r--r--vendor/github.com/mattermost/rsc/imap/tcs.go602
-rw-r--r--vendor/github.com/mattermost/rsc/keychain/doc.go28
-rw-r--r--vendor/github.com/mattermost/rsc/keychain/mac.go107
-rw-r--r--vendor/github.com/mattermost/rsc/mbta/Passages.pbbin69799 -> 0 bytes
-rw-r--r--vendor/github.com/mattermost/rsc/mbta/Vehicles.pbbin35798 -> 0 bytes
-rw-r--r--vendor/github.com/mattermost/rsc/mbta/mbta.go28
-rwxr-xr-xvendor/github.com/mattermost/rsc/mkapp51
-rw-r--r--vendor/github.com/mattermost/rsc/plist/plist.go179
-rw-r--r--vendor/github.com/mattermost/rsc/plist/plist_test.go110
-rw-r--r--vendor/github.com/mattermost/rsc/qr/coding/qr_test.go133
-rw-r--r--vendor/github.com/mattermost/rsc/qr/libqrencode/Makefile4
-rw-r--r--vendor/github.com/mattermost/rsc/qr/libqrencode/qrencode.go149
-rw-r--r--vendor/github.com/mattermost/rsc/qr/png_test.go73
-rw-r--r--vendor/github.com/mattermost/rsc/qr/web/pic.go506
-rw-r--r--vendor/github.com/mattermost/rsc/qr/web/play.go1118
-rw-r--r--vendor/github.com/mattermost/rsc/qr/web/resize/resize.go152
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/copy.go225
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/main.go96
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/match.go406
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/merge.go103
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/sort.go199
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/sparse.go80
-rw-r--r--vendor/github.com/mattermost/rsc/regexp/regmerge/utf.go270
-rw-r--r--vendor/github.com/mattermost/rsc/rosetta/graph/Makefile7
-rw-r--r--vendor/github.com/mattermost/rsc/rosetta/graph/graph.go133
-rw-r--r--vendor/github.com/mattermost/rsc/rosetta/maze/Makefile8
-rw-r--r--vendor/github.com/mattermost/rsc/rosetta/maze/maze.go191
-rw-r--r--vendor/github.com/mattermost/rsc/s3get/main.go85
-rw-r--r--vendor/github.com/mattermost/rsc/smugmug/smug.go542
-rw-r--r--vendor/github.com/mattermost/rsc/smugmug/smugup/main.go158
-rw-r--r--vendor/github.com/mattermost/rsc/xmpp/xmpp.go572
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml8
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS15
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/README.md20
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/ext/moved.go2
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbtest/deleted.go2
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore1
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile7
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go178
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go99
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go67
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/testdata/README.THIRD_PARTY4
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.pb.go4029
-rw-r--r--vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.proto540
-rw-r--r--vendor/github.com/miekg/dns/client.go11
-rw-r--r--vendor/github.com/miekg/dns/client_test.go590
-rw-r--r--vendor/github.com/miekg/dns/clientconfig.go2
-rw-r--r--vendor/github.com/miekg/dns/clientconfig_test.go153
-rw-r--r--vendor/github.com/miekg/dns/dns_bench_test.go230
-rw-r--r--vendor/github.com/miekg/dns/dns_test.go466
-rw-r--r--vendor/github.com/miekg/dns/dnssec_test.go841
-rw-r--r--vendor/github.com/miekg/dns/dnsutil/util.go83
-rw-r--r--vendor/github.com/miekg/dns/dnsutil/util_test.go130
-rw-r--r--vendor/github.com/miekg/dns/dyn_test.go3
-rw-r--r--vendor/github.com/miekg/dns/edns_test.go68
-rw-r--r--vendor/github.com/miekg/dns/example_test.go146
-rw-r--r--vendor/github.com/miekg/dns/issue_test.go62
-rw-r--r--vendor/github.com/miekg/dns/labels_test.go201
-rw-r--r--vendor/github.com/miekg/dns/leak_test.go71
-rw-r--r--vendor/github.com/miekg/dns/msg.go67
-rw-r--r--vendor/github.com/miekg/dns/msg_test.go124
-rw-r--r--vendor/github.com/miekg/dns/nsecx_test.go133
-rw-r--r--vendor/github.com/miekg/dns/parse_test.go1465
-rw-r--r--vendor/github.com/miekg/dns/privaterr_test.go166
-rw-r--r--vendor/github.com/miekg/dns/remote_test.go19
-rw-r--r--vendor/github.com/miekg/dns/rr_test.go7
-rw-r--r--vendor/github.com/miekg/dns/sanitize_test.go75
-rw-r--r--vendor/github.com/miekg/dns/scan_test.go48
-rw-r--r--vendor/github.com/miekg/dns/server_test.go769
-rw-r--r--vendor/github.com/miekg/dns/sig0_test.go89
-rw-r--r--vendor/github.com/miekg/dns/tsig_test.go52
-rw-r--r--vendor/github.com/miekg/dns/types_test.go74
-rw-r--r--vendor/github.com/miekg/dns/udp_test.go126
-rw-r--r--vendor/github.com/miekg/dns/update_test.go139
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitattributes10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitignore2
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/AUTHORS3
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTING.md31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTORS3
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/LICENSE27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/PATENTS22
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/README.md21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme.go1058
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme_test.go1352
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert.go821
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go606
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache.go130
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache_test.go58
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/example_test.go35
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/listener.go160
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal.go124
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal_test.go191
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws.go153
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws_test.go319
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types.go329
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/base64.go35
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt.go295
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go243
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b.go207
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s762
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s290
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go179
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_test.go798
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2x.go177
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/register.go32
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s.go187
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.go35
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.s460
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go40
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s463
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go174
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go17
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_test.go1002
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2x.go178
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/register.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/block.go159
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/blowfish_test.go274
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/cipher.go91
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/const.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256.go404
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256_test.go304
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/constants.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/curve.go278
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/example_test.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp12.go200
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp2.go219
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp6.go296
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/optate.go395
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/twist.go249
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5.go526
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5_test.go106
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go83
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go127
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s2714
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go70
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go15
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_test.go182
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_vectors_test.go332
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go198
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/codereview.cfg1
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1.go732
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go46
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go300
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/builder.go309
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go428
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/example_test.go154
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/string.go167
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.h8
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.s20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s65
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519.go834
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519_test.go39
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/doc.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s73
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s1377
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go240
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mul_amd64.s169
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/square_amd64.s132
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519.go181
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519_test.go183
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go1422
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go1771
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gzbin50330 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/example_test.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf.go75
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf_test.go370
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/example_test.go20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4.go118
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4_test.go71
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4block.go89
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth.go58
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth_test.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/example_test.go36
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box.go103
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box_test.go78
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/example_test.go95
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/example_test.go53
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go166
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox_test.go154
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp.go778
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp_test.go875
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor.go219
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor_test.go95
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/encode.go160
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text_test.go52
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go376
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go210
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go122
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal_test.go49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/errors/errors.go72
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys.go637
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys_test.go419
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed_test.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/config.go91
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key_test.go146
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/literal.go89
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go143
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb_test.go46
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go73
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque.go162
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque_test.go67
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet.go537
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet_test.go255
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key.go380
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go270
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key.go748
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_test.go202
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go279
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3_test.go82
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/reader.go76
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature.go731
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_test.go78
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go146
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3_test.go92
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go155
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go117
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go290
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted_test.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go91
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute_test.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid.go160
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid_test.go87
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read.go442
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read_test.go613
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go273
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k_test.go137
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write.go378
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write_test.go273
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/libotr_test_helper.c197
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr.go1415
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr_test.go470
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/smp.go572
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go77
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go157
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string.go50
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto.go131
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto_test.go125
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/errors.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go274
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac.go45
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac_test.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf_test.go34
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12.go346
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12_test.go138
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/safebags.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305_test.go159
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.go22
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.s125
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.go22
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.s427
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_ref.go141
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160.go120
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160_test.go64
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go161
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go144
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s889
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go234
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go54
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20.go54
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20_test.go139
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/example_test.go26
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt.go244
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt_test.go162
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/doc.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/hashes.go65
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf.go412
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s390
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/register.go18
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3.go192
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3_test.go311
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/shake.go60
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflatebin521342 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_generic.go28
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_unaligned.go58
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client.go683
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client_test.go379
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/example_test.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/forward.go103
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring.go215
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring_test.go76
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server.go523
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server_test.go259
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/testdata_test.go64
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/benchmark_test.go122
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer.go97
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer_test.go87
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs.go519
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs_test.go222
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/channel.go633
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher.go629
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher_test.go129
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client.go278
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth.go510
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth_test.go628
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_test.go119
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/common.go373
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/connection.go143
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/doc.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/example_test.go320
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake.go646
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake_test.go559
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex.go540
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex_test.go50
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys.go1031
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys_test.go500
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go546
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go329
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mac.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mempipe_test.go110
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages.go766
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages_test.go288
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux.go330
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux_test.go505
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/server.go580
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session.go647
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session_test.go774
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/streamlocal.go115
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip.go465
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip_test.go20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal.go951
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go350
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util.go116
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go12
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go58
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go128
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go97
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/banner_test.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/cert_test.go77
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go128
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/doc.go7
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go194
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/session_test.go413
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go298
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/testdata_test.go64
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/doc.go8
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/keys.go177
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport.go375
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport_test.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/cipher.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/tea_test.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish.go342
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish_test.go129
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/block.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/cipher.go82
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/xtea_test.go229
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts.go137
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts_test.go105
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitattributes10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitignore2
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/AUTHORS3
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTING.md31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTORS3
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/LICENSE27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/PATENTS22
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/README.md16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/asm.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/constants.go218
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/doc.go82
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions.go704
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions_test.go525
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/setter.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf1
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt79
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm.go140
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_aluop_test.go512
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_bpf_test.go192
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_extension_test.go49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_instructions.go174
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_jump_test.go380
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_load_test.go246
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_ret_test.go115
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_scratch_test.go247
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_test.go144
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/codereview.cfg1
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context.go56
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context_test.go583
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go74
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go29
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go147
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go79
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go105
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go17.go72
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go19.go20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go17.go300
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go19.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/withtimeout_test.go31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/dict/dict.go210
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/example_test.go132
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message.go2001
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message_test.go1141
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom.go78
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom_test.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/gen.go709
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table.go777
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table_test.go373
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset.go257
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset_test.go237
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html47
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/README9
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.htmlbin2670 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.htmlbin2682 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/const.go104
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doc.go106
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doctype.go156
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity.go2253
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity_test.go29
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape.go258
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape_test.go97
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/example_test.go40
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/foreign.go226
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node.go193
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node_test.go146
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse.go2094
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse_test.go388
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render.go271
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render_test.go156
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/go1.html2237
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/README28
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat194
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/comments01.dat135
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat370
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities01.dat603
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities02.dat249
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat246
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/isindex.dat40
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.datbin115 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat52
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.datbin4166 -> 0 bytes
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat308
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat15
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat28
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tables01.dat212
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests1.dat1952
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat799
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat482
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat62
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat74
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat208
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat2299
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat153
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat269
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat1237
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat763
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests20.dat455
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests21.dat221
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests22.dat157
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests23.dat155
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests24.dat79
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests25.dat219
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests26.dat313
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests3.dat305
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests4.dat59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests5.dat191
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests6.dat663
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests7.dat390
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests8.dat148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests9.dat457
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat741
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat261
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat610
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat159
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token.go1219
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token_test.go748
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/export_test.go7
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/go19_test.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy.go239
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy_test.go301
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/.gitignore2
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Dockerfile51
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Makefile3
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/README20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers.go641
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers_test.go309
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/client_conn_pool.go256
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/configure_transport.go80
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer.go146
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer_test.go157
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors.go133
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors_test.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow.go50
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow_test.go53
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame.go1579
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame_test.go1191
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go16.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17.go106
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17_not18.go36
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18.go56
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18_test.go79
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19_test.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack_test.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/.gitignore5
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/Makefile8
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/README16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/h2demo.go538
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/launch.go302
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.key27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.pem26
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.srl1
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.crt20
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.key27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/tmpl.go1991
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/README.md97
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/h2i.go522
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/headermap.go78
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode.go240
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode_test.go386
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack.go490
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack_test.go722
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/huffman.go212
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables.go479
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables_test.go214
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2.go391
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2_test.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go16.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go17.go87
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go18.go29
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go19.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe.go163
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe_test.go130
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server.go2888
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_push_test.go521
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_test.go3725
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml5021
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport.go2284
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport_test.go3847
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/write.go365
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched.go242
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority.go452
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority_test.go541
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random.go72
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random_test.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_test.go125
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/z_spec_test.go356
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/dstunreach.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/echo.go45
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/endpoint.go113
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/example_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension.go89
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension_test.go259
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/helper_posix.go75
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/interface.go236
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4_test.go83
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv6.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_posix.go100
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_stub.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message.go152
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message_test.go134
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/messagebody.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/mpls.go77
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart.go109
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart_test.go442
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/packettoobig.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/paramprob.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ping_test.go200
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/sys_freebsd.go11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/timeexceeded.go39
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/example_test.go70
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna.go732
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna_test.go108
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode.go203
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode_test.go198
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/tables.go4557
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trie.go72
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trieval.go119
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/const.go180
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/gen.go293
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_bsd.go53
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go15
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_posix.go31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_stub.go32
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_unix.go29
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_windows.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/interface.go94
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/rlimit.go11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/stack.go147
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr.go11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go17
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_darwin.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_freebsd.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_linux.go49
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_netbsd.go47
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_openbsd.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_solaris.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_unix.go31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_windows.go26
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go19
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go19
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go19
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_stub.go11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go39
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go36
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go36
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go74
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go77
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go18
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go18
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/reflect.go62
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket.go285
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go259
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_test.go46
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsd.go17
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go14
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_darwin.go7
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go7
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux.go27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go10
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_posix.go168
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris.go71
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_stub.go64
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_unix.go33
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_windows.go70
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go65
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go68
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go61
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go60
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries.go525
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/batch.go191
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/bpf_test.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control.go144
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_bsd.go40
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_pktinfo.go39
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_stub.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_test.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_unix.go73
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_windows.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_darwin.go77
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_dragonfly.go38
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_freebsd.go75
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_linux.go122
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_netbsd.go37
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_openbsd.go37
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_solaris.go84
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/dgramopt.go265
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/doc.go244
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/endpoint.go187
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/example_test.go224
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/gen.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/genericopt.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header.go159
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header_test.go228
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/helper.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/iana.go34
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_linux.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_stub.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_test.go95
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicast_test.go334
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastlistener_test.go265
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go195
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet.go69
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_8.go56
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_9.go67
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg.go36
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go67
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go248
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go388
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_test.go140
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt.go44
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_posix.go71
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_stub.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq.go119
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go25
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go42
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bsd.go37
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_darwin.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go35
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_freebsd.go76
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_linux.go59
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_solaris.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go54
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_stub.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_windows.go67
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicast_test.go247
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_darwin.go99
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go95
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go95
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go150
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go30
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go30
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_solaris.go100
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/batch.go119
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/bpf_test.go96
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control.go187
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go94
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_stub.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_test.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_unix.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_windows.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_darwin.go112
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_dragonfly.go84
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_freebsd.go105
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_linux.go147
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_netbsd.go80
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_openbsd.go89
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_solaris.go114
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/dgramopt.go302
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/doc.go243
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/endpoint.go128
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/example_test.go216
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/gen.go199
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/genericopt.go58
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header_test.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/helper.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/iana.go82
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp.go60
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_bsd.go29
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_linux.go27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_solaris.go27
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_stub.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_test.go96
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_windows.go22
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/mocktransponder_test.go32
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicast_test.go264
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastlistener_test.go261
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go157
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg.go35
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go41
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go242
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go373
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_test.go148
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_posix.go87
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_stub.go46
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_test.go133
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go17
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf.go23
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bsd.go57
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_darwin.go106
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_freebsd.go92
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_linux.go74
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_solaris.go74
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go54
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_stub.go13
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_windows.go75
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicast_test.go184
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go120
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_darwin.go131
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go88
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go122
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go124
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go124
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go170
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go172
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go84
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go93
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_solaris.go131
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex.go351
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex_test.go119
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address.go105
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address_test.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/binary.go115
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/defs_solaris.go90
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/lif.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link.go126
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys_solaris_amd64.s8
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/syscall.go28
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go103
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest.go456
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go16.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go17.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_test.go76
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen.go48
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen_test.go101
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/direct.go18
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host.go140
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host_test.go55
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy.go134
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy_test.go215
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/socks5.go214
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/gen.go713
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list.go135
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list_test.go416
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table.go9419
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table_test.go16756
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address.go425
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_darwin_test.go63
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_test.go103
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/binary.go90
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_darwin.go114
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_dragonfly.go113
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_freebsd.go337
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_netbsd.go112
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_openbsd.go116
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface.go64
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_announce.go32
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_classic.go66
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_freebsd.go78
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_multicast.go30
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_openbsd.go90
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message.go72
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_darwin_test.go34
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_freebsd_test.go92
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_test.go239
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_classic.go75
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_openbsd.go65
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_test.go390
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys.go39
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_darwin.go87
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_dragonfly.go76
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_freebsd.go155
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_netbsd.go71
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_openbsd.go80
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/syscall.go28
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_darwin.go99
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_dragonfly.go98
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_386.go126
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_arm.go123
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_netbsd.go97
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_openbsd.go101
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/events.go532
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram.go365
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram_test.go325
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace.go1082
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go16.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go17.go21
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_test.go178
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file.go796
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.6.go17
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.7.go16
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_test.go1184
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if.go173
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if_test.go322
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/README11
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go56
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/example_test.go151
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal.go1223
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go1939
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read.go692
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read_test.go744
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go371
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml.go1998
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml_test.go752
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/litmus_test_server.go94
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock.go445
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock_test.go731
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop.go418
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop_test.go613
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav.go702
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav_test.go344
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml.go519
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml_test.go906
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/client.go106
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial.go24
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial_test.go43
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/exampledial_test.go31
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/examplehandler_test.go26
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi.go583
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi_test.go608
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/server.go113
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket.go448
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket_test.go665
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf.go94
-rw-r--r--vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf_test.go83
-rw-r--r--vendor/github.com/miekg/dns/version.go2
-rw-r--r--vendor/github.com/miekg/dns/version_test.go10
-rw-r--r--vendor/github.com/minio/minio-go/api-compose-object_test.go89
-rw-r--r--vendor/github.com/minio/minio-go/api-error-response_test.go294
-rw-r--r--vendor/github.com/minio/minio-go/api-put-object_test.go62
-rw-r--r--vendor/github.com/minio/minio-go/api_unit_test.go209
-rw-r--r--vendor/github.com/minio/minio-go/bucket-cache_test.go351
-rw-r--r--vendor/github.com/minio/minio-go/core_test.go771
-rw-r--r--vendor/github.com/minio/minio-go/docs/API.md1831
-rw-r--r--vendor/github.com/minio/minio-go/docs/checker.go.template21
-rw-r--r--vendor/github.com/minio/minio-go/docs/validator.go227
-rw-r--r--vendor/github.com/minio/minio-go/docs/zh_CN/API.md1820
-rw-r--r--vendor/github.com/minio/minio-go/docs/zh_CN/CONTRIBUTING.md22
-rw-r--r--vendor/github.com/minio/minio-go/examples/minio/listenbucketnotification.go61
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/bucketexists.go52
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/composeobject.go78
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/copyobject.go75
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/fgetobject-context.go54
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/fgetobject.go46
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/fputencrypted-object.go80
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/fputobject-context.go53
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/fputobject.go48
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/get-encrypted-object.go89
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/getbucketnotification.go56
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/getbucketpolicy.go56
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/getobject-context.go73
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/getobject.go64
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listbucketpolicies.go57
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listbuckets.go49
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listincompleteuploads.go58
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listobjects-N.go77
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listobjects.go58
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/listobjectsV2.go58
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/makebucket.go47
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/presignedgetobject.go54
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go54
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/presignedpostpolicy.go60
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/presignedputobject.go48
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/put-encrypted-object.go85
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject-context.go68
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject-getobject-sse.go87
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go64
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go62
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject-streaming.go55
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/putobject.go58
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/removeallbucketnotification.go50
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/removebucket.go49
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/removeincompleteupload.go47
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/removeobject.go46
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/removeobjects.go65
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/setbucketnotification.go86
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/setbucketpolicy.go55
-rw-r--r--vendor/github.com/minio/minio-go/examples/s3/statobject.go46
-rw-r--r--vendor/github.com/minio/minio-go/get-options_test.go57
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/chain_test.go144
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/credentials_test.go73
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/env_test.go105
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/file_test.go189
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/iam_aws_test.go197
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/static_test.go68
-rw-r--r--vendor/github.com/minio/minio-go/pkg/policy/bucket-policy-condition_test.go290
-rw-r--r--vendor/github.com/minio/minio-go/pkg/policy/bucket-policy_test.go1823
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming_test.go109
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2_test.go36
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v4_test.go50
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/request-signature_test.go71
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/test-utils_test.go104
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go75
-rw-r--r--vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go408
-rw-r--r--vendor/github.com/minio/minio-go/pkg/set/stringset_test.go348
-rw-r--r--vendor/github.com/minio/minio-go/test-utils_test.go75
-rw-r--r--vendor/github.com/minio/minio-go/utils_test.go403
-rw-r--r--vendor/github.com/mitchellh/go-homedir/homedir_test.go112
-rw-r--r--vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go259
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure.go13
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go279
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go278
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go203
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure_test.go1708
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/.gitignore6
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/.travis.yml11
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/CHANGELOG5
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/README.md186
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command.go229
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command_test.go42
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/doc.go93
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/gendoc.sh12
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/goi18n.go55
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command.go239
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_flat_test.go36
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_test.go75
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.json34
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.toml25
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.yaml29
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.yaml35
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/R.go38
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.all.json65
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.untranslated.json50
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.all.json45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.untranslated.json1
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.all.json43
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.untranslated.json32
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.all.json27
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json1
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json.json0
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.all.json27
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.untranslated.json27
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.all.json45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.untranslated.json45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.one.json54
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.two.json54
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.constants.json45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.one.json30
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.two.json26
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.one.toml37
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.two.json45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.constants.json34
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.one.yaml16
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.two.json19
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/fr-fr.json0
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/fr-fr.json0
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.one.json54
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.two.json54
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.one.yaml19
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.two.json26
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/fr-fr.json0
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/bundle/bundle_test.go364
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/example_test.go97
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/exampletemplate_test.go63
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/exampleyaml_test.go62
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/generate.sh5
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/main.go132
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/plurals.xml226
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/xml.go143
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/language_test.go85
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/operands_test.go45
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/plural_test.go28
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_gen_test.go631
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_test.go716
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/translation/plural_translation_test.go308
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/translation/template_test.go146
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/translation/translation_test.go17
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/translations_test.go89
-rw-r--r--vendor/github.com/olivere/elastic/.gitignore33
-rw-r--r--vendor/github.com/olivere/elastic/.travis.yml15
-rw-r--r--vendor/github.com/olivere/elastic/CHANGELOG-3.0.md363
-rw-r--r--vendor/github.com/olivere/elastic/CHANGELOG-5.0.md195
-rw-r--r--vendor/github.com/olivere/elastic/CHANGELOG-6.0.md18
-rw-r--r--vendor/github.com/olivere/elastic/CODE_OF_CONDUCT.md46
-rw-r--r--vendor/github.com/olivere/elastic/CONTRIBUTING.md40
-rw-r--r--vendor/github.com/olivere/elastic/CONTRIBUTORS128
-rw-r--r--vendor/github.com/olivere/elastic/ISSUE_TEMPLATE.md18
-rw-r--r--vendor/github.com/olivere/elastic/README.md393
-rw-r--r--vendor/github.com/olivere/elastic/acknowledged_response.go13
-rw-r--r--vendor/github.com/olivere/elastic/backoff.go148
-rw-r--r--vendor/github.com/olivere/elastic/backoff_test.go140
-rw-r--r--vendor/github.com/olivere/elastic/bulk.go417
-rw-r--r--vendor/github.com/olivere/elastic/bulk_delete_request.go166
-rw-r--r--vendor/github.com/olivere/elastic/bulk_delete_request_easyjson.go230
-rw-r--r--vendor/github.com/olivere/elastic/bulk_delete_request_test.go79
-rw-r--r--vendor/github.com/olivere/elastic/bulk_index_request.go239
-rw-r--r--vendor/github.com/olivere/elastic/bulk_index_request_easyjson.go262
-rw-r--r--vendor/github.com/olivere/elastic/bulk_index_request_test.go116
-rw-r--r--vendor/github.com/olivere/elastic/bulk_processor.go600
-rw-r--r--vendor/github.com/olivere/elastic/bulk_processor_test.go425
-rw-r--r--vendor/github.com/olivere/elastic/bulk_request.go17
-rw-r--r--vendor/github.com/olivere/elastic/bulk_test.go600
-rw-r--r--vendor/github.com/olivere/elastic/bulk_update_request.go298
-rw-r--r--vendor/github.com/olivere/elastic/bulk_update_request_easyjson.go461
-rw-r--r--vendor/github.com/olivere/elastic/bulk_update_request_test.go149
-rw-r--r--vendor/github.com/olivere/elastic/canonicalize.go34
-rw-r--r--vendor/github.com/olivere/elastic/canonicalize_test.go72
-rw-r--r--vendor/github.com/olivere/elastic/clear_scroll.go108
-rw-r--r--vendor/github.com/olivere/elastic/clear_scroll_test.go87
-rw-r--r--vendor/github.com/olivere/elastic/client.go1780
-rw-r--r--vendor/github.com/olivere/elastic/client_test.go1319
-rw-r--r--vendor/github.com/olivere/elastic/cluster-test/Makefile16
-rw-r--r--vendor/github.com/olivere/elastic/cluster-test/README.md63
-rw-r--r--vendor/github.com/olivere/elastic/cluster-test/cluster-test.go361
-rw-r--r--vendor/github.com/olivere/elastic/cluster_health.go248
-rw-r--r--vendor/github.com/olivere/elastic/cluster_health_test.go119
-rw-r--r--vendor/github.com/olivere/elastic/cluster_state.go288
-rw-r--r--vendor/github.com/olivere/elastic/cluster_state_test.go93
-rw-r--r--vendor/github.com/olivere/elastic/cluster_stats.go352
-rw-r--r--vendor/github.com/olivere/elastic/cluster_stats_test.go92
-rw-r--r--vendor/github.com/olivere/elastic/config/config.go90
-rw-r--r--vendor/github.com/olivere/elastic/config/config_test.go45
-rw-r--r--vendor/github.com/olivere/elastic/config/doc.go9
-rw-r--r--vendor/github.com/olivere/elastic/connection.go90
-rw-r--r--vendor/github.com/olivere/elastic/count.go315
-rw-r--r--vendor/github.com/olivere/elastic/count_test.go127
-rw-r--r--vendor/github.com/olivere/elastic/decoder.go26
-rw-r--r--vendor/github.com/olivere/elastic/decoder_test.go50
-rw-r--r--vendor/github.com/olivere/elastic/delete.go226
-rw-r--r--vendor/github.com/olivere/elastic/delete_by_query.go654
-rw-r--r--vendor/github.com/olivere/elastic/delete_by_query_test.go146
-rw-r--r--vendor/github.com/olivere/elastic/delete_test.go134
-rw-r--r--vendor/github.com/olivere/elastic/doc.go51
-rw-r--r--vendor/github.com/olivere/elastic/errors.go155
-rw-r--r--vendor/github.com/olivere/elastic/errors_test.go295
-rw-r--r--vendor/github.com/olivere/elastic/etc/elasticsearch.yml15
-rw-r--r--vendor/github.com/olivere/elastic/etc/ingest-geoip/.gitkeep0
-rw-r--r--vendor/github.com/olivere/elastic/etc/jvm.options100
-rw-r--r--vendor/github.com/olivere/elastic/etc/log4j2.properties74
-rw-r--r--vendor/github.com/olivere/elastic/etc/scripts/.gitkeep0
-rw-r--r--vendor/github.com/olivere/elastic/example_test.go530
-rw-r--r--vendor/github.com/olivere/elastic/exists.go181
-rw-r--r--vendor/github.com/olivere/elastic/exists_test.go53
-rw-r--r--vendor/github.com/olivere/elastic/explain.go326
-rw-r--r--vendor/github.com/olivere/elastic/explain_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/fetch_source_context.go90
-rw-r--r--vendor/github.com/olivere/elastic/fetch_source_context_test.go125
-rw-r--r--vendor/github.com/olivere/elastic/field_caps.go202
-rw-r--r--vendor/github.com/olivere/elastic/field_caps_test.go146
-rw-r--r--vendor/github.com/olivere/elastic/geo_point.go48
-rw-r--r--vendor/github.com/olivere/elastic/geo_point_test.go24
-rw-r--r--vendor/github.com/olivere/elastic/get.go260
-rw-r--r--vendor/github.com/olivere/elastic/get_test.go166
-rw-r--r--vendor/github.com/olivere/elastic/highlight.go469
-rw-r--r--vendor/github.com/olivere/elastic/highlight_test.go211
-rw-r--r--vendor/github.com/olivere/elastic/index.go297
-rw-r--r--vendor/github.com/olivere/elastic/index_test.go280
-rw-r--r--vendor/github.com/olivere/elastic/indices_analyze.go284
-rw-r--r--vendor/github.com/olivere/elastic/indices_analyze_test.go85
-rw-r--r--vendor/github.com/olivere/elastic/indices_close.go159
-rw-r--r--vendor/github.com/olivere/elastic/indices_close_test.go84
-rw-r--r--vendor/github.com/olivere/elastic/indices_create.go136
-rw-r--r--vendor/github.com/olivere/elastic/indices_create_test.go63
-rw-r--r--vendor/github.com/olivere/elastic/indices_delete.go133
-rw-r--r--vendor/github.com/olivere/elastic/indices_delete_template.go128
-rw-r--r--vendor/github.com/olivere/elastic/indices_delete_test.go23
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists.go155
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists_template.go118
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists_template_test.go68
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists_test.go23
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists_type.go165
-rw-r--r--vendor/github.com/olivere/elastic/indices_exists_type_test.go135
-rw-r--r--vendor/github.com/olivere/elastic/indices_flush.go173
-rw-r--r--vendor/github.com/olivere/elastic/indices_flush_test.go70
-rw-r--r--vendor/github.com/olivere/elastic/indices_forcemerge.go193
-rw-r--r--vendor/github.com/olivere/elastic/indices_forcemerge_test.go57
-rw-r--r--vendor/github.com/olivere/elastic/indices_get.go206
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_aliases.go161
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_aliases_test.go181
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_field_mapping.go187
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_field_mapping_test.go55
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_mapping.go174
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_mapping_test.go50
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_settings.go187
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_settings_test.go82
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_template.go133
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_template_test.go41
-rw-r--r--vendor/github.com/olivere/elastic/indices_get_test.go98
-rw-r--r--vendor/github.com/olivere/elastic/indices_open.go163
-rw-r--r--vendor/github.com/olivere/elastic/indices_open_test.go23
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_alias.go302
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_alias_test.go222
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_mapping.go228
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_mapping_test.go95
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_settings.go191
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_settings_test.go95
-rw-r--r--vendor/github.com/olivere/elastic/indices_put_template.go207
-rw-r--r--vendor/github.com/olivere/elastic/indices_refresh.go98
-rw-r--r--vendor/github.com/olivere/elastic/indices_refresh_test.go81
-rw-r--r--vendor/github.com/olivere/elastic/indices_rollover.go272
-rw-r--r--vendor/github.com/olivere/elastic/indices_rollover_test.go116
-rw-r--r--vendor/github.com/olivere/elastic/indices_segments.go237
-rw-r--r--vendor/github.com/olivere/elastic/indices_segments_test.go86
-rw-r--r--vendor/github.com/olivere/elastic/indices_shrink.go179
-rw-r--r--vendor/github.com/olivere/elastic/indices_shrink_test.go34
-rw-r--r--vendor/github.com/olivere/elastic/indices_stats.go384
-rw-r--r--vendor/github.com/olivere/elastic/indices_stats_test.go86
-rw-r--r--vendor/github.com/olivere/elastic/ingest_delete_pipeline.go129
-rw-r--r--vendor/github.com/olivere/elastic/ingest_delete_pipeline_test.go31
-rw-r--r--vendor/github.com/olivere/elastic/ingest_get_pipeline.go121
-rw-r--r--vendor/github.com/olivere/elastic/ingest_get_pipeline_test.go121
-rw-r--r--vendor/github.com/olivere/elastic/ingest_put_pipeline.go158
-rw-r--r--vendor/github.com/olivere/elastic/ingest_put_pipeline_test.go31
-rw-r--r--vendor/github.com/olivere/elastic/ingest_simulate_pipeline.go161
-rw-r--r--vendor/github.com/olivere/elastic/ingest_simulate_pipeline_test.go35
-rw-r--r--vendor/github.com/olivere/elastic/inner_hit.go160
-rw-r--r--vendor/github.com/olivere/elastic/inner_hit_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/logger.go10
-rw-r--r--vendor/github.com/olivere/elastic/mget.go257
-rw-r--r--vendor/github.com/olivere/elastic/mget_test.go96
-rw-r--r--vendor/github.com/olivere/elastic/msearch.go116
-rw-r--r--vendor/github.com/olivere/elastic/msearch_test.go303
-rw-r--r--vendor/github.com/olivere/elastic/mtermvectors.go475
-rw-r--r--vendor/github.com/olivere/elastic/mtermvectors_test.go134
-rw-r--r--vendor/github.com/olivere/elastic/nodes_info.go313
-rw-r--r--vendor/github.com/olivere/elastic/nodes_info_test.go43
-rw-r--r--vendor/github.com/olivere/elastic/nodes_stats.go703
-rw-r--r--vendor/github.com/olivere/elastic/nodes_stats_test.go138
-rw-r--r--vendor/github.com/olivere/elastic/percolate_test.go68
-rw-r--r--vendor/github.com/olivere/elastic/ping.go127
-rw-r--r--vendor/github.com/olivere/elastic/ping_test.go65
-rw-r--r--vendor/github.com/olivere/elastic/plugins.go40
-rw-r--r--vendor/github.com/olivere/elastic/plugins_test.go32
-rw-r--r--vendor/github.com/olivere/elastic/query.go13
-rw-r--r--vendor/github.com/olivere/elastic/recipes/bulk_insert/bulk_insert.go173
-rw-r--r--vendor/github.com/olivere/elastic/recipes/bulk_processor/main.go149
-rw-r--r--vendor/github.com/olivere/elastic/recipes/connect/connect.go43
-rw-r--r--vendor/github.com/olivere/elastic/recipes/sliced_scroll/sliced_scroll.go161
-rw-r--r--vendor/github.com/olivere/elastic/reindex.go695
-rw-r--r--vendor/github.com/olivere/elastic/reindex_test.go401
-rw-r--r--vendor/github.com/olivere/elastic/request.go79
-rw-r--r--vendor/github.com/olivere/elastic/request_test.go72
-rw-r--r--vendor/github.com/olivere/elastic/rescore.go44
-rw-r--r--vendor/github.com/olivere/elastic/rescorer.go64
-rw-r--r--vendor/github.com/olivere/elastic/response.go41
-rw-r--r--vendor/github.com/olivere/elastic/response_test.go48
-rw-r--r--vendor/github.com/olivere/elastic/retrier.go61
-rw-r--r--vendor/github.com/olivere/elastic/retrier_test.go174
-rw-r--r--vendor/github.com/olivere/elastic/retry.go56
-rw-r--r--vendor/github.com/olivere/elastic/retry_test.go44
-rwxr-xr-xvendor/github.com/olivere/elastic/run-es.sh3
-rw-r--r--vendor/github.com/olivere/elastic/script.go127
-rw-r--r--vendor/github.com/olivere/elastic/script_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/scroll.go470
-rw-r--r--vendor/github.com/olivere/elastic/scroll_test.go387
-rw-r--r--vendor/github.com/olivere/elastic/search.go580
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs.go1520
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_children.go76
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_children_test.go46
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_composite.go498
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_composite_test.go92
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_count_thresholds.go13
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram.go285
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram_test.go49
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go255
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_date_range_test.go155
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_filter.go77
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_filter_test.go66
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_filters.go138
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_filters_test.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance.go198
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance_test.go93
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid.go102
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid_test.go84
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_global.go71
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_global_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_histogram.go265
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_histogram_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range.go195
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range_test.go90
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_missing.go81
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_missing_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_nested.go82
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_nested_test.go62
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_range.go244
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_range_test.go178
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested.go86
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested_test.go83
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_sampler.go111
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_sampler_test.go30
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms.go389
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms_test.go211
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text.go245
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text_test.go66
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_terms.go368
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_bucket_terms_test.go155
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_matrix_stats.go120
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_matrix_stats_test.go53
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_avg.go101
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_avg_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality.go120
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality_test.go78
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds.go105
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_max.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_max_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_min.go100
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_min_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks.go131
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks_test.go78
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles.go130
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles_test.go78
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_stats.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_stats_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_sum.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_sum_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits.go143
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits_test.go31
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_value_count.go102
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_metrics_value_count_test.go63
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket.go113
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script.go132
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script_test.go30
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector.go134
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector_test.go29
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum.go90
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative.go124
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket.go114
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket.go114
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg.go393
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg_test.go132
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket.go125
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff.go124
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket.go113
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket.go113
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_pipeline_test.go903
-rw-r--r--vendor/github.com/olivere/elastic/search_aggs_test.go3416
-rw-r--r--vendor/github.com/olivere/elastic/search_collapse_builder.go68
-rw-r--r--vendor/github.com/olivere/elastic/search_collapse_builder_test.go29
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_bool.go203
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_bool_test.go33
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_boosting.go97
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_boosting_test.go30
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_common_terms.go137
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_common_terms_test.go85
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_constant_score.go59
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_constant_score_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_dis_max.go104
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_dis_max_test.go28
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_exists.go49
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_exists_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_fsq.go171
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_fsq_score_funcs.go567
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_fsq_test.go166
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_fuzzy.go120
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_fuzzy_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_bounding_box.go121
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_bounding_box_test.go63
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_distance.go107
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_distance_test.go69
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_polygon.go72
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_geo_polygon_test.go58
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_has_child.go131
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_has_child_test.go45
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_has_parent.go97
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_has_parent_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_ids.go76
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_ids_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match.go189
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_all.go51
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_all_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_none.go39
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_none_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_phrase.go79
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix.go89
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_phrase_test.go29
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_match_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_more_like_this.go412
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_more_like_this_test.go92
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_multi_match.go275
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_multi_match_test.go131
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_nested.go96
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_nested_test.go86
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_parent_id.go99
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_parent_id_test.go52
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_percolator.go115
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_percolator_test.go65
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_prefix.go67
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_prefix_example_test.go35
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_prefix_test.go45
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_query_string.go350
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_query_string_test.go46
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_range.go144
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_range_test.go68
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_raw_string.go26
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_raw_string_test.go44
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_regexp.go82
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_regexp_test.go47
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_script.go51
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_script_test.go45
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_simple_query_string.go185
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_simple_query_string_test.go87
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_slice.go53
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_slice_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_term.go58
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_term_test.go46
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_terms.go75
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_terms_set.go96
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_terms_set_test.go75
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_terms_test.go82
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_type.go26
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_type_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_wildcard.go81
-rw-r--r--vendor/github.com/olivere/elastic/search_queries_wildcard_test.go68
-rw-r--r--vendor/github.com/olivere/elastic/search_request.go211
-rw-r--r--vendor/github.com/olivere/elastic/search_request_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/search_source.go546
-rw-r--r--vendor/github.com/olivere/elastic/search_source_test.go295
-rw-r--r--vendor/github.com/olivere/elastic/search_suggester_test.go355
-rw-r--r--vendor/github.com/olivere/elastic/search_terms_lookup.go74
-rw-r--r--vendor/github.com/olivere/elastic/search_terms_lookup_test.go27
-rw-r--r--vendor/github.com/olivere/elastic/search_test.go1320
-rw-r--r--vendor/github.com/olivere/elastic/setup_test.go445
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_create.go191
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_create_repository.go205
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_create_repository_test.go61
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_create_test.go63
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_delete_repository.go132
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_delete_repository_test.go35
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_get_repository.go134
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_get_repository_test.go39
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_verify_repository.go132
-rw-r--r--vendor/github.com/olivere/elastic/snapshot_verify_repository_test.go31
-rw-r--r--vendor/github.com/olivere/elastic/sort.go614
-rw-r--r--vendor/github.com/olivere/elastic/sort_test.go278
-rw-r--r--vendor/github.com/olivere/elastic/suggest_field.go90
-rw-r--r--vendor/github.com/olivere/elastic/suggest_field_test.go29
-rw-r--r--vendor/github.com/olivere/elastic/suggester.go15
-rw-r--r--vendor/github.com/olivere/elastic/suggester_completion.go352
-rw-r--r--vendor/github.com/olivere/elastic/suggester_completion_test.go110
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context.go124
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context_category.go119
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context_category_test.go163
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context_geo.go130
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context_geo_test.go48
-rw-r--r--vendor/github.com/olivere/elastic/suggester_context_test.go55
-rw-r--r--vendor/github.com/olivere/elastic/suggester_phrase.go546
-rw-r--r--vendor/github.com/olivere/elastic/suggester_phrase_test.go169
-rw-r--r--vendor/github.com/olivere/elastic/suggester_term.go233
-rw-r--r--vendor/github.com/olivere/elastic/suggester_term_test.go49
-rw-r--r--vendor/github.com/olivere/elastic/tasks_cancel.go149
-rw-r--r--vendor/github.com/olivere/elastic/tasks_cancel_test.go51
-rw-r--r--vendor/github.com/olivere/elastic/tasks_get_task.go108
-rw-r--r--vendor/github.com/olivere/elastic/tasks_get_task_test.go43
-rw-r--r--vendor/github.com/olivere/elastic/tasks_list.go231
-rw-r--r--vendor/github.com/olivere/elastic/tasks_list_test.go65
-rw-r--r--vendor/github.com/olivere/elastic/termvectors.go464
-rw-r--r--vendor/github.com/olivere/elastic/termvectors_test.go157
-rw-r--r--vendor/github.com/olivere/elastic/update.go327
-rw-r--r--vendor/github.com/olivere/elastic/update_by_query.go655
-rw-r--r--vendor/github.com/olivere/elastic/update_by_query_test.go147
-rw-r--r--vendor/github.com/olivere/elastic/update_integration_test.go58
-rw-r--r--vendor/github.com/olivere/elastic/update_test.go262
-rw-r--r--vendor/github.com/olivere/elastic/uritemplates/LICENSE18
-rw-r--r--vendor/github.com/olivere/elastic/uritemplates/uritemplates.go359
-rw-r--r--vendor/github.com/olivere/elastic/uritemplates/utils.go13
-rw-r--r--vendor/github.com/olivere/elastic/uritemplates/utils_test.go105
-rw-r--r--vendor/github.com/pborman/uuid/marshal_test.go124
-rw-r--r--vendor/github.com/pborman/uuid/seq_test.go66
-rw-r--r--vendor/github.com/pborman/uuid/sql_test.go96
-rw-r--r--vendor/github.com/pborman/uuid/uuid_test.go543
-rw-r--r--vendor/github.com/pelletier/go-toml/benchmark_test.go192
-rw-r--r--vendor/github.com/pelletier/go-toml/cmd/test_program.go91
-rw-r--r--vendor/github.com/pelletier/go-toml/cmd/tomljson/main.go72
-rw-r--r--vendor/github.com/pelletier/go-toml/cmd/tomljson/main_test.go82
-rw-r--r--vendor/github.com/pelletier/go-toml/cmd/tomll/main.go66
-rw-r--r--vendor/github.com/pelletier/go-toml/doc_test.go105
-rw-r--r--vendor/github.com/pelletier/go-toml/keysparsing_test.go63
-rw-r--r--vendor/github.com/pelletier/go-toml/lexer_test.go750
-rw-r--r--vendor/github.com/pelletier/go-toml/marshal_test.go806
-rw-r--r--vendor/github.com/pelletier/go-toml/parser_test.go899
-rw-r--r--vendor/github.com/pelletier/go-toml/position_test.go29
-rw-r--r--vendor/github.com/pelletier/go-toml/query/doc.go175
-rw-r--r--vendor/github.com/pelletier/go-toml/query/lexer.go357
-rw-r--r--vendor/github.com/pelletier/go-toml/query/lexer_test.go179
-rw-r--r--vendor/github.com/pelletier/go-toml/query/match.go232
-rw-r--r--vendor/github.com/pelletier/go-toml/query/match_test.go202
-rw-r--r--vendor/github.com/pelletier/go-toml/query/parser.go275
-rw-r--r--vendor/github.com/pelletier/go-toml/query/parser_test.go482
-rw-r--r--vendor/github.com/pelletier/go-toml/query/query.go158
-rw-r--r--vendor/github.com/pelletier/go-toml/query/query_test.go157
-rw-r--r--vendor/github.com/pelletier/go-toml/query/tokens.go106
-rw-r--r--vendor/github.com/pelletier/go-toml/token_test.go67
-rw-r--r--vendor/github.com/pelletier/go-toml/toml_test.go106
-rw-r--r--vendor/github.com/pelletier/go-toml/tomltree_create_test.go126
-rw-r--r--vendor/github.com/pelletier/go-toml/tomltree_write_test.go376
-rw-r--r--vendor/github.com/pkg/errors/bench_test.go59
-rw-r--r--vendor/github.com/pkg/errors/errors_test.go226
-rw-r--r--vendor/github.com/pkg/errors/example_test.go205
-rw-r--r--vendor/github.com/pkg/errors/format_test.go535
-rw-r--r--vendor/github.com/pkg/errors/stack_test.go292
-rw-r--r--vendor/github.com/pmezard/go-difflib/.travis.yml5
-rw-r--r--vendor/github.com/pmezard/go-difflib/README.md50
-rw-r--r--vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go426
-rw-r--r--vendor/github.com/prometheus/client_golang/.gitignore30
-rw-r--r--vendor/github.com/prometheus/client_golang/.travis.yml10
-rw-r--r--vendor/github.com/prometheus/client_golang/AUTHORS.md18
-rw-r--r--vendor/github.com/prometheus/client_golang/CHANGELOG.md109
-rw-r--r--vendor/github.com/prometheus/client_golang/CONTRIBUTING.md18
-rw-r--r--vendor/github.com/prometheus/client_golang/ISSUE_TEMPLATE.md8
-rw-r--r--vendor/github.com/prometheus/client_golang/MAINTAINERS.md1
-rw-r--r--vendor/github.com/prometheus/client_golang/README.md94
-rw-r--r--vendor/github.com/prometheus/client_golang/VERSION1
-rw-r--r--vendor/github.com/prometheus/client_golang/api/client.go131
-rw-r--r--vendor/github.com/prometheus/client_golang/api/client_test.go115
-rw-r--r--vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go293
-rw-r--r--vendor/github.com/prometheus/client_golang/api/prometheus/v1/api_test.go424
-rw-r--r--vendor/github.com/prometheus/client_golang/examples/random/Dockerfile20
-rw-r--r--vendor/github.com/prometheus/client_golang/examples/random/main.go106
-rw-r--r--vendor/github.com/prometheus/client_golang/examples/simple/Dockerfile20
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go199
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/counter.go191
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/counter_test.go212
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/desc.go39
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/desc_test.go17
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/doc.go77
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go118
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/example_timer_complex_test.go71
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/example_timer_gauge_test.go48
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/example_timer_test.go40
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/examples_test.go754
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go97
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/gauge.go204
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go202
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/go_collector.go51
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go123
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go280
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge_test.go309
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/histogram.go147
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go348
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/http.go111
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/http_test.go154
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/labels.go57
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/metric.go20
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/metric_test.go35
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/observer.go52
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/process_collector.go118
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go58
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go199
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go181
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go44
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go160
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go250
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go97
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go144
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8_test.go195
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go447
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go401
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go172
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/push/example_add_from_gatherer_test.go80
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/push/examples_test.go35
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/push/push.go236
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/push/push_test.go194
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/registry.go359
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/registry_test.go590
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/summary.go173
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/summary_test.go388
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/timer.go51
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/timer_test.go152
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/untyped.go102
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/value.go78
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/value_test.go43
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/vec.go491
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/vec_test.go535
-rw-r--r--vendor/github.com/prometheus/client_model/.gitignore1
-rw-r--r--vendor/github.com/prometheus/client_model/CONTRIBUTING.md18
-rw-r--r--vendor/github.com/prometheus/client_model/MAINTAINERS.md1
-rw-r--r--vendor/github.com/prometheus/client_model/Makefile62
-rw-r--r--vendor/github.com/prometheus/client_model/README.md26
-rw-r--r--vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc3380
-rw-r--r--vendor/github.com/prometheus/client_model/cpp/metrics.pb.h2072
-rw-r--r--vendor/github.com/prometheus/client_model/metrics.proto81
-rw-r--r--vendor/github.com/prometheus/client_model/pom.xml130
-rw-r--r--vendor/github.com/prometheus/client_model/python/prometheus/__init__.py12
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/.gitignore5
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/Gemfile4
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/Makefile17
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/README.md31
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/Rakefile1
-rw-r--r--vendor/github.com/prometheus/client_model/ruby/prometheus-client-model.gemspec22
-rw-r--r--vendor/github.com/prometheus/client_model/setup.py23
-rw-r--r--vendor/github.com/prometheus/common/.travis.yml6
-rw-r--r--vendor/github.com/prometheus/common/CONTRIBUTING.md18
-rw-r--r--vendor/github.com/prometheus/common/MAINTAINERS.md1
-rw-r--r--vendor/github.com/prometheus/common/README.md12
-rw-r--r--vendor/github.com/prometheus/common/config/config.go47
-rw-r--r--vendor/github.com/prometheus/common/config/http_config.go281
-rw-r--r--vendor/github.com/prometheus/common/config/http_config_test.go157
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml5
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml4
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml4
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml1
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/tls_config.cert_no_key.bad.yml1
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml0
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/tls_config.insecure.good.yml1
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/tls_config.invalid_field.bad.yml1
-rw-r--r--vendor/github.com/prometheus/common/config/testdata/tls_config.key_no_cert.bad.yml1
-rw-r--r--vendor/github.com/prometheus/common/config/tls_config_test.go92
-rw-r--r--vendor/github.com/prometheus/common/expfmt/bench_test.go167
-rw-r--r--vendor/github.com/prometheus/common/expfmt/decode.go4
-rw-r--r--vendor/github.com/prometheus/common/expfmt/decode_test.go435
-rw-r--r--vendor/github.com/prometheus/common/expfmt/expfmt.go2
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_02
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_16
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_212
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_322
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_410
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_01
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_101
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_111
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_123
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_133
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_143
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_152
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_162
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_171
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_181
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_193
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_23
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_31
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_41
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_51
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_61
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_73
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_81
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_91
-rw-r--r--vendor/github.com/prometheus/common/expfmt/fuzz/corpus/minimal1
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/json246
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/json2_bad46
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/protobufbin8239 -> 0 bytes
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gzbin2097 -> 0 bytes
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/text322
-rw-r--r--vendor/github.com/prometheus/common/expfmt/testdata/text.gzbin2598 -> 0 bytes
-rw-r--r--vendor/github.com/prometheus/common/expfmt/text_create_test.go443
-rw-r--r--vendor/github.com/prometheus/common/expfmt/text_parse.go4
-rw-r--r--vendor/github.com/prometheus/common/expfmt/text_parse_test.go593
-rw-r--r--vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go33
-rw-r--r--vendor/github.com/prometheus/common/log/eventlog_formatter.go89
-rw-r--r--vendor/github.com/prometheus/common/log/log.go364
-rw-r--r--vendor/github.com/prometheus/common/log/log_test.go39
-rw-r--r--vendor/github.com/prometheus/common/log/syslog_formatter.go126
-rw-r--r--vendor/github.com/prometheus/common/log/syslog_formatter_test.go52
-rw-r--r--vendor/github.com/prometheus/common/model/alert_test.go118
-rw-r--r--vendor/github.com/prometheus/common/model/labels_test.go140
-rw-r--r--vendor/github.com/prometheus/common/model/metric_test.go132
-rw-r--r--vendor/github.com/prometheus/common/model/signature_test.go314
-rw-r--r--vendor/github.com/prometheus/common/model/silence.go4
-rw-r--r--vendor/github.com/prometheus/common/model/silence_test.go228
-rw-r--r--vendor/github.com/prometheus/common/model/time_test.go132
-rw-r--r--vendor/github.com/prometheus/common/model/value.go4
-rw-r--r--vendor/github.com/prometheus/common/model/value_test.go468
-rw-r--r--vendor/github.com/prometheus/common/promlog/flag/flag.go33
-rw-r--r--vendor/github.com/prometheus/common/promlog/log.go63
-rw-r--r--vendor/github.com/prometheus/common/route/route.go100
-rw-r--r--vendor/github.com/prometheus/common/route/route_test.go44
-rw-r--r--vendor/github.com/prometheus/common/version/info.go89
-rw-r--r--vendor/github.com/prometheus/procfs/.gitignore1
-rw-r--r--vendor/github.com/prometheus/procfs/.travis.yml6
-rw-r--r--vendor/github.com/prometheus/procfs/Makefile77
-rw-r--r--vendor/github.com/prometheus/procfs/bcache/bcache.go84
-rw-r--r--vendor/github.com/prometheus/procfs/bcache/get.go330
-rw-r--r--vendor/github.com/prometheus/procfs/bcache/get_test.go114
-rw-r--r--vendor/github.com/prometheus/procfs/buddyinfo_test.go64
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures.ttar446
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/cmdlinebin16 -> 0 bytes
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/comm1
l---------vendor/github.com/prometheus/procfs/fixtures/26231/exe1
l---------vendor/github.com/prometheus/procfs/fixtures/26231/fd/01
l---------vendor/github.com/prometheus/procfs/fixtures/26231/fd/11
l---------vendor/github.com/prometheus/procfs/fixtures/26231/fd/101
l---------vendor/github.com/prometheus/procfs/fixtures/26231/fd/21
l---------vendor/github.com/prometheus/procfs/fixtures/26231/fd/31
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/io7
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/limits17
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/mountstats19
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/net/dev4
l---------vendor/github.com/prometheus/procfs/fixtures/26231/ns/mnt1
l---------vendor/github.com/prometheus/procfs/fixtures/26231/ns/net1
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26231/stat1
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26232/cmdline0
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26232/comm1
l---------vendor/github.com/prometheus/procfs/fixtures/26232/fd/01
l---------vendor/github.com/prometheus/procfs/fixtures/26232/fd/11
l---------vendor/github.com/prometheus/procfs/fixtures/26232/fd/21
l---------vendor/github.com/prometheus/procfs/fixtures/26232/fd/31
l---------vendor/github.com/prometheus/procfs/fixtures/26232/fd/41
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26232/limits17
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/26232/stat1
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/584/stat2
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/buddyinfo/short/buddyinfo3
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/buddyinfo/sizemismatch/buddyinfo3
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/buddyinfo/valid/buddyinfo3
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/fs/xfs/stat23
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/mdstat26
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/dev6
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/ip_vs21
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/ip_vs_stats6
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfs5
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfsd11
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/net/xfrm_stat28
l---------vendor/github.com/prometheus/procfs/fixtures/self1
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/stat16
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/README2
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/abc0
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/def0
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/ghi0
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/uvw0
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures/symlinktargets/xyz0
-rw-r--r--vendor/github.com/prometheus/procfs/fs.go13
-rw-r--r--vendor/github.com/prometheus/procfs/fs_test.go26
-rw-r--r--vendor/github.com/prometheus/procfs/ipvs.go13
-rw-r--r--vendor/github.com/prometheus/procfs/ipvs_test.go237
-rw-r--r--vendor/github.com/prometheus/procfs/mdstat.go13
-rw-r--r--vendor/github.com/prometheus/procfs/mdstat_test.go31
-rw-r--r--vendor/github.com/prometheus/procfs/mountstats.go13
-rw-r--r--vendor/github.com/prometheus/procfs/mountstats_test.go273
-rw-r--r--vendor/github.com/prometheus/procfs/net_dev.go15
-rw-r--r--vendor/github.com/prometheus/procfs/net_dev_test.go73
-rw-r--r--vendor/github.com/prometheus/procfs/nfs/nfs.go20
-rw-r--r--vendor/github.com/prometheus/procfs/nfs/parse.go16
-rw-r--r--vendor/github.com/prometheus/procfs/nfs/parse_nfs_test.go305
-rw-r--r--vendor/github.com/prometheus/procfs/nfs/parse_nfsd_test.go196
-rw-r--r--vendor/github.com/prometheus/procfs/proc.go16
-rw-r--r--vendor/github.com/prometheus/procfs/proc_io.go13
-rw-r--r--vendor/github.com/prometheus/procfs/proc_io_test.go33
-rw-r--r--vendor/github.com/prometheus/procfs/proc_limits.go13
-rw-r--r--vendor/github.com/prometheus/procfs/proc_limits_test.go31
-rw-r--r--vendor/github.com/prometheus/procfs/proc_ns.go13
-rw-r--r--vendor/github.com/prometheus/procfs/proc_ns_test.go31
-rw-r--r--vendor/github.com/prometheus/procfs/proc_stat.go13
-rw-r--r--vendor/github.com/prometheus/procfs/proc_stat_test.go110
-rw-r--r--vendor/github.com/prometheus/procfs/proc_test.go160
-rw-r--r--vendor/github.com/prometheus/procfs/stat.go13
-rw-r--r--vendor/github.com/prometheus/procfs/stat_test.go61
-rw-r--r--vendor/github.com/prometheus/procfs/sysfs/.gitignore1
-rw-r--r--vendor/github.com/prometheus/procfs/sysfs/doc.go16
-rw-r--r--vendor/github.com/prometheus/procfs/sysfs/fixtures.ttar721
-rw-r--r--vendor/github.com/prometheus/procfs/sysfs/fs.go108
-rw-r--r--vendor/github.com/prometheus/procfs/sysfs/fs_test.go108
-rwxr-xr-xvendor/github.com/prometheus/procfs/ttar133
-rw-r--r--vendor/github.com/prometheus/procfs/xfrm_test.go66
-rw-r--r--vendor/github.com/prometheus/procfs/xfs/parse_test.go442
-rw-r--r--vendor/github.com/rwcarlsen/goexif/.gitignore23
-rw-r--r--vendor/github.com/rwcarlsen/goexif/README.md71
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/corrupt/huge_tag_exif.jpgbin65536 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/corrupt/infinite_loop_exif.jpgbin3738 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/corrupt/max_uint32_exif.jpgbin65536 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/example_test.go42
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/exif.go69
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/exif_test.go202
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/fields.go224
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/regress_expected_test.go2293
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2004-01-11-22-45-15-sep-2004-01-11-22-45-15a.jpgbin4586 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2006-08-03-16-29-38-sep-2006-08-03-16-29-38a.jpgbin9735 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2006-11-11-19-17-56-sep-2006-11-11-19-17-56a.jpgbin35406 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-10-23-58-20-sep-2006-12-10-23-58-20a.jpgbin8711 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-17-07-09-14-sep-2006-12-17-07-09-14a.jpgbin38252 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-21-15-55-26-sep-2006-12-21-15-55-26a.jpgbin16072 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-01-12-00-00-sep-2007-01-01-12-00-00a.jpgbin17301 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-17-21-49-44-sep-2007-01-17-21-49-44a.jpgbin7999 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-02-02-18-13-29-sep-2007-02-02-18-13-29a.jpgbin39915 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-02-17-02-21-sep-2007-05-02-17-02-21a.jpgbin11783 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-12-08-19-07-sep-2007-05-12-08-19-07a.jpgbin35771 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-26-04-49-45-sep-2007-05-26-04-49-45a.jpgbin35406 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-30-14-28-01-sep-2007-05-30-14-28-01a.jpgbin35406 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-06-16-15-25-sep-2007-06-06-16-15-25a.jpgbin35406 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-26-10-13-04-sep-2007-06-26-10-13-04a.jpgbin7615 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-07-13-17-02-30-sep-2007-07-13-17-02-30a.jpgbin21719 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-15-14-42-46-sep-2007-08-15-14-42-46a.jpgbin11549 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-24-02-40-42-sep-2007-08-24-02-40-42a.jpgbin7687 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2007-11-07-11-40-44-sep-2007-11-07-11-40-44a.jpgbin11223 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-02-10-03-57-sep-2008-06-02-10-03-57a.jpgbin9745 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-06-13-29-29-sep-2008-06-06-13-29-29a.jpgbin11783 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-17-01-21-30-sep-2008-06-17-01-21-30a.jpgbin14564 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2008-09-02-17-43-48-sep-2008-09-02-17-43-48a.jpgbin5406 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-03-26-09-23-20-sep-2009-03-26-09-23-20a.jpgbin10759 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-11-03-01-38-sep-2009-04-11-03-01-38a.jpgbin43374 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-23-07-21-35-sep-2009-04-23-07-21-35a.jpgbin37208 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-11-19-23-18-sep-2009-06-11-19-23-18a.jpgbin7791 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-20-07-59-05-sep-2009-06-20-07-59-05a.jpgbin13618 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpgbin9919 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-08-04-44-24-sep-2010-06-08-04-44-24a.jpgbin10939 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-20-20-07-39-sep-2010-06-20-20-07-39a.jpgbin8551 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2010-09-02-08-43-02-sep-2010-09-02-08-43-02a.jpgbin19534 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-01-24-22-06-02-sep-2011-01-24-22-06-02a.jpgbin29003 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-03-07-09-28-03-sep-2011-03-07-09-28-03a.jpgbin10529 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-05-07-13-02-49-sep-2011-05-07-13-02-49a.jpgbin23743 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-08-07-19-22-57-sep-2011-08-07-19-22-57a.jpgbin9936 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-17-50-18-sep-2011-10-28-17-50-18a.jpgbin7487 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-18-25-43-sep-2011-10-28-18-25-43.jpgbin7433 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2011-11-18-15-38-34-sep-Photo11181538.jpgbin12885 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2012-06-02-10-12-28-sep-2012-06-02-10-12-28.jpgbin32165 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2012-09-21-22-07-34-sep-2012-09-21-22-07-34.jpgbin10247 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-19-21-38-40-sep-temple_square1.jpgbin39182 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-21-11-15-19-sep-IMG_0001.jpgbin25269 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2013-02-05-23-12-09-sep-DSCI0001.jpgbin10854 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2099-08-12-19-59-29-sep-2099-08-12-19-59-29a.jpgbin37491 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/2216-11-15-11-46-51-sep-2216-11-15-11-46-51a.jpgbin23011 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/FailedHash-NoDate-sep-remembory.jpgbin935 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f1-exif.jpgbin992 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f2-exif.jpgbin994 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f3-exif.jpgbin992 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f4-exif.jpgbin994 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f5-exif.jpgbin980 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f6-exif.jpgbin982 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f7-exif.jpgbin980 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/f8-exif.jpgbin982 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/geodegrees_as_string.jpgbin22420 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exif/samples/has-lens-info.jpgbin22493 -> 0 bytes
-rw-r--r--vendor/github.com/rwcarlsen/goexif/exifstat/main.go60
-rw-r--r--vendor/github.com/rwcarlsen/goexif/mknote/fields.go268
-rw-r--r--vendor/github.com/rwcarlsen/goexif/mknote/mknote.go70
-rw-r--r--vendor/github.com/rwcarlsen/goexif/tiff/tag.go22
-rw-r--r--vendor/github.com/rwcarlsen/goexif/tiff/tiff_test.go235
-rw-r--r--vendor/github.com/sean-/seed/init_test.go26
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/Godeps.json17
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/Readme5
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/.gitignore2
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/.gitignore22
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/README.md4
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime.go71
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime_test.go40
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid.go204
-rw-r--r--vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid_test.go102
-rw-r--r--vendor/github.com/segmentio/analytics-go/analytics_test.go478
-rw-r--r--vendor/github.com/segmentio/analytics-go/examples/track.go36
-rw-r--r--vendor/github.com/segmentio/backo-go/backo_test.go77
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/.gitignore7
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/README.md45
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert.go76
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert_test.go15
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point.go5
-rw-r--r--vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point_test.go13
-rw-r--r--vendor/github.com/sirupsen/logrus/.gitignore1
-rw-r--r--vendor/github.com/sirupsen/logrus/.travis.yml15
-rw-r--r--vendor/github.com/sirupsen/logrus/CHANGELOG.md123
-rw-r--r--vendor/github.com/sirupsen/logrus/LICENSE (renamed from vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md)2
-rw-r--r--vendor/github.com/sirupsen/logrus/README.md511
-rw-r--r--vendor/github.com/sirupsen/logrus/alt_exit.go64
-rw-r--r--vendor/github.com/sirupsen/logrus/appveyor.yml14
-rw-r--r--vendor/github.com/sirupsen/logrus/doc.go26
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go288
-rw-r--r--vendor/github.com/sirupsen/logrus/exported.go193
-rw-r--r--vendor/github.com/sirupsen/logrus/formatter.go45
-rw-r--r--vendor/github.com/sirupsen/logrus/hooks.go34
-rw-r--r--vendor/github.com/sirupsen/logrus/json_formatter.go79
-rw-r--r--vendor/github.com/sirupsen/logrus/logger.go323
-rw-r--r--vendor/github.com/sirupsen/logrus/logrus.go143
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_bsd.go10
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_appengine.go11
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go19
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_linux.go (renamed from vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go)8
-rw-r--r--vendor/github.com/sirupsen/logrus/text_formatter.go178
-rw-r--r--vendor/github.com/sirupsen/logrus/writer.go62
-rw-r--r--vendor/github.com/spf13/afero/.travis.yml2
-rw-r--r--vendor/github.com/spf13/afero/afero_test.go699
-rw-r--r--vendor/github.com/spf13/afero/basepath.go47
-rw-r--r--vendor/github.com/spf13/afero/basepath_test.go142
-rw-r--r--vendor/github.com/spf13/afero/cacheOnReadFs.go6
-rw-r--r--vendor/github.com/spf13/afero/composite_test.go404
-rw-r--r--vendor/github.com/spf13/afero/copyOnWriteFs.go53
-rw-r--r--vendor/github.com/spf13/afero/copyOnWriteFs_test.go39
-rw-r--r--vendor/github.com/spf13/afero/ioutil_test.go112
-rw-r--r--vendor/github.com/spf13/afero/lstater.go (renamed from vendor/github.com/prometheus/client_golang/examples/simple/main.go)26
-rw-r--r--vendor/github.com/spf13/afero/match.go4
-rw-r--r--vendor/github.com/spf13/afero/match_test.go183
-rw-r--r--vendor/github.com/spf13/afero/mem/file_test.go154
-rw-r--r--vendor/github.com/spf13/afero/memmap_test.go451
-rw-r--r--vendor/github.com/spf13/afero/os.go7
-rw-r--r--vendor/github.com/spf13/afero/path.go18
-rw-r--r--vendor/github.com/spf13/afero/path_test.go69
-rw-r--r--vendor/github.com/spf13/afero/readonlyfs.go10
-rw-r--r--vendor/github.com/spf13/afero/ro_regexp_test.go96
-rw-r--r--vendor/github.com/spf13/afero/sftpfs/file.go95
-rw-r--r--vendor/github.com/spf13/afero/sftpfs/sftp.go129
-rw-r--r--vendor/github.com/spf13/afero/sftpfs/sftp_test_go286
-rw-r--r--vendor/github.com/spf13/afero/unionFile.go189
-rw-r--r--vendor/github.com/spf13/afero/util_test.go450
-rw-r--r--vendor/github.com/spf13/cast/cast_test.go1208
-rw-r--r--vendor/github.com/spf13/cobra/.circleci/config.yml38
-rw-r--r--vendor/github.com/spf13/cobra/.travis.yml4
-rw-r--r--vendor/github.com/spf13/cobra/args_test.go241
-rw-r--r--vendor/github.com/spf13/cobra/bash_completions.go22
-rw-r--r--vendor/github.com/spf13/cobra/bash_completions.md25
-rw-r--r--vendor/github.com/spf13/cobra/bash_completions_test.go197
-rw-r--r--vendor/github.com/spf13/cobra/cobra/README.md94
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/add.go179
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/add_test.go109
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go77
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/helpers.go168
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/init.go234
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/init_test.go83
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/project.go200
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/project_test.go24
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/root.go79
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden21
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden89
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden50
-rw-r--r--vendor/github.com/spf13/cobra/cobra/main.go20
-rw-r--r--vendor/github.com/spf13/cobra/cobra_test.go22
-rw-r--r--vendor/github.com/spf13/cobra/command.go3
-rw-r--r--vendor/github.com/spf13/cobra/command_test.go1628
-rw-r--r--vendor/github.com/spf13/cobra/doc/cmd_test.go86
-rw-r--r--vendor/github.com/spf13/cobra/doc/man_docs.go236
-rw-r--r--vendor/github.com/spf13/cobra/doc/man_docs.md31
-rw-r--r--vendor/github.com/spf13/cobra/doc/man_docs_test.go177
-rw-r--r--vendor/github.com/spf13/cobra/doc/man_examples_test.go35
-rw-r--r--vendor/github.com/spf13/cobra/doc/md_docs.go159
-rw-r--r--vendor/github.com/spf13/cobra/doc/md_docs.md115
-rw-r--r--vendor/github.com/spf13/cobra/doc/md_docs_test.go74
-rw-r--r--vendor/github.com/spf13/cobra/doc/rest_docs.go185
-rw-r--r--vendor/github.com/spf13/cobra/doc/rest_docs.md114
-rw-r--r--vendor/github.com/spf13/cobra/doc/rest_docs_test.go76
-rw-r--r--vendor/github.com/spf13/cobra/doc/util.go51
-rw-r--r--vendor/github.com/spf13/cobra/doc/yaml_docs.go169
-rw-r--r--vendor/github.com/spf13/cobra/doc/yaml_docs.md112
-rw-r--r--vendor/github.com/spf13/cobra/doc/yaml_docs_test.go74
-rw-r--r--vendor/github.com/spf13/cobra/zsh_completions_test.go89
-rw-r--r--vendor/github.com/spf13/jwalterweatherman/default_notepad_test.go102
-rw-r--r--vendor/github.com/spf13/jwalterweatherman/notepad_test.go50
-rw-r--r--vendor/github.com/spf13/pflag/bool_slice_test.go215
-rw-r--r--vendor/github.com/spf13/pflag/bool_test.go179
-rw-r--r--vendor/github.com/spf13/pflag/bytes.go105
-rw-r--r--vendor/github.com/spf13/pflag/count_test.go56
-rw-r--r--vendor/github.com/spf13/pflag/duration_slice_test.go165
-rw-r--r--vendor/github.com/spf13/pflag/example_test.go36
-rw-r--r--vendor/github.com/spf13/pflag/export_test.go29
-rw-r--r--vendor/github.com/spf13/pflag/flag.go98
-rw-r--r--vendor/github.com/spf13/pflag/flag_test.go1158
-rw-r--r--vendor/github.com/spf13/pflag/golangflag.go4
-rw-r--r--vendor/github.com/spf13/pflag/golangflag_test.go39
-rw-r--r--vendor/github.com/spf13/pflag/int_slice_test.go165
-rw-r--r--vendor/github.com/spf13/pflag/ip_slice_test.go222
-rw-r--r--vendor/github.com/spf13/pflag/ip_test.go63
-rw-r--r--vendor/github.com/spf13/pflag/ipnet_test.go70
-rw-r--r--vendor/github.com/spf13/pflag/string_array.go8
-rw-r--r--vendor/github.com/spf13/pflag/string_array_test.go233
-rw-r--r--vendor/github.com/spf13/pflag/string_slice.go20
-rw-r--r--vendor/github.com/spf13/pflag/string_slice_test.go253
-rw-r--r--vendor/github.com/spf13/pflag/uint_slice_test.go161
-rwxr-xr-xvendor/github.com/spf13/pflag/verify/all.sh69
-rwxr-xr-xvendor/github.com/spf13/pflag/verify/gofmt.sh19
-rwxr-xr-xvendor/github.com/spf13/pflag/verify/golint.sh15
-rw-r--r--vendor/github.com/spf13/viper/flags_test.go65
-rw-r--r--vendor/github.com/spf13/viper/overrides_test.go173
-rw-r--r--vendor/github.com/spf13/viper/remote/remote.go105
-rw-r--r--vendor/github.com/spf13/viper/util_test.go54
-rw-r--r--vendor/github.com/spf13/viper/viper_test.go1406
-rw-r--r--vendor/github.com/stretchr/objx/.codeclimate.yml21
-rw-r--r--vendor/github.com/stretchr/objx/.github/CODE_OF_CONDUCT.md46
-rw-r--r--vendor/github.com/stretchr/objx/.gitignore15
-rw-r--r--vendor/github.com/stretchr/objx/.travis.yml25
-rw-r--r--vendor/github.com/stretchr/objx/Gopkg.lock7
-rw-r--r--vendor/github.com/stretchr/objx/Gopkg.toml5
-rw-r--r--vendor/github.com/stretchr/objx/README.md4
-rw-r--r--vendor/github.com/stretchr/objx/Taskfile.yml9
-rw-r--r--vendor/github.com/stretchr/objx/accessors.go178
-rw-r--r--vendor/github.com/stretchr/objx/accessors_test.go174
-rw-r--r--vendor/github.com/stretchr/objx/codegen/array-access.txt14
-rw-r--r--vendor/github.com/stretchr/objx/codegen/index.html86
-rw-r--r--vendor/github.com/stretchr/objx/codegen/template.txt124
-rw-r--r--vendor/github.com/stretchr/objx/codegen/template_test.txt120
-rw-r--r--vendor/github.com/stretchr/objx/codegen/types_list.txt20
-rw-r--r--vendor/github.com/stretchr/objx/constants.go (renamed from vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go)0
-rw-r--r--vendor/github.com/stretchr/objx/conversions.go9
-rw-r--r--vendor/github.com/stretchr/objx/conversions_test.go96
-rw-r--r--vendor/github.com/stretchr/objx/fixture_test.go96
-rw-r--r--vendor/github.com/stretchr/objx/map.go63
-rw-r--r--vendor/github.com/stretchr/objx/map_test.go227
-rw-r--r--vendor/github.com/stretchr/objx/mutations.go27
-rw-r--r--vendor/github.com/stretchr/objx/mutations_test.go106
-rw-r--r--vendor/github.com/stretchr/objx/security.go11
-rw-r--r--vendor/github.com/stretchr/objx/security_test.go12
-rw-r--r--vendor/github.com/stretchr/objx/simple_example_test.go42
-rw-r--r--vendor/github.com/stretchr/objx/tests_test.go25
-rw-r--r--vendor/github.com/stretchr/objx/type_specific_codegen.go23
-rw-r--r--vendor/github.com/stretchr/objx/type_specific_codegen_test.go2350
-rw-r--r--vendor/github.com/stretchr/objx/value.go3
-rw-r--r--vendor/github.com/stretchr/objx/value_test.go74
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/LICENSE15
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypass.go152
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go38
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/common.go341
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/config.go306
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/doc.go211
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/dump.go509
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/format.go419
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/spew.go148
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/LICENSE27
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/difflib/difflib.go772
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/LICENSE22
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_format.go405
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_forward.go798
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertions.go1312
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/doc.go45
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/errors.go10
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/forward_assertions.go16
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/http_assertions.go127
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/doc.go28
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/forward_requirements.go16
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require.go979
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require_forward.go799
-rw-r--r--vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/requirements.go9
-rw-r--r--vendor/github.com/stretchr/testify/.gitignore24
-rwxr-xr-xvendor/github.com/stretchr/testify/.travis.gofmt.sh7
-rwxr-xr-xvendor/github.com/stretchr/testify/.travis.gogenerate.sh13
-rwxr-xr-xvendor/github.com/stretchr/testify/.travis.govet.sh10
-rw-r--r--vendor/github.com/stretchr/testify/.travis.yml15
-rw-r--r--vendor/github.com/stretchr/testify/Gopkg.lock27
-rw-r--r--vendor/github.com/stretchr/testify/Gopkg.toml16
-rw-r--r--vendor/github.com/stretchr/testify/README.md301
-rw-r--r--vendor/github.com/stretchr/testify/_codegen/main.go316
-rw-r--r--vendor/github.com/stretchr/testify/assert/assertions_test.go1581
-rw-r--r--vendor/github.com/stretchr/testify/assert/forward_assertions_test.go611
-rw-r--r--vendor/github.com/stretchr/testify/assert/http_assertions_test.go117
-rw-r--r--vendor/github.com/stretchr/testify/doc.go22
-rw-r--r--vendor/github.com/stretchr/testify/http/doc.go2
-rw-r--r--vendor/github.com/stretchr/testify/http/test_response_writer.go49
-rw-r--r--vendor/github.com/stretchr/testify/http/test_round_tripper.go17
-rw-r--r--vendor/github.com/stretchr/testify/mock/mock_test.go1352
-rw-r--r--vendor/github.com/stretchr/testify/package_test.go12
-rw-r--r--vendor/github.com/stretchr/testify/require/forward_requirements_test.go385
-rw-r--r--vendor/github.com/stretchr/testify/require/requirements_test.go369
-rw-r--r--vendor/github.com/stretchr/testify/suite/suite_test.go294
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE15
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypass.go152
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go38
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/common.go341
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/config.go306
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/doc.go211
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/dump.go509
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/format.go419
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/spew.go148
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/LICENSE27
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib/difflib.go772
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/accessors.go171
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/conversions.go108
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/doc.go66
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/map.go193
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/mutations.go74
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go17
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go17
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/type_specific_codegen.go2501
-rw-r--r--vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go56
-rw-r--r--vendor/github.com/tylerb/graceful/README.md5
-rw-r--r--vendor/github.com/tylerb/graceful/graceful_test.go692
-rw-r--r--vendor/github.com/tylerb/graceful/http2_test.go125
-rw-r--r--vendor/github.com/tylerb/graceful/test-fixtures/cert.crt43
-rw-r--r--vendor/github.com/tylerb/graceful/test-fixtures/key.pem27
-rw-r--r--vendor/github.com/tylerb/graceful/tests/main.go40
-rw-r--r--vendor/github.com/xtgo/uuid/uuid_test.go102
3296 files changed, 8605 insertions, 781360 deletions
diff --git a/vendor/github.com/NYTimes/gziphandler/gzip.go b/vendor/github.com/NYTimes/gziphandler/gzip.go
index ae1ebe4bf..f91dcfa16 100644
--- a/vendor/github.com/NYTimes/gziphandler/gzip.go
+++ b/vendor/github.com/NYTimes/gziphandler/gzip.go
@@ -28,9 +28,10 @@ const (
// The examples seem to indicate that it is.
DefaultQValue = 1.0
- // DefaultMinSize defines the minimum size to reach to enable compression.
- // It's 512 bytes.
- DefaultMinSize = 512
+ // 1500 bytes is the MTU size for the internet since that is the largest size allowed at the network layer.
+ // If you take a file that is 1300 bytes and compress it to 800 bytes, it’s still transmitted in that same 1500 byte packet regardless, so you’ve gained nothing.
+ // That being the case, you should restrict the gzip compression to files with a size greater than a single packet, 1400 bytes (1.4KB) is a safe value.
+ DefaultMinSize = 1400
)
// gzipWriterPools stores a sync.Pool for each compression level for reuse of
diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go b/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go
deleted file mode 100644
index 412b2918e..000000000
--- a/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// +build go1.8
-
-package gziphandler
-
-import (
- "net/http"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestSetAcceptEncodingForPushOptionsWithoutHeaders(t *testing.T) {
- var opts *http.PushOptions
- opts = setAcceptEncodingForPushOptions(opts)
-
- assert.NotNil(t, opts)
- assert.NotNil(t, opts.Header)
-
- for k, v := range opts.Header {
- assert.Equal(t, "Accept-Encoding", k)
- assert.Len(t, v, 1)
- assert.Equal(t, "gzip", v[0])
- }
-
- opts = &http.PushOptions{}
- opts = setAcceptEncodingForPushOptions(opts)
-
- assert.NotNil(t, opts)
- assert.NotNil(t, opts.Header)
-
- for k, v := range opts.Header {
- assert.Equal(t, "Accept-Encoding", k)
- assert.Len(t, v, 1)
- assert.Equal(t, "gzip", v[0])
- }
-}
-
-func TestSetAcceptEncodingForPushOptionsWithHeaders(t *testing.T) {
- opts := &http.PushOptions{
- Header: http.Header{
- "User-Agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"},
- },
- }
- opts = setAcceptEncodingForPushOptions(opts)
-
- assert.NotNil(t, opts)
- assert.NotNil(t, opts.Header)
-
- assert.Equal(t, "gzip", opts.Header.Get("Accept-Encoding"))
- assert.Equal(t, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36", opts.Header.Get("User-Agent"))
-
- opts = &http.PushOptions{
- Header: http.Header{
- "User-Agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"},
- acceptEncoding: []string{"deflate"},
- },
- }
- opts = setAcceptEncodingForPushOptions(opts)
-
- assert.NotNil(t, opts)
- assert.NotNil(t, opts.Header)
-
- e, found := opts.Header["Accept-Encoding"]
- if !found {
- assert.Fail(t, "Missing Accept-Encoding header value")
- }
- assert.Len(t, e, 1)
- assert.Equal(t, "deflate", e[0])
- assert.Equal(t, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36", opts.Header.Get("User-Agent"))
-}
diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_test.go b/vendor/github.com/NYTimes/gziphandler/gzip_test.go
deleted file mode 100644
index ba5048921..000000000
--- a/vendor/github.com/NYTimes/gziphandler/gzip_test.go
+++ /dev/null
@@ -1,540 +0,0 @@
-package gziphandler
-
-import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strconv"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-const (
- smallTestBody = "aaabbcaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbccc"
- testBody = "aaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbccc"
-)
-
-func TestParseEncodings(t *testing.T) {
- examples := map[string]codings{
-
- // Examples from RFC 2616
- "compress, gzip": {"compress": 1.0, "gzip": 1.0},
- "": {},
- "*": {"*": 1.0},
- "compress;q=0.5, gzip;q=1.0": {"compress": 0.5, "gzip": 1.0},
- "gzip;q=1.0, identity; q=0.5, *;q=0": {"gzip": 1.0, "identity": 0.5, "*": 0.0},
-
- // More random stuff
- "AAA;q=1": {"aaa": 1.0},
- "BBB ; q = 2": {"bbb": 1.0},
- }
-
- for eg, exp := range examples {
- act, _ := parseEncodings(eg)
- assert.Equal(t, exp, act)
- }
-}
-
-func TestGzipHandler(t *testing.T) {
- // This just exists to provide something for GzipHandler to wrap.
- handler := newTestHandler(testBody)
-
- // requests without accept-encoding are passed along as-is
-
- req1, _ := http.NewRequest("GET", "/whatever", nil)
- resp1 := httptest.NewRecorder()
- handler.ServeHTTP(resp1, req1)
- res1 := resp1.Result()
-
- assert.Equal(t, 200, res1.StatusCode)
- assert.Equal(t, "", res1.Header.Get("Content-Encoding"))
- assert.Equal(t, "Accept-Encoding", res1.Header.Get("Vary"))
- assert.Equal(t, testBody, resp1.Body.String())
-
- // but requests with accept-encoding:gzip are compressed if possible
-
- req2, _ := http.NewRequest("GET", "/whatever", nil)
- req2.Header.Set("Accept-Encoding", "gzip")
- resp2 := httptest.NewRecorder()
- handler.ServeHTTP(resp2, req2)
- res2 := resp2.Result()
-
- assert.Equal(t, 200, res2.StatusCode)
- assert.Equal(t, "gzip", res2.Header.Get("Content-Encoding"))
- assert.Equal(t, "Accept-Encoding", res2.Header.Get("Vary"))
- assert.Equal(t, gzipStrLevel(testBody, gzip.DefaultCompression), resp2.Body.Bytes())
-
- // content-type header is correctly set based on uncompressed body
-
- req3, _ := http.NewRequest("GET", "/whatever", nil)
- req3.Header.Set("Accept-Encoding", "gzip")
- res3 := httptest.NewRecorder()
- handler.ServeHTTP(res3, req3)
-
- assert.Equal(t, http.DetectContentType([]byte(testBody)), res3.Header().Get("Content-Type"))
-}
-
-func TestGzipHandlerAlreadyCompressed(t *testing.T) {
- handler := newTestHandler(testBody)
-
- req, _ := http.NewRequest("GET", "/gzipped", nil)
- req.Header.Set("Accept-Encoding", "gzip")
- res := httptest.NewRecorder()
- handler.ServeHTTP(res, req)
-
- assert.Equal(t, testBody, res.Body.String())
-}
-
-func TestNewGzipLevelHandler(t *testing.T) {
- handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- io.WriteString(w, testBody)
- })
-
- for lvl := gzip.BestSpeed; lvl <= gzip.BestCompression; lvl++ {
- wrapper, err := NewGzipLevelHandler(lvl)
- if !assert.Nil(t, err, "NewGzipLevleHandler returned error for level:", lvl) {
- continue
- }
-
- req, _ := http.NewRequest("GET", "/whatever", nil)
- req.Header.Set("Accept-Encoding", "gzip")
- resp := httptest.NewRecorder()
- wrapper(handler).ServeHTTP(resp, req)
- res := resp.Result()
-
- assert.Equal(t, 200, res.StatusCode)
- assert.Equal(t, "gzip", res.Header.Get("Content-Encoding"))
- assert.Equal(t, "Accept-Encoding", res.Header.Get("Vary"))
- assert.Equal(t, gzipStrLevel(testBody, lvl), resp.Body.Bytes())
- }
-}
-
-func TestNewGzipLevelHandlerReturnsErrorForInvalidLevels(t *testing.T) {
- var err error
- _, err = NewGzipLevelHandler(-42)
- assert.NotNil(t, err)
-
- _, err = NewGzipLevelHandler(42)
- assert.NotNil(t, err)
-}
-
-func TestMustNewGzipLevelHandlerWillPanic(t *testing.T) {
- defer func() {
- if r := recover(); r == nil {
- t.Error("panic was not called")
- }
- }()
-
- _ = MustNewGzipLevelHandler(-42)
-}
-
-func TestGzipHandlerNoBody(t *testing.T) {
- tests := []struct {
- statusCode int
- contentEncoding string
- bodyLen int
- }{
- // Body must be empty.
- {http.StatusNoContent, "", 0},
- {http.StatusNotModified, "", 0},
- // Body is going to get gzip'd no matter what.
- {http.StatusOK, "", 0},
- }
-
- for num, test := range tests {
- handler := GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(test.statusCode)
- }))
-
- rec := httptest.NewRecorder()
- // TODO: in Go1.7 httptest.NewRequest was introduced this should be used
- // once 1.6 is not longer supported.
- req := &http.Request{
- Method: "GET",
- URL: &url.URL{Path: "/"},
- Proto: "HTTP/1.1",
- ProtoMinor: 1,
- RemoteAddr: "192.0.2.1:1234",
- Header: make(http.Header),
- }
- req.Header.Set("Accept-Encoding", "gzip")
- handler.ServeHTTP(rec, req)
-
- body, err := ioutil.ReadAll(rec.Body)
- if err != nil {
- t.Fatalf("Unexpected error reading response body: %v", err)
- }
-
- header := rec.Header()
- assert.Equal(t, test.contentEncoding, header.Get("Content-Encoding"), fmt.Sprintf("for test iteration %d", num))
- assert.Equal(t, "Accept-Encoding", header.Get("Vary"), fmt.Sprintf("for test iteration %d", num))
- assert.Equal(t, test.bodyLen, len(body), fmt.Sprintf("for test iteration %d", num))
- }
-}
-
-func TestGzipHandlerContentLength(t *testing.T) {
- b := []byte(testBody)
- handler := GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Length", strconv.Itoa(len(b)))
- w.Write(b)
- }))
- // httptest.NewRecorder doesn't give you access to the Content-Length
- // header so instead, we create a server on a random port and make
- // a request to that instead
- ln, err := net.Listen("tcp", "127.0.0.1:")
- if err != nil {
- t.Fatalf("failed creating listen socket: %v", err)
- }
- defer ln.Close()
- srv := &http.Server{
- Handler: handler,
- }
- go srv.Serve(ln)
-
- req := &http.Request{
- Method: "GET",
- URL: &url.URL{Path: "/", Scheme: "http", Host: ln.Addr().String()},
- Header: make(http.Header),
- Close: true,
- }
- req.Header.Set("Accept-Encoding", "gzip")
- res, err := http.DefaultClient.Do(req)
- if err != nil {
- t.Fatalf("Unexpected error making http request: %v", err)
- }
- defer res.Body.Close()
-
- body, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatalf("Unexpected error reading response body: %v", err)
- }
-
- l, err := strconv.Atoi(res.Header.Get("Content-Length"))
- if err != nil {
- t.Fatalf("Unexpected error parsing Content-Length: %v", err)
- }
- assert.Len(t, body, l)
- assert.Equal(t, "gzip", res.Header.Get("Content-Encoding"))
- assert.NotEqual(t, b, body)
-}
-
-func TestGzipHandlerMinSizeMustBePositive(t *testing.T) {
- _, err := NewGzipLevelAndMinSize(gzip.DefaultCompression, -1)
- assert.Error(t, err)
-}
-
-func TestGzipHandlerMinSize(t *testing.T) {
- responseLength := 0
- b := []byte{'x'}
-
- wrapper, _ := NewGzipLevelAndMinSize(gzip.DefaultCompression, 128)
- handler := wrapper(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- // Write responses one byte at a time to ensure that the flush
- // mechanism, if used, is working properly.
- for i := 0; i < responseLength; i++ {
- n, err := w.Write(b)
- assert.Equal(t, 1, n)
- assert.Nil(t, err)
- }
- },
- ))
-
- r, _ := http.NewRequest("GET", "/whatever", &bytes.Buffer{})
- r.Header.Add("Accept-Encoding", "gzip")
-
- // Short response is not compressed
- responseLength = 127
- w := httptest.NewRecorder()
- handler.ServeHTTP(w, r)
- if w.Result().Header.Get(contentEncoding) == "gzip" {
- t.Error("Expected uncompressed response, got compressed")
- }
-
- // Long response is not compressed
- responseLength = 128
- w = httptest.NewRecorder()
- handler.ServeHTTP(w, r)
- if w.Result().Header.Get(contentEncoding) != "gzip" {
- t.Error("Expected compressed response, got uncompressed")
- }
-}
-
-func TestGzipDoubleClose(t *testing.T) {
- // reset the pool for the default compression so we can make sure duplicates
- // aren't added back by double close
- addLevelPool(gzip.DefaultCompression)
-
- handler := GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- // call close here and it'll get called again interally by
- // NewGzipLevelHandler's handler defer
- w.Write([]byte("test"))
- w.(io.Closer).Close()
- }))
-
- r := httptest.NewRequest("GET", "/", nil)
- r.Header.Set("Accept-Encoding", "gzip")
- w := httptest.NewRecorder()
- handler.ServeHTTP(w, r)
-
- // the second close shouldn't have added the same writer
- // so we pull out 2 writers from the pool and make sure they're different
- w1 := gzipWriterPools[poolIndex(gzip.DefaultCompression)].Get()
- w2 := gzipWriterPools[poolIndex(gzip.DefaultCompression)].Get()
- // assert.NotEqual looks at the value and not the address, so we use regular ==
- assert.False(t, w1 == w2)
-}
-
-func TestStatusCodes(t *testing.T) {
- handler := GzipHandler(http.NotFoundHandler())
- r := httptest.NewRequest("GET", "/", nil)
- r.Header.Set("Accept-Encoding", "gzip")
- w := httptest.NewRecorder()
- handler.ServeHTTP(w, r)
-
- result := w.Result()
- if result.StatusCode != 404 {
- t.Errorf("StatusCode should have been 404 but was %d", result.StatusCode)
- }
-}
-
-func TestFlushBeforeWrite(t *testing.T) {
- b := []byte(testBody)
- handler := GzipHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
- rw.WriteHeader(http.StatusNotFound)
- rw.(http.Flusher).Flush()
- rw.Write(b)
- }))
- r := httptest.NewRequest(http.MethodGet, "/", nil)
- r.Header.Set("Accept-Encoding", "gzip")
- w := httptest.NewRecorder()
- handler.ServeHTTP(w, r)
-
- res := w.Result()
- assert.Equal(t, http.StatusNotFound, res.StatusCode)
- assert.Equal(t, "gzip", res.Header.Get("Content-Encoding"))
- assert.NotEqual(t, b, w.Body.Bytes())
-}
-
-func TestImplementCloseNotifier(t *testing.T) {
- request := httptest.NewRequest(http.MethodGet, "/", nil)
- request.Header.Set(acceptEncoding, "gzip")
- GzipHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request){
- _, ok := rw.(http.CloseNotifier)
- assert.True(t, ok, "response writer must implement http.CloseNotifier")
- })).ServeHTTP(&mockRWCloseNotify{}, request)
-}
-
-func TestImplementFlusherAndCloseNotifier(t *testing.T) {
- request := httptest.NewRequest(http.MethodGet, "/", nil)
- request.Header.Set(acceptEncoding, "gzip")
- GzipHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request){
- _, okCloseNotifier := rw.(http.CloseNotifier)
- assert.True(t, okCloseNotifier, "response writer must implement http.CloseNotifier")
- _, okFlusher := rw.(http.Flusher)
- assert.True(t, okFlusher, "response writer must implement http.Flusher")
- })).ServeHTTP(&mockRWCloseNotify{}, request)
-}
-
-func TestNotImplementCloseNotifier(t *testing.T) {
- request := httptest.NewRequest(http.MethodGet, "/", nil)
- request.Header.Set(acceptEncoding, "gzip")
- GzipHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request){
- _, ok := rw.(http.CloseNotifier)
- assert.False(t, ok, "response writer must not implement http.CloseNotifier")
- })).ServeHTTP(httptest.NewRecorder(), request)
-}
-
-
-type mockRWCloseNotify struct{}
-
-func (m *mockRWCloseNotify) CloseNotify() <-chan bool {
- panic("implement me")
-}
-
-func (m *mockRWCloseNotify) Header() http.Header {
- return http.Header{}
-}
-
-func (m *mockRWCloseNotify) Write([]byte) (int, error) {
- panic("implement me")
-}
-
-func (m *mockRWCloseNotify) WriteHeader(int) {
- panic("implement me")
-}
-
-
-func TestIgnoreSubsequentWriteHeader(t *testing.T) {
- handler := GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(500)
- w.WriteHeader(404)
- }))
- r := httptest.NewRequest("GET", "/", nil)
- r.Header.Set("Accept-Encoding", "gzip")
- w := httptest.NewRecorder()
- handler.ServeHTTP(w, r)
-
- result := w.Result()
- if result.StatusCode != 500 {
- t.Errorf("StatusCode should have been 500 but was %d", result.StatusCode)
- }
-}
-
-func TestDontWriteWhenNotWrittenTo(t *testing.T) {
- // When using gzip as middleware without ANY writes in the handler,
- // ensure the gzip middleware doesn't touch the actual ResponseWriter
- // either.
-
- handler0 := GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- }))
-
- handler1 := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- handler0.ServeHTTP(w, r)
- w.WriteHeader(404) // this only works if gzip didn't do a WriteHeader(200)
- })
-
- r := httptest.NewRequest("GET", "/", nil)
- r.Header.Set("Accept-Encoding", "gzip")
- w := httptest.NewRecorder()
- handler1.ServeHTTP(w, r)
-
- result := w.Result()
- if result.StatusCode != 404 {
- t.Errorf("StatusCode should have been 404 but was %d", result.StatusCode)
- }
-}
-
-var contentTypeTests = []struct {
- name string
- contentType string
- acceptedContentTypes []string
- expectedGzip bool
-}{
- {
- name: "Always gzip when content types are empty",
- contentType: "",
- acceptedContentTypes: []string{},
- expectedGzip: true,
- },
- {
- name: "Exact content-type match",
- contentType: "application/json",
- acceptedContentTypes: []string{"application/json"},
- expectedGzip: true,
- },
- {
- name: "Case insensitive content-type matching",
- contentType: "Application/Json",
- acceptedContentTypes: []string{"application/json"},
- expectedGzip: true,
- },
- {
- name: "Non-matching content-type",
- contentType: "text/xml",
- acceptedContentTypes: []string{"application/json"},
- expectedGzip: false,
- },
-}
-
-func TestContentTypes(t *testing.T) {
- for _, tt := range contentTypeTests {
- handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- w.Header().Set("Content-Type", tt.contentType)
- io.WriteString(w, testBody)
- })
-
- wrapper, err := GzipHandlerWithOpts(ContentTypes(tt.acceptedContentTypes))
- if !assert.Nil(t, err, "NewGzipHandlerWithOpts returned error", tt.name) {
- continue
- }
-
- req, _ := http.NewRequest("GET", "/whatever", nil)
- req.Header.Set("Accept-Encoding", "gzip")
- resp := httptest.NewRecorder()
- wrapper(handler).ServeHTTP(resp, req)
- res := resp.Result()
-
- assert.Equal(t, 200, res.StatusCode)
- if tt.expectedGzip {
- assert.Equal(t, "gzip", res.Header.Get("Content-Encoding"), tt.name)
- } else {
- assert.NotEqual(t, "gzip", res.Header.Get("Content-Encoding"), tt.name)
- }
- }
-}
-
-// --------------------------------------------------------------------
-
-func BenchmarkGzipHandler_S2k(b *testing.B) { benchmark(b, false, 2048) }
-func BenchmarkGzipHandler_S20k(b *testing.B) { benchmark(b, false, 20480) }
-func BenchmarkGzipHandler_S100k(b *testing.B) { benchmark(b, false, 102400) }
-func BenchmarkGzipHandler_P2k(b *testing.B) { benchmark(b, true, 2048) }
-func BenchmarkGzipHandler_P20k(b *testing.B) { benchmark(b, true, 20480) }
-func BenchmarkGzipHandler_P100k(b *testing.B) { benchmark(b, true, 102400) }
-
-// --------------------------------------------------------------------
-
-func gzipStrLevel(s string, lvl int) []byte {
- var b bytes.Buffer
- w, _ := gzip.NewWriterLevel(&b, lvl)
- io.WriteString(w, s)
- w.Close()
- return b.Bytes()
-}
-
-func benchmark(b *testing.B, parallel bool, size int) {
- bin, err := ioutil.ReadFile("testdata/benchmark.json")
- if err != nil {
- b.Fatal(err)
- }
-
- req, _ := http.NewRequest("GET", "/whatever", nil)
- req.Header.Set("Accept-Encoding", "gzip")
- handler := newTestHandler(string(bin[:size]))
-
- if parallel {
- b.ResetTimer()
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- runBenchmark(b, req, handler)
- }
- })
- } else {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- runBenchmark(b, req, handler)
- }
- }
-}
-
-func runBenchmark(b *testing.B, req *http.Request, handler http.Handler) {
- res := httptest.NewRecorder()
- handler.ServeHTTP(res, req)
- if code := res.Code; code != 200 {
- b.Fatalf("Expected 200 but got %d", code)
- } else if blen := res.Body.Len(); blen < 500 {
- b.Fatalf("Expected complete response body, but got %d bytes", blen)
- }
-}
-
-func newTestHandler(body string) http.Handler {
- return GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- switch r.URL.Path {
- case "/gzipped":
- w.Header().Set("Content-Encoding", "gzip")
- io.WriteString(w, body)
- default:
- io.WriteString(w, body)
- }
- }))
-}
diff --git a/vendor/github.com/NYTimes/gziphandler/testdata/benchmark.json b/vendor/github.com/NYTimes/gziphandler/testdata/benchmark.json
deleted file mode 100644
index d9180d6ac..000000000
--- a/vendor/github.com/NYTimes/gziphandler/testdata/benchmark.json
+++ /dev/null
@@ -1,5456 +0,0 @@
-[
- {
- "_id": "55d2fc86da7c3f96f90aa005",
- "age": 20,
- "name": "Luann Grant",
- "gender": "female",
- "company": "ZOGAK",
- "email": "luanngrant@zogak.com",
- "phone": "+1 (915) 479-2908"
- },
- {
- "_id": "55d2fc8653953bc9a0958a92",
- "age": 34,
- "name": "Sanders Gonzalez",
- "gender": "male",
- "company": "PIVITOL",
- "email": "sandersgonzalez@pivitol.com",
- "phone": "+1 (914) 563-2007"
- },
- {
- "_id": "55d2fc86a38634b0954fe3c0",
- "age": 26,
- "name": "Compton Terry",
- "gender": "male",
- "company": "KOZGENE",
- "email": "comptonterry@kozgene.com",
- "phone": "+1 (812) 558-2536"
- },
- {
- "_id": "55d2fc86edf1be88253e4e2e",
- "age": 29,
- "name": "Erma Armstrong",
- "gender": "female",
- "company": "DYNO",
- "email": "ermaarmstrong@dyno.com",
- "phone": "+1 (811) 556-3980"
- },
- {
- "_id": "55d2fc86bee1bf1f233f8170",
- "age": 20,
- "name": "Carson Garcia",
- "gender": "male",
- "company": "JUNIPOOR",
- "email": "carsongarcia@junipoor.com",
- "phone": "+1 (820) 410-3221"
- },
- {
- "_id": "55d2fc864810db4a3738dea8",
- "age": 38,
- "name": "Henson Townsend",
- "gender": "male",
- "company": "OVIUM",
- "email": "hensontownsend@ovium.com",
- "phone": "+1 (982) 412-3108"
- },
- {
- "_id": "55d2fc86d714d77af8ed3fe4",
- "age": 34,
- "name": "Yesenia Garner",
- "gender": "female",
- "company": "TERRAGO",
- "email": "yeseniagarner@terrago.com",
- "phone": "+1 (878) 561-2314"
- },
- {
- "_id": "55d2fc867651311b2e11925a",
- "age": 31,
- "name": "Rachelle Stanton",
- "gender": "female",
- "company": "UNISURE",
- "email": "rachellestanton@unisure.com",
- "phone": "+1 (961) 504-3072"
- },
- {
- "_id": "55d2fc866415f6c03d5228eb",
- "age": 30,
- "name": "Franklin Rasmussen",
- "gender": "male",
- "company": "CAPSCREEN",
- "email": "franklinrasmussen@capscreen.com",
- "phone": "+1 (886) 525-2217"
- },
- {
- "_id": "55d2fc86e2e0fa5f81fe5279",
- "age": 32,
- "name": "Fischer Humphrey",
- "gender": "male",
- "company": "ATGEN",
- "email": "fischerhumphrey@atgen.com",
- "phone": "+1 (855) 424-3693"
- },
- {
- "_id": "55d2fc862c2a416777837c76",
- "age": 29,
- "name": "Olsen Moran",
- "gender": "male",
- "company": "SULTRAX",
- "email": "olsenmoran@sultrax.com",
- "phone": "+1 (860) 583-3380"
- },
- {
- "_id": "55d2fc868c3c9e44d59ec2a2",
- "age": 29,
- "name": "Mattie Myers",
- "gender": "female",
- "company": "VALPREAL",
- "email": "mattiemyers@valpreal.com",
- "phone": "+1 (834) 587-2707"
- },
- {
- "_id": "55d2fc860a6afc8beebe477d",
- "age": 39,
- "name": "Cleveland Jordan",
- "gender": "male",
- "company": "XLEEN",
- "email": "clevelandjordan@xleen.com",
- "phone": "+1 (848) 449-2037"
- },
- {
- "_id": "55d2fc8605766af1b531b5ea",
- "age": 35,
- "name": "Gordon Rios",
- "gender": "male",
- "company": "BULLZONE",
- "email": "gordonrios@bullzone.com",
- "phone": "+1 (882) 436-2216"
- },
- {
- "_id": "55d2fc86e052bfb7cf9b5a38",
- "age": 33,
- "name": "Todd Burch",
- "gender": "male",
- "company": "MOTOVATE",
- "email": "toddburch@motovate.com",
- "phone": "+1 (911) 470-2129"
- },
- {
- "_id": "55d2fc86212924928b4112d6",
- "age": 31,
- "name": "Autumn Strong",
- "gender": "female",
- "company": "NURPLEX",
- "email": "autumnstrong@nurplex.com",
- "phone": "+1 (827) 483-2571"
- },
- {
- "_id": "55d2fc86286c9bc87359e326",
- "age": 27,
- "name": "Rochelle Fitzgerald",
- "gender": "female",
- "company": "RAMEON",
- "email": "rochellefitzgerald@rameon.com",
- "phone": "+1 (820) 402-3411"
- },
- {
- "_id": "55d2fc86511439244d21c569",
- "age": 24,
- "name": "Perry Hopkins",
- "gender": "male",
- "company": "KRAGGLE",
- "email": "perryhopkins@kraggle.com",
- "phone": "+1 (826) 469-3928"
- },
- {
- "_id": "55d2fc868b8652b54c66051c",
- "age": 37,
- "name": "Guzman Williamson",
- "gender": "male",
- "company": "OCTOCORE",
- "email": "guzmanwilliamson@octocore.com",
- "phone": "+1 (826) 529-3380"
- },
- {
- "_id": "55d2fc86f16a5a4c310483df",
- "age": 28,
- "name": "Sheri Thompson",
- "gender": "female",
- "company": "AUTOGRATE",
- "email": "sherithompson@autograte.com",
- "phone": "+1 (942) 463-2727"
- },
- {
- "_id": "55d2fc86675d3040fc35daa8",
- "age": 24,
- "name": "Walton Macdonald",
- "gender": "male",
- "company": "ZIZZLE",
- "email": "waltonmacdonald@zizzle.com",
- "phone": "+1 (990) 510-2656"
- },
- {
- "_id": "55d2fc864e90e236f9e5a174",
- "age": 39,
- "name": "Gwendolyn Ross",
- "gender": "female",
- "company": "XIIX",
- "email": "gwendolynross@xiix.com",
- "phone": "+1 (869) 565-2774"
- },
- {
- "_id": "55d2fc866f306c575a36cb97",
- "age": 23,
- "name": "Sexton Herring",
- "gender": "male",
- "company": "MEDIOT",
- "email": "sextonherring@mediot.com",
- "phone": "+1 (935) 510-2049"
- },
- {
- "_id": "55d2fc867526db78550711a3",
- "age": 26,
- "name": "Twila Vang",
- "gender": "female",
- "company": "ARCTIQ",
- "email": "twilavang@arctiq.com",
- "phone": "+1 (979) 429-2135"
- },
- {
- "_id": "55d2fc86fe5e24c1b4b0dc96",
- "age": 26,
- "name": "Marjorie Snider",
- "gender": "female",
- "company": "QUARX",
- "email": "marjoriesnider@quarx.com",
- "phone": "+1 (913) 469-2916"
- },
- {
- "_id": "55d2fc861e85e0104fa7d33e",
- "age": 36,
- "name": "Malone Diaz",
- "gender": "male",
- "company": "COMVEYOR",
- "email": "malonediaz@comveyor.com",
- "phone": "+1 (882) 541-3306"
- },
- {
- "_id": "55d2fc86bc04a4fa0a338403",
- "age": 39,
- "name": "Amelia Sanford",
- "gender": "female",
- "company": "IPLAX",
- "email": "ameliasanford@iplax.com",
- "phone": "+1 (872) 589-3509"
- },
- {
- "_id": "55d2fc86f7854f672e80c1dd",
- "age": 27,
- "name": "Kristie Fernandez",
- "gender": "female",
- "company": "RONBERT",
- "email": "kristiefernandez@ronbert.com",
- "phone": "+1 (983) 419-3564"
- },
- {
- "_id": "55d2fc867faa140f152b7229",
- "age": 23,
- "name": "Bray Wyatt",
- "gender": "male",
- "company": "DEMINIMUM",
- "email": "braywyatt@deminimum.com",
- "phone": "+1 (943) 485-3961"
- },
- {
- "_id": "55d2fc863a42779d68c0dd53",
- "age": 36,
- "name": "Meyer Pickett",
- "gender": "male",
- "company": "GENEKOM",
- "email": "meyerpickett@genekom.com",
- "phone": "+1 (999) 534-3038"
- },
- {
- "_id": "55d2fc86095f5ceb3c57efeb",
- "age": 22,
- "name": "Carlson Ramirez",
- "gender": "male",
- "company": "KANGLE",
- "email": "carlsonramirez@kangle.com",
- "phone": "+1 (972) 590-3152"
- },
- {
- "_id": "55d2fc868036a76e42f30954",
- "age": 24,
- "name": "Roth Murray",
- "gender": "male",
- "company": "DEEPENDS",
- "email": "rothmurray@deepends.com",
- "phone": "+1 (944) 408-2208"
- },
- {
- "_id": "55d2fc8688ac278604ea592b",
- "age": 24,
- "name": "Cecelia Lambert",
- "gender": "female",
- "company": "SLOFAST",
- "email": "cecelialambert@slofast.com",
- "phone": "+1 (907) 485-2284"
- },
- {
- "_id": "55d2fc86b05fc3906ce838a2",
- "age": 31,
- "name": "Leah Ferguson",
- "gender": "female",
- "company": "NEBULEAN",
- "email": "leahferguson@nebulean.com",
- "phone": "+1 (883) 574-2101"
- },
- {
- "_id": "55d2fc86d21f9d73f11076b9",
- "age": 28,
- "name": "Therese Mueller",
- "gender": "female",
- "company": "STEELFAB",
- "email": "theresemueller@steelfab.com",
- "phone": "+1 (920) 485-2265"
- },
- {
- "_id": "55d2fc866254f87d0389dc98",
- "age": 32,
- "name": "Wanda Byrd",
- "gender": "female",
- "company": "HOTCAKES",
- "email": "wandabyrd@hotcakes.com",
- "phone": "+1 (893) 579-3658"
- },
- {
- "_id": "55d2fc868cf04450063aba0e",
- "age": 25,
- "name": "Felecia Mccall",
- "gender": "female",
- "company": "GINK",
- "email": "feleciamccall@gink.com",
- "phone": "+1 (848) 486-3047"
- },
- {
- "_id": "55d2fc86e0ee0341850d35ab",
- "age": 37,
- "name": "Goldie Stafford",
- "gender": "female",
- "company": "FIREWAX",
- "email": "goldiestafford@firewax.com",
- "phone": "+1 (831) 507-3578"
- },
- {
- "_id": "55d2fc868acfa20489a61720",
- "age": 20,
- "name": "Amy Patterson",
- "gender": "female",
- "company": "KNEEDLES",
- "email": "amypatterson@kneedles.com",
- "phone": "+1 (950) 478-3558"
- },
- {
- "_id": "55d2fc8680c104681b074336",
- "age": 29,
- "name": "Robles Alford",
- "gender": "male",
- "company": "TALENDULA",
- "email": "roblesalford@talendula.com",
- "phone": "+1 (813) 424-3650"
- },
- {
- "_id": "55d2fc86faeb57024907ea70",
- "age": 28,
- "name": "Adkins Hampton",
- "gender": "male",
- "company": "SYNKGEN",
- "email": "adkinshampton@synkgen.com",
- "phone": "+1 (974) 522-2517"
- },
- {
- "_id": "55d2fc866ba878e18ee65c0f",
- "age": 32,
- "name": "Bernadine Trevino",
- "gender": "female",
- "company": "EVENTEX",
- "email": "bernadinetrevino@eventex.com",
- "phone": "+1 (914) 577-2655"
- },
- {
- "_id": "55d2fc86524364ec8cb2d0c7",
- "age": 38,
- "name": "Robin Le",
- "gender": "female",
- "company": "GALLAXIA",
- "email": "robinle@gallaxia.com",
- "phone": "+1 (821) 472-2416"
- },
- {
- "_id": "55d2fc86c53dc98dacabc399",
- "age": 23,
- "name": "Leanna Hicks",
- "gender": "female",
- "company": "ZEROLOGY",
- "email": "leannahicks@zerology.com",
- "phone": "+1 (946) 531-3368"
- },
- {
- "_id": "55d2fc86e293b8cfb2d1a5bd",
- "age": 31,
- "name": "Herman Bridges",
- "gender": "male",
- "company": "DADABASE",
- "email": "hermanbridges@dadabase.com",
- "phone": "+1 (836) 408-3169"
- },
- {
- "_id": "55d2fc865dfc0cc61ec50b41",
- "age": 30,
- "name": "Olive Terrell",
- "gender": "female",
- "company": "ACCRUEX",
- "email": "oliveterrell@accruex.com",
- "phone": "+1 (837) 573-2059"
- },
- {
- "_id": "55d2fc8669dc78cdeb374ff5",
- "age": 26,
- "name": "Miranda Banks",
- "gender": "female",
- "company": "GEOFARM",
- "email": "mirandabanks@geofarm.com",
- "phone": "+1 (984) 574-2877"
- },
- {
- "_id": "55d2fc86f471f565df37a756",
- "age": 31,
- "name": "Noelle Wolf",
- "gender": "female",
- "company": "ENDIPINE",
- "email": "noellewolf@endipine.com",
- "phone": "+1 (880) 548-2427"
- },
- {
- "_id": "55d2fc8603e133136e5ca325",
- "age": 38,
- "name": "Amber Klein",
- "gender": "female",
- "company": "ISOPLEX",
- "email": "amberklein@isoplex.com",
- "phone": "+1 (853) 548-3856"
- },
- {
- "_id": "55d2fc86962b00cfd86e9d8d",
- "age": 32,
- "name": "Jodie Mcclain",
- "gender": "female",
- "company": "BESTO",
- "email": "jodiemcclain@besto.com",
- "phone": "+1 (857) 417-2691"
- },
- {
- "_id": "55d2fc8622eaf8052986a5bb",
- "age": 35,
- "name": "Margo Melendez",
- "gender": "female",
- "company": "KLUGGER",
- "email": "margomelendez@klugger.com",
- "phone": "+1 (823) 445-3570"
- },
- {
- "_id": "55d2fc861e37cd298741e801",
- "age": 37,
- "name": "Castaneda Dudley",
- "gender": "male",
- "company": "URBANSHEE",
- "email": "castanedadudley@urbanshee.com",
- "phone": "+1 (865) 449-2445"
- },
- {
- "_id": "55d2fc86e4c07ff933f7b531",
- "age": 40,
- "name": "Sherman Combs",
- "gender": "male",
- "company": "GRACKER",
- "email": "shermancombs@gracker.com",
- "phone": "+1 (817) 472-2316"
- },
- {
- "_id": "55d2fc86c4613e0a622727e6",
- "age": 31,
- "name": "Louise Nichols",
- "gender": "female",
- "company": "SPORTAN",
- "email": "louisenichols@sportan.com",
- "phone": "+1 (823) 543-2230"
- },
- {
- "_id": "55d2fc86d40dd218587cc632",
- "age": 29,
- "name": "Daniels Jacobs",
- "gender": "male",
- "company": "CALCULA",
- "email": "danielsjacobs@calcula.com",
- "phone": "+1 (979) 448-2244"
- },
- {
- "_id": "55d2fc86b44f3ec927f3b2e1",
- "age": 22,
- "name": "Cristina Crosby",
- "gender": "female",
- "company": "PHUEL",
- "email": "cristinacrosby@phuel.com",
- "phone": "+1 (816) 504-3557"
- },
- {
- "_id": "55d2fc86ba635f5436325487",
- "age": 23,
- "name": "Tisha Sawyer",
- "gender": "female",
- "company": "IMAGEFLOW",
- "email": "tishasawyer@imageflow.com",
- "phone": "+1 (894) 551-2933"
- },
- {
- "_id": "55d2fc8640e8af981a47216a",
- "age": 32,
- "name": "Janice Graham",
- "gender": "female",
- "company": "PYRAMIS",
- "email": "janicegraham@pyramis.com",
- "phone": "+1 (986) 409-2529"
- },
- {
- "_id": "55d2fc86cdbe80c5cb184731",
- "age": 22,
- "name": "Holman Joyce",
- "gender": "male",
- "company": "VERTON",
- "email": "holmanjoyce@verton.com",
- "phone": "+1 (955) 445-2054"
- },
- {
- "_id": "55d2fc860f70e0d0890e8e47",
- "age": 21,
- "name": "Webb Sears",
- "gender": "male",
- "company": "ENQUILITY",
- "email": "webbsears@enquility.com",
- "phone": "+1 (961) 406-3600"
- },
- {
- "_id": "55d2fc86150c8385661fde6f",
- "age": 29,
- "name": "Bush Farrell",
- "gender": "male",
- "company": "ENDICIL",
- "email": "bushfarrell@endicil.com",
- "phone": "+1 (894) 550-2963"
- },
- {
- "_id": "55d2fc862e2f1ca9662b03e3",
- "age": 36,
- "name": "Gay Walters",
- "gender": "male",
- "company": "ZENSURE",
- "email": "gaywalters@zensure.com",
- "phone": "+1 (859) 467-3816"
- },
- {
- "_id": "55d2fc86da1249ca6d3a068f",
- "age": 33,
- "name": "Marquez Palmer",
- "gender": "male",
- "company": "TURNLING",
- "email": "marquezpalmer@turnling.com",
- "phone": "+1 (878) 522-3859"
- },
- {
- "_id": "55d2fc86a61a66a69db5c8a9",
- "age": 29,
- "name": "Huber Parrish",
- "gender": "male",
- "company": "DELPHIDE",
- "email": "huberparrish@delphide.com",
- "phone": "+1 (947) 406-3267"
- },
- {
- "_id": "55d2fc86fff10fda8f106c2a",
- "age": 22,
- "name": "Foreman Cohen",
- "gender": "male",
- "company": "TROPOLIS",
- "email": "foremancohen@tropolis.com",
- "phone": "+1 (802) 409-2459"
- },
- {
- "_id": "55d2fc8632b185024494802d",
- "age": 31,
- "name": "Kathryn Peterson",
- "gender": "female",
- "company": "PROSURE",
- "email": "kathrynpeterson@prosure.com",
- "phone": "+1 (811) 531-3085"
- },
- {
- "_id": "55d2fc86f8e11410bb5b8e88",
- "age": 34,
- "name": "Aisha Duke",
- "gender": "female",
- "company": "APPLICA",
- "email": "aishaduke@applica.com",
- "phone": "+1 (977) 438-2754"
- },
- {
- "_id": "55d2fc86190a0097728af887",
- "age": 37,
- "name": "Maynard Henderson",
- "gender": "male",
- "company": "ILLUMITY",
- "email": "maynardhenderson@illumity.com",
- "phone": "+1 (832) 472-2261"
- },
- {
- "_id": "55d2fc86d298e6e1cf9332df",
- "age": 33,
- "name": "Villarreal Santiago",
- "gender": "male",
- "company": "QUAILCOM",
- "email": "villarrealsantiago@quailcom.com",
- "phone": "+1 (981) 422-2572"
- },
- {
- "_id": "55d2fc86b7eb3b9ed01fc186",
- "age": 30,
- "name": "Diaz Allison",
- "gender": "male",
- "company": "ISOSTREAM",
- "email": "diazallison@isostream.com",
- "phone": "+1 (883) 530-2186"
- },
- {
- "_id": "55d2fc86da92ac006d69c236",
- "age": 20,
- "name": "Kirkland Mccullough",
- "gender": "male",
- "company": "ADORNICA",
- "email": "kirklandmccullough@adornica.com",
- "phone": "+1 (950) 556-3562"
- },
- {
- "_id": "55d2fc86195f59929397f2fc",
- "age": 32,
- "name": "Dolores Howard",
- "gender": "female",
- "company": "ZINCA",
- "email": "doloreshoward@zinca.com",
- "phone": "+1 (904) 450-2101"
- },
- {
- "_id": "55d2fc860c9f707c22eaca7c",
- "age": 26,
- "name": "Mills Gamble",
- "gender": "male",
- "company": "BLEEKO",
- "email": "millsgamble@bleeko.com",
- "phone": "+1 (942) 402-2630"
- },
- {
- "_id": "55d2fc86b539183079fcab65",
- "age": 35,
- "name": "Walls Dotson",
- "gender": "male",
- "company": "GRUPOLI",
- "email": "wallsdotson@grupoli.com",
- "phone": "+1 (979) 477-3065"
- },
- {
- "_id": "55d2fc866377b14a737261c3",
- "age": 29,
- "name": "Hannah Coleman",
- "gender": "female",
- "company": "COMCUR",
- "email": "hannahcoleman@comcur.com",
- "phone": "+1 (944) 595-2415"
- },
- {
- "_id": "55d2fc867b77f0e8d5f08276",
- "age": 25,
- "name": "Kinney Oneill",
- "gender": "male",
- "company": "ELPRO",
- "email": "kinneyoneill@elpro.com",
- "phone": "+1 (851) 570-2363"
- },
- {
- "_id": "55d2fc868745f5f71578624c",
- "age": 32,
- "name": "Bennett Henson",
- "gender": "male",
- "company": "ZISIS",
- "email": "bennetthenson@zisis.com",
- "phone": "+1 (958) 584-2257"
- },
- {
- "_id": "55d2fc8604d1e7576b1a83fb",
- "age": 32,
- "name": "Ross Chavez",
- "gender": "male",
- "company": "DUOFLEX",
- "email": "rosschavez@duoflex.com",
- "phone": "+1 (890) 556-2052"
- },
- {
- "_id": "55d2fc86bd556093136802dd",
- "age": 26,
- "name": "Raymond Rutledge",
- "gender": "male",
- "company": "BUNGA",
- "email": "raymondrutledge@bunga.com",
- "phone": "+1 (994) 504-2118"
- },
- {
- "_id": "55d2fc86a122c7d89560c130",
- "age": 31,
- "name": "Rosemary Larsen",
- "gender": "female",
- "company": "EXOPLODE",
- "email": "rosemarylarsen@exoplode.com",
- "phone": "+1 (864) 558-3569"
- },
- {
- "_id": "55d2fc86dd3fe9ea62fdbea1",
- "age": 27,
- "name": "Tara Roth",
- "gender": "female",
- "company": "GAPTEC",
- "email": "tararoth@gaptec.com",
- "phone": "+1 (893) 531-2962"
- },
- {
- "_id": "55d2fc866f372ca411cd425d",
- "age": 30,
- "name": "Ronda Sheppard",
- "gender": "female",
- "company": "GREEKER",
- "email": "rondasheppard@greeker.com",
- "phone": "+1 (963) 569-2851"
- },
- {
- "_id": "55d2fc860a0dc369ac8bed9f",
- "age": 37,
- "name": "Nita Washington",
- "gender": "female",
- "company": "AQUASURE",
- "email": "nitawashington@aquasure.com",
- "phone": "+1 (858) 579-3734"
- },
- {
- "_id": "55d2fc863d59ecccd8b482b7",
- "age": 34,
- "name": "Shannon Sanchez",
- "gender": "male",
- "company": "QUORDATE",
- "email": "shannonsanchez@quordate.com",
- "phone": "+1 (880) 542-2259"
- },
- {
- "_id": "55d2fc861c73e366d8983f98",
- "age": 23,
- "name": "Amalia George",
- "gender": "female",
- "company": "QUINEX",
- "email": "amaliageorge@quinex.com",
- "phone": "+1 (918) 412-3805"
- },
- {
- "_id": "55d2fc866910c4329a167746",
- "age": 30,
- "name": "West Parsons",
- "gender": "male",
- "company": "RODEMCO",
- "email": "westparsons@rodemco.com",
- "phone": "+1 (869) 480-3404"
- },
- {
- "_id": "55d2fc861d97ff31a8eb7f06",
- "age": 30,
- "name": "Day Mercado",
- "gender": "male",
- "company": "ENJOLA",
- "email": "daymercado@enjola.com",
- "phone": "+1 (861) 546-2601"
- },
- {
- "_id": "55d2fc861e100baa15994161",
- "age": 20,
- "name": "Hubbard Randolph",
- "gender": "male",
- "company": "INSOURCE",
- "email": "hubbardrandolph@insource.com",
- "phone": "+1 (939) 422-2753"
- },
- {
- "_id": "55d2fc86dc33a0101292ea57",
- "age": 32,
- "name": "Ward Patrick",
- "gender": "male",
- "company": "ZUVY",
- "email": "wardpatrick@zuvy.com",
- "phone": "+1 (852) 461-3079"
- },
- {
- "_id": "55d2fc863074ff55ec22d7ac",
- "age": 26,
- "name": "Barker Small",
- "gender": "male",
- "company": "ZIDANT",
- "email": "barkersmall@zidant.com",
- "phone": "+1 (901) 514-3653"
- },
- {
- "_id": "55d2fc86008067de21a65447",
- "age": 26,
- "name": "Margret Porter",
- "gender": "female",
- "company": "DYMI",
- "email": "margretporter@dymi.com",
- "phone": "+1 (820) 404-2199"
- },
- {
- "_id": "55d2fc8694b7f8670d10781e",
- "age": 40,
- "name": "Roslyn Richmond",
- "gender": "female",
- "company": "SONGBIRD",
- "email": "roslynrichmond@songbird.com",
- "phone": "+1 (913) 406-3720"
- },
- {
- "_id": "55d2fc86ffff28aef88e1d69",
- "age": 29,
- "name": "Jimenez Yates",
- "gender": "male",
- "company": "IDETICA",
- "email": "jimenezyates@idetica.com",
- "phone": "+1 (803) 421-2358"
- },
- {
- "_id": "55d2fc8604bfeab3a975b2d8",
- "age": 21,
- "name": "Mcneil Jensen",
- "gender": "male",
- "company": "EXOBLUE",
- "email": "mcneiljensen@exoblue.com",
- "phone": "+1 (856) 581-3756"
- },
- {
- "_id": "55d2fc86bee368958f567c45",
- "age": 40,
- "name": "Millicent Trujillo",
- "gender": "female",
- "company": "ARTWORLDS",
- "email": "millicenttrujillo@artworlds.com",
- "phone": "+1 (926) 456-2237"
- },
- {
- "_id": "55d2fc86de2a5a6babe51d48",
- "age": 26,
- "name": "Dorothea Duffy",
- "gender": "female",
- "company": "EBIDCO",
- "email": "dorotheaduffy@ebidco.com",
- "phone": "+1 (873) 458-2694"
- },
- {
- "_id": "55d2fc86f8793320727d2020",
- "age": 34,
- "name": "Gloria Ward",
- "gender": "female",
- "company": "EXOVENT",
- "email": "gloriaward@exovent.com",
- "phone": "+1 (948) 552-3275"
- },
- {
- "_id": "55d2fc86967e5599adde68e8",
- "age": 33,
- "name": "Denise Hogan",
- "gender": "female",
- "company": "GLEAMINK",
- "email": "denisehogan@gleamink.com",
- "phone": "+1 (902) 544-2943"
- },
- {
- "_id": "55d2fc862833baf2918f7860",
- "age": 23,
- "name": "Clemons Berger",
- "gender": "male",
- "company": "ARTIQ",
- "email": "clemonsberger@artiq.com",
- "phone": "+1 (873) 516-2440"
- },
- {
- "_id": "55d2fc8610af4c20d426854a",
- "age": 40,
- "name": "Colette Scott",
- "gender": "female",
- "company": "INVENTURE",
- "email": "colettescott@inventure.com",
- "phone": "+1 (814) 556-3466"
- },
- {
- "_id": "55d2fc8697af4d0d06a2c4a6",
- "age": 34,
- "name": "Chavez Aguilar",
- "gender": "male",
- "company": "ISBOL",
- "email": "chavezaguilar@isbol.com",
- "phone": "+1 (952) 543-3992"
- },
- {
- "_id": "55d2fc861da12d86036c3e48",
- "age": 29,
- "name": "Arnold Collier",
- "gender": "male",
- "company": "MELBACOR",
- "email": "arnoldcollier@melbacor.com",
- "phone": "+1 (907) 404-2090"
- },
- {
- "_id": "55d2fc86deb921c78b56fec1",
- "age": 24,
- "name": "Nixon Ingram",
- "gender": "male",
- "company": "ELENTRIX",
- "email": "nixoningram@elentrix.com",
- "phone": "+1 (884) 596-3023"
- },
- {
- "_id": "55d2fc86a8b288ba6b8aa48f",
- "age": 28,
- "name": "Hurst Hull",
- "gender": "male",
- "company": "INCUBUS",
- "email": "hursthull@incubus.com",
- "phone": "+1 (970) 445-2279"
- },
- {
- "_id": "55d2fc864dc593d113336b1b",
- "age": 32,
- "name": "Giles Jacobson",
- "gender": "male",
- "company": "MIXERS",
- "email": "gilesjacobson@mixers.com",
- "phone": "+1 (868) 402-3161"
- },
- {
- "_id": "55d2fc86fd0246fcd0c8f864",
- "age": 25,
- "name": "Millie Giles",
- "gender": "female",
- "company": "ZAJ",
- "email": "milliegiles@zaj.com",
- "phone": "+1 (831) 535-3535"
- },
- {
- "_id": "55d2fc86dceeca0deb9f6d67",
- "age": 21,
- "name": "Sargent Morse",
- "gender": "male",
- "company": "ANARCO",
- "email": "sargentmorse@anarco.com",
- "phone": "+1 (994) 536-2563"
- },
- {
- "_id": "55d2fc86abbd1add64df6aa2",
- "age": 26,
- "name": "Reed Camacho",
- "gender": "male",
- "company": "ICOLOGY",
- "email": "reedcamacho@icology.com",
- "phone": "+1 (999) 408-3042"
- },
- {
- "_id": "55d2fc86a2593db6d584f022",
- "age": 21,
- "name": "Bryant Colon",
- "gender": "male",
- "company": "ZANILLA",
- "email": "bryantcolon@zanilla.com",
- "phone": "+1 (964) 570-3418"
- },
- {
- "_id": "55d2fc86f980f74ba093fde6",
- "age": 38,
- "name": "Rosella Pierce",
- "gender": "female",
- "company": "PRIMORDIA",
- "email": "rosellapierce@primordia.com",
- "phone": "+1 (936) 579-3014"
- },
- {
- "_id": "55d2fc86797a0001329071fb",
- "age": 20,
- "name": "Patrice Mckee",
- "gender": "female",
- "company": "GEEKY",
- "email": "patricemckee@geeky.com",
- "phone": "+1 (866) 565-3764"
- },
- {
- "_id": "55d2fc86bcc6181d0b8cae17",
- "age": 29,
- "name": "Wilkinson Levy",
- "gender": "male",
- "company": "FISHLAND",
- "email": "wilkinsonlevy@fishland.com",
- "phone": "+1 (998) 509-3800"
- },
- {
- "_id": "55d2fc86784b1e22004d637d",
- "age": 28,
- "name": "Isabella Snyder",
- "gender": "female",
- "company": "TETRATREX",
- "email": "isabellasnyder@tetratrex.com",
- "phone": "+1 (998) 451-2871"
- },
- {
- "_id": "55d2fc8603abab523ff1f02d",
- "age": 35,
- "name": "Claudine Berg",
- "gender": "female",
- "company": "ZYTREK",
- "email": "claudineberg@zytrek.com",
- "phone": "+1 (836) 563-3376"
- },
- {
- "_id": "55d2fc862796e94846a82a8b",
- "age": 27,
- "name": "Hyde Simon",
- "gender": "male",
- "company": "FUELWORKS",
- "email": "hydesimon@fuelworks.com",
- "phone": "+1 (872) 594-2291"
- },
- {
- "_id": "55d2fc86f2fa84a4f7ca4548",
- "age": 29,
- "name": "Wendy Roberts",
- "gender": "female",
- "company": "OPTICALL",
- "email": "wendyroberts@opticall.com",
- "phone": "+1 (895) 534-3852"
- },
- {
- "_id": "55d2fc8651dbb76674b6d2df",
- "age": 40,
- "name": "Tasha Erickson",
- "gender": "female",
- "company": "PURIA",
- "email": "tashaerickson@puria.com",
- "phone": "+1 (905) 526-2175"
- },
- {
- "_id": "55d2fc86b7f867e76e709d68",
- "age": 32,
- "name": "Marisa Dunlap",
- "gender": "female",
- "company": "GLUKGLUK",
- "email": "marisadunlap@glukgluk.com",
- "phone": "+1 (855) 400-2200"
- },
- {
- "_id": "55d2fc8695b6ccc0707570af",
- "age": 38,
- "name": "Kaitlin Baldwin",
- "gender": "female",
- "company": "EGYPTO",
- "email": "kaitlinbaldwin@egypto.com",
- "phone": "+1 (980) 482-3256"
- },
- {
- "_id": "55d2fc86f36b539d4494395d",
- "age": 38,
- "name": "Abigail Kirkland",
- "gender": "female",
- "company": "INRT",
- "email": "abigailkirkland@inrt.com",
- "phone": "+1 (916) 440-3469"
- },
- {
- "_id": "55d2fc86e401343dbf1de380",
- "age": 34,
- "name": "Marci Maynard",
- "gender": "female",
- "company": "INSURITY",
- "email": "marcimaynard@insurity.com",
- "phone": "+1 (917) 482-3601"
- },
- {
- "_id": "55d2fc86ba3f7fdb738899f4",
- "age": 31,
- "name": "Tanya Michael",
- "gender": "female",
- "company": "ENVIRE",
- "email": "tanyamichael@envire.com",
- "phone": "+1 (826) 436-3177"
- },
- {
- "_id": "55d2fc861cb8a1d3151ae2c1",
- "age": 34,
- "name": "Farrell Irwin",
- "gender": "male",
- "company": "EXTRAGEN",
- "email": "farrellirwin@extragen.com",
- "phone": "+1 (948) 442-3796"
- },
- {
- "_id": "55d2fc86b90f948949af3d8e",
- "age": 27,
- "name": "Dickson Shepherd",
- "gender": "male",
- "company": "COMTOURS",
- "email": "dicksonshepherd@comtours.com",
- "phone": "+1 (871) 458-2972"
- },
- {
- "_id": "55d2fc862065aeaf17581fa6",
- "age": 40,
- "name": "Fowler Adams",
- "gender": "male",
- "company": "NEPTIDE",
- "email": "fowleradams@neptide.com",
- "phone": "+1 (836) 431-3585"
- },
- {
- "_id": "55d2fc866aab8b242a30acfd",
- "age": 22,
- "name": "Durham Frost",
- "gender": "male",
- "company": "SNOWPOKE",
- "email": "durhamfrost@snowpoke.com",
- "phone": "+1 (801) 510-2084"
- },
- {
- "_id": "55d2fc86d3a4aafedc274ffa",
- "age": 27,
- "name": "Delia Barnes",
- "gender": "female",
- "company": "CONFERIA",
- "email": "deliabarnes@conferia.com",
- "phone": "+1 (999) 471-2182"
- },
- {
- "_id": "55d2fc8601ed1a317e289785",
- "age": 27,
- "name": "Gill Tillman",
- "gender": "male",
- "company": "MATRIXITY",
- "email": "gilltillman@matrixity.com",
- "phone": "+1 (880) 419-3960"
- },
- {
- "_id": "55d2fc86098dda4fa3812793",
- "age": 27,
- "name": "Loraine Saunders",
- "gender": "female",
- "company": "DOGTOWN",
- "email": "lorainesaunders@dogtown.com",
- "phone": "+1 (868) 500-3061"
- },
- {
- "_id": "55d2fc865f9615b558837892",
- "age": 34,
- "name": "Lou Mcdonald",
- "gender": "female",
- "company": "COMCUBINE",
- "email": "loumcdonald@comcubine.com",
- "phone": "+1 (857) 568-3427"
- },
- {
- "_id": "55d2fc865a5a752bb88dbcd8",
- "age": 28,
- "name": "Beth Lester",
- "gender": "female",
- "company": "EARTHWAX",
- "email": "bethlester@earthwax.com",
- "phone": "+1 (805) 565-2363"
- },
- {
- "_id": "55d2fc862e7d03a2f76c9e58",
- "age": 37,
- "name": "Karin Mason",
- "gender": "female",
- "company": "GEEKNET",
- "email": "karinmason@geeknet.com",
- "phone": "+1 (923) 438-3684"
- },
- {
- "_id": "55d2fc8617970ba4987ed4b3",
- "age": 39,
- "name": "Jeanine Watson",
- "gender": "female",
- "company": "LINGOAGE",
- "email": "jeaninewatson@lingoage.com",
- "phone": "+1 (919) 444-3722"
- },
- {
- "_id": "55d2fc86445181571721c6c9",
- "age": 20,
- "name": "Soto Wilkins",
- "gender": "male",
- "company": "JUMPSTACK",
- "email": "sotowilkins@jumpstack.com",
- "phone": "+1 (818) 518-3028"
- },
- {
- "_id": "55d2fc86b8b146361e17fa83",
- "age": 20,
- "name": "Mabel Fields",
- "gender": "female",
- "company": "MAGNINA",
- "email": "mabelfields@magnina.com",
- "phone": "+1 (861) 583-2161"
- },
- {
- "_id": "55d2fc8667abfe5721a74176",
- "age": 26,
- "name": "Ruthie Bailey",
- "gender": "female",
- "company": "ROCKLOGIC",
- "email": "ruthiebailey@rocklogic.com",
- "phone": "+1 (872) 402-3619"
- },
- {
- "_id": "55d2fc865cfa092adb20dc0f",
- "age": 22,
- "name": "Vaughan Vincent",
- "gender": "male",
- "company": "ACIUM",
- "email": "vaughanvincent@acium.com",
- "phone": "+1 (919) 548-3948"
- },
- {
- "_id": "55d2fc86fe25d347c15e1749",
- "age": 38,
- "name": "Myrtle Burris",
- "gender": "female",
- "company": "IRACK",
- "email": "myrtleburris@irack.com",
- "phone": "+1 (840) 526-2646"
- },
- {
- "_id": "55d2fc8689cd98b47e44118d",
- "age": 37,
- "name": "Peggy Mercer",
- "gender": "female",
- "company": "ESCENTA",
- "email": "peggymercer@escenta.com",
- "phone": "+1 (817) 574-3310"
- },
- {
- "_id": "55d2fc86ae662f567ae09404",
- "age": 24,
- "name": "Mollie Simmons",
- "gender": "female",
- "company": "STOCKPOST",
- "email": "molliesimmons@stockpost.com",
- "phone": "+1 (854) 461-2851"
- },
- {
- "_id": "55d2fc86f738f2bd6ebebd1c",
- "age": 37,
- "name": "Case Cox",
- "gender": "male",
- "company": "ACCEL",
- "email": "casecox@accel.com",
- "phone": "+1 (853) 473-2780"
- },
- {
- "_id": "55d2fc86c80907be4ff386d5",
- "age": 26,
- "name": "Snyder Mcclure",
- "gender": "male",
- "company": "PLASMOX",
- "email": "snydermcclure@plasmox.com",
- "phone": "+1 (980) 583-3213"
- },
- {
- "_id": "55d2fc86ed956580fa2cff25",
- "age": 31,
- "name": "Kelly Malone",
- "gender": "male",
- "company": "XANIDE",
- "email": "kellymalone@xanide.com",
- "phone": "+1 (871) 436-2431"
- },
- {
- "_id": "55d2fc86fcd2b8d749bd1feb",
- "age": 20,
- "name": "Jackie Carr",
- "gender": "female",
- "company": "VOIPA",
- "email": "jackiecarr@voipa.com",
- "phone": "+1 (807) 431-3436"
- },
- {
- "_id": "55d2fc86d9aac03a007489ef",
- "age": 34,
- "name": "Cochran Walter",
- "gender": "male",
- "company": "NIKUDA",
- "email": "cochranwalter@nikuda.com",
- "phone": "+1 (977) 410-3770"
- },
- {
- "_id": "55d2fc86140fefcd667c533f",
- "age": 22,
- "name": "Ellen Ortiz",
- "gender": "female",
- "company": "NEWCUBE",
- "email": "ellenortiz@newcube.com",
- "phone": "+1 (980) 541-3099"
- },
- {
- "_id": "55d2fc86d374c6a649e5877e",
- "age": 35,
- "name": "Concetta Beard",
- "gender": "female",
- "company": "PLASMOS",
- "email": "concettabeard@plasmos.com",
- "phone": "+1 (839) 539-2423"
- },
- {
- "_id": "55d2fc861ee809861b7c2b38",
- "age": 33,
- "name": "Josephine Alexander",
- "gender": "female",
- "company": "LOVEPAD",
- "email": "josephinealexander@lovepad.com",
- "phone": "+1 (880) 452-2208"
- },
- {
- "_id": "55d2fc8677db4f8446d43041",
- "age": 39,
- "name": "Melisa Dean",
- "gender": "female",
- "company": "GEOFORM",
- "email": "melisadean@geoform.com",
- "phone": "+1 (934) 452-2532"
- },
- {
- "_id": "55d2fc861dc0856e2ec744ab",
- "age": 26,
- "name": "Morgan Galloway",
- "gender": "male",
- "company": "ELEMANTRA",
- "email": "morgangalloway@elemantra.com",
- "phone": "+1 (888) 461-2261"
- },
- {
- "_id": "55d2fc869bc97691cec7d569",
- "age": 26,
- "name": "Curtis Griffith",
- "gender": "male",
- "company": "TINGLES",
- "email": "curtisgriffith@tingles.com",
- "phone": "+1 (881) 517-2174"
- },
- {
- "_id": "55d2fc8624b80b5986e1de83",
- "age": 40,
- "name": "Gentry Mccarthy",
- "gender": "male",
- "company": "GEEKOLA",
- "email": "gentrymccarthy@geekola.com",
- "phone": "+1 (908) 559-3049"
- },
- {
- "_id": "55d2fc869c2a158da79f9a7f",
- "age": 37,
- "name": "Lancaster Justice",
- "gender": "male",
- "company": "NAXDIS",
- "email": "lancasterjustice@naxdis.com",
- "phone": "+1 (980) 456-3515"
- },
- {
- "_id": "55d2fc867c8e30a12fddcb79",
- "age": 28,
- "name": "Jenifer Barr",
- "gender": "female",
- "company": "ZORROMOP",
- "email": "jeniferbarr@zorromop.com",
- "phone": "+1 (901) 440-3979"
- },
- {
- "_id": "55d2fc8696d7c8b59507f10c",
- "age": 35,
- "name": "Benjamin Nolan",
- "gender": "male",
- "company": "DIGITALUS",
- "email": "benjaminnolan@digitalus.com",
- "phone": "+1 (828) 582-3041"
- },
- {
- "_id": "55d2fc86b7e719a5c07b9f9e",
- "age": 27,
- "name": "Beach Valentine",
- "gender": "male",
- "company": "KAGGLE",
- "email": "beachvalentine@kaggle.com",
- "phone": "+1 (961) 563-3631"
- },
- {
- "_id": "55d2fc860bb827b4eab70038",
- "age": 27,
- "name": "Brady Moore",
- "gender": "male",
- "company": "CORPULSE",
- "email": "bradymoore@corpulse.com",
- "phone": "+1 (859) 434-2962"
- },
- {
- "_id": "55d2fc862fc00a2ce6ab7f32",
- "age": 27,
- "name": "Page Ray",
- "gender": "male",
- "company": "BEZAL",
- "email": "pageray@bezal.com",
- "phone": "+1 (845) 492-2182"
- },
- {
- "_id": "55d2fc861b57330b56d5b3f8",
- "age": 40,
- "name": "Lupe Gould",
- "gender": "female",
- "company": "DOGNOSIS",
- "email": "lupegould@dognosis.com",
- "phone": "+1 (955) 579-2141"
- },
- {
- "_id": "55d2fc864a8fabbf89d106cd",
- "age": 23,
- "name": "Melva Abbott",
- "gender": "female",
- "company": "CODACT",
- "email": "melvaabbott@codact.com",
- "phone": "+1 (801) 478-2678"
- },
- {
- "_id": "55d2fc86107ad0ad66c9d3ea",
- "age": 22,
- "name": "Mendez Middleton",
- "gender": "male",
- "company": "CUJO",
- "email": "mendezmiddleton@cujo.com",
- "phone": "+1 (908) 430-2032"
- },
- {
- "_id": "55d2fc86d2f5edd1222e87cc",
- "age": 31,
- "name": "Meredith Ayers",
- "gender": "female",
- "company": "OPTYK",
- "email": "meredithayers@optyk.com",
- "phone": "+1 (875) 472-2514"
- },
- {
- "_id": "55d2fc86551f2a796de0f3ad",
- "age": 21,
- "name": "Burns Serrano",
- "gender": "male",
- "company": "ZOUNDS",
- "email": "burnsserrano@zounds.com",
- "phone": "+1 (939) 558-2221"
- },
- {
- "_id": "55d2fc86540849ad56aeac98",
- "age": 30,
- "name": "Barr Sykes",
- "gender": "male",
- "company": "CORECOM",
- "email": "barrsykes@corecom.com",
- "phone": "+1 (982) 523-3577"
- },
- {
- "_id": "55d2fc86e7d43d06e4d135f2",
- "age": 28,
- "name": "Julie Johnson",
- "gender": "female",
- "company": "BIOTICA",
- "email": "juliejohnson@biotica.com",
- "phone": "+1 (918) 487-3230"
- },
- {
- "_id": "55d2fc86450521acf4a465d9",
- "age": 23,
- "name": "Dawn Vinson",
- "gender": "female",
- "company": "MENBRAIN",
- "email": "dawnvinson@menbrain.com",
- "phone": "+1 (936) 525-3273"
- },
- {
- "_id": "55d2fc86df3e093a104f498b",
- "age": 30,
- "name": "Ginger Ryan",
- "gender": "female",
- "company": "ENTHAZE",
- "email": "gingerryan@enthaze.com",
- "phone": "+1 (865) 530-2726"
- },
- {
- "_id": "55d2fc86b6a6fed233908500",
- "age": 40,
- "name": "Mcconnell Prince",
- "gender": "male",
- "company": "TRIPSCH",
- "email": "mcconnellprince@tripsch.com",
- "phone": "+1 (923) 586-2117"
- },
- {
- "_id": "55d2fc8619de2514561b7ac1",
- "age": 23,
- "name": "Peck Blackwell",
- "gender": "male",
- "company": "ASSISTIA",
- "email": "peckblackwell@assistia.com",
- "phone": "+1 (988) 549-3418"
- },
- {
- "_id": "55d2fc8619b2c263aec32e51",
- "age": 32,
- "name": "Simmons Benton",
- "gender": "male",
- "company": "TROLLERY",
- "email": "simmonsbenton@trollery.com",
- "phone": "+1 (924) 439-2962"
- },
- {
- "_id": "55d2fc8612c77e18fa3c743d",
- "age": 36,
- "name": "Mari Silva",
- "gender": "female",
- "company": "MAGMINA",
- "email": "marisilva@magmina.com",
- "phone": "+1 (863) 509-3186"
- },
- {
- "_id": "55d2fc86226a40ce862e518e",
- "age": 40,
- "name": "Erin Jefferson",
- "gender": "female",
- "company": "VIAGREAT",
- "email": "erinjefferson@viagreat.com",
- "phone": "+1 (921) 408-2295"
- },
- {
- "_id": "55d2fc8601013536fc55a097",
- "age": 37,
- "name": "Nellie Ballard",
- "gender": "female",
- "company": "GEOFORMA",
- "email": "nellieballard@geoforma.com",
- "phone": "+1 (918) 406-2600"
- },
- {
- "_id": "55d2fc864402965704b3453a",
- "age": 27,
- "name": "Austin Brewer",
- "gender": "male",
- "company": "METROZ",
- "email": "austinbrewer@metroz.com",
- "phone": "+1 (968) 584-2959"
- },
- {
- "_id": "55d2fc8690a7d6957a09f6c8",
- "age": 34,
- "name": "Pickett Buckley",
- "gender": "male",
- "company": "SUREPLEX",
- "email": "pickettbuckley@sureplex.com",
- "phone": "+1 (975) 520-3259"
- },
- {
- "_id": "55d2fc8695f3020c96b14f95",
- "age": 39,
- "name": "Coleen Herman",
- "gender": "female",
- "company": "NORALI",
- "email": "coleenherman@norali.com",
- "phone": "+1 (916) 506-2704"
- },
- {
- "_id": "55d2fc869b58b96d1d2cdfcc",
- "age": 37,
- "name": "Roy Guerrero",
- "gender": "male",
- "company": "PLUTORQUE",
- "email": "royguerrero@plutorque.com",
- "phone": "+1 (922) 541-3741"
- },
- {
- "_id": "55d2fc86ba1ed1189e9020ee",
- "age": 29,
- "name": "Oneal Curtis",
- "gender": "male",
- "company": "DATAGEN",
- "email": "onealcurtis@datagen.com",
- "phone": "+1 (847) 421-3483"
- },
- {
- "_id": "55d2fc86b5c5e89eb9fe1e79",
- "age": 29,
- "name": "Chaney Christian",
- "gender": "male",
- "company": "XPLOR",
- "email": "chaneychristian@xplor.com",
- "phone": "+1 (847) 517-3918"
- },
- {
- "_id": "55d2fc86f6b5a3d91952d941",
- "age": 29,
- "name": "Cantu Richard",
- "gender": "male",
- "company": "ZANYMAX",
- "email": "canturichard@zanymax.com",
- "phone": "+1 (972) 487-2616"
- },
- {
- "_id": "55d2fc8609b0f98cbc2e101d",
- "age": 37,
- "name": "Newton Barrera",
- "gender": "male",
- "company": "PORTALINE",
- "email": "newtonbarrera@portaline.com",
- "phone": "+1 (964) 527-3130"
- },
- {
- "_id": "55d2fc86d0e063ca7629c11b",
- "age": 28,
- "name": "Jodi Pollard",
- "gender": "female",
- "company": "GOKO",
- "email": "jodipollard@goko.com",
- "phone": "+1 (957) 468-2658"
- },
- {
- "_id": "55d2fc8688d95c5c579bd328",
- "age": 35,
- "name": "Effie Nunez",
- "gender": "female",
- "company": "SNACKTION",
- "email": "effienunez@snacktion.com",
- "phone": "+1 (805) 576-3749"
- },
- {
- "_id": "55d2fc86f36c0eab69222b17",
- "age": 38,
- "name": "Haley Battle",
- "gender": "male",
- "company": "TERRAGEN",
- "email": "haleybattle@terragen.com",
- "phone": "+1 (955) 581-3931"
- },
- {
- "_id": "55d2fc86ee6900b197860a35",
- "age": 29,
- "name": "Cathy Vaughn",
- "gender": "female",
- "company": "CANOPOLY",
- "email": "cathyvaughn@canopoly.com",
- "phone": "+1 (875) 539-3578"
- },
- {
- "_id": "55d2fc86613f698b355e87bc",
- "age": 26,
- "name": "Mendoza Maxwell",
- "gender": "male",
- "company": "TERAPRENE",
- "email": "mendozamaxwell@teraprene.com",
- "phone": "+1 (820) 471-3500"
- },
- {
- "_id": "55d2fc86f86a80f78c45936a",
- "age": 28,
- "name": "Rosetta Hughes",
- "gender": "female",
- "company": "DEVILTOE",
- "email": "rosettahughes@deviltoe.com",
- "phone": "+1 (911) 418-2439"
- },
- {
- "_id": "55d2fc8683d3c4a377a984a5",
- "age": 28,
- "name": "Frazier Larson",
- "gender": "male",
- "company": "DAIDO",
- "email": "frazierlarson@daido.com",
- "phone": "+1 (995) 459-3756"
- },
- {
- "_id": "55d2fc8669baef03c4d6a4a5",
- "age": 27,
- "name": "Brittney Ratliff",
- "gender": "female",
- "company": "TALKALOT",
- "email": "brittneyratliff@talkalot.com",
- "phone": "+1 (865) 568-2986"
- },
- {
- "_id": "55d2fc86404583ccc6b6a4f4",
- "age": 21,
- "name": "Hancock Gilliam",
- "gender": "male",
- "company": "EXPOSA",
- "email": "hancockgilliam@exposa.com",
- "phone": "+1 (894) 519-3139"
- },
- {
- "_id": "55d2fc8675478e0b84bb5ab3",
- "age": 20,
- "name": "Lilia Mccormick",
- "gender": "female",
- "company": "DENTREX",
- "email": "liliamccormick@dentrex.com",
- "phone": "+1 (997) 552-3944"
- },
- {
- "_id": "55d2fc8658bf3954cdf52ebb",
- "age": 20,
- "name": "Chrystal Mcneil",
- "gender": "female",
- "company": "LIMOZEN",
- "email": "chrystalmcneil@limozen.com",
- "phone": "+1 (943) 519-2952"
- },
- {
- "_id": "55d2fc865ebec9e8c7adc383",
- "age": 31,
- "name": "Hebert Alston",
- "gender": "male",
- "company": "IZZBY",
- "email": "hebertalston@izzby.com",
- "phone": "+1 (953) 482-2029"
- },
- {
- "_id": "55d2fc86bf1085e6fd2e9ea1",
- "age": 23,
- "name": "Mcfarland Carrillo",
- "gender": "male",
- "company": "EQUITOX",
- "email": "mcfarlandcarrillo@equitox.com",
- "phone": "+1 (999) 478-3822"
- },
- {
- "_id": "55d2fc8641d4f2d09f539bd6",
- "age": 40,
- "name": "Porter Weaver",
- "gender": "male",
- "company": "QUILM",
- "email": "porterweaver@quilm.com",
- "phone": "+1 (831) 501-2739"
- },
- {
- "_id": "55d2fc869ee5331a50039e30",
- "age": 23,
- "name": "Dale Sims",
- "gender": "male",
- "company": "SCENTRIC",
- "email": "dalesims@scentric.com",
- "phone": "+1 (845) 597-2120"
- },
- {
- "_id": "55d2fc86cb96d31fe71e4a18",
- "age": 22,
- "name": "William Dixon",
- "gender": "male",
- "company": "NAMEBOX",
- "email": "williamdixon@namebox.com",
- "phone": "+1 (970) 448-2651"
- },
- {
- "_id": "55d2fc86e88daeb1e198671d",
- "age": 33,
- "name": "Patrica Reed",
- "gender": "female",
- "company": "CORPORANA",
- "email": "patricareed@corporana.com",
- "phone": "+1 (817) 457-2413"
- },
- {
- "_id": "55d2fc86c33d9f422bf8bfcc",
- "age": 20,
- "name": "Marylou Mcmillan",
- "gender": "female",
- "company": "RETRACK",
- "email": "maryloumcmillan@retrack.com",
- "phone": "+1 (908) 568-2328"
- },
- {
- "_id": "55d2fc86c4b1b139887e76f1",
- "age": 20,
- "name": "Maritza David",
- "gender": "female",
- "company": "ORBEAN",
- "email": "maritzadavid@orbean.com",
- "phone": "+1 (851) 503-3737"
- },
- {
- "_id": "55d2fc86ac0f360d91c740e6",
- "age": 23,
- "name": "Lorie Moses",
- "gender": "female",
- "company": "ROCKABYE",
- "email": "loriemoses@rockabye.com",
- "phone": "+1 (823) 431-2387"
- },
- {
- "_id": "55d2fc86d7d406569b386b17",
- "age": 35,
- "name": "Shields Weiss",
- "gender": "male",
- "company": "RODEOCEAN",
- "email": "shieldsweiss@rodeocean.com",
- "phone": "+1 (957) 490-3725"
- },
- {
- "_id": "55d2fc86e4f66ce770ae2c93",
- "age": 25,
- "name": "Eugenia Berry",
- "gender": "female",
- "company": "BISBA",
- "email": "eugeniaberry@bisba.com",
- "phone": "+1 (948) 403-3403"
- },
- {
- "_id": "55d2fc8618f2f4f428223522",
- "age": 33,
- "name": "Howard Compton",
- "gender": "male",
- "company": "NAMEGEN",
- "email": "howardcompton@namegen.com",
- "phone": "+1 (827) 439-3667"
- },
- {
- "_id": "55d2fc86f5adc0f6dd535ea6",
- "age": 28,
- "name": "Key Davis",
- "gender": "male",
- "company": "PORTICO",
- "email": "keydavis@portico.com",
- "phone": "+1 (873) 533-2980"
- },
- {
- "_id": "55d2fc86876669f4e9431417",
- "age": 33,
- "name": "Phillips Solis",
- "gender": "male",
- "company": "DANCITY",
- "email": "phillipssolis@dancity.com",
- "phone": "+1 (883) 481-3114"
- },
- {
- "_id": "55d2fc86f2bb610d7ad9ea36",
- "age": 40,
- "name": "Cash Pugh",
- "gender": "male",
- "company": "STUCCO",
- "email": "cashpugh@stucco.com",
- "phone": "+1 (873) 512-2106"
- },
- {
- "_id": "55d2fc863be1649d5bd3be39",
- "age": 21,
- "name": "Elinor Warner",
- "gender": "female",
- "company": "FOSSIEL",
- "email": "elinorwarner@fossiel.com",
- "phone": "+1 (950) 431-3679"
- },
- {
- "_id": "55d2fc86fdad2af5536237e2",
- "age": 35,
- "name": "Jacquelyn Doyle",
- "gender": "female",
- "company": "CYTREX",
- "email": "jacquelyndoyle@cytrex.com",
- "phone": "+1 (924) 569-2919"
- },
- {
- "_id": "55d2fc86f3affa20ab27edff",
- "age": 33,
- "name": "Jeannine Mosley",
- "gender": "female",
- "company": "ACUSAGE",
- "email": "jeanninemosley@acusage.com",
- "phone": "+1 (954) 517-2805"
- },
- {
- "_id": "55d2fc8670dd0dbdd6e4d195",
- "age": 37,
- "name": "Logan Brady",
- "gender": "male",
- "company": "TELLIFLY",
- "email": "loganbrady@tellifly.com",
- "phone": "+1 (861) 576-2313"
- },
- {
- "_id": "55d2fc86b9a15e4721982a39",
- "age": 26,
- "name": "Houston Joseph",
- "gender": "male",
- "company": "BOILICON",
- "email": "houstonjoseph@boilicon.com",
- "phone": "+1 (822) 519-3430"
- },
- {
- "_id": "55d2fc86f225999b0b8742d2",
- "age": 38,
- "name": "Rita Lindsey",
- "gender": "female",
- "company": "FIBEROX",
- "email": "ritalindsey@fiberox.com",
- "phone": "+1 (805) 551-3755"
- },
- {
- "_id": "55d2fc86e9dad38b6873b807",
- "age": 22,
- "name": "Strong Poole",
- "gender": "male",
- "company": "KINDALOO",
- "email": "strongpoole@kindaloo.com",
- "phone": "+1 (918) 426-2076"
- },
- {
- "_id": "55d2fc861608b965b2283827",
- "age": 38,
- "name": "Hines Mathews",
- "gender": "male",
- "company": "INTRADISK",
- "email": "hinesmathews@intradisk.com",
- "phone": "+1 (932) 420-2236"
- },
- {
- "_id": "55d2fc863079075f91241a16",
- "age": 28,
- "name": "Trina Wiley",
- "gender": "female",
- "company": "HATOLOGY",
- "email": "trinawiley@hatology.com",
- "phone": "+1 (855) 466-3287"
- },
- {
- "_id": "55d2fc86f2fae1a79253fb61",
- "age": 23,
- "name": "Kirby Tucker",
- "gender": "male",
- "company": "AQUAMATE",
- "email": "kirbytucker@aquamate.com",
- "phone": "+1 (935) 456-3272"
- },
- {
- "_id": "55d2fc86c42bf49f8202b2fa",
- "age": 28,
- "name": "Ballard Stein",
- "gender": "male",
- "company": "KOOGLE",
- "email": "ballardstein@koogle.com",
- "phone": "+1 (943) 586-2225"
- },
- {
- "_id": "55d2fc865db815da198c0776",
- "age": 36,
- "name": "Wagner Mcfarland",
- "gender": "male",
- "company": "ACCIDENCY",
- "email": "wagnermcfarland@accidency.com",
- "phone": "+1 (920) 533-2157"
- },
- {
- "_id": "55d2fc866aeb268fe48fd6be",
- "age": 22,
- "name": "Wiley Wilder",
- "gender": "male",
- "company": "KIDSTOCK",
- "email": "wileywilder@kidstock.com",
- "phone": "+1 (957) 459-3416"
- },
- {
- "_id": "55d2fc8606f67a423d303437",
- "age": 37,
- "name": "Rosario Slater",
- "gender": "female",
- "company": "SPRINGBEE",
- "email": "rosarioslater@springbee.com",
- "phone": "+1 (950) 506-3454"
- },
- {
- "_id": "55d2fc86510fd16a269a0201",
- "age": 37,
- "name": "Walker Mcdowell",
- "gender": "male",
- "company": "ONTAGENE",
- "email": "walkermcdowell@ontagene.com",
- "phone": "+1 (953) 579-3429"
- },
- {
- "_id": "55d2fc867d419d30f9394f56",
- "age": 32,
- "name": "Booth Pratt",
- "gender": "male",
- "company": "ZIGGLES",
- "email": "boothpratt@ziggles.com",
- "phone": "+1 (835) 453-3707"
- },
- {
- "_id": "55d2fc86e631b8f71bbe7b35",
- "age": 33,
- "name": "Georgia Carpenter",
- "gender": "female",
- "company": "STRALUM",
- "email": "georgiacarpenter@stralum.com",
- "phone": "+1 (923) 536-3557"
- },
- {
- "_id": "55d2fc866df6437afa4cfaf6",
- "age": 26,
- "name": "Harding Powers",
- "gender": "male",
- "company": "BEADZZA",
- "email": "hardingpowers@beadzza.com",
- "phone": "+1 (855) 467-2993"
- },
- {
- "_id": "55d2fc867ade492afcfc24a6",
- "age": 37,
- "name": "Kaye Brown",
- "gender": "female",
- "company": "AMTAS",
- "email": "kayebrown@amtas.com",
- "phone": "+1 (926) 444-3936"
- },
- {
- "_id": "55d2fc862bf33dd3169710ff",
- "age": 24,
- "name": "Mccray Padilla",
- "gender": "male",
- "company": "FUTURIS",
- "email": "mccraypadilla@futuris.com",
- "phone": "+1 (969) 561-3819"
- },
- {
- "_id": "55d2fc8666f74690303abf65",
- "age": 35,
- "name": "Moon Moss",
- "gender": "male",
- "company": "EURON",
- "email": "moonmoss@euron.com",
- "phone": "+1 (885) 514-2872"
- },
- {
- "_id": "55d2fc860a8b5abfdf57bd37",
- "age": 26,
- "name": "Lane Gregory",
- "gender": "male",
- "company": "SKINSERVE",
- "email": "lanegregory@skinserve.com",
- "phone": "+1 (818) 455-3048"
- },
- {
- "_id": "55d2fc86f17541fe3b770b26",
- "age": 30,
- "name": "Cummings Good",
- "gender": "male",
- "company": "GEEKOLOGY",
- "email": "cummingsgood@geekology.com",
- "phone": "+1 (821) 426-3476"
- },
- {
- "_id": "55d2fc865b6232d788278e1f",
- "age": 26,
- "name": "Lottie Soto",
- "gender": "female",
- "company": "INTERGEEK",
- "email": "lottiesoto@intergeek.com",
- "phone": "+1 (905) 516-2928"
- },
- {
- "_id": "55d2fc868388a50b97dda5c2",
- "age": 38,
- "name": "Bridges Bell",
- "gender": "male",
- "company": "MIRACULA",
- "email": "bridgesbell@miracula.com",
- "phone": "+1 (917) 438-3079"
- },
- {
- "_id": "55d2fc86cc2120d10b75c41b",
- "age": 23,
- "name": "Marcella Lancaster",
- "gender": "female",
- "company": "NAVIR",
- "email": "marcellalancaster@navir.com",
- "phone": "+1 (851) 478-2535"
- },
- {
- "_id": "55d2fc86f52bd008c87c6993",
- "age": 32,
- "name": "Foley Yang",
- "gender": "male",
- "company": "APEXTRI",
- "email": "foleyyang@apextri.com",
- "phone": "+1 (978) 504-2003"
- },
- {
- "_id": "55d2fc86088b65117b293eef",
- "age": 21,
- "name": "Debora Levine",
- "gender": "female",
- "company": "VANTAGE",
- "email": "deboralevine@vantage.com",
- "phone": "+1 (820) 472-2507"
- },
- {
- "_id": "55d2fc86765d079d8584c281",
- "age": 30,
- "name": "Jill Durham",
- "gender": "female",
- "company": "FUTURITY",
- "email": "jilldurham@futurity.com",
- "phone": "+1 (996) 499-2910"
- },
- {
- "_id": "55d2fc860ed183243d043f79",
- "age": 28,
- "name": "Della Sherman",
- "gender": "female",
- "company": "EXTRO",
- "email": "dellasherman@extro.com",
- "phone": "+1 (893) 541-2867"
- },
- {
- "_id": "55d2fc8646733a05fa448c6e",
- "age": 30,
- "name": "Tamara Albert",
- "gender": "female",
- "company": "ECOLIGHT",
- "email": "tamaraalbert@ecolight.com",
- "phone": "+1 (870) 514-2615"
- },
- {
- "_id": "55d2fc86b8bf0a0f7ffb702e",
- "age": 39,
- "name": "Lynn Green",
- "gender": "male",
- "company": "SNIPS",
- "email": "lynngreen@snips.com",
- "phone": "+1 (938) 464-2073"
- },
- {
- "_id": "55d2fc863e577905fc3ea8e7",
- "age": 29,
- "name": "Barbra Tate",
- "gender": "female",
- "company": "ACRUEX",
- "email": "barbratate@acruex.com",
- "phone": "+1 (809) 418-2604"
- },
- {
- "_id": "55d2fc86335b53151fc242b5",
- "age": 33,
- "name": "Potts Dickerson",
- "gender": "male",
- "company": "SHADEASE",
- "email": "pottsdickerson@shadease.com",
- "phone": "+1 (967) 539-3330"
- },
- {
- "_id": "55d2fc86716df5cb28925d59",
- "age": 36,
- "name": "Nancy Woodard",
- "gender": "female",
- "company": "ZOSIS",
- "email": "nancywoodard@zosis.com",
- "phone": "+1 (811) 434-3223"
- },
- {
- "_id": "55d2fc86058113d9a4909796",
- "age": 29,
- "name": "Park Evans",
- "gender": "male",
- "company": "XUMONK",
- "email": "parkevans@xumonk.com",
- "phone": "+1 (836) 443-2361"
- },
- {
- "_id": "55d2fc8659b6d92fb2880f83",
- "age": 25,
- "name": "Nicole Sullivan",
- "gender": "female",
- "company": "QUALITEX",
- "email": "nicolesullivan@qualitex.com",
- "phone": "+1 (823) 584-2994"
- },
- {
- "_id": "55d2fc86510772cfe78617a9",
- "age": 33,
- "name": "Bowers Barnett",
- "gender": "male",
- "company": "HOUSEDOWN",
- "email": "bowersbarnett@housedown.com",
- "phone": "+1 (872) 466-3548"
- },
- {
- "_id": "55d2fc868dec3ac619cfc262",
- "age": 21,
- "name": "Jeri Nielsen",
- "gender": "female",
- "company": "MOBILDATA",
- "email": "jerinielsen@mobildata.com",
- "phone": "+1 (886) 581-2045"
- },
- {
- "_id": "55d2fc863e89d05123e90aaf",
- "age": 26,
- "name": "Delores Farmer",
- "gender": "female",
- "company": "XERONK",
- "email": "deloresfarmer@xeronk.com",
- "phone": "+1 (872) 556-2716"
- },
- {
- "_id": "55d2fc8618c10cef39c48f97",
- "age": 38,
- "name": "Mathis Walsh",
- "gender": "male",
- "company": "VURBO",
- "email": "mathiswalsh@vurbo.com",
- "phone": "+1 (837) 459-2909"
- },
- {
- "_id": "55d2fc868b3487cb71c8bac4",
- "age": 20,
- "name": "Ingrid Shelton",
- "gender": "female",
- "company": "ORBIN",
- "email": "ingridshelton@orbin.com",
- "phone": "+1 (914) 592-2364"
- },
- {
- "_id": "55d2fc86bcf5c885edacef50",
- "age": 36,
- "name": "Socorro Burns",
- "gender": "female",
- "company": "NETAGY",
- "email": "socorroburns@netagy.com",
- "phone": "+1 (931) 523-3116"
- },
- {
- "_id": "55d2fc8693f704f5c95c48a7",
- "age": 39,
- "name": "Jo Ware",
- "gender": "female",
- "company": "FLYBOYZ",
- "email": "joware@flyboyz.com",
- "phone": "+1 (844) 467-2192"
- },
- {
- "_id": "55d2fc86e87485075df33029",
- "age": 38,
- "name": "Emilia Flores",
- "gender": "female",
- "company": "ZAGGLES",
- "email": "emiliaflores@zaggles.com",
- "phone": "+1 (992) 408-2629"
- },
- {
- "_id": "55d2fc861ab925ca0b9b15c6",
- "age": 31,
- "name": "Burks Haney",
- "gender": "male",
- "company": "ZYPLE",
- "email": "burkshaney@zyple.com",
- "phone": "+1 (882) 401-2811"
- },
- {
- "_id": "55d2fc86e9c252588455b811",
- "age": 31,
- "name": "Holly Snow",
- "gender": "female",
- "company": "FURNAFIX",
- "email": "hollysnow@furnafix.com",
- "phone": "+1 (802) 592-2798"
- },
- {
- "_id": "55d2fc86e07c753096021423",
- "age": 25,
- "name": "Frances Hayden",
- "gender": "female",
- "company": "SNORUS",
- "email": "franceshayden@snorus.com",
- "phone": "+1 (818) 481-2431"
- },
- {
- "_id": "55d2fc86496884876065c346",
- "age": 28,
- "name": "Lila Lewis",
- "gender": "female",
- "company": "ZOMBOID",
- "email": "lilalewis@zomboid.com",
- "phone": "+1 (893) 593-2423"
- },
- {
- "_id": "55d2fc865c6ea080a4d0a5b5",
- "age": 34,
- "name": "Torres Finley",
- "gender": "male",
- "company": "MAXIMIND",
- "email": "torresfinley@maximind.com",
- "phone": "+1 (888) 504-3674"
- },
- {
- "_id": "55d2fc86391c44c545fe989f",
- "age": 23,
- "name": "Horne James",
- "gender": "male",
- "company": "PETICULAR",
- "email": "hornejames@peticular.com",
- "phone": "+1 (865) 558-2517"
- },
- {
- "_id": "55d2fc86c8c2529939eada03",
- "age": 28,
- "name": "Jennings Wallace",
- "gender": "male",
- "company": "CAXT",
- "email": "jenningswallace@caxt.com",
- "phone": "+1 (833) 599-3895"
- },
- {
- "_id": "55d2fc86ee656fe865fbde29",
- "age": 33,
- "name": "Lily Gilmore",
- "gender": "female",
- "company": "RADIANTIX",
- "email": "lilygilmore@radiantix.com",
- "phone": "+1 (854) 561-3148"
- },
- {
- "_id": "55d2fc868455126d596ab537",
- "age": 35,
- "name": "Kristy Delacruz",
- "gender": "female",
- "company": "EQUICOM",
- "email": "kristydelacruz@equicom.com",
- "phone": "+1 (871) 502-3732"
- },
- {
- "_id": "55d2fc863096983ef370ca49",
- "age": 31,
- "name": "England Vance",
- "gender": "male",
- "company": "VOLAX",
- "email": "englandvance@volax.com",
- "phone": "+1 (840) 593-3417"
- },
- {
- "_id": "55d2fc8671f3c1e30bee852f",
- "age": 23,
- "name": "Rodriguez Foreman",
- "gender": "male",
- "company": "EXTRAWEAR",
- "email": "rodriguezforeman@extrawear.com",
- "phone": "+1 (804) 497-2101"
- },
- {
- "_id": "55d2fc86bea38e2b0cd970cb",
- "age": 35,
- "name": "Richard Garrett",
- "gender": "male",
- "company": "SUPREMIA",
- "email": "richardgarrett@supremia.com",
- "phone": "+1 (925) 461-3414"
- },
- {
- "_id": "55d2fc862c5193ab7b4668b7",
- "age": 40,
- "name": "Connie Ortega",
- "gender": "female",
- "company": "ZILODYNE",
- "email": "connieortega@zilodyne.com",
- "phone": "+1 (838) 582-3241"
- },
- {
- "_id": "55d2fc865a6b25d6bc09180e",
- "age": 24,
- "name": "Solomon Bates",
- "gender": "male",
- "company": "EXOSPACE",
- "email": "solomonbates@exospace.com",
- "phone": "+1 (897) 496-2243"
- },
- {
- "_id": "55d2fc86a16a4e077136e4b5",
- "age": 32,
- "name": "Valencia Andrews",
- "gender": "male",
- "company": "NORSUP",
- "email": "valenciaandrews@norsup.com",
- "phone": "+1 (891) 503-3593"
- },
- {
- "_id": "55d2fc86bc5f1bf697a90465",
- "age": 24,
- "name": "Briggs Vasquez",
- "gender": "male",
- "company": "ZENTIA",
- "email": "briggsvasquez@zentia.com",
- "phone": "+1 (802) 415-3377"
- },
- {
- "_id": "55d2fc86c088d6466d83f8fc",
- "age": 26,
- "name": "Hester Rice",
- "gender": "female",
- "company": "CYTREK",
- "email": "hesterrice@cytrek.com",
- "phone": "+1 (855) 544-3905"
- },
- {
- "_id": "55d2fc8622fc3e78977288af",
- "age": 25,
- "name": "Shelly Hendrix",
- "gender": "female",
- "company": "POWERNET",
- "email": "shellyhendrix@powernet.com",
- "phone": "+1 (912) 431-2318"
- },
- {
- "_id": "55d2fc862cdec6cd321df6e0",
- "age": 22,
- "name": "Alison Newman",
- "gender": "female",
- "company": "COMTOUR",
- "email": "alisonnewman@comtour.com",
- "phone": "+1 (836) 582-3513"
- },
- {
- "_id": "55d2fc86e0070d54d4712ca4",
- "age": 30,
- "name": "French Rivera",
- "gender": "male",
- "company": "ACUMENTOR",
- "email": "frenchrivera@acumentor.com",
- "phone": "+1 (902) 579-2193"
- },
- {
- "_id": "55d2fc860f64b4423a9d6ffc",
- "age": 38,
- "name": "Terrell Mendez",
- "gender": "male",
- "company": "IMAGINART",
- "email": "terrellmendez@imaginart.com",
- "phone": "+1 (967) 494-2713"
- },
- {
- "_id": "55d2fc86548793116b225b3b",
- "age": 30,
- "name": "Parsons Robertson",
- "gender": "male",
- "company": "OBONES",
- "email": "parsonsrobertson@obones.com",
- "phone": "+1 (984) 434-2810"
- },
- {
- "_id": "55d2fc865b8b0d6a59db876c",
- "age": 33,
- "name": "Livingston Barry",
- "gender": "male",
- "company": "TYPHONICA",
- "email": "livingstonbarry@typhonica.com",
- "phone": "+1 (976) 560-3878"
- },
- {
- "_id": "55d2fc865ce23fb8b34cae53",
- "age": 40,
- "name": "Valeria Stout",
- "gender": "female",
- "company": "AVENETRO",
- "email": "valeriastout@avenetro.com",
- "phone": "+1 (885) 557-3624"
- },
- {
- "_id": "55d2fc86c03ea1d6e81563ac",
- "age": 39,
- "name": "Grimes Dyer",
- "gender": "male",
- "company": "GEOLOGIX",
- "email": "grimesdyer@geologix.com",
- "phone": "+1 (896) 533-2919"
- },
- {
- "_id": "55d2fc8655c0acb356a06c8f",
- "age": 29,
- "name": "Higgins Short",
- "gender": "male",
- "company": "BICOL",
- "email": "higginsshort@bicol.com",
- "phone": "+1 (976) 444-3073"
- },
- {
- "_id": "55d2fc865b6db005487c52bb",
- "age": 34,
- "name": "Gilmore Campos",
- "gender": "male",
- "company": "PASTURIA",
- "email": "gilmorecampos@pasturia.com",
- "phone": "+1 (862) 442-2147"
- },
- {
- "_id": "55d2fc863df4791bcb269217",
- "age": 29,
- "name": "Sloan Kane",
- "gender": "male",
- "company": "XELEGYL",
- "email": "sloankane@xelegyl.com",
- "phone": "+1 (946) 526-2275"
- },
- {
- "_id": "55d2fc86b2eb7dedbd5a9e8d",
- "age": 26,
- "name": "Mcpherson Thornton",
- "gender": "male",
- "company": "KAGE",
- "email": "mcphersonthornton@kage.com",
- "phone": "+1 (803) 478-2690"
- },
- {
- "_id": "55d2fc8603f6a8c17148c8dd",
- "age": 31,
- "name": "Christi Welch",
- "gender": "female",
- "company": "WARETEL",
- "email": "christiwelch@waretel.com",
- "phone": "+1 (999) 552-3114"
- },
- {
- "_id": "55d2fc86118d83cb9d06aa2e",
- "age": 29,
- "name": "Padilla Travis",
- "gender": "male",
- "company": "ENERVATE",
- "email": "padillatravis@enervate.com",
- "phone": "+1 (897) 577-3387"
- },
- {
- "_id": "55d2fc86aba06801708bed65",
- "age": 22,
- "name": "Stanton Casey",
- "gender": "male",
- "company": "BUZZMAKER",
- "email": "stantoncasey@buzzmaker.com",
- "phone": "+1 (858) 571-2667"
- },
- {
- "_id": "55d2fc86184810b00043a4b7",
- "age": 29,
- "name": "Krista Hernandez",
- "gender": "female",
- "company": "BIOHAB",
- "email": "kristahernandez@biohab.com",
- "phone": "+1 (832) 510-3654"
- },
- {
- "_id": "55d2fc86e9c951b5bcea3938",
- "age": 36,
- "name": "Deleon Oliver",
- "gender": "male",
- "company": "NETBOOK",
- "email": "deleonoliver@netbook.com",
- "phone": "+1 (934) 504-2964"
- },
- {
- "_id": "55d2fc86923000f3ea91ae38",
- "age": 36,
- "name": "Vasquez Fowler",
- "gender": "male",
- "company": "ORGANICA",
- "email": "vasquezfowler@organica.com",
- "phone": "+1 (949) 546-2722"
- },
- {
- "_id": "55d2fc861e12cd0fa6207a9e",
- "age": 33,
- "name": "Rutledge Keith",
- "gender": "male",
- "company": "COLAIRE",
- "email": "rutledgekeith@colaire.com",
- "phone": "+1 (936) 472-3739"
- },
- {
- "_id": "55d2fc86927eca39ef0c7ae9",
- "age": 26,
- "name": "Kirsten Valenzuela",
- "gender": "female",
- "company": "SEQUITUR",
- "email": "kirstenvalenzuela@sequitur.com",
- "phone": "+1 (958) 564-3259"
- },
- {
- "_id": "55d2fc869e922239ce293d2c",
- "age": 40,
- "name": "Garza Gutierrez",
- "gender": "male",
- "company": "SPLINX",
- "email": "garzagutierrez@splinx.com",
- "phone": "+1 (850) 525-3114"
- },
- {
- "_id": "55d2fc869dd88389d4785283",
- "age": 27,
- "name": "Shawna Peck",
- "gender": "female",
- "company": "UNQ",
- "email": "shawnapeck@unq.com",
- "phone": "+1 (961) 579-3704"
- },
- {
- "_id": "55d2fc86722d8e2a714bf7f2",
- "age": 23,
- "name": "Aurelia Mcpherson",
- "gender": "female",
- "company": "BOINK",
- "email": "aureliamcpherson@boink.com",
- "phone": "+1 (946) 479-2080"
- },
- {
- "_id": "55d2fc862324d173c26dfc68",
- "age": 39,
- "name": "Maryellen Daugherty",
- "gender": "female",
- "company": "ZILCH",
- "email": "maryellendaugherty@zilch.com",
- "phone": "+1 (817) 577-3290"
- },
- {
- "_id": "55d2fc86d311107f869da748",
- "age": 35,
- "name": "Zelma Hancock",
- "gender": "female",
- "company": "EVENTAGE",
- "email": "zelmahancock@eventage.com",
- "phone": "+1 (845) 578-3887"
- },
- {
- "_id": "55d2fc86afb4ede1f20a6d15",
- "age": 34,
- "name": "Tessa Adkins",
- "gender": "female",
- "company": "CONJURICA",
- "email": "tessaadkins@conjurica.com",
- "phone": "+1 (807) 497-2845"
- },
- {
- "_id": "55d2fc8648a2e36d6f97fad1",
- "age": 22,
- "name": "Wong Shaffer",
- "gender": "male",
- "company": "ACCUFARM",
- "email": "wongshaffer@accufarm.com",
- "phone": "+1 (865) 589-3833"
- },
- {
- "_id": "55d2fc86c4c10d58f1fe357f",
- "age": 32,
- "name": "Ivy Suarez",
- "gender": "female",
- "company": "UNCORP",
- "email": "ivysuarez@uncorp.com",
- "phone": "+1 (851) 582-2829"
- },
- {
- "_id": "55d2fc867c11d1885ca4d8f9",
- "age": 25,
- "name": "Sosa Barber",
- "gender": "male",
- "company": "FUELTON",
- "email": "sosabarber@fuelton.com",
- "phone": "+1 (831) 404-2343"
- },
- {
- "_id": "55d2fc866405b373cff4d477",
- "age": 23,
- "name": "Rosalind Craft",
- "gender": "female",
- "company": "OTHERSIDE",
- "email": "rosalindcraft@otherside.com",
- "phone": "+1 (847) 455-2079"
- },
- {
- "_id": "55d2fc863a038b06c712b4b9",
- "age": 30,
- "name": "Bean Mathis",
- "gender": "male",
- "company": "QUILK",
- "email": "beanmathis@quilk.com",
- "phone": "+1 (974) 596-2868"
- },
- {
- "_id": "55d2fc86922e4a50dfef56ac",
- "age": 21,
- "name": "Kelley Ruiz",
- "gender": "female",
- "company": "APEX",
- "email": "kelleyruiz@apex.com",
- "phone": "+1 (889) 522-2938"
- },
- {
- "_id": "55d2fc868c7bf8c05a228366",
- "age": 22,
- "name": "Georgette Chaney",
- "gender": "female",
- "company": "EXOTECHNO",
- "email": "georgettechaney@exotechno.com",
- "phone": "+1 (920) 591-3934"
- },
- {
- "_id": "55d2fc86988c5be0c8ba5412",
- "age": 38,
- "name": "Tami Bullock",
- "gender": "female",
- "company": "ISOTRONIC",
- "email": "tamibullock@isotronic.com",
- "phone": "+1 (828) 567-2857"
- },
- {
- "_id": "55d2fc862264a1d2de2e8a6b",
- "age": 39,
- "name": "Castillo Rosario",
- "gender": "male",
- "company": "KONNECT",
- "email": "castillorosario@konnect.com",
- "phone": "+1 (938) 402-3484"
- },
- {
- "_id": "55d2fc8622ee680ff3c522e1",
- "age": 31,
- "name": "George Weber",
- "gender": "male",
- "company": "FARMAGE",
- "email": "georgeweber@farmage.com",
- "phone": "+1 (895) 502-2654"
- },
- {
- "_id": "55d2fc86a0d45d2916aacb5a",
- "age": 28,
- "name": "Wheeler Villarreal",
- "gender": "male",
- "company": "IMPERIUM",
- "email": "wheelervillarreal@imperium.com",
- "phone": "+1 (889) 507-3796"
- },
- {
- "_id": "55d2fc866c6e8e85c17c61ca",
- "age": 36,
- "name": "Arlene Bean",
- "gender": "female",
- "company": "UNIA",
- "email": "arlenebean@unia.com",
- "phone": "+1 (970) 463-2147"
- },
- {
- "_id": "55d2fc86c3c95fd98562a429",
- "age": 30,
- "name": "Oneil Madden",
- "gender": "male",
- "company": "COMBOGENE",
- "email": "oneilmadden@combogene.com",
- "phone": "+1 (849) 507-3555"
- },
- {
- "_id": "55d2fc86b0f7cc31af45078a",
- "age": 35,
- "name": "Vaughn Merritt",
- "gender": "male",
- "company": "ACCUPHARM",
- "email": "vaughnmerritt@accupharm.com",
- "phone": "+1 (886) 428-2966"
- },
- {
- "_id": "55d2fc86ad825cb66f2a2feb",
- "age": 21,
- "name": "Duran Bradford",
- "gender": "male",
- "company": "SQUISH",
- "email": "duranbradford@squish.com",
- "phone": "+1 (930) 434-2976"
- },
- {
- "_id": "55d2fc86efa80c332066194d",
- "age": 30,
- "name": "Tanisha Knox",
- "gender": "female",
- "company": "FARMEX",
- "email": "tanishaknox@farmex.com",
- "phone": "+1 (924) 540-2066"
- },
- {
- "_id": "55d2fc861dbd55c1fd4bdf23",
- "age": 38,
- "name": "Esther Foster",
- "gender": "female",
- "company": "SENSATE",
- "email": "estherfoster@sensate.com",
- "phone": "+1 (812) 417-2687"
- },
- {
- "_id": "55d2fc86115b9a01067db6ad",
- "age": 35,
- "name": "Marion Gray",
- "gender": "female",
- "company": "HINWAY",
- "email": "mariongray@hinway.com",
- "phone": "+1 (850) 526-2167"
- },
- {
- "_id": "55d2fc864b40086c2e4963e2",
- "age": 38,
- "name": "Ava Flowers",
- "gender": "female",
- "company": "REVERSUS",
- "email": "avaflowers@reversus.com",
- "phone": "+1 (989) 415-2504"
- },
- {
- "_id": "55d2fc8686c59f7395222b11",
- "age": 35,
- "name": "Katina Burnett",
- "gender": "female",
- "company": "DUFLEX",
- "email": "katinaburnett@duflex.com",
- "phone": "+1 (843) 464-3718"
- },
- {
- "_id": "55d2fc86e012c977bc5b57d6",
- "age": 37,
- "name": "Ester Cooley",
- "gender": "female",
- "company": "RUBADUB",
- "email": "estercooley@rubadub.com",
- "phone": "+1 (856) 407-3009"
- },
- {
- "_id": "55d2fc865688875c75a158b5",
- "age": 36,
- "name": "Dennis Mccray",
- "gender": "male",
- "company": "PETIGEMS",
- "email": "dennismccray@petigems.com",
- "phone": "+1 (989) 525-3768"
- },
- {
- "_id": "55d2fc86ca333a1c715a35c7",
- "age": 25,
- "name": "Mitzi Carson",
- "gender": "female",
- "company": "KENEGY",
- "email": "mitzicarson@kenegy.com",
- "phone": "+1 (819) 450-2923"
- },
- {
- "_id": "55d2fc86a8eb68257312e735",
- "age": 33,
- "name": "Guthrie Tyson",
- "gender": "male",
- "company": "GLUID",
- "email": "guthrietyson@gluid.com",
- "phone": "+1 (878) 496-3831"
- },
- {
- "_id": "55d2fc865d4f3b3777fc1573",
- "age": 38,
- "name": "Sellers Hodges",
- "gender": "male",
- "company": "BALOOBA",
- "email": "sellershodges@balooba.com",
- "phone": "+1 (895) 557-2331"
- },
- {
- "_id": "55d2fc860a91cf55298e2a24",
- "age": 32,
- "name": "Hawkins Hardin",
- "gender": "male",
- "company": "ZILLANET",
- "email": "hawkinshardin@zillanet.com",
- "phone": "+1 (852) 511-2796"
- },
- {
- "_id": "55d2fc867b1c618fcb9cb2c3",
- "age": 26,
- "name": "Bowman Buck",
- "gender": "male",
- "company": "APPLIDEC",
- "email": "bowmanbuck@applidec.com",
- "phone": "+1 (995) 500-2863"
- },
- {
- "_id": "55d2fc8666610d156551484b",
- "age": 23,
- "name": "Mcgee Delgado",
- "gender": "male",
- "company": "MANTRO",
- "email": "mcgeedelgado@mantro.com",
- "phone": "+1 (917) 490-2295"
- },
- {
- "_id": "55d2fc8685385c63f5a509b3",
- "age": 24,
- "name": "Petty Pena",
- "gender": "male",
- "company": "EXOSPEED",
- "email": "pettypena@exospeed.com",
- "phone": "+1 (929) 470-2022"
- },
- {
- "_id": "55d2fc864296df53bb778e52",
- "age": 38,
- "name": "Ray Mclaughlin",
- "gender": "male",
- "company": "PYRAMAX",
- "email": "raymclaughlin@pyramax.com",
- "phone": "+1 (935) 453-3720"
- },
- {
- "_id": "55d2fc86b157acc34692412b",
- "age": 22,
- "name": "Hopkins Wells",
- "gender": "male",
- "company": "NORALEX",
- "email": "hopkinswells@noralex.com",
- "phone": "+1 (986) 421-2293"
- },
- {
- "_id": "55d2fc861febd65bb3c91219",
- "age": 38,
- "name": "Patsy Strickland",
- "gender": "female",
- "company": "POLARIA",
- "email": "patsystrickland@polaria.com",
- "phone": "+1 (885) 408-2213"
- },
- {
- "_id": "55d2fc8693fbc24aa2bcc5a8",
- "age": 31,
- "name": "Wolf Delaney",
- "gender": "male",
- "company": "EXERTA",
- "email": "wolfdelaney@exerta.com",
- "phone": "+1 (969) 537-3201"
- },
- {
- "_id": "55d2fc86b923e0543d39fed4",
- "age": 30,
- "name": "Fulton Hewitt",
- "gender": "male",
- "company": "TWIGGERY",
- "email": "fultonhewitt@twiggery.com",
- "phone": "+1 (894) 483-2549"
- },
- {
- "_id": "55d2fc8672aff3d2369b2749",
- "age": 40,
- "name": "Nona Meadows",
- "gender": "female",
- "company": "ULTRIMAX",
- "email": "nonameadows@ultrimax.com",
- "phone": "+1 (997) 459-2012"
- },
- {
- "_id": "55d2fc86a3b6922e61cdcd72",
- "age": 24,
- "name": "Irwin Russo",
- "gender": "male",
- "company": "QUINTITY",
- "email": "irwinrusso@quintity.com",
- "phone": "+1 (985) 597-3841"
- },
- {
- "_id": "55d2fc86c28f4a90a41581b7",
- "age": 34,
- "name": "Mara Bowman",
- "gender": "female",
- "company": "ATOMICA",
- "email": "marabowman@atomica.com",
- "phone": "+1 (927) 578-2958"
- },
- {
- "_id": "55d2fc86ef827e1bbb5b3ceb",
- "age": 40,
- "name": "Leigh Schroeder",
- "gender": "female",
- "company": "ZIORE",
- "email": "leighschroeder@ziore.com",
- "phone": "+1 (963) 484-2519"
- },
- {
- "_id": "55d2fc86921329e8e044472a",
- "age": 27,
- "name": "Sweeney Riddle",
- "gender": "male",
- "company": "ELITA",
- "email": "sweeneyriddle@elita.com",
- "phone": "+1 (974) 536-2132"
- },
- {
- "_id": "55d2fc864b6067f7d828f1ba",
- "age": 23,
- "name": "Bell Kline",
- "gender": "male",
- "company": "ORBOID",
- "email": "bellkline@orboid.com",
- "phone": "+1 (827) 461-3466"
- },
- {
- "_id": "55d2fc86a541995fa67027ae",
- "age": 20,
- "name": "Morgan Aguirre",
- "gender": "female",
- "company": "AEORA",
- "email": "morganaguirre@aeora.com",
- "phone": "+1 (987) 494-2357"
- },
- {
- "_id": "55d2fc86af8d98e486bda0f5",
- "age": 24,
- "name": "Morrison Mcbride",
- "gender": "male",
- "company": "TECHMANIA",
- "email": "morrisonmcbride@techmania.com",
- "phone": "+1 (994) 470-2394"
- },
- {
- "_id": "55d2fc86371a2691da434cdd",
- "age": 22,
- "name": "Miles Salinas",
- "gender": "male",
- "company": "RODEOLOGY",
- "email": "milessalinas@rodeology.com",
- "phone": "+1 (898) 461-3008"
- },
- {
- "_id": "55d2fc865196aa926884d957",
- "age": 36,
- "name": "Lang Riggs",
- "gender": "male",
- "company": "PHOTOBIN",
- "email": "langriggs@photobin.com",
- "phone": "+1 (849) 503-2335"
- },
- {
- "_id": "55d2fc86b4e30cd686840e28",
- "age": 30,
- "name": "Kathy Phelps",
- "gender": "female",
- "company": "INTRAWEAR",
- "email": "kathyphelps@intrawear.com",
- "phone": "+1 (992) 499-2474"
- },
- {
- "_id": "55d2fc86f09accb089f91415",
- "age": 24,
- "name": "Moss Jimenez",
- "gender": "male",
- "company": "PROFLEX",
- "email": "mossjimenez@proflex.com",
- "phone": "+1 (842) 546-3491"
- },
- {
- "_id": "55d2fc86e3ba881a25584928",
- "age": 20,
- "name": "Moody Sexton",
- "gender": "male",
- "company": "CENTREGY",
- "email": "moodysexton@centregy.com",
- "phone": "+1 (856) 581-3293"
- },
- {
- "_id": "55d2fc861c85cf26c6d21a64",
- "age": 31,
- "name": "Nannie Price",
- "gender": "female",
- "company": "GEOSTELE",
- "email": "nannieprice@geostele.com",
- "phone": "+1 (936) 447-3486"
- },
- {
- "_id": "55d2fc86f1e23452254fda91",
- "age": 32,
- "name": "Summer Johnston",
- "gender": "female",
- "company": "EXTRAGENE",
- "email": "summerjohnston@extragene.com",
- "phone": "+1 (808) 508-2748"
- },
- {
- "_id": "55d2fc86940fcc0f17d5f213",
- "age": 24,
- "name": "Genevieve Lynch",
- "gender": "female",
- "company": "COREPAN",
- "email": "genevievelynch@corepan.com",
- "phone": "+1 (921) 532-2893"
- },
- {
- "_id": "55d2fc86cdf6056cd058466c",
- "age": 23,
- "name": "Stuart Oconnor",
- "gender": "male",
- "company": "PUSHCART",
- "email": "stuartoconnor@pushcart.com",
- "phone": "+1 (925) 515-3434"
- },
- {
- "_id": "55d2fc863bca896e3e2ac1a7",
- "age": 21,
- "name": "Adela Nieves",
- "gender": "female",
- "company": "MEDICROIX",
- "email": "adelanieves@medicroix.com",
- "phone": "+1 (910) 568-3916"
- },
- {
- "_id": "55d2fc86826d7c7fcfc2562e",
- "age": 28,
- "name": "Eaton Mcintosh",
- "gender": "male",
- "company": "MEGALL",
- "email": "eatonmcintosh@megall.com",
- "phone": "+1 (806) 440-2196"
- },
- {
- "_id": "55d2fc863d76c0458de8afb2",
- "age": 35,
- "name": "Sharron Hood",
- "gender": "female",
- "company": "UTARIAN",
- "email": "sharronhood@utarian.com",
- "phone": "+1 (824) 477-3364"
- },
- {
- "_id": "55d2fc86c0f317fe0cdd6f66",
- "age": 24,
- "name": "Allison Osborn",
- "gender": "female",
- "company": "TUBALUM",
- "email": "allisonosborn@tubalum.com",
- "phone": "+1 (913) 546-3966"
- },
- {
- "_id": "55d2fc86e1521a5a9896e0fa",
- "age": 38,
- "name": "Chelsea Jarvis",
- "gender": "female",
- "company": "SOPRANO",
- "email": "chelseajarvis@soprano.com",
- "phone": "+1 (834) 417-2904"
- },
- {
- "_id": "55d2fc86a5f4df72a31c9201",
- "age": 22,
- "name": "Finley Freeman",
- "gender": "male",
- "company": "COMBOT",
- "email": "finleyfreeman@combot.com",
- "phone": "+1 (886) 448-2820"
- },
- {
- "_id": "55d2fc86c4c2c783570c50eb",
- "age": 31,
- "name": "Lynn Miles",
- "gender": "female",
- "company": "ZENTIX",
- "email": "lynnmiles@zentix.com",
- "phone": "+1 (891) 450-2505"
- },
- {
- "_id": "55d2fc863e649b4a99367f40",
- "age": 39,
- "name": "Montoya Greene",
- "gender": "male",
- "company": "MEMORA",
- "email": "montoyagreene@memora.com",
- "phone": "+1 (809) 402-3541"
- },
- {
- "_id": "55d2fc86b82e96b2275df9f3",
- "age": 28,
- "name": "Castro Huff",
- "gender": "male",
- "company": "BLUPLANET",
- "email": "castrohuff@bluplanet.com",
- "phone": "+1 (966) 554-2469"
- },
- {
- "_id": "55d2fc86f4a8a7700a99e31c",
- "age": 23,
- "name": "Guadalupe Harmon",
- "gender": "female",
- "company": "ISOLOGIA",
- "email": "guadalupeharmon@isologia.com",
- "phone": "+1 (937) 497-2022"
- },
- {
- "_id": "55d2fc86551e7044f31f2520",
- "age": 25,
- "name": "Heidi Navarro",
- "gender": "female",
- "company": "POLARIUM",
- "email": "heidinavarro@polarium.com",
- "phone": "+1 (830) 493-3328"
- },
- {
- "_id": "55d2fc861ee43e4303351a4b",
- "age": 25,
- "name": "Fry Webster",
- "gender": "male",
- "company": "RENOVIZE",
- "email": "frywebster@renovize.com",
- "phone": "+1 (960) 600-3488"
- },
- {
- "_id": "55d2fc86e0d6778a1c6d7195",
- "age": 35,
- "name": "Candice Sharpe",
- "gender": "female",
- "company": "UNDERTAP",
- "email": "candicesharpe@undertap.com",
- "phone": "+1 (989) 436-2856"
- },
- {
- "_id": "55d2fc86267005541d225276",
- "age": 25,
- "name": "Vonda Hansen",
- "gender": "female",
- "company": "PROVIDCO",
- "email": "vondahansen@providco.com",
- "phone": "+1 (883) 484-2047"
- },
- {
- "_id": "55d2fc8605000bc9329d28e0",
- "age": 21,
- "name": "Lara Dominguez",
- "gender": "male",
- "company": "VIXO",
- "email": "laradominguez@vixo.com",
- "phone": "+1 (998) 440-3632"
- },
- {
- "_id": "55d2fc868b364833d935b192",
- "age": 36,
- "name": "Jillian Gibbs",
- "gender": "female",
- "company": "CUIZINE",
- "email": "jilliangibbs@cuizine.com",
- "phone": "+1 (996) 447-3083"
- },
- {
- "_id": "55d2fc863690a0784d2e8bc1",
- "age": 35,
- "name": "Frankie Cervantes",
- "gender": "female",
- "company": "ISODRIVE",
- "email": "frankiecervantes@isodrive.com",
- "phone": "+1 (895) 533-2371"
- },
- {
- "_id": "55d2fc86efb91d645101592f",
- "age": 36,
- "name": "Nieves Walton",
- "gender": "male",
- "company": "ZILPHUR",
- "email": "nieveswalton@zilphur.com",
- "phone": "+1 (866) 412-2377"
- },
- {
- "_id": "55d2fc86cba2fb0dfd9eb8c3",
- "age": 38,
- "name": "Celina Orr",
- "gender": "female",
- "company": "COMVEX",
- "email": "celinaorr@comvex.com",
- "phone": "+1 (960) 433-2380"
- },
- {
- "_id": "55d2fc8650eaf118ae048bce",
- "age": 33,
- "name": "Moreno Conway",
- "gender": "male",
- "company": "VIOCULAR",
- "email": "morenoconway@viocular.com",
- "phone": "+1 (808) 535-2624"
- },
- {
- "_id": "55d2fc860e41c77df0ea1151",
- "age": 33,
- "name": "Wilkerson Dodson",
- "gender": "male",
- "company": "COMTRAK",
- "email": "wilkersondodson@comtrak.com",
- "phone": "+1 (932) 427-2400"
- },
- {
- "_id": "55d2fc86175167613833c577",
- "age": 21,
- "name": "Crane Lloyd",
- "gender": "male",
- "company": "ARCHITAX",
- "email": "cranelloyd@architax.com",
- "phone": "+1 (984) 467-3498"
- },
- {
- "_id": "55d2fc863aa593013e09d04b",
- "age": 25,
- "name": "Marguerite Dorsey",
- "gender": "female",
- "company": "UNI",
- "email": "margueritedorsey@uni.com",
- "phone": "+1 (989) 558-2105"
- },
- {
- "_id": "55d2fc86248902726f0d1c53",
- "age": 35,
- "name": "Dillon William",
- "gender": "male",
- "company": "ROOFORIA",
- "email": "dillonwilliam@rooforia.com",
- "phone": "+1 (879) 600-3589"
- },
- {
- "_id": "55d2fc86caa1b7374cd83a72",
- "age": 32,
- "name": "Small Floyd",
- "gender": "male",
- "company": "ANACHO",
- "email": "smallfloyd@anacho.com",
- "phone": "+1 (906) 463-2357"
- },
- {
- "_id": "55d2fc86c086267c74616688",
- "age": 32,
- "name": "Dominique Horn",
- "gender": "female",
- "company": "ENTOGROK",
- "email": "dominiquehorn@entogrok.com",
- "phone": "+1 (871) 556-2943"
- },
- {
- "_id": "55d2fc86d3f7731c49d48fa7",
- "age": 35,
- "name": "Haley Shannon",
- "gender": "female",
- "company": "UNEEQ",
- "email": "haleyshannon@uneeq.com",
- "phone": "+1 (984) 471-3688"
- },
- {
- "_id": "55d2fc8678e81807871b2b13",
- "age": 24,
- "name": "Flowers Richards",
- "gender": "male",
- "company": "QUILITY",
- "email": "flowersrichards@quility.com",
- "phone": "+1 (956) 548-3667"
- },
- {
- "_id": "55d2fc86b4b462a2743c10d3",
- "age": 33,
- "name": "Hopper Rush",
- "gender": "male",
- "company": "VERBUS",
- "email": "hopperrush@verbus.com",
- "phone": "+1 (866) 578-2948"
- },
- {
- "_id": "55d2fc86d660e6f5bf9c1ce1",
- "age": 31,
- "name": "Randall Kelley",
- "gender": "male",
- "company": "INSURON",
- "email": "randallkelley@insuron.com",
- "phone": "+1 (922) 520-3464"
- },
- {
- "_id": "55d2fc86e70ad03e58c3e01f",
- "age": 36,
- "name": "Owens Drake",
- "gender": "male",
- "company": "FROLIX",
- "email": "owensdrake@frolix.com",
- "phone": "+1 (982) 516-3575"
- },
- {
- "_id": "55d2fc86ef78c8ad566afe4f",
- "age": 28,
- "name": "Irma Garrison",
- "gender": "female",
- "company": "EXOZENT",
- "email": "irmagarrison@exozent.com",
- "phone": "+1 (882) 536-2614"
- },
- {
- "_id": "55d2fc8675d6b4b33c5e482f",
- "age": 34,
- "name": "Baldwin Carver",
- "gender": "male",
- "company": "PHEAST",
- "email": "baldwincarver@pheast.com",
- "phone": "+1 (824) 521-2892"
- },
- {
- "_id": "55d2fc86d382b214a715305f",
- "age": 23,
- "name": "Short Harding",
- "gender": "male",
- "company": "LIQUICOM",
- "email": "shortharding@liquicom.com",
- "phone": "+1 (836) 578-2063"
- },
- {
- "_id": "55d2fc860420ee3ca95e2166",
- "age": 35,
- "name": "Christy Roberson",
- "gender": "female",
- "company": "BITREX",
- "email": "christyroberson@bitrex.com",
- "phone": "+1 (840) 426-2954"
- },
- {
- "_id": "55d2fc86dd67ce4e4f7b6d0c",
- "age": 21,
- "name": "Fern Knight",
- "gender": "female",
- "company": "ENTROPIX",
- "email": "fernknight@entropix.com",
- "phone": "+1 (944) 546-2456"
- },
- {
- "_id": "55d2fc8651510fb366709f12",
- "age": 40,
- "name": "Elva Taylor",
- "gender": "female",
- "company": "COMFIRM",
- "email": "elvataylor@comfirm.com",
- "phone": "+1 (834) 468-2999"
- },
- {
- "_id": "55d2fc869603515857919a7c",
- "age": 26,
- "name": "Carmen Bentley",
- "gender": "female",
- "company": "LIMAGE",
- "email": "carmenbentley@limage.com",
- "phone": "+1 (882) 425-3588"
- },
- {
- "_id": "55d2fc860991d6904808f8b3",
- "age": 28,
- "name": "Blair Dunn",
- "gender": "male",
- "company": "ESSENSIA",
- "email": "blairdunn@essensia.com",
- "phone": "+1 (896) 477-2617"
- },
- {
- "_id": "55d2fc862c99e4fefd17ab8d",
- "age": 23,
- "name": "Minerva Swanson",
- "gender": "female",
- "company": "EMTRAC",
- "email": "minervaswanson@emtrac.com",
- "phone": "+1 (905) 427-3942"
- },
- {
- "_id": "55d2fc86a2b4277d171e6ed6",
- "age": 40,
- "name": "Alicia Lawrence",
- "gender": "female",
- "company": "CONCILITY",
- "email": "alicialawrence@concility.com",
- "phone": "+1 (903) 452-2010"
- },
- {
- "_id": "55d2fc86f98eb74fe02a49f5",
- "age": 33,
- "name": "Bernice Fitzpatrick",
- "gender": "female",
- "company": "JASPER",
- "email": "bernicefitzpatrick@jasper.com",
- "phone": "+1 (987) 518-2248"
- },
- {
- "_id": "55d2fc86070af0b0109b6a4c",
- "age": 20,
- "name": "Wilder Blackburn",
- "gender": "male",
- "company": "ZENTILITY",
- "email": "wilderblackburn@zentility.com",
- "phone": "+1 (921) 548-2995"
- },
- {
- "_id": "55d2fc86249796ecd0b25829",
- "age": 25,
- "name": "Lambert Wilson",
- "gender": "male",
- "company": "ANIVET",
- "email": "lambertwilson@anivet.com",
- "phone": "+1 (920) 592-2261"
- },
- {
- "_id": "55d2fc863c6bdb691f62bdf4",
- "age": 24,
- "name": "Cook Lee",
- "gender": "male",
- "company": "ZILLADYNE",
- "email": "cooklee@zilladyne.com",
- "phone": "+1 (812) 566-2988"
- },
- {
- "_id": "55d2fc86cdeae66cf4fe6582",
- "age": 29,
- "name": "Karyn Horne",
- "gender": "female",
- "company": "OBLIQ",
- "email": "karynhorne@obliq.com",
- "phone": "+1 (909) 452-3599"
- },
- {
- "_id": "55d2fc86bcbabc9eb159e1e4",
- "age": 23,
- "name": "Rowe Stokes",
- "gender": "male",
- "company": "ANDERSHUN",
- "email": "rowestokes@andershun.com",
- "phone": "+1 (948) 531-2335"
- },
- {
- "_id": "55d2fc86a1b344b621d41baa",
- "age": 27,
- "name": "Gonzalez Merrill",
- "gender": "male",
- "company": "PLAYCE",
- "email": "gonzalezmerrill@playce.com",
- "phone": "+1 (989) 418-3057"
- },
- {
- "_id": "55d2fc86300074c184103b47",
- "age": 33,
- "name": "Kathie Preston",
- "gender": "female",
- "company": "LUMBREX",
- "email": "kathiepreston@lumbrex.com",
- "phone": "+1 (911) 586-3177"
- },
- {
- "_id": "55d2fc8646059e576c41ed1f",
- "age": 26,
- "name": "Antoinette Stevens",
- "gender": "female",
- "company": "APEXIA",
- "email": "antoinettestevens@apexia.com",
- "phone": "+1 (828) 597-3083"
- },
- {
- "_id": "55d2fc86b5ec5743baacc091",
- "age": 22,
- "name": "Schmidt Morton",
- "gender": "male",
- "company": "NORSUL",
- "email": "schmidtmorton@norsul.com",
- "phone": "+1 (821) 530-2454"
- },
- {
- "_id": "55d2fc86a521743243b01d2b",
- "age": 37,
- "name": "Joyner Wise",
- "gender": "male",
- "company": "MANGELICA",
- "email": "joynerwise@mangelica.com",
- "phone": "+1 (884) 448-3942"
- },
- {
- "_id": "55d2fc86d7c827b5ded4027f",
- "age": 22,
- "name": "Carpenter Carey",
- "gender": "male",
- "company": "CENTICE",
- "email": "carpentercarey@centice.com",
- "phone": "+1 (823) 585-2581"
- },
- {
- "_id": "55d2fc866866bf441f74abdf",
- "age": 34,
- "name": "Luz Hays",
- "gender": "female",
- "company": "KONGENE",
- "email": "luzhays@kongene.com",
- "phone": "+1 (999) 558-2282"
- },
- {
- "_id": "55d2fc86af95d619737eccb7",
- "age": 27,
- "name": "Lesley Frye",
- "gender": "female",
- "company": "SUREMAX",
- "email": "lesleyfrye@suremax.com",
- "phone": "+1 (982) 485-2811"
- },
- {
- "_id": "55d2fc86b41a0594552e4839",
- "age": 31,
- "name": "Jacqueline Ramsey",
- "gender": "female",
- "company": "LYRIA",
- "email": "jacquelineramsey@lyria.com",
- "phone": "+1 (961) 581-2500"
- },
- {
- "_id": "55d2fc8682aa54548863d4b1",
- "age": 31,
- "name": "Ina Ford",
- "gender": "female",
- "company": "ENERSOL",
- "email": "inaford@enersol.com",
- "phone": "+1 (895) 514-3441"
- },
- {
- "_id": "55d2fc866bc796d86ebd697b",
- "age": 22,
- "name": "Francisca Ashley",
- "gender": "female",
- "company": "SIGNIDYNE",
- "email": "franciscaashley@signidyne.com",
- "phone": "+1 (911) 566-2135"
- },
- {
- "_id": "55d2fc868ccc122c6a517033",
- "age": 34,
- "name": "Morton Owen",
- "gender": "male",
- "company": "SHOPABOUT",
- "email": "mortonowen@shopabout.com",
- "phone": "+1 (932) 576-3821"
- },
- {
- "_id": "55d2fc86751e661b56e6e3cd",
- "age": 36,
- "name": "Weber Manning",
- "gender": "male",
- "company": "CENTREE",
- "email": "webermanning@centree.com",
- "phone": "+1 (865) 582-3809"
- },
- {
- "_id": "55d2fc8620b9766f76797a13",
- "age": 37,
- "name": "Edwards Steele",
- "gender": "male",
- "company": "KATAKANA",
- "email": "edwardssteele@katakana.com",
- "phone": "+1 (959) 402-3657"
- },
- {
- "_id": "55d2fc860a13152e82b74839",
- "age": 38,
- "name": "Gabriela Boone",
- "gender": "female",
- "company": "OVOLO",
- "email": "gabrielaboone@ovolo.com",
- "phone": "+1 (910) 587-2744"
- },
- {
- "_id": "55d2fc864e9ca8a988600768",
- "age": 32,
- "name": "Tricia Guy",
- "gender": "female",
- "company": "TALKOLA",
- "email": "triciaguy@talkola.com",
- "phone": "+1 (960) 474-3508"
- },
- {
- "_id": "55d2fc86ce61b77671fd1f33",
- "age": 32,
- "name": "James Romero",
- "gender": "female",
- "company": "CANDECOR",
- "email": "jamesromero@candecor.com",
- "phone": "+1 (928) 478-3272"
- },
- {
- "_id": "55d2fc86f3cc105e20a44aa9",
- "age": 25,
- "name": "Casey Hammond",
- "gender": "male",
- "company": "PYRAMIA",
- "email": "caseyhammond@pyramia.com",
- "phone": "+1 (965) 539-2923"
- },
- {
- "_id": "55d2fc86429d859d9e54585f",
- "age": 33,
- "name": "Moran Wade",
- "gender": "male",
- "company": "BUGSALL",
- "email": "moranwade@bugsall.com",
- "phone": "+1 (996) 559-2965"
- },
- {
- "_id": "55d2fc86820b562eff651ebc",
- "age": 34,
- "name": "Earline Goff",
- "gender": "female",
- "company": "DATAGENE",
- "email": "earlinegoff@datagene.com",
- "phone": "+1 (976) 565-3513"
- },
- {
- "_id": "55d2fc865f6176e8301edcf3",
- "age": 38,
- "name": "Vickie Cherry",
- "gender": "female",
- "company": "SILODYNE",
- "email": "vickiecherry@silodyne.com",
- "phone": "+1 (943) 522-2438"
- },
- {
- "_id": "55d2fc8633cb19840995984c",
- "age": 30,
- "name": "Yates Avery",
- "gender": "male",
- "company": "DIGINETIC",
- "email": "yatesavery@diginetic.com",
- "phone": "+1 (813) 587-3611"
- },
- {
- "_id": "55d2fc8677d1a1c749d498eb",
- "age": 24,
- "name": "Hodges Langley",
- "gender": "male",
- "company": "QUOTEZART",
- "email": "hodgeslangley@quotezart.com",
- "phone": "+1 (857) 496-3905"
- },
- {
- "_id": "55d2fc86f49e5ceca6ff241d",
- "age": 35,
- "name": "Serrano Bartlett",
- "gender": "male",
- "company": "EXOSWITCH",
- "email": "serranobartlett@exoswitch.com",
- "phone": "+1 (809) 421-3677"
- },
- {
- "_id": "55d2fc86cd4921dcf0316691",
- "age": 28,
- "name": "Faye Wood",
- "gender": "female",
- "company": "EXOTERIC",
- "email": "fayewood@exoteric.com",
- "phone": "+1 (840) 417-2329"
- },
- {
- "_id": "55d2fc8697911f7ca9adfe37",
- "age": 38,
- "name": "Jamie Jennings",
- "gender": "female",
- "company": "SURETECH",
- "email": "jamiejennings@suretech.com",
- "phone": "+1 (945) 599-3768"
- },
- {
- "_id": "55d2fc8614e0225c06b40348",
- "age": 34,
- "name": "Levy Sellers",
- "gender": "male",
- "company": "STELAECOR",
- "email": "levysellers@stelaecor.com",
- "phone": "+1 (805) 519-2578"
- },
- {
- "_id": "55d2fc8635986d3994af8adc",
- "age": 36,
- "name": "Kelsey Montgomery",
- "gender": "female",
- "company": "IMANT",
- "email": "kelseymontgomery@imant.com",
- "phone": "+1 (894) 555-3420"
- },
- {
- "_id": "55d2fc8624dfa620d7b8a991",
- "age": 33,
- "name": "Rush Gates",
- "gender": "male",
- "company": "DIGIAL",
- "email": "rushgates@digial.com",
- "phone": "+1 (891) 477-2651"
- },
- {
- "_id": "55d2fc862d52fe806312e6dd",
- "age": 40,
- "name": "Holloway Gay",
- "gender": "male",
- "company": "EARTHMARK",
- "email": "hollowaygay@earthmark.com",
- "phone": "+1 (811) 540-3123"
- },
- {
- "_id": "55d2fc86a168313cea778ac0",
- "age": 20,
- "name": "Cotton Jackson",
- "gender": "male",
- "company": "ZOLARITY",
- "email": "cottonjackson@zolarity.com",
- "phone": "+1 (980) 445-3468"
- },
- {
- "_id": "55d2fc86577d2794043213ea",
- "age": 38,
- "name": "Lakeisha Blanchard",
- "gender": "female",
- "company": "SPEEDBOLT",
- "email": "lakeishablanchard@speedbolt.com",
- "phone": "+1 (839) 406-2400"
- },
- {
- "_id": "55d2fc8609e2760d5cc298f1",
- "age": 39,
- "name": "Alford Church",
- "gender": "male",
- "company": "GADTRON",
- "email": "alfordchurch@gadtron.com",
- "phone": "+1 (869) 400-2097"
- },
- {
- "_id": "55d2fc867e4a904c96668e08",
- "age": 30,
- "name": "Collins Carlson",
- "gender": "male",
- "company": "EVEREST",
- "email": "collinscarlson@everest.com",
- "phone": "+1 (944) 580-3905"
- },
- {
- "_id": "55d2fc86ddb3ea916627267a",
- "age": 33,
- "name": "Cain Hester",
- "gender": "male",
- "company": "IMMUNICS",
- "email": "cainhester@immunics.com",
- "phone": "+1 (899) 586-2934"
- },
- {
- "_id": "55d2fc86ffaa0a8952d1a400",
- "age": 23,
- "name": "Mia Baird",
- "gender": "female",
- "company": "NIPAZ",
- "email": "miabaird@nipaz.com",
- "phone": "+1 (940) 569-2850"
- },
- {
- "_id": "55d2fc865f259364ad5b4fff",
- "age": 25,
- "name": "Ramona Ewing",
- "gender": "female",
- "company": "COMTEST",
- "email": "ramonaewing@comtest.com",
- "phone": "+1 (879) 546-2754"
- },
- {
- "_id": "55d2fc862d6af75d6794bef5",
- "age": 34,
- "name": "Delacruz Goodwin",
- "gender": "male",
- "company": "SLOGANAUT",
- "email": "delacruzgoodwin@sloganaut.com",
- "phone": "+1 (928) 477-2688"
- },
- {
- "_id": "55d2fc86e34b19d6fd2ae261",
- "age": 38,
- "name": "Mcleod Moody",
- "gender": "male",
- "company": "ECRAZE",
- "email": "mcleodmoody@ecraze.com",
- "phone": "+1 (989) 598-3350"
- },
- {
- "_id": "55d2fc8608e305ebd55e0bac",
- "age": 34,
- "name": "Maddox Calhoun",
- "gender": "male",
- "company": "TELEPARK",
- "email": "maddoxcalhoun@telepark.com",
- "phone": "+1 (815) 593-3540"
- },
- {
- "_id": "55d2fc869e175ca83d7d6597",
- "age": 36,
- "name": "Cora Dale",
- "gender": "female",
- "company": "ZILLACTIC",
- "email": "coradale@zillactic.com",
- "phone": "+1 (866) 545-3632"
- },
- {
- "_id": "55d2fc861968b039322cb743",
- "age": 27,
- "name": "Knapp Miranda",
- "gender": "male",
- "company": "TOYLETRY",
- "email": "knappmiranda@toyletry.com",
- "phone": "+1 (835) 591-3111"
- },
- {
- "_id": "55d2fc86423f7b5a304d2175",
- "age": 32,
- "name": "Ida Petersen",
- "gender": "female",
- "company": "BILLMED",
- "email": "idapetersen@billmed.com",
- "phone": "+1 (898) 492-2148"
- },
- {
- "_id": "55d2fc862cfd92eb67375bba",
- "age": 37,
- "name": "Concepcion Wilcox",
- "gender": "female",
- "company": "MAXEMIA",
- "email": "concepcionwilcox@maxemia.com",
- "phone": "+1 (812) 516-2631"
- },
- {
- "_id": "55d2fc8695ffe246079f8f0c",
- "age": 40,
- "name": "Corine Daniel",
- "gender": "female",
- "company": "MEDCOM",
- "email": "corinedaniel@medcom.com",
- "phone": "+1 (991) 483-2257"
- },
- {
- "_id": "55d2fc861f1ff641b3aa7ee5",
- "age": 31,
- "name": "Latasha Byers",
- "gender": "female",
- "company": "RUGSTARS",
- "email": "latashabyers@rugstars.com",
- "phone": "+1 (817) 542-3231"
- },
- {
- "_id": "55d2fc86724fbfd025371582",
- "age": 31,
- "name": "Gayle Barrett",
- "gender": "female",
- "company": "PARAGONIA",
- "email": "gaylebarrett@paragonia.com",
- "phone": "+1 (870) 547-2454"
- },
- {
- "_id": "55d2fc869add6e70699650fa",
- "age": 40,
- "name": "Angelina Tyler",
- "gender": "female",
- "company": "VIRVA",
- "email": "angelinatyler@virva.com",
- "phone": "+1 (960) 425-3784"
- },
- {
- "_id": "55d2fc864c12d18424ac35be",
- "age": 27,
- "name": "Ratliff Franks",
- "gender": "male",
- "company": "CEMENTION",
- "email": "ratlifffranks@cemention.com",
- "phone": "+1 (958) 424-2396"
- },
- {
- "_id": "55d2fc86bad0be82f6e2f83b",
- "age": 40,
- "name": "Landry Zimmerman",
- "gender": "male",
- "company": "JETSILK",
- "email": "landryzimmerman@jetsilk.com",
- "phone": "+1 (947) 573-2755"
- },
- {
- "_id": "55d2fc86b56ff40ff0ed70e3",
- "age": 23,
- "name": "Greta West",
- "gender": "female",
- "company": "UBERLUX",
- "email": "gretawest@uberlux.com",
- "phone": "+1 (995) 542-3886"
- },
- {
- "_id": "55d2fc8667dfd03049bf08eb",
- "age": 30,
- "name": "Camacho Nelson",
- "gender": "male",
- "company": "KYAGORO",
- "email": "camachonelson@kyagoro.com",
- "phone": "+1 (881) 500-3970"
- },
- {
- "_id": "55d2fc865458ecf3d2995a63",
- "age": 36,
- "name": "June Turner",
- "gender": "female",
- "company": "RECOGNIA",
- "email": "juneturner@recognia.com",
- "phone": "+1 (976) 466-2777"
- },
- {
- "_id": "55d2fc8682f4304f0889c829",
- "age": 31,
- "name": "Mckinney Stark",
- "gender": "male",
- "company": "OPTICOM",
- "email": "mckinneystark@opticom.com",
- "phone": "+1 (951) 500-3946"
- },
- {
- "_id": "55d2fc86ff8211995849d831",
- "age": 20,
- "name": "Hammond Fletcher",
- "gender": "male",
- "company": "ERSUM",
- "email": "hammondfletcher@ersum.com",
- "phone": "+1 (974) 541-3273"
- },
- {
- "_id": "55d2fc86a9792a08912bdb8e",
- "age": 23,
- "name": "White Fischer",
- "gender": "male",
- "company": "REALMO",
- "email": "whitefischer@realmo.com",
- "phone": "+1 (963) 533-2428"
- },
- {
- "_id": "55d2fc86c5ba8287455030be",
- "age": 36,
- "name": "Kimberly Mcguire",
- "gender": "female",
- "company": "TETAK",
- "email": "kimberlymcguire@tetak.com",
- "phone": "+1 (846) 410-3414"
- },
- {
- "_id": "55d2fc862a665bca942115f3",
- "age": 35,
- "name": "Sara Hurst",
- "gender": "female",
- "company": "FORTEAN",
- "email": "sarahurst@fortean.com",
- "phone": "+1 (857) 530-3627"
- },
- {
- "_id": "55d2fc86b72bee240f10055e",
- "age": 29,
- "name": "Chandler English",
- "gender": "male",
- "company": "PAPRICUT",
- "email": "chandlerenglish@papricut.com",
- "phone": "+1 (978) 582-2348"
- },
- {
- "_id": "55d2fc861c2bccedeac29892",
- "age": 29,
- "name": "Waters Riley",
- "gender": "male",
- "company": "ECSTASIA",
- "email": "watersriley@ecstasia.com",
- "phone": "+1 (842) 579-3426"
- },
- {
- "_id": "55d2fc86526f36994de2038a",
- "age": 34,
- "name": "Wood Gomez",
- "gender": "male",
- "company": "ASSITIA",
- "email": "woodgomez@assitia.com",
- "phone": "+1 (954) 565-2413"
- },
- {
- "_id": "55d2fc86bec8fe1e60977c9c",
- "age": 31,
- "name": "Fields Decker",
- "gender": "male",
- "company": "EMERGENT",
- "email": "fieldsdecker@emergent.com",
- "phone": "+1 (992) 489-3712"
- },
- {
- "_id": "55d2fc868b903951ddd71703",
- "age": 28,
- "name": "Barry Woods",
- "gender": "male",
- "company": "OZEAN",
- "email": "barrywoods@ozean.com",
- "phone": "+1 (885) 433-3285"
- },
- {
- "_id": "55d2fc86ca3984177237f17e",
- "age": 29,
- "name": "Whitfield Higgins",
- "gender": "male",
- "company": "PEARLESEX",
- "email": "whitfieldhiggins@pearlesex.com",
- "phone": "+1 (869) 468-3186"
- },
- {
- "_id": "55d2fc8678dd83bf6cc16648",
- "age": 27,
- "name": "Haynes Mills",
- "gender": "male",
- "company": "ZOARERE",
- "email": "haynesmills@zoarere.com",
- "phone": "+1 (886) 576-3206"
- },
- {
- "_id": "55d2fc86b6ba36d7927b8765",
- "age": 27,
- "name": "Kellie Hurley",
- "gender": "female",
- "company": "GYNKO",
- "email": "kelliehurley@gynko.com",
- "phone": "+1 (844) 548-2894"
- },
- {
- "_id": "55d2fc869adb64b23212bdfc",
- "age": 30,
- "name": "Brandi Shields",
- "gender": "female",
- "company": "KENGEN",
- "email": "brandishields@kengen.com",
- "phone": "+1 (947) 447-3081"
- },
- {
- "_id": "55d2fc8617e038558bbd0e5f",
- "age": 22,
- "name": "Malinda Gordon",
- "gender": "female",
- "company": "QUILCH",
- "email": "malindagordon@quilch.com",
- "phone": "+1 (945) 466-2414"
- },
- {
- "_id": "55d2fc8614756992c50aabfd",
- "age": 30,
- "name": "Wooten Mcknight",
- "gender": "male",
- "company": "APPLIDECK",
- "email": "wootenmcknight@applideck.com",
- "phone": "+1 (994) 416-2156"
- },
- {
- "_id": "55d2fc86b44fbdb8c8ea3a67",
- "age": 36,
- "name": "Mona Thomas",
- "gender": "female",
- "company": "KROG",
- "email": "monathomas@krog.com",
- "phone": "+1 (924) 423-3381"
- },
- {
- "_id": "55d2fc86ded545b6b4f5e536",
- "age": 22,
- "name": "Bates Cole",
- "gender": "male",
- "company": "DIGIRANG",
- "email": "batescole@digirang.com",
- "phone": "+1 (956) 409-2471"
- },
- {
- "_id": "55d2fc864abd3a5951c8e07c",
- "age": 33,
- "name": "Shirley Potts",
- "gender": "female",
- "company": "OMATOM",
- "email": "shirleypotts@omatom.com",
- "phone": "+1 (804) 496-2921"
- },
- {
- "_id": "55d2fc864e3992c902987b9c",
- "age": 22,
- "name": "Adrian Branch",
- "gender": "female",
- "company": "MULTIFLEX",
- "email": "adrianbranch@multiflex.com",
- "phone": "+1 (817) 499-3955"
- },
- {
- "_id": "55d2fc8679037ccc9d0d84d0",
- "age": 25,
- "name": "Deanne Rosa",
- "gender": "female",
- "company": "QUONATA",
- "email": "deannerosa@quonata.com",
- "phone": "+1 (896) 463-2190"
- },
- {
- "_id": "55d2fc869ec47f3f9745bcbc",
- "age": 28,
- "name": "Sherrie Bowers",
- "gender": "female",
- "company": "GOLISTIC",
- "email": "sherriebowers@golistic.com",
- "phone": "+1 (854) 539-3836"
- },
- {
- "_id": "55d2fc86c953130389da55f9",
- "age": 21,
- "name": "Sharp Douglas",
- "gender": "male",
- "company": "CHILLIUM",
- "email": "sharpdouglas@chillium.com",
- "phone": "+1 (999) 513-3550"
- },
- {
- "_id": "55d2fc86d42d710fef2a7781",
- "age": 22,
- "name": "Sandy Dillard",
- "gender": "female",
- "company": "PHARMACON",
- "email": "sandydillard@pharmacon.com",
- "phone": "+1 (844) 433-2832"
- },
- {
- "_id": "55d2fc86aa4130e6998a333b",
- "age": 20,
- "name": "Naomi Willis",
- "gender": "female",
- "company": "SAVVY",
- "email": "naomiwillis@savvy.com",
- "phone": "+1 (826) 499-3221"
- },
- {
- "_id": "55d2fc869c2c97145040281b",
- "age": 38,
- "name": "Rivera Stone",
- "gender": "male",
- "company": "ORBIXTAR",
- "email": "riverastone@orbixtar.com",
- "phone": "+1 (994) 439-3810"
- },
- {
- "_id": "55d2fc86e7165c13cd5905c1",
- "age": 22,
- "name": "Oliver Day",
- "gender": "male",
- "company": "PORTALIS",
- "email": "oliverday@portalis.com",
- "phone": "+1 (844) 464-2363"
- },
- {
- "_id": "55d2fc86b6b619b4d04c7640",
- "age": 39,
- "name": "Rachael Owens",
- "gender": "female",
- "company": "NURALI",
- "email": "rachaelowens@nurali.com",
- "phone": "+1 (856) 418-3617"
- },
- {
- "_id": "55d2fc865f2612144e6f27e6",
- "age": 30,
- "name": "Winifred Molina",
- "gender": "female",
- "company": "NITRACYR",
- "email": "winifredmolina@nitracyr.com",
- "phone": "+1 (881) 417-3559"
- },
- {
- "_id": "55d2fc86c38ab2f341eb9717",
- "age": 33,
- "name": "Helen Callahan",
- "gender": "female",
- "company": "BOLAX",
- "email": "helencallahan@bolax.com",
- "phone": "+1 (929) 407-3095"
- },
- {
- "_id": "55d2fc86e6aa094f47df5373",
- "age": 32,
- "name": "Leblanc Christensen",
- "gender": "male",
- "company": "LIQUIDOC",
- "email": "leblancchristensen@liquidoc.com",
- "phone": "+1 (878) 568-2054"
- },
- {
- "_id": "55d2fc86b297912d153c4e8f",
- "age": 31,
- "name": "Hill Robbins",
- "gender": "male",
- "company": "QUANTALIA",
- "email": "hillrobbins@quantalia.com",
- "phone": "+1 (826) 430-2750"
- },
- {
- "_id": "55d2fc86e776e4075d7df74e",
- "age": 36,
- "name": "Tabitha Whitley",
- "gender": "female",
- "company": "ZILLIDIUM",
- "email": "tabithawhitley@zillidium.com",
- "phone": "+1 (838) 516-3637"
- },
- {
- "_id": "55d2fc86197a382bbf34e81f",
- "age": 36,
- "name": "May Pearson",
- "gender": "male",
- "company": "RODEOMAD",
- "email": "maypearson@rodeomad.com",
- "phone": "+1 (854) 429-3462"
- },
- {
- "_id": "55d2fc863ade7d3517aed2c6",
- "age": 28,
- "name": "Alvarez Austin",
- "gender": "male",
- "company": "CUBIX",
- "email": "alvarezaustin@cubix.com",
- "phone": "+1 (847) 594-3735"
- },
- {
- "_id": "55d2fc86b158d5d260362ac4",
- "age": 31,
- "name": "Misty Shepard",
- "gender": "female",
- "company": "COMVEYER",
- "email": "mistyshepard@comveyer.com",
- "phone": "+1 (901) 567-3881"
- },
- {
- "_id": "55d2fc8646bce5646a0b5258",
- "age": 22,
- "name": "Yvette Hensley",
- "gender": "female",
- "company": "MYOPIUM",
- "email": "yvettehensley@myopium.com",
- "phone": "+1 (890) 456-2157"
- },
- {
- "_id": "55d2fc86c362f848f08340c2",
- "age": 36,
- "name": "Hernandez Rowe",
- "gender": "male",
- "company": "EARTHPLEX",
- "email": "hernandezrowe@earthplex.com",
- "phone": "+1 (807) 502-2308"
- },
- {
- "_id": "55d2fc8640a621a6f035ce8d",
- "age": 39,
- "name": "Maura Harper",
- "gender": "female",
- "company": "ROBOID",
- "email": "mauraharper@roboid.com",
- "phone": "+1 (927) 506-2290"
- },
- {
- "_id": "55d2fc86965968be6314d56f",
- "age": 20,
- "name": "Luisa Gardner",
- "gender": "female",
- "company": "WAAB",
- "email": "luisagardner@waab.com",
- "phone": "+1 (964) 514-2189"
- },
- {
- "_id": "55d2fc86e12b5b70fffd430a",
- "age": 36,
- "name": "Christa Bradley",
- "gender": "female",
- "company": "FURNIGEER",
- "email": "christabradley@furnigeer.com",
- "phone": "+1 (871) 587-3404"
- },
- {
- "_id": "55d2fc86153d11b40a9bf8bc",
- "age": 26,
- "name": "Murphy Fleming",
- "gender": "male",
- "company": "COLLAIRE",
- "email": "murphyfleming@collaire.com",
- "phone": "+1 (909) 598-3130"
- },
- {
- "_id": "55d2fc863ec1e4fc29e5ce50",
- "age": 28,
- "name": "Bobbi Harrington",
- "gender": "female",
- "company": "MEDIFAX",
- "email": "bobbiharrington@medifax.com",
- "phone": "+1 (825) 598-2607"
- },
- {
- "_id": "55d2fc86f4b17262ea0129c6",
- "age": 40,
- "name": "Paige Flynn",
- "gender": "female",
- "company": "PULZE",
- "email": "paigeflynn@pulze.com",
- "phone": "+1 (956) 529-3295"
- },
- {
- "_id": "55d2fc861c8dc17cb598e70d",
- "age": 21,
- "name": "Nina Moon",
- "gender": "female",
- "company": "ZOLAVO",
- "email": "ninamoon@zolavo.com",
- "phone": "+1 (863) 540-3993"
- },
- {
- "_id": "55d2fc869d8ee9d95ab9fee4",
- "age": 36,
- "name": "Shauna Mckay",
- "gender": "female",
- "company": "LUNCHPOD",
- "email": "shaunamckay@lunchpod.com",
- "phone": "+1 (879) 435-3179"
- },
- {
- "_id": "55d2fc86a03f430c5e56194b",
- "age": 36,
- "name": "Amie Nicholson",
- "gender": "female",
- "company": "LETPRO",
- "email": "amienicholson@letpro.com",
- "phone": "+1 (839) 600-3014"
- },
- {
- "_id": "55d2fc86062b4615153832f6",
- "age": 31,
- "name": "Pennington Whitney",
- "gender": "male",
- "company": "TRI@TRIBALOG",
- "email": "penningtonwhitney@tri@tribalog.com",
- "phone": "+1 (950) 487-3727"
- },
- {
- "_id": "55d2fc868849f1c7f4f80541",
- "age": 23,
- "name": "Gena Barton",
- "gender": "female",
- "company": "VORTEXACO",
- "email": "genabarton@vortexaco.com",
- "phone": "+1 (889) 515-2172"
- },
- {
- "_id": "55d2fc860c13e786f86024fd",
- "age": 27,
- "name": "Ashley Stephens",
- "gender": "female",
- "company": "ZENSUS",
- "email": "ashleystephens@zensus.com",
- "phone": "+1 (949) 525-3726"
- },
- {
- "_id": "55d2fc86cca3638bdc9c942c",
- "age": 38,
- "name": "Cherie Morgan",
- "gender": "female",
- "company": "HELIXO",
- "email": "cheriemorgan@helixo.com",
- "phone": "+1 (815) 514-2167"
- },
- {
- "_id": "55d2fc8630d769398c9a0788",
- "age": 31,
- "name": "Ann Wiggins",
- "gender": "female",
- "company": "NIXELT",
- "email": "annwiggins@nixelt.com",
- "phone": "+1 (878) 567-2808"
- },
- {
- "_id": "55d2fc86f3d0744abd99ee4a",
- "age": 36,
- "name": "Hinton Keller",
- "gender": "male",
- "company": "VENOFLEX",
- "email": "hintonkeller@venoflex.com",
- "phone": "+1 (978) 499-2652"
- },
- {
- "_id": "55d2fc86714b2f2f7f59ff69",
- "age": 32,
- "name": "Marsh Mullins",
- "gender": "male",
- "company": "ZIALACTIC",
- "email": "marshmullins@zialactic.com",
- "phone": "+1 (908) 537-2112"
- },
- {
- "_id": "55d2fc8644c73b5870be171c",
- "age": 28,
- "name": "Holland Underwood",
- "gender": "male",
- "company": "ZILLACON",
- "email": "hollandunderwood@zillacon.com",
- "phone": "+1 (968) 454-2162"
- },
- {
- "_id": "55d2fc8648b8691a6a646f9e",
- "age": 31,
- "name": "Beverly Oneal",
- "gender": "female",
- "company": "BYTREX",
- "email": "beverlyoneal@bytrex.com",
- "phone": "+1 (969) 522-2598"
- },
- {
- "_id": "55d2fc86b3e9627aa4f5f88a",
- "age": 24,
- "name": "Leanne Frazier",
- "gender": "female",
- "company": "HOPELI",
- "email": "leannefrazier@hopeli.com",
- "phone": "+1 (923) 532-3379"
- },
- {
- "_id": "55d2fc867bdc2935055e4595",
- "age": 31,
- "name": "Rhodes Cash",
- "gender": "male",
- "company": "PAPRIKUT",
- "email": "rhodescash@paprikut.com",
- "phone": "+1 (830) 507-2776"
- },
- {
- "_id": "55d2fc86543e21b2bc15201d",
- "age": 30,
- "name": "Cherry Bush",
- "gender": "male",
- "company": "PROGENEX",
- "email": "cherrybush@progenex.com",
- "phone": "+1 (935) 577-2984"
- },
- {
- "_id": "55d2fc8660c1a32dfdf4fe67",
- "age": 32,
- "name": "Jacobs Clark",
- "gender": "male",
- "company": "COMDOM",
- "email": "jacobsclark@comdom.com",
- "phone": "+1 (947) 434-2665"
- },
- {
- "_id": "55d2fc861641831257904d9c",
- "age": 37,
- "name": "Nell Mcmahon",
- "gender": "female",
- "company": "SLAMBDA",
- "email": "nellmcmahon@slambda.com",
- "phone": "+1 (831) 462-2693"
- },
- {
- "_id": "55d2fc86835340478ec889e2",
- "age": 37,
- "name": "Palmer Livingston",
- "gender": "male",
- "company": "DIGIGEN",
- "email": "palmerlivingston@digigen.com",
- "phone": "+1 (817) 443-2049"
- },
- {
- "_id": "55d2fc8697f9fd666529fa34",
- "age": 40,
- "name": "Ayala Schmidt",
- "gender": "male",
- "company": "EWAVES",
- "email": "ayalaschmidt@ewaves.com",
- "phone": "+1 (899) 576-2845"
- },
- {
- "_id": "55d2fc8682936b03c7c044de",
- "age": 26,
- "name": "Lynch Beck",
- "gender": "male",
- "company": "INDEXIA",
- "email": "lynchbeck@indexia.com",
- "phone": "+1 (942) 411-3724"
- },
- {
- "_id": "55d2fc86bb74729fe35b2bcc",
- "age": 20,
- "name": "Yang Hickman",
- "gender": "male",
- "company": "UXMOX",
- "email": "yanghickman@uxmox.com",
- "phone": "+1 (944) 554-2948"
- },
- {
- "_id": "55d2fc86bb04a1e5e39143b1",
- "age": 30,
- "name": "Andrews Lucas",
- "gender": "male",
- "company": "CIPROMOX",
- "email": "andrewslucas@cipromox.com",
- "phone": "+1 (942) 401-2756"
- },
- {
- "_id": "55d2fc86b862c1492a4c5bc1",
- "age": 34,
- "name": "Rosa Valdez",
- "gender": "female",
- "company": "ONTALITY",
- "email": "rosavaldez@ontality.com",
- "phone": "+1 (963) 414-3056"
- },
- {
- "_id": "55d2fc868ab9f2f25a46a850",
- "age": 30,
- "name": "Maria Caldwell",
- "gender": "female",
- "company": "ACRODANCE",
- "email": "mariacaldwell@acrodance.com",
- "phone": "+1 (963) 433-2398"
- },
- {
- "_id": "55d2fc868d206b4d99f1f0b2",
- "age": 36,
- "name": "Gilda Chase",
- "gender": "female",
- "company": "KOFFEE",
- "email": "gildachase@koffee.com",
- "phone": "+1 (980) 591-3955"
- },
- {
- "_id": "55d2fc86e0c5a2f031b4a0d9",
- "age": 24,
- "name": "Dejesus Pittman",
- "gender": "male",
- "company": "SLAX",
- "email": "dejesuspittman@slax.com",
- "phone": "+1 (819) 574-2826"
- },
- {
- "_id": "55d2fc868190178a9af16ec5",
- "age": 23,
- "name": "Valdez Gibson",
- "gender": "male",
- "company": "ELECTONIC",
- "email": "valdezgibson@electonic.com",
- "phone": "+1 (809) 520-3985"
- },
- {
- "_id": "55d2fc86d3bc3cf86e16bc5b",
- "age": 21,
- "name": "Aguilar Bird",
- "gender": "male",
- "company": "ULTRASURE",
- "email": "aguilarbird@ultrasure.com",
- "phone": "+1 (813) 455-3814"
- },
- {
- "_id": "55d2fc86701c49cc235f0b49",
- "age": 24,
- "name": "Bentley Mooney",
- "gender": "male",
- "company": "BEDLAM",
- "email": "bentleymooney@bedlam.com",
- "phone": "+1 (870) 530-2188"
- },
- {
- "_id": "55d2fc863fe6d9fc492a1ca5",
- "age": 28,
- "name": "Ruby Wooten",
- "gender": "female",
- "company": "MARKETOID",
- "email": "rubywooten@marketoid.com",
- "phone": "+1 (813) 470-3521"
- },
- {
- "_id": "55d2fc8622f489f721743001",
- "age": 28,
- "name": "Garrison Blevins",
- "gender": "male",
- "company": "KEENGEN",
- "email": "garrisonblevins@keengen.com",
- "phone": "+1 (974) 538-2989"
- },
- {
- "_id": "55d2fc863dc60d226c55ece7",
- "age": 33,
- "name": "Harper Tanner",
- "gender": "male",
- "company": "QABOOS",
- "email": "harpertanner@qaboos.com",
- "phone": "+1 (953) 406-3082"
- },
- {
- "_id": "55d2fc86fecd601439c2702e",
- "age": 32,
- "name": "Best Robles",
- "gender": "male",
- "company": "OCEANICA",
- "email": "bestrobles@oceanica.com",
- "phone": "+1 (815) 539-3097"
- },
- {
- "_id": "55d2fc86ba25530a2149beab",
- "age": 36,
- "name": "Marian Bradshaw",
- "gender": "female",
- "company": "XYQAG",
- "email": "marianbradshaw@xyqag.com",
- "phone": "+1 (928) 410-3218"
- },
- {
- "_id": "55d2fc867352b6b799d365e4",
- "age": 23,
- "name": "Whitley Oneil",
- "gender": "male",
- "company": "XURBAN",
- "email": "whitleyoneil@xurban.com",
- "phone": "+1 (802) 578-3671"
- },
- {
- "_id": "55d2fc865ee137dbdee5cde2",
- "age": 34,
- "name": "Ella Fox",
- "gender": "female",
- "company": "TUBESYS",
- "email": "ellafox@tubesys.com",
- "phone": "+1 (920) 524-3066"
- },
- {
- "_id": "55d2fc860cc159486a822879",
- "age": 30,
- "name": "Farmer Castro",
- "gender": "male",
- "company": "QNEKT",
- "email": "farmercastro@qnekt.com",
- "phone": "+1 (866) 578-2968"
- },
- {
- "_id": "55d2fc863b57eefc3015d373",
- "age": 28,
- "name": "Guy Cochran",
- "gender": "male",
- "company": "VICON",
- "email": "guycochran@vicon.com",
- "phone": "+1 (840) 567-2191"
- },
- {
- "_id": "55d2fc863df7dfda22e99029",
- "age": 32,
- "name": "Leach Rocha",
- "gender": "male",
- "company": "DANJA",
- "email": "leachrocha@danja.com",
- "phone": "+1 (971) 589-3164"
- },
- {
- "_id": "55d2fc86aba3b9d7ce3f877c",
- "age": 36,
- "name": "Tanner Hayes",
- "gender": "male",
- "company": "TELEQUIET",
- "email": "tannerhayes@telequiet.com",
- "phone": "+1 (813) 526-2989"
- },
- {
- "_id": "55d2fc862cd6fb84f734fa0e",
- "age": 30,
- "name": "Keith Maldonado",
- "gender": "male",
- "company": "MAGNEATO",
- "email": "keithmaldonado@magneato.com",
- "phone": "+1 (997) 419-3200"
- },
- {
- "_id": "55d2fc8663d4dc1e43943f62",
- "age": 29,
- "name": "Winnie Harrell",
- "gender": "female",
- "company": "FRENEX",
- "email": "winnieharrell@frenex.com",
- "phone": "+1 (966) 565-2447"
- },
- {
- "_id": "55d2fc86b57f9312b0d28a1d",
- "age": 28,
- "name": "Sandoval Garza",
- "gender": "male",
- "company": "INTERLOO",
- "email": "sandovalgarza@interloo.com",
- "phone": "+1 (972) 597-3431"
- },
- {
- "_id": "55d2fc86a356d194d285d160",
- "age": 23,
- "name": "Lina Dejesus",
- "gender": "female",
- "company": "ORONOKO",
- "email": "linadejesus@oronoko.com",
- "phone": "+1 (910) 560-2515"
- },
- {
- "_id": "55d2fc862f4cd754495f93c7",
- "age": 30,
- "name": "Jana Spence",
- "gender": "female",
- "company": "ZILLACOM",
- "email": "janaspence@zillacom.com",
- "phone": "+1 (994) 436-2023"
- },
- {
- "_id": "55d2fc869b25329fae4936d0",
- "age": 32,
- "name": "Mcdowell Fisher",
- "gender": "male",
- "company": "GYNK",
- "email": "mcdowellfisher@gynk.com",
- "phone": "+1 (941) 587-3569"
- },
- {
- "_id": "55d2fc866b52b90a3758bdd3",
- "age": 28,
- "name": "Farley Bernard",
- "gender": "male",
- "company": "NETROPIC",
- "email": "farleybernard@netropic.com",
- "phone": "+1 (856) 540-2658"
- },
- {
- "_id": "55d2fc864086901eaeb80443",
- "age": 25,
- "name": "Lorna Howe",
- "gender": "female",
- "company": "ISOSWITCH",
- "email": "lornahowe@isoswitch.com",
- "phone": "+1 (851) 432-3160"
- },
- {
- "_id": "55d2fc86b4ac38891f11340b",
- "age": 25,
- "name": "English Watts",
- "gender": "male",
- "company": "INFOTRIPS",
- "email": "englishwatts@infotrips.com",
- "phone": "+1 (942) 481-2578"
- },
- {
- "_id": "55d2fc86e0d047d4eb3c224f",
- "age": 35,
- "name": "Burch Howell",
- "gender": "male",
- "company": "FANFARE",
- "email": "burchhowell@fanfare.com",
- "phone": "+1 (986) 507-2725"
- },
- {
- "_id": "55d2fc86330a8dab2ddbc0c4",
- "age": 39,
- "name": "Hudson Bender",
- "gender": "male",
- "company": "ENORMO",
- "email": "hudsonbender@enormo.com",
- "phone": "+1 (982) 553-3993"
- },
- {
- "_id": "55d2fc8600bb27f4ba215be8",
- "age": 30,
- "name": "Mcdonald Whitehead",
- "gender": "male",
- "company": "SENMAO",
- "email": "mcdonaldwhitehead@senmao.com",
- "phone": "+1 (837) 449-3264"
- },
- {
- "_id": "55d2fc8683787d8b7b400408",
- "age": 31,
- "name": "Hope Holden",
- "gender": "female",
- "company": "EVENTIX",
- "email": "hopeholden@eventix.com",
- "phone": "+1 (888) 436-2921"
- },
- {
- "_id": "55d2fc86cd7d2a5c962d2c05",
- "age": 36,
- "name": "Suarez Mejia",
- "gender": "male",
- "company": "BUZZWORKS",
- "email": "suarezmejia@buzzworks.com",
- "phone": "+1 (919) 526-3966"
- },
- {
- "_id": "55d2fc8612bf58c9b2d953cf",
- "age": 27,
- "name": "Michele Little",
- "gender": "female",
- "company": "VINCH",
- "email": "michelelittle@vinch.com",
- "phone": "+1 (817) 414-2165"
- },
- {
- "_id": "55d2fc864a8103126f905972",
- "age": 25,
- "name": "Patrick Cooke",
- "gender": "male",
- "company": "BEDDER",
- "email": "patrickcooke@bedder.com",
- "phone": "+1 (993) 587-2086"
- },
- {
- "_id": "55d2fc865ddf784cac1f023c",
- "age": 31,
- "name": "Holcomb Beasley",
- "gender": "male",
- "company": "TECHTRIX",
- "email": "holcombbeasley@techtrix.com",
- "phone": "+1 (879) 458-3507"
- },
- {
- "_id": "55d2fc86e27a28e9e9b0d232",
- "age": 34,
- "name": "Catalina Donovan",
- "gender": "female",
- "company": "FILODYNE",
- "email": "catalinadonovan@filodyne.com",
- "phone": "+1 (818) 542-2296"
- },
- {
- "_id": "55d2fc861801cbac57fa3186",
- "age": 21,
- "name": "Leslie Bryan",
- "gender": "female",
- "company": "LUXURIA",
- "email": "lesliebryan@luxuria.com",
- "phone": "+1 (917) 590-3272"
- },
- {
- "_id": "55d2fc86d3aa760444ec40cc",
- "age": 37,
- "name": "Hobbs Noel",
- "gender": "male",
- "company": "ZILLA",
- "email": "hobbsnoel@zilla.com",
- "phone": "+1 (917) 430-3792"
- },
- {
- "_id": "55d2fc86f53d0267e33ddb67",
- "age": 38,
- "name": "Nunez Meyers",
- "gender": "male",
- "company": "ENTROFLEX",
- "email": "nunezmeyers@entroflex.com",
- "phone": "+1 (940) 419-3943"
- },
- {
- "_id": "55d2fc867805cf4262e648a9",
- "age": 37,
- "name": "Sonya Sloan",
- "gender": "female",
- "company": "SURELOGIC",
- "email": "sonyasloan@surelogic.com",
- "phone": "+1 (924) 561-3268"
- },
- {
- "_id": "55d2fc86a3b756eaaef9f9fa",
- "age": 31,
- "name": "Angeline Sargent",
- "gender": "female",
- "company": "QUIZMO",
- "email": "angelinesargent@quizmo.com",
- "phone": "+1 (952) 539-3859"
- },
- {
- "_id": "55d2fc860f0e4be242c866a3",
- "age": 40,
- "name": "Norris Webb",
- "gender": "male",
- "company": "ZENCO",
- "email": "norriswebb@zenco.com",
- "phone": "+1 (834) 527-2399"
- },
- {
- "_id": "55d2fc86b2da030fb755d74c",
- "age": 38,
- "name": "Wise Bonner",
- "gender": "male",
- "company": "KINETICA",
- "email": "wisebonner@kinetica.com",
- "phone": "+1 (938) 416-3537"
- },
- {
- "_id": "55d2fc8699036f35ee214843",
- "age": 25,
- "name": "Imogene Blankenship",
- "gender": "female",
- "company": "POLARAX",
- "email": "imogeneblankenship@polarax.com",
- "phone": "+1 (877) 476-3735"
- },
- {
- "_id": "55d2fc86009b5a1658986a92",
- "age": 27,
- "name": "Silva Schneider",
- "gender": "male",
- "company": "MINGA",
- "email": "silvaschneider@minga.com",
- "phone": "+1 (884) 420-2111"
- },
- {
- "_id": "55d2fc86e3dcb6d4996e9813",
- "age": 40,
- "name": "Lawanda Cortez",
- "gender": "female",
- "company": "HOMETOWN",
- "email": "lawandacortez@hometown.com",
- "phone": "+1 (946) 525-3826"
- },
- {
- "_id": "55d2fc8641977ef422e73176",
- "age": 40,
- "name": "Clements Waters",
- "gender": "male",
- "company": "FLEETMIX",
- "email": "clementswaters@fleetmix.com",
- "phone": "+1 (973) 523-2395"
- },
- {
- "_id": "55d2fc869d0f5363ad055935",
- "age": 20,
- "name": "Ofelia Gilbert",
- "gender": "female",
- "company": "ECRATER",
- "email": "ofeliagilbert@ecrater.com",
- "phone": "+1 (828) 404-2646"
- },
- {
- "_id": "55d2fc86c39b876162269895",
- "age": 23,
- "name": "Valenzuela Carney",
- "gender": "male",
- "company": "HYDROCOM",
- "email": "valenzuelacarney@hydrocom.com",
- "phone": "+1 (842) 566-3650"
- },
- {
- "_id": "55d2fc86546c31933b02dd85",
- "age": 28,
- "name": "Wells Santana",
- "gender": "male",
- "company": "ZIDOX",
- "email": "wellssantana@zidox.com",
- "phone": "+1 (886) 527-2963"
- },
- {
- "_id": "55d2fc86a981c3741ad50f8c",
- "age": 29,
- "name": "Karla Carroll",
- "gender": "female",
- "company": "MAGNEMO",
- "email": "karlacarroll@magnemo.com",
- "phone": "+1 (922) 418-3361"
- },
- {
- "_id": "55d2fc861054327ef76378e3",
- "age": 29,
- "name": "Juliet Butler",
- "gender": "female",
- "company": "ORBAXTER",
- "email": "julietbutler@orbaxter.com",
- "phone": "+1 (838) 554-2269"
- },
- {
- "_id": "55d2fc868120c8a8e4eb9149",
- "age": 26,
- "name": "Lisa Copeland",
- "gender": "female",
- "company": "SOFTMICRO",
- "email": "lisacopeland@softmicro.com",
- "phone": "+1 (915) 577-2302"
- },
- {
- "_id": "55d2fc86b0eb908d67787f43",
- "age": 37,
- "name": "Mcmahon Spencer",
- "gender": "male",
- "company": "BOILCAT",
- "email": "mcmahonspencer@boilcat.com",
- "phone": "+1 (871) 501-2558"
- },
- {
- "_id": "55d2fc860c0b6f5fb520ad2a",
- "age": 38,
- "name": "Campbell Baxter",
- "gender": "male",
- "company": "DREAMIA",
- "email": "campbellbaxter@dreamia.com",
- "phone": "+1 (858) 524-3012"
- },
- {
- "_id": "55d2fc86460508fbed08e924",
- "age": 23,
- "name": "Lindsay Sharp",
- "gender": "male",
- "company": "SYBIXTEX",
- "email": "lindsaysharp@sybixtex.com",
- "phone": "+1 (974) 573-3073"
- },
- {
- "_id": "55d2fc860bf5295ce5679523",
- "age": 35,
- "name": "Kathrine Browning",
- "gender": "female",
- "company": "LUNCHPAD",
- "email": "kathrinebrowning@lunchpad.com",
- "phone": "+1 (922) 458-2466"
- },
- {
- "_id": "55d2fc86d2311e0208cd17a2",
- "age": 35,
- "name": "Alice Faulkner",
- "gender": "female",
- "company": "PLEXIA",
- "email": "alicefaulkner@plexia.com",
- "phone": "+1 (939) 419-3621"
- },
- {
- "_id": "55d2fc86e85116cc8d6c0d70",
- "age": 32,
- "name": "Ford Mclean",
- "gender": "male",
- "company": "QUADEEBO",
- "email": "fordmclean@quadeebo.com",
- "phone": "+1 (974) 521-2540"
- },
- {
- "_id": "55d2fc86f60393147a3a8a07",
- "age": 29,
- "name": "Ollie Cannon",
- "gender": "female",
- "company": "RAMJOB",
- "email": "olliecannon@ramjob.com",
- "phone": "+1 (961) 497-3201"
- },
- {
- "_id": "55d2fc8661d02152a5ba425a",
- "age": 36,
- "name": "Calderon Vaughan",
- "gender": "male",
- "company": "DIGIQUE",
- "email": "calderonvaughan@digique.com",
- "phone": "+1 (912) 553-3902"
- },
- {
- "_id": "55d2fc86a55890c6ce345bf0",
- "age": 28,
- "name": "Warren Henry",
- "gender": "male",
- "company": "ZERBINA",
- "email": "warrenhenry@zerbina.com",
- "phone": "+1 (850) 464-3656"
- },
- {
- "_id": "55d2fc86ccead2741ea21e0e",
- "age": 21,
- "name": "Liliana York",
- "gender": "female",
- "company": "ANIXANG",
- "email": "lilianayork@anixang.com",
- "phone": "+1 (956) 403-2096"
- },
- {
- "_id": "55d2fc86d72dd184f6884371",
- "age": 33,
- "name": "Lora Alvarez",
- "gender": "female",
- "company": "BLURRYBUS",
- "email": "loraalvarez@blurrybus.com",
- "phone": "+1 (917) 457-2866"
- },
- {
- "_id": "55d2fc86fda0c180ccc9598a",
- "age": 22,
- "name": "Luna Ellis",
- "gender": "male",
- "company": "SLUMBERIA",
- "email": "lunaellis@slumberia.com",
- "phone": "+1 (878) 589-3511"
- },
- {
- "_id": "55d2fc860dd81b364fc1c2a9",
- "age": 30,
- "name": "Phoebe Chang",
- "gender": "female",
- "company": "OPTICON",
- "email": "phoebechang@opticon.com",
- "phone": "+1 (962) 559-3475"
- },
- {
- "_id": "55d2fc8657954cc73c166579",
- "age": 40,
- "name": "Anna Crane",
- "gender": "female",
- "company": "AQUAFIRE",
- "email": "annacrane@aquafire.com",
- "phone": "+1 (989) 567-3649"
- },
- {
- "_id": "55d2fc86d996f0f466a006c8",
- "age": 39,
- "name": "Matthews French",
- "gender": "male",
- "company": "CINESANCT",
- "email": "matthewsfrench@cinesanct.com",
- "phone": "+1 (896) 518-2965"
- },
- {
- "_id": "55d2fc8601aad1428aa65531",
- "age": 34,
- "name": "Hutchinson Ellison",
- "gender": "male",
- "company": "MOREGANIC",
- "email": "hutchinsonellison@moreganic.com",
- "phone": "+1 (860) 563-2707"
- },
- {
- "_id": "55d2fc86ec14a6c798e22d72",
- "age": 21,
- "name": "Gwen Russell",
- "gender": "female",
- "company": "COMVOY",
- "email": "gwenrussell@comvoy.com",
- "phone": "+1 (873) 468-2314"
- },
- {
- "_id": "55d2fc865123af00125fd9bd",
- "age": 22,
- "name": "Natalie Stuart",
- "gender": "female",
- "company": "MOMENTIA",
- "email": "nataliestuart@momentia.com",
- "phone": "+1 (908) 573-2177"
- },
- {
- "_id": "55d2fc8688af31f1e9ff0d20",
- "age": 28,
- "name": "Brianna Meyer",
- "gender": "female",
- "company": "VIASIA",
- "email": "briannameyer@viasia.com",
- "phone": "+1 (860) 475-3139"
- },
- {
- "_id": "55d2fc8687f0ff5daa16cbbd",
- "age": 28,
- "name": "Trisha Castillo",
- "gender": "female",
- "company": "CYCLONICA",
- "email": "trishacastillo@cyclonica.com",
- "phone": "+1 (869) 564-2957"
- },
- {
- "_id": "55d2fc863b1c51f11ce4e921",
- "age": 36,
- "name": "Powers Weeks",
- "gender": "male",
- "company": "BIZMATIC",
- "email": "powersweeks@bizmatic.com",
- "phone": "+1 (981) 464-3668"
- },
- {
- "_id": "55d2fc86d8f5d2bef6f84bba",
- "age": 23,
- "name": "Young Cabrera",
- "gender": "female",
- "company": "CINASTER",
- "email": "youngcabrera@cinaster.com",
- "phone": "+1 (897) 528-3924"
- },
- {
- "_id": "55d2fc86861238b57e2932fd",
- "age": 27,
- "name": "Maxine Rodgers",
- "gender": "female",
- "company": "CHORIZON",
- "email": "maxinerodgers@chorizon.com",
- "phone": "+1 (996) 449-2805"
- },
- {
- "_id": "55d2fc86fe5b2f6823cc295f",
- "age": 26,
- "name": "Davis Norris",
- "gender": "male",
- "company": "CORIANDER",
- "email": "davisnorris@coriander.com",
- "phone": "+1 (947) 512-2093"
- },
- {
- "_id": "55d2fc86862e7d0bba1ab524",
- "age": 25,
- "name": "Ericka Conner",
- "gender": "female",
- "company": "STRALOY",
- "email": "erickaconner@straloy.com",
- "phone": "+1 (922) 565-2956"
- },
- {
- "_id": "55d2fc8625bf91e39382ab4c",
- "age": 21,
- "name": "Payne Joyner",
- "gender": "male",
- "company": "OMNIGOG",
- "email": "paynejoyner@omnigog.com",
- "phone": "+1 (998) 521-3917"
- },
- {
- "_id": "55d2fc866835ee51ccea79bb",
- "age": 24,
- "name": "Fletcher Payne",
- "gender": "male",
- "company": "AMTAP",
- "email": "fletcherpayne@amtap.com",
- "phone": "+1 (991) 517-3798"
- },
- {
- "_id": "55d2fc863df3424f70db684c",
- "age": 38,
- "name": "Mosley Cobb",
- "gender": "male",
- "company": "HONOTRON",
- "email": "mosleycobb@honotron.com",
- "phone": "+1 (873) 593-2248"
- },
- {
- "_id": "55d2fc867c4ad9b233d15983",
- "age": 24,
- "name": "Webster Sandoval",
- "gender": "male",
- "company": "HOMELUX",
- "email": "webstersandoval@homelux.com",
- "phone": "+1 (967) 431-2940"
- },
- {
- "_id": "55d2fc8613bf2fe49b1a1f8c",
- "age": 36,
- "name": "Colon Mcgee",
- "gender": "male",
- "company": "ZAPPIX",
- "email": "colonmcgee@zappix.com",
- "phone": "+1 (806) 444-2451"
- },
- {
- "_id": "55d2fc8681a8ccebe8aacd93",
- "age": 32,
- "name": "Monique Logan",
- "gender": "female",
- "company": "CALLFLEX",
- "email": "moniquelogan@callflex.com",
- "phone": "+1 (957) 577-3780"
- },
- {
- "_id": "55d2fc868756d302f29fddb2",
- "age": 38,
- "name": "Stewart Ball",
- "gender": "male",
- "company": "NETPLODE",
- "email": "stewartball@netplode.com",
- "phone": "+1 (966) 435-2206"
- },
- {
- "_id": "55d2fc86457f4d474388d2c8",
- "age": 23,
- "name": "Montgomery Carter",
- "gender": "male",
- "company": "OLUCORE",
- "email": "montgomerycarter@olucore.com",
- "phone": "+1 (894) 556-2662"
- },
- {
- "_id": "55d2fc866da04e0d15b12b36",
- "age": 28,
- "name": "Brenda Mccoy",
- "gender": "female",
- "company": "AQUAZURE",
- "email": "brendamccoy@aquazure.com",
- "phone": "+1 (837) 483-3741"
- },
- {
- "_id": "55d2fc86e2a61a730a8d5c8f",
- "age": 34,
- "name": "Eddie Buchanan",
- "gender": "female",
- "company": "COGNICODE",
- "email": "eddiebuchanan@cognicode.com",
- "phone": "+1 (924) 479-3753"
- },
- {
- "_id": "55d2fc8616e7989042f61488",
- "age": 23,
- "name": "Eva Mendoza",
- "gender": "female",
- "company": "SOLGAN",
- "email": "evamendoza@solgan.com",
- "phone": "+1 (899) 522-3051"
- },
- {
- "_id": "55d2fc86152fd9e4c5471fd7",
- "age": 21,
- "name": "Dawson Medina",
- "gender": "male",
- "company": "AQUASSEUR",
- "email": "dawsonmedina@aquasseur.com",
- "phone": "+1 (877) 580-2295"
- },
- {
- "_id": "55d2fc86a3633b3a799a7811",
- "age": 34,
- "name": "Terrie Hobbs",
- "gender": "female",
- "company": "VORATAK",
- "email": "terriehobbs@voratak.com",
- "phone": "+1 (938) 511-2077"
- },
- {
- "_id": "55d2fc8665a05f05f07bb790",
- "age": 37,
- "name": "Iris Bishop",
- "gender": "female",
- "company": "INSURESYS",
- "email": "irisbishop@insuresys.com",
- "phone": "+1 (819) 415-3840"
- },
- {
- "_id": "55d2fc8799e7556a033b93f6",
- "age": 29,
- "name": "Estelle Grant",
- "gender": "female",
- "company": "ZOGAK",
- "email": "estellegrant@zogak.com",
- "phone": "+1 (854) 437-2898"
- },
- {
- "_id": "55d2fc87745c675e697af04c",
- "age": 30,
- "name": "Dianna Gonzalez",
- "gender": "female",
- "company": "PIVITOL",
- "email": "diannagonzalez@pivitol.com",
- "phone": "+1 (816) 545-3520"
- }
-]
diff --git a/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go
deleted file mode 100644
index 698dd332d..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package main
-
-import (
- "time"
-)
-
-import l4g "code.google.com/p/log4go"
-
-func main() {
- log := l4g.NewLogger()
- defer log.Close()
- log.AddFilter("stdout", l4g.DEBUG, l4g.NewConsoleLogWriter())
- log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02"))
-}
diff --git a/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go
deleted file mode 100644
index efd596aa6..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package main
-
-import (
- "bufio"
- "fmt"
- "io"
- "os"
- "time"
-)
-
-import l4g "code.google.com/p/log4go"
-
-const (
- filename = "flw.log"
-)
-
-func main() {
- // Get a new logger instance
- log := l4g.NewLogger()
-
- // Create a default logger that is logging messages of FINE or higher
- log.AddFilter("file", l4g.FINE, l4g.NewFileLogWriter(filename, false))
- log.Close()
-
- /* Can also specify manually via the following: (these are the defaults) */
- flw := l4g.NewFileLogWriter(filename, false)
- flw.SetFormat("[%D %T] [%L] (%S) %M")
- flw.SetRotate(false)
- flw.SetRotateSize(0)
- flw.SetRotateLines(0)
- flw.SetRotateDaily(false)
- log.AddFilter("file", l4g.FINE, flw)
-
- // Log some experimental messages
- log.Finest("Everything is created now (notice that I will not be printing to the file)")
- log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02"))
- log.Critical("Time to close out!")
-
- // Close the log
- log.Close()
-
- // Print what was logged to the file (yes, I know I'm skipping error checking)
- fd, _ := os.Open(filename)
- in := bufio.NewReader(fd)
- fmt.Print("Messages logged to file were: (line numbers not included)\n")
- for lineno := 1; ; lineno++ {
- line, err := in.ReadString('\n')
- if err == io.EOF {
- break
- }
- fmt.Printf("%3d:\t%s", lineno, line)
- }
- fd.Close()
-
- // Remove the file so it's not lying around
- os.Remove(filename)
-}
diff --git a/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go b/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go
deleted file mode 100644
index 83c80ad12..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "net"
- "os"
-)
-
-var (
- port = flag.String("p", "12124", "Port number to listen on")
-)
-
-func e(err error) {
- if err != nil {
- fmt.Printf("Erroring out: %s\n", err)
- os.Exit(1)
- }
-}
-
-func main() {
- flag.Parse()
-
- // Bind to the port
- bind, err := net.ResolveUDPAddr("0.0.0.0:" + *port)
- e(err)
-
- // Create listener
- listener, err := net.ListenUDP("udp", bind)
- e(err)
-
- fmt.Printf("Listening to port %s...\n", *port)
- for {
- // read into a new buffer
- buffer := make([]byte, 1024)
- _, _, err := listener.ReadFrom(buffer)
- e(err)
-
- // log to standard output
- fmt.Println(string(buffer))
- }
-}
diff --git a/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go
deleted file mode 100644
index 400b698ca..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package main
-
-import (
- "time"
-)
-
-import l4g "code.google.com/p/log4go"
-
-func main() {
- log := l4g.NewLogger()
- log.AddFilter("network", l4g.FINEST, l4g.NewSocketLogWriter("udp", "192.168.1.255:12124"))
-
- // Run `nc -u -l -p 12124` or similar before you run this to see the following message
- log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02"))
-
- // This makes sure the output stream buffer is written
- log.Close()
-}
diff --git a/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go b/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go
deleted file mode 100644
index 164c2add4..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package main
-
-import l4g "code.google.com/p/log4go"
-
-func main() {
- // Load the configuration (isn't this easy?)
- l4g.LoadConfiguration("example.xml")
-
- // And now we're ready!
- l4g.Finest("This will only go to those of you really cool UDP kids! If you change enabled=true.")
- l4g.Debug("Oh no! %d + %d = %d!", 2, 2, 2+2)
- l4g.Info("About that time, eh chaps?")
-}
diff --git a/vendor/github.com/alecthomas/log4go/examples/example.xml b/vendor/github.com/alecthomas/log4go/examples/example.xml
deleted file mode 100644
index e791278ce..000000000
--- a/vendor/github.com/alecthomas/log4go/examples/example.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<logging>
- <filter enabled="true">
- <tag>stdout</tag>
- <type>console</type>
- <!-- level is (:?FINEST|FINE|DEBUG|TRACE|INFO|WARNING|ERROR) -->
- <level>DEBUG</level>
- </filter>
- <filter enabled="true">
- <tag>file</tag>
- <type>file</type>
- <level>FINEST</level>
- <property name="filename">test.log</property>
- <!--
- %T - Time (15:04:05 MST)
- %t - Time (15:04)
- %D - Date (2006/01/02)
- %d - Date (01/02/06)
- %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR, CRIT)
- %S - Source
- %M - Message
- It ignores unknown format strings (and removes them)
- Recommended: "[%D %T] [%L] (%S) %M"
- -->
- <property name="format">[%D %T] [%L] (%S) %M</property>
- <property name="rotate">false</property> <!-- true enables log rotation, otherwise append -->
- <property name="maxsize">0M</property> <!-- \d+[KMG]? Suffixes are in terms of 2**10 -->
- <property name="maxlines">0K</property> <!-- \d+[KMG]? Suffixes are in terms of thousands -->
- <property name="daily">true</property> <!-- Automatically rotates when a log message is written after midnight -->
- </filter>
- <filter enabled="true">
- <tag>xmllog</tag>
- <type>xml</type>
- <level>TRACE</level>
- <property name="filename">trace.xml</property>
- <property name="rotate">true</property> <!-- true enables log rotation, otherwise append -->
- <property name="maxsize">100M</property> <!-- \d+[KMG]? Suffixes are in terms of 2**10 -->
- <property name="maxrecords">6K</property> <!-- \d+[KMG]? Suffixes are in terms of thousands -->
- <property name="daily">false</property> <!-- Automatically rotates when a log message is written after midnight -->
- </filter>
- <filter enabled="false"><!-- enabled=false means this logger won't actually be created -->
- <tag>donotopen</tag>
- <type>socket</type>
- <level>FINEST</level>
- <property name="endpoint">192.168.1.255:12124</property> <!-- recommend UDP broadcast -->
- <property name="protocol">udp</property> <!-- tcp or udp -->
- </filter>
-</logging>
diff --git a/vendor/github.com/alecthomas/log4go/filelog.go b/vendor/github.com/alecthomas/log4go/filelog.go
index 9bc4df15f..a5ae87809 100644
--- a/vendor/github.com/alecthomas/log4go/filelog.go
+++ b/vendor/github.com/alecthomas/log4go/filelog.go
@@ -3,15 +3,18 @@
package log4go
import (
+ "bytes"
"fmt"
+ "io"
"os"
"time"
)
// This log writer sends output to a file
type FileLogWriter struct {
- rec chan *LogRecord
- rot chan bool
+ rec chan *LogRecord
+ rot chan bool
+ done chan bool
// The opened file
filename string
@@ -47,6 +50,7 @@ func (w *FileLogWriter) LogWrite(rec *LogRecord) {
func (w *FileLogWriter) Close() {
close(w.rec)
+ <-w.done
}
// NewFileLogWriter creates a new LogWriter which writes to the given file and
@@ -62,6 +66,7 @@ func NewFileLogWriter(fname string, rotate bool) *FileLogWriter {
w := &FileLogWriter{
rec: make(chan *LogRecord, LogBufferLength),
rot: make(chan bool),
+ done: make(chan bool),
filename: fname,
format: "[%D %T] [%L] (%S) %M",
rotate: rotate,
@@ -81,6 +86,7 @@ func NewFileLogWriter(fname string, rotate bool) *FileLogWriter {
w.file.Sync()
w.file.Close()
}
+ close(w.done)
}()
for {
@@ -173,7 +179,22 @@ func (w *FileLogWriter) intRotate() error {
}
}
- // Open the log file
+ lineCount := 0
+ byteCount := 0
+
+ // If the file exists, open for reading and set our line/byte counts
+ // On failure, just assume the file doesn't exist
+ if fd, err := os.OpenFile(w.filename, os.O_RDONLY, 0440); err == nil {
+ lineCount, _ = lineCounter(fd)
+
+ fi, err := fd.Stat()
+ if err == nil {
+ byteCount = int(fi.Size())
+ }
+
+ fd.Close()
+ }
+
fd, err := os.OpenFile(w.filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0660)
if err != nil {
return err
@@ -187,12 +208,32 @@ func (w *FileLogWriter) intRotate() error {
w.daily_opendate = now.Day()
// initialize rotation values
- w.maxlines_curlines = 0
- w.maxsize_cursize = 0
+ w.maxlines_curlines = lineCount
+ w.maxsize_cursize = byteCount
return nil
}
+// Taken from https://stackoverflow.com/a/24563853
+func lineCounter(r io.Reader) (int, error) {
+ buf := make([]byte, 32*1024)
+ count := 0
+ lineSep := []byte{'\n'}
+
+ for {
+ c, err := r.Read(buf)
+ count += bytes.Count(buf[:c], lineSep)
+
+ switch {
+ case err == io.EOF:
+ return count, nil
+
+ case err != nil:
+ return count, err
+ }
+ }
+}
+
// Set the logging format (chainable). Must be called before the first log
// message is written.
func (w *FileLogWriter) SetFormat(format string) *FileLogWriter {
diff --git a/vendor/github.com/alecthomas/log4go/log4go_test.go b/vendor/github.com/alecthomas/log4go/log4go_test.go
deleted file mode 100644
index c4b92f6a7..000000000
--- a/vendor/github.com/alecthomas/log4go/log4go_test.go
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright (C) 2010, Kyle Lemons <kyle@kylelemons.net>. All rights reserved.
-
-package log4go
-
-import (
- "crypto/md5"
- "encoding/hex"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "runtime"
- "testing"
- "time"
-)
-
-const testLogFile = "_logtest.log"
-
-var now time.Time = time.Unix(0, 1234567890123456789).In(time.UTC)
-
-func newLogRecord(lvl Level, src string, msg string) *LogRecord {
- return &LogRecord{
- Level: lvl,
- Source: src,
- Created: now,
- Message: msg,
- }
-}
-
-func TestELog(t *testing.T) {
- fmt.Printf("Testing %s\n", L4G_VERSION)
- lr := newLogRecord(CRITICAL, "source", "message")
- if lr.Level != CRITICAL {
- t.Errorf("Incorrect level: %d should be %d", lr.Level, CRITICAL)
- }
- if lr.Source != "source" {
- t.Errorf("Incorrect source: %s should be %s", lr.Source, "source")
- }
- if lr.Message != "message" {
- t.Errorf("Incorrect message: %s should be %s", lr.Source, "message")
- }
-}
-
-var formatTests = []struct {
- Test string
- Record *LogRecord
- Formats map[string]string
-}{
- {
- Test: "Standard formats",
- Record: &LogRecord{
- Level: ERROR,
- Source: "source",
- Message: "message",
- Created: now,
- },
- Formats: map[string]string{
- // TODO(kevlar): How can I do this so it'll work outside of PST?
- FORMAT_DEFAULT: "[2009/02/13 23:31:30 UTC] [EROR] (source) message\n",
- FORMAT_SHORT: "[23:31 13/02/09] [EROR] message\n",
- FORMAT_ABBREV: "[EROR] message\n",
- },
- },
-}
-
-func TestFormatLogRecord(t *testing.T) {
- for _, test := range formatTests {
- name := test.Test
- for fmt, want := range test.Formats {
- if got := FormatLogRecord(fmt, test.Record); got != want {
- t.Errorf("%s - %s:", name, fmt)
- t.Errorf(" got %q", got)
- t.Errorf(" want %q", want)
- }
- }
- }
-}
-
-var logRecordWriteTests = []struct {
- Test string
- Record *LogRecord
- Console string
-}{
- {
- Test: "Normal message",
- Record: &LogRecord{
- Level: CRITICAL,
- Source: "source",
- Message: "message",
- Created: now,
- },
- Console: "[23:31:30 UTC 2009/02/13] [CRIT] message\n",
- },
-}
-
-func TestConsoleLogWriter(t *testing.T) {
- console := make(ConsoleLogWriter)
-
- r, w := io.Pipe()
- go console.run(w)
- defer console.Close()
-
- buf := make([]byte, 1024)
-
- for _, test := range logRecordWriteTests {
- name := test.Test
-
- console.LogWrite(test.Record)
- n, _ := r.Read(buf)
-
- if got, want := string(buf[:n]), test.Console; got != want {
- t.Errorf("%s: got %q", name, got)
- t.Errorf("%s: want %q", name, want)
- }
- }
-}
-
-func TestFileLogWriter(t *testing.T) {
- defer func(buflen int) {
- LogBufferLength = buflen
- }(LogBufferLength)
- LogBufferLength = 0
-
- w := NewFileLogWriter(testLogFile, false)
- if w == nil {
- t.Fatalf("Invalid return: w should not be nil")
- }
- defer os.Remove(testLogFile)
-
- w.LogWrite(newLogRecord(CRITICAL, "source", "message"))
- w.Close()
- runtime.Gosched()
-
- if contents, err := ioutil.ReadFile(testLogFile); err != nil {
- t.Errorf("read(%q): %s", testLogFile, err)
- } else if len(contents) != 50 {
- t.Errorf("malformed filelog: %q (%d bytes)", string(contents), len(contents))
- }
-}
-
-func TestXMLLogWriter(t *testing.T) {
- defer func(buflen int) {
- LogBufferLength = buflen
- }(LogBufferLength)
- LogBufferLength = 0
-
- w := NewXMLLogWriter(testLogFile, false)
- if w == nil {
- t.Fatalf("Invalid return: w should not be nil")
- }
- defer os.Remove(testLogFile)
-
- w.LogWrite(newLogRecord(CRITICAL, "source", "message"))
- w.Close()
- runtime.Gosched()
-
- if contents, err := ioutil.ReadFile(testLogFile); err != nil {
- t.Errorf("read(%q): %s", testLogFile, err)
- } else if len(contents) != 185 {
- t.Errorf("malformed xmllog: %q (%d bytes)", string(contents), len(contents))
- }
-}
-
-func TestLogger(t *testing.T) {
- sl := NewDefaultLogger(WARNING)
- if sl == nil {
- t.Fatalf("NewDefaultLogger should never return nil")
- }
- if lw, exist := sl["stdout"]; lw == nil || exist != true {
- t.Fatalf("NewDefaultLogger produced invalid logger (DNE or nil)")
- }
- if sl["stdout"].Level != WARNING {
- t.Fatalf("NewDefaultLogger produced invalid logger (incorrect level)")
- }
- if len(sl) != 1 {
- t.Fatalf("NewDefaultLogger produced invalid logger (incorrect map count)")
- }
-
- //func (l *Logger) AddFilter(name string, level int, writer LogWriter) {}
- l := make(Logger)
- l.AddFilter("stdout", DEBUG, NewConsoleLogWriter())
- if lw, exist := l["stdout"]; lw == nil || exist != true {
- t.Fatalf("AddFilter produced invalid logger (DNE or nil)")
- }
- if l["stdout"].Level != DEBUG {
- t.Fatalf("AddFilter produced invalid logger (incorrect level)")
- }
- if len(l) != 1 {
- t.Fatalf("AddFilter produced invalid logger (incorrect map count)")
- }
-
- //func (l *Logger) Warn(format string, args ...interface{}) error {}
- if err := l.Warn("%s %d %#v", "Warning:", 1, []int{}); err.Error() != "Warning: 1 []int{}" {
- t.Errorf("Warn returned invalid error: %s", err)
- }
-
- //func (l *Logger) Error(format string, args ...interface{}) error {}
- if err := l.Error("%s %d %#v", "Error:", 10, []string{}); err.Error() != "Error: 10 []string{}" {
- t.Errorf("Error returned invalid error: %s", err)
- }
-
- //func (l *Logger) Critical(format string, args ...interface{}) error {}
- if err := l.Critical("%s %d %#v", "Critical:", 100, []int64{}); err.Error() != "Critical: 100 []int64{}" {
- t.Errorf("Critical returned invalid error: %s", err)
- }
-
- // Already tested or basically untestable
- //func (l *Logger) Log(level int, source, message string) {}
- //func (l *Logger) Logf(level int, format string, args ...interface{}) {}
- //func (l *Logger) intLogf(level int, format string, args ...interface{}) string {}
- //func (l *Logger) Finest(format string, args ...interface{}) {}
- //func (l *Logger) Fine(format string, args ...interface{}) {}
- //func (l *Logger) Debug(format string, args ...interface{}) {}
- //func (l *Logger) Trace(format string, args ...interface{}) {}
- //func (l *Logger) Info(format string, args ...interface{}) {}
-}
-
-func TestLogOutput(t *testing.T) {
- const (
- expected = "fdf3e51e444da56b4cb400f30bc47424"
- )
-
- // Unbuffered output
- defer func(buflen int) {
- LogBufferLength = buflen
- }(LogBufferLength)
- LogBufferLength = 0
-
- l := make(Logger)
-
- // Delete and open the output log without a timestamp (for a constant md5sum)
- l.AddFilter("file", FINEST, NewFileLogWriter(testLogFile, false).SetFormat("[%L] %M"))
- defer os.Remove(testLogFile)
-
- // Send some log messages
- l.Log(CRITICAL, "testsrc1", fmt.Sprintf("This message is level %d", int(CRITICAL)))
- l.Logf(ERROR, "This message is level %v", ERROR)
- l.Logf(WARNING, "This message is level %s", WARNING)
- l.Logc(INFO, func() string { return "This message is level INFO" })
- l.Trace("This message is level %d", int(TRACE))
- l.Debug("This message is level %s", DEBUG)
- l.Fine(func() string { return fmt.Sprintf("This message is level %v", FINE) })
- l.Finest("This message is level %v", FINEST)
- l.Finest(FINEST, "is also this message's level")
-
- l.Close()
-
- contents, err := ioutil.ReadFile(testLogFile)
- if err != nil {
- t.Fatalf("Could not read output log: %s", err)
- }
-
- sum := md5.New()
- sum.Write(contents)
- if sumstr := hex.EncodeToString(sum.Sum(nil)); sumstr != expected {
- t.Errorf("--- Log Contents:\n%s---", string(contents))
- t.Fatalf("Checksum does not match: %s (expecting %s)", sumstr, expected)
- }
-}
-
-func TestCountMallocs(t *testing.T) {
- const N = 1
- var m runtime.MemStats
- getMallocs := func() uint64 {
- runtime.ReadMemStats(&m)
- return m.Mallocs
- }
-
- // Console logger
- sl := NewDefaultLogger(INFO)
- mallocs := 0 - getMallocs()
- for i := 0; i < N; i++ {
- sl.Log(WARNING, "here", "This is a WARNING message")
- }
- mallocs += getMallocs()
- fmt.Printf("mallocs per sl.Log((WARNING, \"here\", \"This is a log message\"): %d\n", mallocs/N)
-
- // Console logger formatted
- mallocs = 0 - getMallocs()
- for i := 0; i < N; i++ {
- sl.Logf(WARNING, "%s is a log message with level %d", "This", WARNING)
- }
- mallocs += getMallocs()
- fmt.Printf("mallocs per sl.Logf(WARNING, \"%%s is a log message with level %%d\", \"This\", WARNING): %d\n", mallocs/N)
-
- // Console logger (not logged)
- sl = NewDefaultLogger(INFO)
- mallocs = 0 - getMallocs()
- for i := 0; i < N; i++ {
- sl.Log(DEBUG, "here", "This is a DEBUG log message")
- }
- mallocs += getMallocs()
- fmt.Printf("mallocs per unlogged sl.Log((WARNING, \"here\", \"This is a log message\"): %d\n", mallocs/N)
-
- // Console logger formatted (not logged)
- mallocs = 0 - getMallocs()
- for i := 0; i < N; i++ {
- sl.Logf(DEBUG, "%s is a log message with level %d", "This", DEBUG)
- }
- mallocs += getMallocs()
- fmt.Printf("mallocs per unlogged sl.Logf(WARNING, \"%%s is a log message with level %%d\", \"This\", WARNING): %d\n", mallocs/N)
-}
-
-func TestXMLConfig(t *testing.T) {
- const (
- configfile = "example.xml"
- )
-
- fd, err := os.Create(configfile)
- if err != nil {
- t.Fatalf("Could not open %s for writing: %s", configfile, err)
- }
-
- fmt.Fprintln(fd, "<logging>")
- fmt.Fprintln(fd, " <filter enabled=\"true\">")
- fmt.Fprintln(fd, " <tag>stdout</tag>")
- fmt.Fprintln(fd, " <type>console</type>")
- fmt.Fprintln(fd, " <!-- level is (:?FINEST|FINE|DEBUG|TRACE|INFO|WARNING|ERROR) -->")
- fmt.Fprintln(fd, " <level>DEBUG</level>")
- fmt.Fprintln(fd, " </filter>")
- fmt.Fprintln(fd, " <filter enabled=\"true\">")
- fmt.Fprintln(fd, " <tag>file</tag>")
- fmt.Fprintln(fd, " <type>file</type>")
- fmt.Fprintln(fd, " <level>FINEST</level>")
- fmt.Fprintln(fd, " <property name=\"filename\">test.log</property>")
- fmt.Fprintln(fd, " <!--")
- fmt.Fprintln(fd, " %T - Time (15:04:05 MST)")
- fmt.Fprintln(fd, " %t - Time (15:04)")
- fmt.Fprintln(fd, " %D - Date (2006/01/02)")
- fmt.Fprintln(fd, " %d - Date (01/02/06)")
- fmt.Fprintln(fd, " %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR, CRIT)")
- fmt.Fprintln(fd, " %S - Source")
- fmt.Fprintln(fd, " %M - Message")
- fmt.Fprintln(fd, " It ignores unknown format strings (and removes them)")
- fmt.Fprintln(fd, " Recommended: \"[%D %T] [%L] (%S) %M\"")
- fmt.Fprintln(fd, " -->")
- fmt.Fprintln(fd, " <property name=\"format\">[%D %T] [%L] (%S) %M</property>")
- fmt.Fprintln(fd, " <property name=\"rotate\">false</property> <!-- true enables log rotation, otherwise append -->")
- fmt.Fprintln(fd, " <property name=\"maxsize\">0M</property> <!-- \\d+[KMG]? Suffixes are in terms of 2**10 -->")
- fmt.Fprintln(fd, " <property name=\"maxlines\">0K</property> <!-- \\d+[KMG]? Suffixes are in terms of thousands -->")
- fmt.Fprintln(fd, " <property name=\"daily\">true</property> <!-- Automatically rotates when a log message is written after midnight -->")
- fmt.Fprintln(fd, " </filter>")
- fmt.Fprintln(fd, " <filter enabled=\"true\">")
- fmt.Fprintln(fd, " <tag>xmllog</tag>")
- fmt.Fprintln(fd, " <type>xml</type>")
- fmt.Fprintln(fd, " <level>TRACE</level>")
- fmt.Fprintln(fd, " <property name=\"filename\">trace.xml</property>")
- fmt.Fprintln(fd, " <property name=\"rotate\">true</property> <!-- true enables log rotation, otherwise append -->")
- fmt.Fprintln(fd, " <property name=\"maxsize\">100M</property> <!-- \\d+[KMG]? Suffixes are in terms of 2**10 -->")
- fmt.Fprintln(fd, " <property name=\"maxrecords\">6K</property> <!-- \\d+[KMG]? Suffixes are in terms of thousands -->")
- fmt.Fprintln(fd, " <property name=\"daily\">false</property> <!-- Automatically rotates when a log message is written after midnight -->")
- fmt.Fprintln(fd, " </filter>")
- fmt.Fprintln(fd, " <filter enabled=\"false\"><!-- enabled=false means this logger won't actually be created -->")
- fmt.Fprintln(fd, " <tag>donotopen</tag>")
- fmt.Fprintln(fd, " <type>socket</type>")
- fmt.Fprintln(fd, " <level>FINEST</level>")
- fmt.Fprintln(fd, " <property name=\"endpoint\">192.168.1.255:12124</property> <!-- recommend UDP broadcast -->")
- fmt.Fprintln(fd, " <property name=\"protocol\">udp</property> <!-- tcp or udp -->")
- fmt.Fprintln(fd, " </filter>")
- fmt.Fprintln(fd, "</logging>")
- fd.Close()
-
- log := make(Logger)
- log.LoadConfiguration(configfile)
- defer os.Remove("trace.xml")
- defer os.Remove("test.log")
- defer log.Close()
-
- // Make sure we got all loggers
- if len(log) != 3 {
- t.Fatalf("XMLConfig: Expected 3 filters, found %d", len(log))
- }
-
- // Make sure they're the right keys
- if _, ok := log["stdout"]; !ok {
- t.Errorf("XMLConfig: Expected stdout logger")
- }
- if _, ok := log["file"]; !ok {
- t.Fatalf("XMLConfig: Expected file logger")
- }
- if _, ok := log["xmllog"]; !ok {
- t.Fatalf("XMLConfig: Expected xmllog logger")
- }
-
- // Make sure they're the right type
- if _, ok := log["stdout"].LogWriter.(ConsoleLogWriter); !ok {
- t.Fatalf("XMLConfig: Expected stdout to be ConsoleLogWriter, found %T", log["stdout"].LogWriter)
- }
- if _, ok := log["file"].LogWriter.(*FileLogWriter); !ok {
- t.Fatalf("XMLConfig: Expected file to be *FileLogWriter, found %T", log["file"].LogWriter)
- }
- if _, ok := log["xmllog"].LogWriter.(*FileLogWriter); !ok {
- t.Fatalf("XMLConfig: Expected xmllog to be *FileLogWriter, found %T", log["xmllog"].LogWriter)
- }
-
- // Make sure levels are set
- if lvl := log["stdout"].Level; lvl != DEBUG {
- t.Errorf("XMLConfig: Expected stdout to be set to level %d, found %d", DEBUG, lvl)
- }
- if lvl := log["file"].Level; lvl != FINEST {
- t.Errorf("XMLConfig: Expected file to be set to level %d, found %d", FINEST, lvl)
- }
- if lvl := log["xmllog"].Level; lvl != TRACE {
- t.Errorf("XMLConfig: Expected xmllog to be set to level %d, found %d", TRACE, lvl)
- }
-
- // Make sure the w is open and points to the right file
- if fname := log["file"].LogWriter.(*FileLogWriter).file.Name(); fname != "test.log" {
- t.Errorf("XMLConfig: Expected file to have opened %s, found %s", "test.log", fname)
- }
-
- // Make sure the XLW is open and points to the right file
- if fname := log["xmllog"].LogWriter.(*FileLogWriter).file.Name(); fname != "trace.xml" {
- t.Errorf("XMLConfig: Expected xmllog to have opened %s, found %s", "trace.xml", fname)
- }
-
- // Move XML log file
- os.Rename(configfile, "examples/"+configfile) // Keep this so that an example with the documentation is available
-}
-
-func BenchmarkFormatLogRecord(b *testing.B) {
- const updateEvery = 1
- rec := &LogRecord{
- Level: CRITICAL,
- Created: now,
- Source: "source",
- Message: "message",
- }
- for i := 0; i < b.N; i++ {
- rec.Created = rec.Created.Add(1 * time.Second / updateEvery)
- if i%2 == 0 {
- FormatLogRecord(FORMAT_DEFAULT, rec)
- } else {
- FormatLogRecord(FORMAT_SHORT, rec)
- }
- }
-}
-
-func BenchmarkConsoleLog(b *testing.B) {
- /* This doesn't seem to work on OS X
- sink, err := os.Open(os.DevNull)
- if err != nil {
- panic(err)
- }
- if err := syscall.Dup2(int(sink.Fd()), syscall.Stdout); err != nil {
- panic(err)
- }
- */
-
- stdout = ioutil.Discard
- sl := NewDefaultLogger(INFO)
- for i := 0; i < b.N; i++ {
- sl.Log(WARNING, "here", "This is a log message")
- }
-}
-
-func BenchmarkConsoleNotLogged(b *testing.B) {
- sl := NewDefaultLogger(INFO)
- for i := 0; i < b.N; i++ {
- sl.Log(DEBUG, "here", "This is a log message")
- }
-}
-
-func BenchmarkConsoleUtilLog(b *testing.B) {
- sl := NewDefaultLogger(INFO)
- for i := 0; i < b.N; i++ {
- sl.Info("%s is a log message", "This")
- }
-}
-
-func BenchmarkConsoleUtilNotLog(b *testing.B) {
- sl := NewDefaultLogger(INFO)
- for i := 0; i < b.N; i++ {
- sl.Debug("%s is a log message", "This")
- }
-}
-
-func BenchmarkFileLog(b *testing.B) {
- sl := make(Logger)
- b.StopTimer()
- sl.AddFilter("file", INFO, NewFileLogWriter("benchlog.log", false))
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- sl.Log(WARNING, "here", "This is a log message")
- }
- b.StopTimer()
- os.Remove("benchlog.log")
-}
-
-func BenchmarkFileNotLogged(b *testing.B) {
- sl := make(Logger)
- b.StopTimer()
- sl.AddFilter("file", INFO, NewFileLogWriter("benchlog.log", false))
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- sl.Log(DEBUG, "here", "This is a log message")
- }
- b.StopTimer()
- os.Remove("benchlog.log")
-}
-
-func BenchmarkFileUtilLog(b *testing.B) {
- sl := make(Logger)
- b.StopTimer()
- sl.AddFilter("file", INFO, NewFileLogWriter("benchlog.log", false))
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- sl.Info("%s is a log message", "This")
- }
- b.StopTimer()
- os.Remove("benchlog.log")
-}
-
-func BenchmarkFileUtilNotLog(b *testing.B) {
- sl := make(Logger)
- b.StopTimer()
- sl.AddFilter("file", INFO, NewFileLogWriter("benchlog.log", false))
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- sl.Debug("%s is a log message", "This")
- }
- b.StopTimer()
- os.Remove("benchlog.log")
-}
-
-// Benchmark results (darwin amd64 6g)
-//elog.BenchmarkConsoleLog 100000 22819 ns/op
-//elog.BenchmarkConsoleNotLogged 2000000 879 ns/op
-//elog.BenchmarkConsoleUtilLog 50000 34380 ns/op
-//elog.BenchmarkConsoleUtilNotLog 1000000 1339 ns/op
-//elog.BenchmarkFileLog 100000 26497 ns/op
-//elog.BenchmarkFileNotLogged 2000000 821 ns/op
-//elog.BenchmarkFileUtilLog 50000 33945 ns/op
-//elog.BenchmarkFileUtilNotLog 1000000 1258 ns/op
diff --git a/vendor/github.com/armon/go-metrics/circonus/circonus.go b/vendor/github.com/armon/go-metrics/circonus/circonus.go
deleted file mode 100644
index eb41b9945..000000000
--- a/vendor/github.com/armon/go-metrics/circonus/circonus.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Circonus Metrics Sink
-
-package circonus
-
-import (
- "strings"
-
- "github.com/armon/go-metrics"
- cgm "github.com/circonus-labs/circonus-gometrics"
-)
-
-// CirconusSink provides an interface to forward metrics to Circonus with
-// automatic check creation and metric management
-type CirconusSink struct {
- metrics *cgm.CirconusMetrics
-}
-
-// Config options for CirconusSink
-// See https://github.com/circonus-labs/circonus-gometrics for configuration options
-type Config cgm.Config
-
-// NewCirconusSink - create new metric sink for circonus
-//
-// one of the following must be supplied:
-// - API Token - search for an existing check or create a new check
-// - API Token + Check Id - the check identified by check id will be used
-// - API Token + Check Submission URL - the check identified by the submission url will be used
-// - Check Submission URL - the check identified by the submission url will be used
-// metric management will be *disabled*
-//
-// Note: If submission url is supplied w/o an api token, the public circonus ca cert will be used
-// to verify the broker for metrics submission.
-func NewCirconusSink(cc *Config) (*CirconusSink, error) {
- cfg := cgm.Config{}
- if cc != nil {
- cfg = cgm.Config(*cc)
- }
-
- metrics, err := cgm.NewCirconusMetrics(&cfg)
- if err != nil {
- return nil, err
- }
-
- return &CirconusSink{
- metrics: metrics,
- }, nil
-}
-
-// Start submitting metrics to Circonus (flush every SubmitInterval)
-func (s *CirconusSink) Start() {
- s.metrics.Start()
-}
-
-// Flush manually triggers metric submission to Circonus
-func (s *CirconusSink) Flush() {
- s.metrics.Flush()
-}
-
-// SetGauge sets value for a gauge metric
-func (s *CirconusSink) SetGauge(key []string, val float32) {
- flatKey := s.flattenKey(key)
- s.metrics.SetGauge(flatKey, int64(val))
-}
-
-// SetGaugeWithLabels sets value for a gauge metric with the given labels
-func (s *CirconusSink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey := s.flattenKeyLabels(key, labels)
- s.metrics.SetGauge(flatKey, int64(val))
-}
-
-// EmitKey is not implemented in circonus
-func (s *CirconusSink) EmitKey(key []string, val float32) {
- // NOP
-}
-
-// IncrCounter increments a counter metric
-func (s *CirconusSink) IncrCounter(key []string, val float32) {
- flatKey := s.flattenKey(key)
- s.metrics.IncrementByValue(flatKey, uint64(val))
-}
-
-// IncrCounterWithLabels increments a counter metric with the given labels
-func (s *CirconusSink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey := s.flattenKeyLabels(key, labels)
- s.metrics.IncrementByValue(flatKey, uint64(val))
-}
-
-// AddSample adds a sample to a histogram metric
-func (s *CirconusSink) AddSample(key []string, val float32) {
- flatKey := s.flattenKey(key)
- s.metrics.RecordValue(flatKey, float64(val))
-}
-
-// AddSampleWithLabels adds a sample to a histogram metric with the given labels
-func (s *CirconusSink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey := s.flattenKeyLabels(key, labels)
- s.metrics.RecordValue(flatKey, float64(val))
-}
-
-// Flattens key to Circonus metric name
-func (s *CirconusSink) flattenKey(parts []string) string {
- joined := strings.Join(parts, "`")
- return strings.Map(func(r rune) rune {
- switch r {
- case ' ':
- return '_'
- default:
- return r
- }
- }, joined)
-}
-
-// Flattens the key along with labels for formatting, removes spaces
-func (s *CirconusSink) flattenKeyLabels(parts []string, labels []metrics.Label) string {
- for _, label := range labels {
- parts = append(parts, label.Value)
- }
- return s.flattenKey(parts)
-}
diff --git a/vendor/github.com/armon/go-metrics/circonus/circonus_test.go b/vendor/github.com/armon/go-metrics/circonus/circonus_test.go
deleted file mode 100644
index 4eb76e411..000000000
--- a/vendor/github.com/armon/go-metrics/circonus/circonus_test.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package circonus
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-func TestNewCirconusSink(t *testing.T) {
-
- // test with invalid config (nil)
- expectedError := errors.New("invalid check manager configuration (no API token AND no submission url)")
- _, err := NewCirconusSink(nil)
- if err == nil || err.Error() != expectedError.Error() {
- t.Errorf("Expected an '%#v' error, got '%#v'", expectedError, err)
- }
-
- // test w/submission url and w/o token
- cfg := &Config{}
- cfg.CheckManager.Check.SubmissionURL = "http://127.0.0.1:43191/"
- _, err = NewCirconusSink(cfg)
- if err != nil {
- t.Errorf("Expected no error, got '%v'", err)
- }
-
- // note: a test with a valid token is *not* done as it *will* create a
- // check resulting in testing the api more than the circonus sink
- // see circonus-gometrics/checkmgr/checkmgr_test.go for testing of api token
-}
-
-func TestFlattenKey(t *testing.T) {
- var testKeys = []struct {
- input []string
- expected string
- }{
- {[]string{"a", "b", "c"}, "a`b`c"},
- {[]string{"a-a", "b_b", "c/c"}, "a-a`b_b`c/c"},
- {[]string{"spaces must", "flatten", "to", "underscores"}, "spaces_must`flatten`to`underscores"},
- }
-
- c := &CirconusSink{}
-
- for _, test := range testKeys {
- if actual := c.flattenKey(test.input); actual != test.expected {
- t.Fatalf("Flattening %v failed, expected '%s' got '%s'", test.input, test.expected, actual)
- }
- }
-}
-
-func fakeBroker(q chan string) *httptest.Server {
- handler := func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(200)
- w.Header().Set("Content-Type", "application/json")
- defer r.Body.Close()
- body, err := ioutil.ReadAll(r.Body)
- if err != nil {
- q <- err.Error()
- fmt.Fprintln(w, err.Error())
- } else {
- q <- string(body)
- fmt.Fprintln(w, `{"stats":1}`)
- }
- }
-
- return httptest.NewServer(http.HandlerFunc(handler))
-}
-
-func TestSetGauge(t *testing.T) {
- q := make(chan string)
-
- server := fakeBroker(q)
- defer server.Close()
-
- cfg := &Config{}
- cfg.CheckManager.Check.SubmissionURL = server.URL
-
- cs, err := NewCirconusSink(cfg)
- if err != nil {
- t.Errorf("Expected no error, got '%v'", err)
- }
-
- go func() {
- cs.SetGauge([]string{"foo", "bar"}, 1)
- cs.Flush()
- }()
-
- expect := "{\"foo`bar\":{\"_type\":\"n\",\"_value\":\"1\"}}"
- actual := <-q
-
- if actual != expect {
- t.Errorf("Expected '%s', got '%s'", expect, actual)
-
- }
-}
-
-func TestIncrCounter(t *testing.T) {
- q := make(chan string)
-
- server := fakeBroker(q)
- defer server.Close()
-
- cfg := &Config{}
- cfg.CheckManager.Check.SubmissionURL = server.URL
-
- cs, err := NewCirconusSink(cfg)
- if err != nil {
- t.Errorf("Expected no error, got '%v'", err)
- }
-
- go func() {
- cs.IncrCounter([]string{"foo", "bar"}, 1)
- cs.Flush()
- }()
-
- expect := "{\"foo`bar\":{\"_type\":\"n\",\"_value\":1}}"
- actual := <-q
-
- if actual != expect {
- t.Errorf("Expected '%s', got '%s'", expect, actual)
-
- }
-}
-
-func TestAddSample(t *testing.T) {
- q := make(chan string)
-
- server := fakeBroker(q)
- defer server.Close()
-
- cfg := &Config{}
- cfg.CheckManager.Check.SubmissionURL = server.URL
-
- cs, err := NewCirconusSink(cfg)
- if err != nil {
- t.Errorf("Expected no error, got '%v'", err)
- }
-
- go func() {
- cs.AddSample([]string{"foo", "bar"}, 1)
- cs.Flush()
- }()
-
- expect := "{\"foo`bar\":{\"_type\":\"n\",\"_value\":[\"H[1.0e+00]=1\"]}}"
- actual := <-q
-
- if actual != expect {
- t.Errorf("Expected '%s', got '%s'", expect, actual)
-
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/datadog/dogstatsd.go b/vendor/github.com/armon/go-metrics/datadog/dogstatsd.go
deleted file mode 100644
index fe021d01c..000000000
--- a/vendor/github.com/armon/go-metrics/datadog/dogstatsd.go
+++ /dev/null
@@ -1,140 +0,0 @@
-package datadog
-
-import (
- "fmt"
- "strings"
-
- "github.com/DataDog/datadog-go/statsd"
- "github.com/armon/go-metrics"
-)
-
-// DogStatsdSink provides a MetricSink that can be used
-// with a dogstatsd server. It utilizes the Dogstatsd client at github.com/DataDog/datadog-go/statsd
-type DogStatsdSink struct {
- client *statsd.Client
- hostName string
- propagateHostname bool
-}
-
-// NewDogStatsdSink is used to create a new DogStatsdSink with sane defaults
-func NewDogStatsdSink(addr string, hostName string) (*DogStatsdSink, error) {
- client, err := statsd.New(addr)
- if err != nil {
- return nil, err
- }
- sink := &DogStatsdSink{
- client: client,
- hostName: hostName,
- propagateHostname: false,
- }
- return sink, nil
-}
-
-// SetTags sets common tags on the Dogstatsd Client that will be sent
-// along with all dogstatsd packets.
-// Ref: http://docs.datadoghq.com/guides/dogstatsd/#tags
-func (s *DogStatsdSink) SetTags(tags []string) {
- s.client.Tags = tags
-}
-
-// EnableHostnamePropagation forces a Dogstatsd `host` tag with the value specified by `s.HostName`
-// Since the go-metrics package has its own mechanism for attaching a hostname to metrics,
-// setting the `propagateHostname` flag ensures that `s.HostName` overrides the host tag naively set by the DogStatsd server
-func (s *DogStatsdSink) EnableHostNamePropagation() {
- s.propagateHostname = true
-}
-
-func (s *DogStatsdSink) flattenKey(parts []string) string {
- joined := strings.Join(parts, ".")
- return strings.Map(sanitize, joined)
-}
-
-func sanitize(r rune) rune {
- switch r {
- case ':':
- fallthrough
- case ' ':
- return '_'
- default:
- return r
- }
-}
-
-func (s *DogStatsdSink) parseKey(key []string) ([]string, []metrics.Label) {
- // Since DogStatsd supports dimensionality via tags on metric keys, this sink's approach is to splice the hostname out of the key in favor of a `host` tag
- // The `host` tag is either forced here, or set downstream by the DogStatsd server
-
- var labels []metrics.Label
- hostName := s.hostName
-
- // Splice the hostname out of the key
- for i, el := range key {
- if el == hostName {
- key = append(key[:i], key[i+1:]...)
- break
- }
- }
-
- if s.propagateHostname {
- labels = append(labels, metrics.Label{"host", hostName})
- }
- return key, labels
-}
-
-// Implementation of methods in the MetricSink interface
-
-func (s *DogStatsdSink) SetGauge(key []string, val float32) {
- s.SetGaugeWithLabels(key, val, nil)
-}
-
-func (s *DogStatsdSink) IncrCounter(key []string, val float32) {
- s.IncrCounterWithLabels(key, val, nil)
-}
-
-// EmitKey is not implemented since DogStatsd does not provide a metric type that holds an
-// arbitrary number of values
-func (s *DogStatsdSink) EmitKey(key []string, val float32) {
-}
-
-func (s *DogStatsdSink) AddSample(key []string, val float32) {
- s.AddSampleWithLabels(key, val, nil)
-}
-
-// The following ...WithLabels methods correspond to Datadog's Tag extension to Statsd.
-// http://docs.datadoghq.com/guides/dogstatsd/#tags
-func (s *DogStatsdSink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey, tags := s.getFlatkeyAndCombinedLabels(key, labels)
- rate := 1.0
- s.client.Gauge(flatKey, float64(val), tags, rate)
-}
-
-func (s *DogStatsdSink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey, tags := s.getFlatkeyAndCombinedLabels(key, labels)
- rate := 1.0
- s.client.Count(flatKey, int64(val), tags, rate)
-}
-
-func (s *DogStatsdSink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label) {
- flatKey, tags := s.getFlatkeyAndCombinedLabels(key, labels)
- rate := 1.0
- s.client.TimeInMilliseconds(flatKey, float64(val), tags, rate)
-}
-
-func (s *DogStatsdSink) getFlatkeyAndCombinedLabels(key []string, labels []metrics.Label) (string, []string) {
- key, parsedLabels := s.parseKey(key)
- flatKey := s.flattenKey(key)
- labels = append(labels, parsedLabels...)
-
- var tags []string
- for _, label := range labels {
- label.Name = strings.Map(sanitize, label.Name)
- label.Value = strings.Map(sanitize, label.Value)
- if label.Value != "" {
- tags = append(tags, fmt.Sprintf("%s:%s", label.Name, label.Value))
- } else {
- tags = append(tags, label.Name)
- }
- }
-
- return flatKey, tags
-}
diff --git a/vendor/github.com/armon/go-metrics/datadog/dogstatsd_test.go b/vendor/github.com/armon/go-metrics/datadog/dogstatsd_test.go
deleted file mode 100644
index 43b81ac7f..000000000
--- a/vendor/github.com/armon/go-metrics/datadog/dogstatsd_test.go
+++ /dev/null
@@ -1,150 +0,0 @@
-package datadog
-
-import (
- "net"
- "reflect"
- "testing"
-
- "github.com/armon/go-metrics"
-)
-
-var EmptyTags []metrics.Label
-
-const (
- DogStatsdAddr = "127.0.0.1:7254"
- HostnameEnabled = true
- HostnameDisabled = false
- TestHostname = "test_hostname"
-)
-
-func MockGetHostname() string {
- return TestHostname
-}
-
-var ParseKeyTests = []struct {
- KeyToParse []string
- Tags []metrics.Label
- PropagateHostname bool
- ExpectedKey []string
- ExpectedTags []metrics.Label
-}{
- {[]string{"a", MockGetHostname(), "b", "c"}, EmptyTags, HostnameDisabled, []string{"a", "b", "c"}, EmptyTags},
- {[]string{"a", "b", "c"}, EmptyTags, HostnameDisabled, []string{"a", "b", "c"}, EmptyTags},
- {[]string{"a", "b", "c"}, EmptyTags, HostnameEnabled, []string{"a", "b", "c"}, []metrics.Label{{"host", MockGetHostname()}}},
-}
-
-var FlattenKeyTests = []struct {
- KeyToFlatten []string
- Expected string
-}{
- {[]string{"a", "b", "c"}, "a.b.c"},
- {[]string{"spaces must", "flatten", "to", "underscores"}, "spaces_must.flatten.to.underscores"},
-}
-
-var MetricSinkTests = []struct {
- Method string
- Metric []string
- Value interface{}
- Tags []metrics.Label
- PropagateHostname bool
- Expected string
-}{
- {"SetGauge", []string{"foo", "bar"}, float32(42), EmptyTags, HostnameDisabled, "foo.bar:42.000000|g"},
- {"SetGauge", []string{"foo", "bar", "baz"}, float32(42), EmptyTags, HostnameDisabled, "foo.bar.baz:42.000000|g"},
- {"AddSample", []string{"sample", "thing"}, float32(4), EmptyTags, HostnameDisabled, "sample.thing:4.000000|ms"},
- {"IncrCounter", []string{"count", "me"}, float32(3), EmptyTags, HostnameDisabled, "count.me:3|c"},
-
- {"SetGauge", []string{"foo", "baz"}, float32(42), []metrics.Label{{"my_tag", ""}}, HostnameDisabled, "foo.baz:42.000000|g|#my_tag"},
- {"SetGauge", []string{"foo", "baz"}, float32(42), []metrics.Label{{"my tag", "my_value"}}, HostnameDisabled, "foo.baz:42.000000|g|#my_tag:my_value"},
- {"SetGauge", []string{"foo", "bar"}, float32(42), []metrics.Label{{"my_tag", "my_value"}, {"other_tag", "other_value"}}, HostnameDisabled, "foo.bar:42.000000|g|#my_tag:my_value,other_tag:other_value"},
- {"SetGauge", []string{"foo", "bar"}, float32(42), []metrics.Label{{"my_tag", "my_value"}, {"other_tag", "other_value"}}, HostnameEnabled, "foo.bar:42.000000|g|#my_tag:my_value,other_tag:other_value,host:test_hostname"},
-}
-
-func mockNewDogStatsdSink(addr string, labels []metrics.Label, tagWithHostname bool) *DogStatsdSink {
- dog, _ := NewDogStatsdSink(addr, MockGetHostname())
- _, tags := dog.getFlatkeyAndCombinedLabels(nil, labels)
- dog.SetTags(tags)
- if tagWithHostname {
- dog.EnableHostNamePropagation()
- }
-
- return dog
-}
-
-func setupTestServerAndBuffer(t *testing.T) (*net.UDPConn, []byte) {
- udpAddr, err := net.ResolveUDPAddr("udp", DogStatsdAddr)
- if err != nil {
- t.Fatal(err)
- }
- server, err := net.ListenUDP("udp", udpAddr)
- if err != nil {
- t.Fatal(err)
- }
- return server, make([]byte, 1024)
-}
-
-func TestParseKey(t *testing.T) {
- for _, tt := range ParseKeyTests {
- dog := mockNewDogStatsdSink(DogStatsdAddr, tt.Tags, tt.PropagateHostname)
- key, tags := dog.parseKey(tt.KeyToParse)
-
- if !reflect.DeepEqual(key, tt.ExpectedKey) {
- t.Fatalf("Key Parsing failed for %v", tt.KeyToParse)
- }
-
- if !reflect.DeepEqual(tags, tt.ExpectedTags) {
- t.Fatalf("Tag Parsing Failed for %v, %v != %v", tt.KeyToParse, tags, tt.ExpectedTags)
- }
- }
-}
-
-func TestFlattenKey(t *testing.T) {
- dog := mockNewDogStatsdSink(DogStatsdAddr, EmptyTags, HostnameDisabled)
- for _, tt := range FlattenKeyTests {
- if !reflect.DeepEqual(dog.flattenKey(tt.KeyToFlatten), tt.Expected) {
- t.Fatalf("Flattening %v failed", tt.KeyToFlatten)
- }
- }
-}
-
-func TestMetricSink(t *testing.T) {
- server, buf := setupTestServerAndBuffer(t)
- defer server.Close()
-
- for _, tt := range MetricSinkTests {
- dog := mockNewDogStatsdSink(DogStatsdAddr, tt.Tags, tt.PropagateHostname)
- method := reflect.ValueOf(dog).MethodByName(tt.Method)
- method.Call([]reflect.Value{
- reflect.ValueOf(tt.Metric),
- reflect.ValueOf(tt.Value)})
- assertServerMatchesExpected(t, server, buf, tt.Expected)
- }
-}
-
-func TestTaggableMetrics(t *testing.T) {
- server, buf := setupTestServerAndBuffer(t)
- defer server.Close()
-
- dog := mockNewDogStatsdSink(DogStatsdAddr, EmptyTags, HostnameDisabled)
-
- dog.AddSampleWithLabels([]string{"sample", "thing"}, float32(4), []metrics.Label{{"tagkey", "tagvalue"}})
- assertServerMatchesExpected(t, server, buf, "sample.thing:4.000000|ms|#tagkey:tagvalue")
-
- dog.SetGaugeWithLabels([]string{"sample", "thing"}, float32(4), []metrics.Label{{"tagkey", "tagvalue"}})
- assertServerMatchesExpected(t, server, buf, "sample.thing:4.000000|g|#tagkey:tagvalue")
-
- dog.IncrCounterWithLabels([]string{"sample", "thing"}, float32(4), []metrics.Label{{"tagkey", "tagvalue"}})
- assertServerMatchesExpected(t, server, buf, "sample.thing:4|c|#tagkey:tagvalue")
-
- dog = mockNewDogStatsdSink(DogStatsdAddr, []metrics.Label{{Name: "global"}}, HostnameEnabled) // with hostname, global tags
- dog.IncrCounterWithLabels([]string{"sample", "thing"}, float32(4), []metrics.Label{{"tagkey", "tagvalue"}})
- assertServerMatchesExpected(t, server, buf, "sample.thing:4|c|#global,tagkey:tagvalue,host:test_hostname")
-}
-
-func assertServerMatchesExpected(t *testing.T, server *net.UDPConn, buf []byte, expected string) {
- n, _ := server.Read(buf)
- msg := buf[:n]
- if string(msg) != expected {
- t.Fatalf("Line %s does not match expected: %s", string(msg), expected)
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/inmem.go b/vendor/github.com/armon/go-metrics/inmem.go
index 8fe1de802..4e2d6a709 100644
--- a/vendor/github.com/armon/go-metrics/inmem.go
+++ b/vendor/github.com/armon/go-metrics/inmem.go
@@ -232,8 +232,37 @@ func (i *InmemSink) Data() []*IntervalMetrics {
i.intervalLock.RLock()
defer i.intervalLock.RUnlock()
- intervals := make([]*IntervalMetrics, len(i.intervals))
- copy(intervals, i.intervals)
+ n := len(i.intervals)
+ intervals := make([]*IntervalMetrics, n)
+
+ copy(intervals[:n-1], i.intervals[:n-1])
+ current := i.intervals[n-1]
+
+ // make its own copy for current interval
+ intervals[n-1] = &IntervalMetrics{}
+ copyCurrent := intervals[n-1]
+ current.RLock()
+ *copyCurrent = *current
+
+ copyCurrent.Gauges = make(map[string]GaugeValue, len(current.Gauges))
+ for k, v := range current.Gauges {
+ copyCurrent.Gauges[k] = v
+ }
+ // saved values will be not change, just copy its link
+ copyCurrent.Points = make(map[string][]float32, len(current.Points))
+ for k, v := range current.Points {
+ copyCurrent.Points[k] = v
+ }
+ copyCurrent.Counters = make(map[string]SampledValue, len(current.Counters))
+ for k, v := range current.Counters {
+ copyCurrent.Counters[k] = v
+ }
+ copyCurrent.Samples = make(map[string]SampledValue, len(current.Samples))
+ for k, v := range current.Samples {
+ copyCurrent.Samples[k] = v
+ }
+ current.RUnlock()
+
return intervals
}
diff --git a/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go b/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go
deleted file mode 100644
index f9c6793b6..000000000
--- a/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-package metrics
-
-import (
- "testing"
- "time"
-
- "github.com/pascaldekloe/goe/verify"
-)
-
-func TestDisplayMetrics(t *testing.T) {
- interval := 10 * time.Millisecond
- inm := NewInmemSink(interval, 50*time.Millisecond)
-
- // Add data points
- inm.SetGauge([]string{"foo", "bar"}, 42)
- inm.SetGaugeWithLabels([]string{"foo", "bar"}, 23, []Label{{"a", "b"}})
- inm.EmitKey([]string{"foo", "bar"}, 42)
- inm.IncrCounter([]string{"foo", "bar"}, 20)
- inm.IncrCounter([]string{"foo", "bar"}, 22)
- inm.IncrCounterWithLabels([]string{"foo", "bar"}, 20, []Label{{"a", "b"}})
- inm.IncrCounterWithLabels([]string{"foo", "bar"}, 40, []Label{{"a", "b"}})
- inm.AddSample([]string{"foo", "bar"}, 20)
- inm.AddSample([]string{"foo", "bar"}, 24)
- inm.AddSampleWithLabels([]string{"foo", "bar"}, 23, []Label{{"a", "b"}})
- inm.AddSampleWithLabels([]string{"foo", "bar"}, 33, []Label{{"a", "b"}})
-
- data := inm.Data()
- if len(data) != 1 {
- t.Fatalf("bad: %v", data)
- }
-
- expected := MetricsSummary{
- Timestamp: data[0].Interval.Round(time.Second).UTC().String(),
- Gauges: []GaugeValue{
- {
- Name: "foo.bar",
- Hash: "foo.bar",
- Value: float32(42),
- DisplayLabels: map[string]string{},
- },
- {
- Name: "foo.bar",
- Hash: "foo.bar;a=b",
- Value: float32(23),
- DisplayLabels: map[string]string{"a": "b"},
- },
- },
- Points: []PointValue{
- {
- Name: "foo.bar",
- Points: []float32{42},
- },
- },
- Counters: []SampledValue{
- {
- Name: "foo.bar",
- Hash: "foo.bar",
- AggregateSample: &AggregateSample{
- Count: 2,
- Min: 20,
- Max: 22,
- Sum: 42,
- SumSq: 884,
- Rate: 4200,
- },
- Mean: 21,
- Stddev: 1.4142135623730951,
- },
- {
- Name: "foo.bar",
- Hash: "foo.bar;a=b",
- AggregateSample: &AggregateSample{
- Count: 2,
- Min: 20,
- Max: 40,
- Sum: 60,
- SumSq: 2000,
- Rate: 6000,
- },
- Mean: 30,
- Stddev: 14.142135623730951,
- DisplayLabels: map[string]string{"a": "b"},
- },
- },
- Samples: []SampledValue{
- {
- Name: "foo.bar",
- Hash: "foo.bar",
- AggregateSample: &AggregateSample{
- Count: 2,
- Min: 20,
- Max: 24,
- Sum: 44,
- SumSq: 976,
- Rate: 4400,
- },
- Mean: 22,
- Stddev: 2.8284271247461903,
- },
- {
- Name: "foo.bar",
- Hash: "foo.bar;a=b",
- AggregateSample: &AggregateSample{
- Count: 2,
- Min: 23,
- Max: 33,
- Sum: 56,
- SumSq: 1618,
- Rate: 5600,
- },
- Mean: 28,
- Stddev: 7.0710678118654755,
- DisplayLabels: map[string]string{"a": "b"},
- },
- },
- }
-
- raw, err := inm.DisplayMetrics(nil, nil)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- result := raw.(MetricsSummary)
-
- // Ignore the LastUpdated field, we don't export that anyway
- for i, got := range result.Counters {
- expected.Counters[i].LastUpdated = got.LastUpdated
- }
- for i, got := range result.Samples {
- expected.Samples[i].LastUpdated = got.LastUpdated
- }
-
- verify.Values(t, "all", result, expected)
-}
diff --git a/vendor/github.com/armon/go-metrics/inmem_signal_test.go b/vendor/github.com/armon/go-metrics/inmem_signal_test.go
deleted file mode 100644
index c992d6bce..000000000
--- a/vendor/github.com/armon/go-metrics/inmem_signal_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package metrics
-
-import (
- "bytes"
- "os"
- "strings"
- "syscall"
- "testing"
- "time"
-)
-
-func TestInmemSignal(t *testing.T) {
- buf := bytes.NewBuffer(nil)
- inm := NewInmemSink(10*time.Millisecond, 50*time.Millisecond)
- sig := NewInmemSignal(inm, syscall.SIGUSR1, buf)
- defer sig.Stop()
-
- inm.SetGauge([]string{"foo"}, 42)
- inm.EmitKey([]string{"bar"}, 42)
- inm.IncrCounter([]string{"baz"}, 42)
- inm.AddSample([]string{"wow"}, 42)
- inm.SetGaugeWithLabels([]string{"asdf"}, 42, []Label{{"a", "b"}})
- inm.IncrCounterWithLabels([]string{"qwer"}, 42, []Label{{"a", "b"}})
- inm.AddSampleWithLabels([]string{"zxcv"}, 42, []Label{{"a", "b"}})
-
- // Wait for period to end
- time.Sleep(15 * time.Millisecond)
-
- // Send signal!
- syscall.Kill(os.Getpid(), syscall.SIGUSR1)
-
- // Wait for flush
- time.Sleep(10 * time.Millisecond)
-
- // Check the output
- out := string(buf.Bytes())
- if !strings.Contains(out, "[G] 'foo': 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[P] 'bar': 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[C] 'baz': Count: 1 Sum: 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[S] 'wow': Count: 1 Sum: 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[G] 'asdf.b': 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[C] 'qwer.b': Count: 1 Sum: 42") {
- t.Fatalf("bad: %v", out)
- }
- if !strings.Contains(out, "[S] 'zxcv.b': Count: 1 Sum: 42") {
- t.Fatalf("bad: %v", out)
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/inmem_test.go b/vendor/github.com/armon/go-metrics/inmem_test.go
deleted file mode 100644
index 3b037c70d..000000000
--- a/vendor/github.com/armon/go-metrics/inmem_test.go
+++ /dev/null
@@ -1,190 +0,0 @@
-package metrics
-
-import (
- "math"
- "net/url"
- "strings"
- "testing"
- "time"
-)
-
-func TestInmemSink(t *testing.T) {
- inm := NewInmemSink(10*time.Millisecond, 50*time.Millisecond)
-
- data := inm.Data()
- if len(data) != 1 {
- t.Fatalf("bad: %v", data)
- }
-
- // Add data points
- inm.SetGauge([]string{"foo", "bar"}, 42)
- inm.SetGaugeWithLabels([]string{"foo", "bar"}, 23, []Label{{"a", "b"}})
- inm.EmitKey([]string{"foo", "bar"}, 42)
- inm.IncrCounter([]string{"foo", "bar"}, 20)
- inm.IncrCounter([]string{"foo", "bar"}, 22)
- inm.IncrCounterWithLabels([]string{"foo", "bar"}, 20, []Label{{"a", "b"}})
- inm.IncrCounterWithLabels([]string{"foo", "bar"}, 22, []Label{{"a", "b"}})
- inm.AddSample([]string{"foo", "bar"}, 20)
- inm.AddSample([]string{"foo", "bar"}, 22)
- inm.AddSampleWithLabels([]string{"foo", "bar"}, 23, []Label{{"a", "b"}})
-
- data = inm.Data()
- if len(data) != 1 {
- t.Fatalf("bad: %v", data)
- }
-
- intvM := data[0]
- intvM.RLock()
-
- if time.Now().Sub(intvM.Interval) > 10*time.Millisecond {
- t.Fatalf("interval too old")
- }
- if intvM.Gauges["foo.bar"].Value != 42 {
- t.Fatalf("bad val: %v", intvM.Gauges)
- }
- if intvM.Gauges["foo.bar;a=b"].Value != 23 {
- t.Fatalf("bad val: %v", intvM.Gauges)
- }
- if intvM.Points["foo.bar"][0] != 42 {
- t.Fatalf("bad val: %v", intvM.Points)
- }
-
- for _, agg := range []SampledValue{intvM.Counters["foo.bar"], intvM.Counters["foo.bar;a=b"]} {
- if agg.Count != 2 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.Rate != 4200 {
- t.Fatalf("bad val: %v", agg.Rate)
- }
- if agg.Sum != 42 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.SumSq != 884 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.Min != 20 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.Max != 22 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.AggregateSample.Mean() != 21 {
- t.Fatalf("bad val: %v", agg)
- }
- if agg.AggregateSample.Stddev() != math.Sqrt(2) {
- t.Fatalf("bad val: %v", agg)
- }
-
- if agg.LastUpdated.IsZero() {
- t.Fatalf("agg.LastUpdated is not set: %v", agg)
- }
-
- diff := time.Now().Sub(agg.LastUpdated).Seconds()
- if diff > 1 {
- t.Fatalf("time diff too great: %f", diff)
- }
- }
-
- if _, ok := intvM.Samples["foo.bar"]; !ok {
- t.Fatalf("missing sample")
- }
-
- if _, ok := intvM.Samples["foo.bar;a=b"]; !ok {
- t.Fatalf("missing sample")
- }
-
- intvM.RUnlock()
-
- for i := 1; i < 10; i++ {
- time.Sleep(10 * time.Millisecond)
- inm.SetGauge([]string{"foo", "bar"}, 42)
- data = inm.Data()
- if len(data) != min(i+1, 5) {
- t.Fatalf("bad: %v", data)
- }
- }
-
- // Should not exceed 5 intervals!
- time.Sleep(10 * time.Millisecond)
- inm.SetGauge([]string{"foo", "bar"}, 42)
- data = inm.Data()
- if len(data) != 5 {
- t.Fatalf("bad: %v", data)
- }
-}
-
-func TestNewInmemSinkFromURL(t *testing.T) {
- for _, tc := range []struct {
- desc string
- input string
- expectErr string
- expectInterval time.Duration
- expectRetain time.Duration
- }{
- {
- desc: "interval and duration are set via query params",
- input: "inmem://?interval=11s&retain=22s",
- expectInterval: duration(t, "11s"),
- expectRetain: duration(t, "22s"),
- },
- {
- desc: "interval is required",
- input: "inmem://?retain=22s",
- expectErr: "Bad 'interval' param",
- },
- {
- desc: "interval must be a duration",
- input: "inmem://?retain=30s&interval=HIYA",
- expectErr: "Bad 'interval' param",
- },
- {
- desc: "retain is required",
- input: "inmem://?interval=30s",
- expectErr: "Bad 'retain' param",
- },
- {
- desc: "retain must be a valid duration",
- input: "inmem://?interval=30s&retain=HELLO",
- expectErr: "Bad 'retain' param",
- },
- } {
- t.Run(tc.desc, func(t *testing.T) {
- u, err := url.Parse(tc.input)
- if err != nil {
- t.Fatalf("error parsing URL: %s", err)
- }
- ms, err := NewInmemSinkFromURL(u)
- if tc.expectErr != "" {
- if !strings.Contains(err.Error(), tc.expectErr) {
- t.Fatalf("expected err: %q, to contain: %q", err, tc.expectErr)
- }
- } else {
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- is := ms.(*InmemSink)
- if is.interval != tc.expectInterval {
- t.Fatalf("expected interval %s, got: %s", tc.expectInterval, is.interval)
- }
- if is.retain != tc.expectRetain {
- t.Fatalf("expected retain %s, got: %s", tc.expectRetain, is.retain)
- }
- }
- })
- }
-}
-
-func min(a, b int) int {
- if a < b {
- return a
- }
- return b
-}
-
-func duration(t *testing.T, s string) time.Duration {
- dur, err := time.ParseDuration(s)
- if err != nil {
- t.Fatalf("error parsing duration: %s", err)
- }
- return dur
-}
diff --git a/vendor/github.com/armon/go-metrics/metrics_test.go b/vendor/github.com/armon/go-metrics/metrics_test.go
deleted file mode 100644
index 8556a0019..000000000
--- a/vendor/github.com/armon/go-metrics/metrics_test.go
+++ /dev/null
@@ -1,411 +0,0 @@
-package metrics
-
-import (
- "reflect"
- "runtime"
- "testing"
- "time"
-)
-
-func mockMetric() (*MockSink, *Metrics) {
- m := &MockSink{}
- met := &Metrics{Config: Config{FilterDefault: true}, sink: m}
- return m, met
-}
-
-func TestMetrics_SetGauge(t *testing.T) {
- m, met := mockMetric()
- met.SetGauge([]string{"key"}, float32(1))
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- labels := []Label{{"a", "b"}}
- met.SetGaugeWithLabels([]string{"key"}, float32(1), labels)
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
- if !reflect.DeepEqual(m.labels[0], labels) {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.HostName = "test"
- met.EnableHostname = true
- met.SetGauge([]string{"key"}, float32(1))
- if m.keys[0][0] != "test" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.EnableTypePrefix = true
- met.SetGauge([]string{"key"}, float32(1))
- if m.keys[0][0] != "gauge" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.ServiceName = "service"
- met.SetGauge([]string{"key"}, float32(1))
- if m.keys[0][0] != "service" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-}
-
-func TestMetrics_EmitKey(t *testing.T) {
- m, met := mockMetric()
- met.EmitKey([]string{"key"}, float32(1))
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.EnableTypePrefix = true
- met.EmitKey([]string{"key"}, float32(1))
- if m.keys[0][0] != "kv" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.ServiceName = "service"
- met.EmitKey([]string{"key"}, float32(1))
- if m.keys[0][0] != "service" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-}
-
-func TestMetrics_IncrCounter(t *testing.T) {
- m, met := mockMetric()
- met.IncrCounter([]string{"key"}, float32(1))
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- labels := []Label{{"a", "b"}}
- met.IncrCounterWithLabels([]string{"key"}, float32(1), labels)
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
- if !reflect.DeepEqual(m.labels[0], labels) {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.EnableTypePrefix = true
- met.IncrCounter([]string{"key"}, float32(1))
- if m.keys[0][0] != "counter" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.ServiceName = "service"
- met.IncrCounter([]string{"key"}, float32(1))
- if m.keys[0][0] != "service" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-}
-
-func TestMetrics_AddSample(t *testing.T) {
- m, met := mockMetric()
- met.AddSample([]string{"key"}, float32(1))
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- labels := []Label{{"a", "b"}}
- met.AddSampleWithLabels([]string{"key"}, float32(1), labels)
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
- if !reflect.DeepEqual(m.labels[0], labels) {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.EnableTypePrefix = true
- met.AddSample([]string{"key"}, float32(1))
- if m.keys[0][0] != "sample" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.ServiceName = "service"
- met.AddSample([]string{"key"}, float32(1))
- if m.keys[0][0] != "service" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] != 1 {
- t.Fatalf("")
- }
-}
-
-func TestMetrics_MeasureSince(t *testing.T) {
- m, met := mockMetric()
- met.TimerGranularity = time.Millisecond
- n := time.Now()
- met.MeasureSince([]string{"key"}, n)
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] > 0.1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.TimerGranularity = time.Millisecond
- labels := []Label{{"a", "b"}}
- met.MeasureSinceWithLabels([]string{"key"}, n, labels)
- if m.keys[0][0] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] > 0.1 {
- t.Fatalf("")
- }
- if !reflect.DeepEqual(m.labels[0], labels) {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.TimerGranularity = time.Millisecond
- met.EnableTypePrefix = true
- met.MeasureSince([]string{"key"}, n)
- if m.keys[0][0] != "timer" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] > 0.1 {
- t.Fatalf("")
- }
-
- m, met = mockMetric()
- met.TimerGranularity = time.Millisecond
- met.ServiceName = "service"
- met.MeasureSince([]string{"key"}, n)
- if m.keys[0][0] != "service" || m.keys[0][1] != "key" {
- t.Fatalf("")
- }
- if m.vals[0] > 0.1 {
- t.Fatalf("")
- }
-}
-
-func TestMetrics_EmitRuntimeStats(t *testing.T) {
- runtime.GC()
- m, met := mockMetric()
- met.emitRuntimeStats()
-
- if m.keys[0][0] != "runtime" || m.keys[0][1] != "num_goroutines" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[0] <= 1 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[1][0] != "runtime" || m.keys[1][1] != "alloc_bytes" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[1] <= 40000 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[2][0] != "runtime" || m.keys[2][1] != "sys_bytes" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[2] <= 100000 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[3][0] != "runtime" || m.keys[3][1] != "malloc_count" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[3] <= 100 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[4][0] != "runtime" || m.keys[4][1] != "free_count" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[4] <= 100 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[5][0] != "runtime" || m.keys[5][1] != "heap_objects" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[5] <= 100 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[6][0] != "runtime" || m.keys[6][1] != "total_gc_pause_ns" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[6] <= 100000 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[7][0] != "runtime" || m.keys[7][1] != "total_gc_runs" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[7] < 1 {
- t.Fatalf("bad val: %v", m.vals)
- }
-
- if m.keys[8][0] != "runtime" || m.keys[8][1] != "gc_pause_ns" {
- t.Fatalf("bad key %v", m.keys)
- }
- if m.vals[8] <= 1000 {
- t.Fatalf("bad val: %v", m.vals)
- }
-}
-
-func TestInsert(t *testing.T) {
- k := []string{"hi", "bob"}
- exp := []string{"hi", "there", "bob"}
- out := insert(1, "there", k)
- if !reflect.DeepEqual(exp, out) {
- t.Fatalf("bad insert %v %v", exp, out)
- }
-}
-
-func TestMetrics_Filter_Blacklist(t *testing.T) {
- m := &MockSink{}
- conf := DefaultConfig("")
- conf.AllowedPrefixes = []string{"service", "debug.thing"}
- conf.BlockedPrefixes = []string{"debug"}
- conf.EnableHostname = false
- met, err := New(conf, m)
- if err != nil {
- t.Fatal(err)
- }
-
- // Allowed by default
- key := []string{"thing"}
- met.SetGauge(key, 1)
- if !reflect.DeepEqual(m.keys[0], key) {
- t.Fatalf("key doesn't exist %v, %v", m.keys[0], key)
- }
- if m.vals[0] != 1 {
- t.Fatalf("bad val: %v", m.vals[0])
- }
-
- // Allowed by filter
- key = []string{"service", "thing"}
- met.SetGauge(key, 2)
- if !reflect.DeepEqual(m.keys[1], key) {
- t.Fatalf("key doesn't exist")
- }
- if m.vals[1] != 2 {
- t.Fatalf("bad val: %v", m.vals[1])
- }
-
- // Allowed by filter, subtree of a blocked entry
- key = []string{"debug", "thing"}
- met.SetGauge(key, 3)
- if !reflect.DeepEqual(m.keys[2], key) {
- t.Fatalf("key doesn't exist")
- }
- if m.vals[2] != 3 {
- t.Fatalf("bad val: %v", m.vals[2])
- }
-
- // Blocked by filter
- key = []string{"debug", "other-thing"}
- met.SetGauge(key, 4)
- if len(m.keys) != 3 {
- t.Fatalf("key shouldn't exist")
- }
-}
-
-func TestMetrics_Filter_Whitelist(t *testing.T) {
- m := &MockSink{}
- conf := DefaultConfig("")
- conf.AllowedPrefixes = []string{"service", "debug.thing"}
- conf.BlockedPrefixes = []string{"debug"}
- conf.FilterDefault = false
- conf.EnableHostname = false
- met, err := New(conf, m)
- if err != nil {
- t.Fatal(err)
- }
-
- // Blocked by default
- key := []string{"thing"}
- met.SetGauge(key, 1)
- if len(m.keys) != 0 {
- t.Fatalf("key should not exist")
- }
-
- // Allowed by filter
- key = []string{"service", "thing"}
- met.SetGauge(key, 2)
- if !reflect.DeepEqual(m.keys[0], key) {
- t.Fatalf("key doesn't exist")
- }
- if m.vals[0] != 2 {
- t.Fatalf("bad val: %v", m.vals[0])
- }
-
- // Allowed by filter, subtree of a blocked entry
- key = []string{"debug", "thing"}
- met.SetGauge(key, 3)
- if !reflect.DeepEqual(m.keys[1], key) {
- t.Fatalf("key doesn't exist")
- }
- if m.vals[1] != 3 {
- t.Fatalf("bad val: %v", m.vals[1])
- }
-
- // Blocked by filter
- key = []string{"debug", "other-thing"}
- met.SetGauge(key, 4)
- if len(m.keys) != 2 {
- t.Fatalf("key shouldn't exist")
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/prometheus/prometheus.go b/vendor/github.com/armon/go-metrics/prometheus/prometheus.go
deleted file mode 100644
index a5b27d6d3..000000000
--- a/vendor/github.com/armon/go-metrics/prometheus/prometheus.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// +build go1.3
-package prometheus
-
-import (
- "fmt"
- "strings"
- "sync"
- "time"
-
- "regexp"
-
- "github.com/armon/go-metrics"
- "github.com/prometheus/client_golang/prometheus"
-)
-
-var (
- // DefaultPrometheusOpts is the default set of options used when creating a
- // PrometheusSink.
- DefaultPrometheusOpts = PrometheusOpts{
- Expiration: 60 * time.Second,
- }
-)
-
-// PrometheusOpts is used to configure the Prometheus Sink
-type PrometheusOpts struct {
- // Expiration is the duration a metric is valid for, after which it will be
- // untracked. If the value is zero, a metric is never expired.
- Expiration time.Duration
-}
-
-type PrometheusSink struct {
- mu sync.Mutex
- gauges map[string]prometheus.Gauge
- summaries map[string]prometheus.Summary
- counters map[string]prometheus.Counter
- updates map[string]time.Time
- expiration time.Duration
-}
-
-// NewPrometheusSink creates a new PrometheusSink using the default options.
-func NewPrometheusSink() (*PrometheusSink, error) {
- return NewPrometheusSinkFrom(DefaultPrometheusOpts)
-}
-
-// NewPrometheusSinkFrom creates a new PrometheusSink using the passed options.
-func NewPrometheusSinkFrom(opts PrometheusOpts) (*PrometheusSink, error) {
- sink := &PrometheusSink{
- gauges: make(map[string]prometheus.Gauge),
- summaries: make(map[string]prometheus.Summary),
- counters: make(map[string]prometheus.Counter),
- updates: make(map[string]time.Time),
- expiration: opts.Expiration,
- }
-
- return sink, prometheus.Register(sink)
-}
-
-// Describe is needed to meet the Collector interface.
-func (p *PrometheusSink) Describe(c chan<- *prometheus.Desc) {
- // We must emit some description otherwise an error is returned. This
- // description isn't shown to the user!
- prometheus.NewGauge(prometheus.GaugeOpts{Name: "Dummy", Help: "Dummy"}).Describe(c)
-}
-
-// Collect meets the collection interface and allows us to enforce our expiration
-// logic to clean up ephemeral metrics if their value haven't been set for a
-// duration exceeding our allowed expiration time.
-func (p *PrometheusSink) Collect(c chan<- prometheus.Metric) {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- expire := p.expiration != 0
- now := time.Now()
- for k, v := range p.gauges {
- last := p.updates[k]
- if expire && last.Add(p.expiration).Before(now) {
- delete(p.updates, k)
- delete(p.gauges, k)
- } else {
- v.Collect(c)
- }
- }
- for k, v := range p.summaries {
- last := p.updates[k]
- if expire && last.Add(p.expiration).Before(now) {
- delete(p.updates, k)
- delete(p.summaries, k)
- } else {
- v.Collect(c)
- }
- }
- for k, v := range p.counters {
- last := p.updates[k]
- if expire && last.Add(p.expiration).Before(now) {
- delete(p.updates, k)
- delete(p.counters, k)
- } else {
- v.Collect(c)
- }
- }
-}
-
-var forbiddenChars = regexp.MustCompile("[ .=\\-]")
-
-func (p *PrometheusSink) flattenKey(parts []string, labels []metrics.Label) (string, string) {
- key := strings.Join(parts, "_")
- key = forbiddenChars.ReplaceAllString(key, "_")
-
- hash := key
- for _, label := range labels {
- hash += fmt.Sprintf(";%s=%s", label.Name, label.Value)
- }
-
- return key, hash
-}
-
-func prometheusLabels(labels []metrics.Label) prometheus.Labels {
- l := make(prometheus.Labels)
- for _, label := range labels {
- l[label.Name] = label.Value
- }
- return l
-}
-
-func (p *PrometheusSink) SetGauge(parts []string, val float32) {
- p.SetGaugeWithLabels(parts, val, nil)
-}
-
-func (p *PrometheusSink) SetGaugeWithLabels(parts []string, val float32, labels []metrics.Label) {
- p.mu.Lock()
- defer p.mu.Unlock()
- key, hash := p.flattenKey(parts, labels)
- g, ok := p.gauges[hash]
- if !ok {
- g = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: key,
- Help: key,
- ConstLabels: prometheusLabels(labels),
- })
- p.gauges[hash] = g
- }
- g.Set(float64(val))
- p.updates[hash] = time.Now()
-}
-
-func (p *PrometheusSink) AddSample(parts []string, val float32) {
- p.AddSampleWithLabels(parts, val, nil)
-}
-
-func (p *PrometheusSink) AddSampleWithLabels(parts []string, val float32, labels []metrics.Label) {
- p.mu.Lock()
- defer p.mu.Unlock()
- key, hash := p.flattenKey(parts, labels)
- g, ok := p.summaries[hash]
- if !ok {
- g = prometheus.NewSummary(prometheus.SummaryOpts{
- Name: key,
- Help: key,
- MaxAge: 10 * time.Second,
- ConstLabels: prometheusLabels(labels),
- })
- p.summaries[hash] = g
- }
- g.Observe(float64(val))
- p.updates[hash] = time.Now()
-}
-
-// EmitKey is not implemented. Prometheus doesn’t offer a type for which an
-// arbitrary number of values is retained, as Prometheus works with a pull
-// model, rather than a push model.
-func (p *PrometheusSink) EmitKey(key []string, val float32) {
-}
-
-func (p *PrometheusSink) IncrCounter(parts []string, val float32) {
- p.IncrCounterWithLabels(parts, val, nil)
-}
-
-func (p *PrometheusSink) IncrCounterWithLabels(parts []string, val float32, labels []metrics.Label) {
- p.mu.Lock()
- defer p.mu.Unlock()
- key, hash := p.flattenKey(parts, labels)
- g, ok := p.counters[hash]
- if !ok {
- g = prometheus.NewCounter(prometheus.CounterOpts{
- Name: key,
- Help: key,
- ConstLabels: prometheusLabels(labels),
- })
- p.counters[hash] = g
- }
- g.Add(float64(val))
- p.updates[hash] = time.Now()
-}
diff --git a/vendor/github.com/armon/go-metrics/sink_test.go b/vendor/github.com/armon/go-metrics/sink_test.go
deleted file mode 100644
index 714f99b81..000000000
--- a/vendor/github.com/armon/go-metrics/sink_test.go
+++ /dev/null
@@ -1,272 +0,0 @@
-package metrics
-
-import (
- "reflect"
- "strings"
- "testing"
-)
-
-type MockSink struct {
- keys [][]string
- vals []float32
- labels [][]Label
-}
-
-func (m *MockSink) SetGauge(key []string, val float32) {
- m.SetGaugeWithLabels(key, val, nil)
-}
-func (m *MockSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {
- m.keys = append(m.keys, key)
- m.vals = append(m.vals, val)
- m.labels = append(m.labels, labels)
-}
-func (m *MockSink) EmitKey(key []string, val float32) {
- m.keys = append(m.keys, key)
- m.vals = append(m.vals, val)
- m.labels = append(m.labels, nil)
-}
-func (m *MockSink) IncrCounter(key []string, val float32) {
- m.IncrCounterWithLabels(key, val, nil)
-}
-func (m *MockSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {
- m.keys = append(m.keys, key)
- m.vals = append(m.vals, val)
- m.labels = append(m.labels, labels)
-}
-func (m *MockSink) AddSample(key []string, val float32) {
- m.AddSampleWithLabels(key, val, nil)
-}
-func (m *MockSink) AddSampleWithLabels(key []string, val float32, labels []Label) {
- m.keys = append(m.keys, key)
- m.vals = append(m.vals, val)
- m.labels = append(m.labels, labels)
-}
-
-func TestFanoutSink_Gauge(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- fh.SetGauge(k, v)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
-}
-
-func TestFanoutSink_Gauge_Labels(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- l := []Label{{"a", "b"}}
- fh.SetGaugeWithLabels(k, v, l)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m1.labels[0], l) {
- t.Fatalf("labels not equal")
- }
- if !reflect.DeepEqual(m2.labels[0], l) {
- t.Fatalf("labels not equal")
- }
-}
-
-func TestFanoutSink_Key(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- fh.EmitKey(k, v)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
-}
-
-func TestFanoutSink_Counter(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- fh.IncrCounter(k, v)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
-}
-
-func TestFanoutSink_Counter_Labels(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- l := []Label{{"a", "b"}}
- fh.IncrCounterWithLabels(k, v, l)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m1.labels[0], l) {
- t.Fatalf("labels not equal")
- }
- if !reflect.DeepEqual(m2.labels[0], l) {
- t.Fatalf("labels not equal")
- }
-}
-
-func TestFanoutSink_Sample(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- fh.AddSample(k, v)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
-}
-
-func TestFanoutSink_Sample_Labels(t *testing.T) {
- m1 := &MockSink{}
- m2 := &MockSink{}
- fh := &FanoutSink{m1, m2}
-
- k := []string{"test"}
- v := float32(42.0)
- l := []Label{{"a", "b"}}
- fh.AddSampleWithLabels(k, v, l)
-
- if !reflect.DeepEqual(m1.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m2.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if !reflect.DeepEqual(m1.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m2.vals[0], v) {
- t.Fatalf("val not equal")
- }
- if !reflect.DeepEqual(m1.labels[0], l) {
- t.Fatalf("labels not equal")
- }
- if !reflect.DeepEqual(m2.labels[0], l) {
- t.Fatalf("labels not equal")
- }
-}
-
-func TestNewMetricSinkFromURL(t *testing.T) {
- for _, tc := range []struct {
- desc string
- input string
- expect reflect.Type
- expectErr string
- }{
- {
- desc: "statsd scheme yields a StatsdSink",
- input: "statsd://someserver:123",
- expect: reflect.TypeOf(&StatsdSink{}),
- },
- {
- desc: "statsite scheme yields a StatsiteSink",
- input: "statsite://someserver:123",
- expect: reflect.TypeOf(&StatsiteSink{}),
- },
- {
- desc: "inmem scheme yields an InmemSink",
- input: "inmem://?interval=30s&retain=30s",
- expect: reflect.TypeOf(&InmemSink{}),
- },
- {
- desc: "unknown scheme yields an error",
- input: "notasink://whatever",
- expectErr: "unrecognized sink name: \"notasink\"",
- },
- } {
- t.Run(tc.desc, func(t *testing.T) {
- ms, err := NewMetricSinkFromURL(tc.input)
- if tc.expectErr != "" {
- if !strings.Contains(err.Error(), tc.expectErr) {
- t.Fatalf("expected err: %q to contain: %q", err, tc.expectErr)
- }
- } else {
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- got := reflect.TypeOf(ms)
- if got != tc.expect {
- t.Fatalf("expected return type to be %v, got: %v", tc.expect, got)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/start_test.go b/vendor/github.com/armon/go-metrics/start_test.go
deleted file mode 100644
index f85a5bec3..000000000
--- a/vendor/github.com/armon/go-metrics/start_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package metrics
-
-import (
- "io/ioutil"
- "log"
- "reflect"
- "sync/atomic"
- "testing"
- "time"
-)
-
-func TestDefaultConfig(t *testing.T) {
- conf := DefaultConfig("service")
- if conf.ServiceName != "service" {
- t.Fatalf("Bad name")
- }
- if conf.HostName == "" {
- t.Fatalf("missing hostname")
- }
- if !conf.EnableHostname || !conf.EnableRuntimeMetrics {
- t.Fatalf("expect true")
- }
- if conf.EnableTypePrefix {
- t.Fatalf("expect false")
- }
- if conf.TimerGranularity != time.Millisecond {
- t.Fatalf("bad granularity")
- }
- if conf.ProfileInterval != time.Second {
- t.Fatalf("bad interval")
- }
-}
-
-func Test_GlobalMetrics(t *testing.T) {
- var tests = []struct {
- desc string
- key []string
- val float32
- fn func([]string, float32)
- }{
- {"SetGauge", []string{"test"}, 42, SetGauge},
- {"EmitKey", []string{"test"}, 42, EmitKey},
- {"IncrCounter", []string{"test"}, 42, IncrCounter},
- {"AddSample", []string{"test"}, 42, AddSample},
- }
-
- for _, tt := range tests {
- t.Run(tt.desc, func(t *testing.T) {
- s := &MockSink{}
- globalMetrics.Store(&Metrics{Config: Config{FilterDefault: true}, sink: s})
- tt.fn(tt.key, tt.val)
- if got, want := s.keys[0], tt.key; !reflect.DeepEqual(got, want) {
- t.Fatalf("got key %s want %s", got, want)
- }
- if got, want := s.vals[0], tt.val; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
- })
- }
-}
-
-func Test_GlobalMetrics_Labels(t *testing.T) {
- labels := []Label{{"a", "b"}}
- var tests = []struct {
- desc string
- key []string
- val float32
- fn func([]string, float32, []Label)
- labels []Label
- }{
- {"SetGaugeWithLabels", []string{"test"}, 42, SetGaugeWithLabels, labels},
- {"IncrCounterWithLabels", []string{"test"}, 42, IncrCounterWithLabels, labels},
- {"AddSampleWithLabels", []string{"test"}, 42, AddSampleWithLabels, labels},
- }
-
- for _, tt := range tests {
- t.Run(tt.desc, func(t *testing.T) {
- s := &MockSink{}
- globalMetrics.Store(&Metrics{Config: Config{FilterDefault: true}, sink: s})
- tt.fn(tt.key, tt.val, tt.labels)
- if got, want := s.keys[0], tt.key; !reflect.DeepEqual(got, want) {
- t.Fatalf("got key %s want %s", got, want)
- }
- if got, want := s.vals[0], tt.val; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
- if got, want := s.labels[0], tt.labels; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
- })
- }
-}
-
-func Test_GlobalMetrics_DefaultLabels(t *testing.T) {
- config := Config{
- HostName: "host1",
- ServiceName: "redis",
- EnableHostnameLabel: true,
- EnableServiceLabel: true,
- FilterDefault: true,
- }
- labels := []Label{
- {"host", config.HostName},
- {"service", config.ServiceName},
- }
- var tests = []struct {
- desc string
- key []string
- val float32
- fn func([]string, float32, []Label)
- labels []Label
- }{
- {"SetGaugeWithLabels", []string{"test"}, 42, SetGaugeWithLabels, labels},
- {"IncrCounterWithLabels", []string{"test"}, 42, IncrCounterWithLabels, labels},
- {"AddSampleWithLabels", []string{"test"}, 42, AddSampleWithLabels, labels},
- }
-
- for _, tt := range tests {
- t.Run(tt.desc, func(t *testing.T) {
- s := &MockSink{}
- globalMetrics.Store(&Metrics{Config: config, sink: s})
- tt.fn(tt.key, tt.val, nil)
- if got, want := s.keys[0], tt.key; !reflect.DeepEqual(got, want) {
- t.Fatalf("got key %s want %s", got, want)
- }
- if got, want := s.vals[0], tt.val; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
- if got, want := s.labels[0], tt.labels; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
- })
- }
-}
-
-func Test_GlobalMetrics_MeasureSince(t *testing.T) {
- s := &MockSink{}
- m := &Metrics{sink: s, Config: Config{TimerGranularity: time.Millisecond, FilterDefault: true}}
- globalMetrics.Store(m)
-
- k := []string{"test"}
- now := time.Now()
- MeasureSince(k, now)
-
- if !reflect.DeepEqual(s.keys[0], k) {
- t.Fatalf("key not equal")
- }
- if s.vals[0] > 0.1 {
- t.Fatalf("val too large %v", s.vals[0])
- }
-
- labels := []Label{{"a", "b"}}
- MeasureSinceWithLabels(k, now, labels)
- if got, want := s.keys[1], k; !reflect.DeepEqual(got, want) {
- t.Fatalf("got key %s want %s", got, want)
- }
- if s.vals[1] > 0.1 {
- t.Fatalf("val too large %v", s.vals[0])
- }
- if got, want := s.labels[1], labels; !reflect.DeepEqual(got, want) {
- t.Fatalf("got val %s want %s", got, want)
- }
-}
-
-func Test_GlobalMetrics_UpdateFilter(t *testing.T) {
- globalMetrics.Store(&Metrics{Config: Config{
- AllowedPrefixes: []string{"a"},
- BlockedPrefixes: []string{"b"},
- }})
- UpdateFilter([]string{"c"}, []string{"d"})
-
- m := globalMetrics.Load().(*Metrics)
- if m.AllowedPrefixes[0] != "c" {
- t.Fatalf("bad: %v", m.AllowedPrefixes)
- }
- if m.BlockedPrefixes[0] != "d" {
- t.Fatalf("bad: %v", m.BlockedPrefixes)
- }
-}
-
-// Benchmark_GlobalMetrics_Direct/direct-8 5000000 278 ns/op
-// Benchmark_GlobalMetrics_Direct/atomic.Value-8 5000000 235 ns/op
-func Benchmark_GlobalMetrics_Direct(b *testing.B) {
- log.SetOutput(ioutil.Discard)
- s := &MockSink{}
- m := &Metrics{sink: s}
- var v atomic.Value
- v.Store(m)
- k := []string{"test"}
- b.Run("direct", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- m.IncrCounter(k, 1)
- }
- })
- b.Run("atomic.Value", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- v.Load().(*Metrics).IncrCounter(k, 1)
- }
- })
- // do something with m so that the compiler does not optimize this away
- b.Logf("%d", m.lastNumGC)
-}
diff --git a/vendor/github.com/armon/go-metrics/statsd_test.go b/vendor/github.com/armon/go-metrics/statsd_test.go
deleted file mode 100644
index bdf36cc00..000000000
--- a/vendor/github.com/armon/go-metrics/statsd_test.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package metrics
-
-import (
- "bufio"
- "bytes"
- "net"
- "net/url"
- "strings"
- "testing"
- "time"
-)
-
-func TestStatsd_Flatten(t *testing.T) {
- s := &StatsdSink{}
- flat := s.flattenKey([]string{"a", "b", "c", "d"})
- if flat != "a.b.c.d" {
- t.Fatalf("Bad flat")
- }
-}
-
-func TestStatsd_PushFullQueue(t *testing.T) {
- q := make(chan string, 1)
- q <- "full"
-
- s := &StatsdSink{metricQueue: q}
- s.pushMetric("omit")
-
- out := <-q
- if out != "full" {
- t.Fatalf("bad val %v", out)
- }
-
- select {
- case v := <-q:
- t.Fatalf("bad val %v", v)
- default:
- }
-}
-
-func TestStatsd_Conn(t *testing.T) {
- addr := "127.0.0.1:7524"
- done := make(chan bool)
- go func() {
- list, err := net.ListenUDP("udp", &net.UDPAddr{IP: net.ParseIP("127.0.0.1"), Port: 7524})
- if err != nil {
- panic(err)
- }
- defer list.Close()
- buf := make([]byte, 1500)
- n, err := list.Read(buf)
- if err != nil {
- panic(err)
- }
- buf = buf[:n]
- reader := bufio.NewReader(bytes.NewReader(buf))
-
- line, err := reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "gauge.val:1.000000|g\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "gauge_labels.val.label:2.000000|g\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "key.other:3.000000|kv\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "counter.me:4.000000|c\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "counter_labels.me.label:5.000000|c\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "sample.slow_thingy:6.000000|ms\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "sample_labels.slow_thingy.label:7.000000|ms\n" {
- t.Fatalf("bad line %s", line)
- }
-
- done <- true
- }()
- s, err := NewStatsdSink(addr)
- if err != nil {
- t.Fatalf("bad error")
- }
-
- s.SetGauge([]string{"gauge", "val"}, float32(1))
- s.SetGaugeWithLabels([]string{"gauge_labels", "val"}, float32(2), []Label{{"a", "label"}})
- s.EmitKey([]string{"key", "other"}, float32(3))
- s.IncrCounter([]string{"counter", "me"}, float32(4))
- s.IncrCounterWithLabels([]string{"counter_labels", "me"}, float32(5), []Label{{"a", "label"}})
- s.AddSample([]string{"sample", "slow thingy"}, float32(6))
- s.AddSampleWithLabels([]string{"sample_labels", "slow thingy"}, float32(7), []Label{{"a", "label"}})
-
- select {
- case <-done:
- s.Shutdown()
- case <-time.After(3 * time.Second):
- t.Fatalf("timeout")
- }
-}
-
-func TestNewStatsdSinkFromURL(t *testing.T) {
- for _, tc := range []struct {
- desc string
- input string
- expectErr string
- expectAddr string
- }{
- {
- desc: "address is populated",
- input: "statsd://statsd.service.consul",
- expectAddr: "statsd.service.consul",
- },
- {
- desc: "address includes port",
- input: "statsd://statsd.service.consul:1234",
- expectAddr: "statsd.service.consul:1234",
- },
- } {
- t.Run(tc.desc, func(t *testing.T) {
- u, err := url.Parse(tc.input)
- if err != nil {
- t.Fatalf("error parsing URL: %s", err)
- }
- ms, err := NewStatsdSinkFromURL(u)
- if tc.expectErr != "" {
- if !strings.Contains(err.Error(), tc.expectErr) {
- t.Fatalf("expected err: %q, to contain: %q", err, tc.expectErr)
- }
- } else {
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- is := ms.(*StatsdSink)
- if is.addr != tc.expectAddr {
- t.Fatalf("expected addr %s, got: %s", tc.expectAddr, is.addr)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/armon/go-metrics/statsite_test.go b/vendor/github.com/armon/go-metrics/statsite_test.go
deleted file mode 100644
index 92687889b..000000000
--- a/vendor/github.com/armon/go-metrics/statsite_test.go
+++ /dev/null
@@ -1,171 +0,0 @@
-package metrics
-
-import (
- "bufio"
- "net"
- "net/url"
- "strings"
- "testing"
- "time"
-)
-
-func acceptConn(addr string) net.Conn {
- ln, _ := net.Listen("tcp", addr)
- conn, _ := ln.Accept()
- return conn
-}
-
-func TestStatsite_Flatten(t *testing.T) {
- s := &StatsiteSink{}
- flat := s.flattenKey([]string{"a", "b", "c", "d"})
- if flat != "a.b.c.d" {
- t.Fatalf("Bad flat")
- }
-}
-
-func TestStatsite_PushFullQueue(t *testing.T) {
- q := make(chan string, 1)
- q <- "full"
-
- s := &StatsiteSink{metricQueue: q}
- s.pushMetric("omit")
-
- out := <-q
- if out != "full" {
- t.Fatalf("bad val %v", out)
- }
-
- select {
- case v := <-q:
- t.Fatalf("bad val %v", v)
- default:
- }
-}
-
-func TestStatsite_Conn(t *testing.T) {
- addr := "localhost:7523"
- done := make(chan bool)
- go func() {
- conn := acceptConn(addr)
- reader := bufio.NewReader(conn)
-
- line, err := reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "gauge.val:1.000000|g\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "gauge_labels.val.label:2.000000|g\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "key.other:3.000000|kv\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "counter.me:4.000000|c\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "counter_labels.me.label:5.000000|c\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "sample.slow_thingy:6.000000|ms\n" {
- t.Fatalf("bad line %s", line)
- }
-
- line, err = reader.ReadString('\n')
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- if line != "sample_labels.slow_thingy.label:7.000000|ms\n" {
- t.Fatalf("bad line %s", line)
- }
-
- conn.Close()
- done <- true
- }()
- s, err := NewStatsiteSink(addr)
- if err != nil {
- t.Fatalf("bad error")
- }
-
- s.SetGauge([]string{"gauge", "val"}, float32(1))
- s.SetGaugeWithLabels([]string{"gauge_labels", "val"}, float32(2), []Label{{"a", "label"}})
- s.EmitKey([]string{"key", "other"}, float32(3))
- s.IncrCounter([]string{"counter", "me"}, float32(4))
- s.IncrCounterWithLabels([]string{"counter_labels", "me"}, float32(5), []Label{{"a", "label"}})
- s.AddSample([]string{"sample", "slow thingy"}, float32(6))
- s.AddSampleWithLabels([]string{"sample_labels", "slow thingy"}, float32(7), []Label{{"a", "label"}})
-
- select {
- case <-done:
- s.Shutdown()
- case <-time.After(3 * time.Second):
- t.Fatalf("timeout")
- }
-}
-
-func TestNewStatsiteSinkFromURL(t *testing.T) {
- for _, tc := range []struct {
- desc string
- input string
- expectErr string
- expectAddr string
- }{
- {
- desc: "address is populated",
- input: "statsd://statsd.service.consul",
- expectAddr: "statsd.service.consul",
- },
- {
- desc: "address includes port",
- input: "statsd://statsd.service.consul:1234",
- expectAddr: "statsd.service.consul:1234",
- },
- } {
- t.Run(tc.desc, func(t *testing.T) {
- u, err := url.Parse(tc.input)
- if err != nil {
- t.Fatalf("error parsing URL: %s", err)
- }
- ms, err := NewStatsiteSinkFromURL(u)
- if tc.expectErr != "" {
- if !strings.Contains(err.Error(), tc.expectErr) {
- t.Fatalf("expected err: %q, to contain: %q", err, tc.expectErr)
- }
- } else {
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- is := ms.(*StatsiteSink)
- if is.addr != tc.expectAddr {
- t.Fatalf("expected addr %s, got: %s", tc.expectAddr, is.addr)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/avct/uasurfer/uasurfer_test.go b/vendor/github.com/avct/uasurfer/uasurfer_test.go
deleted file mode 100644
index 7a4688bb2..000000000
--- a/vendor/github.com/avct/uasurfer/uasurfer_test.go
+++ /dev/null
@@ -1,1074 +0,0 @@
-package uasurfer
-
-import "testing"
-
-var testUAVars = []struct {
- UA string
- UserAgent
-}{
- // Empty
- {"",
- UserAgent{}},
-
- // Single char
- {"a",
- UserAgent{}},
-
- // Some random string
- {"some random string",
- UserAgent{}},
-
- // Potentially malformed ua
- {")(",
- UserAgent{}},
-
- // iPhone
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/546.10 (KHTML, like Gecko) Version/6.0 Mobile/7E18WD Safari/8536.25",
- UserAgent{
- Browser{BrowserSafari, Version{6, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{7, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4",
- UserAgent{
- Browser{BrowserSafari, Version{8, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{8, 0, 2}}, DevicePhone}},
-
- // iPad
- {"Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10",
- UserAgent{
- Browser{BrowserSafari, Version{4, 0, 4}}, OS{PlatformiPad, OSiOS, Version{3, 2, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPad; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4",
- UserAgent{
- Browser{BrowserSafari, Version{8, 0, 0}}, OS{PlatformiPad, OSiOS, Version{9, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.32 (KHTML, like Gecko) Version/10.0 Mobile/14A5261v Safari/602.1",
- UserAgent{
- Browser{BrowserSafari, Version{10, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{10, 0, 0}}, DevicePhone}},
-
- // Chrome
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{43, 0, 2357}}, OS{PlatformMac, OSMacOSX, Version{10, 10, 4}}, DeviceComputer}},
-
- {"Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/534.48.3",
- UserAgent{
- Browser{BrowserChrome, Version{19, 0, 1084}}, OS{PlatformiPhone, OSiOS, Version{5, 1, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; Android 6.0; Nexus 5X Build/MDB08L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{46, 0, 2490}}, OS{PlatformLinux, OSAndroid, Version{6, 0, 0}}, DevicePhone}},
-
- // Chromium (Chrome)
- {"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.142 Chrome/18.0.1025.142 Safari/535.19",
- UserAgent{
- Browser{BrowserChrome, Version{18, 0, 1025}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{45, 0, 2454}}, OS{PlatformMac, OSMacOSX, Version{10, 11, 0}}, DeviceComputer}},
-
- //TODO: refactor "getVersion()" to handle this device/chrome version douchebaggery
- // {"Mozilla/5.0 (Linux; Android 4.4.2; en-gb; SAMSUNG SM-G800F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36",
- // UserAgent{
- // Browser{BrowserChrome, Version{28,0,1500}, OS{PlatformLinux, OSAndroid, Version{4,4,2}}, DevicePhone}},
-
- // Safari
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12",
- UserAgent{
- Browser{BrowserSafari, Version{8, 0, 7}}, OS{PlatformMac, OSMacOSX, Version{10, 10, 4}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12",
- UserAgent{
- Browser{BrowserSafari, Version{3, 2, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 5, 5}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.32 (KHTML, like Gecko) Version/10.0 Safari/602.1.32", // macOS Sierra dev beta
- UserAgent{
- Browser{BrowserSafari, Version{10, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 12, 0}}, DeviceComputer}},
-
- // Firefox
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4",
- UserAgent{
- Browser{BrowserFirefox, Version{1, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{8, 3, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0",
- UserAgent{
- Browser{BrowserFirefox, Version{41, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 4, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Android; Mobile; rv:40.0) Gecko/40.0 Firefox/40.0",
- UserAgent{
- Browser{BrowserFirefox, Version{40, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0",
- UserAgent{
- Browser{BrowserFirefox, Version{38, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- // Silk
- {"Mozilla/5.0 (Linux; U; Android 4.4.3; de-de; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.47 like Chrome/37.0.2026.117 Safari/537.36",
- UserAgent{
- Browser{BrowserSilk, Version{3, 47, 0}}, OS{PlatformLinux, OSKindle, Version{4, 4, 3}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Linux; U; en-us; KFJWI Build/IMM76D) AppleWebKit/535.19 (KHTML like Gecko) Silk/2.4 Safari/535.19 Silk-Acceleratedtrue",
- UserAgent{
- Browser{BrowserSilk, Version{2, 4, 0}}, OS{PlatformLinux, OSKindle, Version{0, 0, 0}}, DeviceTablet}},
-
- // Opera
- {"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.1284.68",
- UserAgent{
- Browser{BrowserOpera, Version{18, 0, 1284}}, OS{PlatformWindows, OSWindows, Version{6, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) OPiOS/10.2.0.93022 Mobile/12H143 Safari/9537.53",
- UserAgent{
- Browser{BrowserOpera, Version{10, 2, 0}}, OS{PlatformiPhone, OSiOS, Version{8, 4, 0}}, DevicePhone}},
-
- // Internet Explorer -- https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
- {"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.123",
- UserAgent{
- Browser{BrowserIE, Version{12, 123, 0}}, OS{PlatformWindows, OSWindows, Version{10, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)",
- UserAgent{
- Browser{BrowserIE, Version{10, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 2, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 3, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; DEVICE INFO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.123",
- UserAgent{
- Browser{BrowserIE, Version{12, 123, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{10, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{8, 1, 0}}, DevicePhone}},
-
- {"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)",
- UserAgent{
- Browser{BrowserIE, Version{5, 0, 1}}, OS{PlatformWindows, OSWindows, Version{5, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 1.1.4322)",
- UserAgent{
- Browser{BrowserIE, Version{7, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)", //Windows Surface RT tablet
- UserAgent{
- Browser{BrowserIE, Version{10, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 2, 0}}, DeviceTablet}},
-
- // UC Browser
- {"Mozilla/5.0 (Linux; U; Android 2.3.4; en-US; MT11i Build/4.0.2.A.0.62) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.0.1.275 U3/0.8.0 Mobile Safari/534.31",
- UserAgent{
- Browser{BrowserUCBrowser, Version{9, 0, 1}}, OS{PlatformLinux, OSAndroid, Version{2, 3, 4}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.0.4; en-US; Micromax P255 Build/IMM76D) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.2.0.308 U3/0.8.0 Mobile Safari/534.31",
- UserAgent{
- Browser{BrowserUCBrowser, Version{9, 2, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 0, 4}}, DevicePhone}},
-
- {"UCWEB/2.0 (Java; U; MIDP-2.0; en-US; MicromaxQ5) U2/1.0.0 UCBrowser/9.4.0.342 U2/1.0.0 Mobile",
- UserAgent{
- Browser{BrowserUCBrowser, Version{9, 4, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DevicePhone}},
-
- // Nokia Browser
- // {"Mozilla/5.0 (Series40; Nokia501/14.0.4/java_runtime_version=Nokia_Asha_1_2; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/4.0.0.0.45",
- // UserAgent{
- // Browser{BrowserUnknown, Version{4,0,0}}, OS{PlatformUnknown, OSUnknown, Version{0,0,0}}, DevicePhone}},
-
- // {"Mozilla/5.0 (Symbian/3; Series60/5.3 NokiaN8-00/111.040.1511; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.1.4 Mobile Safari/535.1",
- // UserAgent{
- // Browser{BrowserUnknown, Version{8,0,0}}, OS{PlatformUnknown, OSUnknown, Version{0,0,0}}, DevicePhone}},
-
- // {"NokiaN97/21.1.107 (SymbianOS/9.4; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebkit/525 (KHTML, like Gecko) BrowserNG/7.1.4",
- // BrowserUnknown, Version{7,0,0}}, OS{PlatformUnknown, OSUnknown, Version{0,0,0}}, DevicePhone}},
-
- // ChromeOS
- {"Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.253.0 Safari/532.5",
- UserAgent{
- Browser{BrowserChrome, Version{4, 0, 253}}, OS{PlatformLinux, OSChromeOS, Version{0, 0, 0}}, DeviceComputer}},
-
- // iPod, iPod Touch
- {"mozilla/5.0 (ipod touch; cpu iphone os 9_3_3 like mac os x) applewebkit/601.1.46 (khtml, like gecko) version/9.0 mobile/13g34 safari/601.1",
- UserAgent{
- Browser{BrowserSafari, Version{9, 0, 0}}, OS{PlatformiPod, OSiOS, Version{9, 3, 3}}, DeviceTablet}},
-
- {"mozilla/5.0 (ipod; cpu iphone os 6_1_6 like mac os x) applewebkit/536.26 (khtml, like gecko) version/6.0 mobile/10b500 safari/8536.25",
- UserAgent{
- Browser{BrowserSafari, Version{6, 0, 0}}, OS{PlatformiPod, OSiOS, Version{6, 1, 6}}, DeviceTablet}},
-
- // WebOS
- {"Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; de-DE) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (webOS/1.4.1.1; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{1, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DevicePhone}},
-
- // Android WebView (Android <= 4.3)
- {"Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 2, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari53/4.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 0, 3}}, DevicePhone}},
-
- // BlackBerry
- {"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+",
- UserAgent{
- Browser{BrowserBlackberry, Version{7, 2, 1}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.2.1.1925 Mobile Safari/537.35+",
- UserAgent{
- Browser{BrowserBlackberry, Version{10, 2, 1}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BlackBerry8703e/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/104",
- UserAgent{
- Browser{BrowserBlackberry, Version{0, 0, 0}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DevicePhone}},
-
- // Windows Phone
- {"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 625; ANZ941)",
- UserAgent{
- Browser{BrowserIE, Version{10, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{8, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 900)",
- UserAgent{
- Browser{BrowserIE, Version{9, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{7, 5, 0}}, DevicePhone}},
-
- // Kindle eReader
- {"Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600×800; rotate)",
- UserAgent{
- Browser{BrowserUnknown, Version{4, 0, 0}}, OS{PlatformLinux, OSKindle, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+",
- UserAgent{
- Browser{BrowserUnknown, Version{5, 0, 0}}, OS{PlatformLinux, OSKindle, Version{0, 0, 0}}, DeviceTablet}},
-
- // Amazon Fire
- {"Mozilla/5.0 (Linux; U; Android 4.4.3; de-de; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.67 like Chrome/39.0.2171.93 Safari/537.36",
- UserAgent{
- Browser{BrowserSilk, Version{3, 67, 0}}, OS{PlatformLinux, OSKindle, Version{4, 4, 3}}, DeviceTablet}}, // Fire tablet
-
- {"Mozilla/5.0 (Linux; U; Android 4.2.2; en­us; KFTHWI Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.22 like Chrome/34.0.1847.137 Mobile Safari/537.36",
- UserAgent{
- Browser{BrowserSilk, Version{3, 22, 0}}, OS{PlatformLinux, OSKindle, Version{4, 2, 2}}, DeviceTablet}}, // Fire tablet, but with "Mobile"
-
- {"Mozilla/5.0 (Linux; Android 4.4.4; SD4930UR Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/34.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]",
- UserAgent{
- Browser{BrowserChrome, Version{34, 0, 0}}, OS{PlatformLinux, OSKindle, Version{4, 4, 4}}, DevicePhone}}, // Facebook app on Fire Phone
-
- {"mozilla/5.0 (linux; android 4.4.3; kfthwi build/ktu84m) applewebkit/537.36 (khtml, like gecko) version/4.0 chrome/34.0.0.0 safari/537.36 [pinterest/android]",
- UserAgent{
- Browser{BrowserChrome, Version{34, 0, 0}}, OS{PlatformLinux, OSKindle, Version{4, 4, 3}}, DeviceTablet}}, // Fire tablet running pinterest
-
- // extra logic to identify phone when using silk has not been added
- // {"Mozilla/5.0 (Linux; Android 4.4.4; SD4930UR Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.67 like Chrome/39.0.2171.93 Mobile Safari/537.36",
- // UserAgent{
- // Browser{BrowserSilk, Version{3,0,0}}, OS{PlatformLinux, OSKindle, Version{4,0,0}}, DevicePhone}}, // Silk on Fire Phone
-
- // Nintendo
- {"Opera/9.30 (Nintendo Wii; U; ; 2047-7; fr)",
- UserAgent{
- Browser{BrowserOpera, Version{9, 30, 0}}, OS{PlatformNintendo, OSNintendo, Version{0, 0, 0}}, DeviceConsole}},
-
- {"Mozilla/5.0 (Nintendo WiiU) AppleWebKit/534.52 (KHTML, like Gecko) NX/2.1.0.8.21 NintendoBrowser/1.0.0.7494.US",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformNintendo, OSNintendo, Version{0, 0, 0}}, DeviceConsole}},
-
- // Xbox
- {"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)", //Xbox 360
- UserAgent{
- Browser{BrowserIE, Version{9, 0, 0}}, OS{PlatformXbox, OSXbox, Version{6, 1, 0}}, DeviceConsole}},
-
- // Playstation
- {"Mozilla/5.0 (PlayStation 4 4.50) AppleWebKit/601.2 (KHTML, like Gecko)",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformPlaystation, OSPlaystation, Version{0, 0, 0}}, DeviceConsole}},
-
- {"Mozilla/5.0 (Playstation Vita 1.61) AppleWebKit/531.22.8 (KHTML, like Gecko) Silk/3.2",
- UserAgent{
- Browser{BrowserSilk, Version{3, 2, 0}}, OS{PlatformPlaystation, OSPlaystation, Version{0, 0, 0}}, DeviceConsole}},
-
- // Smart TVs and TV dongles
- {"Mozilla/5.0 (CrKey armv7l 1.4.15250) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.0 Safari/537.36", // Chromecast
- UserAgent{
- Browser{BrowserChrome, Version{31, 0, 1650}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DeviceTV}},
-
- {"Mozilla/5.0 (Linux; GoogleTV 3.2; VAP430 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24", // Google TV
- UserAgent{
- Browser{BrowserChrome, Version{11, 0, 696}}, OS{PlatformLinux, OSAndroid, Version{0, 0, 0}}, DeviceTV}},
-
- {"Mozilla/5.0 (Linux; Android 5.0; ADT-1 Build/LPX13D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.89 Mobile Safari/537.36", // Android TV
- UserAgent{
- Browser{BrowserChrome, Version{40, 0, 2214}}, OS{PlatformLinux, OSAndroid, Version{5, 0, 0}}, DeviceTV}},
-
- {"Mozilla/5.0 (Linux; Android 4.2.2; AFTB Build/JDQ39) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.173 Mobile Safari/537.22", // Amazon Fire
- UserAgent{
- Browser{BrowserChrome, Version{25, 0, 1364}}, OS{PlatformLinux, OSAndroid, Version{4, 2, 2}}, DeviceTV}},
-
- {"Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.1+ (KHTML, like Gecko) Safari/537.1+ LG Browser/6.00.00(+mouse+3D+SCREEN+TUNER; LGE; GLOBAL-PLAT5; 03.07.01; 0x00000001;); LG NetCast.TV-2013/03.17.01 (LG, GLOBAL-PLAT4, wired)", // LG TV
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceTV}},
-
- {"Mozilla/5.0 (X11; FreeBSD; U; Viera; de-DE) AppleWebKit/537.11 (KHTML, like Gecko) Viera/3.10.0 Chrome/23.0.1271.97 Safari/537.11", // Panasonic Viera
- UserAgent{
- Browser{BrowserChrome, Version{23, 0, 1271}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceTV}},
-
- // TODO: not catching "browser/" and reporting as safari -- ua string not being fully checked?
- // {"Mozilla/5.0 (DTV) AppleWebKit/531.2+ (KHTML, like Gecko) Espial/6.1.5 AQUOSBrowser/2.0 (US01DTV;V;0001;0001)", // Sharp Aquos
- // BrowserUnknown, Version{0,0,0}}, OS{PlatformUnknown, OSUnknown, Version{0,0,0}}, DeviceTV}},
-
- {"Roku/DVP-5.2 (025.02E03197A)", // Roku
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DeviceTV}},
-
- {"mozilla/5.0 (smart-tv; linux; tizen 2.3) applewebkit/538.1 (khtml, like gecko) samsungbrowser/1.0 tv safari/538.1", // Samsung SmartTV
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceTV}},
-
- {"mozilla/5.0 (linux; u) applewebkit/537.36 (khtml, like gecko) version/4.0 mobile safari/537.36 smarttv/6.0 (netcast)",
- UserAgent{
- Browser{BrowserUnknown, Version{4, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceTV}},
-
- // Google search app (GSA) for iOS -- it's Safari in disguise as of v6
- {"Mozilla/5.0 (iPad; CPU OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/6.0.51363 Mobile/12F69 Safari/600.1.4",
- UserAgent{
- Browser{BrowserSafari, Version{8, 3, 0}}, OS{PlatformiPad, OSiOS, Version{8, 3, 0}}, DeviceTablet}},
-
- // Spotify (applicable for advertising applications)
- {"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Spotify/1.0.9.133 Safari/537.36",
- UserAgent{
- Browser{BrowserSpotify, Version{1, 0, 9}}, OS{PlatformWindows, OSWindows, Version{5, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Spotify/1.0.9.133 Safari/537.36",
- UserAgent{
- Browser{BrowserSpotify, Version{1, 0, 9}}, OS{PlatformMac, OSMacOSX, Version{10, 10, 2}}, DeviceComputer}},
-
- // OCSP fetchers
- {"Microsoft-CryptoAPI/10.0",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformWindows, OSUnknown, Version{0, 0, 0}}, DeviceComputer}},
- {"trustd (unknown version) CFNetwork/811.7.2 Darwin/16.7.0 (x86_64)",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformMac, OSUnknown, Version{0, 0, 0}}, DeviceComputer}},
- {"ocspd (unknown version) CFNetwork/520.5.3 Darwin/11.4.2 (x86_64)(MacBookAir5%2C2)",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformMac, OSUnknown, Version{0, 0, 0}}, DeviceComputer}},
- // Bots
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Applebot/0.1; +http://www.apple.com/go/applebot)",
- UserAgent{
- Browser{BrowserAppleBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{10, 10, 1}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)",
- UserAgent{
- Browser{BrowserBaiduBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)",
- UserAgent{
- Browser{BrowserBingBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)",
- UserAgent{
- Browser{BrowserDuckDuckGoBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
- UserAgent{
- Browser{BrowserFacebookBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Facebot/1.0",
- UserAgent{
- Browser{BrowserFacebookBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
- UserAgent{
- Browser{BrowserGoogleBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)",
- UserAgent{
- Browser{BrowserLinkedInBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"msnbot/2.0b (+http://search.msn.com/msnbot.htm)",
- UserAgent{
- Browser{BrowserMsnBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)",
- UserAgent{
- Browser{BrowserPingdomBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Twitterbot/1.0",
- UserAgent{
- Browser{BrowserTwitterBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)",
- UserAgent{
- Browser{BrowserYandexBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)",
- UserAgent{
- Browser{BrowserYahooBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- // {"Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
- // BrowserBot, Version{0,0,0}}, OS{PlatformBot, OSBot, Version{6,0,0}}, DeviceComputer}},
-
- {"mozilla/5.0 (unknown; linux x86_64) applewebkit/538.1 (khtml, like gecko) phantomjs/2.1.1 safari/538.1",
- UserAgent{
- Browser{BrowserBot, Version{0, 0, 0}}, OS{PlatformBot, OSBot, Version{0, 0, 0}}, DeviceComputer}},
-
- // Unknown or partially handled
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b3pre) Gecko/20090223 SeaMonkey/2.0a3", //Seamonkey (~FF)
- UserAgent{
- Browser{BrowserFirefox, Version{0, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 4, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9.0.8pre) Gecko/2009022800 Camino/2.0b3pre", //Camino (~FF)
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 5, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0", //firefox OS
- UserAgent{
- Browser{BrowserFirefox, Version{26, 0, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19", //chrome for android having requested desktop site
- UserAgent{
- Browser{BrowserChrome, Version{18, 0, 1025}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Opera/9.80 (S60; SymbOS; Opera Mobi/352; U; de) Presto/2.4.15 Version/10.00",
- UserAgent{
- Browser{BrowserOpera, Version{10, 0, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DevicePhone}},
-
- // BrowserQQ
- // {"Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3; Tablet PC 2.0; QQBrowser/7.6.21433.400; rv:11.0) like Gecko",
- // UserAgent{
- // Browser{BrowserQQ, Version{7,0,0}}, OS{PlatformWindows, OSWindows, Version{8,0,0}}, DeviceTablet}},
-
- // {"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36 QQBrowser/9.0.2191.400",
- // UserAgent{
- // Browser{BrowserQQ, Version{9,0,0}}, OS{PlatformWindows, OSWindows, Version{7,0,0}}, DeviceComputer}},
-
- // ANDROID TESTS
-
- {"Mozilla/5.0 (Linux; U; Android 1.0; en-us; dream) AppleWebKit/525.10+ (KHTML,like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.0; en-us; generic) AppleWebKit/525.10 (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.0.3; de-de; A80KSC Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{1, 0, 3}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.5; en-gb; T-Mobile G1 Build/CRC1) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 1, 2}}, OS{PlatformLinux, OSAndroid, Version{1, 5, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.5; es-; FBW1_4 Build/MASTER) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 5, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux U; Android 1.5 en-us hero) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 5, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.5; en-us; Opus One Build/RBE.00.00) AppleWebKit/528.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile Safari/525.20.1",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 1, 1}}, OS{PlatformLinux, OSAndroid, Version{1, 5, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.6; ar-us; SonyEricssonX10i Build/R2BA026) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 1, 2}}, OS{PlatformLinux, OSAndroid, Version{1, 6, 0}}, DevicePhone}},
-
- // TODO: support names of Android OS?
- //{"Mozilla/5.0 (Linux; U; Android Donut; de-de; HTC Tattoo 1.52.161.1 Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1",
- // UserAgent{
- // Browser{BrowserAndroid, Version{3, 1, 2}}, OS{PlatformLinux, OSAndroid, Version{1, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.6; en-gb; HTC Tattoo Build/DRC79) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 6, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; Docomo HT-03A Build/DRD08) AppleWebKit/525.10 (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{1, 6, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 1, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.1-update1; en-au; HTC_Desire_A8183 V1.16.841.1 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 1, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.1; en-us; generic) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{2, 1, 0}}, DevicePhone}},
-
- // TODO support named versions of Android?
- {"Mozilla/5.0 (Linux; U; Android Eclair; en-us; sholes) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2",
- UserAgent{
- Browser{BrowserAndroid, Version{3, 0, 4}}, OS{PlatformLinux, OSAndroid, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.2; en-sa; HTC_DesireHD_A9191 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 2, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; HTC_DesireZ_A7272 Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 2, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; Sensation_4G Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/5.0 Safari/533.16",
- UserAgent{
- Browser{BrowserAndroid, Version{5, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 3, 3}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.3.5; ko-kr; SHW-M250S Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 3, 5}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 2.3.7; ja-jp; L-02D Build/GWK74) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{2, 3, 7}}, DevicePhone}},
-
- // TODO: is tablet, not phone
- {"Mozilla/5.0 (Linux; U; Android 3.0; xx-xx; Transformer TF101 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{3, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{3, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.0.1; en-us; sdk Build/ICS_MR0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 0, 1}}, DevicePhone}},
-
- // TODO support "android-" version prefix
- // However, can't find reference to this naming scheme in real-world UA gathering
- // {"Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7",
- // UserAgent{
- // Browser{BrowserChrome, Version{16,0,0}}, OS{PlatformLinux, OSAndroid, Version{4,0,0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Nexus S Build/JRO03E) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 1, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.1; en-gb; Build/JRN84D) AppleWebKit/534.30 (KHTML like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 1, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.1.1; el-gr; MB525 Build/JRO03H; CyanogenMod-10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 1, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.1.1; fr-fr; MB525 Build/JRO03H; CyanogenMod-10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 1, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.2; en-us; Nexus 10 Build/JVP15I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 2, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Linux; U; Android 4.2; ro-ro; LT18i Build/4.1.B.0.431) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
- UserAgent{
- Browser{BrowserAndroid, Version{4, 0, 0}}, OS{PlatformLinux, OSAndroid, Version{4, 2, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JWR66D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.111 Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{27, 0, 1453}}, OS{PlatformLinux, OSAndroid, Version{4, 3, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Linux; Android 4.4; Nexus 7 Build/KOT24) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{30, 0, 1599}}, OS{PlatformLinux, OSAndroid, Version{4, 4, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari",
- UserAgent{
- Browser{BrowserChrome, Version{30, 0, 1599}}, OS{PlatformLinux, OSAndroid, Version{4, 4, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; Android 6.0.1; SM-G930V Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{52, 0, 2743}}, OS{PlatformLinux, OSAndroid, Version{6, 0, 1}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; Android 7.0; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{52, 0, 2743}}, OS{PlatformLinux, OSAndroid, Version{7, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Linux; Android 7.0; Nexus 6P Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Mobile Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{52, 0, 2743}}, OS{PlatformLinux, OSAndroid, Version{7, 0, 0}}, DevicePhone}},
-
- // BLACKBERRY TESTS
-
- {"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BlackBerry8703e/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/104",
- UserAgent{
- Browser{BrowserBlackberry, Version{0, 0, 0}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile Safari/537.10+",
- UserAgent{
- Browser{BrowserBlackberry, Version{10, 1, 0}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.2.1.1925 Mobile Safari/537.35+",
- UserAgent{
- Browser{BrowserBlackberry, Version{10, 2, 1}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11 (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11",
- UserAgent{
- Browser{BrowserBlackberry, Version{7, 1, 0}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+",
- UserAgent{
- Browser{BrowserBlackberry, Version{7, 2, 1}}, OS{PlatformBlackberry, OSBlackberry, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.253.0 Safari/532.5",
- UserAgent{
- Browser{BrowserChrome, Version{4, 0, 253}}, OS{PlatformLinux, OSChromeOS, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (X11; CrOS armv7l 5500.100.6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.120 Safari/537.36",
- UserAgent{
- Browser{BrowserChrome, Version{34, 0, 1847}}, OS{PlatformLinux, OSChromeOS, Version{0, 0, 0}}, DeviceComputer}},
-
- // {"Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0",
- // UserAgent{
- // Browser{BrowserFirefox, 14, OSFirefoxOS, 14}, DevicePhone}},
-
- // {"Mozilla/5.0 (Mobile; rv:17.0) Gecko/17.0 Firefox/17.0",
- // UserAgent{
- // Browser{BrowserFirefox, , OSFirefoxOS}, DevicePhone}},
-
- // {"Mozilla/5.0 (Mobile; rv:18.1) Gecko/18.1 Firefox/18.1",
- // UserAgent{
- // Browser{BrowserFirefox, , OSFirefoxOS}, DevicePhone}},
-
- // {"Mozilla/5.0 (Tablet; rv:18.1) Gecko/18.1 Firefox/18.1",
- // UserAgent{
- // Browser{BrowserFirefox, , OSFirefoxOS}, DevicePhone}},
-
- // {"Mozilla/5.0 (Mobile; LG-D300; rv:18.1) Gecko/18.1 Firefox/18.1",
- // UserAgent{
- // Browser{BrowserFirefox, , OSFirefoxOS}, DevicePhone}},
-
- {"Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10",
- UserAgent{
- Browser{BrowserSafari, Version{4, 0, 4}}, OS{PlatformiPad, OSiOS, Version{3, 2, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7",
- UserAgent{
- Browser{BrowserSafari, Version{4, 0, 5}}, OS{PlatformiPhone, OSiOS, Version{4, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
- UserAgent{
- Browser{BrowserSafari, Version{5, 1, 0}}, OS{PlatformiPhone, OSiOS, Version{5, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
- UserAgent{
- Browser{BrowserSafari, Version{5, 1, 0}}, OS{PlatformiPad, OSiOS, Version{5, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25",
- UserAgent{
- Browser{BrowserSafari, Version{6, 0, 0}}, OS{PlatformiPad, OSiOS, Version{6, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/546.10 (KHTML, like Gecko) Version/6.0 Mobile/7E18WD Safari/8536.25",
- UserAgent{
- Browser{BrowserSafari, Version{6, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{7, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
- UserAgent{
- Browser{BrowserSafari, Version{7, 0, 0}}, OS{PlatformiPad, OSiOS, Version{7, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPad; CPU OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53",
- UserAgent{
- Browser{BrowserSafari, Version{7, 0, 0}}, OS{PlatformiPad, OSiOS, Version{7, 0, 2}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Mobile/14D27 [FBAN/FBIOS;FBAV/86.0.0.48.52;FBBV/53842252;FBDV/iPhone9,1;FBMD/iPhone;FBSN/iOS;FBSV/10.2.1;FBSS/2;FBCR/Verizon;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]",
- UserAgent{
- Browser{BrowserSafari, Version{10, 2, 1}}, OS{PlatformiPhone, OSiOS, Version{10, 2, 1}}, DevicePhone}},
-
- // TODO handle default browser based on iOS version
- // {"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/538.34.9 (KHTML, like Gecko) Mobile/12A4265u",
- // UserAgent{
- // Browser{BrowserSafari, Version{8,0,0}}, OS{PlatformiPhone, OSiOS, Version{8,0,0}}, DevicePhone}},
-
- // TODO extrapolate browser from iOS version
- // {"Mozilla/5.0 (iPad; CPU OS 8_0 like Mac OS X) AppleWebKit/538.34.9 (KHTML, like Gecko) Mobile/12A4265u",
- // UserAgent{
- // Browser{BrowserSafari, Version{8,0,0}}, OS{PlatformiPad, OSiOS, Version{8,0,0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4",
- UserAgent{
- Browser{BrowserSafari, Version{8, 0, 0}}, OS{PlatformiPhone, OSiOS, Version{8, 0, 2}}, DevicePhone}},
-
- {"Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.9.0.14) Gecko/20080528 Ubuntu/9.10 (karmic) Epiphany/2.22 Firefox/3.0",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- // Can't parse browser due to limitation of user agent library
- {"Mozilla/5.0 (X11; U; Linux x86_64; zh-TW; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.04 (hardy) Firefox/3.0.8 GTB5",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 0, 8}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; Konqueror/3.5; Linux; x86_64) KHTML/3.5.5 (like Gecko) (Debian)",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091112 Iceweasel/3.5.5 (like Firefox/3.5.5; Debian-3.5.5-1)",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 5, 5}}, OS{PlatformLinux, OSLinux, Version{0, 0, 0}}, DeviceComputer}},
-
- // TODO consider bot?
- // {"Miro/2.0.4 (http://www.getmiro.com/; Darwin 10.3.0 i386)",
- // UserAgent{
- // Browser{BrowserUnknown, Version{0,0,0}}, OS{PlatformMac, OSMacOSX, Version{3,0,0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b3pre) Gecko/20090223 SeaMonkey/2.0a3",
- UserAgent{
- Browser{BrowserFirefox, Version{0, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 4, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12",
- UserAgent{
- Browser{BrowserSafari, Version{3, 2, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 5, 5}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9.0.8pre) Gecko/2009022800 Camino/2.0b3pre",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 5, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.329.0 Safari/533.1",
- UserAgent{
- Browser{BrowserChrome, Version{5, 0, 329}}, OS{PlatformMac, OSMacOSX, Version{10, 6, 2}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 5, 6}}, OS{PlatformMac, OSMacOSX, Version{10, 6, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7",
- UserAgent{
- Browser{BrowserSafari, Version{5, 1, 2}}, OS{PlatformMac, OSMacOSX, Version{10, 7, 2}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 7, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7",
- UserAgent{
- Browser{BrowserChrome, Version{16, 0, 912}}, OS{PlatformMac, OSMacOSX, Version{10, 7, 2}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/535.18.5 (KHTML, like Gecko) Version/5.2 Safari/535.18.5",
- UserAgent{
- Browser{BrowserSafari, Version{5, 2, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 8, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_8; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5",
- UserAgent{
- Browser{BrowserChrome, Version{4, 0, 249}}, OS{PlatformMac, OSMacOSX, Version{10, 8, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.35.1 (KHTML, like Gecko) Version/6.1 Safari/537.35.1",
- UserAgent{
- Browser{BrowserSafari, Version{6, 1, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 9, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/538.34.48 (KHTML, like Gecko) Version/8.0 Safari/538.35.8",
- UserAgent{
- Browser{BrowserSafari, Version{8, 0, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 10, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/538.32 (KHTML, like Gecko) Version/7.1 Safari/538.4",
- UserAgent{
- Browser{BrowserSafari, Version{7, 1, 0}}, OS{PlatformMac, OSMacOSX, Version{10, 10, 0}}, DeviceComputer}},
-
- {"Opera/9.80 (S60; SymbOS; Opera Mobi/352; U; de) Presto/2.4.15 Version/10.00",
- UserAgent{
- Browser{BrowserOpera, Version{10, 0, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DevicePhone}},
-
- {"Opera/9.80 (S60; SymbOS; Opera Mobi/352; U; de) Presto/2.4.15 Version/10.00",
- UserAgent{
- Browser{BrowserOpera, Version{10, 0, 0}}, OS{PlatformUnknown, OSUnknown, Version{0, 0, 0}}, DevicePhone}},
-
- // TODO: support OneBrowser? https://play.google.com/store/apps/details?id=com.tencent.ibibo.mtt&hl=en_GB
- // {"OneBrowser/3.1 (NokiaN70-1/5.0638.3.0.1)",
- // UserAgent{
- // Browser{BrowserUnknown, Version{0,0,0}}, OS{PlatformUnknown, OSUnknown, Version{0,0,0}}, DevicePhone}},
-
- // WebOS reports itself as safari :(
- {"Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{1, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (webOS/1.4.1.1; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{1, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; de-DE) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformLinux, OSWebOS, Version{0, 0, 0}}, DeviceTablet}},
-
- {"Opera/9.30 (Nintendo Wii; U; ; 2047-7; fr)",
- UserAgent{
- Browser{BrowserOpera, Version{9, 30, 0}}, OS{PlatformNintendo, OSNintendo, Version{0, 0, 0}}, DeviceConsole}},
-
- {"Mozilla/5.0 (Nintendo WiiU) AppleWebKit/534.52 (KHTML, like Gecko) NX/2.1.0.8.21 NintendoBrowser/1.0.0.7494.US",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformNintendo, OSNintendo, Version{0, 0, 0}}, DeviceConsole}},
-
- {"Mozilla/5.0 (Nintendo WiiU) AppleWebKit/536.28 (KHTML, like Gecko) NX/3.0.3.12.6 NintendoBrowser/2.0.0.9362.US",
- UserAgent{
- Browser{BrowserUnknown, Version{0, 0, 0}}, OS{PlatformNintendo, OSNintendo, Version{0, 0, 0}}, DeviceConsole}},
-
- // TODO fails to get opera first -- but is this a real UA string or an uncommon spoof?
- // {"Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0 [en]",
- // BrowserIE, Version{5,0,0}}, OS{PlatformWindows, OSWindows, Version{4,0,0}}, DeviceComputer}},
-
- {"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)",
- UserAgent{
- Browser{BrowserIE, Version{5, 0, 1}}, OS{PlatformWindows, OSWindows, Version{5, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 1.1.4322)",
- UserAgent{
- Browser{BrowserIE, Version{7, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows; U; Windows NT 6.1; sk; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 5, 7}}, OS{PlatformWindows, OSWindows, Version{6, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)",
- UserAgent{
- Browser{BrowserIE, Version{10, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 2, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5",
- UserAgent{
- Browser{BrowserChrome, Version{19, 0, 1084}}, OS{PlatformWindows, OSWindows, Version{6, 2, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15",
- UserAgent{
- Browser{BrowserChrome, Version{24, 0, 1295}}, OS{PlatformWindows, OSWindows, Version{6, 2, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 3, 0}}, DeviceTablet}},
-
- {"Mozilla/5.0 (IE 11.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 3, 0}}, DeviceComputer}},
-
- // {"Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)",
- // UserAgent{
- // Browser{BrowserIE, Version{5,0,0}}, OS{PlatformWindows, OSWindows95, Version{5,0,0}}, DeviceComputer}},
-
- // {"Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.02 [en]",
- // UserAgent{
- // Browser{BrowserIE, Version{5,0,0}}, OS{PlatformWindows, OSWindows95, Version{5,0,0}}, DeviceComputer}},
-
- // {"Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; YComp 5.0.0.0)",
- // UserAgent{
- // Browser{BrowserIE, Version{6,0,0}}, OS{PlatformWindows, OSWindows98, Version{5,0,0}}, DeviceComputer}},
-
- // {"Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)",
- // UserAgent{
- // Browser{BrowserIE, Version{4,0,0}}, OS{PlatformWindows, OSWindows98, Version{5,0,0}}, DeviceComputer}},
-
- // {"Mozilla/5.0 (Windows; U; Windows 98; en-US; rv:1.8.1.8pre) Gecko/20071019 Firefox/2.0.0.8 Navigator/9.0.0.1",
- // UserAgent{
- // Browser{BrowserFirefox, Version{2,0,0}}, OS{PlatformWindows, OSWindows98, Version{5,0,0}}, DeviceComputer}},
-
- //Can't parse due to limitation of user agent library
- // {"Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016",
- // UserAgent{
- // Browser{ BrowserUnknown, Version{0,0,0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{0,0,0}}, DevicePhone}},
-
- // {"Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; 176x220)",
- // UserAgent{
- // Browser{BrowserIE, Version{4,0,0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{0,0,0}}, DevicePhone}},
-
- // Can't parse browser due to limitation of user agent library
- // {"Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 6.0 [de]",
- // UserAgent{
- // Browser{BrowserUnknown, OSWindowsME}, DeviceComputer}},
-
- {"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)",
- UserAgent{
- Browser{BrowserIE, Version{8, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 0, 0}}, DeviceComputer}},
-
- {"Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8",
- UserAgent{
- Browser{BrowserFirefox, Version{3, 5, 8}}, OS{PlatformWindows, OSWindows, Version{5, 1, 0}}, DeviceComputer}},
-
- {"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; )",
- UserAgent{
- Browser{BrowserIE, Version{7, 0, 0}}, OS{PlatformWindows, OSWindows, Version{5, 1, 0}}, DeviceComputer}},
-
- // Can't parse due to limitation of user agent library
- {"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Windows Phone 6.5.3.5)",
- UserAgent{
- Browser{BrowserIE, Version{6, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{6, 5, 3}}, DevicePhone}},
-
- // desktop mode for Windows Phone 7
- {"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)",
- UserAgent{
- Browser{BrowserIE, Version{7, 0, 0}}, OS{PlatformWindows, OSWindows, Version{6, 1, 0}}, DeviceComputer}},
-
- // mobile mode for Windows Phone 7
- {"Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; HTC; T8788)",
- UserAgent{
- Browser{BrowserIE, Version{7, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{7, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)",
- UserAgent{
- Browser{BrowserIE, Version{9, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{7, 5, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)",
- UserAgent{
- Browser{BrowserIE, Version{10, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{8, 0, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch IEMobile/11.0; HTC; Windows Phone 8S by HTC) like Gecko",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{8, 1, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch IEMobile/11.0; NOKIA; 909) like Gecko",
- UserAgent{
- Browser{BrowserIE, Version{11, 0, 0}}, OS{PlatformWindowsPhone, OSWindowsPhone, Version{8, 1, 0}}, DevicePhone}},
-
- {"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)",
- UserAgent{
- Browser{BrowserIE, Version{9, 0, 0}}, OS{PlatformXbox, OSXbox, Version{6, 1, 0}}, DeviceConsole}},
-}
-
-func TestAgentSurfer(t *testing.T) {
- for _, determined := range testUAVars {
- t.Run("", func(t *testing.T) {
- testFuncs := []func(string) *UserAgent{
- Parse,
- func(ua string) *UserAgent {
- u := new(UserAgent)
- ParseUserAgent(ua, u)
- return u
- },
- }
-
- for _, f := range testFuncs {
- ua := f(determined.UA)
-
- if ua.Browser.Name != determined.Browser.Name {
- t.Errorf("browserName: got %v, wanted %v", ua.Browser.Name, determined.Browser.Name)
- t.Logf("agent: %s", determined.UA)
- }
-
- if ua.Browser.Version != determined.Browser.Version {
- t.Errorf("browser version: got %d, wanted %d", ua.Browser.Version, determined.Browser.Version)
- t.Logf("agent: %s", determined.UA)
- }
-
- if ua.OS.Platform != determined.OS.Platform {
- t.Errorf("platform: got %v, wanted %v", ua.OS.Platform, determined.OS.Platform)
- t.Logf("agent: %s", determined.UA)
- }
-
- if ua.OS.Name != determined.OS.Name {
- t.Errorf("os: got %s, wanted %s", ua.OS.Name, determined.OS.Name)
- t.Logf("agent: %s", determined.UA)
- }
-
- if ua.OS.Version != determined.OS.Version {
- t.Errorf("os version: got %d, wanted %d", ua.OS.Version, determined.OS.Version)
- t.Logf("agent: %s", determined.UA)
- }
-
- if ua.DeviceType != determined.DeviceType {
- t.Errorf("device type: got %v, wanted %v", ua.DeviceType, determined.DeviceType)
- t.Logf("agent: %s", determined.UA)
- }
- }
- })
- }
-}
-
-func BenchmarkAgentSurfer(b *testing.B) {
- num := len(testUAVars)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse(testUAVars[i%num].UA)
- }
-}
-
-func BenchmarkAgentSurferReuse(b *testing.B) {
- dest := new(UserAgent)
- num := len(testUAVars)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- dest.Reset()
- ParseUserAgent(testUAVars[i%num].UA, dest)
- }
-}
-
-func BenchmarkEvalSystem(b *testing.B) {
- num := len(testUAVars)
- v := UserAgent{}
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- v.evalOS(testUAVars[i%num].UA)
- }
-}
-
-func BenchmarkEvalBrowserName(b *testing.B) {
- num := len(testUAVars)
- v := UserAgent{}
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- v.evalBrowserName(testUAVars[i%num].UA)
- }
-}
-
-func BenchmarkEvalBrowserVersion(b *testing.B) {
- num := len(testUAVars)
- v := UserAgent{}
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- v.Browser.Name = testUAVars[i%num].Browser.Name
- v.evalBrowserVersion(testUAVars[i%num].UA)
- }
-}
-
-func BenchmarkEvalDevice(b *testing.B) {
- num := len(testUAVars)
- v := UserAgent{}
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- v.OS.Name = testUAVars[i%num].OS.Name
- v.OS.Platform = testUAVars[i%num].OS.Platform
- v.Browser.Name = testUAVars[i%num].Browser.Name
- v.evalDevice(testUAVars[i%num].UA)
- }
-}
-
-// Chrome for Mac
-func BenchmarkParseChromeMac(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36")
- }
-}
-
-// Chrome for Windows
-func BenchmarkParseChromeWin(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36")
- }
-}
-
-// Chrome for Android
-func BenchmarkParseChromeAndroid(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse("Mozilla/5.0 (Linux; Android 4.4.2; GT-P5210 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Safari/537.36")
- }
-}
-
-// Safari for Mac
-func BenchmarkParseSafariMac(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12")
- }
-}
-
-// Safari for iPad
-func BenchmarkParseSafariiPad(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse("Mozilla/5.0 (iPad; CPU OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4")
- }
-}
diff --git a/vendor/github.com/beorn7/perks/.gitignore b/vendor/github.com/beorn7/perks/.gitignore
deleted file mode 100644
index 1bd9209aa..000000000
--- a/vendor/github.com/beorn7/perks/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.test
-*.prof
diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md
deleted file mode 100644
index fc0577770..000000000
--- a/vendor/github.com/beorn7/perks/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Perks for Go (golang.org)
-
-Perks contains the Go package quantile that computes approximate quantiles over
-an unbounded data stream within low memory and CPU bounds.
-
-For more information and examples, see:
-http://godoc.org/github.com/bmizerany/perks
-
-A very special thank you and shout out to Graham Cormode (Rutgers University),
-Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and
-Divesh Srivastava (AT&T Labs–Research) for their research and publication of
-[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf)
-
-Thank you, also:
-* Armon Dadgar (@armon)
-* Andrew Gerrand (@nf)
-* Brad Fitzpatrick (@bradfitz)
-* Keith Rarick (@kr)
-
-FAQ:
-
-Q: Why not move the quantile package into the project root?
-A: I want to add more packages to perks later.
-
-Copyright (C) 2013 Blake Mizerany
-
-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/beorn7/perks/histogram/bench_test.go b/vendor/github.com/beorn7/perks/histogram/bench_test.go
deleted file mode 100644
index 56c7e5516..000000000
--- a/vendor/github.com/beorn7/perks/histogram/bench_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package histogram
-
-import (
- "math/rand"
- "testing"
-)
-
-func BenchmarkInsert10Bins(b *testing.B) {
- b.StopTimer()
- h := New(10)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- f := rand.ExpFloat64()
- h.Insert(f)
- }
-}
-
-func BenchmarkInsert100Bins(b *testing.B) {
- b.StopTimer()
- h := New(100)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- f := rand.ExpFloat64()
- h.Insert(f)
- }
-}
diff --git a/vendor/github.com/beorn7/perks/histogram/histogram.go b/vendor/github.com/beorn7/perks/histogram/histogram.go
deleted file mode 100644
index bef05c70c..000000000
--- a/vendor/github.com/beorn7/perks/histogram/histogram.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Package histogram provides a Go implementation of BigML's histogram package
-// for Clojure/Java. It is currently experimental.
-package histogram
-
-import (
- "container/heap"
- "math"
- "sort"
-)
-
-type Bin struct {
- Count int
- Sum float64
-}
-
-func (b *Bin) Update(x *Bin) {
- b.Count += x.Count
- b.Sum += x.Sum
-}
-
-func (b *Bin) Mean() float64 {
- return b.Sum / float64(b.Count)
-}
-
-type Bins []*Bin
-
-func (bs Bins) Len() int { return len(bs) }
-func (bs Bins) Less(i, j int) bool { return bs[i].Mean() < bs[j].Mean() }
-func (bs Bins) Swap(i, j int) { bs[i], bs[j] = bs[j], bs[i] }
-
-func (bs *Bins) Push(x interface{}) {
- *bs = append(*bs, x.(*Bin))
-}
-
-func (bs *Bins) Pop() interface{} {
- return bs.remove(len(*bs) - 1)
-}
-
-func (bs *Bins) remove(n int) *Bin {
- if n < 0 || len(*bs) < n {
- return nil
- }
- x := (*bs)[n]
- *bs = append((*bs)[:n], (*bs)[n+1:]...)
- return x
-}
-
-type Histogram struct {
- res *reservoir
-}
-
-func New(maxBins int) *Histogram {
- return &Histogram{res: newReservoir(maxBins)}
-}
-
-func (h *Histogram) Insert(f float64) {
- h.res.insert(&Bin{1, f})
- h.res.compress()
-}
-
-func (h *Histogram) Bins() Bins {
- return h.res.bins
-}
-
-type reservoir struct {
- n int
- maxBins int
- bins Bins
-}
-
-func newReservoir(maxBins int) *reservoir {
- return &reservoir{maxBins: maxBins}
-}
-
-func (r *reservoir) insert(bin *Bin) {
- r.n += bin.Count
- i := sort.Search(len(r.bins), func(i int) bool {
- return r.bins[i].Mean() >= bin.Mean()
- })
- if i < 0 || i == r.bins.Len() {
- // TODO(blake): Maybe use an .insert(i, bin) instead of
- // performing the extra work of a heap.Push.
- heap.Push(&r.bins, bin)
- return
- }
- r.bins[i].Update(bin)
-}
-
-func (r *reservoir) compress() {
- for r.bins.Len() > r.maxBins {
- minGapIndex := -1
- minGap := math.MaxFloat64
- for i := 0; i < r.bins.Len()-1; i++ {
- gap := gapWeight(r.bins[i], r.bins[i+1])
- if minGap > gap {
- minGap = gap
- minGapIndex = i
- }
- }
- prev := r.bins[minGapIndex]
- next := r.bins.remove(minGapIndex + 1)
- prev.Update(next)
- }
-}
-
-func gapWeight(prev, next *Bin) float64 {
- return next.Mean() - prev.Mean()
-}
diff --git a/vendor/github.com/beorn7/perks/histogram/histogram_test.go b/vendor/github.com/beorn7/perks/histogram/histogram_test.go
deleted file mode 100644
index 0575ebeee..000000000
--- a/vendor/github.com/beorn7/perks/histogram/histogram_test.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package histogram
-
-import (
- "math/rand"
- "testing"
-)
-
-func TestHistogram(t *testing.T) {
- const numPoints = 1e6
- const maxBins = 3
-
- h := New(maxBins)
- for i := 0; i < numPoints; i++ {
- f := rand.ExpFloat64()
- h.Insert(f)
- }
-
- bins := h.Bins()
- if g := len(bins); g > maxBins {
- t.Fatalf("got %d bins, wanted <= %d", g, maxBins)
- }
-
- for _, b := range bins {
- t.Logf("%+v", b)
- }
-
- if g := count(h.Bins()); g != numPoints {
- t.Fatalf("binned %d points, wanted %d", g, numPoints)
- }
-}
-
-func count(bins Bins) int {
- binCounts := 0
- for _, b := range bins {
- binCounts += b.Count
- }
- return binCounts
-}
diff --git a/vendor/github.com/beorn7/perks/quantile/bench_test.go b/vendor/github.com/beorn7/perks/quantile/bench_test.go
deleted file mode 100644
index 0bd0e4e77..000000000
--- a/vendor/github.com/beorn7/perks/quantile/bench_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package quantile
-
-import (
- "testing"
-)
-
-func BenchmarkInsertTargeted(b *testing.B) {
- b.ReportAllocs()
-
- s := NewTargeted(Targets)
- b.ResetTimer()
- for i := float64(0); i < float64(b.N); i++ {
- s.Insert(i)
- }
-}
-
-func BenchmarkInsertTargetedSmallEpsilon(b *testing.B) {
- s := NewTargeted(TargetsSmallEpsilon)
- b.ResetTimer()
- for i := float64(0); i < float64(b.N); i++ {
- s.Insert(i)
- }
-}
-
-func BenchmarkInsertBiased(b *testing.B) {
- s := NewLowBiased(0.01)
- b.ResetTimer()
- for i := float64(0); i < float64(b.N); i++ {
- s.Insert(i)
- }
-}
-
-func BenchmarkInsertBiasedSmallEpsilon(b *testing.B) {
- s := NewLowBiased(0.0001)
- b.ResetTimer()
- for i := float64(0); i < float64(b.N); i++ {
- s.Insert(i)
- }
-}
-
-func BenchmarkQuery(b *testing.B) {
- s := NewTargeted(Targets)
- for i := float64(0); i < 1e6; i++ {
- s.Insert(i)
- }
- b.ResetTimer()
- n := float64(b.N)
- for i := float64(0); i < n; i++ {
- s.Query(i / n)
- }
-}
-
-func BenchmarkQuerySmallEpsilon(b *testing.B) {
- s := NewTargeted(TargetsSmallEpsilon)
- for i := float64(0); i < 1e6; i++ {
- s.Insert(i)
- }
- b.ResetTimer()
- n := float64(b.N)
- for i := float64(0); i < n; i++ {
- s.Query(i / n)
- }
-}
diff --git a/vendor/github.com/beorn7/perks/quantile/example_test.go b/vendor/github.com/beorn7/perks/quantile/example_test.go
deleted file mode 100644
index ab3293aaf..000000000
--- a/vendor/github.com/beorn7/perks/quantile/example_test.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// +build go1.1
-
-package quantile_test
-
-import (
- "bufio"
- "fmt"
- "log"
- "os"
- "strconv"
- "time"
-
- "github.com/beorn7/perks/quantile"
-)
-
-func Example_simple() {
- ch := make(chan float64)
- go sendFloats(ch)
-
- // Compute the 50th, 90th, and 99th percentile.
- q := quantile.NewTargeted(map[float64]float64{
- 0.50: 0.005,
- 0.90: 0.001,
- 0.99: 0.0001,
- })
- for v := range ch {
- q.Insert(v)
- }
-
- fmt.Println("perc50:", q.Query(0.50))
- fmt.Println("perc90:", q.Query(0.90))
- fmt.Println("perc99:", q.Query(0.99))
- fmt.Println("count:", q.Count())
- // Output:
- // perc50: 5
- // perc90: 16
- // perc99: 223
- // count: 2388
-}
-
-func Example_mergeMultipleStreams() {
- // Scenario:
- // We have multiple database shards. On each shard, there is a process
- // collecting query response times from the database logs and inserting
- // them into a Stream (created via NewTargeted(0.90)), much like the
- // Simple example. These processes expose a network interface for us to
- // ask them to serialize and send us the results of their
- // Stream.Samples so we may Merge and Query them.
- //
- // NOTES:
- // * These sample sets are small, allowing us to get them
- // across the network much faster than sending the entire list of data
- // points.
- //
- // * For this to work correctly, we must supply the same quantiles
- // a priori the process collecting the samples supplied to NewTargeted,
- // even if we do not plan to query them all here.
- ch := make(chan quantile.Samples)
- getDBQuerySamples(ch)
- q := quantile.NewTargeted(map[float64]float64{0.90: 0.001})
- for samples := range ch {
- q.Merge(samples)
- }
- fmt.Println("perc90:", q.Query(0.90))
-}
-
-func Example_window() {
- // Scenario: We want the 90th, 95th, and 99th percentiles for each
- // minute.
-
- ch := make(chan float64)
- go sendStreamValues(ch)
-
- tick := time.NewTicker(1 * time.Minute)
- q := quantile.NewTargeted(map[float64]float64{
- 0.90: 0.001,
- 0.95: 0.0005,
- 0.99: 0.0001,
- })
- for {
- select {
- case t := <-tick.C:
- flushToDB(t, q.Samples())
- q.Reset()
- case v := <-ch:
- q.Insert(v)
- }
- }
-}
-
-func sendStreamValues(ch chan float64) {
- // Use your imagination
-}
-
-func flushToDB(t time.Time, samples quantile.Samples) {
- // Use your imagination
-}
-
-// This is a stub for the above example. In reality this would hit the remote
-// servers via http or something like it.
-func getDBQuerySamples(ch chan quantile.Samples) {}
-
-func sendFloats(ch chan<- float64) {
- f, err := os.Open("exampledata.txt")
- if err != nil {
- log.Fatal(err)
- }
- sc := bufio.NewScanner(f)
- for sc.Scan() {
- b := sc.Bytes()
- v, err := strconv.ParseFloat(string(b), 64)
- if err != nil {
- log.Fatal(err)
- }
- ch <- v
- }
- if sc.Err() != nil {
- log.Fatal(sc.Err())
- }
- close(ch)
-}
diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go
index f4cabd669..d7d14f8eb 100644
--- a/vendor/github.com/beorn7/perks/quantile/stream.go
+++ b/vendor/github.com/beorn7/perks/quantile/stream.go
@@ -77,15 +77,20 @@ func NewHighBiased(epsilon float64) *Stream {
// is guaranteed to be within (Quantile±Epsilon).
//
// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties.
-func NewTargeted(targets map[float64]float64) *Stream {
+func NewTargeted(targetMap map[float64]float64) *Stream {
+ // Convert map to slice to avoid slow iterations on a map.
+ // Æ’ is called on the hot path, so converting the map to a slice
+ // beforehand results in significant CPU savings.
+ targets := targetMapToSlice(targetMap)
+
Æ’ := func(s *stream, r float64) float64 {
var m = math.MaxFloat64
var f float64
- for quantile, epsilon := range targets {
- if quantile*s.n <= r {
- f = (2 * epsilon * r) / quantile
+ for _, t := range targets {
+ if t.quantile*s.n <= r {
+ f = (2 * t.epsilon * r) / t.quantile
} else {
- f = (2 * epsilon * (s.n - r)) / (1 - quantile)
+ f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile)
}
if f < m {
m = f
@@ -96,6 +101,25 @@ func NewTargeted(targets map[float64]float64) *Stream {
return newStream(Æ’)
}
+type target struct {
+ quantile float64
+ epsilon float64
+}
+
+func targetMapToSlice(targetMap map[float64]float64) []target {
+ targets := make([]target, 0, len(targetMap))
+
+ for quantile, epsilon := range targetMap {
+ t := target{
+ quantile: quantile,
+ epsilon: epsilon,
+ }
+ targets = append(targets, t)
+ }
+
+ return targets
+}
+
// Stream computes quantiles for a stream of float64s. It is not thread-safe by
// design. Take care when using across multiple goroutines.
type Stream struct {
diff --git a/vendor/github.com/beorn7/perks/quantile/stream_test.go b/vendor/github.com/beorn7/perks/quantile/stream_test.go
deleted file mode 100644
index 855195097..000000000
--- a/vendor/github.com/beorn7/perks/quantile/stream_test.go
+++ /dev/null
@@ -1,215 +0,0 @@
-package quantile
-
-import (
- "math"
- "math/rand"
- "sort"
- "testing"
-)
-
-var (
- Targets = map[float64]float64{
- 0.01: 0.001,
- 0.10: 0.01,
- 0.50: 0.05,
- 0.90: 0.01,
- 0.99: 0.001,
- }
- TargetsSmallEpsilon = map[float64]float64{
- 0.01: 0.0001,
- 0.10: 0.001,
- 0.50: 0.005,
- 0.90: 0.001,
- 0.99: 0.0001,
- }
- LowQuantiles = []float64{0.01, 0.1, 0.5}
- HighQuantiles = []float64{0.99, 0.9, 0.5}
-)
-
-const RelativeEpsilon = 0.01
-
-func verifyPercsWithAbsoluteEpsilon(t *testing.T, a []float64, s *Stream) {
- sort.Float64s(a)
- for quantile, epsilon := range Targets {
- n := float64(len(a))
- k := int(quantile * n)
- if k < 1 {
- k = 1
- }
- lower := int((quantile - epsilon) * n)
- if lower < 1 {
- lower = 1
- }
- upper := int(math.Ceil((quantile + epsilon) * n))
- if upper > len(a) {
- upper = len(a)
- }
- w, min, max := a[k-1], a[lower-1], a[upper-1]
- if g := s.Query(quantile); g < min || g > max {
- t.Errorf("q=%f: want %v [%f,%f], got %v", quantile, w, min, max, g)
- }
- }
-}
-
-func verifyLowPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) {
- sort.Float64s(a)
- for _, qu := range LowQuantiles {
- n := float64(len(a))
- k := int(qu * n)
-
- lowerRank := int((1 - RelativeEpsilon) * qu * n)
- upperRank := int(math.Ceil((1 + RelativeEpsilon) * qu * n))
- w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1]
- if g := s.Query(qu); g < min || g > max {
- t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g)
- }
- }
-}
-
-func verifyHighPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) {
- sort.Float64s(a)
- for _, qu := range HighQuantiles {
- n := float64(len(a))
- k := int(qu * n)
-
- lowerRank := int((1 - (1+RelativeEpsilon)*(1-qu)) * n)
- upperRank := int(math.Ceil((1 - (1-RelativeEpsilon)*(1-qu)) * n))
- w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1]
- if g := s.Query(qu); g < min || g > max {
- t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g)
- }
- }
-}
-
-func populateStream(s *Stream) []float64 {
- a := make([]float64, 0, 1e5+100)
- for i := 0; i < cap(a); i++ {
- v := rand.NormFloat64()
- // Add 5% asymmetric outliers.
- if i%20 == 0 {
- v = v*v + 1
- }
- s.Insert(v)
- a = append(a, v)
- }
- return a
-}
-
-func TestTargetedQuery(t *testing.T) {
- rand.Seed(42)
- s := NewTargeted(Targets)
- a := populateStream(s)
- verifyPercsWithAbsoluteEpsilon(t, a, s)
-}
-
-func TestTargetedQuerySmallSampleSize(t *testing.T) {
- rand.Seed(42)
- s := NewTargeted(TargetsSmallEpsilon)
- a := []float64{1, 2, 3, 4, 5}
- for _, v := range a {
- s.Insert(v)
- }
- verifyPercsWithAbsoluteEpsilon(t, a, s)
- // If not yet flushed, results should be precise:
- if !s.flushed() {
- for φ, want := range map[float64]float64{
- 0.01: 1,
- 0.10: 1,
- 0.50: 3,
- 0.90: 5,
- 0.99: 5,
- } {
- if got := s.Query(φ); got != want {
- t.Errorf("want %f for φ=%f, got %f", want, φ, got)
- }
- }
- }
-}
-
-func TestLowBiasedQuery(t *testing.T) {
- rand.Seed(42)
- s := NewLowBiased(RelativeEpsilon)
- a := populateStream(s)
- verifyLowPercsWithRelativeEpsilon(t, a, s)
-}
-
-func TestHighBiasedQuery(t *testing.T) {
- rand.Seed(42)
- s := NewHighBiased(RelativeEpsilon)
- a := populateStream(s)
- verifyHighPercsWithRelativeEpsilon(t, a, s)
-}
-
-// BrokenTestTargetedMerge is broken, see Merge doc comment.
-func BrokenTestTargetedMerge(t *testing.T) {
- rand.Seed(42)
- s1 := NewTargeted(Targets)
- s2 := NewTargeted(Targets)
- a := populateStream(s1)
- a = append(a, populateStream(s2)...)
- s1.Merge(s2.Samples())
- verifyPercsWithAbsoluteEpsilon(t, a, s1)
-}
-
-// BrokenTestLowBiasedMerge is broken, see Merge doc comment.
-func BrokenTestLowBiasedMerge(t *testing.T) {
- rand.Seed(42)
- s1 := NewLowBiased(RelativeEpsilon)
- s2 := NewLowBiased(RelativeEpsilon)
- a := populateStream(s1)
- a = append(a, populateStream(s2)...)
- s1.Merge(s2.Samples())
- verifyLowPercsWithRelativeEpsilon(t, a, s2)
-}
-
-// BrokenTestHighBiasedMerge is broken, see Merge doc comment.
-func BrokenTestHighBiasedMerge(t *testing.T) {
- rand.Seed(42)
- s1 := NewHighBiased(RelativeEpsilon)
- s2 := NewHighBiased(RelativeEpsilon)
- a := populateStream(s1)
- a = append(a, populateStream(s2)...)
- s1.Merge(s2.Samples())
- verifyHighPercsWithRelativeEpsilon(t, a, s2)
-}
-
-func TestUncompressed(t *testing.T) {
- q := NewTargeted(Targets)
- for i := 100; i > 0; i-- {
- q.Insert(float64(i))
- }
- if g := q.Count(); g != 100 {
- t.Errorf("want count 100, got %d", g)
- }
- // Before compression, Query should have 100% accuracy.
- for quantile := range Targets {
- w := quantile * 100
- if g := q.Query(quantile); g != w {
- t.Errorf("want %f, got %f", w, g)
- }
- }
-}
-
-func TestUncompressedSamples(t *testing.T) {
- q := NewTargeted(map[float64]float64{0.99: 0.001})
- for i := 1; i <= 100; i++ {
- q.Insert(float64(i))
- }
- if g := q.Samples().Len(); g != 100 {
- t.Errorf("want count 100, got %d", g)
- }
-}
-
-func TestUncompressedOne(t *testing.T) {
- q := NewTargeted(map[float64]float64{0.99: 0.01})
- q.Insert(3.14)
- if g := q.Query(0.90); g != 3.14 {
- t.Error("want PI, got", g)
- }
-}
-
-func TestDefaults(t *testing.T) {
- if g := NewTargeted(map[float64]float64{0.99: 0.001}).Query(0.99); g != 0 {
- t.Errorf("want 0, got %f", g)
- }
-}
diff --git a/vendor/github.com/beorn7/perks/topk/topk.go b/vendor/github.com/beorn7/perks/topk/topk.go
deleted file mode 100644
index 5ac3d9904..000000000
--- a/vendor/github.com/beorn7/perks/topk/topk.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package topk
-
-import (
- "sort"
-)
-
-// http://www.cs.ucsb.edu/research/tech_reports/reports/2005-23.pdf
-
-type Element struct {
- Value string
- Count int
-}
-
-type Samples []*Element
-
-func (sm Samples) Len() int {
- return len(sm)
-}
-
-func (sm Samples) Less(i, j int) bool {
- return sm[i].Count < sm[j].Count
-}
-
-func (sm Samples) Swap(i, j int) {
- sm[i], sm[j] = sm[j], sm[i]
-}
-
-type Stream struct {
- k int
- mon map[string]*Element
-
- // the minimum Element
- min *Element
-}
-
-func New(k int) *Stream {
- s := new(Stream)
- s.k = k
- s.mon = make(map[string]*Element)
- s.min = &Element{}
-
- // Track k+1 so that less frequenet items contended for that spot,
- // resulting in k being more accurate.
- return s
-}
-
-func (s *Stream) Insert(x string) {
- s.insert(&Element{x, 1})
-}
-
-func (s *Stream) Merge(sm Samples) {
- for _, e := range sm {
- s.insert(e)
- }
-}
-
-func (s *Stream) insert(in *Element) {
- e := s.mon[in.Value]
- if e != nil {
- e.Count++
- } else {
- if len(s.mon) < s.k+1 {
- e = &Element{in.Value, in.Count}
- s.mon[in.Value] = e
- } else {
- e = s.min
- delete(s.mon, e.Value)
- e.Value = in.Value
- e.Count += in.Count
- s.min = e
- }
- }
- if e.Count < s.min.Count {
- s.min = e
- }
-}
-
-func (s *Stream) Query() Samples {
- var sm Samples
- for _, e := range s.mon {
- sm = append(sm, e)
- }
- sort.Sort(sort.Reverse(sm))
-
- if len(sm) < s.k {
- return sm
- }
-
- return sm[:s.k]
-}
diff --git a/vendor/github.com/beorn7/perks/topk/topk_test.go b/vendor/github.com/beorn7/perks/topk/topk_test.go
deleted file mode 100644
index c24f0f727..000000000
--- a/vendor/github.com/beorn7/perks/topk/topk_test.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package topk
-
-import (
- "fmt"
- "math/rand"
- "sort"
- "testing"
-)
-
-func TestTopK(t *testing.T) {
- stream := New(10)
- ss := []*Stream{New(10), New(10), New(10)}
- m := make(map[string]int)
- for _, s := range ss {
- for i := 0; i < 1e6; i++ {
- v := fmt.Sprintf("%x", int8(rand.ExpFloat64()))
- s.Insert(v)
- m[v]++
- }
- stream.Merge(s.Query())
- }
-
- var sm Samples
- for x, s := range m {
- sm = append(sm, &Element{x, s})
- }
- sort.Sort(sort.Reverse(sm))
-
- g := stream.Query()
- if len(g) != 10 {
- t.Fatalf("got %d, want 10", len(g))
- }
- for i, e := range g {
- if sm[i].Value != e.Value {
- t.Errorf("at %d: want %q, got %q", i, sm[i].Value, e.Value)
- }
- }
-}
-
-func TestQuery(t *testing.T) {
- queryTests := []struct {
- value string
- expected int
- }{
- {"a", 1},
- {"b", 2},
- {"c", 2},
- }
-
- stream := New(2)
- for _, tt := range queryTests {
- stream.Insert(tt.value)
- if n := len(stream.Query()); n != tt.expected {
- t.Errorf("want %d, got %d", tt.expected, n)
- }
- }
-}
diff --git a/vendor/github.com/corpix/uarand/scripts/extract-user-agents b/vendor/github.com/corpix/uarand/scripts/extract-user-agents
deleted file mode 100755
index 3c6b8af86..000000000
--- a/vendor/github.com/corpix/uarand/scripts/extract-user-agents
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python3
-import sys
-import xml.etree.ElementTree as XML
-from argparse import ArgumentParser
-
-
-if __name__ == "__main__":
- p = ArgumentParser(
- description=(
- "Expects XML from "
- "http://techpatterns.com/downloads/firefox/useragentswitcher.xml "
- "to be passed into STDIN and outputs user agents from this XML."
- )
- )
- p.parse_args()
-
- sys.stderr.write("Reading stdin...\n")
- doc = XML.iterparse(sys.stdin)
- for _, node in doc:
- ua = node.get("useragent")
- if ua != "" and ua is not None:
- print(ua)
diff --git a/vendor/github.com/corpix/uarand/scripts/generate-useragents-go b/vendor/github.com/corpix/uarand/scripts/generate-useragents-go
deleted file mode 100755
index e65581b3a..000000000
--- a/vendor/github.com/corpix/uarand/scripts/generate-useragents-go
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python3
-import sys
-from os.path import exists, expanduser
-from argparse import ArgumentParser
-
-
-header = """package {package}
-
-var (
-\t// UserAgents is a list of browser and bots user agents.
-\tUserAgents = []string{{
-"""
-
-item = """\t\t"{content}",\n"""
-
-footer = """\t}}
-)\n
-"""
-
-if __name__ == "__main__":
- p = ArgumentParser(
- description=(
- "Expects a list of user agents delimited by new line character "
- "to be passed into STDIN and generates go code with this data."
- )
- )
- p.add_argument(
- "package",
- help="Go package name to use",
- default="uarand"
- )
- args = p.parse_args().__dict__
-
- params = args.copy()
- sys.stderr.write("Reading stdin...\n")
- sys.stdout.write(
- header.format(**params)
- )
-
- for line in sys.stdin:
- sys.stdout.write(
- item.format(
- content=line.strip(),
- **params
- )
- )
-
- sys.stdout.write(
- footer.format(**params)
- )
diff --git a/vendor/github.com/corpix/uarand/uarand_test.go b/vendor/github.com/corpix/uarand/uarand_test.go
deleted file mode 100644
index 0659ff200..000000000
--- a/vendor/github.com/corpix/uarand/uarand_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package uarand
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestGetRandom(t *testing.T) {
- for k := 0; k < len(UserAgents)*10; k++ {
- assert.NotEqual(t, "", GetRandom())
- }
-}
diff --git a/vendor/github.com/corpix/uarand/useragents_test.go b/vendor/github.com/corpix/uarand/useragents_test.go
deleted file mode 100644
index 2f0c82cfc..000000000
--- a/vendor/github.com/corpix/uarand/useragents_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package uarand
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestUserAgents(t *testing.T) {
- assert.Equal(t, true, len(UserAgents) > 0)
-}
diff --git a/vendor/github.com/davecgh/go-spew/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore
deleted file mode 100644
index 00268614f..000000000
--- a/vendor/github.com/davecgh/go-spew/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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
diff --git a/vendor/github.com/davecgh/go-spew/.travis.yml b/vendor/github.com/davecgh/go-spew/.travis.yml
deleted file mode 100644
index 34a55c287..000000000
--- a/vendor/github.com/davecgh/go-spew/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: go
-go_import_path: github.com/davecgh/go-spew
-go:
- - 1.6.x
- - 1.7.x
- - 1.8.x
- - 1.9.x
- - tip
-sudo: false
-install:
- - go get -v github.com/alecthomas/gometalinter
- - gometalinter --install
-script:
- - export PATH=$PATH:$HOME/gopath/bin
- - export GORACE="halt_on_error=1"
- - test -z "$(gometalinter --disable-all
- --enable=gofmt
- --enable=golint
- --enable=vet
- --enable=gosimple
- --enable=unconvert
- --deadline=4m ./spew | tee /dev/stderr)"
- - go test -v -race -tags safe ./spew
- - go test -v -race -tags testcgo ./spew -covermode=atomic -coverprofile=profile.cov
-after_success:
- - go get -v github.com/mattn/goveralls
- - goveralls -coverprofile=profile.cov -service=travis-ci
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
index bc52e96f2..c83641619 100644
--- a/vendor/github.com/davecgh/go-spew/LICENSE
+++ b/vendor/github.com/davecgh/go-spew/LICENSE
@@ -2,7 +2,7 @@ ISC License
Copyright (c) 2012-2016 Dave Collins <dave@davec.name>
-Permission to use, copy, modify, and/or distribute this software for any
+Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md
deleted file mode 100644
index f6ed02c3b..000000000
--- a/vendor/github.com/davecgh/go-spew/README.md
+++ /dev/null
@@ -1,201 +0,0 @@
-go-spew
-=======
-
-[![Build Status](https://img.shields.io/travis/davecgh/go-spew.svg)](https://travis-ci.org/davecgh/go-spew)
-[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Coverage Status](https://img.shields.io/coveralls/davecgh/go-spew.svg)](https://coveralls.io/r/davecgh/go-spew?branch=master)
-
-Go-spew implements a deep pretty printer for Go data structures to aid in
-debugging. A comprehensive suite of tests with 100% test coverage is provided
-to ensure proper functionality. See `test_coverage.txt` for the gocov coverage
-report. Go-spew is licensed under the liberal ISC license, so it may be used in
-open source or commercial projects.
-
-If you're interested in reading about how this package came to life and some
-of the challenges involved in providing a deep pretty printer, there is a blog
-post about it
-[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/).
-
-## Documentation
-
-[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/davecgh/go-spew/spew)
-
-Full `go doc` style documentation for the project can be viewed online without
-installing this package by using the excellent GoDoc site here:
-http://godoc.org/github.com/davecgh/go-spew/spew
-
-You can also view the documentation locally once the package is installed with
-the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to
-http://localhost:6060/pkg/github.com/davecgh/go-spew/spew
-
-## Installation
-
-```bash
-$ go get -u github.com/davecgh/go-spew/spew
-```
-
-## Quick Start
-
-Add this import line to the file you're working in:
-
-```Go
-import "github.com/davecgh/go-spew/spew"
-```
-
-To dump a variable with full newlines, indentation, type, and pointer
-information use Dump, Fdump, or Sdump:
-
-```Go
-spew.Dump(myVar1, myVar2, ...)
-spew.Fdump(someWriter, myVar1, myVar2, ...)
-str := spew.Sdump(myVar1, myVar2, ...)
-```
-
-Alternatively, if you would prefer to use format strings with a compacted inline
-printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most
-compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types
-and pointer addresses):
-
-```Go
-spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
-spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
-spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-```
-
-## Debugging a Web Application Example
-
-Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production.
-
-```Go
-package main
-
-import (
- "fmt"
- "html"
- "net/http"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-func handler(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "text/html")
- fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:])
- fmt.Fprintf(w, "<!--\n" + html.EscapeString(spew.Sdump(w)) + "\n-->")
-}
-
-func main() {
- http.HandleFunc("/", handler)
- http.ListenAndServe(":8080", nil)
-}
-```
-
-## Sample Dump Output
-
-```
-(main.Foo) {
- unexportedField: (*main.Bar)(0xf84002e210)({
- flag: (main.Flag) flagTwo,
- data: (uintptr) <nil>
- }),
- ExportedField: (map[interface {}]interface {}) {
- (string) "one": (bool) true
- }
-}
-([]uint8) {
- 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- 00000020 31 32 |12|
-}
-```
-
-## Sample Formatter Output
-
-Double pointer to a uint8:
-```
- %v: <**>5
- %+v: <**>(0xf8400420d0->0xf8400420c8)5
- %#v: (**uint8)5
- %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
-```
-
-Pointer to circular struct with a uint8 field and a pointer to itself:
-```
- %v: <*>{1 <*><shown>}
- %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}
- %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}
- %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}
-```
-
-## Configuration Options
-
-Configuration of spew is handled by fields in the ConfigState type. For
-convenience, all of the top-level functions use a global state available via the
-spew.Config global.
-
-It is also possible to create a ConfigState instance that provides methods
-equivalent to the top-level functions. This allows concurrent configuration
-options. See the ConfigState documentation for more details.
-
-```
-* Indent
- String to use for each indentation level for Dump functions.
- It is a single space by default. A popular alternative is "\t".
-
-* MaxDepth
- Maximum number of levels to descend into nested data structures.
- There is no limit by default.
-
-* DisableMethods
- Disables invocation of error and Stringer interface methods.
- Method invocation is enabled by default.
-
-* DisablePointerMethods
- Disables invocation of error and Stringer interface methods on types
- which only accept pointer receivers from non-pointer variables. This option
- relies on access to the unsafe package, so it will not have any effect when
- running in environments without access to the unsafe package such as Google
- App Engine or with the "safe" build tag specified.
- Pointer method invocation is enabled by default.
-
-* DisablePointerAddresses
- DisablePointerAddresses specifies whether to disable the printing of
- pointer addresses. This is useful when diffing data structures in tests.
-
-* DisableCapacities
- DisableCapacities specifies whether to disable the printing of capacities
- for arrays, slices, maps and channels. This is useful when diffing data
- structures in tests.
-
-* ContinueOnMethod
- Enables recursion into types after invoking error and Stringer interface
- methods. Recursion after method invocation is disabled by default.
-
-* SortKeys
- Specifies map keys should be sorted before being printed. Use
- this to have a more deterministic, diffable output. Note that
- only native types (bool, int, uint, floats, uintptr and string)
- and types which implement error or Stringer interfaces are supported,
- with other types sorted according to the reflect.Value.String() output
- which guarantees display stability. Natural map order is used by
- default.
-
-* SpewKeys
- SpewKeys specifies that, as a last resort attempt, map keys should be
- spewed to strings and sorted by those strings. This is only considered
- if SortKeys is true.
-
-```
-
-## Unsafe Package Dependency
-
-This package relies on the unsafe package to perform some of the more advanced
-features, however it also supports a "limited" mode which allows it to work in
-environments where the unsafe package is not available. By default, it will
-operate in this mode on Google App Engine and when compiled with GopherJS. The
-"safe" build tag may also be specified to force the package to build without
-using the unsafe package.
-
-## License
-
-Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License.
diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh
deleted file mode 100644
index 9579497e4..000000000
--- a/vendor/github.com/davecgh/go-spew/cov_report.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# This script uses gocov to generate a test coverage report.
-# The gocov tool my be obtained with the following command:
-# go get github.com/axw/gocov/gocov
-#
-# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
-
-# Check for gocov.
-if ! type gocov >/dev/null 2>&1; then
- echo >&2 "This script requires the gocov tool."
- echo >&2 "You may obtain it with the following command:"
- echo >&2 "go get github.com/axw/gocov/gocov"
- exit 1
-fi
-
-# Only run the cgo tests if gcc is installed.
-if type gcc >/dev/null 2>&1; then
- (cd spew && gocov test -tags testcgo | gocov report)
-else
- (cd spew && gocov test | gocov report)
-fi
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
index 792994785..8a4a6589a 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go
@@ -16,9 +16,7 @@
// when the code is not running on Google App Engine, compiled by GopherJS, and
// "-tags safe" is not added to the go build command line. The "disableunsafe"
// tag is deprecated and thus should not be used.
-// Go versions prior to 1.4 are disabled because they use a different layout
-// for interfaces which make the implementation of unsafeReflectValue more complex.
-// +build !js,!appengine,!safe,!disableunsafe,go1.4
+// +build !js,!appengine,!safe,!disableunsafe
package spew
@@ -36,49 +34,80 @@ const (
ptrSize = unsafe.Sizeof((*byte)(nil))
)
-type flag uintptr
-
var (
- // flagRO indicates whether the value field of a reflect.Value
- // is read-only.
- flagRO flag
-
- // flagAddr indicates whether the address of the reflect.Value's
- // value may be taken.
- flagAddr flag
+ // offsetPtr, offsetScalar, and offsetFlag are the offsets for the
+ // internal reflect.Value fields. These values are valid before golang
+ // commit ecccf07e7f9d which changed the format. The are also valid
+ // after commit 82f48826c6c7 which changed the format again to mirror
+ // the original format. Code in the init function updates these offsets
+ // as necessary.
+ offsetPtr = uintptr(ptrSize)
+ offsetScalar = uintptr(0)
+ offsetFlag = uintptr(ptrSize * 2)
+
+ // flagKindWidth and flagKindShift indicate various bits that the
+ // reflect package uses internally to track kind information.
+ //
+ // flagRO indicates whether or not the value field of a reflect.Value is
+ // read-only.
+ //
+ // flagIndir indicates whether the value field of a reflect.Value is
+ // the actual data or a pointer to the data.
+ //
+ // These values are valid before golang commit 90a7c3c86944 which
+ // changed their positions. Code in the init function updates these
+ // flags as necessary.
+ flagKindWidth = uintptr(5)
+ flagKindShift = uintptr(flagKindWidth - 1)
+ flagRO = uintptr(1 << 0)
+ flagIndir = uintptr(1 << 1)
)
-// flagKindMask holds the bits that make up the kind
-// part of the flags field. In all the supported versions,
-// it is in the lower 5 bits.
-const flagKindMask = flag(0x1f)
-
-// Different versions of Go have used different
-// bit layouts for the flags type. This table
-// records the known combinations.
-var okFlags = []struct {
- ro, addr flag
-}{{
- // From Go 1.4 to 1.5
- ro: 1 << 5,
- addr: 1 << 7,
-}, {
- // Up to Go tip.
- ro: 1<<5 | 1<<6,
- addr: 1 << 8,
-}}
-
-var flagValOffset = func() uintptr {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
+func init() {
+ // Older versions of reflect.Value stored small integers directly in the
+ // ptr field (which is named val in the older versions). Versions
+ // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named
+ // scalar for this purpose which unfortunately came before the flag
+ // field, so the offset of the flag field is different for those
+ // versions.
+ //
+ // This code constructs a new reflect.Value from a known small integer
+ // and checks if the size of the reflect.Value struct indicates it has
+ // the scalar field. When it does, the offsets are updated accordingly.
+ vv := reflect.ValueOf(0xf00)
+ if unsafe.Sizeof(vv) == (ptrSize * 4) {
+ offsetScalar = ptrSize * 2
+ offsetFlag = ptrSize * 3
}
- return field.Offset
-}()
-// flagField returns a pointer to the flag field of a reflect.Value.
-func flagField(v *reflect.Value) *flag {
- return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))
+ // Commit 90a7c3c86944 changed the flag positions such that the low
+ // order bits are the kind. This code extracts the kind from the flags
+ // field and ensures it's the correct type. When it's not, the flag
+ // order has been changed to the newer format, so the flags are updated
+ // accordingly.
+ upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag)
+ upfv := *(*uintptr)(upf)
+ flagKindMask := uintptr((1<<flagKindWidth - 1) << flagKindShift)
+ if (upfv&flagKindMask)>>flagKindShift != uintptr(reflect.Int) {
+ flagKindShift = 0
+ flagRO = 1 << 5
+ flagIndir = 1 << 6
+
+ // Commit adf9b30e5594 modified the flags to separate the
+ // flagRO flag into two bits which specifies whether or not the
+ // field is embedded. This causes flagIndir to move over a bit
+ // and means that flagRO is the combination of either of the
+ // original flagRO bit and the new bit.
+ //
+ // This code detects the change by extracting what used to be
+ // the indirect bit to ensure it's set. When it's not, the flag
+ // order has been changed to the newer format, so the flags are
+ // updated accordingly.
+ if upfv&flagIndir == 0 {
+ flagRO = 3 << 5
+ flagIndir = 1 << 7
+ }
+ }
}
// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
@@ -90,56 +119,34 @@ func flagField(v *reflect.Value) *flag {
// This allows us to check for implementations of the Stringer and error
// interfaces to be used for pretty printing ordinarily unaddressable and
// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- if !v.IsValid() || (v.CanInterface() && v.CanAddr()) {
- return v
- }
- flagFieldPtr := flagField(&v)
- *flagFieldPtr &^= flagRO
- *flagFieldPtr |= flagAddr
- return v
-}
-
-// Sanity checks against future reflect package changes
-// to the type or semantics of the Value.flag field.
-func init() {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
- }
- if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {
- panic("reflect.Value flag field has changed kind")
- }
- type t0 int
- var t struct {
- A t0
- // t0 will have flagEmbedRO set.
- t0
- // a will have flagStickyRO set
- a t0
+func unsafeReflectValue(v reflect.Value) (rv reflect.Value) {
+ indirects := 1
+ vt := v.Type()
+ upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr)
+ rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag))
+ if rvf&flagIndir != 0 {
+ vt = reflect.PtrTo(v.Type())
+ indirects++
+ } else if offsetScalar != 0 {
+ // The value is in the scalar field when it's not one of the
+ // reference types.
+ switch vt.Kind() {
+ case reflect.Uintptr:
+ case reflect.Chan:
+ case reflect.Func:
+ case reflect.Map:
+ case reflect.Ptr:
+ case reflect.UnsafePointer:
+ default:
+ upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) +
+ offsetScalar)
+ }
}
- vA := reflect.ValueOf(t).FieldByName("A")
- va := reflect.ValueOf(t).FieldByName("a")
- vt0 := reflect.ValueOf(t).FieldByName("t0")
-
- // Infer flagRO from the difference between the flags
- // for the (otherwise identical) fields in t.
- flagPublic := *flagField(&vA)
- flagWithRO := *flagField(&va) | *flagField(&vt0)
- flagRO = flagPublic ^ flagWithRO
- // Infer flagAddr from the difference between a value
- // taken from a pointer and not.
- vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A")
- flagNoPtr := *flagField(&vA)
- flagPtr := *flagField(&vPtrA)
- flagAddr = flagNoPtr ^ flagPtr
-
- // Check that the inferred flags tally with one of the known versions.
- for _, f := range okFlags {
- if flagRO == f.ro && flagAddr == f.addr {
- return
- }
+ pv := reflect.NewAt(vt, upv)
+ rv = pv
+ for i := 0; i < indirects; i++ {
+ rv = rv.Elem()
}
- panic("reflect.Value read-only flag has changed semantics")
+ return rv
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
index 205c28d68..1fe3cf3d5 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
@@ -16,7 +16,7 @@
// when the code is running on Google App Engine, compiled by GopherJS, or
// "-tags safe" is added to the go build command line. The "disableunsafe"
// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe !go1.4
+// +build js appengine safe disableunsafe
package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
index 1be8ce945..7c519ff47 100644
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common.go
@@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) {
w.Write(closeParenBytes)
}
-// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'
+// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x'
// prefix to Writer w.
func printHexPtr(w io.Writer, p uintptr) {
// Null pointer.
diff --git a/vendor/github.com/davecgh/go-spew/spew/common_test.go b/vendor/github.com/davecgh/go-spew/spew/common_test.go
deleted file mode 100644
index 0f5ce47dc..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/common_test.go
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew_test
-
-import (
- "fmt"
- "reflect"
- "testing"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-// custom type to test Stinger interface on non-pointer receiver.
-type stringer string
-
-// String implements the Stringer interface for testing invocation of custom
-// stringers on types with non-pointer receivers.
-func (s stringer) String() string {
- return "stringer " + string(s)
-}
-
-// custom type to test Stinger interface on pointer receiver.
-type pstringer string
-
-// String implements the Stringer interface for testing invocation of custom
-// stringers on types with only pointer receivers.
-func (s *pstringer) String() string {
- return "stringer " + string(*s)
-}
-
-// xref1 and xref2 are cross referencing structs for testing circular reference
-// detection.
-type xref1 struct {
- ps2 *xref2
-}
-type xref2 struct {
- ps1 *xref1
-}
-
-// indirCir1, indirCir2, and indirCir3 are used to generate an indirect circular
-// reference for testing detection.
-type indirCir1 struct {
- ps2 *indirCir2
-}
-type indirCir2 struct {
- ps3 *indirCir3
-}
-type indirCir3 struct {
- ps1 *indirCir1
-}
-
-// embed is used to test embedded structures.
-type embed struct {
- a string
-}
-
-// embedwrap is used to test embedded structures.
-type embedwrap struct {
- *embed
- e *embed
-}
-
-// panicer is used to intentionally cause a panic for testing spew properly
-// handles them
-type panicer int
-
-func (p panicer) String() string {
- panic("test panic")
-}
-
-// customError is used to test custom error interface invocation.
-type customError int
-
-func (e customError) Error() string {
- return fmt.Sprintf("error: %d", int(e))
-}
-
-// stringizeWants converts a slice of wanted test output into a format suitable
-// for a test error message.
-func stringizeWants(wants []string) string {
- s := ""
- for i, want := range wants {
- if i > 0 {
- s += fmt.Sprintf("want%d: %s", i+1, want)
- } else {
- s += "want: " + want
- }
- }
- return s
-}
-
-// testFailed returns whether or not a test failed by checking if the result
-// of the test is in the slice of wanted strings.
-func testFailed(result string, wants []string) bool {
- for _, want := range wants {
- if result == want {
- return false
- }
- }
- return true
-}
-
-type sortableStruct struct {
- x int
-}
-
-func (ss sortableStruct) String() string {
- return fmt.Sprintf("ss.%d", ss.x)
-}
-
-type unsortableStruct struct {
- x int
-}
-
-type sortTestCase struct {
- input []reflect.Value
- expected []reflect.Value
-}
-
-func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T) {
- getInterfaces := func(values []reflect.Value) []interface{} {
- interfaces := []interface{}{}
- for _, v := range values {
- interfaces = append(interfaces, v.Interface())
- }
- return interfaces
- }
-
- for _, test := range tests {
- spew.SortValues(test.input, cs)
- // reflect.DeepEqual cannot really make sense of reflect.Value,
- // probably because of all the pointer tricks. For instance,
- // v(2.0) != v(2.0) on a 32-bits system. Turn them into interface{}
- // instead.
- input := getInterfaces(test.input)
- expected := getInterfaces(test.expected)
- if !reflect.DeepEqual(input, expected) {
- t.Errorf("Sort mismatch:\n %v != %v", input, expected)
- }
- }
-}
-
-// TestSortValues ensures the sort functionality for relect.Value based sorting
-// works as intended.
-func TestSortValues(t *testing.T) {
- v := reflect.ValueOf
-
- a := v("a")
- b := v("b")
- c := v("c")
- embedA := v(embed{"a"})
- embedB := v(embed{"b"})
- embedC := v(embed{"c"})
- tests := []sortTestCase{
- // No values.
- {
- []reflect.Value{},
- []reflect.Value{},
- },
- // Bools.
- {
- []reflect.Value{v(false), v(true), v(false)},
- []reflect.Value{v(false), v(false), v(true)},
- },
- // Ints.
- {
- []reflect.Value{v(2), v(1), v(3)},
- []reflect.Value{v(1), v(2), v(3)},
- },
- // Uints.
- {
- []reflect.Value{v(uint8(2)), v(uint8(1)), v(uint8(3))},
- []reflect.Value{v(uint8(1)), v(uint8(2)), v(uint8(3))},
- },
- // Floats.
- {
- []reflect.Value{v(2.0), v(1.0), v(3.0)},
- []reflect.Value{v(1.0), v(2.0), v(3.0)},
- },
- // Strings.
- {
- []reflect.Value{b, a, c},
- []reflect.Value{a, b, c},
- },
- // Array
- {
- []reflect.Value{v([3]int{3, 2, 1}), v([3]int{1, 3, 2}), v([3]int{1, 2, 3})},
- []reflect.Value{v([3]int{1, 2, 3}), v([3]int{1, 3, 2}), v([3]int{3, 2, 1})},
- },
- // Uintptrs.
- {
- []reflect.Value{v(uintptr(2)), v(uintptr(1)), v(uintptr(3))},
- []reflect.Value{v(uintptr(1)), v(uintptr(2)), v(uintptr(3))},
- },
- // SortableStructs.
- {
- // Note: not sorted - DisableMethods is set.
- []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})},
- []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})},
- },
- // UnsortableStructs.
- {
- // Note: not sorted - SpewKeys is false.
- []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})},
- []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})},
- },
- // Invalid.
- {
- []reflect.Value{embedB, embedA, embedC},
- []reflect.Value{embedB, embedA, embedC},
- },
- }
- cs := spew.ConfigState{DisableMethods: true, SpewKeys: false}
- helpTestSortValues(tests, &cs, t)
-}
-
-// TestSortValuesWithMethods ensures the sort functionality for relect.Value
-// based sorting works as intended when using string methods.
-func TestSortValuesWithMethods(t *testing.T) {
- v := reflect.ValueOf
-
- a := v("a")
- b := v("b")
- c := v("c")
- tests := []sortTestCase{
- // Ints.
- {
- []reflect.Value{v(2), v(1), v(3)},
- []reflect.Value{v(1), v(2), v(3)},
- },
- // Strings.
- {
- []reflect.Value{b, a, c},
- []reflect.Value{a, b, c},
- },
- // SortableStructs.
- {
- []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})},
- []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})},
- },
- // UnsortableStructs.
- {
- // Note: not sorted - SpewKeys is false.
- []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})},
- []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})},
- },
- }
- cs := spew.ConfigState{DisableMethods: false, SpewKeys: false}
- helpTestSortValues(tests, &cs, t)
-}
-
-// TestSortValuesWithSpew ensures the sort functionality for relect.Value
-// based sorting works as intended when using spew to stringify keys.
-func TestSortValuesWithSpew(t *testing.T) {
- v := reflect.ValueOf
-
- a := v("a")
- b := v("b")
- c := v("c")
- tests := []sortTestCase{
- // Ints.
- {
- []reflect.Value{v(2), v(1), v(3)},
- []reflect.Value{v(1), v(2), v(3)},
- },
- // Strings.
- {
- []reflect.Value{b, a, c},
- []reflect.Value{a, b, c},
- },
- // SortableStructs.
- {
- []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})},
- []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})},
- },
- // UnsortableStructs.
- {
- []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})},
- []reflect.Value{v(unsortableStruct{1}), v(unsortableStruct{2}), v(unsortableStruct{3})},
- },
- }
- cs := spew.ConfigState{DisableMethods: true, SpewKeys: true}
- helpTestSortValues(tests, &cs, t)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
index f78d89fc1..df1d582a7 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump.go
@@ -35,16 +35,16 @@ var (
// cCharRE is a regular expression that matches a cgo char.
// It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`)
+ cCharRE = regexp.MustCompile("^.*\\._Ctype_char$")
// cUnsignedCharRE is a regular expression that matches a cgo unsigned
// char. It is used to detect unsigned character arrays to hexdump
// them.
- cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`)
+ cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$")
// cUint8tCharRE is a regular expression that matches a cgo uint8_t.
// It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`)
+ cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$")
)
// dumpState contains information about the state of a dump operation.
@@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
// Display dereferenced value.
d.w.Write(openParenBytes)
switch {
- case nilFound:
+ case nilFound == true:
d.w.Write(nilAngleBytes)
- case cycleFound:
+ case cycleFound == true:
d.w.Write(circularBytes)
default:
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump_test.go b/vendor/github.com/davecgh/go-spew/spew/dump_test.go
deleted file mode 100644
index 4a31a2ee3..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/dump_test.go
+++ /dev/null
@@ -1,1042 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Test Summary:
-NOTE: For each test, a nil pointer, a single pointer and double pointer to the
-base test element are also tested to ensure proper indirection across all types.
-
-- Max int8, int16, int32, int64, int
-- Max uint8, uint16, uint32, uint64, uint
-- Boolean true and false
-- Standard complex64 and complex128
-- Array containing standard ints
-- Array containing type with custom formatter on pointer receiver only
-- Array containing interfaces
-- Array containing bytes
-- Slice containing standard float32 values
-- Slice containing type with custom formatter on pointer receiver only
-- Slice containing interfaces
-- Slice containing bytes
-- Nil slice
-- Standard string
-- Nil interface
-- Sub-interface
-- Map with string keys and int vals
-- Map with custom formatter type on pointer receiver only keys and vals
-- Map with interface keys and values
-- Map with nil interface value
-- Struct with primitives
-- Struct that contains another struct
-- Struct that contains custom type with Stringer pointer interface via both
- exported and unexported fields
-- Struct that contains embedded struct and field to same struct
-- Uintptr to 0 (null pointer)
-- Uintptr address of real variable
-- Unsafe.Pointer to 0 (null pointer)
-- Unsafe.Pointer to address of real variable
-- Nil channel
-- Standard int channel
-- Function with no params and no returns
-- Function with param and no returns
-- Function with multiple params and multiple returns
-- Struct that is circular through self referencing
-- Structs that are circular through cross referencing
-- Structs that are indirectly circular
-- Type that panics in its Stringer interface
-*/
-
-package spew_test
-
-import (
- "bytes"
- "fmt"
- "testing"
- "unsafe"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-// dumpTest is used to describe a test to be performed against the Dump method.
-type dumpTest struct {
- in interface{}
- wants []string
-}
-
-// dumpTests houses all of the tests to be performed against the Dump method.
-var dumpTests = make([]dumpTest, 0)
-
-// addDumpTest is a helper method to append the passed input and desired result
-// to dumpTests
-func addDumpTest(in interface{}, wants ...string) {
- test := dumpTest{in, wants}
- dumpTests = append(dumpTests, test)
-}
-
-func addIntDumpTests() {
- // Max int8.
- v := int8(127)
- nv := (*int8)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "int8"
- vs := "127"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Max int16.
- v2 := int16(32767)
- nv2 := (*int16)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "int16"
- v2s := "32767"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-
- // Max int32.
- v3 := int32(2147483647)
- nv3 := (*int32)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "int32"
- v3s := "2147483647"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-
- // Max int64.
- v4 := int64(9223372036854775807)
- nv4 := (*int64)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "int64"
- v4s := "9223372036854775807"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
- addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n")
- addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n")
- addDumpTest(nv4, "(*"+v4t+")(<nil>)\n")
-
- // Max int.
- v5 := int(2147483647)
- nv5 := (*int)(nil)
- pv5 := &v5
- v5Addr := fmt.Sprintf("%p", pv5)
- pv5Addr := fmt.Sprintf("%p", &pv5)
- v5t := "int"
- v5s := "2147483647"
- addDumpTest(v5, "("+v5t+") "+v5s+"\n")
- addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n")
- addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n")
- addDumpTest(nv5, "(*"+v5t+")(<nil>)\n")
-}
-
-func addUintDumpTests() {
- // Max uint8.
- v := uint8(255)
- nv := (*uint8)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "uint8"
- vs := "255"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Max uint16.
- v2 := uint16(65535)
- nv2 := (*uint16)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uint16"
- v2s := "65535"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-
- // Max uint32.
- v3 := uint32(4294967295)
- nv3 := (*uint32)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "uint32"
- v3s := "4294967295"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-
- // Max uint64.
- v4 := uint64(18446744073709551615)
- nv4 := (*uint64)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "uint64"
- v4s := "18446744073709551615"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
- addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n")
- addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n")
- addDumpTest(nv4, "(*"+v4t+")(<nil>)\n")
-
- // Max uint.
- v5 := uint(4294967295)
- nv5 := (*uint)(nil)
- pv5 := &v5
- v5Addr := fmt.Sprintf("%p", pv5)
- pv5Addr := fmt.Sprintf("%p", &pv5)
- v5t := "uint"
- v5s := "4294967295"
- addDumpTest(v5, "("+v5t+") "+v5s+"\n")
- addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n")
- addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n")
- addDumpTest(nv5, "(*"+v5t+")(<nil>)\n")
-}
-
-func addBoolDumpTests() {
- // Boolean true.
- v := bool(true)
- nv := (*bool)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "bool"
- vs := "true"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Boolean false.
- v2 := bool(false)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "bool"
- v2s := "false"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
-}
-
-func addFloatDumpTests() {
- // Standard float32.
- v := float32(3.1415)
- nv := (*float32)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "float32"
- vs := "3.1415"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Standard float64.
- v2 := float64(3.1415926)
- nv2 := (*float64)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "float64"
- v2s := "3.1415926"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-}
-
-func addComplexDumpTests() {
- // Standard complex64.
- v := complex(float32(6), -2)
- nv := (*complex64)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "complex64"
- vs := "(6-2i)"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Standard complex128.
- v2 := complex(float64(-6), 2)
- nv2 := (*complex128)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "complex128"
- v2s := "(-6+2i)"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-}
-
-func addArrayDumpTests() {
- // Array containing standard ints.
- v := [3]int{1, 2, 3}
- vLen := fmt.Sprintf("%d", len(v))
- vCap := fmt.Sprintf("%d", cap(v))
- nv := (*[3]int)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "int"
- vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 1,\n (" +
- vt + ") 2,\n (" + vt + ") 3\n}"
- addDumpTest(v, "([3]"+vt+") "+vs+"\n")
- addDumpTest(pv, "(*[3]"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**[3]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*[3]"+vt+")(<nil>)\n")
-
- // Array containing type with custom formatter on pointer receiver only.
- v2i0 := pstringer("1")
- v2i1 := pstringer("2")
- v2i2 := pstringer("3")
- v2 := [3]pstringer{v2i0, v2i1, v2i2}
- v2i0Len := fmt.Sprintf("%d", len(v2i0))
- v2i1Len := fmt.Sprintf("%d", len(v2i1))
- v2i2Len := fmt.Sprintf("%d", len(v2i2))
- v2Len := fmt.Sprintf("%d", len(v2))
- v2Cap := fmt.Sprintf("%d", cap(v2))
- nv2 := (*[3]pstringer)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.pstringer"
- v2sp := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t +
- ") (len=" + v2i0Len + ") stringer 1,\n (" + v2t +
- ") (len=" + v2i1Len + ") stringer 2,\n (" + v2t +
- ") (len=" + v2i2Len + ") " + "stringer 3\n}"
- v2s := v2sp
- if spew.UnsafeDisabled {
- v2s = "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t +
- ") (len=" + v2i0Len + ") \"1\",\n (" + v2t + ") (len=" +
- v2i1Len + ") \"2\",\n (" + v2t + ") (len=" + v2i2Len +
- ") " + "\"3\"\n}"
- }
- addDumpTest(v2, "([3]"+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*[3]"+v2t+")("+v2Addr+")("+v2sp+")\n")
- addDumpTest(&pv2, "(**[3]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2sp+")\n")
- addDumpTest(nv2, "(*[3]"+v2t+")(<nil>)\n")
-
- // Array containing interfaces.
- v3i0 := "one"
- v3 := [3]interface{}{v3i0, int(2), uint(3)}
- v3i0Len := fmt.Sprintf("%d", len(v3i0))
- v3Len := fmt.Sprintf("%d", len(v3))
- v3Cap := fmt.Sprintf("%d", cap(v3))
- nv3 := (*[3]interface{})(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "[3]interface {}"
- v3t2 := "string"
- v3t3 := "int"
- v3t4 := "uint"
- v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " +
- "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" +
- v3t4 + ") 3\n}"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-
- // Array containing bytes.
- v4 := [34]byte{
- 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
- 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
- 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
- 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
- 0x31, 0x32,
- }
- v4Len := fmt.Sprintf("%d", len(v4))
- v4Cap := fmt.Sprintf("%d", cap(v4))
- nv4 := (*[34]byte)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "[34]uint8"
- v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " +
- "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" +
- " |............... |\n" +
- " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" +
- " |!\"#$%&'()*+,-./0|\n" +
- " 00000020 31 32 " +
- " |12|\n}"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
- addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n")
- addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n")
- addDumpTest(nv4, "(*"+v4t+")(<nil>)\n")
-}
-
-func addSliceDumpTests() {
- // Slice containing standard float32 values.
- v := []float32{3.14, 6.28, 12.56}
- vLen := fmt.Sprintf("%d", len(v))
- vCap := fmt.Sprintf("%d", cap(v))
- nv := (*[]float32)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "float32"
- vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 3.14,\n (" +
- vt + ") 6.28,\n (" + vt + ") 12.56\n}"
- addDumpTest(v, "([]"+vt+") "+vs+"\n")
- addDumpTest(pv, "(*[]"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**[]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*[]"+vt+")(<nil>)\n")
-
- // Slice containing type with custom formatter on pointer receiver only.
- v2i0 := pstringer("1")
- v2i1 := pstringer("2")
- v2i2 := pstringer("3")
- v2 := []pstringer{v2i0, v2i1, v2i2}
- v2i0Len := fmt.Sprintf("%d", len(v2i0))
- v2i1Len := fmt.Sprintf("%d", len(v2i1))
- v2i2Len := fmt.Sprintf("%d", len(v2i2))
- v2Len := fmt.Sprintf("%d", len(v2))
- v2Cap := fmt.Sprintf("%d", cap(v2))
- nv2 := (*[]pstringer)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.pstringer"
- v2s := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + ") (len=" +
- v2i0Len + ") stringer 1,\n (" + v2t + ") (len=" + v2i1Len +
- ") stringer 2,\n (" + v2t + ") (len=" + v2i2Len + ") " +
- "stringer 3\n}"
- addDumpTest(v2, "([]"+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*[]"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**[]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*[]"+v2t+")(<nil>)\n")
-
- // Slice containing interfaces.
- v3i0 := "one"
- v3 := []interface{}{v3i0, int(2), uint(3), nil}
- v3i0Len := fmt.Sprintf("%d", len(v3i0))
- v3Len := fmt.Sprintf("%d", len(v3))
- v3Cap := fmt.Sprintf("%d", cap(v3))
- nv3 := (*[]interface{})(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "[]interface {}"
- v3t2 := "string"
- v3t3 := "int"
- v3t4 := "uint"
- v3t5 := "interface {}"
- v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " +
- "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" +
- v3t4 + ") 3,\n (" + v3t5 + ") <nil>\n}"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-
- // Slice containing bytes.
- v4 := []byte{
- 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
- 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
- 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
- 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
- 0x31, 0x32,
- }
- v4Len := fmt.Sprintf("%d", len(v4))
- v4Cap := fmt.Sprintf("%d", cap(v4))
- nv4 := (*[]byte)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "[]uint8"
- v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " +
- "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" +
- " |............... |\n" +
- " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" +
- " |!\"#$%&'()*+,-./0|\n" +
- " 00000020 31 32 " +
- " |12|\n}"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
- addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n")
- addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n")
- addDumpTest(nv4, "(*"+v4t+")(<nil>)\n")
-
- // Nil slice.
- v5 := []int(nil)
- nv5 := (*[]int)(nil)
- pv5 := &v5
- v5Addr := fmt.Sprintf("%p", pv5)
- pv5Addr := fmt.Sprintf("%p", &pv5)
- v5t := "[]int"
- v5s := "<nil>"
- addDumpTest(v5, "("+v5t+") "+v5s+"\n")
- addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n")
- addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n")
- addDumpTest(nv5, "(*"+v5t+")(<nil>)\n")
-}
-
-func addStringDumpTests() {
- // Standard string.
- v := "test"
- vLen := fmt.Sprintf("%d", len(v))
- nv := (*string)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "string"
- vs := "(len=" + vLen + ") \"test\""
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-}
-
-func addInterfaceDumpTests() {
- // Nil interface.
- var v interface{}
- nv := (*interface{})(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "interface {}"
- vs := "<nil>"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Sub-interface.
- v2 := interface{}(uint16(65535))
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uint16"
- v2s := "65535"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
-}
-
-func addMapDumpTests() {
- // Map with string keys and int vals.
- k := "one"
- kk := "two"
- m := map[string]int{k: 1, kk: 2}
- klen := fmt.Sprintf("%d", len(k)) // not kLen to shut golint up
- kkLen := fmt.Sprintf("%d", len(kk))
- mLen := fmt.Sprintf("%d", len(m))
- nilMap := map[string]int(nil)
- nm := (*map[string]int)(nil)
- pm := &m
- mAddr := fmt.Sprintf("%p", pm)
- pmAddr := fmt.Sprintf("%p", &pm)
- mt := "map[string]int"
- mt1 := "string"
- mt2 := "int"
- ms := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + klen + ") " +
- "\"one\": (" + mt2 + ") 1,\n (" + mt1 + ") (len=" + kkLen +
- ") \"two\": (" + mt2 + ") 2\n}"
- ms2 := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + kkLen + ") " +
- "\"two\": (" + mt2 + ") 2,\n (" + mt1 + ") (len=" + klen +
- ") \"one\": (" + mt2 + ") 1\n}"
- addDumpTest(m, "("+mt+") "+ms+"\n", "("+mt+") "+ms2+"\n")
- addDumpTest(pm, "(*"+mt+")("+mAddr+")("+ms+")\n",
- "(*"+mt+")("+mAddr+")("+ms2+")\n")
- addDumpTest(&pm, "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms+")\n",
- "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms2+")\n")
- addDumpTest(nm, "(*"+mt+")(<nil>)\n")
- addDumpTest(nilMap, "("+mt+") <nil>\n")
-
- // Map with custom formatter type on pointer receiver only keys and vals.
- k2 := pstringer("one")
- v2 := pstringer("1")
- m2 := map[pstringer]pstringer{k2: v2}
- k2Len := fmt.Sprintf("%d", len(k2))
- v2Len := fmt.Sprintf("%d", len(v2))
- m2Len := fmt.Sprintf("%d", len(m2))
- nilMap2 := map[pstringer]pstringer(nil)
- nm2 := (*map[pstringer]pstringer)(nil)
- pm2 := &m2
- m2Addr := fmt.Sprintf("%p", pm2)
- pm2Addr := fmt.Sprintf("%p", &pm2)
- m2t := "map[spew_test.pstringer]spew_test.pstringer"
- m2t1 := "spew_test.pstringer"
- m2t2 := "spew_test.pstringer"
- m2s := "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + ") " +
- "stringer one: (" + m2t2 + ") (len=" + v2Len + ") stringer 1\n}"
- if spew.UnsafeDisabled {
- m2s = "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len +
- ") " + "\"one\": (" + m2t2 + ") (len=" + v2Len +
- ") \"1\"\n}"
- }
- addDumpTest(m2, "("+m2t+") "+m2s+"\n")
- addDumpTest(pm2, "(*"+m2t+")("+m2Addr+")("+m2s+")\n")
- addDumpTest(&pm2, "(**"+m2t+")("+pm2Addr+"->"+m2Addr+")("+m2s+")\n")
- addDumpTest(nm2, "(*"+m2t+")(<nil>)\n")
- addDumpTest(nilMap2, "("+m2t+") <nil>\n")
-
- // Map with interface keys and values.
- k3 := "one"
- k3Len := fmt.Sprintf("%d", len(k3))
- m3 := map[interface{}]interface{}{k3: 1}
- m3Len := fmt.Sprintf("%d", len(m3))
- nilMap3 := map[interface{}]interface{}(nil)
- nm3 := (*map[interface{}]interface{})(nil)
- pm3 := &m3
- m3Addr := fmt.Sprintf("%p", pm3)
- pm3Addr := fmt.Sprintf("%p", &pm3)
- m3t := "map[interface {}]interface {}"
- m3t1 := "string"
- m3t2 := "int"
- m3s := "(len=" + m3Len + ") {\n (" + m3t1 + ") (len=" + k3Len + ") " +
- "\"one\": (" + m3t2 + ") 1\n}"
- addDumpTest(m3, "("+m3t+") "+m3s+"\n")
- addDumpTest(pm3, "(*"+m3t+")("+m3Addr+")("+m3s+")\n")
- addDumpTest(&pm3, "(**"+m3t+")("+pm3Addr+"->"+m3Addr+")("+m3s+")\n")
- addDumpTest(nm3, "(*"+m3t+")(<nil>)\n")
- addDumpTest(nilMap3, "("+m3t+") <nil>\n")
-
- // Map with nil interface value.
- k4 := "nil"
- k4Len := fmt.Sprintf("%d", len(k4))
- m4 := map[string]interface{}{k4: nil}
- m4Len := fmt.Sprintf("%d", len(m4))
- nilMap4 := map[string]interface{}(nil)
- nm4 := (*map[string]interface{})(nil)
- pm4 := &m4
- m4Addr := fmt.Sprintf("%p", pm4)
- pm4Addr := fmt.Sprintf("%p", &pm4)
- m4t := "map[string]interface {}"
- m4t1 := "string"
- m4t2 := "interface {}"
- m4s := "(len=" + m4Len + ") {\n (" + m4t1 + ") (len=" + k4Len + ")" +
- " \"nil\": (" + m4t2 + ") <nil>\n}"
- addDumpTest(m4, "("+m4t+") "+m4s+"\n")
- addDumpTest(pm4, "(*"+m4t+")("+m4Addr+")("+m4s+")\n")
- addDumpTest(&pm4, "(**"+m4t+")("+pm4Addr+"->"+m4Addr+")("+m4s+")\n")
- addDumpTest(nm4, "(*"+m4t+")(<nil>)\n")
- addDumpTest(nilMap4, "("+m4t+") <nil>\n")
-}
-
-func addStructDumpTests() {
- // Struct with primitives.
- type s1 struct {
- a int8
- b uint8
- }
- v := s1{127, 255}
- nv := (*s1)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.s1"
- vt2 := "int8"
- vt3 := "uint8"
- vs := "{\n a: (" + vt2 + ") 127,\n b: (" + vt3 + ") 255\n}"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Struct that contains another struct.
- type s2 struct {
- s1 s1
- b bool
- }
- v2 := s2{s1{127, 255}, true}
- nv2 := (*s2)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.s2"
- v2t2 := "spew_test.s1"
- v2t3 := "int8"
- v2t4 := "uint8"
- v2t5 := "bool"
- v2s := "{\n s1: (" + v2t2 + ") {\n a: (" + v2t3 + ") 127,\n b: (" +
- v2t4 + ") 255\n },\n b: (" + v2t5 + ") true\n}"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-
- // Struct that contains custom type with Stringer pointer interface via both
- // exported and unexported fields.
- type s3 struct {
- s pstringer
- S pstringer
- }
- v3 := s3{"test", "test2"}
- nv3 := (*s3)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "spew_test.s3"
- v3t2 := "spew_test.pstringer"
- v3s := "{\n s: (" + v3t2 + ") (len=4) stringer test,\n S: (" + v3t2 +
- ") (len=5) stringer test2\n}"
- v3sp := v3s
- if spew.UnsafeDisabled {
- v3s = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" +
- v3t2 + ") (len=5) \"test2\"\n}"
- v3sp = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" +
- v3t2 + ") (len=5) stringer test2\n}"
- }
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3sp+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3sp+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-
- // Struct that contains embedded struct and field to same struct.
- e := embed{"embedstr"}
- eLen := fmt.Sprintf("%d", len("embedstr"))
- v4 := embedwrap{embed: &e, e: &e}
- nv4 := (*embedwrap)(nil)
- pv4 := &v4
- eAddr := fmt.Sprintf("%p", &e)
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "spew_test.embedwrap"
- v4t2 := "spew_test.embed"
- v4t3 := "string"
- v4s := "{\n embed: (*" + v4t2 + ")(" + eAddr + ")({\n a: (" + v4t3 +
- ") (len=" + eLen + ") \"embedstr\"\n }),\n e: (*" + v4t2 +
- ")(" + eAddr + ")({\n a: (" + v4t3 + ") (len=" + eLen + ")" +
- " \"embedstr\"\n })\n}"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
- addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n")
- addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n")
- addDumpTest(nv4, "(*"+v4t+")(<nil>)\n")
-}
-
-func addUintptrDumpTests() {
- // Null pointer.
- v := uintptr(0)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "uintptr"
- vs := "<nil>"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
-
- // Address of real variable.
- i := 1
- v2 := uintptr(unsafe.Pointer(&i))
- nv2 := (*uintptr)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uintptr"
- v2s := fmt.Sprintf("%p", &i)
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-}
-
-func addUnsafePointerDumpTests() {
- // Null pointer.
- v := unsafe.Pointer(nil)
- nv := (*unsafe.Pointer)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "unsafe.Pointer"
- vs := "<nil>"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Address of real variable.
- i := 1
- v2 := unsafe.Pointer(&i)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "unsafe.Pointer"
- v2s := fmt.Sprintf("%p", &i)
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-}
-
-func addChanDumpTests() {
- // Nil channel.
- var v chan int
- pv := &v
- nv := (*chan int)(nil)
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "chan int"
- vs := "<nil>"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Real channel.
- v2 := make(chan int)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "chan int"
- v2s := fmt.Sprintf("%p", v2)
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
-}
-
-func addFuncDumpTests() {
- // Function with no params and no returns.
- v := addIntDumpTests
- nv := (*func())(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "func()"
- vs := fmt.Sprintf("%p", v)
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-
- // Function with param and no returns.
- v2 := TestDump
- nv2 := (*func(*testing.T))(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "func(*testing.T)"
- v2s := fmt.Sprintf("%p", v2)
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n")
- addDumpTest(nv2, "(*"+v2t+")(<nil>)\n")
-
- // Function with multiple params and multiple returns.
- var v3 = func(i int, s string) (b bool, err error) {
- return true, nil
- }
- nv3 := (*func(int, string) (bool, error))(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "func(int, string) (bool, error)"
- v3s := fmt.Sprintf("%p", v3)
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n")
- addDumpTest(nv3, "(*"+v3t+")(<nil>)\n")
-}
-
-func addCircularDumpTests() {
- // Struct that is circular through self referencing.
- type circular struct {
- c *circular
- }
- v := circular{nil}
- v.c = &v
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.circular"
- vs := "{\n c: (*" + vt + ")(" + vAddr + ")({\n c: (*" + vt + ")(" +
- vAddr + ")(<already shown>)\n })\n}"
- vs2 := "{\n c: (*" + vt + ")(" + vAddr + ")(<already shown>)\n}"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs2+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs2+")\n")
-
- // Structs that are circular through cross referencing.
- v2 := xref1{nil}
- ts2 := xref2{&v2}
- v2.ps2 = &ts2
- pv2 := &v2
- ts2Addr := fmt.Sprintf("%p", &ts2)
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.xref1"
- v2t2 := "spew_test.xref2"
- v2s := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t +
- ")(" + v2Addr + ")({\n ps2: (*" + v2t2 + ")(" + ts2Addr +
- ")(<already shown>)\n })\n })\n}"
- v2s2 := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t +
- ")(" + v2Addr + ")(<already shown>)\n })\n}"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
- addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s2+")\n")
- addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s2+")\n")
-
- // Structs that are indirectly circular.
- v3 := indirCir1{nil}
- tic2 := indirCir2{nil}
- tic3 := indirCir3{&v3}
- tic2.ps3 = &tic3
- v3.ps2 = &tic2
- pv3 := &v3
- tic2Addr := fmt.Sprintf("%p", &tic2)
- tic3Addr := fmt.Sprintf("%p", &tic3)
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "spew_test.indirCir1"
- v3t2 := "spew_test.indirCir2"
- v3t3 := "spew_test.indirCir3"
- v3s := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 +
- ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr +
- ")({\n ps2: (*" + v3t2 + ")(" + tic2Addr +
- ")(<already shown>)\n })\n })\n })\n}"
- v3s2 := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 +
- ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr +
- ")(<already shown>)\n })\n })\n}"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
- addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s2+")\n")
- addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s2+")\n")
-}
-
-func addPanicDumpTests() {
- // Type that panics in its Stringer interface.
- v := panicer(127)
- nv := (*panicer)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.panicer"
- vs := "(PANIC=test panic)127"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-}
-
-func addErrorDumpTests() {
- // Type that has a custom Error interface.
- v := customError(127)
- nv := (*customError)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.customError"
- vs := "error: 127"
- addDumpTest(v, "("+vt+") "+vs+"\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
- addDumpTest(nv, "(*"+vt+")(<nil>)\n")
-}
-
-// TestDump executes all of the tests described by dumpTests.
-func TestDump(t *testing.T) {
- // Setup tests.
- addIntDumpTests()
- addUintDumpTests()
- addBoolDumpTests()
- addFloatDumpTests()
- addComplexDumpTests()
- addArrayDumpTests()
- addSliceDumpTests()
- addStringDumpTests()
- addInterfaceDumpTests()
- addMapDumpTests()
- addStructDumpTests()
- addUintptrDumpTests()
- addUnsafePointerDumpTests()
- addChanDumpTests()
- addFuncDumpTests()
- addCircularDumpTests()
- addPanicDumpTests()
- addErrorDumpTests()
- addCgoDumpTests()
-
- t.Logf("Running %d tests", len(dumpTests))
- for i, test := range dumpTests {
- buf := new(bytes.Buffer)
- spew.Fdump(buf, test.in)
- s := buf.String()
- if testFailed(s, test.wants) {
- t.Errorf("Dump #%d\n got: %s %s", i, s, stringizeWants(test.wants))
- continue
- }
- }
-}
-
-func TestDumpSortedKeys(t *testing.T) {
- cfg := spew.ConfigState{SortKeys: true}
- s := cfg.Sdump(map[int]string{1: "1", 3: "3", 2: "2"})
- expected := "(map[int]string) (len=3) {\n(int) 1: (string) (len=1) " +
- "\"1\",\n(int) 2: (string) (len=1) \"2\",\n(int) 3: (string) " +
- "(len=1) \"3\"\n" +
- "}\n"
- if s != expected {
- t.Errorf("Sorted keys mismatch:\n %v %v", s, expected)
- }
-
- s = cfg.Sdump(map[stringer]int{"1": 1, "3": 3, "2": 2})
- expected = "(map[spew_test.stringer]int) (len=3) {\n" +
- "(spew_test.stringer) (len=1) stringer 1: (int) 1,\n" +
- "(spew_test.stringer) (len=1) stringer 2: (int) 2,\n" +
- "(spew_test.stringer) (len=1) stringer 3: (int) 3\n" +
- "}\n"
- if s != expected {
- t.Errorf("Sorted keys mismatch:\n %v %v", s, expected)
- }
-
- s = cfg.Sdump(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2})
- expected = "(map[spew_test.pstringer]int) (len=3) {\n" +
- "(spew_test.pstringer) (len=1) stringer 1: (int) 1,\n" +
- "(spew_test.pstringer) (len=1) stringer 2: (int) 2,\n" +
- "(spew_test.pstringer) (len=1) stringer 3: (int) 3\n" +
- "}\n"
- if spew.UnsafeDisabled {
- expected = "(map[spew_test.pstringer]int) (len=3) {\n" +
- "(spew_test.pstringer) (len=1) \"1\": (int) 1,\n" +
- "(spew_test.pstringer) (len=1) \"2\": (int) 2,\n" +
- "(spew_test.pstringer) (len=1) \"3\": (int) 3\n" +
- "}\n"
- }
- if s != expected {
- t.Errorf("Sorted keys mismatch:\n %v %v", s, expected)
- }
-
- s = cfg.Sdump(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2})
- expected = "(map[spew_test.customError]int) (len=3) {\n" +
- "(spew_test.customError) error: 1: (int) 1,\n" +
- "(spew_test.customError) error: 2: (int) 2,\n" +
- "(spew_test.customError) error: 3: (int) 3\n" +
- "}\n"
- if s != expected {
- t.Errorf("Sorted keys mismatch:\n %v %v", s, expected)
- }
-
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go
deleted file mode 100644
index 108baa55f..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when both cgo is supported and "-tags testcgo" is added to the go test
-// command line. This means the cgo tests are only added (and hence run) when
-// specifially requested. This configuration is used because spew itself
-// does not require cgo to run even though it does handle certain cgo types
-// specially. Rather than forcing all clients to require cgo and an external
-// C compiler just to run the tests, this scheme makes them optional.
-// +build cgo,testcgo
-
-package spew_test
-
-import (
- "fmt"
-
- "github.com/davecgh/go-spew/spew/testdata"
-)
-
-func addCgoDumpTests() {
- // C char pointer.
- v := testdata.GetCgoCharPointer()
- nv := testdata.GetCgoNullCharPointer()
- pv := &v
- vcAddr := fmt.Sprintf("%p", v)
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "*testdata._Ctype_char"
- vs := "116"
- addDumpTest(v, "("+vt+")("+vcAddr+")("+vs+")\n")
- addDumpTest(pv, "(*"+vt+")("+vAddr+"->"+vcAddr+")("+vs+")\n")
- addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+"->"+vcAddr+")("+vs+")\n")
- addDumpTest(nv, "("+vt+")(<nil>)\n")
-
- // C char array.
- v2, v2l, v2c := testdata.GetCgoCharArray()
- v2Len := fmt.Sprintf("%d", v2l)
- v2Cap := fmt.Sprintf("%d", v2c)
- v2t := "[6]testdata._Ctype_char"
- v2s := "(len=" + v2Len + " cap=" + v2Cap + ") " +
- "{\n 00000000 74 65 73 74 32 00 " +
- " |test2.|\n}"
- addDumpTest(v2, "("+v2t+") "+v2s+"\n")
-
- // C unsigned char array.
- v3, v3l, v3c := testdata.GetCgoUnsignedCharArray()
- v3Len := fmt.Sprintf("%d", v3l)
- v3Cap := fmt.Sprintf("%d", v3c)
- v3t := "[6]testdata._Ctype_unsignedchar"
- v3t2 := "[6]testdata._Ctype_uchar"
- v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " +
- "{\n 00000000 74 65 73 74 33 00 " +
- " |test3.|\n}"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n")
-
- // C signed char array.
- v4, v4l, v4c := testdata.GetCgoSignedCharArray()
- v4Len := fmt.Sprintf("%d", v4l)
- v4Cap := fmt.Sprintf("%d", v4c)
- v4t := "[6]testdata._Ctype_schar"
- v4t2 := "testdata._Ctype_schar"
- v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " +
- "{\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 101,\n (" + v4t2 +
- ") 115,\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 52,\n (" + v4t2 +
- ") 0\n}"
- addDumpTest(v4, "("+v4t+") "+v4s+"\n")
-
- // C uint8_t array.
- v5, v5l, v5c := testdata.GetCgoUint8tArray()
- v5Len := fmt.Sprintf("%d", v5l)
- v5Cap := fmt.Sprintf("%d", v5c)
- v5t := "[6]testdata._Ctype_uint8_t"
- v5t2 := "[6]testdata._Ctype_uchar"
- v5s := "(len=" + v5Len + " cap=" + v5Cap + ") " +
- "{\n 00000000 74 65 73 74 35 00 " +
- " |test5.|\n}"
- addDumpTest(v5, "("+v5t+") "+v5s+"\n", "("+v5t2+") "+v5s+"\n")
-
- // C typedefed unsigned char array.
- v6, v6l, v6c := testdata.GetCgoTypdefedUnsignedCharArray()
- v6Len := fmt.Sprintf("%d", v6l)
- v6Cap := fmt.Sprintf("%d", v6c)
- v6t := "[6]testdata._Ctype_custom_uchar_t"
- v6t2 := "[6]testdata._Ctype_uchar"
- v6s := "(len=" + v6Len + " cap=" + v6Cap + ") " +
- "{\n 00000000 74 65 73 74 36 00 " +
- " |test6.|\n}"
- addDumpTest(v6, "("+v6t+") "+v6s+"\n", "("+v6t2+") "+v6s+"\n")
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go
deleted file mode 100644
index 52a0971fb..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2013 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when either cgo is not supported or "-tags testcgo" is not added to the go
-// test command line. This file intentionally does not setup any cgo tests in
-// this scenario.
-// +build !cgo !testcgo
-
-package spew_test
-
-func addCgoDumpTests() {
- // Don't add any tests for cgo since this file is only compiled when
- // there should not be any cgo tests.
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/example_test.go b/vendor/github.com/davecgh/go-spew/spew/example_test.go
deleted file mode 100644
index c6ec8c6d5..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/example_test.go
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew_test
-
-import (
- "fmt"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-type Flag int
-
-const (
- flagOne Flag = iota
- flagTwo
-)
-
-var flagStrings = map[Flag]string{
- flagOne: "flagOne",
- flagTwo: "flagTwo",
-}
-
-func (f Flag) String() string {
- if s, ok := flagStrings[f]; ok {
- return s
- }
- return fmt.Sprintf("Unknown flag (%d)", int(f))
-}
-
-type Bar struct {
- data uintptr
-}
-
-type Foo struct {
- unexportedField Bar
- ExportedField map[interface{}]interface{}
-}
-
-// This example demonstrates how to use Dump to dump variables to stdout.
-func ExampleDump() {
- // The following package level declarations are assumed for this example:
- /*
- type Flag int
-
- const (
- flagOne Flag = iota
- flagTwo
- )
-
- var flagStrings = map[Flag]string{
- flagOne: "flagOne",
- flagTwo: "flagTwo",
- }
-
- func (f Flag) String() string {
- if s, ok := flagStrings[f]; ok {
- return s
- }
- return fmt.Sprintf("Unknown flag (%d)", int(f))
- }
-
- type Bar struct {
- data uintptr
- }
-
- type Foo struct {
- unexportedField Bar
- ExportedField map[interface{}]interface{}
- }
- */
-
- // Setup some sample data structures for the example.
- bar := Bar{uintptr(0)}
- s1 := Foo{bar, map[interface{}]interface{}{"one": true}}
- f := Flag(5)
- b := []byte{
- 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
- 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
- 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
- 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
- 0x31, 0x32,
- }
-
- // Dump!
- spew.Dump(s1, f, b)
-
- // Output:
- // (spew_test.Foo) {
- // unexportedField: (spew_test.Bar) {
- // data: (uintptr) <nil>
- // },
- // ExportedField: (map[interface {}]interface {}) (len=1) {
- // (string) (len=3) "one": (bool) true
- // }
- // }
- // (spew_test.Flag) Unknown flag (5)
- // ([]uint8) (len=34 cap=34) {
- // 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- // 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- // 00000020 31 32 |12|
- // }
- //
-}
-
-// This example demonstrates how to use Printf to display a variable with a
-// format string and inline formatting.
-func ExamplePrintf() {
- // Create a double pointer to a uint 8.
- ui8 := uint8(5)
- pui8 := &ui8
- ppui8 := &pui8
-
- // Create a circular data type.
- type circular struct {
- ui8 uint8
- c *circular
- }
- c := circular{ui8: 1}
- c.c = &c
-
- // Print!
- spew.Printf("ppui8: %v\n", ppui8)
- spew.Printf("circular: %v\n", c)
-
- // Output:
- // ppui8: <**>5
- // circular: {1 <*>{1 <*><shown>}}
-}
-
-// This example demonstrates how to use a ConfigState.
-func ExampleConfigState() {
- // Modify the indent level of the ConfigState only. The global
- // configuration is not modified.
- scs := spew.ConfigState{Indent: "\t"}
-
- // Output using the ConfigState instance.
- v := map[string]int{"one": 1}
- scs.Printf("v: %v\n", v)
- scs.Dump(v)
-
- // Output:
- // v: map[one:1]
- // (map[string]int) (len=1) {
- // (string) (len=3) "one": (int) 1
- // }
-}
-
-// This example demonstrates how to use ConfigState.Dump to dump variables to
-// stdout
-func ExampleConfigState_Dump() {
- // See the top-level Dump example for details on the types used in this
- // example.
-
- // Create two ConfigState instances with different indentation.
- scs := spew.ConfigState{Indent: "\t"}
- scs2 := spew.ConfigState{Indent: " "}
-
- // Setup some sample data structures for the example.
- bar := Bar{uintptr(0)}
- s1 := Foo{bar, map[interface{}]interface{}{"one": true}}
-
- // Dump using the ConfigState instances.
- scs.Dump(s1)
- scs2.Dump(s1)
-
- // Output:
- // (spew_test.Foo) {
- // unexportedField: (spew_test.Bar) {
- // data: (uintptr) <nil>
- // },
- // ExportedField: (map[interface {}]interface {}) (len=1) {
- // (string) (len=3) "one": (bool) true
- // }
- // }
- // (spew_test.Foo) {
- // unexportedField: (spew_test.Bar) {
- // data: (uintptr) <nil>
- // },
- // ExportedField: (map[interface {}]interface {}) (len=1) {
- // (string) (len=3) "one": (bool) true
- // }
- // }
- //
-}
-
-// This example demonstrates how to use ConfigState.Printf to display a variable
-// with a format string and inline formatting.
-func ExampleConfigState_Printf() {
- // See the top-level Dump example for details on the types used in this
- // example.
-
- // Create two ConfigState instances and modify the method handling of the
- // first ConfigState only.
- scs := spew.NewDefaultConfig()
- scs2 := spew.NewDefaultConfig()
- scs.DisableMethods = true
-
- // Alternatively
- // scs := spew.ConfigState{Indent: " ", DisableMethods: true}
- // scs2 := spew.ConfigState{Indent: " "}
-
- // This is of type Flag which implements a Stringer and has raw value 1.
- f := flagTwo
-
- // Dump using the ConfigState instances.
- scs.Printf("f: %v\n", f)
- scs2.Printf("f: %v\n", f)
-
- // Output:
- // f: 1
- // f: flagTwo
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
index b04edb7d7..c49875bac 100644
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format.go
@@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) {
// Display dereferenced value.
switch {
- case nilFound:
+ case nilFound == true:
f.fs.Write(nilAngleBytes)
- case cycleFound:
+ case cycleFound == true:
f.fs.Write(circularShortBytes)
default:
diff --git a/vendor/github.com/davecgh/go-spew/spew/format_test.go b/vendor/github.com/davecgh/go-spew/spew/format_test.go
deleted file mode 100644
index 87ee9651e..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/format_test.go
+++ /dev/null
@@ -1,1558 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Test Summary:
-NOTE: For each test, a nil pointer, a single pointer and double pointer to the
-base test element are also tested to ensure proper indirection across all types.
-
-- Max int8, int16, int32, int64, int
-- Max uint8, uint16, uint32, uint64, uint
-- Boolean true and false
-- Standard complex64 and complex128
-- Array containing standard ints
-- Array containing type with custom formatter on pointer receiver only
-- Array containing interfaces
-- Slice containing standard float32 values
-- Slice containing type with custom formatter on pointer receiver only
-- Slice containing interfaces
-- Nil slice
-- Standard string
-- Nil interface
-- Sub-interface
-- Map with string keys and int vals
-- Map with custom formatter type on pointer receiver only keys and vals
-- Map with interface keys and values
-- Map with nil interface value
-- Struct with primitives
-- Struct that contains another struct
-- Struct that contains custom type with Stringer pointer interface via both
- exported and unexported fields
-- Struct that contains embedded struct and field to same struct
-- Uintptr to 0 (null pointer)
-- Uintptr address of real variable
-- Unsafe.Pointer to 0 (null pointer)
-- Unsafe.Pointer to address of real variable
-- Nil channel
-- Standard int channel
-- Function with no params and no returns
-- Function with param and no returns
-- Function with multiple params and multiple returns
-- Struct that is circular through self referencing
-- Structs that are circular through cross referencing
-- Structs that are indirectly circular
-- Type that panics in its Stringer interface
-- Type that has a custom Error interface
-- %x passthrough with uint
-- %#x passthrough with uint
-- %f passthrough with precision
-- %f passthrough with width and precision
-- %d passthrough with width
-- %q passthrough with string
-*/
-
-package spew_test
-
-import (
- "bytes"
- "fmt"
- "testing"
- "unsafe"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-// formatterTest is used to describe a test to be performed against NewFormatter.
-type formatterTest struct {
- format string
- in interface{}
- wants []string
-}
-
-// formatterTests houses all of the tests to be performed against NewFormatter.
-var formatterTests = make([]formatterTest, 0)
-
-// addFormatterTest is a helper method to append the passed input and desired
-// result to formatterTests.
-func addFormatterTest(format string, in interface{}, wants ...string) {
- test := formatterTest{format, in, wants}
- formatterTests = append(formatterTests, test)
-}
-
-func addIntFormatterTests() {
- // Max int8.
- v := int8(127)
- nv := (*int8)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "int8"
- vs := "127"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Max int16.
- v2 := int16(32767)
- nv2 := (*int16)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "int16"
- v2s := "32767"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Max int32.
- v3 := int32(2147483647)
- nv3 := (*int32)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "int32"
- v3s := "2147483647"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
-
- // Max int64.
- v4 := int64(9223372036854775807)
- nv4 := (*int64)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "int64"
- v4s := "9223372036854775807"
- addFormatterTest("%v", v4, v4s)
- addFormatterTest("%v", pv4, "<*>"+v4s)
- addFormatterTest("%v", &pv4, "<**>"+v4s)
- addFormatterTest("%v", nv4, "<nil>")
- addFormatterTest("%+v", v4, v4s)
- addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s)
- addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%#v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s)
- addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s)
- addFormatterTest("%#v", nv4, "(*"+v4t+")"+"<nil>")
- addFormatterTest("%#+v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s)
- addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"<nil>")
-
- // Max int.
- v5 := int(2147483647)
- nv5 := (*int)(nil)
- pv5 := &v5
- v5Addr := fmt.Sprintf("%p", pv5)
- pv5Addr := fmt.Sprintf("%p", &pv5)
- v5t := "int"
- v5s := "2147483647"
- addFormatterTest("%v", v5, v5s)
- addFormatterTest("%v", pv5, "<*>"+v5s)
- addFormatterTest("%v", &pv5, "<**>"+v5s)
- addFormatterTest("%v", nv5, "<nil>")
- addFormatterTest("%+v", v5, v5s)
- addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s)
- addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s)
- addFormatterTest("%+v", nv5, "<nil>")
- addFormatterTest("%#v", v5, "("+v5t+")"+v5s)
- addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s)
- addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s)
- addFormatterTest("%#v", nv5, "(*"+v5t+")"+"<nil>")
- addFormatterTest("%#+v", v5, "("+v5t+")"+v5s)
- addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s)
- addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s)
- addFormatterTest("%#+v", nv5, "(*"+v5t+")"+"<nil>")
-}
-
-func addUintFormatterTests() {
- // Max uint8.
- v := uint8(255)
- nv := (*uint8)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "uint8"
- vs := "255"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Max uint16.
- v2 := uint16(65535)
- nv2 := (*uint16)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uint16"
- v2s := "65535"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Max uint32.
- v3 := uint32(4294967295)
- nv3 := (*uint32)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "uint32"
- v3s := "4294967295"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
-
- // Max uint64.
- v4 := uint64(18446744073709551615)
- nv4 := (*uint64)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "uint64"
- v4s := "18446744073709551615"
- addFormatterTest("%v", v4, v4s)
- addFormatterTest("%v", pv4, "<*>"+v4s)
- addFormatterTest("%v", &pv4, "<**>"+v4s)
- addFormatterTest("%v", nv4, "<nil>")
- addFormatterTest("%+v", v4, v4s)
- addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s)
- addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%#v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s)
- addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s)
- addFormatterTest("%#v", nv4, "(*"+v4t+")"+"<nil>")
- addFormatterTest("%#+v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s)
- addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"<nil>")
-
- // Max uint.
- v5 := uint(4294967295)
- nv5 := (*uint)(nil)
- pv5 := &v5
- v5Addr := fmt.Sprintf("%p", pv5)
- pv5Addr := fmt.Sprintf("%p", &pv5)
- v5t := "uint"
- v5s := "4294967295"
- addFormatterTest("%v", v5, v5s)
- addFormatterTest("%v", pv5, "<*>"+v5s)
- addFormatterTest("%v", &pv5, "<**>"+v5s)
- addFormatterTest("%v", nv5, "<nil>")
- addFormatterTest("%+v", v5, v5s)
- addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s)
- addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s)
- addFormatterTest("%+v", nv5, "<nil>")
- addFormatterTest("%#v", v5, "("+v5t+")"+v5s)
- addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s)
- addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s)
- addFormatterTest("%#v", nv5, "(*"+v5t+")"+"<nil>")
- addFormatterTest("%#+v", v5, "("+v5t+")"+v5s)
- addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s)
- addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s)
- addFormatterTest("%#v", nv5, "(*"+v5t+")"+"<nil>")
-}
-
-func addBoolFormatterTests() {
- // Boolean true.
- v := bool(true)
- nv := (*bool)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "bool"
- vs := "true"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Boolean false.
- v2 := bool(false)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "bool"
- v2s := "false"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
-}
-
-func addFloatFormatterTests() {
- // Standard float32.
- v := float32(3.1415)
- nv := (*float32)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "float32"
- vs := "3.1415"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Standard float64.
- v2 := float64(3.1415926)
- nv2 := (*float64)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "float64"
- v2s := "3.1415926"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-}
-
-func addComplexFormatterTests() {
- // Standard complex64.
- v := complex(float32(6), -2)
- nv := (*complex64)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "complex64"
- vs := "(6-2i)"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Standard complex128.
- v2 := complex(float64(-6), 2)
- nv2 := (*complex128)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "complex128"
- v2s := "(-6+2i)"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-}
-
-func addArrayFormatterTests() {
- // Array containing standard ints.
- v := [3]int{1, 2, 3}
- nv := (*[3]int)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "[3]int"
- vs := "[1 2 3]"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Array containing type with custom formatter on pointer receiver only.
- v2 := [3]pstringer{"1", "2", "3"}
- nv2 := (*[3]pstringer)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "[3]spew_test.pstringer"
- v2sp := "[stringer 1 stringer 2 stringer 3]"
- v2s := v2sp
- if spew.UnsafeDisabled {
- v2s = "[1 2 3]"
- }
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2sp)
- addFormatterTest("%v", &pv2, "<**>"+v2sp)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2sp)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2sp)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2sp)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2sp)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2sp)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2sp)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Array containing interfaces.
- v3 := [3]interface{}{"one", int(2), uint(3)}
- nv3 := (*[3]interface{})(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "[3]interface {}"
- v3t2 := "string"
- v3t3 := "int"
- v3t4 := "uint"
- v3s := "[one 2 3]"
- v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3]"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"<nil>")
-}
-
-func addSliceFormatterTests() {
- // Slice containing standard float32 values.
- v := []float32{3.14, 6.28, 12.56}
- nv := (*[]float32)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "[]float32"
- vs := "[3.14 6.28 12.56]"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Slice containing type with custom formatter on pointer receiver only.
- v2 := []pstringer{"1", "2", "3"}
- nv2 := (*[]pstringer)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "[]spew_test.pstringer"
- v2s := "[stringer 1 stringer 2 stringer 3]"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Slice containing interfaces.
- v3 := []interface{}{"one", int(2), uint(3), nil}
- nv3 := (*[]interface{})(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "[]interface {}"
- v3t2 := "string"
- v3t3 := "int"
- v3t4 := "uint"
- v3t5 := "interface {}"
- v3s := "[one 2 3 <nil>]"
- v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3 (" + v3t5 +
- ")<nil>]"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"<nil>")
-
- // Nil slice.
- var v4 []int
- nv4 := (*[]int)(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "[]int"
- v4s := "<nil>"
- addFormatterTest("%v", v4, v4s)
- addFormatterTest("%v", pv4, "<*>"+v4s)
- addFormatterTest("%v", &pv4, "<**>"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%+v", v4, v4s)
- addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s)
- addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%#v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s)
- addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s)
- addFormatterTest("%#v", nv4, "(*"+v4t+")"+"<nil>")
- addFormatterTest("%#+v", v4, "("+v4t+")"+v4s)
- addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s)
- addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"<nil>")
-}
-
-func addStringFormatterTests() {
- // Standard string.
- v := "test"
- nv := (*string)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "string"
- vs := "test"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-}
-
-func addInterfaceFormatterTests() {
- // Nil interface.
- var v interface{}
- nv := (*interface{})(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "interface {}"
- vs := "<nil>"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Sub-interface.
- v2 := interface{}(uint16(65535))
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uint16"
- v2s := "65535"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
-}
-
-func addMapFormatterTests() {
- // Map with string keys and int vals.
- v := map[string]int{"one": 1, "two": 2}
- nilMap := map[string]int(nil)
- nv := (*map[string]int)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "map[string]int"
- vs := "map[one:1 two:2]"
- vs2 := "map[two:2 one:1]"
- addFormatterTest("%v", v, vs, vs2)
- addFormatterTest("%v", pv, "<*>"+vs, "<*>"+vs2)
- addFormatterTest("%v", &pv, "<**>"+vs, "<**>"+vs2)
- addFormatterTest("%+v", nilMap, "<nil>")
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs, vs2)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs, "<*>("+vAddr+")"+vs2)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs,
- "<**>("+pvAddr+"->"+vAddr+")"+vs2)
- addFormatterTest("%+v", nilMap, "<nil>")
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs, "("+vt+")"+vs2)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs, "(*"+vt+")"+vs2)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs, "(**"+vt+")"+vs2)
- addFormatterTest("%#v", nilMap, "("+vt+")"+"<nil>")
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs, "("+vt+")"+vs2)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs,
- "(*"+vt+")("+vAddr+")"+vs2)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs,
- "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs2)
- addFormatterTest("%#+v", nilMap, "("+vt+")"+"<nil>")
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Map with custom formatter type on pointer receiver only keys and vals.
- v2 := map[pstringer]pstringer{"one": "1"}
- nv2 := (*map[pstringer]pstringer)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "map[spew_test.pstringer]spew_test.pstringer"
- v2s := "map[stringer one:stringer 1]"
- if spew.UnsafeDisabled {
- v2s = "map[one:1]"
- }
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Map with interface keys and values.
- v3 := map[interface{}]interface{}{"one": 1}
- nv3 := (*map[interface{}]interface{})(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "map[interface {}]interface {}"
- v3t1 := "string"
- v3t2 := "int"
- v3s := "map[one:1]"
- v3s2 := "map[(" + v3t1 + ")one:(" + v3t2 + ")1]"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2)
- addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"<nil>")
-
- // Map with nil interface value
- v4 := map[string]interface{}{"nil": nil}
- nv4 := (*map[string]interface{})(nil)
- pv4 := &v4
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "map[string]interface {}"
- v4t1 := "interface {}"
- v4s := "map[nil:<nil>]"
- v4s2 := "map[nil:(" + v4t1 + ")<nil>]"
- addFormatterTest("%v", v4, v4s)
- addFormatterTest("%v", pv4, "<*>"+v4s)
- addFormatterTest("%v", &pv4, "<**>"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%+v", v4, v4s)
- addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s)
- addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%#v", v4, "("+v4t+")"+v4s2)
- addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s2)
- addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s2)
- addFormatterTest("%#v", nv4, "(*"+v4t+")"+"<nil>")
- addFormatterTest("%#+v", v4, "("+v4t+")"+v4s2)
- addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s2)
- addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s2)
- addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"<nil>")
-}
-
-func addStructFormatterTests() {
- // Struct with primitives.
- type s1 struct {
- a int8
- b uint8
- }
- v := s1{127, 255}
- nv := (*s1)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.s1"
- vt2 := "int8"
- vt3 := "uint8"
- vs := "{127 255}"
- vs2 := "{a:127 b:255}"
- vs3 := "{a:(" + vt2 + ")127 b:(" + vt3 + ")255}"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs2)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs2)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs2)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs3)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs3)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs3)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs3)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs3)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs3)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Struct that contains another struct.
- type s2 struct {
- s1 s1
- b bool
- }
- v2 := s2{s1{127, 255}, true}
- nv2 := (*s2)(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.s2"
- v2t2 := "spew_test.s1"
- v2t3 := "int8"
- v2t4 := "uint8"
- v2t5 := "bool"
- v2s := "{{127 255} true}"
- v2s2 := "{s1:{a:127 b:255} b:true}"
- v2s3 := "{s1:(" + v2t2 + "){a:(" + v2t3 + ")127 b:(" + v2t4 + ")255} b:(" +
- v2t5 + ")true}"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s2)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s2)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s2)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s3)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s3)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s3)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s3)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s3)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s3)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Struct that contains custom type with Stringer pointer interface via both
- // exported and unexported fields.
- type s3 struct {
- s pstringer
- S pstringer
- }
- v3 := s3{"test", "test2"}
- nv3 := (*s3)(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "spew_test.s3"
- v3t2 := "spew_test.pstringer"
- v3s := "{stringer test stringer test2}"
- v3sp := v3s
- v3s2 := "{s:stringer test S:stringer test2}"
- v3s2p := v3s2
- v3s3 := "{s:(" + v3t2 + ")stringer test S:(" + v3t2 + ")stringer test2}"
- v3s3p := v3s3
- if spew.UnsafeDisabled {
- v3s = "{test test2}"
- v3sp = "{test stringer test2}"
- v3s2 = "{s:test S:test2}"
- v3s2p = "{s:test S:stringer test2}"
- v3s3 = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")test2}"
- v3s3p = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")stringer test2}"
- }
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3sp)
- addFormatterTest("%v", &pv3, "<**>"+v3sp)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s2)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s2p)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s2p)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s3)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s3p)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s3p)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s3)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s3p)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s3p)
- addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"<nil>")
-
- // Struct that contains embedded struct and field to same struct.
- e := embed{"embedstr"}
- v4 := embedwrap{embed: &e, e: &e}
- nv4 := (*embedwrap)(nil)
- pv4 := &v4
- eAddr := fmt.Sprintf("%p", &e)
- v4Addr := fmt.Sprintf("%p", pv4)
- pv4Addr := fmt.Sprintf("%p", &pv4)
- v4t := "spew_test.embedwrap"
- v4t2 := "spew_test.embed"
- v4t3 := "string"
- v4s := "{<*>{embedstr} <*>{embedstr}}"
- v4s2 := "{embed:<*>(" + eAddr + "){a:embedstr} e:<*>(" + eAddr +
- "){a:embedstr}}"
- v4s3 := "{embed:(*" + v4t2 + "){a:(" + v4t3 + ")embedstr} e:(*" + v4t2 +
- "){a:(" + v4t3 + ")embedstr}}"
- v4s4 := "{embed:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 +
- ")embedstr} e:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + ")embedstr}}"
- addFormatterTest("%v", v4, v4s)
- addFormatterTest("%v", pv4, "<*>"+v4s)
- addFormatterTest("%v", &pv4, "<**>"+v4s)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%+v", v4, v4s2)
- addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s2)
- addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s2)
- addFormatterTest("%+v", nv4, "<nil>")
- addFormatterTest("%#v", v4, "("+v4t+")"+v4s3)
- addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s3)
- addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s3)
- addFormatterTest("%#v", nv4, "(*"+v4t+")"+"<nil>")
- addFormatterTest("%#+v", v4, "("+v4t+")"+v4s4)
- addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s4)
- addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s4)
- addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"<nil>")
-}
-
-func addUintptrFormatterTests() {
- // Null pointer.
- v := uintptr(0)
- nv := (*uintptr)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "uintptr"
- vs := "<nil>"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Address of real variable.
- i := 1
- v2 := uintptr(unsafe.Pointer(&i))
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "uintptr"
- v2s := fmt.Sprintf("%p", &i)
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
-}
-
-func addUnsafePointerFormatterTests() {
- // Null pointer.
- v := unsafe.Pointer(nil)
- nv := (*unsafe.Pointer)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "unsafe.Pointer"
- vs := "<nil>"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Address of real variable.
- i := 1
- v2 := unsafe.Pointer(&i)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "unsafe.Pointer"
- v2s := fmt.Sprintf("%p", &i)
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
-}
-
-func addChanFormatterTests() {
- // Nil channel.
- var v chan int
- pv := &v
- nv := (*chan int)(nil)
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "chan int"
- vs := "<nil>"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Real channel.
- v2 := make(chan int)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "chan int"
- v2s := fmt.Sprintf("%p", v2)
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
-}
-
-func addFuncFormatterTests() {
- // Function with no params and no returns.
- v := addIntFormatterTests
- nv := (*func())(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "func()"
- vs := fmt.Sprintf("%p", v)
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-
- // Function with param and no returns.
- v2 := TestFormatter
- nv2 := (*func(*testing.T))(nil)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "func(*testing.T)"
- v2s := fmt.Sprintf("%p", v2)
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s)
- addFormatterTest("%v", &pv2, "<**>"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%+v", v2, v2s)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%+v", nv2, "<nil>")
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s)
- addFormatterTest("%#v", nv2, "(*"+v2t+")"+"<nil>")
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s)
- addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"<nil>")
-
- // Function with multiple params and multiple returns.
- var v3 = func(i int, s string) (b bool, err error) {
- return true, nil
- }
- nv3 := (*func(int, string) (bool, error))(nil)
- pv3 := &v3
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "func(int, string) (bool, error)"
- v3s := fmt.Sprintf("%p", v3)
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s)
- addFormatterTest("%v", &pv3, "<**>"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%+v", v3, v3s)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%+v", nv3, "<nil>")
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s)
- addFormatterTest("%#v", nv3, "(*"+v3t+")"+"<nil>")
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s)
- addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"<nil>")
-}
-
-func addCircularFormatterTests() {
- // Struct that is circular through self referencing.
- type circular struct {
- c *circular
- }
- v := circular{nil}
- v.c = &v
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.circular"
- vs := "{<*>{<*><shown>}}"
- vs2 := "{<*><shown>}"
- vs3 := "{c:<*>(" + vAddr + "){c:<*>(" + vAddr + ")<shown>}}"
- vs4 := "{c:<*>(" + vAddr + ")<shown>}"
- vs5 := "{c:(*" + vt + "){c:(*" + vt + ")<shown>}}"
- vs6 := "{c:(*" + vt + ")<shown>}"
- vs7 := "{c:(*" + vt + ")(" + vAddr + "){c:(*" + vt + ")(" + vAddr +
- ")<shown>}}"
- vs8 := "{c:(*" + vt + ")(" + vAddr + ")<shown>}"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs2)
- addFormatterTest("%v", &pv, "<**>"+vs2)
- addFormatterTest("%+v", v, vs3)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs4)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs4)
- addFormatterTest("%#v", v, "("+vt+")"+vs5)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs6)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs6)
- addFormatterTest("%#+v", v, "("+vt+")"+vs7)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs8)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs8)
-
- // Structs that are circular through cross referencing.
- v2 := xref1{nil}
- ts2 := xref2{&v2}
- v2.ps2 = &ts2
- pv2 := &v2
- ts2Addr := fmt.Sprintf("%p", &ts2)
- v2Addr := fmt.Sprintf("%p", pv2)
- pv2Addr := fmt.Sprintf("%p", &pv2)
- v2t := "spew_test.xref1"
- v2t2 := "spew_test.xref2"
- v2s := "{<*>{<*>{<*><shown>}}}"
- v2s2 := "{<*>{<*><shown>}}"
- v2s3 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + "){ps2:<*>(" +
- ts2Addr + ")<shown>}}}"
- v2s4 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + ")<shown>}}"
- v2s5 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + "){ps2:(*" + v2t2 +
- ")<shown>}}}"
- v2s6 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + ")<shown>}}"
- v2s7 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t +
- ")(" + v2Addr + "){ps2:(*" + v2t2 + ")(" + ts2Addr +
- ")<shown>}}}"
- v2s8 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t +
- ")(" + v2Addr + ")<shown>}}"
- addFormatterTest("%v", v2, v2s)
- addFormatterTest("%v", pv2, "<*>"+v2s2)
- addFormatterTest("%v", &pv2, "<**>"+v2s2)
- addFormatterTest("%+v", v2, v2s3)
- addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s4)
- addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s4)
- addFormatterTest("%#v", v2, "("+v2t+")"+v2s5)
- addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s6)
- addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s6)
- addFormatterTest("%#+v", v2, "("+v2t+")"+v2s7)
- addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s8)
- addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s8)
-
- // Structs that are indirectly circular.
- v3 := indirCir1{nil}
- tic2 := indirCir2{nil}
- tic3 := indirCir3{&v3}
- tic2.ps3 = &tic3
- v3.ps2 = &tic2
- pv3 := &v3
- tic2Addr := fmt.Sprintf("%p", &tic2)
- tic3Addr := fmt.Sprintf("%p", &tic3)
- v3Addr := fmt.Sprintf("%p", pv3)
- pv3Addr := fmt.Sprintf("%p", &pv3)
- v3t := "spew_test.indirCir1"
- v3t2 := "spew_test.indirCir2"
- v3t3 := "spew_test.indirCir3"
- v3s := "{<*>{<*>{<*>{<*><shown>}}}}"
- v3s2 := "{<*>{<*>{<*><shown>}}}"
- v3s3 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" +
- v3Addr + "){ps2:<*>(" + tic2Addr + ")<shown>}}}}"
- v3s4 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" +
- v3Addr + ")<shown>}}}"
- v3s5 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t +
- "){ps2:(*" + v3t2 + ")<shown>}}}}"
- v3s6 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t +
- ")<shown>}}}"
- v3s7 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" +
- tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + "){ps2:(*" + v3t2 +
- ")(" + tic2Addr + ")<shown>}}}}"
- v3s8 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" +
- tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + ")<shown>}}}"
- addFormatterTest("%v", v3, v3s)
- addFormatterTest("%v", pv3, "<*>"+v3s2)
- addFormatterTest("%v", &pv3, "<**>"+v3s2)
- addFormatterTest("%+v", v3, v3s3)
- addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s4)
- addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s4)
- addFormatterTest("%#v", v3, "("+v3t+")"+v3s5)
- addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s6)
- addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s6)
- addFormatterTest("%#+v", v3, "("+v3t+")"+v3s7)
- addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s8)
- addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s8)
-}
-
-func addPanicFormatterTests() {
- // Type that panics in its Stringer interface.
- v := panicer(127)
- nv := (*panicer)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.panicer"
- vs := "(PANIC=test panic)127"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-}
-
-func addErrorFormatterTests() {
- // Type that has a custom Error interface.
- v := customError(127)
- nv := (*customError)(nil)
- pv := &v
- vAddr := fmt.Sprintf("%p", pv)
- pvAddr := fmt.Sprintf("%p", &pv)
- vt := "spew_test.customError"
- vs := "error: 127"
- addFormatterTest("%v", v, vs)
- addFormatterTest("%v", pv, "<*>"+vs)
- addFormatterTest("%v", &pv, "<**>"+vs)
- addFormatterTest("%v", nv, "<nil>")
- addFormatterTest("%+v", v, vs)
- addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs)
- addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%+v", nv, "<nil>")
- addFormatterTest("%#v", v, "("+vt+")"+vs)
- addFormatterTest("%#v", pv, "(*"+vt+")"+vs)
- addFormatterTest("%#v", &pv, "(**"+vt+")"+vs)
- addFormatterTest("%#v", nv, "(*"+vt+")"+"<nil>")
- addFormatterTest("%#+v", v, "("+vt+")"+vs)
- addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs)
- addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs)
- addFormatterTest("%#+v", nv, "(*"+vt+")"+"<nil>")
-}
-
-func addPassthroughFormatterTests() {
- // %x passthrough with uint.
- v := uint(4294967295)
- pv := &v
- vAddr := fmt.Sprintf("%x", pv)
- pvAddr := fmt.Sprintf("%x", &pv)
- vs := "ffffffff"
- addFormatterTest("%x", v, vs)
- addFormatterTest("%x", pv, vAddr)
- addFormatterTest("%x", &pv, pvAddr)
-
- // %#x passthrough with uint.
- v2 := int(2147483647)
- pv2 := &v2
- v2Addr := fmt.Sprintf("%#x", pv2)
- pv2Addr := fmt.Sprintf("%#x", &pv2)
- v2s := "0x7fffffff"
- addFormatterTest("%#x", v2, v2s)
- addFormatterTest("%#x", pv2, v2Addr)
- addFormatterTest("%#x", &pv2, pv2Addr)
-
- // %f passthrough with precision.
- addFormatterTest("%.2f", 3.1415, "3.14")
- addFormatterTest("%.3f", 3.1415, "3.142")
- addFormatterTest("%.4f", 3.1415, "3.1415")
-
- // %f passthrough with width and precision.
- addFormatterTest("%5.2f", 3.1415, " 3.14")
- addFormatterTest("%6.3f", 3.1415, " 3.142")
- addFormatterTest("%7.4f", 3.1415, " 3.1415")
-
- // %d passthrough with width.
- addFormatterTest("%3d", 127, "127")
- addFormatterTest("%4d", 127, " 127")
- addFormatterTest("%5d", 127, " 127")
-
- // %q passthrough with string.
- addFormatterTest("%q", "test", "\"test\"")
-}
-
-// TestFormatter executes all of the tests described by formatterTests.
-func TestFormatter(t *testing.T) {
- // Setup tests.
- addIntFormatterTests()
- addUintFormatterTests()
- addBoolFormatterTests()
- addFloatFormatterTests()
- addComplexFormatterTests()
- addArrayFormatterTests()
- addSliceFormatterTests()
- addStringFormatterTests()
- addInterfaceFormatterTests()
- addMapFormatterTests()
- addStructFormatterTests()
- addUintptrFormatterTests()
- addUnsafePointerFormatterTests()
- addChanFormatterTests()
- addFuncFormatterTests()
- addCircularFormatterTests()
- addPanicFormatterTests()
- addErrorFormatterTests()
- addPassthroughFormatterTests()
-
- t.Logf("Running %d tests", len(formatterTests))
- for i, test := range formatterTests {
- buf := new(bytes.Buffer)
- spew.Fprintf(buf, test.format, test.in)
- s := buf.String()
- if testFailed(s, test.wants) {
- t.Errorf("Formatter #%d format: %s got: %s %s", i, test.format, s,
- stringizeWants(test.wants))
- continue
- }
- }
-}
-
-type testStruct struct {
- x int
-}
-
-func (ts testStruct) String() string {
- return fmt.Sprintf("ts.%d", ts.x)
-}
-
-type testStructP struct {
- x int
-}
-
-func (ts *testStructP) String() string {
- return fmt.Sprintf("ts.%d", ts.x)
-}
-
-func TestPrintSortedKeys(t *testing.T) {
- cfg := spew.ConfigState{SortKeys: true}
- s := cfg.Sprint(map[int]string{1: "1", 3: "3", 2: "2"})
- expected := "map[1:1 2:2 3:3]"
- if s != expected {
- t.Errorf("Sorted keys mismatch 1:\n %v %v", s, expected)
- }
-
- s = cfg.Sprint(map[stringer]int{"1": 1, "3": 3, "2": 2})
- expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]"
- if s != expected {
- t.Errorf("Sorted keys mismatch 2:\n %v %v", s, expected)
- }
-
- s = cfg.Sprint(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2})
- expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]"
- if spew.UnsafeDisabled {
- expected = "map[1:1 2:2 3:3]"
- }
- if s != expected {
- t.Errorf("Sorted keys mismatch 3:\n %v %v", s, expected)
- }
-
- s = cfg.Sprint(map[testStruct]int{{1}: 1, {3}: 3, {2}: 2})
- expected = "map[ts.1:1 ts.2:2 ts.3:3]"
- if s != expected {
- t.Errorf("Sorted keys mismatch 4:\n %v %v", s, expected)
- }
-
- if !spew.UnsafeDisabled {
- s = cfg.Sprint(map[testStructP]int{{1}: 1, {3}: 3, {2}: 2})
- expected = "map[ts.1:1 ts.2:2 ts.3:3]"
- if s != expected {
- t.Errorf("Sorted keys mismatch 5:\n %v %v", s, expected)
- }
- }
-
- s = cfg.Sprint(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2})
- expected = "map[error: 1:1 error: 2:2 error: 3:3]"
- if s != expected {
- t.Errorf("Sorted keys mismatch 6:\n %v %v", s, expected)
- }
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/internal_test.go b/vendor/github.com/davecgh/go-spew/spew/internal_test.go
deleted file mode 100644
index e312b4fad..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/internal_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-This test file is part of the spew package rather than than the spew_test
-package because it needs access to internals to properly test certain cases
-which are not possible via the public interface since they should never happen.
-*/
-
-package spew
-
-import (
- "bytes"
- "reflect"
- "testing"
-)
-
-// dummyFmtState implements a fake fmt.State to use for testing invalid
-// reflect.Value handling. This is necessary because the fmt package catches
-// invalid values before invoking the formatter on them.
-type dummyFmtState struct {
- bytes.Buffer
-}
-
-func (dfs *dummyFmtState) Flag(f int) bool {
- return f == int('+')
-}
-
-func (dfs *dummyFmtState) Precision() (int, bool) {
- return 0, false
-}
-
-func (dfs *dummyFmtState) Width() (int, bool) {
- return 0, false
-}
-
-// TestInvalidReflectValue ensures the dump and formatter code handles an
-// invalid reflect value properly. This needs access to internal state since it
-// should never happen in real code and therefore can't be tested via the public
-// API.
-func TestInvalidReflectValue(t *testing.T) {
- i := 1
-
- // Dump invalid reflect value.
- v := new(reflect.Value)
- buf := new(bytes.Buffer)
- d := dumpState{w: buf, cs: &Config}
- d.dump(*v)
- s := buf.String()
- want := "<invalid>"
- if s != want {
- t.Errorf("InvalidReflectValue #%d\n got: %s want: %s", i, s, want)
- }
- i++
-
- // Formatter invalid reflect value.
- buf2 := new(dummyFmtState)
- f := formatState{value: *v, cs: &Config, fs: buf2}
- f.format(*v)
- s = buf2.String()
- want = "<invalid>"
- if s != want {
- t.Errorf("InvalidReflectValue #%d got: %s want: %s", i, s, want)
- }
-}
-
-// SortValues makes the internal sortValues function available to the test
-// package.
-func SortValues(values []reflect.Value, cs *ConfigState) {
- sortValues(values, cs)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go
deleted file mode 100644
index 80dc22177..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
-
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine, compiled by GopherJS, and
-// "-tags safe" is not added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build !js,!appengine,!safe,!disableunsafe,go1.4
-
-/*
-This test file is part of the spew package rather than than the spew_test
-package because it needs access to internals to properly test certain cases
-which are not possible via the public interface since they should never happen.
-*/
-
-package spew
-
-import (
- "bytes"
- "reflect"
- "testing"
-)
-
-// changeKind uses unsafe to intentionally change the kind of a reflect.Value to
-// the maximum kind value which does not exist. This is needed to test the
-// fallback code which punts to the standard fmt library for new types that
-// might get added to the language.
-func changeKind(v *reflect.Value, readOnly bool) {
- flags := flagField(v)
- if readOnly {
- *flags |= flagRO
- } else {
- *flags &^= flagRO
- }
- *flags |= flagKindMask
-}
-
-// TestAddedReflectValue tests functionaly of the dump and formatter code which
-// falls back to the standard fmt library for new types that might get added to
-// the language.
-func TestAddedReflectValue(t *testing.T) {
- i := 1
-
- // Dump using a reflect.Value that is exported.
- v := reflect.ValueOf(int8(5))
- changeKind(&v, false)
- buf := new(bytes.Buffer)
- d := dumpState{w: buf, cs: &Config}
- d.dump(v)
- s := buf.String()
- want := "(int8) 5"
- if s != want {
- t.Errorf("TestAddedReflectValue #%d\n got: %s want: %s", i, s, want)
- }
- i++
-
- // Dump using a reflect.Value that is not exported.
- changeKind(&v, true)
- buf.Reset()
- d.dump(v)
- s = buf.String()
- want = "(int8) <int8 Value>"
- if s != want {
- t.Errorf("TestAddedReflectValue #%d\n got: %s want: %s", i, s, want)
- }
- i++
-
- // Formatter using a reflect.Value that is exported.
- changeKind(&v, false)
- buf2 := new(dummyFmtState)
- f := formatState{value: v, cs: &Config, fs: buf2}
- f.format(v)
- s = buf2.String()
- want = "5"
- if s != want {
- t.Errorf("TestAddedReflectValue #%d got: %s want: %s", i, s, want)
- }
- i++
-
- // Formatter using a reflect.Value that is not exported.
- changeKind(&v, true)
- buf2.Reset()
- f = formatState{value: v, cs: &Config, fs: buf2}
- f.format(v)
- s = buf2.String()
- want = "<int8 Value>"
- if s != want {
- t.Errorf("TestAddedReflectValue #%d got: %s want: %s", i, s, want)
- }
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew_test.go b/vendor/github.com/davecgh/go-spew/spew/spew_test.go
deleted file mode 100644
index b70466c69..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/spew_test.go
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew_test
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "os"
- "testing"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-// spewFunc is used to identify which public function of the spew package or
-// ConfigState a test applies to.
-type spewFunc int
-
-const (
- fCSFdump spewFunc = iota
- fCSFprint
- fCSFprintf
- fCSFprintln
- fCSPrint
- fCSPrintln
- fCSSdump
- fCSSprint
- fCSSprintf
- fCSSprintln
- fCSErrorf
- fCSNewFormatter
- fErrorf
- fFprint
- fFprintln
- fPrint
- fPrintln
- fSdump
- fSprint
- fSprintf
- fSprintln
-)
-
-// Map of spewFunc values to names for pretty printing.
-var spewFuncStrings = map[spewFunc]string{
- fCSFdump: "ConfigState.Fdump",
- fCSFprint: "ConfigState.Fprint",
- fCSFprintf: "ConfigState.Fprintf",
- fCSFprintln: "ConfigState.Fprintln",
- fCSSdump: "ConfigState.Sdump",
- fCSPrint: "ConfigState.Print",
- fCSPrintln: "ConfigState.Println",
- fCSSprint: "ConfigState.Sprint",
- fCSSprintf: "ConfigState.Sprintf",
- fCSSprintln: "ConfigState.Sprintln",
- fCSErrorf: "ConfigState.Errorf",
- fCSNewFormatter: "ConfigState.NewFormatter",
- fErrorf: "spew.Errorf",
- fFprint: "spew.Fprint",
- fFprintln: "spew.Fprintln",
- fPrint: "spew.Print",
- fPrintln: "spew.Println",
- fSdump: "spew.Sdump",
- fSprint: "spew.Sprint",
- fSprintf: "spew.Sprintf",
- fSprintln: "spew.Sprintln",
-}
-
-func (f spewFunc) String() string {
- if s, ok := spewFuncStrings[f]; ok {
- return s
- }
- return fmt.Sprintf("Unknown spewFunc (%d)", int(f))
-}
-
-// spewTest is used to describe a test to be performed against the public
-// functions of the spew package or ConfigState.
-type spewTest struct {
- cs *spew.ConfigState
- f spewFunc
- format string
- in interface{}
- want string
-}
-
-// spewTests houses the tests to be performed against the public functions of
-// the spew package and ConfigState.
-//
-// These tests are only intended to ensure the public functions are exercised
-// and are intentionally not exhaustive of types. The exhaustive type
-// tests are handled in the dump and format tests.
-var spewTests []spewTest
-
-// redirStdout is a helper function to return the standard output from f as a
-// byte slice.
-func redirStdout(f func()) ([]byte, error) {
- tempFile, err := ioutil.TempFile("", "ss-test")
- if err != nil {
- return nil, err
- }
- fileName := tempFile.Name()
- defer os.Remove(fileName) // Ignore error
-
- origStdout := os.Stdout
- os.Stdout = tempFile
- f()
- os.Stdout = origStdout
- tempFile.Close()
-
- return ioutil.ReadFile(fileName)
-}
-
-func initSpewTests() {
- // Config states with various settings.
- scsDefault := spew.NewDefaultConfig()
- scsNoMethods := &spew.ConfigState{Indent: " ", DisableMethods: true}
- scsNoPmethods := &spew.ConfigState{Indent: " ", DisablePointerMethods: true}
- scsMaxDepth := &spew.ConfigState{Indent: " ", MaxDepth: 1}
- scsContinue := &spew.ConfigState{Indent: " ", ContinueOnMethod: true}
- scsNoPtrAddr := &spew.ConfigState{DisablePointerAddresses: true}
- scsNoCap := &spew.ConfigState{DisableCapacities: true}
-
- // Variables for tests on types which implement Stringer interface with and
- // without a pointer receiver.
- ts := stringer("test")
- tps := pstringer("test")
-
- type ptrTester struct {
- s *struct{}
- }
- tptr := &ptrTester{s: &struct{}{}}
-
- // depthTester is used to test max depth handling for structs, array, slices
- // and maps.
- type depthTester struct {
- ic indirCir1
- arr [1]string
- slice []string
- m map[string]int
- }
- dt := depthTester{indirCir1{nil}, [1]string{"arr"}, []string{"slice"},
- map[string]int{"one": 1}}
-
- // Variable for tests on types which implement error interface.
- te := customError(10)
-
- spewTests = []spewTest{
- {scsDefault, fCSFdump, "", int8(127), "(int8) 127\n"},
- {scsDefault, fCSFprint, "", int16(32767), "32767"},
- {scsDefault, fCSFprintf, "%v", int32(2147483647), "2147483647"},
- {scsDefault, fCSFprintln, "", int(2147483647), "2147483647\n"},
- {scsDefault, fCSPrint, "", int64(9223372036854775807), "9223372036854775807"},
- {scsDefault, fCSPrintln, "", uint8(255), "255\n"},
- {scsDefault, fCSSdump, "", uint8(64), "(uint8) 64\n"},
- {scsDefault, fCSSprint, "", complex(1, 2), "(1+2i)"},
- {scsDefault, fCSSprintf, "%v", complex(float32(3), 4), "(3+4i)"},
- {scsDefault, fCSSprintln, "", complex(float64(5), 6), "(5+6i)\n"},
- {scsDefault, fCSErrorf, "%#v", uint16(65535), "(uint16)65535"},
- {scsDefault, fCSNewFormatter, "%v", uint32(4294967295), "4294967295"},
- {scsDefault, fErrorf, "%v", uint64(18446744073709551615), "18446744073709551615"},
- {scsDefault, fFprint, "", float32(3.14), "3.14"},
- {scsDefault, fFprintln, "", float64(6.28), "6.28\n"},
- {scsDefault, fPrint, "", true, "true"},
- {scsDefault, fPrintln, "", false, "false\n"},
- {scsDefault, fSdump, "", complex(-10, -20), "(complex128) (-10-20i)\n"},
- {scsDefault, fSprint, "", complex(-1, -2), "(-1-2i)"},
- {scsDefault, fSprintf, "%v", complex(float32(-3), -4), "(-3-4i)"},
- {scsDefault, fSprintln, "", complex(float64(-5), -6), "(-5-6i)\n"},
- {scsNoMethods, fCSFprint, "", ts, "test"},
- {scsNoMethods, fCSFprint, "", &ts, "<*>test"},
- {scsNoMethods, fCSFprint, "", tps, "test"},
- {scsNoMethods, fCSFprint, "", &tps, "<*>test"},
- {scsNoPmethods, fCSFprint, "", ts, "stringer test"},
- {scsNoPmethods, fCSFprint, "", &ts, "<*>stringer test"},
- {scsNoPmethods, fCSFprint, "", tps, "test"},
- {scsNoPmethods, fCSFprint, "", &tps, "<*>stringer test"},
- {scsMaxDepth, fCSFprint, "", dt, "{{<max>} [<max>] [<max>] map[<max>]}"},
- {scsMaxDepth, fCSFdump, "", dt, "(spew_test.depthTester) {\n" +
- " ic: (spew_test.indirCir1) {\n <max depth reached>\n },\n" +
- " arr: ([1]string) (len=1 cap=1) {\n <max depth reached>\n },\n" +
- " slice: ([]string) (len=1 cap=1) {\n <max depth reached>\n },\n" +
- " m: (map[string]int) (len=1) {\n <max depth reached>\n }\n}\n"},
- {scsContinue, fCSFprint, "", ts, "(stringer test) test"},
- {scsContinue, fCSFdump, "", ts, "(spew_test.stringer) " +
- "(len=4) (stringer test) \"test\"\n"},
- {scsContinue, fCSFprint, "", te, "(error: 10) 10"},
- {scsContinue, fCSFdump, "", te, "(spew_test.customError) " +
- "(error: 10) 10\n"},
- {scsNoPtrAddr, fCSFprint, "", tptr, "<*>{<*>{}}"},
- {scsNoPtrAddr, fCSSdump, "", tptr, "(*spew_test.ptrTester)({\ns: (*struct {})({\n})\n})\n"},
- {scsNoCap, fCSSdump, "", make([]string, 0, 10), "([]string) {\n}\n"},
- {scsNoCap, fCSSdump, "", make([]string, 1, 10), "([]string) (len=1) {\n(string) \"\"\n}\n"},
- }
-}
-
-// TestSpew executes all of the tests described by spewTests.
-func TestSpew(t *testing.T) {
- initSpewTests()
-
- t.Logf("Running %d tests", len(spewTests))
- for i, test := range spewTests {
- buf := new(bytes.Buffer)
- switch test.f {
- case fCSFdump:
- test.cs.Fdump(buf, test.in)
-
- case fCSFprint:
- test.cs.Fprint(buf, test.in)
-
- case fCSFprintf:
- test.cs.Fprintf(buf, test.format, test.in)
-
- case fCSFprintln:
- test.cs.Fprintln(buf, test.in)
-
- case fCSPrint:
- b, err := redirStdout(func() { test.cs.Print(test.in) })
- if err != nil {
- t.Errorf("%v #%d %v", test.f, i, err)
- continue
- }
- buf.Write(b)
-
- case fCSPrintln:
- b, err := redirStdout(func() { test.cs.Println(test.in) })
- if err != nil {
- t.Errorf("%v #%d %v", test.f, i, err)
- continue
- }
- buf.Write(b)
-
- case fCSSdump:
- str := test.cs.Sdump(test.in)
- buf.WriteString(str)
-
- case fCSSprint:
- str := test.cs.Sprint(test.in)
- buf.WriteString(str)
-
- case fCSSprintf:
- str := test.cs.Sprintf(test.format, test.in)
- buf.WriteString(str)
-
- case fCSSprintln:
- str := test.cs.Sprintln(test.in)
- buf.WriteString(str)
-
- case fCSErrorf:
- err := test.cs.Errorf(test.format, test.in)
- buf.WriteString(err.Error())
-
- case fCSNewFormatter:
- fmt.Fprintf(buf, test.format, test.cs.NewFormatter(test.in))
-
- case fErrorf:
- err := spew.Errorf(test.format, test.in)
- buf.WriteString(err.Error())
-
- case fFprint:
- spew.Fprint(buf, test.in)
-
- case fFprintln:
- spew.Fprintln(buf, test.in)
-
- case fPrint:
- b, err := redirStdout(func() { spew.Print(test.in) })
- if err != nil {
- t.Errorf("%v #%d %v", test.f, i, err)
- continue
- }
- buf.Write(b)
-
- case fPrintln:
- b, err := redirStdout(func() { spew.Println(test.in) })
- if err != nil {
- t.Errorf("%v #%d %v", test.f, i, err)
- continue
- }
- buf.Write(b)
-
- case fSdump:
- str := spew.Sdump(test.in)
- buf.WriteString(str)
-
- case fSprint:
- str := spew.Sprint(test.in)
- buf.WriteString(str)
-
- case fSprintf:
- str := spew.Sprintf(test.format, test.in)
- buf.WriteString(str)
-
- case fSprintln:
- str := spew.Sprintln(test.in)
- buf.WriteString(str)
-
- default:
- t.Errorf("%v #%d unrecognized function", test.f, i)
- continue
- }
- s := buf.String()
- if test.want != s {
- t.Errorf("ConfigState #%d\n got: %s want: %s", i, s, test.want)
- continue
- }
- }
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go b/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go
deleted file mode 100644
index 5c87dd456..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2013 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when both cgo is supported and "-tags testcgo" is added to the go test
-// command line. This code should really only be in the dumpcgo_test.go file,
-// but unfortunately Go will not allow cgo in test files, so this is a
-// workaround to allow cgo types to be tested. This configuration is used
-// because spew itself does not require cgo to run even though it does handle
-// certain cgo types specially. Rather than forcing all clients to require cgo
-// and an external C compiler just to run the tests, this scheme makes them
-// optional.
-// +build cgo,testcgo
-
-package testdata
-
-/*
-#include <stdint.h>
-typedef unsigned char custom_uchar_t;
-
-char *ncp = 0;
-char *cp = "test";
-char ca[6] = {'t', 'e', 's', 't', '2', '\0'};
-unsigned char uca[6] = {'t', 'e', 's', 't', '3', '\0'};
-signed char sca[6] = {'t', 'e', 's', 't', '4', '\0'};
-uint8_t ui8ta[6] = {'t', 'e', 's', 't', '5', '\0'};
-custom_uchar_t tuca[6] = {'t', 'e', 's', 't', '6', '\0'};
-*/
-import "C"
-
-// GetCgoNullCharPointer returns a null char pointer via cgo. This is only
-// used for tests.
-func GetCgoNullCharPointer() interface{} {
- return C.ncp
-}
-
-// GetCgoCharPointer returns a char pointer via cgo. This is only used for
-// tests.
-func GetCgoCharPointer() interface{} {
- return C.cp
-}
-
-// GetCgoCharArray returns a char array via cgo and the array's len and cap.
-// This is only used for tests.
-func GetCgoCharArray() (interface{}, int, int) {
- return C.ca, len(C.ca), cap(C.ca)
-}
-
-// GetCgoUnsignedCharArray returns an unsigned char array via cgo and the
-// array's len and cap. This is only used for tests.
-func GetCgoUnsignedCharArray() (interface{}, int, int) {
- return C.uca, len(C.uca), cap(C.uca)
-}
-
-// GetCgoSignedCharArray returns a signed char array via cgo and the array's len
-// and cap. This is only used for tests.
-func GetCgoSignedCharArray() (interface{}, int, int) {
- return C.sca, len(C.sca), cap(C.sca)
-}
-
-// GetCgoUint8tArray returns a uint8_t array via cgo and the array's len and
-// cap. This is only used for tests.
-func GetCgoUint8tArray() (interface{}, int, int) {
- return C.ui8ta, len(C.ui8ta), cap(C.ui8ta)
-}
-
-// GetCgoTypdefedUnsignedCharArray returns a typedefed unsigned char array via
-// cgo and the array's len and cap. This is only used for tests.
-func GetCgoTypdefedUnsignedCharArray() (interface{}, int, int) {
- return C.tuca, len(C.tuca), cap(C.tuca)
-}
diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt
deleted file mode 100644
index 2cd087a2a..000000000
--- a/vendor/github.com/davecgh/go-spew/test_coverage.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-
-github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88)
-github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82)
-github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52)
-github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44)
-github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39)
-github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30)
-github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18)
-github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13)
-github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12)
-github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11)
-github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11)
-github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10)
-github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9)
-github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8)
-github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7)
-github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5)
-github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4)
-github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4)
-github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4)
-github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4)
-github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3)
-github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3)
-github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3)
-github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3)
-github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3)
-github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1)
-github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1)
-github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1)
-github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1)
-github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1)
-github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1)
-github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1)
-github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1)
-github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1)
-github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1)
-github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1)
-github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505)
-
diff --git a/vendor/github.com/dgryski/dgoogauth/googauth_test.go b/vendor/github.com/dgryski/dgoogauth/googauth_test.go
deleted file mode 100644
index 43f35d2c9..000000000
--- a/vendor/github.com/dgryski/dgoogauth/googauth_test.go
+++ /dev/null
@@ -1,251 +0,0 @@
-package dgoogauth
-
-import (
- "fmt"
- "testing"
- "time"
-)
-
-// Test vectors via:
-// http://code.google.com/p/google-authenticator/source/browse/libpam/pam_google_authenticator_unittest.c
-// https://google-authenticator.googlecode.com/hg/libpam/totp.html
-
-var codeTests = []struct {
- secret string
- value int64
- code int
-}{
- {"2SH3V3GDW7ZNMGYE", 1, 293240},
- {"2SH3V3GDW7ZNMGYE", 5, 932068},
- {"2SH3V3GDW7ZNMGYE", 10000, 50548},
-}
-
-func TestCode(t *testing.T) {
-
- for _, v := range codeTests {
- c := ComputeCode(v.secret, v.value)
-
- if c != v.code {
- t.Errorf("computeCode(%s, %d): got %d expected %d\n", v.secret, v.value, c, v.code)
- }
-
- }
-}
-
-func TestScratchCode(t *testing.T) {
-
- var cotp OTPConfig
-
- cotp.ScratchCodes = []int{11112222, 22223333}
-
- var scratchTests = []struct {
- code int
- result bool
- }{
- {33334444, false},
- {11112222, true},
- {11112222, false},
- {22223333, true},
- {22223333, false},
- {33334444, false},
- }
-
- for _, s := range scratchTests {
- r := cotp.checkScratchCodes(s.code)
- if r != s.result {
- t.Errorf("scratchcode(%d) failed: got %t expected %t", s.code, r, s.result)
- }
- }
-}
-
-func TestHotpCode(t *testing.T) {
-
- var cotp OTPConfig
-
- // reuse our test values from above
- // perhaps create more?
- cotp.Secret = "2SH3V3GDW7ZNMGYE"
- cotp.HotpCounter = 1
- cotp.WindowSize = 3
-
- var counterCodes = []struct {
- code int
- result bool
- counter int
- }{
- { /* 1 */ 293240, true, 2}, // increments on success
- { /* 1 */ 293240, false, 3}, // and failure
- { /* 5 */ 932068, true, 6}, // inside of window
- { /* 10 */ 481725, false, 7}, // outside of window
- { /* 10 */ 481725, false, 8}, // outside of window
- { /* 10 */ 481725, true, 11}, // now inside of window
- }
-
- for i, s := range counterCodes {
- r := cotp.checkHotpCode(s.code)
- if r != s.result {
- t.Errorf("counterCode(%d) (step %d) failed: got %t expected %t", s.code, i, r, s.result)
- }
- if cotp.HotpCounter != s.counter {
- t.Errorf("hotpCounter incremented poorly: got %d expected %d", cotp.HotpCounter, s.counter)
- }
- }
-}
-
-func TestTotpCode(t *testing.T) {
-
- var cotp OTPConfig
-
- // reuse our test values from above
- cotp.Secret = "2SH3V3GDW7ZNMGYE"
- cotp.WindowSize = 5
-
- var windowTest = []struct {
- code int
- t0 int
- result bool
- }{
- {50548, 9997, false},
- {50548, 9998, true},
- {50548, 9999, true},
- {50548, 10000, true},
- {50548, 10001, true},
- {50548, 10002, true},
- {50548, 10003, false},
- }
-
- for i, s := range windowTest {
- r := cotp.checkTotpCode(s.t0, s.code)
- if r != s.result {
- t.Errorf("counterCode(%d) (step %d) failed: got %t expected %t", s.code, i, r, s.result)
- }
- }
-
- cotp.DisallowReuse = make([]int, 0)
- var noreuseTest = []struct {
- code int
- t0 int
- result bool
- disallowed []int
- }{
- {50548 /* 10000 */, 9997, false, []int{}},
- {50548 /* 10000 */, 9998, true, []int{10000}},
- {50548 /* 10000 */, 9999, false, []int{10000}},
- {478726 /* 10001 */, 10001, true, []int{10000, 10001}},
- {646986 /* 10002 */, 10002, true, []int{10000, 10001, 10002}},
- {842639 /* 10003 */, 10003, true, []int{10001, 10002, 10003}},
- }
-
- for i, s := range noreuseTest {
- r := cotp.checkTotpCode(s.t0, s.code)
- if r != s.result {
- t.Errorf("timeCode(%d) (step %d) failed: got %t expected %t", s.code, i, r, s.result)
- }
- if len(cotp.DisallowReuse) != len(s.disallowed) {
- t.Errorf("timeCode(%d) (step %d) failed: disallowReuse len mismatch: got %d expected %d", s.code, i, len(cotp.DisallowReuse), len(s.disallowed))
- } else {
- same := true
- for j := range s.disallowed {
- if s.disallowed[j] != cotp.DisallowReuse[j] {
- same = false
- }
- }
- if !same {
- t.Errorf("timeCode(%d) (step %d) failed: disallowReused: got %v expected %v", s.code, i, cotp.DisallowReuse, s.disallowed)
- }
- }
- }
-}
-
-func TestAuthenticate(t *testing.T) {
-
- otpconf := &OTPConfig{
- Secret: "2SH3V3GDW7ZNMGYE",
- WindowSize: 3,
- HotpCounter: 1,
- ScratchCodes: []int{11112222, 22223333},
- }
-
- type attempt struct {
- code string
- result bool
- }
-
- var attempts = []attempt{
- {"foobar", false}, // not digits
- {"1fooba", false}, // not valid number
- {"1111111", false}, // bad length
- { /* 1 */ "293240", true}, // hopt increments on success
- { /* 1 */ "293240", false}, // hopt failure
- {"33334444", false}, // scratch
- {"11112222", true},
- {"11112222", false},
- }
-
- for _, a := range attempts {
- r, _ := otpconf.Authenticate(a.code)
- if r != a.result {
- t.Errorf("bad result from code=%s: got %t expected %t\n", a.code, r, a.result)
- }
- }
-
- // let's check some time-based codes
- otpconf.HotpCounter = 0
- // I haven't mocked the clock, so we'll just compute one
- var t0 int64
- if otpconf.UTC {
- t0 = int64(time.Now().UTC().Unix() / 30)
- } else {
- t0 = int64(time.Now().Unix() / 30)
- }
- c := ComputeCode(otpconf.Secret, t0)
- code := fmt.Sprintf("%06d", c)
-
- attempts = []attempt{
- {code + "1", false},
- {code, true},
- }
-
- for _, a := range attempts {
- r, _ := otpconf.Authenticate(a.code)
- if r != a.result {
- t.Errorf("bad result from code=%s: got %t expected %t\n", a.code, r, a.result)
- }
-
- otpconf.UTC = true
- r, _ = otpconf.Authenticate(a.code)
- if r != a.result {
- t.Errorf("bad result from code=%s: got %t expected %t\n", a.code, r, a.result)
- }
- otpconf.UTC = false
- }
-
-}
-
-func TestProvisionURI(t *testing.T) {
- otpconf := OTPConfig{
- Secret: "x",
- }
-
- cases := []struct {
- user, iss string
- hotp bool
- out string
- }{
- {"test", "", false, "otpauth://totp/test?secret=x"},
- {"test", "", true, "otpauth://hotp/test?counter=1&secret=x"},
- {"test", "Company", true, "otpauth://hotp/Company:test?counter=1&issuer=Company&secret=x"},
- {"test", "Company", false, "otpauth://totp/Company:test?issuer=Company&secret=x"},
- }
-
- for i, c := range cases {
- otpconf.HotpCounter = 0
- if c.hotp {
- otpconf.HotpCounter = 1
- }
- got := otpconf.ProvisionURIWithIssuer(c.user, c.iss)
- if got != c.out {
- t.Errorf("%d: want %q, got %q", i, c.out, got)
- }
- }
-}
diff --git a/vendor/github.com/dimchansky/utfbom/utfbom_test.go b/vendor/github.com/dimchansky/utfbom/utfbom_test.go
deleted file mode 100644
index 30794c80a..000000000
--- a/vendor/github.com/dimchansky/utfbom/utfbom_test.go
+++ /dev/null
@@ -1,233 +0,0 @@
-package utfbom
-
-import (
- "io"
- "io/ioutil"
- "reflect"
- "testing"
- "testing/iotest"
- "time"
-)
-
-var testCases = []struct {
- name string
- input []byte
- inputError error
- encoding Encoding
- output []byte
-}{
- {"1", []byte{}, nil, Unknown, []byte{}},
- {"2", []byte("hello"), nil, Unknown, []byte("hello")},
- {"3", []byte("\xEF\xBB\xBF"), nil, UTF8, []byte{}},
- {"4", []byte("\xEF\xBB\xBFhello"), nil, UTF8, []byte("hello")},
- {"5", []byte("\xFE\xFF"), nil, UTF16BigEndian, []byte{}},
- {"6", []byte("\xFF\xFE"), nil, UTF16LittleEndian, []byte{}},
- {"7", []byte("\x00\x00\xFE\xFF"), nil, UTF32BigEndian, []byte{}},
- {"8", []byte("\xFF\xFE\x00\x00"), nil, UTF32LittleEndian, []byte{}},
- {"5", []byte("\xFE\xFF\x00\x68\x00\x65\x00\x6C\x00\x6C\x00\x6F"), nil,
- UTF16BigEndian, []byte{0x00, 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F}},
- {"6", []byte("\xFF\xFE\x68\x00\x65\x00\x6C\x00\x6C\x00\x6F\x00"), nil,
- UTF16LittleEndian, []byte{0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00}},
- {"7", []byte("\x00\x00\xFE\xFF\x00\x00\x00\x68\x00\x00\x00\x65\x00\x00\x00\x6C\x00\x00\x00\x6C\x00\x00\x00\x6F"), nil,
- UTF32BigEndian,
- []byte{0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x6F}},
- {"8", []byte("\xFF\xFE\x00\x00\x68\x00\x00\x00\x65\x00\x00\x00\x6C\x00\x00\x00\x6C\x00\x00\x00\x6F\x00\x00\x00"), nil,
- UTF32LittleEndian,
- []byte{0x68, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00}},
- {"9", []byte("\xEF"), nil, Unknown, []byte("\xEF")},
- {"10", []byte("\xEF\xBB"), nil, Unknown, []byte("\xEF\xBB")},
- {"11", []byte("\xEF\xBB\xBF"), io.ErrClosedPipe, UTF8, []byte{}},
- {"12", []byte("\xFE\xFF"), io.ErrClosedPipe, Unknown, []byte("\xFE\xFF")},
- {"13", []byte("\xFE"), io.ErrClosedPipe, Unknown, []byte("\xFE")},
- {"14", []byte("\xFF\xFE"), io.ErrClosedPipe, Unknown, []byte("\xFF\xFE")},
- {"15", []byte("\x00\x00\xFE\xFF"), io.ErrClosedPipe, UTF32BigEndian, []byte{}},
- {"16", []byte("\x00\x00\xFE"), io.ErrClosedPipe, Unknown, []byte{0x00, 0x00, 0xFE}},
- {"17", []byte("\x00\x00"), io.ErrClosedPipe, Unknown, []byte{0x00, 0x00}},
- {"18", []byte("\x00"), io.ErrClosedPipe, Unknown, []byte{0x00}},
- {"19", []byte("\xFF\xFE\x00\x00"), io.ErrClosedPipe, UTF32LittleEndian, []byte{}},
- {"20", []byte("\xFF\xFE\x00"), io.ErrClosedPipe, Unknown, []byte{0xFF, 0xFE, 0x00}},
- {"21", []byte("\xFF\xFE"), io.ErrClosedPipe, Unknown, []byte{0xFF, 0xFE}},
- {"22", []byte("\xFF"), io.ErrClosedPipe, Unknown, []byte{0xFF}},
- {"23", []byte("\x68\x65"), nil, Unknown, []byte{0x68, 0x65}},
-}
-
-type sliceReader struct {
- input []byte
- inputError error
-}
-
-func (r *sliceReader) Read(p []byte) (n int, err error) {
- if len(p) == 0 {
- return
- }
-
- if err = r.getError(); err != nil {
- return
- }
-
- n = copy(p, r.input)
- r.input = r.input[n:]
- err = r.getError()
- return
-}
-
-func (r *sliceReader) getError() (err error) {
- if len(r.input) == 0 {
- if r.inputError == nil {
- err = io.EOF
- } else {
- err = r.inputError
- }
- }
- return
-}
-
-var readMakers = []struct {
- name string
- fn func(io.Reader) io.Reader
-}{
- {"full", func(r io.Reader) io.Reader { return r }},
- {"byte", iotest.OneByteReader},
-}
-
-func TestSkip(t *testing.T) {
- for _, tc := range testCases {
- for _, readMaker := range readMakers {
- r := readMaker.fn(&sliceReader{tc.input, tc.inputError})
-
- sr, enc := Skip(r)
- if enc != tc.encoding {
- t.Fatalf("test %v reader=%s: expected encoding %v, but got %v", tc.name, readMaker.name, tc.encoding, enc)
- }
-
- output, err := ioutil.ReadAll(sr)
- if !reflect.DeepEqual(output, tc.output) {
- t.Fatalf("test %v reader=%s: expected to read %+#v, but got %+#v", tc.name, readMaker.name, tc.output, output)
- }
- if err != tc.inputError {
- t.Fatalf("test %v reader=%s: expected to get %+#v error, but got %+#v", tc.name, readMaker.name, tc.inputError, err)
- }
- }
- }
-}
-
-func TestSkipSkip(t *testing.T) {
- for _, tc := range testCases {
- for _, readMaker := range readMakers {
- r := readMaker.fn(&sliceReader{tc.input, tc.inputError})
-
- sr0, _ := Skip(r)
- sr, enc := Skip(sr0)
- if enc != Unknown {
- t.Fatalf("test %v reader=%s: expected encoding %v, but got %v", tc.name, readMaker.name, Unknown, enc)
- }
-
- output, err := ioutil.ReadAll(sr)
- if !reflect.DeepEqual(output, tc.output) {
- t.Fatalf("test %v reader=%s: expected to read %+#v, but got %+#v", tc.name, readMaker.name, tc.output, output)
- }
- if err != tc.inputError {
- t.Fatalf("test %v reader=%s: expected to get %+#v error, but got %+#v", tc.name, readMaker.name, tc.inputError, err)
- }
- }
- }
-}
-
-func TestSkipOnly(t *testing.T) {
- for _, tc := range testCases {
- for _, readMaker := range readMakers {
- r := readMaker.fn(&sliceReader{tc.input, tc.inputError})
-
- sr := SkipOnly(r)
-
- output, err := ioutil.ReadAll(sr)
- if !reflect.DeepEqual(output, tc.output) {
- t.Fatalf("test %v reader=%s: expected to read %+#v, but got %+#v", tc.name, readMaker.name, tc.output, output)
- }
- if err != tc.inputError {
- t.Fatalf("test %v reader=%s: expected to get %+#v error, but got %+#v", tc.name, readMaker.name, tc.inputError, err)
- }
- }
- }
-}
-
-type zeroReader struct{}
-
-func (zeroReader) Read(p []byte) (int, error) {
- return 0, nil
-}
-
-type readerEncoding struct {
- Rd *Reader
- Enc Encoding
-}
-
-func TestSkipZeroReader(t *testing.T) {
- var z zeroReader
-
- c := make(chan readerEncoding)
- go func() {
- r, enc := Skip(z)
- c <- readerEncoding{r, enc}
- }()
-
- select {
- case re := <-c:
- if re.Enc != Unknown {
- t.Error("Unknown encoding expected")
- } else {
- var b [1]byte
- n, err := re.Rd.Read(b[:])
- if n != 0 {
- t.Error("unexpected bytes count:", n)
- }
- if err != io.ErrNoProgress {
- t.Error("unexpected error:", err)
- }
- }
- case <-time.After(time.Second):
- t.Error("test timed out (endless loop in Skip?)")
- }
-}
-
-func TestSkipOnlyZeroReader(t *testing.T) {
- var z zeroReader
-
- c := make(chan *Reader)
- go func() {
- r := SkipOnly(z)
- c <- r
- }()
-
- select {
- case r := <-c:
- var b [1]byte
- n, err := r.Read(b[:])
- if n != 0 {
- t.Error("unexpected bytes count:", n)
- }
- if err != io.ErrNoProgress {
- t.Error("unexpected error:", err)
- }
- case <-time.After(time.Second):
- t.Error("test timed out (endless loop in Skip?)")
- }
-}
-
-func TestReader_ReadEmpty(t *testing.T) {
- for _, tc := range testCases {
- for _, readMaker := range readMakers {
- r := readMaker.fn(&sliceReader{tc.input, tc.inputError})
-
- sr := SkipOnly(r)
-
- n, err := sr.Read(nil)
- if n != 0 {
- t.Fatalf("test %v reader=%s: expected to read zero bytes, but got %v", tc.name, readMaker.name, n)
- }
- if err != nil {
- t.Fatalf("test %v reader=%s: expected to get <nil> error, but got %+#v", tc.name, readMaker.name, err)
- }
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/.travis.yml b/vendor/github.com/disintegration/imaging/.travis.yml
index 4886abd74..89370edcb 100644
--- a/vendor/github.com/disintegration/imaging/.travis.yml
+++ b/vendor/github.com/disintegration/imaging/.travis.yml
@@ -1,17 +1,13 @@
language: go
-
-sudo: false
-
go:
- - 1.2
- - 1.7
- - 1.8
- - 1.9
+ - "1.7.x"
+ - "1.8.x"
+ - "1.9.x"
+ - "1.10.x"
before_install:
- - go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
script:
- - go test -v -covermode=count -coverprofile=coverage.out
- - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.out
+ - go test -v -race -cover
+ - $GOPATH/bin/goveralls -service=travis-ci
diff --git a/vendor/github.com/disintegration/imaging/LICENSE b/vendor/github.com/disintegration/imaging/LICENSE
index 72a26f0e8..c68f7ab7c 100644
--- a/vendor/github.com/disintegration/imaging/LICENSE
+++ b/vendor/github.com/disintegration/imaging/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2012-2017 Grigory Dryapak
+Copyright (c) 2012-2018 Grigory Dryapak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/github.com/disintegration/imaging/README.md b/vendor/github.com/disintegration/imaging/README.md
index f957c3e79..c7ee30fc8 100644
--- a/vendor/github.com/disintegration/imaging/README.md
+++ b/vendor/github.com/disintegration/imaging/README.md
@@ -2,19 +2,16 @@
[![GoDoc](https://godoc.org/github.com/disintegration/imaging?status.svg)](https://godoc.org/github.com/disintegration/imaging)
[![Build Status](https://travis-ci.org/disintegration/imaging.svg?branch=master)](https://travis-ci.org/disintegration/imaging)
-[![Coverage Status](https://coveralls.io/repos/github/disintegration/imaging/badge.svg?branch=master)](https://coveralls.io/github/disintegration/imaging?branch=master)
+[![Coverage Status](https://coveralls.io/repos/github/disintegration/imaging/badge.svg?branch=master&service=github)](https://coveralls.io/github/disintegration/imaging?branch=master)
+[![Go Report Card](https://goreportcard.com/badge/github.com/disintegration/imaging)](https://goreportcard.com/report/github.com/disintegration/imaging)
-Package imaging provides basic image manipulation functions (resize, rotate, flip, crop, etc.).
-This package is based on the standard Go image package and works best along with it.
+Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.).
-Image manipulation functions provided by the package take any image type
-that implements `image.Image` interface as an input, and return a new image of
-`*image.NRGBA` type (32bit RGBA colors, not premultiplied by alpha).
+All the image processing functions provided by the package accept any image type that implements `image.Image` interface
+as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, not premultiplied by alpha).
## Installation
-Imaging requires Go version 1.2 or greater.
-
go get -u github.com/disintegration/imaging
## Documentation
@@ -46,19 +43,19 @@ Imaging supports image resizing using various resampling filters. The most notab
- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor.
- `Linear` - Bilinear filter, smooth and reasonably fast.
- `MitchellNetravali` - Ð smooth bicubic filter.
-- `CatmullRom` - A sharp bicubic filter.
+- `CatmullRom` - A sharp bicubic filter.
- `Gaussian` - Blurring filter that uses gaussian function, useful for noise removal.
-- `Lanczos` - High-quality resampling filter for photographic images yielding sharp results, but it's slower than cubic filters.
+- `Lanczos` - High-quality resampling filter for photographic images yielding sharp results, slower than cubic filters.
The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct.
**Resampling filters comparison**
-The original image.
+Original image:
-![srcImage](testdata/lena_512.png)
+![srcImage](testdata/branches.png)
-The same image resized from 512x512px to 128x128px using different resampling filters.
+The same image resized from 600x400px to 150x100px using different resampling filters.
From faster (lower quality) to slower (higher quality):
Filter | Resize result
@@ -79,7 +76,7 @@ Sigma parameter allows to control the strength of the blurring effect.
Original image | Sigma = 0.5 | Sigma = 1.5
-----------------------------------|----------------------------------------|---------------------------------------
-![srcImage](testdata/lena_128.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png)
+![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png)
### Sharpening
@@ -91,7 +88,7 @@ dstImage := imaging.Sharpen(srcImage, 0.5)
Original image | Sigma = 0.5 | Sigma = 1.5
-----------------------------------|-------------------------------------------|------------------------------------------
-![srcImage](testdata/lena_128.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png)
+![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png)
### Gamma correction
@@ -101,7 +98,7 @@ dstImage := imaging.AdjustGamma(srcImage, 0.75)
Original image | Gamma = 0.75 | Gamma = 1.25
-----------------------------------|------------------------------------------|-----------------------------------------
-![srcImage](testdata/lena_128.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png)
+![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png)
### Contrast adjustment
@@ -109,9 +106,9 @@ Original image | Gamma = 0.75 |
dstImage := imaging.AdjustContrast(srcImage, 20)
```
-Original image | Contrast = 10 | Contrast = -10
+Original image | Contrast = 15 | Contrast = -15
-----------------------------------|--------------------------------------------|-------------------------------------------
-![srcImage](testdata/lena_128.png) | ![dstImage](testdata/out_contrast_p10.png) | ![dstImage](testdata/out_contrast_m10.png)
+![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png)
### Brightness adjustment
@@ -121,7 +118,7 @@ dstImage := imaging.AdjustBrightness(srcImage, 20)
Original image | Brightness = 10 | Brightness = -10
-----------------------------------|----------------------------------------------|---------------------------------------------
-![srcImage](testdata/lena_128.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png)
+![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png)
## Example code
@@ -137,20 +134,20 @@ import (
)
func main() {
- // Open the test image.
- src, err := imaging.Open("testdata/lena_512.png")
+ // Open a test image.
+ src, err := imaging.Open("testdata/flowers.png")
if err != nil {
- log.Fatalf("Open failed: %v", err)
+ log.Fatalf("failed to open image: %v", err)
}
- // Crop the original image to 350x350px size using the center anchor.
- src = imaging.CropAnchor(src, 350, 350, imaging.Center)
+ // Crop the original image to 300x300px size using the center anchor.
+ src = imaging.CropAnchor(src, 300, 300, imaging.Center)
- // Resize the cropped image to width = 256px preserving the aspect ratio.
- src = imaging.Resize(src, 256, 0, imaging.Lanczos)
+ // Resize the cropped image to width = 200px preserving the aspect ratio.
+ src = imaging.Resize(src, 200, 0, imaging.Lanczos)
// Create a blurred version of the image.
- img1 := imaging.Blur(src, 2)
+ img1 := imaging.Blur(src, 5)
// Create a grayscale version of the image with higher contrast and sharpness.
img2 := imaging.Grayscale(src)
@@ -172,16 +169,16 @@ func main() {
)
// Create a new image and paste the four produced images into it.
- dst := imaging.New(512, 512, color.NRGBA{0, 0, 0, 0})
+ dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0})
dst = imaging.Paste(dst, img1, image.Pt(0, 0))
- dst = imaging.Paste(dst, img2, image.Pt(0, 256))
- dst = imaging.Paste(dst, img3, image.Pt(256, 0))
- dst = imaging.Paste(dst, img4, image.Pt(256, 256))
+ dst = imaging.Paste(dst, img2, image.Pt(0, 200))
+ dst = imaging.Paste(dst, img3, image.Pt(200, 0))
+ dst = imaging.Paste(dst, img4, image.Pt(200, 200))
- // Save the resulting image using JPEG format.
+ // Save the resulting image as JPEG.
err = imaging.Save(dst, "testdata/out_example.jpg")
if err != nil {
- log.Fatalf("Save failed: %v", err)
+ log.Fatalf("failed to save image: %v", err)
}
}
```
diff --git a/vendor/github.com/disintegration/imaging/adjust.go b/vendor/github.com/disintegration/imaging/adjust.go
index daee893cc..fb3a9ce3c 100644
--- a/vendor/github.com/disintegration/imaging/adjust.go
+++ b/vendor/github.com/disintegration/imaging/adjust.go
@@ -6,50 +6,95 @@ import (
"math"
)
-// AdjustFunc applies the fn function to each pixel of the img image and returns the adjusted image.
+// Grayscale produces a grayscale version of the image.
+func Grayscale(img image.Image) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
+ parallel(0, src.h, func(ys <-chan int) {
+ for y := range ys {
+ i := y * dst.Stride
+ src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
+ for x := 0; x < src.w; x++ {
+ r := dst.Pix[i+0]
+ g := dst.Pix[i+1]
+ b := dst.Pix[i+2]
+ f := 0.299*float64(r) + 0.587*float64(g) + 0.114*float64(b)
+ y := uint8(f + 0.5)
+ dst.Pix[i+0] = y
+ dst.Pix[i+1] = y
+ dst.Pix[i+2] = y
+ i += 4
+ }
+ }
+ })
+ return dst
+}
+
+// Invert produces an inverted (negated) version of the image.
+func Invert(img image.Image) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
+ parallel(0, src.h, func(ys <-chan int) {
+ for y := range ys {
+ i := y * dst.Stride
+ src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
+ for x := 0; x < src.w; x++ {
+ dst.Pix[i+0] = 255 - dst.Pix[i+0]
+ dst.Pix[i+1] = 255 - dst.Pix[i+1]
+ dst.Pix[i+2] = 255 - dst.Pix[i+2]
+ i += 4
+ }
+ }
+ })
+ return dst
+}
+
+// AdjustContrast changes the contrast of the image using the percentage parameter and returns the adjusted image.
+// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
+// The percentage = -100 gives solid gray image.
//
-// Example:
+// Examples:
//
-// dstImage = imaging.AdjustFunc(
-// srcImage,
-// func(c color.NRGBA) color.NRGBA {
-// // shift the red channel by 16
-// r := int(c.R) + 16
-// if r > 255 {
-// r = 255
-// }
-// return color.NRGBA{uint8(r), c.G, c.B, c.A}
-// }
-// )
+// dstImage = imaging.AdjustContrast(srcImage, -10) // decrease image contrast by 10%
+// dstImage = imaging.AdjustContrast(srcImage, 20) // increase image contrast by 20%
//
-func AdjustFunc(img image.Image, fn func(c color.NRGBA) color.NRGBA) *image.NRGBA {
- src := toNRGBA(img)
- width := src.Bounds().Max.X
- height := src.Bounds().Max.Y
- dst := image.NewNRGBA(image.Rect(0, 0, width, height))
-
- parallel(height, func(partStart, partEnd int) {
- for y := partStart; y < partEnd; y++ {
- for x := 0; x < width; x++ {
- i := y*src.Stride + x*4
- j := y*dst.Stride + x*4
-
- r := src.Pix[i+0]
- g := src.Pix[i+1]
- b := src.Pix[i+2]
- a := src.Pix[i+3]
-
- c := fn(color.NRGBA{r, g, b, a})
+func AdjustContrast(img image.Image, percentage float64) *image.NRGBA {
+ percentage = math.Min(math.Max(percentage, -100.0), 100.0)
+ lut := make([]uint8, 256)
- dst.Pix[j+0] = c.R
- dst.Pix[j+1] = c.G
- dst.Pix[j+2] = c.B
- dst.Pix[j+3] = c.A
- }
+ v := (100.0 + percentage) / 100.0
+ for i := 0; i < 256; i++ {
+ if 0 <= v && v <= 1 {
+ lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*v) * 255.0)
+ } else if 1 < v && v < 2 {
+ lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*(1/(2.0-v))) * 255.0)
+ } else {
+ lut[i] = uint8(float64(i)/255.0+0.5) * 255
}
- })
+ }
- return dst
+ return adjustLUT(img, lut)
+}
+
+// AdjustBrightness changes the brightness of the image using the percentage parameter and returns the adjusted image.
+// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
+// The percentage = -100 gives solid black image. The percentage = 100 gives solid white image.
+//
+// Examples:
+//
+// dstImage = imaging.AdjustBrightness(srcImage, -15) // decrease image brightness by 15%
+// dstImage = imaging.AdjustBrightness(srcImage, 10) // increase image brightness by 10%
+//
+func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA {
+ percentage = math.Min(math.Max(percentage, -100.0), 100.0)
+ lut := make([]uint8, 256)
+
+ shift := 255.0 * percentage / 100.0
+ for i := 0; i < 256; i++ {
+ lut[i] = clamp(float64(i) + shift)
+ }
+
+ return adjustLUT(img, lut)
}
// AdjustGamma performs a gamma correction on the image and returns the adjusted image.
@@ -68,15 +113,7 @@ func AdjustGamma(img image.Image, gamma float64) *image.NRGBA {
lut[i] = clamp(math.Pow(float64(i)/255.0, e) * 255.0)
}
- fn := func(c color.NRGBA) color.NRGBA {
- return color.NRGBA{lut[c.R], lut[c.G], lut[c.B], c.A}
- }
-
- return AdjustFunc(img, fn)
-}
-
-func sigmoid(a, b, x float64) float64 {
- return 1 / (1 + math.Exp(b*(a-x)))
+ return adjustLUT(img, lut)
}
// AdjustSigmoid changes the contrast of the image using a sigmoidal function and returns the adjusted image.
@@ -118,83 +155,68 @@ func AdjustSigmoid(img image.Image, midpoint, factor float64) *image.NRGBA {
}
}
- fn := func(c color.NRGBA) color.NRGBA {
- return color.NRGBA{lut[c.R], lut[c.G], lut[c.B], c.A}
- }
-
- return AdjustFunc(img, fn)
+ return adjustLUT(img, lut)
}
-// AdjustContrast changes the contrast of the image using the percentage parameter and returns the adjusted image.
-// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
-// The percentage = -100 gives solid grey image.
-//
-// Examples:
-//
-// dstImage = imaging.AdjustContrast(srcImage, -10) // decrease image contrast by 10%
-// dstImage = imaging.AdjustContrast(srcImage, 20) // increase image contrast by 20%
-//
-func AdjustContrast(img image.Image, percentage float64) *image.NRGBA {
- percentage = math.Min(math.Max(percentage, -100.0), 100.0)
- lut := make([]uint8, 256)
+func sigmoid(a, b, x float64) float64 {
+ return 1 / (1 + math.Exp(b*(a-x)))
+}
- v := (100.0 + percentage) / 100.0
- for i := 0; i < 256; i++ {
- if 0 <= v && v <= 1 {
- lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*v) * 255.0)
- } else if 1 < v && v < 2 {
- lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*(1/(2.0-v))) * 255.0)
- } else {
- lut[i] = uint8(float64(i)/255.0+0.5) * 255
+// adjustLUT applies the given lookup table to the colors of the image.
+func adjustLUT(img image.Image, lut []uint8) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
+ parallel(0, src.h, func(ys <-chan int) {
+ for y := range ys {
+ i := y * dst.Stride
+ src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
+ for x := 0; x < src.w; x++ {
+ dst.Pix[i+0] = lut[dst.Pix[i+0]]
+ dst.Pix[i+1] = lut[dst.Pix[i+1]]
+ dst.Pix[i+2] = lut[dst.Pix[i+2]]
+ i += 4
+ }
}
- }
-
- fn := func(c color.NRGBA) color.NRGBA {
- return color.NRGBA{lut[c.R], lut[c.G], lut[c.B], c.A}
- }
-
- return AdjustFunc(img, fn)
+ })
+ return dst
}
-// AdjustBrightness changes the brightness of the image using the percentage parameter and returns the adjusted image.
-// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
-// The percentage = -100 gives solid black image. The percentage = 100 gives solid white image.
+// AdjustFunc applies the fn function to each pixel of the img image and returns the adjusted image.
//
-// Examples:
+// Example:
//
-// dstImage = imaging.AdjustBrightness(srcImage, -15) // decrease image brightness by 15%
-// dstImage = imaging.AdjustBrightness(srcImage, 10) // increase image brightness by 10%
+// dstImage = imaging.AdjustFunc(
+// srcImage,
+// func(c color.NRGBA) color.NRGBA {
+// // shift the red channel by 16
+// r := int(c.R) + 16
+// if r > 255 {
+// r = 255
+// }
+// return color.NRGBA{uint8(r), c.G, c.B, c.A}
+// }
+// )
//
-func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA {
- percentage = math.Min(math.Max(percentage, -100.0), 100.0)
- lut := make([]uint8, 256)
-
- shift := 255.0 * percentage / 100.0
- for i := 0; i < 256; i++ {
- lut[i] = clamp(float64(i) + shift)
- }
-
- fn := func(c color.NRGBA) color.NRGBA {
- return color.NRGBA{lut[c.R], lut[c.G], lut[c.B], c.A}
- }
-
- return AdjustFunc(img, fn)
-}
-
-// Grayscale produces grayscale version of the image.
-func Grayscale(img image.Image) *image.NRGBA {
- fn := func(c color.NRGBA) color.NRGBA {
- f := 0.299*float64(c.R) + 0.587*float64(c.G) + 0.114*float64(c.B)
- y := uint8(f + 0.5)
- return color.NRGBA{y, y, y, c.A}
- }
- return AdjustFunc(img, fn)
-}
-
-// Invert produces inverted (negated) version of the image.
-func Invert(img image.Image) *image.NRGBA {
- fn := func(c color.NRGBA) color.NRGBA {
- return color.NRGBA{255 - c.R, 255 - c.G, 255 - c.B, c.A}
- }
- return AdjustFunc(img, fn)
+func AdjustFunc(img image.Image, fn func(c color.NRGBA) color.NRGBA) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
+ parallel(0, src.h, func(ys <-chan int) {
+ for y := range ys {
+ i := y * dst.Stride
+ src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
+ for x := 0; x < src.w; x++ {
+ r := dst.Pix[i+0]
+ g := dst.Pix[i+1]
+ b := dst.Pix[i+2]
+ a := dst.Pix[i+3]
+ c := fn(color.NRGBA{r, g, b, a})
+ dst.Pix[i+0] = c.R
+ dst.Pix[i+1] = c.G
+ dst.Pix[i+2] = c.B
+ dst.Pix[i+3] = c.A
+ i += 4
+ }
+ }
+ })
+ return dst
}
diff --git a/vendor/github.com/disintegration/imaging/adjust_test.go b/vendor/github.com/disintegration/imaging/adjust_test.go
deleted file mode 100644
index 60183d6ea..000000000
--- a/vendor/github.com/disintegration/imaging/adjust_test.go
+++ /dev/null
@@ -1,564 +0,0 @@
-package imaging
-
-import (
- "image"
- "testing"
-)
-
-func TestGrayscale(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Grayscale 3x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x3d, 0x3d, 0x3d, 0x01, 0x78, 0x78, 0x78, 0x02, 0x17, 0x17, 0x17, 0x03,
- 0x1f, 0x1f, 0x1f, 0xff, 0x25, 0x25, 0x25, 0xff, 0x66, 0x66, 0x66, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Grayscale(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestInvert(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Invert 3x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x33, 0xff, 0xff, 0x01, 0xff, 0x33, 0xff, 0x02, 0xff, 0xff, 0x33, 0x03,
- 0xee, 0xdd, 0xcc, 0xff, 0xcc, 0xdd, 0xee, 0xff, 0x55, 0xcc, 0x44, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Invert(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestAdjustContrast(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- p float64
- want *image.NRGBA
- }{
- {
- "AdjustContrast 3x3 10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xd5, 0x00, 0x00, 0x01, 0x00, 0xd5, 0x00, 0x02, 0x00, 0x00, 0xd5, 0x03,
- 0x05, 0x18, 0x2b, 0xff, 0x2b, 0x18, 0x05, 0xff, 0xaf, 0x2b, 0xc2, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x2b, 0x2b, 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustContrast 3x3 100",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 100,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0x01, 0x00, 0xff, 0x00, 0x02, 0x00, 0x00, 0xff, 0x03,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustContrast 3x3 -10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- -10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xc4, 0x0d, 0x0d, 0x01, 0x0d, 0xc4, 0x0d, 0x02, 0x0d, 0x0d, 0xc4, 0x03,
- 0x1c, 0x2b, 0x3b, 0xff, 0x3b, 0x2b, 0x1c, 0xff, 0xa6, 0x3b, 0xb5, 0xff,
- 0x0d, 0x0d, 0x0d, 0xff, 0x3b, 0x3b, 0x3b, 0xff, 0xf2, 0xf2, 0xf2, 0xff,
- },
- },
- },
- {
- "AdjustContrast 3x3 -100",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- -100,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x80, 0x80, 0x80, 0x01, 0x80, 0x80, 0x80, 0x02, 0x80, 0x80, 0x80, 0x03,
- 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff,
- 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff,
- },
- },
- },
- {
- "AdjustContrast 3x3 0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := AdjustContrast(d.src, d.p)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestAdjustContrastGolden(t *testing.T) {
- src, err := Open("testdata/lena_128.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, p := range map[string]float64{
- "out_contrast_m10.png": -10,
- "out_contrast_p10.png": 10,
- } {
- got := AdjustContrast(src, p)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func TestAdjustBrightness(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- p float64
- want *image.NRGBA
- }{
- {
- "AdjustBrightness 3x3 10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xe6, 0x1a, 0x1a, 0x01, 0x1a, 0xe6, 0x1a, 0x02, 0x1a, 0x1a, 0xe6, 0x03,
- 0x2b, 0x3c, 0x4d, 0xff, 0x4d, 0x3c, 0x2b, 0xff, 0xc4, 0x4d, 0xd5, 0xff,
- 0x1a, 0x1a, 0x1a, 0xff, 0x4d, 0x4d, 0x4d, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustBrightness 3x3 100",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 100,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x02, 0xff, 0xff, 0xff, 0x03,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustBrightness 3x3 -10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- -10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xb3, 0x00, 0x00, 0x01, 0x00, 0xb3, 0x00, 0x02, 0x00, 0x00, 0xb3, 0x03,
- 0x00, 0x09, 0x1a, 0xff, 0x1a, 0x09, 0x00, 0xff, 0x91, 0x1a, 0xa2, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x1a, 0x1a, 0x1a, 0xff, 0xe6, 0xe6, 0xe6, 0xff,
- },
- },
- },
- {
- "AdjustBrightness 3x3 -100",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- -100,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "AdjustBrightness 3x3 0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := AdjustBrightness(d.src, d.p)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestAdjustBrightnessGolden(t *testing.T) {
- src, err := Open("testdata/lena_128.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, p := range map[string]float64{
- "out_brightness_m10.png": -10,
- "out_brightness_p10.png": 10,
- } {
- got := AdjustBrightness(src, p)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func TestAdjustGamma(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- p float64
- want *image.NRGBA
- }{
- {
- "AdjustGamma 3x3 0.75",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0.75,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xbd, 0x00, 0x00, 0x01, 0x00, 0xbd, 0x00, 0x02, 0x00, 0x00, 0xbd, 0x03,
- 0x07, 0x11, 0x1e, 0xff, 0x1e, 0x11, 0x07, 0xff, 0x95, 0x1e, 0xa9, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x1e, 0x1e, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustGamma 3x3 1.5",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 1.5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xdc, 0x00, 0x00, 0x01, 0x00, 0xdc, 0x00, 0x02, 0x00, 0x00, 0xdc, 0x03,
- 0x2a, 0x43, 0x57, 0xff, 0x57, 0x43, 0x2a, 0xff, 0xc3, 0x57, 0xcf, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x57, 0x57, 0x57, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustGamma 3x3 1.0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 1.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := AdjustGamma(d.src, d.p)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestAdjustGammaGolden(t *testing.T) {
- src, err := Open("testdata/lena_128.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, g := range map[string]float64{
- "out_gamma_0.75.png": 0.75,
- "out_gamma_1.25.png": 1.25,
- } {
- got := AdjustGamma(src, g)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func TestAdjustSigmoid(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- m float64
- p float64
- want *image.NRGBA
- }{
- {
- "AdjustSigmoid 3x3 0.5 3.0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0.5,
- 3.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xd4, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x00, 0x02, 0x00, 0x00, 0xd4, 0x03,
- 0x0d, 0x1b, 0x2b, 0xff, 0x2b, 0x1b, 0x0d, 0xff, 0xb1, 0x2b, 0xc3, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x2b, 0x2b, 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustSigmoid 3x3 0.5 -3.0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0.5,
- -3.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xc4, 0x00, 0x00, 0x01, 0x00, 0xc4, 0x00, 0x02, 0x00, 0x00, 0xc4, 0x03,
- 0x16, 0x2a, 0x3b, 0xff, 0x3b, 0x2a, 0x16, 0xff, 0xa4, 0x3b, 0xb3, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x3b, 0x3b, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "AdjustSigmoid 3x3 0.5 0.0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0.5,
- 0.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x02, 0x00, 0x00, 0xcc, 0x03,
- 0x11, 0x22, 0x33, 0xff, 0x33, 0x22, 0x11, 0xff, 0xaa, 0x33, 0xbb, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := AdjustSigmoid(d.src, d.m, d.p)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/clone.go b/vendor/github.com/disintegration/imaging/clone.go
deleted file mode 100644
index a22e01913..000000000
--- a/vendor/github.com/disintegration/imaging/clone.go
+++ /dev/null
@@ -1,312 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
-)
-
-// Clone returns a copy of the given image.
-func Clone(img image.Image) *image.NRGBA {
- dstBounds := img.Bounds().Sub(img.Bounds().Min)
- dst := image.NewNRGBA(dstBounds)
-
- switch src := img.(type) {
- case *image.NRGBA:
- copyNRGBA(dst, src)
- case *image.NRGBA64:
- copyNRGBA64(dst, src)
- case *image.RGBA:
- copyRGBA(dst, src)
- case *image.RGBA64:
- copyRGBA64(dst, src)
- case *image.Gray:
- copyGray(dst, src)
- case *image.Gray16:
- copyGray16(dst, src)
- case *image.YCbCr:
- copyYCbCr(dst, src)
- case *image.Paletted:
- copyPaletted(dst, src)
- default:
- copyImage(dst, src)
- }
-
- return dst
-}
-
-func copyNRGBA(dst *image.NRGBA, src *image.NRGBA) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- rowSize := dstW * 4
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- copy(dst.Pix[di:di+rowSize], src.Pix[si:si+rowSize])
- }
- })
-}
-
-func copyNRGBA64(dst *image.NRGBA, src *image.NRGBA64) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- dst.Pix[di+0] = src.Pix[si+0]
- dst.Pix[di+1] = src.Pix[si+2]
- dst.Pix[di+2] = src.Pix[si+4]
- dst.Pix[di+3] = src.Pix[si+6]
- di += 4
- si += 8
- }
- }
- })
-}
-
-func copyRGBA(dst *image.NRGBA, src *image.RGBA) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- a := src.Pix[si+3]
- dst.Pix[di+3] = a
-
- switch a {
- case 0:
- dst.Pix[di+0] = 0
- dst.Pix[di+1] = 0
- dst.Pix[di+2] = 0
- case 0xff:
- dst.Pix[di+0] = src.Pix[si+0]
- dst.Pix[di+1] = src.Pix[si+1]
- dst.Pix[di+2] = src.Pix[si+2]
- default:
- var tmp uint16
- tmp = uint16(src.Pix[si+0]) * 0xff / uint16(a)
- dst.Pix[di+0] = uint8(tmp)
- tmp = uint16(src.Pix[si+1]) * 0xff / uint16(a)
- dst.Pix[di+1] = uint8(tmp)
- tmp = uint16(src.Pix[si+2]) * 0xff / uint16(a)
- dst.Pix[di+2] = uint8(tmp)
- }
-
- di += 4
- si += 4
- }
- }
- })
-}
-
-func copyRGBA64(dst *image.NRGBA, src *image.RGBA64) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- a := src.Pix[si+6]
- dst.Pix[di+3] = a
-
- switch a {
- case 0:
- dst.Pix[di+0] = 0
- dst.Pix[di+1] = 0
- dst.Pix[di+2] = 0
- case 0xff:
- dst.Pix[di+0] = src.Pix[si+0]
- dst.Pix[di+1] = src.Pix[si+2]
- dst.Pix[di+2] = src.Pix[si+4]
- default:
- var tmp uint16
- tmp = uint16(src.Pix[si+0]) * 0xff / uint16(a)
- dst.Pix[di+0] = uint8(tmp)
- tmp = uint16(src.Pix[si+2]) * 0xff / uint16(a)
- dst.Pix[di+1] = uint8(tmp)
- tmp = uint16(src.Pix[si+4]) * 0xff / uint16(a)
- dst.Pix[di+2] = uint8(tmp)
- }
-
- di += 4
- si += 8
- }
- }
- })
-}
-
-func copyGray(dst *image.NRGBA, src *image.Gray) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- c := src.Pix[si]
- dst.Pix[di+0] = c
- dst.Pix[di+1] = c
- dst.Pix[di+2] = c
- dst.Pix[di+3] = 0xff
- di += 4
- si++
- }
- }
- })
-}
-
-func copyGray16(dst *image.NRGBA, src *image.Gray16) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- c := src.Pix[si]
- dst.Pix[di+0] = c
- dst.Pix[di+1] = c
- dst.Pix[di+2] = c
- dst.Pix[di+3] = 0xff
- di += 4
- si += 2
- }
- }
- })
-}
-
-func copyYCbCr(dst *image.NRGBA, src *image.YCbCr) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- srcY := srcMinY + dstY
- di := dst.PixOffset(0, dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := srcMinX + dstX
-
- siy := (srcY-srcMinY)*src.YStride + (srcX - srcMinX)
-
- var sic int
- switch src.SubsampleRatio {
- case image.YCbCrSubsampleRatio444:
- sic = (srcY-srcMinY)*src.CStride + (srcX - srcMinX)
- case image.YCbCrSubsampleRatio422:
- sic = (srcY-srcMinY)*src.CStride + (srcX/2 - srcMinX/2)
- case image.YCbCrSubsampleRatio420:
- sic = (srcY/2-srcMinY/2)*src.CStride + (srcX/2 - srcMinX/2)
- case image.YCbCrSubsampleRatio440:
- sic = (srcY/2-srcMinY/2)*src.CStride + (srcX - srcMinX)
- default:
- sic = src.COffset(srcX, srcY)
- }
-
- y := int32(src.Y[siy])
- cb := int32(src.Cb[sic]) - 128
- cr := int32(src.Cr[sic]) - 128
-
- r := (y<<16 + 91881*cr + 1<<15) >> 16
- if r > 255 {
- r = 255
- } else if r < 0 {
- r = 0
- }
-
- g := (y<<16 - 22554*cb - 46802*cr + 1<<15) >> 16
- if g > 255 {
- g = 255
- } else if g < 0 {
- g = 0
- }
-
- b := (y<<16 + 116130*cb + 1<<15) >> 16
- if b > 255 {
- b = 255
- } else if b < 0 {
- b = 0
- }
-
- dst.Pix[di+0] = uint8(r)
- dst.Pix[di+1] = uint8(g)
- dst.Pix[di+2] = uint8(b)
- dst.Pix[di+3] = 255
-
- di += 4
- }
- }
- })
-}
-
-func copyPaletted(dst *image.NRGBA, src *image.Paletted) {
- srcMinX := src.Rect.Min.X
- srcMinY := src.Rect.Min.Y
- dstW := dst.Rect.Dx()
- dstH := dst.Rect.Dy()
- plen := len(src.Palette)
- pnew := make([]color.NRGBA, plen)
- for i := 0; i < plen; i++ {
- pnew[i] = color.NRGBAModel.Convert(src.Palette[i]).(color.NRGBA)
- }
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- si := src.PixOffset(srcMinX, srcMinY+dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- c := pnew[src.Pix[si]]
- dst.Pix[di+0] = c.R
- dst.Pix[di+1] = c.G
- dst.Pix[di+2] = c.B
- dst.Pix[di+3] = c.A
- di += 4
- si++
- }
- }
- })
-}
-
-func copyImage(dst *image.NRGBA, src image.Image) {
- srcMinX := src.Bounds().Min.X
- srcMinY := src.Bounds().Min.Y
- dstW := dst.Bounds().Dx()
- dstH := dst.Bounds().Dy()
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- di := dst.PixOffset(0, dstY)
- for dstX := 0; dstX < dstW; dstX++ {
- c := color.NRGBAModel.Convert(src.At(srcMinX+dstX, srcMinY+dstY)).(color.NRGBA)
- dst.Pix[di+0] = c.R
- dst.Pix[di+1] = c.G
- dst.Pix[di+2] = c.B
- dst.Pix[di+3] = c.A
- di += 4
- }
- }
- })
-}
-
-// toNRGBA converts any image type to *image.NRGBA with min-point at (0, 0).
-func toNRGBA(img image.Image) *image.NRGBA {
- if img, ok := img.(*image.NRGBA); ok && img.Bounds().Min.Eq(image.ZP) {
- return img
- }
- return Clone(img)
-}
diff --git a/vendor/github.com/disintegration/imaging/clone_test.go b/vendor/github.com/disintegration/imaging/clone_test.go
deleted file mode 100644
index 36e309f0a..000000000
--- a/vendor/github.com/disintegration/imaging/clone_test.go
+++ /dev/null
@@ -1,247 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "testing"
-)
-
-func TestClone(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Clone NRGBA",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- },
- {
- "Clone NRGBA64",
- &image.NRGBA64{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 8,
- Pix: []uint8{
- 0x00, 0x00, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33,
- 0xcc, 0xcc, 0xdd, 0xdd, 0xee, 0xee, 0xff, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- },
- {
- "Clone RGBA",
- &image.RGBA{
- Rect: image.Rect(-1, -1, 0, 2),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 3),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xaa, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- },
- {
- "Clone RGBA64",
- &image.RGBA64{
- Rect: image.Rect(-1, -1, 0, 2),
- Stride: 1 * 8,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33,
- 0xcc, 0xcc, 0xdd, 0xdd, 0xee, 0xee, 0xff, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 3),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xaa, 0x33, 0xcc, 0xdd, 0xee, 0xff},
- },
- },
- {
- "Clone Gray",
- &image.Gray{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 1,
- Pix: []uint8{0x11, 0xee},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{0x11, 0x11, 0x11, 0xff, 0xee, 0xee, 0xee, 0xff},
- },
- },
- {
- "Clone Gray16",
- &image.Gray16{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 2,
- Pix: []uint8{0x11, 0x11, 0xee, 0xee},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{0x11, 0x11, 0x11, 0xff, 0xee, 0xee, 0xee, 0xff},
- },
- },
- {
- "Clone Alpha",
- &image.Alpha{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 1,
- Pix: []uint8{0x11, 0xee},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{0xff, 0xff, 0xff, 0x11, 0xff, 0xff, 0xff, 0xee},
- },
- },
- {
- "Clone YCbCr",
- &image.YCbCr{
- Rect: image.Rect(-1, -1, 5, 0),
- SubsampleRatio: image.YCbCrSubsampleRatio444,
- YStride: 6,
- CStride: 6,
- Y: []uint8{0x00, 0xff, 0x7f, 0x26, 0x4b, 0x0e},
- Cb: []uint8{0x80, 0x80, 0x80, 0x6b, 0x56, 0xc0},
- Cr: []uint8{0x80, 0x80, 0x80, 0xc0, 0x4b, 0x76},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 6, 1),
- Stride: 6 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x7f, 0x7f, 0x7f, 0xff,
- 0x7f, 0x00, 0x00, 0xff,
- 0x00, 0x7f, 0x00, 0xff,
- 0x00, 0x00, 0x7f, 0xff,
- },
- },
- },
- {
- "Clone YCbCr 444",
- &image.YCbCr{
- Y: []uint8{0x4c, 0x69, 0x1d, 0xb1, 0x96, 0xe2, 0x26, 0x34, 0xe, 0x59, 0x4b, 0x71, 0x0, 0x4c, 0x99, 0xff},
- Cb: []uint8{0x55, 0xd4, 0xff, 0x8e, 0x2c, 0x01, 0x6b, 0xaa, 0xc0, 0x95, 0x56, 0x40, 0x80, 0x80, 0x80, 0x80},
- Cr: []uint8{0xff, 0xeb, 0x6b, 0x36, 0x15, 0x95, 0xc0, 0xb5, 0x76, 0x41, 0x4b, 0x8c, 0x80, 0x80, 0x80, 0x80},
- YStride: 4,
- CStride: 4,
- SubsampleRatio: image.YCbCrSubsampleRatio444,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- &image.NRGBA{
- Pix: []uint8{0xff, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0x49, 0xe1, 0xca, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0x7f, 0x0, 0x0, 0xff, 0x7f, 0x0, 0x7f, 0xff, 0x0, 0x0, 0x7f, 0xff, 0x0, 0x7f, 0x7f, 0xff, 0x0, 0x7f, 0x0, 0xff, 0x82, 0x7f, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0x4c, 0x4c, 0x4c, 0xff, 0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff},
- Stride: 16,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- },
- {
- "Clone YCbCr 440",
- &image.YCbCr{
- Y: []uint8{0x4c, 0x69, 0x1d, 0xb1, 0x96, 0xe2, 0x26, 0x34, 0xe, 0x59, 0x4b, 0x71, 0x0, 0x4c, 0x99, 0xff},
- Cb: []uint8{0x2c, 0x01, 0x6b, 0xaa, 0x80, 0x80, 0x80, 0x80},
- Cr: []uint8{0x15, 0x95, 0xc0, 0xb5, 0x80, 0x80, 0x80, 0x80},
- YStride: 4,
- CStride: 4,
- SubsampleRatio: image.YCbCrSubsampleRatio440,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- &image.NRGBA{
- Pix: []uint8{0x0, 0xb5, 0x0, 0xff, 0x86, 0x86, 0x0, 0xff, 0x77, 0x0, 0x0, 0xff, 0xfb, 0x7d, 0xfb, 0xff, 0x0, 0xff, 0x1, 0xff, 0xff, 0xff, 0x1, 0xff, 0x80, 0x0, 0x1, 0xff, 0x7e, 0x0, 0x7e, 0xff, 0xe, 0xe, 0xe, 0xff, 0x59, 0x59, 0x59, 0xff, 0x4b, 0x4b, 0x4b, 0xff, 0x71, 0x71, 0x71, 0xff, 0x0, 0x0, 0x0, 0xff, 0x4c, 0x4c, 0x4c, 0xff, 0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff},
- Stride: 16,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- },
- {
- "Clone YCbCr 422",
- &image.YCbCr{
- Y: []uint8{0x4c, 0x69, 0x1d, 0xb1, 0x96, 0xe2, 0x26, 0x34, 0xe, 0x59, 0x4b, 0x71, 0x0, 0x4c, 0x99, 0xff},
- Cb: []uint8{0xd4, 0x8e, 0x01, 0xaa, 0x95, 0x40, 0x80, 0x80},
- Cr: []uint8{0xeb, 0x36, 0x95, 0xb5, 0x41, 0x8c, 0x80, 0x80},
- YStride: 4,
- CStride: 2,
- SubsampleRatio: image.YCbCrSubsampleRatio422,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- &image.NRGBA{
- Pix: []uint8{0xe2, 0x0, 0xe1, 0xff, 0xff, 0x0, 0xfe, 0xff, 0x0, 0x4d, 0x36, 0xff, 0x49, 0xe1, 0xca, 0xff, 0xb3, 0xb3, 0x0, 0xff, 0xff, 0xff, 0x1, 0xff, 0x70, 0x0, 0x70, 0xff, 0x7e, 0x0, 0x7e, 0xff, 0x0, 0x34, 0x33, 0xff, 0x1, 0x7f, 0x7e, 0xff, 0x5c, 0x58, 0x0, 0xff, 0x82, 0x7e, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0x4c, 0x4c, 0x4c, 0xff, 0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff},
- Stride: 16,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- },
- {
- "Clone YCbCr 420",
- &image.YCbCr{
- Y: []uint8{0x4c, 0x69, 0x1d, 0xb1, 0x96, 0xe2, 0x26, 0x34, 0xe, 0x59, 0x4b, 0x71, 0x0, 0x4c, 0x99, 0xff},
- Cb: []uint8{0x01, 0xaa, 0x80, 0x80},
- Cr: []uint8{0x95, 0xb5, 0x80, 0x80},
- YStride: 4, CStride: 2,
- SubsampleRatio: image.YCbCrSubsampleRatio420,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- &image.NRGBA{
- Pix: []uint8{0x69, 0x69, 0x0, 0xff, 0x86, 0x86, 0x0, 0xff, 0x67, 0x0, 0x67, 0xff, 0xfb, 0x7d, 0xfb, 0xff, 0xb3, 0xb3, 0x0, 0xff, 0xff, 0xff, 0x1, 0xff, 0x70, 0x0, 0x70, 0xff, 0x7e, 0x0, 0x7e, 0xff, 0xe, 0xe, 0xe, 0xff, 0x59, 0x59, 0x59, 0xff, 0x4b, 0x4b, 0x4b, 0xff, 0x71, 0x71, 0x71, 0xff, 0x0, 0x0, 0x0, 0xff, 0x4c, 0x4c, 0x4c, 0xff, 0x99, 0x99, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff},
- Stride: 16,
- Rect: image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: 4, Y: 4}},
- },
- },
- {
- "Clone Paletted",
- &image.Paletted{
- Rect: image.Rect(-1, -1, 5, 0),
- Stride: 6 * 1,
- Palette: color.Palette{
- color.NRGBA{R: 0x00, G: 0x00, B: 0x00, A: 0xff},
- color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff},
- color.NRGBA{R: 0x7f, G: 0x7f, B: 0x7f, A: 0xff},
- color.NRGBA{R: 0x7f, G: 0x00, B: 0x00, A: 0xff},
- color.NRGBA{R: 0x00, G: 0x7f, B: 0x00, A: 0xff},
- color.NRGBA{R: 0x00, G: 0x00, B: 0x7f, A: 0xff},
- },
- Pix: []uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5},
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 6, 1),
- Stride: 6 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x7f, 0x7f, 0x7f, 0xff,
- 0x7f, 0x00, 0x00, 0xff,
- 0x00, 0x7f, 0x00, 0xff,
- 0x00, 0x00, 0x7f, 0xff,
- },
- },
- },
- }
-
- for _, d := range td {
- got := Clone(d.src)
- want := d.want
-
- delta := 0
- if _, ok := d.src.(*image.YCbCr); ok {
- delta = 1
- }
-
- if !compareNRGBA(got, want, delta) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/convolution.go b/vendor/github.com/disintegration/imaging/convolution.go
index ed7540f05..9e6404dee 100644
--- a/vendor/github.com/disintegration/imaging/convolution.go
+++ b/vendor/github.com/disintegration/imaging/convolution.go
@@ -58,8 +58,6 @@ func convolve(img image.Image, kernel []float64, options *ConvolveOptions) *imag
m = 1
case 25:
m = 2
- default:
- return dst
}
i := 0
@@ -72,8 +70,8 @@ func convolve(img image.Image, kernel []float64, options *ConvolveOptions) *imag
}
}
- parallel(h, func(partStart, partEnd int) {
- for y := partStart; y < partEnd; y++ {
+ parallel(0, h, func(ys <-chan int) {
+ for y := range ys {
for x := 0; x < w; x++ {
var r, g, b float64
for _, c := range coefs {
diff --git a/vendor/github.com/disintegration/imaging/convolution_test.go b/vendor/github.com/disintegration/imaging/convolution_test.go
deleted file mode 100644
index 5a824ead9..000000000
--- a/vendor/github.com/disintegration/imaging/convolution_test.go
+++ /dev/null
@@ -1,275 +0,0 @@
-package imaging
-
-import (
- "image"
- "testing"
-)
-
-func TestConvolve3x3(t *testing.T) {
- testCases := []struct {
- desc string
- src image.Image
- kernel [9]float64
- options *ConvolveOptions
- want *image.NRGBA
- }{
- {
- "Convolve3x3 0x0",
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- [9]float64{
- 0, 0, 0,
- 0, 1, 0,
- 0, 0, 0,
- },
- nil,
- &image.NRGBA{Rect: image.Rect(0, 0, 0, 0)},
- },
- {
- "Convolve3x3 4x4 identity",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- [9]float64{
- 0, 0, 0,
- 0, 1, 0,
- 0, 0, 0,
- },
- nil,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "Convolve3x3 4x4 abs",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- [9]float64{
- 0, 0, 0,
- 0, -1, 0,
- 0, 0, 0,
- },
- &ConvolveOptions{Abs: true},
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "Convolve3x3 4x4 bias",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- [9]float64{
- 0, 0, 0,
- 0, 1, 0,
- 0, 0, 0,
- },
- &ConvolveOptions{Bias: 0x10},
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x10, 0x11, 0x12, 0x03, 0x14, 0x15, 0x16, 0x07, 0x18, 0x19, 0x1a, 0x0b, 0x1c, 0x1d, 0x1e, 0x0f,
- 0x20, 0x21, 0x22, 0x13, 0x24, 0x25, 0x26, 0x17, 0x28, 0x29, 0x2a, 0x1b, 0x2c, 0x2d, 0x2e, 0x1f,
- 0x30, 0x31, 0x32, 0x23, 0x34, 0x35, 0x36, 0x27, 0x38, 0x39, 0x3a, 0x2b, 0x3c, 0x3d, 0x3e, 0x2f,
- 0x40, 0x41, 0x42, 0x33, 0x44, 0x45, 0x46, 0x37, 0x48, 0x49, 0x4a, 0x3b, 0x4c, 0x4d, 0x4e, 0x3f,
- },
- },
- },
- {
- "Convolve3x3 4x4 norm",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- [9]float64{
- 1, 1, 1,
- 1, 1, 1,
- 1, 1, 1,
- },
- &ConvolveOptions{Normalize: true},
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x07, 0x08, 0x09, 0x03, 0x09, 0x0a, 0x0b, 0x07, 0x0d, 0x0e, 0x0f, 0x0b, 0x10, 0x11, 0x12, 0x0f,
- 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1b, 0x1c, 0x1d, 0x1f,
- 0x21, 0x22, 0x23, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2b, 0x2c, 0x2d, 0x2f,
- 0x2c, 0x2d, 0x2e, 0x33, 0x2f, 0x30, 0x31, 0x37, 0x33, 0x34, 0x35, 0x3b, 0x35, 0x36, 0x37, 0x3f,
- },
- },
- },
- {
- "Convolve3x3 3x3 laplacian",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x01, 0xff, 0x00, 0x01, 0x02, 0xff, 0x00, 0x01, 0x03, 0xff,
- 0x00, 0x01, 0x04, 0xff, 0x10, 0x10, 0x10, 0xff, 0x00, 0x01, 0x05, 0xff,
- 0x00, 0x01, 0x06, 0xff, 0x00, 0x01, 0x07, 0xff, 0x00, 0x01, 0x08, 0xff,
- },
- },
- [9]float64{
- -1, -1, -1,
- -1, 8, -1,
- -1, -1, -1,
- },
- nil,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x80, 0x78, 0x5c, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
-
- for _, tc := range testCases {
- got := Convolve3x3(tc.src, tc.kernel, tc.options)
- want := tc.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: want %#v got %#v", tc.desc, want, got)
- }
- }
-}
-
-func TestConvolve5x5(t *testing.T) {
- testCases := []struct {
- desc string
- src image.Image
- kernel [25]float64
- options *ConvolveOptions
- want *image.NRGBA
- }{
- {
- "Convolve5x5 4x4 translate",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- [25]float64{
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1,
- },
- nil,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x28, 0x29, 0x2a, 0x03, 0x2c, 0x2d, 0x2e, 0x07, 0x2c, 0x2d, 0x2e, 0x0b, 0x2c, 0x2d, 0x2e, 0x0f,
- 0x38, 0x39, 0x3a, 0x13, 0x3c, 0x3d, 0x3e, 0x17, 0x3c, 0x3d, 0x3e, 0x1b, 0x3c, 0x3d, 0x3e, 0x1f,
- 0x38, 0x39, 0x3a, 0x23, 0x3c, 0x3d, 0x3e, 0x27, 0x3c, 0x3d, 0x3e, 0x2b, 0x3c, 0x3d, 0x3e, 0x2f,
- 0x38, 0x39, 0x3a, 0x33, 0x3c, 0x3d, 0x3e, 0x37, 0x3c, 0x3d, 0x3e, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- }
-
- for _, tc := range testCases {
- got := Convolve5x5(tc.src, tc.kernel, tc.options)
- want := tc.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: want %#v got %#v", tc.desc, want, got)
- }
- }
-}
-
-func BenchmarkConvolve3x3(b *testing.B) {
- b.StopTimer()
- img, err := Open("testdata/lena_512.png")
- if err != nil {
- b.Fatalf("Open: %v", err)
- }
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- Convolve3x3(
- img,
- [9]float64{
- -1, -1, 0,
- -1, 0, 1,
- 0, 1, 1,
- },
- nil,
- )
- }
-}
-
-func BenchmarkConvolve5x5(b *testing.B) {
- b.StopTimer()
- img, err := Open("testdata/lena_512.png")
- if err != nil {
- b.Fatalf("Open: %v", err)
- }
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- Convolve5x5(
- img,
- [25]float64{
- -1, -1, -1, -1, 0,
- -1, -1, -1, 0, 1,
- -1, -1, 0, 1, 1,
- -1, 0, 1, 1, 1,
- 0, 1, 1, 1, 1,
- },
- nil,
- )
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/doc.go b/vendor/github.com/disintegration/imaging/doc.go
new file mode 100644
index 000000000..5d59b46e2
--- /dev/null
+++ b/vendor/github.com/disintegration/imaging/doc.go
@@ -0,0 +1,7 @@
+/*
+Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.).
+
+All the image processing functions provided by the package accept any image type that implements image.Image interface
+as an input, and return a new image of *image.NRGBA type (32bit RGBA colors, not premultiplied by alpha).
+*/
+package imaging
diff --git a/vendor/github.com/disintegration/imaging/effects.go b/vendor/github.com/disintegration/imaging/effects.go
index f358a48ea..b16781f12 100644
--- a/vendor/github.com/disintegration/imaging/effects.go
+++ b/vendor/github.com/disintegration/imaging/effects.go
@@ -18,11 +18,9 @@ func gaussianBlurKernel(x, sigma float64) float64 {
//
func Blur(img image.Image, sigma float64) *image.NRGBA {
if sigma <= 0 {
- // sigma parameter must be positive!
return Clone(img)
}
- src := toNRGBA(img)
radius := int(math.Ceil(sigma * 3.0))
kernel := make([]float64, radius+1)
@@ -30,54 +28,50 @@ func Blur(img image.Image, sigma float64) *image.NRGBA {
kernel[i] = gaussianBlurKernel(float64(i), sigma)
}
- var dst *image.NRGBA
- dst = blurHorizontal(src, kernel)
- dst = blurVertical(dst, kernel)
-
- return dst
+ return blurVertical(blurHorizontal(img, kernel), kernel)
}
-func blurHorizontal(src *image.NRGBA, kernel []float64) *image.NRGBA {
+func blurHorizontal(img image.Image, kernel []float64) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
radius := len(kernel) - 1
- width := src.Bounds().Max.X
- height := src.Bounds().Max.Y
-
- dst := image.NewNRGBA(image.Rect(0, 0, width, height))
-
- parallel(width, func(partStart, partEnd int) {
- for x := partStart; x < partEnd; x++ {
- start := x - radius
- if start < 0 {
- start = 0
- }
- end := x + radius
- if end > width-1 {
- end = width - 1
- }
-
- weightSum := 0.0
- for ix := start; ix <= end; ix++ {
- weightSum += kernel[absint(x-ix)]
- }
+ parallel(0, src.h, func(ys <-chan int) {
+ scanLine := make([]uint8, src.w*4)
+ for y := range ys {
+ src.scan(0, y, src.w, y+1, scanLine)
+ for x := 0; x < src.w; x++ {
+ min := x - radius
+ if min < 0 {
+ min = 0
+ }
+ max := x + radius
+ if max > src.w-1 {
+ max = src.w - 1
+ }
- for y := 0; y < height; y++ {
- var r, g, b, a float64
- for ix := start; ix <= end; ix++ {
+ var r, g, b, a, wsum float64
+ for ix := min; ix <= max; ix++ {
+ i := ix * 4
weight := kernel[absint(x-ix)]
- i := y*src.Stride + ix*4
- wa := float64(src.Pix[i+3]) * weight
- r += float64(src.Pix[i+0]) * wa
- g += float64(src.Pix[i+1]) * wa
- b += float64(src.Pix[i+2]) * wa
+ wsum += weight
+ wa := float64(scanLine[i+3]) * weight
+ r += float64(scanLine[i+0]) * wa
+ g += float64(scanLine[i+1]) * wa
+ b += float64(scanLine[i+2]) * wa
a += wa
}
+ if a != 0 {
+ r /= a
+ g /= a
+ b /= a
+ }
j := y*dst.Stride + x*4
- dst.Pix[j+0] = clamp(r / a)
- dst.Pix[j+1] = clamp(g / a)
- dst.Pix[j+2] = clamp(b / a)
- dst.Pix[j+3] = clamp(a / weightSum)
+ dst.Pix[j+0] = clamp(r)
+ dst.Pix[j+1] = clamp(g)
+ dst.Pix[j+2] = clamp(b)
+ dst.Pix[j+3] = clamp(a / wsum)
}
}
})
@@ -85,47 +79,47 @@ func blurHorizontal(src *image.NRGBA, kernel []float64) *image.NRGBA {
return dst
}
-func blurVertical(src *image.NRGBA, kernel []float64) *image.NRGBA {
+func blurVertical(img image.Image, kernel []float64) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
radius := len(kernel) - 1
- width := src.Bounds().Max.X
- height := src.Bounds().Max.Y
-
- dst := image.NewNRGBA(image.Rect(0, 0, width, height))
-
- parallel(height, func(partStart, partEnd int) {
- for y := partStart; y < partEnd; y++ {
- start := y - radius
- if start < 0 {
- start = 0
- }
-
- end := y + radius
- if end > height-1 {
- end = height - 1
- }
- weightSum := 0.0
- for iy := start; iy <= end; iy++ {
- weightSum += kernel[absint(y-iy)]
- }
+ parallel(0, src.w, func(xs <-chan int) {
+ scanLine := make([]uint8, src.h*4)
+ for x := range xs {
+ src.scan(x, 0, x+1, src.h, scanLine)
+ for y := 0; y < src.h; y++ {
+ min := y - radius
+ if min < 0 {
+ min = 0
+ }
+ max := y + radius
+ if max > src.h-1 {
+ max = src.h - 1
+ }
- for x := 0; x < width; x++ {
- var r, g, b, a float64
- for iy := start; iy <= end; iy++ {
+ var r, g, b, a, wsum float64
+ for iy := min; iy <= max; iy++ {
+ i := iy * 4
weight := kernel[absint(y-iy)]
- i := iy*src.Stride + x*4
- wa := float64(src.Pix[i+3]) * weight
- r += float64(src.Pix[i+0]) * wa
- g += float64(src.Pix[i+1]) * wa
- b += float64(src.Pix[i+2]) * wa
+ wsum += weight
+ wa := float64(scanLine[i+3]) * weight
+ r += float64(scanLine[i+0]) * wa
+ g += float64(scanLine[i+1]) * wa
+ b += float64(scanLine[i+2]) * wa
a += wa
}
+ if a != 0 {
+ r /= a
+ g /= a
+ b /= a
+ }
j := y*dst.Stride + x*4
- dst.Pix[j+0] = clamp(r / a)
- dst.Pix[j+1] = clamp(g / a)
- dst.Pix[j+2] = clamp(b / a)
- dst.Pix[j+3] = clamp(a / weightSum)
+ dst.Pix[j+0] = clamp(r)
+ dst.Pix[j+1] = clamp(g)
+ dst.Pix[j+2] = clamp(b)
+ dst.Pix[j+3] = clamp(a / wsum)
}
}
})
@@ -142,31 +136,27 @@ func blurVertical(src *image.NRGBA, kernel []float64) *image.NRGBA {
//
func Sharpen(img image.Image, sigma float64) *image.NRGBA {
if sigma <= 0 {
- // sigma parameter must be positive!
return Clone(img)
}
- src := toNRGBA(img)
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
blurred := Blur(img, sigma)
- width := src.Bounds().Max.X
- height := src.Bounds().Max.Y
- dst := image.NewNRGBA(image.Rect(0, 0, width, height))
-
- parallel(height, func(partStart, partEnd int) {
- for y := partStart; y < partEnd; y++ {
- for x := 0; x < width; x++ {
- i := y*src.Stride + x*4
- for j := 0; j < 4; j++ {
- k := i + j
- val := int(src.Pix[k])<<1 - int(blurred.Pix[k])
- if val < 0 {
- val = 0
- } else if val > 255 {
- val = 255
- }
- dst.Pix[k] = uint8(val)
+ parallel(0, src.h, func(ys <-chan int) {
+ scanLine := make([]uint8, src.w*4)
+ for y := range ys {
+ src.scan(0, y, src.w, y+1, scanLine)
+ j := y * dst.Stride
+ for i := 0; i < src.w*4; i++ {
+ val := int(scanLine[i])<<1 - int(blurred.Pix[j])
+ if val < 0 {
+ val = 0
+ } else if val > 0xff {
+ val = 0xff
}
+ dst.Pix[j] = uint8(val)
+ j++
}
}
})
diff --git a/vendor/github.com/disintegration/imaging/effects_test.go b/vendor/github.com/disintegration/imaging/effects_test.go
deleted file mode 100644
index 9c787cb49..000000000
--- a/vendor/github.com/disintegration/imaging/effects_test.go
+++ /dev/null
@@ -1,254 +0,0 @@
-package imaging
-
-import (
- "image"
- "testing"
-)
-
-func TestBlur(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- sigma float64
- want *image.NRGBA
- }{
- {
- "Blur 3x3 0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x66, 0xaa, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- },
- 0.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x66, 0xaa, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- },
- },
- {
- "Blur 3x3 0.5",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x66, 0xaa, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- },
- 0.5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0xaa, 0xff, 0x04, 0x66, 0xaa, 0xff, 0x18, 0x66, 0xaa, 0xff, 0x04,
- 0x66, 0xaa, 0xff, 0x18, 0x66, 0xaa, 0xff, 0x9e, 0x66, 0xaa, 0xff, 0x18,
- 0x66, 0xaa, 0xff, 0x04, 0x66, 0xaa, 0xff, 0x18, 0x66, 0xaa, 0xff, 0x04,
- },
- },
- },
- {
- "Blur 3x3 10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x66, 0xaa, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- },
- 10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c,
- 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c,
- 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c, 0x66, 0xaa, 0xff, 0x1c,
- },
- },
- },
- }
- for _, d := range td {
- got := Blur(d.src, d.sigma)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestBlurGolden(t *testing.T) {
- src, err := Open("testdata/lena_128.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, sigma := range map[string]float64{
- "out_blur_0.5.png": 0.5,
- "out_blur_1.5.png": 1.5,
- } {
- got := Blur(src, sigma)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func BenchmarkBlur(b *testing.B) {
- b.StopTimer()
- img, err := Open("testdata/lena_512.png")
- if err != nil {
- b.Fatalf("Open: %v", err)
- }
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- Blur(img, 3)
- }
-}
-
-func TestSharpen(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- sigma float64
- want *image.NRGBA
- }{
- {
- "Sharpen 3x3 0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- },
- },
- 0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- },
- },
- },
- {
- "Sharpen 3x3 0.5",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- },
- },
- 0.5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0x66, 0x66, 0x66, 0x64, 0x64, 0x64, 0x64, 0x66, 0x66, 0x66, 0x66,
- 0x64, 0x64, 0x64, 0x64, 0x7d, 0x7d, 0x7d, 0x7e, 0x64, 0x64, 0x64, 0x64,
- 0x66, 0x66, 0x66, 0x66, 0x64, 0x64, 0x64, 0x64, 0x66, 0x66, 0x66, 0x66,
- },
- },
- },
- {
- "Sharpen 3x3 100",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x66, 0x66,
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
- },
- },
- 100,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 3),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
- 0x64, 0x64, 0x64, 0x64, 0x86, 0x86, 0x86, 0x86, 0x64, 0x64, 0x64, 0x64,
- 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
- },
- },
- },
- {
- "Sharpen 3x1 10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 0),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 10,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 1),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Sharpen(d.src, d.sigma)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestSharpenGolden(t *testing.T) {
- src, err := Open("testdata/lena_128.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, sigma := range map[string]float64{
- "out_sharpen_0.5.png": 0.5,
- "out_sharpen_1.5.png": 1.5,
- } {
- got := Sharpen(src, sigma)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func BenchmarkSharpen(b *testing.B) {
- b.StopTimer()
- img, err := Open("testdata/lena_512.png")
- if err != nil {
- b.Fatalf("Open: %v", err)
- }
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- Sharpen(img, 3)
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/example_test.go b/vendor/github.com/disintegration/imaging/example_test.go
deleted file mode 100644
index d79451f03..000000000
--- a/vendor/github.com/disintegration/imaging/example_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package imaging_test
-
-import (
- "image"
- "image/color"
- "log"
-
- "github.com/disintegration/imaging"
-)
-
-func Example() {
- // Open the test image.
- src, err := imaging.Open("testdata/lena_512.png")
- if err != nil {
- log.Fatalf("Open failed: %v", err)
- }
-
- // Crop the original image to 350x350px size using the center anchor.
- src = imaging.CropAnchor(src, 350, 350, imaging.Center)
-
- // Resize the cropped image to width = 256px preserving the aspect ratio.
- src = imaging.Resize(src, 256, 0, imaging.Lanczos)
-
- // Create a blurred version of the image.
- img1 := imaging.Blur(src, 2)
-
- // Create a grayscale version of the image with higher contrast and sharpness.
- img2 := imaging.Grayscale(src)
- img2 = imaging.AdjustContrast(img2, 20)
- img2 = imaging.Sharpen(img2, 2)
-
- // Create an inverted version of the image.
- img3 := imaging.Invert(src)
-
- // Create an embossed version of the image using a convolution filter.
- img4 := imaging.Convolve3x3(
- src,
- [9]float64{
- -1, -1, 0,
- -1, 1, 1,
- 0, 1, 1,
- },
- nil,
- )
-
- // Create a new image and paste the four produced images into it.
- dst := imaging.New(512, 512, color.NRGBA{0, 0, 0, 0})
- dst = imaging.Paste(dst, img1, image.Pt(0, 0))
- dst = imaging.Paste(dst, img2, image.Pt(0, 256))
- dst = imaging.Paste(dst, img3, image.Pt(256, 0))
- dst = imaging.Paste(dst, img4, image.Pt(256, 256))
-
- // Save the resulting image using JPEG format.
- err = imaging.Save(dst, "testdata/out_example.jpg")
- if err != nil {
- log.Fatalf("Save failed: %v", err)
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/helpers.go b/vendor/github.com/disintegration/imaging/helpers.go
index d4e73f120..7193e473c 100644
--- a/vendor/github.com/disintegration/imaging/helpers.go
+++ b/vendor/github.com/disintegration/imaging/helpers.go
@@ -1,15 +1,10 @@
-// Package imaging provides basic image manipulation functions (resize, rotate, flip, crop, etc.).
-// This package is based on the standard Go image package and works best along with it.
-//
-// Image manipulation functions provided by the package take any image type
-// that implements `image.Image` interface as an input, and return a new image of
-// `*image.NRGBA` type (32bit RGBA colors, not premultiplied by alpha).
package imaging
import (
"errors"
"image"
"image/color"
+ "image/draw"
"image/gif"
"image/jpeg"
"image/png"
@@ -56,32 +51,48 @@ var (
ErrUnsupportedFormat = errors.New("imaging: unsupported image format")
)
+type fileSystem interface {
+ Create(string) (io.WriteCloser, error)
+ Open(string) (io.ReadCloser, error)
+}
+
+type localFS struct{}
+
+func (localFS) Create(name string) (io.WriteCloser, error) { return os.Create(name) }
+func (localFS) Open(name string) (io.ReadCloser, error) { return os.Open(name) }
+
+var fs fileSystem = localFS{}
+
// Decode reads an image from r.
func Decode(r io.Reader) (image.Image, error) {
img, _, err := image.Decode(r)
- if err != nil {
- return nil, err
- }
- return toNRGBA(img), nil
+ return img, err
}
// Open loads an image from file
func Open(filename string) (image.Image, error) {
- file, err := os.Open(filename)
+ file, err := fs.Open(filename)
if err != nil {
return nil, err
}
defer file.Close()
- img, err := Decode(file)
- return img, err
+ return Decode(file)
}
type encodeConfig struct {
- jpegQuality int
+ jpegQuality int
+ gifNumColors int
+ gifQuantizer draw.Quantizer
+ gifDrawer draw.Drawer
+ pngCompressionLevel png.CompressionLevel
}
var defaultEncodeConfig = encodeConfig{
- jpegQuality: 95,
+ jpegQuality: 95,
+ gifNumColors: 256,
+ gifQuantizer: nil,
+ gifDrawer: nil,
+ pngCompressionLevel: png.DefaultCompression,
}
// EncodeOption sets an optional parameter for the Encode and Save functions.
@@ -95,6 +106,38 @@ func JPEGQuality(quality int) EncodeOption {
}
}
+// GIFNumColors returns an EncodeOption that sets the maximum number of colors
+// used in the GIF-encoded image. It ranges from 1 to 256. Default is 256.
+func GIFNumColors(numColors int) EncodeOption {
+ return func(c *encodeConfig) {
+ c.gifNumColors = numColors
+ }
+}
+
+// GIFQuantizer returns an EncodeOption that sets the quantizer that is used to produce
+// a palette of the GIF-encoded image.
+func GIFQuantizer(quantizer draw.Quantizer) EncodeOption {
+ return func(c *encodeConfig) {
+ c.gifQuantizer = quantizer
+ }
+}
+
+// GIFDrawer returns an EncodeOption that sets the drawer that is used to convert
+// the source image to the desired palette of the GIF-encoded image.
+func GIFDrawer(drawer draw.Drawer) EncodeOption {
+ return func(c *encodeConfig) {
+ c.gifDrawer = drawer
+ }
+}
+
+// PNGCompressionLevel returns an EncodeOption that sets the compression level
+// of the PNG-encoded image. Default is png.DefaultCompression.
+func PNGCompressionLevel(level png.CompressionLevel) EncodeOption {
+ return func(c *encodeConfig) {
+ c.pngCompressionLevel = level
+ }
+}
+
// Encode writes the image img to w in the specified format (JPEG, PNG, GIF, TIFF or BMP).
func Encode(w io.Writer, img image.Image, format Format, opts ...EncodeOption) error {
cfg := defaultEncodeConfig
@@ -122,13 +165,22 @@ func Encode(w io.Writer, img image.Image, format Format, opts ...EncodeOption) e
}
case PNG:
- err = png.Encode(w, img)
+ enc := png.Encoder{CompressionLevel: cfg.pngCompressionLevel}
+ err = enc.Encode(w, img)
+
case GIF:
- err = gif.Encode(w, img, &gif.Options{NumColors: 256})
+ err = gif.Encode(w, img, &gif.Options{
+ NumColors: cfg.gifNumColors,
+ Quantizer: cfg.gifQuantizer,
+ Drawer: cfg.gifDrawer,
+ })
+
case TIFF:
err = tiff.Encode(w, img, &tiff.Options{Compression: tiff.Deflate, Predictor: true})
+
case BMP:
err = bmp.Encode(w, img)
+
default:
err = ErrUnsupportedFormat
}
@@ -163,11 +215,17 @@ func Save(img image.Image, filename string, opts ...EncodeOption) (err error) {
return ErrUnsupportedFormat
}
- file, err := os.Create(filename)
+ file, err := fs.Create(filename)
if err != nil {
return err
}
- defer file.Close()
+
+ defer func() {
+ cerr := file.Close()
+ if err == nil {
+ err = cerr
+ }
+ }()
return Encode(file, img, f, opts...)
}
@@ -185,16 +243,38 @@ func New(width, height int, fillColor color.Color) *image.NRGBA {
return dst
}
- cs := []uint8{c.R, c.G, c.B, c.A}
-
- // fill the first row
+ // Fill the first row.
+ i := 0
for x := 0; x < width; x++ {
- copy(dst.Pix[x*4:(x+1)*4], cs)
- }
- // copy the first row to other rows
- for y := 1; y < height; y++ {
- copy(dst.Pix[y*dst.Stride:y*dst.Stride+width*4], dst.Pix[0:width*4])
+ dst.Pix[i+0] = c.R
+ dst.Pix[i+1] = c.G
+ dst.Pix[i+2] = c.B
+ dst.Pix[i+3] = c.A
+ i += 4
}
+ // Copy the first row to other rows.
+ size := width * 4
+ parallel(1, height, func(ys <-chan int) {
+ for y := range ys {
+ i = y * dst.Stride
+ copy(dst.Pix[i:i+size], dst.Pix[0:size])
+ }
+ })
+
+ return dst
+}
+
+// Clone returns a copy of the given image.
+func Clone(img image.Image) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
+ size := src.w * 4
+ parallel(0, src.h, func(ys <-chan int) {
+ for y := range ys {
+ i := y * dst.Stride
+ src.scan(0, y, src.w, y+1, dst.Pix[i:i+size])
+ }
+ })
return dst
}
diff --git a/vendor/github.com/disintegration/imaging/helpers_test.go b/vendor/github.com/disintegration/imaging/helpers_test.go
deleted file mode 100644
index c3b87f23c..000000000
--- a/vendor/github.com/disintegration/imaging/helpers_test.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package imaging
-
-import (
- "bytes"
- "image"
- "image/color"
- "testing"
-)
-
-func compareNRGBA(img1, img2 *image.NRGBA, delta int) bool {
- if !img1.Rect.Eq(img2.Rect) {
- return false
- }
-
- if len(img1.Pix) != len(img2.Pix) {
- return false
- }
-
- for i := 0; i < len(img1.Pix); i++ {
- if absint(int(img1.Pix[i])-int(img2.Pix[i])) > delta {
- return false
- }
- }
-
- return true
-}
-
-func TestEncodeDecode(t *testing.T) {
- imgWithAlpha := image.NewNRGBA(image.Rect(0, 0, 3, 3))
- imgWithAlpha.Pix = []uint8{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 244, 245, 246, 247, 248, 249, 250, 252, 252, 253, 254, 255,
- }
-
- imgWithoutAlpha := image.NewNRGBA(image.Rect(0, 0, 3, 3))
- imgWithoutAlpha.Pix = []uint8{
- 0, 1, 2, 255, 4, 5, 6, 255, 8, 9, 10, 255,
- 127, 128, 129, 255, 131, 132, 133, 255, 135, 136, 137, 255,
- 244, 245, 246, 255, 248, 249, 250, 255, 252, 253, 254, 255,
- }
-
- for _, format := range []Format{JPEG, PNG, GIF, BMP, TIFF} {
- img := imgWithoutAlpha
- if format == PNG {
- img = imgWithAlpha
- }
-
- buf := &bytes.Buffer{}
- err := Encode(buf, img, format)
- if err != nil {
- t.Errorf("fail encoding format %s", format)
- continue
- }
-
- img2, err := Decode(buf)
- if err != nil {
- t.Errorf("fail decoding format %s", format)
- continue
- }
- img2cloned := Clone(img2)
-
- delta := 0
- if format == JPEG {
- delta = 3
- } else if format == GIF {
- delta = 16
- }
-
- if !compareNRGBA(img, img2cloned, delta) {
- t.Errorf("test [DecodeEncode %s] failed: %#v %#v", format, img, img2cloned)
- continue
- }
- }
-
- buf := &bytes.Buffer{}
- err := Encode(buf, imgWithAlpha, JPEG)
- if err != nil {
- t.Errorf("failed encoding alpha to JPEG format %s", err)
- }
-
- buf = &bytes.Buffer{}
- err = Encode(buf, imgWithAlpha, Format(100))
- if err != ErrUnsupportedFormat {
- t.Errorf("expected ErrUnsupportedFormat")
- }
-
- buf = bytes.NewBuffer([]byte("bad data"))
- _, err = Decode(buf)
- if err == nil {
- t.Errorf("decoding bad data, expected error")
- }
-}
-
-func TestNew(t *testing.T) {
- td := []struct {
- desc string
- w, h int
- c color.Color
- dstBounds image.Rectangle
- dstPix []uint8
- }{
- {
- "New 1x1 black",
- 1, 1,
- color.NRGBA{0, 0, 0, 0},
- image.Rect(0, 0, 1, 1),
- []uint8{0x00, 0x00, 0x00, 0x00},
- },
- {
- "New 1x2 red",
- 1, 2,
- color.NRGBA{255, 0, 0, 255},
- image.Rect(0, 0, 1, 2),
- []uint8{0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff},
- },
- {
- "New 2x1 white",
- 2, 1,
- color.NRGBA{255, 255, 255, 255},
- image.Rect(0, 0, 2, 1),
- []uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- },
- {
- "New 0x0 white",
- 0, 0,
- color.NRGBA{255, 255, 255, 255},
- image.Rect(0, 0, 0, 0),
- nil,
- },
- }
-
- for _, d := range td {
- got := New(d.w, d.h, d.c)
- want := image.NewNRGBA(d.dstBounds)
- want.Pix = d.dstPix
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestFormats(t *testing.T) {
- formatNames := map[Format]string{
- JPEG: "JPEG",
- PNG: "PNG",
- GIF: "GIF",
- BMP: "BMP",
- TIFF: "TIFF",
- Format(-1): "Unsupported",
- }
- for format, name := range formatNames {
- got := format.String()
- if got != name {
- t.Errorf("test [Format names] failed: got %#v want %#v", got, name)
- continue
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/histogram.go b/vendor/github.com/disintegration/imaging/histogram.go
index 967ee6a25..5bcb001ca 100644
--- a/vendor/github.com/disintegration/imaging/histogram.go
+++ b/vendor/github.com/disintegration/imaging/histogram.go
@@ -2,6 +2,7 @@ package imaging
import (
"image"
+ "sync"
)
// Histogram returns a normalized histogram of an image.
@@ -9,35 +10,42 @@ import (
// Resulting histogram is represented as an array of 256 floats, where
// histogram[i] is a probability of a pixel being of a particular luminance i.
func Histogram(img image.Image) [256]float64 {
- src := toNRGBA(img)
- width := src.Bounds().Max.X
- height := src.Bounds().Max.Y
-
+ var mu sync.Mutex
var histogram [256]float64
var total float64
- if width == 0 || height == 0 {
+ src := newScanner(img)
+ if src.w == 0 || src.h == 0 {
return histogram
}
- for y := 0; y < height; y++ {
- for x := 0; x < width; x++ {
- i := y*src.Stride + x*4
-
- r := src.Pix[i+0]
- g := src.Pix[i+1]
- b := src.Pix[i+2]
-
- y := 0.299*float32(r) + 0.587*float32(g) + 0.114*float32(b)
-
- histogram[int(y+0.5)]++
- total++
+ parallel(0, src.h, func(ys <-chan int) {
+ var tmpHistogram [256]float64
+ var tmpTotal float64
+ scanLine := make([]uint8, src.w*4)
+ for y := range ys {
+ src.scan(0, y, src.w, y+1, scanLine)
+ i := 0
+ for x := 0; x < src.w; x++ {
+ r := scanLine[i+0]
+ g := scanLine[i+1]
+ b := scanLine[i+2]
+ y := 0.299*float32(r) + 0.587*float32(g) + 0.114*float32(b)
+ tmpHistogram[int(y+0.5)]++
+ tmpTotal++
+ i += 4
+ }
}
- }
+ mu.Lock()
+ for i := 0; i < 256; i++ {
+ histogram[i] += tmpHistogram[i]
+ }
+ total += tmpTotal
+ mu.Unlock()
+ })
for i := 0; i < 256; i++ {
histogram[i] = histogram[i] / total
}
-
return histogram
}
diff --git a/vendor/github.com/disintegration/imaging/histogram_test.go b/vendor/github.com/disintegration/imaging/histogram_test.go
deleted file mode 100644
index 10f4c3fef..000000000
--- a/vendor/github.com/disintegration/imaging/histogram_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "testing"
-)
-
-func TestHistogram(t *testing.T) {
- b := image.Rectangle{image.Point{0, 0}, image.Point{2, 2}}
-
- i1 := image.NewRGBA(b)
- i1.Set(0, 0, image.Black)
- i1.Set(1, 0, image.White)
- i1.Set(1, 1, image.White)
- i1.Set(0, 1, color.Gray{123})
-
- h := Histogram(i1)
- if h[0] != 0.25 || h[123] != 0.25 || h[255] != 0.5 {
- t.Errorf("Incorrect histogram for image i1")
- }
-
- i2 := image.NewRGBA(b)
- i2.Set(0, 0, color.Gray{51})
- i2.Set(0, 1, color.Gray{14})
- i2.Set(1, 0, color.Gray{14})
-
- h = Histogram(i2)
- if h[14] != 0.5 || h[51] != 0.25 || h[0] != 0.25 {
- t.Errorf("Incorrect histogram for image i2")
- }
-
- b = image.Rectangle{image.Point{0, 0}, image.Point{0, 0}}
- i3 := image.NewRGBA(b)
- h = Histogram(i3)
- for _, val := range h {
- if val != 0 {
- t.Errorf("Histogram for an empty image should be a zero histogram.")
- return
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/resize.go b/vendor/github.com/disintegration/imaging/resize.go
index cd5bfb5d8..97f498a0a 100644
--- a/vendor/github.com/disintegration/imaging/resize.go
+++ b/vendor/github.com/disintegration/imaging/resize.go
@@ -24,17 +24,17 @@ func precomputeWeights(dstSize, srcSize int, filter ResampleFilter) [][]indexWei
for v := 0; v < dstSize; v++ {
fu := (float64(v)+0.5)*du - 0.5
- startu := int(math.Ceil(fu - ru))
- if startu < 0 {
- startu = 0
+ begin := int(math.Ceil(fu - ru))
+ if begin < 0 {
+ begin = 0
}
- endu := int(math.Floor(fu + ru))
- if endu > srcSize-1 {
- endu = srcSize - 1
+ end := int(math.Floor(fu + ru))
+ if end > srcSize-1 {
+ end = srcSize - 1
}
var sum float64
- for u := startu; u <= endu; u++ {
+ for u := begin; u <= end; u++ {
w := filter.Kernel((float64(u) - fu) / scale)
if w != 0 {
sum += w
@@ -67,7 +67,6 @@ func precomputeWeights(dstSize, srcSize int, filter ResampleFilter) [][]indexWei
//
func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA {
dstW, dstH := width, height
-
if dstW < 0 || dstH < 0 {
return &image.NRGBA{}
}
@@ -75,16 +74,13 @@ func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NR
return &image.NRGBA{}
}
- src := toNRGBA(img)
-
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
-
+ srcW := img.Bounds().Dx()
+ srcH := img.Bounds().Dy()
if srcW <= 0 || srcH <= 0 {
return &image.NRGBA{}
}
- // if new width or height is 0 then preserve aspect ratio, minimum 1px
+ // If new width or height is 0 then preserve aspect ratio, minimum 1px.
if dstW == 0 {
tmpW := float64(dstH) * float64(srcW) / float64(srcH)
dstW = int(math.Max(1.0, math.Floor(tmpW+0.5)))
@@ -94,57 +90,45 @@ func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NR
dstH = int(math.Max(1.0, math.Floor(tmpH+0.5)))
}
- var dst *image.NRGBA
-
- if filter.Support <= 0.0 {
- // nearest-neighbor special case
- dst = resizeNearest(src, dstW, dstH)
-
- } else {
- // two-pass resize
- if srcW != dstW {
- dst = resizeHorizontal(src, dstW, filter)
- } else {
- dst = src
- }
-
- if srcH != dstH {
- dst = resizeVertical(dst, dstH, filter)
- }
+ if filter.Support <= 0 {
+ // Nearest-neighbor special case.
+ return resizeNearest(img, dstW, dstH)
}
- return dst
+ if srcW != dstW && srcH != dstH {
+ return resizeVertical(resizeHorizontal(img, dstW, filter), dstH, filter)
+ }
+ if srcW != dstW {
+ return resizeHorizontal(img, dstW, filter)
+ }
+ if srcH != dstH {
+ return resizeVertical(img, dstH, filter)
+ }
+ return Clone(img)
}
-func resizeHorizontal(src *image.NRGBA, width int, filter ResampleFilter) *image.NRGBA {
- srcBounds := src.Bounds()
- srcW := srcBounds.Max.X
- srcH := srcBounds.Max.Y
-
- dstW := width
- dstH := srcH
-
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- weights := precomputeWeights(dstW, srcW, filter)
-
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
- i0 := dstY * src.Stride
- j0 := dstY * dst.Stride
- for dstX := 0; dstX < dstW; dstX++ {
+func resizeHorizontal(img image.Image, width int, filter ResampleFilter) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, width, src.h))
+ weights := precomputeWeights(width, src.w, filter)
+ parallel(0, src.h, func(ys <-chan int) {
+ scanLine := make([]uint8, src.w*4)
+ for y := range ys {
+ src.scan(0, y, src.w, y+1, scanLine)
+ j0 := y * dst.Stride
+ for x := 0; x < width; x++ {
var r, g, b, a float64
- for _, w := range weights[dstX] {
- i := i0 + w.index*4
- aw := float64(src.Pix[i+3]) * w.weight
- r += float64(src.Pix[i+0]) * aw
- g += float64(src.Pix[i+1]) * aw
- b += float64(src.Pix[i+2]) * aw
+ for _, w := range weights[x] {
+ i := w.index * 4
+ aw := float64(scanLine[i+3]) * w.weight
+ r += float64(scanLine[i+0]) * aw
+ g += float64(scanLine[i+1]) * aw
+ b += float64(scanLine[i+2]) * aw
a += aw
}
if a != 0 {
aInv := 1 / a
- j := j0 + dstX*4
+ j := j0 + x*4
dst.Pix[j+0] = clamp(r * aInv)
dst.Pix[j+1] = clamp(g * aInv)
dst.Pix[j+2] = clamp(b * aInv)
@@ -153,37 +137,30 @@ func resizeHorizontal(src *image.NRGBA, width int, filter ResampleFilter) *image
}
}
})
-
return dst
}
-func resizeVertical(src *image.NRGBA, height int, filter ResampleFilter) *image.NRGBA {
- srcBounds := src.Bounds()
- srcW := srcBounds.Max.X
- srcH := srcBounds.Max.Y
-
- dstW := srcW
- dstH := height
-
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- weights := precomputeWeights(dstH, srcH, filter)
-
- parallel(dstW, func(partStart, partEnd int) {
- for dstX := partStart; dstX < partEnd; dstX++ {
- for dstY := 0; dstY < dstH; dstY++ {
+func resizeVertical(img image.Image, height int, filter ResampleFilter) *image.NRGBA {
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, src.w, height))
+ weights := precomputeWeights(height, src.h, filter)
+ parallel(0, src.w, func(xs <-chan int) {
+ scanLine := make([]uint8, src.h*4)
+ for x := range xs {
+ src.scan(x, 0, x+1, src.h, scanLine)
+ for y := 0; y < height; y++ {
var r, g, b, a float64
- for _, w := range weights[dstY] {
- i := w.index*src.Stride + dstX*4
- aw := float64(src.Pix[i+3]) * w.weight
- r += float64(src.Pix[i+0]) * aw
- g += float64(src.Pix[i+1]) * aw
- b += float64(src.Pix[i+2]) * aw
+ for _, w := range weights[y] {
+ i := w.index * 4
+ aw := float64(scanLine[i+3]) * w.weight
+ r += float64(scanLine[i+0]) * aw
+ g += float64(scanLine[i+1]) * aw
+ b += float64(scanLine[i+2]) * aw
a += aw
}
if a != 0 {
aInv := 1 / a
- j := dstY*dst.Stride + dstX*4
+ j := y*dst.Stride + x*4
dst.Pix[j+0] = clamp(r * aInv)
dst.Pix[j+1] = clamp(g * aInv)
dst.Pix[j+2] = clamp(b * aInv)
@@ -192,45 +169,44 @@ func resizeVertical(src *image.NRGBA, height int, filter ResampleFilter) *image.
}
}
})
-
return dst
}
// resizeNearest is a fast nearest-neighbor resize, no filtering.
-func resizeNearest(src *image.NRGBA, width, height int) *image.NRGBA {
- dstW, dstH := width, height
-
- srcBounds := src.Bounds()
- srcW := srcBounds.Max.X
- srcH := srcBounds.Max.Y
-
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- dx := float64(srcW) / float64(dstW)
- dy := float64(srcH) / float64(dstH)
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- srcY := int((float64(dstY) + 0.5) * dy)
- if srcY > srcH-1 {
- srcY = srcH - 1
+func resizeNearest(img image.Image, width, height int) *image.NRGBA {
+ dst := image.NewNRGBA(image.Rect(0, 0, width, height))
+ dx := float64(img.Bounds().Dx()) / float64(width)
+ dy := float64(img.Bounds().Dy()) / float64(height)
+
+ if dx > 1 && dy > 1 {
+ src := newScanner(img)
+ parallel(0, height, func(ys <-chan int) {
+ for y := range ys {
+ srcY := int((float64(y) + 0.5) * dy)
+ dstOff := y * dst.Stride
+ for x := 0; x < width; x++ {
+ srcX := int((float64(x) + 0.5) * dx)
+ src.scan(srcX, srcY, srcX+1, srcY+1, dst.Pix[dstOff:dstOff+4])
+ dstOff += 4
+ }
}
-
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := int((float64(dstX) + 0.5) * dx)
- if srcX > srcW-1 {
- srcX = srcW - 1
+ })
+ } else {
+ src := toNRGBA(img)
+ parallel(0, height, func(ys <-chan int) {
+ for y := range ys {
+ srcY := int((float64(y) + 0.5) * dy)
+ srcOff0 := srcY * src.Stride
+ dstOff := y * dst.Stride
+ for x := 0; x < width; x++ {
+ srcX := int((float64(x) + 0.5) * dx)
+ srcOff := srcOff0 + srcX*4
+ copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
+ dstOff += 4
}
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
}
- }
-
- })
+ })
+ }
return dst
}
@@ -344,27 +320,28 @@ func Thumbnail(img image.Image, width, height int, filter ResampleFilter) *image
// General filter recommendations:
//
// - Lanczos
-// Probably the best resampling filter for photographic images yielding sharp results,
-// but it's slower than cubic filters (see below).
+// High-quality resampling filter for photographic images yielding sharp results.
+// It's slower than cubic filters (see below).
//
// - CatmullRom
// A sharp cubic filter. It's a good filter for both upscaling and downscaling if sharp results are needed.
//
// - MitchellNetravali
-// A high quality cubic filter that produces smoother results with less ringing than CatmullRom.
+// A high quality cubic filter that produces smoother results with less ringing artifacts than CatmullRom.
//
// - BSpline
// A good filter if a very smooth output is needed.
//
// - Linear
-// Bilinear interpolation filter, produces reasonably good, smooth output. It's faster than cubic filters.
+// Bilinear interpolation filter, produces reasonably good, smooth output.
+// It's faster than cubic filters.
//
// - Box
-// Simple and fast resampling filter appropriate for downscaling.
+// Simple and fast averaging filter appropriate for downscaling.
// When upscaling it's similar to NearestNeighbor.
//
// - NearestNeighbor
-// Fastest resample filter, no antialiasing at all. Rarely used.
+// Fastest resampling filter, no antialiasing.
//
type ResampleFilter struct {
Support float64
@@ -417,14 +394,14 @@ var Welch ResampleFilter
var Cosine ResampleFilter
func bcspline(x, b, c float64) float64 {
+ var y float64
x = math.Abs(x)
if x < 1.0 {
- return ((12-9*b-6*c)*x*x*x + (-18+12*b+6*c)*x*x + (6 - 2*b)) / 6
- }
- if x < 2.0 {
- return ((-b-6*c)*x*x*x + (6*b+30*c)*x*x + (-12*b-48*c)*x + (8*b + 24*c)) / 6
+ y = ((12-9*b-6*c)*x*x*x + (-18+12*b+6*c)*x*x + (6 - 2*b)) / 6
+ } else if x < 2.0 {
+ y = ((-b-6*c)*x*x*x + (6*b+30*c)*x*x + (-12*b-48*c)*x + (8*b + 24*c)) / 6
}
- return 0
+ return y
}
func sinc(x float64) float64 {
diff --git a/vendor/github.com/disintegration/imaging/resize_test.go b/vendor/github.com/disintegration/imaging/resize_test.go
deleted file mode 100644
index 72701e093..000000000
--- a/vendor/github.com/disintegration/imaging/resize_test.go
+++ /dev/null
@@ -1,628 +0,0 @@
-package imaging
-
-import (
- "image"
- "testing"
-)
-
-func TestResize(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- f ResampleFilter
- want *image.NRGBA
- }{
- {
- "Resize 2x2 1x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 1, 1,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x55, 0x55, 0x55, 0xc0},
- },
- },
- {
- "Resize 2x2 2x2 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 2, 2,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- },
- {
- "Resize 3x1 1x1 nearest",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 2, 0),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 1, 1,
- NearestNeighbor,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x00, 0xff, 0x00, 0xff},
- },
- },
- {
- "Resize 2x2 0x4 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 0, 4,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- },
- {
- "Resize 2x2 4x0 linear",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 4, 0,
- Linear,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x40, 0xff, 0x00, 0x00, 0xbf, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0x40, 0x6e, 0x6d, 0x25, 0x70, 0xb0, 0x14, 0x3b, 0xcf, 0xbf, 0x00, 0x40, 0xff,
- 0x00, 0xff, 0x00, 0xbf, 0x14, 0xb0, 0x3b, 0xcf, 0x33, 0x33, 0x99, 0xef, 0x40, 0x00, 0xbf, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xbf, 0x40, 0xff, 0x00, 0x40, 0xbf, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- },
- {
- "Resize 0x0 1x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, -1, -1),
- Stride: 0,
- Pix: []uint8{},
- },
- 1, 1,
- Box,
- &image.NRGBA{},
- },
- {
- "Resize 2x2 0x0 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 0, 0,
- Box,
- &image.NRGBA{},
- },
- {
- "Resize 2x2 -1x0 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- -1, 0,
- Box,
- &image.NRGBA{},
- },
- }
- for _, d := range td {
- got := Resize(d.src, d.w, d.h, d.f)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-
- for i, filter := range []ResampleFilter{
- NearestNeighbor,
- Box,
- Linear,
- Hermite,
- MitchellNetravali,
- CatmullRom,
- BSpline,
- Gaussian,
- Lanczos,
- Hann,
- Hamming,
- Blackman,
- Bartlett,
- Welch,
- Cosine,
- } {
- src := image.NewNRGBA(image.Rect(-1, -1, 2, 3))
- got := Resize(src, 5, 6, filter)
- want := image.NewNRGBA(image.Rect(0, 0, 5, 6))
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [Resize all filters #%d] failed: %#v", i, got)
- }
-
- if filter.Kernel != nil {
- x := filter.Kernel(filter.Support + 0.0001)
- if x != 0 {
- t.Errorf("test [ResampleFilter edge cases #%d] failed: %f", i, x)
- }
- }
- }
-
- bcs2 := bcspline(2, 1, 0)
- if bcs2 != 0 {
- t.Errorf("test [bcspline 2] failed: %f", bcs2)
- }
-}
-
-func TestResizeGolden(t *testing.T) {
- src, err := Open("testdata/lena_512.png")
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- for name, filter := range map[string]ResampleFilter{
- "out_resize_nearest.png": NearestNeighbor,
- "out_resize_linear.png": Linear,
- "out_resize_catrom.png": CatmullRom,
- "out_resize_lanczos.png": Lanczos,
- } {
- got := Resize(src, 128, 0, filter)
- want, err := Open("testdata/" + name)
- if err != nil {
- t.Errorf("Open: %v", err)
- }
- if !compareNRGBA(got, toNRGBA(want), 0) {
- t.Errorf("resulting image differs from golden: %s", name)
- }
- }
-}
-
-func TestFit(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- f ResampleFilter
- want *image.NRGBA
- }{
- {
- "Fit 2x2 1x10 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 1, 10,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x55, 0x55, 0x55, 0xc0},
- },
- },
- {
- "Fit 2x2 10x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 10, 1,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x55, 0x55, 0x55, 0xc0},
- },
- },
- {
- "Fit 2x2 10x10 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 10, 10,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- },
- {
- "Fit 0x0 1x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, -1, -1),
- Stride: 0,
- Pix: []uint8{},
- },
- 1, 1,
- Box,
- &image.NRGBA{},
- },
- {
- "Fit 2x2 0x0 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- 0, 0,
- Box,
- &image.NRGBA{},
- },
- {
- "Fit 2x2 -1x0 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- },
- },
- -1, 0,
- Box,
- &image.NRGBA{},
- },
- }
- for _, d := range td {
- got := Fit(d.src, d.w, d.h, d.f)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestFill(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- a Anchor
- f ResampleFilter
- want *image.NRGBA
- }{
- {
- "Fill 4x4 2x2 Center Nearest",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Center,
- NearestNeighbor,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x14, 0x15, 0x16, 0x17, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x34, 0x35, 0x36, 0x37, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "Fill 4x4 1x4 TopLeft Nearest",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 1, 4,
- TopLeft,
- NearestNeighbor,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 4),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03,
- 0x10, 0x11, 0x12, 0x13,
- 0x20, 0x21, 0x22, 0x23,
- 0x30, 0x31, 0x32, 0x33,
- },
- },
- },
- {
- "Fill 4x4 8x2 Bottom Nearest",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 8, 2,
- Bottom,
- NearestNeighbor,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 8, 2),
- Stride: 8 * 4,
- Pix: []uint8{
- 0x30, 0x31, 0x32, 0x33, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x30, 0x31, 0x32, 0x33, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "Fill 4x4 2x8 Top Nearest",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 8,
- Top,
- NearestNeighbor,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 8),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
- 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
- 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
- 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
- 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
- 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
- 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
- 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
- },
- },
- },
- {
- "Fill 4x4 4x4 TopRight Box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 4, 4,
- TopRight,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "Fill 4x4 0x4 Left Box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 0, 4,
- Left,
- Box,
- &image.NRGBA{},
- },
- {
- "Fill 0x0 4x4 Right Box",
- &image.NRGBA{},
- 4, 4,
- Right,
- Box,
- &image.NRGBA{},
- },
- }
- for _, d := range td {
- got := Fill(d.src, d.w, d.h, d.a, d.f)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestThumbnail(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- f ResampleFilter
- want *image.NRGBA
- }{
- {
- "Thumbnail 6x2 1x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 5, 1),
- Stride: 6 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 1, 1,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x55, 0x55, 0x55, 0xc0},
- },
- },
- {
- "Thumbnail 2x6 1x1 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 5),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 1, 1,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 1),
- Stride: 1 * 4,
- Pix: []uint8{0x55, 0x55, 0x55, 0xc0},
- },
- },
- {
- "Thumbnail 1x3 2x2 box",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 2),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0x00,
- 0xff, 0x00, 0x00, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- },
- },
- 2, 2,
- Box,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Thumbnail(d.src, d.w, d.h, d.f)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func BenchmarkResizeLanczosUp(b *testing.B) {
- benchmarkResize(b, "testdata/lena_128.png", 512, Lanczos)
-}
-
-func BenchmarkResizeLinearUp(b *testing.B) {
- benchmarkResize(b, "testdata/lena_128.png", 512, Linear)
-}
-
-func BenchmarkResizeNearestNeighborUp(b *testing.B) {
- benchmarkResize(b, "testdata/lena_128.png", 512, NearestNeighbor)
-}
-
-func BenchmarkResizeLanczosDown(b *testing.B) {
- benchmarkResize(b, "testdata/lena_512.png", 128, Lanczos)
-}
-
-func BenchmarkResizeLinearDown(b *testing.B) {
- benchmarkResize(b, "testdata/lena_512.png", 128, Linear)
-}
-
-func BenchmarkResizeNearestNeighborDown(b *testing.B) {
- benchmarkResize(b, "testdata/lena_512.png", 128, NearestNeighbor)
-}
-
-func benchmarkResize(b *testing.B, filename string, size int, f ResampleFilter) {
- b.StopTimer()
- img, err := Open(filename)
- if err != nil {
- b.Fatalf("Open: %v", err)
- }
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- Resize(img, size, size, f)
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/scanner.go b/vendor/github.com/disintegration/imaging/scanner.go
new file mode 100644
index 000000000..c4dbfe1ec
--- /dev/null
+++ b/vendor/github.com/disintegration/imaging/scanner.go
@@ -0,0 +1,250 @@
+package imaging
+
+import (
+ "image"
+ "image/color"
+)
+
+type scanner struct {
+ image image.Image
+ w, h int
+ palette []color.NRGBA
+}
+
+func newScanner(img image.Image) *scanner {
+ s := &scanner{
+ image: img,
+ w: img.Bounds().Dx(),
+ h: img.Bounds().Dy(),
+ }
+ if img, ok := img.(*image.Paletted); ok {
+ s.palette = make([]color.NRGBA, len(img.Palette))
+ for i := 0; i < len(img.Palette); i++ {
+ s.palette[i] = color.NRGBAModel.Convert(img.Palette[i]).(color.NRGBA)
+ }
+ }
+ return s
+}
+
+// scan scans the given rectangular region of the image into dst.
+func (s *scanner) scan(x1, y1, x2, y2 int, dst []uint8) {
+ switch img := s.image.(type) {
+ case *image.NRGBA:
+ size := (x2 - x1) * 4
+ j := 0
+ i := y1*img.Stride + x1*4
+ for y := y1; y < y2; y++ {
+ copy(dst[j:j+size], img.Pix[i:i+size])
+ j += size
+ i += img.Stride
+ }
+
+ case *image.NRGBA64:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1*8
+ for x := x1; x < x2; x++ {
+ dst[j+0] = img.Pix[i+0]
+ dst[j+1] = img.Pix[i+2]
+ dst[j+2] = img.Pix[i+4]
+ dst[j+3] = img.Pix[i+6]
+ j += 4
+ i += 8
+ }
+ }
+
+ case *image.RGBA:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1*4
+ for x := x1; x < x2; x++ {
+ a := img.Pix[i+3]
+ switch a {
+ case 0:
+ dst[j+0] = 0
+ dst[j+1] = 0
+ dst[j+2] = 0
+ case 0xff:
+ dst[j+0] = img.Pix[i+0]
+ dst[j+1] = img.Pix[i+1]
+ dst[j+2] = img.Pix[i+2]
+ default:
+ r16 := uint16(img.Pix[i+0])
+ g16 := uint16(img.Pix[i+1])
+ b16 := uint16(img.Pix[i+2])
+ a16 := uint16(a)
+ dst[j+0] = uint8(r16 * 0xff / a16)
+ dst[j+1] = uint8(g16 * 0xff / a16)
+ dst[j+2] = uint8(b16 * 0xff / a16)
+ }
+ dst[j+3] = a
+ j += 4
+ i += 4
+ }
+ }
+
+ case *image.RGBA64:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1*8
+ for x := x1; x < x2; x++ {
+ a := img.Pix[i+6]
+ switch a {
+ case 0:
+ dst[j+0] = 0
+ dst[j+1] = 0
+ dst[j+2] = 0
+ case 0xff:
+ dst[j+0] = img.Pix[i+0]
+ dst[j+1] = img.Pix[i+2]
+ dst[j+2] = img.Pix[i+4]
+ default:
+ r32 := uint32(img.Pix[i+0])<<8 | uint32(img.Pix[i+1])
+ g32 := uint32(img.Pix[i+2])<<8 | uint32(img.Pix[i+3])
+ b32 := uint32(img.Pix[i+4])<<8 | uint32(img.Pix[i+5])
+ a32 := uint32(img.Pix[i+6])<<8 | uint32(img.Pix[i+7])
+ dst[j+0] = uint8((r32 * 0xffff / a32) >> 8)
+ dst[j+1] = uint8((g32 * 0xffff / a32) >> 8)
+ dst[j+2] = uint8((b32 * 0xffff / a32) >> 8)
+ }
+ dst[j+3] = a
+ j += 4
+ i += 8
+ }
+ }
+
+ case *image.Gray:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1
+ for x := x1; x < x2; x++ {
+ c := img.Pix[i]
+ dst[j+0] = c
+ dst[j+1] = c
+ dst[j+2] = c
+ dst[j+3] = 0xff
+ j += 4
+ i++
+ }
+ }
+
+ case *image.Gray16:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1*2
+ for x := x1; x < x2; x++ {
+ c := img.Pix[i]
+ dst[j+0] = c
+ dst[j+1] = c
+ dst[j+2] = c
+ dst[j+3] = 0xff
+ j += 4
+ i += 2
+ }
+ }
+
+ case *image.YCbCr:
+ j := 0
+ x1 += img.Rect.Min.X
+ x2 += img.Rect.Min.X
+ y1 += img.Rect.Min.Y
+ y2 += img.Rect.Min.Y
+ for y := y1; y < y2; y++ {
+ iy := (y-img.Rect.Min.Y)*img.YStride + (x1 - img.Rect.Min.X)
+ for x := x1; x < x2; x++ {
+ var ic int
+ switch img.SubsampleRatio {
+ case image.YCbCrSubsampleRatio444:
+ ic = (y-img.Rect.Min.Y)*img.CStride + (x - img.Rect.Min.X)
+ case image.YCbCrSubsampleRatio422:
+ ic = (y-img.Rect.Min.Y)*img.CStride + (x/2 - img.Rect.Min.X/2)
+ case image.YCbCrSubsampleRatio420:
+ ic = (y/2-img.Rect.Min.Y/2)*img.CStride + (x/2 - img.Rect.Min.X/2)
+ case image.YCbCrSubsampleRatio440:
+ ic = (y/2-img.Rect.Min.Y/2)*img.CStride + (x - img.Rect.Min.X)
+ default:
+ ic = img.COffset(x, y)
+ }
+
+ yy := int(img.Y[iy])
+ cb := int(img.Cb[ic]) - 128
+ cr := int(img.Cr[ic]) - 128
+
+ r := (yy<<16 + 91881*cr + 1<<15) >> 16
+ if r > 0xff {
+ r = 0xff
+ } else if r < 0 {
+ r = 0
+ }
+
+ g := (yy<<16 - 22554*cb - 46802*cr + 1<<15) >> 16
+ if g > 0xff {
+ g = 0xff
+ } else if g < 0 {
+ g = 0
+ }
+
+ b := (yy<<16 + 116130*cb + 1<<15) >> 16
+ if b > 0xff {
+ b = 0xff
+ } else if b < 0 {
+ b = 0
+ }
+
+ dst[j+0] = uint8(r)
+ dst[j+1] = uint8(g)
+ dst[j+2] = uint8(b)
+ dst[j+3] = 0xff
+
+ iy++
+ j += 4
+ }
+ }
+
+ case *image.Paletted:
+ j := 0
+ for y := y1; y < y2; y++ {
+ i := y*img.Stride + x1
+ for x := x1; x < x2; x++ {
+ c := s.palette[img.Pix[i]]
+ dst[j+0] = c.R
+ dst[j+1] = c.G
+ dst[j+2] = c.B
+ dst[j+3] = c.A
+ j += 4
+ i++
+ }
+ }
+
+ default:
+ j := 0
+ b := s.image.Bounds()
+ x1 += b.Min.X
+ x2 += b.Min.X
+ y1 += b.Min.Y
+ y2 += b.Min.Y
+ for y := y1; y < y2; y++ {
+ for x := x1; x < x2; x++ {
+ r16, g16, b16, a16 := s.image.At(x, y).RGBA()
+ switch a16 {
+ case 0xffff:
+ dst[j+0] = uint8(r16 >> 8)
+ dst[j+1] = uint8(g16 >> 8)
+ dst[j+2] = uint8(b16 >> 8)
+ dst[j+3] = 0xff
+ case 0:
+ dst[j+0] = 0
+ dst[j+1] = 0
+ dst[j+2] = 0
+ dst[j+3] = 0
+ default:
+ dst[j+0] = uint8(((r16 * 0xffff) / a16) >> 8)
+ dst[j+1] = uint8(((g16 * 0xffff) / a16) >> 8)
+ dst[j+2] = uint8(((b16 * 0xffff) / a16) >> 8)
+ dst[j+3] = uint8(a16 >> 8)
+ }
+ j += 4
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/disintegration/imaging/testdata/lena_128.png b/vendor/github.com/disintegration/imaging/testdata/lena_128.png
deleted file mode 100644
index 43eb8e7c6..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/lena_128.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/lena_512.png b/vendor/github.com/disintegration/imaging/testdata/lena_512.png
deleted file mode 100644
index 0e0f9e6bc..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/lena_512.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_blur_0.5.png b/vendor/github.com/disintegration/imaging/testdata/out_blur_0.5.png
deleted file mode 100644
index 90d19347e..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_blur_0.5.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_blur_1.5.png b/vendor/github.com/disintegration/imaging/testdata/out_blur_1.5.png
deleted file mode 100644
index 3df019c33..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_blur_1.5.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_brightness_m10.png b/vendor/github.com/disintegration/imaging/testdata/out_brightness_m10.png
deleted file mode 100644
index a59191e9d..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_brightness_m10.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_brightness_p10.png b/vendor/github.com/disintegration/imaging/testdata/out_brightness_p10.png
deleted file mode 100644
index 0b8bb3e10..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_brightness_p10.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_contrast_m10.png b/vendor/github.com/disintegration/imaging/testdata/out_contrast_m10.png
deleted file mode 100644
index 8b8e0b8e0..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_contrast_m10.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_contrast_p10.png b/vendor/github.com/disintegration/imaging/testdata/out_contrast_p10.png
deleted file mode 100644
index dbfd40eea..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_contrast_p10.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_example.jpg b/vendor/github.com/disintegration/imaging/testdata/out_example.jpg
deleted file mode 100644
index 5f225b58f..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_example.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_gamma_0.75.png b/vendor/github.com/disintegration/imaging/testdata/out_gamma_0.75.png
deleted file mode 100644
index 89d28735b..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_gamma_0.75.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_gamma_1.25.png b/vendor/github.com/disintegration/imaging/testdata/out_gamma_1.25.png
deleted file mode 100644
index 915e6d53d..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_gamma_1.25.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_resize_catrom.png b/vendor/github.com/disintegration/imaging/testdata/out_resize_catrom.png
deleted file mode 100644
index 628272f97..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_resize_catrom.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_resize_lanczos.png b/vendor/github.com/disintegration/imaging/testdata/out_resize_lanczos.png
deleted file mode 100644
index 6d168f70e..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_resize_lanczos.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_resize_linear.png b/vendor/github.com/disintegration/imaging/testdata/out_resize_linear.png
deleted file mode 100644
index 0a74e5e5f..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_resize_linear.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_resize_nearest.png b/vendor/github.com/disintegration/imaging/testdata/out_resize_nearest.png
deleted file mode 100644
index 108cb6601..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_resize_nearest.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_sharpen_0.5.png b/vendor/github.com/disintegration/imaging/testdata/out_sharpen_0.5.png
deleted file mode 100644
index 056ba59b2..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_sharpen_0.5.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/testdata/out_sharpen_1.5.png b/vendor/github.com/disintegration/imaging/testdata/out_sharpen_1.5.png
deleted file mode 100644
index a47dc6040..000000000
--- a/vendor/github.com/disintegration/imaging/testdata/out_sharpen_1.5.png
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/disintegration/imaging/tools.go b/vendor/github.com/disintegration/imaging/tools.go
index e57225c58..fae1fa153 100644
--- a/vendor/github.com/disintegration/imaging/tools.go
+++ b/vendor/github.com/disintegration/imaging/tools.go
@@ -58,10 +58,20 @@ func anchorPt(b image.Rectangle, w, h int, anchor Anchor) image.Point {
// Crop cuts out a rectangular region with the specified bounds
// from the image and returns the cropped image.
func Crop(img image.Image, rect image.Rectangle) *image.NRGBA {
- src := toNRGBA(img)
- srcRect := rect.Sub(img.Bounds().Min)
- sub := src.SubImage(srcRect)
- return Clone(sub) // New image Bounds().Min point will be (0, 0)
+ r := rect.Intersect(img.Bounds()).Sub(img.Bounds().Min)
+ if r.Empty() {
+ return &image.NRGBA{}
+ }
+ src := newScanner(img)
+ dst := image.NewNRGBA(image.Rect(0, 0, r.Dx(), r.Dy()))
+ rowSize := r.Dx() * 4
+ parallel(r.Min.Y, r.Max.Y, func(ys <-chan int) {
+ for y := range ys {
+ i := (y - r.Min.Y) * dst.Stride
+ src.scan(r.Min.X, y, r.Max.X, y+1, dst.Pix[i:i+rowSize])
+ }
+ })
+ return dst
}
// CropAnchor cuts out a rectangular region with the specified size
@@ -82,34 +92,25 @@ func CropCenter(img image.Image, width, height int) *image.NRGBA {
// Paste pastes the img image to the background image at the specified position and returns the combined image.
func Paste(background, img image.Image, pos image.Point) *image.NRGBA {
- src := toNRGBA(img)
- dst := Clone(background) // cloned image bounds start at (0, 0)
- startPt := pos.Sub(background.Bounds().Min) // so we should translate start point
- endPt := startPt.Add(src.Bounds().Size())
- pasteBounds := image.Rectangle{startPt, endPt}
-
- if dst.Bounds().Overlaps(pasteBounds) {
- intersectBounds := dst.Bounds().Intersect(pasteBounds)
-
- rowSize := intersectBounds.Dx() * 4
- numRows := intersectBounds.Dy()
-
- srcStartX := intersectBounds.Min.X - pasteBounds.Min.X
- srcStartY := intersectBounds.Min.Y - pasteBounds.Min.Y
-
- i0 := dst.PixOffset(intersectBounds.Min.X, intersectBounds.Min.Y)
- j0 := src.PixOffset(srcStartX, srcStartY)
-
- di := dst.Stride
- dj := src.Stride
-
- for row := 0; row < numRows; row++ {
- copy(dst.Pix[i0:i0+rowSize], src.Pix[j0:j0+rowSize])
- i0 += di
- j0 += dj
- }
+ dst := Clone(background)
+ pos = pos.Sub(background.Bounds().Min)
+ pasteRect := image.Rectangle{Min: pos, Max: pos.Add(img.Bounds().Size())}
+ interRect := pasteRect.Intersect(dst.Bounds())
+ if interRect.Empty() {
+ return dst
}
-
+ src := newScanner(img)
+ parallel(interRect.Min.Y, interRect.Max.Y, func(ys <-chan int) {
+ for y := range ys {
+ x1 := interRect.Min.X - pasteRect.Min.X
+ x2 := interRect.Max.X - pasteRect.Min.X
+ y1 := y - pasteRect.Min.Y
+ y2 := y1 + 1
+ i1 := y*dst.Stride + interRect.Min.X*4
+ i2 := i1 + interRect.Dx()*4
+ src.scan(x1, y1, x2, y2, dst.Pix[i1:i2])
+ }
+ })
return dst
}
@@ -136,49 +137,59 @@ func PasteCenter(background, img image.Image) *image.NRGBA {
//
// Usage examples:
//
-// // draw the sprite over the background at position (50, 50)
+// // Draw spriteImage over backgroundImage at the given position (x=50, y=50).
// dstImage := imaging.Overlay(backgroundImage, spriteImage, image.Pt(50, 50), 1.0)
//
-// // blend two opaque images of the same size
+// // Blend two opaque images of the same size.
// dstImage := imaging.Overlay(imageOne, imageTwo, image.Pt(0, 0), 0.5)
//
func Overlay(background, img image.Image, pos image.Point, opacity float64) *image.NRGBA {
- opacity = math.Min(math.Max(opacity, 0.0), 1.0) // check: 0.0 <= opacity <= 1.0
-
- src := toNRGBA(img)
- dst := Clone(background) // cloned image bounds start at (0, 0)
- startPt := pos.Sub(background.Bounds().Min) // so we should translate start point
- endPt := startPt.Add(src.Bounds().Size())
- pasteBounds := image.Rectangle{startPt, endPt}
-
- if dst.Bounds().Overlaps(pasteBounds) {
- intersectBounds := dst.Bounds().Intersect(pasteBounds)
-
- for y := intersectBounds.Min.Y; y < intersectBounds.Max.Y; y++ {
- for x := intersectBounds.Min.X; x < intersectBounds.Max.X; x++ {
- i := y*dst.Stride + x*4
-
- srcX := x - pasteBounds.Min.X
- srcY := y - pasteBounds.Min.Y
- j := srcY*src.Stride + srcX*4
-
+ opacity = math.Min(math.Max(opacity, 0.0), 1.0) // Ensure 0.0 <= opacity <= 1.0.
+ dst := Clone(background)
+ pos = pos.Sub(background.Bounds().Min)
+ pasteRect := image.Rectangle{Min: pos, Max: pos.Add(img.Bounds().Size())}
+ interRect := pasteRect.Intersect(dst.Bounds())
+ if interRect.Empty() {
+ return dst
+ }
+ src := newScanner(img)
+ parallel(interRect.Min.Y, interRect.Max.Y, func(ys <-chan int) {
+ scanLine := make([]uint8, interRect.Dx()*4)
+ for y := range ys {
+ x1 := interRect.Min.X - pasteRect.Min.X
+ x2 := interRect.Max.X - pasteRect.Min.X
+ y1 := y - pasteRect.Min.Y
+ y2 := y1 + 1
+ src.scan(x1, y1, x2, y2, scanLine)
+ i := y*dst.Stride + interRect.Min.X*4
+ j := 0
+ for x := interRect.Min.X; x < interRect.Max.X; x++ {
+ r1 := float64(dst.Pix[i+0])
+ g1 := float64(dst.Pix[i+1])
+ b1 := float64(dst.Pix[i+2])
a1 := float64(dst.Pix[i+3])
- a2 := float64(src.Pix[j+3])
- coef2 := opacity * a2 / 255.0
- coef1 := (1 - coef2) * a1 / 255.0
+ r2 := float64(scanLine[j+0])
+ g2 := float64(scanLine[j+1])
+ b2 := float64(scanLine[j+2])
+ a2 := float64(scanLine[j+3])
+
+ coef2 := opacity * a2 / 255
+ coef1 := (1 - coef2) * a1 / 255
coefSum := coef1 + coef2
coef1 /= coefSum
coef2 /= coefSum
- dst.Pix[i+0] = uint8(float64(dst.Pix[i+0])*coef1 + float64(src.Pix[j+0])*coef2)
- dst.Pix[i+1] = uint8(float64(dst.Pix[i+1])*coef1 + float64(src.Pix[j+1])*coef2)
- dst.Pix[i+2] = uint8(float64(dst.Pix[i+2])*coef1 + float64(src.Pix[j+2])*coef2)
- dst.Pix[i+3] = uint8(math.Min(a1+a2*opacity*(255.0-a1)/255.0, 255.0))
+ dst.Pix[i+0] = uint8(r1*coef1 + r2*coef2)
+ dst.Pix[i+1] = uint8(g1*coef1 + g2*coef2)
+ dst.Pix[i+2] = uint8(b1*coef1 + b2*coef2)
+ dst.Pix[i+3] = uint8(math.Min(a1+a2*opacity*(255-a1)/255, 255))
+
+ i += 4
+ j += 4
}
}
- }
-
+ })
return dst
}
diff --git a/vendor/github.com/disintegration/imaging/tools_test.go b/vendor/github.com/disintegration/imaging/tools_test.go
deleted file mode 100644
index 83a258c26..000000000
--- a/vendor/github.com/disintegration/imaging/tools_test.go
+++ /dev/null
@@ -1,652 +0,0 @@
-package imaging
-
-import (
- "image"
- "testing"
-)
-
-func TestCrop(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- r image.Rectangle
- want *image.NRGBA
- }{
- {
- "Crop 2x3 2x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- image.Rect(-1, 0, 1, 1),
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- },
- },
- },
- }
- for _, d := range td {
- got := Crop(d.src, d.r)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestCropCenter(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- want *image.NRGBA
- }{
- {
- "CropCenter 2x3 2x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- 2, 1,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- },
- },
- },
- {
- "CropCenter 2x3 0x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- 0, 1,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- },
- {
- "CropCenter 2x3 5x5",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- 5, 5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := CropCenter(d.src, d.w, d.h)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestCropAnchor(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- w, h int
- anchor Anchor
- want *image.NRGBA
- }{
- {
- "CropAnchor 4x4 2x2 TopLeft",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- TopLeft,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 Top",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Top,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
- 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 TopRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- TopRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 Left",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Left,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 Center",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Center,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
- 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 Right",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Right,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 BottomLeft",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- BottomLeft,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 Bottom",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- Bottom,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
- 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
- },
- },
- },
- {
- "CropAnchor 4x4 2x2 BottomRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 2, 2,
- BottomRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "CropAnchor 4x4 0x0 BottomRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 0, 0,
- BottomRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- },
- {
- "CropAnchor 4x4 100x100 BottomRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 100, 100,
- BottomRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "CropAnchor 4x4 1x100 BottomRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 1, 100,
- BottomRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 4),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x0c, 0x0d, 0x0e, 0x0f,
- 0x1c, 0x1d, 0x1e, 0x1f,
- 0x2c, 0x2d, 0x2e, 0x2f,
- 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- },
- {
- "CropAnchor 4x4 0x100 BottomRight",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- },
- },
- 0, 100,
- BottomRight,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- },
- }
- for _, d := range td {
- got := CropAnchor(d.src, d.w, d.h, d.anchor)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestPaste(t *testing.T) {
- td := []struct {
- desc string
- src1 image.Image
- src2 image.Image
- p image.Point
- want *image.NRGBA
- }{
- {
- "Paste 2x3 2x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(1, 1, 3, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- },
- },
- image.Pt(-1, 0),
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Paste(d.src1, d.src2, d.p)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestPasteCenter(t *testing.T) {
- td := []struct {
- desc string
- src1 image.Image
- src2 image.Image
- want *image.NRGBA
- }{
- {
- "PasteCenter 2x3 2x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(1, 1, 3, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := PasteCenter(d.src1, d.src2)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestOverlay(t *testing.T) {
- td := []struct {
- desc string
- src1 image.Image
- src2 image.Image
- p image.Point
- a float64
- want *image.NRGBA
- }{
- {
- "Overlay 2x3 2x1 1.0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0x60, 0x00, 0x90, 0xff, 0xff, 0x00, 0x99, 0x7f,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(1, 1, 3, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x20, 0x40, 0x80, 0x7f, 0xaa, 0xbb, 0xcc, 0xff,
- },
- },
- image.Pt(-1, 0),
- 1.0,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0x40, 0x1f, 0x88, 0xff, 0xaa, 0xbb, 0xcc, 0xff,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Overlay 2x2 2x2 0.5",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x00,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0xff, 0x20, 0x20, 0x20, 0xff,
- },
- },
- image.Pt(-1, -1),
- 0.5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x7f, 0x7f, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x7f, 0x7f, 0x7f, 0xff, 0x20, 0x20, 0x20, 0x7f,
- },
- },
- },
- }
- for _, d := range td {
- got := Overlay(d.src1, d.src2, d.p, d.a)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestOverlayCenter(t *testing.T) {
- td := []struct {
- desc string
- src1 image.Image
- src2 image.Image
- a float64
- want *image.NRGBA
- }{
- {
- "OverlayCenter 2x3 2x1",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0xff,
- 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0xff,
- 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(1, 1, 3, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- },
- },
- 0.5,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0xff,
- 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff,
- 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := OverlayCenter(d.src1, d.src2, 0.5)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/transform.go b/vendor/github.com/disintegration/imaging/transform.go
index 94d72d556..d788d0d42 100644
--- a/vendor/github.com/disintegration/imaging/transform.go
+++ b/vendor/github.com/disintegration/imaging/transform.go
@@ -8,197 +8,124 @@ import (
// FlipH flips the image horizontally (from left to right) and returns the transformed image.
func FlipH(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcW
- dstH := srcH
+ src := newScanner(img)
+ dstW := src.w
+ dstH := src.h
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstW - dstX - 1
- srcY := dstY
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcY := dstY
+ src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
+ reverse(dst.Pix[i : i+rowSize])
}
-
})
-
return dst
}
// FlipV flips the image vertically (from top to bottom) and returns the transformed image.
func FlipV(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcW
- dstH := srcH
+ src := newScanner(img)
+ dstW := src.w
+ dstH := src.h
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstX
- srcY := dstH - dstY - 1
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcY := dstH - dstY - 1
+ src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
}
-
})
-
return dst
}
// Transpose flips the image horizontally and rotates 90 degrees counter-clockwise.
func Transpose(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcH
- dstH := srcW
+ src := newScanner(img)
+ dstW := src.h
+ dstH := src.w
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstY
- srcY := dstX
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcX := dstY
+ src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
}
-
})
-
return dst
}
// Transverse flips the image vertically and rotates 90 degrees counter-clockwise.
func Transverse(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcH
- dstH := srcW
+ src := newScanner(img)
+ dstW := src.h
+ dstH := src.w
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstH - dstY - 1
- srcY := dstW - dstX - 1
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcX := dstH - dstY - 1
+ src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
+ reverse(dst.Pix[i : i+rowSize])
}
-
})
-
return dst
}
-// Rotate90 rotates the image 90 degrees counterclockwise and returns the transformed image.
+// Rotate90 rotates the image 90 degrees counter-clockwise and returns the transformed image.
func Rotate90(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcH
- dstH := srcW
+ src := newScanner(img)
+ dstW := src.h
+ dstH := src.w
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstH - dstY - 1
- srcY := dstX
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcX := dstH - dstY - 1
+ src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
}
-
})
-
return dst
}
-// Rotate180 rotates the image 180 degrees counterclockwise and returns the transformed image.
+// Rotate180 rotates the image 180 degrees counter-clockwise and returns the transformed image.
func Rotate180(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcW
- dstH := srcH
+ src := newScanner(img)
+ dstW := src.w
+ dstH := src.h
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstW - dstX - 1
- srcY := dstH - dstY - 1
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcY := dstH - dstY - 1
+ src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
+ reverse(dst.Pix[i : i+rowSize])
}
-
})
-
return dst
}
-// Rotate270 rotates the image 270 degrees counterclockwise and returns the transformed image.
+// Rotate270 rotates the image 270 degrees counter-clockwise and returns the transformed image.
func Rotate270(img image.Image) *image.NRGBA {
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW := srcH
- dstH := srcW
+ src := newScanner(img)
+ dstW := src.h
+ dstH := src.w
+ rowSize := dstW * 4
dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- parallel(dstH, func(partStart, partEnd int) {
-
- for dstY := partStart; dstY < partEnd; dstY++ {
- for dstX := 0; dstX < dstW; dstX++ {
- srcX := dstY
- srcY := dstW - dstX - 1
-
- srcOff := srcY*src.Stride + srcX*4
- dstOff := dstY*dst.Stride + dstX*4
-
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- }
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
+ i := dstY * dst.Stride
+ srcX := dstY
+ src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
+ reverse(dst.Pix[i : i+rowSize])
}
-
})
-
return dst
}
@@ -237,8 +164,8 @@ func Rotate(img image.Image, angle float64, bgColor color.Color) *image.NRGBA {
bgColorNRGBA := color.NRGBAModel.Convert(bgColor).(color.NRGBA)
sin, cos := math.Sincos(math.Pi * angle / 180)
- parallel(dstH, func(partStart, partEnd int) {
- for dstY := partStart; dstY < partEnd; dstY++ {
+ parallel(0, dstH, func(ys <-chan int) {
+ for dstY := range ys {
for dstX := 0; dstX < dstW; dstX++ {
xf, yf := rotatePoint(float64(dstX)-dstXOff, float64(dstY)-dstYOff, sin, cos)
xf, yf = xf+srcXOff, yf+srcYOff
diff --git a/vendor/github.com/disintegration/imaging/transform_test.go b/vendor/github.com/disintegration/imaging/transform_test.go
deleted file mode 100644
index 447dd1ea0..000000000
--- a/vendor/github.com/disintegration/imaging/transform_test.go
+++ /dev/null
@@ -1,581 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "testing"
-)
-
-func TestFlipH(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "FlipH 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22, 0x33,
- 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00,
- },
- },
- },
- }
- for _, d := range td {
- got := FlipH(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestFlipV(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "FlipV 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := FlipV(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestTranspose(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Transpose 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- 0xcc, 0xdd, 0xee, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Transpose(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestTransverse(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Transverse 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xcc, 0xdd, 0xee, 0xff,
- 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x11, 0x22, 0x33,
- },
- },
- },
- }
- for _, d := range td {
- got := Transverse(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestRotate90(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Rotate90 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0xcc, 0xdd, 0xee, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x11, 0x22, 0x33, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- },
- },
- },
- }
- for _, d := range td {
- got := Rotate90(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestRotate180(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Rotate180 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 3),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
- 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22, 0x33,
- },
- },
- },
- }
- for _, d := range td {
- got := Rotate180(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestRotate270(t *testing.T) {
- td := []struct {
- desc string
- src image.Image
- want *image.NRGBA
- }{
- {
- "Rotate270 2x3",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 1, 2),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0x11, 0x22, 0x33, 0xcc, 0xdd, 0xee, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
- },
- &image.NRGBA{
- Rect: image.Rect(0, 0, 3, 2),
- Stride: 3 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x11, 0x22, 0x33,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xcc, 0xdd, 0xee, 0xff,
- },
- },
- },
- }
- for _, d := range td {
- got := Rotate270(d.src)
- want := d.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", d.desc, got)
- }
- }
-}
-
-func TestRotate(t *testing.T) {
- testCases := []struct {
- desc string
- src image.Image
- angle float64
- bg color.Color
- want *image.NRGBA
- }{
- {
- "Rotate 0",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 0,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "Rotate 90",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 90,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- },
- {
- "Rotate 180",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 180,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 4, 4),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 45",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 3, 3),
- Stride: 4 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- },
- 45,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 6, 6),
- Stride: 6 * 4,
- Pix: []uint8{
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x61, 0x00, 0x00, 0xff, 0x58, 0x08, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x61, 0x00, 0x00, 0xff, 0xe9, 0x16, 0x00, 0xff, 0x35, 0xca, 0x00, 0xff, 0x00, 0x30, 0x30, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x61, 0x00, 0x00, 0xff, 0xe9, 0x16, 0x00, 0xff, 0x35, 0xca, 0x00, 0xff, 0x00, 0x80, 0x80, 0xff, 0x35, 0x35, 0xff, 0xff, 0x58, 0x58, 0x61, 0xff,
- 0x58, 0x08, 0x00, 0xff, 0x35, 0xca, 0x00, 0xff, 0x00, 0x80, 0x80, 0xff, 0x35, 0x35, 0xff, 0xff, 0xe9, 0xe9, 0xff, 0xff, 0x61, 0x61, 0x61, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x30, 0x30, 0xff, 0x35, 0x35, 0xff, 0xff, 0xe9, 0xe9, 0xff, 0xff, 0x61, 0x61, 0x61, 0xff, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x58, 0x58, 0x61, 0xff, 0x61, 0x61, 0x61, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 0x0",
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- 123,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 0, 0),
- Stride: 0,
- Pix: []uint8{},
- },
- },
- {
- "Rotate -90",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- -90,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate -360*10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- -360 * 10,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate -360*10 + 90",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- -360*10 + 90,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate -360*10 + 180",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- -360*10 + 180,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate -360*10 + 270",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- -360*10 + 270,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 360*10",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- 360 * 10,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 360*10 + 90",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- 360*10 + 90,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 360*10 + 180",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- 360*10 + 180,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 1, 2),
- Stride: 1 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- {
- "Rotate 360*10 + 270",
- &image.NRGBA{
- Rect: image.Rect(-1, -1, 0, 1),
- Stride: 1 * 4,
- Pix: []uint8{
- 0xff, 0x00, 0x00, 0xff,
- 0x00, 0xff, 0x00, 0xff,
- },
- },
- 360*10 + 270,
- color.Black,
- &image.NRGBA{
- Rect: image.Rect(0, 0, 2, 1),
- Stride: 2 * 4,
- Pix: []uint8{
- 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
- },
- },
- },
- }
- for _, test := range testCases {
- got := Rotate(test.src, test.angle, test.bg)
- want := test.want
- if !compareNRGBA(got, want, 0) {
- t.Errorf("test [%s] failed: %#v", test.desc, got)
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/utils.go b/vendor/github.com/disintegration/imaging/utils.go
index 9f5926aaa..3b6ad2e49 100644
--- a/vendor/github.com/disintegration/imaging/utils.go
+++ b/vendor/github.com/disintegration/imaging/utils.go
@@ -1,53 +1,38 @@
package imaging
import (
+ "image"
"runtime"
"sync"
- "sync/atomic"
)
-// parallel starts parallel image processing based on the current GOMAXPROCS value.
-// If GOMAXPROCS = 1 it uses no parallelization.
-// If GOMAXPROCS > 1 it spawns N=GOMAXPROCS workers in separate goroutines.
-func parallel(dataSize int, fn func(partStart, partEnd int)) {
- numGoroutines := 1
- partSize := dataSize
-
- numProcs := runtime.GOMAXPROCS(0)
- if numProcs > 1 {
- numGoroutines = numProcs
- partSize = dataSize / (numGoroutines * 10)
- if partSize < 1 {
- partSize = 1
- }
+// parallel processes the data in separate goroutines.
+func parallel(start, stop int, fn func(<-chan int)) {
+ count := stop - start
+ if count < 1 {
+ return
}
- if numGoroutines == 1 {
- fn(0, dataSize)
- } else {
- var wg sync.WaitGroup
- wg.Add(numGoroutines)
- idx := uint64(0)
+ procs := runtime.GOMAXPROCS(0)
+ if procs > count {
+ procs = count
+ }
- for p := 0; p < numGoroutines; p++ {
- go func() {
- defer wg.Done()
- for {
- partStart := int(atomic.AddUint64(&idx, uint64(partSize))) - partSize
- if partStart >= dataSize {
- break
- }
- partEnd := partStart + partSize
- if partEnd > dataSize {
- partEnd = dataSize
- }
- fn(partStart, partEnd)
- }
- }()
- }
+ c := make(chan int, count)
+ for i := start; i < stop; i++ {
+ c <- i
+ }
+ close(c)
- wg.Wait()
+ var wg sync.WaitGroup
+ for i := 0; i < procs; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ fn(c)
+ }()
}
+ wg.Wait()
}
// absint returns the absolute value of i.
@@ -69,3 +54,30 @@ func clamp(x float64) uint8 {
}
return 0
}
+
+func reverse(pix []uint8) {
+ if len(pix) <= 4 {
+ return
+ }
+ i := 0
+ j := len(pix) - 4
+ for i < j {
+ pix[i+0], pix[j+0] = pix[j+0], pix[i+0]
+ pix[i+1], pix[j+1] = pix[j+1], pix[i+1]
+ pix[i+2], pix[j+2] = pix[j+2], pix[i+2]
+ pix[i+3], pix[j+3] = pix[j+3], pix[i+3]
+ i += 4
+ j -= 4
+ }
+}
+
+func toNRGBA(img image.Image) *image.NRGBA {
+ if img, ok := img.(*image.NRGBA); ok {
+ return &image.NRGBA{
+ Pix: img.Pix,
+ Stride: img.Stride,
+ Rect: img.Rect.Sub(img.Rect.Min),
+ }
+ }
+ return Clone(img)
+}
diff --git a/vendor/github.com/disintegration/imaging/utils_test.go b/vendor/github.com/disintegration/imaging/utils_test.go
deleted file mode 100644
index 44cc75102..000000000
--- a/vendor/github.com/disintegration/imaging/utils_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package imaging
-
-import (
- "runtime"
- "testing"
-)
-
-func testParallelN(enabled bool, n, procs int) bool {
- data := make([]bool, n)
- before := runtime.GOMAXPROCS(0)
- runtime.GOMAXPROCS(procs)
- parallel(n, func(start, end int) {
- for i := start; i < end; i++ {
- data[i] = true
- }
- })
- for i := 0; i < n; i++ {
- if !data[i] {
- return false
- }
- }
- runtime.GOMAXPROCS(before)
- return true
-}
-
-func TestParallel(t *testing.T) {
- for _, e := range []bool{true, false} {
- for _, n := range []int{1, 10, 100, 1000} {
- for _, p := range []int{1, 2, 4, 8, 16, 100} {
- if !testParallelN(e, n, p) {
- t.Errorf("test [parallel %v %d %d] failed", e, n, p)
- }
- }
- }
- }
-}
-
-func TestClamp(t *testing.T) {
- td := []struct {
- f float64
- u uint8
- }{
- {0, 0},
- {255, 255},
- {128, 128},
- {0.49, 0},
- {0.50, 1},
- {254.9, 255},
- {254.0, 254},
- {256, 255},
- {2500, 255},
- {-10, 0},
- {127.6, 128},
- }
-
- for _, d := range td {
- if clamp(d.f) != d.u {
- t.Errorf("test [clamp %v %v] failed: %v", d.f, d.u, clamp(d.f))
- }
- }
-}
diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml
new file mode 100644
index 000000000..ba95cdd15
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/.travis.yml
@@ -0,0 +1,21 @@
+sudo: false
+language: go
+go:
+ - 1.3.x
+ - 1.5.x
+ - 1.6.x
+ - 1.7.x
+ - 1.8.x
+ - 1.9.x
+ - master
+matrix:
+ allow_failures:
+ - go: master
+ fast_finish: true
+install:
+ - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
+script:
+ - go get -t -v ./...
+ - diff -u <(echo -n) <(gofmt -d -s .)
+ - go tool vet .
+ - go test -v -race ./...
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE
index 44d4d9d5a..8d9a94a90 100644
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/LICENSE
+++ b/vendor/github.com/dustin/go-humanize/LICENSE
@@ -1,7 +1,4 @@
-The MIT License
-
-Copyright (c) 2014 Stretchr, Inc.
-Copyright (c) 2017-2018 objx contributors
+Copyright (c) 2005-2008 Dustin Sallings <dustin@spy.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -10,8 +7,8 @@ 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 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,
@@ -20,3 +17,5 @@ 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.
+
+<http://www.opensource.org/licenses/mit-license.php>
diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown
new file mode 100644
index 000000000..91b4ae564
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/README.markdown
@@ -0,0 +1,124 @@
+# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize)
+
+Just a few functions for helping humanize times and sizes.
+
+`go get` it as `github.com/dustin/go-humanize`, import it as
+`"github.com/dustin/go-humanize"`, use it as `humanize`.
+
+See [godoc](https://godoc.org/github.com/dustin/go-humanize) for
+complete documentation.
+
+## Sizes
+
+This lets you take numbers like `82854982` and convert them to useful
+strings like, `83 MB` or `79 MiB` (whichever you prefer).
+
+Example:
+
+```go
+fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB.
+```
+
+## Times
+
+This lets you take a `time.Time` and spit it out in relative terms.
+For example, `12 seconds ago` or `3 days from now`.
+
+Example:
+
+```go
+fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago.
+```
+
+Thanks to Kyle Lemons for the time implementation from an IRC
+conversation one day. It's pretty neat.
+
+## Ordinals
+
+From a [mailing list discussion][odisc] where a user wanted to be able
+to label ordinals.
+
+ 0 -> 0th
+ 1 -> 1st
+ 2 -> 2nd
+ 3 -> 3rd
+ 4 -> 4th
+ [...]
+
+Example:
+
+```go
+fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend.
+```
+
+## Commas
+
+Want to shove commas into numbers? Be my guest.
+
+ 0 -> 0
+ 100 -> 100
+ 1000 -> 1,000
+ 1000000000 -> 1,000,000,000
+ -100000 -> -100,000
+
+Example:
+
+```go
+fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491.
+```
+
+## Ftoa
+
+Nicer float64 formatter that removes trailing zeros.
+
+```go
+fmt.Printf("%f", 2.24) // 2.240000
+fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
+fmt.Printf("%f", 2.0) // 2.000000
+fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
+```
+
+## SI notation
+
+Format numbers with [SI notation][sinotation].
+
+Example:
+
+```go
+humanize.SI(0.00000000223, "M") // 2.23 nM
+```
+
+## English-specific functions
+
+The following functions are in the `humanize/english` subpackage.
+
+### Plurals
+
+Simple English pluralization
+
+```go
+english.PluralWord(1, "object", "") // object
+english.PluralWord(42, "object", "") // objects
+english.PluralWord(2, "bus", "") // buses
+english.PluralWord(99, "locus", "loci") // loci
+
+english.Plural(1, "object", "") // 1 object
+english.Plural(42, "object", "") // 42 objects
+english.Plural(2, "bus", "") // 2 buses
+english.Plural(99, "locus", "loci") // 99 loci
+```
+
+### Word series
+
+Format comma-separated words lists with conjuctions:
+
+```go
+english.WordSeries([]string{"foo"}, "and") // foo
+english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar
+english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz
+
+english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz
+```
+
+[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
+[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix
diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go
new file mode 100644
index 000000000..f49dc337d
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/big.go
@@ -0,0 +1,31 @@
+package humanize
+
+import (
+ "math/big"
+)
+
+// order of magnitude (to a max order)
+func oomm(n, b *big.Int, maxmag int) (float64, int) {
+ mag := 0
+ m := &big.Int{}
+ for n.Cmp(b) >= 0 {
+ n.DivMod(n, b, m)
+ mag++
+ if mag == maxmag && maxmag >= 0 {
+ break
+ }
+ }
+ return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
+}
+
+// total order of magnitude
+// (same as above, but with no upper limit)
+func oom(n, b *big.Int) (float64, int) {
+ mag := 0
+ m := &big.Int{}
+ for n.Cmp(b) >= 0 {
+ n.DivMod(n, b, m)
+ mag++
+ }
+ return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
+}
diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go
new file mode 100644
index 000000000..1a2bf6172
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/bigbytes.go
@@ -0,0 +1,173 @@
+package humanize
+
+import (
+ "fmt"
+ "math/big"
+ "strings"
+ "unicode"
+)
+
+var (
+ bigIECExp = big.NewInt(1024)
+
+ // BigByte is one byte in bit.Ints
+ BigByte = big.NewInt(1)
+ // BigKiByte is 1,024 bytes in bit.Ints
+ BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp)
+ // BigMiByte is 1,024 k bytes in bit.Ints
+ BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp)
+ // BigGiByte is 1,024 m bytes in bit.Ints
+ BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp)
+ // BigTiByte is 1,024 g bytes in bit.Ints
+ BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp)
+ // BigPiByte is 1,024 t bytes in bit.Ints
+ BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp)
+ // BigEiByte is 1,024 p bytes in bit.Ints
+ BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp)
+ // BigZiByte is 1,024 e bytes in bit.Ints
+ BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp)
+ // BigYiByte is 1,024 z bytes in bit.Ints
+ BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp)
+)
+
+var (
+ bigSIExp = big.NewInt(1000)
+
+ // BigSIByte is one SI byte in big.Ints
+ BigSIByte = big.NewInt(1)
+ // BigKByte is 1,000 SI bytes in big.Ints
+ BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp)
+ // BigMByte is 1,000 SI k bytes in big.Ints
+ BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp)
+ // BigGByte is 1,000 SI m bytes in big.Ints
+ BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp)
+ // BigTByte is 1,000 SI g bytes in big.Ints
+ BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp)
+ // BigPByte is 1,000 SI t bytes in big.Ints
+ BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp)
+ // BigEByte is 1,000 SI p bytes in big.Ints
+ BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp)
+ // BigZByte is 1,000 SI e bytes in big.Ints
+ BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp)
+ // BigYByte is 1,000 SI z bytes in big.Ints
+ BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp)
+)
+
+var bigBytesSizeTable = map[string]*big.Int{
+ "b": BigByte,
+ "kib": BigKiByte,
+ "kb": BigKByte,
+ "mib": BigMiByte,
+ "mb": BigMByte,
+ "gib": BigGiByte,
+ "gb": BigGByte,
+ "tib": BigTiByte,
+ "tb": BigTByte,
+ "pib": BigPiByte,
+ "pb": BigPByte,
+ "eib": BigEiByte,
+ "eb": BigEByte,
+ "zib": BigZiByte,
+ "zb": BigZByte,
+ "yib": BigYiByte,
+ "yb": BigYByte,
+ // Without suffix
+ "": BigByte,
+ "ki": BigKiByte,
+ "k": BigKByte,
+ "mi": BigMiByte,
+ "m": BigMByte,
+ "gi": BigGiByte,
+ "g": BigGByte,
+ "ti": BigTiByte,
+ "t": BigTByte,
+ "pi": BigPiByte,
+ "p": BigPByte,
+ "ei": BigEiByte,
+ "e": BigEByte,
+ "z": BigZByte,
+ "zi": BigZiByte,
+ "y": BigYByte,
+ "yi": BigYiByte,
+}
+
+var ten = big.NewInt(10)
+
+func humanateBigBytes(s, base *big.Int, sizes []string) string {
+ if s.Cmp(ten) < 0 {
+ return fmt.Sprintf("%d B", s)
+ }
+ c := (&big.Int{}).Set(s)
+ val, mag := oomm(c, base, len(sizes)-1)
+ suffix := sizes[mag]
+ f := "%.0f %s"
+ if val < 10 {
+ f = "%.1f %s"
+ }
+
+ return fmt.Sprintf(f, val, suffix)
+
+}
+
+// BigBytes produces a human readable representation of an SI size.
+//
+// See also: ParseBigBytes.
+//
+// BigBytes(82854982) -> 83 MB
+func BigBytes(s *big.Int) string {
+ sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
+ return humanateBigBytes(s, bigSIExp, sizes)
+}
+
+// BigIBytes produces a human readable representation of an IEC size.
+//
+// See also: ParseBigBytes.
+//
+// BigIBytes(82854982) -> 79 MiB
+func BigIBytes(s *big.Int) string {
+ sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}
+ return humanateBigBytes(s, bigIECExp, sizes)
+}
+
+// ParseBigBytes parses a string representation of bytes into the number
+// of bytes it represents.
+//
+// See also: BigBytes, BigIBytes.
+//
+// ParseBigBytes("42 MB") -> 42000000, nil
+// ParseBigBytes("42 mib") -> 44040192, nil
+func ParseBigBytes(s string) (*big.Int, error) {
+ lastDigit := 0
+ hasComma := false
+ for _, r := range s {
+ if !(unicode.IsDigit(r) || r == '.' || r == ',') {
+ break
+ }
+ if r == ',' {
+ hasComma = true
+ }
+ lastDigit++
+ }
+
+ num := s[:lastDigit]
+ if hasComma {
+ num = strings.Replace(num, ",", "", -1)
+ }
+
+ val := &big.Rat{}
+ _, err := fmt.Sscanf(num, "%f", val)
+ if err != nil {
+ return nil, err
+ }
+
+ extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
+ if m, ok := bigBytesSizeTable[extra]; ok {
+ mv := (&big.Rat{}).SetInt(m)
+ val.Mul(val, mv)
+ rv := &big.Int{}
+ rv.Div(val.Num(), val.Denom())
+ return rv, nil
+ }
+
+ return nil, fmt.Errorf("unhandled size name: %v", extra)
+}
diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go
new file mode 100644
index 000000000..0b498f488
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/bytes.go
@@ -0,0 +1,143 @@
+package humanize
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+ "strings"
+ "unicode"
+)
+
+// IEC Sizes.
+// kibis of bits
+const (
+ Byte = 1 << (iota * 10)
+ KiByte
+ MiByte
+ GiByte
+ TiByte
+ PiByte
+ EiByte
+)
+
+// SI Sizes.
+const (
+ IByte = 1
+ KByte = IByte * 1000
+ MByte = KByte * 1000
+ GByte = MByte * 1000
+ TByte = GByte * 1000
+ PByte = TByte * 1000
+ EByte = PByte * 1000
+)
+
+var bytesSizeTable = map[string]uint64{
+ "b": Byte,
+ "kib": KiByte,
+ "kb": KByte,
+ "mib": MiByte,
+ "mb": MByte,
+ "gib": GiByte,
+ "gb": GByte,
+ "tib": TiByte,
+ "tb": TByte,
+ "pib": PiByte,
+ "pb": PByte,
+ "eib": EiByte,
+ "eb": EByte,
+ // Without suffix
+ "": Byte,
+ "ki": KiByte,
+ "k": KByte,
+ "mi": MiByte,
+ "m": MByte,
+ "gi": GiByte,
+ "g": GByte,
+ "ti": TiByte,
+ "t": TByte,
+ "pi": PiByte,
+ "p": PByte,
+ "ei": EiByte,
+ "e": EByte,
+}
+
+func logn(n, b float64) float64 {
+ return math.Log(n) / math.Log(b)
+}
+
+func humanateBytes(s uint64, base float64, sizes []string) string {
+ if s < 10 {
+ return fmt.Sprintf("%d B", s)
+ }
+ e := math.Floor(logn(float64(s), base))
+ suffix := sizes[int(e)]
+ val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10
+ f := "%.0f %s"
+ if val < 10 {
+ f = "%.1f %s"
+ }
+
+ return fmt.Sprintf(f, val, suffix)
+}
+
+// Bytes produces a human readable representation of an SI size.
+//
+// See also: ParseBytes.
+//
+// Bytes(82854982) -> 83 MB
+func Bytes(s uint64) string {
+ sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"}
+ return humanateBytes(s, 1000, sizes)
+}
+
+// IBytes produces a human readable representation of an IEC size.
+//
+// See also: ParseBytes.
+//
+// IBytes(82854982) -> 79 MiB
+func IBytes(s uint64) string {
+ sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}
+ return humanateBytes(s, 1024, sizes)
+}
+
+// ParseBytes parses a string representation of bytes into the number
+// of bytes it represents.
+//
+// See Also: Bytes, IBytes.
+//
+// ParseBytes("42 MB") -> 42000000, nil
+// ParseBytes("42 mib") -> 44040192, nil
+func ParseBytes(s string) (uint64, error) {
+ lastDigit := 0
+ hasComma := false
+ for _, r := range s {
+ if !(unicode.IsDigit(r) || r == '.' || r == ',') {
+ break
+ }
+ if r == ',' {
+ hasComma = true
+ }
+ lastDigit++
+ }
+
+ num := s[:lastDigit]
+ if hasComma {
+ num = strings.Replace(num, ",", "", -1)
+ }
+
+ f, err := strconv.ParseFloat(num, 64)
+ if err != nil {
+ return 0, err
+ }
+
+ extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
+ if m, ok := bytesSizeTable[extra]; ok {
+ f *= float64(m)
+ if f >= math.MaxUint64 {
+ return 0, fmt.Errorf("too large: %v", s)
+ }
+ return uint64(f), nil
+ }
+
+ return 0, fmt.Errorf("unhandled size name: %v", extra)
+}
diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go
new file mode 100644
index 000000000..13611aaab
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/comma.go
@@ -0,0 +1,108 @@
+package humanize
+
+import (
+ "bytes"
+ "math"
+ "math/big"
+ "strconv"
+ "strings"
+)
+
+// Comma produces a string form of the given number in base 10 with
+// commas after every three orders of magnitude.
+//
+// e.g. Comma(834142) -> 834,142
+func Comma(v int64) string {
+ sign := ""
+
+ // Min int64 can't be negated to a usable value, so it has to be special cased.
+ if v == math.MinInt64 {
+ return "-9,223,372,036,854,775,808"
+ }
+
+ if v < 0 {
+ sign = "-"
+ v = 0 - v
+ }
+
+ parts := []string{"", "", "", "", "", "", ""}
+ j := len(parts) - 1
+
+ for v > 999 {
+ parts[j] = strconv.FormatInt(v%1000, 10)
+ switch len(parts[j]) {
+ case 2:
+ parts[j] = "0" + parts[j]
+ case 1:
+ parts[j] = "00" + parts[j]
+ }
+ v = v / 1000
+ j--
+ }
+ parts[j] = strconv.Itoa(int(v))
+ return sign + strings.Join(parts[j:], ",")
+}
+
+// Commaf produces a string form of the given number in base 10 with
+// commas after every three orders of magnitude.
+//
+// e.g. Commaf(834142.32) -> 834,142.32
+func Commaf(v float64) string {
+ buf := &bytes.Buffer{}
+ if v < 0 {
+ buf.Write([]byte{'-'})
+ v = 0 - v
+ }
+
+ comma := []byte{','}
+
+ parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".")
+ pos := 0
+ if len(parts[0])%3 != 0 {
+ pos += len(parts[0]) % 3
+ buf.WriteString(parts[0][:pos])
+ buf.Write(comma)
+ }
+ for ; pos < len(parts[0]); pos += 3 {
+ buf.WriteString(parts[0][pos : pos+3])
+ buf.Write(comma)
+ }
+ buf.Truncate(buf.Len() - 1)
+
+ if len(parts) > 1 {
+ buf.Write([]byte{'.'})
+ buf.WriteString(parts[1])
+ }
+ return buf.String()
+}
+
+// BigComma produces a string form of the given big.Int in base 10
+// with commas after every three orders of magnitude.
+func BigComma(b *big.Int) string {
+ sign := ""
+ if b.Sign() < 0 {
+ sign = "-"
+ b.Abs(b)
+ }
+
+ athousand := big.NewInt(1000)
+ c := (&big.Int{}).Set(b)
+ _, m := oom(c, athousand)
+ parts := make([]string, m+1)
+ j := len(parts) - 1
+
+ mod := &big.Int{}
+ for b.Cmp(athousand) >= 0 {
+ b.DivMod(b, athousand, mod)
+ parts[j] = strconv.FormatInt(mod.Int64(), 10)
+ switch len(parts[j]) {
+ case 2:
+ parts[j] = "0" + parts[j]
+ case 1:
+ parts[j] = "00" + parts[j]
+ }
+ j--
+ }
+ parts[j] = strconv.Itoa(int(b.Int64()))
+ return sign + strings.Join(parts[j:], ",")
+}
diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go
new file mode 100644
index 000000000..620690dec
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/commaf.go
@@ -0,0 +1,40 @@
+// +build go1.6
+
+package humanize
+
+import (
+ "bytes"
+ "math/big"
+ "strings"
+)
+
+// BigCommaf produces a string form of the given big.Float in base 10
+// with commas after every three orders of magnitude.
+func BigCommaf(v *big.Float) string {
+ buf := &bytes.Buffer{}
+ if v.Sign() < 0 {
+ buf.Write([]byte{'-'})
+ v.Abs(v)
+ }
+
+ comma := []byte{','}
+
+ parts := strings.Split(v.Text('f', -1), ".")
+ pos := 0
+ if len(parts[0])%3 != 0 {
+ pos += len(parts[0]) % 3
+ buf.WriteString(parts[0][:pos])
+ buf.Write(comma)
+ }
+ for ; pos < len(parts[0]); pos += 3 {
+ buf.WriteString(parts[0][pos : pos+3])
+ buf.Write(comma)
+ }
+ buf.Truncate(buf.Len() - 1)
+
+ if len(parts) > 1 {
+ buf.Write([]byte{'.'})
+ buf.WriteString(parts[1])
+ }
+ return buf.String()
+}
diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go
new file mode 100644
index 000000000..c76190b10
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/ftoa.go
@@ -0,0 +1,23 @@
+package humanize
+
+import "strconv"
+
+func stripTrailingZeros(s string) string {
+ offset := len(s) - 1
+ for offset > 0 {
+ if s[offset] == '.' {
+ offset--
+ break
+ }
+ if s[offset] != '0' {
+ break
+ }
+ offset--
+ }
+ return s[:offset+1]
+}
+
+// Ftoa converts a float to a string with no trailing zeros.
+func Ftoa(num float64) string {
+ return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64))
+}
diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go
new file mode 100644
index 000000000..a2c2da31e
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/humanize.go
@@ -0,0 +1,8 @@
+/*
+Package humanize converts boring ugly numbers to human-friendly strings and back.
+
+Durations can be turned into strings such as "3 days ago", numbers
+representing sizes like 82854982 into useful strings like, "83 MB" or
+"79 MiB" (whichever you prefer).
+*/
+package humanize
diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go
new file mode 100644
index 000000000..dec618659
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/number.go
@@ -0,0 +1,192 @@
+package humanize
+
+/*
+Slightly adapted from the source to fit go-humanize.
+
+Author: https://github.com/gorhill
+Source: https://gist.github.com/gorhill/5285193
+
+*/
+
+import (
+ "math"
+ "strconv"
+)
+
+var (
+ renderFloatPrecisionMultipliers = [...]float64{
+ 1,
+ 10,
+ 100,
+ 1000,
+ 10000,
+ 100000,
+ 1000000,
+ 10000000,
+ 100000000,
+ 1000000000,
+ }
+
+ renderFloatPrecisionRounders = [...]float64{
+ 0.5,
+ 0.05,
+ 0.005,
+ 0.0005,
+ 0.00005,
+ 0.000005,
+ 0.0000005,
+ 0.00000005,
+ 0.000000005,
+ 0.0000000005,
+ }
+)
+
+// FormatFloat produces a formatted number as string based on the following user-specified criteria:
+// * thousands separator
+// * decimal separator
+// * decimal precision
+//
+// Usage: s := RenderFloat(format, n)
+// The format parameter tells how to render the number n.
+//
+// See examples: http://play.golang.org/p/LXc1Ddm1lJ
+//
+// Examples of format strings, given n = 12345.6789:
+// "#,###.##" => "12,345.67"
+// "#,###." => "12,345"
+// "#,###" => "12345,678"
+// "#\u202F###,##" => "12 345,68"
+// "#.###,###### => 12.345,678900
+// "" (aka default format) => 12,345.67
+//
+// The highest precision allowed is 9 digits after the decimal symbol.
+// There is also a version for integer number, FormatInteger(),
+// which is convenient for calls within template.
+func FormatFloat(format string, n float64) string {
+ // Special cases:
+ // NaN = "NaN"
+ // +Inf = "+Infinity"
+ // -Inf = "-Infinity"
+ if math.IsNaN(n) {
+ return "NaN"
+ }
+ if n > math.MaxFloat64 {
+ return "Infinity"
+ }
+ if n < -math.MaxFloat64 {
+ return "-Infinity"
+ }
+
+ // default format
+ precision := 2
+ decimalStr := "."
+ thousandStr := ","
+ positiveStr := ""
+ negativeStr := "-"
+
+ if len(format) > 0 {
+ format := []rune(format)
+
+ // If there is an explicit format directive,
+ // then default values are these:
+ precision = 9
+ thousandStr = ""
+
+ // collect indices of meaningful formatting directives
+ formatIndx := []int{}
+ for i, char := range format {
+ if char != '#' && char != '0' {
+ formatIndx = append(formatIndx, i)
+ }
+ }
+
+ if len(formatIndx) > 0 {
+ // Directive at index 0:
+ // Must be a '+'
+ // Raise an error if not the case
+ // index: 0123456789
+ // +0.000,000
+ // +000,000.0
+ // +0000.00
+ // +0000
+ if formatIndx[0] == 0 {
+ if format[formatIndx[0]] != '+' {
+ panic("RenderFloat(): invalid positive sign directive")
+ }
+ positiveStr = "+"
+ formatIndx = formatIndx[1:]
+ }
+
+ // Two directives:
+ // First is thousands separator
+ // Raise an error if not followed by 3-digit
+ // 0123456789
+ // 0.000,000
+ // 000,000.00
+ if len(formatIndx) == 2 {
+ if (formatIndx[1] - formatIndx[0]) != 4 {
+ panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers")
+ }
+ thousandStr = string(format[formatIndx[0]])
+ formatIndx = formatIndx[1:]
+ }
+
+ // One directive:
+ // Directive is decimal separator
+ // The number of digit-specifier following the separator indicates wanted precision
+ // 0123456789
+ // 0.00
+ // 000,0000
+ if len(formatIndx) == 1 {
+ decimalStr = string(format[formatIndx[0]])
+ precision = len(format) - formatIndx[0] - 1
+ }
+ }
+ }
+
+ // generate sign part
+ var signStr string
+ if n >= 0.000000001 {
+ signStr = positiveStr
+ } else if n <= -0.000000001 {
+ signStr = negativeStr
+ n = -n
+ } else {
+ signStr = ""
+ n = 0.0
+ }
+
+ // split number into integer and fractional parts
+ intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision])
+
+ // generate integer part string
+ intStr := strconv.FormatInt(int64(intf), 10)
+
+ // add thousand separator if required
+ if len(thousandStr) > 0 {
+ for i := len(intStr); i > 3; {
+ i -= 3
+ intStr = intStr[:i] + thousandStr + intStr[i:]
+ }
+ }
+
+ // no fractional part, we can leave now
+ if precision == 0 {
+ return signStr + intStr
+ }
+
+ // generate fractional part
+ fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision]))
+ // may need padding
+ if len(fracStr) < precision {
+ fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr
+ }
+
+ return signStr + intStr + decimalStr + fracStr
+}
+
+// FormatInteger produces a formatted number as string.
+// See FormatFloat.
+func FormatInteger(format string, n int) string {
+ return FormatFloat(format, float64(n))
+}
diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go
new file mode 100644
index 000000000..43d88a861
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/ordinals.go
@@ -0,0 +1,25 @@
+package humanize
+
+import "strconv"
+
+// Ordinal gives you the input number in a rank/ordinal format.
+//
+// Ordinal(3) -> 3rd
+func Ordinal(x int) string {
+ suffix := "th"
+ switch x % 10 {
+ case 1:
+ if x%100 != 11 {
+ suffix = "st"
+ }
+ case 2:
+ if x%100 != 12 {
+ suffix = "nd"
+ }
+ case 3:
+ if x%100 != 13 {
+ suffix = "rd"
+ }
+ }
+ return strconv.Itoa(x) + suffix
+}
diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go
new file mode 100644
index 000000000..b24e48169
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/si.go
@@ -0,0 +1,113 @@
+package humanize
+
+import (
+ "errors"
+ "math"
+ "regexp"
+ "strconv"
+)
+
+var siPrefixTable = map[float64]string{
+ -24: "y", // yocto
+ -21: "z", // zepto
+ -18: "a", // atto
+ -15: "f", // femto
+ -12: "p", // pico
+ -9: "n", // nano
+ -6: "µ", // micro
+ -3: "m", // milli
+ 0: "",
+ 3: "k", // kilo
+ 6: "M", // mega
+ 9: "G", // giga
+ 12: "T", // tera
+ 15: "P", // peta
+ 18: "E", // exa
+ 21: "Z", // zetta
+ 24: "Y", // yotta
+}
+
+var revSIPrefixTable = revfmap(siPrefixTable)
+
+// revfmap reverses the map and precomputes the power multiplier
+func revfmap(in map[float64]string) map[string]float64 {
+ rv := map[string]float64{}
+ for k, v := range in {
+ rv[v] = math.Pow(10, k)
+ }
+ return rv
+}
+
+var riParseRegex *regexp.Regexp
+
+func init() {
+ ri := `^([\-0-9.]+)\s?([`
+ for _, v := range siPrefixTable {
+ ri += v
+ }
+ ri += `]?)(.*)`
+
+ riParseRegex = regexp.MustCompile(ri)
+}
+
+// ComputeSI finds the most appropriate SI prefix for the given number
+// and returns the prefix along with the value adjusted to be within
+// that prefix.
+//
+// See also: SI, ParseSI.
+//
+// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p")
+func ComputeSI(input float64) (float64, string) {
+ if input == 0 {
+ return 0, ""
+ }
+ mag := math.Abs(input)
+ exponent := math.Floor(logn(mag, 10))
+ exponent = math.Floor(exponent/3) * 3
+
+ value := mag / math.Pow(10, exponent)
+
+ // Handle special case where value is exactly 1000.0
+ // Should return 1 M instead of 1000 k
+ if value == 1000.0 {
+ exponent += 3
+ value = mag / math.Pow(10, exponent)
+ }
+
+ value = math.Copysign(value, input)
+
+ prefix := siPrefixTable[exponent]
+ return value, prefix
+}
+
+// SI returns a string with default formatting.
+//
+// SI uses Ftoa to format float value, removing trailing zeros.
+//
+// See also: ComputeSI, ParseSI.
+//
+// e.g. SI(1000000, "B") -> 1 MB
+// e.g. SI(2.2345e-12, "F") -> 2.2345 pF
+func SI(input float64, unit string) string {
+ value, prefix := ComputeSI(input)
+ return Ftoa(value) + " " + prefix + unit
+}
+
+var errInvalid = errors.New("invalid input")
+
+// ParseSI parses an SI string back into the number and unit.
+//
+// See also: SI, ComputeSI.
+//
+// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil)
+func ParseSI(input string) (float64, string, error) {
+ found := riParseRegex.FindStringSubmatch(input)
+ if len(found) != 4 {
+ return 0, "", errInvalid
+ }
+ mag := revSIPrefixTable[found[2]]
+ unit := found[3]
+
+ base, err := strconv.ParseFloat(found[1], 64)
+ return base * mag, unit, err
+}
diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go
new file mode 100644
index 000000000..dd3fbf5ef
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/times.go
@@ -0,0 +1,117 @@
+package humanize
+
+import (
+ "fmt"
+ "math"
+ "sort"
+ "time"
+)
+
+// Seconds-based time units
+const (
+ Day = 24 * time.Hour
+ Week = 7 * Day
+ Month = 30 * Day
+ Year = 12 * Month
+ LongTime = 37 * Year
+)
+
+// Time formats a time into a relative string.
+//
+// Time(someT) -> "3 weeks ago"
+func Time(then time.Time) string {
+ return RelTime(then, time.Now(), "ago", "from now")
+}
+
+// A RelTimeMagnitude struct contains a relative time point at which
+// the relative format of time will switch to a new format string. A
+// slice of these in ascending order by their "D" field is passed to
+// CustomRelTime to format durations.
+//
+// The Format field is a string that may contain a "%s" which will be
+// replaced with the appropriate signed label (e.g. "ago" or "from
+// now") and a "%d" that will be replaced by the quantity.
+//
+// The DivBy field is the amount of time the time difference must be
+// divided by in order to display correctly.
+//
+// e.g. if D is 2*time.Minute and you want to display "%d minutes %s"
+// DivBy should be time.Minute so whatever the duration is will be
+// expressed in minutes.
+type RelTimeMagnitude struct {
+ D time.Duration
+ Format string
+ DivBy time.Duration
+}
+
+var defaultMagnitudes = []RelTimeMagnitude{
+ {time.Second, "now", time.Second},
+ {2 * time.Second, "1 second %s", 1},
+ {time.Minute, "%d seconds %s", time.Second},
+ {2 * time.Minute, "1 minute %s", 1},
+ {time.Hour, "%d minutes %s", time.Minute},
+ {2 * time.Hour, "1 hour %s", 1},
+ {Day, "%d hours %s", time.Hour},
+ {2 * Day, "1 day %s", 1},
+ {Week, "%d days %s", Day},
+ {2 * Week, "1 week %s", 1},
+ {Month, "%d weeks %s", Week},
+ {2 * Month, "1 month %s", 1},
+ {Year, "%d months %s", Month},
+ {18 * Month, "1 year %s", 1},
+ {2 * Year, "2 years %s", 1},
+ {LongTime, "%d years %s", Year},
+ {math.MaxInt64, "a long while %s", 1},
+}
+
+// RelTime formats a time into a relative string.
+//
+// It takes two times and two labels. In addition to the generic time
+// delta string (e.g. 5 minutes), the labels are used applied so that
+// the label corresponding to the smaller time is applied.
+//
+// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier"
+func RelTime(a, b time.Time, albl, blbl string) string {
+ return CustomRelTime(a, b, albl, blbl, defaultMagnitudes)
+}
+
+// CustomRelTime formats a time into a relative string.
+//
+// It takes two times two labels and a table of relative time formats.
+// In addition to the generic time delta string (e.g. 5 minutes), the
+// labels are used applied so that the label corresponding to the
+// smaller time is applied.
+func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string {
+ lbl := albl
+ diff := b.Sub(a)
+
+ if a.After(b) {
+ lbl = blbl
+ diff = a.Sub(b)
+ }
+
+ n := sort.Search(len(magnitudes), func(i int) bool {
+ return magnitudes[i].D > diff
+ })
+
+ if n >= len(magnitudes) {
+ n = len(magnitudes) - 1
+ }
+ mag := magnitudes[n]
+ args := []interface{}{}
+ escaped := false
+ for _, ch := range mag.Format {
+ if escaped {
+ switch ch {
+ case 's':
+ args = append(args, lbl)
+ case 'd':
+ args = append(args, diff/mag.DivBy)
+ }
+ escaped = false
+ } else {
+ escaped = ch == '%'
+ }
+ }
+ return fmt.Sprintf(mag.Format, args...)
+}
diff --git a/vendor/github.com/dyatlov/go-opengraph/.gitignore b/vendor/github.com/dyatlov/go-opengraph/.gitignore
deleted file mode 100644
index daf913b1b..000000000
--- a/vendor/github.com/dyatlov/go-opengraph/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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/dyatlov/go-opengraph/README.md b/vendor/github.com/dyatlov/go-opengraph/README.md
deleted file mode 100644
index 8c8e00212..000000000
--- a/vendor/github.com/dyatlov/go-opengraph/README.md
+++ /dev/null
@@ -1,118 +0,0 @@
-Go OpenGraph
-===
-
-Parses given html data into Facebook OpenGraph structure.
-
-To download and install this package run:
-
-`go get github.com/dyatlov/go-opengraph/opengraph`
-
-Methods:
-
- * `NewOpenGraph()` - create a new OpenGraph instance
- * `ProcessHTML(buffer io.Reader) error` - process given html into underlying data structure
- * `ProcessMeta(metaAttrs map[string]string)` - add data to the structure based on meta attributes
- * `ToJSON() (string, error)` - return JSON representation of data or error
- * `String() string` - return JSON representation of structure
-
-Source docs: http://godoc.org/github.com/dyatlov/go-opengraph/opengraph
-
-If you just need to parse an OpenGraph data from HTML then method `ProcessHTML` is your needed one.
-
-Example:
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
-
- "github.com/dyatlov/go-opengraph/opengraph"
-)
-
-func main() {
- html := `<html><head><meta property="og:type" content="article" />
- <meta property="og:title" content="WordPress 4.3 &quot;Billie&quot;" />
- <meta property="og:url" content="https://wordpress.org/news/2015/08/billie/" /></head><body></body></html>`
-
- og := opengraph.NewOpenGraph()
- err := og.ProcessHTML(strings.NewReader(html))
-
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Printf("Type: %s\n", og.Type)
- fmt.Printf("Title: %s\n", og.Title)
- fmt.Printf("URL: %s\n", og.URL)
- fmt.Printf("String/JSON Representation: %s\n", og)
-}
-```
-
-If you have your own parsing engine and just need an intelligent OpenGraph parsing, then `ProcessMeta` is the method you need.
-While using this method you don't need to reparse your parsed html again, just feed it with meta atributes as they appear and OpenGraph will be built based on the data.
-
-Example:
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
-
- "github.com/dyatlov/go-opengraph/opengraph"
- "golang.org/x/net/html"
-)
-
-func main() {
- h := `<html><head><meta property="og:type" content="article" />
- <meta property="og:title" content="WordPress 4.3 &quot;Billie&quot;" />
- <meta property="og:url" content="https://wordpress.org/news/2015/08/billie/" /></head><body></body></html>`
-
- og := opengraph.NewOpenGraph()
-
- doc, err := html.Parse(strings.NewReader(h))
- if err != nil {
- fmt.Println(err)
- return
- }
-
- var parseHead func(*html.Node)
- parseHead = func(n *html.Node) {
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if c.Type == html.ElementNode && c.Data == "meta" {
- m := make(map[string]string)
- for _, a := range c.Attr {
- m[a.Key] = a.Val
- }
-
- og.ProcessMeta(m)
- }
- }
- }
-
- var f func(*html.Node)
- f = func(n *html.Node) {
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if c.Type == html.ElementNode {
- if c.Data == "head" {
- parseHead(c)
- continue
- } else if c.Data == "body" { // OpenGraph is only in head, so we don't need body
- break
- }
- }
- f(c)
- }
- }
- f(doc)
-
- fmt.Printf("Type: %s\n", og.Type)
- fmt.Printf("Title: %s\n", og.Title)
- fmt.Printf("URL: %s\n", og.URL)
- fmt.Printf("String/JSON Representation: %s\n", og)
-}
-```
diff --git a/vendor/github.com/dyatlov/go-opengraph/examples/advanced.go b/vendor/github.com/dyatlov/go-opengraph/examples/advanced.go
deleted file mode 100644
index e24b821e7..000000000
--- a/vendor/github.com/dyatlov/go-opengraph/examples/advanced.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package main
-
-import (
- "fmt"
- "strings"
-
- "github.com/dyatlov/go-opengraph/opengraph"
- "golang.org/x/net/html"
-)
-
-func main() {
- h := `<html><head><meta property="og:type" content="article" />
- <meta property="og:title" content="WordPress 4.3 &quot;Billie&quot;" />
- <meta property="og:url" content="https://wordpress.org/news/2015/08/billie/" /></head><body></body></html>`
-
- og := opengraph.NewOpenGraph()
-
- doc, err := html.Parse(strings.NewReader(h))
- if err != nil {
- fmt.Println(err)
- return
- }
-
- var parseHead func(*html.Node)
- parseHead = func(n *html.Node) {
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if c.Type == html.ElementNode && c.Data == "meta" {
- m := make(map[string]string)
- for _, a := range c.Attr {
- m[a.Key] = a.Val
- }
-
- og.ProcessMeta(m)
- }
- }
- }
-
- var f func(*html.Node)
- f = func(n *html.Node) {
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if c.Type == html.ElementNode {
- if c.Data == "head" {
- parseHead(c)
- continue
- } else if c.Data == "body" { // OpenGraph is only in head, so we don't need body
- break
- }
- }
- f(c)
- }
- }
- f(doc)
-
- fmt.Printf("Type: %s\n", og.Type)
- fmt.Printf("Title: %s\n", og.Title)
- fmt.Printf("URL: %s\n", og.URL)
- fmt.Printf("String/JSON Representation: %s\n", og)
-}
diff --git a/vendor/github.com/dyatlov/go-opengraph/examples/simple.go b/vendor/github.com/dyatlov/go-opengraph/examples/simple.go
deleted file mode 100644
index fa128cd43..000000000
--- a/vendor/github.com/dyatlov/go-opengraph/examples/simple.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package main
-
-import (
- "fmt"
- "strings"
-
- "github.com/dyatlov/go-opengraph/opengraph"
-)
-
-func main() {
- html := `<html><head><meta property="og:type" content="article" />
- <meta property="og:title" content="WordPress 4.3 &quot;Billie&quot;" />
- <meta property="og:url" content="https://wordpress.org/news/2015/08/billie/" /></head><body></body></html>`
-
- og := opengraph.NewOpenGraph()
- err := og.ProcessHTML(strings.NewReader(html))
-
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Printf("Type: %s\n", og.Type)
- fmt.Printf("Title: %s\n", og.Title)
- fmt.Printf("URL: %s\n", og.URL)
- fmt.Printf("String/JSON Representation: %s\n", og)
-}
diff --git a/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go b/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go
index 5468d86bb..21eccf0ae 100644
--- a/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go
+++ b/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go
@@ -131,7 +131,6 @@ func (og *OpenGraph) ProcessHTML(buffer io.Reader) error {
og.ProcessMeta(m)
}
}
- return nil
}
// ProcessMeta processes meta attributes and adds them to Open Graph structure if they are suitable for that
@@ -248,7 +247,7 @@ func (og *OpenGraph) processArticleMeta(metaAttrs map[string]string) {
if err == nil {
og.Article.ExpirationTime = &t
}
- case "article:secttion":
+ case "article:section":
og.Article.Section = metaAttrs["content"]
case "article:tag":
og.Article.Tags = append(og.Article.Tags, metaAttrs["content"])
diff --git a/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph_test.go b/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph_test.go
deleted file mode 100644
index 6af7f25d2..000000000
--- a/vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-package opengraph_test
-
-import (
- "strings"
- "testing"
- "time"
-
- "github.com/dyatlov/go-opengraph/opengraph"
-)
-
-const html = `
- <!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
-<head profile="http://gmpg.org/xfn/11">
-<meta charset="utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>WordPress &#8250; WordPress 4.3 &#8220;Billie&#8221;</title>
-
-<!-- Jetpack Open Graph Tags -->
-<meta property="og:type" content="article" />
-<meta property="og:title" content="WordPress 4.3 &quot;Billie&quot;" />
-<meta property="og:url" content="https://wordpress.org/news/2015/08/billie/" />
-<meta property="og:description" content="Version 4.3 of WordPress, named &quot;Billie&quot; in honor of jazz singer Billie Holiday, is available for download or update in your WordPress dashboard. New features in 4.3 make it even easier to format y..." />
-<meta property="article:published_time" content="2015-08-18T19:12:38+00:00" />
-<meta property="article:modified_time" content="2015-08-19T13:10:24+00:00" />
-<meta property="og:site_name" content="WordPress News" />
-<meta property="og:image" content="https://www.gravatar.com/avatar/2370ea5912750f4cb0f3c51ae1cbca55?d=mm&amp;s=180&amp;r=G" />
-<meta property="og:locale" content="en_US" />
-<meta name="twitter:site" content="@WordPress" />
-<meta name="twitter:card" content="summary" />
-<meta name="twitter:creator" content="@WordPress" />
- `
-
-func BenchmarkOpenGraph_ProcessHTML(b *testing.B) {
- og := opengraph.NewOpenGraph()
- b.ReportAllocs()
- b.SetBytes(int64(len(html)))
- for i := 0; i < b.N; i++ {
- if err := og.ProcessHTML(strings.NewReader(html)); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func TestOpenGraphProcessHTML(t *testing.T) {
- og := opengraph.NewOpenGraph()
- err := og.ProcessHTML(strings.NewReader(html))
-
- if err != nil {
- t.Fatal(err)
- }
-
- if og.Type != "article" {
- t.Error("type parsed incorrectly")
- }
-
- if len(og.Title) == 0 {
- t.Error("title parsed incorrectly")
- }
-
- if len(og.URL) == 0 {
- t.Error("url parsed incorrectly")
- }
-
- if len(og.Description) == 0 {
- t.Error("description parsed incorrectly")
- }
-
- if len(og.Images) == 0 {
- t.Error("images parsed incorrectly")
- } else {
- if len(og.Images[0].URL) == 0 {
- t.Error("image url parsed incorrectly")
- }
- }
-
- if len(og.Locale) == 0 {
- t.Error("locale parsed incorrectly")
- }
-
- if len(og.SiteName) == 0 {
- t.Error("site name parsed incorrectly")
- }
-
- if og.Article == nil {
- t.Error("articles parsed incorrectly")
- } else {
- ev, _ := time.Parse(time.RFC3339, "2015-08-18T19:12:38+00:00")
- if !og.Article.PublishedTime.Equal(ev) {
- t.Error("article published time parsed incorrectly")
- }
- }
-}
-
-func TestOpenGraphProcessMeta(t *testing.T) {
- og := opengraph.NewOpenGraph()
-
- og.ProcessMeta(map[string]string{"property": "og:type", "content": "book"})
-
- if og.Type != "book" {
- t.Error("wrong og:type processing")
- }
-
- og.ProcessMeta(map[string]string{"property": "book:isbn", "content": "123456"})
-
- if og.Book == nil {
- t.Error("wrong book type processing")
- } else {
- if og.Book.ISBN != "123456" {
- t.Error("wrong book isbn processing")
- }
- }
-
- og.ProcessMeta(map[string]string{"property": "article:section", "content": "testsection"})
-
- if og.Article != nil {
- t.Error("article processed when it should not be")
- }
-
- og.ProcessMeta(map[string]string{"property": "book:author:first_name", "content": "John"})
-
- if og.Book != nil {
- if len(og.Book.Authors) == 0 {
- t.Error("book author was not processed")
- } else {
- if og.Book.Authors[0].FirstName != "John" {
- t.Error("author first name was processed incorrectly")
- }
- }
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md b/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 4ad1aed8f..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,11 +0,0 @@
-Before reporting an issue, please ensure you are using the latest release of fsnotify.
-
-### Which operating system (GOOS) and version are you using?
-
-Linux: lsb_release -a
-macOS: sw_vers
-Windows: systeminfo | findstr /B /C:OS
-
-### Please describe the issue that occurred.
-
-### Are you able to reproduce the issue? Please provide steps to reproduce and a code sample if possible.
diff --git a/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 64ddf7cef..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,8 +0,0 @@
-#### What does this pull request do?
-
-
-#### Where should the reviewer start?
-
-
-#### How should this be manually tested?
-
diff --git a/vendor/github.com/fsnotify/fsnotify/example_test.go b/vendor/github.com/fsnotify/fsnotify/example_test.go
deleted file mode 100644
index 700502cb3..000000000
--- a/vendor/github.com/fsnotify/fsnotify/example_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !plan9
-
-package fsnotify_test
-
-import (
- "log"
-
- "github.com/fsnotify/fsnotify"
-)
-
-func ExampleNewWatcher() {
- watcher, err := fsnotify.NewWatcher()
- if err != nil {
- log.Fatal(err)
- }
- defer watcher.Close()
-
- done := make(chan bool)
- go func() {
- for {
- select {
- case event := <-watcher.Events:
- log.Println("event:", event)
- if event.Op&fsnotify.Write == fsnotify.Write {
- log.Println("modified file:", event.Name)
- }
- case err := <-watcher.Errors:
- log.Println("error:", err)
- }
- }
- }()
-
- err = watcher.Add("/tmp/foo")
- if err != nil {
- log.Fatal(err)
- }
- <-done
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go
deleted file mode 100644
index f9771d9df..000000000
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !plan9
-
-package fsnotify
-
-import (
- "os"
- "testing"
- "time"
-)
-
-func TestEventStringWithValue(t *testing.T) {
- for opMask, expectedString := range map[Op]string{
- Chmod | Create: `"/usr/someFile": CREATE|CHMOD`,
- Rename: `"/usr/someFile": RENAME`,
- Remove: `"/usr/someFile": REMOVE`,
- Write | Chmod: `"/usr/someFile": WRITE|CHMOD`,
- } {
- event := Event{Name: "/usr/someFile", Op: opMask}
- if event.String() != expectedString {
- t.Fatalf("Expected %s, got: %v", expectedString, event.String())
- }
-
- }
-}
-
-func TestEventOpStringWithValue(t *testing.T) {
- expectedOpString := "WRITE|CHMOD"
- event := Event{Name: "someFile", Op: Write | Chmod}
- if event.Op.String() != expectedOpString {
- t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String())
- }
-}
-
-func TestEventOpStringWithNoValue(t *testing.T) {
- expectedOpString := ""
- event := Event{Name: "testFile", Op: 0}
- if event.Op.String() != expectedOpString {
- t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String())
- }
-}
-
-// TestWatcherClose tests that the goroutine started by creating the watcher can be
-// signalled to return at any time, even if there is no goroutine listening on the events
-// or errors channels.
-func TestWatcherClose(t *testing.T) {
- t.Parallel()
-
- name := tempMkFile(t, "")
- w := newWatcher(t)
- err := w.Add(name)
- if err != nil {
- t.Fatal(err)
- }
-
- err = os.Remove(name)
- if err != nil {
- t.Fatal(err)
- }
- // Allow the watcher to receive the event.
- time.Sleep(time.Millisecond * 100)
-
- err = w.Close()
- if err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go
deleted file mode 100644
index 26623efef..000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build linux
-
-package fsnotify
-
-import (
- "testing"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-type testFd [2]int
-
-func makeTestFd(t *testing.T) testFd {
- var tfd testFd
- errno := unix.Pipe(tfd[:])
- if errno != nil {
- t.Fatalf("Failed to create pipe: %v", errno)
- }
- return tfd
-}
-
-func (tfd testFd) fd() int {
- return tfd[0]
-}
-
-func (tfd testFd) closeWrite(t *testing.T) {
- errno := unix.Close(tfd[1])
- if errno != nil {
- t.Fatalf("Failed to close write end of pipe: %v", errno)
- }
-}
-
-func (tfd testFd) put(t *testing.T) {
- buf := make([]byte, 10)
- _, errno := unix.Write(tfd[1], buf)
- if errno != nil {
- t.Fatalf("Failed to write to pipe: %v", errno)
- }
-}
-
-func (tfd testFd) get(t *testing.T) {
- buf := make([]byte, 10)
- _, errno := unix.Read(tfd[0], buf)
- if errno != nil {
- t.Fatalf("Failed to read from pipe: %v", errno)
- }
-}
-
-func (tfd testFd) close() {
- unix.Close(tfd[1])
- unix.Close(tfd[0])
-}
-
-func makePoller(t *testing.T) (testFd, *fdPoller) {
- tfd := makeTestFd(t)
- poller, err := newFdPoller(tfd.fd())
- if err != nil {
- t.Fatalf("Failed to create poller: %v", err)
- }
- return tfd, poller
-}
-
-func TestPollerWithBadFd(t *testing.T) {
- _, err := newFdPoller(-1)
- if err != unix.EBADF {
- t.Fatalf("Expected EBADF, got: %v", err)
- }
-}
-
-func TestPollerWithData(t *testing.T) {
- tfd, poller := makePoller(t)
- defer tfd.close()
- defer poller.close()
-
- tfd.put(t)
- ok, err := poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if !ok {
- t.Fatalf("expected poller to return true")
- }
- tfd.get(t)
-}
-
-func TestPollerWithWakeup(t *testing.T) {
- tfd, poller := makePoller(t)
- defer tfd.close()
- defer poller.close()
-
- err := poller.wake()
- if err != nil {
- t.Fatalf("wake failed: %v", err)
- }
- ok, err := poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if ok {
- t.Fatalf("expected poller to return false")
- }
-}
-
-func TestPollerWithClose(t *testing.T) {
- tfd, poller := makePoller(t)
- defer tfd.close()
- defer poller.close()
-
- tfd.closeWrite(t)
- ok, err := poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if !ok {
- t.Fatalf("expected poller to return true")
- }
-}
-
-func TestPollerWithWakeupAndData(t *testing.T) {
- tfd, poller := makePoller(t)
- defer tfd.close()
- defer poller.close()
-
- tfd.put(t)
- err := poller.wake()
- if err != nil {
- t.Fatalf("wake failed: %v", err)
- }
-
- // both data and wakeup
- ok, err := poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if !ok {
- t.Fatalf("expected poller to return true")
- }
-
- // data is still in the buffer, wakeup is cleared
- ok, err = poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if !ok {
- t.Fatalf("expected poller to return true")
- }
-
- tfd.get(t)
- // data is gone, only wakeup now
- err = poller.wake()
- if err != nil {
- t.Fatalf("wake failed: %v", err)
- }
- ok, err = poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- if ok {
- t.Fatalf("expected poller to return false")
- }
-}
-
-func TestPollerConcurrent(t *testing.T) {
- tfd, poller := makePoller(t)
- defer tfd.close()
- defer poller.close()
-
- oks := make(chan bool)
- live := make(chan bool)
- defer close(live)
- go func() {
- defer close(oks)
- for {
- ok, err := poller.wait()
- if err != nil {
- t.Fatalf("poller failed: %v", err)
- }
- oks <- ok
- if !<-live {
- return
- }
- }
- }()
-
- // Try a write
- select {
- case <-time.After(50 * time.Millisecond):
- case <-oks:
- t.Fatalf("poller did not wait")
- }
- tfd.put(t)
- if !<-oks {
- t.Fatalf("expected true")
- }
- tfd.get(t)
- live <- true
-
- // Try a wakeup
- select {
- case <-time.After(50 * time.Millisecond):
- case <-oks:
- t.Fatalf("poller did not wait")
- }
- err := poller.wake()
- if err != nil {
- t.Fatalf("wake failed: %v", err)
- }
- if <-oks {
- t.Fatalf("expected false")
- }
- live <- true
-
- // Try a close
- select {
- case <-time.After(50 * time.Millisecond):
- case <-oks:
- t.Fatalf("poller did not wait")
- }
- tfd.closeWrite(t)
- if !<-oks {
- t.Fatalf("expected true")
- }
- tfd.get(t)
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_test.go
deleted file mode 100644
index 54f3f00eb..000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify_test.go
+++ /dev/null
@@ -1,449 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build linux
-
-package fsnotify
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "strings"
- "testing"
- "time"
-)
-
-func TestInotifyCloseRightAway(t *testing.T) {
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher")
- }
-
- // Close immediately; it won't even reach the first unix.Read.
- w.Close()
-
- // Wait for the close to complete.
- <-time.After(50 * time.Millisecond)
- isWatcherReallyClosed(t, w)
-}
-
-func TestInotifyCloseSlightlyLater(t *testing.T) {
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher")
- }
-
- // Wait until readEvents has reached unix.Read, and Close.
- <-time.After(50 * time.Millisecond)
- w.Close()
-
- // Wait for the close to complete.
- <-time.After(50 * time.Millisecond)
- isWatcherReallyClosed(t, w)
-}
-
-func TestInotifyCloseSlightlyLaterWithWatch(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher")
- }
- w.Add(testDir)
-
- // Wait until readEvents has reached unix.Read, and Close.
- <-time.After(50 * time.Millisecond)
- w.Close()
-
- // Wait for the close to complete.
- <-time.After(50 * time.Millisecond)
- isWatcherReallyClosed(t, w)
-}
-
-func TestInotifyCloseAfterRead(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher")
- }
-
- err = w.Add(testDir)
- if err != nil {
- t.Fatalf("Failed to add .")
- }
-
- // Generate an event.
- os.Create(filepath.Join(testDir, "somethingSOMETHINGsomethingSOMETHING"))
-
- // Wait for readEvents to read the event, then close the watcher.
- <-time.After(50 * time.Millisecond)
- w.Close()
-
- // Wait for the close to complete.
- <-time.After(50 * time.Millisecond)
- isWatcherReallyClosed(t, w)
-}
-
-func isWatcherReallyClosed(t *testing.T, w *Watcher) {
- select {
- case err, ok := <-w.Errors:
- if ok {
- t.Fatalf("w.Errors is not closed; readEvents is still alive after closing (error: %v)", err)
- }
- default:
- t.Fatalf("w.Errors would have blocked; readEvents is still alive!")
- }
-
- select {
- case _, ok := <-w.Events:
- if ok {
- t.Fatalf("w.Events is not closed; readEvents is still alive after closing")
- }
- default:
- t.Fatalf("w.Events would have blocked; readEvents is still alive!")
- }
-}
-
-func TestInotifyCloseCreate(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher: %v", err)
- }
- defer w.Close()
-
- err = w.Add(testDir)
- if err != nil {
- t.Fatalf("Failed to add testDir: %v", err)
- }
- h, err := os.Create(filepath.Join(testDir, "testfile"))
- if err != nil {
- t.Fatalf("Failed to create file in testdir: %v", err)
- }
- h.Close()
- select {
- case _ = <-w.Events:
- case err := <-w.Errors:
- t.Fatalf("Error from watcher: %v", err)
- case <-time.After(50 * time.Millisecond):
- t.Fatalf("Took too long to wait for event")
- }
-
- // At this point, we've received one event, so the goroutine is ready.
- // It's also blocking on unix.Read.
- // Now we try to swap the file descriptor under its nose.
- w.Close()
- w, err = NewWatcher()
- defer w.Close()
- if err != nil {
- t.Fatalf("Failed to create second watcher: %v", err)
- }
-
- <-time.After(50 * time.Millisecond)
- err = w.Add(testDir)
- if err != nil {
- t.Fatalf("Error adding testDir again: %v", err)
- }
-}
-
-// This test verifies the watcher can keep up with file creations/deletions
-// when under load.
-func TestInotifyStress(t *testing.T) {
- maxNumToCreate := 1000
-
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
- testFilePrefix := filepath.Join(testDir, "testfile")
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher: %v", err)
- }
- defer w.Close()
-
- err = w.Add(testDir)
- if err != nil {
- t.Fatalf("Failed to add testDir: %v", err)
- }
-
- doneChan := make(chan struct{})
- // The buffer ensures that the file generation goroutine is never blocked.
- errChan := make(chan error, 2*maxNumToCreate)
-
- go func() {
- for i := 0; i < maxNumToCreate; i++ {
- testFile := fmt.Sprintf("%s%d", testFilePrefix, i)
-
- handle, err := os.Create(testFile)
- if err != nil {
- errChan <- fmt.Errorf("Create failed: %v", err)
- continue
- }
-
- err = handle.Close()
- if err != nil {
- errChan <- fmt.Errorf("Close failed: %v", err)
- continue
- }
- }
-
- // If we delete a newly created file too quickly, inotify will skip the
- // create event and only send the delete event.
- time.Sleep(100 * time.Millisecond)
-
- for i := 0; i < maxNumToCreate; i++ {
- testFile := fmt.Sprintf("%s%d", testFilePrefix, i)
- err = os.Remove(testFile)
- if err != nil {
- errChan <- fmt.Errorf("Remove failed: %v", err)
- }
- }
-
- close(doneChan)
- }()
-
- creates := 0
- removes := 0
-
- finished := false
- after := time.After(10 * time.Second)
- for !finished {
- select {
- case <-after:
- t.Fatalf("Not done")
- case <-doneChan:
- finished = true
- case err := <-errChan:
- t.Fatalf("Got an error from file creator goroutine: %v", err)
- case err := <-w.Errors:
- t.Fatalf("Got an error from watcher: %v", err)
- case evt := <-w.Events:
- if !strings.HasPrefix(evt.Name, testFilePrefix) {
- t.Fatalf("Got an event for an unknown file: %s", evt.Name)
- }
- if evt.Op == Create {
- creates++
- }
- if evt.Op == Remove {
- removes++
- }
- }
- }
-
- // Drain remaining events from channels
- count := 0
- for count < 10 {
- select {
- case err := <-errChan:
- t.Fatalf("Got an error from file creator goroutine: %v", err)
- case err := <-w.Errors:
- t.Fatalf("Got an error from watcher: %v", err)
- case evt := <-w.Events:
- if !strings.HasPrefix(evt.Name, testFilePrefix) {
- t.Fatalf("Got an event for an unknown file: %s", evt.Name)
- }
- if evt.Op == Create {
- creates++
- }
- if evt.Op == Remove {
- removes++
- }
- count = 0
- default:
- count++
- // Give the watcher chances to fill the channels.
- time.Sleep(time.Millisecond)
- }
- }
-
- if creates-removes > 1 || creates-removes < -1 {
- t.Fatalf("Creates and removes should not be off by more than one: %d creates, %d removes", creates, removes)
- }
- if creates < 50 {
- t.Fatalf("Expected at least 50 creates, got %d", creates)
- }
-}
-
-func TestInotifyRemoveTwice(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
- testFile := filepath.Join(testDir, "testfile")
-
- handle, err := os.Create(testFile)
- if err != nil {
- t.Fatalf("Create failed: %v", err)
- }
- handle.Close()
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher: %v", err)
- }
- defer w.Close()
-
- err = w.Add(testFile)
- if err != nil {
- t.Fatalf("Failed to add testFile: %v", err)
- }
-
- err = w.Remove(testFile)
- if err != nil {
- t.Fatalf("wanted successful remove but got: %v", err)
- }
-
- err = w.Remove(testFile)
- if err == nil {
- t.Fatalf("no error on removing invalid file")
- }
-
- w.mu.Lock()
- defer w.mu.Unlock()
- if len(w.watches) != 0 {
- t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches)
- }
- if len(w.paths) != 0 {
- t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths)
- }
-}
-
-func TestInotifyInnerMapLength(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
- testFile := filepath.Join(testDir, "testfile")
-
- handle, err := os.Create(testFile)
- if err != nil {
- t.Fatalf("Create failed: %v", err)
- }
- handle.Close()
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher: %v", err)
- }
- defer w.Close()
-
- err = w.Add(testFile)
- if err != nil {
- t.Fatalf("Failed to add testFile: %v", err)
- }
- go func() {
- for err := range w.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- err = os.Remove(testFile)
- if err != nil {
- t.Fatalf("Failed to remove testFile: %v", err)
- }
- _ = <-w.Events // consume Remove event
- <-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated
-
- w.mu.Lock()
- defer w.mu.Unlock()
- if len(w.watches) != 0 {
- t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches)
- }
- if len(w.paths) != 0 {
- t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths)
- }
-}
-
-func TestInotifyOverflow(t *testing.T) {
- // We need to generate many more events than the
- // fs.inotify.max_queued_events sysctl setting.
- // We use multiple goroutines (one per directory)
- // to speed up file creation.
- numDirs := 128
- numFiles := 1024
-
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- w, err := NewWatcher()
- if err != nil {
- t.Fatalf("Failed to create watcher: %v", err)
- }
- defer w.Close()
-
- for dn := 0; dn < numDirs; dn++ {
- testSubdir := fmt.Sprintf("%s/%d", testDir, dn)
-
- err := os.Mkdir(testSubdir, 0777)
- if err != nil {
- t.Fatalf("Cannot create subdir: %v", err)
- }
-
- err = w.Add(testSubdir)
- if err != nil {
- t.Fatalf("Failed to add subdir: %v", err)
- }
- }
-
- errChan := make(chan error, numDirs*numFiles)
-
- for dn := 0; dn < numDirs; dn++ {
- testSubdir := fmt.Sprintf("%s/%d", testDir, dn)
-
- go func() {
- for fn := 0; fn < numFiles; fn++ {
- testFile := fmt.Sprintf("%s/%d", testSubdir, fn)
-
- handle, err := os.Create(testFile)
- if err != nil {
- errChan <- fmt.Errorf("Create failed: %v", err)
- continue
- }
-
- err = handle.Close()
- if err != nil {
- errChan <- fmt.Errorf("Close failed: %v", err)
- continue
- }
- }
- }()
- }
-
- creates := 0
- overflows := 0
-
- after := time.After(10 * time.Second)
- for overflows == 0 && creates < numDirs*numFiles {
- select {
- case <-after:
- t.Fatalf("Not done")
- case err := <-errChan:
- t.Fatalf("Got an error from file creator goroutine: %v", err)
- case err := <-w.Errors:
- if err == ErrEventOverflow {
- overflows++
- } else {
- t.Fatalf("Got an error from watcher: %v", err)
- }
- case evt := <-w.Events:
- if !strings.HasPrefix(evt.Name, testDir) {
- t.Fatalf("Got an event for an unknown file: %s", evt.Name)
- }
- if evt.Op == Create {
- creates++
- }
- }
- }
-
- if creates == numDirs*numFiles {
- t.Fatalf("Could not trigger overflow")
- }
-
- if overflows == 0 {
- t.Fatalf("No overflow and not enough creates (expected %d, got %d)",
- numDirs*numFiles, creates)
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go b/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go
deleted file mode 100644
index cd6adc273..000000000
--- a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2016 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 file.
-
-package fsnotify
-
-import (
- "os"
- "path/filepath"
- "testing"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-// testExchangedataForWatcher tests the watcher with the exchangedata operation on macOS.
-//
-// This is widely used for atomic saves on macOS, e.g. TextMate and in Apple's NSDocument.
-//
-// See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/exchangedata.2.html
-// Also see: https://github.com/textmate/textmate/blob/cd016be29489eba5f3c09b7b70b06da134dda550/Frameworks/io/src/swap_file_data.cc#L20
-func testExchangedataForWatcher(t *testing.T, watchDir bool) {
- // Create directory to watch
- testDir1 := tempMkdir(t)
-
- // For the intermediate file
- testDir2 := tempMkdir(t)
-
- defer os.RemoveAll(testDir1)
- defer os.RemoveAll(testDir2)
-
- resolvedFilename := "TestFsnotifyEvents.file"
-
- // TextMate does:
- //
- // 1. exchangedata (intermediate, resolved)
- // 2. unlink intermediate
- //
- // Let's try to simulate that:
- resolved := filepath.Join(testDir1, resolvedFilename)
- intermediate := filepath.Join(testDir2, resolvedFilename+"~")
-
- // Make sure we create the file before we start watching
- createAndSyncFile(t, resolved)
-
- watcher := newWatcher(t)
-
- // Test both variants in isolation
- if watchDir {
- addWatch(t, watcher, testDir1)
- } else {
- addWatch(t, watcher, resolved)
- }
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var removeReceived counter
- var createReceived counter
-
- done := make(chan bool)
-
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(resolved) {
- if event.Op&Remove == Remove {
- removeReceived.increment()
- }
- if event.Op&Create == Create {
- createReceived.increment()
- }
- }
- t.Logf("event received: %s", event)
- }
- done <- true
- }()
-
- // Repeat to make sure the watched file/directory "survives" the REMOVE/CREATE loop.
- for i := 1; i <= 3; i++ {
- // The intermediate file is created in a folder outside the watcher
- createAndSyncFile(t, intermediate)
-
- // 1. Swap
- if err := unix.Exchangedata(intermediate, resolved, 0); err != nil {
- t.Fatalf("[%d] exchangedata failed: %s", i, err)
- }
-
- time.Sleep(50 * time.Millisecond)
-
- // 2. Delete the intermediate file
- err := os.Remove(intermediate)
-
- if err != nil {
- t.Fatalf("[%d] remove %s failed: %s", i, intermediate, err)
- }
-
- time.Sleep(50 * time.Millisecond)
-
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
-
- // The events will be (CHMOD + REMOVE + CREATE) X 2. Let's focus on the last two:
- if removeReceived.value() < 3 {
- t.Fatal("fsnotify remove events have not been received after 500 ms")
- }
-
- if createReceived.value() < 3 {
- t.Fatal("fsnotify create events have not been received after 500 ms")
- }
-
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-}
-
-// TestExchangedataInWatchedDir test exchangedata operation on file in watched dir.
-func TestExchangedataInWatchedDir(t *testing.T) {
- testExchangedataForWatcher(t, true)
-}
-
-// TestExchangedataInWatchedDir test exchangedata operation on watched file.
-func TestExchangedataInWatchedFile(t *testing.T) {
- testExchangedataForWatcher(t, false)
-}
-
-func createAndSyncFile(t *testing.T, filepath string) {
- f1, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating %s failed: %s", filepath, err)
- }
- f1.Sync()
- f1.Close()
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/integration_test.go b/vendor/github.com/fsnotify/fsnotify/integration_test.go
deleted file mode 100644
index 8b7e9d3ec..000000000
--- a/vendor/github.com/fsnotify/fsnotify/integration_test.go
+++ /dev/null
@@ -1,1237 +0,0 @@
-// Copyright 2010 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 file.
-
-// +build !plan9,!solaris
-
-package fsnotify
-
-import (
- "io/ioutil"
- "os"
- "os/exec"
- "path"
- "path/filepath"
- "runtime"
- "sync/atomic"
- "testing"
- "time"
-)
-
-// An atomic counter
-type counter struct {
- val int32
-}
-
-func (c *counter) increment() {
- atomic.AddInt32(&c.val, 1)
-}
-
-func (c *counter) value() int32 {
- return atomic.LoadInt32(&c.val)
-}
-
-func (c *counter) reset() {
- atomic.StoreInt32(&c.val, 0)
-}
-
-// tempMkdir makes a temporary directory
-func tempMkdir(t *testing.T) string {
- dir, err := ioutil.TempDir("", "fsnotify")
- if err != nil {
- t.Fatalf("failed to create test directory: %s", err)
- }
- return dir
-}
-
-// tempMkFile makes a temporary file.
-func tempMkFile(t *testing.T, dir string) string {
- f, err := ioutil.TempFile(dir, "fsnotify")
- if err != nil {
- t.Fatalf("failed to create test file: %v", err)
- }
- defer f.Close()
- return f.Name()
-}
-
-// newWatcher initializes an fsnotify Watcher instance.
-func newWatcher(t *testing.T) *Watcher {
- watcher, err := NewWatcher()
- if err != nil {
- t.Fatalf("NewWatcher() failed: %s", err)
- }
- return watcher
-}
-
-// addWatch adds a watch for a directory
-func addWatch(t *testing.T, watcher *Watcher, dir string) {
- if err := watcher.Add(dir); err != nil {
- t.Fatalf("watcher.Add(%q) failed: %s", dir, err)
- }
-}
-
-func TestFsnotifyMultipleOperations(t *testing.T) {
- watcher := newWatcher(t)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create directory that's not watched
- testDirToMoveFiles := tempMkdir(t)
- defer os.RemoveAll(testDirToMoveFiles)
-
- testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile")
- testFileRenamed := filepath.Join(testDirToMoveFiles, "TestFsnotifySeqRename.testfile")
-
- addWatch(t, watcher, testDir)
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var createReceived, modifyReceived, deleteReceived, renameReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) {
- t.Logf("event received: %s", event)
- if event.Op&Remove == Remove {
- deleteReceived.increment()
- }
- if event.Op&Write == Write {
- modifyReceived.increment()
- }
- if event.Op&Create == Create {
- createReceived.increment()
- }
- if event.Op&Rename == Rename {
- renameReceived.increment()
- }
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- time.Sleep(time.Millisecond)
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- if err := testRename(testFile, testFileRenamed); err != nil {
- t.Fatalf("rename failed: %s", err)
- }
-
- // Modify the file outside of the watched dir
- f, err = os.Open(testFileRenamed)
- if err != nil {
- t.Fatalf("open test renamed file failed: %s", err)
- }
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // Recreate the file that was moved
- f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Close()
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- cReceived := createReceived.value()
- if cReceived != 2 {
- t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2)
- }
- mReceived := modifyReceived.value()
- if mReceived != 1 {
- t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1)
- }
- dReceived := deleteReceived.value()
- rReceived := renameReceived.value()
- if dReceived+rReceived != 1 {
- t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", rReceived+dReceived, 1)
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-}
-
-func TestFsnotifyMultipleCreates(t *testing.T) {
- watcher := newWatcher(t)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile")
-
- addWatch(t, watcher, testDir)
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var createReceived, modifyReceived, deleteReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) {
- t.Logf("event received: %s", event)
- if event.Op&Remove == Remove {
- deleteReceived.increment()
- }
- if event.Op&Create == Create {
- createReceived.increment()
- }
- if event.Op&Write == Write {
- modifyReceived.increment()
- }
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- time.Sleep(time.Millisecond)
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- os.Remove(testFile)
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // Recreate the file
- f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Close()
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // Modify
- f, err = os.OpenFile(testFile, os.O_WRONLY, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- time.Sleep(time.Millisecond)
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // Modify
- f, err = os.OpenFile(testFile, os.O_WRONLY, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- time.Sleep(time.Millisecond)
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- cReceived := createReceived.value()
- if cReceived != 2 {
- t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2)
- }
- mReceived := modifyReceived.value()
- if mReceived < 3 {
- t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3)
- }
- dReceived := deleteReceived.value()
- if dReceived != 1 {
- t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", dReceived, 1)
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-}
-
-func TestFsnotifyDirOnly(t *testing.T) {
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create a file before watching directory
- // This should NOT add any events to the fsnotify event queue
- testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile")
- {
- var f *os.File
- f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
- }
-
- addWatch(t, watcher, testDir)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- testFile := filepath.Join(testDir, "TestFsnotifyDirOnly.testfile")
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var createReceived, modifyReceived, deleteReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileAlreadyExists) {
- t.Logf("event received: %s", event)
- if event.Op&Remove == Remove {
- deleteReceived.increment()
- }
- if event.Op&Write == Write {
- modifyReceived.increment()
- }
- if event.Op&Create == Create {
- createReceived.increment()
- }
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- time.Sleep(time.Millisecond)
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete
-
- os.Remove(testFile)
- os.Remove(testFileAlreadyExists)
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- cReceived := createReceived.value()
- if cReceived != 1 {
- t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 1)
- }
- mReceived := modifyReceived.value()
- if mReceived != 1 {
- t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1)
- }
- dReceived := deleteReceived.value()
- if dReceived != 2 {
- t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2)
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-}
-
-func TestFsnotifyDeleteWatchedDir(t *testing.T) {
- watcher := newWatcher(t)
- defer watcher.Close()
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create a file before watching directory
- testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile")
- {
- var f *os.File
- f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
- }
-
- addWatch(t, watcher, testDir)
-
- // Add a watch for testFile
- addWatch(t, watcher, testFileAlreadyExists)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var deleteReceived counter
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFileAlreadyExists) {
- t.Logf("event received: %s", event)
- if event.Op&Remove == Remove {
- deleteReceived.increment()
- }
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- }()
-
- os.RemoveAll(testDir)
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- dReceived := deleteReceived.value()
- if dReceived < 2 {
- t.Fatalf("did not receive at least %d delete events, received %d after 500 ms", 2, dReceived)
- }
-}
-
-func TestFsnotifySubDir(t *testing.T) {
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- testFile1 := filepath.Join(testDir, "TestFsnotifyFile1.testfile")
- testSubDir := filepath.Join(testDir, "sub")
- testSubDirFile := filepath.Join(testDir, "sub/TestFsnotifyFile1.testfile")
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var createReceived, deleteReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testSubDir) || event.Name == filepath.Clean(testFile1) {
- t.Logf("event received: %s", event)
- if event.Op&Create == Create {
- createReceived.increment()
- }
- if event.Op&Remove == Remove {
- deleteReceived.increment()
- }
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- addWatch(t, watcher, testDir)
-
- // Create sub-directory
- if err := os.Mkdir(testSubDir, 0777); err != nil {
- t.Fatalf("failed to create test sub-directory: %s", err)
- }
-
- // Create a file
- var f *os.File
- f, err := os.OpenFile(testFile1, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
-
- // Create a file (Should not see this! we are not watching subdir)
- var fs *os.File
- fs, err = os.OpenFile(testSubDirFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- fs.Sync()
- fs.Close()
-
- time.Sleep(200 * time.Millisecond)
-
- // Make sure receive deletes for both file and sub-directory
- os.RemoveAll(testSubDir)
- os.Remove(testFile1)
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- cReceived := createReceived.value()
- if cReceived != 2 {
- t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2)
- }
- dReceived := deleteReceived.value()
- if dReceived != 2 {
- t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2)
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-}
-
-func TestFsnotifyRename(t *testing.T) {
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- addWatch(t, watcher, testDir)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- testFile := filepath.Join(testDir, "TestFsnotifyEvents.testfile")
- testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed")
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var renameReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) {
- if event.Op&Rename == Rename {
- renameReceived.increment()
- }
- t.Logf("event received: %s", event)
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- // Add a watch for testFile
- addWatch(t, watcher, testFile)
-
- if err := testRename(testFile, testFileRenamed); err != nil {
- t.Fatalf("rename failed: %s", err)
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- if renameReceived.value() == 0 {
- t.Fatal("fsnotify rename events have not been received after 500 ms")
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-
- os.Remove(testFileRenamed)
-}
-
-func TestFsnotifyRenameToCreate(t *testing.T) {
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create directory to get file
- testDirFrom := tempMkdir(t)
- defer os.RemoveAll(testDirFrom)
-
- addWatch(t, watcher, testDir)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile")
- testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed")
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var createReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) {
- if event.Op&Create == Create {
- createReceived.increment()
- }
- t.Logf("event received: %s", event)
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
-
- if err := testRename(testFile, testFileRenamed); err != nil {
- t.Fatalf("rename failed: %s", err)
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- if createReceived.value() == 0 {
- t.Fatal("fsnotify create events have not been received after 500 ms")
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-
- os.Remove(testFileRenamed)
-}
-
-func TestFsnotifyRenameToOverwrite(t *testing.T) {
- switch runtime.GOOS {
- case "plan9", "windows":
- t.Skipf("skipping test on %q (os.Rename over existing file does not create event).", runtime.GOOS)
- }
-
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create directory to get file
- testDirFrom := tempMkdir(t)
- defer os.RemoveAll(testDirFrom)
-
- testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile")
- testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed")
-
- // Create a file
- var fr *os.File
- fr, err := os.OpenFile(testFileRenamed, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- fr.Sync()
- fr.Close()
-
- addWatch(t, watcher, testDir)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- var eventReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testFileRenamed) {
- eventReceived.increment()
- t.Logf("event received: %s", event)
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
-
- if err := testRename(testFile, testFileRenamed); err != nil {
- t.Fatalf("rename failed: %s", err)
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
- if eventReceived.value() == 0 {
- t.Fatal("fsnotify events have not been received after 500 ms")
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(2 * time.Second):
- t.Fatal("event stream was not closed after 2 seconds")
- }
-
- os.Remove(testFileRenamed)
-}
-
-func TestRemovalOfWatch(t *testing.T) {
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create a file before watching directory
- testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile")
- {
- var f *os.File
- f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
- }
-
- watcher := newWatcher(t)
- defer watcher.Close()
-
- addWatch(t, watcher, testDir)
- if err := watcher.Remove(testDir); err != nil {
- t.Fatalf("Could not remove the watch: %v\n", err)
- }
-
- go func() {
- select {
- case ev := <-watcher.Events:
- t.Fatalf("We received event: %v\n", ev)
- case <-time.After(500 * time.Millisecond):
- t.Log("No event received, as expected.")
- }
- }()
-
- time.Sleep(200 * time.Millisecond)
- // Modify the file outside of the watched dir
- f, err := os.Open(testFileAlreadyExists)
- if err != nil {
- t.Fatalf("Open test file failed: %s", err)
- }
- f.WriteString("data")
- f.Sync()
- f.Close()
- if err := os.Chmod(testFileAlreadyExists, 0700); err != nil {
- t.Fatalf("chmod failed: %s", err)
- }
- time.Sleep(400 * time.Millisecond)
-}
-
-func TestFsnotifyAttrib(t *testing.T) {
- if runtime.GOOS == "windows" {
- t.Skip("attributes don't work on Windows.")
- }
-
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for err := range watcher.Errors {
- t.Fatalf("error received: %s", err)
- }
- }()
-
- testFile := filepath.Join(testDir, "TestFsnotifyAttrib.testfile")
-
- // Receive events on the event channel on a separate goroutine
- eventstream := watcher.Events
- // The modifyReceived counter counts IsModify events that are not IsAttrib,
- // and the attribReceived counts IsAttrib events (which are also IsModify as
- // a consequence).
- var modifyReceived counter
- var attribReceived counter
- done := make(chan bool)
- go func() {
- for event := range eventstream {
- // Only count relevant events
- if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) {
- if event.Op&Write == Write {
- modifyReceived.increment()
- }
- if event.Op&Chmod == Chmod {
- attribReceived.increment()
- }
- t.Logf("event received: %s", event)
- } else {
- t.Logf("unexpected event received: %s", event)
- }
- }
- done <- true
- }()
-
- // Create a file
- // This should add at least one event to the fsnotify event queue
- var f *os.File
- f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
-
- f.WriteString("data")
- f.Sync()
- f.Close()
-
- // Add a watch for testFile
- addWatch(t, watcher, testFile)
-
- if err := os.Chmod(testFile, 0700); err != nil {
- t.Fatalf("chmod failed: %s", err)
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- // Creating/writing a file changes also the mtime, so IsAttrib should be set to true here
- time.Sleep(500 * time.Millisecond)
- if modifyReceived.value() != 0 {
- t.Fatal("received an unexpected modify event when creating a test file")
- }
- if attribReceived.value() == 0 {
- t.Fatal("fsnotify attribute events have not received after 500 ms")
- }
-
- // Modifying the contents of the file does not set the attrib flag (although eg. the mtime
- // might have been modified).
- modifyReceived.reset()
- attribReceived.reset()
-
- f, err = os.OpenFile(testFile, os.O_WRONLY, 0)
- if err != nil {
- t.Fatalf("reopening test file failed: %s", err)
- }
-
- f.WriteString("more data")
- f.Sync()
- f.Close()
-
- time.Sleep(500 * time.Millisecond)
-
- if modifyReceived.value() != 1 {
- t.Fatal("didn't receive a modify event after changing test file contents")
- }
-
- if attribReceived.value() != 0 {
- t.Fatal("did receive an unexpected attrib event after changing test file contents")
- }
-
- modifyReceived.reset()
- attribReceived.reset()
-
- // Doing a chmod on the file should trigger an event with the "attrib" flag set (the contents
- // of the file are not changed though)
- if err := os.Chmod(testFile, 0600); err != nil {
- t.Fatalf("chmod failed: %s", err)
- }
-
- time.Sleep(500 * time.Millisecond)
-
- if attribReceived.value() != 1 {
- t.Fatal("didn't receive an attribute change after 500ms")
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
- t.Log("waiting for the event channel to become closed...")
- select {
- case <-done:
- t.Log("event channel closed")
- case <-time.After(1e9):
- t.Fatal("event stream was not closed after 1 second")
- }
-
- os.Remove(testFile)
-}
-
-func TestFsnotifyClose(t *testing.T) {
- watcher := newWatcher(t)
- watcher.Close()
-
- var done int32
- go func() {
- watcher.Close()
- atomic.StoreInt32(&done, 1)
- }()
-
- time.Sleep(50e6) // 50 ms
- if atomic.LoadInt32(&done) == 0 {
- t.Fatal("double Close() test failed: second Close() call didn't return")
- }
-
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- if err := watcher.Add(testDir); err == nil {
- t.Fatal("expected error on Watch() after Close(), got nil")
- }
-}
-
-func TestFsnotifyFakeSymlink(t *testing.T) {
- if runtime.GOOS == "windows" {
- t.Skip("symlinks don't work on Windows.")
- }
-
- watcher := newWatcher(t)
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- var errorsReceived counter
- // Receive errors on the error channel on a separate goroutine
- go func() {
- for errors := range watcher.Errors {
- t.Logf("Received error: %s", errors)
- errorsReceived.increment()
- }
- }()
-
- // Count the CREATE events received
- var createEventsReceived, otherEventsReceived counter
- go func() {
- for ev := range watcher.Events {
- t.Logf("event received: %s", ev)
- if ev.Op&Create == Create {
- createEventsReceived.increment()
- } else {
- otherEventsReceived.increment()
- }
- }
- }()
-
- addWatch(t, watcher, testDir)
-
- if err := os.Symlink(filepath.Join(testDir, "zzz"), filepath.Join(testDir, "zzznew")); err != nil {
- t.Fatalf("Failed to create bogus symlink: %s", err)
- }
- t.Logf("Created bogus symlink")
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
-
- // Should not be error, just no events for broken links (watching nothing)
- if errorsReceived.value() > 0 {
- t.Fatal("fsnotify errors have been received.")
- }
- if otherEventsReceived.value() > 0 {
- t.Fatal("fsnotify other events received on the broken link")
- }
-
- // Except for 1 create event (for the link itself)
- if createEventsReceived.value() == 0 {
- t.Fatal("fsnotify create events were not received after 500 ms")
- }
- if createEventsReceived.value() > 1 {
- t.Fatal("fsnotify more create events received than expected")
- }
-
- // Try closing the fsnotify instance
- t.Log("calling Close()")
- watcher.Close()
-}
-
-func TestCyclicSymlink(t *testing.T) {
- if runtime.GOOS == "windows" {
- t.Skip("symlinks don't work on Windows.")
- }
-
- watcher := newWatcher(t)
-
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- link := path.Join(testDir, "link")
- if err := os.Symlink(".", link); err != nil {
- t.Fatalf("could not make symlink: %v", err)
- }
- addWatch(t, watcher, testDir)
-
- var createEventsReceived counter
- go func() {
- for ev := range watcher.Events {
- if ev.Op&Create == Create {
- createEventsReceived.increment()
- }
- }
- }()
-
- if err := os.Remove(link); err != nil {
- t.Fatalf("Error removing link: %v", err)
- }
-
- // It would be nice to be able to expect a delete event here, but kqueue has
- // no way for us to get events on symlinks themselves, because opening them
- // opens an fd to the file to which they point.
-
- if err := ioutil.WriteFile(link, []byte("foo"), 0700); err != nil {
- t.Fatalf("could not make symlink: %v", err)
- }
-
- // We expect this event to be received almost immediately, but let's wait 500 ms to be sure
- time.Sleep(500 * time.Millisecond)
-
- if got := createEventsReceived.value(); got == 0 {
- t.Errorf("want at least 1 create event got %v", got)
- }
-
- watcher.Close()
-}
-
-// TestConcurrentRemovalOfWatch tests that concurrent calls to RemoveWatch do not race.
-// See https://codereview.appspot.com/103300045/
-// go test -test.run=TestConcurrentRemovalOfWatch -test.cpu=1,1,1,1,1 -race
-func TestConcurrentRemovalOfWatch(t *testing.T) {
- if runtime.GOOS != "darwin" {
- t.Skip("regression test for race only present on darwin")
- }
-
- // Create directory to watch
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- // Create a file before watching directory
- testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile")
- {
- var f *os.File
- f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666)
- if err != nil {
- t.Fatalf("creating test file failed: %s", err)
- }
- f.Sync()
- f.Close()
- }
-
- watcher := newWatcher(t)
- defer watcher.Close()
-
- addWatch(t, watcher, testDir)
-
- // Test that RemoveWatch can be invoked concurrently, with no data races.
- removed1 := make(chan struct{})
- go func() {
- defer close(removed1)
- watcher.Remove(testDir)
- }()
- removed2 := make(chan struct{})
- go func() {
- close(removed2)
- watcher.Remove(testDir)
- }()
- <-removed1
- <-removed2
-}
-
-func TestClose(t *testing.T) {
- // Regression test for #59 bad file descriptor from Close
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- watcher := newWatcher(t)
- if err := watcher.Add(testDir); err != nil {
- t.Fatalf("Expected no error on Add, got %v", err)
- }
- err := watcher.Close()
- if err != nil {
- t.Fatalf("Expected no error on Close, got %v.", err)
- }
-}
-
-// TestRemoveWithClose tests if one can handle Remove events and, at the same
-// time, close Watcher object without any data races.
-func TestRemoveWithClose(t *testing.T) {
- testDir := tempMkdir(t)
- defer os.RemoveAll(testDir)
-
- const fileN = 200
- tempFiles := make([]string, 0, fileN)
- for i := 0; i < fileN; i++ {
- tempFiles = append(tempFiles, tempMkFile(t, testDir))
- }
- watcher := newWatcher(t)
- if err := watcher.Add(testDir); err != nil {
- t.Fatalf("Expected no error on Add, got %v", err)
- }
- startC, stopC := make(chan struct{}), make(chan struct{})
- errC := make(chan error)
- go func() {
- for {
- select {
- case <-watcher.Errors:
- case <-watcher.Events:
- case <-stopC:
- return
- }
- }
- }()
- go func() {
- <-startC
- for _, fileName := range tempFiles {
- os.Remove(fileName)
- }
- }()
- go func() {
- <-startC
- errC <- watcher.Close()
- }()
- close(startC)
- defer close(stopC)
- if err := <-errC; err != nil {
- t.Fatalf("Expected no error on Close, got %v.", err)
- }
-}
-
-func testRename(file1, file2 string) error {
- switch runtime.GOOS {
- case "windows", "plan9":
- return os.Rename(file1, file2)
- default:
- cmd := exec.Command("mv", file1, file2)
- return cmd.Run()
- }
-}
diff --git a/vendor/github.com/go-ini/ini/.github/ISSUE_TEMPLATE.md b/vendor/github.com/go-ini/ini/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 849f69f4b..000000000
--- a/vendor/github.com/go-ini/ini/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,5 +0,0 @@
-### Please give general description of the problem
-
-### Please provide code snippets to reproduce the problem described above
-
-### Do you have any suggestion to fix the problem? \ No newline at end of file
diff --git a/vendor/github.com/go-ini/ini/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/go-ini/ini/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index b4565aeb5..000000000
--- a/vendor/github.com/go-ini/ini/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-### What problem should be fixed?
-
-### Have you added test cases to catch the problem?
diff --git a/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/go-ini/ini/.travis.yml
index b097527e1..75fe7b74b 100644
--- a/vendor/github.com/go-ini/ini/.travis.yml
+++ b/vendor/github.com/go-ini/ini/.travis.yml
@@ -6,8 +6,9 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
+ - 1.10.x
-script:
+script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/smartystreets/goconvey
- mkdir -p $HOME/gopath/src/gopkg.in
diff --git a/vendor/github.com/go-ini/ini/Makefile b/vendor/github.com/go-ini/ini/Makefile
index 1316911d2..af27ff076 100644
--- a/vendor/github.com/go-ini/ini/Makefile
+++ b/vendor/github.com/go-ini/ini/Makefile
@@ -12,4 +12,4 @@ vet:
go vet
coverage:
- go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out \ No newline at end of file
+ go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out
diff --git a/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/go-ini/ini/README.md
index f4ff27cd3..95d920d6b 100644
--- a/vendor/github.com/go-ini/ini/README.md
+++ b/vendor/github.com/go-ini/ini/README.md
@@ -5,11 +5,9 @@ INI [![Build Status](https://travis-ci.org/go-ini/ini.svg?branch=master)](https:
Package ini provides INI file read and write functionality in Go.
-[简体中文](README_ZH.md)
+## Features
-## Feature
-
-- Load multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites.
+- Load from multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites.
- Read with recursion values.
- Read with parent-child sections.
- Read with auto-increment key names.
@@ -24,739 +22,22 @@ Package ini provides INI file read and write functionality in Go.
To use a tagged revision:
- go get gopkg.in/ini.v1
-
-To use with latest changes:
-
- go get github.com/go-ini/ini
-
-Please add `-u` flag to update in the future.
-
-### Testing
-
-If you want to test on your machine, please apply `-t` flag:
-
- go get -t gopkg.in/ini.v1
-
-Please add `-u` flag to update in the future.
-
-## Getting Started
-
-### Loading from data sources
-
-A **Data Source** is either raw data in type `[]byte`, a file name with type `string` or `io.ReadCloser`. You can load **as many data sources as you want**. Passing other types will simply return an error.
-
-```go
-cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data"))))
+```sh
+$ go get gopkg.in/ini.v1
```
-Or start with an empty object:
-
-```go
-cfg := ini.Empty()
-```
-
-When you cannot decide how many data sources to load at the beginning, you will still be able to **Append()** them later.
-
-```go
-err := cfg.Append("other file", []byte("other raw data"))
-```
-
-If you have a list of files with possibilities that some of them may not available at the time, and you don't know exactly which ones, you can use `LooseLoad` to ignore nonexistent files without returning error.
-
-```go
-cfg, err := ini.LooseLoad("filename", "filename_404")
-```
-
-The cool thing is, whenever the file is available to load while you're calling `Reload` method, it will be counted as usual.
-
-#### Ignore cases of key name
-
-When you do not care about cases of section and key names, you can use `InsensitiveLoad` to force all names to be lowercased while parsing.
-
-```go
-cfg, err := ini.InsensitiveLoad("filename")
-//...
-
-// sec1 and sec2 are the exactly same section object
-sec1, err := cfg.GetSection("Section")
-sec2, err := cfg.GetSection("SecTIOn")
-
-// key1 and key2 are the exactly same key object
-key1, err := sec1.GetKey("Key")
-key2, err := sec2.GetKey("KeY")
-```
-
-#### MySQL-like boolean key
-
-MySQL's configuration allows a key without value as follows:
-
-```ini
-[mysqld]
-...
-skip-host-cache
-skip-name-resolve
-```
-
-By default, this is considered as missing value. But if you know you're going to deal with those cases, you can assign advanced load options:
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
-```
-
-The value of those keys are always `true`, and when you save to a file, it will keep in the same foramt as you read.
-
-To generate such keys in your program, you could use `NewBooleanKey`:
-
-```go
-key, err := sec.NewBooleanKey("skip-host-cache")
-```
-
-#### Comment
-
-Take care that following format will be treated as comment:
-
-1. Line begins with `#` or `;`
-2. Words after `#` or `;`
-3. Words after section name (i.e words after `[some section name]`)
-
-If you want to save a value with `#` or `;`, please quote them with ``` ` ``` or ``` """ ```.
-
-Alternatively, you can use following `LoadOptions` to completely ignore inline comments:
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: true}, "app.ini"))
-```
-
-### Working with sections
-
-To get a section, you would need to:
-
-```go
-section, err := cfg.GetSection("section name")
-```
-
-For a shortcut for default section, just give an empty string as name:
-
-```go
-section, err := cfg.GetSection("")
-```
-
-When you're pretty sure the section exists, following code could make your life easier:
-
-```go
-section := cfg.Section("section name")
-```
-
-What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you.
-
-To create a new section:
-
-```go
-err := cfg.NewSection("new section")
-```
-
-To get a list of sections or section names:
-
-```go
-sections := cfg.Sections()
-names := cfg.SectionStrings()
-```
-
-### Working with keys
-
-To get a key under a section:
-
-```go
-key, err := cfg.Section("").GetKey("key name")
-```
-
-Same rule applies to key operations:
-
-```go
-key := cfg.Section("").Key("key name")
-```
-
-To check if a key exists:
-
-```go
-yes := cfg.Section("").HasKey("key name")
-```
-
-To create a new key:
-
-```go
-err := cfg.Section("").NewKey("name", "value")
-```
-
-To get a list of keys or key names:
-
-```go
-keys := cfg.Section("").Keys()
-names := cfg.Section("").KeyStrings()
-```
-
-To get a clone hash of keys and corresponding values:
-
-```go
-hash := cfg.Section("").KeysHash()
-```
-
-### Working with values
-
-To get a string value:
-
-```go
-val := cfg.Section("").Key("key name").String()
-```
-
-To validate key value on the fly:
-
-```go
-val := cfg.Section("").Key("key name").Validate(func(in string) string {
- if len(in) == 0 {
- return "default"
- }
- return in
-})
-```
-
-If you do not want any auto-transformation (such as recursive read) for the values, you can get raw value directly (this way you get much better performance):
-
-```go
-val := cfg.Section("").Key("key name").Value()
-```
-
-To check if raw value exists:
-
-```go
-yes := cfg.Section("").HasValue("test value")
-```
-
-To get value with types:
-
-```go
-// For boolean values:
-// true when value is: 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On
-// false when value is: 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off
-v, err = cfg.Section("").Key("BOOL").Bool()
-v, err = cfg.Section("").Key("FLOAT64").Float64()
-v, err = cfg.Section("").Key("INT").Int()
-v, err = cfg.Section("").Key("INT64").Int64()
-v, err = cfg.Section("").Key("UINT").Uint()
-v, err = cfg.Section("").Key("UINT64").Uint64()
-v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339)
-v, err = cfg.Section("").Key("TIME").Time() // RFC3339
-
-v = cfg.Section("").Key("BOOL").MustBool()
-v = cfg.Section("").Key("FLOAT64").MustFloat64()
-v = cfg.Section("").Key("INT").MustInt()
-v = cfg.Section("").Key("INT64").MustInt64()
-v = cfg.Section("").Key("UINT").MustUint()
-v = cfg.Section("").Key("UINT64").MustUint64()
-v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339)
-v = cfg.Section("").Key("TIME").MustTime() // RFC3339
-
-// Methods start with Must also accept one argument for default value
-// when key not found or fail to parse value to given type.
-// Except method MustString, which you have to pass a default value.
-
-v = cfg.Section("").Key("String").MustString("default")
-v = cfg.Section("").Key("BOOL").MustBool(true)
-v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25)
-v = cfg.Section("").Key("INT").MustInt(10)
-v = cfg.Section("").Key("INT64").MustInt64(99)
-v = cfg.Section("").Key("UINT").MustUint(3)
-v = cfg.Section("").Key("UINT64").MustUint64(6)
-v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now())
-v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339
-```
-
-What if my value is three-line long?
-
-```ini
-[advance]
-ADDRESS = """404 road,
-NotFound, State, 5000
-Earth"""
-```
-
-Not a problem!
-
-```go
-cfg.Section("advance").Key("ADDRESS").String()
-
-/* --- start ---
-404 road,
-NotFound, State, 5000
-Earth
------- end --- */
-```
-
-That's cool, how about continuation lines?
-
-```ini
-[advance]
-two_lines = how about \
- continuation lines?
-lots_of_lines = 1 \
- 2 \
- 3 \
- 4
-```
-
-Piece of cake!
-
-```go
-cfg.Section("advance").Key("two_lines").String() // how about continuation lines?
-cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4
-```
-
-Well, I hate continuation lines, how do I disable that?
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{
- IgnoreContinuation: true,
-}, "filename")
-```
-
-Holy crap!
-
-Note that single quotes around values will be stripped:
-
-```ini
-foo = "some value" // foo: some value
-bar = 'some value' // bar: some value
-```
-
-Sometimes you downloaded file from [Crowdin](https://crowdin.com/) has values like the following (value is surrounded by double quotes and quotes in the value are escaped):
-
-```ini
-create_repo="created repository <a href=\"%s\">%s</a>"
-```
-
-How do you transform this to regular format automatically?
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{UnescapeValueDoubleQuotes: true}, "en-US.ini"))
-cfg.Section("<name of your section>").Key("create_repo").String()
-// You got: created repository <a href="%s">%s</a>
-```
-
-That's all? Hmm, no.
-
-#### Helper methods of working with values
-
-To get value with given candidates:
-
-```go
-v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"})
-v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75})
-v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30})
-v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30})
-v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9})
-v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9})
-v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3})
-v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339
-```
-
-Default value will be presented if value of key is not in candidates you given, and default value does not need be one of candidates.
-
-To validate value in a given range:
-
-```go
-vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2)
-vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20)
-vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20)
-vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9)
-vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9)
-vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime)
-vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339
-```
-
-##### Auto-split values into a slice
-
-To use zero value of type for invalid inputs:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0]
-vals = cfg.Section("").Key("STRINGS").Strings(",")
-vals = cfg.Section("").Key("FLOAT64S").Float64s(",")
-vals = cfg.Section("").Key("INTS").Ints(",")
-vals = cfg.Section("").Key("INT64S").Int64s(",")
-vals = cfg.Section("").Key("UINTS").Uints(",")
-vals = cfg.Section("").Key("UINT64S").Uint64s(",")
-vals = cfg.Section("").Key("TIMES").Times(",")
-```
-
-To exclude invalid values out of result slice:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> [2.2]
-vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",")
-vals = cfg.Section("").Key("INTS").ValidInts(",")
-vals = cfg.Section("").Key("INT64S").ValidInt64s(",")
-vals = cfg.Section("").Key("UINTS").ValidUints(",")
-vals = cfg.Section("").Key("UINT64S").ValidUint64s(",")
-vals = cfg.Section("").Key("TIMES").ValidTimes(",")
-```
-
-Or to return nothing but error when have invalid inputs:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> error
-vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",")
-vals = cfg.Section("").Key("INTS").StrictInts(",")
-vals = cfg.Section("").Key("INT64S").StrictInt64s(",")
-vals = cfg.Section("").Key("UINTS").StrictUints(",")
-vals = cfg.Section("").Key("UINT64S").StrictUint64s(",")
-vals = cfg.Section("").Key("TIMES").StrictTimes(",")
-```
-
-### Save your configuration
-
-Finally, it's time to save your configuration to somewhere.
-
-A typical way to save configuration is writing it to a file:
-
-```go
-// ...
-err = cfg.SaveTo("my.ini")
-err = cfg.SaveToIndent("my.ini", "\t")
-```
-
-Another way to save is writing to a `io.Writer` interface:
-
-```go
-// ...
-cfg.WriteTo(writer)
-cfg.WriteToIndent(writer, "\t")
-```
-
-By default, spaces are used to align "=" sign between key and values, to disable that:
-
-```go
-ini.PrettyFormat = false
-```
-
-## Advanced Usage
-
-### Recursive Values
-
-For all value of keys, there is a special syntax `%(<name>)s`, where `<name>` is the key name in same section or default section, and `%(<name>)s` will be replaced by corresponding value(empty string if key not found). You can use this syntax at most 99 level of recursions.
-
-```ini
-NAME = ini
-
-[author]
-NAME = Unknwon
-GITHUB = https://github.com/%(NAME)s
-
-[package]
-FULL_NAME = github.com/go-ini/%(NAME)s
-```
-
-```go
-cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon
-cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini
-```
-
-### Parent-child Sections
-
-You can use `.` in section name to indicate parent-child relationship between two or more sections. If the key not found in the child section, library will try again on its parent section until there is no parent section.
-
-```ini
-NAME = ini
-VERSION = v1
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
-[package]
-CLONE_URL = https://%(IMPORT_PATH)s
-
-[package.sub]
-```
-
-```go
-cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1
-```
-
-#### Retrieve parent keys available to a child section
-
-```go
-cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"]
-```
-
-### Unparseable Sections
-
-Sometimes, you have sections that do not contain key-value pairs but raw content, to handle such case, you can use `LoadOptions.UnparsableSections`:
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS]
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>`))
-
-body := cfg.Section("COMMENTS").Body()
-
-/* --- start ---
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>
------- end --- */
-```
-
-### Auto-increment Key Names
-
-If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter.
-
-```ini
-[features]
--: Support read/write comments of keys and sections
--: Support auto-increment of key names
--: Support load multiple files to overwrite key values
-```
-
-```go
-cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"}
-```
-
-### Map To Struct
-
-Want more objective way to play with INI? Cool.
-
-```ini
-Name = Unknwon
-age = 21
-Male = true
-Born = 1993-01-01T20:17:05Z
-
-[Note]
-Content = Hi is a good man!
-Cities = HangZhou, Boston
-```
-
-```go
-type Note struct {
- Content string
- Cities []string
-}
-
-type Person struct {
- Name string
- Age int `ini:"age"`
- Male bool
- Born time.Time
- Note
- Created time.Time `ini:"-"`
-}
-
-func main() {
- cfg, err := ini.Load("path/to/ini")
- // ...
- p := new(Person)
- err = cfg.MapTo(p)
- // ...
-
- // Things can be simpler.
- err = ini.MapTo(p, "path/to/ini")
- // ...
-
- // Just map a section? Fine.
- n := new(Note)
- err = cfg.Section("Note").MapTo(n)
- // ...
-}
-```
-
-Can I have default value for field? Absolutely.
-
-Assign it before you map to struct. It will keep the value as it is if the key is not presented or got wrong type.
-
-```go
-// ...
-p := &Person{
- Name: "Joe",
-}
-// ...
-```
-
-It's really cool, but what's the point if you can't give me my file back from struct?
-
-### Reflect From Struct
-
-Why not?
-
-```go
-type Embeded struct {
- Dates []time.Time `delim:"|" comment:"Time data"`
- Places []string `ini:"places,omitempty"`
- None []int `ini:",omitempty"`
-}
-
-type Author struct {
- Name string `ini:"NAME"`
- Male bool
- Age int `comment:"Author's age"`
- GPA float64
- NeverMind string `ini:"-"`
- *Embeded `comment:"Embeded section"`
-}
-
-func main() {
- a := &Author{"Unknwon", true, 21, 2.8, "",
- &Embeded{
- []time.Time{time.Now(), time.Now()},
- []string{"HangZhou", "Boston"},
- []int{},
- }}
- cfg := ini.Empty()
- err = ini.ReflectFrom(cfg, a)
- // ...
-}
-```
-
-So, what do I get?
-
-```ini
-NAME = Unknwon
-Male = true
-; Author's age
-Age = 21
-GPA = 2.8
-
-; Embeded section
-[Embeded]
-; Time data
-Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00
-places = HangZhou,Boston
-```
-
-#### Name Mapper
-
-To save your time and make your code cleaner, this library supports [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) between struct field and actual section and key name.
-
-There are 2 built-in name mappers:
-
-- `AllCapsUnderscore`: it converts to format `ALL_CAPS_UNDERSCORE` then match section or key.
-- `TitleUnderscore`: it converts to format `title_underscore` then match section or key.
-
-To use them:
-
-```go
-type Info struct {
- PackageName string
-}
-
-func main() {
- err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini"))
- // ...
-
- cfg, err := ini.Load([]byte("PACKAGE_NAME=ini"))
- // ...
- info := new(Info)
- cfg.NameMapper = ini.AllCapsUnderscore
- err = cfg.MapTo(info)
- // ...
-}
-```
-
-Same rules of name mapper apply to `ini.ReflectFromWithMapper` function.
-
-#### Value Mapper
-
-To expand values (e.g. from environment variables), you can use the `ValueMapper` to transform values:
-
-```go
-type Env struct {
- Foo string `ini:"foo"`
-}
-
-func main() {
- cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n")
- cfg.ValueMapper = os.ExpandEnv
- // ...
- env := &Env{}
- err = cfg.Section("env").MapTo(env)
-}
-```
-
-This would set the value of `env.Foo` to the value of the environment variable `MY_VAR`.
-
-#### Other Notes On Map/Reflect
-
-Any embedded struct is treated as a section by default, and there is no automatic parent-child relations in map/reflect feature:
-
-```go
-type Child struct {
- Age string
-}
-
-type Parent struct {
- Name string
- Child
-}
-
-type Config struct {
- City string
- Parent
-}
-```
-
-Example configuration:
-
-```ini
-City = Boston
-
-[Parent]
-Name = Unknwon
-
-[Child]
-Age = 21
-```
-
-What if, yes, I'm paranoid, I want embedded struct to be in the same section. Well, all roads lead to Rome.
-
-```go
-type Child struct {
- Age string
-}
-
-type Parent struct {
- Name string
- Child `ini:"Parent"`
-}
+To use with latest changes:
-type Config struct {
- City string
- Parent
-}
+```sh
+$ go get github.com/go-ini/ini
```
-Example configuration:
-
-```ini
-City = Boston
-
-[Parent]
-Name = Unknwon
-Age = 21
-```
+Please add `-u` flag to update in the future.
## Getting Help
+- [Getting Started](https://ini.unknwon.io/docs/intro/getting_started)
- [API Documentation](https://gowalker.org/gopkg.in/ini.v1)
-- [File An Issue](https://github.com/go-ini/ini/issues/new)
-
-## FAQs
-
-### What does `BlockMode` field do?
-
-By default, library lets you read and write values so we need a locker to make sure your data is safe. But in cases that you are very sure about only reading data through the library, you can set `cfg.BlockMode = false` to speed up read operations about **50-70%** faster.
-
-### Why another INI library?
-
-Many people are using my another INI library [goconfig](https://github.com/Unknwon/goconfig), so the reason for this one is I would like to make more Go style code. Also when you set `cfg.BlockMode = false`, this one is about **10-30%** faster.
-
-To make those changes I have to confirm API broken, so it's safer to keep it in another place and start using `gopkg.in` to version my package at this time.(PS: shorter import path)
## License
diff --git a/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/go-ini/ini/README_ZH.md
deleted file mode 100644
index 69aefef12..000000000
--- a/vendor/github.com/go-ini/ini/README_ZH.md
+++ /dev/null
@@ -1,750 +0,0 @@
-本包æ供了 Go 语言中读写 INI 文件的功能。
-
-## 功能特性
-
-- 支æŒè¦†ç›–加载多个数æ®æºï¼ˆ`[]byte`ã€æ–‡ä»¶å’Œ `io.ReadCloser`)
-- 支æŒé€’归读å–键值
-- 支æŒè¯»å–父å­åˆ†åŒº
-- 支æŒè¯»å–自增键å
-- 支æŒè¯»å–多行的键值
-- 支æŒå¤§é‡è¾…助方法
-- 支æŒåœ¨è¯»å–时直接转æ¢ä¸º Go 语言类型
-- 支æŒè¯»å–å’Œ **写入** 分区和键的注释
-- è½»æ¾æ“作分区ã€é”®å€¼å’Œæ³¨é‡Š
-- 在ä¿å­˜æ–‡ä»¶æ—¶åˆ†åŒºå’Œé”®å€¼ä¼šä¿æŒåŽŸæœ‰çš„顺åº
-
-## 下载安装
-
-使用一个特定版本:
-
- go get gopkg.in/ini.v1
-
-使用最新版:
-
- go get github.com/go-ini/ini
-
-如需更新请添加 `-u` 选项。
-
-### 测试安装
-
-如果您想è¦åœ¨è‡ªå·±çš„机器上è¿è¡Œæµ‹è¯•ï¼Œè¯·ä½¿ç”¨ `-t` 标记:
-
- go get -t gopkg.in/ini.v1
-
-如需更新请添加 `-u` 选项。
-
-## 开始使用
-
-### 从数æ®æºåŠ è½½
-
-一个 **æ•°æ®æº** å¯ä»¥æ˜¯ `[]byte` 类型的原始数æ®ï¼Œ`string` 类型的文件路径或 `io.ReadCloser`。您å¯ä»¥åŠ è½½ **ä»»æ„多个** æ•°æ®æºã€‚如果您传递其它类型的数æ®æºï¼Œåˆ™ä¼šç›´æŽ¥è¿”回错误。
-
-```go
-cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data"))))
-```
-
-或者从一个空白的文件开始:
-
-```go
-cfg := ini.Empty()
-```
-
-当您在一开始无法决定需è¦åŠ è½½å“ªäº›æ•°æ®æºæ—¶ï¼Œä»å¯ä»¥ä½¿ç”¨ **Append()** 在需è¦çš„时候加载它们。
-
-```go
-err := cfg.Append("other file", []byte("other raw data"))
-```
-
-当您想è¦åŠ è½½ä¸€ç³»åˆ—文件,但是ä¸èƒ½å¤Ÿç¡®å®šå…¶ä¸­å“ªäº›æ–‡ä»¶æ˜¯ä¸å­˜åœ¨çš„,å¯ä»¥é€šè¿‡è°ƒç”¨å‡½æ•° `LooseLoad` æ¥å¿½ç•¥å®ƒä»¬ï¼ˆ`Load` 会因为文件ä¸å­˜åœ¨è€Œè¿”回错误):
-
-```go
-cfg, err := ini.LooseLoad("filename", "filename_404")
-```
-
-更牛逼的是,当那些之å‰ä¸å­˜åœ¨çš„文件在é‡æ–°è°ƒç”¨ `Reload` 方法的时候çªç„¶å‡ºçŽ°äº†ï¼Œé‚£ä¹ˆå®ƒä»¬ä¼šè¢«æ­£å¸¸åŠ è½½ã€‚
-
-#### 忽略键å的大å°å†™
-
-有时候分区和键的å称大å°å†™æ··åˆéžå¸¸çƒ¦äººï¼Œè¿™ä¸ªæ—¶å€™å°±å¯ä»¥é€šè¿‡ `InsensitiveLoad` 将所有分区和键å在读å–里强制转æ¢ä¸ºå°å†™ï¼š
-
-```go
-cfg, err := ini.InsensitiveLoad("filename")
-//...
-
-// sec1 å’Œ sec2 指å‘åŒä¸€ä¸ªåˆ†åŒºå¯¹è±¡
-sec1, err := cfg.GetSection("Section")
-sec2, err := cfg.GetSection("SecTIOn")
-
-// key1 å’Œ key2 指å‘åŒä¸€ä¸ªé”®å¯¹è±¡
-key1, err := sec1.GetKey("Key")
-key2, err := sec2.GetKey("KeY")
-```
-
-#### 类似 MySQL é…置中的布尔值键
-
-MySQL çš„é…置文件中会出现没有具体值的布尔类型的键:
-
-```ini
-[mysqld]
-...
-skip-host-cache
-skip-name-resolve
-```
-
-默认情况下这被认为是缺失值而无法完æˆè§£æžï¼Œä½†å¯ä»¥é€šè¿‡é«˜çº§çš„加载选项对它们进行处ç†ï¼š
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
-```
-
-这些键的值永远为 `true`,且在ä¿å­˜åˆ°æ–‡ä»¶æ—¶ä¹Ÿåªä¼šè¾“出键å。
-
-如果您想è¦é€šè¿‡ç¨‹åºæ¥ç”Ÿæˆæ­¤ç±»é”®ï¼Œåˆ™å¯ä»¥ä½¿ç”¨ `NewBooleanKey`:
-
-```go
-key, err := sec.NewBooleanKey("skip-host-cache")
-```
-
-#### 关于注释
-
-下述几ç§æƒ…况的内容将被视为注释:
-
-1. 所有以 `#` 或 `;` 开头的行
-2. 所有在 `#` 或 `;` 之åŽçš„内容
-3. 分区标签åŽçš„文字 (å³ `[分区å]` 之åŽçš„内容)
-
-å¦‚æžœä½ å¸Œæœ›ä½¿ç”¨åŒ…å« `#` 或 `;` 的值,请使用 ``` ` ``` 或 ``` """ ``` 进行包覆。
-
-除此之外,您还å¯ä»¥é€šè¿‡ `LoadOptions` 完全忽略行内注释:
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: true}, "app.ini"))
-```
-
-### æ“作分区(Section)
-
-获å–指定分区:
-
-```go
-section, err := cfg.GetSection("section name")
-```
-
-如果您想è¦èŽ·å–默认分区,则å¯ä»¥ç”¨ç©ºå­—符串代替分区å:
-
-```go
-section, err := cfg.GetSection("")
-```
-
-当您éžå¸¸ç¡®å®šæŸä¸ªåˆ†åŒºæ˜¯å­˜åœ¨çš„,å¯ä»¥ä½¿ç”¨ä»¥ä¸‹ç®€ä¾¿æ–¹æ³•ï¼š
-
-```go
-section := cfg.Section("section name")
-```
-
-如果ä¸å°å¿ƒåˆ¤æ–­é”™äº†ï¼Œè¦èŽ·å–的分区其实是ä¸å­˜åœ¨çš„,那会å‘生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。
-
-创建一个分区:
-
-```go
-err := cfg.NewSection("new section")
-```
-
-获å–所有分区对象或å称:
-
-```go
-sections := cfg.Sections()
-names := cfg.SectionStrings()
-```
-
-### æ“作键(Key)
-
-获å–æŸä¸ªåˆ†åŒºä¸‹çš„键:
-
-```go
-key, err := cfg.Section("").GetKey("key name")
-```
-
-和分区一样,您也å¯ä»¥ç›´æŽ¥èŽ·å–键而忽略错误处ç†ï¼š
-
-```go
-key := cfg.Section("").Key("key name")
-```
-
-判断æŸä¸ªé”®æ˜¯å¦å­˜åœ¨ï¼š
-
-```go
-yes := cfg.Section("").HasKey("key name")
-```
-
-创建一个新的键:
-
-```go
-err := cfg.Section("").NewKey("name", "value")
-```
-
-获å–分区下的所有键或键å:
-
-```go
-keys := cfg.Section("").Keys()
-names := cfg.Section("").KeyStrings()
-```
-
-获å–分区下的所有键值对的克隆:
-
-```go
-hash := cfg.Section("").KeysHash()
-```
-
-### æ“作键值(Value)
-
-获å–一个类型为字符串(string)的值:
-
-```go
-val := cfg.Section("").Key("key name").String()
-```
-
-获å–值的åŒæ—¶é€šè¿‡è‡ªå®šä¹‰å‡½æ•°è¿›è¡Œå¤„ç†éªŒè¯ï¼š
-
-```go
-val := cfg.Section("").Key("key name").Validate(func(in string) string {
- if len(in) == 0 {
- return "default"
- }
- return in
-})
-```
-
-如果您ä¸éœ€è¦ä»»ä½•å¯¹å€¼çš„自动转å˜åŠŸèƒ½ï¼ˆä¾‹å¦‚递归读å–),å¯ä»¥ç›´æŽ¥èŽ·å–原值(这ç§æ–¹å¼æ€§èƒ½æœ€ä½³ï¼‰ï¼š
-
-```go
-val := cfg.Section("").Key("key name").Value()
-```
-
-判断æŸä¸ªåŽŸå€¼æ˜¯å¦å­˜åœ¨ï¼š
-
-```go
-yes := cfg.Section("").HasValue("test value")
-```
-
-获å–其它类型的值:
-
-```go
-// 布尔值的规则:
-// true 当值为:1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On
-// false 当值为:0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off
-v, err = cfg.Section("").Key("BOOL").Bool()
-v, err = cfg.Section("").Key("FLOAT64").Float64()
-v, err = cfg.Section("").Key("INT").Int()
-v, err = cfg.Section("").Key("INT64").Int64()
-v, err = cfg.Section("").Key("UINT").Uint()
-v, err = cfg.Section("").Key("UINT64").Uint64()
-v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339)
-v, err = cfg.Section("").Key("TIME").Time() // RFC3339
-
-v = cfg.Section("").Key("BOOL").MustBool()
-v = cfg.Section("").Key("FLOAT64").MustFloat64()
-v = cfg.Section("").Key("INT").MustInt()
-v = cfg.Section("").Key("INT64").MustInt64()
-v = cfg.Section("").Key("UINT").MustUint()
-v = cfg.Section("").Key("UINT64").MustUint64()
-v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339)
-v = cfg.Section("").Key("TIME").MustTime() // RFC3339
-
-// ç”± Must 开头的方法åå…许接收一个相åŒç±»åž‹çš„å‚æ•°æ¥ä½œä¸ºé»˜è®¤å€¼ï¼Œ
-// 当键ä¸å­˜åœ¨æˆ–者转æ¢å¤±è´¥æ—¶ï¼Œåˆ™ä¼šç›´æŽ¥è¿”回该默认值。
-// 但是,MustString 方法必须传递一个默认值。
-
-v = cfg.Seciont("").Key("String").MustString("default")
-v = cfg.Section("").Key("BOOL").MustBool(true)
-v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25)
-v = cfg.Section("").Key("INT").MustInt(10)
-v = cfg.Section("").Key("INT64").MustInt64(99)
-v = cfg.Section("").Key("UINT").MustUint(3)
-v = cfg.Section("").Key("UINT64").MustUint64(6)
-v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now())
-v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339
-```
-
-如果我的值有好多行怎么办?
-
-```ini
-[advance]
-ADDRESS = """404 road,
-NotFound, State, 5000
-Earth"""
-```
-
-å—¯å“¼ï¼Ÿå° caseï¼
-
-```go
-cfg.Section("advance").Key("ADDRESS").String()
-
-/* --- start ---
-404 road,
-NotFound, State, 5000
-Earth
------- end --- */
-```
-
-赞爆了ï¼é‚£è¦æ˜¯æˆ‘属于一行的内容写ä¸ä¸‹æƒ³è¦å†™åˆ°ç¬¬äºŒè¡Œæ€Žä¹ˆåŠžï¼Ÿ
-
-```ini
-[advance]
-two_lines = how about \
- continuation lines?
-lots_of_lines = 1 \
- 2 \
- 3 \
- 4
-```
-
-简直是å°èœä¸€ç¢Ÿï¼
-
-```go
-cfg.Section("advance").Key("two_lines").String() // how about continuation lines?
-cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4
-```
-
-å¯æ˜¯æˆ‘有时候觉得两行连在一起特别没劲,怎么æ‰èƒ½ä¸è‡ªåŠ¨è¿žæŽ¥ä¸¤è¡Œå‘¢ï¼Ÿ
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{
- IgnoreContinuation: true,
-}, "filename")
-```
-
-哇é ç»™åŠ›å•Šï¼
-
-需è¦æ³¨æ„的是,值两侧的å•å¼•å·ä¼šè¢«è‡ªåŠ¨å‰”除:
-
-```ini
-foo = "some value" // foo: some value
-bar = 'some value' // bar: some value
-```
-
-有时您会获得åƒä»Ž [Crowdin](https://crowdin.com/) 网站下载的文件那样具有特殊格å¼çš„值(值使用åŒå¼•å·æ‹¬èµ·æ¥ï¼Œå†…部的åŒå¼•å·è¢«è½¬ä¹‰ï¼‰ï¼š
-
-```ini
-create_repo="创建了仓库 <a href=\"%s\">%s</a>"
-```
-
-那么,怎么自动地将这类值进行处ç†å‘¢ï¼Ÿ
-
-```go
-cfg, err := ini.LoadSources(ini.LoadOptions{UnescapeValueDoubleQuotes: true}, "en-US.ini"))
-cfg.Section("<name of your section>").Key("create_repo").String()
-// You got: 创建了仓库 <a href="%s">%s</a>
-```
-
-这就是全部了?哈哈,当然ä¸æ˜¯ã€‚
-
-#### æ“作键值的辅助方法
-
-获å–键值时设定候选值:
-
-```go
-v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"})
-v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75})
-v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30})
-v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30})
-v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9})
-v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9})
-v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3})
-v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339
-```
-
-如果获å–到的值ä¸æ˜¯å€™é€‰å€¼çš„ä»»æ„一个,则会返回默认值,而默认值ä¸éœ€è¦æ˜¯å€™é€‰å€¼ä¸­çš„一员。
-
-验è¯èŽ·å–的值是å¦åœ¨æŒ‡å®šèŒƒå›´å†…:
-
-```go
-vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2)
-vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20)
-vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20)
-vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9)
-vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9)
-vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime)
-vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339
-```
-
-##### 自动分割键值到切片(slice)
-
-当存在无效输入时,使用零值代替:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0]
-vals = cfg.Section("").Key("STRINGS").Strings(",")
-vals = cfg.Section("").Key("FLOAT64S").Float64s(",")
-vals = cfg.Section("").Key("INTS").Ints(",")
-vals = cfg.Section("").Key("INT64S").Int64s(",")
-vals = cfg.Section("").Key("UINTS").Uints(",")
-vals = cfg.Section("").Key("UINT64S").Uint64s(",")
-vals = cfg.Section("").Key("TIMES").Times(",")
-```
-
-从结果切片中剔除无效输入:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> [2.2]
-vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",")
-vals = cfg.Section("").Key("INTS").ValidInts(",")
-vals = cfg.Section("").Key("INT64S").ValidInt64s(",")
-vals = cfg.Section("").Key("UINTS").ValidUints(",")
-vals = cfg.Section("").Key("UINT64S").ValidUint64s(",")
-vals = cfg.Section("").Key("TIMES").ValidTimes(",")
-```
-
-当存在无效输入时,直接返回错误:
-
-```go
-// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4]
-// Input: how, 2.2, are, you -> error
-vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",")
-vals = cfg.Section("").Key("INTS").StrictInts(",")
-vals = cfg.Section("").Key("INT64S").StrictInt64s(",")
-vals = cfg.Section("").Key("UINTS").StrictUints(",")
-vals = cfg.Section("").Key("UINT64S").StrictUint64s(",")
-vals = cfg.Section("").Key("TIMES").StrictTimes(",")
-```
-
-### ä¿å­˜é…ç½®
-
-终于到了这个时刻,是时候ä¿å­˜ä¸€ä¸‹é…置了。
-
-比较原始的åšæ³•æ˜¯è¾“出é…置到æŸä¸ªæ–‡ä»¶ï¼š
-
-```go
-// ...
-err = cfg.SaveTo("my.ini")
-err = cfg.SaveToIndent("my.ini", "\t")
-```
-
-å¦ä¸€ä¸ªæ¯”较高级的åšæ³•æ˜¯å†™å…¥åˆ°ä»»ä½•å®žçŽ° `io.Writer` 接å£çš„对象中:
-
-```go
-// ...
-cfg.WriteTo(writer)
-cfg.WriteToIndent(writer, "\t")
-```
-
-默认情况下,空格将被用于对é½é”®å€¼ä¹‹é—´çš„ç­‰å·ä»¥ç¾ŽåŒ–输出结果,以下代ç å¯ä»¥ç¦ç”¨è¯¥åŠŸèƒ½ï¼š
-
-```go
-ini.PrettyFormat = false
-```
-
-## 高级用法
-
-### 递归读å–键值
-
-在获å–所有键值的过程中,特殊语法 `%(<name>)s` 会被应用,其中 `<name>` å¯ä»¥æ˜¯ç›¸åŒåˆ†åŒºæˆ–者默认分区下的键å。字符串 `%(<name>)s` 会被相应的键值所替代,如果指定的键ä¸å­˜åœ¨ï¼Œåˆ™ä¼šç”¨ç©ºå­—符串替代。您å¯ä»¥æœ€å¤šä½¿ç”¨ 99 层的递归嵌套。
-
-```ini
-NAME = ini
-
-[author]
-NAME = Unknwon
-GITHUB = https://github.com/%(NAME)s
-
-[package]
-FULL_NAME = github.com/go-ini/%(NAME)s
-```
-
-```go
-cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon
-cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini
-```
-
-### 读å–父å­åˆ†åŒº
-
-您å¯ä»¥åœ¨åˆ†åŒºå称中使用 `.` æ¥è¡¨ç¤ºä¸¤ä¸ªæˆ–多个分区之间的父å­å…³ç³»ã€‚如果æŸä¸ªé”®åœ¨å­åˆ†åŒºä¸­ä¸å­˜åœ¨ï¼Œåˆ™ä¼šåŽ»å®ƒçš„父分区中å†æ¬¡å¯»æ‰¾ï¼Œç›´åˆ°æ²¡æœ‰çˆ¶åˆ†åŒºä¸ºæ­¢ã€‚
-
-```ini
-NAME = ini
-VERSION = v1
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
-[package]
-CLONE_URL = https://%(IMPORT_PATH)s
-
-[package.sub]
-```
-
-```go
-cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1
-```
-
-#### 获å–上级父分区下的所有键å
-
-```go
-cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"]
-```
-
-### 无法解æžçš„分区
-
-如果é‡åˆ°ä¸€äº›æ¯”较特殊的分区,它们ä¸åŒ…å«å¸¸è§çš„键值对,而是没有固定格å¼çš„纯文本,则å¯ä»¥ä½¿ç”¨ `LoadOptions.UnparsableSections` 进行处ç†ï¼š
-
-```go
-cfg, err := LoadSources(ini.LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS]
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>`))
-
-body := cfg.Section("COMMENTS").Body()
-
-/* --- start ---
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>
------- end --- */
-```
-
-### 读å–自增键å
-
-如果数æ®æºä¸­çš„é”®å为 `-`,则认为该键使用了自增键å的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。
-
-```ini
-[features]
--: Support read/write comments of keys and sections
--: Support auto-increment of key names
--: Support load multiple files to overwrite key values
-```
-
-```go
-cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"}
-```
-
-### 映射到结构
-
-想è¦ä½¿ç”¨æ›´åŠ é¢å‘对象的方å¼çŽ©è½¬ INI å—?好主æ„。
-
-```ini
-Name = Unknwon
-age = 21
-Male = true
-Born = 1993-01-01T20:17:05Z
-
-[Note]
-Content = Hi is a good man!
-Cities = HangZhou, Boston
-```
-
-```go
-type Note struct {
- Content string
- Cities []string
-}
-
-type Person struct {
- Name string
- Age int `ini:"age"`
- Male bool
- Born time.Time
- Note
- Created time.Time `ini:"-"`
-}
-
-func main() {
- cfg, err := ini.Load("path/to/ini")
- // ...
- p := new(Person)
- err = cfg.MapTo(p)
- // ...
-
- // 一切竟å¯ä»¥å¦‚此的简å•ã€‚
- err = ini.MapTo(p, "path/to/ini")
- // ...
-
- // 嗯哼?åªéœ€è¦æ˜ å°„一个分区å—?
- n := new(Note)
- err = cfg.Section("Note").MapTo(n)
- // ...
-}
-```
-
-结构的字段怎么设置默认值呢?很简å•ï¼Œåªè¦åœ¨æ˜ å°„之å‰å¯¹æŒ‡å®šå­—段进行赋值就å¯ä»¥äº†ã€‚如果键未找到或者类型错误,该值ä¸ä¼šå‘生改å˜ã€‚
-
-```go
-// ...
-p := &Person{
- Name: "Joe",
-}
-// ...
-```
-
-这样玩 INI 真的好酷啊ï¼ç„¶è€Œï¼Œå¦‚æžœä¸èƒ½è¿˜ç»™æˆ‘原æ¥çš„é…置文件,有什么åµç”¨ï¼Ÿ
-
-### 从结构åå°„
-
-å¯æ˜¯ï¼Œæˆ‘有说ä¸èƒ½å—?
-
-```go
-type Embeded struct {
- Dates []time.Time `delim:"|" comment:"Time data"`
- Places []string `ini:"places,omitempty"`
- None []int `ini:",omitempty"`
-}
-
-type Author struct {
- Name string `ini:"NAME"`
- Male bool
- Age int `comment:"Author's age"`
- GPA float64
- NeverMind string `ini:"-"`
- *Embeded `comment:"Embeded section"`
-}
-
-func main() {
- a := &Author{"Unknwon", true, 21, 2.8, "",
- &Embeded{
- []time.Time{time.Now(), time.Now()},
- []string{"HangZhou", "Boston"},
- []int{},
- }}
- cfg := ini.Empty()
- err = ini.ReflectFrom(cfg, a)
- // ...
-}
-```
-
-瞧瞧,奇迹å‘生了。
-
-```ini
-NAME = Unknwon
-Male = true
-; Author's age
-Age = 21
-GPA = 2.8
-
-; Embeded section
-[Embeded]
-; Time data
-Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00
-places = HangZhou,Boston
-```
-
-#### å称映射器(Name Mapper)
-
-为了节çœæ‚¨çš„时间并简化代ç ï¼Œæœ¬åº“支æŒç±»åž‹ä¸º [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) çš„å称映射器,该映射器负责结构字段å与分区å和键å之间的映射。
-
-ç›®å‰æœ‰ 2 款内置的映射器:
-
-- `AllCapsUnderscore`:该映射器将字段å转æ¢è‡³æ ¼å¼ `ALL_CAPS_UNDERSCORE` åŽå†åŽ»åŒ¹é…分区å和键å。
-- `TitleUnderscore`:该映射器将字段å转æ¢è‡³æ ¼å¼ `title_underscore` åŽå†åŽ»åŒ¹é…分区å和键å。
-
-使用方法:
-
-```go
-type Info struct{
- PackageName string
-}
-
-func main() {
- err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini"))
- // ...
-
- cfg, err := ini.Load([]byte("PACKAGE_NAME=ini"))
- // ...
- info := new(Info)
- cfg.NameMapper = ini.AllCapsUnderscore
- err = cfg.MapTo(info)
- // ...
-}
-```
-
-使用函数 `ini.ReflectFromWithMapper` 时也å¯åº”用相åŒçš„规则。
-
-#### 值映射器(Value Mapper)
-
-值映射器å…许使用一个自定义函数自动展开值的具体内容,例如:è¿è¡Œæ—¶èŽ·å–环境å˜é‡ï¼š
-
-```go
-type Env struct {
- Foo string `ini:"foo"`
-}
-
-func main() {
- cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n")
- cfg.ValueMapper = os.ExpandEnv
- // ...
- env := &Env{}
- err = cfg.Section("env").MapTo(env)
-}
-```
-
-本例中,`env.Foo` 将会是è¿è¡Œæ—¶æ‰€èŽ·å–到环境å˜é‡ `MY_VAR` 的值。
-
-#### 映射/å射的其它说明
-
-任何嵌入的结构都会被默认认作一个ä¸åŒçš„分区,并且ä¸ä¼šè‡ªåŠ¨äº§ç”Ÿæ‰€è°“的父å­åˆ†åŒºå…³è”:
-
-```go
-type Child struct {
- Age string
-}
-
-type Parent struct {
- Name string
- Child
-}
-
-type Config struct {
- City string
- Parent
-}
-```
-
-示例é…置文件:
-
-```ini
-City = Boston
-
-[Parent]
-Name = Unknwon
-
-[Child]
-Age = 21
-```
-
-很好,但是,我就是è¦åµŒå…¥ç»“构也在åŒä¸€ä¸ªåˆ†åŒºã€‚好å§ï¼Œä½ çˆ¹æ˜¯æŽåˆšï¼
-
-```go
-type Child struct {
- Age string
-}
-
-type Parent struct {
- Name string
- Child `ini:"Parent"`
-}
-
-type Config struct {
- City string
- Parent
-}
-```
-
-示例é…置文件:
-
-```ini
-City = Boston
-
-[Parent]
-Name = Unknwon
-Age = 21
-```
-
-## 获å–帮助
-
-- [API 文档](https://gowalker.org/gopkg.in/ini.v1)
-- [创建工å•](https://github.com/go-ini/ini/issues/new)
-
-## 常è§é—®é¢˜
-
-### 字段 `BlockMode` 是什么?
-
-默认情况下,本库会在您进行读写æ“作时采用é”机制æ¥ç¡®ä¿æ•°æ®æ—¶é—´ã€‚但在æŸäº›æƒ…况下,您éžå¸¸ç¡®å®šåªè¿›è¡Œè¯»æ“作。此时,您å¯ä»¥é€šè¿‡è®¾ç½® `cfg.BlockMode = false` æ¥å°†è¯»æ“作æå‡å¤§çº¦ **50-70%** 的性能。
-
-### 为什么è¦å†™å¦ä¸€ä¸ª INI 解æžåº“?
-
-许多人都在使用我的 [goconfig](https://github.com/Unknwon/goconfig) æ¥å®Œæˆå¯¹ INI 文件的æ“作,但我希望使用更加 Go 风格的代ç ã€‚并且当您设置 `cfg.BlockMode = false` 时,会有大约 **10-30%** 的性能æå‡ã€‚
-
-为了åšå‡ºè¿™äº›æ”¹å˜ï¼Œæˆ‘必须对 API 进行破å,所以新开一个仓库是最安全的åšæ³•ã€‚除此之外,本库直接使用 `gopkg.in` æ¥è¿›è¡Œç‰ˆæœ¬åŒ–å‘布。(其实真相是导入路径更短了)
diff --git a/vendor/github.com/go-ini/ini/bench_test.go b/vendor/github.com/go-ini/ini/bench_test.go
deleted file mode 100644
index fc1802469..000000000
--- a/vendor/github.com/go-ini/ini/bench_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2017 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "testing"
-
- "gopkg.in/ini.v1"
-)
-
-func newTestFile(block bool) *ini.File {
- c, _ := ini.Load([]byte(_CONF_DATA))
- c.BlockMode = block
- return c
-}
-
-func Benchmark_Key_Value(b *testing.B) {
- c := newTestFile(true)
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_Value_NonBlock(b *testing.B) {
- c := newTestFile(false)
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_Value_ViaSection(b *testing.B) {
- c := newTestFile(true)
- sec := c.Section("")
- for i := 0; i < b.N; i++ {
- sec.Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_Value_ViaSection_NonBlock(b *testing.B) {
- c := newTestFile(false)
- sec := c.Section("")
- for i := 0; i < b.N; i++ {
- sec.Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_Value_Direct(b *testing.B) {
- c := newTestFile(true)
- key := c.Section("").Key("NAME")
- for i := 0; i < b.N; i++ {
- key.Value()
- }
-}
-
-func Benchmark_Key_Value_Direct_NonBlock(b *testing.B) {
- c := newTestFile(false)
- key := c.Section("").Key("NAME")
- for i := 0; i < b.N; i++ {
- key.Value()
- }
-}
-
-func Benchmark_Key_String(b *testing.B) {
- c := newTestFile(true)
- for i := 0; i < b.N; i++ {
- _ = c.Section("").Key("NAME").String()
- }
-}
-
-func Benchmark_Key_String_NonBlock(b *testing.B) {
- c := newTestFile(false)
- for i := 0; i < b.N; i++ {
- _ = c.Section("").Key("NAME").String()
- }
-}
-
-func Benchmark_Key_String_ViaSection(b *testing.B) {
- c := newTestFile(true)
- sec := c.Section("")
- for i := 0; i < b.N; i++ {
- _ = sec.Key("NAME").String()
- }
-}
-
-func Benchmark_Key_String_ViaSection_NonBlock(b *testing.B) {
- c := newTestFile(false)
- sec := c.Section("")
- for i := 0; i < b.N; i++ {
- _ = sec.Key("NAME").String()
- }
-}
-
-func Benchmark_Key_SetValue(b *testing.B) {
- c := newTestFile(true)
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").SetValue("10")
- }
-}
-
-func Benchmark_Key_SetValue_VisSection(b *testing.B) {
- c := newTestFile(true)
- sec := c.Section("")
- for i := 0; i < b.N; i++ {
- sec.Key("NAME").SetValue("10")
- }
-}
diff --git a/vendor/github.com/go-ini/ini/file.go b/vendor/github.com/go-ini/ini/file.go
index ce26c3b31..d7982c323 100644
--- a/vendor/github.com/go-ini/ini/file.go
+++ b/vendor/github.com/go-ini/ini/file.go
@@ -140,9 +140,14 @@ func (f *File) Section(name string) *Section {
// Section returns list of Section.
func (f *File) Sections() []*Section {
+ if f.BlockMode {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ }
+
sections := make([]*Section, len(f.sectionList))
- for i := range f.sectionList {
- sections[i] = f.Section(f.sectionList[i])
+ for i, name := range f.sectionList {
+ sections[i] = f.sections[name]
}
return sections
}
@@ -223,7 +228,7 @@ func (f *File) Append(source interface{}, others ...interface{}) error {
func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
equalSign := "="
- if PrettyFormat {
+ if PrettyFormat || PrettyEqual {
equalSign = " = "
}
@@ -300,6 +305,10 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
} else {
key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:])
}
+
+ // Support multiline comments
+ key.Comment = strings.Replace(key.Comment, "\n", "\n; ", -1)
+
if _, err := buf.WriteString(key.Comment + LineBreak); err != nil {
return nil, err
}
diff --git a/vendor/github.com/go-ini/ini/file_test.go b/vendor/github.com/go-ini/ini/file_test.go
deleted file mode 100644
index 593224b58..000000000
--- a/vendor/github.com/go-ini/ini/file_test.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Copyright 2017 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "bytes"
- "io/ioutil"
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-func TestEmpty(t *testing.T) {
- Convey("Create an empty object", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- // Should only have the default section
- So(len(f.Sections()), ShouldEqual, 1)
-
- // Default section should not contain any key
- So(len(f.Section("").Keys()), ShouldBeZeroValue)
- })
-}
-
-func TestFile_NewSection(t *testing.T) {
- Convey("Create a new section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- sec, err := f.NewSection("author")
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(sec.Name(), ShouldEqual, "author")
-
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author"})
-
- Convey("With duplicated name", func() {
- sec, err := f.NewSection("author")
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
-
- // Does nothing if section already exists
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author"})
- })
-
- Convey("With empty string", func() {
- _, err := f.NewSection("")
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestFile_NewRawSection(t *testing.T) {
- Convey("Create a new raw section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000`)
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(sec.Name(), ShouldEqual, "comments")
-
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "comments"})
- So(f.Section("comments").Body(), ShouldEqual, `1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000`)
-
- Convey("With duplicated name", func() {
- sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000`)
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "comments"})
-
- // Overwrite previous existed section
- So(f.Section("comments").Body(), ShouldEqual, `1111111111111111111000000000000000001110000`)
- })
-
- Convey("With empty string", func() {
- _, err := f.NewRawSection("", "")
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestFile_NewSections(t *testing.T) {
- Convey("Create new sections", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- So(f.NewSections("package", "author"), ShouldBeNil)
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "package", "author"})
-
- Convey("With duplicated name", func() {
- So(f.NewSections("author", "features"), ShouldBeNil)
-
- // Ignore section already exists
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "package", "author", "features"})
- })
-
- Convey("With empty string", func() {
- So(f.NewSections("", ""), ShouldNotBeNil)
- })
- })
-}
-
-func TestFile_GetSection(t *testing.T) {
- Convey("Get a section", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- sec, err := f.GetSection("author")
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(sec.Name(), ShouldEqual, "author")
-
- Convey("Section not exists", func() {
- _, err := f.GetSection("404")
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestFile_Section(t *testing.T) {
- Convey("Get a section", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- sec := f.Section("author")
- So(sec, ShouldNotBeNil)
- So(sec.Name(), ShouldEqual, "author")
-
- Convey("Section not exists", func() {
- sec := f.Section("404")
- So(sec, ShouldNotBeNil)
- So(sec.Name(), ShouldEqual, "404")
- })
- })
-
- Convey("Get default section in lower case with insensitive load", t, func() {
- f, err := ini.InsensitiveLoad([]byte(`
-[default]
-NAME = ini
-VERSION = v1`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("name").String(), ShouldEqual, "ini")
- So(f.Section("").Key("version").String(), ShouldEqual, "v1")
- })
-}
-
-func TestFile_Sections(t *testing.T) {
- Convey("Get all sections", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- secs := f.Sections()
- names := []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"}
- So(len(secs), ShouldEqual, len(names))
- for i, name := range names {
- So(secs[i].Name(), ShouldEqual, name)
- }
- })
-}
-
-func TestFile_ChildSections(t *testing.T) {
- Convey("Get child sections by parent name", t, func() {
- f, err := ini.Load([]byte(`
-[node]
-[node.biz1]
-[node.biz2]
-[node.biz3]
-[node.bizN]
-`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- children := f.ChildSections("node")
- names := []string{"node.biz1", "node.biz2", "node.biz3", "node.bizN"}
- So(len(children), ShouldEqual, len(names))
- for i, name := range names {
- So(children[i].Name(), ShouldEqual, name)
- }
- })
-}
-
-func TestFile_SectionStrings(t *testing.T) {
- Convey("Get all section names", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"})
- })
-}
-
-func TestFile_DeleteSection(t *testing.T) {
- Convey("Delete a section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- f.NewSections("author", "package", "features")
- f.DeleteSection("features")
- f.DeleteSection("")
- So(f.SectionStrings(), ShouldResemble, []string{"author", "package"})
- })
-}
-
-func TestFile_Append(t *testing.T) {
- Convey("Append a data source", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- So(f.Append(_MINIMAL_CONF, []byte(`
-[author]
-NAME = Unknwon`)), ShouldBeNil)
-
- Convey("With bad input", func() {
- So(f.Append(123), ShouldNotBeNil)
- So(f.Append(_MINIMAL_CONF, 123), ShouldNotBeNil)
- })
- })
-}
-
-func TestFile_WriteTo(t *testing.T) {
- Convey("Write content to somewhere", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- f.Section("author").Comment = `Information about package author
-# Bio can be written in multiple lines.`
- f.Section("author").Key("NAME").Comment = "This is author name"
- f.Section("note").NewBooleanKey("boolean_key")
- f.Section("note").NewKey("more", "notes")
-
- var buf bytes.Buffer
- _, err = f.WriteTo(&buf)
- So(err, ShouldBeNil)
-
- golden := "testdata/TestFile_WriteTo.golden"
- if *update {
- ioutil.WriteFile(golden, buf.Bytes(), 0644)
- }
-
- expected, err := ioutil.ReadFile(golden)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, string(expected))
- })
-}
-
-func TestFile_SaveTo(t *testing.T) {
- Convey("Write content to somewhere", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.SaveTo("testdata/conf_out.ini"), ShouldBeNil)
- So(f.SaveToIndent("testdata/conf_out.ini", "\t"), ShouldBeNil)
- })
-}
diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go
index 316211576..ccba1ee52 100644
--- a/vendor/github.com/go-ini/ini/ini.go
+++ b/vendor/github.com/go-ini/ini/ini.go
@@ -32,7 +32,7 @@ const (
// Maximum allowed depth when recursively substituing variable names.
_DEPTH_VALUES = 99
- _VERSION = "1.32.1"
+ _VERSION = "1.35.0"
)
// Version returns current package version literal.
@@ -53,6 +53,9 @@ var (
// or reduce all possible spaces for compact format.
PrettyFormat = true
+ // Place spaces around "=" sign even when PrettyFormat is false
+ PrettyEqual = false
+
// Explicitly write DEFAULT section header
DefaultHeader = false
diff --git a/vendor/github.com/go-ini/ini/ini_internal_test.go b/vendor/github.com/go-ini/ini/ini_internal_test.go
deleted file mode 100644
index 257ef1ebb..000000000
--- a/vendor/github.com/go-ini/ini/ini_internal_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2017 Unknwon
-//
-// 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.
-
-package ini
-
-import (
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func Test_Version(t *testing.T) {
- Convey("Get version", t, func() {
- So(Version(), ShouldEqual, _VERSION)
- })
-}
-
-func Test_isSlice(t *testing.T) {
- Convey("Check if a string is in the slice", t, func() {
- ss := []string{"a", "b", "c"}
- So(inSlice("a", ss), ShouldBeTrue)
- So(inSlice("d", ss), ShouldBeFalse)
- })
-}
diff --git a/vendor/github.com/go-ini/ini/ini_test.go b/vendor/github.com/go-ini/ini/ini_test.go
deleted file mode 100644
index df5fbe384..000000000
--- a/vendor/github.com/go-ini/ini/ini_test.go
+++ /dev/null
@@ -1,339 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "bytes"
- "flag"
- "io/ioutil"
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-const (
- _CONF_DATA = `
- ; Package name
- NAME = ini
- ; Package version
- VERSION = v1
- ; Package import path
- IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
- # Information about package author
- # Bio can be written in multiple lines.
- [author]
- NAME = Unknwon ; Succeeding comment
- E-MAIL = fake@localhost
- GITHUB = https://github.com/%(NAME)s
- BIO = """Gopher.
- Coding addict.
- Good man.
- """ # Succeeding comment`
- _MINIMAL_CONF = "testdata/minimal.ini"
- _FULL_CONF = "testdata/full.ini"
- _NOT_FOUND_CONF = "testdata/404.ini"
-)
-
-var update = flag.Bool("update", false, "Update .golden files")
-
-func TestLoad(t *testing.T) {
- Convey("Load from good data sources", t, func() {
- f, err := ini.Load([]byte(`
-NAME = ini
-VERSION = v1
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s`),
- "testdata/minimal.ini",
- ioutil.NopCloser(bytes.NewReader([]byte(`
-[author]
-NAME = Unknwon
-`))),
- )
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- // Vaildate values make sure all sources are loaded correctly
- sec := f.Section("")
- So(sec.Key("NAME").String(), ShouldEqual, "ini")
- So(sec.Key("VERSION").String(), ShouldEqual, "v1")
- So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1")
-
- sec = f.Section("author")
- So(sec.Key("NAME").String(), ShouldEqual, "Unknwon")
- So(sec.Key("E-MAIL").String(), ShouldEqual, "u@gogs.io")
- })
-
- Convey("Load from bad data sources", t, func() {
- Convey("Invalid input", func() {
- _, err := ini.Load(_NOT_FOUND_CONF)
- So(err, ShouldNotBeNil)
- })
-
- Convey("Unsupported type", func() {
- _, err := ini.Load(123)
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestLoadSources(t *testing.T) {
- Convey("Load from data sources with options", t, func() {
- Convey("Ignore nonexistent files", func() {
- f, err := ini.LooseLoad(_NOT_FOUND_CONF, _MINIMAL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- Convey("Inverse case", func() {
- _, err = ini.Load(_NOT_FOUND_CONF)
- So(err, ShouldNotBeNil)
- })
- })
-
- Convey("Insensitive to section and key names", func() {
- f, err := ini.InsensitiveLoad(_MINIMAL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("Author").Key("e-mail").String(), ShouldEqual, "u@gogs.io")
-
- Convey("Write out", func() {
- var buf bytes.Buffer
- _, err := f.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `[author]
-e-mail = u@gogs.io
-
-`)
- })
-
- Convey("Inverse case", func() {
- f, err := ini.Load(_MINIMAL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("Author").Key("e-mail").String(), ShouldBeEmpty)
- })
- })
-
- Convey("Ignore continuation lines", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- IgnoreContinuation: true,
- }, []byte(`
-key1=a\b\
-key2=c\d\
-key3=value`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("key1").String(), ShouldEqual, `a\b\`)
- So(f.Section("").Key("key2").String(), ShouldEqual, `c\d\`)
- So(f.Section("").Key("key3").String(), ShouldEqual, "value")
-
- Convey("Inverse case", func() {
- f, err := ini.Load([]byte(`
-key1=a\b\
-key2=c\d\`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("key1").String(), ShouldEqual, `a\bkey2=c\d`)
- })
- })
-
- Convey("Ignore inline comments", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- IgnoreInlineComment: true,
- }, []byte(`
-key1=value ;comment
-key2=value2 #comment2`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("key1").String(), ShouldEqual, `value ;comment`)
- So(f.Section("").Key("key2").String(), ShouldEqual, `value2 #comment2`)
-
- Convey("Inverse case", func() {
- f, err := ini.Load([]byte(`
-key1=value ;comment
-key2=value2 #comment2`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("key1").String(), ShouldEqual, `value`)
- So(f.Section("").Key("key1").Comment, ShouldEqual, `;comment`)
- So(f.Section("").Key("key2").String(), ShouldEqual, `value2`)
- So(f.Section("").Key("key2").Comment, ShouldEqual, `#comment2`)
- })
- })
-
- Convey("Allow boolean type keys", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- AllowBooleanKeys: true,
- }, []byte(`
-key1=hello
-#key2
-key3`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").KeyStrings(), ShouldResemble, []string{"key1", "key3"})
- So(f.Section("").Key("key3").MustBool(false), ShouldBeTrue)
-
- Convey("Write out", func() {
- var buf bytes.Buffer
- _, err := f.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `key1 = hello
-# key2
-key3
-`)
- })
-
- Convey("Inverse case", func() {
- _, err := ini.Load([]byte(`
-key1=hello
-#key2
-key3`))
- So(err, ShouldNotBeNil)
- })
- })
-
- Convey("Allow shadow keys", func() {
- f, err := ini.ShadowLoad([]byte(`
-[remote "origin"]
-url = https://github.com/Antergone/test1.git
-url = https://github.com/Antergone/test2.git
-fetch = +refs/heads/*:refs/remotes/origin/*`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test1.git")
- So(f.Section(`remote "origin"`).Key("url").ValueWithShadows(), ShouldResemble, []string{
- "https://github.com/Antergone/test1.git",
- "https://github.com/Antergone/test2.git",
- })
- So(f.Section(`remote "origin"`).Key("fetch").String(), ShouldEqual, "+refs/heads/*:refs/remotes/origin/*")
-
- Convey("Write out", func() {
- var buf bytes.Buffer
- _, err := f.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `[remote "origin"]
-url = https://github.com/Antergone/test1.git
-url = https://github.com/Antergone/test2.git
-fetch = +refs/heads/*:refs/remotes/origin/*
-
-`)
- })
-
- Convey("Inverse case", func() {
- f, err := ini.Load([]byte(`
-[remote "origin"]
-url = https://github.com/Antergone/test1.git
-url = https://github.com/Antergone/test2.git`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test2.git")
- })
- })
-
- Convey("Unescape double quotes inside value", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- UnescapeValueDoubleQuotes: true,
- }, []byte(`
-create_repo="创建了仓库 <a href=\"%s\">%s</a>"`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("create_repo").String(), ShouldEqual, `创建了仓库 <a href="%s">%s</a>`)
-
- Convey("Inverse case", func() {
- f, err := ini.Load([]byte(`
-create_repo="创建了仓库 <a href=\"%s\">%s</a>"`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("create_repo").String(), ShouldEqual, `"创建了仓库 <a href=\"%s\">%s</a>"`)
- })
- })
-
- Convey("Unescape comment symbols inside value", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- IgnoreInlineComment: true,
- UnescapeValueCommentSymbols: true,
- }, []byte(`
-key = test value <span style="color: %s\; background: %s">more text</span>
-`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("key").String(), ShouldEqual, `test value <span style="color: %s; background: %s">more text</span>`)
- })
-
- Convey("Allow unparseable sections", func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- Insensitive: true,
- UnparseableSections: []string{"core_lesson", "comments"},
- }, []byte(`
-Lesson_Location = 87
-Lesson_Status = C
-Score = 3
-Time = 00:02:30
-
-[CORE_LESSON]
-my lesson state data – 1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000 – end my lesson state data
-
-[COMMENTS]
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("score").String(), ShouldEqual, "3")
- So(f.Section("").Body(), ShouldBeEmpty)
- So(f.Section("core_lesson").Body(), ShouldEqual, `my lesson state data – 1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000 – end my lesson state data`)
- So(f.Section("comments").Body(), ShouldEqual, `<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>`)
-
- Convey("Write out", func() {
- var buf bytes.Buffer
- _, err := f.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `lesson_location = 87
-lesson_status = C
-score = 3
-time = 00:02:30
-
-[core_lesson]
-my lesson state data – 1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000 – end my lesson state data
-
-[comments]
-<1><L.Slide#2> This slide has the fuel listed in the wrong units <e.1>
-`)
- })
-
- Convey("Inverse case", func() {
- _, err := ini.Load([]byte(`
-[CORE_LESSON]
-my lesson state data – 1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000 – end my lesson state data`))
- So(err, ShouldNotBeNil)
- })
- })
- })
-}
diff --git a/vendor/github.com/go-ini/ini/key_test.go b/vendor/github.com/go-ini/ini/key_test.go
deleted file mode 100644
index a13ad95fa..000000000
--- a/vendor/github.com/go-ini/ini/key_test.go
+++ /dev/null
@@ -1,523 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "bytes"
- "fmt"
- "strings"
- "testing"
- "time"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-func TestKey_AddShadow(t *testing.T) {
- Convey("Add shadow to a key", t, func() {
- f, err := ini.ShadowLoad([]byte(`
-[notes]
--: note1`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(k.AddShadow("ini.v1"), ShouldBeNil)
- So(k.ValueWithShadows(), ShouldResemble, []string{"ini", "ini.v1"})
-
- Convey("Add shadow to boolean key", func() {
- k, err := f.Section("").NewBooleanKey("published")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.AddShadow("beta"), ShouldNotBeNil)
- })
-
- Convey("Add shadow to auto-increment key", func() {
- So(f.Section("notes").Key("#1").AddShadow("beta"), ShouldNotBeNil)
- })
- })
-
- Convey("Shadow is not allowed", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(k.AddShadow("ini.v1"), ShouldNotBeNil)
- })
-}
-
-// Helpers for slice tests.
-func float64sEqual(values []float64, expected ...float64) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i], ShouldEqual, v)
- }
-}
-
-func intsEqual(values []int, expected ...int) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i], ShouldEqual, v)
- }
-}
-
-func int64sEqual(values []int64, expected ...int64) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i], ShouldEqual, v)
- }
-}
-
-func uintsEqual(values []uint, expected ...uint) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i], ShouldEqual, v)
- }
-}
-
-func uint64sEqual(values []uint64, expected ...uint64) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i], ShouldEqual, v)
- }
-}
-
-func timesEqual(values []time.Time, expected ...time.Time) {
- So(values, ShouldHaveLength, len(expected))
- for i, v := range expected {
- So(values[i].String(), ShouldEqual, v.String())
- }
-}
-
-func TestKey_Helpers(t *testing.T) {
- Convey("Getting and setting values", t, func() {
- f, err := ini.Load(_FULL_CONF)
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- Convey("Get string representation", func() {
- sec := f.Section("")
- So(sec, ShouldNotBeNil)
- So(sec.Key("NAME").Value(), ShouldEqual, "ini")
- So(sec.Key("NAME").String(), ShouldEqual, "ini")
- So(sec.Key("NAME").Validate(func(in string) string {
- return in
- }), ShouldEqual, "ini")
- So(sec.Key("NAME").Comment, ShouldEqual, "; Package name")
- So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1")
-
- Convey("With ValueMapper", func() {
- f.ValueMapper = func(in string) string {
- if in == "gopkg.in/%(NAME)s.%(VERSION)s" {
- return "github.com/go-ini/ini"
- }
- return in
- }
- So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "github.com/go-ini/ini")
- })
- })
-
- Convey("Get values in non-default section", func() {
- sec := f.Section("author")
- So(sec, ShouldNotBeNil)
- So(sec.Key("NAME").String(), ShouldEqual, "Unknwon")
- So(sec.Key("GITHUB").String(), ShouldEqual, "https://github.com/Unknwon")
-
- sec = f.Section("package")
- So(sec, ShouldNotBeNil)
- So(sec.Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1")
- })
-
- Convey("Get auto-increment key names", func() {
- keys := f.Section("features").Keys()
- for i, k := range keys {
- So(k.Name(), ShouldEqual, fmt.Sprintf("#%d", i+1))
- }
- })
-
- Convey("Get parent-keys that are available to the child section", func() {
- parentKeys := f.Section("package.sub").ParentKeys()
- for _, k := range parentKeys {
- So(k.Name(), ShouldEqual, "CLONE_URL")
- }
- })
-
- Convey("Get overwrite value", func() {
- So(f.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io")
- })
-
- Convey("Get sections", func() {
- sections := f.Sections()
- for i, name := range []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"} {
- So(sections[i].Name(), ShouldEqual, name)
- }
- })
-
- Convey("Get parent section value", func() {
- So(f.Section("package.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1")
- So(f.Section("package.fake.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1")
- })
-
- Convey("Get multiple line value", func() {
- So(f.Section("author").Key("BIO").String(), ShouldEqual, "Gopher.\nCoding addict.\nGood man.\n")
- })
-
- Convey("Get values with type", func() {
- sec := f.Section("types")
- v1, err := sec.Key("BOOL").Bool()
- So(err, ShouldBeNil)
- So(v1, ShouldBeTrue)
-
- v1, err = sec.Key("BOOL_FALSE").Bool()
- So(err, ShouldBeNil)
- So(v1, ShouldBeFalse)
-
- v2, err := sec.Key("FLOAT64").Float64()
- So(err, ShouldBeNil)
- So(v2, ShouldEqual, 1.25)
-
- v3, err := sec.Key("INT").Int()
- So(err, ShouldBeNil)
- So(v3, ShouldEqual, 10)
-
- v4, err := sec.Key("INT").Int64()
- So(err, ShouldBeNil)
- So(v4, ShouldEqual, 10)
-
- v5, err := sec.Key("UINT").Uint()
- So(err, ShouldBeNil)
- So(v5, ShouldEqual, 3)
-
- v6, err := sec.Key("UINT").Uint64()
- So(err, ShouldBeNil)
- So(v6, ShouldEqual, 3)
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- v7, err := sec.Key("TIME").Time()
- So(err, ShouldBeNil)
- So(v7.String(), ShouldEqual, t.String())
-
- Convey("Must get values with type", func() {
- So(sec.Key("STRING").MustString("404"), ShouldEqual, "str")
- So(sec.Key("BOOL").MustBool(), ShouldBeTrue)
- So(sec.Key("FLOAT64").MustFloat64(), ShouldEqual, 1.25)
- So(sec.Key("INT").MustInt(), ShouldEqual, 10)
- So(sec.Key("INT").MustInt64(), ShouldEqual, 10)
- So(sec.Key("UINT").MustUint(), ShouldEqual, 3)
- So(sec.Key("UINT").MustUint64(), ShouldEqual, 3)
- So(sec.Key("TIME").MustTime().String(), ShouldEqual, t.String())
-
- dur, err := time.ParseDuration("2h45m")
- So(err, ShouldBeNil)
- So(sec.Key("DURATION").MustDuration().Seconds(), ShouldEqual, dur.Seconds())
-
- Convey("Must get values with default value", func() {
- So(sec.Key("STRING_404").MustString("404"), ShouldEqual, "404")
- So(sec.Key("BOOL_404").MustBool(true), ShouldBeTrue)
- So(sec.Key("FLOAT64_404").MustFloat64(2.5), ShouldEqual, 2.5)
- So(sec.Key("INT_404").MustInt(15), ShouldEqual, 15)
- So(sec.Key("INT64_404").MustInt64(15), ShouldEqual, 15)
- So(sec.Key("UINT_404").MustUint(6), ShouldEqual, 6)
- So(sec.Key("UINT64_404").MustUint64(6), ShouldEqual, 6)
-
- t, err := time.Parse(time.RFC3339, "2014-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME_404").MustTime(t).String(), ShouldEqual, t.String())
-
- So(sec.Key("DURATION_404").MustDuration(dur).Seconds(), ShouldEqual, dur.Seconds())
-
- Convey("Must should set default as key value", func() {
- So(sec.Key("STRING_404").String(), ShouldEqual, "404")
- So(sec.Key("BOOL_404").String(), ShouldEqual, "true")
- So(sec.Key("FLOAT64_404").String(), ShouldEqual, "2.5")
- So(sec.Key("INT_404").String(), ShouldEqual, "15")
- So(sec.Key("INT64_404").String(), ShouldEqual, "15")
- So(sec.Key("UINT_404").String(), ShouldEqual, "6")
- So(sec.Key("UINT64_404").String(), ShouldEqual, "6")
- So(sec.Key("TIME_404").String(), ShouldEqual, "2014-01-01T20:17:05Z")
- So(sec.Key("DURATION_404").String(), ShouldEqual, "2h45m0s")
- })
- })
- })
- })
-
- Convey("Get value with candidates", func() {
- sec := f.Section("types")
- So(sec.Key("STRING").In("", []string{"str", "arr", "types"}), ShouldEqual, "str")
- So(sec.Key("FLOAT64").InFloat64(0, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25)
- So(sec.Key("INT").InInt(0, []int{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("INT").InInt64(0, []int64{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("UINT").InUint(0, []uint{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("UINT").InUint64(0, []uint64{3, 6, 9}), ShouldEqual, 3)
-
- zt, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME").InTime(zt, []time.Time{t, time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String())
-
- Convey("Get value with candidates and default value", func() {
- So(sec.Key("STRING_404").In("str", []string{"str", "arr", "types"}), ShouldEqual, "str")
- So(sec.Key("FLOAT64_404").InFloat64(1.25, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25)
- So(sec.Key("INT_404").InInt(10, []int{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("INT64_404").InInt64(10, []int64{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("UINT_404").InUint(3, []uint{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("UINT_404").InUint64(3, []uint64{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("TIME_404").InTime(t, []time.Time{time.Now(), time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String())
- })
- })
-
- Convey("Get values in range", func() {
- sec := f.Section("types")
- So(sec.Key("FLOAT64").RangeFloat64(0, 1, 2), ShouldEqual, 1.25)
- So(sec.Key("INT").RangeInt(0, 10, 20), ShouldEqual, 10)
- So(sec.Key("INT").RangeInt64(0, 10, 20), ShouldEqual, 10)
-
- minT, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- midT, err := time.Parse(time.RFC3339, "2013-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- maxT, err := time.Parse(time.RFC3339, "9999-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME").RangeTime(t, minT, maxT).String(), ShouldEqual, t.String())
-
- Convey("Get value in range with default value", func() {
- So(sec.Key("FLOAT64").RangeFloat64(5, 0, 1), ShouldEqual, 5)
- So(sec.Key("INT").RangeInt(7, 0, 5), ShouldEqual, 7)
- So(sec.Key("INT").RangeInt64(7, 0, 5), ShouldEqual, 7)
- So(sec.Key("TIME").RangeTime(t, minT, midT).String(), ShouldEqual, t.String())
- })
- })
-
- Convey("Get values into slice", func() {
- sec := f.Section("array")
- So(strings.Join(sec.Key("STRINGS").Strings(","), ","), ShouldEqual, "en,zh,de")
- So(len(sec.Key("STRINGS_404").Strings(",")), ShouldEqual, 0)
-
- vals1 := sec.Key("FLOAT64S").Float64s(",")
- float64sEqual(vals1, 1.1, 2.2, 3.3)
-
- vals2 := sec.Key("INTS").Ints(",")
- intsEqual(vals2, 1, 2, 3)
-
- vals3 := sec.Key("INTS").Int64s(",")
- int64sEqual(vals3, 1, 2, 3)
-
- vals4 := sec.Key("UINTS").Uints(",")
- uintsEqual(vals4, 1, 2, 3)
-
- vals5 := sec.Key("UINTS").Uint64s(",")
- uint64sEqual(vals5, 1, 2, 3)
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- vals6 := sec.Key("TIMES").Times(",")
- timesEqual(vals6, t, t, t)
- })
-
- Convey("Test string slice escapes", func() {
- sec := f.Section("string escapes")
- So(sec.Key("key1").Strings(","), ShouldResemble, []string{"value1", "value2", "value3"})
- So(sec.Key("key2").Strings(","), ShouldResemble, []string{"value1, value2"})
- So(sec.Key("key3").Strings(","), ShouldResemble, []string{`val\ue1`, "value2"})
- So(sec.Key("key4").Strings(","), ShouldResemble, []string{`value1\`, `value\\2`})
- So(sec.Key("key5").Strings(",,"), ShouldResemble, []string{"value1,, value2"})
- So(sec.Key("key6").Strings(" "), ShouldResemble, []string{"aaa", "bbb and space", "ccc"})
- })
-
- Convey("Get valid values into slice", func() {
- sec := f.Section("array")
- vals1 := sec.Key("FLOAT64S").ValidFloat64s(",")
- float64sEqual(vals1, 1.1, 2.2, 3.3)
-
- vals2 := sec.Key("INTS").ValidInts(",")
- intsEqual(vals2, 1, 2, 3)
-
- vals3 := sec.Key("INTS").ValidInt64s(",")
- int64sEqual(vals3, 1, 2, 3)
-
- vals4 := sec.Key("UINTS").ValidUints(",")
- uintsEqual(vals4, 1, 2, 3)
-
- vals5 := sec.Key("UINTS").ValidUint64s(",")
- uint64sEqual(vals5, 1, 2, 3)
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- vals6 := sec.Key("TIMES").ValidTimes(",")
- timesEqual(vals6, t, t, t)
- })
-
- Convey("Get values one type into slice of another type", func() {
- sec := f.Section("array")
- vals1 := sec.Key("STRINGS").ValidFloat64s(",")
- So(vals1, ShouldBeEmpty)
-
- vals2 := sec.Key("STRINGS").ValidInts(",")
- So(vals2, ShouldBeEmpty)
-
- vals3 := sec.Key("STRINGS").ValidInt64s(",")
- So(vals3, ShouldBeEmpty)
-
- vals4 := sec.Key("STRINGS").ValidUints(",")
- So(vals4, ShouldBeEmpty)
-
- vals5 := sec.Key("STRINGS").ValidUint64s(",")
- So(vals5, ShouldBeEmpty)
-
- vals6 := sec.Key("STRINGS").ValidTimes(",")
- So(vals6, ShouldBeEmpty)
- })
-
- Convey("Get valid values into slice without errors", func() {
- sec := f.Section("array")
- vals1, err := sec.Key("FLOAT64S").StrictFloat64s(",")
- So(err, ShouldBeNil)
- float64sEqual(vals1, 1.1, 2.2, 3.3)
-
- vals2, err := sec.Key("INTS").StrictInts(",")
- So(err, ShouldBeNil)
- intsEqual(vals2, 1, 2, 3)
-
- vals3, err := sec.Key("INTS").StrictInt64s(",")
- So(err, ShouldBeNil)
- int64sEqual(vals3, 1, 2, 3)
-
- vals4, err := sec.Key("UINTS").StrictUints(",")
- So(err, ShouldBeNil)
- uintsEqual(vals4, 1, 2, 3)
-
- vals5, err := sec.Key("UINTS").StrictUint64s(",")
- So(err, ShouldBeNil)
- uint64sEqual(vals5, 1, 2, 3)
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- vals6, err := sec.Key("TIMES").StrictTimes(",")
- So(err, ShouldBeNil)
- timesEqual(vals6, t, t, t)
- })
-
- Convey("Get invalid values into slice", func() {
- sec := f.Section("array")
- vals1, err := sec.Key("STRINGS").StrictFloat64s(",")
- So(vals1, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
-
- vals2, err := sec.Key("STRINGS").StrictInts(",")
- So(vals2, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
-
- vals3, err := sec.Key("STRINGS").StrictInt64s(",")
- So(vals3, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
-
- vals4, err := sec.Key("STRINGS").StrictUints(",")
- So(vals4, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
-
- vals5, err := sec.Key("STRINGS").StrictUint64s(",")
- So(vals5, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
-
- vals6, err := sec.Key("STRINGS").StrictTimes(",")
- So(vals6, ShouldBeEmpty)
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestKey_StringsWithShadows(t *testing.T) {
- Convey("Get strings of shadows of a key", t, func() {
- f, err := ini.ShadowLoad([]byte(""))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NUMS", "1,2")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("NUMS", "4,5,6")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(k.StringsWithShadows(","), ShouldResemble, []string{"1", "2", "4", "5", "6"})
- })
-}
-
-func TestKey_SetValue(t *testing.T) {
- Convey("Set value of key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.Value(), ShouldEqual, "ini")
-
- k.SetValue("ini.v1")
- So(k.Value(), ShouldEqual, "ini.v1")
- })
-}
-
-func TestKey_NestedValues(t *testing.T) {
- Convey("Read and write nested values", t, func() {
- f, err := ini.LoadSources(ini.LoadOptions{
- AllowNestedValues: true,
- }, []byte(`
-aws_access_key_id = foo
-aws_secret_access_key = bar
-region = us-west-2
-s3 =
- max_concurrent_requests=10
- max_queue_size=1000`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("").Key("s3").NestedValues(), ShouldResemble, []string{"max_concurrent_requests=10", "max_queue_size=1000"})
-
- var buf bytes.Buffer
- _, err = f.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `aws_access_key_id = foo
-aws_secret_access_key = bar
-region = us-west-2
-s3 =
- max_concurrent_requests=10
- max_queue_size=1000
-
-`)
- })
-}
-
-func TestRecursiveValues(t *testing.T) {
- Convey("Recursive values should not reflect on same key", t, func() {
- f, err := ini.Load([]byte(`
-NAME = ini
-[package]
-NAME = %(NAME)s`))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
- So(f.Section("package").Key("NAME").String(), ShouldEqual, "ini")
- })
-}
diff --git a/vendor/github.com/go-ini/ini/parser_test.go b/vendor/github.com/go-ini/ini/parser_test.go
deleted file mode 100644
index bb0f2665e..000000000
--- a/vendor/github.com/go-ini/ini/parser_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2016 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-func TestBOM(t *testing.T) {
- Convey("Test handling BOM", t, func() {
- Convey("UTF-8-BOM", func() {
- f, err := ini.Load("testdata/UTF-8-BOM.ini")
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io")
- })
-
- Convey("UTF-16-LE-BOM", func() {
- f, err := ini.Load("testdata/UTF-16-LE-BOM.ini")
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
- })
-
- Convey("UTF-16-BE-BOM", func() {
- })
- })
-}
-
-func TestBadLoad(t *testing.T) {
- Convey("Load with bad data", t, func() {
- Convey("Bad section name", func() {
- _, err := ini.Load([]byte("[]"))
- So(err, ShouldNotBeNil)
-
- _, err = ini.Load([]byte("["))
- So(err, ShouldNotBeNil)
- })
-
- Convey("Bad keys", func() {
- _, err := ini.Load([]byte(`"""name`))
- So(err, ShouldNotBeNil)
-
- _, err = ini.Load([]byte(`"""name"""`))
- So(err, ShouldNotBeNil)
-
- _, err = ini.Load([]byte(`""=1`))
- So(err, ShouldNotBeNil)
-
- _, err = ini.Load([]byte(`=`))
- So(err, ShouldNotBeNil)
-
- _, err = ini.Load([]byte(`name`))
- So(err, ShouldNotBeNil)
- })
-
- Convey("Bad values", func() {
- _, err := ini.Load([]byte(`name="""Unknwon`))
- So(err, ShouldNotBeNil)
- })
- })
-}
diff --git a/vendor/github.com/go-ini/ini/section_test.go b/vendor/github.com/go-ini/ini/section_test.go
deleted file mode 100644
index e9c347881..000000000
--- a/vendor/github.com/go-ini/ini/section_test.go
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-func TestSection_SetBody(t *testing.T) {
- Convey("Set body of raw section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000`)
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(sec.Body(), ShouldEqual, `1111111111111111111000000000000000001110000
-111111111111111111100000000000111000000000`)
-
- sec.SetBody("1111111111111111111000000000000000001110000")
- So(sec.Body(), ShouldEqual, `1111111111111111111000000000000000001110000`)
-
- Convey("Set for non-raw section", func() {
- sec, err := f.NewSection("author")
- So(err, ShouldBeNil)
- So(sec, ShouldNotBeNil)
- So(sec.Body(), ShouldBeEmpty)
-
- sec.SetBody("1111111111111111111000000000000000001110000")
- So(sec.Body(), ShouldBeEmpty)
- })
- })
-}
-
-func TestSection_NewKey(t *testing.T) {
- Convey("Create a new key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.Name(), ShouldEqual, "NAME")
- So(k.Value(), ShouldEqual, "ini")
-
- Convey("With duplicated name", func() {
- k, err := f.Section("").NewKey("NAME", "ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- // Overwrite previous existed key
- So(k.Value(), ShouldEqual, "ini.v1")
- })
-
- Convey("With empty string", func() {
- _, err := f.Section("").NewKey("", "")
- So(err, ShouldNotBeNil)
- })
- })
-
- Convey("Create keys with same name and allow shadow", t, func() {
- f, err := ini.ShadowLoad([]byte(""))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("NAME", "ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(k.ValueWithShadows(), ShouldResemble, []string{"ini", "ini.v1"})
- })
-}
-
-func TestSection_NewBooleanKey(t *testing.T) {
- Convey("Create a new boolean key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewBooleanKey("start-ssh-server")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.Name(), ShouldEqual, "start-ssh-server")
- So(k.Value(), ShouldEqual, "true")
-
- Convey("With empty string", func() {
- _, err := f.Section("").NewBooleanKey("")
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func TestSection_GetKey(t *testing.T) {
- Convey("Get a key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- k, err = f.Section("").GetKey("NAME")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.Name(), ShouldEqual, "NAME")
- So(k.Value(), ShouldEqual, "ini")
-
- Convey("Key not exists", func() {
- _, err := f.Section("").GetKey("404")
- So(err, ShouldNotBeNil)
- })
-
- Convey("Key exists in parent section", func() {
- k, err := f.Section("parent").NewKey("AGE", "18")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- k, err = f.Section("parent.child.son").GetKey("AGE")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- So(k.Value(), ShouldEqual, "18")
- })
- })
-}
-
-func TestSection_HasKey(t *testing.T) {
- Convey("Check if a key exists", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(f.Section("").HasKey("NAME"), ShouldBeTrue)
- So(f.Section("").Haskey("NAME"), ShouldBeTrue)
- So(f.Section("").HasKey("404"), ShouldBeFalse)
- So(f.Section("").Haskey("404"), ShouldBeFalse)
- })
-}
-
-func TestSection_HasValue(t *testing.T) {
- Convey("Check if contains a value in any key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(f.Section("").HasValue("ini"), ShouldBeTrue)
- So(f.Section("").HasValue("404"), ShouldBeFalse)
- })
-}
-
-func TestSection_Key(t *testing.T) {
- Convey("Get a key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- k = f.Section("").Key("NAME")
- So(k, ShouldNotBeNil)
- So(k.Name(), ShouldEqual, "NAME")
- So(k.Value(), ShouldEqual, "ini")
-
- Convey("Key not exists", func() {
- k := f.Section("").Key("404")
- So(k, ShouldNotBeNil)
- So(k.Name(), ShouldEqual, "404")
- })
-
- Convey("Key exists in parent section", func() {
- k, err := f.Section("parent").NewKey("AGE", "18")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- k = f.Section("parent.child.son").Key("AGE")
- So(k, ShouldNotBeNil)
- So(k.Value(), ShouldEqual, "18")
- })
- })
-}
-
-func TestSection_Keys(t *testing.T) {
- Convey("Get all keys in a section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("VERSION", "v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- keys := f.Section("").Keys()
- names := []string{"NAME", "VERSION", "IMPORT_PATH"}
- So(len(keys), ShouldEqual, len(names))
- for i, name := range names {
- So(keys[i].Name(), ShouldEqual, name)
- }
- })
-}
-
-func TestSection_ParentKeys(t *testing.T) {
- Convey("Get all keys of parent sections", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("package").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("package").NewKey("VERSION", "v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("package").NewKey("IMPORT_PATH", "gopkg.in/ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- keys := f.Section("package.sub.sub2").ParentKeys()
- names := []string{"NAME", "VERSION", "IMPORT_PATH"}
- So(len(keys), ShouldEqual, len(names))
- for i, name := range names {
- So(keys[i].Name(), ShouldEqual, name)
- }
- })
-}
-
-func TestSection_KeyStrings(t *testing.T) {
- Convey("Get all key names in a section", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("VERSION", "v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(f.Section("").KeyStrings(), ShouldResemble, []string{"NAME", "VERSION", "IMPORT_PATH"})
- })
-}
-
-func TestSection_KeyHash(t *testing.T) {
- Convey("Get clone of key hash", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("VERSION", "v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
- k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- hash := f.Section("").KeysHash()
- relation := map[string]string{
- "NAME": "ini",
- "VERSION": "v1",
- "IMPORT_PATH": "gopkg.in/ini.v1",
- }
- for k, v := range hash {
- So(v, ShouldEqual, relation[k])
- }
- })
-}
-
-func TestSection_DeleteKey(t *testing.T) {
- Convey("Delete a key", t, func() {
- f := ini.Empty()
- So(f, ShouldNotBeNil)
-
- k, err := f.Section("").NewKey("NAME", "ini")
- So(err, ShouldBeNil)
- So(k, ShouldNotBeNil)
-
- So(f.Section("").HasKey("NAME"), ShouldBeTrue)
- f.Section("").DeleteKey("NAME")
- So(f.Section("").HasKey("NAME"), ShouldBeFalse)
- })
-}
diff --git a/vendor/github.com/go-ini/ini/struct_test.go b/vendor/github.com/go-ini/ini/struct_test.go
deleted file mode 100644
index 75987ea99..000000000
--- a/vendor/github.com/go-ini/ini/struct_test.go
+++ /dev/null
@@ -1,387 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// 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.
-
-package ini_test
-
-import (
- "bytes"
- "fmt"
- "strings"
- "testing"
- "time"
-
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/ini.v1"
-)
-
-type testNested struct {
- Cities []string `delim:"|"`
- Visits []time.Time
- Years []int
- Numbers []int64
- Ages []uint
- Populations []uint64
- Coordinates []float64
- Note string
- Unused int `ini:"-"`
-}
-
-type testEmbeded struct {
- GPA float64
-}
-
-type testStruct struct {
- Name string `ini:"NAME"`
- Age int
- Male bool
- Money float64
- Born time.Time
- Time time.Duration `ini:"Duration"`
- Others testNested
- *testEmbeded `ini:"grade"`
- Unused int `ini:"-"`
- Unsigned uint
- Omitted bool `ini:"omitthis,omitempty"`
- Shadows []string `ini:",,allowshadow"`
- ShadowInts []int `ini:"Shadows,,allowshadow"`
-}
-
-const _CONF_DATA_STRUCT = `
-NAME = Unknwon
-Age = 21
-Male = true
-Money = 1.25
-Born = 1993-10-07T20:17:05Z
-Duration = 2h45m
-Unsigned = 3
-omitthis = true
-Shadows = 1, 2
-Shadows = 3, 4
-
-[Others]
-Cities = HangZhou|Boston
-Visits = 1993-10-07T20:17:05Z, 1993-10-07T20:17:05Z
-Years = 1993,1994
-Numbers = 10010,10086
-Ages = 18,19
-Populations = 12345678,98765432
-Coordinates = 192.168,10.11
-Note = Hello world!
-
-[grade]
-GPA = 2.8
-
-[foo.bar]
-Here = there
-When = then
-`
-
-type unsupport struct {
- Byte byte
-}
-
-type unsupport2 struct {
- Others struct {
- Cities byte
- }
-}
-
-type unsupport3 struct {
- Cities byte
-}
-
-type unsupport4 struct {
- *unsupport3 `ini:"Others"`
-}
-
-type defaultValue struct {
- Name string
- Age int
- Male bool
- Money float64
- Born time.Time
- Cities []string
-}
-
-type fooBar struct {
- Here, When string
-}
-
-const _INVALID_DATA_CONF_STRUCT = `
-Name =
-Age = age
-Male = 123
-Money = money
-Born = nil
-Cities =
-`
-
-func Test_MapToStruct(t *testing.T) {
- Convey("Map to struct", t, func() {
- Convey("Map file to struct", func() {
- ts := new(testStruct)
- So(ini.MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil)
-
- So(ts.Name, ShouldEqual, "Unknwon")
- So(ts.Age, ShouldEqual, 21)
- So(ts.Male, ShouldBeTrue)
- So(ts.Money, ShouldEqual, 1.25)
- So(ts.Unsigned, ShouldEqual, 3)
-
- t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z")
- So(err, ShouldBeNil)
- So(ts.Born.String(), ShouldEqual, t.String())
-
- dur, err := time.ParseDuration("2h45m")
- So(err, ShouldBeNil)
- So(ts.Time.Seconds(), ShouldEqual, dur.Seconds())
-
- So(strings.Join(ts.Others.Cities, ","), ShouldEqual, "HangZhou,Boston")
- So(ts.Others.Visits[0].String(), ShouldEqual, t.String())
- So(fmt.Sprint(ts.Others.Years), ShouldEqual, "[1993 1994]")
- So(fmt.Sprint(ts.Others.Numbers), ShouldEqual, "[10010 10086]")
- So(fmt.Sprint(ts.Others.Ages), ShouldEqual, "[18 19]")
- So(fmt.Sprint(ts.Others.Populations), ShouldEqual, "[12345678 98765432]")
- So(fmt.Sprint(ts.Others.Coordinates), ShouldEqual, "[192.168 10.11]")
- So(ts.Others.Note, ShouldEqual, "Hello world!")
- So(ts.testEmbeded.GPA, ShouldEqual, 2.8)
- })
-
- Convey("Map section to struct", func() {
- foobar := new(fooBar)
- f, err := ini.Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
-
- So(f.Section("foo.bar").MapTo(foobar), ShouldBeNil)
- So(foobar.Here, ShouldEqual, "there")
- So(foobar.When, ShouldEqual, "then")
- })
-
- Convey("Map to non-pointer struct", func() {
- f, err := ini.Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- So(f.MapTo(testStruct{}), ShouldNotBeNil)
- })
-
- Convey("Map to unsupported type", func() {
- f, err := ini.Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
- So(f, ShouldNotBeNil)
-
- f.NameMapper = func(raw string) string {
- if raw == "Byte" {
- return "NAME"
- }
- return raw
- }
- So(f.MapTo(&unsupport{}), ShouldNotBeNil)
- So(f.MapTo(&unsupport2{}), ShouldNotBeNil)
- So(f.MapTo(&unsupport4{}), ShouldNotBeNil)
- })
-
- Convey("Map to omitempty field", func() {
- ts := new(testStruct)
- So(ini.MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil)
-
- So(ts.Omitted, ShouldEqual, true)
- })
-
- Convey("Map with shadows", func() {
- f, err := ini.LoadSources(ini.LoadOptions{AllowShadows: true}, []byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
- ts := new(testStruct)
- So(f.MapTo(ts), ShouldBeNil)
-
- So(strings.Join(ts.Shadows, " "), ShouldEqual, "1 2 3 4")
- So(fmt.Sprintf("%v", ts.ShadowInts), ShouldEqual, "[1 2 3 4]")
- })
-
- Convey("Map from invalid data source", func() {
- So(ini.MapTo(&testStruct{}, "hi"), ShouldNotBeNil)
- })
-
- Convey("Map to wrong types and gain default values", func() {
- f, err := ini.Load([]byte(_INVALID_DATA_CONF_STRUCT))
- So(err, ShouldBeNil)
-
- t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z")
- So(err, ShouldBeNil)
- dv := &defaultValue{"Joe", 10, true, 1.25, t, []string{"HangZhou", "Boston"}}
- So(f.MapTo(dv), ShouldBeNil)
- So(dv.Name, ShouldEqual, "Joe")
- So(dv.Age, ShouldEqual, 10)
- So(dv.Male, ShouldBeTrue)
- So(dv.Money, ShouldEqual, 1.25)
- So(dv.Born.String(), ShouldEqual, t.String())
- So(strings.Join(dv.Cities, ","), ShouldEqual, "HangZhou,Boston")
- })
- })
-
- Convey("Map to struct in strict mode", t, func() {
- f, err := ini.Load([]byte(`
-name=bruce
-age=a30`))
- So(err, ShouldBeNil)
-
- type Strict struct {
- Name string `ini:"name"`
- Age int `ini:"age"`
- }
- s := new(Strict)
-
- So(f.Section("").StrictMapTo(s), ShouldNotBeNil)
- })
-
- Convey("Map slice in strict mode", t, func() {
- f, err := ini.Load([]byte(`
-names=alice, bruce`))
- So(err, ShouldBeNil)
-
- type Strict struct {
- Names []string `ini:"names"`
- }
- s := new(Strict)
-
- So(f.Section("").StrictMapTo(s), ShouldBeNil)
- So(fmt.Sprint(s.Names), ShouldEqual, "[alice bruce]")
- })
-}
-
-func Test_ReflectFromStruct(t *testing.T) {
- Convey("Reflect from struct", t, func() {
- type Embeded struct {
- Dates []time.Time `delim:"|" comment:"Time data"`
- Places []string
- Years []int
- Numbers []int64
- Ages []uint
- Populations []uint64
- Coordinates []float64
- None []int
- }
- type Author struct {
- Name string `ini:"NAME"`
- Male bool
- Age int `comment:"Author's age"`
- Height uint
- GPA float64
- Date time.Time
- NeverMind string `ini:"-"`
- *Embeded `ini:"infos" comment:"Embeded section"`
- }
-
- t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z")
- So(err, ShouldBeNil)
- a := &Author{"Unknwon", true, 21, 100, 2.8, t, "",
- &Embeded{
- []time.Time{t, t},
- []string{"HangZhou", "Boston"},
- []int{1993, 1994},
- []int64{10010, 10086},
- []uint{18, 19},
- []uint64{12345678, 98765432},
- []float64{192.168, 10.11},
- []int{},
- }}
- cfg := ini.Empty()
- So(ini.ReflectFrom(cfg, a), ShouldBeNil)
-
- var buf bytes.Buffer
- _, err = cfg.WriteTo(&buf)
- So(err, ShouldBeNil)
- So(buf.String(), ShouldEqual, `NAME = Unknwon
-Male = true
-; Author's age
-Age = 21
-Height = 100
-GPA = 2.8
-Date = 1993-10-07T20:17:05Z
-
-; Embeded section
-[infos]
-; Time data
-Dates = 1993-10-07T20:17:05Z|1993-10-07T20:17:05Z
-Places = HangZhou,Boston
-Years = 1993,1994
-Numbers = 10010,10086
-Ages = 18,19
-Populations = 12345678,98765432
-Coordinates = 192.168,10.11
-None =
-
-`)
-
- Convey("Reflect from non-point struct", func() {
- So(ini.ReflectFrom(cfg, Author{}), ShouldNotBeNil)
- })
-
- Convey("Reflect from struct with omitempty", func() {
- cfg := ini.Empty()
- type SpecialStruct struct {
- FirstName string `ini:"first_name"`
- LastName string `ini:"last_name"`
- JustOmitMe string `ini:"omitempty"`
- LastLogin time.Time `ini:"last_login,omitempty"`
- LastLogin2 time.Time `ini:",omitempty"`
- NotEmpty int `ini:"omitempty"`
- }
-
- So(ini.ReflectFrom(cfg, &SpecialStruct{FirstName: "John", LastName: "Doe", NotEmpty: 9}), ShouldBeNil)
-
- var buf bytes.Buffer
- _, err = cfg.WriteTo(&buf)
- So(buf.String(), ShouldEqual, `first_name = John
-last_name = Doe
-omitempty = 9
-
-`)
- })
- })
-}
-
-type testMapper struct {
- PackageName string
-}
-
-func Test_NameGetter(t *testing.T) {
- Convey("Test name mappers", t, func() {
- So(ini.MapToWithMapper(&testMapper{}, ini.TitleUnderscore, []byte("packag_name=ini")), ShouldBeNil)
-
- cfg, err := ini.Load([]byte("PACKAGE_NAME=ini"))
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- cfg.NameMapper = ini.AllCapsUnderscore
- tg := new(testMapper)
- So(cfg.MapTo(tg), ShouldBeNil)
- So(tg.PackageName, ShouldEqual, "ini")
- })
-}
-
-type testDurationStruct struct {
- Duration time.Duration `ini:"Duration"`
-}
-
-func Test_Duration(t *testing.T) {
- Convey("Duration less than 16m50s", t, func() {
- ds := new(testDurationStruct)
- So(ini.MapTo(ds, []byte("Duration=16m49s")), ShouldBeNil)
-
- dur, err := time.ParseDuration("16m49s")
- So(err, ShouldBeNil)
- So(ds.Duration.Seconds(), ShouldEqual, dur.Seconds())
- })
-}
diff --git a/vendor/github.com/go-ini/ini/testdata/TestFile_WriteTo.golden b/vendor/github.com/go-ini/ini/testdata/TestFile_WriteTo.golden
deleted file mode 100644
index 03409d86d..000000000
--- a/vendor/github.com/go-ini/ini/testdata/TestFile_WriteTo.golden
+++ /dev/null
@@ -1,86 +0,0 @@
-; Package name
-NAME = ini
-; Package version
-VERSION = v1
-; Package import path
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
-; Information about package author
-# Bio can be written in multiple lines.
-[author]
-; This is author name
-NAME = Unknwon
-E-MAIL = u@gogs.io
-GITHUB = https://github.com/%(NAME)s
-# Succeeding comment
-BIO = """Gopher.
-Coding addict.
-Good man.
-"""
-
-[package]
-CLONE_URL = https://%(IMPORT_PATH)s
-
-[package.sub]
-UNUSED_KEY = should be deleted
-
-[features]
-- = Support read/write comments of keys and sections
-- = Support auto-increment of key names
-- = Support load multiple files to overwrite key values
-
-[types]
-STRING = str
-BOOL = true
-BOOL_FALSE = false
-FLOAT64 = 1.25
-INT = 10
-TIME = 2015-01-01T20:17:05Z
-DURATION = 2h45m
-UINT = 3
-
-[array]
-STRINGS = en, zh, de
-FLOAT64S = 1.1, 2.2, 3.3
-INTS = 1, 2, 3
-UINTS = 1, 2, 3
-TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z
-
-[note]
-empty_lines = next line is empty
-boolean_key
-more = notes
-
-; Comment before the section
-; This is a comment for the section too
-[comments]
-; Comment before key
-key = value
-; This is a comment for key2
-key2 = value2
-key3 = "one", "two", "three"
-
-[string escapes]
-key1 = value1, value2, value3
-key2 = value1\, value2
-key3 = val\ue1, value2
-key4 = value1\\, value\\\\2
-key5 = value1\,, value2
-key6 = aaa bbb\ and\ space ccc
-
-[advance]
-value with quotes = some value
-value quote2 again = some value
-includes comment sign = `my#password`
-includes comment sign2 = `my;password`
-true = 2+3=5
-`1+1=2` = true
-`6+1=7` = true
-"""`5+5`""" = 10
-`"6+6"` = 12
-`7-2=4` = false
-ADDRESS = """404 road,
-NotFound, State, 50000"""
-two_lines = how about continuation lines?
-lots_of_lines = 1 2 3 4
-
diff --git a/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini b/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini
deleted file mode 100644
index c8bf82c8f..000000000
--- a/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini b/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini
deleted file mode 100644
index 27f62186e..000000000
--- a/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini b/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini
deleted file mode 100644
index 2ed0ac1d3..000000000
--- a/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[author]
-E-MAIL = u@gogs.io \ No newline at end of file
diff --git a/vendor/github.com/go-ini/ini/testdata/full.ini b/vendor/github.com/go-ini/ini/testdata/full.ini
deleted file mode 100644
index 469b1f13e..000000000
--- a/vendor/github.com/go-ini/ini/testdata/full.ini
+++ /dev/null
@@ -1,83 +0,0 @@
-; Package name
-NAME = ini
-; Package version
-VERSION = v1
-; Package import path
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
-# Information about package author
-# Bio can be written in multiple lines.
-[author]
-NAME = Unknwon
-E-MAIL = u@gogs.io
-GITHUB = https://github.com/%(NAME)s
-BIO = """Gopher.
-Coding addict.
-Good man.
-""" # Succeeding comment
-
-[package]
-CLONE_URL = https://%(IMPORT_PATH)s
-
-[package.sub]
-UNUSED_KEY = should be deleted
-
-[features]
--: Support read/write comments of keys and sections
--: Support auto-increment of key names
--: Support load multiple files to overwrite key values
-
-[types]
-STRING = str
-BOOL = true
-BOOL_FALSE = false
-FLOAT64 = 1.25
-INT = 10
-TIME = 2015-01-01T20:17:05Z
-DURATION = 2h45m
-UINT = 3
-
-[array]
-STRINGS = en, zh, de
-FLOAT64S = 1.1, 2.2, 3.3
-INTS = 1, 2, 3
-UINTS = 1, 2, 3
-TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z
-
-[note]
-empty_lines = next line is empty\
-
-; Comment before the section
-[comments] ; This is a comment for the section too
-; Comment before key
-key = "value"
-key2 = "value2" ; This is a comment for key2
-key3 = "one", "two", "three"
-
-[string escapes]
-key1 = value1, value2, value3
-key2 = value1\, value2
-key3 = val\ue1, value2
-key4 = value1\\, value\\\\2
-key5 = value1\,, value2
-key6 = aaa bbb\ and\ space ccc
-
-[advance]
-value with quotes = "some value"
-value quote2 again = 'some value'
-includes comment sign = `my#password`
-includes comment sign2 = `my;password`
-true = 2+3=5
-"1+1=2" = true
-"""6+1=7""" = true
-"""`5+5`""" = 10
-`"6+6"` = 12
-`7-2=4` = false
-ADDRESS = `404 road,
-NotFound, State, 50000`
-two_lines = how about \
- continuation lines?
-lots_of_lines = 1 \
- 2 \
- 3 \
- 4 \
diff --git a/vendor/github.com/go-ini/ini/testdata/minimal.ini b/vendor/github.com/go-ini/ini/testdata/minimal.ini
deleted file mode 100644
index f8e7ec89f..000000000
--- a/vendor/github.com/go-ini/ini/testdata/minimal.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[author]
-E-MAIL = u@gogs.io \ No newline at end of file
diff --git a/vendor/github.com/go-ldap/ldap/.githooks/pre-push b/vendor/github.com/go-ldap/ldap/.githooks/pre-push
deleted file mode 100755
index 4325ee31c..000000000
--- a/vendor/github.com/go-ldap/ldap/.githooks/pre-push
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-# install from the root of the repo with:
-# ln -s ../../.githooks/pre-push .git/hooks/pre-push
-
-make vet fmt lint \ No newline at end of file
diff --git a/vendor/github.com/go-ldap/ldap/conn_test.go b/vendor/github.com/go-ldap/ldap/conn_test.go
deleted file mode 100644
index 488754d16..000000000
--- a/vendor/github.com/go-ldap/ldap/conn_test.go
+++ /dev/null
@@ -1,336 +0,0 @@
-package ldap
-
-import (
- "bytes"
- "errors"
- "io"
- "net"
- "net/http"
- "net/http/httptest"
- "runtime"
- "sync"
- "testing"
- "time"
-
- "gopkg.in/asn1-ber.v1"
-)
-
-func TestUnresponsiveConnection(t *testing.T) {
- // The do-nothing server that accepts requests and does nothing
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- }))
- defer ts.Close()
- c, err := net.Dial(ts.Listener.Addr().Network(), ts.Listener.Addr().String())
- if err != nil {
- t.Fatalf("error connecting to localhost tcp: %v", err)
- }
-
- // Create an Ldap connection
- conn := NewConn(c, false)
- conn.SetTimeout(time.Millisecond)
- conn.Start()
- defer conn.Close()
-
- // Mock a packet
- packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, conn.nextMessageID(), "MessageID"))
- bindRequest := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationBindRequest, nil, "Bind Request")
- bindRequest.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, 3, "Version"))
- packet.AppendChild(bindRequest)
-
- // Send packet and test response
- msgCtx, err := conn.sendMessage(packet)
- if err != nil {
- t.Fatalf("error sending message: %v", err)
- }
- defer conn.finishMessage(msgCtx)
-
- packetResponse, ok := <-msgCtx.responses
- if !ok {
- t.Fatalf("no PacketResponse in response channel")
- }
- packet, err = packetResponse.ReadPacket()
- if err == nil {
- t.Fatalf("expected timeout error")
- }
- if err.Error() != "ldap: connection timed out" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-// TestFinishMessage tests that we do not enter deadlock when a goroutine makes
-// a request but does not handle all responses from the server.
-func TestFinishMessage(t *testing.T) {
- ptc := newPacketTranslatorConn()
- defer ptc.Close()
-
- conn := NewConn(ptc, false)
- conn.Start()
-
- // Test sending 5 different requests in series. Ensure that we can
- // get a response packet from the underlying connection and also
- // ensure that we can gracefully ignore unhandled responses.
- for i := 0; i < 5; i++ {
- t.Logf("serial request %d", i)
- // Create a message and make sure we can receive responses.
- msgCtx := testSendRequest(t, ptc, conn)
- testReceiveResponse(t, ptc, msgCtx)
-
- // Send a few unhandled responses and finish the message.
- testSendUnhandledResponsesAndFinish(t, ptc, conn, msgCtx, 5)
- t.Logf("serial request %d done", i)
- }
-
- // Test sending 5 different requests in parallel.
- var wg sync.WaitGroup
- for i := 0; i < 5; i++ {
- wg.Add(1)
- go func(i int) {
- defer wg.Done()
- t.Logf("parallel request %d", i)
- // Create a message and make sure we can receive responses.
- msgCtx := testSendRequest(t, ptc, conn)
- testReceiveResponse(t, ptc, msgCtx)
-
- // Send a few unhandled responses and finish the message.
- testSendUnhandledResponsesAndFinish(t, ptc, conn, msgCtx, 5)
- t.Logf("parallel request %d done", i)
- }(i)
- }
- wg.Wait()
-
- // We cannot run Close() in a defer because t.FailNow() will run it and
- // it will block if the processMessage Loop is in a deadlock.
- conn.Close()
-}
-
-func testSendRequest(t *testing.T, ptc *packetTranslatorConn, conn *Conn) (msgCtx *messageContext) {
- var msgID int64
- runWithTimeout(t, time.Second, func() {
- msgID = conn.nextMessageID()
- })
-
- requestPacket := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- requestPacket.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, msgID, "MessageID"))
-
- var err error
-
- runWithTimeout(t, time.Second, func() {
- msgCtx, err = conn.sendMessage(requestPacket)
- if err != nil {
- t.Fatalf("unable to send request message: %s", err)
- }
- })
-
- // We should now be able to get this request packet out from the other
- // side.
- runWithTimeout(t, time.Second, func() {
- if _, err = ptc.ReceiveRequest(); err != nil {
- t.Fatalf("unable to receive request packet: %s", err)
- }
- })
-
- return msgCtx
-}
-
-func testReceiveResponse(t *testing.T, ptc *packetTranslatorConn, msgCtx *messageContext) {
- // Send a mock response packet.
- responsePacket := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Response")
- responsePacket.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, msgCtx.id, "MessageID"))
-
- runWithTimeout(t, time.Second, func() {
- if err := ptc.SendResponse(responsePacket); err != nil {
- t.Fatalf("unable to send response packet: %s", err)
- }
- })
-
- // We should be able to receive the packet from the connection.
- runWithTimeout(t, time.Second, func() {
- if _, ok := <-msgCtx.responses; !ok {
- t.Fatal("response channel closed")
- }
- })
-}
-
-func testSendUnhandledResponsesAndFinish(t *testing.T, ptc *packetTranslatorConn, conn *Conn, msgCtx *messageContext, numResponses int) {
- // Send a mock response packet.
- responsePacket := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Response")
- responsePacket.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, msgCtx.id, "MessageID"))
-
- // Send extra responses but do not attempt to receive them on the
- // client side.
- for i := 0; i < numResponses; i++ {
- runWithTimeout(t, time.Second, func() {
- if err := ptc.SendResponse(responsePacket); err != nil {
- t.Fatalf("unable to send response packet: %s", err)
- }
- })
- }
-
- // Finally, attempt to finish this message.
- runWithTimeout(t, time.Second, func() {
- conn.finishMessage(msgCtx)
- })
-}
-
-func runWithTimeout(t *testing.T, timeout time.Duration, f func()) {
- done := make(chan struct{})
- go func() {
- f()
- close(done)
- }()
-
- select {
- case <-done: // Success!
- case <-time.After(timeout):
- _, file, line, _ := runtime.Caller(1)
- t.Fatalf("%s:%d timed out", file, line)
- }
-}
-
-// packetTranslatorConn is a helpful type which can be used with various tests
-// in this package. It implements the net.Conn interface to be used as an
-// underlying connection for a *ldap.Conn. Most methods are no-ops but the
-// Read() and Write() methods are able to translate ber-encoded packets for
-// testing LDAP requests and responses.
-//
-// Test cases can simulate an LDAP server sending a response by calling the
-// SendResponse() method with a ber-encoded LDAP response packet. Test cases
-// can simulate an LDAP server receiving a request from a client by calling the
-// ReceiveRequest() method which returns a ber-encoded LDAP request packet.
-type packetTranslatorConn struct {
- lock sync.Mutex
- isClosed bool
-
- responseCond sync.Cond
- requestCond sync.Cond
-
- responseBuf bytes.Buffer
- requestBuf bytes.Buffer
-}
-
-var errPacketTranslatorConnClosed = errors.New("connection closed")
-
-func newPacketTranslatorConn() *packetTranslatorConn {
- conn := &packetTranslatorConn{}
- conn.responseCond = sync.Cond{L: &conn.lock}
- conn.requestCond = sync.Cond{L: &conn.lock}
-
- return conn
-}
-
-// Read is called by the reader() loop to receive response packets. It will
-// block until there are more packet bytes available or this connection is
-// closed.
-func (c *packetTranslatorConn) Read(b []byte) (n int, err error) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- for !c.isClosed {
- // Attempt to read data from the response buffer. If it fails
- // with an EOF, wait and try again.
- n, err = c.responseBuf.Read(b)
- if err != io.EOF {
- return n, err
- }
-
- c.responseCond.Wait()
- }
-
- return 0, errPacketTranslatorConnClosed
-}
-
-// SendResponse writes the given response packet to the response buffer for
-// this connection, signalling any goroutine waiting to read a response.
-func (c *packetTranslatorConn) SendResponse(packet *ber.Packet) error {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- if c.isClosed {
- return errPacketTranslatorConnClosed
- }
-
- // Signal any goroutine waiting to read a response.
- defer c.responseCond.Broadcast()
-
- // Writes to the buffer should always succeed.
- c.responseBuf.Write(packet.Bytes())
-
- return nil
-}
-
-// Write is called by the processMessages() loop to send request packets.
-func (c *packetTranslatorConn) Write(b []byte) (n int, err error) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- if c.isClosed {
- return 0, errPacketTranslatorConnClosed
- }
-
- // Signal any goroutine waiting to read a request.
- defer c.requestCond.Broadcast()
-
- // Writes to the buffer should always succeed.
- return c.requestBuf.Write(b)
-}
-
-// ReceiveRequest attempts to read a request packet from this connection. It
-// will block until it is able to read a full request packet or until this
-// connection is closed.
-func (c *packetTranslatorConn) ReceiveRequest() (*ber.Packet, error) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- for !c.isClosed {
- // Attempt to parse a request packet from the request buffer.
- // If it fails with an unexpected EOF, wait and try again.
- requestReader := bytes.NewReader(c.requestBuf.Bytes())
- packet, err := ber.ReadPacket(requestReader)
- switch err {
- case io.EOF, io.ErrUnexpectedEOF:
- c.requestCond.Wait()
- case nil:
- // Advance the request buffer by the number of bytes
- // read to decode the request packet.
- c.requestBuf.Next(c.requestBuf.Len() - requestReader.Len())
- return packet, nil
- default:
- return nil, err
- }
- }
-
- return nil, errPacketTranslatorConnClosed
-}
-
-// Close closes this connection causing Read() and Write() calls to fail.
-func (c *packetTranslatorConn) Close() error {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- c.isClosed = true
- c.responseCond.Broadcast()
- c.requestCond.Broadcast()
-
- return nil
-}
-
-func (c *packetTranslatorConn) LocalAddr() net.Addr {
- return (*net.TCPAddr)(nil)
-}
-
-func (c *packetTranslatorConn) RemoteAddr() net.Addr {
- return (*net.TCPAddr)(nil)
-}
-
-func (c *packetTranslatorConn) SetDeadline(t time.Time) error {
- return nil
-}
-
-func (c *packetTranslatorConn) SetReadDeadline(t time.Time) error {
- return nil
-}
-
-func (c *packetTranslatorConn) SetWriteDeadline(t time.Time) error {
- return nil
-}
diff --git a/vendor/github.com/go-ldap/ldap/control_test.go b/vendor/github.com/go-ldap/ldap/control_test.go
deleted file mode 100644
index 11527463e..000000000
--- a/vendor/github.com/go-ldap/ldap/control_test.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package ldap
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "runtime"
- "testing"
-
- "gopkg.in/asn1-ber.v1"
-)
-
-func TestControlPaging(t *testing.T) {
- runControlTest(t, NewControlPaging(0))
- runControlTest(t, NewControlPaging(100))
-}
-
-func TestControlManageDsaIT(t *testing.T) {
- runControlTest(t, NewControlManageDsaIT(true))
- runControlTest(t, NewControlManageDsaIT(false))
-}
-
-func TestControlString(t *testing.T) {
- runControlTest(t, NewControlString("x", true, "y"))
- runControlTest(t, NewControlString("x", true, ""))
- runControlTest(t, NewControlString("x", false, "y"))
- runControlTest(t, NewControlString("x", false, ""))
-}
-
-func runControlTest(t *testing.T, originalControl Control) {
- header := ""
- if callerpc, _, line, ok := runtime.Caller(1); ok {
- if caller := runtime.FuncForPC(callerpc); caller != nil {
- header = fmt.Sprintf("%s:%d: ", caller.Name(), line)
- }
- }
-
- encodedPacket := originalControl.Encode()
- encodedBytes := encodedPacket.Bytes()
-
- // Decode directly from the encoded packet (ensures Value is correct)
- fromPacket := DecodeControl(encodedPacket)
- if !bytes.Equal(encodedBytes, fromPacket.Encode().Bytes()) {
- t.Errorf("%sround-trip from encoded packet failed", header)
- }
- if reflect.TypeOf(originalControl) != reflect.TypeOf(fromPacket) {
- t.Errorf("%sgot different type decoding from encoded packet: %T vs %T", header, fromPacket, originalControl)
- }
-
- // Decode from the wire bytes (ensures ber-encoding is correct)
- fromBytes := DecodeControl(ber.DecodePacket(encodedBytes))
- if !bytes.Equal(encodedBytes, fromBytes.Encode().Bytes()) {
- t.Errorf("%sround-trip from encoded bytes failed", header)
- }
- if reflect.TypeOf(originalControl) != reflect.TypeOf(fromPacket) {
- t.Errorf("%sgot different type decoding from encoded bytes: %T vs %T", header, fromBytes, originalControl)
- }
-}
-
-func TestDescribeControlManageDsaIT(t *testing.T) {
- runAddControlDescriptions(t, NewControlManageDsaIT(false), "Control Type (Manage DSA IT)")
- runAddControlDescriptions(t, NewControlManageDsaIT(true), "Control Type (Manage DSA IT)", "Criticality")
-}
-
-func TestDescribeControlPaging(t *testing.T) {
- runAddControlDescriptions(t, NewControlPaging(100), "Control Type (Paging)", "Control Value (Paging)")
- runAddControlDescriptions(t, NewControlPaging(0), "Control Type (Paging)", "Control Value (Paging)")
-}
-
-func TestDescribeControlString(t *testing.T) {
- runAddControlDescriptions(t, NewControlString("x", true, "y"), "Control Type ()", "Criticality", "Control Value")
- runAddControlDescriptions(t, NewControlString("x", true, ""), "Control Type ()", "Criticality", "Control Value")
- runAddControlDescriptions(t, NewControlString("x", false, "y"), "Control Type ()", "Control Value")
- runAddControlDescriptions(t, NewControlString("x", false, ""), "Control Type ()", "Control Value")
-}
-
-func runAddControlDescriptions(t *testing.T, originalControl Control, childDescriptions ...string) {
- header := ""
- if callerpc, _, line, ok := runtime.Caller(1); ok {
- if caller := runtime.FuncForPC(callerpc); caller != nil {
- header = fmt.Sprintf("%s:%d: ", caller.Name(), line)
- }
- }
-
- encodedControls := encodeControls([]Control{originalControl})
- addControlDescriptions(encodedControls)
- encodedPacket := encodedControls.Children[0]
- if len(encodedPacket.Children) != len(childDescriptions) {
- t.Errorf("%sinvalid number of children: %d != %d", header, len(encodedPacket.Children), len(childDescriptions))
- }
- for i, desc := range childDescriptions {
- if encodedPacket.Children[i].Description != desc {
- t.Errorf("%sdescription not as expected: %s != %s", header, encodedPacket.Children[i].Description, desc)
- }
- }
-
-}
diff --git a/vendor/github.com/go-ldap/ldap/dn_test.go b/vendor/github.com/go-ldap/ldap/dn_test.go
deleted file mode 100644
index af5fc1468..000000000
--- a/vendor/github.com/go-ldap/ldap/dn_test.go
+++ /dev/null
@@ -1,211 +0,0 @@
-package ldap_test
-
-import (
- "reflect"
- "testing"
-
- "gopkg.in/ldap.v2"
-)
-
-func TestSuccessfulDNParsing(t *testing.T) {
- testcases := map[string]ldap.DN{
- "": ldap.DN{[]*ldap.RelativeDN{}},
- "cn=Jim\\2C \\22Hasse Hö\\22 Hansson!,dc=dummy,dc=com": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"cn", "Jim, \"Hasse Hö\" Hansson!"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"dc", "dummy"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"dc", "com"}}}}},
- "UID=jsmith,DC=example,DC=net": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"UID", "jsmith"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "example"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "net"}}}}},
- "OU=Sales+CN=J. Smith,DC=example,DC=net": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{
- &ldap.AttributeTypeAndValue{"OU", "Sales"},
- &ldap.AttributeTypeAndValue{"CN", "J. Smith"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "example"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "net"}}}}},
- "1.3.6.1.4.1.1466.0=#04024869": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"1.3.6.1.4.1.1466.0", "Hi"}}}}},
- "1.3.6.1.4.1.1466.0=#04024869,DC=net": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"1.3.6.1.4.1.1466.0", "Hi"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "net"}}}}},
- "CN=Lu\\C4\\8Di\\C4\\87": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"CN", "LuÄić"}}}}},
- " CN = Lu\\C4\\8Di\\C4\\87 ": ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"CN", "LuÄić"}}}}},
- ` A = 1 , B = 2 `: ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"A", "1"}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"B", "2"}}}}},
- ` A = 1 + B = 2 `: ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{
- &ldap.AttributeTypeAndValue{"A", "1"},
- &ldap.AttributeTypeAndValue{"B", "2"}}}}},
- ` \ \ A\ \ = \ \ 1\ \ , \ \ B\ \ = \ \ 2\ \ `: ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{" A ", " 1 "}}},
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{" B ", " 2 "}}}}},
- ` \ \ A\ \ = \ \ 1\ \ + \ \ B\ \ = \ \ 2\ \ `: ldap.DN{[]*ldap.RelativeDN{
- &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{
- &ldap.AttributeTypeAndValue{" A ", " 1 "},
- &ldap.AttributeTypeAndValue{" B ", " 2 "}}}}},
- }
-
- for test, answer := range testcases {
- dn, err := ldap.ParseDN(test)
- if err != nil {
- t.Errorf(err.Error())
- continue
- }
- if !reflect.DeepEqual(dn, &answer) {
- t.Errorf("Parsed DN %s is not equal to the expected structure", test)
- t.Logf("Expected:")
- for _, rdn := range answer.RDNs {
- for _, attribs := range rdn.Attributes {
- t.Logf("#%v\n", attribs)
- }
- }
- t.Logf("Actual:")
- for _, rdn := range dn.RDNs {
- for _, attribs := range rdn.Attributes {
- t.Logf("#%v\n", attribs)
- }
- }
- }
- }
-}
-
-func TestErrorDNParsing(t *testing.T) {
- testcases := map[string]string{
- "*": "DN ended with incomplete type, value pair",
- "cn=Jim\\0Test": "Failed to decode escaped character: encoding/hex: invalid byte: U+0054 'T'",
- "cn=Jim\\0": "Got corrupted escaped character",
- "DC=example,=net": "DN ended with incomplete type, value pair",
- "1=#0402486": "Failed to decode BER encoding: encoding/hex: odd length hex string",
- "test,DC=example,DC=com": "incomplete type, value pair",
- "=test,DC=example,DC=com": "incomplete type, value pair",
- }
-
- for test, answer := range testcases {
- _, err := ldap.ParseDN(test)
- if err == nil {
- t.Errorf("Expected %s to fail parsing but succeeded\n", test)
- } else if err.Error() != answer {
- t.Errorf("Unexpected error on %s:\n%s\nvs.\n%s\n", test, answer, err.Error())
- }
- }
-}
-
-func TestDNEqual(t *testing.T) {
- testcases := []struct {
- A string
- B string
- Equal bool
- }{
- // Exact match
- {"", "", true},
- {"o=A", "o=A", true},
- {"o=A", "o=B", false},
-
- {"o=A,o=B", "o=A,o=B", true},
- {"o=A,o=B", "o=A,o=C", false},
-
- {"o=A+o=B", "o=A+o=B", true},
- {"o=A+o=B", "o=A+o=C", false},
-
- // Case mismatch in type is ignored
- {"o=A", "O=A", true},
- {"o=A,o=B", "o=A,O=B", true},
- {"o=A+o=B", "o=A+O=B", true},
-
- // Case mismatch in value is significant
- {"o=a", "O=A", false},
- {"o=a,o=B", "o=A,O=B", false},
- {"o=a+o=B", "o=A+O=B", false},
-
- // Multi-valued RDN order mismatch is ignored
- {"o=A+o=B", "O=B+o=A", true},
- // Number of RDN attributes is significant
- {"o=A+o=B", "O=B+o=A+O=B", false},
-
- // Missing values are significant
- {"o=A+o=B", "O=B+o=A+O=C", false}, // missing values matter
- {"o=A+o=B+o=C", "O=B+o=A", false}, // missing values matter
-
- // Whitespace tests
- // Matching
- {
- "cn=John Doe, ou=People, dc=sun.com",
- "cn=John Doe, ou=People, dc=sun.com",
- true,
- },
- // Difference in leading/trailing chars is ignored
- {
- "cn=John Doe, ou=People, dc=sun.com",
- "cn=John Doe,ou=People,dc=sun.com",
- true,
- },
- // Difference in values is significant
- {
- "cn=John Doe, ou=People, dc=sun.com",
- "cn=John Doe, ou=People, dc=sun.com",
- false,
- },
- }
-
- for i, tc := range testcases {
- a, err := ldap.ParseDN(tc.A)
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- b, err := ldap.ParseDN(tc.B)
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- if expected, actual := tc.Equal, a.Equal(b); expected != actual {
- t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
- continue
- }
- if expected, actual := tc.Equal, b.Equal(a); expected != actual {
- t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
- continue
- }
- }
-}
-
-func TestDNAncestor(t *testing.T) {
- testcases := []struct {
- A string
- B string
- Ancestor bool
- }{
- // Exact match returns false
- {"", "", false},
- {"o=A", "o=A", false},
- {"o=A,o=B", "o=A,o=B", false},
- {"o=A+o=B", "o=A+o=B", false},
-
- // Mismatch
- {"ou=C,ou=B,o=A", "ou=E,ou=D,ou=B,o=A", false},
-
- // Descendant
- {"ou=C,ou=B,o=A", "ou=E,ou=C,ou=B,o=A", true},
- }
-
- for i, tc := range testcases {
- a, err := ldap.ParseDN(tc.A)
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- b, err := ldap.ParseDN(tc.B)
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- if expected, actual := tc.Ancestor, a.AncestorOf(b); expected != actual {
- t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
- continue
- }
- }
-}
diff --git a/vendor/github.com/go-ldap/ldap/error_test.go b/vendor/github.com/go-ldap/ldap/error_test.go
deleted file mode 100644
index e456431bd..000000000
--- a/vendor/github.com/go-ldap/ldap/error_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package ldap
-
-import (
- "errors"
- "net"
- "strings"
- "testing"
- "time"
-
- "gopkg.in/asn1-ber.v1"
-)
-
-// TestNilPacket tests that nil packets don't cause a panic.
-func TestNilPacket(t *testing.T) {
- // Test for nil packet
- code, _ := getLDAPResultCode(nil)
- if code != ErrorUnexpectedResponse {
- t.Errorf("Should have an 'ErrorUnexpectedResponse' error in nil packets, got: %v", code)
- }
-
- // Test for nil result
- kids := []*ber.Packet{
- {}, // Unused
- nil, // Can't be nil
- }
- pack := &ber.Packet{Children: kids}
- code, _ = getLDAPResultCode(pack)
-
- if code != ErrorUnexpectedResponse {
- t.Errorf("Should have an 'ErrorUnexpectedResponse' error in nil packets, got: %v", code)
- }
-}
-
-// TestConnReadErr tests that an unexpected error reading from underlying
-// connection bubbles up to the goroutine which makes a request.
-func TestConnReadErr(t *testing.T) {
- conn := &signalErrConn{
- signals: make(chan error),
- }
-
- ldapConn := NewConn(conn, false)
- ldapConn.Start()
-
- // Make a dummy search request.
- searchReq := NewSearchRequest("dc=example,dc=com", ScopeWholeSubtree, DerefAlways, 0, 0, false, "(objectClass=*)", nil, nil)
-
- expectedError := errors.New("this is the error you are looking for")
-
- // Send the signal after a short amount of time.
- time.AfterFunc(10*time.Millisecond, func() { conn.signals <- expectedError })
-
- // This should block until the underlying conn gets the error signal
- // which should bubble up through the reader() goroutine, close the
- // connection, and
- _, err := ldapConn.Search(searchReq)
- if err == nil || !strings.Contains(err.Error(), expectedError.Error()) {
- t.Errorf("not the expected error: %s", err)
- }
-}
-
-// signalErrConn is a helpful type used with TestConnReadErr. It implements the
-// net.Conn interface to be used as a connection for the test. Most methods are
-// no-ops but the Read() method blocks until it receives a signal which it
-// returns as an error.
-type signalErrConn struct {
- signals chan error
-}
-
-// Read blocks until an error is sent on the internal signals channel. That
-// error is returned.
-func (c *signalErrConn) Read(b []byte) (n int, err error) {
- return 0, <-c.signals
-}
-
-func (c *signalErrConn) Write(b []byte) (n int, err error) {
- return len(b), nil
-}
-
-func (c *signalErrConn) Close() error {
- close(c.signals)
- return nil
-}
-
-func (c *signalErrConn) LocalAddr() net.Addr {
- return (*net.TCPAddr)(nil)
-}
-
-func (c *signalErrConn) RemoteAddr() net.Addr {
- return (*net.TCPAddr)(nil)
-}
-
-func (c *signalErrConn) SetDeadline(t time.Time) error {
- return nil
-}
-
-func (c *signalErrConn) SetReadDeadline(t time.Time) error {
- return nil
-}
-
-func (c *signalErrConn) SetWriteDeadline(t time.Time) error {
- return nil
-}
diff --git a/vendor/github.com/go-ldap/ldap/example_test.go b/vendor/github.com/go-ldap/ldap/example_test.go
deleted file mode 100644
index 650af0a43..000000000
--- a/vendor/github.com/go-ldap/ldap/example_test.go
+++ /dev/null
@@ -1,305 +0,0 @@
-package ldap_test
-
-import (
- "crypto/tls"
- "fmt"
- "log"
-
- "gopkg.in/ldap.v2"
-)
-
-// ExampleConn_Bind demonstrates how to bind a connection to an ldap user
-// allowing access to restricted attributes that user has access to
-func ExampleConn_Bind() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- err = l.Bind("cn=read-only-admin,dc=example,dc=com", "password")
- if err != nil {
- log.Fatal(err)
- }
-}
-
-// ExampleConn_Search demonstrates how to use the search interface
-func ExampleConn_Search() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- searchRequest := ldap.NewSearchRequest(
- "dc=example,dc=com", // The base dn to search
- ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
- "(&(objectClass=organizationalPerson))", // The filter to apply
- []string{"dn", "cn"}, // A list attributes to retrieve
- nil,
- )
-
- sr, err := l.Search(searchRequest)
- if err != nil {
- log.Fatal(err)
- }
-
- for _, entry := range sr.Entries {
- fmt.Printf("%s: %v\n", entry.DN, entry.GetAttributeValue("cn"))
- }
-}
-
-// ExampleStartTLS demonstrates how to start a TLS connection
-func ExampleConn_StartTLS() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- // Reconnect with TLS
- err = l.StartTLS(&tls.Config{InsecureSkipVerify: true})
- if err != nil {
- log.Fatal(err)
- }
-
- // Operations via l are now encrypted
-}
-
-// ExampleConn_Compare demonstrates how to compare an attribute with a value
-func ExampleConn_Compare() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- matched, err := l.Compare("cn=user,dc=example,dc=com", "uid", "someuserid")
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Println(matched)
-}
-
-func ExampleConn_PasswordModify_admin() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- err = l.Bind("cn=admin,dc=example,dc=com", "password")
- if err != nil {
- log.Fatal(err)
- }
-
- passwordModifyRequest := ldap.NewPasswordModifyRequest("cn=user,dc=example,dc=com", "", "NewPassword")
- _, err = l.PasswordModify(passwordModifyRequest)
-
- if err != nil {
- log.Fatalf("Password could not be changed: %s", err.Error())
- }
-}
-
-func ExampleConn_PasswordModify_generatedPassword() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- err = l.Bind("cn=user,dc=example,dc=com", "password")
- if err != nil {
- log.Fatal(err)
- }
-
- passwordModifyRequest := ldap.NewPasswordModifyRequest("", "OldPassword", "")
- passwordModifyResponse, err := l.PasswordModify(passwordModifyRequest)
- if err != nil {
- log.Fatalf("Password could not be changed: %s", err.Error())
- }
-
- generatedPassword := passwordModifyResponse.GeneratedPassword
- log.Printf("Generated password: %s\n", generatedPassword)
-}
-
-func ExampleConn_PasswordModify_setNewPassword() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- err = l.Bind("cn=user,dc=example,dc=com", "password")
- if err != nil {
- log.Fatal(err)
- }
-
- passwordModifyRequest := ldap.NewPasswordModifyRequest("", "OldPassword", "NewPassword")
- _, err = l.PasswordModify(passwordModifyRequest)
-
- if err != nil {
- log.Fatalf("Password could not be changed: %s", err.Error())
- }
-}
-
-func ExampleConn_Modify() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- // Add a description, and replace the mail attributes
- modify := ldap.NewModifyRequest("cn=user,dc=example,dc=com")
- modify.Add("description", []string{"An example user"})
- modify.Replace("mail", []string{"user@example.org"})
-
- err = l.Modify(modify)
- if err != nil {
- log.Fatal(err)
- }
-}
-
-// Example User Authentication shows how a typical application can verify a login attempt
-func Example_userAuthentication() {
- // The username and password we want to check
- username := "someuser"
- password := "userpassword"
-
- bindusername := "readonly"
- bindpassword := "password"
-
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- // Reconnect with TLS
- err = l.StartTLS(&tls.Config{InsecureSkipVerify: true})
- if err != nil {
- log.Fatal(err)
- }
-
- // First bind with a read only user
- err = l.Bind(bindusername, bindpassword)
- if err != nil {
- log.Fatal(err)
- }
-
- // Search for the given username
- searchRequest := ldap.NewSearchRequest(
- "dc=example,dc=com",
- ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
- fmt.Sprintf("(&(objectClass=organizationalPerson)(uid=%s))", username),
- []string{"dn"},
- nil,
- )
-
- sr, err := l.Search(searchRequest)
- if err != nil {
- log.Fatal(err)
- }
-
- if len(sr.Entries) != 1 {
- log.Fatal("User does not exist or too many entries returned")
- }
-
- userdn := sr.Entries[0].DN
-
- // Bind as the user to verify their password
- err = l.Bind(userdn, password)
- if err != nil {
- log.Fatal(err)
- }
-
- // Rebind as the read only user for any further queries
- err = l.Bind(bindusername, bindpassword)
- if err != nil {
- log.Fatal(err)
- }
-}
-
-func Example_beherappolicy() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
-
- controls := []ldap.Control{}
- controls = append(controls, ldap.NewControlBeheraPasswordPolicy())
- bindRequest := ldap.NewSimpleBindRequest("cn=admin,dc=example,dc=com", "password", controls)
-
- r, err := l.SimpleBind(bindRequest)
- ppolicyControl := ldap.FindControl(r.Controls, ldap.ControlTypeBeheraPasswordPolicy)
-
- var ppolicy *ldap.ControlBeheraPasswordPolicy
- if ppolicyControl != nil {
- ppolicy = ppolicyControl.(*ldap.ControlBeheraPasswordPolicy)
- } else {
- log.Printf("ppolicyControl response not available.\n")
- }
- if err != nil {
- errStr := "ERROR: Cannot bind: " + err.Error()
- if ppolicy != nil && ppolicy.Error >= 0 {
- errStr += ":" + ppolicy.ErrorString
- }
- log.Print(errStr)
- } else {
- logStr := "Login Ok"
- if ppolicy != nil {
- if ppolicy.Expire >= 0 {
- logStr += fmt.Sprintf(". Password expires in %d seconds\n", ppolicy.Expire)
- } else if ppolicy.Grace >= 0 {
- logStr += fmt.Sprintf(". Password expired, %d grace logins remain\n", ppolicy.Grace)
- }
- }
- log.Print(logStr)
- }
-}
-
-func Example_vchuppolicy() {
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
- if err != nil {
- log.Fatal(err)
- }
- defer l.Close()
- l.Debug = true
-
- bindRequest := ldap.NewSimpleBindRequest("cn=admin,dc=example,dc=com", "password", nil)
-
- r, err := l.SimpleBind(bindRequest)
-
- passwordMustChangeControl := ldap.FindControl(r.Controls, ldap.ControlTypeVChuPasswordMustChange)
- var passwordMustChange *ldap.ControlVChuPasswordMustChange
- if passwordMustChangeControl != nil {
- passwordMustChange = passwordMustChangeControl.(*ldap.ControlVChuPasswordMustChange)
- }
-
- if passwordMustChange != nil && passwordMustChange.MustChange {
- log.Printf("Password Must be changed.\n")
- }
-
- passwordWarningControl := ldap.FindControl(r.Controls, ldap.ControlTypeVChuPasswordWarning)
-
- var passwordWarning *ldap.ControlVChuPasswordWarning
- if passwordWarningControl != nil {
- passwordWarning = passwordWarningControl.(*ldap.ControlVChuPasswordWarning)
- } else {
- log.Printf("ppolicyControl response not available.\n")
- }
- if err != nil {
- log.Print("ERROR: Cannot bind: " + err.Error())
- } else {
- logStr := "Login Ok"
- if passwordWarning != nil {
- if passwordWarning.Expire >= 0 {
- logStr += fmt.Sprintf(". Password expires in %d seconds\n", passwordWarning.Expire)
- }
- }
- log.Print(logStr)
- }
-}
diff --git a/vendor/github.com/go-ldap/ldap/filter_test.go b/vendor/github.com/go-ldap/ldap/filter_test.go
deleted file mode 100644
index 2b019ac5d..000000000
--- a/vendor/github.com/go-ldap/ldap/filter_test.go
+++ /dev/null
@@ -1,254 +0,0 @@
-package ldap_test
-
-import (
- "strings"
- "testing"
-
- "gopkg.in/asn1-ber.v1"
- "gopkg.in/ldap.v2"
-)
-
-type compileTest struct {
- filterStr string
-
- expectedFilter string
- expectedType int
- expectedErr string
-}
-
-var testFilters = []compileTest{
- compileTest{
- filterStr: "(&(sn=Miller)(givenName=Bob))",
- expectedFilter: "(&(sn=Miller)(givenName=Bob))",
- expectedType: ldap.FilterAnd,
- },
- compileTest{
- filterStr: "(|(sn=Miller)(givenName=Bob))",
- expectedFilter: "(|(sn=Miller)(givenName=Bob))",
- expectedType: ldap.FilterOr,
- },
- compileTest{
- filterStr: "(!(sn=Miller))",
- expectedFilter: "(!(sn=Miller))",
- expectedType: ldap.FilterNot,
- },
- compileTest{
- filterStr: "(sn=Miller)",
- expectedFilter: "(sn=Miller)",
- expectedType: ldap.FilterEqualityMatch,
- },
- compileTest{
- filterStr: "(sn=Mill*)",
- expectedFilter: "(sn=Mill*)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=*Mill)",
- expectedFilter: "(sn=*Mill)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=*Mill*)",
- expectedFilter: "(sn=*Mill*)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=*i*le*)",
- expectedFilter: "(sn=*i*le*)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=Mi*l*r)",
- expectedFilter: "(sn=Mi*l*r)",
- expectedType: ldap.FilterSubstrings,
- },
- // substring filters escape properly
- compileTest{
- filterStr: `(sn=Mi*함*r)`,
- expectedFilter: `(sn=Mi*\ed\95\a8*r)`,
- expectedType: ldap.FilterSubstrings,
- },
- // already escaped substring filters don't get double-escaped
- compileTest{
- filterStr: `(sn=Mi*\ed\95\a8*r)`,
- expectedFilter: `(sn=Mi*\ed\95\a8*r)`,
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=Mi*le*)",
- expectedFilter: "(sn=Mi*le*)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn=*i*ler)",
- expectedFilter: "(sn=*i*ler)",
- expectedType: ldap.FilterSubstrings,
- },
- compileTest{
- filterStr: "(sn>=Miller)",
- expectedFilter: "(sn>=Miller)",
- expectedType: ldap.FilterGreaterOrEqual,
- },
- compileTest{
- filterStr: "(sn<=Miller)",
- expectedFilter: "(sn<=Miller)",
- expectedType: ldap.FilterLessOrEqual,
- },
- compileTest{
- filterStr: "(sn=*)",
- expectedFilter: "(sn=*)",
- expectedType: ldap.FilterPresent,
- },
- compileTest{
- filterStr: "(sn~=Miller)",
- expectedFilter: "(sn~=Miller)",
- expectedType: ldap.FilterApproxMatch,
- },
- compileTest{
- filterStr: `(objectGUID='\fc\fe\a3\ab\f9\90N\aaGm\d5I~\d12)`,
- expectedFilter: `(objectGUID='\fc\fe\a3\ab\f9\90N\aaGm\d5I~\d12)`,
- expectedType: ldap.FilterEqualityMatch,
- },
- compileTest{
- filterStr: `(objectGUID=абвгдеёжзийклмнопрÑтуфхцчшщъыьÑÑŽÑ)`,
- expectedFilter: `(objectGUID=\d0\b0\d0\b1\d0\b2\d0\b3\d0\b4\d0\b5\d1\91\d0\b6\d0\b7\d0\b8\d0\b9\d0\ba\d0\bb\d0\bc\d0\bd\d0\be\d0\bf\d1\80\d1\81\d1\82\d1\83\d1\84\d1\85\d1\86\d1\87\d1\88\d1\89\d1\8a\d1\8b\d1\8c\d1\8d\d1\8e\d1\8f)`,
- expectedType: ldap.FilterEqualityMatch,
- },
- compileTest{
- filterStr: `(objectGUID=함수목ë¡)`,
- expectedFilter: `(objectGUID=\ed\95\a8\ec\88\98\eb\aa\a9\eb\a1\9d)`,
- expectedType: ldap.FilterEqualityMatch,
- },
- compileTest{
- filterStr: `(objectGUID=`,
- expectedFilter: ``,
- expectedType: 0,
- expectedErr: "unexpected end of filter",
- },
- compileTest{
- filterStr: `(objectGUID=함수목ë¡`,
- expectedFilter: ``,
- expectedType: 0,
- expectedErr: "unexpected end of filter",
- },
- compileTest{
- filterStr: `((cn=)`,
- expectedFilter: ``,
- expectedType: 0,
- expectedErr: "unexpected end of filter",
- },
- compileTest{
- filterStr: `(&(objectclass=inetorgperson)(cn=中文))`,
- expectedFilter: `(&(objectclass=inetorgperson)(cn=\e4\b8\ad\e6\96\87))`,
- expectedType: 0,
- },
- // attr extension
- compileTest{
- filterStr: `(memberOf:=foo)`,
- expectedFilter: `(memberOf:=foo)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- // attr+named matching rule extension
- compileTest{
- filterStr: `(memberOf:test:=foo)`,
- expectedFilter: `(memberOf:test:=foo)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- // attr+oid matching rule extension
- compileTest{
- filterStr: `(cn:1.2.3.4.5:=Fred Flintstone)`,
- expectedFilter: `(cn:1.2.3.4.5:=Fred Flintstone)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- // attr+dn+oid matching rule extension
- compileTest{
- filterStr: `(sn:dn:2.4.6.8.10:=Barney Rubble)`,
- expectedFilter: `(sn:dn:2.4.6.8.10:=Barney Rubble)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- // attr+dn extension
- compileTest{
- filterStr: `(o:dn:=Ace Industry)`,
- expectedFilter: `(o:dn:=Ace Industry)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- // dn extension
- compileTest{
- filterStr: `(:dn:2.4.6.8.10:=Dino)`,
- expectedFilter: `(:dn:2.4.6.8.10:=Dino)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
- compileTest{
- filterStr: `(memberOf:1.2.840.113556.1.4.1941:=CN=User1,OU=blah,DC=mydomain,DC=net)`,
- expectedFilter: `(memberOf:1.2.840.113556.1.4.1941:=CN=User1,OU=blah,DC=mydomain,DC=net)`,
- expectedType: ldap.FilterExtensibleMatch,
- },
-
- // compileTest{ filterStr: "()", filterType: FilterExtensibleMatch },
-}
-
-var testInvalidFilters = []string{
- `(objectGUID=\zz)`,
- `(objectGUID=\a)`,
-}
-
-func TestFilter(t *testing.T) {
- // Test Compiler and Decompiler
- for _, i := range testFilters {
- filter, err := ldap.CompileFilter(i.filterStr)
- if err != nil {
- if i.expectedErr == "" || !strings.Contains(err.Error(), i.expectedErr) {
- t.Errorf("Problem compiling '%s' - '%v' (expected error to contain '%v')", i.filterStr, err, i.expectedErr)
- }
- } else if filter.Tag != ber.Tag(i.expectedType) {
- t.Errorf("%q Expected %q got %q", i.filterStr, ldap.FilterMap[uint64(i.expectedType)], ldap.FilterMap[uint64(filter.Tag)])
- } else {
- o, err := ldap.DecompileFilter(filter)
- if err != nil {
- t.Errorf("Problem compiling %s - %s", i.filterStr, err.Error())
- } else if i.expectedFilter != o {
- t.Errorf("%q expected, got %q", i.expectedFilter, o)
- }
- }
- }
-}
-
-func TestInvalidFilter(t *testing.T) {
- for _, filterStr := range testInvalidFilters {
- if _, err := ldap.CompileFilter(filterStr); err == nil {
- t.Errorf("Problem compiling %s - expected err", filterStr)
- }
- }
-}
-
-func BenchmarkFilterCompile(b *testing.B) {
- b.StopTimer()
- filters := make([]string, len(testFilters))
-
- // Test Compiler and Decompiler
- for idx, i := range testFilters {
- filters[idx] = i.filterStr
- }
-
- maxIdx := len(filters)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- ldap.CompileFilter(filters[i%maxIdx])
- }
-}
-
-func BenchmarkFilterDecompile(b *testing.B) {
- b.StopTimer()
- filters := make([]*ber.Packet, len(testFilters))
-
- // Test Compiler and Decompiler
- for idx, i := range testFilters {
- filters[idx], _ = ldap.CompileFilter(i.filterStr)
- }
-
- maxIdx := len(filters)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- ldap.DecompileFilter(filters[i%maxIdx])
- }
-}
diff --git a/vendor/github.com/go-ldap/ldap/ldap_test.go b/vendor/github.com/go-ldap/ldap/ldap_test.go
deleted file mode 100644
index 9f4305180..000000000
--- a/vendor/github.com/go-ldap/ldap/ldap_test.go
+++ /dev/null
@@ -1,275 +0,0 @@
-package ldap_test
-
-import (
- "crypto/tls"
- "fmt"
- "testing"
-
- "gopkg.in/ldap.v2"
-)
-
-var ldapServer = "ldap.itd.umich.edu"
-var ldapPort = uint16(389)
-var ldapTLSPort = uint16(636)
-var baseDN = "dc=umich,dc=edu"
-var filter = []string{
- "(cn=cis-fac)",
- "(&(owner=*)(cn=cis-fac))",
- "(&(objectclass=rfc822mailgroup)(cn=*Computer*))",
- "(&(objectclass=rfc822mailgroup)(cn=*Mathematics*))"}
-var attributes = []string{
- "cn",
- "description"}
-
-func TestDial(t *testing.T) {
- fmt.Printf("TestDial: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
- fmt.Printf("TestDial: finished...\n")
-}
-
-func TestDialTLS(t *testing.T) {
- fmt.Printf("TestDialTLS: starting...\n")
- l, err := ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapTLSPort), &tls.Config{InsecureSkipVerify: true})
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
- fmt.Printf("TestDialTLS: finished...\n")
-}
-
-func TestStartTLS(t *testing.T) {
- fmt.Printf("TestStartTLS: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- err = l.StartTLS(&tls.Config{InsecureSkipVerify: true})
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- fmt.Printf("TestStartTLS: finished...\n")
-}
-
-func TestSearch(t *testing.T) {
- fmt.Printf("TestSearch: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
-
- searchRequest := ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[0],
- attributes,
- nil)
-
- sr, err := l.Search(searchRequest)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestSearch: %s -> num of entries = %d\n", searchRequest.Filter, len(sr.Entries))
-}
-
-func TestSearchStartTLS(t *testing.T) {
- fmt.Printf("TestSearchStartTLS: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
-
- searchRequest := ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[0],
- attributes,
- nil)
-
- sr, err := l.Search(searchRequest)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestSearchStartTLS: %s -> num of entries = %d\n", searchRequest.Filter, len(sr.Entries))
-
- fmt.Printf("TestSearchStartTLS: upgrading with startTLS\n")
- err = l.StartTLS(&tls.Config{InsecureSkipVerify: true})
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- sr, err = l.Search(searchRequest)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestSearchStartTLS: %s -> num of entries = %d\n", searchRequest.Filter, len(sr.Entries))
-}
-
-func TestSearchWithPaging(t *testing.T) {
- fmt.Printf("TestSearchWithPaging: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
-
- err = l.Bind("", "")
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- searchRequest := ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[2],
- attributes,
- nil)
- sr, err := l.SearchWithPaging(searchRequest, 5)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestSearchWithPaging: %s -> num of entries = %d\n", searchRequest.Filter, len(sr.Entries))
-
- searchRequest = ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[2],
- attributes,
- []ldap.Control{ldap.NewControlPaging(5)})
- sr, err = l.SearchWithPaging(searchRequest, 5)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestSearchWithPaging: %s -> num of entries = %d\n", searchRequest.Filter, len(sr.Entries))
-
- searchRequest = ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[2],
- attributes,
- []ldap.Control{ldap.NewControlPaging(500)})
- sr, err = l.SearchWithPaging(searchRequest, 5)
- if err == nil {
- t.Errorf("expected an error when paging size in control in search request doesn't match size given in call, got none")
- return
- }
-}
-
-func searchGoroutine(t *testing.T, l *ldap.Conn, results chan *ldap.SearchResult, i int) {
- searchRequest := ldap.NewSearchRequest(
- baseDN,
- ldap.ScopeWholeSubtree, ldap.DerefAlways, 0, 0, false,
- filter[i],
- attributes,
- nil)
- sr, err := l.Search(searchRequest)
- if err != nil {
- t.Errorf(err.Error())
- results <- nil
- return
- }
- results <- sr
-}
-
-func testMultiGoroutineSearch(t *testing.T, TLS bool, startTLS bool) {
- fmt.Printf("TestMultiGoroutineSearch: starting...\n")
- var l *ldap.Conn
- var err error
- if TLS {
- l, err = ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapTLSPort), &tls.Config{InsecureSkipVerify: true})
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- defer l.Close()
- } else {
- l, err = ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Errorf(err.Error())
- return
- }
- if startTLS {
- fmt.Printf("TestMultiGoroutineSearch: using StartTLS...\n")
- err := l.StartTLS(&tls.Config{InsecureSkipVerify: true})
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- }
- }
-
- results := make([]chan *ldap.SearchResult, len(filter))
- for i := range filter {
- results[i] = make(chan *ldap.SearchResult)
- go searchGoroutine(t, l, results[i], i)
- }
- for i := range filter {
- sr := <-results[i]
- if sr == nil {
- t.Errorf("Did not receive results from goroutine for %q", filter[i])
- } else {
- fmt.Printf("TestMultiGoroutineSearch(%d): %s -> num of entries = %d\n", i, filter[i], len(sr.Entries))
- }
- }
-}
-
-func TestMultiGoroutineSearch(t *testing.T) {
- testMultiGoroutineSearch(t, false, false)
- testMultiGoroutineSearch(t, true, true)
- testMultiGoroutineSearch(t, false, true)
-}
-
-func TestEscapeFilter(t *testing.T) {
- if got, want := ldap.EscapeFilter("a\x00b(c)d*e\\f"), `a\00b\28c\29d\2ae\5cf`; got != want {
- t.Errorf("Got %s, expected %s", want, got)
- }
- if got, want := ldap.EscapeFilter("LuÄić"), `Lu\c4\8di\c4\87`; got != want {
- t.Errorf("Got %s, expected %s", want, got)
- }
-}
-
-func TestCompare(t *testing.T) {
- fmt.Printf("TestCompare: starting...\n")
- l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ldapServer, ldapPort))
- if err != nil {
- t.Fatal(err.Error())
- }
- defer l.Close()
-
- dn := "cn=math mich,ou=User Groups,ou=Groups,dc=umich,dc=edu"
- attribute := "cn"
- value := "math mich"
-
- sr, err := l.Compare(dn, attribute, value)
- if err != nil {
- t.Errorf(err.Error())
- return
- }
-
- fmt.Printf("TestCompare: -> %v\n", sr)
-}
diff --git a/vendor/github.com/go-ldap/ldap/search_test.go b/vendor/github.com/go-ldap/ldap/search_test.go
deleted file mode 100644
index 5f77b22e9..000000000
--- a/vendor/github.com/go-ldap/ldap/search_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package ldap
-
-import (
- "reflect"
- "testing"
-)
-
-// TestNewEntry tests that repeated calls to NewEntry return the same value with the same input
-func TestNewEntry(t *testing.T) {
- dn := "testDN"
- attributes := map[string][]string{
- "alpha": {"value"},
- "beta": {"value"},
- "gamma": {"value"},
- "delta": {"value"},
- "epsilon": {"value"},
- }
- executedEntry := NewEntry(dn, attributes)
-
- iteration := 0
- for {
- if iteration == 100 {
- break
- }
- testEntry := NewEntry(dn, attributes)
- if !reflect.DeepEqual(executedEntry, testEntry) {
- t.Fatalf("subsequent calls to NewEntry did not yield the same result:\n\texpected:\n\t%s\n\tgot:\n\t%s\n", executedEntry, testEntry)
- }
- iteration = iteration + 1
- }
-}
diff --git a/vendor/github.com/go-redis/redis/.travis.yml b/vendor/github.com/go-redis/redis/.travis.yml
index c95b3e6c6..39ffc2bec 100644
--- a/vendor/github.com/go-redis/redis/.travis.yml
+++ b/vendor/github.com/go-redis/redis/.travis.yml
@@ -8,6 +8,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
+ - 1.10.x
- tip
matrix:
diff --git a/vendor/github.com/go-redis/redis/Makefile b/vendor/github.com/go-redis/redis/Makefile
index 50fdc55a1..1fbdac91c 100644
--- a/vendor/github.com/go-redis/redis/Makefile
+++ b/vendor/github.com/go-redis/redis/Makefile
@@ -1,6 +1,7 @@
all: testdeps
go test ./...
go test ./... -short -race
+ env GOOS=linux GOARCH=386 go test ./...
go vet
testdeps: testdata/redis/src/redis-server
@@ -15,5 +16,5 @@ testdata/redis:
wget -qO- https://github.com/antirez/redis/archive/unstable.tar.gz | tar xvz --strip-components=1 -C $@
testdata/redis/src/redis-server: testdata/redis
- sed -i 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile
+ sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile
cd $< && make all
diff --git a/vendor/github.com/go-redis/redis/bench_test.go b/vendor/github.com/go-redis/redis/bench_test.go
deleted file mode 100644
index f6b75c72a..000000000
--- a/vendor/github.com/go-redis/redis/bench_test.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package redis_test
-
-import (
- "bytes"
- "testing"
- "time"
-
- "github.com/go-redis/redis"
-)
-
-func benchmarkRedisClient(poolSize int) *redis.Client {
- client := redis.NewClient(&redis.Options{
- Addr: ":6379",
- DialTimeout: time.Second,
- ReadTimeout: time.Second,
- WriteTimeout: time.Second,
- PoolSize: poolSize,
- })
- if err := client.FlushDB().Err(); err != nil {
- panic(err)
- }
- return client
-}
-
-func BenchmarkRedisPing(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Ping().Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkRedisSetString(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- value := string(bytes.Repeat([]byte{'1'}, 10000))
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Set("key", value, 0).Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkRedisGetNil(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Get("key").Err(); err != redis.Nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func benchmarkSetRedis(b *testing.B, poolSize, payloadSize int) {
- client := benchmarkRedisClient(poolSize)
- defer client.Close()
-
- value := string(bytes.Repeat([]byte{'1'}, payloadSize))
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Set("key", value, 0).Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkSetRedis10Conns64Bytes(b *testing.B) {
- benchmarkSetRedis(b, 10, 64)
-}
-
-func BenchmarkSetRedis100Conns64Bytes(b *testing.B) {
- benchmarkSetRedis(b, 100, 64)
-}
-
-func BenchmarkSetRedis10Conns1KB(b *testing.B) {
- benchmarkSetRedis(b, 10, 1024)
-}
-
-func BenchmarkSetRedis100Conns1KB(b *testing.B) {
- benchmarkSetRedis(b, 100, 1024)
-}
-
-func BenchmarkSetRedis10Conns10KB(b *testing.B) {
- benchmarkSetRedis(b, 10, 10*1024)
-}
-
-func BenchmarkSetRedis100Conns10KB(b *testing.B) {
- benchmarkSetRedis(b, 100, 10*1024)
-}
-
-func BenchmarkSetRedis10Conns1MB(b *testing.B) {
- benchmarkSetRedis(b, 10, 1024*1024)
-}
-
-func BenchmarkSetRedis100Conns1MB(b *testing.B) {
- benchmarkSetRedis(b, 100, 1024*1024)
-}
-
-func BenchmarkRedisSetGetBytes(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- value := bytes.Repeat([]byte{'1'}, 10000)
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Set("key", value, 0).Err(); err != nil {
- b.Fatal(err)
- }
-
- got, err := client.Get("key").Bytes()
- if err != nil {
- b.Fatal(err)
- }
- if !bytes.Equal(got, value) {
- b.Fatalf("got != value")
- }
- }
- })
-}
-
-func BenchmarkRedisMGet(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- if err := client.MSet("key1", "hello1", "key2", "hello2").Err(); err != nil {
- b.Fatal(err)
- }
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.MGet("key1", "key2").Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkSetExpire(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Set("key", "hello", 0).Err(); err != nil {
- b.Fatal(err)
- }
- if err := client.Expire("key", time.Second).Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkPipeline(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set("key", "hello", 0)
- pipe.Expire("key", time.Second)
- return nil
- })
- if err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkZAdd(b *testing.B) {
- client := benchmarkRedisClient(10)
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.ZAdd("key", redis.Z{float64(1), "hello"}).Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
diff --git a/vendor/github.com/go-redis/redis/cluster.go b/vendor/github.com/go-redis/redis/cluster.go
index a2c18b387..4a2951157 100644
--- a/vendor/github.com/go-redis/redis/cluster.go
+++ b/vendor/github.com/go-redis/redis/cluster.go
@@ -1,7 +1,10 @@
package redis
import (
+ "context"
+ "errors"
"fmt"
+ "math"
"math/rand"
"net"
"sync"
@@ -12,10 +15,10 @@ import (
"github.com/go-redis/redis/internal/hashtag"
"github.com/go-redis/redis/internal/pool"
"github.com/go-redis/redis/internal/proto"
+ "github.com/go-redis/redis/internal/singleflight"
)
var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes")
-var errNilClusterState = fmt.Errorf("redis: cannot load cluster slots")
// ClusterOptions are used to configure a cluster client and should be
// passed to NewClusterClient.
@@ -25,13 +28,15 @@ type ClusterOptions struct {
// The maximum number of retries before giving up. Command is retried
// on network errors and MOVED/ASK redirects.
- // Default is 16.
+ // Default is 8.
MaxRedirects int
// Enables read-only commands on slave nodes.
ReadOnly bool
// Allows routing read-only commands to the closest master or slave node.
RouteByLatency bool
+ // Allows routing read-only commands to the random master or slave node.
+ RouteRandomly bool
// Following options are copied from Options struct.
@@ -57,7 +62,7 @@ func (opt *ClusterOptions) init() {
if opt.MaxRedirects == -1 {
opt.MaxRedirects = 0
} else if opt.MaxRedirects == 0 {
- opt.MaxRedirects = 16
+ opt.MaxRedirects = 8
}
if opt.RouteByLatency {
@@ -118,11 +123,11 @@ func (opt *ClusterOptions) clientOptions() *Options {
//------------------------------------------------------------------------------
type clusterNode struct {
- Client *Client
- Latency time.Duration
+ Client *Client
- loading time.Time
- generation uint32
+ latency uint32 // atomic
+ generation uint32 // atomic
+ loading uint32 // atomic
}
func newClusterNode(clOpt *ClusterOptions, addr string) *clusterNode {
@@ -132,36 +137,69 @@ func newClusterNode(clOpt *ClusterOptions, addr string) *clusterNode {
Client: NewClient(opt),
}
+ node.latency = math.MaxUint32
if clOpt.RouteByLatency {
- node.updateLatency()
+ go node.updateLatency()
}
return &node
}
+func (n *clusterNode) Close() error {
+ return n.Client.Close()
+}
+
+func (n *clusterNode) Test() error {
+ return n.Client.ClusterInfo().Err()
+}
+
func (n *clusterNode) updateLatency() {
const probes = 10
+
+ var latency uint32
for i := 0; i < probes; i++ {
start := time.Now()
n.Client.Ping()
- n.Latency += time.Since(start)
+ probe := uint32(time.Since(start) / time.Microsecond)
+ latency = (latency + probe) / 2
}
- n.Latency = n.Latency / probes
+ atomic.StoreUint32(&n.latency, latency)
+}
+
+func (n *clusterNode) Latency() time.Duration {
+ latency := atomic.LoadUint32(&n.latency)
+ return time.Duration(latency) * time.Microsecond
+}
+
+func (n *clusterNode) MarkAsLoading() {
+ atomic.StoreUint32(&n.loading, uint32(time.Now().Unix()))
}
func (n *clusterNode) Loading() bool {
- return !n.loading.IsZero() && time.Since(n.loading) < time.Minute
+ const minute = int64(time.Minute / time.Second)
+
+ loading := atomic.LoadUint32(&n.loading)
+ if loading == 0 {
+ return false
+ }
+ if time.Now().Unix()-int64(loading) < minute {
+ return true
+ }
+ atomic.StoreUint32(&n.loading, 0)
+ return false
}
func (n *clusterNode) Generation() uint32 {
- return n.generation
+ return atomic.LoadUint32(&n.generation)
}
func (n *clusterNode) SetGeneration(gen uint32) {
- if gen < n.generation {
- panic("gen < n.generation")
+ for {
+ v := atomic.LoadUint32(&n.generation)
+ if gen < v || atomic.CompareAndSwapUint32(&n.generation, v, gen) {
+ break
+ }
}
- n.generation = gen
}
//------------------------------------------------------------------------------
@@ -169,18 +207,23 @@ func (n *clusterNode) SetGeneration(gen uint32) {
type clusterNodes struct {
opt *ClusterOptions
- mu sync.RWMutex
- addrs []string
- nodes map[string]*clusterNode
- closed bool
+ mu sync.RWMutex
+ allAddrs []string
+ allNodes map[string]*clusterNode
+ clusterAddrs []string
+ closed bool
+
+ nodeCreateGroup singleflight.Group
generation uint32
}
func newClusterNodes(opt *ClusterOptions) *clusterNodes {
return &clusterNodes{
- opt: opt,
- nodes: make(map[string]*clusterNode),
+ opt: opt,
+
+ allAddrs: opt.Addrs,
+ allNodes: make(map[string]*clusterNode),
}
}
@@ -194,21 +237,29 @@ func (c *clusterNodes) Close() error {
c.closed = true
var firstErr error
- for _, node := range c.nodes {
+ for _, node := range c.allNodes {
if err := node.Client.Close(); err != nil && firstErr == nil {
firstErr = err
}
}
- c.addrs = nil
- c.nodes = nil
+
+ c.allNodes = nil
+ c.clusterAddrs = nil
return firstErr
}
func (c *clusterNodes) Addrs() ([]string, error) {
+ var addrs []string
c.mu.RLock()
closed := c.closed
- addrs := c.addrs
+ if !closed {
+ if len(c.clusterAddrs) > 0 {
+ addrs = c.clusterAddrs
+ } else {
+ addrs = c.allAddrs
+ }
+ }
c.mu.RUnlock()
if closed {
@@ -229,55 +280,45 @@ func (c *clusterNodes) NextGeneration() uint32 {
func (c *clusterNodes) GC(generation uint32) {
var collected []*clusterNode
c.mu.Lock()
- for i := 0; i < len(c.addrs); {
- addr := c.addrs[i]
- node := c.nodes[addr]
+ for addr, node := range c.allNodes {
if node.Generation() >= generation {
- i++
continue
}
- c.addrs = append(c.addrs[:i], c.addrs[i+1:]...)
- delete(c.nodes, addr)
+ c.clusterAddrs = remove(c.clusterAddrs, addr)
+ delete(c.allNodes, addr)
collected = append(collected, node)
}
c.mu.Unlock()
- time.AfterFunc(time.Minute, func() {
- for _, node := range collected {
- _ = node.Client.Close()
- }
- })
-}
-
-func (c *clusterNodes) All() ([]*clusterNode, error) {
- c.mu.RLock()
- defer c.mu.RUnlock()
-
- if c.closed {
- return nil, pool.ErrClosed
+ for _, node := range collected {
+ _ = node.Client.Close()
}
-
- nodes := make([]*clusterNode, 0, len(c.nodes))
- for _, node := range c.nodes {
- nodes = append(nodes, node)
- }
- return nodes, nil
}
func (c *clusterNodes) GetOrCreate(addr string) (*clusterNode, error) {
var node *clusterNode
- var ok bool
+ var err error
c.mu.RLock()
- if !c.closed {
- node, ok = c.nodes[addr]
+ if c.closed {
+ err = pool.ErrClosed
+ } else {
+ node = c.allNodes[addr]
}
c.mu.RUnlock()
- if ok {
+ if err != nil {
+ return nil, err
+ }
+ if node != nil {
return node, nil
}
+ v, err := c.nodeCreateGroup.Do(addr, func() (interface{}, error) {
+ node := newClusterNode(c.opt, addr)
+ return node, node.Test()
+ })
+
c.mu.Lock()
defer c.mu.Unlock()
@@ -285,15 +326,35 @@ func (c *clusterNodes) GetOrCreate(addr string) (*clusterNode, error) {
return nil, pool.ErrClosed
}
- node, ok = c.nodes[addr]
+ node, ok := c.allNodes[addr]
if ok {
- return node, nil
+ _ = v.(*clusterNode).Close()
+ return node, err
}
+ node = v.(*clusterNode)
- c.addrs = append(c.addrs, addr)
- node = newClusterNode(c.opt, addr)
- c.nodes[addr] = node
- return node, nil
+ c.allAddrs = appendIfNotExists(c.allAddrs, addr)
+ if err == nil {
+ c.clusterAddrs = append(c.clusterAddrs, addr)
+ }
+ c.allNodes[addr] = node
+
+ return node, err
+}
+
+func (c *clusterNodes) All() ([]*clusterNode, error) {
+ c.mu.RLock()
+ defer c.mu.RUnlock()
+
+ if c.closed {
+ return nil, pool.ErrClosed
+ }
+
+ cp := make([]*clusterNode, 0, len(c.allNodes))
+ for _, node := range c.allNodes {
+ cp = append(cp, node)
+ }
+ return cp, nil
}
func (c *clusterNodes) Random() (*clusterNode, error) {
@@ -302,20 +363,8 @@ func (c *clusterNodes) Random() (*clusterNode, error) {
return nil, err
}
- var nodeErr error
- for i := 0; i <= c.opt.MaxRedirects; i++ {
- n := rand.Intn(len(addrs))
- node, err := c.GetOrCreate(addrs[n])
- if err != nil {
- return nil, err
- }
-
- nodeErr = node.Client.ClusterInfo().Err()
- if nodeErr == nil {
- return node, nil
- }
- }
- return nil, nodeErr
+ n := rand.Intn(len(addrs))
+ return c.GetOrCreate(addrs[n])
}
//------------------------------------------------------------------------------
@@ -367,6 +416,10 @@ func newClusterState(nodes *clusterNodes, slots []ClusterSlot, origin string) (*
}
}
+ time.AfterFunc(time.Minute, func() {
+ nodes.GC(c.generation)
+ })
+
return &c, nil
}
@@ -416,13 +469,19 @@ func (c *clusterState) slotClosestNode(slot int) (*clusterNode, error) {
if n.Loading() {
continue
}
- if node == nil || node.Latency-n.Latency > threshold {
+ if node == nil || node.Latency()-n.Latency() > threshold {
node = n
}
}
return node, nil
}
+func (c *clusterState) slotRandomNode(slot int) *clusterNode {
+ nodes := c.slotNodes(slot)
+ n := rand.Intn(len(nodes))
+ return nodes[n]
+}
+
func (c *clusterState) slotNodes(slot int) []*clusterNode {
if slot >= 0 && slot < len(c.slots) {
return c.slots[slot]
@@ -432,25 +491,83 @@ func (c *clusterState) slotNodes(slot int) []*clusterNode {
//------------------------------------------------------------------------------
+type clusterStateHolder struct {
+ load func() (*clusterState, error)
+
+ state atomic.Value
+
+ lastErrMu sync.RWMutex
+ lastErr error
+
+ reloading uint32 // atomic
+}
+
+func newClusterStateHolder(fn func() (*clusterState, error)) *clusterStateHolder {
+ return &clusterStateHolder{
+ load: fn,
+ }
+}
+
+func (c *clusterStateHolder) Load() (*clusterState, error) {
+ state, err := c.load()
+ if err != nil {
+ c.lastErrMu.Lock()
+ c.lastErr = err
+ c.lastErrMu.Unlock()
+ return nil, err
+ }
+ c.state.Store(state)
+ return state, nil
+}
+
+func (c *clusterStateHolder) LazyReload() {
+ if !atomic.CompareAndSwapUint32(&c.reloading, 0, 1) {
+ return
+ }
+ go func() {
+ defer atomic.StoreUint32(&c.reloading, 0)
+
+ _, err := c.Load()
+ if err == nil {
+ time.Sleep(time.Second)
+ }
+ }()
+}
+
+func (c *clusterStateHolder) Get() (*clusterState, error) {
+ v := c.state.Load()
+ if v != nil {
+ return v.(*clusterState), nil
+ }
+
+ c.lastErrMu.RLock()
+ err := c.lastErr
+ c.lastErrMu.RUnlock()
+ if err != nil {
+ return nil, err
+ }
+
+ return nil, errors.New("redis: cluster has no state")
+}
+
+//------------------------------------------------------------------------------
+
// ClusterClient is a Redis Cluster client representing a pool of zero
// or more underlying connections. It's safe for concurrent use by
// multiple goroutines.
type ClusterClient struct {
cmdable
- opt *ClusterOptions
- nodes *clusterNodes
- _state atomic.Value
+ ctx context.Context
- cmdsInfoOnce internal.Once
- cmdsInfo map[string]*CommandInfo
+ opt *ClusterOptions
+ nodes *clusterNodes
+ state *clusterStateHolder
+ cmdsInfoCache *cmdsInfoCache
process func(Cmder) error
processPipeline func([]Cmder) error
processTxPipeline func([]Cmder) error
-
- // Reports whether slots reloading is in progress.
- reloading uint32
}
// NewClusterClient returns a Redis Cluster client as described in
@@ -459,9 +576,11 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
opt.init()
c := &ClusterClient{
- opt: opt,
- nodes: newClusterNodes(opt),
+ opt: opt,
+ nodes: newClusterNodes(opt),
+ cmdsInfoCache: newCmdsInfoCache(),
}
+ c.state = newClusterStateHolder(c.loadState)
c.process = c.defaultProcess
c.processPipeline = c.defaultProcessPipeline
@@ -469,25 +588,33 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
c.cmdable.setProcessor(c.Process)
- // Add initial nodes.
- for _, addr := range opt.Addrs {
- _, _ = c.nodes.GetOrCreate(addr)
+ _, _ = c.state.Load()
+ if opt.IdleCheckFrequency > 0 {
+ go c.reaper(opt.IdleCheckFrequency)
}
- // Preload cluster slots.
- for i := 0; i < 10; i++ {
- state, err := c.reloadState()
- if err == nil {
- c._state.Store(state)
- break
- }
+ return c
+}
+
+func (c *ClusterClient) Context() context.Context {
+ if c.ctx != nil {
+ return c.ctx
}
+ return context.Background()
+}
- if opt.IdleCheckFrequency > 0 {
- go c.reaper(opt.IdleCheckFrequency)
+func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient {
+ if ctx == nil {
+ panic("nil context")
}
+ c2 := c.copy()
+ c2.ctx = ctx
+ return c2
+}
- return c
+func (c *ClusterClient) copy() *ClusterClient {
+ cp := *c
+ return &cp
}
// Options returns read-only Options that were used to create the client.
@@ -499,40 +626,18 @@ func (c *ClusterClient) retryBackoff(attempt int) time.Duration {
return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
}
-func (c *ClusterClient) state() (*clusterState, error) {
- v := c._state.Load()
- if v != nil {
- return v.(*clusterState), nil
- }
-
- _, err := c.nodes.Addrs()
- if err != nil {
- return nil, err
- }
-
- c.lazyReloadState()
- return nil, errNilClusterState
-}
-
func (c *ClusterClient) cmdInfo(name string) *CommandInfo {
- err := c.cmdsInfoOnce.Do(func() error {
+ cmdsInfo, err := c.cmdsInfoCache.Do(func() (map[string]*CommandInfo, error) {
node, err := c.nodes.Random()
if err != nil {
- return err
- }
-
- cmdsInfo, err := node.Client.Command().Result()
- if err != nil {
- return err
+ return nil, err
}
-
- c.cmdsInfo = cmdsInfo
- return nil
+ return node.Client.Command().Result()
})
if err != nil {
return nil
}
- info := c.cmdsInfo[name]
+ info := cmdsInfo[name]
if info == nil {
internal.Logf("info for cmd=%s not found", name)
}
@@ -552,7 +657,12 @@ func (c *ClusterClient) cmdSlot(cmd Cmder) int {
return cmdSlot(cmd, cmdFirstKeyPos(cmd, cmdInfo))
}
-func (c *ClusterClient) cmdSlotAndNode(state *clusterState, cmd Cmder) (int, *clusterNode, error) {
+func (c *ClusterClient) cmdSlotAndNode(cmd Cmder) (int, *clusterNode, error) {
+ state, err := c.state.Get()
+ if err != nil {
+ return 0, nil, err
+ }
+
cmdInfo := c.cmdInfo(cmd.Name())
slot := cmdSlot(cmd, cmdFirstKeyPos(cmd, cmdInfo))
@@ -562,6 +672,11 @@ func (c *ClusterClient) cmdSlotAndNode(state *clusterState, cmd Cmder) (int, *cl
return slot, node, err
}
+ if c.opt.RouteRandomly {
+ node := state.slotRandomNode(slot)
+ return slot, node, nil
+ }
+
node, err := state.slotSlaveNode(slot)
return slot, node, err
}
@@ -570,16 +685,24 @@ func (c *ClusterClient) cmdSlotAndNode(state *clusterState, cmd Cmder) (int, *cl
return slot, node, err
}
+func (c *ClusterClient) slotMasterNode(slot int) (*clusterNode, error) {
+ state, err := c.state.Get()
+ if err != nil {
+ return nil, err
+ }
+
+ nodes := state.slotNodes(slot)
+ if len(nodes) > 0 {
+ return nodes[0], nil
+ }
+ return c.nodes.Random()
+}
+
func (c *ClusterClient) Watch(fn func(*Tx) error, keys ...string) error {
if len(keys) == 0 {
return fmt.Errorf("redis: keys don't hash to the same slot")
}
- state, err := c.state()
- if err != nil {
- return err
- }
-
slot := hashtag.Slot(keys[0])
for _, key := range keys[1:] {
if hashtag.Slot(key) != slot {
@@ -587,7 +710,7 @@ func (c *ClusterClient) Watch(fn func(*Tx) error, keys ...string) error {
}
}
- node, err := state.slotMasterNode(slot)
+ node, err := c.slotMasterNode(slot)
if err != nil {
return err
}
@@ -608,7 +731,7 @@ func (c *ClusterClient) Watch(fn func(*Tx) error, keys ...string) error {
moved, ask, addr := internal.IsMovedError(err)
if moved || ask {
- c.lazyReloadState()
+ c.state.LazyReload()
node, err = c.nodes.GetOrCreate(addr)
if err != nil {
return err
@@ -617,10 +740,11 @@ func (c *ClusterClient) Watch(fn func(*Tx) error, keys ...string) error {
}
if err == pool.ErrClosed {
- node, err = state.slotMasterNode(slot)
+ node, err = c.slotMasterNode(slot)
if err != nil {
return err
}
+ continue
}
return err
@@ -644,31 +768,27 @@ func (c *ClusterClient) WrapProcess(
}
func (c *ClusterClient) Process(cmd Cmder) error {
- if c.process != nil {
- return c.process(cmd)
- }
- return c.defaultProcess(cmd)
+ return c.process(cmd)
}
func (c *ClusterClient) defaultProcess(cmd Cmder) error {
- state, err := c.state()
- if err != nil {
- cmd.setErr(err)
- return err
- }
-
- _, node, err := c.cmdSlotAndNode(state, cmd)
- if err != nil {
- cmd.setErr(err)
- return err
- }
-
+ var node *clusterNode
var ask bool
for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ {
if attempt > 0 {
time.Sleep(c.retryBackoff(attempt))
}
+ if node == nil {
+ var err error
+ _, node, err = c.cmdSlotAndNode(cmd)
+ if err != nil {
+ cmd.setErr(err)
+ break
+ }
+ }
+
+ var err error
if ask {
pipe := node.Client.Pipeline()
_ = pipe.Process(NewCmd("ASKING"))
@@ -687,15 +807,13 @@ func (c *ClusterClient) defaultProcess(cmd Cmder) error {
// If slave is loading - read from master.
if c.opt.ReadOnly && internal.IsLoadingError(err) {
- // TODO: race
- node.loading = time.Now()
+ node.MarkAsLoading()
continue
}
if internal.IsRetryableError(err, true) {
- var nodeErr error
- node, nodeErr = c.nodes.Random()
- if nodeErr != nil {
+ node, err = c.nodes.Random()
+ if err != nil {
break
}
continue
@@ -705,22 +823,18 @@ func (c *ClusterClient) defaultProcess(cmd Cmder) error {
var addr string
moved, ask, addr = internal.IsMovedError(err)
if moved || ask {
- c.lazyReloadState()
+ c.state.LazyReload()
- var nodeErr error
- node, nodeErr = c.nodes.GetOrCreate(addr)
- if nodeErr != nil {
+ node, err = c.nodes.GetOrCreate(addr)
+ if err != nil {
break
}
continue
}
if err == pool.ErrClosed {
- _, node, err = c.cmdSlotAndNode(state, cmd)
- if err != nil {
- cmd.setErr(err)
- return err
- }
+ node = nil
+ continue
}
break
@@ -732,7 +846,7 @@ func (c *ClusterClient) defaultProcess(cmd Cmder) error {
// ForEachMaster concurrently calls the fn on each master node in the cluster.
// It returns the first error if any.
func (c *ClusterClient) ForEachMaster(fn func(client *Client) error) error {
- state, err := c.state()
+ state, err := c.state.Get()
if err != nil {
return err
}
@@ -765,7 +879,7 @@ func (c *ClusterClient) ForEachMaster(fn func(client *Client) error) error {
// ForEachSlave concurrently calls the fn on each slave node in the cluster.
// It returns the first error if any.
func (c *ClusterClient) ForEachSlave(fn func(client *Client) error) error {
- state, err := c.state()
+ state, err := c.state.Get()
if err != nil {
return err
}
@@ -798,7 +912,7 @@ func (c *ClusterClient) ForEachSlave(fn func(client *Client) error) error {
// ForEachNode concurrently calls the fn on each known node in the cluster.
// It returns the first error if any.
func (c *ClusterClient) ForEachNode(fn func(client *Client) error) error {
- state, err := c.state()
+ state, err := c.state.Get()
if err != nil {
return err
}
@@ -838,7 +952,7 @@ func (c *ClusterClient) ForEachNode(fn func(client *Client) error) error {
func (c *ClusterClient) PoolStats() *PoolStats {
var acc PoolStats
- state, _ := c.state()
+ state, _ := c.state.Get()
if state == nil {
return &acc
}
@@ -868,46 +982,34 @@ func (c *ClusterClient) PoolStats() *PoolStats {
return &acc
}
-func (c *ClusterClient) lazyReloadState() {
- if !atomic.CompareAndSwapUint32(&c.reloading, 0, 1) {
- return
+func (c *ClusterClient) loadState() (*clusterState, error) {
+ addrs, err := c.nodes.Addrs()
+ if err != nil {
+ return nil, err
}
- go func() {
- defer atomic.StoreUint32(&c.reloading, 0)
-
- for {
- state, err := c.reloadState()
- if err == pool.ErrClosed {
- return
+ var firstErr error
+ for _, addr := range addrs {
+ node, err := c.nodes.GetOrCreate(addr)
+ if err != nil {
+ if firstErr == nil {
+ firstErr = err
}
+ continue
+ }
- if err != nil {
- time.Sleep(time.Millisecond)
- continue
+ slots, err := node.Client.ClusterSlots().Result()
+ if err != nil {
+ if firstErr == nil {
+ firstErr = err
}
-
- c._state.Store(state)
- time.Sleep(5 * time.Second)
- c.nodes.GC(state.generation)
- break
+ continue
}
- }()
-}
-// Not thread-safe.
-func (c *ClusterClient) reloadState() (*clusterState, error) {
- node, err := c.nodes.Random()
- if err != nil {
- return nil, err
- }
-
- slots, err := node.Client.ClusterSlots().Result()
- if err != nil {
- return nil, err
+ return newClusterState(c.nodes, slots, node.Client.opt.Addr)
}
- return newClusterState(c.nodes, slots, node.Client.opt.Addr)
+ return nil, firstErr
}
// reaper closes idle connections to the cluster.
@@ -991,7 +1093,7 @@ func (c *ClusterClient) defaultProcessPipeline(cmds []Cmder) error {
}
func (c *ClusterClient) mapCmdsByNode(cmds []Cmder) (map[*clusterNode][]Cmder, error) {
- state, err := c.state()
+ state, err := c.state.Get()
if err != nil {
setCmdsErr(cmds, err)
return nil, err
@@ -1024,15 +1126,17 @@ func (c *ClusterClient) remapCmds(cmds []Cmder, failedCmds map[*clusterNode][]Cm
func (c *ClusterClient) pipelineProcessCmds(
node *clusterNode, cn *pool.Conn, cmds []Cmder, failedCmds map[*clusterNode][]Cmder,
) error {
- cn.SetWriteTimeout(c.opt.WriteTimeout)
- if err := writeCmd(cn, cmds...); err != nil {
+ _ = cn.SetWriteTimeout(c.opt.WriteTimeout)
+
+ err := writeCmd(cn, cmds...)
+ if err != nil {
setCmdsErr(cmds, err)
failedCmds[node] = cmds
return err
}
// Set read timeout for all commands.
- cn.SetReadTimeout(c.opt.ReadTimeout)
+ _ = cn.SetReadTimeout(c.opt.ReadTimeout)
return c.pipelineReadCmds(cn, cmds, failedCmds)
}
@@ -1065,7 +1169,7 @@ func (c *ClusterClient) checkMovedErr(
moved, ask, addr := internal.IsMovedError(err)
if moved {
- c.lazyReloadState()
+ c.state.LazyReload()
node, err := c.nodes.GetOrCreate(addr)
if err != nil {
@@ -1103,7 +1207,7 @@ func (c *ClusterClient) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
}
func (c *ClusterClient) defaultProcessTxPipeline(cmds []Cmder) error {
- state, err := c.state()
+ state, err := c.state.Get()
if err != nil {
return err
}
@@ -1249,12 +1353,7 @@ func (c *ClusterClient) pubSub(channels []string) *PubSub {
slot = -1
}
- state, err := c.state()
- if err != nil {
- return nil, err
- }
-
- masterNode, err := state.slotMasterNode(slot)
+ masterNode, err := c.slotMasterNode(slot)
if err != nil {
return nil, err
}
@@ -1310,3 +1409,31 @@ func appendNode(nodes []*clusterNode, node *clusterNode) []*clusterNode {
}
return append(nodes, node)
}
+
+func appendIfNotExists(ss []string, es ...string) []string {
+loop:
+ for _, e := range es {
+ for _, s := range ss {
+ if s == e {
+ continue loop
+ }
+ }
+ ss = append(ss, e)
+ }
+ return ss
+}
+
+func remove(ss []string, es ...string) []string {
+ if len(es) == 0 {
+ return ss[:0]
+ }
+ for _, e := range es {
+ for i, s := range ss {
+ if s == e {
+ ss = append(ss[:i], ss[i+1:]...)
+ break
+ }
+ }
+ }
+ return ss
+}
diff --git a/vendor/github.com/go-redis/redis/cluster_test.go b/vendor/github.com/go-redis/redis/cluster_test.go
deleted file mode 100644
index 43f3261bc..000000000
--- a/vendor/github.com/go-redis/redis/cluster_test.go
+++ /dev/null
@@ -1,813 +0,0 @@
-package redis_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "strconv"
- "strings"
- "sync"
- "testing"
- "time"
-
- "github.com/go-redis/redis"
- "github.com/go-redis/redis/internal/hashtag"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-type clusterScenario struct {
- ports []string
- nodeIds []string
- processes map[string]*redisProcess
- clients map[string]*redis.Client
-}
-
-func (s *clusterScenario) masters() []*redis.Client {
- result := make([]*redis.Client, 3)
- for pos, port := range s.ports[:3] {
- result[pos] = s.clients[port]
- }
- return result
-}
-
-func (s *clusterScenario) slaves() []*redis.Client {
- result := make([]*redis.Client, 3)
- for pos, port := range s.ports[3:] {
- result[pos] = s.clients[port]
- }
- return result
-}
-
-func (s *clusterScenario) addrs() []string {
- addrs := make([]string, len(s.ports))
- for i, port := range s.ports {
- addrs[i] = net.JoinHostPort("127.0.0.1", port)
- }
- return addrs
-}
-
-func (s *clusterScenario) clusterClient(opt *redis.ClusterOptions) *redis.ClusterClient {
- opt.Addrs = s.addrs()
- return redis.NewClusterClient(opt)
-}
-
-func startCluster(scenario *clusterScenario) error {
- // Start processes and collect node ids
- for pos, port := range scenario.ports {
- process, err := startRedis(port, "--cluster-enabled", "yes")
- if err != nil {
- return err
- }
-
- client := redis.NewClient(&redis.Options{
- Addr: ":" + port,
- })
-
- info, err := client.ClusterNodes().Result()
- if err != nil {
- return err
- }
-
- scenario.processes[port] = process
- scenario.clients[port] = client
- scenario.nodeIds[pos] = info[:40]
- }
-
- // Meet cluster nodes.
- for _, client := range scenario.clients {
- err := client.ClusterMeet("127.0.0.1", scenario.ports[0]).Err()
- if err != nil {
- return err
- }
- }
-
- // Bootstrap masters.
- slots := []int{0, 5000, 10000, 16384}
- for pos, master := range scenario.masters() {
- err := master.ClusterAddSlotsRange(slots[pos], slots[pos+1]-1).Err()
- if err != nil {
- return err
- }
- }
-
- // Bootstrap slaves.
- for idx, slave := range scenario.slaves() {
- masterId := scenario.nodeIds[idx]
-
- // Wait until master is available
- err := eventually(func() error {
- s := slave.ClusterNodes().Val()
- wanted := masterId
- if !strings.Contains(s, wanted) {
- return fmt.Errorf("%q does not contain %q", s, wanted)
- }
- return nil
- }, 10*time.Second)
- if err != nil {
- return err
- }
-
- err = slave.ClusterReplicate(masterId).Err()
- if err != nil {
- return err
- }
- }
-
- // Wait until all nodes have consistent info.
- for _, client := range scenario.clients {
- err := eventually(func() error {
- res, err := client.ClusterSlots().Result()
- if err != nil {
- return err
- }
- wanted := []redis.ClusterSlot{
- {0, 4999, []redis.ClusterNode{{"", "127.0.0.1:8220"}, {"", "127.0.0.1:8223"}}},
- {5000, 9999, []redis.ClusterNode{{"", "127.0.0.1:8221"}, {"", "127.0.0.1:8224"}}},
- {10000, 16383, []redis.ClusterNode{{"", "127.0.0.1:8222"}, {"", "127.0.0.1:8225"}}},
- }
- return assertSlotsEqual(res, wanted)
- }, 30*time.Second)
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error {
-outer_loop:
- for _, s2 := range wanted {
- for _, s1 := range slots {
- if slotEqual(s1, s2) {
- continue outer_loop
- }
- }
- return fmt.Errorf("%v not found in %v", s2, slots)
- }
- return nil
-}
-
-func slotEqual(s1, s2 redis.ClusterSlot) bool {
- if s1.Start != s2.Start {
- return false
- }
- if s1.End != s2.End {
- return false
- }
- if len(s1.Nodes) != len(s2.Nodes) {
- return false
- }
- for i, n1 := range s1.Nodes {
- if n1.Addr != s2.Nodes[i].Addr {
- return false
- }
- }
- return true
-}
-
-func stopCluster(scenario *clusterScenario) error {
- for _, client := range scenario.clients {
- if err := client.Close(); err != nil {
- return err
- }
- }
- for _, process := range scenario.processes {
- if err := process.Close(); err != nil {
- return err
- }
- }
- return nil
-}
-
-//------------------------------------------------------------------------------
-
-var _ = Describe("ClusterClient", func() {
- var opt *redis.ClusterOptions
- var client *redis.ClusterClient
-
- assertClusterClient := func() {
- It("should GET/SET/DEL", func() {
- val, err := client.Get("A").Result()
- Expect(err).To(Equal(redis.Nil))
- Expect(val).To(Equal(""))
-
- val, err = client.Set("A", "VALUE", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("OK"))
-
- Eventually(func() string {
- return client.Get("A").Val()
- }, 30*time.Second).Should(Equal("VALUE"))
-
- cnt, err := client.Del("A").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(cnt).To(Equal(int64(1)))
- })
-
- It("follows redirects", func() {
- Expect(client.Set("A", "VALUE", 0).Err()).NotTo(HaveOccurred())
-
- slot := hashtag.Slot("A")
- client.SwapSlotNodes(slot)
-
- Eventually(func() string {
- return client.Get("A").Val()
- }, 30*time.Second).Should(Equal("VALUE"))
- })
-
- It("distributes keys", func() {
- for i := 0; i < 100; i++ {
- err := client.Set(fmt.Sprintf("key%d", i), "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- for _, master := range cluster.masters() {
- Eventually(func() string {
- return master.Info("keyspace").Val()
- }, 30*time.Second).Should(Or(
- ContainSubstring("keys=31"),
- ContainSubstring("keys=29"),
- ContainSubstring("keys=40"),
- ))
- }
- })
-
- It("distributes keys when using EVAL", func() {
- script := redis.NewScript(`
- local r = redis.call('SET', KEYS[1], ARGV[1])
- return r
- `)
-
- var key string
- for i := 0; i < 100; i++ {
- key = fmt.Sprintf("key%d", i)
- err := script.Run(client, []string{key}, "value").Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- for _, master := range cluster.masters() {
- Eventually(func() string {
- return master.Info("keyspace").Val()
- }, 30*time.Second).Should(Or(
- ContainSubstring("keys=31"),
- ContainSubstring("keys=29"),
- ContainSubstring("keys=40"),
- ))
- }
- })
-
- It("supports Watch", func() {
- var incr func(string) error
-
- // Transactionally increments key using GET and SET commands.
- incr = func(key string) error {
- err := client.Watch(func(tx *redis.Tx) error {
- n, err := tx.Get(key).Int64()
- if err != nil && err != redis.Nil {
- return err
- }
-
- _, err = tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set(key, strconv.FormatInt(n+1, 10), 0)
- return nil
- })
- return err
- }, key)
- if err == redis.TxFailedErr {
- return incr(key)
- }
- return err
- }
-
- var wg sync.WaitGroup
- for i := 0; i < 100; i++ {
- wg.Add(1)
- go func() {
- defer GinkgoRecover()
- defer wg.Done()
-
- err := incr("key")
- Expect(err).NotTo(HaveOccurred())
- }()
- }
- wg.Wait()
-
- n, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(100)))
- })
-
- Describe("pipelining", func() {
- var pipe *redis.Pipeline
-
- assertPipeline := func() {
- keys := []string{"A", "B", "C", "D", "E", "F", "G"}
-
- It("follows redirects", func() {
- for _, key := range keys {
- slot := hashtag.Slot(key)
- client.SwapSlotNodes(slot)
- }
-
- for i, key := range keys {
- pipe.Set(key, key+"_value", 0)
- pipe.Expire(key, time.Duration(i+1)*time.Hour)
- }
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(14))
-
- for _, key := range keys {
- slot := hashtag.Slot(key)
- client.SwapSlotNodes(slot)
- }
-
- for _, key := range keys {
- pipe.Get(key)
- pipe.TTL(key)
- }
- cmds, err = pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(14))
-
- for i, key := range keys {
- get := cmds[i*2].(*redis.StringCmd)
- Expect(get.Val()).To(Equal(key + "_value"))
-
- ttl := cmds[(i*2)+1].(*redis.DurationCmd)
- dur := time.Duration(i+1) * time.Hour
- Expect(ttl.Val()).To(BeNumerically("~", dur, 5*time.Second))
- }
- })
-
- It("works with missing keys", func() {
- pipe.Set("A", "A_value", 0)
- pipe.Set("C", "C_value", 0)
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
-
- a := pipe.Get("A")
- b := pipe.Get("B")
- c := pipe.Get("C")
- cmds, err := pipe.Exec()
- Expect(err).To(Equal(redis.Nil))
- Expect(cmds).To(HaveLen(3))
-
- Expect(a.Err()).NotTo(HaveOccurred())
- Expect(a.Val()).To(Equal("A_value"))
-
- Expect(b.Err()).To(Equal(redis.Nil))
- Expect(b.Val()).To(Equal(""))
-
- Expect(c.Err()).NotTo(HaveOccurred())
- Expect(c.Val()).To(Equal("C_value"))
- })
- }
-
- Describe("with Pipeline", func() {
- BeforeEach(func() {
- pipe = client.Pipeline().(*redis.Pipeline)
- })
-
- AfterEach(func() {
- Expect(pipe.Close()).NotTo(HaveOccurred())
- })
-
- assertPipeline()
- })
-
- Describe("with TxPipeline", func() {
- BeforeEach(func() {
- pipe = client.TxPipeline().(*redis.Pipeline)
- })
-
- AfterEach(func() {
- Expect(pipe.Close()).NotTo(HaveOccurred())
- })
-
- assertPipeline()
- })
- })
-
- It("supports PubSub", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- Eventually(func() error {
- _, err := client.Publish("mychannel", "hello").Result()
- if err != nil {
- return err
- }
-
- msg, err := pubsub.ReceiveTimeout(time.Second)
- if err != nil {
- return err
- }
-
- _, ok := msg.(*redis.Message)
- if !ok {
- return fmt.Errorf("got %T, wanted *redis.Message", msg)
- }
-
- return nil
- }, 30*time.Second).ShouldNot(HaveOccurred())
- })
- }
-
- Describe("ClusterClient", func() {
- BeforeEach(func() {
- opt = redisClusterOptions()
- client = cluster.clusterClient(opt)
-
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
- })
-
- AfterEach(func() {
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("returns pool stats", func() {
- Expect(client.PoolStats()).To(BeAssignableToTypeOf(&redis.PoolStats{}))
- })
-
- It("removes idle connections", func() {
- stats := client.PoolStats()
- Expect(stats.TotalConns).NotTo(BeZero())
- Expect(stats.FreeConns).NotTo(BeZero())
-
- time.Sleep(2 * time.Second)
-
- stats = client.PoolStats()
- Expect(stats.TotalConns).To(BeZero())
- Expect(stats.FreeConns).To(BeZero())
- })
-
- It("returns an error when there are no attempts left", func() {
- opt := redisClusterOptions()
- opt.MaxRedirects = -1
- client := cluster.clusterClient(opt)
-
- slot := hashtag.Slot("A")
- client.SwapSlotNodes(slot)
-
- err := client.Get("A").Err()
- Expect(err).To(HaveOccurred())
- Expect(err.Error()).To(ContainSubstring("MOVED"))
-
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("calls fn for every master node", func() {
- for i := 0; i < 10; i++ {
- Expect(client.Set(strconv.Itoa(i), "", 0).Err()).NotTo(HaveOccurred())
- }
-
- err := client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
- Expect(err).NotTo(HaveOccurred())
-
- size, err := client.DBSize().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(0)))
- })
-
- It("should CLUSTER SLOTS", func() {
- res, err := client.ClusterSlots().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(3))
-
- wanted := []redis.ClusterSlot{
- {0, 4999, []redis.ClusterNode{{"", "127.0.0.1:8220"}, {"", "127.0.0.1:8223"}}},
- {5000, 9999, []redis.ClusterNode{{"", "127.0.0.1:8221"}, {"", "127.0.0.1:8224"}}},
- {10000, 16383, []redis.ClusterNode{{"", "127.0.0.1:8222"}, {"", "127.0.0.1:8225"}}},
- }
- Expect(assertSlotsEqual(res, wanted)).NotTo(HaveOccurred())
- })
-
- It("should CLUSTER NODES", func() {
- res, err := client.ClusterNodes().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(len(res)).To(BeNumerically(">", 400))
- })
-
- It("should CLUSTER INFO", func() {
- res, err := client.ClusterInfo().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(ContainSubstring("cluster_known_nodes:6"))
- })
-
- It("should CLUSTER KEYSLOT", func() {
- hashSlot, err := client.ClusterKeySlot("somekey").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(hashSlot).To(Equal(int64(hashtag.Slot("somekey"))))
- })
-
- It("should CLUSTER COUNT-FAILURE-REPORTS", func() {
- n, err := client.ClusterCountFailureReports(cluster.nodeIds[0]).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(0)))
- })
-
- It("should CLUSTER COUNTKEYSINSLOT", func() {
- n, err := client.ClusterCountKeysInSlot(10).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(0)))
- })
-
- It("should CLUSTER SAVECONFIG", func() {
- res, err := client.ClusterSaveConfig().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(Equal("OK"))
- })
-
- It("should CLUSTER SLAVES", func() {
- nodesList, err := client.ClusterSlaves(cluster.nodeIds[0]).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(nodesList).Should(ContainElement(ContainSubstring("slave")))
- Expect(nodesList).Should(HaveLen(1))
- })
-
- It("should RANDOMKEY", func() {
- const nkeys = 100
-
- for i := 0; i < nkeys; i++ {
- err := client.Set(fmt.Sprintf("key%d", i), "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- var keys []string
- addKey := func(key string) {
- for _, k := range keys {
- if k == key {
- return
- }
- }
- keys = append(keys, key)
- }
-
- for i := 0; i < nkeys*10; i++ {
- key := client.RandomKey().Val()
- addKey(key)
- }
-
- Expect(len(keys)).To(BeNumerically("~", nkeys, nkeys/10))
- })
-
- assertClusterClient()
- })
-
- Describe("ClusterClient failover", func() {
- BeforeEach(func() {
- opt = redisClusterOptions()
- client = cluster.clusterClient(opt)
-
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
-
- _ = client.ForEachSlave(func(slave *redis.Client) error {
- Eventually(func() int64 {
- return client.DBSize().Val()
- }, 30*time.Second).Should(Equal(int64(0)))
- return slave.ClusterFailover().Err()
- })
- })
-
- AfterEach(func() {
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- assertClusterClient()
- })
-
- Describe("ClusterClient with RouteByLatency", func() {
- BeforeEach(func() {
- opt = redisClusterOptions()
- opt.RouteByLatency = true
- client = cluster.clusterClient(opt)
-
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
-
- _ = client.ForEachSlave(func(slave *redis.Client) error {
- Eventually(func() int64 {
- return client.DBSize().Val()
- }, 30*time.Second).Should(Equal(int64(0)))
- return nil
- })
- })
-
- AfterEach(func() {
- _ = client.ForEachMaster(func(master *redis.Client) error {
- return master.FlushDB().Err()
- })
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- assertClusterClient()
- })
-})
-
-var _ = Describe("ClusterClient without nodes", func() {
- var client *redis.ClusterClient
-
- BeforeEach(func() {
- client = redis.NewClusterClient(&redis.ClusterOptions{})
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("Ping returns an error", func() {
- err := client.Ping().Err()
- Expect(err).To(MatchError("redis: cluster has no nodes"))
- })
-
- It("pipeline returns an error", func() {
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- Expect(err).To(MatchError("redis: cluster has no nodes"))
- })
-})
-
-var _ = Describe("ClusterClient without valid nodes", func() {
- var client *redis.ClusterClient
-
- BeforeEach(func() {
- client = redis.NewClusterClient(&redis.ClusterOptions{
- Addrs: []string{redisAddr},
- })
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("returns an error", func() {
- err := client.Ping().Err()
- Expect(err).To(MatchError("redis: cannot load cluster slots"))
- })
-
- It("pipeline returns an error", func() {
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- Expect(err).To(MatchError("redis: cannot load cluster slots"))
- })
-})
-
-var _ = Describe("ClusterClient timeout", func() {
- var client *redis.ClusterClient
-
- AfterEach(func() {
- _ = client.Close()
- })
-
- testTimeout := func() {
- It("Ping timeouts", func() {
- err := client.Ping().Err()
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Pipeline timeouts", func() {
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Tx timeouts", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- return tx.Ping().Err()
- }, "foo")
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Tx Pipeline timeouts", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- _, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- return err
- }, "foo")
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
- }
-
- const pause = time.Second
-
- Context("read/write timeout", func() {
- BeforeEach(func() {
- opt := redisClusterOptions()
- opt.ReadTimeout = 100 * time.Millisecond
- opt.WriteTimeout = 100 * time.Millisecond
- opt.MaxRedirects = 1
- client = cluster.clusterClient(opt)
-
- err := client.ForEachNode(func(client *redis.Client) error {
- return client.ClientPause(pause).Err()
- })
- Expect(err).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- client.ForEachNode(func(client *redis.Client) error {
- Eventually(func() error {
- return client.Ping().Err()
- }, 2*pause).ShouldNot(HaveOccurred())
- return nil
- })
- })
-
- testTimeout()
- })
-})
-
-//------------------------------------------------------------------------------
-
-func BenchmarkRedisClusterPing(b *testing.B) {
- if testing.Short() {
- b.Skip("skipping in short mode")
- }
-
- cluster := &clusterScenario{
- ports: []string{"8220", "8221", "8222", "8223", "8224", "8225"},
- nodeIds: make([]string, 6),
- processes: make(map[string]*redisProcess, 6),
- clients: make(map[string]*redis.Client, 6),
- }
-
- if err := startCluster(cluster); err != nil {
- b.Fatal(err)
- }
- defer stopCluster(cluster)
-
- client := cluster.clusterClient(redisClusterOptions())
- defer client.Close()
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Ping().Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkRedisClusterSetString(b *testing.B) {
- if testing.Short() {
- b.Skip("skipping in short mode")
- }
-
- cluster := &clusterScenario{
- ports: []string{"8220", "8221", "8222", "8223", "8224", "8225"},
- nodeIds: make([]string, 6),
- processes: make(map[string]*redisProcess, 6),
- clients: make(map[string]*redis.Client, 6),
- }
-
- if err := startCluster(cluster); err != nil {
- b.Fatal(err)
- }
- defer stopCluster(cluster)
-
- client := cluster.clusterClient(redisClusterOptions())
- defer client.Close()
-
- value := string(bytes.Repeat([]byte{'1'}, 10000))
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if err := client.Set("key", value, 0).Err(); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
diff --git a/vendor/github.com/go-redis/redis/command.go b/vendor/github.com/go-redis/redis/command.go
index 480a5ce19..1588ca251 100644
--- a/vendor/github.com/go-redis/redis/command.go
+++ b/vendor/github.com/go-redis/redis/command.go
@@ -10,6 +10,7 @@ import (
"github.com/go-redis/redis/internal"
"github.com/go-redis/redis/internal/pool"
"github.com/go-redis/redis/internal/proto"
+ "github.com/go-redis/redis/internal/util"
)
type Cmder interface {
@@ -436,7 +437,7 @@ func NewStringCmd(args ...interface{}) *StringCmd {
}
func (cmd *StringCmd) Val() string {
- return internal.BytesToString(cmd.val)
+ return util.BytesToString(cmd.val)
}
func (cmd *StringCmd) Result() (string, error) {
@@ -1022,3 +1023,26 @@ func (cmd *CommandsInfoCmd) readReply(cn *pool.Conn) error {
cmd.val = v.(map[string]*CommandInfo)
return nil
}
+
+//------------------------------------------------------------------------------
+
+type cmdsInfoCache struct {
+ once internal.Once
+ cmds map[string]*CommandInfo
+}
+
+func newCmdsInfoCache() *cmdsInfoCache {
+ return &cmdsInfoCache{}
+}
+
+func (c *cmdsInfoCache) Do(fn func() (map[string]*CommandInfo, error)) (map[string]*CommandInfo, error) {
+ err := c.once.Do(func() error {
+ cmds, err := fn()
+ if err != nil {
+ return err
+ }
+ c.cmds = cmds
+ return nil
+ })
+ return c.cmds, err
+}
diff --git a/vendor/github.com/go-redis/redis/command_test.go b/vendor/github.com/go-redis/redis/command_test.go
deleted file mode 100644
index e42375eda..000000000
--- a/vendor/github.com/go-redis/redis/command_test.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package redis_test
-
-import (
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Cmd", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("implements Stringer", func() {
- set := client.Set("foo", "bar", 0)
- Expect(set.String()).To(Equal("set foo bar: OK"))
-
- get := client.Get("foo")
- Expect(get.String()).To(Equal("get foo: bar"))
- })
-
- It("has val/err", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
-
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
- })
-
- It("has helpers", func() {
- set := client.Set("key", "10", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
-
- n, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(10)))
-
- un, err := client.Get("key").Uint64()
- Expect(err).NotTo(HaveOccurred())
- Expect(un).To(Equal(uint64(10)))
-
- f, err := client.Get("key").Float64()
- Expect(err).NotTo(HaveOccurred())
- Expect(f).To(Equal(float64(10)))
- })
-
-})
diff --git a/vendor/github.com/go-redis/redis/commands.go b/vendor/github.com/go-redis/redis/commands.go
index 569342cfa..a3dacacd2 100644
--- a/vendor/github.com/go-redis/redis/commands.go
+++ b/vendor/github.com/go-redis/redis/commands.go
@@ -1,6 +1,7 @@
package redis
import (
+ "errors"
"io"
"time"
@@ -38,6 +39,22 @@ func formatSec(dur time.Duration) int64 {
return int64(dur / time.Second)
}
+func appendArgs(dst, src []interface{}) []interface{} {
+ if len(src) == 1 {
+ if ss, ok := src[0].([]string); ok {
+ for _, s := range ss {
+ dst = append(dst, s)
+ }
+ return dst
+ }
+ }
+
+ for _, v := range src {
+ dst = append(dst, v)
+ }
+ return dst
+}
+
type Cmdable interface {
Pipeline() Pipeliner
Pipelined(fn func(Pipeliner) error) ([]Cmder, error)
@@ -70,8 +87,10 @@ type Cmdable interface {
RenameNX(key, newkey string) *BoolCmd
Restore(key string, ttl time.Duration, value string) *StatusCmd
RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd
- Sort(key string, sort Sort) *StringSliceCmd
- SortInterfaces(key string, sort Sort) *SliceCmd
+ Sort(key string, sort *Sort) *StringSliceCmd
+ SortStore(key, store string, sort *Sort) *IntCmd
+ SortInterfaces(key string, sort *Sort) *SliceCmd
+ Touch(keys ...string) *IntCmd
TTL(key string) *DurationCmd
Type(key string) *StatusCmd
Scan(cursor uint64, match string, count int64) *ScanCmd
@@ -195,6 +214,7 @@ type Cmdable interface {
ConfigGet(parameter string) *SliceCmd
ConfigResetStat() *StatusCmd
ConfigSet(parameter, value string) *StatusCmd
+ ConfigRewrite() *StatusCmd
DBSize() *IntCmd
FlushAll() *StatusCmd
FlushAllAsync() *StatusCmd
@@ -210,7 +230,7 @@ type Cmdable interface {
Time() *TimeCmd
Eval(script string, keys []string, args ...interface{}) *Cmd
EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
- ScriptExists(scripts ...string) *BoolSliceCmd
+ ScriptExists(hashes ...string) *BoolSliceCmd
ScriptFlush() *StatusCmd
ScriptKill() *StatusCmd
ScriptLoad(script string) *StringCmd
@@ -252,6 +272,7 @@ type StatefulCmdable interface {
Cmdable
Auth(password string) *StatusCmd
Select(index int) *StatusCmd
+ SwapDB(index1, index2 int) *StatusCmd
ClientSetName(name string) *BoolCmd
ReadOnly() *StatusCmd
ReadWrite() *StatusCmd
@@ -316,6 +337,12 @@ func (c *statefulCmdable) Select(index int) *StatusCmd {
return cmd
}
+func (c *statefulCmdable) SwapDB(index1, index2 int) *StatusCmd {
+ cmd := NewStatusCmd("swapdb", index1, index2)
+ c.process(cmd)
+ return cmd
+}
+
//------------------------------------------------------------------------------
func (c *cmdable) Del(keys ...string) *IntCmd {
@@ -484,11 +511,10 @@ func (c *cmdable) RestoreReplace(key string, ttl time.Duration, value string) *S
type Sort struct {
By string
- Offset, Count float64
+ Offset, Count int64
Get []string
Order string
- IsAlpha bool
- Store string
+ Alpha bool
}
func (sort *Sort) args(key string) []interface{} {
@@ -505,27 +531,45 @@ func (sort *Sort) args(key string) []interface{} {
if sort.Order != "" {
args = append(args, sort.Order)
}
- if sort.IsAlpha {
+ if sort.Alpha {
args = append(args, "alpha")
}
- if sort.Store != "" {
- args = append(args, "store", sort.Store)
- }
return args
}
-func (c *cmdable) Sort(key string, sort Sort) *StringSliceCmd {
+func (c *cmdable) Sort(key string, sort *Sort) *StringSliceCmd {
cmd := NewStringSliceCmd(sort.args(key)...)
c.process(cmd)
return cmd
}
-func (c *cmdable) SortInterfaces(key string, sort Sort) *SliceCmd {
+func (c *cmdable) SortStore(key, store string, sort *Sort) *IntCmd {
+ args := sort.args(key)
+ if store != "" {
+ args = append(args, "store", store)
+ }
+ cmd := NewIntCmd(args...)
+ c.process(cmd)
+ return cmd
+}
+
+func (c *cmdable) SortInterfaces(key string, sort *Sort) *SliceCmd {
cmd := NewSliceCmd(sort.args(key)...)
c.process(cmd)
return cmd
}
+func (c *cmdable) Touch(keys ...string) *IntCmd {
+ args := make([]interface{}, len(keys)+1)
+ args[0] = "touch"
+ for i, key := range keys {
+ args[i+1] = key
+ }
+ cmd := NewIntCmd(args...)
+ c.process(cmd)
+ return cmd
+}
+
func (c *cmdable) TTL(key string) *DurationCmd {
cmd := NewDurationCmd(time.Second, "ttl", key)
c.process(cmd)
@@ -732,22 +776,18 @@ func (c *cmdable) MGet(keys ...string) *SliceCmd {
}
func (c *cmdable) MSet(pairs ...interface{}) *StatusCmd {
- args := make([]interface{}, 1+len(pairs))
+ args := make([]interface{}, 1, 1+len(pairs))
args[0] = "mset"
- for i, pair := range pairs {
- args[1+i] = pair
- }
+ args = appendArgs(args, pairs)
cmd := NewStatusCmd(args...)
c.process(cmd)
return cmd
}
func (c *cmdable) MSetNX(pairs ...interface{}) *BoolCmd {
- args := make([]interface{}, 1+len(pairs))
+ args := make([]interface{}, 1, 1+len(pairs))
args[0] = "msetnx"
- for i, pair := range pairs {
- args[1+i] = pair
- }
+ args = appendArgs(args, pairs)
cmd := NewBoolCmd(args...)
c.process(cmd)
return cmd
@@ -1012,12 +1052,10 @@ func (c *cmdable) LPop(key string) *StringCmd {
}
func (c *cmdable) LPush(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(values))
+ args := make([]interface{}, 2, 2+len(values))
args[0] = "lpush"
args[1] = key
- for i, value := range values {
- args[2+i] = value
- }
+ args = appendArgs(args, values)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1076,12 +1114,10 @@ func (c *cmdable) RPopLPush(source, destination string) *StringCmd {
}
func (c *cmdable) RPush(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(values))
+ args := make([]interface{}, 2, 2+len(values))
args[0] = "rpush"
args[1] = key
- for i, value := range values {
- args[2+i] = value
- }
+ args = appendArgs(args, values)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1096,12 +1132,10 @@ func (c *cmdable) RPushX(key string, value interface{}) *IntCmd {
//------------------------------------------------------------------------------
func (c *cmdable) SAdd(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(members))
+ args := make([]interface{}, 2, 2+len(members))
args[0] = "sadd"
args[1] = key
- for i, member := range members {
- args[2+i] = member
- }
+ args = appendArgs(args, members)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1214,12 +1248,10 @@ func (c *cmdable) SRandMemberN(key string, count int64) *StringSliceCmd {
}
func (c *cmdable) SRem(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(members))
+ args := make([]interface{}, 2, 2+len(members))
args[0] = "srem"
args[1] = key
- for i, member := range members {
- args[2+i] = member
- }
+ args = appendArgs(args, members)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1479,12 +1511,10 @@ func (c *cmdable) ZRank(key, member string) *IntCmd {
}
func (c *cmdable) ZRem(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(members))
+ args := make([]interface{}, 2, 2+len(members))
args[0] = "zrem"
args[1] = key
- for i, member := range members {
- args[2+i] = member
- }
+ args = appendArgs(args, members)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1600,12 +1630,10 @@ func (c *cmdable) ZUnionStore(dest string, store ZStore, keys ...string) *IntCmd
//------------------------------------------------------------------------------
func (c *cmdable) PFAdd(key string, els ...interface{}) *IntCmd {
- args := make([]interface{}, 2+len(els))
+ args := make([]interface{}, 2, 2+len(els))
args[0] = "pfadd"
args[1] = key
- for i, el := range els {
- args[2+i] = el
- }
+ args = appendArgs(args, els)
cmd := NewIntCmd(args...)
c.process(cmd)
return cmd
@@ -1698,6 +1726,12 @@ func (c *cmdable) ConfigSet(parameter, value string) *StatusCmd {
return cmd
}
+func (c *cmdable) ConfigRewrite() *StatusCmd {
+ cmd := NewStatusCmd("config", "rewrite")
+ c.process(cmd)
+ return cmd
+}
+
// Deperecated. Use DBSize instead.
func (c *cmdable) DbSize() *IntCmd {
return c.DBSize()
@@ -1776,7 +1810,7 @@ func (c *cmdable) shutdown(modifier string) *StatusCmd {
}
} else {
// Server did not quit. String reply contains the reason.
- cmd.err = internal.RedisError(cmd.val)
+ cmd.err = errors.New(cmd.val)
cmd.val = ""
}
return cmd
@@ -1817,45 +1851,39 @@ func (c *cmdable) Time() *TimeCmd {
//------------------------------------------------------------------------------
func (c *cmdable) Eval(script string, keys []string, args ...interface{}) *Cmd {
- cmdArgs := make([]interface{}, 3+len(keys)+len(args))
+ cmdArgs := make([]interface{}, 3+len(keys), 3+len(keys)+len(args))
cmdArgs[0] = "eval"
cmdArgs[1] = script
cmdArgs[2] = len(keys)
for i, key := range keys {
cmdArgs[3+i] = key
}
- pos := 3 + len(keys)
- for i, arg := range args {
- cmdArgs[pos+i] = arg
- }
+ cmdArgs = appendArgs(cmdArgs, args)
cmd := NewCmd(cmdArgs...)
c.process(cmd)
return cmd
}
func (c *cmdable) EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd {
- cmdArgs := make([]interface{}, 3+len(keys)+len(args))
+ cmdArgs := make([]interface{}, 3+len(keys), 3+len(keys)+len(args))
cmdArgs[0] = "evalsha"
cmdArgs[1] = sha1
cmdArgs[2] = len(keys)
for i, key := range keys {
cmdArgs[3+i] = key
}
- pos := 3 + len(keys)
- for i, arg := range args {
- cmdArgs[pos+i] = arg
- }
+ cmdArgs = appendArgs(cmdArgs, args)
cmd := NewCmd(cmdArgs...)
c.process(cmd)
return cmd
}
-func (c *cmdable) ScriptExists(scripts ...string) *BoolSliceCmd {
- args := make([]interface{}, 2+len(scripts))
+func (c *cmdable) ScriptExists(hashes ...string) *BoolSliceCmd {
+ args := make([]interface{}, 2+len(hashes))
args[0] = "script"
args[1] = "exists"
- for i, script := range scripts {
- args[2+i] = script
+ for i, hash := range hashes {
+ args[2+i] = hash
}
cmd := NewBoolSliceCmd(args...)
c.process(cmd)
diff --git a/vendor/github.com/go-redis/redis/commands_test.go b/vendor/github.com/go-redis/redis/commands_test.go
deleted file mode 100644
index 715379556..000000000
--- a/vendor/github.com/go-redis/redis/commands_test.go
+++ /dev/null
@@ -1,2968 +0,0 @@
-package redis_test
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "time"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-
- "github.com/go-redis/redis"
-)
-
-var _ = Describe("Commands", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- Describe("server", func() {
-
- It("should Auth", func() {
- cmds, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Auth("password")
- pipe.Auth("")
- return nil
- })
- Expect(err).To(MatchError("ERR Client sent AUTH, but no password is set"))
- Expect(cmds[0].Err()).To(MatchError("ERR Client sent AUTH, but no password is set"))
- Expect(cmds[1].Err()).To(MatchError("ERR Client sent AUTH, but no password is set"))
-
- stats := client.PoolStats()
- Expect(stats.Hits).To(Equal(uint32(1)))
- Expect(stats.Misses).To(Equal(uint32(1)))
- Expect(stats.Timeouts).To(Equal(uint32(0)))
- Expect(stats.TotalConns).To(Equal(uint32(1)))
- Expect(stats.FreeConns).To(Equal(uint32(1)))
- })
-
- It("should Echo", func() {
- pipe := client.Pipeline()
- echo := pipe.Echo("hello")
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
-
- Expect(echo.Err()).NotTo(HaveOccurred())
- Expect(echo.Val()).To(Equal("hello"))
- })
-
- It("should Ping", func() {
- ping := client.Ping()
- Expect(ping.Err()).NotTo(HaveOccurred())
- Expect(ping.Val()).To(Equal("PONG"))
- })
-
- It("should Wait", func() {
- // assume testing on single redis instance
- start := time.Now()
- wait := client.Wait(1, time.Second)
- Expect(wait.Err()).NotTo(HaveOccurred())
- Expect(wait.Val()).To(Equal(int64(0)))
- Expect(time.Now()).To(BeTemporally("~", start.Add(time.Second), 800*time.Millisecond))
- })
-
- It("should Select", func() {
- pipe := client.Pipeline()
- sel := pipe.Select(1)
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
-
- Expect(sel.Err()).NotTo(HaveOccurred())
- Expect(sel.Val()).To(Equal("OK"))
- })
-
- It("should BgRewriteAOF", func() {
- Skip("flaky test")
-
- val, err := client.BgRewriteAOF().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(ContainSubstring("Background append only file rewriting"))
- })
-
- It("should BgSave", func() {
- Skip("flaky test")
-
- // workaround for "ERR Can't BGSAVE while AOF log rewriting is in progress"
- Eventually(func() string {
- return client.BgSave().Val()
- }, "30s").Should(Equal("Background saving started"))
- })
-
- It("should ClientKill", func() {
- r := client.ClientKill("1.1.1.1:1111")
- Expect(r.Err()).To(MatchError("ERR No such client"))
- Expect(r.Val()).To(Equal(""))
- })
-
- It("should ClientPause", func() {
- err := client.ClientPause(time.Second).Err()
- Expect(err).NotTo(HaveOccurred())
-
- start := time.Now()
- err = client.Ping().Err()
- Expect(err).NotTo(HaveOccurred())
- Expect(time.Now()).To(BeTemporally("~", start.Add(time.Second), 800*time.Millisecond))
- })
-
- It("should ClientSetName and ClientGetName", func() {
- pipe := client.Pipeline()
- set := pipe.ClientSetName("theclientname")
- get := pipe.ClientGetName()
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
-
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(BeTrue())
-
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("theclientname"))
- })
-
- It("should ConfigGet", func() {
- val, err := client.ConfigGet("*").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).NotTo(BeEmpty())
- })
-
- It("should ConfigResetStat", func() {
- r := client.ConfigResetStat()
- Expect(r.Err()).NotTo(HaveOccurred())
- Expect(r.Val()).To(Equal("OK"))
- })
-
- It("should ConfigSet", func() {
- configGet := client.ConfigGet("maxmemory")
- Expect(configGet.Err()).NotTo(HaveOccurred())
- Expect(configGet.Val()).To(HaveLen(2))
- Expect(configGet.Val()[0]).To(Equal("maxmemory"))
-
- configSet := client.ConfigSet("maxmemory", configGet.Val()[1].(string))
- Expect(configSet.Err()).NotTo(HaveOccurred())
- Expect(configSet.Val()).To(Equal("OK"))
- })
-
- It("should DBSize", func() {
- size, err := client.DBSize().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(0)))
- })
-
- It("should Info", func() {
- info := client.Info()
- Expect(info.Err()).NotTo(HaveOccurred())
- Expect(info.Val()).NotTo(Equal(""))
- })
-
- It("should Info cpu", func() {
- info := client.Info("cpu")
- Expect(info.Err()).NotTo(HaveOccurred())
- Expect(info.Val()).NotTo(Equal(""))
- Expect(info.Val()).To(ContainSubstring(`used_cpu_sys`))
- })
-
- It("should LastSave", func() {
- lastSave := client.LastSave()
- Expect(lastSave.Err()).NotTo(HaveOccurred())
- Expect(lastSave.Val()).NotTo(Equal(0))
- })
-
- It("should Save", func() {
- // workaround for "ERR Background save already in progress"
- Eventually(func() string {
- return client.Save().Val()
- }, "10s").Should(Equal("OK"))
- })
-
- It("should SlaveOf", func() {
- slaveOf := client.SlaveOf("localhost", "8888")
- Expect(slaveOf.Err()).NotTo(HaveOccurred())
- Expect(slaveOf.Val()).To(Equal("OK"))
-
- slaveOf = client.SlaveOf("NO", "ONE")
- Expect(slaveOf.Err()).NotTo(HaveOccurred())
- Expect(slaveOf.Val()).To(Equal("OK"))
- })
-
- It("should Time", func() {
- tm, err := client.Time().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(tm).To(BeTemporally("~", time.Now(), 3*time.Second))
- })
-
- It("Should Command", func() {
- cmds, err := client.Command().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(len(cmds)).To(BeNumerically("~", 180, 10))
-
- cmd := cmds["mget"]
- Expect(cmd.Name).To(Equal("mget"))
- Expect(cmd.Arity).To(Equal(int8(-2)))
- Expect(cmd.Flags).To(ContainElement("readonly"))
- Expect(cmd.FirstKeyPos).To(Equal(int8(1)))
- Expect(cmd.LastKeyPos).To(Equal(int8(-1)))
- Expect(cmd.StepCount).To(Equal(int8(1)))
-
- cmd = cmds["ping"]
- Expect(cmd.Name).To(Equal("ping"))
- Expect(cmd.Arity).To(Equal(int8(-1)))
- Expect(cmd.Flags).To(ContainElement("stale"))
- Expect(cmd.Flags).To(ContainElement("fast"))
- Expect(cmd.FirstKeyPos).To(Equal(int8(0)))
- Expect(cmd.LastKeyPos).To(Equal(int8(0)))
- Expect(cmd.StepCount).To(Equal(int8(0)))
- })
-
- })
-
- Describe("debugging", func() {
-
- It("should DebugObject", func() {
- debug := client.DebugObject("foo")
- Expect(debug.Err()).To(HaveOccurred())
- Expect(debug.Err().Error()).To(Equal("ERR no such key"))
-
- client.Set("foo", "bar", 0)
- debug = client.DebugObject("foo")
- Expect(debug.Err()).NotTo(HaveOccurred())
- Expect(debug.Val()).To(ContainSubstring(`serializedlength:4`))
- })
-
- })
-
- Describe("keys", func() {
-
- It("should Del", func() {
- err := client.Set("key1", "Hello", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.Set("key2", "World", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- n, err := client.Del("key1", "key2", "key3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(2)))
- })
-
- It("should Unlink", func() {
- err := client.Set("key1", "Hello", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.Set("key2", "World", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- n, err := client.Unlink("key1", "key2", "key3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(2)))
- })
-
- It("should Dump", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- dump := client.Dump("key")
- Expect(dump.Err()).NotTo(HaveOccurred())
- Expect(dump.Val()).NotTo(BeEmpty())
- })
-
- It("should Exists", func() {
- set := client.Set("key1", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- n, err := client.Exists("key1").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- n, err = client.Exists("key2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(0)))
-
- n, err = client.Exists("key1", "key2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- n, err = client.Exists("key1", "key1").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(2)))
- })
-
- It("should Expire", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expire := client.Expire("key", 10*time.Second)
- Expect(expire.Err()).NotTo(HaveOccurred())
- Expect(expire.Val()).To(Equal(true))
-
- ttl := client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val()).To(Equal(10 * time.Second))
-
- set = client.Set("key", "Hello World", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- ttl = client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val() < 0).To(Equal(true))
- })
-
- It("should ExpireAt", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- n, err := client.Exists("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- expireAt := client.ExpireAt("key", time.Now().Add(-time.Hour))
- Expect(expireAt.Err()).NotTo(HaveOccurred())
- Expect(expireAt.Val()).To(Equal(true))
-
- n, err = client.Exists("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(0)))
- })
-
- It("should Keys", func() {
- mset := client.MSet("one", "1", "two", "2", "three", "3", "four", "4")
- Expect(mset.Err()).NotTo(HaveOccurred())
- Expect(mset.Val()).To(Equal("OK"))
-
- keys := client.Keys("*o*")
- Expect(keys.Err()).NotTo(HaveOccurred())
- Expect(keys.Val()).To(ConsistOf([]string{"four", "one", "two"}))
-
- keys = client.Keys("t??")
- Expect(keys.Err()).NotTo(HaveOccurred())
- Expect(keys.Val()).To(Equal([]string{"two"}))
-
- keys = client.Keys("*")
- Expect(keys.Err()).NotTo(HaveOccurred())
- Expect(keys.Val()).To(ConsistOf([]string{"four", "one", "three", "two"}))
- })
-
- It("should Migrate", func() {
- migrate := client.Migrate("localhost", redisSecondaryPort, "key", 0, 0)
- Expect(migrate.Err()).NotTo(HaveOccurred())
- Expect(migrate.Val()).To(Equal("NOKEY"))
-
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- migrate = client.Migrate("localhost", redisSecondaryPort, "key", 0, 0)
- Expect(migrate.Err()).To(MatchError("IOERR error or timeout writing to target instance"))
- Expect(migrate.Val()).To(Equal(""))
- })
-
- It("should Move", func() {
- move := client.Move("key", 2)
- Expect(move.Err()).NotTo(HaveOccurred())
- Expect(move.Val()).To(Equal(false))
-
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- move = client.Move("key", 2)
- Expect(move.Err()).NotTo(HaveOccurred())
- Expect(move.Val()).To(Equal(true))
-
- get := client.Get("key")
- Expect(get.Err()).To(Equal(redis.Nil))
- Expect(get.Val()).To(Equal(""))
-
- pipe := client.Pipeline()
- pipe.Select(2)
- get = pipe.Get("key")
- pipe.FlushDB()
-
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should Object", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- refCount := client.ObjectRefCount("key")
- Expect(refCount.Err()).NotTo(HaveOccurred())
- Expect(refCount.Val()).To(Equal(int64(1)))
-
- err := client.ObjectEncoding("key").Err()
- Expect(err).NotTo(HaveOccurred())
-
- idleTime := client.ObjectIdleTime("key")
- Expect(idleTime.Err()).NotTo(HaveOccurred())
- Expect(idleTime.Val()).To(Equal(time.Duration(0)))
- })
-
- It("should Persist", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expire := client.Expire("key", 10*time.Second)
- Expect(expire.Err()).NotTo(HaveOccurred())
- Expect(expire.Val()).To(Equal(true))
-
- ttl := client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val()).To(Equal(10 * time.Second))
-
- persist := client.Persist("key")
- Expect(persist.Err()).NotTo(HaveOccurred())
- Expect(persist.Val()).To(Equal(true))
-
- ttl = client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val() < 0).To(Equal(true))
- })
-
- It("should PExpire", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expiration := 900 * time.Millisecond
- pexpire := client.PExpire("key", expiration)
- Expect(pexpire.Err()).NotTo(HaveOccurred())
- Expect(pexpire.Val()).To(Equal(true))
-
- ttl := client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val()).To(Equal(time.Second))
-
- pttl := client.PTTL("key")
- Expect(pttl.Err()).NotTo(HaveOccurred())
- Expect(pttl.Val()).To(BeNumerically("~", expiration, 10*time.Millisecond))
- })
-
- It("should PExpireAt", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expiration := 900 * time.Millisecond
- pexpireat := client.PExpireAt("key", time.Now().Add(expiration))
- Expect(pexpireat.Err()).NotTo(HaveOccurred())
- Expect(pexpireat.Val()).To(Equal(true))
-
- ttl := client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val()).To(Equal(time.Second))
-
- pttl := client.PTTL("key")
- Expect(pttl.Err()).NotTo(HaveOccurred())
- Expect(pttl.Val()).To(BeNumerically("~", expiration, 10*time.Millisecond))
- })
-
- It("should PTTL", func() {
- set := client.Set("key", "Hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expiration := time.Second
- expire := client.Expire("key", expiration)
- Expect(expire.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- pttl := client.PTTL("key")
- Expect(pttl.Err()).NotTo(HaveOccurred())
- Expect(pttl.Val()).To(BeNumerically("~", expiration, 10*time.Millisecond))
- })
-
- It("should RandomKey", func() {
- randomKey := client.RandomKey()
- Expect(randomKey.Err()).To(Equal(redis.Nil))
- Expect(randomKey.Val()).To(Equal(""))
-
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- randomKey = client.RandomKey()
- Expect(randomKey.Err()).NotTo(HaveOccurred())
- Expect(randomKey.Val()).To(Equal("key"))
- })
-
- It("should Rename", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- status := client.Rename("key", "key1")
- Expect(status.Err()).NotTo(HaveOccurred())
- Expect(status.Val()).To(Equal("OK"))
-
- get := client.Get("key1")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should RenameNX", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- renameNX := client.RenameNX("key", "key1")
- Expect(renameNX.Err()).NotTo(HaveOccurred())
- Expect(renameNX.Val()).To(Equal(true))
-
- get := client.Get("key1")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should Restore", func() {
- err := client.Set("key", "hello", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- dump := client.Dump("key")
- Expect(dump.Err()).NotTo(HaveOccurred())
-
- err = client.Del("key").Err()
- Expect(err).NotTo(HaveOccurred())
-
- restore, err := client.Restore("key", 0, dump.Val()).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(restore).To(Equal("OK"))
-
- type_, err := client.Type("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(type_).To(Equal("string"))
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello"))
- })
-
- It("should RestoreReplace", func() {
- err := client.Set("key", "hello", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- dump := client.Dump("key")
- Expect(dump.Err()).NotTo(HaveOccurred())
-
- restore, err := client.RestoreReplace("key", 0, dump.Val()).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(restore).To(Equal("OK"))
-
- type_, err := client.Type("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(type_).To(Equal("string"))
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello"))
- })
-
- It("should Sort", func() {
- size, err := client.LPush("list", "1").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(1)))
-
- size, err = client.LPush("list", "3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(2)))
-
- size, err = client.LPush("list", "2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(3)))
-
- els, err := client.Sort("list", redis.Sort{
- Offset: 0,
- Count: 2,
- Order: "ASC",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(els).To(Equal([]string{"1", "2"}))
- })
-
- It("should Sort and Get", func() {
- size, err := client.LPush("list", "1").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(1)))
-
- size, err = client.LPush("list", "3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(2)))
-
- size, err = client.LPush("list", "2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(size).To(Equal(int64(3)))
-
- err = client.Set("object_2", "value2", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- {
- els, err := client.Sort("list", redis.Sort{
- Get: []string{"object_*"},
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(els).To(Equal([]string{"", "value2", ""}))
- }
-
- {
- els, err := client.SortInterfaces("list", redis.Sort{
- Get: []string{"object_*"},
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(els).To(Equal([]interface{}{nil, "value2", nil}))
- }
- })
-
- It("should TTL", func() {
- ttl := client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val() < 0).To(Equal(true))
-
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- expire := client.Expire("key", 60*time.Second)
- Expect(expire.Err()).NotTo(HaveOccurred())
- Expect(expire.Val()).To(Equal(true))
-
- ttl = client.TTL("key")
- Expect(ttl.Err()).NotTo(HaveOccurred())
- Expect(ttl.Val()).To(Equal(60 * time.Second))
- })
-
- It("should Type", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- type_ := client.Type("key")
- Expect(type_.Err()).NotTo(HaveOccurred())
- Expect(type_.Val()).To(Equal("string"))
- })
-
- })
-
- Describe("scanning", func() {
-
- It("should Scan", func() {
- for i := 0; i < 1000; i++ {
- set := client.Set(fmt.Sprintf("key%d", i), "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- }
-
- keys, cursor, err := client.Scan(0, "", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(keys).NotTo(BeEmpty())
- Expect(cursor).NotTo(BeZero())
- })
-
- It("should SScan", func() {
- for i := 0; i < 1000; i++ {
- sadd := client.SAdd("myset", fmt.Sprintf("member%d", i))
- Expect(sadd.Err()).NotTo(HaveOccurred())
- }
-
- keys, cursor, err := client.SScan("myset", 0, "", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(keys).NotTo(BeEmpty())
- Expect(cursor).NotTo(BeZero())
- })
-
- It("should HScan", func() {
- for i := 0; i < 1000; i++ {
- sadd := client.HSet("myhash", fmt.Sprintf("key%d", i), "hello")
- Expect(sadd.Err()).NotTo(HaveOccurred())
- }
-
- keys, cursor, err := client.HScan("myhash", 0, "", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(keys).NotTo(BeEmpty())
- Expect(cursor).NotTo(BeZero())
- })
-
- It("should ZScan", func() {
- for i := 0; i < 1000; i++ {
- sadd := client.ZAdd("myset", redis.Z{float64(i), fmt.Sprintf("member%d", i)})
- Expect(sadd.Err()).NotTo(HaveOccurred())
- }
-
- keys, cursor, err := client.ZScan("myset", 0, "", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(keys).NotTo(BeEmpty())
- Expect(cursor).NotTo(BeZero())
- })
-
- })
-
- Describe("strings", func() {
-
- It("should Append", func() {
- n, err := client.Exists("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(0)))
-
- append := client.Append("key", "Hello")
- Expect(append.Err()).NotTo(HaveOccurred())
- Expect(append.Val()).To(Equal(int64(5)))
-
- append = client.Append("key", " World")
- Expect(append.Err()).NotTo(HaveOccurred())
- Expect(append.Val()).To(Equal(int64(11)))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("Hello World"))
- })
-
- It("should BitCount", func() {
- set := client.Set("key", "foobar", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- bitCount := client.BitCount("key", nil)
- Expect(bitCount.Err()).NotTo(HaveOccurred())
- Expect(bitCount.Val()).To(Equal(int64(26)))
-
- bitCount = client.BitCount("key", &redis.BitCount{0, 0})
- Expect(bitCount.Err()).NotTo(HaveOccurred())
- Expect(bitCount.Val()).To(Equal(int64(4)))
-
- bitCount = client.BitCount("key", &redis.BitCount{1, 1})
- Expect(bitCount.Err()).NotTo(HaveOccurred())
- Expect(bitCount.Val()).To(Equal(int64(6)))
- })
-
- It("should BitOpAnd", func() {
- set := client.Set("key1", "1", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- set = client.Set("key2", "0", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- bitOpAnd := client.BitOpAnd("dest", "key1", "key2")
- Expect(bitOpAnd.Err()).NotTo(HaveOccurred())
- Expect(bitOpAnd.Val()).To(Equal(int64(1)))
-
- get := client.Get("dest")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("0"))
- })
-
- It("should BitOpOr", func() {
- set := client.Set("key1", "1", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- set = client.Set("key2", "0", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- bitOpOr := client.BitOpOr("dest", "key1", "key2")
- Expect(bitOpOr.Err()).NotTo(HaveOccurred())
- Expect(bitOpOr.Val()).To(Equal(int64(1)))
-
- get := client.Get("dest")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("1"))
- })
-
- It("should BitOpXor", func() {
- set := client.Set("key1", "\xff", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- set = client.Set("key2", "\x0f", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- bitOpXor := client.BitOpXor("dest", "key1", "key2")
- Expect(bitOpXor.Err()).NotTo(HaveOccurred())
- Expect(bitOpXor.Val()).To(Equal(int64(1)))
-
- get := client.Get("dest")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("\xf0"))
- })
-
- It("should BitOpNot", func() {
- set := client.Set("key1", "\x00", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- bitOpNot := client.BitOpNot("dest", "key1")
- Expect(bitOpNot.Err()).NotTo(HaveOccurred())
- Expect(bitOpNot.Val()).To(Equal(int64(1)))
-
- get := client.Get("dest")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("\xff"))
- })
-
- It("should BitPos", func() {
- err := client.Set("mykey", "\xff\xf0\x00", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- pos, err := client.BitPos("mykey", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(12)))
-
- pos, err = client.BitPos("mykey", 1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(0)))
-
- pos, err = client.BitPos("mykey", 0, 2).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(16)))
-
- pos, err = client.BitPos("mykey", 1, 2).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(-1)))
-
- pos, err = client.BitPos("mykey", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(16)))
-
- pos, err = client.BitPos("mykey", 1, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(-1)))
-
- pos, err = client.BitPos("mykey", 0, 2, 1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(-1)))
-
- pos, err = client.BitPos("mykey", 0, 0, -3).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(-1)))
-
- pos, err = client.BitPos("mykey", 0, 0, 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(Equal(int64(-1)))
- })
-
- It("should Decr", func() {
- set := client.Set("key", "10", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- decr := client.Decr("key")
- Expect(decr.Err()).NotTo(HaveOccurred())
- Expect(decr.Val()).To(Equal(int64(9)))
-
- set = client.Set("key", "234293482390480948029348230948", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- decr = client.Decr("key")
- Expect(decr.Err()).To(MatchError("ERR value is not an integer or out of range"))
- Expect(decr.Val()).To(Equal(int64(0)))
- })
-
- It("should DecrBy", func() {
- set := client.Set("key", "10", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- decrBy := client.DecrBy("key", 5)
- Expect(decrBy.Err()).NotTo(HaveOccurred())
- Expect(decrBy.Val()).To(Equal(int64(5)))
- })
-
- It("should Get", func() {
- get := client.Get("_")
- Expect(get.Err()).To(Equal(redis.Nil))
- Expect(get.Val()).To(Equal(""))
-
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- get = client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should GetBit", func() {
- setBit := client.SetBit("key", 7, 1)
- Expect(setBit.Err()).NotTo(HaveOccurred())
- Expect(setBit.Val()).To(Equal(int64(0)))
-
- getBit := client.GetBit("key", 0)
- Expect(getBit.Err()).NotTo(HaveOccurred())
- Expect(getBit.Val()).To(Equal(int64(0)))
-
- getBit = client.GetBit("key", 7)
- Expect(getBit.Err()).NotTo(HaveOccurred())
- Expect(getBit.Val()).To(Equal(int64(1)))
-
- getBit = client.GetBit("key", 100)
- Expect(getBit.Err()).NotTo(HaveOccurred())
- Expect(getBit.Val()).To(Equal(int64(0)))
- })
-
- It("should GetRange", func() {
- set := client.Set("key", "This is a string", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- getRange := client.GetRange("key", 0, 3)
- Expect(getRange.Err()).NotTo(HaveOccurred())
- Expect(getRange.Val()).To(Equal("This"))
-
- getRange = client.GetRange("key", -3, -1)
- Expect(getRange.Err()).NotTo(HaveOccurred())
- Expect(getRange.Val()).To(Equal("ing"))
-
- getRange = client.GetRange("key", 0, -1)
- Expect(getRange.Err()).NotTo(HaveOccurred())
- Expect(getRange.Val()).To(Equal("This is a string"))
-
- getRange = client.GetRange("key", 10, 100)
- Expect(getRange.Err()).NotTo(HaveOccurred())
- Expect(getRange.Val()).To(Equal("string"))
- })
-
- It("should GetSet", func() {
- incr := client.Incr("key")
- Expect(incr.Err()).NotTo(HaveOccurred())
- Expect(incr.Val()).To(Equal(int64(1)))
-
- getSet := client.GetSet("key", "0")
- Expect(getSet.Err()).NotTo(HaveOccurred())
- Expect(getSet.Val()).To(Equal("1"))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("0"))
- })
-
- It("should Incr", func() {
- set := client.Set("key", "10", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- incr := client.Incr("key")
- Expect(incr.Err()).NotTo(HaveOccurred())
- Expect(incr.Val()).To(Equal(int64(11)))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("11"))
- })
-
- It("should IncrBy", func() {
- set := client.Set("key", "10", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- incrBy := client.IncrBy("key", 5)
- Expect(incrBy.Err()).NotTo(HaveOccurred())
- Expect(incrBy.Val()).To(Equal(int64(15)))
- })
-
- It("should IncrByFloat", func() {
- set := client.Set("key", "10.50", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- incrByFloat := client.IncrByFloat("key", 0.1)
- Expect(incrByFloat.Err()).NotTo(HaveOccurred())
- Expect(incrByFloat.Val()).To(Equal(10.6))
-
- set = client.Set("key", "5.0e3", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- incrByFloat = client.IncrByFloat("key", 2.0e2)
- Expect(incrByFloat.Err()).NotTo(HaveOccurred())
- Expect(incrByFloat.Val()).To(Equal(float64(5200)))
- })
-
- It("should IncrByFloatOverflow", func() {
- incrByFloat := client.IncrByFloat("key", 996945661)
- Expect(incrByFloat.Err()).NotTo(HaveOccurred())
- Expect(incrByFloat.Val()).To(Equal(float64(996945661)))
- })
-
- It("should MSetMGet", func() {
- mSet := client.MSet("key1", "hello1", "key2", "hello2")
- Expect(mSet.Err()).NotTo(HaveOccurred())
- Expect(mSet.Val()).To(Equal("OK"))
-
- mGet := client.MGet("key1", "key2", "_")
- Expect(mGet.Err()).NotTo(HaveOccurred())
- Expect(mGet.Val()).To(Equal([]interface{}{"hello1", "hello2", nil}))
- })
-
- It("should MSetNX", func() {
- mSetNX := client.MSetNX("key1", "hello1", "key2", "hello2")
- Expect(mSetNX.Err()).NotTo(HaveOccurred())
- Expect(mSetNX.Val()).To(Equal(true))
-
- mSetNX = client.MSetNX("key2", "hello1", "key3", "hello2")
- Expect(mSetNX.Err()).NotTo(HaveOccurred())
- Expect(mSetNX.Val()).To(Equal(false))
- })
-
- It("should Set with expiration", func() {
- err := client.Set("key", "hello", 100*time.Millisecond).Err()
- Expect(err).NotTo(HaveOccurred())
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello"))
-
- Eventually(func() error {
- return client.Get("foo").Err()
- }, "1s", "100ms").Should(Equal(redis.Nil))
- })
-
- It("should SetGet", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should SetNX", func() {
- setNX := client.SetNX("key", "hello", 0)
- Expect(setNX.Err()).NotTo(HaveOccurred())
- Expect(setNX.Val()).To(Equal(true))
-
- setNX = client.SetNX("key", "hello2", 0)
- Expect(setNX.Err()).NotTo(HaveOccurred())
- Expect(setNX.Val()).To(Equal(false))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello"))
- })
-
- It("should SetNX with expiration", func() {
- isSet, err := client.SetNX("key", "hello", time.Second).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(true))
-
- isSet, err = client.SetNX("key", "hello2", time.Second).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(false))
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello"))
- })
-
- It("should SetXX", func() {
- isSet, err := client.SetXX("key", "hello2", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(false))
-
- err = client.Set("key", "hello", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- isSet, err = client.SetXX("key", "hello2", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(true))
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello2"))
- })
-
- It("should SetXX with expiration", func() {
- isSet, err := client.SetXX("key", "hello2", time.Second).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(false))
-
- err = client.Set("key", "hello", time.Second).Err()
- Expect(err).NotTo(HaveOccurred())
-
- isSet, err = client.SetXX("key", "hello2", time.Second).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(isSet).To(Equal(true))
-
- val, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("hello2"))
- })
-
- It("should SetRange", func() {
- set := client.Set("key", "Hello World", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- range_ := client.SetRange("key", 6, "Redis")
- Expect(range_.Err()).NotTo(HaveOccurred())
- Expect(range_.Val()).To(Equal(int64(11)))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("Hello Redis"))
- })
-
- It("should StrLen", func() {
- set := client.Set("key", "hello", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- strLen := client.StrLen("key")
- Expect(strLen.Err()).NotTo(HaveOccurred())
- Expect(strLen.Val()).To(Equal(int64(5)))
-
- strLen = client.StrLen("_")
- Expect(strLen.Err()).NotTo(HaveOccurred())
- Expect(strLen.Val()).To(Equal(int64(0)))
- })
-
- })
-
- Describe("hashes", func() {
-
- It("should HDel", func() {
- hSet := client.HSet("hash", "key", "hello")
- Expect(hSet.Err()).NotTo(HaveOccurred())
-
- hDel := client.HDel("hash", "key")
- Expect(hDel.Err()).NotTo(HaveOccurred())
- Expect(hDel.Val()).To(Equal(int64(1)))
-
- hDel = client.HDel("hash", "key")
- Expect(hDel.Err()).NotTo(HaveOccurred())
- Expect(hDel.Val()).To(Equal(int64(0)))
- })
-
- It("should HExists", func() {
- hSet := client.HSet("hash", "key", "hello")
- Expect(hSet.Err()).NotTo(HaveOccurred())
-
- hExists := client.HExists("hash", "key")
- Expect(hExists.Err()).NotTo(HaveOccurred())
- Expect(hExists.Val()).To(Equal(true))
-
- hExists = client.HExists("hash", "key1")
- Expect(hExists.Err()).NotTo(HaveOccurred())
- Expect(hExists.Val()).To(Equal(false))
- })
-
- It("should HGet", func() {
- hSet := client.HSet("hash", "key", "hello")
- Expect(hSet.Err()).NotTo(HaveOccurred())
-
- hGet := client.HGet("hash", "key")
- Expect(hGet.Err()).NotTo(HaveOccurred())
- Expect(hGet.Val()).To(Equal("hello"))
-
- hGet = client.HGet("hash", "key1")
- Expect(hGet.Err()).To(Equal(redis.Nil))
- Expect(hGet.Val()).To(Equal(""))
- })
-
- It("should HGetAll", func() {
- err := client.HSet("hash", "key1", "hello1").Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.HSet("hash", "key2", "hello2").Err()
- Expect(err).NotTo(HaveOccurred())
-
- m, err := client.HGetAll("hash").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(m).To(Equal(map[string]string{"key1": "hello1", "key2": "hello2"}))
- })
-
- It("should HIncrBy", func() {
- hSet := client.HSet("hash", "key", "5")
- Expect(hSet.Err()).NotTo(HaveOccurred())
-
- hIncrBy := client.HIncrBy("hash", "key", 1)
- Expect(hIncrBy.Err()).NotTo(HaveOccurred())
- Expect(hIncrBy.Val()).To(Equal(int64(6)))
-
- hIncrBy = client.HIncrBy("hash", "key", -1)
- Expect(hIncrBy.Err()).NotTo(HaveOccurred())
- Expect(hIncrBy.Val()).To(Equal(int64(5)))
-
- hIncrBy = client.HIncrBy("hash", "key", -10)
- Expect(hIncrBy.Err()).NotTo(HaveOccurred())
- Expect(hIncrBy.Val()).To(Equal(int64(-5)))
- })
-
- It("should HIncrByFloat", func() {
- hSet := client.HSet("hash", "field", "10.50")
- Expect(hSet.Err()).NotTo(HaveOccurred())
- Expect(hSet.Val()).To(Equal(true))
-
- hIncrByFloat := client.HIncrByFloat("hash", "field", 0.1)
- Expect(hIncrByFloat.Err()).NotTo(HaveOccurred())
- Expect(hIncrByFloat.Val()).To(Equal(10.6))
-
- hSet = client.HSet("hash", "field", "5.0e3")
- Expect(hSet.Err()).NotTo(HaveOccurred())
- Expect(hSet.Val()).To(Equal(false))
-
- hIncrByFloat = client.HIncrByFloat("hash", "field", 2.0e2)
- Expect(hIncrByFloat.Err()).NotTo(HaveOccurred())
- Expect(hIncrByFloat.Val()).To(Equal(float64(5200)))
- })
-
- It("should HKeys", func() {
- hkeys := client.HKeys("hash")
- Expect(hkeys.Err()).NotTo(HaveOccurred())
- Expect(hkeys.Val()).To(Equal([]string{}))
-
- hset := client.HSet("hash", "key1", "hello1")
- Expect(hset.Err()).NotTo(HaveOccurred())
- hset = client.HSet("hash", "key2", "hello2")
- Expect(hset.Err()).NotTo(HaveOccurred())
-
- hkeys = client.HKeys("hash")
- Expect(hkeys.Err()).NotTo(HaveOccurred())
- Expect(hkeys.Val()).To(Equal([]string{"key1", "key2"}))
- })
-
- It("should HLen", func() {
- hSet := client.HSet("hash", "key1", "hello1")
- Expect(hSet.Err()).NotTo(HaveOccurred())
- hSet = client.HSet("hash", "key2", "hello2")
- Expect(hSet.Err()).NotTo(HaveOccurred())
-
- hLen := client.HLen("hash")
- Expect(hLen.Err()).NotTo(HaveOccurred())
- Expect(hLen.Val()).To(Equal(int64(2)))
- })
-
- It("should HMGet", func() {
- err := client.HSet("hash", "key1", "hello1").Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.HSet("hash", "key2", "hello2").Err()
- Expect(err).NotTo(HaveOccurred())
-
- vals, err := client.HMGet("hash", "key1", "key2", "_").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]interface{}{"hello1", "hello2", nil}))
- })
-
- It("should HMSet", func() {
- ok, err := client.HMSet("hash", map[string]interface{}{
- "key1": "hello1",
- "key2": "hello2",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(ok).To(Equal("OK"))
-
- v, err := client.HGet("hash", "key1").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(v).To(Equal("hello1"))
-
- v, err = client.HGet("hash", "key2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(v).To(Equal("hello2"))
- })
-
- It("should HSet", func() {
- hSet := client.HSet("hash", "key", "hello")
- Expect(hSet.Err()).NotTo(HaveOccurred())
- Expect(hSet.Val()).To(Equal(true))
-
- hGet := client.HGet("hash", "key")
- Expect(hGet.Err()).NotTo(HaveOccurred())
- Expect(hGet.Val()).To(Equal("hello"))
- })
-
- It("should HSetNX", func() {
- hSetNX := client.HSetNX("hash", "key", "hello")
- Expect(hSetNX.Err()).NotTo(HaveOccurred())
- Expect(hSetNX.Val()).To(Equal(true))
-
- hSetNX = client.HSetNX("hash", "key", "hello")
- Expect(hSetNX.Err()).NotTo(HaveOccurred())
- Expect(hSetNX.Val()).To(Equal(false))
-
- hGet := client.HGet("hash", "key")
- Expect(hGet.Err()).NotTo(HaveOccurred())
- Expect(hGet.Val()).To(Equal("hello"))
- })
-
- It("should HVals", func() {
- err := client.HSet("hash", "key1", "hello1").Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.HSet("hash", "key2", "hello2").Err()
- Expect(err).NotTo(HaveOccurred())
-
- v, err := client.HVals("hash").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(v).To(Equal([]string{"hello1", "hello2"}))
-
- var slice []string
- err = client.HVals("hash").ScanSlice(&slice)
- Expect(err).NotTo(HaveOccurred())
- Expect(slice).To(Equal([]string{"hello1", "hello2"}))
- })
-
- })
-
- Describe("hyperloglog", func() {
- It("should PFMerge", func() {
- pfAdd := client.PFAdd("hll1", "1", "2", "3", "4", "5")
- Expect(pfAdd.Err()).NotTo(HaveOccurred())
-
- pfCount := client.PFCount("hll1")
- Expect(pfCount.Err()).NotTo(HaveOccurred())
- Expect(pfCount.Val()).To(Equal(int64(5)))
-
- pfAdd = client.PFAdd("hll2", "a", "b", "c", "d", "e")
- Expect(pfAdd.Err()).NotTo(HaveOccurred())
-
- pfMerge := client.PFMerge("hllMerged", "hll1", "hll2")
- Expect(pfMerge.Err()).NotTo(HaveOccurred())
-
- pfCount = client.PFCount("hllMerged")
- Expect(pfCount.Err()).NotTo(HaveOccurred())
- Expect(pfCount.Val()).To(Equal(int64(10)))
-
- pfCount = client.PFCount("hll1", "hll2")
- Expect(pfCount.Err()).NotTo(HaveOccurred())
- Expect(pfCount.Val()).To(Equal(int64(10)))
- })
- })
-
- Describe("lists", func() {
-
- It("should BLPop", func() {
- rPush := client.RPush("list1", "a", "b", "c")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- bLPop := client.BLPop(0, "list1", "list2")
- Expect(bLPop.Err()).NotTo(HaveOccurred())
- Expect(bLPop.Val()).To(Equal([]string{"list1", "a"}))
- })
-
- It("should BLPopBlocks", func() {
- started := make(chan bool)
- done := make(chan bool)
- go func() {
- defer GinkgoRecover()
-
- started <- true
- bLPop := client.BLPop(0, "list")
- Expect(bLPop.Err()).NotTo(HaveOccurred())
- Expect(bLPop.Val()).To(Equal([]string{"list", "a"}))
- done <- true
- }()
- <-started
-
- select {
- case <-done:
- Fail("BLPop is not blocked")
- case <-time.After(time.Second):
- // ok
- }
-
- rPush := client.RPush("list", "a")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- select {
- case <-done:
- // ok
- case <-time.After(time.Second):
- Fail("BLPop is still blocked")
- }
- })
-
- It("should BLPop timeout", func() {
- val, err := client.BLPop(time.Second, "list1").Result()
- Expect(err).To(Equal(redis.Nil))
- Expect(val).To(BeNil())
-
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
-
- stats := client.PoolStats()
- Expect(stats.Hits).To(Equal(uint32(1)))
- Expect(stats.Misses).To(Equal(uint32(2)))
- Expect(stats.Timeouts).To(Equal(uint32(0)))
- })
-
- It("should BRPop", func() {
- rPush := client.RPush("list1", "a", "b", "c")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- bRPop := client.BRPop(0, "list1", "list2")
- Expect(bRPop.Err()).NotTo(HaveOccurred())
- Expect(bRPop.Val()).To(Equal([]string{"list1", "c"}))
- })
-
- It("should BRPop blocks", func() {
- started := make(chan bool)
- done := make(chan bool)
- go func() {
- defer GinkgoRecover()
-
- started <- true
- brpop := client.BRPop(0, "list")
- Expect(brpop.Err()).NotTo(HaveOccurred())
- Expect(brpop.Val()).To(Equal([]string{"list", "a"}))
- done <- true
- }()
- <-started
-
- select {
- case <-done:
- Fail("BRPop is not blocked")
- case <-time.After(time.Second):
- // ok
- }
-
- rPush := client.RPush("list", "a")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- select {
- case <-done:
- // ok
- case <-time.After(time.Second):
- Fail("BRPop is still blocked")
- // ok
- }
- })
-
- It("should BRPopLPush", func() {
- _, err := client.BRPopLPush("list1", "list2", time.Second).Result()
- Expect(err).To(Equal(redis.Nil))
-
- err = client.RPush("list1", "a", "b", "c").Err()
- Expect(err).NotTo(HaveOccurred())
-
- v, err := client.BRPopLPush("list1", "list2", 0).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(v).To(Equal("c"))
- })
-
- It("should LIndex", func() {
- lPush := client.LPush("list", "World")
- Expect(lPush.Err()).NotTo(HaveOccurred())
- lPush = client.LPush("list", "Hello")
- Expect(lPush.Err()).NotTo(HaveOccurred())
-
- lIndex := client.LIndex("list", 0)
- Expect(lIndex.Err()).NotTo(HaveOccurred())
- Expect(lIndex.Val()).To(Equal("Hello"))
-
- lIndex = client.LIndex("list", -1)
- Expect(lIndex.Err()).NotTo(HaveOccurred())
- Expect(lIndex.Val()).To(Equal("World"))
-
- lIndex = client.LIndex("list", 3)
- Expect(lIndex.Err()).To(Equal(redis.Nil))
- Expect(lIndex.Val()).To(Equal(""))
- })
-
- It("should LInsert", func() {
- rPush := client.RPush("list", "Hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "World")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lInsert := client.LInsert("list", "BEFORE", "World", "There")
- Expect(lInsert.Err()).NotTo(HaveOccurred())
- Expect(lInsert.Val()).To(Equal(int64(3)))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"Hello", "There", "World"}))
- })
-
- It("should LLen", func() {
- lPush := client.LPush("list", "World")
- Expect(lPush.Err()).NotTo(HaveOccurred())
- lPush = client.LPush("list", "Hello")
- Expect(lPush.Err()).NotTo(HaveOccurred())
-
- lLen := client.LLen("list")
- Expect(lLen.Err()).NotTo(HaveOccurred())
- Expect(lLen.Val()).To(Equal(int64(2)))
- })
-
- It("should LPop", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lPop := client.LPop("list")
- Expect(lPop.Err()).NotTo(HaveOccurred())
- Expect(lPop.Val()).To(Equal("one"))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"two", "three"}))
- })
-
- It("should LPush", func() {
- lPush := client.LPush("list", "World")
- Expect(lPush.Err()).NotTo(HaveOccurred())
- lPush = client.LPush("list", "Hello")
- Expect(lPush.Err()).NotTo(HaveOccurred())
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"Hello", "World"}))
- })
-
- It("should LPushX", func() {
- lPush := client.LPush("list", "World")
- Expect(lPush.Err()).NotTo(HaveOccurred())
-
- lPushX := client.LPushX("list", "Hello")
- Expect(lPushX.Err()).NotTo(HaveOccurred())
- Expect(lPushX.Val()).To(Equal(int64(2)))
-
- lPushX = client.LPushX("list2", "Hello")
- Expect(lPushX.Err()).NotTo(HaveOccurred())
- Expect(lPushX.Val()).To(Equal(int64(0)))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"Hello", "World"}))
-
- lRange = client.LRange("list2", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{}))
- })
-
- It("should LRange", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lRange := client.LRange("list", 0, 0)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"one"}))
-
- lRange = client.LRange("list", -3, 2)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"one", "two", "three"}))
-
- lRange = client.LRange("list", -100, 100)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"one", "two", "three"}))
-
- lRange = client.LRange("list", 5, 10)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{}))
- })
-
- It("should LRem", func() {
- rPush := client.RPush("list", "hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "key")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lRem := client.LRem("list", -2, "hello")
- Expect(lRem.Err()).NotTo(HaveOccurred())
- Expect(lRem.Val()).To(Equal(int64(2)))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"hello", "key"}))
- })
-
- It("should LSet", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lSet := client.LSet("list", 0, "four")
- Expect(lSet.Err()).NotTo(HaveOccurred())
- Expect(lSet.Val()).To(Equal("OK"))
-
- lSet = client.LSet("list", -2, "five")
- Expect(lSet.Err()).NotTo(HaveOccurred())
- Expect(lSet.Val()).To(Equal("OK"))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"four", "five", "three"}))
- })
-
- It("should LTrim", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- lTrim := client.LTrim("list", 1, -1)
- Expect(lTrim.Err()).NotTo(HaveOccurred())
- Expect(lTrim.Val()).To(Equal("OK"))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"two", "three"}))
- })
-
- It("should RPop", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- rPop := client.RPop("list")
- Expect(rPop.Err()).NotTo(HaveOccurred())
- Expect(rPop.Val()).To(Equal("three"))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"one", "two"}))
- })
-
- It("should RPopLPush", func() {
- rPush := client.RPush("list", "one")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "two")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- rPush = client.RPush("list", "three")
- Expect(rPush.Err()).NotTo(HaveOccurred())
-
- rPopLPush := client.RPopLPush("list", "list2")
- Expect(rPopLPush.Err()).NotTo(HaveOccurred())
- Expect(rPopLPush.Val()).To(Equal("three"))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"one", "two"}))
-
- lRange = client.LRange("list2", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"three"}))
- })
-
- It("should RPush", func() {
- rPush := client.RPush("list", "Hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- Expect(rPush.Val()).To(Equal(int64(1)))
-
- rPush = client.RPush("list", "World")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- Expect(rPush.Val()).To(Equal(int64(2)))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"Hello", "World"}))
- })
-
- It("should RPushX", func() {
- rPush := client.RPush("list", "Hello")
- Expect(rPush.Err()).NotTo(HaveOccurred())
- Expect(rPush.Val()).To(Equal(int64(1)))
-
- rPushX := client.RPushX("list", "World")
- Expect(rPushX.Err()).NotTo(HaveOccurred())
- Expect(rPushX.Val()).To(Equal(int64(2)))
-
- rPushX = client.RPushX("list2", "World")
- Expect(rPushX.Err()).NotTo(HaveOccurred())
- Expect(rPushX.Val()).To(Equal(int64(0)))
-
- lRange := client.LRange("list", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{"Hello", "World"}))
-
- lRange = client.LRange("list2", 0, -1)
- Expect(lRange.Err()).NotTo(HaveOccurred())
- Expect(lRange.Val()).To(Equal([]string{}))
- })
-
- })
-
- Describe("sets", func() {
-
- It("should SAdd", func() {
- sAdd := client.SAdd("set", "Hello")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- Expect(sAdd.Val()).To(Equal(int64(1)))
-
- sAdd = client.SAdd("set", "World")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- Expect(sAdd.Val()).To(Equal(int64(1)))
-
- sAdd = client.SAdd("set", "World")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- Expect(sAdd.Val()).To(Equal(int64(0)))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(ConsistOf([]string{"Hello", "World"}))
- })
-
- It("should SCard", func() {
- sAdd := client.SAdd("set", "Hello")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- Expect(sAdd.Val()).To(Equal(int64(1)))
-
- sAdd = client.SAdd("set", "World")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- Expect(sAdd.Val()).To(Equal(int64(1)))
-
- sCard := client.SCard("set")
- Expect(sCard.Err()).NotTo(HaveOccurred())
- Expect(sCard.Val()).To(Equal(int64(2)))
- })
-
- It("should SDiff", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sDiff := client.SDiff("set1", "set2")
- Expect(sDiff.Err()).NotTo(HaveOccurred())
- Expect(sDiff.Val()).To(ConsistOf([]string{"a", "b"}))
- })
-
- It("should SDiffStore", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sDiffStore := client.SDiffStore("set", "set1", "set2")
- Expect(sDiffStore.Err()).NotTo(HaveOccurred())
- Expect(sDiffStore.Val()).To(Equal(int64(2)))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(ConsistOf([]string{"a", "b"}))
- })
-
- It("should SInter", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sInter := client.SInter("set1", "set2")
- Expect(sInter.Err()).NotTo(HaveOccurred())
- Expect(sInter.Val()).To(Equal([]string{"c"}))
- })
-
- It("should SInterStore", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sInterStore := client.SInterStore("set", "set1", "set2")
- Expect(sInterStore.Err()).NotTo(HaveOccurred())
- Expect(sInterStore.Val()).To(Equal(int64(1)))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(Equal([]string{"c"}))
- })
-
- It("should IsMember", func() {
- sAdd := client.SAdd("set", "one")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sIsMember := client.SIsMember("set", "one")
- Expect(sIsMember.Err()).NotTo(HaveOccurred())
- Expect(sIsMember.Val()).To(Equal(true))
-
- sIsMember = client.SIsMember("set", "two")
- Expect(sIsMember.Err()).NotTo(HaveOccurred())
- Expect(sIsMember.Val()).To(Equal(false))
- })
-
- It("should SMembers", func() {
- sAdd := client.SAdd("set", "Hello")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "World")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(ConsistOf([]string{"Hello", "World"}))
- })
-
- It("should SMembersMap", func() {
- sAdd := client.SAdd("set", "Hello")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "World")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sMembersMap := client.SMembersMap("set")
- Expect(sMembersMap.Err()).NotTo(HaveOccurred())
- Expect(sMembersMap.Val()).To(Equal(map[string]struct{}{"Hello": struct{}{}, "World": struct{}{}}))
- })
-
- It("should SMove", func() {
- sAdd := client.SAdd("set1", "one")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "two")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "three")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sMove := client.SMove("set1", "set2", "two")
- Expect(sMove.Err()).NotTo(HaveOccurred())
- Expect(sMove.Val()).To(Equal(true))
-
- sMembers := client.SMembers("set1")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(Equal([]string{"one"}))
-
- sMembers = client.SMembers("set2")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(ConsistOf([]string{"three", "two"}))
- })
-
- It("should SPop", func() {
- sAdd := client.SAdd("set", "one")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "two")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "three")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sPop := client.SPop("set")
- Expect(sPop.Err()).NotTo(HaveOccurred())
- Expect(sPop.Val()).NotTo(Equal(""))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(HaveLen(2))
-
- })
-
- It("should SPopN", func() {
- sAdd := client.SAdd("set", "one")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "two")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "three")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "four")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sPopN := client.SPopN("set", 1)
- Expect(sPopN.Err()).NotTo(HaveOccurred())
- Expect(sPopN.Val()).NotTo(Equal([]string{""}))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(HaveLen(3))
-
- sPopN = client.SPopN("set", 4)
- Expect(sPopN.Err()).NotTo(HaveOccurred())
- Expect(sPopN.Val()).To(HaveLen(3))
-
- sMembers = client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(HaveLen(0))
- })
-
- It("should SRandMember and SRandMemberN", func() {
- err := client.SAdd("set", "one").Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.SAdd("set", "two").Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.SAdd("set", "three").Err()
- Expect(err).NotTo(HaveOccurred())
-
- members, err := client.SMembers("set").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(members).To(HaveLen(3))
-
- member, err := client.SRandMember("set").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(member).NotTo(Equal(""))
-
- members, err = client.SRandMemberN("set", 2).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(members).To(HaveLen(2))
- })
-
- It("should SRem", func() {
- sAdd := client.SAdd("set", "one")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "two")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set", "three")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sRem := client.SRem("set", "one")
- Expect(sRem.Err()).NotTo(HaveOccurred())
- Expect(sRem.Val()).To(Equal(int64(1)))
-
- sRem = client.SRem("set", "four")
- Expect(sRem.Err()).NotTo(HaveOccurred())
- Expect(sRem.Val()).To(Equal(int64(0)))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(ConsistOf([]string{"three", "two"}))
- })
-
- It("should SUnion", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sUnion := client.SUnion("set1", "set2")
- Expect(sUnion.Err()).NotTo(HaveOccurred())
- Expect(sUnion.Val()).To(HaveLen(5))
- })
-
- It("should SUnionStore", func() {
- sAdd := client.SAdd("set1", "a")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "b")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set1", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sAdd = client.SAdd("set2", "c")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "d")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
- sAdd = client.SAdd("set2", "e")
- Expect(sAdd.Err()).NotTo(HaveOccurred())
-
- sUnionStore := client.SUnionStore("set", "set1", "set2")
- Expect(sUnionStore.Err()).NotTo(HaveOccurred())
- Expect(sUnionStore.Val()).To(Equal(int64(5)))
-
- sMembers := client.SMembers("set")
- Expect(sMembers.Err()).NotTo(HaveOccurred())
- Expect(sMembers.Val()).To(HaveLen(5))
- })
-
- })
-
- Describe("sorted sets", func() {
-
- It("should ZAdd", func() {
- added, err := client.ZAdd("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{1, "uno"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{2, "two"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{3, "two"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(0)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}, {1, "uno"}, {3, "two"}}))
- })
-
- It("should ZAdd bytes", func() {
- added, err := client.ZAdd("zset", redis.Z{1, []byte("one")}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{1, []byte("uno")}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{2, []byte("two")}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAdd("zset", redis.Z{3, []byte("two")}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(0)))
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}, {1, "uno"}, {3, "two"}}))
- })
-
- It("should ZAddNX", func() {
- added, err := client.ZAddNX("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
-
- added, err = client.ZAddNX("zset", redis.Z{2, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(0)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
- })
-
- It("should ZAddXX", func() {
- added, err := client.ZAddXX("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(0)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(BeEmpty())
-
- added, err = client.ZAdd("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- added, err = client.ZAddXX("zset", redis.Z{2, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(0)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{2, "one"}}))
- })
-
- It("should ZAddCh", func() {
- changed, err := client.ZAddCh("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(1)))
-
- changed, err = client.ZAddCh("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(0)))
- })
-
- It("should ZAddNXCh", func() {
- changed, err := client.ZAddNXCh("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(1)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
-
- changed, err = client.ZAddNXCh("zset", redis.Z{2, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(0)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
- })
-
- It("should ZAddXXCh", func() {
- changed, err := client.ZAddXXCh("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(0)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(BeEmpty())
-
- added, err := client.ZAdd("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- changed, err = client.ZAddXXCh("zset", redis.Z{2, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(changed).To(Equal(int64(1)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{2, "one"}}))
- })
-
- It("should ZIncr", func() {
- score, err := client.ZIncr("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(score).To(Equal(float64(1)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
-
- score, err = client.ZIncr("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(score).To(Equal(float64(2)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{2, "one"}}))
- })
-
- It("should ZIncrNX", func() {
- score, err := client.ZIncrNX("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(score).To(Equal(float64(1)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
-
- score, err = client.ZIncrNX("zset", redis.Z{1, "one"}).Result()
- Expect(err).To(Equal(redis.Nil))
- Expect(score).To(Equal(float64(0)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{1, "one"}}))
- })
-
- It("should ZIncrXX", func() {
- score, err := client.ZIncrXX("zset", redis.Z{1, "one"}).Result()
- Expect(err).To(Equal(redis.Nil))
- Expect(score).To(Equal(float64(0)))
-
- vals, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(BeEmpty())
-
- added, err := client.ZAdd("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(added).To(Equal(int64(1)))
-
- score, err = client.ZIncrXX("zset", redis.Z{1, "one"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(score).To(Equal(float64(2)))
-
- vals, err = client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{2, "one"}}))
- })
-
- It("should ZCard", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zCard := client.ZCard("zset")
- Expect(zCard.Err()).NotTo(HaveOccurred())
- Expect(zCard.Val()).To(Equal(int64(2)))
- })
-
- It("should ZCount", func() {
- err := client.ZAdd("zset", redis.Z{1, "one"}).Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.ZAdd("zset", redis.Z{2, "two"}).Err()
- Expect(err).NotTo(HaveOccurred())
- err = client.ZAdd("zset", redis.Z{3, "three"}).Err()
- Expect(err).NotTo(HaveOccurred())
-
- count, err := client.ZCount("zset", "-inf", "+inf").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(count).To(Equal(int64(3)))
-
- count, err = client.ZCount("zset", "(1", "3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(count).To(Equal(int64(2)))
-
- count, err = client.ZLexCount("zset", "-", "+").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(count).To(Equal(int64(3)))
- })
-
- It("should ZIncrBy", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zIncrBy := client.ZIncrBy("zset", 2, "one")
- Expect(zIncrBy.Err()).NotTo(HaveOccurred())
- Expect(zIncrBy.Val()).To(Equal(float64(3)))
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}, {3, "one"}}))
- })
-
- It("should ZInterStore", func() {
- zAdd := client.ZAdd("zset1", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset1", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zAdd = client.ZAdd("zset2", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset2", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset3", redis.Z{3, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zInterStore := client.ZInterStore(
- "out", redis.ZStore{Weights: []float64{2, 3}}, "zset1", "zset2")
- Expect(zInterStore.Err()).NotTo(HaveOccurred())
- Expect(zInterStore.Val()).To(Equal(int64(2)))
-
- val, err := client.ZRangeWithScores("out", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{5, "one"}, {10, "two"}}))
- })
-
- It("should ZRange", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRange := client.ZRange("zset", 0, -1)
- Expect(zRange.Err()).NotTo(HaveOccurred())
- Expect(zRange.Val()).To(Equal([]string{"one", "two", "three"}))
-
- zRange = client.ZRange("zset", 2, 3)
- Expect(zRange.Err()).NotTo(HaveOccurred())
- Expect(zRange.Val()).To(Equal([]string{"three"}))
-
- zRange = client.ZRange("zset", -2, -1)
- Expect(zRange.Err()).NotTo(HaveOccurred())
- Expect(zRange.Val()).To(Equal([]string{"two", "three"}))
- })
-
- It("should ZRangeWithScores", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}, {2, "two"}, {3, "three"}}))
-
- val, err = client.ZRangeWithScores("zset", 2, 3).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{3, "three"}}))
-
- val, err = client.ZRangeWithScores("zset", -2, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}, {3, "three"}}))
- })
-
- It("should ZRangeByScore", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRangeByScore := client.ZRangeByScore("zset", redis.ZRangeBy{
- Min: "-inf",
- Max: "+inf",
- })
- Expect(zRangeByScore.Err()).NotTo(HaveOccurred())
- Expect(zRangeByScore.Val()).To(Equal([]string{"one", "two", "three"}))
-
- zRangeByScore = client.ZRangeByScore("zset", redis.ZRangeBy{
- Min: "1",
- Max: "2",
- })
- Expect(zRangeByScore.Err()).NotTo(HaveOccurred())
- Expect(zRangeByScore.Val()).To(Equal([]string{"one", "two"}))
-
- zRangeByScore = client.ZRangeByScore("zset", redis.ZRangeBy{
- Min: "(1",
- Max: "2",
- })
- Expect(zRangeByScore.Err()).NotTo(HaveOccurred())
- Expect(zRangeByScore.Val()).To(Equal([]string{"two"}))
-
- zRangeByScore = client.ZRangeByScore("zset", redis.ZRangeBy{
- Min: "(1",
- Max: "(2",
- })
- Expect(zRangeByScore.Err()).NotTo(HaveOccurred())
- Expect(zRangeByScore.Val()).To(Equal([]string{}))
- })
-
- It("should ZRangeByLex", func() {
- zAdd := client.ZAdd("zset", redis.Z{0, "a"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{0, "b"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{0, "c"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRangeByLex := client.ZRangeByLex("zset", redis.ZRangeBy{
- Min: "-",
- Max: "+",
- })
- Expect(zRangeByLex.Err()).NotTo(HaveOccurred())
- Expect(zRangeByLex.Val()).To(Equal([]string{"a", "b", "c"}))
-
- zRangeByLex = client.ZRangeByLex("zset", redis.ZRangeBy{
- Min: "[a",
- Max: "[b",
- })
- Expect(zRangeByLex.Err()).NotTo(HaveOccurred())
- Expect(zRangeByLex.Val()).To(Equal([]string{"a", "b"}))
-
- zRangeByLex = client.ZRangeByLex("zset", redis.ZRangeBy{
- Min: "(a",
- Max: "[b",
- })
- Expect(zRangeByLex.Err()).NotTo(HaveOccurred())
- Expect(zRangeByLex.Val()).To(Equal([]string{"b"}))
-
- zRangeByLex = client.ZRangeByLex("zset", redis.ZRangeBy{
- Min: "(a",
- Max: "(b",
- })
- Expect(zRangeByLex.Err()).NotTo(HaveOccurred())
- Expect(zRangeByLex.Val()).To(Equal([]string{}))
- })
-
- It("should ZRangeByScoreWithScoresMap", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- val, err := client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{
- Min: "-inf",
- Max: "+inf",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}, {2, "two"}, {3, "three"}}))
-
- val, err = client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{
- Min: "1",
- Max: "2",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}, {2, "two"}}))
-
- val, err = client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{
- Min: "(1",
- Max: "2",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}}))
-
- val, err = client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{
- Min: "(1",
- Max: "(2",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{}))
- })
-
- It("should ZRank", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRank := client.ZRank("zset", "three")
- Expect(zRank.Err()).NotTo(HaveOccurred())
- Expect(zRank.Val()).To(Equal(int64(2)))
-
- zRank = client.ZRank("zset", "four")
- Expect(zRank.Err()).To(Equal(redis.Nil))
- Expect(zRank.Val()).To(Equal(int64(0)))
- })
-
- It("should ZRem", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRem := client.ZRem("zset", "two")
- Expect(zRem.Err()).NotTo(HaveOccurred())
- Expect(zRem.Val()).To(Equal(int64(1)))
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}, {3, "three"}}))
- })
-
- It("should ZRemRangeByRank", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRemRangeByRank := client.ZRemRangeByRank("zset", 0, 1)
- Expect(zRemRangeByRank.Err()).NotTo(HaveOccurred())
- Expect(zRemRangeByRank.Val()).To(Equal(int64(2)))
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{3, "three"}}))
- })
-
- It("should ZRemRangeByScore", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRemRangeByScore := client.ZRemRangeByScore("zset", "-inf", "(2")
- Expect(zRemRangeByScore.Err()).NotTo(HaveOccurred())
- Expect(zRemRangeByScore.Val()).To(Equal(int64(1)))
-
- val, err := client.ZRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}, {3, "three"}}))
- })
-
- It("should ZRemRangeByLex", func() {
- zz := []redis.Z{
- {0, "aaaa"},
- {0, "b"},
- {0, "c"},
- {0, "d"},
- {0, "e"},
- {0, "foo"},
- {0, "zap"},
- {0, "zip"},
- {0, "ALPHA"},
- {0, "alpha"},
- }
- for _, z := range zz {
- err := client.ZAdd("zset", z).Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- n, err := client.ZRemRangeByLex("zset", "[alpha", "[omega").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(6)))
-
- vals, err := client.ZRange("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{"ALPHA", "aaaa", "zap", "zip"}))
- })
-
- It("should ZRevRange", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRevRange := client.ZRevRange("zset", 0, -1)
- Expect(zRevRange.Err()).NotTo(HaveOccurred())
- Expect(zRevRange.Val()).To(Equal([]string{"three", "two", "one"}))
-
- zRevRange = client.ZRevRange("zset", 2, 3)
- Expect(zRevRange.Err()).NotTo(HaveOccurred())
- Expect(zRevRange.Val()).To(Equal([]string{"one"}))
-
- zRevRange = client.ZRevRange("zset", -2, -1)
- Expect(zRevRange.Err()).NotTo(HaveOccurred())
- Expect(zRevRange.Val()).To(Equal([]string{"two", "one"}))
- })
-
- It("should ZRevRangeWithScoresMap", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- val, err := client.ZRevRangeWithScores("zset", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{3, "three"}, {2, "two"}, {1, "one"}}))
-
- val, err = client.ZRevRangeWithScores("zset", 2, 3).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{1, "one"}}))
-
- val, err = client.ZRevRangeWithScores("zset", -2, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}, {1, "one"}}))
- })
-
- It("should ZRevRangeByScore", func() {
- zadd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
-
- vals, err := client.ZRevRangeByScore(
- "zset", redis.ZRangeBy{Max: "+inf", Min: "-inf"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{"three", "two", "one"}))
-
- vals, err = client.ZRevRangeByScore(
- "zset", redis.ZRangeBy{Max: "2", Min: "(1"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{"two"}))
-
- vals, err = client.ZRevRangeByScore(
- "zset", redis.ZRangeBy{Max: "(2", Min: "(1"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{}))
- })
-
- It("should ZRevRangeByLex", func() {
- zadd := client.ZAdd("zset", redis.Z{0, "a"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{0, "b"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{0, "c"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
-
- vals, err := client.ZRevRangeByLex(
- "zset", redis.ZRangeBy{Max: "+", Min: "-"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{"c", "b", "a"}))
-
- vals, err = client.ZRevRangeByLex(
- "zset", redis.ZRangeBy{Max: "[b", Min: "(a"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{"b"}))
-
- vals, err = client.ZRevRangeByLex(
- "zset", redis.ZRangeBy{Max: "(b", Min: "(a"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]string{}))
- })
-
- It("should ZRevRangeByScoreWithScores", func() {
- zadd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
- zadd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zadd.Err()).NotTo(HaveOccurred())
-
- vals, err := client.ZRevRangeByScoreWithScores(
- "zset", redis.ZRangeBy{Max: "+inf", Min: "-inf"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]redis.Z{{3, "three"}, {2, "two"}, {1, "one"}}))
- })
-
- It("should ZRevRangeByScoreWithScoresMap", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- val, err := client.ZRevRangeByScoreWithScores(
- "zset", redis.ZRangeBy{Max: "+inf", Min: "-inf"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{3, "three"}, {2, "two"}, {1, "one"}}))
-
- val, err = client.ZRevRangeByScoreWithScores(
- "zset", redis.ZRangeBy{Max: "2", Min: "(1"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{2, "two"}}))
-
- val, err = client.ZRevRangeByScoreWithScores(
- "zset", redis.ZRangeBy{Max: "(2", Min: "(1"}).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{}))
- })
-
- It("should ZRevRank", func() {
- zAdd := client.ZAdd("zset", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zRevRank := client.ZRevRank("zset", "one")
- Expect(zRevRank.Err()).NotTo(HaveOccurred())
- Expect(zRevRank.Val()).To(Equal(int64(2)))
-
- zRevRank = client.ZRevRank("zset", "four")
- Expect(zRevRank.Err()).To(Equal(redis.Nil))
- Expect(zRevRank.Val()).To(Equal(int64(0)))
- })
-
- It("should ZScore", func() {
- zAdd := client.ZAdd("zset", redis.Z{1.001, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zScore := client.ZScore("zset", "one")
- Expect(zScore.Err()).NotTo(HaveOccurred())
- Expect(zScore.Val()).To(Equal(float64(1.001)))
- })
-
- It("should ZUnionStore", func() {
- zAdd := client.ZAdd("zset1", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset1", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zAdd = client.ZAdd("zset2", redis.Z{1, "one"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset2", redis.Z{2, "two"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
- zAdd = client.ZAdd("zset2", redis.Z{3, "three"})
- Expect(zAdd.Err()).NotTo(HaveOccurred())
-
- zUnionStore := client.ZUnionStore(
- "out", redis.ZStore{Weights: []float64{2, 3}}, "zset1", "zset2")
- Expect(zUnionStore.Err()).NotTo(HaveOccurred())
- Expect(zUnionStore.Val()).To(Equal(int64(3)))
-
- val, err := client.ZRangeWithScores("out", 0, -1).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal([]redis.Z{{5, "one"}, {9, "three"}, {10, "two"}}))
- })
-
- })
-
- Describe("Geo add and radius search", func() {
- BeforeEach(func() {
- geoAdd := client.GeoAdd(
- "Sicily",
- &redis.GeoLocation{Longitude: 13.361389, Latitude: 38.115556, Name: "Palermo"},
- &redis.GeoLocation{Longitude: 15.087269, Latitude: 37.502669, Name: "Catania"},
- )
- Expect(geoAdd.Err()).NotTo(HaveOccurred())
- Expect(geoAdd.Val()).To(Equal(int64(2)))
- })
-
- It("should not add same geo location", func() {
- geoAdd := client.GeoAdd(
- "Sicily",
- &redis.GeoLocation{Longitude: 13.361389, Latitude: 38.115556, Name: "Palermo"},
- )
- Expect(geoAdd.Err()).NotTo(HaveOccurred())
- Expect(geoAdd.Val()).To(Equal(int64(0)))
- })
-
- It("should search geo radius", func() {
- res, err := client.GeoRadius("Sicily", 15, 37, &redis.GeoRadiusQuery{
- Radius: 200,
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(2))
- Expect(res[0].Name).To(Equal("Palermo"))
- Expect(res[1].Name).To(Equal("Catania"))
- })
-
- It("should search geo radius with options", func() {
- res, err := client.GeoRadius("Sicily", 15, 37, &redis.GeoRadiusQuery{
- Radius: 200,
- Unit: "km",
- WithGeoHash: true,
- WithCoord: true,
- WithDist: true,
- Count: 2,
- Sort: "ASC",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(2))
- Expect(res[1].Name).To(Equal("Palermo"))
- Expect(res[1].Dist).To(Equal(190.4424))
- Expect(res[1].GeoHash).To(Equal(int64(3479099956230698)))
- Expect(res[1].Longitude).To(Equal(13.361389338970184))
- Expect(res[1].Latitude).To(Equal(38.115556395496299))
- Expect(res[0].Name).To(Equal("Catania"))
- Expect(res[0].Dist).To(Equal(56.4413))
- Expect(res[0].GeoHash).To(Equal(int64(3479447370796909)))
- Expect(res[0].Longitude).To(Equal(15.087267458438873))
- Expect(res[0].Latitude).To(Equal(37.50266842333162))
- })
-
- It("should search geo radius with WithDist=false", func() {
- res, err := client.GeoRadius("Sicily", 15, 37, &redis.GeoRadiusQuery{
- Radius: 200,
- Unit: "km",
- WithGeoHash: true,
- WithCoord: true,
- Count: 2,
- Sort: "ASC",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(2))
- Expect(res[1].Name).To(Equal("Palermo"))
- Expect(res[1].Dist).To(Equal(float64(0)))
- Expect(res[1].GeoHash).To(Equal(int64(3479099956230698)))
- Expect(res[1].Longitude).To(Equal(13.361389338970184))
- Expect(res[1].Latitude).To(Equal(38.115556395496299))
- Expect(res[0].Name).To(Equal("Catania"))
- Expect(res[0].Dist).To(Equal(float64(0)))
- Expect(res[0].GeoHash).To(Equal(int64(3479447370796909)))
- Expect(res[0].Longitude).To(Equal(15.087267458438873))
- Expect(res[0].Latitude).To(Equal(37.50266842333162))
- })
-
- It("should search geo radius by member with options", func() {
- res, err := client.GeoRadiusByMember("Sicily", "Catania", &redis.GeoRadiusQuery{
- Radius: 200,
- Unit: "km",
- WithGeoHash: true,
- WithCoord: true,
- WithDist: true,
- Count: 2,
- Sort: "ASC",
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(2))
- Expect(res[0].Name).To(Equal("Catania"))
- Expect(res[0].Dist).To(Equal(0.0))
- Expect(res[0].GeoHash).To(Equal(int64(3479447370796909)))
- Expect(res[0].Longitude).To(Equal(15.087267458438873))
- Expect(res[0].Latitude).To(Equal(37.50266842333162))
- Expect(res[1].Name).To(Equal("Palermo"))
- Expect(res[1].Dist).To(Equal(166.2742))
- Expect(res[1].GeoHash).To(Equal(int64(3479099956230698)))
- Expect(res[1].Longitude).To(Equal(13.361389338970184))
- Expect(res[1].Latitude).To(Equal(38.115556395496299))
- })
-
- It("should search geo radius with no results", func() {
- res, err := client.GeoRadius("Sicily", 99, 37, &redis.GeoRadiusQuery{
- Radius: 200,
- Unit: "km",
- WithGeoHash: true,
- WithCoord: true,
- WithDist: true,
- }).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(res).To(HaveLen(0))
- })
-
- It("should get geo distance with unit options", func() {
- // From Redis CLI, note the difference in rounding in m vs
- // km on Redis itself.
- //
- // GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"
- // GEODIST Sicily Palermo Catania m
- // "166274.15156960033"
- // GEODIST Sicily Palermo Catania km
- // "166.27415156960032"
- dist, err := client.GeoDist("Sicily", "Palermo", "Catania", "km").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(dist).To(BeNumerically("~", 166.27, 0.01))
-
- dist, err = client.GeoDist("Sicily", "Palermo", "Catania", "m").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(dist).To(BeNumerically("~", 166274.15, 0.01))
- })
-
- It("should get geo hash in string representation", func() {
- hashes, err := client.GeoHash("Sicily", "Palermo", "Catania").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(hashes).To(ConsistOf([]string{"sqc8b49rny0", "sqdtr74hyu0"}))
- })
-
- It("should return geo position", func() {
- pos, err := client.GeoPos("Sicily", "Palermo", "Catania", "NonExisting").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(pos).To(ConsistOf([]*redis.GeoPos{
- {
- Longitude: 13.361389338970184,
- Latitude: 38.1155563954963,
- },
- {
- Longitude: 15.087267458438873,
- Latitude: 37.50266842333162,
- },
- nil,
- }))
- })
- })
-
- Describe("marshaling/unmarshaling", func() {
-
- type convTest struct {
- value interface{}
- wanted string
- dest interface{}
- }
-
- convTests := []convTest{
- {nil, "", nil},
- {"hello", "hello", new(string)},
- {[]byte("hello"), "hello", new([]byte)},
- {int(1), "1", new(int)},
- {int8(1), "1", new(int8)},
- {int16(1), "1", new(int16)},
- {int32(1), "1", new(int32)},
- {int64(1), "1", new(int64)},
- {uint(1), "1", new(uint)},
- {uint8(1), "1", new(uint8)},
- {uint16(1), "1", new(uint16)},
- {uint32(1), "1", new(uint32)},
- {uint64(1), "1", new(uint64)},
- {float32(1.0), "1", new(float32)},
- {float64(1.0), "1", new(float64)},
- {true, "1", new(bool)},
- {false, "0", new(bool)},
- }
-
- It("should convert to string", func() {
- for _, test := range convTests {
- err := client.Set("key", test.value, 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- s, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(s).To(Equal(test.wanted))
-
- if test.dest == nil {
- continue
- }
-
- err = client.Get("key").Scan(test.dest)
- Expect(err).NotTo(HaveOccurred())
- Expect(deref(test.dest)).To(Equal(test.value))
- }
- })
-
- })
-
- Describe("json marshaling/unmarshaling", func() {
-
- BeforeEach(func() {
- value := &numberStruct{Number: 42}
- err := client.Set("key", value, 0).Err()
- Expect(err).NotTo(HaveOccurred())
- })
-
- It("should marshal custom values using json", func() {
- s, err := client.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(s).To(Equal(`{"Number":42}`))
- })
-
- It("should scan custom values using json", func() {
- value := &numberStruct{}
- err := client.Get("key").Scan(value)
- Expect(err).NotTo(HaveOccurred())
- Expect(value.Number).To(Equal(42))
- })
-
- })
-
- Describe("Eval", func() {
-
- It("returns keys and values", func() {
- vals, err := client.Eval(
- "return {KEYS[1],ARGV[1]}",
- []string{"key"},
- "hello",
- ).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(vals).To(Equal([]interface{}{"key", "hello"}))
- })
-
- })
-
-})
-
-type numberStruct struct {
- Number int
-}
-
-func (s *numberStruct) MarshalBinary() ([]byte, error) {
- return json.Marshal(s)
-}
-
-func (s *numberStruct) UnmarshalBinary(b []byte) error {
- return json.Unmarshal(b, s)
-}
-
-func deref(viface interface{}) interface{} {
- v := reflect.ValueOf(viface)
- for v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- return v.Interface()
-}
diff --git a/vendor/github.com/go-redis/redis/example_instrumentation_test.go b/vendor/github.com/go-redis/redis/example_instrumentation_test.go
deleted file mode 100644
index 85abbd744..000000000
--- a/vendor/github.com/go-redis/redis/example_instrumentation_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package redis_test
-
-import (
- "fmt"
-
- "github.com/go-redis/redis"
-)
-
-func Example_instrumentation() {
- cl := redis.NewClient(&redis.Options{
- Addr: ":6379",
- })
- cl.WrapProcess(func(old func(cmd redis.Cmder) error) func(cmd redis.Cmder) error {
- return func(cmd redis.Cmder) error {
- fmt.Printf("starting processing: <%s>\n", cmd)
- err := old(cmd)
- fmt.Printf("finished processing: <%s>\n", cmd)
- return err
- }
- })
-
- cl.Ping()
- // Output: starting processing: <ping: >
- // finished processing: <ping: PONG>
-}
-
-func Example_Pipeline_instrumentation() {
- client := redis.NewClient(&redis.Options{
- Addr: ":6379",
- })
-
- client.WrapProcessPipeline(func(old func([]redis.Cmder) error) func([]redis.Cmder) error {
- return func(cmds []redis.Cmder) error {
- fmt.Printf("pipeline starting processing: %v\n", cmds)
- err := old(cmds)
- fmt.Printf("pipeline finished processing: %v\n", cmds)
- return err
- }
- })
-
- client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- pipe.Ping()
- return nil
- })
- // Output: pipeline starting processing: [ping: ping: ]
- // pipeline finished processing: [ping: PONG ping: PONG]
-}
diff --git a/vendor/github.com/go-redis/redis/example_test.go b/vendor/github.com/go-redis/redis/example_test.go
deleted file mode 100644
index 4d18ddb94..000000000
--- a/vendor/github.com/go-redis/redis/example_test.go
+++ /dev/null
@@ -1,414 +0,0 @@
-package redis_test
-
-import (
- "fmt"
- "strconv"
- "sync"
- "time"
-
- "github.com/go-redis/redis"
-)
-
-var client *redis.Client
-
-func init() {
- client = redis.NewClient(&redis.Options{
- Addr: ":6379",
- DialTimeout: 10 * time.Second,
- ReadTimeout: 30 * time.Second,
- WriteTimeout: 30 * time.Second,
- PoolSize: 10,
- PoolTimeout: 30 * time.Second,
- })
- client.FlushDB()
-}
-
-func ExampleNewClient() {
- client := redis.NewClient(&redis.Options{
- Addr: "localhost:6379",
- Password: "", // no password set
- DB: 0, // use default DB
- })
-
- pong, err := client.Ping().Result()
- fmt.Println(pong, err)
- // Output: PONG <nil>
-}
-
-func ExampleParseURL() {
- opt, err := redis.ParseURL("redis://:qwerty@localhost:6379/1")
- if err != nil {
- panic(err)
- }
- fmt.Println("addr is", opt.Addr)
- fmt.Println("db is", opt.DB)
- fmt.Println("password is", opt.Password)
-
- // Create client as usually.
- _ = redis.NewClient(opt)
-
- // Output: addr is localhost:6379
- // db is 1
- // password is qwerty
-}
-
-func ExampleNewFailoverClient() {
- // See http://redis.io/topics/sentinel for instructions how to
- // setup Redis Sentinel.
- client := redis.NewFailoverClient(&redis.FailoverOptions{
- MasterName: "master",
- SentinelAddrs: []string{":26379"},
- })
- client.Ping()
-}
-
-func ExampleNewClusterClient() {
- // See http://redis.io/topics/cluster-tutorial for instructions
- // how to setup Redis Cluster.
- client := redis.NewClusterClient(&redis.ClusterOptions{
- Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"},
- })
- client.Ping()
-}
-
-func ExampleNewRing() {
- client := redis.NewRing(&redis.RingOptions{
- Addrs: map[string]string{
- "shard1": ":7000",
- "shard2": ":7001",
- "shard3": ":7002",
- },
- })
- client.Ping()
-}
-
-func ExampleClient() {
- err := client.Set("key", "value", 0).Err()
- if err != nil {
- panic(err)
- }
-
- val, err := client.Get("key").Result()
- if err != nil {
- panic(err)
- }
- fmt.Println("key", val)
-
- val2, err := client.Get("key2").Result()
- if err == redis.Nil {
- fmt.Println("key2 does not exist")
- } else if err != nil {
- panic(err)
- } else {
- fmt.Println("key2", val2)
- }
- // Output: key value
- // key2 does not exist
-}
-
-func ExampleClient_Set() {
- // Last argument is expiration. Zero means the key has no
- // expiration time.
- err := client.Set("key", "value", 0).Err()
- if err != nil {
- panic(err)
- }
-
- // key2 will expire in an hour.
- err = client.Set("key2", "value", time.Hour).Err()
- if err != nil {
- panic(err)
- }
-}
-
-func ExampleClient_Incr() {
- result, err := client.Incr("counter").Result()
- if err != nil {
- panic(err)
- }
-
- fmt.Println(result)
- // Output: 1
-}
-
-func ExampleClient_BLPop() {
- if err := client.RPush("queue", "message").Err(); err != nil {
- panic(err)
- }
-
- // use `client.BLPop(0, "queue")` for infinite waiting time
- result, err := client.BLPop(1*time.Second, "queue").Result()
- if err != nil {
- panic(err)
- }
-
- fmt.Println(result[0], result[1])
- // Output: queue message
-}
-
-func ExampleClient_Scan() {
- client.FlushDB()
- for i := 0; i < 33; i++ {
- err := client.Set(fmt.Sprintf("key%d", i), "value", 0).Err()
- if err != nil {
- panic(err)
- }
- }
-
- var cursor uint64
- var n int
- for {
- var keys []string
- var err error
- keys, cursor, err = client.Scan(cursor, "", 10).Result()
- if err != nil {
- panic(err)
- }
- n += len(keys)
- if cursor == 0 {
- break
- }
- }
-
- fmt.Printf("found %d keys\n", n)
- // Output: found 33 keys
-}
-
-func ExampleClient_Pipelined() {
- var incr *redis.IntCmd
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- incr = pipe.Incr("pipelined_counter")
- pipe.Expire("pipelined_counter", time.Hour)
- return nil
- })
- fmt.Println(incr.Val(), err)
- // Output: 1 <nil>
-}
-
-func ExampleClient_Pipeline() {
- pipe := client.Pipeline()
-
- incr := pipe.Incr("pipeline_counter")
- pipe.Expire("pipeline_counter", time.Hour)
-
- // Execute
- //
- // INCR pipeline_counter
- // EXPIRE pipeline_counts 3600
- //
- // using one client-server roundtrip.
- _, err := pipe.Exec()
- fmt.Println(incr.Val(), err)
- // Output: 1 <nil>
-}
-
-func ExampleClient_TxPipelined() {
- var incr *redis.IntCmd
- _, err := client.TxPipelined(func(pipe redis.Pipeliner) error {
- incr = pipe.Incr("tx_pipelined_counter")
- pipe.Expire("tx_pipelined_counter", time.Hour)
- return nil
- })
- fmt.Println(incr.Val(), err)
- // Output: 1 <nil>
-}
-
-func ExampleClient_TxPipeline() {
- pipe := client.TxPipeline()
-
- incr := pipe.Incr("tx_pipeline_counter")
- pipe.Expire("tx_pipeline_counter", time.Hour)
-
- // Execute
- //
- // MULTI
- // INCR pipeline_counter
- // EXPIRE pipeline_counts 3600
- // EXEC
- //
- // using one client-server roundtrip.
- _, err := pipe.Exec()
- fmt.Println(incr.Val(), err)
- // Output: 1 <nil>
-}
-
-func ExampleClient_Watch() {
- var incr func(string) error
-
- // Transactionally increments key using GET and SET commands.
- incr = func(key string) error {
- err := client.Watch(func(tx *redis.Tx) error {
- n, err := tx.Get(key).Int64()
- if err != nil && err != redis.Nil {
- return err
- }
-
- _, err = tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set(key, strconv.FormatInt(n+1, 10), 0)
- return nil
- })
- return err
- }, key)
- if err == redis.TxFailedErr {
- return incr(key)
- }
- return err
- }
-
- var wg sync.WaitGroup
- for i := 0; i < 100; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
-
- err := incr("counter3")
- if err != nil {
- panic(err)
- }
- }()
- }
- wg.Wait()
-
- n, err := client.Get("counter3").Int64()
- fmt.Println(n, err)
- // Output: 100 <nil>
-}
-
-func ExamplePubSub() {
- pubsub := client.Subscribe("mychannel1")
- defer pubsub.Close()
-
- // Wait for subscription to be created before publishing message.
- subscr, err := pubsub.ReceiveTimeout(time.Second)
- if err != nil {
- panic(err)
- }
- fmt.Println(subscr)
-
- err = client.Publish("mychannel1", "hello").Err()
- if err != nil {
- panic(err)
- }
-
- msg, err := pubsub.ReceiveMessage()
- if err != nil {
- panic(err)
- }
-
- fmt.Println(msg.Channel, msg.Payload)
- // Output: subscribe: mychannel1
- // mychannel1 hello
-}
-
-func ExamplePubSub_Receive() {
- pubsub := client.Subscribe("mychannel2")
- defer pubsub.Close()
-
- for i := 0; i < 2; i++ {
- // ReceiveTimeout is a low level API. Use ReceiveMessage instead.
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- if err != nil {
- break
- }
-
- switch msg := msgi.(type) {
- case *redis.Subscription:
- fmt.Println("subscribed to", msg.Channel)
-
- _, err := client.Publish("mychannel2", "hello").Result()
- if err != nil {
- panic(err)
- }
- case *redis.Message:
- fmt.Println("received", msg.Payload, "from", msg.Channel)
- default:
- panic("unreached")
- }
- }
-
- // sent message to 1 client
- // received hello from mychannel2
-}
-
-func ExampleScript() {
- IncrByXX := redis.NewScript(`
- if redis.call("GET", KEYS[1]) ~= false then
- return redis.call("INCRBY", KEYS[1], ARGV[1])
- end
- return false
- `)
-
- n, err := IncrByXX.Run(client, []string{"xx_counter"}, 2).Result()
- fmt.Println(n, err)
-
- err = client.Set("xx_counter", "40", 0).Err()
- if err != nil {
- panic(err)
- }
-
- n, err = IncrByXX.Run(client, []string{"xx_counter"}, 2).Result()
- fmt.Println(n, err)
-
- // Output: <nil> redis: nil
- // 42 <nil>
-}
-
-func Example_customCommand() {
- Get := func(client *redis.Client, key string) *redis.StringCmd {
- cmd := redis.NewStringCmd("get", key)
- client.Process(cmd)
- return cmd
- }
-
- v, err := Get(client, "key_does_not_exist").Result()
- fmt.Printf("%q %s", v, err)
- // Output: "" redis: nil
-}
-
-func ExampleScanIterator() {
- iter := client.Scan(0, "", 0).Iterator()
- for iter.Next() {
- fmt.Println(iter.Val())
- }
- if err := iter.Err(); err != nil {
- panic(err)
- }
-}
-
-func ExampleScanCmd_Iterator() {
- iter := client.Scan(0, "", 0).Iterator()
- for iter.Next() {
- fmt.Println(iter.Val())
- }
- if err := iter.Err(); err != nil {
- panic(err)
- }
-}
-
-func ExampleNewUniversalClient_simple() {
- client := redis.NewUniversalClient(&redis.UniversalOptions{
- Addrs: []string{":6379"},
- })
- defer client.Close()
-
- client.Ping()
-}
-
-func ExampleNewUniversalClient_failover() {
- client := redis.NewUniversalClient(&redis.UniversalOptions{
- MasterName: "master",
- Addrs: []string{":26379"},
- })
- defer client.Close()
-
- client.Ping()
-}
-
-func ExampleNewUniversalClient_cluster() {
- client := redis.NewUniversalClient(&redis.UniversalOptions{
- Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"},
- })
- defer client.Close()
-
- client.Ping()
-}
diff --git a/vendor/github.com/go-redis/redis/export_test.go b/vendor/github.com/go-redis/redis/export_test.go
deleted file mode 100644
index bcc18c457..000000000
--- a/vendor/github.com/go-redis/redis/export_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package redis
-
-import (
- "net"
- "time"
-
- "github.com/go-redis/redis/internal/pool"
-)
-
-func (c *baseClient) Pool() pool.Pooler {
- return c.connPool
-}
-
-func (c *PubSub) SetNetConn(netConn net.Conn) {
- c.cn = pool.NewConn(netConn)
-}
-
-func (c *PubSub) ReceiveMessageTimeout(timeout time.Duration) (*Message, error) {
- return c.receiveMessage(timeout)
-}
-
-func (c *ClusterClient) SlotAddrs(slot int) []string {
- state, err := c.state()
- if err != nil {
- panic(err)
- }
-
- var addrs []string
- for _, n := range state.slotNodes(slot) {
- addrs = append(addrs, n.Client.getAddr())
- }
- return addrs
-}
-
-// SwapSlot swaps a slot's master/slave address for testing MOVED redirects.
-func (c *ClusterClient) SwapSlotNodes(slot int) {
- state, err := c.state()
- if err != nil {
- panic(err)
- }
-
- nodes := state.slots[slot]
- if len(nodes) == 2 {
- nodes[0], nodes[1] = nodes[1], nodes[0]
- }
-}
diff --git a/vendor/github.com/go-redis/redis/internal/consistenthash/consistenthash_test.go b/vendor/github.com/go-redis/redis/internal/consistenthash/consistenthash_test.go
deleted file mode 100644
index 1a37fd7ff..000000000
--- a/vendor/github.com/go-redis/redis/internal/consistenthash/consistenthash_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-Copyright 2013 Google Inc.
-
-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.
-*/
-
-package consistenthash
-
-import (
- "fmt"
- "strconv"
- "testing"
-)
-
-func TestHashing(t *testing.T) {
-
- // Override the hash function to return easier to reason about values. Assumes
- // the keys can be converted to an integer.
- hash := New(3, func(key []byte) uint32 {
- i, err := strconv.Atoi(string(key))
- if err != nil {
- panic(err)
- }
- return uint32(i)
- })
-
- // Given the above hash function, this will give replicas with "hashes":
- // 2, 4, 6, 12, 14, 16, 22, 24, 26
- hash.Add("6", "4", "2")
-
- testCases := map[string]string{
- "2": "2",
- "11": "2",
- "23": "4",
- "27": "2",
- }
-
- for k, v := range testCases {
- if hash.Get(k) != v {
- t.Errorf("Asking for %s, should have yielded %s", k, v)
- }
- }
-
- // Adds 8, 18, 28
- hash.Add("8")
-
- // 27 should now map to 8.
- testCases["27"] = "8"
-
- for k, v := range testCases {
- if hash.Get(k) != v {
- t.Errorf("Asking for %s, should have yielded %s", k, v)
- }
- }
-
-}
-
-func TestConsistency(t *testing.T) {
- hash1 := New(1, nil)
- hash2 := New(1, nil)
-
- hash1.Add("Bill", "Bob", "Bonny")
- hash2.Add("Bob", "Bonny", "Bill")
-
- if hash1.Get("Ben") != hash2.Get("Ben") {
- t.Errorf("Fetching 'Ben' from both hashes should be the same")
- }
-
- hash2.Add("Becky", "Ben", "Bobby")
-
- if hash1.Get("Ben") != hash2.Get("Ben") ||
- hash1.Get("Bob") != hash2.Get("Bob") ||
- hash1.Get("Bonny") != hash2.Get("Bonny") {
- t.Errorf("Direct matches should always return the same entry")
- }
-
-}
-
-func BenchmarkGet8(b *testing.B) { benchmarkGet(b, 8) }
-func BenchmarkGet32(b *testing.B) { benchmarkGet(b, 32) }
-func BenchmarkGet128(b *testing.B) { benchmarkGet(b, 128) }
-func BenchmarkGet512(b *testing.B) { benchmarkGet(b, 512) }
-
-func benchmarkGet(b *testing.B, shards int) {
-
- hash := New(50, nil)
-
- var buckets []string
- for i := 0; i < shards; i++ {
- buckets = append(buckets, fmt.Sprintf("shard-%d", i))
- }
-
- hash.Add(buckets...)
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- hash.Get(buckets[i&(shards-1)])
- }
-}
diff --git a/vendor/github.com/go-redis/redis/internal/error.go b/vendor/github.com/go-redis/redis/internal/error.go
index 0898eeb62..7b419577e 100644
--- a/vendor/github.com/go-redis/redis/internal/error.go
+++ b/vendor/github.com/go-redis/redis/internal/error.go
@@ -4,13 +4,9 @@ import (
"io"
"net"
"strings"
-)
-
-const Nil = RedisError("redis: nil")
-
-type RedisError string
-func (e RedisError) Error() string { return string(e) }
+ "github.com/go-redis/redis/internal/proto"
+)
func IsRetryableError(err error, retryNetError bool) bool {
if IsNetworkError(err) {
@@ -30,7 +26,7 @@ func IsRetryableError(err error, retryNetError bool) bool {
}
func IsRedisError(err error) bool {
- _, ok := err.(RedisError)
+ _, ok := err.(proto.RedisError)
return ok
}
@@ -42,6 +38,10 @@ func IsNetworkError(err error) bool {
return ok
}
+func IsReadOnlyError(err error) bool {
+ return strings.HasPrefix(err.Error(), "READONLY ")
+}
+
func IsBadConn(err error, allowTimeout bool) bool {
if err == nil {
return false
diff --git a/vendor/github.com/go-redis/redis/internal/hashtag/hashtag_test.go b/vendor/github.com/go-redis/redis/internal/hashtag/hashtag_test.go
deleted file mode 100644
index 7f0fedf31..000000000
--- a/vendor/github.com/go-redis/redis/internal/hashtag/hashtag_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package hashtag
-
-import (
- "math/rand"
- "testing"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-func TestGinkgoSuite(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "hashtag")
-}
-
-var _ = Describe("CRC16", func() {
-
- // http://redis.io/topics/cluster-spec#keys-distribution-model
- It("should calculate CRC16", func() {
- tests := []struct {
- s string
- n uint16
- }{
- {"123456789", 0x31C3},
- {string([]byte{83, 153, 134, 118, 229, 214, 244, 75, 140, 37, 215, 215}), 21847},
- }
-
- for _, test := range tests {
- Expect(crc16sum(test.s)).To(Equal(test.n), "for %s", test.s)
- }
- })
-
-})
-
-var _ = Describe("HashSlot", func() {
-
- It("should calculate hash slots", func() {
- tests := []struct {
- key string
- slot int
- }{
- {"123456789", 12739},
- {"{}foo", 9500},
- {"foo{}", 5542},
- {"foo{}{bar}", 8363},
- {"", 10503},
- {"", 5176},
- {string([]byte{83, 153, 134, 118, 229, 214, 244, 75, 140, 37, 215, 215}), 5463},
- }
- // Empty keys receive random slot.
- rand.Seed(100)
-
- for _, test := range tests {
- Expect(Slot(test.key)).To(Equal(test.slot), "for %s", test.key)
- }
- })
-
- It("should extract keys from tags", func() {
- tests := []struct {
- one, two string
- }{
- {"foo{bar}", "bar"},
- {"{foo}bar", "foo"},
- {"{user1000}.following", "{user1000}.followers"},
- {"foo{{bar}}zap", "{bar"},
- {"foo{bar}{zap}", "bar"},
- }
-
- for _, test := range tests {
- Expect(Slot(test.one)).To(Equal(Slot(test.two)), "for %s <-> %s", test.one, test.two)
- }
- })
-
-})
diff --git a/vendor/github.com/go-redis/redis/internal/internal_test.go b/vendor/github.com/go-redis/redis/internal/internal_test.go
deleted file mode 100644
index 56ff611e1..000000000
--- a/vendor/github.com/go-redis/redis/internal/internal_test.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package internal
-
-import (
- "testing"
- "time"
-
- . "github.com/onsi/gomega"
-)
-
-func TestRetryBackoff(t *testing.T) {
- RegisterTestingT(t)
-
- for i := -1; i <= 16; i++ {
- backoff := RetryBackoff(i, time.Millisecond, 512*time.Millisecond)
- Expect(backoff >= 0).To(BeTrue())
- Expect(backoff <= 512*time.Millisecond).To(BeTrue())
- }
-}
diff --git a/vendor/github.com/go-redis/redis/internal/pool/bench_test.go b/vendor/github.com/go-redis/redis/internal/pool/bench_test.go
deleted file mode 100644
index e0bb52446..000000000
--- a/vendor/github.com/go-redis/redis/internal/pool/bench_test.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package pool_test
-
-import (
- "testing"
- "time"
-
- "github.com/go-redis/redis/internal/pool"
-)
-
-func benchmarkPoolGetPut(b *testing.B, poolSize int) {
- connPool := pool.NewConnPool(&pool.Options{
- Dialer: dummyDialer,
- PoolSize: poolSize,
- PoolTimeout: time.Second,
- IdleTimeout: time.Hour,
- IdleCheckFrequency: time.Hour,
- })
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- cn, _, err := connPool.Get()
- if err != nil {
- b.Fatal(err)
- }
- if err = connPool.Put(cn); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkPoolGetPut10Conns(b *testing.B) {
- benchmarkPoolGetPut(b, 10)
-}
-
-func BenchmarkPoolGetPut100Conns(b *testing.B) {
- benchmarkPoolGetPut(b, 100)
-}
-
-func BenchmarkPoolGetPut1000Conns(b *testing.B) {
- benchmarkPoolGetPut(b, 1000)
-}
-
-func benchmarkPoolGetRemove(b *testing.B, poolSize int) {
- connPool := pool.NewConnPool(&pool.Options{
- Dialer: dummyDialer,
- PoolSize: poolSize,
- PoolTimeout: time.Second,
- IdleTimeout: time.Hour,
- IdleCheckFrequency: time.Hour,
- })
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- cn, _, err := connPool.Get()
- if err != nil {
- b.Fatal(err)
- }
- if err := connPool.Remove(cn); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkPoolGetRemove10Conns(b *testing.B) {
- benchmarkPoolGetRemove(b, 10)
-}
-
-func BenchmarkPoolGetRemove100Conns(b *testing.B) {
- benchmarkPoolGetRemove(b, 100)
-}
-
-func BenchmarkPoolGetRemove1000Conns(b *testing.B) {
- benchmarkPoolGetRemove(b, 1000)
-}
diff --git a/vendor/github.com/go-redis/redis/internal/pool/main_test.go b/vendor/github.com/go-redis/redis/internal/pool/main_test.go
deleted file mode 100644
index 43afe3fa9..000000000
--- a/vendor/github.com/go-redis/redis/internal/pool/main_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package pool_test
-
-import (
- "net"
- "sync"
- "testing"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-func TestGinkgoSuite(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "pool")
-}
-
-func perform(n int, cbs ...func(int)) {
- var wg sync.WaitGroup
- for _, cb := range cbs {
- for i := 0; i < n; i++ {
- wg.Add(1)
- go func(cb func(int), i int) {
- defer GinkgoRecover()
- defer wg.Done()
-
- cb(i)
- }(cb, i)
- }
- }
- wg.Wait()
-}
-
-func dummyDialer() (net.Conn, error) {
- return &net.TCPConn{}, nil
-}
diff --git a/vendor/github.com/go-redis/redis/internal/pool/pool_test.go b/vendor/github.com/go-redis/redis/internal/pool/pool_test.go
deleted file mode 100644
index 68c9a1bef..000000000
--- a/vendor/github.com/go-redis/redis/internal/pool/pool_test.go
+++ /dev/null
@@ -1,241 +0,0 @@
-package pool_test
-
-import (
- "testing"
- "time"
-
- "github.com/go-redis/redis/internal/pool"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("ConnPool", func() {
- var connPool *pool.ConnPool
-
- BeforeEach(func() {
- connPool = pool.NewConnPool(&pool.Options{
- Dialer: dummyDialer,
- PoolSize: 10,
- PoolTimeout: time.Hour,
- IdleTimeout: time.Millisecond,
- IdleCheckFrequency: time.Millisecond,
- })
- })
-
- AfterEach(func() {
- connPool.Close()
- })
-
- It("should unblock client when conn is removed", func() {
- // Reserve one connection.
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
-
- // Reserve all other connections.
- var cns []*pool.Conn
- for i := 0; i < 9; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- cns = append(cns, cn)
- }
-
- started := make(chan bool, 1)
- done := make(chan bool, 1)
- go func() {
- defer GinkgoRecover()
-
- started <- true
- _, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- done <- true
-
- err = connPool.Put(cn)
- Expect(err).NotTo(HaveOccurred())
- }()
- <-started
-
- // Check that Get is blocked.
- select {
- case <-done:
- Fail("Get is not blocked")
- default:
- // ok
- }
-
- err = connPool.Remove(cn)
- Expect(err).NotTo(HaveOccurred())
-
- // Check that Ping is unblocked.
- select {
- case <-done:
- // ok
- case <-time.After(time.Second):
- Fail("Get is not unblocked")
- }
-
- for _, cn := range cns {
- err = connPool.Put(cn)
- Expect(err).NotTo(HaveOccurred())
- }
- })
-})
-
-var _ = Describe("conns reaper", func() {
- const idleTimeout = time.Minute
-
- var connPool *pool.ConnPool
- var conns, idleConns, closedConns []*pool.Conn
-
- BeforeEach(func() {
- conns = nil
- closedConns = nil
-
- connPool = pool.NewConnPool(&pool.Options{
- Dialer: dummyDialer,
- PoolSize: 10,
- PoolTimeout: time.Second,
- IdleTimeout: idleTimeout,
- IdleCheckFrequency: time.Hour,
-
- OnClose: func(cn *pool.Conn) error {
- closedConns = append(closedConns, cn)
- return nil
- },
- })
-
- // add stale connections
- idleConns = nil
- for i := 0; i < 3; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- cn.SetUsedAt(time.Now().Add(-2 * idleTimeout))
- conns = append(conns, cn)
- idleConns = append(idleConns, cn)
- }
-
- // add fresh connections
- for i := 0; i < 3; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- conns = append(conns, cn)
- }
-
- for _, cn := range conns {
- Expect(connPool.Put(cn)).NotTo(HaveOccurred())
- }
-
- Expect(connPool.Len()).To(Equal(6))
- Expect(connPool.FreeLen()).To(Equal(6))
-
- n, err := connPool.ReapStaleConns()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(3))
- })
-
- AfterEach(func() {
- _ = connPool.Close()
- Expect(connPool.Len()).To(Equal(0))
- Expect(connPool.FreeLen()).To(Equal(0))
- Expect(len(closedConns)).To(Equal(len(conns)))
- Expect(closedConns).To(ConsistOf(conns))
- })
-
- It("reaps stale connections", func() {
- Expect(connPool.Len()).To(Equal(3))
- Expect(connPool.FreeLen()).To(Equal(3))
- })
-
- It("does not reap fresh connections", func() {
- n, err := connPool.ReapStaleConns()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(0))
- })
-
- It("stale connections are closed", func() {
- Expect(len(closedConns)).To(Equal(len(idleConns)))
- Expect(closedConns).To(ConsistOf(idleConns))
- })
-
- It("pool is functional", func() {
- for j := 0; j < 3; j++ {
- var freeCns []*pool.Conn
- for i := 0; i < 3; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- Expect(cn).NotTo(BeNil())
- freeCns = append(freeCns, cn)
- }
-
- Expect(connPool.Len()).To(Equal(3))
- Expect(connPool.FreeLen()).To(Equal(0))
-
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- Expect(cn).NotTo(BeNil())
- conns = append(conns, cn)
-
- Expect(connPool.Len()).To(Equal(4))
- Expect(connPool.FreeLen()).To(Equal(0))
-
- err = connPool.Remove(cn)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(connPool.Len()).To(Equal(3))
- Expect(connPool.FreeLen()).To(Equal(0))
-
- for _, cn := range freeCns {
- err := connPool.Put(cn)
- Expect(err).NotTo(HaveOccurred())
- }
-
- Expect(connPool.Len()).To(Equal(3))
- Expect(connPool.FreeLen()).To(Equal(3))
- }
- })
-})
-
-var _ = Describe("race", func() {
- var connPool *pool.ConnPool
- var C, N int
-
- BeforeEach(func() {
- C, N = 10, 1000
- if testing.Short() {
- C = 4
- N = 100
- }
- })
-
- AfterEach(func() {
- connPool.Close()
- })
-
- It("does not happen on Get, Put, and Remove", func() {
- connPool = pool.NewConnPool(&pool.Options{
- Dialer: dummyDialer,
- PoolSize: 10,
- PoolTimeout: time.Minute,
- IdleTimeout: time.Millisecond,
- IdleCheckFrequency: time.Millisecond,
- })
-
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- if err == nil {
- Expect(connPool.Put(cn)).NotTo(HaveOccurred())
- }
- }
- }, func(id int) {
- for i := 0; i < N; i++ {
- cn, _, err := connPool.Get()
- Expect(err).NotTo(HaveOccurred())
- if err == nil {
- Expect(connPool.Remove(cn)).NotTo(HaveOccurred())
- }
- }
- })
- })
-})
diff --git a/vendor/github.com/go-redis/redis/internal/proto/proto_test.go b/vendor/github.com/go-redis/redis/internal/proto/proto_test.go
deleted file mode 100644
index c9a820eb1..000000000
--- a/vendor/github.com/go-redis/redis/internal/proto/proto_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package proto_test
-
-import (
- "testing"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-func TestGinkgoSuite(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "proto")
-}
diff --git a/vendor/github.com/go-redis/redis/internal/proto/reader.go b/vendor/github.com/go-redis/redis/internal/proto/reader.go
index e5ae8a03e..d5d695358 100644
--- a/vendor/github.com/go-redis/redis/internal/proto/reader.go
+++ b/vendor/github.com/go-redis/redis/internal/proto/reader.go
@@ -6,7 +6,7 @@ import (
"io"
"strconv"
- "github.com/go-redis/redis/internal"
+ "github.com/go-redis/redis/internal/util"
)
const bytesAllocLimit = 1024 * 1024 // 1mb
@@ -19,6 +19,16 @@ const (
ArrayReply = '*'
)
+//------------------------------------------------------------------------------
+
+const Nil = RedisError("redis: nil")
+
+type RedisError string
+
+func (e RedisError) Error() string { return string(e) }
+
+//------------------------------------------------------------------------------
+
type MultiBulkParse func(*Reader, int64) (interface{}, error)
type Reader struct {
@@ -66,7 +76,7 @@ func (r *Reader) ReadLine() ([]byte, error) {
return nil, fmt.Errorf("redis: reply is empty")
}
if isNilReply(line) {
- return nil, internal.Nil
+ return nil, Nil
}
return line, nil
}
@@ -83,7 +93,7 @@ func (r *Reader) ReadReply(m MultiBulkParse) (interface{}, error) {
case StatusReply:
return parseStatusValue(line), nil
case IntReply:
- return parseInt(line[1:], 10, 64)
+ return util.ParseInt(line[1:], 10, 64)
case StringReply:
return r.readTmpBytesValue(line)
case ArrayReply:
@@ -105,7 +115,7 @@ func (r *Reader) ReadIntReply() (int64, error) {
case ErrorReply:
return 0, ParseErrorReply(line)
case IntReply:
- return parseInt(line[1:], 10, 64)
+ return util.ParseInt(line[1:], 10, 64)
default:
return 0, fmt.Errorf("redis: can't parse int reply: %.100q", line)
}
@@ -151,7 +161,7 @@ func (r *Reader) ReadFloatReply() (float64, error) {
if err != nil {
return 0, err
}
- return parseFloat(b, 64)
+ return util.ParseFloat(b, 64)
}
func (r *Reader) ReadArrayReply(m MultiBulkParse) (interface{}, error) {
@@ -221,7 +231,7 @@ func (r *Reader) ReadScanReply() ([]string, uint64, error) {
func (r *Reader) readTmpBytesValue(line []byte) ([]byte, error) {
if isNilReply(line) {
- return nil, internal.Nil
+ return nil, Nil
}
replyLen, err := strconv.Atoi(string(line[1:]))
@@ -241,7 +251,7 @@ func (r *Reader) ReadInt() (int64, error) {
if err != nil {
return 0, err
}
- return parseInt(b, 10, 64)
+ return util.ParseInt(b, 10, 64)
}
func (r *Reader) ReadUint() (uint64, error) {
@@ -249,7 +259,7 @@ func (r *Reader) ReadUint() (uint64, error) {
if err != nil {
return 0, err
}
- return parseUint(b, 10, 64)
+ return util.ParseUint(b, 10, 64)
}
// --------------------------------------------------------------------
@@ -303,7 +313,7 @@ func isNilReply(b []byte) bool {
}
func ParseErrorReply(line []byte) error {
- return internal.RedisError(string(line[1:]))
+ return RedisError(string(line[1:]))
}
func parseStatusValue(line []byte) []byte {
@@ -312,23 +322,7 @@ func parseStatusValue(line []byte) []byte {
func parseArrayLen(line []byte) (int64, error) {
if isNilReply(line) {
- return 0, internal.Nil
+ return 0, Nil
}
- return parseInt(line[1:], 10, 64)
-}
-
-func atoi(b []byte) (int, error) {
- return strconv.Atoi(internal.BytesToString(b))
-}
-
-func parseInt(b []byte, base int, bitSize int) (int64, error) {
- return strconv.ParseInt(internal.BytesToString(b), base, bitSize)
-}
-
-func parseUint(b []byte, base int, bitSize int) (uint64, error) {
- return strconv.ParseUint(internal.BytesToString(b), base, bitSize)
-}
-
-func parseFloat(b []byte, bitSize int) (float64, error) {
- return strconv.ParseFloat(internal.BytesToString(b), bitSize)
+ return util.ParseInt(line[1:], 10, 64)
}
diff --git a/vendor/github.com/go-redis/redis/internal/proto/reader_test.go b/vendor/github.com/go-redis/redis/internal/proto/reader_test.go
deleted file mode 100644
index 8d2d71be9..000000000
--- a/vendor/github.com/go-redis/redis/internal/proto/reader_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package proto_test
-
-import (
- "bytes"
- "strings"
- "testing"
-
- "github.com/go-redis/redis/internal/proto"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Reader", func() {
-
- It("should read n bytes", func() {
- data, err := proto.NewReader(strings.NewReader("ABCDEFGHIJKLMNO")).ReadN(10)
- Expect(err).NotTo(HaveOccurred())
- Expect(len(data)).To(Equal(10))
- Expect(string(data)).To(Equal("ABCDEFGHIJ"))
-
- data, err = proto.NewReader(strings.NewReader(strings.Repeat("x", 8192))).ReadN(6000)
- Expect(err).NotTo(HaveOccurred())
- Expect(len(data)).To(Equal(6000))
- })
-
- It("should read lines", func() {
- p := proto.NewReader(strings.NewReader("$5\r\nhello\r\n"))
-
- data, err := p.ReadLine()
- Expect(err).NotTo(HaveOccurred())
- Expect(string(data)).To(Equal("$5"))
-
- data, err = p.ReadLine()
- Expect(err).NotTo(HaveOccurred())
- Expect(string(data)).To(Equal("hello"))
- })
-
-})
-
-func BenchmarkReader_ParseReply_Status(b *testing.B) {
- benchmarkParseReply(b, "+OK\r\n", nil, false)
-}
-
-func BenchmarkReader_ParseReply_Int(b *testing.B) {
- benchmarkParseReply(b, ":1\r\n", nil, false)
-}
-
-func BenchmarkReader_ParseReply_Error(b *testing.B) {
- benchmarkParseReply(b, "-Error message\r\n", nil, true)
-}
-
-func BenchmarkReader_ParseReply_String(b *testing.B) {
- benchmarkParseReply(b, "$5\r\nhello\r\n", nil, false)
-}
-
-func BenchmarkReader_ParseReply_Slice(b *testing.B) {
- benchmarkParseReply(b, "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n", multiBulkParse, false)
-}
-
-func benchmarkParseReply(b *testing.B, reply string, m proto.MultiBulkParse, wanterr bool) {
- buf := new(bytes.Buffer)
- for i := 0; i < b.N; i++ {
- buf.WriteString(reply)
- }
- p := proto.NewReader(buf)
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- _, err := p.ReadReply(m)
- if !wanterr && err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func multiBulkParse(p *proto.Reader, n int64) (interface{}, error) {
- vv := make([]interface{}, 0, n)
- for i := int64(0); i < n; i++ {
- v, err := p.ReadReply(multiBulkParse)
- if err != nil {
- return nil, err
- }
- vv = append(vv, v)
- }
- return vv, nil
-}
diff --git a/vendor/github.com/go-redis/redis/internal/proto/scan.go b/vendor/github.com/go-redis/redis/internal/proto/scan.go
index 0329ffd99..3bdb33f9d 100644
--- a/vendor/github.com/go-redis/redis/internal/proto/scan.go
+++ b/vendor/github.com/go-redis/redis/internal/proto/scan.go
@@ -5,7 +5,7 @@ import (
"fmt"
"reflect"
- "github.com/go-redis/redis/internal"
+ "github.com/go-redis/redis/internal/util"
)
func Scan(b []byte, v interface{}) error {
@@ -13,80 +13,80 @@ func Scan(b []byte, v interface{}) error {
case nil:
return fmt.Errorf("redis: Scan(nil)")
case *string:
- *v = internal.BytesToString(b)
+ *v = util.BytesToString(b)
return nil
case *[]byte:
*v = b
return nil
case *int:
var err error
- *v, err = atoi(b)
+ *v, err = util.Atoi(b)
return err
case *int8:
- n, err := parseInt(b, 10, 8)
+ n, err := util.ParseInt(b, 10, 8)
if err != nil {
return err
}
*v = int8(n)
return nil
case *int16:
- n, err := parseInt(b, 10, 16)
+ n, err := util.ParseInt(b, 10, 16)
if err != nil {
return err
}
*v = int16(n)
return nil
case *int32:
- n, err := parseInt(b, 10, 32)
+ n, err := util.ParseInt(b, 10, 32)
if err != nil {
return err
}
*v = int32(n)
return nil
case *int64:
- n, err := parseInt(b, 10, 64)
+ n, err := util.ParseInt(b, 10, 64)
if err != nil {
return err
}
*v = n
return nil
case *uint:
- n, err := parseUint(b, 10, 64)
+ n, err := util.ParseUint(b, 10, 64)
if err != nil {
return err
}
*v = uint(n)
return nil
case *uint8:
- n, err := parseUint(b, 10, 8)
+ n, err := util.ParseUint(b, 10, 8)
if err != nil {
return err
}
*v = uint8(n)
return nil
case *uint16:
- n, err := parseUint(b, 10, 16)
+ n, err := util.ParseUint(b, 10, 16)
if err != nil {
return err
}
*v = uint16(n)
return nil
case *uint32:
- n, err := parseUint(b, 10, 32)
+ n, err := util.ParseUint(b, 10, 32)
if err != nil {
return err
}
*v = uint32(n)
return nil
case *uint64:
- n, err := parseUint(b, 10, 64)
+ n, err := util.ParseUint(b, 10, 64)
if err != nil {
return err
}
*v = n
return nil
case *float32:
- n, err := parseFloat(b, 32)
+ n, err := util.ParseFloat(b, 32)
if err != nil {
return err
}
@@ -94,7 +94,7 @@ func Scan(b []byte, v interface{}) error {
return err
case *float64:
var err error
- *v, err = parseFloat(b, 64)
+ *v, err = util.ParseFloat(b, 64)
return err
case *bool:
*v = len(b) == 1 && b[0] == '1'
@@ -120,7 +120,7 @@ func ScanSlice(data []string, slice interface{}) error {
return fmt.Errorf("redis: ScanSlice(non-slice %T)", slice)
}
- next := internal.MakeSliceNextElemFunc(v)
+ next := makeSliceNextElemFunc(v)
for i, s := range data {
elem := next()
if err := Scan([]byte(s), elem.Addr().Interface()); err != nil {
@@ -131,3 +131,36 @@ func ScanSlice(data []string, slice interface{}) error {
return nil
}
+
+func makeSliceNextElemFunc(v reflect.Value) func() reflect.Value {
+ elemType := v.Type().Elem()
+
+ if elemType.Kind() == reflect.Ptr {
+ elemType = elemType.Elem()
+ return func() reflect.Value {
+ if v.Len() < v.Cap() {
+ v.Set(v.Slice(0, v.Len()+1))
+ elem := v.Index(v.Len() - 1)
+ if elem.IsNil() {
+ elem.Set(reflect.New(elemType))
+ }
+ return elem.Elem()
+ }
+
+ elem := reflect.New(elemType)
+ v.Set(reflect.Append(v, elem))
+ return elem.Elem()
+ }
+ }
+
+ zero := reflect.Zero(elemType)
+ return func() reflect.Value {
+ if v.Len() < v.Cap() {
+ v.Set(v.Slice(0, v.Len()+1))
+ return v.Index(v.Len() - 1)
+ }
+
+ v.Set(reflect.Append(v, zero))
+ return v.Index(v.Len() - 1)
+ }
+}
diff --git a/vendor/github.com/go-redis/redis/internal/proto/scan_test.go b/vendor/github.com/go-redis/redis/internal/proto/scan_test.go
deleted file mode 100644
index fadcd0561..000000000
--- a/vendor/github.com/go-redis/redis/internal/proto/scan_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package proto
-
-import (
- "encoding/json"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-type testScanSliceStruct struct {
- ID int
- Name string
-}
-
-func (s *testScanSliceStruct) MarshalBinary() ([]byte, error) {
- return json.Marshal(s)
-}
-
-func (s *testScanSliceStruct) UnmarshalBinary(b []byte) error {
- return json.Unmarshal(b, s)
-}
-
-var _ = Describe("ScanSlice", func() {
- data := []string{
- `{"ID":-1,"Name":"Back Yu"}`,
- `{"ID":1,"Name":"szyhf"}`,
- }
-
- It("[]testScanSliceStruct", func() {
- var slice []testScanSliceStruct
- err := ScanSlice(data, &slice)
- Expect(err).NotTo(HaveOccurred())
- Expect(slice).To(Equal([]testScanSliceStruct{
- {-1, "Back Yu"},
- {1, "szyhf"},
- }))
- })
-
- It("var testContainer []*testScanSliceStruct", func() {
- var slice []*testScanSliceStruct
- err := ScanSlice(data, &slice)
- Expect(err).NotTo(HaveOccurred())
- Expect(slice).To(Equal([]*testScanSliceStruct{
- {-1, "Back Yu"},
- {1, "szyhf"},
- }))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/internal/proto/write_buffer.go b/vendor/github.com/go-redis/redis/internal/proto/write_buffer.go
index 096b6d76a..cc4014fb4 100644
--- a/vendor/github.com/go-redis/redis/internal/proto/write_buffer.go
+++ b/vendor/github.com/go-redis/redis/internal/proto/write_buffer.go
@@ -71,17 +71,15 @@ func (w *WriteBuffer) append(val interface{}) error {
} else {
w.AppendString("0")
}
- default:
- if bm, ok := val.(encoding.BinaryMarshaler); ok {
- bb, err := bm.MarshalBinary()
- if err != nil {
- return err
- }
- w.AppendBytes(bb)
- } else {
- return fmt.Errorf(
- "redis: can't marshal %T (consider implementing encoding.BinaryMarshaler)", val)
+ case encoding.BinaryMarshaler:
+ b, err := v.MarshalBinary()
+ if err != nil {
+ return err
}
+ w.AppendBytes(b)
+ default:
+ return fmt.Errorf(
+ "redis: can't marshal %T (consider implementing encoding.BinaryMarshaler)", val)
}
return nil
}
diff --git a/vendor/github.com/go-redis/redis/internal/proto/write_buffer_test.go b/vendor/github.com/go-redis/redis/internal/proto/write_buffer_test.go
deleted file mode 100644
index 84799ff3b..000000000
--- a/vendor/github.com/go-redis/redis/internal/proto/write_buffer_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package proto_test
-
-import (
- "testing"
- "time"
-
- "github.com/go-redis/redis/internal/proto"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("WriteBuffer", func() {
- var buf *proto.WriteBuffer
-
- BeforeEach(func() {
- buf = proto.NewWriteBuffer()
- })
-
- It("should reset", func() {
- buf.AppendString("string")
- Expect(buf.Len()).To(Equal(12))
- buf.Reset()
- Expect(buf.Len()).To(Equal(0))
- })
-
- It("should append args", func() {
- err := buf.Append([]interface{}{
- "string",
- 12,
- 34.56,
- []byte{'b', 'y', 't', 'e', 's'},
- true,
- nil,
- })
- Expect(err).NotTo(HaveOccurred())
- Expect(buf.Bytes()).To(Equal([]byte("*6\r\n" +
- "$6\r\nstring\r\n" +
- "$2\r\n12\r\n" +
- "$5\r\n34.56\r\n" +
- "$5\r\nbytes\r\n" +
- "$1\r\n1\r\n" +
- "$0\r\n" +
- "\r\n")))
- })
-
- It("should append marshalable args", func() {
- err := buf.Append([]interface{}{time.Unix(1414141414, 0)})
- Expect(err).NotTo(HaveOccurred())
- Expect(buf.Len()).To(Equal(26))
- })
-
-})
-
-func BenchmarkWriteBuffer_Append(b *testing.B) {
- buf := proto.NewWriteBuffer()
- args := []interface{}{"hello", "world", "foo", "bar"}
-
- for i := 0; i < b.N; i++ {
- buf.Append(args)
- buf.Reset()
- }
-}
diff --git a/vendor/github.com/go-redis/redis/internal/singleflight/singleflight.go b/vendor/github.com/go-redis/redis/internal/singleflight/singleflight.go
new file mode 100644
index 000000000..3b1741724
--- /dev/null
+++ b/vendor/github.com/go-redis/redis/internal/singleflight/singleflight.go
@@ -0,0 +1,64 @@
+/*
+Copyright 2013 Google Inc.
+
+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.
+*/
+
+// Package singleflight provides a duplicate function call suppression
+// mechanism.
+package singleflight
+
+import "sync"
+
+// call is an in-flight or completed Do call
+type call struct {
+ wg sync.WaitGroup
+ val interface{}
+ err error
+}
+
+// Group represents a class of work and forms a namespace in which
+// units of work can be executed with duplicate suppression.
+type Group struct {
+ mu sync.Mutex // protects m
+ m map[string]*call // lazily initialized
+}
+
+// Do executes and returns the results of the given function, making
+// sure that only one execution is in-flight for a given key at a
+// time. If a duplicate comes in, the duplicate caller waits for the
+// original to complete and receives the same results.
+func (g *Group) Do(key string, fn func() (interface{}, error)) (interface{}, error) {
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ g.mu.Unlock()
+ c.wg.Wait()
+ return c.val, c.err
+ }
+ c := new(call)
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ c.val, c.err = fn()
+ c.wg.Done()
+
+ g.mu.Lock()
+ delete(g.m, key)
+ g.mu.Unlock()
+
+ return c.val, c.err
+}
diff --git a/vendor/github.com/go-redis/redis/internal/util.go b/vendor/github.com/go-redis/redis/internal/util.go
index 1ba9805fe..ffd2353e0 100644
--- a/vendor/github.com/go-redis/redis/internal/util.go
+++ b/vendor/github.com/go-redis/redis/internal/util.go
@@ -1,6 +1,6 @@
package internal
-import "reflect"
+import "github.com/go-redis/redis/internal/util"
func ToLower(s string) string {
if isLower(s) {
@@ -15,7 +15,7 @@ func ToLower(s string) string {
}
b[i] = c
}
- return BytesToString(b)
+ return util.BytesToString(b)
}
func isLower(s string) bool {
@@ -27,36 +27,3 @@ func isLower(s string) bool {
}
return true
}
-
-func MakeSliceNextElemFunc(v reflect.Value) func() reflect.Value {
- elemType := v.Type().Elem()
-
- if elemType.Kind() == reflect.Ptr {
- elemType = elemType.Elem()
- return func() reflect.Value {
- if v.Len() < v.Cap() {
- v.Set(v.Slice(0, v.Len()+1))
- elem := v.Index(v.Len() - 1)
- if elem.IsNil() {
- elem.Set(reflect.New(elemType))
- }
- return elem.Elem()
- }
-
- elem := reflect.New(elemType)
- v.Set(reflect.Append(v, elem))
- return elem.Elem()
- }
- }
-
- zero := reflect.Zero(elemType)
- return func() reflect.Value {
- if v.Len() < v.Cap() {
- v.Set(v.Slice(0, v.Len()+1))
- return v.Index(v.Len() - 1)
- }
-
- v.Set(reflect.Append(v, zero))
- return v.Index(v.Len() - 1)
- }
-}
diff --git a/vendor/github.com/go-redis/redis/internal/safe.go b/vendor/github.com/go-redis/redis/internal/util/safe.go
index dc5f4cc8a..cd8918330 100644
--- a/vendor/github.com/go-redis/redis/internal/safe.go
+++ b/vendor/github.com/go-redis/redis/internal/util/safe.go
@@ -1,6 +1,6 @@
// +build appengine
-package internal
+package util
func BytesToString(b []byte) string {
return string(b)
diff --git a/vendor/github.com/go-redis/redis/internal/util/strconv.go b/vendor/github.com/go-redis/redis/internal/util/strconv.go
new file mode 100644
index 000000000..db5033802
--- /dev/null
+++ b/vendor/github.com/go-redis/redis/internal/util/strconv.go
@@ -0,0 +1,19 @@
+package util
+
+import "strconv"
+
+func Atoi(b []byte) (int, error) {
+ return strconv.Atoi(BytesToString(b))
+}
+
+func ParseInt(b []byte, base int, bitSize int) (int64, error) {
+ return strconv.ParseInt(BytesToString(b), base, bitSize)
+}
+
+func ParseUint(b []byte, base int, bitSize int) (uint64, error) {
+ return strconv.ParseUint(BytesToString(b), base, bitSize)
+}
+
+func ParseFloat(b []byte, bitSize int) (float64, error) {
+ return strconv.ParseFloat(BytesToString(b), bitSize)
+}
diff --git a/vendor/github.com/go-redis/redis/internal/unsafe.go b/vendor/github.com/go-redis/redis/internal/util/unsafe.go
index 3ae48c14b..93a89c55c 100644
--- a/vendor/github.com/go-redis/redis/internal/unsafe.go
+++ b/vendor/github.com/go-redis/redis/internal/util/unsafe.go
@@ -1,6 +1,6 @@
// +build !appengine
-package internal
+package util
import (
"unsafe"
diff --git a/vendor/github.com/go-redis/redis/iterator_test.go b/vendor/github.com/go-redis/redis/iterator_test.go
deleted file mode 100644
index a2e623813..000000000
--- a/vendor/github.com/go-redis/redis/iterator_test.go
+++ /dev/null
@@ -1,136 +0,0 @@
-package redis_test
-
-import (
- "fmt"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("ScanIterator", func() {
- var client *redis.Client
-
- var seed = func(n int) error {
- pipe := client.Pipeline()
- for i := 1; i <= n; i++ {
- pipe.Set(fmt.Sprintf("K%02d", i), "x", 0).Err()
- }
- _, err := pipe.Exec()
- return err
- }
-
- var extraSeed = func(n int, m int) error {
- pipe := client.Pipeline()
- for i := 1; i <= m; i++ {
- pipe.Set(fmt.Sprintf("A%02d", i), "x", 0).Err()
- }
- for i := 1; i <= n; i++ {
- pipe.Set(fmt.Sprintf("K%02d", i), "x", 0).Err()
- }
- _, err := pipe.Exec()
- return err
- }
-
- var hashKey = "K_HASHTEST"
- var hashSeed = func(n int) error {
- pipe := client.Pipeline()
- for i := 1; i <= n; i++ {
- pipe.HSet(hashKey, fmt.Sprintf("K%02d", i), "x").Err()
- }
- _, err := pipe.Exec()
- return err
- }
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("should scan across empty DBs", func() {
- iter := client.Scan(0, "", 10).Iterator()
- Expect(iter.Next()).To(BeFalse())
- Expect(iter.Err()).NotTo(HaveOccurred())
- })
-
- It("should scan across one page", func() {
- Expect(seed(7)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.Scan(0, "", 0).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(ConsistOf([]string{"K01", "K02", "K03", "K04", "K05", "K06", "K07"}))
- })
-
- It("should scan across multiple pages", func() {
- Expect(seed(71)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.Scan(0, "", 10).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(HaveLen(71))
- Expect(vals).To(ContainElement("K01"))
- Expect(vals).To(ContainElement("K71"))
- })
-
- It("should hscan across multiple pages", func() {
- Expect(hashSeed(71)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.HScan(hashKey, 0, "", 10).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(HaveLen(71 * 2))
- Expect(vals).To(ContainElement("K01"))
- Expect(vals).To(ContainElement("K71"))
- })
-
- It("should scan to page borders", func() {
- Expect(seed(20)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.Scan(0, "", 10).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(HaveLen(20))
- })
-
- It("should scan with match", func() {
- Expect(seed(33)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.Scan(0, "K*2*", 10).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(HaveLen(13))
- })
-
- It("should scan with match across empty pages", func() {
- Expect(extraSeed(2, 10)).NotTo(HaveOccurred())
-
- var vals []string
- iter := client.Scan(0, "K*", 1).Iterator()
- for iter.Next() {
- vals = append(vals, iter.Val())
- }
- Expect(iter.Err()).NotTo(HaveOccurred())
- Expect(vals).To(HaveLen(2))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/main_test.go b/vendor/github.com/go-redis/redis/main_test.go
deleted file mode 100644
index 7c5a6a969..000000000
--- a/vendor/github.com/go-redis/redis/main_test.go
+++ /dev/null
@@ -1,351 +0,0 @@
-package redis_test
-
-import (
- "errors"
- "fmt"
- "net"
- "os"
- "os/exec"
- "path/filepath"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-const (
- redisPort = "6380"
- redisAddr = ":" + redisPort
- redisSecondaryPort = "6381"
-)
-
-const (
- ringShard1Port = "6390"
- ringShard2Port = "6391"
-)
-
-const (
- sentinelName = "mymaster"
- sentinelMasterPort = "8123"
- sentinelSlave1Port = "8124"
- sentinelSlave2Port = "8125"
- sentinelPort = "8126"
-)
-
-var (
- redisMain *redisProcess
- ringShard1, ringShard2 *redisProcess
- sentinelMaster, sentinelSlave1, sentinelSlave2, sentinel *redisProcess
-)
-
-var cluster = &clusterScenario{
- ports: []string{"8220", "8221", "8222", "8223", "8224", "8225"},
- nodeIds: make([]string, 6),
- processes: make(map[string]*redisProcess, 6),
- clients: make(map[string]*redis.Client, 6),
-}
-
-var _ = BeforeSuite(func() {
- var err error
-
- redisMain, err = startRedis(redisPort)
- Expect(err).NotTo(HaveOccurred())
-
- ringShard1, err = startRedis(ringShard1Port)
- Expect(err).NotTo(HaveOccurred())
-
- ringShard2, err = startRedis(ringShard2Port)
- Expect(err).NotTo(HaveOccurred())
-
- sentinelMaster, err = startRedis(sentinelMasterPort)
- Expect(err).NotTo(HaveOccurred())
-
- sentinel, err = startSentinel(sentinelPort, sentinelName, sentinelMasterPort)
- Expect(err).NotTo(HaveOccurred())
-
- sentinelSlave1, err = startRedis(
- sentinelSlave1Port, "--slaveof", "127.0.0.1", sentinelMasterPort)
- Expect(err).NotTo(HaveOccurred())
-
- sentinelSlave2, err = startRedis(
- sentinelSlave2Port, "--slaveof", "127.0.0.1", sentinelMasterPort)
- Expect(err).NotTo(HaveOccurred())
-
- Expect(startCluster(cluster)).NotTo(HaveOccurred())
-})
-
-var _ = AfterSuite(func() {
- Expect(redisMain.Close()).NotTo(HaveOccurred())
-
- Expect(ringShard1.Close()).NotTo(HaveOccurred())
- Expect(ringShard2.Close()).NotTo(HaveOccurred())
-
- Expect(sentinel.Close()).NotTo(HaveOccurred())
- Expect(sentinelSlave1.Close()).NotTo(HaveOccurred())
- Expect(sentinelSlave2.Close()).NotTo(HaveOccurred())
- Expect(sentinelMaster.Close()).NotTo(HaveOccurred())
-
- Expect(stopCluster(cluster)).NotTo(HaveOccurred())
-})
-
-func TestGinkgoSuite(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "go-redis")
-}
-
-//------------------------------------------------------------------------------
-
-func redisOptions() *redis.Options {
- return &redis.Options{
- Addr: redisAddr,
- DB: 15,
- DialTimeout: 10 * time.Second,
- ReadTimeout: 30 * time.Second,
- WriteTimeout: 30 * time.Second,
- PoolSize: 10,
- PoolTimeout: 30 * time.Second,
- IdleTimeout: 500 * time.Millisecond,
- IdleCheckFrequency: 500 * time.Millisecond,
- }
-}
-
-func redisClusterOptions() *redis.ClusterOptions {
- return &redis.ClusterOptions{
- DialTimeout: 10 * time.Second,
- ReadTimeout: 30 * time.Second,
- WriteTimeout: 30 * time.Second,
- PoolSize: 10,
- PoolTimeout: 30 * time.Second,
- IdleTimeout: 500 * time.Millisecond,
- IdleCheckFrequency: 500 * time.Millisecond,
- }
-}
-
-func redisRingOptions() *redis.RingOptions {
- return &redis.RingOptions{
- Addrs: map[string]string{
- "ringShardOne": ":" + ringShard1Port,
- "ringShardTwo": ":" + ringShard2Port,
- },
- DialTimeout: 10 * time.Second,
- ReadTimeout: 30 * time.Second,
- WriteTimeout: 30 * time.Second,
- PoolSize: 10,
- PoolTimeout: 30 * time.Second,
- IdleTimeout: 500 * time.Millisecond,
- IdleCheckFrequency: 500 * time.Millisecond,
- }
-}
-
-func perform(n int, cbs ...func(int)) {
- var wg sync.WaitGroup
- for _, cb := range cbs {
- for i := 0; i < n; i++ {
- wg.Add(1)
- go func(cb func(int), i int) {
- defer GinkgoRecover()
- defer wg.Done()
-
- cb(i)
- }(cb, i)
- }
- }
- wg.Wait()
-}
-
-func eventually(fn func() error, timeout time.Duration) error {
- var exit int32
- errCh := make(chan error)
- done := make(chan struct{})
-
- go func() {
- defer GinkgoRecover()
-
- for atomic.LoadInt32(&exit) == 0 {
- err := fn()
- if err == nil {
- close(done)
- return
- }
- select {
- case errCh <- err:
- default:
- }
- time.Sleep(timeout / 100)
- }
- }()
-
- select {
- case <-done:
- return nil
- case <-time.After(timeout):
- atomic.StoreInt32(&exit, 1)
- select {
- case err := <-errCh:
- return err
- default:
- return fmt.Errorf("timeout after %s", timeout)
- }
- }
-}
-
-func execCmd(name string, args ...string) (*os.Process, error) {
- cmd := exec.Command(name, args...)
- if testing.Verbose() {
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- }
- return cmd.Process, cmd.Start()
-}
-
-func connectTo(port string) (*redis.Client, error) {
- client := redis.NewClient(&redis.Options{
- Addr: ":" + port,
- })
-
- err := eventually(func() error {
- return client.Ping().Err()
- }, 30*time.Second)
- if err != nil {
- return nil, err
- }
-
- return client, nil
-}
-
-type redisProcess struct {
- *os.Process
- *redis.Client
-}
-
-func (p *redisProcess) Close() error {
- if err := p.Kill(); err != nil {
- return err
- }
-
- err := eventually(func() error {
- if err := p.Client.Ping().Err(); err != nil {
- return nil
- }
- return errors.New("client is not shutdown")
- }, 10*time.Second)
- if err != nil {
- return err
- }
-
- p.Client.Close()
- return nil
-}
-
-var (
- redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server"))
- redisServerConf, _ = filepath.Abs(filepath.Join("testdata", "redis.conf"))
-)
-
-func redisDir(port string) (string, error) {
- dir, err := filepath.Abs(filepath.Join("testdata", "instances", port))
- if err != nil {
- return "", err
- }
- if err := os.RemoveAll(dir); err != nil {
- return "", err
- }
- if err := os.MkdirAll(dir, 0775); err != nil {
- return "", err
- }
- return dir, nil
-}
-
-func startRedis(port string, args ...string) (*redisProcess, error) {
- dir, err := redisDir(port)
- if err != nil {
- return nil, err
- }
- if err = exec.Command("cp", "-f", redisServerConf, dir).Run(); err != nil {
- return nil, err
- }
-
- baseArgs := []string{filepath.Join(dir, "redis.conf"), "--port", port, "--dir", dir}
- process, err := execCmd(redisServerBin, append(baseArgs, args...)...)
- if err != nil {
- return nil, err
- }
-
- client, err := connectTo(port)
- if err != nil {
- process.Kill()
- return nil, err
- }
- return &redisProcess{process, client}, err
-}
-
-func startSentinel(port, masterName, masterPort string) (*redisProcess, error) {
- dir, err := redisDir(port)
- if err != nil {
- return nil, err
- }
- process, err := execCmd(redisServerBin, os.DevNull, "--sentinel", "--port", port, "--dir", dir)
- if err != nil {
- return nil, err
- }
- client, err := connectTo(port)
- if err != nil {
- process.Kill()
- return nil, err
- }
- for _, cmd := range []*redis.StatusCmd{
- redis.NewStatusCmd("SENTINEL", "MONITOR", masterName, "127.0.0.1", masterPort, "1"),
- redis.NewStatusCmd("SENTINEL", "SET", masterName, "down-after-milliseconds", "500"),
- redis.NewStatusCmd("SENTINEL", "SET", masterName, "failover-timeout", "1000"),
- redis.NewStatusCmd("SENTINEL", "SET", masterName, "parallel-syncs", "1"),
- } {
- client.Process(cmd)
- if err := cmd.Err(); err != nil {
- process.Kill()
- return nil, err
- }
- }
- return &redisProcess{process, client}, nil
-}
-
-//------------------------------------------------------------------------------
-
-type badConnError string
-
-func (e badConnError) Error() string { return string(e) }
-func (e badConnError) Timeout() bool { return false }
-func (e badConnError) Temporary() bool { return false }
-
-type badConn struct {
- net.TCPConn
-
- readDelay, writeDelay time.Duration
- readErr, writeErr error
-}
-
-var _ net.Conn = &badConn{}
-
-func (cn *badConn) Read([]byte) (int, error) {
- if cn.readDelay != 0 {
- time.Sleep(cn.readDelay)
- }
- if cn.readErr != nil {
- return 0, cn.readErr
- }
- return 0, badConnError("bad connection")
-}
-
-func (cn *badConn) Write([]byte) (int, error) {
- if cn.writeDelay != 0 {
- time.Sleep(cn.writeDelay)
- }
- if cn.writeErr != nil {
- return 0, cn.writeErr
- }
- return 0, badConnError("bad connection")
-}
diff --git a/vendor/github.com/go-redis/redis/options_test.go b/vendor/github.com/go-redis/redis/options_test.go
deleted file mode 100644
index 211f6b195..000000000
--- a/vendor/github.com/go-redis/redis/options_test.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// +build go1.7
-
-package redis
-
-import (
- "errors"
- "testing"
-)
-
-func TestParseURL(t *testing.T) {
- cases := []struct {
- u string
- addr string
- db int
- tls bool
- err error
- }{
- {
- "redis://localhost:123/1",
- "localhost:123",
- 1, false, nil,
- },
- {
- "redis://localhost:123",
- "localhost:123",
- 0, false, nil,
- },
- {
- "redis://localhost/1",
- "localhost:6379",
- 1, false, nil,
- },
- {
- "redis://12345",
- "12345:6379",
- 0, false, nil,
- },
- {
- "rediss://localhost:123",
- "localhost:123",
- 0, true, nil,
- },
- {
- "redis://localhost/?abc=123",
- "",
- 0, false, errors.New("no options supported"),
- },
- {
- "http://google.com",
- "",
- 0, false, errors.New("invalid redis URL scheme: http"),
- },
- {
- "redis://localhost/1/2/3/4",
- "",
- 0, false, errors.New("invalid redis URL path: /1/2/3/4"),
- },
- {
- "12345",
- "",
- 0, false, errors.New("invalid redis URL scheme: "),
- },
- {
- "redis://localhost/iamadatabase",
- "",
- 0, false, errors.New(`invalid redis database number: "iamadatabase"`),
- },
- }
-
- for _, c := range cases {
- t.Run(c.u, func(t *testing.T) {
- o, err := ParseURL(c.u)
- if c.err == nil && err != nil {
- t.Fatalf("unexpected error: %q", err)
- return
- }
- if c.err != nil && err != nil {
- if c.err.Error() != err.Error() {
- t.Fatalf("got %q, expected %q", err, c.err)
- }
- return
- }
- if o.Addr != c.addr {
- t.Errorf("got %q, want %q", o.Addr, c.addr)
- }
- if o.DB != c.db {
- t.Errorf("got %q, expected %q", o.DB, c.db)
- }
- if c.tls && o.TLSConfig == nil {
- t.Errorf("got nil TLSConfig, expected a TLSConfig")
- }
- })
- }
-}
diff --git a/vendor/github.com/go-redis/redis/parser.go b/vendor/github.com/go-redis/redis/parser.go
index b378abc4e..f0dc67f0e 100644
--- a/vendor/github.com/go-redis/redis/parser.go
+++ b/vendor/github.com/go-redis/redis/parser.go
@@ -14,17 +14,23 @@ func sliceParser(rd *proto.Reader, n int64) (interface{}, error) {
vals := make([]interface{}, 0, n)
for i := int64(0); i < n; i++ {
v, err := rd.ReadReply(sliceParser)
- if err == Nil {
- vals = append(vals, nil)
- } else if err != nil {
- return nil, err
- } else {
- switch vv := v.(type) {
- case []byte:
- vals = append(vals, string(vv))
- default:
- vals = append(vals, v)
+ if err != nil {
+ if err == Nil {
+ vals = append(vals, nil)
+ continue
+ }
+ if err, ok := err.(proto.RedisError); ok {
+ vals = append(vals, err)
+ continue
}
+ return nil, err
+ }
+
+ switch v := v.(type) {
+ case []byte:
+ vals = append(vals, string(v))
+ default:
+ vals = append(vals, v)
}
}
return vals, nil
diff --git a/vendor/github.com/go-redis/redis/pipeline_test.go b/vendor/github.com/go-redis/redis/pipeline_test.go
deleted file mode 100644
index 11896c6bb..000000000
--- a/vendor/github.com/go-redis/redis/pipeline_test.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package redis_test
-
-import (
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("pipelining", func() {
- var client *redis.Client
- var pipe *redis.Pipeline
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("supports block style", func() {
- var get *redis.StringCmd
- cmds, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- get = pipe.Get("foo")
- return nil
- })
- Expect(err).To(Equal(redis.Nil))
- Expect(cmds).To(HaveLen(1))
- Expect(cmds[0]).To(Equal(get))
- Expect(get.Err()).To(Equal(redis.Nil))
- Expect(get.Val()).To(Equal(""))
- })
-
- assertPipeline := func() {
- It("returns no errors when there are no commands", func() {
- _, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- })
-
- It("discards queued commands", func() {
- pipe.Get("key")
- pipe.Discard()
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(BeNil())
- })
-
- It("handles val/err", func() {
- err := client.Set("key", "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- get := pipe.Get("key")
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(1))
-
- val, err := get.Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("value"))
- })
- }
-
- Describe("Pipeline", func() {
- BeforeEach(func() {
- pipe = client.Pipeline().(*redis.Pipeline)
- })
-
- assertPipeline()
- })
-
- Describe("TxPipeline", func() {
- BeforeEach(func() {
- pipe = client.TxPipeline().(*redis.Pipeline)
- })
-
- assertPipeline()
- })
-})
diff --git a/vendor/github.com/go-redis/redis/pool_test.go b/vendor/github.com/go-redis/redis/pool_test.go
deleted file mode 100644
index 0ca09adc7..000000000
--- a/vendor/github.com/go-redis/redis/pool_test.go
+++ /dev/null
@@ -1,143 +0,0 @@
-package redis_test
-
-import (
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("pool", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("respects max size", func() {
- perform(1000, func(id int) {
- val, err := client.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("PONG"))
- })
-
- pool := client.Pool()
- Expect(pool.Len()).To(BeNumerically("<=", 10))
- Expect(pool.FreeLen()).To(BeNumerically("<=", 10))
- Expect(pool.Len()).To(Equal(pool.FreeLen()))
- })
-
- It("respects max size on multi", func() {
- perform(1000, func(id int) {
- var ping *redis.StatusCmd
-
- err := client.Watch(func(tx *redis.Tx) error {
- cmds, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- ping = pipe.Ping()
- return nil
- })
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(1))
- return err
- })
- Expect(err).NotTo(HaveOccurred())
-
- Expect(ping.Err()).NotTo(HaveOccurred())
- Expect(ping.Val()).To(Equal("PONG"))
- })
-
- pool := client.Pool()
- Expect(pool.Len()).To(BeNumerically("<=", 10))
- Expect(pool.FreeLen()).To(BeNumerically("<=", 10))
- Expect(pool.Len()).To(Equal(pool.FreeLen()))
- })
-
- It("respects max size on pipelines", func() {
- perform(1000, func(id int) {
- pipe := client.Pipeline()
- ping := pipe.Ping()
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(1))
- Expect(ping.Err()).NotTo(HaveOccurred())
- Expect(ping.Val()).To(Equal("PONG"))
- Expect(pipe.Close()).NotTo(HaveOccurred())
- })
-
- pool := client.Pool()
- Expect(pool.Len()).To(BeNumerically("<=", 10))
- Expect(pool.FreeLen()).To(BeNumerically("<=", 10))
- Expect(pool.Len()).To(Equal(pool.FreeLen()))
- })
-
- It("removes broken connections", func() {
- cn, _, err := client.Pool().Get()
- Expect(err).NotTo(HaveOccurred())
- cn.SetNetConn(&badConn{})
- Expect(client.Pool().Put(cn)).NotTo(HaveOccurred())
-
- err = client.Ping().Err()
- Expect(err).To(MatchError("bad connection"))
-
- val, err := client.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("PONG"))
-
- pool := client.Pool()
- Expect(pool.Len()).To(Equal(1))
- Expect(pool.FreeLen()).To(Equal(1))
-
- stats := pool.Stats()
- Expect(stats.Hits).To(Equal(uint32(2)))
- Expect(stats.Misses).To(Equal(uint32(2)))
- Expect(stats.Timeouts).To(Equal(uint32(0)))
- })
-
- It("reuses connections", func() {
- for i := 0; i < 100; i++ {
- val, err := client.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("PONG"))
- }
-
- pool := client.Pool()
- Expect(pool.Len()).To(Equal(1))
- Expect(pool.FreeLen()).To(Equal(1))
-
- stats := pool.Stats()
- Expect(stats.Hits).To(Equal(uint32(100)))
- Expect(stats.Misses).To(Equal(uint32(1)))
- Expect(stats.Timeouts).To(Equal(uint32(0)))
- })
-
- It("removes idle connections", func() {
- stats := client.PoolStats()
- Expect(stats).To(Equal(&redis.PoolStats{
- Hits: 0,
- Misses: 1,
- Timeouts: 0,
- TotalConns: 1,
- FreeConns: 1,
- StaleConns: 0,
- }))
-
- time.Sleep(2 * time.Second)
-
- stats = client.PoolStats()
- Expect(stats).To(Equal(&redis.PoolStats{
- Hits: 0,
- Misses: 1,
- Timeouts: 0,
- TotalConns: 0,
- FreeConns: 0,
- StaleConns: 1,
- }))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/pubsub.go b/vendor/github.com/go-redis/redis/pubsub.go
index 3ee4ea9d0..b56728f3e 100644
--- a/vendor/github.com/go-redis/redis/pubsub.go
+++ b/vendor/github.com/go-redis/redis/pubsub.go
@@ -24,8 +24,8 @@ type PubSub struct {
mu sync.Mutex
cn *pool.Conn
- channels []string
- patterns []string
+ channels map[string]struct{}
+ patterns map[string]struct{}
closed bool
cmd *Cmd
@@ -67,12 +67,24 @@ func (c *PubSub) _conn(channels []string) (*pool.Conn, error) {
func (c *PubSub) resubscribe(cn *pool.Conn) error {
var firstErr error
if len(c.channels) > 0 {
- if err := c._subscribe(cn, "subscribe", c.channels...); err != nil && firstErr == nil {
+ channels := make([]string, len(c.channels))
+ i := 0
+ for channel := range c.channels {
+ channels[i] = channel
+ i++
+ }
+ if err := c._subscribe(cn, "subscribe", channels...); err != nil && firstErr == nil {
firstErr = err
}
}
if len(c.patterns) > 0 {
- if err := c._subscribe(cn, "psubscribe", c.patterns...); err != nil && firstErr == nil {
+ patterns := make([]string, len(c.patterns))
+ i := 0
+ for pattern := range c.patterns {
+ patterns[i] = pattern
+ i++
+ }
+ if err := c._subscribe(cn, "psubscribe", patterns...); err != nil && firstErr == nil {
firstErr = err
}
}
@@ -132,7 +144,12 @@ func (c *PubSub) Close() error {
func (c *PubSub) Subscribe(channels ...string) error {
c.mu.Lock()
err := c.subscribe("subscribe", channels...)
- c.channels = appendIfNotExists(c.channels, channels...)
+ if c.channels == nil {
+ c.channels = make(map[string]struct{})
+ }
+ for _, channel := range channels {
+ c.channels[channel] = struct{}{}
+ }
c.mu.Unlock()
return err
}
@@ -142,7 +159,12 @@ func (c *PubSub) Subscribe(channels ...string) error {
func (c *PubSub) PSubscribe(patterns ...string) error {
c.mu.Lock()
err := c.subscribe("psubscribe", patterns...)
- c.patterns = appendIfNotExists(c.patterns, patterns...)
+ if c.patterns == nil {
+ c.patterns = make(map[string]struct{})
+ }
+ for _, pattern := range patterns {
+ c.patterns[pattern] = struct{}{}
+ }
c.mu.Unlock()
return err
}
@@ -152,7 +174,9 @@ func (c *PubSub) PSubscribe(patterns ...string) error {
func (c *PubSub) Unsubscribe(channels ...string) error {
c.mu.Lock()
err := c.subscribe("unsubscribe", channels...)
- c.channels = remove(c.channels, channels...)
+ for _, channel := range channels {
+ delete(c.channels, channel)
+ }
c.mu.Unlock()
return err
}
@@ -162,7 +186,9 @@ func (c *PubSub) Unsubscribe(channels ...string) error {
func (c *PubSub) PUnsubscribe(patterns ...string) error {
c.mu.Lock()
err := c.subscribe("punsubscribe", patterns...)
- c.patterns = remove(c.patterns, patterns...)
+ for _, pattern := range patterns {
+ delete(c.patterns, pattern)
+ }
c.mu.Unlock()
return err
}
@@ -371,31 +397,3 @@ func (c *PubSub) Channel() <-chan *Message {
})
return c.ch
}
-
-func appendIfNotExists(ss []string, es ...string) []string {
-loop:
- for _, e := range es {
- for _, s := range ss {
- if s == e {
- continue loop
- }
- }
- ss = append(ss, e)
- }
- return ss
-}
-
-func remove(ss []string, es ...string) []string {
- if len(es) == 0 {
- return ss[:0]
- }
- for _, e := range es {
- for i, s := range ss {
- if s == e {
- ss = append(ss[:i], ss[i+1:]...)
- break
- }
- }
- }
- return ss
-}
diff --git a/vendor/github.com/go-redis/redis/pubsub_test.go b/vendor/github.com/go-redis/redis/pubsub_test.go
deleted file mode 100644
index 6a85bd038..000000000
--- a/vendor/github.com/go-redis/redis/pubsub_test.go
+++ /dev/null
@@ -1,443 +0,0 @@
-package redis_test
-
-import (
- "io"
- "net"
- "sync"
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("PubSub", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("should support pattern matching", func() {
- pubsub := client.PSubscribe("mychannel*")
- defer pubsub.Close()
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("psubscribe"))
- Expect(subscr.Channel).To(Equal("mychannel*"))
- Expect(subscr.Count).To(Equal(1))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err.(net.Error).Timeout()).To(Equal(true))
- Expect(msgi).To(BeNil())
- }
-
- n, err := client.Publish("mychannel1", "hello").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- Expect(pubsub.PUnsubscribe("mychannel*")).NotTo(HaveOccurred())
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Message)
- Expect(subscr.Channel).To(Equal("mychannel1"))
- Expect(subscr.Pattern).To(Equal("mychannel*"))
- Expect(subscr.Payload).To(Equal("hello"))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("punsubscribe"))
- Expect(subscr.Channel).To(Equal("mychannel*"))
- Expect(subscr.Count).To(Equal(0))
- }
-
- stats := client.PoolStats()
- Expect(stats.Misses).To(Equal(uint32(2)))
- })
-
- It("should pub/sub channels", func() {
- channels, err := client.PubSubChannels("mychannel*").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(channels).To(BeEmpty())
-
- pubsub := client.Subscribe("mychannel", "mychannel2")
- defer pubsub.Close()
-
- channels, err = client.PubSubChannels("mychannel*").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(channels).To(ConsistOf([]string{"mychannel", "mychannel2"}))
-
- channels, err = client.PubSubChannels("").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(channels).To(BeEmpty())
-
- channels, err = client.PubSubChannels("*").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(len(channels)).To(BeNumerically(">=", 2))
- })
-
- It("should return the numbers of subscribers", func() {
- pubsub := client.Subscribe("mychannel", "mychannel2")
- defer pubsub.Close()
-
- channels, err := client.PubSubNumSub("mychannel", "mychannel2", "mychannel3").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(channels).To(Equal(map[string]int64{
- "mychannel": 1,
- "mychannel2": 1,
- "mychannel3": 0,
- }))
- })
-
- It("should return the numbers of subscribers by pattern", func() {
- num, err := client.PubSubNumPat().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(num).To(Equal(int64(0)))
-
- pubsub := client.PSubscribe("*")
- defer pubsub.Close()
-
- num, err = client.PubSubNumPat().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(num).To(Equal(int64(1)))
- })
-
- It("should pub/sub", func() {
- pubsub := client.Subscribe("mychannel", "mychannel2")
- defer pubsub.Close()
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("subscribe"))
- Expect(subscr.Channel).To(Equal("mychannel"))
- Expect(subscr.Count).To(Equal(1))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("subscribe"))
- Expect(subscr.Channel).To(Equal("mychannel2"))
- Expect(subscr.Count).To(Equal(2))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err.(net.Error).Timeout()).To(Equal(true))
- Expect(msgi).NotTo(HaveOccurred())
- }
-
- n, err := client.Publish("mychannel", "hello").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- n, err = client.Publish("mychannel2", "hello2").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
-
- Expect(pubsub.Unsubscribe("mychannel", "mychannel2")).NotTo(HaveOccurred())
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- msg := msgi.(*redis.Message)
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("hello"))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- msg := msgi.(*redis.Message)
- Expect(msg.Channel).To(Equal("mychannel2"))
- Expect(msg.Payload).To(Equal("hello2"))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("unsubscribe"))
- Expect(subscr.Channel).To(Equal("mychannel"))
- Expect(subscr.Count).To(Equal(1))
- }
-
- {
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- subscr := msgi.(*redis.Subscription)
- Expect(subscr.Kind).To(Equal("unsubscribe"))
- Expect(subscr.Channel).To(Equal("mychannel2"))
- Expect(subscr.Count).To(Equal(0))
- }
-
- stats := client.PoolStats()
- Expect(stats.Misses).To(Equal(uint32(2)))
- })
-
- It("should ping/pong", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- _, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
-
- err = pubsub.Ping("")
- Expect(err).NotTo(HaveOccurred())
-
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- pong := msgi.(*redis.Pong)
- Expect(pong.Payload).To(Equal(""))
- })
-
- It("should ping/pong with payload", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- _, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
-
- err = pubsub.Ping("hello")
- Expect(err).NotTo(HaveOccurred())
-
- msgi, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- pong := msgi.(*redis.Pong)
- Expect(pong.Payload).To(Equal("hello"))
- })
-
- It("should multi-ReceiveMessage", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- subscr, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- Expect(subscr).To(Equal(&redis.Subscription{
- Kind: "subscribe",
- Channel: "mychannel",
- Count: 1,
- }))
-
- err = client.Publish("mychannel", "hello").Err()
- Expect(err).NotTo(HaveOccurred())
-
- err = client.Publish("mychannel", "world").Err()
- Expect(err).NotTo(HaveOccurred())
-
- msg, err := pubsub.ReceiveMessage()
- Expect(err).NotTo(HaveOccurred())
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("hello"))
-
- msg, err = pubsub.ReceiveMessage()
- Expect(err).NotTo(HaveOccurred())
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("world"))
- })
-
- It("should ReceiveMessage after timeout", func() {
- timeout := 100 * time.Millisecond
-
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- subscr, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- Expect(subscr).To(Equal(&redis.Subscription{
- Kind: "subscribe",
- Channel: "mychannel",
- Count: 1,
- }))
-
- done := make(chan bool, 1)
- go func() {
- defer GinkgoRecover()
- defer func() {
- done <- true
- }()
-
- time.Sleep(timeout + 100*time.Millisecond)
- n, err := client.Publish("mychannel", "hello").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
- }()
-
- msg, err := pubsub.ReceiveMessageTimeout(timeout)
- Expect(err).NotTo(HaveOccurred())
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("hello"))
-
- Eventually(done).Should(Receive())
-
- stats := client.PoolStats()
- Expect(stats.Hits).To(Equal(uint32(1)))
- Expect(stats.Misses).To(Equal(uint32(1)))
- })
-
- It("returns an error when subscribe fails", func() {
- pubsub := client.Subscribe()
- defer pubsub.Close()
-
- pubsub.SetNetConn(&badConn{
- readErr: io.EOF,
- writeErr: io.EOF,
- })
-
- err := pubsub.Subscribe("mychannel")
- Expect(err).To(MatchError("EOF"))
-
- err = pubsub.Subscribe("mychannel")
- Expect(err).NotTo(HaveOccurred())
- })
-
- expectReceiveMessageOnError := func(pubsub *redis.PubSub) {
- pubsub.SetNetConn(&badConn{
- readErr: io.EOF,
- writeErr: io.EOF,
- })
-
- done := make(chan bool, 1)
- go func() {
- defer GinkgoRecover()
- defer func() {
- done <- true
- }()
-
- time.Sleep(100 * time.Millisecond)
- err := client.Publish("mychannel", "hello").Err()
- Expect(err).NotTo(HaveOccurred())
- }()
-
- msg, err := pubsub.ReceiveMessage()
- Expect(err).NotTo(HaveOccurred())
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("hello"))
-
- Eventually(done).Should(Receive())
- }
-
- It("Subscribe should reconnect on ReceiveMessage error", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- subscr, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- Expect(subscr).To(Equal(&redis.Subscription{
- Kind: "subscribe",
- Channel: "mychannel",
- Count: 1,
- }))
-
- expectReceiveMessageOnError(pubsub)
- })
-
- It("PSubscribe should reconnect on ReceiveMessage error", func() {
- pubsub := client.PSubscribe("mychannel")
- defer pubsub.Close()
-
- subscr, err := pubsub.ReceiveTimeout(time.Second)
- Expect(err).NotTo(HaveOccurred())
- Expect(subscr).To(Equal(&redis.Subscription{
- Kind: "psubscribe",
- Channel: "mychannel",
- Count: 1,
- }))
-
- expectReceiveMessageOnError(pubsub)
- })
-
- It("should return on Close", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- var wg sync.WaitGroup
- wg.Add(1)
- go func() {
- defer GinkgoRecover()
-
- wg.Done()
- defer wg.Done()
-
- _, err := pubsub.ReceiveMessage()
- Expect(err).To(HaveOccurred())
- Expect(err).To(SatisfyAny(
- MatchError("redis: client is closed"),
- MatchError("use of closed network connection"), // Go 1.4
- ))
- }()
-
- wg.Wait()
- wg.Add(1)
-
- Expect(pubsub.Close()).NotTo(HaveOccurred())
-
- wg.Wait()
- })
-
- It("should ReceiveMessage without a subscription", func() {
- timeout := 100 * time.Millisecond
-
- pubsub := client.Subscribe()
- defer pubsub.Close()
-
- var wg sync.WaitGroup
- wg.Add(1)
- go func() {
- defer GinkgoRecover()
- defer wg.Done()
-
- time.Sleep(2 * timeout)
-
- err := pubsub.Subscribe("mychannel")
- Expect(err).NotTo(HaveOccurred())
-
- time.Sleep(timeout)
-
- err = client.Publish("mychannel", "hello").Err()
- Expect(err).NotTo(HaveOccurred())
- }()
-
- msg, err := pubsub.ReceiveMessageTimeout(timeout)
- Expect(err).NotTo(HaveOccurred())
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal("hello"))
-
- wg.Wait()
- })
-
- It("handles big message payload", func() {
- pubsub := client.Subscribe("mychannel")
- defer pubsub.Close()
-
- ch := pubsub.Channel()
-
- bigVal := bigVal()
- err := client.Publish("mychannel", bigVal).Err()
- Expect(err).NotTo(HaveOccurred())
-
- var msg *redis.Message
- Eventually(ch).Should(Receive(&msg))
- Expect(msg.Channel).To(Equal("mychannel"))
- Expect(msg.Payload).To(Equal(string(bigVal)))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/race_test.go b/vendor/github.com/go-redis/redis/race_test.go
deleted file mode 100644
index 14264086c..000000000
--- a/vendor/github.com/go-redis/redis/race_test.go
+++ /dev/null
@@ -1,250 +0,0 @@
-package redis_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "strconv"
- "testing"
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("races", func() {
- var client *redis.Client
- var C, N int
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).To(BeNil())
-
- C, N = 10, 1000
- if testing.Short() {
- C = 4
- N = 100
- }
- })
-
- AfterEach(func() {
- err := client.Close()
- Expect(err).NotTo(HaveOccurred())
- })
-
- It("should echo", func() {
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- msg := fmt.Sprintf("echo %d %d", id, i)
- echo, err := client.Echo(msg).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(echo).To(Equal(msg))
- }
- })
- })
-
- It("should incr", func() {
- key := "TestIncrFromGoroutines"
-
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- err := client.Incr(key).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- })
-
- val, err := client.Get(key).Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal(int64(C * N)))
- })
-
- It("should handle many keys", func() {
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- err := client.Set(
- fmt.Sprintf("keys.key-%d-%d", id, i),
- fmt.Sprintf("hello-%d-%d", id, i),
- 0,
- ).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- })
-
- keys := client.Keys("keys.*")
- Expect(keys.Err()).NotTo(HaveOccurred())
- Expect(len(keys.Val())).To(Equal(C * N))
- })
-
- It("should handle many keys 2", func() {
- perform(C, func(id int) {
- keys := []string{"non-existent-key"}
- for i := 0; i < N; i++ {
- key := fmt.Sprintf("keys.key-%d", i)
- keys = append(keys, key)
-
- err := client.Set(key, fmt.Sprintf("hello-%d", i), 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- keys = append(keys, "non-existent-key")
-
- vals, err := client.MGet(keys...).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(len(vals)).To(Equal(N + 2))
-
- for i := 0; i < N; i++ {
- Expect(vals[i+1]).To(Equal(fmt.Sprintf("hello-%d", i)))
- }
-
- Expect(vals[0]).To(BeNil())
- Expect(vals[N+1]).To(BeNil())
- })
- })
-
- It("should handle big vals in Get", func() {
- C, N = 4, 100
-
- bigVal := bigVal()
-
- err := client.Set("key", bigVal, 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- // Reconnect to get new connection.
- Expect(client.Close()).To(BeNil())
- client = redis.NewClient(redisOptions())
-
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- got, err := client.Get("key").Bytes()
- Expect(err).NotTo(HaveOccurred())
- Expect(got).To(Equal(bigVal))
- }
- })
- })
-
- It("should handle big vals in Set", func() {
- C, N = 4, 100
-
- bigVal := bigVal()
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- err := client.Set("key", bigVal, 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- })
- })
-
- It("should select db", func() {
- err := client.Set("db", 1, 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- perform(C, func(id int) {
- opt := redisOptions()
- opt.DB = id
- client := redis.NewClient(opt)
- for i := 0; i < N; i++ {
- err := client.Set("db", id, 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- n, err := client.Get("db").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(id)))
- }
- err := client.Close()
- Expect(err).NotTo(HaveOccurred())
- })
-
- n, err := client.Get("db").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(1)))
- })
-
- It("should select DB with read timeout", func() {
- perform(C, func(id int) {
- opt := redisOptions()
- opt.DB = id
- opt.ReadTimeout = time.Nanosecond
- client := redis.NewClient(opt)
-
- perform(C, func(id int) {
- err := client.Ping().Err()
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- err := client.Close()
- Expect(err).NotTo(HaveOccurred())
- })
- })
-
- It("should Watch/Unwatch", func() {
- err := client.Set("key", "0", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- perform(C, func(id int) {
- for i := 0; i < N; i++ {
- err := client.Watch(func(tx *redis.Tx) error {
- val, err := tx.Get("key").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).NotTo(Equal(redis.Nil))
-
- num, err := strconv.ParseInt(val, 10, 64)
- Expect(err).NotTo(HaveOccurred())
-
- cmds, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set("key", strconv.FormatInt(num+1, 10), 0)
- return nil
- })
- Expect(cmds).To(HaveLen(1))
- return err
- }, "key")
- if err == redis.TxFailedErr {
- i--
- continue
- }
- Expect(err).NotTo(HaveOccurred())
- }
- })
-
- val, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal(int64(C * N)))
- })
-
- It("should Pipeline", func() {
- perform(C, func(id int) {
- pipe := client.Pipeline()
- for i := 0; i < N; i++ {
- pipe.Echo(fmt.Sprint(i))
- }
-
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(N))
-
- for i := 0; i < N; i++ {
- Expect(cmds[i].(*redis.StringCmd).Val()).To(Equal(fmt.Sprint(i)))
- }
- })
- })
-
- It("should Pipeline", func() {
- pipe := client.Pipeline()
- perform(N, func(id int) {
- pipe.Incr("key")
- })
-
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(N))
-
- n, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(N)))
- })
-})
-
-func bigVal() []byte {
- return bytes.Repeat([]byte{'*'}, 1<<17) // 128kb
-}
diff --git a/vendor/github.com/go-redis/redis/redis.go b/vendor/github.com/go-redis/redis/redis.go
index cf402986d..7a606b70e 100644
--- a/vendor/github.com/go-redis/redis/redis.go
+++ b/vendor/github.com/go-redis/redis/redis.go
@@ -1,6 +1,7 @@
package redis
import (
+ "context"
"fmt"
"log"
"os"
@@ -11,8 +12,8 @@ import (
"github.com/go-redis/redis/internal/proto"
)
-// Nil reply redis returned when key does not exist.
-const Nil = internal.Nil
+// Nil reply Redis returns when key does not exist.
+const Nil = proto.Nil
func init() {
SetLogger(log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile))
@@ -22,6 +23,17 @@ func SetLogger(logger *log.Logger) {
internal.Logger = logger
}
+type baseClient struct {
+ opt *Options
+ connPool pool.Pooler
+
+ process func(Cmder) error
+ processPipeline func([]Cmder) error
+ processTxPipeline func([]Cmder) error
+
+ onClose func() error // hook called when client is closed
+}
+
func (c *baseClient) init() {
c.process = c.defaultProcess
c.processPipeline = c.defaultProcessPipeline
@@ -84,16 +96,7 @@ func (c *baseClient) initConn(cn *pool.Conn) error {
return nil
}
- // Temp client to initialize connection.
- conn := &Conn{
- baseClient: baseClient{
- opt: c.opt,
- connPool: pool.NewSingleConnPool(cn),
- },
- }
- conn.baseClient.init()
- conn.statefulCmdable.setProcessor(conn.Process)
-
+ conn := newConn(c.opt, cn)
_, err := conn.Pipelined(func(pipe Pipeliner) error {
if c.opt.Password != "" {
pipe.Auth(c.opt.Password)
@@ -119,10 +122,7 @@ func (c *baseClient) initConn(cn *pool.Conn) error {
return nil
}
-// WrapProcess replaces the process func. It takes a function createWrapper
-// which is supplied by the user. createWrapper takes the old process func as
-// an input and returns the new wrapper process func. createWrapper should
-// use call the old process func within the new process func.
+// WrapProcess wraps function that processes Redis commands.
func (c *baseClient) WrapProcess(fn func(oldProcess func(cmd Cmder) error) func(cmd Cmder) error) {
c.process = fn(c.process)
}
@@ -338,33 +338,52 @@ func (c *baseClient) txPipelineReadQueued(cn *pool.Conn, cmds []Cmder) error {
type Client struct {
baseClient
cmdable
+
+ ctx context.Context
}
-func newClient(opt *Options, pool pool.Pooler) *Client {
+// NewClient returns a client to the Redis Server specified by Options.
+func NewClient(opt *Options) *Client {
+ opt.init()
+
c := Client{
baseClient: baseClient{
opt: opt,
- connPool: pool,
+ connPool: newConnPool(opt),
},
}
c.baseClient.init()
- c.cmdable.setProcessor(c.Process)
+ c.init()
+
return &c
}
-// NewClient returns a client to the Redis Server specified by Options.
-func NewClient(opt *Options) *Client {
- opt.init()
- return newClient(opt, newConnPool(opt))
+func (c *Client) init() {
+ c.cmdable.setProcessor(c.Process)
}
-func (c *Client) copy() *Client {
- c2 := new(Client)
- *c2 = *c
- c2.cmdable.setProcessor(c2.Process)
+func (c *Client) Context() context.Context {
+ if c.ctx != nil {
+ return c.ctx
+ }
+ return context.Background()
+}
+
+func (c *Client) WithContext(ctx context.Context) *Client {
+ if ctx == nil {
+ panic("nil context")
+ }
+ c2 := c.copy()
+ c2.ctx = ctx
return c2
}
+func (c *Client) copy() *Client {
+ cp := *c
+ cp.init()
+ return &cp
+}
+
// Options returns read-only Options that were used to create the client.
func (c *Client) Options() *Options {
return c.opt
@@ -442,6 +461,18 @@ type Conn struct {
statefulCmdable
}
+func newConn(opt *Options, cn *pool.Conn) *Conn {
+ c := Conn{
+ baseClient: baseClient{
+ opt: opt,
+ connPool: pool.NewSingleConnPool(cn),
+ },
+ }
+ c.baseClient.init()
+ c.statefulCmdable.setProcessor(c.Process)
+ return &c
+}
+
func (c *Conn) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
return c.Pipeline().Pipelined(fn)
}
diff --git a/vendor/github.com/go-redis/redis/redis_context.go b/vendor/github.com/go-redis/redis/redis_context.go
deleted file mode 100644
index c00e505f6..000000000
--- a/vendor/github.com/go-redis/redis/redis_context.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// +build go1.7
-
-package redis
-
-import (
- "context"
-
- "github.com/go-redis/redis/internal/pool"
-)
-
-type baseClient struct {
- connPool pool.Pooler
- opt *Options
-
- process func(Cmder) error
- processPipeline func([]Cmder) error
- processTxPipeline func([]Cmder) error
-
- onClose func() error // hook called when client is closed
-
- ctx context.Context
-}
-
-func (c *Client) Context() context.Context {
- if c.ctx != nil {
- return c.ctx
- }
- return context.Background()
-}
-
-func (c *Client) WithContext(ctx context.Context) *Client {
- if ctx == nil {
- panic("nil context")
- }
- c2 := c.copy()
- c2.ctx = ctx
- return c2
-}
diff --git a/vendor/github.com/go-redis/redis/redis_no_context.go b/vendor/github.com/go-redis/redis/redis_no_context.go
deleted file mode 100644
index 8555c5c09..000000000
--- a/vendor/github.com/go-redis/redis/redis_no_context.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build !go1.7
-
-package redis
-
-import (
- "github.com/go-redis/redis/internal/pool"
-)
-
-type baseClient struct {
- connPool pool.Pooler
- opt *Options
-
- process func(Cmder) error
- processPipeline func([]Cmder) error
- processTxPipeline func([]Cmder) error
-
- onClose func() error // hook called when client is closed
-}
diff --git a/vendor/github.com/go-redis/redis/redis_test.go b/vendor/github.com/go-redis/redis/redis_test.go
deleted file mode 100644
index 49d3fb329..000000000
--- a/vendor/github.com/go-redis/redis/redis_test.go
+++ /dev/null
@@ -1,364 +0,0 @@
-package redis_test
-
-import (
- "bytes"
- "net"
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Client", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- client.Close()
- })
-
- It("should Stringer", func() {
- Expect(client.String()).To(Equal("Redis<:6380 db:15>"))
- })
-
- It("should ping", func() {
- val, err := client.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("PONG"))
- })
-
- It("should return pool stats", func() {
- Expect(client.PoolStats()).To(BeAssignableToTypeOf(&redis.PoolStats{}))
- })
-
- It("should support custom dialers", func() {
- custom := redis.NewClient(&redis.Options{
- Addr: ":1234",
- Dialer: func() (net.Conn, error) {
- return net.Dial("tcp", redisAddr)
- },
- })
-
- val, err := custom.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("PONG"))
- Expect(custom.Close()).NotTo(HaveOccurred())
- })
-
- It("should close", func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- err := client.Ping().Err()
- Expect(err).To(MatchError("redis: client is closed"))
- })
-
- It("should close pubsub without closing the client", func() {
- pubsub := client.Subscribe()
- Expect(pubsub.Close()).NotTo(HaveOccurred())
-
- _, err := pubsub.Receive()
- Expect(err).To(MatchError("redis: client is closed"))
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
- It("should close Tx without closing the client", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- _, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- return err
- })
- Expect(err).NotTo(HaveOccurred())
-
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
- It("should close pipeline without closing the client", func() {
- pipeline := client.Pipeline()
- Expect(pipeline.Close()).NotTo(HaveOccurred())
-
- pipeline.Ping()
- _, err := pipeline.Exec()
- Expect(err).To(MatchError("redis: client is closed"))
-
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
- It("should close pubsub when client is closed", func() {
- pubsub := client.Subscribe()
- Expect(client.Close()).NotTo(HaveOccurred())
-
- _, err := pubsub.Receive()
- Expect(err).To(MatchError("redis: client is closed"))
-
- Expect(pubsub.Close()).NotTo(HaveOccurred())
- })
-
- It("should close pipeline when client is closed", func() {
- pipeline := client.Pipeline()
- Expect(client.Close()).NotTo(HaveOccurred())
- Expect(pipeline.Close()).NotTo(HaveOccurred())
- })
-
- It("should select DB", func() {
- db2 := redis.NewClient(&redis.Options{
- Addr: redisAddr,
- DB: 2,
- })
- Expect(db2.FlushDB().Err()).NotTo(HaveOccurred())
- Expect(db2.Get("db").Err()).To(Equal(redis.Nil))
- Expect(db2.Set("db", 2, 0).Err()).NotTo(HaveOccurred())
-
- n, err := db2.Get("db").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(2)))
-
- Expect(client.Get("db").Err()).To(Equal(redis.Nil))
-
- Expect(db2.FlushDB().Err()).NotTo(HaveOccurred())
- Expect(db2.Close()).NotTo(HaveOccurred())
- })
-
- It("processes custom commands", func() {
- cmd := redis.NewCmd("PING")
- client.Process(cmd)
-
- // Flush buffers.
- Expect(client.Echo("hello").Err()).NotTo(HaveOccurred())
-
- Expect(cmd.Err()).NotTo(HaveOccurred())
- Expect(cmd.Val()).To(Equal("PONG"))
- })
-
- It("should retry command on network error", func() {
- Expect(client.Close()).NotTo(HaveOccurred())
-
- client = redis.NewClient(&redis.Options{
- Addr: redisAddr,
- MaxRetries: 1,
- })
-
- // Put bad connection in the pool.
- cn, _, err := client.Pool().Get()
- Expect(err).NotTo(HaveOccurred())
-
- cn.SetNetConn(&badConn{})
- err = client.Pool().Put(cn)
- Expect(err).NotTo(HaveOccurred())
-
- err = client.Ping().Err()
- Expect(err).NotTo(HaveOccurred())
- })
-
- It("should retry with backoff", func() {
- Expect(client.Close()).NotTo(HaveOccurred())
-
- // use up all the available connections to force a fail
- connectionHogClient := redis.NewClient(&redis.Options{
- Addr: redisAddr,
- MaxRetries: 1,
- })
- defer connectionHogClient.Close()
-
- for i := 0; i <= 1002; i++ {
- connectionHogClient.Pool().NewConn()
- }
-
- clientNoRetry := redis.NewClient(&redis.Options{
- Addr: redisAddr,
- PoolSize: 1,
- MaxRetryBackoff: -1,
- })
- defer clientNoRetry.Close()
-
- clientRetry := redis.NewClient(&redis.Options{
- Addr: redisAddr,
- MaxRetries: 5,
- PoolSize: 1,
- MaxRetryBackoff: 128 * time.Millisecond,
- })
- defer clientRetry.Close()
-
- startNoRetry := time.Now()
- err := clientNoRetry.Ping().Err()
- Expect(err).To(HaveOccurred())
- elapseNoRetry := time.Since(startNoRetry)
-
- startRetry := time.Now()
- err = clientRetry.Ping().Err()
- Expect(err).To(HaveOccurred())
- elapseRetry := time.Since(startRetry)
-
- Expect(elapseRetry > elapseNoRetry).To(BeTrue())
- })
-
- It("should update conn.UsedAt on read/write", func() {
- cn, _, err := client.Pool().Get()
- Expect(err).NotTo(HaveOccurred())
- Expect(cn.UsedAt).NotTo(BeZero())
- createdAt := cn.UsedAt()
-
- err = client.Pool().Put(cn)
- Expect(err).NotTo(HaveOccurred())
- Expect(cn.UsedAt().Equal(createdAt)).To(BeTrue())
-
- err = client.Ping().Err()
- Expect(err).NotTo(HaveOccurred())
-
- cn, _, err = client.Pool().Get()
- Expect(err).NotTo(HaveOccurred())
- Expect(cn).NotTo(BeNil())
- Expect(cn.UsedAt().After(createdAt)).To(BeTrue())
- })
-
- It("should process command with special chars", func() {
- set := client.Set("key", "hello1\r\nhello2\r\n", 0)
- Expect(set.Err()).NotTo(HaveOccurred())
- Expect(set.Val()).To(Equal("OK"))
-
- get := client.Get("key")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello1\r\nhello2\r\n"))
- })
-
- It("should handle big vals", func() {
- bigVal := bytes.Repeat([]byte{'*'}, 2e6)
-
- err := client.Set("key", bigVal, 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- // Reconnect to get new connection.
- Expect(client.Close()).NotTo(HaveOccurred())
- client = redis.NewClient(redisOptions())
-
- got, err := client.Get("key").Bytes()
- Expect(err).NotTo(HaveOccurred())
- Expect(got).To(Equal(bigVal))
- })
-
- It("should call WrapProcess", func() {
- var wrapperFnCalled bool
-
- client.WrapProcess(func(oldProcess func(redis.Cmder) error) func(redis.Cmder) error {
- return func(cmd redis.Cmder) error {
- wrapperFnCalled = true
- return oldProcess(cmd)
- }
- })
-
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
-
- Expect(wrapperFnCalled).To(BeTrue())
- })
-})
-
-var _ = Describe("Client timeout", func() {
- var opt *redis.Options
- var client *redis.Client
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- testTimeout := func() {
- It("Ping timeouts", func() {
- err := client.Ping().Err()
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Pipeline timeouts", func() {
- _, err := client.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Subscribe timeouts", func() {
- if opt.WriteTimeout == 0 {
- return
- }
-
- pubsub := client.Subscribe()
- defer pubsub.Close()
-
- err := pubsub.Subscribe("_")
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Tx timeouts", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- return tx.Ping().Err()
- })
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
-
- It("Tx Pipeline timeouts", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- _, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- return err
- })
- Expect(err).To(HaveOccurred())
- Expect(err.(net.Error).Timeout()).To(BeTrue())
- })
- }
-
- Context("read timeout", func() {
- BeforeEach(func() {
- opt = redisOptions()
- opt.ReadTimeout = time.Nanosecond
- opt.WriteTimeout = -1
- client = redis.NewClient(opt)
- })
-
- testTimeout()
- })
-
- Context("write timeout", func() {
- BeforeEach(func() {
- opt = redisOptions()
- opt.ReadTimeout = -1
- opt.WriteTimeout = time.Nanosecond
- client = redis.NewClient(opt)
- })
-
- testTimeout()
- })
-})
-
-var _ = Describe("Client OnConnect", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- opt := redisOptions()
- opt.DB = 0
- opt.OnConnect = func(cn *redis.Conn) error {
- return cn.ClientSetName("on_connect").Err()
- }
-
- client = redis.NewClient(opt)
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("calls OnConnect", func() {
- name, err := client.ClientGetName().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(name).To(Equal("on_connect"))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/ring.go b/vendor/github.com/go-redis/redis/ring.go
index 10f33ed00..6d2877413 100644
--- a/vendor/github.com/go-redis/redis/ring.go
+++ b/vendor/github.com/go-redis/redis/ring.go
@@ -1,6 +1,7 @@
package redis
import (
+ "context"
"errors"
"fmt"
"math/rand"
@@ -15,6 +16,8 @@ import (
"github.com/go-redis/redis/internal/pool"
)
+const nreplicas = 100
+
var errRingShardsDown = errors.New("redis: all ring shards are down")
// RingOptions are used to configure a ring client and should be
@@ -85,6 +88,8 @@ func (opt *RingOptions) clientOptions() *Options {
}
}
+//------------------------------------------------------------------------------
+
type ringShard struct {
Client *Client
down int32
@@ -125,6 +130,150 @@ func (shard *ringShard) Vote(up bool) bool {
return shard.IsDown()
}
+//------------------------------------------------------------------------------
+
+type ringShards struct {
+ mu sync.RWMutex
+ hash *consistenthash.Map
+ shards map[string]*ringShard // read only
+ list []*ringShard // read only
+ closed bool
+}
+
+func newRingShards() *ringShards {
+ return &ringShards{
+ hash: consistenthash.New(nreplicas, nil),
+ shards: make(map[string]*ringShard),
+ }
+}
+
+func (c *ringShards) Add(name string, cl *Client) {
+ shard := &ringShard{Client: cl}
+ c.hash.Add(name)
+ c.shards[name] = shard
+ c.list = append(c.list, shard)
+}
+
+func (c *ringShards) List() []*ringShard {
+ c.mu.RLock()
+ list := c.list
+ c.mu.RUnlock()
+ return list
+}
+
+func (c *ringShards) Hash(key string) string {
+ c.mu.RLock()
+ hash := c.hash.Get(key)
+ c.mu.RUnlock()
+ return hash
+}
+
+func (c *ringShards) GetByKey(key string) (*ringShard, error) {
+ key = hashtag.Key(key)
+
+ c.mu.RLock()
+
+ if c.closed {
+ c.mu.RUnlock()
+ return nil, pool.ErrClosed
+ }
+
+ hash := c.hash.Get(key)
+ if hash == "" {
+ c.mu.RUnlock()
+ return nil, errRingShardsDown
+ }
+
+ shard := c.shards[hash]
+ c.mu.RUnlock()
+
+ return shard, nil
+}
+
+func (c *ringShards) GetByHash(name string) (*ringShard, error) {
+ if name == "" {
+ return c.Random()
+ }
+
+ c.mu.RLock()
+ shard := c.shards[name]
+ c.mu.RUnlock()
+ return shard, nil
+}
+
+func (c *ringShards) Random() (*ringShard, error) {
+ return c.GetByKey(strconv.Itoa(rand.Int()))
+}
+
+// heartbeat monitors state of each shard in the ring.
+func (c *ringShards) Heartbeat(frequency time.Duration) {
+ ticker := time.NewTicker(frequency)
+ defer ticker.Stop()
+ for range ticker.C {
+ var rebalance bool
+
+ c.mu.RLock()
+
+ if c.closed {
+ c.mu.RUnlock()
+ break
+ }
+
+ shards := c.list
+ c.mu.RUnlock()
+
+ for _, shard := range shards {
+ err := shard.Client.Ping().Err()
+ if shard.Vote(err == nil || err == pool.ErrPoolTimeout) {
+ internal.Logf("ring shard state changed: %s", shard)
+ rebalance = true
+ }
+ }
+
+ if rebalance {
+ c.rebalance()
+ }
+ }
+}
+
+// rebalance removes dead shards from the Ring.
+func (c *ringShards) rebalance() {
+ hash := consistenthash.New(nreplicas, nil)
+ for name, shard := range c.shards {
+ if shard.IsUp() {
+ hash.Add(name)
+ }
+ }
+
+ c.mu.Lock()
+ c.hash = hash
+ c.mu.Unlock()
+}
+
+func (c *ringShards) Close() error {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if c.closed {
+ return nil
+ }
+ c.closed = true
+
+ var firstErr error
+ for _, shard := range c.shards {
+ if err := shard.Client.Close(); err != nil && firstErr == nil {
+ firstErr = err
+ }
+ }
+ c.hash = nil
+ c.shards = nil
+ c.list = nil
+
+ return firstErr
+}
+
+//------------------------------------------------------------------------------
+
// Ring is a Redis client that uses constistent hashing to distribute
// keys across multiple Redis servers (shards). It's safe for
// concurrent use by multiple goroutines.
@@ -142,33 +291,22 @@ func (shard *ringShard) Vote(up bool) bool {
type Ring struct {
cmdable
- opt *RingOptions
- nreplicas int
+ ctx context.Context
- mu sync.RWMutex
- hash *consistenthash.Map
- shards map[string]*ringShard
- shardsList []*ringShard
+ opt *RingOptions
+ shards *ringShards
+ cmdsInfoCache *cmdsInfoCache
processPipeline func([]Cmder) error
-
- cmdsInfoOnce internal.Once
- cmdsInfo map[string]*CommandInfo
-
- closed bool
}
func NewRing(opt *RingOptions) *Ring {
- const nreplicas = 100
-
opt.init()
ring := &Ring{
- opt: opt,
- nreplicas: nreplicas,
-
- hash: consistenthash.New(nreplicas, nil),
- shards: make(map[string]*ringShard),
+ opt: opt,
+ shards: newRingShards(),
+ cmdsInfoCache: newCmdsInfoCache(),
}
ring.processPipeline = ring.defaultProcessPipeline
ring.cmdable.setProcessor(ring.Process)
@@ -176,21 +314,33 @@ func NewRing(opt *RingOptions) *Ring {
for name, addr := range opt.Addrs {
clopt := opt.clientOptions()
clopt.Addr = addr
- ring.addShard(name, NewClient(clopt))
+ ring.shards.Add(name, NewClient(clopt))
}
- go ring.heartbeat()
+ go ring.shards.Heartbeat(opt.HeartbeatFrequency)
return ring
}
-func (c *Ring) addShard(name string, cl *Client) {
- shard := &ringShard{Client: cl}
- c.mu.Lock()
- c.hash.Add(name)
- c.shards[name] = shard
- c.shardsList = append(c.shardsList, shard)
- c.mu.Unlock()
+func (c *Ring) Context() context.Context {
+ if c.ctx != nil {
+ return c.ctx
+ }
+ return context.Background()
+}
+
+func (c *Ring) WithContext(ctx context.Context) *Ring {
+ if ctx == nil {
+ panic("nil context")
+ }
+ c2 := c.copy()
+ c2.ctx = ctx
+ return c2
+}
+
+func (c *Ring) copy() *Ring {
+ cp := *c
+ return &cp
}
// Options returns read-only Options that were used to create the client.
@@ -204,10 +354,7 @@ func (c *Ring) retryBackoff(attempt int) time.Duration {
// PoolStats returns accumulated connection pool stats.
func (c *Ring) PoolStats() *PoolStats {
- c.mu.RLock()
- shards := c.shardsList
- c.mu.RUnlock()
-
+ shards := c.shards.List()
var acc PoolStats
for _, shard := range shards {
s := shard.Client.connPool.Stats()
@@ -226,7 +373,7 @@ func (c *Ring) Subscribe(channels ...string) *PubSub {
panic("at least one channel is required")
}
- shard, err := c.shardByKey(channels[0])
+ shard, err := c.shards.GetByKey(channels[0])
if err != nil {
// TODO: return PubSub with sticky error
panic(err)
@@ -240,7 +387,7 @@ func (c *Ring) PSubscribe(channels ...string) *PubSub {
panic("at least one channel is required")
}
- shard, err := c.shardByKey(channels[0])
+ shard, err := c.shards.GetByKey(channels[0])
if err != nil {
// TODO: return PubSub with sticky error
panic(err)
@@ -251,10 +398,7 @@ func (c *Ring) PSubscribe(channels ...string) *PubSub {
// ForEachShard concurrently calls the fn on each live shard in the ring.
// It returns the first error if any.
func (c *Ring) ForEachShard(fn func(client *Client) error) error {
- c.mu.RLock()
- shards := c.shardsList
- c.mu.RUnlock()
-
+ shards := c.shards.List()
var wg sync.WaitGroup
errCh := make(chan error, 1)
for _, shard := range shards {
@@ -285,81 +429,38 @@ func (c *Ring) ForEachShard(fn func(client *Client) error) error {
}
func (c *Ring) cmdInfo(name string) *CommandInfo {
- err := c.cmdsInfoOnce.Do(func() error {
- c.mu.RLock()
- shards := c.shardsList
- c.mu.RUnlock()
-
- var firstErr error
+ cmdsInfo, err := c.cmdsInfoCache.Do(func() (map[string]*CommandInfo, error) {
+ shards := c.shards.List()
+ firstErr := errRingShardsDown
for _, shard := range shards {
cmdsInfo, err := shard.Client.Command().Result()
if err == nil {
- c.cmdsInfo = cmdsInfo
- return nil
+ return cmdsInfo, nil
}
if firstErr == nil {
firstErr = err
}
}
- return firstErr
+ return nil, firstErr
})
if err != nil {
return nil
}
- if c.cmdsInfo == nil {
- return nil
- }
- info := c.cmdsInfo[name]
+ info := cmdsInfo[name]
if info == nil {
internal.Logf("info for cmd=%s not found", name)
}
return info
}
-func (c *Ring) shardByKey(key string) (*ringShard, error) {
- key = hashtag.Key(key)
-
- c.mu.RLock()
-
- if c.closed {
- c.mu.RUnlock()
- return nil, pool.ErrClosed
- }
-
- name := c.hash.Get(key)
- if name == "" {
- c.mu.RUnlock()
- return nil, errRingShardsDown
- }
-
- shard := c.shards[name]
- c.mu.RUnlock()
- return shard, nil
-}
-
-func (c *Ring) randomShard() (*ringShard, error) {
- return c.shardByKey(strconv.Itoa(rand.Int()))
-}
-
-func (c *Ring) shardByName(name string) (*ringShard, error) {
- if name == "" {
- return c.randomShard()
- }
-
- c.mu.RLock()
- shard := c.shards[name]
- c.mu.RUnlock()
- return shard, nil
-}
-
func (c *Ring) cmdShard(cmd Cmder) (*ringShard, error) {
cmdInfo := c.cmdInfo(cmd.Name())
pos := cmdFirstKeyPos(cmd, cmdInfo)
if pos == 0 {
- return c.randomShard()
+ return c.shards.Random()
}
firstKey := cmd.stringArg(pos)
- return c.shardByKey(firstKey)
+ return c.shards.GetByKey(firstKey)
}
func (c *Ring) WrapProcess(fn func(oldProcess func(cmd Cmder) error) func(cmd Cmder) error) {
@@ -378,77 +479,6 @@ func (c *Ring) Process(cmd Cmder) error {
return shard.Client.Process(cmd)
}
-// rebalance removes dead shards from the Ring.
-func (c *Ring) rebalance() {
- hash := consistenthash.New(c.nreplicas, nil)
- for name, shard := range c.shards {
- if shard.IsUp() {
- hash.Add(name)
- }
- }
-
- c.mu.Lock()
- c.hash = hash
- c.mu.Unlock()
-}
-
-// heartbeat monitors state of each shard in the ring.
-func (c *Ring) heartbeat() {
- ticker := time.NewTicker(c.opt.HeartbeatFrequency)
- defer ticker.Stop()
- for range ticker.C {
- var rebalance bool
-
- c.mu.RLock()
-
- if c.closed {
- c.mu.RUnlock()
- break
- }
-
- shards := c.shardsList
- c.mu.RUnlock()
-
- for _, shard := range shards {
- err := shard.Client.Ping().Err()
- if shard.Vote(err == nil || err == pool.ErrPoolTimeout) {
- internal.Logf("ring shard state changed: %s", shard)
- rebalance = true
- }
- }
-
- if rebalance {
- c.rebalance()
- }
- }
-}
-
-// Close closes the ring client, releasing any open resources.
-//
-// It is rare to Close a Ring, as the Ring is meant to be long-lived
-// and shared between many goroutines.
-func (c *Ring) Close() error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return nil
- }
- c.closed = true
-
- var firstErr error
- for _, shard := range c.shards {
- if err := shard.Client.Close(); err != nil && firstErr == nil {
- firstErr = err
- }
- }
- c.hash = nil
- c.shards = nil
- c.shardsList = nil
-
- return firstErr
-}
-
func (c *Ring) Pipeline() Pipeliner {
pipe := Pipeline{
exec: c.processPipeline,
@@ -471,11 +501,11 @@ func (c *Ring) defaultProcessPipeline(cmds []Cmder) error {
cmdsMap := make(map[string][]Cmder)
for _, cmd := range cmds {
cmdInfo := c.cmdInfo(cmd.Name())
- name := cmd.stringArg(cmdFirstKeyPos(cmd, cmdInfo))
- if name != "" {
- name = c.hash.Get(hashtag.Key(name))
+ hash := cmd.stringArg(cmdFirstKeyPos(cmd, cmdInfo))
+ if hash != "" {
+ hash = c.shards.Hash(hashtag.Key(hash))
}
- cmdsMap[name] = append(cmdsMap[name], cmd)
+ cmdsMap[hash] = append(cmdsMap[hash], cmd)
}
for attempt := 0; attempt <= c.opt.MaxRetries; attempt++ {
@@ -485,8 +515,8 @@ func (c *Ring) defaultProcessPipeline(cmds []Cmder) error {
var failedCmdsMap map[string][]Cmder
- for name, cmds := range cmdsMap {
- shard, err := c.shardByName(name)
+ for hash, cmds := range cmdsMap {
+ shard, err := c.shards.GetByHash(hash)
if err != nil {
setCmdsErr(cmds, err)
continue
@@ -509,7 +539,7 @@ func (c *Ring) defaultProcessPipeline(cmds []Cmder) error {
if failedCmdsMap == nil {
failedCmdsMap = make(map[string][]Cmder)
}
- failedCmdsMap[name] = cmds
+ failedCmdsMap[hash] = cmds
}
}
@@ -529,3 +559,11 @@ func (c *Ring) TxPipeline() Pipeliner {
func (c *Ring) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
panic("not implemented")
}
+
+// Close closes the ring client, releasing any open resources.
+//
+// It is rare to Close a Ring, as the Ring is meant to be long-lived
+// and shared between many goroutines.
+func (c *Ring) Close() error {
+ return c.shards.Close()
+}
diff --git a/vendor/github.com/go-redis/redis/ring_test.go b/vendor/github.com/go-redis/redis/ring_test.go
deleted file mode 100644
index 0cad4298b..000000000
--- a/vendor/github.com/go-redis/redis/ring_test.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package redis_test
-
-import (
- "crypto/rand"
- "fmt"
- "time"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Redis Ring", func() {
- const heartbeat = 100 * time.Millisecond
-
- var ring *redis.Ring
-
- setRingKeys := func() {
- for i := 0; i < 100; i++ {
- err := ring.Set(fmt.Sprintf("key%d", i), "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- }
-
- BeforeEach(func() {
- opt := redisRingOptions()
- opt.HeartbeatFrequency = heartbeat
- ring = redis.NewRing(opt)
-
- err := ring.ForEachShard(func(cl *redis.Client) error {
- return cl.FlushDB().Err()
- })
- Expect(err).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(ring.Close()).NotTo(HaveOccurred())
- })
-
- It("distributes keys", func() {
- setRingKeys()
-
- // Both shards should have some keys now.
- Expect(ringShard1.Info().Val()).To(ContainSubstring("keys=57"))
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=43"))
- })
-
- It("distributes keys when using EVAL", func() {
- script := redis.NewScript(`
- local r = redis.call('SET', KEYS[1], ARGV[1])
- return r
- `)
-
- var key string
- for i := 0; i < 100; i++ {
- key = fmt.Sprintf("key%d", i)
- err := script.Run(ring, []string{key}, "value").Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- Expect(ringShard1.Info().Val()).To(ContainSubstring("keys=57"))
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=43"))
- })
-
- It("uses single shard when one of the shards is down", func() {
- // Stop ringShard2.
- Expect(ringShard2.Close()).NotTo(HaveOccurred())
-
- // Ring needs 3 * heartbeat time to detect that node is down.
- // Give it more to be sure.
- time.Sleep(2 * 3 * heartbeat)
-
- setRingKeys()
-
- // RingShard1 should have all keys.
- Expect(ringShard1.Info().Val()).To(ContainSubstring("keys=100"))
-
- // Start ringShard2.
- var err error
- ringShard2, err = startRedis(ringShard2Port)
- Expect(err).NotTo(HaveOccurred())
-
- // Wait for ringShard2 to come up.
- Eventually(func() error {
- return ringShard2.Ping().Err()
- }, "1s").ShouldNot(HaveOccurred())
-
- // Ring needs heartbeat time to detect that node is up.
- // Give it more to be sure.
- time.Sleep(heartbeat + heartbeat)
-
- setRingKeys()
-
- // RingShard2 should have its keys.
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=43"))
- })
-
- It("supports hash tags", func() {
- for i := 0; i < 100; i++ {
- err := ring.Set(fmt.Sprintf("key%d{tag}", i), "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
-
- Expect(ringShard1.Info().Val()).ToNot(ContainSubstring("keys="))
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=100"))
- })
-
- Describe("pipeline", func() {
- It("distributes keys", func() {
- pipe := ring.Pipeline()
- for i := 0; i < 100; i++ {
- err := pipe.Set(fmt.Sprintf("key%d", i), "value", 0).Err()
- Expect(err).NotTo(HaveOccurred())
- }
- cmds, err := pipe.Exec()
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(100))
- Expect(pipe.Close()).NotTo(HaveOccurred())
-
- for _, cmd := range cmds {
- Expect(cmd.Err()).NotTo(HaveOccurred())
- Expect(cmd.(*redis.StatusCmd).Val()).To(Equal("OK"))
- }
-
- // Both shards should have some keys now.
- Expect(ringShard1.Info().Val()).To(ContainSubstring("keys=57"))
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=43"))
- })
-
- It("is consistent with ring", func() {
- var keys []string
- for i := 0; i < 100; i++ {
- key := make([]byte, 64)
- _, err := rand.Read(key)
- Expect(err).NotTo(HaveOccurred())
- keys = append(keys, string(key))
- }
-
- _, err := ring.Pipelined(func(pipe redis.Pipeliner) error {
- for _, key := range keys {
- pipe.Set(key, "value", 0).Err()
- }
- return nil
- })
- Expect(err).NotTo(HaveOccurred())
-
- for _, key := range keys {
- val, err := ring.Get(key).Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("value"))
- }
- })
-
- It("supports hash tags", func() {
- _, err := ring.Pipelined(func(pipe redis.Pipeliner) error {
- for i := 0; i < 100; i++ {
- pipe.Set(fmt.Sprintf("key%d{tag}", i), "value", 0).Err()
- }
- return nil
- })
- Expect(err).NotTo(HaveOccurred())
-
- Expect(ringShard1.Info().Val()).ToNot(ContainSubstring("keys="))
- Expect(ringShard2.Info().Val()).To(ContainSubstring("keys=100"))
- })
- })
-})
-
-var _ = Describe("empty Redis Ring", func() {
- var ring *redis.Ring
-
- BeforeEach(func() {
- ring = redis.NewRing(&redis.RingOptions{})
- })
-
- AfterEach(func() {
- Expect(ring.Close()).NotTo(HaveOccurred())
- })
-
- It("returns an error", func() {
- err := ring.Ping().Err()
- Expect(err).To(MatchError("redis: all ring shards are down"))
- })
-
- It("pipeline returns an error", func() {
- _, err := ring.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- Expect(err).To(MatchError("redis: all ring shards are down"))
- })
-})
diff --git a/vendor/github.com/go-redis/redis/script.go b/vendor/github.com/go-redis/redis/script.go
index 74135f5a5..09f36d932 100644
--- a/vendor/github.com/go-redis/redis/script.go
+++ b/vendor/github.com/go-redis/redis/script.go
@@ -10,7 +10,7 @@ import (
type scripter interface {
Eval(script string, keys []string, args ...interface{}) *Cmd
EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
- ScriptExists(scripts ...string) *BoolSliceCmd
+ ScriptExists(hashes ...string) *BoolSliceCmd
ScriptLoad(script string) *StringCmd
}
@@ -40,7 +40,7 @@ func (s *Script) Load(c scripter) *StringCmd {
}
func (s *Script) Exists(c scripter) *BoolSliceCmd {
- return c.ScriptExists(s.src)
+ return c.ScriptExists(s.hash)
}
func (s *Script) Eval(c scripter, keys []string, args ...interface{}) *Cmd {
diff --git a/vendor/github.com/go-redis/redis/sentinel_test.go b/vendor/github.com/go-redis/redis/sentinel_test.go
deleted file mode 100644
index c67713cd0..000000000
--- a/vendor/github.com/go-redis/redis/sentinel_test.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package redis_test
-
-import (
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Sentinel", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewFailoverClient(&redis.FailoverOptions{
- MasterName: sentinelName,
- SentinelAddrs: []string{":" + sentinelPort},
- })
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("should facilitate failover", func() {
- // Set value on master.
- err := client.Set("foo", "master", 0).Err()
- Expect(err).NotTo(HaveOccurred())
-
- // Verify.
- val, err := sentinelMaster.Get("foo").Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(val).To(Equal("master"))
-
- // Create subscription.
- ch := client.Subscribe("foo").Channel()
-
- // Wait until replicated.
- Eventually(func() string {
- return sentinelSlave1.Get("foo").Val()
- }, "1s", "100ms").Should(Equal("master"))
- Eventually(func() string {
- return sentinelSlave2.Get("foo").Val()
- }, "1s", "100ms").Should(Equal("master"))
-
- // Wait until slaves are picked up by sentinel.
- Eventually(func() string {
- return sentinel.Info().Val()
- }, "10s", "100ms").Should(ContainSubstring("slaves=2"))
-
- // Kill master.
- sentinelMaster.Shutdown()
- Eventually(func() error {
- return sentinelMaster.Ping().Err()
- }, "5s", "100ms").Should(HaveOccurred())
-
- // Wait for Redis sentinel to elect new master.
- Eventually(func() string {
- return sentinelSlave1.Info().Val() + sentinelSlave2.Info().Val()
- }, "30s", "1s").Should(ContainSubstring("role:master"))
-
- // Check that client picked up new master.
- Eventually(func() error {
- return client.Get("foo").Err()
- }, "5s", "100ms").ShouldNot(HaveOccurred())
-
- // Publish message to check if subscription is renewed.
- err = client.Publish("foo", "hello").Err()
- Expect(err).NotTo(HaveOccurred())
-
- var msg *redis.Message
- Eventually(ch).Should(Receive(&msg))
- Expect(msg.Channel).To(Equal("foo"))
- Expect(msg.Payload).To(Equal("hello"))
- })
-
- It("supports DB selection", func() {
- Expect(client.Close()).NotTo(HaveOccurred())
-
- client = redis.NewFailoverClient(&redis.FailoverOptions{
- MasterName: sentinelName,
- SentinelAddrs: []string{":" + sentinelPort},
- DB: 1,
- })
- err := client.Ping().Err()
- Expect(err).NotTo(HaveOccurred())
- })
-})
diff --git a/vendor/github.com/go-redis/redis/testdata/redis.conf b/vendor/github.com/go-redis/redis/testdata/redis.conf
deleted file mode 100644
index 235b2954a..000000000
--- a/vendor/github.com/go-redis/redis/testdata/redis.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# Minimal redis.conf
-
-port 6379
-daemonize no
-dir .
-save ""
-appendonly yes
-cluster-config-file nodes.conf
-cluster-node-timeout 30000
-maxclients 1001 \ No newline at end of file
diff --git a/vendor/github.com/go-redis/redis/tx.go b/vendor/github.com/go-redis/redis/tx.go
index 26c29bef5..6a753b6a0 100644
--- a/vendor/github.com/go-redis/redis/tx.go
+++ b/vendor/github.com/go-redis/redis/tx.go
@@ -1,12 +1,12 @@
package redis
import (
- "github.com/go-redis/redis/internal"
"github.com/go-redis/redis/internal/pool"
+ "github.com/go-redis/redis/internal/proto"
)
// TxFailedErr transaction redis failed.
-const TxFailedErr = internal.RedisError("redis: transaction failed")
+const TxFailedErr = proto.RedisError("redis: transaction failed")
// Tx implements Redis transactions as described in
// http://redis.io/topics/transactions. It's NOT safe for concurrent use
diff --git a/vendor/github.com/go-redis/redis/tx_test.go b/vendor/github.com/go-redis/redis/tx_test.go
deleted file mode 100644
index de597ff06..000000000
--- a/vendor/github.com/go-redis/redis/tx_test.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package redis_test
-
-import (
- "strconv"
- "sync"
-
- "github.com/go-redis/redis"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Tx", func() {
- var client *redis.Client
-
- BeforeEach(func() {
- client = redis.NewClient(redisOptions())
- Expect(client.FlushDB().Err()).NotTo(HaveOccurred())
- })
-
- AfterEach(func() {
- Expect(client.Close()).NotTo(HaveOccurred())
- })
-
- It("should Watch", func() {
- var incr func(string) error
-
- // Transactionally increments key using GET and SET commands.
- incr = func(key string) error {
- err := client.Watch(func(tx *redis.Tx) error {
- n, err := tx.Get(key).Int64()
- if err != nil && err != redis.Nil {
- return err
- }
-
- _, err = tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set(key, strconv.FormatInt(n+1, 10), 0)
- return nil
- })
- return err
- }, key)
- if err == redis.TxFailedErr {
- return incr(key)
- }
- return err
- }
-
- var wg sync.WaitGroup
- for i := 0; i < 100; i++ {
- wg.Add(1)
- go func() {
- defer GinkgoRecover()
- defer wg.Done()
-
- err := incr("key")
- Expect(err).NotTo(HaveOccurred())
- }()
- }
- wg.Wait()
-
- n, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(n).To(Equal(int64(100)))
- })
-
- It("should discard", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- cmds, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Set("key1", "hello1", 0)
- pipe.Discard()
- pipe.Set("key2", "hello2", 0)
- return nil
- })
- Expect(err).NotTo(HaveOccurred())
- Expect(cmds).To(HaveLen(1))
- return err
- }, "key1", "key2")
- Expect(err).NotTo(HaveOccurred())
-
- get := client.Get("key1")
- Expect(get.Err()).To(Equal(redis.Nil))
- Expect(get.Val()).To(Equal(""))
-
- get = client.Get("key2")
- Expect(get.Err()).NotTo(HaveOccurred())
- Expect(get.Val()).To(Equal("hello2"))
- })
-
- It("returns no error when there are no commands", func() {
- err := client.Watch(func(tx *redis.Tx) error {
- _, err := tx.Pipelined(func(redis.Pipeliner) error { return nil })
- return err
- })
- Expect(err).NotTo(HaveOccurred())
-
- v, err := client.Ping().Result()
- Expect(err).NotTo(HaveOccurred())
- Expect(v).To(Equal("PONG"))
- })
-
- It("should exec bulks", func() {
- const N = 20000
-
- err := client.Watch(func(tx *redis.Tx) error {
- cmds, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- for i := 0; i < N; i++ {
- pipe.Incr("key")
- }
- return nil
- })
- Expect(err).NotTo(HaveOccurred())
- Expect(len(cmds)).To(Equal(N))
- for _, cmd := range cmds {
- Expect(cmd.Err()).NotTo(HaveOccurred())
- }
- return err
- })
- Expect(err).NotTo(HaveOccurred())
-
- num, err := client.Get("key").Int64()
- Expect(err).NotTo(HaveOccurred())
- Expect(num).To(Equal(int64(N)))
- })
-
- It("should recover from bad connection", func() {
- // Put bad connection in the pool.
- cn, _, err := client.Pool().Get()
- Expect(err).NotTo(HaveOccurred())
-
- cn.SetNetConn(&badConn{})
- err = client.Pool().Put(cn)
- Expect(err).NotTo(HaveOccurred())
-
- do := func() error {
- err := client.Watch(func(tx *redis.Tx) error {
- _, err := tx.Pipelined(func(pipe redis.Pipeliner) error {
- pipe.Ping()
- return nil
- })
- return err
- })
- return err
- }
-
- err = do()
- Expect(err).To(MatchError("bad connection"))
-
- err = do()
- Expect(err).NotTo(HaveOccurred())
- })
-})
diff --git a/vendor/github.com/go-redis/redis/universal.go b/vendor/github.com/go-redis/redis/universal.go
index ea42f6984..fde3c4150 100644
--- a/vendor/github.com/go-redis/redis/universal.go
+++ b/vendor/github.com/go-redis/redis/universal.go
@@ -114,6 +114,7 @@ func (o *UniversalOptions) simple() *Options {
type UniversalClient interface {
Cmdable
Process(cmd Cmder) error
+ WrapProcess(fn func(oldProcess func(cmd Cmder) error) func(cmd Cmder) error)
Subscribe(channels ...string) *PubSub
PSubscribe(channels ...string) *PubSub
Close() error
diff --git a/vendor/github.com/go-redis/redis/universal_test.go b/vendor/github.com/go-redis/redis/universal_test.go
deleted file mode 100644
index 2a0850dea..000000000
--- a/vendor/github.com/go-redis/redis/universal_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package redis_test
-
-import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-
- "github.com/go-redis/redis"
-)
-
-var _ = Describe("UniversalClient", func() {
- var client redis.UniversalClient
-
- AfterEach(func() {
- if client != nil {
- Expect(client.Close()).To(Succeed())
- }
- })
-
- It("should connect to failover servers", func() {
- client = redis.NewUniversalClient(&redis.UniversalOptions{
- MasterName: sentinelName,
- Addrs: []string{":" + sentinelPort},
- })
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
- It("should connect to simple servers", func() {
- client = redis.NewUniversalClient(&redis.UniversalOptions{
- Addrs: []string{redisAddr},
- })
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
- It("should connect to clusters", func() {
- client = redis.NewUniversalClient(&redis.UniversalOptions{
- Addrs: cluster.addrs(),
- })
- Expect(client.Ping().Err()).NotTo(HaveOccurred())
- })
-
-})
diff --git a/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md b/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index d9771f1dd..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-### Issue description
-Tell us what should happen and what happens instead
-
-### Example code
-```go
-If possible, please enter some example code here to reproduce the issue.
-```
-
-### Error log
-```
-If you have an error log, please paste it here.
-```
-
-### Configuration
-*Driver version (or git SHA):*
-
-*Go version:* run `go version` in your console
-
-*Server version:* E.g. MySQL 5.6, MariaDB 10.0.20
-
-*Server OS:* E.g. Debian 8.1 (Jessie), Windows 10
diff --git a/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 6f5c7ebeb..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,9 +0,0 @@
-### Description
-Please explain the changes you made here.
-
-### Checklist
-- [ ] Code compiles correctly
-- [ ] Created tests which fail without the change (if possible)
-- [ ] All tests passing
-- [ ] Extended the README / documentation, if necessary
-- [ ] Added myself / the copyright holder to the AUTHORS file
diff --git a/vendor/github.com/go-sql-driver/mysql/.travis.yml b/vendor/github.com/go-sql-driver/mysql/.travis.yml
index e922f9187..4e60b0801 100644
--- a/vendor/github.com/go-sql-driver/mysql/.travis.yml
+++ b/vendor/github.com/go-sql-driver/mysql/.travis.yml
@@ -4,6 +4,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
+ - 1.10.x
- master
before_install:
@@ -21,7 +22,7 @@ matrix:
- env: DB=MYSQL57
sudo: required
dist: trusty
- go: 1.9.x
+ go: 1.10.x
services:
- docker
before_install:
@@ -43,7 +44,7 @@ matrix:
- env: DB=MARIA55
sudo: required
dist: trusty
- go: 1.9.x
+ go: 1.10.x
services:
- docker
before_install:
@@ -65,7 +66,7 @@ matrix:
- env: DB=MARIA10_1
sudo: required
dist: trusty
- go: 1.9.x
+ go: 1.10.x
services:
- docker
before_install:
@@ -87,6 +88,6 @@ matrix:
script:
- go test -v -covermode=count -coverprofile=coverage.out
- go vet ./...
- - test -z "$(gofmt -d -s . | tee /dev/stderr)"
+ - .travis/gofmt.sh
after_script:
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
diff --git a/vendor/github.com/go-sql-driver/mysql/.travis/docker.cnf b/vendor/github.com/go-sql-driver/mysql/.travis/docker.cnf
deleted file mode 100644
index e57754e5a..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.travis/docker.cnf
+++ /dev/null
@@ -1,5 +0,0 @@
-[client]
-user = gotest
-password = secret
-host = 127.0.0.1
-port = 3307
diff --git a/vendor/github.com/go-sql-driver/mysql/.travis/wait_mysql.sh b/vendor/github.com/go-sql-driver/mysql/.travis/wait_mysql.sh
deleted file mode 100755
index abcf5f0ae..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.travis/wait_mysql.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-while :
-do
- sleep 3
- if mysql -e 'select version()'; then
- break
- fi
-done
diff --git a/vendor/github.com/go-sql-driver/mysql/AUTHORS b/vendor/github.com/go-sql-driver/mysql/AUTHORS
index 4702c83ab..14e8398fd 100644
--- a/vendor/github.com/go-sql-driver/mysql/AUTHORS
+++ b/vendor/github.com/go-sql-driver/mysql/AUTHORS
@@ -13,6 +13,8 @@
Aaron Hopkins <go-sql-driver at die.net>
Achille Roussel <achille.roussel at gmail.com>
+Alexey Palazhchenko <alexey.palazhchenko at gmail.com>
+Andrew Reid <andrew.reid at tixtrack.com>
Arne Hormann <arnehormann at gmail.com>
Asta Xie <xiemengjun at gmail.com>
Bulat Gaifullin <gaifullinbf at gmail.com>
@@ -61,8 +63,8 @@ Paul Bonser <misterpib at gmail.com>
Peter Schultz <peter.schultz at classmarkets.com>
Rebecca Chin <rchin at pivotal.io>
Reed Allman <rdallman10 at gmail.com>
-Runrioter Wung <runrioter at gmail.com>
Robert Russell <robert at rrbrussell.com>
+Runrioter Wung <runrioter at gmail.com>
Shuode Li <elemount at qq.com>
Soroush Pour <me at soroushjp.com>
Stan Putrya <root.vagner at gmail.com>
@@ -79,5 +81,6 @@ Counting Ltd.
Google Inc.
InfoSum Ltd.
Keybase Inc.
+Percona LLC
Pivotal Inc.
Stripe Inc.
diff --git a/vendor/github.com/go-sql-driver/mysql/benchmark_go18_test.go b/vendor/github.com/go-sql-driver/mysql/benchmark_go18_test.go
deleted file mode 100644
index d6a7e9d6e..000000000
--- a/vendor/github.com/go-sql-driver/mysql/benchmark_go18_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-// +build go1.8
-
-package mysql
-
-import (
- "context"
- "database/sql"
- "fmt"
- "runtime"
- "testing"
-)
-
-func benchmarkQueryContext(b *testing.B, db *sql.DB, p int) {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- db.SetMaxIdleConns(p * runtime.GOMAXPROCS(0))
-
- tb := (*TB)(b)
- stmt := tb.checkStmt(db.PrepareContext(ctx, "SELECT val FROM foo WHERE id=?"))
- defer stmt.Close()
-
- b.SetParallelism(p)
- b.ReportAllocs()
- b.ResetTimer()
- b.RunParallel(func(pb *testing.PB) {
- var got string
- for pb.Next() {
- tb.check(stmt.QueryRow(1).Scan(&got))
- if got != "one" {
- b.Fatalf("query = %q; want one", got)
- }
- }
- })
-}
-
-func BenchmarkQueryContext(b *testing.B) {
- db := initDB(b,
- "DROP TABLE IF EXISTS foo",
- "CREATE TABLE foo (id INT PRIMARY KEY, val CHAR(50))",
- `INSERT INTO foo VALUES (1, "one")`,
- `INSERT INTO foo VALUES (2, "two")`,
- )
- defer db.Close()
- for _, p := range []int{1, 2, 3, 4} {
- b.Run(fmt.Sprintf("%d", p), func(b *testing.B) {
- benchmarkQueryContext(b, db, p)
- })
- }
-}
-
-func benchmarkExecContext(b *testing.B, db *sql.DB, p int) {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- db.SetMaxIdleConns(p * runtime.GOMAXPROCS(0))
-
- tb := (*TB)(b)
- stmt := tb.checkStmt(db.PrepareContext(ctx, "DO 1"))
- defer stmt.Close()
-
- b.SetParallelism(p)
- b.ReportAllocs()
- b.ResetTimer()
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- if _, err := stmt.ExecContext(ctx); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkExecContext(b *testing.B) {
- db := initDB(b,
- "DROP TABLE IF EXISTS foo",
- "CREATE TABLE foo (id INT PRIMARY KEY, val CHAR(50))",
- `INSERT INTO foo VALUES (1, "one")`,
- `INSERT INTO foo VALUES (2, "two")`,
- )
- defer db.Close()
- for _, p := range []int{1, 2, 3, 4} {
- b.Run(fmt.Sprintf("%d", p), func(b *testing.B) {
- benchmarkQueryContext(b, db, p)
- })
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/benchmark_test.go b/vendor/github.com/go-sql-driver/mysql/benchmark_test.go
deleted file mode 100644
index c1de8672b..000000000
--- a/vendor/github.com/go-sql-driver/mysql/benchmark_test.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "bytes"
- "database/sql"
- "database/sql/driver"
- "math"
- "strings"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-)
-
-type TB testing.B
-
-func (tb *TB) check(err error) {
- if err != nil {
- tb.Fatal(err)
- }
-}
-
-func (tb *TB) checkDB(db *sql.DB, err error) *sql.DB {
- tb.check(err)
- return db
-}
-
-func (tb *TB) checkRows(rows *sql.Rows, err error) *sql.Rows {
- tb.check(err)
- return rows
-}
-
-func (tb *TB) checkStmt(stmt *sql.Stmt, err error) *sql.Stmt {
- tb.check(err)
- return stmt
-}
-
-func initDB(b *testing.B, queries ...string) *sql.DB {
- tb := (*TB)(b)
- db := tb.checkDB(sql.Open("mysql", dsn))
- for _, query := range queries {
- if _, err := db.Exec(query); err != nil {
- b.Fatalf("error on %q: %v", query, err)
- }
- }
- return db
-}
-
-const concurrencyLevel = 10
-
-func BenchmarkQuery(b *testing.B) {
- tb := (*TB)(b)
- b.StopTimer()
- b.ReportAllocs()
- db := initDB(b,
- "DROP TABLE IF EXISTS foo",
- "CREATE TABLE foo (id INT PRIMARY KEY, val CHAR(50))",
- `INSERT INTO foo VALUES (1, "one")`,
- `INSERT INTO foo VALUES (2, "two")`,
- )
- db.SetMaxIdleConns(concurrencyLevel)
- defer db.Close()
-
- stmt := tb.checkStmt(db.Prepare("SELECT val FROM foo WHERE id=?"))
- defer stmt.Close()
-
- remain := int64(b.N)
- var wg sync.WaitGroup
- wg.Add(concurrencyLevel)
- defer wg.Wait()
- b.StartTimer()
-
- for i := 0; i < concurrencyLevel; i++ {
- go func() {
- for {
- if atomic.AddInt64(&remain, -1) < 0 {
- wg.Done()
- return
- }
-
- var got string
- tb.check(stmt.QueryRow(1).Scan(&got))
- if got != "one" {
- b.Errorf("query = %q; want one", got)
- wg.Done()
- return
- }
- }
- }()
- }
-}
-
-func BenchmarkExec(b *testing.B) {
- tb := (*TB)(b)
- b.StopTimer()
- b.ReportAllocs()
- db := tb.checkDB(sql.Open("mysql", dsn))
- db.SetMaxIdleConns(concurrencyLevel)
- defer db.Close()
-
- stmt := tb.checkStmt(db.Prepare("DO 1"))
- defer stmt.Close()
-
- remain := int64(b.N)
- var wg sync.WaitGroup
- wg.Add(concurrencyLevel)
- defer wg.Wait()
- b.StartTimer()
-
- for i := 0; i < concurrencyLevel; i++ {
- go func() {
- for {
- if atomic.AddInt64(&remain, -1) < 0 {
- wg.Done()
- return
- }
-
- if _, err := stmt.Exec(); err != nil {
- b.Fatal(err.Error())
- }
- }
- }()
- }
-}
-
-// data, but no db writes
-var roundtripSample []byte
-
-func initRoundtripBenchmarks() ([]byte, int, int) {
- if roundtripSample == nil {
- roundtripSample = []byte(strings.Repeat("0123456789abcdef", 1024*1024))
- }
- return roundtripSample, 16, len(roundtripSample)
-}
-
-func BenchmarkRoundtripTxt(b *testing.B) {
- b.StopTimer()
- sample, min, max := initRoundtripBenchmarks()
- sampleString := string(sample)
- b.ReportAllocs()
- tb := (*TB)(b)
- db := tb.checkDB(sql.Open("mysql", dsn))
- defer db.Close()
- b.StartTimer()
- var result string
- for i := 0; i < b.N; i++ {
- length := min + i
- if length > max {
- length = max
- }
- test := sampleString[0:length]
- rows := tb.checkRows(db.Query(`SELECT "` + test + `"`))
- if !rows.Next() {
- rows.Close()
- b.Fatalf("crashed")
- }
- err := rows.Scan(&result)
- if err != nil {
- rows.Close()
- b.Fatalf("crashed")
- }
- if result != test {
- rows.Close()
- b.Errorf("mismatch")
- }
- rows.Close()
- }
-}
-
-func BenchmarkRoundtripBin(b *testing.B) {
- b.StopTimer()
- sample, min, max := initRoundtripBenchmarks()
- b.ReportAllocs()
- tb := (*TB)(b)
- db := tb.checkDB(sql.Open("mysql", dsn))
- defer db.Close()
- stmt := tb.checkStmt(db.Prepare("SELECT ?"))
- defer stmt.Close()
- b.StartTimer()
- var result sql.RawBytes
- for i := 0; i < b.N; i++ {
- length := min + i
- if length > max {
- length = max
- }
- test := sample[0:length]
- rows := tb.checkRows(stmt.Query(test))
- if !rows.Next() {
- rows.Close()
- b.Fatalf("crashed")
- }
- err := rows.Scan(&result)
- if err != nil {
- rows.Close()
- b.Fatalf("crashed")
- }
- if !bytes.Equal(result, test) {
- rows.Close()
- b.Errorf("mismatch")
- }
- rows.Close()
- }
-}
-
-func BenchmarkInterpolation(b *testing.B) {
- mc := &mysqlConn{
- cfg: &Config{
- InterpolateParams: true,
- Loc: time.UTC,
- },
- maxAllowedPacket: maxPacketSize,
- maxWriteSize: maxPacketSize - 1,
- buf: newBuffer(nil),
- }
-
- args := []driver.Value{
- int64(42424242),
- float64(math.Pi),
- false,
- time.Unix(1423411542, 807015000),
- []byte("bytes containing special chars ' \" \a \x00"),
- "string containing special chars ' \" \a \x00",
- }
- q := "SELECT ?, ?, ?, ?, ?, ?"
-
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, err := mc.interpolateParams(q, args)
- if err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/connection_go18_test.go b/vendor/github.com/go-sql-driver/mysql/connection_go18_test.go
deleted file mode 100644
index 2719ab3b7..000000000
--- a/vendor/github.com/go-sql-driver/mysql/connection_go18_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-// +build go1.8
-
-package mysql
-
-import (
- "database/sql/driver"
- "testing"
-)
-
-func TestCheckNamedValue(t *testing.T) {
- value := driver.NamedValue{Value: ^uint64(0)}
- x := &mysqlConn{}
- err := x.CheckNamedValue(&value)
-
- if err != nil {
- t.Fatal("uint64 high-bit not convertible", err)
- }
-
- if value.Value != "18446744073709551615" {
- t.Fatalf("uint64 high-bit not converted, got %#v %T", value.Value, value.Value)
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/connection_test.go b/vendor/github.com/go-sql-driver/mysql/connection_test.go
deleted file mode 100644
index 65325f101..000000000
--- a/vendor/github.com/go-sql-driver/mysql/connection_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2016 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "database/sql/driver"
- "testing"
-)
-
-func TestInterpolateParams(t *testing.T) {
- mc := &mysqlConn{
- buf: newBuffer(nil),
- maxAllowedPacket: maxPacketSize,
- cfg: &Config{
- InterpolateParams: true,
- },
- }
-
- q, err := mc.interpolateParams("SELECT ?+?", []driver.Value{int64(42), "gopher"})
- if err != nil {
- t.Errorf("Expected err=nil, got %#v", err)
- return
- }
- expected := `SELECT 42+'gopher'`
- if q != expected {
- t.Errorf("Expected: %q\nGot: %q", expected, q)
- }
-}
-
-func TestInterpolateParamsTooManyPlaceholders(t *testing.T) {
- mc := &mysqlConn{
- buf: newBuffer(nil),
- maxAllowedPacket: maxPacketSize,
- cfg: &Config{
- InterpolateParams: true,
- },
- }
-
- q, err := mc.interpolateParams("SELECT ?+?", []driver.Value{int64(42)})
- if err != driver.ErrSkip {
- t.Errorf("Expected err=driver.ErrSkip, got err=%#v, q=%#v", err, q)
- }
-}
-
-// We don't support placeholder in string literal for now.
-// https://github.com/go-sql-driver/mysql/pull/490
-func TestInterpolateParamsPlaceholderInString(t *testing.T) {
- mc := &mysqlConn{
- buf: newBuffer(nil),
- maxAllowedPacket: maxPacketSize,
- cfg: &Config{
- InterpolateParams: true,
- },
- }
-
- q, err := mc.interpolateParams("SELECT 'abc?xyz',?", []driver.Value{int64(42)})
- // When InterpolateParams support string literal, this should return `"SELECT 'abc?xyz', 42`
- if err != driver.ErrSkip {
- t.Errorf("Expected err=driver.ErrSkip, got err=%#v, q=%#v", err, q)
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/driver.go b/vendor/github.com/go-sql-driver/mysql/driver.go
index d42ce7a3d..27cf5ad4e 100644
--- a/vendor/github.com/go-sql-driver/mysql/driver.go
+++ b/vendor/github.com/go-sql-driver/mysql/driver.go
@@ -20,6 +20,7 @@ import (
"database/sql"
"database/sql/driver"
"net"
+ "sync"
)
// watcher interface is used for context support (From Go 1.8)
@@ -35,12 +36,17 @@ type MySQLDriver struct{}
// Custom dial functions must be registered with RegisterDial
type DialFunc func(addr string) (net.Conn, error)
-var dials map[string]DialFunc
+var (
+ dialsLock sync.RWMutex
+ dials map[string]DialFunc
+)
// RegisterDial registers a custom dial function. It can then be used by the
// network address mynet(addr), where mynet is the registered new network.
// addr is passed as a parameter to the dial function.
func RegisterDial(net string, dial DialFunc) {
+ dialsLock.Lock()
+ defer dialsLock.Unlock()
if dials == nil {
dials = make(map[string]DialFunc)
}
@@ -66,7 +72,10 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
mc.parseTime = mc.cfg.ParseTime
// Connect to Server
- if dial, ok := dials[mc.cfg.Net]; ok {
+ dialsLock.RLock()
+ dial, ok := dials[mc.cfg.Net]
+ dialsLock.RUnlock()
+ if ok {
mc.netConn, err = dial(mc.cfg.Addr)
} else {
nd := net.Dialer{Timeout: mc.cfg.Timeout}
diff --git a/vendor/github.com/go-sql-driver/mysql/driver_go18_test.go b/vendor/github.com/go-sql-driver/mysql/driver_go18_test.go
deleted file mode 100644
index e461455dd..000000000
--- a/vendor/github.com/go-sql-driver/mysql/driver_go18_test.go
+++ /dev/null
@@ -1,798 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-// +build go1.8
-
-package mysql
-
-import (
- "context"
- "database/sql"
- "database/sql/driver"
- "fmt"
- "math"
- "reflect"
- "testing"
- "time"
-)
-
-// static interface implementation checks of mysqlConn
-var (
- _ driver.ConnBeginTx = &mysqlConn{}
- _ driver.ConnPrepareContext = &mysqlConn{}
- _ driver.ExecerContext = &mysqlConn{}
- _ driver.Pinger = &mysqlConn{}
- _ driver.QueryerContext = &mysqlConn{}
-)
-
-// static interface implementation checks of mysqlStmt
-var (
- _ driver.StmtExecContext = &mysqlStmt{}
- _ driver.StmtQueryContext = &mysqlStmt{}
-)
-
-// Ensure that all the driver interfaces are implemented
-var (
- // _ driver.RowsColumnTypeLength = &binaryRows{}
- // _ driver.RowsColumnTypeLength = &textRows{}
- _ driver.RowsColumnTypeDatabaseTypeName = &binaryRows{}
- _ driver.RowsColumnTypeDatabaseTypeName = &textRows{}
- _ driver.RowsColumnTypeNullable = &binaryRows{}
- _ driver.RowsColumnTypeNullable = &textRows{}
- _ driver.RowsColumnTypePrecisionScale = &binaryRows{}
- _ driver.RowsColumnTypePrecisionScale = &textRows{}
- _ driver.RowsColumnTypeScanType = &binaryRows{}
- _ driver.RowsColumnTypeScanType = &textRows{}
- _ driver.RowsNextResultSet = &binaryRows{}
- _ driver.RowsNextResultSet = &textRows{}
-)
-
-func TestMultiResultSet(t *testing.T) {
- type result struct {
- values [][]int
- columns []string
- }
-
- // checkRows is a helper test function to validate rows containing 3 result
- // sets with specific values and columns. The basic query would look like this:
- //
- // SELECT 1 AS col1, 2 AS col2 UNION SELECT 3, 4;
- // SELECT 0 UNION SELECT 1;
- // SELECT 1 AS col1, 2 AS col2, 3 AS col3 UNION SELECT 4, 5, 6;
- //
- // to distinguish test cases the first string argument is put in front of
- // every error or fatal message.
- checkRows := func(desc string, rows *sql.Rows, dbt *DBTest) {
- expected := []result{
- {
- values: [][]int{{1, 2}, {3, 4}},
- columns: []string{"col1", "col2"},
- },
- {
- values: [][]int{{1, 2, 3}, {4, 5, 6}},
- columns: []string{"col1", "col2", "col3"},
- },
- }
-
- var res1 result
- for rows.Next() {
- var res [2]int
- if err := rows.Scan(&res[0], &res[1]); err != nil {
- dbt.Fatal(err)
- }
- res1.values = append(res1.values, res[:])
- }
-
- cols, err := rows.Columns()
- if err != nil {
- dbt.Fatal(desc, err)
- }
- res1.columns = cols
-
- if !reflect.DeepEqual(expected[0], res1) {
- dbt.Error(desc, "want =", expected[0], "got =", res1)
- }
-
- if !rows.NextResultSet() {
- dbt.Fatal(desc, "expected next result set")
- }
-
- // ignoring one result set
-
- if !rows.NextResultSet() {
- dbt.Fatal(desc, "expected next result set")
- }
-
- var res2 result
- cols, err = rows.Columns()
- if err != nil {
- dbt.Fatal(desc, err)
- }
- res2.columns = cols
-
- for rows.Next() {
- var res [3]int
- if err := rows.Scan(&res[0], &res[1], &res[2]); err != nil {
- dbt.Fatal(desc, err)
- }
- res2.values = append(res2.values, res[:])
- }
-
- if !reflect.DeepEqual(expected[1], res2) {
- dbt.Error(desc, "want =", expected[1], "got =", res2)
- }
-
- if rows.NextResultSet() {
- dbt.Error(desc, "unexpected next result set")
- }
-
- if err := rows.Err(); err != nil {
- dbt.Error(desc, err)
- }
- }
-
- runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
- rows := dbt.mustQuery(`DO 1;
- SELECT 1 AS col1, 2 AS col2 UNION SELECT 3, 4;
- DO 1;
- SELECT 0 UNION SELECT 1;
- SELECT 1 AS col1, 2 AS col2, 3 AS col3 UNION SELECT 4, 5, 6;`)
- defer rows.Close()
- checkRows("query: ", rows, dbt)
- })
-
- runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
- queries := []string{
- `
- DROP PROCEDURE IF EXISTS test_mrss;
- CREATE PROCEDURE test_mrss()
- BEGIN
- DO 1;
- SELECT 1 AS col1, 2 AS col2 UNION SELECT 3, 4;
- DO 1;
- SELECT 0 UNION SELECT 1;
- SELECT 1 AS col1, 2 AS col2, 3 AS col3 UNION SELECT 4, 5, 6;
- END
- `,
- `
- DROP PROCEDURE IF EXISTS test_mrss;
- CREATE PROCEDURE test_mrss()
- BEGIN
- SELECT 1 AS col1, 2 AS col2 UNION SELECT 3, 4;
- SELECT 0 UNION SELECT 1;
- SELECT 1 AS col1, 2 AS col2, 3 AS col3 UNION SELECT 4, 5, 6;
- END
- `,
- }
-
- defer dbt.mustExec("DROP PROCEDURE IF EXISTS test_mrss")
-
- for i, query := range queries {
- dbt.mustExec(query)
-
- stmt, err := dbt.db.Prepare("CALL test_mrss()")
- if err != nil {
- dbt.Fatalf("%v (i=%d)", err, i)
- }
- defer stmt.Close()
-
- for j := 0; j < 2; j++ {
- rows, err := stmt.Query()
- if err != nil {
- dbt.Fatalf("%v (i=%d) (j=%d)", err, i, j)
- }
- checkRows(fmt.Sprintf("prepared stmt query (i=%d) (j=%d): ", i, j), rows, dbt)
- }
- }
- })
-}
-
-func TestMultiResultSetNoSelect(t *testing.T) {
- runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
- rows := dbt.mustQuery("DO 1; DO 2;")
- defer rows.Close()
-
- if rows.Next() {
- dbt.Error("unexpected row")
- }
-
- if rows.NextResultSet() {
- dbt.Error("unexpected next result set")
- }
-
- if err := rows.Err(); err != nil {
- dbt.Error("expected nil; got ", err)
- }
- })
-}
-
-// tests if rows are set in a proper state if some results were ignored before
-// calling rows.NextResultSet.
-func TestSkipResults(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- rows := dbt.mustQuery("SELECT 1, 2")
- defer rows.Close()
-
- if !rows.Next() {
- dbt.Error("expected row")
- }
-
- if rows.NextResultSet() {
- dbt.Error("unexpected next result set")
- }
-
- if err := rows.Err(); err != nil {
- dbt.Error("expected nil; got ", err)
- }
- })
-}
-
-func TestPingContext(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- ctx, cancel := context.WithCancel(context.Background())
- cancel()
- if err := dbt.db.PingContext(ctx); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- })
-}
-
-func TestContextCancelExec(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(100*time.Millisecond, cancel).Stop()
-
- // This query will be canceled.
- startTime := time.Now()
- if _, err := dbt.db.ExecContext(ctx, "INSERT INTO test VALUES (SLEEP(1))"); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- if d := time.Since(startTime); d > 500*time.Millisecond {
- dbt.Errorf("too long execution time: %s", d)
- }
-
- // Wait for the INSERT query has done.
- time.Sleep(time.Second)
-
- // Check how many times the query is executed.
- var v int
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 { // TODO: need to kill the query, and v should be 0.
- dbt.Errorf("expected val to be 1, got %d", v)
- }
-
- // Context is already canceled, so error should come before execution.
- if _, err := dbt.db.ExecContext(ctx, "INSERT INTO test VALUES (1)"); err == nil {
- dbt.Error("expected error")
- } else if err.Error() != "context canceled" {
- dbt.Fatalf("unexpected error: %s", err)
- }
-
- // The second insert query will fail, so the table has no changes.
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 {
- dbt.Errorf("expected val to be 1, got %d", v)
- }
- })
-}
-
-func TestContextCancelQuery(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(100*time.Millisecond, cancel).Stop()
-
- // This query will be canceled.
- startTime := time.Now()
- if _, err := dbt.db.QueryContext(ctx, "INSERT INTO test VALUES (SLEEP(1))"); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- if d := time.Since(startTime); d > 500*time.Millisecond {
- dbt.Errorf("too long execution time: %s", d)
- }
-
- // Wait for the INSERT query has done.
- time.Sleep(time.Second)
-
- // Check how many times the query is executed.
- var v int
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 { // TODO: need to kill the query, and v should be 0.
- dbt.Errorf("expected val to be 1, got %d", v)
- }
-
- // Context is already canceled, so error should come before execution.
- if _, err := dbt.db.QueryContext(ctx, "INSERT INTO test VALUES (1)"); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
-
- // The second insert query will fail, so the table has no changes.
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 {
- dbt.Errorf("expected val to be 1, got %d", v)
- }
- })
-}
-
-func TestContextCancelQueryRow(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- dbt.mustExec("INSERT INTO test VALUES (1), (2), (3)")
- ctx, cancel := context.WithCancel(context.Background())
-
- rows, err := dbt.db.QueryContext(ctx, "SELECT v FROM test")
- if err != nil {
- dbt.Fatalf("%s", err.Error())
- }
-
- // the first row will be succeed.
- var v int
- if !rows.Next() {
- dbt.Fatalf("unexpected end")
- }
- if err := rows.Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
-
- cancel()
- // make sure the driver recieve cancel request.
- time.Sleep(100 * time.Millisecond)
-
- if rows.Next() {
- dbt.Errorf("expected end, but not")
- }
- if err := rows.Err(); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- })
-}
-
-func TestContextCancelPrepare(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- ctx, cancel := context.WithCancel(context.Background())
- cancel()
- if _, err := dbt.db.PrepareContext(ctx, "SELECT 1"); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- })
-}
-
-func TestContextCancelStmtExec(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
- stmt, err := dbt.db.PrepareContext(ctx, "INSERT INTO test VALUES (SLEEP(1))")
- if err != nil {
- dbt.Fatalf("unexpected error: %v", err)
- }
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(100*time.Millisecond, cancel).Stop()
-
- // This query will be canceled.
- startTime := time.Now()
- if _, err := stmt.ExecContext(ctx); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- if d := time.Since(startTime); d > 500*time.Millisecond {
- dbt.Errorf("too long execution time: %s", d)
- }
-
- // Wait for the INSERT query has done.
- time.Sleep(time.Second)
-
- // Check how many times the query is executed.
- var v int
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 { // TODO: need to kill the query, and v should be 0.
- dbt.Errorf("expected val to be 1, got %d", v)
- }
- })
-}
-
-func TestContextCancelStmtQuery(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
- stmt, err := dbt.db.PrepareContext(ctx, "INSERT INTO test VALUES (SLEEP(1))")
- if err != nil {
- dbt.Fatalf("unexpected error: %v", err)
- }
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(100*time.Millisecond, cancel).Stop()
-
- // This query will be canceled.
- startTime := time.Now()
- if _, err := stmt.QueryContext(ctx); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- if d := time.Since(startTime); d > 500*time.Millisecond {
- dbt.Errorf("too long execution time: %s", d)
- }
-
- // Wait for the INSERT query has done.
- time.Sleep(time.Second)
-
- // Check how many times the query is executed.
- var v int
- if err := dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&v); err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- if v != 1 { // TODO: need to kill the query, and v should be 0.
- dbt.Errorf("expected val to be 1, got %d", v)
- }
- })
-}
-
-func TestContextCancelBegin(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
- tx, err := dbt.db.BeginTx(ctx, nil)
- if err != nil {
- dbt.Fatal(err)
- }
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(100*time.Millisecond, cancel).Stop()
-
- // This query will be canceled.
- startTime := time.Now()
- if _, err := tx.ExecContext(ctx, "INSERT INTO test VALUES (SLEEP(1))"); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- if d := time.Since(startTime); d > 500*time.Millisecond {
- dbt.Errorf("too long execution time: %s", d)
- }
-
- // Transaction is canceled, so expect an error.
- switch err := tx.Commit(); err {
- case sql.ErrTxDone:
- // because the transaction has already been rollbacked.
- // the database/sql package watches ctx
- // and rollbacks when ctx is canceled.
- case context.Canceled:
- // the database/sql package rollbacks on another goroutine,
- // so the transaction may not be rollbacked depending on goroutine scheduling.
- default:
- dbt.Errorf("expected sql.ErrTxDone or context.Canceled, got %v", err)
- }
-
- // Context is canceled, so cannot begin a transaction.
- if _, err := dbt.db.BeginTx(ctx, nil); err != context.Canceled {
- dbt.Errorf("expected context.Canceled, got %v", err)
- }
- })
-}
-
-func TestContextBeginIsolationLevel(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- tx1, err := dbt.db.BeginTx(ctx, &sql.TxOptions{
- Isolation: sql.LevelRepeatableRead,
- })
- if err != nil {
- dbt.Fatal(err)
- }
-
- tx2, err := dbt.db.BeginTx(ctx, &sql.TxOptions{
- Isolation: sql.LevelReadCommitted,
- })
- if err != nil {
- dbt.Fatal(err)
- }
-
- _, err = tx1.ExecContext(ctx, "INSERT INTO test VALUES (1)")
- if err != nil {
- dbt.Fatal(err)
- }
-
- var v int
- row := tx2.QueryRowContext(ctx, "SELECT COUNT(*) FROM test")
- if err := row.Scan(&v); err != nil {
- dbt.Fatal(err)
- }
- // Because writer transaction wasn't commited yet, it should be available
- if v != 0 {
- dbt.Errorf("expected val to be 0, got %d", v)
- }
-
- err = tx1.Commit()
- if err != nil {
- dbt.Fatal(err)
- }
-
- row = tx2.QueryRowContext(ctx, "SELECT COUNT(*) FROM test")
- if err := row.Scan(&v); err != nil {
- dbt.Fatal(err)
- }
- // Data written by writer transaction is already commited, it should be selectable
- if v != 1 {
- dbt.Errorf("expected val to be 1, got %d", v)
- }
- tx2.Commit()
- })
-}
-
-func TestContextBeginReadOnly(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- tx, err := dbt.db.BeginTx(ctx, &sql.TxOptions{
- ReadOnly: true,
- })
- if _, ok := err.(*MySQLError); ok {
- dbt.Skip("It seems that your MySQL does not support READ ONLY transactions")
- return
- } else if err != nil {
- dbt.Fatal(err)
- }
-
- // INSERT queries fail in a READ ONLY transaction.
- _, err = tx.ExecContext(ctx, "INSERT INTO test VALUES (1)")
- if _, ok := err.(*MySQLError); !ok {
- dbt.Errorf("expected MySQLError, got %v", err)
- }
-
- // SELECT queries can be executed.
- var v int
- row := tx.QueryRowContext(ctx, "SELECT COUNT(*) FROM test")
- if err := row.Scan(&v); err != nil {
- dbt.Fatal(err)
- }
- if v != 0 {
- dbt.Errorf("expected val to be 0, got %d", v)
- }
-
- if err := tx.Commit(); err != nil {
- dbt.Fatal(err)
- }
- })
-}
-
-func TestRowsColumnTypes(t *testing.T) {
- niNULL := sql.NullInt64{Int64: 0, Valid: false}
- ni0 := sql.NullInt64{Int64: 0, Valid: true}
- ni1 := sql.NullInt64{Int64: 1, Valid: true}
- ni42 := sql.NullInt64{Int64: 42, Valid: true}
- nfNULL := sql.NullFloat64{Float64: 0.0, Valid: false}
- nf0 := sql.NullFloat64{Float64: 0.0, Valid: true}
- nf1337 := sql.NullFloat64{Float64: 13.37, Valid: true}
- nt0 := NullTime{Time: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC), Valid: true}
- nt1 := NullTime{Time: time.Date(2006, 01, 02, 15, 04, 05, 100000000, time.UTC), Valid: true}
- nt2 := NullTime{Time: time.Date(2006, 01, 02, 15, 04, 05, 110000000, time.UTC), Valid: true}
- nt6 := NullTime{Time: time.Date(2006, 01, 02, 15, 04, 05, 111111000, time.UTC), Valid: true}
- nd1 := NullTime{Time: time.Date(2006, 01, 02, 0, 0, 0, 0, time.UTC), Valid: true}
- nd2 := NullTime{Time: time.Date(2006, 03, 04, 0, 0, 0, 0, time.UTC), Valid: true}
- ndNULL := NullTime{Time: time.Time{}, Valid: false}
- rbNULL := sql.RawBytes(nil)
- rb0 := sql.RawBytes("0")
- rb42 := sql.RawBytes("42")
- rbTest := sql.RawBytes("Test")
- rb0pad4 := sql.RawBytes("0\x00\x00\x00") // BINARY right-pads values with 0x00
- rbx0 := sql.RawBytes("\x00")
- rbx42 := sql.RawBytes("\x42")
-
- var columns = []struct {
- name string
- fieldType string // type used when creating table schema
- databaseTypeName string // actual type used by MySQL
- scanType reflect.Type
- nullable bool
- precision int64 // 0 if not ok
- scale int64
- valuesIn [3]string
- valuesOut [3]interface{}
- }{
- {"bit8null", "BIT(8)", "BIT", scanTypeRawBytes, true, 0, 0, [3]string{"0x0", "NULL", "0x42"}, [3]interface{}{rbx0, rbNULL, rbx42}},
- {"boolnull", "BOOL", "TINYINT", scanTypeNullInt, true, 0, 0, [3]string{"NULL", "true", "0"}, [3]interface{}{niNULL, ni1, ni0}},
- {"bool", "BOOL NOT NULL", "TINYINT", scanTypeInt8, false, 0, 0, [3]string{"1", "0", "FALSE"}, [3]interface{}{int8(1), int8(0), int8(0)}},
- {"intnull", "INTEGER", "INT", scanTypeNullInt, true, 0, 0, [3]string{"0", "NULL", "42"}, [3]interface{}{ni0, niNULL, ni42}},
- {"smallint", "SMALLINT NOT NULL", "SMALLINT", scanTypeInt16, false, 0, 0, [3]string{"0", "-32768", "32767"}, [3]interface{}{int16(0), int16(-32768), int16(32767)}},
- {"smallintnull", "SMALLINT", "SMALLINT", scanTypeNullInt, true, 0, 0, [3]string{"0", "NULL", "42"}, [3]interface{}{ni0, niNULL, ni42}},
- {"int3null", "INT(3)", "INT", scanTypeNullInt, true, 0, 0, [3]string{"0", "NULL", "42"}, [3]interface{}{ni0, niNULL, ni42}},
- {"int7", "INT(7) NOT NULL", "INT", scanTypeInt32, false, 0, 0, [3]string{"0", "-1337", "42"}, [3]interface{}{int32(0), int32(-1337), int32(42)}},
- {"mediumintnull", "MEDIUMINT", "MEDIUMINT", scanTypeNullInt, true, 0, 0, [3]string{"0", "42", "NULL"}, [3]interface{}{ni0, ni42, niNULL}},
- {"bigint", "BIGINT NOT NULL", "BIGINT", scanTypeInt64, false, 0, 0, [3]string{"0", "65535", "-42"}, [3]interface{}{int64(0), int64(65535), int64(-42)}},
- {"bigintnull", "BIGINT", "BIGINT", scanTypeNullInt, true, 0, 0, [3]string{"NULL", "1", "42"}, [3]interface{}{niNULL, ni1, ni42}},
- {"tinyuint", "TINYINT UNSIGNED NOT NULL", "TINYINT", scanTypeUint8, false, 0, 0, [3]string{"0", "255", "42"}, [3]interface{}{uint8(0), uint8(255), uint8(42)}},
- {"smalluint", "SMALLINT UNSIGNED NOT NULL", "SMALLINT", scanTypeUint16, false, 0, 0, [3]string{"0", "65535", "42"}, [3]interface{}{uint16(0), uint16(65535), uint16(42)}},
- {"biguint", "BIGINT UNSIGNED NOT NULL", "BIGINT", scanTypeUint64, false, 0, 0, [3]string{"0", "65535", "42"}, [3]interface{}{uint64(0), uint64(65535), uint64(42)}},
- {"uint13", "INT(13) UNSIGNED NOT NULL", "INT", scanTypeUint32, false, 0, 0, [3]string{"0", "1337", "42"}, [3]interface{}{uint32(0), uint32(1337), uint32(42)}},
- {"float", "FLOAT NOT NULL", "FLOAT", scanTypeFloat32, false, math.MaxInt64, math.MaxInt64, [3]string{"0", "42", "13.37"}, [3]interface{}{float32(0), float32(42), float32(13.37)}},
- {"floatnull", "FLOAT", "FLOAT", scanTypeNullFloat, true, math.MaxInt64, math.MaxInt64, [3]string{"0", "NULL", "13.37"}, [3]interface{}{nf0, nfNULL, nf1337}},
- {"float74null", "FLOAT(7,4)", "FLOAT", scanTypeNullFloat, true, math.MaxInt64, 4, [3]string{"0", "NULL", "13.37"}, [3]interface{}{nf0, nfNULL, nf1337}},
- {"double", "DOUBLE NOT NULL", "DOUBLE", scanTypeFloat64, false, math.MaxInt64, math.MaxInt64, [3]string{"0", "42", "13.37"}, [3]interface{}{float64(0), float64(42), float64(13.37)}},
- {"doublenull", "DOUBLE", "DOUBLE", scanTypeNullFloat, true, math.MaxInt64, math.MaxInt64, [3]string{"0", "NULL", "13.37"}, [3]interface{}{nf0, nfNULL, nf1337}},
- {"decimal1", "DECIMAL(10,6) NOT NULL", "DECIMAL", scanTypeRawBytes, false, 10, 6, [3]string{"0", "13.37", "1234.123456"}, [3]interface{}{sql.RawBytes("0.000000"), sql.RawBytes("13.370000"), sql.RawBytes("1234.123456")}},
- {"decimal1null", "DECIMAL(10,6)", "DECIMAL", scanTypeRawBytes, true, 10, 6, [3]string{"0", "NULL", "1234.123456"}, [3]interface{}{sql.RawBytes("0.000000"), rbNULL, sql.RawBytes("1234.123456")}},
- {"decimal2", "DECIMAL(8,4) NOT NULL", "DECIMAL", scanTypeRawBytes, false, 8, 4, [3]string{"0", "13.37", "1234.123456"}, [3]interface{}{sql.RawBytes("0.0000"), sql.RawBytes("13.3700"), sql.RawBytes("1234.1235")}},
- {"decimal2null", "DECIMAL(8,4)", "DECIMAL", scanTypeRawBytes, true, 8, 4, [3]string{"0", "NULL", "1234.123456"}, [3]interface{}{sql.RawBytes("0.0000"), rbNULL, sql.RawBytes("1234.1235")}},
- {"decimal3", "DECIMAL(5,0) NOT NULL", "DECIMAL", scanTypeRawBytes, false, 5, 0, [3]string{"0", "13.37", "-12345.123456"}, [3]interface{}{rb0, sql.RawBytes("13"), sql.RawBytes("-12345")}},
- {"decimal3null", "DECIMAL(5,0)", "DECIMAL", scanTypeRawBytes, true, 5, 0, [3]string{"0", "NULL", "-12345.123456"}, [3]interface{}{rb0, rbNULL, sql.RawBytes("-12345")}},
- {"char25null", "CHAR(25)", "CHAR", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0, rbNULL, rbTest}},
- {"varchar42", "VARCHAR(42) NOT NULL", "VARCHAR", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"binary4null", "BINARY(4)", "BINARY", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0pad4, rbNULL, rbTest}},
- {"varbinary42", "VARBINARY(42) NOT NULL", "VARBINARY", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"tinyblobnull", "TINYBLOB", "BLOB", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0, rbNULL, rbTest}},
- {"tinytextnull", "TINYTEXT", "TEXT", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0, rbNULL, rbTest}},
- {"blobnull", "BLOB", "BLOB", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0, rbNULL, rbTest}},
- {"textnull", "TEXT", "TEXT", scanTypeRawBytes, true, 0, 0, [3]string{"0", "NULL", "'Test'"}, [3]interface{}{rb0, rbNULL, rbTest}},
- {"mediumblob", "MEDIUMBLOB NOT NULL", "BLOB", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"mediumtext", "MEDIUMTEXT NOT NULL", "TEXT", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"longblob", "LONGBLOB NOT NULL", "BLOB", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"longtext", "LONGTEXT NOT NULL", "TEXT", scanTypeRawBytes, false, 0, 0, [3]string{"0", "'Test'", "42"}, [3]interface{}{rb0, rbTest, rb42}},
- {"datetime", "DATETIME", "DATETIME", scanTypeNullTime, true, 0, 0, [3]string{"'2006-01-02 15:04:05'", "'2006-01-02 15:04:05.1'", "'2006-01-02 15:04:05.111111'"}, [3]interface{}{nt0, nt0, nt0}},
- {"datetime2", "DATETIME(2)", "DATETIME", scanTypeNullTime, true, 2, 2, [3]string{"'2006-01-02 15:04:05'", "'2006-01-02 15:04:05.1'", "'2006-01-02 15:04:05.111111'"}, [3]interface{}{nt0, nt1, nt2}},
- {"datetime6", "DATETIME(6)", "DATETIME", scanTypeNullTime, true, 6, 6, [3]string{"'2006-01-02 15:04:05'", "'2006-01-02 15:04:05.1'", "'2006-01-02 15:04:05.111111'"}, [3]interface{}{nt0, nt1, nt6}},
- {"date", "DATE", "DATE", scanTypeNullTime, true, 0, 0, [3]string{"'2006-01-02'", "NULL", "'2006-03-04'"}, [3]interface{}{nd1, ndNULL, nd2}},
- {"year", "YEAR NOT NULL", "YEAR", scanTypeUint16, false, 0, 0, [3]string{"2006", "2000", "1994"}, [3]interface{}{uint16(2006), uint16(2000), uint16(1994)}},
- }
-
- schema := ""
- values1 := ""
- values2 := ""
- values3 := ""
- for _, column := range columns {
- schema += fmt.Sprintf("`%s` %s, ", column.name, column.fieldType)
- values1 += column.valuesIn[0] + ", "
- values2 += column.valuesIn[1] + ", "
- values3 += column.valuesIn[2] + ", "
- }
- schema = schema[:len(schema)-2]
- values1 = values1[:len(values1)-2]
- values2 = values2[:len(values2)-2]
- values3 = values3[:len(values3)-2]
-
- dsns := []string{
- dsn + "&parseTime=true",
- dsn + "&parseTime=false",
- }
- for _, testdsn := range dsns {
- runTests(t, testdsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (" + schema + ")")
- dbt.mustExec("INSERT INTO test VALUES (" + values1 + "), (" + values2 + "), (" + values3 + ")")
-
- rows, err := dbt.db.Query("SELECT * FROM test")
- if err != nil {
- t.Fatalf("Query: %v", err)
- }
-
- tt, err := rows.ColumnTypes()
- if err != nil {
- t.Fatalf("ColumnTypes: %v", err)
- }
-
- if len(tt) != len(columns) {
- t.Fatalf("unexpected number of columns: expected %d, got %d", len(columns), len(tt))
- }
-
- types := make([]reflect.Type, len(tt))
- for i, tp := range tt {
- column := columns[i]
-
- // Name
- name := tp.Name()
- if name != column.name {
- t.Errorf("column name mismatch %s != %s", name, column.name)
- continue
- }
-
- // DatabaseTypeName
- databaseTypeName := tp.DatabaseTypeName()
- if databaseTypeName != column.databaseTypeName {
- t.Errorf("databasetypename name mismatch for column %q: %s != %s", name, databaseTypeName, column.databaseTypeName)
- continue
- }
-
- // ScanType
- scanType := tp.ScanType()
- if scanType != column.scanType {
- if scanType == nil {
- t.Errorf("scantype is null for column %q", name)
- } else {
- t.Errorf("scantype mismatch for column %q: %s != %s", name, scanType.Name(), column.scanType.Name())
- }
- continue
- }
- types[i] = scanType
-
- // Nullable
- nullable, ok := tp.Nullable()
- if !ok {
- t.Errorf("nullable not ok %q", name)
- continue
- }
- if nullable != column.nullable {
- t.Errorf("nullable mismatch for column %q: %t != %t", name, nullable, column.nullable)
- }
-
- // Length
- // length, ok := tp.Length()
- // if length != column.length {
- // if !ok {
- // t.Errorf("length not ok for column %q", name)
- // } else {
- // t.Errorf("length mismatch for column %q: %d != %d", name, length, column.length)
- // }
- // continue
- // }
-
- // Precision and Scale
- precision, scale, ok := tp.DecimalSize()
- if precision != column.precision {
- if !ok {
- t.Errorf("precision not ok for column %q", name)
- } else {
- t.Errorf("precision mismatch for column %q: %d != %d", name, precision, column.precision)
- }
- continue
- }
- if scale != column.scale {
- if !ok {
- t.Errorf("scale not ok for column %q", name)
- } else {
- t.Errorf("scale mismatch for column %q: %d != %d", name, scale, column.scale)
- }
- continue
- }
- }
-
- values := make([]interface{}, len(tt))
- for i := range values {
- values[i] = reflect.New(types[i]).Interface()
- }
- i := 0
- for rows.Next() {
- err = rows.Scan(values...)
- if err != nil {
- t.Fatalf("failed to scan values in %v", err)
- }
- for j := range values {
- value := reflect.ValueOf(values[j]).Elem().Interface()
- if !reflect.DeepEqual(value, columns[j].valuesOut[i]) {
- if columns[j].scanType == scanTypeRawBytes {
- t.Errorf("row %d, column %d: %v != %v", i, j, string(value.(sql.RawBytes)), string(columns[j].valuesOut[i].(sql.RawBytes)))
- } else {
- t.Errorf("row %d, column %d: %v != %v", i, j, value, columns[j].valuesOut[i])
- }
- }
- }
- i++
- }
- if i != 3 {
- t.Errorf("expected 3 rows, got %d", i)
- }
-
- if err := rows.Close(); err != nil {
- t.Errorf("error closing rows: %s", err)
- }
- })
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/driver_test.go b/vendor/github.com/go-sql-driver/mysql/driver_test.go
deleted file mode 100644
index 7877aa979..000000000
--- a/vendor/github.com/go-sql-driver/mysql/driver_test.go
+++ /dev/null
@@ -1,2020 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "bytes"
- "crypto/tls"
- "database/sql"
- "database/sql/driver"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "net"
- "net/url"
- "os"
- "strings"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-)
-
-// Ensure that all the driver interfaces are implemented
-var (
- _ driver.Rows = &binaryRows{}
- _ driver.Rows = &textRows{}
-)
-
-var (
- user string
- pass string
- prot string
- addr string
- dbname string
- dsn string
- netAddr string
- available bool
-)
-
-var (
- tDate = time.Date(2012, 6, 14, 0, 0, 0, 0, time.UTC)
- sDate = "2012-06-14"
- tDateTime = time.Date(2011, 11, 20, 21, 27, 37, 0, time.UTC)
- sDateTime = "2011-11-20 21:27:37"
- tDate0 = time.Time{}
- sDate0 = "0000-00-00"
- sDateTime0 = "0000-00-00 00:00:00"
-)
-
-// See https://github.com/go-sql-driver/mysql/wiki/Testing
-func init() {
- // get environment variables
- env := func(key, defaultValue string) string {
- if value := os.Getenv(key); value != "" {
- return value
- }
- return defaultValue
- }
- user = env("MYSQL_TEST_USER", "root")
- pass = env("MYSQL_TEST_PASS", "")
- prot = env("MYSQL_TEST_PROT", "tcp")
- addr = env("MYSQL_TEST_ADDR", "localhost:3306")
- dbname = env("MYSQL_TEST_DBNAME", "gotest")
- netAddr = fmt.Sprintf("%s(%s)", prot, addr)
- dsn = fmt.Sprintf("%s:%s@%s/%s?timeout=30s", user, pass, netAddr, dbname)
- c, err := net.Dial(prot, addr)
- if err == nil {
- available = true
- c.Close()
- }
-}
-
-type DBTest struct {
- *testing.T
- db *sql.DB
-}
-
-func runTestsWithMultiStatement(t *testing.T, dsn string, tests ...func(dbt *DBTest)) {
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- dsn += "&multiStatements=true"
- var db *sql.DB
- if _, err := ParseDSN(dsn); err != errInvalidDSNUnsafeCollation {
- db, err = sql.Open("mysql", dsn)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db.Close()
- }
-
- dbt := &DBTest{t, db}
- for _, test := range tests {
- test(dbt)
- dbt.db.Exec("DROP TABLE IF EXISTS test")
- }
-}
-
-func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)) {
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- db, err := sql.Open("mysql", dsn)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db.Close()
-
- db.Exec("DROP TABLE IF EXISTS test")
-
- dsn2 := dsn + "&interpolateParams=true"
- var db2 *sql.DB
- if _, err := ParseDSN(dsn2); err != errInvalidDSNUnsafeCollation {
- db2, err = sql.Open("mysql", dsn2)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db2.Close()
- }
-
- dsn3 := dsn + "&multiStatements=true"
- var db3 *sql.DB
- if _, err := ParseDSN(dsn3); err != errInvalidDSNUnsafeCollation {
- db3, err = sql.Open("mysql", dsn3)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db3.Close()
- }
-
- dbt := &DBTest{t, db}
- dbt2 := &DBTest{t, db2}
- dbt3 := &DBTest{t, db3}
- for _, test := range tests {
- test(dbt)
- dbt.db.Exec("DROP TABLE IF EXISTS test")
- if db2 != nil {
- test(dbt2)
- dbt2.db.Exec("DROP TABLE IF EXISTS test")
- }
- if db3 != nil {
- test(dbt3)
- dbt3.db.Exec("DROP TABLE IF EXISTS test")
- }
- }
-}
-
-func (dbt *DBTest) fail(method, query string, err error) {
- if len(query) > 300 {
- query = "[query too large to print]"
- }
- dbt.Fatalf("error on %s %s: %s", method, query, err.Error())
-}
-
-func (dbt *DBTest) mustExec(query string, args ...interface{}) (res sql.Result) {
- res, err := dbt.db.Exec(query, args...)
- if err != nil {
- dbt.fail("exec", query, err)
- }
- return res
-}
-
-func (dbt *DBTest) mustQuery(query string, args ...interface{}) (rows *sql.Rows) {
- rows, err := dbt.db.Query(query, args...)
- if err != nil {
- dbt.fail("query", query, err)
- }
- return rows
-}
-
-func maybeSkip(t *testing.T, err error, skipErrno uint16) {
- mySQLErr, ok := err.(*MySQLError)
- if !ok {
- return
- }
-
- if mySQLErr.Number == skipErrno {
- t.Skipf("skipping test for error: %v", err)
- }
-}
-
-func TestEmptyQuery(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- // just a comment, no query
- rows := dbt.mustQuery("--")
- // will hang before #255
- if rows.Next() {
- dbt.Errorf("next on rows must be false")
- }
- })
-}
-
-func TestCRUD(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- // Create Table
- dbt.mustExec("CREATE TABLE test (value BOOL)")
-
- // Test for unexpected data
- var out bool
- rows := dbt.mustQuery("SELECT * FROM test")
- if rows.Next() {
- dbt.Error("unexpected data in empty table")
- }
-
- // Create Data
- res := dbt.mustExec("INSERT INTO test VALUES (1)")
- count, err := res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 1 {
- dbt.Fatalf("expected 1 affected row, got %d", count)
- }
-
- id, err := res.LastInsertId()
- if err != nil {
- dbt.Fatalf("res.LastInsertId() returned error: %s", err.Error())
- }
- if id != 0 {
- dbt.Fatalf("expected InsertId 0, got %d", id)
- }
-
- // Read
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if true != out {
- dbt.Errorf("true != %t", out)
- }
-
- if rows.Next() {
- dbt.Error("unexpected data")
- }
- } else {
- dbt.Error("no data")
- }
-
- // Update
- res = dbt.mustExec("UPDATE test SET value = ? WHERE value = ?", false, true)
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 1 {
- dbt.Fatalf("expected 1 affected row, got %d", count)
- }
-
- // Check Update
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if false != out {
- dbt.Errorf("false != %t", out)
- }
-
- if rows.Next() {
- dbt.Error("unexpected data")
- }
- } else {
- dbt.Error("no data")
- }
-
- // Delete
- res = dbt.mustExec("DELETE FROM test WHERE value = ?", false)
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 1 {
- dbt.Fatalf("expected 1 affected row, got %d", count)
- }
-
- // Check for unexpected rows
- res = dbt.mustExec("DELETE FROM test")
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 0 {
- dbt.Fatalf("expected 0 affected row, got %d", count)
- }
- })
-}
-
-func TestMultiQuery(t *testing.T) {
- runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
- // Create Table
- dbt.mustExec("CREATE TABLE `test` (`id` int(11) NOT NULL, `value` int(11) NOT NULL) ")
-
- // Create Data
- res := dbt.mustExec("INSERT INTO test VALUES (1, 1)")
- count, err := res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 1 {
- dbt.Fatalf("expected 1 affected row, got %d", count)
- }
-
- // Update
- res = dbt.mustExec("UPDATE test SET value = 3 WHERE id = 1; UPDATE test SET value = 4 WHERE id = 1; UPDATE test SET value = 5 WHERE id = 1;")
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 1 {
- dbt.Fatalf("expected 1 affected row, got %d", count)
- }
-
- // Read
- var out int
- rows := dbt.mustQuery("SELECT value FROM test WHERE id=1;")
- if rows.Next() {
- rows.Scan(&out)
- if 5 != out {
- dbt.Errorf("5 != %d", out)
- }
-
- if rows.Next() {
- dbt.Error("unexpected data")
- }
- } else {
- dbt.Error("no data")
- }
-
- })
-}
-
-func TestInt(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- types := [5]string{"TINYINT", "SMALLINT", "MEDIUMINT", "INT", "BIGINT"}
- in := int64(42)
- var out int64
- var rows *sql.Rows
-
- // SIGNED
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (value " + v + ")")
-
- dbt.mustExec("INSERT INTO test VALUES (?)", in)
-
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if in != out {
- dbt.Errorf("%s: %d != %d", v, in, out)
- }
- } else {
- dbt.Errorf("%s: no data", v)
- }
-
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
-
- // UNSIGNED ZEROFILL
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (value " + v + " ZEROFILL)")
-
- dbt.mustExec("INSERT INTO test VALUES (?)", in)
-
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if in != out {
- dbt.Errorf("%s ZEROFILL: %d != %d", v, in, out)
- }
- } else {
- dbt.Errorf("%s ZEROFILL: no data", v)
- }
-
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
- })
-}
-
-func TestFloat32(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- types := [2]string{"FLOAT", "DOUBLE"}
- in := float32(42.23)
- var out float32
- var rows *sql.Rows
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (value " + v + ")")
- dbt.mustExec("INSERT INTO test VALUES (?)", in)
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if in != out {
- dbt.Errorf("%s: %g != %g", v, in, out)
- }
- } else {
- dbt.Errorf("%s: no data", v)
- }
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
- })
-}
-
-func TestFloat64(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- types := [2]string{"FLOAT", "DOUBLE"}
- var expected float64 = 42.23
- var out float64
- var rows *sql.Rows
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (value " + v + ")")
- dbt.mustExec("INSERT INTO test VALUES (42.23)")
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if expected != out {
- dbt.Errorf("%s: %g != %g", v, expected, out)
- }
- } else {
- dbt.Errorf("%s: no data", v)
- }
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
- })
-}
-
-func TestFloat64Placeholder(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- types := [2]string{"FLOAT", "DOUBLE"}
- var expected float64 = 42.23
- var out float64
- var rows *sql.Rows
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (id int, value " + v + ")")
- dbt.mustExec("INSERT INTO test VALUES (1, 42.23)")
- rows = dbt.mustQuery("SELECT value FROM test WHERE id = ?", 1)
- if rows.Next() {
- rows.Scan(&out)
- if expected != out {
- dbt.Errorf("%s: %g != %g", v, expected, out)
- }
- } else {
- dbt.Errorf("%s: no data", v)
- }
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
- })
-}
-
-func TestString(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- types := [6]string{"CHAR(255)", "VARCHAR(255)", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT"}
- in := "κόσμε üöäßñóùéàâÿœ'îë ÃrvíztűrÅ‘ ã„ã‚ã¯ã«ã»ã¸ã¨ã¡ã‚Šã¬ã‚‹ã‚’ イロãƒãƒ‹ãƒ›ãƒ˜ãƒˆ דג סקרן чащах น่าฟังเอย"
- var out string
- var rows *sql.Rows
-
- for _, v := range types {
- dbt.mustExec("CREATE TABLE test (value " + v + ") CHARACTER SET utf8")
-
- dbt.mustExec("INSERT INTO test VALUES (?)", in)
-
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if in != out {
- dbt.Errorf("%s: %s != %s", v, in, out)
- }
- } else {
- dbt.Errorf("%s: no data", v)
- }
-
- dbt.mustExec("DROP TABLE IF EXISTS test")
- }
-
- // BLOB
- dbt.mustExec("CREATE TABLE test (id int, value BLOB) CHARACTER SET utf8")
-
- id := 2
- in = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, " +
- "sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, " +
- "sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. " +
- "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. " +
- "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, " +
- "sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, " +
- "sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. " +
- "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
- dbt.mustExec("INSERT INTO test VALUES (?, ?)", id, in)
-
- err := dbt.db.QueryRow("SELECT value FROM test WHERE id = ?", id).Scan(&out)
- if err != nil {
- dbt.Fatalf("Error on BLOB-Query: %s", err.Error())
- } else if out != in {
- dbt.Errorf("BLOB: %s != %s", in, out)
- }
- })
-}
-
-type testValuer struct {
- value string
-}
-
-func (tv testValuer) Value() (driver.Value, error) {
- return tv.value, nil
-}
-
-func TestValuer(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- in := testValuer{"a_value"}
- var out string
- var rows *sql.Rows
-
- dbt.mustExec("CREATE TABLE test (value VARCHAR(255)) CHARACTER SET utf8")
- dbt.mustExec("INSERT INTO test VALUES (?)", in)
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if in.value != out {
- dbt.Errorf("Valuer: %v != %s", in, out)
- }
- } else {
- dbt.Errorf("Valuer: no data")
- }
-
- dbt.mustExec("DROP TABLE IF EXISTS test")
- })
-}
-
-type testValuerWithValidation struct {
- value string
-}
-
-func (tv testValuerWithValidation) Value() (driver.Value, error) {
- if len(tv.value) == 0 {
- return nil, fmt.Errorf("Invalid string valuer. Value must not be empty")
- }
-
- return tv.value, nil
-}
-
-func TestValuerWithValidation(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- in := testValuerWithValidation{"a_value"}
- var out string
- var rows *sql.Rows
-
- dbt.mustExec("CREATE TABLE testValuer (value VARCHAR(255)) CHARACTER SET utf8")
- dbt.mustExec("INSERT INTO testValuer VALUES (?)", in)
-
- rows = dbt.mustQuery("SELECT value FROM testValuer")
- defer rows.Close()
-
- if rows.Next() {
- rows.Scan(&out)
- if in.value != out {
- dbt.Errorf("Valuer: %v != %s", in, out)
- }
- } else {
- dbt.Errorf("Valuer: no data")
- }
-
- if _, err := dbt.db.Exec("INSERT INTO testValuer VALUES (?)", testValuerWithValidation{""}); err == nil {
- dbt.Errorf("Failed to check valuer error")
- }
-
- if _, err := dbt.db.Exec("INSERT INTO testValuer VALUES (?)", nil); err != nil {
- dbt.Errorf("Failed to check nil")
- }
-
- if _, err := dbt.db.Exec("INSERT INTO testValuer VALUES (?)", map[string]bool{}); err == nil {
- dbt.Errorf("Failed to check not valuer")
- }
-
- dbt.mustExec("DROP TABLE IF EXISTS testValuer")
- })
-}
-
-type timeTests struct {
- dbtype string
- tlayout string
- tests []timeTest
-}
-
-type timeTest struct {
- s string // leading "!": do not use t as value in queries
- t time.Time
-}
-
-type timeMode byte
-
-func (t timeMode) String() string {
- switch t {
- case binaryString:
- return "binary:string"
- case binaryTime:
- return "binary:time.Time"
- case textString:
- return "text:string"
- }
- panic("unsupported timeMode")
-}
-
-func (t timeMode) Binary() bool {
- switch t {
- case binaryString, binaryTime:
- return true
- }
- return false
-}
-
-const (
- binaryString timeMode = iota
- binaryTime
- textString
-)
-
-func (t timeTest) genQuery(dbtype string, mode timeMode) string {
- var inner string
- if mode.Binary() {
- inner = "?"
- } else {
- inner = `"%s"`
- }
- return `SELECT cast(` + inner + ` as ` + dbtype + `)`
-}
-
-func (t timeTest) run(dbt *DBTest, dbtype, tlayout string, mode timeMode) {
- var rows *sql.Rows
- query := t.genQuery(dbtype, mode)
- switch mode {
- case binaryString:
- rows = dbt.mustQuery(query, t.s)
- case binaryTime:
- rows = dbt.mustQuery(query, t.t)
- case textString:
- query = fmt.Sprintf(query, t.s)
- rows = dbt.mustQuery(query)
- default:
- panic("unsupported mode")
- }
- defer rows.Close()
- var err error
- if !rows.Next() {
- err = rows.Err()
- if err == nil {
- err = fmt.Errorf("no data")
- }
- dbt.Errorf("%s [%s]: %s", dbtype, mode, err)
- return
- }
- var dst interface{}
- err = rows.Scan(&dst)
- if err != nil {
- dbt.Errorf("%s [%s]: %s", dbtype, mode, err)
- return
- }
- switch val := dst.(type) {
- case []uint8:
- str := string(val)
- if str == t.s {
- return
- }
- if mode.Binary() && dbtype == "DATETIME" && len(str) == 26 && str[:19] == t.s {
- // a fix mainly for TravisCI:
- // accept full microsecond resolution in result for DATETIME columns
- // where the binary protocol was used
- return
- }
- dbt.Errorf("%s [%s] to string: expected %q, got %q",
- dbtype, mode,
- t.s, str,
- )
- case time.Time:
- if val == t.t {
- return
- }
- dbt.Errorf("%s [%s] to string: expected %q, got %q",
- dbtype, mode,
- t.s, val.Format(tlayout),
- )
- default:
- fmt.Printf("%#v\n", []interface{}{dbtype, tlayout, mode, t.s, t.t})
- dbt.Errorf("%s [%s]: unhandled type %T (is '%v')",
- dbtype, mode,
- val, val,
- )
- }
-}
-
-func TestDateTime(t *testing.T) {
- afterTime := func(t time.Time, d string) time.Time {
- dur, err := time.ParseDuration(d)
- if err != nil {
- panic(err)
- }
- return t.Add(dur)
- }
- // NOTE: MySQL rounds DATETIME(x) up - but that's not included in the tests
- format := "2006-01-02 15:04:05.999999"
- t0 := time.Time{}
- tstr0 := "0000-00-00 00:00:00.000000"
- testcases := []timeTests{
- {"DATE", format[:10], []timeTest{
- {t: time.Date(2011, 11, 20, 0, 0, 0, 0, time.UTC)},
- {t: t0, s: tstr0[:10]},
- }},
- {"DATETIME", format[:19], []timeTest{
- {t: time.Date(2011, 11, 20, 21, 27, 37, 0, time.UTC)},
- {t: t0, s: tstr0[:19]},
- }},
- {"DATETIME(0)", format[:21], []timeTest{
- {t: time.Date(2011, 11, 20, 21, 27, 37, 0, time.UTC)},
- {t: t0, s: tstr0[:19]},
- }},
- {"DATETIME(1)", format[:21], []timeTest{
- {t: time.Date(2011, 11, 20, 21, 27, 37, 100000000, time.UTC)},
- {t: t0, s: tstr0[:21]},
- }},
- {"DATETIME(6)", format, []timeTest{
- {t: time.Date(2011, 11, 20, 21, 27, 37, 123456000, time.UTC)},
- {t: t0, s: tstr0},
- }},
- {"TIME", format[11:19], []timeTest{
- {t: afterTime(t0, "12345s")},
- {s: "!-12:34:56"},
- {s: "!-838:59:59"},
- {s: "!838:59:59"},
- {t: t0, s: tstr0[11:19]},
- }},
- {"TIME(0)", format[11:19], []timeTest{
- {t: afterTime(t0, "12345s")},
- {s: "!-12:34:56"},
- {s: "!-838:59:59"},
- {s: "!838:59:59"},
- {t: t0, s: tstr0[11:19]},
- }},
- {"TIME(1)", format[11:21], []timeTest{
- {t: afterTime(t0, "12345600ms")},
- {s: "!-12:34:56.7"},
- {s: "!-838:59:58.9"},
- {s: "!838:59:58.9"},
- {t: t0, s: tstr0[11:21]},
- }},
- {"TIME(6)", format[11:], []timeTest{
- {t: afterTime(t0, "1234567890123000ns")},
- {s: "!-12:34:56.789012"},
- {s: "!-838:59:58.999999"},
- {s: "!838:59:58.999999"},
- {t: t0, s: tstr0[11:]},
- }},
- }
- dsns := []string{
- dsn + "&parseTime=true",
- dsn + "&parseTime=false",
- }
- for _, testdsn := range dsns {
- runTests(t, testdsn, func(dbt *DBTest) {
- microsecsSupported := false
- zeroDateSupported := false
- var rows *sql.Rows
- var err error
- rows, err = dbt.db.Query(`SELECT cast("00:00:00.1" as TIME(1)) = "00:00:00.1"`)
- if err == nil {
- rows.Scan(&microsecsSupported)
- rows.Close()
- }
- rows, err = dbt.db.Query(`SELECT cast("0000-00-00" as DATE) = "0000-00-00"`)
- if err == nil {
- rows.Scan(&zeroDateSupported)
- rows.Close()
- }
- for _, setups := range testcases {
- if t := setups.dbtype; !microsecsSupported && t[len(t)-1:] == ")" {
- // skip fractional second tests if unsupported by server
- continue
- }
- for _, setup := range setups.tests {
- allowBinTime := true
- if setup.s == "" {
- // fill time string wherever Go can reliable produce it
- setup.s = setup.t.Format(setups.tlayout)
- } else if setup.s[0] == '!' {
- // skip tests using setup.t as source in queries
- allowBinTime = false
- // fix setup.s - remove the "!"
- setup.s = setup.s[1:]
- }
- if !zeroDateSupported && setup.s == tstr0[:len(setup.s)] {
- // skip disallowed 0000-00-00 date
- continue
- }
- setup.run(dbt, setups.dbtype, setups.tlayout, textString)
- setup.run(dbt, setups.dbtype, setups.tlayout, binaryString)
- if allowBinTime {
- setup.run(dbt, setups.dbtype, setups.tlayout, binaryTime)
- }
- }
- }
- })
- }
-}
-
-func TestTimestampMicros(t *testing.T) {
- format := "2006-01-02 15:04:05.999999"
- f0 := format[:19]
- f1 := format[:21]
- f6 := format[:26]
- runTests(t, dsn, func(dbt *DBTest) {
- // check if microseconds are supported.
- // Do not use timestamp(x) for that check - before 5.5.6, x would mean display width
- // and not precision.
- // Se last paragraph at http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
- microsecsSupported := false
- if rows, err := dbt.db.Query(`SELECT cast("00:00:00.1" as TIME(1)) = "00:00:00.1"`); err == nil {
- rows.Scan(&microsecsSupported)
- rows.Close()
- }
- if !microsecsSupported {
- // skip test
- return
- }
- _, err := dbt.db.Exec(`
- CREATE TABLE test (
- value0 TIMESTAMP NOT NULL DEFAULT '` + f0 + `',
- value1 TIMESTAMP(1) NOT NULL DEFAULT '` + f1 + `',
- value6 TIMESTAMP(6) NOT NULL DEFAULT '` + f6 + `'
- )`,
- )
- if err != nil {
- dbt.Error(err)
- }
- defer dbt.mustExec("DROP TABLE IF EXISTS test")
- dbt.mustExec("INSERT INTO test SET value0=?, value1=?, value6=?", f0, f1, f6)
- var res0, res1, res6 string
- rows := dbt.mustQuery("SELECT * FROM test")
- if !rows.Next() {
- dbt.Errorf("test contained no selectable values")
- }
- err = rows.Scan(&res0, &res1, &res6)
- if err != nil {
- dbt.Error(err)
- }
- if res0 != f0 {
- dbt.Errorf("expected %q, got %q", f0, res0)
- }
- if res1 != f1 {
- dbt.Errorf("expected %q, got %q", f1, res1)
- }
- if res6 != f6 {
- dbt.Errorf("expected %q, got %q", f6, res6)
- }
- })
-}
-
-func TestNULL(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- nullStmt, err := dbt.db.Prepare("SELECT NULL")
- if err != nil {
- dbt.Fatal(err)
- }
- defer nullStmt.Close()
-
- nonNullStmt, err := dbt.db.Prepare("SELECT 1")
- if err != nil {
- dbt.Fatal(err)
- }
- defer nonNullStmt.Close()
-
- // NullBool
- var nb sql.NullBool
- // Invalid
- if err = nullStmt.QueryRow().Scan(&nb); err != nil {
- dbt.Fatal(err)
- }
- if nb.Valid {
- dbt.Error("valid NullBool which should be invalid")
- }
- // Valid
- if err = nonNullStmt.QueryRow().Scan(&nb); err != nil {
- dbt.Fatal(err)
- }
- if !nb.Valid {
- dbt.Error("invalid NullBool which should be valid")
- } else if nb.Bool != true {
- dbt.Errorf("Unexpected NullBool value: %t (should be true)", nb.Bool)
- }
-
- // NullFloat64
- var nf sql.NullFloat64
- // Invalid
- if err = nullStmt.QueryRow().Scan(&nf); err != nil {
- dbt.Fatal(err)
- }
- if nf.Valid {
- dbt.Error("valid NullFloat64 which should be invalid")
- }
- // Valid
- if err = nonNullStmt.QueryRow().Scan(&nf); err != nil {
- dbt.Fatal(err)
- }
- if !nf.Valid {
- dbt.Error("invalid NullFloat64 which should be valid")
- } else if nf.Float64 != float64(1) {
- dbt.Errorf("unexpected NullFloat64 value: %f (should be 1.0)", nf.Float64)
- }
-
- // NullInt64
- var ni sql.NullInt64
- // Invalid
- if err = nullStmt.QueryRow().Scan(&ni); err != nil {
- dbt.Fatal(err)
- }
- if ni.Valid {
- dbt.Error("valid NullInt64 which should be invalid")
- }
- // Valid
- if err = nonNullStmt.QueryRow().Scan(&ni); err != nil {
- dbt.Fatal(err)
- }
- if !ni.Valid {
- dbt.Error("invalid NullInt64 which should be valid")
- } else if ni.Int64 != int64(1) {
- dbt.Errorf("unexpected NullInt64 value: %d (should be 1)", ni.Int64)
- }
-
- // NullString
- var ns sql.NullString
- // Invalid
- if err = nullStmt.QueryRow().Scan(&ns); err != nil {
- dbt.Fatal(err)
- }
- if ns.Valid {
- dbt.Error("valid NullString which should be invalid")
- }
- // Valid
- if err = nonNullStmt.QueryRow().Scan(&ns); err != nil {
- dbt.Fatal(err)
- }
- if !ns.Valid {
- dbt.Error("invalid NullString which should be valid")
- } else if ns.String != `1` {
- dbt.Error("unexpected NullString value:" + ns.String + " (should be `1`)")
- }
-
- // nil-bytes
- var b []byte
- // Read nil
- if err = nullStmt.QueryRow().Scan(&b); err != nil {
- dbt.Fatal(err)
- }
- if b != nil {
- dbt.Error("non-nil []byte which should be nil")
- }
- // Read non-nil
- if err = nonNullStmt.QueryRow().Scan(&b); err != nil {
- dbt.Fatal(err)
- }
- if b == nil {
- dbt.Error("nil []byte which should be non-nil")
- }
- // Insert nil
- b = nil
- success := false
- if err = dbt.db.QueryRow("SELECT ? IS NULL", b).Scan(&success); err != nil {
- dbt.Fatal(err)
- }
- if !success {
- dbt.Error("inserting []byte(nil) as NULL failed")
- }
- // Check input==output with input==nil
- b = nil
- if err = dbt.db.QueryRow("SELECT ?", b).Scan(&b); err != nil {
- dbt.Fatal(err)
- }
- if b != nil {
- dbt.Error("non-nil echo from nil input")
- }
- // Check input==output with input!=nil
- b = []byte("")
- if err = dbt.db.QueryRow("SELECT ?", b).Scan(&b); err != nil {
- dbt.Fatal(err)
- }
- if b == nil {
- dbt.Error("nil echo from non-nil input")
- }
-
- // Insert NULL
- dbt.mustExec("CREATE TABLE test (dummmy1 int, value int, dummy2 int)")
-
- dbt.mustExec("INSERT INTO test VALUES (?, ?, ?)", 1, nil, 2)
-
- var out interface{}
- rows := dbt.mustQuery("SELECT * FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if out != nil {
- dbt.Errorf("%v != nil", out)
- }
- } else {
- dbt.Error("no data")
- }
- })
-}
-
-func TestUint64(t *testing.T) {
- const (
- u0 = uint64(0)
- uall = ^u0
- uhigh = uall >> 1
- utop = ^uhigh
- s0 = int64(0)
- sall = ^s0
- shigh = int64(uhigh)
- stop = ^shigh
- )
- runTests(t, dsn, func(dbt *DBTest) {
- stmt, err := dbt.db.Prepare(`SELECT ?, ?, ? ,?, ?, ?, ?, ?`)
- if err != nil {
- dbt.Fatal(err)
- }
- defer stmt.Close()
- row := stmt.QueryRow(
- u0, uhigh, utop, uall,
- s0, shigh, stop, sall,
- )
-
- var ua, ub, uc, ud uint64
- var sa, sb, sc, sd int64
-
- err = row.Scan(&ua, &ub, &uc, &ud, &sa, &sb, &sc, &sd)
- if err != nil {
- dbt.Fatal(err)
- }
- switch {
- case ua != u0,
- ub != uhigh,
- uc != utop,
- ud != uall,
- sa != s0,
- sb != shigh,
- sc != stop,
- sd != sall:
- dbt.Fatal("unexpected result value")
- }
- })
-}
-
-func TestLongData(t *testing.T) {
- runTests(t, dsn+"&maxAllowedPacket=0", func(dbt *DBTest) {
- var maxAllowedPacketSize int
- err := dbt.db.QueryRow("select @@max_allowed_packet").Scan(&maxAllowedPacketSize)
- if err != nil {
- dbt.Fatal(err)
- }
- maxAllowedPacketSize--
-
- // don't get too ambitious
- if maxAllowedPacketSize > 1<<25 {
- maxAllowedPacketSize = 1 << 25
- }
-
- dbt.mustExec("CREATE TABLE test (value LONGBLOB)")
-
- in := strings.Repeat(`a`, maxAllowedPacketSize+1)
- var out string
- var rows *sql.Rows
-
- // Long text data
- const nonDataQueryLen = 28 // length query w/o value
- inS := in[:maxAllowedPacketSize-nonDataQueryLen]
- dbt.mustExec("INSERT INTO test VALUES('" + inS + "')")
- rows = dbt.mustQuery("SELECT value FROM test")
- if rows.Next() {
- rows.Scan(&out)
- if inS != out {
- dbt.Fatalf("LONGBLOB: length in: %d, length out: %d", len(inS), len(out))
- }
- if rows.Next() {
- dbt.Error("LONGBLOB: unexpexted row")
- }
- } else {
- dbt.Fatalf("LONGBLOB: no data")
- }
-
- // Empty table
- dbt.mustExec("TRUNCATE TABLE test")
-
- // Long binary data
- dbt.mustExec("INSERT INTO test VALUES(?)", in)
- rows = dbt.mustQuery("SELECT value FROM test WHERE 1=?", 1)
- if rows.Next() {
- rows.Scan(&out)
- if in != out {
- dbt.Fatalf("LONGBLOB: length in: %d, length out: %d", len(in), len(out))
- }
- if rows.Next() {
- dbt.Error("LONGBLOB: unexpexted row")
- }
- } else {
- if err = rows.Err(); err != nil {
- dbt.Fatalf("LONGBLOB: no data (err: %s)", err.Error())
- } else {
- dbt.Fatal("LONGBLOB: no data (err: <nil>)")
- }
- }
- })
-}
-
-func TestLoadData(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- verifyLoadDataResult := func() {
- rows, err := dbt.db.Query("SELECT * FROM test")
- if err != nil {
- dbt.Fatal(err.Error())
- }
-
- i := 0
- values := [4]string{
- "a string",
- "a string containing a \t",
- "a string containing a \n",
- "a string containing both \t\n",
- }
-
- var id int
- var value string
-
- for rows.Next() {
- i++
- err = rows.Scan(&id, &value)
- if err != nil {
- dbt.Fatal(err.Error())
- }
- if i != id {
- dbt.Fatalf("%d != %d", i, id)
- }
- if values[i-1] != value {
- dbt.Fatalf("%q != %q", values[i-1], value)
- }
- }
- err = rows.Err()
- if err != nil {
- dbt.Fatal(err.Error())
- }
-
- if i != 4 {
- dbt.Fatalf("rows count mismatch. Got %d, want 4", i)
- }
- }
-
- dbt.db.Exec("DROP TABLE IF EXISTS test")
- dbt.mustExec("CREATE TABLE test (id INT NOT NULL PRIMARY KEY, value TEXT NOT NULL) CHARACTER SET utf8")
-
- // Local File
- file, err := ioutil.TempFile("", "gotest")
- defer os.Remove(file.Name())
- if err != nil {
- dbt.Fatal(err)
- }
- RegisterLocalFile(file.Name())
-
- // Try first with empty file
- dbt.mustExec(fmt.Sprintf("LOAD DATA LOCAL INFILE %q INTO TABLE test", file.Name()))
- var count int
- err = dbt.db.QueryRow("SELECT COUNT(*) FROM test").Scan(&count)
- if err != nil {
- dbt.Fatal(err.Error())
- }
- if count != 0 {
- dbt.Fatalf("unexpected row count: got %d, want 0", count)
- }
-
- // Then fille File with data and try to load it
- file.WriteString("1\ta string\n2\ta string containing a \\t\n3\ta string containing a \\n\n4\ta string containing both \\t\\n\n")
- file.Close()
- dbt.mustExec(fmt.Sprintf("LOAD DATA LOCAL INFILE %q INTO TABLE test", file.Name()))
- verifyLoadDataResult()
-
- // Try with non-existing file
- _, err = dbt.db.Exec("LOAD DATA LOCAL INFILE 'doesnotexist' INTO TABLE test")
- if err == nil {
- dbt.Fatal("load non-existent file didn't fail")
- } else if err.Error() != "local file 'doesnotexist' is not registered" {
- dbt.Fatal(err.Error())
- }
-
- // Empty table
- dbt.mustExec("TRUNCATE TABLE test")
-
- // Reader
- RegisterReaderHandler("test", func() io.Reader {
- file, err = os.Open(file.Name())
- if err != nil {
- dbt.Fatal(err)
- }
- return file
- })
- dbt.mustExec("LOAD DATA LOCAL INFILE 'Reader::test' INTO TABLE test")
- verifyLoadDataResult()
- // negative test
- _, err = dbt.db.Exec("LOAD DATA LOCAL INFILE 'Reader::doesnotexist' INTO TABLE test")
- if err == nil {
- dbt.Fatal("load non-existent Reader didn't fail")
- } else if err.Error() != "Reader 'doesnotexist' is not registered" {
- dbt.Fatal(err.Error())
- }
- })
-}
-
-func TestFoundRows(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (id INT NOT NULL ,data INT NOT NULL)")
- dbt.mustExec("INSERT INTO test (id, data) VALUES (0, 0),(0, 0),(1, 0),(1, 0),(1, 1)")
-
- res := dbt.mustExec("UPDATE test SET data = 1 WHERE id = 0")
- count, err := res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 2 {
- dbt.Fatalf("Expected 2 affected rows, got %d", count)
- }
- res = dbt.mustExec("UPDATE test SET data = 1 WHERE id = 1")
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 2 {
- dbt.Fatalf("Expected 2 affected rows, got %d", count)
- }
- })
- runTests(t, dsn+"&clientFoundRows=true", func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (id INT NOT NULL ,data INT NOT NULL)")
- dbt.mustExec("INSERT INTO test (id, data) VALUES (0, 0),(0, 0),(1, 0),(1, 0),(1, 1)")
-
- res := dbt.mustExec("UPDATE test SET data = 1 WHERE id = 0")
- count, err := res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 2 {
- dbt.Fatalf("Expected 2 matched rows, got %d", count)
- }
- res = dbt.mustExec("UPDATE test SET data = 1 WHERE id = 1")
- count, err = res.RowsAffected()
- if err != nil {
- dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error())
- }
- if count != 3 {
- dbt.Fatalf("Expected 3 matched rows, got %d", count)
- }
- })
-}
-
-func TestTLS(t *testing.T) {
- tlsTest := func(dbt *DBTest) {
- if err := dbt.db.Ping(); err != nil {
- if err == ErrNoTLS {
- dbt.Skip("server does not support TLS")
- } else {
- dbt.Fatalf("error on Ping: %s", err.Error())
- }
- }
-
- rows := dbt.mustQuery("SHOW STATUS LIKE 'Ssl_cipher'")
-
- var variable, value *sql.RawBytes
- for rows.Next() {
- if err := rows.Scan(&variable, &value); err != nil {
- dbt.Fatal(err.Error())
- }
-
- if value == nil {
- dbt.Fatal("no Cipher")
- }
- }
- }
-
- runTests(t, dsn+"&tls=skip-verify", tlsTest)
-
- // Verify that registering / using a custom cfg works
- RegisterTLSConfig("custom-skip-verify", &tls.Config{
- InsecureSkipVerify: true,
- })
- runTests(t, dsn+"&tls=custom-skip-verify", tlsTest)
-}
-
-func TestReuseClosedConnection(t *testing.T) {
- // this test does not use sql.database, it uses the driver directly
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- md := &MySQLDriver{}
- conn, err := md.Open(dsn)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- stmt, err := conn.Prepare("DO 1")
- if err != nil {
- t.Fatalf("error preparing statement: %s", err.Error())
- }
- _, err = stmt.Exec(nil)
- if err != nil {
- t.Fatalf("error executing statement: %s", err.Error())
- }
- err = conn.Close()
- if err != nil {
- t.Fatalf("error closing connection: %s", err.Error())
- }
-
- defer func() {
- if err := recover(); err != nil {
- t.Errorf("panic after reusing a closed connection: %v", err)
- }
- }()
- _, err = stmt.Exec(nil)
- if err != nil && err != driver.ErrBadConn {
- t.Errorf("unexpected error '%s', expected '%s'",
- err.Error(), driver.ErrBadConn.Error())
- }
-}
-
-func TestCharset(t *testing.T) {
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- mustSetCharset := func(charsetParam, expected string) {
- runTests(t, dsn+"&"+charsetParam, func(dbt *DBTest) {
- rows := dbt.mustQuery("SELECT @@character_set_connection")
- defer rows.Close()
-
- if !rows.Next() {
- dbt.Fatalf("error getting connection charset: %s", rows.Err())
- }
-
- var got string
- rows.Scan(&got)
-
- if got != expected {
- dbt.Fatalf("expected connection charset %s but got %s", expected, got)
- }
- })
- }
-
- // non utf8 test
- mustSetCharset("charset=ascii", "ascii")
-
- // when the first charset is invalid, use the second
- mustSetCharset("charset=none,utf8", "utf8")
-
- // when the first charset is valid, use it
- mustSetCharset("charset=ascii,utf8", "ascii")
- mustSetCharset("charset=utf8,ascii", "utf8")
-}
-
-func TestFailingCharset(t *testing.T) {
- runTests(t, dsn+"&charset=none", func(dbt *DBTest) {
- // run query to really establish connection...
- _, err := dbt.db.Exec("SELECT 1")
- if err == nil {
- dbt.db.Close()
- t.Fatalf("connection must not succeed without a valid charset")
- }
- })
-}
-
-func TestCollation(t *testing.T) {
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- defaultCollation := "utf8_general_ci"
- testCollations := []string{
- "", // do not set
- defaultCollation, // driver default
- "latin1_general_ci",
- "binary",
- "utf8_unicode_ci",
- "cp1257_bin",
- }
-
- for _, collation := range testCollations {
- var expected, tdsn string
- if collation != "" {
- tdsn = dsn + "&collation=" + collation
- expected = collation
- } else {
- tdsn = dsn
- expected = defaultCollation
- }
-
- runTests(t, tdsn, func(dbt *DBTest) {
- var got string
- if err := dbt.db.QueryRow("SELECT @@collation_connection").Scan(&got); err != nil {
- dbt.Fatal(err)
- }
-
- if got != expected {
- dbt.Fatalf("expected connection collation %s but got %s", expected, got)
- }
- })
- }
-}
-
-func TestColumnsWithAlias(t *testing.T) {
- runTests(t, dsn+"&columnsWithAlias=true", func(dbt *DBTest) {
- rows := dbt.mustQuery("SELECT 1 AS A")
- defer rows.Close()
- cols, _ := rows.Columns()
- if len(cols) != 1 {
- t.Fatalf("expected 1 column, got %d", len(cols))
- }
- if cols[0] != "A" {
- t.Fatalf("expected column name \"A\", got \"%s\"", cols[0])
- }
- rows.Close()
-
- rows = dbt.mustQuery("SELECT * FROM (SELECT 1 AS one) AS A")
- cols, _ = rows.Columns()
- if len(cols) != 1 {
- t.Fatalf("expected 1 column, got %d", len(cols))
- }
- if cols[0] != "A.one" {
- t.Fatalf("expected column name \"A.one\", got \"%s\"", cols[0])
- }
- })
-}
-
-func TestRawBytesResultExceedsBuffer(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- // defaultBufSize from buffer.go
- expected := strings.Repeat("abc", defaultBufSize)
-
- rows := dbt.mustQuery("SELECT '" + expected + "'")
- defer rows.Close()
- if !rows.Next() {
- dbt.Error("expected result, got none")
- }
- var result sql.RawBytes
- rows.Scan(&result)
- if expected != string(result) {
- dbt.Error("result did not match expected value")
- }
- })
-}
-
-func TestTimezoneConversion(t *testing.T) {
- zones := []string{"UTC", "US/Central", "US/Pacific", "Local"}
-
- // Regression test for timezone handling
- tzTest := func(dbt *DBTest) {
- // Create table
- dbt.mustExec("CREATE TABLE test (ts TIMESTAMP)")
-
- // Insert local time into database (should be converted)
- usCentral, _ := time.LoadLocation("US/Central")
- reftime := time.Date(2014, 05, 30, 18, 03, 17, 0, time.UTC).In(usCentral)
- dbt.mustExec("INSERT INTO test VALUE (?)", reftime)
-
- // Retrieve time from DB
- rows := dbt.mustQuery("SELECT ts FROM test")
- if !rows.Next() {
- dbt.Fatal("did not get any rows out")
- }
-
- var dbTime time.Time
- err := rows.Scan(&dbTime)
- if err != nil {
- dbt.Fatal("Err", err)
- }
-
- // Check that dates match
- if reftime.Unix() != dbTime.Unix() {
- dbt.Errorf("times do not match.\n")
- dbt.Errorf(" Now(%v)=%v\n", usCentral, reftime)
- dbt.Errorf(" Now(UTC)=%v\n", dbTime)
- }
- }
-
- for _, tz := range zones {
- runTests(t, dsn+"&parseTime=true&loc="+url.QueryEscape(tz), tzTest)
- }
-}
-
-// Special cases
-
-func TestRowsClose(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- rows, err := dbt.db.Query("SELECT 1")
- if err != nil {
- dbt.Fatal(err)
- }
-
- err = rows.Close()
- if err != nil {
- dbt.Fatal(err)
- }
-
- if rows.Next() {
- dbt.Fatal("unexpected row after rows.Close()")
- }
-
- err = rows.Err()
- if err != nil {
- dbt.Fatal(err)
- }
- })
-}
-
-// dangling statements
-// http://code.google.com/p/go/issues/detail?id=3865
-func TestCloseStmtBeforeRows(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- stmt, err := dbt.db.Prepare("SELECT 1")
- if err != nil {
- dbt.Fatal(err)
- }
-
- rows, err := stmt.Query()
- if err != nil {
- stmt.Close()
- dbt.Fatal(err)
- }
- defer rows.Close()
-
- err = stmt.Close()
- if err != nil {
- dbt.Fatal(err)
- }
-
- if !rows.Next() {
- dbt.Fatal("getting row failed")
- } else {
- err = rows.Err()
- if err != nil {
- dbt.Fatal(err)
- }
-
- var out bool
- err = rows.Scan(&out)
- if err != nil {
- dbt.Fatalf("error on rows.Scan(): %s", err.Error())
- }
- if out != true {
- dbt.Errorf("true != %t", out)
- }
- }
- })
-}
-
-// It is valid to have multiple Rows for the same Stmt
-// http://code.google.com/p/go/issues/detail?id=3734
-func TestStmtMultiRows(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- stmt, err := dbt.db.Prepare("SELECT 1 UNION SELECT 0")
- if err != nil {
- dbt.Fatal(err)
- }
-
- rows1, err := stmt.Query()
- if err != nil {
- stmt.Close()
- dbt.Fatal(err)
- }
- defer rows1.Close()
-
- rows2, err := stmt.Query()
- if err != nil {
- stmt.Close()
- dbt.Fatal(err)
- }
- defer rows2.Close()
-
- var out bool
-
- // 1
- if !rows1.Next() {
- dbt.Fatal("first rows1.Next failed")
- } else {
- err = rows1.Err()
- if err != nil {
- dbt.Fatal(err)
- }
-
- err = rows1.Scan(&out)
- if err != nil {
- dbt.Fatalf("error on rows.Scan(): %s", err.Error())
- }
- if out != true {
- dbt.Errorf("true != %t", out)
- }
- }
-
- if !rows2.Next() {
- dbt.Fatal("first rows2.Next failed")
- } else {
- err = rows2.Err()
- if err != nil {
- dbt.Fatal(err)
- }
-
- err = rows2.Scan(&out)
- if err != nil {
- dbt.Fatalf("error on rows.Scan(): %s", err.Error())
- }
- if out != true {
- dbt.Errorf("true != %t", out)
- }
- }
-
- // 2
- if !rows1.Next() {
- dbt.Fatal("second rows1.Next failed")
- } else {
- err = rows1.Err()
- if err != nil {
- dbt.Fatal(err)
- }
-
- err = rows1.Scan(&out)
- if err != nil {
- dbt.Fatalf("error on rows.Scan(): %s", err.Error())
- }
- if out != false {
- dbt.Errorf("false != %t", out)
- }
-
- if rows1.Next() {
- dbt.Fatal("unexpected row on rows1")
- }
- err = rows1.Close()
- if err != nil {
- dbt.Fatal(err)
- }
- }
-
- if !rows2.Next() {
- dbt.Fatal("second rows2.Next failed")
- } else {
- err = rows2.Err()
- if err != nil {
- dbt.Fatal(err)
- }
-
- err = rows2.Scan(&out)
- if err != nil {
- dbt.Fatalf("error on rows.Scan(): %s", err.Error())
- }
- if out != false {
- dbt.Errorf("false != %t", out)
- }
-
- if rows2.Next() {
- dbt.Fatal("unexpected row on rows2")
- }
- err = rows2.Close()
- if err != nil {
- dbt.Fatal(err)
- }
- }
- })
-}
-
-// Regression test for
-// * more than 32 NULL parameters (issue 209)
-// * more parameters than fit into the buffer (issue 201)
-// * parameters * 64 > max_allowed_packet (issue 734)
-func TestPreparedManyCols(t *testing.T) {
- numParams := 65535
- runTests(t, dsn, func(dbt *DBTest) {
- query := "SELECT ?" + strings.Repeat(",?", numParams-1)
- stmt, err := dbt.db.Prepare(query)
- if err != nil {
- dbt.Fatal(err)
- }
- defer stmt.Close()
-
- // create more parameters than fit into the buffer
- // which will take nil-values
- params := make([]interface{}, numParams)
- rows, err := stmt.Query(params...)
- if err != nil {
- dbt.Fatal(err)
- }
- rows.Close()
-
- // Create 0byte string which we can't send via STMT_LONG_DATA.
- for i := 0; i < numParams; i++ {
- params[i] = ""
- }
- rows, err = stmt.Query(params...)
- if err != nil {
- dbt.Fatal(err)
- }
- rows.Close()
- })
-}
-
-func TestConcurrent(t *testing.T) {
- if enabled, _ := readBool(os.Getenv("MYSQL_TEST_CONCURRENT")); !enabled {
- t.Skip("MYSQL_TEST_CONCURRENT env var not set")
- }
-
- runTests(t, dsn, func(dbt *DBTest) {
- var max int
- err := dbt.db.QueryRow("SELECT @@max_connections").Scan(&max)
- if err != nil {
- dbt.Fatalf("%s", err.Error())
- }
- dbt.Logf("testing up to %d concurrent connections \r\n", max)
-
- var remaining, succeeded int32 = int32(max), 0
-
- var wg sync.WaitGroup
- wg.Add(max)
-
- var fatalError string
- var once sync.Once
- fatalf := func(s string, vals ...interface{}) {
- once.Do(func() {
- fatalError = fmt.Sprintf(s, vals...)
- })
- }
-
- for i := 0; i < max; i++ {
- go func(id int) {
- defer wg.Done()
-
- tx, err := dbt.db.Begin()
- atomic.AddInt32(&remaining, -1)
-
- if err != nil {
- if err.Error() != "Error 1040: Too many connections" {
- fatalf("error on conn %d: %s", id, err.Error())
- }
- return
- }
-
- // keep the connection busy until all connections are open
- for remaining > 0 {
- if _, err = tx.Exec("DO 1"); err != nil {
- fatalf("error on conn %d: %s", id, err.Error())
- return
- }
- }
-
- if err = tx.Commit(); err != nil {
- fatalf("error on conn %d: %s", id, err.Error())
- return
- }
-
- // everything went fine with this connection
- atomic.AddInt32(&succeeded, 1)
- }(i)
- }
-
- // wait until all conections are open
- wg.Wait()
-
- if fatalError != "" {
- dbt.Fatal(fatalError)
- }
-
- dbt.Logf("reached %d concurrent connections\r\n", succeeded)
- })
-}
-
-// Tests custom dial functions
-func TestCustomDial(t *testing.T) {
- if !available {
- t.Skipf("MySQL server not running on %s", netAddr)
- }
-
- // our custom dial function which justs wraps net.Dial here
- RegisterDial("mydial", func(addr string) (net.Conn, error) {
- return net.Dial(prot, addr)
- })
-
- db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@mydial(%s)/%s?timeout=30s", user, pass, addr, dbname))
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db.Close()
-
- if _, err = db.Exec("DO 1"); err != nil {
- t.Fatalf("connection failed: %s", err.Error())
- }
-}
-
-func TestSQLInjection(t *testing.T) {
- createTest := func(arg string) func(dbt *DBTest) {
- return func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v INTEGER)")
- dbt.mustExec("INSERT INTO test VALUES (?)", 1)
-
- var v int
- // NULL can't be equal to anything, the idea here is to inject query so it returns row
- // This test verifies that escapeQuotes and escapeBackslash are working properly
- err := dbt.db.QueryRow("SELECT v FROM test WHERE NULL = ?", arg).Scan(&v)
- if err == sql.ErrNoRows {
- return // success, sql injection failed
- } else if err == nil {
- dbt.Errorf("sql injection successful with arg: %s", arg)
- } else {
- dbt.Errorf("error running query with arg: %s; err: %s", arg, err.Error())
- }
- }
- }
-
- dsns := []string{
- dsn,
- dsn + "&sql_mode='NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER'",
- }
- for _, testdsn := range dsns {
- runTests(t, testdsn, createTest("1 OR 1=1"))
- runTests(t, testdsn, createTest("' OR '1'='1"))
- }
-}
-
-// Test if inserted data is correctly retrieved after being escaped
-func TestInsertRetrieveEscapedData(t *testing.T) {
- testData := func(dbt *DBTest) {
- dbt.mustExec("CREATE TABLE test (v VARCHAR(255))")
-
- // All sequences that are escaped by escapeQuotes and escapeBackslash
- v := "foo \x00\n\r\x1a\"'\\"
- dbt.mustExec("INSERT INTO test VALUES (?)", v)
-
- var out string
- err := dbt.db.QueryRow("SELECT v FROM test").Scan(&out)
- if err != nil {
- dbt.Fatalf("%s", err.Error())
- }
-
- if out != v {
- dbt.Errorf("%q != %q", out, v)
- }
- }
-
- dsns := []string{
- dsn,
- dsn + "&sql_mode='NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER'",
- }
- for _, testdsn := range dsns {
- runTests(t, testdsn, testData)
- }
-}
-
-func TestUnixSocketAuthFail(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- // Save the current logger so we can restore it.
- oldLogger := errLog
-
- // Set a new logger so we can capture its output.
- buffer := bytes.NewBuffer(make([]byte, 0, 64))
- newLogger := log.New(buffer, "prefix: ", 0)
- SetLogger(newLogger)
-
- // Restore the logger.
- defer SetLogger(oldLogger)
-
- // Make a new DSN that uses the MySQL socket file and a bad password, which
- // we can make by simply appending any character to the real password.
- badPass := pass + "x"
- socket := ""
- if prot == "unix" {
- socket = addr
- } else {
- // Get socket file from MySQL.
- err := dbt.db.QueryRow("SELECT @@socket").Scan(&socket)
- if err != nil {
- t.Fatalf("error on SELECT @@socket: %s", err.Error())
- }
- }
- t.Logf("socket: %s", socket)
- badDSN := fmt.Sprintf("%s:%s@unix(%s)/%s?timeout=30s", user, badPass, socket, dbname)
- db, err := sql.Open("mysql", badDSN)
- if err != nil {
- t.Fatalf("error connecting: %s", err.Error())
- }
- defer db.Close()
-
- // Connect to MySQL for real. This will cause an auth failure.
- err = db.Ping()
- if err == nil {
- t.Error("expected Ping() to return an error")
- }
-
- // The driver should not log anything.
- if actual := buffer.String(); actual != "" {
- t.Errorf("expected no output, got %q", actual)
- }
- })
-}
-
-// See Issue #422
-func TestInterruptBySignal(t *testing.T) {
- runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
- dbt.mustExec(`
- DROP PROCEDURE IF EXISTS test_signal;
- CREATE PROCEDURE test_signal(ret INT)
- BEGIN
- SELECT ret;
- SIGNAL SQLSTATE
- '45001'
- SET
- MESSAGE_TEXT = "an error",
- MYSQL_ERRNO = 45001;
- END
- `)
- defer dbt.mustExec("DROP PROCEDURE test_signal")
-
- var val int
-
- // text protocol
- rows, err := dbt.db.Query("CALL test_signal(42)")
- if err != nil {
- dbt.Fatalf("error on text query: %s", err.Error())
- }
- for rows.Next() {
- if err := rows.Scan(&val); err != nil {
- dbt.Error(err)
- } else if val != 42 {
- dbt.Errorf("expected val to be 42")
- }
- }
-
- // binary protocol
- rows, err = dbt.db.Query("CALL test_signal(?)", 42)
- if err != nil {
- dbt.Fatalf("error on binary query: %s", err.Error())
- }
- for rows.Next() {
- if err := rows.Scan(&val); err != nil {
- dbt.Error(err)
- } else if val != 42 {
- dbt.Errorf("expected val to be 42")
- }
- }
- })
-}
-
-func TestColumnsReusesSlice(t *testing.T) {
- rows := mysqlRows{
- rs: resultSet{
- columns: []mysqlField{
- {
- tableName: "test",
- name: "A",
- },
- {
- tableName: "test",
- name: "B",
- },
- },
- },
- }
-
- allocs := testing.AllocsPerRun(1, func() {
- cols := rows.Columns()
-
- if len(cols) != 2 {
- t.Fatalf("expected 2 columns, got %d", len(cols))
- }
- })
-
- if allocs != 0 {
- t.Fatalf("expected 0 allocations, got %d", int(allocs))
- }
-
- if rows.rs.columnNames == nil {
- t.Fatalf("expected columnNames to be set, got nil")
- }
-}
-
-func TestRejectReadOnly(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- // Create Table
- dbt.mustExec("CREATE TABLE test (value BOOL)")
- // Set the session to read-only. We didn't set the `rejectReadOnly`
- // option, so any writes after this should fail.
- _, err := dbt.db.Exec("SET SESSION TRANSACTION READ ONLY")
- // Error 1193: Unknown system variable 'TRANSACTION' => skip test,
- // MySQL server version is too old
- maybeSkip(t, err, 1193)
- if _, err := dbt.db.Exec("DROP TABLE test"); err == nil {
- t.Fatalf("writing to DB in read-only session without " +
- "rejectReadOnly did not error")
- }
- // Set the session back to read-write so runTests() can properly clean
- // up the table `test`.
- dbt.mustExec("SET SESSION TRANSACTION READ WRITE")
- })
-
- // Enable the `rejectReadOnly` option.
- runTests(t, dsn+"&rejectReadOnly=true", func(dbt *DBTest) {
- // Create Table
- dbt.mustExec("CREATE TABLE test (value BOOL)")
- // Set the session to read only. Any writes after this should error on
- // a driver.ErrBadConn, and cause `database/sql` to initiate a new
- // connection.
- dbt.mustExec("SET SESSION TRANSACTION READ ONLY")
- // This would error, but `database/sql` should automatically retry on a
- // new connection which is not read-only, and eventually succeed.
- dbt.mustExec("DROP TABLE test")
- })
-}
-
-func TestPing(t *testing.T) {
- runTests(t, dsn, func(dbt *DBTest) {
- if err := dbt.db.Ping(); err != nil {
- dbt.fail("Ping", "Ping", err)
- }
- })
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/dsn_test.go b/vendor/github.com/go-sql-driver/mysql/dsn_test.go
deleted file mode 100644
index 7507d1201..000000000
--- a/vendor/github.com/go-sql-driver/mysql/dsn_test.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2016 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "crypto/tls"
- "fmt"
- "net/url"
- "reflect"
- "testing"
- "time"
-)
-
-var testDSNs = []struct {
- in string
- out *Config
-}{{
- "username:password@protocol(address)/dbname?param=value",
- &Config{User: "username", Passwd: "password", Net: "protocol", Addr: "address", DBName: "dbname", Params: map[string]string{"param": "value"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "username:password@protocol(address)/dbname?param=value&columnsWithAlias=true",
- &Config{User: "username", Passwd: "password", Net: "protocol", Addr: "address", DBName: "dbname", Params: map[string]string{"param": "value"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true, ColumnsWithAlias: true},
-}, {
- "username:password@protocol(address)/dbname?param=value&columnsWithAlias=true&multiStatements=true",
- &Config{User: "username", Passwd: "password", Net: "protocol", Addr: "address", DBName: "dbname", Params: map[string]string{"param": "value"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true, ColumnsWithAlias: true, MultiStatements: true},
-}, {
- "user@unix(/path/to/socket)/dbname?charset=utf8",
- &Config{User: "user", Net: "unix", Addr: "/path/to/socket", DBName: "dbname", Params: map[string]string{"charset": "utf8"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "user:password@tcp(localhost:5555)/dbname?charset=utf8&tls=true",
- &Config{User: "user", Passwd: "password", Net: "tcp", Addr: "localhost:5555", DBName: "dbname", Params: map[string]string{"charset": "utf8"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true, TLSConfig: "true"},
-}, {
- "user:password@tcp(localhost:5555)/dbname?charset=utf8mb4,utf8&tls=skip-verify",
- &Config{User: "user", Passwd: "password", Net: "tcp", Addr: "localhost:5555", DBName: "dbname", Params: map[string]string{"charset": "utf8mb4,utf8"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true, TLSConfig: "skip-verify"},
-}, {
- "user:password@/dbname?loc=UTC&timeout=30s&readTimeout=1s&writeTimeout=1s&allowAllFiles=1&clientFoundRows=true&allowOldPasswords=TRUE&collation=utf8mb4_unicode_ci&maxAllowedPacket=16777216",
- &Config{User: "user", Passwd: "password", Net: "tcp", Addr: "127.0.0.1:3306", DBName: "dbname", Collation: "utf8mb4_unicode_ci", Loc: time.UTC, AllowNativePasswords: true, Timeout: 30 * time.Second, ReadTimeout: time.Second, WriteTimeout: time.Second, AllowAllFiles: true, AllowOldPasswords: true, ClientFoundRows: true, MaxAllowedPacket: 16777216},
-}, {
- "user:password@/dbname?allowNativePasswords=false&maxAllowedPacket=0",
- &Config{User: "user", Passwd: "password", Net: "tcp", Addr: "127.0.0.1:3306", DBName: "dbname", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: 0, AllowNativePasswords: false},
-}, {
- "user:p@ss(word)@tcp([de:ad:be:ef::ca:fe]:80)/dbname?loc=Local",
- &Config{User: "user", Passwd: "p@ss(word)", Net: "tcp", Addr: "[de:ad:be:ef::ca:fe]:80", DBName: "dbname", Collation: "utf8_general_ci", Loc: time.Local, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "/dbname",
- &Config{Net: "tcp", Addr: "127.0.0.1:3306", DBName: "dbname", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "@/",
- &Config{Net: "tcp", Addr: "127.0.0.1:3306", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "/",
- &Config{Net: "tcp", Addr: "127.0.0.1:3306", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "",
- &Config{Net: "tcp", Addr: "127.0.0.1:3306", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "user:p@/ssword@/",
- &Config{User: "user", Passwd: "p@/ssword", Net: "tcp", Addr: "127.0.0.1:3306", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "unix/?arg=%2Fsome%2Fpath.ext",
- &Config{Net: "unix", Addr: "/tmp/mysql.sock", Params: map[string]string{"arg": "/some/path.ext"}, Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "tcp(127.0.0.1)/dbname",
- &Config{Net: "tcp", Addr: "127.0.0.1:3306", DBName: "dbname", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-}, {
- "tcp(de:ad:be:ef::ca:fe)/dbname",
- &Config{Net: "tcp", Addr: "[de:ad:be:ef::ca:fe]:3306", DBName: "dbname", Collation: "utf8_general_ci", Loc: time.UTC, MaxAllowedPacket: defaultMaxAllowedPacket, AllowNativePasswords: true},
-},
-}
-
-func TestDSNParser(t *testing.T) {
- for i, tst := range testDSNs {
- cfg, err := ParseDSN(tst.in)
- if err != nil {
- t.Error(err.Error())
- }
-
- // pointer not static
- cfg.tls = nil
-
- if !reflect.DeepEqual(cfg, tst.out) {
- t.Errorf("%d. ParseDSN(%q) mismatch:\ngot %+v\nwant %+v", i, tst.in, cfg, tst.out)
- }
- }
-}
-
-func TestDSNParserInvalid(t *testing.T) {
- var invalidDSNs = []string{
- "@net(addr/", // no closing brace
- "@tcp(/", // no closing brace
- "tcp(/", // no closing brace
- "(/", // no closing brace
- "net(addr)//", // unescaped
- "User:pass@tcp(1.2.3.4:3306)", // no trailing slash
- "net()/", // unknown default addr
- //"/dbname?arg=/some/unescaped/path",
- }
-
- for i, tst := range invalidDSNs {
- if _, err := ParseDSN(tst); err == nil {
- t.Errorf("invalid DSN #%d. (%s) didn't error!", i, tst)
- }
- }
-}
-
-func TestDSNReformat(t *testing.T) {
- for i, tst := range testDSNs {
- dsn1 := tst.in
- cfg1, err := ParseDSN(dsn1)
- if err != nil {
- t.Error(err.Error())
- continue
- }
- cfg1.tls = nil // pointer not static
- res1 := fmt.Sprintf("%+v", cfg1)
-
- dsn2 := cfg1.FormatDSN()
- cfg2, err := ParseDSN(dsn2)
- if err != nil {
- t.Error(err.Error())
- continue
- }
- cfg2.tls = nil // pointer not static
- res2 := fmt.Sprintf("%+v", cfg2)
-
- if res1 != res2 {
- t.Errorf("%d. %q does not match %q", i, res2, res1)
- }
- }
-}
-
-func TestDSNWithCustomTLS(t *testing.T) {
- baseDSN := "User:password@tcp(localhost:5555)/dbname?tls="
- tlsCfg := tls.Config{}
-
- RegisterTLSConfig("utils_test", &tlsCfg)
-
- // Custom TLS is missing
- tst := baseDSN + "invalid_tls"
- cfg, err := ParseDSN(tst)
- if err == nil {
- t.Errorf("invalid custom TLS in DSN (%s) but did not error. Got config: %#v", tst, cfg)
- }
-
- tst = baseDSN + "utils_test"
-
- // Custom TLS with a server name
- name := "foohost"
- tlsCfg.ServerName = name
- cfg, err = ParseDSN(tst)
-
- if err != nil {
- t.Error(err.Error())
- } else if cfg.tls.ServerName != name {
- t.Errorf("did not get the correct TLS ServerName (%s) parsing DSN (%s).", name, tst)
- }
-
- // Custom TLS without a server name
- name = "localhost"
- tlsCfg.ServerName = ""
- cfg, err = ParseDSN(tst)
-
- if err != nil {
- t.Error(err.Error())
- } else if cfg.tls.ServerName != name {
- t.Errorf("did not get the correct ServerName (%s) parsing DSN (%s).", name, tst)
- } else if tlsCfg.ServerName != "" {
- t.Errorf("tlsCfg was mutated ServerName (%s) should be empty parsing DSN (%s).", name, tst)
- }
-
- DeregisterTLSConfig("utils_test")
-}
-
-func TestDSNTLSConfig(t *testing.T) {
- expectedServerName := "example.com"
- dsn := "tcp(example.com:1234)/?tls=true"
-
- cfg, err := ParseDSN(dsn)
- if err != nil {
- t.Error(err.Error())
- }
- if cfg.tls == nil {
- t.Error("cfg.tls should not be nil")
- }
- if cfg.tls.ServerName != expectedServerName {
- t.Errorf("cfg.tls.ServerName should be %q, got %q (host with port)", expectedServerName, cfg.tls.ServerName)
- }
-
- dsn = "tcp(example.com)/?tls=true"
- cfg, err = ParseDSN(dsn)
- if err != nil {
- t.Error(err.Error())
- }
- if cfg.tls == nil {
- t.Error("cfg.tls should not be nil")
- }
- if cfg.tls.ServerName != expectedServerName {
- t.Errorf("cfg.tls.ServerName should be %q, got %q (host without port)", expectedServerName, cfg.tls.ServerName)
- }
-}
-
-func TestDSNWithCustomTLSQueryEscape(t *testing.T) {
- const configKey = "&%!:"
- dsn := "User:password@tcp(localhost:5555)/dbname?tls=" + url.QueryEscape(configKey)
- name := "foohost"
- tlsCfg := tls.Config{ServerName: name}
-
- RegisterTLSConfig(configKey, &tlsCfg)
-
- cfg, err := ParseDSN(dsn)
-
- if err != nil {
- t.Error(err.Error())
- } else if cfg.tls.ServerName != name {
- t.Errorf("did not get the correct TLS ServerName (%s) parsing DSN (%s).", name, dsn)
- }
-}
-
-func TestDSNUnsafeCollation(t *testing.T) {
- _, err := ParseDSN("/dbname?collation=gbk_chinese_ci&interpolateParams=true")
- if err != errInvalidDSNUnsafeCollation {
- t.Errorf("expected %v, got %v", errInvalidDSNUnsafeCollation, err)
- }
-
- _, err = ParseDSN("/dbname?collation=gbk_chinese_ci&interpolateParams=false")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-
- _, err = ParseDSN("/dbname?collation=gbk_chinese_ci")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-
- _, err = ParseDSN("/dbname?collation=ascii_bin&interpolateParams=true")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-
- _, err = ParseDSN("/dbname?collation=latin1_german1_ci&interpolateParams=true")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-
- _, err = ParseDSN("/dbname?collation=utf8_general_ci&interpolateParams=true")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-
- _, err = ParseDSN("/dbname?collation=utf8mb4_general_ci&interpolateParams=true")
- if err != nil {
- t.Errorf("expected %v, got %v", nil, err)
- }
-}
-
-func TestParamsAreSorted(t *testing.T) {
- expected := "/dbname?interpolateParams=true&foobar=baz&quux=loo"
- cfg := NewConfig()
- cfg.DBName = "dbname"
- cfg.InterpolateParams = true
- cfg.Params = map[string]string{
- "quux": "loo",
- "foobar": "baz",
- }
- actual := cfg.FormatDSN()
- if actual != expected {
- t.Errorf("generic Config.Params were not sorted: want %#v, got %#v", expected, actual)
- }
-}
-
-func BenchmarkParseDSN(b *testing.B) {
- b.ReportAllocs()
-
- for i := 0; i < b.N; i++ {
- for _, tst := range testDSNs {
- if _, err := ParseDSN(tst.in); err != nil {
- b.Error(err.Error())
- }
- }
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/errors_test.go b/vendor/github.com/go-sql-driver/mysql/errors_test.go
deleted file mode 100644
index 96f9126d6..000000000
--- a/vendor/github.com/go-sql-driver/mysql/errors_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "bytes"
- "log"
- "testing"
-)
-
-func TestErrorsSetLogger(t *testing.T) {
- previous := errLog
- defer func() {
- errLog = previous
- }()
-
- // set up logger
- const expected = "prefix: test\n"
- buffer := bytes.NewBuffer(make([]byte, 0, 64))
- logger := log.New(buffer, "prefix: ", 0)
-
- // print
- SetLogger(logger)
- errLog.Print("test")
-
- // check result
- if actual := buffer.String(); actual != expected {
- t.Errorf("expected %q, got %q", expected, actual)
- }
-}
-
-func TestErrorsStrictIgnoreNotes(t *testing.T) {
- runTests(t, dsn+"&sql_notes=false", func(dbt *DBTest) {
- dbt.mustExec("DROP TABLE IF EXISTS does_not_exist")
- })
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/packets_test.go b/vendor/github.com/go-sql-driver/mysql/packets_test.go
deleted file mode 100644
index 2f8207511..000000000
--- a/vendor/github.com/go-sql-driver/mysql/packets_test.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2016 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "errors"
- "net"
- "testing"
- "time"
-)
-
-var (
- errConnClosed = errors.New("connection is closed")
- errConnTooManyReads = errors.New("too many reads")
- errConnTooManyWrites = errors.New("too many writes")
-)
-
-// struct to mock a net.Conn for testing purposes
-type mockConn struct {
- laddr net.Addr
- raddr net.Addr
- data []byte
- closed bool
- read int
- written int
- reads int
- writes int
- maxReads int
- maxWrites int
-}
-
-func (m *mockConn) Read(b []byte) (n int, err error) {
- if m.closed {
- return 0, errConnClosed
- }
-
- m.reads++
- if m.maxReads > 0 && m.reads > m.maxReads {
- return 0, errConnTooManyReads
- }
-
- n = copy(b, m.data)
- m.read += n
- m.data = m.data[n:]
- return
-}
-func (m *mockConn) Write(b []byte) (n int, err error) {
- if m.closed {
- return 0, errConnClosed
- }
-
- m.writes++
- if m.maxWrites > 0 && m.writes > m.maxWrites {
- return 0, errConnTooManyWrites
- }
-
- n = len(b)
- m.written += n
- return
-}
-func (m *mockConn) Close() error {
- m.closed = true
- return nil
-}
-func (m *mockConn) LocalAddr() net.Addr {
- return m.laddr
-}
-func (m *mockConn) RemoteAddr() net.Addr {
- return m.raddr
-}
-func (m *mockConn) SetDeadline(t time.Time) error {
- return nil
-}
-func (m *mockConn) SetReadDeadline(t time.Time) error {
- return nil
-}
-func (m *mockConn) SetWriteDeadline(t time.Time) error {
- return nil
-}
-
-// make sure mockConn implements the net.Conn interface
-var _ net.Conn = new(mockConn)
-
-func TestReadPacketSingleByte(t *testing.T) {
- conn := new(mockConn)
- mc := &mysqlConn{
- buf: newBuffer(conn),
- }
-
- conn.data = []byte{0x01, 0x00, 0x00, 0x00, 0xff}
- conn.maxReads = 1
- packet, err := mc.readPacket()
- if err != nil {
- t.Fatal(err)
- }
- if len(packet) != 1 {
- t.Fatalf("unexpected packet length: expected %d, got %d", 1, len(packet))
- }
- if packet[0] != 0xff {
- t.Fatalf("unexpected packet content: expected %x, got %x", 0xff, packet[0])
- }
-}
-
-func TestReadPacketWrongSequenceID(t *testing.T) {
- conn := new(mockConn)
- mc := &mysqlConn{
- buf: newBuffer(conn),
- }
-
- // too low sequence id
- conn.data = []byte{0x01, 0x00, 0x00, 0x00, 0xff}
- conn.maxReads = 1
- mc.sequence = 1
- _, err := mc.readPacket()
- if err != ErrPktSync {
- t.Errorf("expected ErrPktSync, got %v", err)
- }
-
- // reset
- conn.reads = 0
- mc.sequence = 0
- mc.buf = newBuffer(conn)
-
- // too high sequence id
- conn.data = []byte{0x01, 0x00, 0x00, 0x42, 0xff}
- _, err = mc.readPacket()
- if err != ErrPktSyncMul {
- t.Errorf("expected ErrPktSyncMul, got %v", err)
- }
-}
-
-func TestReadPacketSplit(t *testing.T) {
- conn := new(mockConn)
- mc := &mysqlConn{
- buf: newBuffer(conn),
- }
-
- data := make([]byte, maxPacketSize*2+4*3)
- const pkt2ofs = maxPacketSize + 4
- const pkt3ofs = 2 * (maxPacketSize + 4)
-
- // case 1: payload has length maxPacketSize
- data = data[:pkt2ofs+4]
-
- // 1st packet has maxPacketSize length and sequence id 0
- // ff ff ff 00 ...
- data[0] = 0xff
- data[1] = 0xff
- data[2] = 0xff
-
- // mark the payload start and end of 1st packet so that we can check if the
- // content was correctly appended
- data[4] = 0x11
- data[maxPacketSize+3] = 0x22
-
- // 2nd packet has payload length 0 and squence id 1
- // 00 00 00 01
- data[pkt2ofs+3] = 0x01
-
- conn.data = data
- conn.maxReads = 3
- packet, err := mc.readPacket()
- if err != nil {
- t.Fatal(err)
- }
- if len(packet) != maxPacketSize {
- t.Fatalf("unexpected packet length: expected %d, got %d", maxPacketSize, len(packet))
- }
- if packet[0] != 0x11 {
- t.Fatalf("unexpected payload start: expected %x, got %x", 0x11, packet[0])
- }
- if packet[maxPacketSize-1] != 0x22 {
- t.Fatalf("unexpected payload end: expected %x, got %x", 0x22, packet[maxPacketSize-1])
- }
-
- // case 2: payload has length which is a multiple of maxPacketSize
- data = data[:cap(data)]
-
- // 2nd packet now has maxPacketSize length
- data[pkt2ofs] = 0xff
- data[pkt2ofs+1] = 0xff
- data[pkt2ofs+2] = 0xff
-
- // mark the payload start and end of the 2nd packet
- data[pkt2ofs+4] = 0x33
- data[pkt2ofs+maxPacketSize+3] = 0x44
-
- // 3rd packet has payload length 0 and squence id 2
- // 00 00 00 02
- data[pkt3ofs+3] = 0x02
-
- conn.data = data
- conn.reads = 0
- conn.maxReads = 5
- mc.sequence = 0
- packet, err = mc.readPacket()
- if err != nil {
- t.Fatal(err)
- }
- if len(packet) != 2*maxPacketSize {
- t.Fatalf("unexpected packet length: expected %d, got %d", 2*maxPacketSize, len(packet))
- }
- if packet[0] != 0x11 {
- t.Fatalf("unexpected payload start: expected %x, got %x", 0x11, packet[0])
- }
- if packet[2*maxPacketSize-1] != 0x44 {
- t.Fatalf("unexpected payload end: expected %x, got %x", 0x44, packet[2*maxPacketSize-1])
- }
-
- // case 3: payload has a length larger maxPacketSize, which is not an exact
- // multiple of it
- data = data[:pkt2ofs+4+42]
- data[pkt2ofs] = 0x2a
- data[pkt2ofs+1] = 0x00
- data[pkt2ofs+2] = 0x00
- data[pkt2ofs+4+41] = 0x44
-
- conn.data = data
- conn.reads = 0
- conn.maxReads = 4
- mc.sequence = 0
- packet, err = mc.readPacket()
- if err != nil {
- t.Fatal(err)
- }
- if len(packet) != maxPacketSize+42 {
- t.Fatalf("unexpected packet length: expected %d, got %d", maxPacketSize+42, len(packet))
- }
- if packet[0] != 0x11 {
- t.Fatalf("unexpected payload start: expected %x, got %x", 0x11, packet[0])
- }
- if packet[maxPacketSize+41] != 0x44 {
- t.Fatalf("unexpected payload end: expected %x, got %x", 0x44, packet[maxPacketSize+41])
- }
-}
-
-func TestReadPacketFail(t *testing.T) {
- conn := new(mockConn)
- mc := &mysqlConn{
- buf: newBuffer(conn),
- closech: make(chan struct{}),
- }
-
- // illegal empty (stand-alone) packet
- conn.data = []byte{0x00, 0x00, 0x00, 0x00}
- conn.maxReads = 1
- _, err := mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
- }
-
- // reset
- conn.reads = 0
- mc.sequence = 0
- mc.buf = newBuffer(conn)
-
- // fail to read header
- conn.closed = true
- _, err = mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
- }
-
- // reset
- conn.closed = false
- conn.reads = 0
- mc.sequence = 0
- mc.buf = newBuffer(conn)
-
- // fail to read body
- conn.maxReads = 1
- _, err = mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement.go b/vendor/github.com/go-sql-driver/mysql/statement.go
index 98e57bcd8..ce7fe4cd0 100644
--- a/vendor/github.com/go-sql-driver/mysql/statement.go
+++ b/vendor/github.com/go-sql-driver/mysql/statement.go
@@ -132,15 +132,25 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
type converter struct{}
+// ConvertValue mirrors the reference/default converter in database/sql/driver
+// with _one_ exception. We support uint64 with their high bit and the default
+// implementation does not. This function should be kept in sync with
+// database/sql/driver defaultConverter.ConvertValue() except for that
+// deliberate difference.
func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
if driver.IsValue(v) {
return v, nil
}
- if v != nil {
- if valuer, ok := v.(driver.Valuer); ok {
- return valuer.Value()
+ if vr, ok := v.(driver.Valuer); ok {
+ sv, err := callValuerValue(vr)
+ if err != nil {
+ return nil, err
+ }
+ if !driver.IsValue(sv) {
+ return nil, fmt.Errorf("non-Value type %T returned from Value", sv)
}
+ return sv, nil
}
rv := reflect.ValueOf(v)
@@ -149,8 +159,9 @@ func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
// indirect pointers
if rv.IsNil() {
return nil, nil
+ } else {
+ return c.ConvertValue(rv.Elem().Interface())
}
- return c.ConvertValue(rv.Elem().Interface())
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return rv.Int(), nil
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32:
@@ -176,3 +187,25 @@ func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
}
return nil, fmt.Errorf("unsupported type %T, a %s", v, rv.Kind())
}
+
+var valuerReflectType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
+
+// callValuerValue returns vr.Value(), with one exception:
+// If vr.Value is an auto-generated method on a pointer type and the
+// pointer is nil, it would panic at runtime in the panicwrap
+// method. Treat it like nil instead.
+//
+// This is so people can implement driver.Value on value types and
+// still use nil pointers to those types to mean nil/NULL, just like
+// string/*string.
+//
+// This is an exact copy of the same-named unexported function from the
+// database/sql package.
+func callValuerValue(vr driver.Valuer) (v driver.Value, err error) {
+ if rv := reflect.ValueOf(vr); rv.Kind() == reflect.Ptr &&
+ rv.IsNil() &&
+ rv.Type().Elem().Implements(valuerReflectType) {
+ return nil, nil
+ }
+ return vr.Value()
+}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement_test.go b/vendor/github.com/go-sql-driver/mysql/statement_test.go
deleted file mode 100644
index 98a6c1933..000000000
--- a/vendor/github.com/go-sql-driver/mysql/statement_test.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "bytes"
- "testing"
-)
-
-func TestConvertDerivedString(t *testing.T) {
- type derived string
-
- output, err := converter{}.ConvertValue(derived("value"))
- if err != nil {
- t.Fatal("Derived string type not convertible", err)
- }
-
- if output != "value" {
- t.Fatalf("Derived string type not converted, got %#v %T", output, output)
- }
-}
-
-func TestConvertDerivedByteSlice(t *testing.T) {
- type derived []uint8
-
- output, err := converter{}.ConvertValue(derived("value"))
- if err != nil {
- t.Fatal("Byte slice not convertible", err)
- }
-
- if bytes.Compare(output.([]byte), []byte("value")) != 0 {
- t.Fatalf("Byte slice not converted, got %#v %T", output, output)
- }
-}
-
-func TestConvertDerivedUnsupportedSlice(t *testing.T) {
- type derived []int
-
- _, err := converter{}.ConvertValue(derived{1})
- if err == nil || err.Error() != "unsupported type mysql.derived, a slice of int" {
- t.Fatal("Unexpected error", err)
- }
-}
-
-func TestConvertDerivedBool(t *testing.T) {
- type derived bool
-
- output, err := converter{}.ConvertValue(derived(true))
- if err != nil {
- t.Fatal("Derived bool type not convertible", err)
- }
-
- if output != true {
- t.Fatalf("Derived bool type not converted, got %#v %T", output, output)
- }
-}
-
-func TestConvertPointer(t *testing.T) {
- str := "value"
-
- output, err := converter{}.ConvertValue(&str)
- if err != nil {
- t.Fatal("Pointer type not convertible", err)
- }
-
- if output != "value" {
- t.Fatalf("Pointer type not converted, got %#v %T", output, output)
- }
-}
-
-func TestConvertSignedIntegers(t *testing.T) {
- values := []interface{}{
- int8(-42),
- int16(-42),
- int32(-42),
- int64(-42),
- int(-42),
- }
-
- for _, value := range values {
- output, err := converter{}.ConvertValue(value)
- if err != nil {
- t.Fatalf("%T type not convertible %s", value, err)
- }
-
- if output != int64(-42) {
- t.Fatalf("%T type not converted, got %#v %T", value, output, output)
- }
- }
-}
-
-func TestConvertUnsignedIntegers(t *testing.T) {
- values := []interface{}{
- uint8(42),
- uint16(42),
- uint32(42),
- uint64(42),
- uint(42),
- }
-
- for _, value := range values {
- output, err := converter{}.ConvertValue(value)
- if err != nil {
- t.Fatalf("%T type not convertible %s", value, err)
- }
-
- if output != int64(42) {
- t.Fatalf("%T type not converted, got %#v %T", value, output, output)
- }
- }
-
- output, err := converter{}.ConvertValue(^uint64(0))
- if err != nil {
- t.Fatal("uint64 high-bit not convertible", err)
- }
-
- if output != "18446744073709551615" {
- t.Fatalf("uint64 high-bit not converted, got %#v %T", output, output)
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils.go b/vendor/github.com/go-sql-driver/mysql/utils.go
index a92a4029b..f986de2ab 100644
--- a/vendor/github.com/go-sql-driver/mysql/utils.go
+++ b/vendor/github.com/go-sql-driver/mysql/utils.go
@@ -537,7 +537,7 @@ func readLengthEncodedString(b []byte) ([]byte, bool, int, error) {
// Check data length
if len(b) >= n {
- return b[n-int(num) : n], false, n, nil
+ return b[n-int(num) : n : n], false, n, nil
}
return nil, false, n, io.EOF
}
@@ -800,7 +800,7 @@ func (ab *atomicBool) TrySet(value bool) bool {
return atomic.SwapUint32(&ab.value, 0) > 0
}
-// atomicBool is a wrapper for atomically accessed error values
+// atomicError is a wrapper for atomically accessed error values
type atomicError struct {
_noCopy noCopy
value atomic.Value
diff --git a/vendor/github.com/go-sql-driver/mysql/utils_go18.go b/vendor/github.com/go-sql-driver/mysql/utils_go18.go
index 7d8c9b16e..c35c2a6aa 100644
--- a/vendor/github.com/go-sql-driver/mysql/utils_go18.go
+++ b/vendor/github.com/go-sql-driver/mysql/utils_go18.go
@@ -15,6 +15,7 @@ import (
"database/sql"
"database/sql/driver"
"errors"
+ "fmt"
)
func cloneTLSConfig(c *tls.Config) *tls.Config {
@@ -44,6 +45,6 @@ func mapIsolationLevel(level driver.IsolationLevel) (string, error) {
case sql.LevelSerializable:
return "SERIALIZABLE", nil
default:
- return "", errors.New("mysql: unsupported isolation level: " + string(level))
+ return "", fmt.Errorf("mysql: unsupported isolation level: %v", level)
}
}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils_go18_test.go b/vendor/github.com/go-sql-driver/mysql/utils_go18_test.go
deleted file mode 100644
index 856c25f56..000000000
--- a/vendor/github.com/go-sql-driver/mysql/utils_go18_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-// +build go1.8
-
-package mysql
-
-import (
- "database/sql"
- "database/sql/driver"
- "testing"
-)
-
-func TestIsolationLevelMapping(t *testing.T) {
-
- data := []struct {
- level driver.IsolationLevel
- expected string
- }{
- {
- level: driver.IsolationLevel(sql.LevelReadCommitted),
- expected: "READ COMMITTED",
- },
- {
- level: driver.IsolationLevel(sql.LevelRepeatableRead),
- expected: "REPEATABLE READ",
- },
- {
- level: driver.IsolationLevel(sql.LevelReadUncommitted),
- expected: "READ UNCOMMITTED",
- },
- {
- level: driver.IsolationLevel(sql.LevelSerializable),
- expected: "SERIALIZABLE",
- },
- }
-
- for i, td := range data {
- if actual, err := mapIsolationLevel(td.level); actual != td.expected || err != nil {
- t.Fatal(i, td.expected, actual, err)
- }
- }
-
- // check unsupported mapping
- if actual, err := mapIsolationLevel(driver.IsolationLevel(sql.LevelLinearizable)); actual != "" || err == nil {
- t.Fatal("Expected error on unsupported isolation level")
- }
-
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils_test.go b/vendor/github.com/go-sql-driver/mysql/utils_test.go
deleted file mode 100644
index 0041892db..000000000
--- a/vendor/github.com/go-sql-driver/mysql/utils_test.go
+++ /dev/null
@@ -1,277 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// 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/.
-
-package mysql
-
-import (
- "bytes"
- "encoding/binary"
- "fmt"
- "testing"
- "time"
-)
-
-func TestScanNullTime(t *testing.T) {
- var scanTests = []struct {
- in interface{}
- error bool
- valid bool
- time time.Time
- }{
- {tDate, false, true, tDate},
- {sDate, false, true, tDate},
- {[]byte(sDate), false, true, tDate},
- {tDateTime, false, true, tDateTime},
- {sDateTime, false, true, tDateTime},
- {[]byte(sDateTime), false, true, tDateTime},
- {tDate0, false, true, tDate0},
- {sDate0, false, true, tDate0},
- {[]byte(sDate0), false, true, tDate0},
- {sDateTime0, false, true, tDate0},
- {[]byte(sDateTime0), false, true, tDate0},
- {"", true, false, tDate0},
- {"1234", true, false, tDate0},
- {0, true, false, tDate0},
- }
-
- var nt = NullTime{}
- var err error
-
- for _, tst := range scanTests {
- err = nt.Scan(tst.in)
- if (err != nil) != tst.error {
- t.Errorf("%v: expected error status %t, got %t", tst.in, tst.error, (err != nil))
- }
- if nt.Valid != tst.valid {
- t.Errorf("%v: expected valid status %t, got %t", tst.in, tst.valid, nt.Valid)
- }
- if nt.Time != tst.time {
- t.Errorf("%v: expected time %v, got %v", tst.in, tst.time, nt.Time)
- }
- }
-}
-
-func TestLengthEncodedInteger(t *testing.T) {
- var integerTests = []struct {
- num uint64
- encoded []byte
- }{
- {0x0000000000000000, []byte{0x00}},
- {0x0000000000000012, []byte{0x12}},
- {0x00000000000000fa, []byte{0xfa}},
- {0x0000000000000100, []byte{0xfc, 0x00, 0x01}},
- {0x0000000000001234, []byte{0xfc, 0x34, 0x12}},
- {0x000000000000ffff, []byte{0xfc, 0xff, 0xff}},
- {0x0000000000010000, []byte{0xfd, 0x00, 0x00, 0x01}},
- {0x0000000000123456, []byte{0xfd, 0x56, 0x34, 0x12}},
- {0x0000000000ffffff, []byte{0xfd, 0xff, 0xff, 0xff}},
- {0x0000000001000000, []byte{0xfe, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00}},
- {0x123456789abcdef0, []byte{0xfe, 0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12}},
- {0xffffffffffffffff, []byte{0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},
- }
-
- for _, tst := range integerTests {
- num, isNull, numLen := readLengthEncodedInteger(tst.encoded)
- if isNull {
- t.Errorf("%x: expected %d, got NULL", tst.encoded, tst.num)
- }
- if num != tst.num {
- t.Errorf("%x: expected %d, got %d", tst.encoded, tst.num, num)
- }
- if numLen != len(tst.encoded) {
- t.Errorf("%x: expected size %d, got %d", tst.encoded, len(tst.encoded), numLen)
- }
- encoded := appendLengthEncodedInteger(nil, num)
- if !bytes.Equal(encoded, tst.encoded) {
- t.Errorf("%v: expected %x, got %x", num, tst.encoded, encoded)
- }
- }
-}
-
-func TestOldPass(t *testing.T) {
- scramble := []byte{9, 8, 7, 6, 5, 4, 3, 2}
- vectors := []struct {
- pass string
- out string
- }{
- {" pass", "47575c5a435b4251"},
- {"pass ", "47575c5a435b4251"},
- {"123\t456", "575c47505b5b5559"},
- {"C0mpl!ca ted#PASS123", "5d5d554849584a45"},
- }
- for _, tuple := range vectors {
- ours := scrambleOldPassword(scramble, []byte(tuple.pass))
- if tuple.out != fmt.Sprintf("%x", ours) {
- t.Errorf("Failed old password %q", tuple.pass)
- }
- }
-}
-
-func TestFormatBinaryDateTime(t *testing.T) {
- rawDate := [11]byte{}
- binary.LittleEndian.PutUint16(rawDate[:2], 1978) // years
- rawDate[2] = 12 // months
- rawDate[3] = 30 // days
- rawDate[4] = 15 // hours
- rawDate[5] = 46 // minutes
- rawDate[6] = 23 // seconds
- binary.LittleEndian.PutUint32(rawDate[7:], 987654) // microseconds
- expect := func(expected string, inlen, outlen uint8) {
- actual, _ := formatBinaryDateTime(rawDate[:inlen], outlen, false)
- bytes, ok := actual.([]byte)
- if !ok {
- t.Errorf("formatBinaryDateTime must return []byte, was %T", actual)
- }
- if string(bytes) != expected {
- t.Errorf(
- "expected %q, got %q for length in %d, out %d",
- bytes, actual, inlen, outlen,
- )
- }
- }
- expect("0000-00-00", 0, 10)
- expect("0000-00-00 00:00:00", 0, 19)
- expect("1978-12-30", 4, 10)
- expect("1978-12-30 15:46:23", 7, 19)
- expect("1978-12-30 15:46:23.987654", 11, 26)
-}
-
-func TestEscapeBackslash(t *testing.T) {
- expect := func(expected, value string) {
- actual := string(escapeBytesBackslash([]byte{}, []byte(value)))
- if actual != expected {
- t.Errorf(
- "expected %s, got %s",
- expected, actual,
- )
- }
-
- actual = string(escapeStringBackslash([]byte{}, value))
- if actual != expected {
- t.Errorf(
- "expected %s, got %s",
- expected, actual,
- )
- }
- }
-
- expect("foo\\0bar", "foo\x00bar")
- expect("foo\\nbar", "foo\nbar")
- expect("foo\\rbar", "foo\rbar")
- expect("foo\\Zbar", "foo\x1abar")
- expect("foo\\\"bar", "foo\"bar")
- expect("foo\\\\bar", "foo\\bar")
- expect("foo\\'bar", "foo'bar")
-}
-
-func TestEscapeQuotes(t *testing.T) {
- expect := func(expected, value string) {
- actual := string(escapeBytesQuotes([]byte{}, []byte(value)))
- if actual != expected {
- t.Errorf(
- "expected %s, got %s",
- expected, actual,
- )
- }
-
- actual = string(escapeStringQuotes([]byte{}, value))
- if actual != expected {
- t.Errorf(
- "expected %s, got %s",
- expected, actual,
- )
- }
- }
-
- expect("foo\x00bar", "foo\x00bar") // not affected
- expect("foo\nbar", "foo\nbar") // not affected
- expect("foo\rbar", "foo\rbar") // not affected
- expect("foo\x1abar", "foo\x1abar") // not affected
- expect("foo''bar", "foo'bar") // affected
- expect("foo\"bar", "foo\"bar") // not affected
-}
-
-func TestAtomicBool(t *testing.T) {
- var ab atomicBool
- if ab.IsSet() {
- t.Fatal("Expected value to be false")
- }
-
- ab.Set(true)
- if ab.value != 1 {
- t.Fatal("Set(true) did not set value to 1")
- }
- if !ab.IsSet() {
- t.Fatal("Expected value to be true")
- }
-
- ab.Set(true)
- if !ab.IsSet() {
- t.Fatal("Expected value to be true")
- }
-
- ab.Set(false)
- if ab.value != 0 {
- t.Fatal("Set(false) did not set value to 0")
- }
- if ab.IsSet() {
- t.Fatal("Expected value to be false")
- }
-
- ab.Set(false)
- if ab.IsSet() {
- t.Fatal("Expected value to be false")
- }
- if ab.TrySet(false) {
- t.Fatal("Expected TrySet(false) to fail")
- }
- if !ab.TrySet(true) {
- t.Fatal("Expected TrySet(true) to succeed")
- }
- if !ab.IsSet() {
- t.Fatal("Expected value to be true")
- }
-
- ab.Set(true)
- if !ab.IsSet() {
- t.Fatal("Expected value to be true")
- }
- if ab.TrySet(true) {
- t.Fatal("Expected TrySet(true) to fail")
- }
- if !ab.TrySet(false) {
- t.Fatal("Expected TrySet(false) to succeed")
- }
- if ab.IsSet() {
- t.Fatal("Expected value to be false")
- }
-
- ab._noCopy.Lock() // we've "tested" it ¯\_(ツ)_/¯
-}
-
-func TestAtomicError(t *testing.T) {
- var ae atomicError
- if ae.Value() != nil {
- t.Fatal("Expected value to be nil")
- }
-
- ae.Set(ErrMalformPkt)
- if v := ae.Value(); v != ErrMalformPkt {
- if v == nil {
- t.Fatal("Value is still nil")
- }
- t.Fatal("Error did not match")
- }
- ae.Set(ErrPktSync)
- if ae.Value() == ErrMalformPkt {
- t.Fatal("Error still matches old error")
- }
- if v := ae.Value(); v != ErrPktSync {
- t.Fatal("Error did not match")
- }
-}
diff --git a/vendor/github.com/golang/freetype/cmd/print-glyph-points/main.c b/vendor/github.com/golang/freetype/cmd/print-glyph-points/main.c
deleted file mode 100644
index 6e821e892..000000000
--- a/vendor/github.com/golang/freetype/cmd/print-glyph-points/main.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-gcc main.c -I/usr/include/freetype2 -lfreetype && ./a.out 12 ../../testdata/luxisr.ttf with_hinting
-*/
-
-#include <stdio.h>
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-void usage(char** argv) {
- fprintf(stderr, "usage: %s font_size font_file [with_hinting|sans_hinting]\n", argv[0]);
-}
-
-int main(int argc, char** argv) {
- FT_Error error;
- FT_Library library;
- FT_Face face;
- FT_Glyph_Metrics* m;
- FT_Outline* o;
- FT_Int major, minor, patch;
- int i, j, font_size, no_hinting;
-
- if (argc != 4) {
- usage(argv);
- return 1;
- }
- font_size = atoi(argv[1]);
- if (font_size <= 0) {
- fprintf(stderr, "invalid font_size\n");
- usage(argv);
- return 1;
- }
- if (!strcmp(argv[3], "with_hinting")) {
- no_hinting = 0;
- } else if (!strcmp(argv[3], "sans_hinting")) {
- no_hinting = 1;
- } else {
- fprintf(stderr, "neither \"with_hinting\" nor \"sans_hinting\"\n");
- usage(argv);
- return 1;
- };
- error = FT_Init_FreeType(&library);
- if (error) {
- fprintf(stderr, "FT_Init_FreeType: error #%d\n", error);
- return 1;
- }
- FT_Library_Version(library, &major, &minor, &patch);
- printf("freetype version %d.%d.%d\n", major, minor, patch);
- error = FT_New_Face(library, argv[2], 0, &face);
- if (error) {
- fprintf(stderr, "FT_New_Face: error #%d\n", error);
- return 1;
- }
- error = FT_Set_Char_Size(face, 0, font_size*64, 0, 0);
- if (error) {
- fprintf(stderr, "FT_Set_Char_Size: error #%d\n", error);
- return 1;
- }
- for (i = 0; i < face->num_glyphs; i++) {
- error = FT_Load_Glyph(face, i, no_hinting ? FT_LOAD_NO_HINTING : FT_LOAD_DEFAULT);
- if (error) {
- fprintf(stderr, "FT_Load_Glyph: glyph %d: error #%d\n", i, error);
- return 1;
- }
- if (face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) {
- fprintf(stderr, "glyph format for glyph %d is not FT_GLYPH_FORMAT_OUTLINE\n", i);
- return 1;
- }
- m = &face->glyph->metrics;
- /* Print what Go calls the AdvanceWidth, and then: XMin, YMin, XMax, YMax. */
- printf("%ld %ld %ld %ld %ld;",
- m->horiAdvance,
- m->horiBearingX,
- m->horiBearingY - m->height,
- m->horiBearingX + m->width,
- m->horiBearingY);
- /* Print the glyph points. */
- o = &face->glyph->outline;
- for (j = 0; j < o->n_points; j++) {
- if (j != 0) {
- printf(", ");
- }
- printf("%ld %ld %d", o->points[j].x, o->points[j].y, o->tags[j] & 0x01);
- }
- printf("\n");
- }
- return 0;
-}
diff --git a/vendor/github.com/golang/freetype/example/capjoin/main.go b/vendor/github.com/golang/freetype/example/capjoin/main.go
deleted file mode 100644
index 71f3356c7..000000000
--- a/vendor/github.com/golang/freetype/example/capjoin/main.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2016 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "bufio"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "log"
- "os"
-
- "github.com/golang/freetype/raster"
- "golang.org/x/image/math/fixed"
-)
-
-func main() {
- const (
- w = 400
- h = 400
- )
- r := raster.NewRasterizer(w, h)
- r.UseNonZeroWinding = true
-
- cjs := []struct {
- c raster.Capper
- j raster.Joiner
- }{
- {raster.RoundCapper, raster.RoundJoiner},
- {raster.ButtCapper, raster.BevelJoiner},
- {raster.SquareCapper, raster.BevelJoiner},
- }
-
- for i, cj := range cjs {
- var path raster.Path
- path.Start(fixed.P(30+100*i, 30+120*i))
- path.Add1(fixed.P(180+100*i, 80+120*i))
- path.Add1(fixed.P(50+100*i, 130+120*i))
- raster.Stroke(r, path, fixed.I(20), cj.c, cj.j)
- }
-
- rgba := image.NewRGBA(image.Rect(0, 0, w, h))
- draw.Draw(rgba, rgba.Bounds(), image.Black, image.Point{}, draw.Src)
- p := raster.NewRGBAPainter(rgba)
- p.SetColor(color.RGBA{0x7f, 0x7f, 0x7f, 0xff})
- r.Rasterize(p)
-
- white := color.RGBA{0xff, 0xff, 0xff, 0xff}
- for i := range cjs {
- rgba.SetRGBA(30+100*i, 30+120*i, white)
- rgba.SetRGBA(180+100*i, 80+120*i, white)
- rgba.SetRGBA(50+100*i, 130+120*i, white)
- }
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, rgba)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/drawer/main.go b/vendor/github.com/golang/freetype/example/drawer/main.go
deleted file mode 100644
index d26d066d9..000000000
--- a/vendor/github.com/golang/freetype/example/drawer/main.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2015 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "bufio"
- "flag"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "io/ioutil"
- "log"
- "math"
- "os"
-
- "github.com/golang/freetype/truetype"
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
-)
-
-var (
- dpi = flag.Float64("dpi", 72, "screen resolution in Dots Per Inch")
- fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
- hinting = flag.String("hinting", "none", "none | full")
- size = flag.Float64("size", 12, "font size in points")
- spacing = flag.Float64("spacing", 1.5, "line spacing (e.g. 2 means double spaced)")
- wonb = flag.Bool("whiteonblack", false, "white text on a black background")
-)
-
-const title = "Jabberwocky"
-
-var text = []string{
- "’Twas brillig, and the slithy toves",
- "Did gyre and gimble in the wabe;",
- "All mimsy were the borogoves,",
- "And the mome raths outgrabe.",
- "",
- "“Beware the Jabberwock, my son!",
- "The jaws that bite, the claws that catch!",
- "Beware the Jubjub bird, and shun",
- "The frumious Bandersnatch!â€",
- "",
- "He took his vorpal sword in hand:",
- "Long time the manxome foe he sought—",
- "So rested he by the Tumtum tree,",
- "And stood awhile in thought.",
- "",
- "And as in uffish thought he stood,",
- "The Jabberwock, with eyes of flame,",
- "Came whiffling through the tulgey wood,",
- "And burbled as it came!",
- "",
- "One, two! One, two! and through and through",
- "The vorpal blade went snicker-snack!",
- "He left it dead, and with its head",
- "He went galumphing back.",
- "",
- "“And hast thou slain the Jabberwock?",
- "Come to my arms, my beamish boy!",
- "O frabjous day! Callooh! Callay!â€",
- "He chortled in his joy.",
- "",
- "’Twas brillig, and the slithy toves",
- "Did gyre and gimble in the wabe;",
- "All mimsy were the borogoves,",
- "And the mome raths outgrabe.",
-}
-
-func main() {
- flag.Parse()
-
- // Read the font data.
- fontBytes, err := ioutil.ReadFile(*fontfile)
- if err != nil {
- log.Println(err)
- return
- }
- f, err := truetype.Parse(fontBytes)
- if err != nil {
- log.Println(err)
- return
- }
-
- // Draw the background and the guidelines.
- fg, bg := image.Black, image.White
- ruler := color.RGBA{0xdd, 0xdd, 0xdd, 0xff}
- if *wonb {
- fg, bg = image.White, image.Black
- ruler = color.RGBA{0x22, 0x22, 0x22, 0xff}
- }
- const imgW, imgH = 640, 480
- rgba := image.NewRGBA(image.Rect(0, 0, imgW, imgH))
- draw.Draw(rgba, rgba.Bounds(), bg, image.ZP, draw.Src)
- for i := 0; i < 200; i++ {
- rgba.Set(10, 10+i, ruler)
- rgba.Set(10+i, 10, ruler)
- }
-
- // Draw the text.
- h := font.HintingNone
- switch *hinting {
- case "full":
- h = font.HintingFull
- }
- d := &font.Drawer{
- Dst: rgba,
- Src: fg,
- Face: truetype.NewFace(f, &truetype.Options{
- Size: *size,
- DPI: *dpi,
- Hinting: h,
- }),
- }
- y := 10 + int(math.Ceil(*size**dpi/72))
- dy := int(math.Ceil(*size * *spacing * *dpi / 72))
- d.Dot = fixed.Point26_6{
- X: (fixed.I(imgW) - d.MeasureString(title)) / 2,
- Y: fixed.I(y),
- }
- d.DrawString(title)
- y += dy
- for _, s := range text {
- d.Dot = fixed.P(10, y)
- d.DrawString(s)
- y += dy
- }
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, rgba)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/freetype/main.go b/vendor/github.com/golang/freetype/example/freetype/main.go
deleted file mode 100644
index dfbde9a2f..000000000
--- a/vendor/github.com/golang/freetype/example/freetype/main.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright 2010 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "bufio"
- "flag"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "io/ioutil"
- "log"
- "os"
-
- "github.com/golang/freetype"
- "golang.org/x/image/font"
-)
-
-var (
- dpi = flag.Float64("dpi", 72, "screen resolution in Dots Per Inch")
- fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
- hinting = flag.String("hinting", "none", "none | full")
- size = flag.Float64("size", 12, "font size in points")
- spacing = flag.Float64("spacing", 1.5, "line spacing (e.g. 2 means double spaced)")
- wonb = flag.Bool("whiteonblack", false, "white text on a black background")
-)
-
-var text = []string{
- "’Twas brillig, and the slithy toves",
- "Did gyre and gimble in the wabe;",
- "All mimsy were the borogoves,",
- "And the mome raths outgrabe.",
- "",
- "“Beware the Jabberwock, my son!",
- "The jaws that bite, the claws that catch!",
- "Beware the Jubjub bird, and shun",
- "The frumious Bandersnatch!â€",
- "",
- "He took his vorpal sword in hand:",
- "Long time the manxome foe he sought—",
- "So rested he by the Tumtum tree,",
- "And stood awhile in thought.",
- "",
- "And as in uffish thought he stood,",
- "The Jabberwock, with eyes of flame,",
- "Came whiffling through the tulgey wood,",
- "And burbled as it came!",
- "",
- "One, two! One, two! and through and through",
- "The vorpal blade went snicker-snack!",
- "He left it dead, and with its head",
- "He went galumphing back.",
- "",
- "“And hast thou slain the Jabberwock?",
- "Come to my arms, my beamish boy!",
- "O frabjous day! Callooh! Callay!â€",
- "He chortled in his joy.",
- "",
- "’Twas brillig, and the slithy toves",
- "Did gyre and gimble in the wabe;",
- "All mimsy were the borogoves,",
- "And the mome raths outgrabe.",
-}
-
-func main() {
- flag.Parse()
-
- // Read the font data.
- fontBytes, err := ioutil.ReadFile(*fontfile)
- if err != nil {
- log.Println(err)
- return
- }
- f, err := freetype.ParseFont(fontBytes)
- if err != nil {
- log.Println(err)
- return
- }
-
- // Initialize the context.
- fg, bg := image.Black, image.White
- ruler := color.RGBA{0xdd, 0xdd, 0xdd, 0xff}
- if *wonb {
- fg, bg = image.White, image.Black
- ruler = color.RGBA{0x22, 0x22, 0x22, 0xff}
- }
- rgba := image.NewRGBA(image.Rect(0, 0, 640, 480))
- draw.Draw(rgba, rgba.Bounds(), bg, image.ZP, draw.Src)
- c := freetype.NewContext()
- c.SetDPI(*dpi)
- c.SetFont(f)
- c.SetFontSize(*size)
- c.SetClip(rgba.Bounds())
- c.SetDst(rgba)
- c.SetSrc(fg)
- switch *hinting {
- default:
- c.SetHinting(font.HintingNone)
- case "full":
- c.SetHinting(font.HintingFull)
- }
-
- // Draw the guidelines.
- for i := 0; i < 200; i++ {
- rgba.Set(10, 10+i, ruler)
- rgba.Set(10+i, 10, ruler)
- }
-
- // Draw the text.
- pt := freetype.Pt(10, 10+int(c.PointToFixed(*size)>>6))
- for _, s := range text {
- _, err = c.DrawString(s, pt)
- if err != nil {
- log.Println(err)
- return
- }
- pt.Y += c.PointToFixed(*size * *spacing)
- }
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, rgba)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/gamma/main.go b/vendor/github.com/golang/freetype/example/gamma/main.go
deleted file mode 100644
index cdd50bc3b..000000000
--- a/vendor/github.com/golang/freetype/example/gamma/main.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2010 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "bufio"
- "fmt"
- "image"
- "image/draw"
- "image/png"
- "log"
- "os"
-
- "github.com/golang/freetype/raster"
- "golang.org/x/image/math/fixed"
-)
-
-func p(x, y int) fixed.Point26_6 {
- return fixed.Point26_6{
- X: fixed.Int26_6(x * 64),
- Y: fixed.Int26_6(y * 64),
- }
-}
-
-func main() {
- // Draw a rounded corner that is one pixel wide.
- r := raster.NewRasterizer(50, 50)
- r.Start(p(5, 5))
- r.Add1(p(5, 25))
- r.Add2(p(5, 45), p(25, 45))
- r.Add1(p(45, 45))
- r.Add1(p(45, 44))
- r.Add1(p(26, 44))
- r.Add2(p(6, 44), p(6, 24))
- r.Add1(p(6, 5))
- r.Add1(p(5, 5))
-
- // Rasterize that curve multiple times at different gammas.
- const (
- w = 600
- h = 200
- )
- rgba := image.NewRGBA(image.Rect(0, 0, w, h))
- draw.Draw(rgba, image.Rect(0, 0, w, h/2), image.Black, image.ZP, draw.Src)
- draw.Draw(rgba, image.Rect(0, h/2, w, h), image.White, image.ZP, draw.Src)
- mask := image.NewAlpha(image.Rect(0, 0, 50, 50))
- painter := raster.NewAlphaSrcPainter(mask)
- gammas := []float64{1.0 / 10.0, 1.0 / 3.0, 1.0 / 2.0, 2.0 / 3.0, 4.0 / 5.0, 1.0, 5.0 / 4.0, 3.0 / 2.0, 2.0, 3.0, 10.0}
- for i, g := range gammas {
- draw.Draw(mask, mask.Bounds(), image.Transparent, image.ZP, draw.Src)
- r.Rasterize(raster.NewGammaCorrectionPainter(painter, g))
- x, y := 50*i+25, 25
- draw.DrawMask(rgba, image.Rect(x, y, x+50, y+50), image.White, image.ZP, mask, image.ZP, draw.Over)
- y += 100
- draw.DrawMask(rgba, image.Rect(x, y, x+50, y+50), image.Black, image.ZP, mask, image.ZP, draw.Over)
- }
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, rgba)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/genbasicfont/main.go b/vendor/github.com/golang/freetype/example/genbasicfont/main.go
deleted file mode 100644
index 5b2f2bc6f..000000000
--- a/vendor/github.com/golang/freetype/example/genbasicfont/main.go
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2016 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-// Program genbasicfont generates Go source code that imports
-// golang.org/x/image/font/basicfont to provide a fixed width font face.
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "go/format"
- "image"
- "image/draw"
- "io/ioutil"
- "log"
- "net/http"
- "strings"
- "unicode"
-
- "github.com/golang/freetype/truetype"
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
-)
-
-var (
- fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename or URL of the TTF font")
- hinting = flag.String("hinting", "none", "none, vertical or full")
- pkg = flag.String("pkg", "example", "the package name for the generated code")
- size = flag.Float64("size", 12, "the number of pixels in 1 em")
- vr = flag.String("var", "example", "the variable name for the generated code")
-)
-
-func loadFontFile() ([]byte, error) {
- if strings.HasPrefix(*fontfile, "http://") || strings.HasPrefix(*fontfile, "https://") {
- resp, err := http.Get(*fontfile)
- if err != nil {
- return nil, err
- }
- defer resp.Body.Close()
- return ioutil.ReadAll(resp.Body)
- }
- return ioutil.ReadFile(*fontfile)
-}
-
-func parseHinting(h string) font.Hinting {
- switch h {
- case "full":
- return font.HintingFull
- case "vertical":
- log.Fatal("TODO: have package truetype implement vertical hinting")
- return font.HintingVertical
- }
- return font.HintingNone
-}
-
-func privateUseArea(r rune) bool {
- return 0xe000 <= r && r <= 0xf8ff ||
- 0xf0000 <= r && r <= 0xffffd ||
- 0x100000 <= r && r <= 0x10fffd
-}
-
-func loadRanges(f *truetype.Font) (ret [][2]rune) {
- rr := [2]rune{-1, -1}
- for r := rune(0); r <= unicode.MaxRune; r++ {
- if privateUseArea(r) {
- continue
- }
- if f.Index(r) == 0 {
- continue
- }
- if rr[1] == r {
- rr[1] = r + 1
- continue
- }
- if rr[0] != -1 {
- ret = append(ret, rr)
- }
- rr = [2]rune{r, r + 1}
- }
- if rr[0] != -1 {
- ret = append(ret, rr)
- }
- return ret
-}
-
-func emptyCol(m *image.Gray, r image.Rectangle, x int) bool {
- for y := r.Min.Y; y < r.Max.Y; y++ {
- if m.GrayAt(x, y).Y > 0 {
- return false
- }
- }
- return true
-}
-
-func emptyRow(m *image.Gray, r image.Rectangle, y int) bool {
- for x := r.Min.X; x < r.Max.X; x++ {
- if m.GrayAt(x, y).Y > 0 {
- return false
- }
- }
- return true
-}
-
-func tightBounds(m *image.Gray) (r image.Rectangle) {
- r = m.Bounds()
- for ; r.Min.Y < r.Max.Y && emptyRow(m, r, r.Min.Y+0); r.Min.Y++ {
- }
- for ; r.Min.Y < r.Max.Y && emptyRow(m, r, r.Max.Y-1); r.Max.Y-- {
- }
- for ; r.Min.X < r.Max.X && emptyCol(m, r, r.Min.X+0); r.Min.X++ {
- }
- for ; r.Min.X < r.Max.X && emptyCol(m, r, r.Max.X-1); r.Max.X-- {
- }
- return r
-}
-
-func printPix(ranges [][2]rune, glyphs map[rune]*image.Gray, b image.Rectangle) []byte {
- buf := new(bytes.Buffer)
- for _, rr := range ranges {
- for r := rr[0]; r < rr[1]; r++ {
- m := glyphs[r]
- fmt.Fprintf(buf, "// U+%08x '%c'\n", r, r)
- for y := b.Min.Y; y < b.Max.Y; y++ {
- for x := b.Min.X; x < b.Max.X; x++ {
- fmt.Fprintf(buf, "%#02x, ", m.GrayAt(x, y).Y)
- }
- fmt.Fprintln(buf)
- }
- fmt.Fprintln(buf)
- }
- }
- return buf.Bytes()
-}
-
-func printRanges(ranges [][2]rune) []byte {
- buf := new(bytes.Buffer)
- offset := 0
- for _, rr := range ranges {
- fmt.Fprintf(buf, "{'\\U%08x', '\\U%08x', %d},\n", rr[0], rr[1], offset)
- offset += int(rr[1] - rr[0])
- }
- return buf.Bytes()
-}
-
-func main() {
- flag.Parse()
- b, err := loadFontFile()
- if err != nil {
- log.Fatal(err)
- }
- f, err := truetype.Parse(b)
- if err != nil {
- log.Fatal(err)
- }
- face := truetype.NewFace(f, &truetype.Options{
- Size: *size,
- Hinting: parseHinting(*hinting),
- })
- defer face.Close()
-
- fBounds := f.Bounds(fixed.Int26_6(*size * 64))
- iBounds := image.Rect(
- +fBounds.Min.X.Floor(),
- -fBounds.Max.Y.Ceil(),
- +fBounds.Max.X.Ceil(),
- -fBounds.Min.Y.Floor(),
- )
-
- tBounds := image.Rectangle{}
- glyphs := map[rune]*image.Gray{}
- advance := fixed.Int26_6(-1)
-
- ranges := loadRanges(f)
- for _, rr := range ranges {
- for r := rr[0]; r < rr[1]; r++ {
- dr, mask, maskp, adv, ok := face.Glyph(fixed.Point26_6{}, r)
- if !ok {
- log.Fatalf("could not load glyph for %U", r)
- }
- if advance < 0 {
- advance = adv
- } else if advance != adv {
- log.Fatalf("advance was not constant: got %v and %v", advance, adv)
- }
- dst := image.NewGray(iBounds)
- draw.DrawMask(dst, dr, image.White, image.Point{}, mask, maskp, draw.Src)
- glyphs[r] = dst
- tBounds = tBounds.Union(tightBounds(dst))
- }
- }
-
- // height is the glyph image height, not the inter-line spacing.
- width, height := tBounds.Dx(), tBounds.Dy()
-
- buf := new(bytes.Buffer)
- fmt.Fprintf(buf, "// generated by go generate; DO NOT EDIT.\n\npackage %s\n\n", *pkg)
- fmt.Fprintf(buf, "import (\n\"image\"\n\n\"golang.org/x/image/font/basicfont\"\n)\n\n")
- fmt.Fprintf(buf, "// %s contains %d %d×%d glyphs in %d Pix bytes.\n",
- *vr, len(glyphs), width, height, len(glyphs)*width*height)
- fmt.Fprintf(buf, `var %s = basicfont.Face{
- Advance: %d,
- Width: %d,
- Height: %d,
- Ascent: %d,
- Descent: %d,
- Left: %d,
- Mask: &image.Alpha{
- Stride: %d,
- Rect: image.Rectangle{Max: image.Point{%d, %d*%d}},
- Pix: []byte{
- %s
- },
- },
- Ranges: []basicfont.Range{
- %s
- },
- }`, *vr, advance.Ceil(), width, face.Metrics().Height.Ceil(), -tBounds.Min.Y, +tBounds.Max.Y, tBounds.Min.X,
- width, width, len(glyphs), height,
- printPix(ranges, glyphs, tBounds), printRanges(ranges))
-
- fmted, err := format.Source(buf.Bytes())
- if err != nil {
- log.Fatalf("format.Source: %v", err)
- }
- if err := ioutil.WriteFile(*vr+".go", fmted, 0644); err != nil {
- log.Fatalf("ioutil.WriteFile: %v", err)
- }
-}
diff --git a/vendor/github.com/golang/freetype/example/raster/main.go b/vendor/github.com/golang/freetype/example/raster/main.go
deleted file mode 100644
index 3e572e1c5..000000000
--- a/vendor/github.com/golang/freetype/example/raster/main.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2010 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "bufio"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "log"
- "os"
-
- "github.com/golang/freetype/raster"
- "golang.org/x/image/math/fixed"
-)
-
-type node struct {
- x, y, degree int
-}
-
-// These contours "outside" and "inside" are from the 'A' glyph from the Droid
-// Serif Regular font.
-
-var outside = []node{
- node{414, 489, 1},
- node{336, 274, 2},
- node{327, 250, 0},
- node{322, 226, 2},
- node{317, 203, 0},
- node{317, 186, 2},
- node{317, 134, 0},
- node{350, 110, 2},
- node{384, 86, 0},
- node{453, 86, 1},
- node{500, 86, 1},
- node{500, 0, 1},
- node{0, 0, 1},
- node{0, 86, 1},
- node{39, 86, 2},
- node{69, 86, 0},
- node{90, 92, 2},
- node{111, 99, 0},
- node{128, 117, 2},
- node{145, 135, 0},
- node{160, 166, 2},
- node{176, 197, 0},
- node{195, 246, 1},
- node{649, 1462, 1},
- node{809, 1462, 1},
- node{1272, 195, 2},
- node{1284, 163, 0},
- node{1296, 142, 2},
- node{1309, 121, 0},
- node{1326, 108, 2},
- node{1343, 96, 0},
- node{1365, 91, 2},
- node{1387, 86, 0},
- node{1417, 86, 1},
- node{1444, 86, 1},
- node{1444, 0, 1},
- node{881, 0, 1},
- node{881, 86, 1},
- node{928, 86, 2},
- node{1051, 86, 0},
- node{1051, 184, 2},
- node{1051, 201, 0},
- node{1046, 219, 2},
- node{1042, 237, 0},
- node{1034, 260, 1},
- node{952, 489, 1},
- node{414, 489, -1},
-}
-
-var inside = []node{
- node{686, 1274, 1},
- node{453, 592, 1},
- node{915, 592, 1},
- node{686, 1274, -1},
-}
-
-func p(n node) fixed.Point26_6 {
- x, y := 20+n.x/4, 380-n.y/4
- return fixed.Point26_6{
- X: fixed.Int26_6(x << 6),
- Y: fixed.Int26_6(y << 6),
- }
-}
-
-func contour(r *raster.Rasterizer, ns []node) {
- if len(ns) == 0 {
- return
- }
- i := 0
- r.Start(p(ns[i]))
- for {
- switch ns[i].degree {
- case -1:
- // -1 signifies end-of-contour.
- return
- case 1:
- i += 1
- r.Add1(p(ns[i]))
- case 2:
- i += 2
- r.Add2(p(ns[i-1]), p(ns[i]))
- default:
- panic("bad degree")
- }
- }
-}
-
-func showNodes(m *image.RGBA, ns []node) {
- for _, n := range ns {
- p := p(n)
- x, y := int(p.X)/64, int(p.Y)/64
- if !(image.Point{x, y}).In(m.Bounds()) {
- continue
- }
- var c color.Color
- switch n.degree {
- case 0:
- c = color.RGBA{0, 255, 255, 255}
- case 1:
- c = color.RGBA{255, 0, 0, 255}
- case 2:
- c = color.RGBA{255, 0, 0, 255}
- }
- if c != nil {
- m.Set(x, y, c)
- }
- }
-}
-
-func main() {
- // Rasterize the contours to a mask image.
- const (
- w = 400
- h = 400
- )
- r := raster.NewRasterizer(w, h)
- contour(r, outside)
- contour(r, inside)
- mask := image.NewAlpha(image.Rect(0, 0, w, h))
- p := raster.NewAlphaSrcPainter(mask)
- r.Rasterize(p)
-
- // Draw the mask image (in gray) onto an RGBA image.
- rgba := image.NewRGBA(image.Rect(0, 0, w, h))
- gray := image.NewUniform(color.Alpha{0x1f})
- draw.Draw(rgba, rgba.Bounds(), image.Black, image.ZP, draw.Src)
- draw.DrawMask(rgba, rgba.Bounds(), gray, image.ZP, mask, image.ZP, draw.Over)
- showNodes(rgba, outside)
- showNodes(rgba, inside)
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, rgba)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/round/main.go b/vendor/github.com/golang/freetype/example/round/main.go
deleted file mode 100644
index 2920e8335..000000000
--- a/vendor/github.com/golang/freetype/example/round/main.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2010 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-// This program visualizes the quadratic approximation to the circle, used to
-// implement round joins when stroking paths. The approximation is used in the
-// stroking code for arcs between 0 and 45 degrees, but is visualized here
-// between 0 and 90 degrees. The discrepancy between the approximation and the
-// true circle is clearly visible at angles above 65 degrees.
-package main
-
-import (
- "bufio"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "log"
- "math"
- "os"
-
- "github.com/golang/freetype/raster"
- "golang.org/x/image/math/fixed"
-)
-
-// pDot returns the dot product p·q.
-func pDot(p, q fixed.Point26_6) fixed.Int52_12 {
- px, py := int64(p.X), int64(p.Y)
- qx, qy := int64(q.X), int64(q.Y)
- return fixed.Int52_12(px*qx + py*qy)
-}
-
-func main() {
- const (
- n = 17
- r = 64 * 80
- )
- s := fixed.Int26_6(r * math.Sqrt(2) / 2)
- t := fixed.Int26_6(r * math.Tan(math.Pi/8))
-
- m := image.NewRGBA(image.Rect(0, 0, 800, 600))
- draw.Draw(m, m.Bounds(), image.NewUniform(color.RGBA{63, 63, 63, 255}), image.ZP, draw.Src)
- mp := raster.NewRGBAPainter(m)
- mp.SetColor(image.Black)
- z := raster.NewRasterizer(800, 600)
-
- for i := 0; i < n; i++ {
- cx := fixed.Int26_6(6400 + 12800*(i%4))
- cy := fixed.Int26_6(640 + 8000*(i/4))
- c := fixed.Point26_6{X: cx, Y: cy}
- theta := math.Pi * (0.5 + 0.5*float64(i)/(n-1))
- dx := fixed.Int26_6(r * math.Cos(theta))
- dy := fixed.Int26_6(r * math.Sin(theta))
- d := fixed.Point26_6{X: dx, Y: dy}
- // Draw a quarter-circle approximated by two quadratic segments,
- // with each segment spanning 45 degrees.
- z.Start(c)
- z.Add1(c.Add(fixed.Point26_6{X: r, Y: 0}))
- z.Add2(c.Add(fixed.Point26_6{X: r, Y: t}), c.Add(fixed.Point26_6{X: s, Y: s}))
- z.Add2(c.Add(fixed.Point26_6{X: t, Y: r}), c.Add(fixed.Point26_6{X: 0, Y: r}))
- // Add another quadratic segment whose angle ranges between 0 and 90
- // degrees. For an explanation of the magic constants 128, 150, 181 and
- // 256, read the comments in the freetype/raster package.
- dot := 256 * pDot(d, fixed.Point26_6{X: 0, Y: r}) / (r * r)
- multiple := fixed.Int26_6(150-(150-128)*(dot-181)/(256-181)) >> 2
- z.Add2(c.Add(fixed.Point26_6{X: dx, Y: r + dy}.Mul(multiple)), c.Add(d))
- // Close the curve.
- z.Add1(c)
- }
- z.Rasterize(mp)
-
- for i := 0; i < n; i++ {
- cx := fixed.Int26_6(6400 + 12800*(i%4))
- cy := fixed.Int26_6(640 + 8000*(i/4))
- for j := 0; j < n; j++ {
- theta := math.Pi * float64(j) / (n - 1)
- dx := fixed.Int26_6(r * math.Cos(theta))
- dy := fixed.Int26_6(r * math.Sin(theta))
- m.Set(int((cx+dx)/64), int((cy+dy)/64), color.RGBA{255, 255, 0, 255})
- }
- }
-
- // Save that RGBA image to disk.
- outFile, err := os.Create("out.png")
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- defer outFile.Close()
- b := bufio.NewWriter(outFile)
- err = png.Encode(b, m)
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- err = b.Flush()
- if err != nil {
- log.Println(err)
- os.Exit(1)
- }
- fmt.Println("Wrote out.png OK.")
-}
diff --git a/vendor/github.com/golang/freetype/example/truetype/main.go b/vendor/github.com/golang/freetype/example/truetype/main.go
deleted file mode 100644
index e7db2d0ca..000000000
--- a/vendor/github.com/golang/freetype/example/truetype/main.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2010 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-// +build example
-//
-// This build tag means that "go install github.com/golang/freetype/..."
-// doesn't install this example program. Use "go run main.go" to run it or "go
-// install -tags=example" to install it.
-
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "log"
-
- "github.com/golang/freetype/truetype"
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
-)
-
-var fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
-
-func printBounds(b fixed.Rectangle26_6) {
- fmt.Printf("Min.X:%d Min.Y:%d Max.X:%d Max.Y:%d\n", b.Min.X, b.Min.Y, b.Max.X, b.Max.Y)
-}
-
-func printGlyph(g *truetype.GlyphBuf) {
- printBounds(g.Bounds)
- fmt.Print("Points:\n---\n")
- e := 0
- for i, p := range g.Points {
- fmt.Printf("%4d, %4d", p.X, p.Y)
- if p.Flags&0x01 != 0 {
- fmt.Print(" on\n")
- } else {
- fmt.Print(" off\n")
- }
- if i+1 == int(g.Ends[e]) {
- fmt.Print("---\n")
- e++
- }
- }
-}
-
-func main() {
- flag.Parse()
- fmt.Printf("Loading fontfile %q\n", *fontfile)
- b, err := ioutil.ReadFile(*fontfile)
- if err != nil {
- log.Println(err)
- return
- }
- f, err := truetype.Parse(b)
- if err != nil {
- log.Println(err)
- return
- }
- fupe := fixed.Int26_6(f.FUnitsPerEm())
- printBounds(f.Bounds(fupe))
- fmt.Printf("FUnitsPerEm:%d\n\n", fupe)
-
- c0, c1 := 'A', 'V'
-
- i0 := f.Index(c0)
- hm := f.HMetric(fupe, i0)
- g := &truetype.GlyphBuf{}
- err = g.Load(f, fupe, i0, font.HintingNone)
- if err != nil {
- log.Println(err)
- return
- }
- fmt.Printf("'%c' glyph\n", c0)
- fmt.Printf("AdvanceWidth:%d LeftSideBearing:%d\n", hm.AdvanceWidth, hm.LeftSideBearing)
- printGlyph(g)
- i1 := f.Index(c1)
- fmt.Printf("\n'%c', '%c' Kern:%d\n", c0, c1, f.Kern(fupe, i0, i1))
-
- fmt.Printf("\nThe numbers above are in FUnits.\n" +
- "The numbers below are in 26.6 fixed point pixels, at 12pt and 72dpi.\n\n")
- a := truetype.NewFace(f, &truetype.Options{
- Size: 12,
- DPI: 72,
- })
- fmt.Printf("%#v\n", a.Metrics())
-}
diff --git a/vendor/github.com/golang/freetype/freetype_test.go b/vendor/github.com/golang/freetype/freetype_test.go
deleted file mode 100644
index 348c411ab..000000000
--- a/vendor/github.com/golang/freetype/freetype_test.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2012 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-package freetype
-
-import (
- "image"
- "image/draw"
- "io/ioutil"
- "runtime"
- "strings"
- "testing"
-)
-
-func BenchmarkDrawString(b *testing.B) {
- data, err := ioutil.ReadFile("licenses/gpl.txt")
- if err != nil {
- b.Fatal(err)
- }
- lines := strings.Split(string(data), "\n")
-
- data, err = ioutil.ReadFile("testdata/luxisr.ttf")
- if err != nil {
- b.Fatal(err)
- }
- f, err := ParseFont(data)
- if err != nil {
- b.Fatal(err)
- }
-
- dst := image.NewRGBA(image.Rect(0, 0, 800, 600))
- draw.Draw(dst, dst.Bounds(), image.White, image.ZP, draw.Src)
-
- c := NewContext()
- c.SetDst(dst)
- c.SetClip(dst.Bounds())
- c.SetSrc(image.Black)
- c.SetFont(f)
-
- var ms runtime.MemStats
- runtime.ReadMemStats(&ms)
- mallocs := ms.Mallocs
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for j, line := range lines {
- _, err := c.DrawString(line, Pt(0, (j*16)%600))
- if err != nil {
- b.Fatal(err)
- }
- }
- }
- b.StopTimer()
- runtime.ReadMemStats(&ms)
- mallocs = ms.Mallocs - mallocs
- b.Logf("%d iterations, %d mallocs per iteration\n", b.N, int(mallocs)/b.N)
-}
diff --git a/vendor/github.com/golang/freetype/licenses/ftl.txt b/vendor/github.com/golang/freetype/licenses/ftl.txt
deleted file mode 100644
index bbaba33f4..000000000
--- a/vendor/github.com/golang/freetype/licenses/ftl.txt
+++ /dev/null
@@ -1,169 +0,0 @@
- The FreeType Project LICENSE
- ----------------------------
-
- 2006-Jan-27
-
- Copyright 1996-2002, 2006 by
- David Turner, Robert Wilhelm, and Werner Lemberg
-
-
-
-Introduction
-============
-
- The FreeType Project is distributed in several archive packages;
- some of them may contain, in addition to the FreeType font engine,
- various tools and contributions which rely on, or relate to, the
- FreeType Project.
-
- This license applies to all files found in such packages, and
- which do not fall under their own explicit license. The license
- affects thus the FreeType font engine, the test programs,
- documentation and makefiles, at the very least.
-
- This license was inspired by the BSD, Artistic, and IJG
- (Independent JPEG Group) licenses, which all encourage inclusion
- and use of free software in commercial and freeware products
- alike. As a consequence, its main points are that:
-
- o We don't promise that this software works. However, we will be
- interested in any kind of bug reports. (`as is' distribution)
-
- o You can use this software for whatever you want, in parts or
- full form, without having to pay us. (`royalty-free' usage)
-
- o You may not pretend that you wrote this software. If you use
- it, or only parts of it, in a program, you must acknowledge
- somewhere in your documentation that you have used the
- FreeType code. (`credits')
-
- We specifically permit and encourage the inclusion of this
- software, with or without modifications, in commercial products.
- We disclaim all warranties covering The FreeType Project and
- assume no liability related to The FreeType Project.
-
-
- Finally, many people asked us for a preferred form for a
- credit/disclaimer to use in compliance with this license. We thus
- encourage you to use the following text:
-
- """
- Portions of this software are copyright © <year> The FreeType
- Project (www.freetype.org). All rights reserved.
- """
-
- Please replace <year> with the value from the FreeType version you
- actually use.
-
-
-Legal Terms
-===========
-
-0. Definitions
---------------
-
- Throughout this license, the terms `package', `FreeType Project',
- and `FreeType archive' refer to the set of files originally
- distributed by the authors (David Turner, Robert Wilhelm, and
- Werner Lemberg) as the `FreeType Project', be they named as alpha,
- beta or final release.
-
- `You' refers to the licensee, or person using the project, where
- `using' is a generic term including compiling the project's source
- code as well as linking it to form a `program' or `executable'.
- This program is referred to as `a program using the FreeType
- engine'.
-
- This license applies to all files distributed in the original
- FreeType Project, including all source code, binaries and
- documentation, unless otherwise stated in the file in its
- original, unmodified form as distributed in the original archive.
- If you are unsure whether or not a particular file is covered by
- this license, you must contact us to verify this.
-
- The FreeType Project is copyright (C) 1996-2000 by David Turner,
- Robert Wilhelm, and Werner Lemberg. All rights reserved except as
- specified below.
-
-1. No Warranty
---------------
-
- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
- USE, OF THE FREETYPE PROJECT.
-
-2. Redistribution
------------------
-
- This license grants a worldwide, royalty-free, perpetual and
- irrevocable right and license to use, execute, perform, compile,
- display, copy, create derivative works of, distribute and
- sublicense the FreeType Project (in both source and object code
- forms) and derivative works thereof for any purpose; and to
- authorize others to exercise some or all of the rights granted
- herein, subject to the following conditions:
-
- o Redistribution of source code must retain this license file
- (`FTL.TXT') unaltered; any additions, deletions or changes to
- the original files must be clearly indicated in accompanying
- documentation. The copyright notices of the unaltered,
- original files must be preserved in all copies of source
- files.
-
- o Redistribution in binary form must provide a disclaimer that
- states that the software is based in part of the work of the
- FreeType Team, in the distribution documentation. We also
- encourage you to put an URL to the FreeType web page in your
- documentation, though this isn't mandatory.
-
- These conditions apply to any software derived from or based on
- the FreeType Project, not just the unmodified files. If you use
- our work, you must acknowledge us. However, no fee need be paid
- to us.
-
-3. Advertising
---------------
-
- Neither the FreeType authors and contributors nor you shall use
- the name of the other for commercial, advertising, or promotional
- purposes without specific prior written permission.
-
- We suggest, but do not require, that you use one or more of the
- following phrases to refer to this software in your documentation
- or advertising materials: `FreeType Project', `FreeType Engine',
- `FreeType library', or `FreeType Distribution'.
-
- As you have not signed this license, you are not required to
- accept it. However, as the FreeType Project is copyrighted
- material, only this license, or another one contracted with the
- authors, grants you the right to use, distribute, and modify it.
- Therefore, by using, distributing, or modifying the FreeType
- Project, you indicate that you understand and accept all the terms
- of this license.
-
-4. Contacts
------------
-
- There are two mailing lists related to FreeType:
-
- o freetype@nongnu.org
-
- Discusses general use and applications of FreeType, as well as
- future and wanted additions to the library and distribution.
- If you are looking for support, start in this list if you
- haven't found anything to help you in the documentation.
-
- o freetype-devel@nongnu.org
-
- Discusses bugs, as well as engine internals, design issues,
- specific licenses, porting, etc.
-
- Our home page can be found at
-
- http://www.freetype.org
-
-
---- end of FTL.TXT ---
diff --git a/vendor/github.com/golang/freetype/licenses/gpl.txt b/vendor/github.com/golang/freetype/licenses/gpl.txt
deleted file mode 100644
index b2fe7b6af..000000000
--- a/vendor/github.com/golang/freetype/licenses/gpl.txt
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/vendor/github.com/golang/freetype/testdata/README b/vendor/github.com/golang/freetype/testdata/README
deleted file mode 100644
index bae438269..000000000
--- a/vendor/github.com/golang/freetype/testdata/README
+++ /dev/null
@@ -1,13 +0,0 @@
-The luxi*.ttf and COPYING files in this directory were copied from the X.org
-project, specifically
-http://xorg.freedesktop.org/releases/individual/font/font-bh-ttf-1.0.0.tar.bz2
-
-There are three Luxi fonts: sans (s), serif (r) and monospaced (m). For example,
-luxisr.ttf is Luxi Sans. The 'r' here means regular, as opposed to bold.
-
-The *.ttx files in this directory were generated from the *.ttf files
-by the ttx command-line tool.
-http://www.letterror.com/code/ttx/index.html
-
-The *-hinting.txt files in this directory were generated from the *.ttf files
-by the ../cmd/print-glyph-points command-line tool.
diff --git a/vendor/github.com/golang/freetype/testdata/luximr.ttf b/vendor/github.com/golang/freetype/testdata/luximr.ttf
deleted file mode 100644
index 6ad6e1266..000000000
--- a/vendor/github.com/golang/freetype/testdata/luximr.ttf
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/golang/freetype/testdata/luximr.ttx b/vendor/github.com/golang/freetype/testdata/luximr.ttx
deleted file mode 100644
index e60ebca45..000000000
--- a/vendor/github.com/golang/freetype/testdata/luximr.ttx
+++ /dev/null
@@ -1,24616 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.4">
-
- <GlyphOrder>
- <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
- <GlyphID id="0" name=".notdef"/>
- <GlyphID id="1" name=".notdef#1"/>
- <GlyphID id="2" name=".notdef#2"/>
- <GlyphID id="3" name="space"/>
- <GlyphID id="4" name="exclam"/>
- <GlyphID id="5" name="quotedbl"/>
- <GlyphID id="6" name="numbersign"/>
- <GlyphID id="7" name="dollar"/>
- <GlyphID id="8" name="percent"/>
- <GlyphID id="9" name="ampersand"/>
- <GlyphID id="10" name="quotesingle"/>
- <GlyphID id="11" name="parenleft"/>
- <GlyphID id="12" name="parenright"/>
- <GlyphID id="13" name="asterisk"/>
- <GlyphID id="14" name="plus"/>
- <GlyphID id="15" name="comma"/>
- <GlyphID id="16" name="hyphen"/>
- <GlyphID id="17" name="period"/>
- <GlyphID id="18" name="slash"/>
- <GlyphID id="19" name="zero"/>
- <GlyphID id="20" name="one"/>
- <GlyphID id="21" name="two"/>
- <GlyphID id="22" name="three"/>
- <GlyphID id="23" name="four"/>
- <GlyphID id="24" name="five"/>
- <GlyphID id="25" name="six"/>
- <GlyphID id="26" name="seven"/>
- <GlyphID id="27" name="eight"/>
- <GlyphID id="28" name="nine"/>
- <GlyphID id="29" name="colon"/>
- <GlyphID id="30" name="semicolon"/>
- <GlyphID id="31" name="less"/>
- <GlyphID id="32" name="equal"/>
- <GlyphID id="33" name="greater"/>
- <GlyphID id="34" name="question"/>
- <GlyphID id="35" name="at"/>
- <GlyphID id="36" name="A"/>
- <GlyphID id="37" name="B"/>
- <GlyphID id="38" name="C"/>
- <GlyphID id="39" name="D"/>
- <GlyphID id="40" name="E"/>
- <GlyphID id="41" name="F"/>
- <GlyphID id="42" name="G"/>
- <GlyphID id="43" name="H"/>
- <GlyphID id="44" name="I"/>
- <GlyphID id="45" name="J"/>
- <GlyphID id="46" name="K"/>
- <GlyphID id="47" name="L"/>
- <GlyphID id="48" name="M"/>
- <GlyphID id="49" name="N"/>
- <GlyphID id="50" name="O"/>
- <GlyphID id="51" name="P"/>
- <GlyphID id="52" name="Q"/>
- <GlyphID id="53" name="R"/>
- <GlyphID id="54" name="S"/>
- <GlyphID id="55" name="T"/>
- <GlyphID id="56" name="U"/>
- <GlyphID id="57" name="V"/>
- <GlyphID id="58" name="W"/>
- <GlyphID id="59" name="X"/>
- <GlyphID id="60" name="Y"/>
- <GlyphID id="61" name="Z"/>
- <GlyphID id="62" name="bracketleft"/>
- <GlyphID id="63" name="backslash"/>
- <GlyphID id="64" name="bracketright"/>
- <GlyphID id="65" name="asciicircum"/>
- <GlyphID id="66" name="underscore"/>
- <GlyphID id="67" name="grave"/>
- <GlyphID id="68" name="a"/>
- <GlyphID id="69" name="b"/>
- <GlyphID id="70" name="c"/>
- <GlyphID id="71" name="d"/>
- <GlyphID id="72" name="e"/>
- <GlyphID id="73" name="f"/>
- <GlyphID id="74" name="g"/>
- <GlyphID id="75" name="h"/>
- <GlyphID id="76" name="i"/>
- <GlyphID id="77" name="j"/>
- <GlyphID id="78" name="k"/>
- <GlyphID id="79" name="l"/>
- <GlyphID id="80" name="m"/>
- <GlyphID id="81" name="n"/>
- <GlyphID id="82" name="o"/>
- <GlyphID id="83" name="p"/>
- <GlyphID id="84" name="q"/>
- <GlyphID id="85" name="r"/>
- <GlyphID id="86" name="s"/>
- <GlyphID id="87" name="t"/>
- <GlyphID id="88" name="u"/>
- <GlyphID id="89" name="v"/>
- <GlyphID id="90" name="w"/>
- <GlyphID id="91" name="x"/>
- <GlyphID id="92" name="y"/>
- <GlyphID id="93" name="z"/>
- <GlyphID id="94" name="braceleft"/>
- <GlyphID id="95" name="bar"/>
- <GlyphID id="96" name="braceright"/>
- <GlyphID id="97" name="asciitilde"/>
- <GlyphID id="98" name="Adieresis"/>
- <GlyphID id="99" name="Aring"/>
- <GlyphID id="100" name="Ccedilla"/>
- <GlyphID id="101" name="Eacute"/>
- <GlyphID id="102" name="Ntilde"/>
- <GlyphID id="103" name="Odieresis"/>
- <GlyphID id="104" name="Udieresis"/>
- <GlyphID id="105" name="aacute"/>
- <GlyphID id="106" name="agrave"/>
- <GlyphID id="107" name="acircumflex"/>
- <GlyphID id="108" name="adieresis"/>
- <GlyphID id="109" name="atilde"/>
- <GlyphID id="110" name="aring"/>
- <GlyphID id="111" name="ccedilla"/>
- <GlyphID id="112" name="eacute"/>
- <GlyphID id="113" name="egrave"/>
- <GlyphID id="114" name="ecircumflex"/>
- <GlyphID id="115" name="edieresis"/>
- <GlyphID id="116" name="iacute"/>
- <GlyphID id="117" name="igrave"/>
- <GlyphID id="118" name="icircumflex"/>
- <GlyphID id="119" name="idieresis"/>
- <GlyphID id="120" name="ntilde"/>
- <GlyphID id="121" name="oacute"/>
- <GlyphID id="122" name="ograve"/>
- <GlyphID id="123" name="ocircumflex"/>
- <GlyphID id="124" name="odieresis"/>
- <GlyphID id="125" name="otilde"/>
- <GlyphID id="126" name="uacute"/>
- <GlyphID id="127" name="ugrave"/>
- <GlyphID id="128" name="ucircumflex"/>
- <GlyphID id="129" name="udieresis"/>
- <GlyphID id="130" name="dagger"/>
- <GlyphID id="131" name="degree"/>
- <GlyphID id="132" name="cent"/>
- <GlyphID id="133" name="sterling"/>
- <GlyphID id="134" name="section"/>
- <GlyphID id="135" name="bullet"/>
- <GlyphID id="136" name="paragraph"/>
- <GlyphID id="137" name="germandbls"/>
- <GlyphID id="138" name="registered"/>
- <GlyphID id="139" name="copyright"/>
- <GlyphID id="140" name="trademark"/>
- <GlyphID id="141" name="acute"/>
- <GlyphID id="142" name="dieresis"/>
- <GlyphID id="143" name=".notdef#3"/>
- <GlyphID id="144" name="AE"/>
- <GlyphID id="145" name="Oslash"/>
- <GlyphID id="146" name=".notdef#4"/>
- <GlyphID id="147" name="plusminus"/>
- <GlyphID id="148" name=".notdef#5"/>
- <GlyphID id="149" name=".notdef#6"/>
- <GlyphID id="150" name="yen"/>
- <GlyphID id="151" name="mu"/>
- <GlyphID id="152" name=".notdef#7"/>
- <GlyphID id="153" name=".notdef#8"/>
- <GlyphID id="154" name=".notdef#9"/>
- <GlyphID id="155" name=".notdef#10"/>
- <GlyphID id="156" name=".notdef#11"/>
- <GlyphID id="157" name="ordfeminine"/>
- <GlyphID id="158" name="ordmasculine"/>
- <GlyphID id="159" name=".notdef#12"/>
- <GlyphID id="160" name="ae"/>
- <GlyphID id="161" name="oslash"/>
- <GlyphID id="162" name="questiondown"/>
- <GlyphID id="163" name="exclamdown"/>
- <GlyphID id="164" name="logicalnot"/>
- <GlyphID id="165" name=".notdef#13"/>
- <GlyphID id="166" name="florin"/>
- <GlyphID id="167" name=".notdef#14"/>
- <GlyphID id="168" name=".notdef#15"/>
- <GlyphID id="169" name="guillemotleft"/>
- <GlyphID id="170" name="guillemotright"/>
- <GlyphID id="171" name="ellipsis"/>
- <GlyphID id="172" name=".notdef#16"/>
- <GlyphID id="173" name="Agrave"/>
- <GlyphID id="174" name="Atilde"/>
- <GlyphID id="175" name="Otilde"/>
- <GlyphID id="176" name="OE"/>
- <GlyphID id="177" name="oe"/>
- <GlyphID id="178" name="endash"/>
- <GlyphID id="179" name="emdash"/>
- <GlyphID id="180" name="quotedblleft"/>
- <GlyphID id="181" name="quotedblright"/>
- <GlyphID id="182" name="quoteleft"/>
- <GlyphID id="183" name="quoteright"/>
- <GlyphID id="184" name="divide"/>
- <GlyphID id="185" name=".notdef#17"/>
- <GlyphID id="186" name="ydieresis"/>
- <GlyphID id="187" name="Ydieresis"/>
- <GlyphID id="188" name="fraction"/>
- <GlyphID id="189" name="currency"/>
- <GlyphID id="190" name="guilsinglleft"/>
- <GlyphID id="191" name="guilsinglright"/>
- <GlyphID id="192" name="fi"/>
- <GlyphID id="193" name="fl"/>
- <GlyphID id="194" name="daggerdbl"/>
- <GlyphID id="195" name="periodcentered"/>
- <GlyphID id="196" name="quotesinglbase"/>
- <GlyphID id="197" name="quotedblbase"/>
- <GlyphID id="198" name="perthousand"/>
- <GlyphID id="199" name="Acircumflex"/>
- <GlyphID id="200" name="Ecircumflex"/>
- <GlyphID id="201" name="Aacute"/>
- <GlyphID id="202" name="Edieresis"/>
- <GlyphID id="203" name="Egrave"/>
- <GlyphID id="204" name="Iacute"/>
- <GlyphID id="205" name="Icircumflex"/>
- <GlyphID id="206" name="Idieresis"/>
- <GlyphID id="207" name="Igrave"/>
- <GlyphID id="208" name="Oacute"/>
- <GlyphID id="209" name="Ocircumflex"/>
- <GlyphID id="210" name="Euro"/>
- <GlyphID id="211" name="Ograve"/>
- <GlyphID id="212" name="Uacute"/>
- <GlyphID id="213" name="Ucircumflex"/>
- <GlyphID id="214" name="Ugrave"/>
- <GlyphID id="215" name="dotlessi"/>
- <GlyphID id="216" name="circumflex"/>
- <GlyphID id="217" name="tilde"/>
- <GlyphID id="218" name="macron"/>
- <GlyphID id="219" name="breve"/>
- <GlyphID id="220" name="dotaccent"/>
- <GlyphID id="221" name="ring"/>
- <GlyphID id="222" name="cedilla"/>
- <GlyphID id="223" name="hungarumlaut"/>
- <GlyphID id="224" name="ogonek"/>
- <GlyphID id="225" name="caron"/>
- <GlyphID id="226" name="Euro#1"/>
- <GlyphID id="227" name="nonbreakingspace"/>
- <GlyphID id="228" name="brokenbar"/>
- <GlyphID id="229" name="sfthyphen"/>
- <GlyphID id="230" name="macron#1"/>
- <GlyphID id="231" name="twosuperior"/>
- <GlyphID id="232" name="threesuperior"/>
- <GlyphID id="233" name="periodcentered#1"/>
- <GlyphID id="234" name="onesuperior"/>
- <GlyphID id="235" name="onequarter"/>
- <GlyphID id="236" name="onehalf"/>
- <GlyphID id="237" name="threequarters"/>
- <GlyphID id="238" name="Eth"/>
- <GlyphID id="239" name="multiply"/>
- <GlyphID id="240" name="Yacute"/>
- <GlyphID id="241" name="Thorn"/>
- <GlyphID id="242" name="eth"/>
- <GlyphID id="243" name="yacute"/>
- <GlyphID id="244" name="thorn"/>
- <GlyphID id="245" name="Amacron"/>
- <GlyphID id="246" name="amacron"/>
- <GlyphID id="247" name="Abreve"/>
- <GlyphID id="248" name="abreve"/>
- <GlyphID id="249" name="Aogonek"/>
- <GlyphID id="250" name="aogonek"/>
- <GlyphID id="251" name="Cacute"/>
- <GlyphID id="252" name="cacute"/>
- <GlyphID id="253" name="Ccircumflex"/>
- <GlyphID id="254" name="ccircumflex"/>
- <GlyphID id="255" name="Cdotaccent"/>
- <GlyphID id="256" name="cdotaccent"/>
- <GlyphID id="257" name="Ccaron"/>
- <GlyphID id="258" name="ccaron"/>
- <GlyphID id="259" name="Dcaron"/>
- <GlyphID id="260" name="dcaron"/>
- <GlyphID id="261" name="Dcroat"/>
- <GlyphID id="262" name="dcroat"/>
- <GlyphID id="263" name="Emacron"/>
- <GlyphID id="264" name="emacron"/>
- <GlyphID id="265" name="Ebreve"/>
- <GlyphID id="266" name="ebreve"/>
- <GlyphID id="267" name="Edotaccent"/>
- <GlyphID id="268" name="edotaccent"/>
- <GlyphID id="269" name="Eogonek"/>
- <GlyphID id="270" name="eogonek"/>
- <GlyphID id="271" name="Ecaron"/>
- <GlyphID id="272" name="ecaron"/>
- <GlyphID id="273" name="Gcircumflex"/>
- <GlyphID id="274" name="gcircumflex"/>
- <GlyphID id="275" name="Gbreve"/>
- <GlyphID id="276" name="gbreve"/>
- <GlyphID id="277" name="Gdotaccent"/>
- <GlyphID id="278" name="gdotaccent"/>
- <GlyphID id="279" name="Gcommaaccent"/>
- <GlyphID id="280" name="gcommaaccent"/>
- <GlyphID id="281" name="Hcircumflex"/>
- <GlyphID id="282" name="hcircumflex"/>
- <GlyphID id="283" name="Hbar"/>
- <GlyphID id="284" name="hbar"/>
- <GlyphID id="285" name="Itilde"/>
- <GlyphID id="286" name="itilde"/>
- <GlyphID id="287" name="Imacron"/>
- <GlyphID id="288" name="imacron"/>
- <GlyphID id="289" name="Ibreve"/>
- <GlyphID id="290" name="ibreve"/>
- <GlyphID id="291" name="Iogonek"/>
- <GlyphID id="292" name="iogonek"/>
- <GlyphID id="293" name="Idotaccent"/>
- <GlyphID id="294" name="IJ"/>
- <GlyphID id="295" name="ij"/>
- <GlyphID id="296" name="Jcircumflex"/>
- <GlyphID id="297" name="jcircumflex"/>
- <GlyphID id="298" name="Kcommaaccent"/>
- <GlyphID id="299" name="kcommaaccent"/>
- <GlyphID id="300" name="kgreenlandic"/>
- <GlyphID id="301" name="Lacute"/>
- <GlyphID id="302" name="lacute"/>
- <GlyphID id="303" name="Lcommaaccent"/>
- <GlyphID id="304" name="lcommaaccent"/>
- <GlyphID id="305" name="Lcaron"/>
- <GlyphID id="306" name="lcaron"/>
- <GlyphID id="307" name="Ldot"/>
- <GlyphID id="308" name="ldot"/>
- <GlyphID id="309" name="Lslash"/>
- <GlyphID id="310" name="lslash"/>
- <GlyphID id="311" name="Nacute"/>
- <GlyphID id="312" name="nacute"/>
- <GlyphID id="313" name="Ncommaaccent"/>
- <GlyphID id="314" name="ncommaaccent"/>
- <GlyphID id="315" name="Ncaron"/>
- <GlyphID id="316" name="ncaron"/>
- <GlyphID id="317" name="napostrophe"/>
- <GlyphID id="318" name="Eng"/>
- <GlyphID id="319" name="eng"/>
- <GlyphID id="320" name="Omacron"/>
- <GlyphID id="321" name="omacron"/>
- <GlyphID id="322" name="Obreve"/>
- <GlyphID id="323" name="obreve"/>
- <GlyphID id="324" name="Ohungarumlaut"/>
- <GlyphID id="325" name="ohungarumlaut"/>
- <GlyphID id="326" name="Racute"/>
- <GlyphID id="327" name="racute"/>
- <GlyphID id="328" name="Rcommaaccent"/>
- <GlyphID id="329" name="rcommaaccent"/>
- <GlyphID id="330" name="Rcaron"/>
- <GlyphID id="331" name="rcaron"/>
- <GlyphID id="332" name="Sacute"/>
- <GlyphID id="333" name="sacute"/>
- <GlyphID id="334" name="Scircumflex"/>
- <GlyphID id="335" name="scircumflex"/>
- <GlyphID id="336" name="Scedilla"/>
- <GlyphID id="337" name="scedilla"/>
- <GlyphID id="338" name="Scaron"/>
- <GlyphID id="339" name="scaron"/>
- <GlyphID id="340" name="Tcommaaccent"/>
- <GlyphID id="341" name="tcommaaccent"/>
- <GlyphID id="342" name="Tcaron"/>
- <GlyphID id="343" name="tcaron"/>
- <GlyphID id="344" name="Tbar"/>
- <GlyphID id="345" name="tbar"/>
- <GlyphID id="346" name="Utilde"/>
- <GlyphID id="347" name="utilde"/>
- <GlyphID id="348" name="Umacron"/>
- <GlyphID id="349" name="umacron"/>
- <GlyphID id="350" name="Ubreve"/>
- <GlyphID id="351" name="ubreve"/>
- <GlyphID id="352" name="Uring"/>
- <GlyphID id="353" name="uring"/>
- <GlyphID id="354" name="Uhungarumlaut"/>
- <GlyphID id="355" name="uhungarumlaut"/>
- <GlyphID id="356" name="Uogonek"/>
- <GlyphID id="357" name="uogonek"/>
- <GlyphID id="358" name="Wcircumflex"/>
- <GlyphID id="359" name="wcircumflex"/>
- <GlyphID id="360" name="Ycircumflex"/>
- <GlyphID id="361" name="ycircumflex"/>
- <GlyphID id="362" name="Zacute"/>
- <GlyphID id="363" name="zacute"/>
- <GlyphID id="364" name="Zdotaccent"/>
- <GlyphID id="365" name="zdotaccent"/>
- <GlyphID id="366" name="Zcaron"/>
- <GlyphID id="367" name="zcaron"/>
- <GlyphID id="368" name="longs"/>
- <GlyphID id="369" name="Scommaaccent"/>
- <GlyphID id="370" name="scommaaccent"/>
- <GlyphID id="371" name="Tcommabelow"/>
- <GlyphID id="372" name="tcommabelow"/>
- <GlyphID id="373" name="Unterkomma"/>
- <GlyphID id="374" name="semicolon#1"/>
- <GlyphID id="375" name="anoteleia"/>
- <GlyphID id="376" name="hyphen#1"/>
- <GlyphID id="377" name="nbhyphen"/>
- <GlyphID id="378" name="figuredash"/>
- <GlyphID id="379" name="afii00208"/>
- <GlyphID id="380" name="quotereversed"/>
- <GlyphID id="381" name="radicalex"/>
- <GlyphID id="382" name="estimated"/>
- <GlyphID id="383" name="minus"/>
- <GlyphID id="384" name="fraction#1"/>
- <GlyphID id="385" name="dotmath"/>
- <GlyphID id="386" name="fi#1"/>
- <GlyphID id="387" name="fl#1"/>
- <GlyphID id="388" name="foursuperiour"/>
- <GlyphID id="389" name="onesuperiour"/>
- <GlyphID id="390" name="twosuperiour"/>
- <GlyphID id="391" name="threesuperiour"/>
- <GlyphID id="392" name="foursuperiour#1"/>
- <GlyphID id="393" name="dotlessj"/>
- <GlyphID id="394" name=".notdef#18"/>
- </GlyphOrder>
-
- <head>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="1.0"/>
- <fontRevision value="1.19999694824"/>
- <checkSumAdjustment value="0x4e0d8101"/>
- <magicNumber value="0x5f0f3cf5"/>
- <flags value="00000000 00001111"/>
- <unitsPerEm value="2048"/>
- <created value="Fri Oct 12 14:05:57 2001"/>
- <modified value="Fri Oct 12 10:47:54 2001"/>
- <xMin value="0"/>
- <yMin value="-432"/>
- <xMax value="1229"/>
- <yMax value="2033"/>
- <macStyle value="00000000 00000000"/>
- <lowestRecPPEM value="12"/>
- <fontDirectionHint value="2"/>
- <indexToLocFormat value="0"/>
- <glyphDataFormat value="0"/>
- </head>
-
- <hhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="-432"/>
- <lineGap value="0"/>
- <advanceWidthMax value="1229"/>
- <minLeftSideBearing value="0"/>
- <minRightSideBearing value="0"/>
- <xMaxExtent value="1229"/>
- <caretSlopeRise value="1"/>
- <caretSlopeRun value="0"/>
- <caretOffset value="0"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfHMetrics value="395"/>
- </hhea>
-
- <maxp>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="0x10000"/>
- <numGlyphs value="395"/>
- <maxPoints value="79"/>
- <maxContours value="7"/>
- <maxCompositePoints value="85"/>
- <maxCompositeContours value="4"/>
- <maxZones value="2"/>
- <maxTwilightPoints value="4"/>
- <maxStorage value="0"/>
- <maxFunctionDefs value="15"/>
- <maxInstructionDefs value="0"/>
- <maxStackElements value="2048"/>
- <maxSizeOfInstructions value="197"/>
- <maxComponentElements value="2"/>
- <maxComponentDepth value="1"/>
- </maxp>
-
- <OS_2>
- <version value="2"/>
- <xAvgCharWidth value="1229"/>
- <usWeightClass value="400"/>
- <usWidthClass value="5"/>
- <fsType value="00000000 00000000"/>
- <ySubscriptXSize value="1434"/>
- <ySubscriptYSize value="1331"/>
- <ySubscriptXOffset value="0"/>
- <ySubscriptYOffset value="283"/>
- <ySuperscriptXSize value="1434"/>
- <ySuperscriptYSize value="1331"/>
- <ySuperscriptXOffset value="0"/>
- <ySuperscriptYOffset value="977"/>
- <yStrikeoutSize value="0"/>
- <yStrikeoutPosition value="0"/>
- <sFamilyClass value="1285"/>
- <panose>
- <bFamilyType value="2"/>
- <bSerifStyle value="6"/>
- <bWeight value="6"/>
- <bProportion value="9"/>
- <bContrast value="5"/>
- <bStrokeVariation value="0"/>
- <bArmStyle value="0"/>
- <bLetterForm value="0"/>
- <bMidline value="0"/>
- <bXHeight value="0"/>
- </panose>
- <ulUnicodeRange1 value="00000000 00000000 00000000 00000111"/>
- <ulUnicodeRange2 value="00000000 00000000 00000000 00000010"/>
- <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
- <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
- <achVendID value="B&amp;H "/>
- <fsSelection value="00000000 01000000"/>
- <fsFirstCharIndex value="32"/>
- <fsLastCharIndex value="64258"/>
- <sTypoAscender value="1604"/>
- <sTypoDescender value="-420"/>
- <sTypoLineGap value="167"/>
- <usWinAscent value="1935"/>
- <usWinDescent value="432"/>
- <ulCodePageRange1 value="00000000 00000000 00000000 10010011"/>
- <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
- <sxHeight value="0"/>
- <sCapHeight value="0"/>
- <usDefaultChar value="0"/>
- <usBreakChar value="0"/>
- <usMaxContex value="0"/>
- </OS_2>
-
- <hmtx>
- <mtx name=".notdef" width="1229" lsb="123"/>
- <mtx name=".notdef#1" width="0" lsb="0"/>
- <mtx name=".notdef#10" width="1229" lsb="0"/>
- <mtx name=".notdef#11" width="1229" lsb="0"/>
- <mtx name=".notdef#12" width="1229" lsb="0"/>
- <mtx name=".notdef#13" width="1229" lsb="0"/>
- <mtx name=".notdef#14" width="1229" lsb="0"/>
- <mtx name=".notdef#15" width="1229" lsb="0"/>
- <mtx name=".notdef#16" width="1229" lsb="0"/>
- <mtx name=".notdef#17" width="1229" lsb="0"/>
- <mtx name=".notdef#18" width="1229" lsb="0"/>
- <mtx name=".notdef#2" width="1229" lsb="0"/>
- <mtx name=".notdef#3" width="1229" lsb="0"/>
- <mtx name=".notdef#4" width="1229" lsb="0"/>
- <mtx name=".notdef#5" width="1229" lsb="0"/>
- <mtx name=".notdef#6" width="1229" lsb="0"/>
- <mtx name=".notdef#7" width="1229" lsb="0"/>
- <mtx name=".notdef#8" width="1229" lsb="0"/>
- <mtx name=".notdef#9" width="1229" lsb="0"/>
- <mtx name="A" width="1229" lsb="25"/>
- <mtx name="AE" width="1229" lsb="12"/>
- <mtx name="Aacute" width="1229" lsb="25"/>
- <mtx name="Abreve" width="1229" lsb="25"/>
- <mtx name="Acircumflex" width="1229" lsb="25"/>
- <mtx name="Adieresis" width="1229" lsb="25"/>
- <mtx name="Agrave" width="1229" lsb="25"/>
- <mtx name="Amacron" width="1229" lsb="25"/>
- <mtx name="Aogonek" width="1229" lsb="25"/>
- <mtx name="Aring" width="1229" lsb="25"/>
- <mtx name="Atilde" width="1229" lsb="25"/>
- <mtx name="B" width="1229" lsb="74"/>
- <mtx name="C" width="1229" lsb="123"/>
- <mtx name="Cacute" width="1229" lsb="123"/>
- <mtx name="Ccaron" width="1229" lsb="123"/>
- <mtx name="Ccedilla" width="1229" lsb="123"/>
- <mtx name="Ccircumflex" width="1229" lsb="123"/>
- <mtx name="Cdotaccent" width="1229" lsb="123"/>
- <mtx name="D" width="1229" lsb="49"/>
- <mtx name="Dcaron" width="1229" lsb="49"/>
- <mtx name="Dcroat" width="1229" lsb="49"/>
- <mtx name="E" width="1229" lsb="74"/>
- <mtx name="Eacute" width="1229" lsb="74"/>
- <mtx name="Ebreve" width="1229" lsb="74"/>
- <mtx name="Ecaron" width="1229" lsb="74"/>
- <mtx name="Ecircumflex" width="1229" lsb="74"/>
- <mtx name="Edieresis" width="1229" lsb="74"/>
- <mtx name="Edotaccent" width="1229" lsb="74"/>
- <mtx name="Egrave" width="1229" lsb="74"/>
- <mtx name="Emacron" width="1229" lsb="74"/>
- <mtx name="Eng" width="1229" lsb="74"/>
- <mtx name="Eogonek" width="1229" lsb="74"/>
- <mtx name="Eth" width="1229" lsb="49"/>
- <mtx name="Euro" width="1229" lsb="6"/>
- <mtx name="Euro#1" width="1229" lsb="6"/>
- <mtx name="F" width="1229" lsb="111"/>
- <mtx name="G" width="1229" lsb="74"/>
- <mtx name="Gbreve" width="1229" lsb="74"/>
- <mtx name="Gcircumflex" width="1229" lsb="74"/>
- <mtx name="Gcommaaccent" width="1229" lsb="74"/>
- <mtx name="Gdotaccent" width="1229" lsb="74"/>
- <mtx name="H" width="1229" lsb="62"/>
- <mtx name="Hbar" width="1229" lsb="37"/>
- <mtx name="Hcircumflex" width="1229" lsb="62"/>
- <mtx name="I" width="1229" lsb="160"/>
- <mtx name="IJ" width="1229" lsb="45"/>
- <mtx name="Iacute" width="1229" lsb="160"/>
- <mtx name="Ibreve" width="1229" lsb="160"/>
- <mtx name="Icircumflex" width="1229" lsb="160"/>
- <mtx name="Idieresis" width="1229" lsb="160"/>
- <mtx name="Idotaccent" width="1229" lsb="160"/>
- <mtx name="Igrave" width="1229" lsb="160"/>
- <mtx name="Imacron" width="1229" lsb="160"/>
- <mtx name="Iogonek" width="1229" lsb="160"/>
- <mtx name="Itilde" width="1229" lsb="160"/>
- <mtx name="J" width="1229" lsb="111"/>
- <mtx name="Jcircumflex" width="1229" lsb="111"/>
- <mtx name="K" width="1229" lsb="74"/>
- <mtx name="Kcommaaccent" width="1229" lsb="74"/>
- <mtx name="L" width="1229" lsb="86"/>
- <mtx name="Lacute" width="1229" lsb="86"/>
- <mtx name="Lcaron" width="1229" lsb="86"/>
- <mtx name="Lcommaaccent" width="1229" lsb="86"/>
- <mtx name="Ldot" width="1229" lsb="86"/>
- <mtx name="Lslash" width="1229" lsb="86"/>
- <mtx name="M" width="1229" lsb="25"/>
- <mtx name="N" width="1229" lsb="74"/>
- <mtx name="Nacute" width="1229" lsb="74"/>
- <mtx name="Ncaron" width="1229" lsb="74"/>
- <mtx name="Ncommaaccent" width="1229" lsb="74"/>
- <mtx name="Ntilde" width="1229" lsb="74"/>
- <mtx name="O" width="1229" lsb="62"/>
- <mtx name="OE" width="1229" lsb="37"/>
- <mtx name="Oacute" width="1229" lsb="62"/>
- <mtx name="Obreve" width="1229" lsb="62"/>
- <mtx name="Ocircumflex" width="1229" lsb="62"/>
- <mtx name="Odieresis" width="1229" lsb="62"/>
- <mtx name="Ograve" width="1229" lsb="62"/>
- <mtx name="Ohungarumlaut" width="1229" lsb="62"/>
- <mtx name="Omacron" width="1229" lsb="62"/>
- <mtx name="Oslash" width="1229" lsb="62"/>
- <mtx name="Otilde" width="1229" lsb="62"/>
- <mtx name="P" width="1229" lsb="86"/>
- <mtx name="Q" width="1229" lsb="62"/>
- <mtx name="R" width="1229" lsb="86"/>
- <mtx name="Racute" width="1229" lsb="86"/>
- <mtx name="Rcaron" width="1229" lsb="86"/>
- <mtx name="Rcommaaccent" width="1229" lsb="86"/>
- <mtx name="S" width="1229" lsb="151"/>
- <mtx name="Sacute" width="1229" lsb="151"/>
- <mtx name="Scaron" width="1229" lsb="151"/>
- <mtx name="Scedilla" width="1229" lsb="151"/>
- <mtx name="Scircumflex" width="1229" lsb="151"/>
- <mtx name="Scommaaccent" width="1229" lsb="151"/>
- <mtx name="T" width="1229" lsb="62"/>
- <mtx name="Tbar" width="1229" lsb="62"/>
- <mtx name="Tcaron" width="1229" lsb="62"/>
- <mtx name="Tcommaaccent" width="1229" lsb="62"/>
- <mtx name="Tcommabelow" width="1229" lsb="62"/>
- <mtx name="Thorn" width="1229" lsb="86"/>
- <mtx name="U" width="1229" lsb="62"/>
- <mtx name="Uacute" width="1229" lsb="62"/>
- <mtx name="Ubreve" width="1229" lsb="62"/>
- <mtx name="Ucircumflex" width="1229" lsb="62"/>
- <mtx name="Udieresis" width="1229" lsb="62"/>
- <mtx name="Ugrave" width="1229" lsb="62"/>
- <mtx name="Uhungarumlaut" width="1229" lsb="62"/>
- <mtx name="Umacron" width="1229" lsb="62"/>
- <mtx name="Unterkomma" width="1229" lsb="464"/>
- <mtx name="Uogonek" width="1229" lsb="62"/>
- <mtx name="Uring" width="1229" lsb="62"/>
- <mtx name="Utilde" width="1229" lsb="62"/>
- <mtx name="V" width="1229" lsb="26"/>
- <mtx name="W" width="1229" lsb="23"/>
- <mtx name="Wcircumflex" width="1229" lsb="23"/>
- <mtx name="X" width="1229" lsb="49"/>
- <mtx name="Y" width="1229" lsb="27"/>
- <mtx name="Yacute" width="1229" lsb="27"/>
- <mtx name="Ycircumflex" width="1229" lsb="27"/>
- <mtx name="Ydieresis" width="1229" lsb="27"/>
- <mtx name="Z" width="1229" lsb="148"/>
- <mtx name="Zacute" width="1229" lsb="148"/>
- <mtx name="Zcaron" width="1229" lsb="148"/>
- <mtx name="Zdotaccent" width="1229" lsb="148"/>
- <mtx name="a" width="1229" lsb="148"/>
- <mtx name="aacute" width="1229" lsb="148"/>
- <mtx name="abreve" width="1229" lsb="148"/>
- <mtx name="acircumflex" width="1229" lsb="148"/>
- <mtx name="acute" width="1229" lsb="392"/>
- <mtx name="adieresis" width="1229" lsb="148"/>
- <mtx name="ae" width="1229" lsb="37"/>
- <mtx name="afii00208" width="1229" lsb="0"/>
- <mtx name="agrave" width="1229" lsb="148"/>
- <mtx name="amacron" width="1229" lsb="148"/>
- <mtx name="ampersand" width="1229" lsb="57"/>
- <mtx name="anoteleia" width="1229" lsb="491"/>
- <mtx name="aogonek" width="1229" lsb="148"/>
- <mtx name="aring" width="1229" lsb="148"/>
- <mtx name="asciicircum" width="1229" lsb="146"/>
- <mtx name="asciitilde" width="1229" lsb="121"/>
- <mtx name="asterisk" width="1229" lsb="161"/>
- <mtx name="at" width="1229" lsb="87"/>
- <mtx name="atilde" width="1229" lsb="148"/>
- <mtx name="b" width="1229" lsb="62"/>
- <mtx name="backslash" width="1229" lsb="99"/>
- <mtx name="bar" width="1229" lsb="540"/>
- <mtx name="braceleft" width="1229" lsb="183"/>
- <mtx name="braceright" width="1229" lsb="227"/>
- <mtx name="bracketleft" width="1229" lsb="395"/>
- <mtx name="bracketright" width="1229" lsb="291"/>
- <mtx name="breve" width="1229" lsb="269"/>
- <mtx name="brokenbar" width="1229" lsb="540"/>
- <mtx name="bullet" width="1229" lsb="318"/>
- <mtx name="c" width="1229" lsb="148"/>
- <mtx name="cacute" width="1229" lsb="148"/>
- <mtx name="caron" width="1229" lsb="248"/>
- <mtx name="ccaron" width="1229" lsb="148"/>
- <mtx name="ccedilla" width="1229" lsb="148"/>
- <mtx name="ccircumflex" width="1229" lsb="148"/>
- <mtx name="cdotaccent" width="1229" lsb="148"/>
- <mtx name="cedilla" width="1229" lsb="441"/>
- <mtx name="cent" width="1229" lsb="173"/>
- <mtx name="circumflex" width="1229" lsb="248"/>
- <mtx name="colon" width="1229" lsb="466"/>
- <mtx name="comma" width="1229" lsb="466"/>
- <mtx name="copyright" width="1229" lsb="62"/>
- <mtx name="currency" width="1229" lsb="85"/>
- <mtx name="d" width="1229" lsb="111"/>
- <mtx name="dagger" width="1229" lsb="170"/>
- <mtx name="daggerdbl" width="1229" lsb="170"/>
- <mtx name="dcaron" width="1229" lsb="111"/>
- <mtx name="dcroat" width="1229" lsb="111"/>
- <mtx name="degree" width="1229" lsb="318"/>
- <mtx name="dieresis" width="1229" lsb="281"/>
- <mtx name="divide" width="1229" lsb="99"/>
- <mtx name="dollar" width="1229" lsb="143"/>
- <mtx name="dotaccent" width="1229" lsb="516"/>
- <mtx name="dotlessi" width="1229" lsb="148"/>
- <mtx name="dotlessj" width="1229" lsb="159"/>
- <mtx name="dotmath" width="1229" lsb="491"/>
- <mtx name="e" width="1229" lsb="123"/>
- <mtx name="eacute" width="1229" lsb="123"/>
- <mtx name="ebreve" width="1229" lsb="123"/>
- <mtx name="ecaron" width="1229" lsb="123"/>
- <mtx name="ecircumflex" width="1229" lsb="123"/>
- <mtx name="edieresis" width="1229" lsb="123"/>
- <mtx name="edotaccent" width="1229" lsb="123"/>
- <mtx name="egrave" width="1229" lsb="123"/>
- <mtx name="eight" width="1229" lsb="120"/>
- <mtx name="ellipsis" width="1229" lsb="81"/>
- <mtx name="emacron" width="1229" lsb="123"/>
- <mtx name="emdash" width="1229" lsb="0"/>
- <mtx name="endash" width="1229" lsb="121"/>
- <mtx name="eng" width="1229" lsb="69"/>
- <mtx name="eogonek" width="1229" lsb="123"/>
- <mtx name="equal" width="1229" lsb="99"/>
- <mtx name="estimated" width="1229" lsb="123"/>
- <mtx name="eth" width="1229" lsb="111"/>
- <mtx name="exclam" width="1229" lsb="491"/>
- <mtx name="exclamdown" width="1229" lsb="491"/>
- <mtx name="f" width="1229" lsb="148"/>
- <mtx name="fi" width="1229" lsb="69"/>
- <mtx name="fi#1" width="1229" lsb="69"/>
- <mtx name="figuredash" width="1229" lsb="121"/>
- <mtx name="five" width="1229" lsb="249"/>
- <mtx name="fl" width="1229" lsb="69"/>
- <mtx name="fl#1" width="1229" lsb="69"/>
- <mtx name="florin" width="1229" lsb="84"/>
- <mtx name="four" width="1229" lsb="84"/>
- <mtx name="foursuperiour" width="1229" lsb="284"/>
- <mtx name="foursuperiour#1" width="1229" lsb="155"/>
- <mtx name="fraction" width="1229" lsb="155"/>
- <mtx name="fraction#1" width="1229" lsb="155"/>
- <mtx name="g" width="1229" lsb="86"/>
- <mtx name="gbreve" width="1229" lsb="86"/>
- <mtx name="gcircumflex" width="1229" lsb="86"/>
- <mtx name="gcommaaccent" width="1229" lsb="86"/>
- <mtx name="gdotaccent" width="1229" lsb="86"/>
- <mtx name="germandbls" width="1229" lsb="62"/>
- <mtx name="grave" width="1229" lsb="392"/>
- <mtx name="greater" width="1229" lsb="99"/>
- <mtx name="guillemotleft" width="1229" lsb="82"/>
- <mtx name="guillemotright" width="1229" lsb="123"/>
- <mtx name="guilsinglleft" width="1229" lsb="234"/>
- <mtx name="guilsinglright" width="1229" lsb="283"/>
- <mtx name="h" width="1229" lsb="69"/>
- <mtx name="hbar" width="1229" lsb="69"/>
- <mtx name="hcircumflex" width="1229" lsb="69"/>
- <mtx name="hungarumlaut" width="1229" lsb="223"/>
- <mtx name="hyphen" width="1229" lsb="148"/>
- <mtx name="hyphen#1" width="1229" lsb="148"/>
- <mtx name="i" width="1229" lsb="148"/>
- <mtx name="iacute" width="1229" lsb="148"/>
- <mtx name="ibreve" width="1229" lsb="148"/>
- <mtx name="icircumflex" width="1229" lsb="148"/>
- <mtx name="idieresis" width="1229" lsb="148"/>
- <mtx name="igrave" width="1229" lsb="148"/>
- <mtx name="ij" width="1229" lsb="57"/>
- <mtx name="imacron" width="1229" lsb="148"/>
- <mtx name="iogonek" width="1229" lsb="148"/>
- <mtx name="itilde" width="1229" lsb="148"/>
- <mtx name="j" width="1229" lsb="159"/>
- <mtx name="jcircumflex" width="1229" lsb="159"/>
- <mtx name="k" width="1229" lsb="74"/>
- <mtx name="kcommaaccent" width="1229" lsb="74"/>
- <mtx name="kgreenlandic" width="1229" lsb="74"/>
- <mtx name="l" width="1229" lsb="148"/>
- <mtx name="lacute" width="1229" lsb="148"/>
- <mtx name="lcaron" width="1229" lsb="123"/>
- <mtx name="lcommaaccent" width="1229" lsb="148"/>
- <mtx name="ldot" width="1229" lsb="123"/>
- <mtx name="less" width="1229" lsb="99"/>
- <mtx name="logicalnot" width="1229" lsb="99"/>
- <mtx name="longs" width="1229" lsb="148"/>
- <mtx name="lslash" width="1229" lsb="148"/>
- <mtx name="m" width="1229" lsb="26"/>
- <mtx name="macron" width="1229" lsb="269"/>
- <mtx name="macron#1" width="1229" lsb="0"/>
- <mtx name="minus" width="1229" lsb="99"/>
- <mtx name="mu" width="1229" lsb="68"/>
- <mtx name="multiply" width="1229" lsb="99"/>
- <mtx name="n" width="1229" lsb="69"/>
- <mtx name="nacute" width="1229" lsb="69"/>
- <mtx name="napostrophe" width="1229" lsb="8"/>
- <mtx name="nbhyphen" width="1229" lsb="148"/>
- <mtx name="ncaron" width="1229" lsb="69"/>
- <mtx name="ncommaaccent" width="1229" lsb="69"/>
- <mtx name="nine" width="1229" lsb="96"/>
- <mtx name="nonbreakingspace" width="1229" lsb="0"/>
- <mtx name="ntilde" width="1229" lsb="69"/>
- <mtx name="numbersign" width="1229" lsb="41"/>
- <mtx name="o" width="1229" lsb="111"/>
- <mtx name="oacute" width="1229" lsb="111"/>
- <mtx name="obreve" width="1229" lsb="111"/>
- <mtx name="ocircumflex" width="1229" lsb="111"/>
- <mtx name="odieresis" width="1229" lsb="111"/>
- <mtx name="oe" width="1229" lsb="49"/>
- <mtx name="ogonek" width="1229" lsb="444"/>
- <mtx name="ograve" width="1229" lsb="111"/>
- <mtx name="ohungarumlaut" width="1229" lsb="111"/>
- <mtx name="omacron" width="1229" lsb="111"/>
- <mtx name="one" width="1229" lsb="112"/>
- <mtx name="onehalf" width="1229" lsb="43"/>
- <mtx name="onequarter" width="1229" lsb="43"/>
- <mtx name="onesuperior" width="1229" lsb="266"/>
- <mtx name="onesuperiour" width="1229" lsb="407"/>
- <mtx name="ordfeminine" width="1229" lsb="136"/>
- <mtx name="ordmasculine" width="1229" lsb="148"/>
- <mtx name="oslash" width="1229" lsb="111"/>
- <mtx name="otilde" width="1229" lsb="111"/>
- <mtx name="p" width="1229" lsb="62"/>
- <mtx name="paragraph" width="1229" lsb="100"/>
- <mtx name="parenleft" width="1229" lsb="321"/>
- <mtx name="parenright" width="1229" lsb="247"/>
- <mtx name="percent" width="1229" lsb="21"/>
- <mtx name="period" width="1229" lsb="466"/>
- <mtx name="periodcentered" width="1229" lsb="491"/>
- <mtx name="periodcentered#1" width="1229" lsb="491"/>
- <mtx name="perthousand" width="1229" lsb="12"/>
- <mtx name="plus" width="1229" lsb="99"/>
- <mtx name="plusminus" width="1229" lsb="99"/>
- <mtx name="q" width="1229" lsb="111"/>
- <mtx name="question" width="1229" lsb="202"/>
- <mtx name="questiondown" width="1229" lsb="151"/>
- <mtx name="quotedbl" width="1229" lsb="244"/>
- <mtx name="quotedblbase" width="1229" lsb="257"/>
- <mtx name="quotedblleft" width="1229" lsb="232"/>
- <mtx name="quotedblright" width="1229" lsb="257"/>
- <mtx name="quoteleft" width="1229" lsb="454"/>
- <mtx name="quotereversed" width="1229" lsb="0"/>
- <mtx name="quoteright" width="1229" lsb="479"/>
- <mtx name="quotesinglbase" width="1229" lsb="479"/>
- <mtx name="quotesingle" width="1229" lsb="466"/>
- <mtx name="r" width="1229" lsb="74"/>
- <mtx name="racute" width="1229" lsb="74"/>
- <mtx name="radicalex" width="1229" lsb="0"/>
- <mtx name="rcaron" width="1229" lsb="74"/>
- <mtx name="rcommaaccent" width="1229" lsb="74"/>
- <mtx name="registered" width="1229" lsb="62"/>
- <mtx name="ring" width="1229" lsb="388"/>
- <mtx name="s" width="1229" lsb="173"/>
- <mtx name="sacute" width="1229" lsb="173"/>
- <mtx name="scaron" width="1229" lsb="173"/>
- <mtx name="scedilla" width="1229" lsb="173"/>
- <mtx name="scircumflex" width="1229" lsb="173"/>
- <mtx name="scommaaccent" width="1229" lsb="173"/>
- <mtx name="section" width="1229" lsb="154"/>
- <mtx name="semicolon" width="1229" lsb="466"/>
- <mtx name="semicolon#1" width="1229" lsb="466"/>
- <mtx name="seven" width="1229" lsb="145"/>
- <mtx name="sfthyphen" width="1229" lsb="148"/>
- <mtx name="six" width="1229" lsb="122"/>
- <mtx name="slash" width="1229" lsb="99"/>
- <mtx name="space" width="1229" lsb="0"/>
- <mtx name="sterling" width="1229" lsb="149"/>
- <mtx name="t" width="1229" lsb="119"/>
- <mtx name="tbar" width="1229" lsb="119"/>
- <mtx name="tcaron" width="1229" lsb="119"/>
- <mtx name="tcommaaccent" width="1229" lsb="119"/>
- <mtx name="tcommabelow" width="1229" lsb="119"/>
- <mtx name="thorn" width="1229" lsb="62"/>
- <mtx name="three" width="1229" lsb="185"/>
- <mtx name="threequarters" width="1229" lsb="37"/>
- <mtx name="threesuperior" width="1229" lsb="263"/>
- <mtx name="threesuperiour" width="1229" lsb="365"/>
- <mtx name="tilde" width="1229" lsb="281"/>
- <mtx name="trademark" width="1229" lsb="43"/>
- <mtx name="two" width="1229" lsb="133"/>
- <mtx name="twosuperior" width="1229" lsb="257"/>
- <mtx name="twosuperiour" width="1229" lsb="361"/>
- <mtx name="u" width="1229" lsb="68"/>
- <mtx name="uacute" width="1229" lsb="68"/>
- <mtx name="ubreve" width="1229" lsb="68"/>
- <mtx name="ucircumflex" width="1229" lsb="68"/>
- <mtx name="udieresis" width="1229" lsb="68"/>
- <mtx name="ugrave" width="1229" lsb="68"/>
- <mtx name="uhungarumlaut" width="1229" lsb="68"/>
- <mtx name="umacron" width="1229" lsb="68"/>
- <mtx name="underscore" width="1229" lsb="0"/>
- <mtx name="uogonek" width="1229" lsb="68"/>
- <mtx name="uring" width="1229" lsb="68"/>
- <mtx name="utilde" width="1229" lsb="68"/>
- <mtx name="v" width="1229" lsb="55"/>
- <mtx name="w" width="1229" lsb="23"/>
- <mtx name="wcircumflex" width="1229" lsb="23"/>
- <mtx name="x" width="1229" lsb="59"/>
- <mtx name="y" width="1229" lsb="55"/>
- <mtx name="yacute" width="1229" lsb="55"/>
- <mtx name="ycircumflex" width="1229" lsb="55"/>
- <mtx name="ydieresis" width="1229" lsb="55"/>
- <mtx name="yen" width="1229" lsb="49"/>
- <mtx name="z" width="1229" lsb="123"/>
- <mtx name="zacute" width="1229" lsb="123"/>
- <mtx name="zcaron" width="1229" lsb="123"/>
- <mtx name="zdotaccent" width="1229" lsb="123"/>
- <mtx name="zero" width="1229" lsb="96"/>
- </hmtx>
-
- <cmap>
- <tableVersion version="0"/>
- <cmap_format_0 platformID="1" platEncID="0" language="0">
- <map code="0x0" name=".notdef#1"/>
- <map code="0x1" name=".notdef"/>
- <map code="0x2" name=".notdef"/>
- <map code="0x3" name=".notdef"/>
- <map code="0x4" name=".notdef"/>
- <map code="0x5" name=".notdef"/>
- <map code="0x6" name=".notdef"/>
- <map code="0x7" name=".notdef"/>
- <map code="0x8" name=".notdef#1"/>
- <map code="0x9" name="space"/>
- <map code="0xa" name=".notdef"/>
- <map code="0xb" name=".notdef"/>
- <map code="0xc" name=".notdef"/>
- <map code="0xd" name=".notdef#2"/>
- <map code="0xe" name=".notdef"/>
- <map code="0xf" name=".notdef"/>
- <map code="0x10" name=".notdef"/>
- <map code="0x11" name=".notdef"/>
- <map code="0x12" name=".notdef"/>
- <map code="0x13" name=".notdef"/>
- <map code="0x14" name=".notdef"/>
- <map code="0x15" name=".notdef"/>
- <map code="0x16" name=".notdef"/>
- <map code="0x17" name=".notdef"/>
- <map code="0x18" name=".notdef"/>
- <map code="0x19" name=".notdef"/>
- <map code="0x1a" name=".notdef"/>
- <map code="0x1b" name=".notdef"/>
- <map code="0x1c" name=".notdef"/>
- <map code="0x1d" name=".notdef#1"/>
- <map code="0x1e" name=".notdef"/>
- <map code="0x1f" name=".notdef"/>
- <map code="0x20" name="space"/>
- <map code="0x21" name="exclam"/>
- <map code="0x22" name="quotedbl"/>
- <map code="0x23" name="numbersign"/>
- <map code="0x24" name="dollar"/>
- <map code="0x25" name="percent"/>
- <map code="0x26" name="ampersand"/>
- <map code="0x27" name="quotesingle"/>
- <map code="0x28" name="parenleft"/>
- <map code="0x29" name="parenright"/>
- <map code="0x2a" name="asterisk"/>
- <map code="0x2b" name="plus"/>
- <map code="0x2c" name="comma"/>
- <map code="0x2d" name="hyphen"/>
- <map code="0x2e" name="period"/>
- <map code="0x2f" name="slash"/>
- <map code="0x30" name="zero"/>
- <map code="0x31" name="one"/>
- <map code="0x32" name="two"/>
- <map code="0x33" name="three"/>
- <map code="0x34" name="four"/>
- <map code="0x35" name="five"/>
- <map code="0x36" name="six"/>
- <map code="0x37" name="seven"/>
- <map code="0x38" name="eight"/>
- <map code="0x39" name="nine"/>
- <map code="0x3a" name="colon"/>
- <map code="0x3b" name="semicolon"/>
- <map code="0x3c" name="less"/>
- <map code="0x3d" name="equal"/>
- <map code="0x3e" name="greater"/>
- <map code="0x3f" name="question"/>
- <map code="0x40" name="at"/>
- <map code="0x41" name="A"/>
- <map code="0x42" name="B"/>
- <map code="0x43" name="C"/>
- <map code="0x44" name="D"/>
- <map code="0x45" name="E"/>
- <map code="0x46" name="F"/>
- <map code="0x47" name="G"/>
- <map code="0x48" name="H"/>
- <map code="0x49" name="I"/>
- <map code="0x4a" name="J"/>
- <map code="0x4b" name="K"/>
- <map code="0x4c" name="L"/>
- <map code="0x4d" name="M"/>
- <map code="0x4e" name="N"/>
- <map code="0x4f" name="O"/>
- <map code="0x50" name="P"/>
- <map code="0x51" name="Q"/>
- <map code="0x52" name="R"/>
- <map code="0x53" name="S"/>
- <map code="0x54" name="T"/>
- <map code="0x55" name="U"/>
- <map code="0x56" name="V"/>
- <map code="0x57" name="W"/>
- <map code="0x58" name="X"/>
- <map code="0x59" name="Y"/>
- <map code="0x5a" name="Z"/>
- <map code="0x5b" name="bracketleft"/>
- <map code="0x5c" name="backslash"/>
- <map code="0x5d" name="bracketright"/>
- <map code="0x5e" name="asciicircum"/>
- <map code="0x5f" name="underscore"/>
- <map code="0x60" name="grave"/>
- <map code="0x61" name="a"/>
- <map code="0x62" name="b"/>
- <map code="0x63" name="c"/>
- <map code="0x64" name="d"/>
- <map code="0x65" name="e"/>
- <map code="0x66" name="f"/>
- <map code="0x67" name="g"/>
- <map code="0x68" name="h"/>
- <map code="0x69" name="i"/>
- <map code="0x6a" name="j"/>
- <map code="0x6b" name="k"/>
- <map code="0x6c" name="l"/>
- <map code="0x6d" name="m"/>
- <map code="0x6e" name="n"/>
- <map code="0x6f" name="o"/>
- <map code="0x70" name="p"/>
- <map code="0x71" name="q"/>
- <map code="0x72" name="r"/>
- <map code="0x73" name="s"/>
- <map code="0x74" name="t"/>
- <map code="0x75" name="u"/>
- <map code="0x76" name="v"/>
- <map code="0x77" name="w"/>
- <map code="0x78" name="x"/>
- <map code="0x79" name="y"/>
- <map code="0x7a" name="z"/>
- <map code="0x7b" name="braceleft"/>
- <map code="0x7c" name="bar"/>
- <map code="0x7d" name="braceright"/>
- <map code="0x7e" name="asciitilde"/>
- <map code="0x7f" name=".notdef"/>
- <map code="0x80" name="Adieresis"/>
- <map code="0x81" name="Aring"/>
- <map code="0x82" name="Ccedilla"/>
- <map code="0x83" name="Eacute"/>
- <map code="0x84" name="Ntilde"/>
- <map code="0x85" name="Odieresis"/>
- <map code="0x86" name="Udieresis"/>
- <map code="0x87" name="aacute"/>
- <map code="0x88" name="agrave"/>
- <map code="0x89" name="acircumflex"/>
- <map code="0x8a" name="adieresis"/>
- <map code="0x8b" name="atilde"/>
- <map code="0x8c" name="aring"/>
- <map code="0x8d" name="ccedilla"/>
- <map code="0x8e" name="eacute"/>
- <map code="0x8f" name="egrave"/>
- <map code="0x90" name="ecircumflex"/>
- <map code="0x91" name="edieresis"/>
- <map code="0x92" name="iacute"/>
- <map code="0x93" name="igrave"/>
- <map code="0x94" name="icircumflex"/>
- <map code="0x95" name="idieresis"/>
- <map code="0x96" name="ntilde"/>
- <map code="0x97" name="oacute"/>
- <map code="0x98" name="ograve"/>
- <map code="0x99" name="ocircumflex"/>
- <map code="0x9a" name="odieresis"/>
- <map code="0x9b" name="otilde"/>
- <map code="0x9c" name="uacute"/>
- <map code="0x9d" name="ugrave"/>
- <map code="0x9e" name="ucircumflex"/>
- <map code="0x9f" name="udieresis"/>
- <map code="0xa0" name="dagger"/>
- <map code="0xa1" name="degree"/>
- <map code="0xa2" name="cent"/>
- <map code="0xa3" name="sterling"/>
- <map code="0xa4" name="section"/>
- <map code="0xa5" name="bullet"/>
- <map code="0xa6" name="paragraph"/>
- <map code="0xa7" name="germandbls"/>
- <map code="0xa8" name="registered"/>
- <map code="0xa9" name="copyright"/>
- <map code="0xaa" name="trademark"/>
- <map code="0xab" name="acute"/>
- <map code="0xac" name="dieresis"/>
- <map code="0xad" name=".notdef"/>
- <map code="0xae" name="AE"/>
- <map code="0xaf" name="Oslash"/>
- <map code="0xb0" name=".notdef"/>
- <map code="0xb1" name="plusminus"/>
- <map code="0xb2" name=".notdef"/>
- <map code="0xb3" name=".notdef"/>
- <map code="0xb4" name="yen"/>
- <map code="0xb5" name="mu"/>
- <map code="0xb6" name=".notdef"/>
- <map code="0xb7" name=".notdef"/>
- <map code="0xb8" name=".notdef"/>
- <map code="0xb9" name=".notdef"/>
- <map code="0xba" name=".notdef"/>
- <map code="0xbb" name="ordfeminine"/>
- <map code="0xbc" name="ordmasculine"/>
- <map code="0xbd" name=".notdef"/>
- <map code="0xbe" name="ae"/>
- <map code="0xbf" name="oslash"/>
- <map code="0xc0" name="questiondown"/>
- <map code="0xc1" name="exclamdown"/>
- <map code="0xc2" name="logicalnot"/>
- <map code="0xc3" name=".notdef"/>
- <map code="0xc4" name="florin"/>
- <map code="0xc5" name=".notdef"/>
- <map code="0xc6" name=".notdef"/>
- <map code="0xc7" name="guillemotleft"/>
- <map code="0xc8" name="guillemotright"/>
- <map code="0xc9" name="ellipsis"/>
- <map code="0xca" name=".notdef#16"/>
- <map code="0xcb" name="Agrave"/>
- <map code="0xcc" name="Atilde"/>
- <map code="0xcd" name="Otilde"/>
- <map code="0xce" name="OE"/>
- <map code="0xcf" name="oe"/>
- <map code="0xd0" name="endash"/>
- <map code="0xd1" name="emdash"/>
- <map code="0xd2" name="quotedblleft"/>
- <map code="0xd3" name="quotedblright"/>
- <map code="0xd4" name="quoteleft"/>
- <map code="0xd5" name="quoteright"/>
- <map code="0xd6" name="divide"/>
- <map code="0xd7" name=".notdef"/>
- <map code="0xd8" name="ydieresis"/>
- <map code="0xd9" name="Ydieresis"/>
- <map code="0xda" name="fraction"/>
- <map code="0xdb" name="currency"/>
- <map code="0xdc" name="guilsinglleft"/>
- <map code="0xdd" name="guilsinglright"/>
- <map code="0xde" name="fi"/>
- <map code="0xdf" name="fl"/>
- <map code="0xe0" name="daggerdbl"/>
- <map code="0xe1" name="periodcentered"/>
- <map code="0xe2" name="quotesinglbase"/>
- <map code="0xe3" name="quotedblbase"/>
- <map code="0xe4" name="perthousand"/>
- <map code="0xe5" name="Acircumflex"/>
- <map code="0xe6" name="Ecircumflex"/>
- <map code="0xe7" name="Aacute"/>
- <map code="0xe8" name="Edieresis"/>
- <map code="0xe9" name="Egrave"/>
- <map code="0xea" name="Iacute"/>
- <map code="0xeb" name="Icircumflex"/>
- <map code="0xec" name="Idieresis"/>
- <map code="0xed" name="Igrave"/>
- <map code="0xee" name="Oacute"/>
- <map code="0xef" name="Ocircumflex"/>
- <map code="0xf0" name="Euro"/>
- <map code="0xf1" name="Ograve"/>
- <map code="0xf2" name="Uacute"/>
- <map code="0xf3" name="Ucircumflex"/>
- <map code="0xf4" name="Ugrave"/>
- <map code="0xf5" name="dotlessi"/>
- <map code="0xf6" name="circumflex"/>
- <map code="0xf7" name="tilde"/>
- <map code="0xf8" name="macron"/>
- <map code="0xf9" name="breve"/>
- <map code="0xfa" name="dotaccent"/>
- <map code="0xfb" name="ring"/>
- <map code="0xfc" name="cedilla"/>
- <map code="0xfd" name="hungarumlaut"/>
- <map code="0xfe" name="ogonek"/>
- <map code="0xff" name="caron"/>
- </cmap_format_0>
- <cmap_format_4 platformID="3" platEncID="1" language="0">
- <map code="0x20" name="space"/><!-- SPACE -->
- <map code="0x21" name="exclam"/><!-- EXCLAMATION MARK -->
- <map code="0x22" name="quotedbl"/><!-- QUOTATION MARK -->
- <map code="0x23" name="numbersign"/><!-- NUMBER SIGN -->
- <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
- <map code="0x25" name="percent"/><!-- PERCENT SIGN -->
- <map code="0x26" name="ampersand"/><!-- AMPERSAND -->
- <map code="0x27" name="quotesingle"/><!-- APOSTROPHE -->
- <map code="0x28" name="parenleft"/><!-- LEFT PARENTHESIS -->
- <map code="0x29" name="parenright"/><!-- RIGHT PARENTHESIS -->
- <map code="0x2a" name="asterisk"/><!-- ASTERISK -->
- <map code="0x2b" name="plus"/><!-- PLUS SIGN -->
- <map code="0x2c" name="comma"/><!-- COMMA -->
- <map code="0x2d" name="hyphen"/><!-- HYPHEN-MINUS -->
- <map code="0x2e" name="period"/><!-- FULL STOP -->
- <map code="0x2f" name="slash"/><!-- SOLIDUS -->
- <map code="0x30" name="zero"/><!-- DIGIT ZERO -->
- <map code="0x31" name="one"/><!-- DIGIT ONE -->
- <map code="0x32" name="two"/><!-- DIGIT TWO -->
- <map code="0x33" name="three"/><!-- DIGIT THREE -->
- <map code="0x34" name="four"/><!-- DIGIT FOUR -->
- <map code="0x35" name="five"/><!-- DIGIT FIVE -->
- <map code="0x36" name="six"/><!-- DIGIT SIX -->
- <map code="0x37" name="seven"/><!-- DIGIT SEVEN -->
- <map code="0x38" name="eight"/><!-- DIGIT EIGHT -->
- <map code="0x39" name="nine"/><!-- DIGIT NINE -->
- <map code="0x3a" name="colon"/><!-- COLON -->
- <map code="0x3b" name="semicolon"/><!-- SEMICOLON -->
- <map code="0x3c" name="less"/><!-- LESS-THAN SIGN -->
- <map code="0x3d" name="equal"/><!-- EQUALS SIGN -->
- <map code="0x3e" name="greater"/><!-- GREATER-THAN SIGN -->
- <map code="0x3f" name="question"/><!-- QUESTION MARK -->
- <map code="0x40" name="at"/><!-- COMMERCIAL AT -->
- <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
- <map code="0x42" name="B"/><!-- LATIN CAPITAL LETTER B -->
- <map code="0x43" name="C"/><!-- LATIN CAPITAL LETTER C -->
- <map code="0x44" name="D"/><!-- LATIN CAPITAL LETTER D -->
- <map code="0x45" name="E"/><!-- LATIN CAPITAL LETTER E -->
- <map code="0x46" name="F"/><!-- LATIN CAPITAL LETTER F -->
- <map code="0x47" name="G"/><!-- LATIN CAPITAL LETTER G -->
- <map code="0x48" name="H"/><!-- LATIN CAPITAL LETTER H -->
- <map code="0x49" name="I"/><!-- LATIN CAPITAL LETTER I -->
- <map code="0x4a" name="J"/><!-- LATIN CAPITAL LETTER J -->
- <map code="0x4b" name="K"/><!-- LATIN CAPITAL LETTER K -->
- <map code="0x4c" name="L"/><!-- LATIN CAPITAL LETTER L -->
- <map code="0x4d" name="M"/><!-- LATIN CAPITAL LETTER M -->
- <map code="0x4e" name="N"/><!-- LATIN CAPITAL LETTER N -->
- <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
- <map code="0x50" name="P"/><!-- LATIN CAPITAL LETTER P -->
- <map code="0x51" name="Q"/><!-- LATIN CAPITAL LETTER Q -->
- <map code="0x52" name="R"/><!-- LATIN CAPITAL LETTER R -->
- <map code="0x53" name="S"/><!-- LATIN CAPITAL LETTER S -->
- <map code="0x54" name="T"/><!-- LATIN CAPITAL LETTER T -->
- <map code="0x55" name="U"/><!-- LATIN CAPITAL LETTER U -->
- <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
- <map code="0x57" name="W"/><!-- LATIN CAPITAL LETTER W -->
- <map code="0x58" name="X"/><!-- LATIN CAPITAL LETTER X -->
- <map code="0x59" name="Y"/><!-- LATIN CAPITAL LETTER Y -->
- <map code="0x5a" name="Z"/><!-- LATIN CAPITAL LETTER Z -->
- <map code="0x5b" name="bracketleft"/><!-- LEFT SQUARE BRACKET -->
- <map code="0x5c" name="backslash"/><!-- REVERSE SOLIDUS -->
- <map code="0x5d" name="bracketright"/><!-- RIGHT SQUARE BRACKET -->
- <map code="0x5e" name="asciicircum"/><!-- CIRCUMFLEX ACCENT -->
- <map code="0x5f" name="underscore"/><!-- LOW LINE -->
- <map code="0x60" name="grave"/><!-- GRAVE ACCENT -->
- <map code="0x61" name="a"/><!-- LATIN SMALL LETTER A -->
- <map code="0x62" name="b"/><!-- LATIN SMALL LETTER B -->
- <map code="0x63" name="c"/><!-- LATIN SMALL LETTER C -->
- <map code="0x64" name="d"/><!-- LATIN SMALL LETTER D -->
- <map code="0x65" name="e"/><!-- LATIN SMALL LETTER E -->
- <map code="0x66" name="f"/><!-- LATIN SMALL LETTER F -->
- <map code="0x67" name="g"/><!-- LATIN SMALL LETTER G -->
- <map code="0x68" name="h"/><!-- LATIN SMALL LETTER H -->
- <map code="0x69" name="i"/><!-- LATIN SMALL LETTER I -->
- <map code="0x6a" name="j"/><!-- LATIN SMALL LETTER J -->
- <map code="0x6b" name="k"/><!-- LATIN SMALL LETTER K -->
- <map code="0x6c" name="l"/><!-- LATIN SMALL LETTER L -->
- <map code="0x6d" name="m"/><!-- LATIN SMALL LETTER M -->
- <map code="0x6e" name="n"/><!-- LATIN SMALL LETTER N -->
- <map code="0x6f" name="o"/><!-- LATIN SMALL LETTER O -->
- <map code="0x70" name="p"/><!-- LATIN SMALL LETTER P -->
- <map code="0x71" name="q"/><!-- LATIN SMALL LETTER Q -->
- <map code="0x72" name="r"/><!-- LATIN SMALL LETTER R -->
- <map code="0x73" name="s"/><!-- LATIN SMALL LETTER S -->
- <map code="0x74" name="t"/><!-- LATIN SMALL LETTER T -->
- <map code="0x75" name="u"/><!-- LATIN SMALL LETTER U -->
- <map code="0x76" name="v"/><!-- LATIN SMALL LETTER V -->
- <map code="0x77" name="w"/><!-- LATIN SMALL LETTER W -->
- <map code="0x78" name="x"/><!-- LATIN SMALL LETTER X -->
- <map code="0x79" name="y"/><!-- LATIN SMALL LETTER Y -->
- <map code="0x7a" name="z"/><!-- LATIN SMALL LETTER Z -->
- <map code="0x7b" name="braceleft"/><!-- LEFT CURLY BRACKET -->
- <map code="0x7c" name="bar"/><!-- VERTICAL LINE -->
- <map code="0x7d" name="braceright"/><!-- RIGHT CURLY BRACKET -->
- <map code="0x7e" name="asciitilde"/><!-- TILDE -->
- <map code="0x80" name="Euro#1"/><!-- &lt;control> -->
- <map code="0xa0" name="nonbreakingspace"/><!-- NO-BREAK SPACE -->
- <map code="0xa1" name="exclamdown"/><!-- INVERTED EXCLAMATION MARK -->
- <map code="0xa2" name="cent"/><!-- CENT SIGN -->
- <map code="0xa3" name="sterling"/><!-- POUND SIGN -->
- <map code="0xa4" name="currency"/><!-- CURRENCY SIGN -->
- <map code="0xa5" name="yen"/><!-- YEN SIGN -->
- <map code="0xa6" name="brokenbar"/><!-- BROKEN BAR -->
- <map code="0xa7" name="section"/><!-- SECTION SIGN -->
- <map code="0xa8" name="dieresis"/><!-- DIAERESIS -->
- <map code="0xa9" name="copyright"/><!-- COPYRIGHT SIGN -->
- <map code="0xaa" name="ordfeminine"/><!-- FEMININE ORDINAL INDICATOR -->
- <map code="0xab" name="guillemotleft"/><!-- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xac" name="logicalnot"/><!-- NOT SIGN -->
- <map code="0xad" name="sfthyphen"/><!-- SOFT HYPHEN -->
- <map code="0xae" name="registered"/><!-- REGISTERED SIGN -->
- <map code="0xaf" name="macron#1"/><!-- MACRON -->
- <map code="0xb0" name="degree"/><!-- DEGREE SIGN -->
- <map code="0xb1" name="plusminus"/><!-- PLUS-MINUS SIGN -->
- <map code="0xb2" name="twosuperior"/><!-- SUPERSCRIPT TWO -->
- <map code="0xb3" name="threesuperior"/><!-- SUPERSCRIPT THREE -->
- <map code="0xb4" name="acute"/><!-- ACUTE ACCENT -->
- <map code="0xb5" name="mu"/><!-- MICRO SIGN -->
- <map code="0xb6" name="paragraph"/><!-- PILCROW SIGN -->
- <map code="0xb7" name="periodcentered#1"/><!-- MIDDLE DOT -->
- <map code="0xb8" name="cedilla"/><!-- CEDILLA -->
- <map code="0xb9" name="onesuperior"/><!-- SUPERSCRIPT ONE -->
- <map code="0xba" name="ordmasculine"/><!-- MASCULINE ORDINAL INDICATOR -->
- <map code="0xbb" name="guillemotright"/><!-- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xbc" name="onequarter"/><!-- VULGAR FRACTION ONE QUARTER -->
- <map code="0xbd" name="onehalf"/><!-- VULGAR FRACTION ONE HALF -->
- <map code="0xbe" name="threequarters"/><!-- VULGAR FRACTION THREE QUARTERS -->
- <map code="0xbf" name="questiondown"/><!-- INVERTED QUESTION MARK -->
- <map code="0xc0" name="Agrave"/><!-- LATIN CAPITAL LETTER A WITH GRAVE -->
- <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
- <map code="0xc2" name="Acircumflex"/><!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX -->
- <map code="0xc3" name="Atilde"/><!-- LATIN CAPITAL LETTER A WITH TILDE -->
- <map code="0xc4" name="Adieresis"/><!-- LATIN CAPITAL LETTER A WITH DIAERESIS -->
- <map code="0xc5" name="Aring"/><!-- LATIN CAPITAL LETTER A WITH RING ABOVE -->
- <map code="0xc6" name="AE"/><!-- LATIN CAPITAL LETTER AE -->
- <map code="0xc7" name="Ccedilla"/><!-- LATIN CAPITAL LETTER C WITH CEDILLA -->
- <map code="0xc8" name="Egrave"/><!-- LATIN CAPITAL LETTER E WITH GRAVE -->
- <map code="0xc9" name="Eacute"/><!-- LATIN CAPITAL LETTER E WITH ACUTE -->
- <map code="0xca" name="Ecircumflex"/><!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX -->
- <map code="0xcb" name="Edieresis"/><!-- LATIN CAPITAL LETTER E WITH DIAERESIS -->
- <map code="0xcc" name="Igrave"/><!-- LATIN CAPITAL LETTER I WITH GRAVE -->
- <map code="0xcd" name="Iacute"/><!-- LATIN CAPITAL LETTER I WITH ACUTE -->
- <map code="0xce" name="Icircumflex"/><!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX -->
- <map code="0xcf" name="Idieresis"/><!-- LATIN CAPITAL LETTER I WITH DIAERESIS -->
- <map code="0xd0" name="Eth"/><!-- LATIN CAPITAL LETTER ETH -->
- <map code="0xd1" name="Ntilde"/><!-- LATIN CAPITAL LETTER N WITH TILDE -->
- <map code="0xd2" name="Ograve"/><!-- LATIN CAPITAL LETTER O WITH GRAVE -->
- <map code="0xd3" name="Oacute"/><!-- LATIN CAPITAL LETTER O WITH ACUTE -->
- <map code="0xd4" name="Ocircumflex"/><!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX -->
- <map code="0xd5" name="Otilde"/><!-- LATIN CAPITAL LETTER O WITH TILDE -->
- <map code="0xd6" name="Odieresis"/><!-- LATIN CAPITAL LETTER O WITH DIAERESIS -->
- <map code="0xd7" name="multiply"/><!-- MULTIPLICATION SIGN -->
- <map code="0xd8" name="Oslash"/><!-- LATIN CAPITAL LETTER O WITH STROKE -->
- <map code="0xd9" name="Ugrave"/><!-- LATIN CAPITAL LETTER U WITH GRAVE -->
- <map code="0xda" name="Uacute"/><!-- LATIN CAPITAL LETTER U WITH ACUTE -->
- <map code="0xdb" name="Ucircumflex"/><!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX -->
- <map code="0xdc" name="Udieresis"/><!-- LATIN CAPITAL LETTER U WITH DIAERESIS -->
- <map code="0xdd" name="Yacute"/><!-- LATIN CAPITAL LETTER Y WITH ACUTE -->
- <map code="0xde" name="Thorn"/><!-- LATIN CAPITAL LETTER THORN -->
- <map code="0xdf" name="germandbls"/><!-- LATIN SMALL LETTER SHARP S -->
- <map code="0xe0" name="agrave"/><!-- LATIN SMALL LETTER A WITH GRAVE -->
- <map code="0xe1" name="aacute"/><!-- LATIN SMALL LETTER A WITH ACUTE -->
- <map code="0xe2" name="acircumflex"/><!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
- <map code="0xe3" name="atilde"/><!-- LATIN SMALL LETTER A WITH TILDE -->
- <map code="0xe4" name="adieresis"/><!-- LATIN SMALL LETTER A WITH DIAERESIS -->
- <map code="0xe5" name="aring"/><!-- LATIN SMALL LETTER A WITH RING ABOVE -->
- <map code="0xe6" name="ae"/><!-- LATIN SMALL LETTER AE -->
- <map code="0xe7" name="ccedilla"/><!-- LATIN SMALL LETTER C WITH CEDILLA -->
- <map code="0xe8" name="egrave"/><!-- LATIN SMALL LETTER E WITH GRAVE -->
- <map code="0xe9" name="eacute"/><!-- LATIN SMALL LETTER E WITH ACUTE -->
- <map code="0xea" name="ecircumflex"/><!-- LATIN SMALL LETTER E WITH CIRCUMFLEX -->
- <map code="0xeb" name="edieresis"/><!-- LATIN SMALL LETTER E WITH DIAERESIS -->
- <map code="0xec" name="igrave"/><!-- LATIN SMALL LETTER I WITH GRAVE -->
- <map code="0xed" name="iacute"/><!-- LATIN SMALL LETTER I WITH ACUTE -->
- <map code="0xee" name="icircumflex"/><!-- LATIN SMALL LETTER I WITH CIRCUMFLEX -->
- <map code="0xef" name="idieresis"/><!-- LATIN SMALL LETTER I WITH DIAERESIS -->
- <map code="0xf0" name="eth"/><!-- LATIN SMALL LETTER ETH -->
- <map code="0xf1" name="ntilde"/><!-- LATIN SMALL LETTER N WITH TILDE -->
- <map code="0xf2" name="ograve"/><!-- LATIN SMALL LETTER O WITH GRAVE -->
- <map code="0xf3" name="oacute"/><!-- LATIN SMALL LETTER O WITH ACUTE -->
- <map code="0xf4" name="ocircumflex"/><!-- LATIN SMALL LETTER O WITH CIRCUMFLEX -->
- <map code="0xf5" name="otilde"/><!-- LATIN SMALL LETTER O WITH TILDE -->
- <map code="0xf6" name="odieresis"/><!-- LATIN SMALL LETTER O WITH DIAERESIS -->
- <map code="0xf7" name="divide"/><!-- DIVISION SIGN -->
- <map code="0xf8" name="oslash"/><!-- LATIN SMALL LETTER O WITH STROKE -->
- <map code="0xf9" name="ugrave"/><!-- LATIN SMALL LETTER U WITH GRAVE -->
- <map code="0xfa" name="uacute"/><!-- LATIN SMALL LETTER U WITH ACUTE -->
- <map code="0xfb" name="ucircumflex"/><!-- LATIN SMALL LETTER U WITH CIRCUMFLEX -->
- <map code="0xfc" name="udieresis"/><!-- LATIN SMALL LETTER U WITH DIAERESIS -->
- <map code="0xfd" name="yacute"/><!-- LATIN SMALL LETTER Y WITH ACUTE -->
- <map code="0xfe" name="thorn"/><!-- LATIN SMALL LETTER THORN -->
- <map code="0xff" name="ydieresis"/><!-- LATIN SMALL LETTER Y WITH DIAERESIS -->
- <map code="0x100" name="Amacron"/><!-- LATIN CAPITAL LETTER A WITH MACRON -->
- <map code="0x101" name="amacron"/><!-- LATIN SMALL LETTER A WITH MACRON -->
- <map code="0x102" name="Abreve"/><!-- LATIN CAPITAL LETTER A WITH BREVE -->
- <map code="0x103" name="abreve"/><!-- LATIN SMALL LETTER A WITH BREVE -->
- <map code="0x104" name="Aogonek"/><!-- LATIN CAPITAL LETTER A WITH OGONEK -->
- <map code="0x105" name="aogonek"/><!-- LATIN SMALL LETTER A WITH OGONEK -->
- <map code="0x106" name="Cacute"/><!-- LATIN CAPITAL LETTER C WITH ACUTE -->
- <map code="0x107" name="cacute"/><!-- LATIN SMALL LETTER C WITH ACUTE -->
- <map code="0x108" name="Ccircumflex"/><!-- LATIN CAPITAL LETTER C WITH CIRCUMFLEX -->
- <map code="0x109" name="ccircumflex"/><!-- LATIN SMALL LETTER C WITH CIRCUMFLEX -->
- <map code="0x10a" name="Cdotaccent"/><!-- LATIN CAPITAL LETTER C WITH DOT ABOVE -->
- <map code="0x10b" name="cdotaccent"/><!-- LATIN SMALL LETTER C WITH DOT ABOVE -->
- <map code="0x10c" name="Ccaron"/><!-- LATIN CAPITAL LETTER C WITH CARON -->
- <map code="0x10d" name="ccaron"/><!-- LATIN SMALL LETTER C WITH CARON -->
- <map code="0x10e" name="Dcaron"/><!-- LATIN CAPITAL LETTER D WITH CARON -->
- <map code="0x10f" name="dcaron"/><!-- LATIN SMALL LETTER D WITH CARON -->
- <map code="0x110" name="Dcroat"/><!-- LATIN CAPITAL LETTER D WITH STROKE -->
- <map code="0x111" name="dcroat"/><!-- LATIN SMALL LETTER D WITH STROKE -->
- <map code="0x112" name="Emacron"/><!-- LATIN CAPITAL LETTER E WITH MACRON -->
- <map code="0x113" name="emacron"/><!-- LATIN SMALL LETTER E WITH MACRON -->
- <map code="0x114" name="Ebreve"/><!-- LATIN CAPITAL LETTER E WITH BREVE -->
- <map code="0x115" name="ebreve"/><!-- LATIN SMALL LETTER E WITH BREVE -->
- <map code="0x116" name="Edotaccent"/><!-- LATIN CAPITAL LETTER E WITH DOT ABOVE -->
- <map code="0x117" name="edotaccent"/><!-- LATIN SMALL LETTER E WITH DOT ABOVE -->
- <map code="0x118" name="Eogonek"/><!-- LATIN CAPITAL LETTER E WITH OGONEK -->
- <map code="0x119" name="eogonek"/><!-- LATIN SMALL LETTER E WITH OGONEK -->
- <map code="0x11a" name="Ecaron"/><!-- LATIN CAPITAL LETTER E WITH CARON -->
- <map code="0x11b" name="ecaron"/><!-- LATIN SMALL LETTER E WITH CARON -->
- <map code="0x11c" name="Gcircumflex"/><!-- LATIN CAPITAL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11d" name="gcircumflex"/><!-- LATIN SMALL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11e" name="Gbreve"/><!-- LATIN CAPITAL LETTER G WITH BREVE -->
- <map code="0x11f" name="gbreve"/><!-- LATIN SMALL LETTER G WITH BREVE -->
- <map code="0x120" name="Gdotaccent"/><!-- LATIN CAPITAL LETTER G WITH DOT ABOVE -->
- <map code="0x121" name="gdotaccent"/><!-- LATIN SMALL LETTER G WITH DOT ABOVE -->
- <map code="0x122" name="Gcommaaccent"/><!-- LATIN CAPITAL LETTER G WITH CEDILLA -->
- <map code="0x123" name="gcommaaccent"/><!-- LATIN SMALL LETTER G WITH CEDILLA -->
- <map code="0x124" name="Hcircumflex"/><!-- LATIN CAPITAL LETTER H WITH CIRCUMFLEX -->
- <map code="0x125" name="hcircumflex"/><!-- LATIN SMALL LETTER H WITH CIRCUMFLEX -->
- <map code="0x126" name="Hbar"/><!-- LATIN CAPITAL LETTER H WITH STROKE -->
- <map code="0x127" name="hbar"/><!-- LATIN SMALL LETTER H WITH STROKE -->
- <map code="0x128" name="Itilde"/><!-- LATIN CAPITAL LETTER I WITH TILDE -->
- <map code="0x129" name="itilde"/><!-- LATIN SMALL LETTER I WITH TILDE -->
- <map code="0x12a" name="Imacron"/><!-- LATIN CAPITAL LETTER I WITH MACRON -->
- <map code="0x12b" name="imacron"/><!-- LATIN SMALL LETTER I WITH MACRON -->
- <map code="0x12c" name="Ibreve"/><!-- LATIN CAPITAL LETTER I WITH BREVE -->
- <map code="0x12d" name="ibreve"/><!-- LATIN SMALL LETTER I WITH BREVE -->
- <map code="0x12e" name="Iogonek"/><!-- LATIN CAPITAL LETTER I WITH OGONEK -->
- <map code="0x12f" name="iogonek"/><!-- LATIN SMALL LETTER I WITH OGONEK -->
- <map code="0x130" name="Idotaccent"/><!-- LATIN CAPITAL LETTER I WITH DOT ABOVE -->
- <map code="0x131" name="dotlessi"/><!-- LATIN SMALL LETTER DOTLESS I -->
- <map code="0x132" name="IJ"/><!-- LATIN CAPITAL LIGATURE IJ -->
- <map code="0x133" name="ij"/><!-- LATIN SMALL LIGATURE IJ -->
- <map code="0x134" name="Jcircumflex"/><!-- LATIN CAPITAL LETTER J WITH CIRCUMFLEX -->
- <map code="0x135" name="jcircumflex"/><!-- LATIN SMALL LETTER J WITH CIRCUMFLEX -->
- <map code="0x136" name="Kcommaaccent"/><!-- LATIN CAPITAL LETTER K WITH CEDILLA -->
- <map code="0x137" name="kcommaaccent"/><!-- LATIN SMALL LETTER K WITH CEDILLA -->
- <map code="0x138" name="kgreenlandic"/><!-- LATIN SMALL LETTER KRA -->
- <map code="0x139" name="Lacute"/><!-- LATIN CAPITAL LETTER L WITH ACUTE -->
- <map code="0x13a" name="lacute"/><!-- LATIN SMALL LETTER L WITH ACUTE -->
- <map code="0x13b" name="Lcommaaccent"/><!-- LATIN CAPITAL LETTER L WITH CEDILLA -->
- <map code="0x13c" name="lcommaaccent"/><!-- LATIN SMALL LETTER L WITH CEDILLA -->
- <map code="0x13d" name="Lcaron"/><!-- LATIN CAPITAL LETTER L WITH CARON -->
- <map code="0x13e" name="lcaron"/><!-- LATIN SMALL LETTER L WITH CARON -->
- <map code="0x13f" name="Ldot"/><!-- LATIN CAPITAL LETTER L WITH MIDDLE DOT -->
- <map code="0x140" name="ldot"/><!-- LATIN SMALL LETTER L WITH MIDDLE DOT -->
- <map code="0x141" name="Lslash"/><!-- LATIN CAPITAL LETTER L WITH STROKE -->
- <map code="0x142" name="lslash"/><!-- LATIN SMALL LETTER L WITH STROKE -->
- <map code="0x143" name="Nacute"/><!-- LATIN CAPITAL LETTER N WITH ACUTE -->
- <map code="0x144" name="nacute"/><!-- LATIN SMALL LETTER N WITH ACUTE -->
- <map code="0x145" name="Ncommaaccent"/><!-- LATIN CAPITAL LETTER N WITH CEDILLA -->
- <map code="0x146" name="ncommaaccent"/><!-- LATIN SMALL LETTER N WITH CEDILLA -->
- <map code="0x147" name="Ncaron"/><!-- LATIN CAPITAL LETTER N WITH CARON -->
- <map code="0x148" name="ncaron"/><!-- LATIN SMALL LETTER N WITH CARON -->
- <map code="0x149" name="napostrophe"/><!-- LATIN SMALL LETTER N PRECEDED BY APOSTROPHE -->
- <map code="0x14a" name="Eng"/><!-- LATIN CAPITAL LETTER ENG -->
- <map code="0x14b" name="eng"/><!-- LATIN SMALL LETTER ENG -->
- <map code="0x14c" name="Omacron"/><!-- LATIN CAPITAL LETTER O WITH MACRON -->
- <map code="0x14d" name="omacron"/><!-- LATIN SMALL LETTER O WITH MACRON -->
- <map code="0x14e" name="Obreve"/><!-- LATIN CAPITAL LETTER O WITH BREVE -->
- <map code="0x14f" name="obreve"/><!-- LATIN SMALL LETTER O WITH BREVE -->
- <map code="0x150" name="Ohungarumlaut"/><!-- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x151" name="ohungarumlaut"/><!-- LATIN SMALL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x152" name="OE"/><!-- LATIN CAPITAL LIGATURE OE -->
- <map code="0x153" name="oe"/><!-- LATIN SMALL LIGATURE OE -->
- <map code="0x154" name="Racute"/><!-- LATIN CAPITAL LETTER R WITH ACUTE -->
- <map code="0x155" name="racute"/><!-- LATIN SMALL LETTER R WITH ACUTE -->
- <map code="0x156" name="Rcommaaccent"/><!-- LATIN CAPITAL LETTER R WITH CEDILLA -->
- <map code="0x157" name="rcommaaccent"/><!-- LATIN SMALL LETTER R WITH CEDILLA -->
- <map code="0x158" name="Rcaron"/><!-- LATIN CAPITAL LETTER R WITH CARON -->
- <map code="0x159" name="rcaron"/><!-- LATIN SMALL LETTER R WITH CARON -->
- <map code="0x15a" name="Sacute"/><!-- LATIN CAPITAL LETTER S WITH ACUTE -->
- <map code="0x15b" name="sacute"/><!-- LATIN SMALL LETTER S WITH ACUTE -->
- <map code="0x15c" name="Scircumflex"/><!-- LATIN CAPITAL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15d" name="scircumflex"/><!-- LATIN SMALL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15e" name="Scedilla"/><!-- LATIN CAPITAL LETTER S WITH CEDILLA -->
- <map code="0x15f" name="scedilla"/><!-- LATIN SMALL LETTER S WITH CEDILLA -->
- <map code="0x160" name="Scaron"/><!-- LATIN CAPITAL LETTER S WITH CARON -->
- <map code="0x161" name="scaron"/><!-- LATIN SMALL LETTER S WITH CARON -->
- <map code="0x162" name="Tcommaaccent"/><!-- LATIN CAPITAL LETTER T WITH CEDILLA -->
- <map code="0x163" name="tcommaaccent"/><!-- LATIN SMALL LETTER T WITH CEDILLA -->
- <map code="0x164" name="Tcaron"/><!-- LATIN CAPITAL LETTER T WITH CARON -->
- <map code="0x165" name="tcaron"/><!-- LATIN SMALL LETTER T WITH CARON -->
- <map code="0x166" name="Tbar"/><!-- LATIN CAPITAL LETTER T WITH STROKE -->
- <map code="0x167" name="tbar"/><!-- LATIN SMALL LETTER T WITH STROKE -->
- <map code="0x168" name="Utilde"/><!-- LATIN CAPITAL LETTER U WITH TILDE -->
- <map code="0x169" name="utilde"/><!-- LATIN SMALL LETTER U WITH TILDE -->
- <map code="0x16a" name="Umacron"/><!-- LATIN CAPITAL LETTER U WITH MACRON -->
- <map code="0x16b" name="umacron"/><!-- LATIN SMALL LETTER U WITH MACRON -->
- <map code="0x16c" name="Ubreve"/><!-- LATIN CAPITAL LETTER U WITH BREVE -->
- <map code="0x16d" name="ubreve"/><!-- LATIN SMALL LETTER U WITH BREVE -->
- <map code="0x16e" name="Uring"/><!-- LATIN CAPITAL LETTER U WITH RING ABOVE -->
- <map code="0x16f" name="uring"/><!-- LATIN SMALL LETTER U WITH RING ABOVE -->
- <map code="0x170" name="Uhungarumlaut"/><!-- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x171" name="uhungarumlaut"/><!-- LATIN SMALL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x172" name="Uogonek"/><!-- LATIN CAPITAL LETTER U WITH OGONEK -->
- <map code="0x173" name="uogonek"/><!-- LATIN SMALL LETTER U WITH OGONEK -->
- <map code="0x174" name="Wcircumflex"/><!-- LATIN CAPITAL LETTER W WITH CIRCUMFLEX -->
- <map code="0x175" name="wcircumflex"/><!-- LATIN SMALL LETTER W WITH CIRCUMFLEX -->
- <map code="0x176" name="Ycircumflex"/><!-- LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x177" name="ycircumflex"/><!-- LATIN SMALL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x178" name="Ydieresis"/><!-- LATIN CAPITAL LETTER Y WITH DIAERESIS -->
- <map code="0x179" name="Zacute"/><!-- LATIN CAPITAL LETTER Z WITH ACUTE -->
- <map code="0x17a" name="zacute"/><!-- LATIN SMALL LETTER Z WITH ACUTE -->
- <map code="0x17b" name="Zdotaccent"/><!-- LATIN CAPITAL LETTER Z WITH DOT ABOVE -->
- <map code="0x17c" name="zdotaccent"/><!-- LATIN SMALL LETTER Z WITH DOT ABOVE -->
- <map code="0x17d" name="Zcaron"/><!-- LATIN CAPITAL LETTER Z WITH CARON -->
- <map code="0x17e" name="zcaron"/><!-- LATIN SMALL LETTER Z WITH CARON -->
- <map code="0x17f" name="longs"/><!-- LATIN SMALL LETTER LONG S -->
- <map code="0x192" name="florin"/><!-- LATIN SMALL LETTER F WITH HOOK -->
- <map code="0x218" name="Scommaaccent"/><!-- LATIN CAPITAL LETTER S WITH COMMA BELOW -->
- <map code="0x219" name="scommaaccent"/><!-- LATIN SMALL LETTER S WITH COMMA BELOW -->
- <map code="0x21a" name="Tcommabelow"/><!-- LATIN CAPITAL LETTER T WITH COMMA BELOW -->
- <map code="0x21b" name="tcommabelow"/><!-- LATIN SMALL LETTER T WITH COMMA BELOW -->
- <map code="0x2c6" name="circumflex"/><!-- MODIFIER LETTER CIRCUMFLEX ACCENT -->
- <map code="0x2c7" name="caron"/><!-- CARON -->
- <map code="0x2c9" name="macron"/><!-- MODIFIER LETTER MACRON -->
- <map code="0x2d8" name="breve"/><!-- BREVE -->
- <map code="0x2d9" name="dotaccent"/><!-- DOT ABOVE -->
- <map code="0x2da" name="ring"/><!-- RING ABOVE -->
- <map code="0x2db" name="ogonek"/><!-- OGONEK -->
- <map code="0x2dc" name="tilde"/><!-- SMALL TILDE -->
- <map code="0x2dd" name="hungarumlaut"/><!-- DOUBLE ACUTE ACCENT -->
- <map code="0x326" name="Unterkomma"/><!-- COMBINING COMMA BELOW -->
- <map code="0x37e" name="semicolon#1"/><!-- GREEK QUESTION MARK -->
- <map code="0x387" name="anoteleia"/><!-- GREEK ANO TELEIA -->
- <map code="0x2010" name="hyphen#1"/><!-- HYPHEN -->
- <map code="0x2011" name="nbhyphen"/><!-- NON-BREAKING HYPHEN -->
- <map code="0x2012" name="figuredash"/><!-- FIGURE DASH -->
- <map code="0x2013" name="endash"/><!-- EN DASH -->
- <map code="0x2014" name="emdash"/><!-- EM DASH -->
- <map code="0x2015" name="afii00208"/><!-- HORIZONTAL BAR -->
- <map code="0x2018" name="quoteleft"/><!-- LEFT SINGLE QUOTATION MARK -->
- <map code="0x2019" name="quoteright"/><!-- RIGHT SINGLE QUOTATION MARK -->
- <map code="0x201a" name="quotesinglbase"/><!-- SINGLE LOW-9 QUOTATION MARK -->
- <map code="0x201b" name="quotereversed"/><!-- SINGLE HIGH-REVERSED-9 QUOTATION MARK -->
- <map code="0x201c" name="quotedblleft"/><!-- LEFT DOUBLE QUOTATION MARK -->
- <map code="0x201d" name="quotedblright"/><!-- RIGHT DOUBLE QUOTATION MARK -->
- <map code="0x201e" name="quotedblbase"/><!-- DOUBLE LOW-9 QUOTATION MARK -->
- <map code="0x2020" name="dagger"/><!-- DAGGER -->
- <map code="0x2021" name="daggerdbl"/><!-- DOUBLE DAGGER -->
- <map code="0x2022" name="bullet"/><!-- BULLET -->
- <map code="0x2026" name="ellipsis"/><!-- HORIZONTAL ELLIPSIS -->
- <map code="0x2030" name="perthousand"/><!-- PER MILLE SIGN -->
- <map code="0x2039" name="guilsinglleft"/><!-- SINGLE LEFT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203a" name="guilsinglright"/><!-- SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203e" name="radicalex"/><!-- OVERLINE -->
- <map code="0x2044" name="fraction"/><!-- FRACTION SLASH -->
- <map code="0x20ac" name="Euro"/><!-- EURO SIGN -->
- <map code="0x2122" name="trademark"/><!-- TRADE MARK SIGN -->
- <map code="0x212e" name="estimated"/><!-- ESTIMATED SYMBOL -->
- <map code="0x2212" name="minus"/><!-- MINUS SIGN -->
- <map code="0x2215" name="fraction#1"/><!-- DIVISION SLASH -->
- <map code="0x2219" name="periodcentered"/><!-- BULLET OPERATOR -->
- <map code="0x22c5" name="dotmath"/><!-- DOT OPERATOR -->
- <map code="0xea01" name="fi#1"/><!-- Private Use -->
- <map code="0xea02" name="fl#1"/><!-- Private Use -->
- <map code="0xf001" name="fi"/><!-- Private Use -->
- <map code="0xf002" name="fl"/><!-- Private Use -->
- <map code="0xf004" name="foursuperiour"/><!-- Private Use -->
- <map code="0xf005" name="onesuperiour"/><!-- Private Use -->
- <map code="0xf006" name="twosuperiour"/><!-- Private Use -->
- <map code="0xf007" name="threesuperiour"/><!-- Private Use -->
- <map code="0xf008" name="foursuperiour#1"/><!-- Private Use -->
- <map code="0xf6be" name="dotlessj"/><!-- Private Use -->
- <map code="0xfb01" name="fi"/><!-- LATIN SMALL LIGATURE FI -->
- <map code="0xfb02" name="fl"/><!-- LATIN SMALL LIGATURE FL -->
- </cmap_format_4>
- </cmap>
-
- <fpgm>
- <assembly>
- NPUSHB[ ] /* 15 values pushed */
- 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- FDEF[ ]
- SLOOP[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- SLOOP[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[10100]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[10100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00000]
- ENDF[ ]
- FDEF[ ]
- SVTCA[0]
- NPUSHB[ ] /* 10 values pushed */
- 1 0 0 1 1 2 2 3 3 0
- SZPS[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SZPS[ ]
- ENDF[ ]
- </assembly>
- </fpgm>
-
- <prep>
- <assembly>
- PUSHB[ ] /* 2 values pushed */
- 48 1
- PUSHW[ ] /* 1 value pushed */
- 329
- RTG[ ]
- SCANCTRL[ ]
- SCANTYPE[ ]
- SCVTCI[ ]
- </assembly>
- </prep>
-
- <cvt>
- <cv index="0" value="1480"/>
- <cv index="1" value="1086"/>
- <cv index="2" value="0"/>
- <cv index="3" value="-512"/>
- <cv index="4" value="247"/>
- <cv index="5" value="121"/>
- <cv index="6" value="125"/>
- <cv index="7" value="147"/>
- <cv index="8" value="299"/>
- <cv index="9" value="224"/>
- <cv index="10" value="200"/>
- <cv index="11" value="210"/>
- <cv index="12" value="174"/>
- <cv index="13" value="179"/>
- <cv index="14" value="145"/>
- <cv index="15" value="171"/>
- <cv index="16" value="149"/>
- <cv index="17" value="96"/>
- <cv index="18" value="102"/>
- <cv index="19" value="188"/>
- <cv index="20" value="138"/>
- <cv index="21" value="97"/>
- <cv index="22" value="172"/>
- <cv index="23" value="36"/>
- <cv index="24" value="203"/>
- <cv index="25" value="131"/>
- <cv index="26" value="230"/>
- <cv index="27" value="186"/>
- <cv index="28" value="196"/>
- <cv index="29" value="22"/>
- <cv index="30" value="157"/>
- <cv index="31" value="114"/>
- <cv index="32" value="87"/>
- <cv index="33" value="101"/>
- <cv index="34" value="162"/>
- <cv index="35" value="155"/>
- <cv index="36" value="213"/>
- <cv index="37" value="176"/>
- <cv index="38" value="152"/>
- <cv index="39" value="212"/>
- <cv index="40" value="113"/>
- </cvt>
-
- <loca>
- <!-- The 'loca' table will be calculated by the compiler -->
- </loca>
-
- <glyf>
-
- <!-- The xMin, yMin, xMax and yMax values
- will be recalculated by the compiler. -->
-
- <TTGlyph name=".notdef" xMin="123" yMin="0" xMax="1106" yMax="1480">
- <contour>
- <pt x="123" y="0" on="1"/>
- <pt x="123" y="1480" on="1"/>
- <pt x="1106" y="1480" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="983" y="123" on="1"/>
- <pt x="983" y="1357" on="1"/>
- <pt x="246" y="1357" on="1"/>
- <pt x="246" y="123" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 16 values pushed */
- 5 6 2 1 4 7 3 0 5 4 2 3 6 7 1 0
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- SVTCA[0]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name=".notdef#1"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#10"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#11"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#12"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#13"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#14"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#15"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#16"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#17"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#18"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#2"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#3"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#4"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#5"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#6"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#7"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#8"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#9"/><!-- contains no outline data -->
-
- <TTGlyph name="A" xMin="25" yMin="0" xMax="1203" yMax="1480">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 19 18 2 7 16 3 0 0 17 16 6 1 0 14 13 10 9 6 5 2 1 6 7 3 2
- 4 48 200 15 0 1 12 11 4 3 3 2 0 8 7 0 14 19 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="AE" xMin="12" yMin="0" xMax="1217" yMax="1480">
- <contour>
- <pt x="824" y="703" on="1"/>
- <pt x="824" y="123" on="1"/>
- <pt x="1093" y="123" on="1"/>
- <pt x="1093" y="333" on="1"/>
- <pt x="1217" y="333" on="1"/>
- <pt x="1217" y="0" on="1"/>
- <pt x="528" y="0" on="1"/>
- <pt x="528" y="123" on="1"/>
- <pt x="639" y="123" on="1"/>
- <pt x="639" y="419" on="1"/>
- <pt x="310" y="419" on="1"/>
- <pt x="183" y="123" on="1"/>
- <pt x="304" y="123" on="1"/>
- <pt x="304" y="0" on="1"/>
- <pt x="12" y="0" on="1"/>
- <pt x="12" y="123" on="1"/>
- <pt x="56" y="123" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="1198" y="1480" on="1"/>
- <pt x="1198" y="1166" on="1"/>
- <pt x="1075" y="1166" on="1"/>
- <pt x="1075" y="1357" on="1"/>
- <pt x="824" y="1357" on="1"/>
- <pt x="824" y="827" on="1"/>
- <pt x="1001" y="827" on="1"/>
- <pt x="1001" y="950" on="1"/>
- <pt x="1124" y="950" on="1"/>
- <pt x="1124" y="580" on="1"/>
- <pt x="1001" y="580" on="1"/>
- <pt x="1001" y="703" on="1"/>
- </contour>
- <contour>
- <pt x="363" y="543" on="1"/>
- <pt x="639" y="543" on="1"/>
- <pt x="639" y="1180" on="1"/>
- <pt x="638" y="1180" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 133 values pushed */
- 33 32 26 25 20 19 6 21 23 3 28 27 2 0 30 3 4 3 2 9 1 3 0 0 22
- 21 6 1 17 29 0 6 1 23 31 30 6 1 9 16 15 12 11 8 7 2 1 6 7 5
- 4 4 48 200 24 23 1 10 9 1 14 13 6 5 3 3 0 18 17 0 14 29 28 25 24
- 4 20 0 3 33 30 16 15 14 13 12 11 10 7 6 11 13 8 0 0 3 2 6 1 4
- 21 20 6 1 18 32 31 17 9 8 19 4 0 3 4 48 200 5 4 1 19 18 1 27 26
- 1 23 22 1 0 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aacute" xMin="25" yMin="0" xMax="1203" yMax="1925">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="1604" on="1"/>
- <pt x="707" y="1925" on="1"/>
- <pt x="935" y="1925" on="1"/>
- <pt x="614" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 23 20 2 21 7 3 19 18 2 7 16 3 0 0 17 16 6 1 0 14 13 10 9 6 5
- 2 1 6 7 3 2 4 48 200 22 21 1 15 0 1 12 11 4 3 3 3 0 8 7 0
- 14 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Abreve" xMin="25" yMin="0" xMax="1203" yMax="1925">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="269" y="1925" on="1"/>
- <pt x="392" y="1925" on="1"/>
- <pt x="440" y="1777" on="0"/>
- <pt x="614" y="1777" on="1"/>
- <pt x="789" y="1777" on="0"/>
- <pt x="837" y="1925" on="1"/>
- <pt x="960" y="1925" on="1"/>
- <pt x="937" y="1836" on="0"/>
- <pt x="911" y="1790" on="1"/>
- <pt x="820" y="1635" on="0"/>
- <pt x="618" y="1635" on="1"/>
- <pt x="466" y="1635" on="0"/>
- <pt x="377" y="1716" on="1"/>
- <pt x="322" y="1765" on="0"/>
- <pt x="294" y="1837" on="1"/>
- <pt x="283" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 23 14 30 48 200 19 18 2 7 16 3 26 25 21 20 4 13 30 7 0 0 17 16
- 6 1 0 14 13 10 9 6 5 2 1 6 7 3 2 4 48 200 15 0 1 12 11 4 3
- 3 2 0 8 7 0 14 26 25 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6
- 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Acircumflex" xMin="25" yMin="0" xMax="1203" yMax="1925">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="249" y="1604" on="1"/>
- <pt x="505" y="1925" on="1"/>
- <pt x="724" y="1925" on="1"/>
- <pt x="980" y="1604" on="1"/>
- <pt x="857" y="1604" on="1"/>
- <pt x="616" y="1806" on="1"/>
- <pt x="613" y="1806" on="1"/>
- <pt x="372" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 27 26 25 24 23 20 6 21 7 3 19 18 2 7 16 3 0 0 17 16 6 1 0 14 13
- 10 9 6 5 2 1 6 7 3 2 4 48 200 22 21 1 15 0 1 12 11 4 3 3 3
- 0 8 7 0 14 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Adieresis" xMin="25" yMin="0" xMax="1203" yMax="1801">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="281" y="1604" on="1"/>
- <pt x="281" y="1801" on="1"/>
- <pt x="478" y="1801" on="1"/>
- <pt x="478" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="750" y="1604" on="1"/>
- <pt x="750" y="1801" on="1"/>
- <pt x="947" y="1801" on="1"/>
- <pt x="947" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 116 values pushed */
- 19 18 2 7 16 3 0 0 27 24 23 20 10 3 21 17 16 6 1 0 14 13 10 9 6
- 5 2 1 6 7 3 3 4 48 200 26 25 22 21 3 15 0 1 12 11 4 3 3 3 0
- 8 7 0 14 17 15 14 13 12 5 26 24 3 19 18 8 7 4 24 22 3 16 3 2 0
- 4 22 20 3 11 10 9 3 13 26 6 5 4 1 4 13 20 0 0 25 24 10 1 26 23
- 22 10 1 20 2 4 48 200 27 26 1 21 20 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Agrave" xMin="25" yMin="0" xMax="1203" yMax="1925">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="738" y="1604" on="1"/>
- <pt x="615" y="1604" on="1"/>
- <pt x="294" y="1925" on="1"/>
- <pt x="522" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 21 20 2 22 7 3 19 18 2 7 16 3 0 0 17 16 6 1 0 14 13 10 9 6 5
- 2 1 6 7 3 2 4 48 200 23 22 1 15 0 1 12 11 4 3 3 3 0 8 7 0
- 14 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Amacron" xMin="25" yMin="0" xMax="1203" yMax="1728">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="259" y="1604" on="1"/>
- <pt x="259" y="1728" on="1"/>
- <pt x="950" y="1728" on="1"/>
- <pt x="950" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 19 18 2 7 16 3 0 0 23 20 6 1 21 17 16 6 1 0 14 13 10 9 6 5 2
- 1 6 7 3 3 4 48 200 22 21 1 15 0 1 12 11 4 3 3 3 0 8 7 0 14
- 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aogonek" xMin="25" yMin="-370" xMax="1203" yMax="1480">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="920" y="0" on="1"/>
- <pt x="1027" y="0" on="1"/>
- <pt x="898" y="-81" on="0"/>
- <pt x="898" y="-179" on="1"/>
- <pt x="898" y="-275" on="0"/>
- <pt x="1013" y="-275" on="1"/>
- <pt x="1067" y="-275" on="0"/>
- <pt x="1104" y="-260" on="1"/>
- <pt x="1104" y="-341" on="1"/>
- <pt x="1042" y="-370" on="0"/>
- <pt x="964" y="-370" on="1"/>
- <pt x="762" y="-370" on="0"/>
- <pt x="762" y="-213" on="1"/>
- <pt x="762" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 25 17 30 48 200 19 18 2 7 16 3 28 27 30 3 0 0 17 16 6 1 0 14
- 13 10 9 6 5 2 1 6 7 3 2 4 48 200 15 0 1 21 20 12 11 4 3 5 2
- 0 8 7 0 14 0 0 23 20 32 48 200 32 28 27 21 20 19 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aring" xMin="25" yMin="0" xMax="1203" yMax="1935">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="615" y="1935" on="1"/>
- <pt x="709" y="1935" on="0"/>
- <pt x="775" y="1869" on="1"/>
- <pt x="842" y="1803" on="0"/>
- <pt x="842" y="1709" on="1"/>
- <pt x="842" y="1612" on="0"/>
- <pt x="775" y="1547" on="1"/>
- <pt x="709" y="1481" on="0"/>
- <pt x="613" y="1481" on="1"/>
- <pt x="530" y="1481" on="0"/>
- <pt x="468" y="1535" on="1"/>
- <pt x="388" y="1604" on="0"/>
- <pt x="388" y="1708" on="1"/>
- <pt x="388" y="1802" on="0"/>
- <pt x="455" y="1868" on="1"/>
- <pt x="521" y="1935" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1848" on="1"/>
- <pt x="557" y="1848" on="0"/>
- <pt x="516" y="1808" on="1"/>
- <pt x="474" y="1767" on="0"/>
- <pt x="474" y="1709" on="1"/>
- <pt x="474" y="1650" on="0"/>
- <pt x="515" y="1609" on="1"/>
- <pt x="556" y="1567" on="0"/>
- <pt x="613" y="1567" on="1"/>
- <pt x="667" y="1567" on="0"/>
- <pt x="706" y="1600" on="1"/>
- <pt x="756" y="1643" on="0"/>
- <pt x="756" y="1709" on="1"/>
- <pt x="756" y="1767" on="0"/>
- <pt x="714" y="1808" on="1"/>
- <pt x="673" y="1848" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 88 values pushed */
- 0 0 44 32 28 36 32 20 48 200 28 0 19 18 2 7 16 3 20 7 0 0 17 16 6
- 1 0 14 13 10 9 6 5 2 1 6 7 3 2 4 48 200 15 0 1 12 11 4 3 3
- 2 0 8 7 0 14 0 0 48 32 24 40 32 32 48 200 32 24 19 18 17 16 15 14 13
- 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Atilde" xMin="25" yMin="0" xMax="1203" yMax="1839">
- <contour>
- <pt x="327" y="444" on="1"/>
- <pt x="228" y="123" on="1"/>
- <pt x="371" y="123" on="1"/>
- <pt x="371" y="0" on="1"/>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="99" y="123" on="1"/>
- <pt x="520" y="1480" on="1"/>
- <pt x="709" y="1480" on="1"/>
- <pt x="1129" y="123" on="1"/>
- <pt x="1203" y="123" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="766" y="123" on="1"/>
- <pt x="923" y="123" on="1"/>
- <pt x="823" y="444" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="568" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="577" y="1243" on="1"/>
- <pt x="575" y="1243" on="1"/>
- </contour>
- <contour>
- <pt x="281" y="1604" on="1"/>
- <pt x="287" y="1699" on="0"/>
- <pt x="312" y="1749" on="1"/>
- <pt x="357" y="1839" on="0"/>
- <pt x="466" y="1839" on="1"/>
- <pt x="538" y="1839" on="0"/>
- <pt x="601" y="1800" on="1"/>
- <pt x="661" y="1763" on="1"/>
- <pt x="723" y="1725" on="0"/>
- <pt x="757" y="1725" on="1"/>
- <pt x="825" y="1725" on="0"/>
- <pt x="836" y="1839" on="1"/>
- <pt x="947" y="1839" on="1"/>
- <pt x="940" y="1745" on="0"/>
- <pt x="915" y="1695" on="1"/>
- <pt x="869" y="1604" on="0"/>
- <pt x="762" y="1604" on="1"/>
- <pt x="689" y="1604" on="0"/>
- <pt x="626" y="1643" on="1"/>
- <pt x="566" y="1680" on="1"/>
- <pt x="506" y="1717" on="0"/>
- <pt x="470" y="1717" on="1"/>
- <pt x="402" y="1717" on="0"/>
- <pt x="391" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 41 5 24 29 5 36 48 200 19 18 2 7 16 3 43 32 31 20 4 13 36 24 7
- 0 0 17 16 6 1 0 14 13 10 9 6 5 2 1 6 7 3 2 4 48 200 15 0 1
- 12 11 4 3 3 2 0 8 7 0 14 43 32 31 20 19 18 17 16 15 14 13 12 11 10
- 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="B" xMin="74" yMin="0" xMax="1112" yMax="1480">
- <contour>
- <pt x="247" y="123" on="1"/>
- <pt x="247" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="692" y="1480" on="1"/>
- <pt x="1066" y="1480" on="0"/>
- <pt x="1066" y="1155" on="1"/>
- <pt x="1066" y="987" on="0"/>
- <pt x="964" y="882" on="1"/>
- <pt x="904" y="819" on="0"/>
- <pt x="790" y="771" on="1"/>
- <pt x="888" y="745" on="0"/>
- <pt x="938" y="715" on="1"/>
- <pt x="1112" y="610" on="0"/>
- <pt x="1112" y="377" on="1"/>
- <pt x="1112" y="0" on="0"/>
- <pt x="668" y="0" on="1"/>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- </contour>
- <contour>
- <pt x="444" y="123" on="1"/>
- <pt x="607" y="123" on="1"/>
- <pt x="902" y="123" on="0"/>
- <pt x="902" y="384" on="1"/>
- <pt x="902" y="532" on="0"/>
- <pt x="805" y="618" on="1"/>
- <pt x="709" y="703" on="0"/>
- <pt x="541" y="703" on="1"/>
- <pt x="444" y="703" on="1"/>
- </contour>
- <contour>
- <pt x="444" y="827" on="1"/>
- <pt x="542" y="827" on="1"/>
- <pt x="855" y="827" on="0"/>
- <pt x="855" y="1139" on="1"/>
- <pt x="855" y="1357" on="0"/>
- <pt x="644" y="1357" on="1"/>
- <pt x="444" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 29 28 27 26 10 5 1 0 3 0 0 34 33 2 1 6 3 3 20 19 18 0 6 3 16
- 2 4 48 200 17 16 1 0 4 3 0 14 0 0 31 39 6 22 39 14 48 200 33 29 26
- 20 16 10 4 7 13 14 6 19 18 17 3 2 4 13 0 0 0 34 28 27 19 10 3 0
- 1 4 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="C" xMin="123" yMin="-37" xMax="1127" yMax="1517">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1043" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="435" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 0 0 25 20 2 17 5 10 48 200 10 0 2 2 1 1 27 15 14 13 12 0 6 0 2
- 3 0 0 14 0 0 21 39 6 48 200 15 14 6 12 0 0 13 12 29 1 0 1 5 48
- 200 27 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cacute" xMin="123" yMin="-37" xMax="1127" yMax="1925">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1043" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="435" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <contour>
- <pt x="591" y="1604" on="1"/>
- <pt x="807" y="1925" on="1"/>
- <pt x="1035" y="1925" on="1"/>
- <pt x="714" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 25 20 2 17 5 10 48 200 10 0 2 2 1 31 28 2 29 0 3 0 1 1 27
- 15 14 13 12 0 6 0 2 3 0 0 30 29 1 0 14 0 0 21 39 6 48 200 31 30
- 29 28 15 14 6 13 6 12 0 0 13 12 29 1 0 1 5 48 200 27 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccaron" xMin="123" yMin="-37" xMax="1127" yMax="1925">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1043" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="435" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <contour>
- <pt x="1080" y="1925" on="1"/>
- <pt x="823" y="1604" on="1"/>
- <pt x="605" y="1604" on="1"/>
- <pt x="348" y="1925" on="1"/>
- <pt x="472" y="1925" on="1"/>
- <pt x="713" y="1723" on="1"/>
- <pt x="715" y="1723" on="1"/>
- <pt x="957" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 25 20 2 17 5 10 48 200 10 0 2 2 1 1 27 15 14 13 12 0 6 0 2
- 3 0 0 35 34 33 32 31 28 6 13 29 30 29 1 0 14 0 0 21 39 6 48 200 35
- 34 33 32 31 30 29 28 15 14 10 13 6 12 0 0 13 12 29 1 0 1 5 48 200 27
- 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccedilla" xMin="123" yMin="-432" xMax="1127" yMax="1517">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="542" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1042" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="436" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <contour>
- <pt x="669" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="706" y="-109" on="1"/>
- <pt x="778" y="-111" on="0"/>
- <pt x="830" y="-148" on="1"/>
- <pt x="900" y="-197" on="0"/>
- <pt x="900" y="-269" on="1"/>
- <pt x="900" y="-337" on="0"/>
- <pt x="841" y="-384" on="1"/>
- <pt x="782" y="-432" on="0"/>
- <pt x="697" y="-432" on="1"/>
- <pt x="630" y="-432" on="0"/>
- <pt x="553" y="-411" on="1"/>
- <pt x="553" y="-330" on="1"/>
- <pt x="603" y="-345" on="0"/>
- <pt x="657" y="-345" on="1"/>
- <pt x="761" y="-345" on="0"/>
- <pt x="761" y="-271" on="1"/>
- <pt x="761" y="-178" on="0"/>
- <pt x="574" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 43 32 38 25 20 2 17 5 10 48 200 10 0 2 2 1 1 27 15 14 13 12 0
- 6 0 2 3 0 0 1 47 41 40 30 29 28 6 13 38 2 0 14 0 0 45 20 34 21
- 39 6 48 200 47 41 40 30 29 28 15 14 8 13 34 6 12 0 0 13 12 29 1 0 1
- 5 48 200 27 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccircumflex" xMin="123" yMin="-37" xMax="1127" yMax="1925">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1043" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="435" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <contour>
- <pt x="348" y="1604" on="1"/>
- <pt x="604" y="1925" on="1"/>
- <pt x="823" y="1925" on="1"/>
- <pt x="1079" y="1604" on="1"/>
- <pt x="956" y="1604" on="1"/>
- <pt x="715" y="1806" on="1"/>
- <pt x="712" y="1806" on="1"/>
- <pt x="471" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 25 20 2 17 5 10 48 200 10 0 2 2 1 35 34 33 32 31 28 6 29 0 3
- 0 1 1 27 15 14 13 12 0 6 0 2 3 0 0 30 29 1 0 14 0 0 21 39 6
- 48 200 35 34 33 32 31 30 29 28 15 14 10 13 6 12 0 0 13 12 29 1 0 1 5
- 48 200 27 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cdotaccent" xMin="123" yMin="-37" xMax="1127" yMax="1801">
- <contour>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="450" y="-37" on="0"/>
- <pt x="287" y="169" on="1"/>
- <pt x="123" y="375" on="0"/>
- <pt x="123" y="748" on="1"/>
- <pt x="123" y="1117" on="0"/>
- <pt x="279" y="1317" on="1"/>
- <pt x="435" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1110" on="1"/>
- <pt x="983" y="1110" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="730" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="439" y="1218" on="1"/>
- <pt x="336" y="1043" on="0"/>
- <pt x="336" y="734" on="1"/>
- <pt x="336" y="435" on="0"/>
- <pt x="450" y="267" on="1"/>
- <pt x="563" y="99" on="0"/>
- <pt x="763" y="99" on="1"/>
- <pt x="941" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- </contour>
- <contour>
- <pt x="615" y="1604" on="1"/>
- <pt x="615" y="1801" on="1"/>
- <pt x="812" y="1801" on="1"/>
- <pt x="812" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 25 20 2 17 5 10 48 200 10 0 2 2 1 1 27 15 14 13 12 0 6 0 2
- 3 0 0 0 0 31 28 10 1 29 1 4 48 200 30 29 1 0 14 0 0 21 39 6 48
- 200 15 14 2 12 30 3 6 28 0 0 31 30 10 1 28 1 4 13 12 29 1 0 1 5
- 48 200 29 28 1 27 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="D" xMin="49" yMin="0" xMax="1167" yMax="1480">
- <contour>
- <pt x="49" y="0" on="1"/>
- <pt x="49" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="559" y="1480" on="1"/>
- <pt x="1167" y="1480" on="0"/>
- <pt x="1167" y="775" on="1"/>
- <pt x="1167" y="419" on="0"/>
- <pt x="1007" y="209" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="577" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="395" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="954" y="123" on="0"/>
- <pt x="954" y="754" on="1"/>
- <pt x="954" y="1063" on="0"/>
- <pt x="843" y="1210" on="1"/>
- <pt x="731" y="1357" on="0"/>
- <pt x="499" y="1357" on="1"/>
- <pt x="395" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 21 20 4 3 6 3 5 14 13 2 1 6 3 0 2 4 48 200 12 0 1 0 6
- 5 0 14 0 0 16 39 8 48 200 20 14 12 6 4 13 8 13 5 4 1 0 4 13 2
- 0 0 21 13 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcaron" xMin="49" yMin="0" xMax="1167" yMax="1925">
- <contour>
- <pt x="49" y="0" on="1"/>
- <pt x="49" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="559" y="1480" on="1"/>
- <pt x="1167" y="1480" on="0"/>
- <pt x="1167" y="775" on="1"/>
- <pt x="1167" y="419" on="0"/>
- <pt x="1007" y="209" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="577" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="395" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="954" y="123" on="0"/>
- <pt x="954" y="754" on="1"/>
- <pt x="954" y="1063" on="0"/>
- <pt x="843" y="1210" on="1"/>
- <pt x="731" y="1357" on="0"/>
- <pt x="499" y="1357" on="1"/>
- <pt x="395" y="1357" on="1"/>
- </contour>
- <contour>
- <pt x="919" y="1925" on="1"/>
- <pt x="662" y="1604" on="1"/>
- <pt x="444" y="1604" on="1"/>
- <pt x="187" y="1925" on="1"/>
- <pt x="311" y="1925" on="1"/>
- <pt x="552" y="1723" on="1"/>
- <pt x="554" y="1723" on="1"/>
- <pt x="796" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 29 28 27 26 25 22 6 13 23 0 0 21 20 4 3 6 3 5 14 13 2 1 6 3 0
- 2 4 48 200 24 23 1 12 0 1 2 0 6 5 0 14 0 0 16 39 8 48 200 26 13
- 2 2 29 28 27 24 23 22 20 14 12 6 10 13 8 13 25 5 4 1 0 5 13 2 0
- 0 21 13 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcroat" xMin="49" yMin="0" xMax="1167" yMax="1480">
- <contour>
- <pt x="49" y="0" on="1"/>
- <pt x="49" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="716" on="1"/>
- <pt x="49" y="716" on="1"/>
- <pt x="49" y="839" on="1"/>
- <pt x="197" y="839" on="1"/>
- <pt x="197" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="558" y="1480" on="1"/>
- <pt x="1167" y="1480" on="0"/>
- <pt x="1167" y="776" on="1"/>
- <pt x="1167" y="419" on="0"/>
- <pt x="1007" y="209" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="577" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="394" y="1357" on="1"/>
- <pt x="394" y="839" on="1"/>
- <pt x="666" y="839" on="1"/>
- <pt x="666" y="716" on="1"/>
- <pt x="394" y="716" on="1"/>
- <pt x="394" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="954" y="123" on="0"/>
- <pt x="954" y="754" on="1"/>
- <pt x="954" y="1062" on="0"/>
- <pt x="842" y="1210" on="1"/>
- <pt x="730" y="1357" on="0"/>
- <pt x="499" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 29 17 8 7 6 3 9 21 20 4 3 6 3 5 23 22 2 1 6 3 0 3 4
- 48 200 19 18 6 5 3 16 0 1 2 0 10 9 0 14 0 0 25 39 12 48 200 29 23
- 20 19 16 10 6 13 12 17 9 8 5 4 1 0 6 13 2 0 0 22 21 18 17 10 3
- 2 1 4 48 200 7 6 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="E" xMin="74" yMin="0" xMax="1106" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 10 9 4 3 6 3 5
- 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 4 4 48 200 12 11 1 23 0 1
- 2 0 6 5 0 14 17 16 13 12 4 14 10 3 5 4 1 0 4 13 2 0 0 21 20
- 6 1 22 9 8 6 1 6 19 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6 1
- 15 14 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eacute" xMin="74" yMin="0" xMax="1106" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="481" y="1604" on="1"/>
- <pt x="697" y="1925" on="1"/>
- <pt x="925" y="1925" on="1"/>
- <pt x="604" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 27 24 2 25 5 3 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 10
- 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 4 4 48 200
- 26 25 1 12 11 1 23 0 1 3 0 6 5 0 14 26 8 14 2 27 25 24 17 16 13
- 12 7 14 10 3 5 4 1 0 4 13 2 0 0 21 20 6 1 22 9 8 6 1 6 19
- 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6 1 15 14 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ebreve" xMin="74" yMin="0" xMax="1106" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="259" y="1925" on="1"/>
- <pt x="382" y="1925" on="1"/>
- <pt x="430" y="1777" on="0"/>
- <pt x="604" y="1777" on="1"/>
- <pt x="779" y="1777" on="0"/>
- <pt x="827" y="1925" on="1"/>
- <pt x="950" y="1925" on="1"/>
- <pt x="927" y="1836" on="0"/>
- <pt x="901" y="1790" on="1"/>
- <pt x="810" y="1635" on="0"/>
- <pt x="608" y="1635" on="1"/>
- <pt x="456" y="1635" on="0"/>
- <pt x="367" y="1716" on="1"/>
- <pt x="312" y="1765" on="0"/>
- <pt x="284" y="1837" on="1"/>
- <pt x="273" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 133 values pushed */
- 0 0 27 14 34 48 200 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 30 29
- 25 24 4 13 34 5 0 0 10 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0
- 2 1 6 1 0 4 4 48 200 12 11 1 23 0 1 2 0 6 5 0 14 30 20 8 2
- 29 17 16 13 12 5 14 10 3 25 10 2 2 5 4 1 0 4 13 2 0 0 21 20 6
- 1 22 9 8 6 1 6 19 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6 1 15
- 14 1 24 3 2 2 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecaron" xMin="74" yMin="0" xMax="1106" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="957" y="1925" on="1"/>
- <pt x="700" y="1604" on="1"/>
- <pt x="482" y="1604" on="1"/>
- <pt x="225" y="1925" on="1"/>
- <pt x="349" y="1925" on="1"/>
- <pt x="590" y="1723" on="1"/>
- <pt x="592" y="1723" on="1"/>
- <pt x="834" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 134 values pushed */
- 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 31 30 29 28 27 24 6 13 25
- 0 0 10 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 4
- 4 48 200 26 25 1 12 11 1 23 0 1 3 0 6 5 0 14 24 20 8 2 31 30 29
- 26 25 17 16 13 12 9 14 10 3 28 10 2 2 27 5 4 1 0 5 13 2 0 0 21
- 20 6 1 22 9 8 6 1 6 19 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6
- 1 15 14 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecircumflex" xMin="74" yMin="0" xMax="1106" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="259" y="1604" on="1"/>
- <pt x="515" y="1925" on="1"/>
- <pt x="734" y="1925" on="1"/>
- <pt x="990" y="1604" on="1"/>
- <pt x="867" y="1604" on="1"/>
- <pt x="626" y="1806" on="1"/>
- <pt x="623" y="1806" on="1"/>
- <pt x="382" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 135 values pushed */
- 31 30 29 28 27 24 6 25 5 3 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19
- 3 0 0 10 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0
- 4 4 48 200 26 25 1 12 11 1 23 0 1 3 0 6 5 0 14 27 6 20 2 30 29
- 28 26 25 17 16 13 12 9 14 10 3 31 10 2 2 5 4 1 0 4 13 2 0 0 21
- 20 6 1 22 9 8 6 1 6 19 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6
- 1 15 14 1 24 3 2 2 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edieresis" xMin="74" yMin="0" xMax="1106" yMax="1801">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="259" y="1604" on="1"/>
- <pt x="259" y="1801" on="1"/>
- <pt x="456" y="1801" on="1"/>
- <pt x="456" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="728" y="1604" on="1"/>
- <pt x="728" y="1801" on="1"/>
- <pt x="925" y="1801" on="1"/>
- <pt x="925" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 135 values pushed */
- 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 31 28 27 24 10 3 25
- 10 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 5 4 48
- 200 30 29 26 25 3 12 11 1 23 0 1 3 0 6 5 0 14 17 16 13 12 4 14 28
- 3 5 4 1 0 4 13 2 0 0 29 28 10 1 30 27 26 10 1 2 21 20 6 1 22
- 9 8 6 1 6 19 18 11 10 10 3 2 5 4 48 200 31 30 1 23 22 1 7 6 1
- 15 14 1 25 24 3 2 3 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edotaccent" xMin="74" yMin="0" xMax="1106" yMax="1801">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="543" y="1604" on="1"/>
- <pt x="543" y="1801" on="1"/>
- <pt x="740" y="1801" on="1"/>
- <pt x="740" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 27 24 10 1 25 10 9
- 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 5 4 48 200 26
- 25 1 12 11 1 23 0 1 3 0 6 5 0 14 17 16 13 12 4 14 26 3 5 4 1
- 0 4 13 2 0 0 27 26 10 1 24 21 20 6 1 22 9 8 6 1 6 19 18 11 10
- 10 3 2 4 4 48 200 25 24 1 23 22 1 7 6 1 15 14 1 3 2 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Egrave" xMin="74" yMin="0" xMax="1106" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="740" y="1604" on="1"/>
- <pt x="617" y="1604" on="1"/>
- <pt x="296" y="1925" on="1"/>
- <pt x="524" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 25 24 2 26 5 3 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 10
- 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 4 4 48 200
- 27 26 1 12 11 1 23 0 1 3 0 6 5 0 14 27 25 24 17 16 13 12 7 14 10
- 3 26 10 2 2 5 4 1 0 4 13 2 0 0 21 20 6 1 22 9 8 6 1 6 19
- 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6 1 15 14 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Emacron" xMin="74" yMin="0" xMax="1106" yMax="1728">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="1604" on="1"/>
- <pt x="284" y="1728" on="1"/>
- <pt x="975" y="1728" on="1"/>
- <pt x="975" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 128 values pushed */
- 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 0 0 27 24 6 1 25 10 9
- 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1 0 5 4 48 200 26
- 25 1 12 11 1 23 0 1 3 0 6 5 0 14 27 26 2 20 8 3 17 16 13 12 4
- 14 10 3 25 24 2 10 2 3 5 4 1 0 4 13 2 0 0 21 20 6 1 22 9 8
- 6 1 6 19 18 11 10 10 3 2 3 4 48 200 23 22 1 7 6 1 15 14 1 3 2
- 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eng" xMin="74" yMin="-296" xMax="1155" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="1044" y="-134" on="0"/>
- <pt x="964" y="-215" on="1"/>
- <pt x="885" y="-296" on="0"/>
- <pt x="752" y="-296" on="1"/>
- <pt x="664" y="-296" on="0"/>
- <pt x="536" y="-259" on="1"/>
- <pt x="536" y="-49" on="1"/>
- <pt x="659" y="-49" on="1"/>
- <pt x="672" y="-167" on="1"/>
- <pt x="736" y="-198" on="0"/>
- <pt x="783" y="-198" on="1"/>
- <pt x="845" y="-198" on="0"/>
- <pt x="880" y="-158" on="1"/>
- <pt x="922" y="-111" on="0"/>
- <pt x="922" y="-26" on="1"/>
- <pt x="922" y="-19" on="0"/>
- <pt x="921" y="-10" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 26 17 19 48 200 37 36 35 34 14 13 10 9 8 7 4 3 2 1 14 5 0 3
- 24 23 22 21 4 13 19 0 38 33 15 0 3 0 12 11 6 5 0 3 14 30 30 14 8
- 2 24 23 11 10 7 5 8 21 3 38 37 34 3 21 6 3 13 12 2 13 14 5 4 1
- 0 4 13 2 0 0 33 9 8 6 2 14 36 35 6 6 2 2 2 4 48 200 15 14 1
- 22 21 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eogonek" xMin="74" yMin="-370" xMax="1106" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="259" y="123" on="1"/>
- <pt x="259" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="1056" y="1480" on="1"/>
- <pt x="1056" y="1123" on="1"/>
- <pt x="933" y="1123" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="457" y="1357" on="1"/>
- <pt x="457" y="814" on="1"/>
- <pt x="748" y="814" on="1"/>
- <pt x="748" y="938" on="1"/>
- <pt x="871" y="938" on="1"/>
- <pt x="871" y="567" on="1"/>
- <pt x="748" y="567" on="1"/>
- <pt x="748" y="691" on="1"/>
- <pt x="457" y="691" on="1"/>
- <pt x="457" y="136" on="1"/>
- <pt x="982" y="136" on="1"/>
- <pt x="982" y="383" on="1"/>
- <pt x="1106" y="383" on="1"/>
- <pt x="1106" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="860" y="0" on="1"/>
- <pt x="967" y="0" on="1"/>
- <pt x="838" y="-81" on="0"/>
- <pt x="838" y="-179" on="1"/>
- <pt x="838" y="-275" on="0"/>
- <pt x="953" y="-275" on="1"/>
- <pt x="1007" y="-275" on="0"/>
- <pt x="1044" y="-260" on="1"/>
- <pt x="1044" y="-341" on="1"/>
- <pt x="982" y="-370" on="0"/>
- <pt x="904" y="-370" on="1"/>
- <pt x="702" y="-370" on="0"/>
- <pt x="702" y="-213" on="1"/>
- <pt x="702" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 141 values pushed */
- 0 0 29 17 34 48 200 14 13 8 7 4 3 11 3 22 21 16 15 4 17 19 3 32 31
- 34 0 0 0 10 9 4 3 6 3 5 18 17 6 1 11 20 19 20 1 0 2 1 6 1
- 0 4 4 48 200 12 11 1 25 24 23 0 3 2 0 6 5 0 14 0 0 27 20 36 48
- 200 32 31 2 6 20 3 25 20 8 2 36 36 24 17 16 13 12 6 14 10 3 5 4 1
- 0 4 13 2 0 0 21 20 6 1 22 9 8 6 1 6 19 18 11 10 10 3 2 3 4
- 48 200 23 22 1 7 6 1 15 14 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eth" xMin="49" yMin="0" xMax="1167" yMax="1480">
- <contour>
- <pt x="49" y="0" on="1"/>
- <pt x="49" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="716" on="1"/>
- <pt x="49" y="716" on="1"/>
- <pt x="49" y="839" on="1"/>
- <pt x="197" y="839" on="1"/>
- <pt x="197" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="558" y="1480" on="1"/>
- <pt x="1167" y="1480" on="0"/>
- <pt x="1167" y="776" on="1"/>
- <pt x="1167" y="419" on="0"/>
- <pt x="1007" y="209" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="577" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="394" y="1357" on="1"/>
- <pt x="394" y="839" on="1"/>
- <pt x="666" y="839" on="1"/>
- <pt x="666" y="716" on="1"/>
- <pt x="394" y="716" on="1"/>
- <pt x="394" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="954" y="123" on="0"/>
- <pt x="954" y="754" on="1"/>
- <pt x="954" y="1062" on="0"/>
- <pt x="842" y="1210" on="1"/>
- <pt x="730" y="1357" on="0"/>
- <pt x="499" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 29 17 8 7 6 3 9 21 20 4 3 6 3 5 23 22 2 1 6 3 0 3 4
- 48 200 19 18 6 5 3 16 0 1 2 0 10 9 0 14 0 0 25 39 12 48 200 29 23
- 20 19 16 10 6 13 12 17 9 8 5 4 1 0 6 13 2 0 0 22 21 18 17 10 3
- 2 1 4 48 200 7 6 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro" xMin="6" yMin="-37" xMax="1127" yMax="1517">
- <contour>
- <pt x="127" y="857" on="1"/>
- <pt x="6" y="857" on="1"/>
- <pt x="57" y="981" on="1"/>
- <pt x="143" y="981" on="1"/>
- <pt x="182" y="1150" on="0"/>
- <pt x="230" y="1236" on="1"/>
- <pt x="385" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1172" on="1"/>
- <pt x="983" y="1172" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="729" y="1394" on="1"/>
- <pt x="536" y="1394" on="0"/>
- <pt x="438" y="1222" on="1"/>
- <pt x="389" y="1137" on="0"/>
- <pt x="359" y="981" on="1"/>
- <pt x="1027" y="981" on="1"/>
- <pt x="976" y="857" on="1"/>
- <pt x="341" y="857" on="1"/>
- <pt x="337" y="802" on="0"/>
- <pt x="337" y="785" on="1"/>
- <pt x="336" y="761" on="0"/>
- <pt x="335" y="757" on="1"/>
- <pt x="334" y="743" on="0"/>
- <pt x="335" y="739" on="1"/>
- <pt x="336" y="734" on="0"/>
- <pt x="336" y="733" on="1"/>
- <pt x="338" y="660" on="1"/>
- <pt x="894" y="660" on="1"/>
- <pt x="843" y="537" on="1"/>
- <pt x="351" y="537" on="1"/>
- <pt x="377" y="399" on="0"/>
- <pt x="415" y="320" on="1"/>
- <pt x="521" y="99" on="0"/>
- <pt x="762" y="99" on="1"/>
- <pt x="942" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="740" y="-37" on="1"/>
- <pt x="501" y="-37" on="0"/>
- <pt x="348" y="104" on="1"/>
- <pt x="242" y="202" on="0"/>
- <pt x="186" y="357" on="1"/>
- <pt x="165" y="416" on="0"/>
- <pt x="139" y="537" on="1"/>
- <pt x="6" y="537" on="1"/>
- <pt x="57" y="660" on="1"/>
- <pt x="125" y="660" on="1"/>
- <pt x="123" y="748" on="1"/>
- <pt x="121" y="759" on="1"/>
- <pt x="121" y="760" on="0"/>
- <pt x="123" y="768" on="1"/>
- <pt x="124" y="772" on="0"/>
- <pt x="124" y="791" on="1"/>
- <pt x="123" y="797" on="0"/>
- <pt x="125" y="815" on="1"/>
- <pt x="126" y="840" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 114 values pushed */
- 0 0 37 20 42 14 5 7 48 200 42 2 7 0 1 12 11 10 9 4 0 2 3 0 52
- 0 30 2 1 40 39 2 32 2 3 0 0 0 21 20 1 0 6 3 2 49 48 33 32 6
- 3 30 2 4 48 200 19 18 3 2 3 51 50 31 30 3 2 0 14 0 0 27 36 53 48
- 200 52 51 50 49 48 33 32 31 30 21 20 19 18 12 11 3 2 1 0 19 13 53 9 0
- 0 10 9 29 1 39 1 5 48 200 40 39 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro#1" xMin="6" yMin="-37" xMax="1127" yMax="1517">
- <contour>
- <pt x="127" y="857" on="1"/>
- <pt x="6" y="857" on="1"/>
- <pt x="57" y="981" on="1"/>
- <pt x="143" y="981" on="1"/>
- <pt x="182" y="1150" on="0"/>
- <pt x="230" y="1236" on="1"/>
- <pt x="385" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="889" y="1517" on="0"/>
- <pt x="1106" y="1453" on="1"/>
- <pt x="1106" y="1172" on="1"/>
- <pt x="983" y="1172" on="1"/>
- <pt x="954" y="1341" on="1"/>
- <pt x="841" y="1394" on="0"/>
- <pt x="729" y="1394" on="1"/>
- <pt x="536" y="1394" on="0"/>
- <pt x="438" y="1222" on="1"/>
- <pt x="389" y="1137" on="0"/>
- <pt x="359" y="981" on="1"/>
- <pt x="1027" y="981" on="1"/>
- <pt x="976" y="857" on="1"/>
- <pt x="341" y="857" on="1"/>
- <pt x="337" y="802" on="0"/>
- <pt x="337" y="785" on="1"/>
- <pt x="336" y="761" on="0"/>
- <pt x="335" y="757" on="1"/>
- <pt x="334" y="743" on="0"/>
- <pt x="335" y="739" on="1"/>
- <pt x="336" y="734" on="0"/>
- <pt x="336" y="733" on="1"/>
- <pt x="338" y="660" on="1"/>
- <pt x="894" y="660" on="1"/>
- <pt x="843" y="537" on="1"/>
- <pt x="351" y="537" on="1"/>
- <pt x="377" y="399" on="0"/>
- <pt x="415" y="320" on="1"/>
- <pt x="521" y="99" on="0"/>
- <pt x="762" y="99" on="1"/>
- <pt x="942" y="99" on="0"/>
- <pt x="1127" y="234" on="1"/>
- <pt x="1127" y="74" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="740" y="-37" on="1"/>
- <pt x="501" y="-37" on="0"/>
- <pt x="348" y="104" on="1"/>
- <pt x="242" y="202" on="0"/>
- <pt x="186" y="357" on="1"/>
- <pt x="165" y="416" on="0"/>
- <pt x="139" y="537" on="1"/>
- <pt x="6" y="537" on="1"/>
- <pt x="57" y="660" on="1"/>
- <pt x="125" y="660" on="1"/>
- <pt x="123" y="748" on="1"/>
- <pt x="121" y="759" on="1"/>
- <pt x="121" y="760" on="0"/>
- <pt x="123" y="768" on="1"/>
- <pt x="124" y="772" on="0"/>
- <pt x="124" y="791" on="1"/>
- <pt x="123" y="797" on="0"/>
- <pt x="125" y="815" on="1"/>
- <pt x="126" y="840" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 114 values pushed */
- 0 0 37 20 42 14 5 7 48 200 42 2 7 0 1 12 11 10 9 4 0 2 3 0 52
- 0 30 2 1 40 39 2 32 2 3 0 0 0 21 20 1 0 6 3 2 49 48 33 32 6
- 3 30 2 4 48 200 19 18 3 2 3 51 50 31 30 3 2 0 14 0 0 27 36 53 48
- 200 52 51 50 49 48 33 32 31 30 21 20 19 18 12 11 3 2 1 0 19 13 53 9 0
- 0 10 9 29 1 39 1 5 48 200 40 39 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="F" xMin="111" yMin="0" xMax="1136" yMax="1480">
- <contour>
- <pt x="530" y="123" on="1"/>
- <pt x="802" y="123" on="1"/>
- <pt x="802" y="0" on="1"/>
- <pt x="111" y="0" on="1"/>
- <pt x="111" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="111" y="1357" on="1"/>
- <pt x="111" y="1480" on="1"/>
- <pt x="1136" y="1480" on="1"/>
- <pt x="1136" y="1110" on="1"/>
- <pt x="1013" y="1110" on="1"/>
- <pt x="1013" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="777" on="1"/>
- <pt x="828" y="777" on="1"/>
- <pt x="828" y="901" on="1"/>
- <pt x="951" y="901" on="1"/>
- <pt x="951" y="530" on="1"/>
- <pt x="828" y="530" on="1"/>
- <pt x="828" y="654" on="1"/>
- <pt x="530" y="654" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 17 16 11 10 4 6 14 3 19 18 2 20 0 3 0 0 13 12 7 6 6 3 8 21 20
- 6 1 14 5 4 1 0 6 3 2 3 4 48 200 15 14 1 3 2 1 2 0 9 8 0
- 14 20 19 16 15 2 1 6 17 0 3 8 7 4 3 4 13 5 0 0 12 11 6 1 9
- 21 14 13 0 10 3 5 2 4 48 200 10 9 1 18 17 1 6 5 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="G" xMin="74" yMin="-37" xMax="1081" yMax="1518">
- <contour>
- <pt x="1081" y="74" on="1"/>
- <pt x="899" y="-37" on="0"/>
- <pt x="698" y="-37" on="1"/>
- <pt x="402" y="-37" on="0"/>
- <pt x="238" y="169" on="1"/>
- <pt x="74" y="374" on="0"/>
- <pt x="74" y="747" on="1"/>
- <pt x="74" y="1120" on="0"/>
- <pt x="231" y="1319" on="1"/>
- <pt x="389" y="1518" on="0"/>
- <pt x="688" y="1518" on="1"/>
- <pt x="861" y="1518" on="0"/>
- <pt x="1057" y="1456" on="1"/>
- <pt x="1057" y="1110" on="1"/>
- <pt x="934" y="1110" on="1"/>
- <pt x="905" y="1341" on="1"/>
- <pt x="791" y="1395" on="0"/>
- <pt x="692" y="1395" on="1"/>
- <pt x="287" y="1395" on="0"/>
- <pt x="287" y="737" on="1"/>
- <pt x="287" y="430" on="0"/>
- <pt x="402" y="264" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="721" y="99" on="1"/>
- <pt x="799" y="99" on="0"/>
- <pt x="883" y="131" on="1"/>
- <pt x="883" y="537" on="1"/>
- <pt x="711" y="537" on="1"/>
- <pt x="711" y="660" on="1"/>
- <pt x="1081" y="660" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 23 20 2 17 5 10 48 200 10 0 2 2 1 15 14 13 12 4 0 28 3 0 1
- 25 0 2 26 2 3 0 0 0 27 26 6 1 28 1 4 48 200 29 28 1 0 14 0 0
- 19 39 6 48 200 15 14 2 12 25 3 28 27 6 25 0 0 26 25 10 1 0 1 4 48
- 200 29 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gbreve" xMin="74" yMin="-37" xMax="1081" yMax="1925">
- <contour>
- <pt x="1081" y="74" on="1"/>
- <pt x="899" y="-37" on="0"/>
- <pt x="698" y="-37" on="1"/>
- <pt x="402" y="-37" on="0"/>
- <pt x="238" y="169" on="1"/>
- <pt x="74" y="374" on="0"/>
- <pt x="74" y="747" on="1"/>
- <pt x="74" y="1120" on="0"/>
- <pt x="231" y="1319" on="1"/>
- <pt x="389" y="1518" on="0"/>
- <pt x="688" y="1518" on="1"/>
- <pt x="861" y="1518" on="0"/>
- <pt x="1057" y="1456" on="1"/>
- <pt x="1057" y="1110" on="1"/>
- <pt x="934" y="1110" on="1"/>
- <pt x="905" y="1341" on="1"/>
- <pt x="791" y="1395" on="0"/>
- <pt x="692" y="1395" on="1"/>
- <pt x="287" y="1395" on="0"/>
- <pt x="287" y="737" on="1"/>
- <pt x="287" y="430" on="0"/>
- <pt x="402" y="264" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="721" y="99" on="1"/>
- <pt x="799" y="99" on="0"/>
- <pt x="883" y="131" on="1"/>
- <pt x="883" y="537" on="1"/>
- <pt x="711" y="537" on="1"/>
- <pt x="711" y="660" on="1"/>
- <pt x="1081" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="320" y="1925" on="1"/>
- <pt x="443" y="1925" on="1"/>
- <pt x="491" y="1777" on="0"/>
- <pt x="665" y="1777" on="1"/>
- <pt x="840" y="1777" on="0"/>
- <pt x="888" y="1925" on="1"/>
- <pt x="1011" y="1925" on="1"/>
- <pt x="988" y="1836" on="0"/>
- <pt x="962" y="1790" on="1"/>
- <pt x="871" y="1635" on="0"/>
- <pt x="670" y="1635" on="1"/>
- <pt x="517" y="1635" on="0"/>
- <pt x="428" y="1716" on="1"/>
- <pt x="373" y="1765" on="0"/>
- <pt x="345" y="1837" on="1"/>
- <pt x="334" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 33 14 40 23 20 2 17 5 10 48 200 10 0 2 2 1 15 14 13 12 4 0 28
- 3 0 1 25 0 2 26 2 3 0 1 36 35 31 30 4 13 40 0 0 0 0 27 26 6
- 1 28 1 4 48 200 29 28 1 0 14 0 0 19 39 6 48 200 36 35 15 14 4 12 25
- 3 31 30 28 27 4 13 6 25 0 0 26 25 10 1 0 1 4 48 200 29 0 1 13 12
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcircumflex" xMin="74" yMin="-37" xMax="1081" yMax="1925">
- <contour>
- <pt x="1081" y="74" on="1"/>
- <pt x="899" y="-37" on="0"/>
- <pt x="698" y="-37" on="1"/>
- <pt x="402" y="-37" on="0"/>
- <pt x="238" y="169" on="1"/>
- <pt x="74" y="374" on="0"/>
- <pt x="74" y="747" on="1"/>
- <pt x="74" y="1120" on="0"/>
- <pt x="231" y="1319" on="1"/>
- <pt x="389" y="1518" on="0"/>
- <pt x="688" y="1518" on="1"/>
- <pt x="861" y="1518" on="0"/>
- <pt x="1057" y="1456" on="1"/>
- <pt x="1057" y="1110" on="1"/>
- <pt x="934" y="1110" on="1"/>
- <pt x="905" y="1341" on="1"/>
- <pt x="791" y="1395" on="0"/>
- <pt x="692" y="1395" on="1"/>
- <pt x="287" y="1395" on="0"/>
- <pt x="287" y="737" on="1"/>
- <pt x="287" y="430" on="0"/>
- <pt x="402" y="264" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="721" y="99" on="1"/>
- <pt x="799" y="99" on="0"/>
- <pt x="883" y="131" on="1"/>
- <pt x="883" y="537" on="1"/>
- <pt x="711" y="537" on="1"/>
- <pt x="711" y="660" on="1"/>
- <pt x="1081" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="299" y="1604" on="1"/>
- <pt x="555" y="1925" on="1"/>
- <pt x="774" y="1925" on="1"/>
- <pt x="1030" y="1604" on="1"/>
- <pt x="907" y="1604" on="1"/>
- <pt x="666" y="1806" on="1"/>
- <pt x="663" y="1806" on="1"/>
- <pt x="422" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 110 values pushed */
- 0 0 23 20 2 17 5 10 48 200 10 0 2 2 1 37 36 35 34 33 30 6 31 0 3
- 0 1 15 14 13 12 4 0 28 3 0 1 25 0 2 26 2 3 0 0 0 27 26 6 1
- 28 1 4 48 200 32 31 1 29 28 1 2 0 14 0 0 19 39 6 48 200 34 33 15 14
- 4 12 25 3 37 36 35 32 31 30 28 27 8 13 6 25 0 0 26 25 10 1 0 1 4
- 48 200 29 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcommaaccent" xMin="74" yMin="-432" xMax="1081" yMax="1518">
- <contour>
- <pt x="1081" y="74" on="1"/>
- <pt x="899" y="-37" on="0"/>
- <pt x="698" y="-37" on="1"/>
- <pt x="402" y="-37" on="0"/>
- <pt x="238" y="169" on="1"/>
- <pt x="74" y="374" on="0"/>
- <pt x="74" y="747" on="1"/>
- <pt x="74" y="1120" on="0"/>
- <pt x="231" y="1319" on="1"/>
- <pt x="389" y="1518" on="0"/>
- <pt x="688" y="1518" on="1"/>
- <pt x="860" y="1518" on="0"/>
- <pt x="1057" y="1456" on="1"/>
- <pt x="1057" y="1110" on="1"/>
- <pt x="934" y="1110" on="1"/>
- <pt x="905" y="1341" on="1"/>
- <pt x="791" y="1395" on="0"/>
- <pt x="691" y="1395" on="1"/>
- <pt x="287" y="1395" on="0"/>
- <pt x="287" y="737" on="1"/>
- <pt x="287" y="430" on="0"/>
- <pt x="402" y="264" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="721" y="99" on="1"/>
- <pt x="799" y="99" on="0"/>
- <pt x="883" y="131" on="1"/>
- <pt x="883" y="537" on="1"/>
- <pt x="711" y="537" on="1"/>
- <pt x="711" y="660" on="1"/>
- <pt x="1081" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="528" y="-421" on="1"/>
- <pt x="528" y="-336" on="1"/>
- <pt x="585" y="-345" on="0"/>
- <pt x="625" y="-345" on="1"/>
- <pt x="734" y="-345" on="0"/>
- <pt x="734" y="-278" on="1"/>
- <pt x="734" y="-204" on="0"/>
- <pt x="577" y="-188" on="1"/>
- <pt x="577" y="-111" on="1"/>
- <pt x="711" y="-114" on="0"/>
- <pt x="777" y="-143" on="1"/>
- <pt x="870" y="-185" on="0"/>
- <pt x="870" y="-280" on="1"/>
- <pt x="870" y="-432" on="0"/>
- <pt x="652" y="-432" on="1"/>
- <pt x="594" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 107 values pushed */
- 0 0 33 32 44 23 20 2 17 5 10 48 200 10 0 2 2 1 15 14 13 12 4 0 28
- 3 0 1 25 0 2 26 2 3 0 1 38 37 31 30 4 13 44 2 0 0 0 27 26 6
- 1 28 1 4 48 200 29 28 1 0 14 0 0 35 20 42 19 39 6 48 200 15 14 2 12
- 25 3 38 37 31 30 28 27 6 13 42 6 25 0 0 26 25 10 1 0 1 4 48 200 29
- 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gdotaccent" xMin="74" yMin="-37" xMax="1081" yMax="1801">
- <contour>
- <pt x="1081" y="74" on="1"/>
- <pt x="899" y="-37" on="0"/>
- <pt x="698" y="-37" on="1"/>
- <pt x="402" y="-37" on="0"/>
- <pt x="238" y="169" on="1"/>
- <pt x="74" y="374" on="0"/>
- <pt x="74" y="747" on="1"/>
- <pt x="74" y="1120" on="0"/>
- <pt x="231" y="1319" on="1"/>
- <pt x="389" y="1518" on="0"/>
- <pt x="688" y="1518" on="1"/>
- <pt x="861" y="1518" on="0"/>
- <pt x="1057" y="1456" on="1"/>
- <pt x="1057" y="1110" on="1"/>
- <pt x="934" y="1110" on="1"/>
- <pt x="905" y="1341" on="1"/>
- <pt x="791" y="1395" on="0"/>
- <pt x="692" y="1395" on="1"/>
- <pt x="287" y="1395" on="0"/>
- <pt x="287" y="737" on="1"/>
- <pt x="287" y="430" on="0"/>
- <pt x="402" y="264" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="721" y="99" on="1"/>
- <pt x="799" y="99" on="0"/>
- <pt x="883" y="131" on="1"/>
- <pt x="883" y="537" on="1"/>
- <pt x="711" y="537" on="1"/>
- <pt x="711" y="660" on="1"/>
- <pt x="1081" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="566" y="1604" on="1"/>
- <pt x="566" y="1801" on="1"/>
- <pt x="763" y="1801" on="1"/>
- <pt x="763" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 0 0 23 20 2 17 5 10 48 200 10 0 2 2 1 15 14 13 12 4 0 28 3 0 1
- 25 0 2 26 2 3 0 0 0 33 30 10 1 31 27 26 6 1 28 2 4 48 200 32 31
- 1 29 28 1 2 0 14 0 0 19 39 6 48 200 15 14 2 12 25 3 28 27 2 32 30
- 3 6 30 0 0 33 32 10 1 30 26 25 10 1 0 2 4 48 200 31 30 1 29 0 1
- 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="H" xMin="62" yMin="0" xMax="1168" yMax="1480">
- <contour>
- <pt x="370" y="703" on="1"/>
- <pt x="370" y="123" on="1"/>
- <pt x="469" y="123" on="1"/>
- <pt x="469" y="0" on="1"/>
- <pt x="62" y="0" on="1"/>
- <pt x="62" y="123" on="1"/>
- <pt x="173" y="123" on="1"/>
- <pt x="173" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="469" y="1480" on="1"/>
- <pt x="469" y="1357" on="1"/>
- <pt x="370" y="1357" on="1"/>
- <pt x="370" y="827" on="1"/>
- <pt x="859" y="827" on="1"/>
- <pt x="859" y="1357" on="1"/>
- <pt x="760" y="1357" on="1"/>
- <pt x="760" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1057" y="1357" on="1"/>
- <pt x="1057" y="123" on="1"/>
- <pt x="1168" y="123" on="1"/>
- <pt x="1168" y="0" on="1"/>
- <pt x="760" y="0" on="1"/>
- <pt x="760" y="123" on="1"/>
- <pt x="859" y="123" on="1"/>
- <pt x="859" y="703" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 106 values pushed */
- 20 19 16 15 12 11 8 7 8 9 13 3 26 25 22 21 6 5 2 1 8 0 3 3 0
- 0 27 0 6 1 13 1 4 48 200 14 13 1 24 23 4 3 3 2 0 18 17 10 9 0
- 3 14 25 24 17 16 11 10 3 2 8 14 0 3 23 22 19 18 4 13 20 9 8 5 4
- 4 13 6 0 0 27 26 15 14 10 3 20 13 12 1 0 10 3 6 2 4 48 200 21 20
- 1 7 6 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hbar" xMin="37" yMin="0" xMax="1192" yMax="1480">
- <contour>
- <pt x="370" y="827" on="1"/>
- <pt x="859" y="827" on="1"/>
- <pt x="859" y="1086" on="1"/>
- <pt x="370" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="62" y="0" on="1"/>
- <pt x="62" y="123" on="1"/>
- <pt x="173" y="123" on="1"/>
- <pt x="173" y="1086" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="37" y="1184" on="1"/>
- <pt x="173" y="1184" on="1"/>
- <pt x="173" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="469" y="1480" on="1"/>
- <pt x="469" y="1357" on="1"/>
- <pt x="370" y="1357" on="1"/>
- <pt x="370" y="1185" on="1"/>
- <pt x="859" y="1185" on="1"/>
- <pt x="859" y="1357" on="1"/>
- <pt x="760" y="1357" on="1"/>
- <pt x="760" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1057" y="1357" on="1"/>
- <pt x="1057" y="1184" on="1"/>
- <pt x="1192" y="1184" on="1"/>
- <pt x="1192" y="1086" on="1"/>
- <pt x="1057" y="1086" on="1"/>
- <pt x="1057" y="123" on="1"/>
- <pt x="1168" y="123" on="1"/>
- <pt x="1168" y="0" on="1"/>
- <pt x="760" y="0" on="1"/>
- <pt x="760" y="123" on="1"/>
- <pt x="859" y="123" on="1"/>
- <pt x="859" y="703" on="1"/>
- <pt x="370" y="703" on="1"/>
- <pt x="370" y="123" on="1"/>
- <pt x="469" y="123" on="1"/>
- <pt x="469" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 143 values pushed */
- 24 23 20 19 16 15 12 11 8 13 17 3 26 25 10 9 4 17 2 3 38 37 34 33 30
- 29 6 5 8 35 4 3 18 17 1 36 35 1 39 32 31 4 3 1 0 1 4 0 22 21
- 14 13 0 3 28 27 8 7 3 2 1 5 14 39 38 33 32 21 20 15 14 8 1 0 3
- 31 30 27 26 23 22 6 13 24 13 12 9 8 5 4 6 13 6 0 0 35 34 19 18 2
- 1 10 5 24 37 36 17 16 3 0 10 5 6 2 4 48 200 29 28 25 24 3 11 10 7
- 6 3 35 34 19 18 2 1 5 37 36 17 16 3 0 5 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hcircumflex" xMin="62" yMin="0" xMax="1168" yMax="1925">
- <contour>
- <pt x="370" y="703" on="1"/>
- <pt x="370" y="123" on="1"/>
- <pt x="469" y="123" on="1"/>
- <pt x="469" y="0" on="1"/>
- <pt x="62" y="0" on="1"/>
- <pt x="62" y="123" on="1"/>
- <pt x="173" y="123" on="1"/>
- <pt x="173" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="469" y="1480" on="1"/>
- <pt x="469" y="1357" on="1"/>
- <pt x="370" y="1357" on="1"/>
- <pt x="370" y="827" on="1"/>
- <pt x="859" y="827" on="1"/>
- <pt x="859" y="1357" on="1"/>
- <pt x="760" y="1357" on="1"/>
- <pt x="760" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1057" y="1357" on="1"/>
- <pt x="1057" y="123" on="1"/>
- <pt x="1168" y="123" on="1"/>
- <pt x="1168" y="0" on="1"/>
- <pt x="760" y="0" on="1"/>
- <pt x="760" y="123" on="1"/>
- <pt x="859" y="123" on="1"/>
- <pt x="859" y="703" on="1"/>
- </contour>
- <contour>
- <pt x="249" y="1604" on="1"/>
- <pt x="505" y="1925" on="1"/>
- <pt x="724" y="1925" on="1"/>
- <pt x="980" y="1604" on="1"/>
- <pt x="857" y="1604" on="1"/>
- <pt x="616" y="1806" on="1"/>
- <pt x="613" y="1806" on="1"/>
- <pt x="372" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 133 values pushed */
- 35 34 33 32 31 28 6 29 9 3 20 19 16 15 12 11 8 7 8 9 13 3 26 25 22
- 21 6 5 2 1 8 0 3 3 0 0 27 0 6 1 13 1 4 48 200 30 29 1 14 13
- 1 24 23 4 3 3 3 0 18 17 10 9 0 3 14 31 20 14 2 35 34 33 32 30 29
- 25 24 17 16 11 10 3 2 14 14 0 3 28 0 6 2 23 22 19 18 4 13 20 9 8
- 5 4 4 13 6 0 0 27 26 15 14 10 3 20 13 12 1 0 10 3 6 2 4 48 200
- 21 20 1 7 6 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="I" xMin="160" yMin="0" xMax="1068" yMax="1480">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 8 7 4 3 6 3 5 10 9 2 1 6 3 0 2 4 48 200 11 0 1 0 6
- 5 0 14 11 10 7 6 4 13 8 5 4 1 0 4 13 2 0 0 9 8 10 1 2 1
- 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="IJ" xMin="45" yMin="-37" xMax="1131" yMax="1480">
- <contour>
- <pt x="45" y="0" on="1"/>
- <pt x="45" y="123" on="1"/>
- <pt x="144" y="123" on="1"/>
- <pt x="144" y="1357" on="1"/>
- <pt x="45" y="1357" on="1"/>
- <pt x="45" y="1480" on="1"/>
- <pt x="440" y="1480" on="1"/>
- <pt x="440" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="341" y="123" on="1"/>
- <pt x="440" y="123" on="1"/>
- <pt x="440" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="563" y="-19" on="1"/>
- <pt x="563" y="197" on="1"/>
- <pt x="687" y="197" on="1"/>
- <pt x="699" y="108" on="1"/>
- <pt x="729" y="86" on="0"/>
- <pt x="762" y="86" on="1"/>
- <pt x="933" y="86" on="0"/>
- <pt x="933" y="410" on="1"/>
- <pt x="933" y="1357" on="1"/>
- <pt x="736" y="1357" on="1"/>
- <pt x="736" y="1480" on="1"/>
- <pt x="1131" y="1480" on="1"/>
- <pt x="1131" y="533" on="1"/>
- <pt x="1131" y="226" on="0"/>
- <pt x="1034" y="105" on="1"/>
- <pt x="920" y="-37" on="0"/>
- <pt x="711" y="-37" on="1"/>
- <pt x="652" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 0 0 17 5 28 48 200 28 2 24 19 15 14 13 10 9 2 1 9 3 0 3 12 0 0
- 0 21 20 8 7 4 3 6 5 5 1 4 48 200 11 0 1 0 23 22 6 5 0 3 14
- 22 21 15 14 4 19 12 3 11 10 7 6 4 12 8 3 5 4 1 0 4 13 2 0 0
- 20 19 10 1 23 9 8 10 1 2 2 4 48 200 24 23 1 13 12 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Iacute" xMin="160" yMin="0" xMax="1068" yMax="1925">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="515" y="1604" on="1"/>
- <pt x="731" y="1925" on="1"/>
- <pt x="959" y="1925" on="1"/>
- <pt x="638" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 15 12 2 13 5 3 0 0 8 7 4 3 6 3 5 10 9 2 1 6 3 0 2 4 48
- 200 14 13 1 11 0 1 2 0 6 5 0 14 15 8 2 2 14 13 11 10 7 6 6 13
- 8 5 4 1 0 4 13 2 0 0 9 8 10 1 2 1 4 48 200 12 3 2 2 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ibreve" xMin="160" yMin="0" xMax="1068" yMax="1925">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="269" y="1925" on="1"/>
- <pt x="392" y="1925" on="1"/>
- <pt x="440" y="1777" on="0"/>
- <pt x="614" y="1777" on="1"/>
- <pt x="789" y="1777" on="0"/>
- <pt x="837" y="1925" on="1"/>
- <pt x="960" y="1925" on="1"/>
- <pt x="937" y="1836" on="0"/>
- <pt x="911" y="1790" on="1"/>
- <pt x="820" y="1635" on="0"/>
- <pt x="618" y="1635" on="1"/>
- <pt x="466" y="1635" on="0"/>
- <pt x="377" y="1716" on="1"/>
- <pt x="322" y="1765" on="0"/>
- <pt x="294" y="1837" on="1"/>
- <pt x="283" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 15 14 22 48 200 18 17 13 12 4 13 22 5 0 0 8 7 4 3 6 3 5 10
- 9 2 1 6 3 0 2 4 48 200 11 0 1 0 6 5 0 14 18 17 11 10 7 6 6
- 13 8 13 12 5 4 1 0 6 13 2 0 0 9 8 10 1 2 1 4 48 200 3 2 1
- 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Icircumflex" xMin="160" yMin="0" xMax="1068" yMax="1925">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="248" y="1604" on="1"/>
- <pt x="504" y="1925" on="1"/>
- <pt x="723" y="1925" on="1"/>
- <pt x="979" y="1604" on="1"/>
- <pt x="856" y="1604" on="1"/>
- <pt x="615" y="1806" on="1"/>
- <pt x="612" y="1806" on="1"/>
- <pt x="371" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 19 18 17 16 15 12 6 13 5 3 0 0 8 7 4 3 6 3 5 10 9 2 1 6 3
- 0 2 4 48 200 14 13 1 11 0 1 2 0 6 5 0 14 18 17 2 8 2 3 16 15
- 14 11 10 7 6 7 13 8 19 13 12 5 4 1 0 7 13 2 0 0 9 8 10 1 2
- 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idieresis" xMin="160" yMin="0" xMax="1068" yMax="1801">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="281" y="1604" on="1"/>
- <pt x="281" y="1801" on="1"/>
- <pt x="478" y="1801" on="1"/>
- <pt x="478" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="750" y="1604" on="1"/>
- <pt x="750" y="1801" on="1"/>
- <pt x="947" y="1801" on="1"/>
- <pt x="947" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 19 16 15 12 10 3 13 8 7 4 3 6 3 5 10 9 2 1 6 3 0 3 4
- 48 200 18 17 14 13 3 11 0 1 2 0 6 5 0 14 11 10 7 6 4 13 18 5 4
- 1 0 4 13 12 0 0 17 16 10 1 18 15 14 10 1 12 9 8 10 1 2 3 4 48
- 200 19 18 1 13 12 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idotaccent" xMin="160" yMin="0" xMax="1068" yMax="1801">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="515" y="1604" on="1"/>
- <pt x="515" y="1801" on="1"/>
- <pt x="712" y="1801" on="1"/>
- <pt x="712" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 15 12 10 1 13 8 7 4 3 6 3 5 10 9 2 1 6 3 0 3 4 48 200
- 14 13 1 11 0 1 2 0 6 5 0 14 11 10 7 6 4 13 8 5 4 1 0 4 13
- 2 0 0 15 14 10 1 2 9 8 10 1 2 2 4 48 200 13 12 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Igrave" xMin="160" yMin="0" xMax="1068" yMax="1925">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="712" y="1604" on="1"/>
- <pt x="589" y="1604" on="1"/>
- <pt x="268" y="1925" on="1"/>
- <pt x="496" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 13 12 2 14 5 3 0 0 8 7 4 3 6 3 5 10 9 2 1 6 3 0 2 4 48
- 200 15 14 1 11 0 1 2 0 6 5 0 14 13 12 2 8 2 3 11 10 7 6 4 13
- 8 15 14 5 4 1 0 6 13 2 0 0 9 8 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Imacron" xMin="160" yMin="0" xMax="1068" yMax="1728">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="269" y="1604" on="1"/>
- <pt x="269" y="1728" on="1"/>
- <pt x="960" y="1728" on="1"/>
- <pt x="960" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 15 12 6 1 13 8 7 4 3 6 3 5 10 9 2 1 6 3 0 3 4 48 200
- 14 13 1 11 0 1 2 0 6 5 0 14 15 14 11 10 7 6 6 13 8 13 12 5 4
- 1 0 6 13 2 0 0 9 8 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Iogonek" xMin="160" yMin="-370" xMax="1068" yMax="1480">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="785" y="0" on="1"/>
- <pt x="892" y="0" on="1"/>
- <pt x="763" y="-81" on="0"/>
- <pt x="763" y="-179" on="1"/>
- <pt x="763" y="-275" on="0"/>
- <pt x="878" y="-275" on="1"/>
- <pt x="932" y="-275" on="0"/>
- <pt x="969" y="-260" on="1"/>
- <pt x="969" y="-341" on="1"/>
- <pt x="907" y="-370" on="0"/>
- <pt x="830" y="-370" on="1"/>
- <pt x="627" y="-370" on="0"/>
- <pt x="627" y="-213" on="1"/>
- <pt x="627" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 17 17 22 48 200 20 19 22 0 0 0 8 7 4 3 6 3 5 10 9 2 1 6
- 3 0 2 4 48 200 13 12 11 0 3 0 6 5 0 14 0 0 15 20 24 48 200 24 24
- 8 2 2 20 19 13 12 11 10 7 6 8 13 8 5 4 1 0 4 13 2 0 0 9 8
- 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Itilde" xMin="160" yMin="0" xMax="1068" yMax="1839">
- <contour>
- <pt x="160" y="0" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="515" y="123" on="1"/>
- <pt x="515" y="1357" on="1"/>
- <pt x="160" y="1357" on="1"/>
- <pt x="160" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="713" y="1357" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1068" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="281" y="1604" on="1"/>
- <pt x="287" y="1699" on="0"/>
- <pt x="312" y="1749" on="1"/>
- <pt x="357" y="1839" on="0"/>
- <pt x="466" y="1839" on="1"/>
- <pt x="538" y="1839" on="0"/>
- <pt x="601" y="1800" on="1"/>
- <pt x="661" y="1763" on="1"/>
- <pt x="723" y="1725" on="0"/>
- <pt x="757" y="1725" on="1"/>
- <pt x="825" y="1725" on="0"/>
- <pt x="836" y="1839" on="1"/>
- <pt x="947" y="1839" on="1"/>
- <pt x="940" y="1745" on="0"/>
- <pt x="915" y="1695" on="1"/>
- <pt x="869" y="1604" on="0"/>
- <pt x="762" y="1604" on="1"/>
- <pt x="689" y="1604" on="0"/>
- <pt x="626" y="1643" on="1"/>
- <pt x="566" y="1680" on="1"/>
- <pt x="506" y="1717" on="0"/>
- <pt x="470" y="1717" on="1"/>
- <pt x="402" y="1717" on="0"/>
- <pt x="391" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 33 5 16 21 5 28 48 200 35 24 23 12 4 13 28 16 5 0 0 8 7 4 3
- 6 3 5 10 9 2 1 6 3 0 2 4 48 200 11 0 1 0 6 5 0 14 24 23 11
- 10 7 6 6 13 8 35 12 5 4 1 0 6 13 2 0 0 9 8 10 1 2 1 4 48
- 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="J" xMin="111" yMin="-37" xMax="1143" yMax="1480">
- <contour>
- <pt x="111" y="31" on="1"/>
- <pt x="111" y="444" on="1"/>
- <pt x="234" y="444" on="1"/>
- <pt x="273" y="135" on="1"/>
- <pt x="386" y="86" on="0"/>
- <pt x="467" y="86" on="1"/>
- <pt x="583" y="86" on="0"/>
- <pt x="634" y="141" on="1"/>
- <pt x="686" y="195" on="0"/>
- <pt x="686" y="322" on="1"/>
- <pt x="686" y="1357" on="1"/>
- <pt x="291" y="1357" on="1"/>
- <pt x="291" y="1480" on="1"/>
- <pt x="1143" y="1480" on="1"/>
- <pt x="1143" y="1357" on="1"/>
- <pt x="883" y="1357" on="1"/>
- <pt x="883" y="362" on="1"/>
- <pt x="883" y="148" on="0"/>
- <pt x="791" y="56" on="1"/>
- <pt x="699" y="-37" on="0"/>
- <pt x="487" y="-37" on="1"/>
- <pt x="329" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 5 5 20 48 200 20 2 1 16 9 3 2 1 0 6 10 2 3 0 0 0 15 14
- 11 10 6 3 12 1 4 48 200 13 12 0 14 12 11 3 2 4 9 0 3 14 13 2 13
- 15 0 0 10 9 10 1 15 1 4 48 200 16 15 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Jcircumflex" xMin="111" yMin="-37" xMax="1143" yMax="1925">
- <contour>
- <pt x="111" y="31" on="1"/>
- <pt x="111" y="444" on="1"/>
- <pt x="234" y="444" on="1"/>
- <pt x="273" y="135" on="1"/>
- <pt x="386" y="86" on="0"/>
- <pt x="467" y="86" on="1"/>
- <pt x="583" y="86" on="0"/>
- <pt x="634" y="141" on="1"/>
- <pt x="686" y="195" on="0"/>
- <pt x="686" y="322" on="1"/>
- <pt x="686" y="1357" on="1"/>
- <pt x="291" y="1357" on="1"/>
- <pt x="291" y="1480" on="1"/>
- <pt x="1143" y="1480" on="1"/>
- <pt x="1143" y="1357" on="1"/>
- <pt x="883" y="1357" on="1"/>
- <pt x="883" y="362" on="1"/>
- <pt x="883" y="148" on="0"/>
- <pt x="791" y="56" on="1"/>
- <pt x="699" y="-37" on="0"/>
- <pt x="487" y="-37" on="1"/>
- <pt x="329" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="351" y="1604" on="1"/>
- <pt x="607" y="1925" on="1"/>
- <pt x="826" y="1925" on="1"/>
- <pt x="1082" y="1604" on="1"/>
- <pt x="959" y="1604" on="1"/>
- <pt x="718" y="1806" on="1"/>
- <pt x="715" y="1806" on="1"/>
- <pt x="474" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 96 values pushed */
- 0 0 5 5 20 48 200 20 2 29 28 27 26 25 22 6 23 12 3 1 16 9 3 2 1
- 0 6 10 2 3 0 0 0 15 14 11 10 6 3 12 1 4 48 200 24 23 1 0 13 12
- 0 14 28 27 24 3 15 9 3 29 23 22 12 11 3 2 7 9 0 3 26 25 14 13 4
- 13 15 0 0 10 9 10 1 15 1 4 48 200 16 15 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="K" xMin="74" yMin="0" xMax="1197" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="204" y="123" on="1"/>
- <pt x="204" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="506" y="1480" on="1"/>
- <pt x="506" y="1357" on="1"/>
- <pt x="401" y="1357" on="1"/>
- <pt x="401" y="756" on="1"/>
- <pt x="408" y="756" on="1"/>
- <pt x="838" y="1357" on="1"/>
- <pt x="727" y="1357" on="1"/>
- <pt x="727" y="1480" on="1"/>
- <pt x="1083" y="1480" on="1"/>
- <pt x="1083" y="1357" on="1"/>
- <pt x="991" y="1357" on="1"/>
- <pt x="594" y="811" on="1"/>
- <pt x="1123" y="123" on="1"/>
- <pt x="1197" y="123" on="1"/>
- <pt x="1197" y="0" on="1"/>
- <pt x="772" y="0" on="1"/>
- <pt x="772" y="123" on="1"/>
- <pt x="883" y="123" on="1"/>
- <pt x="408" y="740" on="1"/>
- <pt x="401" y="740" on="1"/>
- <pt x="401" y="123" on="1"/>
- <pt x="524" y="123" on="1"/>
- <pt x="524" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 27 26 25 24 23 22 19 18 17 16 15 12 11 10 9 8 7 4 3 2 1 21 5 0 3
- 28 21 20 0 3 0 14 13 6 5 0 3 14 28 27 24 23 22 21 20 19 18 17 16 15
- 14 13 12 11 10 7 6 19 13 8 5 4 1 0 4 13 2 0 0 26 25 9 8 10 3
- 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Kcommaaccent" xMin="74" yMin="-432" xMax="1197" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="204" y="123" on="1"/>
- <pt x="204" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="506" y="1480" on="1"/>
- <pt x="506" y="1357" on="1"/>
- <pt x="401" y="1357" on="1"/>
- <pt x="401" y="756" on="1"/>
- <pt x="408" y="756" on="1"/>
- <pt x="838" y="1357" on="1"/>
- <pt x="727" y="1357" on="1"/>
- <pt x="727" y="1480" on="1"/>
- <pt x="1083" y="1480" on="1"/>
- <pt x="1083" y="1357" on="1"/>
- <pt x="991" y="1357" on="1"/>
- <pt x="594" y="811" on="1"/>
- <pt x="1123" y="123" on="1"/>
- <pt x="1197" y="123" on="1"/>
- <pt x="1197" y="0" on="1"/>
- <pt x="772" y="0" on="1"/>
- <pt x="772" y="123" on="1"/>
- <pt x="883" y="123" on="1"/>
- <pt x="408" y="740" on="1"/>
- <pt x="401" y="740" on="1"/>
- <pt x="401" y="123" on="1"/>
- <pt x="524" y="123" on="1"/>
- <pt x="524" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="512" y="-421" on="1"/>
- <pt x="512" y="-336" on="1"/>
- <pt x="569" y="-345" on="0"/>
- <pt x="609" y="-345" on="1"/>
- <pt x="718" y="-345" on="0"/>
- <pt x="718" y="-278" on="1"/>
- <pt x="718" y="-205" on="0"/>
- <pt x="561" y="-188" on="1"/>
- <pt x="561" y="-111" on="1"/>
- <pt x="695" y="-114" on="0"/>
- <pt x="761" y="-143" on="1"/>
- <pt x="854" y="-185" on="0"/>
- <pt x="854" y="-280" on="1"/>
- <pt x="854" y="-432" on="0"/>
- <pt x="636" y="-432" on="1"/>
- <pt x="578" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 111 values pushed */
- 0 0 32 32 43 48 200 27 26 25 24 23 22 19 18 17 16 15 12 11 10 9 8 7 4
- 3 2 1 21 5 0 3 37 36 30 29 4 13 43 0 28 21 20 0 3 0 14 13 6 5
- 0 3 14 0 0 34 20 41 48 200 37 36 30 29 28 27 24 23 22 21 20 19 18 17 16
- 15 14 13 12 11 10 7 6 23 13 41 8 5 4 1 0 4 13 2 0 0 26 25 9 8
- 10 3 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="L" xMin="86" yMin="0" xMax="1151" yMax="1480">
- <contour>
- <pt x="1151" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 13 12 2 4 10 3 0 0 9 8 5 4 6 3 6 11 10 20 1 0 3 2 6 1 0
- 3 4 48 200 1 0 1 0 7 6 0 14 8 7 2 11 9 3 6 5 2 1 4 13 3
- 0 0 12 11 6 1 0 10 9 10 1 3 2 4 48 200 13 0 1 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lacute" xMin="86" yMin="0" xMax="1151" yMax="1925">
- <contour>
- <pt x="1151" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- </contour>
- <contour>
- <pt x="407" y="1604" on="1"/>
- <pt x="623" y="1925" on="1"/>
- <pt x="851" y="1925" on="1"/>
- <pt x="530" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 17 14 2 15 6 3 13 12 2 4 10 3 0 0 9 8 5 4 6 3 6 11 10 20 1
- 0 3 2 6 1 0 3 4 48 200 16 15 1 1 0 1 2 0 7 6 0 14 16 15 8
- 7 4 11 9 3 14 9 3 2 6 5 2 1 4 13 3 0 0 12 11 6 1 0 17 10
- 9 10 2 3 2 4 48 200 13 0 1 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcaron" xMin="86" yMin="0" xMax="1151" yMax="1480">
- <contour>
- <pt x="1151" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- </contour>
- <contour>
- <pt x="937" y="1026" on="1"/>
- <pt x="937" y="1085" on="1"/>
- <pt x="1013" y="1106" on="0"/>
- <pt x="1013" y="1266" on="1"/>
- <pt x="1013" y="1283" on="1"/>
- <pt x="937" y="1283" on="1"/>
- <pt x="937" y="1480" on="1"/>
- <pt x="1134" y="1480" on="1"/>
- <pt x="1134" y="1309" on="1"/>
- <pt x="1133" y="1047" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 99 values pushed */
- 22 19 18 17 15 14 13 12 8 4 10 3 0 0 9 8 5 4 6 3 6 11 10 20 1
- 0 3 2 6 1 0 3 4 48 200 1 0 1 0 21 20 7 6 0 3 14 18 17 2 11
- 14 3 8 7 2 14 9 3 6 5 2 1 4 13 3 0 0 20 19 15 14 10 3 21 12
- 11 6 1 0 10 9 10 1 3 3 4 48 200 22 21 1 13 0 1 4 3 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcommaaccent" xMin="86" yMin="-432" xMax="1151" yMax="1480">
- <contour>
- <pt x="1151" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- </contour>
- <contour>
- <pt x="518" y="-421" on="1"/>
- <pt x="518" y="-336" on="1"/>
- <pt x="575" y="-345" on="0"/>
- <pt x="615" y="-345" on="1"/>
- <pt x="724" y="-345" on="0"/>
- <pt x="724" y="-278" on="1"/>
- <pt x="724" y="-205" on="0"/>
- <pt x="567" y="-188" on="1"/>
- <pt x="567" y="-111" on="1"/>
- <pt x="701" y="-114" on="0"/>
- <pt x="767" y="-143" on="1"/>
- <pt x="860" y="-185" on="0"/>
- <pt x="860" y="-280" on="1"/>
- <pt x="860" y="-432" on="0"/>
- <pt x="642" y="-432" on="1"/>
- <pt x="584" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 106 values pushed */
- 0 0 17 32 28 48 200 13 12 2 4 10 3 22 21 15 14 4 13 28 0 0 0 9 8
- 5 4 6 3 6 11 10 20 1 0 3 2 6 1 0 3 4 48 200 1 0 1 0 7 6
- 0 14 0 0 19 20 26 48 200 26 26 22 21 8 7 5 11 9 3 15 14 2 9 3 3
- 6 5 2 1 4 13 3 0 0 12 11 6 1 0 10 9 10 1 3 2 4 48 200 13 0
- 1 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ldot" xMin="86" yMin="0" xMax="1151" yMax="1480">
- <contour>
- <pt x="1151" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- </contour>
- <contour>
- <pt x="954" y="740" on="1"/>
- <pt x="954" y="937" on="1"/>
- <pt x="1151" y="937" on="1"/>
- <pt x="1151" y="740" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 13 12 2 14 10 3 0 0 17 14 10 1 15 9 8 5 4 6 3 6 11 10 20 1 0
- 3 2 6 1 0 4 4 48 200 16 15 1 1 0 1 2 0 7 6 0 14 8 7 2 14
- 9 3 6 5 2 1 4 13 3 0 0 15 14 10 1 0 12 11 6 1 0 10 9 10 1
- 3 3 4 48 200 17 16 13 0 3 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lslash" xMin="86" yMin="0" xMax="1151" yMax="1480">
- <contour>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="652" on="1"/>
- <pt x="86" y="528" on="1"/>
- <pt x="86" y="666" on="1"/>
- <pt x="333" y="790" on="1"/>
- <pt x="333" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="765" y="1480" on="1"/>
- <pt x="765" y="1357" on="1"/>
- <pt x="530" y="1357" on="1"/>
- <pt x="530" y="888" on="1"/>
- <pt x="826" y="1036" on="1"/>
- <pt x="826" y="899" on="1"/>
- <pt x="530" y="750" on="1"/>
- <pt x="530" y="136" on="1"/>
- <pt x="1028" y="136" on="1"/>
- <pt x="1028" y="481" on="1"/>
- <pt x="1151" y="481" on="1"/>
- <pt x="1151" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 20 19 16 15 14 13 6 5 4 3 10 7 17 3 0 0 12 11 8 7 6 3 9 18 17
- 20 1 0 2 1 6 1 0 3 4 48 200 21 0 1 0 10 9 0 14 11 10 2 14 12
- 3 0 0 19 18 6 1 20 17 16 13 12 10 3 2 2 4 48 200 21 20 1 15 14 1
- 7 6 3 2 3 9 8 5 4 1 0 5 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="M" xMin="25" yMin="0" xMax="1204" yMax="1480">
- <contour>
- <pt x="25" y="0" on="1"/>
- <pt x="25" y="123" on="1"/>
- <pt x="111" y="123" on="1"/>
- <pt x="111" y="1357" on="1"/>
- <pt x="25" y="1357" on="1"/>
- <pt x="25" y="1480" on="1"/>
- <pt x="310" y="1480" on="1"/>
- <pt x="616" y="462" on="1"/>
- <pt x="618" y="462" on="1"/>
- <pt x="935" y="1480" on="1"/>
- <pt x="1204" y="1480" on="1"/>
- <pt x="1204" y="1357" on="1"/>
- <pt x="1118" y="1357" on="1"/>
- <pt x="1118" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="884" y="0" on="1"/>
- <pt x="884" y="123" on="1"/>
- <pt x="956" y="123" on="1"/>
- <pt x="956" y="1128" on="1"/>
- <pt x="954" y="1128" on="1"/>
- <pt x="663" y="194" on="1"/>
- <pt x="528" y="194" on="1"/>
- <pt x="237" y="1166" on="1"/>
- <pt x="235" y="1166" on="1"/>
- <pt x="235" y="123" on="1"/>
- <pt x="321" y="123" on="1"/>
- <pt x="321" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 26 25 24 23 22 21 20 19 18 17 14 13 12 11 8 7 4 3 2 1 20 5 0 3 27
- 16 15 0 3 0 10 9 6 5 0 3 14 27 26 23 22 21 20 17 16 9 8 7 6 12
- 18 24 3 15 14 11 10 4 13 12 5 4 1 0 4 13 2 0 0 19 18 34 1 12 25
- 24 6 1 2 2 4 48 200 13 12 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="N" xMin="74" yMin="0" xMax="1155" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 20 19 18 17 14 13 10 9 8 7 4 3 2 1 14 5 0 3 21 16 15 0 3 0 12
- 11 6 5 0 3 14 21 20 17 11 10 7 6 8 6 3 13 12 2 13 14 5 4 1 0
- 4 13 2 0 0 16 9 8 6 2 14 19 18 6 6 2 2 2 4 48 200 15 14 1 3
- 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Nacute" xMin="74" yMin="0" xMax="1155" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="493" y="1604" on="1"/>
- <pt x="709" y="1925" on="1"/>
- <pt x="937" y="1925" on="1"/>
- <pt x="616" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 96 values pushed */
- 25 22 2 23 5 3 20 19 18 17 14 13 10 9 8 7 4 3 2 1 14 5 0 3 24
- 23 1 21 16 15 0 3 2 0 12 11 6 5 0 3 14 24 14 8 2 25 23 22 21 20
- 17 11 10 7 9 8 6 3 13 12 2 13 14 5 4 1 0 4 13 2 0 0 16 9 8
- 6 2 14 19 18 6 6 2 2 2 4 48 200 15 14 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncaron" xMin="74" yMin="0" xMax="1155" yMax="1925">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="981" y="1925" on="1"/>
- <pt x="724" y="1604" on="1"/>
- <pt x="506" y="1604" on="1"/>
- <pt x="249" y="1925" on="1"/>
- <pt x="373" y="1925" on="1"/>
- <pt x="614" y="1723" on="1"/>
- <pt x="616" y="1723" on="1"/>
- <pt x="858" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 106 values pushed */
- 20 19 18 17 14 13 10 9 8 7 4 3 2 1 14 5 0 3 29 28 27 26 25 22 6
- 13 23 24 23 1 21 16 15 0 3 2 0 12 11 6 5 0 3 14 22 14 8 2 29 28
- 27 26 24 23 21 20 17 11 10 7 12 8 6 3 25 6 2 2 13 12 2 13 14 5 4
- 1 0 4 13 2 0 0 16 9 8 6 2 14 19 18 6 6 2 2 2 4 48 200 15 14
- 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncommaaccent" xMin="74" yMin="-432" xMax="1155" yMax="1480">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="481" y="-421" on="1"/>
- <pt x="481" y="-336" on="1"/>
- <pt x="538" y="-345" on="0"/>
- <pt x="578" y="-345" on="1"/>
- <pt x="687" y="-345" on="0"/>
- <pt x="687" y="-278" on="1"/>
- <pt x="687" y="-205" on="0"/>
- <pt x="530" y="-188" on="1"/>
- <pt x="530" y="-111" on="1"/>
- <pt x="664" y="-114" on="0"/>
- <pt x="730" y="-143" on="1"/>
- <pt x="823" y="-185" on="0"/>
- <pt x="823" y="-280" on="1"/>
- <pt x="823" y="-432" on="0"/>
- <pt x="605" y="-432" on="1"/>
- <pt x="547" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 107 values pushed */
- 0 0 25 32 36 48 200 20 19 18 17 14 13 10 9 8 7 4 3 2 1 14 5 0 3
- 30 29 23 22 4 13 36 0 21 16 15 0 3 0 12 11 6 5 0 3 14 0 0 27 20
- 34 48 200 34 34 30 29 23 22 21 20 17 11 10 7 11 8 6 3 13 12 2 13 14 5
- 4 1 0 4 13 2 0 0 16 9 8 6 2 14 19 18 6 6 2 2 2 4 48 200 15
- 14 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ntilde" xMin="74" yMin="0" xMax="1155" yMax="1839">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="185" y="123" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="74" y="1357" on="1"/>
- <pt x="74" y="1480" on="1"/>
- <pt x="308" y="1480" on="1"/>
- <pt x="918" y="405" on="1"/>
- <pt x="920" y="405" on="1"/>
- <pt x="920" y="1357" on="1"/>
- <pt x="810" y="1357" on="1"/>
- <pt x="810" y="1480" on="1"/>
- <pt x="1155" y="1480" on="1"/>
- <pt x="1155" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="0" on="1"/>
- <pt x="920" y="0" on="1"/>
- <pt x="311" y="1076" on="1"/>
- <pt x="308" y="1076" on="1"/>
- <pt x="308" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="271" y="1604" on="1"/>
- <pt x="277" y="1699" on="0"/>
- <pt x="302" y="1749" on="1"/>
- <pt x="347" y="1839" on="0"/>
- <pt x="456" y="1839" on="1"/>
- <pt x="528" y="1839" on="0"/>
- <pt x="591" y="1800" on="1"/>
- <pt x="651" y="1763" on="1"/>
- <pt x="713" y="1725" on="0"/>
- <pt x="747" y="1725" on="1"/>
- <pt x="816" y="1725" on="0"/>
- <pt x="826" y="1839" on="1"/>
- <pt x="937" y="1839" on="1"/>
- <pt x="930" y="1745" on="0"/>
- <pt x="905" y="1695" on="1"/>
- <pt x="859" y="1604" on="0"/>
- <pt x="752" y="1604" on="1"/>
- <pt x="679" y="1604" on="0"/>
- <pt x="616" y="1643" on="1"/>
- <pt x="556" y="1680" on="1"/>
- <pt x="496" y="1717" on="0"/>
- <pt x="460" y="1717" on="1"/>
- <pt x="392" y="1717" on="0"/>
- <pt x="381" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 43 5 26 31 5 38 48 200 20 19 18 17 14 13 10 9 8 7 4 3 2 1 14
- 5 0 3 45 34 33 22 4 13 38 26 5 21 16 15 0 3 0 12 11 6 5 0 3 14
- 34 14 8 2 45 33 21 20 17 11 10 7 8 8 6 3 22 6 2 2 13 12 2 13 14
- 5 4 1 0 4 13 2 0 0 16 9 8 6 2 14 19 18 6 6 2 2 2 4 48 200
- 15 14 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="O" xMin="62" yMin="-37" xMax="1168" yMax="1517">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 14 0 0 28 39 4 20 39 12 48 200
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="OE" xMin="37" yMin="-37" xMax="1167" yMax="1518">
- <contour>
- <pt x="609" y="0" on="1"/>
- <pt x="609" y="74" on="1"/>
- <pt x="549" y="-37" on="0"/>
- <pt x="436" y="-37" on="1"/>
- <pt x="252" y="-37" on="0"/>
- <pt x="145" y="170" on="1"/>
- <pt x="37" y="377" on="0"/>
- <pt x="37" y="740" on="1"/>
- <pt x="37" y="1101" on="0"/>
- <pt x="144" y="1310" on="1"/>
- <pt x="251" y="1518" on="0"/>
- <pt x="435" y="1518" on="1"/>
- <pt x="552" y="1518" on="0"/>
- <pt x="609" y="1406" on="1"/>
- <pt x="609" y="1480" on="1"/>
- <pt x="1142" y="1480" on="1"/>
- <pt x="1142" y="1166" on="1"/>
- <pt x="1019" y="1166" on="1"/>
- <pt x="1019" y="1357" on="1"/>
- <pt x="800" y="1357" on="1"/>
- <pt x="800" y="827" on="1"/>
- <pt x="945" y="827" on="1"/>
- <pt x="945" y="950" on="1"/>
- <pt x="1056" y="950" on="1"/>
- <pt x="1056" y="580" on="1"/>
- <pt x="945" y="580" on="1"/>
- <pt x="945" y="703" on="1"/>
- <pt x="800" y="703" on="1"/>
- <pt x="800" y="136" on="1"/>
- <pt x="1044" y="136" on="1"/>
- <pt x="1044" y="370" on="1"/>
- <pt x="1167" y="370" on="1"/>
- <pt x="1167" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="609" y="364" on="1"/>
- <pt x="609" y="1117" on="1"/>
- <pt x="609" y="1395" on="0"/>
- <pt x="460" y="1395" on="1"/>
- <pt x="237" y="1395" on="0"/>
- <pt x="237" y="746" on="1"/>
- <pt x="237" y="396" on="0"/>
- <pt x="289" y="240" on="1"/>
- <pt x="340" y="86" on="0"/>
- <pt x="457" y="86" on="1"/>
- <pt x="609" y="86" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 131 values pushed */
- 0 0 42 5 3 36 5 11 48 200 11 0 3 2 13 14 18 2 34 23 22 17 16 5 18
- 20 3 33 31 30 25 24 5 26 28 3 1 28 0 2 0 0 19 18 6 1 14 27 26 6
- 1 20 29 28 20 1 0 3 4 48 200 21 20 1 32 0 1 2 0 15 14 0 14 0 0
- 38 24 7 48 200 26 25 22 21 4 17 19 3 7 0 0 0 30 29 6 1 31 18 17 6
- 1 15 34 33 14 13 1 0 19 5 19 3 4 48 200 32 31 1 16 15 1 24 23 1 28
- 27 20 19 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oacute" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="491" y="1604" on="1"/>
- <pt x="707" y="1925" on="1"/>
- <pt x="935" y="1925" on="1"/>
- <pt x="614" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 1 35 32 2 33 0 3 0 34 33 1
- 0 14 0 0 28 39 4 20 39 12 48 200 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Obreve" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="269" y="1925" on="1"/>
- <pt x="392" y="1925" on="1"/>
- <pt x="440" y="1777" on="0"/>
- <pt x="614" y="1777" on="1"/>
- <pt x="789" y="1777" on="0"/>
- <pt x="837" y="1925" on="1"/>
- <pt x="960" y="1925" on="1"/>
- <pt x="937" y="1836" on="0"/>
- <pt x="911" y="1790" on="1"/>
- <pt x="820" y="1635" on="0"/>
- <pt x="618" y="1635" on="1"/>
- <pt x="466" y="1635" on="0"/>
- <pt x="377" y="1716" on="1"/>
- <pt x="322" y="1765" on="0"/>
- <pt x="294" y="1837" on="1"/>
- <pt x="283" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 35 14 42 24 5 8 16 5 0 48 200 8 2 0 0 1 38 37 33 32 4 13 42
- 0 0 14 0 0 28 36 4 20 36 12 48 200 38 37 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ocircumflex" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="249" y="1604" on="1"/>
- <pt x="505" y="1925" on="1"/>
- <pt x="724" y="1925" on="1"/>
- <pt x="980" y="1604" on="1"/>
- <pt x="857" y="1604" on="1"/>
- <pt x="616" y="1806" on="1"/>
- <pt x="613" y="1806" on="1"/>
- <pt x="372" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 1 39 38 37 36 35 32 6 33 0 3
- 0 34 33 1 0 14 0 0 28 39 4 20 39 12 48 200 39 38 37 36 35 34 33 32 12
- 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Odieresis" xMin="62" yMin="-37" xMax="1168" yMax="1801">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="282" y="1604" on="1"/>
- <pt x="282" y="1801" on="1"/>
- <pt x="479" y="1801" on="1"/>
- <pt x="479" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="751" y="1604" on="1"/>
- <pt x="751" y="1801" on="1"/>
- <pt x="948" y="1801" on="1"/>
- <pt x="948" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 0 0 39 36 35 32 10 3 33 1 4
- 48 200 38 37 34 33 3 0 14 0 0 28 39 4 20 39 12 48 200 4 38 12 32 0 0
- 37 36 10 1 38 35 34 10 1 32 2 4 48 200 39 38 1 33 32 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ograve" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="738" y="1604" on="1"/>
- <pt x="615" y="1604" on="1"/>
- <pt x="294" y="1925" on="1"/>
- <pt x="522" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 1 33 32 2 34 0 3 0 35 34 1
- 0 14 0 0 28 39 4 20 39 12 48 200 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ohungarumlaut" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="313" y="1604" on="1"/>
- <pt x="553" y="1925" on="1"/>
- <pt x="745" y="1925" on="1"/>
- <pt x="424" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="664" y="1604" on="1"/>
- <pt x="905" y="1925" on="1"/>
- <pt x="1096" y="1925" on="1"/>
- <pt x="775" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 1 39 36 35 32 4 33 0 3 0 38
- 37 34 33 3 0 14 0 0 28 39 4 20 39 12 48 200 39 38 37 36 35 34 33 32 12
- 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Omacron" xMin="62" yMin="-37" xMax="1168" yMax="1728">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="269" y="1604" on="1"/>
- <pt x="269" y="1728" on="1"/>
- <pt x="960" y="1728" on="1"/>
- <pt x="960" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 0 0 35 32 6 1 33 1 4 48 200
- 34 33 1 0 14 0 0 28 39 4 20 39 12 48 200 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oslash" xMin="62" yMin="-37" xMax="1168" yMax="1517">
- <contour>
- <pt x="321" y="371" on="1"/>
- <pt x="865" y="1225" on="1"/>
- <pt x="774" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="453" y="1394" on="0"/>
- <pt x="364" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="742" on="1"/>
- <pt x="275" y="545" on="0"/>
- </contour>
- <contour>
- <pt x="364" y="254" on="1"/>
- <pt x="457" y="86" on="0"/>
- <pt x="613" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="865" y="258" on="1"/>
- <pt x="955" y="431" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="937" on="0"/>
- <pt x="908" y="1110" on="1"/>
- </contour>
- <contour>
- <pt x="62" y="-37" on="1"/>
- <pt x="206" y="190" on="1"/>
- <pt x="62" y="432" on="0"/>
- <pt x="62" y="739" on="1"/>
- <pt x="62" y="1083" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="370" y="1517" on="0"/>
- <pt x="613" y="1517" on="1"/>
- <pt x="799" y="1517" on="0"/>
- <pt x="958" y="1371" on="1"/>
- <pt x="1051" y="1517" on="1"/>
- <pt x="1168" y="1517" on="1"/>
- <pt x="1023" y="1290" on="1"/>
- <pt x="1168" y="1048" on="0"/>
- <pt x="1168" y="740" on="1"/>
- <pt x="1168" y="398" on="0"/>
- <pt x="1014" y="181" on="1"/>
- <pt x="860" y="-37" on="0"/>
- <pt x="616" y="-37" on="1"/>
- <pt x="431" y="-37" on="0"/>
- <pt x="272" y="110" on="1"/>
- <pt x="179" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 61 values pushed */
- 36 2 25 0 3 1 1 30 27 17 3 1 5 0 1 3 0 0 11 1 1 38 19 11 9
- 0 5 1 2 3 0 0 1 29 28 2 13 0 0 1 39 18 2 0 14 39 38 32 30 29
- 28 27 21 19 18 17 15 9 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Otilde" xMin="62" yMin="-37" xMax="1168" yMax="1839">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="858" y="1517" on="0"/>
- <pt x="1013" y="1301" on="1"/>
- <pt x="1168" y="1085" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="394" on="0"/>
- <pt x="1013" y="179" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="608" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="249" y="138" on="1"/>
- <pt x="62" y="363" on="0"/>
- <pt x="62" y="741" on="1"/>
- <pt x="62" y="1084" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="371" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1049" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1222" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <contour>
- <pt x="282" y="1604" on="1"/>
- <pt x="288" y="1699" on="0"/>
- <pt x="313" y="1749" on="1"/>
- <pt x="358" y="1839" on="0"/>
- <pt x="467" y="1839" on="1"/>
- <pt x="539" y="1839" on="0"/>
- <pt x="602" y="1800" on="1"/>
- <pt x="662" y="1763" on="1"/>
- <pt x="724" y="1725" on="0"/>
- <pt x="758" y="1725" on="1"/>
- <pt x="826" y="1725" on="0"/>
- <pt x="837" y="1839" on="1"/>
- <pt x="948" y="1839" on="1"/>
- <pt x="941" y="1745" on="0"/>
- <pt x="916" y="1695" on="1"/>
- <pt x="870" y="1604" on="0"/>
- <pt x="763" y="1604" on="1"/>
- <pt x="690" y="1604" on="0"/>
- <pt x="627" y="1643" on="1"/>
- <pt x="567" y="1680" on="1"/>
- <pt x="507" y="1717" on="0"/>
- <pt x="471" y="1717" on="1"/>
- <pt x="403" y="1717" on="0"/>
- <pt x="392" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 53 5 36 41 5 48 24 5 8 16 5 0 48 200 8 2 0 0 1 55 44 43 32
- 4 13 48 36 0 0 14 0 0 28 39 4 20 39 12 48 200 55 44 43 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="P" xMin="86" yMin="0" xMax="1124" yMax="1480">
- <contour>
- <pt x="481" y="598" on="1"/>
- <pt x="481" y="123" on="1"/>
- <pt x="765" y="123" on="1"/>
- <pt x="765" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="283" y="123" on="1"/>
- <pt x="283" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="747" y="1480" on="1"/>
- <pt x="1124" y="1480" on="0"/>
- <pt x="1124" y="1119" on="1"/>
- <pt x="1124" y="878" on="0"/>
- <pt x="984" y="738" on="1"/>
- <pt x="844" y="598" on="0"/>
- <pt x="599" y="598" on="1"/>
- </contour>
- <contour>
- <pt x="481" y="722" on="1"/>
- <pt x="592" y="722" on="1"/>
- <pt x="914" y="722" on="0"/>
- <pt x="914" y="1089" on="1"/>
- <pt x="914" y="1357" on="0"/>
- <pt x="682" y="1357" on="1"/>
- <pt x="481" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 18 17 16 0 4 7 1 3 0 0 23 22 8 7 6 3 9 6 5 2 1 6 3 3 2
- 4 48 200 4 3 1 0 10 9 0 14 0 0 20 39 12 48 200 22 18 16 10 3 2 6
- 13 12 0 9 8 5 4 4 13 6 0 0 23 17 1 0 10 3 6 1 4 48 200 7 6
- 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Q" xMin="62" yMin="-321" xMax="1223" yMax="1517">
- <contour>
- <pt x="615" y="-37" on="1"/>
- <pt x="459" y="-12" on="0"/>
- <pt x="376" y="29" on="1"/>
- <pt x="276" y="78" on="0"/>
- <pt x="198" y="205" on="1"/>
- <pt x="62" y="428" on="0"/>
- <pt x="62" y="740" on="1"/>
- <pt x="62" y="1083" on="0"/>
- <pt x="216" y="1300" on="1"/>
- <pt x="370" y="1517" on="0"/>
- <pt x="615" y="1517" on="1"/>
- <pt x="859" y="1517" on="0"/>
- <pt x="1013" y="1300" on="1"/>
- <pt x="1168" y="1083" on="0"/>
- <pt x="1168" y="741" on="1"/>
- <pt x="1168" y="421" on="0"/>
- <pt x="1034" y="209" on="1"/>
- <pt x="943" y="66" on="0"/>
- <pt x="789" y="-2" on="1"/>
- <pt x="951" y="-103" on="0"/>
- <pt x="1223" y="-163" on="1"/>
- <pt x="1154" y="-248" on="0"/>
- <pt x="1055" y="-321" on="1"/>
- <pt x="846" y="-242" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1394" on="1"/>
- <pt x="454" y="1394" on="0"/>
- <pt x="365" y="1222" on="1"/>
- <pt x="275" y="1050" on="0"/>
- <pt x="275" y="740" on="1"/>
- <pt x="275" y="434" on="0"/>
- <pt x="364" y="260" on="1"/>
- <pt x="452" y="86" on="0"/>
- <pt x="614" y="86" on="1"/>
- <pt x="776" y="86" on="0"/>
- <pt x="860" y="236" on="1"/>
- <pt x="955" y="405" on="0"/>
- <pt x="955" y="738" on="1"/>
- <pt x="955" y="1051" on="0"/>
- <pt x="865" y="1223" on="1"/>
- <pt x="774" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 36 values pushed */
- 0 0 24 5 10 48 200 10 0 1 22 20 18 0 4 13 32 0 0 14 0 0 36 39 14
- 28 39 6 48 200 22 20 18 14 6 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="R" xMin="86" yMin="0" xMax="1204" yMax="1480">
- <contour>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="216" y="123" on="1"/>
- <pt x="216" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="673" y="1480" on="1"/>
- <pt x="849" y="1480" on="0"/>
- <pt x="950" y="1383" on="1"/>
- <pt x="1052" y="1286" on="0"/>
- <pt x="1052" y="1118" on="1"/>
- <pt x="1052" y="965" on="0"/>
- <pt x="960" y="847" on="1"/>
- <pt x="906" y="779" on="0"/>
- <pt x="803" y="709" on="1"/>
- <pt x="1116" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="951" y="0" on="1"/>
- <pt x="612" y="648" on="1"/>
- <pt x="413" y="648" on="1"/>
- <pt x="413" y="123" on="1"/>
- <pt x="543" y="123" on="1"/>
- <pt x="543" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="771" on="1"/>
- <pt x="512" y="771" on="1"/>
- <pt x="842" y="771" on="0"/>
- <pt x="842" y="1096" on="1"/>
- <pt x="842" y="1357" on="0"/>
- <pt x="592" y="1357" on="1"/>
- <pt x="413" y="1357" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 25 24 14 3 3 19 3 22 21 16 15 2 1 6 19 0 3 0 0 30 29 4 3 6 3
- 5 1 4 48 200 20 19 1 23 18 17 0 3 2 0 6 5 0 14 0 0 27 39 10 48
- 200 29 25 23 22 19 18 17 16 15 14 6 11 13 10 20 5 4 1 0 4 13 2 0 0
- 30 24 21 20 10 3 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Racute" xMin="86" yMin="0" xMax="1204" yMax="1925">
- <contour>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="216" y="123" on="1"/>
- <pt x="216" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="673" y="1480" on="1"/>
- <pt x="849" y="1480" on="0"/>
- <pt x="950" y="1383" on="1"/>
- <pt x="1052" y="1286" on="0"/>
- <pt x="1052" y="1118" on="1"/>
- <pt x="1052" y="965" on="0"/>
- <pt x="960" y="847" on="1"/>
- <pt x="906" y="779" on="0"/>
- <pt x="803" y="709" on="1"/>
- <pt x="1116" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="951" y="0" on="1"/>
- <pt x="612" y="648" on="1"/>
- <pt x="413" y="648" on="1"/>
- <pt x="413" y="123" on="1"/>
- <pt x="543" y="123" on="1"/>
- <pt x="543" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="771" on="1"/>
- <pt x="512" y="771" on="1"/>
- <pt x="842" y="771" on="0"/>
- <pt x="842" y="1096" on="1"/>
- <pt x="842" y="1357" on="0"/>
- <pt x="592" y="1357" on="1"/>
- <pt x="413" y="1357" on="1"/>
- </contour>
- <contour>
- <pt x="450" y="1604" on="1"/>
- <pt x="666" y="1925" on="1"/>
- <pt x="894" y="1925" on="1"/>
- <pt x="573" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 34 31 2 32 5 3 25 24 14 3 3 19 3 22 21 16 15 2 1 6 19 0 3 0 0
- 30 29 4 3 6 3 5 1 4 48 200 33 32 1 20 19 1 23 18 17 0 3 3 0 6
- 5 0 14 0 0 27 39 10 48 200 34 33 32 31 29 25 23 22 19 18 17 16 15 14 6
- 15 13 10 20 5 4 1 0 4 13 2 0 0 30 24 21 20 10 3 2 1 4 48 200 3
- 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcaron" xMin="86" yMin="0" xMax="1204" yMax="1925">
- <contour>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="216" y="123" on="1"/>
- <pt x="216" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="673" y="1480" on="1"/>
- <pt x="849" y="1480" on="0"/>
- <pt x="950" y="1383" on="1"/>
- <pt x="1052" y="1286" on="0"/>
- <pt x="1052" y="1118" on="1"/>
- <pt x="1052" y="965" on="0"/>
- <pt x="960" y="847" on="1"/>
- <pt x="906" y="779" on="0"/>
- <pt x="803" y="709" on="1"/>
- <pt x="1116" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="951" y="0" on="1"/>
- <pt x="612" y="648" on="1"/>
- <pt x="413" y="648" on="1"/>
- <pt x="413" y="123" on="1"/>
- <pt x="543" y="123" on="1"/>
- <pt x="543" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="771" on="1"/>
- <pt x="512" y="771" on="1"/>
- <pt x="842" y="771" on="0"/>
- <pt x="842" y="1096" on="1"/>
- <pt x="842" y="1357" on="0"/>
- <pt x="592" y="1357" on="1"/>
- <pt x="413" y="1357" on="1"/>
- </contour>
- <contour>
- <pt x="925" y="1925" on="1"/>
- <pt x="668" y="1604" on="1"/>
- <pt x="450" y="1604" on="1"/>
- <pt x="193" y="1925" on="1"/>
- <pt x="317" y="1925" on="1"/>
- <pt x="558" y="1723" on="1"/>
- <pt x="560" y="1723" on="1"/>
- <pt x="802" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 113 values pushed */
- 25 24 14 3 3 19 3 22 21 16 15 2 1 6 19 0 3 38 37 36 35 34 31 6 13
- 32 0 0 30 29 4 3 6 3 5 1 4 48 200 33 32 1 20 19 1 23 18 17 0 3
- 3 0 6 5 0 14 0 0 27 39 10 48 200 35 20 2 2 38 37 36 33 32 31 29 25
- 23 22 19 18 17 16 15 14 6 17 13 10 20 34 5 4 1 0 5 13 2 0 0 30 24
- 21 20 10 3 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcommaaccent" xMin="86" yMin="-432" xMax="1204" yMax="1480">
- <contour>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="216" y="123" on="1"/>
- <pt x="216" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="673" y="1480" on="1"/>
- <pt x="849" y="1480" on="0"/>
- <pt x="950" y="1383" on="1"/>
- <pt x="1052" y="1286" on="0"/>
- <pt x="1052" y="1118" on="1"/>
- <pt x="1052" y="965" on="0"/>
- <pt x="960" y="847" on="1"/>
- <pt x="906" y="779" on="0"/>
- <pt x="803" y="709" on="1"/>
- <pt x="1116" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="951" y="0" on="1"/>
- <pt x="612" y="648" on="1"/>
- <pt x="413" y="648" on="1"/>
- <pt x="413" y="123" on="1"/>
- <pt x="543" y="123" on="1"/>
- <pt x="543" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="771" on="1"/>
- <pt x="512" y="771" on="1"/>
- <pt x="842" y="771" on="0"/>
- <pt x="842" y="1096" on="1"/>
- <pt x="842" y="1357" on="0"/>
- <pt x="592" y="1357" on="1"/>
- <pt x="413" y="1357" on="1"/>
- </contour>
- <contour>
- <pt x="542" y="-421" on="1"/>
- <pt x="542" y="-336" on="1"/>
- <pt x="599" y="-345" on="0"/>
- <pt x="639" y="-345" on="1"/>
- <pt x="748" y="-345" on="0"/>
- <pt x="748" y="-278" on="1"/>
- <pt x="748" y="-205" on="0"/>
- <pt x="591" y="-188" on="1"/>
- <pt x="591" y="-111" on="1"/>
- <pt x="725" y="-114" on="0"/>
- <pt x="791" y="-143" on="1"/>
- <pt x="884" y="-185" on="0"/>
- <pt x="884" y="-280" on="1"/>
- <pt x="884" y="-432" on="0"/>
- <pt x="666" y="-432" on="1"/>
- <pt x="607" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 113 values pushed */
- 0 0 34 32 45 48 200 25 24 14 3 3 19 3 22 21 16 15 2 1 6 19 0 3 39
- 38 32 31 4 13 45 0 0 0 30 29 4 3 6 3 5 1 4 48 200 20 19 1 23 18
- 17 0 3 2 0 6 5 0 14 0 0 36 20 43 27 39 10 48 200 39 38 32 31 29 25
- 23 22 19 18 17 16 15 14 6 15 13 43 10 20 5 4 1 0 4 13 2 0 0 30 24
- 21 20 10 3 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="S" xMin="151" yMin="-37" xMax="1091" yMax="1517">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="631" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="822" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 61 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 0 1 1 23 22 21 20 3 2 1 0 8
- 0 2 3 0 0 14 0 0 27 19 16 9 28 36 48 200 16 23 22 16 3 2 5 20 0
- 3 36 20 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Sacute" xMin="151" yMin="-37" xMax="1091" yMax="1925">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="631" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="822" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="509" y="1604" on="1"/>
- <pt x="725" y="1925" on="1"/>
- <pt x="953" y="1925" on="1"/>
- <pt x="632" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 0 1 45 42 2 43 0 3 0 1 1 23
- 22 21 20 3 2 1 0 8 0 2 3 0 0 44 43 1 0 14 0 0 27 19 16 9 28
- 36 48 200 16 45 44 43 42 23 22 16 3 2 9 20 0 3 36 20 21 20 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scaron" xMin="151" yMin="-37" xMax="1091" yMax="1925">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="631" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="822" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="999" y="1925" on="1"/>
- <pt x="742" y="1604" on="1"/>
- <pt x="524" y="1604" on="1"/>
- <pt x="267" y="1925" on="1"/>
- <pt x="391" y="1925" on="1"/>
- <pt x="632" y="1723" on="1"/>
- <pt x="634" y="1723" on="1"/>
- <pt x="876" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 0 1 1 23 22 21 20 3 2 1 0 8
- 0 2 3 0 0 49 48 47 46 45 42 6 13 43 44 43 1 0 14 0 0 27 19 16 9
- 28 36 48 200 16 49 48 47 46 45 44 43 42 23 22 16 3 2 13 20 0 3 36 20 21
- 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scedilla" xMin="151" yMin="-432" xMax="1091" yMax="1517">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="632" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="554" y="0" on="1"/>
- <pt x="651" y="0" on="1"/>
- <pt x="591" y="-109" on="1"/>
- <pt x="663" y="-111" on="0"/>
- <pt x="715" y="-148" on="1"/>
- <pt x="785" y="-197" on="0"/>
- <pt x="785" y="-269" on="1"/>
- <pt x="785" y="-337" on="0"/>
- <pt x="726" y="-384" on="1"/>
- <pt x="668" y="-432" on="0"/>
- <pt x="581" y="-432" on="1"/>
- <pt x="514" y="-432" on="0"/>
- <pt x="438" y="-411" on="1"/>
- <pt x="438" y="-330" on="1"/>
- <pt x="488" y="-345" on="0"/>
- <pt x="542" y="-345" on="1"/>
- <pt x="646" y="-345" on="0"/>
- <pt x="646" y="-271" on="1"/>
- <pt x="646" y="-178" on="0"/>
- <pt x="459" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 57 32 52 25 5 18 5 5 40 48 200 40 2 18 0 1 1 23 22 21 20 3 2
- 1 0 8 0 2 3 0 0 1 61 55 54 44 43 42 6 13 52 2 0 14 0 0 59 20
- 48 27 19 16 9 28 36 48 200 48 16 61 55 54 48 44 43 42 23 22 16 3 2 12 20
- 0 3 36 20 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scircumflex" xMin="151" yMin="-37" xMax="1091" yMax="1925">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="631" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="822" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="267" y="1604" on="1"/>
- <pt x="523" y="1925" on="1"/>
- <pt x="742" y="1925" on="1"/>
- <pt x="998" y="1604" on="1"/>
- <pt x="875" y="1604" on="1"/>
- <pt x="634" y="1806" on="1"/>
- <pt x="631" y="1806" on="1"/>
- <pt x="390" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 0 1 49 48 47 46 45 42 6 43 0 3
- 0 1 1 23 22 21 20 3 2 1 0 8 0 2 3 0 0 44 43 1 0 14 0 0 27
- 19 16 9 28 36 48 200 16 49 48 47 46 45 44 43 42 23 22 16 3 2 13 20 0 3
- 36 20 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scommaaccent" xMin="151" yMin="-432" xMax="1091" yMax="1517">
- <contour>
- <pt x="151" y="61" on="1"/>
- <pt x="151" y="419" on="1"/>
- <pt x="275" y="419" on="1"/>
- <pt x="299" y="185" on="1"/>
- <pt x="486" y="86" on="0"/>
- <pt x="610" y="86" on="1"/>
- <pt x="737" y="86" on="0"/>
- <pt x="816" y="165" on="1"/>
- <pt x="895" y="243" on="0"/>
- <pt x="895" y="365" on="1"/>
- <pt x="895" y="522" on="0"/>
- <pt x="695" y="626" on="1"/>
- <pt x="505" y="725" on="1"/>
- <pt x="316" y="823" on="0"/>
- <pt x="249" y="906" on="1"/>
- <pt x="183" y="986" on="0"/>
- <pt x="183" y="1123" on="1"/>
- <pt x="183" y="1517" on="0"/>
- <pt x="632" y="1517" on="1"/>
- <pt x="814" y="1517" on="0"/>
- <pt x="1006" y="1444" on="1"/>
- <pt x="1006" y="1086" on="1"/>
- <pt x="883" y="1086" on="1"/>
- <pt x="858" y="1320" on="1"/>
- <pt x="733" y="1394" on="0"/>
- <pt x="616" y="1394" on="1"/>
- <pt x="375" y="1394" on="0"/>
- <pt x="375" y="1148" on="1"/>
- <pt x="375" y="1047" on="0"/>
- <pt x="431" y="999" on="1"/>
- <pt x="480" y="957" on="0"/>
- <pt x="606" y="889" on="1"/>
- <pt x="775" y="798" on="1"/>
- <pt x="970" y="693" on="0"/>
- <pt x="1030" y="620" on="1"/>
- <pt x="1091" y="546" on="0"/>
- <pt x="1091" y="413" on="1"/>
- <pt x="1091" y="209" on="0"/>
- <pt x="957" y="86" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="598" y="-37" on="1"/>
- <pt x="393" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="484" y="-421" on="1"/>
- <pt x="484" y="-336" on="1"/>
- <pt x="541" y="-345" on="0"/>
- <pt x="581" y="-345" on="1"/>
- <pt x="690" y="-345" on="0"/>
- <pt x="690" y="-278" on="1"/>
- <pt x="690" y="-205" on="0"/>
- <pt x="533" y="-188" on="1"/>
- <pt x="533" y="-111" on="1"/>
- <pt x="667" y="-114" on="0"/>
- <pt x="733" y="-143" on="1"/>
- <pt x="826" y="-185" on="0"/>
- <pt x="826" y="-280" on="1"/>
- <pt x="826" y="-432" on="0"/>
- <pt x="608" y="-432" on="1"/>
- <pt x="550" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 45 32 56 25 5 18 5 5 40 48 200 40 2 18 0 1 1 23 22 21 20 3 2
- 1 0 8 0 2 3 0 0 1 50 49 43 42 4 13 56 2 0 14 0 0 47 20 54 27
- 19 16 9 28 36 48 200 54 16 54 50 49 43 42 23 22 16 3 2 10 20 0 3 36 20
- 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="T" xMin="62" yMin="0" xMax="1168" yMax="1480">
- <contour>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="1357" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="185" y="1086" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="714" y="1357" on="1"/>
- <pt x="714" y="123" on="1"/>
- <pt x="973" y="123" on="1"/>
- <pt x="973" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 10 9 6 5 4 3 1 3 0 0 12 11 4 3 6 3 7 14 13 2 1 6 3 0 2
- 4 48 200 15 0 1 0 8 7 0 14 15 14 2 10 12 3 1 0 2 2 4 3 0 0
- 11 10 6 1 8 13 12 10 1 2 5 4 6 1 6 3 4 48 200 9 8 1 3 2 1
- 7 6 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tbar" xMin="62" yMin="0" xMax="1168" yMax="1480">
- <contour>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="716" on="1"/>
- <pt x="220" y="716" on="1"/>
- <pt x="220" y="814" on="1"/>
- <pt x="516" y="814" on="1"/>
- <pt x="516" y="1357" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="185" y="1086" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="714" y="1357" on="1"/>
- <pt x="714" y="814" on="1"/>
- <pt x="1010" y="814" on="1"/>
- <pt x="1010" y="716" on="1"/>
- <pt x="714" y="716" on="1"/>
- <pt x="714" y="123" on="1"/>
- <pt x="973" y="123" on="1"/>
- <pt x="973" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 14 13 10 9 4 7 5 3 0 0 16 15 8 7 6 3 11 20 19 4 3 33 3 5 22
- 21 2 1 6 3 0 3 4 48 200 18 17 6 5 3 23 0 1 2 0 12 11 0 14 23
- 22 19 18 4 14 16 3 5 4 1 0 4 2 8 3 0 0 15 14 6 1 12 21 20 17
- 16 10 3 2 9 8 6 1 10 3 4 48 200 13 12 1 7 6 3 2 3 11 10 1 3
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcaron" xMin="62" yMin="0" xMax="1168" yMax="1925">
- <contour>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="1357" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="185" y="1086" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="714" y="1357" on="1"/>
- <pt x="714" y="123" on="1"/>
- <pt x="973" y="123" on="1"/>
- <pt x="973" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="981" y="1925" on="1"/>
- <pt x="724" y="1604" on="1"/>
- <pt x="506" y="1604" on="1"/>
- <pt x="249" y="1925" on="1"/>
- <pt x="373" y="1925" on="1"/>
- <pt x="614" y="1723" on="1"/>
- <pt x="616" y="1723" on="1"/>
- <pt x="858" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 10 9 6 5 4 3 1 3 23 22 21 20 19 16 6 13 17 0 0 12 11 4 3 6 3
- 7 14 13 2 1 6 3 0 2 4 48 200 18 17 1 15 0 1 2 0 8 7 0 14 23
- 17 16 15 14 5 10 12 3 22 21 2 12 2 3 20 19 18 1 0 5 2 4 3 0 0
- 11 10 6 1 8 13 12 10 1 2 5 4 6 1 6 3 4 48 200 9 8 1 3 2 1
- 7 6 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommaaccent" xMin="62" yMin="-432" xMax="1168" yMax="1480">
- <contour>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="1357" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="185" y="1086" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="714" y="1357" on="1"/>
- <pt x="714" y="123" on="1"/>
- <pt x="973" y="123" on="1"/>
- <pt x="973" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="592" y="0" on="1"/>
- <pt x="689" y="0" on="1"/>
- <pt x="629" y="-109" on="1"/>
- <pt x="701" y="-111" on="0"/>
- <pt x="753" y="-148" on="1"/>
- <pt x="823" y="-197" on="0"/>
- <pt x="823" y="-269" on="1"/>
- <pt x="823" y="-337" on="0"/>
- <pt x="764" y="-384" on="1"/>
- <pt x="705" y="-432" on="0"/>
- <pt x="620" y="-432" on="1"/>
- <pt x="552" y="-432" on="0"/>
- <pt x="476" y="-411" on="1"/>
- <pt x="476" y="-330" on="1"/>
- <pt x="526" y="-345" on="0"/>
- <pt x="580" y="-345" on="1"/>
- <pt x="684" y="-345" on="0"/>
- <pt x="684" y="-271" on="1"/>
- <pt x="684" y="-178" on="0"/>
- <pt x="497" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 116 values pushed */
- 0 0 31 32 26 48 200 10 9 6 5 4 3 1 3 35 29 28 18 4 13 26 0 0 0
- 12 11 4 3 6 3 7 14 13 2 1 6 3 0 2 4 48 200 17 16 15 0 3 0 8
- 7 0 14 0 0 33 20 22 48 200 22 22 15 14 3 10 12 3 18 17 16 3 12 2 3
- 35 29 28 1 0 5 2 4 3 0 0 11 10 6 1 8 13 12 10 1 2 5 4 6 1
- 6 3 4 48 200 9 8 1 3 2 1 7 6 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommabelow" xMin="62" yMin="-432" xMax="1168" yMax="1480">
- <contour>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="1357" on="1"/>
- <pt x="185" y="1357" on="1"/>
- <pt x="185" y="1086" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="714" y="1357" on="1"/>
- <pt x="714" y="123" on="1"/>
- <pt x="973" y="123" on="1"/>
- <pt x="973" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="472" y="-421" on="1"/>
- <pt x="472" y="-336" on="1"/>
- <pt x="529" y="-345" on="0"/>
- <pt x="569" y="-345" on="1"/>
- <pt x="678" y="-345" on="0"/>
- <pt x="678" y="-278" on="1"/>
- <pt x="678" y="-205" on="0"/>
- <pt x="521" y="-188" on="1"/>
- <pt x="521" y="-111" on="1"/>
- <pt x="655" y="-114" on="0"/>
- <pt x="721" y="-143" on="1"/>
- <pt x="814" y="-185" on="0"/>
- <pt x="814" y="-280" on="1"/>
- <pt x="814" y="-432" on="0"/>
- <pt x="596" y="-432" on="1"/>
- <pt x="538" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 112 values pushed */
- 0 0 19 32 30 48 200 10 9 6 5 4 3 1 3 24 23 17 16 4 13 30 0 0 0
- 12 11 4 3 6 3 7 14 13 2 1 6 3 0 2 4 48 200 15 0 1 0 8 7 0
- 14 0 0 21 20 28 48 200 28 28 15 14 3 10 12 3 24 23 2 12 2 3 17 16 1
- 0 4 2 4 3 0 0 11 10 6 1 8 13 12 10 1 2 5 4 6 1 6 3 4 48
- 200 9 8 1 3 2 1 7 6 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Thorn" xMin="86" yMin="0" xMax="1124" yMax="1480">
- <contour>
- <pt x="481" y="1191" on="1"/>
- <pt x="670" y="1191" on="1"/>
- <pt x="1124" y="1191" on="0"/>
- <pt x="1124" y="829" on="1"/>
- <pt x="1124" y="588" on="0"/>
- <pt x="955" y="449" on="1"/>
- <pt x="787" y="309" on="0"/>
- <pt x="492" y="309" on="1"/>
- <pt x="481" y="309" on="1"/>
- <pt x="481" y="123" on="1"/>
- <pt x="678" y="123" on="1"/>
- <pt x="678" y="0" on="1"/>
- <pt x="86" y="0" on="1"/>
- <pt x="86" y="123" on="1"/>
- <pt x="283" y="123" on="1"/>
- <pt x="283" y="1357" on="1"/>
- <pt x="86" y="1357" on="1"/>
- <pt x="86" y="1480" on="1"/>
- <pt x="678" y="1480" on="1"/>
- <pt x="678" y="1357" on="1"/>
- <pt x="481" y="1357" on="1"/>
- </contour>
- <contour>
- <pt x="481" y="432" on="1"/>
- <pt x="493" y="432" on="1"/>
- <pt x="694" y="432" on="0"/>
- <pt x="804" y="528" on="1"/>
- <pt x="914" y="623" on="0"/>
- <pt x="914" y="796" on="1"/>
- <pt x="914" y="1067" on="0"/>
- <pt x="592" y="1067" on="1"/>
- <pt x="481" y="1067" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 29 28 22 21 8 7 6 0 9 3 0 0 20 19 16 15 6 3 17 14 13 10 9 6 3
- 11 2 4 48 200 1 0 1 12 11 1 2 0 18 17 0 14 0 0 26 39 3 48 200 28
- 22 19 18 11 10 7 1 8 13 3 0 17 16 13 12 4 13 14 0 0 29 21 20 9 8
- 0 10 5 14 1 4 48 200 15 14 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="U" xMin="62" yMin="-37" xMax="1168" yMax="1480">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5 4 1 0 12 2 2
- 3 0 16 15 3 2 0 3 14 15 14 4 3 4 12 5 3 17 16 2 13 18 2 1 0
- 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uacute" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="528" y="1604" on="1"/>
- <pt x="744" y="1925" on="1"/>
- <pt x="972" y="1925" on="1"/>
- <pt x="651" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 0 0 10 5 23 48 200 23 2 29 26 2 27 2 3 1 25 19 18 17 14 13 12 6 5
- 4 1 0 12 2 2 3 0 28 27 1 0 16 15 3 2 0 3 14 28 18 12 2 29 27
- 26 15 14 4 3 7 12 5 3 17 16 2 13 18 2 1 0 0 0 13 12 6 1 18 6
- 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ubreve" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="306" y="1925" on="1"/>
- <pt x="429" y="1925" on="1"/>
- <pt x="477" y="1777" on="0"/>
- <pt x="651" y="1777" on="1"/>
- <pt x="826" y="1777" on="0"/>
- <pt x="874" y="1925" on="1"/>
- <pt x="997" y="1925" on="1"/>
- <pt x="974" y="1836" on="0"/>
- <pt x="948" y="1790" on="1"/>
- <pt x="857" y="1635" on="0"/>
- <pt x="655" y="1635" on="1"/>
- <pt x="503" y="1635" on="0"/>
- <pt x="414" y="1716" on="1"/>
- <pt x="359" y="1765" on="0"/>
- <pt x="331" y="1837" on="1"/>
- <pt x="320" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 0 0 29 14 36 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5 4 1 0
- 12 2 2 3 0 32 31 27 26 4 13 36 2 16 15 3 2 0 3 14 32 18 12 2 31
- 27 15 14 4 3 6 12 5 3 26 5 0 2 17 16 2 13 18 2 1 0 0 0 13 12
- 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ucircumflex" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="286" y="1604" on="1"/>
- <pt x="542" y="1925" on="1"/>
- <pt x="761" y="1925" on="1"/>
- <pt x="1017" y="1604" on="1"/>
- <pt x="894" y="1604" on="1"/>
- <pt x="653" y="1806" on="1"/>
- <pt x="650" y="1806" on="1"/>
- <pt x="409" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 102 values pushed */
- 0 0 10 5 23 48 200 23 2 33 32 31 30 29 26 6 27 2 3 1 25 19 18 17 14
- 13 12 6 5 4 1 0 12 2 2 3 0 28 27 1 0 16 15 3 2 0 3 14 29 18
- 12 2 33 32 31 30 28 27 15 14 4 3 10 12 5 3 26 5 0 2 17 16 2 13 18
- 2 1 0 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1
- 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Udieresis" xMin="62" yMin="-37" xMax="1168" yMax="1801">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="319" y="1604" on="1"/>
- <pt x="319" y="1801" on="1"/>
- <pt x="516" y="1801" on="1"/>
- <pt x="516" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="788" y="1604" on="1"/>
- <pt x="788" y="1801" on="1"/>
- <pt x="985" y="1801" on="1"/>
- <pt x="985" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5 4 1 0 12 2 2
- 3 0 0 0 33 30 29 26 10 3 27 1 4 48 200 32 31 28 27 3 0 16 15 3 2
- 0 3 14 15 14 4 3 4 30 28 3 17 16 2 13 18 2 1 0 0 0 31 30 10 1
- 32 29 28 10 1 26 13 12 6 1 18 6 5 10 1 0 4 4 48 200 33 32 1 27 26
- 1 19 18 1 25 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ugrave" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="775" y="1604" on="1"/>
- <pt x="652" y="1604" on="1"/>
- <pt x="331" y="1925" on="1"/>
- <pt x="559" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 0 0 10 5 23 48 200 23 2 27 26 2 28 2 3 1 25 19 18 17 14 13 12 6 5
- 4 1 0 12 2 2 3 0 29 28 1 0 16 15 3 2 0 3 14 29 27 26 15 14 4
- 3 7 12 5 3 28 5 0 2 17 16 2 13 18 2 1 0 0 0 13 12 6 1 18 6
- 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uhungarumlaut" xMin="62" yMin="-37" xMax="1168" yMax="1925">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="384" y="1604" on="1"/>
- <pt x="624" y="1925" on="1"/>
- <pt x="816" y="1925" on="1"/>
- <pt x="495" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="735" y="1604" on="1"/>
- <pt x="976" y="1925" on="1"/>
- <pt x="1167" y="1925" on="1"/>
- <pt x="846" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 99 values pushed */
- 0 0 10 5 23 48 200 23 2 33 30 29 26 4 27 2 3 1 25 19 18 17 14 13 12
- 6 5 4 1 0 12 2 2 3 0 32 31 28 27 3 0 16 15 3 2 0 3 14 31 18
- 12 2 33 30 29 28 27 26 15 14 4 3 10 12 5 3 32 17 16 3 13 18 2 1 0
- 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Umacron" xMin="62" yMin="-37" xMax="1168" yMax="1728">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="303" y="1604" on="1"/>
- <pt x="303" y="1728" on="1"/>
- <pt x="994" y="1728" on="1"/>
- <pt x="994" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 0 0 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5 4 1 0 12 2 2
- 3 0 0 0 29 26 6 1 27 1 4 48 200 28 27 1 0 16 15 3 2 0 3 14 29
- 28 2 18 12 3 15 14 4 3 4 12 5 3 27 26 2 5 0 3 17 16 2 13 18 2
- 1 0 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Unterkomma" xMin="464" yMin="-432" xMax="806" yMax="-111">
- <contour>
- <pt x="464" y="-421" on="1"/>
- <pt x="464" y="-336" on="1"/>
- <pt x="521" y="-345" on="0"/>
- <pt x="561" y="-345" on="1"/>
- <pt x="670" y="-345" on="0"/>
- <pt x="670" y="-278" on="1"/>
- <pt x="670" y="-205" on="0"/>
- <pt x="513" y="-188" on="1"/>
- <pt x="513" y="-111" on="1"/>
- <pt x="647" y="-114" on="0"/>
- <pt x="713" y="-143" on="1"/>
- <pt x="806" y="-185" on="0"/>
- <pt x="806" y="-280" on="1"/>
- <pt x="806" y="-432" on="0"/>
- <pt x="588" y="-432" on="1"/>
- <pt x="530" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 3 32 14 48 200 14 8 7 1 0 14 0 0 5 20 12 48 200 12 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uogonek" xMin="62" yMin="-370" xMax="1168" yMax="1480">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="686" y="0" on="1"/>
- <pt x="793" y="0" on="1"/>
- <pt x="664" y="-81" on="0"/>
- <pt x="664" y="-179" on="1"/>
- <pt x="664" y="-275" on="0"/>
- <pt x="779" y="-275" on="1"/>
- <pt x="833" y="-275" on="0"/>
- <pt x="870" y="-260" on="1"/>
- <pt x="870" y="-341" on="1"/>
- <pt x="808" y="-370" on="0"/>
- <pt x="730" y="-370" on="1"/>
- <pt x="528" y="-370" on="0"/>
- <pt x="528" y="-213" on="1"/>
- <pt x="528" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 0 0 31 17 36 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5 4 1 0
- 12 2 2 3 0 1 34 33 27 26 4 13 36 2 0 16 15 3 2 0 3 14 0 0 29
- 20 38 48 200 38 38 34 33 27 26 15 14 4 3 9 12 5 3 17 16 2 13 18 2 1
- 0 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uring" xMin="62" yMin="-37" xMax="1168" yMax="2033">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="606" y="2033" on="1"/>
- <pt x="700" y="2033" on="0"/>
- <pt x="766" y="1967" on="1"/>
- <pt x="833" y="1901" on="0"/>
- <pt x="833" y="1807" on="1"/>
- <pt x="833" y="1710" on="0"/>
- <pt x="766" y="1645" on="1"/>
- <pt x="700" y="1579" on="0"/>
- <pt x="604" y="1579" on="1"/>
- <pt x="521" y="1579" on="0"/>
- <pt x="459" y="1633" on="1"/>
- <pt x="379" y="1703" on="0"/>
- <pt x="379" y="1806" on="1"/>
- <pt x="379" y="1900" on="0"/>
- <pt x="446" y="1966" on="1"/>
- <pt x="512" y="2033" on="0"/>
- </contour>
- <contour>
- <pt x="606" y="1946" on="1"/>
- <pt x="549" y="1946" on="0"/>
- <pt x="507" y="1905" on="1"/>
- <pt x="465" y="1865" on="0"/>
- <pt x="465" y="1806" on="1"/>
- <pt x="465" y="1748" on="0"/>
- <pt x="506" y="1707" on="1"/>
- <pt x="548" y="1665" on="0"/>
- <pt x="604" y="1665" on="1"/>
- <pt x="658" y="1665" on="0"/>
- <pt x="697" y="1698" on="1"/>
- <pt x="747" y="1741" on="0"/>
- <pt x="747" y="1807" on="1"/>
- <pt x="747" y="1865" on="0"/>
- <pt x="705" y="1905" on="1"/>
- <pt x="664" y="1946" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 0 0 50 32 34 42 32 26 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5
- 4 1 0 12 2 2 3 0 34 26 2 16 15 3 2 0 3 14 0 0 54 32 30 46 32
- 38 48 200 30 30 15 14 4 3 5 12 5 3 38 38 5 0 2 17 16 2 13 18 2 1
- 0 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Utilde" xMin="62" yMin="-37" xMax="1168" yMax="1839">
- <contour>
- <pt x="185" y="1357" on="1"/>
- <pt x="62" y="1357" on="1"/>
- <pt x="62" y="1480" on="1"/>
- <pt x="519" y="1480" on="1"/>
- <pt x="519" y="1357" on="1"/>
- <pt x="383" y="1357" on="1"/>
- <pt x="383" y="523" on="1"/>
- <pt x="383" y="313" on="0"/>
- <pt x="455" y="200" on="1"/>
- <pt x="526" y="86" on="0"/>
- <pt x="656" y="86" on="1"/>
- <pt x="921" y="86" on="0"/>
- <pt x="921" y="532" on="1"/>
- <pt x="921" y="1357" on="1"/>
- <pt x="785" y="1357" on="1"/>
- <pt x="785" y="1480" on="1"/>
- <pt x="1168" y="1480" on="1"/>
- <pt x="1168" y="1357" on="1"/>
- <pt x="1044" y="1357" on="1"/>
- <pt x="1044" y="496" on="1"/>
- <pt x="1044" y="244" on="0"/>
- <pt x="933" y="104" on="1"/>
- <pt x="823" y="-37" on="0"/>
- <pt x="621" y="-37" on="1"/>
- <pt x="185" y="-37" on="0"/>
- <pt x="185" y="550" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="1604" on="1"/>
- <pt x="290" y="1699" on="0"/>
- <pt x="315" y="1749" on="1"/>
- <pt x="360" y="1839" on="0"/>
- <pt x="469" y="1839" on="1"/>
- <pt x="541" y="1839" on="0"/>
- <pt x="604" y="1800" on="1"/>
- <pt x="664" y="1763" on="1"/>
- <pt x="726" y="1725" on="0"/>
- <pt x="760" y="1725" on="1"/>
- <pt x="828" y="1725" on="0"/>
- <pt x="839" y="1839" on="1"/>
- <pt x="950" y="1839" on="1"/>
- <pt x="943" y="1745" on="0"/>
- <pt x="918" y="1695" on="1"/>
- <pt x="872" y="1604" on="0"/>
- <pt x="765" y="1604" on="1"/>
- <pt x="692" y="1604" on="0"/>
- <pt x="629" y="1643" on="1"/>
- <pt x="569" y="1680" on="1"/>
- <pt x="509" y="1717" on="0"/>
- <pt x="473" y="1717" on="1"/>
- <pt x="405" y="1717" on="0"/>
- <pt x="394" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 99 values pushed */
- 0 0 47 5 30 35 5 42 10 5 23 48 200 23 2 1 25 19 18 17 14 13 12 6 5
- 4 1 0 12 2 2 3 0 49 38 37 26 4 13 42 30 2 16 15 3 2 0 3 14 38
- 18 12 2 49 37 15 14 4 3 6 12 5 3 26 5 0 2 17 16 2 13 18 2 1 0
- 0 0 13 12 6 1 18 6 5 10 1 0 2 4 48 200 19 18 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="V" xMin="26" yMin="0" xMax="1204" yMax="1480">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="100" y="1357" on="1"/>
- <pt x="26" y="1357" on="1"/>
- <pt x="26" y="1480" on="1"/>
- <pt x="463" y="1480" on="1"/>
- <pt x="463" y="1357" on="1"/>
- <pt x="306" y="1357" on="1"/>
- <pt x="652" y="237" on="1"/>
- <pt x="654" y="237" on="1"/>
- <pt x="1001" y="1357" on="1"/>
- <pt x="858" y="1357" on="1"/>
- <pt x="858" y="1480" on="1"/>
- <pt x="1204" y="1480" on="1"/>
- <pt x="1204" y="1357" on="1"/>
- <pt x="1130" y="1357" on="1"/>
- <pt x="709" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 8 7 2 1 0 3 0 0 14 13 10 9 6 5 2 1 6 7 3 1 4 48 200 15 0
- 1 0 12 11 4 3 0 3 14 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="W" xMin="23" yMin="0" xMax="1207" yMax="1480">
- <contour>
- <pt x="242" y="0" on="1"/>
- <pt x="72" y="1357" on="1"/>
- <pt x="23" y="1357" on="1"/>
- <pt x="23" y="1480" on="1"/>
- <pt x="332" y="1480" on="1"/>
- <pt x="332" y="1357" on="1"/>
- <pt x="234" y="1357" on="1"/>
- <pt x="368" y="281" on="1"/>
- <pt x="370" y="281" on="1"/>
- <pt x="556" y="1258" on="1"/>
- <pt x="712" y="1258" on="1"/>
- <pt x="896" y="285" on="1"/>
- <pt x="899" y="285" on="1"/>
- <pt x="1033" y="1357" on="1"/>
- <pt x="934" y="1357" on="1"/>
- <pt x="934" y="1480" on="1"/>
- <pt x="1207" y="1480" on="1"/>
- <pt x="1207" y="1357" on="1"/>
- <pt x="1157" y="1357" on="1"/>
- <pt x="987" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="617" y="974" on="1"/>
- <pt x="615" y="974" on="1"/>
- <pt x="431" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 18 17 14 13 6 5 2 1 8 3 9 3 22 21 12 11 8 7 6 9 0 3 10 9 1
- 23 20 19 0 3 2 0 16 15 4 3 0 3 14 23 22 21 20 19 18 17 16 15 14 13
- 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Wcircumflex" xMin="23" yMin="0" xMax="1207" yMax="1925">
- <contour>
- <pt x="242" y="0" on="1"/>
- <pt x="72" y="1357" on="1"/>
- <pt x="23" y="1357" on="1"/>
- <pt x="23" y="1480" on="1"/>
- <pt x="332" y="1480" on="1"/>
- <pt x="332" y="1357" on="1"/>
- <pt x="234" y="1357" on="1"/>
- <pt x="368" y="281" on="1"/>
- <pt x="370" y="281" on="1"/>
- <pt x="556" y="1258" on="1"/>
- <pt x="712" y="1258" on="1"/>
- <pt x="896" y="285" on="1"/>
- <pt x="899" y="285" on="1"/>
- <pt x="1033" y="1357" on="1"/>
- <pt x="934" y="1357" on="1"/>
- <pt x="934" y="1480" on="1"/>
- <pt x="1207" y="1480" on="1"/>
- <pt x="1207" y="1357" on="1"/>
- <pt x="1157" y="1357" on="1"/>
- <pt x="987" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="617" y="974" on="1"/>
- <pt x="615" y="974" on="1"/>
- <pt x="431" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="267" y="1604" on="1"/>
- <pt x="523" y="1925" on="1"/>
- <pt x="742" y="1925" on="1"/>
- <pt x="998" y="1604" on="1"/>
- <pt x="875" y="1604" on="1"/>
- <pt x="634" y="1806" on="1"/>
- <pt x="631" y="1806" on="1"/>
- <pt x="390" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 31 30 29 28 27 24 6 25 3 3 18 17 14 13 6 5 2 1 8 3 9 3 22 21 12
- 11 8 7 6 9 0 3 26 25 1 10 9 1 23 20 19 0 3 3 0 16 15 4 3 0
- 3 14 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
- 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="X" xMin="49" yMin="0" xMax="1179" yMax="1480">
- <contour>
- <pt x="49" y="0" on="1"/>
- <pt x="49" y="123" on="1"/>
- <pt x="160" y="123" on="1"/>
- <pt x="510" y="730" on="1"/>
- <pt x="148" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="469" y="1480" on="1"/>
- <pt x="469" y="1357" on="1"/>
- <pt x="369" y="1357" on="1"/>
- <pt x="657" y="857" on="1"/>
- <pt x="946" y="1357" on="1"/>
- <pt x="818" y="1357" on="1"/>
- <pt x="818" y="1480" on="1"/>
- <pt x="1179" y="1480" on="1"/>
- <pt x="1179" y="1357" on="1"/>
- <pt x="1074" y="1357" on="1"/>
- <pt x="721" y="746" on="1"/>
- <pt x="1081" y="123" on="1"/>
- <pt x="1179" y="123" on="1"/>
- <pt x="1179" y="0" on="1"/>
- <pt x="736" y="0" on="1"/>
- <pt x="736" y="123" on="1"/>
- <pt x="860" y="123" on="1"/>
- <pt x="574" y="619" on="1"/>
- <pt x="288" y="123" on="1"/>
- <pt x="442" y="123" on="1"/>
- <pt x="442" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 24 17 16 15 12 11 10 9 8 5 4 3 12 6 1 3 0 0 26 25 23 22 19 18 2
- 1 6 7 0 1 4 48 200 27 21 20 0 3 0 14 13 7 6 0 3 14 27 26 25 24
- 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Y" xMin="27" yMin="0" xMax="1201" yMax="1480">
- <contour>
- <pt x="294" y="0" on="1"/>
- <pt x="294" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="660" on="1"/>
- <pt x="113" y="1357" on="1"/>
- <pt x="27" y="1357" on="1"/>
- <pt x="27" y="1480" on="1"/>
- <pt x="490" y="1480" on="1"/>
- <pt x="490" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="656" y="813" on="1"/>
- <pt x="658" y="813" on="1"/>
- <pt x="973" y="1357" on="1"/>
- <pt x="825" y="1357" on="1"/>
- <pt x="825" y="1480" on="1"/>
- <pt x="1201" y="1480" on="1"/>
- <pt x="1201" y="1357" on="1"/>
- <pt x="1115" y="1357" on="1"/>
- <pt x="713" y="661" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="935" y="123" on="1"/>
- <pt x="935" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 18 11 10 3 4 4 1 3 0 0 17 16 13 12 9 8 5 4 6 7 6 20 19 2 1
- 6 3 0 2 4 48 200 21 0 1 0 15 14 7 6 0 3 14 11 10 2 18 2 3 21
- 20 17 16 15 14 13 12 8 13 18 9 8 7 6 5 4 1 0 8 13 2 0 0 19 18
- 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Yacute" xMin="27" yMin="0" xMax="1201" yMax="1925">
- <contour>
- <pt x="294" y="0" on="1"/>
- <pt x="294" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="660" on="1"/>
- <pt x="113" y="1357" on="1"/>
- <pt x="27" y="1357" on="1"/>
- <pt x="27" y="1480" on="1"/>
- <pt x="490" y="1480" on="1"/>
- <pt x="490" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="656" y="813" on="1"/>
- <pt x="658" y="813" on="1"/>
- <pt x="973" y="1357" on="1"/>
- <pt x="825" y="1357" on="1"/>
- <pt x="825" y="1480" on="1"/>
- <pt x="1201" y="1480" on="1"/>
- <pt x="1201" y="1357" on="1"/>
- <pt x="1115" y="1357" on="1"/>
- <pt x="713" y="661" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="935" y="123" on="1"/>
- <pt x="935" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="534" y="1604" on="1"/>
- <pt x="750" y="1925" on="1"/>
- <pt x="978" y="1925" on="1"/>
- <pt x="657" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 25 22 2 23 6 3 18 11 10 3 4 4 1 3 0 0 17 16 13 12 9 8 5 4 6
- 7 6 20 19 2 1 6 3 0 2 4 48 200 24 23 1 21 0 1 2 0 15 14 7 6
- 0 3 14 25 22 11 10 4 18 2 3 24 23 21 20 17 16 15 14 13 12 10 13 18 9
- 8 7 6 5 4 1 0 8 13 2 0 0 19 18 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ycircumflex" xMin="27" yMin="0" xMax="1201" yMax="1925">
- <contour>
- <pt x="294" y="0" on="1"/>
- <pt x="294" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="660" on="1"/>
- <pt x="113" y="1357" on="1"/>
- <pt x="27" y="1357" on="1"/>
- <pt x="27" y="1480" on="1"/>
- <pt x="490" y="1480" on="1"/>
- <pt x="490" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="656" y="813" on="1"/>
- <pt x="658" y="813" on="1"/>
- <pt x="973" y="1357" on="1"/>
- <pt x="825" y="1357" on="1"/>
- <pt x="825" y="1480" on="1"/>
- <pt x="1201" y="1480" on="1"/>
- <pt x="1201" y="1357" on="1"/>
- <pt x="1115" y="1357" on="1"/>
- <pt x="713" y="661" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="935" y="123" on="1"/>
- <pt x="935" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="291" y="1604" on="1"/>
- <pt x="547" y="1925" on="1"/>
- <pt x="766" y="1925" on="1"/>
- <pt x="1022" y="1604" on="1"/>
- <pt x="899" y="1604" on="1"/>
- <pt x="658" y="1806" on="1"/>
- <pt x="655" y="1806" on="1"/>
- <pt x="414" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 29 28 27 26 25 22 6 23 6 3 18 11 10 3 4 4 1 3 0 0 17 16 13 12 9
- 8 5 4 6 7 6 20 19 2 1 6 3 0 2 4 48 200 24 23 1 21 0 1 2 0
- 15 14 7 6 0 3 14 28 27 23 11 10 5 18 2 3 26 25 24 21 20 17 16 15 14
- 13 12 11 13 18 29 22 9 8 7 6 5 4 1 0 10 13 2 0 0 19 18 10 1 2
- 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ydieresis" xMin="27" yMin="0" xMax="1201" yMax="1801">
- <contour>
- <pt x="294" y="0" on="1"/>
- <pt x="294" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="660" on="1"/>
- <pt x="113" y="1357" on="1"/>
- <pt x="27" y="1357" on="1"/>
- <pt x="27" y="1480" on="1"/>
- <pt x="490" y="1480" on="1"/>
- <pt x="490" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="656" y="813" on="1"/>
- <pt x="658" y="813" on="1"/>
- <pt x="973" y="1357" on="1"/>
- <pt x="825" y="1357" on="1"/>
- <pt x="825" y="1480" on="1"/>
- <pt x="1201" y="1480" on="1"/>
- <pt x="1201" y="1357" on="1"/>
- <pt x="1115" y="1357" on="1"/>
- <pt x="713" y="661" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="935" y="123" on="1"/>
- <pt x="935" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="324" y="1604" on="1"/>
- <pt x="324" y="1801" on="1"/>
- <pt x="521" y="1801" on="1"/>
- <pt x="521" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="793" y="1604" on="1"/>
- <pt x="793" y="1801" on="1"/>
- <pt x="990" y="1801" on="1"/>
- <pt x="990" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 18 11 10 3 4 4 1 3 0 0 29 26 25 22 10 3 23 17 16 13 12 9 8 5 4
- 6 7 6 20 19 2 1 6 3 0 3 4 48 200 28 27 24 23 3 21 0 1 2 0 15
- 14 7 6 0 3 14 21 20 14 13 12 5 28 26 3 11 10 2 18 24 3 9 8 7 3
- 2 22 3 17 16 15 3 13 28 6 5 4 1 0 5 13 22 0 0 27 26 10 1 28 25
- 24 10 1 22 19 18 10 1 2 3 4 48 200 29 28 1 23 22 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Z" xMin="148" yMin="0" xMax="1081" yMax="1480">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="136" on="1"/>
- <pt x="848" y="1357" on="1"/>
- <pt x="290" y="1357" on="1"/>
- <pt x="290" y="1086" on="1"/>
- <pt x="167" y="1086" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="368" y="136" on="1"/>
- <pt x="957" y="136" on="1"/>
- <pt x="957" y="432" on="1"/>
- <pt x="1081" y="432" on="1"/>
- <pt x="1081" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 12 11 5 4 4 2 1 3 0 0 8 3 2 6 2 6 10 9 1 20 2 0 2 4 48
- 200 13 0 1 0 7 6 0 14 8 7 2 12 10 3 9 2 2 10 3 3 1 0 5 0
- 0 11 10 6 1 12 4 3 6 1 5 2 4 48 200 13 12 1 6 5 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zacute" xMin="148" yMin="0" xMax="1081" yMax="1925">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="136" on="1"/>
- <pt x="848" y="1357" on="1"/>
- <pt x="290" y="1357" on="1"/>
- <pt x="290" y="1086" on="1"/>
- <pt x="167" y="1086" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="368" y="136" on="1"/>
- <pt x="957" y="136" on="1"/>
- <pt x="957" y="432" on="1"/>
- <pt x="1081" y="432" on="1"/>
- <pt x="1081" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="1604" on="1"/>
- <pt x="707" y="1925" on="1"/>
- <pt x="935" y="1925" on="1"/>
- <pt x="614" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 17 14 2 15 6 3 12 11 5 4 4 2 1 3 0 0 8 3 2 6 2 6 10 9 1
- 20 2 0 2 4 48 200 16 15 1 13 0 1 2 0 7 6 0 14 8 7 2 12 10 3
- 17 16 15 14 9 2 6 10 3 3 1 0 5 0 0 11 10 6 1 12 4 3 6 1 5
- 2 4 48 200 13 12 1 6 5 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zcaron" xMin="148" yMin="0" xMax="1081" yMax="1925">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="136" on="1"/>
- <pt x="848" y="1357" on="1"/>
- <pt x="290" y="1357" on="1"/>
- <pt x="290" y="1086" on="1"/>
- <pt x="167" y="1086" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="368" y="136" on="1"/>
- <pt x="957" y="136" on="1"/>
- <pt x="957" y="432" on="1"/>
- <pt x="1081" y="432" on="1"/>
- <pt x="1081" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="980" y="1925" on="1"/>
- <pt x="723" y="1604" on="1"/>
- <pt x="505" y="1604" on="1"/>
- <pt x="248" y="1925" on="1"/>
- <pt x="372" y="1925" on="1"/>
- <pt x="613" y="1723" on="1"/>
- <pt x="615" y="1723" on="1"/>
- <pt x="857" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 12 11 5 4 4 2 1 3 21 20 19 18 17 14 6 13 15 0 0 8 3 2 6 2 6
- 10 9 1 20 2 0 2 4 48 200 16 15 1 13 0 1 2 0 7 6 0 14 14 8 7
- 3 12 10 3 21 20 19 18 16 15 9 2 8 10 3 3 17 3 5 2 1 0 5 0 0
- 11 10 6 1 12 4 3 6 1 5 2 4 48 200 13 12 1 6 5 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zdotaccent" xMin="148" yMin="0" xMax="1081" yMax="1801">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="136" on="1"/>
- <pt x="848" y="1357" on="1"/>
- <pt x="290" y="1357" on="1"/>
- <pt x="290" y="1086" on="1"/>
- <pt x="167" y="1086" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="1068" y="1480" on="1"/>
- <pt x="1068" y="1357" on="1"/>
- <pt x="368" y="136" on="1"/>
- <pt x="957" y="136" on="1"/>
- <pt x="957" y="432" on="1"/>
- <pt x="1081" y="432" on="1"/>
- <pt x="1081" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="516" y="1604" on="1"/>
- <pt x="516" y="1801" on="1"/>
- <pt x="713" y="1801" on="1"/>
- <pt x="713" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 12 11 5 4 4 2 1 3 0 0 17 14 10 1 15 8 3 2 6 2 6 10 9 1 20
- 2 0 3 4 48 200 16 15 1 13 0 1 2 0 7 6 0 14 8 7 2 12 10 3 2
- 10 16 2 9 14 3 2 1 0 5 0 0 17 16 10 1 14 11 10 6 1 12 4 3 6
- 1 5 3 4 48 200 15 14 1 13 12 1 6 5 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="a" xMin="148" yMin="-25" xMax="1167" yMax="1111">
- <contour>
- <pt x="834" y="119" on="1"/>
- <pt x="661" y="-25" on="0"/>
- <pt x="483" y="-25" on="1"/>
- <pt x="330" y="-25" on="0"/>
- <pt x="239" y="61" on="1"/>
- <pt x="148" y="146" on="0"/>
- <pt x="148" y="293" on="1"/>
- <pt x="148" y="483" on="0"/>
- <pt x="290" y="569" on="1"/>
- <pt x="432" y="654" on="0"/>
- <pt x="749" y="654" on="1"/>
- <pt x="834" y="654" on="1"/>
- <pt x="834" y="822" on="1"/>
- <pt x="834" y="987" on="0"/>
- <pt x="630" y="987" on="1"/>
- <pt x="527" y="987" on="0"/>
- <pt x="373" y="929" on="1"/>
- <pt x="348" y="802" on="1"/>
- <pt x="225" y="802" on="1"/>
- <pt x="225" y="1018" on="1"/>
- <pt x="454" y="1111" on="0"/>
- <pt x="692" y="1111" on="1"/>
- <pt x="881" y="1111" on="0"/>
- <pt x="956" y="1046" on="1"/>
- <pt x="1031" y="980" on="0"/>
- <pt x="1031" y="819" on="1"/>
- <pt x="1031" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="854" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="834" y="278" on="1"/>
- <pt x="834" y="531" on="1"/>
- <pt x="781" y="531" on="1"/>
- <pt x="551" y="531" on="0"/>
- <pt x="454" y="479" on="1"/>
- <pt x="358" y="427" on="0"/>
- <pt x="358" y="301" on="1"/>
- <pt x="358" y="123" on="0"/>
- <pt x="544" y="123" on="1"/>
- <pt x="691" y="123" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 38 14 2 14 5 21 48 200 21 1 2 2 1 32 31 30 27 26 25 19 18 17 16
- 12 11 10 0 14 1 28 3 0 29 28 1 0 14 0 0 36 39 6 48 200 29 25 0 2
- 32 17 16 10 4 0 18 3 28 27 2 13 25 6 18 0 0 31 30 12 11 0 10 4 25
- 1 4 48 200 26 25 1 19 18 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aacute" xMin="148" yMin="-25" xMax="1167" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="160" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="abreve" xMin="148" yMin="-25" xMax="1167" yMax="1579">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="breve" x="12" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acircumflex" xMin="148" yMin="-25" xMax="1167" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="27" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acute" xMin="392" yMin="1283" xMax="836" yMax="1604">
- <contour>
- <pt x="392" y="1283" on="1"/>
- <pt x="608" y="1604" on="1"/>
- <pt x="836" y="1604" on="1"/>
- <pt x="515" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 3 0 1 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="adieresis" xMin="148" yMin="-25" xMax="1167" yMax="1480">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="35" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ae" xMin="37" yMin="-25" xMax="1192" yMax="1110">
- <contour>
- <pt x="589" y="154" on="1"/>
- <pt x="552" y="73" on="0"/>
- <pt x="508" y="33" on="1"/>
- <pt x="443" y="-25" on="0"/>
- <pt x="347" y="-25" on="1"/>
- <pt x="216" y="-25" on="0"/>
- <pt x="127" y="70" on="1"/>
- <pt x="37" y="164" on="0"/>
- <pt x="37" y="307" on="1"/>
- <pt x="37" y="475" on="0"/>
- <pt x="154" y="571" on="1"/>
- <pt x="270" y="666" on="0"/>
- <pt x="476" y="666" on="1"/>
- <pt x="519" y="666" on="1"/>
- <pt x="519" y="807" on="1"/>
- <pt x="519" y="917" on="0"/>
- <pt x="498" y="952" on="1"/>
- <pt x="476" y="987" on="0"/>
- <pt x="408" y="987" on="1"/>
- <pt x="345" y="987" on="0"/>
- <pt x="284" y="947" on="1"/>
- <pt x="259" y="811" on="1"/>
- <pt x="136" y="811" on="1"/>
- <pt x="136" y="1043" on="1"/>
- <pt x="289" y="1110" on="0"/>
- <pt x="434" y="1110" on="1"/>
- <pt x="531" y="1110" on="0"/>
- <pt x="592" y="1062" on="1"/>
- <pt x="628" y="1033" on="0"/>
- <pt x="658" y="979" on="1"/>
- <pt x="736" y="1110" on="0"/>
- <pt x="879" y="1110" on="1"/>
- <pt x="1025" y="1110" on="0"/>
- <pt x="1106" y="974" on="1"/>
- <pt x="1186" y="838" on="0"/>
- <pt x="1186" y="592" on="1"/>
- <pt x="1186" y="543" on="1"/>
- <pt x="704" y="543" on="1"/>
- <pt x="707" y="492" on="1"/>
- <pt x="729" y="123" on="0"/>
- <pt x="948" y="123" on="1"/>
- <pt x="1032" y="123" on="0"/>
- <pt x="1192" y="191" on="1"/>
- <pt x="1192" y="43" on="1"/>
- <pt x="1016" y="-25" on="0"/>
- <pt x="885" y="-25" on="1"/>
- <pt x="719" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="519" y="228" on="1"/>
- <pt x="519" y="543" on="1"/>
- <pt x="488" y="543" on="1"/>
- <pt x="241" y="543" on="0"/>
- <pt x="241" y="315" on="1"/>
- <pt x="241" y="136" on="0"/>
- <pt x="382" y="136" on="1"/>
- <pt x="467" y="136" on="0"/>
- </contour>
- <contour>
- <pt x="704" y="666" on="1"/>
- <pt x="984" y="666" on="1"/>
- <pt x="981" y="844" on="0"/>
- <pt x="949" y="916" on="1"/>
- <pt x="918" y="987" on="0"/>
- <pt x="859" y="987" on="1"/>
- <pt x="725" y="987" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 111 values pushed */
- 0 0 60 5 31 53 30 4 40 14 45 18 5 25 48 200 45 2 31 1 25 1 4 2 1
- 29 23 22 21 20 14 6 1 12 3 0 35 12 36 2 1 47 43 42 0 4 36 2 3 0
- 0 0 49 48 37 36 6 3 12 1 4 48 200 56 55 13 12 3 0 14 0 0 51 24 8
- 48 200 56 55 37 36 35 29 0 7 42 13 3 49 21 20 12 4 13 22 3 8 22 43 42
- 1 48 47 14 13 3 23 22 1 3 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="afii00208" xMin="0" yMin="543" xMax="1229" yMax="666">
- <contour>
- <pt x="0" y="543" on="1"/>
- <pt x="0" y="666" on="1"/>
- <pt x="1229" y="666" on="1"/>
- <pt x="1229" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 6 1 1 1 4 48 200 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="agrave" xMin="148" yMin="-25" xMax="1167" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="-38" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="amacron" xMin="148" yMin="-25" xMax="1167" yMax="1407">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="22" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ampersand" xMin="57" yMin="-37" xMax="1192" yMax="1518">
- <contour>
- <pt x="928" y="0" on="1"/>
- <pt x="834" y="110" on="1"/>
- <pt x="653" y="-37" on="0"/>
- <pt x="478" y="-37" on="1"/>
- <pt x="290" y="-37" on="0"/>
- <pt x="174" y="88" on="1"/>
- <pt x="57" y="213" on="0"/>
- <pt x="57" y="413" on="1"/>
- <pt x="57" y="591" on="0"/>
- <pt x="164" y="728" on="1"/>
- <pt x="226" y="808" on="0"/>
- <pt x="345" y="889" on="1"/>
- <pt x="273" y="1056" on="0"/>
- <pt x="273" y="1188" on="1"/>
- <pt x="273" y="1340" on="0"/>
- <pt x="357" y="1429" on="1"/>
- <pt x="441" y="1518" on="0"/>
- <pt x="588" y="1518" on="1"/>
- <pt x="740" y="1518" on="0"/>
- <pt x="814" y="1436" on="1"/>
- <pt x="878" y="1365" on="0"/>
- <pt x="878" y="1240" on="1"/>
- <pt x="878" y="1095" on="0"/>
- <pt x="767" y="979" on="1"/>
- <pt x="700" y="909" on="0"/>
- <pt x="572" y="836" on="1"/>
- <pt x="745" y="504" on="0"/>
- <pt x="879" y="332" on="1"/>
- <pt x="968" y="451" on="0"/>
- <pt x="969" y="632" on="1"/>
- <pt x="967" y="691" on="1"/>
- <pt x="868" y="691" on="1"/>
- <pt x="868" y="814" on="1"/>
- <pt x="1192" y="814" on="1"/>
- <pt x="1192" y="691" on="1"/>
- <pt x="1120" y="691" on="1"/>
- <pt x="1111" y="527" on="0"/>
- <pt x="1079" y="440" on="1"/>
- <pt x="1048" y="352" on="0"/>
- <pt x="958" y="240" on="1"/>
- <pt x="1068" y="123" on="1"/>
- <pt x="1192" y="123" on="1"/>
- <pt x="1192" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="757" y="208" on="1"/>
- <pt x="580" y="433" on="0"/>
- <pt x="405" y="785" on="1"/>
- <pt x="236" y="654" on="0"/>
- <pt x="236" y="441" on="1"/>
- <pt x="236" y="287" on="0"/>
- <pt x="311" y="199" on="1"/>
- <pt x="386" y="110" on="0"/>
- <pt x="515" y="110" on="1"/>
- <pt x="639" y="110" on="0"/>
- </contour>
- <contour>
- <pt x="518" y="938" on="1"/>
- <pt x="599" y="992" on="0"/>
- <pt x="640" y="1047" on="1"/>
- <pt x="699" y="1127" on="0"/>
- <pt x="699" y="1232" on="1"/>
- <pt x="699" y="1394" on="0"/>
- <pt x="584" y="1394" on="1"/>
- <pt x="452" y="1394" on="0"/>
- <pt x="452" y="1198" on="1"/>
- <pt x="452" y="1059" on="0"/>
- <pt x="511" y="950" on="1"/>
- <pt x="513" y="946" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 59 5 17 51 14 3 48 200 17 0 3 2 1 53 25 11 3 0 32 3 0 45 43
- 41 40 39 35 34 31 30 29 27 1 12 32 0 3 33 32 1 42 0 1 2 0 14 0 0
- 61 13 13 57 13 21 47 13 7 48 200 53 45 43 42 41 40 39 35 34 33 32 31 30 29
- 27 25 21 13 11 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="anoteleia" xMin="491" yMin="419" xMax="738" yMax="666">
- <contour>
- <pt x="491" y="419" on="1"/>
- <pt x="491" y="666" on="1"/>
- <pt x="738" y="666" on="1"/>
- <pt x="738" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 4 1 0 1 4 48 200 3 0 1 0 14 0 0 3 2 4 1 0 1 4
- 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aogonek" xMin="148" yMin="-370" xMax="1167" yMax="1111">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="282" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="aring" xMin="148" yMin="-25" xMax="1167" yMax="1737">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="ring" x="61" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="asciicircum" xMin="146" yMin="543" xMax="1084" yMax="1480">
- <contour>
- <pt x="146" y="543" on="1"/>
- <pt x="615" y="1480" on="1"/>
- <pt x="1084" y="543" on="1"/>
- <pt x="918" y="543" on="1"/>
- <pt x="615" y="1149" on="1"/>
- <pt x="311" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 18 values pushed */
- 4 1 2 13 0 5 3 2 0 3 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asciitilde" xMin="121" yMin="412" xMax="1108" yMax="772">
- <contour>
- <pt x="269" y="444" on="1"/>
- <pt x="121" y="444" on="1"/>
- <pt x="124" y="550" on="0"/>
- <pt x="143" y="605" on="1"/>
- <pt x="201" y="772" on="0"/>
- <pt x="386" y="772" on="1"/>
- <pt x="484" y="772" on="0"/>
- <pt x="585" y="703" on="1"/>
- <pt x="697" y="626" on="1"/>
- <pt x="764" y="580" on="1"/>
- <pt x="793" y="560" on="0"/>
- <pt x="839" y="560" on="1"/>
- <pt x="956" y="560" on="0"/>
- <pt x="960" y="740" on="1"/>
- <pt x="1108" y="740" on="1"/>
- <pt x="1105" y="634" on="0"/>
- <pt x="1086" y="579" on="1"/>
- <pt x="1028" y="412" on="0"/>
- <pt x="843" y="412" on="1"/>
- <pt x="744" y="412" on="0"/>
- <pt x="644" y="481" on="1"/>
- <pt x="532" y="558" on="1"/>
- <pt x="465" y="604" on="1"/>
- <pt x="436" y="624" on="0"/>
- <pt x="389" y="624" on="1"/>
- <pt x="273" y="624" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 16 5 11 16 18 48 200 5 13 18 0 14 13 1 1 0 1 2 0 14 14 13
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asterisk" xMin="161" yMin="614" xMax="1068" yMax="1480">
- <contour>
- <pt x="459" y="615" on="1"/>
- <pt x="288" y="720" on="1"/>
- <pt x="523" y="991" on="1"/>
- <pt x="545" y="951" on="0"/>
- <pt x="599" y="937" on="1"/>
- </contour>
- <contour>
- <pt x="161" y="1073" on="1"/>
- <pt x="219" y="1263" on="1"/>
- <pt x="541" y="1112" on="1"/>
- <pt x="511" y="1080" on="0"/>
- <pt x="511" y="1044" on="1"/>
- <pt x="511" y="1036" on="0"/>
- <pt x="513" y="1021" on="1"/>
- </contour>
- <contour>
- <pt x="563" y="1129" on="1"/>
- <pt x="518" y="1480" on="1"/>
- <pt x="715" y="1480" on="1"/>
- <pt x="664" y="1129" on="1"/>
- <pt x="629" y="1142" on="0"/>
- <pt x="614" y="1142" on="1"/>
- <pt x="597" y="1142" on="0"/>
- </contour>
- <contour>
- <pt x="687" y="1111" on="1"/>
- <pt x="1011" y="1264" on="1"/>
- <pt x="1068" y="1071" on="1"/>
- <pt x="716" y="1023" on="1"/>
- <pt x="716" y="1026" on="0"/>
- <pt x="717" y="1031" on="1"/>
- <pt x="717" y="1034" on="1"/>
- <pt x="717" y="1037" on="1"/>
- <pt x="717" y="1081" on="0"/>
- </contour>
- <contour>
- <pt x="783" y="614" on="1"/>
- <pt x="622" y="936" on="1"/>
- <pt x="673" y="942" on="0"/>
- <pt x="702" y="986" on="1"/>
- <pt x="946" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 17 1 32 31 29 28 26 25 24 22 21 20 19 17 15 12 11 7 6 5 4 2 1 0 22
- 13 2 3 0 14 13 0 14 32 31 29 28 26 25 24 22 21 20 19 15 14 13 12 11 9
- 7 6 5 4 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="at" xMin="87" yMin="-37" xMax="1186" yMax="1517">
- <contour>
- <pt x="945" y="12" on="1"/>
- <pt x="794" y="-37" on="0"/>
- <pt x="691" y="-37" on="1"/>
- <pt x="415" y="-37" on="0"/>
- <pt x="251" y="166" on="1"/>
- <pt x="87" y="369" on="0"/>
- <pt x="87" y="719" on="1"/>
- <pt x="87" y="1074" on="0"/>
- <pt x="249" y="1296" on="1"/>
- <pt x="411" y="1517" on="0"/>
- <pt x="675" y="1517" on="1"/>
- <pt x="1068" y="1517" on="0"/>
- <pt x="1068" y="1042" on="1"/>
- <pt x="1068" y="414" on="1"/>
- <pt x="1186" y="414" on="1"/>
- <pt x="1186" y="291" on="1"/>
- <pt x="945" y="291" on="1"/>
- <pt x="945" y="658" on="1"/>
- <pt x="920" y="658" on="1"/>
- <pt x="882" y="499" on="0"/>
- <pt x="816" y="406" on="1"/>
- <pt x="730" y="284" on="0"/>
- <pt x="621" y="284" on="1"/>
- <pt x="517" y="284" on="0"/>
- <pt x="451" y="388" on="1"/>
- <pt x="384" y="492" on="0"/>
- <pt x="384" y="654" on="1"/>
- <pt x="384" y="873" on="0"/>
- <pt x="498" y="1025" on="1"/>
- <pt x="612" y="1178" on="0"/>
- <pt x="776" y="1178" on="1"/>
- <pt x="840" y="1178" on="0"/>
- <pt x="936" y="1152" on="1"/>
- <pt x="907" y="1287" on="0"/>
- <pt x="833" y="1343" on="1"/>
- <pt x="767" y="1394" on="0"/>
- <pt x="663" y="1394" on="1"/>
- <pt x="459" y="1394" on="0"/>
- <pt x="335" y="1212" on="1"/>
- <pt x="210" y="1029" on="0"/>
- <pt x="210" y="733" on="1"/>
- <pt x="210" y="436" on="0"/>
- <pt x="343" y="261" on="1"/>
- <pt x="475" y="86" on="0"/>
- <pt x="694" y="86" on="1"/>
- <pt x="811" y="86" on="0"/>
- <pt x="945" y="150" on="1"/>
- </contour>
- <contour>
- <pt x="945" y="927" on="1"/>
- <pt x="945" y="1038" on="1"/>
- <pt x="862" y="1086" on="0"/>
- <pt x="794" y="1086" on="1"/>
- <pt x="673" y="1086" on="0"/>
- <pt x="603" y="974" on="1"/>
- <pt x="532" y="862" on="0"/>
- <pt x="532" y="674" on="1"/>
- <pt x="532" y="565" on="0"/>
- <pt x="563" y="495" on="1"/>
- <pt x="593" y="426" on="0"/>
- <pt x="639" y="426" on="1"/>
- <pt x="709" y="426" on="0"/>
- <pt x="783" y="551" on="1"/>
- <pt x="855" y="672" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 0 0 58 14 22 50 17 30 44 5 2 36 5 10 48 200 10 0 2 2 30 1 48 47 32
- 30 18 17 14 13 12 9 0 15 3 0 22 1 46 22 0 3 15 2 3 0 16 15 1 0
- 14 0 0 54 16 26 40 6 6 48 200 15 14 2 13 12 32 18 26 6 0 0 0 48 47
- 46 17 16 0 6 5 12 1 4 48 200 13 12 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="atilde" xMin="148" yMin="-25" xMax="1167" yMax="1518">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="22" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="b" xMin="62" yMin="-25" xMax="1118" yMax="1579">
- <contour>
- <pt x="383" y="0" on="1"/>
- <pt x="185" y="0" on="1"/>
- <pt x="185" y="1456" on="1"/>
- <pt x="62" y="1456" on="1"/>
- <pt x="62" y="1579" on="1"/>
- <pt x="383" y="1579" on="1"/>
- <pt x="383" y="864" on="1"/>
- <pt x="458" y="975" on="0"/>
- <pt x="529" y="1030" on="1"/>
- <pt x="631" y="1110" on="0"/>
- <pt x="749" y="1110" on="1"/>
- <pt x="914" y="1110" on="0"/>
- <pt x="1016" y="967" on="1"/>
- <pt x="1118" y="823" on="0"/>
- <pt x="1118" y="588" on="1"/>
- <pt x="1118" y="302" on="0"/>
- <pt x="983" y="139" on="1"/>
- <pt x="849" y="-25" on="0"/>
- <pt x="614" y="-25" on="1"/>
- <pt x="526" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="383" y="146" on="1"/>
- <pt x="519" y="123" on="0"/>
- <pt x="595" y="123" on="1"/>
- <pt x="762" y="123" on="0"/>
- <pt x="835" y="230" on="1"/>
- <pt x="908" y="337" on="0"/>
- <pt x="908" y="578" on="1"/>
- <pt x="908" y="950" on="0"/>
- <pt x="694" y="950" on="1"/>
- <pt x="530" y="950" on="0"/>
- <pt x="383" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 28 30 10 22 14 18 48 200 18 2 10 1 1 3 2 2 4 1 3 0 1 30 20
- 6 3 1 0 3 0 5 4 1 1 0 1 2 0 14 0 0 26 39 14 48 200 14 0 4
- 3 1 0 0 30 20 6 5 0 10 4 1 1 4 48 200 2 1 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="backslash" xMin="99" yMin="-296" xMax="1131" yMax="1579">
- <contour>
- <pt x="1131" y="-296" on="1"/>
- <pt x="967" y="-296" on="1"/>
- <pt x="99" y="1579" on="1"/>
- <pt x="262" y="1579" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 3 2 1 1 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bar" xMin="540" yMin="-296" xMax="688" yMax="1579">
- <contour>
- <pt x="540" y="-296" on="1"/>
- <pt x="540" y="1579" on="1"/>
- <pt x="688" y="1579" on="1"/>
- <pt x="688" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 2 1 1 3 0 1 2 0 14 0 0 3 2 16 1 0 1 4 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceleft" xMin="183" yMin="-296" xMax="1002" yMax="1579">
- <contour>
- <pt x="1002" y="-296" on="1"/>
- <pt x="871" y="-296" on="1"/>
- <pt x="699" y="-296" on="0"/>
- <pt x="590" y="-201" on="1"/>
- <pt x="480" y="-106" on="0"/>
- <pt x="480" y="47" on="1"/>
- <pt x="480" y="100" on="0"/>
- <pt x="493" y="176" on="1"/>
- <pt x="514" y="297" on="1"/>
- <pt x="522" y="344" on="0"/>
- <pt x="522" y="387" on="1"/>
- <pt x="522" y="580" on="0"/>
- <pt x="295" y="580" on="1"/>
- <pt x="183" y="580" on="1"/>
- <pt x="183" y="703" on="1"/>
- <pt x="295" y="703" on="1"/>
- <pt x="522" y="703" on="0"/>
- <pt x="522" y="900" on="1"/>
- <pt x="522" y="939" on="0"/>
- <pt x="514" y="986" on="1"/>
- <pt x="493" y="1107" on="1"/>
- <pt x="480" y="1183" on="0"/>
- <pt x="480" y="1241" on="1"/>
- <pt x="480" y="1390" on="0"/>
- <pt x="591" y="1485" on="1"/>
- <pt x="701" y="1579" on="0"/>
- <pt x="871" y="1579" on="1"/>
- <pt x="1002" y="1579" on="1"/>
- <pt x="1002" y="1456" on="1"/>
- <pt x="943" y="1456" on="1"/>
- <pt x="665" y="1456" on="0"/>
- <pt x="665" y="1249" on="1"/>
- <pt x="665" y="1209" on="0"/>
- <pt x="673" y="1163" on="1"/>
- <pt x="695" y="1038" on="1"/>
- <pt x="703" y="992" on="0"/>
- <pt x="703" y="954" on="1"/>
- <pt x="703" y="825" on="0"/>
- <pt x="625" y="737" on="1"/>
- <pt x="579" y="686" on="0"/>
- <pt x="493" y="642" on="1"/>
- <pt x="587" y="594" on="0"/>
- <pt x="634" y="536" on="1"/>
- <pt x="702" y="451" on="0"/>
- <pt x="702" y="326" on="1"/>
- <pt x="702" y="285" on="0"/>
- <pt x="695" y="245" on="1"/>
- <pt x="673" y="120" on="1"/>
- <pt x="665" y="74" on="0"/>
- <pt x="665" y="29" on="1"/>
- <pt x="665" y="-173" on="0"/>
- <pt x="943" y="-173" on="1"/>
- <pt x="1002" y="-173" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 52 51 40 29 28 27 26 15 14 13 12 1 0 14 0 0 49 19 5 31 19 22 17 13 36
- 10 13 44 48 200 52 51 44 40 36 29 28 27 26 22 15 14 13 12 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceright" xMin="227" yMin="-296" xMax="1046" yMax="1579">
- <contour>
- <pt x="227" y="1579" on="1"/>
- <pt x="358" y="1579" on="1"/>
- <pt x="530" y="1579" on="0"/>
- <pt x="639" y="1484" on="1"/>
- <pt x="749" y="1388" on="0"/>
- <pt x="749" y="1237" on="1"/>
- <pt x="749" y="1182" on="0"/>
- <pt x="736" y="1107" on="1"/>
- <pt x="715" y="986" on="1"/>
- <pt x="707" y="940" on="0"/>
- <pt x="707" y="896" on="1"/>
- <pt x="707" y="703" on="0"/>
- <pt x="934" y="703" on="1"/>
- <pt x="1046" y="703" on="1"/>
- <pt x="1046" y="580" on="1"/>
- <pt x="934" y="580" on="1"/>
- <pt x="707" y="580" on="0"/>
- <pt x="707" y="383" on="1"/>
- <pt x="707" y="342" on="0"/>
- <pt x="715" y="297" on="1"/>
- <pt x="736" y="177" on="1"/>
- <pt x="749" y="103" on="0"/>
- <pt x="749" y="42" on="1"/>
- <pt x="749" y="-106" on="0"/>
- <pt x="638" y="-201" on="1"/>
- <pt x="528" y="-296" on="0"/>
- <pt x="358" y="-296" on="1"/>
- <pt x="227" y="-296" on="1"/>
- <pt x="227" y="-173" on="1"/>
- <pt x="286" y="-173" on="1"/>
- <pt x="564" y="-173" on="0"/>
- <pt x="564" y="33" on="1"/>
- <pt x="564" y="75" on="0"/>
- <pt x="556" y="120" on="1"/>
- <pt x="534" y="245" on="1"/>
- <pt x="527" y="285" on="0"/>
- <pt x="527" y="330" on="1"/>
- <pt x="527" y="458" on="0"/>
- <pt x="604" y="546" on="1"/>
- <pt x="649" y="597" on="0"/>
- <pt x="736" y="642" on="1"/>
- <pt x="643" y="690" on="0"/>
- <pt x="596" y="748" on="1"/>
- <pt x="527" y="833" on="0"/>
- <pt x="527" y="957" on="1"/>
- <pt x="527" y="998" on="0"/>
- <pt x="534" y="1038" on="1"/>
- <pt x="556" y="1163" on="1"/>
- <pt x="564" y="1208" on="0"/>
- <pt x="564" y="1254" on="1"/>
- <pt x="564" y="1456" on="0"/>
- <pt x="286" y="1456" on="1"/>
- <pt x="227" y="1456" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 52 51 40 29 28 27 26 15 14 13 12 1 0 14 0 0 49 19 5 31 19 22 17 13 36
- 10 13 44 48 200 52 51 44 40 36 29 28 27 26 22 15 14 13 12 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketleft" xMin="395" yMin="-296" xMax="938" yMax="1579">
- <contour>
- <pt x="395" y="-296" on="1"/>
- <pt x="395" y="1579" on="1"/>
- <pt x="938" y="1579" on="1"/>
- <pt x="938" y="1456" on="1"/>
- <pt x="568" y="1456" on="1"/>
- <pt x="568" y="-173" on="1"/>
- <pt x="938" y="-173" on="1"/>
- <pt x="938" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 4 3 6 1 1 6 5 6 1 0 2 4 48 200 2 1 1 7 0 1 2 0 14
- 7 6 3 2 4 13 4 0 0 5 4 12 1 0 1 4 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketright" xMin="291" yMin="-296" xMax="834" yMax="1579">
- <contour>
- <pt x="834" y="-296" on="1"/>
- <pt x="291" y="-296" on="1"/>
- <pt x="291" y="-173" on="1"/>
- <pt x="661" y="-173" on="1"/>
- <pt x="661" y="1456" on="1"/>
- <pt x="291" y="1456" on="1"/>
- <pt x="291" y="1579" on="1"/>
- <pt x="834" y="1579" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 5 4 6 1 6 3 2 6 1 0 2 4 48 200 7 6 1 1 0 1 2 0 14
- 6 5 2 1 4 13 3 0 0 4 3 12 1 0 1 4 48 200 7 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="breve" xMin="269" yMin="1289" xMax="960" yMax="1579">
- <contour>
- <pt x="269" y="1579" on="1"/>
- <pt x="392" y="1579" on="1"/>
- <pt x="440" y="1431" on="0"/>
- <pt x="614" y="1431" on="1"/>
- <pt x="789" y="1431" on="0"/>
- <pt x="837" y="1579" on="1"/>
- <pt x="960" y="1579" on="1"/>
- <pt x="937" y="1490" on="0"/>
- <pt x="911" y="1444" on="1"/>
- <pt x="820" y="1289" on="0"/>
- <pt x="618" y="1289" on="1"/>
- <pt x="466" y="1289" on="0"/>
- <pt x="377" y="1370" on="1"/>
- <pt x="322" y="1419" on="0"/>
- <pt x="294" y="1491" on="1"/>
- <pt x="283" y="1520" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 0 0 3 14 10 48 200 10 6 5 1 0 14 6 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="brokenbar" xMin="540" yMin="-296" xMax="688" yMax="1579">
- <contour>
- <pt x="540" y="-296" on="1"/>
- <pt x="540" y="444" on="1"/>
- <pt x="688" y="444" on="1"/>
- <pt x="688" y="-296" on="1"/>
- </contour>
- <contour>
- <pt x="540" y="839" on="1"/>
- <pt x="540" y="1579" on="1"/>
- <pt x="688" y="1579" on="1"/>
- <pt x="688" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 6 5 1 7 4 1 2 1 1 3 0 1 4 0 14 0 0 7 6 3 2 16 3 0 1
- 4 48 200 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bullet" xMin="318" yMin="518" xMax="910" yMax="1110">
- <contour>
- <pt x="614" y="1110" on="1"/>
- <pt x="737" y="1110" on="0"/>
- <pt x="823" y="1023" on="1"/>
- <pt x="910" y="937" on="0"/>
- <pt x="910" y="815" on="1"/>
- <pt x="910" y="690" on="0"/>
- <pt x="823" y="604" on="1"/>
- <pt x="737" y="518" on="0"/>
- <pt x="612" y="518" on="1"/>
- <pt x="503" y="518" on="0"/>
- <pt x="423" y="588" on="1"/>
- <pt x="318" y="679" on="0"/>
- <pt x="318" y="814" on="1"/>
- <pt x="318" y="937" on="0"/>
- <pt x="405" y="1023" on="1"/>
- <pt x="492" y="1110" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 15 values pushed */
- 0 0 0 8 48 200 8 14 0 0 4 12 48 200 12
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="c" xMin="148" yMin="-25" xMax="1031" yMax="1110">
- <contour>
- <pt x="1031" y="46" on="1"/>
- <pt x="883" y="-25" on="0"/>
- <pt x="693" y="-25" on="1"/>
- <pt x="441" y="-25" on="0"/>
- <pt x="294" y="133" on="1"/>
- <pt x="148" y="291" on="0"/>
- <pt x="148" y="555" on="1"/>
- <pt x="148" y="815" on="0"/>
- <pt x="291" y="962" on="1"/>
- <pt x="434" y="1110" on="0"/>
- <pt x="690" y="1110" on="1"/>
- <pt x="862" y="1110" on="0"/>
- <pt x="1019" y="1056" on="1"/>
- <pt x="1019" y="711" on="1"/>
- <pt x="895" y="711" on="1"/>
- <pt x="863" y="943" on="1"/>
- <pt x="753" y="987" on="0"/>
- <pt x="680" y="987" on="1"/>
- <pt x="534" y="987" on="0"/>
- <pt x="448" y="869" on="1"/>
- <pt x="361" y="751" on="0"/>
- <pt x="361" y="552" on="1"/>
- <pt x="361" y="349" on="0"/>
- <pt x="459" y="236" on="1"/>
- <pt x="556" y="123" on="0"/>
- <pt x="729" y="123" on="1"/>
- <pt x="866" y="123" on="0"/>
- <pt x="1031" y="200" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 25 14 2 17 5 10 48 200 10 1 2 2 1 1 27 15 14 13 12 0 6 1 2
- 3 0 0 14 0 0 21 39 6 48 200 15 14 6 12 27 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cacute" xMin="148" yMin="-25" xMax="1031" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="164" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="caron" xMin="248" yMin="1283" xMax="980" yMax="1604">
- <contour>
- <pt x="980" y="1604" on="1"/>
- <pt x="723" y="1283" on="1"/>
- <pt x="505" y="1283" on="1"/>
- <pt x="248" y="1604" on="1"/>
- <pt x="372" y="1604" on="1"/>
- <pt x="613" y="1402" on="1"/>
- <pt x="615" y="1402" on="1"/>
- <pt x="857" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 6 5 4 3 0 6 13 1 2 1 1 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ccaron" xMin="148" yMin="-25" xMax="1046" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="66" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccedilla" xMin="148" yMin="-432" xMax="1031" yMax="1110">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="53" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccircumflex" xMin="148" yMin="-25" xMax="1045" yMax="1604">
- <contour>
- <pt x="1031" y="46" on="1"/>
- <pt x="883" y="-25" on="0"/>
- <pt x="693" y="-25" on="1"/>
- <pt x="441" y="-25" on="0"/>
- <pt x="294" y="133" on="1"/>
- <pt x="148" y="291" on="0"/>
- <pt x="148" y="555" on="1"/>
- <pt x="148" y="815" on="0"/>
- <pt x="291" y="962" on="1"/>
- <pt x="434" y="1110" on="0"/>
- <pt x="690" y="1110" on="1"/>
- <pt x="862" y="1110" on="0"/>
- <pt x="1019" y="1056" on="1"/>
- <pt x="1019" y="711" on="1"/>
- <pt x="895" y="711" on="1"/>
- <pt x="863" y="943" on="1"/>
- <pt x="753" y="987" on="0"/>
- <pt x="680" y="987" on="1"/>
- <pt x="534" y="987" on="0"/>
- <pt x="448" y="869" on="1"/>
- <pt x="361" y="751" on="0"/>
- <pt x="361" y="552" on="1"/>
- <pt x="361" y="349" on="0"/>
- <pt x="459" y="236" on="1"/>
- <pt x="556" y="123" on="0"/>
- <pt x="729" y="123" on="1"/>
- <pt x="866" y="123" on="0"/>
- <pt x="1031" y="200" on="1"/>
- </contour>
- <contour>
- <pt x="314" y="1283" on="1"/>
- <pt x="570" y="1604" on="1"/>
- <pt x="789" y="1604" on="1"/>
- <pt x="1045" y="1283" on="1"/>
- <pt x="922" y="1283" on="1"/>
- <pt x="681" y="1485" on="1"/>
- <pt x="678" y="1485" on="1"/>
- <pt x="437" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 25 14 2 17 5 10 48 200 10 1 2 2 1 35 34 33 32 31 28 6 29 1 3
- 0 1 1 27 15 14 13 12 0 6 1 2 3 0 0 30 29 1 0 14 0 0 21 39 6
- 48 200 31 0 35 34 33 32 30 29 28 15 14 9 13 6 12 27 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cdotaccent" xMin="148" yMin="-25" xMax="1031" yMax="1480">
- <contour>
- <pt x="1031" y="46" on="1"/>
- <pt x="883" y="-25" on="0"/>
- <pt x="693" y="-25" on="1"/>
- <pt x="441" y="-25" on="0"/>
- <pt x="294" y="133" on="1"/>
- <pt x="148" y="291" on="0"/>
- <pt x="148" y="555" on="1"/>
- <pt x="148" y="815" on="0"/>
- <pt x="291" y="962" on="1"/>
- <pt x="434" y="1110" on="0"/>
- <pt x="690" y="1110" on="1"/>
- <pt x="862" y="1110" on="0"/>
- <pt x="1019" y="1056" on="1"/>
- <pt x="1019" y="711" on="1"/>
- <pt x="895" y="711" on="1"/>
- <pt x="863" y="943" on="1"/>
- <pt x="753" y="987" on="0"/>
- <pt x="680" y="987" on="1"/>
- <pt x="534" y="987" on="0"/>
- <pt x="448" y="869" on="1"/>
- <pt x="361" y="751" on="0"/>
- <pt x="361" y="552" on="1"/>
- <pt x="361" y="349" on="0"/>
- <pt x="459" y="236" on="1"/>
- <pt x="556" y="123" on="0"/>
- <pt x="729" y="123" on="1"/>
- <pt x="866" y="123" on="0"/>
- <pt x="1031" y="200" on="1"/>
- </contour>
- <contour>
- <pt x="581" y="1283" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="778" y="1480" on="1"/>
- <pt x="778" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 25 14 2 17 5 10 48 200 10 1 2 2 1 1 27 15 14 13 12 0 6 1 2
- 3 0 0 0 0 31 28 10 1 29 1 4 48 200 30 29 0 14 0 0 21 39 6 48 200
- 15 14 2 12 30 3 6 28 0 0 31 30 10 1 28 1 4 48 200 29 28 1 27 0 1
- 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cedilla" xMin="441" yMin="-432" xMax="788" yMax="0">
- <contour>
- <pt x="557" y="0" on="1"/>
- <pt x="654" y="0" on="1"/>
- <pt x="594" y="-109" on="1"/>
- <pt x="666" y="-111" on="0"/>
- <pt x="718" y="-148" on="1"/>
- <pt x="788" y="-197" on="0"/>
- <pt x="788" y="-269" on="1"/>
- <pt x="788" y="-337" on="0"/>
- <pt x="729" y="-384" on="1"/>
- <pt x="671" y="-432" on="0"/>
- <pt x="584" y="-432" on="1"/>
- <pt x="517" y="-432" on="0"/>
- <pt x="441" y="-411" on="1"/>
- <pt x="441" y="-330" on="1"/>
- <pt x="491" y="-345" on="0"/>
- <pt x="545" y="-345" on="1"/>
- <pt x="649" y="-345" on="0"/>
- <pt x="649" y="-271" on="1"/>
- <pt x="649" y="-178" on="0"/>
- <pt x="462" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 15 32 10 48 200 19 13 12 10 2 1 0 14 0 0 17 20 6 48 200 19 13 12
- 6 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cent" xMin="173" yMin="0" xMax="1061" yMax="1480">
- <contour>
- <pt x="629" y="0" on="1"/>
- <pt x="629" y="179" on="1"/>
- <pt x="428" y="204" on="0"/>
- <pt x="317" y="320" on="1"/>
- <pt x="173" y="469" on="0"/>
- <pt x="173" y="737" on="1"/>
- <pt x="173" y="1020" on="0"/>
- <pt x="330" y="1172" on="1"/>
- <pt x="439" y="1278" on="0"/>
- <pt x="629" y="1305" on="1"/>
- <pt x="629" y="1480" on="1"/>
- <pt x="753" y="1480" on="1"/>
- <pt x="753" y="1308" on="1"/>
- <pt x="909" y="1295" on="0"/>
- <pt x="1049" y="1258" on="1"/>
- <pt x="1049" y="938" on="1"/>
- <pt x="926" y="938" on="1"/>
- <pt x="901" y="1147" on="1"/>
- <pt x="830" y="1184" on="0"/>
- <pt x="753" y="1184" on="1"/>
- <pt x="753" y="305" on="1"/>
- <pt x="869" y="305" on="0"/>
- <pt x="1061" y="376" on="1"/>
- <pt x="1061" y="234" on="1"/>
- <pt x="915" y="183" on="0"/>
- <pt x="753" y="173" on="1"/>
- <pt x="753" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="629" y="317" on="1"/>
- <pt x="629" y="1179" on="1"/>
- <pt x="563" y="1157" on="0"/>
- <pt x="529" y="1131" on="1"/>
- <pt x="383" y="1021" on="0"/>
- <pt x="383" y="734" on="1"/>
- <pt x="383" y="512" on="0"/>
- <pt x="474" y="406" on="1"/>
- <pt x="512" y="361" on="0"/>
- <pt x="560" y="339" on="1"/>
- <pt x="583" y="329" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 64 values pushed */
- 28 27 26 25 23 22 20 19 17 16 15 14 12 11 10 9 1 0 14 0 0 32 39 5 48
- 200 17 16 2 14 11 3 5 0 0 0 28 27 10 9 1 0 6 5 11 1 4 48 200 23
- 22 1 15 14 1 26 25 20 19 12 11 5 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="circumflex" xMin="248" yMin="1283" xMax="979" yMax="1604">
- <contour>
- <pt x="248" y="1283" on="1"/>
- <pt x="504" y="1604" on="1"/>
- <pt x="723" y="1604" on="1"/>
- <pt x="979" y="1283" on="1"/>
- <pt x="856" y="1283" on="1"/>
- <pt x="615" y="1485" on="1"/>
- <pt x="612" y="1485" on="1"/>
- <pt x="371" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 6 5 4 3 0 6 13 1 2 1 1 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="colon" xMin="466" yMin="0" xMax="762" yMax="1086">
- <contour>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="296" on="1"/>
- <pt x="762" y="296" on="1"/>
- <pt x="762" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="466" y="790" on="1"/>
- <pt x="466" y="1086" on="1"/>
- <pt x="762" y="1086" on="1"/>
- <pt x="762" y="790" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 7 4 8 1 5 2 1 8 1 0 2 4 48 200 3 0 1 0 6 5 1 14 0
- 0 7 6 3 2 8 3 0 1 4 48 200 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="comma" xMin="466" yMin="-321" xMax="762" yMax="296">
- <contour>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="296" on="1"/>
- <pt x="762" y="296" on="1"/>
- <pt x="762" y="116" on="1"/>
- <pt x="760" y="-302" on="0"/>
- <pt x="466" y="-321" on="1"/>
- <pt x="466" y="-222" on="1"/>
- <pt x="541" y="-210" on="0"/>
- <pt x="563" y="-155" on="1"/>
- <pt x="583" y="-107" on="0"/>
- <pt x="589" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 10 6 5 3 0 5 13 1 2 1 1 0 14 10 2 0 2 0 0 3 2 8 1 0 1
- 4 48 200 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="copyright" xMin="62" yMin="-37" xMax="1168" yMax="1517">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="864" y="1517" on="0"/>
- <pt x="1016" y="1304" on="1"/>
- <pt x="1168" y="1091" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="386" on="0"/>
- <pt x="1016" y="175" on="1"/>
- <pt x="864" y="-37" on="0"/>
- <pt x="606" y="-37" on="1"/>
- <pt x="388" y="-37" on="0"/>
- <pt x="245" y="136" on="1"/>
- <pt x="62" y="357" on="0"/>
- <pt x="62" y="740" on="1"/>
- <pt x="62" y="1092" on="0"/>
- <pt x="214" y="1304" on="1"/>
- <pt x="366" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1406" on="1"/>
- <pt x="423" y="1406" on="0"/>
- <pt x="304" y="1222" on="1"/>
- <pt x="185" y="1038" on="0"/>
- <pt x="185" y="741" on="1"/>
- <pt x="185" y="445" on="0"/>
- <pt x="303" y="260" on="1"/>
- <pt x="421" y="74" on="0"/>
- <pt x="611" y="74" on="1"/>
- <pt x="785" y="74" on="0"/>
- <pt x="899" y="221" on="1"/>
- <pt x="1044" y="407" on="0"/>
- <pt x="1044" y="742" on="1"/>
- <pt x="1044" y="1039" on="0"/>
- <pt x="925" y="1222" on="1"/>
- <pt x="805" y="1406" on="0"/>
- </contour>
- <contour>
- <pt x="872" y="344" on="1"/>
- <pt x="852" y="336" on="1"/>
- <pt x="737" y="290" on="0"/>
- <pt x="651" y="290" on="1"/>
- <pt x="491" y="290" on="0"/>
- <pt x="389" y="413" on="1"/>
- <pt x="286" y="536" on="0"/>
- <pt x="286" y="733" on="1"/>
- <pt x="286" y="932" on="0"/>
- <pt x="386" y="1055" on="1"/>
- <pt x="485" y="1178" on="0"/>
- <pt x="650" y="1178" on="1"/>
- <pt x="743" y="1178" on="0"/>
- <pt x="852" y="1151" on="1"/>
- <pt x="868" y="1147" on="1"/>
- <pt x="868" y="962" on="1"/>
- <pt x="783" y="962" on="1"/>
- <pt x="783" y="1055" on="1"/>
- <pt x="710" y="1080" on="0"/>
- <pt x="654" y="1080" on="1"/>
- <pt x="544" y="1080" on="0"/>
- <pt x="477" y="986" on="1"/>
- <pt x="409" y="892" on="0"/>
- <pt x="409" y="741" on="1"/>
- <pt x="409" y="586" on="0"/>
- <pt x="482" y="494" on="1"/>
- <pt x="555" y="401" on="0"/>
- <pt x="679" y="401" on="1"/>
- <pt x="776" y="401" on="0"/>
- <pt x="872" y="451" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 59 40 35 51 17 43 24 40 8 16 40 0 48 200 8 2 0 0 43 35 1 1 61
- 49 48 47 46 43 35 32 8 0 2 3 0 0 14 0 0 55 6 39 28 6 4 20 6 12
- 48 200 61 32 2 13 4 46 49 48 39 12 46 47 46 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="currency" xMin="85" yMin="141" xMax="1143" yMax="1200">
- <contour>
- <pt x="347" y="316" on="1"/>
- <pt x="172" y="141" on="1"/>
- <pt x="85" y="228" on="1"/>
- <pt x="259" y="403" on="1"/>
- <pt x="170" y="528" on="0"/>
- <pt x="170" y="670" on="1"/>
- <pt x="170" y="814" on="0"/>
- <pt x="259" y="938" on="1"/>
- <pt x="85" y="1112" on="1"/>
- <pt x="172" y="1200" on="1"/>
- <pt x="347" y="1025" on="1"/>
- <pt x="477" y="1115" on="0"/>
- <pt x="614" y="1115" on="1"/>
- <pt x="751" y="1115" on="0"/>
- <pt x="881" y="1025" on="1"/>
- <pt x="1056" y="1200" on="1"/>
- <pt x="1143" y="1112" on="1"/>
- <pt x="968" y="938" on="1"/>
- <pt x="1058" y="813" on="0"/>
- <pt x="1058" y="670" on="1"/>
- <pt x="1058" y="528" on="0"/>
- <pt x="968" y="403" on="1"/>
- <pt x="1143" y="229" on="1"/>
- <pt x="1056" y="141" on="1"/>
- <pt x="881" y="316" on="1"/>
- <pt x="751" y="226" on="0"/>
- <pt x="614" y="226" on="1"/>
- <pt x="477" y="226" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="967" on="1"/>
- <pt x="490" y="967" on="0"/>
- <pt x="404" y="881" on="1"/>
- <pt x="318" y="796" on="0"/>
- <pt x="318" y="674" on="1"/>
- <pt x="318" y="559" on="0"/>
- <pt x="387" y="477" on="1"/>
- <pt x="475" y="374" on="0"/>
- <pt x="615" y="374" on="1"/>
- <pt x="739" y="374" on="0"/>
- <pt x="824" y="460" on="1"/>
- <pt x="910" y="546" on="0"/>
- <pt x="910" y="671" on="1"/>
- <pt x="910" y="795" on="0"/>
- <pt x="824" y="881" on="1"/>
- <pt x="739" y="967" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 36 14 26 28 14 12 48 200 12 1 1 16 15 9 8 4 13 1 0 1 24 23 22
- 21 17 14 10 7 3 2 1 0 12 13 26 1 0 14 0 0 40 16 19 32 16 5 48 200
- 24 23 22 21 19 17 16 15 14 10 9 8 7 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="d" xMin="111" yMin="-25" xMax="1167" yMax="1579">
- <contour>
- <pt x="846" y="1456" on="1"/>
- <pt x="600" y="1456" on="1"/>
- <pt x="600" y="1579" on="1"/>
- <pt x="1044" y="1579" on="1"/>
- <pt x="1044" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="846" y="0" on="1"/>
- <pt x="846" y="222" on="1"/>
- <pt x="771" y="111" on="0"/>
- <pt x="701" y="55" on="1"/>
- <pt x="599" y="-25" on="0"/>
- <pt x="480" y="-25" on="1"/>
- <pt x="315" y="-25" on="0"/>
- <pt x="213" y="119" on="1"/>
- <pt x="111" y="262" on="0"/>
- <pt x="111" y="498" on="1"/>
- <pt x="111" y="783" on="0"/>
- <pt x="246" y="946" on="1"/>
- <pt x="380" y="1110" on="0"/>
- <pt x="618" y="1110" on="1"/>
- <pt x="705" y="1110" on="0"/>
- <pt x="846" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="846" y="939" on="1"/>
- <pt x="710" y="962" on="0"/>
- <pt x="633" y="962" on="1"/>
- <pt x="468" y="962" on="0"/>
- <pt x="394" y="855" on="1"/>
- <pt x="321" y="748" on="0"/>
- <pt x="321" y="510" on="1"/>
- <pt x="321" y="136" on="0"/>
- <pt x="535" y="136" on="1"/>
- <pt x="699" y="136" on="0"/>
- <pt x="846" y="370" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 31 30 12 25 14 20 48 200 20 1 12 2 1 33 23 22 8 5 4 6 1 6 3
- 0 0 0 1 0 6 1 2 1 4 48 200 3 2 1 7 6 1 2 0 14 0 0 29 39
- 16 48 200 6 5 2 13 3 2 1 16 0 0 0 33 23 22 8 7 0 10 5 3 1 4
- 48 200 4 3 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dagger" xMin="170" yMin="-296" xMax="1058" yMax="1480">
- <contour>
- <pt x="515" y="-296" on="1"/>
- <pt x="540" y="827" on="1"/>
- <pt x="170" y="814" on="1"/>
- <pt x="170" y="962" on="1"/>
- <pt x="540" y="950" on="1"/>
- <pt x="515" y="1480" on="1"/>
- <pt x="713" y="1480" on="1"/>
- <pt x="688" y="950" on="1"/>
- <pt x="1058" y="962" on="1"/>
- <pt x="1058" y="814" on="1"/>
- <pt x="688" y="827" on="1"/>
- <pt x="713" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 42 values pushed */
- 1 10 9 8 7 4 3 2 1 8 5 2 3 0 11 0 1 0 6 5 0 14 11 10 7
- 6 5 4 1 0 8 8 2 3 9 8 1 3 2 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="daggerdbl" xMin="170" yMin="-296" xMax="1058" yMax="1480">
- <contour>
- <pt x="515" y="-296" on="1"/>
- <pt x="540" y="234" on="1"/>
- <pt x="170" y="222" on="1"/>
- <pt x="170" y="370" on="1"/>
- <pt x="540" y="358" on="1"/>
- <pt x="540" y="827" on="1"/>
- <pt x="170" y="814" on="1"/>
- <pt x="170" y="962" on="1"/>
- <pt x="540" y="950" on="1"/>
- <pt x="515" y="1480" on="1"/>
- <pt x="713" y="1480" on="1"/>
- <pt x="688" y="950" on="1"/>
- <pt x="1058" y="962" on="1"/>
- <pt x="1058" y="814" on="1"/>
- <pt x="688" y="827" on="1"/>
- <pt x="688" y="358" on="1"/>
- <pt x="1058" y="370" on="1"/>
- <pt x="1058" y="222" on="1"/>
- <pt x="688" y="234" on="1"/>
- <pt x="713" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 1 18 17 16 15 14 13 12 11 8 7 6 5 4 3 2 1 16 9 2 3 0 19 0 1
- 0 10 9 0 14 19 10 2 12 11 3 9 0 2 1 2 3 0 0 18 15 14 11 14 3
- 1 1 4 48 200 17 16 13 12 3 8 5 4 1 3 7 6 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcaron" xMin="111" yMin="-25" xMax="1229" yMax="1579">
- <contour>
- <pt x="753" y="0" on="1"/>
- <pt x="753" y="222" on="1"/>
- <pt x="691" y="111" on="0"/>
- <pt x="630" y="55" on="1"/>
- <pt x="542" y="-25" on="0"/>
- <pt x="435" y="-25" on="1"/>
- <pt x="290" y="-25" on="0"/>
- <pt x="201" y="119" on="1"/>
- <pt x="111" y="263" on="0"/>
- <pt x="111" y="498" on="1"/>
- <pt x="111" y="782" on="0"/>
- <pt x="229" y="946" on="1"/>
- <pt x="346" y="1110" on="0"/>
- <pt x="554" y="1110" on="1"/>
- <pt x="634" y="1110" on="0"/>
- <pt x="753" y="1086" on="1"/>
- <pt x="753" y="1456" on="1"/>
- <pt x="537" y="1456" on="1"/>
- <pt x="537" y="1579" on="1"/>
- <pt x="950" y="1579" on="1"/>
- <pt x="950" y="123" on="1"/>
- <pt x="1058" y="123" on="1"/>
- <pt x="1058" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="753" y="939" on="1"/>
- <pt x="645" y="963" on="0"/>
- <pt x="574" y="963" on="1"/>
- <pt x="433" y="963" on="0"/>
- <pt x="376" y="858" on="1"/>
- <pt x="318" y="751" on="0"/>
- <pt x="318" y="502" on="1"/>
- <pt x="318" y="136" on="0"/>
- <pt x="490" y="136" on="1"/>
- <pt x="644" y="136" on="0"/>
- <pt x="753" y="370" on="1"/>
- </contour>
- <contour>
- <pt x="1031" y="1125" on="1"/>
- <pt x="1031" y="1184" on="1"/>
- <pt x="1108" y="1205" on="0"/>
- <pt x="1108" y="1365" on="1"/>
- <pt x="1108" y="1382" on="1"/>
- <pt x="1031" y="1382" on="1"/>
- <pt x="1031" y="1579" on="1"/>
- <pt x="1229" y="1579" on="1"/>
- <pt x="1229" y="1408" on="1"/>
- <pt x="1228" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 31 30 5 25 14 13 48 200 13 1 5 2 1 42 39 38 37 35 34 6 16 1 3
- 0 1 33 23 21 20 15 1 6 1 0 3 0 0 0 17 16 6 1 18 1 4 48 200 41
- 40 19 18 3 22 0 1 2 0 14 0 0 29 39 9 48 200 38 37 22 21 4 41 34 3
- 18 17 9 0 0 0 40 39 35 34 10 3 41 33 23 16 15 1 0 10 5 19 2 4 48
- 200 42 41 1 20 19 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcroat" xMin="111" yMin="-25" xMax="1167" yMax="1579">
- <contour>
- <pt x="846" y="0" on="1"/>
- <pt x="846" y="222" on="1"/>
- <pt x="771" y="111" on="0"/>
- <pt x="701" y="55" on="1"/>
- <pt x="599" y="-25" on="0"/>
- <pt x="480" y="-25" on="1"/>
- <pt x="315" y="-25" on="0"/>
- <pt x="213" y="119" on="1"/>
- <pt x="111" y="262" on="0"/>
- <pt x="111" y="498" on="1"/>
- <pt x="111" y="783" on="0"/>
- <pt x="246" y="946" on="1"/>
- <pt x="380" y="1110" on="0"/>
- <pt x="618" y="1110" on="1"/>
- <pt x="705" y="1110" on="0"/>
- <pt x="846" y="1086" on="1"/>
- <pt x="846" y="1221" on="1"/>
- <pt x="526" y="1221" on="1"/>
- <pt x="526" y="1345" on="1"/>
- <pt x="846" y="1345" on="1"/>
- <pt x="846" y="1456" on="1"/>
- <pt x="600" y="1456" on="1"/>
- <pt x="600" y="1579" on="1"/>
- <pt x="1044" y="1579" on="1"/>
- <pt x="1044" y="1345" on="1"/>
- <pt x="1167" y="1345" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1044" y="1221" on="1"/>
- <pt x="1044" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="846" y="939" on="1"/>
- <pt x="710" y="962" on="0"/>
- <pt x="633" y="962" on="1"/>
- <pt x="468" y="962" on="0"/>
- <pt x="394" y="855" on="1"/>
- <pt x="321" y="748" on="0"/>
- <pt x="321" y="510" on="1"/>
- <pt x="321" y="136" on="0"/>
- <pt x="535" y="136" on="1"/>
- <pt x="699" y="136" on="0"/>
- <pt x="846" y="370" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 39 30 5 33 14 13 48 200 13 1 5 2 1 41 31 29 28 15 1 6 1 0 3
- 0 0 0 21 20 6 1 22 27 26 17 16 6 3 18 2 4 48 200 23 22 1 25 24 19
- 18 3 30 0 1 3 0 14 0 0 37 39 9 48 200 30 29 26 25 4 13 23 22 21 18
- 17 4 13 9 0 0 0 41 31 20 19 16 15 1 0 10 7 23 1 4 48 200 28 27 24
- 23 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="degree" xMin="318" yMin="925" xMax="910" yMax="1517">
- <contour>
- <pt x="614" y="1517" on="1"/>
- <pt x="735" y="1517" on="0"/>
- <pt x="823" y="1430" on="1"/>
- <pt x="910" y="1344" on="0"/>
- <pt x="910" y="1222" on="1"/>
- <pt x="910" y="1098" on="0"/>
- <pt x="823" y="1012" on="1"/>
- <pt x="735" y="925" on="0"/>
- <pt x="610" y="925" on="1"/>
- <pt x="504" y="925" on="0"/>
- <pt x="423" y="995" on="1"/>
- <pt x="318" y="1087" on="0"/>
- <pt x="318" y="1221" on="1"/>
- <pt x="318" y="1344" on="0"/>
- <pt x="405" y="1430" on="1"/>
- <pt x="493" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="1394" on="1"/>
- <pt x="543" y="1394" on="0"/>
- <pt x="492" y="1343" on="1"/>
- <pt x="441" y="1293" on="0"/>
- <pt x="441" y="1222" on="1"/>
- <pt x="441" y="1151" on="0"/>
- <pt x="492" y="1100" on="1"/>
- <pt x="542" y="1049" on="0"/>
- <pt x="612" y="1049" on="1"/>
- <pt x="677" y="1049" on="0"/>
- <pt x="725" y="1090" on="1"/>
- <pt x="787" y="1142" on="0"/>
- <pt x="787" y="1222" on="1"/>
- <pt x="787" y="1293" on="0"/>
- <pt x="736" y="1343" on="1"/>
- <pt x="685" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 24 5 8 16 5 0 48 200 0 0 1 8 0 0 14 0 0 28 6 4 20 6 12
- 48 200 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dieresis" xMin="281" yMin="1283" xMax="947" yMax="1480">
- <contour>
- <pt x="281" y="1283" on="1"/>
- <pt x="281" y="1480" on="1"/>
- <pt x="478" y="1480" on="1"/>
- <pt x="478" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="750" y="1283" on="1"/>
- <pt x="750" y="1480" on="1"/>
- <pt x="947" y="1480" on="1"/>
- <pt x="947" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 7 4 3 0 10 3 1 1 4 48 200 6 5 2 1 0 3 14 0 0 5 4 10
- 1 6 3 2 10 1 0 2 4 48 200 7 6 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="divide" xMin="99" yMin="0" xMax="1130" yMax="1234">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="691" on="1"/>
- <pt x="1130" y="691" on="1"/>
- <pt x="1130" y="543" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="0" on="1"/>
- <pt x="491" y="247" on="1"/>
- <pt x="738" y="247" on="1"/>
- <pt x="738" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="987" on="1"/>
- <pt x="491" y="1234" on="1"/>
- <pt x="738" y="1234" on="1"/>
- <pt x="738" y="987" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 11 8 4 1 9 6 5 4 1 4 3 0 7 1 1 3 4 48 200 10 9 1 7
- 4 1 2 1 1 3 0 14 0 0 11 10 7 6 4 3 4 1 4 48 200 9 8 5 4
- 3 3 2 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dollar" xMin="143" yMin="-123" xMax="1031" yMax="1604">
- <contour>
- <pt x="525" y="-123" on="1"/>
- <pt x="525" y="0" on="1"/>
- <pt x="323" y="16" on="0"/>
- <pt x="143" y="86" on="1"/>
- <pt x="143" y="385" on="1"/>
- <pt x="266" y="385" on="1"/>
- <pt x="291" y="187" on="1"/>
- <pt x="415" y="131" on="0"/>
- <pt x="525" y="123" on="1"/>
- <pt x="525" y="698" on="1"/>
- <pt x="435" y="751" on="1"/>
- <pt x="180" y="901" on="0"/>
- <pt x="180" y="1123" on="1"/>
- <pt x="180" y="1297" on="0"/>
- <pt x="309" y="1396" on="1"/>
- <pt x="399" y="1465" on="0"/>
- <pt x="550" y="1480" on="1"/>
- <pt x="550" y="1604" on="1"/>
- <pt x="674" y="1604" on="1"/>
- <pt x="674" y="1480" on="1"/>
- <pt x="835" y="1479" on="0"/>
- <pt x="1002" y="1408" on="1"/>
- <pt x="1002" y="1124" on="1"/>
- <pt x="879" y="1124" on="1"/>
- <pt x="854" y="1322" on="1"/>
- <pt x="767" y="1357" on="0"/>
- <pt x="695" y="1357" on="1"/>
- <pt x="674" y="1357" on="1"/>
- <pt x="674" y="823" on="1"/>
- <pt x="761" y="776" on="1"/>
- <pt x="911" y="695" on="0"/>
- <pt x="971" y="613" on="1"/>
- <pt x="1031" y="531" on="0"/>
- <pt x="1031" y="409" on="1"/>
- <pt x="1031" y="212" on="0"/>
- <pt x="893" y="95" on="1"/>
- <pt x="800" y="15" on="0"/>
- <pt x="649" y="0" on="1"/>
- <pt x="649" y="-123" on="1"/>
- </contour>
- <contour>
- <pt x="649" y="123" on="1"/>
- <pt x="730" y="132" on="0"/>
- <pt x="782" y="192" on="1"/>
- <pt x="852" y="272" on="0"/>
- <pt x="852" y="388" on="1"/>
- <pt x="852" y="520" on="0"/>
- <pt x="716" y="597" on="1"/>
- <pt x="649" y="635" on="1"/>
- </contour>
- <contour>
- <pt x="550" y="891" on="1"/>
- <pt x="550" y="1357" on="1"/>
- <pt x="445" y="1331" on="0"/>
- <pt x="400" y="1271" on="1"/>
- <pt x="358" y="1216" on="0"/>
- <pt x="358" y="1133" on="1"/>
- <pt x="358" y="1003" on="0"/>
- <pt x="497" y="922" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 48 47 46 39 38 37 28 27 26 24 23 22 21 19 18 17 16 9 8 6 5 4 3 1 0
- 14 0 0 52 13 12 43 13 33 48 200 26 24 23 3 21 18 3 12 12 6 5 3 0 3
- 3 33 21 0 0 28 27 19 18 6 3 16 46 39 38 37 6 3 0 2 4 48 200 22 21
- 1 48 47 17 16 3 9 8 1 0 3 4 3 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotaccent" xMin="516" yMin="1283" xMax="713" yMax="1480">
- <contour>
- <pt x="516" y="1283" on="1"/>
- <pt x="516" y="1480" on="1"/>
- <pt x="713" y="1480" on="1"/>
- <pt x="713" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 3 0 10 1 1 1 4 48 200 2 1 0 14 0 0 3 2 10 1 0 1 4 48
- 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessi" xMin="148" yMin="0" xMax="1105" yMax="1086">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="962" on="1"/>
- <pt x="148" y="962" on="1"/>
- <pt x="148" y="1086" on="1"/>
- <pt x="735" y="1086" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 0 0 4 3 6 1 5 8 7 2 1 6 3 0 2 4 48 200 9 0 1 0 6 5 1
- 14 9 8 2 13 6 5 4 1 0 4 13 2 0 0 7 6 10 1 2 1 4 48 200 3
- 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessj" xMin="159" yMin="-420" xMax="903" yMax="1086">
- <contour>
- <pt x="159" y="-344" on="1"/>
- <pt x="159" y="-25" on="1"/>
- <pt x="282" y="-25" on="1"/>
- <pt x="313" y="-243" on="1"/>
- <pt x="381" y="-296" on="0"/>
- <pt x="460" y="-296" on="1"/>
- <pt x="592" y="-296" on="0"/>
- <pt x="648" y="-200" on="1"/>
- <pt x="705" y="-104" on="0"/>
- <pt x="705" y="127" on="1"/>
- <pt x="705" y="962" on="1"/>
- <pt x="261" y="962" on="1"/>
- <pt x="261" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="903" y="66" on="1"/>
- <pt x="903" y="-164" on="0"/>
- <pt x="790" y="-292" on="1"/>
- <pt x="677" y="-420" on="0"/>
- <pt x="476" y="-420" on="1"/>
- <pt x="337" y="-420" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 5 5 18 48 200 1 14 9 2 10 2 3 0 1 3 2 1 0 4 13 18 2 0
- 0 0 11 10 6 1 12 1 4 48 200 13 12 1 14 12 11 3 2 4 9 0 3 0 0
- 10 9 10 1 13 1 4 48 200 14 13 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotmath" xMin="491" yMin="419" xMax="738" yMax="666">
- <contour>
- <pt x="491" y="419" on="1"/>
- <pt x="491" y="666" on="1"/>
- <pt x="738" y="666" on="1"/>
- <pt x="738" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 4 1 0 1 4 48 200 3 0 1 0 14 0 0 3 2 4 1 0 1 4
- 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="e" xMin="123" yMin="-25" xMax="1105" yMax="1110">
- <contour>
- <pt x="1105" y="506" on="1"/>
- <pt x="334" y="506" on="1"/>
- <pt x="348" y="389" on="0"/>
- <pt x="375" y="329" on="1"/>
- <pt x="466" y="123" on="0"/>
- <pt x="727" y="123" on="1"/>
- <pt x="888" y="123" on="0"/>
- <pt x="1076" y="210" on="1"/>
- <pt x="1076" y="62" on="1"/>
- <pt x="901" y="-25" on="0"/>
- <pt x="701" y="-25" on="1"/>
- <pt x="442" y="-25" on="0"/>
- <pt x="282" y="134" on="1"/>
- <pt x="123" y="293" on="0"/>
- <pt x="123" y="551" on="1"/>
- <pt x="123" y="802" on="0"/>
- <pt x="271" y="956" on="1"/>
- <pt x="418" y="1110" on="0"/>
- <pt x="660" y="1110" on="1"/>
- <pt x="1105" y="1110" on="0"/>
- <pt x="1105" y="567" on="1"/>
- </contour>
- <contour>
- <pt x="336" y="629" on="1"/>
- <pt x="895" y="629" on="1"/>
- <pt x="895" y="675" on="1"/>
- <pt x="895" y="987" on="0"/>
- <pt x="646" y="987" on="1"/>
- <pt x="492" y="987" on="0"/>
- <pt x="408" y="864" on="1"/>
- <pt x="349" y="778" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 25 5 18 5 14 10 48 200 18 1 10 2 1 23 1 21 2 0 20 21 0 2 1
- 8 7 2 0 2 3 0 0 0 1 0 6 1 21 1 4 48 200 22 21 1 0 14 20 0
- 2 13 7 23 22 21 1 4 13 14 7 8 7 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eacute" xMin="123" yMin="-25" xMax="1105" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="133" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ebreve" xMin="123" yMin="-25" xMax="1105" yMax="1579">
- <contour>
- <pt x="1105" y="506" on="1"/>
- <pt x="334" y="506" on="1"/>
- <pt x="348" y="389" on="0"/>
- <pt x="375" y="329" on="1"/>
- <pt x="466" y="123" on="0"/>
- <pt x="727" y="123" on="1"/>
- <pt x="888" y="123" on="0"/>
- <pt x="1076" y="210" on="1"/>
- <pt x="1076" y="62" on="1"/>
- <pt x="901" y="-25" on="0"/>
- <pt x="701" y="-25" on="1"/>
- <pt x="442" y="-25" on="0"/>
- <pt x="282" y="134" on="1"/>
- <pt x="123" y="293" on="0"/>
- <pt x="123" y="551" on="1"/>
- <pt x="123" y="802" on="0"/>
- <pt x="271" y="956" on="1"/>
- <pt x="418" y="1110" on="0"/>
- <pt x="660" y="1110" on="1"/>
- <pt x="1105" y="1110" on="0"/>
- <pt x="1105" y="567" on="1"/>
- </contour>
- <contour>
- <pt x="336" y="629" on="1"/>
- <pt x="895" y="629" on="1"/>
- <pt x="895" y="675" on="1"/>
- <pt x="895" y="987" on="0"/>
- <pt x="646" y="987" on="1"/>
- <pt x="492" y="987" on="0"/>
- <pt x="408" y="864" on="1"/>
- <pt x="349" y="778" on="0"/>
- </contour>
- <contour>
- <pt x="303" y="1579" on="1"/>
- <pt x="426" y="1579" on="1"/>
- <pt x="474" y="1431" on="0"/>
- <pt x="648" y="1431" on="1"/>
- <pt x="823" y="1431" on="0"/>
- <pt x="871" y="1579" on="1"/>
- <pt x="994" y="1579" on="1"/>
- <pt x="971" y="1490" on="0"/>
- <pt x="945" y="1444" on="1"/>
- <pt x="854" y="1289" on="0"/>
- <pt x="652" y="1289" on="1"/>
- <pt x="500" y="1289" on="0"/>
- <pt x="411" y="1370" on="1"/>
- <pt x="356" y="1419" on="0"/>
- <pt x="328" y="1491" on="1"/>
- <pt x="317" y="1520" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 32 14 39 25 5 18 5 14 10 48 200 18 1 10 2 1 23 1 21 2 0 20 21
- 0 2 1 8 7 2 0 2 3 0 1 35 34 30 29 4 13 39 1 0 0 0 1 0 6
- 1 21 1 4 48 200 22 21 1 0 14 20 0 2 13 7 35 34 30 29 23 22 21 1 8
- 13 14 7 8 7 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ecaron" xMin="123" yMin="-25" xMax="1105" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="35" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ecircumflex" xMin="123" yMin="-25" xMax="1105" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="35" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edieresis" xMin="123" yMin="-25" xMax="1105" yMax="1480">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="34" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edotaccent" xMin="123" yMin="-25" xMax="1105" yMax="1480">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="34" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="egrave" xMin="123" yMin="-25" xMax="1105" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="-64" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="eight" xMin="120" yMin="-37" xMax="1113" yMax="1517">
- <contour>
- <pt x="413" y="803" on="1"/>
- <pt x="360" y="843" on="1"/>
- <pt x="188" y="973" on="0"/>
- <pt x="188" y="1145" on="1"/>
- <pt x="188" y="1307" on="0"/>
- <pt x="313" y="1412" on="1"/>
- <pt x="437" y="1517" on="0"/>
- <pt x="634" y="1517" on="1"/>
- <pt x="821" y="1517" on="0"/>
- <pt x="936" y="1426" on="1"/>
- <pt x="1051" y="1335" on="0"/>
- <pt x="1051" y="1185" on="1"/>
- <pt x="1051" y="1067" on="0"/>
- <pt x="993" y="988" on="1"/>
- <pt x="949" y="929" on="0"/>
- <pt x="844" y="835" on="1"/>
- <pt x="797" y="793" on="1"/>
- <pt x="865" y="747" on="1"/>
- <pt x="1009" y="650" on="0"/>
- <pt x="1061" y="572" on="1"/>
- <pt x="1113" y="495" on="0"/>
- <pt x="1113" y="381" on="1"/>
- <pt x="1113" y="195" on="0"/>
- <pt x="974" y="79" on="1"/>
- <pt x="835" y="-37" on="0"/>
- <pt x="611" y="-37" on="1"/>
- <pt x="387" y="-37" on="0"/>
- <pt x="254" y="75" on="1"/>
- <pt x="120" y="187" on="0"/>
- <pt x="120" y="372" on="1"/>
- <pt x="120" y="596" on="0"/>
- <pt x="358" y="764" on="1"/>
- </contour>
- <contour>
- <pt x="682" y="862" on="1"/>
- <pt x="866" y="1031" on="0"/>
- <pt x="866" y="1174" on="1"/>
- <pt x="866" y="1280" on="0"/>
- <pt x="802" y="1337" on="1"/>
- <pt x="737" y="1394" on="0"/>
- <pt x="612" y="1394" on="1"/>
- <pt x="503" y="1394" on="0"/>
- <pt x="437" y="1334" on="1"/>
- <pt x="372" y="1275" on="0"/>
- <pt x="372" y="1184" on="1"/>
- <pt x="372" y="1087" on="0"/>
- <pt x="499" y="990" on="1"/>
- <pt x="597" y="915" on="1"/>
- </contour>
- <contour>
- <pt x="512" y="743" on="1"/>
- <pt x="399" y="620" on="0"/>
- <pt x="360" y="552" on="1"/>
- <pt x="317" y="477" on="0"/>
- <pt x="317" y="377" on="1"/>
- <pt x="317" y="249" on="0"/>
- <pt x="404" y="168" on="1"/>
- <pt x="491" y="86" on="0"/>
- <pt x="626" y="86" on="1"/>
- <pt x="751" y="86" on="0"/>
- <pt x="827" y="158" on="1"/>
- <pt x="903" y="229" on="0"/>
- <pt x="903" y="345" on="1"/>
- <pt x="903" y="427" on="0"/>
- <pt x="864" y="480" on="1"/>
- <pt x="827" y="532" on="0"/>
- <pt x="714" y="608" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 0 0 54 5 25 38 5 7 48 200 25 2 7 0 1 1 46 45 32 16 0 5 0 2 3
- 0 0 14 0 0 58 39 21 50 28 29 42 19 3 34 19 11 48 200 46 45 32 29 21 16
- 11 3 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ellipsis" xMin="81" yMin="0" xMax="1147" yMax="247">
- <contour>
- <pt x="81" y="0" on="1"/>
- <pt x="81" y="247" on="1"/>
- <pt x="328" y="247" on="1"/>
- <pt x="328" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="0" on="1"/>
- <pt x="491" y="247" on="1"/>
- <pt x="737" y="247" on="1"/>
- <pt x="737" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="900" y="0" on="1"/>
- <pt x="900" y="247" on="1"/>
- <pt x="1147" y="247" on="1"/>
- <pt x="1147" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 10 9 6 5 2 1 4 5 0 1 4 48 200 11 8 7 4 3 0 5 0 14 0
- 0 9 8 4 1 10 7 6 4 1 4 3 2 4 1 0 3 4 48 200 11 10 1 5 4
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="emacron" xMin="123" yMin="-25" xMax="1105" yMax="1407">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="34" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="emdash" xMin="0" yMin="543" xMax="1229" yMax="666">
- <contour>
- <pt x="0" y="543" on="1"/>
- <pt x="0" y="666" on="1"/>
- <pt x="1229" y="666" on="1"/>
- <pt x="1229" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 6 1 1 1 4 48 200 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="endash" xMin="121" yMin="543" xMax="1108" yMax="691">
- <contour>
- <pt x="121" y="543" on="1"/>
- <pt x="121" y="691" on="1"/>
- <pt x="1108" y="691" on="1"/>
- <pt x="1108" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eng" xMin="69" yMin="-420" xMax="1045" yMax="1110">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="962" on="1"/>
- <pt x="69" y="962" on="1"/>
- <pt x="69" y="1086" on="1"/>
- <pt x="390" y="1086" on="1"/>
- <pt x="390" y="876" on="1"/>
- <pt x="459" y="981" on="0"/>
- <pt x="527" y="1034" on="1"/>
- <pt x="623" y="1110" on="0"/>
- <pt x="742" y="1110" on="1"/>
- <pt x="1043" y="1110" on="0"/>
- <pt x="1043" y="722" on="1"/>
- <pt x="1044" y="11" on="1"/>
- <pt x="1045" y="-420" on="0"/>
- <pt x="681" y="-420" on="1"/>
- <pt x="585" y="-420" on="0"/>
- <pt x="458" y="-383" on="1"/>
- <pt x="458" y="-173" on="1"/>
- <pt x="581" y="-173" on="1"/>
- <pt x="593" y="-290" on="1"/>
- <pt x="657" y="-321" on="0"/>
- <pt x="704" y="-321" on="1"/>
- <pt x="846" y="-321" on="0"/>
- <pt x="846" y="-82" on="1"/>
- <pt x="846" y="701" on="1"/>
- <pt x="846" y="956" on="0"/>
- <pt x="683" y="956" on="1"/>
- <pt x="533" y="956" on="0"/>
- <pt x="390" y="704" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 28 30 11 23 17 16 48 200 11 1 32 31 30 26 7 4 3 2 1 9 5 0 3
- 25 21 20 19 18 5 13 16 0 33 0 1 0 6 5 1 14 33 32 21 20 4 25 18 3
- 5 4 1 0 4 13 2 0 0 31 30 7 6 10 3 2 1 4 48 200 26 25 1 19 18
- 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eogonek" xMin="123" yMin="-370" xMax="1105" yMax="1110">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="148" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="equal" xMin="99" yMin="346" xMax="1130" yMax="888">
- <contour>
- <pt x="99" y="346" on="1"/>
- <pt x="99" y="494" on="1"/>
- <pt x="1130" y="494" on="1"/>
- <pt x="1130" y="346" on="1"/>
- </contour>
- <contour>
- <pt x="99" y="740" on="1"/>
- <pt x="99" y="888" on="1"/>
- <pt x="1130" y="888" on="1"/>
- <pt x="1130" y="740" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 0 0 7 4 7 1 5 2 1 7 1 0 2 4 48 200 6 5 1 3 0 1 2 0 14
- 7 6 3 2 3 5 4 1 0 3 2 0
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="estimated" xMin="123" yMin="-25" xMax="1105" yMax="1110">
- <contour>
- <pt x="1105" y="506" on="1"/>
- <pt x="334" y="506" on="1"/>
- <pt x="348" y="389" on="0"/>
- <pt x="375" y="329" on="1"/>
- <pt x="466" y="123" on="0"/>
- <pt x="727" y="123" on="1"/>
- <pt x="888" y="123" on="0"/>
- <pt x="1076" y="210" on="1"/>
- <pt x="1076" y="62" on="1"/>
- <pt x="901" y="-25" on="0"/>
- <pt x="701" y="-25" on="1"/>
- <pt x="442" y="-25" on="0"/>
- <pt x="282" y="134" on="1"/>
- <pt x="123" y="293" on="0"/>
- <pt x="123" y="551" on="1"/>
- <pt x="123" y="802" on="0"/>
- <pt x="271" y="956" on="1"/>
- <pt x="418" y="1110" on="0"/>
- <pt x="660" y="1110" on="1"/>
- <pt x="1105" y="1110" on="0"/>
- <pt x="1105" y="567" on="1"/>
- </contour>
- <contour>
- <pt x="336" y="629" on="1"/>
- <pt x="895" y="629" on="1"/>
- <pt x="895" y="675" on="1"/>
- <pt x="895" y="987" on="0"/>
- <pt x="646" y="987" on="1"/>
- <pt x="492" y="987" on="0"/>
- <pt x="408" y="864" on="1"/>
- <pt x="349" y="778" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 25 5 18 5 14 10 48 200 18 1 10 2 1 23 1 21 2 0 20 21 0 2 1
- 8 7 2 0 2 3 0 0 0 1 0 6 1 21 1 4 48 200 22 21 1 0 14 20 0
- 2 13 7 23 22 21 1 4 13 14 7 8 7 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eth" xMin="111" yMin="-25" xMax="1119" yMax="1614">
- <contour>
- <pt x="779" y="1039" on="1"/>
- <pt x="658" y="1216" on="0"/>
- <pt x="552" y="1291" on="1"/>
- <pt x="271" y="1098" on="1"/>
- <pt x="197" y="1202" on="1"/>
- <pt x="440" y="1366" on="1"/>
- <pt x="308" y="1456" on="0"/>
- <pt x="114" y="1456" on="1"/>
- <pt x="114" y="1579" on="1"/>
- <pt x="141" y="1579" on="1"/>
- <pt x="395" y="1579" on="0"/>
- <pt x="588" y="1467" on="1"/>
- <pt x="811" y="1614" on="1"/>
- <pt x="882" y="1514" on="1"/>
- <pt x="707" y="1395" on="1"/>
- <pt x="877" y="1258" on="0"/>
- <pt x="982" y="1068" on="1"/>
- <pt x="1119" y="819" on="0"/>
- <pt x="1119" y="568" on="1"/>
- <pt x="1119" y="306" on="0"/>
- <pt x="980" y="141" on="1"/>
- <pt x="841" y="-25" on="0"/>
- <pt x="618" y="-25" on="1"/>
- <pt x="399" y="-25" on="0"/>
- <pt x="255" y="133" on="1"/>
- <pt x="111" y="291" on="0"/>
- <pt x="111" y="532" on="1"/>
- <pt x="111" y="771" on="0"/>
- <pt x="250" y="928" on="1"/>
- <pt x="388" y="1086" on="0"/>
- <pt x="592" y="1086" on="1"/>
- <pt x="687" y="1086" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="962" on="1"/>
- <pt x="488" y="962" on="0"/>
- <pt x="405" y="839" on="1"/>
- <pt x="321" y="715" on="0"/>
- <pt x="321" y="531" on="1"/>
- <pt x="321" y="346" on="0"/>
- <pt x="405" y="222" on="1"/>
- <pt x="488" y="99" on="0"/>
- <pt x="615" y="99" on="1"/>
- <pt x="740" y="99" on="0"/>
- <pt x="824" y="221" on="1"/>
- <pt x="909" y="344" on="0"/>
- <pt x="909" y="526" on="1"/>
- <pt x="909" y="696" on="0"/>
- <pt x="840" y="814" on="1"/>
- <pt x="754" y="962" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 40 5 22 32 5 30 48 200 30 1 22 2 1 1 14 11 7 5 4 3 2 7 0
- 1 3 0 0 1 1 0 1 2 2 0 0 1 13 12 9 8 4 13 0 0 14 0 0 44
- 39 18 36 39 26 48 200 26 18 14 13 12 11 9 8 7 5 4 3 2 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclam" xMin="491" yMin="0" xMax="738" yMax="1480">
- <contour>
- <pt x="491" y="0" on="1"/>
- <pt x="491" y="222" on="1"/>
- <pt x="738" y="222" on="1"/>
- <pt x="738" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="553" y="419" on="1"/>
- <pt x="516" y="1086" on="1"/>
- <pt x="516" y="1480" on="1"/>
- <pt x="713" y="1480" on="1"/>
- <pt x="713" y="1086" on="1"/>
- <pt x="676" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 9 8 5 4 4 6 1 3 0 0 2 1 9 1 0 1 4 48 200 3 0 1 0 7 6
- 0 14 9 4 2 7 5 3 0 0 8 7 10 1 5 3 2 4 1 0 2 4 48 200 6
- 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclamdown" xMin="491" yMin="-395" xMax="738" yMax="1086">
- <contour>
- <pt x="738" y="1086" on="1"/>
- <pt x="738" y="864" on="1"/>
- <pt x="491" y="864" on="1"/>
- <pt x="491" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="676" y="666" on="1"/>
- <pt x="713" y="0" on="1"/>
- <pt x="713" y="-395" on="1"/>
- <pt x="516" y="-395" on="1"/>
- <pt x="516" y="0" on="1"/>
- <pt x="553" y="666" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 1 9 4 2 1 2 3 0 1 8 5 2 2 6 3 0 0 0 2 1 9 1 0 1 4
- 48 200 7 6 1 0 3 0 1 14 9 4 2 5 7 3 0 0 6 5 10 1 7 1 0
- 4 1 2 2 4 48 200 8 7 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="f" xMin="148" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="925" on="1"/>
- <pt x="148" y="925" on="1"/>
- <pt x="148" y="1061" on="1"/>
- <pt x="419" y="1061" on="1"/>
- <pt x="419" y="1179" on="1"/>
- <pt x="419" y="1404" on="0"/>
- <pt x="510" y="1504" on="1"/>
- <pt x="601" y="1604" on="0"/>
- <pt x="803" y="1604" on="1"/>
- <pt x="974" y="1604" on="0"/>
- <pt x="1167" y="1524" on="1"/>
- <pt x="1167" y="1277" on="1"/>
- <pt x="1044" y="1277" on="1"/>
- <pt x="1013" y="1433" on="1"/>
- <pt x="912" y="1480" on="0"/>
- <pt x="829" y="1480" on="1"/>
- <pt x="710" y="1480" on="0"/>
- <pt x="664" y="1420" on="1"/>
- <pt x="617" y="1360" on="0"/>
- <pt x="617" y="1201" on="1"/>
- <pt x="617" y="1061" on="1"/>
- <pt x="1061" y="1061" on="1"/>
- <pt x="1061" y="925" on="1"/>
- <pt x="617" y="925" on="1"/>
- <pt x="617" y="123" on="1"/>
- <pt x="987" y="123" on="1"/>
- <pt x="987" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 88 values pushed */
- 0 0 18 5 11 48 200 22 16 15 14 13 7 6 13 11 5 0 0 26 25 4 3 20 3
- 5 28 27 2 1 6 3 0 2 4 48 200 24 23 6 5 3 29 0 1 2 0 14 29 28
- 25 24 16 15 6 13 22 3 5 4 1 0 4 13 2 0 0 27 26 23 22 10 3 2 1
- 4 48 200 14 13 1 7 6 3 2 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="938" on="1"/>
- <pt x="75" y="938" on="1"/>
- <pt x="75" y="1073" on="1"/>
- <pt x="192" y="1073" on="1"/>
- <pt x="192" y="1247" on="1"/>
- <pt x="192" y="1410" on="0"/>
- <pt x="278" y="1507" on="1"/>
- <pt x="365" y="1604" on="0"/>
- <pt x="508" y="1604" on="1"/>
- <pt x="602" y="1604" on="0"/>
- <pt x="723" y="1555" on="1"/>
- <pt x="723" y="1345" on="1"/>
- <pt x="600" y="1345" on="1"/>
- <pt x="575" y="1468" on="1"/>
- <pt x="539" y="1487" on="0"/>
- <pt x="510" y="1487" on="1"/>
- <pt x="390" y="1487" on="0"/>
- <pt x="390" y="1301" on="1"/>
- <pt x="390" y="1073" on="1"/>
- <pt x="1044" y="1073" on="1"/>
- <pt x="1044" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="748" y="0" on="1"/>
- <pt x="748" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="938" on="1"/>
- <pt x="390" y="938" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="846" y="1345" on="1"/>
- <pt x="846" y="1542" on="1"/>
- <pt x="1044" y="1542" on="1"/>
- <pt x="1044" y="1345" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 129 values pushed */
- 0 0 18 40 11 48 200 16 35 14 2 20 7 2 14 5 3 32 31 28 27 24 23 2 1
- 8 3 0 3 13 11 35 0 0 37 34 15 14 10 3 35 30 29 4 3 20 3 5 2 4
- 48 200 36 35 1 22 21 6 5 3 33 26 25 0 3 3 0 14 27 26 2 28 13 3 33
- 32 16 15 4 13 20 3 25 24 2 13 22 5 4 1 0 4 13 2 0 0 35 34 29 28
- 10 3 22 31 30 21 20 10 3 2 2 4 48 200 37 36 23 22 3 14 13 1 7 6 3
- 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi#1" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="938" on="1"/>
- <pt x="75" y="938" on="1"/>
- <pt x="75" y="1073" on="1"/>
- <pt x="192" y="1073" on="1"/>
- <pt x="192" y="1247" on="1"/>
- <pt x="192" y="1410" on="0"/>
- <pt x="278" y="1507" on="1"/>
- <pt x="365" y="1604" on="0"/>
- <pt x="508" y="1604" on="1"/>
- <pt x="602" y="1604" on="0"/>
- <pt x="723" y="1555" on="1"/>
- <pt x="723" y="1345" on="1"/>
- <pt x="600" y="1345" on="1"/>
- <pt x="575" y="1468" on="1"/>
- <pt x="539" y="1487" on="0"/>
- <pt x="510" y="1487" on="1"/>
- <pt x="390" y="1487" on="0"/>
- <pt x="390" y="1301" on="1"/>
- <pt x="390" y="1073" on="1"/>
- <pt x="1044" y="1073" on="1"/>
- <pt x="1044" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="748" y="0" on="1"/>
- <pt x="748" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="938" on="1"/>
- <pt x="390" y="938" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="846" y="1345" on="1"/>
- <pt x="846" y="1542" on="1"/>
- <pt x="1044" y="1542" on="1"/>
- <pt x="1044" y="1345" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 129 values pushed */
- 0 0 18 40 11 48 200 16 35 14 2 20 7 2 14 5 3 32 31 28 27 24 23 2 1
- 8 3 0 3 13 11 35 0 0 37 34 15 14 10 3 35 30 29 4 3 20 3 5 2 4
- 48 200 36 35 1 22 21 6 5 3 33 26 25 0 3 3 0 14 27 26 2 28 13 3 33
- 32 16 15 4 13 20 3 25 24 2 13 22 5 4 1 0 4 13 2 0 0 35 34 29 28
- 10 3 22 31 30 21 20 10 3 2 2 4 48 200 37 36 23 22 3 14 13 1 7 6 3
- 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="figuredash" xMin="121" yMin="543" xMax="1108" yMax="691">
- <contour>
- <pt x="121" y="543" on="1"/>
- <pt x="121" y="691" on="1"/>
- <pt x="1108" y="691" on="1"/>
- <pt x="1108" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="five" xMin="249" yMin="-37" xMax="1076" yMax="1480">
- <contour>
- <pt x="249" y="0" on="1"/>
- <pt x="249" y="321" on="1"/>
- <pt x="372" y="321" on="1"/>
- <pt x="397" y="123" on="1"/>
- <pt x="489" y="86" on="0"/>
- <pt x="556" y="86" on="1"/>
- <pt x="689" y="86" on="0"/>
- <pt x="777" y="184" on="1"/>
- <pt x="866" y="283" on="0"/>
- <pt x="866" y="433" on="1"/>
- <pt x="866" y="600" on="0"/>
- <pt x="747" y="699" on="1"/>
- <pt x="628" y="797" on="0"/>
- <pt x="427" y="797" on="1"/>
- <pt x="362" y="797" on="0"/>
- <pt x="280" y="783" on="1"/>
- <pt x="280" y="1480" on="1"/>
- <pt x="1045" y="1480" on="1"/>
- <pt x="1045" y="1308" on="1"/>
- <pt x="425" y="1308" on="1"/>
- <pt x="425" y="916" on="1"/>
- <pt x="474" y="919" on="0"/>
- <pt x="500" y="919" on="1"/>
- <pt x="761" y="919" on="0"/>
- <pt x="918" y="788" on="1"/>
- <pt x="1076" y="658" on="0"/>
- <pt x="1076" y="440" on="1"/>
- <pt x="1076" y="232" on="0"/>
- <pt x="930" y="98" on="1"/>
- <pt x="784" y="-37" on="0"/>
- <pt x="559" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 13 5 22 5 5 30 48 200 30 2 22 1 22 20 15 3 2 1 6 18 2 3 0
- 1 0 2 0 0 0 19 18 22 1 16 1 4 48 200 17 16 0 14 0 0 9 39 26 48
- 200 3 2 2 19 15 3 26 17 0 0 20 19 14 1 15 1 4 48 200 18 17 1 16 15
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="390" y="1061" on="1"/>
- <pt x="686" y="1061" on="1"/>
- <pt x="686" y="925" on="1"/>
- <pt x="390" y="925" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="925" on="1"/>
- <pt x="75" y="925" on="1"/>
- <pt x="75" y="1061" on="1"/>
- <pt x="192" y="1061" on="1"/>
- <pt x="192" y="1247" on="1"/>
- <pt x="192" y="1604" on="0"/>
- <pt x="588" y="1604" on="1"/>
- <pt x="674" y="1604" on="0"/>
- <pt x="784" y="1588" on="1"/>
- <pt x="846" y="1579" on="1"/>
- <pt x="1043" y="1579" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="748" y="0" on="1"/>
- <pt x="748" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="1450" on="1"/>
- <pt x="711" y="1487" on="0"/>
- <pt x="597" y="1487" on="1"/>
- <pt x="480" y="1487" on="0"/>
- <pt x="434" y="1447" on="1"/>
- <pt x="390" y="1407" on="0"/>
- <pt x="390" y="1301" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 29 40 16 48 200 33 27 14 3 19 0 3 26 25 22 21 9 8 5 4 8 2 6
- 3 16 19 0 0 11 10 3 2 20 3 0 1 4 48 200 20 19 1 13 12 1 0 3 24
- 23 7 6 3 3 0 14 25 24 6 5 2 1 6 19 0 3 23 22 2 13 20 12 11 8
- 7 4 13 9 0 0 27 26 19 10 2 20 33 4 3 0 10 3 9 2 4 48 200 21 20
- 1 14 13 10 9 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl#1" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="390" y="1061" on="1"/>
- <pt x="686" y="1061" on="1"/>
- <pt x="686" y="925" on="1"/>
- <pt x="390" y="925" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="925" on="1"/>
- <pt x="75" y="925" on="1"/>
- <pt x="75" y="1061" on="1"/>
- <pt x="192" y="1061" on="1"/>
- <pt x="192" y="1247" on="1"/>
- <pt x="192" y="1604" on="0"/>
- <pt x="588" y="1604" on="1"/>
- <pt x="674" y="1604" on="0"/>
- <pt x="784" y="1588" on="1"/>
- <pt x="846" y="1579" on="1"/>
- <pt x="1043" y="1579" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="748" y="0" on="1"/>
- <pt x="748" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="1450" on="1"/>
- <pt x="711" y="1487" on="0"/>
- <pt x="597" y="1487" on="1"/>
- <pt x="480" y="1487" on="0"/>
- <pt x="434" y="1447" on="1"/>
- <pt x="390" y="1407" on="0"/>
- <pt x="390" y="1301" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 29 40 16 48 200 33 27 14 3 19 0 3 26 25 22 21 9 8 5 4 8 2 6
- 3 16 19 0 0 11 10 3 2 20 3 0 1 4 48 200 20 19 1 13 12 1 0 3 24
- 23 7 6 3 3 0 14 25 24 6 5 2 1 6 19 0 3 23 22 2 13 20 12 11 8
- 7 4 13 9 0 0 27 26 19 10 2 20 33 4 3 0 10 3 9 2 4 48 200 21 20
- 1 14 13 10 9 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="florin" xMin="84" yMin="-296" xMax="1081" yMax="1517">
- <contour>
- <pt x="84" y="-296" on="1"/>
- <pt x="288" y="728" on="1"/>
- <pt x="116" y="728" on="1"/>
- <pt x="116" y="851" on="1"/>
- <pt x="313" y="851" on="1"/>
- <pt x="340" y="990" on="1"/>
- <pt x="443" y="1517" on="0"/>
- <pt x="892" y="1517" on="1"/>
- <pt x="971" y="1517" on="0"/>
- <pt x="1081" y="1499" on="1"/>
- <pt x="1081" y="1166" on="1"/>
- <pt x="958" y="1166" on="1"/>
- <pt x="933" y="1363" on="1"/>
- <pt x="853" y="1388" on="0"/>
- <pt x="805" y="1388" on="1"/>
- <pt x="618" y="1388" on="0"/>
- <pt x="555" y="1076" on="1"/>
- <pt x="510" y="851" on="1"/>
- <pt x="754" y="851" on="1"/>
- <pt x="754" y="728" on="1"/>
- <pt x="486" y="728" on="1"/>
- <pt x="282" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 14 25 7 48 200 7 0 1 12 11 10 3 0 3 3 0 1 9 0 0 0 0 20
- 19 2 1 6 3 3 1 4 48 200 18 17 4 3 3 21 0 1 2 0 14 21 20 19 18
- 17 12 11 4 3 2 1 0 12 13 9 10 9 1 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="four" xMin="84" yMin="0" xMax="1132" yMax="1480">
- <contour>
- <pt x="738" y="419" on="1"/>
- <pt x="84" y="419" on="1"/>
- <pt x="84" y="568" on="1"/>
- <pt x="713" y="1480" on="1"/>
- <pt x="910" y="1480" on="1"/>
- <pt x="910" y="568" on="1"/>
- <pt x="1132" y="568" on="1"/>
- <pt x="1132" y="419" on="1"/>
- <pt x="910" y="419" on="1"/>
- <pt x="910" y="123" on="1"/>
- <pt x="1108" y="123" on="1"/>
- <pt x="1108" y="0" on="1"/>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="123" on="1"/>
- <pt x="738" y="123" on="1"/>
- </contour>
- <contour>
- <pt x="238" y="568" on="1"/>
- <pt x="738" y="568" on="1"/>
- <pt x="738" y="1292" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 17 3 2 2 0 0 16 15 6 5 2 7 4 0 14 13 10 9 6 3 11 2 4 48 200
- 8 7 1 0 3 12 11 1 2 0 4 3 0 14 11 10 2 6 4 3 15 13 12 3 4
- 0 1 3 0 0 17 16 14 0 12 3 4 1 4 48 200 7 6 1 9 8 5 4 3 2
- 1 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="foursuperiour" xMin="284" yMin="728" xMax="918" yMax="1517">
- <contour>
- <pt x="807" y="728" on="1"/>
- <pt x="659" y="728" on="1"/>
- <pt x="659" y="907" on="1"/>
- <pt x="284" y="907" on="1"/>
- <pt x="284" y="1030" on="1"/>
- <pt x="654" y="1517" on="1"/>
- <pt x="807" y="1517" on="1"/>
- <pt x="807" y="1030" on="1"/>
- <pt x="918" y="1030" on="1"/>
- <pt x="918" y="907" on="1"/>
- <pt x="807" y="907" on="1"/>
- </contour>
- <contour>
- <pt x="422" y="1030" on="1"/>
- <pt x="659" y="1030" on="1"/>
- <pt x="659" y="1339" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 13 5 4 2 0 0 10 9 3 2 6 3 4 1 4 48 200 6 5 1 12 11 8 7 4
- 4 1 0 1 3 0 14 9 8 2 13 0 11 5 4 3 4 13 1 0 0 13 12 2 1
- 16 3 0 1 4 48 200 10 7 6 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="foursuperiour#1" xMin="155" yMin="-37" xMax="1073" yMax="1517">
- <contour>
- <pt x="155" y="-37" on="1"/>
- <pt x="932" y="1517" on="1"/>
- <pt x="1073" y="1517" on="1"/>
- <pt x="293" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction" xMin="155" yMin="-37" xMax="1073" yMax="1517">
- <contour>
- <pt x="155" y="-37" on="1"/>
- <pt x="932" y="1517" on="1"/>
- <pt x="1073" y="1517" on="1"/>
- <pt x="293" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction#1" xMin="155" yMin="-37" xMax="1073" yMax="1517">
- <contour>
- <pt x="155" y="-37" on="1"/>
- <pt x="932" y="1517" on="1"/>
- <pt x="1073" y="1517" on="1"/>
- <pt x="293" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="g" xMin="86" yMin="-420" xMax="1160" yMax="1111">
- <contour>
- <pt x="266" y="13" on="1"/>
- <pt x="172" y="72" on="0"/>
- <pt x="172" y="152" on="1"/>
- <pt x="172" y="239" on="0"/>
- <pt x="288" y="345" on="1"/>
- <pt x="324" y="378" on="1"/>
- <pt x="233" y="433" on="0"/>
- <pt x="187" y="495" on="1"/>
- <pt x="120" y="587" on="0"/>
- <pt x="120" y="713" on="1"/>
- <pt x="120" y="893" on="0"/>
- <pt x="243" y="1001" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="565" y="1110" on="1"/>
- <pt x="663" y="1110" on="0"/>
- <pt x="752" y="1078" on="1"/>
- <pt x="1160" y="1111" on="1"/>
- <pt x="1101" y="933" on="1"/>
- <pt x="897" y="965" on="1"/>
- <pt x="1000" y="833" on="0"/>
- <pt x="1000" y="704" on="1"/>
- <pt x="1000" y="538" on="0"/>
- <pt x="875" y="428" on="1"/>
- <pt x="749" y="318" on="0"/>
- <pt x="561" y="318" on="1"/>
- <pt x="508" y="318" on="0"/>
- <pt x="441" y="331" on="1"/>
- <pt x="402" y="297" on="1"/>
- <pt x="342" y="245" on="0"/>
- <pt x="342" y="204" on="1"/>
- <pt x="342" y="148" on="0"/>
- <pt x="481" y="148" on="1"/>
- <pt x="794" y="148" on="1"/>
- <pt x="1104" y="148" on="0"/>
- <pt x="1104" y="-86" on="1"/>
- <pt x="1104" y="-420" on="0"/>
- <pt x="539" y="-420" on="1"/>
- <pt x="86" y="-420" on="0"/>
- <pt x="86" y="-203" on="1"/>
- <pt x="86" y="-106" on="0"/>
- <pt x="210" y="-24" on="1"/>
- </contour>
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="364" y="-30" on="1"/>
- <pt x="283" y="-91" on="0"/>
- <pt x="283" y="-165" on="1"/>
- <pt x="283" y="-296" on="0"/>
- <pt x="564" y="-296" on="1"/>
- <pt x="720" y="-296" on="0"/>
- <pt x="813" y="-247" on="1"/>
- <pt x="906" y="-199" on="0"/>
- <pt x="906" y="-119" on="1"/>
- <pt x="906" y="0" on="0"/>
- <pt x="728" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="567" y="987" on="1"/>
- <pt x="458" y="987" on="0"/>
- <pt x="388" y="906" on="1"/>
- <pt x="317" y="825" on="0"/>
- <pt x="317" y="703" on="1"/>
- <pt x="317" y="586" on="0"/>
- <pt x="386" y="514" on="1"/>
- <pt x="455" y="441" on="0"/>
- <pt x="564" y="441" on="1"/>
- <pt x="673" y="441" on="0"/>
- <pt x="744" y="516" on="1"/>
- <pt x="815" y="590" on="0"/>
- <pt x="815" y="708" on="1"/>
- <pt x="815" y="819" on="0"/>
- <pt x="759" y="893" on="1"/>
- <pt x="687" y="987" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 0 0 61 5 24 53 5 13 46 5 36 48 200 13 1 24 1 26 24 18 17 15 5 6 1
- 31 3 0 0 31 41 2 1 16 1 0 36 41 0 0 32 31 7 1 41 1 4 48 200 52
- 41 1 0 14 0 0 65 19 20 57 28 9 50 28 34 44 28 38 29 15 2 48 200 52 41
- 38 34 32 31 26 20 18 17 16 15 9 5 2 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gbreve" xMin="86" yMin="-420" xMax="1160" yMax="1579">
- <component glyphName="g" x="0" y="0" flags="0x4"/>
- <component glyphName="breve" x="-54" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="gcircumflex" xMin="86" yMin="-420" xMax="1160" yMax="1604">
- <contour>
- <pt x="266" y="13" on="1"/>
- <pt x="172" y="72" on="0"/>
- <pt x="172" y="152" on="1"/>
- <pt x="172" y="239" on="0"/>
- <pt x="288" y="345" on="1"/>
- <pt x="324" y="378" on="1"/>
- <pt x="233" y="433" on="0"/>
- <pt x="187" y="495" on="1"/>
- <pt x="120" y="587" on="0"/>
- <pt x="120" y="713" on="1"/>
- <pt x="120" y="893" on="0"/>
- <pt x="243" y="1001" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="565" y="1110" on="1"/>
- <pt x="663" y="1110" on="0"/>
- <pt x="752" y="1078" on="1"/>
- <pt x="1160" y="1111" on="1"/>
- <pt x="1101" y="933" on="1"/>
- <pt x="897" y="965" on="1"/>
- <pt x="1000" y="833" on="0"/>
- <pt x="1000" y="704" on="1"/>
- <pt x="1000" y="538" on="0"/>
- <pt x="875" y="428" on="1"/>
- <pt x="749" y="318" on="0"/>
- <pt x="561" y="318" on="1"/>
- <pt x="508" y="318" on="0"/>
- <pt x="441" y="331" on="1"/>
- <pt x="402" y="297" on="1"/>
- <pt x="342" y="245" on="0"/>
- <pt x="342" y="204" on="1"/>
- <pt x="342" y="148" on="0"/>
- <pt x="481" y="148" on="1"/>
- <pt x="794" y="148" on="1"/>
- <pt x="1104" y="148" on="0"/>
- <pt x="1104" y="-86" on="1"/>
- <pt x="1104" y="-420" on="0"/>
- <pt x="539" y="-420" on="1"/>
- <pt x="86" y="-420" on="0"/>
- <pt x="86" y="-203" on="1"/>
- <pt x="86" y="-106" on="0"/>
- <pt x="210" y="-24" on="1"/>
- </contour>
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="364" y="-30" on="1"/>
- <pt x="283" y="-91" on="0"/>
- <pt x="283" y="-165" on="1"/>
- <pt x="283" y="-296" on="0"/>
- <pt x="564" y="-296" on="1"/>
- <pt x="720" y="-296" on="0"/>
- <pt x="813" y="-247" on="1"/>
- <pt x="906" y="-199" on="0"/>
- <pt x="906" y="-119" on="1"/>
- <pt x="906" y="0" on="0"/>
- <pt x="728" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="567" y="987" on="1"/>
- <pt x="458" y="987" on="0"/>
- <pt x="388" y="906" on="1"/>
- <pt x="317" y="825" on="0"/>
- <pt x="317" y="703" on="1"/>
- <pt x="317" y="586" on="0"/>
- <pt x="386" y="514" on="1"/>
- <pt x="455" y="441" on="0"/>
- <pt x="564" y="441" on="1"/>
- <pt x="673" y="441" on="0"/>
- <pt x="744" y="516" on="1"/>
- <pt x="815" y="590" on="0"/>
- <pt x="815" y="708" on="1"/>
- <pt x="815" y="819" on="0"/>
- <pt x="759" y="893" on="1"/>
- <pt x="687" y="987" on="0"/>
- </contour>
- <contour>
- <pt x="202" y="1283" on="1"/>
- <pt x="458" y="1604" on="1"/>
- <pt x="677" y="1604" on="1"/>
- <pt x="933" y="1283" on="1"/>
- <pt x="810" y="1283" on="1"/>
- <pt x="569" y="1485" on="1"/>
- <pt x="566" y="1485" on="1"/>
- <pt x="325" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 110 values pushed */
- 0 0 61 5 24 53 5 13 46 5 36 48 200 13 1 1 76 75 74 73 72 69 16 7 70
- 1 3 0 24 1 26 24 18 17 15 5 6 1 31 3 0 0 31 41 2 36 41 0 0 32
- 31 7 1 41 1 4 48 200 71 70 1 52 41 1 2 0 14 0 0 65 19 20 57 28 9
- 50 28 34 44 28 38 29 15 2 48 200 76 75 74 73 72 71 70 69 52 41 38 34 32 31
- 26 20 18 17 16 15 9 5 2 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gcommaaccent" xMin="86" yMin="-420" xMax="1160" yMax="1737">
- <contour>
- <pt x="266" y="13" on="1"/>
- <pt x="172" y="72" on="0"/>
- <pt x="172" y="152" on="1"/>
- <pt x="172" y="239" on="0"/>
- <pt x="288" y="345" on="1"/>
- <pt x="324" y="378" on="1"/>
- <pt x="233" y="433" on="0"/>
- <pt x="187" y="495" on="1"/>
- <pt x="120" y="587" on="0"/>
- <pt x="120" y="713" on="1"/>
- <pt x="120" y="893" on="0"/>
- <pt x="243" y="1001" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="565" y="1110" on="1"/>
- <pt x="663" y="1110" on="0"/>
- <pt x="752" y="1078" on="1"/>
- <pt x="1160" y="1111" on="1"/>
- <pt x="1101" y="933" on="1"/>
- <pt x="897" y="965" on="1"/>
- <pt x="1000" y="833" on="0"/>
- <pt x="1000" y="704" on="1"/>
- <pt x="1000" y="538" on="0"/>
- <pt x="875" y="428" on="1"/>
- <pt x="749" y="318" on="0"/>
- <pt x="561" y="318" on="1"/>
- <pt x="508" y="318" on="0"/>
- <pt x="441" y="331" on="1"/>
- <pt x="402" y="297" on="1"/>
- <pt x="342" y="245" on="0"/>
- <pt x="342" y="204" on="1"/>
- <pt x="342" y="148" on="0"/>
- <pt x="481" y="148" on="1"/>
- <pt x="794" y="148" on="1"/>
- <pt x="1104" y="148" on="0"/>
- <pt x="1104" y="-86" on="1"/>
- <pt x="1104" y="-420" on="0"/>
- <pt x="539" y="-420" on="1"/>
- <pt x="86" y="-420" on="0"/>
- <pt x="86" y="-203" on="1"/>
- <pt x="86" y="-106" on="0"/>
- <pt x="210" y="-24" on="1"/>
- </contour>
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="364" y="-30" on="1"/>
- <pt x="283" y="-91" on="0"/>
- <pt x="283" y="-165" on="1"/>
- <pt x="283" y="-296" on="0"/>
- <pt x="564" y="-296" on="1"/>
- <pt x="720" y="-296" on="0"/>
- <pt x="813" y="-247" on="1"/>
- <pt x="906" y="-199" on="0"/>
- <pt x="906" y="-119" on="1"/>
- <pt x="906" y="0" on="0"/>
- <pt x="728" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="567" y="987" on="1"/>
- <pt x="458" y="987" on="0"/>
- <pt x="388" y="906" on="1"/>
- <pt x="317" y="825" on="0"/>
- <pt x="317" y="703" on="1"/>
- <pt x="317" y="586" on="0"/>
- <pt x="386" y="514" on="1"/>
- <pt x="455" y="441" on="0"/>
- <pt x="564" y="441" on="1"/>
- <pt x="673" y="441" on="0"/>
- <pt x="744" y="516" on="1"/>
- <pt x="815" y="590" on="0"/>
- <pt x="815" y="708" on="1"/>
- <pt x="815" y="819" on="0"/>
- <pt x="759" y="893" on="1"/>
- <pt x="687" y="987" on="0"/>
- </contour>
- <contour>
- <pt x="659" y="1737" on="1"/>
- <pt x="659" y="1678" on="1"/>
- <pt x="582" y="1657" on="0"/>
- <pt x="582" y="1497" on="1"/>
- <pt x="582" y="1480" on="1"/>
- <pt x="659" y="1480" on="1"/>
- <pt x="659" y="1283" on="1"/>
- <pt x="461" y="1283" on="1"/>
- <pt x="461" y="1454" on="1"/>
- <pt x="462" y="1716" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 135 values pushed */
- 0 0 61 5 24 53 5 13 46 5 36 48 200 13 1 1 16 75 1 2 0 24 1 26 24
- 18 17 15 5 6 1 31 3 0 0 31 41 2 77 74 73 72 70 69 6 13 75 36 41 0
- 0 32 31 7 1 41 1 4 48 200 76 75 1 52 41 1 2 0 14 0 0 65 19 20 57
- 28 9 50 28 34 44 28 38 29 15 2 48 200 73 72 31 3 69 76 3 52 32 18 17 16
- 15 6 13 34 20 69 41 26 5 0 4 13 38 9 2 3 12 76 0 0 75 74 70 69 10
- 3 76 1 4 48 200 77 76 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gdotaccent" xMin="86" yMin="-420" xMax="1160" yMax="1480">
- <contour>
- <pt x="266" y="13" on="1"/>
- <pt x="172" y="72" on="0"/>
- <pt x="172" y="152" on="1"/>
- <pt x="172" y="239" on="0"/>
- <pt x="288" y="345" on="1"/>
- <pt x="324" y="378" on="1"/>
- <pt x="233" y="433" on="0"/>
- <pt x="187" y="495" on="1"/>
- <pt x="120" y="587" on="0"/>
- <pt x="120" y="713" on="1"/>
- <pt x="120" y="893" on="0"/>
- <pt x="243" y="1001" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="565" y="1110" on="1"/>
- <pt x="663" y="1110" on="0"/>
- <pt x="752" y="1078" on="1"/>
- <pt x="1160" y="1111" on="1"/>
- <pt x="1101" y="933" on="1"/>
- <pt x="897" y="965" on="1"/>
- <pt x="1000" y="833" on="0"/>
- <pt x="1000" y="704" on="1"/>
- <pt x="1000" y="538" on="0"/>
- <pt x="875" y="428" on="1"/>
- <pt x="749" y="318" on="0"/>
- <pt x="561" y="318" on="1"/>
- <pt x="508" y="318" on="0"/>
- <pt x="441" y="331" on="1"/>
- <pt x="402" y="297" on="1"/>
- <pt x="342" y="245" on="0"/>
- <pt x="342" y="204" on="1"/>
- <pt x="342" y="148" on="0"/>
- <pt x="481" y="148" on="1"/>
- <pt x="794" y="148" on="1"/>
- <pt x="1104" y="148" on="0"/>
- <pt x="1104" y="-86" on="1"/>
- <pt x="1104" y="-420" on="0"/>
- <pt x="539" y="-420" on="1"/>
- <pt x="86" y="-420" on="0"/>
- <pt x="86" y="-203" on="1"/>
- <pt x="86" y="-106" on="0"/>
- <pt x="210" y="-24" on="1"/>
- </contour>
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="364" y="-30" on="1"/>
- <pt x="283" y="-91" on="0"/>
- <pt x="283" y="-165" on="1"/>
- <pt x="283" y="-296" on="0"/>
- <pt x="564" y="-296" on="1"/>
- <pt x="720" y="-296" on="0"/>
- <pt x="813" y="-247" on="1"/>
- <pt x="906" y="-199" on="0"/>
- <pt x="906" y="-119" on="1"/>
- <pt x="906" y="0" on="0"/>
- <pt x="728" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="567" y="987" on="1"/>
- <pt x="458" y="987" on="0"/>
- <pt x="388" y="906" on="1"/>
- <pt x="317" y="825" on="0"/>
- <pt x="317" y="703" on="1"/>
- <pt x="317" y="586" on="0"/>
- <pt x="386" y="514" on="1"/>
- <pt x="455" y="441" on="0"/>
- <pt x="564" y="441" on="1"/>
- <pt x="673" y="441" on="0"/>
- <pt x="744" y="516" on="1"/>
- <pt x="815" y="590" on="0"/>
- <pt x="815" y="708" on="1"/>
- <pt x="815" y="819" on="0"/>
- <pt x="759" y="893" on="1"/>
- <pt x="687" y="987" on="0"/>
- </contour>
- <contour>
- <pt x="461" y="1283" on="1"/>
- <pt x="461" y="1480" on="1"/>
- <pt x="658" y="1480" on="1"/>
- <pt x="658" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 125 values pushed */
- 0 0 61 5 24 53 5 13 46 5 36 48 200 13 1 1 16 69 1 2 0 24 1 26 24
- 18 17 15 5 6 1 31 3 0 0 31 41 2 36 41 0 0 72 69 10 1 70 32 31 7
- 1 41 2 4 48 200 52 41 1 0 71 70 0 14 0 0 65 19 20 57 28 9 50 28 34
- 44 28 38 29 15 2 48 200 31 71 69 2 52 32 18 17 16 15 6 13 34 20 71 41 26
- 5 0 4 13 38 9 2 3 12 69 0 0 72 71 10 1 69 1 4 48 200 70 69 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="germandbls" xMin="62" yMin="-25" xMax="1193" yMax="1604">
- <contour>
- <pt x="62" y="0" on="1"/>
- <pt x="62" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="1103" on="1"/>
- <pt x="197" y="1293" on="0"/>
- <pt x="219" y="1373" on="1"/>
- <pt x="241" y="1453" on="0"/>
- <pt x="309" y="1512" on="1"/>
- <pt x="415" y="1604" on="0"/>
- <pt x="609" y="1604" on="1"/>
- <pt x="789" y="1604" on="0"/>
- <pt x="897" y="1539" on="1"/>
- <pt x="1005" y="1474" on="0"/>
- <pt x="1005" y="1363" on="1"/>
- <pt x="1005" y="1245" on="0"/>
- <pt x="880" y="1142" on="1"/>
- <pt x="750" y="1035" on="1"/>
- <pt x="682" y="979" on="0"/>
- <pt x="682" y="913" on="1"/>
- <pt x="682" y="844" on="0"/>
- <pt x="806" y="751" on="1"/>
- <pt x="941" y="650" on="1"/>
- <pt x="1104" y="528" on="0"/>
- <pt x="1147" y="468" on="1"/>
- <pt x="1193" y="403" on="0"/>
- <pt x="1193" y="300" on="1"/>
- <pt x="1193" y="155" on="0"/>
- <pt x="1099" y="65" on="1"/>
- <pt x="1005" y="-25" on="0"/>
- <pt x="847" y="-25" on="1"/>
- <pt x="733" y="-25" on="0"/>
- <pt x="604" y="12" on="1"/>
- <pt x="604" y="290" on="1"/>
- <pt x="715" y="290" on="1"/>
- <pt x="740" y="142" on="1"/>
- <pt x="812" y="99" on="0"/>
- <pt x="875" y="99" on="1"/>
- <pt x="1026" y="99" on="0"/>
- <pt x="1026" y="250" on="1"/>
- <pt x="1026" y="357" on="0"/>
- <pt x="916" y="439" on="1"/>
- <pt x="817" y="513" on="1"/>
- <pt x="693" y="606" on="1"/>
- <pt x="572" y="697" on="0"/>
- <pt x="538" y="742" on="1"/>
- <pt x="503" y="789" on="0"/>
- <pt x="503" y="854" on="1"/>
- <pt x="503" y="961" on="0"/>
- <pt x="606" y="1065" on="1"/>
- <pt x="704" y="1164" on="1"/>
- <pt x="808" y="1269" on="0"/>
- <pt x="808" y="1359" on="1"/>
- <pt x="808" y="1481" on="0"/>
- <pt x="618" y="1481" on="1"/>
- <pt x="496" y="1481" on="0"/>
- <pt x="445" y="1430" on="1"/>
- <pt x="395" y="1380" on="0"/>
- <pt x="395" y="1256" on="1"/>
- <pt x="395" y="123" on="1"/>
- <pt x="518" y="123" on="1"/>
- <pt x="518" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 53 5 9 36 5 29 48 200 29 2 59 58 57 34 33 32 31 3 2 1 10 13 9
- 0 60 0 1 0 14 0 0 51 28 13 38 15 25 18 13 46 48 200 46 60 59 46 3 31
- 57 3 34 33 2 13 25 13 31 1 0 2 0 0 58 57 10 1 2 1 4 48 200 32 31
- 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="grave" xMin="392" yMin="1283" xMax="836" yMax="1604">
- <contour>
- <pt x="836" y="1283" on="1"/>
- <pt x="713" y="1283" on="1"/>
- <pt x="392" y="1604" on="1"/>
- <pt x="620" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 1 0 2 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="greater" xMin="99" yMin="0" xMax="1131" yMax="1234">
- <contour>
- <pt x="99" y="0" on="1"/>
- <pt x="99" y="173" on="1"/>
- <pt x="842" y="617" on="1"/>
- <pt x="99" y="1061" on="1"/>
- <pt x="99" y="1234" on="1"/>
- <pt x="1131" y="617" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 18 values pushed */
- 5 4 3 2 1 0 14 5 2 2 13 0 4 3 1 0 3 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotleft" xMin="82" yMin="99" xMax="1106" yMax="987">
- <contour>
- <pt x="1106" y="185" on="1"/>
- <pt x="1020" y="99" on="1"/>
- <pt x="575" y="543" on="1"/>
- <pt x="1020" y="987" on="1"/>
- <pt x="1106" y="901" on="1"/>
- <pt x="822" y="543" on="1"/>
- </contour>
- <contour>
- <pt x="613" y="185" on="1"/>
- <pt x="526" y="99" on="1"/>
- <pt x="82" y="543" on="1"/>
- <pt x="526" y="987" on="1"/>
- <pt x="613" y="901" on="1"/>
- <pt x="329" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotright" xMin="123" yMin="99" xMax="1147" yMax="987">
- <contour>
- <pt x="123" y="185" on="1"/>
- <pt x="407" y="543" on="1"/>
- <pt x="123" y="901" on="1"/>
- <pt x="209" y="987" on="1"/>
- <pt x="653" y="543" on="1"/>
- <pt x="209" y="99" on="1"/>
- </contour>
- <contour>
- <pt x="616" y="185" on="1"/>
- <pt x="900" y="543" on="1"/>
- <pt x="616" y="901" on="1"/>
- <pt x="703" y="987" on="1"/>
- <pt x="1147" y="543" on="1"/>
- <pt x="703" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglleft" xMin="234" yMin="99" xMax="946" yMax="987">
- <contour>
- <pt x="946" y="901" on="1"/>
- <pt x="508" y="543" on="1"/>
- <pt x="946" y="185" on="1"/>
- <pt x="860" y="99" on="1"/>
- <pt x="234" y="543" on="1"/>
- <pt x="860" y="987" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglright" xMin="283" yMin="99" xMax="995" yMax="987">
- <contour>
- <pt x="283" y="185" on="1"/>
- <pt x="721" y="543" on="1"/>
- <pt x="283" y="901" on="1"/>
- <pt x="369" y="987" on="1"/>
- <pt x="995" y="543" on="1"/>
- <pt x="369" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="h" xMin="69" yMin="0" xMax="1167" yMax="1579">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="1456" on="1"/>
- <pt x="69" y="1456" on="1"/>
- <pt x="69" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="876" on="1"/>
- <pt x="459" y="981" on="0"/>
- <pt x="527" y="1034" on="1"/>
- <pt x="623" y="1110" on="0"/>
- <pt x="742" y="1110" on="1"/>
- <pt x="1043" y="1110" on="0"/>
- <pt x="1043" y="722" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="747" y="0" on="1"/>
- <pt x="747" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="701" on="1"/>
- <pt x="846" y="956" on="0"/>
- <pt x="683" y="956" on="1"/>
- <pt x="533" y="956" on="0"/>
- <pt x="390" y="704" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 22 30 11 48 200 11 1 1 4 3 2 5 1 3 0 1 26 25 24 20 19 18 15
- 14 13 7 2 1 12 1 0 3 0 6 5 1 27 17 16 0 3 2 0 14 27 26 18 17
- 4 19 6 3 16 15 2 13 13 5 4 1 0 4 13 2 0 0 20 19 10 1 13 25 24
- 7 6 10 3 2 2 4 48 200 14 13 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hbar" xMin="69" yMin="0" xMax="1167" yMax="1579">
- <contour>
- <pt x="390" y="876" on="1"/>
- <pt x="459" y="981" on="0"/>
- <pt x="527" y="1034" on="1"/>
- <pt x="623" y="1110" on="0"/>
- <pt x="742" y="1110" on="1"/>
- <pt x="1043" y="1110" on="0"/>
- <pt x="1043" y="722" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="747" y="0" on="1"/>
- <pt x="747" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="701" on="1"/>
- <pt x="846" y="956" on="0"/>
- <pt x="683" y="956" on="1"/>
- <pt x="533" y="956" on="0"/>
- <pt x="390" y="704" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="1234" on="1"/>
- <pt x="69" y="1234" on="1"/>
- <pt x="69" y="1332" on="1"/>
- <pt x="192" y="1332" on="1"/>
- <pt x="192" y="1456" on="1"/>
- <pt x="69" y="1456" on="1"/>
- <pt x="69" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="1332" on="1"/>
- <pt x="686" y="1332" on="1"/>
- <pt x="686" y="1234" on="1"/>
- <pt x="390" y="1234" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 116 values pushed */
- 0 0 15 30 4 48 200 4 1 29 28 2 30 26 3 1 23 22 19 18 17 13 12 11 8
- 7 6 0 12 1 9 3 0 0 0 35 34 25 24 33 3 26 1 4 48 200 31 30 1 33
- 32 27 26 3 21 20 10 9 3 3 0 14 34 33 20 19 11 10 6 12 0 3 9 8 2
- 13 6 30 29 26 25 22 21 6 13 23 0 0 13 12 10 1 6 35 32 31 18 17 0 10
- 5 23 2 4 48 200 7 6 1 28 27 24 23 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hcircumflex" xMin="69" yMin="0" xMax="1167" yMax="1999">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="1456" on="1"/>
- <pt x="69" y="1456" on="1"/>
- <pt x="69" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="876" on="1"/>
- <pt x="459" y="981" on="0"/>
- <pt x="527" y="1034" on="1"/>
- <pt x="623" y="1110" on="0"/>
- <pt x="742" y="1110" on="1"/>
- <pt x="1043" y="1110" on="0"/>
- <pt x="1043" y="722" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="747" y="0" on="1"/>
- <pt x="747" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="701" on="1"/>
- <pt x="846" y="956" on="0"/>
- <pt x="683" y="956" on="1"/>
- <pt x="533" y="956" on="0"/>
- <pt x="390" y="704" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="254" y="1678" on="1"/>
- <pt x="510" y="1999" on="1"/>
- <pt x="729" y="1999" on="1"/>
- <pt x="985" y="1678" on="1"/>
- <pt x="862" y="1678" on="1"/>
- <pt x="621" y="1880" on="1"/>
- <pt x="618" y="1880" on="1"/>
- <pt x="377" y="1678" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 121 values pushed */
- 0 0 22 35 11 48 200 11 1 35 34 33 32 31 28 6 29 5 3 1 4 3 2 5 1
- 3 0 1 26 25 24 20 19 18 15 14 13 7 2 1 12 1 0 3 0 30 29 1 6 5
- 1 27 17 16 0 3 3 0 14 32 31 2 13 19 3 34 33 30 29 27 26 18 17 8 19
- 6 3 35 28 2 6 2 3 16 15 2 13 13 5 4 1 0 4 13 2 0 0 20 19 10
- 1 13 25 24 7 6 10 3 2 2 4 48 200 14 13 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hungarumlaut" xMin="223" yMin="1283" xMax="1006" yMax="1604">
- <contour>
- <pt x="223" y="1283" on="1"/>
- <pt x="463" y="1604" on="1"/>
- <pt x="655" y="1604" on="1"/>
- <pt x="334" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="574" y="1283" on="1"/>
- <pt x="815" y="1604" on="1"/>
- <pt x="1006" y="1604" on="1"/>
- <pt x="685" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 4 3 0 4 13 1 6 5 2 1 3 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen" xMin="148" yMin="543" xMax="1081" yMax="691">
- <contour>
- <pt x="148" y="543" on="1"/>
- <pt x="148" y="691" on="1"/>
- <pt x="1081" y="691" on="1"/>
- <pt x="1081" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen#1" xMin="148" yMin="543" xMax="1081" yMax="691">
- <contour>
- <pt x="148" y="543" on="1"/>
- <pt x="148" y="691" on="1"/>
- <pt x="1081" y="691" on="1"/>
- <pt x="1081" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="i" xMin="148" yMin="0" xMax="1105" yMax="1579">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="962" on="1"/>
- <pt x="148" y="962" on="1"/>
- <pt x="148" y="1086" on="1"/>
- <pt x="735" y="1086" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="528" y="1332" on="1"/>
- <pt x="528" y="1579" on="1"/>
- <pt x="750" y="1579" on="1"/>
- <pt x="750" y="1332" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 13 10 4 1 11 4 3 6 1 5 8 7 2 1 6 3 0 3 4 48 200 12 11
- 1 9 0 1 2 0 6 5 1 14 9 8 2 13 12 5 4 1 0 4 13 10 0 0 13
- 12 9 1 10 7 6 10 1 2 2 4 48 200 11 10 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="iacute" xMin="148" yMin="0" xMax="1105" yMax="1604">
- <component glyphName="dotlessi" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="146" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ibreve" xMin="148" yMin="0" xMax="1105" yMax="1579">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="962" on="1"/>
- <pt x="148" y="962" on="1"/>
- <pt x="148" y="1086" on="1"/>
- <pt x="735" y="1086" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="279" y="1579" on="1"/>
- <pt x="402" y="1579" on="1"/>
- <pt x="450" y="1431" on="0"/>
- <pt x="624" y="1431" on="1"/>
- <pt x="799" y="1431" on="0"/>
- <pt x="847" y="1579" on="1"/>
- <pt x="970" y="1579" on="1"/>
- <pt x="948" y="1490" on="0"/>
- <pt x="921" y="1444" on="1"/>
- <pt x="830" y="1289" on="0"/>
- <pt x="629" y="1289" on="1"/>
- <pt x="476" y="1289" on="0"/>
- <pt x="387" y="1370" on="1"/>
- <pt x="332" y="1419" on="0"/>
- <pt x="304" y="1491" on="1"/>
- <pt x="293" y="1520" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 13 14 20 48 200 16 15 11 10 4 13 20 5 0 0 4 3 6 1 5 8 7 2
- 1 6 3 0 2 4 48 200 9 0 1 0 6 5 1 14 16 15 9 8 4 13 6 11 10
- 5 4 1 0 6 13 2 0 0 7 6 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="icircumflex" xMin="148" yMin="0" xMax="1105" yMax="1604">
- <component glyphName="dotlessi" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="23" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="idieresis" xMin="148" yMin="0" xMax="1105" yMax="1480">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="962" on="1"/>
- <pt x="148" y="962" on="1"/>
- <pt x="148" y="1086" on="1"/>
- <pt x="735" y="1086" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="303" y="1283" on="1"/>
- <pt x="303" y="1480" on="1"/>
- <pt x="500" y="1480" on="1"/>
- <pt x="500" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="772" y="1283" on="1"/>
- <pt x="772" y="1480" on="1"/>
- <pt x="969" y="1480" on="1"/>
- <pt x="969" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 17 14 13 10 10 3 11 4 3 6 1 5 8 7 2 1 6 3 0 3 4 48 200
- 9 0 1 0 16 15 12 11 0 3 6 5 1 14 9 8 2 13 16 5 4 1 0 4 13
- 10 0 0 15 14 10 1 16 13 12 10 1 10 7 6 10 1 2 3 4 48 200 17 16 1
- 11 10 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="igrave" xMin="148" yMin="0" xMax="1105" yMax="1604">
- <component glyphName="dotlessi" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="-101" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ij" xMin="57" yMin="-420" xMax="1056" yMax="1579">
- <contour>
- <pt x="57" y="0" on="1"/>
- <pt x="57" y="123" on="1"/>
- <pt x="205" y="123" on="1"/>
- <pt x="205" y="962" on="1"/>
- <pt x="57" y="962" on="1"/>
- <pt x="57" y="1086" on="1"/>
- <pt x="402" y="1086" on="1"/>
- <pt x="402" y="123" on="1"/>
- <pt x="550" y="123" on="1"/>
- <pt x="550" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1056" y="1086" on="1"/>
- <pt x="1056" y="11" on="1"/>
- <pt x="1056" y="-420" on="0"/>
- <pt x="693" y="-420" on="1"/>
- <pt x="599" y="-420" on="0"/>
- <pt x="470" y="-383" on="1"/>
- <pt x="470" y="-173" on="1"/>
- <pt x="594" y="-173" on="1"/>
- <pt x="606" y="-290" on="1"/>
- <pt x="669" y="-321" on="0"/>
- <pt x="716" y="-321" on="1"/>
- <pt x="859" y="-321" on="0"/>
- <pt x="859" y="-82" on="1"/>
- <pt x="859" y="962" on="1"/>
- <pt x="662" y="962" on="1"/>
- <pt x="662" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="180" y="1332" on="1"/>
- <pt x="180" y="1579" on="1"/>
- <pt x="402" y="1579" on="1"/>
- <pt x="402" y="1332" on="1"/>
- </contour>
- <contour>
- <pt x="834" y="1332" on="1"/>
- <pt x="834" y="1579" on="1"/>
- <pt x="1056" y="1579" on="1"/>
- <pt x="1056" y="1332" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 120 values pushed */
- 0 0 20 17 13 48 200 11 1 0 2 22 18 17 16 15 5 13 13 0 0 0 33 30 29
- 26 4 3 27 24 23 4 3 6 3 5 8 7 2 1 6 3 0 3 4 48 200 32 31 28
- 27 3 9 0 1 2 0 25 10 6 5 1 3 14 25 24 18 17 9 8 6 30 15 3 5
- 4 1 0 4 13 26 0 0 31 30 9 1 10 23 22 10 1 10 29 28 7 6 10 3 2
- 3 4 48 200 27 26 1 33 32 11 10 3 16 15 1 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="imacron" xMin="148" yMin="0" xMax="1105" yMax="1407">
- <component glyphName="dotlessi" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="-22" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="iogonek" xMin="148" yMin="-370" xMax="1105" yMax="1579">
- <component glyphName="i" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="221" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="itilde" xMin="148" yMin="0" xMax="1105" yMax="1518">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="962" on="1"/>
- <pt x="148" y="962" on="1"/>
- <pt x="148" y="1086" on="1"/>
- <pt x="735" y="1086" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="247" y="1283" on="1"/>
- <pt x="253" y="1377" on="0"/>
- <pt x="278" y="1427" on="1"/>
- <pt x="323" y="1518" on="0"/>
- <pt x="432" y="1518" on="1"/>
- <pt x="504" y="1518" on="0"/>
- <pt x="567" y="1479" on="1"/>
- <pt x="627" y="1442" on="1"/>
- <pt x="689" y="1404" on="0"/>
- <pt x="723" y="1404" on="1"/>
- <pt x="791" y="1404" on="0"/>
- <pt x="802" y="1518" on="1"/>
- <pt x="913" y="1518" on="1"/>
- <pt x="906" y="1424" on="0"/>
- <pt x="881" y="1374" on="1"/>
- <pt x="835" y="1283" on="0"/>
- <pt x="728" y="1283" on="1"/>
- <pt x="655" y="1283" on="0"/>
- <pt x="592" y="1322" on="1"/>
- <pt x="532" y="1359" on="1"/>
- <pt x="472" y="1396" on="0"/>
- <pt x="436" y="1396" on="1"/>
- <pt x="368" y="1396" on="0"/>
- <pt x="357" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 31 5 14 19 5 26 48 200 14 0 26 1 33 26 10 3 0 5 3 0 1 22 21
- 2 13 0 0 0 0 4 3 6 1 5 8 7 2 1 6 3 0 2 4 48 200 9 0 1
- 0 6 5 1 14 22 21 9 8 4 13 6 33 10 5 4 1 0 6 13 2 0 0 7 6
- 10 1 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="j" xMin="159" yMin="-420" xMax="915" yMax="1579">
- <contour>
- <pt x="159" y="-344" on="1"/>
- <pt x="159" y="-25" on="1"/>
- <pt x="282" y="-25" on="1"/>
- <pt x="313" y="-243" on="1"/>
- <pt x="381" y="-296" on="0"/>
- <pt x="460" y="-296" on="1"/>
- <pt x="592" y="-296" on="0"/>
- <pt x="648" y="-200" on="1"/>
- <pt x="705" y="-104" on="0"/>
- <pt x="705" y="127" on="1"/>
- <pt x="705" y="962" on="1"/>
- <pt x="261" y="962" on="1"/>
- <pt x="261" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="903" y="66" on="1"/>
- <pt x="903" y="-164" on="0"/>
- <pt x="790" y="-292" on="1"/>
- <pt x="677" y="-420" on="0"/>
- <pt x="476" y="-420" on="1"/>
- <pt x="337" y="-420" on="0"/>
- </contour>
- <contour>
- <pt x="693" y="1332" on="1"/>
- <pt x="693" y="1579" on="1"/>
- <pt x="915" y="1579" on="1"/>
- <pt x="915" y="1332" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 5 5 18 48 200 1 14 9 2 10 2 3 0 1 3 2 1 0 4 13 18 2 0
- 0 0 23 20 4 1 21 11 10 6 1 12 2 4 48 200 22 21 1 0 13 12 1 14 12
- 11 3 2 4 20 0 3 0 0 21 20 9 1 22 10 9 10 1 13 2 4 48 200 23 22
- 1 14 13 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="jcircumflex" xMin="159" yMin="-420" xMax="1092" yMax="1604">
- <contour>
- <pt x="159" y="-344" on="1"/>
- <pt x="159" y="-25" on="1"/>
- <pt x="282" y="-25" on="1"/>
- <pt x="313" y="-243" on="1"/>
- <pt x="381" y="-296" on="0"/>
- <pt x="460" y="-296" on="1"/>
- <pt x="592" y="-296" on="0"/>
- <pt x="648" y="-200" on="1"/>
- <pt x="705" y="-104" on="0"/>
- <pt x="705" y="127" on="1"/>
- <pt x="705" y="962" on="1"/>
- <pt x="261" y="962" on="1"/>
- <pt x="261" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="903" y="66" on="1"/>
- <pt x="903" y="-164" on="0"/>
- <pt x="790" y="-292" on="1"/>
- <pt x="677" y="-420" on="0"/>
- <pt x="476" y="-420" on="1"/>
- <pt x="337" y="-420" on="0"/>
- </contour>
- <contour>
- <pt x="360" y="1283" on="1"/>
- <pt x="617" y="1604" on="1"/>
- <pt x="835" y="1604" on="1"/>
- <pt x="1092" y="1283" on="1"/>
- <pt x="968" y="1283" on="1"/>
- <pt x="727" y="1485" on="1"/>
- <pt x="725" y="1485" on="1"/>
- <pt x="484" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 96 values pushed */
- 0 0 5 5 18 48 200 27 26 25 24 23 20 6 21 12 3 1 14 9 2 10 2 3 0
- 1 3 2 1 0 4 13 18 2 0 0 0 11 10 6 1 12 1 4 48 200 22 21 1 0
- 13 12 1 14 26 25 22 3 13 9 3 27 21 20 12 11 3 2 7 9 0 3 24 23 2
- 13 13 0 0 10 9 10 1 13 1 4 48 200 14 13 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="k" xMin="74" yMin="0" xMax="1176" yMax="1579">
- <contour>
- <pt x="821" y="0" on="1"/>
- <pt x="821" y="123" on="1"/>
- <pt x="419" y="524" on="1"/>
- <pt x="395" y="524" on="1"/>
- <pt x="395" y="123" on="1"/>
- <pt x="494" y="123" on="1"/>
- <pt x="494" y="0" on="1"/>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="1456" on="1"/>
- <pt x="74" y="1456" on="1"/>
- <pt x="74" y="1579" on="1"/>
- <pt x="395" y="1579" on="1"/>
- <pt x="395" y="592" on="1"/>
- <pt x="419" y="592" on="1"/>
- <pt x="777" y="962" on="1"/>
- <pt x="661" y="962" on="1"/>
- <pt x="661" y="1086" on="1"/>
- <pt x="1093" y="1086" on="1"/>
- <pt x="1093" y="962" on="1"/>
- <pt x="952" y="962" on="1"/>
- <pt x="589" y="600" on="1"/>
- <pt x="1077" y="123" on="1"/>
- <pt x="1176" y="123" on="1"/>
- <pt x="1176" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 11 10 2 12 18 3 24 23 22 15 14 9 8 5 4 3 2 1 12 16 0 3 0 0 21
- 20 17 16 6 3 18 1 4 48 200 13 12 1 25 7 6 0 3 2 0 19 18 1 14 25
- 24 23 22 21 20 19 18 17 16 15 6 5 2 1 0 16 13 3 12 11 8 7 4 13 9
- 0 0 14 13 4 3 10 3 9 1 4 48 200 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="kcommaaccent" xMin="74" yMin="-432" xMax="1176" yMax="1579">
- <component glyphName="k" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="29" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="kgreenlandic" xMin="74" yMin="0" xMax="1176" yMax="1086">
- <contour>
- <pt x="821" y="0" on="1"/>
- <pt x="821" y="123" on="1"/>
- <pt x="419" y="524" on="1"/>
- <pt x="395" y="524" on="1"/>
- <pt x="395" y="123" on="1"/>
- <pt x="494" y="123" on="1"/>
- <pt x="494" y="0" on="1"/>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="197" y="123" on="1"/>
- <pt x="197" y="962" on="1"/>
- <pt x="74" y="962" on="1"/>
- <pt x="74" y="1086" on="1"/>
- <pt x="395" y="1086" on="1"/>
- <pt x="395" y="592" on="1"/>
- <pt x="419" y="592" on="1"/>
- <pt x="777" y="962" on="1"/>
- <pt x="661" y="962" on="1"/>
- <pt x="661" y="1086" on="1"/>
- <pt x="1093" y="1086" on="1"/>
- <pt x="1093" y="962" on="1"/>
- <pt x="952" y="962" on="1"/>
- <pt x="589" y="600" on="1"/>
- <pt x="1077" y="123" on="1"/>
- <pt x="1176" y="123" on="1"/>
- <pt x="1176" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 24 23 22 15 14 9 8 5 4 3 2 1 12 10 0 3 0 0 21 20 17 16 11 10 6
- 5 12 1 4 48 200 25 7 6 0 3 0 19 18 13 12 1 3 14 25 24 23 22 21 20
- 19 18 17 16 15 6 5 2 1 0 16 13 3 12 11 8 7 4 13 9 0 0 14 13 4
- 3 10 3 9 1 4 48 200 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="l" xMin="148" yMin="0" xMax="1105" yMax="1579">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="1456" on="1"/>
- <pt x="148" y="1456" on="1"/>
- <pt x="148" y="1579" on="1"/>
- <pt x="735" y="1579" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 0 0 4 3 6 1 5 8 7 2 1 6 3 0 2 4 48 200 6 5 1 9 0 1 2
- 0 14 9 8 2 13 6 5 4 1 0 4 13 2 0 0 7 6 10 1 2 1 4 48 200
- 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lacute" xMin="148" yMin="0" xMax="1105" yMax="1999">
- <component glyphName="l" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="146" y="395" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="lcaron" xMin="123" yMin="0" xMax="1105" yMax="1579">
- <contour>
- <pt x="123" y="0" on="1"/>
- <pt x="123" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="513" y="1456" on="1"/>
- <pt x="123" y="1456" on="1"/>
- <pt x="123" y="1579" on="1"/>
- <pt x="710" y="1579" on="1"/>
- <pt x="710" y="123" on="1"/>
- <pt x="1080" y="123" on="1"/>
- <pt x="1080" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="908" y="1125" on="1"/>
- <pt x="908" y="1184" on="1"/>
- <pt x="984" y="1205" on="0"/>
- <pt x="984" y="1365" on="1"/>
- <pt x="984" y="1382" on="1"/>
- <pt x="908" y="1382" on="1"/>
- <pt x="908" y="1579" on="1"/>
- <pt x="1105" y="1579" on="1"/>
- <pt x="1105" y="1408" on="1"/>
- <pt x="1104" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 18 15 14 13 11 10 6 3 1 3 0 0 4 3 6 1 5 8 7 2 1 6 3 0 2
- 4 48 200 17 16 6 5 3 9 0 1 2 0 14 14 13 9 8 4 17 10 3 5 4 1
- 0 4 13 2 0 0 16 15 11 10 10 3 17 7 6 10 1 2 2 4 48 200 18 17 1
- 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lcommaaccent" xMin="148" yMin="-432" xMax="1105" yMax="1579">
- <component glyphName="l" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="37" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ldot" xMin="123" yMin="0" xMax="1228" yMax="1579">
- <contour>
- <pt x="123" y="0" on="1"/>
- <pt x="123" y="123" on="1"/>
- <pt x="513" y="123" on="1"/>
- <pt x="513" y="1456" on="1"/>
- <pt x="123" y="1456" on="1"/>
- <pt x="123" y="1579" on="1"/>
- <pt x="710" y="1579" on="1"/>
- <pt x="710" y="123" on="1"/>
- <pt x="1080" y="123" on="1"/>
- <pt x="1080" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1031" y="666" on="1"/>
- <pt x="1031" y="863" on="1"/>
- <pt x="1228" y="863" on="1"/>
- <pt x="1228" y="666" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 13 10 10 1 11 4 3 6 1 5 8 7 2 1 6 3 0 3 4 48 200 12 11
- 1 6 5 1 9 0 1 3 0 14 9 8 2 12 10 3 5 4 1 0 4 13 2 0 0
- 11 10 10 1 12 7 6 10 1 2 2 4 48 200 13 12 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="less" xMin="99" yMin="0" xMax="1131" yMax="1234">
- <contour>
- <pt x="1131" y="0" on="1"/>
- <pt x="99" y="617" on="1"/>
- <pt x="1131" y="1234" on="1"/>
- <pt x="1131" y="1061" on="1"/>
- <pt x="388" y="617" on="1"/>
- <pt x="1131" y="173" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 16 values pushed */
- 5 4 3 2 1 0 14 4 1 0 5 3 2 0 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="logicalnot" xMin="99" yMin="197" xMax="1130" yMax="691">
- <contour>
- <pt x="982" y="197" on="1"/>
- <pt x="982" y="543" on="1"/>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="691" on="1"/>
- <pt x="1130" y="691" on="1"/>
- <pt x="1130" y="543" on="1"/>
- <pt x="1130" y="543" on="1"/>
- <pt x="1130" y="197" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 6 5 2 1 16 3 3 1 4 48 200 4 3 1 7 0 1 2 0 14 0 0 1
- 0 16 1 4 1 4 48 200 7 6 5 4 3 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="longs" xMin="148" yMin="0" xMax="1167" yMax="1604">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="419" y="123" on="1"/>
- <pt x="419" y="925" on="1"/>
- <pt x="148" y="925" on="1"/>
- <pt x="148" y="1061" on="1"/>
- <pt x="419" y="1061" on="1"/>
- <pt x="419" y="1179" on="1"/>
- <pt x="419" y="1404" on="0"/>
- <pt x="510" y="1504" on="1"/>
- <pt x="601" y="1604" on="0"/>
- <pt x="803" y="1604" on="1"/>
- <pt x="974" y="1604" on="0"/>
- <pt x="1167" y="1524" on="1"/>
- <pt x="1167" y="1277" on="1"/>
- <pt x="1044" y="1277" on="1"/>
- <pt x="1013" y="1433" on="1"/>
- <pt x="912" y="1480" on="0"/>
- <pt x="829" y="1480" on="1"/>
- <pt x="710" y="1480" on="0"/>
- <pt x="664" y="1420" on="1"/>
- <pt x="617" y="1360" on="0"/>
- <pt x="617" y="1201" on="1"/>
- <pt x="617" y="123" on="1"/>
- <pt x="987" y="123" on="1"/>
- <pt x="987" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 18 5 11 48 200 22 16 15 14 13 7 6 13 11 5 0 0 4 3 20 1 5 24
- 23 2 1 6 3 0 2 4 48 200 6 5 1 25 0 1 2 0 14 25 24 16 15 4 13
- 22 3 5 4 1 0 4 13 2 0 0 23 22 10 1 2 1 4 48 200 14 13 1 7 6
- 3 2 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lslash" xMin="148" yMin="0" xMax="1105" yMax="1579">
- <contour>
- <pt x="148" y="0" on="1"/>
- <pt x="148" y="123" on="1"/>
- <pt x="538" y="123" on="1"/>
- <pt x="538" y="728" on="1"/>
- <pt x="247" y="583" on="1"/>
- <pt x="247" y="721" on="1"/>
- <pt x="538" y="866" on="1"/>
- <pt x="538" y="1456" on="1"/>
- <pt x="148" y="1456" on="1"/>
- <pt x="148" y="1579" on="1"/>
- <pt x="735" y="1579" on="1"/>
- <pt x="735" y="965" on="1"/>
- <pt x="1026" y="1110" on="1"/>
- <pt x="1026" y="973" on="1"/>
- <pt x="735" y="827" on="1"/>
- <pt x="735" y="123" on="1"/>
- <pt x="1105" y="123" on="1"/>
- <pt x="1105" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 14 13 12 11 6 5 4 3 8 7 1 3 0 0 8 7 6 1 9 16 15 2 1 6 3
- 0 2 4 48 200 10 9 1 17 0 1 2 0 14 17 16 2 13 12 9 8 1 0 4 13
- 4 0 0 15 14 11 10 10 3 2 1 4 48 200 13 12 1 7 6 3 2 3 5 4 1
- 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="m" xMin="26" yMin="0" xMax="1204" yMax="1110">
- <contour>
- <pt x="26" y="0" on="1"/>
- <pt x="26" y="123" on="1"/>
- <pt x="100" y="123" on="1"/>
- <pt x="100" y="962" on="1"/>
- <pt x="26" y="962" on="1"/>
- <pt x="26" y="1086" on="1"/>
- <pt x="279" y="1086" on="1"/>
- <pt x="279" y="879" on="1"/>
- <pt x="346" y="1009" on="0"/>
- <pt x="389" y="1055" on="1"/>
- <pt x="441" y="1110" on="0"/>
- <pt x="517" y="1110" on="1"/>
- <pt x="617" y="1110" on="0"/>
- <pt x="663" y="1017" on="1"/>
- <pt x="687" y="969" on="0"/>
- <pt x="698" y="879" on="1"/>
- <pt x="740" y="983" on="0"/>
- <pt x="787" y="1035" on="1"/>
- <pt x="853" y="1110" on="0"/>
- <pt x="943" y="1110" on="1"/>
- <pt x="1130" y="1110" on="0"/>
- <pt x="1130" y="837" on="1"/>
- <pt x="1130" y="123" on="1"/>
- <pt x="1204" y="123" on="1"/>
- <pt x="1204" y="0" on="1"/>
- <pt x="951" y="0" on="1"/>
- <pt x="951" y="752" on="1"/>
- <pt x="951" y="956" on="0"/>
- <pt x="886" y="956" on="1"/>
- <pt x="838" y="956" on="0"/>
- <pt x="779" y="870" on="1"/>
- <pt x="748" y="825" on="0"/>
- <pt x="731" y="783" on="1"/>
- <pt x="705" y="718" on="0"/>
- <pt x="705" y="691" on="1"/>
- <pt x="705" y="123" on="1"/>
- <pt x="779" y="123" on="1"/>
- <pt x="779" y="0" on="1"/>
- <pt x="526" y="0" on="1"/>
- <pt x="526" y="798" on="1"/>
- <pt x="526" y="956" on="0"/>
- <pt x="460" y="956" on="1"/>
- <pt x="373" y="956" on="0"/>
- <pt x="279" y="691" on="1"/>
- <pt x="279" y="123" on="1"/>
- <pt x="353" y="123" on="1"/>
- <pt x="353" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 41 30 11 28 30 19 48 200 19 1 11 1 45 44 43 39 36 35 34 26 23 22 21
- 15 7 4 3 2 1 17 5 0 3 46 38 37 25 24 0 5 0 6 5 1 14 37 36 2
- 25 34 3 15 34 38 2 46 45 2 38 6 3 24 23 2 13 21 5 4 1 0 4 13 2
- 0 0 26 25 12 1 21 35 34 12 1 38 44 43 7 6 12 3 2 3 4 48 200 22 21
- 1 39 38 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron" xMin="269" yMin="1283" xMax="960" yMax="1407">
- <contour>
- <pt x="269" y="1283" on="1"/>
- <pt x="269" y="1407" on="1"/>
- <pt x="960" y="1407" on="1"/>
- <pt x="960" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 6 1 1 1 4 48 200 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron#1" xMin="0" yMin="1456" xMax="1229" yMax="1604">
- <contour>
- <pt x="0" y="1604" on="1"/>
- <pt x="1229" y="1604" on="1"/>
- <pt x="1229" y="1456" on="1"/>
- <pt x="0" y="1456" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 2 16 1 0 1 4 48 200 1 0 1 0 14 2 1 1 3 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="minus" xMin="99" yMin="543" xMax="1130" yMax="691">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="691" on="1"/>
- <pt x="1130" y="691" on="1"/>
- <pt x="1130" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="mu" xMin="68" yMin="-395" xMax="1166" yMax="1086">
- <contour>
- <pt x="191" y="962" on="1"/>
- <pt x="68" y="962" on="1"/>
- <pt x="68" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="385" on="1"/>
- <pt x="389" y="130" on="0"/>
- <pt x="552" y="130" on="1"/>
- <pt x="701" y="130" on="0"/>
- <pt x="845" y="382" on="1"/>
- <pt x="845" y="962" on="1"/>
- <pt x="734" y="962" on="1"/>
- <pt x="734" y="1086" on="1"/>
- <pt x="1043" y="1086" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1166" y="123" on="1"/>
- <pt x="1166" y="0" on="1"/>
- <pt x="845" y="0" on="1"/>
- <pt x="845" y="209" on="1"/>
- <pt x="767" y="89" on="0"/>
- <pt x="700" y="37" on="1"/>
- <pt x="620" y="-25" on="0"/>
- <pt x="499" y="-25" on="1"/>
- <pt x="449" y="-25" on="0"/>
- <pt x="389" y="-10" on="1"/>
- <pt x="389" y="-395" on="1"/>
- <pt x="191" y="-395" on="1"/>
- <pt x="191" y="363" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 6 30 21 48 200 21 2 26 17 14 13 10 9 8 4 1 0 10 2 15 3 23 15
- 24 2 16 15 1 25 24 1 2 0 12 11 3 2 1 3 14 11 10 2 8 3 3 15 14
- 2 13 12 2 1 0 0 0 17 16 9 8 10 3 12 24 23 4 3 10 3 0 2 4 48
- 200 13 12 1 26 25 0 2 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="multiply" xMin="99" yMin="0" xMax="1131" yMax="1032">
- <contour>
- <pt x="99" y="105" on="1"/>
- <pt x="510" y="516" on="1"/>
- <pt x="99" y="927" on="1"/>
- <pt x="204" y="1032" on="1"/>
- <pt x="615" y="620" on="1"/>
- <pt x="1026" y="1032" on="1"/>
- <pt x="1131" y="927" on="1"/>
- <pt x="719" y="516" on="1"/>
- <pt x="1131" y="105" on="1"/>
- <pt x="1026" y="0" on="1"/>
- <pt x="615" y="411" on="1"/>
- <pt x="204" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 33 values pushed */
- 1 10 8 7 6 5 4 3 2 1 0 10 13 2 0 1 11 9 2 0 14 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="n" xMin="69" yMin="0" xMax="1167" yMax="1110">
- <contour>
- <pt x="69" y="0" on="1"/>
- <pt x="69" y="123" on="1"/>
- <pt x="192" y="123" on="1"/>
- <pt x="192" y="962" on="1"/>
- <pt x="69" y="962" on="1"/>
- <pt x="69" y="1086" on="1"/>
- <pt x="390" y="1086" on="1"/>
- <pt x="390" y="876" on="1"/>
- <pt x="459" y="981" on="0"/>
- <pt x="527" y="1034" on="1"/>
- <pt x="623" y="1110" on="0"/>
- <pt x="742" y="1110" on="1"/>
- <pt x="1043" y="1110" on="0"/>
- <pt x="1043" y="722" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1167" y="123" on="1"/>
- <pt x="1167" y="0" on="1"/>
- <pt x="747" y="0" on="1"/>
- <pt x="747" y="123" on="1"/>
- <pt x="846" y="123" on="1"/>
- <pt x="846" y="701" on="1"/>
- <pt x="846" y="956" on="0"/>
- <pt x="683" y="956" on="1"/>
- <pt x="533" y="956" on="0"/>
- <pt x="390" y="704" on="1"/>
- <pt x="390" y="123" on="1"/>
- <pt x="501" y="123" on="1"/>
- <pt x="501" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 22 30 11 48 200 11 1 26 25 24 20 19 18 15 14 13 7 4 3 2 1 14 5
- 0 3 27 17 16 0 3 0 6 5 1 14 27 26 18 17 4 19 6 3 16 15 2 13 13
- 5 4 1 0 4 13 2 0 0 20 19 10 1 13 25 24 7 6 10 3 2 2 4 48 200
- 14 13 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nacute" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="96" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="napostrophe" xMin="8" yMin="0" xMax="1168" yMax="1579">
- <contour>
- <pt x="70" y="0" on="1"/>
- <pt x="70" y="123" on="1"/>
- <pt x="193" y="123" on="1"/>
- <pt x="193" y="962" on="1"/>
- <pt x="70" y="962" on="1"/>
- <pt x="70" y="1086" on="1"/>
- <pt x="391" y="1086" on="1"/>
- <pt x="391" y="876" on="1"/>
- <pt x="460" y="981" on="0"/>
- <pt x="528" y="1034" on="1"/>
- <pt x="624" y="1110" on="0"/>
- <pt x="743" y="1110" on="1"/>
- <pt x="1044" y="1110" on="0"/>
- <pt x="1044" y="722" on="1"/>
- <pt x="1044" y="123" on="1"/>
- <pt x="1168" y="123" on="1"/>
- <pt x="1168" y="0" on="1"/>
- <pt x="748" y="0" on="1"/>
- <pt x="748" y="123" on="1"/>
- <pt x="847" y="123" on="1"/>
- <pt x="847" y="701" on="1"/>
- <pt x="847" y="956" on="0"/>
- <pt x="684" y="956" on="1"/>
- <pt x="534" y="956" on="0"/>
- <pt x="391" y="704" on="1"/>
- <pt x="391" y="123" on="1"/>
- <pt x="502" y="123" on="1"/>
- <pt x="502" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="8" y="1125" on="1"/>
- <pt x="8" y="1184" on="1"/>
- <pt x="84" y="1205" on="0"/>
- <pt x="84" y="1365" on="1"/>
- <pt x="84" y="1382" on="1"/>
- <pt x="8" y="1382" on="1"/>
- <pt x="8" y="1579" on="1"/>
- <pt x="205" y="1579" on="1"/>
- <pt x="205" y="1408" on="1"/>
- <pt x="204" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 110 values pushed */
- 0 0 22 30 11 48 200 11 1 36 33 32 31 29 28 6 34 5 3 26 25 24 20 19 18
- 15 14 13 7 4 3 2 1 14 5 0 3 35 34 1 27 17 16 0 3 2 0 6 5 1
- 14 27 26 18 17 4 19 6 3 32 31 5 4 1 0 6 2 28 3 16 15 2 13 13 0
- 0 36 35 10 1 28 20 19 10 1 13 25 24 7 6 10 3 2 3 4 48 200 34 33 29
- 28 3 14 13 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nbhyphen" xMin="148" yMin="543" xMax="1081" yMax="691">
- <contour>
- <pt x="148" y="543" on="1"/>
- <pt x="148" y="691" on="1"/>
- <pt x="1081" y="691" on="1"/>
- <pt x="1081" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ncaron" xMin="69" yMin="0" xMax="1167" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="-16" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ncommaaccent" xMin="69" yMin="-432" xMax="1167" yMax="1110">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="24" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="nine" xMin="96" yMin="-37" xMax="1106" yMax="1517">
- <contour>
- <pt x="893" y="707" on="1"/>
- <pt x="829" y="620" on="0"/>
- <pt x="759" y="576" on="1"/>
- <pt x="656" y="512" on="0"/>
- <pt x="521" y="512" on="1"/>
- <pt x="331" y="512" on="0"/>
- <pt x="214" y="646" on="1"/>
- <pt x="96" y="779" on="0"/>
- <pt x="96" y="994" on="1"/>
- <pt x="96" y="1226" on="0"/>
- <pt x="233" y="1371" on="1"/>
- <pt x="370" y="1517" on="0"/>
- <pt x="586" y="1517" on="1"/>
- <pt x="830" y="1517" on="0"/>
- <pt x="968" y="1319" on="1"/>
- <pt x="1106" y="1121" on="0"/>
- <pt x="1106" y="770" on="1"/>
- <pt x="1106" y="385" on="0"/>
- <pt x="943" y="174" on="1"/>
- <pt x="780" y="-37" on="0"/>
- <pt x="490" y="-37" on="1"/>
- <pt x="362" y="-37" on="0"/>
- <pt x="164" y="34" on="1"/>
- <pt x="164" y="351" on="1"/>
- <pt x="287" y="351" on="1"/>
- <pt x="311" y="141" on="1"/>
- <pt x="397" y="86" on="0"/>
- <pt x="489" y="86" on="1"/>
- <pt x="703" y="86" on="0"/>
- <pt x="813" y="302" on="1"/>
- <pt x="890" y="453" on="0"/>
- </contour>
- <contour>
- <pt x="560" y="1394" on="1"/>
- <pt x="450" y="1394" on="0"/>
- <pt x="382" y="1315" on="1"/>
- <pt x="296" y="1215" on="0"/>
- <pt x="296" y="1017" on="1"/>
- <pt x="296" y="641" on="0"/>
- <pt x="559" y="641" on="1"/>
- <pt x="693" y="641" on="0"/>
- <pt x="786" y="744" on="1"/>
- <pt x="878" y="846" on="0"/>
- <pt x="878" y="1000" on="1"/>
- <pt x="878" y="1160" on="0"/>
- <pt x="784" y="1277" on="1"/>
- <pt x="690" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 37 25 4 31 5 12 27 5 20 48 200 20 2 12 0 4 1 1 25 24 23 22 4
- 0 6 0 2 3 0 0 14 0 0 41 26 16 35 24 8 48 200 25 24 0 3 13 16 22
- 8 22 23 22 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nonbreakingspace"/><!-- contains no outline data -->
-
- <TTGlyph name="ntilde" xMin="69" yMin="0" xMax="1167" yMax="1518">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="-2" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="numbersign" xMin="41" yMin="0" xMax="1189" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="276" y="444" on="1"/>
- <pt x="41" y="444" on="1"/>
- <pt x="72" y="568" on="1"/>
- <pt x="307" y="568" on="1"/>
- <pt x="393" y="913" on="1"/>
- <pt x="109" y="913" on="1"/>
- <pt x="140" y="1036" on="1"/>
- <pt x="424" y="1036" on="1"/>
- <pt x="535" y="1480" on="1"/>
- <pt x="671" y="1480" on="1"/>
- <pt x="560" y="1036" on="1"/>
- <pt x="819" y="1036" on="1"/>
- <pt x="930" y="1480" on="1"/>
- <pt x="1066" y="1480" on="1"/>
- <pt x="955" y="1036" on="1"/>
- <pt x="1189" y="1036" on="1"/>
- <pt x="1158" y="913" on="1"/>
- <pt x="924" y="913" on="1"/>
- <pt x="837" y="568" on="1"/>
- <pt x="1121" y="568" on="1"/>
- <pt x="1090" y="444" on="1"/>
- <pt x="807" y="444" on="1"/>
- <pt x="696" y="0" on="1"/>
- <pt x="560" y="0" on="1"/>
- <pt x="671" y="444" on="1"/>
- <pt x="412" y="444" on="1"/>
- <pt x="301" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="442" y="568" on="1"/>
- <pt x="702" y="568" on="1"/>
- <pt x="788" y="913" on="1"/>
- <pt x="529" y="913" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 14 13 10 9 4 13 7 27 24 23 0 4 13 1 0 0 31 30 18 17 6 5 6 5 7
- 29 28 20 19 4 3 6 5 1 2 4 48 200 16 15 12 11 8 7 5 26 25 22 21 2
- 1 5 2 0 14 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="o" xMin="111" yMin="-25" xMax="1118" yMax="1110">
- <contour>
- <pt x="614" y="1110" on="1"/>
- <pt x="849" y="1110" on="0"/>
- <pt x="983" y="959" on="1"/>
- <pt x="1118" y="808" on="0"/>
- <pt x="1118" y="544" on="1"/>
- <pt x="1118" y="276" on="0"/>
- <pt x="983" y="126" on="1"/>
- <pt x="848" y="-25" on="0"/>
- <pt x="606" y="-25" on="1"/>
- <pt x="401" y="-25" on="0"/>
- <pt x="272" y="100" on="1"/>
- <pt x="111" y="255" on="0"/>
- <pt x="111" y="543" on="1"/>
- <pt x="111" y="808" on="0"/>
- <pt x="246" y="959" on="1"/>
- <pt x="381" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="987" on="1"/>
- <pt x="324" y="987" on="0"/>
- <pt x="324" y="545" on="1"/>
- <pt x="324" y="99" on="0"/>
- <pt x="614" y="99" on="1"/>
- <pt x="905" y="99" on="0"/>
- <pt x="905" y="545" on="1"/>
- <pt x="905" y="987" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 20 5 8 16 5 0 48 200 8 2 0 1 14 0 0 22 39 4 18 39 12 48 200
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oacute" xMin="111" yMin="-25" xMax="1118" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="99" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="obreve" xMin="111" yMin="-25" xMax="1118" yMax="1579">
- <contour>
- <pt x="614" y="1110" on="1"/>
- <pt x="849" y="1110" on="0"/>
- <pt x="983" y="959" on="1"/>
- <pt x="1118" y="808" on="0"/>
- <pt x="1118" y="544" on="1"/>
- <pt x="1118" y="276" on="0"/>
- <pt x="983" y="126" on="1"/>
- <pt x="848" y="-25" on="0"/>
- <pt x="606" y="-25" on="1"/>
- <pt x="401" y="-25" on="0"/>
- <pt x="272" y="100" on="1"/>
- <pt x="111" y="255" on="0"/>
- <pt x="111" y="543" on="1"/>
- <pt x="111" y="808" on="0"/>
- <pt x="246" y="959" on="1"/>
- <pt x="381" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="987" on="1"/>
- <pt x="324" y="987" on="0"/>
- <pt x="324" y="545" on="1"/>
- <pt x="324" y="99" on="0"/>
- <pt x="614" y="99" on="1"/>
- <pt x="905" y="99" on="0"/>
- <pt x="905" y="545" on="1"/>
- <pt x="905" y="987" on="0"/>
- </contour>
- <contour>
- <pt x="269" y="1579" on="1"/>
- <pt x="392" y="1579" on="1"/>
- <pt x="440" y="1431" on="0"/>
- <pt x="614" y="1431" on="1"/>
- <pt x="789" y="1431" on="0"/>
- <pt x="837" y="1579" on="1"/>
- <pt x="960" y="1579" on="1"/>
- <pt x="937" y="1490" on="0"/>
- <pt x="911" y="1444" on="1"/>
- <pt x="820" y="1289" on="0"/>
- <pt x="618" y="1289" on="1"/>
- <pt x="466" y="1289" on="0"/>
- <pt x="377" y="1370" on="1"/>
- <pt x="322" y="1419" on="0"/>
- <pt x="294" y="1491" on="1"/>
- <pt x="283" y="1520" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 27 14 34 20 5 8 16 5 0 48 200 8 2 0 1 1 30 29 25 24 4 13 34
- 1 0 14 0 0 22 36 4 18 36 12 48 200 30 29 25 24 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ocircumflex" xMin="111" yMin="-25" xMax="1118" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="1" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="odieresis" xMin="111" yMin="-25" xMax="1118" yMax="1480">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="0" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="oe" xMin="49" yMin="-25" xMax="1179" yMax="1111">
- <contour>
- <pt x="647" y="118" on="1"/>
- <pt x="564" y="-25" on="0"/>
- <pt x="413" y="-25" on="1"/>
- <pt x="249" y="-25" on="0"/>
- <pt x="149" y="131" on="1"/>
- <pt x="49" y="287" on="0"/>
- <pt x="49" y="542" on="1"/>
- <pt x="49" y="797" on="0"/>
- <pt x="150" y="954" on="1"/>
- <pt x="250" y="1110" on="0"/>
- <pt x="416" y="1110" on="1"/>
- <pt x="574" y="1110" on="0"/>
- <pt x="663" y="951" on="1"/>
- <pt x="749" y="1111" on="0"/>
- <pt x="893" y="1111" on="1"/>
- <pt x="1179" y="1111" on="0"/>
- <pt x="1179" y="607" on="1"/>
- <pt x="1179" y="531" on="1"/>
- <pt x="735" y="531" on="1"/>
- <pt x="735" y="515" on="1"/>
- <pt x="735" y="123" on="0"/>
- <pt x="951" y="123" on="1"/>
- <pt x="1051" y="123" on="0"/>
- <pt x="1179" y="210" on="1"/>
- <pt x="1179" y="56" on="1"/>
- <pt x="1027" y="-25" on="0"/>
- <pt x="903" y="-25" on="1"/>
- <pt x="745" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="421" y="987" on="1"/>
- <pt x="240" y="987" on="0"/>
- <pt x="240" y="541" on="1"/>
- <pt x="240" y="99" on="0"/>
- <pt x="421" y="99" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="542" y="224" on="1"/>
- <pt x="562" y="324" on="0"/>
- <pt x="562" y="538" on="1"/>
- <pt x="562" y="785" on="0"/>
- <pt x="537" y="882" on="1"/>
- <pt x="511" y="987" on="0"/>
- </contour>
- <contour>
- <pt x="736" y="654" on="1"/>
- <pt x="994" y="654" on="1"/>
- <pt x="994" y="716" on="1"/>
- <pt x="994" y="987" on="0"/>
- <pt x="882" y="987" on="1"/>
- <pt x="741" y="987" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 44 5 14 32 5 2 28 5 10 21 14 26 48 200 26 2 14 1 10 1 2 2 1
- 42 12 2 1 40 3 0 16 40 17 2 1 24 23 19 0 4 17 2 3 0 0 0 18 17
- 6 1 40 1 4 48 200 41 40 1 0 14 0 0 30 19 6 48 200 42 41 40 19 18 12
- 0 7 13 36 6 16 24 23 17 16 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ogonek" xMin="444" yMin="-370" xMax="786" yMax="0">
- <contour>
- <pt x="602" y="0" on="1"/>
- <pt x="709" y="0" on="1"/>
- <pt x="580" y="-81" on="0"/>
- <pt x="580" y="-179" on="1"/>
- <pt x="580" y="-275" on="0"/>
- <pt x="695" y="-275" on="1"/>
- <pt x="749" y="-275" on="0"/>
- <pt x="786" y="-260" on="1"/>
- <pt x="786" y="-341" on="1"/>
- <pt x="724" y="-370" on="0"/>
- <pt x="646" y="-370" on="1"/>
- <pt x="444" y="-370" on="0"/>
- <pt x="444" y="-213" on="1"/>
- <pt x="444" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 5 17 10 48 200 10 8 7 1 0 14 0 0 3 20 12 48 200 12 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ograve" xMin="111" yMin="-25" xMax="1118" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="-98" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ohungarumlaut" xMin="111" yMin="-25" xMax="1118" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="102" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="omacron" xMin="111" yMin="-25" xMax="1118" yMax="1407">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="0" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="one" xMin="112" yMin="0" xMax="1198" yMax="1517">
- <contour>
- <pt x="112" y="0" on="1"/>
- <pt x="112" y="123" on="1"/>
- <pt x="556" y="123" on="1"/>
- <pt x="556" y="1313" on="1"/>
- <pt x="112" y="1202" on="1"/>
- <pt x="112" y="1325" on="1"/>
- <pt x="753" y="1517" on="1"/>
- <pt x="754" y="123" on="1"/>
- <pt x="1198" y="123" on="1"/>
- <pt x="1198" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 6 5 4 3 4 13 1 0 0 8 7 2 1 6 3 0 1 4 48 200 9 0 1 0 14
- 9 8 7 6 4 13 2 5 4 1 0 4 13 2 3 2 1 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onehalf" xMin="43" yMin="-37" xMax="1167" yMax="1517">
- <contour>
- <pt x="73" y="-37" on="1"/>
- <pt x="851" y="1517" on="1"/>
- <pt x="992" y="1517" on="1"/>
- <pt x="211" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="661" y="0" on="1"/>
- <pt x="661" y="154" on="1"/>
- <pt x="705" y="242" on="0"/>
- <pt x="823" y="328" on="1"/>
- <pt x="853" y="350" on="0"/>
- <pt x="868" y="362" on="1"/>
- <pt x="901" y="393" on="1"/>
- <pt x="957" y="440" on="1"/>
- <pt x="1006" y="481" on="0"/>
- <pt x="1006" y="556" on="1"/>
- <pt x="1006" y="679" on="0"/>
- <pt x="878" y="679" on="1"/>
- <pt x="834" y="679" on="0"/>
- <pt x="772" y="650" on="1"/>
- <pt x="772" y="582" on="1"/>
- <pt x="661" y="582" on="1"/>
- <pt x="661" y="740" on="1"/>
- <pt x="769" y="790" on="0"/>
- <pt x="890" y="790" on="1"/>
- <pt x="1167" y="790" on="0"/>
- <pt x="1167" y="575" on="1"/>
- <pt x="1167" y="449" on="0"/>
- <pt x="1029" y="344" on="1"/>
- <pt x="996" y="319" on="1"/>
- <pt x="996" y="319" on="1"/>
- <pt x="995" y="318" on="1"/>
- <pt x="995" y="318" on="0"/>
- <pt x="993" y="317" on="1"/>
- <pt x="991" y="316" on="0"/>
- <pt x="987" y="313" on="1"/>
- <pt x="979" y="307" on="0"/>
- <pt x="960" y="294" on="1"/>
- <pt x="850" y="223" on="0"/>
- <pt x="824" y="148" on="1"/>
- <pt x="1167" y="148" on="1"/>
- <pt x="1167" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="203" y="728" on="1"/>
- <pt x="203" y="1345" on="1"/>
- <pt x="43" y="1291" on="1"/>
- <pt x="43" y="1415" on="1"/>
- <pt x="351" y="1517" on="1"/>
- <pt x="351" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 15 22 48 200 22 43 42 41 22 20 5 1 40 3 28 27 19 18 17 10 5 7 40
- 37 3 0 0 38 37 16 1 4 1 4 48 200 45 40 1 39 4 1 44 2 1 2 3 0
- 1 4 0 14 0 0 13 34 24 48 200 37 28 27 18 17 10 2 1 8 24 4 3 3 44
- 40 2 43 42 0 3 13 40 0 0 45 44 16 1 40 1 4 48 200 41 40 1 39 38 24
- 2 20 19 5 4 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onequarter" xMin="43" yMin="-37" xMax="1167" yMax="1517">
- <contour>
- <pt x="203" y="728" on="1"/>
- <pt x="203" y="1345" on="1"/>
- <pt x="43" y="1291" on="1"/>
- <pt x="43" y="1415" on="1"/>
- <pt x="351" y="1517" on="1"/>
- <pt x="351" y="728" on="1"/>
- </contour>
- <contour>
- <pt x="86" y="-37" on="1"/>
- <pt x="863" y="1517" on="1"/>
- <pt x="1004" y="1517" on="1"/>
- <pt x="223" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="1056" y="0" on="1"/>
- <pt x="907" y="0" on="1"/>
- <pt x="907" y="179" on="1"/>
- <pt x="533" y="179" on="1"/>
- <pt x="533" y="302" on="1"/>
- <pt x="903" y="790" on="1"/>
- <pt x="1056" y="790" on="1"/>
- <pt x="1056" y="302" on="1"/>
- <pt x="1167" y="302" on="1"/>
- <pt x="1167" y="179" on="1"/>
- <pt x="1056" y="179" on="1"/>
- </contour>
- <contour>
- <pt x="671" y="302" on="1"/>
- <pt x="907" y="302" on="1"/>
- <pt x="907" y="611" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 3 2 1 3 4 15 3 23 0 14 2 0 0 22 21 18 17 14 6 4 12 1 4 48 200
- 16 15 1 20 19 13 12 3 11 10 1 8 7 4 2 9 6 1 5 0 1 6 0 14 8
- 10 11 2 21 15 14 13 7 5 11 4 3 9 4 0 2 19 18 2 13 10 6 3 2 3
- 13 0 0 0 23 22 12 11 16 3 10 5 4 16 1 0 2 4 48 200 20 17 16 10 3
- 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onesuperior" xMin="266" yMin="728" xMax="963" yMax="1517">
- <contour>
- <pt x="266" y="728" on="1"/>
- <pt x="266" y="851" on="1"/>
- <pt x="528" y="851" on="1"/>
- <pt x="528" y="1345" on="1"/>
- <pt x="266" y="1295" on="1"/>
- <pt x="266" y="1419" on="1"/>
- <pt x="701" y="1517" on="1"/>
- <pt x="701" y="851" on="1"/>
- <pt x="963" y="851" on="1"/>
- <pt x="963" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 6 5 4 3 4 13 1 0 0 9 0 6 1 1 1 4 48 200 8 7 2 1 3 0 14
- 9 8 2 13 6 5 4 1 0 4 13 2 0 0 7 6 37 1 2 1 4 48 200 3 2
- 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onesuperiour" xMin="407" yMin="728" xMax="715" yMax="1517">
- <contour>
- <pt x="567" y="728" on="1"/>
- <pt x="567" y="1345" on="1"/>
- <pt x="407" y="1291" on="1"/>
- <pt x="407" y="1415" on="1"/>
- <pt x="715" y="1517" on="1"/>
- <pt x="715" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 4 3 2 1 4 13 0 5 0 1 0 14 3 2 0 0 0 1 0 16 1 4 1 4 48
- 200 5 4 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordfeminine" xMin="136" yMin="715" xMax="1116" yMax="1517">
- <contour>
- <pt x="765" y="817" on="1"/>
- <pt x="606" y="715" on="0"/>
- <pt x="455" y="715" on="1"/>
- <pt x="312" y="715" on="0"/>
- <pt x="224" y="774" on="1"/>
- <pt x="136" y="833" on="0"/>
- <pt x="136" y="932" on="1"/>
- <pt x="136" y="1195" on="0"/>
- <pt x="687" y="1195" on="1"/>
- <pt x="765" y="1195" on="1"/>
- <pt x="765" y="1250" on="1"/>
- <pt x="765" y="1328" on="0"/>
- <pt x="718" y="1361" on="1"/>
- <pt x="672" y="1394" on="0"/>
- <pt x="565" y="1394" on="1"/>
- <pt x="478" y="1394" on="0"/>
- <pt x="353" y="1352" on="1"/>
- <pt x="353" y="1269" on="1"/>
- <pt x="204" y="1269" on="1"/>
- <pt x="204" y="1458" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="597" y="1517" on="1"/>
- <pt x="774" y="1517" on="0"/>
- <pt x="856" y="1463" on="1"/>
- <pt x="938" y="1409" on="0"/>
- <pt x="938" y="1287" on="1"/>
- <pt x="938" y="856" on="1"/>
- <pt x="1116" y="856" on="1"/>
- <pt x="1116" y="733" on="1"/>
- <pt x="790" y="733" on="1"/>
- </contour>
- <contour>
- <pt x="765" y="933" on="1"/>
- <pt x="765" y="1078" on="1"/>
- <pt x="725" y="1078" on="1"/>
- <pt x="322" y="1078" on="0"/>
- <pt x="322" y="937" on="1"/>
- <pt x="322" y="839" on="0"/>
- <pt x="491" y="839" on="1"/>
- <pt x="627" y="839" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 0 0 36 5 2 14 5 21 48 200 21 0 1 25 19 16 3 0 17 3 0 32 31 30 10
- 9 8 6 17 26 3 0 26 28 2 2 28 0 0 29 28 6 1 26 1 4 48 200 18 17
- 1 27 26 1 2 0 14 0 0 34 19 6 48 200 29 25 0 2 32 17 16 8 4 0 18
- 3 28 27 2 13 25 6 18 0 0 31 30 10 9 0 12 4 25 1 4 48 200 26 25 1
- 19 18 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordmasculine" xMin="148" yMin="716" xMax="1081" yMax="1517">
- <contour>
- <pt x="614" y="1517" on="1"/>
- <pt x="829" y="1517" on="0"/>
- <pt x="955" y="1409" on="1"/>
- <pt x="1081" y="1301" on="0"/>
- <pt x="1081" y="1116" on="1"/>
- <pt x="1081" y="930" on="0"/>
- <pt x="955" y="823" on="1"/>
- <pt x="828" y="716" on="0"/>
- <pt x="607" y="716" on="1"/>
- <pt x="418" y="716" on="0"/>
- <pt x="298" y="805" on="1"/>
- <pt x="148" y="916" on="0"/>
- <pt x="148" y="1117" on="1"/>
- <pt x="148" y="1301" on="0"/>
- <pt x="274" y="1409" on="1"/>
- <pt x="400" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="1394" on="1"/>
- <pt x="491" y="1394" on="0"/>
- <pt x="412" y="1316" on="1"/>
- <pt x="333" y="1237" on="0"/>
- <pt x="333" y="1117" on="1"/>
- <pt x="333" y="996" on="0"/>
- <pt x="412" y="918" on="1"/>
- <pt x="490" y="839" on="0"/>
- <pt x="612" y="839" on="1"/>
- <pt x="724" y="839" on="0"/>
- <pt x="800" y="902" on="1"/>
- <pt x="896" y="982" on="0"/>
- <pt x="896" y="1117" on="1"/>
- <pt x="896" y="1238" on="0"/>
- <pt x="816" y="1316" on="1"/>
- <pt x="736" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 24 5 8 16 5 0 48 200 0 0 1 8 0 0 14 0 0 28 19 4 20 19 12
- 48 200 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oslash" xMin="111" yMin="-25" xMax="1118" yMax="1110">
- <contour>
- <pt x="111" y="-25" on="1"/>
- <pt x="238" y="139" on="1"/>
- <pt x="111" y="311" on="0"/>
- <pt x="111" y="545" on="1"/>
- <pt x="111" y="809" on="0"/>
- <pt x="246" y="960" on="1"/>
- <pt x="381" y="1110" on="0"/>
- <pt x="620" y="1110" on="1"/>
- <pt x="799" y="1110" on="0"/>
- <pt x="921" y="1018" on="1"/>
- <pt x="993" y="1110" on="1"/>
- <pt x="1118" y="1110" on="1"/>
- <pt x="991" y="947" on="1"/>
- <pt x="1118" y="775" on="0"/>
- <pt x="1118" y="540" on="1"/>
- <pt x="1118" y="276" on="0"/>
- <pt x="983" y="126" on="1"/>
- <pt x="848" y="-25" on="0"/>
- <pt x="608" y="-25" on="1"/>
- <pt x="428" y="-25" on="0"/>
- <pt x="308" y="68" on="1"/>
- <pt x="236" y="-25" on="1"/>
- </contour>
- <contour>
- <pt x="822" y="891" on="1"/>
- <pt x="727" y="987" on="0"/>
- <pt x="614" y="987" on="1"/>
- <pt x="324" y="987" on="0"/>
- <pt x="324" y="542" on="1"/>
- <pt x="324" y="392" on="0"/>
- <pt x="357" y="292" on="1"/>
- </contour>
- <contour>
- <pt x="408" y="196" on="1"/>
- <pt x="494" y="99" on="0"/>
- <pt x="614" y="99" on="1"/>
- <pt x="905" y="99" on="0"/>
- <pt x="905" y="542" on="1"/>
- <pt x="905" y="690" on="0"/>
- <pt x="872" y="794" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 31 5 18 24 5 7 48 200 18 2 7 1 1 1 35 29 28 22 20 12 9 1 8
- 1 2 3 0 0 1 11 10 2 13 1 0 1 21 0 2 0 14 0 0 33 39 14 26 39
- 3 48 200 35 29 28 22 21 20 14 12 11 10 9 3 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="otilde" xMin="111" yMin="-25" xMax="1118" yMax="1518">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="1" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="p" xMin="62" yMin="-395" xMax="1118" yMax="1110">
- <contour>
- <pt x="383" y="-272" on="1"/>
- <pt x="630" y="-272" on="1"/>
- <pt x="630" y="-395" on="1"/>
- <pt x="62" y="-395" on="1"/>
- <pt x="62" y="-272" on="1"/>
- <pt x="185" y="-272" on="1"/>
- <pt x="185" y="962" on="1"/>
- <pt x="62" y="962" on="1"/>
- <pt x="62" y="1086" on="1"/>
- <pt x="383" y="1086" on="1"/>
- <pt x="383" y="864" on="1"/>
- <pt x="458" y="975" on="0"/>
- <pt x="529" y="1030" on="1"/>
- <pt x="631" y="1110" on="0"/>
- <pt x="749" y="1110" on="1"/>
- <pt x="914" y="1110" on="0"/>
- <pt x="1016" y="967" on="1"/>
- <pt x="1118" y="823" on="0"/>
- <pt x="1118" y="588" on="1"/>
- <pt x="1118" y="302" on="0"/>
- <pt x="983" y="139" on="1"/>
- <pt x="849" y="-25" on="0"/>
- <pt x="614" y="-25" on="1"/>
- <pt x="526" y="-25" on="0"/>
- <pt x="383" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="383" y="146" on="1"/>
- <pt x="519" y="123" on="0"/>
- <pt x="595" y="123" on="1"/>
- <pt x="762" y="123" on="0"/>
- <pt x="835" y="230" on="1"/>
- <pt x="908" y="337" on="0"/>
- <pt x="908" y="577" on="1"/>
- <pt x="908" y="950" on="0"/>
- <pt x="694" y="950" on="1"/>
- <pt x="530" y="950" on="0"/>
- <pt x="383" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 0 0 33 30 14 27 14 22 48 200 22 2 14 1 1 35 25 10 7 6 5 8 2 3 0
- 1 24 2 0 2 0 0 0 5 4 1 0 6 3 2 1 4 48 200 3 2 1 0 9 8
- 1 14 0 0 31 39 18 48 200 2 1 2 13 18 0 8 7 4 3 4 13 5 0 0 35
- 25 24 10 9 0 10 5 5 1 4 48 200 6 5 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="paragraph" xMin="100" yMin="-296" xMax="970" yMax="1493">
- <contour>
- <pt x="550" y="-296" on="1"/>
- <pt x="550" y="740" on="1"/>
- <pt x="406" y="757" on="0"/>
- <pt x="331" y="790" on="1"/>
- <pt x="100" y="889" on="0"/>
- <pt x="100" y="1154" on="1"/>
- <pt x="100" y="1493" on="0"/>
- <pt x="457" y="1493" on="1"/>
- <pt x="495" y="1493" on="0"/>
- <pt x="554" y="1488" on="1"/>
- <pt x="624" y="1482" on="1"/>
- <pt x="644" y="1480" on="0"/>
- <pt x="679" y="1480" on="1"/>
- <pt x="970" y="1480" on="1"/>
- <pt x="970" y="-296" on="1"/>
- <pt x="846" y="-296" on="1"/>
- <pt x="846" y="1357" on="1"/>
- <pt x="674" y="1357" on="1"/>
- <pt x="674" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 7 0 1 1 16 2 2 0 1 18 15 14 0 4 13 2 0 0 0 17 16 6 1 12 1
- 4 48 200 13 12 0 14 12 15 17 2 5 0 0 0 16 15 6 1 13 1 0 6 1 17
- 2 4 48 200 14 13 1 18 17 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenleft" xMin="321" yMin="-296" xMax="982" yMax="1579">
- <contour>
- <pt x="982" y="-296" on="1"/>
- <pt x="830" y="-266" on="0"/>
- <pt x="720" y="-194" on="1"/>
- <pt x="537" y="-74" on="0"/>
- <pt x="426" y="155" on="1"/>
- <pt x="321" y="372" on="0"/>
- <pt x="321" y="642" on="1"/>
- <pt x="321" y="1061" on="0"/>
- <pt x="569" y="1344" on="1"/>
- <pt x="668" y="1457" on="0"/>
- <pt x="794" y="1519" on="1"/>
- <pt x="872" y="1557" on="0"/>
- <pt x="982" y="1579" on="1"/>
- <pt x="982" y="1456" on="1"/>
- <pt x="790" y="1398" on="0"/>
- <pt x="678" y="1224" on="1"/>
- <pt x="531" y="996" on="0"/>
- <pt x="531" y="642" on="1"/>
- <pt x="531" y="269" on="0"/>
- <pt x="692" y="38" on="1"/>
- <pt x="801" y="-118" on="0"/>
- <pt x="982" y="-173" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 21 13 12 0 14 0 0 17 39 6 48 200 21 13 12 6 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenright" xMin="247" yMin="-296" xMax="908" yMax="1579">
- <contour>
- <pt x="247" y="-296" on="1"/>
- <pt x="247" y="-173" on="1"/>
- <pt x="440" y="-115" on="0"/>
- <pt x="552" y="59" on="1"/>
- <pt x="699" y="287" on="0"/>
- <pt x="699" y="642" on="1"/>
- <pt x="699" y="1014" on="0"/>
- <pt x="538" y="1245" on="1"/>
- <pt x="429" y="1401" on="0"/>
- <pt x="247" y="1456" on="1"/>
- <pt x="247" y="1579" on="1"/>
- <pt x="400" y="1549" on="0"/>
- <pt x="510" y="1477" on="1"/>
- <pt x="693" y="1357" on="0"/>
- <pt x="803" y="1128" on="1"/>
- <pt x="908" y="912" on="0"/>
- <pt x="908" y="642" on="1"/>
- <pt x="908" y="221" on="0"/>
- <pt x="661" y="-61" on="1"/>
- <pt x="561" y="-174" on="0"/>
- <pt x="436" y="-236" on="1"/>
- <pt x="358" y="-274" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 10 9 1 0 14 0 0 5 39 16 48 200 16 10 9 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="percent" xMin="21" yMin="-37" xMax="1207" yMax="1517">
- <contour>
- <pt x="61" y="-37" on="1"/>
- <pt x="1034" y="1517" on="1"/>
- <pt x="1166" y="1517" on="1"/>
- <pt x="190" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="285" y="1480" on="1"/>
- <pt x="404" y="1480" on="0"/>
- <pt x="476" y="1379" on="1"/>
- <pt x="549" y="1277" on="0"/>
- <pt x="549" y="1111" on="1"/>
- <pt x="549" y="942" on="0"/>
- <pt x="476" y="841" on="1"/>
- <pt x="404" y="740" on="0"/>
- <pt x="281" y="740" on="1"/>
- <pt x="177" y="740" on="0"/>
- <pt x="108" y="823" on="1"/>
- <pt x="21" y="928" on="0"/>
- <pt x="21" y="1110" on="1"/>
- <pt x="21" y="1278" on="0"/>
- <pt x="94" y="1379" on="1"/>
- <pt x="166" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="285" y="1357" on="1"/>
- <pt x="157" y="1357" on="0"/>
- <pt x="157" y="1110" on="1"/>
- <pt x="157" y="864" on="0"/>
- <pt x="285" y="864" on="1"/>
- <pt x="413" y="864" on="0"/>
- <pt x="413" y="1111" on="1"/>
- <pt x="413" y="1357" on="0"/>
- </contour>
- <contour>
- <pt x="943" y="740" on="1"/>
- <pt x="1062" y="740" on="0"/>
- <pt x="1134" y="639" on="1"/>
- <pt x="1207" y="538" on="0"/>
- <pt x="1207" y="372" on="1"/>
- <pt x="1207" y="202" on="0"/>
- <pt x="1134" y="101" on="1"/>
- <pt x="1061" y="0" on="0"/>
- <pt x="941" y="0" on="1"/>
- <pt x="835" y="0" on="0"/>
- <pt x="766" y="82" on="1"/>
- <pt x="679" y="187" on="0"/>
- <pt x="679" y="371" on="1"/>
- <pt x="679" y="538" on="0"/>
- <pt x="752" y="639" on="1"/>
- <pt x="824" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="943" y="617" on="1"/>
- <pt x="815" y="617" on="0"/>
- <pt x="815" y="372" on="1"/>
- <pt x="815" y="123" on="0"/>
- <pt x="943" y="123" on="1"/>
- <pt x="1072" y="123" on="0"/>
- <pt x="1072" y="370" on="1"/>
- <pt x="1072" y="617" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 0 0 48 5 36 44 5 28 24 5 12 20 5 4 48 200 36 2 4 0 28 12 1 1 28
- 12 2 0 2 3 0 0 1 2 1 2 13 0 0 1 3 0 2 0 14 0 0 50 20 32
- 46 20 40 26 20 8 22 20 16 48 200 40 32 16 8 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="period" xMin="466" yMin="0" xMax="762" yMax="296">
- <contour>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="296" on="1"/>
- <pt x="762" y="296" on="1"/>
- <pt x="762" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 8 1 0 1 4 48 200 3 0 1 0 14 0 0 3 2 8 1 0 1 4
- 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered" xMin="491" yMin="419" xMax="738" yMax="666">
- <contour>
- <pt x="491" y="419" on="1"/>
- <pt x="491" y="666" on="1"/>
- <pt x="738" y="666" on="1"/>
- <pt x="738" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 4 1 0 1 4 48 200 3 0 1 0 14 0 0 3 2 4 1 0 1 4
- 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered#1" xMin="491" yMin="419" xMax="738" yMax="666">
- <contour>
- <pt x="491" y="419" on="1"/>
- <pt x="491" y="666" on="1"/>
- <pt x="738" y="666" on="1"/>
- <pt x="738" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 4 1 0 1 4 48 200 3 0 1 0 14 0 0 3 2 4 1 0 1 4
- 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="perthousand" xMin="12" yMin="0" xMax="1217" yMax="1480">
- <contour>
- <pt x="196" y="1476" on="1"/>
- <pt x="279" y="1476" on="0"/>
- <pt x="329" y="1391" on="1"/>
- <pt x="380" y="1307" on="0"/>
- <pt x="380" y="1169" on="1"/>
- <pt x="380" y="1027" on="0"/>
- <pt x="329" y="943" on="1"/>
- <pt x="279" y="859" on="0"/>
- <pt x="194" y="859" on="1"/>
- <pt x="121" y="859" on="0"/>
- <pt x="73" y="927" on="1"/>
- <pt x="12" y="1014" on="0"/>
- <pt x="12" y="1168" on="1"/>
- <pt x="12" y="1306" on="0"/>
- <pt x="63" y="1391" on="1"/>
- <pt x="113" y="1476" on="0"/>
- </contour>
- <contour>
- <pt x="196" y="1383" on="1"/>
- <pt x="108" y="1383" on="0"/>
- <pt x="108" y="1168" on="1"/>
- <pt x="108" y="952" on="0"/>
- <pt x="199" y="952" on="1"/>
- <pt x="285" y="952" on="0"/>
- <pt x="285" y="1168" on="1"/>
- <pt x="285" y="1383" on="0"/>
- </contour>
- <contour>
- <pt x="28" y="0" on="1"/>
- <pt x="645" y="1480" on="1"/>
- <pt x="748" y="1480" on="1"/>
- <pt x="129" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="578" y="617" on="1"/>
- <pt x="661" y="617" on="0"/>
- <pt x="711" y="532" on="1"/>
- <pt x="762" y="448" on="0"/>
- <pt x="762" y="309" on="1"/>
- <pt x="762" y="168" on="0"/>
- <pt x="711" y="84" on="1"/>
- <pt x="661" y="0" on="0"/>
- <pt x="576" y="0" on="1"/>
- <pt x="503" y="0" on="0"/>
- <pt x="455" y="68" on="1"/>
- <pt x="394" y="155" on="0"/>
- <pt x="394" y="309" on="1"/>
- <pt x="394" y="448" on="0"/>
- <pt x="445" y="532" on="1"/>
- <pt x="495" y="617" on="0"/>
- </contour>
- <contour>
- <pt x="578" y="524" on="1"/>
- <pt x="489" y="524" on="0"/>
- <pt x="489" y="309" on="1"/>
- <pt x="489" y="93" on="0"/>
- <pt x="580" y="93" on="1"/>
- <pt x="666" y="93" on="0"/>
- <pt x="666" y="310" on="1"/>
- <pt x="666" y="524" on="0"/>
- </contour>
- <contour>
- <pt x="1033" y="617" on="1"/>
- <pt x="1115" y="617" on="0"/>
- <pt x="1166" y="532" on="1"/>
- <pt x="1217" y="448" on="0"/>
- <pt x="1217" y="309" on="1"/>
- <pt x="1217" y="168" on="0"/>
- <pt x="1166" y="84" on="1"/>
- <pt x="1116" y="0" on="0"/>
- <pt x="1031" y="0" on="1"/>
- <pt x="958" y="0" on="0"/>
- <pt x="910" y="68" on="1"/>
- <pt x="849" y="155" on="0"/>
- <pt x="849" y="309" on="1"/>
- <pt x="849" y="448" on="0"/>
- <pt x="900" y="532" on="1"/>
- <pt x="951" y="617" on="0"/>
- </contour>
- <contour>
- <pt x="1033" y="524" on="1"/>
- <pt x="944" y="524" on="0"/>
- <pt x="944" y="310" on="1"/>
- <pt x="944" y="93" on="0"/>
- <pt x="1035" y="93" on="1"/>
- <pt x="1121" y="93" on="0"/>
- <pt x="1121" y="309" on="1"/>
- <pt x="1121" y="524" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 72 17 60 68 17 52 48 17 36 44 17 28 20 17 8 16 17 0 48 200 60 2 36
- 2 0 0 52 28 8 1 1 52 28 26 25 8 5 0 2 3 0 0 1 27 24 2 0 14
- 0 0 74 21 56 70 21 64 50 21 32 46 21 40 22 21 4 18 21 12 48 200 64 56 40
- 32 27 26 25 24 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plus" xMin="99" yMin="101" xMax="1130" yMax="1133">
- <contour>
- <pt x="541" y="101" on="1"/>
- <pt x="541" y="543" on="1"/>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="691" on="1"/>
- <pt x="541" y="691" on="1"/>
- <pt x="541" y="1133" on="1"/>
- <pt x="689" y="1133" on="1"/>
- <pt x="689" y="691" on="1"/>
- <pt x="1130" y="691" on="1"/>
- <pt x="1130" y="543" on="1"/>
- <pt x="689" y="543" on="1"/>
- <pt x="689" y="101" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 0 0 10 9 2 1 7 3 3 1 4 48 200 6 5 1 8 7 4 3 3 11 0 1 3
- 0 14 0 0 11 10 7 6 14 3 0 1 4 48 200 9 8 1 5 4 1 0 3 3 2
- 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plusminus" xMin="99" yMin="0" xMax="1130" yMax="1234">
- <contour>
- <pt x="541" y="296" on="1"/>
- <pt x="541" y="691" on="1"/>
- <pt x="99" y="691" on="1"/>
- <pt x="99" y="839" on="1"/>
- <pt x="541" y="839" on="1"/>
- <pt x="541" y="1234" on="1"/>
- <pt x="689" y="1234" on="1"/>
- <pt x="689" y="839" on="1"/>
- <pt x="1130" y="839" on="1"/>
- <pt x="1130" y="691" on="1"/>
- <pt x="689" y="691" on="1"/>
- <pt x="689" y="296" on="1"/>
- </contour>
- <contour>
- <pt x="1130" y="0" on="1"/>
- <pt x="99" y="0" on="1"/>
- <pt x="99" y="148" on="1"/>
- <pt x="1130" y="148" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 15 14 7 1 12 10 9 2 1 7 3 3 2 4 48 200 13 12 1 6 5 1 8
- 7 4 3 3 11 0 1 4 0 14 0 0 11 10 7 6 14 3 0 1 4 48 200 15 12
- 9 8 3 5 4 1 0 3 14 13 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="q" xMin="111" yMin="-395" xMax="1167" yMax="1110">
- <contour>
- <pt x="846" y="222" on="1"/>
- <pt x="771" y="111" on="0"/>
- <pt x="701" y="55" on="1"/>
- <pt x="599" y="-25" on="0"/>
- <pt x="480" y="-25" on="1"/>
- <pt x="315" y="-25" on="0"/>
- <pt x="213" y="119" on="1"/>
- <pt x="111" y="262" on="0"/>
- <pt x="111" y="498" on="1"/>
- <pt x="111" y="783" on="0"/>
- <pt x="246" y="946" on="1"/>
- <pt x="380" y="1110" on="0"/>
- <pt x="619" y="1110" on="1"/>
- <pt x="846" y="1086" on="1"/>
- <pt x="1044" y="1086" on="1"/>
- <pt x="1044" y="-272" on="1"/>
- <pt x="1167" y="-272" on="1"/>
- <pt x="1167" y="-395" on="1"/>
- <pt x="600" y="-395" on="1"/>
- <pt x="600" y="-271" on="1"/>
- <pt x="846" y="-271" on="1"/>
- </contour>
- <contour>
- <pt x="846" y="939" on="1"/>
- <pt x="710" y="962" on="0"/>
- <pt x="633" y="962" on="1"/>
- <pt x="468" y="962" on="0"/>
- <pt x="394" y="855" on="1"/>
- <pt x="321" y="748" on="0"/>
- <pt x="321" y="509" on="1"/>
- <pt x="321" y="136" on="0"/>
- <pt x="535" y="136" on="1"/>
- <pt x="699" y="136" on="0"/>
- <pt x="846" y="370" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 29 30 4 23 14 12 48 200 12 1 4 2 1 31 21 0 3 13 2 3 0 16 15
- 2 19 17 3 0 0 20 19 6 1 17 1 4 48 200 18 17 1 0 14 13 1 14 0 0
- 27 39 8 48 200 17 16 2 13 14 19 18 8 0 0 0 31 21 20 13 0 10 4 14 1
- 4 48 200 15 14 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="question" xMin="202" yMin="0" xMax="1079" yMax="1517">
- <contour>
- <pt x="415" y="0" on="1"/>
- <pt x="415" y="222" on="1"/>
- <pt x="662" y="222" on="1"/>
- <pt x="662" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="440" y="419" on="1"/>
- <pt x="440" y="478" on="1"/>
- <pt x="440" y="720" on="0"/>
- <pt x="659" y="876" on="1"/>
- <pt x="726" y="923" on="1"/>
- <pt x="869" y="1023" on="0"/>
- <pt x="869" y="1162" on="1"/>
- <pt x="869" y="1268" on="0"/>
- <pt x="798" y="1331" on="1"/>
- <pt x="728" y="1394" on="0"/>
- <pt x="604" y="1394" on="1"/>
- <pt x="480" y="1394" on="0"/>
- <pt x="350" y="1332" on="1"/>
- <pt x="326" y="1073" on="1"/>
- <pt x="202" y="1073" on="1"/>
- <pt x="202" y="1450" on="1"/>
- <pt x="420" y="1517" on="0"/>
- <pt x="613" y="1517" on="1"/>
- <pt x="1079" y="1517" on="0"/>
- <pt x="1079" y="1180" on="1"/>
- <pt x="1079" y="1014" on="0"/>
- <pt x="932" y="904" on="1"/>
- <pt x="876" y="862" on="1"/>
- <pt x="873" y="860" on="0"/>
- <pt x="864" y="853" on="1"/>
- <pt x="855" y="847" on="0"/>
- <pt x="847" y="841" on="1"/>
- <pt x="834" y="833" on="0"/>
- <pt x="814" y="819" on="1"/>
- <pt x="719" y="754" on="0"/>
- <pt x="682" y="703" on="1"/>
- <pt x="637" y="647" on="0"/>
- <pt x="637" y="481" on="1"/>
- <pt x="637" y="419" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 14 5 21 48 200 21 0 1 36 34 19 18 17 16 5 7 0 4 3 0 0 0 2
- 1 9 1 0 1 4 48 200 37 4 1 3 0 1 2 0 14 0 0 10 39 23 48 200 37
- 36 5 4 4 2 0 3 17 16 2 0 18 3 34 23 2 0 0 3 2 4 1 0 1 4
- 48 200 19 18 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="questiondown" xMin="151" yMin="-432" xMax="1027" yMax="1086">
- <contour>
- <pt x="814" y="1086" on="1"/>
- <pt x="814" y="863" on="1"/>
- <pt x="568" y="863" on="1"/>
- <pt x="568" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="790" y="666" on="1"/>
- <pt x="790" y="607" on="1"/>
- <pt x="790" y="367" on="0"/>
- <pt x="570" y="210" on="1"/>
- <pt x="503" y="162" on="1"/>
- <pt x="361" y="61" on="0"/>
- <pt x="361" y="-76" on="1"/>
- <pt x="361" y="-183" on="0"/>
- <pt x="432" y="-246" on="1"/>
- <pt x="502" y="-309" on="0"/>
- <pt x="626" y="-309" on="1"/>
- <pt x="750" y="-309" on="0"/>
- <pt x="879" y="-247" on="1"/>
- <pt x="904" y="12" on="1"/>
- <pt x="1027" y="12" on="1"/>
- <pt x="1027" y="-364" on="1"/>
- <pt x="807" y="-432" on="0"/>
- <pt x="618" y="-432" on="1"/>
- <pt x="151" y="-432" on="0"/>
- <pt x="151" y="-94" on="1"/>
- <pt x="151" y="71" on="0"/>
- <pt x="297" y="181" on="1"/>
- <pt x="354" y="224" on="1"/>
- <pt x="371" y="237" on="0"/>
- <pt x="416" y="267" on="1"/>
- <pt x="509" y="331" on="0"/>
- <pt x="547" y="383" on="1"/>
- <pt x="592" y="439" on="0"/>
- <pt x="592" y="604" on="1"/>
- <pt x="592" y="666" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 14 5 21 48 200 1 32 30 18 17 5 5 4 2 3 0 1 19 16 21 2 0 0
- 0 2 1 9 1 0 1 4 48 200 33 4 1 0 3 0 1 14 0 0 10 39 23 48 200
- 17 16 2 18 0 3 33 32 5 4 4 0 2 3 30 23 2 0 0 1 0 4 1 2 1
- 4 48 200 19 18 1 3 2 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedbl" xMin="244" yMin="1036" xMax="984" yMax="1579">
- <contour>
- <pt x="293" y="1036" on="1"/>
- <pt x="244" y="1579" on="1"/>
- <pt x="491" y="1579" on="1"/>
- <pt x="441" y="1036" on="1"/>
- </contour>
- <contour>
- <pt x="787" y="1036" on="1"/>
- <pt x="738" y="1579" on="1"/>
- <pt x="984" y="1579" on="1"/>
- <pt x="935" y="1036" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 21 values pushed */
- 6 5 2 1 3 7 4 3 0 3 2 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblbase" xMin="257" yMin="-296" xMax="997" yMax="247">
- <contour>
- <pt x="997" y="247" on="1"/>
- <pt x="997" y="-2" on="1"/>
- <pt x="996" y="-283" on="0"/>
- <pt x="750" y="-296" on="1"/>
- <pt x="750" y="-197" on="1"/>
- <pt x="855" y="-176" on="0"/>
- <pt x="855" y="-56" on="1"/>
- <pt x="855" y="0" on="1"/>
- <pt x="750" y="0" on="1"/>
- <pt x="750" y="247" on="1"/>
- </contour>
- <contour>
- <pt x="504" y="247" on="1"/>
- <pt x="504" y="-2" on="1"/>
- <pt x="503" y="-283" on="0"/>
- <pt x="257" y="-296" on="1"/>
- <pt x="257" y="-197" on="1"/>
- <pt x="362" y="-176" on="0"/>
- <pt x="362" y="-56" on="1"/>
- <pt x="362" y="0" on="1"/>
- <pt x="257" y="0" on="1"/>
- <pt x="257" y="247" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 17 16 14 13 11 8 7 6 4 3 1 12 13 0 19 10 9 0 3 0 14 7 6 2
- 0 3 3 17 16 2 10 13 3 0 0 11 10 4 1 13 9 8 4 3 4 3 0 2 4
- 48 200 19 18 14 13 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblleft" xMin="232" yMin="1036" xMax="972" yMax="1579">
- <contour>
- <pt x="232" y="1036" on="1"/>
- <pt x="232" y="1285" on="1"/>
- <pt x="233" y="1566" on="0"/>
- <pt x="479" y="1579" on="1"/>
- <pt x="479" y="1480" on="1"/>
- <pt x="374" y="1459" on="0"/>
- <pt x="374" y="1339" on="1"/>
- <pt x="374" y="1283" on="1"/>
- <pt x="479" y="1283" on="1"/>
- <pt x="479" y="1036" on="1"/>
- </contour>
- <contour>
- <pt x="726" y="1036" on="1"/>
- <pt x="726" y="1285" on="1"/>
- <pt x="727" y="1566" on="0"/>
- <pt x="972" y="1579" on="1"/>
- <pt x="972" y="1480" on="1"/>
- <pt x="867" y="1459" on="0"/>
- <pt x="867" y="1339" on="1"/>
- <pt x="867" y="1283" on="1"/>
- <pt x="972" y="1283" on="1"/>
- <pt x="972" y="1036" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 17 16 14 13 11 8 7 6 4 3 1 12 13 0 19 10 9 0 3 0 14 17 16 2
- 13 10 3 7 6 2 3 0 3 0 0 11 10 4 1 13 9 8 4 3 4 3 0 2 4
- 48 200 19 18 14 13 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblright" xMin="257" yMin="1036" xMax="997" yMax="1579">
- <contour>
- <pt x="997" y="1579" on="1"/>
- <pt x="997" y="1330" on="1"/>
- <pt x="996" y="1049" on="0"/>
- <pt x="750" y="1036" on="1"/>
- <pt x="750" y="1135" on="1"/>
- <pt x="855" y="1156" on="0"/>
- <pt x="855" y="1276" on="1"/>
- <pt x="855" y="1332" on="1"/>
- <pt x="750" y="1332" on="1"/>
- <pt x="750" y="1579" on="1"/>
- </contour>
- <contour>
- <pt x="504" y="1579" on="1"/>
- <pt x="504" y="1330" on="1"/>
- <pt x="503" y="1049" on="0"/>
- <pt x="257" y="1036" on="1"/>
- <pt x="257" y="1135" on="1"/>
- <pt x="362" y="1156" on="0"/>
- <pt x="362" y="1276" on="1"/>
- <pt x="362" y="1332" on="1"/>
- <pt x="257" y="1332" on="1"/>
- <pt x="257" y="1579" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 17 16 14 13 11 8 7 6 4 3 1 12 13 0 19 10 9 0 3 0 14 7 6 2
- 0 3 3 17 16 2 10 13 3 0 0 11 10 4 1 13 9 8 4 3 4 3 0 2 4
- 48 200 19 18 14 13 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quoteleft" xMin="454" yMin="962" xMax="750" yMax="1579">
- <contour>
- <pt x="750" y="1258" on="1"/>
- <pt x="750" y="962" on="1"/>
- <pt x="454" y="962" on="1"/>
- <pt x="454" y="1142" on="1"/>
- <pt x="456" y="1560" on="0"/>
- <pt x="750" y="1579" on="1"/>
- <pt x="750" y="1480" on="1"/>
- <pt x="675" y="1468" on="0"/>
- <pt x="653" y="1413" on="1"/>
- <pt x="633" y="1365" on="0"/>
- <pt x="627" y="1258" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 10 6 5 3 0 5 13 1 2 1 1 0 14 10 0 2 2 0 0 6 5 1 0 8 3
- 2 1 4 48 200 3 2 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotereversed"/><!-- contains no outline data -->
-
- <TTGlyph name="quoteright" xMin="479" yMin="962" xMax="775" yMax="1579">
- <contour>
- <pt x="479" y="1283" on="1"/>
- <pt x="479" y="1579" on="1"/>
- <pt x="775" y="1579" on="1"/>
- <pt x="775" y="1399" on="1"/>
- <pt x="773" y="980" on="0"/>
- <pt x="479" y="962" on="1"/>
- <pt x="479" y="1061" on="1"/>
- <pt x="554" y="1073" on="0"/>
- <pt x="576" y="1128" on="1"/>
- <pt x="596" y="1176" on="0"/>
- <pt x="602" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 10 6 5 3 0 5 13 1 2 1 1 0 14 10 2 0 2 0 0 3 2 8 1 0 1
- 4 48 200 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesinglbase" xMin="479" yMin="-321" xMax="775" yMax="296">
- <contour>
- <pt x="479" y="0" on="1"/>
- <pt x="479" y="296" on="1"/>
- <pt x="775" y="296" on="1"/>
- <pt x="775" y="116" on="1"/>
- <pt x="773" y="-302" on="0"/>
- <pt x="479" y="-321" on="1"/>
- <pt x="479" y="-222" on="1"/>
- <pt x="554" y="-210" on="0"/>
- <pt x="576" y="-155" on="1"/>
- <pt x="596" y="-107" on="0"/>
- <pt x="602" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 10 6 5 3 0 5 13 1 2 1 1 0 14 10 2 0 2 0 0 3 2 8 1 0 1
- 4 48 200 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesingle" xMin="466" yMin="962" xMax="762" yMax="1579">
- <contour>
- <pt x="540" y="962" on="1"/>
- <pt x="466" y="1579" on="1"/>
- <pt x="762" y="1579" on="1"/>
- <pt x="688" y="962" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="r" xMin="74" yMin="0" xMax="1106" yMax="1110">
- <contour>
- <pt x="530" y="702" on="1"/>
- <pt x="530" y="123" on="1"/>
- <pt x="899" y="123" on="1"/>
- <pt x="899" y="0" on="1"/>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="123" on="1"/>
- <pt x="333" y="123" on="1"/>
- <pt x="333" y="962" on="1"/>
- <pt x="74" y="962" on="1"/>
- <pt x="74" y="1086" on="1"/>
- <pt x="530" y="1086" on="1"/>
- <pt x="530" y="875" on="1"/>
- <pt x="604" y="981" on="0"/>
- <pt x="671" y="1034" on="1"/>
- <pt x="767" y="1110" on="0"/>
- <pt x="878" y="1110" on="1"/>
- <pt x="996" y="1110" on="0"/>
- <pt x="1106" y="1042" on="1"/>
- <pt x="1106" y="714" on="1"/>
- <pt x="982" y="714" on="1"/>
- <pt x="962" y="902" on="1"/>
- <pt x="906" y="938" on="0"/>
- <pt x="844" y="938" on="1"/>
- <pt x="660" y="938" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 22 22 15 48 200 15 1 17 9 7 2 20 19 18 11 0 5 7 1 3 0 0 8
- 7 6 1 9 6 5 2 1 6 3 3 2 4 48 200 4 3 1 0 10 9 1 14 20 19
- 3 2 4 17 0 3 9 8 5 4 4 13 6 0 0 11 10 1 0 10 3 6 1 4 48
- 200 18 17 1 7 6 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="racute" xMin="74" yMin="0" xMax="1106" yMax="1604">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="40" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="radicalex" xMin="0" yMin="1456" xMax="1229" yMax="1604">
- <contour>
- <pt x="0" y="1604" on="1"/>
- <pt x="1229" y="1604" on="1"/>
- <pt x="1229" y="1456" on="1"/>
- <pt x="0" y="1456" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 2 16 1 0 1 4 48 200 1 0 1 0 14 2 1 1 3 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="rcaron" xMin="74" yMin="0" xMax="1106" yMax="1604">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="-24" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="rcommaaccent" xMin="74" yMin="-432" xMax="1106" yMax="1110">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-32" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="registered" xMin="62" yMin="-37" xMax="1168" yMax="1517">
- <contour>
- <pt x="615" y="1517" on="1"/>
- <pt x="864" y="1517" on="0"/>
- <pt x="1016" y="1304" on="1"/>
- <pt x="1168" y="1091" on="0"/>
- <pt x="1168" y="742" on="1"/>
- <pt x="1168" y="386" on="0"/>
- <pt x="1016" y="175" on="1"/>
- <pt x="864" y="-37" on="0"/>
- <pt x="606" y="-37" on="1"/>
- <pt x="388" y="-37" on="0"/>
- <pt x="245" y="136" on="1"/>
- <pt x="62" y="357" on="0"/>
- <pt x="62" y="740" on="1"/>
- <pt x="62" y="1092" on="0"/>
- <pt x="214" y="1304" on="1"/>
- <pt x="366" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1406" on="1"/>
- <pt x="423" y="1406" on="0"/>
- <pt x="304" y="1222" on="1"/>
- <pt x="185" y="1038" on="0"/>
- <pt x="185" y="741" on="1"/>
- <pt x="185" y="445" on="0"/>
- <pt x="303" y="260" on="1"/>
- <pt x="421" y="74" on="0"/>
- <pt x="611" y="74" on="1"/>
- <pt x="785" y="74" on="0"/>
- <pt x="899" y="221" on="1"/>
- <pt x="1044" y="407" on="0"/>
- <pt x="1044" y="742" on="1"/>
- <pt x="1044" y="1039" on="0"/>
- <pt x="925" y="1222" on="1"/>
- <pt x="805" y="1406" on="0"/>
- </contour>
- <contour>
- <pt x="364" y="317" on="1"/>
- <pt x="364" y="388" on="1"/>
- <pt x="426" y="388" on="1"/>
- <pt x="426" y="1093" on="1"/>
- <pt x="364" y="1093" on="1"/>
- <pt x="364" y="1163" on="1"/>
- <pt x="636" y="1163" on="1"/>
- <pt x="853" y="1163" on="0"/>
- <pt x="853" y="957" on="1"/>
- <pt x="853" y="804" on="0"/>
- <pt x="704" y="723" on="1"/>
- <pt x="889" y="388" on="1"/>
- <pt x="914" y="388" on="1"/>
- <pt x="914" y="317" on="1"/>
- <pt x="795" y="317" on="1"/>
- <pt x="601" y="687" on="1"/>
- <pt x="537" y="687" on="1"/>
- <pt x="537" y="388" on="1"/>
- <pt x="611" y="388" on="1"/>
- <pt x="611" y="317" on="1"/>
- </contour>
- <contour>
- <pt x="537" y="758" on="1"/>
- <pt x="544" y="758" on="1"/>
- <pt x="729" y="758" on="0"/>
- <pt x="729" y="946" on="1"/>
- <pt x="729" y="1028" on="0"/>
- <pt x="695" y="1060" on="1"/>
- <pt x="661" y="1093" on="0"/>
- <pt x="574" y="1093" on="1"/>
- <pt x="537" y="1093" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 24 40 8 16 40 0 48 200 8 2 0 0 60 59 53 52 50 49 48 47 44 43 42
- 36 35 34 33 15 37 32 3 38 37 1 51 46 45 32 3 2 0 14 0 0 55 6 40 28
- 6 4 20 6 12 48 200 59 53 51 50 47 46 45 44 43 42 38 11 13 40 4 48 37 36
- 33 32 4 13 12 34 0 0 60 52 49 48 3 34 1 6 48 200 35 34 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ring" xMin="388" yMin="1283" xMax="842" yMax="1737">
- <contour>
- <pt x="615" y="1737" on="1"/>
- <pt x="709" y="1737" on="0"/>
- <pt x="775" y="1671" on="1"/>
- <pt x="842" y="1605" on="0"/>
- <pt x="842" y="1511" on="1"/>
- <pt x="842" y="1414" on="0"/>
- <pt x="775" y="1349" on="1"/>
- <pt x="709" y="1283" on="0"/>
- <pt x="613" y="1283" on="1"/>
- <pt x="530" y="1283" on="0"/>
- <pt x="468" y="1337" on="1"/>
- <pt x="388" y="1406" on="0"/>
- <pt x="388" y="1510" on="1"/>
- <pt x="388" y="1604" on="0"/>
- <pt x="455" y="1670" on="1"/>
- <pt x="522" y="1737" on="0"/>
- </contour>
- <contour>
- <pt x="615" y="1650" on="1"/>
- <pt x="557" y="1650" on="0"/>
- <pt x="516" y="1609" on="1"/>
- <pt x="474" y="1569" on="0"/>
- <pt x="474" y="1510" on="1"/>
- <pt x="474" y="1452" on="0"/>
- <pt x="515" y="1411" on="1"/>
- <pt x="556" y="1369" on="0"/>
- <pt x="614" y="1369" on="1"/>
- <pt x="667" y="1369" on="0"/>
- <pt x="706" y="1402" on="1"/>
- <pt x="756" y="1445" on="0"/>
- <pt x="756" y="1511" on="1"/>
- <pt x="756" y="1569" on="0"/>
- <pt x="714" y="1609" on="1"/>
- <pt x="672" y="1650" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 24 32 8 16 32 0 48 200 8 0 14 0 0 28 32 4 20 32 12 48 200 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="s" xMin="173" yMin="-25" xMax="1088" yMax="1111">
- <contour>
- <pt x="173" y="61" on="1"/>
- <pt x="173" y="358" on="1"/>
- <pt x="296" y="358" on="1"/>
- <pt x="321" y="175" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="654" y="99" on="1"/>
- <pt x="892" y="99" on="0"/>
- <pt x="892" y="267" on="1"/>
- <pt x="892" y="333" on="0"/>
- <pt x="852" y="369" on="1"/>
- <pt x="812" y="406" on="0"/>
- <pt x="709" y="433" on="1"/>
- <pt x="505" y="487" on="1"/>
- <pt x="334" y="532" on="0"/>
- <pt x="256" y="605" on="1"/>
- <pt x="179" y="676" on="0"/>
- <pt x="179" y="794" on="1"/>
- <pt x="179" y="1111" on="0"/>
- <pt x="611" y="1111" on="1"/>
- <pt x="832" y="1111" on="0"/>
- <pt x="1013" y="1039" on="1"/>
- <pt x="1013" y="753" on="1"/>
- <pt x="890" y="753" on="1"/>
- <pt x="865" y="934" on="1"/>
- <pt x="756" y="987" on="0"/>
- <pt x="610" y="987" on="1"/>
- <pt x="500" y="987" on="0"/>
- <pt x="439" y="952" on="1"/>
- <pt x="367" y="911" on="0"/>
- <pt x="367" y="826" on="1"/>
- <pt x="367" y="714" on="0"/>
- <pt x="573" y="660" on="1"/>
- <pt x="775" y="607" on="1"/>
- <pt x="943" y="563" on="0"/>
- <pt x="1016" y="495" on="1"/>
- <pt x="1088" y="428" on="0"/>
- <pt x="1088" y="313" on="1"/>
- <pt x="1088" y="156" on="0"/>
- <pt x="965" y="66" on="1"/>
- <pt x="842" y="-25" on="0"/>
- <pt x="622" y="-25" on="1"/>
- <pt x="396" y="-25" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 61 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 1 1 1 23 22 21 20 3 2 1 0 8
- 1 2 3 0 0 14 0 0 29 19 16 7 28 36 48 200 16 23 22 16 3 2 5 20 0
- 3 36 20 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sacute" xMin="173" yMin="-25" xMax="1088" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="113" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scaron" xMin="173" yMin="-25" xMax="1088" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="15" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scedilla" xMin="173" yMin="-432" xMax="1088" yMax="1111">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="26" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scircumflex" xMin="173" yMin="-25" xMax="1088" yMax="1604">
- <contour>
- <pt x="173" y="61" on="1"/>
- <pt x="173" y="358" on="1"/>
- <pt x="296" y="358" on="1"/>
- <pt x="321" y="175" on="1"/>
- <pt x="517" y="99" on="0"/>
- <pt x="654" y="99" on="1"/>
- <pt x="892" y="99" on="0"/>
- <pt x="892" y="267" on="1"/>
- <pt x="892" y="333" on="0"/>
- <pt x="852" y="369" on="1"/>
- <pt x="812" y="406" on="0"/>
- <pt x="709" y="433" on="1"/>
- <pt x="505" y="487" on="1"/>
- <pt x="334" y="532" on="0"/>
- <pt x="256" y="605" on="1"/>
- <pt x="179" y="676" on="0"/>
- <pt x="179" y="794" on="1"/>
- <pt x="179" y="1111" on="0"/>
- <pt x="611" y="1111" on="1"/>
- <pt x="832" y="1111" on="0"/>
- <pt x="1013" y="1039" on="1"/>
- <pt x="1013" y="753" on="1"/>
- <pt x="890" y="753" on="1"/>
- <pt x="865" y="934" on="1"/>
- <pt x="756" y="987" on="0"/>
- <pt x="610" y="987" on="1"/>
- <pt x="500" y="987" on="0"/>
- <pt x="439" y="952" on="1"/>
- <pt x="367" y="911" on="0"/>
- <pt x="367" y="826" on="1"/>
- <pt x="367" y="714" on="0"/>
- <pt x="573" y="660" on="1"/>
- <pt x="775" y="607" on="1"/>
- <pt x="943" y="563" on="0"/>
- <pt x="1016" y="495" on="1"/>
- <pt x="1088" y="428" on="0"/>
- <pt x="1088" y="313" on="1"/>
- <pt x="1088" y="156" on="0"/>
- <pt x="965" y="66" on="1"/>
- <pt x="842" y="-25" on="0"/>
- <pt x="622" y="-25" on="1"/>
- <pt x="396" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="263" y="1283" on="1"/>
- <pt x="519" y="1604" on="1"/>
- <pt x="738" y="1604" on="1"/>
- <pt x="994" y="1283" on="1"/>
- <pt x="871" y="1283" on="1"/>
- <pt x="630" y="1485" on="1"/>
- <pt x="627" y="1485" on="1"/>
- <pt x="386" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 25 5 18 5 5 40 48 200 40 2 18 1 1 49 48 47 46 45 42 6 43 1 3
- 0 1 1 23 22 21 20 3 2 1 0 8 1 2 3 0 0 44 43 1 0 14 0 0 29
- 19 16 7 28 36 48 200 16 49 48 47 46 45 44 43 42 23 22 16 3 2 13 20 0 3
- 36 20 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="scommaaccent" xMin="173" yMin="-432" xMax="1088" yMax="1111">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="42" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="section" xMin="154" yMin="-333" xMax="1073" yMax="1518">
- <contour>
- <pt x="154" y="-259" on="1"/>
- <pt x="154" y="62" on="1"/>
- <pt x="277" y="62" on="1"/>
- <pt x="302" y="-148" on="1"/>
- <pt x="462" y="-210" on="0"/>
- <pt x="617" y="-210" on="1"/>
- <pt x="749" y="-210" on="0"/>
- <pt x="825" y="-154" on="1"/>
- <pt x="900" y="-99" on="0"/>
- <pt x="900" y="-6" on="1"/>
- <pt x="900" y="77" on="0"/>
- <pt x="831" y="125" on="1"/>
- <pt x="778" y="163" on="0"/>
- <pt x="668" y="206" on="1"/>
- <pt x="422" y="302" on="1"/>
- <pt x="160" y="404" on="0"/>
- <pt x="160" y="622" on="1"/>
- <pt x="160" y="776" on="0"/>
- <pt x="304" y="912" on="1"/>
- <pt x="166" y="1013" on="0"/>
- <pt x="166" y="1158" on="1"/>
- <pt x="166" y="1330" on="0"/>
- <pt x="298" y="1424" on="1"/>
- <pt x="429" y="1518" on="0"/>
- <pt x="673" y="1518" on="1"/>
- <pt x="830" y="1518" on="0"/>
- <pt x="1018" y="1474" on="1"/>
- <pt x="1018" y="1154" on="1"/>
- <pt x="894" y="1154" on="1"/>
- <pt x="870" y="1357" on="1"/>
- <pt x="740" y="1394" on="0"/>
- <pt x="630" y="1394" on="1"/>
- <pt x="498" y="1394" on="0"/>
- <pt x="424" y="1352" on="1"/>
- <pt x="339" y="1303" on="0"/>
- <pt x="339" y="1202" on="1"/>
- <pt x="339" y="1118" on="0"/>
- <pt x="426" y="1054" on="1"/>
- <pt x="477" y="1018" on="0"/>
- <pt x="565" y="984" on="1"/>
- <pt x="771" y="905" on="1"/>
- <pt x="1048" y="799" on="0"/>
- <pt x="1048" y="571" on="1"/>
- <pt x="1048" y="426" on="0"/>
- <pt x="919" y="281" on="1"/>
- <pt x="1073" y="170" on="0"/>
- <pt x="1073" y="13" on="1"/>
- <pt x="1073" y="-145" on="0"/>
- <pt x="945" y="-239" on="1"/>
- <pt x="817" y="-333" on="0"/>
- <pt x="590" y="-333" on="1"/>
- <pt x="360" y="-333" on="0"/>
- </contour>
- <contour>
- <pt x="811" y="344" on="1"/>
- <pt x="900" y="442" on="0"/>
- <pt x="900" y="533" on="1"/>
- <pt x="900" y="664" on="0"/>
- <pt x="714" y="732" on="1"/>
- <pt x="458" y="826" on="1"/>
- <pt x="410" y="845" on="1"/>
- <pt x="327" y="757" on="0"/>
- <pt x="327" y="672" on="1"/>
- <pt x="327" y="541" on="0"/>
- <pt x="491" y="474" on="1"/>
- <pt x="760" y="365" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 31 5 24 5 5 50 48 200 24 0 1 58 52 44 29 28 27 26 18 3 2 1 0
- 12 13 50 0 0 14 0 0 60 15 16 54 16 42 35 15 20 9 15 46 48 200 20 16 58
- 52 44 29 28 20 18 16 3 2 10 26 0 3 46 42 26 27 26 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon" xMin="466" yMin="-321" xMax="762" yMax="1086">
- <contour>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="296" on="1"/>
- <pt x="762" y="296" on="1"/>
- <pt x="762" y="116" on="1"/>
- <pt x="760" y="-302" on="0"/>
- <pt x="466" y="-321" on="1"/>
- <pt x="466" y="-222" on="1"/>
- <pt x="541" y="-210" on="0"/>
- <pt x="563" y="-155" on="1"/>
- <pt x="583" y="-107" on="0"/>
- <pt x="589" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="466" y="790" on="1"/>
- <pt x="466" y="1086" on="1"/>
- <pt x="762" y="1086" on="1"/>
- <pt x="762" y="790" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 1 3 1 2 2 0 1 10 6 5 0 4 13 2 0 0 0 14 11 8 1 12 1 4 48
- 200 2 1 1 0 13 12 1 14 10 2 0 2 0 0 14 13 3 2 8 3 0 1 4 48
- 200 12 11 6 5 1 0 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon#1" xMin="466" yMin="-321" xMax="762" yMax="1086">
- <contour>
- <pt x="466" y="0" on="1"/>
- <pt x="466" y="296" on="1"/>
- <pt x="762" y="296" on="1"/>
- <pt x="762" y="116" on="1"/>
- <pt x="760" y="-302" on="0"/>
- <pt x="466" y="-321" on="1"/>
- <pt x="466" y="-222" on="1"/>
- <pt x="541" y="-210" on="0"/>
- <pt x="563" y="-155" on="1"/>
- <pt x="583" y="-107" on="0"/>
- <pt x="589" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="466" y="790" on="1"/>
- <pt x="466" y="1086" on="1"/>
- <pt x="762" y="1086" on="1"/>
- <pt x="762" y="790" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 1 3 1 2 2 0 1 10 6 5 0 4 13 2 0 0 0 14 11 8 1 12 1 4 48
- 200 2 1 1 0 13 12 1 14 10 2 0 2 0 0 14 13 3 2 8 3 0 1 4 48
- 200 12 11 6 5 1 0 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="seven" xMin="145" yMin="0" xMax="1058" yMax="1480">
- <contour>
- <pt x="264" y="0" on="1"/>
- <pt x="325" y="432" on="0"/>
- <pt x="671" y="949" on="1"/>
- <pt x="796" y="1133" on="1"/>
- <pt x="905" y="1295" on="1"/>
- <pt x="145" y="1295" on="1"/>
- <pt x="145" y="1480" on="1"/>
- <pt x="1058" y="1480" on="1"/>
- <pt x="1058" y="1295" on="1"/>
- <pt x="971" y="1176" on="1"/>
- <pt x="716" y="824" on="0"/>
- <pt x="595" y="465" on="1"/>
- <pt x="512" y="215" on="0"/>
- <pt x="511" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 35 values pushed */
- 0 0 8 5 4 27 2 6 1 4 48 200 13 0 1 0 7 6 0 14 13 4 0 3 7
- 5 3 8 7 1 6 5 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sfthyphen" xMin="148" yMin="543" xMax="1081" yMax="691">
- <contour>
- <pt x="148" y="543" on="1"/>
- <pt x="148" y="691" on="1"/>
- <pt x="1081" y="691" on="1"/>
- <pt x="1081" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 200 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="six" xMin="122" yMin="-37" xMax="1132" yMax="1517">
- <contour>
- <pt x="335" y="773" on="1"/>
- <pt x="399" y="861" on="0"/>
- <pt x="469" y="905" on="1"/>
- <pt x="572" y="969" on="0"/>
- <pt x="706" y="969" on="1"/>
- <pt x="896" y="969" on="0"/>
- <pt x="1014" y="835" on="1"/>
- <pt x="1132" y="702" on="0"/>
- <pt x="1132" y="486" on="1"/>
- <pt x="1132" y="255" on="0"/>
- <pt x="995" y="109" on="1"/>
- <pt x="858" y="-37" on="0"/>
- <pt x="642" y="-37" on="1"/>
- <pt x="398" y="-37" on="0"/>
- <pt x="260" y="161" on="1"/>
- <pt x="122" y="360" on="0"/>
- <pt x="122" y="710" on="1"/>
- <pt x="122" y="1095" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="448" y="1517" on="0"/>
- <pt x="738" y="1517" on="1"/>
- <pt x="866" y="1517" on="0"/>
- <pt x="1064" y="1446" on="1"/>
- <pt x="1064" y="1129" on="1"/>
- <pt x="940" y="1129" on="1"/>
- <pt x="917" y="1339" on="1"/>
- <pt x="830" y="1394" on="0"/>
- <pt x="739" y="1394" on="1"/>
- <pt x="524" y="1394" on="0"/>
- <pt x="415" y="1178" on="1"/>
- <pt x="338" y="1027" on="0"/>
- </contour>
- <contour>
- <pt x="669" y="839" on="1"/>
- <pt x="534" y="839" on="0"/>
- <pt x="442" y="736" on="1"/>
- <pt x="350" y="634" on="0"/>
- <pt x="350" y="480" on="1"/>
- <pt x="350" y="320" on="0"/>
- <pt x="443" y="203" on="1"/>
- <pt x="536" y="86" on="0"/>
- <pt x="667" y="86" on="1"/>
- <pt x="778" y="86" on="0"/>
- <pt x="846" y="165" on="1"/>
- <pt x="932" y="265" on="0"/>
- <pt x="932" y="463" on="1"/>
- <pt x="932" y="839" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 39 5 12 31 25 4 27 5 20 48 200 20 0 12 2 4 1 1 25 24 23 22 4
- 0 6 0 2 3 0 0 14 0 0 43 24 8 35 26 16 48 200 8 22 25 24 0 3 13
- 16 22 23 22 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="slash" xMin="99" yMin="-296" xMax="1131" yMax="1579">
- <contour>
- <pt x="99" y="-296" on="1"/>
- <pt x="967" y="1579" on="1"/>
- <pt x="1131" y="1579" on="1"/>
- <pt x="262" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="space"/><!-- contains no outline data -->
-
- <TTGlyph name="sterling" xMin="149" yMin="0" xMax="1043" yMax="1517">
- <contour>
- <pt x="149" y="0" on="1"/>
- <pt x="149" y="179" on="1"/>
- <pt x="351" y="249" on="0"/>
- <pt x="353" y="511" on="1"/>
- <pt x="353" y="728" on="1"/>
- <pt x="180" y="728" on="1"/>
- <pt x="180" y="851" on="1"/>
- <pt x="353" y="851" on="1"/>
- <pt x="353" y="1110" on="1"/>
- <pt x="353" y="1298" on="0"/>
- <pt x="458" y="1407" on="1"/>
- <pt x="563" y="1517" on="0"/>
- <pt x="746" y="1517" on="1"/>
- <pt x="874" y="1517" on="0"/>
- <pt x="1028" y="1468" on="1"/>
- <pt x="1028" y="1160" on="1"/>
- <pt x="905" y="1160" on="1"/>
- <pt x="880" y="1369" on="1"/>
- <pt x="800" y="1394" on="0"/>
- <pt x="740" y="1394" on="1"/>
- <pt x="550" y="1394" on="0"/>
- <pt x="550" y="1191" on="1"/>
- <pt x="550" y="851" on="1"/>
- <pt x="815" y="851" on="1"/>
- <pt x="815" y="728" on="1"/>
- <pt x="550" y="728" on="1"/>
- <pt x="550" y="559" on="1"/>
- <pt x="549" y="305" on="0"/>
- <pt x="368" y="173" on="1"/>
- <pt x="1043" y="173" on="1"/>
- <pt x="1043" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 104 values pushed */
- 0 0 19 5 12 48 200 12 0 1 21 17 16 15 14 8 6 0 6 3 0 26 3 1 3
- 4 28 3 0 0 25 24 5 4 6 3 6 29 28 22 1 0 2 4 48 200 23 22 7 6
- 3 30 0 1 2 0 14 24 23 17 16 4 14 21 3 28 21 3 2 6 5 2 3 0 3
- 0 0 26 25 22 21 10 3 3 1 4 48 200 30 29 1 15 14 1 8 7 4 3 3 1
- 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="t" xMin="119" yMin="-25" xMax="1032" yMax="1332">
- <contour>
- <pt x="1032" y="61" on="1"/>
- <pt x="867" y="-25" on="0"/>
- <pt x="696" y="-25" on="1"/>
- <pt x="535" y="-25" on="0"/>
- <pt x="466" y="50" on="1"/>
- <pt x="397" y="124" on="0"/>
- <pt x="397" y="299" on="1"/>
- <pt x="397" y="925" on="1"/>
- <pt x="119" y="925" on="1"/>
- <pt x="119" y="1061" on="1"/>
- <pt x="397" y="1061" on="1"/>
- <pt x="397" y="1332" on="1"/>
- <pt x="594" y="1332" on="1"/>
- <pt x="594" y="1061" on="1"/>
- <pt x="1020" y="1061" on="1"/>
- <pt x="1020" y="925" on="1"/>
- <pt x="594" y="925" on="1"/>
- <pt x="594" y="388" on="1"/>
- <pt x="594" y="228" on="0"/>
- <pt x="626" y="176" on="1"/>
- <pt x="658" y="123" on="0"/>
- <pt x="753" y="123" on="1"/>
- <pt x="859" y="123" on="0"/>
- <pt x="1032" y="200" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 21 14 2 48 200 2 2 1 23 17 6 0 4 7 2 3 0 0 0 16 15 8 7
- 20 3 9 1 4 48 200 12 11 1 14 13 10 9 3 2 0 14 15 14 2 0 12 3 9
- 8 6 0 0 17 16 13 12 10 3 6 1 4 48 200 23 0 1 11 10 7 6 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tbar" xMin="119" yMin="-25" xMax="1032" yMax="1332">
- <contour>
- <pt x="1032" y="200" on="1"/>
- <pt x="1032" y="61" on="1"/>
- <pt x="867" y="-25" on="0"/>
- <pt x="696" y="-25" on="1"/>
- <pt x="535" y="-25" on="0"/>
- <pt x="466" y="50" on="1"/>
- <pt x="397" y="124" on="0"/>
- <pt x="397" y="299" on="1"/>
- <pt x="397" y="605" on="1"/>
- <pt x="168" y="605" on="1"/>
- <pt x="168" y="703" on="1"/>
- <pt x="397" y="703" on="1"/>
- <pt x="397" y="925" on="1"/>
- <pt x="119" y="925" on="1"/>
- <pt x="119" y="1061" on="1"/>
- <pt x="397" y="1061" on="1"/>
- <pt x="397" y="1332" on="1"/>
- <pt x="594" y="1332" on="1"/>
- <pt x="594" y="1061" on="1"/>
- <pt x="1020" y="1061" on="1"/>
- <pt x="1020" y="925" on="1"/>
- <pt x="594" y="925" on="1"/>
- <pt x="594" y="703" on="1"/>
- <pt x="896" y="703" on="1"/>
- <pt x="896" y="605" on="1"/>
- <pt x="594" y="605" on="1"/>
- <pt x="594" y="388" on="1"/>
- <pt x="594" y="228" on="0"/>
- <pt x="626" y="176" on="1"/>
- <pt x="658" y="123" on="0"/>
- <pt x="753" y="123" on="1"/>
- <pt x="859" y="123" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 30 14 3 48 200 3 2 1 26 7 1 0 4 8 2 3 0 0 0 21 20 13 12
- 20 3 14 25 24 9 8 33 3 10 2 4 48 200 17 16 1 19 18 15 14 3 23 22 11
- 10 3 3 0 14 24 23 20 19 4 0 17 3 14 13 10 9 4 13 7 0 0 26 25 22
- 21 18 17 10 5 7 1 4 48 200 1 0 1 16 15 12 11 8 7 5 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcaron" xMin="119" yMin="-25" xMax="1032" yMax="1688">
- <contour>
- <pt x="1032" y="61" on="1"/>
- <pt x="867" y="-25" on="0"/>
- <pt x="696" y="-25" on="1"/>
- <pt x="535" y="-25" on="0"/>
- <pt x="466" y="50" on="1"/>
- <pt x="397" y="124" on="0"/>
- <pt x="397" y="299" on="1"/>
- <pt x="397" y="925" on="1"/>
- <pt x="119" y="925" on="1"/>
- <pt x="119" y="1061" on="1"/>
- <pt x="397" y="1061" on="1"/>
- <pt x="397" y="1332" on="1"/>
- <pt x="594" y="1332" on="1"/>
- <pt x="594" y="1061" on="1"/>
- <pt x="1020" y="1061" on="1"/>
- <pt x="1020" y="925" on="1"/>
- <pt x="594" y="925" on="1"/>
- <pt x="594" y="388" on="1"/>
- <pt x="594" y="228" on="0"/>
- <pt x="626" y="176" on="1"/>
- <pt x="658" y="123" on="0"/>
- <pt x="753" y="123" on="1"/>
- <pt x="859" y="123" on="0"/>
- <pt x="1032" y="200" on="1"/>
- </contour>
- <contour>
- <pt x="767" y="1234" on="1"/>
- <pt x="767" y="1293" on="1"/>
- <pt x="843" y="1314" on="0"/>
- <pt x="843" y="1474" on="1"/>
- <pt x="843" y="1491" on="1"/>
- <pt x="767" y="1491" on="1"/>
- <pt x="767" y="1688" on="1"/>
- <pt x="964" y="1688" on="1"/>
- <pt x="964" y="1517" on="1"/>
- <pt x="963" y="1255" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 21 14 2 48 200 2 2 32 29 28 27 4 30 11 3 25 24 2 11 9 3 1 23
- 17 6 0 4 7 2 3 0 0 0 16 15 8 7 20 3 9 1 4 48 200 31 30 1 12
- 11 1 14 13 10 9 3 3 0 14 15 14 2 0 31 3 28 27 2 31 24 3 9 8 6
- 0 0 30 29 25 24 10 3 31 17 16 13 12 10 3 6 2 4 48 200 32 31 1 23 0
- 1 11 10 7 6 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommaaccent" xMin="119" yMin="-432" xMax="1032" yMax="1332">
- <contour>
- <pt x="1032" y="61" on="1"/>
- <pt x="867" y="-25" on="0"/>
- <pt x="696" y="-25" on="1"/>
- <pt x="535" y="-25" on="0"/>
- <pt x="466" y="50" on="1"/>
- <pt x="397" y="124" on="0"/>
- <pt x="397" y="299" on="1"/>
- <pt x="397" y="925" on="1"/>
- <pt x="119" y="925" on="1"/>
- <pt x="119" y="1061" on="1"/>
- <pt x="397" y="1061" on="1"/>
- <pt x="397" y="1332" on="1"/>
- <pt x="594" y="1332" on="1"/>
- <pt x="594" y="1061" on="1"/>
- <pt x="1020" y="1061" on="1"/>
- <pt x="1020" y="925" on="1"/>
- <pt x="594" y="925" on="1"/>
- <pt x="594" y="388" on="1"/>
- <pt x="594" y="228" on="0"/>
- <pt x="626" y="176" on="1"/>
- <pt x="658" y="123" on="0"/>
- <pt x="753" y="123" on="1"/>
- <pt x="860" y="123" on="0"/>
- <pt x="1032" y="200" on="1"/>
- </contour>
- <contour>
- <pt x="627" y="0" on="1"/>
- <pt x="724" y="0" on="1"/>
- <pt x="664" y="-109" on="1"/>
- <pt x="736" y="-111" on="0"/>
- <pt x="788" y="-148" on="1"/>
- <pt x="858" y="-197" on="0"/>
- <pt x="858" y="-269" on="1"/>
- <pt x="858" y="-337" on="0"/>
- <pt x="799" y="-384" on="1"/>
- <pt x="741" y="-432" on="0"/>
- <pt x="654" y="-432" on="1"/>
- <pt x="587" y="-432" on="0"/>
- <pt x="511" y="-411" on="1"/>
- <pt x="511" y="-330" on="1"/>
- <pt x="561" y="-345" on="0"/>
- <pt x="615" y="-345" on="1"/>
- <pt x="719" y="-345" on="0"/>
- <pt x="719" y="-271" on="1"/>
- <pt x="719" y="-178" on="0"/>
- <pt x="532" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 39 32 34 21 14 2 48 200 2 2 1 23 17 6 0 4 7 2 3 0 1 43 37
- 36 26 25 24 6 13 34 2 0 0 0 16 15 8 7 20 3 9 1 4 48 200 12 11 1
- 14 13 10 9 3 2 0 14 0 0 41 20 30 48 200 30 30 26 25 24 15 14 6 0 12
- 3 43 37 36 3 12 6 3 9 8 6 0 0 17 16 13 12 10 3 6 1 4 48 200 23
- 0 1 11 10 7 6 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommabelow" xMin="119" yMin="-432" xMax="1032" yMax="1332">
- <component glyphName="t" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="62" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="thorn" xMin="62" yMin="-395" xMax="1118" yMax="1579">
- <contour>
- <pt x="185" y="-272" on="1"/>
- <pt x="185" y="1456" on="1"/>
- <pt x="62" y="1456" on="1"/>
- <pt x="62" y="1579" on="1"/>
- <pt x="383" y="1579" on="1"/>
- <pt x="383" y="864" on="1"/>
- <pt x="458" y="975" on="0"/>
- <pt x="529" y="1030" on="1"/>
- <pt x="631" y="1110" on="0"/>
- <pt x="749" y="1110" on="1"/>
- <pt x="914" y="1110" on="0"/>
- <pt x="1016" y="967" on="1"/>
- <pt x="1118" y="823" on="0"/>
- <pt x="1118" y="588" on="1"/>
- <pt x="1118" y="302" on="0"/>
- <pt x="983" y="139" on="1"/>
- <pt x="849" y="-25" on="0"/>
- <pt x="614" y="-25" on="1"/>
- <pt x="526" y="-25" on="0"/>
- <pt x="383" y="0" on="1"/>
- <pt x="383" y="-272" on="1"/>
- <pt x="630" y="-272" on="1"/>
- <pt x="630" y="-395" on="1"/>
- <pt x="62" y="-395" on="1"/>
- <pt x="62" y="-272" on="1"/>
- </contour>
- <contour>
- <pt x="383" y="146" on="1"/>
- <pt x="518" y="123" on="0"/>
- <pt x="591" y="123" on="1"/>
- <pt x="908" y="123" on="0"/>
- <pt x="908" y="591" on="1"/>
- <pt x="908" y="950" on="0"/>
- <pt x="694" y="950" on="1"/>
- <pt x="530" y="950" on="0"/>
- <pt x="383" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 0 0 31 30 9 27 14 17 48 200 17 2 9 1 1 2 1 2 3 1 3 0 1 1 33
- 25 5 3 1 2 3 0 0 1 19 2 0 2 0 0 0 24 21 20 0 6 3 22 1 4
- 48 200 4 3 1 23 22 1 2 0 14 0 0 29 39 13 48 200 22 21 2 13 13 4 24
- 23 3 2 4 13 0 0 0 33 25 20 19 5 4 10 5 0 1 4 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="three" xMin="185" yMin="-37" xMax="1081" yMax="1517">
- <contour>
- <pt x="185" y="10" on="1"/>
- <pt x="185" y="384" on="1"/>
- <pt x="308" y="384" on="1"/>
- <pt x="333" y="138" on="1"/>
- <pt x="419" y="86" on="0"/>
- <pt x="538" y="86" on="1"/>
- <pt x="691" y="86" on="0"/>
- <pt x="781" y="173" on="1"/>
- <pt x="871" y="260" on="0"/>
- <pt x="871" y="409" on="1"/>
- <pt x="871" y="728" on="0"/>
- <pt x="455" y="728" on="1"/>
- <pt x="320" y="728" on="1"/>
- <pt x="320" y="851" on="1"/>
- <pt x="434" y="851" on="1"/>
- <pt x="829" y="851" on="0"/>
- <pt x="829" y="1147" on="1"/>
- <pt x="829" y="1261" on="0"/>
- <pt x="756" y="1327" on="1"/>
- <pt x="684" y="1394" on="0"/>
- <pt x="557" y="1394" on="1"/>
- <pt x="439" y="1394" on="0"/>
- <pt x="355" y="1355" on="1"/>
- <pt x="343" y="1146" on="1"/>
- <pt x="219" y="1146" on="1"/>
- <pt x="219" y="1464" on="1"/>
- <pt x="412" y="1517" on="0"/>
- <pt x="577" y="1517" on="1"/>
- <pt x="1030" y="1517" on="0"/>
- <pt x="1030" y="1164" on="1"/>
- <pt x="1030" y="1001" on="0"/>
- <pt x="925" y="901" on="1"/>
- <pt x="861" y="842" on="0"/>
- <pt x="742" y="798" on="1"/>
- <pt x="847" y="767" on="0"/>
- <pt x="902" y="733" on="1"/>
- <pt x="1081" y="622" on="0"/>
- <pt x="1081" y="399" on="1"/>
- <pt x="1081" y="205" on="0"/>
- <pt x="943" y="84" on="1"/>
- <pt x="805" y="-37" on="0"/>
- <pt x="576" y="-37" on="1"/>
- <pt x="421" y="-37" on="0"/>
- <pt x="270" y="-7" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 20 5 27 5 5 41 48 200 41 2 27 0 1 1 33 25 24 23 22 14 13 12 11
- 3 2 1 0 13 0 2 3 0 0 14 0 0 16 24 29 9 39 37 48 200 33 23 22 14
- 13 12 11 3 2 9 13 37 29 24 0 0 25 24 23 1 0 1 5 48 200 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threequarters" xMin="37" yMin="-37" xMax="1205" yMax="1518">
- <contour>
- <pt x="173" y="-37" on="1"/>
- <pt x="950" y="1517" on="1"/>
- <pt x="1091" y="1517" on="1"/>
- <pt x="311" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="37" y="752" on="1"/>
- <pt x="37" y="916" on="1"/>
- <pt x="148" y="916" on="1"/>
- <pt x="148" y="854" on="1"/>
- <pt x="195" y="827" on="0"/>
- <pt x="256" y="827" on="1"/>
- <pt x="380" y="827" on="0"/>
- <pt x="380" y="946" on="1"/>
- <pt x="380" y="1076" on="0"/>
- <pt x="197" y="1076" on="1"/>
- <pt x="161" y="1076" on="1"/>
- <pt x="161" y="1187" on="1"/>
- <pt x="200" y="1187" on="1"/>
- <pt x="380" y="1187" on="0"/>
- <pt x="380" y="1304" on="1"/>
- <pt x="380" y="1406" on="0"/>
- <pt x="260" y="1406" on="1"/>
- <pt x="198" y="1406" on="0"/>
- <pt x="148" y="1375" on="1"/>
- <pt x="148" y="1313" on="1"/>
- <pt x="37" y="1313" on="1"/>
- <pt x="37" y="1469" on="1"/>
- <pt x="177" y="1518" on="0"/>
- <pt x="283" y="1518" on="1"/>
- <pt x="531" y="1518" on="0"/>
- <pt x="531" y="1334" on="1"/>
- <pt x="531" y="1204" on="0"/>
- <pt x="355" y="1129" on="1"/>
- <pt x="529" y="1084" on="0"/>
- <pt x="529" y="941" on="1"/>
- <pt x="529" y="836" on="0"/>
- <pt x="452" y="776" on="1"/>
- <pt x="375" y="715" on="0"/>
- <pt x="244" y="715" on="1"/>
- <pt x="165" y="715" on="0"/>
- <pt x="61" y="745" on="1"/>
- </contour>
- <contour>
- <pt x="1094" y="0" on="1"/>
- <pt x="945" y="0" on="1"/>
- <pt x="945" y="179" on="1"/>
- <pt x="571" y="179" on="1"/>
- <pt x="571" y="302" on="1"/>
- <pt x="941" y="790" on="1"/>
- <pt x="1094" y="790" on="1"/>
- <pt x="1094" y="302" on="1"/>
- <pt x="1205" y="302" on="1"/>
- <pt x="1205" y="179" on="1"/>
- <pt x="1094" y="179" on="1"/>
- </contour>
- <contour>
- <pt x="709" y="302" on="1"/>
- <pt x="945" y="302" on="1"/>
- <pt x="945" y="611" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 139 values pushed */
- 0 0 20 31 27 9 31 37 48 200 31 25 24 23 22 16 15 14 13 7 6 5 12 1 45
- 3 37 53 37 4 3 45 44 3 27 1 0 0 52 51 48 47 44 6 4 42 1 4 48 200
- 46 45 1 50 49 43 42 3 41 40 1 2 1 1 3 0 1 5 0 14 0 0 18 38 29
- 11 38 33 48 200 2 1 2 40 41 3 33 29 51 45 44 43 33 31 29 23 22 16 15 14
- 13 7 6 3 0 17 41 4 3 49 48 2 13 40 0 0 53 52 42 41 16 3 40 1 4
- 48 200 50 47 46 40 3 25 24 5 4 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threesuperior" xMin="263" yMin="715" xMax="966" yMax="1518">
- <contour>
- <pt x="263" y="752" on="1"/>
- <pt x="263" y="925" on="1"/>
- <pt x="386" y="925" on="1"/>
- <pt x="398" y="857" on="1"/>
- <pt x="468" y="839" on="0"/>
- <pt x="561" y="839" on="1"/>
- <pt x="787" y="839" on="0"/>
- <pt x="787" y="943" on="1"/>
- <pt x="787" y="1027" on="0"/>
- <pt x="691" y="1050" on="1"/>
- <pt x="618" y="1067" on="0"/>
- <pt x="465" y="1067" on="1"/>
- <pt x="374" y="1067" on="1"/>
- <pt x="374" y="1191" on="1"/>
- <pt x="469" y="1191" on="1"/>
- <pt x="659" y="1191" on="0"/>
- <pt x="723" y="1213" on="1"/>
- <pt x="787" y="1234" on="0"/>
- <pt x="787" y="1296" on="1"/>
- <pt x="787" y="1394" on="0"/>
- <pt x="595" y="1394" on="1"/>
- <pt x="477" y="1394" on="0"/>
- <pt x="398" y="1364" on="1"/>
- <pt x="386" y="1283" on="1"/>
- <pt x="263" y="1283" on="1"/>
- <pt x="263" y="1468" on="1"/>
- <pt x="433" y="1518" on="0"/>
- <pt x="606" y="1518" on="1"/>
- <pt x="966" y="1518" on="0"/>
- <pt x="966" y="1326" on="1"/>
- <pt x="966" y="1196" on="0"/>
- <pt x="754" y="1126" on="1"/>
- <pt x="966" y="1080" on="0"/>
- <pt x="966" y="933" on="1"/>
- <pt x="966" y="715" on="0"/>
- <pt x="577" y="715" on="1"/>
- <pt x="431" y="715" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 20 6 27 5 6 35 48 200 35 31 27 25 24 23 22 14 13 12 11 3 2 1 0
- 14 0 0 18 13 29 7 13 33 48 200 31 23 22 14 13 12 11 3 2 9 13 33 29 0
- 25 24 1 0 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threesuperiour" xMin="365" yMin="715" xMax="858" yMax="1518">
- <contour>
- <pt x="365" y="752" on="1"/>
- <pt x="365" y="916" on="1"/>
- <pt x="476" y="916" on="1"/>
- <pt x="476" y="854" on="1"/>
- <pt x="524" y="827" on="0"/>
- <pt x="583" y="827" on="1"/>
- <pt x="707" y="827" on="0"/>
- <pt x="707" y="946" on="1"/>
- <pt x="707" y="1076" on="0"/>
- <pt x="525" y="1076" on="1"/>
- <pt x="488" y="1076" on="1"/>
- <pt x="488" y="1187" on="1"/>
- <pt x="528" y="1187" on="1"/>
- <pt x="707" y="1187" on="0"/>
- <pt x="707" y="1303" on="1"/>
- <pt x="707" y="1406" on="0"/>
- <pt x="588" y="1406" on="1"/>
- <pt x="527" y="1406" on="0"/>
- <pt x="476" y="1375" on="1"/>
- <pt x="476" y="1313" on="1"/>
- <pt x="365" y="1313" on="1"/>
- <pt x="365" y="1469" on="1"/>
- <pt x="505" y="1518" on="0"/>
- <pt x="611" y="1518" on="1"/>
- <pt x="858" y="1518" on="0"/>
- <pt x="858" y="1334" on="1"/>
- <pt x="858" y="1204" on="0"/>
- <pt x="682" y="1129" on="1"/>
- <pt x="785" y="1102" on="0"/>
- <pt x="825" y="1048" on="1"/>
- <pt x="857" y="1004" on="0"/>
- <pt x="857" y="941" on="1"/>
- <pt x="857" y="836" on="0"/>
- <pt x="780" y="776" on="1"/>
- <pt x="704" y="715" on="0"/>
- <pt x="572" y="715" on="1"/>
- <pt x="487" y="715" on="0"/>
- <pt x="388" y="745" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 16 31 23 5 31 35 48 200 35 27 23 21 20 19 18 12 11 10 9 3 2 1 0
- 14 0 0 14 38 25 7 38 31 48 200 27 19 18 12 11 10 9 3 2 9 13 31 25 0
- 21 20 1 0 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tilde" xMin="281" yMin="1283" xMax="947" yMax="1518">
- <contour>
- <pt x="281" y="1283" on="1"/>
- <pt x="287" y="1377" on="0"/>
- <pt x="312" y="1428" on="1"/>
- <pt x="357" y="1518" on="0"/>
- <pt x="466" y="1518" on="1"/>
- <pt x="538" y="1518" on="0"/>
- <pt x="601" y="1479" on="1"/>
- <pt x="661" y="1442" on="1"/>
- <pt x="723" y="1404" on="0"/>
- <pt x="757" y="1404" on="1"/>
- <pt x="825" y="1404" on="0"/>
- <pt x="836" y="1518" on="1"/>
- <pt x="947" y="1518" on="1"/>
- <pt x="940" y="1424" on="0"/>
- <pt x="915" y="1374" on="1"/>
- <pt x="869" y="1283" on="0"/>
- <pt x="762" y="1283" on="1"/>
- <pt x="689" y="1283" on="0"/>
- <pt x="626" y="1322" on="1"/>
- <pt x="566" y="1359" on="1"/>
- <pt x="506" y="1396" on="0"/>
- <pt x="470" y="1396" on="1"/>
- <pt x="402" y="1396" on="0"/>
- <pt x="391" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 21 5 4 9 5 16 48 200 4 0 1 12 11 2 13 0 0 1 23 0 16 0 0
- 14 23 12 11 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="trademark" xMin="43" yMin="740" xMax="1196" yMax="1480">
- <contour>
- <pt x="142" y="740" on="1"/>
- <pt x="142" y="833" on="1"/>
- <pt x="219" y="833" on="1"/>
- <pt x="219" y="1388" on="1"/>
- <pt x="132" y="1388" on="1"/>
- <pt x="132" y="1289" on="1"/>
- <pt x="43" y="1289" on="1"/>
- <pt x="43" y="1480" on="1"/>
- <pt x="506" y="1480" on="1"/>
- <pt x="506" y="1289" on="1"/>
- <pt x="417" y="1289" on="1"/>
- <pt x="417" y="1388" on="1"/>
- <pt x="330" y="1388" on="1"/>
- <pt x="330" y="833" on="1"/>
- <pt x="407" y="833" on="1"/>
- <pt x="407" y="740" on="1"/>
- </contour>
- <contour>
- <pt x="555" y="740" on="1"/>
- <pt x="555" y="833" on="1"/>
- <pt x="613" y="833" on="1"/>
- <pt x="613" y="1388" on="1"/>
- <pt x="555" y="1388" on="1"/>
- <pt x="555" y="1480" on="1"/>
- <pt x="767" y="1480" on="1"/>
- <pt x="889" y="1037" on="1"/>
- <pt x="995" y="1480" on="1"/>
- <pt x="1196" y="1480" on="1"/>
- <pt x="1196" y="1388" on="1"/>
- <pt x="1138" y="1388" on="1"/>
- <pt x="1138" y="833" on="1"/>
- <pt x="1196" y="833" on="1"/>
- <pt x="1196" y="740" on="1"/>
- <pt x="1033" y="740" on="1"/>
- <pt x="1033" y="1319" on="1"/>
- <pt x="1032" y="1319" on="1"/>
- <pt x="916" y="876" on="1"/>
- <pt x="829" y="876" on="1"/>
- <pt x="714" y="1289" on="1"/>
- <pt x="712" y="1289" on="1"/>
- <pt x="712" y="740" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 129 values pushed */
- 37 36 35 34 33 32 29 28 27 26 23 20 19 18 17 14 13 12 11 10 9 6 5 4 3
- 2 1 27 7 0 3 38 31 30 16 15 0 5 0 25 24 22 21 8 7 0 5 14 36 35
- 34 33 24 23 22 7 31 37 3 21 20 17 16 4 18 8 3 15 14 11 10 4 8 12 3
- 5 4 1 0 4 2 6 3 30 29 26 25 4 13 27 0 0 32 31 18 1 27 38 37 18
- 1 18 2 4 13 12 1 2 1 6 48 200 28 27 1 19 18 1 9 8 1 3 2 1 7
- 6 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="two" xMin="133" yMin="0" xMax="1108" yMax="1517">
- <contour>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="173" on="1"/>
- <pt x="243" y="359" on="0"/>
- <pt x="391" y="493" on="1"/>
- <pt x="494" y="586" on="1"/>
- <pt x="616" y="698" on="1"/>
- <pt x="854" y="916" on="0"/>
- <pt x="854" y="1119" on="1"/>
- <pt x="854" y="1244" on="0"/>
- <pt x="778" y="1319" on="1"/>
- <pt x="703" y="1394" on="0"/>
- <pt x="577" y="1394" on="1"/>
- <pt x="459" y="1394" on="0"/>
- <pt x="318" y="1308" on="1"/>
- <pt x="294" y="1073" on="1"/>
- <pt x="170" y="1073" on="1"/>
- <pt x="170" y="1423" on="1"/>
- <pt x="416" y="1517" on="0"/>
- <pt x="616" y="1517" on="1"/>
- <pt x="823" y="1517" on="0"/>
- <pt x="944" y="1409" on="1"/>
- <pt x="1064" y="1302" on="0"/>
- <pt x="1064" y="1118" on="1"/>
- <pt x="1064" y="986" on="0"/>
- <pt x="1009" y="889" on="1"/>
- <pt x="952" y="788" on="0"/>
- <pt x="808" y="668" on="1"/>
- <pt x="723" y="597" on="1"/>
- <pt x="503" y="411" on="0"/>
- <pt x="441" y="329" on="1"/>
- <pt x="385" y="257" on="0"/>
- <pt x="356" y="173" on="1"/>
- <pt x="1108" y="173" on="1"/>
- <pt x="1108" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 0 0 11 5 18 48 200 18 0 1 16 15 14 13 4 0 1 3 0 0 0 32 31 1 22
- 2 0 1 4 48 200 33 0 1 0 14 0 0 7 39 22 48 200 22 31 22 14 13 4 32
- 15 3 33 32 1 16 15 1 1 0 1 3 0
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="twosuperior" xMin="257" yMin="728" xMax="972" yMax="1518">
- <contour>
- <pt x="257" y="728" on="1"/>
- <pt x="257" y="876" on="1"/>
- <pt x="298" y="971" on="0"/>
- <pt x="364" y="1015" on="1"/>
- <pt x="424" y="1055" on="0"/>
- <pt x="551" y="1105" on="1"/>
- <pt x="647" y="1143" on="1"/>
- <pt x="781" y="1196" on="0"/>
- <pt x="781" y="1278" on="1"/>
- <pt x="781" y="1394" on="0"/>
- <pt x="589" y="1394" on="1"/>
- <pt x="475" y="1394" on="0"/>
- <pt x="392" y="1357" on="1"/>
- <pt x="380" y="1265" on="1"/>
- <pt x="257" y="1265" on="1"/>
- <pt x="257" y="1468" on="1"/>
- <pt x="294" y="1477" on="1"/>
- <pt x="462" y="1518" on="0"/>
- <pt x="592" y="1518" on="1"/>
- <pt x="960" y="1518" on="0"/>
- <pt x="960" y="1295" on="1"/>
- <pt x="960" y="1138" on="0"/>
- <pt x="752" y="1062" on="1"/>
- <pt x="670" y="1032" on="1"/>
- <pt x="490" y="966" on="0"/>
- <pt x="460" y="876" on="1"/>
- <pt x="972" y="876" on="1"/>
- <pt x="972" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 10 6 18 48 200 15 14 13 12 4 13 18 1 0 0 27 0 16 1 1 1 4 48
- 200 26 25 1 2 0 14 0 0 8 13 20 48 200 20 25 20 13 12 4 26 0 3 27 26
- 1 15 14 1 0 3 2 0
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="twosuperiour" xMin="361" yMin="728" xMax="867" yMax="1517">
- <contour>
- <pt x="361" y="728" on="1"/>
- <pt x="361" y="882" on="1"/>
- <pt x="405" y="970" on="0"/>
- <pt x="523" y="1056" on="1"/>
- <pt x="553" y="1078" on="0"/>
- <pt x="568" y="1090" on="1"/>
- <pt x="601" y="1120" on="1"/>
- <pt x="657" y="1167" on="1"/>
- <pt x="706" y="1208" on="0"/>
- <pt x="706" y="1283" on="1"/>
- <pt x="706" y="1406" on="0"/>
- <pt x="578" y="1406" on="1"/>
- <pt x="534" y="1406" on="0"/>
- <pt x="472" y="1377" on="1"/>
- <pt x="472" y="1310" on="1"/>
- <pt x="361" y="1310" on="1"/>
- <pt x="361" y="1468" on="1"/>
- <pt x="471" y="1517" on="0"/>
- <pt x="590" y="1517" on="1"/>
- <pt x="867" y="1517" on="0"/>
- <pt x="867" y="1302" on="1"/>
- <pt x="867" y="1173" on="0"/>
- <pt x="730" y="1072" on="1"/>
- <pt x="696" y="1047" on="1"/>
- <pt x="696" y="1047" on="1"/>
- <pt x="695" y="1046" on="1"/>
- <pt x="693" y="1045" on="1"/>
- <pt x="691" y="1044" on="0"/>
- <pt x="679" y="1035" on="1"/>
- <pt x="660" y="1022" on="1"/>
- <pt x="550" y="948" on="0"/>
- <pt x="524" y="876" on="1"/>
- <pt x="867" y="876" on="1"/>
- <pt x="867" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 11 18 48 200 24 23 16 15 14 13 1 7 13 18 31 0 0 33 0 16 1 31 1
- 4 48 200 32 31 1 0 14 0 0 9 34 20 48 200 31 24 23 14 13 5 20 0 3 33
- 32 20 2 16 15 1 0 3 2 0
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="u" xMin="68" yMin="-25" xMax="1166" yMax="1086">
- <contour>
- <pt x="734" y="1086" on="1"/>
- <pt x="1043" y="1086" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1166" y="123" on="1"/>
- <pt x="1166" y="0" on="1"/>
- <pt x="845" y="0" on="1"/>
- <pt x="845" y="209" on="1"/>
- <pt x="776" y="104" on="0"/>
- <pt x="708" y="51" on="1"/>
- <pt x="612" y="-25" on="0"/>
- <pt x="493" y="-25" on="1"/>
- <pt x="191" y="-25" on="0"/>
- <pt x="191" y="363" on="1"/>
- <pt x="191" y="962" on="1"/>
- <pt x="68" y="962" on="1"/>
- <pt x="68" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="385" on="1"/>
- <pt x="389" y="130" on="0"/>
- <pt x="552" y="130" on="1"/>
- <pt x="701" y="130" on="0"/>
- <pt x="845" y="382" on="1"/>
- <pt x="845" y="962" on="1"/>
- <pt x="734" y="962" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 19 30 10 48 200 10 2 23 22 21 17 14 13 12 6 3 2 10 0 4 3 5 4
- 1 0 16 15 1 0 1 3 14 23 0 2 5 16 3 4 3 2 13 1 15 14 12 0 0
- 22 21 6 5 10 3 1 17 16 10 1 12 2 4 48 200 2 1 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uacute" xMin="68" yMin="-25" xMax="1166" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="101" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ubreve" xMin="68" yMin="-25" xMax="1166" yMax="1579">
- <contour>
- <pt x="734" y="1086" on="1"/>
- <pt x="1043" y="1086" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1166" y="123" on="1"/>
- <pt x="1166" y="0" on="1"/>
- <pt x="845" y="0" on="1"/>
- <pt x="845" y="209" on="1"/>
- <pt x="776" y="104" on="0"/>
- <pt x="708" y="51" on="1"/>
- <pt x="612" y="-25" on="0"/>
- <pt x="493" y="-25" on="1"/>
- <pt x="191" y="-25" on="0"/>
- <pt x="191" y="363" on="1"/>
- <pt x="191" y="962" on="1"/>
- <pt x="68" y="962" on="1"/>
- <pt x="68" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="385" on="1"/>
- <pt x="389" y="130" on="0"/>
- <pt x="552" y="130" on="1"/>
- <pt x="701" y="130" on="0"/>
- <pt x="845" y="382" on="1"/>
- <pt x="845" y="962" on="1"/>
- <pt x="734" y="962" on="1"/>
- </contour>
- <contour>
- <pt x="265" y="1579" on="1"/>
- <pt x="388" y="1579" on="1"/>
- <pt x="436" y="1431" on="0"/>
- <pt x="610" y="1431" on="1"/>
- <pt x="785" y="1431" on="0"/>
- <pt x="833" y="1579" on="1"/>
- <pt x="956" y="1579" on="1"/>
- <pt x="933" y="1490" on="0"/>
- <pt x="907" y="1444" on="1"/>
- <pt x="816" y="1289" on="0"/>
- <pt x="615" y="1289" on="1"/>
- <pt x="462" y="1289" on="0"/>
- <pt x="373" y="1370" on="1"/>
- <pt x="318" y="1419" on="0"/>
- <pt x="290" y="1491" on="1"/>
- <pt x="279" y="1520" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 96 values pushed */
- 0 0 27 14 34 19 30 10 48 200 10 2 23 22 21 17 14 13 12 6 3 2 10 0 4
- 3 30 29 25 24 4 13 34 0 5 4 1 0 16 15 1 0 1 3 14 30 1 5 2 29
- 23 0 3 5 16 3 25 24 2 16 12 3 4 3 2 13 1 15 14 12 0 0 22 21 6
- 5 10 3 1 17 16 10 1 12 2 4 48 200 2 1 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ucircumflex" xMin="68" yMin="-25" xMax="1166" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="3" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="udieresis" xMin="68" yMin="-25" xMax="1166" yMax="1480">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="3" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ugrave" xMin="68" yMin="-25" xMax="1166" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="-96" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uhungarumlaut" xMin="68" yMin="-25" xMax="1166" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="92" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="umacron" xMin="68" yMin="-25" xMax="1166" yMax="1407">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="-4" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="underscore" xMin="0" yMin="-148" xMax="1229" yMax="0">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="1229" y="0" on="1"/>
- <pt x="1229" y="-148" on="1"/>
- <pt x="0" y="-148" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 2 16 1 0 1 4 48 200 1 0 1 0 14 2 1 1 3 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uogonek" xMin="68" yMin="-370" xMax="1166" yMax="1086">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="331" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uring" xMin="68" yMin="-25" xMax="1166" yMax="1737">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="ring" x="-4" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="utilde" xMin="68" yMin="-25" xMax="1166" yMax="1518">
- <contour>
- <pt x="734" y="1086" on="1"/>
- <pt x="1043" y="1086" on="1"/>
- <pt x="1043" y="123" on="1"/>
- <pt x="1166" y="123" on="1"/>
- <pt x="1166" y="0" on="1"/>
- <pt x="845" y="0" on="1"/>
- <pt x="845" y="209" on="1"/>
- <pt x="776" y="104" on="0"/>
- <pt x="708" y="51" on="1"/>
- <pt x="612" y="-25" on="0"/>
- <pt x="493" y="-25" on="1"/>
- <pt x="191" y="-25" on="0"/>
- <pt x="191" y="363" on="1"/>
- <pt x="191" y="962" on="1"/>
- <pt x="68" y="962" on="1"/>
- <pt x="68" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="385" on="1"/>
- <pt x="389" y="130" on="0"/>
- <pt x="552" y="130" on="1"/>
- <pt x="701" y="130" on="0"/>
- <pt x="845" y="382" on="1"/>
- <pt x="845" y="962" on="1"/>
- <pt x="734" y="962" on="1"/>
- </contour>
- <contour>
- <pt x="278" y="1283" on="1"/>
- <pt x="284" y="1378" on="0"/>
- <pt x="309" y="1428" on="1"/>
- <pt x="354" y="1518" on="0"/>
- <pt x="463" y="1518" on="1"/>
- <pt x="535" y="1518" on="0"/>
- <pt x="598" y="1479" on="1"/>
- <pt x="658" y="1442" on="1"/>
- <pt x="720" y="1404" on="0"/>
- <pt x="754" y="1404" on="1"/>
- <pt x="822" y="1404" on="0"/>
- <pt x="833" y="1518" on="1"/>
- <pt x="944" y="1518" on="1"/>
- <pt x="937" y="1424" on="0"/>
- <pt x="912" y="1374" on="1"/>
- <pt x="866" y="1283" on="0"/>
- <pt x="759" y="1283" on="1"/>
- <pt x="686" y="1283" on="0"/>
- <pt x="623" y="1322" on="1"/>
- <pt x="563" y="1359" on="1"/>
- <pt x="503" y="1396" on="0"/>
- <pt x="467" y="1396" on="1"/>
- <pt x="399" y="1396" on="0"/>
- <pt x="388" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 110 values pushed */
- 0 0 45 5 28 33 5 40 19 30 10 48 200 28 0 10 2 40 1 47 40 24 3 0 0
- 3 0 23 22 21 17 14 13 12 6 3 2 10 0 4 3 1 36 35 2 13 0 0 5 4
- 1 0 16 15 1 0 1 3 14 36 1 5 2 35 23 0 3 5 16 3 47 24 2 16 12
- 3 4 3 2 13 1 15 14 12 0 0 22 21 6 5 10 3 1 17 16 10 1 12 2 4
- 48 200 2 1 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="v" xMin="55" yMin="0" xMax="1173" yMax="1086">
- <contour>
- <pt x="514" y="0" on="1"/>
- <pt x="129" y="962" on="1"/>
- <pt x="55" y="962" on="1"/>
- <pt x="55" y="1086" on="1"/>
- <pt x="502" y="1086" on="1"/>
- <pt x="502" y="962" on="1"/>
- <pt x="342" y="962" on="1"/>
- <pt x="653" y="184" on="1"/>
- <pt x="655" y="184" on="1"/>
- <pt x="966" y="962" on="1"/>
- <pt x="806" y="962" on="1"/>
- <pt x="806" y="1086" on="1"/>
- <pt x="1173" y="1086" on="1"/>
- <pt x="1173" y="962" on="1"/>
- <pt x="1099" y="962" on="1"/>
- <pt x="714" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 8 7 2 1 0 3 0 0 14 13 10 9 6 5 2 1 6 7 3 1 4 48 200 15 0
- 1 0 12 11 4 3 1 3 14 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="w" xMin="23" yMin="0" xMax="1207" yMax="1086">
- <contour>
- <pt x="242" y="0" on="1"/>
- <pt x="72" y="962" on="1"/>
- <pt x="23" y="962" on="1"/>
- <pt x="23" y="1086" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="334" y="962" on="1"/>
- <pt x="248" y="962" on="1"/>
- <pt x="377" y="238" on="1"/>
- <pt x="379" y="238" on="1"/>
- <pt x="556" y="923" on="1"/>
- <pt x="723" y="923" on="1"/>
- <pt x="901" y="235" on="1"/>
- <pt x="903" y="235" on="1"/>
- <pt x="1033" y="962" on="1"/>
- <pt x="935" y="962" on="1"/>
- <pt x="935" y="1086" on="1"/>
- <pt x="1207" y="1086" on="1"/>
- <pt x="1207" y="962" on="1"/>
- <pt x="1158" y="962" on="1"/>
- <pt x="988" y="0" on="1"/>
- <pt x="795" y="0" on="1"/>
- <pt x="616" y="703" on="1"/>
- <pt x="614" y="703" on="1"/>
- <pt x="432" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 18 17 14 13 6 5 2 1 8 3 9 3 22 21 12 11 8 7 6 9 0 3 10 9 1
- 23 20 19 0 3 2 0 16 15 4 3 1 3 14 23 22 21 20 19 18 17 16 15 14 13
- 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="wcircumflex" xMin="23" yMin="0" xMax="1207" yMax="1604">
- <contour>
- <pt x="242" y="0" on="1"/>
- <pt x="72" y="962" on="1"/>
- <pt x="23" y="962" on="1"/>
- <pt x="23" y="1086" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="334" y="962" on="1"/>
- <pt x="248" y="962" on="1"/>
- <pt x="377" y="238" on="1"/>
- <pt x="379" y="238" on="1"/>
- <pt x="556" y="923" on="1"/>
- <pt x="723" y="923" on="1"/>
- <pt x="901" y="235" on="1"/>
- <pt x="903" y="235" on="1"/>
- <pt x="1033" y="962" on="1"/>
- <pt x="935" y="962" on="1"/>
- <pt x="935" y="1086" on="1"/>
- <pt x="1207" y="1086" on="1"/>
- <pt x="1207" y="962" on="1"/>
- <pt x="1158" y="962" on="1"/>
- <pt x="988" y="0" on="1"/>
- <pt x="795" y="0" on="1"/>
- <pt x="616" y="703" on="1"/>
- <pt x="614" y="703" on="1"/>
- <pt x="432" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="268" y="1283" on="1"/>
- <pt x="524" y="1604" on="1"/>
- <pt x="743" y="1604" on="1"/>
- <pt x="999" y="1283" on="1"/>
- <pt x="876" y="1283" on="1"/>
- <pt x="635" y="1485" on="1"/>
- <pt x="632" y="1485" on="1"/>
- <pt x="391" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 31 30 29 28 27 24 6 25 3 3 18 17 14 13 6 5 2 1 8 3 9 3 22 21 12
- 11 8 7 6 9 0 3 26 25 1 10 9 1 23 20 19 0 3 3 0 16 15 4 3 1
- 3 14 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
- 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="x" xMin="59" yMin="0" xMax="1189" yMax="1086">
- <contour>
- <pt x="59" y="0" on="1"/>
- <pt x="59" y="123" on="1"/>
- <pt x="182" y="123" on="1"/>
- <pt x="513" y="543" on="1"/>
- <pt x="182" y="962" on="1"/>
- <pt x="59" y="962" on="1"/>
- <pt x="59" y="1086" on="1"/>
- <pt x="497" y="1086" on="1"/>
- <pt x="497" y="962" on="1"/>
- <pt x="410" y="962" on="1"/>
- <pt x="671" y="631" on="1"/>
- <pt x="931" y="962" on="1"/>
- <pt x="828" y="962" on="1"/>
- <pt x="828" y="1086" on="1"/>
- <pt x="1189" y="1086" on="1"/>
- <pt x="1189" y="962" on="1"/>
- <pt x="1072" y="962" on="1"/>
- <pt x="741" y="542" on="1"/>
- <pt x="1071" y="123" on="1"/>
- <pt x="1189" y="123" on="1"/>
- <pt x="1189" y="0" on="1"/>
- <pt x="744" y="0" on="1"/>
- <pt x="744" y="123" on="1"/>
- <pt x="843" y="123" on="1"/>
- <pt x="590" y="444" on="1"/>
- <pt x="338" y="123" on="1"/>
- <pt x="438" y="123" on="1"/>
- <pt x="438" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 26 25 24 23 22 19 18 17 16 15 12 11 10 9 8 5 4 3 2 1 20 6 0 3 27
- 21 20 0 3 0 14 13 7 6 1 3 14 27 26 25 24 23 22 21 20 19 18 17 16 15
- 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="y" xMin="55" yMin="-395" xMax="1173" yMax="1086">
- <contour>
- <pt x="514" y="0" on="1"/>
- <pt x="129" y="962" on="1"/>
- <pt x="55" y="962" on="1"/>
- <pt x="55" y="1086" on="1"/>
- <pt x="502" y="1086" on="1"/>
- <pt x="502" y="962" on="1"/>
- <pt x="342" y="962" on="1"/>
- <pt x="653" y="184" on="1"/>
- <pt x="655" y="184" on="1"/>
- <pt x="966" y="962" on="1"/>
- <pt x="806" y="962" on="1"/>
- <pt x="806" y="1086" on="1"/>
- <pt x="1173" y="1086" on="1"/>
- <pt x="1173" y="962" on="1"/>
- <pt x="1099" y="962" on="1"/>
- <pt x="714" y="0" on="1"/>
- <pt x="606" y="-271" on="1"/>
- <pt x="754" y="-271" on="1"/>
- <pt x="754" y="-395" on="1"/>
- <pt x="275" y="-395" on="1"/>
- <pt x="275" y="-271" on="1"/>
- <pt x="473" y="-271" on="1"/>
- <pt x="581" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 1 8 7 2 1 2 3 0 1 22 0 2 2 16 3 0 0 0 14 13 10 9 6 5 2
- 1 6 7 3 21 20 17 16 6 3 18 2 4 48 200 19 18 1 0 12 11 4 3 1 3
- 14 22 21 20 19 18 17 16 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="yacute" xMin="55" yMin="-395" xMax="1173" yMax="1604">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="139" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ycircumflex" xMin="55" yMin="-395" xMax="1173" yMax="1604">
- <contour>
- <pt x="514" y="0" on="1"/>
- <pt x="129" y="962" on="1"/>
- <pt x="55" y="962" on="1"/>
- <pt x="55" y="1086" on="1"/>
- <pt x="502" y="1086" on="1"/>
- <pt x="502" y="962" on="1"/>
- <pt x="342" y="962" on="1"/>
- <pt x="653" y="184" on="1"/>
- <pt x="655" y="184" on="1"/>
- <pt x="966" y="962" on="1"/>
- <pt x="806" y="962" on="1"/>
- <pt x="806" y="1086" on="1"/>
- <pt x="1173" y="1086" on="1"/>
- <pt x="1173" y="962" on="1"/>
- <pt x="1099" y="962" on="1"/>
- <pt x="714" y="0" on="1"/>
- <pt x="606" y="-271" on="1"/>
- <pt x="754" y="-271" on="1"/>
- <pt x="754" y="-395" on="1"/>
- <pt x="275" y="-395" on="1"/>
- <pt x="275" y="-271" on="1"/>
- <pt x="473" y="-271" on="1"/>
- <pt x="581" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="288" y="1283" on="1"/>
- <pt x="544" y="1604" on="1"/>
- <pt x="763" y="1604" on="1"/>
- <pt x="1019" y="1283" on="1"/>
- <pt x="896" y="1283" on="1"/>
- <pt x="655" y="1485" on="1"/>
- <pt x="652" y="1485" on="1"/>
- <pt x="411" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 30 29 28 27 26 23 6 24 3 3 1 8 7 2 1 2 3 0 1 22 0 2 2 16 3
- 0 0 0 14 13 10 9 6 5 2 1 6 7 3 21 20 17 16 6 3 18 2 4 48 200
- 25 24 1 19 18 1 2 0 12 11 4 3 1 3 14 30 29 28 27 26 25 24 23 22 21
- 20 19 18 17 16 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ydieresis" xMin="55" yMin="-395" xMax="1173" yMax="1480">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="40" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="yen" xMin="49" yMin="0" xMax="1179" yMax="1480">
- <contour>
- <pt x="294" y="0" on="1"/>
- <pt x="294" y="123" on="1"/>
- <pt x="516" y="123" on="1"/>
- <pt x="516" y="407" on="1"/>
- <pt x="171" y="407" on="1"/>
- <pt x="171" y="531" on="1"/>
- <pt x="516" y="531" on="1"/>
- <pt x="516" y="660" on="1"/>
- <pt x="470" y="740" on="1"/>
- <pt x="171" y="740" on="1"/>
- <pt x="171" y="864" on="1"/>
- <pt x="400" y="864" on="1"/>
- <pt x="115" y="1357" on="1"/>
- <pt x="49" y="1357" on="1"/>
- <pt x="49" y="1480" on="1"/>
- <pt x="490" y="1480" on="1"/>
- <pt x="490" y="1357" on="1"/>
- <pt x="341" y="1357" on="1"/>
- <pt x="656" y="813" on="1"/>
- <pt x="658" y="813" on="1"/>
- <pt x="973" y="1357" on="1"/>
- <pt x="825" y="1357" on="1"/>
- <pt x="825" y="1480" on="1"/>
- <pt x="1179" y="1480" on="1"/>
- <pt x="1179" y="1357" on="1"/>
- <pt x="1115" y="1357" on="1"/>
- <pt x="830" y="864" on="1"/>
- <pt x="1059" y="864" on="1"/>
- <pt x="1059" y="740" on="1"/>
- <pt x="759" y="740" on="1"/>
- <pt x="713" y="661" on="1"/>
- <pt x="713" y="531" on="1"/>
- <pt x="1059" y="531" on="1"/>
- <pt x="1059" y="407" on="1"/>
- <pt x="713" y="407" on="1"/>
- <pt x="713" y="123" on="1"/>
- <pt x="935" y="123" on="1"/>
- <pt x="935" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 131 values pushed */
- 19 18 2 10 8 3 30 7 2 8 5 3 0 0 25 24 21 20 17 16 13 12 6 7 14
- 29 28 9 8 6 3 10 32 31 6 5 6 3 3 36 35 2 1 6 3 0 4 4 48 200
- 27 26 11 10 3 34 33 4 3 3 37 0 1 3 0 23 22 15 14 0 3 14 19 18 2
- 30 2 3 37 36 33 32 29 28 27 26 25 24 23 22 21 20 14 13 30 17 16 15 14 13
- 12 11 10 9 8 5 4 1 0 14 13 2 0 0 35 34 31 30 10 3 2 1 4 48 200
- 7 6 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="z" xMin="123" yMin="0" xMax="1093" yMax="1086">
- <contour>
- <pt x="123" y="0" on="1"/>
- <pt x="123" y="142" on="1"/>
- <pt x="818" y="962" on="1"/>
- <pt x="283" y="962" on="1"/>
- <pt x="283" y="765" on="1"/>
- <pt x="160" y="765" on="1"/>
- <pt x="160" y="1086" on="1"/>
- <pt x="1056" y="1086" on="1"/>
- <pt x="1056" y="962" on="1"/>
- <pt x="361" y="142" on="1"/>
- <pt x="969" y="142" on="1"/>
- <pt x="969" y="345" on="1"/>
- <pt x="1093" y="345" on="1"/>
- <pt x="1093" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 12 11 5 4 4 2 1 3 0 0 8 3 2 6 2 6 10 9 1 7 2 0 2 4 48
- 200 13 0 1 0 7 6 1 14 8 7 2 12 10 3 9 2 2 10 3 3 0 0 11 10
- 6 1 12 4 3 6 1 5 2 4 48 200 13 12 1 6 5 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="zacute" xMin="123" yMin="0" xMax="1093" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="93" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zcaron" xMin="123" yMin="0" xMax="1093" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="-6" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zdotaccent" xMin="123" yMin="0" xMax="1093" yMax="1480">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="-7" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zero" xMin="96" yMin="-37" xMax="1132" yMax="1517">
- <contour>
- <pt x="614" y="1517" on="1"/>
- <pt x="854" y="1517" on="0"/>
- <pt x="993" y="1309" on="1"/>
- <pt x="1132" y="1102" on="0"/>
- <pt x="1132" y="742" on="1"/>
- <pt x="1132" y="376" on="0"/>
- <pt x="993" y="170" on="1"/>
- <pt x="854" y="-37" on="0"/>
- <pt x="606" y="-37" on="1"/>
- <pt x="395" y="-37" on="0"/>
- <pt x="263" y="132" on="1"/>
- <pt x="96" y="346" on="0"/>
- <pt x="96" y="741" on="1"/>
- <pt x="96" y="1102" on="0"/>
- <pt x="235" y="1309" on="1"/>
- <pt x="374" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="614" y="1394" on="1"/>
- <pt x="467" y="1394" on="0"/>
- <pt x="388" y="1224" on="1"/>
- <pt x="309" y="1053" on="0"/>
- <pt x="309" y="742" on="1"/>
- <pt x="309" y="431" on="0"/>
- <pt x="388" y="258" on="1"/>
- <pt x="466" y="86" on="0"/>
- <pt x="613" y="86" on="1"/>
- <pt x="920" y="86" on="0"/>
- <pt x="920" y="740" on="1"/>
- <pt x="920" y="1057" on="0"/>
- <pt x="841" y="1225" on="1"/>
- <pt x="761" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 5 8 16 5 0 48 200 8 2 0 0 14 0 0 26 39 4 20 39 12 48 200
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- </glyf>
-
- <name>
- <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
- Luxi Mono
- </namerecord>
- <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
- Luxi Mono Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
- Luxi Mono Regular
- </namerecord>
- <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
- LuxiMono
- </namerecord>
- <namerecord nameID="7" platformID="1" platEncID="0" langID="0x0">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="1" platEncID="0" langID="0x0">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="1" platEncID="0" langID="0x0">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="1" platEncID="0" langID="0x0">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="1" platEncID="0" langID="0x0">
- design@bigelowandholmes.com
- </namerecord>
- <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Luxi Mono
- </namerecord>
- <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
- Luxi Mono Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Luxi Mono Regular
- </namerecord>
- <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
- LuxiMono
- </namerecord>
- <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
- design@bigelowandholmes.com
- </namerecord>
- </name>
-
- <post>
- <formatType value="2.0"/>
- <italicAngle value="0.0"/>
- <underlinePosition value="0"/>
- <underlineThickness value="0"/>
- <isFixedPitch value="1"/>
- <minMemType42 value="0"/>
- <maxMemType42 value="0"/>
- <minMemType1 value="0"/>
- <maxMemType1 value="0"/>
- <psNames>
- <!-- This file uses unique glyph names based on the information
- found in the 'post' table. Since these names might not be unique,
- we have to invent artificial names in case of clashes. In order to
- be able to retain the original information, we need a name to
- ps name mapping for those cases where they differ. That's what
- you see below.
- -->
- <psName name=".notdef#1" psName=".notdef"/>
- <psName name=".notdef#10" psName=".notdef"/>
- <psName name=".notdef#11" psName=".notdef"/>
- <psName name=".notdef#12" psName=".notdef"/>
- <psName name=".notdef#13" psName=".notdef"/>
- <psName name=".notdef#14" psName=".notdef"/>
- <psName name=".notdef#15" psName=".notdef"/>
- <psName name=".notdef#16" psName=".notdef"/>
- <psName name=".notdef#17" psName=".notdef"/>
- <psName name=".notdef#18" psName=".notdef"/>
- <psName name=".notdef#2" psName=".notdef"/>
- <psName name=".notdef#3" psName=".notdef"/>
- <psName name=".notdef#4" psName=".notdef"/>
- <psName name=".notdef#5" psName=".notdef"/>
- <psName name=".notdef#6" psName=".notdef"/>
- <psName name=".notdef#7" psName=".notdef"/>
- <psName name=".notdef#8" psName=".notdef"/>
- <psName name=".notdef#9" psName=".notdef"/>
- <psName name="Euro#1" psName="Euro"/>
- <psName name="fi#1" psName="fi"/>
- <psName name="fl#1" psName="fl"/>
- <psName name="foursuperiour#1" psName="foursuperiour"/>
- <psName name="fraction#1" psName="fraction"/>
- <psName name="hyphen#1" psName="hyphen"/>
- <psName name="macron#1" psName="macron"/>
- <psName name="periodcentered#1" psName="periodcentered"/>
- <psName name="semicolon#1" psName="semicolon"/>
- </psNames>
- <extraNames>
- <!-- following are the name that are not taken from the standard Mac glyph order -->
- <psName name="fraction"/>
- <psName name="fl"/>
- <psName name="Euro"/>
- <psName name="tilde"/>
- <psName name="macron"/>
- <psName name="Euro"/>
- <psName name="sfthyphen"/>
- <psName name="periodcentered"/>
- <psName name="Amacron"/>
- <psName name="amacron"/>
- <psName name="Abreve"/>
- <psName name="abreve"/>
- <psName name="Aogonek"/>
- <psName name="aogonek"/>
- <psName name="Ccircumflex"/>
- <psName name="ccircumflex"/>
- <psName name="Cdotaccent"/>
- <psName name="cdotaccent"/>
- <psName name="Dcaron"/>
- <psName name="dcaron"/>
- <psName name="Dcroat"/>
- <psName name="dcroat"/>
- <psName name="Emacron"/>
- <psName name="emacron"/>
- <psName name="Ebreve"/>
- <psName name="ebreve"/>
- <psName name="Edotaccent"/>
- <psName name="edotaccent"/>
- <psName name="Eogonek"/>
- <psName name="eogonek"/>
- <psName name="Ecaron"/>
- <psName name="ecaron"/>
- <psName name="Gcircumflex"/>
- <psName name="gcircumflex"/>
- <psName name="Gdotaccent"/>
- <psName name="gdotaccent"/>
- <psName name="Gcommaaccent"/>
- <psName name="gcommaaccent"/>
- <psName name="Hcircumflex"/>
- <psName name="hcircumflex"/>
- <psName name="Hbar"/>
- <psName name="hbar"/>
- <psName name="Itilde"/>
- <psName name="itilde"/>
- <psName name="Imacron"/>
- <psName name="imacron"/>
- <psName name="Ibreve"/>
- <psName name="ibreve"/>
- <psName name="Iogonek"/>
- <psName name="iogonek"/>
- <psName name="IJ"/>
- <psName name="ij"/>
- <psName name="Jcircumflex"/>
- <psName name="jcircumflex"/>
- <psName name="Kcommaaccent"/>
- <psName name="kcommaaccent"/>
- <psName name="kgreenlandic"/>
- <psName name="Lacute"/>
- <psName name="lacute"/>
- <psName name="Lcommaaccent"/>
- <psName name="lcommaaccent"/>
- <psName name="Lcaron"/>
- <psName name="lcaron"/>
- <psName name="Ldot"/>
- <psName name="ldot"/>
- <psName name="Nacute"/>
- <psName name="nacute"/>
- <psName name="Ncommaaccent"/>
- <psName name="ncommaaccent"/>
- <psName name="Ncaron"/>
- <psName name="ncaron"/>
- <psName name="napostrophe"/>
- <psName name="Eng"/>
- <psName name="eng"/>
- <psName name="Omacron"/>
- <psName name="omacron"/>
- <psName name="Obreve"/>
- <psName name="obreve"/>
- <psName name="Ohungarumlaut"/>
- <psName name="ohungarumlaut"/>
- <psName name="Racute"/>
- <psName name="racute"/>
- <psName name="Rcommaaccent"/>
- <psName name="rcommaaccent"/>
- <psName name="Rcaron"/>
- <psName name="rcaron"/>
- <psName name="Sacute"/>
- <psName name="sacute"/>
- <psName name="Scircumflex"/>
- <psName name="scircumflex"/>
- <psName name="Tcommaaccent"/>
- <psName name="tcommaaccent"/>
- <psName name="Tcaron"/>
- <psName name="tcaron"/>
- <psName name="Tbar"/>
- <psName name="tbar"/>
- <psName name="Utilde"/>
- <psName name="utilde"/>
- <psName name="Umacron"/>
- <psName name="umacron"/>
- <psName name="Ubreve"/>
- <psName name="ubreve"/>
- <psName name="Uring"/>
- <psName name="uring"/>
- <psName name="Uhungarumlaut"/>
- <psName name="uhungarumlaut"/>
- <psName name="Uogonek"/>
- <psName name="uogonek"/>
- <psName name="Wcircumflex"/>
- <psName name="wcircumflex"/>
- <psName name="Ycircumflex"/>
- <psName name="ycircumflex"/>
- <psName name="Zacute"/>
- <psName name="zacute"/>
- <psName name="Zdotaccent"/>
- <psName name="zdotaccent"/>
- <psName name="longs"/>
- <psName name="Scommaaccent"/>
- <psName name="scommaaccent"/>
- <psName name="Tcommabelow"/>
- <psName name="tcommabelow"/>
- <psName name="Unterkomma"/>
- <psName name="semicolon"/>
- <psName name="anoteleia"/>
- <psName name="hyphen"/>
- <psName name="nbhyphen"/>
- <psName name="figuredash"/>
- <psName name="afii00208"/>
- <psName name="quotereversed"/>
- <psName name="radicalex"/>
- <psName name="estimated"/>
- <psName name="dotmath"/>
- <psName name="fi"/>
- <psName name="fl"/>
- <psName name="foursuperiour"/>
- <psName name="onesuperiour"/>
- <psName name="twosuperiour"/>
- <psName name="threesuperiour"/>
- <psName name="foursuperiour"/>
- <psName name="dotlessj"/>
- </extraNames>
- </post>
-
- <gasp>
- <gaspRange rangeMaxPPEM="8" rangeGaspBehavior="2"/>
- <gaspRange rangeMaxPPEM="16" rangeGaspBehavior="1"/>
- <gaspRange rangeMaxPPEM="65535" rangeGaspBehavior="3"/>
- </gasp>
-
- <vhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="432"/>
- <lineGap value="0"/>
- <advanceHeightMax value="2465"/>
- <minTopSideBearing value="0"/>
- <minBottomSideBearing value="0"/>
- <yMaxExtent value="2465"/>
- <caretSlopeRise value="0"/>
- <caretSlopeRun value="1"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <reserved4 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfVMetrics value="395"/>
- </vhea>
-
- <vmtx>
- <mtx name=".notdef" height="2465" tsb="553"/>
- <mtx name=".notdef#1" height="0" tsb="0"/>
- <mtx name=".notdef#10" height="2465" tsb="0"/>
- <mtx name=".notdef#11" height="2465" tsb="0"/>
- <mtx name=".notdef#12" height="2465" tsb="0"/>
- <mtx name=".notdef#13" height="2465" tsb="0"/>
- <mtx name=".notdef#14" height="2465" tsb="0"/>
- <mtx name=".notdef#15" height="2465" tsb="0"/>
- <mtx name=".notdef#16" height="1229" tsb="0"/>
- <mtx name=".notdef#17" height="2465" tsb="0"/>
- <mtx name=".notdef#18" height="2465" tsb="0"/>
- <mtx name=".notdef#2" height="2465" tsb="0"/>
- <mtx name=".notdef#3" height="2465" tsb="0"/>
- <mtx name=".notdef#4" height="2465" tsb="0"/>
- <mtx name=".notdef#5" height="2465" tsb="0"/>
- <mtx name=".notdef#6" height="2465" tsb="0"/>
- <mtx name=".notdef#7" height="2465" tsb="0"/>
- <mtx name=".notdef#8" height="2465" tsb="0"/>
- <mtx name=".notdef#9" height="2465" tsb="0"/>
- <mtx name="A" height="2465" tsb="553"/>
- <mtx name="AE" height="2465" tsb="553"/>
- <mtx name="Aacute" height="2465" tsb="108"/>
- <mtx name="Abreve" height="2465" tsb="108"/>
- <mtx name="Acircumflex" height="2465" tsb="108"/>
- <mtx name="Adieresis" height="2465" tsb="232"/>
- <mtx name="Agrave" height="2465" tsb="108"/>
- <mtx name="Amacron" height="2465" tsb="305"/>
- <mtx name="Aogonek" height="2465" tsb="553"/>
- <mtx name="Aring" height="2465" tsb="98"/>
- <mtx name="Atilde" height="2465" tsb="194"/>
- <mtx name="B" height="2465" tsb="553"/>
- <mtx name="C" height="2465" tsb="516"/>
- <mtx name="Cacute" height="2465" tsb="108"/>
- <mtx name="Ccaron" height="2465" tsb="108"/>
- <mtx name="Ccedilla" height="2465" tsb="516"/>
- <mtx name="Ccircumflex" height="2465" tsb="108"/>
- <mtx name="Cdotaccent" height="2465" tsb="232"/>
- <mtx name="D" height="2465" tsb="553"/>
- <mtx name="Dcaron" height="2465" tsb="108"/>
- <mtx name="Dcroat" height="2465" tsb="553"/>
- <mtx name="E" height="2465" tsb="553"/>
- <mtx name="Eacute" height="2465" tsb="108"/>
- <mtx name="Ebreve" height="2465" tsb="108"/>
- <mtx name="Ecaron" height="2465" tsb="108"/>
- <mtx name="Ecircumflex" height="2465" tsb="108"/>
- <mtx name="Edieresis" height="2465" tsb="232"/>
- <mtx name="Edotaccent" height="2465" tsb="232"/>
- <mtx name="Egrave" height="2465" tsb="108"/>
- <mtx name="Emacron" height="2465" tsb="305"/>
- <mtx name="Eng" height="2465" tsb="553"/>
- <mtx name="Eogonek" height="2465" tsb="553"/>
- <mtx name="Eth" height="2465" tsb="553"/>
- <mtx name="Euro" height="2465" tsb="516"/>
- <mtx name="Euro#1" height="2465" tsb="516"/>
- <mtx name="F" height="2465" tsb="553"/>
- <mtx name="G" height="2465" tsb="515"/>
- <mtx name="Gbreve" height="2465" tsb="108"/>
- <mtx name="Gcircumflex" height="2465" tsb="108"/>
- <mtx name="Gcommaaccent" height="2465" tsb="515"/>
- <mtx name="Gdotaccent" height="2465" tsb="232"/>
- <mtx name="H" height="2465" tsb="553"/>
- <mtx name="Hbar" height="2465" tsb="553"/>
- <mtx name="Hcircumflex" height="2465" tsb="108"/>
- <mtx name="I" height="2465" tsb="553"/>
- <mtx name="IJ" height="2465" tsb="553"/>
- <mtx name="Iacute" height="2465" tsb="108"/>
- <mtx name="Ibreve" height="2465" tsb="108"/>
- <mtx name="Icircumflex" height="2465" tsb="108"/>
- <mtx name="Idieresis" height="2465" tsb="232"/>
- <mtx name="Idotaccent" height="2465" tsb="232"/>
- <mtx name="Igrave" height="2465" tsb="108"/>
- <mtx name="Imacron" height="2465" tsb="305"/>
- <mtx name="Iogonek" height="2465" tsb="553"/>
- <mtx name="Itilde" height="2465" tsb="194"/>
- <mtx name="J" height="2465" tsb="553"/>
- <mtx name="Jcircumflex" height="2465" tsb="108"/>
- <mtx name="K" height="2465" tsb="553"/>
- <mtx name="Kcommaaccent" height="2465" tsb="553"/>
- <mtx name="L" height="2465" tsb="553"/>
- <mtx name="Lacute" height="2465" tsb="108"/>
- <mtx name="Lcaron" height="2465" tsb="553"/>
- <mtx name="Lcommaaccent" height="2465" tsb="553"/>
- <mtx name="Ldot" height="2465" tsb="553"/>
- <mtx name="Lslash" height="2465" tsb="553"/>
- <mtx name="M" height="2465" tsb="553"/>
- <mtx name="N" height="2465" tsb="553"/>
- <mtx name="Nacute" height="2465" tsb="108"/>
- <mtx name="Ncaron" height="2465" tsb="108"/>
- <mtx name="Ncommaaccent" height="2465" tsb="553"/>
- <mtx name="Ntilde" height="2465" tsb="194"/>
- <mtx name="O" height="2465" tsb="516"/>
- <mtx name="OE" height="2465" tsb="515"/>
- <mtx name="Oacute" height="2465" tsb="108"/>
- <mtx name="Obreve" height="2465" tsb="108"/>
- <mtx name="Ocircumflex" height="2465" tsb="108"/>
- <mtx name="Odieresis" height="2465" tsb="232"/>
- <mtx name="Ograve" height="2465" tsb="108"/>
- <mtx name="Ohungarumlaut" height="2465" tsb="108"/>
- <mtx name="Omacron" height="2465" tsb="305"/>
- <mtx name="Oslash" height="2465" tsb="516"/>
- <mtx name="Otilde" height="2465" tsb="194"/>
- <mtx name="P" height="2465" tsb="553"/>
- <mtx name="Q" height="2465" tsb="516"/>
- <mtx name="R" height="2465" tsb="553"/>
- <mtx name="Racute" height="2465" tsb="108"/>
- <mtx name="Rcaron" height="2465" tsb="108"/>
- <mtx name="Rcommaaccent" height="2465" tsb="553"/>
- <mtx name="S" height="2465" tsb="516"/>
- <mtx name="Sacute" height="2465" tsb="108"/>
- <mtx name="Scaron" height="2465" tsb="108"/>
- <mtx name="Scedilla" height="2465" tsb="516"/>
- <mtx name="Scircumflex" height="2465" tsb="108"/>
- <mtx name="Scommaaccent" height="2465" tsb="516"/>
- <mtx name="T" height="2465" tsb="553"/>
- <mtx name="Tbar" height="2465" tsb="553"/>
- <mtx name="Tcaron" height="2465" tsb="108"/>
- <mtx name="Tcommaaccent" height="2465" tsb="553"/>
- <mtx name="Tcommabelow" height="2465" tsb="553"/>
- <mtx name="Thorn" height="2465" tsb="553"/>
- <mtx name="U" height="2465" tsb="553"/>
- <mtx name="Uacute" height="2465" tsb="108"/>
- <mtx name="Ubreve" height="2465" tsb="108"/>
- <mtx name="Ucircumflex" height="2465" tsb="108"/>
- <mtx name="Udieresis" height="2465" tsb="232"/>
- <mtx name="Ugrave" height="2465" tsb="108"/>
- <mtx name="Uhungarumlaut" height="2465" tsb="108"/>
- <mtx name="Umacron" height="2465" tsb="305"/>
- <mtx name="Unterkomma" height="2465" tsb="2144"/>
- <mtx name="Uogonek" height="2465" tsb="553"/>
- <mtx name="Uring" height="2465" tsb="0"/>
- <mtx name="Utilde" height="2465" tsb="194"/>
- <mtx name="V" height="2465" tsb="553"/>
- <mtx name="W" height="2465" tsb="553"/>
- <mtx name="Wcircumflex" height="2465" tsb="108"/>
- <mtx name="X" height="2465" tsb="553"/>
- <mtx name="Y" height="2465" tsb="553"/>
- <mtx name="Yacute" height="2465" tsb="108"/>
- <mtx name="Ycircumflex" height="2465" tsb="108"/>
- <mtx name="Ydieresis" height="2465" tsb="232"/>
- <mtx name="Z" height="2465" tsb="553"/>
- <mtx name="Zacute" height="2465" tsb="108"/>
- <mtx name="Zcaron" height="2465" tsb="108"/>
- <mtx name="Zdotaccent" height="2465" tsb="232"/>
- <mtx name="a" height="2465" tsb="922"/>
- <mtx name="aacute" height="2465" tsb="429"/>
- <mtx name="abreve" height="2465" tsb="454"/>
- <mtx name="acircumflex" height="2465" tsb="429"/>
- <mtx name="acute" height="2465" tsb="429"/>
- <mtx name="adieresis" height="2465" tsb="553"/>
- <mtx name="ae" height="2465" tsb="923"/>
- <mtx name="afii00208" height="2465" tsb="1367"/>
- <mtx name="agrave" height="2465" tsb="429"/>
- <mtx name="amacron" height="2465" tsb="626"/>
- <mtx name="ampersand" height="2465" tsb="515"/>
- <mtx name="anoteleia" height="2465" tsb="1367"/>
- <mtx name="aogonek" height="2465" tsb="922"/>
- <mtx name="aring" height="2465" tsb="296"/>
- <mtx name="asciicircum" height="2465" tsb="553"/>
- <mtx name="asciitilde" height="2465" tsb="1261"/>
- <mtx name="asterisk" height="2465" tsb="553"/>
- <mtx name="at" height="2465" tsb="516"/>
- <mtx name="atilde" height="2465" tsb="515"/>
- <mtx name="b" height="2465" tsb="454"/>
- <mtx name="backslash" height="2465" tsb="454"/>
- <mtx name="bar" height="2465" tsb="454"/>
- <mtx name="braceleft" height="2465" tsb="454"/>
- <mtx name="braceright" height="2465" tsb="454"/>
- <mtx name="bracketleft" height="2465" tsb="454"/>
- <mtx name="bracketright" height="2465" tsb="454"/>
- <mtx name="breve" height="2465" tsb="454"/>
- <mtx name="brokenbar" height="2465" tsb="454"/>
- <mtx name="bullet" height="2465" tsb="923"/>
- <mtx name="c" height="2465" tsb="923"/>
- <mtx name="cacute" height="2465" tsb="429"/>
- <mtx name="caron" height="2465" tsb="429"/>
- <mtx name="ccaron" height="2465" tsb="429"/>
- <mtx name="ccedilla" height="2465" tsb="923"/>
- <mtx name="ccircumflex" height="2465" tsb="429"/>
- <mtx name="cdotaccent" height="2465" tsb="553"/>
- <mtx name="cedilla" height="2465" tsb="2033"/>
- <mtx name="cent" height="2465" tsb="553"/>
- <mtx name="circumflex" height="2465" tsb="429"/>
- <mtx name="colon" height="2465" tsb="947"/>
- <mtx name="comma" height="2465" tsb="1737"/>
- <mtx name="copyright" height="2465" tsb="516"/>
- <mtx name="currency" height="2465" tsb="833"/>
- <mtx name="d" height="2465" tsb="454"/>
- <mtx name="dagger" height="2465" tsb="553"/>
- <mtx name="daggerdbl" height="2465" tsb="553"/>
- <mtx name="dcaron" height="2465" tsb="454"/>
- <mtx name="dcroat" height="2465" tsb="454"/>
- <mtx name="degree" height="2465" tsb="516"/>
- <mtx name="dieresis" height="2465" tsb="553"/>
- <mtx name="divide" height="2465" tsb="799"/>
- <mtx name="dollar" height="2465" tsb="429"/>
- <mtx name="dotaccent" height="2465" tsb="553"/>
- <mtx name="dotlessi" height="2465" tsb="947"/>
- <mtx name="dotlessj" height="2465" tsb="947"/>
- <mtx name="dotmath" height="2465" tsb="1367"/>
- <mtx name="e" height="2465" tsb="923"/>
- <mtx name="eacute" height="2465" tsb="429"/>
- <mtx name="ebreve" height="2465" tsb="454"/>
- <mtx name="ecaron" height="2465" tsb="429"/>
- <mtx name="ecircumflex" height="2465" tsb="429"/>
- <mtx name="edieresis" height="2465" tsb="553"/>
- <mtx name="edotaccent" height="2465" tsb="553"/>
- <mtx name="egrave" height="2465" tsb="429"/>
- <mtx name="eight" height="2465" tsb="516"/>
- <mtx name="ellipsis" height="2465" tsb="1786"/>
- <mtx name="emacron" height="2465" tsb="626"/>
- <mtx name="emdash" height="2465" tsb="1367"/>
- <mtx name="endash" height="2465" tsb="1342"/>
- <mtx name="eng" height="2465" tsb="923"/>
- <mtx name="eogonek" height="2465" tsb="923"/>
- <mtx name="equal" height="2465" tsb="1145"/>
- <mtx name="estimated" height="2465" tsb="923"/>
- <mtx name="eth" height="2465" tsb="419"/>
- <mtx name="exclam" height="2465" tsb="553"/>
- <mtx name="exclamdown" height="2465" tsb="947"/>
- <mtx name="f" height="2465" tsb="429"/>
- <mtx name="fi" height="2465" tsb="429"/>
- <mtx name="fi#1" height="2465" tsb="429"/>
- <mtx name="figuredash" height="2465" tsb="1342"/>
- <mtx name="five" height="2465" tsb="553"/>
- <mtx name="fl" height="2465" tsb="429"/>
- <mtx name="fl#1" height="2465" tsb="429"/>
- <mtx name="florin" height="2465" tsb="516"/>
- <mtx name="four" height="2465" tsb="553"/>
- <mtx name="foursuperiour" height="2465" tsb="516"/>
- <mtx name="foursuperiour#1" height="2465" tsb="516"/>
- <mtx name="fraction" height="2465" tsb="516"/>
- <mtx name="fraction#1" height="2465" tsb="516"/>
- <mtx name="g" height="2465" tsb="922"/>
- <mtx name="gbreve" height="2465" tsb="454"/>
- <mtx name="gcircumflex" height="2465" tsb="429"/>
- <mtx name="gcommaaccent" height="2465" tsb="296"/>
- <mtx name="gdotaccent" height="2465" tsb="553"/>
- <mtx name="germandbls" height="2465" tsb="429"/>
- <mtx name="grave" height="2465" tsb="429"/>
- <mtx name="greater" height="2465" tsb="799"/>
- <mtx name="guillemotleft" height="2465" tsb="1046"/>
- <mtx name="guillemotright" height="2465" tsb="1046"/>
- <mtx name="guilsinglleft" height="2465" tsb="1046"/>
- <mtx name="guilsinglright" height="2465" tsb="1046"/>
- <mtx name="h" height="2465" tsb="454"/>
- <mtx name="hbar" height="2465" tsb="454"/>
- <mtx name="hcircumflex" height="2465" tsb="34"/>
- <mtx name="hungarumlaut" height="2465" tsb="429"/>
- <mtx name="hyphen" height="2465" tsb="1342"/>
- <mtx name="hyphen#1" height="2465" tsb="1342"/>
- <mtx name="i" height="2465" tsb="454"/>
- <mtx name="iacute" height="2465" tsb="429"/>
- <mtx name="ibreve" height="2465" tsb="454"/>
- <mtx name="icircumflex" height="2465" tsb="429"/>
- <mtx name="idieresis" height="2465" tsb="553"/>
- <mtx name="igrave" height="2465" tsb="429"/>
- <mtx name="ij" height="2465" tsb="454"/>
- <mtx name="imacron" height="2465" tsb="626"/>
- <mtx name="iogonek" height="2465" tsb="454"/>
- <mtx name="itilde" height="2465" tsb="515"/>
- <mtx name="j" height="2465" tsb="454"/>
- <mtx name="jcircumflex" height="2465" tsb="429"/>
- <mtx name="k" height="2465" tsb="454"/>
- <mtx name="kcommaaccent" height="2465" tsb="454"/>
- <mtx name="kgreenlandic" height="2465" tsb="947"/>
- <mtx name="l" height="2465" tsb="454"/>
- <mtx name="lacute" height="2465" tsb="34"/>
- <mtx name="lcaron" height="2465" tsb="454"/>
- <mtx name="lcommaaccent" height="2465" tsb="454"/>
- <mtx name="ldot" height="2465" tsb="454"/>
- <mtx name="less" height="2465" tsb="799"/>
- <mtx name="logicalnot" height="2465" tsb="1342"/>
- <mtx name="longs" height="2465" tsb="429"/>
- <mtx name="lslash" height="2465" tsb="454"/>
- <mtx name="m" height="2465" tsb="923"/>
- <mtx name="macron" height="2465" tsb="626"/>
- <mtx name="macron#1" height="2465" tsb="429"/>
- <mtx name="minus" height="2465" tsb="1342"/>
- <mtx name="mu" height="2465" tsb="947"/>
- <mtx name="multiply" height="2465" tsb="1001"/>
- <mtx name="n" height="2465" tsb="923"/>
- <mtx name="nacute" height="2465" tsb="429"/>
- <mtx name="napostrophe" height="2465" tsb="454"/>
- <mtx name="nbhyphen" height="2465" tsb="1342"/>
- <mtx name="ncaron" height="2465" tsb="429"/>
- <mtx name="ncommaaccent" height="2465" tsb="923"/>
- <mtx name="nine" height="2465" tsb="516"/>
- <mtx name="nonbreakingspace" height="2465" tsb="2033"/>
- <mtx name="ntilde" height="2465" tsb="515"/>
- <mtx name="numbersign" height="2465" tsb="553"/>
- <mtx name="o" height="2465" tsb="923"/>
- <mtx name="oacute" height="2465" tsb="429"/>
- <mtx name="obreve" height="2465" tsb="454"/>
- <mtx name="ocircumflex" height="2465" tsb="429"/>
- <mtx name="odieresis" height="2465" tsb="553"/>
- <mtx name="oe" height="2465" tsb="922"/>
- <mtx name="ogonek" height="2465" tsb="2033"/>
- <mtx name="ograve" height="2465" tsb="429"/>
- <mtx name="ohungarumlaut" height="2465" tsb="429"/>
- <mtx name="omacron" height="2465" tsb="626"/>
- <mtx name="one" height="2465" tsb="516"/>
- <mtx name="onehalf" height="2465" tsb="516"/>
- <mtx name="onequarter" height="2465" tsb="516"/>
- <mtx name="onesuperior" height="2465" tsb="516"/>
- <mtx name="onesuperiour" height="2465" tsb="516"/>
- <mtx name="ordfeminine" height="2465" tsb="516"/>
- <mtx name="ordmasculine" height="2465" tsb="516"/>
- <mtx name="oslash" height="2465" tsb="923"/>
- <mtx name="otilde" height="2465" tsb="515"/>
- <mtx name="p" height="2465" tsb="923"/>
- <mtx name="paragraph" height="2465" tsb="540"/>
- <mtx name="parenleft" height="2465" tsb="454"/>
- <mtx name="parenright" height="2465" tsb="454"/>
- <mtx name="percent" height="2465" tsb="516"/>
- <mtx name="period" height="2465" tsb="1737"/>
- <mtx name="periodcentered" height="2465" tsb="1367"/>
- <mtx name="periodcentered#1" height="2465" tsb="1367"/>
- <mtx name="perthousand" height="2465" tsb="553"/>
- <mtx name="plus" height="2465" tsb="900"/>
- <mtx name="plusminus" height="2465" tsb="799"/>
- <mtx name="q" height="2465" tsb="923"/>
- <mtx name="question" height="2465" tsb="516"/>
- <mtx name="questiondown" height="2465" tsb="947"/>
- <mtx name="quotedbl" height="2465" tsb="454"/>
- <mtx name="quotedblbase" height="2465" tsb="1786"/>
- <mtx name="quotedblleft" height="2465" tsb="454"/>
- <mtx name="quotedblright" height="2465" tsb="454"/>
- <mtx name="quoteleft" height="2465" tsb="454"/>
- <mtx name="quotereversed" height="2465" tsb="2033"/>
- <mtx name="quoteright" height="2465" tsb="454"/>
- <mtx name="quotesinglbase" height="2465" tsb="1737"/>
- <mtx name="quotesingle" height="2465" tsb="454"/>
- <mtx name="r" height="2465" tsb="923"/>
- <mtx name="racute" height="2465" tsb="429"/>
- <mtx name="radicalex" height="2465" tsb="429"/>
- <mtx name="rcaron" height="2465" tsb="429"/>
- <mtx name="rcommaaccent" height="2465" tsb="923"/>
- <mtx name="registered" height="2465" tsb="516"/>
- <mtx name="ring" height="2465" tsb="296"/>
- <mtx name="s" height="2465" tsb="922"/>
- <mtx name="sacute" height="2465" tsb="429"/>
- <mtx name="scaron" height="2465" tsb="429"/>
- <mtx name="scedilla" height="2465" tsb="922"/>
- <mtx name="scircumflex" height="2465" tsb="429"/>
- <mtx name="scommaaccent" height="2465" tsb="922"/>
- <mtx name="section" height="2465" tsb="515"/>
- <mtx name="semicolon" height="2465" tsb="947"/>
- <mtx name="semicolon#1" height="2465" tsb="947"/>
- <mtx name="seven" height="2465" tsb="553"/>
- <mtx name="sfthyphen" height="2465" tsb="1342"/>
- <mtx name="six" height="2465" tsb="516"/>
- <mtx name="slash" height="2465" tsb="454"/>
- <mtx name="space" height="2465" tsb="2033"/>
- <mtx name="sterling" height="2465" tsb="516"/>
- <mtx name="t" height="2465" tsb="701"/>
- <mtx name="tbar" height="2465" tsb="701"/>
- <mtx name="tcaron" height="2465" tsb="345"/>
- <mtx name="tcommaaccent" height="2465" tsb="701"/>
- <mtx name="tcommabelow" height="2465" tsb="701"/>
- <mtx name="thorn" height="2465" tsb="454"/>
- <mtx name="three" height="2465" tsb="516"/>
- <mtx name="threequarters" height="2465" tsb="515"/>
- <mtx name="threesuperior" height="2465" tsb="515"/>
- <mtx name="threesuperiour" height="2465" tsb="515"/>
- <mtx name="tilde" height="2465" tsb="515"/>
- <mtx name="trademark" height="2465" tsb="553"/>
- <mtx name="two" height="2465" tsb="516"/>
- <mtx name="twosuperior" height="2465" tsb="515"/>
- <mtx name="twosuperiour" height="2465" tsb="516"/>
- <mtx name="u" height="2465" tsb="947"/>
- <mtx name="uacute" height="2465" tsb="429"/>
- <mtx name="ubreve" height="2465" tsb="454"/>
- <mtx name="ucircumflex" height="2465" tsb="429"/>
- <mtx name="udieresis" height="2465" tsb="553"/>
- <mtx name="ugrave" height="2465" tsb="429"/>
- <mtx name="uhungarumlaut" height="2465" tsb="429"/>
- <mtx name="umacron" height="2465" tsb="626"/>
- <mtx name="underscore" height="2465" tsb="2033"/>
- <mtx name="uogonek" height="2465" tsb="947"/>
- <mtx name="uring" height="2465" tsb="296"/>
- <mtx name="utilde" height="2465" tsb="515"/>
- <mtx name="v" height="2465" tsb="947"/>
- <mtx name="w" height="2465" tsb="947"/>
- <mtx name="wcircumflex" height="2465" tsb="429"/>
- <mtx name="x" height="2465" tsb="947"/>
- <mtx name="y" height="2465" tsb="947"/>
- <mtx name="yacute" height="2465" tsb="429"/>
- <mtx name="ycircumflex" height="2465" tsb="429"/>
- <mtx name="ydieresis" height="2465" tsb="553"/>
- <mtx name="yen" height="2465" tsb="553"/>
- <mtx name="z" height="2465" tsb="947"/>
- <mtx name="zacute" height="2465" tsb="429"/>
- <mtx name="zcaron" height="2465" tsb="429"/>
- <mtx name="zdotaccent" height="2465" tsb="553"/>
- <mtx name="zero" height="2465" tsb="516"/>
- </vmtx>
-
-</ttFont>
diff --git a/vendor/github.com/golang/freetype/testdata/luxirr.ttf b/vendor/github.com/golang/freetype/testdata/luxirr.ttf
deleted file mode 100644
index daa8ad8cc..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxirr.ttf
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/golang/freetype/testdata/luxirr.ttx b/vendor/github.com/golang/freetype/testdata/luxirr.ttx
deleted file mode 100644
index 27191d0a7..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxirr.ttx
+++ /dev/null
@@ -1,30264 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.4">
-
- <GlyphOrder>
- <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
- <GlyphID id="0" name=".notdef"/>
- <GlyphID id="1" name=".notdef#1"/>
- <GlyphID id="2" name=".notdef#2"/>
- <GlyphID id="3" name="space"/>
- <GlyphID id="4" name="exclam"/>
- <GlyphID id="5" name="quotedbl"/>
- <GlyphID id="6" name="numbersign"/>
- <GlyphID id="7" name="dollar"/>
- <GlyphID id="8" name="percent"/>
- <GlyphID id="9" name="ampersand"/>
- <GlyphID id="10" name="quotesingle"/>
- <GlyphID id="11" name="parenleft"/>
- <GlyphID id="12" name="parenright"/>
- <GlyphID id="13" name="asterisk"/>
- <GlyphID id="14" name="plus"/>
- <GlyphID id="15" name="comma"/>
- <GlyphID id="16" name="hyphen"/>
- <GlyphID id="17" name="period"/>
- <GlyphID id="18" name="slash"/>
- <GlyphID id="19" name="zero"/>
- <GlyphID id="20" name="one"/>
- <GlyphID id="21" name="two"/>
- <GlyphID id="22" name="three"/>
- <GlyphID id="23" name="four"/>
- <GlyphID id="24" name="five"/>
- <GlyphID id="25" name="six"/>
- <GlyphID id="26" name="seven"/>
- <GlyphID id="27" name="eight"/>
- <GlyphID id="28" name="nine"/>
- <GlyphID id="29" name="colon"/>
- <GlyphID id="30" name="semicolon"/>
- <GlyphID id="31" name="less"/>
- <GlyphID id="32" name="equal"/>
- <GlyphID id="33" name="greater"/>
- <GlyphID id="34" name="question"/>
- <GlyphID id="35" name="at"/>
- <GlyphID id="36" name="A"/>
- <GlyphID id="37" name="B"/>
- <GlyphID id="38" name="C"/>
- <GlyphID id="39" name="D"/>
- <GlyphID id="40" name="E"/>
- <GlyphID id="41" name="F"/>
- <GlyphID id="42" name="G"/>
- <GlyphID id="43" name="H"/>
- <GlyphID id="44" name="I"/>
- <GlyphID id="45" name="J"/>
- <GlyphID id="46" name="K"/>
- <GlyphID id="47" name="L"/>
- <GlyphID id="48" name="M"/>
- <GlyphID id="49" name="N"/>
- <GlyphID id="50" name="O"/>
- <GlyphID id="51" name="P"/>
- <GlyphID id="52" name="Q"/>
- <GlyphID id="53" name="R"/>
- <GlyphID id="54" name="S"/>
- <GlyphID id="55" name="T"/>
- <GlyphID id="56" name="U"/>
- <GlyphID id="57" name="V"/>
- <GlyphID id="58" name="W"/>
- <GlyphID id="59" name="X"/>
- <GlyphID id="60" name="Y"/>
- <GlyphID id="61" name="Z"/>
- <GlyphID id="62" name="bracketleft"/>
- <GlyphID id="63" name="backslash"/>
- <GlyphID id="64" name="bracketright"/>
- <GlyphID id="65" name="asciicircum"/>
- <GlyphID id="66" name="underscore"/>
- <GlyphID id="67" name="grave"/>
- <GlyphID id="68" name="a"/>
- <GlyphID id="69" name="b"/>
- <GlyphID id="70" name="c"/>
- <GlyphID id="71" name="d"/>
- <GlyphID id="72" name="e"/>
- <GlyphID id="73" name="f"/>
- <GlyphID id="74" name="g"/>
- <GlyphID id="75" name="h"/>
- <GlyphID id="76" name="i"/>
- <GlyphID id="77" name="j"/>
- <GlyphID id="78" name="k"/>
- <GlyphID id="79" name="l"/>
- <GlyphID id="80" name="m"/>
- <GlyphID id="81" name="n"/>
- <GlyphID id="82" name="o"/>
- <GlyphID id="83" name="p"/>
- <GlyphID id="84" name="q"/>
- <GlyphID id="85" name="r"/>
- <GlyphID id="86" name="s"/>
- <GlyphID id="87" name="t"/>
- <GlyphID id="88" name="u"/>
- <GlyphID id="89" name="v"/>
- <GlyphID id="90" name="w"/>
- <GlyphID id="91" name="x"/>
- <GlyphID id="92" name="y"/>
- <GlyphID id="93" name="z"/>
- <GlyphID id="94" name="braceleft"/>
- <GlyphID id="95" name="bar"/>
- <GlyphID id="96" name="braceright"/>
- <GlyphID id="97" name="asciitilde"/>
- <GlyphID id="98" name="Adieresis"/>
- <GlyphID id="99" name="Aring"/>
- <GlyphID id="100" name="Ccedilla"/>
- <GlyphID id="101" name="Eacute"/>
- <GlyphID id="102" name="Ntilde"/>
- <GlyphID id="103" name="Odieresis"/>
- <GlyphID id="104" name="Udieresis"/>
- <GlyphID id="105" name="aacute"/>
- <GlyphID id="106" name="agrave"/>
- <GlyphID id="107" name="acircumflex"/>
- <GlyphID id="108" name="adieresis"/>
- <GlyphID id="109" name="atilde"/>
- <GlyphID id="110" name="aring"/>
- <GlyphID id="111" name="ccedilla"/>
- <GlyphID id="112" name="eacute"/>
- <GlyphID id="113" name="egrave"/>
- <GlyphID id="114" name="ecircumflex"/>
- <GlyphID id="115" name="edieresis"/>
- <GlyphID id="116" name="iacute"/>
- <GlyphID id="117" name="igrave"/>
- <GlyphID id="118" name="icircumflex"/>
- <GlyphID id="119" name="idieresis"/>
- <GlyphID id="120" name="ntilde"/>
- <GlyphID id="121" name="oacute"/>
- <GlyphID id="122" name="ograve"/>
- <GlyphID id="123" name="ocircumflex"/>
- <GlyphID id="124" name="odieresis"/>
- <GlyphID id="125" name="otilde"/>
- <GlyphID id="126" name="uacute"/>
- <GlyphID id="127" name="ugrave"/>
- <GlyphID id="128" name="ucircumflex"/>
- <GlyphID id="129" name="udieresis"/>
- <GlyphID id="130" name="dagger"/>
- <GlyphID id="131" name="degree"/>
- <GlyphID id="132" name="cent"/>
- <GlyphID id="133" name="sterling"/>
- <GlyphID id="134" name="section"/>
- <GlyphID id="135" name="bullet"/>
- <GlyphID id="136" name="paragraph"/>
- <GlyphID id="137" name="germandbls"/>
- <GlyphID id="138" name="registered"/>
- <GlyphID id="139" name="copyright"/>
- <GlyphID id="140" name="trademark"/>
- <GlyphID id="141" name="acute"/>
- <GlyphID id="142" name="dieresis"/>
- <GlyphID id="143" name=".notdef#3"/>
- <GlyphID id="144" name="AE"/>
- <GlyphID id="145" name="Oslash"/>
- <GlyphID id="146" name=".notdef#4"/>
- <GlyphID id="147" name="plusminus"/>
- <GlyphID id="148" name=".notdef#5"/>
- <GlyphID id="149" name=".notdef#6"/>
- <GlyphID id="150" name="yen"/>
- <GlyphID id="151" name="mu"/>
- <GlyphID id="152" name=".notdef#7"/>
- <GlyphID id="153" name=".notdef#8"/>
- <GlyphID id="154" name=".notdef#9"/>
- <GlyphID id="155" name=".notdef#10"/>
- <GlyphID id="156" name=".notdef#11"/>
- <GlyphID id="157" name="ordfeminine"/>
- <GlyphID id="158" name="ordmasculine"/>
- <GlyphID id="159" name=".notdef#12"/>
- <GlyphID id="160" name="ae"/>
- <GlyphID id="161" name="oslash"/>
- <GlyphID id="162" name="questiondown"/>
- <GlyphID id="163" name="exclamdown"/>
- <GlyphID id="164" name="logicalnot"/>
- <GlyphID id="165" name=".notdef#13"/>
- <GlyphID id="166" name="florin"/>
- <GlyphID id="167" name=".notdef#14"/>
- <GlyphID id="168" name=".notdef#15"/>
- <GlyphID id="169" name="guillemotleft"/>
- <GlyphID id="170" name="guillemotright"/>
- <GlyphID id="171" name="ellipsis"/>
- <GlyphID id="172" name=".notdef#16"/>
- <GlyphID id="173" name="Agrave"/>
- <GlyphID id="174" name="Atilde"/>
- <GlyphID id="175" name="Otilde"/>
- <GlyphID id="176" name="OE"/>
- <GlyphID id="177" name="oe"/>
- <GlyphID id="178" name="endash"/>
- <GlyphID id="179" name="emdash"/>
- <GlyphID id="180" name="quotedblleft"/>
- <GlyphID id="181" name="quotedblright"/>
- <GlyphID id="182" name="quoteleft"/>
- <GlyphID id="183" name="quoteright"/>
- <GlyphID id="184" name="divide"/>
- <GlyphID id="185" name=".notdef#17"/>
- <GlyphID id="186" name="ydieresis"/>
- <GlyphID id="187" name="Ydieresis"/>
- <GlyphID id="188" name="fraction"/>
- <GlyphID id="189" name="currency"/>
- <GlyphID id="190" name="guilsinglleft"/>
- <GlyphID id="191" name="guilsinglright"/>
- <GlyphID id="192" name="fi"/>
- <GlyphID id="193" name="fl"/>
- <GlyphID id="194" name="daggerdbl"/>
- <GlyphID id="195" name="periodcentered"/>
- <GlyphID id="196" name="quotesinglbase"/>
- <GlyphID id="197" name="quotedblbase"/>
- <GlyphID id="198" name="perthousand"/>
- <GlyphID id="199" name="Acircumflex"/>
- <GlyphID id="200" name="Ecircumflex"/>
- <GlyphID id="201" name="Aacute"/>
- <GlyphID id="202" name="Edieresis"/>
- <GlyphID id="203" name="Egrave"/>
- <GlyphID id="204" name="Iacute"/>
- <GlyphID id="205" name="Icircumflex"/>
- <GlyphID id="206" name="Idieresis"/>
- <GlyphID id="207" name="Igrave"/>
- <GlyphID id="208" name="Oacute"/>
- <GlyphID id="209" name="Ocircumflex"/>
- <GlyphID id="210" name="Euro"/>
- <GlyphID id="211" name="Ograve"/>
- <GlyphID id="212" name="Uacute"/>
- <GlyphID id="213" name="Ucircumflex"/>
- <GlyphID id="214" name="Ugrave"/>
- <GlyphID id="215" name="dotlessi"/>
- <GlyphID id="216" name="circumflex"/>
- <GlyphID id="217" name="tilde"/>
- <GlyphID id="218" name="macron"/>
- <GlyphID id="219" name="breve"/>
- <GlyphID id="220" name="dotaccent"/>
- <GlyphID id="221" name="ring"/>
- <GlyphID id="222" name="cedilla"/>
- <GlyphID id="223" name="hungarumlaut"/>
- <GlyphID id="224" name="ogonek"/>
- <GlyphID id="225" name="caron"/>
- <GlyphID id="226" name="Euro#1"/>
- <GlyphID id="227" name="nonbreakingspace"/>
- <GlyphID id="228" name="brokenbar"/>
- <GlyphID id="229" name="sfthyphen"/>
- <GlyphID id="230" name="macron#1"/>
- <GlyphID id="231" name="twosuperior"/>
- <GlyphID id="232" name="threesuperior"/>
- <GlyphID id="233" name="periodcentered#1"/>
- <GlyphID id="234" name="onesuperior"/>
- <GlyphID id="235" name="onequarter"/>
- <GlyphID id="236" name="onehalf"/>
- <GlyphID id="237" name="threequarters"/>
- <GlyphID id="238" name="Eth"/>
- <GlyphID id="239" name="multiply"/>
- <GlyphID id="240" name="Yacute"/>
- <GlyphID id="241" name="Thorn"/>
- <GlyphID id="242" name="eth"/>
- <GlyphID id="243" name="yacute"/>
- <GlyphID id="244" name="thorn"/>
- <GlyphID id="245" name="Amacron"/>
- <GlyphID id="246" name="amacron"/>
- <GlyphID id="247" name="Abreve"/>
- <GlyphID id="248" name="abreve"/>
- <GlyphID id="249" name="Aogonek"/>
- <GlyphID id="250" name="aogonek"/>
- <GlyphID id="251" name="Cacute"/>
- <GlyphID id="252" name="cacute"/>
- <GlyphID id="253" name="Ccircumflex"/>
- <GlyphID id="254" name="ccircumflex"/>
- <GlyphID id="255" name="Cdotaccent"/>
- <GlyphID id="256" name="cdotaccent"/>
- <GlyphID id="257" name="Ccaron"/>
- <GlyphID id="258" name="ccaron"/>
- <GlyphID id="259" name="Dcaron"/>
- <GlyphID id="260" name="dcaron"/>
- <GlyphID id="261" name="Dcroat"/>
- <GlyphID id="262" name="dcroat"/>
- <GlyphID id="263" name="Emacron"/>
- <GlyphID id="264" name="emacron"/>
- <GlyphID id="265" name="Ebreve"/>
- <GlyphID id="266" name="ebreve"/>
- <GlyphID id="267" name="Edotaccent"/>
- <GlyphID id="268" name="edotaccent"/>
- <GlyphID id="269" name="Eogonek"/>
- <GlyphID id="270" name="eogonek"/>
- <GlyphID id="271" name="Ecaron"/>
- <GlyphID id="272" name="ecaron"/>
- <GlyphID id="273" name="Gcircumflex"/>
- <GlyphID id="274" name="gcircumflex"/>
- <GlyphID id="275" name="Gbreve"/>
- <GlyphID id="276" name="gbreve"/>
- <GlyphID id="277" name="Gdotaccent"/>
- <GlyphID id="278" name="gdotaccent"/>
- <GlyphID id="279" name="Gcommaaccent"/>
- <GlyphID id="280" name="gcommaaccent"/>
- <GlyphID id="281" name="Hcircumflex"/>
- <GlyphID id="282" name="hcircumflex"/>
- <GlyphID id="283" name="Hbar"/>
- <GlyphID id="284" name="hbar"/>
- <GlyphID id="285" name="Itilde"/>
- <GlyphID id="286" name="itilde"/>
- <GlyphID id="287" name="Imacron"/>
- <GlyphID id="288" name="imacron"/>
- <GlyphID id="289" name="Ibreve"/>
- <GlyphID id="290" name="ibreve"/>
- <GlyphID id="291" name="Iogonek"/>
- <GlyphID id="292" name="iogonek"/>
- <GlyphID id="293" name="Idotaccent"/>
- <GlyphID id="294" name="IJ"/>
- <GlyphID id="295" name="ij"/>
- <GlyphID id="296" name="Jcircumflex"/>
- <GlyphID id="297" name="jcircumflex"/>
- <GlyphID id="298" name="Kcommaaccent"/>
- <GlyphID id="299" name="kcommaaccent"/>
- <GlyphID id="300" name="kgreenlandic"/>
- <GlyphID id="301" name="Lacute"/>
- <GlyphID id="302" name="lacute"/>
- <GlyphID id="303" name="Lcommaaccent"/>
- <GlyphID id="304" name="lcommaaccent"/>
- <GlyphID id="305" name="Lcaron"/>
- <GlyphID id="306" name="lcaron"/>
- <GlyphID id="307" name="Ldot"/>
- <GlyphID id="308" name="ldot"/>
- <GlyphID id="309" name="Lslash"/>
- <GlyphID id="310" name="lslash"/>
- <GlyphID id="311" name="Nacute"/>
- <GlyphID id="312" name="nacute"/>
- <GlyphID id="313" name="Ncommaaccent"/>
- <GlyphID id="314" name="ncommaaccent"/>
- <GlyphID id="315" name="Ncaron"/>
- <GlyphID id="316" name="ncaron"/>
- <GlyphID id="317" name="napostrophe"/>
- <GlyphID id="318" name="Eng"/>
- <GlyphID id="319" name="eng"/>
- <GlyphID id="320" name="Omacron"/>
- <GlyphID id="321" name="omacron"/>
- <GlyphID id="322" name="Obreve"/>
- <GlyphID id="323" name="obreve"/>
- <GlyphID id="324" name="Ohungarumlaut"/>
- <GlyphID id="325" name="ohungarumlaut"/>
- <GlyphID id="326" name="Racute"/>
- <GlyphID id="327" name="racute"/>
- <GlyphID id="328" name="Rcommaaccent"/>
- <GlyphID id="329" name="rcommaaccent"/>
- <GlyphID id="330" name="Rcaron"/>
- <GlyphID id="331" name="rcaron"/>
- <GlyphID id="332" name="Sacute"/>
- <GlyphID id="333" name="sacute"/>
- <GlyphID id="334" name="Scircumflex"/>
- <GlyphID id="335" name="scircumflex"/>
- <GlyphID id="336" name="Scedilla"/>
- <GlyphID id="337" name="scedilla"/>
- <GlyphID id="338" name="Scaron"/>
- <GlyphID id="339" name="scaron"/>
- <GlyphID id="340" name="Tcommaaccent"/>
- <GlyphID id="341" name="tcommaaccent"/>
- <GlyphID id="342" name="Tcaron"/>
- <GlyphID id="343" name="tcaron"/>
- <GlyphID id="344" name="Tbar"/>
- <GlyphID id="345" name="tbar"/>
- <GlyphID id="346" name="Utilde"/>
- <GlyphID id="347" name="utilde"/>
- <GlyphID id="348" name="Umacron"/>
- <GlyphID id="349" name="umacron"/>
- <GlyphID id="350" name="Ubreve"/>
- <GlyphID id="351" name="ubreve"/>
- <GlyphID id="352" name="Uring"/>
- <GlyphID id="353" name="uring"/>
- <GlyphID id="354" name="Uhungarumlaut"/>
- <GlyphID id="355" name="uhungarumlaut"/>
- <GlyphID id="356" name="Uogonek"/>
- <GlyphID id="357" name="uogonek"/>
- <GlyphID id="358" name="Wcircumflex"/>
- <GlyphID id="359" name="wcircumflex"/>
- <GlyphID id="360" name="Ycircumflex"/>
- <GlyphID id="361" name="ycircumflex"/>
- <GlyphID id="362" name="Zacute"/>
- <GlyphID id="363" name="zacute"/>
- <GlyphID id="364" name="Zdotaccent"/>
- <GlyphID id="365" name="zdotaccent"/>
- <GlyphID id="366" name="Zcaron"/>
- <GlyphID id="367" name="zcaron"/>
- <GlyphID id="368" name="longs"/>
- <GlyphID id="369" name="Scommaaccent"/>
- <GlyphID id="370" name="scommaaccent"/>
- <GlyphID id="371" name="Tcommabelow"/>
- <GlyphID id="372" name="tcommabelow"/>
- <GlyphID id="373" name="Unterkomma"/>
- <GlyphID id="374" name="semicolon#1"/>
- <GlyphID id="375" name="anoteleia"/>
- <GlyphID id="376" name="hyphen#1"/>
- <GlyphID id="377" name="nbhyphen"/>
- <GlyphID id="378" name="figuredash"/>
- <GlyphID id="379" name="afii00208"/>
- <GlyphID id="380" name="quotereversed"/>
- <GlyphID id="381" name="radicalex"/>
- <GlyphID id="382" name="estimated"/>
- <GlyphID id="383" name="minus"/>
- <GlyphID id="384" name="fraction#1"/>
- <GlyphID id="385" name="dotmath"/>
- <GlyphID id="386" name="fi#1"/>
- <GlyphID id="387" name="fl#1"/>
- <GlyphID id="388" name="foursuperiour"/>
- <GlyphID id="389" name="dotlessj"/>
- <GlyphID id="390" name=".notdef#18"/>
- </GlyphOrder>
-
- <head>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="1.0"/>
- <fontRevision value="1.19999694824"/>
- <checkSumAdjustment value="0xc0d96d6c"/>
- <magicNumber value="0x5f0f3cf5"/>
- <flags value="00000000 00001111"/>
- <unitsPerEm value="2048"/>
- <created value="Fri Oct 12 14:06:14 2001"/>
- <modified value="Fri Oct 12 10:57:50 2001"/>
- <xMin value="-416"/>
- <yMin value="-432"/>
- <xMax value="2014"/>
- <yMax value="2033"/>
- <macStyle value="00000000 00000000"/>
- <lowestRecPPEM value="12"/>
- <fontDirectionHint value="2"/>
- <indexToLocFormat value="0"/>
- <glyphDataFormat value="0"/>
- </head>
-
- <hhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="-432"/>
- <lineGap value="0"/>
- <advanceWidthMax value="2048"/>
- <minLeftSideBearing value="-416"/>
- <minRightSideBearing value="-417"/>
- <xMaxExtent value="2014"/>
- <caretSlopeRise value="1"/>
- <caretSlopeRun value="0"/>
- <caretOffset value="0"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfHMetrics value="391"/>
- </hhea>
-
- <maxp>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="0x10000"/>
- <numGlyphs value="391"/>
- <maxPoints value="90"/>
- <maxContours value="7"/>
- <maxCompositePoints value="86"/>
- <maxCompositeContours value="4"/>
- <maxZones value="2"/>
- <maxTwilightPoints value="4"/>
- <maxStorage value="0"/>
- <maxFunctionDefs value="15"/>
- <maxInstructionDefs value="0"/>
- <maxStackElements value="2048"/>
- <maxSizeOfInstructions value="204"/>
- <maxComponentElements value="2"/>
- <maxComponentDepth value="1"/>
- </maxp>
-
- <OS_2>
- <version value="2"/>
- <xAvgCharWidth value="821"/>
- <usWeightClass value="400"/>
- <usWidthClass value="5"/>
- <fsType value="00000000 00000000"/>
- <ySubscriptXSize value="1434"/>
- <ySubscriptYSize value="1331"/>
- <ySubscriptXOffset value="0"/>
- <ySubscriptYOffset value="283"/>
- <ySuperscriptXSize value="1434"/>
- <ySuperscriptYSize value="1331"/>
- <ySuperscriptXOffset value="0"/>
- <ySuperscriptYOffset value="977"/>
- <yStrikeoutSize value="0"/>
- <yStrikeoutPosition value="0"/>
- <sFamilyClass value="5"/>
- <panose>
- <bFamilyType value="2"/>
- <bSerifStyle value="2"/>
- <bWeight value="6"/>
- <bProportion value="3"/>
- <bContrast value="7"/>
- <bStrokeVariation value="0"/>
- <bArmStyle value="0"/>
- <bLetterForm value="0"/>
- <bMidline value="0"/>
- <bXHeight value="0"/>
- </panose>
- <ulUnicodeRange1 value="00000000 00000000 00000000 00000111"/>
- <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
- <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
- <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
- <achVendID value="B&amp;H "/>
- <fsSelection value="00000000 01000000"/>
- <fsFirstCharIndex value="32"/>
- <fsLastCharIndex value="64258"/>
- <sTypoAscender value="1604"/>
- <sTypoDescender value="-420"/>
- <sTypoLineGap value="167"/>
- <usWinAscent value="1934"/>
- <usWinDescent value="432"/>
- <ulCodePageRange1 value="00000000 00000000 00000000 10010011"/>
- <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
- <sxHeight value="0"/>
- <sCapHeight value="0"/>
- <usDefaultChar value="0"/>
- <usBreakChar value="0"/>
- <usMaxContex value="0"/>
- </OS_2>
-
- <hmtx>
- <mtx name=".notdef" width="512" lsb="51"/>
- <mtx name=".notdef#1" width="0" lsb="0"/>
- <mtx name=".notdef#10" width="512" lsb="0"/>
- <mtx name=".notdef#11" width="512" lsb="0"/>
- <mtx name=".notdef#12" width="512" lsb="0"/>
- <mtx name=".notdef#13" width="512" lsb="0"/>
- <mtx name=".notdef#14" width="512" lsb="0"/>
- <mtx name=".notdef#15" width="512" lsb="0"/>
- <mtx name=".notdef#16" width="1024" lsb="0"/>
- <mtx name=".notdef#17" width="512" lsb="0"/>
- <mtx name=".notdef#18" width="512" lsb="0"/>
- <mtx name=".notdef#2" width="512" lsb="0"/>
- <mtx name=".notdef#3" width="512" lsb="0"/>
- <mtx name=".notdef#4" width="512" lsb="0"/>
- <mtx name=".notdef#5" width="512" lsb="0"/>
- <mtx name=".notdef#6" width="512" lsb="0"/>
- <mtx name=".notdef#7" width="512" lsb="0"/>
- <mtx name=".notdef#8" width="512" lsb="0"/>
- <mtx name=".notdef#9" width="512" lsb="0"/>
- <mtx name="A" width="1479" lsb="0"/>
- <mtx name="AE" width="1821" lsb="0"/>
- <mtx name="Aacute" width="1479" lsb="0"/>
- <mtx name="Abreve" width="1479" lsb="0"/>
- <mtx name="Acircumflex" width="1479" lsb="0"/>
- <mtx name="Adieresis" width="1479" lsb="0"/>
- <mtx name="Agrave" width="1479" lsb="0"/>
- <mtx name="Amacron" width="1479" lsb="0"/>
- <mtx name="Aogonek" width="1479" lsb="0"/>
- <mtx name="Aring" width="1479" lsb="0"/>
- <mtx name="Atilde" width="1479" lsb="0"/>
- <mtx name="B" width="1366" lsb="47"/>
- <mtx name="C" width="1366" lsb="80"/>
- <mtx name="Cacute" width="1366" lsb="80"/>
- <mtx name="Ccaron" width="1366" lsb="80"/>
- <mtx name="Ccedilla" width="1366" lsb="80"/>
- <mtx name="Ccircumflex" width="1366" lsb="80"/>
- <mtx name="Cdotaccent" width="1366" lsb="80"/>
- <mtx name="D" width="1479" lsb="41"/>
- <mtx name="Dcaron" width="1479" lsb="41"/>
- <mtx name="Dcroat" width="1479" lsb="41"/>
- <mtx name="E" width="1251" lsb="43"/>
- <mtx name="Eacute" width="1251" lsb="43"/>
- <mtx name="Ebreve" width="1251" lsb="43"/>
- <mtx name="Ecaron" width="1251" lsb="43"/>
- <mtx name="Ecircumflex" width="1251" lsb="43"/>
- <mtx name="Edieresis" width="1251" lsb="43"/>
- <mtx name="Edotaccent" width="1251" lsb="43"/>
- <mtx name="Egrave" width="1251" lsb="43"/>
- <mtx name="Emacron" width="1251" lsb="43"/>
- <mtx name="Eng" width="1479" lsb="43"/>
- <mtx name="Eogonek" width="1251" lsb="43"/>
- <mtx name="Eth" width="1479" lsb="41"/>
- <mtx name="Euro" width="1024" lsb="0"/>
- <mtx name="Euro#1" width="1024" lsb="0"/>
- <mtx name="F" width="1139" lsb="43"/>
- <mtx name="G" width="1479" lsb="85"/>
- <mtx name="Gbreve" width="1479" lsb="85"/>
- <mtx name="Gcircumflex" width="1479" lsb="85"/>
- <mtx name="Gcommaaccent" width="1479" lsb="85"/>
- <mtx name="Gdotaccent" width="1479" lsb="85"/>
- <mtx name="H" width="1479" lsb="41"/>
- <mtx name="Hbar" width="1479" lsb="41"/>
- <mtx name="Hcircumflex" width="1479" lsb="41"/>
- <mtx name="I" width="682" lsb="51"/>
- <mtx name="IJ" width="1451" lsb="51"/>
- <mtx name="Iacute" width="682" lsb="51"/>
- <mtx name="Ibreve" width="682" lsb="8"/>
- <mtx name="Icircumflex" width="682" lsb="-11"/>
- <mtx name="Idieresis" width="682" lsb="51"/>
- <mtx name="Idotaccent" width="682" lsb="51"/>
- <mtx name="Igrave" width="682" lsb="39"/>
- <mtx name="Imacron" width="682" lsb="20"/>
- <mtx name="Iogonek" width="682" lsb="51"/>
- <mtx name="Itilde" width="682" lsb="8"/>
- <mtx name="J" width="797" lsb="0"/>
- <mtx name="Jcircumflex" width="797" lsb="0"/>
- <mtx name="K" width="1479" lsb="56"/>
- <mtx name="Kcommaaccent" width="1479" lsb="56"/>
- <mtx name="L" width="1251" lsb="56"/>
- <mtx name="Lacute" width="1251" lsb="56"/>
- <mtx name="Lcaron" width="1251" lsb="56"/>
- <mtx name="Lcommaaccent" width="1251" lsb="56"/>
- <mtx name="Ldot" width="1251" lsb="56"/>
- <mtx name="Lslash" width="1251" lsb="56"/>
- <mtx name="M" width="1821" lsb="48"/>
- <mtx name="N" width="1479" lsb="43"/>
- <mtx name="Nacute" width="1479" lsb="43"/>
- <mtx name="Ncaron" width="1479" lsb="43"/>
- <mtx name="Ncommaaccent" width="1479" lsb="43"/>
- <mtx name="Ntilde" width="1479" lsb="43"/>
- <mtx name="O" width="1479" lsb="80"/>
- <mtx name="OE" width="1821" lsb="80"/>
- <mtx name="Oacute" width="1479" lsb="80"/>
- <mtx name="Obreve" width="1479" lsb="80"/>
- <mtx name="Ocircumflex" width="1479" lsb="80"/>
- <mtx name="Odieresis" width="1479" lsb="80"/>
- <mtx name="Ograve" width="1479" lsb="80"/>
- <mtx name="Ohungarumlaut" width="1479" lsb="80"/>
- <mtx name="Omacron" width="1479" lsb="80"/>
- <mtx name="Oslash" width="1479" lsb="80"/>
- <mtx name="Otilde" width="1479" lsb="80"/>
- <mtx name="P" width="1139" lsb="31"/>
- <mtx name="Q" width="1479" lsb="80"/>
- <mtx name="R" width="1366" lsb="31"/>
- <mtx name="Racute" width="1366" lsb="31"/>
- <mtx name="Rcaron" width="1366" lsb="31"/>
- <mtx name="Rcommaaccent" width="1366" lsb="31"/>
- <mtx name="S" width="1139" lsb="119"/>
- <mtx name="Sacute" width="1139" lsb="119"/>
- <mtx name="Scaron" width="1139" lsb="119"/>
- <mtx name="Scedilla" width="1139" lsb="119"/>
- <mtx name="Scircumflex" width="1139" lsb="119"/>
- <mtx name="Scommaaccent" width="1139" lsb="119"/>
- <mtx name="T" width="1251" lsb="31"/>
- <mtx name="Tbar" width="1251" lsb="31"/>
- <mtx name="Tcaron" width="1251" lsb="31"/>
- <mtx name="Tcommaaccent" width="1251" lsb="31"/>
- <mtx name="Tcommabelow" width="1251" lsb="31"/>
- <mtx name="Thorn" width="1139" lsb="43"/>
- <mtx name="U" width="1479" lsb="19"/>
- <mtx name="Uacute" width="1479" lsb="19"/>
- <mtx name="Ubreve" width="1479" lsb="19"/>
- <mtx name="Ucircumflex" width="1479" lsb="19"/>
- <mtx name="Udieresis" width="1479" lsb="19"/>
- <mtx name="Ugrave" width="1479" lsb="19"/>
- <mtx name="Uhungarumlaut" width="1479" lsb="19"/>
- <mtx name="Umacron" width="1479" lsb="19"/>
- <mtx name="Unterkomma" width="682" lsb="170"/>
- <mtx name="Uogonek" width="1479" lsb="19"/>
- <mtx name="Uring" width="1479" lsb="19"/>
- <mtx name="Utilde" width="1479" lsb="19"/>
- <mtx name="V" width="1479" lsb="0"/>
- <mtx name="W" width="1933" lsb="0"/>
- <mtx name="Wcircumflex" width="1933" lsb="0"/>
- <mtx name="X" width="1479" lsb="12"/>
- <mtx name="Y" width="1479" lsb="0"/>
- <mtx name="Yacute" width="1479" lsb="0"/>
- <mtx name="Ycircumflex" width="1479" lsb="0"/>
- <mtx name="Ydieresis" width="1479" lsb="0"/>
- <mtx name="Z" width="1251" lsb="92"/>
- <mtx name="Zacute" width="1251" lsb="92"/>
- <mtx name="Zcaron" width="1251" lsb="92"/>
- <mtx name="Zdotaccent" width="1251" lsb="92"/>
- <mtx name="a" width="909" lsb="75"/>
- <mtx name="aacute" width="909" lsb="75"/>
- <mtx name="abreve" width="909" lsb="75"/>
- <mtx name="acircumflex" width="909" lsb="75"/>
- <mtx name="acute" width="682" lsb="91"/>
- <mtx name="adieresis" width="909" lsb="75"/>
- <mtx name="ae" width="1366" lsb="75"/>
- <mtx name="afii00208" width="2048" lsb="99"/>
- <mtx name="agrave" width="909" lsb="75"/>
- <mtx name="amacron" width="909" lsb="75"/>
- <mtx name="ampersand" width="1593" lsb="99"/>
- <mtx name="anoteleia" width="512" lsb="133"/>
- <mtx name="aogonek" width="909" lsb="75"/>
- <mtx name="aring" width="909" lsb="75"/>
- <mtx name="asciicircum" width="960" lsb="36"/>
- <mtx name="asciitilde" width="1108" lsb="60"/>
- <mtx name="asterisk" width="1024" lsb="120"/>
- <mtx name="at" width="1886" lsb="140"/>
- <mtx name="atilde" width="909" lsb="75"/>
- <mtx name="b" width="1024" lsb="0"/>
- <mtx name="backslash" width="569" lsb="-30"/>
- <mtx name="bar" width="410" lsb="156"/>
- <mtx name="braceleft" width="983" lsb="148"/>
- <mtx name="braceright" width="983" lsb="222"/>
- <mtx name="bracketleft" width="682" lsb="185"/>
- <mtx name="bracketright" width="682" lsb="93"/>
- <mtx name="breve" width="682" lsb="8"/>
- <mtx name="brokenbar" width="410" lsb="156"/>
- <mtx name="bullet" width="717" lsb="81"/>
- <mtx name="c" width="909" lsb="68"/>
- <mtx name="cacute" width="909" lsb="68"/>
- <mtx name="caron" width="682" lsb="-10"/>
- <mtx name="ccaron" width="909" lsb="68"/>
- <mtx name="ccedilla" width="909" lsb="68"/>
- <mtx name="ccircumflex" width="909" lsb="68"/>
- <mtx name="cdotaccent" width="909" lsb="68"/>
- <mtx name="cedilla" width="682" lsb="168"/>
- <mtx name="cent" width="1024" lsb="123"/>
- <mtx name="circumflex" width="682" lsb="-10"/>
- <mtx name="colon" width="569" lsb="161"/>
- <mtx name="comma" width="512" lsb="133"/>
- <mtx name="copyright" width="1556" lsb="87"/>
- <mtx name="currency" width="1024" lsb="130"/>
- <mtx name="d" width="1024" lsb="68"/>
- <mtx name="dagger" width="1024" lsb="80"/>
- <mtx name="daggerdbl" width="1024" lsb="80"/>
- <mtx name="dcaron" width="1324" lsb="68"/>
- <mtx name="dcroat" width="1024" lsb="68"/>
- <mtx name="degree" width="819" lsb="114"/>
- <mtx name="dieresis" width="682" lsb="57"/>
- <mtx name="divide" width="1155" lsb="84"/>
- <mtx name="dollar" width="1024" lsb="80"/>
- <mtx name="dotaccent" width="682" lsb="242"/>
- <mtx name="dotlessi" width="569" lsb="47"/>
- <mtx name="dotlessj" width="569" lsb="-78"/>
- <mtx name="dotmath" width="512" lsb="133"/>
- <mtx name="e" width="909" lsb="68"/>
- <mtx name="eacute" width="909" lsb="68"/>
- <mtx name="ebreve" width="909" lsb="68"/>
- <mtx name="ecaron" width="909" lsb="68"/>
- <mtx name="ecircumflex" width="909" lsb="68"/>
- <mtx name="edieresis" width="909" lsb="68"/>
- <mtx name="edotaccent" width="909" lsb="68"/>
- <mtx name="egrave" width="909" lsb="68"/>
- <mtx name="eight" width="1024" lsb="40"/>
- <mtx name="ellipsis" width="2048" lsb="243"/>
- <mtx name="emacron" width="909" lsb="68"/>
- <mtx name="emdash" width="2048" lsb="99"/>
- <mtx name="endash" width="1024" lsb="86"/>
- <mtx name="eng" width="1024" lsb="37"/>
- <mtx name="eogonek" width="909" lsb="68"/>
- <mtx name="equal" width="1155" lsb="84"/>
- <mtx name="estimated" width="909" lsb="68"/>
- <mtx name="eth" width="1024" lsb="17"/>
- <mtx name="exclam" width="682" lsb="242"/>
- <mtx name="exclamdown" width="682" lsb="242"/>
- <mtx name="f" width="682" lsb="37"/>
- <mtx name="fi" width="1139" lsb="37"/>
- <mtx name="fi#1" width="1139" lsb="37"/>
- <mtx name="figuredash" width="1024" lsb="86"/>
- <mtx name="five" width="1024" lsb="130"/>
- <mtx name="fl" width="1139" lsb="37"/>
- <mtx name="fl#1" width="1139" lsb="37"/>
- <mtx name="florin" width="1024" lsb="12"/>
- <mtx name="four" width="1024" lsb="25"/>
- <mtx name="foursuperiour" width="614" lsb="31"/>
- <mtx name="fraction" width="342" lsb="-416"/>
- <mtx name="fraction#1" width="342" lsb="-416"/>
- <mtx name="g" width="1024" lsb="53"/>
- <mtx name="gbreve" width="1024" lsb="53"/>
- <mtx name="gcircumflex" width="1024" lsb="53"/>
- <mtx name="gcommaaccent" width="1024" lsb="53"/>
- <mtx name="gdotaccent" width="1024" lsb="53"/>
- <mtx name="germandbls" width="1024" lsb="27"/>
- <mtx name="grave" width="682" lsb="91"/>
- <mtx name="greater" width="1155" lsb="84"/>
- <mtx name="guillemotleft" width="1024" lsb="74"/>
- <mtx name="guillemotright" width="1024" lsb="86"/>
- <mtx name="guilsinglleft" width="682" lsb="86"/>
- <mtx name="guilsinglright" width="682" lsb="123"/>
- <mtx name="h" width="1024" lsb="37"/>
- <mtx name="hbar" width="1024" lsb="37"/>
- <mtx name="hcircumflex" width="1024" lsb="37"/>
- <mtx name="hungarumlaut" width="682" lsb="-5"/>
- <mtx name="hyphen" width="682" lsb="82"/>
- <mtx name="hyphen#1" width="682" lsb="82"/>
- <mtx name="i" width="569" lsb="47"/>
- <mtx name="iacute" width="569" lsb="47"/>
- <mtx name="ibreve" width="569" lsb="-42"/>
- <mtx name="icircumflex" width="569" lsb="-61"/>
- <mtx name="idieresis" width="569" lsb="7"/>
- <mtx name="igrave" width="569" lsb="7"/>
- <mtx name="ij" width="1131" lsb="47"/>
- <mtx name="imacron" width="569" lsb="-40"/>
- <mtx name="iogonek" width="569" lsb="47"/>
- <mtx name="itilde" width="569" lsb="-55"/>
- <mtx name="j" width="569" lsb="-78"/>
- <mtx name="jcircumflex" width="569" lsb="-78"/>
- <mtx name="k" width="1024" lsb="31"/>
- <mtx name="kcommaaccent" width="1024" lsb="31"/>
- <mtx name="kgreenlandic" width="1024" lsb="37"/>
- <mtx name="l" width="569" lsb="47"/>
- <mtx name="lacute" width="569" lsb="47"/>
- <mtx name="lcaron" width="832" lsb="47"/>
- <mtx name="lcommaaccent" width="569" lsb="47"/>
- <mtx name="ldot" width="704" lsb="47"/>
- <mtx name="less" width="1155" lsb="84"/>
- <mtx name="logicalnot" width="1155" lsb="84"/>
- <mtx name="longs" width="569" lsb="37"/>
- <mtx name="lslash" width="569" lsb="47"/>
- <mtx name="m" width="1593" lsb="37"/>
- <mtx name="macron" width="682" lsb="20"/>
- <mtx name="macron#1" width="1024" lsb="99"/>
- <mtx name="minus" width="1628" lsb="222"/>
- <mtx name="mu" width="1024" lsb="12"/>
- <mtx name="multiply" width="1155" lsb="84"/>
- <mtx name="n" width="1024" lsb="37"/>
- <mtx name="nacute" width="1024" lsb="37"/>
- <mtx name="napostrophe" width="1237" lsb="25"/>
- <mtx name="nbhyphen" width="682" lsb="82"/>
- <mtx name="ncaron" width="1024" lsb="37"/>
- <mtx name="ncommaaccent" width="1024" lsb="37"/>
- <mtx name="nine" width="1024" lsb="37"/>
- <mtx name="nonbreakingspace" width="512" lsb="0"/>
- <mtx name="ntilde" width="1024" lsb="37"/>
- <mtx name="numbersign" width="1024" lsb="0"/>
- <mtx name="o" width="1024" lsb="62"/>
- <mtx name="oacute" width="1024" lsb="62"/>
- <mtx name="obreve" width="1024" lsb="62"/>
- <mtx name="ocircumflex" width="1024" lsb="62"/>
- <mtx name="odieresis" width="1024" lsb="62"/>
- <mtx name="oe" width="1479" lsb="62"/>
- <mtx name="ogonek" width="682" lsb="156"/>
- <mtx name="ograve" width="1024" lsb="62"/>
- <mtx name="ohungarumlaut" width="1024" lsb="62"/>
- <mtx name="omacron" width="1024" lsb="62"/>
- <mtx name="one" width="1024" lsb="130"/>
- <mtx name="onehalf" width="1536" lsb="173"/>
- <mtx name="onequarter" width="1536" lsb="173"/>
- <mtx name="onesuperior" width="614" lsb="136"/>
- <mtx name="ordfeminine" width="565" lsb="25"/>
- <mtx name="ordmasculine" width="635" lsb="25"/>
- <mtx name="oslash" width="1024" lsb="62"/>
- <mtx name="otilde" width="1024" lsb="62"/>
- <mtx name="p" width="1024" lsb="0"/>
- <mtx name="paragraph" width="928" lsb="15"/>
- <mtx name="parenleft" width="682" lsb="116"/>
- <mtx name="parenright" width="682" lsb="104"/>
- <mtx name="percent" width="1706" lsb="120"/>
- <mtx name="period" width="512" lsb="133"/>
- <mtx name="periodcentered" width="512" lsb="133"/>
- <mtx name="periodcentered#1" width="512" lsb="133"/>
- <mtx name="perthousand" width="2048" lsb="34"/>
- <mtx name="plus" width="1155" lsb="84"/>
- <mtx name="plusminus" width="1155" lsb="84"/>
- <mtx name="q" width="1024" lsb="68"/>
- <mtx name="question" width="909" lsb="51"/>
- <mtx name="questiondown" width="909" lsb="51"/>
- <mtx name="quotedbl" width="836" lsb="146"/>
- <mtx name="quotedblbase" width="909" lsb="146"/>
- <mtx name="quotedblleft" width="909" lsb="122"/>
- <mtx name="quotedblright" width="909" lsb="146"/>
- <mtx name="quoteleft" width="682" lsb="205"/>
- <mtx name="quotereversed" width="512" lsb="0"/>
- <mtx name="quoteright" width="682" lsb="230"/>
- <mtx name="quotesinglbase" width="682" lsb="230"/>
- <mtx name="quotesingle" width="369" lsb="61"/>
- <mtx name="r" width="682" lsb="31"/>
- <mtx name="racute" width="682" lsb="31"/>
- <mtx name="radicalex" width="1024" lsb="99"/>
- <mtx name="rcaron" width="682" lsb="-12"/>
- <mtx name="rcommaaccent" width="682" lsb="31"/>
- <mtx name="registered" width="1556" lsb="87"/>
- <mtx name="ring" width="682" lsb="114"/>
- <mtx name="s" width="797" lsb="95"/>
- <mtx name="sacute" width="797" lsb="95"/>
- <mtx name="scaron" width="797" lsb="66"/>
- <mtx name="scedilla" width="797" lsb="95"/>
- <mtx name="scircumflex" width="797" lsb="62"/>
- <mtx name="scommaaccent" width="797" lsb="95"/>
- <mtx name="section" width="1024" lsb="75"/>
- <mtx name="semicolon" width="569" lsb="161"/>
- <mtx name="semicolon#1" width="569" lsb="161"/>
- <mtx name="seven" width="1024" lsb="108"/>
- <mtx name="sfthyphen" width="682" lsb="82"/>
- <mtx name="six" width="1024" lsb="49"/>
- <mtx name="slash" width="569" lsb="-30"/>
- <mtx name="space" width="512" lsb="0"/>
- <mtx name="sterling" width="1024" lsb="74"/>
- <mtx name="t" width="569" lsb="25"/>
- <mtx name="tbar" width="569" lsb="25"/>
- <mtx name="tcaron" width="666" lsb="25"/>
- <mtx name="tcommaaccent" width="569" lsb="25"/>
- <mtx name="tcommabelow" width="569" lsb="25"/>
- <mtx name="thorn" width="1024" lsb="0"/>
- <mtx name="three" width="1024" lsb="93"/>
- <mtx name="threequarters" width="1536" lsb="173"/>
- <mtx name="threesuperior" width="614" lsb="86"/>
- <mtx name="tilde" width="682" lsb="8"/>
- <mtx name="trademark" width="2007" lsb="140"/>
- <mtx name="two" width="1024" lsb="68"/>
- <mtx name="twosuperior" width="614" lsb="86"/>
- <mtx name="u" width="1024" lsb="12"/>
- <mtx name="uacute" width="1024" lsb="12"/>
- <mtx name="ubreve" width="1024" lsb="12"/>
- <mtx name="ucircumflex" width="1024" lsb="12"/>
- <mtx name="udieresis" width="1024" lsb="12"/>
- <mtx name="ugrave" width="1024" lsb="12"/>
- <mtx name="uhungarumlaut" width="1024" lsb="12"/>
- <mtx name="umacron" width="1024" lsb="12"/>
- <mtx name="underscore" width="1024" lsb="0"/>
- <mtx name="uogonek" width="1024" lsb="12"/>
- <mtx name="uring" width="1024" lsb="12"/>
- <mtx name="utilde" width="1024" lsb="12"/>
- <mtx name="v" width="1024" lsb="0"/>
- <mtx name="w" width="1479" lsb="0"/>
- <mtx name="wcircumflex" width="1479" lsb="0"/>
- <mtx name="x" width="1024" lsb="0"/>
- <mtx name="y" width="1024" lsb="0"/>
- <mtx name="yacute" width="1024" lsb="0"/>
- <mtx name="ycircumflex" width="1024" lsb="0"/>
- <mtx name="ydieresis" width="1024" lsb="0"/>
- <mtx name="yen" width="1024" lsb="0"/>
- <mtx name="z" width="909" lsb="62"/>
- <mtx name="zacute" width="909" lsb="62"/>
- <mtx name="zcaron" width="909" lsb="62"/>
- <mtx name="zdotaccent" width="909" lsb="62"/>
- <mtx name="zero" width="1024" lsb="56"/>
- </hmtx>
-
- <cmap>
- <tableVersion version="0"/>
- <cmap_format_0 platformID="1" platEncID="0" language="0">
- <map code="0x0" name=".notdef#1"/>
- <map code="0x1" name=".notdef"/>
- <map code="0x2" name=".notdef"/>
- <map code="0x3" name=".notdef"/>
- <map code="0x4" name=".notdef"/>
- <map code="0x5" name=".notdef"/>
- <map code="0x6" name=".notdef"/>
- <map code="0x7" name=".notdef"/>
- <map code="0x8" name=".notdef#1"/>
- <map code="0x9" name="space"/>
- <map code="0xa" name=".notdef"/>
- <map code="0xb" name=".notdef"/>
- <map code="0xc" name=".notdef"/>
- <map code="0xd" name=".notdef#2"/>
- <map code="0xe" name=".notdef"/>
- <map code="0xf" name=".notdef"/>
- <map code="0x10" name=".notdef"/>
- <map code="0x11" name=".notdef"/>
- <map code="0x12" name=".notdef"/>
- <map code="0x13" name=".notdef"/>
- <map code="0x14" name=".notdef"/>
- <map code="0x15" name=".notdef"/>
- <map code="0x16" name=".notdef"/>
- <map code="0x17" name=".notdef"/>
- <map code="0x18" name=".notdef"/>
- <map code="0x19" name=".notdef"/>
- <map code="0x1a" name=".notdef"/>
- <map code="0x1b" name=".notdef"/>
- <map code="0x1c" name=".notdef"/>
- <map code="0x1d" name=".notdef#1"/>
- <map code="0x1e" name=".notdef"/>
- <map code="0x1f" name=".notdef"/>
- <map code="0x20" name="space"/>
- <map code="0x21" name="exclam"/>
- <map code="0x22" name="quotedbl"/>
- <map code="0x23" name="numbersign"/>
- <map code="0x24" name="dollar"/>
- <map code="0x25" name="percent"/>
- <map code="0x26" name="ampersand"/>
- <map code="0x27" name="quotesingle"/>
- <map code="0x28" name="parenleft"/>
- <map code="0x29" name="parenright"/>
- <map code="0x2a" name="asterisk"/>
- <map code="0x2b" name="plus"/>
- <map code="0x2c" name="comma"/>
- <map code="0x2d" name="hyphen"/>
- <map code="0x2e" name="period"/>
- <map code="0x2f" name="slash"/>
- <map code="0x30" name="zero"/>
- <map code="0x31" name="one"/>
- <map code="0x32" name="two"/>
- <map code="0x33" name="three"/>
- <map code="0x34" name="four"/>
- <map code="0x35" name="five"/>
- <map code="0x36" name="six"/>
- <map code="0x37" name="seven"/>
- <map code="0x38" name="eight"/>
- <map code="0x39" name="nine"/>
- <map code="0x3a" name="colon"/>
- <map code="0x3b" name="semicolon"/>
- <map code="0x3c" name="less"/>
- <map code="0x3d" name="equal"/>
- <map code="0x3e" name="greater"/>
- <map code="0x3f" name="question"/>
- <map code="0x40" name="at"/>
- <map code="0x41" name="A"/>
- <map code="0x42" name="B"/>
- <map code="0x43" name="C"/>
- <map code="0x44" name="D"/>
- <map code="0x45" name="E"/>
- <map code="0x46" name="F"/>
- <map code="0x47" name="G"/>
- <map code="0x48" name="H"/>
- <map code="0x49" name="I"/>
- <map code="0x4a" name="J"/>
- <map code="0x4b" name="K"/>
- <map code="0x4c" name="L"/>
- <map code="0x4d" name="M"/>
- <map code="0x4e" name="N"/>
- <map code="0x4f" name="O"/>
- <map code="0x50" name="P"/>
- <map code="0x51" name="Q"/>
- <map code="0x52" name="R"/>
- <map code="0x53" name="S"/>
- <map code="0x54" name="T"/>
- <map code="0x55" name="U"/>
- <map code="0x56" name="V"/>
- <map code="0x57" name="W"/>
- <map code="0x58" name="X"/>
- <map code="0x59" name="Y"/>
- <map code="0x5a" name="Z"/>
- <map code="0x5b" name="bracketleft"/>
- <map code="0x5c" name="backslash"/>
- <map code="0x5d" name="bracketright"/>
- <map code="0x5e" name="asciicircum"/>
- <map code="0x5f" name="underscore"/>
- <map code="0x60" name="grave"/>
- <map code="0x61" name="a"/>
- <map code="0x62" name="b"/>
- <map code="0x63" name="c"/>
- <map code="0x64" name="d"/>
- <map code="0x65" name="e"/>
- <map code="0x66" name="f"/>
- <map code="0x67" name="g"/>
- <map code="0x68" name="h"/>
- <map code="0x69" name="i"/>
- <map code="0x6a" name="j"/>
- <map code="0x6b" name="k"/>
- <map code="0x6c" name="l"/>
- <map code="0x6d" name="m"/>
- <map code="0x6e" name="n"/>
- <map code="0x6f" name="o"/>
- <map code="0x70" name="p"/>
- <map code="0x71" name="q"/>
- <map code="0x72" name="r"/>
- <map code="0x73" name="s"/>
- <map code="0x74" name="t"/>
- <map code="0x75" name="u"/>
- <map code="0x76" name="v"/>
- <map code="0x77" name="w"/>
- <map code="0x78" name="x"/>
- <map code="0x79" name="y"/>
- <map code="0x7a" name="z"/>
- <map code="0x7b" name="braceleft"/>
- <map code="0x7c" name="bar"/>
- <map code="0x7d" name="braceright"/>
- <map code="0x7e" name="asciitilde"/>
- <map code="0x7f" name=".notdef"/>
- <map code="0x80" name="Adieresis"/>
- <map code="0x81" name="Aring"/>
- <map code="0x82" name="Ccedilla"/>
- <map code="0x83" name="Eacute"/>
- <map code="0x84" name="Ntilde"/>
- <map code="0x85" name="Odieresis"/>
- <map code="0x86" name="Udieresis"/>
- <map code="0x87" name="aacute"/>
- <map code="0x88" name="agrave"/>
- <map code="0x89" name="acircumflex"/>
- <map code="0x8a" name="adieresis"/>
- <map code="0x8b" name="atilde"/>
- <map code="0x8c" name="aring"/>
- <map code="0x8d" name="ccedilla"/>
- <map code="0x8e" name="eacute"/>
- <map code="0x8f" name="egrave"/>
- <map code="0x90" name="ecircumflex"/>
- <map code="0x91" name="edieresis"/>
- <map code="0x92" name="iacute"/>
- <map code="0x93" name="igrave"/>
- <map code="0x94" name="icircumflex"/>
- <map code="0x95" name="idieresis"/>
- <map code="0x96" name="ntilde"/>
- <map code="0x97" name="oacute"/>
- <map code="0x98" name="ograve"/>
- <map code="0x99" name="ocircumflex"/>
- <map code="0x9a" name="odieresis"/>
- <map code="0x9b" name="otilde"/>
- <map code="0x9c" name="uacute"/>
- <map code="0x9d" name="ugrave"/>
- <map code="0x9e" name="ucircumflex"/>
- <map code="0x9f" name="udieresis"/>
- <map code="0xa0" name="dagger"/>
- <map code="0xa1" name="degree"/>
- <map code="0xa2" name="cent"/>
- <map code="0xa3" name="sterling"/>
- <map code="0xa4" name="section"/>
- <map code="0xa5" name="bullet"/>
- <map code="0xa6" name="paragraph"/>
- <map code="0xa7" name="germandbls"/>
- <map code="0xa8" name="registered"/>
- <map code="0xa9" name="copyright"/>
- <map code="0xaa" name="trademark"/>
- <map code="0xab" name="acute"/>
- <map code="0xac" name="dieresis"/>
- <map code="0xad" name=".notdef"/>
- <map code="0xae" name="AE"/>
- <map code="0xaf" name="Oslash"/>
- <map code="0xb0" name=".notdef"/>
- <map code="0xb1" name="plusminus"/>
- <map code="0xb2" name=".notdef"/>
- <map code="0xb3" name=".notdef"/>
- <map code="0xb4" name="yen"/>
- <map code="0xb5" name="mu"/>
- <map code="0xb6" name=".notdef"/>
- <map code="0xb7" name=".notdef"/>
- <map code="0xb8" name=".notdef"/>
- <map code="0xb9" name=".notdef"/>
- <map code="0xba" name=".notdef"/>
- <map code="0xbb" name="ordfeminine"/>
- <map code="0xbc" name="ordmasculine"/>
- <map code="0xbd" name=".notdef"/>
- <map code="0xbe" name="ae"/>
- <map code="0xbf" name="oslash"/>
- <map code="0xc0" name="questiondown"/>
- <map code="0xc1" name="exclamdown"/>
- <map code="0xc2" name="logicalnot"/>
- <map code="0xc3" name=".notdef"/>
- <map code="0xc4" name="florin"/>
- <map code="0xc5" name=".notdef"/>
- <map code="0xc6" name=".notdef"/>
- <map code="0xc7" name="guillemotleft"/>
- <map code="0xc8" name="guillemotright"/>
- <map code="0xc9" name="ellipsis"/>
- <map code="0xca" name=".notdef#16"/>
- <map code="0xcb" name="Agrave"/>
- <map code="0xcc" name="Atilde"/>
- <map code="0xcd" name="Otilde"/>
- <map code="0xce" name="OE"/>
- <map code="0xcf" name="oe"/>
- <map code="0xd0" name="endash"/>
- <map code="0xd1" name="emdash"/>
- <map code="0xd2" name="quotedblleft"/>
- <map code="0xd3" name="quotedblright"/>
- <map code="0xd4" name="quoteleft"/>
- <map code="0xd5" name="quoteright"/>
- <map code="0xd6" name="divide"/>
- <map code="0xd7" name=".notdef"/>
- <map code="0xd8" name="ydieresis"/>
- <map code="0xd9" name="Ydieresis"/>
- <map code="0xda" name="fraction"/>
- <map code="0xdb" name="currency"/>
- <map code="0xdc" name="guilsinglleft"/>
- <map code="0xdd" name="guilsinglright"/>
- <map code="0xde" name="fi"/>
- <map code="0xdf" name="fl"/>
- <map code="0xe0" name="daggerdbl"/>
- <map code="0xe1" name="periodcentered"/>
- <map code="0xe2" name="quotesinglbase"/>
- <map code="0xe3" name="quotedblbase"/>
- <map code="0xe4" name="perthousand"/>
- <map code="0xe5" name="Acircumflex"/>
- <map code="0xe6" name="Ecircumflex"/>
- <map code="0xe7" name="Aacute"/>
- <map code="0xe8" name="Edieresis"/>
- <map code="0xe9" name="Egrave"/>
- <map code="0xea" name="Iacute"/>
- <map code="0xeb" name="Icircumflex"/>
- <map code="0xec" name="Idieresis"/>
- <map code="0xed" name="Igrave"/>
- <map code="0xee" name="Oacute"/>
- <map code="0xef" name="Ocircumflex"/>
- <map code="0xf0" name="Euro"/>
- <map code="0xf1" name="Ograve"/>
- <map code="0xf2" name="Uacute"/>
- <map code="0xf3" name="Ucircumflex"/>
- <map code="0xf4" name="Ugrave"/>
- <map code="0xf5" name="dotlessi"/>
- <map code="0xf6" name="circumflex"/>
- <map code="0xf7" name="tilde"/>
- <map code="0xf8" name="macron"/>
- <map code="0xf9" name="breve"/>
- <map code="0xfa" name="dotaccent"/>
- <map code="0xfb" name="ring"/>
- <map code="0xfc" name="cedilla"/>
- <map code="0xfd" name="hungarumlaut"/>
- <map code="0xfe" name="ogonek"/>
- <map code="0xff" name="caron"/>
- </cmap_format_0>
- <cmap_format_4 platformID="3" platEncID="1" language="0">
- <map code="0x20" name="space"/><!-- SPACE -->
- <map code="0x21" name="exclam"/><!-- EXCLAMATION MARK -->
- <map code="0x22" name="quotedbl"/><!-- QUOTATION MARK -->
- <map code="0x23" name="numbersign"/><!-- NUMBER SIGN -->
- <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
- <map code="0x25" name="percent"/><!-- PERCENT SIGN -->
- <map code="0x26" name="ampersand"/><!-- AMPERSAND -->
- <map code="0x27" name="quotesingle"/><!-- APOSTROPHE -->
- <map code="0x28" name="parenleft"/><!-- LEFT PARENTHESIS -->
- <map code="0x29" name="parenright"/><!-- RIGHT PARENTHESIS -->
- <map code="0x2a" name="asterisk"/><!-- ASTERISK -->
- <map code="0x2b" name="plus"/><!-- PLUS SIGN -->
- <map code="0x2c" name="comma"/><!-- COMMA -->
- <map code="0x2d" name="hyphen"/><!-- HYPHEN-MINUS -->
- <map code="0x2e" name="period"/><!-- FULL STOP -->
- <map code="0x2f" name="slash"/><!-- SOLIDUS -->
- <map code="0x30" name="zero"/><!-- DIGIT ZERO -->
- <map code="0x31" name="one"/><!-- DIGIT ONE -->
- <map code="0x32" name="two"/><!-- DIGIT TWO -->
- <map code="0x33" name="three"/><!-- DIGIT THREE -->
- <map code="0x34" name="four"/><!-- DIGIT FOUR -->
- <map code="0x35" name="five"/><!-- DIGIT FIVE -->
- <map code="0x36" name="six"/><!-- DIGIT SIX -->
- <map code="0x37" name="seven"/><!-- DIGIT SEVEN -->
- <map code="0x38" name="eight"/><!-- DIGIT EIGHT -->
- <map code="0x39" name="nine"/><!-- DIGIT NINE -->
- <map code="0x3a" name="colon"/><!-- COLON -->
- <map code="0x3b" name="semicolon"/><!-- SEMICOLON -->
- <map code="0x3c" name="less"/><!-- LESS-THAN SIGN -->
- <map code="0x3d" name="equal"/><!-- EQUALS SIGN -->
- <map code="0x3e" name="greater"/><!-- GREATER-THAN SIGN -->
- <map code="0x3f" name="question"/><!-- QUESTION MARK -->
- <map code="0x40" name="at"/><!-- COMMERCIAL AT -->
- <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
- <map code="0x42" name="B"/><!-- LATIN CAPITAL LETTER B -->
- <map code="0x43" name="C"/><!-- LATIN CAPITAL LETTER C -->
- <map code="0x44" name="D"/><!-- LATIN CAPITAL LETTER D -->
- <map code="0x45" name="E"/><!-- LATIN CAPITAL LETTER E -->
- <map code="0x46" name="F"/><!-- LATIN CAPITAL LETTER F -->
- <map code="0x47" name="G"/><!-- LATIN CAPITAL LETTER G -->
- <map code="0x48" name="H"/><!-- LATIN CAPITAL LETTER H -->
- <map code="0x49" name="I"/><!-- LATIN CAPITAL LETTER I -->
- <map code="0x4a" name="J"/><!-- LATIN CAPITAL LETTER J -->
- <map code="0x4b" name="K"/><!-- LATIN CAPITAL LETTER K -->
- <map code="0x4c" name="L"/><!-- LATIN CAPITAL LETTER L -->
- <map code="0x4d" name="M"/><!-- LATIN CAPITAL LETTER M -->
- <map code="0x4e" name="N"/><!-- LATIN CAPITAL LETTER N -->
- <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
- <map code="0x50" name="P"/><!-- LATIN CAPITAL LETTER P -->
- <map code="0x51" name="Q"/><!-- LATIN CAPITAL LETTER Q -->
- <map code="0x52" name="R"/><!-- LATIN CAPITAL LETTER R -->
- <map code="0x53" name="S"/><!-- LATIN CAPITAL LETTER S -->
- <map code="0x54" name="T"/><!-- LATIN CAPITAL LETTER T -->
- <map code="0x55" name="U"/><!-- LATIN CAPITAL LETTER U -->
- <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
- <map code="0x57" name="W"/><!-- LATIN CAPITAL LETTER W -->
- <map code="0x58" name="X"/><!-- LATIN CAPITAL LETTER X -->
- <map code="0x59" name="Y"/><!-- LATIN CAPITAL LETTER Y -->
- <map code="0x5a" name="Z"/><!-- LATIN CAPITAL LETTER Z -->
- <map code="0x5b" name="bracketleft"/><!-- LEFT SQUARE BRACKET -->
- <map code="0x5c" name="backslash"/><!-- REVERSE SOLIDUS -->
- <map code="0x5d" name="bracketright"/><!-- RIGHT SQUARE BRACKET -->
- <map code="0x5e" name="asciicircum"/><!-- CIRCUMFLEX ACCENT -->
- <map code="0x5f" name="underscore"/><!-- LOW LINE -->
- <map code="0x60" name="grave"/><!-- GRAVE ACCENT -->
- <map code="0x61" name="a"/><!-- LATIN SMALL LETTER A -->
- <map code="0x62" name="b"/><!-- LATIN SMALL LETTER B -->
- <map code="0x63" name="c"/><!-- LATIN SMALL LETTER C -->
- <map code="0x64" name="d"/><!-- LATIN SMALL LETTER D -->
- <map code="0x65" name="e"/><!-- LATIN SMALL LETTER E -->
- <map code="0x66" name="f"/><!-- LATIN SMALL LETTER F -->
- <map code="0x67" name="g"/><!-- LATIN SMALL LETTER G -->
- <map code="0x68" name="h"/><!-- LATIN SMALL LETTER H -->
- <map code="0x69" name="i"/><!-- LATIN SMALL LETTER I -->
- <map code="0x6a" name="j"/><!-- LATIN SMALL LETTER J -->
- <map code="0x6b" name="k"/><!-- LATIN SMALL LETTER K -->
- <map code="0x6c" name="l"/><!-- LATIN SMALL LETTER L -->
- <map code="0x6d" name="m"/><!-- LATIN SMALL LETTER M -->
- <map code="0x6e" name="n"/><!-- LATIN SMALL LETTER N -->
- <map code="0x6f" name="o"/><!-- LATIN SMALL LETTER O -->
- <map code="0x70" name="p"/><!-- LATIN SMALL LETTER P -->
- <map code="0x71" name="q"/><!-- LATIN SMALL LETTER Q -->
- <map code="0x72" name="r"/><!-- LATIN SMALL LETTER R -->
- <map code="0x73" name="s"/><!-- LATIN SMALL LETTER S -->
- <map code="0x74" name="t"/><!-- LATIN SMALL LETTER T -->
- <map code="0x75" name="u"/><!-- LATIN SMALL LETTER U -->
- <map code="0x76" name="v"/><!-- LATIN SMALL LETTER V -->
- <map code="0x77" name="w"/><!-- LATIN SMALL LETTER W -->
- <map code="0x78" name="x"/><!-- LATIN SMALL LETTER X -->
- <map code="0x79" name="y"/><!-- LATIN SMALL LETTER Y -->
- <map code="0x7a" name="z"/><!-- LATIN SMALL LETTER Z -->
- <map code="0x7b" name="braceleft"/><!-- LEFT CURLY BRACKET -->
- <map code="0x7c" name="bar"/><!-- VERTICAL LINE -->
- <map code="0x7d" name="braceright"/><!-- RIGHT CURLY BRACKET -->
- <map code="0x7e" name="asciitilde"/><!-- TILDE -->
- <map code="0x80" name="Euro#1"/><!-- &lt;control> -->
- <map code="0xa0" name="nonbreakingspace"/><!-- NO-BREAK SPACE -->
- <map code="0xa1" name="exclamdown"/><!-- INVERTED EXCLAMATION MARK -->
- <map code="0xa2" name="cent"/><!-- CENT SIGN -->
- <map code="0xa3" name="sterling"/><!-- POUND SIGN -->
- <map code="0xa4" name="currency"/><!-- CURRENCY SIGN -->
- <map code="0xa5" name="yen"/><!-- YEN SIGN -->
- <map code="0xa6" name="brokenbar"/><!-- BROKEN BAR -->
- <map code="0xa7" name="section"/><!-- SECTION SIGN -->
- <map code="0xa8" name="dieresis"/><!-- DIAERESIS -->
- <map code="0xa9" name="copyright"/><!-- COPYRIGHT SIGN -->
- <map code="0xaa" name="ordfeminine"/><!-- FEMININE ORDINAL INDICATOR -->
- <map code="0xab" name="guillemotleft"/><!-- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xac" name="logicalnot"/><!-- NOT SIGN -->
- <map code="0xad" name="sfthyphen"/><!-- SOFT HYPHEN -->
- <map code="0xae" name="registered"/><!-- REGISTERED SIGN -->
- <map code="0xaf" name="macron#1"/><!-- MACRON -->
- <map code="0xb0" name="degree"/><!-- DEGREE SIGN -->
- <map code="0xb1" name="plusminus"/><!-- PLUS-MINUS SIGN -->
- <map code="0xb2" name="twosuperior"/><!-- SUPERSCRIPT TWO -->
- <map code="0xb3" name="threesuperior"/><!-- SUPERSCRIPT THREE -->
- <map code="0xb4" name="acute"/><!-- ACUTE ACCENT -->
- <map code="0xb5" name="mu"/><!-- MICRO SIGN -->
- <map code="0xb6" name="paragraph"/><!-- PILCROW SIGN -->
- <map code="0xb7" name="periodcentered#1"/><!-- MIDDLE DOT -->
- <map code="0xb8" name="cedilla"/><!-- CEDILLA -->
- <map code="0xb9" name="onesuperior"/><!-- SUPERSCRIPT ONE -->
- <map code="0xba" name="ordmasculine"/><!-- MASCULINE ORDINAL INDICATOR -->
- <map code="0xbb" name="guillemotright"/><!-- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xbc" name="onequarter"/><!-- VULGAR FRACTION ONE QUARTER -->
- <map code="0xbd" name="onehalf"/><!-- VULGAR FRACTION ONE HALF -->
- <map code="0xbe" name="threequarters"/><!-- VULGAR FRACTION THREE QUARTERS -->
- <map code="0xbf" name="questiondown"/><!-- INVERTED QUESTION MARK -->
- <map code="0xc0" name="Agrave"/><!-- LATIN CAPITAL LETTER A WITH GRAVE -->
- <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
- <map code="0xc2" name="Acircumflex"/><!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX -->
- <map code="0xc3" name="Atilde"/><!-- LATIN CAPITAL LETTER A WITH TILDE -->
- <map code="0xc4" name="Adieresis"/><!-- LATIN CAPITAL LETTER A WITH DIAERESIS -->
- <map code="0xc5" name="Aring"/><!-- LATIN CAPITAL LETTER A WITH RING ABOVE -->
- <map code="0xc6" name="AE"/><!-- LATIN CAPITAL LETTER AE -->
- <map code="0xc7" name="Ccedilla"/><!-- LATIN CAPITAL LETTER C WITH CEDILLA -->
- <map code="0xc8" name="Egrave"/><!-- LATIN CAPITAL LETTER E WITH GRAVE -->
- <map code="0xc9" name="Eacute"/><!-- LATIN CAPITAL LETTER E WITH ACUTE -->
- <map code="0xca" name="Ecircumflex"/><!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX -->
- <map code="0xcb" name="Edieresis"/><!-- LATIN CAPITAL LETTER E WITH DIAERESIS -->
- <map code="0xcc" name="Igrave"/><!-- LATIN CAPITAL LETTER I WITH GRAVE -->
- <map code="0xcd" name="Iacute"/><!-- LATIN CAPITAL LETTER I WITH ACUTE -->
- <map code="0xce" name="Icircumflex"/><!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX -->
- <map code="0xcf" name="Idieresis"/><!-- LATIN CAPITAL LETTER I WITH DIAERESIS -->
- <map code="0xd0" name="Eth"/><!-- LATIN CAPITAL LETTER ETH -->
- <map code="0xd1" name="Ntilde"/><!-- LATIN CAPITAL LETTER N WITH TILDE -->
- <map code="0xd2" name="Ograve"/><!-- LATIN CAPITAL LETTER O WITH GRAVE -->
- <map code="0xd3" name="Oacute"/><!-- LATIN CAPITAL LETTER O WITH ACUTE -->
- <map code="0xd4" name="Ocircumflex"/><!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX -->
- <map code="0xd5" name="Otilde"/><!-- LATIN CAPITAL LETTER O WITH TILDE -->
- <map code="0xd6" name="Odieresis"/><!-- LATIN CAPITAL LETTER O WITH DIAERESIS -->
- <map code="0xd7" name="multiply"/><!-- MULTIPLICATION SIGN -->
- <map code="0xd8" name="Oslash"/><!-- LATIN CAPITAL LETTER O WITH STROKE -->
- <map code="0xd9" name="Ugrave"/><!-- LATIN CAPITAL LETTER U WITH GRAVE -->
- <map code="0xda" name="Uacute"/><!-- LATIN CAPITAL LETTER U WITH ACUTE -->
- <map code="0xdb" name="Ucircumflex"/><!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX -->
- <map code="0xdc" name="Udieresis"/><!-- LATIN CAPITAL LETTER U WITH DIAERESIS -->
- <map code="0xdd" name="Yacute"/><!-- LATIN CAPITAL LETTER Y WITH ACUTE -->
- <map code="0xde" name="Thorn"/><!-- LATIN CAPITAL LETTER THORN -->
- <map code="0xdf" name="germandbls"/><!-- LATIN SMALL LETTER SHARP S -->
- <map code="0xe0" name="agrave"/><!-- LATIN SMALL LETTER A WITH GRAVE -->
- <map code="0xe1" name="aacute"/><!-- LATIN SMALL LETTER A WITH ACUTE -->
- <map code="0xe2" name="acircumflex"/><!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
- <map code="0xe3" name="atilde"/><!-- LATIN SMALL LETTER A WITH TILDE -->
- <map code="0xe4" name="adieresis"/><!-- LATIN SMALL LETTER A WITH DIAERESIS -->
- <map code="0xe5" name="aring"/><!-- LATIN SMALL LETTER A WITH RING ABOVE -->
- <map code="0xe6" name="ae"/><!-- LATIN SMALL LETTER AE -->
- <map code="0xe7" name="ccedilla"/><!-- LATIN SMALL LETTER C WITH CEDILLA -->
- <map code="0xe8" name="egrave"/><!-- LATIN SMALL LETTER E WITH GRAVE -->
- <map code="0xe9" name="eacute"/><!-- LATIN SMALL LETTER E WITH ACUTE -->
- <map code="0xea" name="ecircumflex"/><!-- LATIN SMALL LETTER E WITH CIRCUMFLEX -->
- <map code="0xeb" name="edieresis"/><!-- LATIN SMALL LETTER E WITH DIAERESIS -->
- <map code="0xec" name="igrave"/><!-- LATIN SMALL LETTER I WITH GRAVE -->
- <map code="0xed" name="iacute"/><!-- LATIN SMALL LETTER I WITH ACUTE -->
- <map code="0xee" name="icircumflex"/><!-- LATIN SMALL LETTER I WITH CIRCUMFLEX -->
- <map code="0xef" name="idieresis"/><!-- LATIN SMALL LETTER I WITH DIAERESIS -->
- <map code="0xf0" name="eth"/><!-- LATIN SMALL LETTER ETH -->
- <map code="0xf1" name="ntilde"/><!-- LATIN SMALL LETTER N WITH TILDE -->
- <map code="0xf2" name="ograve"/><!-- LATIN SMALL LETTER O WITH GRAVE -->
- <map code="0xf3" name="oacute"/><!-- LATIN SMALL LETTER O WITH ACUTE -->
- <map code="0xf4" name="ocircumflex"/><!-- LATIN SMALL LETTER O WITH CIRCUMFLEX -->
- <map code="0xf5" name="otilde"/><!-- LATIN SMALL LETTER O WITH TILDE -->
- <map code="0xf6" name="odieresis"/><!-- LATIN SMALL LETTER O WITH DIAERESIS -->
- <map code="0xf7" name="divide"/><!-- DIVISION SIGN -->
- <map code="0xf8" name="oslash"/><!-- LATIN SMALL LETTER O WITH STROKE -->
- <map code="0xf9" name="ugrave"/><!-- LATIN SMALL LETTER U WITH GRAVE -->
- <map code="0xfa" name="uacute"/><!-- LATIN SMALL LETTER U WITH ACUTE -->
- <map code="0xfb" name="ucircumflex"/><!-- LATIN SMALL LETTER U WITH CIRCUMFLEX -->
- <map code="0xfc" name="udieresis"/><!-- LATIN SMALL LETTER U WITH DIAERESIS -->
- <map code="0xfd" name="yacute"/><!-- LATIN SMALL LETTER Y WITH ACUTE -->
- <map code="0xfe" name="thorn"/><!-- LATIN SMALL LETTER THORN -->
- <map code="0xff" name="ydieresis"/><!-- LATIN SMALL LETTER Y WITH DIAERESIS -->
- <map code="0x100" name="Amacron"/><!-- LATIN CAPITAL LETTER A WITH MACRON -->
- <map code="0x101" name="amacron"/><!-- LATIN SMALL LETTER A WITH MACRON -->
- <map code="0x102" name="Abreve"/><!-- LATIN CAPITAL LETTER A WITH BREVE -->
- <map code="0x103" name="abreve"/><!-- LATIN SMALL LETTER A WITH BREVE -->
- <map code="0x104" name="Aogonek"/><!-- LATIN CAPITAL LETTER A WITH OGONEK -->
- <map code="0x105" name="aogonek"/><!-- LATIN SMALL LETTER A WITH OGONEK -->
- <map code="0x106" name="Cacute"/><!-- LATIN CAPITAL LETTER C WITH ACUTE -->
- <map code="0x107" name="cacute"/><!-- LATIN SMALL LETTER C WITH ACUTE -->
- <map code="0x108" name="Ccircumflex"/><!-- LATIN CAPITAL LETTER C WITH CIRCUMFLEX -->
- <map code="0x109" name="ccircumflex"/><!-- LATIN SMALL LETTER C WITH CIRCUMFLEX -->
- <map code="0x10a" name="Cdotaccent"/><!-- LATIN CAPITAL LETTER C WITH DOT ABOVE -->
- <map code="0x10b" name="cdotaccent"/><!-- LATIN SMALL LETTER C WITH DOT ABOVE -->
- <map code="0x10c" name="Ccaron"/><!-- LATIN CAPITAL LETTER C WITH CARON -->
- <map code="0x10d" name="ccaron"/><!-- LATIN SMALL LETTER C WITH CARON -->
- <map code="0x10e" name="Dcaron"/><!-- LATIN CAPITAL LETTER D WITH CARON -->
- <map code="0x10f" name="dcaron"/><!-- LATIN SMALL LETTER D WITH CARON -->
- <map code="0x110" name="Dcroat"/><!-- LATIN CAPITAL LETTER D WITH STROKE -->
- <map code="0x111" name="dcroat"/><!-- LATIN SMALL LETTER D WITH STROKE -->
- <map code="0x112" name="Emacron"/><!-- LATIN CAPITAL LETTER E WITH MACRON -->
- <map code="0x113" name="emacron"/><!-- LATIN SMALL LETTER E WITH MACRON -->
- <map code="0x114" name="Ebreve"/><!-- LATIN CAPITAL LETTER E WITH BREVE -->
- <map code="0x115" name="ebreve"/><!-- LATIN SMALL LETTER E WITH BREVE -->
- <map code="0x116" name="Edotaccent"/><!-- LATIN CAPITAL LETTER E WITH DOT ABOVE -->
- <map code="0x117" name="edotaccent"/><!-- LATIN SMALL LETTER E WITH DOT ABOVE -->
- <map code="0x118" name="Eogonek"/><!-- LATIN CAPITAL LETTER E WITH OGONEK -->
- <map code="0x119" name="eogonek"/><!-- LATIN SMALL LETTER E WITH OGONEK -->
- <map code="0x11a" name="Ecaron"/><!-- LATIN CAPITAL LETTER E WITH CARON -->
- <map code="0x11b" name="ecaron"/><!-- LATIN SMALL LETTER E WITH CARON -->
- <map code="0x11c" name="Gcircumflex"/><!-- LATIN CAPITAL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11d" name="gcircumflex"/><!-- LATIN SMALL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11e" name="Gbreve"/><!-- LATIN CAPITAL LETTER G WITH BREVE -->
- <map code="0x11f" name="gbreve"/><!-- LATIN SMALL LETTER G WITH BREVE -->
- <map code="0x120" name="Gdotaccent"/><!-- LATIN CAPITAL LETTER G WITH DOT ABOVE -->
- <map code="0x121" name="gdotaccent"/><!-- LATIN SMALL LETTER G WITH DOT ABOVE -->
- <map code="0x122" name="Gcommaaccent"/><!-- LATIN CAPITAL LETTER G WITH CEDILLA -->
- <map code="0x123" name="gcommaaccent"/><!-- LATIN SMALL LETTER G WITH CEDILLA -->
- <map code="0x124" name="Hcircumflex"/><!-- LATIN CAPITAL LETTER H WITH CIRCUMFLEX -->
- <map code="0x125" name="hcircumflex"/><!-- LATIN SMALL LETTER H WITH CIRCUMFLEX -->
- <map code="0x126" name="Hbar"/><!-- LATIN CAPITAL LETTER H WITH STROKE -->
- <map code="0x127" name="hbar"/><!-- LATIN SMALL LETTER H WITH STROKE -->
- <map code="0x128" name="Itilde"/><!-- LATIN CAPITAL LETTER I WITH TILDE -->
- <map code="0x129" name="itilde"/><!-- LATIN SMALL LETTER I WITH TILDE -->
- <map code="0x12a" name="Imacron"/><!-- LATIN CAPITAL LETTER I WITH MACRON -->
- <map code="0x12b" name="imacron"/><!-- LATIN SMALL LETTER I WITH MACRON -->
- <map code="0x12c" name="Ibreve"/><!-- LATIN CAPITAL LETTER I WITH BREVE -->
- <map code="0x12d" name="ibreve"/><!-- LATIN SMALL LETTER I WITH BREVE -->
- <map code="0x12e" name="Iogonek"/><!-- LATIN CAPITAL LETTER I WITH OGONEK -->
- <map code="0x12f" name="iogonek"/><!-- LATIN SMALL LETTER I WITH OGONEK -->
- <map code="0x130" name="Idotaccent"/><!-- LATIN CAPITAL LETTER I WITH DOT ABOVE -->
- <map code="0x131" name="dotlessi"/><!-- LATIN SMALL LETTER DOTLESS I -->
- <map code="0x132" name="IJ"/><!-- LATIN CAPITAL LIGATURE IJ -->
- <map code="0x133" name="ij"/><!-- LATIN SMALL LIGATURE IJ -->
- <map code="0x134" name="Jcircumflex"/><!-- LATIN CAPITAL LETTER J WITH CIRCUMFLEX -->
- <map code="0x135" name="jcircumflex"/><!-- LATIN SMALL LETTER J WITH CIRCUMFLEX -->
- <map code="0x136" name="Kcommaaccent"/><!-- LATIN CAPITAL LETTER K WITH CEDILLA -->
- <map code="0x137" name="kcommaaccent"/><!-- LATIN SMALL LETTER K WITH CEDILLA -->
- <map code="0x138" name="kgreenlandic"/><!-- LATIN SMALL LETTER KRA -->
- <map code="0x139" name="Lacute"/><!-- LATIN CAPITAL LETTER L WITH ACUTE -->
- <map code="0x13a" name="lacute"/><!-- LATIN SMALL LETTER L WITH ACUTE -->
- <map code="0x13b" name="Lcommaaccent"/><!-- LATIN CAPITAL LETTER L WITH CEDILLA -->
- <map code="0x13c" name="lcommaaccent"/><!-- LATIN SMALL LETTER L WITH CEDILLA -->
- <map code="0x13d" name="Lcaron"/><!-- LATIN CAPITAL LETTER L WITH CARON -->
- <map code="0x13e" name="lcaron"/><!-- LATIN SMALL LETTER L WITH CARON -->
- <map code="0x13f" name="Ldot"/><!-- LATIN CAPITAL LETTER L WITH MIDDLE DOT -->
- <map code="0x140" name="ldot"/><!-- LATIN SMALL LETTER L WITH MIDDLE DOT -->
- <map code="0x141" name="Lslash"/><!-- LATIN CAPITAL LETTER L WITH STROKE -->
- <map code="0x142" name="lslash"/><!-- LATIN SMALL LETTER L WITH STROKE -->
- <map code="0x143" name="Nacute"/><!-- LATIN CAPITAL LETTER N WITH ACUTE -->
- <map code="0x144" name="nacute"/><!-- LATIN SMALL LETTER N WITH ACUTE -->
- <map code="0x145" name="Ncommaaccent"/><!-- LATIN CAPITAL LETTER N WITH CEDILLA -->
- <map code="0x146" name="ncommaaccent"/><!-- LATIN SMALL LETTER N WITH CEDILLA -->
- <map code="0x147" name="Ncaron"/><!-- LATIN CAPITAL LETTER N WITH CARON -->
- <map code="0x148" name="ncaron"/><!-- LATIN SMALL LETTER N WITH CARON -->
- <map code="0x149" name="napostrophe"/><!-- LATIN SMALL LETTER N PRECEDED BY APOSTROPHE -->
- <map code="0x14a" name="Eng"/><!-- LATIN CAPITAL LETTER ENG -->
- <map code="0x14b" name="eng"/><!-- LATIN SMALL LETTER ENG -->
- <map code="0x14c" name="Omacron"/><!-- LATIN CAPITAL LETTER O WITH MACRON -->
- <map code="0x14d" name="omacron"/><!-- LATIN SMALL LETTER O WITH MACRON -->
- <map code="0x14e" name="Obreve"/><!-- LATIN CAPITAL LETTER O WITH BREVE -->
- <map code="0x14f" name="obreve"/><!-- LATIN SMALL LETTER O WITH BREVE -->
- <map code="0x150" name="Ohungarumlaut"/><!-- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x151" name="ohungarumlaut"/><!-- LATIN SMALL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x152" name="OE"/><!-- LATIN CAPITAL LIGATURE OE -->
- <map code="0x153" name="oe"/><!-- LATIN SMALL LIGATURE OE -->
- <map code="0x154" name="Racute"/><!-- LATIN CAPITAL LETTER R WITH ACUTE -->
- <map code="0x155" name="racute"/><!-- LATIN SMALL LETTER R WITH ACUTE -->
- <map code="0x156" name="Rcommaaccent"/><!-- LATIN CAPITAL LETTER R WITH CEDILLA -->
- <map code="0x157" name="rcommaaccent"/><!-- LATIN SMALL LETTER R WITH CEDILLA -->
- <map code="0x158" name="Rcaron"/><!-- LATIN CAPITAL LETTER R WITH CARON -->
- <map code="0x159" name="rcaron"/><!-- LATIN SMALL LETTER R WITH CARON -->
- <map code="0x15a" name="Sacute"/><!-- LATIN CAPITAL LETTER S WITH ACUTE -->
- <map code="0x15b" name="sacute"/><!-- LATIN SMALL LETTER S WITH ACUTE -->
- <map code="0x15c" name="Scircumflex"/><!-- LATIN CAPITAL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15d" name="scircumflex"/><!-- LATIN SMALL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15e" name="Scedilla"/><!-- LATIN CAPITAL LETTER S WITH CEDILLA -->
- <map code="0x15f" name="scedilla"/><!-- LATIN SMALL LETTER S WITH CEDILLA -->
- <map code="0x160" name="Scaron"/><!-- LATIN CAPITAL LETTER S WITH CARON -->
- <map code="0x161" name="scaron"/><!-- LATIN SMALL LETTER S WITH CARON -->
- <map code="0x162" name="Tcommaaccent"/><!-- LATIN CAPITAL LETTER T WITH CEDILLA -->
- <map code="0x163" name="tcommaaccent"/><!-- LATIN SMALL LETTER T WITH CEDILLA -->
- <map code="0x164" name="Tcaron"/><!-- LATIN CAPITAL LETTER T WITH CARON -->
- <map code="0x165" name="tcaron"/><!-- LATIN SMALL LETTER T WITH CARON -->
- <map code="0x166" name="Tbar"/><!-- LATIN CAPITAL LETTER T WITH STROKE -->
- <map code="0x167" name="tbar"/><!-- LATIN SMALL LETTER T WITH STROKE -->
- <map code="0x168" name="Utilde"/><!-- LATIN CAPITAL LETTER U WITH TILDE -->
- <map code="0x169" name="utilde"/><!-- LATIN SMALL LETTER U WITH TILDE -->
- <map code="0x16a" name="Umacron"/><!-- LATIN CAPITAL LETTER U WITH MACRON -->
- <map code="0x16b" name="umacron"/><!-- LATIN SMALL LETTER U WITH MACRON -->
- <map code="0x16c" name="Ubreve"/><!-- LATIN CAPITAL LETTER U WITH BREVE -->
- <map code="0x16d" name="ubreve"/><!-- LATIN SMALL LETTER U WITH BREVE -->
- <map code="0x16e" name="Uring"/><!-- LATIN CAPITAL LETTER U WITH RING ABOVE -->
- <map code="0x16f" name="uring"/><!-- LATIN SMALL LETTER U WITH RING ABOVE -->
- <map code="0x170" name="Uhungarumlaut"/><!-- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x171" name="uhungarumlaut"/><!-- LATIN SMALL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x172" name="Uogonek"/><!-- LATIN CAPITAL LETTER U WITH OGONEK -->
- <map code="0x173" name="uogonek"/><!-- LATIN SMALL LETTER U WITH OGONEK -->
- <map code="0x174" name="Wcircumflex"/><!-- LATIN CAPITAL LETTER W WITH CIRCUMFLEX -->
- <map code="0x175" name="wcircumflex"/><!-- LATIN SMALL LETTER W WITH CIRCUMFLEX -->
- <map code="0x176" name="Ycircumflex"/><!-- LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x177" name="ycircumflex"/><!-- LATIN SMALL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x178" name="Ydieresis"/><!-- LATIN CAPITAL LETTER Y WITH DIAERESIS -->
- <map code="0x179" name="Zacute"/><!-- LATIN CAPITAL LETTER Z WITH ACUTE -->
- <map code="0x17a" name="zacute"/><!-- LATIN SMALL LETTER Z WITH ACUTE -->
- <map code="0x17b" name="Zdotaccent"/><!-- LATIN CAPITAL LETTER Z WITH DOT ABOVE -->
- <map code="0x17c" name="zdotaccent"/><!-- LATIN SMALL LETTER Z WITH DOT ABOVE -->
- <map code="0x17d" name="Zcaron"/><!-- LATIN CAPITAL LETTER Z WITH CARON -->
- <map code="0x17e" name="zcaron"/><!-- LATIN SMALL LETTER Z WITH CARON -->
- <map code="0x17f" name="longs"/><!-- LATIN SMALL LETTER LONG S -->
- <map code="0x192" name="florin"/><!-- LATIN SMALL LETTER F WITH HOOK -->
- <map code="0x218" name="Scommaaccent"/><!-- LATIN CAPITAL LETTER S WITH COMMA BELOW -->
- <map code="0x219" name="scommaaccent"/><!-- LATIN SMALL LETTER S WITH COMMA BELOW -->
- <map code="0x21a" name="Tcommabelow"/><!-- LATIN CAPITAL LETTER T WITH COMMA BELOW -->
- <map code="0x21b" name="tcommabelow"/><!-- LATIN SMALL LETTER T WITH COMMA BELOW -->
- <map code="0x2c6" name="circumflex"/><!-- MODIFIER LETTER CIRCUMFLEX ACCENT -->
- <map code="0x2c7" name="caron"/><!-- CARON -->
- <map code="0x2c9" name="macron"/><!-- MODIFIER LETTER MACRON -->
- <map code="0x2d8" name="breve"/><!-- BREVE -->
- <map code="0x2d9" name="dotaccent"/><!-- DOT ABOVE -->
- <map code="0x2da" name="ring"/><!-- RING ABOVE -->
- <map code="0x2db" name="ogonek"/><!-- OGONEK -->
- <map code="0x2dc" name="tilde"/><!-- SMALL TILDE -->
- <map code="0x2dd" name="hungarumlaut"/><!-- DOUBLE ACUTE ACCENT -->
- <map code="0x326" name="Unterkomma"/><!-- COMBINING COMMA BELOW -->
- <map code="0x37e" name="semicolon#1"/><!-- GREEK QUESTION MARK -->
- <map code="0x387" name="anoteleia"/><!-- GREEK ANO TELEIA -->
- <map code="0x2010" name="hyphen#1"/><!-- HYPHEN -->
- <map code="0x2011" name="nbhyphen"/><!-- NON-BREAKING HYPHEN -->
- <map code="0x2012" name="figuredash"/><!-- FIGURE DASH -->
- <map code="0x2013" name="endash"/><!-- EN DASH -->
- <map code="0x2014" name="emdash"/><!-- EM DASH -->
- <map code="0x2015" name="afii00208"/><!-- HORIZONTAL BAR -->
- <map code="0x2018" name="quoteleft"/><!-- LEFT SINGLE QUOTATION MARK -->
- <map code="0x2019" name="quoteright"/><!-- RIGHT SINGLE QUOTATION MARK -->
- <map code="0x201a" name="quotesinglbase"/><!-- SINGLE LOW-9 QUOTATION MARK -->
- <map code="0x201b" name="quotereversed"/><!-- SINGLE HIGH-REVERSED-9 QUOTATION MARK -->
- <map code="0x201c" name="quotedblleft"/><!-- LEFT DOUBLE QUOTATION MARK -->
- <map code="0x201d" name="quotedblright"/><!-- RIGHT DOUBLE QUOTATION MARK -->
- <map code="0x201e" name="quotedblbase"/><!-- DOUBLE LOW-9 QUOTATION MARK -->
- <map code="0x2020" name="dagger"/><!-- DAGGER -->
- <map code="0x2021" name="daggerdbl"/><!-- DOUBLE DAGGER -->
- <map code="0x2022" name="bullet"/><!-- BULLET -->
- <map code="0x2026" name="ellipsis"/><!-- HORIZONTAL ELLIPSIS -->
- <map code="0x2030" name="perthousand"/><!-- PER MILLE SIGN -->
- <map code="0x2039" name="guilsinglleft"/><!-- SINGLE LEFT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203a" name="guilsinglright"/><!-- SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203e" name="radicalex"/><!-- OVERLINE -->
- <map code="0x2044" name="fraction"/><!-- FRACTION SLASH -->
- <map code="0x20ac" name="Euro"/><!-- EURO SIGN -->
- <map code="0x2122" name="trademark"/><!-- TRADE MARK SIGN -->
- <map code="0x212e" name="estimated"/><!-- ESTIMATED SYMBOL -->
- <map code="0x2212" name="minus"/><!-- MINUS SIGN -->
- <map code="0x2215" name="fraction#1"/><!-- DIVISION SLASH -->
- <map code="0x2219" name="periodcentered"/><!-- BULLET OPERATOR -->
- <map code="0x22c5" name="dotmath"/><!-- DOT OPERATOR -->
- <map code="0xea01" name="fi#1"/><!-- Private Use -->
- <map code="0xea02" name="fl#1"/><!-- Private Use -->
- <map code="0xf001" name="fi"/><!-- Private Use -->
- <map code="0xf002" name="fl"/><!-- Private Use -->
- <map code="0xf004" name="foursuperiour"/><!-- Private Use -->
- <map code="0xf6be" name="dotlessj"/><!-- Private Use -->
- <map code="0xfb01" name="fi"/><!-- LATIN SMALL LIGATURE FI -->
- <map code="0xfb02" name="fl"/><!-- LATIN SMALL LIGATURE FL -->
- </cmap_format_4>
- </cmap>
-
- <fpgm>
- <assembly>
- NPUSHB[ ] /* 15 values pushed */
- 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- FDEF[ ]
- SLOOP[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- SLOOP[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[10100]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[10100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00000]
- ENDF[ ]
- FDEF[ ]
- SVTCA[0]
- NPUSHB[ ] /* 10 values pushed */
- 1 0 0 1 1 2 2 3 3 0
- SZPS[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SZPS[ ]
- ENDF[ ]
- </assembly>
- </fpgm>
-
- <prep>
- <assembly>
- PUSHB[ ] /* 2 values pushed */
- 48 1
- PUSHW[ ] /* 1 value pushed */
- 329
- RTG[ ]
- SCANCTRL[ ]
- SCANTYPE[ ]
- SCVTCI[ ]
- </assembly>
- </prep>
-
- <cvt>
- <cv index="0" value="1480"/>
- <cv index="1" value="1086"/>
- <cv index="2" value="0"/>
- <cv index="3" value="-512"/>
- <cv index="4" value="196"/>
- <cv index="5" value="200"/>
- <cv index="6" value="247"/>
- <cv index="7" value="84"/>
- <cv index="8" value="87"/>
- <cv index="9" value="101"/>
- <cv index="10" value="212"/>
- <cv index="11" value="63"/>
- <cv index="12" value="125"/>
- <cv index="13" value="172"/>
- <cv index="14" value="65"/>
- <cv index="15" value="114"/>
- <cv index="16" value="183"/>
- <cv index="17" value="70"/>
- <cv index="18" value="171"/>
- <cv index="19" value="149"/>
- <cv index="20" value="140"/>
- <cv index="21" value="77"/>
- <cv index="22" value="121"/>
- <cv index="23" value="138"/>
- <cv index="24" value="159"/>
- <cv index="25" value="53"/>
- <cv index="26" value="165"/>
- <cv index="27" value="285"/>
- <cv index="28" value="186"/>
- <cv index="29" value="128"/>
- <cv index="30" value="193"/>
- <cv index="31" value="145"/>
- <cv index="32" value="210"/>
- <cv index="33" value="220"/>
- <cv index="34" value="230"/>
- <cv index="35" value="94"/>
- <cv index="36" value="227"/>
- <cv index="37" value="213"/>
- <cv index="38" value="68"/>
- <cv index="39" value="131"/>
- <cv index="40" value="217"/>
- <cv index="41" value="104"/>
- <cv index="42" value="80"/>
- <cv index="43" value="108"/>
- <cv index="44" value="126"/>
- <cv index="45" value="39"/>
- <cv index="46" value="90"/>
- <cv index="47" value="147"/>
- <cv index="48" value="135"/>
- </cvt>
-
- <loca>
- <!-- The 'loca' table will be calculated by the compiler -->
- </loca>
-
- <glyf>
-
- <!-- The xMin, yMin, xMax and yMax values
- will be recalculated by the compiler. -->
-
- <TTGlyph name=".notdef" xMin="51" yMin="0" xMax="461" yMax="1480">
- <contour>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="461" y="1480" on="1"/>
- <pt x="461" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="410" y="51" on="1"/>
- <pt x="410" y="1429" on="1"/>
- <pt x="102" y="1429" on="1"/>
- <pt x="102" y="51" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 16 values pushed */
- 5 6 2 1 4 7 3 0 5 4 2 3 6 7 1 0
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- SVTCA[0]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name=".notdef#1"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#10"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#11"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#12"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#13"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#14"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#15"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#16"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#17"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#18"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#2"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#3"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#4"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#5"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#6"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#7"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#8"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#9"/><!-- contains no outline data -->
-
- <TTGlyph name="A" xMin="0" yMin="0" xMax="1479" yMax="1499">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 61 values pushed */
- 33 32 18 17 14 10 7 1 8 23 0 3 37 9 8 3 13 35 0 0 24 23 7 1 35
- 1 4 48 84 36 35 1 34 16 15 0 3 2 0 14 37 36 35 34 33 32 30 24 23 20
- 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="AE" xMin="0" yMin="0" xMax="1771" yMax="1480">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="17" y="63" on="1"/>
- <pt x="78" y="68" on="0"/>
- <pt x="128" y="151" on="1"/>
- <pt x="194" y="258" on="1"/>
- <pt x="938" y="1480" on="1"/>
- <pt x="1716" y="1480" on="1"/>
- <pt x="1716" y="1221" on="1"/>
- <pt x="1605" y="1221" on="1"/>
- <pt x="1604" y="1240" on="1"/>
- <pt x="1598" y="1324" on="1"/>
- <pt x="1597" y="1380" on="0"/>
- <pt x="1580" y="1390" on="1"/>
- <pt x="1563" y="1399" on="0"/>
- <pt x="1525" y="1399" on="1"/>
- <pt x="1422" y="1400" on="1"/>
- <pt x="1151" y="1400" on="1"/>
- <pt x="1151" y="808" on="1"/>
- <pt x="1379" y="808" on="1"/>
- <pt x="1442" y="811" on="1"/>
- <pt x="1490" y="812" on="0"/>
- <pt x="1500" y="823" on="1"/>
- <pt x="1507" y="833" on="0"/>
- <pt x="1510" y="859" on="1"/>
- <pt x="1511" y="866" on="1"/>
- <pt x="1510" y="873" on="1"/>
- <pt x="1512" y="878" on="0"/>
- <pt x="1512" y="883" on="1"/>
- <pt x="1512" y="897" on="1"/>
- <pt x="1513" y="913" on="1"/>
- <pt x="1515" y="931" on="1"/>
- <pt x="1607" y="931" on="1"/>
- <pt x="1607" y="605" on="1"/>
- <pt x="1515" y="605" on="1"/>
- <pt x="1513" y="623" on="1"/>
- <pt x="1506" y="708" on="0"/>
- <pt x="1482" y="717" on="1"/>
- <pt x="1457" y="728" on="0"/>
- <pt x="1379" y="728" on="1"/>
- <pt x="1151" y="728" on="1"/>
- <pt x="1151" y="259" on="1"/>
- <pt x="1152" y="123" on="0"/>
- <pt x="1191" y="105" on="1"/>
- <pt x="1227" y="86" on="0"/>
- <pt x="1321" y="86" on="1"/>
- <pt x="1427" y="86" on="1"/>
- <pt x="1568" y="92" on="1"/>
- <pt x="1651" y="93" on="0"/>
- <pt x="1656" y="162" on="1"/>
- <pt x="1659" y="253" on="1"/>
- <pt x="1660" y="271" on="1"/>
- <pt x="1771" y="271" on="1"/>
- <pt x="1771" y="0" on="1"/>
- <pt x="756" y="0" on="1"/>
- <pt x="756" y="62" on="1"/>
- <pt x="774" y="63" on="1"/>
- <pt x="842" y="68" on="1"/>
- <pt x="910" y="73" on="0"/>
- <pt x="921" y="95" on="1"/>
- <pt x="932" y="115" on="0"/>
- <pt x="935" y="160" on="1"/>
- <pt x="941" y="259" on="1"/>
- <pt x="941" y="456" on="1"/>
- <pt x="403" y="456" on="1"/>
- <pt x="281" y="258" on="1"/>
- <pt x="255" y="215" on="0"/>
- <pt x="235" y="179" on="1"/>
- <pt x="229" y="167" on="1"/>
- <pt x="219" y="150" on="0"/>
- <pt x="212" y="138" on="1"/>
- <pt x="205" y="125" on="1"/>
- <pt x="204" y="122" on="0"/>
- <pt x="202" y="120" on="1"/>
- <pt x="192" y="105" on="0"/>
- <pt x="192" y="91" on="1"/>
- <pt x="192" y="65" on="0"/>
- <pt x="265" y="65" on="1"/>
- <pt x="269" y="65" on="1"/>
- <pt x="274" y="65" on="0"/>
- <pt x="288" y="64" on="1"/>
- <pt x="306" y="64" on="1"/>
- <pt x="328" y="63" on="1"/>
- <pt x="351" y="62" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="455" y="537" on="1"/>
- <pt x="941" y="537" on="1"/>
- <pt x="941" y="1338" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 147 values pushed */
- 87 32 31 29 28 11 9 8 8 16 18 3 34 33 2 39 85 3 83 81 80 78 77 62 55
- 52 51 49 47 46 45 41 1 15 63 0 3 0 0 17 16 21 1 6 40 39 21 1 18 64
- 63 7 1 85 3 4 48 84 19 18 1 86 85 1 84 54 53 0 3 3 0 7 6 0 14
- 51 49 2 7 32 3 26 25 47 46 45 39 34 31 29 28 26 25 19 16 11 9 14 32 17
- 3 85 84 83 81 80 78 77 64 55 54 6 1 0 13 13 75 62 0 0 87 86 63 62 32
- 3 17 1 4 48 196 53 52 1 8 7 1 33 32 1 41 40 18 17 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aacute" xMin="0" yMin="0" xMax="1479" yMax="1925">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="613" y="1604" on="1"/>
- <pt x="854" y="1925" on="1"/>
- <pt x="1113" y="1925" on="1"/>
- <pt x="706" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 41 38 37 9 8 5 39 35 3 33 32 18 17 14 10 7 1 8 23 0 3 0 0 24 23
- 7 1 35 1 4 48 84 40 39 1 36 35 1 34 16 15 0 3 3 0 14 41 40 39 38
- 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Abreve" xMin="0" yMin="0" xMax="1479" yMax="1925">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="408" y="1925" on="1"/>
- <pt x="473" y="1925" on="1"/>
- <pt x="500" y="1835" on="0"/>
- <pt x="560" y="1793" on="1"/>
- <pt x="628" y="1746" on="0"/>
- <pt x="741" y="1746" on="1"/>
- <pt x="867" y="1746" on="0"/>
- <pt x="937" y="1805" on="1"/>
- <pt x="985" y="1845" on="0"/>
- <pt x="1010" y="1925" on="1"/>
- <pt x="1074" y="1925" on="1"/>
- <pt x="1055" y="1790" on="0"/>
- <pt x="983" y="1709" on="1"/>
- <pt x="889" y="1604" on="0"/>
- <pt x="741" y="1604" on="1"/>
- <pt x="587" y="1604" on="0"/>
- <pt x="492" y="1719" on="1"/>
- <pt x="427" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 43 20 52 48 84 33 32 18 17 14 10 7 1 8 23 0 3 48 47 39 38 37 9
- 8 7 13 52 35 0 0 24 23 7 1 35 1 4 48 84 36 35 1 34 16 15 0 3 2
- 0 14 48 47 39 38 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Acircumflex" xMin="0" yMin="0" xMax="1479" yMax="1925">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="389" y="1604" on="1"/>
- <pt x="630" y="1925" on="1"/>
- <pt x="852" y="1925" on="1"/>
- <pt x="1092" y="1604" on="1"/>
- <pt x="1006" y="1604" on="1"/>
- <pt x="741" y="1826" on="1"/>
- <pt x="475" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 44 43 42 41 38 37 9 8 8 39 35 3 33 32 18 17 14 10 7 1 8 23 0 3 0
- 0 24 23 7 1 35 1 4 48 84 40 39 1 36 35 1 34 16 15 0 3 3 0 14 44
- 43 42 41 40 39 38 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Adieresis" xMin="0" yMin="0" xMax="1479" yMax="1777">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="457" y="1604" on="1"/>
- <pt x="457" y="1777" on="1"/>
- <pt x="630" y="1777" on="1"/>
- <pt x="630" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="852" y="1604" on="1"/>
- <pt x="852" y="1777" on="1"/>
- <pt x="1025" y="1777" on="1"/>
- <pt x="1025" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 112 values pushed */
- 37 9 8 3 38 35 3 33 32 18 17 14 10 7 1 8 23 0 3 0 0 45 42 41 38
- 13 3 39 24 23 7 1 35 2 4 48 84 44 43 40 39 3 36 35 1 34 16 15 0 3
- 3 0 14 36 23 18 17 16 5 44 42 3 37 9 8 3 42 40 3 15 14 10 3 13 20
- 44 35 34 33 32 24 7 1 0 8 13 30 38 0 0 43 42 13 1 44 41 40 13 1 38
- 2 4 48 196 45 44 1 39 38 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Agrave" xMin="0" yMin="0" xMax="1479" yMax="1925">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="874" y="1604" on="1"/>
- <pt x="781" y="1604" on="1"/>
- <pt x="374" y="1925" on="1"/>
- <pt x="633" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 39 38 37 9 8 5 40 35 3 33 32 18 17 14 10 7 1 8 23 0 3 0 0 24 23
- 7 1 35 1 4 48 84 41 40 1 36 35 1 34 16 15 0 3 3 0 14 41 40 39 38
- 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Amacron" xMin="0" yMin="0" xMax="1479" yMax="1727">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="420" y="1604" on="1"/>
- <pt x="420" y="1727" on="1"/>
- <pt x="1062" y="1727" on="1"/>
- <pt x="1062" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 37 9 8 3 38 35 3 33 32 18 17 14 10 7 1 8 23 0 3 0 0 41 38 12 1
- 39 24 23 7 1 35 2 4 48 84 40 39 1 36 35 1 34 16 15 0 3 3 0 14 41
- 40 39 38 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aogonek" xMin="0" yMin="-370" xMax="1479" yMax="1499">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="1454" y="-273" on="1"/>
- <pt x="1454" y="-341" on="1"/>
- <pt x="1383" y="-370" on="0"/>
- <pt x="1305" y="-370" on="1"/>
- <pt x="1085" y="-370" on="0"/>
- <pt x="1085" y="-211" on="1"/>
- <pt x="1085" y="-90" on="0"/>
- <pt x="1243" y="0" on="1"/>
- <pt x="1350" y="0" on="1"/>
- <pt x="1221" y="-81" on="0"/>
- <pt x="1221" y="-182" on="1"/>
- <pt x="1221" y="-289" on="0"/>
- <pt x="1354" y="-289" on="1"/>
- <pt x="1405" y="-289" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 50 7 41 48 84 33 32 18 17 14 10 7 1 8 23 0 3 37 9 8 3 13 35
- 39 38 41 0 0 0 24 23 7 1 35 1 4 48 84 36 35 1 46 45 34 16 15 0 5
- 2 0 14 0 0 48 48 43 48 196 46 45 43 39 38 37 36 35 34 33 32 30 24 23 20
- 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aring" xMin="0" yMin="0" xMax="1479" yMax="1934">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="741" y="1934" on="1"/>
- <pt x="835" y="1934" on="0"/>
- <pt x="901" y="1868" on="1"/>
- <pt x="968" y="1802" on="0"/>
- <pt x="968" y="1708" on="1"/>
- <pt x="968" y="1612" on="0"/>
- <pt x="901" y="1546" on="1"/>
- <pt x="835" y="1480" on="0"/>
- <pt x="739" y="1480" on="1"/>
- <pt x="656" y="1480" on="0"/>
- <pt x="594" y="1534" on="1"/>
- <pt x="514" y="1603" on="0"/>
- <pt x="514" y="1707" on="1"/>
- <pt x="514" y="1802" on="0"/>
- <pt x="580" y="1868" on="1"/>
- <pt x="646" y="1934" on="0"/>
- </contour>
- <contour>
- <pt x="741" y="1866" on="1"/>
- <pt x="675" y="1866" on="0"/>
- <pt x="628" y="1819" on="1"/>
- <pt x="582" y="1773" on="0"/>
- <pt x="582" y="1708" on="1"/>
- <pt x="582" y="1642" on="0"/>
- <pt x="628" y="1595" on="1"/>
- <pt x="674" y="1548" on="0"/>
- <pt x="739" y="1548" on="1"/>
- <pt x="800" y="1548" on="0"/>
- <pt x="844" y="1585" on="1"/>
- <pt x="900" y="1633" on="0"/>
- <pt x="900" y="1708" on="1"/>
- <pt x="900" y="1774" on="0"/>
- <pt x="853" y="1820" on="1"/>
- <pt x="806" y="1866" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 93 values pushed */
- 0 0 62 17 46 54 17 38 48 84 46 0 1 37 0 35 2 0 33 32 18 17 14 10 7
- 1 8 23 0 3 1 9 8 2 13 38 0 0 0 0 24 23 7 1 35 1 4 48 84 36
- 35 1 34 16 15 0 3 2 0 14 0 0 66 17 42 58 17 50 48 196 50 42 37 36 35
- 34 33 32 30 24 23 20 18 17 16 15 14 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Atilde" xMin="0" yMin="0" xMax="1479" yMax="1839">
- <contour>
- <pt x="0" y="0" on="1"/>
- <pt x="0" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="67" on="0"/>
- <pt x="102" y="87" on="1"/>
- <pt x="117" y="103" on="0"/>
- <pt x="139" y="154" on="1"/>
- <pt x="185" y="259" on="1"/>
- <pt x="706" y="1499" on="1"/>
- <pt x="776" y="1499" on="1"/>
- <pt x="1295" y="252" on="1"/>
- <pt x="1345" y="149" on="1"/>
- <pt x="1385" y="67" on="0"/>
- <pt x="1457" y="63" on="1"/>
- <pt x="1479" y="62" on="1"/>
- <pt x="1479" y="0" on="1"/>
- <pt x="990" y="0" on="1"/>
- <pt x="990" y="62" on="1"/>
- <pt x="1008" y="62" on="1"/>
- <pt x="1111" y="62" on="0"/>
- <pt x="1111" y="106" on="1"/>
- <pt x="1111" y="160" on="0"/>
- <pt x="1069" y="259" on="1"/>
- <pt x="986" y="456" on="1"/>
- <pt x="352" y="456" on="1"/>
- <pt x="267" y="259" on="1"/>
- <pt x="250" y="220" on="0"/>
- <pt x="245" y="205" on="1"/>
- <pt x="223" y="135" on="1"/>
- <pt x="217" y="116" on="0"/>
- <pt x="217" y="102" on="1"/>
- <pt x="217" y="62" on="0"/>
- <pt x="309" y="62" on="1"/>
- <pt x="325" y="62" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="385" y="537" on="1"/>
- <pt x="950" y="537" on="1"/>
- <pt x="669" y="1211" on="1"/>
- </contour>
- <contour>
- <pt x="408" y="1604" on="1"/>
- <pt x="435" y="1744" on="0"/>
- <pt x="504" y="1797" on="1"/>
- <pt x="558" y="1839" on="0"/>
- <pt x="635" y="1839" on="1"/>
- <pt x="700" y="1839" on="0"/>
- <pt x="753" y="1801" on="1"/>
- <pt x="788" y="1776" on="1"/>
- <pt x="840" y="1739" on="0"/>
- <pt x="894" y="1739" on="1"/>
- <pt x="989" y="1739" on="0"/>
- <pt x="1012" y="1838" on="1"/>
- <pt x="1074" y="1838" on="1"/>
- <pt x="1046" y="1699" on="0"/>
- <pt x="978" y="1646" on="1"/>
- <pt x="924" y="1604" on="0"/>
- <pt x="847" y="1604" on="1"/>
- <pt x="784" y="1604" on="0"/>
- <pt x="729" y="1642" on="1"/>
- <pt x="694" y="1666" on="1"/>
- <pt x="639" y="1704" on="0"/>
- <pt x="588" y="1704" on="1"/>
- <pt x="499" y="1704" on="0"/>
- <pt x="470" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 59 20 42 47 20 54 48 84 33 32 18 17 14 10 7 1 8 23 0 3 61 50 49
- 38 37 9 8 7 13 54 42 35 0 0 24 23 7 1 35 1 4 48 84 36 35 1 34 16
- 15 0 3 2 0 14 61 50 49 38 37 36 35 34 33 32 30 24 23 20 18 17 16 15 14
- 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="B" xMin="47" yMin="0" xMax="1245" yMax="1480">
- <contour>
- <pt x="788" y="767" on="1"/>
- <pt x="968" y="742" on="0"/>
- <pt x="1066" y="687" on="1"/>
- <pt x="1245" y="586" on="0"/>
- <pt x="1245" y="371" on="1"/>
- <pt x="1245" y="202" on="0"/>
- <pt x="1130" y="103" on="1"/>
- <pt x="1010" y="0" on="0"/>
- <pt x="676" y="0" on="1"/>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="133" y="68" on="1"/>
- <pt x="209" y="74" on="0"/>
- <pt x="219" y="115" on="1"/>
- <pt x="232" y="177" on="0"/>
- <pt x="232" y="259" on="1"/>
- <pt x="232" y="1221" on="1"/>
- <pt x="232" y="1280" on="0"/>
- <pt x="225" y="1333" on="1"/>
- <pt x="219" y="1372" on="0"/>
- <pt x="211" y="1384" on="1"/>
- <pt x="193" y="1410" on="0"/>
- <pt x="133" y="1413" on="1"/>
- <pt x="66" y="1417" on="1"/>
- <pt x="47" y="1419" on="1"/>
- <pt x="47" y="1480" on="1"/>
- <pt x="705" y="1480" on="1"/>
- <pt x="932" y="1480" on="0"/>
- <pt x="1016" y="1437" on="1"/>
- <pt x="1184" y="1351" on="0"/>
- <pt x="1184" y="1150" on="1"/>
- <pt x="1184" y="995" on="0"/>
- <pt x="1091" y="899" on="1"/>
- <pt x="1025" y="830" on="0"/>
- <pt x="913" y="795" on="1"/>
- <pt x="872" y="782" on="0"/>
- </contour>
- <contour>
- <pt x="439" y="734" on="1"/>
- <pt x="439" y="259" on="1"/>
- <pt x="442" y="172" on="1"/>
- <pt x="445" y="97" on="0"/>
- <pt x="493" y="82" on="1"/>
- <pt x="537" y="68" on="0"/>
- <pt x="637" y="68" on="1"/>
- <pt x="1026" y="68" on="0"/>
- <pt x="1026" y="368" on="1"/>
- <pt x="1026" y="591" on="0"/>
- <pt x="857" y="670" on="1"/>
- <pt x="726" y="731" on="0"/>
- </contour>
- <contour>
- <pt x="439" y="802" on="1"/>
- <pt x="550" y="802" on="1"/>
- <pt x="775" y="802" on="0"/>
- <pt x="871" y="877" on="1"/>
- <pt x="968" y="952" on="0"/>
- <pt x="968" y="1129" on="1"/>
- <pt x="968" y="1312" on="0"/>
- <pt x="853" y="1367" on="1"/>
- <pt x="757" y="1413" on="0"/>
- <pt x="539" y="1413" on="1"/>
- <pt x="439" y="1413" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 17 26 16 9 43 59 58 50 49 43 38 37 0 8 26 8 3 9 8 1 0 27 26 0 14
- 0 0 54 10 31 45 33 4 48 196 26 17 9 16 58 50 27 8 0 5 13 31 4 37 0
- 0 59 49 38 37 32 3 16 1 4 48 196 17 16 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="C" xMin="80" yMin="-37" xMax="1269" yMax="1517">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1060" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="573" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1073" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 32 9 2 24 17 10 48 84 10 0 2 2 1 1 34 20 19 18 17 14 13 12 0
- 9 0 2 3 0 0 14 0 0 28 34 6 48 196 34 0 2 13 12 20 19 18 17 14 5
- 13 6 12 13 12 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cacute" xMin="80" yMin="-37" xMax="1269" yMax="1925">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1060" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="573" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1073" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="703" y="1604" on="1"/>
- <pt x="944" y="1925" on="1"/>
- <pt x="1203" y="1925" on="1"/>
- <pt x="796" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 32 9 2 24 17 10 48 84 10 0 2 2 1 38 35 2 36 0 3 0 1 1 34
- 20 19 18 17 14 13 12 0 9 0 2 3 0 0 37 36 1 0 14 0 0 28 34 6 48
- 196 34 0 2 13 12 38 37 36 35 20 19 18 17 14 9 13 6 12 13 12 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccaron" xMin="80" yMin="-37" xMax="1269" yMax="1925">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1060" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="573" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1073" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="1146" y="1925" on="1"/>
- <pt x="906" y="1604" on="1"/>
- <pt x="684" y="1604" on="1"/>
- <pt x="443" y="1925" on="1"/>
- <pt x="529" y="1925" on="1"/>
- <pt x="795" y="1703" on="1"/>
- <pt x="1060" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 32 9 2 24 17 10 48 84 10 0 2 2 1 1 34 20 19 18 17 14 13 12 0
- 9 0 2 3 0 0 41 40 39 38 35 5 13 36 37 36 1 0 14 0 0 28 34 6 48
- 196 34 0 2 13 12 41 40 39 38 37 36 35 20 19 18 17 14 12 13 6 12 13 12 1
- 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccedilla" xMin="80" yMin="-432" xMax="1269" yMax="1517">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1058" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="572" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="619" y="-411" on="1"/>
- <pt x="619" y="-343" on="1"/>
- <pt x="681" y="-359" on="0"/>
- <pt x="720" y="-359" on="1"/>
- <pt x="827" y="-359" on="0"/>
- <pt x="827" y="-277" on="1"/>
- <pt x="827" y="-179" on="0"/>
- <pt x="640" y="-175" on="1"/>
- <pt x="735" y="0" on="1"/>
- <pt x="814" y="0" on="1"/>
- <pt x="748" y="-119" on="1"/>
- <pt x="965" y="-138" on="0"/>
- <pt x="965" y="-266" on="1"/>
- <pt x="965" y="-336" on="0"/>
- <pt x="907" y="-384" on="1"/>
- <pt x="850" y="-432" on="0"/>
- <pt x="763" y="-432" on="1"/>
- <pt x="695" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 38 17 51 32 9 2 24 17 10 48 84 10 0 2 2 1 1 34 20 19 18 17 14
- 13 12 0 9 0 2 3 0 0 1 45 44 43 42 36 35 6 13 51 2 0 14 0 0 40
- 48 47 28 34 6 48 196 34 0 2 13 12 45 44 43 42 36 35 20 19 18 17 14 11 13
- 47 6 12 13 12 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccircumflex" xMin="80" yMin="-37" xMax="1269" yMax="1925">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1060" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="573" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1073" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="443" y="1604" on="1"/>
- <pt x="684" y="1925" on="1"/>
- <pt x="906" y="1925" on="1"/>
- <pt x="1146" y="1604" on="1"/>
- <pt x="1060" y="1604" on="1"/>
- <pt x="795" y="1826" on="1"/>
- <pt x="529" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 32 9 2 24 17 10 48 84 10 0 2 2 1 41 40 39 38 35 5 36 0 3 0
- 1 1 34 20 19 18 17 14 13 12 0 9 0 2 3 0 0 37 36 1 0 14 0 0 28
- 34 6 48 196 34 0 2 13 12 41 40 39 38 37 36 35 20 19 18 17 14 12 13 6 12
- 13 12 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cdotaccent" xMin="80" yMin="-37" xMax="1269" yMax="1801">
- <contour>
- <pt x="1269" y="79" on="1"/>
- <pt x="1060" y="-37" on="0"/>
- <pt x="809" y="-37" on="1"/>
- <pt x="472" y="-37" on="0"/>
- <pt x="276" y="173" on="1"/>
- <pt x="80" y="383" on="0"/>
- <pt x="80" y="745" on="1"/>
- <pt x="80" y="1105" on="0"/>
- <pt x="268" y="1311" on="1"/>
- <pt x="455" y="1517" on="0"/>
- <pt x="789" y="1517" on="1"/>
- <pt x="996" y="1517" on="0"/>
- <pt x="1244" y="1443" on="1"/>
- <pt x="1244" y="1160" on="1"/>
- <pt x="1120" y="1160" on="1"/>
- <pt x="1119" y="1180" on="1"/>
- <pt x="1119" y="1185" on="0"/>
- <pt x="1118" y="1212" on="1"/>
- <pt x="1118" y="1223" on="1"/>
- <pt x="1118" y="1233" on="1"/>
- <pt x="1118" y="1239" on="1"/>
- <pt x="1118" y="1326" on="0"/>
- <pt x="1049" y="1381" on="1"/>
- <pt x="963" y="1450" on="0"/>
- <pt x="806" y="1450" on="1"/>
- <pt x="573" y="1450" on="0"/>
- <pt x="440" y="1261" on="1"/>
- <pt x="308" y="1073" on="0"/>
- <pt x="308" y="750" on="1"/>
- <pt x="308" y="425" on="0"/>
- <pt x="462" y="243" on="1"/>
- <pt x="615" y="62" on="0"/>
- <pt x="880" y="62" on="1"/>
- <pt x="1057" y="62" on="0"/>
- <pt x="1269" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="696" y="1604" on="1"/>
- <pt x="696" y="1801" on="1"/>
- <pt x="893" y="1801" on="1"/>
- <pt x="893" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 0 0 32 9 2 24 17 10 48 84 10 0 2 2 1 1 34 20 19 18 17 14 13 12 0
- 9 0 2 3 0 0 0 0 38 35 5 1 36 1 4 48 84 37 36 1 0 14 0 0 28
- 34 6 48 196 20 19 18 17 14 5 12 37 3 34 0 2 13 12 6 35 0 0 36 35 4
- 1 37 1 4 48 196 38 37 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="D" xMin="41" yMin="0" xMax="1399" yMax="1489">
- <contour>
- <pt x="465" y="1480" on="1"/>
- <pt x="536" y="1481" on="1"/>
- <pt x="608" y="1484" on="1"/>
- <pt x="680" y="1485" on="1"/>
- <pt x="989" y="1489" on="0"/>
- <pt x="1176" y="1335" on="1"/>
- <pt x="1399" y="1152" on="0"/>
- <pt x="1399" y="772" on="1"/>
- <pt x="1399" y="414" on="0"/>
- <pt x="1208" y="207" on="1"/>
- <pt x="1017" y="0" on="0"/>
- <pt x="687" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="127" y="68" on="1"/>
- <pt x="203" y="74" on="0"/>
- <pt x="213" y="115" on="1"/>
- <pt x="226" y="177" on="0"/>
- <pt x="226" y="259" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="187" y="1410" on="0"/>
- <pt x="127" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="436" y="1413" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="440" y="181" on="1"/>
- <pt x="444" y="110" on="0"/>
- <pt x="498" y="87" on="1"/>
- <pt x="544" y="68" on="0"/>
- <pt x="638" y="68" on="1"/>
- <pt x="894" y="68" on="0"/>
- <pt x="1032" y="243" on="1"/>
- <pt x="1171" y="419" on="0"/>
- <pt x="1171" y="743" on="1"/>
- <pt x="1171" y="1098" on="0"/>
- <pt x="1021" y="1256" on="1"/>
- <pt x="871" y="1413" on="0"/>
- <pt x="532" y="1413" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 20 29 19 12 36 44 36 31 30 4 0 11 3 12 11 1 0 29 0 0 14 0 0 40 34
- 7 48 196 29 20 12 19 44 11 0 3 13 7 30 0 0 31 30 32 1 19 1 4 48 196
- 20 19 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcaron" xMin="41" yMin="0" xMax="1399" yMax="1925">
- <contour>
- <pt x="465" y="1480" on="1"/>
- <pt x="536" y="1481" on="1"/>
- <pt x="608" y="1484" on="1"/>
- <pt x="680" y="1485" on="1"/>
- <pt x="989" y="1489" on="0"/>
- <pt x="1176" y="1335" on="1"/>
- <pt x="1399" y="1152" on="0"/>
- <pt x="1399" y="772" on="1"/>
- <pt x="1399" y="414" on="0"/>
- <pt x="1208" y="207" on="1"/>
- <pt x="1017" y="0" on="0"/>
- <pt x="687" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="127" y="68" on="1"/>
- <pt x="203" y="74" on="0"/>
- <pt x="213" y="115" on="1"/>
- <pt x="226" y="177" on="0"/>
- <pt x="226" y="259" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="187" y="1410" on="0"/>
- <pt x="127" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="436" y="1413" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="440" y="181" on="1"/>
- <pt x="444" y="110" on="0"/>
- <pt x="498" y="87" on="1"/>
- <pt x="544" y="68" on="0"/>
- <pt x="638" y="68" on="1"/>
- <pt x="894" y="68" on="0"/>
- <pt x="1032" y="243" on="1"/>
- <pt x="1171" y="419" on="0"/>
- <pt x="1171" y="743" on="1"/>
- <pt x="1171" y="1098" on="0"/>
- <pt x="1021" y="1256" on="1"/>
- <pt x="871" y="1413" on="0"/>
- <pt x="532" y="1413" on="1"/>
- </contour>
- <contour>
- <pt x="1046" y="1925" on="1"/>
- <pt x="806" y="1604" on="1"/>
- <pt x="584" y="1604" on="1"/>
- <pt x="343" y="1925" on="1"/>
- <pt x="429" y="1925" on="1"/>
- <pt x="695" y="1703" on="1"/>
- <pt x="960" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 20 29 19 12 36 44 36 31 30 4 0 11 3 51 50 49 48 45 5 13 46 47 46 1 12
- 11 1 2 0 29 0 0 14 0 0 40 34 7 48 196 29 20 12 19 49 48 2 30 19 3
- 51 50 47 46 45 44 11 0 8 13 7 30 0 0 31 30 32 1 19 1 4 48 196 20 19
- 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcroat" xMin="41" yMin="0" xMax="1399" yMax="1489">
- <contour>
- <pt x="226" y="716" on="1"/>
- <pt x="41" y="716" on="1"/>
- <pt x="41" y="783" on="1"/>
- <pt x="226" y="783" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="187" y="1410" on="0"/>
- <pt x="127" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- <pt x="465" y="1480" on="1"/>
- <pt x="536" y="1481" on="1"/>
- <pt x="608" y="1484" on="1"/>
- <pt x="680" y="1485" on="1"/>
- <pt x="989" y="1489" on="0"/>
- <pt x="1176" y="1335" on="1"/>
- <pt x="1399" y="1151" on="0"/>
- <pt x="1399" y="772" on="1"/>
- <pt x="1399" y="414" on="0"/>
- <pt x="1208" y="207" on="1"/>
- <pt x="1017" y="0" on="0"/>
- <pt x="687" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="127" y="68" on="1"/>
- <pt x="203" y="74" on="0"/>
- <pt x="213" y="115" on="1"/>
- <pt x="226" y="177" on="0"/>
- <pt x="226" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="436" y="716" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="440" y="181" on="1"/>
- <pt x="444" y="110" on="0"/>
- <pt x="498" y="87" on="1"/>
- <pt x="544" y="68" on="0"/>
- <pt x="638" y="68" on="1"/>
- <pt x="894" y="68" on="0"/>
- <pt x="1032" y="243" on="1"/>
- <pt x="1171" y="419" on="0"/>
- <pt x="1171" y="743" on="1"/>
- <pt x="1171" y="1098" on="0"/>
- <pt x="1021" y="1256" on="1"/>
- <pt x="871" y="1413" on="0"/>
- <pt x="532" y="1413" on="1"/>
- <pt x="436" y="1413" on="1"/>
- <pt x="436" y="783" on="1"/>
- <pt x="781" y="783" on="1"/>
- <pt x="781" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 33 26 4 13 49 48 2 13 2 3 40 40 35 2 0 25 3 0 0 52 34 1 0 14 3
- 2 1 4 48 84 51 50 3 2 3 26 25 1 2 0 14 13 0 14 0 0 44 34 21 48
- 196 26 33 13 4 52 51 48 25 14 5 13 21 34 2 1 0 0 0 50 49 35 34 32 3
- 0 1 4 48 196 33 4 3 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="E" xMin="43" yMin="0" xMax="1202" yMax="1480">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23 22 6 28 34 3 0
- 0 10 9 21 1 0 35 34 7 1 43 2 4 48 84 29 28 1 44 43 1 2 0 61 0
- 0 14 61 52 44 51 41 2 2 0 21 3 35 34 28 26 23 20 12 9 8 21 10 3 0
- 0 30 29 11 10 32 3 51 1 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eacute" xMin="43" yMin="0" xMax="1202" yMax="1925">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="1604" on="1"/>
- <pt x="654" y="1925" on="1"/>
- <pt x="913" y="1925" on="1"/>
- <pt x="506" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 117 values pushed */
- 52 61 51 44 65 62 2 63 0 3 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23
- 22 6 28 34 3 0 0 10 9 21 1 0 35 34 7 1 43 2 4 48 84 64 63 1 29
- 28 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 65 64 63 35
- 34 28 26 23 20 12 9 11 21 10 3 62 10 51 2 0 0 30 29 11 10 32 3 51 1
- 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ebreve" xMin="43" yMin="0" xMax="1202" yMax="1925">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="315" y="1925" on="1"/>
- <pt x="380" y="1925" on="1"/>
- <pt x="407" y="1835" on="0"/>
- <pt x="467" y="1793" on="1"/>
- <pt x="535" y="1746" on="0"/>
- <pt x="648" y="1746" on="1"/>
- <pt x="774" y="1746" on="0"/>
- <pt x="844" y="1805" on="1"/>
- <pt x="893" y="1845" on="0"/>
- <pt x="917" y="1925" on="1"/>
- <pt x="981" y="1925" on="1"/>
- <pt x="962" y="1790" on="0"/>
- <pt x="890" y="1709" on="1"/>
- <pt x="796" y="1604" on="0"/>
- <pt x="648" y="1604" on="1"/>
- <pt x="494" y="1604" on="0"/>
- <pt x="399" y="1719" on="1"/>
- <pt x="334" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 0 0 67 20 76 48 84 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26
- 23 22 6 28 34 3 72 71 63 62 4 13 76 0 0 0 10 9 21 1 0 35 34 7 1
- 43 2 4 48 84 29 28 1 44 43 1 2 0 61 0 0 14 61 52 44 51 41 2 2 0
- 21 3 72 71 35 34 28 26 23 20 12 9 10 21 10 3 63 62 2 10 51 3 0 0 30
- 29 11 10 32 3 51 1 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecaron" xMin="43" yMin="0" xMax="1202" yMax="1925">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="1024" y="1925" on="1"/>
- <pt x="784" y="1604" on="1"/>
- <pt x="562" y="1604" on="1"/>
- <pt x="321" y="1925" on="1"/>
- <pt x="407" y="1925" on="1"/>
- <pt x="673" y="1703" on="1"/>
- <pt x="938" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 123 values pushed */
- 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23 22 6 28 34 3 68
- 67 66 65 62 5 13 63 0 0 10 9 21 1 0 35 34 7 1 43 2 4 48 84 64 63
- 1 29 28 1 44 43 1 3 0 61 0 0 14 61 52 44 51 62 41 2 3 0 21 3 68
- 67 64 63 35 34 28 26 23 20 12 9 12 21 10 3 66 65 2 10 51 3 0 0 30 29
- 11 10 32 3 51 1 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecircumflex" xMin="43" yMin="0" xMax="1202" yMax="1925">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="265" y="1604" on="1"/>
- <pt x="506" y="1925" on="1"/>
- <pt x="728" y="1925" on="1"/>
- <pt x="968" y="1604" on="1"/>
- <pt x="882" y="1604" on="1"/>
- <pt x="617" y="1826" on="1"/>
- <pt x="351" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 124 values pushed */
- 52 61 51 44 68 67 66 65 62 5 63 0 3 21 20 12 11 2 1 6 9 28 3 42 41
- 30 26 23 22 6 28 34 3 0 0 10 9 21 1 0 35 34 7 1 43 2 4 48 84 64
- 63 1 29 28 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 67
- 66 65 64 63 35 34 28 26 23 20 12 9 13 21 10 3 68 62 2 10 51 3 0 0 30
- 29 11 10 32 3 51 1 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edieresis" xMin="43" yMin="0" xMax="1202" yMax="1777">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="326" y="1604" on="1"/>
- <pt x="326" y="1777" on="1"/>
- <pt x="499" y="1777" on="1"/>
- <pt x="499" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="721" y="1604" on="1"/>
- <pt x="721" y="1777" on="1"/>
- <pt x="894" y="1777" on="1"/>
- <pt x="894" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 136 values pushed */
- 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23 22 6 28 34 3 0
- 0 69 66 65 62 13 3 63 10 9 21 1 0 35 34 7 1 43 3 4 48 84 68 67 64
- 63 3 29 28 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 26
- 23 20 3 21 68 3 35 28 12 9 4 68 66 3 34 66 64 2 0 0 67 66 13 1 68
- 65 64 13 1 62 30 29 11 10 32 3 51 3 4 48 196 69 68 1 63 62 1 43 42 1
- 1 0 1 22 21 1 52 51 1 6 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edotaccent" xMin="43" yMin="0" xMax="1202" yMax="1801">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="536" y="1604" on="1"/>
- <pt x="536" y="1801" on="1"/>
- <pt x="733" y="1801" on="1"/>
- <pt x="733" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 120 values pushed */
- 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23 22 6 28 34 3 0
- 0 65 62 5 1 63 10 9 21 1 0 35 34 7 1 43 3 4 48 84 64 63 1 29 28
- 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 35 28 26 23 20
- 12 9 7 21 64 3 34 64 62 2 0 0 65 64 4 1 62 30 29 11 10 32 3 51 2
- 4 48 196 63 62 1 43 42 1 1 0 1 22 21 1 52 51 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Egrave" xMin="43" yMin="0" xMax="1202" yMax="1925">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="792" y="1604" on="1"/>
- <pt x="699" y="1604" on="1"/>
- <pt x="292" y="1925" on="1"/>
- <pt x="551" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 117 values pushed */
- 52 61 51 44 63 62 2 64 0 3 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23
- 22 6 28 34 3 0 0 10 9 21 1 0 35 34 7 1 43 2 4 48 84 65 64 1 29
- 28 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 65 63 62 35
- 34 28 26 23 20 12 9 11 21 10 3 64 10 51 2 0 0 30 29 11 10 32 3 51 1
- 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Emacron" xMin="43" yMin="0" xMax="1202" yMax="1727">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="827" on="1"/>
- <pt x="933" y="840" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="339" y="1604" on="1"/>
- <pt x="339" y="1727" on="1"/>
- <pt x="981" y="1727" on="1"/>
- <pt x="981" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 117 values pushed */
- 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26 23 22 6 28 34 3 0
- 0 65 62 12 1 63 10 9 21 1 0 35 34 7 1 43 3 4 48 84 64 63 1 29 28
- 1 44 43 1 3 0 61 0 0 14 61 52 44 51 41 2 2 0 21 3 65 64 35 34 28
- 26 23 20 12 9 10 21 10 3 63 62 2 10 51 3 0 0 30 29 11 10 32 3 51 1
- 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eng" xMin="43" yMin="-296" xMax="1435" yMax="1480">
- <contour>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1335" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1149" y="1384" on="0"/>
- <pt x="1130" y="1397" on="1"/>
- <pt x="1112" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1408" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1367" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="0" on="1"/>
- <pt x="1250" y="-134" on="0"/>
- <pt x="1171" y="-215" on="1"/>
- <pt x="1092" y="-296" on="0"/>
- <pt x="956" y="-296" on="1"/>
- <pt x="864" y="-296" on="0"/>
- <pt x="742" y="-270" on="1"/>
- <pt x="742" y="-26" on="1"/>
- <pt x="853" y="-26" on="1"/>
- <pt x="854" y="-47" on="1"/>
- <pt x="854" y="-53" on="0"/>
- <pt x="856" y="-72" on="1"/>
- <pt x="857" y="-84" on="0"/>
- <pt x="857" y="-91" on="1"/>
- <pt x="858" y="-107" on="1"/>
- <pt x="858" y="-111" on="0"/>
- <pt x="858" y="-119" on="1"/>
- <pt x="858" y="-222" on="0"/>
- <pt x="983" y="-222" on="1"/>
- <pt x="1152" y="-222" on="0"/>
- <pt x="1152" y="-10" on="1"/>
- <pt x="1152" y="0" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 53 21 39 48 84 7 14 64 58 57 34 27 24 17 16 6 1 10 14 0 3 55 43
- 42 41 4 13 39 0 65 56 35 0 3 0 26 25 15 14 0 3 14 14 7 56 55 43 25
- 24 5 16 41 3 65 64 15 3 41 57 3 27 26 2 13 34 1 0 6 0 0 17 16 35
- 1 34 58 57 35 1 6 2 4 48 196 35 34 1 42 41 1 7 6 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eogonek" xMin="43" yMin="-370" xMax="1202" yMax="1480">
- <contour>
- <pt x="1146" y="1480" on="1"/>
- <pt x="1146" y="1221" on="1"/>
- <pt x="1035" y="1221" on="1"/>
- <pt x="1034" y="1240" on="1"/>
- <pt x="1029" y="1324" on="1"/>
- <pt x="1028" y="1379" on="0"/>
- <pt x="1010" y="1390" on="1"/>
- <pt x="993" y="1399" on="0"/>
- <pt x="956" y="1399" on="1"/>
- <pt x="853" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="808" on="1"/>
- <pt x="801" y="809" on="1"/>
- <pt x="864" y="811" on="1"/>
- <pt x="917" y="812" on="0"/>
- <pt x="925" y="828" on="1"/>
- <pt x="933" y="841" on="0"/>
- <pt x="933" y="872" on="1"/>
- <pt x="933" y="884" on="0"/>
- <pt x="935" y="913" on="1"/>
- <pt x="936" y="931" on="1"/>
- <pt x="1017" y="931" on="1"/>
- <pt x="1017" y="605" on="1"/>
- <pt x="936" y="605" on="1"/>
- <pt x="935" y="623" on="1"/>
- <pt x="929" y="710" on="0"/>
- <pt x="905" y="717" on="1"/>
- <pt x="880" y="728" on="0"/>
- <pt x="801" y="728" on="1"/>
- <pt x="438" y="728" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="478" y="105" on="1"/>
- <pt x="514" y="86" on="0"/>
- <pt x="608" y="86" on="1"/>
- <pt x="858" y="86" on="1"/>
- <pt x="1005" y="86" on="0"/>
- <pt x="1043" y="100" on="1"/>
- <pt x="1083" y="113" on="0"/>
- <pt x="1086" y="162" on="1"/>
- <pt x="1090" y="253" on="1"/>
- <pt x="1091" y="271" on="1"/>
- <pt x="1202" y="271" on="1"/>
- <pt x="1202" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="1140" y="-273" on="1"/>
- <pt x="1140" y="-341" on="1"/>
- <pt x="1069" y="-370" on="0"/>
- <pt x="991" y="-370" on="1"/>
- <pt x="771" y="-370" on="0"/>
- <pt x="771" y="-211" on="1"/>
- <pt x="771" y="-89" on="0"/>
- <pt x="929" y="0" on="1"/>
- <pt x="1036" y="0" on="1"/>
- <pt x="907" y="-80" on="0"/>
- <pt x="907" y="-182" on="1"/>
- <pt x="907" y="-289" on="0"/>
- <pt x="1040" y="-289" on="1"/>
- <pt x="1091" y="-289" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 127 values pushed */
- 0 0 74 7 65 48 84 52 61 51 44 21 20 12 11 2 1 6 9 28 3 42 41 30 26
- 23 22 6 28 34 3 63 62 65 43 0 0 10 9 21 1 0 35 34 7 1 43 2 4 48
- 84 29 28 1 70 69 44 43 3 2 0 61 0 0 14 0 0 72 48 67 48 196 61 52 44
- 51 70 63 62 41 2 5 0 21 3 67 69 67 35 34 28 26 23 20 12 9 10 21 10 3
- 0 0 30 29 11 10 32 3 51 1 4 48 196 43 42 1 1 0 1 22 21 1 52 51 1
- 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eth" xMin="41" yMin="0" xMax="1399" yMax="1489">
- <contour>
- <pt x="226" y="716" on="1"/>
- <pt x="41" y="716" on="1"/>
- <pt x="41" y="783" on="1"/>
- <pt x="226" y="783" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="187" y="1410" on="0"/>
- <pt x="127" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- <pt x="465" y="1480" on="1"/>
- <pt x="536" y="1481" on="1"/>
- <pt x="608" y="1484" on="1"/>
- <pt x="680" y="1485" on="1"/>
- <pt x="989" y="1489" on="0"/>
- <pt x="1176" y="1335" on="1"/>
- <pt x="1399" y="1151" on="0"/>
- <pt x="1399" y="772" on="1"/>
- <pt x="1399" y="414" on="0"/>
- <pt x="1208" y="207" on="1"/>
- <pt x="1017" y="0" on="0"/>
- <pt x="687" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="127" y="68" on="1"/>
- <pt x="203" y="74" on="0"/>
- <pt x="213" y="115" on="1"/>
- <pt x="226" y="177" on="0"/>
- <pt x="226" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="436" y="716" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="440" y="181" on="1"/>
- <pt x="444" y="110" on="0"/>
- <pt x="498" y="87" on="1"/>
- <pt x="544" y="68" on="0"/>
- <pt x="638" y="68" on="1"/>
- <pt x="894" y="68" on="0"/>
- <pt x="1032" y="243" on="1"/>
- <pt x="1171" y="419" on="0"/>
- <pt x="1171" y="743" on="1"/>
- <pt x="1171" y="1098" on="0"/>
- <pt x="1021" y="1256" on="1"/>
- <pt x="871" y="1413" on="0"/>
- <pt x="532" y="1413" on="1"/>
- <pt x="436" y="1413" on="1"/>
- <pt x="436" y="783" on="1"/>
- <pt x="781" y="783" on="1"/>
- <pt x="781" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 33 26 4 13 49 48 2 13 2 3 40 40 35 2 0 25 3 0 0 52 34 1 0 14 3
- 2 1 4 48 84 51 50 3 2 3 26 25 1 2 0 14 13 0 14 0 0 44 34 21 48
- 196 26 33 13 4 52 51 48 25 14 5 13 21 34 2 1 0 0 0 50 49 35 34 32 3
- 0 1 4 48 196 33 4 3 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro" xMin="0" yMin="-37" xMax="967" yMax="1517">
- <contour>
- <pt x="0" y="580" on="1"/>
- <pt x="26" y="642" on="1"/>
- <pt x="122" y="642" on="1"/>
- <pt x="119" y="698" on="0"/>
- <pt x="119" y="733" on="1"/>
- <pt x="119" y="759" on="0"/>
- <pt x="121" y="809" on="1"/>
- <pt x="122" y="837" on="0"/>
- <pt x="123" y="851" on="1"/>
- <pt x="0" y="851" on="1"/>
- <pt x="26" y="913" on="1"/>
- <pt x="130" y="913" on="1"/>
- <pt x="155" y="1070" on="0"/>
- <pt x="184" y="1151" on="1"/>
- <pt x="315" y="1517" on="0"/>
- <pt x="669" y="1517" on="1"/>
- <pt x="824" y="1517" on="0"/>
- <pt x="967" y="1443" on="1"/>
- <pt x="967" y="1184" on="1"/>
- <pt x="868" y="1184" on="1"/>
- <pt x="867" y="1239" on="1"/>
- <pt x="863" y="1450" on="0"/>
- <pt x="679" y="1450" on="1"/>
- <pt x="510" y="1450" on="0"/>
- <pt x="415" y="1270" on="1"/>
- <pt x="347" y="1142" on="0"/>
- <pt x="325" y="913" on="1"/>
- <pt x="854" y="913" on="1"/>
- <pt x="828" y="851" on="1"/>
- <pt x="320" y="851" on="1"/>
- <pt x="316" y="786" on="0"/>
- <pt x="316" y="733" on="1"/>
- <pt x="316" y="724" on="0"/>
- <pt x="317" y="692" on="1"/>
- <pt x="318" y="664" on="0"/>
- <pt x="319" y="642" on="1"/>
- <pt x="741" y="642" on="1"/>
- <pt x="716" y="580" on="1"/>
- <pt x="324" y="580" on="1"/>
- <pt x="404" y="62" on="0"/>
- <pt x="719" y="62" on="1"/>
- <pt x="836" y="62" on="0"/>
- <pt x="957" y="138" on="1"/>
- <pt x="957" y="45" on="1"/>
- <pt x="834" y="-37" on="0"/>
- <pt x="674" y="-37" on="1"/>
- <pt x="421" y="-37" on="0"/>
- <pt x="272" y="174" on="1"/>
- <pt x="167" y="323" on="0"/>
- <pt x="129" y="580" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 98 values pushed */
- 0 0 40 9 45 22 38 15 48 84 45 2 15 0 1 19 18 17 3 0 10 3 0 1 43
- 42 2 0 2 3 0 0 0 29 28 9 8 11 3 10 49 38 37 0 11 3 1 2 4 48
- 84 27 26 11 10 3 36 35 2 1 3 2 0 14 0 0 31 5 4 48 196 49 43 42 38
- 37 36 35 29 28 27 26 19 11 10 9 8 2 1 0 19 13 4 17 18 17 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro#1" xMin="0" yMin="-37" xMax="967" yMax="1517">
- <contour>
- <pt x="0" y="580" on="1"/>
- <pt x="26" y="642" on="1"/>
- <pt x="122" y="642" on="1"/>
- <pt x="119" y="698" on="0"/>
- <pt x="119" y="733" on="1"/>
- <pt x="119" y="759" on="0"/>
- <pt x="121" y="809" on="1"/>
- <pt x="122" y="837" on="0"/>
- <pt x="123" y="851" on="1"/>
- <pt x="0" y="851" on="1"/>
- <pt x="26" y="913" on="1"/>
- <pt x="130" y="913" on="1"/>
- <pt x="155" y="1070" on="0"/>
- <pt x="184" y="1151" on="1"/>
- <pt x="315" y="1517" on="0"/>
- <pt x="669" y="1517" on="1"/>
- <pt x="824" y="1517" on="0"/>
- <pt x="967" y="1443" on="1"/>
- <pt x="967" y="1184" on="1"/>
- <pt x="868" y="1184" on="1"/>
- <pt x="867" y="1239" on="1"/>
- <pt x="863" y="1450" on="0"/>
- <pt x="679" y="1450" on="1"/>
- <pt x="510" y="1450" on="0"/>
- <pt x="415" y="1270" on="1"/>
- <pt x="347" y="1142" on="0"/>
- <pt x="325" y="913" on="1"/>
- <pt x="854" y="913" on="1"/>
- <pt x="828" y="851" on="1"/>
- <pt x="320" y="851" on="1"/>
- <pt x="316" y="786" on="0"/>
- <pt x="316" y="733" on="1"/>
- <pt x="316" y="724" on="0"/>
- <pt x="317" y="692" on="1"/>
- <pt x="318" y="664" on="0"/>
- <pt x="319" y="642" on="1"/>
- <pt x="741" y="642" on="1"/>
- <pt x="716" y="580" on="1"/>
- <pt x="324" y="580" on="1"/>
- <pt x="404" y="62" on="0"/>
- <pt x="719" y="62" on="1"/>
- <pt x="836" y="62" on="0"/>
- <pt x="957" y="138" on="1"/>
- <pt x="957" y="45" on="1"/>
- <pt x="834" y="-37" on="0"/>
- <pt x="674" y="-37" on="1"/>
- <pt x="421" y="-37" on="0"/>
- <pt x="272" y="174" on="1"/>
- <pt x="167" y="323" on="0"/>
- <pt x="129" y="580" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 98 values pushed */
- 0 0 40 9 45 22 38 15 48 84 45 2 15 0 1 19 18 17 3 0 10 3 0 1 43
- 42 2 0 2 3 0 0 0 29 28 9 8 11 3 10 49 38 37 0 11 3 1 2 4 48
- 84 27 26 11 10 3 36 35 2 1 3 2 0 14 0 0 31 5 4 48 196 49 43 42 38
- 37 36 35 29 28 27 26 19 11 10 9 8 2 1 0 19 13 4 17 18 17 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="F" xMin="43" yMin="0" xMax="1058" yMax="1480">
- <contour>
- <pt x="1058" y="1480" on="1"/>
- <pt x="1058" y="1221" on="1"/>
- <pt x="947" y="1221" on="1"/>
- <pt x="946" y="1240" on="1"/>
- <pt x="941" y="1324" on="1"/>
- <pt x="940" y="1380" on="0"/>
- <pt x="922" y="1390" on="1"/>
- <pt x="905" y="1399" on="0"/>
- <pt x="868" y="1399" on="1"/>
- <pt x="765" y="1400" on="1"/>
- <pt x="438" y="1400" on="1"/>
- <pt x="438" y="799" on="1"/>
- <pt x="725" y="799" on="1"/>
- <pt x="788" y="801" on="1"/>
- <pt x="839" y="802" on="0"/>
- <pt x="848" y="815" on="1"/>
- <pt x="855" y="827" on="0"/>
- <pt x="857" y="857" on="1"/>
- <pt x="858" y="878" on="1"/>
- <pt x="860" y="903" on="1"/>
- <pt x="861" y="921" on="1"/>
- <pt x="941" y="921" on="1"/>
- <pt x="941" y="594" on="1"/>
- <pt x="861" y="594" on="1"/>
- <pt x="860" y="613" on="1"/>
- <pt x="854" y="701" on="0"/>
- <pt x="829" y="708" on="1"/>
- <pt x="803" y="718" on="0"/>
- <pt x="725" y="718" on="1"/>
- <pt x="438" y="718" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="123" on="0"/>
- <pt x="467" y="95" on="1"/>
- <pt x="491" y="68" on="0"/>
- <pt x="551" y="68" on="1"/>
- <pt x="553" y="68" on="1"/>
- <pt x="569" y="67" on="0"/>
- <pt x="629" y="63" on="1"/>
- <pt x="648" y="62" on="1"/>
- <pt x="648" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 48 57 47 40 30 39 21 20 2 1 4 9 11 3 23 22 2 28 39 3 0 0 10 9 21
- 1 0 29 28 7 1 11 2 4 48 84 12 11 1 40 39 1 2 0 57 0 0 14 57 48
- 40 47 39 30 2 0 21 2 28 23 20 12 9 5 21 10 3 0 0 30 29 11 10 32 3
- 47 1 4 48 196 1 0 1 22 21 1 48 47 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="G" xMin="85" yMin="-37" xMax="1458" yMax="1518">
- <contour>
- <pt x="1285" y="36" on="1"/>
- <pt x="994" y="-37" on="0"/>
- <pt x="805" y="-37" on="1"/>
- <pt x="475" y="-37" on="0"/>
- <pt x="280" y="175" on="1"/>
- <pt x="85" y="386" on="0"/>
- <pt x="85" y="745" on="1"/>
- <pt x="85" y="1112" on="0"/>
- <pt x="275" y="1315" on="1"/>
- <pt x="464" y="1518" on="0"/>
- <pt x="815" y="1518" on="1"/>
- <pt x="1047" y="1518" on="0"/>
- <pt x="1282" y="1441" on="1"/>
- <pt x="1282" y="1172" on="1"/>
- <pt x="1171" y="1172" on="1"/>
- <pt x="1170" y="1192" on="1"/>
- <pt x="1168" y="1217" on="0"/>
- <pt x="1168" y="1242" on="1"/>
- <pt x="1168" y="1249" on="1"/>
- <pt x="1168" y="1333" on="0"/>
- <pt x="1094" y="1385" on="1"/>
- <pt x="1001" y="1450" on="0"/>
- <pt x="825" y="1450" on="1"/>
- <pt x="575" y="1450" on="0"/>
- <pt x="444" y="1263" on="1"/>
- <pt x="313" y="1077" on="0"/>
- <pt x="313" y="733" on="1"/>
- <pt x="313" y="386" on="0"/>
- <pt x="475" y="214" on="1"/>
- <pt x="633" y="47" on="0"/>
- <pt x="864" y="47" on="1"/>
- <pt x="948" y="47" on="0"/>
- <pt x="1076" y="80" on="1"/>
- <pt x="1076" y="371" on="1"/>
- <pt x="1077" y="487" on="0"/>
- <pt x="1058" y="527" on="1"/>
- <pt x="1043" y="557" on="0"/>
- <pt x="977" y="562" on="1"/>
- <pt x="909" y="568" on="1"/>
- <pt x="891" y="569" on="1"/>
- <pt x="891" y="630" on="1"/>
- <pt x="1458" y="630" on="1"/>
- <pt x="1458" y="569" on="1"/>
- <pt x="1440" y="568" on="1"/>
- <pt x="1384" y="562" on="1"/>
- <pt x="1317" y="556" on="0"/>
- <pt x="1305" y="535" on="1"/>
- <pt x="1294" y="516" on="0"/>
- <pt x="1291" y="470" on="1"/>
- <pt x="1285" y="371" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 30 7 2 22 17 10 48 84 10 0 2 2 1 18 17 14 13 12 5 0 40 3 0
- 1 49 42 39 33 32 0 6 40 2 3 0 41 40 1 0 14 0 0 26 34 6 48 196 18
- 17 14 3 12 32 3 42 41 2 13 0 40 39 6 32 0 0 33 32 32 1 0 1 4 48
- 196 49 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gbreve" xMin="85" yMin="-37" xMax="1458" yMax="1925">
- <contour>
- <pt x="1285" y="36" on="1"/>
- <pt x="994" y="-37" on="0"/>
- <pt x="805" y="-37" on="1"/>
- <pt x="475" y="-37" on="0"/>
- <pt x="280" y="175" on="1"/>
- <pt x="85" y="386" on="0"/>
- <pt x="85" y="745" on="1"/>
- <pt x="85" y="1112" on="0"/>
- <pt x="275" y="1315" on="1"/>
- <pt x="464" y="1518" on="0"/>
- <pt x="815" y="1518" on="1"/>
- <pt x="1047" y="1518" on="0"/>
- <pt x="1282" y="1441" on="1"/>
- <pt x="1282" y="1172" on="1"/>
- <pt x="1171" y="1172" on="1"/>
- <pt x="1170" y="1192" on="1"/>
- <pt x="1168" y="1217" on="0"/>
- <pt x="1168" y="1242" on="1"/>
- <pt x="1168" y="1249" on="1"/>
- <pt x="1168" y="1333" on="0"/>
- <pt x="1094" y="1385" on="1"/>
- <pt x="1001" y="1450" on="0"/>
- <pt x="825" y="1450" on="1"/>
- <pt x="575" y="1450" on="0"/>
- <pt x="444" y="1263" on="1"/>
- <pt x="313" y="1077" on="0"/>
- <pt x="313" y="733" on="1"/>
- <pt x="313" y="386" on="0"/>
- <pt x="475" y="214" on="1"/>
- <pt x="633" y="47" on="0"/>
- <pt x="864" y="47" on="1"/>
- <pt x="948" y="47" on="0"/>
- <pt x="1076" y="80" on="1"/>
- <pt x="1076" y="371" on="1"/>
- <pt x="1077" y="487" on="0"/>
- <pt x="1058" y="527" on="1"/>
- <pt x="1043" y="557" on="0"/>
- <pt x="977" y="562" on="1"/>
- <pt x="909" y="568" on="1"/>
- <pt x="891" y="569" on="1"/>
- <pt x="891" y="630" on="1"/>
- <pt x="1458" y="630" on="1"/>
- <pt x="1458" y="569" on="1"/>
- <pt x="1440" y="568" on="1"/>
- <pt x="1384" y="562" on="1"/>
- <pt x="1317" y="556" on="0"/>
- <pt x="1305" y="535" on="1"/>
- <pt x="1294" y="516" on="0"/>
- <pt x="1291" y="470" on="1"/>
- <pt x="1285" y="371" on="1"/>
- </contour>
- <contour>
- <pt x="488" y="1925" on="1"/>
- <pt x="553" y="1925" on="1"/>
- <pt x="580" y="1835" on="0"/>
- <pt x="640" y="1793" on="1"/>
- <pt x="708" y="1746" on="0"/>
- <pt x="821" y="1746" on="1"/>
- <pt x="947" y="1746" on="0"/>
- <pt x="1017" y="1805" on="1"/>
- <pt x="1066" y="1845" on="0"/>
- <pt x="1090" y="1925" on="1"/>
- <pt x="1154" y="1925" on="1"/>
- <pt x="1135" y="1790" on="0"/>
- <pt x="1063" y="1709" on="1"/>
- <pt x="969" y="1604" on="0"/>
- <pt x="821" y="1604" on="1"/>
- <pt x="667" y="1604" on="0"/>
- <pt x="572" y="1719" on="1"/>
- <pt x="507" y="1796" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 55 20 64 30 7 2 22 17 10 48 84 10 0 2 2 1 18 17 14 13 12 5 0
- 40 3 0 1 49 42 39 33 32 0 6 40 2 3 0 1 60 59 51 50 4 13 64 0 0
- 41 40 1 0 14 0 0 26 34 6 48 196 60 59 18 17 14 5 12 32 3 42 41 2 13
- 0 51 50 40 39 4 13 6 32 0 0 33 32 32 1 0 1 4 48 196 49 0 1 13 12
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcircumflex" xMin="85" yMin="-37" xMax="1458" yMax="1925">
- <contour>
- <pt x="1285" y="36" on="1"/>
- <pt x="994" y="-37" on="0"/>
- <pt x="805" y="-37" on="1"/>
- <pt x="475" y="-37" on="0"/>
- <pt x="280" y="175" on="1"/>
- <pt x="85" y="386" on="0"/>
- <pt x="85" y="745" on="1"/>
- <pt x="85" y="1112" on="0"/>
- <pt x="275" y="1315" on="1"/>
- <pt x="464" y="1518" on="0"/>
- <pt x="815" y="1518" on="1"/>
- <pt x="1047" y="1518" on="0"/>
- <pt x="1282" y="1441" on="1"/>
- <pt x="1282" y="1172" on="1"/>
- <pt x="1171" y="1172" on="1"/>
- <pt x="1170" y="1192" on="1"/>
- <pt x="1168" y="1217" on="0"/>
- <pt x="1168" y="1242" on="1"/>
- <pt x="1168" y="1249" on="1"/>
- <pt x="1168" y="1333" on="0"/>
- <pt x="1094" y="1385" on="1"/>
- <pt x="1001" y="1450" on="0"/>
- <pt x="825" y="1450" on="1"/>
- <pt x="575" y="1450" on="0"/>
- <pt x="444" y="1263" on="1"/>
- <pt x="313" y="1077" on="0"/>
- <pt x="313" y="733" on="1"/>
- <pt x="313" y="386" on="0"/>
- <pt x="475" y="214" on="1"/>
- <pt x="633" y="47" on="0"/>
- <pt x="864" y="47" on="1"/>
- <pt x="948" y="47" on="0"/>
- <pt x="1076" y="80" on="1"/>
- <pt x="1076" y="371" on="1"/>
- <pt x="1077" y="487" on="0"/>
- <pt x="1058" y="527" on="1"/>
- <pt x="1043" y="557" on="0"/>
- <pt x="977" y="562" on="1"/>
- <pt x="909" y="568" on="1"/>
- <pt x="891" y="569" on="1"/>
- <pt x="891" y="630" on="1"/>
- <pt x="1458" y="630" on="1"/>
- <pt x="1458" y="569" on="1"/>
- <pt x="1440" y="568" on="1"/>
- <pt x="1384" y="562" on="1"/>
- <pt x="1317" y="556" on="0"/>
- <pt x="1305" y="535" on="1"/>
- <pt x="1294" y="516" on="0"/>
- <pt x="1291" y="470" on="1"/>
- <pt x="1285" y="371" on="1"/>
- </contour>
- <contour>
- <pt x="469" y="1604" on="1"/>
- <pt x="710" y="1925" on="1"/>
- <pt x="932" y="1925" on="1"/>
- <pt x="1172" y="1604" on="1"/>
- <pt x="1086" y="1604" on="1"/>
- <pt x="821" y="1826" on="1"/>
- <pt x="555" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 108 values pushed */
- 0 0 30 7 2 22 17 10 48 84 10 0 2 2 1 56 55 54 53 50 5 51 0 3 0
- 1 18 17 14 13 12 5 0 40 3 0 1 49 42 39 33 32 0 6 40 2 3 0 52 51
- 1 41 40 1 2 0 14 0 0 26 34 6 48 196 54 53 18 17 14 5 12 32 3 42 41
- 2 13 0 56 55 52 51 50 40 39 7 13 6 32 0 0 33 32 32 1 0 1 4 48 196
- 49 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcommaaccent" xMin="85" yMin="-432" xMax="1458" yMax="1518">
- <contour>
- <pt x="1285" y="36" on="1"/>
- <pt x="994" y="-37" on="0"/>
- <pt x="805" y="-37" on="1"/>
- <pt x="475" y="-37" on="0"/>
- <pt x="280" y="175" on="1"/>
- <pt x="85" y="386" on="0"/>
- <pt x="85" y="745" on="1"/>
- <pt x="85" y="1112" on="0"/>
- <pt x="275" y="1315" on="1"/>
- <pt x="464" y="1518" on="0"/>
- <pt x="815" y="1518" on="1"/>
- <pt x="1047" y="1518" on="0"/>
- <pt x="1282" y="1441" on="1"/>
- <pt x="1282" y="1172" on="1"/>
- <pt x="1171" y="1172" on="1"/>
- <pt x="1170" y="1192" on="1"/>
- <pt x="1168" y="1217" on="0"/>
- <pt x="1168" y="1242" on="1"/>
- <pt x="1168" y="1249" on="1"/>
- <pt x="1168" y="1333" on="0"/>
- <pt x="1094" y="1385" on="1"/>
- <pt x="1001" y="1450" on="0"/>
- <pt x="825" y="1450" on="1"/>
- <pt x="575" y="1450" on="0"/>
- <pt x="444" y="1263" on="1"/>
- <pt x="313" y="1077" on="0"/>
- <pt x="313" y="733" on="1"/>
- <pt x="313" y="386" on="0"/>
- <pt x="475" y="214" on="1"/>
- <pt x="633" y="47" on="0"/>
- <pt x="864" y="47" on="1"/>
- <pt x="948" y="47" on="0"/>
- <pt x="1076" y="80" on="1"/>
- <pt x="1076" y="371" on="1"/>
- <pt x="1077" y="486" on="0"/>
- <pt x="1058" y="527" on="1"/>
- <pt x="1042" y="557" on="0"/>
- <pt x="977" y="562" on="1"/>
- <pt x="909" y="568" on="1"/>
- <pt x="891" y="569" on="1"/>
- <pt x="891" y="630" on="1"/>
- <pt x="1458" y="630" on="1"/>
- <pt x="1458" y="569" on="1"/>
- <pt x="1440" y="568" on="1"/>
- <pt x="1384" y="562" on="1"/>
- <pt x="1317" y="556" on="0"/>
- <pt x="1305" y="535" on="1"/>
- <pt x="1294" y="516" on="0"/>
- <pt x="1291" y="470" on="1"/>
- <pt x="1285" y="371" on="1"/>
- </contour>
- <contour>
- <pt x="614" y="-421" on="1"/>
- <pt x="614" y="-349" on="1"/>
- <pt x="663" y="-359" on="0"/>
- <pt x="718" y="-359" on="1"/>
- <pt x="821" y="-359" on="0"/>
- <pt x="821" y="-279" on="1"/>
- <pt x="821" y="-190" on="0"/>
- <pt x="663" y="-175" on="1"/>
- <pt x="663" y="-111" on="1"/>
- <pt x="798" y="-114" on="0"/>
- <pt x="863" y="-143" on="1"/>
- <pt x="956" y="-185" on="0"/>
- <pt x="956" y="-280" on="1"/>
- <pt x="956" y="-432" on="0"/>
- <pt x="739" y="-432" on="1"/>
- <pt x="679" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 107 values pushed */
- 0 0 53 17 64 30 7 2 22 17 10 48 84 10 0 2 2 1 18 17 14 13 12 5 0
- 40 3 0 1 49 42 39 33 32 0 6 40 2 3 0 1 58 57 51 50 4 13 64 2 0
- 41 40 1 0 14 0 0 55 48 62 26 34 6 48 196 18 17 14 3 12 32 3 42 41 2
- 13 0 58 57 51 50 40 39 6 13 62 6 32 0 0 33 32 32 1 0 1 4 48 196 49
- 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gdotaccent" xMin="85" yMin="-37" xMax="1458" yMax="1801">
- <contour>
- <pt x="1285" y="36" on="1"/>
- <pt x="994" y="-37" on="0"/>
- <pt x="805" y="-37" on="1"/>
- <pt x="475" y="-37" on="0"/>
- <pt x="280" y="175" on="1"/>
- <pt x="85" y="386" on="0"/>
- <pt x="85" y="745" on="1"/>
- <pt x="85" y="1112" on="0"/>
- <pt x="275" y="1315" on="1"/>
- <pt x="464" y="1518" on="0"/>
- <pt x="815" y="1518" on="1"/>
- <pt x="1047" y="1518" on="0"/>
- <pt x="1282" y="1441" on="1"/>
- <pt x="1282" y="1172" on="1"/>
- <pt x="1171" y="1172" on="1"/>
- <pt x="1170" y="1192" on="1"/>
- <pt x="1168" y="1217" on="0"/>
- <pt x="1168" y="1242" on="1"/>
- <pt x="1168" y="1249" on="1"/>
- <pt x="1168" y="1333" on="0"/>
- <pt x="1094" y="1385" on="1"/>
- <pt x="1001" y="1450" on="0"/>
- <pt x="825" y="1450" on="1"/>
- <pt x="575" y="1450" on="0"/>
- <pt x="444" y="1263" on="1"/>
- <pt x="313" y="1077" on="0"/>
- <pt x="313" y="733" on="1"/>
- <pt x="313" y="386" on="0"/>
- <pt x="475" y="214" on="1"/>
- <pt x="633" y="47" on="0"/>
- <pt x="864" y="47" on="1"/>
- <pt x="948" y="47" on="0"/>
- <pt x="1076" y="80" on="1"/>
- <pt x="1076" y="371" on="1"/>
- <pt x="1077" y="487" on="0"/>
- <pt x="1058" y="527" on="1"/>
- <pt x="1043" y="557" on="0"/>
- <pt x="977" y="562" on="1"/>
- <pt x="909" y="568" on="1"/>
- <pt x="891" y="569" on="1"/>
- <pt x="891" y="630" on="1"/>
- <pt x="1458" y="630" on="1"/>
- <pt x="1458" y="569" on="1"/>
- <pt x="1440" y="568" on="1"/>
- <pt x="1384" y="562" on="1"/>
- <pt x="1317" y="556" on="0"/>
- <pt x="1305" y="535" on="1"/>
- <pt x="1294" y="516" on="0"/>
- <pt x="1291" y="470" on="1"/>
- <pt x="1285" y="371" on="1"/>
- </contour>
- <contour>
- <pt x="722" y="1604" on="1"/>
- <pt x="722" y="1801" on="1"/>
- <pt x="919" y="1801" on="1"/>
- <pt x="919" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 111 values pushed */
- 0 0 30 7 2 22 17 10 48 84 10 0 2 2 1 18 17 14 13 12 5 0 40 3 0
- 1 49 42 39 33 32 0 6 40 2 3 0 0 0 53 50 5 1 51 1 4 48 84 52 51
- 1 41 40 1 2 0 14 0 0 26 34 6 48 196 18 17 14 3 12 32 3 40 39 2 52
- 50 3 42 41 2 13 0 6 50 0 0 53 52 4 1 50 33 32 32 1 0 2 4 48 196
- 51 50 1 49 0 1 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="H" xMin="41" yMin="0" xMax="1438" yMax="1480">
- <contour>
- <pt x="436" y="812" on="1"/>
- <pt x="1043" y="812" on="1"/>
- <pt x="1043" y="1221" on="1"/>
- <pt x="1043" y="1280" on="0"/>
- <pt x="1036" y="1333" on="1"/>
- <pt x="1030" y="1372" on="0"/>
- <pt x="1022" y="1384" on="1"/>
- <pt x="1003" y="1409" on="0"/>
- <pt x="945" y="1413" on="1"/>
- <pt x="877" y="1417" on="1"/>
- <pt x="858" y="1419" on="1"/>
- <pt x="858" y="1480" on="1"/>
- <pt x="1438" y="1480" on="1"/>
- <pt x="1438" y="1419" on="1"/>
- <pt x="1420" y="1417" on="1"/>
- <pt x="1352" y="1413" on="1"/>
- <pt x="1277" y="1408" on="0"/>
- <pt x="1267" y="1366" on="1"/>
- <pt x="1252" y="1305" on="0"/>
- <pt x="1253" y="1221" on="1"/>
- <pt x="1253" y="259" on="1"/>
- <pt x="1253" y="203" on="0"/>
- <pt x="1261" y="147" on="1"/>
- <pt x="1268" y="96" on="0"/>
- <pt x="1293" y="82" on="1"/>
- <pt x="1314" y="71" on="0"/>
- <pt x="1352" y="68" on="1"/>
- <pt x="1420" y="63" on="1"/>
- <pt x="1438" y="62" on="1"/>
- <pt x="1438" y="0" on="1"/>
- <pt x="858" y="0" on="1"/>
- <pt x="858" y="62" on="1"/>
- <pt x="877" y="63" on="1"/>
- <pt x="945" y="68" on="1"/>
- <pt x="1020" y="74" on="0"/>
- <pt x="1030" y="115" on="1"/>
- <pt x="1043" y="177" on="0"/>
- <pt x="1043" y="259" on="1"/>
- <pt x="1043" y="726" on="1"/>
- <pt x="436" y="726" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="436" y="200" on="0"/>
- <pt x="443" y="147" on="1"/>
- <pt x="449" y="109" on="0"/>
- <pt x="457" y="97" on="1"/>
- <pt x="476" y="72" on="0"/>
- <pt x="534" y="68" on="1"/>
- <pt x="602" y="63" on="1"/>
- <pt x="621" y="62" on="1"/>
- <pt x="621" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="128" y="68" on="1"/>
- <pt x="192" y="73" on="0"/>
- <pt x="226" y="139" on="0"/>
- <pt x="226" y="259" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="186" y="1409" on="0"/>
- <pt x="128" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- <pt x="621" y="1480" on="1"/>
- <pt x="621" y="1419" on="1"/>
- <pt x="602" y="1417" on="1"/>
- <pt x="534" y="1413" on="1"/>
- <pt x="459" y="1408" on="0"/>
- <pt x="449" y="1366" on="1"/>
- <pt x="436" y="1302" on="0"/>
- <pt x="436" y="1221" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 88 values pushed */
- 74 67 57 66 56 50 40 49 37 30 20 29 19 12 2 11 0 0 39 38 7 1 0 1 4
- 48 84 1 0 1 50 49 30 29 3 2 0 67 66 12 11 0 3 14 67 74 66 57 50 56
- 49 40 30 37 29 20 12 19 11 2 0 0 38 37 2 1 32 3 19 74 40 39 0 32 3
- 56 2 4 48 196 20 19 1 57 56 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hbar" xMin="41" yMin="0" xMax="1438" yMax="1480">
- <contour>
- <pt x="1043" y="726" on="1"/>
- <pt x="436" y="726" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="436" y="200" on="0"/>
- <pt x="443" y="147" on="1"/>
- <pt x="449" y="109" on="0"/>
- <pt x="457" y="97" on="1"/>
- <pt x="476" y="72" on="0"/>
- <pt x="534" y="68" on="1"/>
- <pt x="602" y="63" on="1"/>
- <pt x="621" y="62" on="1"/>
- <pt x="621" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="128" y="68" on="1"/>
- <pt x="192" y="73" on="0"/>
- <pt x="226" y="139" on="0"/>
- <pt x="226" y="259" on="1"/>
- <pt x="226" y="1086" on="1"/>
- <pt x="41" y="1086" on="1"/>
- <pt x="41" y="1160" on="1"/>
- <pt x="226" y="1160" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="186" y="1409" on="0"/>
- <pt x="128" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- <pt x="621" y="1480" on="1"/>
- <pt x="621" y="1419" on="1"/>
- <pt x="602" y="1417" on="1"/>
- <pt x="534" y="1413" on="1"/>
- <pt x="459" y="1408" on="0"/>
- <pt x="449" y="1366" on="1"/>
- <pt x="436" y="1302" on="0"/>
- <pt x="436" y="1221" on="1"/>
- <pt x="436" y="1160" on="1"/>
- <pt x="1043" y="1160" on="1"/>
- <pt x="1043" y="1221" on="1"/>
- <pt x="1043" y="1280" on="0"/>
- <pt x="1036" y="1333" on="1"/>
- <pt x="1030" y="1372" on="0"/>
- <pt x="1022" y="1384" on="1"/>
- <pt x="1003" y="1409" on="0"/>
- <pt x="945" y="1413" on="1"/>
- <pt x="877" y="1417" on="1"/>
- <pt x="858" y="1419" on="1"/>
- <pt x="858" y="1480" on="1"/>
- <pt x="1438" y="1480" on="1"/>
- <pt x="1438" y="1419" on="1"/>
- <pt x="1420" y="1417" on="1"/>
- <pt x="1352" y="1413" on="1"/>
- <pt x="1277" y="1408" on="0"/>
- <pt x="1267" y="1366" on="1"/>
- <pt x="1252" y="1305" on="0"/>
- <pt x="1253" y="1221" on="1"/>
- <pt x="1253" y="1160" on="1"/>
- <pt x="1438" y="1160" on="1"/>
- <pt x="1438" y="1086" on="1"/>
- <pt x="1253" y="1086" on="1"/>
- <pt x="1253" y="259" on="1"/>
- <pt x="1253" y="203" on="0"/>
- <pt x="1261" y="147" on="1"/>
- <pt x="1268" y="96" on="0"/>
- <pt x="1293" y="82" on="1"/>
- <pt x="1314" y="71" on="0"/>
- <pt x="1352" y="68" on="1"/>
- <pt x="1420" y="63" on="1"/>
- <pt x="1438" y="62" on="1"/>
- <pt x="1438" y="0" on="1"/>
- <pt x="858" y="0" on="1"/>
- <pt x="858" y="62" on="1"/>
- <pt x="877" y="63" on="1"/>
- <pt x="945" y="68" on="1"/>
- <pt x="1020" y="74" on="0"/>
- <pt x="1030" y="115" on="1"/>
- <pt x="1043" y="177" on="0"/>
- <pt x="1043" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="436" y="812" on="1"/>
- <pt x="1043" y="812" on="1"/>
- <pt x="1043" y="1086" on="1"/>
- <pt x="436" y="1086" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 121 values pushed */
- 82 75 65 74 60 53 43 52 40 33 23 32 18 12 2 11 0 0 62 61 42 41 22 21 21
- 5 19 1 0 7 1 83 2 4 48 84 84 83 1 75 74 12 11 3 2 0 53 52 33 32
- 0 3 86 85 64 63 20 19 1 5 14 75 82 74 65 53 60 52 43 33 40 32 23 12 18
- 11 2 63 62 2 13 60 21 20 18 0 0 85 84 82 43 42 0 32 5 60 86 83 41 40
- 2 1 32 5 18 2 4 48 196 65 64 61 60 3 23 22 19 18 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hcircumflex" xMin="41" yMin="0" xMax="1438" yMax="1925">
- <contour>
- <pt x="436" y="812" on="1"/>
- <pt x="1043" y="812" on="1"/>
- <pt x="1043" y="1221" on="1"/>
- <pt x="1043" y="1280" on="0"/>
- <pt x="1036" y="1333" on="1"/>
- <pt x="1030" y="1372" on="0"/>
- <pt x="1022" y="1384" on="1"/>
- <pt x="1003" y="1409" on="0"/>
- <pt x="945" y="1413" on="1"/>
- <pt x="877" y="1417" on="1"/>
- <pt x="858" y="1419" on="1"/>
- <pt x="858" y="1480" on="1"/>
- <pt x="1438" y="1480" on="1"/>
- <pt x="1438" y="1419" on="1"/>
- <pt x="1420" y="1417" on="1"/>
- <pt x="1352" y="1413" on="1"/>
- <pt x="1277" y="1408" on="0"/>
- <pt x="1267" y="1366" on="1"/>
- <pt x="1252" y="1305" on="0"/>
- <pt x="1253" y="1221" on="1"/>
- <pt x="1253" y="259" on="1"/>
- <pt x="1253" y="203" on="0"/>
- <pt x="1261" y="147" on="1"/>
- <pt x="1268" y="96" on="0"/>
- <pt x="1293" y="82" on="1"/>
- <pt x="1314" y="71" on="0"/>
- <pt x="1352" y="68" on="1"/>
- <pt x="1420" y="63" on="1"/>
- <pt x="1438" y="62" on="1"/>
- <pt x="1438" y="0" on="1"/>
- <pt x="858" y="0" on="1"/>
- <pt x="858" y="62" on="1"/>
- <pt x="877" y="63" on="1"/>
- <pt x="945" y="68" on="1"/>
- <pt x="1020" y="74" on="0"/>
- <pt x="1030" y="115" on="1"/>
- <pt x="1043" y="177" on="0"/>
- <pt x="1043" y="259" on="1"/>
- <pt x="1043" y="726" on="1"/>
- <pt x="436" y="726" on="1"/>
- <pt x="436" y="259" on="1"/>
- <pt x="436" y="200" on="0"/>
- <pt x="443" y="147" on="1"/>
- <pt x="449" y="109" on="0"/>
- <pt x="457" y="97" on="1"/>
- <pt x="476" y="72" on="0"/>
- <pt x="534" y="68" on="1"/>
- <pt x="602" y="63" on="1"/>
- <pt x="621" y="62" on="1"/>
- <pt x="621" y="0" on="1"/>
- <pt x="41" y="0" on="1"/>
- <pt x="41" y="62" on="1"/>
- <pt x="60" y="63" on="1"/>
- <pt x="128" y="68" on="1"/>
- <pt x="192" y="73" on="0"/>
- <pt x="226" y="139" on="0"/>
- <pt x="226" y="259" on="1"/>
- <pt x="226" y="1221" on="1"/>
- <pt x="226" y="1280" on="0"/>
- <pt x="219" y="1333" on="1"/>
- <pt x="213" y="1372" on="0"/>
- <pt x="205" y="1384" on="1"/>
- <pt x="186" y="1409" on="0"/>
- <pt x="128" y="1413" on="1"/>
- <pt x="60" y="1417" on="1"/>
- <pt x="41" y="1419" on="1"/>
- <pt x="41" y="1480" on="1"/>
- <pt x="621" y="1480" on="1"/>
- <pt x="621" y="1419" on="1"/>
- <pt x="602" y="1417" on="1"/>
- <pt x="534" y="1413" on="1"/>
- <pt x="459" y="1408" on="0"/>
- <pt x="449" y="1366" on="1"/>
- <pt x="436" y="1302" on="0"/>
- <pt x="436" y="1221" on="1"/>
- </contour>
- <contour>
- <pt x="388" y="1604" on="1"/>
- <pt x="629" y="1925" on="1"/>
- <pt x="851" y="1925" on="1"/>
- <pt x="1091" y="1604" on="1"/>
- <pt x="1005" y="1604" on="1"/>
- <pt x="740" y="1826" on="1"/>
- <pt x="474" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 117 values pushed */
- 74 67 57 66 56 50 40 49 37 30 20 29 19 12 2 11 81 80 79 78 75 5 76 11 3
- 0 0 39 38 7 1 0 1 4 48 84 77 76 1 1 0 1 50 49 30 29 3 3 0 67
- 66 12 11 0 3 14 67 74 66 57 50 56 49 40 30 37 29 20 12 19 11 2 78 19 1
- 2 81 80 79 77 76 5 1 0 3 75 0 56 2 0 0 38 37 2 1 32 3 19 74 40
- 39 0 32 3 56 2 4 48 196 20 19 1 57 56 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="I" xMin="51" yMin="0" xMax="631" yMax="1480">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 39 values pushed */
- 0 29 19 28 18 11 1 10 29 28 1 0 11 10 0 14 29 0 28 19 11 18 10 1 0
- 0 19 18 32 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="IJ" xMin="51" yMin="-297" xMax="1420" yMax="1480">
- <component glyphName="I" x="0" y="0" flags="0x4"/>
- <component glyphName="J" x="654" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="Iacute" xMin="51" yMin="0" xMax="637" yMax="1925">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="137" y="1604" on="1"/>
- <pt x="378" y="1925" on="1"/>
- <pt x="637" y="1925" on="1"/>
- <pt x="230" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 29 19 28 18 11 1 10 39 36 2 37 10 3 38 37 1 29 28 1 2 0 11 10 0
- 14 29 0 28 19 11 18 10 1 37 18 0 2 38 18 39 36 0 0 0 19 18 32 1 0
- 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ibreve" xMin="8" yMin="0" xMax="674" yMax="1925">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="8" y="1925" on="1"/>
- <pt x="73" y="1925" on="1"/>
- <pt x="100" y="1835" on="0"/>
- <pt x="160" y="1793" on="1"/>
- <pt x="228" y="1746" on="0"/>
- <pt x="341" y="1746" on="1"/>
- <pt x="467" y="1746" on="0"/>
- <pt x="537" y="1805" on="1"/>
- <pt x="586" y="1845" on="0"/>
- <pt x="610" y="1925" on="1"/>
- <pt x="674" y="1925" on="1"/>
- <pt x="655" y="1790" on="0"/>
- <pt x="583" y="1709" on="1"/>
- <pt x="489" y="1604" on="0"/>
- <pt x="341" y="1604" on="1"/>
- <pt x="187" y="1604" on="0"/>
- <pt x="92" y="1719" on="1"/>
- <pt x="27" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 0 0 41 20 50 48 84 0 29 19 28 18 11 1 10 46 45 37 36 4 13 50 10 29 28
- 1 0 11 10 0 14 29 0 28 19 11 18 10 1 46 45 2 13 18 37 36 0 0 0 19
- 18 37 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Icircumflex" xMin="-11" yMin="0" xMax="692" yMax="1925">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="-11" y="1604" on="1"/>
- <pt x="230" y="1925" on="1"/>
- <pt x="452" y="1925" on="1"/>
- <pt x="692" y="1604" on="1"/>
- <pt x="606" y="1604" on="1"/>
- <pt x="341" y="1826" on="1"/>
- <pt x="75" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 29 19 28 18 11 1 10 42 41 40 39 36 5 37 10 3 38 37 1 29 28 1 2 0
- 11 10 0 14 29 0 28 19 11 18 10 1 41 18 0 2 40 39 38 3 13 18 42 37 36
- 3 13 0 0 0 19 18 32 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idieresis" xMin="51" yMin="0" xMax="631" yMax="1777">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="57" y="1604" on="1"/>
- <pt x="57" y="1777" on="1"/>
- <pt x="230" y="1777" on="1"/>
- <pt x="230" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="452" y="1604" on="1"/>
- <pt x="452" y="1777" on="1"/>
- <pt x="625" y="1777" on="1"/>
- <pt x="625" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 29 19 28 18 11 1 10 0 0 43 40 39 36 13 3 37 1 4 48 84 42 41 38 37
- 3 29 28 1 2 0 11 10 0 14 29 0 28 19 11 18 10 1 0 0 41 40 13 1 42
- 39 38 13 1 36 19 18 32 1 0 3 4 48 196 43 42 1 37 36 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idotaccent" xMin="51" yMin="0" xMax="631" yMax="1801">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="242" y="1604" on="1"/>
- <pt x="242" y="1801" on="1"/>
- <pt x="439" y="1801" on="1"/>
- <pt x="439" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 0 29 19 28 18 11 1 10 0 0 39 36 5 1 37 1 4 48 84 38 37 1 29 28 1
- 2 0 11 10 0 14 29 0 28 19 11 18 10 1 0 0 39 38 4 1 36 19 18 32 1
- 0 2 4 48 196 37 36 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Igrave" xMin="39" yMin="0" xMax="631" yMax="1925">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="539" y="1604" on="1"/>
- <pt x="446" y="1604" on="1"/>
- <pt x="39" y="1925" on="1"/>
- <pt x="298" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 29 19 28 18 11 1 10 37 36 2 38 10 3 39 38 1 29 28 1 2 0 11 10 0
- 14 29 0 28 19 11 18 10 1 39 18 0 2 36 18 38 0 0 0 37 19 18 32 2 0
- 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Imacron" xMin="20" yMin="0" xMax="662" yMax="1727">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="20" y="1604" on="1"/>
- <pt x="20" y="1727" on="1"/>
- <pt x="662" y="1727" on="1"/>
- <pt x="662" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 0 29 19 28 18 11 1 10 0 0 39 36 12 1 37 1 4 48 84 38 37 1 29 28 1
- 2 0 11 10 0 14 29 0 28 19 11 18 10 1 39 38 2 13 18 37 36 0 0 0 19
- 18 32 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Iogonek" xMin="51" yMin="-370" xMax="631" yMax="1480">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="581" y="-273" on="1"/>
- <pt x="581" y="-341" on="1"/>
- <pt x="510" y="-370" on="0"/>
- <pt x="432" y="-370" on="1"/>
- <pt x="212" y="-370" on="0"/>
- <pt x="212" y="-211" on="1"/>
- <pt x="212" y="-89" on="0"/>
- <pt x="370" y="0" on="1"/>
- <pt x="477" y="0" on="1"/>
- <pt x="348" y="-80" on="0"/>
- <pt x="348" y="-182" on="1"/>
- <pt x="348" y="-289" on="0"/>
- <pt x="481" y="-289" on="1"/>
- <pt x="532" y="-289" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 48 7 39 48 84 0 29 19 28 18 11 1 10 37 36 39 28 44 43 29 28 3 0
- 11 10 0 14 0 0 46 48 41 48 196 29 0 28 19 11 18 10 1 43 18 0 2 44 37
- 36 3 13 18 41 0 0 0 19 18 32 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Itilde" xMin="8" yMin="0" xMax="674" yMax="1839">
- <contour>
- <pt x="236" y="259" on="1"/>
- <pt x="236" y="1221" on="1"/>
- <pt x="236" y="1280" on="0"/>
- <pt x="229" y="1333" on="1"/>
- <pt x="223" y="1372" on="0"/>
- <pt x="215" y="1384" on="1"/>
- <pt x="197" y="1410" on="0"/>
- <pt x="137" y="1413" on="1"/>
- <pt x="70" y="1417" on="1"/>
- <pt x="51" y="1419" on="1"/>
- <pt x="51" y="1480" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1419" on="1"/>
- <pt x="612" y="1417" on="1"/>
- <pt x="544" y="1413" on="1"/>
- <pt x="469" y="1408" on="0"/>
- <pt x="459" y="1366" on="1"/>
- <pt x="446" y="1302" on="0"/>
- <pt x="446" y="1221" on="1"/>
- <pt x="446" y="259" on="1"/>
- <pt x="446" y="200" on="0"/>
- <pt x="453" y="147" on="1"/>
- <pt x="459" y="109" on="0"/>
- <pt x="467" y="97" on="1"/>
- <pt x="486" y="72" on="0"/>
- <pt x="544" y="68" on="1"/>
- <pt x="612" y="63" on="1"/>
- <pt x="631" y="62" on="1"/>
- <pt x="631" y="0" on="1"/>
- <pt x="51" y="0" on="1"/>
- <pt x="51" y="62" on="1"/>
- <pt x="70" y="63" on="1"/>
- <pt x="137" y="68" on="1"/>
- <pt x="213" y="74" on="0"/>
- <pt x="223" y="115" on="1"/>
- <pt x="236" y="177" on="0"/>
- </contour>
- <contour>
- <pt x="8" y="1604" on="1"/>
- <pt x="35" y="1744" on="0"/>
- <pt x="104" y="1797" on="1"/>
- <pt x="158" y="1839" on="0"/>
- <pt x="235" y="1839" on="1"/>
- <pt x="300" y="1839" on="0"/>
- <pt x="353" y="1801" on="1"/>
- <pt x="388" y="1776" on="1"/>
- <pt x="440" y="1739" on="0"/>
- <pt x="494" y="1739" on="1"/>
- <pt x="589" y="1739" on="0"/>
- <pt x="612" y="1838" on="1"/>
- <pt x="674" y="1838" on="1"/>
- <pt x="646" y="1699" on="0"/>
- <pt x="578" y="1646" on="1"/>
- <pt x="524" y="1604" on="0"/>
- <pt x="447" y="1604" on="1"/>
- <pt x="384" y="1604" on="0"/>
- <pt x="329" y="1642" on="1"/>
- <pt x="294" y="1666" on="1"/>
- <pt x="239" y="1704" on="0"/>
- <pt x="187" y="1704" on="1"/>
- <pt x="99" y="1704" on="0"/>
- <pt x="70" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 57 20 40 45 20 52 48 84 0 29 19 28 18 11 1 10 59 48 47 36 4 13 52
- 40 10 29 28 1 0 11 10 0 14 29 0 28 19 11 18 10 1 48 47 2 13 18 59 36
- 0 0 0 19 18 37 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="J" xMin="0" yMin="-297" xMax="766" yMax="1480">
- <contour>
- <pt x="0" y="-276" on="1"/>
- <pt x="0" y="-46" on="1"/>
- <pt x="117" y="-46" on="1"/>
- <pt x="119" y="-70" on="1"/>
- <pt x="127" y="-160" on="0"/>
- <pt x="147" y="-185" on="1"/>
- <pt x="171" y="-215" on="0"/>
- <pt x="234" y="-215" on="1"/>
- <pt x="333" y="-215" on="0"/>
- <pt x="353" y="-124" on="1"/>
- <pt x="371" y="-45" on="0"/>
- <pt x="371" y="148" on="1"/>
- <pt x="371" y="1221" on="1"/>
- <pt x="372" y="1340" on="0"/>
- <pt x="354" y="1377" on="1"/>
- <pt x="339" y="1409" on="0"/>
- <pt x="273" y="1413" on="1"/>
- <pt x="205" y="1417" on="1"/>
- <pt x="186" y="1419" on="1"/>
- <pt x="186" y="1480" on="1"/>
- <pt x="766" y="1480" on="1"/>
- <pt x="766" y="1419" on="1"/>
- <pt x="747" y="1417" on="1"/>
- <pt x="680" y="1413" on="1"/>
- <pt x="612" y="1408" on="0"/>
- <pt x="601" y="1386" on="1"/>
- <pt x="590" y="1366" on="0"/>
- <pt x="587" y="1320" on="1"/>
- <pt x="581" y="1221" on="1"/>
- <pt x="581" y="270" on="1"/>
- <pt x="581" y="-35" on="0"/>
- <pt x="482" y="-156" on="1"/>
- <pt x="366" y="-297" on="0"/>
- <pt x="159" y="-297" on="1"/>
- <pt x="97" y="-297" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 0 0 7 7 33 48 84 12 19 1 29 28 21 11 4 19 2 3 0 1 2 1 0 3 13
- 33 2 0 20 19 0 14 19 12 2 11 0 2 21 20 2 13 28 0 0 29 28 32 1 11
- 1 4 48 196 12 11 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Jcircumflex" xMin="0" yMin="-297" xMax="827" yMax="1925">
- <contour>
- <pt x="0" y="-276" on="1"/>
- <pt x="0" y="-46" on="1"/>
- <pt x="117" y="-46" on="1"/>
- <pt x="119" y="-70" on="1"/>
- <pt x="127" y="-160" on="0"/>
- <pt x="147" y="-185" on="1"/>
- <pt x="171" y="-215" on="0"/>
- <pt x="234" y="-215" on="1"/>
- <pt x="333" y="-215" on="0"/>
- <pt x="353" y="-124" on="1"/>
- <pt x="371" y="-45" on="0"/>
- <pt x="371" y="148" on="1"/>
- <pt x="371" y="1221" on="1"/>
- <pt x="372" y="1340" on="0"/>
- <pt x="354" y="1377" on="1"/>
- <pt x="339" y="1409" on="0"/>
- <pt x="273" y="1413" on="1"/>
- <pt x="205" y="1417" on="1"/>
- <pt x="186" y="1419" on="1"/>
- <pt x="186" y="1480" on="1"/>
- <pt x="766" y="1480" on="1"/>
- <pt x="766" y="1419" on="1"/>
- <pt x="747" y="1417" on="1"/>
- <pt x="680" y="1413" on="1"/>
- <pt x="612" y="1408" on="0"/>
- <pt x="601" y="1386" on="1"/>
- <pt x="590" y="1366" on="0"/>
- <pt x="587" y="1320" on="1"/>
- <pt x="581" y="1221" on="1"/>
- <pt x="581" y="270" on="1"/>
- <pt x="581" y="-35" on="0"/>
- <pt x="482" y="-156" on="1"/>
- <pt x="366" y="-297" on="0"/>
- <pt x="159" y="-297" on="1"/>
- <pt x="97" y="-297" on="0"/>
- </contour>
- <contour>
- <pt x="124" y="1604" on="1"/>
- <pt x="365" y="1925" on="1"/>
- <pt x="587" y="1925" on="1"/>
- <pt x="827" y="1604" on="1"/>
- <pt x="741" y="1604" on="1"/>
- <pt x="476" y="1826" on="1"/>
- <pt x="210" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 7 7 33 48 84 12 19 41 40 39 38 35 5 36 19 3 1 29 28 21 11 4 19
- 2 3 0 1 2 1 0 3 13 33 2 0 37 36 1 0 20 19 0 14 19 12 40 28 11
- 2 41 36 35 2 4 11 0 3 39 38 37 21 20 5 13 28 0 0 29 28 32 1 11 1
- 4 48 196 12 11 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="K" xMin="56" yMin="0" xMax="1463" yMax="1480">
- <contour>
- <pt x="451" y="754" on="1"/>
- <pt x="899" y="1221" on="1"/>
- <pt x="950" y="1275" on="0"/>
- <pt x="983" y="1322" on="1"/>
- <pt x="1018" y="1371" on="0"/>
- <pt x="1036" y="1387" on="1"/>
- <pt x="1046" y="1397" on="0"/>
- <pt x="1046" y="1402" on="1"/>
- <pt x="1046" y="1416" on="0"/>
- <pt x="990" y="1417" on="1"/>
- <pt x="901" y="1419" on="1"/>
- <pt x="883" y="1419" on="1"/>
- <pt x="883" y="1480" on="1"/>
- <pt x="1339" y="1480" on="1"/>
- <pt x="1339" y="1419" on="1"/>
- <pt x="1322" y="1417" on="1"/>
- <pt x="1261" y="1416" on="1"/>
- <pt x="1207" y="1416" on="0"/>
- <pt x="1160" y="1377" on="1"/>
- <pt x="1115" y="1341" on="0"/>
- <pt x="996" y="1220" on="1"/>
- <pt x="618" y="835" on="1"/>
- <pt x="1136" y="258" on="1"/>
- <pt x="1240" y="150" on="1"/>
- <pt x="1303" y="84" on="0"/>
- <pt x="1334" y="76" on="1"/>
- <pt x="1365" y="67" on="0"/>
- <pt x="1442" y="63" on="1"/>
- <pt x="1463" y="62" on="1"/>
- <pt x="1463" y="0" on="1"/>
- <pt x="858" y="0" on="1"/>
- <pt x="858" y="62" on="1"/>
- <pt x="876" y="62" on="1"/>
- <pt x="1000" y="62" on="0"/>
- <pt x="1000" y="86" on="1"/>
- <pt x="1000" y="120" on="0"/>
- <pt x="876" y="262" on="1"/>
- <pt x="451" y="748" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="456" y="160" on="1"/>
- <pt x="458" y="90" on="0"/>
- <pt x="484" y="79" on="1"/>
- <pt x="510" y="69" on="0"/>
- <pt x="593" y="63" on="1"/>
- <pt x="611" y="62" on="1"/>
- <pt x="611" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 71 64 54 63 53 46 44 38 37 32 31 28 22 21 14 11 10 0 12 12 29 3 46 45 30
- 29 3 0 64 63 13 12 0 3 14 64 71 63 54 46 53 45 44 32 31 30 29 28 22 21
- 14 13 12 11 10 14 13 34 7 0 0 0 71 38 37 0 32 3 53 1 4 48 196 54 53
- 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Kcommaaccent" xMin="56" yMin="-432" xMax="1463" yMax="1480">
- <contour>
- <pt x="451" y="754" on="1"/>
- <pt x="899" y="1221" on="1"/>
- <pt x="950" y="1274" on="0"/>
- <pt x="983" y="1322" on="1"/>
- <pt x="1018" y="1371" on="0"/>
- <pt x="1036" y="1387" on="1"/>
- <pt x="1046" y="1397" on="0"/>
- <pt x="1046" y="1402" on="1"/>
- <pt x="1046" y="1416" on="0"/>
- <pt x="990" y="1417" on="1"/>
- <pt x="901" y="1419" on="1"/>
- <pt x="883" y="1419" on="1"/>
- <pt x="883" y="1480" on="1"/>
- <pt x="1339" y="1480" on="1"/>
- <pt x="1339" y="1419" on="1"/>
- <pt x="1322" y="1417" on="1"/>
- <pt x="1261" y="1416" on="1"/>
- <pt x="1207" y="1416" on="0"/>
- <pt x="1160" y="1377" on="1"/>
- <pt x="1115" y="1341" on="0"/>
- <pt x="996" y="1220" on="1"/>
- <pt x="618" y="835" on="1"/>
- <pt x="1136" y="258" on="1"/>
- <pt x="1240" y="150" on="1"/>
- <pt x="1303" y="84" on="0"/>
- <pt x="1334" y="76" on="1"/>
- <pt x="1365" y="67" on="0"/>
- <pt x="1442" y="63" on="1"/>
- <pt x="1463" y="62" on="1"/>
- <pt x="1463" y="0" on="1"/>
- <pt x="858" y="0" on="1"/>
- <pt x="858" y="62" on="1"/>
- <pt x="876" y="62" on="1"/>
- <pt x="1000" y="62" on="0"/>
- <pt x="1000" y="86" on="1"/>
- <pt x="1000" y="120" on="0"/>
- <pt x="876" y="262" on="1"/>
- <pt x="451" y="748" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="456" y="160" on="1"/>
- <pt x="458" y="90" on="0"/>
- <pt x="484" y="79" on="1"/>
- <pt x="510" y="69" on="0"/>
- <pt x="593" y="63" on="1"/>
- <pt x="611" y="62" on="1"/>
- <pt x="611" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- </contour>
- <contour>
- <pt x="562" y="-421" on="1"/>
- <pt x="562" y="-349" on="1"/>
- <pt x="611" y="-359" on="0"/>
- <pt x="666" y="-359" on="1"/>
- <pt x="769" y="-359" on="0"/>
- <pt x="769" y="-279" on="1"/>
- <pt x="769" y="-190" on="0"/>
- <pt x="611" y="-175" on="1"/>
- <pt x="611" y="-111" on="1"/>
- <pt x="745" y="-114" on="0"/>
- <pt x="811" y="-143" on="1"/>
- <pt x="904" y="-185" on="0"/>
- <pt x="904" y="-280" on="1"/>
- <pt x="904" y="-432" on="0"/>
- <pt x="687" y="-432" on="1"/>
- <pt x="628" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 106 values pushed */
- 0 0 75 17 86 48 84 71 64 54 63 53 46 44 38 37 32 31 28 22 21 14 11 10 0
- 12 12 29 3 80 79 73 72 4 13 86 29 46 45 30 29 3 0 64 63 13 12 0 3 14
- 0 0 77 48 84 48 196 64 71 63 54 46 53 80 79 73 72 45 44 32 31 30 29 28 22
- 21 14 13 12 11 10 18 13 84 34 7 3 12 0 0 0 71 38 37 0 32 3 53 1 4
- 48 196 54 53 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="L" xMin="56" yMin="0" xMax="1203" yMax="1480">
- <contour>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 29 22 12 21 11 4 32 30 2 1 4 21 34 3 0 0 35 34 7 1 3 1 4 48 84
- 4 3 1 0 22 21 0 14 22 29 21 12 4 11 35 34 32 1 4 2 29 3 0 0 30
- 29 32 1 11 1 4 48 196 3 2 1 12 11 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lacute" xMin="56" yMin="0" xMax="1203" yMax="1925">
- <contour>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="309" y="1604" on="1"/>
- <pt x="550" y="1925" on="1"/>
- <pt x="809" y="1925" on="1"/>
- <pt x="402" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 29 22 12 21 11 4 43 40 2 41 21 3 32 30 2 1 4 21 34 3 0 0 35 34 7
- 1 3 1 4 48 84 42 41 1 4 3 1 2 0 22 21 0 14 22 29 21 12 4 11 42
- 41 35 34 32 1 6 2 29 3 43 40 2 29 11 3 0 0 30 29 32 1 11 1 4 48
- 196 3 2 1 12 11 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcaron" xMin="56" yMin="0" xMax="1203" yMax="1480">
- <contour>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="888" y="1283" on="1"/>
- <pt x="809" y="1283" on="1"/>
- <pt x="809" y="1480" on="1"/>
- <pt x="1006" y="1480" on="1"/>
- <pt x="1006" y="1309" on="1"/>
- <pt x="1006" y="1146" on="0"/>
- <pt x="944" y="1081" on="1"/>
- <pt x="897" y="1032" on="0"/>
- <pt x="809" y="1026" on="1"/>
- <pt x="809" y="1076" on="1"/>
- <pt x="888" y="1082" on="0"/>
- <pt x="888" y="1231" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 29 22 12 21 11 4 51 49 48 44 41 40 32 30 2 1 10 21 34 3 0 0 35 34 7
- 1 3 1 4 48 84 4 3 1 0 43 42 22 21 0 3 14 22 29 21 12 4 11 1 2
- 43 2 51 40 35 3 43 41 3 34 32 2 41 29 3 0 0 49 48 42 41 4 3 43 30
- 29 32 1 11 2 4 48 196 44 43 1 3 2 1 12 11 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcommaaccent" xMin="56" yMin="-432" xMax="1203" yMax="1480">
- <contour>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="451" y="-421" on="1"/>
- <pt x="451" y="-349" on="1"/>
- <pt x="500" y="-359" on="0"/>
- <pt x="555" y="-359" on="1"/>
- <pt x="658" y="-359" on="0"/>
- <pt x="658" y="-279" on="1"/>
- <pt x="658" y="-190" on="0"/>
- <pt x="500" y="-175" on="1"/>
- <pt x="500" y="-111" on="1"/>
- <pt x="634" y="-114" on="0"/>
- <pt x="700" y="-143" on="1"/>
- <pt x="793" y="-185" on="0"/>
- <pt x="793" y="-280" on="1"/>
- <pt x="793" y="-432" on="0"/>
- <pt x="576" y="-432" on="1"/>
- <pt x="517" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 0 0 43 17 54 48 84 29 22 12 21 11 4 32 30 2 1 4 21 34 3 48 47 41 40
- 4 13 54 3 0 0 35 34 7 1 3 1 4 48 84 4 3 1 0 22 21 0 14 0 0
- 45 48 52 48 196 22 29 21 12 4 11 52 52 48 47 35 34 32 1 7 2 29 3 0 0
- 41 40 30 29 32 3 11 1 4 48 196 3 2 1 12 11 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ldot" xMin="56" yMin="0" xMax="1203" yMax="1480">
- <contour>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- </contour>
- <contour>
- <pt x="870" y="642" on="1"/>
- <pt x="870" y="839" on="1"/>
- <pt x="1067" y="839" on="1"/>
- <pt x="1067" y="642" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 29 22 12 21 11 4 32 30 2 1 4 40 34 3 0 0 43 40 5 1 41 35 34 7 1
- 3 2 4 48 84 42 41 1 4 3 1 2 0 22 21 0 14 22 29 21 12 4 11 1 2
- 42 2 35 34 32 3 40 29 3 0 0 41 40 4 1 42 30 29 32 1 11 2 4 48 196
- 43 42 1 3 2 1 12 11 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lslash" xMin="56" yMin="0" xMax="1203" yMax="1480">
- <contour>
- <pt x="241" y="748" on="1"/>
- <pt x="56" y="641" on="1"/>
- <pt x="56" y="726" on="1"/>
- <pt x="241" y="833" on="1"/>
- <pt x="241" y="1221" on="1"/>
- <pt x="241" y="1280" on="0"/>
- <pt x="234" y="1333" on="1"/>
- <pt x="228" y="1372" on="0"/>
- <pt x="220" y="1384" on="1"/>
- <pt x="202" y="1410" on="0"/>
- <pt x="142" y="1413" on="1"/>
- <pt x="75" y="1417" on="1"/>
- <pt x="56" y="1419" on="1"/>
- <pt x="56" y="1480" on="1"/>
- <pt x="636" y="1480" on="1"/>
- <pt x="636" y="1419" on="1"/>
- <pt x="617" y="1417" on="1"/>
- <pt x="549" y="1413" on="1"/>
- <pt x="474" y="1408" on="0"/>
- <pt x="464" y="1366" on="1"/>
- <pt x="451" y="1302" on="0"/>
- <pt x="451" y="1221" on="1"/>
- <pt x="451" y="954" on="1"/>
- <pt x="722" y="1110" on="1"/>
- <pt x="722" y="1025" on="1"/>
- <pt x="451" y="869" on="1"/>
- <pt x="451" y="259" on="1"/>
- <pt x="451" y="108" on="0"/>
- <pt x="478" y="101" on="1"/>
- <pt x="509" y="86" on="0"/>
- <pt x="623" y="86" on="1"/>
- <pt x="859" y="86" on="1"/>
- <pt x="1001" y="86" on="0"/>
- <pt x="1046" y="103" on="1"/>
- <pt x="1092" y="121" on="0"/>
- <pt x="1094" y="175" on="1"/>
- <pt x="1096" y="276" on="1"/>
- <pt x="1098" y="296" on="1"/>
- <pt x="1203" y="296" on="1"/>
- <pt x="1203" y="0" on="1"/>
- <pt x="56" y="0" on="1"/>
- <pt x="56" y="62" on="1"/>
- <pt x="75" y="63" on="1"/>
- <pt x="142" y="68" on="1"/>
- <pt x="218" y="74" on="0"/>
- <pt x="228" y="115" on="1"/>
- <pt x="241" y="177" on="0"/>
- <pt x="241" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 47 40 21 14 4 13 38 37 28 26 25 24 23 22 3 2 1 0 12 13 30 3 0 0 31
- 30 7 1 39 1 4 48 84 40 39 1 0 14 13 0 14 40 47 14 21 13 4 37 31 30
- 28 24 23 6 38 21 3 2 1 0 0 0 26 25 22 21 32 3 0 1 4 48 196 39 38
- 1 47 4 3 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="M" xMin="48" yMin="0" xMax="1773" yMax="1480">
- <contour>
- <pt x="461" y="1480" on="1"/>
- <pt x="934" y="389" on="1"/>
- <pt x="1400" y="1480" on="1"/>
- <pt x="1773" y="1480" on="1"/>
- <pt x="1773" y="1419" on="1"/>
- <pt x="1754" y="1417" on="1"/>
- <pt x="1686" y="1413" on="1"/>
- <pt x="1618" y="1408" on="0"/>
- <pt x="1607" y="1386" on="1"/>
- <pt x="1597" y="1366" on="0"/>
- <pt x="1594" y="1320" on="1"/>
- <pt x="1588" y="1221" on="1"/>
- <pt x="1588" y="259" on="1"/>
- <pt x="1594" y="160" on="1"/>
- <pt x="1598" y="93" on="0"/>
- <pt x="1620" y="82" on="1"/>
- <pt x="1639" y="71" on="0"/>
- <pt x="1686" y="68" on="1"/>
- <pt x="1754" y="63" on="1"/>
- <pt x="1773" y="62" on="1"/>
- <pt x="1773" y="0" on="1"/>
- <pt x="1209" y="0" on="1"/>
- <pt x="1209" y="62" on="1"/>
- <pt x="1227" y="63" on="1"/>
- <pt x="1294" y="68" on="1"/>
- <pt x="1361" y="73" on="0"/>
- <pt x="1372" y="95" on="1"/>
- <pt x="1383" y="114" on="0"/>
- <pt x="1386" y="160" on="1"/>
- <pt x="1392" y="259" on="1"/>
- <pt x="1392" y="1276" on="1"/>
- <pt x="901" y="118" on="1"/>
- <pt x="828" y="118" on="1"/>
- <pt x="343" y="1231" on="1"/>
- <pt x="343" y="259" on="1"/>
- <pt x="343" y="203" on="0"/>
- <pt x="351" y="147" on="1"/>
- <pt x="358" y="96" on="0"/>
- <pt x="383" y="82" on="1"/>
- <pt x="404" y="71" on="0"/>
- <pt x="442" y="68" on="1"/>
- <pt x="510" y="63" on="1"/>
- <pt x="528" y="62" on="1"/>
- <pt x="528" y="0" on="1"/>
- <pt x="48" y="0" on="1"/>
- <pt x="48" y="62" on="1"/>
- <pt x="67" y="63" on="1"/>
- <pt x="135" y="68" on="1"/>
- <pt x="199" y="73" on="0"/>
- <pt x="233" y="139" on="0"/>
- <pt x="233" y="259" on="1"/>
- <pt x="234" y="1221" on="1"/>
- <pt x="235" y="1335" on="0"/>
- <pt x="216" y="1377" on="1"/>
- <pt x="201" y="1409" on="0"/>
- <pt x="135" y="1413" on="1"/>
- <pt x="67" y="1417" on="1"/>
- <pt x="48" y="1419" on="1"/>
- <pt x="48" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 51 58 50 44 34 43 33 32 31 30 29 22 19 12 11 4 1 11 0 20 3 44 43 21 20
- 3 0 58 3 2 0 0 3 14 58 51 44 50 43 34 2 11 29 2 32 31 22 21 1 0
- 6 29 33 3 20 19 4 3 4 13 11 51 50 33 0 0 30 29 4 1 11 1 4 48 196
- 12 11 1 34 33 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="N" xMin="43" yMin="-20" xMax="1435" yMax="1480">
- <contour>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1149" y="1387" on="0"/>
- <pt x="1127" y="1399" on="1"/>
- <pt x="1107" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1409" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1366" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="-20" on="1"/>
- <pt x="1180" y="-20" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1336" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 38 45 37 31 23 30 22 19 12 9 2 1 6 0 30 3 21 20 30 31 30 1 0 45 11
- 10 0 0 3 14 45 38 31 37 30 23 21 19 1 2 10 9 0 3 1 22 3 12 11 2
- 13 19 0 0 2 1 35 1 19 23 22 35 1 37 2 4 48 196 20 19 1 38 37 1 2
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Nacute" xMin="43" yMin="-20" xMax="1435" yMax="1925">
- <contour>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1149" y="1387" on="0"/>
- <pt x="1127" y="1399" on="1"/>
- <pt x="1107" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1409" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1366" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="-20" on="1"/>
- <pt x="1180" y="-20" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1336" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="646" y="1604" on="1"/>
- <pt x="887" y="1925" on="1"/>
- <pt x="1146" y="1925" on="1"/>
- <pt x="739" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 38 45 37 31 23 30 49 46 2 47 0 3 22 19 12 9 2 1 6 0 30 3 21 20 30
- 48 47 1 31 30 1 2 0 45 11 10 0 0 3 14 45 38 31 37 30 23 21 19 1 2
- 49 48 47 46 10 9 0 7 1 22 3 12 11 2 13 19 0 0 2 1 35 1 19 23 22
- 35 1 37 2 4 48 196 20 19 1 38 37 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncaron" xMin="43" yMin="-20" xMax="1435" yMax="1925">
- <contour>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1149" y="1387" on="0"/>
- <pt x="1127" y="1399" on="1"/>
- <pt x="1107" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1409" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1366" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="-20" on="1"/>
- <pt x="1180" y="-20" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1336" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="1073" y="1925" on="1"/>
- <pt x="833" y="1604" on="1"/>
- <pt x="611" y="1604" on="1"/>
- <pt x="370" y="1925" on="1"/>
- <pt x="456" y="1925" on="1"/>
- <pt x="722" y="1703" on="1"/>
- <pt x="987" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 38 45 37 31 23 30 22 19 12 9 2 1 6 0 30 3 52 51 50 49 46 5 13 47 21
- 20 30 48 47 1 31 30 1 2 0 45 11 10 0 0 3 14 45 38 31 37 30 23 21 19
- 1 2 52 51 50 49 48 47 46 10 9 0 10 1 22 3 12 11 2 13 19 0 0 2 1
- 35 1 19 23 22 35 1 37 2 4 48 196 20 19 1 38 37 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncommaaccent" xMin="43" yMin="-432" xMax="1435" yMax="1480">
- <contour>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1150" y="1384" on="0"/>
- <pt x="1130" y="1397" on="1"/>
- <pt x="1112" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1408" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1367" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="-20" on="1"/>
- <pt x="1180" y="-20" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1335" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="582" y="-421" on="1"/>
- <pt x="582" y="-349" on="1"/>
- <pt x="631" y="-359" on="0"/>
- <pt x="686" y="-359" on="1"/>
- <pt x="789" y="-359" on="0"/>
- <pt x="789" y="-279" on="1"/>
- <pt x="789" y="-190" on="0"/>
- <pt x="631" y="-175" on="1"/>
- <pt x="631" y="-111" on="1"/>
- <pt x="765" y="-114" on="0"/>
- <pt x="831" y="-143" on="1"/>
- <pt x="924" y="-185" on="0"/>
- <pt x="924" y="-280" on="1"/>
- <pt x="924" y="-432" on="0"/>
- <pt x="707" y="-432" on="1"/>
- <pt x="647" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 49 17 60 48 84 38 45 37 31 23 30 22 19 12 9 2 1 6 0 30 3 54 53
- 47 46 21 20 6 13 60 30 31 30 1 0 45 11 10 0 0 3 14 0 0 51 48 58 48
- 196 45 38 31 37 30 23 21 19 1 2 58 58 54 53 47 46 10 9 0 8 1 22 3 12
- 11 2 13 19 0 0 2 1 35 1 19 23 22 35 1 37 2 4 48 196 20 19 1 38 37
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ntilde" xMin="43" yMin="-20" xMax="1435" yMax="1839">
- <contour>
- <pt x="376" y="1480" on="1"/>
- <pt x="1159" y="331" on="1"/>
- <pt x="1159" y="1221" on="1"/>
- <pt x="1153" y="1320" on="1"/>
- <pt x="1149" y="1387" on="0"/>
- <pt x="1127" y="1399" on="1"/>
- <pt x="1107" y="1410" on="0"/>
- <pt x="1061" y="1413" on="1"/>
- <pt x="993" y="1417" on="1"/>
- <pt x="974" y="1419" on="1"/>
- <pt x="974" y="1480" on="1"/>
- <pt x="1435" y="1480" on="1"/>
- <pt x="1435" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1349" y="1413" on="1"/>
- <pt x="1281" y="1409" on="0"/>
- <pt x="1270" y="1386" on="1"/>
- <pt x="1259" y="1366" on="0"/>
- <pt x="1256" y="1320" on="1"/>
- <pt x="1250" y="1221" on="1"/>
- <pt x="1250" y="-20" on="1"/>
- <pt x="1180" y="-20" on="1"/>
- <pt x="322" y="1220" on="1"/>
- <pt x="322" y="259" on="1"/>
- <pt x="321" y="144" on="0"/>
- <pt x="340" y="104" on="1"/>
- <pt x="355" y="72" on="0"/>
- <pt x="421" y="68" on="1"/>
- <pt x="489" y="63" on="1"/>
- <pt x="508" y="62" on="1"/>
- <pt x="508" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="130" y="68" on="1"/>
- <pt x="194" y="73" on="0"/>
- <pt x="229" y="140" on="0"/>
- <pt x="229" y="259" on="1"/>
- <pt x="229" y="1221" on="1"/>
- <pt x="230" y="1336" on="0"/>
- <pt x="211" y="1377" on="1"/>
- <pt x="196" y="1409" on="0"/>
- <pt x="130" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="425" y="1604" on="1"/>
- <pt x="452" y="1744" on="0"/>
- <pt x="521" y="1797" on="1"/>
- <pt x="574" y="1839" on="0"/>
- <pt x="652" y="1839" on="1"/>
- <pt x="717" y="1839" on="0"/>
- <pt x="770" y="1801" on="1"/>
- <pt x="805" y="1776" on="1"/>
- <pt x="857" y="1739" on="0"/>
- <pt x="911" y="1739" on="1"/>
- <pt x="1007" y="1739" on="0"/>
- <pt x="1029" y="1838" on="1"/>
- <pt x="1091" y="1838" on="1"/>
- <pt x="1063" y="1699" on="0"/>
- <pt x="995" y="1646" on="1"/>
- <pt x="941" y="1604" on="0"/>
- <pt x="864" y="1604" on="1"/>
- <pt x="801" y="1604" on="0"/>
- <pt x="746" y="1642" on="1"/>
- <pt x="711" y="1666" on="1"/>
- <pt x="656" y="1704" on="0"/>
- <pt x="604" y="1704" on="1"/>
- <pt x="516" y="1704" on="0"/>
- <pt x="487" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 99 values pushed */
- 0 0 67 20 50 55 20 62 48 84 38 45 37 31 23 30 22 19 12 9 2 1 6 0 30
- 3 69 58 57 46 4 13 62 50 0 21 20 30 31 30 1 0 45 11 10 0 0 3 14 45
- 38 31 37 30 23 21 19 1 2 69 58 57 46 10 9 0 7 1 22 3 12 11 2 13 19
- 0 0 2 1 35 1 19 23 22 35 1 37 2 4 48 196 20 19 1 38 37 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="O" xMin="80" yMin="-37" xMax="1398" yMax="1517">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 14 0 0 28 34 4 20 34 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="OE" xMin="80" yMin="-37" xMax="1771" yMax="1517">
- <contour>
- <pt x="973" y="1408" on="1"/>
- <pt x="973" y="1480" on="1"/>
- <pt x="1715" y="1480" on="1"/>
- <pt x="1715" y="1221" on="1"/>
- <pt x="1604" y="1221" on="1"/>
- <pt x="1603" y="1240" on="1"/>
- <pt x="1601" y="1274" on="1"/>
- <pt x="1598" y="1311" on="0"/>
- <pt x="1598" y="1321" on="1"/>
- <pt x="1598" y="1324" on="1"/>
- <pt x="1598" y="1378" on="0"/>
- <pt x="1581" y="1389" on="1"/>
- <pt x="1566" y="1399" on="0"/>
- <pt x="1525" y="1399" on="1"/>
- <pt x="1422" y="1400" on="1"/>
- <pt x="1198" y="1400" on="1"/>
- <pt x="1198" y="808" on="1"/>
- <pt x="1382" y="809" on="1"/>
- <pt x="1445" y="811" on="1"/>
- <pt x="1495" y="812" on="0"/>
- <pt x="1504" y="825" on="1"/>
- <pt x="1512" y="836" on="0"/>
- <pt x="1514" y="867" on="1"/>
- <pt x="1514" y="869" on="1"/>
- <pt x="1514" y="871" on="1"/>
- <pt x="1515" y="881" on="1"/>
- <pt x="1515" y="885" on="0"/>
- <pt x="1516" y="895" on="1"/>
- <pt x="1517" y="911" on="0"/>
- <pt x="1517" y="913" on="1"/>
- <pt x="1518" y="931" on="1"/>
- <pt x="1610" y="931" on="1"/>
- <pt x="1610" y="605" on="1"/>
- <pt x="1518" y="605" on="1"/>
- <pt x="1517" y="623" on="1"/>
- <pt x="1511" y="711" on="0"/>
- <pt x="1486" y="717" on="1"/>
- <pt x="1461" y="728" on="0"/>
- <pt x="1382" y="728" on="1"/>
- <pt x="1198" y="728" on="1"/>
- <pt x="1198" y="259" on="1"/>
- <pt x="1198" y="122" on="0"/>
- <pt x="1238" y="105" on="1"/>
- <pt x="1274" y="86" on="0"/>
- <pt x="1369" y="86" on="1"/>
- <pt x="1466" y="86" on="1"/>
- <pt x="1567" y="92" on="1"/>
- <pt x="1650" y="97" on="0"/>
- <pt x="1655" y="162" on="1"/>
- <pt x="1658" y="234" on="1"/>
- <pt x="1660" y="253" on="1"/>
- <pt x="1771" y="253" on="1"/>
- <pt x="1771" y="0" on="1"/>
- <pt x="973" y="0" on="1"/>
- <pt x="973" y="73" on="1"/>
- <pt x="904" y="15" on="0"/>
- <pt x="856" y="-6" on="1"/>
- <pt x="828" y="-19" on="0"/>
- <pt x="786" y="-26" on="1"/>
- <pt x="721" y="-37" on="0"/>
- <pt x="681" y="-37" on="1"/>
- <pt x="629" y="-37" on="0"/>
- <pt x="524" y="-12" on="1"/>
- <pt x="379" y="23" on="0"/>
- <pt x="281" y="134" on="1"/>
- <pt x="80" y="363" on="0"/>
- <pt x="80" y="741" on="1"/>
- <pt x="80" y="1091" on="0"/>
- <pt x="246" y="1304" on="1"/>
- <pt x="411" y="1517" on="0"/>
- <pt x="678" y="1517" on="1"/>
- <pt x="842" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="973" y="610" on="1"/>
- <pt x="973" y="870" on="1"/>
- <pt x="973" y="1190" on="0"/>
- <pt x="910" y="1320" on="1"/>
- <pt x="848" y="1450" on="0"/>
- <pt x="694" y="1450" on="1"/>
- <pt x="516" y="1450" on="0"/>
- <pt x="410" y="1255" on="1"/>
- <pt x="303" y="1060" on="0"/>
- <pt x="303" y="740" on="1"/>
- <pt x="303" y="420" on="0"/>
- <pt x="410" y="226" on="1"/>
- <pt x="516" y="31" on="0"/>
- <pt x="694" y="31" on="1"/>
- <pt x="864" y="31" on="0"/>
- <pt x="924" y="194" on="1"/>
- <pt x="973" y="327" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 133 values pushed */
- 0 0 85 17 60 77 17 70 48 84 70 0 60 2 0 1 14 2 73 31 30 24 23 22 16
- 9 8 4 3 11 14 38 3 72 54 51 50 45 44 42 40 36 33 32 11 38 52 3 0 0
- 15 14 21 1 1 1 4 48 84 39 38 1 53 52 1 2 0 2 1 0 14 0 0 81 33
- 66 48 196 50 2 31 2 45 44 42 38 36 33 30 24 23 22 14 9 8 4 14 31 15 3
- 66 0 0 0 73 72 54 53 1 0 36 5 15 1 4 48 196 52 51 1 3 2 1 32 31
- 1 40 39 16 15 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oacute" xMin="80" yMin="-37" xMax="1398" yMax="1925">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="585" y="1604" on="1"/>
- <pt x="826" y="1925" on="1"/>
- <pt x="1085" y="1925" on="1"/>
- <pt x="678" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 1 35 32 2 33 0 3 0 34 33 1
- 0 14 0 0 28 34 4 20 34 12 48 196 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Obreve" xMin="80" yMin="-37" xMax="1398" yMax="1925">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="406" y="1925" on="1"/>
- <pt x="471" y="1925" on="1"/>
- <pt x="498" y="1835" on="0"/>
- <pt x="558" y="1793" on="1"/>
- <pt x="626" y="1746" on="0"/>
- <pt x="739" y="1746" on="1"/>
- <pt x="865" y="1746" on="0"/>
- <pt x="935" y="1805" on="1"/>
- <pt x="984" y="1845" on="0"/>
- <pt x="1008" y="1925" on="1"/>
- <pt x="1072" y="1925" on="1"/>
- <pt x="1053" y="1790" on="0"/>
- <pt x="981" y="1709" on="1"/>
- <pt x="887" y="1604" on="0"/>
- <pt x="739" y="1604" on="1"/>
- <pt x="585" y="1604" on="0"/>
- <pt x="490" y="1719" on="1"/>
- <pt x="425" y="1796" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 37 20 46 24 38 8 16 38 0 48 84 8 2 0 0 1 42 41 33 32 4 13 46
- 0 0 14 0 0 28 34 4 20 34 12 48 196 42 41 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ocircumflex" xMin="80" yMin="-37" xMax="1398" yMax="1925">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="388" y="1604" on="1"/>
- <pt x="629" y="1925" on="1"/>
- <pt x="851" y="1925" on="1"/>
- <pt x="1091" y="1604" on="1"/>
- <pt x="1005" y="1604" on="1"/>
- <pt x="740" y="1826" on="1"/>
- <pt x="474" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 49 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 1 38 37 36 35 32 5 33 0 3 0
- 34 33 1 0 14 0 0 28 34 4 20 34 12 48 196 38 37 36 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Odieresis" xMin="80" yMin="-37" xMax="1398" yMax="1777">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="455" y="1604" on="1"/>
- <pt x="455" y="1777" on="1"/>
- <pt x="628" y="1777" on="1"/>
- <pt x="628" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="850" y="1604" on="1"/>
- <pt x="850" y="1777" on="1"/>
- <pt x="1023" y="1777" on="1"/>
- <pt x="1023" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 0 0 39 36 35 32 13 3 33 1 4
- 48 84 38 37 34 33 3 0 14 0 0 28 34 4 20 34 12 48 196 4 38 12 32 0 0
- 37 36 13 1 38 35 34 13 1 32 2 4 48 196 39 38 1 33 32 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ograve" xMin="80" yMin="-37" xMax="1398" yMax="1925">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="893" y="1604" on="1"/>
- <pt x="800" y="1604" on="1"/>
- <pt x="393" y="1925" on="1"/>
- <pt x="652" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 1 33 32 2 34 0 3 0 35 34 1
- 0 14 0 0 28 34 4 20 34 12 48 196 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ohungarumlaut" xMin="80" yMin="-37" xMax="1398" yMax="1925">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="492" y="1604" on="1"/>
- <pt x="706" y="1925" on="1"/>
- <pt x="875" y="1925" on="1"/>
- <pt x="554" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="801" y="1604" on="1"/>
- <pt x="1014" y="1925" on="1"/>
- <pt x="1183" y="1925" on="1"/>
- <pt x="862" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 1 39 36 35 32 4 33 0 3 0 38
- 37 34 33 3 0 14 0 0 28 34 4 20 34 12 48 196 39 38 37 36 35 34 33 32 12
- 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Omacron" xMin="80" yMin="-37" xMax="1398" yMax="1727">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="418" y="1604" on="1"/>
- <pt x="418" y="1727" on="1"/>
- <pt x="1060" y="1727" on="1"/>
- <pt x="1060" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 2 0 0 0 0 35 32 12 1 33 1 4 48 84
- 34 33 1 0 14 0 0 28 34 4 20 34 12 48 196 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oslash" xMin="80" yMin="-37" xMax="1398" yMax="1517">
- <contour>
- <pt x="80" y="-37" on="1"/>
- <pt x="253" y="181" on="1"/>
- <pt x="176" y="282" on="0"/>
- <pt x="137" y="387" on="1"/>
- <pt x="80" y="542" on="0"/>
- <pt x="80" y="741" on="1"/>
- <pt x="80" y="1101" on="0"/>
- <pt x="257" y="1309" on="1"/>
- <pt x="434" y="1517" on="0"/>
- <pt x="739" y="1517" on="1"/>
- <pt x="994" y="1517" on="0"/>
- <pt x="1178" y="1352" on="1"/>
- <pt x="1309" y="1517" on="1"/>
- <pt x="1398" y="1517" on="1"/>
- <pt x="1226" y="1298" on="1"/>
- <pt x="1303" y="1198" on="0"/>
- <pt x="1341" y="1094" on="1"/>
- <pt x="1398" y="938" on="0"/>
- <pt x="1398" y="739" on="1"/>
- <pt x="1398" y="380" on="0"/>
- <pt x="1221" y="172" on="1"/>
- <pt x="1044" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="485" y="-37" on="0"/>
- <pt x="305" y="124" on="1"/>
- <pt x="179" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="407" y="254" on="1"/>
- <pt x="463" y="154" on="0"/>
- <pt x="526" y="104" on="1"/>
- <pt x="617" y="31" on="0"/>
- <pt x="739" y="31" on="1"/>
- <pt x="940" y="31" on="0"/>
- <pt x="1055" y="220" on="1"/>
- <pt x="1170" y="409" on="0"/>
- <pt x="1170" y="738" on="1"/>
- <pt x="1170" y="973" on="0"/>
- <pt x="1107" y="1147" on="1"/>
- </contour>
- <contour>
- <pt x="1074" y="1220" on="1"/>
- <pt x="1017" y="1323" on="0"/>
- <pt x="954" y="1374" on="1"/>
- <pt x="862" y="1450" on="0"/>
- <pt x="738" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="744" on="1"/>
- <pt x="308" y="505" on="0"/>
- <pt x="371" y="332" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 41 17 9 30 17 22 48 84 22 2 9 0 1 1 47 37 36 26 24 14 11 1 8
- 0 2 3 0 0 1 13 12 2 13 0 0 1 25 0 2 0 14 0 0 45 34 5 34 34
- 18 48 196 47 37 36 26 25 24 18 14 13 12 11 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Otilde" xMin="80" yMin="-37" xMax="1398" yMax="1839">
- <contour>
- <pt x="739" y="1517" on="1"/>
- <pt x="1044" y="1517" on="0"/>
- <pt x="1221" y="1309" on="1"/>
- <pt x="1398" y="1101" on="0"/>
- <pt x="1398" y="742" on="1"/>
- <pt x="1398" y="377" on="0"/>
- <pt x="1220" y="170" on="1"/>
- <pt x="1043" y="-37" on="0"/>
- <pt x="729" y="-37" on="1"/>
- <pt x="461" y="-37" on="0"/>
- <pt x="292" y="133" on="1"/>
- <pt x="80" y="347" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1100" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="435" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="739" y="1450" on="1"/>
- <pt x="538" y="1450" on="0"/>
- <pt x="423" y="1261" on="1"/>
- <pt x="308" y="1072" on="0"/>
- <pt x="308" y="741" on="1"/>
- <pt x="308" y="413" on="0"/>
- <pt x="422" y="222" on="1"/>
- <pt x="536" y="31" on="0"/>
- <pt x="734" y="31" on="1"/>
- <pt x="918" y="31" on="0"/>
- <pt x="1030" y="182" on="1"/>
- <pt x="1170" y="371" on="0"/>
- <pt x="1170" y="743" on="1"/>
- <pt x="1170" y="1074" on="0"/>
- <pt x="1055" y="1261" on="1"/>
- <pt x="939" y="1450" on="0"/>
- </contour>
- <contour>
- <pt x="406" y="1604" on="1"/>
- <pt x="433" y="1743" on="0"/>
- <pt x="502" y="1797" on="1"/>
- <pt x="555" y="1839" on="0"/>
- <pt x="633" y="1839" on="1"/>
- <pt x="698" y="1839" on="0"/>
- <pt x="751" y="1801" on="1"/>
- <pt x="786" y="1776" on="1"/>
- <pt x="838" y="1739" on="0"/>
- <pt x="892" y="1739" on="1"/>
- <pt x="988" y="1739" on="0"/>
- <pt x="1010" y="1838" on="1"/>
- <pt x="1072" y="1838" on="1"/>
- <pt x="1044" y="1699" on="0"/>
- <pt x="976" y="1646" on="1"/>
- <pt x="922" y="1604" on="0"/>
- <pt x="845" y="1604" on="1"/>
- <pt x="782" y="1604" on="0"/>
- <pt x="727" y="1642" on="1"/>
- <pt x="692" y="1666" on="1"/>
- <pt x="637" y="1704" on="0"/>
- <pt x="585" y="1704" on="1"/>
- <pt x="497" y="1704" on="0"/>
- <pt x="468" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 53 20 36 41 20 48 24 17 8 16 17 0 48 84 8 2 0 0 1 55 44 43 32
- 4 13 48 36 0 0 14 0 0 28 34 4 20 34 12 48 196 55 44 43 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="P" xMin="31" yMin="0" xMax="1108" yMax="1492">
- <contour>
- <pt x="462" y="1480" on="1"/>
- <pt x="608" y="1485" on="1"/>
- <pt x="676" y="1487" on="1"/>
- <pt x="836" y="1492" on="0"/>
- <pt x="947" y="1427" on="1"/>
- <pt x="1108" y="1333" on="0"/>
- <pt x="1108" y="1095" on="1"/>
- <pt x="1108" y="617" on="0"/>
- <pt x="478" y="617" on="1"/>
- <pt x="424" y="617" on="1"/>
- <pt x="424" y="259" on="1"/>
- <pt x="423" y="144" on="0"/>
- <pt x="442" y="104" on="1"/>
- <pt x="457" y="72" on="0"/>
- <pt x="523" y="68" on="1"/>
- <pt x="591" y="63" on="1"/>
- <pt x="634" y="62" on="1"/>
- <pt x="634" y="0" on="1"/>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="117" y="68" on="1"/>
- <pt x="193" y="74" on="0"/>
- <pt x="203" y="115" on="1"/>
- <pt x="216" y="177" on="0"/>
- <pt x="216" y="259" on="1"/>
- <pt x="216" y="1221" on="1"/>
- <pt x="216" y="1280" on="0"/>
- <pt x="209" y="1333" on="1"/>
- <pt x="203" y="1372" on="0"/>
- <pt x="195" y="1384" on="1"/>
- <pt x="177" y="1410" on="0"/>
- <pt x="117" y="1413" on="1"/>
- <pt x="50" y="1417" on="1"/>
- <pt x="31" y="1419" on="1"/>
- <pt x="31" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="424" y="685" on="1"/>
- <pt x="490" y="685" on="1"/>
- <pt x="886" y="685" on="0"/>
- <pt x="886" y="1091" on="1"/>
- <pt x="886" y="1265" on="0"/>
- <pt x="810" y="1339" on="1"/>
- <pt x="735" y="1413" on="0"/>
- <pt x="559" y="1413" on="1"/>
- <pt x="424" y="1413" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 26 35 25 18 10 17 44 43 37 36 9 8 6 0 17 3 18 17 1 0 35 0 0 14 0
- 0 39 33 6 48 196 35 26 18 25 17 10 43 37 8 0 4 13 6 9 0 0 44 36 10
- 9 32 3 25 1 4 48 196 26 25 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Q" xMin="80" yMin="-298" xMax="1711" yMax="1517">
- <contour>
- <pt x="1711" y="-174" on="1"/>
- <pt x="1463" y="-298" on="1"/>
- <pt x="1211" y="-224" on="0"/>
- <pt x="926" y="-49" on="1"/>
- <pt x="885" y="-24" on="1"/>
- <pt x="809" y="-37" on="0"/>
- <pt x="739" y="-37" on="1"/>
- <pt x="434" y="-37" on="0"/>
- <pt x="257" y="171" on="1"/>
- <pt x="80" y="380" on="0"/>
- <pt x="80" y="740" on="1"/>
- <pt x="80" y="1099" on="0"/>
- <pt x="257" y="1308" on="1"/>
- <pt x="434" y="1517" on="0"/>
- <pt x="739" y="1517" on="1"/>
- <pt x="1045" y="1517" on="0"/>
- <pt x="1222" y="1308" on="1"/>
- <pt x="1398" y="1100" on="0"/>
- <pt x="1398" y="740" on="1"/>
- <pt x="1398" y="413" on="0"/>
- <pt x="1247" y="204" on="1"/>
- <pt x="1145" y="62" on="0"/>
- <pt x="974" y="1" on="1"/>
- <pt x="1211" y="-136" on="0"/>
- </contour>
- <contour>
- <pt x="740" y="1450" on="1"/>
- <pt x="540" y="1450" on="0"/>
- <pt x="424" y="1262" on="1"/>
- <pt x="308" y="1074" on="0"/>
- <pt x="308" y="748" on="1"/>
- <pt x="308" y="442" on="0"/>
- <pt x="403" y="256" on="1"/>
- <pt x="518" y="31" on="0"/>
- <pt x="740" y="31" on="1"/>
- <pt x="941" y="31" on="0"/>
- <pt x="1056" y="220" on="1"/>
- <pt x="1170" y="409" on="0"/>
- <pt x="1170" y="740" on="1"/>
- <pt x="1170" y="1073" on="0"/>
- <pt x="1056" y="1261" on="1"/>
- <pt x="940" y="1450" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 32 17 6 24 17 14 48 84 14 0 6 2 1 1 22 0 2 2 0 0 1 4 1
- 0 3 13 2 0 14 0 0 36 34 18 28 34 10 48 196 22 18 10 4 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="R" xMin="31" yMin="0" xMax="1354" yMax="1492">
- <contour>
- <pt x="387" y="1480" on="1"/>
- <pt x="485" y="1482" on="1"/>
- <pt x="567" y="1485" on="1"/>
- <pt x="647" y="1487" on="1"/>
- <pt x="827" y="1492" on="0"/>
- <pt x="948" y="1423" on="1"/>
- <pt x="1106" y="1332" on="0"/>
- <pt x="1106" y="1112" on="1"/>
- <pt x="1106" y="924" on="0"/>
- <pt x="993" y="811" on="1"/>
- <pt x="926" y="745" on="0"/>
- <pt x="800" y="697" on="1"/>
- <pt x="1090" y="261" on="1"/>
- <pt x="1183" y="132" on="1"/>
- <pt x="1226" y="71" on="0"/>
- <pt x="1291" y="66" on="1"/>
- <pt x="1333" y="63" on="1"/>
- <pt x="1354" y="62" on="1"/>
- <pt x="1354" y="0" on="1"/>
- <pt x="1001" y="0" on="1"/>
- <pt x="597" y="651" on="1"/>
- <pt x="426" y="651" on="1"/>
- <pt x="426" y="259" on="1"/>
- <pt x="431" y="160" on="1"/>
- <pt x="433" y="90" on="0"/>
- <pt x="459" y="79" on="1"/>
- <pt x="485" y="69" on="0"/>
- <pt x="568" y="63" on="1"/>
- <pt x="586" y="62" on="1"/>
- <pt x="586" y="0" on="1"/>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="117" y="68" on="1"/>
- <pt x="193" y="74" on="0"/>
- <pt x="203" y="115" on="1"/>
- <pt x="216" y="177" on="0"/>
- <pt x="216" y="259" on="1"/>
- <pt x="216" y="1221" on="1"/>
- <pt x="216" y="1280" on="0"/>
- <pt x="209" y="1333" on="1"/>
- <pt x="203" y="1372" on="0"/>
- <pt x="195" y="1384" on="1"/>
- <pt x="177" y="1410" on="0"/>
- <pt x="117" y="1413" on="1"/>
- <pt x="50" y="1417" on="1"/>
- <pt x="31" y="1419" on="1"/>
- <pt x="31" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="426" y="719" on="1"/>
- <pt x="500" y="719" on="1"/>
- <pt x="890" y="719" on="0"/>
- <pt x="890" y="1094" on="1"/>
- <pt x="890" y="1266" on="0"/>
- <pt x="817" y="1340" on="1"/>
- <pt x="744" y="1413" on="0"/>
- <pt x="568" y="1413" on="1"/>
- <pt x="426" y="1413" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 38 47 37 30 49 48 11 3 55 20 3 28 22 17 12 4 20 18 3 56 55 1 21 20 1
- 30 29 19 18 3 3 0 47 0 0 14 0 0 51 10 7 48 196 47 38 30 37 0 21 37
- 2 55 49 29 28 20 19 18 17 12 11 10 13 7 21 0 0 56 48 22 21 32 3 37 1
- 4 48 196 38 37 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Racute" xMin="31" yMin="0" xMax="1354" yMax="1925">
- <contour>
- <pt x="387" y="1480" on="1"/>
- <pt x="485" y="1482" on="1"/>
- <pt x="567" y="1485" on="1"/>
- <pt x="647" y="1487" on="1"/>
- <pt x="827" y="1492" on="0"/>
- <pt x="948" y="1423" on="1"/>
- <pt x="1106" y="1332" on="0"/>
- <pt x="1106" y="1112" on="1"/>
- <pt x="1106" y="924" on="0"/>
- <pt x="993" y="811" on="1"/>
- <pt x="926" y="745" on="0"/>
- <pt x="800" y="697" on="1"/>
- <pt x="1090" y="261" on="1"/>
- <pt x="1183" y="132" on="1"/>
- <pt x="1226" y="71" on="0"/>
- <pt x="1291" y="66" on="1"/>
- <pt x="1333" y="63" on="1"/>
- <pt x="1354" y="62" on="1"/>
- <pt x="1354" y="0" on="1"/>
- <pt x="1001" y="0" on="1"/>
- <pt x="597" y="651" on="1"/>
- <pt x="426" y="651" on="1"/>
- <pt x="426" y="259" on="1"/>
- <pt x="431" y="160" on="1"/>
- <pt x="433" y="90" on="0"/>
- <pt x="459" y="79" on="1"/>
- <pt x="485" y="69" on="0"/>
- <pt x="568" y="63" on="1"/>
- <pt x="586" y="62" on="1"/>
- <pt x="586" y="0" on="1"/>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="117" y="68" on="1"/>
- <pt x="193" y="74" on="0"/>
- <pt x="203" y="115" on="1"/>
- <pt x="216" y="177" on="0"/>
- <pt x="216" y="259" on="1"/>
- <pt x="216" y="1221" on="1"/>
- <pt x="216" y="1280" on="0"/>
- <pt x="209" y="1333" on="1"/>
- <pt x="203" y="1372" on="0"/>
- <pt x="195" y="1384" on="1"/>
- <pt x="177" y="1410" on="0"/>
- <pt x="117" y="1413" on="1"/>
- <pt x="50" y="1417" on="1"/>
- <pt x="31" y="1419" on="1"/>
- <pt x="31" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="426" y="719" on="1"/>
- <pt x="500" y="719" on="1"/>
- <pt x="890" y="719" on="0"/>
- <pt x="890" y="1094" on="1"/>
- <pt x="890" y="1266" on="0"/>
- <pt x="817" y="1340" on="1"/>
- <pt x="744" y="1413" on="0"/>
- <pt x="568" y="1413" on="1"/>
- <pt x="426" y="1413" on="1"/>
- </contour>
- <contour>
- <pt x="463" y="1604" on="1"/>
- <pt x="704" y="1925" on="1"/>
- <pt x="963" y="1925" on="1"/>
- <pt x="556" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 38 47 37 30 60 57 2 58 0 3 49 48 11 3 55 20 3 28 22 17 12 4 20 18 3
- 59 58 1 56 55 1 21 20 1 30 29 19 18 3 4 0 47 0 0 14 0 0 51 10 7
- 48 196 47 38 30 37 0 21 37 2 60 59 58 57 55 49 29 28 20 19 18 17 12 11 14
- 13 7 21 0 0 56 48 22 21 32 3 37 1 4 48 196 38 37 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcaron" xMin="31" yMin="0" xMax="1354" yMax="1925">
- <contour>
- <pt x="387" y="1480" on="1"/>
- <pt x="485" y="1482" on="1"/>
- <pt x="567" y="1485" on="1"/>
- <pt x="647" y="1487" on="1"/>
- <pt x="827" y="1492" on="0"/>
- <pt x="948" y="1423" on="1"/>
- <pt x="1106" y="1332" on="0"/>
- <pt x="1106" y="1112" on="1"/>
- <pt x="1106" y="924" on="0"/>
- <pt x="993" y="811" on="1"/>
- <pt x="926" y="745" on="0"/>
- <pt x="800" y="697" on="1"/>
- <pt x="1090" y="261" on="1"/>
- <pt x="1183" y="132" on="1"/>
- <pt x="1226" y="71" on="0"/>
- <pt x="1291" y="66" on="1"/>
- <pt x="1333" y="63" on="1"/>
- <pt x="1354" y="62" on="1"/>
- <pt x="1354" y="0" on="1"/>
- <pt x="1001" y="0" on="1"/>
- <pt x="597" y="651" on="1"/>
- <pt x="426" y="651" on="1"/>
- <pt x="426" y="259" on="1"/>
- <pt x="431" y="160" on="1"/>
- <pt x="433" y="90" on="0"/>
- <pt x="459" y="79" on="1"/>
- <pt x="485" y="69" on="0"/>
- <pt x="568" y="63" on="1"/>
- <pt x="586" y="62" on="1"/>
- <pt x="586" y="0" on="1"/>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="117" y="68" on="1"/>
- <pt x="193" y="74" on="0"/>
- <pt x="203" y="115" on="1"/>
- <pt x="216" y="177" on="0"/>
- <pt x="216" y="259" on="1"/>
- <pt x="216" y="1221" on="1"/>
- <pt x="216" y="1280" on="0"/>
- <pt x="209" y="1333" on="1"/>
- <pt x="203" y="1372" on="0"/>
- <pt x="195" y="1384" on="1"/>
- <pt x="177" y="1410" on="0"/>
- <pt x="117" y="1413" on="1"/>
- <pt x="50" y="1417" on="1"/>
- <pt x="31" y="1419" on="1"/>
- <pt x="31" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="426" y="719" on="1"/>
- <pt x="500" y="719" on="1"/>
- <pt x="890" y="719" on="0"/>
- <pt x="890" y="1094" on="1"/>
- <pt x="890" y="1266" on="0"/>
- <pt x="817" y="1340" on="1"/>
- <pt x="744" y="1413" on="0"/>
- <pt x="568" y="1413" on="1"/>
- <pt x="426" y="1413" on="1"/>
- </contour>
- <contour>
- <pt x="938" y="1925" on="1"/>
- <pt x="698" y="1604" on="1"/>
- <pt x="476" y="1604" on="1"/>
- <pt x="235" y="1925" on="1"/>
- <pt x="321" y="1925" on="1"/>
- <pt x="587" y="1703" on="1"/>
- <pt x="852" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 38 47 37 30 49 48 11 3 55 20 3 28 22 17 12 4 20 18 3 63 62 61 60 57 5
- 13 58 59 58 1 56 55 1 21 20 1 30 29 19 18 3 4 0 47 0 0 14 0 0 51
- 10 7 48 196 47 38 30 37 61 60 0 3 21 37 3 63 62 59 58 57 55 49 29 28 20
- 19 18 17 12 11 15 13 7 21 0 0 56 48 22 21 32 3 37 1 4 48 196 38 37 1
- 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcommaaccent" xMin="31" yMin="-432" xMax="1354" yMax="1491">
- <contour>
- <pt x="387" y="1480" on="1"/>
- <pt x="485" y="1482" on="1"/>
- <pt x="567" y="1485" on="1"/>
- <pt x="647" y="1487" on="1"/>
- <pt x="828" y="1491" on="0"/>
- <pt x="948" y="1423" on="1"/>
- <pt x="1106" y="1332" on="0"/>
- <pt x="1106" y="1112" on="1"/>
- <pt x="1106" y="924" on="0"/>
- <pt x="993" y="811" on="1"/>
- <pt x="926" y="745" on="0"/>
- <pt x="800" y="697" on="1"/>
- <pt x="1090" y="261" on="1"/>
- <pt x="1183" y="132" on="1"/>
- <pt x="1226" y="71" on="0"/>
- <pt x="1291" y="66" on="1"/>
- <pt x="1333" y="63" on="1"/>
- <pt x="1354" y="62" on="1"/>
- <pt x="1354" y="0" on="1"/>
- <pt x="1001" y="0" on="1"/>
- <pt x="597" y="651" on="1"/>
- <pt x="426" y="651" on="1"/>
- <pt x="426" y="259" on="1"/>
- <pt x="431" y="160" on="1"/>
- <pt x="433" y="90" on="0"/>
- <pt x="459" y="79" on="1"/>
- <pt x="485" y="69" on="0"/>
- <pt x="568" y="63" on="1"/>
- <pt x="586" y="62" on="1"/>
- <pt x="586" y="0" on="1"/>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="117" y="68" on="1"/>
- <pt x="193" y="74" on="0"/>
- <pt x="203" y="115" on="1"/>
- <pt x="216" y="177" on="0"/>
- <pt x="216" y="259" on="1"/>
- <pt x="216" y="1221" on="1"/>
- <pt x="216" y="1280" on="0"/>
- <pt x="209" y="1333" on="1"/>
- <pt x="203" y="1372" on="0"/>
- <pt x="195" y="1384" on="1"/>
- <pt x="177" y="1410" on="0"/>
- <pt x="117" y="1413" on="1"/>
- <pt x="50" y="1417" on="1"/>
- <pt x="31" y="1419" on="1"/>
- <pt x="31" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="426" y="719" on="1"/>
- <pt x="500" y="719" on="1"/>
- <pt x="890" y="719" on="0"/>
- <pt x="890" y="1094" on="1"/>
- <pt x="890" y="1266" on="0"/>
- <pt x="817" y="1340" on="1"/>
- <pt x="744" y="1413" on="0"/>
- <pt x="568" y="1413" on="1"/>
- <pt x="426" y="1413" on="1"/>
- </contour>
- <contour>
- <pt x="574" y="-421" on="1"/>
- <pt x="574" y="-349" on="1"/>
- <pt x="623" y="-359" on="0"/>
- <pt x="678" y="-359" on="1"/>
- <pt x="781" y="-359" on="0"/>
- <pt x="781" y="-279" on="1"/>
- <pt x="781" y="-190" on="0"/>
- <pt x="623" y="-175" on="1"/>
- <pt x="623" y="-111" on="1"/>
- <pt x="757" y="-114" on="0"/>
- <pt x="823" y="-143" on="1"/>
- <pt x="916" y="-185" on="0"/>
- <pt x="916" y="-280" on="1"/>
- <pt x="916" y="-432" on="0"/>
- <pt x="699" y="-432" on="1"/>
- <pt x="640" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 0 0 60 17 71 48 84 38 47 37 30 49 48 11 3 55 20 3 28 22 17 12 4 20 18
- 3 65 64 58 57 4 13 71 18 56 55 1 21 20 1 30 29 19 18 3 3 0 47 0 0
- 14 0 0 62 48 69 51 10 7 48 196 47 38 30 37 0 21 37 2 65 64 58 57 55 49
- 29 28 20 19 18 17 12 11 14 13 69 7 21 0 0 56 48 22 21 32 3 37 1 4 48
- 196 38 37 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="S" xMin="119" yMin="-37" xMax="1045" yMax="1517">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1298" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 35 17 23 10 21 50 48 84 50 2 23 0 1 1 31 30 27 26 25 6 5 2 1
- 0 10 0 2 3 0 0 14 0 0 37 5 19 12 10 46 48 196 19 31 30 27 19 6 5
- 2 7 25 0 3 46 25 26 25 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Sacute" xMin="119" yMin="-37" xMax="1045" yMax="1925">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1298" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="482" y="1604" on="1"/>
- <pt x="723" y="1925" on="1"/>
- <pt x="982" y="1925" on="1"/>
- <pt x="575" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 35 17 23 10 21 50 48 84 50 2 23 0 1 55 52 2 53 0 3 0 1 1 31
- 30 27 26 25 6 5 2 1 0 10 0 2 3 0 0 54 53 1 0 14 0 0 37 5 19
- 12 10 46 48 196 19 55 53 52 31 30 27 19 6 5 2 10 25 0 3 54 46 25 26 25
- 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scaron" xMin="119" yMin="-37" xMax="1045" yMax="1925">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1298" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="926" y="1925" on="1"/>
- <pt x="686" y="1604" on="1"/>
- <pt x="464" y="1604" on="1"/>
- <pt x="223" y="1925" on="1"/>
- <pt x="309" y="1925" on="1"/>
- <pt x="575" y="1703" on="1"/>
- <pt x="840" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 35 17 23 10 21 50 48 84 50 2 23 0 1 1 31 30 27 26 25 6 5 2 1
- 0 10 0 2 3 0 0 58 57 56 55 52 5 13 53 54 53 1 0 14 0 0 37 5 19
- 12 10 46 48 196 19 58 57 56 55 54 53 52 31 30 27 19 6 5 2 14 25 0 3 46
- 25 26 25 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scedilla" xMin="119" yMin="-432" xMax="1045" yMax="1517">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1299" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="402" y="-411" on="1"/>
- <pt x="402" y="-343" on="1"/>
- <pt x="464" y="-359" on="0"/>
- <pt x="503" y="-359" on="1"/>
- <pt x="610" y="-359" on="0"/>
- <pt x="610" y="-277" on="1"/>
- <pt x="610" y="-179" on="0"/>
- <pt x="423" y="-175" on="1"/>
- <pt x="518" y="0" on="1"/>
- <pt x="597" y="0" on="1"/>
- <pt x="531" y="-119" on="1"/>
- <pt x="748" y="-138" on="0"/>
- <pt x="748" y="-266" on="1"/>
- <pt x="748" y="-336" on="0"/>
- <pt x="690" y="-384" on="1"/>
- <pt x="633" y="-432" on="0"/>
- <pt x="546" y="-432" on="1"/>
- <pt x="478" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 0 0 55 17 68 35 17 23 10 21 50 48 84 50 2 23 0 1 1 31 30 27 26 25 6
- 5 2 1 0 10 0 2 3 0 0 1 62 61 60 59 53 52 6 13 68 2 0 14 0 0
- 57 48 64 37 5 19 12 10 46 48 196 64 19 64 62 61 60 59 53 52 31 30 27 19 6
- 5 2 14 25 0 3 46 25 26 25 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scircumflex" xMin="119" yMin="-37" xMax="1045" yMax="1925">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1298" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="223" y="1604" on="1"/>
- <pt x="464" y="1925" on="1"/>
- <pt x="686" y="1925" on="1"/>
- <pt x="926" y="1604" on="1"/>
- <pt x="840" y="1604" on="1"/>
- <pt x="575" y="1826" on="1"/>
- <pt x="309" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 35 17 23 10 21 50 48 84 50 2 23 0 1 58 57 56 55 52 5 53 0 3 0
- 1 1 31 30 27 26 25 6 5 2 1 0 10 0 2 3 0 0 54 53 1 0 14 0 0
- 37 5 19 12 10 46 48 196 19 58 57 56 55 54 53 52 31 30 27 19 6 5 2 14 25
- 0 3 46 25 26 25 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scommaaccent" xMin="119" yMin="-432" xMax="1045" yMax="1517">
- <contour>
- <pt x="119" y="30" on="1"/>
- <pt x="119" y="315" on="1"/>
- <pt x="224" y="315" on="1"/>
- <pt x="225" y="297" on="1"/>
- <pt x="227" y="257" on="0"/>
- <pt x="228" y="228" on="1"/>
- <pt x="228" y="222" on="1"/>
- <pt x="228" y="147" on="0"/>
- <pt x="297" y="99" on="1"/>
- <pt x="386" y="37" on="0"/>
- <pt x="542" y="37" on="1"/>
- <pt x="835" y="37" on="0"/>
- <pt x="835" y="319" on="1"/>
- <pt x="835" y="437" on="0"/>
- <pt x="790" y="498" on="1"/>
- <pt x="746" y="558" on="0"/>
- <pt x="602" y="636" on="1"/>
- <pt x="470" y="707" on="1"/>
- <pt x="130" y="890" on="0"/>
- <pt x="130" y="1129" on="1"/>
- <pt x="130" y="1299" on="0"/>
- <pt x="255" y="1408" on="1"/>
- <pt x="379" y="1517" on="0"/>
- <pt x="581" y="1517" on="1"/>
- <pt x="741" y="1517" on="0"/>
- <pt x="962" y="1454" on="1"/>
- <pt x="962" y="1191" on="1"/>
- <pt x="851" y="1191" on="1"/>
- <pt x="850" y="1208" on="1"/>
- <pt x="847" y="1248" on="0"/>
- <pt x="846" y="1281" on="1"/>
- <pt x="846" y="1287" on="1"/>
- <pt x="846" y="1364" on="0"/>
- <pt x="797" y="1403" on="1"/>
- <pt x="739" y="1450" on="0"/>
- <pt x="596" y="1450" on="1"/>
- <pt x="332" y="1450" on="0"/>
- <pt x="332" y="1196" on="1"/>
- <pt x="332" y="1093" on="0"/>
- <pt x="376" y="1033" on="1"/>
- <pt x="419" y="973" on="0"/>
- <pt x="544" y="906" on="1"/>
- <pt x="676" y="835" on="1"/>
- <pt x="891" y="719" on="0"/>
- <pt x="968" y="626" on="1"/>
- <pt x="1045" y="534" on="0"/>
- <pt x="1045" y="392" on="1"/>
- <pt x="1045" y="206" on="0"/>
- <pt x="906" y="84" on="1"/>
- <pt x="768" y="-37" on="0"/>
- <pt x="536" y="-37" on="1"/>
- <pt x="304" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="442" y="-421" on="1"/>
- <pt x="442" y="-349" on="1"/>
- <pt x="491" y="-359" on="0"/>
- <pt x="546" y="-359" on="1"/>
- <pt x="649" y="-359" on="0"/>
- <pt x="649" y="-279" on="1"/>
- <pt x="649" y="-190" on="0"/>
- <pt x="491" y="-175" on="1"/>
- <pt x="491" y="-111" on="1"/>
- <pt x="625" y="-114" on="0"/>
- <pt x="691" y="-143" on="1"/>
- <pt x="784" y="-185" on="0"/>
- <pt x="784" y="-280" on="1"/>
- <pt x="784" y="-432" on="0"/>
- <pt x="567" y="-432" on="1"/>
- <pt x="507" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 55 17 66 35 17 23 10 21 50 48 84 50 2 23 0 1 1 31 30 27 26 25 6
- 5 2 1 0 10 0 2 3 0 0 1 60 59 53 52 4 13 66 2 0 14 0 0 57 48
- 64 37 5 19 12 10 46 48 196 64 19 64 60 59 53 52 31 30 27 19 6 5 2 12 25
- 0 3 46 25 26 25 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="T" xMin="31" yMin="0" xMax="1221" yMax="1480">
- <contour>
- <pt x="521" y="1400" on="1"/>
- <pt x="325" y="1400" on="1"/>
- <pt x="222" y="1395" on="1"/>
- <pt x="158" y="1394" on="0"/>
- <pt x="148" y="1371" on="1"/>
- <pt x="140" y="1352" on="0"/>
- <pt x="140" y="1301" on="1"/>
- <pt x="140" y="1287" on="1"/>
- <pt x="139" y="1270" on="1"/>
- <pt x="139" y="1236" on="0"/>
- <pt x="138" y="1230" on="1"/>
- <pt x="136" y="1209" on="1"/>
- <pt x="31" y="1209" on="1"/>
- <pt x="31" y="1480" on="1"/>
- <pt x="1221" y="1480" on="1"/>
- <pt x="1221" y="1209" on="1"/>
- <pt x="1116" y="1209" on="1"/>
- <pt x="1115" y="1230" on="1"/>
- <pt x="1114" y="1253" on="0"/>
- <pt x="1113" y="1287" on="1"/>
- <pt x="1113" y="1303" on="1"/>
- <pt x="1114" y="1366" on="0"/>
- <pt x="1098" y="1381" on="1"/>
- <pt x="1083" y="1395" on="0"/>
- <pt x="1031" y="1395" on="1"/>
- <pt x="928" y="1400" on="1"/>
- <pt x="731" y="1400" on="1"/>
- <pt x="731" y="259" on="1"/>
- <pt x="731" y="203" on="0"/>
- <pt x="739" y="147" on="1"/>
- <pt x="746" y="96" on="0"/>
- <pt x="771" y="82" on="1"/>
- <pt x="792" y="71" on="0"/>
- <pt x="830" y="68" on="1"/>
- <pt x="898" y="63" on="1"/>
- <pt x="941" y="62" on="1"/>
- <pt x="941" y="0" on="1"/>
- <pt x="312" y="0" on="1"/>
- <pt x="312" y="62" on="1"/>
- <pt x="355" y="63" on="1"/>
- <pt x="423" y="68" on="1"/>
- <pt x="498" y="74" on="0"/>
- <pt x="508" y="115" on="1"/>
- <pt x="521" y="177" on="0"/>
- <pt x="521" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 44 37 27 36 24 20 19 16 15 12 11 7 6 9 0 36 3 0 0 26 25 1 0 21 3
- 13 1 4 48 84 37 36 1 0 14 13 0 14 37 44 36 27 25 24 20 19 16 5 14 26
- 3 11 7 6 1 4 0 12 3 0 0 27 26 32 1 0 1 4 48 196 15 14 1 44 0
- 1 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tbar" xMin="31" yMin="0" xMax="1221" yMax="1480">
- <contour>
- <pt x="521" y="715" on="1"/>
- <pt x="218" y="715" on="1"/>
- <pt x="218" y="789" on="1"/>
- <pt x="521" y="789" on="1"/>
- <pt x="521" y="1400" on="1"/>
- <pt x="325" y="1400" on="1"/>
- <pt x="222" y="1395" on="1"/>
- <pt x="158" y="1394" on="0"/>
- <pt x="148" y="1371" on="1"/>
- <pt x="140" y="1352" on="0"/>
- <pt x="140" y="1301" on="1"/>
- <pt x="140" y="1287" on="1"/>
- <pt x="139" y="1270" on="1"/>
- <pt x="139" y="1236" on="0"/>
- <pt x="138" y="1230" on="1"/>
- <pt x="136" y="1209" on="1"/>
- <pt x="31" y="1209" on="1"/>
- <pt x="31" y="1480" on="1"/>
- <pt x="1221" y="1480" on="1"/>
- <pt x="1221" y="1209" on="1"/>
- <pt x="1116" y="1209" on="1"/>
- <pt x="1115" y="1230" on="1"/>
- <pt x="1114" y="1253" on="0"/>
- <pt x="1113" y="1287" on="1"/>
- <pt x="1113" y="1303" on="1"/>
- <pt x="1114" y="1366" on="0"/>
- <pt x="1098" y="1381" on="1"/>
- <pt x="1083" y="1395" on="0"/>
- <pt x="1031" y="1395" on="1"/>
- <pt x="928" y="1400" on="1"/>
- <pt x="731" y="1400" on="1"/>
- <pt x="731" y="789" on="1"/>
- <pt x="1034" y="789" on="1"/>
- <pt x="1034" y="715" on="1"/>
- <pt x="731" y="715" on="1"/>
- <pt x="731" y="259" on="1"/>
- <pt x="731" y="203" on="0"/>
- <pt x="739" y="147" on="1"/>
- <pt x="746" y="96" on="0"/>
- <pt x="771" y="82" on="1"/>
- <pt x="792" y="71" on="0"/>
- <pt x="830" y="68" on="1"/>
- <pt x="898" y="63" on="1"/>
- <pt x="941" y="62" on="1"/>
- <pt x="941" y="0" on="1"/>
- <pt x="312" y="0" on="1"/>
- <pt x="312" y="62" on="1"/>
- <pt x="355" y="63" on="1"/>
- <pt x="423" y="68" on="1"/>
- <pt x="498" y="74" on="0"/>
- <pt x="508" y="115" on="1"/>
- <pt x="521" y="177" on="0"/>
- <pt x="521" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 102 values pushed */
- 52 45 35 44 28 24 23 20 19 16 15 11 10 9 4 2 3 0 0 30 29 5 4 21 3
- 17 34 33 1 0 21 3 2 2 4 48 84 32 31 3 2 3 45 44 1 2 0 18 17 0
- 14 45 52 44 35 33 32 29 28 24 23 20 7 18 30 3 15 11 10 5 2 1 6 0 16
- 3 0 0 35 34 31 30 32 3 0 1 4 48 196 19 18 1 52 4 3 0 3 17 16 1
- 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcaron" xMin="31" yMin="0" xMax="1221" yMax="1925">
- <contour>
- <pt x="521" y="1400" on="1"/>
- <pt x="325" y="1400" on="1"/>
- <pt x="222" y="1395" on="1"/>
- <pt x="158" y="1394" on="0"/>
- <pt x="148" y="1371" on="1"/>
- <pt x="140" y="1352" on="0"/>
- <pt x="140" y="1301" on="1"/>
- <pt x="140" y="1287" on="1"/>
- <pt x="139" y="1270" on="1"/>
- <pt x="139" y="1236" on="0"/>
- <pt x="138" y="1230" on="1"/>
- <pt x="136" y="1209" on="1"/>
- <pt x="31" y="1209" on="1"/>
- <pt x="31" y="1480" on="1"/>
- <pt x="1221" y="1480" on="1"/>
- <pt x="1221" y="1209" on="1"/>
- <pt x="1116" y="1209" on="1"/>
- <pt x="1115" y="1230" on="1"/>
- <pt x="1114" y="1253" on="0"/>
- <pt x="1113" y="1287" on="1"/>
- <pt x="1113" y="1303" on="1"/>
- <pt x="1114" y="1366" on="0"/>
- <pt x="1098" y="1381" on="1"/>
- <pt x="1083" y="1395" on="0"/>
- <pt x="1031" y="1395" on="1"/>
- <pt x="928" y="1400" on="1"/>
- <pt x="731" y="1400" on="1"/>
- <pt x="731" y="259" on="1"/>
- <pt x="731" y="203" on="0"/>
- <pt x="739" y="147" on="1"/>
- <pt x="746" y="96" on="0"/>
- <pt x="771" y="82" on="1"/>
- <pt x="792" y="71" on="0"/>
- <pt x="830" y="68" on="1"/>
- <pt x="898" y="63" on="1"/>
- <pt x="941" y="62" on="1"/>
- <pt x="941" y="0" on="1"/>
- <pt x="312" y="0" on="1"/>
- <pt x="312" y="62" on="1"/>
- <pt x="355" y="63" on="1"/>
- <pt x="423" y="68" on="1"/>
- <pt x="498" y="74" on="0"/>
- <pt x="508" y="115" on="1"/>
- <pt x="521" y="177" on="0"/>
- <pt x="521" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="978" y="1925" on="1"/>
- <pt x="738" y="1604" on="1"/>
- <pt x="516" y="1604" on="1"/>
- <pt x="275" y="1925" on="1"/>
- <pt x="361" y="1925" on="1"/>
- <pt x="627" y="1703" on="1"/>
- <pt x="892" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 44 37 27 36 24 20 19 16 15 12 11 7 6 9 0 36 3 51 50 49 48 45 5 13 46
- 0 0 26 25 1 0 21 3 13 1 4 48 84 47 46 1 37 36 1 2 0 14 13 0 14
- 37 44 36 27 51 46 45 25 24 20 19 16 8 14 26 3 50 26 0 2 49 48 47 11 7
- 6 1 7 0 12 3 0 0 27 26 32 1 0 1 4 48 196 15 14 1 44 0 1 13 12
- 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommaaccent" xMin="31" yMin="-432" xMax="1221" yMax="1480">
- <contour>
- <pt x="521" y="1400" on="1"/>
- <pt x="325" y="1400" on="1"/>
- <pt x="222" y="1395" on="1"/>
- <pt x="158" y="1394" on="0"/>
- <pt x="148" y="1371" on="1"/>
- <pt x="140" y="1352" on="0"/>
- <pt x="140" y="1301" on="1"/>
- <pt x="140" y="1287" on="1"/>
- <pt x="139" y="1270" on="1"/>
- <pt x="139" y="1236" on="0"/>
- <pt x="138" y="1230" on="1"/>
- <pt x="136" y="1209" on="1"/>
- <pt x="31" y="1209" on="1"/>
- <pt x="31" y="1480" on="1"/>
- <pt x="1221" y="1480" on="1"/>
- <pt x="1221" y="1209" on="1"/>
- <pt x="1116" y="1209" on="1"/>
- <pt x="1115" y="1230" on="1"/>
- <pt x="1114" y="1253" on="0"/>
- <pt x="1113" y="1287" on="1"/>
- <pt x="1113" y="1303" on="1"/>
- <pt x="1114" y="1366" on="0"/>
- <pt x="1098" y="1381" on="1"/>
- <pt x="1083" y="1395" on="0"/>
- <pt x="1031" y="1395" on="1"/>
- <pt x="928" y="1400" on="1"/>
- <pt x="731" y="1400" on="1"/>
- <pt x="731" y="259" on="1"/>
- <pt x="731" y="203" on="0"/>
- <pt x="739" y="147" on="1"/>
- <pt x="744" y="109" on="0"/>
- <pt x="753" y="97" on="1"/>
- <pt x="772" y="72" on="0"/>
- <pt x="830" y="68" on="1"/>
- <pt x="898" y="63" on="1"/>
- <pt x="941" y="62" on="1"/>
- <pt x="941" y="0" on="1"/>
- <pt x="312" y="0" on="1"/>
- <pt x="312" y="62" on="1"/>
- <pt x="355" y="63" on="1"/>
- <pt x="423" y="68" on="1"/>
- <pt x="498" y="74" on="0"/>
- <pt x="508" y="115" on="1"/>
- <pt x="521" y="177" on="0"/>
- <pt x="521" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="484" y="-411" on="1"/>
- <pt x="484" y="-343" on="1"/>
- <pt x="546" y="-359" on="0"/>
- <pt x="585" y="-359" on="1"/>
- <pt x="692" y="-359" on="0"/>
- <pt x="692" y="-277" on="1"/>
- <pt x="692" y="-179" on="0"/>
- <pt x="505" y="-175" on="1"/>
- <pt x="600" y="0" on="1"/>
- <pt x="679" y="0" on="1"/>
- <pt x="613" y="-119" on="1"/>
- <pt x="830" y="-138" on="0"/>
- <pt x="830" y="-266" on="1"/>
- <pt x="830" y="-336" on="0"/>
- <pt x="772" y="-384" on="1"/>
- <pt x="715" y="-432" on="0"/>
- <pt x="628" y="-432" on="1"/>
- <pt x="560" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 117 values pushed */
- 0 0 48 17 61 48 84 44 37 27 36 24 20 19 16 15 12 11 7 6 9 0 36 3 55
- 52 46 45 4 13 61 36 0 0 26 25 1 0 21 3 13 1 4 48 84 54 53 37 36 3
- 0 14 13 0 14 0 0 50 48 57 48 196 37 44 36 27 57 57 25 24 20 19 16 6 14
- 26 3 55 54 53 3 26 0 3 52 46 45 11 7 6 1 7 0 12 3 0 0 27 26 32
- 1 0 1 4 48 196 15 14 1 44 0 1 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommabelow" xMin="31" yMin="-432" xMax="1221" yMax="1480">
- <contour>
- <pt x="521" y="1400" on="1"/>
- <pt x="325" y="1400" on="1"/>
- <pt x="222" y="1395" on="1"/>
- <pt x="158" y="1394" on="0"/>
- <pt x="148" y="1371" on="1"/>
- <pt x="140" y="1352" on="0"/>
- <pt x="140" y="1301" on="1"/>
- <pt x="140" y="1287" on="1"/>
- <pt x="139" y="1270" on="1"/>
- <pt x="139" y="1236" on="0"/>
- <pt x="138" y="1230" on="1"/>
- <pt x="136" y="1209" on="1"/>
- <pt x="31" y="1209" on="1"/>
- <pt x="31" y="1480" on="1"/>
- <pt x="1221" y="1480" on="1"/>
- <pt x="1221" y="1209" on="1"/>
- <pt x="1116" y="1209" on="1"/>
- <pt x="1115" y="1230" on="1"/>
- <pt x="1114" y="1253" on="0"/>
- <pt x="1113" y="1287" on="1"/>
- <pt x="1113" y="1303" on="1"/>
- <pt x="1114" y="1366" on="0"/>
- <pt x="1098" y="1381" on="1"/>
- <pt x="1083" y="1395" on="0"/>
- <pt x="1031" y="1395" on="1"/>
- <pt x="928" y="1400" on="1"/>
- <pt x="731" y="1400" on="1"/>
- <pt x="731" y="259" on="1"/>
- <pt x="731" y="203" on="0"/>
- <pt x="739" y="147" on="1"/>
- <pt x="744" y="109" on="0"/>
- <pt x="753" y="97" on="1"/>
- <pt x="772" y="72" on="0"/>
- <pt x="830" y="68" on="1"/>
- <pt x="898" y="63" on="1"/>
- <pt x="941" y="62" on="1"/>
- <pt x="941" y="0" on="1"/>
- <pt x="312" y="0" on="1"/>
- <pt x="312" y="62" on="1"/>
- <pt x="355" y="63" on="1"/>
- <pt x="423" y="68" on="1"/>
- <pt x="498" y="74" on="0"/>
- <pt x="508" y="115" on="1"/>
- <pt x="521" y="177" on="0"/>
- <pt x="521" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="472" y="-421" on="1"/>
- <pt x="472" y="-349" on="1"/>
- <pt x="521" y="-359" on="0"/>
- <pt x="576" y="-359" on="1"/>
- <pt x="679" y="-359" on="0"/>
- <pt x="679" y="-279" on="1"/>
- <pt x="679" y="-190" on="0"/>
- <pt x="521" y="-175" on="1"/>
- <pt x="521" y="-111" on="1"/>
- <pt x="655" y="-114" on="0"/>
- <pt x="721" y="-143" on="1"/>
- <pt x="814" y="-185" on="0"/>
- <pt x="814" y="-280" on="1"/>
- <pt x="814" y="-432" on="0"/>
- <pt x="597" y="-432" on="1"/>
- <pt x="538" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 48 38 59 48 84 44 37 27 36 24 20 19 16 15 12 11 7 6 9 0 36 3 53
- 52 46 45 4 13 59 36 0 0 26 25 1 0 42 3 13 1 4 48 84 37 36 1 0 14
- 13 0 14 0 0 50 23 57 48 196 37 44 36 27 57 57 25 24 20 19 16 6 14 26 3
- 46 45 11 7 6 1 6 0 12 3 0 0 27 26 37 1 0 1 4 48 196 15 14 1 53
- 52 44 0 3 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Thorn" xMin="43" yMin="0" xMax="1077" yMax="1480">
- <contour>
- <pt x="438" y="1178" on="1"/>
- <pt x="543" y="1179" on="1"/>
- <pt x="800" y="1181" on="0"/>
- <pt x="930" y="1104" on="1"/>
- <pt x="1077" y="1016" on="0"/>
- <pt x="1077" y="791" on="1"/>
- <pt x="1077" y="315" on="0"/>
- <pt x="443" y="315" on="1"/>
- <pt x="438" y="315" on="1"/>
- <pt x="438" y="259" on="1"/>
- <pt x="438" y="200" on="0"/>
- <pt x="445" y="147" on="1"/>
- <pt x="451" y="109" on="0"/>
- <pt x="459" y="97" on="1"/>
- <pt x="478" y="72" on="0"/>
- <pt x="536" y="68" on="1"/>
- <pt x="604" y="63" on="1"/>
- <pt x="623" y="62" on="1"/>
- <pt x="623" y="0" on="1"/>
- <pt x="43" y="0" on="1"/>
- <pt x="43" y="62" on="1"/>
- <pt x="62" y="63" on="1"/>
- <pt x="129" y="68" on="1"/>
- <pt x="205" y="74" on="0"/>
- <pt x="215" y="115" on="1"/>
- <pt x="228" y="177" on="0"/>
- <pt x="228" y="259" on="1"/>
- <pt x="228" y="1221" on="1"/>
- <pt x="228" y="1280" on="0"/>
- <pt x="221" y="1333" on="1"/>
- <pt x="215" y="1372" on="0"/>
- <pt x="207" y="1384" on="1"/>
- <pt x="189" y="1410" on="0"/>
- <pt x="129" y="1413" on="1"/>
- <pt x="62" y="1417" on="1"/>
- <pt x="43" y="1419" on="1"/>
- <pt x="43" y="1480" on="1"/>
- <pt x="623" y="1480" on="1"/>
- <pt x="623" y="1419" on="1"/>
- <pt x="604" y="1417" on="1"/>
- <pt x="536" y="1413" on="1"/>
- <pt x="461" y="1408" on="0"/>
- <pt x="451" y="1366" on="1"/>
- <pt x="438" y="1302" on="0"/>
- <pt x="438" y="1221" on="1"/>
- </contour>
- <contour>
- <pt x="438" y="382" on="1"/>
- <pt x="455" y="382" on="1"/>
- <pt x="647" y="382" on="0"/>
- <pt x="751" y="489" on="1"/>
- <pt x="855" y="596" on="0"/>
- <pt x="855" y="791" on="1"/>
- <pt x="855" y="959" on="0"/>
- <pt x="769" y="1035" on="1"/>
- <pt x="683" y="1110" on="0"/>
- <pt x="494" y="1110" on="1"/>
- <pt x="438" y="1110" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 44 37 27 36 26 19 9 18 55 54 46 45 8 7 0 7 36 18 3 19 18 1 0 37 36
- 0 14 0 0 50 33 5 48 196 37 44 36 27 19 26 18 9 54 46 7 3 13 5 0 0
- 0 55 45 44 9 8 0 32 5 26 1 4 48 196 27 26 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="U" xMin="19" yMin="-37" xMax="1456" yMax="1480">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21 9 8 1 6 0 2
- 3 0 56 30 29 0 0 3 14 56 47 30 37 29 22 1 0 2 21 8 3 0 0 22 21
- 9 1 37 9 8 32 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uacute" xMin="19" yMin="-37" xMax="1456" yMax="1925">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="650" y="1604" on="1"/>
- <pt x="891" y="1925" on="1"/>
- <pt x="1150" y="1925" on="1"/>
- <pt x="743" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 60 57 2 58 0 3 1 46 38 21
- 9 8 1 6 0 2 3 0 59 58 1 0 56 30 29 0 0 3 14 56 47 30 37 29 22
- 60 59 58 57 1 0 6 21 8 3 0 0 22 21 9 1 37 9 8 32 1 46 2 4 48
- 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ubreve" xMin="19" yMin="-37" xMax="1456" yMax="1925">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="442" y="1925" on="1"/>
- <pt x="507" y="1925" on="1"/>
- <pt x="534" y="1835" on="0"/>
- <pt x="594" y="1793" on="1"/>
- <pt x="662" y="1746" on="0"/>
- <pt x="775" y="1746" on="1"/>
- <pt x="901" y="1746" on="0"/>
- <pt x="971" y="1805" on="1"/>
- <pt x="1020" y="1845" on="0"/>
- <pt x="1044" y="1925" on="1"/>
- <pt x="1108" y="1925" on="1"/>
- <pt x="1089" y="1790" on="0"/>
- <pt x="1017" y="1709" on="1"/>
- <pt x="923" y="1604" on="0"/>
- <pt x="775" y="1604" on="1"/>
- <pt x="621" y="1604" on="0"/>
- <pt x="526" y="1719" on="1"/>
- <pt x="461" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 62 20 71 15 38 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21 9 8 1
- 6 0 2 3 0 67 66 58 57 4 13 71 0 56 30 29 0 0 3 14 56 47 30 37 29
- 22 67 66 58 57 1 0 6 21 8 3 0 0 22 21 41 1 37 9 8 37 1 46 2 4
- 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ucircumflex" xMin="19" yMin="-37" xMax="1456" yMax="1925">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="440" y="1604" on="1"/>
- <pt x="681" y="1925" on="1"/>
- <pt x="903" y="1925" on="1"/>
- <pt x="1143" y="1604" on="1"/>
- <pt x="1057" y="1604" on="1"/>
- <pt x="792" y="1826" on="1"/>
- <pt x="526" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 63 62 61 60 57 5 58 0 3 1
- 46 38 21 9 8 1 6 0 2 3 0 59 58 1 0 56 30 29 0 0 3 14 56 47 30
- 37 29 22 63 62 61 60 59 58 57 1 0 9 21 8 3 0 0 22 21 9 1 37 9 8
- 32 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Udieresis" xMin="19" yMin="-37" xMax="1456" yMax="1777">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="508" y="1604" on="1"/>
- <pt x="508" y="1777" on="1"/>
- <pt x="681" y="1777" on="1"/>
- <pt x="681" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="903" y="1604" on="1"/>
- <pt x="903" y="1777" on="1"/>
- <pt x="1076" y="1777" on="1"/>
- <pt x="1076" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 105 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21 9 8 1 6 0 2
- 3 0 0 0 64 61 60 57 13 3 58 1 4 48 84 63 62 59 58 3 0 56 30 29 0
- 0 3 14 56 47 30 37 29 22 1 0 2 59 57 3 0 0 62 61 13 1 63 60 59 13
- 1 57 22 21 9 1 37 9 8 32 1 46 4 4 48 196 64 63 1 58 57 1 38 37 1
- 47 46 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ugrave" xMin="19" yMin="-37" xMax="1456" yMax="1925">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="934" y="1604" on="1"/>
- <pt x="841" y="1604" on="1"/>
- <pt x="434" y="1925" on="1"/>
- <pt x="693" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 84 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 58 57 2 59 0 3 1 46 38 21
- 9 8 1 6 0 2 3 0 60 59 1 0 56 30 29 0 0 3 14 56 47 30 37 29 22
- 60 59 58 57 1 0 6 21 8 3 0 0 22 21 9 1 37 9 8 32 1 46 2 4 48
- 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uhungarumlaut" xMin="19" yMin="-37" xMax="1456" yMax="1925">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="565" y="1604" on="1"/>
- <pt x="779" y="1925" on="1"/>
- <pt x="948" y="1925" on="1"/>
- <pt x="627" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="874" y="1604" on="1"/>
- <pt x="1087" y="1925" on="1"/>
- <pt x="1256" y="1925" on="1"/>
- <pt x="935" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 64 61 60 57 4 58 0 3 1 46
- 38 21 9 8 1 6 0 2 3 0 63 62 59 58 3 0 56 30 29 0 0 3 14 56 47
- 30 37 29 22 63 37 21 2 64 62 61 60 59 58 57 1 0 9 21 8 3 0 0 22 21
- 9 1 37 9 8 32 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Umacron" xMin="19" yMin="-37" xMax="1456" yMax="1727">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="470" y="1604" on="1"/>
- <pt x="470" y="1727" on="1"/>
- <pt x="1112" y="1727" on="1"/>
- <pt x="1112" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 0 0 15 17 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21 9 8 1 6 0 2
- 3 0 0 0 60 57 12 1 58 1 4 48 84 59 58 1 0 56 30 29 0 0 3 14 56
- 47 30 37 29 22 60 59 58 57 1 0 6 21 8 3 0 0 22 21 9 1 37 9 8 32
- 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Unterkomma" xMin="170" yMin="-432" xMax="512" yMax="-111">
- <contour>
- <pt x="170" y="-421" on="1"/>
- <pt x="170" y="-349" on="1"/>
- <pt x="219" y="-359" on="0"/>
- <pt x="274" y="-359" on="1"/>
- <pt x="377" y="-359" on="0"/>
- <pt x="377" y="-279" on="1"/>
- <pt x="377" y="-190" on="0"/>
- <pt x="219" y="-175" on="1"/>
- <pt x="219" y="-111" on="1"/>
- <pt x="353" y="-114" on="0"/>
- <pt x="419" y="-143" on="1"/>
- <pt x="512" y="-185" on="0"/>
- <pt x="512" y="-280" on="1"/>
- <pt x="512" y="-432" on="0"/>
- <pt x="295" y="-432" on="1"/>
- <pt x="236" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 3 17 14 48 84 14 8 7 1 0 14 0 0 5 48 12 48 196 12 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uogonek" xMin="19" yMin="-370" xMax="1456" yMax="1480">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1365" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="395" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="1034" y="-273" on="1"/>
- <pt x="1034" y="-341" on="1"/>
- <pt x="963" y="-370" on="0"/>
- <pt x="885" y="-370" on="1"/>
- <pt x="665" y="-370" on="0"/>
- <pt x="665" y="-211" on="1"/>
- <pt x="665" y="-90" on="0"/>
- <pt x="823" y="0" on="1"/>
- <pt x="930" y="0" on="1"/>
- <pt x="801" y="-80" on="0"/>
- <pt x="801" y="-182" on="1"/>
- <pt x="801" y="-289" on="0"/>
- <pt x="934" y="-289" on="1"/>
- <pt x="985" y="-289" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 96 values pushed */
- 0 0 69 7 60 15 17 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21 9 8 1
- 6 0 2 3 0 1 65 64 58 57 4 13 60 2 0 56 30 29 0 0 3 14 0 0 67
- 48 62 48 196 56 47 30 37 29 22 62 65 64 62 58 57 1 0 7 21 8 3 0 0 22
- 21 9 1 37 9 8 32 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uring" xMin="19" yMin="-37" xMax="1456" yMax="2033">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="782" y="2033" on="1"/>
- <pt x="876" y="2033" on="0"/>
- <pt x="942" y="1967" on="1"/>
- <pt x="1009" y="1901" on="0"/>
- <pt x="1009" y="1807" on="1"/>
- <pt x="1009" y="1711" on="0"/>
- <pt x="942" y="1645" on="1"/>
- <pt x="875" y="1579" on="0"/>
- <pt x="780" y="1579" on="1"/>
- <pt x="696" y="1579" on="0"/>
- <pt x="635" y="1633" on="1"/>
- <pt x="555" y="1702" on="0"/>
- <pt x="555" y="1806" on="1"/>
- <pt x="555" y="1901" on="0"/>
- <pt x="621" y="1967" on="1"/>
- <pt x="687" y="2033" on="0"/>
- </contour>
- <contour>
- <pt x="782" y="1965" on="1"/>
- <pt x="716" y="1965" on="0"/>
- <pt x="670" y="1919" on="1"/>
- <pt x="623" y="1872" on="0"/>
- <pt x="623" y="1807" on="1"/>
- <pt x="623" y="1741" on="0"/>
- <pt x="669" y="1694" on="1"/>
- <pt x="715" y="1647" on="0"/>
- <pt x="780" y="1647" on="1"/>
- <pt x="841" y="1647" on="0"/>
- <pt x="885" y="1684" on="1"/>
- <pt x="941" y="1733" on="0"/>
- <pt x="941" y="1807" on="1"/>
- <pt x="941" y="1873" on="0"/>
- <pt x="894" y="1919" on="1"/>
- <pt x="847" y="1965" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 93 values pushed */
- 0 0 81 17 65 73 17 57 15 17 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21
- 9 8 1 6 0 2 3 0 65 57 0 56 30 29 0 0 3 14 0 0 85 17 61 77 17
- 69 48 196 56 47 30 37 29 22 69 61 69 61 1 0 4 21 8 3 0 0 22 21 9 1
- 37 9 8 32 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Utilde" xMin="19" yMin="-37" xMax="1456" yMax="1839">
- <contour>
- <pt x="602" y="1480" on="1"/>
- <pt x="602" y="1419" on="1"/>
- <pt x="584" y="1417" on="1"/>
- <pt x="516" y="1413" on="1"/>
- <pt x="448" y="1408" on="0"/>
- <pt x="437" y="1386" on="1"/>
- <pt x="426" y="1367" on="0"/>
- <pt x="423" y="1320" on="1"/>
- <pt x="417" y="1221" on="1"/>
- <pt x="417" y="588" on="1"/>
- <pt x="417" y="360" on="0"/>
- <pt x="429" y="290" on="1"/>
- <pt x="441" y="219" on="0"/>
- <pt x="490" y="156" on="1"/>
- <pt x="587" y="31" on="0"/>
- <pt x="779" y="31" on="1"/>
- <pt x="978" y="31" on="0"/>
- <pt x="1087" y="160" on="1"/>
- <pt x="1143" y="227" on="0"/>
- <pt x="1156" y="319" on="1"/>
- <pt x="1167" y="397" on="0"/>
- <pt x="1167" y="544" on="1"/>
- <pt x="1167" y="1221" on="1"/>
- <pt x="1168" y="1335" on="0"/>
- <pt x="1149" y="1377" on="1"/>
- <pt x="1134" y="1409" on="0"/>
- <pt x="1068" y="1413" on="1"/>
- <pt x="1000" y="1417" on="1"/>
- <pt x="982" y="1419" on="1"/>
- <pt x="982" y="1480" on="1"/>
- <pt x="1456" y="1480" on="1"/>
- <pt x="1456" y="1419" on="1"/>
- <pt x="1437" y="1417" on="1"/>
- <pt x="1369" y="1413" on="1"/>
- <pt x="1294" y="1408" on="0"/>
- <pt x="1284" y="1366" on="1"/>
- <pt x="1271" y="1302" on="0"/>
- <pt x="1271" y="1221" on="1"/>
- <pt x="1271" y="601" on="1"/>
- <pt x="1271" y="394" on="0"/>
- <pt x="1248" y="299" on="1"/>
- <pt x="1224" y="201" on="0"/>
- <pt x="1156" y="120" on="1"/>
- <pt x="1023" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="204" y="-37" on="0"/>
- <pt x="204" y="554" on="1"/>
- <pt x="204" y="1221" on="1"/>
- <pt x="204" y="1280" on="0"/>
- <pt x="197" y="1333" on="1"/>
- <pt x="191" y="1372" on="0"/>
- <pt x="183" y="1384" on="1"/>
- <pt x="165" y="1410" on="0"/>
- <pt x="105" y="1413" on="1"/>
- <pt x="38" y="1417" on="1"/>
- <pt x="19" y="1419" on="1"/>
- <pt x="19" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="442" y="1604" on="1"/>
- <pt x="469" y="1744" on="0"/>
- <pt x="538" y="1797" on="1"/>
- <pt x="591" y="1839" on="0"/>
- <pt x="669" y="1839" on="1"/>
- <pt x="734" y="1839" on="0"/>
- <pt x="787" y="1801" on="1"/>
- <pt x="822" y="1776" on="1"/>
- <pt x="874" y="1739" on="0"/>
- <pt x="928" y="1739" on="1"/>
- <pt x="1023" y="1739" on="0"/>
- <pt x="1046" y="1838" on="1"/>
- <pt x="1108" y="1838" on="1"/>
- <pt x="1080" y="1699" on="0"/>
- <pt x="1012" y="1646" on="1"/>
- <pt x="958" y="1604" on="0"/>
- <pt x="881" y="1604" on="1"/>
- <pt x="818" y="1604" on="0"/>
- <pt x="763" y="1642" on="1"/>
- <pt x="728" y="1666" on="1"/>
- <pt x="673" y="1704" on="0"/>
- <pt x="622" y="1704" on="1"/>
- <pt x="533" y="1704" on="0"/>
- <pt x="504" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 0 0 78 20 61 66 20 73 15 38 44 48 84 44 2 47 56 37 30 22 29 1 46 38 21
- 9 8 1 6 0 2 3 0 80 69 68 57 4 13 73 61 0 56 30 29 0 0 3 14 56
- 47 30 37 29 22 80 69 68 57 1 0 6 21 8 3 0 0 22 21 41 1 37 9 8 37
- 1 46 2 4 48 196 38 37 1 47 46 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="V" xMin="0" yMin="-19" xMax="1479" yMax="1480">
- <contour>
- <pt x="724" y="-19" on="1"/>
- <pt x="193" y="1216" on="1"/>
- <pt x="137" y="1342" on="1"/>
- <pt x="113" y="1398" on="0"/>
- <pt x="91" y="1406" on="1"/>
- <pt x="68" y="1414" on="0"/>
- <pt x="21" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="543" y="1480" on="1"/>
- <pt x="543" y="1419" on="1"/>
- <pt x="522" y="1419" on="1"/>
- <pt x="367" y="1419" on="0"/>
- <pt x="367" y="1380" on="1"/>
- <pt x="367" y="1366" on="0"/>
- <pt x="401" y="1283" on="1"/>
- <pt x="428" y="1216" on="1"/>
- <pt x="828" y="284" on="1"/>
- <pt x="1210" y="1217" on="1"/>
- <pt x="1230" y="1268" on="1"/>
- <pt x="1262" y="1349" on="0"/>
- <pt x="1262" y="1376" on="1"/>
- <pt x="1262" y="1415" on="0"/>
- <pt x="1193" y="1417" on="1"/>
- <pt x="1117" y="1419" on="1"/>
- <pt x="1095" y="1419" on="1"/>
- <pt x="1095" y="1480" on="1"/>
- <pt x="1479" y="1480" on="1"/>
- <pt x="1479" y="1419" on="1"/>
- <pt x="1457" y="1417" on="1"/>
- <pt x="1394" y="1413" on="0"/>
- <pt x="1377" y="1396" on="1"/>
- <pt x="1359" y="1380" on="0"/>
- <pt x="1341" y="1335" on="1"/>
- <pt x="1294" y="1217" on="1"/>
- <pt x="792" y="-19" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 1 28 25 24 17 16 11 10 7 1 9 8 2 3 0 1 35 0 2 0 27 26 9 8 0
- 3 14 35 28 27 26 25 24 21 17 16 13 11 10 9 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="W" xMin="0" yMin="-19" xMax="1933" yMax="1480">
- <contour>
- <pt x="524" y="-19" on="1"/>
- <pt x="188" y="1215" on="1"/>
- <pt x="155" y="1336" on="0"/>
- <pt x="153" y="1347" on="1"/>
- <pt x="138" y="1416" on="0"/>
- <pt x="80" y="1416" on="1"/>
- <pt x="22" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="536" y="1480" on="1"/>
- <pt x="536" y="1419" on="1"/>
- <pt x="516" y="1419" on="1"/>
- <pt x="462" y="1417" on="1"/>
- <pt x="368" y="1414" on="0"/>
- <pt x="368" y="1363" on="1"/>
- <pt x="368" y="1323" on="0"/>
- <pt x="397" y="1215" on="1"/>
- <pt x="630" y="354" on="1"/>
- <pt x="990" y="1462" on="1"/>
- <pt x="1060" y="1462" on="1"/>
- <pt x="1382" y="323" on="1"/>
- <pt x="1658" y="1214" on="1"/>
- <pt x="1701" y="1352" on="0"/>
- <pt x="1701" y="1383" on="1"/>
- <pt x="1701" y="1415" on="0"/>
- <pt x="1613" y="1417" on="1"/>
- <pt x="1545" y="1419" on="1"/>
- <pt x="1526" y="1419" on="1"/>
- <pt x="1526" y="1480" on="1"/>
- <pt x="1933" y="1480" on="1"/>
- <pt x="1933" y="1419" on="1"/>
- <pt x="1916" y="1417" on="1"/>
- <pt x="1856" y="1415" on="1"/>
- <pt x="1796" y="1413" on="0"/>
- <pt x="1777" y="1352" on="1"/>
- <pt x="1734" y="1215" on="1"/>
- <pt x="1352" y="-19" on="1"/>
- <pt x="1285" y="-19" on="1"/>
- <pt x="963" y="1120" on="1"/>
- <pt x="593" y="-19" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 1 38 30 27 26 19 18 11 10 7 9 8 1 3 0 1 1 20 17 2 1 2 3 0 0
- 1 39 37 36 0 4 13 2 0 29 28 9 8 0 3 14 39 38 37 36 30 29 28 27 26
- 23 20 19 18 17 14 11 10 9 8 7 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Wcircumflex" xMin="0" yMin="-19" xMax="1933" yMax="1925">
- <contour>
- <pt x="524" y="-19" on="1"/>
- <pt x="188" y="1215" on="1"/>
- <pt x="155" y="1336" on="0"/>
- <pt x="153" y="1347" on="1"/>
- <pt x="138" y="1416" on="0"/>
- <pt x="80" y="1416" on="1"/>
- <pt x="22" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="536" y="1480" on="1"/>
- <pt x="536" y="1419" on="1"/>
- <pt x="516" y="1419" on="1"/>
- <pt x="462" y="1417" on="1"/>
- <pt x="368" y="1414" on="0"/>
- <pt x="368" y="1363" on="1"/>
- <pt x="368" y="1323" on="0"/>
- <pt x="397" y="1215" on="1"/>
- <pt x="630" y="354" on="1"/>
- <pt x="990" y="1462" on="1"/>
- <pt x="1060" y="1462" on="1"/>
- <pt x="1382" y="323" on="1"/>
- <pt x="1658" y="1214" on="1"/>
- <pt x="1701" y="1352" on="0"/>
- <pt x="1701" y="1383" on="1"/>
- <pt x="1701" y="1415" on="0"/>
- <pt x="1613" y="1417" on="1"/>
- <pt x="1545" y="1419" on="1"/>
- <pt x="1526" y="1419" on="1"/>
- <pt x="1526" y="1480" on="1"/>
- <pt x="1933" y="1480" on="1"/>
- <pt x="1933" y="1419" on="1"/>
- <pt x="1916" y="1417" on="1"/>
- <pt x="1856" y="1415" on="1"/>
- <pt x="1796" y="1413" on="0"/>
- <pt x="1777" y="1352" on="1"/>
- <pt x="1734" y="1215" on="1"/>
- <pt x="1352" y="-19" on="1"/>
- <pt x="1285" y="-19" on="1"/>
- <pt x="963" y="1120" on="1"/>
- <pt x="593" y="-19" on="1"/>
- </contour>
- <contour>
- <pt x="679" y="1604" on="1"/>
- <pt x="920" y="1925" on="1"/>
- <pt x="1142" y="1925" on="1"/>
- <pt x="1382" y="1604" on="1"/>
- <pt x="1296" y="1604" on="1"/>
- <pt x="1031" y="1826" on="1"/>
- <pt x="765" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 46 45 44 43 40 5 41 8 3 1 38 30 27 26 19 18 11 10 7 9 8 1 3 0 1
- 1 20 17 2 1 2 3 0 0 1 39 37 36 0 4 13 2 0 42 41 1 0 29 28 9
- 8 0 3 14 46 45 44 43 42 41 40 39 38 37 36 30 29 28 27 26 23 20 19 18 17
- 14 11 10 9 8 7 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="X" xMin="12" yMin="0" xMax="1466" yMax="1480">
- <contour>
- <pt x="12" y="0" on="1"/>
- <pt x="12" y="62" on="1"/>
- <pt x="26" y="63" on="1"/>
- <pt x="69" y="66" on="1"/>
- <pt x="132" y="72" on="0"/>
- <pt x="187" y="144" on="1"/>
- <pt x="278" y="261" on="1"/>
- <pt x="633" y="729" on="1"/>
- <pt x="302" y="1222" on="1"/>
- <pt x="222" y="1333" on="1"/>
- <pt x="167" y="1411" on="0"/>
- <pt x="107" y="1415" on="1"/>
- <pt x="57" y="1417" on="1"/>
- <pt x="36" y="1419" on="1"/>
- <pt x="36" y="1480" on="1"/>
- <pt x="619" y="1480" on="1"/>
- <pt x="619" y="1419" on="1"/>
- <pt x="601" y="1419" on="1"/>
- <pt x="531" y="1418" on="1"/>
- <pt x="456" y="1417" on="0"/>
- <pt x="456" y="1386" on="1"/>
- <pt x="456" y="1370" on="0"/>
- <pt x="501" y="1310" on="1"/>
- <pt x="509" y="1300" on="0"/>
- <pt x="536" y="1258" on="1"/>
- <pt x="560" y="1223" on="1"/>
- <pt x="801" y="859" on="1"/>
- <pt x="1091" y="1223" on="1"/>
- <pt x="1200" y="1360" on="0"/>
- <pt x="1200" y="1391" on="1"/>
- <pt x="1200" y="1414" on="0"/>
- <pt x="1138" y="1417" on="1"/>
- <pt x="1089" y="1419" on="1"/>
- <pt x="1070" y="1419" on="1"/>
- <pt x="1070" y="1480" on="1"/>
- <pt x="1441" y="1480" on="1"/>
- <pt x="1441" y="1419" on="1"/>
- <pt x="1417" y="1417" on="1"/>
- <pt x="1325" y="1411" on="0"/>
- <pt x="1264" y="1326" on="1"/>
- <pt x="1229" y="1279" on="0"/>
- <pt x="1184" y="1223" on="1"/>
- <pt x="855" y="814" on="1"/>
- <pt x="1220" y="261" on="1"/>
- <pt x="1307" y="137" on="1"/>
- <pt x="1351" y="71" on="0"/>
- <pt x="1394" y="66" on="1"/>
- <pt x="1447" y="63" on="1"/>
- <pt x="1466" y="62" on="1"/>
- <pt x="1466" y="0" on="1"/>
- <pt x="899" y="0" on="1"/>
- <pt x="899" y="62" on="1"/>
- <pt x="916" y="62" on="1"/>
- <pt x="977" y="63" on="1"/>
- <pt x="1064" y="64" on="0"/>
- <pt x="1064" y="99" on="1"/>
- <pt x="1064" y="122" on="0"/>
- <pt x="1023" y="181" on="1"/>
- <pt x="968" y="260" on="1"/>
- <pt x="691" y="676" on="1"/>
- <pt x="376" y="261" on="1"/>
- <pt x="358" y="237" on="1"/>
- <pt x="342" y="216" on="1"/>
- <pt x="331" y="202" on="1"/>
- <pt x="321" y="189" on="1"/>
- <pt x="265" y="115" on="0"/>
- <pt x="265" y="95" on="1"/>
- <pt x="265" y="64" on="0"/>
- <pt x="345" y="63" on="1"/>
- <pt x="405" y="62" on="1"/>
- <pt x="426" y="62" on="1"/>
- <pt x="426" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 70 69 59 58 52 51 48 43 42 36 33 32 26 17 16 13 8 7 1 19 14 0 3 71 50
- 49 0 3 0 35 34 15 14 0 3 14 71 70 69 66 59 58 55 52 51 50 49 48 43 42
- 36 35 34 33 32 29 26 20 17 16 15 14 13 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Y" xMin="0" yMin="0" xMax="1478" yMax="1480">
- <contour>
- <pt x="627" y="656" on="1"/>
- <pt x="252" y="1215" on="1"/>
- <pt x="193" y="1303" on="1"/>
- <pt x="124" y="1408" on="0"/>
- <pt x="77" y="1415" on="1"/>
- <pt x="19" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="573" y="1480" on="1"/>
- <pt x="573" y="1419" on="1"/>
- <pt x="554" y="1419" on="1"/>
- <pt x="483" y="1417" on="1"/>
- <pt x="409" y="1415" on="0"/>
- <pt x="409" y="1380" on="1"/>
- <pt x="409" y="1351" on="0"/>
- <pt x="457" y="1281" on="1"/>
- <pt x="502" y="1215" on="1"/>
- <pt x="816" y="748" on="1"/>
- <pt x="1131" y="1214" on="1"/>
- <pt x="1226" y="1354" on="0"/>
- <pt x="1226" y="1389" on="1"/>
- <pt x="1226" y="1414" on="0"/>
- <pt x="1143" y="1417" on="1"/>
- <pt x="1087" y="1419" on="1"/>
- <pt x="1069" y="1419" on="1"/>
- <pt x="1069" y="1480" on="1"/>
- <pt x="1478" y="1480" on="1"/>
- <pt x="1478" y="1419" on="1"/>
- <pt x="1459" y="1417" on="1"/>
- <pt x="1458" y="1417" on="0"/>
- <pt x="1453" y="1418" on="1"/>
- <pt x="1450" y="1415" on="0"/>
- <pt x="1447" y="1415" on="1"/>
- <pt x="1426" y="1416" on="1"/>
- <pt x="1353" y="1419" on="0"/>
- <pt x="1297" y="1333" on="1"/>
- <pt x="1295" y="1329" on="0"/>
- <pt x="1288" y="1319" on="1"/>
- <pt x="1282" y="1310" on="0"/>
- <pt x="1275" y="1301" on="1"/>
- <pt x="1246" y="1258" on="0"/>
- <pt x="1217" y="1215" on="1"/>
- <pt x="837" y="656" on="1"/>
- <pt x="837" y="259" on="1"/>
- <pt x="836" y="140" on="0"/>
- <pt x="854" y="104" on="1"/>
- <pt x="869" y="72" on="0"/>
- <pt x="935" y="68" on="1"/>
- <pt x="1003" y="63" on="1"/>
- <pt x="1022" y="62" on="1"/>
- <pt x="1022" y="0" on="1"/>
- <pt x="442" y="0" on="1"/>
- <pt x="442" y="62" on="1"/>
- <pt x="460" y="63" on="1"/>
- <pt x="528" y="68" on="1"/>
- <pt x="603" y="74" on="0"/>
- <pt x="613" y="115" on="1"/>
- <pt x="627" y="175" on="0"/>
- <pt x="627" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 58 51 43 50 33 32 30 42 33 32 30 27 24 23 17 10 9 6 4 0 13 7 50 3 51
- 50 1 0 26 25 8 7 0 3 14 51 58 50 43 17 42 0 2 27 26 25 24 23 5 13
- 20 42 10 9 8 7 6 4 6 13 13 0 0 0 43 42 32 1 0 1 4 48 196 58 0
- 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Yacute" xMin="0" yMin="0" xMax="1478" yMax="1925">
- <contour>
- <pt x="627" y="656" on="1"/>
- <pt x="252" y="1215" on="1"/>
- <pt x="193" y="1303" on="1"/>
- <pt x="124" y="1408" on="0"/>
- <pt x="77" y="1415" on="1"/>
- <pt x="19" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="573" y="1480" on="1"/>
- <pt x="573" y="1419" on="1"/>
- <pt x="554" y="1419" on="1"/>
- <pt x="483" y="1417" on="1"/>
- <pt x="409" y="1415" on="0"/>
- <pt x="409" y="1380" on="1"/>
- <pt x="409" y="1351" on="0"/>
- <pt x="457" y="1281" on="1"/>
- <pt x="502" y="1215" on="1"/>
- <pt x="816" y="748" on="1"/>
- <pt x="1131" y="1214" on="1"/>
- <pt x="1226" y="1354" on="0"/>
- <pt x="1226" y="1389" on="1"/>
- <pt x="1226" y="1414" on="0"/>
- <pt x="1143" y="1417" on="1"/>
- <pt x="1087" y="1419" on="1"/>
- <pt x="1069" y="1419" on="1"/>
- <pt x="1069" y="1480" on="1"/>
- <pt x="1478" y="1480" on="1"/>
- <pt x="1478" y="1419" on="1"/>
- <pt x="1459" y="1417" on="1"/>
- <pt x="1458" y="1417" on="0"/>
- <pt x="1453" y="1418" on="1"/>
- <pt x="1450" y="1415" on="0"/>
- <pt x="1447" y="1415" on="1"/>
- <pt x="1426" y="1416" on="1"/>
- <pt x="1353" y="1419" on="0"/>
- <pt x="1297" y="1333" on="1"/>
- <pt x="1295" y="1329" on="0"/>
- <pt x="1288" y="1319" on="1"/>
- <pt x="1282" y="1310" on="0"/>
- <pt x="1275" y="1301" on="1"/>
- <pt x="1246" y="1258" on="0"/>
- <pt x="1217" y="1215" on="1"/>
- <pt x="837" y="656" on="1"/>
- <pt x="837" y="259" on="1"/>
- <pt x="836" y="140" on="0"/>
- <pt x="854" y="104" on="1"/>
- <pt x="869" y="72" on="0"/>
- <pt x="935" y="68" on="1"/>
- <pt x="1003" y="63" on="1"/>
- <pt x="1022" y="62" on="1"/>
- <pt x="1022" y="0" on="1"/>
- <pt x="442" y="0" on="1"/>
- <pt x="442" y="62" on="1"/>
- <pt x="460" y="63" on="1"/>
- <pt x="528" y="68" on="1"/>
- <pt x="603" y="74" on="0"/>
- <pt x="613" y="115" on="1"/>
- <pt x="627" y="175" on="0"/>
- <pt x="627" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="649" y="1604" on="1"/>
- <pt x="890" y="1925" on="1"/>
- <pt x="1149" y="1925" on="1"/>
- <pt x="742" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 58 51 43 50 62 59 2 60 7 3 33 32 30 42 33 32 30 27 24 23 17 10 9 6 4
- 0 13 7 50 3 61 60 1 51 50 1 2 0 26 25 8 7 0 3 14 51 58 50 43 62
- 59 17 3 42 0 3 61 60 27 26 25 24 23 7 13 20 42 10 9 8 7 6 4 6 13
- 13 0 0 0 43 42 32 1 0 1 4 48 196 58 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ycircumflex" xMin="0" yMin="0" xMax="1478" yMax="1925">
- <contour>
- <pt x="627" y="656" on="1"/>
- <pt x="252" y="1215" on="1"/>
- <pt x="193" y="1303" on="1"/>
- <pt x="124" y="1408" on="0"/>
- <pt x="77" y="1415" on="1"/>
- <pt x="19" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="573" y="1480" on="1"/>
- <pt x="573" y="1419" on="1"/>
- <pt x="554" y="1419" on="1"/>
- <pt x="483" y="1417" on="1"/>
- <pt x="409" y="1415" on="0"/>
- <pt x="409" y="1380" on="1"/>
- <pt x="409" y="1351" on="0"/>
- <pt x="457" y="1281" on="1"/>
- <pt x="502" y="1215" on="1"/>
- <pt x="816" y="748" on="1"/>
- <pt x="1131" y="1214" on="1"/>
- <pt x="1226" y="1354" on="0"/>
- <pt x="1226" y="1389" on="1"/>
- <pt x="1226" y="1414" on="0"/>
- <pt x="1143" y="1417" on="1"/>
- <pt x="1087" y="1419" on="1"/>
- <pt x="1069" y="1419" on="1"/>
- <pt x="1069" y="1480" on="1"/>
- <pt x="1478" y="1480" on="1"/>
- <pt x="1478" y="1419" on="1"/>
- <pt x="1459" y="1417" on="1"/>
- <pt x="1458" y="1417" on="0"/>
- <pt x="1453" y="1418" on="1"/>
- <pt x="1450" y="1415" on="0"/>
- <pt x="1447" y="1415" on="1"/>
- <pt x="1426" y="1416" on="1"/>
- <pt x="1353" y="1419" on="0"/>
- <pt x="1297" y="1333" on="1"/>
- <pt x="1295" y="1329" on="0"/>
- <pt x="1288" y="1319" on="1"/>
- <pt x="1282" y="1310" on="0"/>
- <pt x="1275" y="1301" on="1"/>
- <pt x="1246" y="1258" on="0"/>
- <pt x="1217" y="1215" on="1"/>
- <pt x="837" y="656" on="1"/>
- <pt x="837" y="259" on="1"/>
- <pt x="836" y="140" on="0"/>
- <pt x="854" y="104" on="1"/>
- <pt x="869" y="72" on="0"/>
- <pt x="935" y="68" on="1"/>
- <pt x="1003" y="63" on="1"/>
- <pt x="1022" y="62" on="1"/>
- <pt x="1022" y="0" on="1"/>
- <pt x="442" y="0" on="1"/>
- <pt x="442" y="62" on="1"/>
- <pt x="460" y="63" on="1"/>
- <pt x="528" y="68" on="1"/>
- <pt x="603" y="74" on="0"/>
- <pt x="613" y="115" on="1"/>
- <pt x="627" y="175" on="0"/>
- <pt x="627" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="469" y="1604" on="1"/>
- <pt x="710" y="1925" on="1"/>
- <pt x="932" y="1925" on="1"/>
- <pt x="1172" y="1604" on="1"/>
- <pt x="1086" y="1604" on="1"/>
- <pt x="821" y="1826" on="1"/>
- <pt x="555" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 98 values pushed */
- 58 51 43 50 65 64 63 62 59 5 60 7 3 33 32 30 42 33 32 30 27 24 23 17 10
- 9 6 4 0 13 7 50 3 61 60 1 51 50 1 2 0 26 25 8 7 0 3 14 51 58
- 50 43 64 60 17 3 42 0 3 63 62 61 27 26 25 24 23 8 13 20 42 65 59 10 9
- 8 7 6 4 8 13 13 0 0 0 43 42 32 1 0 1 4 48 196 58 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ydieresis" xMin="0" yMin="0" xMax="1478" yMax="1777">
- <contour>
- <pt x="627" y="656" on="1"/>
- <pt x="252" y="1215" on="1"/>
- <pt x="193" y="1303" on="1"/>
- <pt x="124" y="1408" on="0"/>
- <pt x="77" y="1415" on="1"/>
- <pt x="19" y="1417" on="1"/>
- <pt x="0" y="1419" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="573" y="1480" on="1"/>
- <pt x="573" y="1419" on="1"/>
- <pt x="554" y="1419" on="1"/>
- <pt x="483" y="1417" on="1"/>
- <pt x="409" y="1415" on="0"/>
- <pt x="409" y="1380" on="1"/>
- <pt x="409" y="1351" on="0"/>
- <pt x="457" y="1281" on="1"/>
- <pt x="502" y="1215" on="1"/>
- <pt x="816" y="748" on="1"/>
- <pt x="1131" y="1214" on="1"/>
- <pt x="1226" y="1354" on="0"/>
- <pt x="1226" y="1389" on="1"/>
- <pt x="1226" y="1414" on="0"/>
- <pt x="1143" y="1417" on="1"/>
- <pt x="1087" y="1419" on="1"/>
- <pt x="1069" y="1419" on="1"/>
- <pt x="1069" y="1480" on="1"/>
- <pt x="1478" y="1480" on="1"/>
- <pt x="1478" y="1419" on="1"/>
- <pt x="1459" y="1417" on="1"/>
- <pt x="1458" y="1417" on="0"/>
- <pt x="1453" y="1418" on="1"/>
- <pt x="1450" y="1415" on="0"/>
- <pt x="1447" y="1415" on="1"/>
- <pt x="1426" y="1416" on="1"/>
- <pt x="1353" y="1419" on="0"/>
- <pt x="1297" y="1333" on="1"/>
- <pt x="1295" y="1329" on="0"/>
- <pt x="1288" y="1319" on="1"/>
- <pt x="1282" y="1310" on="0"/>
- <pt x="1275" y="1301" on="1"/>
- <pt x="1246" y="1258" on="0"/>
- <pt x="1217" y="1215" on="1"/>
- <pt x="837" y="656" on="1"/>
- <pt x="837" y="259" on="1"/>
- <pt x="836" y="140" on="0"/>
- <pt x="854" y="104" on="1"/>
- <pt x="869" y="72" on="0"/>
- <pt x="935" y="68" on="1"/>
- <pt x="1003" y="63" on="1"/>
- <pt x="1022" y="62" on="1"/>
- <pt x="1022" y="0" on="1"/>
- <pt x="442" y="0" on="1"/>
- <pt x="442" y="62" on="1"/>
- <pt x="460" y="63" on="1"/>
- <pt x="528" y="68" on="1"/>
- <pt x="603" y="74" on="0"/>
- <pt x="613" y="115" on="1"/>
- <pt x="627" y="175" on="0"/>
- <pt x="627" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="537" y="1604" on="1"/>
- <pt x="537" y="1777" on="1"/>
- <pt x="710" y="1777" on="1"/>
- <pt x="710" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="932" y="1604" on="1"/>
- <pt x="932" y="1777" on="1"/>
- <pt x="1105" y="1777" on="1"/>
- <pt x="1105" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 121 values pushed */
- 58 51 43 50 33 32 30 42 33 32 30 27 24 23 17 10 9 6 4 0 13 7 50 3 0
- 0 66 63 62 59 13 3 60 1 4 48 84 65 64 61 60 3 51 50 1 2 0 26 25 8
- 7 0 3 14 51 58 50 43 25 24 23 3 65 63 3 17 42 61 2 10 9 8 3 0 59
- 3 27 26 2 13 20 65 7 6 4 3 13 13 59 0 0 64 63 13 1 65 62 61 13 1
- 59 43 42 32 1 0 3 4 48 196 66 65 1 60 59 1 58 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Z" xMin="92" yMin="0" xMax="1129" yMax="1480">
- <contour>
- <pt x="92" y="0" on="1"/>
- <pt x="92" y="80" on="1"/>
- <pt x="887" y="1400" on="1"/>
- <pt x="436" y="1400" on="1"/>
- <pt x="327" y="1396" on="1"/>
- <pt x="263" y="1395" on="0"/>
- <pt x="252" y="1377" on="1"/>
- <pt x="242" y="1360" on="0"/>
- <pt x="242" y="1322" on="1"/>
- <pt x="239" y="1209" on="1"/>
- <pt x="237" y="1184" on="1"/>
- <pt x="126" y="1184" on="1"/>
- <pt x="126" y="1480" on="1"/>
- <pt x="1122" y="1480" on="1"/>
- <pt x="1122" y="1413" on="1"/>
- <pt x="331" y="93" on="1"/>
- <pt x="779" y="93" on="1"/>
- <pt x="945" y="99" on="1"/>
- <pt x="1008" y="100" on="0"/>
- <pt x="1012" y="165" on="1"/>
- <pt x="1016" y="265" on="1"/>
- <pt x="1017" y="284" on="1"/>
- <pt x="1129" y="284" on="1"/>
- <pt x="1129" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 14 12 2 2 22 21 11 10 4 2 15 3 1 15 0 2 0 0 3 2 21 1 12 16 15
- 35 1 0 2 4 48 84 23 0 1 0 13 12 0 14 21 16 15 14 13 10 3 2 8 22
- 11 3 1 0 11 23 22 1 12 11 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zacute" xMin="92" yMin="0" xMax="1129" yMax="1925">
- <contour>
- <pt x="92" y="0" on="1"/>
- <pt x="92" y="80" on="1"/>
- <pt x="887" y="1400" on="1"/>
- <pt x="436" y="1400" on="1"/>
- <pt x="327" y="1396" on="1"/>
- <pt x="263" y="1395" on="0"/>
- <pt x="252" y="1377" on="1"/>
- <pt x="242" y="1360" on="0"/>
- <pt x="242" y="1322" on="1"/>
- <pt x="239" y="1209" on="1"/>
- <pt x="237" y="1184" on="1"/>
- <pt x="126" y="1184" on="1"/>
- <pt x="126" y="1480" on="1"/>
- <pt x="1122" y="1480" on="1"/>
- <pt x="1122" y="1413" on="1"/>
- <pt x="331" y="93" on="1"/>
- <pt x="779" y="93" on="1"/>
- <pt x="945" y="99" on="1"/>
- <pt x="1008" y="100" on="0"/>
- <pt x="1012" y="165" on="1"/>
- <pt x="1016" y="265" on="1"/>
- <pt x="1017" y="284" on="1"/>
- <pt x="1129" y="284" on="1"/>
- <pt x="1129" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="510" y="1604" on="1"/>
- <pt x="751" y="1925" on="1"/>
- <pt x="1010" y="1925" on="1"/>
- <pt x="603" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 27 24 2 25 12 3 14 12 2 2 22 21 11 10 4 2 15 3 1 15 0 2 0 0 3
- 2 21 1 12 16 15 35 1 0 2 4 48 84 26 25 1 23 0 1 2 0 13 12 0 14
- 27 26 25 24 21 16 15 14 13 10 3 2 12 22 11 3 1 0 11 23 22 1 12 11 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zcaron" xMin="92" yMin="0" xMax="1129" yMax="1925">
- <contour>
- <pt x="92" y="0" on="1"/>
- <pt x="92" y="80" on="1"/>
- <pt x="887" y="1400" on="1"/>
- <pt x="436" y="1400" on="1"/>
- <pt x="327" y="1396" on="1"/>
- <pt x="263" y="1395" on="0"/>
- <pt x="252" y="1377" on="1"/>
- <pt x="242" y="1360" on="0"/>
- <pt x="242" y="1322" on="1"/>
- <pt x="239" y="1209" on="1"/>
- <pt x="237" y="1184" on="1"/>
- <pt x="126" y="1184" on="1"/>
- <pt x="126" y="1480" on="1"/>
- <pt x="1122" y="1480" on="1"/>
- <pt x="1122" y="1413" on="1"/>
- <pt x="331" y="93" on="1"/>
- <pt x="779" y="93" on="1"/>
- <pt x="945" y="99" on="1"/>
- <pt x="1008" y="100" on="0"/>
- <pt x="1012" y="165" on="1"/>
- <pt x="1016" y="265" on="1"/>
- <pt x="1017" y="284" on="1"/>
- <pt x="1129" y="284" on="1"/>
- <pt x="1129" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="979" y="1925" on="1"/>
- <pt x="739" y="1604" on="1"/>
- <pt x="517" y="1604" on="1"/>
- <pt x="276" y="1925" on="1"/>
- <pt x="362" y="1925" on="1"/>
- <pt x="628" y="1703" on="1"/>
- <pt x="893" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 14 12 2 2 22 21 11 10 4 2 15 3 1 15 0 2 30 29 28 27 24 5 13 25 0
- 0 3 2 21 1 12 16 15 35 1 0 2 4 48 84 26 25 1 23 0 1 2 0 13 12
- 0 14 30 29 28 27 26 25 24 21 16 15 14 13 10 3 2 15 22 11 3 1 0 11 23
- 22 1 12 11 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zdotaccent" xMin="92" yMin="0" xMax="1129" yMax="1801">
- <contour>
- <pt x="92" y="0" on="1"/>
- <pt x="92" y="80" on="1"/>
- <pt x="887" y="1400" on="1"/>
- <pt x="436" y="1400" on="1"/>
- <pt x="327" y="1396" on="1"/>
- <pt x="263" y="1395" on="0"/>
- <pt x="252" y="1377" on="1"/>
- <pt x="242" y="1360" on="0"/>
- <pt x="242" y="1322" on="1"/>
- <pt x="239" y="1209" on="1"/>
- <pt x="237" y="1184" on="1"/>
- <pt x="126" y="1184" on="1"/>
- <pt x="126" y="1480" on="1"/>
- <pt x="1122" y="1480" on="1"/>
- <pt x="1122" y="1413" on="1"/>
- <pt x="331" y="93" on="1"/>
- <pt x="779" y="93" on="1"/>
- <pt x="945" y="99" on="1"/>
- <pt x="1008" y="100" on="0"/>
- <pt x="1012" y="165" on="1"/>
- <pt x="1016" y="265" on="1"/>
- <pt x="1017" y="284" on="1"/>
- <pt x="1129" y="284" on="1"/>
- <pt x="1129" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="512" y="1604" on="1"/>
- <pt x="512" y="1801" on="1"/>
- <pt x="709" y="1801" on="1"/>
- <pt x="709" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 14 12 2 2 22 21 11 10 4 2 15 3 1 15 0 2 0 0 27 24 5 1 25 3 2
- 21 1 12 16 15 35 1 0 3 4 48 84 26 25 1 23 0 1 2 0 13 12 0 14 21
- 16 14 13 2 5 22 26 3 15 10 3 3 24 11 3 1 0 11 0 0 27 26 4 1 24
- 1 4 48 196 25 24 1 23 22 1 12 11 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="a" xMin="75" yMin="-25" xMax="904" yMax="1110">
- <contour>
- <pt x="629" y="149" on="1"/>
- <pt x="513" y="-25" on="0"/>
- <pt x="344" y="-25" on="1"/>
- <pt x="221" y="-25" on="0"/>
- <pt x="148" y="55" on="1"/>
- <pt x="75" y="136" on="0"/>
- <pt x="75" y="273" on="1"/>
- <pt x="75" y="642" on="0"/>
- <pt x="543" y="642" on="1"/>
- <pt x="584" y="642" on="1"/>
- <pt x="584" y="777" on="1"/>
- <pt x="584" y="940" on="0"/>
- <pt x="558" y="986" on="1"/>
- <pt x="532" y="1034" on="0"/>
- <pt x="445" y="1034" on="1"/>
- <pt x="361" y="1034" on="0"/>
- <pt x="327" y="996" on="1"/>
- <pt x="293" y="958" on="0"/>
- <pt x="293" y="863" on="1"/>
- <pt x="293" y="845" on="1"/>
- <pt x="157" y="845" on="1"/>
- <pt x="157" y="1019" on="1"/>
- <pt x="305" y="1110" on="0"/>
- <pt x="473" y="1110" on="1"/>
- <pt x="639" y="1110" on="0"/>
- <pt x="710" y="1036" on="1"/>
- <pt x="781" y="962" on="0"/>
- <pt x="781" y="785" on="1"/>
- <pt x="781" y="301" on="1"/>
- <pt x="781" y="156" on="0"/>
- <pt x="794" y="110" on="1"/>
- <pt x="807" y="65" on="0"/>
- <pt x="847" y="65" on="1"/>
- <pt x="863" y="65" on="0"/>
- <pt x="898" y="74" on="1"/>
- <pt x="904" y="0" on="1"/>
- <pt x="828" y="-25" on="0"/>
- <pt x="792" y="-25" on="1"/>
- <pt x="668" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="584" y="171" on="1"/>
- <pt x="584" y="580" on="1"/>
- <pt x="538" y="580" on="1"/>
- <pt x="288" y="580" on="0"/>
- <pt x="288" y="312" on="1"/>
- <pt x="288" y="93" on="0"/>
- <pt x="431" y="93" on="1"/>
- <pt x="503" y="93" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 45 22 2 14 21 23 48 84 37 2 23 1 2 2 28 35 1 1 41 40 39 27 21
- 20 19 18 10 9 8 0 12 1 2 3 0 0 1 35 2 0 14 0 0 43 10 6 48 196
- 35 28 0 27 9 2 41 19 18 8 4 9 20 3 6 20 0 0 40 39 10 9 4 3 27
- 1 4 48 196 28 27 1 21 20 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aacute" xMin="75" yMin="-25" xMax="904" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="192" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="abreve" xMin="75" yMin="-25" xMax="904" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="breve" x="133" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acircumflex" xMin="75" yMin="-25" xMax="904" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="133" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acute" xMin="91" yMin="1283" xMax="591" yMax="1604">
- <contour>
- <pt x="91" y="1283" on="1"/>
- <pt x="332" y="1604" on="1"/>
- <pt x="591" y="1604" on="1"/>
- <pt x="184" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 3 0 1 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="adieresis" xMin="75" yMin="-25" xMax="904" yMax="1456">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="134" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ae" xMin="75" yMin="-25" xMax="1304" yMax="1111">
- <contour>
- <pt x="649" y="181" on="1"/>
- <pt x="582" y="71" on="0"/>
- <pt x="525" y="27" on="1"/>
- <pt x="457" y="-25" on="0"/>
- <pt x="347" y="-25" on="1"/>
- <pt x="221" y="-25" on="0"/>
- <pt x="148" y="55" on="1"/>
- <pt x="75" y="136" on="0"/>
- <pt x="75" y="273" on="1"/>
- <pt x="75" y="642" on="0"/>
- <pt x="542" y="642" on="1"/>
- <pt x="583" y="642" on="1"/>
- <pt x="583" y="777" on="1"/>
- <pt x="583" y="939" on="0"/>
- <pt x="558" y="986" on="1"/>
- <pt x="533" y="1034" on="0"/>
- <pt x="445" y="1034" on="1"/>
- <pt x="361" y="1034" on="0"/>
- <pt x="326" y="996" on="1"/>
- <pt x="292" y="958" on="0"/>
- <pt x="292" y="863" on="1"/>
- <pt x="292" y="845" on="1"/>
- <pt x="156" y="845" on="1"/>
- <pt x="156" y="1019" on="1"/>
- <pt x="304" y="1110" on="0"/>
- <pt x="469" y="1110" on="1"/>
- <pt x="643" y="1110" on="0"/>
- <pt x="732" y="1009" on="1"/>
- <pt x="848" y="1111" on="0"/>
- <pt x="975" y="1111" on="1"/>
- <pt x="1304" y="1111" on="0"/>
- <pt x="1304" y="605" on="1"/>
- <pt x="1304" y="586" on="1"/>
- <pt x="781" y="586" on="1"/>
- <pt x="785" y="348" on="0"/>
- <pt x="838" y="233" on="1"/>
- <pt x="910" y="75" on="0"/>
- <pt x="1067" y="75" on="1"/>
- <pt x="1159" y="75" on="0"/>
- <pt x="1304" y="150" on="1"/>
- <pt x="1304" y="49" on="1"/>
- <pt x="1158" y="-25" on="0"/>
- <pt x="1029" y="-25" on="1"/>
- <pt x="890" y="-25" on="0"/>
- <pt x="780" y="51" on="1"/>
- <pt x="715" y="96" on="0"/>
- </contour>
- <contour>
- <pt x="583" y="171" on="1"/>
- <pt x="583" y="580" on="1"/>
- <pt x="538" y="580" on="1"/>
- <pt x="288" y="580" on="0"/>
- <pt x="288" y="312" on="1"/>
- <pt x="288" y="93" on="0"/>
- <pt x="431" y="93" on="1"/>
- <pt x="502" y="93" on="0"/>
- </contour>
- <contour>
- <pt x="781" y="648" on="1"/>
- <pt x="1095" y="648" on="1"/>
- <pt x="1095" y="692" on="1"/>
- <pt x="1095" y="890" on="0"/>
- <pt x="1067" y="966" on="1"/>
- <pt x="1038" y="1043" on="0"/>
- <pt x="963" y="1043" on="1"/>
- <pt x="864" y="1043" on="0"/>
- <pt x="818" y="925" on="1"/>
- <pt x="784" y="837" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 112 values pushed */
- 0 0 60 17 29 52 22 4 37 9 42 16 21 25 48 84 42 2 29 1 25 1 4 2 1
- 56 27 23 22 21 20 12 7 1 54 3 0 31 11 10 3 54 32 3 1 48 47 46 40 39
- 0 6 32 2 3 0 0 0 33 32 14 1 54 1 4 48 84 55 54 1 0 14 0 0 50
- 10 8 48 196 48 21 20 10 4 11 22 3 56 55 54 40 39 33 32 31 27 0 10 13 11
- 8 22 47 46 12 11 3 23 22 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="afii00208" xMin="99" yMin="543" xMax="1950" yMax="642">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="642" on="1"/>
- <pt x="1950" y="642" on="1"/>
- <pt x="1950" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 9 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="agrave" xMin="75" yMin="-25" xMax="904" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="75" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="amacron" xMin="75" yMin="-25" xMax="904" yMax="1406">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="120" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ampersand" xMin="99" yMin="-37" xMax="1541" yMax="1518">
- <contour>
- <pt x="1152" y="0" on="1"/>
- <pt x="1058" y="103" on="1"/>
- <pt x="833" y="-37" on="0"/>
- <pt x="618" y="-37" on="1"/>
- <pt x="394" y="-37" on="0"/>
- <pt x="246" y="97" on="1"/>
- <pt x="99" y="231" on="0"/>
- <pt x="99" y="437" on="1"/>
- <pt x="99" y="632" on="0"/>
- <pt x="238" y="756" on="1"/>
- <pt x="322" y="830" on="0"/>
- <pt x="482" y="888" on="1"/>
- <pt x="358" y="1058" on="0"/>
- <pt x="358" y="1193" on="1"/>
- <pt x="358" y="1339" on="0"/>
- <pt x="460" y="1428" on="1"/>
- <pt x="562" y="1518" on="0"/>
- <pt x="736" y="1518" on="1"/>
- <pt x="908" y="1518" on="0"/>
- <pt x="1006" y="1439" on="1"/>
- <pt x="1105" y="1361" on="0"/>
- <pt x="1105" y="1224" on="1"/>
- <pt x="1105" y="1066" on="0"/>
- <pt x="971" y="963" on="1"/>
- <pt x="890" y="901" on="0"/>
- <pt x="736" y="851" on="1"/>
- <pt x="791" y="777" on="1"/>
- <pt x="932" y="584" on="1"/>
- <pt x="1077" y="389" on="1"/>
- <pt x="1152" y="286" on="1"/>
- <pt x="1242" y="417" on="0"/>
- <pt x="1242" y="603" on="1"/>
- <pt x="1240" y="660" on="1"/>
- <pt x="1239" y="719" on="0"/>
- <pt x="1175" y="719" on="1"/>
- <pt x="1163" y="719" on="0"/>
- <pt x="1125" y="722" on="1"/>
- <pt x="1091" y="724" on="1"/>
- <pt x="1072" y="725" on="1"/>
- <pt x="1072" y="786" on="1"/>
- <pt x="1541" y="786" on="1"/>
- <pt x="1541" y="725" on="1"/>
- <pt x="1520" y="724" on="1"/>
- <pt x="1440" y="720" on="1"/>
- <pt x="1398" y="718" on="0"/>
- <pt x="1391" y="698" on="1"/>
- <pt x="1384" y="680" on="0"/>
- <pt x="1384" y="641" on="1"/>
- <pt x="1384" y="472" on="0"/>
- <pt x="1198" y="236" on="1"/>
- <pt x="1203" y="231" on="1"/>
- <pt x="1209" y="224" on="1"/>
- <pt x="1219" y="214" on="0"/>
- <pt x="1225" y="207" on="1"/>
- <pt x="1228" y="204" on="1"/>
- <pt x="1240" y="192" on="1"/>
- <pt x="1252" y="178" on="0"/>
- <pt x="1269" y="161" on="1"/>
- <pt x="1301" y="127" on="0"/>
- <pt x="1321" y="110" on="1"/>
- <pt x="1368" y="72" on="0"/>
- <pt x="1424" y="69" on="1"/>
- <pt x="1515" y="63" on="1"/>
- <pt x="1528" y="62" on="1"/>
- <pt x="1528" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1013" y="155" on="1"/>
- <pt x="775" y="432" on="0"/>
- <pt x="513" y="835" on="1"/>
- <pt x="417" y="787" on="0"/>
- <pt x="368" y="724" on="1"/>
- <pt x="297" y="633" on="0"/>
- <pt x="297" y="494" on="1"/>
- <pt x="297" y="306" on="0"/>
- <pt x="414" y="191" on="1"/>
- <pt x="531" y="75" on="0"/>
- <pt x="723" y="75" on="1"/>
- <pt x="879" y="75" on="0"/>
- </contour>
- <contour>
- <pt x="702" y="896" on="1"/>
- <pt x="800" y="961" on="0"/>
- <pt x="848" y="1028" on="1"/>
- <pt x="920" y="1125" on="0"/>
- <pt x="920" y="1250" on="1"/>
- <pt x="920" y="1450" on="0"/>
- <pt x="742" y="1450" on="1"/>
- <pt x="656" y="1450" on="0"/>
- <pt x="606" y="1396" on="1"/>
- <pt x="555" y="1343" on="0"/>
- <pt x="555" y="1254" on="1"/>
- <pt x="555" y="1116" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 83 17 17 75 15 3 48 84 17 0 3 2 1 77 67 25 11 4 0 39 3 0 65
- 63 49 41 38 31 29 1 8 39 0 3 40 39 1 64 0 1 2 0 14 0 0 87 5 13
- 81 16 21 71 5 7 48 196 77 67 65 64 63 49 41 40 39 38 31 29 25 21 13 11 7
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="anoteleia" xMin="133" yMin="491" xMax="380" yMax="738">
- <contour>
- <pt x="133" y="491" on="1"/>
- <pt x="133" y="738" on="1"/>
- <pt x="380" y="738" on="1"/>
- <pt x="380" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 6 1 1 1 4 48 84 2 1 1 0 14 0 0 3 2 6 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aogonek" xMin="75" yMin="-370" xMax="917" yMax="1110">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="392" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="aring" xMin="75" yMin="-25" xMax="904" yMax="1737">
- <contour>
- <pt x="629" y="149" on="1"/>
- <pt x="513" y="-25" on="0"/>
- <pt x="344" y="-25" on="1"/>
- <pt x="221" y="-25" on="0"/>
- <pt x="148" y="55" on="1"/>
- <pt x="75" y="136" on="0"/>
- <pt x="75" y="273" on="1"/>
- <pt x="75" y="642" on="0"/>
- <pt x="543" y="642" on="1"/>
- <pt x="584" y="642" on="1"/>
- <pt x="584" y="777" on="1"/>
- <pt x="584" y="940" on="0"/>
- <pt x="558" y="986" on="1"/>
- <pt x="532" y="1034" on="0"/>
- <pt x="445" y="1034" on="1"/>
- <pt x="361" y="1034" on="0"/>
- <pt x="327" y="996" on="1"/>
- <pt x="293" y="958" on="0"/>
- <pt x="293" y="863" on="1"/>
- <pt x="293" y="845" on="1"/>
- <pt x="157" y="845" on="1"/>
- <pt x="157" y="1019" on="1"/>
- <pt x="305" y="1110" on="0"/>
- <pt x="473" y="1110" on="1"/>
- <pt x="639" y="1110" on="0"/>
- <pt x="710" y="1036" on="1"/>
- <pt x="781" y="962" on="0"/>
- <pt x="781" y="785" on="1"/>
- <pt x="781" y="301" on="1"/>
- <pt x="781" y="156" on="0"/>
- <pt x="794" y="110" on="1"/>
- <pt x="807" y="65" on="0"/>
- <pt x="847" y="65" on="1"/>
- <pt x="863" y="65" on="0"/>
- <pt x="898" y="74" on="1"/>
- <pt x="904" y="0" on="1"/>
- <pt x="828" y="-25" on="0"/>
- <pt x="792" y="-25" on="1"/>
- <pt x="668" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="584" y="171" on="1"/>
- <pt x="584" y="580" on="1"/>
- <pt x="538" y="580" on="1"/>
- <pt x="288" y="580" on="0"/>
- <pt x="288" y="312" on="1"/>
- <pt x="288" y="93" on="0"/>
- <pt x="431" y="93" on="1"/>
- <pt x="503" y="93" on="0"/>
- </contour>
- <contour>
- <pt x="475" y="1737" on="1"/>
- <pt x="569" y="1737" on="0"/>
- <pt x="635" y="1671" on="1"/>
- <pt x="702" y="1605" on="0"/>
- <pt x="702" y="1511" on="1"/>
- <pt x="702" y="1415" on="0"/>
- <pt x="635" y="1349" on="1"/>
- <pt x="569" y="1283" on="0"/>
- <pt x="473" y="1283" on="1"/>
- <pt x="390" y="1283" on="0"/>
- <pt x="328" y="1337" on="1"/>
- <pt x="248" y="1406" on="0"/>
- <pt x="248" y="1510" on="1"/>
- <pt x="248" y="1605" on="0"/>
- <pt x="314" y="1671" on="1"/>
- <pt x="381" y="1737" on="0"/>
- </contour>
- <contour>
- <pt x="475" y="1669" on="1"/>
- <pt x="409" y="1669" on="0"/>
- <pt x="363" y="1623" on="1"/>
- <pt x="316" y="1576" on="0"/>
- <pt x="316" y="1511" on="1"/>
- <pt x="316" y="1445" on="0"/>
- <pt x="362" y="1398" on="1"/>
- <pt x="409" y="1351" on="0"/>
- <pt x="473" y="1351" on="1"/>
- <pt x="534" y="1351" on="0"/>
- <pt x="578" y="1388" on="1"/>
- <pt x="634" y="1436" on="0"/>
- <pt x="634" y="1511" on="1"/>
- <pt x="634" y="1577" on="0"/>
- <pt x="588" y="1623" on="1"/>
- <pt x="541" y="1669" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 71 17 55 63 17 47 45 22 2 14 21 23 48 84 37 2 23 1 2 2 28 35 1
- 1 41 40 39 27 21 20 19 18 10 9 8 0 12 1 2 3 0 0 1 55 47 1 0 1
- 35 2 0 14 0 0 75 17 51 67 17 59 43 10 6 48 196 35 28 51 51 0 2 27 9
- 3 59 59 41 19 18 8 5 9 20 3 6 20 0 0 40 39 10 9 4 3 27 1 4 48
- 196 28 27 1 21 20 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asciicircum" xMin="36" yMin="592" xMax="924" yMax="1480">
- <contour>
- <pt x="36" y="592" on="1"/>
- <pt x="480" y="1480" on="1"/>
- <pt x="924" y="592" on="1"/>
- <pt x="797" y="592" on="1"/>
- <pt x="480" y="1224" on="1"/>
- <pt x="162" y="592" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asciitilde" xMin="60" yMin="421" xMax="1047" yMax="763">
- <contour>
- <pt x="122" y="444" on="1"/>
- <pt x="60" y="444" on="1"/>
- <pt x="70" y="583" on="0"/>
- <pt x="115" y="656" on="1"/>
- <pt x="181" y="763" on="0"/>
- <pt x="324" y="763" on="1"/>
- <pt x="447" y="763" on="0"/>
- <pt x="582" y="648" on="1"/>
- <pt x="622" y="614" on="1"/>
- <pt x="728" y="524" on="0"/>
- <pt x="813" y="524" on="1"/>
- <pt x="899" y="524" on="0"/>
- <pt x="950" y="605" on="1"/>
- <pt x="984" y="659" on="0"/>
- <pt x="985" y="740" on="1"/>
- <pt x="1047" y="740" on="1"/>
- <pt x="1037" y="600" on="0"/>
- <pt x="992" y="528" on="1"/>
- <pt x="926" y="421" on="0"/>
- <pt x="783" y="421" on="1"/>
- <pt x="660" y="421" on="0"/>
- <pt x="525" y="536" on="1"/>
- <pt x="485" y="570" on="1"/>
- <pt x="378" y="661" on="0"/>
- <pt x="294" y="661" on="1"/>
- <pt x="208" y="661" on="0"/>
- <pt x="157" y="580" on="1"/>
- <pt x="123" y="526" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 21 values pushed */
- 0 0 24 41 5 10 41 19 48 84 19 15 14 5 1 0 14 15 14 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asterisk" xMin="120" yMin="734" xMax="905" yMax="1480">
- <contour>
- <pt x="577" y="1152" on="1"/>
- <pt x="859" y="1282" on="1"/>
- <pt x="905" y="1142" on="1"/>
- <pt x="600" y="1081" on="1"/>
- <pt x="601" y="1085" on="0"/>
- <pt x="601" y="1090" on="1"/>
- <pt x="601" y="1094" on="1"/>
- <pt x="601" y="1097" on="1"/>
- <pt x="601" y="1126" on="0"/>
- </contour>
- <contour>
- <pt x="589" y="1049" on="1"/>
- <pt x="801" y="821" on="1"/>
- <pt x="681" y="734" on="1"/>
- <pt x="530" y="1005" on="1"/>
- <pt x="570" y="1015" on="0"/>
- </contour>
- <contour>
- <pt x="495" y="1005" on="1"/>
- <pt x="344" y="734" on="1"/>
- <pt x="224" y="821" on="1"/>
- <pt x="435" y="1049" on="1"/>
- <pt x="457" y="1013" on="0"/>
- </contour>
- <contour>
- <pt x="425" y="1081" on="1"/>
- <pt x="120" y="1142" on="1"/>
- <pt x="166" y="1282" on="1"/>
- <pt x="448" y="1152" on="1"/>
- <pt x="424" y="1125" on="0"/>
- <pt x="424" y="1097" on="1"/>
- <pt x="424" y="1094" on="1"/>
- <pt x="424" y="1090" on="1"/>
- <pt x="425" y="1085" on="0"/>
- </contour>
- <contour>
- <pt x="476" y="1172" on="1"/>
- <pt x="438" y="1480" on="1"/>
- <pt x="586" y="1480" on="1"/>
- <pt x="549" y="1172" on="1"/>
- <pt x="526" y="1181" on="0"/>
- <pt x="512" y="1181" on="1"/>
- <pt x="498" y="1181" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 33 1 33 31 28 26 25 24 22 21 20 7 6 5 2 1 0 15 29 1 3 0 1 1 19
- 17 16 15 14 12 11 10 9 3 10 1 2 3 0 0 30 29 0 14 31 30 29 28 26 25
- 24 22 21 20 19 17 16 15 14 12 11 10 9 7 6 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="at" xMin="140" yMin="-37" xMax="1747" yMax="1517">
- <contour>
- <pt x="1151" y="44" on="1"/>
- <pt x="969" y="-37" on="0"/>
- <pt x="802" y="-37" on="1"/>
- <pt x="517" y="-37" on="0"/>
- <pt x="329" y="137" on="1"/>
- <pt x="140" y="310" on="0"/>
- <pt x="140" y="580" on="1"/>
- <pt x="140" y="913" on="0"/>
- <pt x="386" y="1195" on="1"/>
- <pt x="668" y="1517" on="0"/>
- <pt x="1080" y="1517" on="1"/>
- <pt x="1367" y="1517" on="0"/>
- <pt x="1557" y="1337" on="1"/>
- <pt x="1747" y="1158" on="0"/>
- <pt x="1747" y="889" on="1"/>
- <pt x="1747" y="651" on="0"/>
- <pt x="1597" y="473" on="1"/>
- <pt x="1448" y="295" on="0"/>
- <pt x="1247" y="295" on="1"/>
- <pt x="1073" y="295" on="0"/>
- <pt x="1073" y="435" on="1"/>
- <pt x="1073" y="475" on="0"/>
- <pt x="1082" y="507" on="1"/>
- <pt x="1106" y="593" on="1"/>
- <pt x="1115" y="635" on="1"/>
- <pt x="1094" y="635" on="1"/>
- <pt x="1000" y="480" on="0"/>
- <pt x="922" y="404" on="1"/>
- <pt x="812" y="296" on="0"/>
- <pt x="703" y="296" on="1"/>
- <pt x="524" y="296" on="0"/>
- <pt x="524" y="529" on="1"/>
- <pt x="524" y="766" on="0"/>
- <pt x="690" y="970" on="1"/>
- <pt x="856" y="1173" on="0"/>
- <pt x="1051" y="1173" on="1"/>
- <pt x="1093" y="1173" on="0"/>
- <pt x="1133" y="1162" on="1"/>
- <pt x="1214" y="1140" on="1"/>
- <pt x="1216" y="1139" on="0"/>
- <pt x="1220" y="1138" on="1"/>
- <pt x="1224" y="1137" on="1"/>
- <pt x="1229" y="1136" on="1"/>
- <pt x="1237" y="1134" on="0"/>
- <pt x="1241" y="1133" on="1"/>
- <pt x="1336" y="1133" on="1"/>
- <pt x="1220" y="560" on="1"/>
- <pt x="1209" y="506" on="0"/>
- <pt x="1209" y="463" on="1"/>
- <pt x="1209" y="370" on="0"/>
- <pt x="1311" y="370" on="1"/>
- <pt x="1450" y="370" on="0"/>
- <pt x="1567" y="537" on="1"/>
- <pt x="1685" y="705" on="0"/>
- <pt x="1685" y="901" on="1"/>
- <pt x="1685" y="1136" on="0"/>
- <pt x="1509" y="1296" on="1"/>
- <pt x="1332" y="1456" on="0"/>
- <pt x="1075" y="1456" on="1"/>
- <pt x="740" y="1456" on="0"/>
- <pt x="471" y="1189" on="1"/>
- <pt x="202" y="922" on="0"/>
- <pt x="202" y="592" on="1"/>
- <pt x="202" y="343" on="0"/>
- <pt x="372" y="184" on="1"/>
- <pt x="542" y="25" on="0"/>
- <pt x="801" y="25" on="1"/>
- <pt x="956" y="25" on="0"/>
- <pt x="1129" y="100" on="1"/>
- </contour>
- <contour>
- <pt x="1124" y="819" on="1"/>
- <pt x="1166" y="1030" on="1"/>
- <pt x="1081" y="1073" on="0"/>
- <pt x="989" y="1073" on="1"/>
- <pt x="850" y="1073" on="0"/>
- <pt x="760" y="931" on="1"/>
- <pt x="669" y="789" on="0"/>
- <pt x="669" y="581" on="1"/>
- <pt x="669" y="419" on="0"/>
- <pt x="760" y="419" on="1"/>
- <pt x="836" y="419" on="0"/>
- <pt x="926" y="519" on="1"/>
- <pt x="1011" y="615" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 78 22 29 72 9 35 66 11 2 58 11 10 50 21 18 48 84 10 0 2 2 35 29
- 18 1 1 70 69 68 45 44 35 29 25 24 23 18 0 12 0 2 3 0 0 14 0 0 76
- 47 31 62 11 6 54 11 14 48 48 20 48 196 70 69 68 45 44 31 25 24 23 20 14 6
- 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="atilde" xMin="75" yMin="-25" xMax="904" yMax="1518">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="119" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="b" xMin="0" yMin="-25" xMax="956" yMax="1579">
- <contour>
- <pt x="121" y="-12" on="1"/>
- <pt x="121" y="1320" on="1"/>
- <pt x="119" y="1419" on="1"/>
- <pt x="119" y="1487" on="0"/>
- <pt x="94" y="1501" on="1"/>
- <pt x="72" y="1513" on="0"/>
- <pt x="19" y="1516" on="1"/>
- <pt x="0" y="1517" on="1"/>
- <pt x="0" y="1579" on="1"/>
- <pt x="318" y="1579" on="1"/>
- <pt x="318" y="907" on="1"/>
- <pt x="377" y="999" on="0"/>
- <pt x="432" y="1044" on="1"/>
- <pt x="512" y="1110" on="0"/>
- <pt x="610" y="1110" on="1"/>
- <pt x="770" y="1110" on="0"/>
- <pt x="863" y="968" on="1"/>
- <pt x="956" y="826" on="0"/>
- <pt x="956" y="575" on="1"/>
- <pt x="956" y="293" on="0"/>
- <pt x="835" y="134" on="1"/>
- <pt x="714" y="-25" on="0"/>
- <pt x="503" y="-25" on="1"/>
- <pt x="429" y="-25" on="0"/>
- <pt x="318" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="318" y="77" on="1"/>
- <pt x="399" y="54" on="0"/>
- <pt x="449" y="54" on="1"/>
- <pt x="585" y="54" on="0"/>
- <pt x="664" y="181" on="1"/>
- <pt x="743" y="308" on="0"/>
- <pt x="743" y="536" on="1"/>
- <pt x="743" y="983" on="0"/>
- <pt x="542" y="983" on="1"/>
- <pt x="449" y="983" on="0"/>
- <pt x="318" y="837" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 33 29 14 27 21 22 48 84 22 2 14 1 1 7 1 2 8 1 3 0 1 1 35
- 25 10 3 1 2 3 0 0 1 24 0 2 0 9 8 1 0 14 0 0 31 10 18 48 196
- 18 9 8 7 0 0 0 35 25 24 10 9 4 4 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="backslash" xMin="-30" yMin="-296" xMax="600" yMax="1481">
- <contour>
- <pt x="600" y="-296" on="1"/>
- <pt x="496" y="-296" on="1"/>
- <pt x="-30" y="1481" on="1"/>
- <pt x="74" y="1481" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bar" xMin="156" yMin="-296" xMax="255" yMax="1579">
- <contour>
- <pt x="156" y="-296" on="1"/>
- <pt x="156" y="1579" on="1"/>
- <pt x="255" y="1579" on="1"/>
- <pt x="255" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 3 2 1 0 14 0 0 3 2 9 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceleft" xMin="148" yMin="-296" xMax="761" yMax="1579">
- <contour>
- <pt x="148" y="611" on="1"/>
- <pt x="148" y="672" on="1"/>
- <pt x="226" y="672" on="1"/>
- <pt x="407" y="672" on="0"/>
- <pt x="407" y="840" on="1"/>
- <pt x="407" y="882" on="0"/>
- <pt x="393" y="953" on="1"/>
- <pt x="383" y="1003" on="1"/>
- <pt x="365" y="1100" on="1"/>
- <pt x="346" y="1202" on="0"/>
- <pt x="346" y="1268" on="1"/>
- <pt x="346" y="1403" on="0"/>
- <pt x="446" y="1491" on="1"/>
- <pt x="546" y="1579" on="0"/>
- <pt x="701" y="1579" on="1"/>
- <pt x="761" y="1579" on="1"/>
- <pt x="761" y="1517" on="1"/>
- <pt x="701" y="1517" on="1"/>
- <pt x="506" y="1517" on="0"/>
- <pt x="506" y="1349" on="1"/>
- <pt x="506" y="1313" on="0"/>
- <pt x="513" y="1286" on="1"/>
- <pt x="525" y="1239" on="1"/>
- <pt x="539" y="1169" on="1"/>
- <pt x="557" y="1079" on="0"/>
- <pt x="557" y="990" on="1"/>
- <pt x="557" y="835" on="0"/>
- <pt x="476" y="740" on="1"/>
- <pt x="428" y="685" on="0"/>
- <pt x="337" y="642" on="1"/>
- <pt x="435" y="595" on="0"/>
- <pt x="485" y="532" on="1"/>
- <pt x="557" y="439" on="0"/>
- <pt x="557" y="291" on="1"/>
- <pt x="557" y="202" on="0"/>
- <pt x="539" y="114" on="1"/>
- <pt x="525" y="45" on="1"/>
- <pt x="513" y="-2" on="1"/>
- <pt x="506" y="-29" on="0"/>
- <pt x="506" y="-69" on="1"/>
- <pt x="506" y="-234" on="0"/>
- <pt x="701" y="-234" on="1"/>
- <pt x="761" y="-234" on="1"/>
- <pt x="761" y="-296" on="1"/>
- <pt x="701" y="-296" on="1"/>
- <pt x="546" y="-296" on="0"/>
- <pt x="446" y="-208" on="1"/>
- <pt x="346" y="-120" on="0"/>
- <pt x="346" y="17" on="1"/>
- <pt x="346" y="81" on="0"/>
- <pt x="365" y="183" on="1"/>
- <pt x="383" y="280" on="1"/>
- <pt x="393" y="330" on="1"/>
- <pt x="407" y="401" on="0"/>
- <pt x="407" y="443" on="1"/>
- <pt x="407" y="611" on="0"/>
- <pt x="226" y="611" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 56 44 43 42 41 29 22 17 16 15 14 2 1 0 14 0 0 39 24 48 19 24 10 48 196
- 56 54 48 44 43 42 41 33 29 25 22 17 16 15 14 10 4 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceright" xMin="222" yMin="-296" xMax="835" yMax="1579">
- <contour>
- <pt x="835" y="672" on="1"/>
- <pt x="835" y="611" on="1"/>
- <pt x="758" y="611" on="1"/>
- <pt x="576" y="611" on="0"/>
- <pt x="576" y="444" on="1"/>
- <pt x="576" y="399" on="0"/>
- <pt x="590" y="330" on="1"/>
- <pt x="600" y="280" on="1"/>
- <pt x="618" y="183" on="1"/>
- <pt x="638" y="74" on="0"/>
- <pt x="638" y="16" on="1"/>
- <pt x="638" y="-120" on="0"/>
- <pt x="538" y="-208" on="1"/>
- <pt x="438" y="-296" on="0"/>
- <pt x="283" y="-296" on="1"/>
- <pt x="222" y="-296" on="1"/>
- <pt x="222" y="-234" on="1"/>
- <pt x="282" y="-234" on="1"/>
- <pt x="478" y="-234" on="0"/>
- <pt x="478" y="-68" on="1"/>
- <pt x="478" y="-34" on="0"/>
- <pt x="470" y="-2" on="1"/>
- <pt x="458" y="45" on="1"/>
- <pt x="445" y="114" on="1"/>
- <pt x="427" y="209" on="0"/>
- <pt x="427" y="293" on="1"/>
- <pt x="427" y="448" on="0"/>
- <pt x="508" y="543" on="1"/>
- <pt x="556" y="598" on="0"/>
- <pt x="647" y="642" on="1"/>
- <pt x="549" y="688" on="0"/>
- <pt x="499" y="752" on="1"/>
- <pt x="427" y="844" on="0"/>
- <pt x="427" y="992" on="1"/>
- <pt x="427" y="1073" on="0"/>
- <pt x="445" y="1169" on="1"/>
- <pt x="458" y="1239" on="1"/>
- <pt x="470" y="1286" on="1"/>
- <pt x="478" y="1318" on="0"/>
- <pt x="478" y="1352" on="1"/>
- <pt x="478" y="1517" on="0"/>
- <pt x="282" y="1517" on="1"/>
- <pt x="222" y="1517" on="1"/>
- <pt x="222" y="1579" on="1"/>
- <pt x="283" y="1579" on="1"/>
- <pt x="438" y="1579" on="0"/>
- <pt x="538" y="1491" on="1"/>
- <pt x="638" y="1403" on="0"/>
- <pt x="638" y="1266" on="1"/>
- <pt x="638" y="1209" on="0"/>
- <pt x="618" y="1100" on="1"/>
- <pt x="600" y="1003" on="1"/>
- <pt x="590" y="953" on="1"/>
- <pt x="576" y="884" on="0"/>
- <pt x="576" y="840" on="1"/>
- <pt x="576" y="672" on="0"/>
- <pt x="758" y="672" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 56 44 43 42 41 36 29 22 17 16 15 14 2 1 0 14 0 0 39 24 48 19 24 10 48
- 196 56 54 48 44 43 42 41 36 33 29 25 22 17 16 15 14 10 4 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketleft" xMin="185" yMin="-296" xMax="589" yMax="1579">
- <contour>
- <pt x="185" y="-296" on="1"/>
- <pt x="185" y="1579" on="1"/>
- <pt x="589" y="1579" on="1"/>
- <pt x="589" y="1517" on="1"/>
- <pt x="358" y="1517" on="1"/>
- <pt x="358" y="-234" on="1"/>
- <pt x="589" y="-234" on="1"/>
- <pt x="589" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 4 3 14 1 1 6 5 14 1 0 2 4 48 84 2 1 1 7 0 1 2 0 14
- 7 6 3 2 4 13 4 0 0 5 4 13 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketright" xMin="93" yMin="-296" xMax="497" yMax="1579">
- <contour>
- <pt x="93" y="-296" on="1"/>
- <pt x="93" y="-234" on="1"/>
- <pt x="325" y="-234" on="1"/>
- <pt x="325" y="1517" on="1"/>
- <pt x="93" y="1517" on="1"/>
- <pt x="93" y="1579" on="1"/>
- <pt x="497" y="1579" on="1"/>
- <pt x="497" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 4 3 14 1 5 2 1 14 1 0 2 4 48 84 6 5 1 7 0 1 2 0 14
- 5 4 1 0 4 13 2 0 0 3 2 13 1 6 1 4 48 196 7 6 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="breve" xMin="8" yMin="1283" xMax="674" yMax="1604">
- <contour>
- <pt x="8" y="1604" on="1"/>
- <pt x="73" y="1604" on="1"/>
- <pt x="100" y="1514" on="0"/>
- <pt x="160" y="1472" on="1"/>
- <pt x="228" y="1425" on="0"/>
- <pt x="341" y="1425" on="1"/>
- <pt x="467" y="1425" on="0"/>
- <pt x="537" y="1484" on="1"/>
- <pt x="586" y="1524" on="0"/>
- <pt x="610" y="1604" on="1"/>
- <pt x="674" y="1604" on="1"/>
- <pt x="655" y="1469" on="0"/>
- <pt x="583" y="1388" on="1"/>
- <pt x="489" y="1283" on="0"/>
- <pt x="341" y="1283" on="1"/>
- <pt x="187" y="1283" on="0"/>
- <pt x="92" y="1398" on="1"/>
- <pt x="27" y="1476" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 0 0 5 20 14 48 84 14 10 9 1 0 14 10 9 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="brokenbar" xMin="156" yMin="-296" xMax="255" yMax="1579">
- <contour>
- <pt x="156" y="-296" on="1"/>
- <pt x="156" y="444" on="1"/>
- <pt x="255" y="444" on="1"/>
- <pt x="255" y="-296" on="1"/>
- </contour>
- <contour>
- <pt x="156" y="839" on="1"/>
- <pt x="156" y="1579" on="1"/>
- <pt x="255" y="1579" on="1"/>
- <pt x="255" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 28 values pushed */
- 7 6 5 4 3 2 1 0 14 0 0 7 6 3 2 9 3 0 1 4 48 196 5 4 1
- 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bullet" xMin="81" yMin="555" xMax="636" yMax="1110">
- <contour>
- <pt x="359" y="1110" on="1"/>
- <pt x="474" y="1110" on="0"/>
- <pt x="555" y="1028" on="1"/>
- <pt x="636" y="946" on="0"/>
- <pt x="636" y="831" on="1"/>
- <pt x="636" y="717" on="0"/>
- <pt x="554" y="636" on="1"/>
- <pt x="472" y="555" on="0"/>
- <pt x="354" y="555" on="1"/>
- <pt x="255" y="555" on="0"/>
- <pt x="179" y="621" on="1"/>
- <pt x="81" y="707" on="0"/>
- <pt x="81" y="833" on="1"/>
- <pt x="81" y="948" on="0"/>
- <pt x="163" y="1029" on="1"/>
- <pt x="244" y="1110" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 15 values pushed */
- 0 0 0 8 48 84 8 14 0 0 4 12 48 196 12
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="c" xMin="68" yMin="-25" xMax="848" yMax="1110">
- <contour>
- <pt x="848" y="37" on="1"/>
- <pt x="696" y="-25" on="0"/>
- <pt x="568" y="-25" on="1"/>
- <pt x="350" y="-25" on="0"/>
- <pt x="209" y="137" on="1"/>
- <pt x="68" y="298" on="0"/>
- <pt x="68" y="550" on="1"/>
- <pt x="68" y="800" on="0"/>
- <pt x="202" y="955" on="1"/>
- <pt x="336" y="1110" on="0"/>
- <pt x="557" y="1110" on="1"/>
- <pt x="689" y="1110" on="0"/>
- <pt x="848" y="1061" on="1"/>
- <pt x="848" y="802" on="1"/>
- <pt x="724" y="802" on="1"/>
- <pt x="724" y="820" on="1"/>
- <pt x="724" y="1043" on="0"/>
- <pt x="557" y="1043" on="1"/>
- <pt x="434" y="1043" on="0"/>
- <pt x="359" y="914" on="1"/>
- <pt x="284" y="786" on="0"/>
- <pt x="284" y="577" on="1"/>
- <pt x="284" y="339" on="0"/>
- <pt x="377" y="206" on="1"/>
- <pt x="470" y="73" on="0"/>
- <pt x="632" y="73" on="1"/>
- <pt x="710" y="73" on="0"/>
- <pt x="848" y="123" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 25 9 2 17 17 10 48 84 10 1 2 2 1 1 27 15 14 13 12 0 6 1 2
- 3 0 0 14 0 0 21 10 6 48 196 15 14 6 0 27 13 12 0 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cacute" xMin="68" yMin="-25" xMax="907" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="316" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="caron" xMin="-10" yMin="1283" xMax="693" yMax="1604">
- <contour>
- <pt x="693" y="1604" on="1"/>
- <pt x="453" y="1283" on="1"/>
- <pt x="231" y="1283" on="1"/>
- <pt x="-10" y="1604" on="1"/>
- <pt x="76" y="1604" on="1"/>
- <pt x="342" y="1382" on="1"/>
- <pt x="607" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 6 5 4 3 0 5 13 1 2 1 1 0 14 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ccaron" xMin="68" yMin="-25" xMax="909" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="216" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccedilla" xMin="68" yMin="-432" xMax="848" yMax="1110">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="198" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccircumflex" xMin="68" yMin="-25" xMax="909" yMax="1604">
- <contour>
- <pt x="848" y="37" on="1"/>
- <pt x="696" y="-25" on="0"/>
- <pt x="568" y="-25" on="1"/>
- <pt x="350" y="-25" on="0"/>
- <pt x="209" y="137" on="1"/>
- <pt x="68" y="298" on="0"/>
- <pt x="68" y="550" on="1"/>
- <pt x="68" y="800" on="0"/>
- <pt x="202" y="955" on="1"/>
- <pt x="336" y="1110" on="0"/>
- <pt x="557" y="1110" on="1"/>
- <pt x="689" y="1110" on="0"/>
- <pt x="848" y="1061" on="1"/>
- <pt x="848" y="802" on="1"/>
- <pt x="724" y="802" on="1"/>
- <pt x="724" y="820" on="1"/>
- <pt x="724" y="1043" on="0"/>
- <pt x="557" y="1043" on="1"/>
- <pt x="434" y="1043" on="0"/>
- <pt x="359" y="914" on="1"/>
- <pt x="284" y="786" on="0"/>
- <pt x="284" y="577" on="1"/>
- <pt x="284" y="339" on="0"/>
- <pt x="377" y="206" on="1"/>
- <pt x="470" y="73" on="0"/>
- <pt x="632" y="73" on="1"/>
- <pt x="710" y="73" on="0"/>
- <pt x="848" y="123" on="1"/>
- </contour>
- <contour>
- <pt x="206" y="1283" on="1"/>
- <pt x="447" y="1604" on="1"/>
- <pt x="669" y="1604" on="1"/>
- <pt x="909" y="1283" on="1"/>
- <pt x="823" y="1283" on="1"/>
- <pt x="558" y="1505" on="1"/>
- <pt x="292" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 25 9 2 17 17 10 48 84 10 1 2 2 1 33 29 0 2 0 1 1 34 32 31
- 28 4 0 1 3 0 0 1 1 27 15 14 13 12 0 6 1 2 3 0 0 30 29 1 0
- 14 0 0 21 10 6 48 196 31 0 34 33 32 30 29 28 15 14 8 13 6 0 27 13 12
- 0 3 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cdotaccent" xMin="68" yMin="-25" xMax="848" yMax="1480">
- <contour>
- <pt x="848" y="37" on="1"/>
- <pt x="696" y="-25" on="0"/>
- <pt x="568" y="-25" on="1"/>
- <pt x="350" y="-25" on="0"/>
- <pt x="209" y="137" on="1"/>
- <pt x="68" y="298" on="0"/>
- <pt x="68" y="550" on="1"/>
- <pt x="68" y="800" on="0"/>
- <pt x="202" y="955" on="1"/>
- <pt x="336" y="1110" on="0"/>
- <pt x="557" y="1110" on="1"/>
- <pt x="689" y="1110" on="0"/>
- <pt x="848" y="1061" on="1"/>
- <pt x="848" y="802" on="1"/>
- <pt x="724" y="802" on="1"/>
- <pt x="724" y="820" on="1"/>
- <pt x="724" y="1043" on="0"/>
- <pt x="557" y="1043" on="1"/>
- <pt x="434" y="1043" on="0"/>
- <pt x="359" y="914" on="1"/>
- <pt x="284" y="786" on="0"/>
- <pt x="284" y="577" on="1"/>
- <pt x="284" y="339" on="0"/>
- <pt x="377" y="206" on="1"/>
- <pt x="470" y="73" on="0"/>
- <pt x="632" y="73" on="1"/>
- <pt x="710" y="73" on="0"/>
- <pt x="848" y="123" on="1"/>
- </contour>
- <contour>
- <pt x="463" y="1283" on="1"/>
- <pt x="463" y="1480" on="1"/>
- <pt x="660" y="1480" on="1"/>
- <pt x="660" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 25 9 2 17 17 10 48 84 10 1 2 2 1 1 27 15 14 13 12 0 6 1 2
- 3 0 0 0 0 31 28 5 1 29 1 4 48 84 30 29 0 14 0 0 21 10 6 48 196
- 15 14 2 0 30 3 6 28 0 0 29 28 4 1 30 1 4 48 196 31 30 1 27 13 12
- 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cedilla" xMin="168" yMin="-432" xMax="514" yMax="0">
- <contour>
- <pt x="168" y="-411" on="1"/>
- <pt x="168" y="-343" on="1"/>
- <pt x="230" y="-359" on="0"/>
- <pt x="269" y="-359" on="1"/>
- <pt x="376" y="-359" on="0"/>
- <pt x="376" y="-277" on="1"/>
- <pt x="376" y="-179" on="0"/>
- <pt x="189" y="-175" on="1"/>
- <pt x="284" y="0" on="1"/>
- <pt x="363" y="0" on="1"/>
- <pt x="297" y="-119" on="1"/>
- <pt x="394" y="-127" on="0"/>
- <pt x="441" y="-152" on="1"/>
- <pt x="514" y="-189" on="0"/>
- <pt x="514" y="-266" on="1"/>
- <pt x="514" y="-336" on="0"/>
- <pt x="456" y="-384" on="1"/>
- <pt x="399" y="-432" on="0"/>
- <pt x="312" y="-432" on="1"/>
- <pt x="244" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 3 17 18 48 84 18 10 9 8 7 1 0 14 0 0 5 48 14 48 196 14 10 9
- 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cent" xMin="123" yMin="0" xMax="962" yMax="1480">
- <contour>
- <pt x="598" y="0" on="1"/>
- <pt x="598" y="176" on="1"/>
- <pt x="402" y="198" on="0"/>
- <pt x="282" y="322" on="1"/>
- <pt x="123" y="484" on="0"/>
- <pt x="123" y="751" on="1"/>
- <pt x="123" y="1011" on="0"/>
- <pt x="260" y="1154" on="1"/>
- <pt x="340" y="1238" on="0"/>
- <pt x="455" y="1276" on="1"/>
- <pt x="503" y="1292" on="0"/>
- <pt x="598" y="1308" on="1"/>
- <pt x="598" y="1480" on="1"/>
- <pt x="660" y="1480" on="1"/>
- <pt x="660" y="1313" on="1"/>
- <pt x="820" y="1299" on="0"/>
- <pt x="962" y="1252" on="1"/>
- <pt x="962" y="999" on="1"/>
- <pt x="851" y="999" on="1"/>
- <pt x="850" y="1018" on="1"/>
- <pt x="848" y="1043" on="1"/>
- <pt x="848" y="1053" on="0"/>
- <pt x="847" y="1063" on="1"/>
- <pt x="846" y="1074" on="1"/>
- <pt x="846" y="1083" on="0"/>
- <pt x="846" y="1091" on="1"/>
- <pt x="844" y="1169" on="0"/>
- <pt x="806" y="1201" on="1"/>
- <pt x="766" y="1234" on="0"/>
- <pt x="660" y="1242" on="1"/>
- <pt x="660" y="273" on="1"/>
- <pt x="692" y="270" on="0"/>
- <pt x="709" y="270" on="1"/>
- <pt x="800" y="270" on="0"/>
- <pt x="962" y="331" on="1"/>
- <pt x="962" y="234" on="1"/>
- <pt x="825" y="181" on="0"/>
- <pt x="660" y="171" on="1"/>
- <pt x="660" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="598" y="280" on="1"/>
- <pt x="598" y="1243" on="1"/>
- <pt x="535" y="1225" on="0"/>
- <pt x="504" y="1205" on="1"/>
- <pt x="333" y="1093" on="0"/>
- <pt x="333" y="733" on="1"/>
- <pt x="333" y="497" on="0"/>
- <pt x="429" y="382" on="1"/>
- <pt x="471" y="332" on="0"/>
- <pt x="523" y="307" on="1"/>
- <pt x="548" y="295" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 61 values pushed */
- 40 39 38 37 35 34 32 30 29 18 17 16 14 13 12 11 1 0 14 0 0 44 10 5 48
- 196 18 16 13 2 5 0 0 0 40 39 12 11 1 0 11 5 13 1 4 48 196 35 34 17
- 16 3 38 37 30 29 14 13 5 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="circumflex" xMin="-10" yMin="1283" xMax="693" yMax="1604">
- <contour>
- <pt x="-10" y="1283" on="1"/>
- <pt x="231" y="1604" on="1"/>
- <pt x="453" y="1604" on="1"/>
- <pt x="693" y="1283" on="1"/>
- <pt x="607" y="1283" on="1"/>
- <pt x="342" y="1505" on="1"/>
- <pt x="76" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 1 5 1 0 2 0 1 6 4 3 0 4 13 0 0 2 1 1 0 14 6 5 4 3 2
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="colon" xMin="161" yMin="0" xMax="408" yMax="1086">
- <contour>
- <pt x="161" y="0" on="1"/>
- <pt x="161" y="247" on="1"/>
- <pt x="408" y="247" on="1"/>
- <pt x="408" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="161" y="839" on="1"/>
- <pt x="161" y="1086" on="1"/>
- <pt x="408" y="1086" on="1"/>
- <pt x="408" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 7 4 6 1 5 2 1 6 1 0 2 4 48 84 3 0 1 0 6 5 1 14 0
- 0 7 6 3 2 6 3 0 1 4 48 196 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="comma" xMin="133" yMin="-321" xMax="380" yMax="247">
- <contour>
- <pt x="232" y="0" on="1"/>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="247" on="1"/>
- <pt x="380" y="247" on="1"/>
- <pt x="380" y="32" on="1"/>
- <pt x="380" y="-107" on="0"/>
- <pt x="363" y="-151" on="1"/>
- <pt x="341" y="-216" on="0"/>
- <pt x="270" y="-270" on="1"/>
- <pt x="210" y="-317" on="0"/>
- <pt x="133" y="-321" on="1"/>
- <pt x="133" y="-259" on="1"/>
- <pt x="232" y="-251" on="0"/>
- <pt x="232" y="-65" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 13 11 10 4 1 0 6 13 2 3 2 1 0 14 13 0 2 3 1 3 0 0 4 3 6
- 1 1 1 4 48 196 11 10 2 1 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="copyright" xMin="87" yMin="49" xMax="1469" yMax="1431">
- <contour>
- <pt x="779" y="1431" on="1"/>
- <pt x="1063" y="1431" on="0"/>
- <pt x="1266" y="1229" on="1"/>
- <pt x="1469" y="1027" on="0"/>
- <pt x="1469" y="741" on="1"/>
- <pt x="1469" y="452" on="0"/>
- <pt x="1265" y="251" on="1"/>
- <pt x="1062" y="49" on="0"/>
- <pt x="770" y="49" on="1"/>
- <pt x="519" y="49" on="0"/>
- <pt x="331" y="213" on="1"/>
- <pt x="87" y="426" on="0"/>
- <pt x="87" y="740" on="1"/>
- <pt x="87" y="1027" on="0"/>
- <pt x="290" y="1229" on="1"/>
- <pt x="493" y="1431" on="0"/>
- </contour>
- <contour>
- <pt x="778" y="1369" on="1"/>
- <pt x="518" y="1369" on="0"/>
- <pt x="334" y="1185" on="1"/>
- <pt x="149" y="1001" on="0"/>
- <pt x="149" y="740" on="1"/>
- <pt x="149" y="483" on="0"/>
- <pt x="333" y="297" on="1"/>
- <pt x="516" y="111" on="0"/>
- <pt x="773" y="111" on="1"/>
- <pt x="1010" y="111" on="0"/>
- <pt x="1184" y="259" on="1"/>
- <pt x="1407" y="450" on="0"/>
- <pt x="1407" y="742" on="1"/>
- <pt x="1407" y="1002" on="0"/>
- <pt x="1222" y="1185" on="1"/>
- <pt x="1037" y="1369" on="0"/>
- </contour>
- <contour>
- <pt x="1071" y="364" on="1"/>
- <pt x="939" y="313" on="0"/>
- <pt x="800" y="313" on="1"/>
- <pt x="594" y="313" on="0"/>
- <pt x="480" y="426" on="1"/>
- <pt x="365" y="539" on="0"/>
- <pt x="365" y="741" on="1"/>
- <pt x="365" y="944" on="0"/>
- <pt x="477" y="1056" on="1"/>
- <pt x="589" y="1168" on="0"/>
- <pt x="796" y="1168" on="1"/>
- <pt x="916" y="1168" on="0"/>
- <pt x="1057" y="1132" on="1"/>
- <pt x="1057" y="964" on="1"/>
- <pt x="975" y="964" on="1"/>
- <pt x="975" y="974" on="1"/>
- <pt x="975" y="1049" on="0"/>
- <pt x="934" y="1081" on="1"/>
- <pt x="893" y="1113" on="0"/>
- <pt x="799" y="1113" on="1"/>
- <pt x="545" y="1113" on="0"/>
- <pt x="545" y="745" on="1"/>
- <pt x="545" y="381" on="0"/>
- <pt x="834" y="381" on="1"/>
- <pt x="936" y="381" on="0"/>
- <pt x="1071" y="442" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 55 17 34 51 25 42 24 11 8 16 11 0 48 84 8 2 0 0 42 34 1 1 57
- 47 46 45 44 42 34 32 8 0 2 3 0 0 14 0 0 53 16 38 28 11 4 20 11 12
- 48 196 57 32 2 13 4 44 47 46 38 12 44 45 44 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="currency" xMin="130" yMin="414" xMax="893" yMax="1178">
- <contour>
- <pt x="322" y="545" on="1"/>
- <pt x="192" y="414" on="1"/>
- <pt x="130" y="476" on="1"/>
- <pt x="261" y="607" on="1"/>
- <pt x="197" y="695" on="0"/>
- <pt x="197" y="796" on="1"/>
- <pt x="197" y="898" on="0"/>
- <pt x="261" y="985" on="1"/>
- <pt x="130" y="1116" on="1"/>
- <pt x="192" y="1178" on="1"/>
- <pt x="322" y="1047" on="1"/>
- <pt x="415" y="1110" on="0"/>
- <pt x="512" y="1110" on="1"/>
- <pt x="609" y="1110" on="0"/>
- <pt x="701" y="1047" on="1"/>
- <pt x="832" y="1178" on="1"/>
- <pt x="893" y="1116" on="1"/>
- <pt x="762" y="985" on="1"/>
- <pt x="826" y="897" on="0"/>
- <pt x="826" y="796" on="1"/>
- <pt x="826" y="695" on="0"/>
- <pt x="762" y="607" on="1"/>
- <pt x="893" y="476" on="1"/>
- <pt x="832" y="414" on="1"/>
- <pt x="701" y="545" on="1"/>
- <pt x="610" y="482" on="0"/>
- <pt x="512" y="482" on="1"/>
- <pt x="415" y="482" on="0"/>
- </contour>
- <contour>
- <pt x="512" y="1012" on="1"/>
- <pt x="422" y="1012" on="0"/>
- <pt x="359" y="950" on="1"/>
- <pt x="296" y="887" on="0"/>
- <pt x="296" y="799" on="1"/>
- <pt x="296" y="716" on="0"/>
- <pt x="346" y="656" on="1"/>
- <pt x="410" y="580" on="0"/>
- <pt x="512" y="580" on="1"/>
- <pt x="603" y="580" on="0"/>
- <pt x="665" y="643" on="1"/>
- <pt x="727" y="705" on="0"/>
- <pt x="727" y="796" on="1"/>
- <pt x="727" y="887" on="0"/>
- <pt x="664" y="949" on="1"/>
- <pt x="601" y="1012" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 36 9 26 28 9 12 48 84 12 1 1 16 15 9 8 4 13 1 0 1 24 23 22
- 21 17 14 10 7 3 2 1 0 12 13 26 1 0 14 0 0 40 9 19 32 9 5 48 196
- 24 23 22 21 19 17 16 15 14 10 9 8 7 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="d" xMin="68" yMin="-25" xMax="1024" yMax="1579">
- <contour>
- <pt x="706" y="0" on="1"/>
- <pt x="706" y="179" on="1"/>
- <pt x="648" y="87" on="0"/>
- <pt x="592" y="41" on="1"/>
- <pt x="512" y="-25" on="0"/>
- <pt x="414" y="-25" on="1"/>
- <pt x="254" y="-25" on="0"/>
- <pt x="161" y="118" on="1"/>
- <pt x="68" y="260" on="0"/>
- <pt x="68" y="510" on="1"/>
- <pt x="68" y="793" on="0"/>
- <pt x="189" y="951" on="1"/>
- <pt x="310" y="1110" on="0"/>
- <pt x="523" y="1110" on="1"/>
- <pt x="597" y="1110" on="0"/>
- <pt x="706" y="1086" on="1"/>
- <pt x="706" y="1320" on="1"/>
- <pt x="704" y="1419" on="1"/>
- <pt x="703" y="1488" on="0"/>
- <pt x="679" y="1501" on="1"/>
- <pt x="657" y="1513" on="0"/>
- <pt x="604" y="1516" on="1"/>
- <pt x="585" y="1517" on="1"/>
- <pt x="585" y="1579" on="1"/>
- <pt x="903" y="1579" on="1"/>
- <pt x="903" y="259" on="1"/>
- <pt x="905" y="160" on="1"/>
- <pt x="905" y="92" on="0"/>
- <pt x="930" y="78" on="1"/>
- <pt x="953" y="66" on="0"/>
- <pt x="1006" y="63" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="706" y="1008" on="1"/>
- <pt x="626" y="1032" on="0"/>
- <pt x="576" y="1032" on="1"/>
- <pt x="439" y="1032" on="0"/>
- <pt x="360" y="905" on="1"/>
- <pt x="281" y="778" on="0"/>
- <pt x="281" y="550" on="1"/>
- <pt x="281" y="103" on="0"/>
- <pt x="482" y="103" on="1"/>
- <pt x="576" y="103" on="0"/>
- <pt x="706" y="248" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 41 29 5 35 21 13 48 84 13 1 5 2 1 22 16 2 23 1 3 0 1 43 33
- 31 25 15 1 6 1 0 3 0 24 23 1 32 0 1 2 0 14 0 0 39 10 9 48 196
- 32 31 2 13 24 23 22 9 0 0 0 43 33 16 15 1 0 4 5 24 1 4 48 196 25
- 24 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dagger" xMin="80" yMin="-296" xMax="944" yMax="1480">
- <contour>
- <pt x="413" y="-296" on="1"/>
- <pt x="462" y="857" on="1"/>
- <pt x="80" y="814" on="1"/>
- <pt x="80" y="962" on="1"/>
- <pt x="462" y="919" on="1"/>
- <pt x="413" y="1480" on="1"/>
- <pt x="610" y="1480" on="1"/>
- <pt x="561" y="919" on="1"/>
- <pt x="944" y="962" on="1"/>
- <pt x="944" y="814" on="1"/>
- <pt x="561" y="857" on="1"/>
- <pt x="610" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 42 values pushed */
- 1 10 9 8 7 4 3 2 1 8 5 2 3 0 11 0 1 0 6 5 0 14 11 10 7
- 6 5 4 1 0 8 8 2 3 9 8 1 3 2 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="daggerdbl" xMin="80" yMin="-296" xMax="944" yMax="1480">
- <contour>
- <pt x="413" y="-296" on="1"/>
- <pt x="462" y="265" on="1"/>
- <pt x="80" y="222" on="1"/>
- <pt x="80" y="370" on="1"/>
- <pt x="462" y="327" on="1"/>
- <pt x="462" y="857" on="1"/>
- <pt x="80" y="814" on="1"/>
- <pt x="80" y="962" on="1"/>
- <pt x="462" y="919" on="1"/>
- <pt x="413" y="1480" on="1"/>
- <pt x="610" y="1480" on="1"/>
- <pt x="561" y="919" on="1"/>
- <pt x="944" y="962" on="1"/>
- <pt x="944" y="814" on="1"/>
- <pt x="561" y="857" on="1"/>
- <pt x="561" y="327" on="1"/>
- <pt x="944" y="370" on="1"/>
- <pt x="944" y="222" on="1"/>
- <pt x="561" y="265" on="1"/>
- <pt x="610" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 1 18 17 16 15 14 13 12 11 8 7 6 5 4 3 2 1 16 9 2 3 0 19 0 1
- 0 10 9 0 14 19 10 2 12 11 3 9 0 2 1 2 3 0 0 18 15 14 11 9 3
- 1 1 4 48 196 17 16 13 12 3 8 5 4 1 3 7 6 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcaron" xMin="68" yMin="-25" xMax="1298" yMax="1579">
- <contour>
- <pt x="706" y="179" on="1"/>
- <pt x="648" y="87" on="0"/>
- <pt x="592" y="41" on="1"/>
- <pt x="512" y="-25" on="0"/>
- <pt x="414" y="-25" on="1"/>
- <pt x="254" y="-25" on="0"/>
- <pt x="161" y="118" on="1"/>
- <pt x="68" y="260" on="0"/>
- <pt x="68" y="510" on="1"/>
- <pt x="68" y="793" on="0"/>
- <pt x="189" y="951" on="1"/>
- <pt x="310" y="1110" on="0"/>
- <pt x="523" y="1110" on="1"/>
- <pt x="597" y="1110" on="0"/>
- <pt x="706" y="1086" on="1"/>
- <pt x="706" y="1320" on="1"/>
- <pt x="704" y="1419" on="1"/>
- <pt x="703" y="1488" on="0"/>
- <pt x="679" y="1501" on="1"/>
- <pt x="657" y="1513" on="0"/>
- <pt x="604" y="1516" on="1"/>
- <pt x="585" y="1517" on="1"/>
- <pt x="585" y="1579" on="1"/>
- <pt x="903" y="1579" on="1"/>
- <pt x="903" y="259" on="1"/>
- <pt x="905" y="160" on="1"/>
- <pt x="905" y="92" on="0"/>
- <pt x="930" y="78" on="1"/>
- <pt x="953" y="66" on="0"/>
- <pt x="1006" y="63" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- <pt x="706" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="706" y="1008" on="1"/>
- <pt x="626" y="1032" on="0"/>
- <pt x="576" y="1032" on="1"/>
- <pt x="439" y="1032" on="0"/>
- <pt x="360" y="905" on="1"/>
- <pt x="281" y="778" on="0"/>
- <pt x="281" y="550" on="1"/>
- <pt x="281" y="103" on="0"/>
- <pt x="482" y="103" on="1"/>
- <pt x="576" y="103" on="0"/>
- <pt x="706" y="248" on="1"/>
- </contour>
- <contour>
- <pt x="1180" y="1382" on="1"/>
- <pt x="1101" y="1382" on="1"/>
- <pt x="1101" y="1579" on="1"/>
- <pt x="1298" y="1579" on="1"/>
- <pt x="1298" y="1408" on="1"/>
- <pt x="1298" y="1245" on="0"/>
- <pt x="1236" y="1180" on="1"/>
- <pt x="1188" y="1131" on="0"/>
- <pt x="1101" y="1125" on="1"/>
- <pt x="1101" y="1175" on="1"/>
- <pt x="1180" y="1181" on="0"/>
- <pt x="1180" y="1330" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 104 values pushed */
- 0 0 41 29 4 35 21 12 48 84 12 1 4 2 1 55 53 52 48 45 44 21 15 8 22
- 1 3 0 1 43 33 30 24 14 0 6 1 31 3 0 47 46 23 22 3 32 31 1 2 0
- 14 0 0 39 10 8 48 196 55 44 2 47 45 3 31 30 2 45 23 3 22 21 8 0 0
- 0 53 52 46 45 4 3 47 43 33 32 15 14 0 4 5 23 2 4 48 196 48 47 1 24
- 23 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcroat" xMin="68" yMin="-25" xMax="1024" yMax="1579">
- <contour>
- <pt x="706" y="0" on="1"/>
- <pt x="706" y="179" on="1"/>
- <pt x="648" y="87" on="0"/>
- <pt x="592" y="41" on="1"/>
- <pt x="512" y="-25" on="0"/>
- <pt x="414" y="-25" on="1"/>
- <pt x="254" y="-25" on="0"/>
- <pt x="161" y="118" on="1"/>
- <pt x="68" y="260" on="0"/>
- <pt x="68" y="510" on="1"/>
- <pt x="68" y="793" on="0"/>
- <pt x="189" y="951" on="1"/>
- <pt x="310" y="1110" on="0"/>
- <pt x="523" y="1110" on="1"/>
- <pt x="597" y="1110" on="0"/>
- <pt x="706" y="1086" on="1"/>
- <pt x="706" y="1246" on="1"/>
- <pt x="410" y="1246" on="1"/>
- <pt x="410" y="1308" on="1"/>
- <pt x="706" y="1308" on="1"/>
- <pt x="706" y="1320" on="1"/>
- <pt x="704" y="1419" on="1"/>
- <pt x="703" y="1488" on="0"/>
- <pt x="679" y="1501" on="1"/>
- <pt x="657" y="1513" on="0"/>
- <pt x="604" y="1516" on="1"/>
- <pt x="585" y="1517" on="1"/>
- <pt x="585" y="1579" on="1"/>
- <pt x="903" y="1579" on="1"/>
- <pt x="903" y="1308" on="1"/>
- <pt x="1024" y="1308" on="1"/>
- <pt x="1024" y="1246" on="1"/>
- <pt x="903" y="1246" on="1"/>
- <pt x="903" y="259" on="1"/>
- <pt x="905" y="160" on="1"/>
- <pt x="905" y="92" on="0"/>
- <pt x="930" y="78" on="1"/>
- <pt x="953" y="66" on="0"/>
- <pt x="1006" y="63" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="706" y="1008" on="1"/>
- <pt x="626" y="1032" on="0"/>
- <pt x="576" y="1032" on="1"/>
- <pt x="439" y="1032" on="0"/>
- <pt x="360" y="905" on="1"/>
- <pt x="281" y="778" on="0"/>
- <pt x="281" y="550" on="1"/>
- <pt x="281" y="103" on="0"/>
- <pt x="482" y="103" on="1"/>
- <pt x="576" y="103" on="0"/>
- <pt x="706" y="248" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 104 values pushed */
- 0 0 49 29 5 43 21 13 48 84 13 1 5 2 26 20 2 27 18 3 1 51 41 39 33
- 15 1 6 1 0 3 0 0 0 32 31 17 16 14 3 18 1 4 48 84 28 27 1 30 29
- 19 18 3 40 0 1 3 0 14 0 0 47 10 9 48 196 40 39 31 30 4 13 28 27 26
- 18 17 4 13 9 0 0 0 51 41 20 19 16 15 1 0 4 7 28 1 4 48 196 33 32
- 29 28 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="degree" xMin="114" yMin="925" xMax="706" yMax="1517">
- <contour>
- <pt x="410" y="1517" on="1"/>
- <pt x="531" y="1517" on="0"/>
- <pt x="619" y="1430" on="1"/>
- <pt x="706" y="1344" on="0"/>
- <pt x="706" y="1222" on="1"/>
- <pt x="706" y="1098" on="0"/>
- <pt x="619" y="1012" on="1"/>
- <pt x="531" y="925" on="0"/>
- <pt x="406" y="925" on="1"/>
- <pt x="300" y="925" on="0"/>
- <pt x="219" y="995" on="1"/>
- <pt x="114" y="1087" on="0"/>
- <pt x="114" y="1221" on="1"/>
- <pt x="114" y="1344" on="0"/>
- <pt x="201" y="1430" on="1"/>
- <pt x="289" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="410" y="1431" on="1"/>
- <pt x="323" y="1431" on="0"/>
- <pt x="262" y="1370" on="1"/>
- <pt x="200" y="1308" on="0"/>
- <pt x="200" y="1221" on="1"/>
- <pt x="200" y="1136" on="0"/>
- <pt x="262" y="1074" on="1"/>
- <pt x="323" y="1012" on="0"/>
- <pt x="409" y="1012" on="1"/>
- <pt x="488" y="1012" on="0"/>
- <pt x="546" y="1062" on="1"/>
- <pt x="620" y="1125" on="0"/>
- <pt x="620" y="1222" on="1"/>
- <pt x="620" y="1309" on="0"/>
- <pt x="558" y="1370" on="1"/>
- <pt x="496" y="1431" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 28 values pushed */
- 0 0 24 8 16 7 0 48 84 0 0 1 8 0 0 14 0 0 28 8 4 20 8 12 48
- 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dieresis" xMin="57" yMin="1283" xMax="625" yMax="1456">
- <contour>
- <pt x="57" y="1283" on="1"/>
- <pt x="57" y="1456" on="1"/>
- <pt x="230" y="1456" on="1"/>
- <pt x="230" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="452" y="1283" on="1"/>
- <pt x="452" y="1456" on="1"/>
- <pt x="625" y="1456" on="1"/>
- <pt x="625" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 7 4 3 0 13 3 1 1 4 48 84 6 5 2 1 3 0 14 0 0 5 4 13
- 1 6 3 2 13 1 0 2 4 48 196 7 6 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="divide" xMin="84" yMin="99" xMax="1071" yMax="1086">
- <contour>
- <pt x="479" y="99" on="1"/>
- <pt x="479" y="296" on="1"/>
- <pt x="676" y="296" on="1"/>
- <pt x="676" y="99" on="1"/>
- </contour>
- <contour>
- <pt x="84" y="543" on="1"/>
- <pt x="84" y="642" on="1"/>
- <pt x="1071" y="642" on="1"/>
- <pt x="1071" y="543" on="1"/>
- </contour>
- <contour>
- <pt x="479" y="888" on="1"/>
- <pt x="479" y="1086" on="1"/>
- <pt x="676" y="1086" on="1"/>
- <pt x="676" y="888" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 11 8 5 1 9 7 4 9 1 5 2 1 5 1 0 3 4 48 84 6 5 1 3
- 0 1 2 0 10 9 1 14 7 6 2 13 2 5 4 0 0 0 11 10 3 2 4 3 0
- 1 4 48 196 9 8 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dollar" xMin="80" yMin="-123" xMax="931" yMax="1604">
- <contour>
- <pt x="495" y="-123" on="1"/>
- <pt x="495" y="0" on="1"/>
- <pt x="283" y="0" on="0"/>
- <pt x="80" y="86" on="1"/>
- <pt x="80" y="333" on="1"/>
- <pt x="191" y="333" on="1"/>
- <pt x="192" y="315" on="1"/>
- <pt x="194" y="279" on="0"/>
- <pt x="195" y="253" on="1"/>
- <pt x="195" y="247" on="1"/>
- <pt x="195" y="166" on="0"/>
- <pt x="267" y="116" on="1"/>
- <pt x="340" y="65" on="0"/>
- <pt x="456" y="65" on="1"/>
- <pt x="495" y="66" on="1"/>
- <pt x="495" y="673" on="1"/>
- <pt x="303" y="785" on="0"/>
- <pt x="224" y="875" on="1"/>
- <pt x="129" y="981" on="0"/>
- <pt x="129" y="1130" on="1"/>
- <pt x="129" y="1271" on="0"/>
- <pt x="213" y="1360" on="1"/>
- <pt x="275" y="1425" on="0"/>
- <pt x="379" y="1460" on="1"/>
- <pt x="417" y="1472" on="0"/>
- <pt x="495" y="1487" on="1"/>
- <pt x="495" y="1604" on="1"/>
- <pt x="556" y="1604" on="1"/>
- <pt x="557" y="1485" on="1"/>
- <pt x="728" y="1477" on="0"/>
- <pt x="913" y="1408" on="1"/>
- <pt x="913" y="1178" on="1"/>
- <pt x="802" y="1178" on="1"/>
- <pt x="801" y="1197" on="1"/>
- <pt x="799" y="1220" on="1"/>
- <pt x="799" y="1225" on="0"/>
- <pt x="798" y="1238" on="1"/>
- <pt x="797" y="1253" on="0"/>
- <pt x="797" y="1258" on="1"/>
- <pt x="797" y="1262" on="1"/>
- <pt x="797" y="1326" on="0"/>
- <pt x="748" y="1366" on="1"/>
- <pt x="687" y="1417" on="0"/>
- <pt x="576" y="1417" on="1"/>
- <pt x="557" y="1417" on="1"/>
- <pt x="557" y="837" on="1"/>
- <pt x="581" y="822" on="1"/>
- <pt x="610" y="803" on="1"/>
- <pt x="632" y="789" on="1"/>
- <pt x="662" y="770" on="1"/>
- <pt x="826" y="665" on="0"/>
- <pt x="874" y="603" on="1"/>
- <pt x="931" y="530" on="0"/>
- <pt x="931" y="412" on="1"/>
- <pt x="931" y="228" on="0"/>
- <pt x="799" y="110" on="1"/>
- <pt x="709" y="29" on="0"/>
- <pt x="557" y="-3" on="1"/>
- <pt x="557" y="-123" on="1"/>
- </contour>
- <contour>
- <pt x="557" y="78" on="1"/>
- <pt x="648" y="110" on="0"/>
- <pt x="693" y="162" on="1"/>
- <pt x="759" y="237" on="0"/>
- <pt x="759" y="357" on="1"/>
- <pt x="759" y="506" on="0"/>
- <pt x="603" y="607" on="1"/>
- <pt x="557" y="637" on="1"/>
- </contour>
- <contour>
- <pt x="495" y="879" on="1"/>
- <pt x="495" y="1410" on="1"/>
- <pt x="414" y="1397" on="0"/>
- <pt x="365" y="1343" on="1"/>
- <pt x="301" y="1273" on="0"/>
- <pt x="301" y="1167" on="1"/>
- <pt x="301" y="1012" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 68 67 66 59 58 57 45 44 43 39 38 32 31 30 28 27 26 25 15 14 9 8 5 4 3
- 1 0 14 0 0 72 18 19 63 18 53 48 196 43 39 38 32 4 30 28 3 27 28 0 2
- 19 19 9 8 5 4 0 3 3 53 30 0 0 66 59 58 57 45 44 28 11 6 0 1 4
- 48 196 31 30 1 68 67 26 25 15 14 1 0 7 4 3 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotaccent" xMin="242" yMin="1283" xMax="439" yMax="1480">
- <contour>
- <pt x="242" y="1283" on="1"/>
- <pt x="242" y="1480" on="1"/>
- <pt x="439" y="1480" on="1"/>
- <pt x="439" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 3 0 5 1 1 1 4 48 84 2 1 0 14 0 0 3 2 4 1 0 1 4 48
- 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessi" xMin="47" yMin="0" xMax="536" yMax="1086">
- <contour>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="827" on="1"/>
- <pt x="191" y="925" on="1"/>
- <pt x="190" y="999" on="0"/>
- <pt x="169" y="1007" on="1"/>
- <pt x="149" y="1018" on="0"/>
- <pt x="66" y="1023" on="1"/>
- <pt x="47" y="1024" on="1"/>
- <pt x="47" y="1086" on="1"/>
- <pt x="390" y="1086" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 49 values pushed */
- 19 16 13 10 9 6 3 0 8 17 1 3 2 1 1 0 18 17 1 14 1 0 2 13 18
- 17 16 13 6 3 2 6 13 9 0 0 19 18 4 1 9 1 4 48 196 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessj" xMin="-78" yMin="-419" xMax="459" yMax="1086">
- <contour>
- <pt x="-78" y="-380" on="1"/>
- <pt x="-78" y="-136" on="1"/>
- <pt x="21" y="-136" on="1"/>
- <pt x="22" y="-154" on="1"/>
- <pt x="26" y="-272" on="0"/>
- <pt x="47" y="-311" on="1"/>
- <pt x="72" y="-358" on="0"/>
- <pt x="133" y="-358" on="1"/>
- <pt x="262" y="-358" on="0"/>
- <pt x="262" y="-185" on="1"/>
- <pt x="262" y="-82" on="1"/>
- <pt x="262" y="827" on="1"/>
- <pt x="260" y="925" on="1"/>
- <pt x="260" y="993" on="0"/>
- <pt x="235" y="1007" on="1"/>
- <pt x="214" y="1019" on="0"/>
- <pt x="159" y="1023" on="1"/>
- <pt x="141" y="1024" on="1"/>
- <pt x="141" y="1086" on="1"/>
- <pt x="459" y="1086" on="1"/>
- <pt x="459" y="12" on="1"/>
- <pt x="459" y="-419" on="0"/>
- <pt x="127" y="-419" on="1"/>
- <pt x="51" y="-419" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 7 11 22 48 84 1 20 17 11 3 18 2 3 0 1 10 9 2 1 0 5 13 22
- 2 0 19 18 1 14 18 17 2 3 9 0 3 0 0 11 10 9 4 2 19 1 4 48 196
- 20 19 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotmath" xMin="133" yMin="491" xMax="380" yMax="738">
- <contour>
- <pt x="133" y="491" on="1"/>
- <pt x="133" y="738" on="1"/>
- <pt x="380" y="738" on="1"/>
- <pt x="380" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 6 1 1 1 4 48 84 2 1 1 0 14 0 0 3 2 6 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="e" xMin="68" yMin="-25" xMax="848" yMax="1110">
- <contour>
- <pt x="848" y="49" on="1"/>
- <pt x="682" y="-25" on="0"/>
- <pt x="542" y="-25" on="1"/>
- <pt x="322" y="-25" on="0"/>
- <pt x="195" y="124" on="1"/>
- <pt x="68" y="273" on="0"/>
- <pt x="68" y="536" on="1"/>
- <pt x="68" y="796" on="0"/>
- <pt x="185" y="953" on="1"/>
- <pt x="301" y="1110" on="0"/>
- <pt x="496" y="1110" on="1"/>
- <pt x="677" y="1110" on="0"/>
- <pt x="763" y="988" on="1"/>
- <pt x="848" y="866" on="0"/>
- <pt x="848" y="605" on="1"/>
- <pt x="848" y="586" on="1"/>
- <pt x="284" y="586" on="1"/>
- <pt x="287" y="442" on="0"/>
- <pt x="302" y="368" on="1"/>
- <pt x="362" y="75" on="0"/>
- <pt x="600" y="75" on="1"/>
- <pt x="722" y="75" on="0"/>
- <pt x="848" y="150" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="648" on="1"/>
- <pt x="638" y="648" on="1"/>
- <pt x="639" y="692" on="1"/>
- <pt x="643" y="869" on="0"/>
- <pt x="611" y="957" on="1"/>
- <pt x="580" y="1043" on="0"/>
- <pt x="486" y="1043" on="1"/>
- <pt x="382" y="1043" on="0"/>
- <pt x="325" y="901" on="1"/>
- <pt x="286" y="803" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 29 17 10 20 9 2 48 84 10 1 2 2 14 23 15 2 1 22 0 2 15 2 3
- 0 0 0 16 15 14 1 23 1 4 48 84 24 23 1 0 14 24 23 22 16 15 14 6 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eacute" xMin="68" yMin="-25" xMax="848" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="211" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ebreve" xMin="68" yMin="-25" xMax="848" yMax="1604">
- <contour>
- <pt x="848" y="49" on="1"/>
- <pt x="682" y="-25" on="0"/>
- <pt x="542" y="-25" on="1"/>
- <pt x="322" y="-25" on="0"/>
- <pt x="195" y="124" on="1"/>
- <pt x="68" y="273" on="0"/>
- <pt x="68" y="536" on="1"/>
- <pt x="68" y="796" on="0"/>
- <pt x="185" y="953" on="1"/>
- <pt x="301" y="1110" on="0"/>
- <pt x="496" y="1110" on="1"/>
- <pt x="677" y="1110" on="0"/>
- <pt x="763" y="988" on="1"/>
- <pt x="848" y="866" on="0"/>
- <pt x="848" y="605" on="1"/>
- <pt x="848" y="586" on="1"/>
- <pt x="284" y="586" on="1"/>
- <pt x="287" y="442" on="0"/>
- <pt x="302" y="368" on="1"/>
- <pt x="362" y="75" on="0"/>
- <pt x="600" y="75" on="1"/>
- <pt x="722" y="75" on="0"/>
- <pt x="848" y="150" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="648" on="1"/>
- <pt x="638" y="648" on="1"/>
- <pt x="639" y="692" on="1"/>
- <pt x="643" y="869" on="0"/>
- <pt x="611" y="957" on="1"/>
- <pt x="580" y="1043" on="0"/>
- <pt x="486" y="1043" on="1"/>
- <pt x="382" y="1043" on="0"/>
- <pt x="325" y="901" on="1"/>
- <pt x="286" y="803" on="0"/>
- </contour>
- <contour>
- <pt x="160" y="1604" on="1"/>
- <pt x="225" y="1604" on="1"/>
- <pt x="252" y="1514" on="0"/>
- <pt x="312" y="1472" on="1"/>
- <pt x="380" y="1425" on="0"/>
- <pt x="493" y="1425" on="1"/>
- <pt x="619" y="1425" on="0"/>
- <pt x="689" y="1484" on="1"/>
- <pt x="737" y="1523" on="0"/>
- <pt x="762" y="1604" on="1"/>
- <pt x="826" y="1604" on="1"/>
- <pt x="807" y="1469" on="0"/>
- <pt x="735" y="1388" on="1"/>
- <pt x="640" y="1283" on="0"/>
- <pt x="493" y="1283" on="1"/>
- <pt x="340" y="1283" on="0"/>
- <pt x="244" y="1398" on="1"/>
- <pt x="179" y="1475" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 38 20 47 29 17 10 20 9 2 48 84 10 1 2 2 14 23 15 2 1 22 0 2
- 15 2 3 0 1 43 42 34 33 4 13 47 1 0 0 0 16 15 14 1 23 1 4 48 84
- 24 23 1 0 14 43 42 34 33 24 23 22 16 15 14 6 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ecaron" xMin="68" yMin="-25" xMax="848" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="152" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ecircumflex" xMin="68" yMin="-25" xMax="848" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="152" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edieresis" xMin="68" yMin="-25" xMax="848" yMax="1456">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="153" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edotaccent" xMin="68" yMin="-25" xMax="848" yMax="1480">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="153" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="egrave" xMin="68" yMin="-25" xMax="848" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="94" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="eight" xMin="40" yMin="-37" xMax="977" yMax="1518">
- <contour>
- <pt x="342" y="797" on="1"/>
- <pt x="222" y="881" on="0"/>
- <pt x="173" y="949" on="1"/>
- <pt x="114" y="1029" on="0"/>
- <pt x="114" y="1148" on="1"/>
- <pt x="114" y="1317" on="0"/>
- <pt x="223" y="1417" on="1"/>
- <pt x="331" y="1518" on="0"/>
- <pt x="517" y="1518" on="1"/>
- <pt x="698" y="1518" on="0"/>
- <pt x="807" y="1430" on="1"/>
- <pt x="916" y="1342" on="0"/>
- <pt x="916" y="1196" on="1"/>
- <pt x="916" y="1062" on="0"/>
- <pt x="811" y="952" on="1"/>
- <pt x="747" y="886" on="0"/>
- <pt x="627" y="816" on="1"/>
- <pt x="677" y="787" on="1"/>
- <pt x="843" y="691" on="0"/>
- <pt x="911" y="599" on="1"/>
- <pt x="977" y="510" on="0"/>
- <pt x="977" y="383" on="1"/>
- <pt x="977" y="204" on="0"/>
- <pt x="840" y="84" on="1"/>
- <pt x="703" y="-37" on="0"/>
- <pt x="500" y="-37" on="1"/>
- <pt x="301" y="-37" on="0"/>
- <pt x="171" y="76" on="1"/>
- <pt x="40" y="188" on="0"/>
- <pt x="40" y="364" on="1"/>
- <pt x="40" y="541" on="0"/>
- <pt x="152" y="664" on="1"/>
- <pt x="218" y="735" on="0"/>
- </contour>
- <contour>
- <pt x="569" y="850" on="1"/>
- <pt x="743" y="986" on="0"/>
- <pt x="743" y="1187" on="1"/>
- <pt x="743" y="1304" on="0"/>
- <pt x="675" y="1377" on="1"/>
- <pt x="608" y="1450" on="0"/>
- <pt x="505" y="1450" on="1"/>
- <pt x="407" y="1450" on="0"/>
- <pt x="347" y="1386" on="1"/>
- <pt x="286" y="1323" on="0"/>
- <pt x="286" y="1219" on="1"/>
- <pt x="286" y="1107" on="0"/>
- <pt x="344" y="1042" on="1"/>
- <pt x="392" y="988" on="0"/>
- <pt x="510" y="896" on="1"/>
- </contour>
- <contour>
- <pt x="386" y="754" on="1"/>
- <pt x="237" y="607" on="0"/>
- <pt x="237" y="388" on="1"/>
- <pt x="237" y="225" on="0"/>
- <pt x="315" y="128" on="1"/>
- <pt x="392" y="31" on="0"/>
- <pt x="520" y="31" on="1"/>
- <pt x="630" y="31" on="0"/>
- <pt x="705" y="116" on="1"/>
- <pt x="780" y="200" on="0"/>
- <pt x="780" y="321" on="1"/>
- <pt x="780" y="442" on="0"/>
- <pt x="700" y="523" on="1"/>
- <pt x="637" y="588" on="0"/>
- <pt x="501" y="678" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 54 17 25 39 17 8 48 84 25 2 8 0 1 1 48 33 16 0 4 0 2 3 0
- 0 14 0 0 58 5 21 50 5 29 43 18 4 35 18 12 48 196 48 33 29 21 16 12 4
- 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ellipsis" xMin="243" yMin="0" xMax="1806" yMax="197">
- <contour>
- <pt x="243" y="0" on="1"/>
- <pt x="243" y="197" on="1"/>
- <pt x="440" y="197" on="1"/>
- <pt x="440" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="926" y="0" on="1"/>
- <pt x="926" y="197" on="1"/>
- <pt x="1123" y="197" on="1"/>
- <pt x="1123" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1608" y="0" on="1"/>
- <pt x="1608" y="197" on="1"/>
- <pt x="1806" y="197" on="1"/>
- <pt x="1806" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 10 9 6 5 2 1 5 5 0 1 4 48 84 11 8 7 4 3 0 5 0 14 0
- 0 9 8 4 1 10 7 6 4 1 4 3 2 4 1 0 3 4 48 196 11 10 1 5 4
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="emacron" xMin="68" yMin="-25" xMax="848" yMax="1406">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="153" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="emdash" xMin="99" yMin="543" xMax="1950" yMax="642">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="642" on="1"/>
- <pt x="1950" y="642" on="1"/>
- <pt x="1950" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 9 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="endash" xMin="86" yMin="543" xMax="937" yMax="666">
- <contour>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="666" on="1"/>
- <pt x="937" y="666" on="1"/>
- <pt x="937" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eng" xMin="37" yMin="-419" xMax="897" yMax="1110">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="827" on="1"/>
- <pt x="156" y="925" on="1"/>
- <pt x="156" y="993" on="0"/>
- <pt x="131" y="1007" on="1"/>
- <pt x="110" y="1019" on="0"/>
- <pt x="56" y="1023" on="1"/>
- <pt x="37" y="1024" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="356" y="1086" on="1"/>
- <pt x="356" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="791" y="1110" on="0"/>
- <pt x="844" y="1032" on="1"/>
- <pt x="897" y="954" on="0"/>
- <pt x="897" y="765" on="1"/>
- <pt x="897" y="12" on="1"/>
- <pt x="897" y="-419" on="0"/>
- <pt x="536" y="-419" on="1"/>
- <pt x="438" y="-419" on="0"/>
- <pt x="311" y="-380" on="1"/>
- <pt x="311" y="-136" on="1"/>
- <pt x="422" y="-136" on="1"/>
- <pt x="423" y="-154" on="1"/>
- <pt x="428" y="-277" on="0"/>
- <pt x="451" y="-314" on="1"/>
- <pt x="478" y="-358" on="0"/>
- <pt x="550" y="-358" on="1"/>
- <pt x="700" y="-358" on="0"/>
- <pt x="700" y="-185" on="1"/>
- <pt x="700" y="-82" on="1"/>
- <pt x="700" y="734" on="1"/>
- <pt x="697" y="811" on="1"/>
- <pt x="694" y="900" on="0"/>
- <pt x="672" y="937" on="1"/>
- <pt x="647" y="981" on="0"/>
- <pt x="592" y="981" on="1"/>
- <pt x="476" y="981" on="0"/>
- <pt x="356" y="840" on="1"/>
- <pt x="356" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="383" y="78" on="1"/>
- <pt x="405" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="477" y="62" on="1"/>
- <pt x="477" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 88 values pushed */
- 0 0 46 29 21 37 11 28 48 84 21 1 55 49 48 41 26 25 17 14 8 7 1 11 15
- 0 3 40 39 32 31 30 5 13 28 0 56 0 1 0 16 15 1 14 56 55 32 3 39 16
- 3 15 14 1 0 4 13 7 0 0 41 40 39 4 2 25 49 48 17 16 4 3 7 2 4
- 48 196 26 25 1 31 30 1 8 7 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eogonek" xMin="68" yMin="-370" xMax="848" yMax="1110">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="281" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="equal" xMin="84" yMin="358" xMax="1071" yMax="827">
- <contour>
- <pt x="84" y="358" on="1"/>
- <pt x="84" y="456" on="1"/>
- <pt x="1071" y="456" on="1"/>
- <pt x="1071" y="358" on="1"/>
- </contour>
- <contour>
- <pt x="84" y="728" on="1"/>
- <pt x="84" y="827" on="1"/>
- <pt x="1071" y="827" on="1"/>
- <pt x="1071" y="728" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 33 values pushed */
- 0 0 7 4 9 1 5 2 1 9 1 0 2 4 48 84 6 5 1 3 0 1 2 0 14
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="estimated" xMin="68" yMin="-25" xMax="848" yMax="1110">
- <contour>
- <pt x="848" y="49" on="1"/>
- <pt x="682" y="-25" on="0"/>
- <pt x="542" y="-25" on="1"/>
- <pt x="322" y="-25" on="0"/>
- <pt x="195" y="124" on="1"/>
- <pt x="68" y="273" on="0"/>
- <pt x="68" y="536" on="1"/>
- <pt x="68" y="796" on="0"/>
- <pt x="185" y="953" on="1"/>
- <pt x="301" y="1110" on="0"/>
- <pt x="496" y="1110" on="1"/>
- <pt x="677" y="1110" on="0"/>
- <pt x="763" y="988" on="1"/>
- <pt x="848" y="866" on="0"/>
- <pt x="848" y="605" on="1"/>
- <pt x="848" y="586" on="1"/>
- <pt x="284" y="586" on="1"/>
- <pt x="287" y="442" on="0"/>
- <pt x="302" y="368" on="1"/>
- <pt x="362" y="75" on="0"/>
- <pt x="600" y="75" on="1"/>
- <pt x="722" y="75" on="0"/>
- <pt x="848" y="150" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="648" on="1"/>
- <pt x="638" y="648" on="1"/>
- <pt x="639" y="692" on="1"/>
- <pt x="643" y="869" on="0"/>
- <pt x="611" y="957" on="1"/>
- <pt x="580" y="1043" on="0"/>
- <pt x="486" y="1043" on="1"/>
- <pt x="382" y="1043" on="0"/>
- <pt x="325" y="901" on="1"/>
- <pt x="286" y="803" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 29 17 10 20 9 2 48 84 10 1 2 2 14 23 15 2 1 22 0 2 15 2 3
- 0 0 0 16 15 14 1 23 1 4 48 84 24 23 1 0 14 24 23 22 16 15 14 6 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eth" xMin="17" yMin="-25" xMax="962" yMax="1585">
- <contour>
- <pt x="597" y="1078" on="1"/>
- <pt x="530" y="1184" on="0"/>
- <pt x="399" y="1317" on="1"/>
- <pt x="107" y="1119" on="1"/>
- <pt x="71" y="1172" on="1"/>
- <pt x="350" y="1357" on="1"/>
- <pt x="193" y="1492" on="0"/>
- <pt x="17" y="1507" on="1"/>
- <pt x="17" y="1579" on="1"/>
- <pt x="265" y="1579" on="0"/>
- <pt x="479" y="1444" on="1"/>
- <pt x="689" y="1585" on="1"/>
- <pt x="724" y="1535" on="1"/>
- <pt x="527" y="1404" on="1"/>
- <pt x="646" y="1317" on="0"/>
- <pt x="711" y="1248" on="1"/>
- <pt x="962" y="979" on="0"/>
- <pt x="962" y="586" on="1"/>
- <pt x="962" y="298" on="0"/>
- <pt x="843" y="137" on="1"/>
- <pt x="725" y="-25" on="0"/>
- <pt x="511" y="-25" on="1"/>
- <pt x="307" y="-25" on="0"/>
- <pt x="184" y="127" on="1"/>
- <pt x="62" y="279" on="0"/>
- <pt x="62" y="531" on="1"/>
- <pt x="62" y="781" on="0"/>
- <pt x="184" y="933" on="1"/>
- <pt x="307" y="1086" on="0"/>
- <pt x="503" y="1086" on="1"/>
- <pt x="542" y="1086" on="0"/>
- </contour>
- <contour>
- <pt x="511" y="1018" on="1"/>
- <pt x="406" y="1018" on="0"/>
- <pt x="342" y="884" on="1"/>
- <pt x="277" y="750" on="0"/>
- <pt x="277" y="531" on="1"/>
- <pt x="277" y="311" on="0"/>
- <pt x="342" y="177" on="1"/>
- <pt x="406" y="43" on="0"/>
- <pt x="512" y="43" on="1"/>
- <pt x="617" y="43" on="0"/>
- <pt x="681" y="176" on="1"/>
- <pt x="746" y="310" on="0"/>
- <pt x="746" y="525" on="1"/>
- <pt x="746" y="729" on="0"/>
- <pt x="693" y="859" on="1"/>
- <pt x="628" y="1018" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 0 0 39 17 21 31 17 29 48 84 29 1 21 2 1 1 13 10 5 4 3 2 6 0 1
- 3 0 0 1 1 0 1 2 2 0 0 1 12 11 8 7 4 13 0 0 14 0 0 43 10
- 17 35 10 25 48 196 25 17 13 12 11 10 8 7 5 4 3 2 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclam" xMin="242" yMin="0" xMax="439" yMax="1480">
- <contour>
- <pt x="242" y="0" on="1"/>
- <pt x="242" y="197" on="1"/>
- <pt x="439" y="197" on="1"/>
- <pt x="439" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="310" y="395" on="1"/>
- <pt x="242" y="1184" on="1"/>
- <pt x="242" y="1480" on="1"/>
- <pt x="439" y="1480" on="1"/>
- <pt x="439" y="1184" on="1"/>
- <pt x="372" y="395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 9 8 5 4 4 6 1 3 0 0 2 1 5 1 0 1 4 48 84 3 0 1 0 7 6
- 0 14 9 4 2 2 0 3 0 0 8 7 3 2 4 3 0 1 4 48 196 6 5 1 0
- 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclamdown" xMin="242" yMin="-395" xMax="439" yMax="1086">
- <contour>
- <pt x="439" y="1086" on="1"/>
- <pt x="439" y="888" on="1"/>
- <pt x="242" y="888" on="1"/>
- <pt x="242" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="372" y="691" on="1"/>
- <pt x="439" y="-99" on="1"/>
- <pt x="439" y="-395" on="1"/>
- <pt x="242" y="-395" on="1"/>
- <pt x="242" y="-99" on="1"/>
- <pt x="310" y="691" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 1 9 4 2 1 2 3 0 1 8 5 2 2 6 3 0 0 0 2 1 5 1 0 1 4
- 48 84 7 6 1 0 3 0 1 14 9 4 2 0 2 3 0 0 6 5 1 0 4 3 2
- 1 4 48 196 8 7 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="f" xMin="37" yMin="0" xMax="719" yMax="1604">
- <contour>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1401" on="0"/>
- <pt x="245" y="1502" on="1"/>
- <pt x="314" y="1604" on="0"/>
- <pt x="489" y="1604" on="1"/>
- <pt x="617" y="1604" on="0"/>
- <pt x="719" y="1530" on="1"/>
- <pt x="719" y="1295" on="1"/>
- <pt x="608" y="1295" on="1"/>
- <pt x="607" y="1314" on="1"/>
- <pt x="605" y="1353" on="0"/>
- <pt x="604" y="1380" on="1"/>
- <pt x="604" y="1385" on="1"/>
- <pt x="604" y="1540" on="0"/>
- <pt x="496" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="596" y="1086" on="1"/>
- <pt x="596" y="1005" on="1"/>
- <pt x="373" y="1005" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 95 values pushed */
- 0 0 26 11 16 48 84 40 34 7 1 4 8 0 3 29 24 23 20 19 18 12 7 13 16
- 10 0 0 33 32 7 1 10 1 4 9 8 1 10 1 6 48 84 41 0 1 0 31 30 11
- 10 1 3 14 41 40 32 31 24 23 20 7 18 29 3 10 9 1 0 4 13 7 0 0 34
- 33 30 29 4 3 7 1 4 48 196 19 18 1 12 11 8 7 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi" xMin="37" yMin="0" xMax="1104" yMax="1604">
- <contour>
- <pt x="786" y="1283" on="1"/>
- <pt x="786" y="1480" on="1"/>
- <pt x="959" y="1480" on="1"/>
- <pt x="959" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1394" on="0"/>
- <pt x="243" y="1499" on="1"/>
- <pt x="311" y="1604" on="0"/>
- <pt x="471" y="1604" on="1"/>
- <pt x="585" y="1604" on="0"/>
- <pt x="687" y="1530" on="1"/>
- <pt x="687" y="1308" on="1"/>
- <pt x="576" y="1308" on="1"/>
- <pt x="575" y="1324" on="1"/>
- <pt x="574" y="1357" on="0"/>
- <pt x="573" y="1375" on="1"/>
- <pt x="573" y="1383" on="0"/>
- <pt x="573" y="1386" on="1"/>
- <pt x="573" y="1540" on="0"/>
- <pt x="480" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="959" y="1086" on="1"/>
- <pt x="959" y="259" on="1"/>
- <pt x="961" y="160" on="1"/>
- <pt x="962" y="86" on="0"/>
- <pt x="983" y="78" on="1"/>
- <pt x="1003" y="68" on="0"/>
- <pt x="1086" y="63" on="1"/>
- <pt x="1104" y="62" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="616" y="0" on="1"/>
- <pt x="616" y="62" on="1"/>
- <pt x="678" y="63" on="1"/>
- <pt x="759" y="63" on="0"/>
- <pt x="760" y="160" on="1"/>
- <pt x="761" y="259" on="1"/>
- <pt x="761" y="1005" on="1"/>
- <pt x="373" y="1005" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 138 values pushed */
- 0 0 31 11 20 48 84 49 45 24 23 2 1 0 3 34 16 2 0 14 3 59 53 50 43
- 37 11 5 7 12 4 3 22 20 1 0 0 52 51 7 1 14 1 4 13 12 1 14 1 6
- 3 0 5 1 1 1 4 48 84 60 45 44 4 3 0 36 35 15 14 1 3 2 1 0 14
- 45 49 49 50 22 2 60 59 24 3 22 34 3 44 43 2 13 2 14 13 5 4 4 13 11
- 0 0 51 50 4 1 2 53 52 35 34 4 3 11 1 0 13 1 2 3 4 48 196 23 22
- 1 16 15 12 11 3 37 36 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi#1" xMin="37" yMin="0" xMax="1104" yMax="1604">
- <contour>
- <pt x="786" y="1283" on="1"/>
- <pt x="786" y="1480" on="1"/>
- <pt x="959" y="1480" on="1"/>
- <pt x="959" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1394" on="0"/>
- <pt x="243" y="1499" on="1"/>
- <pt x="311" y="1604" on="0"/>
- <pt x="471" y="1604" on="1"/>
- <pt x="585" y="1604" on="0"/>
- <pt x="687" y="1530" on="1"/>
- <pt x="687" y="1308" on="1"/>
- <pt x="576" y="1308" on="1"/>
- <pt x="575" y="1324" on="1"/>
- <pt x="574" y="1357" on="0"/>
- <pt x="573" y="1375" on="1"/>
- <pt x="573" y="1383" on="0"/>
- <pt x="573" y="1386" on="1"/>
- <pt x="573" y="1540" on="0"/>
- <pt x="480" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="959" y="1086" on="1"/>
- <pt x="959" y="259" on="1"/>
- <pt x="961" y="160" on="1"/>
- <pt x="962" y="86" on="0"/>
- <pt x="983" y="78" on="1"/>
- <pt x="1003" y="68" on="0"/>
- <pt x="1086" y="63" on="1"/>
- <pt x="1104" y="62" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="616" y="0" on="1"/>
- <pt x="616" y="62" on="1"/>
- <pt x="678" y="63" on="1"/>
- <pt x="759" y="63" on="0"/>
- <pt x="760" y="160" on="1"/>
- <pt x="761" y="259" on="1"/>
- <pt x="761" y="1005" on="1"/>
- <pt x="373" y="1005" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 138 values pushed */
- 0 0 31 11 20 48 84 49 45 24 23 2 1 0 3 34 16 2 0 14 3 59 53 50 43
- 37 11 5 7 12 4 3 22 20 1 0 0 52 51 7 1 14 1 4 13 12 1 14 1 6
- 3 0 5 1 1 1 4 48 84 60 45 44 4 3 0 36 35 15 14 1 3 2 1 0 14
- 45 49 49 50 22 2 60 59 24 3 22 34 3 44 43 2 13 2 14 13 5 4 4 13 11
- 0 0 51 50 4 1 2 53 52 35 34 4 3 11 1 0 13 1 2 3 4 48 196 23 22
- 1 16 15 12 11 3 37 36 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="figuredash" xMin="86" yMin="543" xMax="937" yMax="666">
- <contour>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="666" on="1"/>
- <pt x="937" y="666" on="1"/>
- <pt x="937" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="five" xMin="130" yMin="-37" xMax="907" yMax="1480">
- <contour>
- <pt x="130" y="-3" on="1"/>
- <pt x="130" y="247" on="1"/>
- <pt x="229" y="247" on="1"/>
- <pt x="230" y="223" on="1"/>
- <pt x="232" y="147" on="1"/>
- <pt x="235" y="25" on="0"/>
- <pt x="406" y="25" on="1"/>
- <pt x="541" y="25" on="0"/>
- <pt x="619" y="134" on="1"/>
- <pt x="697" y="244" on="0"/>
- <pt x="697" y="421" on="1"/>
- <pt x="697" y="820" on="0"/>
- <pt x="192" y="820" on="1"/>
- <pt x="155" y="820" on="1"/>
- <pt x="155" y="1480" on="1"/>
- <pt x="876" y="1480" on="1"/>
- <pt x="876" y="1308" on="1"/>
- <pt x="216" y="1308" on="1"/>
- <pt x="216" y="894" on="1"/>
- <pt x="308" y="894" on="1"/>
- <pt x="592" y="894" on="0"/>
- <pt x="749" y="769" on="1"/>
- <pt x="907" y="644" on="0"/>
- <pt x="907" y="420" on="1"/>
- <pt x="907" y="210" on="0"/>
- <pt x="764" y="87" on="1"/>
- <pt x="621" y="-37" on="0"/>
- <pt x="384" y="-37" on="1"/>
- <pt x="270" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 6 11 27 48 84 27 2 1 19 18 13 12 2 1 6 16 2 3 0 1 0 2 0
- 0 0 17 16 13 1 14 1 4 48 84 15 14 0 14 0 0 10 10 23 48 196 19 2 2
- 15 17 3 12 17 13 2 23 15 0 0 18 17 11 1 13 1 4 48 196 16 15 1 14 13
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl" xMin="37" yMin="0" xMax="1104" yMax="1604">
- <contour>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1313" on="0"/>
- <pt x="192" y="1384" on="1"/>
- <pt x="208" y="1457" on="0"/>
- <pt x="260" y="1514" on="1"/>
- <pt x="342" y="1604" on="0"/>
- <pt x="468" y="1604" on="1"/>
- <pt x="518" y="1604" on="0"/>
- <pt x="632" y="1579" on="1"/>
- <pt x="959" y="1579" on="1"/>
- <pt x="959" y="259" on="1"/>
- <pt x="961" y="160" on="1"/>
- <pt x="962" y="86" on="0"/>
- <pt x="983" y="78" on="1"/>
- <pt x="1003" y="68" on="0"/>
- <pt x="1086" y="63" on="1"/>
- <pt x="1104" y="62" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="616" y="0" on="1"/>
- <pt x="616" y="62" on="1"/>
- <pt x="678" y="63" on="1"/>
- <pt x="759" y="63" on="0"/>
- <pt x="760" y="160" on="1"/>
- <pt x="761" y="259" on="1"/>
- <pt x="761" y="1437" on="1"/>
- <pt x="604" y="1540" on="0"/>
- <pt x="486" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="546" y="1086" on="1"/>
- <pt x="546" y="1005" on="1"/>
- <pt x="373" y="1005" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 115 values pushed */
- 0 0 38 11 18 48 84 34 30 41 36 12 3 20 10 3 52 46 35 28 22 7 1 7 8
- 0 3 18 20 0 0 45 44 7 1 10 1 4 9 8 1 10 1 6 48 84 21 20 1 53
- 30 29 0 3 2 0 43 42 11 10 1 3 14 30 34 53 52 44 43 34 20 6 35 41 3
- 29 28 2 13 21 10 9 1 0 4 13 7 0 0 36 35 4 1 21 46 45 42 41 4 3
- 7 2 4 48 196 22 21 1 12 11 8 7 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl#1" xMin="37" yMin="0" xMax="1104" yMax="1604">
- <contour>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1313" on="0"/>
- <pt x="192" y="1384" on="1"/>
- <pt x="208" y="1457" on="0"/>
- <pt x="260" y="1514" on="1"/>
- <pt x="342" y="1604" on="0"/>
- <pt x="468" y="1604" on="1"/>
- <pt x="518" y="1604" on="0"/>
- <pt x="632" y="1579" on="1"/>
- <pt x="959" y="1579" on="1"/>
- <pt x="959" y="259" on="1"/>
- <pt x="961" y="160" on="1"/>
- <pt x="962" y="86" on="0"/>
- <pt x="983" y="78" on="1"/>
- <pt x="1003" y="68" on="0"/>
- <pt x="1086" y="63" on="1"/>
- <pt x="1104" y="62" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="616" y="0" on="1"/>
- <pt x="616" y="62" on="1"/>
- <pt x="678" y="63" on="1"/>
- <pt x="759" y="63" on="0"/>
- <pt x="760" y="160" on="1"/>
- <pt x="761" y="259" on="1"/>
- <pt x="761" y="1437" on="1"/>
- <pt x="604" y="1540" on="0"/>
- <pt x="486" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="546" y="1086" on="1"/>
- <pt x="546" y="1005" on="1"/>
- <pt x="373" y="1005" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 115 values pushed */
- 0 0 38 11 18 48 84 34 30 41 36 12 3 20 10 3 52 46 35 28 22 7 1 7 8
- 0 3 18 20 0 0 45 44 7 1 10 1 4 9 8 1 10 1 6 48 84 21 20 1 53
- 30 29 0 3 2 0 43 42 11 10 1 3 14 30 34 53 52 44 43 34 20 6 35 41 3
- 29 28 2 13 21 10 9 1 0 4 13 7 0 0 36 35 4 1 21 46 45 42 41 4 3
- 7 2 4 48 196 22 21 1 12 11 8 7 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="florin" xMin="12" yMin="-296" xMax="949" yMax="1505">
- <contour>
- <pt x="12" y="-296" on="1"/>
- <pt x="218" y="740" on="1"/>
- <pt x="16" y="740" on="1"/>
- <pt x="16" y="802" on="1"/>
- <pt x="230" y="802" on="1"/>
- <pt x="254" y="922" on="1"/>
- <pt x="308" y="1196" on="0"/>
- <pt x="446" y="1351" on="1"/>
- <pt x="583" y="1505" on="0"/>
- <pt x="772" y="1505" on="1"/>
- <pt x="852" y="1505" on="0"/>
- <pt x="949" y="1475" on="1"/>
- <pt x="949" y="1246" on="1"/>
- <pt x="851" y="1246" on="1"/>
- <pt x="848" y="1293" on="0"/>
- <pt x="847" y="1320" on="1"/>
- <pt x="842" y="1444" on="0"/>
- <pt x="723" y="1444" on="1"/>
- <pt x="605" y="1444" on="0"/>
- <pt x="552" y="1316" on="1"/>
- <pt x="509" y="1212" on="0"/>
- <pt x="463" y="979" on="1"/>
- <pt x="428" y="802" on="1"/>
- <pt x="678" y="802" on="1"/>
- <pt x="678" y="740" on="1"/>
- <pt x="415" y="740" on="1"/>
- <pt x="209" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 17 11 9 48 84 9 0 1 13 12 11 3 0 3 3 0 0 0 25 24 2 1 14
- 3 3 1 4 48 84 23 22 4 3 3 26 0 1 2 0 14 26 25 24 23 22 13 4 3
- 2 1 0 11 13 11 12 11 1 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="four" xMin="25" yMin="0" xMax="975" yMax="1505">
- <contour>
- <pt x="630" y="419" on="1"/>
- <pt x="25" y="419" on="1"/>
- <pt x="25" y="518" on="1"/>
- <pt x="692" y="1505" on="1"/>
- <pt x="803" y="1505" on="1"/>
- <pt x="803" y="568" on="1"/>
- <pt x="975" y="568" on="1"/>
- <pt x="975" y="419" on="1"/>
- <pt x="803" y="419" on="1"/>
- <pt x="803" y="259" on="1"/>
- <pt x="809" y="160" on="1"/>
- <pt x="813" y="94" on="0"/>
- <pt x="834" y="84" on="1"/>
- <pt x="852" y="73" on="0"/>
- <pt x="901" y="68" on="1"/>
- <pt x="944" y="63" on="1"/>
- <pt x="963" y="62" on="1"/>
- <pt x="963" y="0" on="1"/>
- <pt x="445" y="0" on="1"/>
- <pt x="445" y="62" on="1"/>
- <pt x="463" y="63" on="1"/>
- <pt x="542" y="68" on="1"/>
- <pt x="605" y="73" on="0"/>
- <pt x="618" y="124" on="1"/>
- <pt x="630" y="166" on="0"/>
- <pt x="630" y="259" on="1"/>
- </contour>
- <contour>
- <pt x="136" y="568" on="1"/>
- <pt x="630" y="568" on="1"/>
- <pt x="630" y="1299" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 25 18 2 5 0 2 16 9 2 0 17 3 28 4 3 3 13 5 0 0 27 26 6 5 19
- 3 0 1 4 48 84 8 7 1 0 3 18 17 1 2 0 14 18 25 17 16 2 6 4 3
- 3 4 0 2 26 2 1 3 13 0 0 0 28 27 25 0 13 3 4 1 4 48 196 7 6
- 1 9 8 5 4 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="foursuperiour" xMin="31" yMin="772" xMax="582" yMax="1522">
- <contour>
- <pt x="284" y="772" on="1"/>
- <pt x="284" y="810" on="1"/>
- <pt x="293" y="811" on="1"/>
- <pt x="343" y="812" on="0"/>
- <pt x="357" y="819" on="1"/>
- <pt x="372" y="828" on="0"/>
- <pt x="374" y="859" on="1"/>
- <pt x="377" y="909" on="1"/>
- <pt x="377" y="977" on="1"/>
- <pt x="31" y="977" on="1"/>
- <pt x="31" y="1043" on="1"/>
- <pt x="399" y="1522" on="1"/>
- <pt x="490" y="1522" on="1"/>
- <pt x="490" y="1066" on="1"/>
- <pt x="582" y="1066" on="1"/>
- <pt x="582" y="977" on="1"/>
- <pt x="490" y="977" on="1"/>
- <pt x="490" y="909" on="1"/>
- <pt x="493" y="859" on="1"/>
- <pt x="495" y="824" on="0"/>
- <pt x="515" y="817" on="1"/>
- <pt x="531" y="812" on="0"/>
- <pt x="567" y="811" on="1"/>
- <pt x="576" y="810" on="1"/>
- <pt x="576" y="772" on="1"/>
- </contour>
- <contour>
- <pt x="97" y="1066" on="1"/>
- <pt x="377" y="1066" on="1"/>
- <pt x="377" y="1429" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 10 13 8 2 23 17 7 1 4 8 0 3 27 12 11 3 13 13 0 0 16 15 9 8 46
- 3 13 1 4 48 84 26 25 14 13 3 24 0 1 2 0 14 11 12 7 2 24 23 15 14
- 4 13 12 25 10 9 1 0 5 13 7 0 0 27 26 8 7 15 3 12 1 4 48 196 17
- 16 13 12 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction" xMin="-416" yMin="-37" xMax="759" yMax="1517">
- <contour>
- <pt x="-416" y="-37" on="1"/>
- <pt x="672" y="1517" on="1"/>
- <pt x="759" y="1517" on="1"/>
- <pt x="-330" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction#1" xMin="-416" yMin="-37" xMax="759" yMax="1517">
- <contour>
- <pt x="-416" y="-37" on="1"/>
- <pt x="672" y="1517" on="1"/>
- <pt x="759" y="1517" on="1"/>
- <pt x="-330" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="g" xMin="53" yMin="-419" xMax="991" yMax="1110">
- <contour>
- <pt x="258" y="42" on="1"/>
- <pt x="145" y="96" on="0"/>
- <pt x="145" y="182" on="1"/>
- <pt x="145" y="266" on="0"/>
- <pt x="300" y="367" on="1"/>
- <pt x="326" y="384" on="1"/>
- <pt x="231" y="432" on="0"/>
- <pt x="183" y="497" on="1"/>
- <pt x="114" y="589" on="0"/>
- <pt x="114" y="732" on="1"/>
- <pt x="114" y="908" on="0"/>
- <pt x="209" y="1009" on="1"/>
- <pt x="303" y="1110" on="0"/>
- <pt x="462" y="1110" on="1"/>
- <pt x="539" y="1110" on="0"/>
- <pt x="640" y="1070" on="1"/>
- <pt x="991" y="1098" on="1"/>
- <pt x="940" y="978" on="1"/>
- <pt x="702" y="1020" on="1"/>
- <pt x="830" y="889" on="0"/>
- <pt x="830" y="731" on="1"/>
- <pt x="830" y="569" on="0"/>
- <pt x="728" y="456" on="1"/>
- <pt x="626" y="342" on="0"/>
- <pt x="481" y="342" on="1"/>
- <pt x="437" y="342" on="0"/>
- <pt x="394" y="360" on="1"/>
- <pt x="318" y="298" on="0"/>
- <pt x="318" y="243" on="1"/>
- <pt x="318" y="195" on="0"/>
- <pt x="369" y="183" on="1"/>
- <pt x="410" y="173" on="0"/>
- <pt x="499" y="173" on="1"/>
- <pt x="561" y="173" on="1"/>
- <pt x="757" y="173" on="0"/>
- <pt x="845" y="114" on="1"/>
- <pt x="933" y="55" on="0"/>
- <pt x="933" y="-73" on="1"/>
- <pt x="933" y="-225" on="0"/>
- <pt x="795" y="-322" on="1"/>
- <pt x="658" y="-419" on="0"/>
- <pt x="446" y="-419" on="1"/>
- <pt x="269" y="-419" on="0"/>
- <pt x="161" y="-354" on="1"/>
- <pt x="53" y="-289" on="0"/>
- <pt x="53" y="-183" on="1"/>
- <pt x="53" y="-51" on="0"/>
- </contour>
- <contour>
- <pt x="472" y="1043" on="1"/>
- <pt x="312" y="1043" on="0"/>
- <pt x="312" y="731" on="1"/>
- <pt x="312" y="410" on="0"/>
- <pt x="472" y="410" on="1"/>
- <pt x="633" y="410" on="0"/>
- <pt x="633" y="725" on="1"/>
- <pt x="633" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="310" y="25" on="1"/>
- <pt x="248" y="-38" on="0"/>
- <pt x="248" y="-144" on="1"/>
- <pt x="248" y="-238" on="0"/>
- <pt x="313" y="-295" on="1"/>
- <pt x="379" y="-352" on="0"/>
- <pt x="480" y="-352" on="1"/>
- <pt x="589" y="-352" on="0"/>
- <pt x="665" y="-284" on="1"/>
- <pt x="741" y="-217" on="0"/>
- <pt x="741" y="-123" on="1"/>
- <pt x="741" y="25" on="0"/>
- <pt x="541" y="25" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 61 17 41 51 17 24 47 17 13 48 84 13 1 24 1 33 32 26 24 18 17 15 5
- 0 9 1 55 3 0 1 16 1 0 41 55 67 55 1 0 14 0 0 65 30 37 57 30 45
- 53 5 20 49 5 9 48 196 67 55 45 37 33 32 28 26 20 18 17 16 15 9 5 2 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gbreve" xMin="53" yMin="-419" xMax="991" yMax="1604">
- <component glyphName="g" x="0" y="0" flags="0x4"/>
- <component glyphName="breve" x="127" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="gcircumflex" xMin="53" yMin="-419" xMax="991" yMax="1604">
- <contour>
- <pt x="258" y="42" on="1"/>
- <pt x="145" y="96" on="0"/>
- <pt x="145" y="182" on="1"/>
- <pt x="145" y="266" on="0"/>
- <pt x="300" y="367" on="1"/>
- <pt x="326" y="384" on="1"/>
- <pt x="231" y="432" on="0"/>
- <pt x="183" y="497" on="1"/>
- <pt x="114" y="589" on="0"/>
- <pt x="114" y="732" on="1"/>
- <pt x="114" y="908" on="0"/>
- <pt x="209" y="1009" on="1"/>
- <pt x="303" y="1110" on="0"/>
- <pt x="462" y="1110" on="1"/>
- <pt x="539" y="1110" on="0"/>
- <pt x="640" y="1070" on="1"/>
- <pt x="991" y="1098" on="1"/>
- <pt x="940" y="978" on="1"/>
- <pt x="702" y="1020" on="1"/>
- <pt x="830" y="889" on="0"/>
- <pt x="830" y="731" on="1"/>
- <pt x="830" y="569" on="0"/>
- <pt x="728" y="456" on="1"/>
- <pt x="626" y="342" on="0"/>
- <pt x="481" y="342" on="1"/>
- <pt x="437" y="342" on="0"/>
- <pt x="394" y="360" on="1"/>
- <pt x="318" y="298" on="0"/>
- <pt x="318" y="243" on="1"/>
- <pt x="318" y="195" on="0"/>
- <pt x="369" y="183" on="1"/>
- <pt x="410" y="173" on="0"/>
- <pt x="499" y="173" on="1"/>
- <pt x="561" y="173" on="1"/>
- <pt x="757" y="173" on="0"/>
- <pt x="845" y="114" on="1"/>
- <pt x="933" y="55" on="0"/>
- <pt x="933" y="-73" on="1"/>
- <pt x="933" y="-225" on="0"/>
- <pt x="795" y="-322" on="1"/>
- <pt x="658" y="-419" on="0"/>
- <pt x="446" y="-419" on="1"/>
- <pt x="269" y="-419" on="0"/>
- <pt x="161" y="-354" on="1"/>
- <pt x="53" y="-289" on="0"/>
- <pt x="53" y="-183" on="1"/>
- <pt x="53" y="-51" on="0"/>
- </contour>
- <contour>
- <pt x="472" y="1043" on="1"/>
- <pt x="312" y="1043" on="0"/>
- <pt x="312" y="731" on="1"/>
- <pt x="312" y="410" on="0"/>
- <pt x="472" y="410" on="1"/>
- <pt x="633" y="410" on="0"/>
- <pt x="633" y="725" on="1"/>
- <pt x="633" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="310" y="25" on="1"/>
- <pt x="248" y="-38" on="0"/>
- <pt x="248" y="-144" on="1"/>
- <pt x="248" y="-238" on="0"/>
- <pt x="313" y="-295" on="1"/>
- <pt x="379" y="-352" on="0"/>
- <pt x="480" y="-352" on="1"/>
- <pt x="589" y="-352" on="0"/>
- <pt x="665" y="-284" on="1"/>
- <pt x="741" y="-217" on="0"/>
- <pt x="741" y="-123" on="1"/>
- <pt x="741" y="25" on="0"/>
- <pt x="541" y="25" on="1"/>
- </contour>
- <contour>
- <pt x="141" y="1283" on="1"/>
- <pt x="382" y="1604" on="1"/>
- <pt x="604" y="1604" on="1"/>
- <pt x="844" y="1283" on="1"/>
- <pt x="758" y="1283" on="1"/>
- <pt x="493" y="1505" on="1"/>
- <pt x="227" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 0 0 61 17 41 51 17 24 47 17 13 48 84 13 1 1 73 69 0 2 0 1 1 74 72
- 71 68 16 5 0 1 3 0 0 24 1 33 32 26 24 18 17 15 5 0 9 1 55 3 0
- 41 55 70 69 1 67 55 1 2 0 14 0 0 65 30 37 57 30 45 53 5 20 49 5 9
- 48 196 74 73 72 71 70 69 68 67 55 45 37 33 32 28 26 20 18 17 16 15 9 5 2
- 0
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gcommaaccent" xMin="53" yMin="-419" xMax="991" yMax="1737">
- <contour>
- <pt x="258" y="42" on="1"/>
- <pt x="145" y="96" on="0"/>
- <pt x="145" y="182" on="1"/>
- <pt x="145" y="266" on="0"/>
- <pt x="300" y="367" on="1"/>
- <pt x="326" y="384" on="1"/>
- <pt x="231" y="432" on="0"/>
- <pt x="183" y="497" on="1"/>
- <pt x="114" y="589" on="0"/>
- <pt x="114" y="732" on="1"/>
- <pt x="114" y="908" on="0"/>
- <pt x="209" y="1009" on="1"/>
- <pt x="303" y="1110" on="0"/>
- <pt x="462" y="1110" on="1"/>
- <pt x="539" y="1110" on="0"/>
- <pt x="640" y="1070" on="1"/>
- <pt x="991" y="1098" on="1"/>
- <pt x="940" y="978" on="1"/>
- <pt x="702" y="1020" on="1"/>
- <pt x="830" y="889" on="0"/>
- <pt x="830" y="731" on="1"/>
- <pt x="830" y="569" on="0"/>
- <pt x="728" y="456" on="1"/>
- <pt x="626" y="342" on="0"/>
- <pt x="481" y="342" on="1"/>
- <pt x="437" y="342" on="0"/>
- <pt x="394" y="360" on="1"/>
- <pt x="318" y="298" on="0"/>
- <pt x="318" y="243" on="1"/>
- <pt x="318" y="195" on="0"/>
- <pt x="369" y="183" on="1"/>
- <pt x="410" y="173" on="0"/>
- <pt x="499" y="173" on="1"/>
- <pt x="561" y="173" on="1"/>
- <pt x="757" y="173" on="0"/>
- <pt x="845" y="114" on="1"/>
- <pt x="933" y="55" on="0"/>
- <pt x="933" y="-73" on="1"/>
- <pt x="933" y="-225" on="0"/>
- <pt x="795" y="-322" on="1"/>
- <pt x="658" y="-419" on="0"/>
- <pt x="446" y="-419" on="1"/>
- <pt x="269" y="-419" on="0"/>
- <pt x="161" y="-354" on="1"/>
- <pt x="53" y="-289" on="0"/>
- <pt x="53" y="-183" on="1"/>
- <pt x="53" y="-51" on="0"/>
- </contour>
- <contour>
- <pt x="472" y="1043" on="1"/>
- <pt x="312" y="1043" on="0"/>
- <pt x="312" y="731" on="1"/>
- <pt x="312" y="410" on="0"/>
- <pt x="472" y="410" on="1"/>
- <pt x="633" y="410" on="0"/>
- <pt x="633" y="725" on="1"/>
- <pt x="633" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="310" y="25" on="1"/>
- <pt x="248" y="-38" on="0"/>
- <pt x="248" y="-144" on="1"/>
- <pt x="248" y="-238" on="0"/>
- <pt x="313" y="-295" on="1"/>
- <pt x="379" y="-352" on="0"/>
- <pt x="480" y="-352" on="1"/>
- <pt x="589" y="-352" on="0"/>
- <pt x="665" y="-284" on="1"/>
- <pt x="741" y="-217" on="0"/>
- <pt x="741" y="-123" on="1"/>
- <pt x="741" y="25" on="0"/>
- <pt x="541" y="25" on="1"/>
- </contour>
- <contour>
- <pt x="487" y="1480" on="1"/>
- <pt x="566" y="1480" on="1"/>
- <pt x="566" y="1283" on="1"/>
- <pt x="369" y="1283" on="1"/>
- <pt x="369" y="1455" on="1"/>
- <pt x="369" y="1616" on="0"/>
- <pt x="431" y="1682" on="1"/>
- <pt x="478" y="1732" on="0"/>
- <pt x="566" y="1737" on="1"/>
- <pt x="566" y="1688" on="1"/>
- <pt x="487" y="1681" on="0"/>
- <pt x="487" y="1532" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 121 values pushed */
- 0 0 61 17 41 51 17 24 47 17 13 48 84 13 1 1 16 70 1 2 0 24 1 33 32
- 26 24 18 17 15 5 0 9 1 55 3 0 79 77 76 72 69 68 6 13 70 41 55 71 70
- 1 67 55 1 2 0 14 0 0 65 30 37 57 30 45 53 5 20 49 5 9 48 196 79 68
- 67 33 32 26 6 69 71 3 18 17 16 15 4 13 37 20 69 55 5 0 3 13 45 28 9
- 2 4 12 71 0 0 77 76 70 69 4 3 71 1 4 48 196 72 71 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gdotaccent" xMin="53" yMin="-419" xMax="991" yMax="1480">
- <contour>
- <pt x="258" y="42" on="1"/>
- <pt x="145" y="96" on="0"/>
- <pt x="145" y="182" on="1"/>
- <pt x="145" y="266" on="0"/>
- <pt x="300" y="367" on="1"/>
- <pt x="326" y="384" on="1"/>
- <pt x="231" y="432" on="0"/>
- <pt x="183" y="497" on="1"/>
- <pt x="114" y="589" on="0"/>
- <pt x="114" y="732" on="1"/>
- <pt x="114" y="908" on="0"/>
- <pt x="209" y="1009" on="1"/>
- <pt x="303" y="1110" on="0"/>
- <pt x="462" y="1110" on="1"/>
- <pt x="539" y="1110" on="0"/>
- <pt x="640" y="1070" on="1"/>
- <pt x="991" y="1098" on="1"/>
- <pt x="940" y="978" on="1"/>
- <pt x="702" y="1020" on="1"/>
- <pt x="830" y="889" on="0"/>
- <pt x="830" y="731" on="1"/>
- <pt x="830" y="569" on="0"/>
- <pt x="728" y="456" on="1"/>
- <pt x="626" y="342" on="0"/>
- <pt x="481" y="342" on="1"/>
- <pt x="437" y="342" on="0"/>
- <pt x="394" y="360" on="1"/>
- <pt x="318" y="298" on="0"/>
- <pt x="318" y="243" on="1"/>
- <pt x="318" y="195" on="0"/>
- <pt x="369" y="183" on="1"/>
- <pt x="410" y="173" on="0"/>
- <pt x="499" y="173" on="1"/>
- <pt x="561" y="173" on="1"/>
- <pt x="757" y="173" on="0"/>
- <pt x="845" y="114" on="1"/>
- <pt x="933" y="55" on="0"/>
- <pt x="933" y="-73" on="1"/>
- <pt x="933" y="-225" on="0"/>
- <pt x="795" y="-322" on="1"/>
- <pt x="658" y="-419" on="0"/>
- <pt x="446" y="-419" on="1"/>
- <pt x="269" y="-419" on="0"/>
- <pt x="161" y="-354" on="1"/>
- <pt x="53" y="-289" on="0"/>
- <pt x="53" y="-183" on="1"/>
- <pt x="53" y="-51" on="0"/>
- </contour>
- <contour>
- <pt x="472" y="1043" on="1"/>
- <pt x="312" y="1043" on="0"/>
- <pt x="312" y="731" on="1"/>
- <pt x="312" y="410" on="0"/>
- <pt x="472" y="410" on="1"/>
- <pt x="633" y="410" on="0"/>
- <pt x="633" y="725" on="1"/>
- <pt x="633" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="310" y="25" on="1"/>
- <pt x="248" y="-38" on="0"/>
- <pt x="248" y="-144" on="1"/>
- <pt x="248" y="-238" on="0"/>
- <pt x="313" y="-295" on="1"/>
- <pt x="379" y="-352" on="0"/>
- <pt x="480" y="-352" on="1"/>
- <pt x="589" y="-352" on="0"/>
- <pt x="665" y="-284" on="1"/>
- <pt x="741" y="-217" on="0"/>
- <pt x="741" y="-123" on="1"/>
- <pt x="741" y="25" on="0"/>
- <pt x="541" y="25" on="1"/>
- </contour>
- <contour>
- <pt x="369" y="1283" on="1"/>
- <pt x="369" y="1480" on="1"/>
- <pt x="566" y="1480" on="1"/>
- <pt x="566" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 120 values pushed */
- 0 0 61 17 41 51 17 24 47 17 13 48 84 13 1 1 16 68 1 2 0 24 1 33 32
- 26 24 18 17 15 5 0 9 1 55 3 0 1 41 2 0 0 0 71 68 5 1 69 1 4
- 48 84 67 55 1 0 70 69 0 14 0 0 65 30 37 57 30 45 53 5 20 49 5 9 48
- 196 67 33 32 26 4 70 68 3 18 17 16 15 4 13 37 20 70 55 5 0 3 13 45 28
- 9 2 4 12 68 0 0 71 70 4 1 68 1 4 48 196 69 68 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="germandbls" xMin="27" yMin="-25" xMax="993" yMax="1604">
- <contour>
- <pt x="530" y="4" on="1"/>
- <pt x="530" y="228" on="1"/>
- <pt x="617" y="228" on="1"/>
- <pt x="618" y="210" on="1"/>
- <pt x="622" y="139" on="1"/>
- <pt x="628" y="36" on="0"/>
- <pt x="712" y="36" on="1"/>
- <pt x="765" y="36" on="0"/>
- <pt x="799" y="84" on="1"/>
- <pt x="833" y="133" on="0"/>
- <pt x="833" y="204" on="1"/>
- <pt x="833" y="313" on="0"/>
- <pt x="712" y="451" on="1"/>
- <pt x="597" y="582" on="1"/>
- <pt x="451" y="749" on="0"/>
- <pt x="451" y="835" on="1"/>
- <pt x="451" y="911" on="0"/>
- <pt x="535" y="1017" on="1"/>
- <pt x="562" y="1051" on="1"/>
- <pt x="641" y="1151" on="0"/>
- <pt x="641" y="1304" on="1"/>
- <pt x="641" y="1542" on="0"/>
- <pt x="490" y="1542" on="1"/>
- <pt x="391" y="1542" on="0"/>
- <pt x="365" y="1445" on="1"/>
- <pt x="345" y="1371" on="0"/>
- <pt x="345" y="1216" on="1"/>
- <pt x="345" y="259" on="1"/>
- <pt x="350" y="159" on="1"/>
- <pt x="351" y="96" on="0"/>
- <pt x="370" y="80" on="1"/>
- <pt x="389" y="66" on="0"/>
- <pt x="438" y="63" on="1"/>
- <pt x="456" y="62" on="1"/>
- <pt x="456" y="0" on="1"/>
- <pt x="27" y="0" on="1"/>
- <pt x="27" y="62" on="1"/>
- <pt x="45" y="63" on="1"/>
- <pt x="120" y="67" on="0"/>
- <pt x="132" y="89" on="1"/>
- <pt x="145" y="108" on="0"/>
- <pt x="146" y="160" on="1"/>
- <pt x="148" y="259" on="1"/>
- <pt x="148" y="1112" on="1"/>
- <pt x="148" y="1383" on="0"/>
- <pt x="226" y="1493" on="1"/>
- <pt x="305" y="1604" on="0"/>
- <pt x="497" y="1604" on="1"/>
- <pt x="649" y="1604" on="0"/>
- <pt x="737" y="1536" on="1"/>
- <pt x="826" y="1469" on="0"/>
- <pt x="826" y="1358" on="1"/>
- <pt x="826" y="1252" on="0"/>
- <pt x="693" y="1108" on="1"/>
- <pt x="656" y="1068" on="1"/>
- <pt x="623" y="1034" on="1"/>
- <pt x="579" y="989" on="0"/>
- <pt x="579" y="939" on="1"/>
- <pt x="579" y="882" on="0"/>
- <pt x="642" y="812" on="1"/>
- <pt x="701" y="746" on="1"/>
- <pt x="803" y="630" on="1"/>
- <pt x="926" y="490" on="0"/>
- <pt x="959" y="430" on="1"/>
- <pt x="993" y="367" on="0"/>
- <pt x="993" y="282" on="1"/>
- <pt x="993" y="154" on="0"/>
- <pt x="908" y="64" on="1"/>
- <pt x="823" y="-25" on="0"/>
- <pt x="701" y="-25" on="1"/>
- <pt x="645" y="-25" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 22 11 47 6 11 69 48 84 69 2 43 42 36 33 27 26 2 1 0 9 13 47 34
- 35 34 1 0 14 0 0 20 16 51 10 24 65 48 196 15 34 33 15 3 0 26 3 2 65
- 57 51 3 12 0 36 35 42 0 0 27 26 4 1 42 1 4 48 196 1 0 1 43 42 1
- 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- MDRP[00000]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="grave" xMin="91" yMin="1283" xMax="591" yMax="1604">
- <contour>
- <pt x="591" y="1283" on="1"/>
- <pt x="498" y="1283" on="1"/>
- <pt x="91" y="1604" on="1"/>
- <pt x="350" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 1 0 2 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="greater" xMin="84" yMin="99" xMax="1071" yMax="1086">
- <contour>
- <pt x="84" y="1086" on="1"/>
- <pt x="1071" y="592" on="1"/>
- <pt x="84" y="99" on="1"/>
- <pt x="84" y="209" on="1"/>
- <pt x="848" y="591" on="1"/>
- <pt x="848" y="593" on="1"/>
- <pt x="84" y="976" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 15 values pushed */
- 6 5 4 3 2 1 0 14 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotleft" xMin="74" yMin="111" xMax="938" yMax="975">
- <contour>
- <pt x="547" y="936" on="1"/>
- <pt x="273" y="543" on="1"/>
- <pt x="547" y="151" on="1"/>
- <pt x="497" y="111" on="1"/>
- <pt x="74" y="543" on="1"/>
- <pt x="497" y="975" on="1"/>
- </contour>
- <contour>
- <pt x="938" y="936" on="1"/>
- <pt x="664" y="543" on="1"/>
- <pt x="938" y="151" on="1"/>
- <pt x="888" y="111" on="1"/>
- <pt x="465" y="543" on="1"/>
- <pt x="888" y="975" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotright" xMin="86" yMin="111" xMax="950" yMax="975">
- <contour>
- <pt x="477" y="149" on="1"/>
- <pt x="750" y="543" on="1"/>
- <pt x="477" y="934" on="1"/>
- <pt x="527" y="975" on="1"/>
- <pt x="950" y="543" on="1"/>
- <pt x="527" y="111" on="1"/>
- </contour>
- <contour>
- <pt x="86" y="149" on="1"/>
- <pt x="359" y="543" on="1"/>
- <pt x="86" y="934" on="1"/>
- <pt x="136" y="975" on="1"/>
- <pt x="559" y="543" on="1"/>
- <pt x="136" y="111" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglleft" xMin="86" yMin="111" xMax="559" yMax="975">
- <contour>
- <pt x="559" y="936" on="1"/>
- <pt x="285" y="543" on="1"/>
- <pt x="559" y="151" on="1"/>
- <pt x="509" y="111" on="1"/>
- <pt x="86" y="543" on="1"/>
- <pt x="509" y="975" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglright" xMin="123" yMin="111" xMax="596" yMax="975">
- <contour>
- <pt x="123" y="149" on="1"/>
- <pt x="396" y="543" on="1"/>
- <pt x="123" y="934" on="1"/>
- <pt x="173" y="975" on="1"/>
- <pt x="596" y="543" on="1"/>
- <pt x="173" y="111" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="h" xMin="37" yMin="0" xMax="1018" yMax="1579">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="1320" on="1"/>
- <pt x="156" y="1419" on="1"/>
- <pt x="156" y="1487" on="0"/>
- <pt x="131" y="1501" on="1"/>
- <pt x="109" y="1513" on="0"/>
- <pt x="56" y="1516" on="1"/>
- <pt x="37" y="1517" on="1"/>
- <pt x="37" y="1579" on="1"/>
- <pt x="356" y="1579" on="1"/>
- <pt x="356" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="791" y="1110" on="0"/>
- <pt x="844" y="1032" on="1"/>
- <pt x="897" y="954" on="0"/>
- <pt x="897" y="765" on="1"/>
- <pt x="897" y="259" on="1"/>
- <pt x="899" y="160" on="1"/>
- <pt x="899" y="92" on="0"/>
- <pt x="924" y="78" on="1"/>
- <pt x="946" y="66" on="0"/>
- <pt x="1000" y="63" on="1"/>
- <pt x="1018" y="62" on="1"/>
- <pt x="1018" y="0" on="1"/>
- <pt x="579" y="0" on="1"/>
- <pt x="579" y="62" on="1"/>
- <pt x="598" y="63" on="1"/>
- <pt x="675" y="68" on="0"/>
- <pt x="687" y="92" on="1"/>
- <pt x="698" y="112" on="0"/>
- <pt x="698" y="160" on="1"/>
- <pt x="700" y="259" on="1"/>
- <pt x="700" y="734" on="1"/>
- <pt x="697" y="811" on="1"/>
- <pt x="694" y="900" on="0"/>
- <pt x="672" y="937" on="1"/>
- <pt x="647" y="981" on="0"/>
- <pt x="592" y="981" on="1"/>
- <pt x="477" y="981" on="0"/>
- <pt x="356" y="840" on="1"/>
- <pt x="356" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="383" y="78" on="1"/>
- <pt x="405" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="477" y="62" on="1"/>
- <pt x="477" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 0 0 47 29 21 48 84 21 1 51 57 1 14 8 2 15 1 3 0 1 50 49 42 41 35
- 32 26 25 17 7 1 11 1 0 3 0 16 15 1 57 34 33 0 3 2 0 14 57 51 51
- 35 34 3 41 16 3 33 32 2 13 25 15 14 1 0 4 13 7 0 0 42 41 4 1 25
- 50 49 17 16 4 3 7 2 4 48 196 26 25 1 8 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hbar" xMin="37" yMin="0" xMax="1018" yMax="1579">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="1246" on="1"/>
- <pt x="37" y="1246" on="1"/>
- <pt x="37" y="1308" on="1"/>
- <pt x="158" y="1308" on="1"/>
- <pt x="158" y="1320" on="1"/>
- <pt x="156" y="1419" on="1"/>
- <pt x="156" y="1487" on="0"/>
- <pt x="131" y="1501" on="1"/>
- <pt x="109" y="1513" on="0"/>
- <pt x="56" y="1516" on="1"/>
- <pt x="37" y="1517" on="1"/>
- <pt x="37" y="1579" on="1"/>
- <pt x="356" y="1579" on="1"/>
- <pt x="356" y="1308" on="1"/>
- <pt x="666" y="1308" on="1"/>
- <pt x="666" y="1246" on="1"/>
- <pt x="356" y="1246" on="1"/>
- <pt x="356" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="791" y="1110" on="0"/>
- <pt x="844" y="1032" on="1"/>
- <pt x="897" y="954" on="0"/>
- <pt x="897" y="765" on="1"/>
- <pt x="897" y="259" on="1"/>
- <pt x="899" y="160" on="1"/>
- <pt x="899" y="92" on="0"/>
- <pt x="924" y="78" on="1"/>
- <pt x="946" y="66" on="0"/>
- <pt x="1000" y="63" on="1"/>
- <pt x="1018" y="62" on="1"/>
- <pt x="1018" y="0" on="1"/>
- <pt x="579" y="0" on="1"/>
- <pt x="579" y="62" on="1"/>
- <pt x="598" y="63" on="1"/>
- <pt x="675" y="68" on="0"/>
- <pt x="687" y="92" on="1"/>
- <pt x="698" y="112" on="0"/>
- <pt x="698" y="160" on="1"/>
- <pt x="700" y="259" on="1"/>
- <pt x="700" y="734" on="1"/>
- <pt x="697" y="811" on="1"/>
- <pt x="694" y="900" on="0"/>
- <pt x="672" y="937" on="1"/>
- <pt x="647" y="981" on="0"/>
- <pt x="592" y="981" on="1"/>
- <pt x="477" y="981" on="0"/>
- <pt x="356" y="840" on="1"/>
- <pt x="356" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="383" y="78" on="1"/>
- <pt x="405" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="477" y="62" on="1"/>
- <pt x="477" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 118 values pushed */
- 0 0 55 29 29 48 84 29 1 59 65 18 12 2 19 10 3 1 58 57 50 49 43 40 34
- 33 25 7 1 11 1 0 3 0 0 0 24 23 9 8 14 3 10 1 4 48 84 20 19 1
- 22 21 11 10 3 65 42 41 0 3 3 0 14 65 59 59 43 42 23 22 5 49 20 3 41
- 40 2 13 33 19 18 10 9 1 0 6 13 7 0 0 50 49 4 1 33 58 57 25 24 21
- 20 4 5 7 2 4 48 196 34 33 1 12 11 8 7 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hcircumflex" xMin="37" yMin="0" xMax="1018" yMax="1999">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="1320" on="1"/>
- <pt x="156" y="1419" on="1"/>
- <pt x="156" y="1487" on="0"/>
- <pt x="131" y="1501" on="1"/>
- <pt x="109" y="1513" on="0"/>
- <pt x="56" y="1516" on="1"/>
- <pt x="37" y="1517" on="1"/>
- <pt x="37" y="1579" on="1"/>
- <pt x="356" y="1579" on="1"/>
- <pt x="356" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="791" y="1110" on="0"/>
- <pt x="844" y="1032" on="1"/>
- <pt x="897" y="954" on="0"/>
- <pt x="897" y="765" on="1"/>
- <pt x="897" y="259" on="1"/>
- <pt x="899" y="160" on="1"/>
- <pt x="899" y="92" on="0"/>
- <pt x="924" y="78" on="1"/>
- <pt x="946" y="66" on="0"/>
- <pt x="1000" y="63" on="1"/>
- <pt x="1018" y="62" on="1"/>
- <pt x="1018" y="0" on="1"/>
- <pt x="579" y="0" on="1"/>
- <pt x="579" y="62" on="1"/>
- <pt x="598" y="63" on="1"/>
- <pt x="675" y="68" on="0"/>
- <pt x="687" y="92" on="1"/>
- <pt x="698" y="112" on="0"/>
- <pt x="698" y="160" on="1"/>
- <pt x="700" y="259" on="1"/>
- <pt x="700" y="734" on="1"/>
- <pt x="697" y="811" on="1"/>
- <pt x="694" y="900" on="0"/>
- <pt x="672" y="937" on="1"/>
- <pt x="647" y="981" on="0"/>
- <pt x="592" y="981" on="1"/>
- <pt x="477" y="981" on="0"/>
- <pt x="356" y="840" on="1"/>
- <pt x="356" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="383" y="78" on="1"/>
- <pt x="405" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="477" y="62" on="1"/>
- <pt x="477" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="171" y="1678" on="1"/>
- <pt x="412" y="1999" on="1"/>
- <pt x="634" y="1999" on="1"/>
- <pt x="874" y="1678" on="1"/>
- <pt x="788" y="1678" on="1"/>
- <pt x="523" y="1900" on="1"/>
- <pt x="257" y="1678" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 121 values pushed */
- 0 0 47 39 21 48 84 21 1 51 57 64 63 62 61 58 5 59 15 3 1 14 8 2 15
- 1 3 0 1 50 49 42 41 35 32 26 25 17 7 1 11 1 0 3 0 60 59 1 16 15
- 1 57 34 33 0 3 3 0 14 57 51 62 61 2 25 41 3 63 60 59 51 35 34 6 41
- 16 3 64 58 2 16 7 3 33 32 2 13 25 15 14 1 0 4 13 7 0 0 42 41 5
- 1 25 50 49 17 16 5 3 7 2 4 48 196 26 25 1 8 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hungarumlaut" xMin="-5" yMin="1283" xMax="686" yMax="1604">
- <contour>
- <pt x="-5" y="1283" on="1"/>
- <pt x="209" y="1604" on="1"/>
- <pt x="378" y="1604" on="1"/>
- <pt x="57" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="304" y="1283" on="1"/>
- <pt x="517" y="1604" on="1"/>
- <pt x="686" y="1604" on="1"/>
- <pt x="365" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 4 3 0 4 13 1 6 5 2 1 3 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen" xMin="82" yMin="543" xMax="600" yMax="666">
- <contour>
- <pt x="82" y="543" on="1"/>
- <pt x="82" y="666" on="1"/>
- <pt x="600" y="666" on="1"/>
- <pt x="600" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen#1" xMin="82" yMin="543" xMax="600" yMax="666">
- <contour>
- <pt x="82" y="543" on="1"/>
- <pt x="82" y="666" on="1"/>
- <pt x="600" y="666" on="1"/>
- <pt x="600" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="i" xMin="47" yMin="0" xMax="536" yMax="1480">
- <contour>
- <pt x="193" y="1283" on="1"/>
- <pt x="193" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="827" on="1"/>
- <pt x="191" y="925" on="1"/>
- <pt x="190" y="999" on="0"/>
- <pt x="169" y="1007" on="1"/>
- <pt x="149" y="1018" on="0"/>
- <pt x="66" y="1023" on="1"/>
- <pt x="47" y="1024" on="1"/>
- <pt x="47" y="1086" on="1"/>
- <pt x="390" y="1086" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 27 21 18 15 12 11 8 5 8 19 4 3 0 0 3 0 5 1 1 1 4 48 84 28 4
- 1 0 20 19 1 2 1 0 14 28 27 2 13 2 19 18 15 8 5 4 6 13 0 0 0
- 21 20 3 2 4 3 0 1 4 48 196 12 11 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="iacute" xMin="47" yMin="0" xMax="576" yMax="1604">
- <component glyphName="dotlessi" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="-15" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ibreve" xMin="-42" yMin="0" xMax="624" yMax="1604">
- <contour>
- <pt x="535" y="62" on="1"/>
- <pt x="535" y="0" on="1"/>
- <pt x="46" y="0" on="1"/>
- <pt x="46" y="62" on="1"/>
- <pt x="65" y="63" on="1"/>
- <pt x="173" y="70" on="0"/>
- <pt x="179" y="87" on="1"/>
- <pt x="189" y="106" on="0"/>
- <pt x="190" y="160" on="1"/>
- <pt x="192" y="259" on="1"/>
- <pt x="192" y="827" on="1"/>
- <pt x="190" y="925" on="1"/>
- <pt x="189" y="999" on="0"/>
- <pt x="168" y="1007" on="1"/>
- <pt x="149" y="1018" on="0"/>
- <pt x="65" y="1023" on="1"/>
- <pt x="46" y="1024" on="1"/>
- <pt x="46" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="259" on="1"/>
- <pt x="391" y="160" on="1"/>
- <pt x="392" y="85" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="437" y="68" on="0"/>
- <pt x="516" y="63" on="1"/>
- </contour>
- <contour>
- <pt x="-42" y="1604" on="1"/>
- <pt x="23" y="1604" on="1"/>
- <pt x="50" y="1514" on="0"/>
- <pt x="110" y="1472" on="1"/>
- <pt x="178" y="1425" on="0"/>
- <pt x="291" y="1425" on="1"/>
- <pt x="417" y="1425" on="0"/>
- <pt x="487" y="1484" on="1"/>
- <pt x="536" y="1524" on="0"/>
- <pt x="560" y="1604" on="1"/>
- <pt x="624" y="1604" on="1"/>
- <pt x="605" y="1469" on="0"/>
- <pt x="533" y="1388" on="1"/>
- <pt x="439" y="1283" on="0"/>
- <pt x="291" y="1283" on="1"/>
- <pt x="137" y="1283" on="0"/>
- <pt x="42" y="1398" on="1"/>
- <pt x="-23" y="1476" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 30 20 39 48 84 19 16 13 10 9 3 0 7 17 1 3 35 34 26 25 4 13 39
- 17 2 1 1 0 18 17 1 14 35 34 1 0 4 13 18 26 25 17 16 13 3 2 7 13
- 9 0 0 19 18 4 1 9 1 4 48 196 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="icircumflex" xMin="-61" yMin="0" xMax="642" yMax="1604">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="-51" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="idieresis" xMin="7" yMin="0" xMax="575" yMax="1456">
- <contour>
- <pt x="535" y="62" on="1"/>
- <pt x="535" y="0" on="1"/>
- <pt x="46" y="0" on="1"/>
- <pt x="46" y="62" on="1"/>
- <pt x="65" y="63" on="1"/>
- <pt x="173" y="70" on="0"/>
- <pt x="179" y="87" on="1"/>
- <pt x="189" y="106" on="0"/>
- <pt x="190" y="160" on="1"/>
- <pt x="192" y="259" on="1"/>
- <pt x="192" y="827" on="1"/>
- <pt x="190" y="925" on="1"/>
- <pt x="189" y="999" on="0"/>
- <pt x="168" y="1007" on="1"/>
- <pt x="149" y="1018" on="0"/>
- <pt x="65" y="1023" on="1"/>
- <pt x="46" y="1024" on="1"/>
- <pt x="46" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="259" on="1"/>
- <pt x="391" y="160" on="1"/>
- <pt x="392" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="437" y="68" on="0"/>
- <pt x="516" y="63" on="1"/>
- </contour>
- <contour>
- <pt x="7" y="1283" on="1"/>
- <pt x="7" y="1456" on="1"/>
- <pt x="180" y="1456" on="1"/>
- <pt x="180" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="402" y="1283" on="1"/>
- <pt x="402" y="1456" on="1"/>
- <pt x="575" y="1456" on="1"/>
- <pt x="575" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 19 16 13 10 9 3 0 7 17 1 3 0 0 32 29 28 25 13 3 26 1 4 48 84 31
- 30 27 26 3 2 1 1 2 0 18 17 1 14 1 0 2 31 29 3 17 16 13 3 2 5
- 27 25 3 0 0 30 29 13 1 31 28 27 13 1 25 19 18 4 1 9 3 4 48 196 32
- 31 1 26 25 1 10 9 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="igrave" xMin="7" yMin="0" xMax="535" yMax="1604">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="grave" x="-84" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ij" xMin="47" yMin="-419" xMax="1021" yMax="1480">
- <component glyphName="i" x="0" y="0" flags="0x4"/>
- <component glyphName="j" x="562" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="imacron" xMin="-40" yMin="0" xMax="602" yMax="1406">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="macron" x="-60" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="iogonek" xMin="47" yMin="-370" xMax="536" yMax="1480">
- <component glyphName="i" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="-39" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="itilde" xMin="-55" yMin="0" xMax="611" yMax="1518">
- <contour>
- <pt x="535" y="62" on="1"/>
- <pt x="535" y="0" on="1"/>
- <pt x="46" y="0" on="1"/>
- <pt x="46" y="62" on="1"/>
- <pt x="65" y="63" on="1"/>
- <pt x="173" y="70" on="0"/>
- <pt x="179" y="87" on="1"/>
- <pt x="189" y="106" on="0"/>
- <pt x="190" y="160" on="1"/>
- <pt x="192" y="259" on="1"/>
- <pt x="192" y="827" on="1"/>
- <pt x="190" y="925" on="1"/>
- <pt x="189" y="999" on="0"/>
- <pt x="168" y="1007" on="1"/>
- <pt x="149" y="1018" on="0"/>
- <pt x="65" y="1023" on="1"/>
- <pt x="46" y="1024" on="1"/>
- <pt x="46" y="1086" on="1"/>
- <pt x="389" y="1086" on="1"/>
- <pt x="389" y="259" on="1"/>
- <pt x="391" y="160" on="1"/>
- <pt x="392" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="437" y="68" on="0"/>
- <pt x="516" y="63" on="1"/>
- </contour>
- <contour>
- <pt x="-55" y="1283" on="1"/>
- <pt x="-28" y="1423" on="0"/>
- <pt x="41" y="1476" on="1"/>
- <pt x="95" y="1518" on="0"/>
- <pt x="172" y="1518" on="1"/>
- <pt x="237" y="1518" on="0"/>
- <pt x="290" y="1480" on="1"/>
- <pt x="325" y="1455" on="1"/>
- <pt x="377" y="1418" on="0"/>
- <pt x="431" y="1418" on="1"/>
- <pt x="527" y="1418" on="0"/>
- <pt x="549" y="1517" on="1"/>
- <pt x="611" y="1517" on="1"/>
- <pt x="583" y="1378" on="0"/>
- <pt x="515" y="1325" on="1"/>
- <pt x="461" y="1283" on="0"/>
- <pt x="384" y="1283" on="1"/>
- <pt x="321" y="1283" on="0"/>
- <pt x="266" y="1321" on="1"/>
- <pt x="231" y="1345" on="1"/>
- <pt x="176" y="1383" on="0"/>
- <pt x="124" y="1383" on="1"/>
- <pt x="36" y="1383" on="0"/>
- <pt x="7" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 46 20 29 34 20 41 48 84 29 0 41 1 48 41 25 3 0 17 3 0 19 16 13
- 10 9 3 0 7 17 1 3 1 37 36 2 13 0 0 2 1 1 0 18 17 1 14 37 36
- 1 0 4 13 18 48 25 17 16 13 3 2 7 13 9 0 0 19 18 5 1 9 1 4 48
- 196 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="j" xMin="-78" yMin="-419" xMax="459" yMax="1480">
- <contour>
- <pt x="-78" y="-380" on="1"/>
- <pt x="-78" y="-136" on="1"/>
- <pt x="21" y="-136" on="1"/>
- <pt x="22" y="-154" on="1"/>
- <pt x="26" y="-268" on="0"/>
- <pt x="47" y="-306" on="1"/>
- <pt x="72" y="-352" on="0"/>
- <pt x="133" y="-352" on="1"/>
- <pt x="262" y="-352" on="0"/>
- <pt x="262" y="-185" on="1"/>
- <pt x="262" y="-82" on="1"/>
- <pt x="262" y="827" on="1"/>
- <pt x="260" y="925" on="1"/>
- <pt x="260" y="993" on="0"/>
- <pt x="235" y="1007" on="1"/>
- <pt x="214" y="1019" on="0"/>
- <pt x="159" y="1023" on="1"/>
- <pt x="141" y="1024" on="1"/>
- <pt x="141" y="1086" on="1"/>
- <pt x="459" y="1086" on="1"/>
- <pt x="459" y="12" on="1"/>
- <pt x="459" y="-419" on="0"/>
- <pt x="127" y="-419" on="1"/>
- <pt x="51" y="-419" on="0"/>
- </contour>
- <contour>
- <pt x="262" y="1283" on="1"/>
- <pt x="262" y="1480" on="1"/>
- <pt x="459" y="1480" on="1"/>
- <pt x="459" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 7 17 22 48 84 1 20 17 11 3 18 2 3 0 1 10 9 2 1 0 5 13 22
- 2 0 0 0 27 24 5 1 25 1 4 48 84 26 25 0 19 18 1 14 18 17 2 3 9
- 0 3 0 0 25 24 11 10 9 4 4 19 1 4 48 196 27 26 20 19 3 1 0 1 2
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="jcircumflex" xMin="-78" yMin="-419" xMax="656" yMax="1604">
- <contour>
- <pt x="-78" y="-380" on="1"/>
- <pt x="-78" y="-136" on="1"/>
- <pt x="21" y="-136" on="1"/>
- <pt x="22" y="-154" on="1"/>
- <pt x="26" y="-268" on="0"/>
- <pt x="47" y="-306" on="1"/>
- <pt x="72" y="-352" on="0"/>
- <pt x="133" y="-352" on="1"/>
- <pt x="262" y="-352" on="0"/>
- <pt x="262" y="-185" on="1"/>
- <pt x="262" y="-82" on="1"/>
- <pt x="262" y="827" on="1"/>
- <pt x="260" y="925" on="1"/>
- <pt x="260" y="993" on="0"/>
- <pt x="235" y="1007" on="1"/>
- <pt x="214" y="1019" on="0"/>
- <pt x="159" y="1023" on="1"/>
- <pt x="141" y="1024" on="1"/>
- <pt x="141" y="1086" on="1"/>
- <pt x="459" y="1086" on="1"/>
- <pt x="459" y="12" on="1"/>
- <pt x="459" y="-419" on="0"/>
- <pt x="127" y="-419" on="1"/>
- <pt x="51" y="-419" on="0"/>
- </contour>
- <contour>
- <pt x="-47" y="1283" on="1"/>
- <pt x="194" y="1604" on="1"/>
- <pt x="416" y="1604" on="1"/>
- <pt x="656" y="1283" on="1"/>
- <pt x="570" y="1283" on="1"/>
- <pt x="305" y="1505" on="1"/>
- <pt x="40" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 7 17 22 48 84 1 29 25 0 2 0 1 30 28 27 24 4 0 18 3 0 1 20
- 17 11 3 18 2 3 0 1 10 9 2 1 0 5 13 22 2 0 26 25 1 0 19 18 1
- 14 29 26 2 19 9 3 30 25 24 18 17 2 6 9 0 3 28 27 2 13 19 0 0 20
- 19 4 1 9 1 4 48 196 11 10 9 2 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="k" xMin="31" yMin="0" xMax="1024" yMax="1579">
- <contour>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="123" y="67" on="0"/>
- <pt x="136" y="89" on="1"/>
- <pt x="149" y="108" on="0"/>
- <pt x="150" y="160" on="1"/>
- <pt x="152" y="259" on="1"/>
- <pt x="152" y="1320" on="1"/>
- <pt x="150" y="1419" on="1"/>
- <pt x="150" y="1487" on="0"/>
- <pt x="125" y="1501" on="1"/>
- <pt x="103" y="1513" on="0"/>
- <pt x="50" y="1516" on="1"/>
- <pt x="31" y="1517" on="1"/>
- <pt x="31" y="1579" on="1"/>
- <pt x="349" y="1579" on="1"/>
- <pt x="349" y="583" on="1"/>
- <pt x="396" y="583" on="1"/>
- <pt x="586" y="825" on="1"/>
- <pt x="664" y="925" on="1"/>
- <pt x="704" y="979" on="1"/>
- <pt x="717" y="996" on="0"/>
- <pt x="717" y="1005" on="1"/>
- <pt x="717" y="1022" on="0"/>
- <pt x="683" y="1022" on="1"/>
- <pt x="678" y="1022" on="1"/>
- <pt x="673" y="1022" on="1"/>
- <pt x="667" y="1022" on="1"/>
- <pt x="661" y="1023" on="1"/>
- <pt x="651" y="1023" on="0"/>
- <pt x="640" y="1024" on="1"/>
- <pt x="632" y="1024" on="1"/>
- <pt x="631" y="1024" on="1"/>
- <pt x="609" y="1024" on="1"/>
- <pt x="609" y="1086" on="1"/>
- <pt x="946" y="1086" on="1"/>
- <pt x="946" y="1024" on="1"/>
- <pt x="928" y="1023" on="1"/>
- <pt x="840" y="1018" on="0"/>
- <pt x="819" y="998" on="1"/>
- <pt x="796" y="980" on="0"/>
- <pt x="757" y="928" on="1"/>
- <pt x="686" y="835" on="1"/>
- <pt x="539" y="640" on="1"/>
- <pt x="811" y="253" on="1"/>
- <pt x="896" y="132" on="0"/>
- <pt x="930" y="98" on="1"/>
- <pt x="964" y="66" on="0"/>
- <pt x="1005" y="63" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- <pt x="769" y="0" on="1"/>
- <pt x="396" y="534" on="1"/>
- <pt x="349" y="534" on="1"/>
- <pt x="349" y="259" on="1"/>
- <pt x="351" y="160" on="1"/>
- <pt x="352" y="91" on="0"/>
- <pt x="376" y="78" on="1"/>
- <pt x="398" y="66" on="0"/>
- <pt x="452" y="63" on="1"/>
- <pt x="470" y="62" on="1"/>
- <pt x="470" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 14 8 2 15 35 3 61 55 54 53 50 44 37 34 33 32 31 28 27 26 25 18 17 7 1
- 19 35 0 3 16 15 1 62 52 51 0 3 2 0 36 35 1 14 62 61 53 52 51 50 44
- 37 36 35 34 33 32 31 28 27 26 25 18 19 13 23 16 15 14 1 0 4 13 7 0 0
- 55 54 17 16 4 3 7 1 4 48 196 8 7 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="kcommaaccent" xMin="31" yMin="-432" xMax="1024" yMax="1579">
- <component glyphName="k" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="276" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="kgreenlandic" xMin="37" yMin="0" xMax="1024" yMax="1086">
- <contour>
- <pt x="476" y="62" on="1"/>
- <pt x="476" y="0" on="1"/>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="827" on="1"/>
- <pt x="156" y="925" on="1"/>
- <pt x="156" y="993" on="0"/>
- <pt x="131" y="1007" on="1"/>
- <pt x="111" y="1019" on="0"/>
- <pt x="56" y="1023" on="1"/>
- <pt x="37" y="1024" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="355" y="1086" on="1"/>
- <pt x="355" y="583" on="1"/>
- <pt x="402" y="583" on="1"/>
- <pt x="592" y="825" on="1"/>
- <pt x="670" y="925" on="1"/>
- <pt x="710" y="979" on="1"/>
- <pt x="723" y="996" on="0"/>
- <pt x="723" y="1005" on="1"/>
- <pt x="723" y="1022" on="0"/>
- <pt x="689" y="1022" on="1"/>
- <pt x="684" y="1022" on="1"/>
- <pt x="679" y="1022" on="1"/>
- <pt x="673" y="1022" on="1"/>
- <pt x="667" y="1023" on="1"/>
- <pt x="657" y="1023" on="0"/>
- <pt x="646" y="1024" on="1"/>
- <pt x="638" y="1024" on="1"/>
- <pt x="637" y="1024" on="1"/>
- <pt x="615" y="1024" on="1"/>
- <pt x="615" y="1086" on="1"/>
- <pt x="952" y="1086" on="1"/>
- <pt x="952" y="1024" on="1"/>
- <pt x="934" y="1023" on="1"/>
- <pt x="846" y="1018" on="0"/>
- <pt x="825" y="998" on="1"/>
- <pt x="802" y="980" on="0"/>
- <pt x="763" y="928" on="1"/>
- <pt x="692" y="835" on="1"/>
- <pt x="545" y="640" on="1"/>
- <pt x="817" y="253" on="1"/>
- <pt x="949" y="64" on="0"/>
- <pt x="1011" y="62" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- <pt x="775" y="0" on="1"/>
- <pt x="402" y="534" on="1"/>
- <pt x="355" y="534" on="1"/>
- <pt x="355" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="382" y="78" on="1"/>
- <pt x="404" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 55 54 53 50 49 46 39 36 35 34 33 30 29 28 27 20 19 16 10 9 3 0 22 17 1
- 3 52 51 2 1 3 0 38 37 18 17 1 3 14 53 52 51 50 49 46 39 38 37 36 35
- 34 33 30 29 28 27 20 1 0 20 13 25 18 17 16 3 2 4 13 9 0 0 55 54 19
- 18 4 3 9 1 4 48 196 10 9 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="l" xMin="47" yMin="0" xMax="536" yMax="1579">
- <contour>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="1320" on="1"/>
- <pt x="191" y="1419" on="1"/>
- <pt x="190" y="1493" on="0"/>
- <pt x="169" y="1501" on="1"/>
- <pt x="148" y="1511" on="0"/>
- <pt x="66" y="1516" on="1"/>
- <pt x="47" y="1517" on="1"/>
- <pt x="47" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 23 17 14 8 7 4 1 7 15 0 3 16 15 1 24 0 1 2 0 14 24 23 2 13 16
- 15 14 4 1 0 5 13 7 0 0 17 16 4 1 7 1 4 48 196 8 7 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lacute" xMin="47" yMin="0" xMax="576" yMax="1999">
- <component glyphName="l" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="-15" y="395" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="lcaron" xMin="47" yMin="0" xMax="785" yMax="1579">
- <contour>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="1320" on="1"/>
- <pt x="191" y="1419" on="1"/>
- <pt x="190" y="1493" on="0"/>
- <pt x="169" y="1501" on="1"/>
- <pt x="148" y="1511" on="0"/>
- <pt x="66" y="1516" on="1"/>
- <pt x="47" y="1517" on="1"/>
- <pt x="47" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- </contour>
- <contour>
- <pt x="667" y="1382" on="1"/>
- <pt x="588" y="1382" on="1"/>
- <pt x="588" y="1579" on="1"/>
- <pt x="785" y="1579" on="1"/>
- <pt x="785" y="1408" on="1"/>
- <pt x="785" y="1245" on="0"/>
- <pt x="723" y="1180" on="1"/>
- <pt x="675" y="1131" on="0"/>
- <pt x="588" y="1125" on="1"/>
- <pt x="588" y="1175" on="1"/>
- <pt x="667" y="1181" on="0"/>
- <pt x="667" y="1330" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 36 34 33 29 26 25 19 16 10 9 6 3 0 13 17 1 3 28 27 18 17 3 2 1 1
- 2 0 14 36 25 2 28 26 3 1 0 2 26 18 3 17 16 6 3 2 5 13 9 0 0
- 34 33 27 26 4 3 28 19 18 4 1 9 2 4 48 196 29 28 1 10 9 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lcommaaccent" xMin="47" yMin="-432" xMax="536" yMax="1579">
- <component glyphName="l" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-26" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ldot" xMin="47" yMin="0" xMax="742" yMax="1579">
- <contour>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="1320" on="1"/>
- <pt x="191" y="1419" on="1"/>
- <pt x="190" y="1493" on="0"/>
- <pt x="169" y="1501" on="1"/>
- <pt x="148" y="1511" on="0"/>
- <pt x="66" y="1516" on="1"/>
- <pt x="47" y="1517" on="1"/>
- <pt x="47" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- </contour>
- <contour>
- <pt x="545" y="691" on="1"/>
- <pt x="545" y="888" on="1"/>
- <pt x="742" y="888" on="1"/>
- <pt x="742" y="691" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 16 10 2 17 26 3 19 9 6 3 0 5 25 1 3 0 0 28 25 5 1 26 1 4 48
- 84 27 26 1 18 17 1 2 1 1 3 0 14 1 0 2 25 18 3 17 16 6 3 2 5
- 13 9 0 0 26 25 4 1 27 19 18 4 1 9 2 4 48 196 28 27 1 10 9 1 2
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="less" xMin="84" yMin="99" xMax="1071" yMax="1086">
- <contour>
- <pt x="1071" y="99" on="1"/>
- <pt x="84" y="592" on="1"/>
- <pt x="1071" y="1086" on="1"/>
- <pt x="1071" y="975" on="1"/>
- <pt x="307" y="593" on="1"/>
- <pt x="307" y="591" on="1"/>
- <pt x="1071" y="209" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 15 values pushed */
- 6 5 4 3 2 1 0 14 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="logicalnot" xMin="84" yMin="296" xMax="1022" yMax="790">
- <contour>
- <pt x="923" y="296" on="1"/>
- <pt x="923" y="691" on="1"/>
- <pt x="84" y="691" on="1"/>
- <pt x="84" y="790" on="1"/>
- <pt x="1022" y="790" on="1"/>
- <pt x="1022" y="691" on="1"/>
- <pt x="1022" y="691" on="1"/>
- <pt x="1022" y="296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 41 values pushed */
- 7 0 1 0 0 6 5 2 1 9 3 3 1 4 48 84 4 3 1 0 14 3 2 0 0
- 0 1 0 9 1 4 1 4 48 196 7 6 5 4 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="longs" xMin="37" yMin="0" xMax="719" yMax="1604">
- <contour>
- <pt x="176" y="999" on="1"/>
- <pt x="37" y="999" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="176" y="1086" on="1"/>
- <pt x="176" y="1138" on="1"/>
- <pt x="176" y="1401" on="0"/>
- <pt x="245" y="1502" on="1"/>
- <pt x="314" y="1604" on="0"/>
- <pt x="489" y="1604" on="1"/>
- <pt x="617" y="1604" on="0"/>
- <pt x="719" y="1530" on="1"/>
- <pt x="719" y="1295" on="1"/>
- <pt x="608" y="1295" on="1"/>
- <pt x="607" y="1314" on="1"/>
- <pt x="605" y="1353" on="0"/>
- <pt x="604" y="1380" on="1"/>
- <pt x="604" y="1385" on="1"/>
- <pt x="604" y="1540" on="0"/>
- <pt x="496" y="1540" on="1"/>
- <pt x="376" y="1540" on="0"/>
- <pt x="374" y="1357" on="1"/>
- <pt x="373" y="1257" on="1"/>
- <pt x="373" y="259" on="1"/>
- <pt x="375" y="160" on="1"/>
- <pt x="376" y="88" on="0"/>
- <pt x="408" y="75" on="1"/>
- <pt x="434" y="63" on="0"/>
- <pt x="500" y="63" on="1"/>
- <pt x="544" y="62" on="1"/>
- <pt x="544" y="0" on="1"/>
- <pt x="55" y="0" on="1"/>
- <pt x="55" y="62" on="1"/>
- <pt x="74" y="63" on="1"/>
- <pt x="151" y="68" on="0"/>
- <pt x="163" y="92" on="1"/>
- <pt x="174" y="112" on="0"/>
- <pt x="174" y="160" on="1"/>
- <pt x="176" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 18 38 8 48 84 37 31 28 22 4 0 29 3 21 16 15 12 11 10 4 7 13 8
- 2 0 0 1 0 8 1 2 1 4 48 84 30 29 1 0 3 2 1 14 29 28 16 15 12
- 5 10 21 3 31 30 2 1 4 13 0 0 0 22 21 5 1 0 1 4 48 196 11 10 1
- 37 4 3 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lslash" xMin="47" yMin="0" xMax="536" yMax="1579">
- <contour>
- <pt x="47" y="0" on="1"/>
- <pt x="47" y="62" on="1"/>
- <pt x="66" y="63" on="1"/>
- <pt x="174" y="70" on="0"/>
- <pt x="180" y="87" on="1"/>
- <pt x="191" y="106" on="0"/>
- <pt x="191" y="160" on="1"/>
- <pt x="193" y="259" on="1"/>
- <pt x="193" y="783" on="1"/>
- <pt x="47" y="699" on="1"/>
- <pt x="47" y="784" on="1"/>
- <pt x="193" y="868" on="1"/>
- <pt x="193" y="1320" on="1"/>
- <pt x="191" y="1419" on="1"/>
- <pt x="190" y="1493" on="0"/>
- <pt x="169" y="1501" on="1"/>
- <pt x="148" y="1511" on="0"/>
- <pt x="66" y="1516" on="1"/>
- <pt x="47" y="1517" on="1"/>
- <pt x="47" y="1579" on="1"/>
- <pt x="390" y="1579" on="1"/>
- <pt x="390" y="982" on="1"/>
- <pt x="536" y="1066" on="1"/>
- <pt x="536" y="981" on="1"/>
- <pt x="390" y="897" on="1"/>
- <pt x="390" y="259" on="1"/>
- <pt x="392" y="160" on="1"/>
- <pt x="393" y="86" on="0"/>
- <pt x="414" y="78" on="1"/>
- <pt x="435" y="68" on="0"/>
- <pt x="517" y="63" on="1"/>
- <pt x="536" y="62" on="1"/>
- <pt x="536" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 64 values pushed */
- 31 25 24 23 22 21 18 12 11 10 9 8 7 4 1 15 19 0 3 20 19 1 32 0 1
- 2 0 14 32 31 23 22 4 13 20 19 18 10 9 4 1 0 7 13 7 0 0 25 24 21
- 20 4 3 7 1 4 48 196 12 11 8 7 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="m" xMin="37" yMin="0" xMax="1584" yMax="1110">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="827" on="1"/>
- <pt x="156" y="925" on="1"/>
- <pt x="156" y="993" on="0"/>
- <pt x="131" y="1007" on="1"/>
- <pt x="111" y="1019" on="0"/>
- <pt x="56" y="1023" on="1"/>
- <pt x="37" y="1024" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="355" y="1086" on="1"/>
- <pt x="355" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="764" y="1110" on="0"/>
- <pt x="826" y="1056" on="1"/>
- <pt x="880" y="1009" on="0"/>
- <pt x="909" y="904" on="1"/>
- <pt x="972" y="997" on="0"/>
- <pt x="1033" y="1043" on="1"/>
- <pt x="1120" y="1110" on="0"/>
- <pt x="1226" y="1110" on="1"/>
- <pt x="1356" y="1110" on="0"/>
- <pt x="1409" y="1033" on="1"/>
- <pt x="1463" y="956" on="0"/>
- <pt x="1463" y="765" on="1"/>
- <pt x="1463" y="259" on="1"/>
- <pt x="1465" y="160" on="1"/>
- <pt x="1466" y="91" on="0"/>
- <pt x="1490" y="78" on="1"/>
- <pt x="1512" y="66" on="0"/>
- <pt x="1566" y="63" on="1"/>
- <pt x="1584" y="62" on="1"/>
- <pt x="1584" y="0" on="1"/>
- <pt x="1145" y="0" on="1"/>
- <pt x="1145" y="62" on="1"/>
- <pt x="1164" y="63" on="1"/>
- <pt x="1237" y="67" on="0"/>
- <pt x="1251" y="89" on="1"/>
- <pt x="1263" y="109" on="0"/>
- <pt x="1264" y="160" on="1"/>
- <pt x="1266" y="259" on="1"/>
- <pt x="1266" y="734" on="1"/>
- <pt x="1264" y="811" on="1"/>
- <pt x="1262" y="894" on="0"/>
- <pt x="1240" y="933" on="1"/>
- <pt x="1212" y="981" on="0"/>
- <pt x="1151" y="981" on="1"/>
- <pt x="1031" y="981" on="0"/>
- <pt x="909" y="840" on="1"/>
- <pt x="909" y="259" on="1"/>
- <pt x="911" y="160" on="1"/>
- <pt x="911" y="91" on="0"/>
- <pt x="936" y="78" on="1"/>
- <pt x="958" y="66" on="0"/>
- <pt x="1012" y="63" on="1"/>
- <pt x="1030" y="62" on="1"/>
- <pt x="1030" y="0" on="1"/>
- <pt x="591" y="0" on="1"/>
- <pt x="591" y="62" on="1"/>
- <pt x="610" y="63" on="1"/>
- <pt x="683" y="68" on="0"/>
- <pt x="696" y="89" on="1"/>
- <pt x="709" y="109" on="0"/>
- <pt x="710" y="160" on="1"/>
- <pt x="712" y="259" on="1"/>
- <pt x="712" y="734" on="1"/>
- <pt x="710" y="811" on="1"/>
- <pt x="708" y="895" on="0"/>
- <pt x="685" y="934" on="1"/>
- <pt x="658" y="981" on="0"/>
- <pt x="598" y="981" on="1"/>
- <pt x="477" y="981" on="0"/>
- <pt x="355" y="840" on="1"/>
- <pt x="355" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="382" y="78" on="1"/>
- <pt x="404" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="476" y="62" on="1"/>
- <pt x="476" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 114 values pushed */
- 0 0 79 29 21 55 29 29 48 84 29 1 21 1 88 82 81 74 73 67 64 58 57 50 49
- 43 40 34 33 25 17 14 8 7 1 21 15 0 3 89 66 65 42 41 0 5 0 16 15 1
- 14 65 64 43 42 4 49 25 3 89 88 67 66 4 73 16 3 41 40 2 13 33 15 14 1
- 0 4 13 7 0 0 50 49 4 1 33 58 57 25 4 2 73 82 81 17 16 4 3 7 3
- 4 48 196 34 33 1 74 73 1 8 7 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron" xMin="20" yMin="1283" xMax="662" yMax="1406">
- <contour>
- <pt x="20" y="1283" on="1"/>
- <pt x="20" y="1406" on="1"/>
- <pt x="662" y="1406" on="1"/>
- <pt x="662" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron#1" xMin="99" yMin="1480" xMax="926" yMax="1604">
- <contour>
- <pt x="99" y="1480" on="1"/>
- <pt x="99" y="1604" on="1"/>
- <pt x="926" y="1604" on="1"/>
- <pt x="926" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="minus" xMin="222" yMin="543" xMax="1406" yMax="642">
- <contour>
- <pt x="222" y="543" on="1"/>
- <pt x="222" y="642" on="1"/>
- <pt x="1406" y="642" on="1"/>
- <pt x="1406" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 9 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="mu" xMin="12" yMin="-296" xMax="993" yMax="1086">
- <contour>
- <pt x="331" y="-22" on="1"/>
- <pt x="331" y="-296" on="1"/>
- <pt x="133" y="-296" on="1"/>
- <pt x="133" y="321" on="1"/>
- <pt x="133" y="827" on="1"/>
- <pt x="131" y="925" on="1"/>
- <pt x="131" y="993" on="0"/>
- <pt x="106" y="1007" on="1"/>
- <pt x="86" y="1019" on="0"/>
- <pt x="31" y="1023" on="1"/>
- <pt x="12" y="1024" on="1"/>
- <pt x="12" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="352" on="1"/>
- <pt x="333" y="274" on="1"/>
- <pt x="335" y="188" on="0"/>
- <pt x="357" y="150" on="1"/>
- <pt x="383" y="105" on="0"/>
- <pt x="439" y="105" on="1"/>
- <pt x="554" y="105" on="0"/>
- <pt x="675" y="245" on="1"/>
- <pt x="675" y="827" on="1"/>
- <pt x="673" y="925" on="1"/>
- <pt x="672" y="994" on="0"/>
- <pt x="648" y="1007" on="1"/>
- <pt x="627" y="1019" on="0"/>
- <pt x="573" y="1023" on="1"/>
- <pt x="554" y="1024" on="1"/>
- <pt x="554" y="1086" on="1"/>
- <pt x="872" y="1086" on="1"/>
- <pt x="872" y="259" on="1"/>
- <pt x="874" y="160" on="1"/>
- <pt x="874" y="92" on="0"/>
- <pt x="899" y="78" on="1"/>
- <pt x="921" y="66" on="0"/>
- <pt x="974" y="63" on="1"/>
- <pt x="993" y="62" on="1"/>
- <pt x="993" y="0" on="1"/>
- <pt x="675" y="0" on="1"/>
- <pt x="675" y="179" on="1"/>
- <pt x="533" y="-25" on="0"/>
- <pt x="368" y="-25" on="1"/>
- <pt x="352" y="-25" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 18 29 41 48 84 41 2 39 36 30 27 21 20 13 10 4 3 10 11 37 3 0 37
- 1 2 38 37 1 2 1 1 2 0 29 28 12 11 1 3 14 28 27 2 20 0 3 37 36
- 2 13 29 11 10 2 0 0 39 38 21 20 4 3 29 13 12 1 0 4 3 2 2 4 48
- 196 30 29 1 4 3 2 2 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="multiply" xMin="84" yMin="99" xMax="1071" yMax="1086">
- <contour>
- <pt x="84" y="169" on="1"/>
- <pt x="507" y="592" on="1"/>
- <pt x="84" y="1016" on="1"/>
- <pt x="153" y="1086" on="1"/>
- <pt x="577" y="662" on="1"/>
- <pt x="1001" y="1086" on="1"/>
- <pt x="1071" y="1016" on="1"/>
- <pt x="647" y="592" on="1"/>
- <pt x="1071" y="169" on="1"/>
- <pt x="1001" y="99" on="1"/>
- <pt x="577" y="523" on="1"/>
- <pt x="154" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 1 11 10 9 8 7 6 5 4 3 2 1 0 12 13 1 0 14 11 10 9 8 7 6 5
- 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="n" xMin="37" yMin="0" xMax="1018" yMax="1110">
- <contour>
- <pt x="37" y="0" on="1"/>
- <pt x="37" y="62" on="1"/>
- <pt x="56" y="63" on="1"/>
- <pt x="129" y="67" on="0"/>
- <pt x="142" y="89" on="1"/>
- <pt x="155" y="108" on="0"/>
- <pt x="156" y="160" on="1"/>
- <pt x="158" y="259" on="1"/>
- <pt x="158" y="827" on="1"/>
- <pt x="156" y="925" on="1"/>
- <pt x="156" y="993" on="0"/>
- <pt x="131" y="1007" on="1"/>
- <pt x="111" y="1019" on="0"/>
- <pt x="56" y="1023" on="1"/>
- <pt x="37" y="1024" on="1"/>
- <pt x="37" y="1086" on="1"/>
- <pt x="356" y="1086" on="1"/>
- <pt x="356" y="907" on="1"/>
- <pt x="420" y="999" on="0"/>
- <pt x="480" y="1044" on="1"/>
- <pt x="566" y="1110" on="0"/>
- <pt x="667" y="1110" on="1"/>
- <pt x="791" y="1110" on="0"/>
- <pt x="844" y="1032" on="1"/>
- <pt x="897" y="954" on="0"/>
- <pt x="897" y="765" on="1"/>
- <pt x="897" y="259" on="1"/>
- <pt x="899" y="160" on="1"/>
- <pt x="899" y="92" on="0"/>
- <pt x="924" y="78" on="1"/>
- <pt x="946" y="66" on="0"/>
- <pt x="1000" y="63" on="1"/>
- <pt x="1018" y="62" on="1"/>
- <pt x="1018" y="0" on="1"/>
- <pt x="579" y="0" on="1"/>
- <pt x="579" y="62" on="1"/>
- <pt x="598" y="63" on="1"/>
- <pt x="675" y="68" on="0"/>
- <pt x="687" y="92" on="1"/>
- <pt x="698" y="112" on="0"/>
- <pt x="698" y="160" on="1"/>
- <pt x="700" y="259" on="1"/>
- <pt x="700" y="734" on="1"/>
- <pt x="697" y="811" on="1"/>
- <pt x="694" y="900" on="0"/>
- <pt x="672" y="937" on="1"/>
- <pt x="647" y="981" on="0"/>
- <pt x="592" y="981" on="1"/>
- <pt x="477" y="981" on="0"/>
- <pt x="356" y="840" on="1"/>
- <pt x="356" y="259" on="1"/>
- <pt x="357" y="160" on="1"/>
- <pt x="358" y="91" on="0"/>
- <pt x="383" y="78" on="1"/>
- <pt x="405" y="66" on="0"/>
- <pt x="458" y="63" on="1"/>
- <pt x="477" y="62" on="1"/>
- <pt x="477" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 47 29 21 48 84 21 1 51 57 50 49 42 41 35 32 26 25 17 14 8 7 1 13
- 15 0 3 57 34 33 0 3 0 16 15 1 14 57 51 51 35 34 3 41 16 3 33 32 2
- 13 25 15 14 1 0 4 13 7 0 0 42 41 4 1 25 50 49 17 16 4 3 7 2 4
- 48 196 26 25 1 8 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nacute" xMin="37" yMin="0" xMax="1018" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="271" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="napostrophe" xMin="25" yMin="0" xMax="1230" yMax="1579">
- <contour>
- <pt x="249" y="0" on="1"/>
- <pt x="249" y="62" on="1"/>
- <pt x="268" y="63" on="1"/>
- <pt x="341" y="68" on="0"/>
- <pt x="354" y="89" on="1"/>
- <pt x="367" y="109" on="0"/>
- <pt x="368" y="160" on="1"/>
- <pt x="370" y="259" on="1"/>
- <pt x="370" y="827" on="1"/>
- <pt x="368" y="925" on="1"/>
- <pt x="367" y="994" on="0"/>
- <pt x="343" y="1007" on="1"/>
- <pt x="322" y="1019" on="0"/>
- <pt x="268" y="1023" on="1"/>
- <pt x="249" y="1024" on="1"/>
- <pt x="249" y="1086" on="1"/>
- <pt x="568" y="1086" on="1"/>
- <pt x="568" y="907" on="1"/>
- <pt x="632" y="998" on="0"/>
- <pt x="692" y="1044" on="1"/>
- <pt x="777" y="1110" on="0"/>
- <pt x="879" y="1110" on="1"/>
- <pt x="1003" y="1110" on="0"/>
- <pt x="1056" y="1032" on="1"/>
- <pt x="1109" y="954" on="0"/>
- <pt x="1109" y="765" on="1"/>
- <pt x="1109" y="259" on="1"/>
- <pt x="1111" y="160" on="1"/>
- <pt x="1112" y="91" on="0"/>
- <pt x="1136" y="78" on="1"/>
- <pt x="1158" y="66" on="0"/>
- <pt x="1212" y="63" on="1"/>
- <pt x="1230" y="62" on="1"/>
- <pt x="1230" y="0" on="1"/>
- <pt x="791" y="0" on="1"/>
- <pt x="791" y="62" on="1"/>
- <pt x="810" y="63" on="1"/>
- <pt x="883" y="68" on="0"/>
- <pt x="897" y="89" on="1"/>
- <pt x="909" y="109" on="0"/>
- <pt x="910" y="160" on="1"/>
- <pt x="912" y="259" on="1"/>
- <pt x="912" y="734" on="1"/>
- <pt x="909" y="811" on="1"/>
- <pt x="906" y="900" on="0"/>
- <pt x="884" y="937" on="1"/>
- <pt x="859" y="981" on="0"/>
- <pt x="804" y="981" on="1"/>
- <pt x="689" y="981" on="0"/>
- <pt x="568" y="840" on="1"/>
- <pt x="568" y="259" on="1"/>
- <pt x="569" y="160" on="1"/>
- <pt x="570" y="91" on="0"/>
- <pt x="595" y="78" on="1"/>
- <pt x="617" y="66" on="0"/>
- <pt x="670" y="63" on="1"/>
- <pt x="689" y="62" on="1"/>
- <pt x="689" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="104" y="1382" on="1"/>
- <pt x="25" y="1382" on="1"/>
- <pt x="25" y="1579" on="1"/>
- <pt x="222" y="1579" on="1"/>
- <pt x="222" y="1408" on="1"/>
- <pt x="222" y="1245" on="0"/>
- <pt x="160" y="1180" on="1"/>
- <pt x="113" y="1131" on="0"/>
- <pt x="25" y="1125" on="1"/>
- <pt x="25" y="1175" on="1"/>
- <pt x="104" y="1181" on="0"/>
- <pt x="104" y="1330" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 116 values pushed */
- 0 0 47 29 21 48 84 21 1 51 57 69 67 66 62 59 58 6 60 15 3 50 49 42 41
- 35 32 26 25 17 14 8 7 1 13 15 0 3 61 60 1 57 34 33 0 3 2 0 16 15
- 1 14 57 51 51 35 34 3 41 16 3 15 14 1 0 4 7 61 3 69 58 2 61 59 3
- 33 32 2 13 25 0 0 62 61 4 1 59 42 41 4 1 25 50 49 17 16 4 3 7 3
- 4 48 196 67 66 60 59 3 26 25 1 8 7 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nbhyphen" xMin="82" yMin="543" xMax="600" yMax="666">
- <contour>
- <pt x="82" y="543" on="1"/>
- <pt x="82" y="666" on="1"/>
- <pt x="600" y="666" on="1"/>
- <pt x="600" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ncaron" xMin="37" yMin="0" xMax="1018" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="162" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ncommaaccent" xMin="37" yMin="-432" xMax="1018" yMax="1110">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="233" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="nine" xMin="37" yMin="-37" xMax="975" yMax="1518">
- <contour>
- <pt x="764" y="723" on="1"/>
- <pt x="713" y="637" on="0"/>
- <pt x="654" y="593" on="1"/>
- <pt x="568" y="530" on="0"/>
- <pt x="449" y="530" on="1"/>
- <pt x="269" y="530" on="0"/>
- <pt x="153" y="659" on="1"/>
- <pt x="37" y="789" on="0"/>
- <pt x="37" y="993" on="1"/>
- <pt x="37" y="1216" on="0"/>
- <pt x="171" y="1367" on="1"/>
- <pt x="305" y="1518" on="0"/>
- <pt x="502" y="1518" on="1"/>
- <pt x="721" y="1518" on="0"/>
- <pt x="848" y="1320" on="1"/>
- <pt x="975" y="1121" on="0"/>
- <pt x="975" y="779" on="1"/>
- <pt x="975" y="402" on="0"/>
- <pt x="827" y="183" on="1"/>
- <pt x="679" y="-37" on="0"/>
- <pt x="416" y="-37" on="1"/>
- <pt x="251" y="-37" on="0"/>
- <pt x="120" y="29" on="1"/>
- <pt x="120" y="253" on="1"/>
- <pt x="219" y="253" on="1"/>
- <pt x="220" y="232" on="1"/>
- <pt x="225" y="120" on="0"/>
- <pt x="270" y="75" on="1"/>
- <pt x="313" y="31" on="0"/>
- <pt x="412" y="31" on="1"/>
- <pt x="600" y="31" on="0"/>
- <pt x="694" y="269" on="1"/>
- <pt x="761" y="439" on="0"/>
- </contour>
- <contour>
- <pt x="472" y="1450" on="1"/>
- <pt x="364" y="1450" on="0"/>
- <pt x="301" y="1333" on="1"/>
- <pt x="237" y="1215" on="0"/>
- <pt x="237" y="1018" on="1"/>
- <pt x="237" y="600" on="0"/>
- <pt x="499" y="600" on="1"/>
- <pt x="610" y="600" on="0"/>
- <pt x="684" y="695" on="1"/>
- <pt x="759" y="791" on="0"/>
- <pt x="759" y="940" on="1"/>
- <pt x="759" y="1128" on="0"/>
- <pt x="691" y="1271" on="1"/>
- <pt x="606" y="1450" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 0 0 39 17 4 33 17 12 29 17 20 48 84 20 2 12 0 4 1 1 24 23 22 4 0
- 5 0 2 3 0 0 14 0 0 43 10 16 37 5 8 48 196 24 0 2 13 16 22 8 22
- 23 22 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nonbreakingspace"/><!-- contains no outline data -->
-
- <TTGlyph name="ntilde" xMin="37" yMin="0" xMax="1018" yMax="1518">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="175" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="numbersign" xMin="0" yMin="0" xMax="1024" yMax="1480">
- <contour>
- <pt x="93" y="0" on="1"/>
- <pt x="207" y="456" on="1"/>
- <pt x="0" y="456" on="1"/>
- <pt x="19" y="555" on="1"/>
- <pt x="232" y="555" on="1"/>
- <pt x="324" y="925" on="1"/>
- <pt x="93" y="925" on="1"/>
- <pt x="112" y="1024" on="1"/>
- <pt x="349" y="1024" on="1"/>
- <pt x="463" y="1480" on="1"/>
- <pt x="566" y="1480" on="1"/>
- <pt x="451" y="1024" on="1"/>
- <pt x="715" y="1024" on="1"/>
- <pt x="829" y="1480" on="1"/>
- <pt x="932" y="1480" on="1"/>
- <pt x="818" y="1024" on="1"/>
- <pt x="1024" y="1024" on="1"/>
- <pt x="1006" y="925" on="1"/>
- <pt x="793" y="925" on="1"/>
- <pt x="701" y="555" on="1"/>
- <pt x="931" y="555" on="1"/>
- <pt x="913" y="456" on="1"/>
- <pt x="676" y="456" on="1"/>
- <pt x="562" y="0" on="1"/>
- <pt x="459" y="0" on="1"/>
- <pt x="573" y="456" on="1"/>
- <pt x="310" y="456" on="1"/>
- <pt x="195" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="334" y="555" on="1"/>
- <pt x="598" y="555" on="1"/>
- <pt x="690" y="925" on="1"/>
- <pt x="427" y="925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 14 13 10 9 4 13 7 27 24 23 0 4 13 1 0 0 31 30 18 17 6 5 9 5 7
- 26 25 22 21 2 1 9 5 3 2 4 48 84 16 15 12 11 8 7 5 29 28 20 19 4
- 3 5 2 0 14 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="o" xMin="62" yMin="-25" xMax="962" yMax="1110">
- <contour>
- <pt x="512" y="1110" on="1"/>
- <pt x="719" y="1110" on="0"/>
- <pt x="840" y="957" on="1"/>
- <pt x="962" y="805" on="0"/>
- <pt x="962" y="544" on="1"/>
- <pt x="962" y="279" on="0"/>
- <pt x="840" y="127" on="1"/>
- <pt x="719" y="-25" on="0"/>
- <pt x="506" y="-25" on="1"/>
- <pt x="324" y="-25" on="0"/>
- <pt x="209" y="99" on="1"/>
- <pt x="62" y="257" on="0"/>
- <pt x="62" y="543" on="1"/>
- <pt x="62" y="805" on="0"/>
- <pt x="183" y="957" on="1"/>
- <pt x="305" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="512" y="1043" on="1"/>
- <pt x="404" y="1043" on="0"/>
- <pt x="341" y="908" on="1"/>
- <pt x="278" y="772" on="0"/>
- <pt x="278" y="538" on="1"/>
- <pt x="278" y="43" on="0"/>
- <pt x="517" y="43" on="1"/>
- <pt x="607" y="43" on="0"/>
- <pt x="667" y="147" on="1"/>
- <pt x="747" y="286" on="0"/>
- <pt x="747" y="545" on="1"/>
- <pt x="747" y="772" on="0"/>
- <pt x="683" y="908" on="1"/>
- <pt x="620" y="1043" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 22 17 8 16 17 0 48 84 8 2 0 1 14 0 0 26 10 4 20 10 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oacute" xMin="62" yMin="-25" xMax="962" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="255" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="obreve" xMin="62" yMin="-25" xMax="962" yMax="1604">
- <contour>
- <pt x="512" y="1110" on="1"/>
- <pt x="719" y="1110" on="0"/>
- <pt x="840" y="957" on="1"/>
- <pt x="962" y="805" on="0"/>
- <pt x="962" y="544" on="1"/>
- <pt x="962" y="279" on="0"/>
- <pt x="840" y="127" on="1"/>
- <pt x="719" y="-25" on="0"/>
- <pt x="506" y="-25" on="1"/>
- <pt x="324" y="-25" on="0"/>
- <pt x="209" y="99" on="1"/>
- <pt x="62" y="257" on="0"/>
- <pt x="62" y="543" on="1"/>
- <pt x="62" y="805" on="0"/>
- <pt x="183" y="957" on="1"/>
- <pt x="305" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="512" y="1043" on="1"/>
- <pt x="404" y="1043" on="0"/>
- <pt x="341" y="908" on="1"/>
- <pt x="278" y="772" on="0"/>
- <pt x="278" y="538" on="1"/>
- <pt x="278" y="43" on="0"/>
- <pt x="517" y="43" on="1"/>
- <pt x="607" y="43" on="0"/>
- <pt x="667" y="147" on="1"/>
- <pt x="747" y="286" on="0"/>
- <pt x="747" y="545" on="1"/>
- <pt x="747" y="772" on="0"/>
- <pt x="683" y="908" on="1"/>
- <pt x="620" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="179" y="1604" on="1"/>
- <pt x="244" y="1604" on="1"/>
- <pt x="271" y="1514" on="0"/>
- <pt x="331" y="1472" on="1"/>
- <pt x="399" y="1425" on="0"/>
- <pt x="512" y="1425" on="1"/>
- <pt x="638" y="1425" on="0"/>
- <pt x="708" y="1484" on="1"/>
- <pt x="756" y="1523" on="0"/>
- <pt x="781" y="1604" on="1"/>
- <pt x="845" y="1604" on="1"/>
- <pt x="826" y="1469" on="0"/>
- <pt x="754" y="1388" on="1"/>
- <pt x="659" y="1283" on="0"/>
- <pt x="512" y="1283" on="1"/>
- <pt x="359" y="1283" on="0"/>
- <pt x="263" y="1398" on="1"/>
- <pt x="198" y="1475" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 35 20 44 22 38 8 16 38 0 48 84 8 2 0 1 1 40 39 31 30 4 13 44
- 1 0 14 0 0 26 40 4 20 40 12 48 196 40 39 31 30 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ocircumflex" xMin="62" yMin="-25" xMax="962" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="171" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="odieresis" xMin="62" yMin="-25" xMax="962" yMax="1456">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="172" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="oe" xMin="62" yMin="-25" xMax="1417" yMax="1110">
- <contour>
- <pt x="790" y="927" on="1"/>
- <pt x="906" y="1109" on="0"/>
- <pt x="1071" y="1109" on="1"/>
- <pt x="1234" y="1109" on="0"/>
- <pt x="1325" y="977" on="1"/>
- <pt x="1417" y="845" on="0"/>
- <pt x="1417" y="603" on="1"/>
- <pt x="1417" y="585" on="1"/>
- <pt x="904" y="585" on="1"/>
- <pt x="909" y="345" on="0"/>
- <pt x="960" y="230" on="1"/>
- <pt x="1031" y="74" on="0"/>
- <pt x="1184" y="74" on="1"/>
- <pt x="1284" y="74" on="0"/>
- <pt x="1417" y="146" on="1"/>
- <pt x="1417" y="46" on="1"/>
- <pt x="1268" y="-25" on="0"/>
- <pt x="1144" y="-25" on="1"/>
- <pt x="1008" y="-25" on="0"/>
- <pt x="907" y="54" on="1"/>
- <pt x="847" y="100" on="0"/>
- <pt x="790" y="188" on="1"/>
- <pt x="718" y="71" on="0"/>
- <pt x="664" y="27" on="1"/>
- <pt x="600" y="-25" on="0"/>
- <pt x="495" y="-25" on="1"/>
- <pt x="304" y="-25" on="0"/>
- <pt x="183" y="134" on="1"/>
- <pt x="62" y="292" on="0"/>
- <pt x="62" y="543" on="1"/>
- <pt x="62" y="791" on="0"/>
- <pt x="183" y="951" on="1"/>
- <pt x="303" y="1110" on="0"/>
- <pt x="491" y="1110" on="1"/>
- <pt x="614" y="1110" on="0"/>
- <pt x="698" y="1042" on="1"/>
- <pt x="747" y="1003" on="0"/>
- </contour>
- <contour>
- <pt x="500" y="1047" on="1"/>
- <pt x="273" y="1047" on="0"/>
- <pt x="273" y="532" on="1"/>
- <pt x="273" y="38" on="0"/>
- <pt x="503" y="38" on="1"/>
- <pt x="629" y="38" on="0"/>
- <pt x="665" y="197" on="1"/>
- <pt x="692" y="317" on="0"/>
- <pt x="692" y="550" on="1"/>
- <pt x="692" y="823" on="0"/>
- <pt x="649" y="934" on="1"/>
- <pt x="606" y="1047" on="0"/>
- </contour>
- <contour>
- <pt x="905" y="648" on="1"/>
- <pt x="1207" y="648" on="1"/>
- <pt x="1207" y="692" on="1"/>
- <pt x="1207" y="1049" on="0"/>
- <pt x="1064" y="1049" on="1"/>
- <pt x="973" y="1049" on="0"/>
- <pt x="935" y="919" on="1"/>
- <pt x="907" y="827" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 53 11 2 41 11 25 37 11 33 12 9 17 48 84 33 1 25 2 17 2 2 1 1
- 51 0 2 1 49 3 0 6 49 7 2 1 21 15 14 3 7 2 3 0 0 0 8 7 14
- 1 49 1 4 48 84 50 49 1 0 14 0 0 39 10 29 48 196 51 50 49 45 29 21 15
- 14 8 7 6 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ogonek" xMin="156" yMin="-370" xMax="525" yMax="0">
- <contour>
- <pt x="525" y="-273" on="1"/>
- <pt x="525" y="-341" on="1"/>
- <pt x="454" y="-370" on="0"/>
- <pt x="376" y="-370" on="1"/>
- <pt x="156" y="-370" on="0"/>
- <pt x="156" y="-211" on="1"/>
- <pt x="156" y="-89" on="0"/>
- <pt x="314" y="0" on="1"/>
- <pt x="421" y="0" on="1"/>
- <pt x="292" y="-80" on="0"/>
- <pt x="292" y="-182" on="1"/>
- <pt x="292" y="-289" on="0"/>
- <pt x="425" y="-289" on="1"/>
- <pt x="476" y="-289" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 12 7 3 48 84 8 7 3 1 0 14 0 0 10 48 5 48 196 8 7 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ograve" xMin="62" yMin="-25" xMax="962" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="88" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ohungarumlaut" xMin="62" yMin="-25" xMax="962" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="258" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="omacron" xMin="62" yMin="-25" xMax="962" yMax="1406">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="171" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="one" xMin="130" yMin="0" xMax="895" yMax="1493">
- <contour>
- <pt x="611" y="1493" on="1"/>
- <pt x="611" y="259" on="1"/>
- <pt x="617" y="160" on="1"/>
- <pt x="622" y="89" on="0"/>
- <pt x="666" y="75" on="1"/>
- <pt x="701" y="63" on="0"/>
- <pt x="778" y="63" on="1"/>
- <pt x="895" y="62" on="1"/>
- <pt x="895" y="0" on="1"/>
- <pt x="130" y="0" on="1"/>
- <pt x="130" y="62" on="1"/>
- <pt x="247" y="63" on="1"/>
- <pt x="296" y="64" on="0"/>
- <pt x="357" y="74" on="1"/>
- <pt x="384" y="80" on="0"/>
- <pt x="392" y="92" on="1"/>
- <pt x="414" y="129" on="0"/>
- <pt x="414" y="259" on="1"/>
- <pt x="414" y="1177" on="1"/>
- <pt x="408" y="1278" on="1"/>
- <pt x="404" y="1349" on="0"/>
- <pt x="367" y="1349" on="1"/>
- <pt x="338" y="1349" on="0"/>
- <pt x="229" y="1329" on="1"/>
- <pt x="130" y="1311" on="1"/>
- <pt x="130" y="1373" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 42 values pushed */
- 17 9 25 24 18 7 1 0 6 13 21 8 9 8 1 0 14 9 17 8 7 2 13 0 25
- 24 17 0 0 1 0 4 1 17 1 4 48 196 18 17 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onehalf" xMin="173" yMin="-37" xMax="1388" yMax="1517">
- <contour>
- <pt x="173" y="-37" on="1"/>
- <pt x="1261" y="1517" on="1"/>
- <pt x="1347" y="1517" on="1"/>
- <pt x="259" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="173" y="772" on="1"/>
- <pt x="173" y="810" on="1"/>
- <pt x="207" y="811" on="1"/>
- <pt x="252" y="815" on="1"/>
- <pt x="295" y="818" on="0"/>
- <pt x="302" y="840" on="1"/>
- <pt x="309" y="859" on="0"/>
- <pt x="309" y="909" on="1"/>
- <pt x="309" y="1344" on="1"/>
- <pt x="306" y="1395" on="1"/>
- <pt x="304" y="1431" on="0"/>
- <pt x="285" y="1431" on="1"/>
- <pt x="269" y="1431" on="0"/>
- <pt x="216" y="1421" on="1"/>
- <pt x="173" y="1413" on="1"/>
- <pt x="173" y="1453" on="1"/>
- <pt x="432" y="1517" on="1"/>
- <pt x="432" y="909" on="1"/>
- <pt x="432" y="848" on="0"/>
- <pt x="442" y="831" on="1"/>
- <pt x="451" y="816" on="0"/>
- <pt x="490" y="814" on="1"/>
- <pt x="534" y="811" on="1"/>
- <pt x="568" y="810" on="1"/>
- <pt x="568" y="772" on="1"/>
- </contour>
- <contour>
- <pt x="918" y="0" on="1"/>
- <pt x="918" y="49" on="1"/>
- <pt x="959" y="165" on="0"/>
- <pt x="1070" y="267" on="1"/>
- <pt x="1111" y="305" on="1"/>
- <pt x="1258" y="441" on="0"/>
- <pt x="1258" y="562" on="1"/>
- <pt x="1258" y="718" on="0"/>
- <pt x="1121" y="718" on="1"/>
- <pt x="1061" y="718" on="0"/>
- <pt x="995" y="669" on="1"/>
- <pt x="995" y="579" on="1"/>
- <pt x="936" y="579" on="1"/>
- <pt x="936" y="715" on="1"/>
- <pt x="1045" y="758" on="0"/>
- <pt x="1145" y="758" on="1"/>
- <pt x="1253" y="758" on="0"/>
- <pt x="1321" y="702" on="1"/>
- <pt x="1388" y="646" on="0"/>
- <pt x="1388" y="560" on="1"/>
- <pt x="1388" y="452" on="0"/>
- <pt x="1257" y="356" on="1"/>
- <pt x="1226" y="334" on="0"/>
- <pt x="1202" y="318" on="1"/>
- <pt x="1152" y="281" on="1"/>
- <pt x="1040" y="199" on="0"/>
- <pt x="1030" y="105" on="1"/>
- <pt x="1386" y="105" on="1"/>
- <pt x="1386" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 106 values pushed */
- 0 0 37 45 44 48 84 44 44 42 41 40 39 5 4 55 3 30 55 29 2 27 21 20 19
- 18 12 11 5 2 1 10 13 15 4 3 0 29 0 0 56 55 43 1 29 1 4 48 84 57
- 29 1 28 4 1 2 0 14 0 0 35 44 48 48 196 57 56 55 42 41 40 39 30 29 28
- 27 2 1 13 13 48 20 19 18 5 4 3 0 6 13 11 0 0 21 20 12 1 11 1 4
- 48 196 12 11 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onequarter" xMin="173" yMin="-37" xMax="1364" yMax="1517">
- <contour>
- <pt x="173" y="-37" on="1"/>
- <pt x="1261" y="1517" on="1"/>
- <pt x="1347" y="1517" on="1"/>
- <pt x="259" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="1065" y="0" on="1"/>
- <pt x="1065" y="39" on="1"/>
- <pt x="1075" y="39" on="1"/>
- <pt x="1125" y="39" on="0"/>
- <pt x="1139" y="48" on="1"/>
- <pt x="1153" y="57" on="0"/>
- <pt x="1155" y="88" on="1"/>
- <pt x="1158" y="137" on="1"/>
- <pt x="1158" y="205" on="1"/>
- <pt x="813" y="205" on="1"/>
- <pt x="813" y="271" on="1"/>
- <pt x="1181" y="751" on="1"/>
- <pt x="1271" y="751" on="1"/>
- <pt x="1271" y="294" on="1"/>
- <pt x="1364" y="294" on="1"/>
- <pt x="1364" y="205" on="1"/>
- <pt x="1271" y="205" on="1"/>
- <pt x="1271" y="137" on="1"/>
- <pt x="1274" y="88" on="1"/>
- <pt x="1276" y="52" on="0"/>
- <pt x="1297" y="45" on="1"/>
- <pt x="1313" y="39" on="0"/>
- <pt x="1348" y="39" on="1"/>
- <pt x="1358" y="39" on="1"/>
- <pt x="1358" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="878" y="294" on="1"/>
- <pt x="1158" y="294" on="1"/>
- <pt x="1158" y="658" on="1"/>
- </contour>
- <contour>
- <pt x="173" y="772" on="1"/>
- <pt x="173" y="810" on="1"/>
- <pt x="207" y="811" on="1"/>
- <pt x="252" y="815" on="1"/>
- <pt x="295" y="818" on="0"/>
- <pt x="302" y="840" on="1"/>
- <pt x="309" y="859" on="0"/>
- <pt x="309" y="909" on="1"/>
- <pt x="309" y="1344" on="1"/>
- <pt x="306" y="1395" on="1"/>
- <pt x="304" y="1431" on="0"/>
- <pt x="285" y="1431" on="1"/>
- <pt x="269" y="1431" on="0"/>
- <pt x="216" y="1421" on="1"/>
- <pt x="173" y="1413" on="1"/>
- <pt x="173" y="1453" on="1"/>
- <pt x="432" y="1517" on="1"/>
- <pt x="432" y="909" on="1"/>
- <pt x="432" y="848" on="0"/>
- <pt x="442" y="831" on="1"/>
- <pt x="451" y="816" on="0"/>
- <pt x="490" y="814" on="1"/>
- <pt x="534" y="811" on="1"/>
- <pt x="568" y="810" on="1"/>
- <pt x="568" y="772" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 129 values pushed */
- 31 16 15 3 32 17 3 14 17 12 2 27 26 21 11 6 5 6 12 4 3 55 49 48 47
- 46 40 39 33 2 1 10 13 43 32 3 0 4 0 0 30 29 18 17 46 3 12 1 4 48
- 84 56 32 1 20 19 13 12 3 28 4 1 3 0 14 15 1 2 16 11 3 56 55 29 14
- 13 6 5 4 8 11 48 3 28 27 26 19 18 2 6 13 16 47 46 33 32 3 0 6 13
- 39 0 0 49 48 12 1 39 31 30 12 11 15 3 16 2 4 48 196 40 39 1 21 20 17
- 16 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onesuperior" xMin="136" yMin="772" xMax="531" yMax="1517">
- <contour>
- <pt x="136" y="772" on="1"/>
- <pt x="136" y="810" on="1"/>
- <pt x="170" y="811" on="1"/>
- <pt x="215" y="815" on="1"/>
- <pt x="258" y="818" on="0"/>
- <pt x="265" y="840" on="1"/>
- <pt x="272" y="860" on="0"/>
- <pt x="272" y="909" on="1"/>
- <pt x="272" y="1344" on="1"/>
- <pt x="269" y="1395" on="1"/>
- <pt x="267" y="1431" on="0"/>
- <pt x="248" y="1431" on="1"/>
- <pt x="234" y="1431" on="0"/>
- <pt x="179" y="1421" on="1"/>
- <pt x="136" y="1413" on="1"/>
- <pt x="136" y="1453" on="1"/>
- <pt x="395" y="1517" on="1"/>
- <pt x="395" y="909" on="1"/>
- <pt x="395" y="848" on="0"/>
- <pt x="405" y="831" on="1"/>
- <pt x="414" y="816" on="0"/>
- <pt x="453" y="814" on="1"/>
- <pt x="497" y="811" on="1"/>
- <pt x="531" y="810" on="1"/>
- <pt x="531" y="772" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 23 17 16 15 14 8 7 1 8 13 11 0 24 0 1 0 14 24 23 2 13 16 15 14 1
- 0 4 13 7 0 0 17 16 12 1 7 1 4 48 196 8 7 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordfeminine" xMin="25" yMin="830" xMax="561" yMax="1517">
- <contour>
- <pt x="363" y="925" on="1"/>
- <pt x="282" y="830" on="0"/>
- <pt x="193" y="830" on="1"/>
- <pt x="25" y="830" on="0"/>
- <pt x="25" y="1007" on="1"/>
- <pt x="25" y="1222" on="0"/>
- <pt x="317" y="1222" on="1"/>
- <pt x="363" y="1222" on="1"/>
- <pt x="363" y="1283" on="1"/>
- <pt x="363" y="1388" on="0"/>
- <pt x="341" y="1426" on="1"/>
- <pt x="318" y="1465" on="0"/>
- <pt x="257" y="1465" on="1"/>
- <pt x="161" y="1465" on="0"/>
- <pt x="161" y="1356" on="1"/>
- <pt x="161" y="1338" on="1"/>
- <pt x="59" y="1338" on="1"/>
- <pt x="59" y="1462" on="1"/>
- <pt x="157" y="1517" on="0"/>
- <pt x="276" y="1517" on="1"/>
- <pt x="401" y="1517" on="0"/>
- <pt x="450" y="1466" on="1"/>
- <pt x="499" y="1416" on="0"/>
- <pt x="499" y="1283" on="1"/>
- <pt x="499" y="1024" on="1"/>
- <pt x="499" y="919" on="0"/>
- <pt x="539" y="919" on="1"/>
- <pt x="547" y="919" on="0"/>
- <pt x="561" y="922" on="1"/>
- <pt x="561" y="866" on="1"/>
- <pt x="512" y="830" on="0"/>
- <pt x="466" y="830" on="1"/>
- <pt x="392" y="830" on="0"/>
- </contour>
- <contour>
- <pt x="363" y="989" on="1"/>
- <pt x="363" y="1171" on="1"/>
- <pt x="326" y="1171" on="1"/>
- <pt x="173" y="1171" on="0"/>
- <pt x="173" y="1018" on="1"/>
- <pt x="173" y="915" on="0"/>
- <pt x="249" y="915" on="1"/>
- <pt x="300" y="915" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 39 7 2 12 25 19 48 84 19 0 1 35 34 33 29 28 24 23 17 16 15 14 8
- 7 6 0 15 13 31 26 2 3 12 0 0 14 0 0 37 47 4 48 196 29 28 2 13 23
- 35 17 16 15 14 6 6 13 4 0 0 0 34 33 8 7 0 23 4 23 1 4 48 196 24
- 23 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordmasculine" xMin="25" yMin="830" xMax="611" yMax="1517">
- <contour>
- <pt x="318" y="1517" on="1"/>
- <pt x="451" y="1517" on="0"/>
- <pt x="531" y="1424" on="1"/>
- <pt x="611" y="1331" on="0"/>
- <pt x="611" y="1174" on="1"/>
- <pt x="611" y="1015" on="0"/>
- <pt x="531" y="923" on="1"/>
- <pt x="450" y="830" on="0"/>
- <pt x="314" y="830" on="1"/>
- <pt x="197" y="830" on="0"/>
- <pt x="121" y="906" on="1"/>
- <pt x="25" y="1002" on="0"/>
- <pt x="25" y="1174" on="1"/>
- <pt x="25" y="1331" on="0"/>
- <pt x="105" y="1424" on="1"/>
- <pt x="184" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="318" y="1465" on="1"/>
- <pt x="182" y="1465" on="0"/>
- <pt x="182" y="1174" on="1"/>
- <pt x="182" y="883" on="0"/>
- <pt x="322" y="883" on="1"/>
- <pt x="453" y="883" on="0"/>
- <pt x="453" y="1168" on="1"/>
- <pt x="453" y="1465" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 20 25 8 16 25 0 48 84 0 0 1 8 0 0 14 0 0 22 24 4 18 24 12
- 48 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oslash" xMin="62" yMin="-25" xMax="963" yMax="1110">
- <contour>
- <pt x="62" y="-25" on="1"/>
- <pt x="177" y="138" on="1"/>
- <pt x="62" y="310" on="0"/>
- <pt x="62" y="544" on="1"/>
- <pt x="62" y="804" on="0"/>
- <pt x="183" y="957" on="1"/>
- <pt x="304" y="1110" on="0"/>
- <pt x="511" y="1110" on="1"/>
- <pt x="677" y="1110" on="0"/>
- <pt x="795" y="1008" on="1"/>
- <pt x="867" y="1110" on="1"/>
- <pt x="963" y="1110" on="1"/>
- <pt x="847" y="948" on="1"/>
- <pt x="963" y="776" on="0"/>
- <pt x="963" y="540" on="1"/>
- <pt x="963" y="281" on="0"/>
- <pt x="841" y="128" on="1"/>
- <pt x="720" y="-25" on="0"/>
- <pt x="513" y="-25" on="1"/>
- <pt x="347" y="-25" on="0"/>
- <pt x="230" y="77" on="1"/>
- <pt x="158" y="-25" on="1"/>
- </contour>
- <contour>
- <pt x="698" y="873" on="1"/>
- <pt x="638" y="1043" on="0"/>
- <pt x="513" y="1043" on="1"/>
- <pt x="404" y="1043" on="0"/>
- <pt x="341" y="907" on="1"/>
- <pt x="278" y="772" on="0"/>
- <pt x="278" y="547" on="1"/>
- <pt x="278" y="439" on="0"/>
- <pt x="301" y="312" on="1"/>
- </contour>
- <contour>
- <pt x="326" y="213" on="1"/>
- <pt x="386" y="43" on="0"/>
- <pt x="512" y="43" on="1"/>
- <pt x="621" y="43" on="0"/>
- <pt x="684" y="179" on="1"/>
- <pt x="747" y="315" on="0"/>
- <pt x="747" y="541" on="1"/>
- <pt x="747" y="644" on="0"/>
- <pt x="724" y="773" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 33 17 18 24 17 7 48 84 18 2 7 1 1 1 39 31 30 22 20 12 9 1 8
- 1 2 3 0 0 1 11 10 2 13 1 0 1 21 0 2 0 14 0 0 37 10 14 28 10
- 3 48 196 39 31 30 22 21 20 14 12 11 10 9 3 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="otilde" xMin="62" yMin="-25" xMax="962" yMax="1518">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="171" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="p" xMin="0" yMin="-395" xMax="956" yMax="1110">
- <contour>
- <pt x="0" y="-395" on="1"/>
- <pt x="0" y="-333" on="1"/>
- <pt x="19" y="-332" on="1"/>
- <pt x="92" y="-328" on="0"/>
- <pt x="105" y="-306" on="1"/>
- <pt x="118" y="-287" on="0"/>
- <pt x="119" y="-235" on="1"/>
- <pt x="121" y="-136" on="1"/>
- <pt x="121" y="827" on="1"/>
- <pt x="119" y="925" on="1"/>
- <pt x="119" y="993" on="0"/>
- <pt x="94" y="1007" on="1"/>
- <pt x="74" y="1019" on="0"/>
- <pt x="19" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="318" y="1086" on="1"/>
- <pt x="318" y="907" on="1"/>
- <pt x="376" y="998" on="0"/>
- <pt x="432" y="1044" on="1"/>
- <pt x="512" y="1110" on="0"/>
- <pt x="610" y="1110" on="1"/>
- <pt x="770" y="1110" on="0"/>
- <pt x="863" y="968" on="1"/>
- <pt x="956" y="826" on="0"/>
- <pt x="956" y="575" on="1"/>
- <pt x="956" y="293" on="0"/>
- <pt x="835" y="134" on="1"/>
- <pt x="714" y="-25" on="0"/>
- <pt x="503" y="-25" on="1"/>
- <pt x="429" y="-25" on="0"/>
- <pt x="318" y="0" on="1"/>
- <pt x="318" y="-136" on="1"/>
- <pt x="320" y="-235" on="1"/>
- <pt x="321" y="-304" on="0"/>
- <pt x="345" y="-317" on="1"/>
- <pt x="367" y="-329" on="0"/>
- <pt x="421" y="-332" on="1"/>
- <pt x="439" y="-333" on="1"/>
- <pt x="439" y="-395" on="1"/>
- </contour>
- <contour>
- <pt x="318" y="77" on="1"/>
- <pt x="399" y="54" on="0"/>
- <pt x="449" y="54" on="1"/>
- <pt x="585" y="54" on="0"/>
- <pt x="664" y="181" on="1"/>
- <pt x="743" y="308" on="0"/>
- <pt x="743" y="536" on="1"/>
- <pt x="743" y="983" on="0"/>
- <pt x="542" y="983" on="1"/>
- <pt x="449" y="983" on="0"/>
- <pt x="318" y="837" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 48 29 21 42 21 29 48 84 29 2 21 1 1 50 40 17 14 8 5 15 2 3 0
- 1 38 32 31 7 1 5 2 0 3 0 39 0 1 0 16 15 1 14 0 0 46 10 25 48
- 196 39 38 2 13 25 16 15 14 1 0 4 13 7 0 0 50 40 32 31 17 16 4 5 7
- 1 4 48 196 8 7 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="paragraph" xMin="15" yMin="-296" xMax="805" yMax="1489">
- <contour>
- <pt x="484" y="-296" on="1"/>
- <pt x="484" y="740" on="1"/>
- <pt x="291" y="744" on="0"/>
- <pt x="171" y="834" on="1"/>
- <pt x="15" y="951" on="0"/>
- <pt x="15" y="1159" on="1"/>
- <pt x="15" y="1362" on="0"/>
- <pt x="150" y="1440" on="1"/>
- <pt x="233" y="1489" on="0"/>
- <pt x="360" y="1487" on="1"/>
- <pt x="431" y="1486" on="1"/>
- <pt x="536" y="1482" on="1"/>
- <pt x="653" y="1480" on="1"/>
- <pt x="805" y="1480" on="1"/>
- <pt x="805" y="-296" on="1"/>
- <pt x="731" y="-296" on="1"/>
- <pt x="731" y="1382" on="1"/>
- <pt x="558" y="1382" on="1"/>
- <pt x="558" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 1 1 16 2 2 0 1 18 15 14 0 4 13 2 0 0 0 17 16 9 1 12 1 4 48
- 84 13 12 0 14 12 15 17 2 5 0 0 0 16 15 21 1 13 1 0 21 1 17 2 4
- 48 196 14 13 1 18 17 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenleft" xMin="116" yMin="-296" xMax="579" yMax="1579">
- <contour>
- <pt x="579" y="-234" on="1"/>
- <pt x="579" y="-296" on="1"/>
- <pt x="384" y="-169" on="0"/>
- <pt x="268" y="38" on="1"/>
- <pt x="116" y="312" on="0"/>
- <pt x="116" y="643" on="1"/>
- <pt x="116" y="983" on="0"/>
- <pt x="286" y="1271" on="1"/>
- <pt x="398" y="1462" on="0"/>
- <pt x="579" y="1579" on="1"/>
- <pt x="579" y="1517" on="1"/>
- <pt x="440" y="1355" on="0"/>
- <pt x="382" y="1195" on="1"/>
- <pt x="313" y="1003" on="0"/>
- <pt x="313" y="642" on="1"/>
- <pt x="313" y="266" on="0"/>
- <pt x="389" y="70" on="1"/>
- <pt x="447" y="-81" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 10 9 1 0 14 0 0 14 5 5 48 196 10 9 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenright" xMin="104" yMin="-296" xMax="567" yMax="1579">
- <contour>
- <pt x="104" y="1517" on="1"/>
- <pt x="104" y="1579" on="1"/>
- <pt x="299" y="1452" on="0"/>
- <pt x="415" y="1245" on="1"/>
- <pt x="567" y="971" on="0"/>
- <pt x="567" y="640" on="1"/>
- <pt x="567" y="299" on="0"/>
- <pt x="397" y="12" on="1"/>
- <pt x="285" y="-178" on="0"/>
- <pt x="104" y="-296" on="1"/>
- <pt x="104" y="-234" on="1"/>
- <pt x="244" y="-72" on="0"/>
- <pt x="300" y="88" on="1"/>
- <pt x="369" y="280" on="0"/>
- <pt x="369" y="639" on="1"/>
- <pt x="369" y="1016" on="0"/>
- <pt x="293" y="1214" on="1"/>
- <pt x="236" y="1363" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 10 9 1 0 14 0 0 14 5 5 48 196 10 9 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="percent" xMin="120" yMin="-37" xMax="1585" yMax="1517">
- <contour>
- <pt x="195" y="-37" on="1"/>
- <pt x="1385" y="1517" on="1"/>
- <pt x="1509" y="1517" on="1"/>
- <pt x="320" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="435" y="1480" on="1"/>
- <pt x="573" y="1480" on="0"/>
- <pt x="661" y="1377" on="1"/>
- <pt x="749" y="1274" on="0"/>
- <pt x="749" y="1110" on="1"/>
- <pt x="749" y="945" on="0"/>
- <pt x="660" y="843" on="1"/>
- <pt x="571" y="740" on="0"/>
- <pt x="430" y="740" on="1"/>
- <pt x="309" y="740" on="0"/>
- <pt x="226" y="824" on="1"/>
- <pt x="120" y="931" on="0"/>
- <pt x="120" y="1110" on="1"/>
- <pt x="120" y="1273" on="0"/>
- <pt x="208" y="1376" on="1"/>
- <pt x="296" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="434" y="1419" on="1"/>
- <pt x="268" y="1419" on="0"/>
- <pt x="268" y="1111" on="1"/>
- <pt x="268" y="802" on="0"/>
- <pt x="433" y="802" on="1"/>
- <pt x="601" y="802" on="0"/>
- <pt x="601" y="1116" on="1"/>
- <pt x="601" y="1419" on="0"/>
- </contour>
- <contour>
- <pt x="1270" y="740" on="1"/>
- <pt x="1409" y="740" on="0"/>
- <pt x="1497" y="636" on="1"/>
- <pt x="1585" y="533" on="0"/>
- <pt x="1585" y="370" on="1"/>
- <pt x="1585" y="205" on="0"/>
- <pt x="1496" y="103" on="1"/>
- <pt x="1407" y="0" on="0"/>
- <pt x="1266" y="0" on="1"/>
- <pt x="1144" y="0" on="0"/>
- <pt x="1062" y="84" on="1"/>
- <pt x="956" y="192" on="0"/>
- <pt x="956" y="370" on="1"/>
- <pt x="956" y="533" on="0"/>
- <pt x="1044" y="636" on="1"/>
- <pt x="1132" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="1270" y="679" on="1"/>
- <pt x="1104" y="679" on="0"/>
- <pt x="1104" y="370" on="1"/>
- <pt x="1104" y="61" on="0"/>
- <pt x="1269" y="61" on="1"/>
- <pt x="1437" y="61" on="0"/>
- <pt x="1437" y="374" on="1"/>
- <pt x="1437" y="679" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 0 0 48 11 36 44 11 28 24 11 12 20 11 4 48 84 36 2 4 0 28 12 1 1 28
- 12 2 0 2 3 0 0 1 2 1 2 13 0 0 1 3 0 2 0 14 0 0 50 47 32
- 46 47 40 26 47 8 22 47 16 48 196 40 32 16 8 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="period" xMin="133" yMin="0" xMax="380" yMax="247">
- <contour>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="247" on="1"/>
- <pt x="380" y="247" on="1"/>
- <pt x="380" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 6 1 0 1 4 48 84 3 0 1 0 14 0 0 3 2 6 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered" xMin="133" yMin="491" xMax="380" yMax="738">
- <contour>
- <pt x="133" y="491" on="1"/>
- <pt x="133" y="738" on="1"/>
- <pt x="380" y="738" on="1"/>
- <pt x="380" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 6 1 1 1 4 48 84 2 1 1 0 14 0 0 3 2 6 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered#1" xMin="133" yMin="491" xMax="380" yMax="738">
- <contour>
- <pt x="133" y="491" on="1"/>
- <pt x="133" y="738" on="1"/>
- <pt x="380" y="738" on="1"/>
- <pt x="380" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 6 1 1 1 4 48 84 2 1 1 0 14 0 0 3 2 6 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="perthousand" xMin="34" yMin="-37" xMax="2014" yMax="1517">
- <contour>
- <pt x="349" y="1480" on="1"/>
- <pt x="487" y="1480" on="0"/>
- <pt x="575" y="1377" on="1"/>
- <pt x="663" y="1273" on="0"/>
- <pt x="663" y="1111" on="1"/>
- <pt x="663" y="945" on="0"/>
- <pt x="575" y="843" on="1"/>
- <pt x="487" y="740" on="0"/>
- <pt x="345" y="740" on="1"/>
- <pt x="224" y="740" on="0"/>
- <pt x="140" y="824" on="1"/>
- <pt x="34" y="932" on="0"/>
- <pt x="34" y="1110" on="1"/>
- <pt x="34" y="1273" on="0"/>
- <pt x="122" y="1376" on="1"/>
- <pt x="210" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="349" y="1419" on="1"/>
- <pt x="182" y="1419" on="0"/>
- <pt x="182" y="1111" on="1"/>
- <pt x="182" y="802" on="0"/>
- <pt x="347" y="802" on="1"/>
- <pt x="515" y="802" on="0"/>
- <pt x="515" y="1112" on="1"/>
- <pt x="515" y="1419" on="0"/>
- </contour>
- <contour>
- <pt x="972" y="740" on="1"/>
- <pt x="1110" y="740" on="0"/>
- <pt x="1198" y="636" on="1"/>
- <pt x="1286" y="532" on="0"/>
- <pt x="1286" y="370" on="1"/>
- <pt x="1286" y="205" on="0"/>
- <pt x="1198" y="103" on="1"/>
- <pt x="1110" y="0" on="0"/>
- <pt x="968" y="0" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="763" y="84" on="1"/>
- <pt x="657" y="192" on="0"/>
- <pt x="657" y="370" on="1"/>
- <pt x="657" y="532" on="0"/>
- <pt x="745" y="636" on="1"/>
- <pt x="834" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="972" y="679" on="1"/>
- <pt x="805" y="679" on="0"/>
- <pt x="805" y="371" on="1"/>
- <pt x="805" y="61" on="0"/>
- <pt x="971" y="61" on="1"/>
- <pt x="1138" y="61" on="0"/>
- <pt x="1138" y="371" on="1"/>
- <pt x="1138" y="679" on="0"/>
- </contour>
- <contour>
- <pt x="1700" y="740" on="1"/>
- <pt x="1838" y="740" on="0"/>
- <pt x="1926" y="636" on="1"/>
- <pt x="2014" y="532" on="0"/>
- <pt x="2014" y="370" on="1"/>
- <pt x="2014" y="205" on="0"/>
- <pt x="1926" y="103" on="1"/>
- <pt x="1838" y="0" on="0"/>
- <pt x="1696" y="0" on="1"/>
- <pt x="1575" y="0" on="0"/>
- <pt x="1491" y="84" on="1"/>
- <pt x="1385" y="192" on="0"/>
- <pt x="1385" y="370" on="1"/>
- <pt x="1385" y="532" on="0"/>
- <pt x="1473" y="636" on="1"/>
- <pt x="1562" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="1700" y="679" on="1"/>
- <pt x="1533" y="679" on="0"/>
- <pt x="1533" y="371" on="1"/>
- <pt x="1533" y="61" on="0"/>
- <pt x="1698" y="61" on="1"/>
- <pt x="1866" y="61" on="0"/>
- <pt x="1866" y="375" on="1"/>
- <pt x="1866" y="679" on="0"/>
- </contour>
- <contour>
- <pt x="73" y="-37" on="1"/>
- <pt x="1162" y="1517" on="1"/>
- <pt x="1248" y="1517" on="1"/>
- <pt x="160" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 68 11 56 64 11 48 44 11 32 40 11 24 20 11 8 16 11 0 48 84 56 2 32
- 2 0 0 48 24 8 1 1 48 24 8 3 0 2 3 0 0 1 74 73 2 13 0 0 1
- 75 72 2 0 14 0 0 70 47 52 66 47 60 46 47 28 42 47 36 22 47 4 18 47 12
- 48 196 75 74 73 72 60 52 36 28 12 4
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plus" xMin="84" yMin="99" xMax="1071" yMax="1086">
- <contour>
- <pt x="528" y="99" on="1"/>
- <pt x="528" y="543" on="1"/>
- <pt x="84" y="543" on="1"/>
- <pt x="84" y="642" on="1"/>
- <pt x="528" y="642" on="1"/>
- <pt x="528" y="1086" on="1"/>
- <pt x="627" y="1086" on="1"/>
- <pt x="627" y="642" on="1"/>
- <pt x="1071" y="642" on="1"/>
- <pt x="1071" y="543" on="1"/>
- <pt x="627" y="543" on="1"/>
- <pt x="627" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 6 5 2 13 3 11 0 1 0 0 10 9 2 1 9 3 3 1 4 48 84 8 7 4 3
- 3 0 14 9 8 2 13 6 3 2 0 0 0 11 10 7 6 9 3 0 1 4 48 196 5
- 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plusminus" xMin="84" yMin="0" xMax="1071" yMax="1184">
- <contour>
- <pt x="84" y="0" on="1"/>
- <pt x="84" y="99" on="1"/>
- <pt x="1071" y="99" on="1"/>
- <pt x="1071" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="528" y="296" on="1"/>
- <pt x="528" y="691" on="1"/>
- <pt x="84" y="691" on="1"/>
- <pt x="84" y="790" on="1"/>
- <pt x="528" y="790" on="1"/>
- <pt x="528" y="1184" on="1"/>
- <pt x="627" y="1184" on="1"/>
- <pt x="627" y="790" on="1"/>
- <pt x="1071" y="790" on="1"/>
- <pt x="1071" y="691" on="1"/>
- <pt x="627" y="691" on="1"/>
- <pt x="627" y="296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 15 4 2 5 1 3 10 9 2 13 7 0 0 14 13 6 5 9 3 7 2 1 9 1 0
- 2 4 48 84 12 11 8 7 3 3 0 1 2 0 14 13 12 3 2 4 13 10 7 6 1
- 0 4 13 4 0 0 15 14 11 10 9 3 4 1 4 48 196 9 8 5 4 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="q" xMin="68" yMin="-395" xMax="1024" yMax="1110">
- <contour>
- <pt x="585" y="-395" on="1"/>
- <pt x="585" y="-333" on="1"/>
- <pt x="604" y="-332" on="1"/>
- <pt x="677" y="-327" on="0"/>
- <pt x="690" y="-306" on="1"/>
- <pt x="703" y="-286" on="0"/>
- <pt x="704" y="-235" on="1"/>
- <pt x="706" y="-136" on="1"/>
- <pt x="706" y="179" on="1"/>
- <pt x="648" y="87" on="0"/>
- <pt x="592" y="41" on="1"/>
- <pt x="512" y="-25" on="0"/>
- <pt x="414" y="-25" on="1"/>
- <pt x="254" y="-25" on="0"/>
- <pt x="161" y="118" on="1"/>
- <pt x="68" y="260" on="0"/>
- <pt x="68" y="510" on="1"/>
- <pt x="68" y="793" on="0"/>
- <pt x="189" y="951" on="1"/>
- <pt x="310" y="1110" on="0"/>
- <pt x="523" y="1110" on="1"/>
- <pt x="597" y="1110" on="0"/>
- <pt x="706" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="903" y="-136" on="1"/>
- <pt x="905" y="-235" on="1"/>
- <pt x="905" y="-303" on="0"/>
- <pt x="930" y="-317" on="1"/>
- <pt x="952" y="-329" on="0"/>
- <pt x="1006" y="-332" on="1"/>
- <pt x="1024" y="-333" on="1"/>
- <pt x="1024" y="-395" on="1"/>
- </contour>
- <contour>
- <pt x="706" y="1008" on="1"/>
- <pt x="626" y="1032" on="0"/>
- <pt x="576" y="1032" on="1"/>
- <pt x="439" y="1032" on="0"/>
- <pt x="360" y="905" on="1"/>
- <pt x="281" y="777" on="0"/>
- <pt x="281" y="551" on="1"/>
- <pt x="281" y="103" on="0"/>
- <pt x="482" y="103" on="1"/>
- <pt x="576" y="103" on="0"/>
- <pt x="706" y="248" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 40 29 12 34 21 20 48 84 20 1 12 2 1 42 32 8 3 22 2 3 0 1 30
- 24 7 1 4 2 0 3 0 31 0 1 0 23 22 1 14 0 0 38 10 16 48 196 31 30
- 2 13 23 1 0 16 7 0 0 42 32 22 8 7 4 4 23 1 4 48 196 24 23 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="question" xMin="51" yMin="0" xMax="851" yMax="1517">
- <contour>
- <pt x="271" y="0" on="1"/>
- <pt x="271" y="197" on="1"/>
- <pt x="468" y="197" on="1"/>
- <pt x="468" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="271" y="395" on="1"/>
- <pt x="271" y="413" on="1"/>
- <pt x="271" y="617" on="0"/>
- <pt x="413" y="758" on="1"/>
- <pt x="453" y="798" on="1"/>
- <pt x="641" y="986" on="0"/>
- <pt x="641" y="1184" on="1"/>
- <pt x="641" y="1309" on="0"/>
- <pt x="569" y="1382" on="1"/>
- <pt x="498" y="1456" on="0"/>
- <pt x="371" y="1456" on="1"/>
- <pt x="161" y="1456" on="0"/>
- <pt x="155" y="1305" on="1"/>
- <pt x="151" y="1198" on="1"/>
- <pt x="150" y="1177" on="1"/>
- <pt x="51" y="1177" on="1"/>
- <pt x="51" y="1451" on="1"/>
- <pt x="248" y="1517" on="0"/>
- <pt x="413" y="1517" on="1"/>
- <pt x="610" y="1517" on="0"/>
- <pt x="731" y="1427" on="1"/>
- <pt x="851" y="1338" on="0"/>
- <pt x="851" y="1194" on="1"/>
- <pt x="851" y="1029" on="0"/>
- <pt x="641" y="868" on="1"/>
- <pt x="595" y="832" on="0"/>
- <pt x="577" y="815" on="1"/>
- <pt x="540" y="781" on="1"/>
- <pt x="468" y="715" on="0"/>
- <pt x="468" y="532" on="1"/>
- <pt x="468" y="395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 14 11 22 48 84 22 0 1 33 20 19 18 5 5 0 4 3 0 0 0 2 1 5
- 1 0 1 4 48 84 34 4 1 3 0 1 2 0 14 0 0 10 10 26 48 196 18 0 19
- 2 26 2 0 0 34 33 3 2 4 3 0 1 4 48 196 34 33 3 2 3 20 19 1 5
- 4 1 0 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="questiondown" xMin="51" yMin="-37" xMax="851" yMax="1480">
- <contour>
- <pt x="631" y="1480" on="1"/>
- <pt x="631" y="1283" on="1"/>
- <pt x="433" y="1283" on="1"/>
- <pt x="433" y="1480" on="1"/>
- </contour>
- <contour>
- <pt x="631" y="1086" on="1"/>
- <pt x="631" y="1067" on="1"/>
- <pt x="631" y="864" on="0"/>
- <pt x="488" y="722" on="1"/>
- <pt x="448" y="683" on="1"/>
- <pt x="261" y="500" on="0"/>
- <pt x="261" y="297" on="1"/>
- <pt x="261" y="172" on="0"/>
- <pt x="333" y="99" on="1"/>
- <pt x="404" y="25" on="0"/>
- <pt x="531" y="25" on="1"/>
- <pt x="739" y="25" on="0"/>
- <pt x="746" y="176" on="1"/>
- <pt x="751" y="282" on="1"/>
- <pt x="752" y="303" on="1"/>
- <pt x="851" y="303" on="1"/>
- <pt x="851" y="30" on="1"/>
- <pt x="658" y="-37" on="0"/>
- <pt x="488" y="-37" on="1"/>
- <pt x="291" y="-37" on="0"/>
- <pt x="171" y="53" on="1"/>
- <pt x="51" y="142" on="0"/>
- <pt x="51" y="286" on="1"/>
- <pt x="51" y="396" on="0"/>
- <pt x="139" y="500" on="1"/>
- <pt x="181" y="550" on="0"/>
- <pt x="261" y="613" on="1"/>
- <pt x="305" y="647" on="0"/>
- <pt x="325" y="666" on="1"/>
- <pt x="361" y="700" on="1"/>
- <pt x="433" y="767" on="0"/>
- <pt x="433" y="948" on="1"/>
- <pt x="433" y="1086" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 14 11 22 48 84 22 2 1 35 20 19 18 5 5 4 2 3 0 0 0 2 1 5
- 1 0 1 4 48 84 36 4 1 3 0 0 14 0 0 10 10 26 48 196 18 19 0 2 26
- 2 0 0 5 4 1 0 4 3 2 1 4 48 196 20 19 1 36 35 3 2 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedbl" xMin="146" yMin="1086" xMax="689" yMax="1579">
- <contour>
- <pt x="214" y="1086" on="1"/>
- <pt x="146" y="1579" on="1"/>
- <pt x="343" y="1579" on="1"/>
- <pt x="276" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="559" y="1086" on="1"/>
- <pt x="491" y="1579" on="1"/>
- <pt x="689" y="1579" on="1"/>
- <pt x="621" y="1086" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 4 3 0 4 13 1 6 5 2 1 3 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblbase" xMin="146" yMin="-321" xMax="788" yMax="247">
- <contour>
- <pt x="639" y="0" on="1"/>
- <pt x="541" y="0" on="1"/>
- <pt x="541" y="247" on="1"/>
- <pt x="788" y="247" on="1"/>
- <pt x="788" y="32" on="1"/>
- <pt x="788" y="-107" on="0"/>
- <pt x="771" y="-151" on="1"/>
- <pt x="750" y="-213" on="0"/>
- <pt x="678" y="-270" on="1"/>
- <pt x="618" y="-317" on="0"/>
- <pt x="541" y="-321" on="1"/>
- <pt x="541" y="-259" on="1"/>
- <pt x="639" y="-251" on="0"/>
- <pt x="639" y="-65" on="1"/>
- </contour>
- <contour>
- <pt x="245" y="0" on="1"/>
- <pt x="146" y="0" on="1"/>
- <pt x="146" y="247" on="1"/>
- <pt x="393" y="247" on="1"/>
- <pt x="393" y="32" on="1"/>
- <pt x="393" y="-107" on="0"/>
- <pt x="376" y="-151" on="1"/>
- <pt x="354" y="-216" on="0"/>
- <pt x="283" y="-270" on="1"/>
- <pt x="223" y="-317" on="0"/>
- <pt x="146" y="-321" on="1"/>
- <pt x="146" y="-259" on="1"/>
- <pt x="245" y="-251" on="0"/>
- <pt x="245" y="-65" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 27 25 24 18 15 14 13 11 10 4 1 0 12 13 2 17 16 3 2 3 0 14 13 0 2
- 3 1 3 27 14 2 17 15 3 0 0 18 17 6 1 15 11 10 2 1 6 3 3 2 4
- 48 196 25 24 16 15 3 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblleft" xMin="122" yMin="1012" xMax="764" yMax="1579">
- <contour>
- <pt x="270" y="1258" on="1"/>
- <pt x="369" y="1258" on="1"/>
- <pt x="369" y="1012" on="1"/>
- <pt x="122" y="1012" on="1"/>
- <pt x="122" y="1226" on="1"/>
- <pt x="122" y="1367" on="0"/>
- <pt x="138" y="1410" on="1"/>
- <pt x="160" y="1474" on="0"/>
- <pt x="232" y="1529" on="1"/>
- <pt x="292" y="1575" on="0"/>
- <pt x="369" y="1579" on="1"/>
- <pt x="369" y="1517" on="1"/>
- <pt x="270" y="1509" on="0"/>
- <pt x="270" y="1323" on="1"/>
- </contour>
- <contour>
- <pt x="665" y="1258" on="1"/>
- <pt x="764" y="1258" on="1"/>
- <pt x="764" y="1012" on="1"/>
- <pt x="517" y="1012" on="1"/>
- <pt x="517" y="1226" on="1"/>
- <pt x="517" y="1368" on="0"/>
- <pt x="533" y="1409" on="1"/>
- <pt x="556" y="1476" on="0"/>
- <pt x="627" y="1529" on="1"/>
- <pt x="687" y="1574" on="0"/>
- <pt x="764" y="1579" on="1"/>
- <pt x="764" y="1517" on="1"/>
- <pt x="665" y="1509" on="0"/>
- <pt x="665" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 27 25 24 18 15 14 13 11 10 4 1 0 12 13 2 17 16 3 2 3 0 14 27 14 2
- 15 17 3 13 0 2 1 3 3 0 0 18 17 6 1 15 11 10 2 1 6 3 3 2 4
- 48 196 25 24 16 15 3 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblright" xMin="146" yMin="1012" xMax="788" yMax="1579">
- <contour>
- <pt x="639" y="1332" on="1"/>
- <pt x="541" y="1332" on="1"/>
- <pt x="541" y="1579" on="1"/>
- <pt x="788" y="1579" on="1"/>
- <pt x="788" y="1365" on="1"/>
- <pt x="788" y="1226" on="0"/>
- <pt x="771" y="1181" on="1"/>
- <pt x="750" y="1118" on="0"/>
- <pt x="678" y="1062" on="1"/>
- <pt x="618" y="1017" on="0"/>
- <pt x="541" y="1012" on="1"/>
- <pt x="541" y="1073" on="1"/>
- <pt x="639" y="1082" on="0"/>
- <pt x="639" y="1268" on="1"/>
- </contour>
- <contour>
- <pt x="245" y="1332" on="1"/>
- <pt x="146" y="1332" on="1"/>
- <pt x="146" y="1579" on="1"/>
- <pt x="393" y="1579" on="1"/>
- <pt x="393" y="1365" on="1"/>
- <pt x="393" y="1226" on="0"/>
- <pt x="376" y="1181" on="1"/>
- <pt x="353" y="1115" on="0"/>
- <pt x="283" y="1062" on="1"/>
- <pt x="223" y="1017" on="0"/>
- <pt x="146" y="1012" on="1"/>
- <pt x="146" y="1073" on="1"/>
- <pt x="245" y="1082" on="0"/>
- <pt x="245" y="1268" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 27 25 24 18 15 14 13 11 10 4 1 0 12 13 2 17 16 3 2 3 0 14 13 0 2
- 3 1 3 27 14 2 17 15 3 0 0 18 17 6 1 15 11 10 2 1 6 3 3 2 4
- 48 196 25 24 16 15 3 4 3 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quoteleft" xMin="205" yMin="1012" xMax="452" yMax="1579">
- <contour>
- <pt x="353" y="1258" on="1"/>
- <pt x="452" y="1258" on="1"/>
- <pt x="452" y="1012" on="1"/>
- <pt x="205" y="1012" on="1"/>
- <pt x="205" y="1226" on="1"/>
- <pt x="205" y="1367" on="0"/>
- <pt x="221" y="1410" on="1"/>
- <pt x="243" y="1474" on="0"/>
- <pt x="315" y="1529" on="1"/>
- <pt x="375" y="1575" on="0"/>
- <pt x="452" y="1579" on="1"/>
- <pt x="452" y="1517" on="1"/>
- <pt x="353" y="1509" on="0"/>
- <pt x="353" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 13 11 10 4 1 0 6 13 2 3 2 1 0 14 13 0 2 1 3 3 0 0 11 10 2
- 1 6 3 3 1 4 48 196 4 3 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotereversed"/><!-- contains no outline data -->
-
- <TTGlyph name="quoteright" xMin="230" yMin="1012" xMax="477" yMax="1579">
- <contour>
- <pt x="329" y="1332" on="1"/>
- <pt x="230" y="1332" on="1"/>
- <pt x="230" y="1579" on="1"/>
- <pt x="477" y="1579" on="1"/>
- <pt x="477" y="1365" on="1"/>
- <pt x="477" y="1226" on="0"/>
- <pt x="460" y="1181" on="1"/>
- <pt x="437" y="1115" on="0"/>
- <pt x="367" y="1062" on="1"/>
- <pt x="307" y="1017" on="0"/>
- <pt x="230" y="1012" on="1"/>
- <pt x="230" y="1073" on="1"/>
- <pt x="329" y="1082" on="0"/>
- <pt x="329" y="1268" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 13 11 10 4 1 0 6 13 2 3 2 1 0 14 13 0 2 3 1 3 0 0 4 3 6
- 1 1 1 4 48 196 11 10 2 1 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesinglbase" xMin="230" yMin="-321" xMax="477" yMax="247">
- <contour>
- <pt x="329" y="0" on="1"/>
- <pt x="230" y="0" on="1"/>
- <pt x="230" y="247" on="1"/>
- <pt x="477" y="247" on="1"/>
- <pt x="477" y="32" on="1"/>
- <pt x="477" y="-107" on="0"/>
- <pt x="460" y="-151" on="1"/>
- <pt x="438" y="-216" on="0"/>
- <pt x="367" y="-270" on="1"/>
- <pt x="307" y="-317" on="0"/>
- <pt x="230" y="-321" on="1"/>
- <pt x="230" y="-259" on="1"/>
- <pt x="329" y="-251" on="0"/>
- <pt x="329" y="-65" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 13 11 10 4 1 0 6 13 2 3 2 1 0 14 13 0 2 3 1 3 0 0 4 3 6
- 1 1 1 4 48 196 11 10 2 1 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesingle" xMin="61" yMin="1036" xMax="308" yMax="1579">
- <contour>
- <pt x="154" y="1036" on="1"/>
- <pt x="61" y="1579" on="1"/>
- <pt x="308" y="1579" on="1"/>
- <pt x="215" y="1036" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 3 0 1 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="r" xMin="31" yMin="0" xMax="670" yMax="1110">
- <contour>
- <pt x="31" y="0" on="1"/>
- <pt x="31" y="62" on="1"/>
- <pt x="50" y="63" on="1"/>
- <pt x="123" y="67" on="0"/>
- <pt x="136" y="89" on="1"/>
- <pt x="149" y="108" on="0"/>
- <pt x="150" y="160" on="1"/>
- <pt x="152" y="259" on="1"/>
- <pt x="152" y="827" on="1"/>
- <pt x="150" y="925" on="1"/>
- <pt x="150" y="993" on="0"/>
- <pt x="125" y="1007" on="1"/>
- <pt x="105" y="1019" on="0"/>
- <pt x="50" y="1023" on="1"/>
- <pt x="31" y="1024" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="349" y="1086" on="1"/>
- <pt x="349" y="907" on="1"/>
- <pt x="458" y="1110" on="0"/>
- <pt x="609" y="1110" on="1"/>
- <pt x="640" y="1110" on="0"/>
- <pt x="670" y="1099" on="1"/>
- <pt x="670" y="802" on="1"/>
- <pt x="578" y="802" on="1"/>
- <pt x="576" y="820" on="1"/>
- <pt x="575" y="827" on="1"/>
- <pt x="575" y="833" on="0"/>
- <pt x="574" y="845" on="1"/>
- <pt x="574" y="852" on="0"/>
- <pt x="573" y="862" on="1"/>
- <pt x="569" y="939" on="0"/>
- <pt x="517" y="939" on="1"/>
- <pt x="435" y="939" on="0"/>
- <pt x="349" y="814" on="1"/>
- <pt x="349" y="259" on="1"/>
- <pt x="351" y="160" on="1"/>
- <pt x="352" y="91" on="0"/>
- <pt x="376" y="78" on="1"/>
- <pt x="398" y="66" on="0"/>
- <pt x="452" y="63" on="1"/>
- <pt x="470" y="62" on="1"/>
- <pt x="470" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 31 13 19 48 84 19 1 40 34 33 23 22 17 14 8 7 1 10 15 0 3 21 15
- 41 0 1 0 16 15 1 14 41 40 23 3 21 16 3 15 14 1 0 4 13 7 0 0 34
- 33 17 16 4 3 7 1 4 48 196 22 21 1 8 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="racute" xMin="31" yMin="0" xMax="671" yMax="1604">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="80" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="radicalex" xMin="99" yMin="1480" xMax="926" yMax="1604">
- <contour>
- <pt x="99" y="1480" on="1"/>
- <pt x="99" y="1604" on="1"/>
- <pt x="926" y="1604" on="1"/>
- <pt x="926" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="rcaron" xMin="-12" yMin="0" xMax="691" yMax="1604">
- <component glyphName="r" x="-1" y="0" flags="0x4"/>
- <component glyphName="caron" x="-2" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="rcommaaccent" xMin="31" yMin="-432" xMax="670" yMax="1110">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-18" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="registered" xMin="87" yMin="49" xMax="1469" yMax="1431">
- <contour>
- <pt x="779" y="1431" on="1"/>
- <pt x="1063" y="1431" on="0"/>
- <pt x="1266" y="1229" on="1"/>
- <pt x="1469" y="1027" on="0"/>
- <pt x="1469" y="741" on="1"/>
- <pt x="1469" y="452" on="0"/>
- <pt x="1265" y="251" on="1"/>
- <pt x="1062" y="49" on="0"/>
- <pt x="770" y="49" on="1"/>
- <pt x="519" y="49" on="0"/>
- <pt x="331" y="213" on="1"/>
- <pt x="87" y="426" on="0"/>
- <pt x="87" y="740" on="1"/>
- <pt x="87" y="1027" on="0"/>
- <pt x="290" y="1229" on="1"/>
- <pt x="493" y="1431" on="0"/>
- </contour>
- <contour>
- <pt x="778" y="1369" on="1"/>
- <pt x="518" y="1369" on="0"/>
- <pt x="334" y="1185" on="1"/>
- <pt x="149" y="1001" on="0"/>
- <pt x="149" y="740" on="1"/>
- <pt x="149" y="483" on="0"/>
- <pt x="333" y="297" on="1"/>
- <pt x="516" y="111" on="0"/>
- <pt x="773" y="111" on="1"/>
- <pt x="1010" y="111" on="0"/>
- <pt x="1184" y="259" on="1"/>
- <pt x="1407" y="450" on="0"/>
- <pt x="1407" y="742" on="1"/>
- <pt x="1407" y="1002" on="0"/>
- <pt x="1222" y="1185" on="1"/>
- <pt x="1037" y="1369" on="0"/>
- </contour>
- <contour>
- <pt x="692" y="683" on="1"/>
- <pt x="692" y="486" on="1"/>
- <pt x="694" y="432" on="1"/>
- <pt x="695" y="394" on="0"/>
- <pt x="707" y="388" on="1"/>
- <pt x="721" y="382" on="0"/>
- <pt x="759" y="379" on="1"/>
- <pt x="759" y="327" on="1"/>
- <pt x="455" y="327" on="1"/>
- <pt x="455" y="379" on="1"/>
- <pt x="482" y="381" on="1"/>
- <pt x="525" y="385" on="0"/>
- <pt x="526" y="432" on="1"/>
- <pt x="529" y="486" on="1"/>
- <pt x="529" y="982" on="1"/>
- <pt x="526" y="1036" on="1"/>
- <pt x="525" y="1082" on="0"/>
- <pt x="482" y="1087" on="1"/>
- <pt x="455" y="1090" on="1"/>
- <pt x="455" y="1141" on="1"/>
- <pt x="678" y="1141" on="1"/>
- <pt x="729" y="1142" on="1"/>
- <pt x="778" y="1144" on="1"/>
- <pt x="827" y="1145" on="1"/>
- <pt x="927" y="1147" on="0"/>
- <pt x="993" y="1109" on="1"/>
- <pt x="1080" y="1059" on="0"/>
- <pt x="1080" y="937" on="1"/>
- <pt x="1080" y="775" on="0"/>
- <pt x="923" y="706" on="1"/>
- <pt x="1082" y="485" on="1"/>
- <pt x="1126" y="429" on="1"/>
- <pt x="1155" y="391" on="0"/>
- <pt x="1179" y="384" on="1"/>
- <pt x="1179" y="327" on="1"/>
- <pt x="987" y="327" on="1"/>
- <pt x="761" y="683" on="1"/>
- </contour>
- <contour>
- <pt x="692" y="738" on="1"/>
- <pt x="722" y="738" on="1"/>
- <pt x="909" y="738" on="0"/>
- <pt x="909" y="926" on="1"/>
- <pt x="909" y="1087" on="0"/>
- <pt x="753" y="1087" on="1"/>
- <pt x="692" y="1087" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 101 values pushed */
- 0 0 24 11 8 16 11 0 48 84 8 2 0 0 75 74 70 69 68 65 62 61 50 46 45
- 41 38 33 32 15 51 39 3 52 51 1 67 66 40 39 3 2 0 14 0 0 72 18 59 28
- 11 4 20 11 12 48 196 52 32 45 2 74 70 68 67 66 65 62 61 39 38 10 13 59 4
- 32 51 50 41 40 4 13 12 45 0 0 75 69 33 32 26 3 45 1 4 48 196 46 45 1
- 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ring" xMin="114" yMin="1283" xMax="568" yMax="1737">
- <contour>
- <pt x="341" y="1737" on="1"/>
- <pt x="435" y="1737" on="0"/>
- <pt x="501" y="1671" on="1"/>
- <pt x="568" y="1605" on="0"/>
- <pt x="568" y="1511" on="1"/>
- <pt x="568" y="1415" on="0"/>
- <pt x="501" y="1349" on="1"/>
- <pt x="435" y="1283" on="0"/>
- <pt x="339" y="1283" on="1"/>
- <pt x="256" y="1283" on="0"/>
- <pt x="194" y="1337" on="1"/>
- <pt x="114" y="1406" on="0"/>
- <pt x="114" y="1510" on="1"/>
- <pt x="114" y="1605" on="0"/>
- <pt x="180" y="1671" on="1"/>
- <pt x="246" y="1737" on="0"/>
- </contour>
- <contour>
- <pt x="341" y="1669" on="1"/>
- <pt x="275" y="1669" on="0"/>
- <pt x="229" y="1623" on="1"/>
- <pt x="182" y="1576" on="0"/>
- <pt x="182" y="1511" on="1"/>
- <pt x="182" y="1445" on="0"/>
- <pt x="228" y="1398" on="1"/>
- <pt x="275" y="1351" on="0"/>
- <pt x="339" y="1351" on="1"/>
- <pt x="400" y="1351" on="0"/>
- <pt x="444" y="1388" on="1"/>
- <pt x="500" y="1437" on="0"/>
- <pt x="500" y="1511" on="1"/>
- <pt x="500" y="1577" on="0"/>
- <pt x="453" y="1623" on="1"/>
- <pt x="407" y="1669" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 24 17 8 16 17 0 48 84 8 0 14 0 0 28 17 4 20 17 12 48 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="s" xMin="95" yMin="-25" xMax="733" yMax="1110">
- <contour>
- <pt x="95" y="56" on="1"/>
- <pt x="95" y="307" on="1"/>
- <pt x="194" y="307" on="1"/>
- <pt x="195" y="289" on="1"/>
- <pt x="198" y="218" on="1"/>
- <pt x="205" y="43" on="0"/>
- <pt x="374" y="43" on="1"/>
- <pt x="536" y="43" on="0"/>
- <pt x="536" y="232" on="1"/>
- <pt x="536" y="325" on="0"/>
- <pt x="498" y="368" on="1"/>
- <pt x="467" y="405" on="0"/>
- <pt x="390" y="456" on="1"/>
- <pt x="332" y="495" on="1"/>
- <pt x="189" y="591" on="0"/>
- <pt x="145" y="653" on="1"/>
- <pt x="101" y="715" on="0"/>
- <pt x="101" y="819" on="1"/>
- <pt x="101" y="1110" on="0"/>
- <pt x="411" y="1110" on="1"/>
- <pt x="536" y="1110" on="0"/>
- <pt x="656" y="1049" on="1"/>
- <pt x="656" y="814" on="1"/>
- <pt x="558" y="814" on="1"/>
- <pt x="558" y="832" on="1"/>
- <pt x="558" y="1043" on="0"/>
- <pt x="426" y="1043" on="1"/>
- <pt x="286" y="1043" on="0"/>
- <pt x="286" y="881" on="1"/>
- <pt x="286" y="761" on="0"/>
- <pt x="378" y="701" on="1"/>
- <pt x="464" y="645" on="1"/>
- <pt x="520" y="607" on="1"/>
- <pt x="652" y="518" on="0"/>
- <pt x="692" y="458" on="1"/>
- <pt x="733" y="398" on="0"/>
- <pt x="733" y="294" on="1"/>
- <pt x="733" y="141" on="0"/>
- <pt x="644" y="58" on="1"/>
- <pt x="554" y="-25" on="0"/>
- <pt x="395" y="-25" on="1"/>
- <pt x="256" y="-25" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 26 17 19 6 17 40 48 84 40 2 19 1 1 1 24 23 22 21 2 1 0 7 1
- 2 3 0 0 14 0 0 28 16 17 8 5 36 48 196 17 24 23 17 2 4 21 0 3 36
- 21 22 21 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sacute" xMin="95" yMin="-25" xMax="776" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="185" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scaron" xMin="66" yMin="-25" xMax="769" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="76" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scedilla" xMin="95" yMin="-432" xMax="733" yMax="1110">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="70" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scircumflex" xMin="62" yMin="-25" xMax="765" yMax="1604">
- <contour>
- <pt x="94" y="56" on="1"/>
- <pt x="94" y="307" on="1"/>
- <pt x="193" y="307" on="1"/>
- <pt x="194" y="289" on="1"/>
- <pt x="197" y="218" on="1"/>
- <pt x="204" y="43" on="0"/>
- <pt x="373" y="43" on="1"/>
- <pt x="535" y="43" on="0"/>
- <pt x="535" y="231" on="1"/>
- <pt x="535" y="326" on="0"/>
- <pt x="498" y="368" on="1"/>
- <pt x="465" y="405" on="0"/>
- <pt x="389" y="456" on="1"/>
- <pt x="331" y="495" on="1"/>
- <pt x="189" y="591" on="0"/>
- <pt x="144" y="653" on="1"/>
- <pt x="100" y="715" on="0"/>
- <pt x="100" y="819" on="1"/>
- <pt x="100" y="1110" on="0"/>
- <pt x="410" y="1110" on="1"/>
- <pt x="536" y="1110" on="0"/>
- <pt x="655" y="1049" on="1"/>
- <pt x="655" y="814" on="1"/>
- <pt x="557" y="814" on="1"/>
- <pt x="557" y="832" on="1"/>
- <pt x="557" y="1043" on="0"/>
- <pt x="425" y="1043" on="1"/>
- <pt x="285" y="1043" on="0"/>
- <pt x="285" y="881" on="1"/>
- <pt x="285" y="761" on="0"/>
- <pt x="377" y="701" on="1"/>
- <pt x="463" y="645" on="1"/>
- <pt x="519" y="607" on="1"/>
- <pt x="652" y="517" on="0"/>
- <pt x="691" y="458" on="1"/>
- <pt x="732" y="398" on="0"/>
- <pt x="732" y="294" on="1"/>
- <pt x="732" y="141" on="0"/>
- <pt x="643" y="58" on="1"/>
- <pt x="554" y="-25" on="0"/>
- <pt x="394" y="-25" on="1"/>
- <pt x="255" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="62" y="1283" on="1"/>
- <pt x="303" y="1604" on="1"/>
- <pt x="525" y="1604" on="1"/>
- <pt x="765" y="1283" on="1"/>
- <pt x="679" y="1283" on="1"/>
- <pt x="414" y="1505" on="1"/>
- <pt x="148" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 91 values pushed */
- 0 0 26 17 19 6 17 40 48 84 40 2 19 1 1 47 43 0 2 0 1 1 48 46 45
- 42 4 0 1 3 0 0 1 1 24 23 22 21 2 1 0 7 1 2 3 0 0 44 43 1
- 0 14 0 0 28 16 17 8 5 36 48 196 17 48 47 44 43 24 23 17 2 8 21 0 3
- 46 45 2 13 36 21 42 0 22 21 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="scommaaccent" xMin="95" yMin="-432" xMax="733" yMax="1110">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="79" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="section" xMin="75" yMin="-321" xMax="962" yMax="1517">
- <contour>
- <pt x="75" y="-258" on="1"/>
- <pt x="75" y="-37" on="1"/>
- <pt x="174" y="-37" on="1"/>
- <pt x="175" y="-56" on="1"/>
- <pt x="178" y="-104" on="1"/>
- <pt x="182" y="-170" on="0"/>
- <pt x="276" y="-215" on="1"/>
- <pt x="368" y="-260" on="0"/>
- <pt x="498" y="-260" on="1"/>
- <pt x="628" y="-260" on="0"/>
- <pt x="708" y="-192" on="1"/>
- <pt x="788" y="-125" on="0"/>
- <pt x="788" y="-19" on="1"/>
- <pt x="788" y="67" on="0"/>
- <pt x="724" y="113" on="1"/>
- <pt x="671" y="150" on="0"/>
- <pt x="556" y="198" on="1"/>
- <pt x="449" y="243" on="1"/>
- <pt x="249" y="327" on="0"/>
- <pt x="167" y="406" on="1"/>
- <pt x="86" y="485" on="0"/>
- <pt x="86" y="595" on="1"/>
- <pt x="86" y="746" on="0"/>
- <pt x="257" y="889" on="1"/>
- <pt x="182" y="931" on="0"/>
- <pt x="144" y="979" on="1"/>
- <pt x="89" y="1050" on="0"/>
- <pt x="89" y="1150" on="1"/>
- <pt x="89" y="1318" on="0"/>
- <pt x="218" y="1417" on="1"/>
- <pt x="348" y="1517" on="0"/>
- <pt x="570" y="1517" on="1"/>
- <pt x="735" y="1517" on="0"/>
- <pt x="914" y="1461" on="1"/>
- <pt x="914" y="1234" on="1"/>
- <pt x="816" y="1234" on="1"/>
- <pt x="814" y="1252" on="1"/>
- <pt x="812" y="1313" on="1"/>
- <pt x="810" y="1376" on="0"/>
- <pt x="735" y="1416" on="1"/>
- <pt x="661" y="1456" on="0"/>
- <pt x="551" y="1456" on="1"/>
- <pt x="422" y="1456" on="0"/>
- <pt x="342" y="1386" on="1"/>
- <pt x="263" y="1317" on="0"/>
- <pt x="263" y="1206" on="1"/>
- <pt x="263" y="1128" on="0"/>
- <pt x="308" y="1081" on="1"/>
- <pt x="354" y="1031" on="0"/>
- <pt x="468" y="984" on="1"/>
- <pt x="575" y="940" on="1"/>
- <pt x="801" y="847" on="0"/>
- <pt x="873" y="778" on="1"/>
- <pt x="943" y="710" on="0"/>
- <pt x="943" y="589" on="1"/>
- <pt x="943" y="437" on="0"/>
- <pt x="782" y="291" on="1"/>
- <pt x="863" y="244" on="0"/>
- <pt x="903" y="194" on="1"/>
- <pt x="962" y="121" on="0"/>
- <pt x="962" y="23" on="1"/>
- <pt x="962" y="-137" on="0"/>
- <pt x="838" y="-229" on="1"/>
- <pt x="714" y="-321" on="0"/>
- <pt x="490" y="-321" on="1"/>
- <pt x="303" y="-321" on="0"/>
- </contour>
- <contour>
- <pt x="728" y="329" on="1"/>
- <pt x="793" y="422" on="0"/>
- <pt x="793" y="510" on="1"/>
- <pt x="793" y="634" on="0"/>
- <pt x="652" y="697" on="1"/>
- <pt x="443" y="791" on="1"/>
- <pt x="304" y="852" on="1"/>
- <pt x="253" y="759" on="0"/>
- <pt x="253" y="685" on="1"/>
- <pt x="253" y="572" on="0"/>
- <pt x="337" y="514" on="1"/>
- <pt x="410" y="464" on="0"/>
- <pt x="589" y="388" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 41 11 31 8 11 64 48 84 31 0 1 72 66 56 35 34 33 23 2 1 0 10 13
- 64 0 0 14 0 0 74 18 21 68 47 54 45 18 27 12 18 60 48 196 27 21 72 66 56
- 35 27 23 21 2 8 33 0 3 60 54 33 34 33 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon" xMin="161" yMin="-321" xMax="408" yMax="1086">
- <contour>
- <pt x="260" y="0" on="1"/>
- <pt x="161" y="0" on="1"/>
- <pt x="161" y="247" on="1"/>
- <pt x="408" y="247" on="1"/>
- <pt x="408" y="32" on="1"/>
- <pt x="408" y="-107" on="0"/>
- <pt x="391" y="-151" on="1"/>
- <pt x="369" y="-216" on="0"/>
- <pt x="298" y="-270" on="1"/>
- <pt x="238" y="-317" on="0"/>
- <pt x="161" y="-321" on="1"/>
- <pt x="161" y="-259" on="1"/>
- <pt x="260" y="-251" on="0"/>
- <pt x="260" y="-65" on="1"/>
- </contour>
- <contour>
- <pt x="161" y="839" on="1"/>
- <pt x="161" y="1086" on="1"/>
- <pt x="408" y="1086" on="1"/>
- <pt x="408" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 1 4 2 2 2 0 1 13 11 10 1 0 5 13 2 0 0 0 17 14 6 1 15 1 4
- 48 84 3 2 1 0 16 15 1 14 13 0 2 3 1 3 0 0 17 16 4 3 6 3 1
- 1 4 48 196 15 14 11 10 2 1 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon#1" xMin="161" yMin="-321" xMax="408" yMax="1086">
- <contour>
- <pt x="260" y="0" on="1"/>
- <pt x="161" y="0" on="1"/>
- <pt x="161" y="247" on="1"/>
- <pt x="408" y="247" on="1"/>
- <pt x="408" y="32" on="1"/>
- <pt x="408" y="-107" on="0"/>
- <pt x="391" y="-151" on="1"/>
- <pt x="369" y="-216" on="0"/>
- <pt x="298" y="-270" on="1"/>
- <pt x="238" y="-317" on="0"/>
- <pt x="161" y="-321" on="1"/>
- <pt x="161" y="-259" on="1"/>
- <pt x="260" y="-251" on="0"/>
- <pt x="260" y="-65" on="1"/>
- </contour>
- <contour>
- <pt x="161" y="839" on="1"/>
- <pt x="161" y="1086" on="1"/>
- <pt x="408" y="1086" on="1"/>
- <pt x="408" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 1 4 2 2 2 0 1 13 11 10 1 0 5 13 2 0 0 0 17 14 6 1 15 1 4
- 48 84 3 2 1 0 16 15 1 14 13 0 2 3 1 3 0 0 17 16 4 3 6 3 1
- 1 4 48 196 15 14 11 10 2 1 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="seven" xMin="108" yMin="0" xMax="996" yMax="1480">
- <contour>
- <pt x="182" y="0" on="1"/>
- <pt x="268" y="469" on="0"/>
- <pt x="731" y="1095" on="1"/>
- <pt x="879" y="1295" on="1"/>
- <pt x="108" y="1295" on="1"/>
- <pt x="108" y="1480" on="1"/>
- <pt x="996" y="1480" on="1"/>
- <pt x="996" y="1351" on="1"/>
- <pt x="746" y="1010" on="0"/>
- <pt x="590" y="648" on="1"/>
- <pt x="434" y="285" on="0"/>
- <pt x="416" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 35 values pushed */
- 7 5 3 2 0 0 4 3 28 1 5 1 4 48 84 11 0 1 0 6 5 0 14 11 7
- 6 3 0 5 13 4 5 4 1 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sfthyphen" xMin="82" yMin="543" xMax="600" yMax="666">
- <contour>
- <pt x="82" y="543" on="1"/>
- <pt x="82" y="666" on="1"/>
- <pt x="600" y="666" on="1"/>
- <pt x="600" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="six" xMin="49" yMin="-37" xMax="987" yMax="1518">
- <contour>
- <pt x="259" y="757" on="1"/>
- <pt x="311" y="843" on="0"/>
- <pt x="370" y="887" on="1"/>
- <pt x="455" y="950" on="0"/>
- <pt x="575" y="950" on="1"/>
- <pt x="755" y="950" on="0"/>
- <pt x="871" y="821" on="1"/>
- <pt x="987" y="692" on="0"/>
- <pt x="987" y="488" on="1"/>
- <pt x="987" y="264" on="0"/>
- <pt x="853" y="114" on="1"/>
- <pt x="720" y="-37" on="0"/>
- <pt x="522" y="-37" on="1"/>
- <pt x="303" y="-37" on="0"/>
- <pt x="176" y="161" on="1"/>
- <pt x="49" y="358" on="0"/>
- <pt x="49" y="700" on="1"/>
- <pt x="49" y="1078" on="0"/>
- <pt x="197" y="1298" on="1"/>
- <pt x="345" y="1518" on="0"/>
- <pt x="608" y="1518" on="1"/>
- <pt x="772" y="1518" on="0"/>
- <pt x="904" y="1452" on="1"/>
- <pt x="904" y="1227" on="1"/>
- <pt x="805" y="1227" on="1"/>
- <pt x="804" y="1248" on="1"/>
- <pt x="799" y="1359" on="0"/>
- <pt x="754" y="1405" on="1"/>
- <pt x="710" y="1450" on="0"/>
- <pt x="611" y="1450" on="1"/>
- <pt x="424" y="1450" on="0"/>
- <pt x="329" y="1212" on="1"/>
- <pt x="262" y="1043" on="0"/>
- </contour>
- <contour>
- <pt x="525" y="880" on="1"/>
- <pt x="413" y="880" on="0"/>
- <pt x="339" y="785" on="1"/>
- <pt x="265" y="691" on="0"/>
- <pt x="265" y="542" on="1"/>
- <pt x="265" y="352" on="0"/>
- <pt x="333" y="210" on="1"/>
- <pt x="419" y="31" on="0"/>
- <pt x="551" y="31" on="1"/>
- <pt x="659" y="31" on="0"/>
- <pt x="722" y="148" on="1"/>
- <pt x="786" y="265" on="0"/>
- <pt x="786" y="463" on="1"/>
- <pt x="786" y="880" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 41 17 12 33 17 4 29 17 20 48 84 20 0 12 2 4 1 1 24 23 22 4 0
- 5 0 2 3 0 0 14 0 0 45 5 8 37 10 16 48 196 8 22 24 0 16 22 23 22
- 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="slash" xMin="-30" yMin="-296" xMax="600" yMax="1481">
- <contour>
- <pt x="-30" y="-296" on="1"/>
- <pt x="496" y="1481" on="1"/>
- <pt x="600" y="1481" on="1"/>
- <pt x="74" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="space"/><!-- contains no outline data -->
-
- <TTGlyph name="sterling" xMin="74" yMin="0" xMax="925" yMax="1505">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="148" on="1"/>
- <pt x="198" y="181" on="0"/>
- <pt x="241" y="263" on="1"/>
- <pt x="284" y="344" on="0"/>
- <pt x="284" y="547" on="1"/>
- <pt x="284" y="740" on="1"/>
- <pt x="111" y="740" on="1"/>
- <pt x="111" y="802" on="1"/>
- <pt x="284" y="802" on="1"/>
- <pt x="284" y="1024" on="1"/>
- <pt x="284" y="1505" on="0"/>
- <pt x="653" y="1505" on="1"/>
- <pt x="786" y="1505" on="0"/>
- <pt x="925" y="1435" on="1"/>
- <pt x="925" y="1221" on="1"/>
- <pt x="827" y="1221" on="1"/>
- <pt x="825" y="1240" on="1"/>
- <pt x="822" y="1314" on="1"/>
- <pt x="817" y="1444" on="0"/>
- <pt x="663" y="1444" on="1"/>
- <pt x="547" y="1444" on="0"/>
- <pt x="511" y="1363" on="1"/>
- <pt x="481" y="1294" on="0"/>
- <pt x="481" y="1138" on="1"/>
- <pt x="481" y="802" on="1"/>
- <pt x="716" y="802" on="1"/>
- <pt x="716" y="740" on="1"/>
- <pt x="481" y="740" on="1"/>
- <pt x="481" y="586" on="1"/>
- <pt x="481" y="306" on="0"/>
- <pt x="199" y="148" on="1"/>
- <pt x="925" y="148" on="1"/>
- <pt x="925" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 98 values pushed */
- 0 0 20 11 12 48 84 12 0 1 24 16 15 14 10 5 0 8 3 0 29 5 2 6 1
- 3 0 0 28 27 7 6 14 3 8 32 31 1 19 2 0 2 4 48 84 26 25 9 8 3
- 33 0 1 2 0 14 27 26 16 3 14 24 3 31 8 7 3 5 0 3 0 0 29 28 25
- 24 4 3 5 1 4 48 196 33 32 15 14 3 10 9 6 5 3 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="t" xMin="25" yMin="-25" xMax="558" yMax="1332">
- <contour>
- <pt x="136" y="999" on="1"/>
- <pt x="25" y="999" on="1"/>
- <pt x="25" y="1086" on="1"/>
- <pt x="136" y="1086" on="1"/>
- <pt x="136" y="1283" on="1"/>
- <pt x="334" y="1332" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="558" y="1086" on="1"/>
- <pt x="558" y="999" on="1"/>
- <pt x="334" y="999" on="1"/>
- <pt x="334" y="313" on="1"/>
- <pt x="334" y="226" on="1"/>
- <pt x="334" y="55" on="0"/>
- <pt x="438" y="55" on="1"/>
- <pt x="477" y="55" on="0"/>
- <pt x="533" y="86" on="1"/>
- <pt x="533" y="6" on="1"/>
- <pt x="455" y="-25" on="0"/>
- <pt x="389" y="-25" on="1"/>
- <pt x="251" y="-25" on="0"/>
- <pt x="193" y="56" on="1"/>
- <pt x="136" y="137" on="0"/>
- <pt x="136" y="339" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 18 2 11 16 1 22 16 10 3 0 2 3 0 5 4 2 13 2 0 0 9 8 1 0 3
- 2 1 6 48 84 7 6 3 2 1 3 14 16 11 8 7 2 13 5 2 1 0 0 0 11
- 10 9 6 5 4 4 0 1 4 48 196 22 4 3 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tbar" xMin="25" yMin="-25" xMax="558" yMax="1332">
- <contour>
- <pt x="136" y="617" on="1"/>
- <pt x="25" y="617" on="1"/>
- <pt x="25" y="691" on="1"/>
- <pt x="136" y="691" on="1"/>
- <pt x="136" y="999" on="1"/>
- <pt x="25" y="999" on="1"/>
- <pt x="25" y="1086" on="1"/>
- <pt x="136" y="1086" on="1"/>
- <pt x="136" y="1283" on="1"/>
- <pt x="334" y="1332" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="558" y="1086" on="1"/>
- <pt x="558" y="999" on="1"/>
- <pt x="334" y="999" on="1"/>
- <pt x="334" y="691" on="1"/>
- <pt x="558" y="691" on="1"/>
- <pt x="558" y="617" on="1"/>
- <pt x="334" y="617" on="1"/>
- <pt x="334" y="313" on="1"/>
- <pt x="334" y="226" on="1"/>
- <pt x="334" y="55" on="0"/>
- <pt x="438" y="55" on="1"/>
- <pt x="477" y="55" on="0"/>
- <pt x="533" y="86" on="1"/>
- <pt x="533" y="6" on="1"/>
- <pt x="455" y="-25" on="0"/>
- <pt x="389" y="-25" on="1"/>
- <pt x="251" y="-25" on="0"/>
- <pt x="193" y="56" on="1"/>
- <pt x="136" y="137" on="0"/>
- <pt x="136" y="339" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 26 2 19 24 1 30 24 18 3 0 2 3 0 9 8 2 13 6 0 0 13 12 5 4 3
- 6 1 6 17 16 1 0 21 3 2 1 4 48 84 15 14 3 2 3 0 11 10 7 6 1
- 3 14 24 19 16 15 12 11 4 13 9 6 5 2 1 4 13 0 0 0 19 18 17 14 13
- 10 9 4 6 0 1 4 48 196 30 8 7 4 3 0 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcaron" xMin="25" yMin="-25" xMax="679" yMax="1688">
- <contour>
- <pt x="136" y="999" on="1"/>
- <pt x="25" y="999" on="1"/>
- <pt x="25" y="1086" on="1"/>
- <pt x="136" y="1086" on="1"/>
- <pt x="136" y="1283" on="1"/>
- <pt x="334" y="1332" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="558" y="1086" on="1"/>
- <pt x="558" y="999" on="1"/>
- <pt x="334" y="999" on="1"/>
- <pt x="334" y="313" on="1"/>
- <pt x="334" y="226" on="1"/>
- <pt x="334" y="55" on="0"/>
- <pt x="438" y="55" on="1"/>
- <pt x="477" y="55" on="0"/>
- <pt x="533" y="86" on="1"/>
- <pt x="533" y="6" on="1"/>
- <pt x="455" y="-25" on="0"/>
- <pt x="389" y="-25" on="1"/>
- <pt x="251" y="-25" on="0"/>
- <pt x="193" y="56" on="1"/>
- <pt x="136" y="137" on="0"/>
- <pt x="136" y="339" on="1"/>
- </contour>
- <contour>
- <pt x="561" y="1491" on="1"/>
- <pt x="482" y="1491" on="1"/>
- <pt x="482" y="1688" on="1"/>
- <pt x="679" y="1688" on="1"/>
- <pt x="679" y="1517" on="1"/>
- <pt x="679" y="1354" on="0"/>
- <pt x="617" y="1289" on="1"/>
- <pt x="570" y="1240" on="0"/>
- <pt x="482" y="1234" on="1"/>
- <pt x="482" y="1284" on="1"/>
- <pt x="561" y="1290" on="0"/>
- <pt x="561" y="1439" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 18 2 11 16 34 32 31 27 24 23 5 4 8 25 2 3 1 22 16 10 3 0 2 3 0
- 0 0 9 8 1 0 3 2 1 6 48 84 26 25 1 0 7 6 3 2 1 3 14 16 11
- 34 23 8 7 4 26 24 3 2 1 0 0 0 32 31 25 24 4 3 26 11 10 9 6 5
- 4 4 0 2 4 48 196 27 26 1 22 4 3 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommaaccent" xMin="25" yMin="-432" xMax="558" yMax="1332">
- <contour>
- <pt x="136" y="999" on="1"/>
- <pt x="25" y="999" on="1"/>
- <pt x="25" y="1086" on="1"/>
- <pt x="136" y="1086" on="1"/>
- <pt x="136" y="1283" on="1"/>
- <pt x="334" y="1332" on="1"/>
- <pt x="334" y="1086" on="1"/>
- <pt x="558" y="1086" on="1"/>
- <pt x="558" y="999" on="1"/>
- <pt x="334" y="999" on="1"/>
- <pt x="334" y="313" on="1"/>
- <pt x="334" y="226" on="1"/>
- <pt x="334" y="55" on="0"/>
- <pt x="438" y="55" on="1"/>
- <pt x="477" y="55" on="0"/>
- <pt x="533" y="86" on="1"/>
- <pt x="533" y="6" on="1"/>
- <pt x="455" y="-25" on="0"/>
- <pt x="389" y="-25" on="1"/>
- <pt x="251" y="-25" on="0"/>
- <pt x="193" y="56" on="1"/>
- <pt x="136" y="137" on="0"/>
- <pt x="136" y="339" on="1"/>
- </contour>
- <contour>
- <pt x="186" y="-411" on="1"/>
- <pt x="186" y="-343" on="1"/>
- <pt x="248" y="-359" on="0"/>
- <pt x="287" y="-359" on="1"/>
- <pt x="394" y="-359" on="0"/>
- <pt x="394" y="-277" on="1"/>
- <pt x="394" y="-179" on="0"/>
- <pt x="207" y="-175" on="1"/>
- <pt x="302" y="0" on="1"/>
- <pt x="381" y="0" on="1"/>
- <pt x="315" y="-119" on="1"/>
- <pt x="411" y="-127" on="0"/>
- <pt x="460" y="-152" on="1"/>
- <pt x="532" y="-189" on="0"/>
- <pt x="532" y="-266" on="1"/>
- <pt x="532" y="-336" on="0"/>
- <pt x="474" y="-384" on="1"/>
- <pt x="417" y="-432" on="0"/>
- <pt x="330" y="-432" on="1"/>
- <pt x="262" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 104 values pushed */
- 0 0 26 17 41 48 84 18 2 11 16 1 22 16 10 3 0 2 3 0 5 4 2 13 2
- 1 33 32 31 30 24 23 6 13 41 2 0 0 0 9 8 1 0 3 2 1 6 48 84 7
- 6 3 2 1 3 14 0 0 28 48 37 48 196 16 11 33 31 30 24 23 5 5 0 3 32
- 8 7 3 13 37 5 2 1 0 0 0 11 10 9 6 5 4 4 0 1 4 48 196 22 4
- 3 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommabelow" xMin="25" yMin="-432" xMax="558" yMax="1332">
- <component glyphName="t" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-9" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="thorn" xMin="0" yMin="-395" xMax="956" yMax="1579">
- <contour>
- <pt x="0" y="-395" on="1"/>
- <pt x="0" y="-333" on="1"/>
- <pt x="19" y="-332" on="1"/>
- <pt x="92" y="-328" on="0"/>
- <pt x="105" y="-306" on="1"/>
- <pt x="118" y="-286" on="0"/>
- <pt x="119" y="-234" on="1"/>
- <pt x="121" y="-136" on="1"/>
- <pt x="119" y="1426" on="1"/>
- <pt x="119" y="1489" on="0"/>
- <pt x="93" y="1501" on="1"/>
- <pt x="71" y="1513" on="0"/>
- <pt x="19" y="1516" on="1"/>
- <pt x="0" y="1517" on="1"/>
- <pt x="0" y="1579" on="1"/>
- <pt x="318" y="1579" on="1"/>
- <pt x="318" y="907" on="1"/>
- <pt x="376" y="999" on="0"/>
- <pt x="432" y="1044" on="1"/>
- <pt x="512" y="1110" on="0"/>
- <pt x="610" y="1110" on="1"/>
- <pt x="769" y="1110" on="0"/>
- <pt x="863" y="968" on="1"/>
- <pt x="956" y="826" on="0"/>
- <pt x="956" y="575" on="1"/>
- <pt x="956" y="293" on="0"/>
- <pt x="835" y="134" on="1"/>
- <pt x="714" y="-25" on="0"/>
- <pt x="503" y="-25" on="1"/>
- <pt x="429" y="-25" on="0"/>
- <pt x="318" y="0" on="1"/>
- <pt x="318" y="-136" on="1"/>
- <pt x="320" y="-235" on="1"/>
- <pt x="321" y="-304" on="0"/>
- <pt x="345" y="-317" on="1"/>
- <pt x="367" y="-329" on="0"/>
- <pt x="421" y="-332" on="1"/>
- <pt x="439" y="-333" on="1"/>
- <pt x="439" y="-395" on="1"/>
- </contour>
- <contour>
- <pt x="318" y="77" on="1"/>
- <pt x="399" y="54" on="0"/>
- <pt x="449" y="54" on="1"/>
- <pt x="585" y="54" on="0"/>
- <pt x="664" y="181" on="1"/>
- <pt x="743" y="308" on="0"/>
- <pt x="743" y="536" on="1"/>
- <pt x="743" y="983" on="0"/>
- <pt x="542" y="983" on="1"/>
- <pt x="449" y="983" on="0"/>
- <pt x="318" y="837" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 47 29 20 41 21 28 48 84 28 2 20 1 1 13 14 1 2 0 1 1 49 39 16
- 3 1 2 3 0 0 1 37 31 30 7 1 5 2 0 3 0 15 14 1 38 0 1 2 0
- 14 0 0 45 10 24 48 196 38 37 2 13 24 15 14 13 7 1 0 5 13 15 49 39 31
- 30 16 15 5 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="three" xMin="93" yMin="-37" xMax="910" yMax="1517">
- <contour>
- <pt x="93" y="10" on="1"/>
- <pt x="93" y="271" on="1"/>
- <pt x="191" y="271" on="1"/>
- <pt x="192" y="249" on="1"/>
- <pt x="195" y="182" on="1"/>
- <pt x="198" y="113" on="0"/>
- <pt x="261" y="72" on="1"/>
- <pt x="324" y="31" on="0"/>
- <pt x="422" y="31" on="1"/>
- <pt x="550" y="31" on="0"/>
- <pt x="625" y="128" on="1"/>
- <pt x="700" y="226" on="0"/>
- <pt x="700" y="388" on="1"/>
- <pt x="700" y="565" on="0"/>
- <pt x="606" y="662" on="1"/>
- <pt x="512" y="759" on="0"/>
- <pt x="338" y="759" on="1"/>
- <pt x="228" y="759" on="1"/>
- <pt x="228" y="820" on="1"/>
- <pt x="294" y="820" on="1"/>
- <pt x="669" y="820" on="0"/>
- <pt x="669" y="1155" on="1"/>
- <pt x="669" y="1450" on="0"/>
- <pt x="418" y="1450" on="1"/>
- <pt x="334" y="1450" on="0"/>
- <pt x="270" y="1419" on="1"/>
- <pt x="235" y="1402" on="0"/>
- <pt x="222" y="1363" on="1"/>
- <pt x="212" y="1331" on="0"/>
- <pt x="204" y="1249" on="1"/>
- <pt x="202" y="1234" on="1"/>
- <pt x="104" y="1234" on="1"/>
- <pt x="104" y="1460" on="1"/>
- <pt x="271" y="1517" on="0"/>
- <pt x="428" y="1517" on="1"/>
- <pt x="634" y="1517" on="0"/>
- <pt x="750" y="1427" on="1"/>
- <pt x="866" y="1336" on="0"/>
- <pt x="866" y="1176" on="1"/>
- <pt x="866" y="1018" on="0"/>
- <pt x="753" y="914" on="1"/>
- <pt x="686" y="852" on="0"/>
- <pt x="555" y="800" on="1"/>
- <pt x="668" y="769" on="0"/>
- <pt x="726" y="734" on="1"/>
- <pt x="910" y="624" on="0"/>
- <pt x="910" y="404" on="1"/>
- <pt x="910" y="203" on="0"/>
- <pt x="778" y="83" on="1"/>
- <pt x="646" y="-37" on="0"/>
- <pt x="417" y="-37" on="1"/>
- <pt x="254" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 64 values pushed */
- 0 0 23 17 34 8 17 50 48 84 50 2 34 0 1 1 42 32 31 30 19 18 17 16 2
- 1 0 11 0 2 3 0 0 14 0 0 21 5 38 12 10 46 48 196 42 30 19 18 17 16
- 2 7 13 46 38 31 32 31 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threequarters" xMin="173" yMin="-37" xMax="1364" yMax="1517">
- <contour>
- <pt x="173" y="-37" on="1"/>
- <pt x="1261" y="1517" on="1"/>
- <pt x="1347" y="1517" on="1"/>
- <pt x="259" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="1065" y="0" on="1"/>
- <pt x="1065" y="39" on="1"/>
- <pt x="1075" y="39" on="1"/>
- <pt x="1126" y="39" on="0"/>
- <pt x="1139" y="48" on="1"/>
- <pt x="1153" y="56" on="0"/>
- <pt x="1155" y="88" on="1"/>
- <pt x="1158" y="137" on="1"/>
- <pt x="1158" y="205" on="1"/>
- <pt x="813" y="205" on="1"/>
- <pt x="813" y="271" on="1"/>
- <pt x="1181" y="751" on="1"/>
- <pt x="1271" y="751" on="1"/>
- <pt x="1271" y="294" on="1"/>
- <pt x="1364" y="294" on="1"/>
- <pt x="1364" y="205" on="1"/>
- <pt x="1271" y="205" on="1"/>
- <pt x="1271" y="137" on="1"/>
- <pt x="1274" y="88" on="1"/>
- <pt x="1276" y="52" on="0"/>
- <pt x="1297" y="45" on="1"/>
- <pt x="1313" y="39" on="0"/>
- <pt x="1348" y="39" on="1"/>
- <pt x="1358" y="39" on="1"/>
- <pt x="1358" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="878" y="294" on="1"/>
- <pt x="1158" y="294" on="1"/>
- <pt x="1158" y="658" on="1"/>
- </contour>
- <contour>
- <pt x="173" y="766" on="1"/>
- <pt x="173" y="901" on="1"/>
- <pt x="232" y="901" on="1"/>
- <pt x="232" y="891" on="1"/>
- <pt x="233" y="881" on="1"/>
- <pt x="233" y="872" on="1"/>
- <pt x="234" y="865" on="0"/>
- <pt x="234" y="861" on="1"/>
- <pt x="234" y="858" on="1"/>
- <pt x="234" y="779" on="0"/>
- <pt x="353" y="779" on="1"/>
- <pt x="502" y="779" on="0"/>
- <pt x="502" y="951" on="1"/>
- <pt x="502" y="1133" on="0"/>
- <pt x="297" y="1133" on="1"/>
- <pt x="241" y="1133" on="1"/>
- <pt x="241" y="1172" on="1"/>
- <pt x="279" y="1172" on="1"/>
- <pt x="483" y="1172" on="0"/>
- <pt x="483" y="1334" on="1"/>
- <pt x="483" y="1479" on="0"/>
- <pt x="352" y="1479" on="1"/>
- <pt x="246" y="1479" on="0"/>
- <pt x="242" y="1415" on="1"/>
- <pt x="239" y="1370" on="1"/>
- <pt x="238" y="1362" on="1"/>
- <pt x="178" y="1362" on="1"/>
- <pt x="178" y="1487" on="1"/>
- <pt x="273" y="1517" on="0"/>
- <pt x="371" y="1517" on="1"/>
- <pt x="606" y="1517" on="0"/>
- <pt x="606" y="1344" on="1"/>
- <pt x="606" y="1214" on="0"/>
- <pt x="446" y="1158" on="1"/>
- <pt x="630" y="1110" on="0"/>
- <pt x="630" y="959" on="1"/>
- <pt x="630" y="858" on="0"/>
- <pt x="558" y="800" on="1"/>
- <pt x="486" y="741" on="0"/>
- <pt x="358" y="741" on="1"/>
- <pt x="260" y="741" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 150 values pushed */
- 0 0 53 45 61 42 45 71 48 84 14 17 12 2 27 26 21 11 6 5 6 12 4 3 65
- 59 58 57 49 48 47 46 40 39 37 36 35 34 33 32 31 16 15 2 1 21 13 71 61 17
- 3 0 4 0 0 30 29 18 17 46 3 12 1 4 48 84 20 19 13 12 3 28 4 1 2
- 0 14 0 0 51 44 63 44 44 67 48 196 15 1 2 16 11 3 28 27 26 19 18 2 6
- 13 16 65 59 58 57 49 48 47 46 40 39 37 36 35 34 33 32 29 14 13 6 5 4 3
- 0 24 13 67 63 11 0 0 31 30 12 11 15 3 16 1 4 48 196 21 20 17 16 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threesuperior" xMin="86" yMin="741" xMax="543" yMax="1517">
- <contour>
- <pt x="86" y="766" on="1"/>
- <pt x="86" y="901" on="1"/>
- <pt x="145" y="901" on="1"/>
- <pt x="145" y="891" on="1"/>
- <pt x="146" y="881" on="1"/>
- <pt x="146" y="872" on="1"/>
- <pt x="147" y="865" on="0"/>
- <pt x="147" y="861" on="1"/>
- <pt x="147" y="858" on="1"/>
- <pt x="147" y="779" on="0"/>
- <pt x="267" y="779" on="1"/>
- <pt x="415" y="779" on="0"/>
- <pt x="415" y="951" on="1"/>
- <pt x="415" y="1133" on="0"/>
- <pt x="210" y="1133" on="1"/>
- <pt x="154" y="1133" on="1"/>
- <pt x="154" y="1172" on="1"/>
- <pt x="192" y="1172" on="1"/>
- <pt x="396" y="1172" on="0"/>
- <pt x="396" y="1334" on="1"/>
- <pt x="396" y="1479" on="0"/>
- <pt x="265" y="1479" on="1"/>
- <pt x="159" y="1479" on="0"/>
- <pt x="155" y="1415" on="1"/>
- <pt x="152" y="1370" on="1"/>
- <pt x="151" y="1362" on="1"/>
- <pt x="91" y="1362" on="1"/>
- <pt x="91" y="1487" on="1"/>
- <pt x="192" y="1517" on="0"/>
- <pt x="284" y="1517" on="1"/>
- <pt x="519" y="1517" on="0"/>
- <pt x="519" y="1344" on="1"/>
- <pt x="519" y="1215" on="0"/>
- <pt x="359" y="1158" on="1"/>
- <pt x="466" y="1130" on="0"/>
- <pt x="508" y="1073" on="1"/>
- <pt x="543" y="1026" on="0"/>
- <pt x="543" y="959" on="1"/>
- <pt x="543" y="858" on="0"/>
- <pt x="471" y="800" on="1"/>
- <pt x="400" y="741" on="0"/>
- <pt x="271" y="741" on="1"/>
- <pt x="173" y="741" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 21 45 29 10 45 41 48 84 41 33 29 27 26 25 17 16 15 14 8 7 5 4 3
- 2 1 0 14 0 0 19 44 31 12 44 37 48 196 37 33 31 27 26 25 17 16 15 14 8
- 7 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tilde" xMin="8" yMin="1283" xMax="674" yMax="1518">
- <contour>
- <pt x="8" y="1283" on="1"/>
- <pt x="35" y="1423" on="0"/>
- <pt x="104" y="1476" on="1"/>
- <pt x="158" y="1518" on="0"/>
- <pt x="235" y="1518" on="1"/>
- <pt x="300" y="1518" on="0"/>
- <pt x="353" y="1480" on="1"/>
- <pt x="388" y="1455" on="1"/>
- <pt x="440" y="1418" on="0"/>
- <pt x="494" y="1418" on="1"/>
- <pt x="590" y="1418" on="0"/>
- <pt x="612" y="1517" on="1"/>
- <pt x="674" y="1517" on="1"/>
- <pt x="646" y="1378" on="0"/>
- <pt x="578" y="1325" on="1"/>
- <pt x="524" y="1283" on="0"/>
- <pt x="447" y="1283" on="1"/>
- <pt x="384" y="1283" on="0"/>
- <pt x="329" y="1321" on="1"/>
- <pt x="294" y="1345" on="1"/>
- <pt x="239" y="1383" on="0"/>
- <pt x="187" y="1383" on="1"/>
- <pt x="100" y="1383" on="0"/>
- <pt x="70" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 21 20 4 9 20 16 48 84 4 0 1 12 11 2 13 0 0 1 23 0 16 0 0
- 14 23 12 11 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="trademark" xMin="140" yMin="728" xMax="1867" yMax="1480">
- <contour>
- <pt x="411" y="1419" on="1"/>
- <pt x="226" y="1419" on="1"/>
- <pt x="226" y="1283" on="1"/>
- <pt x="140" y="1283" on="1"/>
- <pt x="140" y="1480" on="1"/>
- <pt x="819" y="1480" on="1"/>
- <pt x="819" y="1283" on="1"/>
- <pt x="732" y="1283" on="1"/>
- <pt x="732" y="1419" on="1"/>
- <pt x="547" y="1419" on="1"/>
- <pt x="547" y="790" on="1"/>
- <pt x="671" y="790" on="1"/>
- <pt x="671" y="728" on="1"/>
- <pt x="288" y="728" on="1"/>
- <pt x="288" y="790" on="1"/>
- <pt x="411" y="790" on="1"/>
- </contour>
- <contour>
- <pt x="1358" y="795" on="1"/>
- <pt x="1127" y="1413" on="1"/>
- <pt x="1127" y="728" on="1"/>
- <pt x="905" y="728" on="1"/>
- <pt x="905" y="790" on="1"/>
- <pt x="1028" y="790" on="1"/>
- <pt x="1028" y="1419" on="1"/>
- <pt x="893" y="1419" on="1"/>
- <pt x="893" y="1480" on="1"/>
- <pt x="1249" y="1480" on="1"/>
- <pt x="1414" y="1038" on="1"/>
- <pt x="1567" y="1480" on="1"/>
- <pt x="1867" y="1480" on="1"/>
- <pt x="1867" y="1419" on="1"/>
- <pt x="1744" y="1419" on="1"/>
- <pt x="1744" y="790" on="1"/>
- <pt x="1867" y="790" on="1"/>
- <pt x="1867" y="728" on="1"/>
- <pt x="1608" y="728" on="1"/>
- <pt x="1608" y="1413" on="1"/>
- <pt x="1395" y="795" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 133 values pushed */
- 36 35 32 31 26 21 20 17 16 15 14 11 10 7 6 3 2 17 0 12 3 0 0 30 29
- 23 22 9 8 1 0 14 7 4 1 4 48 84 34 33 19 18 13 12 5 0 28 27 25 24
- 5 4 0 5 14 36 27 26 25 16 5 34 17 3 24 23 20 19 4 21 5 3 12 11 8
- 7 4 5 9 3 14 13 2 1 4 0 3 3 33 32 29 28 4 13 30 0 0 35 34 23
- 1 30 22 21 9 1 17 10 9 23 1 0 3 4 48 196 31 30 1 18 17 1 6 5 1
- 15 0 1 4 3 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="two" xMin="68" yMin="0" xMax="906" yMax="1518">
- <contour>
- <pt x="68" y="0" on="1"/>
- <pt x="68" y="99" on="1"/>
- <pt x="103" y="253" on="0"/>
- <pt x="178" y="354" on="1"/>
- <pt x="246" y="447" on="0"/>
- <pt x="400" y="599" on="1"/>
- <pt x="463" y="662" on="1"/>
- <pt x="605" y="805" on="0"/>
- <pt x="649" y="893" on="1"/>
- <pt x="697" y="989" on="0"/>
- <pt x="697" y="1129" on="1"/>
- <pt x="697" y="1450" on="0"/>
- <pt x="444" y="1450" on="1"/>
- <pt x="346" y="1450" on="0"/>
- <pt x="272" y="1400" on="1"/>
- <pt x="240" y="1379" on="0"/>
- <pt x="230" y="1358" on="1"/>
- <pt x="206" y="1306" on="0"/>
- <pt x="201" y="1182" on="1"/>
- <pt x="200" y="1157" on="1"/>
- <pt x="101" y="1157" on="1"/>
- <pt x="101" y="1427" on="1"/>
- <pt x="290" y="1518" on="0"/>
- <pt x="480" y="1518" on="1"/>
- <pt x="906" y="1518" on="0"/>
- <pt x="906" y="1137" on="1"/>
- <pt x="906" y="999" on="0"/>
- <pt x="841" y="913" on="1"/>
- <pt x="791" y="847" on="0"/>
- <pt x="661" y="729" on="1"/>
- <pt x="561" y="638" on="1"/>
- <pt x="497" y="580" on="1"/>
- <pt x="338" y="437" on="0"/>
- <pt x="286" y="343" on="1"/>
- <pt x="244" y="268" on="0"/>
- <pt x="229" y="173" on="1"/>
- <pt x="900" y="173" on="1"/>
- <pt x="900" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 64 values pushed */
- 0 0 12 17 23 48 84 23 0 1 21 20 19 3 0 35 3 0 1 35 0 2 0 0 36
- 35 13 1 0 1 4 48 84 37 0 1 0 14 0 0 10 10 25 48 196 35 19 2 36 20
- 3 25 36 1 0 20 37 36 1 21 20 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="twosuperior" xMin="86" yMin="759" xMax="556" yMax="1518">
- <contour>
- <pt x="86" y="759" on="1"/>
- <pt x="86" y="809" on="1"/>
- <pt x="127" y="925" on="0"/>
- <pt x="238" y="1026" on="1"/>
- <pt x="279" y="1064" on="1"/>
- <pt x="426" y="1200" on="0"/>
- <pt x="426" y="1322" on="1"/>
- <pt x="426" y="1477" on="0"/>
- <pt x="289" y="1477" on="1"/>
- <pt x="228" y="1477" on="0"/>
- <pt x="163" y="1428" on="1"/>
- <pt x="163" y="1338" on="1"/>
- <pt x="104" y="1338" on="1"/>
- <pt x="104" y="1474" on="1"/>
- <pt x="214" y="1518" on="0"/>
- <pt x="313" y="1518" on="1"/>
- <pt x="422" y="1518" on="0"/>
- <pt x="489" y="1462" on="1"/>
- <pt x="556" y="1406" on="0"/>
- <pt x="556" y="1319" on="1"/>
- <pt x="556" y="1247" on="0"/>
- <pt x="503" y="1185" on="1"/>
- <pt x="473" y="1148" on="0"/>
- <pt x="404" y="1100" on="1"/>
- <pt x="383" y="1086" on="0"/>
- <pt x="370" y="1077" on="1"/>
- <pt x="320" y="1040" on="1"/>
- <pt x="208" y="957" on="0"/>
- <pt x="198" y="864" on="1"/>
- <pt x="554" y="864" on="1"/>
- <pt x="554" y="759" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 8 45 15 48 84 1 28 0 2 13 12 11 10 4 13 15 28 0 0 30 0 43 1
- 28 1 4 48 84 29 28 1 0 14 0 0 6 44 19 48 196 30 29 28 19 13 12 11 10
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="u" xMin="12" yMin="-25" xMax="993" yMax="1086">
- <contour>
- <pt x="675" y="0" on="1"/>
- <pt x="675" y="179" on="1"/>
- <pt x="611" y="87" on="0"/>
- <pt x="551" y="41" on="1"/>
- <pt x="466" y="-25" on="0"/>
- <pt x="364" y="-25" on="1"/>
- <pt x="240" y="-25" on="0"/>
- <pt x="186" y="53" on="1"/>
- <pt x="133" y="131" on="0"/>
- <pt x="133" y="321" on="1"/>
- <pt x="133" y="827" on="1"/>
- <pt x="131" y="925" on="1"/>
- <pt x="131" y="993" on="0"/>
- <pt x="106" y="1007" on="1"/>
- <pt x="86" y="1019" on="0"/>
- <pt x="31" y="1023" on="1"/>
- <pt x="12" y="1024" on="1"/>
- <pt x="12" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="352" on="1"/>
- <pt x="333" y="274" on="1"/>
- <pt x="335" y="188" on="0"/>
- <pt x="357" y="150" on="1"/>
- <pt x="383" y="105" on="0"/>
- <pt x="439" y="105" on="1"/>
- <pt x="554" y="105" on="0"/>
- <pt x="675" y="245" on="1"/>
- <pt x="675" y="827" on="1"/>
- <pt x="673" y="925" on="1"/>
- <pt x="672" y="994" on="0"/>
- <pt x="648" y="1007" on="1"/>
- <pt x="627" y="1019" on="0"/>
- <pt x="573" y="1023" on="1"/>
- <pt x="554" y="1024" on="1"/>
- <pt x="554" y="1086" on="1"/>
- <pt x="872" y="1086" on="1"/>
- <pt x="872" y="259" on="1"/>
- <pt x="874" y="160" on="1"/>
- <pt x="874" y="92" on="0"/>
- <pt x="899" y="78" on="1"/>
- <pt x="922" y="66" on="0"/>
- <pt x="974" y="63" on="1"/>
- <pt x="993" y="62" on="1"/>
- <pt x="993" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 24 29 5 48 84 5 2 42 36 33 27 26 19 16 10 9 1 10 17 0 3 43 0
- 1 0 35 34 18 17 1 3 14 34 33 2 0 18 3 43 42 2 13 35 17 16 9 0 0
- 27 26 1 0 4 3 35 19 18 4 1 9 2 4 48 196 36 35 1 10 9 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uacute" xMin="12" yMin="-25" xMax="993" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="196" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ubreve" xMin="12" yMin="-25" xMax="993" yMax="1604">
- <contour>
- <pt x="675" y="0" on="1"/>
- <pt x="675" y="179" on="1"/>
- <pt x="611" y="87" on="0"/>
- <pt x="551" y="41" on="1"/>
- <pt x="466" y="-25" on="0"/>
- <pt x="364" y="-25" on="1"/>
- <pt x="240" y="-25" on="0"/>
- <pt x="186" y="53" on="1"/>
- <pt x="133" y="131" on="0"/>
- <pt x="133" y="321" on="1"/>
- <pt x="133" y="827" on="1"/>
- <pt x="131" y="925" on="1"/>
- <pt x="131" y="993" on="0"/>
- <pt x="106" y="1007" on="1"/>
- <pt x="86" y="1019" on="0"/>
- <pt x="31" y="1023" on="1"/>
- <pt x="12" y="1024" on="1"/>
- <pt x="12" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="352" on="1"/>
- <pt x="333" y="274" on="1"/>
- <pt x="335" y="188" on="0"/>
- <pt x="357" y="150" on="1"/>
- <pt x="383" y="105" on="0"/>
- <pt x="439" y="105" on="1"/>
- <pt x="554" y="105" on="0"/>
- <pt x="675" y="245" on="1"/>
- <pt x="675" y="827" on="1"/>
- <pt x="673" y="925" on="1"/>
- <pt x="672" y="994" on="0"/>
- <pt x="648" y="1007" on="1"/>
- <pt x="627" y="1019" on="0"/>
- <pt x="573" y="1023" on="1"/>
- <pt x="554" y="1024" on="1"/>
- <pt x="554" y="1086" on="1"/>
- <pt x="872" y="1086" on="1"/>
- <pt x="872" y="259" on="1"/>
- <pt x="874" y="160" on="1"/>
- <pt x="874" y="92" on="0"/>
- <pt x="899" y="78" on="1"/>
- <pt x="922" y="66" on="0"/>
- <pt x="974" y="63" on="1"/>
- <pt x="993" y="62" on="1"/>
- <pt x="993" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="146" y="1604" on="1"/>
- <pt x="211" y="1604" on="1"/>
- <pt x="238" y="1514" on="0"/>
- <pt x="298" y="1472" on="1"/>
- <pt x="366" y="1425" on="0"/>
- <pt x="479" y="1425" on="1"/>
- <pt x="605" y="1425" on="0"/>
- <pt x="675" y="1484" on="1"/>
- <pt x="724" y="1524" on="0"/>
- <pt x="748" y="1604" on="1"/>
- <pt x="812" y="1604" on="1"/>
- <pt x="793" y="1469" on="0"/>
- <pt x="721" y="1388" on="1"/>
- <pt x="626" y="1283" on="0"/>
- <pt x="479" y="1283" on="1"/>
- <pt x="325" y="1283" on="0"/>
- <pt x="230" y="1398" on="1"/>
- <pt x="165" y="1476" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 49 20 58 24 29 5 48 84 5 2 42 36 33 27 26 19 16 10 9 1 10 17 0
- 3 54 53 45 44 4 13 58 17 43 0 1 0 35 34 18 17 1 3 14 54 53 2 35 0
- 3 34 33 2 0 18 3 45 44 2 18 9 3 43 42 2 13 35 17 16 9 0 0 27 26
- 1 0 4 3 35 19 18 4 1 9 2 4 48 196 36 35 1 10 9 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ucircumflex" xMin="12" yMin="-25" xMax="993" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="143" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="udieresis" xMin="12" yMin="-25" xMax="993" yMax="1456">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="162" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ugrave" xMin="12" yMin="-25" xMax="993" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="78" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uhungarumlaut" xMin="12" yMin="-25" xMax="993" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="249" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="umacron" xMin="12" yMin="-25" xMax="993" yMax="1406">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="161" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="underscore" xMin="0" yMin="-123" xMax="1024" yMax="0">
- <contour>
- <pt x="0" y="-123" on="1"/>
- <pt x="0" y="0" on="1"/>
- <pt x="1024" y="0" on="1"/>
- <pt x="1024" y="-123" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 12 1 1 1 4 48 84 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uogonek" xMin="12" yMin="-370" xMax="993" yMax="1086">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="419" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uring" xMin="12" yMin="-25" xMax="993" yMax="1737">
- <contour>
- <pt x="675" y="0" on="1"/>
- <pt x="675" y="179" on="1"/>
- <pt x="611" y="87" on="0"/>
- <pt x="551" y="41" on="1"/>
- <pt x="466" y="-25" on="0"/>
- <pt x="364" y="-25" on="1"/>
- <pt x="240" y="-25" on="0"/>
- <pt x="186" y="53" on="1"/>
- <pt x="133" y="131" on="0"/>
- <pt x="133" y="321" on="1"/>
- <pt x="133" y="827" on="1"/>
- <pt x="131" y="925" on="1"/>
- <pt x="131" y="993" on="0"/>
- <pt x="106" y="1007" on="1"/>
- <pt x="86" y="1019" on="0"/>
- <pt x="31" y="1023" on="1"/>
- <pt x="12" y="1024" on="1"/>
- <pt x="12" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="352" on="1"/>
- <pt x="333" y="274" on="1"/>
- <pt x="335" y="188" on="0"/>
- <pt x="357" y="150" on="1"/>
- <pt x="383" y="105" on="0"/>
- <pt x="439" y="105" on="1"/>
- <pt x="554" y="105" on="0"/>
- <pt x="675" y="245" on="1"/>
- <pt x="675" y="827" on="1"/>
- <pt x="673" y="925" on="1"/>
- <pt x="672" y="994" on="0"/>
- <pt x="648" y="1007" on="1"/>
- <pt x="627" y="1019" on="0"/>
- <pt x="573" y="1023" on="1"/>
- <pt x="554" y="1024" on="1"/>
- <pt x="554" y="1086" on="1"/>
- <pt x="872" y="1086" on="1"/>
- <pt x="872" y="259" on="1"/>
- <pt x="874" y="160" on="1"/>
- <pt x="874" y="92" on="0"/>
- <pt x="899" y="78" on="1"/>
- <pt x="922" y="66" on="0"/>
- <pt x="974" y="63" on="1"/>
- <pt x="993" y="62" on="1"/>
- <pt x="993" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="1737" on="1"/>
- <pt x="585" y="1737" on="0"/>
- <pt x="651" y="1671" on="1"/>
- <pt x="718" y="1605" on="0"/>
- <pt x="718" y="1511" on="1"/>
- <pt x="718" y="1415" on="0"/>
- <pt x="651" y="1349" on="1"/>
- <pt x="584" y="1283" on="0"/>
- <pt x="489" y="1283" on="1"/>
- <pt x="405" y="1283" on="0"/>
- <pt x="344" y="1337" on="1"/>
- <pt x="264" y="1407" on="0"/>
- <pt x="264" y="1510" on="1"/>
- <pt x="264" y="1605" on="0"/>
- <pt x="330" y="1671" on="1"/>
- <pt x="396" y="1737" on="0"/>
- </contour>
- <contour>
- <pt x="491" y="1669" on="1"/>
- <pt x="425" y="1669" on="0"/>
- <pt x="378" y="1623" on="1"/>
- <pt x="332" y="1576" on="0"/>
- <pt x="332" y="1511" on="1"/>
- <pt x="332" y="1445" on="0"/>
- <pt x="378" y="1398" on="1"/>
- <pt x="424" y="1351" on="0"/>
- <pt x="489" y="1351" on="1"/>
- <pt x="550" y="1351" on="0"/>
- <pt x="594" y="1388" on="1"/>
- <pt x="650" y="1437" on="0"/>
- <pt x="650" y="1511" on="1"/>
- <pt x="650" y="1577" on="0"/>
- <pt x="603" y="1623" on="1"/>
- <pt x="556" y="1669" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 68 17 52 60 17 44 24 29 5 48 84 5 2 42 36 33 27 26 19 16 10 9 1
- 10 17 0 3 52 44 17 43 0 1 0 35 34 18 17 1 3 14 0 0 72 17 48 64 17
- 56 48 196 48 48 35 0 2 34 33 2 0 18 3 56 56 18 9 2 43 42 2 13 35 17
- 16 9 0 0 27 26 1 0 4 3 35 19 18 4 1 9 2 4 48 196 36 35 1 10 9
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="utilde" xMin="12" yMin="-25" xMax="993" yMax="1518">
- <contour>
- <pt x="675" y="0" on="1"/>
- <pt x="675" y="179" on="1"/>
- <pt x="611" y="87" on="0"/>
- <pt x="551" y="41" on="1"/>
- <pt x="466" y="-25" on="0"/>
- <pt x="364" y="-25" on="1"/>
- <pt x="240" y="-25" on="0"/>
- <pt x="186" y="53" on="1"/>
- <pt x="133" y="131" on="0"/>
- <pt x="133" y="321" on="1"/>
- <pt x="133" y="827" on="1"/>
- <pt x="131" y="925" on="1"/>
- <pt x="131" y="993" on="0"/>
- <pt x="106" y="1007" on="1"/>
- <pt x="86" y="1019" on="0"/>
- <pt x="31" y="1023" on="1"/>
- <pt x="12" y="1024" on="1"/>
- <pt x="12" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="352" on="1"/>
- <pt x="333" y="274" on="1"/>
- <pt x="335" y="188" on="0"/>
- <pt x="357" y="150" on="1"/>
- <pt x="383" y="105" on="0"/>
- <pt x="439" y="105" on="1"/>
- <pt x="554" y="105" on="0"/>
- <pt x="675" y="245" on="1"/>
- <pt x="675" y="827" on="1"/>
- <pt x="673" y="925" on="1"/>
- <pt x="672" y="994" on="0"/>
- <pt x="648" y="1007" on="1"/>
- <pt x="627" y="1019" on="0"/>
- <pt x="573" y="1023" on="1"/>
- <pt x="554" y="1024" on="1"/>
- <pt x="554" y="1086" on="1"/>
- <pt x="872" y="1086" on="1"/>
- <pt x="872" y="259" on="1"/>
- <pt x="874" y="160" on="1"/>
- <pt x="874" y="92" on="0"/>
- <pt x="899" y="78" on="1"/>
- <pt x="922" y="66" on="0"/>
- <pt x="974" y="63" on="1"/>
- <pt x="993" y="62" on="1"/>
- <pt x="993" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="158" y="1283" on="1"/>
- <pt x="185" y="1423" on="0"/>
- <pt x="254" y="1476" on="1"/>
- <pt x="308" y="1518" on="0"/>
- <pt x="385" y="1518" on="1"/>
- <pt x="450" y="1518" on="0"/>
- <pt x="503" y="1480" on="1"/>
- <pt x="538" y="1455" on="1"/>
- <pt x="590" y="1418" on="0"/>
- <pt x="644" y="1418" on="1"/>
- <pt x="739" y="1418" on="0"/>
- <pt x="762" y="1517" on="1"/>
- <pt x="824" y="1517" on="1"/>
- <pt x="796" y="1378" on="0"/>
- <pt x="728" y="1325" on="1"/>
- <pt x="674" y="1283" on="0"/>
- <pt x="597" y="1283" on="1"/>
- <pt x="534" y="1283" on="0"/>
- <pt x="479" y="1321" on="1"/>
- <pt x="444" y="1345" on="1"/>
- <pt x="389" y="1383" on="0"/>
- <pt x="337" y="1383" on="1"/>
- <pt x="249" y="1383" on="0"/>
- <pt x="220" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 111 values pushed */
- 0 0 65 20 48 53 20 60 24 29 5 48 84 48 0 5 2 60 1 67 60 44 3 0 17
- 3 0 42 36 33 27 26 19 16 10 9 1 10 17 0 3 1 56 55 2 13 0 0 43 0
- 1 0 35 34 18 17 1 3 14 56 55 2 35 0 3 34 33 2 0 18 3 67 44 2 18
- 9 3 43 42 2 13 35 17 16 9 0 0 27 26 1 0 4 3 35 19 18 4 1 9 2
- 4 48 196 36 35 1 10 9 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="v" xMin="0" yMin="-12" xMax="1024" yMax="1086">
- <contour>
- <pt x="493" y="-12" on="1"/>
- <pt x="156" y="820" on="1"/>
- <pt x="76" y="1019" on="0"/>
- <pt x="18" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="438" y="1086" on="1"/>
- <pt x="438" y="1024" on="1"/>
- <pt x="418" y="1024" on="1"/>
- <pt x="389" y="1023" on="1"/>
- <pt x="311" y="1020" on="0"/>
- <pt x="311" y="982" on="1"/>
- <pt x="311" y="964" on="0"/>
- <pt x="341" y="891" on="1"/>
- <pt x="371" y="818" on="1"/>
- <pt x="591" y="272" on="1"/>
- <pt x="795" y="817" on="1"/>
- <pt x="821" y="884" on="1"/>
- <pt x="852" y="964" on="0"/>
- <pt x="852" y="982" on="1"/>
- <pt x="852" y="1024" on="0"/>
- <pt x="758" y="1024" on="1"/>
- <pt x="736" y="1024" on="1"/>
- <pt x="736" y="1086" on="1"/>
- <pt x="1024" y="1086" on="1"/>
- <pt x="1024" y="1024" on="1"/>
- <pt x="1007" y="1023" on="1"/>
- <pt x="946" y="1018" on="0"/>
- <pt x="912" y="931" on="1"/>
- <pt x="867" y="817" on="1"/>
- <pt x="553" y="-12" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 40 values pushed */
- 1 25 22 21 15 8 7 4 7 5 2 3 0 1 30 0 2 0 24 23 6 5 1 3 14
- 30 25 24 23 22 21 19 15 11 8 7 6 5 4 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="w" xMin="0" yMin="-12" xMax="1479" yMax="1086">
- <contour>
- <pt x="382" y="-12" on="1"/>
- <pt x="152" y="827" on="1"/>
- <pt x="118" y="950" on="0"/>
- <pt x="95" y="985" on="1"/>
- <pt x="72" y="1020" on="0"/>
- <pt x="19" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="445" y="1086" on="1"/>
- <pt x="445" y="1024" on="1"/>
- <pt x="424" y="1024" on="1"/>
- <pt x="322" y="1024" on="0"/>
- <pt x="322" y="977" on="1"/>
- <pt x="322" y="943" on="0"/>
- <pt x="354" y="827" on="1"/>
- <pt x="493" y="323" on="1"/>
- <pt x="757" y="1080" on="1"/>
- <pt x="823" y="1080" on="1"/>
- <pt x="1098" y="284" on="1"/>
- <pt x="1259" y="827" on="1"/>
- <pt x="1276" y="885" on="1"/>
- <pt x="1295" y="954" on="1"/>
- <pt x="1300" y="971" on="0"/>
- <pt x="1300" y="979" on="1"/>
- <pt x="1300" y="1021" on="0"/>
- <pt x="1224" y="1023" on="1"/>
- <pt x="1195" y="1024" on="1"/>
- <pt x="1173" y="1024" on="1"/>
- <pt x="1173" y="1086" on="1"/>
- <pt x="1479" y="1086" on="1"/>
- <pt x="1478" y="1024" on="1"/>
- <pt x="1456" y="1023" on="1"/>
- <pt x="1386" y="1019" on="0"/>
- <pt x="1352" y="908" on="1"/>
- <pt x="1327" y="827" on="1"/>
- <pt x="1069" y="-12" on="1"/>
- <pt x="1014" y="-12" on="1"/>
- <pt x="727" y="801" on="1"/>
- <pt x="443" y="-12" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 1 37 30 27 26 18 17 16 15 10 9 6 11 7 2 3 0 1 38 36 35 0 4 13 2
- 0 29 28 8 7 1 3 14 38 37 36 35 30 29 28 27 26 23 18 17 16 15 12 10 9
- 8 7 6 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="wcircumflex" xMin="0" yMin="-12" xMax="1479" yMax="1604">
- <contour>
- <pt x="382" y="-12" on="1"/>
- <pt x="152" y="827" on="1"/>
- <pt x="118" y="950" on="0"/>
- <pt x="95" y="985" on="1"/>
- <pt x="72" y="1020" on="0"/>
- <pt x="19" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="445" y="1086" on="1"/>
- <pt x="445" y="1024" on="1"/>
- <pt x="424" y="1024" on="1"/>
- <pt x="322" y="1024" on="0"/>
- <pt x="322" y="977" on="1"/>
- <pt x="322" y="943" on="0"/>
- <pt x="354" y="827" on="1"/>
- <pt x="493" y="323" on="1"/>
- <pt x="757" y="1080" on="1"/>
- <pt x="823" y="1080" on="1"/>
- <pt x="1098" y="284" on="1"/>
- <pt x="1259" y="827" on="1"/>
- <pt x="1276" y="885" on="1"/>
- <pt x="1295" y="954" on="1"/>
- <pt x="1300" y="971" on="0"/>
- <pt x="1300" y="979" on="1"/>
- <pt x="1300" y="1021" on="0"/>
- <pt x="1224" y="1023" on="1"/>
- <pt x="1195" y="1024" on="1"/>
- <pt x="1173" y="1024" on="1"/>
- <pt x="1173" y="1086" on="1"/>
- <pt x="1479" y="1086" on="1"/>
- <pt x="1478" y="1024" on="1"/>
- <pt x="1456" y="1023" on="1"/>
- <pt x="1386" y="1019" on="0"/>
- <pt x="1352" y="908" on="1"/>
- <pt x="1327" y="827" on="1"/>
- <pt x="1069" y="-12" on="1"/>
- <pt x="1014" y="-12" on="1"/>
- <pt x="727" y="801" on="1"/>
- <pt x="443" y="-12" on="1"/>
- </contour>
- <contour>
- <pt x="458" y="1283" on="1"/>
- <pt x="699" y="1604" on="1"/>
- <pt x="921" y="1604" on="1"/>
- <pt x="1161" y="1283" on="1"/>
- <pt x="1075" y="1283" on="1"/>
- <pt x="810" y="1505" on="1"/>
- <pt x="544" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 1 44 40 0 2 0 1 45 43 42 39 4 0 7 3 0 1 37 30 27 26 18 17 16 15
- 10 9 6 11 7 2 3 0 1 38 36 35 0 4 13 2 0 41 40 1 0 29 28 8 7
- 1 3 14 45 44 43 42 41 40 39 38 37 36 35 30 29 28 27 26 23 18 17 16 15 12
- 10 9 8 7 6 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="x" xMin="0" yMin="0" xMax="1024" yMax="1086">
- <contour>
- <pt x="6" y="0" on="1"/>
- <pt x="6" y="62" on="1"/>
- <pt x="22" y="63" on="1"/>
- <pt x="86" y="68" on="0"/>
- <pt x="135" y="138" on="1"/>
- <pt x="218" y="256" on="1"/>
- <pt x="406" y="523" on="1"/>
- <pt x="219" y="824" on="1"/>
- <pt x="127" y="971" on="0"/>
- <pt x="103" y="995" on="1"/>
- <pt x="79" y="1019" on="0"/>
- <pt x="18" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="492" y="1086" on="1"/>
- <pt x="492" y="1024" on="1"/>
- <pt x="472" y="1024" on="1"/>
- <pt x="431" y="1022" on="1"/>
- <pt x="363" y="1019" on="0"/>
- <pt x="363" y="989" on="1"/>
- <pt x="363" y="978" on="0"/>
- <pt x="377" y="955" on="1"/>
- <pt x="379" y="951" on="1"/>
- <pt x="386" y="941" on="0"/>
- <pt x="396" y="922" on="1"/>
- <pt x="404" y="909" on="1"/>
- <pt x="420" y="878" on="0"/>
- <pt x="454" y="824" on="1"/>
- <pt x="576" y="627" on="1"/>
- <pt x="693" y="819" on="1"/>
- <pt x="744" y="909" on="1"/>
- <pt x="783" y="978" on="0"/>
- <pt x="783" y="993" on="1"/>
- <pt x="783" y="1022" on="0"/>
- <pt x="729" y="1023" on="1"/>
- <pt x="692" y="1024" on="1"/>
- <pt x="669" y="1024" on="1"/>
- <pt x="669" y="1086" on="1"/>
- <pt x="987" y="1086" on="1"/>
- <pt x="987" y="1024" on="1"/>
- <pt x="967" y="1023" on="1"/>
- <pt x="901" y="1018" on="0"/>
- <pt x="871" y="978" on="1"/>
- <pt x="842" y="943" on="0"/>
- <pt x="768" y="824" on="1"/>
- <pt x="613" y="570" on="1"/>
- <pt x="805" y="258" on="1"/>
- <pt x="879" y="137" on="0"/>
- <pt x="916" y="101" on="1"/>
- <pt x="952" y="67" on="0"/>
- <pt x="1008" y="63" on="1"/>
- <pt x="1024" y="62" on="1"/>
- <pt x="1024" y="0" on="1"/>
- <pt x="530" y="0" on="1"/>
- <pt x="530" y="62" on="1"/>
- <pt x="548" y="62" on="1"/>
- <pt x="594" y="63" on="1"/>
- <pt x="668" y="64" on="0"/>
- <pt x="668" y="91" on="1"/>
- <pt x="668" y="101" on="0"/>
- <pt x="650" y="126" on="1"/>
- <pt x="639" y="142" on="0"/>
- <pt x="620" y="179" on="1"/>
- <pt x="602" y="213" on="0"/>
- <pt x="575" y="257" on="1"/>
- <pt x="441" y="469" on="1"/>
- <pt x="292" y="257" on="1"/>
- <pt x="260" y="212" on="0"/>
- <pt x="247" y="186" on="1"/>
- <pt x="217" y="130" on="1"/>
- <pt x="203" y="104" on="0"/>
- <pt x="203" y="94" on="1"/>
- <pt x="203" y="65" on="0"/>
- <pt x="278" y="63" on="1"/>
- <pt x="316" y="62" on="1"/>
- <pt x="339" y="62" on="1"/>
- <pt x="339" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 75 74 65 55 54 51 45 39 36 35 29 28 16 15 12 6 1 17 13 0 3 76 53 52 0
- 3 0 38 37 14 13 1 3 14 76 75 74 71 65 58 55 54 53 52 51 45 39 38 37 36
- 35 32 29 28 19 16 15 14 13 12 6 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="y" xMin="0" yMin="-395" xMax="1024" yMax="1086">
- <contour>
- <pt x="487" y="0" on="1"/>
- <pt x="156" y="820" on="1"/>
- <pt x="76" y="1020" on="0"/>
- <pt x="17" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="437" y="1086" on="1"/>
- <pt x="437" y="1024" on="1"/>
- <pt x="418" y="1024" on="1"/>
- <pt x="389" y="1023" on="1"/>
- <pt x="310" y="1020" on="0"/>
- <pt x="310" y="982" on="1"/>
- <pt x="310" y="961" on="0"/>
- <pt x="340" y="891" on="1"/>
- <pt x="371" y="818" on="1"/>
- <pt x="591" y="272" on="1"/>
- <pt x="794" y="817" on="1"/>
- <pt x="820" y="884" on="1"/>
- <pt x="851" y="964" on="0"/>
- <pt x="851" y="982" on="1"/>
- <pt x="851" y="1024" on="0"/>
- <pt x="758" y="1024" on="1"/>
- <pt x="736" y="1024" on="1"/>
- <pt x="736" y="1086" on="1"/>
- <pt x="1024" y="1086" on="1"/>
- <pt x="1024" y="1024" on="1"/>
- <pt x="1007" y="1023" on="1"/>
- <pt x="945" y="1019" on="0"/>
- <pt x="911" y="931" on="1"/>
- <pt x="867" y="817" on="1"/>
- <pt x="411" y="-395" on="1"/>
- <pt x="162" y="-395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 1 25 22 21 15 8 7 4 7 5 2 3 0 1 0 2 30 2 0 31 30 1 0 24 23
- 6 5 1 3 14 31 30 25 24 23 22 21 19 15 11 8 7 6 5 4 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="yacute" xMin="0" yMin="-395" xMax="1024" yMax="1604">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="309" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ycircumflex" xMin="0" yMin="-395" xMax="1024" yMax="1604">
- <contour>
- <pt x="487" y="0" on="1"/>
- <pt x="156" y="820" on="1"/>
- <pt x="76" y="1020" on="0"/>
- <pt x="17" y="1023" on="1"/>
- <pt x="0" y="1024" on="1"/>
- <pt x="0" y="1086" on="1"/>
- <pt x="437" y="1086" on="1"/>
- <pt x="437" y="1024" on="1"/>
- <pt x="418" y="1024" on="1"/>
- <pt x="389" y="1023" on="1"/>
- <pt x="310" y="1020" on="0"/>
- <pt x="310" y="982" on="1"/>
- <pt x="310" y="961" on="0"/>
- <pt x="340" y="891" on="1"/>
- <pt x="371" y="818" on="1"/>
- <pt x="591" y="272" on="1"/>
- <pt x="794" y="817" on="1"/>
- <pt x="820" y="884" on="1"/>
- <pt x="851" y="964" on="0"/>
- <pt x="851" y="982" on="1"/>
- <pt x="851" y="1024" on="0"/>
- <pt x="758" y="1024" on="1"/>
- <pt x="736" y="1024" on="1"/>
- <pt x="736" y="1086" on="1"/>
- <pt x="1024" y="1086" on="1"/>
- <pt x="1024" y="1024" on="1"/>
- <pt x="1007" y="1023" on="1"/>
- <pt x="945" y="1019" on="0"/>
- <pt x="911" y="931" on="1"/>
- <pt x="867" y="817" on="1"/>
- <pt x="411" y="-395" on="1"/>
- <pt x="162" y="-395" on="1"/>
- </contour>
- <contour>
- <pt x="235" y="1283" on="1"/>
- <pt x="476" y="1604" on="1"/>
- <pt x="698" y="1604" on="1"/>
- <pt x="938" y="1283" on="1"/>
- <pt x="852" y="1283" on="1"/>
- <pt x="587" y="1505" on="1"/>
- <pt x="321" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 1 37 33 0 2 0 1 38 36 35 32 4 0 5 3 0 1 25 22 21 15 8 7 4 7
- 5 2 3 0 1 0 2 30 2 0 34 33 1 31 30 1 2 0 24 23 6 5 1 3 14
- 38 37 36 35 34 33 32 31 30 25 24 23 22 21 19 15 11 8 7 6 5 4 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ydieresis" xMin="0" yMin="-395" xMax="1024" yMax="1456">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="250" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="yen" xMin="0" yMin="0" xMax="1024" yMax="1480">
- <contour>
- <pt x="414" y="395" on="1"/>
- <pt x="105" y="395" on="1"/>
- <pt x="105" y="456" on="1"/>
- <pt x="414" y="456" on="1"/>
- <pt x="414" y="666" on="1"/>
- <pt x="105" y="666" on="1"/>
- <pt x="105" y="728" on="1"/>
- <pt x="414" y="728" on="1"/>
- <pt x="219" y="1182" on="1"/>
- <pt x="152" y="1338" on="0"/>
- <pt x="103" y="1378" on="1"/>
- <pt x="62" y="1413" on="0"/>
- <pt x="0" y="1417" on="1"/>
- <pt x="0" y="1480" on="1"/>
- <pt x="502" y="1480" on="1"/>
- <pt x="502" y="1419" on="1"/>
- <pt x="493" y="1419" on="0"/>
- <pt x="478" y="1418" on="1"/>
- <pt x="467" y="1418" on="1"/>
- <pt x="455" y="1418" on="1"/>
- <pt x="376" y="1418" on="0"/>
- <pt x="376" y="1376" on="1"/>
- <pt x="376" y="1349" on="0"/>
- <pt x="399" y="1291" on="1"/>
- <pt x="573" y="854" on="1"/>
- <pt x="768" y="1312" on="1"/>
- <pt x="787" y="1357" on="0"/>
- <pt x="787" y="1385" on="1"/>
- <pt x="787" y="1421" on="0"/>
- <pt x="734" y="1418" on="1"/>
- <pt x="726" y="1418" on="1"/>
- <pt x="720" y="1417" on="1"/>
- <pt x="709" y="1417" on="1"/>
- <pt x="700" y="1417" on="1"/>
- <pt x="683" y="1418" on="0"/>
- <pt x="665" y="1419" on="1"/>
- <pt x="665" y="1480" on="1"/>
- <pt x="1024" y="1480" on="1"/>
- <pt x="1024" y="1417" on="1"/>
- <pt x="933" y="1409" on="0"/>
- <pt x="897" y="1360" on="1"/>
- <pt x="861" y="1314" on="0"/>
- <pt x="804" y="1179" on="1"/>
- <pt x="611" y="728" on="1"/>
- <pt x="920" y="728" on="1"/>
- <pt x="920" y="666" on="1"/>
- <pt x="611" y="666" on="1"/>
- <pt x="611" y="456" on="1"/>
- <pt x="920" y="456" on="1"/>
- <pt x="920" y="395" on="1"/>
- <pt x="611" y="395" on="1"/>
- <pt x="611" y="259" on="1"/>
- <pt x="611" y="202" on="0"/>
- <pt x="619" y="147" on="1"/>
- <pt x="626" y="96" on="0"/>
- <pt x="651" y="82" on="1"/>
- <pt x="673" y="71" on="0"/>
- <pt x="710" y="68" on="1"/>
- <pt x="778" y="63" on="1"/>
- <pt x="796" y="62" on="1"/>
- <pt x="796" y="0" on="1"/>
- <pt x="229" y="0" on="1"/>
- <pt x="229" y="62" on="1"/>
- <pt x="247" y="63" on="1"/>
- <pt x="315" y="68" on="1"/>
- <pt x="390" y="74" on="0"/>
- <pt x="400" y="115" on="1"/>
- <pt x="414" y="175" on="0"/>
- <pt x="414" y="259" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 119 values pushed */
- 68 61 51 60 32 29 38 35 32 29 24 19 18 17 15 12 10 13 6 3 0 0 46 45 5
- 4 14 3 6 48 47 3 2 14 3 0 2 4 48 84 44 43 7 6 3 50 49 1 0 3
- 61 60 1 3 0 37 36 14 13 0 3 14 61 68 60 51 24 19 18 17 15 14 6 43 0
- 3 49 48 45 44 38 37 36 35 8 13 27 43 13 12 6 5 2 1 6 13 21 0 0 0
- 51 50 47 46 43 4 4 0 1 4 48 196 68 7 4 3 0 4 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="z" xMin="62" yMin="0" xMax="846" yMax="1086">
- <contour>
- <pt x="62" y="0" on="1"/>
- <pt x="62" y="62" on="1"/>
- <pt x="590" y="1018" on="1"/>
- <pt x="396" y="1018" on="1"/>
- <pt x="300" y="1017" on="1"/>
- <pt x="218" y="1017" on="0"/>
- <pt x="207" y="991" on="1"/>
- <pt x="197" y="972" on="0"/>
- <pt x="198" y="926" on="1"/>
- <pt x="198" y="913" on="1"/>
- <pt x="198" y="900" on="1"/>
- <pt x="197" y="875" on="0"/>
- <pt x="197" y="869" on="1"/>
- <pt x="195" y="848" on="1"/>
- <pt x="90" y="848" on="1"/>
- <pt x="90" y="1086" on="1"/>
- <pt x="819" y="1086" on="1"/>
- <pt x="819" y="1024" on="1"/>
- <pt x="294" y="74" on="1"/>
- <pt x="536" y="74" on="1"/>
- <pt x="657" y="79" on="1"/>
- <pt x="739" y="80" on="0"/>
- <pt x="740" y="151" on="1"/>
- <pt x="740" y="226" on="1"/>
- <pt x="741" y="250" on="1"/>
- <pt x="846" y="250" on="1"/>
- <pt x="846" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 17 15 2 2 25 24 23 22 14 13 10 9 8 9 2 18 3 1 18 0 2 0 0 3 2
- 14 1 15 19 18 21 1 0 2 4 48 84 26 0 1 0 16 15 1 14 24 23 22 19 18
- 17 16 13 10 9 8 3 2 13 25 14 3 1 0 14 26 25 1 15 14 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="zacute" xMin="62" yMin="0" xMax="846" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="234" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zcaron" xMin="62" yMin="0" xMax="846" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="115" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zdotaccent" xMin="62" yMin="0" xMax="846" yMax="1480">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="113" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zero" xMin="56" yMin="-37" xMax="969" yMax="1517">
- <contour>
- <pt x="512" y="1517" on="1"/>
- <pt x="712" y="1517" on="0"/>
- <pt x="840" y="1300" on="1"/>
- <pt x="969" y="1082" on="0"/>
- <pt x="969" y="743" on="1"/>
- <pt x="969" y="397" on="0"/>
- <pt x="841" y="180" on="1"/>
- <pt x="713" y="-37" on="0"/>
- <pt x="506" y="-37" on="1"/>
- <pt x="332" y="-37" on="0"/>
- <pt x="211" y="138" on="1"/>
- <pt x="56" y="363" on="0"/>
- <pt x="56" y="741" on="1"/>
- <pt x="56" y="1083" on="0"/>
- <pt x="184" y="1299" on="1"/>
- <pt x="312" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="512" y="1456" on="1"/>
- <pt x="265" y="1456" on="0"/>
- <pt x="265" y="743" on="1"/>
- <pt x="265" y="25" on="0"/>
- <pt x="519" y="25" on="1"/>
- <pt x="759" y="25" on="0"/>
- <pt x="759" y="755" on="1"/>
- <pt x="759" y="1016" on="0"/>
- <pt x="712" y="1233" on="1"/>
- <pt x="688" y="1343" on="0"/>
- <pt x="623" y="1408" on="1"/>
- <pt x="576" y="1456" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 20 11 8 16 11 0 48 84 8 2 0 0 14 0 0 22 10 4 18 10 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- </glyf>
-
- <kern>
- <version value="0"/>
- <kernsubtable coverage="1" format="0">
- <pair l="A" r="C" v="-106"/>
- <pair l="A" r="Ccedilla" v="-115"/>
- <pair l="A" r="G" v="-107"/>
- <pair l="A" r="O" v="-96"/>
- <pair l="A" r="Odieresis" v="-96"/>
- <pair l="A" r="Q" v="-95"/>
- <pair l="A" r="T" v="-78"/>
- <pair l="A" r="U" v="-111"/>
- <pair l="A" r="Uacute" v="-111"/>
- <pair l="A" r="Ucircumflex" v="-111"/>
- <pair l="A" r="Udieresis" v="-111"/>
- <pair l="A" r="Ugrave" v="-111"/>
- <pair l="A" r="V" v="-239"/>
- <pair l="A" r="W" v="-172"/>
- <pair l="A" r="Y" v="-143"/>
- <pair l="A" r="a" v="-1"/>
- <pair l="A" r="b" v="7"/>
- <pair l="A" r="c" v="-71"/>
- <pair l="A" r="ccedilla" v="-87"/>
- <pair l="A" r="comma" v="10"/>
- <pair l="A" r="d" v="-32"/>
- <pair l="A" r="e" v="-61"/>
- <pair l="A" r="g" v="-11"/>
- <pair l="A" r="guillemotleft" v="-108"/>
- <pair l="A" r="guilsinglleft" v="-114"/>
- <pair l="A" r="hyphen" v="-61"/>
- <pair l="A" r="o" v="-50"/>
- <pair l="A" r="period" v="10"/>
- <pair l="A" r="q" v="-32"/>
- <pair l="A" r="quotedblright" v="-216"/>
- <pair l="A" r="quoteright" v="-258"/>
- <pair l="A" r="t" v="-24"/>
- <pair l="A" r="u" v="-19"/>
- <pair l="A" r="v" v="-149"/>
- <pair l="A" r="w" v="-112"/>
- <pair l="A" r="y" v="-150"/>
- <pair l="Aacute" r="C" v="-106"/>
- <pair l="Aacute" r="G" v="-107"/>
- <pair l="Aacute" r="O" v="-96"/>
- <pair l="Aacute" r="Q" v="-95"/>
- <pair l="Aacute" r="T" v="-78"/>
- <pair l="Aacute" r="U" v="-111"/>
- <pair l="Aacute" r="V" v="-239"/>
- <pair l="Aacute" r="W" v="-172"/>
- <pair l="Aacute" r="Y" v="-143"/>
- <pair l="Aacute" r="a" v="-1"/>
- <pair l="Aacute" r="b" v="7"/>
- <pair l="Aacute" r="c" v="-71"/>
- <pair l="Aacute" r="comma" v="10"/>
- <pair l="Aacute" r="d" v="-32"/>
- <pair l="Aacute" r="e" v="-61"/>
- <pair l="Aacute" r="g" v="-11"/>
- <pair l="Aacute" r="guillemotleft" v="-108"/>
- <pair l="Aacute" r="guilsinglleft" v="-114"/>
- <pair l="Aacute" r="hyphen" v="-61"/>
- <pair l="Aacute" r="o" v="-50"/>
- <pair l="Aacute" r="period" v="10"/>
- <pair l="Aacute" r="q" v="-32"/>
- <pair l="Aacute" r="quoteright" v="-258"/>
- <pair l="Aacute" r="t" v="-24"/>
- <pair l="Aacute" r="u" v="-19"/>
- <pair l="Aacute" r="v" v="-149"/>
- <pair l="Aacute" r="w" v="-112"/>
- <pair l="Aacute" r="y" v="-150"/>
- <pair l="Acircumflex" r="C" v="-106"/>
- <pair l="Acircumflex" r="G" v="-107"/>
- <pair l="Acircumflex" r="O" v="-96"/>
- <pair l="Acircumflex" r="Q" v="-95"/>
- <pair l="Acircumflex" r="T" v="-78"/>
- <pair l="Acircumflex" r="U" v="-111"/>
- <pair l="Acircumflex" r="V" v="-239"/>
- <pair l="Acircumflex" r="W" v="-172"/>
- <pair l="Acircumflex" r="Y" v="-143"/>
- <pair l="Acircumflex" r="comma" v="10"/>
- <pair l="Acircumflex" r="period" v="10"/>
- <pair l="Adieresis" r="C" v="-106"/>
- <pair l="Adieresis" r="G" v="-107"/>
- <pair l="Adieresis" r="O" v="-96"/>
- <pair l="Adieresis" r="Q" v="-95"/>
- <pair l="Adieresis" r="T" v="-78"/>
- <pair l="Adieresis" r="U" v="-111"/>
- <pair l="Adieresis" r="V" v="-239"/>
- <pair l="Adieresis" r="W" v="-172"/>
- <pair l="Adieresis" r="Y" v="-143"/>
- <pair l="Adieresis" r="a" v="-1"/>
- <pair l="Adieresis" r="b" v="7"/>
- <pair l="Adieresis" r="c" v="-71"/>
- <pair l="Adieresis" r="comma" v="10"/>
- <pair l="Adieresis" r="d" v="-32"/>
- <pair l="Adieresis" r="g" v="-11"/>
- <pair l="Adieresis" r="guillemotleft" v="-108"/>
- <pair l="Adieresis" r="guilsinglleft" v="-114"/>
- <pair l="Adieresis" r="hyphen" v="-61"/>
- <pair l="Adieresis" r="o" v="-50"/>
- <pair l="Adieresis" r="period" v="10"/>
- <pair l="Adieresis" r="q" v="-32"/>
- <pair l="Adieresis" r="quotedblright" v="-216"/>
- <pair l="Adieresis" r="quoteright" v="-258"/>
- <pair l="Adieresis" r="t" v="-24"/>
- <pair l="Adieresis" r="u" v="-19"/>
- <pair l="Adieresis" r="v" v="-149"/>
- <pair l="Adieresis" r="w" v="-112"/>
- <pair l="Adieresis" r="y" v="-150"/>
- <pair l="Agrave" r="C" v="-106"/>
- <pair l="Agrave" r="G" v="-107"/>
- <pair l="Agrave" r="O" v="-96"/>
- <pair l="Agrave" r="Q" v="-95"/>
- <pair l="Agrave" r="T" v="-78"/>
- <pair l="Agrave" r="U" v="-111"/>
- <pair l="Agrave" r="V" v="-239"/>
- <pair l="Agrave" r="W" v="-172"/>
- <pair l="Agrave" r="Y" v="-143"/>
- <pair l="Agrave" r="comma" v="10"/>
- <pair l="Agrave" r="period" v="10"/>
- <pair l="Aring" r="C" v="-106"/>
- <pair l="Aring" r="G" v="-107"/>
- <pair l="Aring" r="O" v="-96"/>
- <pair l="Aring" r="Q" v="-95"/>
- <pair l="Aring" r="T" v="-78"/>
- <pair l="Aring" r="U" v="-111"/>
- <pair l="Aring" r="V" v="-239"/>
- <pair l="Aring" r="W" v="-172"/>
- <pair l="Aring" r="Y" v="-143"/>
- <pair l="Aring" r="a" v="-1"/>
- <pair l="Aring" r="b" v="7"/>
- <pair l="Aring" r="c" v="-71"/>
- <pair l="Aring" r="comma" v="10"/>
- <pair l="Aring" r="d" v="-32"/>
- <pair l="Aring" r="e" v="-61"/>
- <pair l="Aring" r="g" v="-11"/>
- <pair l="Aring" r="guillemotleft" v="-108"/>
- <pair l="Aring" r="guilsinglleft" v="-114"/>
- <pair l="Aring" r="hyphen" v="-61"/>
- <pair l="Aring" r="o" v="-50"/>
- <pair l="Aring" r="period" v="10"/>
- <pair l="Aring" r="q" v="-32"/>
- <pair l="Aring" r="quotedblright" v="-216"/>
- <pair l="Aring" r="quoteright" v="-258"/>
- <pair l="Aring" r="t" v="-24"/>
- <pair l="Aring" r="u" v="-19"/>
- <pair l="Aring" r="v" v="-149"/>
- <pair l="Aring" r="w" v="-112"/>
- <pair l="Aring" r="y" v="-150"/>
- <pair l="Atilde" r="C" v="-106"/>
- <pair l="Atilde" r="G" v="-107"/>
- <pair l="Atilde" r="O" v="-96"/>
- <pair l="Atilde" r="Q" v="-95"/>
- <pair l="Atilde" r="T" v="-78"/>
- <pair l="Atilde" r="U" v="-111"/>
- <pair l="Atilde" r="V" v="-239"/>
- <pair l="Atilde" r="W" v="-172"/>
- <pair l="Atilde" r="Y" v="-143"/>
- <pair l="Atilde" r="comma" v="10"/>
- <pair l="Atilde" r="period" v="10"/>
- <pair l="B" r="A" v="-53"/>
- <pair l="B" r="AE" v="-53"/>
- <pair l="B" r="Aacute" v="-53"/>
- <pair l="B" r="Acircumflex" v="-53"/>
- <pair l="B" r="Adieresis" v="-53"/>
- <pair l="B" r="Aring" v="-53"/>
- <pair l="B" r="Atilde" v="-53"/>
- <pair l="B" r="O" v="-38"/>
- <pair l="B" r="OE" v="-37"/>
- <pair l="B" r="Oacute" v="-38"/>
- <pair l="B" r="Ocircumflex" v="-38"/>
- <pair l="B" r="Odieresis" v="-38"/>
- <pair l="B" r="Ograve" v="-38"/>
- <pair l="B" r="Oslash" v="-32"/>
- <pair l="B" r="V" v="-62"/>
- <pair l="B" r="W" v="-62"/>
- <pair l="B" r="Y" v="-62"/>
- <pair l="C" r="A" v="22"/>
- <pair l="C" r="AE" v="22"/>
- <pair l="C" r="Aacute" v="22"/>
- <pair l="C" r="Adieresis" v="22"/>
- <pair l="C" r="Aring" v="22"/>
- <pair l="C" r="H" v="2"/>
- <pair l="C" r="K" v="-5"/>
- <pair l="C" r="O" v="-62"/>
- <pair l="C" r="Oacute" v="-62"/>
- <pair l="C" r="Odieresis" v="-62"/>
- <pair l="Ccedilla" r="A" v="13"/>
- <pair l="D" r="A" v="-114"/>
- <pair l="D" r="Aacute" v="-114"/>
- <pair l="D" r="Acircumflex" v="-114"/>
- <pair l="D" r="Adieresis" v="-114"/>
- <pair l="D" r="Agrave" v="-114"/>
- <pair l="D" r="Aring" v="-114"/>
- <pair l="D" r="Atilde" v="-114"/>
- <pair l="D" r="J" v="-124"/>
- <pair l="D" r="T" v="-27"/>
- <pair l="D" r="V" v="-97"/>
- <pair l="D" r="W" v="-93"/>
- <pair l="D" r="X" v="-115"/>
- <pair l="D" r="Y" v="-97"/>
- <pair l="F" r="A" v="-167"/>
- <pair l="F" r="Aacute" v="-167"/>
- <pair l="F" r="Acircumflex" v="-167"/>
- <pair l="F" r="Adieresis" v="-167"/>
- <pair l="F" r="Agrave" v="-167"/>
- <pair l="F" r="Aring" v="-167"/>
- <pair l="F" r="Atilde" v="-167"/>
- <pair l="F" r="J" v="-55"/>
- <pair l="F" r="O" v="-57"/>
- <pair l="F" r="Odieresis" v="-57"/>
- <pair l="F" r="a" v="-108"/>
- <pair l="F" r="aacute" v="-108"/>
- <pair l="F" r="adieresis" v="-67"/>
- <pair l="F" r="ae" v="-108"/>
- <pair l="F" r="aring" v="-98"/>
- <pair l="F" r="comma" v="-164"/>
- <pair l="F" r="e" v="-64"/>
- <pair l="F" r="eacute" v="-64"/>
- <pair l="F" r="hyphen" v="-10"/>
- <pair l="F" r="i" v="-68"/>
- <pair l="F" r="j" v="-102"/>
- <pair l="F" r="o" v="-61"/>
- <pair l="F" r="oacute" v="-61"/>
- <pair l="F" r="odieresis" v="-61"/>
- <pair l="F" r="oe" v="-61"/>
- <pair l="F" r="oslash" v="-61"/>
- <pair l="F" r="period" v="-165"/>
- <pair l="F" r="r" v="-91"/>
- <pair l="F" r="u" v="-81"/>
- <pair l="G" r="A" v="-19"/>
- <pair l="G" r="AE" v="-19"/>
- <pair l="G" r="Aacute" v="-19"/>
- <pair l="G" r="Acircumflex" v="-19"/>
- <pair l="G" r="Adieresis" v="-19"/>
- <pair l="G" r="Agrave" v="-19"/>
- <pair l="G" r="Aring" v="-19"/>
- <pair l="G" r="Atilde" v="-19"/>
- <pair l="G" r="T" v="-36"/>
- <pair l="G" r="V" v="-21"/>
- <pair l="G" r="W" v="-21"/>
- <pair l="G" r="Y" v="-21"/>
- <pair l="J" r="A" v="-35"/>
- <pair l="J" r="AE" v="-35"/>
- <pair l="J" r="Adieresis" v="-35"/>
- <pair l="J" r="Aring" v="-35"/>
- <pair l="K" r="C" v="-114"/>
- <pair l="K" r="G" v="-115"/>
- <pair l="K" r="O" v="-104"/>
- <pair l="K" r="OE" v="-97"/>
- <pair l="K" r="Oacute" v="-104"/>
- <pair l="K" r="Odieresis" v="-104"/>
- <pair l="K" r="S" v="10"/>
- <pair l="K" r="T" v="-8"/>
- <pair l="K" r="a" v="-9"/>
- <pair l="K" r="adieresis" v="-9"/>
- <pair l="K" r="ae" v="-9"/>
- <pair l="K" r="aring" v="-9"/>
- <pair l="K" r="e" v="-69"/>
- <pair l="K" r="hyphen" v="-221"/>
- <pair l="K" r="o" v="-58"/>
- <pair l="K" r="oacute" v="-58"/>
- <pair l="K" r="odieresis" v="-58"/>
- <pair l="K" r="u" v="-27"/>
- <pair l="K" r="udieresis" v="-27"/>
- <pair l="K" r="y" v="-168"/>
- <pair l="L" r="A" v="54"/>
- <pair l="L" r="AE" v="54"/>
- <pair l="L" r="Aacute" v="54"/>
- <pair l="L" r="Adieresis" v="54"/>
- <pair l="L" r="Aring" v="54"/>
- <pair l="L" r="C" v="-40"/>
- <pair l="L" r="Ccedilla" v="-46"/>
- <pair l="L" r="G" v="-41"/>
- <pair l="L" r="O" v="-33"/>
- <pair l="L" r="Oacute" v="-33"/>
- <pair l="L" r="Ocircumflex" v="-33"/>
- <pair l="L" r="Odieresis" v="-33"/>
- <pair l="L" r="Ograve" v="-33"/>
- <pair l="L" r="Otilde" v="-33"/>
- <pair l="L" r="S" v="-5"/>
- <pair l="L" r="T" v="-101"/>
- <pair l="L" r="U" v="-65"/>
- <pair l="L" r="Udieresis" v="-65"/>
- <pair l="L" r="V" v="-229"/>
- <pair l="L" r="W" v="-164"/>
- <pair l="L" r="Y" v="-166"/>
- <pair l="L" r="hyphen" v="-63"/>
- <pair l="L" r="quotedblright" v="-298"/>
- <pair l="L" r="quoteright" v="-340"/>
- <pair l="L" r="u" v="-21"/>
- <pair l="L" r="udieresis" v="-21"/>
- <pair l="L" r="y" v="-139"/>
- <pair l="N" r="A" v="-37"/>
- <pair l="N" r="AE" v="-37"/>
- <pair l="N" r="Aacute" v="-37"/>
- <pair l="N" r="Adieresis" v="-37"/>
- <pair l="N" r="Aring" v="-37"/>
- <pair l="N" r="C" v="-50"/>
- <pair l="N" r="Ccedilla" v="-50"/>
- <pair l="N" r="G" v="-53"/>
- <pair l="N" r="O" v="-48"/>
- <pair l="N" r="Oacute" v="-48"/>
- <pair l="N" r="Odieresis" v="-48"/>
- <pair l="N" r="a" v="-69"/>
- <pair l="N" r="aacute" v="-69"/>
- <pair l="N" r="adieresis" v="-49"/>
- <pair l="N" r="ae" v="-69"/>
- <pair l="N" r="aring" v="-69"/>
- <pair l="N" r="comma" v="-37"/>
- <pair l="N" r="e" v="-53"/>
- <pair l="N" r="eacute" v="-53"/>
- <pair l="N" r="o" v="-50"/>
- <pair l="N" r="oacute" v="-50"/>
- <pair l="N" r="odieresis" v="-50"/>
- <pair l="N" r="oslash" v="-43"/>
- <pair l="N" r="period" v="-38"/>
- <pair l="N" r="u" v="-49"/>
- <pair l="N" r="udieresis" v="-49"/>
- <pair l="O" r="A" v="-95"/>
- <pair l="O" r="AE" v="-95"/>
- <pair l="O" r="Aacute" v="-95"/>
- <pair l="O" r="Adieresis" v="-95"/>
- <pair l="O" r="Aring" v="-95"/>
- <pair l="O" r="T" v="-27"/>
- <pair l="O" r="V" v="-89"/>
- <pair l="O" r="W" v="-89"/>
- <pair l="O" r="X" v="-101"/>
- <pair l="O" r="Y" v="-89"/>
- <pair l="Oacute" r="A" v="-95"/>
- <pair l="Oacute" r="T" v="-27"/>
- <pair l="Oacute" r="V" v="-89"/>
- <pair l="Oacute" r="W" v="-89"/>
- <pair l="Oacute" r="Y" v="-89"/>
- <pair l="Ocircumflex" r="T" v="-27"/>
- <pair l="Ocircumflex" r="V" v="-89"/>
- <pair l="Ocircumflex" r="Y" v="-89"/>
- <pair l="Odieresis" r="A" v="-95"/>
- <pair l="Odieresis" r="T" v="-27"/>
- <pair l="Odieresis" r="V" v="-89"/>
- <pair l="Odieresis" r="W" v="-89"/>
- <pair l="Odieresis" r="X" v="-101"/>
- <pair l="Odieresis" r="Y" v="-89"/>
- <pair l="Ograve" r="T" v="-27"/>
- <pair l="Ograve" r="V" v="-89"/>
- <pair l="Ograve" r="Y" v="-89"/>
- <pair l="Oslash" r="A" v="-96"/>
- <pair l="Otilde" r="T" v="-27"/>
- <pair l="Otilde" r="V" v="-89"/>
- <pair l="Otilde" r="Y" v="-89"/>
- <pair l="P" r="A" v="-174"/>
- <pair l="P" r="AE" v="-174"/>
- <pair l="P" r="Aacute" v="-174"/>
- <pair l="P" r="Adieresis" v="-174"/>
- <pair l="P" r="Aring" v="-174"/>
- <pair l="P" r="J" v="-86"/>
- <pair l="P" r="a" v="-26"/>
- <pair l="P" r="aacute" v="-26"/>
- <pair l="P" r="adieresis" v="-26"/>
- <pair l="P" r="ae" v="-26"/>
- <pair l="P" r="aring" v="-26"/>
- <pair l="P" r="comma" v="-208"/>
- <pair l="P" r="e" v="-33"/>
- <pair l="P" r="eacute" v="-33"/>
- <pair l="P" r="hyphen" v="-46"/>
- <pair l="P" r="o" v="-30"/>
- <pair l="P" r="oacute" v="-30"/>
- <pair l="P" r="odieresis" v="-30"/>
- <pair l="P" r="oe" v="-32"/>
- <pair l="P" r="oslash" v="-30"/>
- <pair l="P" r="period" v="-209"/>
- <pair l="R" r="C" v="-99"/>
- <pair l="R" r="Ccedilla" v="-99"/>
- <pair l="R" r="G" v="-102"/>
- <pair l="R" r="O" v="-96"/>
- <pair l="R" r="OE" v="-94"/>
- <pair l="R" r="Oacute" v="-96"/>
- <pair l="R" r="Odieresis" v="-96"/>
- <pair l="R" r="T" v="-70"/>
- <pair l="R" r="U" v="-116"/>
- <pair l="R" r="Udieresis" v="-116"/>
- <pair l="R" r="V" v="-108"/>
- <pair l="R" r="W" v="-108"/>
- <pair l="R" r="Y" v="-108"/>
- <pair l="R" r="a" v="-6"/>
- <pair l="R" r="aacute" v="-6"/>
- <pair l="R" r="adieresis" v="-6"/>
- <pair l="R" r="ae" v="-6"/>
- <pair l="R" r="aring" v="-6"/>
- <pair l="R" r="e" v="-66"/>
- <pair l="R" r="eacute" v="-66"/>
- <pair l="R" r="hyphen" v="-128"/>
- <pair l="R" r="o" v="-56"/>
- <pair l="R" r="oacute" v="-56"/>
- <pair l="R" r="odieresis" v="-56"/>
- <pair l="R" r="oe" v="-58"/>
- <pair l="R" r="u" v="-25"/>
- <pair l="R" r="uacute" v="-25"/>
- <pair l="R" r="udieresis" v="-25"/>
- <pair l="R" r="y" v="-62"/>
- <pair l="S" r="A" v="-43"/>
- <pair l="S" r="AE" v="-43"/>
- <pair l="S" r="Aacute" v="-43"/>
- <pair l="S" r="Adieresis" v="-43"/>
- <pair l="S" r="Aring" v="-43"/>
- <pair l="S" r="T" v="-26"/>
- <pair l="S" r="V" v="-10"/>
- <pair l="S" r="W" v="-10"/>
- <pair l="S" r="Y" v="-10"/>
- <pair l="S" r="t" v="-40"/>
- <pair l="T" r="A" v="-77"/>
- <pair l="T" r="AE" v="-77"/>
- <pair l="T" r="Aacute" v="-77"/>
- <pair l="T" r="Acircumflex" v="-77"/>
- <pair l="T" r="Adieresis" v="-77"/>
- <pair l="T" r="Agrave" v="-77"/>
- <pair l="T" r="Aring" v="-77"/>
- <pair l="T" r="Atilde" v="-77"/>
- <pair l="T" r="C" v="-28"/>
- <pair l="T" r="G" v="-31"/>
- <pair l="T" r="J" v="-30"/>
- <pair l="T" r="O" v="-27"/>
- <pair l="T" r="OE" v="-24"/>
- <pair l="T" r="Oacute" v="-27"/>
- <pair l="T" r="Ocircumflex" v="-27"/>
- <pair l="T" r="Odieresis" v="-27"/>
- <pair l="T" r="Ograve" v="-27"/>
- <pair l="T" r="Oslash" v="-27"/>
- <pair l="T" r="Otilde" v="-27"/>
- <pair l="T" r="S" v="-4"/>
- <pair l="T" r="V" v="63"/>
- <pair l="T" r="W" v="63"/>
- <pair l="T" r="Y" v="63"/>
- <pair l="T" r="a" v="-155"/>
- <pair l="T" r="ae" v="-155"/>
- <pair l="T" r="c" v="-198"/>
- <pair l="T" r="colon" v="-157"/>
- <pair l="T" r="comma" v="-143"/>
- <pair l="T" r="e" v="-192"/>
- <pair l="T" r="g" v="-166"/>
- <pair l="T" r="guillemotleft" v="-218"/>
- <pair l="T" r="guilsinglleft" v="-224"/>
- <pair l="T" r="hyphen" v="-155"/>
- <pair l="T" r="i" v="-42"/>
- <pair l="T" r="j" v="-77"/>
- <pair l="T" r="o" v="-189"/>
- <pair l="T" r="oslash" v="-129"/>
- <pair l="T" r="period" v="-143"/>
- <pair l="T" r="r" v="-101"/>
- <pair l="T" r="s" v="-133"/>
- <pair l="T" r="semicolon" v="-157"/>
- <pair l="T" r="u" v="-174"/>
- <pair l="T" r="v" v="-190"/>
- <pair l="T" r="w" v="-190"/>
- <pair l="T" r="y" v="-190"/>
- <pair l="U" r="A" v="-106"/>
- <pair l="U" r="AE" v="-106"/>
- <pair l="U" r="Aacute" v="-106"/>
- <pair l="U" r="Acircumflex" v="-106"/>
- <pair l="U" r="Adieresis" v="-106"/>
- <pair l="U" r="Aring" v="-106"/>
- <pair l="U" r="Atilde" v="-106"/>
- <pair l="U" r="comma" v="-66"/>
- <pair l="U" r="m" v="-54"/>
- <pair l="U" r="n" v="-54"/>
- <pair l="U" r="p" v="-35"/>
- <pair l="U" r="period" v="-61"/>
- <pair l="U" r="r" v="-51"/>
- <pair l="Uacute" r="A" v="-106"/>
- <pair l="Uacute" r="comma" v="-66"/>
- <pair l="Uacute" r="m" v="-54"/>
- <pair l="Uacute" r="n" v="-54"/>
- <pair l="Uacute" r="p" v="-35"/>
- <pair l="Uacute" r="period" v="-61"/>
- <pair l="Uacute" r="r" v="-51"/>
- <pair l="Ucircumflex" r="A" v="-106"/>
- <pair l="Udieresis" r="A" v="-106"/>
- <pair l="Udieresis" r="b" v="38"/>
- <pair l="Udieresis" r="comma" v="-66"/>
- <pair l="Udieresis" r="m" v="-54"/>
- <pair l="Udieresis" r="n" v="-54"/>
- <pair l="Udieresis" r="p" v="-35"/>
- <pair l="Udieresis" r="period" v="-61"/>
- <pair l="Udieresis" r="r" v="-51"/>
- <pair l="Ugrave" r="A" v="-106"/>
- <pair l="V" r="A" v="-229"/>
- <pair l="V" r="AE" v="-248"/>
- <pair l="V" r="Aacute" v="-229"/>
- <pair l="V" r="Acircumflex" v="-229"/>
- <pair l="V" r="Adieresis" v="-229"/>
- <pair l="V" r="Agrave" v="-229"/>
- <pair l="V" r="Aring" v="-229"/>
- <pair l="V" r="Atilde" v="-229"/>
- <pair l="V" r="C" v="-93"/>
- <pair l="V" r="G" v="-96"/>
- <pair l="V" r="O" v="-92"/>
- <pair l="V" r="Oacute" v="-92"/>
- <pair l="V" r="Ocircumflex" v="-92"/>
- <pair l="V" r="Odieresis" v="-92"/>
- <pair l="V" r="Ograve" v="-92"/>
- <pair l="V" r="Oslash" v="-89"/>
- <pair l="V" r="Otilde" v="-92"/>
- <pair l="V" r="S" v="-43"/>
- <pair l="V" r="T" v="61"/>
- <pair l="V" r="a" v="-140"/>
- <pair l="V" r="ae" v="-140"/>
- <pair l="V" r="colon" v="-125"/>
- <pair l="V" r="comma" v="-215"/>
- <pair l="V" r="e" v="-156"/>
- <pair l="V" r="g" v="-149"/>
- <pair l="V" r="guillemotleft" v="-184"/>
- <pair l="V" r="guilsinglleft" v="-190"/>
- <pair l="V" r="hyphen" v="-113"/>
- <pair l="V" r="i" v="-28"/>
- <pair l="V" r="o" v="-153"/>
- <pair l="V" r="oslash" v="-153"/>
- <pair l="V" r="period" v="-214"/>
- <pair l="V" r="r" v="-65"/>
- <pair l="V" r="semicolon" v="-121"/>
- <pair l="V" r="u" v="-59"/>
- <pair l="V" r="y" v="-53"/>
- <pair l="W" r="A" v="-200"/>
- <pair l="W" r="AE" v="-200"/>
- <pair l="W" r="Aacute" v="-200"/>
- <pair l="W" r="Acircumflex" v="-200"/>
- <pair l="W" r="Adieresis" v="-200"/>
- <pair l="W" r="Agrave" v="-200"/>
- <pair l="W" r="Aring" v="-200"/>
- <pair l="W" r="Atilde" v="-200"/>
- <pair l="W" r="C" v="-93"/>
- <pair l="W" r="G" v="-97"/>
- <pair l="W" r="O" v="-92"/>
- <pair l="W" r="Oacute" v="-92"/>
- <pair l="W" r="Ocircumflex" v="-92"/>
- <pair l="W" r="Odieresis" v="-92"/>
- <pair l="W" r="Ograve" v="-92"/>
- <pair l="W" r="Oslash" v="-89"/>
- <pair l="W" r="Otilde" v="-92"/>
- <pair l="W" r="S" v="-44"/>
- <pair l="W" r="T" v="61"/>
- <pair l="W" r="a" v="-137"/>
- <pair l="W" r="ae" v="-137"/>
- <pair l="W" r="colon" v="-124"/>
- <pair l="W" r="comma" v="-175"/>
- <pair l="W" r="e" v="-141"/>
- <pair l="W" r="g" v="-143"/>
- <pair l="W" r="guillemotleft" v="-160"/>
- <pair l="W" r="guilsinglleft" v="-166"/>
- <pair l="W" r="hyphen" v="-91"/>
- <pair l="W" r="i" v="-28"/>
- <pair l="W" r="o" v="-137"/>
- <pair l="W" r="oslash" v="-131"/>
- <pair l="W" r="period" v="-174"/>
- <pair l="W" r="r" v="-65"/>
- <pair l="W" r="semicolon" v="-121"/>
- <pair l="W" r="u" v="-59"/>
- <pair l="W" r="y" v="-53"/>
- <pair l="X" r="C" v="-111"/>
- <pair l="X" r="O" v="-102"/>
- <pair l="X" r="Odieresis" v="-102"/>
- <pair l="X" r="Q" v="-101"/>
- <pair l="X" r="a" v="-7"/>
- <pair l="X" r="e" v="-67"/>
- <pair l="X" r="hyphen" v="-138"/>
- <pair l="X" r="o" v="-57"/>
- <pair l="X" r="u" v="-25"/>
- <pair l="X" r="y" v="-138"/>
- <pair l="Y" r="A" v="-150"/>
- <pair l="Y" r="AE" v="-150"/>
- <pair l="Y" r="Aacute" v="-150"/>
- <pair l="Y" r="Acircumflex" v="-150"/>
- <pair l="Y" r="Adieresis" v="-150"/>
- <pair l="Y" r="Agrave" v="-150"/>
- <pair l="Y" r="Aring" v="-150"/>
- <pair l="Y" r="Atilde" v="-150"/>
- <pair l="Y" r="C" v="-92"/>
- <pair l="Y" r="G" v="-96"/>
- <pair l="Y" r="O" v="-92"/>
- <pair l="Y" r="Oacute" v="-92"/>
- <pair l="Y" r="Ocircumflex" v="-92"/>
- <pair l="Y" r="Odieresis" v="-92"/>
- <pair l="Y" r="Ograve" v="-92"/>
- <pair l="Y" r="Oslash" v="-89"/>
- <pair l="Y" r="Otilde" v="-92"/>
- <pair l="Y" r="S" v="-43"/>
- <pair l="Y" r="T" v="61"/>
- <pair l="Y" r="a" v="-202"/>
- <pair l="Y" r="ae" v="-202"/>
- <pair l="Y" r="colon" v="-181"/>
- <pair l="Y" r="comma" v="-217"/>
- <pair l="Y" r="e" v="-224"/>
- <pair l="Y" r="g" v="-218"/>
- <pair l="Y" r="guillemotleft" v="-279"/>
- <pair l="Y" r="guilsinglleft" v="-285"/>
- <pair l="Y" r="hyphen" v="-211"/>
- <pair l="Y" r="i" v="-28"/>
- <pair l="Y" r="o" v="-220"/>
- <pair l="Y" r="oslash" v="-203"/>
- <pair l="Y" r="p" v="-102"/>
- <pair l="Y" r="period" v="-217"/>
- <pair l="Y" r="semicolon" v="-174"/>
- <pair l="Y" r="u" v="-115"/>
- <pair l="Y" r="v" v="-109"/>
- <pair l="Z" r="v" v="-96"/>
- <pair l="Z" r="y" v="-96"/>
- <pair l="a" r="j" v="-73"/>
- <pair l="a" r="quoteright" v="-84"/>
- <pair l="a" r="v" v="-28"/>
- <pair l="a" r="w" v="-28"/>
- <pair l="a" r="y" v="-28"/>
- <pair l="aacute" r="v" v="-28"/>
- <pair l="aacute" r="w" v="-28"/>
- <pair l="aacute" r="y" v="-28"/>
- <pair l="adieresis" r="v" v="-28"/>
- <pair l="adieresis" r="w" v="-28"/>
- <pair l="adieresis" r="y" v="-28"/>
- <pair l="ae" r="v" v="-20"/>
- <pair l="ae" r="w" v="-20"/>
- <pair l="ae" r="y" v="-20"/>
- <pair l="agrave" r="v" v="-28"/>
- <pair l="agrave" r="w" v="-28"/>
- <pair l="agrave" r="y" v="-28"/>
- <pair l="aring" r="v" v="-28"/>
- <pair l="aring" r="w" v="-28"/>
- <pair l="aring" r="y" v="-28"/>
- <pair l="b" r="v" v="-36"/>
- <pair l="b" r="w" v="-36"/>
- <pair l="b" r="y" v="-36"/>
- <pair l="c" r="h" v="11"/>
- <pair l="c" r="k" v="14"/>
- <pair l="comma" r="one" v="-51"/>
- <pair l="comma" r="quotedblright" v="-84"/>
- <pair l="comma" r="quoteright" v="-126"/>
- <pair l="e" r="quoteright" v="-65"/>
- <pair l="e" r="t" v="-26"/>
- <pair l="e" r="v" v="-21"/>
- <pair l="e" r="w" v="-21"/>
- <pair l="e" r="x" v="27"/>
- <pair l="e" r="y" v="-21"/>
- <pair l="eacute" r="v" v="-21"/>
- <pair l="eacute" r="w" v="-21"/>
- <pair l="eacute" r="y" v="-21"/>
- <pair l="ecircumflex" r="v" v="-21"/>
- <pair l="ecircumflex" r="w" v="-21"/>
- <pair l="ecircumflex" r="y" v="-21"/>
- <pair l="eight" r="four" v="41"/>
- <pair l="eight" r="one" v="-48"/>
- <pair l="eight" r="seven" v="-34"/>
- <pair l="f" r="a" v="-60"/>
- <pair l="f" r="aacute" v="-60"/>
- <pair l="f" r="adieresis" v="-16"/>
- <pair l="f" r="ae" v="-60"/>
- <pair l="f" r="aring" v="-45"/>
- <pair l="f" r="e" v="-90"/>
- <pair l="f" r="eacute" v="-77"/>
- <pair l="f" r="f" v="0"/>
- <pair l="f" r="i" v="-5"/>
- <pair l="f" r="j" v="-52"/>
- <pair l="f" r="l" v="55"/>
- <pair l="f" r="o" v="-87"/>
- <pair l="f" r="oacute" v="-87"/>
- <pair l="f" r="odieresis" v="-35"/>
- <pair l="f" r="oe" v="-89"/>
- <pair l="f" r="oslash" v="-52"/>
- <pair l="f" r="quoteright" v="-26"/>
- <pair l="f" r="s" v="-51"/>
- <pair l="f" r="t" v="11"/>
- <pair l="five" r="four" v="7"/>
- <pair l="five" r="one" v="-60"/>
- <pair l="five" r="seven" v="-49"/>
- <pair l="four" r="four" v="41"/>
- <pair l="four" r="one" v="-16"/>
- <pair l="four" r="seven" v="-43"/>
- <pair l="g" r="a" v="-53"/>
- <pair l="g" r="adieresis" v="-53"/>
- <pair l="g" r="ae" v="-53"/>
- <pair l="g" r="aring" v="-53"/>
- <pair l="g" r="e" v="-77"/>
- <pair l="g" r="eacute" v="-77"/>
- <pair l="g" r="l" v="-11"/>
- <pair l="g" r="oacute" v="-73"/>
- <pair l="g" r="odieresis" v="-73"/>
- <pair l="g" r="r" v="22"/>
- <pair l="guillemotright" r="A" v="-105"/>
- <pair l="guillemotright" r="AE" v="-136"/>
- <pair l="guillemotright" r="Aacute" v="-105"/>
- <pair l="guillemotright" r="Adieresis" v="-105"/>
- <pair l="guillemotright" r="Aring" v="-105"/>
- <pair l="guillemotright" r="T" v="-218"/>
- <pair l="guillemotright" r="V" v="-195"/>
- <pair l="guillemotright" r="W" v="-141"/>
- <pair l="guillemotright" r="Y" v="-271"/>
- <pair l="guilsinglright" r="A" v="-110"/>
- <pair l="guilsinglright" r="AE" v="-141"/>
- <pair l="guilsinglright" r="Aacute" v="-110"/>
- <pair l="guilsinglright" r="Adieresis" v="-110"/>
- <pair l="guilsinglright" r="Aring" v="-110"/>
- <pair l="guilsinglright" r="T" v="-223"/>
- <pair l="guilsinglright" r="V" v="-200"/>
- <pair l="guilsinglright" r="W" v="-146"/>
- <pair l="guilsinglright" r="Y" v="-276"/>
- <pair l="h" r="quoteright" v="-80"/>
- <pair l="h" r="y" v="-23"/>
- <pair l="hyphen" r="A" v="-58"/>
- <pair l="hyphen" r="AE" v="-96"/>
- <pair l="hyphen" r="Aacute" v="-58"/>
- <pair l="hyphen" r="Adieresis" v="-58"/>
- <pair l="hyphen" r="Aring" v="-58"/>
- <pair l="hyphen" r="T" v="-154"/>
- <pair l="hyphen" r="V" v="-122"/>
- <pair l="hyphen" r="W" v="-71"/>
- <pair l="hyphen" r="Y" v="-202"/>
- <pair l="i" r="T" v="-35"/>
- <pair l="i" r="j" v="-86"/>
- <pair l="k" r="a" v="-9"/>
- <pair l="k" r="aacute" v="-9"/>
- <pair l="k" r="adieresis" v="-9"/>
- <pair l="k" r="ae" v="-9"/>
- <pair l="k" r="aring" v="-9"/>
- <pair l="k" r="comma" v="2"/>
- <pair l="k" r="e" v="-69"/>
- <pair l="k" r="eacute" v="-69"/>
- <pair l="k" r="g" v="-19"/>
- <pair l="k" r="hyphen" v="-134"/>
- <pair l="k" r="o" v="-58"/>
- <pair l="k" r="oacute" v="-58"/>
- <pair l="k" r="odieresis" v="-58"/>
- <pair l="k" r="period" v="2"/>
- <pair l="k" r="s" v="12"/>
- <pair l="k" r="u" v="15"/>
- <pair l="k" r="udieresis" v="15"/>
- <pair l="l" r="v" v="-29"/>
- <pair l="l" r="y" v="-29"/>
- <pair l="m" r="p" v="-6"/>
- <pair l="m" r="v" v="-25"/>
- <pair l="m" r="w" v="-25"/>
- <pair l="m" r="y" v="-25"/>
- <pair l="n" r="T" v="-89"/>
- <pair l="n" r="p" v="-3"/>
- <pair l="n" r="quoteright" v="-80"/>
- <pair l="n" r="v" v="-23"/>
- <pair l="n" r="w" v="-23"/>
- <pair l="n" r="y" v="-23"/>
- <pair l="nine" r="four" v="30"/>
- <pair l="nine" r="one" v="-67"/>
- <pair l="nine" r="seven" v="-50"/>
- <pair l="o" r="T" v="-190"/>
- <pair l="o" r="quoteright" v="-88"/>
- <pair l="o" r="t" v="-18"/>
- <pair l="o" r="v" v="-54"/>
- <pair l="o" r="w" v="-54"/>
- <pair l="o" r="x" v="-54"/>
- <pair l="o" r="y" v="-54"/>
- <pair l="oacute" r="v" v="-54"/>
- <pair l="oacute" r="w" v="-54"/>
- <pair l="oacute" r="y" v="-54"/>
- <pair l="ocircumflex" r="t" v="-18"/>
- <pair l="odieresis" r="t" v="-18"/>
- <pair l="odieresis" r="v" v="-54"/>
- <pair l="odieresis" r="w" v="-54"/>
- <pair l="odieresis" r="x" v="-54"/>
- <pair l="odieresis" r="y" v="-54"/>
- <pair l="ograve" r="v" v="-54"/>
- <pair l="ograve" r="w" v="-54"/>
- <pair l="ograve" r="y" v="-54"/>
- <pair l="one" r="comma" v="-52"/>
- <pair l="one" r="eight" v="-72"/>
- <pair l="one" r="five" v="-50"/>
- <pair l="one" r="four" v="-139"/>
- <pair l="one" r="nine" v="-46"/>
- <pair l="one" r="one" v="-50"/>
- <pair l="one" r="period" v="-52"/>
- <pair l="one" r="seven" v="-78"/>
- <pair l="one" r="six" v="-109"/>
- <pair l="one" r="three" v="-32"/>
- <pair l="one" r="two" v="-20"/>
- <pair l="one" r="zero" v="-112"/>
- <pair l="p" r="t" v="-17"/>
- <pair l="p" r="y" v="-36"/>
- <pair l="period" r="one" v="-51"/>
- <pair l="period" r="quotedblright" v="-86"/>
- <pair l="period" r="quoteright" v="-128"/>
- <pair l="q" r="c" v="-20"/>
- <pair l="q" r="u" v="-6"/>
- <pair l="quotedblbase" r="A" v="18"/>
- <pair l="quotedblbase" r="AE" v="18"/>
- <pair l="quotedblbase" r="T" v="-137"/>
- <pair l="quotedblbase" r="V" v="-223"/>
- <pair l="quotedblbase" r="W" v="-143"/>
- <pair l="quotedblbase" r="Y" v="-202"/>
- <pair l="quotedblleft" r="A" v="-217"/>
- <pair l="quotedblleft" r="AE" v="-306"/>
- <pair l="quotedblleft" r="Aacute" v="-217"/>
- <pair l="quotedblleft" r="Adieresis" v="-217"/>
- <pair l="quotedblleft" r="Aring" v="-217"/>
- <pair l="quotedblleft" r="T" v="-9"/>
- <pair l="quotedblleft" r="V" v="-10"/>
- <pair l="quotedblleft" r="W" v="-10"/>
- <pair l="quotedblleft" r="Y" v="-10"/>
- <pair l="quotedblright" r="A" v="-210"/>
- <pair l="quotedblright" r="AE" v="-303"/>
- <pair l="quotedblright" r="Aacute" v="-210"/>
- <pair l="quotedblright" r="Adieresis" v="-210"/>
- <pair l="quotedblright" r="Aring" v="-210"/>
- <pair l="quotedblright" r="T" v="2"/>
- <pair l="quotedblright" r="V" v="18"/>
- <pair l="quotedblright" r="W" v="18"/>
- <pair l="quotedblright" r="Y" v="18"/>
- <pair l="quoteleft" r="A" v="-258"/>
- <pair l="quoteleft" r="AE" v="-347"/>
- <pair l="quoteleft" r="Aacute" v="-258"/>
- <pair l="quoteleft" r="Adieresis" v="-258"/>
- <pair l="quoteleft" r="Aring" v="-258"/>
- <pair l="quoteleft" r="T" v="-51"/>
- <pair l="quoteleft" r="V" v="-52"/>
- <pair l="quoteleft" r="W" v="-52"/>
- <pair l="quoteleft" r="Y" v="-52"/>
- <pair l="quoteright" r="A" v="-251"/>
- <pair l="quoteright" r="AE" v="-344"/>
- <pair l="quoteright" r="Aacute" v="-251"/>
- <pair l="quoteright" r="Adieresis" v="-251"/>
- <pair l="quoteright" r="Aring" v="-251"/>
- <pair l="quoteright" r="comma" v="-136"/>
- <pair l="quoteright" r="d" v="-101"/>
- <pair l="quoteright" r="o" v="-96"/>
- <pair l="quoteright" r="period" v="-138"/>
- <pair l="quoteright" r="r" v="-64"/>
- <pair l="quoteright" r="s" v="-79"/>
- <pair l="quoteright" r="t" v="-61"/>
- <pair l="quoteright" r="v" v="-50"/>
- <pair l="quoteright" r="w" v="-50"/>
- <pair l="quoteright" r="y" v="-50"/>
- <pair l="r" r="a" v="-23"/>
- <pair l="r" r="aacute" v="-23"/>
- <pair l="r" r="acircumflex" v="-23"/>
- <pair l="r" r="adieresis" v="-23"/>
- <pair l="r" r="ae" v="-23"/>
- <pair l="r" r="agrave" v="-23"/>
- <pair l="r" r="aring" v="-23"/>
- <pair l="r" r="c" v="2"/>
- <pair l="r" r="ccedilla" v="6"/>
- <pair l="r" r="colon" v="-16"/>
- <pair l="r" r="comma" v="-97"/>
- <pair l="r" r="d" v="3"/>
- <pair l="r" r="e" v="4"/>
- <pair l="r" r="eacute" v="4"/>
- <pair l="r" r="ecircumflex" v="4"/>
- <pair l="r" r="egrave" v="4"/>
- <pair l="r" r="f" v="36"/>
- <pair l="r" r="g" v="-2"/>
- <pair l="r" r="h" v="-24"/>
- <pair l="r" r="hyphen" v="-87"/>
- <pair l="r" r="i" v="31"/>
- <pair l="r" r="j" v="-15"/>
- <pair l="r" r="k" v="-21"/>
- <pair l="r" r="l" v="-41"/>
- <pair l="r" r="m" v="36"/>
- <pair l="r" r="n" v="36"/>
- <pair l="r" r="o" v="7"/>
- <pair l="r" r="oacute" v="7"/>
- <pair l="r" r="ocircumflex" v="7"/>
- <pair l="r" r="odieresis" v="7"/>
- <pair l="r" r="oe" v="6"/>
- <pair l="r" r="ograve" v="7"/>
- <pair l="r" r="oslash" v="7"/>
- <pair l="r" r="p" v="54"/>
- <pair l="r" r="period" v="-97"/>
- <pair l="r" r="q" v="3"/>
- <pair l="r" r="quoteright" v="-18"/>
- <pair l="r" r="r" v="39"/>
- <pair l="r" r="s" v="4"/>
- <pair l="r" r="semicolon" v="-16"/>
- <pair l="r" r="t" v="42"/>
- <pair l="r" r="u" v="48"/>
- <pair l="r" r="v" v="54"/>
- <pair l="r" r="w" v="54"/>
- <pair l="r" r="x" v="54"/>
- <pair l="r" r="y" v="54"/>
- <pair l="r" r="z" v="9"/>
- <pair l="s" r="quoteright" v="-97"/>
- <pair l="s" r="t" v="-22"/>
- <pair l="seven" r="colon" v="-111"/>
- <pair l="seven" r="comma" v="-205"/>
- <pair l="seven" r="eight" v="-13"/>
- <pair l="seven" r="five" v="-13"/>
- <pair l="seven" r="four" v="-174"/>
- <pair l="seven" r="one" v="0"/>
- <pair l="seven" r="period" v="-206"/>
- <pair l="seven" r="seven" v="10"/>
- <pair l="seven" r="six" v="-45"/>
- <pair l="seven" r="three" v="12"/>
- <pair l="seven" r="two" v="13"/>
- <pair l="six" r="four" v="47"/>
- <pair l="six" r="one" v="-46"/>
- <pair l="six" r="seven" v="-35"/>
- <pair l="t" r="S" v="-2"/>
- <pair l="t" r="a" v="-18"/>
- <pair l="t" r="aacute" v="-18"/>
- <pair l="t" r="adieresis" v="-18"/>
- <pair l="t" r="ae" v="-18"/>
- <pair l="t" r="aring" v="-18"/>
- <pair l="t" r="colon" v="-16"/>
- <pair l="t" r="e" v="-52"/>
- <pair l="t" r="eacute" v="-52"/>
- <pair l="t" r="h" v="24"/>
- <pair l="t" r="o" v="-49"/>
- <pair l="t" r="oacute" v="-49"/>
- <pair l="t" r="odieresis" v="-49"/>
- <pair l="t" r="quoteright" v="-50"/>
- <pair l="t" r="semicolon" v="-16"/>
- <pair l="three" r="four" v="9"/>
- <pair l="three" r="one" v="-74"/>
- <pair l="three" r="seven" v="-60"/>
- <pair l="two" r="four" v="-114"/>
- <pair l="two" r="one" v="-48"/>
- <pair l="two" r="seven" v="-42"/>
- <pair l="u" r="quoteright" v="-80"/>
- <pair l="v" r="a" v="-18"/>
- <pair l="v" r="aacute" v="-18"/>
- <pair l="v" r="acircumflex" v="-18"/>
- <pair l="v" r="adieresis" v="-18"/>
- <pair l="v" r="ae" v="-18"/>
- <pair l="v" r="agrave" v="-18"/>
- <pair l="v" r="aring" v="-18"/>
- <pair l="v" r="atilde" v="-18"/>
- <pair l="v" r="c" v="-67"/>
- <pair l="v" r="colon" v="-11"/>
- <pair l="v" r="comma" v="-142"/>
- <pair l="v" r="e" v="-55"/>
- <pair l="v" r="eacute" v="-55"/>
- <pair l="v" r="ecircumflex" v="-55"/>
- <pair l="v" r="egrave" v="-55"/>
- <pair l="v" r="g" v="-36"/>
- <pair l="v" r="hyphen" v="-40"/>
- <pair l="v" r="l" v="-36"/>
- <pair l="v" r="o" v="-53"/>
- <pair l="v" r="oacute" v="-53"/>
- <pair l="v" r="odieresis" v="-53"/>
- <pair l="v" r="ograve" v="-53"/>
- <pair l="v" r="oslash" v="-53"/>
- <pair l="v" r="period" v="-143"/>
- <pair l="v" r="s" v="-16"/>
- <pair l="v" r="semicolon" v="-11"/>
- <pair l="w" r="a" v="-19"/>
- <pair l="w" r="aacute" v="-19"/>
- <pair l="w" r="acircumflex" v="-19"/>
- <pair l="w" r="adieresis" v="-19"/>
- <pair l="w" r="ae" v="-19"/>
- <pair l="w" r="agrave" v="-19"/>
- <pair l="w" r="aring" v="-19"/>
- <pair l="w" r="atilde" v="-19"/>
- <pair l="w" r="c" v="-68"/>
- <pair l="w" r="colon" v="-12"/>
- <pair l="w" r="comma" v="-120"/>
- <pair l="w" r="e" v="-56"/>
- <pair l="w" r="eacute" v="-56"/>
- <pair l="w" r="ecircumflex" v="-56"/>
- <pair l="w" r="egrave" v="-56"/>
- <pair l="w" r="g" v="-37"/>
- <pair l="w" r="hyphen" v="-32"/>
- <pair l="w" r="l" v="-37"/>
- <pair l="w" r="o" v="-54"/>
- <pair l="w" r="oacute" v="-54"/>
- <pair l="w" r="odieresis" v="-54"/>
- <pair l="w" r="ograve" v="-54"/>
- <pair l="w" r="oslash" v="-54"/>
- <pair l="w" r="period" v="-121"/>
- <pair l="w" r="s" v="-17"/>
- <pair l="w" r="semicolon" v="-12"/>
- <pair l="x" r="a" v="-9"/>
- <pair l="x" r="c" v="-77"/>
- <pair l="x" r="e" v="-69"/>
- <pair l="x" r="eacute" v="-69"/>
- <pair l="x" r="o" v="-59"/>
- <pair l="x" r="q" v="-40"/>
- <pair l="y" r="a" v="-18"/>
- <pair l="y" r="aacute" v="-18"/>
- <pair l="y" r="acircumflex" v="-18"/>
- <pair l="y" r="adieresis" v="-18"/>
- <pair l="y" r="ae" v="-18"/>
- <pair l="y" r="agrave" v="-18"/>
- <pair l="y" r="aring" v="-18"/>
- <pair l="y" r="atilde" v="-18"/>
- <pair l="y" r="c" v="-67"/>
- <pair l="y" r="colon" v="-11"/>
- <pair l="y" r="comma" v="-142"/>
- <pair l="y" r="e" v="-55"/>
- <pair l="y" r="eacute" v="-55"/>
- <pair l="y" r="ecircumflex" v="-55"/>
- <pair l="y" r="egrave" v="-55"/>
- <pair l="y" r="g" v="-36"/>
- <pair l="y" r="hyphen" v="-39"/>
- <pair l="y" r="l" v="-36"/>
- <pair l="y" r="o" v="-53"/>
- <pair l="y" r="oacute" v="-53"/>
- <pair l="y" r="odieresis" v="-53"/>
- <pair l="y" r="ograve" v="-53"/>
- <pair l="y" r="oslash" v="-53"/>
- <pair l="y" r="period" v="-142"/>
- <pair l="y" r="s" v="-16"/>
- <pair l="y" r="semicolon" v="-11"/>
- <pair l="zero" r="four" v="30"/>
- <pair l="zero" r="one" v="-78"/>
- <pair l="zero" r="seven" v="-60"/>
- </kernsubtable>
- </kern>
-
- <name>
- <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
- Luxi Serif
- </namerecord>
- <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
- Luxi Serif Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
- Luxi Serif Regular
- </namerecord>
- <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
- LuxiSerif
- </namerecord>
- <namerecord nameID="7" platformID="1" platEncID="0" langID="0x0">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="1" platEncID="0" langID="0x0">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="1" platEncID="0" langID="0x0">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="1" platEncID="0" langID="0x0">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="1" platEncID="0" langID="0x0">
- design@bigelowandholmes.com
- </namerecord>
- <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Luxi Serif
- </namerecord>
- <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
- Luxi Serif Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Luxi Serif Regular
- </namerecord>
- <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
- LuxiSerif
- </namerecord>
- <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
- design@bigelowandholmes.com
- </namerecord>
- </name>
-
- <post>
- <formatType value="2.0"/>
- <italicAngle value="0.0"/>
- <underlinePosition value="0"/>
- <underlineThickness value="0"/>
- <isFixedPitch value="0"/>
- <minMemType42 value="0"/>
- <maxMemType42 value="0"/>
- <minMemType1 value="0"/>
- <maxMemType1 value="0"/>
- <psNames>
- <!-- This file uses unique glyph names based on the information
- found in the 'post' table. Since these names might not be unique,
- we have to invent artificial names in case of clashes. In order to
- be able to retain the original information, we need a name to
- ps name mapping for those cases where they differ. That's what
- you see below.
- -->
- <psName name=".notdef#1" psName=".notdef"/>
- <psName name=".notdef#10" psName=".notdef"/>
- <psName name=".notdef#11" psName=".notdef"/>
- <psName name=".notdef#12" psName=".notdef"/>
- <psName name=".notdef#13" psName=".notdef"/>
- <psName name=".notdef#14" psName=".notdef"/>
- <psName name=".notdef#15" psName=".notdef"/>
- <psName name=".notdef#16" psName=".notdef"/>
- <psName name=".notdef#17" psName=".notdef"/>
- <psName name=".notdef#18" psName=".notdef"/>
- <psName name=".notdef#2" psName=".notdef"/>
- <psName name=".notdef#3" psName=".notdef"/>
- <psName name=".notdef#4" psName=".notdef"/>
- <psName name=".notdef#5" psName=".notdef"/>
- <psName name=".notdef#6" psName=".notdef"/>
- <psName name=".notdef#7" psName=".notdef"/>
- <psName name=".notdef#8" psName=".notdef"/>
- <psName name=".notdef#9" psName=".notdef"/>
- <psName name="Euro#1" psName="Euro"/>
- <psName name="fi#1" psName="fi"/>
- <psName name="fl#1" psName="fl"/>
- <psName name="fraction#1" psName="fraction"/>
- <psName name="hyphen#1" psName="hyphen"/>
- <psName name="macron#1" psName="macron"/>
- <psName name="periodcentered#1" psName="periodcentered"/>
- <psName name="semicolon#1" psName="semicolon"/>
- </psNames>
- <extraNames>
- <!-- following are the name that are not taken from the standard Mac glyph order -->
- <psName name="fraction"/>
- <psName name="fi"/>
- <psName name="Euro"/>
- <psName name="tilde"/>
- <psName name="macron"/>
- <psName name="Euro"/>
- <psName name="sfthyphen"/>
- <psName name="periodcentered"/>
- <psName name="Amacron"/>
- <psName name="amacron"/>
- <psName name="Abreve"/>
- <psName name="abreve"/>
- <psName name="Aogonek"/>
- <psName name="aogonek"/>
- <psName name="Ccircumflex"/>
- <psName name="ccircumflex"/>
- <psName name="Cdotaccent"/>
- <psName name="cdotaccent"/>
- <psName name="Dcaron"/>
- <psName name="dcaron"/>
- <psName name="Dcroat"/>
- <psName name="dcroat"/>
- <psName name="Emacron"/>
- <psName name="emacron"/>
- <psName name="Ebreve"/>
- <psName name="ebreve"/>
- <psName name="Edotaccent"/>
- <psName name="edotaccent"/>
- <psName name="Eogonek"/>
- <psName name="eogonek"/>
- <psName name="Ecaron"/>
- <psName name="ecaron"/>
- <psName name="Gcircumflex"/>
- <psName name="gcircumflex"/>
- <psName name="Gdotaccent"/>
- <psName name="gdotaccent"/>
- <psName name="Gcommaaccent"/>
- <psName name="gcommaaccent"/>
- <psName name="Hcircumflex"/>
- <psName name="hcircumflex"/>
- <psName name="Hbar"/>
- <psName name="hbar"/>
- <psName name="Itilde"/>
- <psName name="itilde"/>
- <psName name="Imacron"/>
- <psName name="imacron"/>
- <psName name="Ibreve"/>
- <psName name="ibreve"/>
- <psName name="Iogonek"/>
- <psName name="iogonek"/>
- <psName name="IJ"/>
- <psName name="ij"/>
- <psName name="Jcircumflex"/>
- <psName name="jcircumflex"/>
- <psName name="Kcommaaccent"/>
- <psName name="kcommaaccent"/>
- <psName name="kgreenlandic"/>
- <psName name="Lacute"/>
- <psName name="lacute"/>
- <psName name="Lcommaaccent"/>
- <psName name="lcommaaccent"/>
- <psName name="Lcaron"/>
- <psName name="lcaron"/>
- <psName name="Ldot"/>
- <psName name="ldot"/>
- <psName name="Nacute"/>
- <psName name="nacute"/>
- <psName name="Ncommaaccent"/>
- <psName name="ncommaaccent"/>
- <psName name="Ncaron"/>
- <psName name="ncaron"/>
- <psName name="napostrophe"/>
- <psName name="Eng"/>
- <psName name="eng"/>
- <psName name="Omacron"/>
- <psName name="omacron"/>
- <psName name="Obreve"/>
- <psName name="obreve"/>
- <psName name="Ohungarumlaut"/>
- <psName name="ohungarumlaut"/>
- <psName name="Racute"/>
- <psName name="racute"/>
- <psName name="Rcommaaccent"/>
- <psName name="rcommaaccent"/>
- <psName name="Rcaron"/>
- <psName name="rcaron"/>
- <psName name="Sacute"/>
- <psName name="sacute"/>
- <psName name="Scircumflex"/>
- <psName name="scircumflex"/>
- <psName name="Tcommaaccent"/>
- <psName name="tcommaaccent"/>
- <psName name="Tcaron"/>
- <psName name="tcaron"/>
- <psName name="Tbar"/>
- <psName name="tbar"/>
- <psName name="Utilde"/>
- <psName name="utilde"/>
- <psName name="Umacron"/>
- <psName name="umacron"/>
- <psName name="Ubreve"/>
- <psName name="ubreve"/>
- <psName name="Uring"/>
- <psName name="uring"/>
- <psName name="Uhungarumlaut"/>
- <psName name="uhungarumlaut"/>
- <psName name="Uogonek"/>
- <psName name="uogonek"/>
- <psName name="Wcircumflex"/>
- <psName name="wcircumflex"/>
- <psName name="Ycircumflex"/>
- <psName name="ycircumflex"/>
- <psName name="Zacute"/>
- <psName name="zacute"/>
- <psName name="Zdotaccent"/>
- <psName name="zdotaccent"/>
- <psName name="longs"/>
- <psName name="Scommaaccent"/>
- <psName name="scommaaccent"/>
- <psName name="Tcommabelow"/>
- <psName name="tcommabelow"/>
- <psName name="Unterkomma"/>
- <psName name="semicolon"/>
- <psName name="anoteleia"/>
- <psName name="hyphen"/>
- <psName name="nbhyphen"/>
- <psName name="figuredash"/>
- <psName name="afii00208"/>
- <psName name="quotereversed"/>
- <psName name="radicalex"/>
- <psName name="estimated"/>
- <psName name="dotmath"/>
- <psName name="fi"/>
- <psName name="fl"/>
- <psName name="foursuperiour"/>
- <psName name="dotlessj"/>
- </extraNames>
- </post>
-
- <gasp>
- <gaspRange rangeMaxPPEM="8" rangeGaspBehavior="2"/>
- <gaspRange rangeMaxPPEM="16" rangeGaspBehavior="1"/>
- <gaspRange rangeMaxPPEM="65535" rangeGaspBehavior="3"/>
- </gasp>
-
- <vhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="432"/>
- <lineGap value="0"/>
- <advanceHeightMax value="2465"/>
- <minTopSideBearing value="0"/>
- <minBottomSideBearing value="0"/>
- <yMaxExtent value="2465"/>
- <caretSlopeRise value="0"/>
- <caretSlopeRun value="1"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <reserved4 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfVMetrics value="391"/>
- </vhea>
-
- <vmtx>
- <mtx name=".notdef" height="2465" tsb="553"/>
- <mtx name=".notdef#1" height="0" tsb="0"/>
- <mtx name=".notdef#10" height="2465" tsb="0"/>
- <mtx name=".notdef#11" height="2465" tsb="0"/>
- <mtx name=".notdef#12" height="2465" tsb="0"/>
- <mtx name=".notdef#13" height="2465" tsb="0"/>
- <mtx name=".notdef#14" height="2465" tsb="0"/>
- <mtx name=".notdef#15" height="2465" tsb="0"/>
- <mtx name=".notdef#16" height="1024" tsb="0"/>
- <mtx name=".notdef#17" height="2465" tsb="0"/>
- <mtx name=".notdef#18" height="2465" tsb="0"/>
- <mtx name=".notdef#2" height="2465" tsb="0"/>
- <mtx name=".notdef#3" height="2465" tsb="0"/>
- <mtx name=".notdef#4" height="2465" tsb="0"/>
- <mtx name=".notdef#5" height="2465" tsb="0"/>
- <mtx name=".notdef#6" height="2465" tsb="0"/>
- <mtx name=".notdef#7" height="2465" tsb="0"/>
- <mtx name=".notdef#8" height="2465" tsb="0"/>
- <mtx name=".notdef#9" height="2465" tsb="0"/>
- <mtx name="A" height="2465" tsb="534"/>
- <mtx name="AE" height="2465" tsb="553"/>
- <mtx name="Aacute" height="2465" tsb="108"/>
- <mtx name="Abreve" height="2465" tsb="108"/>
- <mtx name="Acircumflex" height="2465" tsb="108"/>
- <mtx name="Adieresis" height="2465" tsb="256"/>
- <mtx name="Agrave" height="2465" tsb="108"/>
- <mtx name="Amacron" height="2465" tsb="306"/>
- <mtx name="Aogonek" height="2465" tsb="534"/>
- <mtx name="Aring" height="2465" tsb="99"/>
- <mtx name="Atilde" height="2465" tsb="194"/>
- <mtx name="B" height="2465" tsb="553"/>
- <mtx name="C" height="2465" tsb="516"/>
- <mtx name="Cacute" height="2465" tsb="108"/>
- <mtx name="Ccaron" height="2465" tsb="108"/>
- <mtx name="Ccedilla" height="2465" tsb="516"/>
- <mtx name="Ccircumflex" height="2465" tsb="108"/>
- <mtx name="Cdotaccent" height="2465" tsb="232"/>
- <mtx name="D" height="2465" tsb="544"/>
- <mtx name="Dcaron" height="2465" tsb="108"/>
- <mtx name="Dcroat" height="2465" tsb="544"/>
- <mtx name="E" height="2465" tsb="553"/>
- <mtx name="Eacute" height="2465" tsb="108"/>
- <mtx name="Ebreve" height="2465" tsb="108"/>
- <mtx name="Ecaron" height="2465" tsb="108"/>
- <mtx name="Ecircumflex" height="2465" tsb="108"/>
- <mtx name="Edieresis" height="2465" tsb="256"/>
- <mtx name="Edotaccent" height="2465" tsb="232"/>
- <mtx name="Egrave" height="2465" tsb="108"/>
- <mtx name="Emacron" height="2465" tsb="306"/>
- <mtx name="Eng" height="2465" tsb="553"/>
- <mtx name="Eogonek" height="2465" tsb="553"/>
- <mtx name="Eth" height="2465" tsb="544"/>
- <mtx name="Euro" height="2465" tsb="516"/>
- <mtx name="Euro#1" height="2465" tsb="516"/>
- <mtx name="F" height="2465" tsb="553"/>
- <mtx name="G" height="2465" tsb="515"/>
- <mtx name="Gbreve" height="2465" tsb="108"/>
- <mtx name="Gcircumflex" height="2465" tsb="108"/>
- <mtx name="Gcommaaccent" height="2465" tsb="515"/>
- <mtx name="Gdotaccent" height="2465" tsb="232"/>
- <mtx name="H" height="2465" tsb="553"/>
- <mtx name="Hbar" height="2465" tsb="553"/>
- <mtx name="Hcircumflex" height="2465" tsb="108"/>
- <mtx name="I" height="2465" tsb="553"/>
- <mtx name="IJ" height="2465" tsb="553"/>
- <mtx name="Iacute" height="2465" tsb="108"/>
- <mtx name="Ibreve" height="2465" tsb="108"/>
- <mtx name="Icircumflex" height="2465" tsb="108"/>
- <mtx name="Idieresis" height="2465" tsb="256"/>
- <mtx name="Idotaccent" height="2465" tsb="232"/>
- <mtx name="Igrave" height="2465" tsb="108"/>
- <mtx name="Imacron" height="2465" tsb="306"/>
- <mtx name="Iogonek" height="2465" tsb="553"/>
- <mtx name="Itilde" height="2465" tsb="194"/>
- <mtx name="J" height="2465" tsb="553"/>
- <mtx name="Jcircumflex" height="2465" tsb="108"/>
- <mtx name="K" height="2465" tsb="553"/>
- <mtx name="Kcommaaccent" height="2465" tsb="553"/>
- <mtx name="L" height="2465" tsb="553"/>
- <mtx name="Lacute" height="2465" tsb="108"/>
- <mtx name="Lcaron" height="2465" tsb="553"/>
- <mtx name="Lcommaaccent" height="2465" tsb="553"/>
- <mtx name="Ldot" height="2465" tsb="553"/>
- <mtx name="Lslash" height="2465" tsb="553"/>
- <mtx name="M" height="2465" tsb="553"/>
- <mtx name="N" height="2465" tsb="553"/>
- <mtx name="Nacute" height="2465" tsb="108"/>
- <mtx name="Ncaron" height="2465" tsb="108"/>
- <mtx name="Ncommaaccent" height="2465" tsb="553"/>
- <mtx name="Ntilde" height="2465" tsb="194"/>
- <mtx name="O" height="2465" tsb="516"/>
- <mtx name="OE" height="2465" tsb="516"/>
- <mtx name="Oacute" height="2465" tsb="108"/>
- <mtx name="Obreve" height="2465" tsb="108"/>
- <mtx name="Ocircumflex" height="2465" tsb="108"/>
- <mtx name="Odieresis" height="2465" tsb="256"/>
- <mtx name="Ograve" height="2465" tsb="108"/>
- <mtx name="Ohungarumlaut" height="2465" tsb="108"/>
- <mtx name="Omacron" height="2465" tsb="306"/>
- <mtx name="Oslash" height="2465" tsb="516"/>
- <mtx name="Otilde" height="2465" tsb="194"/>
- <mtx name="P" height="2465" tsb="541"/>
- <mtx name="Q" height="2465" tsb="516"/>
- <mtx name="R" height="2465" tsb="541"/>
- <mtx name="Racute" height="2465" tsb="108"/>
- <mtx name="Rcaron" height="2465" tsb="108"/>
- <mtx name="Rcommaaccent" height="2465" tsb="542"/>
- <mtx name="S" height="2465" tsb="516"/>
- <mtx name="Sacute" height="2465" tsb="108"/>
- <mtx name="Scaron" height="2465" tsb="108"/>
- <mtx name="Scedilla" height="2465" tsb="516"/>
- <mtx name="Scircumflex" height="2465" tsb="108"/>
- <mtx name="Scommaaccent" height="2465" tsb="516"/>
- <mtx name="T" height="2465" tsb="553"/>
- <mtx name="Tbar" height="2465" tsb="553"/>
- <mtx name="Tcaron" height="2465" tsb="108"/>
- <mtx name="Tcommaaccent" height="2465" tsb="553"/>
- <mtx name="Tcommabelow" height="2465" tsb="553"/>
- <mtx name="Thorn" height="2465" tsb="553"/>
- <mtx name="U" height="2465" tsb="553"/>
- <mtx name="Uacute" height="2465" tsb="108"/>
- <mtx name="Ubreve" height="2465" tsb="108"/>
- <mtx name="Ucircumflex" height="2465" tsb="108"/>
- <mtx name="Udieresis" height="2465" tsb="256"/>
- <mtx name="Ugrave" height="2465" tsb="108"/>
- <mtx name="Uhungarumlaut" height="2465" tsb="108"/>
- <mtx name="Umacron" height="2465" tsb="306"/>
- <mtx name="Unterkomma" height="2465" tsb="2144"/>
- <mtx name="Uogonek" height="2465" tsb="553"/>
- <mtx name="Uring" height="2465" tsb="0"/>
- <mtx name="Utilde" height="2465" tsb="194"/>
- <mtx name="V" height="2465" tsb="553"/>
- <mtx name="W" height="2465" tsb="553"/>
- <mtx name="Wcircumflex" height="2465" tsb="108"/>
- <mtx name="X" height="2465" tsb="553"/>
- <mtx name="Y" height="2465" tsb="553"/>
- <mtx name="Yacute" height="2465" tsb="108"/>
- <mtx name="Ycircumflex" height="2465" tsb="108"/>
- <mtx name="Ydieresis" height="2465" tsb="256"/>
- <mtx name="Z" height="2465" tsb="553"/>
- <mtx name="Zacute" height="2465" tsb="108"/>
- <mtx name="Zcaron" height="2465" tsb="108"/>
- <mtx name="Zdotaccent" height="2465" tsb="232"/>
- <mtx name="a" height="2465" tsb="923"/>
- <mtx name="aacute" height="2465" tsb="429"/>
- <mtx name="abreve" height="2465" tsb="429"/>
- <mtx name="acircumflex" height="2465" tsb="429"/>
- <mtx name="acute" height="2465" tsb="429"/>
- <mtx name="adieresis" height="2465" tsb="577"/>
- <mtx name="ae" height="2465" tsb="922"/>
- <mtx name="afii00208" height="2465" tsb="1391"/>
- <mtx name="agrave" height="2465" tsb="429"/>
- <mtx name="amacron" height="2465" tsb="627"/>
- <mtx name="ampersand" height="2465" tsb="515"/>
- <mtx name="anoteleia" height="2465" tsb="1295"/>
- <mtx name="aogonek" height="2465" tsb="923"/>
- <mtx name="aring" height="2465" tsb="296"/>
- <mtx name="asciicircum" height="2465" tsb="553"/>
- <mtx name="asciitilde" height="2465" tsb="1270"/>
- <mtx name="asterisk" height="2465" tsb="553"/>
- <mtx name="at" height="2465" tsb="516"/>
- <mtx name="atilde" height="2465" tsb="515"/>
- <mtx name="b" height="2465" tsb="454"/>
- <mtx name="backslash" height="2465" tsb="552"/>
- <mtx name="bar" height="2465" tsb="454"/>
- <mtx name="braceleft" height="2465" tsb="454"/>
- <mtx name="braceright" height="2465" tsb="454"/>
- <mtx name="bracketleft" height="2465" tsb="454"/>
- <mtx name="bracketright" height="2465" tsb="454"/>
- <mtx name="breve" height="2465" tsb="429"/>
- <mtx name="brokenbar" height="2465" tsb="454"/>
- <mtx name="bullet" height="2465" tsb="923"/>
- <mtx name="c" height="2465" tsb="923"/>
- <mtx name="cacute" height="2465" tsb="429"/>
- <mtx name="caron" height="2465" tsb="429"/>
- <mtx name="ccaron" height="2465" tsb="429"/>
- <mtx name="ccedilla" height="2465" tsb="923"/>
- <mtx name="ccircumflex" height="2465" tsb="429"/>
- <mtx name="cdotaccent" height="2465" tsb="553"/>
- <mtx name="cedilla" height="2465" tsb="2033"/>
- <mtx name="cent" height="2465" tsb="553"/>
- <mtx name="circumflex" height="2465" tsb="429"/>
- <mtx name="colon" height="2465" tsb="947"/>
- <mtx name="comma" height="2465" tsb="1786"/>
- <mtx name="copyright" height="2465" tsb="602"/>
- <mtx name="currency" height="2465" tsb="855"/>
- <mtx name="d" height="2465" tsb="454"/>
- <mtx name="dagger" height="2465" tsb="553"/>
- <mtx name="daggerdbl" height="2465" tsb="553"/>
- <mtx name="dcaron" height="2465" tsb="454"/>
- <mtx name="dcroat" height="2465" tsb="454"/>
- <mtx name="degree" height="2465" tsb="516"/>
- <mtx name="dieresis" height="2465" tsb="577"/>
- <mtx name="divide" height="2465" tsb="947"/>
- <mtx name="dollar" height="2465" tsb="429"/>
- <mtx name="dotaccent" height="2465" tsb="553"/>
- <mtx name="dotlessi" height="2465" tsb="947"/>
- <mtx name="dotlessj" height="2465" tsb="947"/>
- <mtx name="dotmath" height="2465" tsb="1295"/>
- <mtx name="e" height="2465" tsb="923"/>
- <mtx name="eacute" height="2465" tsb="429"/>
- <mtx name="ebreve" height="2465" tsb="429"/>
- <mtx name="ecaron" height="2465" tsb="429"/>
- <mtx name="ecircumflex" height="2465" tsb="429"/>
- <mtx name="edieresis" height="2465" tsb="577"/>
- <mtx name="edotaccent" height="2465" tsb="553"/>
- <mtx name="egrave" height="2465" tsb="429"/>
- <mtx name="eight" height="2465" tsb="515"/>
- <mtx name="ellipsis" height="2465" tsb="1836"/>
- <mtx name="emacron" height="2465" tsb="627"/>
- <mtx name="emdash" height="2465" tsb="1391"/>
- <mtx name="endash" height="2465" tsb="1367"/>
- <mtx name="eng" height="2465" tsb="923"/>
- <mtx name="eogonek" height="2465" tsb="923"/>
- <mtx name="equal" height="2465" tsb="1206"/>
- <mtx name="estimated" height="2465" tsb="923"/>
- <mtx name="eth" height="2465" tsb="448"/>
- <mtx name="exclam" height="2465" tsb="553"/>
- <mtx name="exclamdown" height="2465" tsb="947"/>
- <mtx name="f" height="2465" tsb="429"/>
- <mtx name="fi" height="2465" tsb="429"/>
- <mtx name="fi#1" height="2465" tsb="429"/>
- <mtx name="figuredash" height="2465" tsb="1367"/>
- <mtx name="five" height="2465" tsb="553"/>
- <mtx name="fl" height="2465" tsb="429"/>
- <mtx name="fl#1" height="2465" tsb="429"/>
- <mtx name="florin" height="2465" tsb="528"/>
- <mtx name="four" height="2465" tsb="528"/>
- <mtx name="foursuperiour" height="2465" tsb="511"/>
- <mtx name="fraction" height="2465" tsb="516"/>
- <mtx name="fraction#1" height="2465" tsb="516"/>
- <mtx name="g" height="2465" tsb="923"/>
- <mtx name="gbreve" height="2465" tsb="429"/>
- <mtx name="gcircumflex" height="2465" tsb="429"/>
- <mtx name="gcommaaccent" height="2465" tsb="296"/>
- <mtx name="gdotaccent" height="2465" tsb="553"/>
- <mtx name="germandbls" height="2465" tsb="429"/>
- <mtx name="grave" height="2465" tsb="429"/>
- <mtx name="greater" height="2465" tsb="947"/>
- <mtx name="guillemotleft" height="2465" tsb="1058"/>
- <mtx name="guillemotright" height="2465" tsb="1058"/>
- <mtx name="guilsinglleft" height="2465" tsb="1058"/>
- <mtx name="guilsinglright" height="2465" tsb="1058"/>
- <mtx name="h" height="2465" tsb="454"/>
- <mtx name="hbar" height="2465" tsb="454"/>
- <mtx name="hcircumflex" height="2465" tsb="34"/>
- <mtx name="hungarumlaut" height="2465" tsb="429"/>
- <mtx name="hyphen" height="2465" tsb="1367"/>
- <mtx name="hyphen#1" height="2465" tsb="1367"/>
- <mtx name="i" height="2465" tsb="553"/>
- <mtx name="iacute" height="2465" tsb="429"/>
- <mtx name="ibreve" height="2465" tsb="429"/>
- <mtx name="icircumflex" height="2465" tsb="429"/>
- <mtx name="idieresis" height="2465" tsb="577"/>
- <mtx name="igrave" height="2465" tsb="429"/>
- <mtx name="ij" height="2465" tsb="553"/>
- <mtx name="imacron" height="2465" tsb="627"/>
- <mtx name="iogonek" height="2465" tsb="553"/>
- <mtx name="itilde" height="2465" tsb="515"/>
- <mtx name="j" height="2465" tsb="553"/>
- <mtx name="jcircumflex" height="2465" tsb="429"/>
- <mtx name="k" height="2465" tsb="454"/>
- <mtx name="kcommaaccent" height="2465" tsb="454"/>
- <mtx name="kgreenlandic" height="2465" tsb="947"/>
- <mtx name="l" height="2465" tsb="454"/>
- <mtx name="lacute" height="2465" tsb="34"/>
- <mtx name="lcaron" height="2465" tsb="454"/>
- <mtx name="lcommaaccent" height="2465" tsb="454"/>
- <mtx name="ldot" height="2465" tsb="454"/>
- <mtx name="less" height="2465" tsb="947"/>
- <mtx name="logicalnot" height="2465" tsb="1243"/>
- <mtx name="longs" height="2465" tsb="429"/>
- <mtx name="lslash" height="2465" tsb="454"/>
- <mtx name="m" height="2465" tsb="923"/>
- <mtx name="macron" height="2465" tsb="627"/>
- <mtx name="macron#1" height="2465" tsb="429"/>
- <mtx name="minus" height="2465" tsb="1391"/>
- <mtx name="mu" height="2465" tsb="947"/>
- <mtx name="multiply" height="2465" tsb="947"/>
- <mtx name="n" height="2465" tsb="923"/>
- <mtx name="nacute" height="2465" tsb="429"/>
- <mtx name="napostrophe" height="2465" tsb="454"/>
- <mtx name="nbhyphen" height="2465" tsb="1367"/>
- <mtx name="ncaron" height="2465" tsb="429"/>
- <mtx name="ncommaaccent" height="2465" tsb="923"/>
- <mtx name="nine" height="2465" tsb="515"/>
- <mtx name="nonbreakingspace" height="2465" tsb="2033"/>
- <mtx name="ntilde" height="2465" tsb="515"/>
- <mtx name="numbersign" height="2465" tsb="553"/>
- <mtx name="o" height="2465" tsb="923"/>
- <mtx name="oacute" height="2465" tsb="429"/>
- <mtx name="obreve" height="2465" tsb="429"/>
- <mtx name="ocircumflex" height="2465" tsb="429"/>
- <mtx name="odieresis" height="2465" tsb="577"/>
- <mtx name="oe" height="2465" tsb="923"/>
- <mtx name="ogonek" height="2465" tsb="2033"/>
- <mtx name="ograve" height="2465" tsb="429"/>
- <mtx name="ohungarumlaut" height="2465" tsb="429"/>
- <mtx name="omacron" height="2465" tsb="627"/>
- <mtx name="one" height="2465" tsb="540"/>
- <mtx name="onehalf" height="2465" tsb="516"/>
- <mtx name="onequarter" height="2465" tsb="516"/>
- <mtx name="onesuperior" height="2465" tsb="516"/>
- <mtx name="ordfeminine" height="2465" tsb="516"/>
- <mtx name="ordmasculine" height="2465" tsb="516"/>
- <mtx name="oslash" height="2465" tsb="923"/>
- <mtx name="otilde" height="2465" tsb="515"/>
- <mtx name="p" height="2465" tsb="923"/>
- <mtx name="paragraph" height="2465" tsb="544"/>
- <mtx name="parenleft" height="2465" tsb="454"/>
- <mtx name="parenright" height="2465" tsb="454"/>
- <mtx name="percent" height="2465" tsb="516"/>
- <mtx name="period" height="2465" tsb="1786"/>
- <mtx name="periodcentered" height="2465" tsb="1295"/>
- <mtx name="periodcentered#1" height="2465" tsb="1295"/>
- <mtx name="perthousand" height="2465" tsb="516"/>
- <mtx name="plus" height="2465" tsb="947"/>
- <mtx name="plusminus" height="2465" tsb="849"/>
- <mtx name="q" height="2465" tsb="923"/>
- <mtx name="question" height="2465" tsb="516"/>
- <mtx name="questiondown" height="2465" tsb="553"/>
- <mtx name="quotedbl" height="2465" tsb="454"/>
- <mtx name="quotedblbase" height="2465" tsb="1786"/>
- <mtx name="quotedblleft" height="2465" tsb="454"/>
- <mtx name="quotedblright" height="2465" tsb="454"/>
- <mtx name="quoteleft" height="2465" tsb="454"/>
- <mtx name="quotereversed" height="2465" tsb="2033"/>
- <mtx name="quoteright" height="2465" tsb="454"/>
- <mtx name="quotesinglbase" height="2465" tsb="1786"/>
- <mtx name="quotesingle" height="2465" tsb="454"/>
- <mtx name="r" height="2465" tsb="923"/>
- <mtx name="racute" height="2465" tsb="429"/>
- <mtx name="radicalex" height="2465" tsb="429"/>
- <mtx name="rcaron" height="2465" tsb="429"/>
- <mtx name="rcommaaccent" height="2465" tsb="923"/>
- <mtx name="registered" height="2465" tsb="602"/>
- <mtx name="ring" height="2465" tsb="296"/>
- <mtx name="s" height="2465" tsb="923"/>
- <mtx name="sacute" height="2465" tsb="429"/>
- <mtx name="scaron" height="2465" tsb="429"/>
- <mtx name="scedilla" height="2465" tsb="923"/>
- <mtx name="scircumflex" height="2465" tsb="429"/>
- <mtx name="scommaaccent" height="2465" tsb="923"/>
- <mtx name="section" height="2465" tsb="516"/>
- <mtx name="semicolon" height="2465" tsb="947"/>
- <mtx name="semicolon#1" height="2465" tsb="947"/>
- <mtx name="seven" height="2465" tsb="553"/>
- <mtx name="sfthyphen" height="2465" tsb="1367"/>
- <mtx name="six" height="2465" tsb="515"/>
- <mtx name="slash" height="2465" tsb="552"/>
- <mtx name="space" height="2465" tsb="2033"/>
- <mtx name="sterling" height="2465" tsb="528"/>
- <mtx name="t" height="2465" tsb="701"/>
- <mtx name="tbar" height="2465" tsb="701"/>
- <mtx name="tcaron" height="2465" tsb="345"/>
- <mtx name="tcommaaccent" height="2465" tsb="701"/>
- <mtx name="tcommabelow" height="2465" tsb="701"/>
- <mtx name="thorn" height="2465" tsb="454"/>
- <mtx name="three" height="2465" tsb="516"/>
- <mtx name="threequarters" height="2465" tsb="516"/>
- <mtx name="threesuperior" height="2465" tsb="516"/>
- <mtx name="tilde" height="2465" tsb="515"/>
- <mtx name="trademark" height="2465" tsb="553"/>
- <mtx name="two" height="2465" tsb="515"/>
- <mtx name="twosuperior" height="2465" tsb="515"/>
- <mtx name="u" height="2465" tsb="947"/>
- <mtx name="uacute" height="2465" tsb="429"/>
- <mtx name="ubreve" height="2465" tsb="429"/>
- <mtx name="ucircumflex" height="2465" tsb="429"/>
- <mtx name="udieresis" height="2465" tsb="577"/>
- <mtx name="ugrave" height="2465" tsb="429"/>
- <mtx name="uhungarumlaut" height="2465" tsb="429"/>
- <mtx name="umacron" height="2465" tsb="627"/>
- <mtx name="underscore" height="2465" tsb="2033"/>
- <mtx name="uogonek" height="2465" tsb="947"/>
- <mtx name="uring" height="2465" tsb="296"/>
- <mtx name="utilde" height="2465" tsb="515"/>
- <mtx name="v" height="2465" tsb="947"/>
- <mtx name="w" height="2465" tsb="947"/>
- <mtx name="wcircumflex" height="2465" tsb="429"/>
- <mtx name="x" height="2465" tsb="947"/>
- <mtx name="y" height="2465" tsb="947"/>
- <mtx name="yacute" height="2465" tsb="429"/>
- <mtx name="ycircumflex" height="2465" tsb="429"/>
- <mtx name="ydieresis" height="2465" tsb="577"/>
- <mtx name="yen" height="2465" tsb="553"/>
- <mtx name="z" height="2465" tsb="947"/>
- <mtx name="zacute" height="2465" tsb="429"/>
- <mtx name="zcaron" height="2465" tsb="429"/>
- <mtx name="zdotaccent" height="2465" tsb="553"/>
- <mtx name="zero" height="2465" tsb="516"/>
- </vmtx>
-
-</ttFont>
diff --git a/vendor/github.com/golang/freetype/testdata/luxisr-12pt-sans-hinting.txt b/vendor/github.com/golang/freetype/testdata/luxisr-12pt-sans-hinting.txt
deleted file mode 100644
index e2761641d..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxisr-12pt-sans-hinting.txt
+++ /dev/null
@@ -1,392 +0,0 @@
-freetype version 2.5.1
-213 21 0 192 555;21 0 1, 21 555 1, 192 555 1, 192 0 1, 171 21 1, 171 534 1, 43 534 1, 43 21 1
-0 0 0 0 0;
-213 0 0 0 0;
-213 0 0 0 0;
-213 70 0 144 555;70 0 1, 70 74 1, 144 74 1, 144 0 1, 79 148 1, 70 444 1, 70 555 1, 144 555 1, 144 444 1, 135 148 1
-273 35 407 238 592;44 407 1, 35 592 1, 108 592 1, 99 407 1, 173 407 1, 164 592 1, 238 592 1, 229 407 1
-427 9 0 418 555;47 0 1, 89 167 1, 9 167 1, 18 213 1, 100 213 1, 133 342 1, 44 342 1, 54 389 1, 144 389 1, 186 555 1, 234 555 1, 192 389 1, 291 389 1, 332 555 1, 380 555 1, 339 389 1, 418 389 1, 409 342 1, 327 342 1, 294 213 1, 383 213 1, 374 167 1, 283 167 1, 242 0 1, 194 0 1, 235 167 1, 137 167 1, 95 0 1, 148 213 1, 247 213 1, 279 342 1, 180 342 1
-427 39 -46 353 602;187 -46 1, 187 0 1, 121 0 0, 39 31 1, 39 95 1, 123 56 0, 187 56 1, 187 255 1, 117 298 0, 88 330 1, 55 368 0, 55 422 1, 55 486 0, 103 524 1, 135 550 0, 187 555 1, 187 602 1, 224 602 1, 224 555 1, 278 555 0, 344 530 1, 344 470 1, 273 501 0, 224 504 1, 224 307 1, 228 304 1, 238 298 0, 247 293 1, 251 290 1, 299 262 0, 322 237 1, 353 205 0, 353 155 1, 353 87 0, 308 42 1, 276 12 0, 224 0 1, 224 -46 1, 224 60 1, 288 85 0, 288 144 1, 288 175 0, 270 195 1, 257 210 0, 224 233 1, 187 331 1, 187 502 1, 120 479 0, 120 425 1, 120 376 0
-683 42 -14 641 569;94 -14 1, 531 569 1, 589 569 1, 152 -14 1, 161 555 1, 216 555 0, 248 518 1, 280 480 0, 280 416 1, 280 352 0, 248 315 1, 216 278 0, 161 278 1, 106 278 0, 74 315 1, 42 353 0, 42 418 1, 42 475 0, 68 511 1, 101 555 0, 161 518 1, 134 518 0, 117 491 1, 100 462 0, 100 419 1, 100 375 0, 114 348 1, 131 315 0, 161 315 1, 189 315 0, 206 343 1, 222 371 0, 222 416 1, 222 462 0, 206 490 1, 188 518 0, 522 278 1, 577 278 0, 609 240 1, 641 203 0, 641 139 1, 641 75 0, 609 38 1, 577 0 0, 522 0 1, 467 0 0, 435 38 1, 403 75 0, 403 141 1, 403 198 0, 429 233 1, 462 278 0, 522 241 1, 494 241 0, 477 213 1, 461 185 0, 461 141 1, 461 98 0, 474 71 1, 491 37 0, 522 37 1, 549 37 0, 566 65 1, 583 93 0, 583 139 1, 583 185 0, 566 213 1, 549 241 0
-512 21 -14 485 569;384 0 1, 357 33 1, 282 -14 0, 214 -14 1, 132 -14 0, 77 37 1, 21 88 0, 21 166 1, 21 243 0, 69 290 1, 98 318 0, 152 339 1, 119 400 0, 119 445 1, 119 501 0, 153 535 1, 188 569 0, 247 569 1, 303 569 0, 336 539 1, 368 508 0, 368 457 1, 368 401 0, 325 360 1, 298 335 0, 248 312 1, 311 198 0, 373 123 1, 410 171 0, 410 265 1, 410 295 1, 483 295 1, 483 165 0, 408 83 1, 441 41 0, 485 0 1, 325 76 1, 251 160 0, 178 296 1, 141 279 0, 123 257 1, 95 225 0, 95 179 1, 95 122 0, 134 82 1, 172 42 0, 226 42 1, 268 42 0, 220 359 1, 256 374 0, 273 392 1, 299 419 0, 299 456 1, 299 513 0, 246 513 1, 191 513 0, 191 453 1, 191 416 0, 217 365 1
-147 27 389 120 592;45 389 1, 27 592 1, 120 592 1, 101 389 1
-256 49 -111 225 592;225 -60 1, 225 -111 1, 150 -58 0, 107 21 1, 49 123 0, 49 241 1, 49 364 0, 111 470 1, 154 542 0, 225 592 1, 225 541 1, 174 485 0, 152 426 1, 123 353 0, 123 241 1, 123 124 0, 154 48 1, 177 -7 0
-256 31 -111 207 592;31 541 1, 31 592 1, 106 539 0, 150 461 1, 207 359 0, 207 241 1, 207 117 0, 144 12 1, 102 -60 0, 31 -111 1, 31 -60 1, 81 -3 0, 104 56 1, 132 129 0, 132 241 1, 132 357 0, 101 433 1, 79 487 0
-299 15 282 284 555;267 483 1, 284 431 1, 180 406 1, 180 407 1, 180 411 0, 180 411 1, 180 411 1, 180 427 0, 170 437 1, 255 314 1, 210 282 1, 152 382 1, 170 384 0, 178 401 1, 88 282 1, 43 314 1, 120 401 1, 128 384 0, 147 382 1, 15 431 1, 32 483 1, 129 437 1, 118 427 0, 118 411 1, 118 411 1, 118 411 0, 118 409 1, 119 408 1, 119 407 0, 119 406 1, 122 555 1, 177 555 1, 165 440 1, 157 444 0, 149 444 1, 141 444 0, 133 440 1
-449 39 37 409 407;196 37 1, 196 194 1, 39 194 1, 39 250 1, 196 250 1, 196 407 1, 252 407 1, 252 250 1, 409 250 1, 409 194 1, 252 194 1, 252 37 1
-213 60 -120 153 93;60 -120 1, 60 -93 1, 96 -83 0, 96 -8 1, 96 0 1, 60 0 1, 60 93 1, 153 93 1, 153 12 1, 153 -110 0
-256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
-213 60 0 153 93;60 0 1, 60 93 1, 153 93 1, 153 0 1
-213 -22 -111 236 555;-22 -111 1, 178 555 1, 236 555 1, 36 -111 1
-427 30 -14 397 569;213 569 1, 298 569 0, 347 491 1, 397 413 0, 397 279 1, 397 142 0, 347 64 1, 298 -14 0, 211 -14 1, 137 -14 0, 90 50 1, 30 130 0, 30 278 1, 30 413 0, 80 491 1, 129 569 0, 213 513 1, 163 513 0, 136 452 1, 109 390 0, 109 278 1, 109 167 0, 136 104 1, 163 42 0, 214 42 1, 260 42 0, 285 87 1, 318 148 0, 318 279 1, 318 392 0, 291 452 1, 263 513 0
-427 86 0 383 569;86 0 1, 86 56 1, 197 56 1, 197 494 1, 86 466 1, 86 523 1, 272 569 1, 272 56 1, 383 56 1, 383 0 1
-427 38 0 353 569;38 0 1, 38 65 1, 64 125 0, 125 188 1, 165 230 1, 202 267 1, 274 341 0, 274 415 1, 274 468 0, 246 493 1, 224 514 0, 184 514 1, 132 514 0, 52 469 1, 52 534 1, 128 569 0, 194 569 1, 267 569 0, 310 527 1, 353 485 0, 353 413 1, 353 364 0, 331 326 1, 308 287 0, 247 233 1, 221 209 1, 143 139 0, 128 65 1, 350 65 1, 350 0 1
-427 57 -14 362 569;57 4 1, 57 73 1, 60 72 1, 70 68 0, 74 67 1, 115 52 0, 129 48 1, 154 42 0, 174 42 1, 230 42 0, 258 73 1, 283 100 0, 283 150 1, 283 208 0, 245 239 1, 208 270 0, 138 270 1, 109 270 1, 109 320 1, 134 320 1, 199 321 0, 234 350 1, 270 379 0, 270 430 1, 270 513 0, 180 513 1, 134 513 0, 65 482 1, 65 547 1, 133 569 0, 185 569 1, 275 569 0, 315 526 1, 344 494 0, 344 441 1, 344 381 0, 302 343 1, 277 320 0, 228 301 1, 271 290 0, 293 277 1, 362 237 0, 362 153 1, 362 77 0, 312 32 1, 263 -14 0, 181 -14 1, 137 -14 0
-427 12 0 402 555;258 0 1, 258 157 1, 12 157 1, 12 213 1, 258 555 1, 327 555 1, 327 218 1, 402 218 1, 402 157 1, 327 157 1, 327 0 1, 84 218 1, 263 218 1, 263 464 1
-427 61 -14 362 555;61 -2 1, 61 64 1, 118 42 0, 166 42 1, 221 42 0, 252 74 1, 284 107 0, 284 162 1, 284 288 0, 113 288 1, 92 288 0, 71 285 1, 71 555 1, 351 555 1, 351 491 1, 135 491 1, 135 344 1, 234 343 0, 291 304 1, 362 255 0, 362 159 1, 362 78 0, 308 32 1, 253 -14 0, 158 -14 1, 116 -14 0
-427 32 -14 385 569;112 292 1, 164 356 0, 238 356 1, 306 356 0, 346 310 1, 385 264 0, 385 182 1, 385 92 0, 339 39 1, 292 -14 0, 214 -14 1, 129 -14 0, 80 59 1, 32 132 0, 32 260 1, 32 405 0, 90 487 1, 148 569 0, 251 569 1, 298 569 0, 355 548 1, 355 484 1, 287 514 0, 249 514 1, 166 514 0, 133 431 1, 120 398 0, 115 357 1, 113 335 0, 218 303 1, 172 303 0, 143 271 1, 114 239 0, 114 183 1, 114 122 0, 144 82 1, 174 42 0, 221 42 1, 312 42 0, 312 167 1, 312 303 0
-427 51 0 407 555;83 0 1, 94 65 0, 114 112 1, 134 159 0, 185 242 1, 337 486 1, 51 486 1, 51 555 1, 407 555 1, 407 486 1, 194 171 0, 168 0 1
-427 37 -14 408 569;147 302 1, 111 329 0, 92 353 1, 66 389 0, 66 429 1, 66 491 0, 112 530 1, 158 569 0, 233 569 1, 302 569 0, 344 536 1, 386 503 0, 386 449 1, 386 400 0, 349 357 1, 326 331 0, 283 302 1, 339 273 0, 368 243 1, 408 199 0, 408 143 1, 408 74 0, 356 30 1, 303 -14 0, 219 -14 1, 137 -14 0, 87 28 1, 37 69 0, 37 138 1, 37 198 0, 78 245 1, 102 274 0, 242 326 1, 319 379 0, 319 437 1, 319 472 0, 294 492 1, 268 513 0, 225 513 1, 183 513 0, 158 494 1, 133 474 0, 133 441 1, 133 402 0, 176 368 1, 197 351 0, 188 272 1, 146 240 0, 130 216 1, 111 189 0, 111 149 1, 111 101 0, 142 71 1, 173 42 0, 223 42 1, 271 42 0, 302 67 1, 332 92 0, 332 132 1, 332 168 0, 309 192 1, 289 212 0, 240 241 1
-427 32 -14 385 569;305 263 1, 253 199 0, 179 199 1, 110 199 0, 71 245 1, 32 292 0, 32 373 1, 32 463 0, 78 516 1, 124 569 0, 202 569 1, 288 569 0, 336 496 1, 385 423 0, 385 296 1, 385 150 0, 327 68 1, 269 -14 0, 166 -14 1, 118 -14 0, 61 7 1, 61 71 1, 130 42 0, 168 42 1, 251 42 0, 284 125 1, 297 158 0, 302 198 1, 304 220 0, 196 513 1, 104 513 0, 104 389 1, 104 252 0, 198 252 1, 245 252 0, 273 284 1, 302 317 0, 302 372 1, 302 433 0, 273 473 1, 243 513 0
-213 70 0 144 407;70 0 1, 70 74 1, 144 74 1, 144 0 1, 70 333 1, 70 407 1, 144 407 1, 144 333 1
-213 70 -120 144 407;70 -120 1, 70 -93 1, 96 -79 0, 96 -9 1, 96 0 1, 70 0 1, 70 74 1, 144 74 1, 144 12 1, 143 -102 0, 70 333 1, 70 407 1, 144 407 1, 144 333 1
-449 39 37 409 407;409 37 1, 39 222 1, 409 407 1, 409 345 1, 164 222 1, 164 222 1, 409 99 1
-449 39 125 409 319;39 125 1, 39 180 1, 409 180 1, 409 125 1, 39 264 1, 39 319 1, 409 319 1, 409 264 1
-449 39 37 409 407;39 407 1, 409 222 1, 39 37 1, 39 99 1, 284 222 1, 284 222 1, 39 345 1
-427 52 0 380 569;141 0 1, 141 74 1, 215 74 1, 215 0 1, 141 148 1, 141 168 1, 141 260 0, 202 308 1, 236 334 1, 302 385 0, 302 440 1, 302 513 0, 199 513 1, 136 513 0, 52 486 1, 52 548 1, 135 569 0, 204 569 1, 281 569 0, 324 544 1, 380 512 0, 380 441 1, 380 371 0, 309 327 1, 278 308 1, 241 285 0, 228 260 1, 215 236 0, 215 189 1, 215 148 1
-780 95 -14 692 569;470 17 1, 400 -14 0, 336 -14 1, 232 -14 0, 164 51 1, 95 116 0, 95 218 1, 95 356 0, 201 462 1, 306 569 0, 445 569 1, 551 569 0, 621 501 1, 692 434 0, 692 333 1, 692 241 0, 635 176 1, 578 111 0, 498 111 1, 435 111 0, 435 154 1, 435 169 0, 443 194 1, 458 241 1, 453 241 1, 422 182 0, 393 153 1, 352 111 0, 307 111 1, 236 111 0, 236 196 1, 236 290 0, 297 366 1, 357 442 0, 434 442 1, 443 442 0, 458 441 1, 462 441 0, 467 440 1, 482 440 0, 492 440 1, 543 440 1, 496 201 1, 494 190 0, 494 178 1, 494 153 0, 522 153 1, 572 153 0, 611 206 1, 650 260 0, 650 328 1, 650 414 0, 590 471 1, 531 528 0, 440 528 1, 321 528 0, 229 434 1, 137 341 0, 137 222 1, 137 135 0, 195 82 1, 252 28 0, 342 28 1, 400 28 0, 456 55 1, 462 312 1, 477 386 1, 442 398 0, 417 398 1, 364 398 0, 329 344 1, 294 291 0, 294 213 1, 294 157 0, 324 157 1, 374 157 0
-512 7 0 503 555;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1
-512 62 0 462 555;62 0 1, 62 555 1, 240 555 1, 349 555 0, 394 527 1, 440 498 0, 440 431 1, 440 369 0, 395 330 1, 368 307 0, 317 289 1, 382 270 0, 415 242 1, 462 202 0, 462 138 1, 462 80 0, 423 41 1, 396 13 0, 353 6 1, 318 0 0, 259 0 1, 141 59 1, 199 59 1, 309 59 0, 344 75 1, 378 92 0, 378 144 1, 378 201 0, 334 231 1, 289 261 0, 205 261 1, 141 261 1, 141 311 1, 208 311 1, 359 311 0, 359 417 1, 359 471 0, 315 485 1, 282 496 0, 213 496 1, 141 496 1
-555 44 -14 507 569;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1
-555 62 0 520 555;62 0 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1
-512 72 0 491 555;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1
-469 72 0 449 555;72 0 1, 72 555 1, 449 555 1, 449 496 1, 150 496 1, 150 310 1, 411 310 1, 411 252 1, 150 252 1, 150 0 1
-597 35 -14 527 569;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1
-555 62 0 492 555;62 0 1, 62 555 1, 141 555 1, 141 321 1, 414 321 1, 414 555 1, 492 555 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1
-213 68 0 146 555;68 0 1, 68 555 1, 146 555 1, 146 0 1
-384 18 -111 315 555;18 -87 1, 18 -19 1, 83 -48 0, 138 -48 1, 203 -48 0, 221 -18 1, 236 7 0, 236 68 1, 236 555 1, 315 555 1, 315 70 1, 315 -111 0, 135 -111 1, 74 -111 0
-512 72 0 494 555;72 0 1, 72 555 1, 146 555 1, 146 282 1, 376 555 1, 455 555 1, 232 290 1, 494 0 1, 394 0 1, 146 281 1, 146 0 1
-427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1
-640 62 0 578 555;62 0 1, 62 555 1, 171 555 1, 324 126 1, 480 555 1, 578 555 1, 578 0 1, 504 0 1, 504 451 1, 353 37 1, 277 37 1, 130 453 1, 130 0 1
-555 62 0 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1
-597 35 -14 563 569;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0
-512 63 0 494 555;63 0 1, 63 555 1, 280 555 1, 366 555 0, 403 545 1, 441 535 0, 465 507 1, 494 471 0, 494 408 1, 494 221 0, 257 221 1, 141 221 1, 141 0 1, 141 280 1, 254 280 1, 411 280 0, 411 404 1, 411 464 0, 370 481 1, 335 496 0, 255 496 1, 141 496 1
-597 35 -111 615 569;615 -48 1, 565 -111 1, 434 -68 0, 346 -10 1, 307 -14 0, 287 -14 1, 177 -14 0, 106 68 1, 35 149 0, 35 278 1, 35 410 0, 107 489 1, 178 569 0, 298 569 1, 419 569 0, 491 489 1, 563 410 0, 563 277 1, 563 160 0, 509 87 1, 488 58 0, 460 38 1, 446 27 0, 418 11 1, 510 -30 0, 297 510 1, 214 510 0, 167 448 1, 119 387 0, 119 278 1, 119 169 0, 167 107 1, 214 45 0, 297 45 1, 382 45 0, 430 106 1, 479 167 0, 479 275 1, 479 376 0, 440 436 1, 392 510 0
-555 62 0 538 555;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1
-512 45 -14 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0
-469 8 0 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1
-555 62 -14 492 555;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1
-512 14 0 508 555;228 0 1, 14 555 1, 95 555 1, 272 99 1, 441 555 1, 508 555 1, 302 0 1
-725 9 0 716 555;152 0 1, 9 555 1, 85 555 1, 199 117 1, 329 555 1, 405 555 1, 530 121 1, 651 555 1, 716 555 1, 560 0 1, 482 0 1, 358 428 1, 230 0 1
-512 11 0 502 555;11 0 1, 215 276 1, 20 555 1, 113 555 1, 263 339 1, 423 555 1, 498 555 1, 299 289 1, 502 0 1, 409 0 1, 251 224 1, 85 0 1
-512 11 0 501 555;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1
-469 38 0 431 555;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1
-213 56 -111 204 592;56 -111 1, 56 592 1, 204 592 1, 204 537 1, 121 537 1, 121 -56 1, 204 -56 1, 204 -111 1
-213 -22 -111 236 555;236 -111 1, 178 -111 1, -22 555 1, 36 555 1
-213 10 -111 158 592;158 592 1, 158 -111 1, 10 -111 1, 10 -56 1, 93 -56 1, 93 537 1, 10 537 1, 10 592 1
-360 14 222 347 555;180 431 1, 75 222 1, 14 222 1, 180 555 1, 347 222 1, 284 222 1
-427 0 -56 427 0;0 -56 1, 0 0 1, 427 0 1, 427 -56 1
-256 40 481 216 602;216 481 1, 160 481 1, 40 602 1, 125 602 1
-427 36 -9 412 416;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0
-427 58 -9 395 592;132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 58 -5 1, 58 592 1, 132 592 1
-384 32 -9 347 416;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1
-427 32 -9 369 592;295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 592 1, 369 592 1, 369 0 1, 295 0 1
-427 32 -9 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0
-213 12 0 236 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 213 407 1, 213 352 1, 140 352 1, 140 0 1
-427 35 -158 372 416;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1
-427 58 0 374 592;58 0 1, 58 592 1, 132 592 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
-171 48 0 122 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1
-171 -58 -157 124 555;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0, 50 481 1, 50 555 1, 124 555 1, 124 481 1
-384 58 0 377 592;58 0 1, 58 592 1, 132 592 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1
-171 48 0 122 592;48 0 1, 48 592 1, 122 592 1, 122 0 1
-640 58 0 587 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 164 380 0, 185 397 1, 210 416 0, 249 416 1, 298 416 0, 329 385 1, 346 366 0, 359 331 1, 392 380 0, 413 397 1, 437 416 0, 477 416 1, 587 416 0, 587 296 1, 587 0 1, 513 0 1, 512 285 1, 512 355 0, 458 355 1, 410 355 0, 359 273 1, 359 0 1, 285 0 1, 285 285 1, 285 355 0, 231 355 1, 183 355 0, 132 273 1, 132 0 1
-427 58 0 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
-427 32 -9 395 416;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0
-427 58 -148 395 416;132 -148 1, 58 -148 1, 58 407 1, 132 407 1, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0
-427 32 -148 369 416;295 407 1, 369 407 1, 369 -148 1, 295 -148 1, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0
-256 58 0 251 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1
-384 44 -9 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0
-213 11 -9 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1
-427 53 -9 369 407;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1
-384 7 0 380 407;152 0 1, 7 407 1, 82 407 1, 195 90 1, 314 407 1, 380 407 1, 225 0 1
-555 4 0 549 407;102 0 1, 4 407 1, 77 407 1, 150 101 1, 244 407 1, 318 407 1, 400 99 1, 486 407 1, 549 407 1, 435 0 1, 361 0 1, 275 315 1, 177 0 1
-384 11 0 372 407;11 0 1, 143 215 1, 15 407 1, 101 407 1, 203 255 1, 294 407 1, 362 407 1, 238 202 1, 372 0 1, 287 0 1, 177 164 1, 79 0 1
-384 7 -148 380 407;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1
-384 28 0 356 407;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1
-257 9 -111 213 592;9 269 1, 32 269 1, 90 269 0, 90 330 1, 90 354 0, 84 381 1, 77 414 1, 69 447 0, 69 476 1, 69 537 0, 120 569 1, 156 591 0, 213 592 1, 213 537 1, 193 537 1, 167 537 0, 151 524 1, 134 510 0, 134 490 1, 134 482 0, 139 455 1, 145 416 1, 149 391 0, 149 361 1, 149 290 0, 94 241 1, 149 192 0, 149 120 1, 149 90 0, 145 65 1, 139 27 1, 134 -1 0, 134 -9 1, 134 -29 0, 151 -42 1, 168 -56 0, 193 -56 1, 213 -56 1, 213 -111 1, 153 -110 0, 117 -85 1, 69 -53 0, 69 6 1, 69 35 0, 77 67 1, 84 100 1, 90 127 0, 90 152 1, 90 213 0, 32 213 1, 9 213 1
-200 72 -111 128 592;72 -111 1, 72 592 1, 128 592 1, 128 -111 1
-257 44 -111 247 592;247 213 1, 224 213 1, 167 213 0, 167 152 1, 167 124 0, 173 100 1, 180 67 1, 187 36 0, 187 6 1, 187 -56 0, 135 -88 1, 100 -110 0, 44 -111 1, 44 -56 1, 63 -56 1, 89 -56 0, 105 -42 1, 122 -29 0, 122 -9 1, 122 1 0, 118 27 1, 111 65 1, 107 88 0, 107 120 1, 107 192 0, 162 241 1, 137 263 0, 125 285 1, 107 318 0, 107 361 1, 107 393 0, 111 416 1, 118 455 1, 122 480 0, 122 491 1, 122 510 0, 105 524 1, 88 537 0, 63 537 1, 44 537 1, 44 592 1, 104 591 0, 140 566 1, 187 534 0, 187 475 1, 187 445 0, 180 414 1, 173 381 1, 167 357 0, 167 329 1, 167 269 0, 224 269 1, 247 269 1
-449 39 155 409 290;95 167 1, 39 167 1, 40 206 0, 47 227 1, 69 290 0, 139 290 1, 176 290 0, 213 264 1, 255 235 1, 280 218 1, 291 210 0, 309 210 1, 352 210 0, 354 278 1, 409 278 1, 408 238 0, 401 217 1, 379 155 0, 310 155 1, 273 155 0, 235 180 1, 193 209 1, 168 227 1, 157 234 0, 140 234 1, 96 234 0
-512 7 0 503 666;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 150 602 1, 150 666 1, 215 666 1, 215 602 1, 299 602 1, 299 666 1, 363 666 1, 363 602 1
-512 7 0 503 726;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 257 726 1, 292 726 0, 317 701 1, 342 676 0, 342 641 1, 342 605 0, 317 580 1, 292 555 0, 256 555 1, 225 555 0, 202 576 1, 172 602 0, 172 641 1, 172 676 0, 197 701 1, 222 726 0, 257 693 1, 235 693 0, 219 678 1, 204 663 0, 204 641 1, 204 619 0, 219 603 1, 235 588 0, 256 588 1, 276 588 0, 291 600 1, 310 616 0, 310 641 1, 310 663 0, 294 678 1, 279 693 0
-555 44 -162 507 569;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 288 0 1, 324 0 1, 302 -41 1, 329 -42 0, 348 -56 1, 374 -74 0, 374 -101 1, 374 -126 0, 352 -144 1, 330 -162 0, 298 -162 1, 273 -162 0, 244 -154 1, 244 -124 1, 263 -129 0, 283 -129 1, 322 -129 0, 322 -102 1, 322 -67 0, 252 -66 1
-512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 224 602 1, 315 722 1, 400 722 1, 280 602 1
-555 62 0 492 689;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 162 602 1, 165 637 0, 174 656 1, 191 689 0, 232 689 1, 259 689 0, 282 675 1, 305 661 1, 326 648 0, 337 648 1, 362 648 0, 366 689 1, 412 689 1, 409 654 0, 400 635 1, 383 602 0, 342 602 1, 315 602 0, 292 616 1, 269 630 1, 249 643 0, 237 643 1, 212 643 0, 208 602 1
-597 35 -14 563 666;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 192 602 1, 192 666 1, 257 666 1, 257 602 1, 340 602 1, 340 666 1, 405 666 1, 405 602 1
-555 62 -14 492 666;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 176 602 1, 176 666 1, 240 666 1, 240 602 1, 324 602 1, 324 666 1, 389 666 1, 389 602 1
-427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
-427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
-427 36 -9 412 546;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
-427 36 -9 412 569;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
-427 36 -9 412 651;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 192 651 1, 227 651 0, 252 627 1, 277 602 0, 277 567 1, 277 531 0, 252 506 1, 227 481 0, 191 481 1, 160 481 0, 137 501 1, 107 527 0, 107 566 1, 107 602 0, 132 626 1, 156 651 0, 192 619 1, 170 619 0, 154 603 1, 139 588 0, 139 566 1, 139 545 0, 154 529 1, 170 513 0, 191 513 1, 211 513 0, 226 526 1, 245 542 0, 245 567 1, 245 588 0, 229 603 1, 214 619 0
-384 32 -162 347 416;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 235 0 1, 271 0 1, 248 -41 1, 275 -42 0, 295 -56 1, 321 -74 0, 321 -101 1, 321 -126 0, 299 -144 1, 277 -162 0, 245 -162 1, 220 -162 0, 191 -154 1, 191 -124 1, 210 -129 0, 230 -129 1, 269 -129 0, 269 -102 1, 269 -67 0, 199 -66 1
-427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
-427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
-427 32 -9 383 546;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
-171 40 0 216 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, 40 481 1, 131 602 1, 216 602 1, 96 481 1
-171 -24 0 152 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, 152 481 1, 96 481 1, -24 602 1, 61 602 1
-171 -67 0 195 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, -67 481 1, 23 602 1, 105 602 1, 195 481 1, 140 481 1, 64 557 1, 64 557 1, -12 481 1
-171 -21 0 192 546;48 0 1, 48 407 1, 122 407 1, 122 0 1, -21 481 1, -21 546 1, 44 546 1, 44 481 1, 127 481 1, 127 546 1, 192 546 1, 192 481 1
-427 58 0 374 569;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
-427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
-427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
-427 32 -9 395 546;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
-427 32 -9 395 569;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
-427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 280 481 1, 224 481 1, 104 602 1, 189 602 1
-427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
-427 53 -9 369 546;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
-427 56 -111 371 555;177 -111 1, 186 315 1, 56 305 1, 56 361 1, 186 352 1, 177 555 1, 251 555 1, 241 352 1, 371 361 1, 371 305 1, 241 315 1, 251 -111 1
-307 43 347 265 569;154 569 1, 199 569 0, 232 536 1, 265 504 0, 265 458 1, 265 412 0, 232 380 1, 199 347 0, 152 347 1, 113 347 0, 82 373 1, 43 408 0, 43 458 1, 43 504 0, 75 536 1, 108 569 0, 154 523 1, 127 523 0, 108 504 1, 89 485 0, 89 458 1, 89 432 0, 108 413 1, 127 393 0, 153 393 1, 177 393 0, 195 409 1, 219 428 0, 219 458 1, 219 485 0, 200 504 1, 180 523 0
-427 65 0 380 555;237 0 1, 237 65 1, 166 74 0, 123 120 1, 65 181 0, 65 278 1, 65 379 0, 124 435 1, 165 475 0, 237 486 1, 237 555 1, 274 555 1, 274 486 1, 324 483 0, 380 468 1, 380 406 1, 314 429 0, 274 432 1, 274 117 1, 325 117 0, 380 143 1, 380 87 1, 324 65 0, 274 65 1, 274 0 1, 237 429 1, 215 426 0, 203 420 1, 146 390 0, 146 277 1, 146 199 0, 180 158 1, 200 135 0, 237 122 1
-427 45 0 362 569;45 0 1, 45 65 1, 124 90 0, 124 183 1, 124 269 1, 57 269 1, 57 324 1, 124 324 1, 124 405 1, 124 485 0, 162 527 1, 200 569 0, 272 569 1, 310 569 0, 357 558 1, 357 495 1, 308 513 0, 269 513 1, 198 513 0, 198 427 1, 198 324 1, 279 324 1, 279 269 1, 198 269 1, 198 221 1, 198 153 0, 180 120 1, 166 92 0, 133 65 1, 362 65 1, 362 0 1
-427 48 -125 379 569;48 -98 1, 48 -30 1, 142 -69 0, 203 -69 1, 250 -69 0, 281 -51 1, 311 -32 0, 311 -1 1, 311 27 0, 288 43 1, 270 56 0, 225 75 1, 159 104 1, 50 150 0, 50 230 1, 50 284 0, 105 342 1, 52 379 0, 52 434 1, 52 494 0, 101 531 1, 149 569 0, 229 569 1, 284 569 0, 358 551 1, 358 491 1, 280 513 0, 228 513 1, 179 513 0, 149 494 1, 119 475 0, 119 445 1, 119 404 0, 185 377 1, 236 357 1, 314 325 0, 343 296 1, 373 266 0, 373 221 1, 373 168 0, 317 104 1, 379 66 0, 379 3 1, 379 -56 0, 329 -90 1, 279 -125 0, 196 -125 1, 138 -125 0, 281 128 1, 308 166 0, 308 200 1, 308 228 0, 290 245 1, 272 263 0, 226 282 1, 143 317 1, 115 282 0, 115 249 1, 115 198 0, 201 162 1
-269 30 208 239 416;135 416 1, 178 416 0, 208 386 1, 239 355 0, 239 312 1, 239 269 0, 208 239 1, 177 208 0, 133 208 1, 96 208 0, 67 233 1, 30 265 0, 30 312 1, 30 356 0, 61 386 1, 92 416 0
-413 33 -111 338 555;190 -111 1, 190 278 1, 122 284 0, 83 316 1, 33 358 0, 33 433 1, 33 499 0, 69 527 1, 105 555 0, 190 555 1, 338 555 1, 338 -111 1, 292 -111 1, 292 509 1, 237 509 1, 237 -111 1
-469 48 -9 437 602;48 0 1, 48 432 1, 48 527 0, 83 564 1, 117 602 0, 206 602 1, 349 602 0, 349 500 1, 349 451 0, 300 399 1, 261 357 0, 261 337 1, 261 312 0, 303 281 1, 372 230 1, 437 182 0, 437 111 1, 437 -9 0, 296 -9 1, 234 -9 0, 183 11 1, 183 76 1, 253 46 0, 296 46 1, 368 46 0, 368 104 1, 368 141 0, 324 174 1, 244 236 1, 195 273 0, 195 315 1, 195 351 0, 238 407 1, 275 455 0, 275 487 1, 275 546 0, 201 546 1, 157 546 0, 140 528 1, 122 509 0, 122 463 1, 122 0 1
-566 6 0 561 555;283 555 1, 398 555 0, 479 474 1, 561 393 0, 561 278 1, 561 162 0, 479 81 1, 398 0 0, 280 0 1, 179 0 0, 104 66 1, 6 152 0, 6 278 1, 6 393 0, 87 474 1, 169 555 0, 283 516 1, 185 516 0, 115 446 1, 45 376 0, 45 278 1, 45 181 0, 115 110 1, 184 40 0, 281 40 1, 370 40 0, 437 96 1, 521 168 0, 521 278 1, 521 376 0, 451 446 1, 381 516 0, 192 126 1, 192 426 1, 286 426 1, 377 426 0, 377 353 1, 377 301 0, 324 266 1, 415 126 1, 359 126 1, 278 252 1, 240 252 1, 240 126 1, 237 289 1, 251 289 1, 330 289 0, 330 347 1, 330 396 0, 264 396 1, 237 396 1
-566 6 0 561 555;283 555 1, 398 555 0, 479 474 1, 561 393 0, 561 278 1, 561 162 0, 479 81 1, 398 0 0, 280 0 1, 179 0 0, 104 66 1, 6 152 0, 6 278 1, 6 393 0, 87 474 1, 169 555 0, 283 516 1, 185 516 0, 115 446 1, 45 376 0, 45 278 1, 45 181 0, 115 110 1, 184 40 0, 281 40 1, 370 40 0, 437 96 1, 521 168 0, 521 278 1, 521 376 0, 451 446 1, 381 516 0, 384 137 1, 333 119 0, 293 119 1, 226 119 0, 183 163 1, 140 207 0, 140 276 1, 140 348 0, 182 391 1, 224 434 0, 295 434 1, 332 434 0, 375 425 1, 384 423 1, 384 379 1, 336 399 0, 298 399 1, 251 399 0, 222 365 1, 193 332 0, 193 277 1, 193 222 0, 223 191 1, 253 159 0, 303 159 1, 343 159 0, 384 181 1
-768 83 278 662 555;176 278 1, 176 509 1, 83 509 1, 83 555 1, 333 555 1, 333 509 1, 240 509 1, 240 278 1, 380 278 1, 380 555 1, 467 555 1, 525 395 1, 582 555 1, 662 555 1, 662 278 1, 597 278 1, 597 479 1, 536 301 1, 491 301 1, 430 463 1, 430 278 1
-256 40 481 216 602;40 481 1, 131 602 1, 216 602 1, 96 481 1
-256 21 481 234 546;21 481 1, 21 546 1, 86 546 1, 86 481 1, 170 481 1, 170 546 1, 234 546 1, 234 481 1
-213 0 0 0 0;
-768 7 0 746 555;224 213 1, 381 213 1, 381 460 1, 7 0 1, 360 555 1, 730 555 1, 730 496 1, 459 496 1, 459 318 1, 693 318 1, 693 260 1, 459 260 1, 459 59 1, 746 59 1, 746 0 1, 381 0 1, 381 155 1, 187 155 1, 89 0 1
-597 35 -14 563 569;39 -14 1, 104 69 1, 74 107 0, 58 146 1, 35 204 0, 35 278 1, 35 410 0, 107 490 1, 179 569 0, 298 569 1, 389 569 0, 459 519 1, 498 569 1, 563 569 1, 496 484 1, 525 446 0, 541 407 1, 563 350 0, 563 277 1, 563 144 0, 491 65 1, 419 -14 0, 299 -14 1, 211 -14 0, 142 34 1, 104 -14 1, 184 88 1, 233 45 0, 299 45 1, 384 45 0, 431 106 1, 479 167 0, 479 276 1, 479 363 0, 448 423 1, 416 465 1, 366 510 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 279 1, 119 190 0, 152 129 1
-213 0 0 0 0;
-449 39 0 409 444;196 111 1, 196 250 1, 39 250 1, 39 305 1, 196 305 1, 196 444 1, 252 444 1, 252 305 1, 409 305 1, 409 250 1, 252 250 1, 252 111 1, 39 0 1, 39 56 1, 409 56 1, 409 0 1
-213 0 0 0 0;
-213 0 0 0 0;
-427 9 0 404 555;170 0 1, 170 129 1, 59 129 1, 59 176 1, 170 176 1, 170 231 1, 59 231 1, 59 278 1, 170 278 1, 9 555 1, 95 555 1, 216 346 1, 216 346 1, 338 555 1, 404 555 1, 244 278 1, 355 278 1, 355 231 1, 244 231 1, 244 176 1, 355 176 1, 355 129 1, 244 129 1, 244 0 1
-427 53 -148 369 407;53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 295 0 1, 295 76 1, 236 -7 0, 176 -7 1, 152 -7 0, 127 9 1, 127 -148 1, 53 -148 1
-213 0 0 0 0;
-213 0 0 0 0;
-213 0 0 0 0;
-213 0 0 0 0;
-213 0 0 0 0;
-284 32 308 267 569;182 343 1, 144 308 0, 105 308 1, 74 308 0, 53 328 1, 32 348 0, 32 378 1, 32 464 0, 161 464 1, 179 464 1, 179 490 1, 179 531 0, 133 531 1, 97 531 0, 54 509 1, 54 551 1, 102 569 0, 144 569 1, 234 569 0, 234 492 1, 234 380 1, 234 345 0, 255 346 1, 257 346 1, 258 346 0, 261 346 1, 263 346 0, 265 347 1, 267 315 1, 248 308 0, 231 308 1, 194 308 0, 184 343 1, 179 374 1, 179 431 1, 164 431 1, 88 431 0, 88 385 1, 88 350 0, 124 350 1, 150 350 0
-281 28 308 252 569;140 569 1, 192 569 0, 222 534 1, 252 499 0, 252 439 1, 252 378 0, 222 343 1, 192 308 0, 139 308 1, 93 308 0, 64 337 1, 28 373 0, 28 439 1, 28 499 0, 58 534 1, 89 569 0, 140 531 1, 87 531 0, 87 439 1, 87 347 0, 140 347 1, 194 347 0, 194 440 1, 194 531 0
-213 0 0 0 0;
-683 36 -9 638 416;288 92 1, 288 197 1, 260 198 1, 235 199 0, 207 195 1, 110 181 0, 110 114 1, 110 51 0, 184 51 1, 236 51 0, 344 369 1, 400 416 0, 472 416 1, 638 416 0, 638 215 1, 638 192 1, 360 192 1, 365 148 0, 375 125 1, 408 47 0, 512 47 1, 568 47 0, 636 72 1, 636 13 1, 559 -9 0, 494 -9 1, 423 -9 0, 374 23 1, 347 41 0, 322 77 1, 279 31 0, 248 12 1, 211 -9 0, 160 -9 1, 104 -9 0, 70 21 1, 36 53 0, 36 102 1, 36 241 0, 270 241 1, 288 241 1, 288 290 1, 288 329 0, 269 345 1, 251 361 0, 205 361 1, 141 361 0, 71 325 1, 71 386 1, 148 416 0, 218 416 1, 303 416 0, 364 248 1, 564 248 1, 563 284 0, 556 302 1, 536 361 0, 469 361 1, 422 361 0, 396 333 1, 371 308 0
-469 54 -9 416 416;131 22 1, 108 -9 1, 54 -9 1, 99 53 1, 54 116 0, 54 204 1, 54 303 0, 102 360 1, 151 416 0, 236 416 1, 296 416 0, 339 385 1, 362 416 1, 416 416 1, 371 354 1, 416 291 0, 416 203 1, 416 105 0, 367 48 1, 319 -9 0, 234 -9 1, 174 -9 0, 169 75 1, 170 75 1, 185 59 0, 198 53 1, 215 46 0, 234 46 1, 336 46 0, 336 204 1, 336 251 0, 325 291 1, 301 332 1, 300 333 1, 272 361 0, 235 361 1, 134 361 0, 134 205 1, 134 152 0, 145 116 1
-469 69 -162 398 407;309 407 1, 309 333 1, 235 333 1, 235 407 1, 309 259 1, 309 239 1, 309 147 0, 248 99 1, 214 73 1, 148 22 0, 148 -33 1, 148 -107 0, 251 -107 1, 314 -107 0, 398 -78 1, 398 -141 1, 316 -162 0, 246 -162 1, 169 -162 0, 125 -137 1, 69 -105 0, 69 -34 1, 69 36 0, 141 81 1, 171 99 1, 209 122 0, 222 147 1, 235 171 0, 235 218 1, 235 259 1
-256 91 -148 165 407;165 407 1, 165 333 1, 91 333 1, 91 407 1, 156 259 1, 165 -37 1, 165 -148 1, 91 -148 1, 91 -37 1, 100 259 1
-449 32 111 402 333;32 278 1, 32 333 1, 402 333 1, 402 111 1, 347 111 1, 347 278 1
-213 0 0 0 0;
-427 18 -111 384 569;18 -111 1, 94 269 1, 32 269 1, 32 324 1, 105 324 1, 113 363 1, 154 569 0, 300 569 1, 339 569 0, 384 558 1, 373 500 1, 332 514 0, 299 514 1, 218 514 0, 195 398 1, 180 324 1, 251 324 1, 251 269 1, 169 269 1, 94 -111 1
-213 0 0 0 0;
-213 0 0 0 0;
-427 43 37 376 370;376 342 1, 265 204 1, 376 65 1, 339 37 1, 191 204 1, 339 370 1, 228 342 1, 117 204 1, 228 65 1, 191 37 1, 43 204 1, 191 370 1
-427 51 37 384 370;51 65 1, 162 204 1, 51 342 1, 88 370 1, 236 204 1, 88 37 1, 199 65 1, 310 204 1, 199 342 1, 236 370 1, 384 204 1, 236 37 1
-768 93 0 676 74;93 0 1, 93 74 1, 167 74 1, 167 0 1, 347 0 1, 347 74 1, 421 74 1, 421 0 1, 602 0 1, 602 74 1, 676 74 1, 676 0 1
-427 0 0 0 0;
-512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 312 602 1, 257 602 1, 137 722 1, 222 722 1
-512 7 0 503 689;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 132 602 1, 135 636 0, 144 656 1, 161 689 0, 202 689 1, 229 689 0, 252 675 1, 275 661 1, 296 648 0, 307 648 1, 332 648 0, 336 689 1, 382 689 1, 379 654 0, 370 635 1, 353 602 0, 312 602 1, 285 602 0, 262 616 1, 239 630 1, 219 643 0, 207 643 1, 182 643 0, 178 602 1
-597 35 -14 563 689;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 174 602 1, 176 636 0, 186 656 1, 203 689 0, 244 689 1, 271 689 0, 294 675 1, 316 661 1, 338 648 0, 349 648 1, 373 648 0, 377 689 1, 423 689 1, 421 654 0, 411 635 1, 395 602 0, 354 602 1, 327 602 0, 303 616 1, 281 630 1, 260 643 0, 248 643 1, 224 643 0, 220 602 1
-768 35 -14 747 569;423 0 1, 423 22 1, 362 -14 0, 291 -14 1, 176 -14 0, 105 66 1, 35 147 0, 35 278 1, 35 411 0, 106 490 1, 177 569 0, 294 569 1, 363 569 0, 423 534 1, 423 555 1, 730 555 1, 730 496 1, 502 496 1, 502 318 1, 693 318 1, 693 260 1, 502 260 1, 502 59 1, 747 59 1, 747 0 1, 423 213 1, 423 342 1, 423 430 0, 393 470 1, 363 510 0, 296 510 1, 212 510 0, 165 449 1, 119 388 0, 119 278 1, 119 167 0, 165 106 1, 213 45 0, 296 45 1, 423 45 0
-725 32 -9 680 416;371 341 1, 395 375 0, 422 392 1, 461 416 0, 516 416 1, 612 416 0, 650 348 1, 678 297 0, 680 192 1, 412 192 1, 419 120 0, 447 87 1, 481 46 0, 560 46 1, 618 46 0, 680 73 1, 680 14 1, 608 -9 0, 542 -9 1, 474 -9 0, 434 12 1, 404 29 0, 373 65 1, 350 32 0, 323 15 1, 283 -9 0, 227 -9 1, 138 -9 0, 85 48 1, 32 106 0, 32 204 1, 32 302 0, 86 359 1, 138 416 0, 228 416 1, 287 416 0, 327 388 1, 350 372 0, 228 361 1, 111 361 0, 111 205 1, 111 137 0, 134 98 1, 163 46 0, 229 46 1, 337 46 0, 337 204 1, 337 276 0, 314 315 1, 288 361 0, 414 243 1, 601 243 1, 600 291 0, 588 317 1, 567 361 0, 514 361 1, 462 361 0, 437 321 1, 420 295 0
-427 38 204 390 250;38 204 1, 38 250 1, 390 250 1, 390 204 1
-768 37 204 731 241;37 204 1, 37 241 1, 731 241 1, 731 204 1
-256 21 398 225 592;225 592 1, 225 564 1, 198 551 0, 198 480 1, 198 472 1, 225 472 1, 225 398 1, 151 398 1, 151 460 1, 151 573 0, 95 592 1, 95 564 1, 69 551 0, 69 480 1, 69 472 1, 95 472 1, 95 398 1, 21 398 1, 21 460 1, 22 573 0
-256 31 398 234 592;31 398 1, 31 426 1, 57 440 0, 57 510 1, 57 518 1, 31 518 1, 31 592 1, 105 592 1, 105 530 1, 104 417 0, 160 398 1, 160 426 1, 187 440 0, 187 510 1, 187 518 1, 160 518 1, 160 592 1, 234 592 1, 234 530 1, 234 417 0
-171 35 380 127 592;127 592 1, 127 564 1, 91 554 0, 91 480 1, 91 472 1, 127 472 1, 127 380 1, 35 380 1, 35 460 1, 35 582 0
-171 44 380 136 592;44 380 1, 44 407 1, 80 417 0, 80 492 1, 80 500 1, 44 500 1, 44 592 1, 136 592 1, 136 512 1, 136 389 0
-449 39 0 409 444;39 194 1, 39 250 1, 409 250 1, 409 194 1, 178 352 1, 178 444 1, 270 444 1, 270 352 1, 178 0 1, 178 93 1, 270 93 1, 270 0 1
-213 0 0 0 0;
-384 7 -148 380 546;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
-512 11 0 501 666;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 158 602 1, 158 666 1, 223 666 1, 223 602 1, 306 602 1, 306 666 1, 371 666 1, 371 602 1
-128 -165 -14 293 569;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
-427 46 110 381 446;137 168 1, 78 110 1, 46 143 1, 104 201 1, 80 240 0, 80 278 1, 80 315 0, 104 354 1, 46 413 1, 78 446 1, 137 387 1, 174 411 0, 213 411 1, 253 411 0, 290 387 1, 348 446 1, 381 413 1, 323 354 1, 347 315 0, 347 278 1, 347 240 0, 323 201 1, 381 143 1, 348 110 1, 290 168 1, 253 144 0, 213 144 1, 174 144 0, 213 365 1, 177 365 0, 152 339 1, 126 314 0, 126 277 1, 126 241 0, 152 216 1, 176 191 0, 212 191 1, 246 191 0, 270 211 1, 300 237 0, 300 278 1, 300 314 0, 275 339 1, 250 365 0
-256 28 37 213 370;213 342 1, 102 204 1, 213 65 1, 176 37 1, 28 204 1, 176 370 1
-256 43 37 228 370;43 65 1, 154 204 1, 43 342 1, 80 370 1, 228 204 1, 80 37 1
-384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 336 407 1, 336 0 1, 262 0 1, 262 352 1, 140 352 1, 140 0 1, 262 481 1, 262 555 1, 336 555 1, 336 481 1
-384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 179 602 1, 262 592 1, 336 592 1, 336 0 1, 262 0 1, 262 537 1, 246 540 1, 214 546 0, 192 546 1, 159 546 0, 148 524 1, 140 505 0, 140 464 1, 140 407 1, 206 407 1, 206 352 1, 140 352 1, 140 0 1
-427 56 -111 371 555;177 -111 1, 186 93 1, 56 83 1, 56 139 1, 186 129 1, 186 315 1, 56 305 1, 56 361 1, 186 352 1, 177 555 1, 251 555 1, 241 352 1, 371 361 1, 371 305 1, 241 315 1, 241 129 1, 371 139 1, 371 83 1, 241 93 1, 251 -111 1
-213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
-171 39 -111 132 93;39 -111 1, 39 -83 1, 75 -73 0, 75 -8 1, 75 0 1, 39 0 1, 39 93 1, 132 93 1, 132 12 1, 131 -101 0
-256 26 -120 230 74;26 -120 1, 26 -93 1, 53 -79 0, 53 -9 1, 53 0 1, 26 0 1, 26 74 1, 100 74 1, 100 12 1, 100 -102 0, 156 -120 1, 156 -93 1, 182 -78 0, 182 -9 1, 182 0 1, 156 0 1, 156 74 1, 230 74 1, 230 12 1, 230 -102 0
-768 9 -14 759 569;128 555 1, 181 555 0, 213 518 1, 245 480 0, 245 417 1, 245 352 0, 213 315 1, 182 278 0, 126 278 1, 78 278 0, 48 308 1, 9 347 0, 9 416 1, 9 480 0, 41 518 1, 74 555 0, 127 518 1, 65 518 0, 65 417 1, 65 315 0, 128 315 1, 190 315 0, 190 416 1, 190 463 0, 173 491 1, 156 518 0, 377 278 1, 431 278 0, 463 240 1, 495 203 0, 495 139 1, 495 74 0, 463 37 1, 431 0 0, 376 0 1, 328 0 0, 297 30 1, 259 69 0, 259 139 1, 259 203 0, 291 240 1, 323 278 0, 377 241 1, 315 241 0, 315 139 1, 315 37 0, 377 37 1, 440 37 0, 440 138 1, 440 186 0, 423 213 1, 405 241 0, 641 278 1, 695 278 0, 727 240 1, 759 203 0, 759 140 1, 759 74 0, 727 37 1, 695 0 0, 640 0 1, 592 0 0, 561 31 1, 523 69 0, 523 139 1, 523 203 0, 555 240 1, 587 278 0, 640 241 1, 578 241 0, 578 139 1, 578 37 0, 641 37 1, 704 37 0, 704 139 1, 704 186 0, 686 213 1, 669 241 0, 23 -14 1, 431 569 1, 482 569 1, 74 -14 1
-512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 126 602 1, 216 722 1, 298 722 1, 388 602 1, 333 602 1, 257 677 1, 257 677 1, 181 602 1
-512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 150 602 1, 240 722 1, 322 722 1, 412 602 1, 357 602 1, 281 677 1, 281 677 1, 205 602 1
-512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 201 602 1, 292 722 1, 377 722 1, 257 602 1
-512 72 0 491 666;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 169 602 1, 169 666 1, 234 666 1, 234 602 1, 317 602 1, 317 666 1, 382 666 1, 382 602 1
-512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 335 602 1, 280 602 1, 159 722 1, 245 722 1
-213 51 0 227 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, 51 602 1, 142 722 1, 227 722 1, 107 602 1
-213 -24 0 238 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, -24 602 1, 66 722 1, 148 722 1, 238 602 1, 183 602 1, 107 677 1, 107 677 1, 31 602 1
-213 0 0 213 666;68 0 1, 68 555 1, 146 555 1, 146 0 1, 0 602 1, 0 666 1, 65 666 1, 65 602 1, 149 602 1, 149 666 1, 213 666 1, 213 602 1
-213 -14 0 162 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, 162 602 1, 107 602 1, -14 722 1, 72 722 1
-597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 243 602 1, 333 722 1, 419 722 1, 299 602 1
-597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 167 602 1, 258 722 1, 339 722 1, 430 602 1, 374 602 1, 299 677 1, 298 677 1, 223 602 1
-427 0 -14 405 568;141 201 1, 156 141 0, 178 108 1, 218 48 0, 290 48 1, 337 48 0, 405 75 1, 405 10 1, 332 -14 0, 281 -14 1, 194 -14 0, 140 38 1, 101 74 0, 82 134 1, 75 156 0, 66 201 1, 0 201 1, 19 248 1, 61 248 1, 60 276 1, 60 277 0, 60 284 1, 61 300 0, 62 321 1, 0 321 1, 19 368 1, 69 368 1, 84 430 0, 102 462 1, 161 568 0, 293 568 1, 341 568 0, 405 552 1, 405 483 1, 342 510 0, 294 510 1, 228 510 0, 188 462 1, 166 434 0, 154 400 1, 149 386 0, 144 368 1, 356 368 1, 337 321 1, 136 321 1, 134 294 0, 134 276 1, 135 248 1, 307 248 1, 288 201 1
-597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 354 602 1, 299 602 1, 178 722 1, 264 722 1
-555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 227 602 1, 317 722 1, 402 722 1, 282 602 1
-555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 151 602 1, 241 722 1, 323 722 1, 413 602 1, 358 602 1, 282 677 1, 282 677 1, 206 602 1
-555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 338 602 1, 282 602 1, 162 722 1, 247 722 1
-171 48 0 122 407;48 0 1, 48 407 1, 122 407 1, 122 0 1
-256 -3 481 259 602;-3 481 1, 87 602 1, 169 602 1, 259 481 1, 204 481 1, 128 557 1, 128 557 1, 52 481 1
-256 3 481 253 569;3 481 1, 6 516 0, 15 535 1, 32 569 0, 73 569 1, 100 569 0, 123 555 1, 146 541 1, 167 528 0, 178 528 1, 203 528 0, 207 569 1, 253 569 1, 250 534 0, 241 515 1, 224 481 0, 183 481 1, 156 481 0, 133 496 1, 110 510 1, 90 522 0, 78 522 1, 53 522 0, 49 481 1
-256 8 481 248 537;8 481 1, 8 537 1, 248 537 1, 248 481 1
-256 3 481 253 602;3 602 1, 49 602 1, 57 566 0, 77 551 1, 97 537 0, 128 537 1, 163 537 0, 183 555 1, 200 570 0, 207 602 1, 253 602 1, 247 551 0, 219 521 1, 184 481 0, 128 481 1, 69 481 0, 33 524 1, 9 554 0
-256 91 481 165 555;91 481 1, 91 555 1, 165 555 1, 165 481 1
-256 43 481 213 651;128 651 1, 163 651 0, 188 627 1, 213 602 0, 213 567 1, 213 531 0, 188 506 1, 163 481 0, 127 481 1, 96 481 0, 73 501 1, 43 527 0, 43 566 1, 43 602 0, 68 626 1, 92 651 0, 128 619 1, 106 619 0, 90 603 1, 75 588 0, 75 566 1, 75 545 0, 90 529 1, 106 513 0, 127 513 1, 147 513 0, 162 526 1, 181 542 0, 181 567 1, 181 588 0, 165 603 1, 150 619 0
-256 63 -162 193 0;107 0 1, 143 0 1, 120 -41 1, 147 -42 0, 167 -56 1, 193 -74 0, 193 -101 1, 193 -126 0, 171 -144 1, 149 -162 0, 117 -162 1, 92 -162 0, 63 -154 1, 63 -124 1, 82 -129 0, 102 -129 1, 141 -129 0, 141 -102 1, 141 -67 0, 71 -66 1
-256 -19 481 275 602;-19 481 1, 71 602 1, 143 602 1, 23 481 1, 113 481 1, 203 602 1, 275 602 1, 155 481 1
-256 64 -139 192 0;123 0 1, 163 0 1, 115 -30 0, 115 -67 1, 115 -103 0, 158 -103 1, 178 -103 0, 192 -98 1, 192 -128 1, 169 -139 0, 140 -139 1, 64 -139 0, 64 -80 1, 64 -34 0
-256 -3 481 259 602;259 602 1, 169 481 1, 87 481 1, -3 602 1, 52 602 1, 128 526 1, 128 526 1, 204 602 1
-427 0 -14 405 568;141 201 1, 156 141 0, 178 108 1, 218 48 0, 290 48 1, 337 48 0, 405 75 1, 405 10 1, 332 -14 0, 281 -14 1, 194 -14 0, 140 38 1, 101 74 0, 82 134 1, 75 156 0, 66 201 1, 0 201 1, 19 248 1, 61 248 1, 60 276 1, 60 277 0, 60 284 1, 61 300 0, 62 321 1, 0 321 1, 19 368 1, 69 368 1, 84 430 0, 102 462 1, 161 568 0, 293 568 1, 341 568 0, 405 552 1, 405 483 1, 342 510 0, 294 510 1, 228 510 0, 188 462 1, 166 434 0, 154 400 1, 149 386 0, 144 368 1, 356 368 1, 337 321 1, 136 321 1, 134 294 0, 134 276 1, 135 248 1, 307 248 1, 288 201 1
-213 0 0 0 0;
-200 72 -111 128 592;72 -111 1, 72 167 1, 128 167 1, 128 -111 1, 72 315 1, 72 592 1, 128 592 1, 128 315 1
-256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
-427 37 546 390 602;37 546 1, 37 602 1, 390 602 1, 390 546 1
-256 28 222 240 564;28 222 1, 28 268 1, 53 312 0, 96 350 1, 122 373 1, 181 425 0, 181 471 1, 181 525 0, 120 525 1, 85 525 0, 36 500 1, 36 543 1, 85 564 0, 130 564 1, 179 564 0, 210 538 1, 240 513 0, 240 473 1, 240 420 0, 171 363 1, 151 346 1, 101 305 0, 92 268 1, 238 268 1, 238 222 1
-256 28 214 234 564;32 507 1, 32 549 1, 75 564 0, 117 564 1, 223 564 0, 223 486 1, 223 450 0, 197 426 1, 182 413 0, 151 402 1, 199 389 0, 218 364 1, 234 343 0, 234 312 1, 234 267 0, 201 240 1, 169 214 0, 112 214 1, 74 214 0, 28 225 1, 28 270 1, 78 251 0, 108 251 1, 175 251 0, 175 312 1, 175 381 0, 78 381 1, 59 381 1, 59 416 1, 75 416 1, 167 416 0, 167 478 1, 167 526 0, 108 526 1, 74 526 0
-213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
-256 46 222 176 564;120 222 1, 120 507 1, 46 488 1, 46 531 1, 176 564 1, 176 222 1
-641 44 -14 594 569;117 222 1, 117 507 1, 44 488 1, 44 531 1, 173 564 1, 173 222 1, 497 0 1, 497 91 1, 344 91 1, 344 133 1, 495 333 1, 548 333 1, 548 135 1, 594 135 1, 594 91 1, 548 91 1, 548 0 1, 393 135 1, 497 135 1, 497 271 1, 72 -14 1, 480 569 1, 530 569 1, 122 -14 1
-641 44 -14 594 569;382 0 1, 382 46 1, 406 88 0, 450 128 1, 477 151 1, 535 203 0, 535 249 1, 535 303 0, 475 303 1, 440 303 0, 390 278 1, 390 321 1, 440 341 0, 485 341 1, 534 341 0, 564 316 1, 594 291 0, 594 250 1, 594 196 0, 525 140 1, 505 124 1, 455 83 0, 447 46 1, 593 46 1, 593 0 1, 53 -14 1, 461 569 1, 512 569 1, 104 -14 1, 117 222 1, 117 507 1, 44 488 1, 44 531 1, 173 564 1, 173 222 1
-641 42 -14 599 569;46 507 1, 46 549 1, 89 564 0, 131 564 1, 237 564 0, 237 486 1, 237 450 0, 211 426 1, 195 413 0, 165 402 1, 213 389 0, 232 364 1, 248 343 0, 248 312 1, 248 267 0, 215 240 1, 183 214 0, 126 214 1, 87 214 0, 42 225 1, 42 270 1, 92 251 0, 122 251 1, 189 251 0, 189 312 1, 189 381 0, 92 381 1, 72 381 1, 72 416 1, 89 416 1, 180 416 0, 180 478 1, 180 526 0, 122 526 1, 88 526 0, 502 0 1, 502 91 1, 349 91 1, 349 133 1, 500 333 1, 552 333 1, 552 135 1, 599 135 1, 599 91 1, 552 91 1, 552 0 1, 398 135 1, 502 135 1, 502 271 1, 107 -14 1, 515 569 1, 565 569 1, 157 -14 1
-555 2 0 520 555;62 0 1, 62 255 1, 2 255 1, 2 314 1, 62 314 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 141 314 1, 266 314 1, 266 255 1, 141 255 1
-449 44 42 404 402;44 81 1, 185 222 1, 44 363 1, 84 402 1, 224 261 1, 365 402 1, 404 363 1, 264 222 1, 404 81 1, 365 42 1, 224 183 1, 84 42 1
-512 11 0 501 722;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 204 602 1, 294 722 1, 380 722 1, 259 602 1
-512 63 0 494 555;63 0 1, 63 555 1, 141 555 1, 141 450 1, 280 450 1, 366 450 0, 403 440 1, 441 431 0, 465 402 1, 494 366 0, 494 304 1, 494 116 0, 257 116 1, 141 116 1, 141 0 1, 141 175 1, 254 175 1, 411 175 0, 411 299 1, 411 359 0, 370 376 1, 335 391 0, 255 391 1, 141 391 1
-427 32 -9 395 629;47 538 1, 47 594 1, 122 594 0, 183 565 1, 241 629 1, 270 596 1, 222 542 1, 269 506 0, 294 478 1, 395 366 0, 395 206 1, 395 105 0, 347 48 1, 299 -9 0, 216 -9 1, 132 -9 0, 82 48 1, 32 105 0, 32 201 1, 32 297 0, 81 352 1, 129 407 0, 214 407 1, 234 407 0, 259 402 1, 230 456 0, 177 494 1, 122 432 1, 92 465 1, 140 518 1, 102 538 0, 212 352 1, 165 352 0, 138 312 1, 111 272 0, 111 199 1, 111 46 0, 214 46 1, 316 46 0, 316 199 1, 316 352 0
-384 7 -148 380 602;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-427 58 -148 395 592;132 -148 1, 58 -148 1, 58 592 1, 132 592 1, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0
-514 8 0 504 657;8 0 1, 219 555 1, 297 555 1, 504 0 1, 419 0 1, 362 154 1, 139 154 1, 81 0 1, 161 212 1, 340 212 1, 251 450 1, 137 602 1, 137 657 1, 378 657 1, 378 602 1
-432 36 -9 412 537;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
-514 8 0 504 722;8 0 1, 219 555 1, 297 555 1, 504 0 1, 419 0 1, 362 154 1, 139 154 1, 81 0 1, 161 212 1, 340 212 1, 251 450 1, 133 722 1, 179 722 1, 187 687 0, 207 672 1, 227 657 0, 258 657 1, 293 657 0, 313 675 1, 329 690 0, 336 722 1, 383 722 1, 377 672 0, 349 641 1, 314 602 0, 258 602 1, 199 602 0, 163 645 1, 139 674 0
-432 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 67 602 1, 113 602 1, 121 566 0, 141 551 1, 161 537 0, 192 537 1, 227 537 0, 247 555 1, 264 570 0, 271 602 1, 317 602 1, 311 551 0, 283 521 1, 248 481 0, 192 481 1, 133 481 0, 97 524 1, 73 554 0
-512 7 -139 503 555;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 419 0 1, 459 0 1, 411 -30 0, 411 -67 1, 411 -103 0, 454 -103 1, 474 -103 0, 488 -98 1, 488 -128 1, 464 -139 0, 435 -139 1, 359 -139 0, 359 -80 1, 359 -34 0
-427 36 -139 412 416;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 315 0 1, 355 0 1, 307 -30 0, 307 -67 1, 307 -103 0, 350 -103 1, 370 -103 0, 384 -98 1, 384 -128 1, 361 -139 0, 332 -139 1, 256 -139 0, 256 -80 1, 256 -34 0
-555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 264 602 1, 355 722 1, 440 722 1, 320 602 1
-384 32 -9 347 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 189 602 1, 279 722 1, 361 722 1, 451 602 1, 396 602 1, 320 677 1, 320 677 1, 244 602 1
-384 32 -9 359 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 96 481 1, 187 602 1, 269 602 1, 359 481 1, 303 481 1, 228 557 1, 227 557 1, 152 481 1
-555 44 -14 507 675;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 283 602 1, 283 675 1, 357 675 1, 357 602 1
-384 32 -9 347 555;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 191 481 1, 191 555 1, 264 555 1, 264 481 1
-555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 451 722 1, 361 602 1, 279 602 1, 189 722 1, 244 722 1, 320 646 1, 320 646 1, 396 722 1
-384 32 -9 387 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 387 602 1, 297 481 1, 215 481 1, 125 602 1, 180 602 1, 256 526 1, 256 526 1, 332 602 1
-555 62 0 520 722;62 0 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 387 722 1, 297 602 1, 215 602 1, 125 722 1, 180 722 1, 255 646 1, 256 646 1, 332 722 1
-472 32 -9 472 592;295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 592 1, 369 592 1, 369 0 1, 295 0 1, 398 422 1, 398 444 1, 427 452 0, 427 512 1, 427 518 1, 398 518 1, 398 592 1, 472 592 1, 472 528 1, 472 430 0
-555 2 0 520 555;62 0 1, 62 255 1, 2 255 1, 2 314 1, 62 314 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 141 314 1, 266 314 1, 266 255 1, 141 255 1
-427 32 -9 425 592;295 472 1, 175 472 1, 175 518 1, 295 518 1, 295 592 1, 369 592 1, 369 518 1, 425 518 1, 425 472 1, 369 472 1, 369 0 1, 295 0 1, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0
-512 72 0 491 657;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 150 602 1, 150 657 1, 391 657 1, 391 602 1
-427 32 -9 383 537;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
-512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 152 722 1, 198 722 1, 206 687 0, 226 672 1, 245 657 0, 276 657 1, 312 657 0, 332 675 1, 348 690 0, 355 722 1, 401 722 1, 395 672 0, 368 641 1, 333 602 0, 276 602 1, 218 602 0, 182 645 1, 158 674 0
-427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 89 602 1, 135 602 1, 143 567 0, 163 551 1, 182 537 0, 213 537 1, 249 537 0, 269 555 1, 285 570 0, 292 602 1, 338 602 1, 332 551 0, 305 521 1, 269 481 0, 213 481 1, 155 481 0, 119 524 1, 95 553 0
-512 72 0 491 675;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 238 602 1, 238 675 1, 312 675 1, 312 602 1
-427 32 -9 383 555;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 155 481 1, 155 555 1, 229 555 1, 229 481 1
-512 72 -139 491 555;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 403 0 1, 443 0 1, 395 -30 0, 395 -67 1, 395 -103 0, 438 -103 1, 458 -103 0, 472 -98 1, 472 -128 1, 449 -139 0, 420 -139 1, 344 -139 0, 344 -80 1, 344 -34 0
-427 32 -139 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 251 0 1, 291 0 1, 243 -30 0, 243 -67 1, 243 -103 0, 286 -103 1, 306 -103 0, 320 -98 1, 320 -128 1, 297 -139 0, 268 -139 1, 192 -139 0, 192 -80 1, 192 -34 0
-512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 406 722 1, 315 602 1, 234 602 1, 143 722 1, 199 722 1, 274 646 1, 275 646 1, 350 722 1
-427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
-597 35 -14 527 722;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 194 602 1, 284 722 1, 366 722 1, 456 602 1, 401 602 1, 326 677 1, 325 677 1, 249 602 1
-427 35 -158 372 602;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 93 481 1, 184 602 1, 266 602 1, 356 481 1, 300 481 1, 225 557 1, 224 557 1, 149 481 1
-597 35 -14 527 722;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 200 722 1, 246 722 1, 254 687 0, 275 672 1, 294 657 0, 325 657 1, 360 657 0, 381 675 1, 397 690 0, 404 722 1, 450 722 1, 444 672 0, 417 641 1, 381 602 0, 325 602 1, 266 602 0, 231 645 1, 206 674 0
-427 35 -158 381 602;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 131 602 1, 177 602 1, 185 566 0, 205 551 1, 225 537 0, 256 537 1, 291 537 0, 311 555 1, 328 570 0, 335 602 1, 381 602 1, 375 551 0, 347 521 1, 312 481 0, 256 481 1, 197 481 0, 161 524 1, 137 554 0
-597 35 -14 527 675;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 288 602 1, 288 675 1, 362 675 1, 362 602 1
-427 35 -158 372 555;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 183 481 1, 183 555 1, 257 555 1, 257 481 1
-597 35 -162 527 569;527 258 1, 527 15 1, 423 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 263 -158 1, 263 -126 1, 284 -129 0, 299 -129 1, 340 -129 0, 340 -104 1, 340 -77 0, 281 -71 1, 281 -42 1, 331 -43 0, 356 -54 1, 391 -69 0, 391 -105 1, 391 -162 0, 309 -162 1, 287 -162 0
-427 35 -158 372 651;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 257 651 1, 257 629 1, 228 621 0, 228 561 1, 228 555 1, 257 555 1, 257 481 1, 183 481 1, 183 545 1, 183 644 0
-555 62 0 492 722;62 0 1, 62 555 1, 141 555 1, 141 321 1, 414 321 1, 414 555 1, 492 555 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1, 146 602 1, 236 722 1, 318 722 1, 408 602 1, 353 602 1, 278 677 1, 277 677 1, 201 602 1
-427 58 0 374 750;58 0 1, 58 592 1, 132 592 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 86 629 1, 176 750 1, 258 750 1, 348 629 1, 293 629 1, 217 705 1, 216 705 1, 141 629 1
-555 6 0 548 555;141 321 1, 414 321 1, 414 416 1, 141 416 1, 62 0 1, 62 416 1, 6 416 1, 6 463 1, 62 463 1, 62 555 1, 141 555 1, 141 463 1, 414 463 1, 414 555 1, 492 555 1, 492 463 1, 548 463 1, 548 416 1, 492 416 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1
-427 2 0 374 592;58 0 1, 58 472 1, 2 472 1, 2 518 1, 58 518 1, 58 592 1, 132 592 1, 132 518 1, 243 518 1, 243 472 1, 132 472 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
-213 -18 0 232 689;68 0 1, 68 555 1, 146 555 1, 146 0 1, -18 602 1, -15 636 0, -6 656 1, 11 689 0, 52 689 1, 79 689 0, 102 675 1, 125 661 1, 146 648 0, 157 648 1, 182 648 0, 186 689 1, 232 689 1, 229 654 0, 220 635 1, 203 602 0, 162 602 1, 135 602 0, 112 616 1, 89 630 1, 69 643 0, 57 643 1, 32 643 0, 28 602 1
-171 -40 0 210 569;48 0 1, 48 407 1, 122 407 1, 122 0 1, -40 481 1, -37 516 0, -28 535 1, -11 569 0, 30 569 1, 57 569 0, 80 555 1, 103 541 1, 124 528 0, 135 528 1, 160 528 0, 164 569 1, 210 569 1, 207 534 0, 198 515 1, 181 481 0, 141 481 1, 114 481 0, 90 496 1, 68 510 1, 47 522 0, 35 522 1, 11 522 0, 6 481 1
-213 -14 0 227 657;68 0 1, 68 555 1, 146 555 1, 146 0 1, -14 602 1, -14 657 1, 227 657 1, 227 602 1
-171 -56 0 184 537;48 0 1, 48 407 1, 122 407 1, 122 0 1, -56 481 1, -56 537 1, 184 537 1, 184 481 1
-213 -18 0 232 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, -18 722 1, 28 722 1, 36 687 0, 56 672 1, 76 657 0, 107 657 1, 142 657 0, 162 675 1, 179 690 0, 186 722 1, 232 722 1, 226 672 0, 198 641 1, 163 602 0, 107 602 1, 48 602 0, 12 645 1, -12 674 0
-171 -40 0 210 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, -40 602 1, 6 602 1, 14 566 0, 35 551 1, 54 537 0, 85 537 1, 120 537 0, 141 555 1, 157 570 0, 164 602 1, 210 602 1, 204 551 0, 177 521 1, 141 481 0, 85 481 1, 26 481 0, -9 524 1, -34 554 0
-213 45 -139 173 555;68 0 1, 68 555 1, 146 555 1, 146 0 1, 104 0 1, 144 0 1, 96 -30 0, 96 -67 1, 96 -103 0, 140 -103 1, 159 -103 0, 173 -98 1, 173 -128 1, 150 -139 0, 121 -139 1, 45 -139 0, 45 -80 1, 45 -34 0
-171 0 -139 128 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1, 59 0 1, 99 0 1, 51 -30 0, 51 -67 1, 51 -103 0, 94 -103 1, 114 -103 0, 128 -98 1, 128 -128 1, 105 -139 0, 76 -139 1, 0 -139 0, 0 -80 1, 0 -34 0
-213 68 0 146 675;68 0 1, 68 555 1, 146 555 1, 146 0 1, 70 602 1, 70 675 1, 144 675 1, 144 602 1
-564 68 -111 507 555;68 0 1, 68 555 1, 146 555 1, 146 0 1, 210 -87 1, 210 -19 1, 275 -48 0, 330 -48 1, 395 -48 0, 413 -18 1, 428 7 0, 428 68 1, 428 555 1, 507 555 1, 507 70 1, 507 -111 0, 327 -111 1, 266 -111 0
-341 48 -157 316 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1, 134 -145 1, 134 -87 1, 164 -102 0, 190 -102 1, 227 -102 0, 235 -74 1, 242 -51 0, 242 0 1, 242 407 1, 316 407 1, 316 0 1, 316 -157 0, 196 -157 1, 163 -157 0, 242 481 1, 242 555 1, 316 555 1, 316 481 1
-384 18 -111 398 722;18 -87 1, 18 -19 1, 83 -48 0, 138 -48 1, 203 -48 0, 221 -18 1, 236 7 0, 236 68 1, 236 555 1, 315 555 1, 315 70 1, 315 -111 0, 135 -111 1, 74 -111 0, 135 602 1, 226 722 1, 308 722 1, 398 602 1, 342 602 1, 267 677 1, 266 677 1, 191 602 1
-171 -58 -157 212 602;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0, -50 481 1, 40 602 1, 122 602 1, 212 481 1, 156 481 1, 81 557 1, 80 557 1, 5 481 1
-512 72 -162 494 555;72 0 1, 72 555 1, 146 555 1, 146 282 1, 376 555 1, 455 555 1, 232 290 1, 494 0 1, 394 0 1, 146 281 1, 146 0 1, 183 -158 1, 183 -126 1, 204 -129 0, 219 -129 1, 260 -129 0, 260 -104 1, 260 -77 0, 201 -71 1, 201 -42 1, 251 -43 0, 276 -54 1, 311 -69 0, 311 -105 1, 311 -162 0, 230 -162 1, 207 -162 0
-384 58 -162 377 592;58 0 1, 58 592 1, 132 592 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
-384 58 0 377 407;58 0 1, 58 407 1, 132 407 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1
-427 62 0 413 722;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 66 602 1, 157 722 1, 242 722 1, 122 602 1
-171 40 0 216 730;48 0 1, 48 592 1, 122 592 1, 122 0 1, 40 609 1, 131 730 1, 216 730 1, 96 609 1
-427 62 -162 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 168 -158 1, 168 -126 1, 190 -129 0, 205 -129 1, 246 -129 0, 246 -104 1, 246 -77 0, 187 -71 1, 187 -42 1, 237 -43 0, 262 -54 1, 297 -69 0, 297 -105 1, 297 -162 0, 215 -162 1, 193 -162 0
-171 0 -162 128 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 0 -158 1, 0 -126 1, 21 -129 0, 36 -129 1, 77 -129 0, 77 -104 1, 77 -77 0, 18 -71 1, 18 -42 1, 68 -43 0, 93 -54 1, 128 -69 0, 128 -105 1, 128 -162 0, 47 -162 1, 25 -162 0
-427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 252 385 1, 252 407 1, 280 415 0, 280 475 1, 280 481 1, 252 481 1, 252 555 1, 326 555 1, 326 491 1, 325 393 0
-224 48 0 229 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 155 422 1, 155 444 1, 183 452 0, 183 512 1, 183 518 1, 155 518 1, 155 592 1, 229 592 1, 229 528 1, 228 430 0
-427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 279 241 1, 279 315 1, 353 315 1, 353 241 1
-257 48 0 252 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 178 241 1, 178 315 1, 252 315 1, 252 241 1
-427 6 0 413 555;62 0 1, 62 260 1, 6 230 1, 6 293 1, 62 323 1, 62 555 1, 141 555 1, 141 366 1, 233 416 1, 233 353 1, 141 303 1, 141 59 1, 413 59 1, 413 0 1
-171 -3 0 173 592;48 0 1, 48 270 1, -3 243 1, -3 305 1, 48 333 1, 48 592 1, 123 592 1, 123 374 1, 173 399 1, 173 338 1, 123 311 1, 123 0 1
-555 62 0 492 722;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 222 602 1, 312 722 1, 398 722 1, 277 602 1
-427 58 0 374 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-555 62 -162 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 194 -158 1, 194 -126 1, 216 -129 0, 231 -129 1, 272 -129 0, 272 -104 1, 272 -77 0, 213 -71 1, 213 -42 1, 263 -43 0, 288 -54 1, 323 -69 0, 323 -105 1, 323 -162 0, 241 -162 1, 219 -162 0
-427 58 -162 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
-555 62 0 492 722;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 408 722 1, 318 602 1, 236 602 1, 146 722 1, 201 722 1, 277 646 1, 278 646 1, 353 722 1
-427 58 0 374 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
-464 0 0 411 592;95 0 1, 95 407 1, 168 407 1, 168 331 1, 196 369 0, 222 388 1, 261 416 0, 307 416 1, 411 416 0, 411 293 1, 411 0 1, 336 0 1, 336 269 1, 336 318 0, 326 335 1, 315 353 0, 287 353 1, 227 353 0, 168 264 1, 168 0 1, 0 422 1, 0 444 1, 29 452 0, 29 512 1, 29 518 1, 0 518 1, 0 592 1, 74 592 1, 74 528 1, 74 430 0
-555 62 -158 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 -35 1, 492 -158 0, 373 -158 1, 345 -158 0, 317 -150 1, 317 -92 1, 341 -102 0, 369 -102 1, 425 -102 0, 425 -21 1, 425 -15 1, 129 429 1, 129 0 1
-427 58 -158 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 -35 1, 374 -158 0, 255 -158 1, 227 -158 0, 198 -150 1, 198 -92 1, 222 -102 0, 244 -102 1, 300 -102 0, 300 -21 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
-597 35 -14 563 657;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 179 602 1, 179 657 1, 419 657 1, 419 602 1
-427 32 -9 395 537;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
-597 35 -14 563 722;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 174 722 1, 220 722 1, 228 687 0, 248 672 1, 268 657 0, 299 657 1, 334 657 0, 354 675 1, 371 690 0, 378 722 1, 424 722 1, 418 672 0, 390 641 1, 355 602 0, 299 602 1, 240 602 0, 204 645 1, 180 674 0
-427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 89 602 1, 135 602 1, 143 567 0, 163 551 1, 182 537 0, 213 537 1, 249 537 0, 269 555 1, 285 570 0, 292 602 1, 338 602 1, 332 551 0, 305 521 1, 269 481 0, 213 481 1, 155 481 0, 119 524 1, 95 553 0
-597 35 -14 563 722;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 212 602 1, 303 722 1, 374 722 1, 254 602 1, 344 602 1, 434 722 1, 506 722 1, 386 602 1
-427 32 -9 403 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 109 481 1, 199 602 1, 271 602 1, 151 481 1, 241 481 1, 331 602 1, 403 602 1, 283 481 1
-555 62 0 538 722;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 196 602 1, 287 722 1, 372 722 1, 252 602 1
-256 58 0 280 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 104 481 1, 195 602 1, 280 602 1, 160 481 1
-555 62 -162 538 555;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 196 -158 1, 196 -126 1, 218 -129 0, 233 -129 1, 274 -129 0, 274 -104 1, 274 -77 0, 215 -71 1, 215 -42 1, 265 -43 0, 290 -54 1, 324 -69 0, 324 -105 1, 324 -162 0, 243 -162 1, 221 -162 0
-256 58 -162 251 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
-555 62 0 538 722;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 368 722 1, 278 602 1, 196 602 1, 106 722 1, 161 722 1, 237 646 1, 237 646 1, 313 722 1
-256 -3 0 259 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 259 602 1, 169 481 1, 87 481 1, -3 602 1, 52 602 1, 128 526 1, 128 526 1, 204 602 1
-512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 196 602 1, 287 722 1, 372 722 1, 252 602 1
-384 44 -9 344 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 120 602 1, 211 722 1, 293 722 1, 383 602 1, 327 602 1, 252 677 1, 251 677 1, 176 602 1
-384 44 -9 341 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 75 481 1, 165 602 1, 247 602 1, 337 481 1, 282 481 1, 206 557 1, 206 557 1, 130 481 1
-512 45 -162 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 147 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 225 0 1, 262 0 1, 239 -41 1, 266 -42 0, 286 -56 1, 312 -74 0, 312 -101 1, 312 -126 0, 290 -144 1, 268 -162 0, 236 -162 1, 211 -162 0, 182 -154 1, 182 -124 1, 201 -129 0, 221 -129 1, 260 -129 0, 260 -102 1, 260 -67 0, 190 -66 1
-384 44 -162 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 171 0 1, 207 0 1, 184 -41 1, 211 -42 0, 231 -56 1, 257 -74 0, 257 -101 1, 257 -126 0, 235 -144 1, 213 -162 0, 181 -162 1, 156 -162 0, 127 -154 1, 127 -124 1, 146 -129 0, 166 -129 1, 205 -129 0, 205 -102 1, 205 -67 0, 135 -66 1
-512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 383 722 1, 293 602 1, 211 602 1, 120 722 1, 176 722 1, 251 646 1, 252 646 1, 327 722 1
-384 44 -9 341 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
-469 8 -162 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 220 0 1, 256 0 1, 234 -41 1, 261 -42 0, 280 -56 1, 306 -74 0, 306 -101 1, 306 -126 0, 285 -144 1, 263 -162 0, 230 -162 1, 205 -162 0, 176 -154 1, 176 -124 1, 195 -129 0, 215 -129 1, 254 -129 0, 254 -102 1, 254 -67 0, 184 -66 1
-213 11 -162 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 112 0 1, 149 0 1, 126 -41 1, 153 -42 0, 173 -56 1, 199 -74 0, 199 -101 1, 199 -126 0, 177 -144 1, 155 -162 0, 123 -162 1, 97 -162 0, 69 -154 1, 69 -124 1, 87 -129 0, 108 -129 1, 147 -129 0, 147 -102 1, 147 -67 0, 77 -66 1
-469 8 0 461 722;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 366 722 1, 275 602 1, 194 602 1, 103 722 1, 159 722 1, 234 646 1, 235 646 1, 310 722 1
-288 11 -9 270 633;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 196 463 1, 196 485 1, 224 493 0, 224 553 1, 224 559 1, 196 559 1, 196 633 1, 270 633 1, 270 569 1, 269 471 0
-469 8 0 461 555;195 0 1, 195 268 1, 81 268 1, 81 324 1, 195 324 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 324 1, 387 324 1, 387 268 1, 274 268 1, 274 0 1
-213 11 -9 210 488;57 213 1, 11 213 1, 11 259 1, 57 259 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 259 1, 210 259 1, 210 213 1, 131 213 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1
-555 62 -14 492 689;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 157 602 1, 160 636 0, 169 656 1, 186 689 0, 227 689 1, 254 689 0, 277 675 1, 300 661 1, 321 648 0, 332 648 1, 357 648 0, 361 689 1, 407 689 1, 404 654 0, 395 635 1, 378 602 0, 338 602 1, 311 602 0, 287 616 1, 264 630 1, 244 643 0, 232 643 1, 207 643 0, 203 602 1
-427 53 -9 369 569;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 86 481 1, 89 516 0, 98 535 1, 116 569 0, 156 569 1, 183 569 0, 206 555 1, 229 541 1, 250 528 0, 261 528 1, 286 528 0, 290 569 1, 336 569 1, 333 534 0, 324 515 1, 307 481 0, 267 481 1, 240 481 0, 216 496 1, 194 510 1, 173 522 0, 161 522 1, 137 522 0, 132 481 1
-555 62 -14 492 657;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 162 602 1, 162 657 1, 402 657 1, 402 602 1
-427 53 -9 369 537;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 72 481 1, 72 537 1, 312 537 1, 312 481 1
-555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 157 722 1, 203 722 1, 211 687 0, 231 672 1, 251 657 0, 282 657 1, 317 657 0, 338 675 1, 354 690 0, 361 722 1, 407 722 1, 401 672 0, 374 641 1, 338 602 0, 282 602 1, 223 602 0, 188 645 1, 163 674 0
-427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 86 602 1, 132 602 1, 140 567 0, 161 551 1, 180 537 0, 211 537 1, 246 537 0, 267 555 1, 283 570 0, 290 602 1, 336 602 1, 330 551 0, 303 521 1, 267 481 0, 211 481 1, 152 481 0, 117 524 1, 93 553 0
-555 62 -14 492 762;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 282 762 1, 317 762 0, 342 738 1, 367 713 0, 367 678 1, 367 642 0, 342 617 1, 317 592 0, 281 592 1, 250 592 0, 227 612 1, 197 638 0, 197 677 1, 197 713 0, 222 737 1, 247 762 0, 282 730 1, 260 730 0, 245 714 1, 229 699 0, 229 677 1, 229 656 0, 245 640 1, 260 624 0, 281 624 1, 302 624 0, 316 637 1, 335 653 0, 335 678 1, 335 699 0, 319 714 1, 304 730 0
-427 53 -9 369 651;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 192 651 1, 227 651 0, 252 627 1, 277 602 0, 277 567 1, 277 531 0, 252 506 1, 227 481 0, 191 481 1, 160 481 0, 137 501 1, 107 527 0, 107 566 1, 107 602 0, 132 626 1, 156 651 0, 192 619 1, 170 619 0, 154 603 1, 139 588 0, 139 566 1, 139 545 0, 154 529 1, 170 513 0, 191 513 1, 211 513 0, 226 526 1, 245 542 0, 245 567 1, 245 588 0, 229 603 1, 214 619 0
-555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 187 602 1, 278 722 1, 349 722 1, 229 602 1, 319 602 1, 409 722 1, 481 722 1, 361 602 1
-427 53 -9 403 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 109 481 1, 199 602 1, 271 602 1, 151 481 1, 241 481 1, 331 602 1, 403 602 1, 283 481 1
-555 62 -139 492 555;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 300 0 1, 340 0 1, 292 -30 0, 292 -67 1, 292 -103 0, 335 -103 1, 355 -103 0, 369 -98 1, 369 -128 1, 346 -139 0, 317 -139 1, 241 -139 0, 241 -80 1, 241 -34 0
-427 53 -139 384 407;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 315 0 1, 355 0 1, 307 -30 0, 307 -67 1, 307 -103 0, 350 -103 1, 370 -103 0, 384 -98 1, 384 -128 1, 361 -139 0, 332 -139 1, 256 -139 0, 256 -80 1, 256 -34 0
-725 9 0 716 722;152 0 1, 9 555 1, 85 555 1, 199 117 1, 329 555 1, 405 555 1, 530 121 1, 651 555 1, 716 555 1, 560 0 1, 482 0 1, 358 428 1, 230 0 1, 236 602 1, 326 722 1, 408 722 1, 498 602 1, 443 602 1, 367 677 1, 366 677 1, 291 602 1
-555 4 0 549 602;102 0 1, 4 407 1, 77 407 1, 150 101 1, 244 407 1, 318 407 1, 400 99 1, 486 407 1, 549 407 1, 435 0 1, 361 0 1, 275 315 1, 177 0 1, 149 481 1, 240 602 1, 321 602 1, 412 481 1, 356 481 1, 281 557 1, 280 557 1, 205 481 1
-512 11 0 501 722;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 134 602 1, 224 722 1, 306 722 1, 396 602 1, 341 602 1, 265 677 1, 264 677 1, 189 602 1
-384 7 -148 380 602;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 67 481 1, 157 602 1, 239 602 1, 329 481 1, 274 481 1, 198 557 1, 198 557 1, 122 481 1
-469 38 0 431 722;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 179 602 1, 269 722 1, 355 722 1, 234 602 1
-384 28 0 356 602;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
-469 38 0 431 675;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 202 602 1, 202 675 1, 276 675 1, 276 602 1
-384 28 0 356 555;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 155 481 1, 155 555 1, 229 555 1, 229 481 1
-469 38 0 431 722;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 370 722 1, 280 602 1, 198 602 1, 108 722 1, 163 722 1, 239 646 1, 239 646 1, 315 722 1
-384 28 0 356 602;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
-171 3 0 192 602;54 0 1, 54 352 1, 3 352 1, 3 407 1, 54 407 1, 54 456 1, 54 525 0, 84 563 1, 114 602 0, 167 602 1, 175 602 0, 192 600 1, 192 545 1, 181 546 0, 175 546 1, 128 546 0, 128 464 1, 128 0 1
-512 45 -162 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 147 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 197 -158 1, 197 -126 1, 218 -129 0, 233 -129 1, 274 -129 0, 274 -104 1, 274 -77 0, 215 -71 1, 215 -42 1, 265 -43 0, 290 -54 1, 325 -69 0, 325 -105 1, 325 -162 0, 243 -162 1, 221 -162 0
-384 44 -162 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
-469 8 -162 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 177 -158 1, 177 -126 1, 198 -129 0, 213 -129 1, 254 -129 0, 254 -104 1, 254 -77 0, 195 -71 1, 195 -42 1, 245 -43 0, 270 -54 1, 305 -69 0, 305 -105 1, 305 -162 0, 224 -162 1, 201 -162 0
-213 11 -162 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
-256 64 -162 192 -42;64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
-213 70 -120 144 407;70 -120 1, 70 -93 1, 96 -79 0, 96 -9 1, 96 0 1, 70 0 1, 70 74 1, 144 74 1, 144 12 1, 143 -102 0, 70 333 1, 70 407 1, 144 407 1, 144 333 1
-213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
-256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
-256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
-427 38 204 390 250;38 204 1, 38 250 1, 390 250 1, 390 204 1
-768 37 204 731 241;37 204 1, 37 241 1, 731 241 1, 731 204 1
-213 0 0 0 0;
-427 37 546 390 602;37 546 1, 37 602 1, 390 602 1, 390 546 1
-427 32 -9 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0
-449 39 194 409 250;39 194 1, 39 250 1, 409 250 1, 409 194 1
-128 -165 -14 293 569;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
-213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
-384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 336 407 1, 336 0 1, 262 0 1, 262 352 1, 140 352 1, 140 0 1, 262 481 1, 262 555 1, 336 555 1, 336 481 1
-384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 179 602 1, 262 592 1, 336 592 1, 336 0 1, 262 0 1, 262 537 1, 246 540 1, 214 546 0, 192 546 1, 159 546 0, 148 524 1, 140 505 0, 140 464 1, 140 407 1, 206 407 1, 206 352 1, 140 352 1, 140 0 1
-256 1 222 251 555;154 222 1, 154 313 1, 1 313 1, 1 356 1, 152 555 1, 205 555 1, 205 357 1, 251 357 1, 251 313 1, 205 313 1, 205 222 1, 50 357 1, 154 357 1, 154 493 1
-171 -58 -157 124 407;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0
-213 0 0 0 0;
diff --git a/vendor/github.com/golang/freetype/testdata/luxisr-12pt-with-hinting.txt b/vendor/github.com/golang/freetype/testdata/luxisr-12pt-with-hinting.txt
deleted file mode 100644
index 9c30f6773..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxisr-12pt-with-hinting.txt
+++ /dev/null
@@ -1,392 +0,0 @@
-freetype version 2.5.1
-192 0 0 192 576;0 0 1, 0 576 1, 192 576 1, 192 0 1, 128 64 1, 128 512 1, 64 512 1, 64 64 1
-0 0 0 0 0;
-192 0 0 0 0;
-192 0 0 0 0;
-192 64 0 128 576;64 0 1, 64 64 1, 128 64 1, 128 0 1, 72 128 1, 64 454 1, 64 576 1, 128 576 1, 128 454 1, 120 128 1
-256 0 384 256 576;44 384 1, 35 576 1, 108 576 1, 99 384 1, 173 384 1, 164 576 1, 238 576 1, 229 384 1
-448 0 0 448 576;47 25 1, 89 192 1, 9 192 1, 18 256 1, 100 256 1, 133 320 1, 44 320 1, 54 384 1, 144 384 1, 186 551 1, 234 551 1, 192 384 1, 291 384 1, 332 551 1, 380 551 1, 339 384 1, 418 384 1, 409 320 1, 327 320 1, 294 256 1, 383 256 1, 374 192 1, 283 192 1, 242 25 1, 194 25 1, 235 192 1, 137 192 1, 95 25 1, 148 256 1, 247 256 1, 279 320 1, 180 320 1
-448 64 -64 320 640;192 -46 1, 192 0 1, 135 0 0, 64 31 1, 64 95 1, 137 56 0, 192 56 1, 192 255 1, 124 298 0, 96 331 1, 64 368 0, 64 422 1, 64 486 0, 110 524 1, 142 550 0, 192 555 1, 192 602 1, 256 602 1, 256 555 1, 285 555 0, 320 530 1, 320 470 1, 282 500 0, 256 504 1, 256 307 1, 258 304 1, 263 298 0, 267 293 1, 270 290 1, 293 262 0, 305 237 1, 320 205 0, 320 155 1, 320 87 0, 297 42 1, 282 12 0, 256 0 1, 256 -46 1, 256 60 1, 256 85 0, 256 144 1, 256 175 0, 256 195 1, 256 210 0, 256 233 1, 192 331 1, 192 502 1, 128 479 0, 128 425 1, 128 376 0
-704 64 0 640 576;94 0 1, 531 576 1, 589 576 1, 152 0 1, 160 576 1, 204 576 0, 230 542 1, 256 507 0, 256 448 1, 256 389 0, 230 355 1, 204 320 0, 160 320 1, 115 320 0, 90 355 1, 64 389 0, 64 450 1, 64 502 0, 85 535 1, 112 576 0, 160 512 1, 146 512 0, 137 495 1, 128 477 0, 128 449 1, 128 422 0, 135 405 1, 144 384 0, 160 384 1, 174 384 0, 183 402 1, 192 419 0, 192 448 1, 192 477 0, 183 494 1, 174 512 0, 512 320 1, 571 320 0, 606 277 1, 640 234 0, 640 160 1, 640 86 0, 606 43 1, 571 0 0, 512 0 1, 453 0 0, 418 43 1, 384 86 0, 384 162 1, 384 228 0, 412 269 1, 448 320 0, 512 256 1, 483 256 0, 466 230 1, 448 203 0, 448 162 1, 448 122 0, 462 96 1, 480 64 0, 512 64 1, 541 64 0, 558 91 1, 576 117 0, 576 160 1, 576 203 0, 558 229 1, 541 256 0
-512 0 0 512 576;384 0 1, 357 35 1, 277 0 0, 205 0 1, 118 0 0, 59 52 1, 0 105 0, 0 185 1, 0 264 0, 56 313 1, 89 341 0, 152 363 1, 128 420 0, 128 461 1, 128 513 0, 163 545 1, 199 576 0, 260 576 1, 317 576 0, 351 548 1, 384 519 0, 384 472 1, 384 419 0, 335 381 1, 305 358 0, 248 337 1, 311 214 0, 373 133 1, 410 185 0, 410 287 1, 410 320 1, 483 320 1, 483 179 0, 408 90 1, 441 44 0, 485 0 1, 325 82 1, 251 173 0, 178 321 1, 127 303 0, 102 281 1, 64 249 0, 64 203 1, 64 145 0, 107 104 1, 151 64 0, 212 64 1, 260 64 0, 220 383 1, 266 396 0, 288 411 1, 320 433 0, 320 464 1, 320 512 0, 258 512 1, 192 512 0, 192 461 1, 192 431 0, 217 388 1
-128 0 384 128 576;45 384 1, 27 576 1, 120 576 1, 101 384 1
-256 64 -128 256 640;225 -60 1, 225 -111 1, 156 -58 0, 117 21 1, 64 123 0, 64 241 1, 64 364 0, 121 469 1, 160 541 0, 225 592 1, 225 541 1, 177 485 0, 155 426 1, 128 353 0, 128 241 1, 128 124 0, 158 48 1, 180 -7 0
-256 0 -128 192 640;31 541 1, 31 592 1, 100 539 0, 140 460 1, 192 358 0, 192 241 1, 192 117 0, 135 12 1, 96 -60 0, 31 -111 1, 31 -60 1, 79 -3 0, 101 55 1, 128 129 0, 128 241 1, 128 357 0, 98 433 1, 77 487 0
-320 0 256 320 576;267 483 1, 284 415 1, 180 383 1, 180 384 1, 180 389 0, 192 390 1, 192 390 1, 192 411 0, 170 423 1, 255 296 1, 210 266 1, 152 360 1, 171 362 0, 178 378 1, 88 266 1, 43 296 1, 120 378 1, 128 362 0, 147 360 1, 15 415 1, 32 483 1, 129 423 1, 118 410 0, 118 389 1, 118 389 1, 118 389 0, 118 387 1, 119 386 1, 119 384 0, 119 383 1, 122 576 1, 177 576 1, 165 427 1, 157 448 0, 149 448 1, 140 448 0, 133 427 1
-448 64 64 384 384;192 64 1, 192 192 1, 64 192 1, 64 256 1, 192 256 1, 192 384 1, 256 384 1, 256 256 1, 384 256 1, 384 192 1, 256 192 1, 256 64 1
-192 64 -192 128 64;64 -149 1, 64 -121 1, 89 -111 0, 89 -36 1, 89 -29 1, 64 -29 1, 64 64 1, 128 64 1, 128 -16 1, 128 -139 0
-256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
-192 64 0 128 64;64 0 1, 64 64 1, 128 64 1, 128 0 1
-192 -64 -128 256 576;-22 -128 1, 178 576 1, 236 576 1, 36 -128 1
-448 0 0 384 576;192 576 1, 280 576 0, 332 499 1, 384 422 0, 384 289 1, 384 154 0, 332 77 1, 280 0 0, 190 0 1, 112 0 0, 63 63 1, 0 142 0, 0 289 1, 0 422 0, 52 499 1, 104 576 0, 192 512 1, 130 512 0, 97 454 1, 64 395 0, 64 288 1, 64 183 0, 97 123 1, 130 64 0, 192 64 1, 248 64 0, 279 107 1, 320 165 0, 320 289 1, 320 397 0, 287 454 1, 252 512 0
-448 64 0 384 640;64 0 1, 64 64 1, 192 64 1, 192 502 1, 64 474 1, 64 531 1, 256 577 1, 256 64 1, 384 64 1, 384 0 1
-448 64 0 320 576;64 0 1, 64 64 1, 85 124 0, 134 187 1, 167 228 1, 197 266 1, 256 339 0, 256 414 1, 256 466 0, 232 491 1, 213 512 0, 178 512 1, 133 512 0, 64 486 1, 64 554 1, 129 576 0, 185 576 1, 247 576 0, 283 533 1, 320 490 0, 320 418 1, 320 368 0, 301 330 1, 282 290 0, 230 234 1, 208 211 1, 142 139 0, 129 64 1, 320 64 1, 320 0 1
-448 64 0 384 576;64 4 1, 64 76 1, 67 76 1, 78 74 0, 83 74 1, 129 68 0, 146 66 1, 173 64 0, 196 64 1, 260 64 0, 292 94 1, 320 119 0, 320 167 1, 320 222 0, 272 251 1, 225 280 0, 137 280 1, 108 280 1, 108 332 1, 131 332 1, 191 333 0, 223 360 1, 256 387 0, 256 435 1, 256 512 0, 172 512 1, 129 512 0, 64 500 1, 64 568 1, 126 576 0, 174 576 1, 257 576 0, 293 534 1, 320 502 0, 320 450 1, 320 391 0, 287 353 1, 267 331 0, 228 312 1, 278 301 0, 303 288 1, 384 248 0, 384 165 1, 384 90 0, 332 45 1, 279 0 0, 194 0 1, 148 0 0
-448 0 0 384 576;256 0 1, 256 128 1, 0 128 1, 0 187 1, 256 576 1, 320 576 1, 320 192 1, 384 192 1, 384 128 1, 320 128 1, 320 0 1, 75 192 1, 256 192 1, 256 473 1
-448 64 -64 320 576;64 -2 1, 64 67 1, 113 64 0, 154 64 1, 202 64 0, 229 98 1, 256 132 0, 256 189 1, 256 320 0, 102 320 1, 83 320 0, 64 297 1, 64 576 1, 320 576 1, 320 512 1, 128 512 1, 128 359 1, 212 357 0, 259 319 1, 320 269 0, 320 173 1, 320 92 0, 274 46 1, 227 0 0, 146 0 1, 111 0 0
-448 64 0 384 576;141 303 1, 187 384 0, 253 384 1, 314 384 0, 349 336 1, 384 288 0, 384 203 1, 384 110 0, 342 55 1, 300 0 0, 229 0 1, 152 0 0, 108 72 1, 64 144 0, 64 270 1, 64 414 0, 121 495 1, 179 576 0, 281 576 1, 327 576 0, 384 569 1, 384 502 1, 316 512 0, 278 512 1, 195 512 0, 162 434 1, 149 403 0, 144 364 1, 142 344 0, 229 320 1, 184 320 0, 156 288 1, 128 257 0, 128 203 1, 128 143 0, 157 103 1, 185 64 0, 231 64 1, 320 64 0, 320 187 1, 320 320 0
-448 64 0 384 576;93 0 1, 103 68 0, 121 118 1, 139 168 0, 185 255 1, 321 512 1, 64 512 1, 64 576 1, 384 576 1, 384 512 1, 192 180 0, 169 0 1
-448 64 0 384 576;147 313 1, 110 339 0, 91 363 1, 64 398 0, 64 438 1, 64 499 0, 110 537 1, 156 576 0, 230 576 1, 299 576 0, 342 543 1, 384 511 0, 384 457 1, 384 410 0, 347 367 1, 325 341 0, 283 313 1, 328 284 0, 351 254 1, 384 211 0, 384 155 1, 384 87 0, 338 43 1, 293 0 0, 221 0 1, 150 0 0, 107 41 1, 64 82 0, 64 150 1, 64 210 0, 94 257 1, 113 285 0, 242 338 1, 320 387 0, 320 441 1, 320 473 0, 294 493 1, 267 512 0, 222 512 1, 180 512 0, 154 494 1, 128 476 0, 128 445 1, 128 409 0, 173 378 1, 195 362 0, 188 282 1, 156 252 0, 143 229 1, 128 204 0, 128 165 1, 128 120 0, 155 92 1, 181 64 0, 225 64 1, 267 64 0, 293 88 1, 320 111 0, 320 149 1, 320 183 0, 298 206 1, 280 225 0, 236 253 1
-448 64 0 384 576;308 273 1, 262 192 0, 195 192 1, 134 192 0, 99 240 1, 64 288 0, 64 373 1, 64 466 0, 106 521 1, 148 576 0, 218 576 1, 296 576 0, 340 504 1, 384 432 0, 384 306 1, 384 162 0, 327 81 1, 269 0 0, 168 0 1, 120 0 0, 64 7 1, 64 74 1, 133 64 0, 171 64 1, 254 64 0, 287 143 1, 300 173 0, 305 212 1, 307 232 0, 217 512 1, 128 512 0, 128 390 1, 128 256 0, 219 256 1, 264 256 0, 292 288 1, 320 320 0, 320 374 1, 320 433 0, 291 473 1, 262 512 0
-192 64 0 128 384;64 0 1, 64 64 1, 128 64 1, 128 0 1, 64 320 1, 64 384 1, 128 384 1, 128 320 1
-192 64 -128 128 384;64 -120 1, 64 -93 1, 87 -79 0, 87 -9 1, 87 0 1, 64 0 1, 64 64 1, 128 64 1, 128 10 1, 128 -102 0, 64 320 1, 64 384 1, 128 384 1, 128 320 1
-448 0 0 384 448;384 37 1, 14 222 1, 384 407 1, 384 345 1, 139 222 1, 139 222 1, 384 99 1
-448 64 128 384 320;64 128 1, 64 192 1, 384 192 1, 384 128 1, 64 256 1, 64 320 1, 384 320 1, 384 256 1
-448 64 0 448 448;64 407 1, 434 222 1, 64 37 1, 64 99 1, 309 222 1, 309 222 1, 64 345 1
-448 64 0 384 576;128 0 1, 128 64 1, 192 64 1, 192 0 1, 128 128 1, 128 150 1, 128 246 0, 201 297 1, 241 324 1, 320 377 0, 320 435 1, 320 512 0, 215 512 1, 150 512 0, 64 500 1, 64 568 1, 145 576 0, 213 576 1, 287 576 0, 330 550 1, 384 515 0, 384 441 1, 384 366 0, 301 319 1, 266 299 1, 222 275 0, 207 248 1, 192 222 0, 192 173 1, 192 128 1
-768 64 0 704 576;470 17 1, 394 0 0, 325 0 1, 213 0 0, 138 64 1, 64 129 0, 64 229 1, 64 365 0, 177 471 1, 291 576 0, 439 576 1, 553 576 0, 628 510 1, 704 444 0, 704 346 1, 704 255 0, 647 191 1, 591 128 0, 511 128 1, 448 128 0, 448 167 1, 448 180 0, 451 202 1, 458 245 1, 453 245 1, 424 192 0, 398 166 1, 361 128 0, 320 128 1, 256 128 0, 256 210 1, 256 301 0, 312 374 1, 368 448 0, 439 448 1, 447 448 0, 461 448 1, 465 448 0, 469 448 1, 483 448 0, 492 448 1, 543 448 1, 513 235 1, 512 225 0, 512 215 1, 512 192 0, 536 192 1, 576 192 0, 608 237 1, 640 283 0, 640 341 1, 640 415 0, 581 463 1, 521 512 0, 430 512 1, 312 512 0, 220 428 1, 128 344 0, 128 238 1, 128 160 0, 188 112 1, 247 64 0, 339 64 1, 398 64 0, 456 56 1, 462 318 1, 477 393 1, 447 384 0, 426 384 1, 380 384 0, 350 341 1, 320 298 0, 320 237 1, 320 192 0, 345 192 1, 387 192 0
-512 0 0 512 576;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1
-512 64 0 448 576;64 0 1, 64 576 1, 227 576 1, 348 576 0, 398 546 1, 448 516 0, 448 443 1, 448 377 0, 396 336 1, 364 311 0, 304 292 1, 369 272 0, 401 244 1, 448 204 0, 448 140 1, 448 80 0, 410 41 1, 383 13 0, 340 6 1, 305 0 0, 247 0 1, 128 64 1, 186 64 1, 308 64 0, 346 80 1, 384 95 0, 384 144 1, 384 199 0, 335 227 1, 285 256 0, 192 256 1, 128 256 1, 128 320 1, 195 320 1, 384 320 0, 384 430 1, 384 486 0, 330 501 1, 288 512 0, 201 512 1, 128 512 1
-576 64 0 512 576;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1
-576 64 0 512 576;64 0 1, 64 576 1, 227 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 364 0 0, 228 0 1, 128 64 1, 223 64 1, 448 64 0, 448 292 1, 448 426 0, 360 481 1, 335 497 0, 299 504 1, 257 512 0, 186 512 1, 128 512 1
-512 64 0 512 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1
-448 64 0 448 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 384 320 1, 384 256 1, 128 256 1, 128 0 1
-576 64 0 512 576;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1
-576 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 320 1, 448 320 1, 448 576 1, 512 576 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1
-192 64 0 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1
-384 0 -128 320 576;0 -87 1, 0 -19 1, 75 -64 0, 141 -64 1, 216 -64 0, 238 -29 1, 256 0 0, 256 71 1, 256 576 1, 320 576 1, 320 73 1, 320 -128 0, 125 -128 1, 60 -128 0
-512 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 293 1, 359 576 1, 438 576 1, 214 301 1, 476 0 1, 377 0 1, 128 292 1, 128 0 1
-448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1
-640 64 0 576 576;64 0 1, 64 576 1, 170 576 1, 327 151 1, 487 576 1, 576 576 1, 576 0 1, 512 0 1, 512 473 1, 357 64 1, 279 64 1, 128 475 1, 128 0 1
-576 64 0 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1
-576 64 0 576 576;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0
-512 64 0 512 576;64 0 1, 64 576 1, 267 576 1, 365 576 0, 408 565 1, 451 553 0, 478 520 1, 512 479 0, 512 408 1, 512 192 0, 244 192 1, 128 192 1, 128 0 1, 128 256 1, 240 256 1, 448 256 0, 448 402 1, 448 473 0, 394 494 1, 348 512 0, 242 512 1, 128 512 1
-576 64 -128 640 576;615 -48 1, 565 -111 1, 434 -68 0, 346 -10 1, 311 0 0, 293 0 1, 193 0 0, 128 81 1, 64 161 0, 64 289 1, 64 419 0, 133 497 1, 203 576 0, 319 576 1, 436 576 0, 506 495 1, 576 415 0, 576 280 1, 576 162 0, 517 87 1, 494 58 0, 464 38 1, 449 27 0, 418 11 1, 510 -30 0, 318 512 1, 229 512 0, 179 452 1, 128 393 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 409 64 0, 460 123 1, 512 181 0, 512 286 1, 512 383 0, 471 441 1, 420 512 0
-576 64 0 576 576;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1
-512 64 0 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0
-448 0 0 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1
-576 64 0 512 576;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1
-512 0 0 512 576;228 0 1, 14 576 1, 95 576 1, 272 103 1, 441 576 1, 508 576 1, 302 0 1
-704 0 0 768 576;152 0 1, 9 576 1, 85 576 1, 199 121 1, 329 576 1, 405 576 1, 530 125 1, 651 576 1, 716 576 1, 560 0 1, 482 0 1, 358 444 1, 230 0 1
-512 0 0 512 576;11 0 1, 215 286 1, 20 576 1, 113 576 1, 263 352 1, 423 576 1, 498 576 1, 299 300 1, 502 0 1, 409 0 1, 251 233 1, 85 0 1
-512 -64 0 512 576;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1
-448 64 0 448 576;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1
-192 64 -128 192 576;64 -128 1, 64 576 1, 192 576 1, 192 512 1, 128 512 1, 128 -64 1, 192 -64 1, 192 -128 1
-192 -64 -128 256 576;236 -128 1, 178 -128 1, -22 576 1, 36 576 1
-192 0 -128 128 576;128 576 1, 128 -128 1, 0 -128 1, 0 -64 1, 64 -64 1, 64 512 1, 0 512 1, 0 576 1
-384 0 192 384 576;180 401 1, 75 192 1, 14 192 1, 180 525 1, 347 192 1, 284 192 1
-448 0 -64 448 0;0 -64 1, 0 0 1, 448 0 1, 448 -64 1
-256 0 512 256 576;216 512 1, 160 512 1, 40 576 1, 125 576 1
-448 0 0 448 384;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0
-448 64 -64 384 576;128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0, 128 312 1, 148 344 0, 171 361 1, 204 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 64 -5 1, 64 576 1, 128 576 1
-384 0 0 320 384;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1
-448 64 0 384 576;320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 576 1, 384 576 1, 384 0 1, 320 0 1
-448 64 0 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0
-192 0 0 256 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 433 1, 64 576 0, 194 576 1, 221 576 0, 256 569 1, 256 510 1, 219 512 0, 193 512 1, 157 512 0, 142 496 1, 128 481 0, 128 441 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
-448 64 -192 384 384;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1
-448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
-192 64 0 128 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1
-192 -64 -192 128 576;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1
-384 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1
-192 64 0 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1
-640 64 0 576 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 156 353 0, 173 368 1, 194 384 0, 227 384 1, 268 384 0, 294 357 1, 309 342 0, 320 312 1, 357 354 0, 380 368 1, 408 384 0, 453 384 1, 576 384 0, 576 279 1, 576 0 1, 493 0 1, 493 257 1, 493 320 0, 432 320 1, 378 320 0, 320 257 1, 320 0 1, 256 0 1, 256 268 1, 256 320 0, 211 320 1, 171 320 0, 128 257 1, 128 0 1
-448 64 0 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
-448 64 0 384 384;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0
-448 64 -128 384 384;128 -128 1, 64 -128 1, 64 384 1, 128 384 1, 128 312 1, 148 344 0, 171 361 1, 203 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0
-448 64 -128 384 384;320 384 1, 384 384 1, 384 -128 1, 320 -128 1, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0
-256 64 0 256 448;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1
-384 64 0 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0
-192 0 -64 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1
-448 64 0 384 384;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1
-384 0 0 384 384;152 0 1, 7 384 1, 82 384 1, 195 85 1, 314 384 1, 380 384 1, 225 0 1
-576 0 0 576 384;102 0 1, 4 384 1, 77 384 1, 150 95 1, 244 384 1, 318 384 1, 400 94 1, 486 384 1, 549 384 1, 435 0 1, 361 0 1, 275 297 1, 177 0 1
-384 0 0 384 384;11 0 1, 143 203 1, 15 384 1, 101 384 1, 203 240 1, 294 384 1, 362 384 1, 238 191 1, 372 0 1, 287 0 1, 177 154 1, 79 0 1
-384 0 -128 384 384;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1
-384 0 0 384 384;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1
-256 0 -128 192 640;0 269 1, 22 269 1, 64 269 0, 64 330 1, 64 354 0, 64 382 1, 64 414 1, 64 447 0, 64 476 1, 64 537 0, 109 569 1, 141 591 0, 192 592 1, 192 537 1, 173 537 1, 153 537 0, 141 524 1, 128 510 0, 128 490 1, 128 483 0, 128 455 1, 128 417 1, 128 391 0, 128 361 1, 128 290 0, 80 241 1, 128 192 0, 128 120 1, 128 90 0, 128 65 1, 128 26 1, 128 -1 0, 128 -9 1, 128 -29 0, 141 -43 1, 154 -56 0, 173 -56 1, 192 -56 1, 192 -111 1, 139 -110 0, 106 -85 1, 64 -52 0, 64 6 1, 64 35 0, 64 67 1, 64 100 1, 64 127 0, 64 152 1, 64 213 0, 22 213 1, 0 213 1
-192 64 -128 128 576;64 -128 1, 64 576 1, 128 576 1, 128 -128 1
-256 64 -128 256 640;256 213 1, 234 213 1, 192 213 0, 192 152 1, 192 124 0, 192 100 1, 192 67 1, 192 36 0, 192 6 1, 192 -55 0, 146 -88 1, 114 -110 0, 64 -111 1, 64 -56 1, 82 -56 1, 102 -56 0, 115 -43 1, 128 -29 0, 128 -9 1, 128 1 0, 128 26 1, 128 65 1, 128 88 0, 128 120 1, 128 192 0, 176 241 1, 154 263 0, 144 285 1, 128 318 0, 128 361 1, 128 393 0, 128 417 1, 128 455 1, 128 480 0, 128 491 1, 128 510 0, 115 524 1, 102 537 0, 82 537 1, 64 537 1, 64 592 1, 117 591 0, 150 566 1, 192 534 0, 192 475 1, 192 445 0, 192 414 1, 192 382 1, 192 357 0, 192 329 1, 192 269 0, 234 269 1, 256 269 1
-448 0 192 448 256;95 192 1, 39 192 1, 40 213 0, 47 223 1, 69 256 0, 139 256 1, 176 256 0, 214 256 1, 256 256 1, 280 256 1, 291 256 0, 309 256 1, 352 256 0, 354 256 1, 409 256 1, 408 235 0, 401 225 1, 379 192 0, 310 192 1, 273 192 0, 235 192 1, 193 192 1, 168 192 1, 158 192 0, 140 192 1, 96 192 0
-512 -64 0 576 640;-15 0 1, 196 576 1, 316 576 1, 524 0 1, 439 0 1, 381 128 1, 116 128 1, 58 0 1, 138 192 1, 360 192 1, 246 458 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
-512 0 0 512 768;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 256 768 1, 283 768 0, 301 740 1, 320 712 0, 320 672 1, 320 632 0, 301 604 1, 282 576 0, 255 576 1, 232 576 0, 215 599 1, 192 628 0, 192 672 1, 192 712 0, 211 740 1, 229 768 0, 256 704 1, 256 704 0, 256 695 1, 256 686 0, 256 672 1, 256 659 0, 256 650 1, 256 640 0, 256 640 1, 256 640 0, 256 648 1, 256 657 0, 256 672 1, 256 686 0, 256 695 1, 256 704 0
-576 64 -192 512 576;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 293 0 1, 330 0 1, 307 -41 1, 336 -42 0, 356 -59 1, 384 -82 0, 384 -116 1, 384 -148 0, 361 -170 1, 338 -192 0, 306 -192 1, 280 -192 0, 250 -154 1, 250 -124 1, 267 -128 0, 285 -128 1, 320 -128 0, 320 -101 1, 320 -67 0, 258 -66 1
-512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 211 576 1, 311 704 1, 407 704 1, 273 576 1
-576 64 0 512 768;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 163 623 1, 166 656 0, 176 673 1, 195 704 0, 239 704 1, 268 704 0, 293 704 1, 318 704 1, 341 704 0, 353 704 1, 380 704 0, 384 710 1, 434 710 1, 431 682 0, 421 667 1, 403 640 0, 359 640 1, 329 640 0, 304 640 1, 279 640 1, 257 640 0, 244 640 1, 217 640 0, 213 623 1
-576 64 0 512 640;288 576 1, 389 576 0, 451 498 1, 512 419 0, 512 289 1, 512 156 0, 451 78 1, 389 0 0, 285 0 1, 195 0 0, 137 64 1, 64 145 0, 64 288 1, 64 420 0, 125 498 1, 186 576 0, 288 512 1, 212 512 0, 170 453 1, 128 394 0, 128 288 1, 128 183 0, 170 124 1, 212 64 0, 286 64 1, 355 64 0, 397 112 1, 448 171 0, 448 289 1, 448 394 0, 406 453 1, 363 512 0, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
-576 64 0 512 640;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
-448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
-448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
-448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
-448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 192 640 1, 219 640 0, 237 621 1, 256 603 0, 256 576 1, 256 549 0, 237 531 1, 219 512 0, 191 512 1, 168 512 0, 151 527 1, 128 547 0, 128 576 1, 128 603 0, 147 621 1, 165 640 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0
-384 0 -192 320 384;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 235 0 1, 271 0 1, 248 -41 1, 275 -42 0, 294 -59 1, 320 -82 0, 320 -116 1, 320 -148 0, 298 -170 1, 277 -192 0, 244 -192 1, 219 -192 0, 191 -154 1, 191 -124 1, 207 -128 0, 224 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 199 -66 1
-448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
-448 0 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
-448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-192 0 0 256 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 40 512 1, 131 576 1, 216 576 1, 96 512 1
-192 -64 0 192 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 152 512 1, 96 512 1, -24 576 1, 61 576 1
-192 -128 0 256 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, -67 512 1, 23 576 1, 105 576 1, 195 512 1, 140 512 1, 64 552 1, 64 552 1, -12 512 1
-192 0 0 192 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 0 512 1, 0 576 1, 64 576 1, 64 512 1, 128 512 1, 128 576 1, 192 576 1, 192 512 1
-448 64 0 384 640;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
-448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
-448 0 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
-448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-448 64 0 384 640;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
-448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 280 512 1, 224 512 1, 104 576 1, 189 576 1
-448 0 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
-448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-448 64 -128 384 576;186 -128 1, 196 327 1, 64 317 1, 64 375 1, 196 365 1, 186 576 1, 262 576 1, 252 365 1, 384 375 1, 384 317 1, 252 327 1, 262 -128 1
-320 64 384 256 576;160 576 1, 199 576 0, 228 548 1, 256 520 0, 256 480 1, 256 440 0, 228 412 1, 199 384 0, 159 384 1, 124 384 0, 98 407 1, 64 437 0, 64 480 1, 64 520 0, 92 548 1, 121 576 0, 160 512 1, 147 512 0, 137 503 1, 128 493 0, 128 480 1, 128 467 0, 137 457 1, 147 448 0, 160 448 1, 172 448 0, 181 456 1, 192 465 0, 192 480 1, 192 493 0, 183 503 1, 173 512 0
-448 0 0 384 576;192 0 1, 192 65 1, 113 74 0, 65 120 1, 0 181 0, 0 278 1, 0 379 0, 66 436 1, 112 475 0, 192 486 1, 192 555 1, 256 555 1, 256 486 1, 316 484 0, 384 468 1, 384 406 1, 304 428 0, 256 432 1, 256 117 1, 317 117 0, 384 143 1, 384 87 1, 317 65 0, 256 65 1, 256 0 1, 192 429 1, 161 426 0, 145 420 1, 64 390 0, 64 277 1, 64 199 0, 112 159 1, 140 136 0, 192 122 1
-448 64 0 384 640;64 0 1, 64 64 1, 128 88 0, 128 176 1, 128 256 1, 64 256 1, 64 320 1, 128 320 1, 128 410 1, 128 491 0, 170 533 1, 211 576 0, 291 576 1, 333 576 0, 384 579 1, 384 510 1, 325 512 0, 277 512 1, 192 512 0, 192 434 1, 192 320 1, 256 320 1, 256 256 1, 192 256 1, 192 211 1, 192 147 0, 176 116 1, 164 89 0, 136 64 1, 384 64 1, 384 0 1
-448 64 -128 384 576;64 -77 1, 64 -9 1, 155 -64 0, 214 -64 1, 260 -64 0, 290 -45 1, 320 -25 0, 320 7 1, 320 36 0, 298 52 1, 279 66 0, 235 86 1, 170 116 1, 64 164 0, 64 247 1, 64 303 0, 123 363 1, 64 398 0, 64 449 1, 64 506 0, 115 541 1, 166 576 0, 249 576 1, 306 576 0, 384 572 1, 384 512 1, 301 512 0, 245 512 1, 192 512 0, 160 494 1, 128 476 0, 128 447 1, 128 409 0, 194 383 1, 246 364 1, 324 334 0, 354 306 1, 384 278 0, 384 236 1, 384 186 0, 342 125 1, 384 83 0, 384 14 1, 384 -51 0, 335 -89 1, 287 -128 0, 207 -128 1, 151 -128 0, 304 149 1, 320 187 0, 320 221 1, 320 249 0, 303 266 1, 285 284 0, 241 303 1, 161 338 1, 128 302 0, 128 270 1, 128 219 0, 220 183 1
-256 0 192 192 384;96 384 1, 136 384 0, 164 356 1, 192 327 0, 192 287 1, 192 248 0, 164 220 1, 135 192 0, 94 192 1, 60 192 0, 34 215 1, 0 245 0, 0 288 1, 0 328 0, 28 356 1, 56 384 0
-384 64 -128 320 576;192 -111 1, 192 280 1, 136 287 0, 105 321 1, 64 366 0, 64 446 1, 64 516 0, 93 546 1, 123 576 0, 192 576 1, 320 576 1, 320 -111 1, 256 -111 1, 256 512 1, 256 512 1, 256 -111 1
-448 64 0 448 576;64 0 1, 64 432 1, 64 513 0, 100 545 1, 138 576 0, 232 576 1, 384 576 0, 384 480 1, 384 434 0, 313 385 1, 256 345 0, 256 327 1, 256 303 0, 302 274 1, 377 225 1, 448 180 0, 448 113 1, 448 0 0, 306 0 1, 244 0 0, 192 11 1, 192 76 1, 265 64 0, 310 64 1, 384 64 0, 384 115 1, 384 149 0, 336 179 1, 246 234 1, 192 267 0, 192 305 1, 192 337 0, 261 387 1, 320 430 0, 320 459 1, 320 512 0, 227 512 1, 172 512 0, 150 501 1, 128 490 0, 128 463 1, 128 0 1
-576 0 0 576 576;288 576 1, 407 576 0, 492 492 1, 576 407 0, 576 288 1, 576 168 0, 491 84 1, 407 0 0, 284 0 1, 180 0 0, 102 68 1, 0 157 0, 0 288 1, 0 407 0, 84 492 1, 169 576 0, 288 512 1, 196 512 0, 130 446 1, 64 380 0, 64 288 1, 64 197 0, 129 130 1, 195 64 0, 285 64 1, 370 64 0, 432 117 1, 512 185 0, 512 288 1, 512 381 0, 446 446 1, 380 512 0, 192 128 1, 192 448 1, 302 448 1, 384 448 0, 384 370 1, 384 315 0, 340 277 1, 431 128 1, 375 128 1, 294 262 1, 256 262 1, 256 128 1, 256 301 1, 267 301 1, 320 301 0, 320 363 1, 320 415 0, 280 415 1, 256 415 1
-576 0 0 576 576;288 576 1, 407 576 0, 492 492 1, 576 407 0, 576 288 1, 576 168 0, 491 84 1, 407 0 0, 284 0 1, 180 0 0, 102 68 1, 0 157 0, 0 288 1, 0 407 0, 84 492 1, 169 576 0, 288 512 1, 196 512 0, 130 446 1, 64 380 0, 64 288 1, 64 197 0, 129 130 1, 195 64 0, 285 64 1, 370 64 0, 432 117 1, 512 185 0, 512 288 1, 512 381 0, 446 446 1, 380 512 0, 384 142 1, 330 128 0, 288 128 1, 218 128 0, 173 173 1, 128 217 0, 128 288 1, 128 360 0, 172 404 1, 216 448 0, 291 448 1, 329 448 0, 375 441 1, 384 439 1, 384 393 1, 335 384 0, 297 384 1, 250 384 0, 221 357 1, 192 330 0, 192 287 1, 192 243 0, 222 218 1, 252 192 0, 303 192 1, 342 192 0, 384 188 1
-768 64 256 640 576;192 256 1, 192 512 1, 99 512 1, 99 576 1, 341 576 1, 341 512 1, 256 512 1, 256 256 1, 384 256 1, 384 576 1, 476 576 1, 521 372 1, 564 576 1, 640 576 1, 640 256 1, 576 256 1, 576 474 1, 529 279 1, 495 279 1, 448 454 1, 448 256 1
-256 0 512 256 576;40 512 1, 131 576 1, 216 576 1, 96 512 1
-256 0 512 256 576;0 512 1, 0 576 1, 64 576 1, 64 512 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
-192 0 0 0 0;
-768 0 0 768 576;227 192 1, 384 192 1, 384 473 1, 10 0 1, 363 576 1, 704 576 1, 704 512 1, 448 512 1, 448 320 1, 704 320 1, 704 256 1, 448 256 1, 448 64 1, 768 64 1, 768 0 1, 384 0 1, 384 128 1, 190 128 1, 92 0 1
-576 0 0 576 576;39 0 1, 104 65 1, 86 104 0, 77 144 1, 64 203 0, 64 279 1, 64 414 0, 131 495 1, 198 576 0, 309 576 1, 394 576 0, 459 529 1, 498 576 1, 563 576 1, 496 484 1, 531 447 0, 550 409 1, 576 353 0, 576 283 1, 576 154 0, 502 77 1, 428 0 0, 304 0 1, 213 0 0, 142 32 1, 104 0 1, 184 83 1, 238 64 0, 312 64 1, 406 64 0, 459 119 1, 512 174 0, 512 273 1, 512 351 0, 448 405 1, 416 459 1, 367 512 0, 302 512 1, 220 512 0, 174 449 1, 128 387 0, 128 275 1, 128 184 0, 152 122 1
-192 0 0 0 0;
-448 64 0 384 448;192 128 1, 192 256 1, 64 256 1, 64 320 1, 192 320 1, 192 448 1, 256 448 1, 256 320 1, 384 320 1, 384 256 1, 256 256 1, 256 128 1, 64 0 1, 64 64 1, 384 64 1, 384 0 1
-192 0 0 0 0;
-192 0 0 0 0;
-448 0 0 448 576;192 0 1, 192 128 1, 81 128 1, 81 192 1, 192 192 1, 192 192 1, 81 192 1, 81 256 1, 192 256 1, 31 576 1, 117 576 1, 232 335 1, 232 335 1, 350 576 1, 416 576 1, 256 256 1, 367 256 1, 367 192 1, 256 192 1, 256 192 1, 367 192 1, 367 128 1, 256 128 1, 256 0 1
-448 64 -128 384 384;64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 320 0 1, 320 72 1, 252 0 0, 184 0 1, 156 0 0, 128 9 1, 128 -128 1, 64 -128 1
-192 0 0 0 0;
-192 0 0 0 0;
-192 0 0 0 0;
-192 0 0 0 0;
-192 0 0 0 0;
-256 64 320 320 576;196 364 1, 162 320 0, 129 320 1, 100 320 0, 82 341 1, 64 363 0, 64 394 1, 64 485 0, 174 485 1, 192 485 1, 192 511 1, 192 512 0, 147 512 1, 110 512 0, 68 530 1, 68 572 1, 118 576 0, 161 576 1, 256 576 0, 256 513 1, 256 401 1, 256 383 0, 276 384 1, 279 384 1, 280 384 0, 282 384 1, 284 384 0, 286 368 1, 289 336 1, 268 320 0, 250 320 1, 209 320 0, 198 364 1, 192 395 1, 192 452 1, 178 452 1, 128 452 0, 128 413 1, 128 384 0, 154 384 1, 172 384 0
-256 0 320 256 576;128 576 1, 187 576 0, 222 542 1, 256 507 0, 256 449 1, 256 389 0, 222 354 1, 187 320 0, 127 320 1, 74 320 0, 41 348 1, 0 384 0, 0 448 1, 0 507 0, 35 541 1, 69 576 0, 128 512 1, 64 512 0, 64 448 1, 64 384 0, 128 384 1, 192 384 0, 192 449 1, 192 512 0
-192 0 0 0 0;
-704 0 0 704 384;320 92 1, 320 198 1, 290 199 1, 263 200 0, 233 196 1, 128 183 0, 128 121 1, 128 64 0, 208 64 1, 264 64 0, 371 353 1, 423 384 0, 489 384 1, 642 384 0, 642 218 1, 642 192 1, 387 192 1, 391 153 0, 400 133 1, 431 64 0, 526 64 1, 578 64 0, 640 72 1, 640 13 1, 569 0 0, 510 0 1, 444 0 0, 399 29 1, 374 45 0, 351 77 1, 298 36 0, 260 19 1, 215 0 0, 153 0 1, 84 0 0, 42 30 1, 0 61 0, 0 110 1, 0 248 0, 300 248 1, 320 248 1, 320 290 1, 320 307 0, 298 313 1, 277 320 0, 223 320 1, 147 320 0, 64 318 1, 64 367 1, 151 384 0, 230 384 1, 325 384 0, 390 256 1, 574 256 1, 573 276 0, 567 287 1, 549 320 0, 487 320 1, 444 320 0, 419 305 1, 396 290 0
-448 0 0 448 448;131 21 1, 108 0 1, 54 0 1, 99 50 1, 64 108 0, 64 189 1, 64 280 0, 111 332 1, 158 384 0, 240 384 1, 298 384 0, 339 363 1, 362 448 1, 416 448 1, 371 334 1, 448 276 0, 448 196 1, 448 105 0, 394 53 1, 340 0 0, 246 0 1, 180 0 0, 169 71 1, 170 71 1, 190 67 0, 207 66 1, 229 64 0, 253 64 1, 384 64 0, 384 200 1, 384 241 0, 325 275 1, 301 313 1, 300 313 1, 271 320 0, 233 320 1, 128 320 0, 128 186 1, 128 140 0, 145 109 1
-448 64 -192 384 384;320 384 1, 320 320 1, 256 320 1, 256 384 1, 320 256 1, 320 236 1, 320 139 0, 247 89 1, 207 62 1, 128 7 0, 128 -50 1, 128 -128 0, 234 -128 1, 298 -128 0, 384 -78 1, 384 -141 1, 304 -192 0, 236 -192 1, 161 -192 0, 118 -165 1, 64 -131 0, 64 -55 1, 64 21 0, 147 68 1, 182 88 1, 226 113 0, 241 139 1, 256 166 0, 256 215 1, 256 256 1
-256 64 -128 128 384;128 384 1, 128 320 1, 64 320 1, 64 384 1, 120 256 1, 128 -32 1, 128 -128 1, 64 -128 1, 64 -32 1, 72 256 1
-448 64 128 384 320;64 256 1, 64 320 1, 384 320 1, 384 128 1, 320 128 1, 320 256 1
-192 0 0 0 0;
-448 0 -128 448 640;51 -128 1, 118 256 1, 64 256 1, 64 320 1, 128 320 1, 135 361 1, 174 576 0, 310 576 1, 346 576 0, 389 579 1, 378 515 1, 339 512 0, 307 512 1, 230 512 0, 208 394 1, 194 320 1, 256 320 1, 256 256 1, 184 256 1, 118 -128 1
-192 0 0 0 0;
-192 0 0 0 0;
-448 0 0 384 384;376 342 1, 265 204 1, 376 65 1, 339 37 1, 191 204 1, 339 370 1, 228 342 1, 117 204 1, 228 65 1, 191 37 1, 43 204 1, 191 370 1
-448 0 0 384 384;51 65 1, 162 204 1, 51 342 1, 88 370 1, 236 204 1, 88 37 1, 199 65 1, 310 204 1, 199 342 1, 236 370 1, 384 204 1, 236 37 1
-768 64 0 704 64;64 0 1, 64 64 1, 128 64 1, 128 0 1, 320 0 1, 320 64 1, 384 64 1, 384 0 1, 640 0 1, 640 64 1, 704 64 1, 704 0 1
-448 0 0 0 0;
-512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 312 576 1, 257 576 1, 137 704 1, 222 704 1
-512 0 0 512 768;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 132 623 1, 135 655 0, 144 673 1, 161 704 0, 202 704 1, 229 704 0, 252 704 1, 275 704 1, 296 704 0, 307 704 1, 332 704 0, 336 710 1, 382 710 1, 379 682 0, 370 667 1, 353 640 0, 312 640 1, 285 640 0, 262 640 1, 239 640 1, 219 640 0, 207 640 1, 182 640 0, 178 623 1
-576 64 0 576 768;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 174 623 1, 177 655 0, 186 673 1, 203 704 0, 244 704 1, 271 704 0, 294 704 1, 316 704 1, 337 704 0, 349 704 1, 373 704 0, 377 710 1, 423 710 1, 420 682 0, 411 667 1, 394 640 0, 354 640 1, 327 640 0, 303 640 1, 281 640 1, 260 640 0, 248 640 1, 224 640 0, 220 623 1
-768 64 0 768 576;448 0 1, 448 24 1, 387 0 0, 317 0 1, 203 0 0, 134 79 1, 64 159 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 576 1, 388 576 0, 448 553 1, 448 576 1, 704 576 1, 704 512 1, 512 512 1, 512 320 1, 704 320 1, 704 256 1, 512 256 1, 512 64 1, 768 64 1, 768 0 1, 448 212 1, 448 345 1, 448 433 0, 416 472 1, 384 512 0, 314 512 1, 226 512 0, 177 453 1, 128 394 0, 128 288 1, 128 182 0, 177 123 1, 227 64 0, 314 64 1, 448 64 0
-704 64 0 704 384;396 332 1, 420 355 0, 447 367 1, 486 384 0, 540 384 1, 637 384 0, 675 325 1, 703 282 0, 704 192 1, 437 192 1, 444 129 0, 471 100 1, 506 64 0, 585 64 1, 643 64 0, 704 73 1, 704 14 1, 632 0 0, 566 0 1, 499 0 0, 459 19 1, 429 33 0, 398 65 1, 376 36 0, 349 22 1, 310 0 0, 255 0 1, 168 0 0, 116 52 1, 64 104 0, 64 192 1, 64 281 0, 116 332 1, 168 384 0, 256 384 1, 313 384 0, 353 364 1, 375 353 0, 261 320 1, 128 320 0, 128 193 1, 128 138 0, 154 106 1, 187 64 0, 262 64 1, 384 64 0, 384 192 1, 384 251 0, 359 283 1, 329 320 0, 439 256 1, 625 256 1, 624 282 0, 612 296 1, 592 320 0, 539 320 1, 487 320 0, 462 299 1, 445 284 0
-448 0 192 448 256;38 192 1, 38 256 1, 390 256 1, 390 192 1
-768 0 192 768 256;37 192 1, 37 256 1, 731 256 1, 731 192 1
-256 0 384 256 640;256 578 1, 256 551 1, 233 537 0, 233 467 1, 233 458 1, 256 458 1, 256 384 1, 192 384 1, 192 446 1, 192 559 0, 64 578 1, 64 551 1, 41 537 0, 41 467 1, 41 458 1, 64 458 1, 64 384 1, 0 384 1, 0 446 1, 0 559 0
-256 0 320 256 576;0 382 1, 0 409 1, 23 423 0, 23 493 1, 23 502 1, 0 502 1, 0 576 1, 64 576 1, 64 514 1, 64 401 0, 192 382 1, 192 409 1, 215 423 0, 215 493 1, 215 502 1, 192 502 1, 192 576 1, 256 576 1, 256 514 1, 256 401 0
-192 64 384 128 640;128 597 1, 128 569 1, 103 559 0, 103 484 1, 103 476 1, 128 476 1, 128 384 1, 64 384 1, 64 464 1, 64 586 0
-192 64 320 128 576;64 363 1, 64 391 1, 89 401 0, 89 476 1, 89 483 1, 64 483 1, 64 576 1, 128 576 1, 128 496 1, 128 372 0
-448 64 0 384 448;64 192 1, 64 256 1, 384 256 1, 384 192 1, 192 384 1, 192 448 1, 256 448 1, 256 384 1, 192 0 1, 192 64 1, 256 64 1, 256 0 1
-192 0 0 0 0;
-384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-512 -64 0 576 640;192 0 1, 192 240 1, -19 576 1, 71 576 1, 227 309 1, 441 576 1, 514 576 1, 256 242 1, 256 0 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
-128 -192 -64 320 576;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
-448 0 64 384 448;137 145 1, 78 87 1, 46 120 1, 104 178 1, 64 217 0, 64 255 1, 64 292 0, 104 331 1, 46 390 1, 78 423 1, 137 364 1, 174 384 0, 214 384 1, 253 384 0, 290 364 1, 348 423 1, 381 390 1, 323 331 1, 320 292 0, 320 255 1, 320 217 0, 323 178 1, 381 120 1, 348 87 1, 290 145 1, 253 128 0, 214 128 1, 174 128 0, 192 320 1, 165 320 0, 146 302 1, 128 283 0, 128 256 1, 128 229 0, 146 211 1, 165 192 0, 191 192 1, 216 192 0, 233 207 1, 256 226 0, 256 256 1, 256 283 0, 238 302 1, 219 320 0
-256 0 0 256 384;213 342 1, 102 204 1, 213 65 1, 176 37 1, 28 204 1, 176 370 1
-256 0 0 256 384;43 65 1, 154 204 1, 43 342 1, 80 370 1, 228 204 1, 80 37 1
-384 0 0 320 640;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 64 640 0, 194 640 1, 221 640 0, 256 613 1, 256 557 1, 219 576 0, 193 576 1, 157 576 0, 142 555 1, 128 534 0, 128 482 1, 128 384 1, 320 384 1, 320 0 1, 256 0 1, 256 320 1, 128 320 1, 128 0 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-384 0 0 320 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 435 1, 64 576 0, 175 576 1, 256 576 1, 320 576 1, 320 0 1, 256 0 1, 256 518 1, 240 516 1, 206 512 0, 183 512 1, 148 512 0, 137 493 1, 128 477 0, 128 443 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
-448 64 -128 384 576;183 -128 1, 192 97 1, 64 86 1, 64 144 1, 192 134 1, 192 327 1, 64 317 1, 64 375 1, 192 365 1, 183 576 1, 265 576 1, 256 365 1, 384 375 1, 384 317 1, 256 327 1, 256 134 1, 384 144 1, 384 86 1, 256 97 1, 265 -128 1
-192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
-192 64 -192 128 64;64 -140 1, 64 -112 1, 89 -102 0, 89 -36 1, 89 -29 1, 64 -29 1, 64 64 1, 128 64 1, 128 -16 1, 128 -130 0
-256 0 -192 256 64;0 -130 1, 0 -103 1, 23 -89 0, 23 -19 1, 23 -10 1, 0 -10 1, 0 64 1, 64 64 1, 64 2 1, 64 -111 0, 192 -130 1, 192 -103 1, 215 -89 0, 215 -19 1, 215 -10 1, 192 -10 1, 192 64 1, 256 64 1, 256 2 1, 256 -111 0
-768 0 -64 768 640;128 576 1, 186 576 0, 221 541 1, 256 507 0, 256 448 1, 256 388 0, 221 354 1, 187 320 0, 126 320 1, 75 320 0, 42 348 1, 0 384 0, 0 448 1, 0 507 0, 35 541 1, 70 576 0, 127 512 1, 64 512 0, 64 448 1, 64 384 0, 128 384 1, 192 384 0, 192 448 1, 192 477 0, 175 495 1, 157 512 0, 384 320 1, 443 320 0, 477 277 1, 512 234 0, 512 160 1, 512 86 0, 477 43 1, 443 0 0, 383 0 1, 330 0 0, 298 35 1, 256 80 0, 256 160 1, 256 234 0, 291 277 1, 326 320 0, 383 256 1, 320 256 0, 320 160 1, 320 64 0, 384 64 1, 448 64 0, 448 159 1, 448 204 0, 431 230 1, 413 256 0, 640 320 1, 699 320 0, 733 277 1, 768 234 0, 768 161 1, 768 86 0, 733 43 1, 698 0 0, 639 0 1, 587 0 0, 553 35 1, 512 80 0, 512 160 1, 512 234 0, 547 277 1, 581 320 0, 639 256 1, 576 256 0, 576 160 1, 576 64 0, 640 64 1, 704 64 0, 704 160 1, 704 204 0, 686 230 1, 669 256 0, 23 -14 1, 431 590 1, 482 590 1, 74 -14 1
-512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 126 576 1, 216 704 1, 298 704 1, 388 576 1, 333 576 1, 257 657 1, 257 657 1, 181 576 1
-512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 127 576 1, 228 704 1, 319 704 1, 420 576 1, 358 576 1, 274 657 1, 273 657 1, 189 576 1
-512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 201 576 1, 292 704 1, 377 704 1, 257 576 1
-512 64 0 512 640;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
-512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 334 576 1, 273 576 1, 138 704 1, 234 704 1
-192 0 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 48 576 1, 124 704 1, 209 704 1, 96 576 1
-192 -64 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, -28 576 1, 62 704 1, 130 704 1, 220 576 1, 164 576 1, 96 657 1, 96 657 1, 28 576 1
-192 0 0 192 640;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 576 1, 0 640 1, 64 640 1, 64 576 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1
-192 -64 0 192 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 144 576 1, 96 576 1, -17 704 1, 68 704 1
-576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 243 576 1, 333 704 1, 419 704 1, 299 576 1
-576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 167 576 1, 258 704 1, 339 704 1, 430 576 1, 374 576 1, 299 657 1, 298 657 1, 223 576 1
-448 -64 0 384 576;121 192 1, 136 142 0, 158 114 1, 198 64 0, 269 64 1, 316 64 0, 384 72 1, 384 10 1, 311 0 0, 260 0 1, 173 0 0, 119 46 1, 81 78 0, 62 132 1, 55 151 0, 46 192 1, -21 192 1, -2 256 1, 40 256 1, 39 280 1, 39 282 0, 39 288 1, 40 302 0, 41 320 1, -21 320 1, -2 384 1, 48 384 1, 63 444 0, 81 474 1, 140 576 0, 273 576 1, 320 576 0, 384 573 1, 384 502 1, 321 512 0, 273 512 1, 207 512 0, 168 469 1, 145 444 0, 133 413 1, 128 401 0, 123 384 1, 336 384 1, 316 320 1, 115 320 1, 113 296 0, 113 281 1, 114 256 1, 286 256 1, 267 192 1
-576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 354 576 1, 299 576 1, 178 704 1, 264 704 1
-576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 225 576 1, 328 704 1, 425 704 1, 288 576 1
-576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 139 576 1, 242 704 1, 334 704 1, 437 576 1, 374 576 1, 288 657 1, 288 657 1, 202 576 1
-576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 351 576 1, 288 576 1, 151 704 1, 248 704 1
-192 64 0 128 384;64 0 1, 64 384 1, 128 384 1, 128 0 1
-256 -64 512 320 576;-3 512 1, 87 576 1, 169 576 1, 259 512 1, 204 512 1, 128 552 1, 128 552 1, 52 512 1
-256 0 448 256 640;3 502 1, 6 531 0, 15 548 1, 32 576 0, 73 576 1, 100 576 0, 123 576 1, 146 576 1, 167 576 0, 178 576 1, 203 576 0, 207 590 1, 253 590 1, 250 559 0, 241 542 1, 224 512 0, 183 512 1, 156 512 0, 133 512 1, 110 512 1, 90 512 0, 78 512 1, 53 512 0, 49 502 1
-256 0 448 256 512;0 448 1, 0 512 1, 256 512 1, 256 448 1
-256 0 512 256 640;3 602 1, 49 602 1, 57 588 0, 77 582 1, 97 576 0, 128 576 1, 163 576 0, 184 583 1, 200 589 0, 207 602 1, 253 602 1, 247 564 0, 220 542 1, 184 512 0, 128 512 1, 69 512 0, 33 544 1, 9 566 0
-256 64 512 128 576;64 512 1, 64 576 1, 128 576 1, 128 512 1
-256 64 512 192 640;128 640 1, 155 640 0, 173 621 1, 192 603 0, 192 576 1, 192 549 0, 173 531 1, 155 512 0, 127 512 1, 104 512 0, 87 527 1, 64 547 0, 64 576 1, 64 603 0, 83 621 1, 101 640 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0
-256 0 -192 192 0;107 0 1, 143 0 1, 120 -41 1, 147 -42 0, 166 -59 1, 192 -82 0, 192 -116 1, 192 -148 0, 170 -170 1, 149 -192 0, 116 -192 1, 91 -192 0, 63 -154 1, 63 -124 1, 79 -128 0, 96 -128 1, 128 -128 0, 128 -101 1, 128 -67 0, 71 -66 1
-256 -64 448 320 576;-19 456 1, 71 576 1, 143 576 1, 23 456 1, 113 456 1, 203 576 1, 275 576 1, 155 456 1
-256 64 -128 192 0;123 0 1, 163 0 1, 128 -19 0, 128 -42 1, 128 -64 0, 164 -64 1, 180 -64 0, 192 -98 1, 192 -128 1, 169 -128 0, 140 -128 1, 64 -128 0, 64 -73 1, 64 -31 0
-256 -64 512 320 576;259 576 1, 169 512 1, 87 512 1, -3 576 1, 52 576 1, 128 536 1, 128 536 1, 204 576 1
-448 -64 0 384 576;121 192 1, 136 142 0, 158 114 1, 198 64 0, 269 64 1, 316 64 0, 384 72 1, 384 10 1, 311 0 0, 260 0 1, 173 0 0, 119 46 1, 81 78 0, 62 132 1, 55 151 0, 46 192 1, -21 192 1, -2 256 1, 40 256 1, 39 280 1, 39 282 0, 39 288 1, 40 302 0, 41 320 1, -21 320 1, -2 384 1, 48 384 1, 63 444 0, 81 474 1, 140 576 0, 273 576 1, 320 576 0, 384 573 1, 384 502 1, 321 512 0, 273 512 1, 207 512 0, 168 469 1, 145 444 0, 133 413 1, 128 401 0, 123 384 1, 336 384 1, 316 320 1, 115 320 1, 113 296 0, 113 281 1, 114 256 1, 286 256 1, 267 192 1
-192 0 0 0 0;
-192 64 -128 128 576;64 -128 1, 64 192 1, 128 192 1, 128 -128 1, 64 320 1, 64 576 1, 128 576 1, 128 320 1
-256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
-448 64 512 384 576;64 512 1, 64 576 1, 384 576 1, 384 512 1
-256 0 192 256 576;28 192 1, 28 256 1, 55 300 0, 101 338 1, 129 361 1, 192 412 0, 192 458 1, 192 512 0, 127 512 1, 89 512 0, 36 488 1, 36 532 1, 89 576 0, 138 576 1, 191 576 0, 224 548 1, 256 521 0, 256 477 1, 256 421 0, 179 359 1, 157 341 1, 102 296 0, 92 256 1, 238 256 1, 238 192 1
-256 0 192 256 576;32 507 1, 32 549 1, 68 576 0, 103 576 1, 192 576 0, 192 492 1, 192 454 0, 177 429 1, 168 414 0, 151 402 1, 212 388 0, 236 360 1, 256 336 0, 256 302 1, 256 251 0, 220 222 1, 184 192 0, 121 192 1, 79 192 0, 28 225 1, 28 270 1, 84 256 0, 117 256 1, 192 256 0, 192 314 1, 192 381 0, 78 381 1, 59 381 1, 59 416 1, 75 416 1, 128 416 0, 128 470 1, 128 512 0, 86 512 1, 62 512 0
-192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
-256 0 192 192 576;128 192 1, 128 477 1, 54 458 1, 54 501 1, 192 534 1, 192 192 1
-640 0 -64 640 576;128 192 1, 128 494 1, 54 475 1, 54 518 1, 192 551 1, 192 192 1, 512 -27 1, 512 64 1, 361 64 1, 361 126 1, 511 320 1, 576 320 1, 576 128 1, 622 128 1, 622 64 1, 576 64 1, 576 -27 1, 409 128 1, 512 128 1, 512 249 1, 82 -41 1, 495 556 1, 554 556 1, 134 -41 1
-640 0 -64 640 576;401 0 1, 401 64 1, 428 95 0, 479 125 1, 509 143 1, 576 181 0, 576 215 1, 576 256 0, 507 256 1, 467 256 0, 410 248 1, 410 291 1, 466 320 0, 516 320 1, 572 320 0, 606 298 1, 640 276 0, 640 241 1, 640 194 0, 559 146 1, 535 132 1, 476 96 0, 466 64 1, 612 64 1, 612 0 1, 63 -14 1, 480 539 1, 531 539 1, 114 -14 1, 128 192 1, 128 477 1, 54 458 1, 54 501 1, 192 534 1, 192 192 1
-640 0 -64 640 576;56 494 1, 56 536 1, 101 576 0, 145 576 1, 256 576 0, 256 486 1, 256 444 0, 227 418 1, 209 402 0, 175 389 1, 222 376 0, 241 349 1, 256 327 0, 256 295 1, 256 247 0, 224 220 1, 192 192 0, 135 192 1, 97 192 0, 52 215 1, 52 259 1, 100 256 0, 128 256 1, 192 256 0, 192 308 1, 192 368 0, 102 368 1, 83 368 1, 83 403 1, 99 403 1, 192 403 0, 192 465 1, 192 512 0, 133 512 1, 99 512 0, 512 -27 1, 512 64 1, 359 64 1, 359 126 1, 510 320 1, 576 320 1, 576 128 1, 623 128 1, 623 64 1, 576 64 1, 576 -27 1, 408 128 1, 512 128 1, 512 260 1, 117 -41 1, 528 556 1, 589 556 1, 167 -41 1
-576 0 0 512 576;64 0 1, 64 256 1, 0 256 1, 0 320 1, 64 320 1, 64 576 1, 229 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 365 0 0, 231 0 1, 128 64 1, 225 64 1, 448 64 0, 448 292 1, 448 426 0, 361 481 1, 336 497 0, 300 504 1, 258 512 0, 188 512 1, 128 512 1, 128 320 1, 256 320 1, 256 256 1, 128 256 1
-448 0 0 448 384;44 58 1, 185 199 1, 44 340 1, 84 379 1, 224 238 1, 365 379 1, 404 340 1, 264 199 1, 404 58 1, 365 19 1, 224 160 1, 84 19 1
-512 -64 0 512 704;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1, 185 576 1, 261 704 1, 346 704 1, 232 576 1
-512 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 448 1, 267 448 1, 365 448 0, 408 438 1, 451 429 0, 478 401 1, 512 367 0, 512 308 1, 512 128 0, 244 128 1, 128 128 1, 128 0 1, 128 192 1, 240 192 1, 448 192 0, 448 302 1, 448 355 0, 394 371 1, 348 384 0, 242 384 1, 128 384 1
-448 64 0 384 704;64 554 1, 64 615 1, 139 615 0, 200 586 1, 258 650 1, 287 617 1, 238 559 1, 278 523 0, 299 494 1, 384 380 0, 384 219 1, 384 116 0, 342 58 1, 299 0 0, 226 0 1, 152 0 0, 108 53 1, 64 105 0, 64 194 1, 64 283 0, 110 333 1, 155 384 0, 234 384 1, 253 384 0, 276 379 1, 247 449 0, 194 497 1, 138 416 1, 109 459 1, 157 528 1, 119 554 0, 223 320 1, 178 320 0, 153 287 1, 128 253 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 192 1, 320 320 0
-384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 64 -128 384 576;128 -128 1, 64 -128 1, 64 576 1, 128 576 1, 128 312 1, 148 344 0, 171 361 1, 203 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0
-512 -64 0 512 640;-1 0 1, 215 576 1, 297 576 1, 510 0 1, 425 0 1, 366 128 1, 130 128 1, 72 0 1, 154 192 1, 343 192 1, 249 458 1, 128 576 1, 128 640 1, 384 640 1, 384 576 1
-448 0 0 448 512;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
-512 0 0 512 768;8 0 1, 219 576 1, 297 576 1, 504 0 1, 419 0 1, 362 128 1, 139 128 1, 81 0 1, 161 192 1, 340 192 1, 251 458 1, 133 743 1, 179 743 1, 187 722 0, 207 713 1, 226 704 0, 258 704 1, 293 704 0, 313 715 1, 329 724 0, 336 743 1, 383 743 1, 377 700 0, 350 674 1, 314 640 0, 258 640 1, 199 640 0, 163 677 1, 139 702 0
-448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 67 602 1, 113 602 1, 121 588 0, 141 582 1, 161 576 0, 192 576 1, 227 576 0, 248 583 1, 264 589 0, 271 602 1, 317 602 1, 311 564 0, 284 542 1, 248 512 0, 192 512 1, 133 512 0, 97 544 1, 73 566 0
-512 0 -128 512 576;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 419 0 1, 459 0 1, 448 -19 0, 448 -42 1, 448 -64 0, 470 -64 1, 481 -64 0, 488 -98 1, 488 -128 1, 469 -128 0, 446 -128 1, 384 -128 0, 384 -73 1, 384 -31 0
-448 0 -128 448 384;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 315 0 1, 355 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 356 -64 1, 372 -64 0, 384 -98 1, 384 -128 1, 361 -128 0, 332 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
-576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 270 576 1, 360 704 1, 446 704 1, 326 576 1
-384 0 0 384 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 194 576 1, 285 704 1, 366 704 1, 457 576 1, 401 576 1, 326 657 1, 325 657 1, 250 576 1
-384 0 0 384 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 74 512 1, 164 576 1, 246 576 1, 332 512 1, 281 512 1, 205 552 1, 204 552 1, 129 512 1
-576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 320 640 1, 320 704 1, 384 704 1, 384 640 1
-384 64 0 320 576;320 11 1, 265 0 0, 216 0 1, 148 0 0, 106 53 1, 64 107 0, 64 192 1, 64 282 0, 107 333 1, 150 384 0, 228 384 1, 267 384 0, 320 380 1, 320 322 1, 268 320 0, 237 320 1, 128 320 0, 128 191 1, 128 130 0, 156 97 1, 183 64 0, 232 64 1, 270 64 0, 320 72 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
-576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 457 704 1, 366 576 1, 285 576 1, 194 704 1, 250 704 1, 325 623 1, 326 623 1, 401 704 1
-384 0 0 448 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 387 576 1, 297 512 1, 215 512 1, 125 576 1, 180 576 1, 256 536 1, 256 536 1, 332 576 1
-576 64 0 512 704;64 0 1, 64 576 1, 227 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 364 0 0, 228 0 1, 128 64 1, 223 64 1, 448 64 0, 448 292 1, 448 426 0, 360 481 1, 335 497 0, 299 504 1, 257 512 0, 186 512 1, 128 512 1, 374 704 1, 284 576 1, 202 576 1, 115 704 1, 167 704 1, 243 623 1, 244 623 1, 319 704 1
-448 64 0 448 576;320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 576 1, 384 576 1, 384 0 1, 320 0 1, 384 400 1, 384 422 1, 409 430 0, 409 493 1, 409 499 1, 384 499 1, 384 576 1, 448 576 1, 448 510 1, 448 408 0
-576 0 0 512 576;64 0 1, 64 256 1, 0 256 1, 0 320 1, 64 320 1, 64 576 1, 229 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 365 0 0, 231 0 1, 128 64 1, 225 64 1, 448 64 0, 448 292 1, 448 426 0, 361 481 1, 336 497 0, 300 504 1, 258 512 0, 188 512 1, 128 512 1, 128 320 1, 256 320 1, 256 256 1, 128 256 1
-448 64 0 448 576;320 448 1, 200 448 1, 200 512 1, 320 512 1, 320 576 1, 384 576 1, 384 512 1, 440 512 1, 440 448 1, 384 448 1, 384 0 1, 320 0 1, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0
-512 64 0 512 640;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 128 576 1, 128 640 1, 384 640 1, 384 576 1
-448 64 0 448 512;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
-512 64 0 512 768;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 129 743 1, 181 743 1, 190 722 0, 212 713 1, 234 704 0, 269 704 1, 308 704 0, 331 715 1, 349 724 0, 357 743 1, 408 743 1, 401 700 0, 371 674 1, 331 640 0, 268 640 1, 203 640 0, 163 677 1, 136 702 0
-448 64 0 448 640;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 93 579 1, 139 579 1, 147 543 0, 167 527 1, 186 512 0, 218 512 1, 253 512 0, 273 531 1, 289 546 0, 296 579 1, 342 579 1, 336 524 0, 309 491 1, 273 448 0, 217 448 1, 159 448 0, 123 495 1, 99 526 0
-512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 256 640 1, 256 704 1, 320 704 1, 320 640 1
-448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 128 512 1, 128 576 1, 192 576 1, 192 512 1
-512 64 -128 512 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 410 0 1, 448 0 1, 384 -19 0, 384 -42 1, 384 -64 0, 420 -64 1, 436 -64 0, 448 -98 1, 448 -128 1, 425 -128 0, 396 -128 1, 320 -128 0, 320 -73 1, 320 -31 0
-448 64 -128 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 251 0 1, 291 0 1, 256 -19 0, 256 -42 1, 256 -64 0, 292 -64 1, 308 -64 0, 320 -98 1, 320 -128 1, 297 -128 0, 268 -128 1, 192 -128 0, 192 -73 1, 192 -31 0
-512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 413 704 1, 312 576 1, 221 576 1, 122 704 1, 182 704 1, 266 623 1, 267 623 1, 351 704 1
-448 0 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
-576 64 0 512 704;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 222 576 1, 312 704 1, 391 704 1, 454 576 1, 415 576 1, 354 657 1, 353 657 1, 277 576 1
-448 64 -192 384 576;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 119 512 1, 208 576 1, 288 576 1, 370 512 1, 322 512 1, 248 552 1, 248 552 1, 174 512 1
-576 64 0 512 768;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 228 743 1, 274 743 1, 281 722 0, 300 713 1, 317 704 0, 345 704 1, 378 704 0, 396 715 1, 411 724 0, 417 743 1, 449 743 1, 444 700 0, 419 674 1, 388 640 0, 339 640 1, 286 640 0, 255 677 1, 233 702 0
-448 64 -192 384 640;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 131 602 1, 177 602 1, 185 588 0, 205 582 1, 225 576 0, 256 576 1, 291 576 0, 312 583 1, 328 589 0, 335 602 1, 381 602 1, 375 564 0, 348 542 1, 312 512 0, 256 512 1, 197 512 0, 161 544 1, 137 566 0
-576 64 0 512 704;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 320 640 1, 320 704 1, 384 704 1, 384 640 1
-448 64 -192 384 576;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
-576 64 -192 512 576;512 256 1, 512 14 1, 417 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 291 -158 1, 291 -126 1, 299 -128 0, 305 -128 1, 320 -128 0, 320 -104 1, 320 -77 0, 309 -71 1, 309 -42 1, 343 -43 0, 360 -57 1, 384 -77 0, 384 -121 1, 384 -192 0, 325 -192 1, 309 -192 0
-448 64 -192 384 704;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 256 682 1, 256 660 1, 231 652 0, 231 592 1, 231 586 1, 256 586 1, 256 512 1, 192 512 1, 192 576 1, 192 674 0
-576 64 0 512 704;64 0 1, 64 576 1, 128 576 1, 128 320 1, 448 320 1, 448 576 1, 512 576 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1, 134 576 1, 240 704 1, 336 704 1, 441 576 1, 376 576 1, 288 657 1, 287 657 1, 199 576 1
-448 64 0 384 768;64 0 1, 64 576 1, 128 576 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 88 640 1, 179 768 1, 272 768 1, 362 640 1, 312 640 1, 226 721 1, 225 721 1, 139 640 1
-576 0 0 576 576;128 320 1, 448 320 1, 448 384 1, 128 384 1, 64 0 1, 64 384 1, 8 384 1, 8 448 1, 64 448 1, 64 576 1, 128 576 1, 128 448 1, 448 448 1, 448 576 1, 512 576 1, 512 448 1, 568 448 1, 568 384 1, 512 384 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1
-448 0 0 384 576;64 0 1, 64 448 1, 8 448 1, 8 512 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 255 512 1, 255 448 1, 128 448 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
-192 -64 0 256 768;64 0 1, 64 576 1, 128 576 1, 128 0 1, -22 623 1, -20 655 0, -11 673 1, 5 704 0, 43 704 1, 68 704 0, 89 704 1, 110 704 1, 130 704 0, 141 704 1, 163 704 0, 167 710 1, 214 710 1, 212 682 0, 203 667 1, 187 640 0, 150 640 1, 125 640 0, 103 640 1, 82 640 1, 63 640 0, 51 640 1, 29 640 0, 25 623 1
-192 -64 0 256 640;64 0 1, 64 384 1, 128 384 1, 128 0 1, -24 480 1, -21 518 0, -13 539 1, 4 576 0, 43 576 1, 69 576 0, 90 576 1, 112 576 1, 132 576 0, 143 576 1, 166 576 0, 170 590 1, 216 590 1, 213 559 0, 205 542 1, 188 512 0, 150 512 1, 124 512 0, 102 512 1, 80 512 1, 61 512 0, 49 512 1, 26 512 0, 22 480 1
-192 0 0 256 640;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 576 1, 0 640 1, 256 640 1, 256 576 1
-192 -64 0 192 512;64 0 1, 64 384 1, 128 384 1, 128 0 1, -64 448 1, -64 512 1, 192 512 1, 192 448 1
-192 -64 0 256 768;64 0 1, 64 576 1, 128 576 1, 128 0 1, -22 743 1, 25 743 1, 32 722 0, 50 713 1, 68 704 0, 96 704 1, 128 704 0, 146 715 1, 161 724 0, 167 743 1, 214 743 1, 208 700 0, 182 674 1, 149 640 0, 96 640 1, 40 640 0, 7 677 1, -16 702 0
-192 -64 0 256 640;64 0 1, 64 384 1, 128 384 1, 128 0 1, -24 578 1, 22 578 1, 29 542 0, 48 527 1, 67 512 0, 96 512 1, 129 512 0, 148 531 1, 163 546 0, 170 578 1, 216 578 1, 210 524 0, 184 491 1, 150 448 0, 96 448 1, 39 448 0, 5 495 1, -18 526 0
-192 64 -128 192 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 94 0 1, 126 0 1, 128 -19 0, 128 -42 1, 128 -64 0, 143 -64 1, 150 -64 0, 155 -98 1, 155 -128 1, 139 -128 0, 118 -128 1, 64 -128 0, 64 -73 1, 64 -31 0
-192 0 -128 128 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 59 0 1, 99 0 1, 64 -19 0, 64 -42 1, 64 -64 0, 100 -64 1, 116 -64 0, 128 -98 1, 128 -128 1, 105 -128 0, 76 -128 1, 0 -128 0, 0 -73 1, 0 -31 0
-192 64 0 128 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 64 640 1, 64 704 1, 128 704 1, 128 640 1
-576 64 -128 512 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 -87 1, 192 -19 1, 267 -64 0, 333 -64 1, 408 -64 0, 430 -29 1, 448 0 0, 448 71 1, 448 576 1, 512 576 1, 512 73 1, 512 -128 0, 317 -128 1, 252 -128 0
-320 64 -192 320 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 128 -145 1, 128 -87 1, 164 -64 0, 195 -64 1, 238 -64 0, 248 -47 1, 256 -32 0, 256 0 1, 256 384 1, 320 384 1, 320 0 1, 320 -128 0, 194 -128 1, 159 -128 0, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-384 0 -128 448 704;0 -87 1, 0 -19 1, 75 -64 0, 141 -64 1, 216 -64 0, 238 -29 1, 256 0 0, 256 71 1, 256 576 1, 320 576 1, 320 73 1, 320 -128 0, 125 -128 1, 60 -128 0, 137 576 1, 244 704 1, 314 704 1, 403 576 1, 347 576 1, 281 657 1, 280 657 1, 203 576 1
-192 -64 -192 256 576;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0, -55 512 1, 52 576 1, 126 576 1, 216 512 1, 160 512 1, 91 552 1, 90 552 1, 11 512 1
-512 64 -192 512 576;64 0 1, 64 576 1, 128 576 1, 128 293 1, 359 576 1, 438 576 1, 214 301 1, 476 0 1, 377 0 1, 128 292 1, 128 0 1, 165 -158 1, 165 -126 1, 190 -128 0, 208 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 184 -71 1, 184 -42 1, 246 -43 0, 277 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 222 -192 1, 195 -192 0
-384 64 -192 384 576;64 0 1, 64 576 1, 128 576 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
-384 64 0 384 384;64 0 1, 64 384 1, 128 384 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1
-448 64 0 384 704;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 68 576 1, 143 704 1, 224 704 1, 113 576 1
-192 0 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 40 640 1, 131 704 1, 216 704 1, 96 640 1
-448 64 -192 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 154 -158 1, 154 -126 1, 164 -128 0, 172 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 171 -71 1, 171 -42 1, 210 -43 0, 229 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 191 -192 1, 174 -192 0
-192 0 -192 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 -158 1, 0 -126 1, 18 -128 0, 30 -128 1, 64 -128 0, 64 -104 1, 64 -77 0, 18 -71 1, 18 -42 1, 68 -43 0, 93 -57 1, 128 -77 0, 128 -121 1, 128 -192 0, 47 -192 1, 25 -192 0
-448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 256 400 1, 256 423 1, 281 431 0, 281 493 1, 281 500 1, 256 500 1, 256 576 1, 320 576 1, 320 510 1, 320 408 0
-256 64 0 256 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 410 1, 192 432 1, 217 440 0, 217 498 1, 217 504 1, 192 504 1, 192 576 1, 256 576 1, 256 514 1, 256 418 0
-448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 320 256 1, 320 320 1, 384 320 1, 384 256 1
-256 64 0 256 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 256 1, 192 320 1, 256 320 1, 256 256 1
-448 0 0 384 576;64 0 1, 64 271 1, 0 240 1, 0 305 1, 64 337 1, 64 576 1, 128 576 1, 128 381 1, 256 433 1, 256 367 1, 128 316 1, 128 64 1, 384 64 1, 384 0 1
-192 0 0 192 576;64 0 1, 64 263 1, 0 237 1, 0 297 1, 64 324 1, 64 576 1, 128 576 1, 128 364 1, 192 388 1, 192 329 1, 128 303 1, 128 0 1
-576 64 0 512 704;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 228 576 1, 326 704 1, 418 704 1, 288 576 1
-448 64 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-576 64 -192 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 198 -158 1, 198 -126 1, 214 -128 0, 225 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 218 -71 1, 218 -42 1, 265 -43 0, 288 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 243 -192 1, 222 -192 0
-448 64 -192 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
-576 64 0 512 704;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 430 704 1, 332 576 1, 244 576 1, 146 704 1, 206 704 1, 288 623 1, 288 623 1, 370 704 1
-448 0 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
-448 0 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 0 399 1, 0 422 1, 25 430 0, 25 493 1, 25 499 1, 0 499 1, 0 576 1, 64 576 1, 64 509 1, 64 407 0
-576 64 -192 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 -35 1, 512 -128 0, 382 -128 1, 352 -128 0, 320 -150 1, 320 -92 1, 349 -64 0, 382 -64 1, 448 -64 0, 448 -21 1, 448 -15 1, 128 445 1, 128 0 1
-448 64 -192 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 -35 1, 384 -128 0, 254 -128 1, 224 -128 0, 192 -150 1, 192 -92 1, 223 -64 0, 250 -64 1, 320 -64 0, 320 -21 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
-576 64 0 576 640;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 192 576 1, 192 640 1, 448 640 1, 448 576 1
-448 64 0 384 512;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
-576 64 0 576 768;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 174 743 1, 220 743 1, 228 722 0, 248 713 1, 268 704 0, 299 704 1, 334 704 0, 355 715 1, 371 724 0, 378 743 1, 424 743 1, 418 700 0, 391 674 1, 355 640 0, 299 640 1, 240 640 0, 204 677 1, 180 702 0
-448 64 0 384 640;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 89 579 1, 135 579 1, 143 543 0, 163 527 1, 182 512 0, 214 512 1, 249 512 0, 269 531 1, 285 546 0, 292 579 1, 338 579 1, 332 524 0, 305 491 1, 269 448 0, 213 448 1, 155 448 0, 119 495 1, 95 526 0
-576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 212 612 1, 303 704 1, 374 704 1, 254 612 1, 344 612 1, 434 704 1, 506 704 1, 386 612 1
-448 64 0 448 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 109 456 1, 199 576 1, 271 576 1, 151 456 1, 241 456 1, 331 576 1, 403 576 1, 283 456 1
-576 64 0 576 704;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 184 576 1, 274 704 1, 359 704 1, 239 576 1
-256 64 0 320 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 104 512 1, 195 576 1, 280 576 1, 160 512 1
-576 64 -192 576 576;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 184 -158 1, 184 -126 1, 204 -128 0, 218 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 202 -71 1, 202 -42 1, 256 -43 0, 283 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 234 -192 1, 210 -192 0
-256 64 -192 256 448;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
-576 64 0 576 704;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 356 704 1, 265 576 1, 184 576 1, 100 704 1, 149 704 1, 224 623 1, 225 623 1, 300 704 1
-256 -64 0 320 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 259 576 1, 169 512 1, 87 512 1, -3 576 1, 52 576 1, 128 536 1, 128 536 1, 204 576 1
-512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 214 576 1, 304 704 1, 389 704 1, 269 576 1
-384 64 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 139 576 1, 229 704 1, 310 704 1, 400 576 1, 344 576 1, 270 657 1, 269 657 1, 194 576 1
-384 64 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 94 512 1, 181 576 1, 260 576 1, 348 512 1, 293 512 1, 221 552 1, 220 552 1, 147 512 1
-512 64 -192 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 157 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 243 0 1, 279 0 1, 257 -41 1, 280 -42 0, 297 -59 1, 320 -82 0, 320 -116 1, 320 -148 0, 300 -170 1, 279 -192 0, 250 -192 1, 227 -192 0, 200 -154 1, 200 -124 1, 213 -128 0, 228 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 208 -66 1
-384 64 -192 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 171 0 1, 207 0 1, 184 -41 1, 211 -42 0, 230 -59 1, 256 -82 0, 256 -116 1, 256 -148 0, 234 -170 1, 213 -192 0, 180 -192 1, 155 -192 0, 127 -154 1, 127 -124 1, 143 -128 0, 160 -128 1, 192 -128 0, 192 -101 1, 192 -67 0, 135 -66 1
-512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 400 704 1, 310 576 1, 229 576 1, 139 704 1, 194 704 1, 269 623 1, 270 623 1, 344 704 1
-384 0 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
-448 0 -192 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 212 0 1, 242 0 1, 223 -41 1, 259 -42 0, 285 -59 1, 320 -82 0, 320 -115 1, 320 -148 0, 295 -170 1, 270 -192 0, 234 -192 1, 205 -192 0, 173 -154 1, 173 -124 1, 193 -128 0, 214 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 181 -66 1
-192 0 -192 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 112 0 1, 145 0 1, 124 -41 1, 149 -42 0, 167 -59 1, 192 -82 0, 192 -115 1, 192 -148 0, 172 -170 1, 152 -192 0, 123 -192 1, 100 -192 0, 74 -154 1, 74 -124 1, 87 -128 0, 101 -128 1, 128 -128 0, 128 -101 1, 128 -67 0, 81 -66 1
-448 0 0 448 704;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 350 704 1, 258 576 1, 190 576 1, 98 704 1, 155 704 1, 224 623 1, 224 623 1, 293 704 1
-320 0 -64 256 640;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 128 476 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 192 447 1, 192 472 1, 208 481 0, 208 549 1, 208 556 1, 192 556 1, 192 640 1, 256 640 1, 256 567 1, 256 456 0
-448 0 0 448 576;192 0 1, 192 256 1, 64 256 1, 64 320 1, 192 320 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 320 1, 384 320 1, 384 256 1, 256 256 1, 256 0 1
-192 0 -64 192 512;64 192 1, 0 192 1, 0 256 1, 64 256 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 256 1, 192 256 1, 192 192 1, 128 192 1, 128 114 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 102 1
-576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 146 623 1, 149 655 0, 160 673 1, 179 704 0, 226 704 1, 256 704 0, 282 704 1, 308 704 1, 332 704 0, 345 704 1, 372 704 0, 377 710 1, 430 710 1, 427 682 0, 416 667 1, 397 640 0, 351 640 1, 321 640 0, 294 640 1, 268 640 1, 245 640 0, 231 640 1, 204 640 0, 199 623 1
-448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 93 480 1, 96 519 0, 106 539 1, 125 576 0, 169 576 1, 198 576 0, 223 576 1, 248 576 1, 271 576 0, 283 576 1, 310 576 0, 314 590 1, 355 590 1, 352 559 0, 342 542 1, 324 512 0, 280 512 1, 250 512 0, 225 512 1, 200 512 1, 178 512 0, 165 512 1, 138 512 0, 134 480 1
-576 64 0 512 640;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 192 576 1, 192 640 1, 384 640 1, 384 576 1
-448 64 0 384 512;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 64 448 1, 64 512 1, 320 512 1, 320 448 1
-576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 146 743 1, 199 743 1, 208 722 0, 231 713 1, 253 704 0, 288 704 1, 328 704 0, 351 715 1, 369 724 0, 377 743 1, 430 743 1, 423 700 0, 392 674 1, 352 640 0, 288 640 1, 221 640 0, 181 677 1, 153 702 0
-448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 93 578 1, 134 578 1, 143 543 0, 166 527 1, 188 512 0, 224 512 1, 264 512 0, 287 531 1, 306 546 0, 314 578 1, 355 578 1, 349 524 0, 320 491 1, 283 448 0, 224 448 1, 162 448 0, 125 495 1, 100 526 0
-576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 288 768 1, 328 768 0, 356 749 1, 384 731 0, 384 704 1, 384 677 0, 356 659 1, 328 640 0, 287 640 1, 252 640 0, 226 655 1, 192 675 0, 192 704 1, 192 731 0, 220 749 1, 248 768 0, 288 704 1, 275 704 0, 265 704 1, 256 704 0, 256 704 1, 256 704 0, 265 704 1, 275 704 0, 288 704 1, 300 704 0, 309 704 1, 320 704 0, 320 704 1, 320 704 0, 310 704 1, 301 704 0
-448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 192 640 1, 219 640 0, 237 621 1, 256 603 0, 256 576 1, 256 549 0, 237 531 1, 219 512 0, 191 512 1, 168 512 0, 151 527 1, 128 547 0, 128 576 1, 128 603 0, 147 621 1, 165 640 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0
-576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 180 612 1, 283 704 1, 364 704 1, 228 612 1, 330 612 1, 432 704 1, 502 704 1, 377 612 1
-448 64 0 448 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 109 456 1, 199 576 1, 271 576 1, 151 456 1, 241 456 1, 331 576 1, 403 576 1, 283 456 1
-576 64 -128 512 576;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 308 0 1, 354 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 358 -64 1, 375 -64 0, 387 -98 1, 387 -128 1, 363 -128 0, 333 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
-448 64 -128 384 384;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 315 0 1, 355 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 356 -64 1, 372 -64 0, 384 -98 1, 384 -128 1, 361 -128 0, 332 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
-704 0 0 768 704;152 0 1, 9 576 1, 85 576 1, 199 121 1, 329 576 1, 405 576 1, 530 125 1, 651 576 1, 716 576 1, 560 0 1, 482 0 1, 358 444 1, 230 0 1, 236 576 1, 326 704 1, 408 704 1, 498 576 1, 443 576 1, 367 657 1, 366 657 1, 291 576 1
-576 0 0 576 576;102 0 1, 4 384 1, 77 384 1, 150 95 1, 244 384 1, 318 384 1, 400 94 1, 486 384 1, 549 384 1, 435 0 1, 361 0 1, 275 297 1, 177 0 1, 149 512 1, 240 576 1, 321 576 1, 412 512 1, 356 512 1, 281 552 1, 280 552 1, 205 512 1
-512 -64 0 512 704;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1, 115 576 1, 203 704 1, 273 704 1, 363 576 1, 307 576 1, 236 657 1, 236 657 1, 171 576 1
-384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 67 512 1, 157 576 1, 239 576 1, 329 512 1, 274 512 1, 198 552 1, 198 552 1, 122 512 1
-448 64 0 448 704;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1, 190 576 1, 283 704 1, 370 704 1, 247 576 1
-384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
-448 64 0 448 704;64 0 1, 64 64 1, 331 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 131 64 1, 448 64 1, 448 0 1, 192 640 1, 192 704 1, 256 704 1, 256 640 1
-384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 128 512 1, 128 576 1, 192 576 1, 192 512 1
-448 64 0 448 704;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1, 386 704 1, 293 576 1, 209 576 1, 117 704 1, 174 704 1, 251 623 1, 252 623 1, 329 704 1
-384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
-192 0 0 192 640;64 0 1, 64 352 1, 0 352 1, 0 407 1, 64 407 1, 64 456 1, 64 513 0, 91 544 1, 119 576 0, 169 576 1, 176 576 0, 192 600 1, 192 545 1, 181 512 0, 175 512 1, 128 512 0, 128 464 1, 128 0 1
-512 64 -192 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 157 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 214 -158 1, 214 -126 1, 226 -128 0, 234 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 233 -71 1, 233 -42 1, 273 -43 0, 292 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 253 -192 1, 234 -192 0
-384 64 -192 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
-448 0 -192 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 173 -158 1, 173 -126 1, 196 -128 0, 212 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 192 -71 1, 192 -42 1, 251 -43 0, 279 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 227 -192 1, 201 -192 0
-192 0 -192 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
-256 64 -192 192 0;64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
-192 64 -128 128 384;64 -120 1, 64 -93 1, 87 -79 0, 87 -9 1, 87 0 1, 64 0 1, 64 64 1, 128 64 1, 128 10 1, 128 -102 0, 64 320 1, 64 384 1, 128 384 1, 128 320 1
-192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
-256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
-256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
-448 0 192 448 256;38 192 1, 38 256 1, 390 256 1, 390 192 1
-768 0 192 768 256;37 192 1, 37 256 1, 731 256 1, 731 192 1
-192 0 0 0 0;
-448 64 512 384 576;64 512 1, 64 576 1, 384 576 1, 384 512 1
-448 64 0 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0
-448 64 192 384 256;64 192 1, 64 256 1, 384 256 1, 384 192 1
-128 -192 -64 320 576;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
-192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
-384 0 0 320 640;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 64 640 0, 194 640 1, 221 640 0, 256 613 1, 256 557 1, 219 576 0, 193 576 1, 157 576 0, 142 555 1, 128 534 0, 128 482 1, 128 384 1, 320 384 1, 320 0 1, 256 0 1, 256 320 1, 128 320 1, 128 0 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
-384 0 0 320 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 435 1, 64 576 0, 175 576 1, 256 576 1, 320 576 1, 320 0 1, 256 0 1, 256 518 1, 240 516 1, 206 512 0, 183 512 1, 148 512 0, 137 493 1, 128 477 0, 128 443 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
-256 -64 192 256 576;128 229 1, 128 320 1, -25 320 1, -25 382 1, 126 576 1, 192 576 1, 192 384 1, 238 384 1, 238 320 1, 192 320 1, 192 229 1, 24 384 1, 128 384 1, 128 516 1
-192 -64 -192 128 384;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0
-192 0 0 0 0;
diff --git a/vendor/github.com/golang/freetype/testdata/luxisr.ttf b/vendor/github.com/golang/freetype/testdata/luxisr.ttf
deleted file mode 100644
index c47fd20be..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxisr.ttf
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/golang/freetype/testdata/luxisr.ttx b/vendor/github.com/golang/freetype/testdata/luxisr.ttx
deleted file mode 100644
index 98eea53e4..000000000
--- a/vendor/github.com/golang/freetype/testdata/luxisr.ttx
+++ /dev/null
@@ -1,22503 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.4">
-
- <GlyphOrder>
- <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
- <GlyphID id="0" name=".notdef"/>
- <GlyphID id="1" name=".notdef#1"/>
- <GlyphID id="2" name=".notdef#2"/>
- <GlyphID id="3" name="space"/>
- <GlyphID id="4" name="exclam"/>
- <GlyphID id="5" name="quotedbl"/>
- <GlyphID id="6" name="numbersign"/>
- <GlyphID id="7" name="dollar"/>
- <GlyphID id="8" name="percent"/>
- <GlyphID id="9" name="ampersand"/>
- <GlyphID id="10" name="quotesingle"/>
- <GlyphID id="11" name="parenleft"/>
- <GlyphID id="12" name="parenright"/>
- <GlyphID id="13" name="asterisk"/>
- <GlyphID id="14" name="plus"/>
- <GlyphID id="15" name="comma"/>
- <GlyphID id="16" name="hyphen"/>
- <GlyphID id="17" name="period"/>
- <GlyphID id="18" name="slash"/>
- <GlyphID id="19" name="zero"/>
- <GlyphID id="20" name="one"/>
- <GlyphID id="21" name="two"/>
- <GlyphID id="22" name="three"/>
- <GlyphID id="23" name="four"/>
- <GlyphID id="24" name="five"/>
- <GlyphID id="25" name="six"/>
- <GlyphID id="26" name="seven"/>
- <GlyphID id="27" name="eight"/>
- <GlyphID id="28" name="nine"/>
- <GlyphID id="29" name="colon"/>
- <GlyphID id="30" name="semicolon"/>
- <GlyphID id="31" name="less"/>
- <GlyphID id="32" name="equal"/>
- <GlyphID id="33" name="greater"/>
- <GlyphID id="34" name="question"/>
- <GlyphID id="35" name="at"/>
- <GlyphID id="36" name="A"/>
- <GlyphID id="37" name="B"/>
- <GlyphID id="38" name="C"/>
- <GlyphID id="39" name="D"/>
- <GlyphID id="40" name="E"/>
- <GlyphID id="41" name="F"/>
- <GlyphID id="42" name="G"/>
- <GlyphID id="43" name="H"/>
- <GlyphID id="44" name="I"/>
- <GlyphID id="45" name="J"/>
- <GlyphID id="46" name="K"/>
- <GlyphID id="47" name="L"/>
- <GlyphID id="48" name="M"/>
- <GlyphID id="49" name="N"/>
- <GlyphID id="50" name="O"/>
- <GlyphID id="51" name="P"/>
- <GlyphID id="52" name="Q"/>
- <GlyphID id="53" name="R"/>
- <GlyphID id="54" name="S"/>
- <GlyphID id="55" name="T"/>
- <GlyphID id="56" name="U"/>
- <GlyphID id="57" name="V"/>
- <GlyphID id="58" name="W"/>
- <GlyphID id="59" name="X"/>
- <GlyphID id="60" name="Y"/>
- <GlyphID id="61" name="Z"/>
- <GlyphID id="62" name="bracketleft"/>
- <GlyphID id="63" name="backslash"/>
- <GlyphID id="64" name="bracketright"/>
- <GlyphID id="65" name="asciicircum"/>
- <GlyphID id="66" name="underscore"/>
- <GlyphID id="67" name="grave"/>
- <GlyphID id="68" name="a"/>
- <GlyphID id="69" name="b"/>
- <GlyphID id="70" name="c"/>
- <GlyphID id="71" name="d"/>
- <GlyphID id="72" name="e"/>
- <GlyphID id="73" name="f"/>
- <GlyphID id="74" name="g"/>
- <GlyphID id="75" name="h"/>
- <GlyphID id="76" name="i"/>
- <GlyphID id="77" name="j"/>
- <GlyphID id="78" name="k"/>
- <GlyphID id="79" name="l"/>
- <GlyphID id="80" name="m"/>
- <GlyphID id="81" name="n"/>
- <GlyphID id="82" name="o"/>
- <GlyphID id="83" name="p"/>
- <GlyphID id="84" name="q"/>
- <GlyphID id="85" name="r"/>
- <GlyphID id="86" name="s"/>
- <GlyphID id="87" name="t"/>
- <GlyphID id="88" name="u"/>
- <GlyphID id="89" name="v"/>
- <GlyphID id="90" name="w"/>
- <GlyphID id="91" name="x"/>
- <GlyphID id="92" name="y"/>
- <GlyphID id="93" name="z"/>
- <GlyphID id="94" name="braceleft"/>
- <GlyphID id="95" name="bar"/>
- <GlyphID id="96" name="braceright"/>
- <GlyphID id="97" name="asciitilde"/>
- <GlyphID id="98" name="Adieresis"/>
- <GlyphID id="99" name="Aring"/>
- <GlyphID id="100" name="Ccedilla"/>
- <GlyphID id="101" name="Eacute"/>
- <GlyphID id="102" name="Ntilde"/>
- <GlyphID id="103" name="Odieresis"/>
- <GlyphID id="104" name="Udieresis"/>
- <GlyphID id="105" name="aacute"/>
- <GlyphID id="106" name="agrave"/>
- <GlyphID id="107" name="acircumflex"/>
- <GlyphID id="108" name="adieresis"/>
- <GlyphID id="109" name="atilde"/>
- <GlyphID id="110" name="aring"/>
- <GlyphID id="111" name="ccedilla"/>
- <GlyphID id="112" name="eacute"/>
- <GlyphID id="113" name="egrave"/>
- <GlyphID id="114" name="ecircumflex"/>
- <GlyphID id="115" name="edieresis"/>
- <GlyphID id="116" name="iacute"/>
- <GlyphID id="117" name="igrave"/>
- <GlyphID id="118" name="icircumflex"/>
- <GlyphID id="119" name="idieresis"/>
- <GlyphID id="120" name="ntilde"/>
- <GlyphID id="121" name="oacute"/>
- <GlyphID id="122" name="ograve"/>
- <GlyphID id="123" name="ocircumflex"/>
- <GlyphID id="124" name="odieresis"/>
- <GlyphID id="125" name="otilde"/>
- <GlyphID id="126" name="uacute"/>
- <GlyphID id="127" name="ugrave"/>
- <GlyphID id="128" name="ucircumflex"/>
- <GlyphID id="129" name="udieresis"/>
- <GlyphID id="130" name="dagger"/>
- <GlyphID id="131" name="degree"/>
- <GlyphID id="132" name="cent"/>
- <GlyphID id="133" name="sterling"/>
- <GlyphID id="134" name="section"/>
- <GlyphID id="135" name="bullet"/>
- <GlyphID id="136" name="paragraph"/>
- <GlyphID id="137" name="germandbls"/>
- <GlyphID id="138" name="registered"/>
- <GlyphID id="139" name="copyright"/>
- <GlyphID id="140" name="trademark"/>
- <GlyphID id="141" name="acute"/>
- <GlyphID id="142" name="dieresis"/>
- <GlyphID id="143" name=".notdef#3"/>
- <GlyphID id="144" name="AE"/>
- <GlyphID id="145" name="Oslash"/>
- <GlyphID id="146" name=".notdef#4"/>
- <GlyphID id="147" name="plusminus"/>
- <GlyphID id="148" name=".notdef#5"/>
- <GlyphID id="149" name=".notdef#6"/>
- <GlyphID id="150" name="yen"/>
- <GlyphID id="151" name="mu"/>
- <GlyphID id="152" name=".notdef#7"/>
- <GlyphID id="153" name=".notdef#8"/>
- <GlyphID id="154" name=".notdef#9"/>
- <GlyphID id="155" name=".notdef#10"/>
- <GlyphID id="156" name=".notdef#11"/>
- <GlyphID id="157" name="ordfeminine"/>
- <GlyphID id="158" name="ordmasculine"/>
- <GlyphID id="159" name=".notdef#12"/>
- <GlyphID id="160" name="ae"/>
- <GlyphID id="161" name="oslash"/>
- <GlyphID id="162" name="questiondown"/>
- <GlyphID id="163" name="exclamdown"/>
- <GlyphID id="164" name="logicalnot"/>
- <GlyphID id="165" name=".notdef#13"/>
- <GlyphID id="166" name="florin"/>
- <GlyphID id="167" name=".notdef#14"/>
- <GlyphID id="168" name=".notdef#15"/>
- <GlyphID id="169" name="guillemotleft"/>
- <GlyphID id="170" name="guillemotright"/>
- <GlyphID id="171" name="ellipsis"/>
- <GlyphID id="172" name=".notdef#16"/>
- <GlyphID id="173" name="Agrave"/>
- <GlyphID id="174" name="Atilde"/>
- <GlyphID id="175" name="Otilde"/>
- <GlyphID id="176" name="OE"/>
- <GlyphID id="177" name="oe"/>
- <GlyphID id="178" name="endash"/>
- <GlyphID id="179" name="emdash"/>
- <GlyphID id="180" name="quotedblleft"/>
- <GlyphID id="181" name="quotedblright"/>
- <GlyphID id="182" name="quoteleft"/>
- <GlyphID id="183" name="quoteright"/>
- <GlyphID id="184" name="divide"/>
- <GlyphID id="185" name=".notdef#17"/>
- <GlyphID id="186" name="ydieresis"/>
- <GlyphID id="187" name="Ydieresis"/>
- <GlyphID id="188" name="fraction"/>
- <GlyphID id="189" name="currency"/>
- <GlyphID id="190" name="guilsinglleft"/>
- <GlyphID id="191" name="guilsinglright"/>
- <GlyphID id="192" name="fi"/>
- <GlyphID id="193" name="fl"/>
- <GlyphID id="194" name="daggerdbl"/>
- <GlyphID id="195" name="periodcentered"/>
- <GlyphID id="196" name="quotesinglbase"/>
- <GlyphID id="197" name="quotedblbase"/>
- <GlyphID id="198" name="perthousand"/>
- <GlyphID id="199" name="Acircumflex"/>
- <GlyphID id="200" name="Ecircumflex"/>
- <GlyphID id="201" name="Aacute"/>
- <GlyphID id="202" name="Edieresis"/>
- <GlyphID id="203" name="Egrave"/>
- <GlyphID id="204" name="Iacute"/>
- <GlyphID id="205" name="Icircumflex"/>
- <GlyphID id="206" name="Idieresis"/>
- <GlyphID id="207" name="Igrave"/>
- <GlyphID id="208" name="Oacute"/>
- <GlyphID id="209" name="Ocircumflex"/>
- <GlyphID id="210" name="Euro"/>
- <GlyphID id="211" name="Ograve"/>
- <GlyphID id="212" name="Uacute"/>
- <GlyphID id="213" name="Ucircumflex"/>
- <GlyphID id="214" name="Ugrave"/>
- <GlyphID id="215" name="dotlessi"/>
- <GlyphID id="216" name="circumflex"/>
- <GlyphID id="217" name="tilde"/>
- <GlyphID id="218" name="macron"/>
- <GlyphID id="219" name="breve"/>
- <GlyphID id="220" name="dotaccent"/>
- <GlyphID id="221" name="ring"/>
- <GlyphID id="222" name="cedilla"/>
- <GlyphID id="223" name="hungarumlaut"/>
- <GlyphID id="224" name="ogonek"/>
- <GlyphID id="225" name="caron"/>
- <GlyphID id="226" name="Euro#1"/>
- <GlyphID id="227" name="nonbreakingspace"/>
- <GlyphID id="228" name="brokenbar"/>
- <GlyphID id="229" name="sfthyphen"/>
- <GlyphID id="230" name="macron#1"/>
- <GlyphID id="231" name="twosuperior"/>
- <GlyphID id="232" name="threesuperior"/>
- <GlyphID id="233" name="periodcentered#1"/>
- <GlyphID id="234" name="onesuperior"/>
- <GlyphID id="235" name="onequarter"/>
- <GlyphID id="236" name="onehalf"/>
- <GlyphID id="237" name="threequarters"/>
- <GlyphID id="238" name="Eth"/>
- <GlyphID id="239" name="multiply"/>
- <GlyphID id="240" name="Yacute"/>
- <GlyphID id="241" name="Thorn"/>
- <GlyphID id="242" name="eth"/>
- <GlyphID id="243" name="yacute"/>
- <GlyphID id="244" name="thorn"/>
- <GlyphID id="245" name="Amacron"/>
- <GlyphID id="246" name="amacron"/>
- <GlyphID id="247" name="Abreve"/>
- <GlyphID id="248" name="abreve"/>
- <GlyphID id="249" name="Aogonek"/>
- <GlyphID id="250" name="aogonek"/>
- <GlyphID id="251" name="Cacute"/>
- <GlyphID id="252" name="cacute"/>
- <GlyphID id="253" name="Ccircumflex"/>
- <GlyphID id="254" name="ccircumflex"/>
- <GlyphID id="255" name="Cdotaccent"/>
- <GlyphID id="256" name="cdotaccent"/>
- <GlyphID id="257" name="Ccaron"/>
- <GlyphID id="258" name="ccaron"/>
- <GlyphID id="259" name="Dcaron"/>
- <GlyphID id="260" name="dcaron"/>
- <GlyphID id="261" name="Dcroat"/>
- <GlyphID id="262" name="dcroat"/>
- <GlyphID id="263" name="Emacron"/>
- <GlyphID id="264" name="emacron"/>
- <GlyphID id="265" name="Ebreve"/>
- <GlyphID id="266" name="ebreve"/>
- <GlyphID id="267" name="Edotaccent"/>
- <GlyphID id="268" name="edotaccent"/>
- <GlyphID id="269" name="Eogonek"/>
- <GlyphID id="270" name="eogonek"/>
- <GlyphID id="271" name="Ecaron"/>
- <GlyphID id="272" name="ecaron"/>
- <GlyphID id="273" name="Gcircumflex"/>
- <GlyphID id="274" name="gcircumflex"/>
- <GlyphID id="275" name="Gbreve"/>
- <GlyphID id="276" name="gbreve"/>
- <GlyphID id="277" name="Gdotaccent"/>
- <GlyphID id="278" name="gdotaccent"/>
- <GlyphID id="279" name="Gcommaaccent"/>
- <GlyphID id="280" name="gcommaaccent"/>
- <GlyphID id="281" name="Hcircumflex"/>
- <GlyphID id="282" name="hcircumflex"/>
- <GlyphID id="283" name="Hbar"/>
- <GlyphID id="284" name="hbar"/>
- <GlyphID id="285" name="Itilde"/>
- <GlyphID id="286" name="itilde"/>
- <GlyphID id="287" name="Imacron"/>
- <GlyphID id="288" name="imacron"/>
- <GlyphID id="289" name="Ibreve"/>
- <GlyphID id="290" name="ibreve"/>
- <GlyphID id="291" name="Iogonek"/>
- <GlyphID id="292" name="iogonek"/>
- <GlyphID id="293" name="Idotaccent"/>
- <GlyphID id="294" name="IJ"/>
- <GlyphID id="295" name="ij"/>
- <GlyphID id="296" name="Jcircumflex"/>
- <GlyphID id="297" name="jcircumflex"/>
- <GlyphID id="298" name="Kcommaaccent"/>
- <GlyphID id="299" name="kcommaaccent"/>
- <GlyphID id="300" name="kgreenlandic"/>
- <GlyphID id="301" name="Lacute"/>
- <GlyphID id="302" name="lacute"/>
- <GlyphID id="303" name="Lcommaaccent"/>
- <GlyphID id="304" name="lcommaaccent"/>
- <GlyphID id="305" name="Lcaron"/>
- <GlyphID id="306" name="lcaron"/>
- <GlyphID id="307" name="Ldot"/>
- <GlyphID id="308" name="ldot"/>
- <GlyphID id="309" name="Lslash"/>
- <GlyphID id="310" name="lslash"/>
- <GlyphID id="311" name="Nacute"/>
- <GlyphID id="312" name="nacute"/>
- <GlyphID id="313" name="Ncommaaccent"/>
- <GlyphID id="314" name="ncommaaccent"/>
- <GlyphID id="315" name="Ncaron"/>
- <GlyphID id="316" name="ncaron"/>
- <GlyphID id="317" name="napostrophe"/>
- <GlyphID id="318" name="Eng"/>
- <GlyphID id="319" name="eng"/>
- <GlyphID id="320" name="Omacron"/>
- <GlyphID id="321" name="omacron"/>
- <GlyphID id="322" name="Obreve"/>
- <GlyphID id="323" name="obreve"/>
- <GlyphID id="324" name="Ohungarumlaut"/>
- <GlyphID id="325" name="ohungarumlaut"/>
- <GlyphID id="326" name="Racute"/>
- <GlyphID id="327" name="racute"/>
- <GlyphID id="328" name="Rcommaaccent"/>
- <GlyphID id="329" name="rcommaaccent"/>
- <GlyphID id="330" name="Rcaron"/>
- <GlyphID id="331" name="rcaron"/>
- <GlyphID id="332" name="Sacute"/>
- <GlyphID id="333" name="sacute"/>
- <GlyphID id="334" name="Scircumflex"/>
- <GlyphID id="335" name="scircumflex"/>
- <GlyphID id="336" name="Scedilla"/>
- <GlyphID id="337" name="scedilla"/>
- <GlyphID id="338" name="Scaron"/>
- <GlyphID id="339" name="scaron"/>
- <GlyphID id="340" name="Tcommaaccent"/>
- <GlyphID id="341" name="tcommaaccent"/>
- <GlyphID id="342" name="Tcaron"/>
- <GlyphID id="343" name="tcaron"/>
- <GlyphID id="344" name="Tbar"/>
- <GlyphID id="345" name="tbar"/>
- <GlyphID id="346" name="Utilde"/>
- <GlyphID id="347" name="utilde"/>
- <GlyphID id="348" name="Umacron"/>
- <GlyphID id="349" name="umacron"/>
- <GlyphID id="350" name="Ubreve"/>
- <GlyphID id="351" name="ubreve"/>
- <GlyphID id="352" name="Uring"/>
- <GlyphID id="353" name="uring"/>
- <GlyphID id="354" name="Uhungarumlaut"/>
- <GlyphID id="355" name="uhungarumlaut"/>
- <GlyphID id="356" name="Uogonek"/>
- <GlyphID id="357" name="uogonek"/>
- <GlyphID id="358" name="Wcircumflex"/>
- <GlyphID id="359" name="wcircumflex"/>
- <GlyphID id="360" name="Ycircumflex"/>
- <GlyphID id="361" name="ycircumflex"/>
- <GlyphID id="362" name="Zacute"/>
- <GlyphID id="363" name="zacute"/>
- <GlyphID id="364" name="Zdotaccent"/>
- <GlyphID id="365" name="zdotaccent"/>
- <GlyphID id="366" name="Zcaron"/>
- <GlyphID id="367" name="zcaron"/>
- <GlyphID id="368" name="longs"/>
- <GlyphID id="369" name="Scommaaccent"/>
- <GlyphID id="370" name="scommaaccent"/>
- <GlyphID id="371" name="Tcommabelow"/>
- <GlyphID id="372" name="tcommabelow"/>
- <GlyphID id="373" name="Unterkomma"/>
- <GlyphID id="374" name="semicolon#1"/>
- <GlyphID id="375" name="anoteleia"/>
- <GlyphID id="376" name="hyphen#1"/>
- <GlyphID id="377" name="nbhyphen"/>
- <GlyphID id="378" name="figuredash"/>
- <GlyphID id="379" name="afii00208"/>
- <GlyphID id="380" name="quotereversed"/>
- <GlyphID id="381" name="radicalex"/>
- <GlyphID id="382" name="estimated"/>
- <GlyphID id="383" name="minus"/>
- <GlyphID id="384" name="fraction#1"/>
- <GlyphID id="385" name="dotmath"/>
- <GlyphID id="386" name="fi#1"/>
- <GlyphID id="387" name="fl#1"/>
- <GlyphID id="388" name="foursuperiour"/>
- <GlyphID id="389" name="dotlessj"/>
- <GlyphID id="390" name=".notdef#18"/>
- </GlyphOrder>
-
- <head>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="1.0"/>
- <fontRevision value="1.19999694824"/>
- <checkSumAdjustment value="0x78bacbf6"/>
- <magicNumber value="0x5f0f3cf5"/>
- <flags value="00000000 00001111"/>
- <unitsPerEm value="2048"/>
- <created value="Fri Oct 12 14:06:12 2001"/>
- <modified value="Fri Oct 12 11:04:28 2001"/>
- <xMin value="-441"/>
- <yMin value="-432"/>
- <xMax value="2024"/>
- <yMax value="2033"/>
- <macStyle value="00000000 00000000"/>
- <lowestRecPPEM value="12"/>
- <fontDirectionHint value="2"/>
- <indexToLocFormat value="0"/>
- <glyphDataFormat value="0"/>
- </head>
-
- <hhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="-432"/>
- <lineGap value="0"/>
- <advanceWidthMax value="2079"/>
- <minLeftSideBearing value="-441"/>
- <minRightSideBearing value="-440"/>
- <xMaxExtent value="2024"/>
- <caretSlopeRise value="1"/>
- <caretSlopeRun value="0"/>
- <caretOffset value="0"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfHMetrics value="391"/>
- </hhea>
-
- <maxp>
- <!-- Most of this table will be recalculated by the compiler -->
- <tableVersion value="0x10000"/>
- <numGlyphs value="391"/>
- <maxPoints value="82"/>
- <maxContours value="7"/>
- <maxCompositePoints value="75"/>
- <maxCompositeContours value="4"/>
- <maxZones value="2"/>
- <maxTwilightPoints value="4"/>
- <maxStorage value="0"/>
- <maxFunctionDefs value="15"/>
- <maxInstructionDefs value="0"/>
- <maxStackElements value="2048"/>
- <maxSizeOfInstructions value="183"/>
- <maxComponentElements value="2"/>
- <maxComponentDepth value="1"/>
- </maxp>
-
- <OS_2>
- <version value="2"/>
- <xAvgCharWidth value="904"/>
- <usWeightClass value="400"/>
- <usWidthClass value="5"/>
- <fsType value="00000000 00000000"/>
- <ySubscriptXSize value="1434"/>
- <ySubscriptYSize value="1331"/>
- <ySubscriptXOffset value="0"/>
- <ySubscriptYOffset value="283"/>
- <ySuperscriptXSize value="1434"/>
- <ySuperscriptYSize value="1331"/>
- <ySuperscriptXOffset value="0"/>
- <ySuperscriptYOffset value="977"/>
- <yStrikeoutSize value="0"/>
- <yStrikeoutPosition value="0"/>
- <sFamilyClass value="2048"/>
- <panose>
- <bFamilyType value="2"/>
- <bSerifStyle value="11"/>
- <bWeight value="6"/>
- <bProportion value="0"/>
- <bContrast value="0"/>
- <bStrokeVariation value="0"/>
- <bArmStyle value="0"/>
- <bLetterForm value="0"/>
- <bMidline value="0"/>
- <bXHeight value="0"/>
- </panose>
- <ulUnicodeRange1 value="00000000 00000000 00000000 00000111"/>
- <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
- <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
- <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
- <achVendID value="B&amp;H "/>
- <fsSelection value="00000000 01000000"/>
- <fsFirstCharIndex value="32"/>
- <fsLastCharIndex value="64258"/>
- <sTypoAscender value="1604"/>
- <sTypoDescender value="-420"/>
- <sTypoLineGap value="167"/>
- <usWinAscent value="1935"/>
- <usWinDescent value="432"/>
- <ulCodePageRange1 value="00000000 00000000 00000000 10010011"/>
- <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
- <sxHeight value="0"/>
- <sCapHeight value="0"/>
- <usDefaultChar value="0"/>
- <usBreakChar value="0"/>
- <usMaxContex value="0"/>
- </OS_2>
-
- <hmtx>
- <mtx name=".notdef" width="569" lsb="57"/>
- <mtx name=".notdef#1" width="0" lsb="0"/>
- <mtx name=".notdef#10" width="569" lsb="0"/>
- <mtx name=".notdef#11" width="569" lsb="0"/>
- <mtx name=".notdef#12" width="569" lsb="0"/>
- <mtx name=".notdef#13" width="569" lsb="0"/>
- <mtx name=".notdef#14" width="569" lsb="0"/>
- <mtx name=".notdef#15" width="569" lsb="0"/>
- <mtx name=".notdef#16" width="1139" lsb="0"/>
- <mtx name=".notdef#17" width="569" lsb="0"/>
- <mtx name=".notdef#18" width="569" lsb="0"/>
- <mtx name=".notdef#2" width="569" lsb="0"/>
- <mtx name=".notdef#3" width="569" lsb="0"/>
- <mtx name=".notdef#4" width="569" lsb="0"/>
- <mtx name=".notdef#5" width="569" lsb="0"/>
- <mtx name=".notdef#6" width="569" lsb="0"/>
- <mtx name=".notdef#7" width="569" lsb="0"/>
- <mtx name=".notdef#8" width="569" lsb="0"/>
- <mtx name=".notdef#9" width="569" lsb="0"/>
- <mtx name="A" width="1366" lsb="19"/>
- <mtx name="AE" width="2048" lsb="19"/>
- <mtx name="Aacute" width="1366" lsb="19"/>
- <mtx name="Abreve" width="1371" lsb="21"/>
- <mtx name="Acircumflex" width="1366" lsb="19"/>
- <mtx name="Adieresis" width="1366" lsb="19"/>
- <mtx name="Agrave" width="1366" lsb="19"/>
- <mtx name="Amacron" width="1371" lsb="21"/>
- <mtx name="Aogonek" width="1366" lsb="19"/>
- <mtx name="Aring" width="1366" lsb="19"/>
- <mtx name="Atilde" width="1366" lsb="19"/>
- <mtx name="B" width="1366" lsb="165"/>
- <mtx name="C" width="1479" lsb="116"/>
- <mtx name="Cacute" width="1479" lsb="116"/>
- <mtx name="Ccaron" width="1479" lsb="116"/>
- <mtx name="Ccedilla" width="1479" lsb="116"/>
- <mtx name="Ccircumflex" width="1479" lsb="116"/>
- <mtx name="Cdotaccent" width="1479" lsb="116"/>
- <mtx name="D" width="1479" lsb="165"/>
- <mtx name="Dcaron" width="1479" lsb="165"/>
- <mtx name="Dcroat" width="1479" lsb="5"/>
- <mtx name="E" width="1366" lsb="191"/>
- <mtx name="Eacute" width="1366" lsb="191"/>
- <mtx name="Ebreve" width="1366" lsb="191"/>
- <mtx name="Ecaron" width="1366" lsb="191"/>
- <mtx name="Ecircumflex" width="1366" lsb="191"/>
- <mtx name="Edieresis" width="1366" lsb="191"/>
- <mtx name="Edotaccent" width="1366" lsb="191"/>
- <mtx name="Egrave" width="1366" lsb="191"/>
- <mtx name="Emacron" width="1366" lsb="191"/>
- <mtx name="Eng" width="1479" lsb="165"/>
- <mtx name="Eogonek" width="1366" lsb="191"/>
- <mtx name="Eth" width="1479" lsb="5"/>
- <mtx name="Euro" width="1139" lsb="0"/>
- <mtx name="Euro#1" width="1139" lsb="0"/>
- <mtx name="F" width="1251" lsb="191"/>
- <mtx name="G" width="1593" lsb="93"/>
- <mtx name="Gbreve" width="1593" lsb="93"/>
- <mtx name="Gcircumflex" width="1593" lsb="93"/>
- <mtx name="Gcommaaccent" width="1593" lsb="93"/>
- <mtx name="Gdotaccent" width="1593" lsb="93"/>
- <mtx name="H" width="1479" lsb="165"/>
- <mtx name="Hbar" width="1479" lsb="17"/>
- <mtx name="Hcircumflex" width="1479" lsb="165"/>
- <mtx name="I" width="569" lsb="180"/>
- <mtx name="IJ" width="1505" lsb="180"/>
- <mtx name="Iacute" width="569" lsb="137"/>
- <mtx name="Ibreve" width="569" lsb="-48"/>
- <mtx name="Icircumflex" width="569" lsb="-65"/>
- <mtx name="Idieresis" width="569" lsb="1"/>
- <mtx name="Idotaccent" width="569" lsb="180"/>
- <mtx name="Igrave" width="569" lsb="-36"/>
- <mtx name="Imacron" width="569" lsb="-36"/>
- <mtx name="Iogonek" width="569" lsb="120"/>
- <mtx name="Itilde" width="569" lsb="-48"/>
- <mtx name="J" width="1024" lsb="49"/>
- <mtx name="Jcircumflex" width="1024" lsb="49"/>
- <mtx name="K" width="1366" lsb="191"/>
- <mtx name="Kcommaaccent" width="1366" lsb="191"/>
- <mtx name="L" width="1139" lsb="165"/>
- <mtx name="Lacute" width="1139" lsb="165"/>
- <mtx name="Lcaron" width="1139" lsb="165"/>
- <mtx name="Lcommaaccent" width="1139" lsb="165"/>
- <mtx name="Ldot" width="1139" lsb="165"/>
- <mtx name="Lslash" width="1139" lsb="17"/>
- <mtx name="M" width="1706" lsb="165"/>
- <mtx name="N" width="1479" lsb="165"/>
- <mtx name="Nacute" width="1479" lsb="165"/>
- <mtx name="Ncaron" width="1479" lsb="165"/>
- <mtx name="Ncommaaccent" width="1479" lsb="165"/>
- <mtx name="Ntilde" width="1479" lsb="165"/>
- <mtx name="O" width="1593" lsb="93"/>
- <mtx name="OE" width="2048" lsb="93"/>
- <mtx name="Oacute" width="1593" lsb="92"/>
- <mtx name="Obreve" width="1593" lsb="93"/>
- <mtx name="Ocircumflex" width="1593" lsb="92"/>
- <mtx name="Odieresis" width="1593" lsb="92"/>
- <mtx name="Ograve" width="1593" lsb="92"/>
- <mtx name="Ohungarumlaut" width="1593" lsb="93"/>
- <mtx name="Omacron" width="1593" lsb="93"/>
- <mtx name="Oslash" width="1593" lsb="93"/>
- <mtx name="Otilde" width="1593" lsb="92"/>
- <mtx name="P" width="1366" lsb="167"/>
- <mtx name="Q" width="1593" lsb="93"/>
- <mtx name="R" width="1479" lsb="165"/>
- <mtx name="Racute" width="1479" lsb="165"/>
- <mtx name="Rcaron" width="1479" lsb="165"/>
- <mtx name="Rcommaaccent" width="1479" lsb="165"/>
- <mtx name="S" width="1366" lsb="120"/>
- <mtx name="Sacute" width="1366" lsb="120"/>
- <mtx name="Scaron" width="1366" lsb="120"/>
- <mtx name="Scedilla" width="1366" lsb="120"/>
- <mtx name="Scircumflex" width="1366" lsb="120"/>
- <mtx name="Scommaaccent" width="1366" lsb="120"/>
- <mtx name="T" width="1251" lsb="20"/>
- <mtx name="Tbar" width="1251" lsb="20"/>
- <mtx name="Tcaron" width="1251" lsb="20"/>
- <mtx name="Tcommaaccent" width="1251" lsb="20"/>
- <mtx name="Tcommabelow" width="1251" lsb="20"/>
- <mtx name="Thorn" width="1366" lsb="167"/>
- <mtx name="U" width="1479" lsb="166"/>
- <mtx name="Uacute" width="1479" lsb="166"/>
- <mtx name="Ubreve" width="1479" lsb="166"/>
- <mtx name="Ucircumflex" width="1479" lsb="166"/>
- <mtx name="Udieresis" width="1479" lsb="166"/>
- <mtx name="Ugrave" width="1479" lsb="166"/>
- <mtx name="Uhungarumlaut" width="1479" lsb="166"/>
- <mtx name="Umacron" width="1479" lsb="166"/>
- <mtx name="Unterkomma" width="682" lsb="170"/>
- <mtx name="Uogonek" width="1479" lsb="166"/>
- <mtx name="Uring" width="1479" lsb="166"/>
- <mtx name="Utilde" width="1479" lsb="166"/>
- <mtx name="V" width="1366" lsb="36"/>
- <mtx name="W" width="1933" lsb="25"/>
- <mtx name="Wcircumflex" width="1933" lsb="25"/>
- <mtx name="X" width="1366" lsb="28"/>
- <mtx name="Y" width="1366" lsb="30"/>
- <mtx name="Yacute" width="1366" lsb="30"/>
- <mtx name="Ycircumflex" width="1366" lsb="30"/>
- <mtx name="Ydieresis" width="1366" lsb="30"/>
- <mtx name="Z" width="1251" lsb="101"/>
- <mtx name="Zacute" width="1251" lsb="101"/>
- <mtx name="Zcaron" width="1251" lsb="101"/>
- <mtx name="Zdotaccent" width="1251" lsb="101"/>
- <mtx name="a" width="1139" lsb="95"/>
- <mtx name="aacute" width="1139" lsb="95"/>
- <mtx name="abreve" width="1153" lsb="105"/>
- <mtx name="acircumflex" width="1139" lsb="95"/>
- <mtx name="acute" width="682" lsb="107"/>
- <mtx name="adieresis" width="1139" lsb="95"/>
- <mtx name="ae" width="1821" lsb="95"/>
- <mtx name="afii00208" width="2048" lsb="99"/>
- <mtx name="agrave" width="1139" lsb="95"/>
- <mtx name="amacron" width="1153" lsb="105"/>
- <mtx name="ampersand" width="1366" lsb="56"/>
- <mtx name="anoteleia" width="569" lsb="161"/>
- <mtx name="aogonek" width="1139" lsb="95"/>
- <mtx name="aring" width="1139" lsb="95"/>
- <mtx name="asciicircum" width="960" lsb="36"/>
- <mtx name="asciitilde" width="1196" lsb="104"/>
- <mtx name="asterisk" width="797" lsb="39"/>
- <mtx name="at" width="2079" lsb="253"/>
- <mtx name="atilde" width="1139" lsb="95"/>
- <mtx name="b" width="1139" lsb="154"/>
- <mtx name="backslash" width="569" lsb="-59"/>
- <mtx name="bar" width="532" lsb="192"/>
- <mtx name="braceleft" width="684" lsb="25"/>
- <mtx name="braceright" width="684" lsb="116"/>
- <mtx name="bracketleft" width="569" lsb="149"/>
- <mtx name="bracketright" width="569" lsb="26"/>
- <mtx name="breve" width="682" lsb="8"/>
- <mtx name="brokenbar" width="532" lsb="192"/>
- <mtx name="bullet" width="717" lsb="81"/>
- <mtx name="c" width="1024" lsb="86"/>
- <mtx name="cacute" width="1024" lsb="86"/>
- <mtx name="caron" width="682" lsb="-9"/>
- <mtx name="ccaron" width="1024" lsb="86"/>
- <mtx name="ccedilla" width="1024" lsb="86"/>
- <mtx name="ccircumflex" width="1024" lsb="86"/>
- <mtx name="cdotaccent" width="1024" lsb="86"/>
- <mtx name="cedilla" width="682" lsb="168"/>
- <mtx name="cent" width="1139" lsb="173"/>
- <mtx name="circumflex" width="682" lsb="-9"/>
- <mtx name="colon" width="569" lsb="186"/>
- <mtx name="comma" width="569" lsb="161"/>
- <mtx name="copyright" width="1509" lsb="15"/>
- <mtx name="currency" width="1139" lsb="122"/>
- <mtx name="d" width="1139" lsb="86"/>
- <mtx name="dagger" width="1139" lsb="150"/>
- <mtx name="daggerdbl" width="1139" lsb="150"/>
- <mtx name="dcaron" width="1259" lsb="86"/>
- <mtx name="dcroat" width="1139" lsb="86"/>
- <mtx name="degree" width="819" lsb="114"/>
- <mtx name="dieresis" width="682" lsb="57"/>
- <mtx name="divide" width="1196" lsb="104"/>
- <mtx name="dollar" width="1139" lsb="103"/>
- <mtx name="dotaccent" width="682" lsb="242"/>
- <mtx name="dotlessi" width="455" lsb="129"/>
- <mtx name="dotlessj" width="455" lsb="-155"/>
- <mtx name="dotmath" width="569" lsb="161"/>
- <mtx name="e" width="1139" lsb="86"/>
- <mtx name="eacute" width="1139" lsb="86"/>
- <mtx name="ebreve" width="1139" lsb="86"/>
- <mtx name="ecaron" width="1139" lsb="86"/>
- <mtx name="ecircumflex" width="1139" lsb="86"/>
- <mtx name="edieresis" width="1139" lsb="86"/>
- <mtx name="edotaccent" width="1139" lsb="86"/>
- <mtx name="egrave" width="1139" lsb="86"/>
- <mtx name="eight" width="1139" lsb="99"/>
- <mtx name="ellipsis" width="2048" lsb="247"/>
- <mtx name="emacron" width="1139" lsb="86"/>
- <mtx name="emdash" width="2048" lsb="99"/>
- <mtx name="endash" width="1139" lsb="101"/>
- <mtx name="eng" width="1139" lsb="154"/>
- <mtx name="eogonek" width="1139" lsb="86"/>
- <mtx name="equal" width="1196" lsb="104"/>
- <mtx name="estimated" width="1139" lsb="86"/>
- <mtx name="eth" width="1139" lsb="86"/>
- <mtx name="exclam" width="569" lsb="186"/>
- <mtx name="exclamdown" width="682" lsb="242"/>
- <mtx name="f" width="569" lsb="31"/>
- <mtx name="fi" width="1024" lsb="31"/>
- <mtx name="fi#1" width="1024" lsb="31"/>
- <mtx name="figuredash" width="1139" lsb="101"/>
- <mtx name="five" width="1139" lsb="163"/>
- <mtx name="fl" width="1024" lsb="31"/>
- <mtx name="fl#1" width="1024" lsb="31"/>
- <mtx name="florin" width="1139" lsb="49"/>
- <mtx name="four" width="1139" lsb="31"/>
- <mtx name="foursuperiour" width="682" lsb="3"/>
- <mtx name="fraction" width="342" lsb="-441"/>
- <mtx name="fraction#1" width="342" lsb="-441"/>
- <mtx name="g" width="1139" lsb="93"/>
- <mtx name="gbreve" width="1139" lsb="93"/>
- <mtx name="gcircumflex" width="1139" lsb="93"/>
- <mtx name="gcommaaccent" width="1139" lsb="93"/>
- <mtx name="gdotaccent" width="1139" lsb="93"/>
- <mtx name="germandbls" width="1251" lsb="129"/>
- <mtx name="grave" width="682" lsb="106"/>
- <mtx name="greater" width="1196" lsb="104"/>
- <mtx name="guillemotleft" width="1139" lsb="115"/>
- <mtx name="guillemotright" width="1139" lsb="136"/>
- <mtx name="guilsinglleft" width="682" lsb="74"/>
- <mtx name="guilsinglright" width="682" lsb="114"/>
- <mtx name="h" width="1139" lsb="154"/>
- <mtx name="hbar" width="1139" lsb="6"/>
- <mtx name="hcircumflex" width="1139" lsb="154"/>
- <mtx name="hungarumlaut" width="682" lsb="-51"/>
- <mtx name="hyphen" width="682" lsb="88"/>
- <mtx name="hyphen#1" width="682" lsb="88"/>
- <mtx name="i" width="455" lsb="129"/>
- <mtx name="iacute" width="455" lsb="79"/>
- <mtx name="ibreve" width="455" lsb="-106"/>
- <mtx name="icircumflex" width="455" lsb="-123"/>
- <mtx name="idieresis" width="455" lsb="-56"/>
- <mtx name="igrave" width="455" lsb="-94"/>
- <mtx name="ij" width="909" lsb="129"/>
- <mtx name="imacron" width="455" lsb="-94"/>
- <mtx name="iogonek" width="455" lsb="61"/>
- <mtx name="itilde" width="455" lsb="-106"/>
- <mtx name="j" width="455" lsb="-155"/>
- <mtx name="jcircumflex" width="455" lsb="-155"/>
- <mtx name="k" width="1024" lsb="154"/>
- <mtx name="kcommaaccent" width="1024" lsb="154"/>
- <mtx name="kgreenlandic" width="1024" lsb="154"/>
- <mtx name="l" width="455" lsb="129"/>
- <mtx name="lacute" width="455" lsb="79"/>
- <mtx name="lcaron" width="597" lsb="129"/>
- <mtx name="lcommaaccent" width="455" lsb="79"/>
- <mtx name="ldot" width="684" lsb="129"/>
- <mtx name="less" width="1196" lsb="104"/>
- <mtx name="logicalnot" width="1196" lsb="86"/>
- <mtx name="longs" width="455" lsb="8"/>
- <mtx name="lslash" width="455" lsb="-7"/>
- <mtx name="m" width="1706" lsb="154"/>
- <mtx name="macron" width="682" lsb="20"/>
- <mtx name="macron#1" width="1139" lsb="99"/>
- <mtx name="minus" width="1196" lsb="104"/>
- <mtx name="mu" width="1139" lsb="142"/>
- <mtx name="multiply" width="1196" lsb="118"/>
- <mtx name="n" width="1139" lsb="154"/>
- <mtx name="nacute" width="1139" lsb="154"/>
- <mtx name="napostrophe" width="1237" lsb="0"/>
- <mtx name="nbhyphen" width="682" lsb="88"/>
- <mtx name="ncaron" width="1139" lsb="154"/>
- <mtx name="ncommaaccent" width="1139" lsb="154"/>
- <mtx name="nine" width="1139" lsb="84"/>
- <mtx name="nonbreakingspace" width="569" lsb="0"/>
- <mtx name="ntilde" width="1139" lsb="154"/>
- <mtx name="numbersign" width="1139" lsb="25"/>
- <mtx name="o" width="1139" lsb="86"/>
- <mtx name="oacute" width="1139" lsb="86"/>
- <mtx name="obreve" width="1139" lsb="86"/>
- <mtx name="ocircumflex" width="1139" lsb="86"/>
- <mtx name="odieresis" width="1139" lsb="86"/>
- <mtx name="oe" width="1933" lsb="86"/>
- <mtx name="ogonek" width="682" lsb="170"/>
- <mtx name="ograve" width="1139" lsb="86"/>
- <mtx name="ohungarumlaut" width="1139" lsb="86"/>
- <mtx name="omacron" width="1139" lsb="86"/>
- <mtx name="one" width="1139" lsb="230"/>
- <mtx name="onehalf" width="1708" lsb="116"/>
- <mtx name="onequarter" width="1708" lsb="116"/>
- <mtx name="onesuperior" width="682" lsb="123"/>
- <mtx name="ordfeminine" width="758" lsb="86"/>
- <mtx name="ordmasculine" width="748" lsb="74"/>
- <mtx name="oslash" width="1251" lsb="143"/>
- <mtx name="otilde" width="1139" lsb="86"/>
- <mtx name="p" width="1139" lsb="154"/>
- <mtx name="paragraph" width="1100" lsb="88"/>
- <mtx name="parenleft" width="682" lsb="131"/>
- <mtx name="parenright" width="682" lsb="82"/>
- <mtx name="percent" width="1821" lsb="112"/>
- <mtx name="period" width="569" lsb="161"/>
- <mtx name="periodcentered" width="569" lsb="161"/>
- <mtx name="periodcentered#1" width="569" lsb="161"/>
- <mtx name="perthousand" width="2048" lsb="25"/>
- <mtx name="plus" width="1196" lsb="104"/>
- <mtx name="plusminus" width="1196" lsb="104"/>
- <mtx name="q" width="1139" lsb="86"/>
- <mtx name="question" width="1139" lsb="138"/>
- <mtx name="questiondown" width="1251" lsb="185"/>
- <mtx name="quotedbl" width="727" lsb="92"/>
- <mtx name="quotedblbase" width="682" lsb="70"/>
- <mtx name="quotedblleft" width="682" lsb="57"/>
- <mtx name="quotedblright" width="682" lsb="82"/>
- <mtx name="quoteleft" width="455" lsb="92"/>
- <mtx name="quotereversed" width="569" lsb="0"/>
- <mtx name="quoteright" width="455" lsb="116"/>
- <mtx name="quotesinglbase" width="455" lsb="104"/>
- <mtx name="quotesingle" width="391" lsb="72"/>
- <mtx name="r" width="682" lsb="154"/>
- <mtx name="racute" width="682" lsb="154"/>
- <mtx name="radicalex" width="1139" lsb="99"/>
- <mtx name="rcaron" width="682" lsb="2"/>
- <mtx name="rcommaaccent" width="682" lsb="154"/>
- <mtx name="registered" width="1509" lsb="15"/>
- <mtx name="ring" width="682" lsb="114"/>
- <mtx name="s" width="1024" lsb="116"/>
- <mtx name="sacute" width="1024" lsb="116"/>
- <mtx name="scaron" width="1024" lsb="116"/>
- <mtx name="scedilla" width="1024" lsb="116"/>
- <mtx name="scircumflex" width="1024" lsb="116"/>
- <mtx name="scommaaccent" width="1024" lsb="116"/>
- <mtx name="section" width="1139" lsb="129"/>
- <mtx name="semicolon" width="569" lsb="186"/>
- <mtx name="semicolon#1" width="569" lsb="186"/>
- <mtx name="seven" width="1139" lsb="136"/>
- <mtx name="sfthyphen" width="682" lsb="88"/>
- <mtx name="six" width="1139" lsb="84"/>
- <mtx name="slash" width="569" lsb="-59"/>
- <mtx name="space" width="569" lsb="0"/>
- <mtx name="sterling" width="1139" lsb="121"/>
- <mtx name="t" width="569" lsb="29"/>
- <mtx name="tbar" width="569" lsb="29"/>
- <mtx name="tcaron" width="768" lsb="29"/>
- <mtx name="tcommaaccent" width="569" lsb="29"/>
- <mtx name="tcommabelow" width="569" lsb="29"/>
- <mtx name="thorn" width="1139" lsb="154"/>
- <mtx name="three" width="1139" lsb="153"/>
- <mtx name="threequarters" width="1708" lsb="111"/>
- <mtx name="threesuperior" width="682" lsb="74"/>
- <mtx name="tilde" width="682" lsb="8"/>
- <mtx name="trademark" width="2048" lsb="222"/>
- <mtx name="two" width="1139" lsb="102"/>
- <mtx name="twosuperior" width="682" lsb="74"/>
- <mtx name="u" width="1139" lsb="142"/>
- <mtx name="uacute" width="1139" lsb="142"/>
- <mtx name="ubreve" width="1139" lsb="142"/>
- <mtx name="ucircumflex" width="1139" lsb="142"/>
- <mtx name="udieresis" width="1139" lsb="142"/>
- <mtx name="ugrave" width="1139" lsb="142"/>
- <mtx name="uhungarumlaut" width="1139" lsb="142"/>
- <mtx name="umacron" width="1139" lsb="142"/>
- <mtx name="underscore" width="1139" lsb="0"/>
- <mtx name="uogonek" width="1139" lsb="142"/>
- <mtx name="uring" width="1139" lsb="142"/>
- <mtx name="utilde" width="1139" lsb="142"/>
- <mtx name="v" width="1024" lsb="19"/>
- <mtx name="w" width="1479" lsb="11"/>
- <mtx name="wcircumflex" width="1479" lsb="11"/>
- <mtx name="x" width="1024" lsb="28"/>
- <mtx name="y" width="1024" lsb="19"/>
- <mtx name="yacute" width="1024" lsb="19"/>
- <mtx name="ycircumflex" width="1024" lsb="19"/>
- <mtx name="ydieresis" width="1024" lsb="19"/>
- <mtx name="yen" width="1139" lsb="25"/>
- <mtx name="z" width="1024" lsb="74"/>
- <mtx name="zacute" width="1024" lsb="74"/>
- <mtx name="zcaron" width="1024" lsb="74"/>
- <mtx name="zdotaccent" width="1024" lsb="74"/>
- <mtx name="zero" width="1139" lsb="80"/>
- </hmtx>
-
- <cmap>
- <tableVersion version="0"/>
- <cmap_format_0 platformID="1" platEncID="0" language="0">
- <map code="0x0" name=".notdef#1"/>
- <map code="0x1" name=".notdef"/>
- <map code="0x2" name=".notdef"/>
- <map code="0x3" name=".notdef"/>
- <map code="0x4" name=".notdef"/>
- <map code="0x5" name=".notdef"/>
- <map code="0x6" name=".notdef"/>
- <map code="0x7" name=".notdef"/>
- <map code="0x8" name=".notdef#1"/>
- <map code="0x9" name="space"/>
- <map code="0xa" name=".notdef"/>
- <map code="0xb" name=".notdef"/>
- <map code="0xc" name=".notdef"/>
- <map code="0xd" name=".notdef#2"/>
- <map code="0xe" name=".notdef"/>
- <map code="0xf" name=".notdef"/>
- <map code="0x10" name=".notdef"/>
- <map code="0x11" name=".notdef"/>
- <map code="0x12" name=".notdef"/>
- <map code="0x13" name=".notdef"/>
- <map code="0x14" name=".notdef"/>
- <map code="0x15" name=".notdef"/>
- <map code="0x16" name=".notdef"/>
- <map code="0x17" name=".notdef"/>
- <map code="0x18" name=".notdef"/>
- <map code="0x19" name=".notdef"/>
- <map code="0x1a" name=".notdef"/>
- <map code="0x1b" name=".notdef"/>
- <map code="0x1c" name=".notdef"/>
- <map code="0x1d" name=".notdef#1"/>
- <map code="0x1e" name=".notdef"/>
- <map code="0x1f" name=".notdef"/>
- <map code="0x20" name="space"/>
- <map code="0x21" name="exclam"/>
- <map code="0x22" name="quotedbl"/>
- <map code="0x23" name="numbersign"/>
- <map code="0x24" name="dollar"/>
- <map code="0x25" name="percent"/>
- <map code="0x26" name="ampersand"/>
- <map code="0x27" name="quotesingle"/>
- <map code="0x28" name="parenleft"/>
- <map code="0x29" name="parenright"/>
- <map code="0x2a" name="asterisk"/>
- <map code="0x2b" name="plus"/>
- <map code="0x2c" name="comma"/>
- <map code="0x2d" name="hyphen"/>
- <map code="0x2e" name="period"/>
- <map code="0x2f" name="slash"/>
- <map code="0x30" name="zero"/>
- <map code="0x31" name="one"/>
- <map code="0x32" name="two"/>
- <map code="0x33" name="three"/>
- <map code="0x34" name="four"/>
- <map code="0x35" name="five"/>
- <map code="0x36" name="six"/>
- <map code="0x37" name="seven"/>
- <map code="0x38" name="eight"/>
- <map code="0x39" name="nine"/>
- <map code="0x3a" name="colon"/>
- <map code="0x3b" name="semicolon"/>
- <map code="0x3c" name="less"/>
- <map code="0x3d" name="equal"/>
- <map code="0x3e" name="greater"/>
- <map code="0x3f" name="question"/>
- <map code="0x40" name="at"/>
- <map code="0x41" name="A"/>
- <map code="0x42" name="B"/>
- <map code="0x43" name="C"/>
- <map code="0x44" name="D"/>
- <map code="0x45" name="E"/>
- <map code="0x46" name="F"/>
- <map code="0x47" name="G"/>
- <map code="0x48" name="H"/>
- <map code="0x49" name="I"/>
- <map code="0x4a" name="J"/>
- <map code="0x4b" name="K"/>
- <map code="0x4c" name="L"/>
- <map code="0x4d" name="M"/>
- <map code="0x4e" name="N"/>
- <map code="0x4f" name="O"/>
- <map code="0x50" name="P"/>
- <map code="0x51" name="Q"/>
- <map code="0x52" name="R"/>
- <map code="0x53" name="S"/>
- <map code="0x54" name="T"/>
- <map code="0x55" name="U"/>
- <map code="0x56" name="V"/>
- <map code="0x57" name="W"/>
- <map code="0x58" name="X"/>
- <map code="0x59" name="Y"/>
- <map code="0x5a" name="Z"/>
- <map code="0x5b" name="bracketleft"/>
- <map code="0x5c" name="backslash"/>
- <map code="0x5d" name="bracketright"/>
- <map code="0x5e" name="asciicircum"/>
- <map code="0x5f" name="underscore"/>
- <map code="0x60" name="grave"/>
- <map code="0x61" name="a"/>
- <map code="0x62" name="b"/>
- <map code="0x63" name="c"/>
- <map code="0x64" name="d"/>
- <map code="0x65" name="e"/>
- <map code="0x66" name="f"/>
- <map code="0x67" name="g"/>
- <map code="0x68" name="h"/>
- <map code="0x69" name="i"/>
- <map code="0x6a" name="j"/>
- <map code="0x6b" name="k"/>
- <map code="0x6c" name="l"/>
- <map code="0x6d" name="m"/>
- <map code="0x6e" name="n"/>
- <map code="0x6f" name="o"/>
- <map code="0x70" name="p"/>
- <map code="0x71" name="q"/>
- <map code="0x72" name="r"/>
- <map code="0x73" name="s"/>
- <map code="0x74" name="t"/>
- <map code="0x75" name="u"/>
- <map code="0x76" name="v"/>
- <map code="0x77" name="w"/>
- <map code="0x78" name="x"/>
- <map code="0x79" name="y"/>
- <map code="0x7a" name="z"/>
- <map code="0x7b" name="braceleft"/>
- <map code="0x7c" name="bar"/>
- <map code="0x7d" name="braceright"/>
- <map code="0x7e" name="asciitilde"/>
- <map code="0x7f" name=".notdef"/>
- <map code="0x80" name="Adieresis"/>
- <map code="0x81" name="Aring"/>
- <map code="0x82" name="Ccedilla"/>
- <map code="0x83" name="Eacute"/>
- <map code="0x84" name="Ntilde"/>
- <map code="0x85" name="Odieresis"/>
- <map code="0x86" name="Udieresis"/>
- <map code="0x87" name="aacute"/>
- <map code="0x88" name="agrave"/>
- <map code="0x89" name="acircumflex"/>
- <map code="0x8a" name="adieresis"/>
- <map code="0x8b" name="atilde"/>
- <map code="0x8c" name="aring"/>
- <map code="0x8d" name="ccedilla"/>
- <map code="0x8e" name="eacute"/>
- <map code="0x8f" name="egrave"/>
- <map code="0x90" name="ecircumflex"/>
- <map code="0x91" name="edieresis"/>
- <map code="0x92" name="iacute"/>
- <map code="0x93" name="igrave"/>
- <map code="0x94" name="icircumflex"/>
- <map code="0x95" name="idieresis"/>
- <map code="0x96" name="ntilde"/>
- <map code="0x97" name="oacute"/>
- <map code="0x98" name="ograve"/>
- <map code="0x99" name="ocircumflex"/>
- <map code="0x9a" name="odieresis"/>
- <map code="0x9b" name="otilde"/>
- <map code="0x9c" name="uacute"/>
- <map code="0x9d" name="ugrave"/>
- <map code="0x9e" name="ucircumflex"/>
- <map code="0x9f" name="udieresis"/>
- <map code="0xa0" name="dagger"/>
- <map code="0xa1" name="degree"/>
- <map code="0xa2" name="cent"/>
- <map code="0xa3" name="sterling"/>
- <map code="0xa4" name="section"/>
- <map code="0xa5" name="bullet"/>
- <map code="0xa6" name="paragraph"/>
- <map code="0xa7" name="germandbls"/>
- <map code="0xa8" name="registered"/>
- <map code="0xa9" name="copyright"/>
- <map code="0xaa" name="trademark"/>
- <map code="0xab" name="acute"/>
- <map code="0xac" name="dieresis"/>
- <map code="0xad" name=".notdef"/>
- <map code="0xae" name="AE"/>
- <map code="0xaf" name="Oslash"/>
- <map code="0xb0" name=".notdef"/>
- <map code="0xb1" name="plusminus"/>
- <map code="0xb2" name=".notdef"/>
- <map code="0xb3" name=".notdef"/>
- <map code="0xb4" name="yen"/>
- <map code="0xb5" name="mu"/>
- <map code="0xb6" name=".notdef"/>
- <map code="0xb7" name=".notdef"/>
- <map code="0xb8" name=".notdef"/>
- <map code="0xb9" name=".notdef"/>
- <map code="0xba" name=".notdef"/>
- <map code="0xbb" name="ordfeminine"/>
- <map code="0xbc" name="ordmasculine"/>
- <map code="0xbd" name=".notdef"/>
- <map code="0xbe" name="ae"/>
- <map code="0xbf" name="oslash"/>
- <map code="0xc0" name="questiondown"/>
- <map code="0xc1" name="exclamdown"/>
- <map code="0xc2" name="logicalnot"/>
- <map code="0xc3" name=".notdef"/>
- <map code="0xc4" name="florin"/>
- <map code="0xc5" name=".notdef"/>
- <map code="0xc6" name=".notdef"/>
- <map code="0xc7" name="guillemotleft"/>
- <map code="0xc8" name="guillemotright"/>
- <map code="0xc9" name="ellipsis"/>
- <map code="0xca" name=".notdef#16"/>
- <map code="0xcb" name="Agrave"/>
- <map code="0xcc" name="Atilde"/>
- <map code="0xcd" name="Otilde"/>
- <map code="0xce" name="OE"/>
- <map code="0xcf" name="oe"/>
- <map code="0xd0" name="endash"/>
- <map code="0xd1" name="emdash"/>
- <map code="0xd2" name="quotedblleft"/>
- <map code="0xd3" name="quotedblright"/>
- <map code="0xd4" name="quoteleft"/>
- <map code="0xd5" name="quoteright"/>
- <map code="0xd6" name="divide"/>
- <map code="0xd7" name=".notdef"/>
- <map code="0xd8" name="ydieresis"/>
- <map code="0xd9" name="Ydieresis"/>
- <map code="0xda" name="fraction"/>
- <map code="0xdb" name="currency"/>
- <map code="0xdc" name="guilsinglleft"/>
- <map code="0xdd" name="guilsinglright"/>
- <map code="0xde" name="fi"/>
- <map code="0xdf" name="fl"/>
- <map code="0xe0" name="daggerdbl"/>
- <map code="0xe1" name="periodcentered"/>
- <map code="0xe2" name="quotesinglbase"/>
- <map code="0xe3" name="quotedblbase"/>
- <map code="0xe4" name="perthousand"/>
- <map code="0xe5" name="Acircumflex"/>
- <map code="0xe6" name="Ecircumflex"/>
- <map code="0xe7" name="Aacute"/>
- <map code="0xe8" name="Edieresis"/>
- <map code="0xe9" name="Egrave"/>
- <map code="0xea" name="Iacute"/>
- <map code="0xeb" name="Icircumflex"/>
- <map code="0xec" name="Idieresis"/>
- <map code="0xed" name="Igrave"/>
- <map code="0xee" name="Oacute"/>
- <map code="0xef" name="Ocircumflex"/>
- <map code="0xf0" name="Euro"/>
- <map code="0xf1" name="Ograve"/>
- <map code="0xf2" name="Uacute"/>
- <map code="0xf3" name="Ucircumflex"/>
- <map code="0xf4" name="Ugrave"/>
- <map code="0xf5" name="dotlessi"/>
- <map code="0xf6" name="circumflex"/>
- <map code="0xf7" name="tilde"/>
- <map code="0xf8" name="macron"/>
- <map code="0xf9" name="breve"/>
- <map code="0xfa" name="dotaccent"/>
- <map code="0xfb" name="ring"/>
- <map code="0xfc" name="cedilla"/>
- <map code="0xfd" name="hungarumlaut"/>
- <map code="0xfe" name="ogonek"/>
- <map code="0xff" name="caron"/>
- </cmap_format_0>
- <cmap_format_4 platformID="3" platEncID="1" language="0">
- <map code="0x20" name="space"/><!-- SPACE -->
- <map code="0x21" name="exclam"/><!-- EXCLAMATION MARK -->
- <map code="0x22" name="quotedbl"/><!-- QUOTATION MARK -->
- <map code="0x23" name="numbersign"/><!-- NUMBER SIGN -->
- <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
- <map code="0x25" name="percent"/><!-- PERCENT SIGN -->
- <map code="0x26" name="ampersand"/><!-- AMPERSAND -->
- <map code="0x27" name="quotesingle"/><!-- APOSTROPHE -->
- <map code="0x28" name="parenleft"/><!-- LEFT PARENTHESIS -->
- <map code="0x29" name="parenright"/><!-- RIGHT PARENTHESIS -->
- <map code="0x2a" name="asterisk"/><!-- ASTERISK -->
- <map code="0x2b" name="plus"/><!-- PLUS SIGN -->
- <map code="0x2c" name="comma"/><!-- COMMA -->
- <map code="0x2d" name="hyphen"/><!-- HYPHEN-MINUS -->
- <map code="0x2e" name="period"/><!-- FULL STOP -->
- <map code="0x2f" name="slash"/><!-- SOLIDUS -->
- <map code="0x30" name="zero"/><!-- DIGIT ZERO -->
- <map code="0x31" name="one"/><!-- DIGIT ONE -->
- <map code="0x32" name="two"/><!-- DIGIT TWO -->
- <map code="0x33" name="three"/><!-- DIGIT THREE -->
- <map code="0x34" name="four"/><!-- DIGIT FOUR -->
- <map code="0x35" name="five"/><!-- DIGIT FIVE -->
- <map code="0x36" name="six"/><!-- DIGIT SIX -->
- <map code="0x37" name="seven"/><!-- DIGIT SEVEN -->
- <map code="0x38" name="eight"/><!-- DIGIT EIGHT -->
- <map code="0x39" name="nine"/><!-- DIGIT NINE -->
- <map code="0x3a" name="colon"/><!-- COLON -->
- <map code="0x3b" name="semicolon"/><!-- SEMICOLON -->
- <map code="0x3c" name="less"/><!-- LESS-THAN SIGN -->
- <map code="0x3d" name="equal"/><!-- EQUALS SIGN -->
- <map code="0x3e" name="greater"/><!-- GREATER-THAN SIGN -->
- <map code="0x3f" name="question"/><!-- QUESTION MARK -->
- <map code="0x40" name="at"/><!-- COMMERCIAL AT -->
- <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
- <map code="0x42" name="B"/><!-- LATIN CAPITAL LETTER B -->
- <map code="0x43" name="C"/><!-- LATIN CAPITAL LETTER C -->
- <map code="0x44" name="D"/><!-- LATIN CAPITAL LETTER D -->
- <map code="0x45" name="E"/><!-- LATIN CAPITAL LETTER E -->
- <map code="0x46" name="F"/><!-- LATIN CAPITAL LETTER F -->
- <map code="0x47" name="G"/><!-- LATIN CAPITAL LETTER G -->
- <map code="0x48" name="H"/><!-- LATIN CAPITAL LETTER H -->
- <map code="0x49" name="I"/><!-- LATIN CAPITAL LETTER I -->
- <map code="0x4a" name="J"/><!-- LATIN CAPITAL LETTER J -->
- <map code="0x4b" name="K"/><!-- LATIN CAPITAL LETTER K -->
- <map code="0x4c" name="L"/><!-- LATIN CAPITAL LETTER L -->
- <map code="0x4d" name="M"/><!-- LATIN CAPITAL LETTER M -->
- <map code="0x4e" name="N"/><!-- LATIN CAPITAL LETTER N -->
- <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
- <map code="0x50" name="P"/><!-- LATIN CAPITAL LETTER P -->
- <map code="0x51" name="Q"/><!-- LATIN CAPITAL LETTER Q -->
- <map code="0x52" name="R"/><!-- LATIN CAPITAL LETTER R -->
- <map code="0x53" name="S"/><!-- LATIN CAPITAL LETTER S -->
- <map code="0x54" name="T"/><!-- LATIN CAPITAL LETTER T -->
- <map code="0x55" name="U"/><!-- LATIN CAPITAL LETTER U -->
- <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
- <map code="0x57" name="W"/><!-- LATIN CAPITAL LETTER W -->
- <map code="0x58" name="X"/><!-- LATIN CAPITAL LETTER X -->
- <map code="0x59" name="Y"/><!-- LATIN CAPITAL LETTER Y -->
- <map code="0x5a" name="Z"/><!-- LATIN CAPITAL LETTER Z -->
- <map code="0x5b" name="bracketleft"/><!-- LEFT SQUARE BRACKET -->
- <map code="0x5c" name="backslash"/><!-- REVERSE SOLIDUS -->
- <map code="0x5d" name="bracketright"/><!-- RIGHT SQUARE BRACKET -->
- <map code="0x5e" name="asciicircum"/><!-- CIRCUMFLEX ACCENT -->
- <map code="0x5f" name="underscore"/><!-- LOW LINE -->
- <map code="0x60" name="grave"/><!-- GRAVE ACCENT -->
- <map code="0x61" name="a"/><!-- LATIN SMALL LETTER A -->
- <map code="0x62" name="b"/><!-- LATIN SMALL LETTER B -->
- <map code="0x63" name="c"/><!-- LATIN SMALL LETTER C -->
- <map code="0x64" name="d"/><!-- LATIN SMALL LETTER D -->
- <map code="0x65" name="e"/><!-- LATIN SMALL LETTER E -->
- <map code="0x66" name="f"/><!-- LATIN SMALL LETTER F -->
- <map code="0x67" name="g"/><!-- LATIN SMALL LETTER G -->
- <map code="0x68" name="h"/><!-- LATIN SMALL LETTER H -->
- <map code="0x69" name="i"/><!-- LATIN SMALL LETTER I -->
- <map code="0x6a" name="j"/><!-- LATIN SMALL LETTER J -->
- <map code="0x6b" name="k"/><!-- LATIN SMALL LETTER K -->
- <map code="0x6c" name="l"/><!-- LATIN SMALL LETTER L -->
- <map code="0x6d" name="m"/><!-- LATIN SMALL LETTER M -->
- <map code="0x6e" name="n"/><!-- LATIN SMALL LETTER N -->
- <map code="0x6f" name="o"/><!-- LATIN SMALL LETTER O -->
- <map code="0x70" name="p"/><!-- LATIN SMALL LETTER P -->
- <map code="0x71" name="q"/><!-- LATIN SMALL LETTER Q -->
- <map code="0x72" name="r"/><!-- LATIN SMALL LETTER R -->
- <map code="0x73" name="s"/><!-- LATIN SMALL LETTER S -->
- <map code="0x74" name="t"/><!-- LATIN SMALL LETTER T -->
- <map code="0x75" name="u"/><!-- LATIN SMALL LETTER U -->
- <map code="0x76" name="v"/><!-- LATIN SMALL LETTER V -->
- <map code="0x77" name="w"/><!-- LATIN SMALL LETTER W -->
- <map code="0x78" name="x"/><!-- LATIN SMALL LETTER X -->
- <map code="0x79" name="y"/><!-- LATIN SMALL LETTER Y -->
- <map code="0x7a" name="z"/><!-- LATIN SMALL LETTER Z -->
- <map code="0x7b" name="braceleft"/><!-- LEFT CURLY BRACKET -->
- <map code="0x7c" name="bar"/><!-- VERTICAL LINE -->
- <map code="0x7d" name="braceright"/><!-- RIGHT CURLY BRACKET -->
- <map code="0x7e" name="asciitilde"/><!-- TILDE -->
- <map code="0x80" name="Euro#1"/><!-- &lt;control> -->
- <map code="0xa0" name="nonbreakingspace"/><!-- NO-BREAK SPACE -->
- <map code="0xa1" name="exclamdown"/><!-- INVERTED EXCLAMATION MARK -->
- <map code="0xa2" name="cent"/><!-- CENT SIGN -->
- <map code="0xa3" name="sterling"/><!-- POUND SIGN -->
- <map code="0xa4" name="currency"/><!-- CURRENCY SIGN -->
- <map code="0xa5" name="yen"/><!-- YEN SIGN -->
- <map code="0xa6" name="brokenbar"/><!-- BROKEN BAR -->
- <map code="0xa7" name="section"/><!-- SECTION SIGN -->
- <map code="0xa8" name="dieresis"/><!-- DIAERESIS -->
- <map code="0xa9" name="copyright"/><!-- COPYRIGHT SIGN -->
- <map code="0xaa" name="ordfeminine"/><!-- FEMININE ORDINAL INDICATOR -->
- <map code="0xab" name="guillemotleft"/><!-- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xac" name="logicalnot"/><!-- NOT SIGN -->
- <map code="0xad" name="sfthyphen"/><!-- SOFT HYPHEN -->
- <map code="0xae" name="registered"/><!-- REGISTERED SIGN -->
- <map code="0xaf" name="macron#1"/><!-- MACRON -->
- <map code="0xb0" name="degree"/><!-- DEGREE SIGN -->
- <map code="0xb1" name="plusminus"/><!-- PLUS-MINUS SIGN -->
- <map code="0xb2" name="twosuperior"/><!-- SUPERSCRIPT TWO -->
- <map code="0xb3" name="threesuperior"/><!-- SUPERSCRIPT THREE -->
- <map code="0xb4" name="acute"/><!-- ACUTE ACCENT -->
- <map code="0xb5" name="mu"/><!-- MICRO SIGN -->
- <map code="0xb6" name="paragraph"/><!-- PILCROW SIGN -->
- <map code="0xb7" name="periodcentered#1"/><!-- MIDDLE DOT -->
- <map code="0xb8" name="cedilla"/><!-- CEDILLA -->
- <map code="0xb9" name="onesuperior"/><!-- SUPERSCRIPT ONE -->
- <map code="0xba" name="ordmasculine"/><!-- MASCULINE ORDINAL INDICATOR -->
- <map code="0xbb" name="guillemotright"/><!-- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
- <map code="0xbc" name="onequarter"/><!-- VULGAR FRACTION ONE QUARTER -->
- <map code="0xbd" name="onehalf"/><!-- VULGAR FRACTION ONE HALF -->
- <map code="0xbe" name="threequarters"/><!-- VULGAR FRACTION THREE QUARTERS -->
- <map code="0xbf" name="questiondown"/><!-- INVERTED QUESTION MARK -->
- <map code="0xc0" name="Agrave"/><!-- LATIN CAPITAL LETTER A WITH GRAVE -->
- <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
- <map code="0xc2" name="Acircumflex"/><!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX -->
- <map code="0xc3" name="Atilde"/><!-- LATIN CAPITAL LETTER A WITH TILDE -->
- <map code="0xc4" name="Adieresis"/><!-- LATIN CAPITAL LETTER A WITH DIAERESIS -->
- <map code="0xc5" name="Aring"/><!-- LATIN CAPITAL LETTER A WITH RING ABOVE -->
- <map code="0xc6" name="AE"/><!-- LATIN CAPITAL LETTER AE -->
- <map code="0xc7" name="Ccedilla"/><!-- LATIN CAPITAL LETTER C WITH CEDILLA -->
- <map code="0xc8" name="Egrave"/><!-- LATIN CAPITAL LETTER E WITH GRAVE -->
- <map code="0xc9" name="Eacute"/><!-- LATIN CAPITAL LETTER E WITH ACUTE -->
- <map code="0xca" name="Ecircumflex"/><!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX -->
- <map code="0xcb" name="Edieresis"/><!-- LATIN CAPITAL LETTER E WITH DIAERESIS -->
- <map code="0xcc" name="Igrave"/><!-- LATIN CAPITAL LETTER I WITH GRAVE -->
- <map code="0xcd" name="Iacute"/><!-- LATIN CAPITAL LETTER I WITH ACUTE -->
- <map code="0xce" name="Icircumflex"/><!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX -->
- <map code="0xcf" name="Idieresis"/><!-- LATIN CAPITAL LETTER I WITH DIAERESIS -->
- <map code="0xd0" name="Eth"/><!-- LATIN CAPITAL LETTER ETH -->
- <map code="0xd1" name="Ntilde"/><!-- LATIN CAPITAL LETTER N WITH TILDE -->
- <map code="0xd2" name="Ograve"/><!-- LATIN CAPITAL LETTER O WITH GRAVE -->
- <map code="0xd3" name="Oacute"/><!-- LATIN CAPITAL LETTER O WITH ACUTE -->
- <map code="0xd4" name="Ocircumflex"/><!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX -->
- <map code="0xd5" name="Otilde"/><!-- LATIN CAPITAL LETTER O WITH TILDE -->
- <map code="0xd6" name="Odieresis"/><!-- LATIN CAPITAL LETTER O WITH DIAERESIS -->
- <map code="0xd7" name="multiply"/><!-- MULTIPLICATION SIGN -->
- <map code="0xd8" name="Oslash"/><!-- LATIN CAPITAL LETTER O WITH STROKE -->
- <map code="0xd9" name="Ugrave"/><!-- LATIN CAPITAL LETTER U WITH GRAVE -->
- <map code="0xda" name="Uacute"/><!-- LATIN CAPITAL LETTER U WITH ACUTE -->
- <map code="0xdb" name="Ucircumflex"/><!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX -->
- <map code="0xdc" name="Udieresis"/><!-- LATIN CAPITAL LETTER U WITH DIAERESIS -->
- <map code="0xdd" name="Yacute"/><!-- LATIN CAPITAL LETTER Y WITH ACUTE -->
- <map code="0xde" name="Thorn"/><!-- LATIN CAPITAL LETTER THORN -->
- <map code="0xdf" name="germandbls"/><!-- LATIN SMALL LETTER SHARP S -->
- <map code="0xe0" name="agrave"/><!-- LATIN SMALL LETTER A WITH GRAVE -->
- <map code="0xe1" name="aacute"/><!-- LATIN SMALL LETTER A WITH ACUTE -->
- <map code="0xe2" name="acircumflex"/><!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
- <map code="0xe3" name="atilde"/><!-- LATIN SMALL LETTER A WITH TILDE -->
- <map code="0xe4" name="adieresis"/><!-- LATIN SMALL LETTER A WITH DIAERESIS -->
- <map code="0xe5" name="aring"/><!-- LATIN SMALL LETTER A WITH RING ABOVE -->
- <map code="0xe6" name="ae"/><!-- LATIN SMALL LETTER AE -->
- <map code="0xe7" name="ccedilla"/><!-- LATIN SMALL LETTER C WITH CEDILLA -->
- <map code="0xe8" name="egrave"/><!-- LATIN SMALL LETTER E WITH GRAVE -->
- <map code="0xe9" name="eacute"/><!-- LATIN SMALL LETTER E WITH ACUTE -->
- <map code="0xea" name="ecircumflex"/><!-- LATIN SMALL LETTER E WITH CIRCUMFLEX -->
- <map code="0xeb" name="edieresis"/><!-- LATIN SMALL LETTER E WITH DIAERESIS -->
- <map code="0xec" name="igrave"/><!-- LATIN SMALL LETTER I WITH GRAVE -->
- <map code="0xed" name="iacute"/><!-- LATIN SMALL LETTER I WITH ACUTE -->
- <map code="0xee" name="icircumflex"/><!-- LATIN SMALL LETTER I WITH CIRCUMFLEX -->
- <map code="0xef" name="idieresis"/><!-- LATIN SMALL LETTER I WITH DIAERESIS -->
- <map code="0xf0" name="eth"/><!-- LATIN SMALL LETTER ETH -->
- <map code="0xf1" name="ntilde"/><!-- LATIN SMALL LETTER N WITH TILDE -->
- <map code="0xf2" name="ograve"/><!-- LATIN SMALL LETTER O WITH GRAVE -->
- <map code="0xf3" name="oacute"/><!-- LATIN SMALL LETTER O WITH ACUTE -->
- <map code="0xf4" name="ocircumflex"/><!-- LATIN SMALL LETTER O WITH CIRCUMFLEX -->
- <map code="0xf5" name="otilde"/><!-- LATIN SMALL LETTER O WITH TILDE -->
- <map code="0xf6" name="odieresis"/><!-- LATIN SMALL LETTER O WITH DIAERESIS -->
- <map code="0xf7" name="divide"/><!-- DIVISION SIGN -->
- <map code="0xf8" name="oslash"/><!-- LATIN SMALL LETTER O WITH STROKE -->
- <map code="0xf9" name="ugrave"/><!-- LATIN SMALL LETTER U WITH GRAVE -->
- <map code="0xfa" name="uacute"/><!-- LATIN SMALL LETTER U WITH ACUTE -->
- <map code="0xfb" name="ucircumflex"/><!-- LATIN SMALL LETTER U WITH CIRCUMFLEX -->
- <map code="0xfc" name="udieresis"/><!-- LATIN SMALL LETTER U WITH DIAERESIS -->
- <map code="0xfd" name="yacute"/><!-- LATIN SMALL LETTER Y WITH ACUTE -->
- <map code="0xfe" name="thorn"/><!-- LATIN SMALL LETTER THORN -->
- <map code="0xff" name="ydieresis"/><!-- LATIN SMALL LETTER Y WITH DIAERESIS -->
- <map code="0x100" name="Amacron"/><!-- LATIN CAPITAL LETTER A WITH MACRON -->
- <map code="0x101" name="amacron"/><!-- LATIN SMALL LETTER A WITH MACRON -->
- <map code="0x102" name="Abreve"/><!-- LATIN CAPITAL LETTER A WITH BREVE -->
- <map code="0x103" name="abreve"/><!-- LATIN SMALL LETTER A WITH BREVE -->
- <map code="0x104" name="Aogonek"/><!-- LATIN CAPITAL LETTER A WITH OGONEK -->
- <map code="0x105" name="aogonek"/><!-- LATIN SMALL LETTER A WITH OGONEK -->
- <map code="0x106" name="Cacute"/><!-- LATIN CAPITAL LETTER C WITH ACUTE -->
- <map code="0x107" name="cacute"/><!-- LATIN SMALL LETTER C WITH ACUTE -->
- <map code="0x108" name="Ccircumflex"/><!-- LATIN CAPITAL LETTER C WITH CIRCUMFLEX -->
- <map code="0x109" name="ccircumflex"/><!-- LATIN SMALL LETTER C WITH CIRCUMFLEX -->
- <map code="0x10a" name="Cdotaccent"/><!-- LATIN CAPITAL LETTER C WITH DOT ABOVE -->
- <map code="0x10b" name="cdotaccent"/><!-- LATIN SMALL LETTER C WITH DOT ABOVE -->
- <map code="0x10c" name="Ccaron"/><!-- LATIN CAPITAL LETTER C WITH CARON -->
- <map code="0x10d" name="ccaron"/><!-- LATIN SMALL LETTER C WITH CARON -->
- <map code="0x10e" name="Dcaron"/><!-- LATIN CAPITAL LETTER D WITH CARON -->
- <map code="0x10f" name="dcaron"/><!-- LATIN SMALL LETTER D WITH CARON -->
- <map code="0x110" name="Dcroat"/><!-- LATIN CAPITAL LETTER D WITH STROKE -->
- <map code="0x111" name="dcroat"/><!-- LATIN SMALL LETTER D WITH STROKE -->
- <map code="0x112" name="Emacron"/><!-- LATIN CAPITAL LETTER E WITH MACRON -->
- <map code="0x113" name="emacron"/><!-- LATIN SMALL LETTER E WITH MACRON -->
- <map code="0x114" name="Ebreve"/><!-- LATIN CAPITAL LETTER E WITH BREVE -->
- <map code="0x115" name="ebreve"/><!-- LATIN SMALL LETTER E WITH BREVE -->
- <map code="0x116" name="Edotaccent"/><!-- LATIN CAPITAL LETTER E WITH DOT ABOVE -->
- <map code="0x117" name="edotaccent"/><!-- LATIN SMALL LETTER E WITH DOT ABOVE -->
- <map code="0x118" name="Eogonek"/><!-- LATIN CAPITAL LETTER E WITH OGONEK -->
- <map code="0x119" name="eogonek"/><!-- LATIN SMALL LETTER E WITH OGONEK -->
- <map code="0x11a" name="Ecaron"/><!-- LATIN CAPITAL LETTER E WITH CARON -->
- <map code="0x11b" name="ecaron"/><!-- LATIN SMALL LETTER E WITH CARON -->
- <map code="0x11c" name="Gcircumflex"/><!-- LATIN CAPITAL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11d" name="gcircumflex"/><!-- LATIN SMALL LETTER G WITH CIRCUMFLEX -->
- <map code="0x11e" name="Gbreve"/><!-- LATIN CAPITAL LETTER G WITH BREVE -->
- <map code="0x11f" name="gbreve"/><!-- LATIN SMALL LETTER G WITH BREVE -->
- <map code="0x120" name="Gdotaccent"/><!-- LATIN CAPITAL LETTER G WITH DOT ABOVE -->
- <map code="0x121" name="gdotaccent"/><!-- LATIN SMALL LETTER G WITH DOT ABOVE -->
- <map code="0x122" name="Gcommaaccent"/><!-- LATIN CAPITAL LETTER G WITH CEDILLA -->
- <map code="0x123" name="gcommaaccent"/><!-- LATIN SMALL LETTER G WITH CEDILLA -->
- <map code="0x124" name="Hcircumflex"/><!-- LATIN CAPITAL LETTER H WITH CIRCUMFLEX -->
- <map code="0x125" name="hcircumflex"/><!-- LATIN SMALL LETTER H WITH CIRCUMFLEX -->
- <map code="0x126" name="Hbar"/><!-- LATIN CAPITAL LETTER H WITH STROKE -->
- <map code="0x127" name="hbar"/><!-- LATIN SMALL LETTER H WITH STROKE -->
- <map code="0x128" name="Itilde"/><!-- LATIN CAPITAL LETTER I WITH TILDE -->
- <map code="0x129" name="itilde"/><!-- LATIN SMALL LETTER I WITH TILDE -->
- <map code="0x12a" name="Imacron"/><!-- LATIN CAPITAL LETTER I WITH MACRON -->
- <map code="0x12b" name="imacron"/><!-- LATIN SMALL LETTER I WITH MACRON -->
- <map code="0x12c" name="Ibreve"/><!-- LATIN CAPITAL LETTER I WITH BREVE -->
- <map code="0x12d" name="ibreve"/><!-- LATIN SMALL LETTER I WITH BREVE -->
- <map code="0x12e" name="Iogonek"/><!-- LATIN CAPITAL LETTER I WITH OGONEK -->
- <map code="0x12f" name="iogonek"/><!-- LATIN SMALL LETTER I WITH OGONEK -->
- <map code="0x130" name="Idotaccent"/><!-- LATIN CAPITAL LETTER I WITH DOT ABOVE -->
- <map code="0x131" name="dotlessi"/><!-- LATIN SMALL LETTER DOTLESS I -->
- <map code="0x132" name="IJ"/><!-- LATIN CAPITAL LIGATURE IJ -->
- <map code="0x133" name="ij"/><!-- LATIN SMALL LIGATURE IJ -->
- <map code="0x134" name="Jcircumflex"/><!-- LATIN CAPITAL LETTER J WITH CIRCUMFLEX -->
- <map code="0x135" name="jcircumflex"/><!-- LATIN SMALL LETTER J WITH CIRCUMFLEX -->
- <map code="0x136" name="Kcommaaccent"/><!-- LATIN CAPITAL LETTER K WITH CEDILLA -->
- <map code="0x137" name="kcommaaccent"/><!-- LATIN SMALL LETTER K WITH CEDILLA -->
- <map code="0x138" name="kgreenlandic"/><!-- LATIN SMALL LETTER KRA -->
- <map code="0x139" name="Lacute"/><!-- LATIN CAPITAL LETTER L WITH ACUTE -->
- <map code="0x13a" name="lacute"/><!-- LATIN SMALL LETTER L WITH ACUTE -->
- <map code="0x13b" name="Lcommaaccent"/><!-- LATIN CAPITAL LETTER L WITH CEDILLA -->
- <map code="0x13c" name="lcommaaccent"/><!-- LATIN SMALL LETTER L WITH CEDILLA -->
- <map code="0x13d" name="Lcaron"/><!-- LATIN CAPITAL LETTER L WITH CARON -->
- <map code="0x13e" name="lcaron"/><!-- LATIN SMALL LETTER L WITH CARON -->
- <map code="0x13f" name="Ldot"/><!-- LATIN CAPITAL LETTER L WITH MIDDLE DOT -->
- <map code="0x140" name="ldot"/><!-- LATIN SMALL LETTER L WITH MIDDLE DOT -->
- <map code="0x141" name="Lslash"/><!-- LATIN CAPITAL LETTER L WITH STROKE -->
- <map code="0x142" name="lslash"/><!-- LATIN SMALL LETTER L WITH STROKE -->
- <map code="0x143" name="Nacute"/><!-- LATIN CAPITAL LETTER N WITH ACUTE -->
- <map code="0x144" name="nacute"/><!-- LATIN SMALL LETTER N WITH ACUTE -->
- <map code="0x145" name="Ncommaaccent"/><!-- LATIN CAPITAL LETTER N WITH CEDILLA -->
- <map code="0x146" name="ncommaaccent"/><!-- LATIN SMALL LETTER N WITH CEDILLA -->
- <map code="0x147" name="Ncaron"/><!-- LATIN CAPITAL LETTER N WITH CARON -->
- <map code="0x148" name="ncaron"/><!-- LATIN SMALL LETTER N WITH CARON -->
- <map code="0x149" name="napostrophe"/><!-- LATIN SMALL LETTER N PRECEDED BY APOSTROPHE -->
- <map code="0x14a" name="Eng"/><!-- LATIN CAPITAL LETTER ENG -->
- <map code="0x14b" name="eng"/><!-- LATIN SMALL LETTER ENG -->
- <map code="0x14c" name="Omacron"/><!-- LATIN CAPITAL LETTER O WITH MACRON -->
- <map code="0x14d" name="omacron"/><!-- LATIN SMALL LETTER O WITH MACRON -->
- <map code="0x14e" name="Obreve"/><!-- LATIN CAPITAL LETTER O WITH BREVE -->
- <map code="0x14f" name="obreve"/><!-- LATIN SMALL LETTER O WITH BREVE -->
- <map code="0x150" name="Ohungarumlaut"/><!-- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x151" name="ohungarumlaut"/><!-- LATIN SMALL LETTER O WITH DOUBLE ACUTE -->
- <map code="0x152" name="OE"/><!-- LATIN CAPITAL LIGATURE OE -->
- <map code="0x153" name="oe"/><!-- LATIN SMALL LIGATURE OE -->
- <map code="0x154" name="Racute"/><!-- LATIN CAPITAL LETTER R WITH ACUTE -->
- <map code="0x155" name="racute"/><!-- LATIN SMALL LETTER R WITH ACUTE -->
- <map code="0x156" name="Rcommaaccent"/><!-- LATIN CAPITAL LETTER R WITH CEDILLA -->
- <map code="0x157" name="rcommaaccent"/><!-- LATIN SMALL LETTER R WITH CEDILLA -->
- <map code="0x158" name="Rcaron"/><!-- LATIN CAPITAL LETTER R WITH CARON -->
- <map code="0x159" name="rcaron"/><!-- LATIN SMALL LETTER R WITH CARON -->
- <map code="0x15a" name="Sacute"/><!-- LATIN CAPITAL LETTER S WITH ACUTE -->
- <map code="0x15b" name="sacute"/><!-- LATIN SMALL LETTER S WITH ACUTE -->
- <map code="0x15c" name="Scircumflex"/><!-- LATIN CAPITAL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15d" name="scircumflex"/><!-- LATIN SMALL LETTER S WITH CIRCUMFLEX -->
- <map code="0x15e" name="Scedilla"/><!-- LATIN CAPITAL LETTER S WITH CEDILLA -->
- <map code="0x15f" name="scedilla"/><!-- LATIN SMALL LETTER S WITH CEDILLA -->
- <map code="0x160" name="Scaron"/><!-- LATIN CAPITAL LETTER S WITH CARON -->
- <map code="0x161" name="scaron"/><!-- LATIN SMALL LETTER S WITH CARON -->
- <map code="0x162" name="Tcommaaccent"/><!-- LATIN CAPITAL LETTER T WITH CEDILLA -->
- <map code="0x163" name="tcommaaccent"/><!-- LATIN SMALL LETTER T WITH CEDILLA -->
- <map code="0x164" name="Tcaron"/><!-- LATIN CAPITAL LETTER T WITH CARON -->
- <map code="0x165" name="tcaron"/><!-- LATIN SMALL LETTER T WITH CARON -->
- <map code="0x166" name="Tbar"/><!-- LATIN CAPITAL LETTER T WITH STROKE -->
- <map code="0x167" name="tbar"/><!-- LATIN SMALL LETTER T WITH STROKE -->
- <map code="0x168" name="Utilde"/><!-- LATIN CAPITAL LETTER U WITH TILDE -->
- <map code="0x169" name="utilde"/><!-- LATIN SMALL LETTER U WITH TILDE -->
- <map code="0x16a" name="Umacron"/><!-- LATIN CAPITAL LETTER U WITH MACRON -->
- <map code="0x16b" name="umacron"/><!-- LATIN SMALL LETTER U WITH MACRON -->
- <map code="0x16c" name="Ubreve"/><!-- LATIN CAPITAL LETTER U WITH BREVE -->
- <map code="0x16d" name="ubreve"/><!-- LATIN SMALL LETTER U WITH BREVE -->
- <map code="0x16e" name="Uring"/><!-- LATIN CAPITAL LETTER U WITH RING ABOVE -->
- <map code="0x16f" name="uring"/><!-- LATIN SMALL LETTER U WITH RING ABOVE -->
- <map code="0x170" name="Uhungarumlaut"/><!-- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x171" name="uhungarumlaut"/><!-- LATIN SMALL LETTER U WITH DOUBLE ACUTE -->
- <map code="0x172" name="Uogonek"/><!-- LATIN CAPITAL LETTER U WITH OGONEK -->
- <map code="0x173" name="uogonek"/><!-- LATIN SMALL LETTER U WITH OGONEK -->
- <map code="0x174" name="Wcircumflex"/><!-- LATIN CAPITAL LETTER W WITH CIRCUMFLEX -->
- <map code="0x175" name="wcircumflex"/><!-- LATIN SMALL LETTER W WITH CIRCUMFLEX -->
- <map code="0x176" name="Ycircumflex"/><!-- LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x177" name="ycircumflex"/><!-- LATIN SMALL LETTER Y WITH CIRCUMFLEX -->
- <map code="0x178" name="Ydieresis"/><!-- LATIN CAPITAL LETTER Y WITH DIAERESIS -->
- <map code="0x179" name="Zacute"/><!-- LATIN CAPITAL LETTER Z WITH ACUTE -->
- <map code="0x17a" name="zacute"/><!-- LATIN SMALL LETTER Z WITH ACUTE -->
- <map code="0x17b" name="Zdotaccent"/><!-- LATIN CAPITAL LETTER Z WITH DOT ABOVE -->
- <map code="0x17c" name="zdotaccent"/><!-- LATIN SMALL LETTER Z WITH DOT ABOVE -->
- <map code="0x17d" name="Zcaron"/><!-- LATIN CAPITAL LETTER Z WITH CARON -->
- <map code="0x17e" name="zcaron"/><!-- LATIN SMALL LETTER Z WITH CARON -->
- <map code="0x17f" name="longs"/><!-- LATIN SMALL LETTER LONG S -->
- <map code="0x192" name="florin"/><!-- LATIN SMALL LETTER F WITH HOOK -->
- <map code="0x218" name="Scommaaccent"/><!-- LATIN CAPITAL LETTER S WITH COMMA BELOW -->
- <map code="0x219" name="scommaaccent"/><!-- LATIN SMALL LETTER S WITH COMMA BELOW -->
- <map code="0x21a" name="Tcommabelow"/><!-- LATIN CAPITAL LETTER T WITH COMMA BELOW -->
- <map code="0x21b" name="tcommabelow"/><!-- LATIN SMALL LETTER T WITH COMMA BELOW -->
- <map code="0x2c6" name="circumflex"/><!-- MODIFIER LETTER CIRCUMFLEX ACCENT -->
- <map code="0x2c7" name="caron"/><!-- CARON -->
- <map code="0x2c9" name="macron"/><!-- MODIFIER LETTER MACRON -->
- <map code="0x2d8" name="breve"/><!-- BREVE -->
- <map code="0x2d9" name="dotaccent"/><!-- DOT ABOVE -->
- <map code="0x2da" name="ring"/><!-- RING ABOVE -->
- <map code="0x2db" name="ogonek"/><!-- OGONEK -->
- <map code="0x2dc" name="tilde"/><!-- SMALL TILDE -->
- <map code="0x2dd" name="hungarumlaut"/><!-- DOUBLE ACUTE ACCENT -->
- <map code="0x326" name="Unterkomma"/><!-- COMBINING COMMA BELOW -->
- <map code="0x37e" name="semicolon#1"/><!-- GREEK QUESTION MARK -->
- <map code="0x387" name="anoteleia"/><!-- GREEK ANO TELEIA -->
- <map code="0x2010" name="hyphen#1"/><!-- HYPHEN -->
- <map code="0x2011" name="nbhyphen"/><!-- NON-BREAKING HYPHEN -->
- <map code="0x2012" name="figuredash"/><!-- FIGURE DASH -->
- <map code="0x2013" name="endash"/><!-- EN DASH -->
- <map code="0x2014" name="emdash"/><!-- EM DASH -->
- <map code="0x2015" name="afii00208"/><!-- HORIZONTAL BAR -->
- <map code="0x2018" name="quoteleft"/><!-- LEFT SINGLE QUOTATION MARK -->
- <map code="0x2019" name="quoteright"/><!-- RIGHT SINGLE QUOTATION MARK -->
- <map code="0x201a" name="quotesinglbase"/><!-- SINGLE LOW-9 QUOTATION MARK -->
- <map code="0x201b" name="quotereversed"/><!-- SINGLE HIGH-REVERSED-9 QUOTATION MARK -->
- <map code="0x201c" name="quotedblleft"/><!-- LEFT DOUBLE QUOTATION MARK -->
- <map code="0x201d" name="quotedblright"/><!-- RIGHT DOUBLE QUOTATION MARK -->
- <map code="0x201e" name="quotedblbase"/><!-- DOUBLE LOW-9 QUOTATION MARK -->
- <map code="0x2020" name="dagger"/><!-- DAGGER -->
- <map code="0x2021" name="daggerdbl"/><!-- DOUBLE DAGGER -->
- <map code="0x2022" name="bullet"/><!-- BULLET -->
- <map code="0x2026" name="ellipsis"/><!-- HORIZONTAL ELLIPSIS -->
- <map code="0x2030" name="perthousand"/><!-- PER MILLE SIGN -->
- <map code="0x2039" name="guilsinglleft"/><!-- SINGLE LEFT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203a" name="guilsinglright"/><!-- SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -->
- <map code="0x203e" name="radicalex"/><!-- OVERLINE -->
- <map code="0x2044" name="fraction"/><!-- FRACTION SLASH -->
- <map code="0x20ac" name="Euro"/><!-- EURO SIGN -->
- <map code="0x2122" name="trademark"/><!-- TRADE MARK SIGN -->
- <map code="0x212e" name="estimated"/><!-- ESTIMATED SYMBOL -->
- <map code="0x2212" name="minus"/><!-- MINUS SIGN -->
- <map code="0x2215" name="fraction#1"/><!-- DIVISION SLASH -->
- <map code="0x2219" name="periodcentered"/><!-- BULLET OPERATOR -->
- <map code="0x22c5" name="dotmath"/><!-- DOT OPERATOR -->
- <map code="0xea01" name="fi#1"/><!-- Private Use -->
- <map code="0xea02" name="fl#1"/><!-- Private Use -->
- <map code="0xf001" name="fi"/><!-- Private Use -->
- <map code="0xf002" name="fl"/><!-- Private Use -->
- <map code="0xf004" name="foursuperiour"/><!-- Private Use -->
- <map code="0xf6be" name="dotlessj"/><!-- Private Use -->
- <map code="0xfb01" name="fi"/><!-- LATIN SMALL LIGATURE FI -->
- <map code="0xfb02" name="fl"/><!-- LATIN SMALL LIGATURE FL -->
- </cmap_format_4>
- </cmap>
-
- <fpgm>
- <assembly>
- NPUSHB[ ] /* 15 values pushed */
- 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- FDEF[ ]
- SLOOP[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- MDAP[1]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP1[ ]
- SRP2[ ]
- SLOOP[ ]
- IP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MIRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[11101]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- SLOOP[ ]
- MDRP[10100]
- ALIGNRP[ ]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MIRP[10100]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[11101]
- ENDF[ ]
- FDEF[ ]
- SRP0[ ]
- MDRP[10100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00100]
- ENDF[ ]
- FDEF[ ]
- MDRP[00000]
- ENDF[ ]
- FDEF[ ]
- SVTCA[0]
- NPUSHB[ ] /* 10 values pushed */
- 1 0 0 1 1 2 2 3 3 0
- SZPS[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SZPS[ ]
- ENDF[ ]
- </assembly>
- </fpgm>
-
- <prep>
- <assembly>
- PUSHB[ ] /* 2 values pushed */
- 48 1
- PUSHW[ ] /* 1 value pushed */
- 329
- RTG[ ]
- SCANCTRL[ ]
- SCANTYPE[ ]
- SCVTCI[ ]
- </assembly>
- </prep>
-
- <cvt>
- <cv index="0" value="1480"/>
- <cv index="1" value="1086"/>
- <cv index="2" value="0"/>
- <cv index="3" value="-512"/>
- <cv index="4" value="196"/>
- <cv index="5" value="200"/>
- <cv index="6" value="125"/>
- <cv index="7" value="149"/>
- <cv index="8" value="247"/>
- <cv index="9" value="213"/>
- <cv index="10" value="150"/>
- <cv index="11" value="101"/>
- <cv index="12" value="196"/>
- <cv index="13" value="172"/>
- <cv index="14" value="181"/>
- <cv index="15" value="157"/>
- <cv index="16" value="113"/>
- <cv index="17" value="109"/>
- <cv index="18" value="133"/>
- <cv index="19" value="121"/>
- <cv index="20" value="104"/>
- <cv index="21" value="97"/>
- <cv index="22" value="138"/>
- <cv index="23" value="22"/>
- <cv index="24" value="183"/>
- <cv index="25" value="140"/>
- <cv index="26" value="224"/>
- <cv index="27" value="186"/>
- <cv index="28" value="206"/>
- <cv index="29" value="160"/>
- <cv index="30" value="171"/>
- <cv index="31" value="135"/>
- <cv index="32" value="87"/>
- <cv index="33" value="210"/>
- <cv index="34" value="167"/>
- <cv index="35" value="155"/>
- <cv index="36" value="227"/>
- <cv index="37" value="159"/>
- <cv index="38" value="119"/>
- <cv index="39" value="152"/>
- <cv index="40" value="149"/>
- <cv index="41" value="195"/>
- <cv index="42" value="137"/>
- <cv index="43" value="205"/>
- <cv index="44" value="89"/>
- <cv index="45" value="165"/>
- </cvt>
-
- <loca>
- <!-- The 'loca' table will be calculated by the compiler -->
- </loca>
-
- <glyf>
-
- <!-- The xMin, yMin, xMax and yMax values
- will be recalculated by the compiler. -->
-
- <TTGlyph name=".notdef" xMin="57" yMin="0" xMax="512" yMax="1480">
- <contour>
- <pt x="57" y="0" on="1"/>
- <pt x="57" y="1480" on="1"/>
- <pt x="512" y="1480" on="1"/>
- <pt x="512" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="455" y="57" on="1"/>
- <pt x="455" y="1423" on="1"/>
- <pt x="114" y="1423" on="1"/>
- <pt x="114" y="57" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 16 values pushed */
- 5 6 2 1 4 7 3 0 5 4 2 3 6 7 1 0
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- SVTCA[0]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- MDAP[1]
- ALIGNRP[ ]
- MDRP[11100]
- ALIGNRP[ ]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name=".notdef#1"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#10"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#11"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#12"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#13"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#14"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#15"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#16"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#17"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#18"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#2"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#3"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#4"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#5"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#6"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#7"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#8"/><!-- contains no outline data -->
-
- <TTGlyph name=".notdef#9"/><!-- contains no outline data -->
-
- <TTGlyph name="A" xMin="19" yMin="0" xMax="1342" yMax="1480">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 40 values pushed */
- 10 1 8 2 0 0 9 8 15 1 5 1 4 48 196 6 5 1 7 4 3 0 3 2 0
- 2 1 0 14 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="AE" xMin="19" yMin="0" xMax="1990" yMax="1480">
- <contour>
- <pt x="597" y="569" on="1"/>
- <pt x="1015" y="569" on="1"/>
- <pt x="1015" y="1227" on="1"/>
- </contour>
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="959" y="1480" on="1"/>
- <pt x="1947" y="1480" on="1"/>
- <pt x="1947" y="1323" on="1"/>
- <pt x="1225" y="1323" on="1"/>
- <pt x="1225" y="848" on="1"/>
- <pt x="1847" y="848" on="1"/>
- <pt x="1847" y="693" on="1"/>
- <pt x="1225" y="693" on="1"/>
- <pt x="1225" y="157" on="1"/>
- <pt x="1990" y="157" on="1"/>
- <pt x="1990" y="0" on="1"/>
- <pt x="1015" y="0" on="1"/>
- <pt x="1015" y="414" on="1"/>
- <pt x="498" y="414" on="1"/>
- <pt x="236" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 2 6 8 2 0 0 7 6 15 1 4 11 10 15 1 8 13 12 15 1 3 3 4 48 196
- 9 8 1 17 16 1 18 15 14 3 3 1 0 1 4 0 5 4 0 14 18 17 4 3 0
- 5 13 1 0 0 16 15 2 1 33 3 7 1 4 48 196 14 13 1 6 5 1 10 9 1
- 12 11 8 7 3 16 15 2 1 3 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aacute" xMin="19" yMin="0" xMax="1342" yMax="1925">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="537" y="1604" on="1"/>
- <pt x="778" y="1925" on="1"/>
- <pt x="1006" y="1925" on="1"/>
- <pt x="685" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 10 1 8 2 0 0 9 8 15 1 5 1 4 48 196 13 12 1 14 11 1 6 5 1 7
- 4 3 0 3 4 0 2 1 0 14 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Abreve" xMin="21" yMin="0" xMax="1344" yMax="1925">
- <contour>
- <pt x="21" y="0" on="1"/>
- <pt x="583" y="1480" on="1"/>
- <pt x="791" y="1480" on="1"/>
- <pt x="1344" y="0" on="1"/>
- <pt x="1118" y="0" on="1"/>
- <pt x="964" y="410" on="1"/>
- <pt x="370" y="410" on="1"/>
- <pt x="216" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="430" y="566" on="1"/>
- <pt x="906" y="566" on="1"/>
- <pt x="669" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="354" y="1925" on="1"/>
- <pt x="477" y="1925" on="1"/>
- <pt x="498" y="1831" on="0"/>
- <pt x="552" y="1791" on="1"/>
- <pt x="604" y="1752" on="0"/>
- <pt x="687" y="1752" on="1"/>
- <pt x="781" y="1752" on="0"/>
- <pt x="835" y="1801" on="1"/>
- <pt x="878" y="1841" on="0"/>
- <pt x="897" y="1925" on="1"/>
- <pt x="1020" y="1925" on="1"/>
- <pt x="1004" y="1791" on="0"/>
- <pt x="931" y="1710" on="1"/>
- <pt x="837" y="1604" on="0"/>
- <pt x="687" y="1604" on="1"/>
- <pt x="530" y="1604" on="0"/>
- <pt x="435" y="1719" on="1"/>
- <pt x="370" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 16 40 25 48 196 10 1 8 2 21 20 12 11 4 13 25 1 0 0 9 8 15 1
- 5 1 4 48 196 6 5 1 7 4 3 0 3 2 0 2 1 0 14 21 20 12 11 10 9
- 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Acircumflex" xMin="19" yMin="0" xMax="1342" yMax="1925">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="335" y="1604" on="1"/>
- <pt x="576" y="1925" on="1"/>
- <pt x="794" y="1925" on="1"/>
- <pt x="1035" y="1604" on="1"/>
- <pt x="887" y="1604" on="1"/>
- <pt x="686" y="1806" on="1"/>
- <pt x="684" y="1806" on="1"/>
- <pt x="483" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 17 16 2 12 11 3 10 1 8 2 0 0 9 8 15 1 5 1 4 48 196 13 12 1 18
- 15 14 11 3 6 5 1 7 4 3 0 3 4 0 2 1 0 14 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Adieresis" xMin="19" yMin="0" xMax="1342" yMax="1777">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="401" y="1604" on="1"/>
- <pt x="401" y="1777" on="1"/>
- <pt x="574" y="1777" on="1"/>
- <pt x="574" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="796" y="1604" on="1"/>
- <pt x="796" y="1777" on="1"/>
- <pt x="969" y="1777" on="1"/>
- <pt x="969" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 93 values pushed */
- 10 1 8 2 0 0 18 15 14 11 13 3 12 9 8 15 1 5 2 4 48 196 17 16 13
- 12 3 6 5 1 7 4 3 0 3 3 0 2 1 0 14 9 5 2 17 15 3 10 2 1
- 3 15 13 3 8 13 11 2 4 3 2 13 17 7 6 0 3 13 11 0 0 16 15 13 1
- 17 14 13 13 1 11 2 4 48 196 18 17 1 12 11 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Agrave" xMin="19" yMin="0" xMax="1342" yMax="1925">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="833" y="1604" on="1"/>
- <pt x="685" y="1604" on="1"/>
- <pt x="364" y="1925" on="1"/>
- <pt x="592" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 10 1 8 2 0 0 9 8 15 1 5 1 4 48 196 14 13 1 12 11 1 6 5 1 7
- 4 3 0 3 4 0 2 1 0 14 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Amacron" xMin="21" yMin="0" xMax="1344" yMax="1752">
- <contour>
- <pt x="21" y="0" on="1"/>
- <pt x="583" y="1480" on="1"/>
- <pt x="791" y="1480" on="1"/>
- <pt x="1344" y="0" on="1"/>
- <pt x="1118" y="0" on="1"/>
- <pt x="964" y="410" on="1"/>
- <pt x="370" y="410" on="1"/>
- <pt x="216" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="430" y="566" on="1"/>
- <pt x="906" y="566" on="1"/>
- <pt x="669" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="366" y="1604" on="1"/>
- <pt x="366" y="1752" on="1"/>
- <pt x="1008" y="1752" on="1"/>
- <pt x="1008" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 64 values pushed */
- 10 1 8 2 0 0 14 11 7 1 12 9 8 15 1 5 2 4 48 196 13 12 1 6 5
- 1 7 4 3 0 3 3 0 2 1 0 14 10 9 8 6 5 2 1 7 13 11 3 4 3
- 2 13 13 7 0 11 14 13 1 12 11 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aogonek" xMin="19" yMin="-370" xMax="1342" yMax="1480">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="1116" y="0" on="1"/>
- <pt x="1223" y="0" on="1"/>
- <pt x="1095" y="-81" on="0"/>
- <pt x="1095" y="-179" on="1"/>
- <pt x="1095" y="-275" on="0"/>
- <pt x="1210" y="-275" on="1"/>
- <pt x="1263" y="-275" on="0"/>
- <pt x="1300" y="-260" on="1"/>
- <pt x="1300" y="-341" on="1"/>
- <pt x="1238" y="-370" on="0"/>
- <pt x="1161" y="-370" on="1"/>
- <pt x="958" y="-370" on="0"/>
- <pt x="958" y="-212" on="1"/>
- <pt x="958" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 16 21 21 48 196 10 1 8 2 19 18 21 0 0 0 9 8 15 1 5 1 4 48
- 196 6 5 1 12 11 7 4 3 0 5 2 0 2 1 0 14 0 0 14 42 23 48 196 23
- 19 18 12 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Aring" xMin="19" yMin="0" xMax="1342" yMax="1935">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="685" y="1935" on="1"/>
- <pt x="779" y="1935" on="0"/>
- <pt x="845" y="1869" on="1"/>
- <pt x="912" y="1803" on="0"/>
- <pt x="912" y="1709" on="1"/>
- <pt x="912" y="1614" on="0"/>
- <pt x="845" y="1547" on="1"/>
- <pt x="778" y="1481" on="0"/>
- <pt x="683" y="1481" on="1"/>
- <pt x="600" y="1481" on="0"/>
- <pt x="538" y="1535" on="1"/>
- <pt x="458" y="1604" on="0"/>
- <pt x="458" y="1708" on="1"/>
- <pt x="458" y="1802" on="0"/>
- <pt x="524" y="1868" on="1"/>
- <pt x="591" y="1935" on="0"/>
- </contour>
- <contour>
- <pt x="685" y="1848" on="1"/>
- <pt x="626" y="1848" on="0"/>
- <pt x="585" y="1808" on="1"/>
- <pt x="544" y="1767" on="0"/>
- <pt x="544" y="1708" on="1"/>
- <pt x="544" y="1650" on="0"/>
- <pt x="585" y="1609" on="1"/>
- <pt x="627" y="1567" on="0"/>
- <pt x="683" y="1567" on="1"/>
- <pt x="737" y="1567" on="0"/>
- <pt x="776" y="1600" on="1"/>
- <pt x="826" y="1643" on="0"/>
- <pt x="826" y="1709" on="1"/>
- <pt x="826" y="1767" on="0"/>
- <pt x="784" y="1808" on="1"/>
- <pt x="743" y="1848" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 35 44 19 27 44 11 48 196 19 0 10 1 8 2 11 1 0 0 9 8 15 1 5
- 1 4 48 196 6 5 1 7 4 3 0 3 2 0 2 1 0 14 0 0 39 32 15 31 32
- 23 48 196 23 15 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Atilde" xMin="19" yMin="0" xMax="1342" yMax="1838">
- <contour>
- <pt x="19" y="0" on="1"/>
- <pt x="581" y="1480" on="1"/>
- <pt x="789" y="1480" on="1"/>
- <pt x="1342" y="0" on="1"/>
- <pt x="1116" y="0" on="1"/>
- <pt x="962" y="410" on="1"/>
- <pt x="368" y="410" on="1"/>
- <pt x="214" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="428" y="566" on="1"/>
- <pt x="904" y="566" on="1"/>
- <pt x="667" y="1200" on="1"/>
- </contour>
- <contour>
- <pt x="352" y="1604" on="1"/>
- <pt x="359" y="1697" on="0"/>
- <pt x="384" y="1748" on="1"/>
- <pt x="430" y="1838" on="0"/>
- <pt x="539" y="1838" on="1"/>
- <pt x="611" y="1838" on="0"/>
- <pt x="672" y="1800" on="1"/>
- <pt x="732" y="1763" on="1"/>
- <pt x="789" y="1728" on="0"/>
- <pt x="819" y="1728" on="1"/>
- <pt x="884" y="1728" on="0"/>
- <pt x="895" y="1838" on="1"/>
- <pt x="1018" y="1838" on="1"/>
- <pt x="1011" y="1744" on="0"/>
- <pt x="986" y="1694" on="1"/>
- <pt x="941" y="1604" on="0"/>
- <pt x="833" y="1604" on="1"/>
- <pt x="761" y="1604" on="0"/>
- <pt x="698" y="1643" on="1"/>
- <pt x="638" y="1680" on="1"/>
- <pt x="583" y="1714" on="0"/>
- <pt x="551" y="1714" on="1"/>
- <pt x="486" y="1714" on="0"/>
- <pt x="475" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 0 0 32 6 15 20 6 27 48 196 10 1 8 2 34 23 22 11 4 13 27 15 1 0 0
- 9 8 15 1 5 1 4 48 196 6 5 1 7 4 3 0 3 2 0 2 1 0 14 34 23
- 22 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="B" xMin="165" yMin="0" xMax="1231" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="931" y="1480" on="0"/>
- <pt x="1051" y="1405" on="1"/>
- <pt x="1172" y="1329" on="0"/>
- <pt x="1172" y="1149" on="1"/>
- <pt x="1172" y="983" on="0"/>
- <pt x="1053" y="880" on="1"/>
- <pt x="981" y="818" on="0"/>
- <pt x="844" y="771" on="1"/>
- <pt x="1018" y="719" on="0"/>
- <pt x="1106" y="644" on="1"/>
- <pt x="1231" y="538" on="0"/>
- <pt x="1231" y="369" on="1"/>
- <pt x="1231" y="212" on="0"/>
- <pt x="1129" y="108" on="1"/>
- <pt x="1057" y="34" on="0"/>
- <pt x="940" y="15" on="1"/>
- <pt x="847" y="0" on="0"/>
- <pt x="691" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="157" on="1"/>
- <pt x="530" y="157" on="1"/>
- <pt x="824" y="157" on="0"/>
- <pt x="917" y="201" on="1"/>
- <pt x="1009" y="244" on="0"/>
- <pt x="1009" y="383" on="1"/>
- <pt x="1009" y="536" on="0"/>
- <pt x="890" y="616" on="1"/>
- <pt x="771" y="697" on="0"/>
- <pt x="546" y="697" on="1"/>
- <pt x="375" y="697" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="830" on="1"/>
- <pt x="554" y="830" on="1"/>
- <pt x="956" y="830" on="0"/>
- <pt x="956" y="1113" on="1"/>
- <pt x="956" y="1256" on="0"/>
- <pt x="841" y="1294" on="1"/>
- <pt x="753" y="1323" on="0"/>
- <pt x="569" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 10 32 30 2 0 0 40 39 15 1 1 31 30 31 1 32 22 21 15 1 0 3 4 48 196
- 33 32 1 20 0 1 2 0 2 1 0 14 0 0 35 9 6 26 26 14 48 196 39 33 30
- 22 20 10 2 7 13 14 6 21 0 0 40 32 31 21 33 3 0 1 4 48 196 1 0 1
- 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="C" xMin="116" yMin="-37" xMax="1352" yMax="1517">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 23 29 2 15 29 10 48 196 10 0 2 2 1 1 25 13 12 0 4 0 2 3 0
- 0 14 0 0 19 26 6 48 196 6 12 25 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cacute" xMin="116" yMin="-37" xMax="1352" yMax="1925">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <contour>
- <pt x="705" y="1604" on="1"/>
- <pt x="946" y="1925" on="1"/>
- <pt x="1174" y="1925" on="1"/>
- <pt x="853" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 23 29 2 15 29 10 48 196 10 0 2 2 1 1 25 13 12 0 4 0 2 3 0
- 0 28 27 1 29 26 1 2 0 14 0 0 19 26 6 48 196 29 28 27 26 4 13 6 12
- 25 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccaron" xMin="116" yMin="-37" xMax="1352" yMax="1925">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <contour>
- <pt x="1203" y="1925" on="1"/>
- <pt x="962" y="1604" on="1"/>
- <pt x="744" y="1604" on="1"/>
- <pt x="503" y="1925" on="1"/>
- <pt x="651" y="1925" on="1"/>
- <pt x="852" y="1723" on="1"/>
- <pt x="854" y="1723" on="1"/>
- <pt x="1055" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 23 29 2 15 29 10 48 196 10 0 2 2 32 31 2 26 27 3 1 1 25 13 12
- 0 4 0 2 3 0 0 33 30 29 26 3 28 27 1 2 0 14 0 0 19 26 6 48 196
- 33 32 31 30 29 28 27 26 8 13 6 12 25 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccedilla" xMin="116" yMin="-432" xMax="1352" yMax="1517">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <contour>
- <pt x="767" y="0" on="1"/>
- <pt x="864" y="0" on="1"/>
- <pt x="804" y="-109" on="1"/>
- <pt x="876" y="-111" on="0"/>
- <pt x="928" y="-148" on="1"/>
- <pt x="998" y="-197" on="0"/>
- <pt x="998" y="-269" on="1"/>
- <pt x="998" y="-337" on="0"/>
- <pt x="939" y="-384" on="1"/>
- <pt x="880" y="-432" on="0"/>
- <pt x="795" y="-432" on="1"/>
- <pt x="728" y="-432" on="0"/>
- <pt x="651" y="-411" on="1"/>
- <pt x="651" y="-330" on="1"/>
- <pt x="701" y="-345" on="0"/>
- <pt x="755" y="-345" on="1"/>
- <pt x="859" y="-345" on="0"/>
- <pt x="859" y="-271" on="1"/>
- <pt x="859" y="-178" on="0"/>
- <pt x="672" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 41 44 36 23 29 2 15 29 10 48 196 10 0 2 2 1 1 25 13 12 0 4 0
- 2 3 0 0 1 45 39 38 28 27 26 6 13 36 2 0 14 0 0 43 42 32 19 26 6
- 48 196 45 39 38 28 27 26 6 13 32 6 12 25 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ccircumflex" xMin="116" yMin="-37" xMax="1352" yMax="1925">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <contour>
- <pt x="503" y="1604" on="1"/>
- <pt x="744" y="1925" on="1"/>
- <pt x="962" y="1925" on="1"/>
- <pt x="1203" y="1604" on="1"/>
- <pt x="1055" y="1604" on="1"/>
- <pt x="854" y="1806" on="1"/>
- <pt x="852" y="1806" on="1"/>
- <pt x="651" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 23 29 2 15 29 10 48 196 10 0 2 2 32 31 2 27 26 3 1 1 25 13 12
- 0 4 0 2 3 0 0 28 27 1 33 30 29 26 3 2 0 14 0 0 19 26 6 48 196
- 33 32 31 30 29 28 27 26 8 13 6 12 25 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Cdotaccent" xMin="116" yMin="-37" xMax="1352" yMax="1801">
- <contour>
- <pt x="1352" y="76" on="1"/>
- <pt x="1123" y="-37" on="0"/>
- <pt x="862" y="-37" on="1"/>
- <pt x="497" y="-37" on="0"/>
- <pt x="307" y="161" on="1"/>
- <pt x="116" y="359" on="0"/>
- <pt x="116" y="738" on="1"/>
- <pt x="116" y="1116" on="0"/>
- <pt x="310" y="1317" on="1"/>
- <pt x="504" y="1517" on="0"/>
- <pt x="871" y="1517" on="1"/>
- <pt x="1076" y="1517" on="0"/>
- <pt x="1350" y="1452" on="1"/>
- <pt x="1350" y="1255" on="1"/>
- <pt x="1039" y="1360" on="0"/>
- <pt x="860" y="1360" on="1"/>
- <pt x="609" y="1360" on="0"/>
- <pt x="475" y="1200" on="1"/>
- <pt x="341" y="1041" on="0"/>
- <pt x="341" y="740" on="1"/>
- <pt x="341" y="446" on="0"/>
- <pt x="484" y="287" on="1"/>
- <pt x="627" y="127" on="0"/>
- <pt x="886" y="127" on="1"/>
- <pt x="1103" y="127" on="0"/>
- <pt x="1352" y="256" on="1"/>
- </contour>
- <contour>
- <pt x="754" y="1604" on="1"/>
- <pt x="754" y="1801" on="1"/>
- <pt x="951" y="1801" on="1"/>
- <pt x="951" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 23 29 2 15 29 10 48 196 10 0 2 2 1 1 25 13 12 0 4 0 2 3 0
- 0 0 0 29 26 5 1 27 1 4 48 196 28 27 1 0 14 0 0 19 26 6 48 196 6
- 26 0 0 27 26 4 1 28 1 4 48 196 29 28 1 25 0 1 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="D" xMin="165" yMin="0" xMax="1386" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="1386" y="1480" on="0"/>
- <pt x="1386" y="774" on="1"/>
- <pt x="1386" y="406" on="0"/>
- <pt x="1191" y="203" on="1"/>
- <pt x="997" y="0" on="0"/>
- <pt x="642" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="157" on="1"/>
- <pt x="627" y="157" on="1"/>
- <pt x="1161" y="157" on="0"/>
- <pt x="1161" y="750" on="1"/>
- <pt x="1161" y="1099" on="0"/>
- <pt x="950" y="1242" on="1"/>
- <pt x="888" y="1284" on="0"/>
- <pt x="803" y="1302" on="1"/>
- <pt x="700" y="1323" on="0"/>
- <pt x="530" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 0 0 19 18 15 1 1 10 9 15 1 0 2 4 48 196 8 0 1 0 2 1 0 14 0
- 0 12 26 4 48 196 18 10 8 2 4 13 4 9 0 0 19 9 33 1 0 1 4 48 196
- 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcaron" xMin="165" yMin="0" xMax="1386" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="1386" y="1480" on="0"/>
- <pt x="1386" y="774" on="1"/>
- <pt x="1386" y="406" on="0"/>
- <pt x="1191" y="203" on="1"/>
- <pt x="997" y="0" on="0"/>
- <pt x="642" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="157" on="1"/>
- <pt x="627" y="157" on="1"/>
- <pt x="1161" y="157" on="0"/>
- <pt x="1161" y="750" on="1"/>
- <pt x="1161" y="1099" on="0"/>
- <pt x="950" y="1242" on="1"/>
- <pt x="888" y="1284" on="0"/>
- <pt x="803" y="1302" on="1"/>
- <pt x="700" y="1323" on="0"/>
- <pt x="530" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <contour>
- <pt x="1032" y="1925" on="1"/>
- <pt x="791" y="1604" on="1"/>
- <pt x="573" y="1604" on="1"/>
- <pt x="332" y="1925" on="1"/>
- <pt x="480" y="1925" on="1"/>
- <pt x="681" y="1723" on="1"/>
- <pt x="683" y="1723" on="1"/>
- <pt x="884" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 26 25 2 20 21 3 0 0 19 18 15 1 1 10 9 15 1 0 2 4 48 196 27 24 23
- 20 3 22 21 1 8 0 1 3 0 2 1 0 14 0 0 12 26 4 48 196 23 9 0 2
- 27 26 25 24 22 21 20 18 10 8 2 11 13 4 9 0 0 19 9 33 1 0 1 4 48
- 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Dcroat" xMin="5" yMin="0" xMax="1386" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="679" on="1"/>
- <pt x="5" y="679" on="1"/>
- <pt x="5" y="836" on="1"/>
- <pt x="165" y="836" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="1386" y="1480" on="0"/>
- <pt x="1386" y="774" on="1"/>
- <pt x="1386" y="406" on="0"/>
- <pt x="1191" y="203" on="1"/>
- <pt x="996" y="0" on="0"/>
- <pt x="642" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="157" on="1"/>
- <pt x="627" y="157" on="1"/>
- <pt x="1161" y="157" on="0"/>
- <pt x="1161" y="750" on="1"/>
- <pt x="1161" y="1099" on="0"/>
- <pt x="950" y="1242" on="1"/>
- <pt x="888" y="1284" on="0"/>
- <pt x="803" y="1302" on="1"/>
- <pt x="700" y="1323" on="0"/>
- <pt x="530" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- <pt x="375" y="836" on="1"/>
- <pt x="708" y="836" on="1"/>
- <pt x="708" y="679" on="1"/>
- <pt x="375" y="679" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 23 22 15 1 5 27 26 2 1 15 3 3 14 13 15 1 0 3 4 48 196 25 24
- 4 3 3 12 0 1 2 0 6 5 0 14 0 0 16 26 8 48 196 22 14 12 6 4 25
- 13 3 8 25 0 0 27 24 23 13 33 3 0 1 4 48 196 26 25 1 5 4 1 0 3
- 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="E" xMin="191" yMin="0" xMax="1308" yMax="1480">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 3 4 48 196 6 5 1 11
- 0 1 2 0 2 1 0 14 0 0 9 8 5 4 33 3 0 1 4 48 196 11 10 1 3
- 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eacute" xMin="191" yMin="0" xMax="1308" yMax="1925">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="598" y="1604" on="1"/>
- <pt x="839" y="1925" on="1"/>
- <pt x="1067" y="1925" on="1"/>
- <pt x="746" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 3 4 48 196 14 13 1 15
- 12 1 6 5 1 11 0 1 4 0 2 1 0 14 15 14 13 12 4 6 4 3 0 0 9
- 8 5 4 33 3 0 1 4 48 196 11 10 1 3 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ebreve" xMin="191" yMin="0" xMax="1308" yMax="1925">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="404" y="1925" on="1"/>
- <pt x="527" y="1925" on="1"/>
- <pt x="548" y="1831" on="0"/>
- <pt x="602" y="1791" on="1"/>
- <pt x="654" y="1752" on="0"/>
- <pt x="737" y="1752" on="1"/>
- <pt x="831" y="1752" on="0"/>
- <pt x="885" y="1801" on="1"/>
- <pt x="928" y="1841" on="0"/>
- <pt x="947" y="1925" on="1"/>
- <pt x="1070" y="1925" on="1"/>
- <pt x="1054" y="1791" on="0"/>
- <pt x="981" y="1710" on="1"/>
- <pt x="887" y="1604" on="0"/>
- <pt x="737" y="1604" on="1"/>
- <pt x="580" y="1604" on="0"/>
- <pt x="485" y="1719" on="1"/>
- <pt x="420" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 17 40 26 48 196 22 21 13 12 4 13 26 1 0 0 4 3 15 1 1 8 7 15
- 1 5 10 9 15 1 0 3 4 48 196 6 5 1 11 0 1 2 0 2 1 0 14 22 21
- 13 12 4 6 4 3 0 0 9 8 5 4 33 3 0 1 4 48 196 11 10 1 3 2 1
- 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecaron" xMin="191" yMin="0" xMax="1308" yMax="1925">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1082" y="1925" on="1"/>
- <pt x="841" y="1604" on="1"/>
- <pt x="623" y="1604" on="1"/>
- <pt x="382" y="1925" on="1"/>
- <pt x="530" y="1925" on="1"/>
- <pt x="731" y="1723" on="1"/>
- <pt x="733" y="1723" on="1"/>
- <pt x="934" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 18 17 2 12 13 3 0 0 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 3 4
- 48 196 19 16 15 12 3 14 13 1 6 5 1 11 0 1 4 0 2 1 0 14 19 18 17
- 16 14 13 12 7 6 4 3 15 4 0 2 0 0 9 8 5 4 33 3 0 1 4 48 196
- 11 10 1 3 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ecircumflex" xMin="191" yMin="0" xMax="1308" yMax="1925">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="399" y="1604" on="1"/>
- <pt x="640" y="1925" on="1"/>
- <pt x="858" y="1925" on="1"/>
- <pt x="1099" y="1604" on="1"/>
- <pt x="951" y="1604" on="1"/>
- <pt x="750" y="1806" on="1"/>
- <pt x="748" y="1806" on="1"/>
- <pt x="547" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 89 values pushed */
- 18 17 2 13 12 3 0 0 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 3 4
- 48 196 14 13 1 19 16 15 12 3 6 5 1 11 0 1 4 0 2 1 0 14 19 18 17
- 16 15 14 13 7 6 4 3 12 4 0 2 0 0 9 8 5 4 33 3 0 1 4 48 196
- 11 10 1 3 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edieresis" xMin="191" yMin="0" xMax="1308" yMax="1777">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="450" y="1604" on="1"/>
- <pt x="450" y="1777" on="1"/>
- <pt x="623" y="1777" on="1"/>
- <pt x="623" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="845" y="1604" on="1"/>
- <pt x="845" y="1777" on="1"/>
- <pt x="1018" y="1777" on="1"/>
- <pt x="1018" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 88 values pushed */
- 0 0 19 16 15 12 13 3 13 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 4
- 4 48 196 18 17 14 13 3 6 5 1 11 0 1 3 0 2 1 0 14 0 0 17 16 13
- 1 18 15 14 13 1 12 9 8 5 4 33 3 0 3 4 48 196 19 18 1 13 12 1 11
- 10 1 3 2 1 7 6 1 1 0 1 6 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Edotaccent" xMin="191" yMin="0" xMax="1308" yMax="1801">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="635" y="1604" on="1"/>
- <pt x="635" y="1801" on="1"/>
- <pt x="832" y="1801" on="1"/>
- <pt x="832" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 15 12 5 1 13 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 4 4 48
- 196 14 13 1 6 5 1 11 0 1 3 0 2 1 0 14 0 0 15 14 4 1 12 9 8
- 5 4 33 3 0 2 4 48 196 13 12 1 11 10 1 3 2 1 7 6 1 1 0 1 5
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Egrave" xMin="191" yMin="0" xMax="1308" yMax="1925">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="894" y="1604" on="1"/>
- <pt x="746" y="1604" on="1"/>
- <pt x="425" y="1925" on="1"/>
- <pt x="653" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 74 values pushed */
- 0 0 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 3 4 48 196 15 14 1 13
- 12 1 6 5 1 11 0 1 4 0 2 1 0 14 15 14 13 12 4 6 4 3 0 0 9
- 8 5 4 33 3 0 1 4 48 196 11 10 1 3 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Emacron" xMin="191" yMin="0" xMax="1308" yMax="1752">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="401" y="1604" on="1"/>
- <pt x="401" y="1752" on="1"/>
- <pt x="1043" y="1752" on="1"/>
- <pt x="1043" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 15 12 7 1 13 4 3 15 1 1 8 7 15 1 5 10 9 15 1 0 4 4 48
- 196 14 13 1 6 5 1 11 0 1 3 0 2 1 0 14 0 0 13 12 9 8 5 4 33
- 5 0 1 4 48 196 15 14 1 13 12 9 8 5 4 5 11 10 1 3 2 1 7 6 1
- 1 0 1 6 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eng" xMin="165" yMin="-420" xMax="1313" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="-92" on="1"/>
- <pt x="1313" y="-420" on="0"/>
- <pt x="995" y="-420" on="1"/>
- <pt x="921" y="-420" on="0"/>
- <pt x="844" y="-399" on="1"/>
- <pt x="844" y="-245" on="1"/>
- <pt x="910" y="-272" on="0"/>
- <pt x="985" y="-272" on="1"/>
- <pt x="1133" y="-272" on="0"/>
- <pt x="1133" y="-55" on="1"/>
- <pt x="1133" y="-40" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 13 40 8 48 196 17 3 2 1 0 3 16 15 11 10 6 5 13 8 0 18 0 1
- 0 5 4 2 1 0 3 14 2 10 17 2 0 0 16 15 4 3 24 3 5 18 17 24 1
- 0 2 4 48 196 6 5 1 11 10 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eogonek" xMin="191" yMin="-370" xMax="1308" yMax="1480">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1264" y="1480" on="1"/>
- <pt x="1264" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="848" on="1"/>
- <pt x="1165" y="848" on="1"/>
- <pt x="1165" y="693" on="1"/>
- <pt x="401" y="693" on="1"/>
- <pt x="401" y="157" on="1"/>
- <pt x="1308" y="157" on="1"/>
- <pt x="1308" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1075" y="0" on="1"/>
- <pt x="1182" y="0" on="1"/>
- <pt x="1054" y="-81" on="0"/>
- <pt x="1054" y="-179" on="1"/>
- <pt x="1054" y="-275" on="0"/>
- <pt x="1169" y="-275" on="1"/>
- <pt x="1222" y="-275" on="0"/>
- <pt x="1259" y="-260" on="1"/>
- <pt x="1259" y="-341" on="1"/>
- <pt x="1197" y="-370" on="0"/>
- <pt x="1120" y="-370" on="1"/>
- <pt x="917" y="-370" on="0"/>
- <pt x="917" y="-212" on="1"/>
- <pt x="917" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 0 0 17 21 22 48 196 20 19 22 0 0 0 4 3 15 1 1 8 7 15 1 5 10 9
- 15 1 0 3 4 48 196 6 5 1 13 12 11 0 3 2 0 2 1 0 14 0 0 15 42
- 24 48 196 20 19 13 3 2 6 3 24 24 12 2 6 4 3 0 0 9 8 5 4 33 3
- 0 1 4 48 196 11 10 1 3 2 1 7 6 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Eth" xMin="5" yMin="0" xMax="1386" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="679" on="1"/>
- <pt x="5" y="679" on="1"/>
- <pt x="5" y="836" on="1"/>
- <pt x="165" y="836" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="639" y="1480" on="1"/>
- <pt x="1386" y="1480" on="0"/>
- <pt x="1386" y="774" on="1"/>
- <pt x="1386" y="406" on="0"/>
- <pt x="1191" y="203" on="1"/>
- <pt x="996" y="0" on="0"/>
- <pt x="642" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="157" on="1"/>
- <pt x="627" y="157" on="1"/>
- <pt x="1161" y="157" on="0"/>
- <pt x="1161" y="750" on="1"/>
- <pt x="1161" y="1099" on="0"/>
- <pt x="950" y="1242" on="1"/>
- <pt x="888" y="1284" on="0"/>
- <pt x="803" y="1302" on="1"/>
- <pt x="700" y="1323" on="0"/>
- <pt x="530" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- <pt x="375" y="836" on="1"/>
- <pt x="708" y="836" on="1"/>
- <pt x="708" y="679" on="1"/>
- <pt x="375" y="679" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 23 22 15 1 5 27 26 2 1 15 3 3 14 13 15 1 0 3 4 48 196 25 24
- 4 3 3 12 0 1 2 0 6 5 0 14 0 0 16 26 8 48 196 22 14 12 6 4 25
- 13 3 8 25 0 0 27 24 23 13 33 3 0 1 4 48 196 26 25 1 5 4 1 0 3
- 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro" xMin="0" yMin="-37" xMax="1080" yMax="1515">
- <contour>
- <pt x="377" y="537" on="1"/>
- <pt x="416" y="376" on="0"/>
- <pt x="475" y="288" on="1"/>
- <pt x="582" y="127" on="0"/>
- <pt x="773" y="127" on="1"/>
- <pt x="898" y="127" on="0"/>
- <pt x="1080" y="199" on="1"/>
- <pt x="1080" y="27" on="1"/>
- <pt x="884" y="-37" on="0"/>
- <pt x="748" y="-37" on="1"/>
- <pt x="516" y="-37" on="0"/>
- <pt x="372" y="100" on="1"/>
- <pt x="270" y="197" on="0"/>
- <pt x="219" y="357" on="1"/>
- <pt x="200" y="415" on="0"/>
- <pt x="177" y="537" on="1"/>
- <pt x="0" y="537" on="1"/>
- <pt x="51" y="660" on="1"/>
- <pt x="162" y="660" on="1"/>
- <pt x="160" y="735" on="1"/>
- <pt x="160" y="739" on="0"/>
- <pt x="161" y="758" on="1"/>
- <pt x="162" y="801" on="0"/>
- <pt x="165" y="857" on="1"/>
- <pt x="0" y="857" on="1"/>
- <pt x="51" y="981" on="1"/>
- <pt x="183" y="981" on="1"/>
- <pt x="223" y="1147" on="0"/>
- <pt x="271" y="1232" on="1"/>
- <pt x="429" y="1515" on="0"/>
- <pt x="782" y="1515" on="1"/>
- <pt x="908" y="1515" on="0"/>
- <pt x="1079" y="1471" on="1"/>
- <pt x="1079" y="1289" on="1"/>
- <pt x="911" y="1360" on="0"/>
- <pt x="784" y="1360" on="1"/>
- <pt x="607" y="1360" on="0"/>
- <pt x="502" y="1232" on="1"/>
- <pt x="442" y="1158" on="0"/>
- <pt x="410" y="1066" on="1"/>
- <pt x="397" y="1030" on="0"/>
- <pt x="383" y="981" on="1"/>
- <pt x="950" y="981" on="1"/>
- <pt x="899" y="857" on="1"/>
- <pt x="362" y="857" on="1"/>
- <pt x="358" y="783" on="0"/>
- <pt x="357" y="736" on="1"/>
- <pt x="359" y="660" on="1"/>
- <pt x="818" y="660" on="1"/>
- <pt x="767" y="537" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 0 0 35 35 30 4 45 9 48 196 30 0 9 2 1 33 32 2 0 25 3 0 1 7 6
- 2 0 2 3 0 0 0 44 43 24 23 6 3 25 49 16 15 0 6 3 17 2 4 48 196
- 42 41 26 25 3 48 47 18 17 3 2 0 14 49 48 47 44 43 42 41 26 25 24 23 18
- 17 16 15 0 16 13 32 7 6 1 33 32 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Euro#1" xMin="0" yMin="-37" xMax="1080" yMax="1515">
- <contour>
- <pt x="377" y="537" on="1"/>
- <pt x="416" y="376" on="0"/>
- <pt x="475" y="288" on="1"/>
- <pt x="582" y="127" on="0"/>
- <pt x="773" y="127" on="1"/>
- <pt x="898" y="127" on="0"/>
- <pt x="1080" y="199" on="1"/>
- <pt x="1080" y="27" on="1"/>
- <pt x="884" y="-37" on="0"/>
- <pt x="748" y="-37" on="1"/>
- <pt x="516" y="-37" on="0"/>
- <pt x="372" y="100" on="1"/>
- <pt x="270" y="197" on="0"/>
- <pt x="219" y="357" on="1"/>
- <pt x="200" y="415" on="0"/>
- <pt x="177" y="537" on="1"/>
- <pt x="0" y="537" on="1"/>
- <pt x="51" y="660" on="1"/>
- <pt x="162" y="660" on="1"/>
- <pt x="160" y="735" on="1"/>
- <pt x="160" y="739" on="0"/>
- <pt x="161" y="758" on="1"/>
- <pt x="162" y="801" on="0"/>
- <pt x="165" y="857" on="1"/>
- <pt x="0" y="857" on="1"/>
- <pt x="51" y="981" on="1"/>
- <pt x="183" y="981" on="1"/>
- <pt x="223" y="1147" on="0"/>
- <pt x="271" y="1232" on="1"/>
- <pt x="429" y="1515" on="0"/>
- <pt x="782" y="1515" on="1"/>
- <pt x="908" y="1515" on="0"/>
- <pt x="1079" y="1471" on="1"/>
- <pt x="1079" y="1289" on="1"/>
- <pt x="911" y="1360" on="0"/>
- <pt x="784" y="1360" on="1"/>
- <pt x="607" y="1360" on="0"/>
- <pt x="502" y="1232" on="1"/>
- <pt x="442" y="1158" on="0"/>
- <pt x="410" y="1066" on="1"/>
- <pt x="397" y="1030" on="0"/>
- <pt x="383" y="981" on="1"/>
- <pt x="950" y="981" on="1"/>
- <pt x="899" y="857" on="1"/>
- <pt x="362" y="857" on="1"/>
- <pt x="358" y="783" on="0"/>
- <pt x="357" y="736" on="1"/>
- <pt x="359" y="660" on="1"/>
- <pt x="818" y="660" on="1"/>
- <pt x="767" y="537" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 0 0 35 35 30 4 45 9 48 196 30 0 9 2 1 33 32 2 0 25 3 0 1 7 6
- 2 0 2 3 0 0 0 44 43 24 23 6 3 25 49 16 15 0 6 3 17 2 4 48 196
- 42 41 26 25 3 48 47 18 17 3 2 0 14 49 48 47 44 43 42 41 26 25 24 23 18
- 17 16 15 0 16 13 32 7 6 1 33 32 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="F" xMin="191" yMin="0" xMax="1196" yMax="1480">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="1196" y="1480" on="1"/>
- <pt x="1196" y="1323" on="1"/>
- <pt x="401" y="1323" on="1"/>
- <pt x="401" y="827" on="1"/>
- <pt x="1096" y="827" on="1"/>
- <pt x="1096" y="672" on="1"/>
- <pt x="401" y="672" on="1"/>
- <pt x="401" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 4 3 15 1 1 8 7 15 1 5 2 4 48 196 6 5 1 9 0 1 2 0 2
- 1 0 14 0 0 9 8 5 4 33 3 0 1 4 48 196 3 2 1 7 6 1 1 0 1
- 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="G" xMin="93" yMin="-37" xMax="1405" yMax="1517">
- <contour>
- <pt x="1405" y="688" on="1"/>
- <pt x="1405" y="40" on="1"/>
- <pt x="1131" y="-37" on="0"/>
- <pt x="871" y="-37" on="1"/>
- <pt x="93" y="-37" on="0"/>
- <pt x="93" y="735" on="1"/>
- <pt x="93" y="1113" on="0"/>
- <pt x="294" y="1315" on="1"/>
- <pt x="496" y="1517" on="0"/>
- <pt x="877" y="1517" on="1"/>
- <pt x="1123" y="1517" on="0"/>
- <pt x="1403" y="1450" on="1"/>
- <pt x="1403" y="1256" on="1"/>
- <pt x="1082" y="1360" on="0"/>
- <pt x="868" y="1360" on="1"/>
- <pt x="318" y="1360" on="0"/>
- <pt x="318" y="744" on="1"/>
- <pt x="318" y="440" on="0"/>
- <pt x="470" y="280" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="900" y="120" on="1"/>
- <pt x="1015" y="120" on="0"/>
- <pt x="1196" y="157" on="1"/>
- <pt x="1196" y="534" on="1"/>
- <pt x="949" y="534" on="1"/>
- <pt x="949" y="688" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 20 29 3 14 29 9 48 196 9 0 3 2 1 12 11 2 0 0 3 0 1 22 1
- 2 23 2 3 0 0 0 24 23 15 1 0 1 4 48 196 25 0 1 0 14 0 0 16 26
- 5 48 196 5 24 0 0 23 22 33 1 0 1 4 48 196 1 0 1 12 11 1 25 24 1
- 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gbreve" xMin="93" yMin="-37" xMax="1405" yMax="1925">
- <contour>
- <pt x="1405" y="688" on="1"/>
- <pt x="1405" y="40" on="1"/>
- <pt x="1131" y="-37" on="0"/>
- <pt x="871" y="-37" on="1"/>
- <pt x="93" y="-37" on="0"/>
- <pt x="93" y="735" on="1"/>
- <pt x="93" y="1113" on="0"/>
- <pt x="294" y="1315" on="1"/>
- <pt x="496" y="1517" on="0"/>
- <pt x="877" y="1517" on="1"/>
- <pt x="1123" y="1517" on="0"/>
- <pt x="1403" y="1450" on="1"/>
- <pt x="1403" y="1256" on="1"/>
- <pt x="1082" y="1360" on="0"/>
- <pt x="868" y="1360" on="1"/>
- <pt x="318" y="1360" on="0"/>
- <pt x="318" y="744" on="1"/>
- <pt x="318" y="440" on="0"/>
- <pt x="470" y="280" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="900" y="120" on="1"/>
- <pt x="1015" y="120" on="0"/>
- <pt x="1196" y="157" on="1"/>
- <pt x="1196" y="534" on="1"/>
- <pt x="949" y="534" on="1"/>
- <pt x="949" y="688" on="1"/>
- </contour>
- <contour>
- <pt x="534" y="1925" on="1"/>
- <pt x="657" y="1925" on="1"/>
- <pt x="678" y="1831" on="0"/>
- <pt x="732" y="1791" on="1"/>
- <pt x="784" y="1752" on="0"/>
- <pt x="867" y="1752" on="1"/>
- <pt x="961" y="1752" on="0"/>
- <pt x="1015" y="1801" on="1"/>
- <pt x="1058" y="1841" on="0"/>
- <pt x="1077" y="1925" on="1"/>
- <pt x="1200" y="1925" on="1"/>
- <pt x="1184" y="1791" on="0"/>
- <pt x="1111" y="1710" on="1"/>
- <pt x="1017" y="1604" on="0"/>
- <pt x="867" y="1604" on="1"/>
- <pt x="710" y="1604" on="0"/>
- <pt x="615" y="1719" on="1"/>
- <pt x="550" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 100 values pushed */
- 0 0 31 40 40 20 29 3 14 29 9 48 196 9 0 3 2 1 12 11 2 0 0 3 0
- 1 22 1 2 23 2 3 0 1 36 35 27 26 4 13 40 0 0 0 0 24 23 15 1 0
- 1 4 48 196 25 0 1 0 14 0 0 16 26 5 48 196 36 11 22 2 35 22 24 2 27
- 26 5 24 0 0 23 22 33 1 0 1 4 48 196 1 0 1 12 11 1 25 24 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcircumflex" xMin="93" yMin="-37" xMax="1405" yMax="1925">
- <contour>
- <pt x="1405" y="688" on="1"/>
- <pt x="1405" y="40" on="1"/>
- <pt x="1131" y="-37" on="0"/>
- <pt x="871" y="-37" on="1"/>
- <pt x="93" y="-37" on="0"/>
- <pt x="93" y="735" on="1"/>
- <pt x="93" y="1113" on="0"/>
- <pt x="294" y="1315" on="1"/>
- <pt x="496" y="1517" on="0"/>
- <pt x="877" y="1517" on="1"/>
- <pt x="1123" y="1517" on="0"/>
- <pt x="1403" y="1450" on="1"/>
- <pt x="1403" y="1256" on="1"/>
- <pt x="1082" y="1360" on="0"/>
- <pt x="868" y="1360" on="1"/>
- <pt x="318" y="1360" on="0"/>
- <pt x="318" y="744" on="1"/>
- <pt x="318" y="440" on="0"/>
- <pt x="470" y="280" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="900" y="120" on="1"/>
- <pt x="1015" y="120" on="0"/>
- <pt x="1196" y="157" on="1"/>
- <pt x="1196" y="534" on="1"/>
- <pt x="949" y="534" on="1"/>
- <pt x="949" y="688" on="1"/>
- </contour>
- <contour>
- <pt x="517" y="1604" on="1"/>
- <pt x="758" y="1925" on="1"/>
- <pt x="976" y="1925" on="1"/>
- <pt x="1217" y="1604" on="1"/>
- <pt x="1069" y="1604" on="1"/>
- <pt x="868" y="1806" on="1"/>
- <pt x="866" y="1806" on="1"/>
- <pt x="665" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 20 29 3 14 29 9 48 196 9 0 3 2 32 31 2 27 26 3 1 12 11 2 0
- 0 3 0 1 22 1 2 23 2 3 0 0 0 24 23 15 1 0 1 4 48 196 28 27 1
- 33 30 29 26 3 25 0 1 3 0 14 0 0 16 26 5 48 196 29 11 22 2 30 28 2
- 22 24 3 33 32 31 27 26 5 13 5 24 0 0 23 22 33 1 0 1 4 48 196 1 0
- 1 12 11 1 25 24 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gcommaaccent" xMin="93" yMin="-432" xMax="1405" yMax="1517">
- <contour>
- <pt x="1405" y="688" on="1"/>
- <pt x="1405" y="40" on="1"/>
- <pt x="1128" y="-37" on="0"/>
- <pt x="871" y="-37" on="1"/>
- <pt x="93" y="-37" on="0"/>
- <pt x="93" y="735" on="1"/>
- <pt x="93" y="1113" on="0"/>
- <pt x="294" y="1315" on="1"/>
- <pt x="496" y="1517" on="0"/>
- <pt x="877" y="1517" on="1"/>
- <pt x="1123" y="1517" on="0"/>
- <pt x="1403" y="1450" on="1"/>
- <pt x="1403" y="1256" on="1"/>
- <pt x="1082" y="1360" on="0"/>
- <pt x="868" y="1360" on="1"/>
- <pt x="318" y="1360" on="0"/>
- <pt x="318" y="744" on="1"/>
- <pt x="318" y="440" on="0"/>
- <pt x="470" y="280" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="900" y="120" on="1"/>
- <pt x="1016" y="120" on="0"/>
- <pt x="1196" y="157" on="1"/>
- <pt x="1196" y="534" on="1"/>
- <pt x="949" y="534" on="1"/>
- <pt x="949" y="688" on="1"/>
- </contour>
- <contour>
- <pt x="700" y="-421" on="1"/>
- <pt x="700" y="-336" on="1"/>
- <pt x="757" y="-345" on="0"/>
- <pt x="798" y="-345" on="1"/>
- <pt x="907" y="-345" on="0"/>
- <pt x="907" y="-278" on="1"/>
- <pt x="907" y="-204" on="0"/>
- <pt x="749" y="-188" on="1"/>
- <pt x="749" y="-111" on="1"/>
- <pt x="883" y="-114" on="0"/>
- <pt x="949" y="-143" on="1"/>
- <pt x="1042" y="-185" on="0"/>
- <pt x="1042" y="-280" on="1"/>
- <pt x="1042" y="-432" on="0"/>
- <pt x="825" y="-432" on="1"/>
- <pt x="765" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 104 values pushed */
- 0 0 29 44 40 20 29 3 14 29 9 48 196 9 0 3 2 1 12 11 2 0 0 3 0
- 1 22 1 2 23 2 3 0 1 34 33 27 26 4 13 40 2 0 0 0 24 23 15 1 0
- 1 4 48 196 25 0 1 0 14 0 0 31 42 38 16 26 5 48 196 38 38 22 24 2 34
- 33 27 26 4 13 5 24 0 0 23 22 33 1 0 1 4 48 196 1 0 1 12 11 1 25
- 24 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Gdotaccent" xMin="93" yMin="-37" xMax="1405" yMax="1801">
- <contour>
- <pt x="1405" y="688" on="1"/>
- <pt x="1405" y="40" on="1"/>
- <pt x="1131" y="-37" on="0"/>
- <pt x="871" y="-37" on="1"/>
- <pt x="93" y="-37" on="0"/>
- <pt x="93" y="735" on="1"/>
- <pt x="93" y="1113" on="0"/>
- <pt x="294" y="1315" on="1"/>
- <pt x="496" y="1517" on="0"/>
- <pt x="877" y="1517" on="1"/>
- <pt x="1123" y="1517" on="0"/>
- <pt x="1403" y="1450" on="1"/>
- <pt x="1403" y="1256" on="1"/>
- <pt x="1082" y="1360" on="0"/>
- <pt x="868" y="1360" on="1"/>
- <pt x="318" y="1360" on="0"/>
- <pt x="318" y="744" on="1"/>
- <pt x="318" y="440" on="0"/>
- <pt x="470" y="280" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="900" y="120" on="1"/>
- <pt x="1015" y="120" on="0"/>
- <pt x="1196" y="157" on="1"/>
- <pt x="1196" y="534" on="1"/>
- <pt x="949" y="534" on="1"/>
- <pt x="949" y="688" on="1"/>
- </contour>
- <contour>
- <pt x="768" y="1604" on="1"/>
- <pt x="768" y="1801" on="1"/>
- <pt x="965" y="1801" on="1"/>
- <pt x="965" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 0 0 20 29 3 14 29 9 48 196 9 0 3 2 1 12 11 2 0 0 3 0 1 22 1
- 2 23 2 3 0 0 0 29 26 5 1 27 24 23 15 1 0 2 4 48 196 28 27 1 25
- 0 1 2 0 14 0 0 16 26 5 48 196 5 26 0 0 27 26 4 1 28 23 22 33 1
- 0 2 4 48 196 29 28 1 1 0 1 12 11 1 25 24 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="H" xMin="165" yMin="0" xMax="1313" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="856" on="1"/>
- <pt x="1104" y="856" on="1"/>
- <pt x="1104" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="1104" y="699" on="1"/>
- <pt x="375" y="699" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 10 9 15 1 3 1 4 48 196 4 3 1 11 8 7 0 3 2 0 6 5 2 1
- 0 3 14 0 0 9 8 5 4 33 3 6 11 10 3 2 33 3 0 2 4 48 196 7 6
- 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hbar" xMin="17" yMin="0" xMax="1461" yMax="1480">
- <contour>
- <pt x="375" y="856" on="1"/>
- <pt x="1104" y="856" on="1"/>
- <pt x="1104" y="1110" on="1"/>
- <pt x="375" y="1110" on="1"/>
- </contour>
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1110" on="1"/>
- <pt x="17" y="1110" on="1"/>
- <pt x="17" y="1234" on="1"/>
- <pt x="165" y="1234" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="1234" on="1"/>
- <pt x="1104" y="1234" on="1"/>
- <pt x="1104" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="1234" on="1"/>
- <pt x="1461" y="1234" on="1"/>
- <pt x="1461" y="1110" on="1"/>
- <pt x="1313" y="1110" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="1104" y="699" on="1"/>
- <pt x="375" y="699" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 107 values pushed */
- 0 0 18 17 6 5 3 2 6 5 7 1 4 48 196 16 15 12 11 8 7 5 22 21 1
- 23 20 19 4 3 18 17 6 5 3 2 5 1 0 1 5 0 14 13 10 9 0 3 14 17
- 16 2 13 14 7 6 4 0 0 21 20 13 12 2 1 33 5 14 23 22 11 10 3 0 33
- 5 4 2 4 48 196 19 18 15 14 3 9 8 5 4 3 21 20 13 12 2 1 5 23 22
- 11 10 3 0 5 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Hcircumflex" xMin="165" yMin="0" xMax="1313" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="856" on="1"/>
- <pt x="1104" y="856" on="1"/>
- <pt x="1104" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1104" y="0" on="1"/>
- <pt x="1104" y="699" on="1"/>
- <pt x="375" y="699" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="389" y="1604" on="1"/>
- <pt x="630" y="1925" on="1"/>
- <pt x="848" y="1925" on="1"/>
- <pt x="1089" y="1604" on="1"/>
- <pt x="941" y="1604" on="1"/>
- <pt x="740" y="1806" on="1"/>
- <pt x="738" y="1806" on="1"/>
- <pt x="537" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 18 17 2 13 12 3 0 0 10 9 15 1 3 1 4 48 196 14 13 1 19 16 15 12 3
- 4 3 1 11 8 7 0 3 4 0 6 5 2 1 0 3 14 19 18 17 16 15 14 13 12
- 8 4 2 3 0 0 9 8 5 4 33 3 6 11 10 3 2 33 3 0 2 4 48 196 7
- 6 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="I" xMin="180" yMin="0" xMax="390" yMax="1480">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 23 values pushed */
- 3 0 1 0 2 1 0 14 0 0 3 2 33 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="IJ" xMin="180" yMin="-296" xMax="1322" yMax="1480">
- <component glyphName="I" x="0" y="0" flags="0x4"/>
- <component glyphName="J" x="482" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="Iacute" xMin="137" yMin="0" xMax="606" yMax="1925">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="137" y="1604" on="1"/>
- <pt x="378" y="1925" on="1"/>
- <pt x="606" y="1925" on="1"/>
- <pt x="285" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 40 values pushed */
- 6 5 1 7 4 1 3 0 1 3 0 2 1 0 14 7 5 2 2 0 3 6 2 4 0
- 0 0 3 2 33 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ibreve" xMin="-48" yMin="0" xMax="618" yMax="1925">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-48" y="1925" on="1"/>
- <pt x="75" y="1925" on="1"/>
- <pt x="96" y="1831" on="0"/>
- <pt x="150" y="1791" on="1"/>
- <pt x="202" y="1752" on="0"/>
- <pt x="285" y="1752" on="1"/>
- <pt x="379" y="1752" on="0"/>
- <pt x="433" y="1801" on="1"/>
- <pt x="476" y="1841" on="0"/>
- <pt x="495" y="1925" on="1"/>
- <pt x="618" y="1925" on="1"/>
- <pt x="602" y="1791" on="0"/>
- <pt x="529" y="1710" on="1"/>
- <pt x="435" y="1604" on="0"/>
- <pt x="285" y="1604" on="1"/>
- <pt x="128" y="1604" on="0"/>
- <pt x="33" y="1719" on="1"/>
- <pt x="-32" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 9 7 18 48 196 14 13 5 4 4 13 18 1 3 0 1 0 2 1 0 14 14 13
- 2 13 2 5 4 0 0 0 3 2 9 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Icircumflex" xMin="-65" yMin="0" xMax="635" yMax="1925">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-65" y="1604" on="1"/>
- <pt x="176" y="1925" on="1"/>
- <pt x="394" y="1925" on="1"/>
- <pt x="635" y="1604" on="1"/>
- <pt x="487" y="1604" on="1"/>
- <pt x="286" y="1806" on="1"/>
- <pt x="284" y="1806" on="1"/>
- <pt x="83" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 10 9 2 5 4 3 6 5 1 11 8 7 4 3 3 0 1 3 0 2 1 0 14 10 9
- 2 2 0 3 8 7 6 3 13 2 11 5 4 3 13 0 0 0 3 2 33 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idieresis" xMin="1" yMin="0" xMax="569" yMax="1777">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1" y="1604" on="1"/>
- <pt x="1" y="1777" on="1"/>
- <pt x="174" y="1777" on="1"/>
- <pt x="174" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="396" y="1604" on="1"/>
- <pt x="396" y="1777" on="1"/>
- <pt x="569" y="1777" on="1"/>
- <pt x="569" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 11 8 7 4 13 3 5 1 4 48 196 10 9 6 5 3 3 0 1 2 0 2 1
- 0 14 0 0 9 8 13 1 10 7 6 13 1 4 3 2 33 1 0 3 4 48 196 11 10
- 1 5 4 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Idotaccent" xMin="180" yMin="0" xMax="390" yMax="1801">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="186" y="1604" on="1"/>
- <pt x="186" y="1801" on="1"/>
- <pt x="383" y="1801" on="1"/>
- <pt x="383" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 7 4 5 1 5 1 4 48 196 6 5 1 3 0 1 2 0 2 1 0 14 0 0
- 7 6 4 1 4 3 2 33 1 0 2 4 48 196 5 4 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Igrave" xMin="-36" yMin="0" xMax="433" yMax="1925">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="433" y="1604" on="1"/>
- <pt x="285" y="1604" on="1"/>
- <pt x="-36" y="1925" on="1"/>
- <pt x="192" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 40 values pushed */
- 7 6 1 5 4 1 3 0 1 3 0 2 1 0 14 7 5 2 2 0 3 4 2 6 0
- 0 0 3 2 33 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Imacron" xMin="-36" yMin="0" xMax="606" yMax="1752">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-36" y="1604" on="1"/>
- <pt x="-36" y="1752" on="1"/>
- <pt x="606" y="1752" on="1"/>
- <pt x="606" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 0 0 7 4 7 1 5 1 4 48 196 6 5 1 3 0 1 2 0 2 1 0 14 0 0
- 3 2 33 1 0 1 4 48 196 7 6 1 5 4 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Iogonek" xMin="120" yMin="-370" xMax="462" yMax="1480">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="278" y="0" on="1"/>
- <pt x="385" y="0" on="1"/>
- <pt x="257" y="-80" on="0"/>
- <pt x="257" y="-179" on="1"/>
- <pt x="257" y="-275" on="0"/>
- <pt x="372" y="-275" on="1"/>
- <pt x="425" y="-275" on="0"/>
- <pt x="462" y="-260" on="1"/>
- <pt x="462" y="-341" on="1"/>
- <pt x="400" y="-370" on="0"/>
- <pt x="322" y="-370" on="1"/>
- <pt x="120" y="-370" on="0"/>
- <pt x="120" y="-212" on="1"/>
- <pt x="120" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 9 21 14 48 196 12 11 14 0 5 4 3 0 3 0 2 1 0 14 0 0 7 42
- 16 48 196 5 4 2 2 0 3 12 11 2 13 2 16 0 0 0 3 2 33 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Itilde" xMin="-48" yMin="0" xMax="618" yMax="1838">
- <contour>
- <pt x="180" y="0" on="1"/>
- <pt x="180" y="1480" on="1"/>
- <pt x="390" y="1480" on="1"/>
- <pt x="390" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-48" y="1604" on="1"/>
- <pt x="-41" y="1697" on="0"/>
- <pt x="-16" y="1748" on="1"/>
- <pt x="30" y="1838" on="0"/>
- <pt x="139" y="1838" on="1"/>
- <pt x="211" y="1838" on="0"/>
- <pt x="272" y="1800" on="1"/>
- <pt x="332" y="1763" on="1"/>
- <pt x="389" y="1728" on="0"/>
- <pt x="419" y="1728" on="1"/>
- <pt x="484" y="1728" on="0"/>
- <pt x="495" y="1838" on="1"/>
- <pt x="618" y="1838" on="1"/>
- <pt x="611" y="1744" on="0"/>
- <pt x="586" y="1694" on="1"/>
- <pt x="541" y="1604" on="0"/>
- <pt x="433" y="1604" on="1"/>
- <pt x="361" y="1604" on="0"/>
- <pt x="298" y="1643" on="1"/>
- <pt x="238" y="1680" on="1"/>
- <pt x="183" y="1714" on="0"/>
- <pt x="151" y="1714" on="1"/>
- <pt x="86" y="1714" on="0"/>
- <pt x="75" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 25 6 8 13 6 20 48 196 27 16 15 4 4 13 20 8 1 3 0 1 0 2 1
- 0 14 16 15 2 13 2 27 4 0 0 0 3 2 9 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="J" xMin="49" yMin="-296" xMax="840" yMax="1480">
- <contour>
- <pt x="49" y="-232" on="1"/>
- <pt x="49" y="-51" on="1"/>
- <pt x="220" y="-128" on="0"/>
- <pt x="369" y="-128" on="1"/>
- <pt x="540" y="-128" on="0"/>
- <pt x="589" y="-49" on="1"/>
- <pt x="630" y="19" on="0"/>
- <pt x="630" y="180" on="1"/>
- <pt x="630" y="1480" on="1"/>
- <pt x="840" y="1480" on="1"/>
- <pt x="840" y="187" on="1"/>
- <pt x="840" y="-296" on="0"/>
- <pt x="359" y="-296" on="1"/>
- <pt x="197" y="-296" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 3 30 12 48 196 1 10 7 2 8 2 3 0 1 1 0 12 2 0 9 8 0 14
- 0 0 8 7 33 1 9 1 4 48 196 10 9 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Jcircumflex" xMin="49" yMin="-296" xMax="1061" yMax="1925">
- <contour>
- <pt x="49" y="-232" on="1"/>
- <pt x="49" y="-51" on="1"/>
- <pt x="220" y="-128" on="0"/>
- <pt x="369" y="-128" on="1"/>
- <pt x="540" y="-128" on="0"/>
- <pt x="589" y="-49" on="1"/>
- <pt x="630" y="19" on="0"/>
- <pt x="630" y="180" on="1"/>
- <pt x="630" y="1480" on="1"/>
- <pt x="840" y="1480" on="1"/>
- <pt x="840" y="187" on="1"/>
- <pt x="840" y="-296" on="0"/>
- <pt x="359" y="-296" on="1"/>
- <pt x="197" y="-296" on="0"/>
- </contour>
- <contour>
- <pt x="361" y="1604" on="1"/>
- <pt x="602" y="1925" on="1"/>
- <pt x="820" y="1925" on="1"/>
- <pt x="1061" y="1604" on="1"/>
- <pt x="913" y="1604" on="1"/>
- <pt x="712" y="1806" on="1"/>
- <pt x="710" y="1806" on="1"/>
- <pt x="509" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 3 30 12 48 196 20 19 2 15 14 3 1 10 7 2 8 2 3 0 1 1 0 12
- 2 0 16 15 1 21 18 17 14 3 2 0 9 8 0 14 20 19 16 3 9 7 3 21 15
- 14 3 7 0 3 18 17 2 13 9 0 0 8 7 33 1 9 1 4 48 196 10 9 1 1
- 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="K" xMin="191" yMin="0" xMax="1317" yMax="1480">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="388" y="1480" on="1"/>
- <pt x="388" y="752" on="1"/>
- <pt x="1003" y="1480" on="1"/>
- <pt x="1214" y="1480" on="1"/>
- <pt x="618" y="774" on="1"/>
- <pt x="1317" y="0" on="1"/>
- <pt x="1051" y="0" on="1"/>
- <pt x="388" y="750" on="1"/>
- <pt x="388" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 9 6 3 3 1 0 3 10 8 7 0 3 0 5 4 2 1 0 3 14 8 7 6 5 4
- 5 13 2 0 0 10 9 3 2 4 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Kcommaaccent" xMin="191" yMin="-432" xMax="1317" yMax="1480">
- <contour>
- <pt x="191" y="0" on="1"/>
- <pt x="191" y="1480" on="1"/>
- <pt x="388" y="1480" on="1"/>
- <pt x="388" y="752" on="1"/>
- <pt x="1003" y="1480" on="1"/>
- <pt x="1214" y="1480" on="1"/>
- <pt x="618" y="774" on="1"/>
- <pt x="1317" y="0" on="1"/>
- <pt x="1051" y="0" on="1"/>
- <pt x="388" y="750" on="1"/>
- <pt x="388" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="487" y="-421" on="1"/>
- <pt x="487" y="-336" on="1"/>
- <pt x="544" y="-345" on="0"/>
- <pt x="584" y="-345" on="1"/>
- <pt x="694" y="-345" on="0"/>
- <pt x="694" y="-278" on="1"/>
- <pt x="694" y="-204" on="0"/>
- <pt x="536" y="-188" on="1"/>
- <pt x="536" y="-111" on="1"/>
- <pt x="670" y="-114" on="0"/>
- <pt x="736" y="-143" on="1"/>
- <pt x="829" y="-185" on="0"/>
- <pt x="829" y="-280" on="1"/>
- <pt x="829" y="-432" on="0"/>
- <pt x="612" y="-432" on="1"/>
- <pt x="553" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 14 44 25 48 196 9 6 3 3 1 0 3 19 18 12 11 4 13 25 0 10 8 7
- 0 3 0 5 4 2 1 0 3 14 0 0 16 42 23 48 196 19 18 12 11 8 7 6 5
- 4 9 13 23 2 0 0 10 9 3 2 4 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="L" xMin="165" yMin="0" xMax="1101" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1101" y="157" on="1"/>
- <pt x="1101" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 38 values pushed */
- 0 0 4 3 15 1 0 1 4 48 196 5 0 1 0 2 1 0 14 0 0 3 2 33 1
- 0 1 4 48 196 5 4 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lacute" xMin="165" yMin="0" xMax="1101" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1101" y="157" on="1"/>
- <pt x="1101" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="177" y="1604" on="1"/>
- <pt x="418" y="1925" on="1"/>
- <pt x="646" y="1925" on="1"/>
- <pt x="325" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 4 3 15 1 0 1 4 48 196 8 7 1 9 6 1 5 0 1 3 0 2 1 0
- 14 8 7 2 4 2 3 9 6 2 2 0 3 0 0 3 2 33 1 0 1 4 48 196 5
- 4 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcaron" xMin="165" yMin="0" xMax="1101" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1101" y="157" on="1"/>
- <pt x="1101" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="671" y="1026" on="1"/>
- <pt x="671" y="1085" on="1"/>
- <pt x="747" y="1106" on="0"/>
- <pt x="747" y="1266" on="1"/>
- <pt x="747" y="1283" on="1"/>
- <pt x="671" y="1283" on="1"/>
- <pt x="671" y="1480" on="1"/>
- <pt x="868" y="1480" on="1"/>
- <pt x="868" y="1309" on="1"/>
- <pt x="867" y="1047" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 14 11 10 9 7 6 6 1 3 3 0 0 4 3 15 1 0 1 4 48 196 5 0 1 0
- 13 12 2 1 0 3 14 10 9 2 13 6 3 0 0 12 11 7 6 4 3 13 3 2 33
- 1 0 2 4 48 196 14 13 1 5 4 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lcommaaccent" xMin="165" yMin="-432" xMax="1101" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1101" y="157" on="1"/>
- <pt x="1101" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="449" y="-421" on="1"/>
- <pt x="449" y="-336" on="1"/>
- <pt x="506" y="-345" on="0"/>
- <pt x="546" y="-345" on="1"/>
- <pt x="656" y="-345" on="0"/>
- <pt x="656" y="-278" on="1"/>
- <pt x="656" y="-204" on="0"/>
- <pt x="498" y="-188" on="1"/>
- <pt x="498" y="-111" on="1"/>
- <pt x="632" y="-114" on="0"/>
- <pt x="698" y="-143" on="1"/>
- <pt x="791" y="-185" on="0"/>
- <pt x="791" y="-280" on="1"/>
- <pt x="791" y="-432" on="0"/>
- <pt x="574" y="-432" on="1"/>
- <pt x="515" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 9 44 20 48 196 14 13 7 6 4 13 20 0 0 0 4 3 15 1 0 1 4 48
- 196 5 0 1 0 2 1 0 14 0 0 11 42 18 48 196 18 18 14 13 7 6 5 4 2
- 3 0 0 3 2 33 1 0 1 4 48 196 5 4 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ldot" xMin="165" yMin="0" xMax="1101" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1101" y="157" on="1"/>
- <pt x="1101" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="743" y="642" on="1"/>
- <pt x="743" y="839" on="1"/>
- <pt x="940" y="839" on="1"/>
- <pt x="940" y="642" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 0 0 9 6 5 1 7 4 3 15 1 0 2 4 48 196 8 7 1 5 0 1 2 0 2
- 1 0 14 0 0 7 6 4 1 8 3 2 33 1 0 2 4 48 196 9 8 1 5 4 1
- 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Lslash" xMin="17" yMin="0" xMax="1100" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="692" on="1"/>
- <pt x="17" y="612" on="1"/>
- <pt x="17" y="780" on="1"/>
- <pt x="165" y="862" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="375" y="976" on="1"/>
- <pt x="621" y="1110" on="1"/>
- <pt x="621" y="941" on="1"/>
- <pt x="375" y="807" on="1"/>
- <pt x="375" y="157" on="1"/>
- <pt x="1100" y="157" on="1"/>
- <pt x="1100" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 10 9 8 7 4 3 2 1 8 5 11 3 0 0 12 11 15 1 0 1 4 48 196 13 0
- 1 0 6 5 0 14 0 0 11 10 7 6 33 3 0 1 4 48 196 13 12 1 9 8 1
- 5 4 1 0 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="M" xMin="165" yMin="0" xMax="1541" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="456" y="1480" on="1"/>
- <pt x="863" y="335" on="1"/>
- <pt x="1281" y="1480" on="1"/>
- <pt x="1541" y="1480" on="1"/>
- <pt x="1541" y="0" on="1"/>
- <pt x="1345" y="0" on="1"/>
- <pt x="1345" y="1203" on="1"/>
- <pt x="941" y="99" on="1"/>
- <pt x="738" y="99" on="1"/>
- <pt x="346" y="1207" on="1"/>
- <pt x="346" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 11 8 3 3 1 9 3 10 9 1 12 7 6 0 3 2 0 5 4 2 1 0 3 14 10
- 9 4 3 2 5 7 11 3 0 0 8 7 4 1 5 12 11 24 1 0 2 4 48 196 6
- 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="N" xMin="165" yMin="0" xMax="1313" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1107" y="0" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 49 values pushed */
- 8 3 2 1 0 3 9 7 6 0 3 0 5 4 2 1 0 3 14 7 2 2 3 8 3
- 0 0 4 3 24 1 5 9 8 24 1 0 2 4 48 196 6 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Nacute" xMin="165" yMin="0" xMax="1313" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1107" y="0" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="591" y="1604" on="1"/>
- <pt x="832" y="1925" on="1"/>
- <pt x="1060" y="1925" on="1"/>
- <pt x="739" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 8 3 2 1 0 3 12 11 1 13 10 1 9 7 6 0 3 3 0 5 4 2 1 0 3
- 14 13 12 11 10 7 2 6 3 8 3 0 0 4 3 24 1 5 9 8 24 1 0 2 4
- 48 196 6 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncaron" xMin="165" yMin="0" xMax="1313" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1107" y="0" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1089" y="1925" on="1"/>
- <pt x="848" y="1604" on="1"/>
- <pt x="630" y="1604" on="1"/>
- <pt x="389" y="1925" on="1"/>
- <pt x="537" y="1925" on="1"/>
- <pt x="738" y="1723" on="1"/>
- <pt x="740" y="1723" on="1"/>
- <pt x="941" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 16 15 2 10 11 3 8 3 2 1 0 3 17 14 13 10 3 12 11 1 9 7 6 0 3
- 3 0 5 4 2 1 0 3 14 17 16 15 14 13 12 11 10 7 2 10 3 8 3 0 0
- 4 3 24 1 5 9 8 24 1 0 2 4 48 196 6 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ncommaaccent" xMin="165" yMin="-432" xMax="1313" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1107" y="0" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="518" y="-421" on="1"/>
- <pt x="518" y="-336" on="1"/>
- <pt x="575" y="-345" on="0"/>
- <pt x="615" y="-345" on="1"/>
- <pt x="725" y="-345" on="0"/>
- <pt x="725" y="-278" on="1"/>
- <pt x="725" y="-205" on="0"/>
- <pt x="567" y="-188" on="1"/>
- <pt x="567" y="-111" on="1"/>
- <pt x="702" y="-114" on="0"/>
- <pt x="767" y="-143" on="1"/>
- <pt x="860" y="-185" on="0"/>
- <pt x="860" y="-280" on="1"/>
- <pt x="860" y="-432" on="0"/>
- <pt x="643" y="-432" on="1"/>
- <pt x="584" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 13 44 24 48 196 8 3 2 1 0 3 18 17 11 10 4 13 24 0 9 7 6 0
- 3 0 5 4 2 1 0 3 14 0 0 15 42 22 48 196 22 22 18 17 11 10 7 2 7
- 3 8 3 0 0 4 3 24 1 5 9 8 24 1 0 2 4 48 196 6 5 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ntilde" xMin="165" yMin="0" xMax="1313" yMax="1838">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="370" y="1480" on="1"/>
- <pt x="1133" y="337" on="1"/>
- <pt x="1133" y="1480" on="1"/>
- <pt x="1313" y="1480" on="1"/>
- <pt x="1313" y="0" on="1"/>
- <pt x="1107" y="0" on="1"/>
- <pt x="345" y="1143" on="1"/>
- <pt x="345" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="432" y="1604" on="1"/>
- <pt x="439" y="1698" on="0"/>
- <pt x="464" y="1748" on="1"/>
- <pt x="510" y="1838" on="0"/>
- <pt x="619" y="1838" on="1"/>
- <pt x="690" y="1838" on="0"/>
- <pt x="752" y="1800" on="1"/>
- <pt x="812" y="1763" on="1"/>
- <pt x="869" y="1728" on="0"/>
- <pt x="899" y="1728" on="1"/>
- <pt x="964" y="1728" on="0"/>
- <pt x="975" y="1838" on="1"/>
- <pt x="1098" y="1838" on="1"/>
- <pt x="1091" y="1744" on="0"/>
- <pt x="1066" y="1694" on="1"/>
- <pt x="1021" y="1604" on="0"/>
- <pt x="913" y="1604" on="1"/>
- <pt x="841" y="1604" on="0"/>
- <pt x="778" y="1643" on="1"/>
- <pt x="718" y="1680" on="1"/>
- <pt x="663" y="1714" on="0"/>
- <pt x="631" y="1714" on="1"/>
- <pt x="566" y="1714" on="0"/>
- <pt x="555" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 31 6 14 19 6 26 48 196 8 3 2 1 0 3 33 22 21 10 4 13 26 14 1
- 9 7 6 0 3 0 5 4 2 1 0 3 14 33 22 21 10 7 2 6 3 8 3 0 0
- 4 3 24 1 5 9 8 24 1 0 2 4 48 196 6 5 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="O" xMin="93" yMin="-37" xMax="1501" yMax="1517">
- <contour>
- <pt x="797" y="1517" on="1"/>
- <pt x="1116" y="1517" on="0"/>
- <pt x="1309" y="1306" on="1"/>
- <pt x="1501" y="1094" on="0"/>
- <pt x="1501" y="742" on="1"/>
- <pt x="1501" y="383" on="0"/>
- <pt x="1309" y="173" on="1"/>
- <pt x="1116" y="-37" on="0"/>
- <pt x="787" y="-37" on="1"/>
- <pt x="505" y="-37" on="0"/>
- <pt x="322" y="136" on="1"/>
- <pt x="93" y="353" on="0"/>
- <pt x="93" y="740" on="1"/>
- <pt x="93" y="1095" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="477" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="797" y="1360" on="1"/>
- <pt x="570" y="1360" on="0"/>
- <pt x="444" y="1197" on="1"/>
- <pt x="318" y="1034" on="0"/>
- <pt x="318" y="741" on="1"/>
- <pt x="318" y="450" on="0"/>
- <pt x="444" y="285" on="1"/>
- <pt x="569" y="120" on="0"/>
- <pt x="792" y="120" on="1"/>
- <pt x="999" y="120" on="0"/>
- <pt x="1122" y="252" on="1"/>
- <pt x="1276" y="415" on="0"/>
- <pt x="1276" y="742" on="1"/>
- <pt x="1276" y="1034" on="0"/>
- <pt x="1149" y="1197" on="1"/>
- <pt x="1022" y="1360" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 14 0 0 28 26 4 20 26 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="OE" xMin="93" yMin="-37" xMax="1991" yMax="1517">
- <contour>
- <pt x="1129" y="0" on="1"/>
- <pt x="1129" y="58" on="1"/>
- <pt x="965" y="-37" on="0"/>
- <pt x="775" y="-37" on="1"/>
- <pt x="469" y="-37" on="0"/>
- <pt x="281" y="177" on="1"/>
- <pt x="93" y="391" on="0"/>
- <pt x="93" y="740" on="1"/>
- <pt x="93" y="1095" on="0"/>
- <pt x="282" y="1306" on="1"/>
- <pt x="471" y="1517" on="0"/>
- <pt x="785" y="1517" on="1"/>
- <pt x="967" y="1517" on="0"/>
- <pt x="1129" y="1423" on="1"/>
- <pt x="1129" y="1480" on="1"/>
- <pt x="1947" y="1480" on="1"/>
- <pt x="1947" y="1323" on="1"/>
- <pt x="1339" y="1323" on="1"/>
- <pt x="1339" y="848" on="1"/>
- <pt x="1848" y="848" on="1"/>
- <pt x="1848" y="693" on="1"/>
- <pt x="1339" y="693" on="1"/>
- <pt x="1339" y="157" on="1"/>
- <pt x="1991" y="157" on="1"/>
- <pt x="1991" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1129" y="569" on="1"/>
- <pt x="1129" y="911" on="1"/>
- <pt x="1129" y="1147" on="0"/>
- <pt x="1048" y="1253" on="1"/>
- <pt x="967" y="1360" on="0"/>
- <pt x="788" y="1360" on="1"/>
- <pt x="565" y="1360" on="0"/>
- <pt x="441" y="1197" on="1"/>
- <pt x="316" y="1034" on="0"/>
- <pt x="316" y="740" on="1"/>
- <pt x="316" y="446" on="0"/>
- <pt x="441" y="283" on="1"/>
- <pt x="567" y="120" on="0"/>
- <pt x="789" y="120" on="1"/>
- <pt x="1129" y="120" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 38 29 3 30 29 11 48 196 11 0 3 2 13 14 16 2 26 16 18 2 25 20 22
- 2 1 22 0 2 0 0 17 16 15 1 14 21 20 15 1 18 23 22 15 1 0 3 4 48
- 196 19 18 1 24 0 1 2 0 15 14 0 14 0 0 34 26 7 48 196 7 0 0 0 26
- 25 14 13 1 0 33 5 17 1 4 48 196 24 23 1 16 15 1 20 19 1 22 21 18 17
- 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oacute" xMin="92" yMin="-37" xMax="1500" yMax="1925">
- <contour>
- <pt x="796" y="1517" on="1"/>
- <pt x="1115" y="1517" on="0"/>
- <pt x="1308" y="1306" on="1"/>
- <pt x="1500" y="1094" on="0"/>
- <pt x="1500" y="742" on="1"/>
- <pt x="1500" y="383" on="0"/>
- <pt x="1308" y="173" on="1"/>
- <pt x="1115" y="-37" on="0"/>
- <pt x="786" y="-37" on="1"/>
- <pt x="504" y="-37" on="0"/>
- <pt x="321" y="136" on="1"/>
- <pt x="92" y="353" on="0"/>
- <pt x="92" y="740" on="1"/>
- <pt x="92" y="1095" on="0"/>
- <pt x="284" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="796" y="1360" on="1"/>
- <pt x="569" y="1360" on="0"/>
- <pt x="443" y="1197" on="1"/>
- <pt x="317" y="1034" on="0"/>
- <pt x="317" y="741" on="1"/>
- <pt x="317" y="450" on="0"/>
- <pt x="443" y="285" on="1"/>
- <pt x="568" y="120" on="0"/>
- <pt x="791" y="120" on="1"/>
- <pt x="998" y="120" on="0"/>
- <pt x="1121" y="252" on="1"/>
- <pt x="1275" y="415" on="0"/>
- <pt x="1275" y="742" on="1"/>
- <pt x="1275" y="1034" on="0"/>
- <pt x="1148" y="1197" on="1"/>
- <pt x="1021" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="648" y="1604" on="1"/>
- <pt x="889" y="1925" on="1"/>
- <pt x="1117" y="1925" on="1"/>
- <pt x="796" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 39 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 34 33 1 35 32 1 2 0 14 0 0
- 28 26 4 20 26 12 48 196 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Obreve" xMin="93" yMin="-37" xMax="1501" yMax="1925">
- <contour>
- <pt x="797" y="1517" on="1"/>
- <pt x="1116" y="1517" on="0"/>
- <pt x="1309" y="1306" on="1"/>
- <pt x="1501" y="1094" on="0"/>
- <pt x="1501" y="742" on="1"/>
- <pt x="1501" y="383" on="0"/>
- <pt x="1309" y="173" on="1"/>
- <pt x="1116" y="-37" on="0"/>
- <pt x="787" y="-37" on="1"/>
- <pt x="505" y="-37" on="0"/>
- <pt x="322" y="136" on="1"/>
- <pt x="93" y="353" on="0"/>
- <pt x="93" y="740" on="1"/>
- <pt x="93" y="1095" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="477" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="797" y="1360" on="1"/>
- <pt x="570" y="1360" on="0"/>
- <pt x="444" y="1197" on="1"/>
- <pt x="318" y="1034" on="0"/>
- <pt x="318" y="741" on="1"/>
- <pt x="318" y="450" on="0"/>
- <pt x="444" y="285" on="1"/>
- <pt x="569" y="120" on="0"/>
- <pt x="792" y="120" on="1"/>
- <pt x="999" y="120" on="0"/>
- <pt x="1122" y="252" on="1"/>
- <pt x="1276" y="415" on="0"/>
- <pt x="1276" y="742" on="1"/>
- <pt x="1276" y="1034" on="0"/>
- <pt x="1149" y="1197" on="1"/>
- <pt x="1022" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="464" y="1925" on="1"/>
- <pt x="587" y="1925" on="1"/>
- <pt x="608" y="1831" on="0"/>
- <pt x="662" y="1791" on="1"/>
- <pt x="714" y="1752" on="0"/>
- <pt x="797" y="1752" on="1"/>
- <pt x="890" y="1752" on="0"/>
- <pt x="945" y="1801" on="1"/>
- <pt x="988" y="1841" on="0"/>
- <pt x="1007" y="1925" on="1"/>
- <pt x="1130" y="1925" on="1"/>
- <pt x="1114" y="1791" on="0"/>
- <pt x="1041" y="1710" on="1"/>
- <pt x="947" y="1604" on="0"/>
- <pt x="797" y="1604" on="1"/>
- <pt x="640" y="1604" on="0"/>
- <pt x="545" y="1719" on="1"/>
- <pt x="480" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 37 7 46 24 35 8 16 35 0 48 196 8 2 0 0 1 42 41 33 32 4 13 46
- 0 0 14 0 0 28 36 4 20 36 12 48 196 42 41 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ocircumflex" xMin="92" yMin="-37" xMax="1500" yMax="1925">
- <contour>
- <pt x="796" y="1517" on="1"/>
- <pt x="1115" y="1517" on="0"/>
- <pt x="1308" y="1306" on="1"/>
- <pt x="1500" y="1094" on="0"/>
- <pt x="1500" y="742" on="1"/>
- <pt x="1500" y="383" on="0"/>
- <pt x="1308" y="173" on="1"/>
- <pt x="1115" y="-37" on="0"/>
- <pt x="786" y="-37" on="1"/>
- <pt x="504" y="-37" on="0"/>
- <pt x="321" y="136" on="1"/>
- <pt x="92" y="353" on="0"/>
- <pt x="92" y="740" on="1"/>
- <pt x="92" y="1095" on="0"/>
- <pt x="284" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="796" y="1360" on="1"/>
- <pt x="569" y="1360" on="0"/>
- <pt x="443" y="1197" on="1"/>
- <pt x="317" y="1034" on="0"/>
- <pt x="317" y="741" on="1"/>
- <pt x="317" y="450" on="0"/>
- <pt x="443" y="285" on="1"/>
- <pt x="568" y="120" on="0"/>
- <pt x="791" y="120" on="1"/>
- <pt x="998" y="120" on="0"/>
- <pt x="1121" y="252" on="1"/>
- <pt x="1275" y="415" on="0"/>
- <pt x="1275" y="742" on="1"/>
- <pt x="1275" y="1034" on="0"/>
- <pt x="1148" y="1197" on="1"/>
- <pt x="1021" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="446" y="1604" on="1"/>
- <pt x="687" y="1925" on="1"/>
- <pt x="905" y="1925" on="1"/>
- <pt x="1146" y="1604" on="1"/>
- <pt x="998" y="1604" on="1"/>
- <pt x="797" y="1806" on="1"/>
- <pt x="795" y="1806" on="1"/>
- <pt x="594" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 38 37 2 33 32 3 34 33 1 39 36
- 35 32 3 2 0 14 0 0 28 26 4 20 26 12 48 196 39 38 37 36 35 34 33 32 12
- 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Odieresis" xMin="92" yMin="-37" xMax="1500" yMax="1777">
- <contour>
- <pt x="796" y="1517" on="1"/>
- <pt x="1115" y="1517" on="0"/>
- <pt x="1308" y="1306" on="1"/>
- <pt x="1500" y="1094" on="0"/>
- <pt x="1500" y="742" on="1"/>
- <pt x="1500" y="383" on="0"/>
- <pt x="1308" y="173" on="1"/>
- <pt x="1115" y="-37" on="0"/>
- <pt x="786" y="-37" on="1"/>
- <pt x="504" y="-37" on="0"/>
- <pt x="321" y="136" on="1"/>
- <pt x="92" y="353" on="0"/>
- <pt x="92" y="740" on="1"/>
- <pt x="92" y="1095" on="0"/>
- <pt x="284" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="796" y="1360" on="1"/>
- <pt x="569" y="1360" on="0"/>
- <pt x="443" y="1197" on="1"/>
- <pt x="317" y="1034" on="0"/>
- <pt x="317" y="741" on="1"/>
- <pt x="317" y="450" on="0"/>
- <pt x="443" y="285" on="1"/>
- <pt x="568" y="120" on="0"/>
- <pt x="791" y="120" on="1"/>
- <pt x="998" y="120" on="0"/>
- <pt x="1121" y="252" on="1"/>
- <pt x="1275" y="415" on="0"/>
- <pt x="1275" y="742" on="1"/>
- <pt x="1275" y="1034" on="0"/>
- <pt x="1148" y="1197" on="1"/>
- <pt x="1021" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="512" y="1604" on="1"/>
- <pt x="512" y="1777" on="1"/>
- <pt x="685" y="1777" on="1"/>
- <pt x="685" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="907" y="1604" on="1"/>
- <pt x="907" y="1777" on="1"/>
- <pt x="1080" y="1777" on="1"/>
- <pt x="1080" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 0 0 39 36 35 32 13 3 33 1 4
- 48 196 38 37 34 33 3 0 14 0 0 28 26 4 20 26 12 48 196 4 38 12 32 0 0
- 37 36 13 1 38 35 34 13 1 32 2 4 48 196 39 38 1 33 32 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ograve" xMin="92" yMin="-37" xMax="1500" yMax="1925">
- <contour>
- <pt x="796" y="1517" on="1"/>
- <pt x="1115" y="1517" on="0"/>
- <pt x="1308" y="1306" on="1"/>
- <pt x="1500" y="1094" on="0"/>
- <pt x="1500" y="742" on="1"/>
- <pt x="1500" y="383" on="0"/>
- <pt x="1308" y="173" on="1"/>
- <pt x="1115" y="-37" on="0"/>
- <pt x="786" y="-37" on="1"/>
- <pt x="504" y="-37" on="0"/>
- <pt x="321" y="136" on="1"/>
- <pt x="92" y="353" on="0"/>
- <pt x="92" y="740" on="1"/>
- <pt x="92" y="1095" on="0"/>
- <pt x="284" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="796" y="1360" on="1"/>
- <pt x="569" y="1360" on="0"/>
- <pt x="443" y="1197" on="1"/>
- <pt x="317" y="1034" on="0"/>
- <pt x="317" y="741" on="1"/>
- <pt x="317" y="450" on="0"/>
- <pt x="443" y="285" on="1"/>
- <pt x="568" y="120" on="0"/>
- <pt x="791" y="120" on="1"/>
- <pt x="998" y="120" on="0"/>
- <pt x="1121" y="252" on="1"/>
- <pt x="1275" y="415" on="0"/>
- <pt x="1275" y="742" on="1"/>
- <pt x="1275" y="1034" on="0"/>
- <pt x="1148" y="1197" on="1"/>
- <pt x="1021" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="944" y="1604" on="1"/>
- <pt x="796" y="1604" on="1"/>
- <pt x="475" y="1925" on="1"/>
- <pt x="703" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 39 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 35 34 1 33 32 1 2 0 14 0 0
- 28 26 4 20 26 12 48 196 35 34 33 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ohungarumlaut" xMin="93" yMin="-37" xMax="1501" yMax="1925">
- <contour>
- <pt x="797" y="1517" on="1"/>
- <pt x="1116" y="1517" on="0"/>
- <pt x="1309" y="1306" on="1"/>
- <pt x="1501" y="1094" on="0"/>
- <pt x="1501" y="742" on="1"/>
- <pt x="1501" y="383" on="0"/>
- <pt x="1309" y="173" on="1"/>
- <pt x="1116" y="-37" on="0"/>
- <pt x="787" y="-37" on="1"/>
- <pt x="505" y="-37" on="0"/>
- <pt x="322" y="136" on="1"/>
- <pt x="93" y="353" on="0"/>
- <pt x="93" y="740" on="1"/>
- <pt x="93" y="1095" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="477" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="797" y="1360" on="1"/>
- <pt x="570" y="1360" on="0"/>
- <pt x="444" y="1197" on="1"/>
- <pt x="318" y="1034" on="0"/>
- <pt x="318" y="741" on="1"/>
- <pt x="318" y="450" on="0"/>
- <pt x="444" y="285" on="1"/>
- <pt x="569" y="120" on="0"/>
- <pt x="792" y="120" on="1"/>
- <pt x="999" y="120" on="0"/>
- <pt x="1122" y="252" on="1"/>
- <pt x="1276" y="415" on="0"/>
- <pt x="1276" y="742" on="1"/>
- <pt x="1276" y="1034" on="0"/>
- <pt x="1149" y="1197" on="1"/>
- <pt x="1022" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="566" y="1604" on="1"/>
- <pt x="807" y="1925" on="1"/>
- <pt x="998" y="1925" on="1"/>
- <pt x="677" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="918" y="1604" on="1"/>
- <pt x="1158" y="1925" on="1"/>
- <pt x="1349" y="1925" on="1"/>
- <pt x="1029" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 1 39 36 35 32 4 33 0 3 0 38
- 37 34 33 3 0 14 0 0 28 26 4 20 26 12 48 196 39 38 37 36 35 34 33 32 12
- 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Omacron" xMin="93" yMin="-37" xMax="1501" yMax="1752">
- <contour>
- <pt x="797" y="1517" on="1"/>
- <pt x="1116" y="1517" on="0"/>
- <pt x="1309" y="1306" on="1"/>
- <pt x="1501" y="1094" on="0"/>
- <pt x="1501" y="742" on="1"/>
- <pt x="1501" y="383" on="0"/>
- <pt x="1309" y="173" on="1"/>
- <pt x="1116" y="-37" on="0"/>
- <pt x="787" y="-37" on="1"/>
- <pt x="505" y="-37" on="0"/>
- <pt x="322" y="136" on="1"/>
- <pt x="93" y="353" on="0"/>
- <pt x="93" y="740" on="1"/>
- <pt x="93" y="1095" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="477" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="797" y="1360" on="1"/>
- <pt x="570" y="1360" on="0"/>
- <pt x="444" y="1197" on="1"/>
- <pt x="318" y="1034" on="0"/>
- <pt x="318" y="741" on="1"/>
- <pt x="318" y="450" on="0"/>
- <pt x="444" y="285" on="1"/>
- <pt x="569" y="120" on="0"/>
- <pt x="792" y="120" on="1"/>
- <pt x="999" y="120" on="0"/>
- <pt x="1122" y="252" on="1"/>
- <pt x="1276" y="415" on="0"/>
- <pt x="1276" y="742" on="1"/>
- <pt x="1276" y="1034" on="0"/>
- <pt x="1149" y="1197" on="1"/>
- <pt x="1022" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="476" y="1604" on="1"/>
- <pt x="476" y="1752" on="1"/>
- <pt x="1118" y="1752" on="1"/>
- <pt x="1118" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 24 29 8 16 29 0 48 196 8 2 0 0 0 0 35 32 7 1 33 1 4 48 196
- 34 33 1 0 14 0 0 28 26 4 20 26 12 48 196 4 34 12 32 35 34 1 33 32 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Oslash" xMin="93" yMin="-37" xMax="1501" yMax="1517">
- <contour>
- <pt x="104" y="-37" on="1"/>
- <pt x="278" y="184" on="1"/>
- <pt x="196" y="286" on="0"/>
- <pt x="154" y="390" on="1"/>
- <pt x="93" y="545" on="0"/>
- <pt x="93" y="742" on="1"/>
- <pt x="93" y="1094" on="0"/>
- <pt x="285" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- <pt x="795" y="1517" on="1"/>
- <pt x="1038" y="1517" on="0"/>
- <pt x="1223" y="1384" on="1"/>
- <pt x="1329" y="1517" on="1"/>
- <pt x="1501" y="1517" on="1"/>
- <pt x="1322" y="1290" on="1"/>
- <pt x="1401" y="1188" on="0"/>
- <pt x="1442" y="1085" on="1"/>
- <pt x="1501" y="932" on="0"/>
- <pt x="1501" y="738" on="1"/>
- <pt x="1501" y="385" on="0"/>
- <pt x="1309" y="174" on="1"/>
- <pt x="1118" y="-37" on="0"/>
- <pt x="798" y="-37" on="1"/>
- <pt x="563" y="-37" on="0"/>
- <pt x="378" y="91" on="1"/>
- <pt x="276" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="491" y="235" on="1"/>
- <pt x="621" y="120" on="0"/>
- <pt x="798" y="120" on="1"/>
- <pt x="1023" y="120" on="0"/>
- <pt x="1149" y="283" on="1"/>
- <pt x="1276" y="446" on="0"/>
- <pt x="1276" y="737" on="1"/>
- <pt x="1276" y="969" on="0"/>
- <pt x="1194" y="1127" on="1"/>
- </contour>
- <contour>
- <pt x="1110" y="1240" on="1"/>
- <pt x="976" y="1360" on="0"/>
- <pt x="796" y="1360" on="1"/>
- <pt x="571" y="1360" on="0"/>
- <pt x="445" y="1197" on="1"/>
- <pt x="318" y="1034" on="0"/>
- <pt x="318" y="743" on="1"/>
- <pt x="318" y="507" on="0"/>
- <pt x="405" y="345" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 37 29 9 28 29 22 48 196 22 2 9 0 1 1 35 34 14 11 4 0 1 3 0
- 0 1 1 43 26 24 1 4 1 2 3 0 0 13 12 1 25 0 1 2 0 14 0 0 41
- 26 5 32 26 18 48 196 43 35 34 26 25 24 18 14 13 12 11 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Otilde" xMin="92" yMin="-37" xMax="1500" yMax="1838">
- <contour>
- <pt x="796" y="1517" on="1"/>
- <pt x="1115" y="1517" on="0"/>
- <pt x="1308" y="1306" on="1"/>
- <pt x="1500" y="1094" on="0"/>
- <pt x="1500" y="742" on="1"/>
- <pt x="1500" y="383" on="0"/>
- <pt x="1308" y="173" on="1"/>
- <pt x="1115" y="-37" on="0"/>
- <pt x="786" y="-37" on="1"/>
- <pt x="504" y="-37" on="0"/>
- <pt x="321" y="136" on="1"/>
- <pt x="92" y="353" on="0"/>
- <pt x="92" y="740" on="1"/>
- <pt x="92" y="1095" on="0"/>
- <pt x="284" y="1306" on="1"/>
- <pt x="476" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="796" y="1360" on="1"/>
- <pt x="569" y="1360" on="0"/>
- <pt x="443" y="1197" on="1"/>
- <pt x="317" y="1034" on="0"/>
- <pt x="317" y="741" on="1"/>
- <pt x="317" y="450" on="0"/>
- <pt x="443" y="285" on="1"/>
- <pt x="568" y="120" on="0"/>
- <pt x="791" y="120" on="1"/>
- <pt x="998" y="120" on="0"/>
- <pt x="1121" y="252" on="1"/>
- <pt x="1275" y="415" on="0"/>
- <pt x="1275" y="742" on="1"/>
- <pt x="1275" y="1034" on="0"/>
- <pt x="1148" y="1197" on="1"/>
- <pt x="1021" y="1360" on="0"/>
- </contour>
- <contour>
- <pt x="463" y="1604" on="1"/>
- <pt x="470" y="1697" on="0"/>
- <pt x="495" y="1748" on="1"/>
- <pt x="541" y="1838" on="0"/>
- <pt x="650" y="1838" on="1"/>
- <pt x="722" y="1838" on="0"/>
- <pt x="783" y="1800" on="1"/>
- <pt x="843" y="1763" on="1"/>
- <pt x="900" y="1728" on="0"/>
- <pt x="930" y="1728" on="1"/>
- <pt x="995" y="1728" on="0"/>
- <pt x="1006" y="1838" on="1"/>
- <pt x="1129" y="1838" on="1"/>
- <pt x="1122" y="1744" on="0"/>
- <pt x="1097" y="1694" on="1"/>
- <pt x="1052" y="1604" on="0"/>
- <pt x="944" y="1604" on="1"/>
- <pt x="872" y="1604" on="0"/>
- <pt x="809" y="1643" on="1"/>
- <pt x="749" y="1680" on="1"/>
- <pt x="694" y="1714" on="0"/>
- <pt x="662" y="1714" on="1"/>
- <pt x="597" y="1714" on="0"/>
- <pt x="586" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 53 6 36 41 6 48 24 29 8 16 29 0 48 196 8 2 0 0 1 55 44 43 32
- 4 13 48 36 0 0 14 0 0 28 26 4 20 26 12 48 196 55 44 43 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="P" xMin="167" yMin="0" xMax="1318" yMax="1480">
- <contour>
- <pt x="167" y="0" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="747" y="1480" on="1"/>
- <pt x="976" y="1480" on="0"/>
- <pt x="1075" y="1454" on="1"/>
- <pt x="1176" y="1427" on="0"/>
- <pt x="1239" y="1351" on="1"/>
- <pt x="1318" y="1255" on="0"/>
- <pt x="1318" y="1089" on="1"/>
- <pt x="1318" y="588" on="0"/>
- <pt x="685" y="588" on="1"/>
- <pt x="377" y="588" on="1"/>
- <pt x="377" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="377" y="747" on="1"/>
- <pt x="676" y="747" on="1"/>
- <pt x="1096" y="747" on="0"/>
- <pt x="1096" y="1076" on="1"/>
- <pt x="1096" y="1236" on="0"/>
- <pt x="987" y="1283" on="1"/>
- <pt x="894" y="1323" on="0"/>
- <pt x="681" y="1323" on="1"/>
- <pt x="377" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 21 20 15 1 1 11 10 15 1 13 2 4 48 196 14 13 1 12 0 1 2 0 2
- 1 0 14 0 0 16 26 8 48 196 20 14 10 2 4 13 8 11 0 0 21 13 12 11 33
- 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Q" xMin="93" yMin="-296" xMax="1639" yMax="1517">
- <contour>
- <pt x="1639" y="-129" on="1"/>
- <pt x="1506" y="-296" on="1"/>
- <pt x="1156" y="-181" on="0"/>
- <pt x="922" y="-27" on="1"/>
- <pt x="819" y="-38" on="0"/>
- <pt x="765" y="-38" on="1"/>
- <pt x="471" y="-38" on="0"/>
- <pt x="282" y="180" on="1"/>
- <pt x="93" y="397" on="0"/>
- <pt x="93" y="741" on="1"/>
- <pt x="93" y="1093" on="0"/>
- <pt x="284" y="1305" on="1"/>
- <pt x="475" y="1517" on="0"/>
- <pt x="794" y="1517" on="1"/>
- <pt x="1116" y="1517" on="0"/>
- <pt x="1309" y="1305" on="1"/>
- <pt x="1502" y="1094" on="0"/>
- <pt x="1502" y="738" on="1"/>
- <pt x="1502" y="427" on="0"/>
- <pt x="1356" y="231" on="1"/>
- <pt x="1300" y="155" on="0"/>
- <pt x="1227" y="100" on="1"/>
- <pt x="1189" y="72" on="0"/>
- <pt x="1114" y="30" on="1"/>
- <pt x="1360" y="-80" on="0"/>
- </contour>
- <contour>
- <pt x="793" y="1360" on="1"/>
- <pt x="570" y="1360" on="0"/>
- <pt x="444" y="1195" on="1"/>
- <pt x="318" y="1031" on="0"/>
- <pt x="318" y="740" on="1"/>
- <pt x="318" y="450" on="0"/>
- <pt x="444" y="285" on="1"/>
- <pt x="570" y="120" on="0"/>
- <pt x="793" y="120" on="1"/>
- <pt x="1018" y="120" on="0"/>
- <pt x="1147" y="282" on="1"/>
- <pt x="1276" y="444" on="0"/>
- <pt x="1276" y="734" on="1"/>
- <pt x="1276" y="1003" on="0"/>
- <pt x="1173" y="1163" on="1"/>
- <pt x="1046" y="1360" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 33 29 5 25 29 13 48 196 13 0 5 2 1 1 23 0 2 2 0 0 1 3 1
- 0 3 13 2 0 14 0 0 37 26 17 29 26 9 48 196 23 17 9 3 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="R" xMin="165" yMin="0" xMax="1434" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="783" y="1480" on="1"/>
- <pt x="1239" y="1480" on="0"/>
- <pt x="1239" y="1113" on="1"/>
- <pt x="1239" y="933" on="0"/>
- <pt x="1128" y="817" on="1"/>
- <pt x="1063" y="748" on="0"/>
- <pt x="940" y="693" on="1"/>
- <pt x="1434" y="0" on="1"/>
- <pt x="1176" y="0" on="1"/>
- <pt x="755" y="626" on="1"/>
- <pt x="375" y="626" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="783" on="1"/>
- <pt x="610" y="783" on="1"/>
- <pt x="824" y="783" on="0"/>
- <pt x="923" y="857" on="1"/>
- <pt x="1023" y="932" on="0"/>
- <pt x="1023" y="1089" on="1"/>
- <pt x="1023" y="1216" on="0"/>
- <pt x="942" y="1269" on="1"/>
- <pt x="862" y="1323" on="0"/>
- <pt x="675" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 8 14 11 2 0 0 24 23 15 1 1 12 11 15 1 14 2 4 48 196 15 14 1 13 10
- 9 0 3 2 0 2 1 0 14 0 0 19 9 4 48 196 23 15 11 10 9 8 2 7 13
- 4 12 0 0 24 14 13 12 33 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Racute" xMin="165" yMin="0" xMax="1434" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="783" y="1480" on="1"/>
- <pt x="1239" y="1480" on="0"/>
- <pt x="1239" y="1113" on="1"/>
- <pt x="1239" y="933" on="0"/>
- <pt x="1128" y="817" on="1"/>
- <pt x="1063" y="748" on="0"/>
- <pt x="940" y="693" on="1"/>
- <pt x="1434" y="0" on="1"/>
- <pt x="1176" y="0" on="1"/>
- <pt x="755" y="626" on="1"/>
- <pt x="375" y="626" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="783" on="1"/>
- <pt x="610" y="783" on="1"/>
- <pt x="824" y="783" on="0"/>
- <pt x="923" y="857" on="1"/>
- <pt x="1023" y="932" on="0"/>
- <pt x="1023" y="1089" on="1"/>
- <pt x="1023" y="1216" on="0"/>
- <pt x="942" y="1269" on="1"/>
- <pt x="862" y="1323" on="0"/>
- <pt x="675" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <contour>
- <pt x="523" y="1604" on="1"/>
- <pt x="764" y="1925" on="1"/>
- <pt x="992" y="1925" on="1"/>
- <pt x="671" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 8 14 11 2 0 0 24 23 15 1 1 12 11 15 1 14 2 4 48 196 27 26 1 28 25
- 1 15 14 1 13 10 9 0 3 4 0 2 1 0 14 0 0 19 9 4 48 196 28 27 26
- 25 23 15 11 10 9 8 2 11 13 4 12 0 0 24 14 13 12 33 3 0 1 4 48 196
- 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcaron" xMin="165" yMin="0" xMax="1434" yMax="1925">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="783" y="1480" on="1"/>
- <pt x="1239" y="1480" on="0"/>
- <pt x="1239" y="1113" on="1"/>
- <pt x="1239" y="933" on="0"/>
- <pt x="1128" y="817" on="1"/>
- <pt x="1063" y="748" on="0"/>
- <pt x="940" y="693" on="1"/>
- <pt x="1434" y="0" on="1"/>
- <pt x="1176" y="0" on="1"/>
- <pt x="755" y="626" on="1"/>
- <pt x="375" y="626" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="783" on="1"/>
- <pt x="610" y="783" on="1"/>
- <pt x="824" y="783" on="0"/>
- <pt x="923" y="857" on="1"/>
- <pt x="1023" y="932" on="0"/>
- <pt x="1023" y="1089" on="1"/>
- <pt x="1023" y="1216" on="0"/>
- <pt x="942" y="1269" on="1"/>
- <pt x="862" y="1323" on="0"/>
- <pt x="675" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <contour>
- <pt x="982" y="1925" on="1"/>
- <pt x="741" y="1604" on="1"/>
- <pt x="523" y="1604" on="1"/>
- <pt x="282" y="1925" on="1"/>
- <pt x="430" y="1925" on="1"/>
- <pt x="631" y="1723" on="1"/>
- <pt x="633" y="1723" on="1"/>
- <pt x="834" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 94 values pushed */
- 31 30 2 25 26 3 8 14 11 2 0 0 24 23 15 1 1 12 11 15 1 14 2 4 48
- 196 32 29 28 25 3 27 26 1 15 14 1 13 10 9 0 3 4 0 2 1 0 14 0 0
- 19 9 4 48 196 28 12 0 2 32 31 30 29 27 26 25 23 15 11 10 9 8 2 14 13
- 4 12 0 0 24 14 13 12 33 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Rcommaaccent" xMin="165" yMin="-432" xMax="1434" yMax="1480">
- <contour>
- <pt x="165" y="0" on="1"/>
- <pt x="165" y="1480" on="1"/>
- <pt x="783" y="1480" on="1"/>
- <pt x="1239" y="1480" on="0"/>
- <pt x="1239" y="1113" on="1"/>
- <pt x="1239" y="933" on="0"/>
- <pt x="1128" y="817" on="1"/>
- <pt x="1063" y="748" on="0"/>
- <pt x="940" y="693" on="1"/>
- <pt x="1434" y="0" on="1"/>
- <pt x="1176" y="0" on="1"/>
- <pt x="755" y="626" on="1"/>
- <pt x="375" y="626" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="783" on="1"/>
- <pt x="610" y="783" on="1"/>
- <pt x="824" y="783" on="0"/>
- <pt x="923" y="857" on="1"/>
- <pt x="1023" y="932" on="0"/>
- <pt x="1023" y="1089" on="1"/>
- <pt x="1023" y="1216" on="0"/>
- <pt x="942" y="1269" on="1"/>
- <pt x="862" y="1323" on="0"/>
- <pt x="675" y="1323" on="1"/>
- <pt x="375" y="1323" on="1"/>
- </contour>
- <contour>
- <pt x="523" y="-421" on="1"/>
- <pt x="523" y="-336" on="1"/>
- <pt x="580" y="-345" on="0"/>
- <pt x="620" y="-345" on="1"/>
- <pt x="730" y="-345" on="0"/>
- <pt x="730" y="-278" on="1"/>
- <pt x="730" y="-204" on="0"/>
- <pt x="572" y="-188" on="1"/>
- <pt x="572" y="-111" on="1"/>
- <pt x="706" y="-114" on="0"/>
- <pt x="772" y="-143" on="1"/>
- <pt x="865" y="-185" on="0"/>
- <pt x="865" y="-280" on="1"/>
- <pt x="865" y="-432" on="0"/>
- <pt x="648" y="-432" on="1"/>
- <pt x="589" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 28 44 39 48 196 8 14 11 2 33 32 26 25 4 13 39 0 0 0 24 23 15 1
- 1 12 11 15 1 14 2 4 48 196 15 14 1 13 10 9 0 3 2 0 2 1 0 14 0
- 0 30 42 37 19 9 4 48 196 33 32 26 25 23 15 11 10 9 8 2 11 13 37 4 12
- 0 0 24 14 13 12 33 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="S" xMin="120" yMin="-37" xMax="1243" yMax="1517">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="869" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="390" on="1"/>
- <pt x="1243" y="193" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="952" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 19 29 14 3 29 34 48 196 34 2 14 0 1 1 17 16 1 0 4 0 2 3 0
- 0 14 0 0 21 43 12 5 9 30 48 196 12 12 16 0 2 30 16 17 16 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Sacute" xMin="120" yMin="-37" xMax="1243" yMax="1925">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="869" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="390" on="1"/>
- <pt x="1243" y="193" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="952" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="523" y="1604" on="1"/>
- <pt x="764" y="1925" on="1"/>
- <pt x="992" y="1925" on="1"/>
- <pt x="671" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 19 29 14 3 29 34 48 196 34 2 14 0 1 1 17 16 1 0 4 0 2 3 0
- 0 38 37 1 39 36 1 2 0 14 0 0 21 43 12 5 9 30 48 196 12 39 38 37 36
- 12 5 16 0 3 30 16 17 16 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scaron" xMin="120" yMin="-37" xMax="1243" yMax="1925">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="869" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="390" on="1"/>
- <pt x="1243" y="193" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="952" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="1021" y="1925" on="1"/>
- <pt x="780" y="1604" on="1"/>
- <pt x="562" y="1604" on="1"/>
- <pt x="321" y="1925" on="1"/>
- <pt x="469" y="1925" on="1"/>
- <pt x="670" y="1723" on="1"/>
- <pt x="672" y="1723" on="1"/>
- <pt x="873" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 19 29 14 3 29 34 48 196 34 2 14 0 42 41 2 36 37 3 1 1 17 16 1
- 0 4 0 2 3 0 0 43 40 39 36 3 38 37 1 2 0 14 0 0 21 43 12 5 9
- 30 48 196 12 43 42 41 40 39 38 37 36 12 9 16 0 3 30 16 17 16 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scedilla" xMin="120" yMin="-432" xMax="1243" yMax="1517">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="870" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="391" on="1"/>
- <pt x="1243" y="192" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="951" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="601" y="0" on="1"/>
- <pt x="698" y="0" on="1"/>
- <pt x="638" y="-109" on="1"/>
- <pt x="710" y="-111" on="0"/>
- <pt x="762" y="-148" on="1"/>
- <pt x="832" y="-197" on="0"/>
- <pt x="832" y="-269" on="1"/>
- <pt x="832" y="-337" on="0"/>
- <pt x="773" y="-384" on="1"/>
- <pt x="714" y="-432" on="0"/>
- <pt x="629" y="-432" on="1"/>
- <pt x="562" y="-432" on="0"/>
- <pt x="485" y="-411" on="1"/>
- <pt x="485" y="-330" on="1"/>
- <pt x="535" y="-345" on="0"/>
- <pt x="589" y="-345" on="1"/>
- <pt x="693" y="-345" on="0"/>
- <pt x="693" y="-271" on="1"/>
- <pt x="693" y="-178" on="0"/>
- <pt x="506" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 51 44 46 19 29 14 3 29 34 48 196 34 2 14 0 1 1 17 16 1 0 4 0
- 2 3 0 0 1 55 49 48 38 37 36 6 13 46 2 0 14 0 0 53 42 42 21 43 12
- 5 9 30 48 196 42 12 55 49 48 42 38 37 36 12 8 16 0 3 30 16 17 16 1 1
- 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scircumflex" xMin="120" yMin="-37" xMax="1243" yMax="1925">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="869" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="390" on="1"/>
- <pt x="1243" y="193" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="952" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="321" y="1604" on="1"/>
- <pt x="562" y="1925" on="1"/>
- <pt x="780" y="1925" on="1"/>
- <pt x="1021" y="1604" on="1"/>
- <pt x="873" y="1604" on="1"/>
- <pt x="672" y="1806" on="1"/>
- <pt x="670" y="1806" on="1"/>
- <pt x="469" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 19 29 14 3 29 34 48 196 34 2 14 0 42 41 2 37 36 3 1 1 17 16 1
- 0 4 0 2 3 0 0 38 37 1 43 40 39 36 3 2 0 14 0 0 21 43 12 5 9
- 30 48 196 12 43 42 41 40 39 38 37 36 12 9 16 0 3 30 16 17 16 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Scommaaccent" xMin="120" yMin="-432" xMax="1243" yMax="1517">
- <contour>
- <pt x="120" y="52" on="1"/>
- <pt x="120" y="260" on="1"/>
- <pt x="416" y="120" on="0"/>
- <pt x="704" y="120" on="1"/>
- <pt x="1027" y="120" on="0"/>
- <pt x="1027" y="359" on="1"/>
- <pt x="1027" y="483" on="0"/>
- <pt x="938" y="541" on="1"/>
- <pt x="870" y="587" on="0"/>
- <pt x="716" y="637" on="1"/>
- <pt x="515" y="703" on="1"/>
- <pt x="128" y="830" on="0"/>
- <pt x="128" y="1122" on="1"/>
- <pt x="128" y="1517" on="0"/>
- <pt x="670" y="1517" on="1"/>
- <pt x="902" y="1517" on="0"/>
- <pt x="1151" y="1454" on="1"/>
- <pt x="1151" y="1261" on="1"/>
- <pt x="891" y="1360" on="0"/>
- <pt x="657" y="1360" on="1"/>
- <pt x="331" y="1360" on="0"/>
- <pt x="331" y="1138" on="1"/>
- <pt x="331" y="1051" on="0"/>
- <pt x="392" y="998" on="1"/>
- <pt x="455" y="943" on="0"/>
- <pt x="614" y="891" on="1"/>
- <pt x="820" y="824" on="1"/>
- <pt x="1053" y="748" on="0"/>
- <pt x="1148" y="650" on="1"/>
- <pt x="1243" y="553" on="0"/>
- <pt x="1243" y="391" on="1"/>
- <pt x="1243" y="192" on="0"/>
- <pt x="1097" y="78" on="1"/>
- <pt x="951" y="-37" on="0"/>
- <pt x="696" y="-37" on="1"/>
- <pt x="444" y="-37" on="0"/>
- </contour>
- <contour>
- <pt x="524" y="-421" on="1"/>
- <pt x="524" y="-336" on="1"/>
- <pt x="581" y="-345" on="0"/>
- <pt x="621" y="-345" on="1"/>
- <pt x="731" y="-345" on="0"/>
- <pt x="731" y="-278" on="1"/>
- <pt x="731" y="-204" on="0"/>
- <pt x="573" y="-188" on="1"/>
- <pt x="573" y="-111" on="1"/>
- <pt x="707" y="-114" on="0"/>
- <pt x="773" y="-143" on="1"/>
- <pt x="866" y="-185" on="0"/>
- <pt x="866" y="-280" on="1"/>
- <pt x="866" y="-432" on="0"/>
- <pt x="649" y="-432" on="1"/>
- <pt x="590" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 39 44 50 19 29 14 3 29 34 48 196 34 2 14 0 1 1 17 16 1 0 4 0
- 2 3 0 0 1 44 43 37 36 4 13 50 2 0 14 0 0 41 42 48 21 43 12 5 9
- 30 48 196 48 12 48 44 43 37 36 12 6 16 0 3 30 16 17 16 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="T" xMin="20" yMin="0" xMax="1230" yMax="1480">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="520" y="1323" on="1"/>
- <pt x="20" y="1323" on="1"/>
- <pt x="20" y="1480" on="1"/>
- <pt x="1230" y="1480" on="1"/>
- <pt x="1230" y="1323" on="1"/>
- <pt x="730" y="1323" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 6 5 2 1 15 3 3 1 4 48 196 7 0 1 0 4 3 0 14 0 0 7 6
- 33 1 0 1 4 48 196 5 4 1 1 0 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tbar" xMin="20" yMin="0" xMax="1230" yMax="1480">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="520" y="715" on="1"/>
- <pt x="217" y="715" on="1"/>
- <pt x="217" y="863" on="1"/>
- <pt x="520" y="863" on="1"/>
- <pt x="520" y="1323" on="1"/>
- <pt x="20" y="1323" on="1"/>
- <pt x="20" y="1480" on="1"/>
- <pt x="1230" y="1480" on="1"/>
- <pt x="1230" y="1323" on="1"/>
- <pt x="730" y="1323" on="1"/>
- <pt x="730" y="863" on="1"/>
- <pt x="1033" y="863" on="1"/>
- <pt x="1033" y="715" on="1"/>
- <pt x="730" y="715" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 10 9 6 5 15 3 7 14 13 2 1 7 3 3 2 4 48 196 12 11 4 3 3
- 15 0 1 2 0 8 7 0 14 0 0 15 14 11 10 33 3 0 1 4 48 196 9 8 1
- 13 12 1 5 4 1 0 3 3 2 1 7 6 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcaron" xMin="20" yMin="0" xMax="1230" yMax="1925">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="520" y="1323" on="1"/>
- <pt x="20" y="1323" on="1"/>
- <pt x="20" y="1480" on="1"/>
- <pt x="1230" y="1480" on="1"/>
- <pt x="1230" y="1323" on="1"/>
- <pt x="730" y="1323" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="975" y="1925" on="1"/>
- <pt x="734" y="1604" on="1"/>
- <pt x="516" y="1604" on="1"/>
- <pt x="275" y="1925" on="1"/>
- <pt x="423" y="1925" on="1"/>
- <pt x="624" y="1723" on="1"/>
- <pt x="626" y="1723" on="1"/>
- <pt x="827" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 14 13 2 8 9 3 0 0 6 5 2 1 15 3 3 1 4 48 196 15 12 11 8 3 10
- 9 1 7 0 1 3 0 4 3 0 14 15 9 8 3 4 6 3 14 13 2 6 0 3 12
- 11 10 3 0 2 3 0 0 7 6 33 1 0 1 4 48 196 5 4 1 1 0 1 3 2
- 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommaaccent" xMin="20" yMin="-432" xMax="1230" yMax="1480">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="520" y="1323" on="1"/>
- <pt x="20" y="1323" on="1"/>
- <pt x="20" y="1480" on="1"/>
- <pt x="1230" y="1480" on="1"/>
- <pt x="1230" y="1323" on="1"/>
- <pt x="730" y="1323" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="586" y="0" on="1"/>
- <pt x="683" y="0" on="1"/>
- <pt x="623" y="-109" on="1"/>
- <pt x="695" y="-111" on="0"/>
- <pt x="747" y="-148" on="1"/>
- <pt x="817" y="-197" on="0"/>
- <pt x="817" y="-268" on="1"/>
- <pt x="817" y="-337" on="0"/>
- <pt x="759" y="-384" on="1"/>
- <pt x="700" y="-432" on="0"/>
- <pt x="614" y="-432" on="1"/>
- <pt x="546" y="-432" on="0"/>
- <pt x="470" y="-411" on="1"/>
- <pt x="470" y="-330" on="1"/>
- <pt x="520" y="-345" on="0"/>
- <pt x="574" y="-345" on="1"/>
- <pt x="678" y="-345" on="0"/>
- <pt x="678" y="-271" on="1"/>
- <pt x="678" y="-178" on="0"/>
- <pt x="491" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 23 44 18 48 196 27 21 20 10 4 13 18 0 0 0 6 5 2 1 15 3 3 1
- 4 48 196 9 8 7 0 3 0 4 3 0 14 0 0 25 42 14 48 196 14 14 4 6 2
- 10 9 8 3 6 0 3 27 21 20 3 0 2 3 0 0 7 6 33 1 0 1 4 48 196
- 5 4 1 1 0 1 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Tcommabelow" xMin="20" yMin="-432" xMax="1230" yMax="1480">
- <contour>
- <pt x="520" y="0" on="1"/>
- <pt x="520" y="1323" on="1"/>
- <pt x="20" y="1323" on="1"/>
- <pt x="20" y="1480" on="1"/>
- <pt x="1230" y="1480" on="1"/>
- <pt x="1230" y="1323" on="1"/>
- <pt x="730" y="1323" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="471" y="-421" on="1"/>
- <pt x="471" y="-336" on="1"/>
- <pt x="528" y="-345" on="0"/>
- <pt x="568" y="-345" on="1"/>
- <pt x="678" y="-345" on="0"/>
- <pt x="678" y="-278" on="1"/>
- <pt x="678" y="-204" on="0"/>
- <pt x="520" y="-188" on="1"/>
- <pt x="520" y="-111" on="1"/>
- <pt x="654" y="-114" on="0"/>
- <pt x="720" y="-143" on="1"/>
- <pt x="813" y="-185" on="0"/>
- <pt x="813" y="-280" on="1"/>
- <pt x="813" y="-432" on="0"/>
- <pt x="596" y="-432" on="1"/>
- <pt x="537" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 11 32 22 48 196 16 15 9 8 4 13 22 0 0 0 6 5 2 1 37 3 3 1
- 4 48 196 7 0 1 0 4 3 0 14 0 0 13 22 20 48 196 20 20 4 6 2 9 8
- 2 0 2 3 0 0 7 6 9 1 0 1 4 48 196 5 4 1 16 15 1 0 3 3 2
- 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Thorn" xMin="167" yMin="0" xMax="1318" yMax="1480">
- <contour>
- <pt x="167" y="0" on="1"/>
- <pt x="167" y="1480" on="1"/>
- <pt x="377" y="1480" on="1"/>
- <pt x="377" y="1201" on="1"/>
- <pt x="747" y="1201" on="1"/>
- <pt x="975" y="1201" on="0"/>
- <pt x="1075" y="1174" on="1"/>
- <pt x="1175" y="1148" on="0"/>
- <pt x="1239" y="1071" on="1"/>
- <pt x="1318" y="976" on="0"/>
- <pt x="1318" y="810" on="1"/>
- <pt x="1318" y="308" on="0"/>
- <pt x="685" y="308" on="1"/>
- <pt x="375" y="308" on="1"/>
- <pt x="375" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="375" y="467" on="1"/>
- <pt x="676" y="467" on="1"/>
- <pt x="1096" y="467" on="0"/>
- <pt x="1096" y="796" on="1"/>
- <pt x="1096" y="956" on="0"/>
- <pt x="987" y="1003" on="1"/>
- <pt x="894" y="1043" on="0"/>
- <pt x="681" y="1043" on="1"/>
- <pt x="375" y="1043" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 23 22 15 1 3 16 15 15 1 12 2 4 48 196 4 3 1 13 12 1 14 0 1
- 3 0 2 1 0 14 0 0 18 26 10 48 196 22 16 12 4 4 13 10 2 0 0 3 2
- 33 1 0 23 15 14 13 33 3 0 2 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="U" xMin="166" yMin="-37" xMax="1312" yMax="1480">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 14 13 1 0 0 3
- 14 0 0 13 12 24 1 14 2 1 33 1 0 2 4 48 196 15 14 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uacute" xMin="166" yMin="-37" xMax="1312" yMax="1925">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="604" y="1604" on="1"/>
- <pt x="845" y="1925" on="1"/>
- <pt x="1073" y="1925" on="1"/>
- <pt x="752" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 28 27 1 29 26 1
- 2 0 14 13 1 0 0 3 14 29 28 27 26 4 12 1 3 0 0 13 12 24 1 14 2
- 1 33 1 0 2 4 48 196 15 14 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ubreve" xMin="166" yMin="-37" xMax="1312" yMax="1925">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="419" y="1925" on="1"/>
- <pt x="542" y="1925" on="1"/>
- <pt x="563" y="1831" on="0"/>
- <pt x="617" y="1791" on="1"/>
- <pt x="669" y="1752" on="0"/>
- <pt x="752" y="1752" on="1"/>
- <pt x="846" y="1752" on="0"/>
- <pt x="900" y="1801" on="1"/>
- <pt x="943" y="1841" on="0"/>
- <pt x="962" y="1925" on="1"/>
- <pt x="1085" y="1925" on="1"/>
- <pt x="1069" y="1791" on="0"/>
- <pt x="996" y="1710" on="1"/>
- <pt x="902" y="1604" on="0"/>
- <pt x="752" y="1604" on="1"/>
- <pt x="595" y="1604" on="0"/>
- <pt x="500" y="1719" on="1"/>
- <pt x="435" y="1797" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 0 0 31 7 40 8 35 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 36 35 27
- 26 4 13 40 0 14 13 1 0 0 3 14 36 35 27 26 4 12 1 3 0 0 13 12 27
- 1 14 2 1 9 1 0 2 4 48 196 15 14 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ucircumflex" xMin="166" yMin="-37" xMax="1312" yMax="1925">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="402" y="1604" on="1"/>
- <pt x="643" y="1925" on="1"/>
- <pt x="861" y="1925" on="1"/>
- <pt x="1102" y="1604" on="1"/>
- <pt x="954" y="1604" on="1"/>
- <pt x="753" y="1806" on="1"/>
- <pt x="751" y="1806" on="1"/>
- <pt x="550" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 78 values pushed */
- 0 0 8 29 21 48 196 21 2 32 31 2 27 26 3 1 25 15 12 2 4 0 2 3 0
- 28 27 1 33 30 29 26 3 2 0 14 13 1 0 0 3 14 33 32 31 30 29 28 27 26
- 8 12 1 3 0 0 13 12 24 1 14 2 1 33 1 0 2 4 48 196 15 14 1 25 0
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Udieresis" xMin="166" yMin="-37" xMax="1312" yMax="1777">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="468" y="1604" on="1"/>
- <pt x="468" y="1777" on="1"/>
- <pt x="641" y="1777" on="1"/>
- <pt x="641" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="863" y="1604" on="1"/>
- <pt x="863" y="1777" on="1"/>
- <pt x="1036" y="1777" on="1"/>
- <pt x="1036" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 0 0 33 30 29 26
- 13 3 27 1 4 48 196 32 31 28 27 3 0 14 13 1 0 0 3 14 0 0 31 30 13
- 1 32 29 28 13 1 26 13 12 24 1 14 2 1 33 1 0 4 4 48 196 33 32 1 27
- 26 1 15 14 1 25 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ugrave" xMin="166" yMin="-37" xMax="1312" yMax="1925">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="900" y="1604" on="1"/>
- <pt x="752" y="1604" on="1"/>
- <pt x="431" y="1925" on="1"/>
- <pt x="659" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 29 28 1 27 26 1
- 2 0 14 13 1 0 0 3 14 29 28 27 26 4 12 1 3 0 0 13 12 24 1 14 2
- 1 33 1 0 2 4 48 196 15 14 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uhungarumlaut" xMin="166" yMin="-37" xMax="1312" yMax="1925">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="499" y="1604" on="1"/>
- <pt x="740" y="1925" on="1"/>
- <pt x="931" y="1925" on="1"/>
- <pt x="610" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="851" y="1604" on="1"/>
- <pt x="1091" y="1925" on="1"/>
- <pt x="1282" y="1925" on="1"/>
- <pt x="962" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 8 29 21 48 196 21 2 33 30 29 26 4 27 0 3 1 25 15 12 2 4 0 2
- 3 0 32 31 28 27 3 0 14 13 1 0 0 3 14 32 14 12 2 33 31 30 29 28 27
- 26 7 12 1 3 0 0 13 12 24 1 14 2 1 33 1 0 2 4 48 196 15 14 1 25
- 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Umacron" xMin="166" yMin="-37" xMax="1312" yMax="1752">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="431" y="1604" on="1"/>
- <pt x="431" y="1752" on="1"/>
- <pt x="1073" y="1752" on="1"/>
- <pt x="1073" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 0 0 29 26 7 1
- 27 1 4 48 196 28 27 1 0 14 13 1 0 0 3 14 0 0 13 12 24 1 14 2 1
- 33 1 0 2 4 48 196 29 28 1 27 26 1 15 14 1 25 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Unterkomma" xMin="170" yMin="-432" xMax="512" yMax="-111">
- <contour>
- <pt x="170" y="-421" on="1"/>
- <pt x="170" y="-336" on="1"/>
- <pt x="227" y="-345" on="0"/>
- <pt x="267" y="-345" on="1"/>
- <pt x="377" y="-345" on="0"/>
- <pt x="377" y="-278" on="1"/>
- <pt x="377" y="-204" on="0"/>
- <pt x="219" y="-188" on="1"/>
- <pt x="219" y="-111" on="1"/>
- <pt x="353" y="-114" on="0"/>
- <pt x="419" y="-143" on="1"/>
- <pt x="512" y="-185" on="0"/>
- <pt x="512" y="-280" on="1"/>
- <pt x="512" y="-432" on="0"/>
- <pt x="295" y="-432" on="1"/>
- <pt x="236" y="-432" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 3 44 14 48 196 14 8 7 1 0 14 0 0 5 42 12 48 196 12 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uogonek" xMin="166" yMin="-370" xMax="1312" yMax="1480">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="800" y="0" on="1"/>
- <pt x="907" y="0" on="1"/>
- <pt x="779" y="-81" on="0"/>
- <pt x="779" y="-179" on="1"/>
- <pt x="779" y="-275" on="0"/>
- <pt x="894" y="-275" on="1"/>
- <pt x="947" y="-275" on="0"/>
- <pt x="984" y="-260" on="1"/>
- <pt x="984" y="-341" on="1"/>
- <pt x="922" y="-370" on="0"/>
- <pt x="844" y="-370" on="1"/>
- <pt x="642" y="-370" on="0"/>
- <pt x="642" y="-212" on="1"/>
- <pt x="642" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 31 21 36 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0 1 34 33
- 27 26 4 13 36 2 0 14 13 1 0 0 3 14 0 0 29 42 38 48 196 38 38 34 33
- 27 26 5 12 1 3 0 0 13 12 24 1 14 2 1 33 1 0 2 4 48 196 15 14 1
- 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Uring" xMin="166" yMin="-37" xMax="1312" yMax="2033">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="752" y="2033" on="1"/>
- <pt x="846" y="2033" on="0"/>
- <pt x="912" y="1967" on="1"/>
- <pt x="979" y="1901" on="0"/>
- <pt x="979" y="1807" on="1"/>
- <pt x="979" y="1711" on="0"/>
- <pt x="912" y="1645" on="1"/>
- <pt x="846" y="1579" on="0"/>
- <pt x="750" y="1579" on="1"/>
- <pt x="667" y="1579" on="0"/>
- <pt x="605" y="1633" on="1"/>
- <pt x="525" y="1702" on="0"/>
- <pt x="525" y="1806" on="1"/>
- <pt x="525" y="1900" on="0"/>
- <pt x="591" y="1966" on="1"/>
- <pt x="658" y="2033" on="0"/>
- </contour>
- <contour>
- <pt x="752" y="1946" on="1"/>
- <pt x="693" y="1946" on="0"/>
- <pt x="652" y="1905" on="1"/>
- <pt x="611" y="1864" on="0"/>
- <pt x="611" y="1806" on="1"/>
- <pt x="611" y="1748" on="0"/>
- <pt x="652" y="1707" on="1"/>
- <pt x="694" y="1665" on="0"/>
- <pt x="750" y="1665" on="1"/>
- <pt x="804" y="1665" on="0"/>
- <pt x="843" y="1698" on="1"/>
- <pt x="893" y="1741" on="0"/>
- <pt x="893" y="1807" on="1"/>
- <pt x="893" y="1865" on="0"/>
- <pt x="851" y="1905" on="1"/>
- <pt x="810" y="1946" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 50 44 34 42 44 26 8 29 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0
- 34 26 0 14 13 1 0 0 3 14 0 0 54 32 30 46 32 38 48 196 38 30 38 30 2
- 12 1 3 0 0 13 12 24 1 14 2 1 33 1 0 2 4 48 196 15 14 1 25 0 1
- 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Utilde" xMin="166" yMin="-37" xMax="1312" yMax="1838">
- <contour>
- <pt x="166" y="1480" on="1"/>
- <pt x="376" y="1480" on="1"/>
- <pt x="376" y="546" on="1"/>
- <pt x="376" y="388" on="0"/>
- <pt x="402" y="314" on="1"/>
- <pt x="427" y="241" on="0"/>
- <pt x="499" y="190" on="1"/>
- <pt x="599" y="120" on="0"/>
- <pt x="768" y="120" on="1"/>
- <pt x="967" y="120" on="0"/>
- <pt x="1047" y="214" on="1"/>
- <pt x="1128" y="307" on="0"/>
- <pt x="1128" y="539" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1312" y="1480" on="1"/>
- <pt x="1312" y="542" on="1"/>
- <pt x="1312" y="344" on="0"/>
- <pt x="1273" y="242" on="1"/>
- <pt x="1234" y="139" on="0"/>
- <pt x="1129" y="64" on="1"/>
- <pt x="987" y="-37" on="0"/>
- <pt x="750" y="-37" on="1"/>
- <pt x="448" y="-37" on="0"/>
- <pt x="307" y="103" on="1"/>
- <pt x="166" y="243" on="0"/>
- <pt x="166" y="548" on="1"/>
- </contour>
- <contour>
- <pt x="419" y="1604" on="1"/>
- <pt x="426" y="1697" on="0"/>
- <pt x="451" y="1748" on="1"/>
- <pt x="497" y="1838" on="0"/>
- <pt x="606" y="1838" on="1"/>
- <pt x="678" y="1838" on="0"/>
- <pt x="739" y="1800" on="1"/>
- <pt x="799" y="1763" on="1"/>
- <pt x="856" y="1728" on="0"/>
- <pt x="886" y="1728" on="1"/>
- <pt x="951" y="1728" on="0"/>
- <pt x="962" y="1838" on="1"/>
- <pt x="1085" y="1838" on="1"/>
- <pt x="1078" y="1744" on="0"/>
- <pt x="1053" y="1694" on="1"/>
- <pt x="1008" y="1604" on="0"/>
- <pt x="900" y="1604" on="1"/>
- <pt x="828" y="1604" on="0"/>
- <pt x="765" y="1643" on="1"/>
- <pt x="705" y="1680" on="1"/>
- <pt x="650" y="1714" on="0"/>
- <pt x="618" y="1714" on="1"/>
- <pt x="553" y="1714" on="0"/>
- <pt x="542" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 73 values pushed */
- 0 0 47 6 30 35 6 42 8 35 21 48 196 21 2 1 25 15 12 2 4 0 2 3 0
- 49 38 37 26 4 13 42 30 0 14 13 1 0 0 3 14 49 38 37 26 4 12 1 3 0
- 0 13 12 27 1 14 2 1 9 1 0 2 4 48 196 15 14 1 25 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="V" xMin="36" yMin="0" xMax="1355" yMax="1480">
- <contour>
- <pt x="607" y="0" on="1"/>
- <pt x="36" y="1480" on="1"/>
- <pt x="252" y="1480" on="1"/>
- <pt x="724" y="265" on="1"/>
- <pt x="1176" y="1480" on="1"/>
- <pt x="1355" y="1480" on="1"/>
- <pt x="805" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 3 1 0 2 6 0 1 0 5 4 2 1 0 3 14 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="W" xMin="25" yMin="0" xMax="1908" yMax="1480">
- <contour>
- <pt x="406" y="0" on="1"/>
- <pt x="25" y="1480" on="1"/>
- <pt x="227" y="1480" on="1"/>
- <pt x="530" y="311" on="1"/>
- <pt x="877" y="1480" on="1"/>
- <pt x="1079" y="1480" on="1"/>
- <pt x="1412" y="322" on="1"/>
- <pt x="1737" y="1480" on="1"/>
- <pt x="1908" y="1480" on="1"/>
- <pt x="1492" y="0" on="1"/>
- <pt x="1284" y="0" on="1"/>
- <pt x="955" y="1141" on="1"/>
- <pt x="614" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 35 values pushed */
- 11 6 3 3 1 0 3 12 10 9 0 3 0 8 7 5 4 2 1 0 5 14 12 11 10
- 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Wcircumflex" xMin="25" yMin="0" xMax="1908" yMax="1925">
- <contour>
- <pt x="406" y="0" on="1"/>
- <pt x="25" y="1480" on="1"/>
- <pt x="227" y="1480" on="1"/>
- <pt x="530" y="311" on="1"/>
- <pt x="877" y="1480" on="1"/>
- <pt x="1079" y="1480" on="1"/>
- <pt x="1412" y="322" on="1"/>
- <pt x="1737" y="1480" on="1"/>
- <pt x="1908" y="1480" on="1"/>
- <pt x="1492" y="0" on="1"/>
- <pt x="1284" y="0" on="1"/>
- <pt x="955" y="1141" on="1"/>
- <pt x="614" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="628" y="1604" on="1"/>
- <pt x="869" y="1925" on="1"/>
- <pt x="1087" y="1925" on="1"/>
- <pt x="1328" y="1604" on="1"/>
- <pt x="1180" y="1604" on="1"/>
- <pt x="979" y="1806" on="1"/>
- <pt x="977" y="1806" on="1"/>
- <pt x="776" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 19 18 2 14 13 3 11 6 3 3 1 0 3 15 14 1 20 17 16 13 3 12 10 9 0
- 3 3 0 8 7 5 4 2 1 0 5 14 20 19 18 17 16 15 14 13 12 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="X" xMin="28" yMin="0" xMax="1338" yMax="1480">
- <contour>
- <pt x="28" y="0" on="1"/>
- <pt x="573" y="735" on="1"/>
- <pt x="52" y="1480" on="1"/>
- <pt x="300" y="1480" on="1"/>
- <pt x="701" y="905" on="1"/>
- <pt x="1128" y="1480" on="1"/>
- <pt x="1327" y="1480" on="1"/>
- <pt x="798" y="770" on="1"/>
- <pt x="1338" y="0" on="1"/>
- <pt x="1090" y="0" on="1"/>
- <pt x="670" y="598" on="1"/>
- <pt x="226" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 33 values pushed */
- 10 7 4 1 4 2 0 3 11 9 8 0 3 0 6 5 3 2 0 3 14 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Y" xMin="30" yMin="0" xMax="1337" yMax="1480">
- <contour>
- <pt x="561" y="0" on="1"/>
- <pt x="561" y="617" on="1"/>
- <pt x="30" y="1480" on="1"/>
- <pt x="270" y="1480" on="1"/>
- <pt x="691" y="795" on="1"/>
- <pt x="1142" y="1480" on="1"/>
- <pt x="1337" y="1480" on="1"/>
- <pt x="771" y="622" on="1"/>
- <pt x="771" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 7 4 1 3 2 0 3 8 0 1 0 6 5 3 2 0 3 14 4 7 0 2 6 5 2
- 13 7 3 2 0 0 0 8 7 33 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Yacute" xMin="30" yMin="0" xMax="1337" yMax="1925">
- <contour>
- <pt x="561" y="0" on="1"/>
- <pt x="561" y="617" on="1"/>
- <pt x="30" y="1480" on="1"/>
- <pt x="270" y="1480" on="1"/>
- <pt x="691" y="795" on="1"/>
- <pt x="1142" y="1480" on="1"/>
- <pt x="1337" y="1480" on="1"/>
- <pt x="771" y="622" on="1"/>
- <pt x="771" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="543" y="1604" on="1"/>
- <pt x="784" y="1925" on="1"/>
- <pt x="1012" y="1925" on="1"/>
- <pt x="691" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 7 4 1 3 2 0 3 11 10 1 12 9 1 8 0 1 3 0 6 5 3 2 0 3 14
- 12 4 2 7 0 3 11 10 6 5 4 13 7 9 3 2 3 13 0 0 0 8 7 33 1
- 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ycircumflex" xMin="30" yMin="0" xMax="1337" yMax="1925">
- <contour>
- <pt x="561" y="0" on="1"/>
- <pt x="561" y="617" on="1"/>
- <pt x="30" y="1480" on="1"/>
- <pt x="270" y="1480" on="1"/>
- <pt x="691" y="795" on="1"/>
- <pt x="1142" y="1480" on="1"/>
- <pt x="1337" y="1480" on="1"/>
- <pt x="771" y="622" on="1"/>
- <pt x="771" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="356" y="1604" on="1"/>
- <pt x="597" y="1925" on="1"/>
- <pt x="815" y="1925" on="1"/>
- <pt x="1056" y="1604" on="1"/>
- <pt x="908" y="1604" on="1"/>
- <pt x="707" y="1806" on="1"/>
- <pt x="705" y="1806" on="1"/>
- <pt x="504" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 15 14 2 10 9 3 7 4 1 3 2 0 3 11 10 1 16 13 12 9 3 8 0 1 3
- 0 6 5 3 2 0 3 14 15 14 10 4 4 7 0 3 13 12 11 6 5 5 13 7 16
- 9 3 2 4 13 0 0 0 8 7 33 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Ydieresis" xMin="30" yMin="0" xMax="1337" yMax="1777">
- <contour>
- <pt x="561" y="0" on="1"/>
- <pt x="561" y="617" on="1"/>
- <pt x="30" y="1480" on="1"/>
- <pt x="270" y="1480" on="1"/>
- <pt x="691" y="795" on="1"/>
- <pt x="1142" y="1480" on="1"/>
- <pt x="1337" y="1480" on="1"/>
- <pt x="771" y="622" on="1"/>
- <pt x="771" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="422" y="1604" on="1"/>
- <pt x="422" y="1777" on="1"/>
- <pt x="595" y="1777" on="1"/>
- <pt x="595" y="1604" on="1"/>
- </contour>
- <contour>
- <pt x="817" y="1604" on="1"/>
- <pt x="817" y="1777" on="1"/>
- <pt x="990" y="1777" on="1"/>
- <pt x="990" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 7 4 1 3 2 0 3 0 0 16 13 12 9 13 3 10 1 4 48 196 15 14 11 10 3
- 8 0 1 2 0 6 5 3 2 0 3 14 4 7 11 2 6 5 2 13 15 3 2 9 0
- 0 14 13 13 1 15 12 11 13 1 9 8 7 33 1 0 3 4 48 196 16 15 1 10 9
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Z" xMin="101" yMin="0" xMax="1148" yMax="1480">
- <contour>
- <pt x="101" y="0" on="1"/>
- <pt x="101" y="169" on="1"/>
- <pt x="896" y="1323" on="1"/>
- <pt x="150" y="1323" on="1"/>
- <pt x="150" y="1480" on="1"/>
- <pt x="1148" y="1480" on="1"/>
- <pt x="1148" y="1323" on="1"/>
- <pt x="353" y="169" on="1"/>
- <pt x="1148" y="169" on="1"/>
- <pt x="1148" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 6 3 2 15 2 4 1 4 8 7 1 2 0 1 6 48 196 9 0 1 0 5 4
- 0 14 7 2 2 5 3 3 9 8 6 5 3 4 3 1 1 0 1 3 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zacute" xMin="101" yMin="0" xMax="1148" yMax="1925">
- <contour>
- <pt x="101" y="0" on="1"/>
- <pt x="101" y="169" on="1"/>
- <pt x="896" y="1323" on="1"/>
- <pt x="150" y="1323" on="1"/>
- <pt x="150" y="1480" on="1"/>
- <pt x="1148" y="1480" on="1"/>
- <pt x="1148" y="1323" on="1"/>
- <pt x="353" y="169" on="1"/>
- <pt x="1148" y="169" on="1"/>
- <pt x="1148" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="477" y="1604" on="1"/>
- <pt x="718" y="1925" on="1"/>
- <pt x="946" y="1925" on="1"/>
- <pt x="625" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 6 3 2 15 2 4 1 4 8 7 1 2 0 1 6 48 196 12 11 1 13 10 1
- 9 0 1 3 0 5 4 0 14 13 12 11 10 7 2 6 5 3 3 9 8 6 5 3 4
- 3 1 1 0 1 3 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zcaron" xMin="101" yMin="0" xMax="1148" yMax="1925">
- <contour>
- <pt x="101" y="0" on="1"/>
- <pt x="101" y="169" on="1"/>
- <pt x="896" y="1323" on="1"/>
- <pt x="150" y="1323" on="1"/>
- <pt x="150" y="1480" on="1"/>
- <pt x="1148" y="1480" on="1"/>
- <pt x="1148" y="1323" on="1"/>
- <pt x="353" y="169" on="1"/>
- <pt x="1148" y="169" on="1"/>
- <pt x="1148" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="987" y="1925" on="1"/>
- <pt x="746" y="1604" on="1"/>
- <pt x="528" y="1604" on="1"/>
- <pt x="287" y="1925" on="1"/>
- <pt x="435" y="1925" on="1"/>
- <pt x="636" y="1723" on="1"/>
- <pt x="638" y="1723" on="1"/>
- <pt x="839" y="1925" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 16 15 2 10 11 3 0 0 6 3 2 15 2 4 1 4 8 7 1 2 0 1 6 48 196
- 17 14 13 10 3 12 11 1 9 0 1 3 0 5 4 0 14 17 16 15 14 13 12 11 10
- 7 2 10 5 3 3 9 8 6 5 3 4 3 1 1 0 1 3 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="Zdotaccent" xMin="101" yMin="0" xMax="1148" yMax="1801">
- <contour>
- <pt x="101" y="0" on="1"/>
- <pt x="101" y="169" on="1"/>
- <pt x="896" y="1323" on="1"/>
- <pt x="150" y="1323" on="1"/>
- <pt x="150" y="1480" on="1"/>
- <pt x="1148" y="1480" on="1"/>
- <pt x="1148" y="1323" on="1"/>
- <pt x="353" y="169" on="1"/>
- <pt x="1148" y="169" on="1"/>
- <pt x="1148" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="538" y="1604" on="1"/>
- <pt x="538" y="1801" on="1"/>
- <pt x="735" y="1801" on="1"/>
- <pt x="735" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 13 10 5 1 11 6 3 2 15 2 4 2 4 8 7 1 2 0 1 6 48 196 12
- 11 1 9 0 1 2 0 5 4 0 14 2 5 12 2 7 10 3 2 0 0 13 12 4 1
- 10 1 4 48 196 11 10 1 9 8 6 5 3 4 3 1 1 0 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="a" xMin="95" yMin="-25" xMax="1098" yMax="1110">
- <contour>
- <pt x="774" y="138" on="1"/>
- <pt x="589" y="-25" on="0"/>
- <pt x="414" y="-25" on="1"/>
- <pt x="273" y="-25" on="0"/>
- <pt x="184" y="58" on="1"/>
- <pt x="95" y="142" on="0"/>
- <pt x="95" y="273" on="1"/>
- <pt x="95" y="642" on="0"/>
- <pt x="699" y="642" on="1"/>
- <pt x="745" y="642" on="1"/>
- <pt x="745" y="773" on="1"/>
- <pt x="745" y="962" on="0"/>
- <pt x="536" y="962" on="1"/>
- <pt x="374" y="962" on="0"/>
- <pt x="189" y="866" on="1"/>
- <pt x="189" y="1029" on="1"/>
- <pt x="394" y="1110" on="0"/>
- <pt x="574" y="1110" on="1"/>
- <pt x="766" y="1110" on="0"/>
- <pt x="854" y="1029" on="1"/>
- <pt x="942" y="949" on="0"/>
- <pt x="942" y="773" on="1"/>
- <pt x="942" y="281" on="1"/>
- <pt x="942" y="112" on="0"/>
- <pt x="1046" y="112" on="1"/>
- <pt x="1060" y="112" on="0"/>
- <pt x="1084" y="116" on="1"/>
- <pt x="1098" y="7" on="1"/>
- <pt x="1025" y="-25" on="0"/>
- <pt x="952" y="-25" on="1"/>
- <pt x="884" y="-25" on="0"/>
- <pt x="840" y="13" on="1"/>
- <pt x="797" y="50" on="0"/>
- </contour>
- <contour>
- <pt x="745" y="245" on="1"/>
- <pt x="745" y="526" on="1"/>
- <pt x="680" y="528" on="1"/>
- <pt x="620" y="530" on="0"/>
- <pt x="547" y="519" on="1"/>
- <pt x="299" y="484" on="0"/>
- <pt x="299" y="303" on="1"/>
- <pt x="299" y="136" on="0"/>
- <pt x="480" y="136" on="1"/>
- <pt x="606" y="136" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 82 values pushed */
- 0 0 41 29 2 12 40 17 48 196 29 2 17 1 2 2 24 1 1 34 33 27 26 24 22
- 21 15 14 10 9 8 0 13 1 2 3 0 0 14 0 0 39 43 6 48 196 0 21 9 2
- 8 9 14 2 27 26 2 13 21 6 14 0 0 34 33 10 9 4 3 21 1 4 48 196 22
- 21 1 15 14 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aacute" xMin="95" yMin="-25" xMax="1098" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="323" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="abreve" xMin="105" yMin="-25" xMax="1108" yMax="1604">
- <component glyphName="a" x="10" y="0" flags="0x4"/>
- <component glyphName="breve" x="248" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acircumflex" xMin="95" yMin="-25" xMax="1098" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="238" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="acute" xMin="107" yMin="1283" xMax="576" yMax="1604">
- <contour>
- <pt x="107" y="1283" on="1"/>
- <pt x="348" y="1604" on="1"/>
- <pt x="576" y="1604" on="1"/>
- <pt x="255" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="adieresis" xMin="95" yMin="-25" xMax="1098" yMax="1456">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="219" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ae" xMin="95" yMin="-25" xMax="1701" yMax="1110">
- <contour>
- <pt x="767" y="245" on="1"/>
- <pt x="767" y="526" on="1"/>
- <pt x="692" y="528" on="1"/>
- <pt x="627" y="530" on="0"/>
- <pt x="551" y="519" on="1"/>
- <pt x="292" y="483" on="0"/>
- <pt x="292" y="303" on="1"/>
- <pt x="292" y="136" on="0"/>
- <pt x="491" y="136" on="1"/>
- <pt x="628" y="136" on="0"/>
- </contour>
- <contour>
- <pt x="916" y="983" on="1"/>
- <pt x="1067" y="1110" on="0"/>
- <pt x="1259" y="1110" on="1"/>
- <pt x="1701" y="1110" on="0"/>
- <pt x="1701" y="573" on="1"/>
- <pt x="1701" y="512" on="1"/>
- <pt x="961" y="512" on="1"/>
- <pt x="973" y="395" on="0"/>
- <pt x="999" y="334" on="1"/>
- <pt x="1089" y="125" on="0"/>
- <pt x="1364" y="125" on="1"/>
- <pt x="1515" y="125" on="0"/>
- <pt x="1696" y="191" on="1"/>
- <pt x="1696" y="35" on="1"/>
- <pt x="1491" y="-25" on="0"/>
- <pt x="1318" y="-25" on="1"/>
- <pt x="1127" y="-25" on="0"/>
- <pt x="997" y="62" on="1"/>
- <pt x="925" y="110" on="0"/>
- <pt x="858" y="205" on="1"/>
- <pt x="743" y="82" on="0"/>
- <pt x="661" y="33" on="1"/>
- <pt x="562" y="-25" on="0"/>
- <pt x="427" y="-25" on="1"/>
- <pt x="277" y="-25" on="0"/>
- <pt x="186" y="57" on="1"/>
- <pt x="95" y="140" on="0"/>
- <pt x="95" y="272" on="1"/>
- <pt x="95" y="642" on="0"/>
- <pt x="721" y="642" on="1"/>
- <pt x="767" y="642" on="1"/>
- <pt x="767" y="773" on="1"/>
- <pt x="767" y="878" on="0"/>
- <pt x="718" y="920" on="1"/>
- <pt x="669" y="962" on="0"/>
- <pt x="547" y="962" on="1"/>
- <pt x="376" y="962" on="0"/>
- <pt x="189" y="866" on="1"/>
- <pt x="189" y="1029" on="1"/>
- <pt x="395" y="1110" on="0"/>
- <pt x="581" y="1110" on="1"/>
- <pt x="807" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="971" y="660" on="1"/>
- <pt x="1503" y="660" on="1"/>
- <pt x="1500" y="756" on="0"/>
- <pt x="1483" y="806" on="1"/>
- <pt x="1430" y="962" on="0"/>
- <pt x="1251" y="962" on="1"/>
- <pt x="1126" y="962" on="0"/>
- <pt x="1056" y="889" on="1"/>
- <pt x="989" y="820" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 57 40 12 45 40 50 20 40 25 48 196 50 1 33 2 25 2 12 1 1 48 47 41
- 10 4 1 52 3 0 40 39 14 1 4 52 15 3 8 1 29 23 22 8 0 5 15 2 3
- 0 0 0 16 15 7 1 52 1 4 48 196 53 52 1 0 14 53 52 29 16 10 5 22 0
- 3 6 39 6 2 0 47 3 15 14 2 13 22 37 47 23 22 1 48 47 1 41 40 1 0
- 3 3 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="afii00208" xMin="99" yMin="543" xMax="1950" yMax="642">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="642" on="1"/>
- <pt x="1950" y="642" on="1"/>
- <pt x="1950" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 11 1 1 1 4 48 196 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="agrave" xMin="95" yMin="-25" xMax="1098" yMax="1604">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="152" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="amacron" xMin="105" yMin="-25" xMax="1108" yMax="1431">
- <component glyphName="a" x="10" y="0" flags="0x4"/>
- <component glyphName="macron" x="217" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ampersand" xMin="56" yMin="-37" xMax="1293" yMax="1517">
- <contour>
- <pt x="1025" y="0" on="1"/>
- <pt x="952" y="87" on="1"/>
- <pt x="752" y="-37" on="0"/>
- <pt x="570" y="-37" on="1"/>
- <pt x="352" y="-37" on="0"/>
- <pt x="204" y="99" on="1"/>
- <pt x="56" y="235" on="0"/>
- <pt x="56" y="442" on="1"/>
- <pt x="56" y="647" on="0"/>
- <pt x="185" y="774" on="1"/>
- <pt x="261" y="848" on="0"/>
- <pt x="405" y="904" on="1"/>
- <pt x="317" y="1067" on="0"/>
- <pt x="317" y="1187" on="1"/>
- <pt x="317" y="1337" on="0"/>
- <pt x="409" y="1427" on="1"/>
- <pt x="502" y="1517" on="0"/>
- <pt x="659" y="1517" on="1"/>
- <pt x="808" y="1517" on="0"/>
- <pt x="895" y="1436" on="1"/>
- <pt x="982" y="1355" on="0"/>
- <pt x="982" y="1219" on="1"/>
- <pt x="982" y="1068" on="0"/>
- <pt x="866" y="959" on="1"/>
- <pt x="795" y="893" on="0"/>
- <pt x="661" y="832" on="1"/>
- <pt x="829" y="527" on="0"/>
- <pt x="995" y="328" on="1"/>
- <pt x="1094" y="455" on="0"/>
- <pt x="1094" y="707" on="1"/>
- <pt x="1094" y="787" on="1"/>
- <pt x="1289" y="787" on="1"/>
- <pt x="1289" y="441" on="0"/>
- <pt x="1087" y="221" on="1"/>
- <pt x="1175" y="109" on="0"/>
- <pt x="1293" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="866" y="202" on="1"/>
- <pt x="669" y="427" on="0"/>
- <pt x="475" y="790" on="1"/>
- <pt x="377" y="743" on="0"/>
- <pt x="327" y="684" on="1"/>
- <pt x="254" y="600" on="0"/>
- <pt x="254" y="477" on="1"/>
- <pt x="254" y="324" on="0"/>
- <pt x="356" y="218" on="1"/>
- <pt x="459" y="111" on="0"/>
- <pt x="602" y="111" on="1"/>
- <pt x="714" y="111" on="0"/>
- </contour>
- <contour>
- <pt x="587" y="956" on="1"/>
- <pt x="683" y="998" on="0"/>
- <pt x="729" y="1046" on="1"/>
- <pt x="797" y="1116" on="0"/>
- <pt x="797" y="1215" on="1"/>
- <pt x="797" y="1369" on="0"/>
- <pt x="657" y="1369" on="1"/>
- <pt x="509" y="1369" on="0"/>
- <pt x="509" y="1207" on="1"/>
- <pt x="509" y="1109" on="0"/>
- <pt x="579" y="972" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 54 40 17 46 40 3 48 196 17 0 3 2 1 48 38 25 11 4 0 30 3 0 36
- 33 29 27 1 5 30 0 3 31 30 1 35 0 1 2 0 14 0 0 56 41 13 52 14 21
- 42 41 7 48 196 48 38 36 35 33 31 30 29 27 25 21 13 11 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="anoteleia" xMin="161" yMin="491" xMax="408" yMax="738">
- <contour>
- <pt x="161" y="491" on="1"/>
- <pt x="161" y="738" on="1"/>
- <pt x="408" y="738" on="1"/>
- <pt x="408" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 8 1 1 1 4 48 196 2 1 1 0 14 0 0 3 2 8 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="aogonek" xMin="95" yMin="-370" xMax="1098" yMax="1110">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="537" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="aring" xMin="95" yMin="-25" xMax="1098" yMax="1737">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="ring" x="238" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="asciicircum" xMin="36" yMin="592" xMax="924" yMax="1480">
- <contour>
- <pt x="480" y="1149" on="1"/>
- <pt x="201" y="592" on="1"/>
- <pt x="36" y="592" on="1"/>
- <pt x="480" y="1480" on="1"/>
- <pt x="924" y="592" on="1"/>
- <pt x="758" y="592" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 18 values pushed */
- 3 0 2 13 1 5 4 2 1 3 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asciitilde" xMin="104" yMin="412" xMax="1091" yMax="772">
- <contour>
- <pt x="252" y="444" on="1"/>
- <pt x="104" y="444" on="1"/>
- <pt x="107" y="550" on="0"/>
- <pt x="126" y="605" on="1"/>
- <pt x="184" y="772" on="0"/>
- <pt x="370" y="772" on="1"/>
- <pt x="469" y="772" on="0"/>
- <pt x="569" y="703" on="1"/>
- <pt x="681" y="626" on="1"/>
- <pt x="747" y="580" on="1"/>
- <pt x="776" y="560" on="0"/>
- <pt x="824" y="560" on="1"/>
- <pt x="939" y="560" on="0"/>
- <pt x="943" y="740" on="1"/>
- <pt x="1091" y="740" on="1"/>
- <pt x="1088" y="634" on="0"/>
- <pt x="1069" y="579" on="1"/>
- <pt x="1011" y="412" on="0"/>
- <pt x="826" y="412" on="1"/>
- <pt x="727" y="412" on="0"/>
- <pt x="627" y="481" on="1"/>
- <pt x="515" y="558" on="1"/>
- <pt x="448" y="604" on="1"/>
- <pt x="419" y="624" on="0"/>
- <pt x="372" y="624" on="1"/>
- <pt x="256" y="624" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 7 5 11 7 18 48 196 5 13 18 0 14 13 1 1 0 1 2 0 14 14 13
- 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="asterisk" xMin="39" yMin="751" xMax="757" yMax="1480">
- <contour>
- <pt x="711" y="1289" on="1"/>
- <pt x="757" y="1148" on="1"/>
- <pt x="479" y="1082" on="1"/>
- <pt x="479" y="1084" on="1"/>
- <pt x="481" y="1095" on="0"/>
- <pt x="481" y="1096" on="1"/>
- <pt x="481" y="1097" on="1"/>
- <pt x="479" y="1139" on="0"/>
- <pt x="452" y="1164" on="1"/>
- </contour>
- <contour>
- <pt x="681" y="838" on="1"/>
- <pt x="561" y="751" on="1"/>
- <pt x="404" y="1018" on="1"/>
- <pt x="454" y="1024" on="0"/>
- <pt x="474" y="1069" on="1"/>
- </contour>
- <contour>
- <pt x="235" y="751" on="1"/>
- <pt x="115" y="838" on="1"/>
- <pt x="321" y="1069" on="1"/>
- <pt x="341" y="1024" on="0"/>
- <pt x="391" y="1018" on="1"/>
- </contour>
- <contour>
- <pt x="39" y="1148" on="1"/>
- <pt x="84" y="1289" on="1"/>
- <pt x="344" y="1164" on="1"/>
- <pt x="315" y="1138" on="0"/>
- <pt x="315" y="1097" on="1"/>
- <pt x="315" y="1096" on="1"/>
- <pt x="315" y="1095" on="0"/>
- <pt x="315" y="1091" on="1"/>
- <pt x="316" y="1088" on="1"/>
- <pt x="317" y="1084" on="0"/>
- <pt x="317" y="1082" on="1"/>
- </contour>
- <contour>
- <pt x="324" y="1480" on="1"/>
- <pt x="472" y="1480" on="1"/>
- <pt x="441" y="1172" on="1"/>
- <pt x="419" y="1183" on="0"/>
- <pt x="398" y="1183" on="1"/>
- <pt x="375" y="1183" on="0"/>
- <pt x="355" y="1172" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 34 1 36 34 32 24 23 21 20 19 8 1 0 11 30 1 3 0 1 1 29 18 16 15 14
- 13 11 10 9 3 2 11 1 2 3 0 0 31 30 0 14 36 32 31 30 29 24 23 21 20
- 19 18 16 15 14 13 11 10 9 8 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="at" xMin="253" yMin="-37" xMax="1844" yMax="1517">
- <contour>
- <pt x="1253" y="44" on="1"/>
- <pt x="1067" y="-37" on="0"/>
- <pt x="897" y="-37" on="1"/>
- <pt x="619" y="-37" on="0"/>
- <pt x="436" y="137" on="1"/>
- <pt x="253" y="310" on="0"/>
- <pt x="253" y="582" on="1"/>
- <pt x="253" y="949" on="0"/>
- <pt x="535" y="1233" on="1"/>
- <pt x="817" y="1517" on="0"/>
- <pt x="1186" y="1517" on="1"/>
- <pt x="1468" y="1517" on="0"/>
- <pt x="1656" y="1337" on="1"/>
- <pt x="1844" y="1157" on="0"/>
- <pt x="1844" y="889" on="1"/>
- <pt x="1844" y="643" on="0"/>
- <pt x="1693" y="469" on="1"/>
- <pt x="1542" y="296" on="0"/>
- <pt x="1327" y="296" on="1"/>
- <pt x="1160" y="296" on="0"/>
- <pt x="1160" y="411" on="1"/>
- <pt x="1160" y="450" on="0"/>
- <pt x="1181" y="516" on="1"/>
- <pt x="1221" y="642" on="1"/>
- <pt x="1209" y="642" on="1"/>
- <pt x="1124" y="486" on="0"/>
- <pt x="1048" y="408" on="1"/>
- <pt x="939" y="296" on="0"/>
- <pt x="818" y="296" on="1"/>
- <pt x="629" y="296" on="0"/>
- <pt x="629" y="523" on="1"/>
- <pt x="629" y="772" on="0"/>
- <pt x="791" y="975" on="1"/>
- <pt x="952" y="1178" on="0"/>
- <pt x="1157" y="1178" on="1"/>
- <pt x="1182" y="1178" on="0"/>
- <pt x="1222" y="1176" on="1"/>
- <pt x="1232" y="1175" on="0"/>
- <pt x="1245" y="1174" on="1"/>
- <pt x="1284" y="1172" on="0"/>
- <pt x="1311" y="1172" on="1"/>
- <pt x="1448" y="1172" on="1"/>
- <pt x="1322" y="536" on="1"/>
- <pt x="1316" y="506" on="0"/>
- <pt x="1316" y="475" on="1"/>
- <pt x="1316" y="407" on="0"/>
- <pt x="1393" y="407" on="1"/>
- <pt x="1525" y="407" on="0"/>
- <pt x="1629" y="549" on="1"/>
- <pt x="1733" y="692" on="0"/>
- <pt x="1733" y="874" on="1"/>
- <pt x="1733" y="1103" on="0"/>
- <pt x="1574" y="1255" on="1"/>
- <pt x="1415" y="1407" on="0"/>
- <pt x="1172" y="1407" on="1"/>
- <pt x="856" y="1407" on="0"/>
- <pt x="610" y="1158" on="1"/>
- <pt x="364" y="908" on="0"/>
- <pt x="364" y="591" on="1"/>
- <pt x="364" y="361" on="0"/>
- <pt x="519" y="218" on="1"/>
- <pt x="673" y="74" on="0"/>
- <pt x="913" y="74" on="1"/>
- <pt x="1067" y="74" on="0"/>
- <pt x="1217" y="146" on="1"/>
- </contour>
- <contour>
- <pt x="1233" y="833" on="1"/>
- <pt x="1272" y="1028" on="1"/>
- <pt x="1178" y="1061" on="0"/>
- <pt x="1112" y="1061" on="1"/>
- <pt x="971" y="1061" on="0"/>
- <pt x="877" y="918" on="1"/>
- <pt x="783" y="775" on="0"/>
- <pt x="783" y="568" on="1"/>
- <pt x="783" y="419" on="0"/>
- <pt x="863" y="419" on="1"/>
- <pt x="996" y="419" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 74 6 28 68 16 34 62 16 2 54 16 10 46 16 18 48 196 10 0 2 2 34 1
- 34 0 40 2 0 28 18 1 66 65 64 28 24 23 18 0 8 40 2 3 0 41 40 1 0
- 14 0 0 72 15 30 58 17 6 50 17 14 48 196 66 65 64 44 41 40 30 24 23 20 14
- 6 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MDAP[1]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="atilde" xMin="95" yMin="-25" xMax="1098" yMax="1517">
- <component glyphName="a" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="206" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="b" xMin="154" yMin="-25" xMax="1052" yMax="1579">
- <contour>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="149" on="1"/>
- <pt x="488" y="123" on="0"/>
- <pt x="557" y="123" on="1"/>
- <pt x="839" y="123" on="0"/>
- <pt x="839" y="552" on="1"/>
- <pt x="839" y="733" on="0"/>
- <pt x="783" y="835" on="1"/>
- <pt x="728" y="938" on="0"/>
- <pt x="634" y="938" on="1"/>
- <pt x="508" y="938" on="0"/>
- </contour>
- <contour>
- <pt x="351" y="882" on="1"/>
- <pt x="407" y="984" on="0"/>
- <pt x="469" y="1036" on="1"/>
- <pt x="558" y="1110" on="0"/>
- <pt x="676" y="1110" on="1"/>
- <pt x="845" y="1110" on="0"/>
- <pt x="948" y="963" on="1"/>
- <pt x="1052" y="816" on="0"/>
- <pt x="1052" y="572" on="1"/>
- <pt x="1052" y="287" on="0"/>
- <pt x="918" y="131" on="1"/>
- <pt x="785" y="-25" on="0"/>
- <pt x="540" y="-25" on="1"/>
- <pt x="449" y="-25" on="0"/>
- <pt x="351" y="0" on="1"/>
- <pt x="154" y="-12" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 23 2 15 1 9 3 1 1 11 9 3 1 0 5 1 2 3 0 0 1 26 25 2 0 28
- 27 1 0 14 19 5 0 0 0 28 25 11 1 0 4 4 26 1 4 48 196 27 26 1 28
- 25 11 1 0 4 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="backslash" xMin="-59" yMin="-296" xMax="629" yMax="1480">
- <contour>
- <pt x="629" y="-296" on="1"/>
- <pt x="474" y="-296" on="1"/>
- <pt x="-59" y="1480" on="1"/>
- <pt x="96" y="1480" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 1 0 1 0 3 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bar" xMin="192" yMin="-296" xMax="340" yMax="1579">
- <contour>
- <pt x="192" y="-296" on="1"/>
- <pt x="192" y="1579" on="1"/>
- <pt x="340" y="1579" on="1"/>
- <pt x="340" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 2 1 1 3 0 1 2 0 14 0 0 3 2 7 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceleft" xMin="25" yMin="-296" xMax="568" yMax="1579">
- <contour>
- <pt x="25" y="716" on="1"/>
- <pt x="86" y="716" on="1"/>
- <pt x="239" y="716" on="0"/>
- <pt x="239" y="880" on="1"/>
- <pt x="239" y="944" on="0"/>
- <pt x="223" y="1017" on="1"/>
- <pt x="204" y="1104" on="1"/>
- <pt x="185" y="1191" on="0"/>
- <pt x="185" y="1268" on="1"/>
- <pt x="185" y="1431" on="0"/>
- <pt x="321" y="1517" on="1"/>
- <pt x="416" y="1576" on="0"/>
- <pt x="568" y="1579" on="1"/>
- <pt x="568" y="1431" on="1"/>
- <pt x="515" y="1431" on="1"/>
- <pt x="446" y="1431" on="0"/>
- <pt x="402" y="1396" on="1"/>
- <pt x="357" y="1360" on="0"/>
- <pt x="357" y="1306" on="1"/>
- <pt x="357" y="1286" on="0"/>
- <pt x="370" y="1212" on="1"/>
- <pt x="387" y="1110" on="1"/>
- <pt x="398" y="1043" on="0"/>
- <pt x="398" y="962" on="1"/>
- <pt x="398" y="773" on="0"/>
- <pt x="251" y="642" on="1"/>
- <pt x="398" y="511" on="0"/>
- <pt x="398" y="320" on="1"/>
- <pt x="398" y="240" on="0"/>
- <pt x="387" y="173" on="1"/>
- <pt x="370" y="71" on="1"/>
- <pt x="357" y="-3" on="0"/>
- <pt x="357" y="-24" on="1"/>
- <pt x="357" y="-77" on="0"/>
- <pt x="403" y="-113" on="1"/>
- <pt x="447" y="-148" on="0"/>
- <pt x="515" y="-148" on="1"/>
- <pt x="568" y="-148" on="1"/>
- <pt x="568" y="-296" on="1"/>
- <pt x="408" y="-293" on="0"/>
- <pt x="311" y="-227" on="1"/>
- <pt x="185" y="-140" on="0"/>
- <pt x="185" y="17" on="1"/>
- <pt x="185" y="92" on="0"/>
- <pt x="204" y="179" on="1"/>
- <pt x="223" y="266" on="1"/>
- <pt x="239" y="339" on="0"/>
- <pt x="239" y="406" on="1"/>
- <pt x="239" y="568" on="0"/>
- <pt x="86" y="568" on="1"/>
- <pt x="25" y="568" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 50 49 38 37 36 25 14 13 12 1 0 14 0 0 47 15 27 32 13 42 18 13 8 3 15
- 23 48 196 42 27 23 8 49 42 36 27 25 23 14 8 1 9 12 0 3 38 37 13 12 3
- 50 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="braceright" xMin="116" yMin="-296" xMax="659" yMax="1579">
- <contour>
- <pt x="659" y="568" on="1"/>
- <pt x="597" y="568" on="1"/>
- <pt x="445" y="568" on="0"/>
- <pt x="445" y="404" on="1"/>
- <pt x="445" y="331" on="0"/>
- <pt x="460" y="266" on="1"/>
- <pt x="480" y="179" on="1"/>
- <pt x="499" y="96" on="0"/>
- <pt x="499" y="15" on="1"/>
- <pt x="499" y="-148" on="0"/>
- <pt x="361" y="-234" on="1"/>
- <pt x="267" y="-293" on="0"/>
- <pt x="116" y="-296" on="1"/>
- <pt x="116" y="-148" on="1"/>
- <pt x="168" y="-148" on="1"/>
- <pt x="236" y="-148" on="0"/>
- <pt x="281" y="-113" on="1"/>
- <pt x="326" y="-77" on="0"/>
- <pt x="326" y="-23" on="1"/>
- <pt x="326" y="3" on="0"/>
- <pt x="314" y="71" on="1"/>
- <pt x="296" y="173" on="1"/>
- <pt x="285" y="235" on="0"/>
- <pt x="285" y="321" on="1"/>
- <pt x="285" y="511" on="0"/>
- <pt x="432" y="642" on="1"/>
- <pt x="366" y="701" on="0"/>
- <pt x="333" y="760" on="1"/>
- <pt x="285" y="848" on="0"/>
- <pt x="285" y="963" on="1"/>
- <pt x="285" y="1048" on="0"/>
- <pt x="296" y="1110" on="1"/>
- <pt x="314" y="1212" on="1"/>
- <pt x="326" y="1280" on="0"/>
- <pt x="326" y="1308" on="1"/>
- <pt x="326" y="1360" on="0"/>
- <pt x="280" y="1396" on="1"/>
- <pt x="235" y="1431" on="0"/>
- <pt x="168" y="1431" on="1"/>
- <pt x="116" y="1431" on="1"/>
- <pt x="116" y="1579" on="1"/>
- <pt x="276" y="1576" on="0"/>
- <pt x="372" y="1510" on="1"/>
- <pt x="499" y="1423" on="0"/>
- <pt x="499" y="1266" on="1"/>
- <pt x="499" y="1187" on="0"/>
- <pt x="480" y="1104" on="1"/>
- <pt x="460" y="1017" on="1"/>
- <pt x="445" y="952" on="0"/>
- <pt x="445" y="877" on="1"/>
- <pt x="445" y="716" on="0"/>
- <pt x="597" y="716" on="1"/>
- <pt x="659" y="716" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 52 51 40 39 38 25 14 13 12 1 0 14 0 0 49 15 29 34 13 44 18 13 8 3 15
- 23 48 196 44 29 23 8 51 44 38 29 25 23 14 8 1 9 0 12 3 52 0 1 40 39
- 13 12 3 2 0
- LOOPCALL[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketleft" xMin="149" yMin="-296" xMax="544" yMax="1579">
- <contour>
- <pt x="149" y="-296" on="1"/>
- <pt x="149" y="1579" on="1"/>
- <pt x="544" y="1579" on="1"/>
- <pt x="544" y="1431" on="1"/>
- <pt x="322" y="1431" on="1"/>
- <pt x="322" y="-148" on="1"/>
- <pt x="544" y="-148" on="1"/>
- <pt x="544" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 4 3 7 1 1 6 5 7 1 0 2 4 48 196 2 1 1 7 0 1 2 0 14
- 0 0 5 4 13 1 0 1 4 48 196 7 6 3 2 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bracketright" xMin="26" yMin="-296" xMax="421" yMax="1579">
- <contour>
- <pt x="421" y="1579" on="1"/>
- <pt x="421" y="-296" on="1"/>
- <pt x="26" y="-296" on="1"/>
- <pt x="26" y="-148" on="1"/>
- <pt x="248" y="-148" on="1"/>
- <pt x="248" y="1431" on="1"/>
- <pt x="26" y="1431" on="1"/>
- <pt x="26" y="1579" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 6 5 7 1 0 4 3 7 1 1 2 4 48 196 7 0 1 2 1 1 2 0 14
- 0 0 5 4 13 1 0 1 4 48 196 1 0 1 7 6 3 2 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="breve" xMin="8" yMin="1283" xMax="674" yMax="1604">
- <contour>
- <pt x="8" y="1604" on="1"/>
- <pt x="131" y="1604" on="1"/>
- <pt x="152" y="1510" on="0"/>
- <pt x="206" y="1470" on="1"/>
- <pt x="258" y="1431" on="0"/>
- <pt x="341" y="1431" on="1"/>
- <pt x="435" y="1431" on="0"/>
- <pt x="489" y="1480" on="1"/>
- <pt x="532" y="1520" on="0"/>
- <pt x="551" y="1604" on="1"/>
- <pt x="674" y="1604" on="1"/>
- <pt x="658" y="1470" on="0"/>
- <pt x="585" y="1389" on="1"/>
- <pt x="491" y="1283" on="0"/>
- <pt x="341" y="1283" on="1"/>
- <pt x="184" y="1283" on="0"/>
- <pt x="89" y="1398" on="1"/>
- <pt x="24" y="1476" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 0 0 5 40 14 48 196 14 10 9 1 0 14 10 9 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="brokenbar" xMin="192" yMin="-296" xMax="340" yMax="1579">
- <contour>
- <pt x="192" y="-296" on="1"/>
- <pt x="192" y="444" on="1"/>
- <pt x="340" y="444" on="1"/>
- <pt x="340" y="-296" on="1"/>
- </contour>
- <contour>
- <pt x="192" y="839" on="1"/>
- <pt x="192" y="1579" on="1"/>
- <pt x="340" y="1579" on="1"/>
- <pt x="340" y="839" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 34 values pushed */
- 6 5 1 7 4 1 2 1 1 3 0 1 4 0 14 0 0 7 6 3 2 7 3 0 1
- 4 48 196 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="bullet" xMin="81" yMin="555" xMax="636" yMax="1110">
- <contour>
- <pt x="359" y="1110" on="1"/>
- <pt x="474" y="1110" on="0"/>
- <pt x="555" y="1028" on="1"/>
- <pt x="636" y="946" on="0"/>
- <pt x="636" y="831" on="1"/>
- <pt x="636" y="717" on="0"/>
- <pt x="554" y="636" on="1"/>
- <pt x="472" y="555" on="0"/>
- <pt x="354" y="555" on="1"/>
- <pt x="255" y="555" on="0"/>
- <pt x="179" y="621" on="1"/>
- <pt x="81" y="707" on="0"/>
- <pt x="81" y="833" on="1"/>
- <pt x="81" y="948" on="0"/>
- <pt x="163" y="1029" on="1"/>
- <pt x="244" y="1110" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 15 values pushed */
- 0 0 0 8 48 196 8 14 0 0 4 12 48 196 12
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="c" xMin="86" yMin="-25" xMax="926" yMax="1110">
- <contour>
- <pt x="926" y="33" on="1"/>
- <pt x="745" y="-25" on="0"/>
- <pt x="585" y="-25" on="1"/>
- <pt x="360" y="-25" on="0"/>
- <pt x="223" y="133" on="1"/>
- <pt x="86" y="290" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="809" on="0"/>
- <pt x="226" y="959" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="616" y="1110" on="1"/>
- <pt x="742" y="1110" on="0"/>
- <pt x="914" y="1074" on="1"/>
- <pt x="914" y="910" on="1"/>
- <pt x="750" y="959" on="0"/>
- <pt x="652" y="959" on="1"/>
- <pt x="308" y="959" on="0"/>
- <pt x="308" y="543" on="1"/>
- <pt x="308" y="347" on="0"/>
- <pt x="397" y="241" on="1"/>
- <pt x="485" y="134" on="0"/>
- <pt x="644" y="134" on="1"/>
- <pt x="765" y="134" on="0"/>
- <pt x="926" y="203" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 21 29 2 15 40 10 48 196 10 1 2 2 1 1 23 13 12 0 4 1 2 3 0
- 0 14 0 0 17 26 6 48 196 6 12 23 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cacute" xMin="86" yMin="-25" xMax="928" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="352" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="caron" xMin="-9" yMin="1283" xMax="691" yMax="1604">
- <contour>
- <pt x="691" y="1604" on="1"/>
- <pt x="450" y="1283" on="1"/>
- <pt x="232" y="1283" on="1"/>
- <pt x="-9" y="1604" on="1"/>
- <pt x="139" y="1604" on="1"/>
- <pt x="340" y="1402" on="1"/>
- <pt x="342" y="1402" on="1"/>
- <pt x="543" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 6 5 2 0 1 3 7 4 3 0 3 2 1 1 2 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ccaron" xMin="86" yMin="-25" xMax="957" yMax="1604">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="266" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccedilla" xMin="86" yMin="-432" xMax="926" yMax="1110">
- <component glyphName="c" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="260" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ccircumflex" xMin="86" yMin="-25" xMax="957" yMax="1604">
- <contour>
- <pt x="926" y="33" on="1"/>
- <pt x="745" y="-25" on="0"/>
- <pt x="585" y="-25" on="1"/>
- <pt x="360" y="-25" on="0"/>
- <pt x="223" y="133" on="1"/>
- <pt x="86" y="290" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="809" on="0"/>
- <pt x="226" y="959" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="616" y="1110" on="1"/>
- <pt x="742" y="1110" on="0"/>
- <pt x="914" y="1074" on="1"/>
- <pt x="914" y="910" on="1"/>
- <pt x="750" y="959" on="0"/>
- <pt x="652" y="959" on="1"/>
- <pt x="308" y="959" on="0"/>
- <pt x="308" y="543" on="1"/>
- <pt x="308" y="347" on="0"/>
- <pt x="397" y="241" on="1"/>
- <pt x="485" y="134" on="0"/>
- <pt x="644" y="134" on="1"/>
- <pt x="765" y="134" on="0"/>
- <pt x="926" y="203" on="1"/>
- </contour>
- <contour>
- <pt x="257" y="1283" on="1"/>
- <pt x="498" y="1604" on="1"/>
- <pt x="716" y="1604" on="1"/>
- <pt x="957" y="1283" on="1"/>
- <pt x="809" y="1283" on="1"/>
- <pt x="608" y="1485" on="1"/>
- <pt x="606" y="1485" on="1"/>
- <pt x="405" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 21 29 2 15 40 10 48 196 10 1 2 2 30 29 2 25 24 3 1 1 23 13 12
- 0 4 1 2 3 0 0 26 25 1 31 28 27 24 3 2 0 14 0 0 17 26 6 48 196
- 27 0 31 30 29 28 26 25 24 7 13 6 12 23 0 1 13 12 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cdotaccent" xMin="86" yMin="-25" xMax="926" yMax="1480">
- <contour>
- <pt x="926" y="33" on="1"/>
- <pt x="745" y="-25" on="0"/>
- <pt x="585" y="-25" on="1"/>
- <pt x="360" y="-25" on="0"/>
- <pt x="223" y="133" on="1"/>
- <pt x="86" y="290" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="809" on="0"/>
- <pt x="226" y="959" on="1"/>
- <pt x="365" y="1110" on="0"/>
- <pt x="616" y="1110" on="1"/>
- <pt x="742" y="1110" on="0"/>
- <pt x="914" y="1074" on="1"/>
- <pt x="914" y="910" on="1"/>
- <pt x="750" y="959" on="0"/>
- <pt x="652" y="959" on="1"/>
- <pt x="308" y="959" on="0"/>
- <pt x="308" y="543" on="1"/>
- <pt x="308" y="347" on="0"/>
- <pt x="397" y="241" on="1"/>
- <pt x="485" y="134" on="0"/>
- <pt x="644" y="134" on="1"/>
- <pt x="765" y="134" on="0"/>
- <pt x="926" y="203" on="1"/>
- </contour>
- <contour>
- <pt x="508" y="1283" on="1"/>
- <pt x="508" y="1480" on="1"/>
- <pt x="705" y="1480" on="1"/>
- <pt x="705" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 21 29 2 15 40 10 48 196 10 1 2 2 1 1 23 13 12 0 4 1 2 3 0
- 0 0 0 27 24 5 1 25 1 4 48 196 26 25 0 14 0 0 17 26 6 48 196 6 24
- 0 0 25 24 4 1 26 1 4 48 196 27 26 1 23 0 1 13 12 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cedilla" xMin="168" yMin="-432" xMax="515" yMax="0">
- <contour>
- <pt x="284" y="0" on="1"/>
- <pt x="381" y="0" on="1"/>
- <pt x="321" y="-109" on="1"/>
- <pt x="393" y="-111" on="0"/>
- <pt x="445" y="-148" on="1"/>
- <pt x="515" y="-197" on="0"/>
- <pt x="515" y="-269" on="1"/>
- <pt x="515" y="-337" on="0"/>
- <pt x="456" y="-384" on="1"/>
- <pt x="398" y="-432" on="0"/>
- <pt x="311" y="-432" on="1"/>
- <pt x="244" y="-432" on="0"/>
- <pt x="168" y="-411" on="1"/>
- <pt x="168" y="-330" on="1"/>
- <pt x="218" y="-345" on="0"/>
- <pt x="272" y="-345" on="1"/>
- <pt x="376" y="-345" on="0"/>
- <pt x="376" y="-271" on="1"/>
- <pt x="376" y="-178" on="0"/>
- <pt x="189" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 15 44 10 48 196 19 13 12 10 2 1 0 14 0 0 17 42 6 48 196 19 13 12
- 6 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="cent" xMin="173" yMin="0" xMax="1014" yMax="1480">
- <contour>
- <pt x="631" y="0" on="1"/>
- <pt x="631" y="173" on="1"/>
- <pt x="443" y="197" on="0"/>
- <pt x="327" y="320" on="1"/>
- <pt x="173" y="483" on="0"/>
- <pt x="173" y="740" on="1"/>
- <pt x="173" y="1010" on="0"/>
- <pt x="331" y="1161" on="1"/>
- <pt x="441" y="1266" on="0"/>
- <pt x="631" y="1295" on="1"/>
- <pt x="631" y="1480" on="1"/>
- <pt x="730" y="1480" on="1"/>
- <pt x="730" y="1295" on="1"/>
- <pt x="863" y="1289" on="0"/>
- <pt x="1014" y="1249" on="1"/>
- <pt x="1014" y="1083" on="1"/>
- <pt x="836" y="1143" on="0"/>
- <pt x="730" y="1153" on="1"/>
- <pt x="730" y="313" on="1"/>
- <pt x="866" y="313" on="0"/>
- <pt x="1014" y="380" on="1"/>
- <pt x="1014" y="231" on="1"/>
- <pt x="865" y="173" on="0"/>
- <pt x="730" y="173" on="1"/>
- <pt x="730" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="631" y="1144" on="1"/>
- <pt x="572" y="1135" on="0"/>
- <pt x="542" y="1120" on="1"/>
- <pt x="389" y="1041" on="0"/>
- <pt x="389" y="739" on="1"/>
- <pt x="389" y="530" on="0"/>
- <pt x="480" y="422" on="1"/>
- <pt x="532" y="361" on="0"/>
- <pt x="631" y="324" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 55 values pushed */
- 33 25 24 23 21 20 18 17 15 14 12 11 10 9 1 0 14 0 0 29 9 5 48 196 5
- 0 0 0 33 25 10 9 1 0 11 5 11 1 4 48 196 21 20 15 14 3 24 23 18 17
- 12 11 5 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="circumflex" xMin="-9" yMin="1283" xMax="691" yMax="1604">
- <contour>
- <pt x="-9" y="1283" on="1"/>
- <pt x="232" y="1604" on="1"/>
- <pt x="450" y="1604" on="1"/>
- <pt x="691" y="1283" on="1"/>
- <pt x="543" y="1283" on="1"/>
- <pt x="342" y="1485" on="1"/>
- <pt x="340" y="1485" on="1"/>
- <pt x="139" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 6 5 2 1 0 3 2 1 1 7 4 3 0 3 2 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="colon" xMin="186" yMin="0" xMax="383" yMax="1086">
- <contour>
- <pt x="186" y="0" on="1"/>
- <pt x="186" y="197" on="1"/>
- <pt x="383" y="197" on="1"/>
- <pt x="383" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="186" y="888" on="1"/>
- <pt x="186" y="1086" on="1"/>
- <pt x="383" y="1086" on="1"/>
- <pt x="383" y="888" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 7 4 5 1 5 2 1 5 1 0 2 4 48 196 3 0 1 0 6 5 1 14 0
- 0 7 6 3 2 4 3 0 1 4 48 196 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="comma" xMin="161" yMin="-321" xMax="408" yMax="247">
- <contour>
- <pt x="161" y="-321" on="1"/>
- <pt x="161" y="-247" on="1"/>
- <pt x="257" y="-220" on="0"/>
- <pt x="257" y="-20" on="1"/>
- <pt x="257" y="0" on="1"/>
- <pt x="161" y="0" on="1"/>
- <pt x="161" y="247" on="1"/>
- <pt x="408" y="247" on="1"/>
- <pt x="408" y="33" on="1"/>
- <pt x="407" y="-294" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 8 5 4 3 1 0 6 13 6 7 6 1 0 14 4 3 2 7 0 3 0 0 8 7 8
- 1 0 1 4 48 196 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="copyright" xMin="15" yMin="0" xMax="1495" yMax="1480">
- <contour>
- <pt x="755" y="1480" on="1"/>
- <pt x="1060" y="1480" on="0"/>
- <pt x="1278" y="1263" on="1"/>
- <pt x="1495" y="1047" on="0"/>
- <pt x="1495" y="741" on="1"/>
- <pt x="1495" y="431" on="0"/>
- <pt x="1277" y="216" on="1"/>
- <pt x="1060" y="0" on="0"/>
- <pt x="746" y="0" on="1"/>
- <pt x="478" y="0" on="0"/>
- <pt x="277" y="176" on="1"/>
- <pt x="15" y="404" on="0"/>
- <pt x="15" y="741" on="1"/>
- <pt x="15" y="1047" on="0"/>
- <pt x="232" y="1263" on="1"/>
- <pt x="450" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="755" y="1375" on="1"/>
- <pt x="494" y="1375" on="0"/>
- <pt x="307" y="1188" on="1"/>
- <pt x="121" y="1002" on="0"/>
- <pt x="121" y="740" on="1"/>
- <pt x="121" y="482" on="0"/>
- <pt x="306" y="294" on="1"/>
- <pt x="491" y="106" on="0"/>
- <pt x="748" y="106" on="1"/>
- <pt x="987" y="106" on="0"/>
- <pt x="1164" y="256" on="1"/>
- <pt x="1390" y="448" on="0"/>
- <pt x="1390" y="741" on="1"/>
- <pt x="1390" y="1003" on="0"/>
- <pt x="1203" y="1188" on="1"/>
- <pt x="1016" y="1375" on="0"/>
- </contour>
- <contour>
- <pt x="1025" y="364" on="1"/>
- <pt x="887" y="317" on="0"/>
- <pt x="781" y="317" on="1"/>
- <pt x="603" y="317" on="0"/>
- <pt x="488" y="434" on="1"/>
- <pt x="373" y="551" on="0"/>
- <pt x="373" y="736" on="1"/>
- <pt x="373" y="927" on="0"/>
- <pt x="485" y="1042" on="1"/>
- <pt x="597" y="1157" on="0"/>
- <pt x="787" y="1157" on="1"/>
- <pt x="884" y="1157" on="0"/>
- <pt x="1001" y="1133" on="1"/>
- <pt x="1025" y="1128" on="1"/>
- <pt x="1025" y="1010" on="1"/>
- <pt x="895" y="1063" on="0"/>
- <pt x="794" y="1063" on="1"/>
- <pt x="668" y="1063" on="0"/>
- <pt x="591" y="974" on="1"/>
- <pt x="514" y="884" on="0"/>
- <pt x="514" y="739" on="1"/>
- <pt x="514" y="593" on="0"/>
- <pt x="594" y="508" on="1"/>
- <pt x="674" y="423" on="0"/>
- <pt x="809" y="423" on="1"/>
- <pt x="914" y="423" on="0"/>
- <pt x="1025" y="482" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 56 20 34 48 21 42 24 20 8 16 20 0 48 196 8 2 0 0 42 34 1 1 58
- 46 45 42 34 32 6 0 2 3 0 0 14 0 0 52 42 38 28 17 4 20 17 12 48 196
- 58 46 45 38 32 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="currency" xMin="122" yMin="293" xMax="1016" yMax="1188">
- <contour>
- <pt x="365" y="449" on="1"/>
- <pt x="209" y="293" on="1"/>
- <pt x="122" y="380" on="1"/>
- <pt x="277" y="536" on="1"/>
- <pt x="214" y="640" on="0"/>
- <pt x="214" y="740" on="1"/>
- <pt x="214" y="841" on="0"/>
- <pt x="278" y="944" on="1"/>
- <pt x="122" y="1100" on="1"/>
- <pt x="209" y="1188" on="1"/>
- <pt x="365" y="1032" on="1"/>
- <pt x="463" y="1095" on="0"/>
- <pt x="569" y="1095" on="1"/>
- <pt x="675" y="1095" on="0"/>
- <pt x="773" y="1032" on="1"/>
- <pt x="929" y="1188" on="1"/>
- <pt x="1016" y="1100" on="1"/>
- <pt x="860" y="944" on="1"/>
- <pt x="924" y="841" on="0"/>
- <pt x="924" y="740" on="1"/>
- <pt x="924" y="639" on="0"/>
- <pt x="861" y="536" on="1"/>
- <pt x="1016" y="380" on="1"/>
- <pt x="929" y="293" on="1"/>
- <pt x="773" y="449" on="1"/>
- <pt x="674" y="385" on="0"/>
- <pt x="569" y="385" on="1"/>
- <pt x="464" y="385" on="0"/>
- </contour>
- <contour>
- <pt x="569" y="972" on="1"/>
- <pt x="471" y="972" on="0"/>
- <pt x="404" y="905" on="1"/>
- <pt x="337" y="838" on="0"/>
- <pt x="337" y="739" on="1"/>
- <pt x="337" y="643" on="0"/>
- <pt x="404" y="576" on="1"/>
- <pt x="470" y="508" on="0"/>
- <pt x="566" y="508" on="1"/>
- <pt x="655" y="508" on="0"/>
- <pt x="719" y="562" on="1"/>
- <pt x="801" y="631" on="0"/>
- <pt x="801" y="741" on="1"/>
- <pt x="801" y="838" on="0"/>
- <pt x="734" y="905" on="1"/>
- <pt x="666" y="972" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 36 6 26 28 6 12 48 196 12 1 1 16 15 9 8 4 13 1 0 1 24 23 22
- 21 17 14 10 7 3 2 1 0 12 13 26 1 0 14 0 0 40 6 19 32 6 5 48 196
- 24 23 22 21 19 17 16 15 14 10 9 8 7 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="d" xMin="86" yMin="-25" xMax="984" yMax="1579">
- <contour>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="937" on="1"/>
- <pt x="648" y="962" on="0"/>
- <pt x="582" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="532" on="1"/>
- <pt x="299" y="354" on="0"/>
- <pt x="355" y="251" on="1"/>
- <pt x="410" y="148" on="0"/>
- <pt x="504" y="148" on="1"/>
- <pt x="630" y="148" on="0"/>
- </contour>
- <contour>
- <pt x="787" y="203" on="1"/>
- <pt x="731" y="101" on="0"/>
- <pt x="669" y="49" on="1"/>
- <pt x="581" y="-25" on="0"/>
- <pt x="462" y="-25" on="1"/>
- <pt x="293" y="-25" on="0"/>
- <pt x="190" y="123" on="1"/>
- <pt x="86" y="270" on="0"/>
- <pt x="86" y="514" on="1"/>
- <pt x="86" y="798" on="0"/>
- <pt x="220" y="954" on="1"/>
- <pt x="354" y="1110" on="0"/>
- <pt x="597" y="1110" on="1"/>
- <pt x="691" y="1110" on="0"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="787" y="1579" on="1"/>
- <pt x="984" y="1579" on="1"/>
- <pt x="984" y="0" on="1"/>
- <pt x="787" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 23 1 15 2 9 3 1 25 11 9 3 1 0 6 1 28 3 0 27 26 1 29 28 1 2
- 0 14 19 5 0 0 0 29 26 25 11 1 0 4 5 27 1 4 48 196 28 27 1 29 26
- 25 11 1 0 5 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dagger" xMin="150" yMin="-296" xMax="989" yMax="1480">
- <contour>
- <pt x="471" y="-296" on="1"/>
- <pt x="495" y="839" on="1"/>
- <pt x="150" y="814" on="1"/>
- <pt x="150" y="962" on="1"/>
- <pt x="495" y="938" on="1"/>
- <pt x="471" y="1480" on="1"/>
- <pt x="668" y="1480" on="1"/>
- <pt x="643" y="938" on="1"/>
- <pt x="989" y="962" on="1"/>
- <pt x="989" y="814" on="1"/>
- <pt x="643" y="839" on="1"/>
- <pt x="668" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 42 values pushed */
- 1 10 9 8 7 4 3 2 1 8 5 2 3 0 11 0 1 0 6 5 0 14 11 10 7
- 6 5 4 1 0 8 8 2 3 9 8 1 3 2 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="daggerdbl" xMin="150" yMin="-296" xMax="989" yMax="1480">
- <contour>
- <pt x="471" y="-296" on="1"/>
- <pt x="495" y="247" on="1"/>
- <pt x="150" y="222" on="1"/>
- <pt x="150" y="370" on="1"/>
- <pt x="495" y="345" on="1"/>
- <pt x="495" y="839" on="1"/>
- <pt x="150" y="814" on="1"/>
- <pt x="150" y="962" on="1"/>
- <pt x="495" y="938" on="1"/>
- <pt x="471" y="1480" on="1"/>
- <pt x="668" y="1480" on="1"/>
- <pt x="643" y="938" on="1"/>
- <pt x="989" y="962" on="1"/>
- <pt x="989" y="814" on="1"/>
- <pt x="643" y="839" on="1"/>
- <pt x="643" y="345" on="1"/>
- <pt x="989" y="370" on="1"/>
- <pt x="989" y="222" on="1"/>
- <pt x="643" y="247" on="1"/>
- <pt x="668" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 1 18 17 16 15 14 13 12 11 8 7 6 5 4 3 2 1 16 9 2 3 0 19 0 1
- 0 10 9 0 14 19 10 2 12 11 3 9 0 2 1 2 3 0 0 18 15 14 11 7 3
- 1 1 4 48 196 17 16 13 12 3 8 5 4 1 3 7 6 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcaron" xMin="86" yMin="-25" xMax="1259" yMax="1579">
- <contour>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="937" on="1"/>
- <pt x="648" y="962" on="0"/>
- <pt x="582" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="532" on="1"/>
- <pt x="299" y="354" on="0"/>
- <pt x="355" y="251" on="1"/>
- <pt x="410" y="148" on="0"/>
- <pt x="504" y="148" on="1"/>
- <pt x="630" y="148" on="0"/>
- </contour>
- <contour>
- <pt x="787" y="203" on="1"/>
- <pt x="731" y="101" on="0"/>
- <pt x="669" y="49" on="1"/>
- <pt x="581" y="-25" on="0"/>
- <pt x="462" y="-25" on="1"/>
- <pt x="293" y="-25" on="0"/>
- <pt x="190" y="123" on="1"/>
- <pt x="86" y="270" on="0"/>
- <pt x="86" y="514" on="1"/>
- <pt x="86" y="798" on="0"/>
- <pt x="220" y="954" on="1"/>
- <pt x="354" y="1110" on="0"/>
- <pt x="597" y="1110" on="1"/>
- <pt x="691" y="1110" on="0"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="787" y="1579" on="1"/>
- <pt x="984" y="1579" on="1"/>
- <pt x="984" y="0" on="1"/>
- <pt x="787" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1061" y="1125" on="1"/>
- <pt x="1061" y="1184" on="1"/>
- <pt x="1138" y="1205" on="0"/>
- <pt x="1138" y="1365" on="1"/>
- <pt x="1138" y="1382" on="1"/>
- <pt x="1061" y="1382" on="1"/>
- <pt x="1061" y="1579" on="1"/>
- <pt x="1259" y="1579" on="1"/>
- <pt x="1259" y="1408" on="1"/>
- <pt x="1258" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 23 1 15 2 1 38 35 34 33 31 30 6 26 1 3 0 9 3 1 25 11 9 3 1 0
- 6 1 28 3 0 37 36 27 26 3 29 28 1 2 0 14 34 33 2 37 30 3 19 5 0
- 0 0 36 35 31 30 4 3 37 29 26 25 11 1 0 4 5 27 2 4 48 196 38 37 1
- 28 27 1 29 26 25 11 1 0 5 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dcroat" xMin="86" yMin="-25" xMax="1132" yMax="1579">
- <contour>
- <pt x="787" y="1258" on="1"/>
- <pt x="466" y="1258" on="1"/>
- <pt x="466" y="1382" on="1"/>
- <pt x="787" y="1382" on="1"/>
- <pt x="787" y="1579" on="1"/>
- <pt x="984" y="1579" on="1"/>
- <pt x="984" y="1382" on="1"/>
- <pt x="1132" y="1382" on="1"/>
- <pt x="1132" y="1258" on="1"/>
- <pt x="984" y="1258" on="1"/>
- <pt x="984" y="0" on="1"/>
- <pt x="787" y="0" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="731" y="101" on="0"/>
- <pt x="669" y="49" on="1"/>
- <pt x="581" y="-25" on="0"/>
- <pt x="462" y="-25" on="1"/>
- <pt x="293" y="-25" on="0"/>
- <pt x="190" y="123" on="1"/>
- <pt x="86" y="270" on="0"/>
- <pt x="86" y="514" on="1"/>
- <pt x="86" y="798" on="0"/>
- <pt x="220" y="954" on="1"/>
- <pt x="354" y="1110" on="0"/>
- <pt x="597" y="1110" on="1"/>
- <pt x="691" y="1110" on="0"/>
- <pt x="787" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="937" on="1"/>
- <pt x="648" y="962" on="0"/>
- <pt x="582" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="532" on="1"/>
- <pt x="299" y="354" on="0"/>
- <pt x="355" y="251" on="1"/>
- <pt x="410" y="148" on="0"/>
- <pt x="504" y="148" on="1"/>
- <pt x="630" y="148" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 90 values pushed */
- 0 0 36 30 16 30 40 24 48 196 24 1 16 2 1 28 27 26 12 4 1 10 3 0 0
- 0 9 8 1 0 6 3 2 1 4 48 196 5 4 1 7 6 3 2 3 11 10 1 3 0
- 14 0 0 32 9 20 48 196 8 7 2 13 5 2 1 20 0 0 0 28 27 26 12 11 4
- 3 0 4 7 5 1 4 48 196 10 9 6 5 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="degree" xMin="114" yMin="925" xMax="706" yMax="1517">
- <contour>
- <pt x="410" y="1517" on="1"/>
- <pt x="531" y="1517" on="0"/>
- <pt x="619" y="1430" on="1"/>
- <pt x="706" y="1344" on="0"/>
- <pt x="706" y="1222" on="1"/>
- <pt x="706" y="1098" on="0"/>
- <pt x="619" y="1012" on="1"/>
- <pt x="531" y="925" on="0"/>
- <pt x="406" y="925" on="1"/>
- <pt x="300" y="925" on="0"/>
- <pt x="219" y="995" on="1"/>
- <pt x="114" y="1087" on="0"/>
- <pt x="114" y="1221" on="1"/>
- <pt x="114" y="1344" on="0"/>
- <pt x="201" y="1430" on="1"/>
- <pt x="289" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="410" y="1394" on="1"/>
- <pt x="339" y="1394" on="0"/>
- <pt x="288" y="1343" on="1"/>
- <pt x="237" y="1293" on="0"/>
- <pt x="237" y="1222" on="1"/>
- <pt x="237" y="1151" on="0"/>
- <pt x="288" y="1100" on="1"/>
- <pt x="338" y="1049" on="0"/>
- <pt x="408" y="1049" on="1"/>
- <pt x="473" y="1049" on="0"/>
- <pt x="521" y="1090" on="1"/>
- <pt x="583" y="1142" on="0"/>
- <pt x="583" y="1222" on="1"/>
- <pt x="583" y="1293" on="0"/>
- <pt x="532" y="1343" on="1"/>
- <pt x="481" y="1394" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 24 6 8 16 6 0 48 196 0 0 1 8 0 0 14 0 0 28 6 4 20 6 12
- 48 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dieresis" xMin="57" yMin="1283" xMax="625" yMax="1456">
- <contour>
- <pt x="57" y="1283" on="1"/>
- <pt x="57" y="1456" on="1"/>
- <pt x="230" y="1456" on="1"/>
- <pt x="230" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="452" y="1283" on="1"/>
- <pt x="452" y="1456" on="1"/>
- <pt x="625" y="1456" on="1"/>
- <pt x="625" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 7 4 3 0 13 3 1 1 4 48 196 6 5 2 1 3 0 14 0 0 5 4 13
- 1 6 3 2 13 1 0 2 4 48 196 7 6 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="divide" xMin="104" yMin="0" xMax="1091" yMax="1184">
- <contour>
- <pt x="104" y="518" on="1"/>
- <pt x="104" y="666" on="1"/>
- <pt x="1091" y="666" on="1"/>
- <pt x="1091" y="518" on="1"/>
- </contour>
- <contour>
- <pt x="474" y="938" on="1"/>
- <pt x="474" y="1184" on="1"/>
- <pt x="721" y="1184" on="1"/>
- <pt x="721" y="938" on="1"/>
- </contour>
- <contour>
- <pt x="474" y="0" on="1"/>
- <pt x="474" y="247" on="1"/>
- <pt x="721" y="247" on="1"/>
- <pt x="721" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 10 9 8 1 8 7 4 8 1 5 3 0 7 1 1 3 4 48 196 11 8 1 6
- 5 1 2 1 1 3 0 14 0 0 11 10 7 6 8 3 4 1 4 48 196 9 8 5 4
- 3 3 2 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dollar" xMin="103" yMin="-123" xMax="942" yMax="1604">
- <contour>
- <pt x="498" y="-123" on="1"/>
- <pt x="498" y="0" on="1"/>
- <pt x="322" y="0" on="0"/>
- <pt x="103" y="83" on="1"/>
- <pt x="103" y="253" on="1"/>
- <pt x="328" y="148" on="0"/>
- <pt x="498" y="148" on="1"/>
- <pt x="498" y="679" on="1"/>
- <pt x="312" y="795" on="0"/>
- <pt x="235" y="881" on="1"/>
- <pt x="147" y="981" on="0"/>
- <pt x="147" y="1125" on="1"/>
- <pt x="147" y="1296" on="0"/>
- <pt x="274" y="1398" on="1"/>
- <pt x="360" y="1467" on="0"/>
- <pt x="498" y="1480" on="1"/>
- <pt x="498" y="1604" on="1"/>
- <pt x="597" y="1604" on="1"/>
- <pt x="597" y="1480" on="1"/>
- <pt x="741" y="1480" on="0"/>
- <pt x="918" y="1413" on="1"/>
- <pt x="918" y="1252" on="1"/>
- <pt x="727" y="1335" on="0"/>
- <pt x="597" y="1345" on="1"/>
- <pt x="597" y="818" on="1"/>
- <pt x="609" y="810" on="1"/>
- <pt x="635" y="794" on="0"/>
- <pt x="658" y="781" on="1"/>
- <pt x="670" y="773" on="1"/>
- <pt x="796" y="698" on="0"/>
- <pt x="859" y="632" on="1"/>
- <pt x="942" y="546" on="0"/>
- <pt x="942" y="413" on="1"/>
- <pt x="942" y="232" on="0"/>
- <pt x="820" y="113" on="1"/>
- <pt x="735" y="31" on="0"/>
- <pt x="597" y="0" on="1"/>
- <pt x="597" y="-123" on="1"/>
- </contour>
- <contour>
- <pt x="597" y="160" on="1"/>
- <pt x="769" y="227" on="0"/>
- <pt x="769" y="385" on="1"/>
- <pt x="769" y="467" on="0"/>
- <pt x="721" y="520" on="1"/>
- <pt x="684" y="560" on="0"/>
- <pt x="597" y="621" on="1"/>
- </contour>
- <contour>
- <pt x="498" y="883" on="1"/>
- <pt x="498" y="1339" on="1"/>
- <pt x="319" y="1278" on="0"/>
- <pt x="319" y="1133" on="1"/>
- <pt x="319" y="1002" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 46 45 44 38 37 36 24 23 21 20 18 17 16 15 7 6 4 3 1 0 14 0 0 48 13
- 11 40 13 32 48 196 11 11 0 3 2 32 20 0 0 44 38 37 36 24 23 18 17 11 7
- 0 1 4 48 196 21 20 1 46 45 16 15 7 6 1 0 7 4 3 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotaccent" xMin="242" yMin="1283" xMax="439" yMax="1480">
- <contour>
- <pt x="242" y="1283" on="1"/>
- <pt x="242" y="1480" on="1"/>
- <pt x="439" y="1480" on="1"/>
- <pt x="439" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 3 0 5 1 1 1 4 48 196 2 1 0 14 0 0 3 2 4 1 0 1 4 48
- 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessi" xMin="129" yMin="0" xMax="326" yMax="1086">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1086" on="1"/>
- <pt x="326" y="1086" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 23 values pushed */
- 3 0 1 0 2 1 1 14 0 0 3 2 4 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotlessj" xMin="-155" yMin="-419" xMax="331" yMax="1086">
- <contour>
- <pt x="-155" y="-387" on="1"/>
- <pt x="-155" y="-231" on="1"/>
- <pt x="-75" y="-271" on="0"/>
- <pt x="-5" y="-271" on="1"/>
- <pt x="92" y="-271" on="0"/>
- <pt x="115" y="-197" on="1"/>
- <pt x="133" y="-136" on="0"/>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="0" on="1"/>
- <pt x="331" y="-419" on="0"/>
- <pt x="11" y="-419" on="1"/>
- <pt x="-77" y="-419" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 40 values pushed */
- 0 0 3 40 12 48 196 1 10 7 1 0 4 13 12 2 0 9 8 1 14 0 0 8 7
- 4 1 9 1 4 48 196 10 9 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="dotmath" xMin="161" yMin="491" xMax="408" yMax="738">
- <contour>
- <pt x="161" y="491" on="1"/>
- <pt x="161" y="738" on="1"/>
- <pt x="408" y="738" on="1"/>
- <pt x="408" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 8 1 1 1 4 48 196 2 1 1 0 14 0 0 3 2 8 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="e" xMin="86" yMin="-25" xMax="1022" yMax="1110">
- <contour>
- <pt x="818" y="660" on="1"/>
- <pt x="815" y="758" on="0"/>
- <pt x="798" y="809" on="1"/>
- <pt x="746" y="963" on="0"/>
- <pt x="572" y="963" on="1"/>
- <pt x="451" y="963" on="0"/>
- <pt x="381" y="891" on="1"/>
- <pt x="313" y="822" on="0"/>
- <pt x="296" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="1013" y="191" on="1"/>
- <pt x="1013" y="35" on="1"/>
- <pt x="810" y="-25" on="0"/>
- <pt x="641" y="-25" on="1"/>
- <pt x="386" y="-25" on="0"/>
- <pt x="236" y="133" on="1"/>
- <pt x="86" y="291" on="0"/>
- <pt x="86" y="557" on="1"/>
- <pt x="86" y="810" on="0"/>
- <pt x="219" y="960" on="1"/>
- <pt x="351" y="1110" on="0"/>
- <pt x="577" y="1110" on="1"/>
- <pt x="836" y="1110" on="0"/>
- <pt x="943" y="926" on="1"/>
- <pt x="1022" y="789" on="0"/>
- <pt x="1019" y="573" on="1"/>
- <pt x="1018" y="512" on="1"/>
- <pt x="293" y="512" on="1"/>
- <pt x="305" y="393" on="0"/>
- <pt x="332" y="331" on="1"/>
- <pt x="420" y="125" on="0"/>
- <pt x="683" y="125" on="1"/>
- <pt x="832" y="125" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 30 40 12 48 196 20 1 12 2 4 1 4 1 0 2 0 1 10 9 2 25 2 3
- 0 26 25 1 8 0 1 2 0 14 25 9 26 8 0 3 13 16 9 10 9 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eacute" xMin="86" yMin="-25" xMax="1022" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="315" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ebreve" xMin="86" yMin="-25" xMax="1022" yMax="1604">
- <contour>
- <pt x="818" y="660" on="1"/>
- <pt x="815" y="758" on="0"/>
- <pt x="798" y="809" on="1"/>
- <pt x="746" y="963" on="0"/>
- <pt x="572" y="963" on="1"/>
- <pt x="451" y="963" on="0"/>
- <pt x="381" y="891" on="1"/>
- <pt x="313" y="822" on="0"/>
- <pt x="296" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="1013" y="191" on="1"/>
- <pt x="1013" y="35" on="1"/>
- <pt x="810" y="-25" on="0"/>
- <pt x="641" y="-25" on="1"/>
- <pt x="386" y="-25" on="0"/>
- <pt x="236" y="133" on="1"/>
- <pt x="86" y="291" on="0"/>
- <pt x="86" y="557" on="1"/>
- <pt x="86" y="810" on="0"/>
- <pt x="219" y="960" on="1"/>
- <pt x="351" y="1110" on="0"/>
- <pt x="577" y="1110" on="1"/>
- <pt x="836" y="1110" on="0"/>
- <pt x="943" y="926" on="1"/>
- <pt x="1022" y="789" on="0"/>
- <pt x="1019" y="573" on="1"/>
- <pt x="1018" y="512" on="1"/>
- <pt x="293" y="512" on="1"/>
- <pt x="305" y="393" on="0"/>
- <pt x="332" y="331" on="1"/>
- <pt x="420" y="125" on="0"/>
- <pt x="683" y="125" on="1"/>
- <pt x="832" y="125" on="0"/>
- </contour>
- <contour>
- <pt x="236" y="1604" on="1"/>
- <pt x="359" y="1604" on="1"/>
- <pt x="380" y="1511" on="0"/>
- <pt x="434" y="1470" on="1"/>
- <pt x="486" y="1431" on="0"/>
- <pt x="569" y="1431" on="1"/>
- <pt x="663" y="1431" on="0"/>
- <pt x="717" y="1480" on="1"/>
- <pt x="760" y="1520" on="0"/>
- <pt x="779" y="1604" on="1"/>
- <pt x="902" y="1604" on="1"/>
- <pt x="885" y="1469" on="0"/>
- <pt x="813" y="1389" on="1"/>
- <pt x="718" y="1283" on="0"/>
- <pt x="569" y="1283" on="1"/>
- <pt x="412" y="1283" on="0"/>
- <pt x="317" y="1398" on="1"/>
- <pt x="253" y="1475" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 37 40 46 30 40 12 48 196 20 1 12 2 4 1 4 1 0 2 0 1 10 9 2
- 25 2 3 0 1 42 41 33 32 4 13 46 1 0 26 25 1 8 0 1 2 0 14 25 9
- 42 41 33 32 26 8 0 7 13 16 9 10 9 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ecaron" xMin="86" yMin="-25" xMax="1022" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ecircumflex" xMin="86" yMin="-25" xMax="1022" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="240" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edieresis" xMin="86" yMin="-25" xMax="1022" yMax="1456">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="241" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="edotaccent" xMin="86" yMin="-25" xMax="1022" yMax="1480">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="egrave" xMin="86" yMin="-25" xMax="1022" yMax="1604">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="143" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="eight" xMin="99" yMin="-37" xMax="1089" yMax="1517">
- <contour>
- <pt x="393" y="806" on="1"/>
- <pt x="295" y="877" on="0"/>
- <pt x="246" y="942" on="1"/>
- <pt x="176" y="1036" on="0"/>
- <pt x="176" y="1145" on="1"/>
- <pt x="176" y="1308" on="0"/>
- <pt x="299" y="1412" on="1"/>
- <pt x="422" y="1517" on="0"/>
- <pt x="620" y="1517" on="1"/>
- <pt x="804" y="1517" on="0"/>
- <pt x="917" y="1428" on="1"/>
- <pt x="1030" y="1340" on="0"/>
- <pt x="1030" y="1196" on="1"/>
- <pt x="1030" y="1067" on="0"/>
- <pt x="930" y="952" on="1"/>
- <pt x="869" y="883" on="0"/>
- <pt x="754" y="806" on="1"/>
- <pt x="904" y="729" on="0"/>
- <pt x="981" y="647" on="1"/>
- <pt x="1089" y="531" on="0"/>
- <pt x="1089" y="380" on="1"/>
- <pt x="1089" y="197" on="0"/>
- <pt x="948" y="80" on="1"/>
- <pt x="808" y="-37" on="0"/>
- <pt x="585" y="-37" on="1"/>
- <pt x="366" y="-37" on="0"/>
- <pt x="233" y="74" on="1"/>
- <pt x="99" y="185" on="0"/>
- <pt x="99" y="368" on="1"/>
- <pt x="99" y="528" on="0"/>
- <pt x="207" y="654" on="1"/>
- <pt x="271" y="730" on="0"/>
- </contour>
- <contour>
- <pt x="644" y="868" on="1"/>
- <pt x="851" y="1010" on="0"/>
- <pt x="851" y="1164" on="1"/>
- <pt x="851" y="1258" on="0"/>
- <pt x="783" y="1313" on="1"/>
- <pt x="715" y="1369" on="0"/>
- <pt x="599" y="1369" on="1"/>
- <pt x="489" y="1369" on="0"/>
- <pt x="422" y="1316" on="1"/>
- <pt x="355" y="1264" on="0"/>
- <pt x="355" y="1176" on="1"/>
- <pt x="355" y="1071" on="0"/>
- <pt x="468" y="982" on="1"/>
- <pt x="526" y="936" on="0"/>
- </contour>
- <contour>
- <pt x="500" y="726" on="1"/>
- <pt x="390" y="640" on="0"/>
- <pt x="346" y="577" on="1"/>
- <pt x="296" y="505" on="0"/>
- <pt x="296" y="397" on="1"/>
- <pt x="296" y="268" on="0"/>
- <pt x="378" y="190" on="1"/>
- <pt x="460" y="111" on="0"/>
- <pt x="595" y="111" on="1"/>
- <pt x="723" y="111" on="0"/>
- <pt x="804" y="178" on="1"/>
- <pt x="886" y="245" on="0"/>
- <pt x="886" y="352" on="1"/>
- <pt x="886" y="447" on="0"/>
- <pt x="823" y="512" on="1"/>
- <pt x="770" y="566" on="0"/>
- <pt x="640" y="643" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 51 values pushed */
- 0 0 54 40 24 38 40 8 48 196 24 2 8 0 1 1 46 32 16 0 4 0 2 3 0
- 0 14 0 0 58 43 20 50 41 28 42 14 4 34 14 12 48 196 46 32 28 20 16 12 4
- 0
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ellipsis" xMin="247" yMin="0" xMax="1802" yMax="197">
- <contour>
- <pt x="247" y="0" on="1"/>
- <pt x="247" y="197" on="1"/>
- <pt x="444" y="197" on="1"/>
- <pt x="444" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="926" y="0" on="1"/>
- <pt x="926" y="197" on="1"/>
- <pt x="1123" y="197" on="1"/>
- <pt x="1123" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1604" y="0" on="1"/>
- <pt x="1604" y="197" on="1"/>
- <pt x="1802" y="197" on="1"/>
- <pt x="1802" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 10 9 6 5 2 1 5 5 0 1 4 48 196 11 8 7 4 3 0 5 0 14 0
- 0 9 8 4 1 10 7 6 4 1 4 3 2 4 1 0 3 4 48 196 11 10 1 5 4
- 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="emacron" xMin="86" yMin="-25" xMax="1022" yMax="1431">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="emdash" xMin="99" yMin="543" xMax="1950" yMax="642">
- <contour>
- <pt x="99" y="543" on="1"/>
- <pt x="99" y="642" on="1"/>
- <pt x="1950" y="642" on="1"/>
- <pt x="1950" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 11 1 1 1 4 48 196 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="endash" xMin="101" yMin="543" xMax="1039" yMax="666">
- <contour>
- <pt x="101" y="543" on="1"/>
- <pt x="101" y="666" on="1"/>
- <pt x="1039" y="666" on="1"/>
- <pt x="1039" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 6 1 1 1 4 48 196 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eng" xMin="154" yMin="-420" xMax="997" yMax="1110">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="424" y="984" on="0"/>
- <pt x="495" y="1035" on="1"/>
- <pt x="598" y="1110" on="0"/>
- <pt x="721" y="1110" on="1"/>
- <pt x="997" y="1110" on="0"/>
- <pt x="997" y="780" on="1"/>
- <pt x="997" y="-92" on="1"/>
- <pt x="997" y="-420" on="0"/>
- <pt x="679" y="-420" on="1"/>
- <pt x="605" y="-420" on="0"/>
- <pt x="528" y="-399" on="1"/>
- <pt x="528" y="-245" on="1"/>
- <pt x="593" y="-272" on="0"/>
- <pt x="651" y="-272" on="1"/>
- <pt x="799" y="-272" on="0"/>
- <pt x="799" y="-55" on="1"/>
- <pt x="799" y="716" on="1"/>
- <pt x="799" y="847" on="0"/>
- <pt x="772" y="894" on="1"/>
- <pt x="744" y="941" on="0"/>
- <pt x="668" y="941" on="1"/>
- <pt x="506" y="941" on="0"/>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 24 30 7 17 40 12 48 196 7 1 26 20 9 3 4 1 0 3 19 15 14 10 4
- 13 12 0 27 0 1 0 2 1 1 14 0 0 20 19 4 1 9 27 26 3 2 4 3 0
- 2 4 48 196 10 9 1 15 14 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eogonek" xMin="86" yMin="-370" xMax="1022" yMax="1110">
- <component glyphName="e" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="356" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="equal" xMin="104" yMin="333" xMax="1091" yMax="851">
- <contour>
- <pt x="104" y="333" on="1"/>
- <pt x="104" y="481" on="1"/>
- <pt x="1091" y="481" on="1"/>
- <pt x="1091" y="333" on="1"/>
- </contour>
- <contour>
- <pt x="104" y="703" on="1"/>
- <pt x="104" y="851" on="1"/>
- <pt x="1091" y="851" on="1"/>
- <pt x="1091" y="703" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 0 0 7 4 7 1 5 2 1 7 1 0 2 4 48 196 6 5 1 3 0 1 2 0 14
- 7 6 3 2 3 5 4 1 0 3 2 0
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="estimated" xMin="86" yMin="-25" xMax="1022" yMax="1110">
- <contour>
- <pt x="818" y="660" on="1"/>
- <pt x="815" y="758" on="0"/>
- <pt x="798" y="809" on="1"/>
- <pt x="746" y="963" on="0"/>
- <pt x="572" y="963" on="1"/>
- <pt x="451" y="963" on="0"/>
- <pt x="381" y="891" on="1"/>
- <pt x="313" y="822" on="0"/>
- <pt x="296" y="660" on="1"/>
- </contour>
- <contour>
- <pt x="1013" y="191" on="1"/>
- <pt x="1013" y="35" on="1"/>
- <pt x="810" y="-25" on="0"/>
- <pt x="641" y="-25" on="1"/>
- <pt x="386" y="-25" on="0"/>
- <pt x="236" y="133" on="1"/>
- <pt x="86" y="291" on="0"/>
- <pt x="86" y="557" on="1"/>
- <pt x="86" y="810" on="0"/>
- <pt x="219" y="960" on="1"/>
- <pt x="351" y="1110" on="0"/>
- <pt x="577" y="1110" on="1"/>
- <pt x="836" y="1110" on="0"/>
- <pt x="943" y="926" on="1"/>
- <pt x="1022" y="789" on="0"/>
- <pt x="1019" y="573" on="1"/>
- <pt x="1018" y="512" on="1"/>
- <pt x="293" y="512" on="1"/>
- <pt x="305" y="393" on="0"/>
- <pt x="332" y="331" on="1"/>
- <pt x="420" y="125" on="0"/>
- <pt x="683" y="125" on="1"/>
- <pt x="832" y="125" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 30 40 12 48 196 20 1 12 2 4 1 4 1 0 2 0 1 10 9 2 25 2 3
- 0 26 25 1 8 0 1 2 0 14 25 9 26 8 0 3 13 16 9 10 9 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="eth" xMin="86" yMin="-25" xMax="1052" yMax="1676">
- <contour>
- <pt x="126" y="1434" on="1"/>
- <pt x="126" y="1583" on="1"/>
- <pt x="326" y="1583" on="0"/>
- <pt x="488" y="1507" on="1"/>
- <pt x="642" y="1676" on="1"/>
- <pt x="721" y="1588" on="1"/>
- <pt x="591" y="1445" on="1"/>
- <pt x="716" y="1349" on="0"/>
- <pt x="783" y="1274" on="1"/>
- <pt x="1052" y="975" on="0"/>
- <pt x="1052" y="550" on="1"/>
- <pt x="1052" y="281" on="0"/>
- <pt x="924" y="128" on="1"/>
- <pt x="796" y="-25" on="0"/>
- <pt x="575" y="-25" on="1"/>
- <pt x="351" y="-25" on="0"/>
- <pt x="219" y="127" on="1"/>
- <pt x="86" y="279" on="0"/>
- <pt x="86" y="535" on="1"/>
- <pt x="86" y="793" on="0"/>
- <pt x="216" y="939" on="1"/>
- <pt x="345" y="1086" on="0"/>
- <pt x="570" y="1086" on="1"/>
- <pt x="624" y="1086" on="0"/>
- <pt x="690" y="1072" on="1"/>
- <pt x="613" y="1217" on="0"/>
- <pt x="473" y="1316" on="1"/>
- <pt x="324" y="1152" on="1"/>
- <pt x="245" y="1239" on="1"/>
- <pt x="373" y="1380" on="1"/>
- <pt x="271" y="1434" on="0"/>
- </contour>
- <contour>
- <pt x="566" y="938" on="1"/>
- <pt x="439" y="938" on="0"/>
- <pt x="368" y="832" on="1"/>
- <pt x="296" y="726" on="0"/>
- <pt x="296" y="531" on="1"/>
- <pt x="296" y="123" on="0"/>
- <pt x="570" y="123" on="1"/>
- <pt x="842" y="123" on="0"/>
- <pt x="842" y="530" on="1"/>
- <pt x="842" y="938" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 37 40 14 31 40 22 48 196 22 1 14 2 1 1 29 28 27 26 6 0 6 0 1
- 3 0 0 1 1 24 1 2 2 0 0 1 5 4 3 1 4 13 0 0 14 0 0 39 9
- 10 35 9 18 48 196 29 28 27 26 24 6 5 4 3 9 13 10 0 18 0 1 0 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclam" xMin="186" yMin="0" xMax="383" yMax="1480">
- <contour>
- <pt x="186" y="0" on="1"/>
- <pt x="186" y="197" on="1"/>
- <pt x="383" y="197" on="1"/>
- <pt x="383" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="211" y="395" on="1"/>
- <pt x="186" y="1184" on="1"/>
- <pt x="186" y="1480" on="1"/>
- <pt x="383" y="1480" on="1"/>
- <pt x="383" y="1184" on="1"/>
- <pt x="359" y="395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 8 5 2 6 4 3 0 0 2 1 5 1 0 1 4 48 196 9 4 1 3 0 1 2 0
- 7 6 0 14 9 4 2 2 0 3 0 0 8 7 3 2 4 3 0 1 4 48 196 6 5
- 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="exclamdown" xMin="242" yMin="-395" xMax="439" yMax="1086">
- <contour>
- <pt x="439" y="1086" on="1"/>
- <pt x="439" y="888" on="1"/>
- <pt x="242" y="888" on="1"/>
- <pt x="242" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="415" y="691" on="1"/>
- <pt x="439" y="-99" on="1"/>
- <pt x="439" y="-395" on="1"/>
- <pt x="242" y="-395" on="1"/>
- <pt x="242" y="-99" on="1"/>
- <pt x="267" y="691" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 1 8 5 2 2 6 3 0 0 0 2 1 5 1 0 1 4 48 196 9 4 1 7 6 1
- 2 0 3 0 1 14 9 4 2 0 2 3 0 0 6 5 1 0 4 3 2 1 4 48 196
- 8 7 3 2 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="f" xMin="31" yMin="0" xMax="630" yMax="1604">
- <contour>
- <pt x="175" y="0" on="1"/>
- <pt x="175" y="938" on="1"/>
- <pt x="31" y="938" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="175" y="1086" on="1"/>
- <pt x="175" y="1216" on="1"/>
- <pt x="175" y="1604" on="0"/>
- <pt x="483" y="1604" on="1"/>
- <pt x="548" y="1604" on="0"/>
- <pt x="630" y="1578" on="1"/>
- <pt x="630" y="1421" on="1"/>
- <pt x="556" y="1456" on="0"/>
- <pt x="504" y="1456" on="1"/>
- <pt x="431" y="1456" on="0"/>
- <pt x="402" y="1407" on="1"/>
- <pt x="373" y="1359" on="0"/>
- <pt x="373" y="1237" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="568" y="1086" on="1"/>
- <pt x="568" y="938" on="1"/>
- <pt x="373" y="938" on="1"/>
- <pt x="373" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 12 40 7 48 196 16 10 9 5 4 13 7 3 0 0 20 19 2 1 7 3 3 1
- 4 48 196 21 0 1 0 18 17 4 3 1 3 14 0 0 21 20 17 16 4 3 0 1 4
- 48 196 10 9 1 19 18 1 5 4 1 0 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi" xMin="31" yMin="0" xMax="896" yMax="1604">
- <contour>
- <pt x="175" y="0" on="1"/>
- <pt x="175" y="938" on="1"/>
- <pt x="31" y="938" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="175" y="1086" on="1"/>
- <pt x="175" y="1216" on="1"/>
- <pt x="175" y="1604" on="0"/>
- <pt x="483" y="1604" on="1"/>
- <pt x="548" y="1604" on="0"/>
- <pt x="630" y="1578" on="1"/>
- <pt x="630" y="1421" on="1"/>
- <pt x="556" y="1456" on="0"/>
- <pt x="504" y="1456" on="1"/>
- <pt x="431" y="1456" on="0"/>
- <pt x="402" y="1407" on="1"/>
- <pt x="373" y="1359" on="0"/>
- <pt x="373" y="1237" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="896" y="1086" on="1"/>
- <pt x="896" y="0" on="1"/>
- <pt x="699" y="0" on="1"/>
- <pt x="699" y="938" on="1"/>
- <pt x="373" y="938" on="1"/>
- <pt x="373" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="699" y="1283" on="1"/>
- <pt x="699" y="1480" on="1"/>
- <pt x="896" y="1480" on="1"/>
- <pt x="896" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 12 40 7 48 196 10 25 24 2 16 5 2 24 3 3 9 7 25 0 0 27 24 5
- 1 25 22 21 2 1 7 3 3 2 4 48 196 23 20 19 0 3 0 26 25 0 18 17 4
- 3 1 3 14 0 0 25 24 21 20 4 3 18 23 22 17 16 4 3 0 2 4 48 196 27
- 26 19 18 3 10 9 1 5 4 1 0 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fi#1" xMin="31" yMin="0" xMax="896" yMax="1604">
- <contour>
- <pt x="175" y="0" on="1"/>
- <pt x="175" y="938" on="1"/>
- <pt x="31" y="938" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="175" y="1086" on="1"/>
- <pt x="175" y="1216" on="1"/>
- <pt x="175" y="1604" on="0"/>
- <pt x="483" y="1604" on="1"/>
- <pt x="548" y="1604" on="0"/>
- <pt x="630" y="1578" on="1"/>
- <pt x="630" y="1421" on="1"/>
- <pt x="556" y="1456" on="0"/>
- <pt x="504" y="1456" on="1"/>
- <pt x="431" y="1456" on="0"/>
- <pt x="402" y="1407" on="1"/>
- <pt x="373" y="1359" on="0"/>
- <pt x="373" y="1237" on="1"/>
- <pt x="373" y="1086" on="1"/>
- <pt x="896" y="1086" on="1"/>
- <pt x="896" y="0" on="1"/>
- <pt x="699" y="0" on="1"/>
- <pt x="699" y="938" on="1"/>
- <pt x="373" y="938" on="1"/>
- <pt x="373" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="699" y="1283" on="1"/>
- <pt x="699" y="1480" on="1"/>
- <pt x="896" y="1480" on="1"/>
- <pt x="896" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 12 40 7 48 196 10 25 24 2 16 5 2 24 3 3 9 7 25 0 0 27 24 5
- 1 25 22 21 2 1 7 3 3 2 4 48 196 23 20 19 0 3 0 26 25 0 18 17 4
- 3 1 3 14 0 0 25 24 21 20 4 3 18 23 22 17 16 4 3 0 2 4 48 196 27
- 26 19 18 3 10 9 1 5 4 1 0 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="figuredash" xMin="101" yMin="543" xMax="1039" yMax="666">
- <contour>
- <pt x="101" y="543" on="1"/>
- <pt x="101" y="666" on="1"/>
- <pt x="1039" y="666" on="1"/>
- <pt x="1039" y="543" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 0 0 3 0 6 1 1 1 4 48 196 2 1 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="five" xMin="163" yMin="-37" xMax="966" yMax="1480">
- <contour>
- <pt x="163" y="-6" on="1"/>
- <pt x="163" y="170" on="1"/>
- <pt x="315" y="111" on="0"/>
- <pt x="442" y="111" on="1"/>
- <pt x="589" y="111" on="0"/>
- <pt x="672" y="197" on="1"/>
- <pt x="756" y="284" on="0"/>
- <pt x="756" y="431" on="1"/>
- <pt x="756" y="767" on="0"/>
- <pt x="300" y="767" on="1"/>
- <pt x="245" y="767" on="0"/>
- <pt x="188" y="760" on="1"/>
- <pt x="188" y="1480" on="1"/>
- <pt x="936" y="1480" on="1"/>
- <pt x="936" y="1308" on="1"/>
- <pt x="361" y="1308" on="1"/>
- <pt x="361" y="918" on="1"/>
- <pt x="625" y="914" on="0"/>
- <pt x="775" y="811" on="1"/>
- <pt x="966" y="679" on="0"/>
- <pt x="966" y="424" on="1"/>
- <pt x="966" y="208" on="0"/>
- <pt x="821" y="86" on="1"/>
- <pt x="675" y="-37" on="0"/>
- <pt x="420" y="-37" on="1"/>
- <pt x="310" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 3 40 24 48 196 24 2 9 1 16 11 9 1 4 14 2 3 0 1 0 2 0 0
- 0 15 14 13 1 12 1 4 48 196 13 12 0 14 0 0 7 9 20 48 196 20 13 0 0
- 16 15 13 1 11 1 4 48 196 14 13 1 12 11 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl" xMin="31" yMin="0" xMax="896" yMax="1604">
- <contour>
- <pt x="175" y="0" on="1"/>
- <pt x="175" y="938" on="1"/>
- <pt x="31" y="938" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="175" y="1086" on="1"/>
- <pt x="175" y="1216" on="1"/>
- <pt x="175" y="1604" on="0"/>
- <pt x="478" y="1604" on="1"/>
- <pt x="698" y="1579" on="1"/>
- <pt x="896" y="1579" on="1"/>
- <pt x="896" y="0" on="1"/>
- <pt x="698" y="0" on="1"/>
- <pt x="698" y="1431" on="1"/>
- <pt x="657" y="1439" on="1"/>
- <pt x="571" y="1456" on="0"/>
- <pt x="512" y="1456" on="1"/>
- <pt x="423" y="1456" on="0"/>
- <pt x="395" y="1396" on="1"/>
- <pt x="372" y="1346" on="0"/>
- <pt x="372" y="1237" on="1"/>
- <pt x="372" y="1086" on="1"/>
- <pt x="550" y="1086" on="1"/>
- <pt x="550" y="938" on="1"/>
- <pt x="372" y="938" on="1"/>
- <pt x="372" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 15 40 7 48 196 19 12 5 3 8 3 3 7 8 0 0 23 22 2 1 7 3 3
- 1 4 48 196 9 8 1 24 11 10 0 3 2 0 21 20 4 3 1 3 14 0 0 12 11
- 8 4 2 9 24 23 20 19 4 3 0 2 4 48 196 10 9 1 22 21 1 5 4 1 0
- 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fl#1" xMin="31" yMin="0" xMax="896" yMax="1604">
- <contour>
- <pt x="175" y="0" on="1"/>
- <pt x="175" y="938" on="1"/>
- <pt x="31" y="938" on="1"/>
- <pt x="31" y="1086" on="1"/>
- <pt x="175" y="1086" on="1"/>
- <pt x="175" y="1216" on="1"/>
- <pt x="175" y="1604" on="0"/>
- <pt x="478" y="1604" on="1"/>
- <pt x="698" y="1579" on="1"/>
- <pt x="896" y="1579" on="1"/>
- <pt x="896" y="0" on="1"/>
- <pt x="698" y="0" on="1"/>
- <pt x="698" y="1431" on="1"/>
- <pt x="657" y="1439" on="1"/>
- <pt x="571" y="1456" on="0"/>
- <pt x="512" y="1456" on="1"/>
- <pt x="423" y="1456" on="0"/>
- <pt x="395" y="1396" on="1"/>
- <pt x="372" y="1346" on="0"/>
- <pt x="372" y="1237" on="1"/>
- <pt x="372" y="1086" on="1"/>
- <pt x="550" y="1086" on="1"/>
- <pt x="550" y="938" on="1"/>
- <pt x="372" y="938" on="1"/>
- <pt x="372" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 81 values pushed */
- 0 0 15 40 7 48 196 19 12 5 3 8 3 3 7 8 0 0 23 22 2 1 7 3 3
- 1 4 48 196 9 8 1 24 11 10 0 3 2 0 21 20 4 3 1 3 14 0 0 12 11
- 8 4 2 9 24 23 20 19 4 3 0 2 4 48 196 10 9 1 22 21 1 5 4 1 0
- 3 3 2 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="florin" xMin="49" yMin="-296" xMax="1025" yMax="1517">
- <contour>
- <pt x="49" y="-296" on="1"/>
- <pt x="250" y="716" on="1"/>
- <pt x="84" y="716" on="1"/>
- <pt x="84" y="864" on="1"/>
- <pt x="280" y="864" on="1"/>
- <pt x="301" y="969" on="1"/>
- <pt x="411" y="1517" on="0"/>
- <pt x="799" y="1517" on="1"/>
- <pt x="903" y="1517" on="0"/>
- <pt x="1025" y="1489" on="1"/>
- <pt x="995" y="1332" on="1"/>
- <pt x="885" y="1370" on="0"/>
- <pt x="798" y="1370" on="1"/>
- <pt x="582" y="1370" on="0"/>
- <pt x="520" y="1060" on="1"/>
- <pt x="481" y="864" on="1"/>
- <pt x="670" y="864" on="1"/>
- <pt x="670" y="716" on="1"/>
- <pt x="451" y="716" on="1"/>
- <pt x="250" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 67 values pushed */
- 0 0 12 40 7 48 196 7 0 1 10 0 3 2 0 1 9 0 0 0 0 18 17 2 1
- 7 3 3 1 4 48 196 16 15 4 3 3 19 0 1 2 0 14 19 18 15 4 1 5 16
- 2 3 10 9 2 13 16 0 2 17 16 1 3 2 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="four" xMin="31" yMin="0" xMax="1071" yMax="1480">
- <contour>
- <pt x="688" y="0" on="1"/>
- <pt x="688" y="419" on="1"/>
- <pt x="31" y="419" on="1"/>
- <pt x="31" y="568" on="1"/>
- <pt x="688" y="1480" on="1"/>
- <pt x="873" y="1480" on="1"/>
- <pt x="873" y="580" on="1"/>
- <pt x="1071" y="580" on="1"/>
- <pt x="1071" y="419" on="1"/>
- <pt x="873" y="419" on="1"/>
- <pt x="873" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="224" y="580" on="1"/>
- <pt x="701" y="580" on="1"/>
- <pt x="701" y="1238" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 69 values pushed */
- 13 4 6 2 3 6 1 2 0 0 12 11 7 6 15 3 1 1 4 48 196 9 8 2 1
- 3 10 0 1 2 0 5 4 0 14 11 0 2 2 0 0 4 1 0 24 2 5 13 12 13
- 1 5 2 4 48 196 8 7 1 10 9 6 5 3 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="foursuperiour" xMin="3" yMin="592" xMax="669" yMax="1480">
- <contour>
- <pt x="410" y="592" on="1"/>
- <pt x="410" y="834" on="1"/>
- <pt x="3" y="834" on="1"/>
- <pt x="3" y="948" on="1"/>
- <pt x="406" y="1480" on="1"/>
- <pt x="546" y="1480" on="1"/>
- <pt x="546" y="951" on="1"/>
- <pt x="669" y="951" on="1"/>
- <pt x="669" y="834" on="1"/>
- <pt x="546" y="834" on="1"/>
- <pt x="546" y="592" on="1"/>
- </contour>
- <contour>
- <pt x="132" y="951" on="1"/>
- <pt x="410" y="951" on="1"/>
- <pt x="410" y="1315" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 13 4 6 2 3 6 1 2 10 0 1 0 0 9 8 2 1 38 3 6 1 4 48 196 5
- 4 1 12 11 7 6 3 2 0 14 8 7 2 13 5 11 4 3 2 4 13 0 0 0 13
- 12 1 0 22 3 5 1 4 48 196 10 9 6 5 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction" xMin="-441" yMin="-37" xMax="782" yMax="1517">
- <contour>
- <pt x="-441" y="-37" on="1"/>
- <pt x="647" y="1517" on="1"/>
- <pt x="782" y="1517" on="1"/>
- <pt x="-305" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="fraction#1" xMin="-441" yMin="-37" xMax="782" yMax="1517">
- <contour>
- <pt x="-441" y="-37" on="1"/>
- <pt x="647" y="1517" on="1"/>
- <pt x="782" y="1517" on="1"/>
- <pt x="-305" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 9 values pushed */
- 3 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="g" xMin="93" yMin="-420" xMax="991" yMax="1110">
- <contour>
- <pt x="794" y="432" on="1"/>
- <pt x="794" y="937" on="1"/>
- <pt x="653" y="962" on="0"/>
- <pt x="591" y="962" on="1"/>
- <pt x="306" y="962" on="0"/>
- <pt x="306" y="574" on="1"/>
- <pt x="306" y="401" on="0"/>
- <pt x="362" y="299" on="1"/>
- <pt x="418" y="197" on="0"/>
- <pt x="511" y="197" on="1"/>
- <pt x="637" y="197" on="0"/>
- </contour>
- <contour>
- <pt x="794" y="253" on="1"/>
- <pt x="739" y="151" on="0"/>
- <pt x="677" y="99" on="1"/>
- <pt x="588" y="25" on="0"/>
- <pt x="470" y="25" on="1"/>
- <pt x="302" y="25" on="0"/>
- <pt x="198" y="171" on="1"/>
- <pt x="93" y="316" on="0"/>
- <pt x="93" y="551" on="1"/>
- <pt x="93" y="817" on="0"/>
- <pt x="227" y="963" on="1"/>
- <pt x="361" y="1110" on="0"/>
- <pt x="603" y="1110" on="1"/>
- <pt x="697" y="1110" on="0"/>
- <pt x="794" y="1086" on="1"/>
- <pt x="991" y="1086" on="1"/>
- <pt x="991" y="296" on="1"/>
- <pt x="991" y="40" on="0"/>
- <pt x="964" y="-82" on="1"/>
- <pt x="891" y="-420" on="0"/>
- <pt x="463" y="-420" on="1"/>
- <pt x="283" y="-420" on="0"/>
- <pt x="100" y="-361" on="1"/>
- <pt x="100" y="-190" on="1"/>
- <pt x="315" y="-271" on="0"/>
- <pt x="462" y="-271" on="1"/>
- <pt x="794" y="-271" on="0"/>
- <pt x="794" y="82" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 0 0 36 40 31 48 196 23 1 15 2 9 3 1 38 27 11 9 3 1 0 7 25 2 3
- 0 1 34 33 31 2 0 26 25 1 14 5 5 0 33 2 19 33 27 26 1 34 33 1 38
- 25 11 1 0 4 3 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gbreve" xMin="93" yMin="-420" xMax="991" yMax="1604">
- <component glyphName="g" x="0" y="0" flags="0x4"/>
- <component glyphName="breve" x="258" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="gcircumflex" xMin="93" yMin="-420" xMax="991" yMax="1604">
- <contour>
- <pt x="794" y="432" on="1"/>
- <pt x="794" y="937" on="1"/>
- <pt x="653" y="962" on="0"/>
- <pt x="591" y="962" on="1"/>
- <pt x="306" y="962" on="0"/>
- <pt x="306" y="574" on="1"/>
- <pt x="306" y="401" on="0"/>
- <pt x="362" y="299" on="1"/>
- <pt x="418" y="197" on="0"/>
- <pt x="511" y="197" on="1"/>
- <pt x="637" y="197" on="0"/>
- </contour>
- <contour>
- <pt x="794" y="253" on="1"/>
- <pt x="739" y="151" on="0"/>
- <pt x="677" y="99" on="1"/>
- <pt x="588" y="25" on="0"/>
- <pt x="470" y="25" on="1"/>
- <pt x="302" y="25" on="0"/>
- <pt x="198" y="171" on="1"/>
- <pt x="93" y="316" on="0"/>
- <pt x="93" y="551" on="1"/>
- <pt x="93" y="817" on="0"/>
- <pt x="227" y="963" on="1"/>
- <pt x="361" y="1110" on="0"/>
- <pt x="603" y="1110" on="1"/>
- <pt x="697" y="1110" on="0"/>
- <pt x="794" y="1086" on="1"/>
- <pt x="991" y="1086" on="1"/>
- <pt x="991" y="296" on="1"/>
- <pt x="991" y="40" on="0"/>
- <pt x="964" y="-82" on="1"/>
- <pt x="891" y="-420" on="0"/>
- <pt x="463" y="-420" on="1"/>
- <pt x="283" y="-420" on="0"/>
- <pt x="100" y="-361" on="1"/>
- <pt x="100" y="-190" on="1"/>
- <pt x="315" y="-271" on="0"/>
- <pt x="462" y="-271" on="1"/>
- <pt x="794" y="-271" on="0"/>
- <pt x="794" y="82" on="1"/>
- </contour>
- <contour>
- <pt x="249" y="1283" on="1"/>
- <pt x="490" y="1604" on="1"/>
- <pt x="708" y="1604" on="1"/>
- <pt x="949" y="1283" on="1"/>
- <pt x="801" y="1283" on="1"/>
- <pt x="600" y="1485" on="1"/>
- <pt x="598" y="1485" on="1"/>
- <pt x="397" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 86 values pushed */
- 0 0 36 40 31 48 196 23 1 15 2 45 44 2 40 39 3 9 3 1 38 27 11 9 3
- 1 0 7 25 2 3 0 1 34 33 31 2 0 41 40 1 46 43 42 39 3 2 0 26 25
- 1 14 43 42 2 26 0 3 5 46 45 44 41 40 39 5 7 0 33 3 19 33 27 26 1
- 34 33 1 38 25 11 1 0 4 3 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MDAP[1]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gcommaaccent" xMin="93" yMin="-420" xMax="991" yMax="1737">
- <contour>
- <pt x="794" y="432" on="1"/>
- <pt x="794" y="937" on="1"/>
- <pt x="653" y="962" on="0"/>
- <pt x="591" y="962" on="1"/>
- <pt x="306" y="962" on="0"/>
- <pt x="306" y="574" on="1"/>
- <pt x="306" y="401" on="0"/>
- <pt x="362" y="299" on="1"/>
- <pt x="418" y="197" on="0"/>
- <pt x="511" y="197" on="1"/>
- <pt x="637" y="197" on="0"/>
- </contour>
- <contour>
- <pt x="794" y="253" on="1"/>
- <pt x="739" y="151" on="0"/>
- <pt x="677" y="99" on="1"/>
- <pt x="588" y="25" on="0"/>
- <pt x="470" y="25" on="1"/>
- <pt x="302" y="25" on="0"/>
- <pt x="198" y="171" on="1"/>
- <pt x="93" y="316" on="0"/>
- <pt x="93" y="551" on="1"/>
- <pt x="93" y="817" on="0"/>
- <pt x="227" y="963" on="1"/>
- <pt x="361" y="1110" on="0"/>
- <pt x="603" y="1110" on="1"/>
- <pt x="697" y="1110" on="0"/>
- <pt x="794" y="1086" on="1"/>
- <pt x="991" y="1086" on="1"/>
- <pt x="991" y="296" on="1"/>
- <pt x="991" y="40" on="0"/>
- <pt x="964" y="-82" on="1"/>
- <pt x="891" y="-420" on="0"/>
- <pt x="463" y="-420" on="1"/>
- <pt x="283" y="-420" on="0"/>
- <pt x="100" y="-361" on="1"/>
- <pt x="100" y="-190" on="1"/>
- <pt x="315" y="-271" on="0"/>
- <pt x="462" y="-271" on="1"/>
- <pt x="794" y="-271" on="0"/>
- <pt x="794" y="82" on="1"/>
- </contour>
- <contour>
- <pt x="686" y="1737" on="1"/>
- <pt x="686" y="1678" on="1"/>
- <pt x="609" y="1657" on="0"/>
- <pt x="609" y="1497" on="1"/>
- <pt x="609" y="1480" on="1"/>
- <pt x="686" y="1480" on="1"/>
- <pt x="686" y="1283" on="1"/>
- <pt x="488" y="1283" on="1"/>
- <pt x="488" y="1454" on="1"/>
- <pt x="489" y="1716" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 92 values pushed */
- 0 0 36 40 31 48 196 23 1 15 2 9 3 1 38 27 11 9 3 1 0 7 25 2 3
- 0 47 44 43 42 40 39 6 13 45 1 34 33 31 2 0 46 45 1 0 26 25 1 14 43
- 42 2 39 46 3 5 5 46 33 2 19 33 0 0 45 44 40 39 4 3 46 1 4 48 196
- 47 46 1 27 26 1 34 33 1 38 25 11 1 0 4 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="gdotaccent" xMin="93" yMin="-420" xMax="991" yMax="1480">
- <contour>
- <pt x="794" y="432" on="1"/>
- <pt x="794" y="937" on="1"/>
- <pt x="653" y="962" on="0"/>
- <pt x="591" y="962" on="1"/>
- <pt x="306" y="962" on="0"/>
- <pt x="306" y="574" on="1"/>
- <pt x="306" y="401" on="0"/>
- <pt x="362" y="299" on="1"/>
- <pt x="418" y="197" on="0"/>
- <pt x="511" y="197" on="1"/>
- <pt x="637" y="197" on="0"/>
- </contour>
- <contour>
- <pt x="794" y="253" on="1"/>
- <pt x="739" y="151" on="0"/>
- <pt x="677" y="99" on="1"/>
- <pt x="588" y="25" on="0"/>
- <pt x="470" y="25" on="1"/>
- <pt x="302" y="25" on="0"/>
- <pt x="198" y="171" on="1"/>
- <pt x="93" y="316" on="0"/>
- <pt x="93" y="551" on="1"/>
- <pt x="93" y="817" on="0"/>
- <pt x="227" y="963" on="1"/>
- <pt x="361" y="1110" on="0"/>
- <pt x="603" y="1110" on="1"/>
- <pt x="697" y="1110" on="0"/>
- <pt x="794" y="1086" on="1"/>
- <pt x="991" y="1086" on="1"/>
- <pt x="991" y="296" on="1"/>
- <pt x="991" y="40" on="0"/>
- <pt x="964" y="-82" on="1"/>
- <pt x="891" y="-420" on="0"/>
- <pt x="463" y="-420" on="1"/>
- <pt x="283" y="-420" on="0"/>
- <pt x="100" y="-361" on="1"/>
- <pt x="100" y="-190" on="1"/>
- <pt x="315" y="-271" on="0"/>
- <pt x="462" y="-271" on="1"/>
- <pt x="794" y="-271" on="0"/>
- <pt x="794" y="82" on="1"/>
- </contour>
- <contour>
- <pt x="488" y="1283" on="1"/>
- <pt x="488" y="1480" on="1"/>
- <pt x="685" y="1480" on="1"/>
- <pt x="685" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 36 40 31 48 196 23 1 15 2 9 3 1 38 27 11 9 3 1 0 7 25 2 3
- 0 1 34 33 31 2 0 0 0 42 39 5 1 40 1 4 48 196 41 40 0 26 25 1 14
- 5 5 39 33 2 19 33 0 0 42 41 4 1 39 1 4 48 196 40 39 1 27 26 1 34
- 33 1 38 25 11 1 0 4 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="germandbls" xMin="129" yMin="-25" xMax="1165" yMax="1604">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1151" on="1"/>
- <pt x="129" y="1406" on="0"/>
- <pt x="220" y="1505" on="1"/>
- <pt x="313" y="1604" on="0"/>
- <pt x="549" y="1604" on="1"/>
- <pt x="930" y="1604" on="0"/>
- <pt x="930" y="1333" on="1"/>
- <pt x="930" y="1203" on="0"/>
- <pt x="800" y="1063" on="1"/>
- <pt x="697" y="951" on="0"/>
- <pt x="697" y="899" on="1"/>
- <pt x="697" y="831" on="0"/>
- <pt x="808" y="749" on="1"/>
- <pt x="993" y="612" on="1"/>
- <pt x="1165" y="485" on="0"/>
- <pt x="1165" y="295" on="1"/>
- <pt x="1165" y="-25" on="0"/>
- <pt x="789" y="-25" on="1"/>
- <pt x="624" y="-25" on="0"/>
- <pt x="487" y="30" on="1"/>
- <pt x="487" y="202" on="1"/>
- <pt x="674" y="123" on="0"/>
- <pt x="789" y="123" on="1"/>
- <pt x="980" y="123" on="0"/>
- <pt x="980" y="276" on="1"/>
- <pt x="980" y="377" on="0"/>
- <pt x="865" y="465" on="1"/>
- <pt x="650" y="629" on="1"/>
- <pt x="521" y="727" on="0"/>
- <pt x="521" y="841" on="1"/>
- <pt x="521" y="936" on="0"/>
- <pt x="635" y="1084" on="1"/>
- <pt x="733" y="1212" on="0"/>
- <pt x="733" y="1299" on="1"/>
- <pt x="733" y="1456" on="0"/>
- <pt x="536" y="1456" on="1"/>
- <pt x="419" y="1456" on="0"/>
- <pt x="372" y="1407" on="1"/>
- <pt x="326" y="1358" on="0"/>
- <pt x="326" y="1234" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 0 0 36 40 5 23 40 18 48 196 18 2 40 21 20 1 4 13 5 0 41 0 1 0 14
- 0 0 34 41 7 25 14 16 11 14 30 48 196 30 16 7 3 12 20 0 0 41 40 4 1
- 0 1 4 48 196 21 20 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="grave" xMin="106" yMin="1283" xMax="575" yMax="1604">
- <contour>
- <pt x="575" y="1283" on="1"/>
- <pt x="427" y="1283" on="1"/>
- <pt x="106" y="1604" on="1"/>
- <pt x="334" y="1604" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 3 2 1 1 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="greater" xMin="104" yMin="99" xMax="1091" yMax="1086">
- <contour>
- <pt x="104" y="1086" on="1"/>
- <pt x="1091" y="592" on="1"/>
- <pt x="104" y="99" on="1"/>
- <pt x="104" y="264" on="1"/>
- <pt x="758" y="591" on="1"/>
- <pt x="758" y="593" on="1"/>
- <pt x="104" y="920" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 6 5 4 3 2 1 0 14 5 4 1 3 13 0 6 3 2 0 3 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotleft" xMin="115" yMin="99" xMax="1003" yMax="987">
- <contour>
- <pt x="1003" y="913" on="1"/>
- <pt x="707" y="543" on="1"/>
- <pt x="1003" y="173" on="1"/>
- <pt x="905" y="99" on="1"/>
- <pt x="510" y="543" on="1"/>
- <pt x="905" y="987" on="1"/>
- </contour>
- <contour>
- <pt x="608" y="913" on="1"/>
- <pt x="312" y="543" on="1"/>
- <pt x="608" y="173" on="1"/>
- <pt x="510" y="99" on="1"/>
- <pt x="115" y="543" on="1"/>
- <pt x="510" y="987" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guillemotright" xMin="136" yMin="99" xMax="1024" yMax="987">
- <contour>
- <pt x="136" y="173" on="1"/>
- <pt x="432" y="543" on="1"/>
- <pt x="136" y="913" on="1"/>
- <pt x="235" y="987" on="1"/>
- <pt x="629" y="543" on="1"/>
- <pt x="235" y="99" on="1"/>
- </contour>
- <contour>
- <pt x="531" y="173" on="1"/>
- <pt x="827" y="543" on="1"/>
- <pt x="531" y="913" on="1"/>
- <pt x="629" y="987" on="1"/>
- <pt x="1024" y="543" on="1"/>
- <pt x="629" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 11 10 9 8 7 6 5 4 3 2 1 0 14 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglleft" xMin="74" yMin="99" xMax="567" yMax="987">
- <contour>
- <pt x="567" y="913" on="1"/>
- <pt x="271" y="543" on="1"/>
- <pt x="567" y="173" on="1"/>
- <pt x="469" y="99" on="1"/>
- <pt x="74" y="543" on="1"/>
- <pt x="469" y="987" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="guilsinglright" xMin="114" yMin="99" xMax="607" yMax="987">
- <contour>
- <pt x="114" y="173" on="1"/>
- <pt x="410" y="543" on="1"/>
- <pt x="114" y="913" on="1"/>
- <pt x="213" y="987" on="1"/>
- <pt x="607" y="543" on="1"/>
- <pt x="213" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 5 4 3 2 1 0 14 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="h" xMin="154" yMin="0" xMax="997" yMax="1579">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="424" y="983" on="0"/>
- <pt x="495" y="1035" on="1"/>
- <pt x="598" y="1110" on="0"/>
- <pt x="721" y="1110" on="1"/>
- <pt x="997" y="1110" on="0"/>
- <pt x="997" y="780" on="1"/>
- <pt x="997" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="799" y="716" on="1"/>
- <pt x="799" y="848" on="0"/>
- <pt x="772" y="894" on="1"/>
- <pt x="744" y="941" on="0"/>
- <pt x="668" y="941" on="1"/>
- <pt x="506" y="941" on="0"/>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 56 values pushed */
- 0 0 16 30 7 48 196 7 1 1 18 12 9 3 4 1 0 3 0 2 1 1 19 11 10
- 0 3 2 0 14 0 0 12 11 4 1 9 19 18 3 2 4 3 0 2 4 48 196 10 9
- 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hbar" xMin="6" yMin="0" xMax="997" yMax="1579">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1258" on="1"/>
- <pt x="6" y="1258" on="1"/>
- <pt x="6" y="1382" on="1"/>
- <pt x="154" y="1382" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- <pt x="351" y="1382" on="1"/>
- <pt x="647" y="1382" on="1"/>
- <pt x="647" y="1258" on="1"/>
- <pt x="351" y="1258" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="424" y="983" on="0"/>
- <pt x="495" y="1035" on="1"/>
- <pt x="598" y="1110" on="0"/>
- <pt x="721" y="1110" on="1"/>
- <pt x="997" y="1110" on="0"/>
- <pt x="997" y="780" on="1"/>
- <pt x="997" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="799" y="716" on="1"/>
- <pt x="799" y="848" on="0"/>
- <pt x="772" y="894" on="1"/>
- <pt x="744" y="941" on="0"/>
- <pt x="668" y="941" on="1"/>
- <pt x="506" y="941" on="0"/>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 24 30 15 48 196 15 1 1 26 20 17 11 4 1 0 3 0 0 0 10 9 2 1
- 6 3 3 1 4 48 196 6 5 1 8 7 4 3 3 27 19 18 0 3 3 0 14 9 8
- 2 19 6 3 3 2 0 0 0 20 19 4 1 17 27 26 11 10 7 6 4 5 0 2 4
- 48 196 18 17 1 5 4 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hcircumflex" xMin="154" yMin="0" xMax="997" yMax="1999">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="424" y="983" on="0"/>
- <pt x="495" y="1035" on="1"/>
- <pt x="598" y="1110" on="0"/>
- <pt x="721" y="1110" on="1"/>
- <pt x="997" y="1110" on="0"/>
- <pt x="997" y="780" on="1"/>
- <pt x="997" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="799" y="716" on="1"/>
- <pt x="799" y="848" on="0"/>
- <pt x="772" y="894" on="1"/>
- <pt x="744" y="941" on="0"/>
- <pt x="668" y="941" on="1"/>
- <pt x="506" y="941" on="0"/>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="228" y="1678" on="1"/>
- <pt x="469" y="1999" on="1"/>
- <pt x="687" y="1999" on="1"/>
- <pt x="928" y="1678" on="1"/>
- <pt x="780" y="1678" on="1"/>
- <pt x="579" y="1880" on="1"/>
- <pt x="577" y="1880" on="1"/>
- <pt x="376" y="1678" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 16 7 48 196 7 1 26 25 2 21 20 3 1 18 12 9 3 4 1 0 3 0 22
- 21 1 27 24 23 20 3 2 1 1 19 11 10 0 3 4 0 14 23 9 11 2 27 26 25
- 24 22 21 6 11 2 3 20 2 0 2 0 0 12 11 5 1 9 19 18 3 2 5 3 0
- 2 4 48 196 10 9 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hungarumlaut" xMin="-51" yMin="1283" xMax="732" yMax="1604">
- <contour>
- <pt x="-51" y="1283" on="1"/>
- <pt x="190" y="1604" on="1"/>
- <pt x="381" y="1604" on="1"/>
- <pt x="60" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="301" y="1283" on="1"/>
- <pt x="541" y="1604" on="1"/>
- <pt x="732" y="1604" on="1"/>
- <pt x="412" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 7 4 3 0 4 13 1 6 5 2 1 3 0 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen" xMin="88" yMin="518" xMax="594" yMax="666">
- <contour>
- <pt x="88" y="518" on="1"/>
- <pt x="88" y="666" on="1"/>
- <pt x="594" y="666" on="1"/>
- <pt x="594" y="518" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="hyphen#1" xMin="88" yMin="518" xMax="594" yMax="666">
- <contour>
- <pt x="88" y="518" on="1"/>
- <pt x="88" y="666" on="1"/>
- <pt x="594" y="666" on="1"/>
- <pt x="594" y="518" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="i" xMin="129" yMin="0" xMax="326" yMax="1480">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1086" on="1"/>
- <pt x="326" y="1086" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="129" y="1283" on="1"/>
- <pt x="129" y="1480" on="1"/>
- <pt x="326" y="1480" on="1"/>
- <pt x="326" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 41 values pushed */
- 0 0 7 4 5 1 5 1 4 48 196 3 0 1 0 6 5 0 2 1 1 14 0 0 7
- 6 3 2 4 3 0 1 4 48 196 5 4 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="iacute" xMin="79" yMin="0" xMax="548" yMax="1604">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="acute" x="-28" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ibreve" xMin="-106" yMin="0" xMax="560" yMax="1604">
- <contour>
- <pt x="128" y="0" on="1"/>
- <pt x="128" y="1086" on="1"/>
- <pt x="325" y="1086" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-106" y="1604" on="1"/>
- <pt x="17" y="1604" on="1"/>
- <pt x="38" y="1510" on="0"/>
- <pt x="92" y="1470" on="1"/>
- <pt x="144" y="1431" on="0"/>
- <pt x="227" y="1431" on="1"/>
- <pt x="321" y="1431" on="0"/>
- <pt x="375" y="1480" on="1"/>
- <pt x="418" y="1520" on="0"/>
- <pt x="437" y="1604" on="1"/>
- <pt x="560" y="1604" on="1"/>
- <pt x="544" y="1470" on="0"/>
- <pt x="471" y="1389" on="1"/>
- <pt x="377" y="1283" on="0"/>
- <pt x="227" y="1283" on="1"/>
- <pt x="70" y="1283" on="0"/>
- <pt x="-25" y="1398" on="1"/>
- <pt x="-90" y="1476" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 9 40 18 48 196 14 13 5 4 4 13 18 1 3 0 1 0 2 1 1 14 14 13
- 2 13 2 5 4 0 0 0 3 2 4 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="icircumflex" xMin="-123" yMin="0" xMax="577" yMax="1604">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="-114" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="idieresis" xMin="-56" yMin="0" xMax="512" yMax="1456">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1086" on="1"/>
- <pt x="326" y="1086" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-56" y="1283" on="1"/>
- <pt x="-56" y="1456" on="1"/>
- <pt x="117" y="1456" on="1"/>
- <pt x="117" y="1283" on="1"/>
- </contour>
- <contour>
- <pt x="339" y="1283" on="1"/>
- <pt x="339" y="1456" on="1"/>
- <pt x="512" y="1456" on="1"/>
- <pt x="512" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 59 values pushed */
- 0 0 11 8 7 4 13 3 5 1 4 48 196 10 9 6 5 3 3 0 1 2 0 2 1
- 1 14 0 0 9 8 13 1 10 7 6 13 1 4 3 2 4 1 0 3 4 48 196 11 10
- 1 5 4 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="igrave" xMin="-94" yMin="0" xMax="375" yMax="1604">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="grave" x="-200" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ij" xMin="129" yMin="-419" xMax="786" yMax="1480">
- <component glyphName="i" x="0" y="0" flags="0x4"/>
- <component glyphName="j" x="455" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="imacron" xMin="-94" yMin="0" xMax="548" yMax="1431">
- <component glyphName="dotlessi" x="-1" y="0" flags="0x4"/>
- <component glyphName="macron" x="-114" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="iogonek" xMin="61" yMin="-370" xMax="403" yMax="1480">
- <component glyphName="i" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="-109" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="itilde" xMin="-106" yMin="0" xMax="560" yMax="1517">
- <contour>
- <pt x="128" y="0" on="1"/>
- <pt x="128" y="1086" on="1"/>
- <pt x="325" y="1086" on="1"/>
- <pt x="325" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="-106" y="1283" on="1"/>
- <pt x="-99" y="1376" on="0"/>
- <pt x="-74" y="1427" on="1"/>
- <pt x="-28" y="1517" on="0"/>
- <pt x="81" y="1517" on="1"/>
- <pt x="153" y="1517" on="0"/>
- <pt x="214" y="1479" on="1"/>
- <pt x="274" y="1442" on="1"/>
- <pt x="331" y="1407" on="0"/>
- <pt x="361" y="1407" on="1"/>
- <pt x="426" y="1407" on="0"/>
- <pt x="437" y="1517" on="1"/>
- <pt x="560" y="1517" on="1"/>
- <pt x="553" y="1423" on="0"/>
- <pt x="528" y="1373" on="1"/>
- <pt x="483" y="1283" on="0"/>
- <pt x="375" y="1283" on="1"/>
- <pt x="303" y="1283" on="0"/>
- <pt x="240" y="1322" on="1"/>
- <pt x="180" y="1359" on="1"/>
- <pt x="125" y="1393" on="0"/>
- <pt x="93" y="1393" on="1"/>
- <pt x="28" y="1393" on="0"/>
- <pt x="17" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 25 6 8 13 6 20 48 196 8 0 20 1 27 20 4 3 0 1 3 0 1 16 15
- 2 13 0 0 3 0 1 0 2 1 1 14 16 15 2 13 2 27 4 0 0 0 3 2 5
- 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="j" xMin="-155" yMin="-419" xMax="331" yMax="1480">
- <contour>
- <pt x="-155" y="-387" on="1"/>
- <pt x="-155" y="-231" on="1"/>
- <pt x="-75" y="-271" on="0"/>
- <pt x="-5" y="-271" on="1"/>
- <pt x="92" y="-271" on="0"/>
- <pt x="115" y="-197" on="1"/>
- <pt x="133" y="-136" on="0"/>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="0" on="1"/>
- <pt x="331" y="-419" on="0"/>
- <pt x="11" y="-419" on="1"/>
- <pt x="-77" y="-419" on="0"/>
- </contour>
- <contour>
- <pt x="133" y="1283" on="1"/>
- <pt x="133" y="1480" on="1"/>
- <pt x="331" y="1480" on="1"/>
- <pt x="331" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 3 40 12 48 196 1 10 7 1 0 4 13 12 2 0 0 0 17 14 5 1 15 1
- 4 48 196 16 15 0 9 8 1 14 0 0 15 14 8 7 4 3 9 1 4 48 196 17 16
- 10 9 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="jcircumflex" xMin="-155" yMin="-419" xMax="565" yMax="1604">
- <contour>
- <pt x="-155" y="-387" on="1"/>
- <pt x="-155" y="-231" on="1"/>
- <pt x="-75" y="-271" on="0"/>
- <pt x="-5" y="-271" on="1"/>
- <pt x="92" y="-271" on="0"/>
- <pt x="115" y="-197" on="1"/>
- <pt x="133" y="-136" on="0"/>
- <pt x="133" y="0" on="1"/>
- <pt x="133" y="1086" on="1"/>
- <pt x="331" y="1086" on="1"/>
- <pt x="331" y="0" on="1"/>
- <pt x="331" y="-419" on="0"/>
- <pt x="11" y="-419" on="1"/>
- <pt x="-77" y="-419" on="0"/>
- </contour>
- <contour>
- <pt x="-134" y="1283" on="1"/>
- <pt x="106" y="1604" on="1"/>
- <pt x="325" y="1604" on="1"/>
- <pt x="565" y="1283" on="1"/>
- <pt x="417" y="1283" on="1"/>
- <pt x="217" y="1485" on="1"/>
- <pt x="214" y="1485" on="1"/>
- <pt x="14" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 75 values pushed */
- 0 0 3 40 12 48 196 20 19 2 15 14 3 1 10 7 1 0 4 13 12 2 0 16 15
- 1 21 18 17 14 3 2 0 9 8 1 14 20 19 16 3 9 7 3 21 15 14 3 7 0
- 3 18 17 2 13 9 0 0 10 9 4 1 7 1 4 48 196 8 7 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="k" xMin="154" yMin="0" xMax="1006" yMax="1579">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- <pt x="351" y="559" on="1"/>
- <pt x="715" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="556" y="573" on="1"/>
- <pt x="1006" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="351" y="557" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 9 6 3 3 4 0 3 2 1 1 10 8 7 0 3 2 0 5 4 1 14 8 7 6 5
- 4 5 13 2 0 0 10 9 3 2 4 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="kcommaaccent" xMin="154" yMin="-432" xMax="1006" yMax="1579">
- <component glyphName="k" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="218" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="kgreenlandic" xMin="154" yMin="0" xMax="1006" yMax="1086">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="559" on="1"/>
- <pt x="715" y="1086" on="1"/>
- <pt x="903" y="1086" on="1"/>
- <pt x="556" y="573" on="1"/>
- <pt x="1006" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="351" y="557" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 9 6 3 3 1 0 3 10 8 7 0 3 0 5 4 2 1 1 3 14 8 7 6 5 4
- 5 13 2 0 0 10 9 3 2 4 3 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="l" xMin="129" yMin="0" xMax="326" yMax="1579">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1579" on="1"/>
- <pt x="326" y="1579" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 2 1 1 3 0 1 2 0 14 0 0 3 2 4 1 0 1 4 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lacute" xMin="79" yMin="0" xMax="548" yMax="1999">
- <component glyphName="l" x="-1" y="0" flags="0x4"/>
- <component glyphName="acute" x="-28" y="395" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="lcaron" xMin="129" yMin="0" xMax="610" yMax="1579">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1579" on="1"/>
- <pt x="326" y="1579" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="413" y="1125" on="1"/>
- <pt x="413" y="1184" on="1"/>
- <pt x="489" y="1205" on="0"/>
- <pt x="489" y="1365" on="1"/>
- <pt x="489" y="1382" on="1"/>
- <pt x="413" y="1382" on="1"/>
- <pt x="413" y="1579" on="1"/>
- <pt x="610" y="1579" on="1"/>
- <pt x="610" y="1408" on="1"/>
- <pt x="609" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 12 9 8 7 5 4 6 1 0 3 11 10 2 1 3 3 0 1 2 0 14 8 7 2 11
- 4 3 0 0 10 9 5 4 4 3 11 3 2 4 1 0 2 4 48 196 12 11 1 1 0
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lcommaaccent" xMin="79" yMin="-432" xMax="421" yMax="1579">
- <component glyphName="l" x="-1" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-91" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ldot" xMin="129" yMin="0" xMax="672" yMax="1579">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="1579" on="1"/>
- <pt x="326" y="1579" on="1"/>
- <pt x="326" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="474" y="642" on="1"/>
- <pt x="474" y="839" on="1"/>
- <pt x="672" y="839" on="1"/>
- <pt x="672" y="642" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 7 4 5 1 5 1 4 48 196 6 5 1 2 1 1 3 0 1 3 0 14 0 0
- 5 4 4 1 6 3 2 4 1 0 2 4 48 196 7 6 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="less" xMin="104" yMin="99" xMax="1091" yMax="1086">
- <contour>
- <pt x="1091" y="99" on="1"/>
- <pt x="104" y="592" on="1"/>
- <pt x="1091" y="1086" on="1"/>
- <pt x="1091" y="920" on="1"/>
- <pt x="437" y="593" on="1"/>
- <pt x="437" y="591" on="1"/>
- <pt x="1091" y="264" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 20 values pushed */
- 6 5 4 3 2 1 0 14 5 4 1 3 13 0 6 3 2 0 3 0
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="logicalnot" xMin="86" yMin="296" xMax="1073" yMax="888">
- <contour>
- <pt x="86" y="740" on="1"/>
- <pt x="86" y="888" on="1"/>
- <pt x="1073" y="888" on="1"/>
- <pt x="1073" y="296" on="1"/>
- <pt x="925" y="296" on="1"/>
- <pt x="925" y="740" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 39 values pushed */
- 0 0 5 0 7 1 1 1 4 48 196 2 1 1 4 3 1 2 0 14 0 0 5 4 7
- 1 2 1 4 48 196 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="longs" xMin="8" yMin="0" xMax="512" yMax="1604">
- <contour>
- <pt x="144" y="0" on="1"/>
- <pt x="144" y="938" on="1"/>
- <pt x="8" y="938" on="1"/>
- <pt x="8" y="1086" on="1"/>
- <pt x="144" y="1086" on="1"/>
- <pt x="144" y="1216" on="1"/>
- <pt x="144" y="1399" on="0"/>
- <pt x="223" y="1501" on="1"/>
- <pt x="303" y="1604" on="0"/>
- <pt x="446" y="1604" on="1"/>
- <pt x="466" y="1604" on="0"/>
- <pt x="512" y="1599" on="1"/>
- <pt x="512" y="1452" on="1"/>
- <pt x="482" y="1456" on="0"/>
- <pt x="466" y="1456" on="1"/>
- <pt x="341" y="1456" on="0"/>
- <pt x="341" y="1237" on="1"/>
- <pt x="341" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 48 values pushed */
- 0 0 14 7 9 48 196 16 12 11 5 4 3 2 1 8 13 9 0 17 0 1 0 14 0
- 0 17 16 5 1 0 1 4 48 196 12 11 1 5 4 1 0 3 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="lslash" xMin="-7" yMin="0" xMax="462" yMax="1579">
- <contour>
- <pt x="129" y="0" on="1"/>
- <pt x="129" y="721" on="1"/>
- <pt x="-7" y="649" on="1"/>
- <pt x="-7" y="814" on="1"/>
- <pt x="129" y="889" on="1"/>
- <pt x="129" y="1579" on="1"/>
- <pt x="327" y="1579" on="1"/>
- <pt x="327" y="998" on="1"/>
- <pt x="462" y="1065" on="1"/>
- <pt x="462" y="901" on="1"/>
- <pt x="327" y="830" on="1"/>
- <pt x="327" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 10 9 8 7 4 3 2 1 8 5 0 3 6 5 1 11 0 1 2 0 14 0 0 11 10
- 7 6 4 3 0 1 4 48 196 9 8 1 5 4 1 0 3 3 2 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="m" xMin="154" yMin="0" xMax="1564" yMax="1110">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="438" y="1012" on="0"/>
- <pt x="494" y="1058" on="1"/>
- <pt x="559" y="1110" on="0"/>
- <pt x="665" y="1110" on="1"/>
- <pt x="795" y="1110" on="0"/>
- <pt x="876" y="1026" on="1"/>
- <pt x="923" y="977" on="0"/>
- <pt x="958" y="882" on="1"/>
- <pt x="1046" y="1014" on="0"/>
- <pt x="1101" y="1058" on="1"/>
- <pt x="1166" y="1110" on="0"/>
- <pt x="1273" y="1110" on="1"/>
- <pt x="1564" y="1110" on="0"/>
- <pt x="1564" y="790" on="1"/>
- <pt x="1564" y="0" on="1"/>
- <pt x="1367" y="0" on="1"/>
- <pt x="1366" y="759" on="1"/>
- <pt x="1366" y="946" on="0"/>
- <pt x="1222" y="946" on="1"/>
- <pt x="1094" y="946" on="0"/>
- <pt x="958" y="728" on="1"/>
- <pt x="958" y="0" on="1"/>
- <pt x="760" y="0" on="1"/>
- <pt x="760" y="759" on="1"/>
- <pt x="760" y="946" on="0"/>
- <pt x="615" y="946" on="1"/>
- <pt x="487" y="946" on="0"/>
- <pt x="351" y="728" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 70 values pushed */
- 0 0 29 29 7 22 29 15 48 196 15 1 7 1 31 27 24 17 11 3 6 1 0 3 32
- 26 25 19 18 0 5 0 2 1 1 14 19 17 11 2 0 0 25 24 11 4 2 26 32 31
- 3 2 4 3 0 2 4 48 196 18 17 1 27 26 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron" xMin="20" yMin="1283" xMax="662" yMax="1431">
- <contour>
- <pt x="20" y="1283" on="1"/>
- <pt x="20" y="1431" on="1"/>
- <pt x="662" y="1431" on="1"/>
- <pt x="662" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="macron#1" xMin="99" yMin="1456" xMax="1040" yMax="1604">
- <contour>
- <pt x="99" y="1456" on="1"/>
- <pt x="99" y="1604" on="1"/>
- <pt x="1040" y="1604" on="1"/>
- <pt x="1040" y="1456" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="minus" xMin="104" yMin="518" xMax="1091" yMax="666">
- <contour>
- <pt x="104" y="518" on="1"/>
- <pt x="104" y="666" on="1"/>
- <pt x="1091" y="666" on="1"/>
- <pt x="1091" y="518" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="mu" xMin="142" yMin="-395" xMax="984" yMax="1086">
- <contour>
- <pt x="142" y="1086" on="1"/>
- <pt x="339" y="1086" on="1"/>
- <pt x="339" y="370" on="1"/>
- <pt x="339" y="239" on="0"/>
- <pt x="366" y="192" on="1"/>
- <pt x="394" y="145" on="0"/>
- <pt x="470" y="145" on="1"/>
- <pt x="632" y="145" on="0"/>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="984" y="1086" on="1"/>
- <pt x="984" y="0" on="1"/>
- <pt x="787" y="0" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="629" y="-19" on="0"/>
- <pt x="469" y="-19" on="1"/>
- <pt x="404" y="-19" on="0"/>
- <pt x="339" y="25" on="1"/>
- <pt x="339" y="-395" on="1"/>
- <pt x="142" y="-395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 60 values pushed */
- 0 0 6 29 15 48 196 15 2 17 13 8 2 4 0 11 3 12 11 1 19 18 1 2 0
- 10 9 1 0 1 3 14 0 0 13 12 9 8 4 3 10 18 17 2 1 4 3 0 2 4
- 48 196 11 10 1 19 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="multiply" xMin="118" yMin="112" xMax="1078" yMax="1072">
- <contour>
- <pt x="118" y="217" on="1"/>
- <pt x="493" y="592" on="1"/>
- <pt x="118" y="967" on="1"/>
- <pt x="223" y="1072" on="1"/>
- <pt x="598" y="697" on="1"/>
- <pt x="973" y="1072" on="1"/>
- <pt x="1078" y="967" on="1"/>
- <pt x="703" y="592" on="1"/>
- <pt x="1078" y="217" on="1"/>
- <pt x="973" y="112" on="1"/>
- <pt x="598" y="487" on="1"/>
- <pt x="223" y="112" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 1 11 10 9 8 7 6 5 4 3 2 1 0 12 13 1 0 14 11 10 9 8 7 6 5
- 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="n" xMin="154" yMin="0" xMax="997" yMax="1110">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="424" y="983" on="0"/>
- <pt x="495" y="1035" on="1"/>
- <pt x="598" y="1110" on="0"/>
- <pt x="721" y="1110" on="1"/>
- <pt x="997" y="1110" on="0"/>
- <pt x="997" y="780" on="1"/>
- <pt x="997" y="0" on="1"/>
- <pt x="799" y="0" on="1"/>
- <pt x="799" y="716" on="1"/>
- <pt x="799" y="848" on="0"/>
- <pt x="772" y="894" on="1"/>
- <pt x="744" y="941" on="0"/>
- <pt x="668" y="941" on="1"/>
- <pt x="506" y="941" on="0"/>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 0 0 16 30 7 48 196 7 1 18 12 9 3 4 1 0 3 19 11 10 0 3 0 2 1
- 1 14 0 0 12 11 4 1 9 19 18 3 2 4 3 0 2 4 48 196 10 9 1 1 0
- 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nacute" xMin="154" yMin="0" xMax="997" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="306" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="napostrophe" xMin="0" yMin="0" xMax="1095" yMax="1579">
- <contour>
- <pt x="252" y="0" on="1"/>
- <pt x="252" y="1086" on="1"/>
- <pt x="449" y="1086" on="1"/>
- <pt x="449" y="882" on="1"/>
- <pt x="522" y="983" on="0"/>
- <pt x="593" y="1035" on="1"/>
- <pt x="696" y="1110" on="0"/>
- <pt x="819" y="1110" on="1"/>
- <pt x="1095" y="1110" on="0"/>
- <pt x="1095" y="780" on="1"/>
- <pt x="1095" y="0" on="1"/>
- <pt x="897" y="0" on="1"/>
- <pt x="897" y="716" on="1"/>
- <pt x="897" y="847" on="0"/>
- <pt x="869" y="894" on="1"/>
- <pt x="841" y="941" on="0"/>
- <pt x="766" y="941" on="1"/>
- <pt x="604" y="941" on="0"/>
- <pt x="449" y="703" on="1"/>
- <pt x="449" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="0" y="1125" on="1"/>
- <pt x="0" y="1184" on="1"/>
- <pt x="76" y="1205" on="0"/>
- <pt x="76" y="1365" on="1"/>
- <pt x="76" y="1382" on="1"/>
- <pt x="0" y="1382" on="1"/>
- <pt x="0" y="1579" on="1"/>
- <pt x="197" y="1579" on="1"/>
- <pt x="197" y="1408" on="1"/>
- <pt x="196" y="1146" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 16 30 7 48 196 7 1 28 25 24 23 21 20 6 26 1 3 18 12 9 3 4 1
- 0 3 27 26 1 19 11 10 0 3 2 0 2 1 1 14 24 23 2 27 20 3 0 0 28
- 27 4 1 20 12 11 4 1 9 19 18 3 2 4 3 0 3 4 48 196 26 25 21 20 3
- 10 9 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nbhyphen" xMin="88" yMin="518" xMax="594" yMax="666">
- <contour>
- <pt x="88" y="518" on="1"/>
- <pt x="88" y="666" on="1"/>
- <pt x="594" y="666" on="1"/>
- <pt x="594" y="518" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ncaron" xMin="154" yMin="0" xMax="997" yMax="1604">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="243" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ncommaaccent" xMin="154" yMin="-432" xMax="997" yMax="1110">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="243" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="nine" xMin="84" yMin="-38" xMax="1027" yMax="1518">
- <contour>
- <pt x="813" y="702" on="1"/>
- <pt x="675" y="530" on="0"/>
- <pt x="476" y="530" on="1"/>
- <pt x="294" y="530" on="0"/>
- <pt x="189" y="654" on="1"/>
- <pt x="84" y="778" on="0"/>
- <pt x="84" y="995" on="1"/>
- <pt x="84" y="1235" on="0"/>
- <pt x="208" y="1376" on="1"/>
- <pt x="331" y="1518" on="0"/>
- <pt x="539" y="1518" on="1"/>
- <pt x="767" y="1518" on="0"/>
- <pt x="897" y="1323" on="1"/>
- <pt x="1027" y="1128" on="0"/>
- <pt x="1027" y="788" on="1"/>
- <pt x="1027" y="400" on="0"/>
- <pt x="872" y="181" on="1"/>
- <pt x="717" y="-38" on="0"/>
- <pt x="443" y="-38" on="1"/>
- <pt x="315" y="-38" on="0"/>
- <pt x="163" y="18" on="1"/>
- <pt x="163" y="190" on="1"/>
- <pt x="346" y="111" on="0"/>
- <pt x="447" y="111" on="1"/>
- <pt x="668" y="111" on="0"/>
- <pt x="757" y="333" on="1"/>
- <pt x="792" y="420" on="0"/>
- <pt x="804" y="529" on="1"/>
- <pt x="811" y="587" on="0"/>
- </contour>
- <contour>
- <pt x="522" y="1369" on="1"/>
- <pt x="278" y="1369" on="0"/>
- <pt x="278" y="1036" on="1"/>
- <pt x="278" y="672" on="0"/>
- <pt x="529" y="672" on="1"/>
- <pt x="653" y="672" on="0"/>
- <pt x="729" y="758" on="1"/>
- <pt x="806" y="845" on="0"/>
- <pt x="806" y="992" on="1"/>
- <pt x="806" y="1155" on="0"/>
- <pt x="727" y="1262" on="1"/>
- <pt x="647" y="1369" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 33 40 2 29 40 10 23 40 18 48 196 18 2 10 0 2 1 1 21 20 2 0 4
- 0 2 3 0 0 14 0 0 37 26 14 31 41 6 48 196 0 14 20 6 20 21 20 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="nonbreakingspace"/><!-- contains no outline data -->
-
- <TTGlyph name="ntilde" xMin="154" yMin="0" xMax="997" yMax="1517">
- <component glyphName="n" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="221" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="numbersign" xMin="25" yMin="0" xMax="1114" yMax="1480">
- <contour>
- <pt x="125" y="0" on="1"/>
- <pt x="236" y="444" on="1"/>
- <pt x="25" y="444" on="1"/>
- <pt x="49" y="568" on="1"/>
- <pt x="267" y="568" on="1"/>
- <pt x="354" y="913" on="1"/>
- <pt x="118" y="913" on="1"/>
- <pt x="143" y="1036" on="1"/>
- <pt x="384" y="1036" on="1"/>
- <pt x="496" y="1480" on="1"/>
- <pt x="623" y="1480" on="1"/>
- <pt x="512" y="1036" on="1"/>
- <pt x="775" y="1036" on="1"/>
- <pt x="886" y="1480" on="1"/>
- <pt x="1014" y="1480" on="1"/>
- <pt x="903" y="1036" on="1"/>
- <pt x="1114" y="1036" on="1"/>
- <pt x="1090" y="913" on="1"/>
- <pt x="872" y="913" on="1"/>
- <pt x="785" y="568" on="1"/>
- <pt x="1021" y="568" on="1"/>
- <pt x="997" y="444" on="1"/>
- <pt x="755" y="444" on="1"/>
- <pt x="644" y="0" on="1"/>
- <pt x="516" y="0" on="1"/>
- <pt x="627" y="444" on="1"/>
- <pt x="364" y="444" on="1"/>
- <pt x="253" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="394" y="568" on="1"/>
- <pt x="658" y="568" on="1"/>
- <pt x="745" y="913" on="1"/>
- <pt x="481" y="913" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 14 13 10 9 4 13 7 27 24 23 0 4 13 1 0 0 31 30 18 17 6 5 6 5 7
- 29 28 20 19 4 3 6 5 1 2 4 48 196 16 15 12 11 8 7 5 26 25 22 21 2
- 1 5 2 0 14 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
- 11 10 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="o" xMin="86" yMin="-25" xMax="1052" yMax="1110">
- <contour>
- <pt x="569" y="1110" on="1"/>
- <pt x="792" y="1110" on="0"/>
- <pt x="922" y="958" on="1"/>
- <pt x="1052" y="807" on="0"/>
- <pt x="1052" y="544" on="1"/>
- <pt x="1052" y="277" on="0"/>
- <pt x="922" y="126" on="1"/>
- <pt x="792" y="-25" on="0"/>
- <pt x="562" y="-25" on="1"/>
- <pt x="365" y="-25" on="0"/>
- <pt x="242" y="100" on="1"/>
- <pt x="86" y="257" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="806" on="0"/>
- <pt x="216" y="958" on="1"/>
- <pt x="346" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="569" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="544" on="1"/>
- <pt x="299" y="123" on="0"/>
- <pt x="568" y="123" on="1"/>
- <pt x="839" y="123" on="0"/>
- <pt x="839" y="547" on="1"/>
- <pt x="839" y="962" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 20 40 8 16 40 0 48 196 8 2 0 1 14 0 0 22 9 4 18 9 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oacute" xMin="86" yMin="-25" xMax="1052" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="314" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="obreve" xMin="86" yMin="-25" xMax="1052" yMax="1604">
- <contour>
- <pt x="569" y="1110" on="1"/>
- <pt x="792" y="1110" on="0"/>
- <pt x="922" y="958" on="1"/>
- <pt x="1052" y="807" on="0"/>
- <pt x="1052" y="544" on="1"/>
- <pt x="1052" y="277" on="0"/>
- <pt x="922" y="126" on="1"/>
- <pt x="792" y="-25" on="0"/>
- <pt x="562" y="-25" on="1"/>
- <pt x="365" y="-25" on="0"/>
- <pt x="242" y="100" on="1"/>
- <pt x="86" y="257" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="806" on="0"/>
- <pt x="216" y="958" on="1"/>
- <pt x="346" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="569" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="544" on="1"/>
- <pt x="299" y="123" on="0"/>
- <pt x="568" y="123" on="1"/>
- <pt x="839" y="123" on="0"/>
- <pt x="839" y="547" on="1"/>
- <pt x="839" y="962" on="0"/>
- </contour>
- <contour>
- <pt x="236" y="1604" on="1"/>
- <pt x="359" y="1604" on="1"/>
- <pt x="380" y="1511" on="0"/>
- <pt x="434" y="1470" on="1"/>
- <pt x="486" y="1431" on="0"/>
- <pt x="569" y="1431" on="1"/>
- <pt x="663" y="1431" on="0"/>
- <pt x="717" y="1480" on="1"/>
- <pt x="760" y="1520" on="0"/>
- <pt x="779" y="1604" on="1"/>
- <pt x="902" y="1604" on="1"/>
- <pt x="885" y="1469" on="0"/>
- <pt x="813" y="1389" on="1"/>
- <pt x="718" y="1283" on="0"/>
- <pt x="569" y="1283" on="1"/>
- <pt x="412" y="1283" on="0"/>
- <pt x="317" y="1398" on="1"/>
- <pt x="253" y="1475" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 44 values pushed */
- 0 0 29 7 38 20 7 8 16 7 0 48 196 8 2 0 1 1 34 33 25 24 4 13 38
- 1 0 14 0 0 22 9 4 18 9 12 48 196 34 33 25 24 12 4
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ocircumflex" xMin="86" yMin="-25" xMax="1052" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="odieresis" xMin="86" yMin="-25" xMax="1052" yMax="1456">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="oe" xMin="86" yMin="-25" xMax="1812" yMax="1110">
- <contour>
- <pt x="990" y="910" on="1"/>
- <pt x="1054" y="999" on="0"/>
- <pt x="1125" y="1044" on="1"/>
- <pt x="1230" y="1110" on="0"/>
- <pt x="1375" y="1110" on="1"/>
- <pt x="1633" y="1110" on="0"/>
- <pt x="1734" y="927" on="1"/>
- <pt x="1809" y="791" on="0"/>
- <pt x="1812" y="512" on="1"/>
- <pt x="1099" y="512" on="1"/>
- <pt x="1117" y="321" on="0"/>
- <pt x="1191" y="233" on="1"/>
- <pt x="1283" y="123" on="0"/>
- <pt x="1494" y="123" on="1"/>
- <pt x="1649" y="123" on="0"/>
- <pt x="1812" y="194" on="1"/>
- <pt x="1812" y="37" on="1"/>
- <pt x="1620" y="-25" on="0"/>
- <pt x="1444" y="-25" on="1"/>
- <pt x="1264" y="-25" on="0"/>
- <pt x="1157" y="33" on="1"/>
- <pt x="1077" y="77" on="0"/>
- <pt x="995" y="174" on="1"/>
- <pt x="934" y="86" on="0"/>
- <pt x="862" y="41" on="1"/>
- <pt x="755" y="-25" on="0"/>
- <pt x="606" y="-25" on="1"/>
- <pt x="368" y="-25" on="0"/>
- <pt x="227" y="129" on="1"/>
- <pt x="86" y="283" on="0"/>
- <pt x="86" y="543" on="1"/>
- <pt x="86" y="805" on="0"/>
- <pt x="228" y="957" on="1"/>
- <pt x="369" y="1110" on="0"/>
- <pt x="608" y="1110" on="1"/>
- <pt x="764" y="1110" on="0"/>
- <pt x="872" y="1035" on="1"/>
- <pt x="934" y="992" on="0"/>
- </contour>
- <contour>
- <pt x="608" y="962" on="1"/>
- <pt x="295" y="962" on="0"/>
- <pt x="295" y="547" on="1"/>
- <pt x="295" y="365" on="0"/>
- <pt x="356" y="260" on="1"/>
- <pt x="435" y="123" on="0"/>
- <pt x="610" y="123" on="1"/>
- <pt x="898" y="123" on="0"/>
- <pt x="898" y="543" on="1"/>
- <pt x="898" y="736" on="0"/>
- <pt x="838" y="840" on="1"/>
- <pt x="768" y="962" on="0"/>
- </contour>
- <contour>
- <pt x="1105" y="648" on="1"/>
- <pt x="1602" y="648" on="1"/>
- <pt x="1599" y="776" on="0"/>
- <pt x="1568" y="844" on="1"/>
- <pt x="1513" y="962" on="0"/>
- <pt x="1371" y="962" on="1"/>
- <pt x="1233" y="962" on="0"/>
- <pt x="1166" y="857" on="1"/>
- <pt x="1120" y="786" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 55 40 4 44 40 26 38 40 34 13 40 18 48 196 34 1 26 2 18 2 4 1 1
- 0 1 50 2 0 1 22 16 15 3 8 2 3 0 0 0 9 8 31 1 50 1 4 48 196
- 51 50 1 0 14 0 0 40 43 30 48 196 51 50 22 9 0 5 13 46 30 8 16 15 8
- 2 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ogonek" xMin="170" yMin="-370" xMax="512" yMax="0">
- <contour>
- <pt x="328" y="0" on="1"/>
- <pt x="435" y="0" on="1"/>
- <pt x="307" y="-80" on="0"/>
- <pt x="307" y="-179" on="1"/>
- <pt x="307" y="-275" on="0"/>
- <pt x="422" y="-275" on="1"/>
- <pt x="475" y="-275" on="0"/>
- <pt x="512" y="-260" on="1"/>
- <pt x="512" y="-341" on="1"/>
- <pt x="450" y="-370" on="0"/>
- <pt x="372" y="-370" on="1"/>
- <pt x="170" y="-370" on="0"/>
- <pt x="170" y="-212" on="1"/>
- <pt x="170" y="-90" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 5 21 10 48 196 10 8 7 1 0 14 0 0 3 42 12 48 196 12 8 7 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ograve" xMin="86" yMin="-25" xMax="1052" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="142" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ohungarumlaut" xMin="86" yMin="-25" xMax="1121" yMax="1604">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="389" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="omacron" xMin="86" yMin="-25" xMax="1052" yMax="1431">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="one" xMin="230" yMin="0" xMax="1020" yMax="1517">
- <contour>
- <pt x="230" y="0" on="1"/>
- <pt x="230" y="148" on="1"/>
- <pt x="526" y="148" on="1"/>
- <pt x="526" y="1316" on="1"/>
- <pt x="230" y="1242" on="1"/>
- <pt x="230" y="1394" on="1"/>
- <pt x="724" y="1517" on="1"/>
- <pt x="724" y="148" on="1"/>
- <pt x="1020" y="148" on="1"/>
- <pt x="1020" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 49 values pushed */
- 6 5 4 3 4 13 1 0 0 8 7 2 1 7 3 0 1 4 48 196 9 0 1 0 14
- 0 0 7 6 4 1 2 1 4 48 196 9 8 1 3 2 1 5 4 1 0 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onehalf" xMin="116" yMin="-37" xMax="1584" yMax="1517">
- <contour>
- <pt x="1019" y="0" on="1"/>
- <pt x="1019" y="122" on="1"/>
- <pt x="1082" y="234" on="0"/>
- <pt x="1201" y="341" on="1"/>
- <pt x="1271" y="403" on="1"/>
- <pt x="1427" y="541" on="0"/>
- <pt x="1427" y="663" on="1"/>
- <pt x="1427" y="809" on="0"/>
- <pt x="1266" y="809" on="1"/>
- <pt x="1174" y="809" on="0"/>
- <pt x="1041" y="740" on="1"/>
- <pt x="1041" y="857" on="1"/>
- <pt x="1173" y="910" on="0"/>
- <pt x="1292" y="910" on="1"/>
- <pt x="1423" y="910" on="0"/>
- <pt x="1504" y="842" on="1"/>
- <pt x="1584" y="775" on="0"/>
- <pt x="1584" y="667" on="1"/>
- <pt x="1584" y="523" on="0"/>
- <pt x="1400" y="374" on="1"/>
- <pt x="1347" y="331" on="1"/>
- <pt x="1214" y="222" on="0"/>
- <pt x="1191" y="122" on="1"/>
- <pt x="1580" y="122" on="1"/>
- <pt x="1580" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="140" y="-37" on="1"/>
- <pt x="1228" y="1517" on="1"/>
- <pt x="1364" y="1517" on="1"/>
- <pt x="276" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="313" y="592" on="1"/>
- <pt x="313" y="1351" on="1"/>
- <pt x="116" y="1302" on="1"/>
- <pt x="116" y="1416" on="1"/>
- <pt x="461" y="1503" on="1"/>
- <pt x="461" y="592" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 85 values pushed */
- 0 0 8 11 13 48 196 33 32 31 30 27 26 11 10 8 13 13 29 28 25 0 0 0 23
- 22 1 38 2 0 1 4 48 196 34 29 1 24 0 1 2 0 14 0 0 6 37 17 48 196
- 27 26 24 23 22 11 10 1 0 9 13 17 33 32 31 28 25 4 13 29 0 0 34 33 7
- 1 29 1 4 48 196 30 29 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onequarter" xMin="116" yMin="-37" xMax="1584" yMax="1517">
- <contour>
- <pt x="313" y="592" on="1"/>
- <pt x="313" y="1351" on="1"/>
- <pt x="116" y="1302" on="1"/>
- <pt x="116" y="1416" on="1"/>
- <pt x="461" y="1503" on="1"/>
- <pt x="461" y="592" on="1"/>
- </contour>
- <contour>
- <pt x="1325" y="0" on="1"/>
- <pt x="1325" y="242" on="1"/>
- <pt x="918" y="242" on="1"/>
- <pt x="918" y="355" on="1"/>
- <pt x="1321" y="888" on="1"/>
- <pt x="1461" y="888" on="1"/>
- <pt x="1461" y="359" on="1"/>
- <pt x="1584" y="359" on="1"/>
- <pt x="1584" y="242" on="1"/>
- <pt x="1461" y="242" on="1"/>
- <pt x="1461" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1047" y="359" on="1"/>
- <pt x="1325" y="359" on="1"/>
- <pt x="1325" y="723" on="1"/>
- </contour>
- <contour>
- <pt x="191" y="-37" on="1"/>
- <pt x="1279" y="1517" on="1"/>
- <pt x="1414" y="1517" on="1"/>
- <pt x="326" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 107 values pushed */
- 19 10 0 2 9 12 7 2 22 21 4 3 2 1 6 13 10 23 20 16 6 4 13 7 0
- 0 18 17 13 12 38 3 7 1 4 48 196 11 10 1 15 14 8 7 3 5 0 1 3 0
- 14 22 11 6 2 21 17 10 9 8 5 6 4 3 23 4 0 2 14 13 2 13 11 20 3
- 2 3 13 0 0 0 19 18 7 6 22 3 11 5 4 7 1 0 2 4 48 196 16 15 12
- 11 3 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="onesuperior" xMin="123" yMin="592" xMax="468" yMax="1503">
- <contour>
- <pt x="320" y="592" on="1"/>
- <pt x="320" y="1351" on="1"/>
- <pt x="123" y="1302" on="1"/>
- <pt x="123" y="1416" on="1"/>
- <pt x="468" y="1503" on="1"/>
- <pt x="468" y="592" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 4 3 2 1 4 13 0 5 0 1 0 14 3 2 0 0 0 1 0 7 1 4 1 4 48
- 196 5 4 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordfeminine" xMin="86" yMin="822" xMax="712" yMax="1518">
- <contour>
- <pt x="485" y="915" on="1"/>
- <pt x="383" y="822" on="0"/>
- <pt x="281" y="822" on="1"/>
- <pt x="196" y="822" on="0"/>
- <pt x="141" y="875" on="1"/>
- <pt x="86" y="929" on="0"/>
- <pt x="86" y="1009" on="1"/>
- <pt x="86" y="1237" on="0"/>
- <pt x="428" y="1237" on="1"/>
- <pt x="476" y="1237" on="1"/>
- <pt x="476" y="1307" on="1"/>
- <pt x="476" y="1417" on="0"/>
- <pt x="355" y="1417" on="1"/>
- <pt x="258" y="1417" on="0"/>
- <pt x="145" y="1358" on="1"/>
- <pt x="145" y="1469" on="1"/>
- <pt x="272" y="1518" on="0"/>
- <pt x="383" y="1518" on="1"/>
- <pt x="625" y="1518" on="0"/>
- <pt x="625" y="1311" on="1"/>
- <pt x="625" y="1013" on="1"/>
- <pt x="625" y="919" on="0"/>
- <pt x="680" y="922" on="1"/>
- <pt x="686" y="922" on="1"/>
- <pt x="689" y="922" on="0"/>
- <pt x="695" y="923" on="1"/>
- <pt x="700" y="923" on="0"/>
- <pt x="706" y="924" on="1"/>
- <pt x="712" y="841" on="1"/>
- <pt x="661" y="822" on="0"/>
- <pt x="616" y="822" on="1"/>
- <pt x="518" y="822" on="0"/>
- <pt x="490" y="915" on="1"/>
- </contour>
- <contour>
- <pt x="476" y="996" on="1"/>
- <pt x="476" y="1150" on="1"/>
- <pt x="438" y="1150" on="1"/>
- <pt x="234" y="1150" on="0"/>
- <pt x="234" y="1026" on="1"/>
- <pt x="234" y="932" on="0"/>
- <pt x="331" y="932" on="1"/>
- <pt x="399" y="932" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 80 values pushed */
- 0 0 39 16 2 12 20 17 48 196 17 0 1 35 34 33 32 28 27 20 19 15 14 10 9
- 8 0 14 13 30 22 2 3 12 0 0 14 0 0 37 7 6 48 196 32 0 2 19 9 3
- 28 27 2 13 19 35 15 14 8 4 13 6 9 0 0 34 33 10 9 7 3 19 1 4 48
- 196 20 19 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ordmasculine" xMin="74" yMin="822" xMax="673" yMax="1517">
- <contour>
- <pt x="374" y="1517" on="1"/>
- <pt x="512" y="1517" on="0"/>
- <pt x="593" y="1424" on="1"/>
- <pt x="673" y="1331" on="0"/>
- <pt x="673" y="1171" on="1"/>
- <pt x="673" y="1008" on="0"/>
- <pt x="593" y="915" on="1"/>
- <pt x="512" y="822" on="0"/>
- <pt x="371" y="822" on="1"/>
- <pt x="248" y="822" on="0"/>
- <pt x="171" y="899" on="1"/>
- <pt x="74" y="995" on="0"/>
- <pt x="74" y="1170" on="1"/>
- <pt x="74" y="1330" on="0"/>
- <pt x="155" y="1423" on="1"/>
- <pt x="236" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="374" y="1416" on="1"/>
- <pt x="231" y="1416" on="0"/>
- <pt x="231" y="1170" on="1"/>
- <pt x="231" y="924" on="0"/>
- <pt x="374" y="924" on="1"/>
- <pt x="516" y="924" on="0"/>
- <pt x="516" y="1172" on="1"/>
- <pt x="516" y="1416" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 29 values pushed */
- 0 0 20 20 8 16 20 0 48 196 0 0 1 8 0 0 14 0 0 22 15 4 18 15 12
- 48 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="oslash" xMin="143" yMin="-25" xMax="1109" yMax="1110">
- <contour>
- <pt x="348" y="59" on="1"/>
- <pt x="287" y="-25" on="1"/>
- <pt x="143" y="-25" on="1"/>
- <pt x="264" y="142" on="1"/>
- <pt x="143" y="309" on="0"/>
- <pt x="143" y="544" on="1"/>
- <pt x="143" y="808" on="0"/>
- <pt x="273" y="959" on="1"/>
- <pt x="403" y="1110" on="0"/>
- <pt x="630" y="1110" on="1"/>
- <pt x="790" y="1110" on="0"/>
- <pt x="904" y="1027" on="1"/>
- <pt x="965" y="1110" on="1"/>
- <pt x="1109" y="1110" on="1"/>
- <pt x="988" y="943" on="1"/>
- <pt x="1109" y="775" on="0"/>
- <pt x="1109" y="542" on="1"/>
- <pt x="1109" y="280" on="0"/>
- <pt x="979" y="128" on="1"/>
- <pt x="850" y="-25" on="0"/>
- <pt x="625" y="-25" on="1"/>
- <pt x="465" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="450" y="201" on="1"/>
- <pt x="452" y="199" on="1"/>
- <pt x="494" y="157" on="0"/>
- <pt x="529" y="142" on="1"/>
- <pt x="574" y="123" on="0"/>
- <pt x="625" y="123" on="1"/>
- <pt x="896" y="123" on="0"/>
- <pt x="896" y="544" on="1"/>
- <pt x="896" y="669" on="0"/>
- <pt x="866" y="775" on="1"/>
- </contour>
- <contour>
- <pt x="802" y="885" on="1"/>
- <pt x="800" y="887" on="1"/>
- <pt x="725" y="962" on="0"/>
- <pt x="627" y="962" on="1"/>
- <pt x="356" y="962" on="0"/>
- <pt x="356" y="547" on="1"/>
- <pt x="356" y="405" on="0"/>
- <pt x="386" y="310" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 63 values pushed */
- 0 0 35 40 9 27 40 20 48 196 20 2 9 1 1 1 39 32 31 22 14 11 3 0 8
- 1 2 3 0 0 13 12 1 2 1 1 2 0 14 0 0 37 9 5 29 9 16 48 196 39
- 32 31 22 16 14 13 12 11 5 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="otilde" xMin="86" yMin="-25" xMax="1052" yMax="1517">
- <component glyphName="o" x="0" y="0" flags="0x4"/>
- <component glyphName="tilde" x="228" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="p" xMin="154" yMin="-395" xMax="1052" yMax="1110">
- <contour>
- <pt x="351" y="-395" on="1"/>
- <pt x="154" y="-395" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="407" y="984" on="0"/>
- <pt x="469" y="1036" on="1"/>
- <pt x="557" y="1110" on="0"/>
- <pt x="676" y="1110" on="1"/>
- <pt x="845" y="1110" on="0"/>
- <pt x="948" y="963" on="1"/>
- <pt x="1052" y="816" on="0"/>
- <pt x="1052" y="572" on="1"/>
- <pt x="1052" y="287" on="0"/>
- <pt x="918" y="131" on="1"/>
- <pt x="785" y="-25" on="0"/>
- <pt x="540" y="-25" on="1"/>
- <pt x="449" y="-25" on="0"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="149" on="1"/>
- <pt x="488" y="123" on="0"/>
- <pt x="557" y="123" on="1"/>
- <pt x="839" y="123" on="0"/>
- <pt x="839" y="552" on="1"/>
- <pt x="839" y="733" on="0"/>
- <pt x="783" y="835" on="1"/>
- <pt x="728" y="938" on="0"/>
- <pt x="634" y="938" on="1"/>
- <pt x="508" y="938" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 28 30 8 22 40 16 48 196 16 2 8 1 1 20 19 4 3 2 2 3 0 1 18
- 2 0 2 0 1 0 1 0 3 2 1 14 0 0 24 9 12 48 196 12 0 0 0 20 19
- 18 4 3 0 4 5 1 1 4 48 196 2 1 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="paragraph" xMin="88" yMin="-296" xMax="902" yMax="1480">
- <contour>
- <pt x="507" y="-296" on="1"/>
- <pt x="507" y="740" on="1"/>
- <pt x="325" y="757" on="0"/>
- <pt x="222" y="843" on="1"/>
- <pt x="88" y="954" on="0"/>
- <pt x="88" y="1155" on="1"/>
- <pt x="88" y="1331" on="0"/>
- <pt x="184" y="1405" on="1"/>
- <pt x="280" y="1480" on="0"/>
- <pt x="507" y="1480" on="1"/>
- <pt x="902" y="1480" on="1"/>
- <pt x="902" y="-296" on="1"/>
- <pt x="779" y="-296" on="1"/>
- <pt x="779" y="1357" on="1"/>
- <pt x="631" y="1357" on="1"/>
- <pt x="631" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 57 values pushed */
- 1 1 13 2 2 0 1 15 12 11 0 4 13 2 0 0 0 14 13 6 1 9 1 4 48
- 196 10 9 0 14 5 0 0 0 13 12 19 1 10 9 1 0 19 2 14 2 4 48 196 11
- 10 1 15 14 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenleft" xMin="131" yMin="-296" xMax="600" yMax="1579">
- <contour>
- <pt x="600" y="-160" on="1"/>
- <pt x="600" y="-296" on="1"/>
- <pt x="400" y="-154" on="0"/>
- <pt x="284" y="55" on="1"/>
- <pt x="131" y="328" on="0"/>
- <pt x="131" y="642" on="1"/>
- <pt x="131" y="970" on="0"/>
- <pt x="297" y="1252" on="1"/>
- <pt x="411" y="1444" on="0"/>
- <pt x="600" y="1579" on="1"/>
- <pt x="600" y="1443" on="1"/>
- <pt x="465" y="1293" on="0"/>
- <pt x="404" y="1136" on="1"/>
- <pt x="328" y="941" on="0"/>
- <pt x="328" y="642" on="1"/>
- <pt x="328" y="330" on="0"/>
- <pt x="411" y="129" on="1"/>
- <pt x="473" y="-18" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 10 9 1 0 14 0 0 14 41 5 48 196 10 9 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="parenright" xMin="82" yMin="-296" xMax="551" yMax="1579">
- <contour>
- <pt x="82" y="1443" on="1"/>
- <pt x="82" y="1579" on="1"/>
- <pt x="282" y="1437" on="0"/>
- <pt x="399" y="1228" on="1"/>
- <pt x="551" y="956" on="0"/>
- <pt x="551" y="642" on="1"/>
- <pt x="551" y="312" on="0"/>
- <pt x="385" y="31" on="1"/>
- <pt x="271" y="-161" on="0"/>
- <pt x="82" y="-296" on="1"/>
- <pt x="82" y="-160" on="1"/>
- <pt x="217" y="-9" on="0"/>
- <pt x="278" y="148" on="1"/>
- <pt x="353" y="343" on="0"/>
- <pt x="353" y="642" on="1"/>
- <pt x="353" y="953" on="0"/>
- <pt x="270" y="1154" on="1"/>
- <pt x="210" y="1299" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 17 values pushed */
- 10 9 1 0 14 0 0 14 41 5 48 196 10 9 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="percent" xMin="112" yMin="-37" xMax="1709" yMax="1517">
- <contour>
- <pt x="250" y="-37" on="1"/>
- <pt x="1416" y="1517" on="1"/>
- <pt x="1570" y="1517" on="1"/>
- <pt x="405" y="-37" on="1"/>
- </contour>
- <contour>
- <pt x="429" y="1480" on="1"/>
- <pt x="576" y="1480" on="0"/>
- <pt x="661" y="1381" on="1"/>
- <pt x="747" y="1281" on="0"/>
- <pt x="747" y="1110" on="1"/>
- <pt x="747" y="939" on="0"/>
- <pt x="661" y="840" on="1"/>
- <pt x="576" y="740" on="0"/>
- <pt x="430" y="740" on="1"/>
- <pt x="282" y="740" on="0"/>
- <pt x="197" y="840" on="1"/>
- <pt x="112" y="940" on="0"/>
- <pt x="112" y="1115" on="1"/>
- <pt x="112" y="1266" on="0"/>
- <pt x="182" y="1362" on="1"/>
- <pt x="270" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="429" y="1382" on="1"/>
- <pt x="356" y="1382" on="0"/>
- <pt x="311" y="1308" on="1"/>
- <pt x="266" y="1233" on="0"/>
- <pt x="266" y="1116" on="1"/>
- <pt x="266" y="1001" on="0"/>
- <pt x="303" y="929" on="1"/>
- <pt x="348" y="839" on="0"/>
- <pt x="429" y="839" on="1"/>
- <pt x="503" y="839" on="0"/>
- <pt x="548" y="914" on="1"/>
- <pt x="593" y="989" on="0"/>
- <pt x="593" y="1110" on="1"/>
- <pt x="593" y="1233" on="0"/>
- <pt x="548" y="1307" on="1"/>
- <pt x="502" y="1382" on="0"/>
- </contour>
- <contour>
- <pt x="1392" y="740" on="1"/>
- <pt x="1539" y="740" on="0"/>
- <pt x="1624" y="640" on="1"/>
- <pt x="1709" y="541" on="0"/>
- <pt x="1709" y="370" on="1"/>
- <pt x="1709" y="199" on="0"/>
- <pt x="1624" y="100" on="1"/>
- <pt x="1538" y="0" on="0"/>
- <pt x="1392" y="0" on="1"/>
- <pt x="1244" y="0" on="0"/>
- <pt x="1159" y="100" on="1"/>
- <pt x="1074" y="200" on="0"/>
- <pt x="1074" y="375" on="1"/>
- <pt x="1074" y="527" on="0"/>
- <pt x="1144" y="622" on="1"/>
- <pt x="1232" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="1392" y="642" on="1"/>
- <pt x="1318" y="642" on="0"/>
- <pt x="1273" y="568" on="1"/>
- <pt x="1228" y="493" on="0"/>
- <pt x="1228" y="376" on="1"/>
- <pt x="1228" y="262" on="0"/>
- <pt x="1265" y="189" on="1"/>
- <pt x="1309" y="99" on="0"/>
- <pt x="1392" y="99" on="1"/>
- <pt x="1465" y="99" on="0"/>
- <pt x="1510" y="174" on="1"/>
- <pt x="1555" y="249" on="0"/>
- <pt x="1555" y="370" on="1"/>
- <pt x="1555" y="493" on="0"/>
- <pt x="1510" y="567" on="1"/>
- <pt x="1465" y="642" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 60 21 44 52 21 36 28 21 12 20 21 4 48 196 44 2 4 0 36 12 1 1 36
- 12 2 0 2 3 0 0 2 1 1 3 0 1 2 0 14 0 0 64 15 40 56 15 48 32
- 15 8 24 15 16 48 196 48 40 16 8 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="period" xMin="161" yMin="0" xMax="408" yMax="247">
- <contour>
- <pt x="161" y="0" on="1"/>
- <pt x="161" y="247" on="1"/>
- <pt x="408" y="247" on="1"/>
- <pt x="408" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 2 1 8 1 0 1 4 48 196 3 0 1 0 14 0 0 3 2 8 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered" xMin="161" yMin="491" xMax="408" yMax="738">
- <contour>
- <pt x="161" y="491" on="1"/>
- <pt x="161" y="738" on="1"/>
- <pt x="408" y="738" on="1"/>
- <pt x="408" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 8 1 1 1 4 48 196 2 1 1 0 14 0 0 3 2 8 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="periodcentered#1" xMin="161" yMin="491" xMax="408" yMax="738">
- <contour>
- <pt x="161" y="491" on="1"/>
- <pt x="161" y="738" on="1"/>
- <pt x="408" y="738" on="1"/>
- <pt x="408" y="491" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 0 0 3 0 8 1 1 1 4 48 196 2 1 1 0 14 0 0 3 2 8 1 0 1 4
- 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="perthousand" xMin="25" yMin="-37" xMax="2024" yMax="1517">
- <contour>
- <pt x="340" y="1480" on="1"/>
- <pt x="483" y="1480" on="0"/>
- <pt x="569" y="1380" on="1"/>
- <pt x="654" y="1281" on="0"/>
- <pt x="654" y="1111" on="1"/>
- <pt x="654" y="938" on="0"/>
- <pt x="569" y="839" on="1"/>
- <pt x="484" y="740" on="0"/>
- <pt x="335" y="740" on="1"/>
- <pt x="209" y="740" on="0"/>
- <pt x="127" y="822" on="1"/>
- <pt x="25" y="925" on="0"/>
- <pt x="25" y="1110" on="1"/>
- <pt x="25" y="1280" on="0"/>
- <pt x="110" y="1380" on="1"/>
- <pt x="196" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="338" y="1382" on="1"/>
- <pt x="173" y="1382" on="0"/>
- <pt x="173" y="1111" on="1"/>
- <pt x="173" y="839" on="0"/>
- <pt x="340" y="839" on="1"/>
- <pt x="506" y="839" on="0"/>
- <pt x="506" y="1109" on="1"/>
- <pt x="506" y="1235" on="0"/>
- <pt x="461" y="1308" on="1"/>
- <pt x="415" y="1382" on="0"/>
- </contour>
- <contour>
- <pt x="1006" y="740" on="1"/>
- <pt x="1150" y="740" on="0"/>
- <pt x="1235" y="640" on="1"/>
- <pt x="1320" y="541" on="0"/>
- <pt x="1320" y="371" on="1"/>
- <pt x="1320" y="198" on="0"/>
- <pt x="1235" y="99" on="1"/>
- <pt x="1150" y="0" on="0"/>
- <pt x="1002" y="0" on="1"/>
- <pt x="874" y="0" on="0"/>
- <pt x="793" y="81" on="1"/>
- <pt x="691" y="184" on="0"/>
- <pt x="691" y="370" on="1"/>
- <pt x="691" y="540" on="0"/>
- <pt x="776" y="640" on="1"/>
- <pt x="862" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="1004" y="642" on="1"/>
- <pt x="839" y="642" on="0"/>
- <pt x="839" y="370" on="1"/>
- <pt x="839" y="99" on="0"/>
- <pt x="1006" y="99" on="1"/>
- <pt x="1172" y="99" on="0"/>
- <pt x="1172" y="369" on="1"/>
- <pt x="1172" y="495" on="0"/>
- <pt x="1127" y="569" on="1"/>
- <pt x="1081" y="642" on="0"/>
- </contour>
- <contour>
- <pt x="1709" y="740" on="1"/>
- <pt x="1853" y="740" on="0"/>
- <pt x="1938" y="640" on="1"/>
- <pt x="2024" y="541" on="0"/>
- <pt x="2024" y="372" on="1"/>
- <pt x="2024" y="198" on="0"/>
- <pt x="1938" y="99" on="1"/>
- <pt x="1852" y="0" on="0"/>
- <pt x="1706" y="0" on="1"/>
- <pt x="1578" y="0" on="0"/>
- <pt x="1496" y="82" on="1"/>
- <pt x="1394" y="185" on="0"/>
- <pt x="1394" y="370" on="1"/>
- <pt x="1394" y="540" on="0"/>
- <pt x="1479" y="640" on="1"/>
- <pt x="1565" y="740" on="0"/>
- </contour>
- <contour>
- <pt x="1707" y="642" on="1"/>
- <pt x="1542" y="642" on="0"/>
- <pt x="1542" y="370" on="1"/>
- <pt x="1542" y="99" on="0"/>
- <pt x="1709" y="99" on="1"/>
- <pt x="1876" y="99" on="0"/>
- <pt x="1876" y="370" on="1"/>
- <pt x="1876" y="495" on="0"/>
- <pt x="1830" y="569" on="1"/>
- <pt x="1785" y="642" on="0"/>
- </contour>
- <contour>
- <pt x="61" y="-37" on="1"/>
- <pt x="1149" y="1517" on="1"/>
- <pt x="1284" y="1517" on="1"/>
- <pt x="196" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 87 values pushed */
- 0 0 72 21 60 68 21 52 46 21 34 42 21 26 20 21 8 16 21 0 48 196 60 2 34
- 2 0 0 52 26 8 1 1 52 26 8 3 0 2 3 0 0 1 80 79 2 13 0 0 1
- 81 78 2 0 14 0 0 74 7 56 70 7 64 48 7 30 44 7 38 22 7 4 18 7 12
- 48 196 81 80 79 78 64 56 38 30 12 4
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MDAP[1]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plus" xMin="104" yMin="99" xMax="1091" yMax="1086">
- <contour>
- <pt x="523" y="99" on="1"/>
- <pt x="523" y="518" on="1"/>
- <pt x="104" y="518" on="1"/>
- <pt x="104" y="666" on="1"/>
- <pt x="523" y="666" on="1"/>
- <pt x="523" y="1086" on="1"/>
- <pt x="671" y="1086" on="1"/>
- <pt x="671" y="666" on="1"/>
- <pt x="1091" y="666" on="1"/>
- <pt x="1091" y="518" on="1"/>
- <pt x="671" y="518" on="1"/>
- <pt x="671" y="99" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 53 values pushed */
- 0 0 10 9 2 1 7 3 3 1 4 48 196 8 7 4 3 3 11 0 1 2 0 6 5
- 1 14 0 0 11 10 7 6 7 3 0 1 4 48 196 9 8 1 5 4 1 0 3 3 2
- 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="plusminus" xMin="104" yMin="0" xMax="1091" yMax="1184">
- <contour>
- <pt x="523" y="296" on="1"/>
- <pt x="523" y="666" on="1"/>
- <pt x="104" y="666" on="1"/>
- <pt x="104" y="814" on="1"/>
- <pt x="523" y="814" on="1"/>
- <pt x="523" y="1184" on="1"/>
- <pt x="672" y="1184" on="1"/>
- <pt x="672" y="814" on="1"/>
- <pt x="1091" y="814" on="1"/>
- <pt x="1091" y="666" on="1"/>
- <pt x="672" y="666" on="1"/>
- <pt x="672" y="296" on="1"/>
- </contour>
- <contour>
- <pt x="104" y="0" on="1"/>
- <pt x="104" y="148" on="1"/>
- <pt x="1091" y="148" on="1"/>
- <pt x="1091" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 14 13 7 1 12 10 9 2 1 7 3 3 2 4 48 196 15 12 1 6 5 1 8
- 7 4 3 3 11 0 1 4 0 14 0 0 11 10 7 6 7 3 0 1 4 48 196 15 14
- 9 8 3 5 4 1 0 3 13 12 3 2 3 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="q" xMin="86" yMin="-395" xMax="984" yMax="1110">
- <contour>
- <pt x="787" y="1086" on="1"/>
- <pt x="984" y="1086" on="1"/>
- <pt x="984" y="-395" on="1"/>
- <pt x="787" y="-395" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="731" y="101" on="0"/>
- <pt x="669" y="49" on="1"/>
- <pt x="581" y="-25" on="0"/>
- <pt x="462" y="-25" on="1"/>
- <pt x="293" y="-25" on="0"/>
- <pt x="190" y="123" on="1"/>
- <pt x="86" y="270" on="0"/>
- <pt x="86" y="514" on="1"/>
- <pt x="86" y="798" on="0"/>
- <pt x="220" y="954" on="1"/>
- <pt x="354" y="1110" on="0"/>
- <pt x="597" y="1110" on="1"/>
- <pt x="691" y="1110" on="0"/>
- </contour>
- <contour>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="937" on="1"/>
- <pt x="648" y="962" on="0"/>
- <pt x="582" y="962" on="1"/>
- <pt x="299" y="962" on="0"/>
- <pt x="299" y="532" on="1"/>
- <pt x="299" y="354" on="0"/>
- <pt x="355" y="251" on="1"/>
- <pt x="410" y="148" on="0"/>
- <pt x="504" y="148" on="1"/>
- <pt x="630" y="148" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 27 30 8 21 40 16 48 196 16 1 8 2 1 19 18 4 3 0 2 3 0 3 2
- 1 0 1 0 1 14 0 0 23 9 12 48 196 12 0 0 0 19 18 4 3 0 4 4 1
- 1 4 48 196 2 1 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="question" xMin="138" yMin="0" xMax="1014" yMax="1517">
- <contour>
- <pt x="376" y="0" on="1"/>
- <pt x="376" y="197" on="1"/>
- <pt x="573" y="197" on="1"/>
- <pt x="573" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="376" y="395" on="1"/>
- <pt x="376" y="449" on="1"/>
- <pt x="375" y="694" on="0"/>
- <pt x="539" y="822" on="1"/>
- <pt x="628" y="891" on="1"/>
- <pt x="804" y="1027" on="0"/>
- <pt x="804" y="1174" on="1"/>
- <pt x="804" y="1369" on="0"/>
- <pt x="530" y="1369" on="1"/>
- <pt x="362" y="1369" on="0"/>
- <pt x="138" y="1295" on="1"/>
- <pt x="138" y="1462" on="1"/>
- <pt x="359" y="1517" on="0"/>
- <pt x="545" y="1517" on="1"/>
- <pt x="749" y="1517" on="0"/>
- <pt x="865" y="1451" on="1"/>
- <pt x="1014" y="1365" on="0"/>
- <pt x="1014" y="1177" on="1"/>
- <pt x="1014" y="989" on="0"/>
- <pt x="823" y="871" on="1"/>
- <pt x="742" y="821" on="1"/>
- <pt x="643" y="760" on="0"/>
- <pt x="608" y="694" on="1"/>
- <pt x="573" y="629" on="0"/>
- <pt x="573" y="505" on="1"/>
- <pt x="573" y="395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 71 values pushed */
- 0 0 12 40 17 48 196 17 0 1 28 15 14 5 4 0 4 3 0 0 0 2 1 5 1
- 0 1 4 48 196 29 4 1 3 0 1 2 0 14 0 0 10 9 21 48 196 21 2 0 0
- 29 28 3 2 4 3 0 1 4 48 196 15 14 1 5 4 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="questiondown" xMin="185" yMin="-432" xMax="1061" yMax="1086">
- <contour>
- <pt x="823" y="1086" on="1"/>
- <pt x="823" y="888" on="1"/>
- <pt x="626" y="888" on="1"/>
- <pt x="626" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="823" y="691" on="1"/>
- <pt x="823" y="636" on="1"/>
- <pt x="823" y="392" on="0"/>
- <pt x="660" y="264" on="1"/>
- <pt x="571" y="195" on="1"/>
- <pt x="395" y="58" on="0"/>
- <pt x="395" y="-88" on="1"/>
- <pt x="395" y="-284" on="0"/>
- <pt x="670" y="-284" on="1"/>
- <pt x="838" y="-284" on="0"/>
- <pt x="1061" y="-209" on="1"/>
- <pt x="1061" y="-376" on="1"/>
- <pt x="842" y="-432" on="0"/>
- <pt x="655" y="-432" on="1"/>
- <pt x="450" y="-432" on="0"/>
- <pt x="334" y="-365" on="1"/>
- <pt x="185" y="-280" on="0"/>
- <pt x="185" y="-91" on="1"/>
- <pt x="185" y="97" on="0"/>
- <pt x="376" y="215" on="1"/>
- <pt x="457" y="265" on="1"/>
- <pt x="556" y="326" on="0"/>
- <pt x="591" y="391" on="1"/>
- <pt x="626" y="457" on="0"/>
- <pt x="626" y="580" on="1"/>
- <pt x="626" y="691" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 72 values pushed */
- 0 0 12 40 17 48 196 1 28 5 2 4 2 3 0 1 15 14 17 2 0 0 0 2 1
- 5 1 0 1 4 48 196 29 4 1 0 3 0 1 14 0 0 10 9 21 48 196 21 2 0
- 0 29 28 3 2 4 3 0 1 4 48 196 15 14 1 5 4 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedbl" xMin="92" yMin="1086" xMax="635" yMax="1579">
- <contour>
- <pt x="117" y="1086" on="1"/>
- <pt x="92" y="1579" on="1"/>
- <pt x="289" y="1579" on="1"/>
- <pt x="265" y="1086" on="1"/>
- </contour>
- <contour>
- <pt x="462" y="1086" on="1"/>
- <pt x="437" y="1579" on="1"/>
- <pt x="635" y="1579" on="1"/>
- <pt x="610" y="1086" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 21 values pushed */
- 6 5 2 1 3 0 7 4 3 0 1 3 14 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblbase" xMin="70" yMin="-321" xMax="613" yMax="197">
- <contour>
- <pt x="70" y="-321" on="1"/>
- <pt x="70" y="-247" on="1"/>
- <pt x="141" y="-210" on="0"/>
- <pt x="141" y="-23" on="1"/>
- <pt x="141" y="0" on="1"/>
- <pt x="70" y="0" on="1"/>
- <pt x="70" y="197" on="1"/>
- <pt x="267" y="197" on="1"/>
- <pt x="267" y="31" on="1"/>
- <pt x="266" y="-271" on="0"/>
- </contour>
- <contour>
- <pt x="415" y="-321" on="1"/>
- <pt x="415" y="-247" on="1"/>
- <pt x="486" y="-209" on="0"/>
- <pt x="486" y="-23" on="1"/>
- <pt x="486" y="0" on="1"/>
- <pt x="415" y="0" on="1"/>
- <pt x="415" y="197" on="1"/>
- <pt x="613" y="197" on="1"/>
- <pt x="613" y="31" on="1"/>
- <pt x="612" y="-271" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 15 14 13 11 10 8 5 4 3 1 0 12 13 6 17 16 7 6 3 0 14 14 13 2
- 17 10 3 4 3 2 7 0 3 0 0 16 15 11 10 4 3 17 8 7 4 1 0 2 4
- 48 196 18 17 1 6 5 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblleft" xMin="57" yMin="1061" xMax="600" yMax="1579">
- <contour>
- <pt x="600" y="1579" on="1"/>
- <pt x="600" y="1505" on="1"/>
- <pt x="529" y="1468" on="0"/>
- <pt x="529" y="1281" on="1"/>
- <pt x="529" y="1258" on="1"/>
- <pt x="600" y="1258" on="1"/>
- <pt x="600" y="1061" on="1"/>
- <pt x="402" y="1061" on="1"/>
- <pt x="402" y="1227" on="1"/>
- <pt x="403" y="1529" on="0"/>
- </contour>
- <contour>
- <pt x="254" y="1579" on="1"/>
- <pt x="254" y="1505" on="1"/>
- <pt x="184" y="1468" on="0"/>
- <pt x="184" y="1281" on="1"/>
- <pt x="184" y="1258" on="1"/>
- <pt x="254" y="1258" on="1"/>
- <pt x="254" y="1061" on="1"/>
- <pt x="57" y="1061" on="1"/>
- <pt x="57" y="1227" on="1"/>
- <pt x="58" y="1529" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 15 14 13 11 10 8 5 4 3 1 0 12 13 6 17 16 7 6 3 0 14 4 3 2
- 0 7 3 14 13 2 10 17 3 0 0 16 15 11 10 4 3 17 8 7 4 1 0 2 4
- 48 196 18 17 1 6 5 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotedblright" xMin="82" yMin="1061" xMax="625" yMax="1579">
- <contour>
- <pt x="82" y="1061" on="1"/>
- <pt x="82" y="1135" on="1"/>
- <pt x="153" y="1172" on="0"/>
- <pt x="153" y="1359" on="1"/>
- <pt x="153" y="1382" on="1"/>
- <pt x="82" y="1382" on="1"/>
- <pt x="82" y="1579" on="1"/>
- <pt x="279" y="1579" on="1"/>
- <pt x="279" y="1413" on="1"/>
- <pt x="278" y="1111" on="0"/>
- </contour>
- <contour>
- <pt x="427" y="1061" on="1"/>
- <pt x="427" y="1135" on="1"/>
- <pt x="498" y="1172" on="0"/>
- <pt x="498" y="1359" on="1"/>
- <pt x="498" y="1382" on="1"/>
- <pt x="427" y="1382" on="1"/>
- <pt x="427" y="1579" on="1"/>
- <pt x="625" y="1579" on="1"/>
- <pt x="625" y="1413" on="1"/>
- <pt x="624" y="1111" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 18 15 14 13 11 10 8 5 4 3 1 0 12 13 6 17 16 7 6 3 0 14 14 13 2
- 17 10 3 4 3 2 7 0 3 0 0 16 15 11 10 4 3 17 8 7 4 1 0 2 4
- 48 196 18 17 1 6 5 1 0 3 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quoteleft" xMin="92" yMin="1012" xMax="339" yMax="1579">
- <contour>
- <pt x="339" y="1579" on="1"/>
- <pt x="339" y="1505" on="1"/>
- <pt x="243" y="1478" on="0"/>
- <pt x="243" y="1279" on="1"/>
- <pt x="243" y="1258" on="1"/>
- <pt x="339" y="1258" on="1"/>
- <pt x="339" y="1012" on="1"/>
- <pt x="92" y="1012" on="1"/>
- <pt x="92" y="1226" on="1"/>
- <pt x="93" y="1551" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 8 5 4 3 1 0 6 13 6 7 6 1 0 14 4 3 2 0 7 3 0 0 6 5 1
- 0 8 3 7 1 4 48 196 8 7 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotereversed"/><!-- contains no outline data -->
-
- <TTGlyph name="quoteright" xMin="116" yMin="1012" xMax="363" yMax="1579">
- <contour>
- <pt x="116" y="1012" on="1"/>
- <pt x="116" y="1086" on="1"/>
- <pt x="212" y="1113" on="0"/>
- <pt x="212" y="1312" on="1"/>
- <pt x="212" y="1332" on="1"/>
- <pt x="116" y="1332" on="1"/>
- <pt x="116" y="1579" on="1"/>
- <pt x="363" y="1579" on="1"/>
- <pt x="363" y="1365" on="1"/>
- <pt x="362" y="1036" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 8 5 4 3 1 0 6 13 6 7 6 1 0 14 4 3 2 7 0 3 0 0 8 7 8
- 1 0 1 4 48 196 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesinglbase" xMin="104" yMin="-296" xMax="351" yMax="247">
- <contour>
- <pt x="104" y="-296" on="1"/>
- <pt x="104" y="-222" on="1"/>
- <pt x="200" y="-195" on="0"/>
- <pt x="200" y="-20" on="1"/>
- <pt x="200" y="0" on="1"/>
- <pt x="104" y="0" on="1"/>
- <pt x="104" y="247" on="1"/>
- <pt x="351" y="247" on="1"/>
- <pt x="351" y="33" on="1"/>
- <pt x="350" y="-270" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 37 values pushed */
- 8 5 4 3 1 0 6 13 6 7 6 1 0 14 4 3 2 7 0 3 0 0 8 7 8
- 1 0 1 4 48 196 6 5 1 0 3 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="quotesingle" xMin="72" yMin="1036" xMax="319" yMax="1579">
- <contour>
- <pt x="121" y="1036" on="1"/>
- <pt x="72" y="1579" on="1"/>
- <pt x="319" y="1579" on="1"/>
- <pt x="269" y="1036" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 13 values pushed */
- 2 1 1 3 0 1 2 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- LOOPCALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="r" xMin="154" yMin="0" xMax="668" yMax="1110">
- <contour>
- <pt x="154" y="0" on="1"/>
- <pt x="154" y="1086" on="1"/>
- <pt x="351" y="1086" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="394" y="985" on="0"/>
- <pt x="443" y="1036" on="1"/>
- <pt x="514" y="1110" on="0"/>
- <pt x="612" y="1110" on="1"/>
- <pt x="631" y="1110" on="0"/>
- <pt x="668" y="1105" on="1"/>
- <pt x="668" y="921" on="1"/>
- <pt x="616" y="938" on="0"/>
- <pt x="584" y="938" on="1"/>
- <pt x="475" y="938" on="0"/>
- <pt x="351" y="716" on="1"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 47 values pushed */
- 0 0 12 30 7 48 196 7 1 14 10 3 3 1 0 3 9 1 15 0 1 0 2 1 1
- 14 0 0 15 14 3 2 4 3 0 1 4 48 196 10 9 1 1 0 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00000]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="racute" xMin="154" yMin="0" xMax="722" yMax="1604">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="146" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="radicalex" xMin="99" yMin="1456" xMax="1040" yMax="1604">
- <contour>
- <pt x="99" y="1456" on="1"/>
- <pt x="99" y="1604" on="1"/>
- <pt x="1040" y="1604" on="1"/>
- <pt x="1040" y="1456" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="rcaron" xMin="2" yMin="0" xMax="702" yMax="1604">
- <component glyphName="r" x="1" y="0" flags="0x4"/>
- <component glyphName="caron" x="11" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="rcommaaccent" xMin="154" yMin="-432" xMax="668" yMax="1110">
- <component glyphName="r" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="-16" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="registered" xMin="15" yMin="0" xMax="1495" yMax="1480">
- <contour>
- <pt x="755" y="1480" on="1"/>
- <pt x="1060" y="1480" on="0"/>
- <pt x="1278" y="1263" on="1"/>
- <pt x="1495" y="1047" on="0"/>
- <pt x="1495" y="741" on="1"/>
- <pt x="1495" y="431" on="0"/>
- <pt x="1277" y="216" on="1"/>
- <pt x="1060" y="0" on="0"/>
- <pt x="746" y="0" on="1"/>
- <pt x="478" y="0" on="0"/>
- <pt x="277" y="176" on="1"/>
- <pt x="15" y="404" on="0"/>
- <pt x="15" y="741" on="1"/>
- <pt x="15" y="1047" on="0"/>
- <pt x="232" y="1263" on="1"/>
- <pt x="450" y="1480" on="0"/>
- </contour>
- <contour>
- <pt x="755" y="1375" on="1"/>
- <pt x="494" y="1375" on="0"/>
- <pt x="307" y="1188" on="1"/>
- <pt x="121" y="1002" on="0"/>
- <pt x="121" y="740" on="1"/>
- <pt x="121" y="482" on="0"/>
- <pt x="306" y="294" on="1"/>
- <pt x="491" y="106" on="0"/>
- <pt x="748" y="106" on="1"/>
- <pt x="987" y="106" on="0"/>
- <pt x="1164" y="256" on="1"/>
- <pt x="1390" y="448" on="0"/>
- <pt x="1390" y="741" on="1"/>
- <pt x="1390" y="1003" on="0"/>
- <pt x="1203" y="1188" on="1"/>
- <pt x="1016" y="1375" on="0"/>
- </contour>
- <contour>
- <pt x="511" y="337" on="1"/>
- <pt x="511" y="1137" on="1"/>
- <pt x="763" y="1137" on="1"/>
- <pt x="1005" y="1137" on="0"/>
- <pt x="1005" y="942" on="1"/>
- <pt x="1005" y="803" on="0"/>
- <pt x="865" y="709" on="1"/>
- <pt x="1106" y="337" on="1"/>
- <pt x="957" y="337" on="1"/>
- <pt x="741" y="671" on="1"/>
- <pt x="640" y="671" on="1"/>
- <pt x="640" y="337" on="1"/>
- </contour>
- <contour>
- <pt x="632" y="770" on="1"/>
- <pt x="668" y="770" on="1"/>
- <pt x="880" y="770" on="0"/>
- <pt x="880" y="925" on="1"/>
- <pt x="880" y="1055" on="0"/>
- <pt x="703" y="1055" on="1"/>
- <pt x="632" y="1055" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 83 values pushed */
- 0 0 24 20 8 16 20 0 48 196 8 2 0 0 50 49 45 44 42 41 38 7 33 32 3
- 34 33 1 43 40 39 32 3 2 0 14 0 0 47 6 36 28 17 4 20 17 12 48 196 49
- 45 41 40 39 38 34 7 13 36 4 42 12 32 0 0 43 42 18 1 32 50 44 19 1 32
- 2 4 48 196 33 32 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ring" xMin="114" yMin="1283" xMax="568" yMax="1737">
- <contour>
- <pt x="341" y="1737" on="1"/>
- <pt x="435" y="1737" on="0"/>
- <pt x="501" y="1671" on="1"/>
- <pt x="568" y="1605" on="0"/>
- <pt x="568" y="1511" on="1"/>
- <pt x="568" y="1415" on="0"/>
- <pt x="501" y="1349" on="1"/>
- <pt x="435" y="1283" on="0"/>
- <pt x="339" y="1283" on="1"/>
- <pt x="256" y="1283" on="0"/>
- <pt x="194" y="1337" on="1"/>
- <pt x="114" y="1406" on="0"/>
- <pt x="114" y="1510" on="1"/>
- <pt x="114" y="1604" on="0"/>
- <pt x="180" y="1670" on="1"/>
- <pt x="246" y="1737" on="0"/>
- </contour>
- <contour>
- <pt x="341" y="1650" on="1"/>
- <pt x="283" y="1650" on="0"/>
- <pt x="241" y="1609" on="1"/>
- <pt x="200" y="1569" on="0"/>
- <pt x="200" y="1510" on="1"/>
- <pt x="200" y="1452" on="0"/>
- <pt x="241" y="1411" on="1"/>
- <pt x="282" y="1369" on="0"/>
- <pt x="339" y="1369" on="1"/>
- <pt x="393" y="1369" on="0"/>
- <pt x="432" y="1402" on="1"/>
- <pt x="482" y="1445" on="0"/>
- <pt x="482" y="1511" on="1"/>
- <pt x="482" y="1569" on="0"/>
- <pt x="440" y="1609" on="1"/>
- <pt x="399" y="1650" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 25 values pushed */
- 0 0 24 44 8 16 44 0 48 196 8 0 14 0 0 28 32 4 20 32 12 48 196 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="s" xMin="116" yMin="-25" xMax="908" yMax="1110">
- <contour>
- <pt x="116" y="38" on="1"/>
- <pt x="116" y="219" on="1"/>
- <pt x="315" y="123" on="0"/>
- <pt x="483" y="123" on="1"/>
- <pt x="710" y="123" on="0"/>
- <pt x="710" y="283" on="1"/>
- <pt x="710" y="393" on="0"/>
- <pt x="551" y="445" on="1"/>
- <pt x="375" y="503" on="1"/>
- <pt x="122" y="586" on="0"/>
- <pt x="122" y="807" on="1"/>
- <pt x="122" y="1110" on="0"/>
- <pt x="536" y="1110" on="1"/>
- <pt x="655" y="1110" on="0"/>
- <pt x="825" y="1078" on="1"/>
- <pt x="825" y="913" on="1"/>
- <pt x="674" y="962" on="0"/>
- <pt x="523" y="962" on="1"/>
- <pt x="317" y="962" on="0"/>
- <pt x="317" y="827" on="1"/>
- <pt x="317" y="729" on="0"/>
- <pt x="458" y="683" on="1"/>
- <pt x="615" y="632" on="1"/>
- <pt x="908" y="537" on="0"/>
- <pt x="908" y="302" on="1"/>
- <pt x="908" y="151" on="0"/>
- <pt x="792" y="63" on="1"/>
- <pt x="676" y="-25" on="0"/>
- <pt x="475" y="-25" on="1"/>
- <pt x="316" y="-25" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 52 values pushed */
- 0 0 17 40 12 3 40 28 48 196 28 2 12 1 1 1 15 14 1 0 4 1 2 3 0
- 0 14 0 0 19 41 10 5 41 24 48 196 10 10 14 0 2 24 14 15 14 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sacute" xMin="116" yMin="-25" xMax="908" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="294" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scaron" xMin="116" yMin="-25" xMax="908" yMax="1604">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="208" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scedilla" xMin="116" yMin="-432" xMax="908" yMax="1110">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="cedilla" x="165" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="scircumflex" xMin="116" yMin="-25" xMax="908" yMax="1604">
- <contour>
- <pt x="116" y="38" on="1"/>
- <pt x="116" y="219" on="1"/>
- <pt x="315" y="123" on="0"/>
- <pt x="483" y="123" on="1"/>
- <pt x="710" y="123" on="0"/>
- <pt x="710" y="283" on="1"/>
- <pt x="710" y="393" on="0"/>
- <pt x="551" y="445" on="1"/>
- <pt x="375" y="503" on="1"/>
- <pt x="122" y="586" on="0"/>
- <pt x="122" y="807" on="1"/>
- <pt x="122" y="1110" on="0"/>
- <pt x="536" y="1110" on="1"/>
- <pt x="655" y="1110" on="0"/>
- <pt x="825" y="1078" on="1"/>
- <pt x="825" y="913" on="1"/>
- <pt x="674" y="962" on="0"/>
- <pt x="523" y="962" on="1"/>
- <pt x="317" y="962" on="0"/>
- <pt x="317" y="827" on="1"/>
- <pt x="317" y="729" on="0"/>
- <pt x="458" y="683" on="1"/>
- <pt x="615" y="632" on="1"/>
- <pt x="908" y="537" on="0"/>
- <pt x="908" y="302" on="1"/>
- <pt x="908" y="151" on="0"/>
- <pt x="792" y="63" on="1"/>
- <pt x="676" y="-25" on="0"/>
- <pt x="475" y="-25" on="1"/>
- <pt x="316" y="-25" on="0"/>
- </contour>
- <contour>
- <pt x="199" y="1283" on="1"/>
- <pt x="440" y="1604" on="1"/>
- <pt x="658" y="1604" on="1"/>
- <pt x="899" y="1283" on="1"/>
- <pt x="751" y="1283" on="1"/>
- <pt x="550" y="1485" on="1"/>
- <pt x="548" y="1485" on="1"/>
- <pt x="347" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 77 values pushed */
- 0 0 17 40 12 3 40 28 48 196 28 2 12 1 36 35 2 31 30 3 1 1 15 14 1
- 0 4 1 2 3 0 0 32 31 1 37 34 33 30 3 2 0 14 0 0 19 41 10 5 41
- 24 48 196 10 37 36 35 34 32 31 30 10 8 14 0 3 33 24 14 15 14 1 1 0 1
- 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="scommaaccent" xMin="116" yMin="-432" xMax="908" yMax="1110">
- <component glyphName="s" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="197" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="section" xMin="129" yMin="-334" xMax="1010" yMax="1517">
- <contour>
- <pt x="129" y="-260" on="1"/>
- <pt x="129" y="-80" on="1"/>
- <pt x="379" y="-185" on="0"/>
- <pt x="541" y="-185" on="1"/>
- <pt x="667" y="-185" on="0"/>
- <pt x="749" y="-135" on="1"/>
- <pt x="830" y="-85" on="0"/>
- <pt x="830" y="-3" on="1"/>
- <pt x="830" y="72" on="0"/>
- <pt x="769" y="114" on="1"/>
- <pt x="719" y="150" on="0"/>
- <pt x="600" y="201" on="1"/>
- <pt x="423" y="277" on="1"/>
- <pt x="134" y="401" on="0"/>
- <pt x="134" y="613" on="1"/>
- <pt x="134" y="758" on="0"/>
- <pt x="280" y="912" on="1"/>
- <pt x="139" y="1011" on="0"/>
- <pt x="139" y="1156" on="1"/>
- <pt x="139" y="1317" on="0"/>
- <pt x="269" y="1417" on="1"/>
- <pt x="398" y="1517" on="0"/>
- <pt x="611" y="1517" on="1"/>
- <pt x="756" y="1517" on="0"/>
- <pt x="954" y="1470" on="1"/>
- <pt x="954" y="1310" on="1"/>
- <pt x="747" y="1369" on="0"/>
- <pt x="608" y="1369" on="1"/>
- <pt x="478" y="1369" on="0"/>
- <pt x="398" y="1318" on="1"/>
- <pt x="318" y="1267" on="0"/>
- <pt x="318" y="1186" on="1"/>
- <pt x="318" y="1077" on="0"/>
- <pt x="493" y="1006" on="1"/>
- <pt x="629" y="951" on="1"/>
- <pt x="837" y="867" on="0"/>
- <pt x="915" y="789" on="1"/>
- <pt x="995" y="709" on="0"/>
- <pt x="995" y="589" on="1"/>
- <pt x="995" y="448" on="0"/>
- <pt x="846" y="277" on="1"/>
- <pt x="1010" y="176" on="0"/>
- <pt x="1010" y="9" on="1"/>
- <pt x="1010" y="-148" on="0"/>
- <pt x="876" y="-241" on="1"/>
- <pt x="743" y="-334" on="0"/>
- <pt x="523" y="-334" on="1"/>
- <pt x="369" y="-334" on="0"/>
- </contour>
- <contour>
- <pt x="748" y="341" on="1"/>
- <pt x="822" y="443" on="0"/>
- <pt x="822" y="534" on="1"/>
- <pt x="822" y="607" on="0"/>
- <pt x="774" y="654" on="1"/>
- <pt x="726" y="701" on="0"/>
- <pt x="602" y="753" on="1"/>
- <pt x="380" y="846" on="1"/>
- <pt x="306" y="751" on="0"/>
- <pt x="306" y="664" on="1"/>
- <pt x="306" y="529" on="0"/>
- <pt x="536" y="431" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 66 values pushed */
- 0 0 27 40 22 3 40 46 48 196 22 0 1 55 48 40 25 24 16 1 0 8 13 46 0
- 0 14 0 0 57 13 14 50 13 38 31 14 18 7 14 42 48 196 18 14 55 48 40 18 16
- 14 6 24 0 3 42 38 24 25 24 1 1 0 1 2 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- CALL[ ]
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon" xMin="186" yMin="-321" xMax="383" yMax="1086">
- <contour>
- <pt x="186" y="-321" on="1"/>
- <pt x="186" y="-247" on="1"/>
- <pt x="257" y="-210" on="0"/>
- <pt x="257" y="-23" on="1"/>
- <pt x="257" y="0" on="1"/>
- <pt x="186" y="0" on="1"/>
- <pt x="186" y="197" on="1"/>
- <pt x="383" y="197" on="1"/>
- <pt x="383" y="31" on="1"/>
- <pt x="382" y="-271" on="0"/>
- </contour>
- <contour>
- <pt x="186" y="888" on="1"/>
- <pt x="186" y="1086" on="1"/>
- <pt x="383" y="1086" on="1"/>
- <pt x="383" y="888" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 1 8 6 2 2 0 1 5 4 3 1 0 5 13 2 0 0 0 13 10 5 1 11 1 4
- 48 196 7 6 1 0 12 11 1 14 4 3 2 7 0 3 0 0 13 12 8 7 4 3 0
- 1 4 48 196 11 10 6 5 1 0 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="semicolon#1" xMin="186" yMin="-321" xMax="383" yMax="1086">
- <contour>
- <pt x="186" y="-321" on="1"/>
- <pt x="186" y="-247" on="1"/>
- <pt x="257" y="-210" on="0"/>
- <pt x="257" y="-23" on="1"/>
- <pt x="257" y="0" on="1"/>
- <pt x="186" y="0" on="1"/>
- <pt x="186" y="197" on="1"/>
- <pt x="383" y="197" on="1"/>
- <pt x="383" y="31" on="1"/>
- <pt x="382" y="-271" on="0"/>
- </contour>
- <contour>
- <pt x="186" y="888" on="1"/>
- <pt x="186" y="1086" on="1"/>
- <pt x="383" y="1086" on="1"/>
- <pt x="383" y="888" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 62 values pushed */
- 1 8 6 2 2 0 1 5 4 3 1 0 5 13 2 0 0 0 13 10 5 1 11 1 4
- 48 196 7 6 1 0 12 11 1 14 4 3 2 7 0 3 0 0 13 12 8 7 4 3 0
- 1 4 48 196 11 10 6 5 1 0 5 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="seven" xMin="136" yMin="0" xMax="1086" yMax="1480">
- <contour>
- <pt x="222" y="0" on="1"/>
- <pt x="251" y="173" on="0"/>
- <pt x="304" y="299" on="1"/>
- <pt x="357" y="424" on="0"/>
- <pt x="494" y="645" on="1"/>
- <pt x="898" y="1295" on="1"/>
- <pt x="136" y="1295" on="1"/>
- <pt x="136" y="1480" on="1"/>
- <pt x="1086" y="1480" on="1"/>
- <pt x="1086" y="1295" on="1"/>
- <pt x="517" y="456" on="0"/>
- <pt x="449" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 35 values pushed */
- 0 0 9 6 5 27 2 7 1 4 48 196 11 0 1 0 8 7 0 14 11 5 0 3 8
- 6 3 9 8 1 7 6 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="sfthyphen" xMin="88" yMin="518" xMax="594" yMax="666">
- <contour>
- <pt x="88" y="518" on="1"/>
- <pt x="88" y="666" on="1"/>
- <pt x="594" y="666" on="1"/>
- <pt x="594" y="518" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="six" xMin="84" yMin="-37" xMax="1027" yMax="1518">
- <contour>
- <pt x="298" y="778" on="1"/>
- <pt x="436" y="950" on="0"/>
- <pt x="635" y="950" on="1"/>
- <pt x="817" y="950" on="0"/>
- <pt x="922" y="826" on="1"/>
- <pt x="1027" y="703" on="0"/>
- <pt x="1027" y="486" on="1"/>
- <pt x="1027" y="245" on="0"/>
- <pt x="903" y="104" on="1"/>
- <pt x="779" y="-37" on="0"/>
- <pt x="571" y="-37" on="1"/>
- <pt x="344" y="-37" on="0"/>
- <pt x="214" y="158" on="1"/>
- <pt x="84" y="352" on="0"/>
- <pt x="84" y="693" on="1"/>
- <pt x="84" y="1080" on="0"/>
- <pt x="239" y="1299" on="1"/>
- <pt x="394" y="1518" on="0"/>
- <pt x="668" y="1518" on="1"/>
- <pt x="794" y="1518" on="0"/>
- <pt x="947" y="1462" on="1"/>
- <pt x="947" y="1290" on="1"/>
- <pt x="766" y="1370" on="0"/>
- <pt x="664" y="1370" on="1"/>
- <pt x="443" y="1370" on="0"/>
- <pt x="354" y="1148" on="1"/>
- <pt x="319" y="1060" on="0"/>
- <pt x="307" y="951" on="1"/>
- <pt x="300" y="893" on="0"/>
- </contour>
- <contour>
- <pt x="582" y="808" on="1"/>
- <pt x="458" y="808" on="0"/>
- <pt x="382" y="722" on="1"/>
- <pt x="305" y="636" on="0"/>
- <pt x="305" y="489" on="1"/>
- <pt x="305" y="325" on="0"/>
- <pt x="384" y="218" on="1"/>
- <pt x="463" y="111" on="0"/>
- <pt x="589" y="111" on="1"/>
- <pt x="833" y="111" on="0"/>
- <pt x="833" y="445" on="1"/>
- <pt x="833" y="808" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 50 values pushed */
- 0 0 37 40 10 29 40 2 23 40 18 48 196 18 0 10 2 2 1 1 21 20 2 0 4
- 0 2 3 0 0 14 0 0 39 41 6 33 26 14 48 196 6 20 0 14 20 21 20 1 0
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="slash" xMin="-59" yMin="-296" xMax="629" yMax="1480">
- <contour>
- <pt x="-59" y="-296" on="1"/>
- <pt x="474" y="1480" on="1"/>
- <pt x="629" y="1480" on="1"/>
- <pt x="96" y="-296" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 12 values pushed */
- 3 0 1 0 2 1 0 14 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="space"/><!-- contains no outline data -->
-
- <TTGlyph name="sterling" xMin="121" yMin="0" xMax="966" yMax="1517">
- <contour>
- <pt x="121" y="0" on="1"/>
- <pt x="121" y="173" on="1"/>
- <pt x="330" y="240" on="0"/>
- <pt x="331" y="489" on="1"/>
- <pt x="331" y="716" on="1"/>
- <pt x="152" y="716" on="1"/>
- <pt x="152" y="864" on="1"/>
- <pt x="331" y="864" on="1"/>
- <pt x="331" y="1079" on="1"/>
- <pt x="331" y="1292" on="0"/>
- <pt x="432" y="1404" on="1"/>
- <pt x="533" y="1517" on="0"/>
- <pt x="725" y="1517" on="1"/>
- <pt x="827" y="1517" on="0"/>
- <pt x="951" y="1487" on="1"/>
- <pt x="951" y="1320" on="1"/>
- <pt x="822" y="1369" on="0"/>
- <pt x="716" y="1369" on="1"/>
- <pt x="528" y="1369" on="0"/>
- <pt x="528" y="1139" on="1"/>
- <pt x="528" y="864" on="1"/>
- <pt x="744" y="864" on="1"/>
- <pt x="744" y="716" on="1"/>
- <pt x="528" y="716" on="1"/>
- <pt x="528" y="589" on="1"/>
- <pt x="528" y="409" on="0"/>
- <pt x="480" y="319" on="1"/>
- <pt x="442" y="245" on="0"/>
- <pt x="355" y="173" on="1"/>
- <pt x="966" y="173" on="1"/>
- <pt x="966" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 17 40 12 48 196 12 0 1 19 15 8 3 0 6 3 0 24 3 2 4 1 3 1
- 14 0 0 0 0 23 22 5 4 7 3 6 29 28 1 13 2 0 2 4 48 196 21 20 7
- 6 3 30 0 1 2 0 14 28 19 3 2 0 0 24 23 20 19 4 3 3 1 4 48 196
- 30 29 1 15 14 1 22 21 1 8 7 4 3 3 6 5 1 1 0 1 6 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="t" xMin="29" yMin="-25" xMax="559" yMax="1302">
- <contour>
- <pt x="530" y="-6" on="1"/>
- <pt x="470" y="-25" on="0"/>
- <pt x="417" y="-25" on="1"/>
- <pt x="152" y="-25" on="0"/>
- <pt x="152" y="300" on="1"/>
- <pt x="152" y="938" on="1"/>
- <pt x="29" y="938" on="1"/>
- <pt x="29" y="1086" on="1"/>
- <pt x="152" y="1086" on="1"/>
- <pt x="152" y="1283" on="1"/>
- <pt x="349" y="1302" on="1"/>
- <pt x="349" y="1086" on="1"/>
- <pt x="559" y="1086" on="1"/>
- <pt x="559" y="938" on="1"/>
- <pt x="349" y="938" on="1"/>
- <pt x="349" y="336" on="1"/>
- <pt x="349" y="207" on="0"/>
- <pt x="371" y="165" on="1"/>
- <pt x="393" y="123" on="0"/>
- <pt x="463" y="123" on="1"/>
- <pt x="501" y="123" on="0"/>
- <pt x="530" y="134" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 76 values pushed */
- 0 0 19 40 2 48 196 2 2 1 21 15 4 3 5 2 3 0 10 9 2 13 7 1 0
- 2 0 0 0 14 13 6 5 7 3 7 1 4 48 196 12 11 8 7 1 3 14 0 0 15
- 14 11 10 4 3 4 1 4 48 196 13 12 1 21 0 1 9 8 5 4 3 7 6 1 4
- 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tbar" xMin="29" yMin="-25" xMax="559" yMax="1302">
- <contour>
- <pt x="152" y="568" on="1"/>
- <pt x="29" y="568" on="1"/>
- <pt x="29" y="691" on="1"/>
- <pt x="152" y="691" on="1"/>
- <pt x="152" y="938" on="1"/>
- <pt x="29" y="938" on="1"/>
- <pt x="29" y="1086" on="1"/>
- <pt x="152" y="1086" on="1"/>
- <pt x="152" y="1283" on="1"/>
- <pt x="349" y="1302" on="1"/>
- <pt x="349" y="1086" on="1"/>
- <pt x="559" y="1086" on="1"/>
- <pt x="559" y="938" on="1"/>
- <pt x="349" y="938" on="1"/>
- <pt x="349" y="691" on="1"/>
- <pt x="559" y="691" on="1"/>
- <pt x="559" y="568" on="1"/>
- <pt x="349" y="568" on="1"/>
- <pt x="349" y="336" on="1"/>
- <pt x="349" y="207" on="0"/>
- <pt x="371" y="165" on="1"/>
- <pt x="393" y="123" on="0"/>
- <pt x="463" y="123" on="1"/>
- <pt x="501" y="123" on="0"/>
- <pt x="530" y="134" on="1"/>
- <pt x="530" y="-6" on="1"/>
- <pt x="470" y="-25" on="0"/>
- <pt x="417" y="-25" on="1"/>
- <pt x="152" y="-25" on="0"/>
- <pt x="152" y="300" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 0 0 22 40 27 48 196 27 2 1 29 24 18 3 0 2 3 0 9 8 2 13 6 1 25
- 2 0 0 0 13 12 5 4 7 3 6 17 16 1 0 6 3 2 2 4 48 196 15 14 3
- 2 3 0 11 10 7 6 1 3 14 0 0 18 17 14 13 10 9 4 5 0 1 4 48 196
- 16 15 12 11 3 25 24 1 29 8 7 4 3 0 5 6 5 2 1 3 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcaron" xMin="29" yMin="-25" xMax="719" yMax="1688">
- <contour>
- <pt x="530" y="-6" on="1"/>
- <pt x="470" y="-25" on="0"/>
- <pt x="417" y="-25" on="1"/>
- <pt x="152" y="-25" on="0"/>
- <pt x="152" y="300" on="1"/>
- <pt x="152" y="938" on="1"/>
- <pt x="29" y="938" on="1"/>
- <pt x="29" y="1086" on="1"/>
- <pt x="152" y="1086" on="1"/>
- <pt x="152" y="1283" on="1"/>
- <pt x="349" y="1302" on="1"/>
- <pt x="349" y="1086" on="1"/>
- <pt x="559" y="1086" on="1"/>
- <pt x="559" y="938" on="1"/>
- <pt x="349" y="938" on="1"/>
- <pt x="349" y="336" on="1"/>
- <pt x="349" y="207" on="0"/>
- <pt x="371" y="165" on="1"/>
- <pt x="393" y="123" on="0"/>
- <pt x="463" y="123" on="1"/>
- <pt x="501" y="123" on="0"/>
- <pt x="530" y="134" on="1"/>
- </contour>
- <contour>
- <pt x="522" y="1234" on="1"/>
- <pt x="522" y="1293" on="1"/>
- <pt x="598" y="1314" on="0"/>
- <pt x="598" y="1474" on="1"/>
- <pt x="598" y="1491" on="1"/>
- <pt x="522" y="1491" on="1"/>
- <pt x="522" y="1688" on="1"/>
- <pt x="719" y="1688" on="1"/>
- <pt x="719" y="1517" on="1"/>
- <pt x="718" y="1255" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 103 values pushed */
- 0 0 19 40 2 48 196 2 2 30 27 26 25 23 22 10 9 8 28 7 3 1 21 15 4
- 3 5 2 3 0 1 0 2 0 0 0 14 13 6 5 7 3 7 1 4 48 196 29 28 1
- 0 12 11 8 7 1 3 14 26 25 2 29 12 3 0 0 28 27 23 22 4 3 29 15 14
- 11 10 4 3 4 2 4 48 196 30 29 1 13 12 1 21 0 1 9 8 5 4 3 7 6
- 1 5 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommaaccent" xMin="29" yMin="-432" xMax="559" yMax="1302">
- <contour>
- <pt x="530" y="-6" on="1"/>
- <pt x="470" y="-25" on="0"/>
- <pt x="417" y="-25" on="1"/>
- <pt x="152" y="-25" on="0"/>
- <pt x="152" y="300" on="1"/>
- <pt x="152" y="938" on="1"/>
- <pt x="29" y="938" on="1"/>
- <pt x="29" y="1086" on="1"/>
- <pt x="152" y="1086" on="1"/>
- <pt x="152" y="1283" on="1"/>
- <pt x="349" y="1302" on="1"/>
- <pt x="349" y="1086" on="1"/>
- <pt x="559" y="1086" on="1"/>
- <pt x="559" y="938" on="1"/>
- <pt x="349" y="938" on="1"/>
- <pt x="349" y="336" on="1"/>
- <pt x="349" y="207" on="0"/>
- <pt x="371" y="165" on="1"/>
- <pt x="393" y="123" on="0"/>
- <pt x="463" y="123" on="1"/>
- <pt x="501" y="123" on="0"/>
- <pt x="530" y="134" on="1"/>
- </contour>
- <contour>
- <pt x="299" y="0" on="1"/>
- <pt x="396" y="0" on="1"/>
- <pt x="336" y="-109" on="1"/>
- <pt x="408" y="-111" on="0"/>
- <pt x="460" y="-148" on="1"/>
- <pt x="530" y="-197" on="0"/>
- <pt x="530" y="-268" on="1"/>
- <pt x="530" y="-337" on="0"/>
- <pt x="472" y="-384" on="1"/>
- <pt x="413" y="-432" on="0"/>
- <pt x="327" y="-432" on="1"/>
- <pt x="259" y="-432" on="0"/>
- <pt x="183" y="-411" on="1"/>
- <pt x="183" y="-330" on="1"/>
- <pt x="233" y="-345" on="0"/>
- <pt x="287" y="-345" on="1"/>
- <pt x="391" y="-345" on="0"/>
- <pt x="391" y="-271" on="1"/>
- <pt x="391" y="-178" on="0"/>
- <pt x="204" y="-175" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 109 values pushed */
- 0 0 37 44 32 19 40 2 48 196 2 2 1 21 15 4 3 5 2 3 0 10 9 2 13
- 7 1 41 35 34 24 23 22 0 7 13 32 2 0 0 0 14 13 6 5 7 3 7 1 4
- 48 196 12 11 8 7 1 3 14 0 0 39 42 28 48 196 23 0 10 2 41 35 34 24 22
- 5 10 4 3 0 0 15 14 11 10 4 3 4 1 4 48 196 13 12 1 28 21 0 2 9
- 8 5 4 3 7 6 1 4 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tcommabelow" xMin="29" yMin="-432" xMax="559" yMax="1302">
- <component glyphName="t" x="0" y="0" flags="0x4"/>
- <component glyphName="Unterkomma" x="7" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="thorn" xMin="154" yMin="-395" xMax="1052" yMax="1579">
- <contour>
- <pt x="351" y="-395" on="1"/>
- <pt x="154" y="-395" on="1"/>
- <pt x="154" y="1579" on="1"/>
- <pt x="351" y="1579" on="1"/>
- <pt x="351" y="882" on="1"/>
- <pt x="407" y="984" on="0"/>
- <pt x="469" y="1036" on="1"/>
- <pt x="557" y="1110" on="0"/>
- <pt x="676" y="1110" on="1"/>
- <pt x="845" y="1110" on="0"/>
- <pt x="948" y="963" on="1"/>
- <pt x="1052" y="816" on="0"/>
- <pt x="1052" y="572" on="1"/>
- <pt x="1052" y="287" on="0"/>
- <pt x="918" y="131" on="1"/>
- <pt x="785" y="-25" on="0"/>
- <pt x="540" y="-25" on="1"/>
- <pt x="449" y="-25" on="0"/>
- <pt x="351" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="351" y="703" on="1"/>
- <pt x="351" y="149" on="1"/>
- <pt x="488" y="123" on="0"/>
- <pt x="557" y="123" on="1"/>
- <pt x="839" y="123" on="0"/>
- <pt x="839" y="552" on="1"/>
- <pt x="839" y="733" on="0"/>
- <pt x="783" y="835" on="1"/>
- <pt x="728" y="938" on="0"/>
- <pt x="634" y="938" on="1"/>
- <pt x="508" y="938" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 68 values pushed */
- 0 0 28 30 8 22 40 16 48 196 16 2 8 1 1 1 20 19 4 3 1 2 3 0 0
- 1 18 2 0 2 0 3 2 1 1 0 1 2 0 14 0 0 24 9 12 48 196 12 0 0
- 0 20 19 18 4 3 0 4 5 1 1 4 48 196 2 1 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="three" xMin="153" yMin="-37" xMax="966" yMax="1517">
- <contour>
- <pt x="153" y="11" on="1"/>
- <pt x="153" y="195" on="1"/>
- <pt x="160" y="192" on="1"/>
- <pt x="186" y="181" on="0"/>
- <pt x="197" y="178" on="1"/>
- <pt x="306" y="138" on="0"/>
- <pt x="345" y="128" on="1"/>
- <pt x="410" y="111" on="0"/>
- <pt x="463" y="111" on="1"/>
- <pt x="614" y="111" on="0"/>
- <pt x="689" y="195" on="1"/>
- <pt x="755" y="267" on="0"/>
- <pt x="755" y="400" on="1"/>
- <pt x="755" y="555" on="0"/>
- <pt x="654" y="637" on="1"/>
- <pt x="554" y="719" on="0"/>
- <pt x="368" y="719" on="1"/>
- <pt x="290" y="719" on="1"/>
- <pt x="290" y="852" on="1"/>
- <pt x="358" y="853" on="1"/>
- <pt x="530" y="856" on="0"/>
- <pt x="623" y="932" on="1"/>
- <pt x="720" y="1010" on="0"/>
- <pt x="720" y="1147" on="1"/>
- <pt x="720" y="1369" on="0"/>
- <pt x="481" y="1369" on="1"/>
- <pt x="358" y="1369" on="0"/>
- <pt x="173" y="1286" on="1"/>
- <pt x="173" y="1458" on="1"/>
- <pt x="354" y="1517" on="0"/>
- <pt x="493" y="1517" on="1"/>
- <pt x="734" y="1517" on="0"/>
- <pt x="839" y="1402" on="1"/>
- <pt x="917" y="1317" on="0"/>
- <pt x="917" y="1176" on="1"/>
- <pt x="917" y="1017" on="0"/>
- <pt x="805" y="914" on="1"/>
- <pt x="739" y="853" on="0"/>
- <pt x="609" y="802" on="1"/>
- <pt x="723" y="772" on="0"/>
- <pt x="781" y="738" on="1"/>
- <pt x="966" y="631" on="0"/>
- <pt x="966" y="408" on="1"/>
- <pt x="966" y="206" on="0"/>
- <pt x="833" y="85" on="1"/>
- <pt x="700" y="-37" on="0"/>
- <pt x="483" y="-37" on="1"/>
- <pt x="366" y="-37" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 65 values pushed */
- 0 0 25 40 30 8 40 46 48 196 46 2 30 0 1 1 38 28 27 18 17 16 1 0 8
- 0 2 3 0 0 14 0 0 23 41 34 12 9 42 48 196 38 18 17 16 4 13 42 34 27
- 0 0 28 27 23 1 0 1 5 48 196 1 0 1 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- CALL[ ]
- SZP0[ ]
- SZP1[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threequarters" xMin="111" yMin="-37" xMax="1597" yMax="1517">
- <contour>
- <pt x="123" y="1353" on="1"/>
- <pt x="123" y="1465" on="1"/>
- <pt x="237" y="1503" on="0"/>
- <pt x="349" y="1503" on="1"/>
- <pt x="631" y="1503" on="0"/>
- <pt x="631" y="1295" on="1"/>
- <pt x="631" y="1199" on="0"/>
- <pt x="562" y="1137" on="1"/>
- <pt x="521" y="1101" on="0"/>
- <pt x="440" y="1071" on="1"/>
- <pt x="568" y="1038" on="0"/>
- <pt x="619" y="970" on="1"/>
- <pt x="660" y="914" on="0"/>
- <pt x="660" y="832" on="1"/>
- <pt x="660" y="711" on="0"/>
- <pt x="573" y="641" on="1"/>
- <pt x="487" y="570" on="0"/>
- <pt x="335" y="570" on="1"/>
- <pt x="233" y="570" on="0"/>
- <pt x="111" y="599" on="1"/>
- <pt x="111" y="721" on="1"/>
- <pt x="246" y="670" on="0"/>
- <pt x="324" y="670" on="1"/>
- <pt x="504" y="670" on="0"/>
- <pt x="504" y="831" on="1"/>
- <pt x="504" y="1015" on="0"/>
- <pt x="244" y="1015" on="1"/>
- <pt x="193" y="1015" on="1"/>
- <pt x="193" y="1108" on="1"/>
- <pt x="237" y="1108" on="1"/>
- <pt x="481" y="1108" on="0"/>
- <pt x="481" y="1275" on="1"/>
- <pt x="481" y="1403" on="0"/>
- <pt x="326" y="1403" on="1"/>
- <pt x="235" y="1403" on="0"/>
- </contour>
- <contour>
- <pt x="1338" y="0" on="1"/>
- <pt x="1338" y="242" on="1"/>
- <pt x="931" y="242" on="1"/>
- <pt x="931" y="355" on="1"/>
- <pt x="1334" y="888" on="1"/>
- <pt x="1473" y="888" on="1"/>
- <pt x="1473" y="359" on="1"/>
- <pt x="1597" y="359" on="1"/>
- <pt x="1597" y="242" on="1"/>
- <pt x="1473" y="242" on="1"/>
- <pt x="1473" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="1060" y="359" on="1"/>
- <pt x="1338" y="359" on="1"/>
- <pt x="1338" y="723" on="1"/>
- </contour>
- <contour>
- <pt x="284" y="-37" on="1"/>
- <pt x="1372" y="1517" on="1"/>
- <pt x="1507" y="1517" on="1"/>
- <pt x="419" y="-37" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 126 values pushed */
- 0 0 33 11 3 22 11 17 48 196 17 48 20 19 17 4 39 41 3 38 41 36 2 51 50
- 29 28 27 26 9 1 0 9 13 3 39 52 49 45 35 4 13 36 0 0 47 46 42 41 38
- 3 36 1 4 48 196 40 39 1 44 43 37 36 3 2 0 14 0 0 31 39 5 24 37 13
- 48 196 50 40 35 2 51 43 42 3 13 40 52 49 46 39 38 37 29 28 27 26 20 19 9
- 1 0 15 13 13 5 35 0 0 48 47 36 35 22 3 40 1 4 48 196 45 44 41 40 3
- 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00100]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="threesuperior" xMin="74" yMin="570" xMax="623" yMax="1503">
- <contour>
- <pt x="86" y="1353" on="1"/>
- <pt x="86" y="1465" on="1"/>
- <pt x="200" y="1503" on="0"/>
- <pt x="312" y="1503" on="1"/>
- <pt x="594" y="1503" on="0"/>
- <pt x="594" y="1295" on="1"/>
- <pt x="594" y="1199" on="0"/>
- <pt x="525" y="1137" on="1"/>
- <pt x="484" y="1101" on="0"/>
- <pt x="403" y="1071" on="1"/>
- <pt x="531" y="1038" on="0"/>
- <pt x="582" y="970" on="1"/>
- <pt x="623" y="914" on="0"/>
- <pt x="623" y="832" on="1"/>
- <pt x="623" y="711" on="0"/>
- <pt x="536" y="641" on="1"/>
- <pt x="450" y="570" on="0"/>
- <pt x="298" y="570" on="1"/>
- <pt x="196" y="570" on="0"/>
- <pt x="74" y="599" on="1"/>
- <pt x="74" y="721" on="1"/>
- <pt x="209" y="670" on="0"/>
- <pt x="287" y="670" on="1"/>
- <pt x="467" y="670" on="0"/>
- <pt x="467" y="831" on="1"/>
- <pt x="467" y="1015" on="0"/>
- <pt x="207" y="1015" on="1"/>
- <pt x="156" y="1015" on="1"/>
- <pt x="156" y="1108" on="1"/>
- <pt x="200" y="1108" on="1"/>
- <pt x="444" y="1108" on="0"/>
- <pt x="444" y="1275" on="1"/>
- <pt x="444" y="1403" on="0"/>
- <pt x="289" y="1403" on="1"/>
- <pt x="198" y="1403" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 43 values pushed */
- 0 0 33 11 3 22 11 17 48 196 29 28 27 26 20 19 17 9 3 1 0 14 0 0 31
- 39 5 24 37 13 48 196 29 28 27 26 20 19 13 9 5 1 0
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="tilde" xMin="8" yMin="1283" xMax="674" yMax="1517">
- <contour>
- <pt x="8" y="1283" on="1"/>
- <pt x="15" y="1376" on="0"/>
- <pt x="40" y="1427" on="1"/>
- <pt x="86" y="1517" on="0"/>
- <pt x="195" y="1517" on="1"/>
- <pt x="267" y="1517" on="0"/>
- <pt x="328" y="1479" on="1"/>
- <pt x="388" y="1442" on="1"/>
- <pt x="445" y="1407" on="0"/>
- <pt x="475" y="1407" on="1"/>
- <pt x="540" y="1407" on="0"/>
- <pt x="551" y="1517" on="1"/>
- <pt x="674" y="1517" on="1"/>
- <pt x="667" y="1423" on="0"/>
- <pt x="642" y="1373" on="1"/>
- <pt x="597" y="1283" on="0"/>
- <pt x="489" y="1283" on="1"/>
- <pt x="417" y="1283" on="0"/>
- <pt x="354" y="1322" on="1"/>
- <pt x="294" y="1359" on="1"/>
- <pt x="239" y="1393" on="0"/>
- <pt x="207" y="1393" on="1"/>
- <pt x="142" y="1393" on="0"/>
- <pt x="131" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 30 values pushed */
- 0 0 21 6 4 9 6 16 48 196 4 0 1 12 11 2 13 0 0 1 23 0 16 0 0
- 14 23 12 11 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- MDRP[00100]
- MDRP[00000]
- MDRP[00000]
- SZP0[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="trademark" xMin="222" yMin="740" xMax="1764" yMax="1480">
- <contour>
- <pt x="469" y="740" on="1"/>
- <pt x="469" y="1357" on="1"/>
- <pt x="222" y="1357" on="1"/>
- <pt x="222" y="1480" on="1"/>
- <pt x="888" y="1480" on="1"/>
- <pt x="888" y="1357" on="1"/>
- <pt x="641" y="1357" on="1"/>
- <pt x="641" y="740" on="1"/>
- </contour>
- <contour>
- <pt x="1012" y="740" on="1"/>
- <pt x="1012" y="1480" on="1"/>
- <pt x="1245" y="1480" on="1"/>
- <pt x="1401" y="1053" on="1"/>
- <pt x="1551" y="1480" on="1"/>
- <pt x="1764" y="1480" on="1"/>
- <pt x="1764" y="740" on="1"/>
- <pt x="1591" y="740" on="1"/>
- <pt x="1591" y="1277" on="1"/>
- <pt x="1428" y="802" on="1"/>
- <pt x="1310" y="802" on="1"/>
- <pt x="1147" y="1234" on="1"/>
- <pt x="1147" y="740" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 97 values pushed */
- 1 19 16 2 1 1 3 0 1 18 17 11 3 1 0 3 0 0 0 6 5 2 1 6 3
- 3 1 4 48 196 20 15 14 8 7 0 5 0 13 12 10 9 4 3 0 5 14 18 17 12
- 11 10 5 15 19 3 5 4 2 8 6 3 3 2 0 0 0 16 15 13 1 13 9 8 18
- 1 19 7 6 13 1 0 3 4 48 196 14 13 1 20 19 1 1 0 1 3 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00000]
- MDRP[00000]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="two" xMin="102" yMin="0" xMax="941" yMax="1517">
- <contour>
- <pt x="102" y="0" on="1"/>
- <pt x="102" y="173" on="1"/>
- <pt x="170" y="333" on="0"/>
- <pt x="332" y="502" on="1"/>
- <pt x="440" y="612" on="1"/>
- <pt x="538" y="712" on="1"/>
- <pt x="731" y="909" on="0"/>
- <pt x="731" y="1107" on="1"/>
- <pt x="731" y="1248" on="0"/>
- <pt x="657" y="1315" on="1"/>
- <pt x="597" y="1370" on="0"/>
- <pt x="491" y="1370" on="1"/>
- <pt x="353" y="1370" on="0"/>
- <pt x="139" y="1250" on="1"/>
- <pt x="139" y="1424" on="1"/>
- <pt x="342" y="1517" on="0"/>
- <pt x="517" y="1517" on="1"/>
- <pt x="711" y="1517" on="0"/>
- <pt x="826" y="1404" on="1"/>
- <pt x="941" y="1292" on="0"/>
- <pt x="941" y="1102" on="1"/>
- <pt x="941" y="971" on="0"/>
- <pt x="882" y="870" on="1"/>
- <pt x="820" y="766" on="0"/>
- <pt x="658" y="620" on="1"/>
- <pt x="589" y="558" on="1"/>
- <pt x="382" y="370" on="0"/>
- <pt x="340" y="173" on="1"/>
- <pt x="933" y="173" on="1"/>
- <pt x="933" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 0 0 11 40 16 48 196 16 0 1 14 13 2 0 1 3 0 0 0 28 27 1 13 2 0
- 1 4 48 196 29 0 1 0 14 0 0 7 9 20 48 196 27 28 13 2 20 28 29 28 1
- 14 13 1 1 0 1 3 0
- LOOPCALL[ ]
- SRP0[ ]
- MDRP[00100]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="twosuperior" xMin="74" yMin="592" xMax="639" yMax="1503">
- <contour>
- <pt x="74" y="592" on="1"/>
- <pt x="74" y="714" on="1"/>
- <pt x="142" y="832" on="0"/>
- <pt x="256" y="933" on="1"/>
- <pt x="326" y="995" on="1"/>
- <pt x="482" y="1133" on="0"/>
- <pt x="482" y="1255" on="1"/>
- <pt x="482" y="1401" on="0"/>
- <pt x="321" y="1401" on="1"/>
- <pt x="226" y="1401" on="0"/>
- <pt x="96" y="1332" on="1"/>
- <pt x="96" y="1449" on="1"/>
- <pt x="227" y="1503" on="0"/>
- <pt x="347" y="1503" on="1"/>
- <pt x="478" y="1503" on="0"/>
- <pt x="559" y="1435" on="1"/>
- <pt x="639" y="1367" on="0"/>
- <pt x="639" y="1260" on="1"/>
- <pt x="639" y="1120" on="0"/>
- <pt x="455" y="967" on="1"/>
- <pt x="402" y="923" on="1"/>
- <pt x="269" y="813" on="0"/>
- <pt x="246" y="714" on="1"/>
- <pt x="635" y="714" on="1"/>
- <pt x="635" y="592" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 45 values pushed */
- 0 0 8 11 13 48 196 11 10 2 13 13 1 0 0 24 0 38 1 1 1 4 48 196 23
- 22 1 2 0 14 0 0 6 37 17 48 196 24 23 22 17 11 10 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[1]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="u" xMin="142" yMin="-25" xMax="984" yMax="1086">
- <contour>
- <pt x="787" y="0" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="714" y="102" on="0"/>
- <pt x="644" y="50" on="1"/>
- <pt x="541" y="-25" on="0"/>
- <pt x="418" y="-25" on="1"/>
- <pt x="142" y="-25" on="0"/>
- <pt x="142" y="306" on="1"/>
- <pt x="142" y="1086" on="1"/>
- <pt x="339" y="1086" on="1"/>
- <pt x="339" y="370" on="1"/>
- <pt x="339" y="239" on="0"/>
- <pt x="366" y="192" on="1"/>
- <pt x="394" y="145" on="0"/>
- <pt x="470" y="145" on="1"/>
- <pt x="632" y="145" on="0"/>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="984" y="1086" on="1"/>
- <pt x="984" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 0 0 14 30 5 48 196 5 2 16 10 7 1 4 8 0 3 19 0 1 0 18 17 9 8
- 1 3 14 0 0 17 16 1 0 4 3 18 10 9 4 1 7 2 4 48 196 19 18 1 8
- 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uacute" xMin="142" yMin="-25" xMax="984" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="308" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ubreve" xMin="142" yMin="-25" xMax="984" yMax="1604">
- <contour>
- <pt x="787" y="0" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="714" y="102" on="0"/>
- <pt x="644" y="50" on="1"/>
- <pt x="541" y="-25" on="0"/>
- <pt x="418" y="-25" on="1"/>
- <pt x="142" y="-25" on="0"/>
- <pt x="142" y="306" on="1"/>
- <pt x="142" y="1086" on="1"/>
- <pt x="339" y="1086" on="1"/>
- <pt x="339" y="370" on="1"/>
- <pt x="339" y="239" on="0"/>
- <pt x="366" y="192" on="1"/>
- <pt x="394" y="145" on="0"/>
- <pt x="470" y="145" on="1"/>
- <pt x="632" y="145" on="0"/>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="984" y="1086" on="1"/>
- <pt x="984" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="230" y="1604" on="1"/>
- <pt x="353" y="1604" on="1"/>
- <pt x="374" y="1511" on="0"/>
- <pt x="428" y="1470" on="1"/>
- <pt x="480" y="1431" on="0"/>
- <pt x="563" y="1431" on="1"/>
- <pt x="657" y="1431" on="0"/>
- <pt x="711" y="1480" on="1"/>
- <pt x="754" y="1520" on="0"/>
- <pt x="773" y="1604" on="1"/>
- <pt x="896" y="1604" on="1"/>
- <pt x="880" y="1470" on="0"/>
- <pt x="807" y="1389" on="1"/>
- <pt x="713" y="1283" on="0"/>
- <pt x="563" y="1283" on="1"/>
- <pt x="406" y="1283" on="0"/>
- <pt x="311" y="1398" on="1"/>
- <pt x="247" y="1475" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 79 values pushed */
- 0 0 25 40 34 14 30 5 48 196 5 2 16 10 7 1 4 8 0 3 30 29 21 20 4
- 13 34 8 19 0 1 0 18 17 9 8 1 3 14 30 18 0 2 29 21 2 0 9 3 20
- 9 7 2 0 0 17 16 1 0 4 3 18 10 9 4 1 7 2 4 48 196 19 18 1 8
- 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SRP0[ ]
- MDRP[00100]
- LOOPCALL[ ]
- CALL[ ]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ucircumflex" xMin="142" yMin="-25" xMax="984" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="circumflex" x="222" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="udieresis" xMin="142" yMin="-25" xMax="984" yMax="1456">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="222" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ugrave" xMin="142" yMin="-25" xMax="984" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="grave" x="148" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uhungarumlaut" xMin="142" yMin="-25" xMax="1073" yMax="1604">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="hungarumlaut" x="341" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="umacron" xMin="142" yMin="-25" xMax="984" yMax="1431">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="macron" x="222" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="underscore" xMin="0" yMin="-148" xMax="1139" yMax="0">
- <contour>
- <pt x="0" y="-148" on="1"/>
- <pt x="0" y="0" on="1"/>
- <pt x="1139" y="0" on="1"/>
- <pt x="1139" y="-148" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 24 values pushed */
- 0 0 3 0 7 1 1 1 4 48 196 2 1 1 0 14 3 2 1 1 0 1 2 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="uogonek" xMin="142" yMin="-370" xMax="984" yMax="1086">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="ogonek" x="465" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="uring" xMin="142" yMin="-25" xMax="984" yMax="1737">
- <component glyphName="u" x="0" y="0" flags="0x4"/>
- <component glyphName="ring" x="222" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="utilde" xMin="142" yMin="-25" xMax="984" yMax="1517">
- <contour>
- <pt x="787" y="0" on="1"/>
- <pt x="787" y="203" on="1"/>
- <pt x="714" y="102" on="0"/>
- <pt x="644" y="50" on="1"/>
- <pt x="541" y="-25" on="0"/>
- <pt x="418" y="-25" on="1"/>
- <pt x="142" y="-25" on="0"/>
- <pt x="142" y="306" on="1"/>
- <pt x="142" y="1086" on="1"/>
- <pt x="339" y="1086" on="1"/>
- <pt x="339" y="370" on="1"/>
- <pt x="339" y="239" on="0"/>
- <pt x="366" y="192" on="1"/>
- <pt x="394" y="145" on="0"/>
- <pt x="470" y="145" on="1"/>
- <pt x="632" y="145" on="0"/>
- <pt x="787" y="382" on="1"/>
- <pt x="787" y="1086" on="1"/>
- <pt x="984" y="1086" on="1"/>
- <pt x="984" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="230" y="1283" on="1"/>
- <pt x="237" y="1377" on="0"/>
- <pt x="262" y="1427" on="1"/>
- <pt x="308" y="1517" on="0"/>
- <pt x="417" y="1517" on="1"/>
- <pt x="488" y="1517" on="0"/>
- <pt x="550" y="1479" on="1"/>
- <pt x="610" y="1442" on="1"/>
- <pt x="667" y="1407" on="0"/>
- <pt x="697" y="1407" on="1"/>
- <pt x="762" y="1407" on="0"/>
- <pt x="773" y="1517" on="1"/>
- <pt x="896" y="1517" on="1"/>
- <pt x="889" y="1423" on="0"/>
- <pt x="864" y="1373" on="1"/>
- <pt x="819" y="1283" on="0"/>
- <pt x="711" y="1283" on="1"/>
- <pt x="639" y="1283" on="0"/>
- <pt x="576" y="1322" on="1"/>
- <pt x="516" y="1359" on="1"/>
- <pt x="461" y="1393" on="0"/>
- <pt x="429" y="1393" on="1"/>
- <pt x="364" y="1393" on="0"/>
- <pt x="353" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 93 values pushed */
- 0 0 41 6 24 29 6 36 14 30 5 48 196 24 0 5 2 36 1 43 36 20 3 0 8
- 3 0 16 10 7 1 4 8 0 3 1 32 31 2 13 0 0 19 0 1 0 18 17 9 8
- 1 3 14 32 18 0 2 43 31 2 0 9 3 20 9 7 2 0 0 17 16 1 0 4 3
- 18 10 9 4 1 7 2 4 48 196 19 18 1 8 7 1 2 0
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP0[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SZP0[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- MDAP[1]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="v" xMin="19" yMin="0" xMax="1012" yMax="1086">
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="19" y="1086" on="1"/>
- <pt x="218" y="1086" on="1"/>
- <pt x="519" y="241" on="1"/>
- <pt x="837" y="1086" on="1"/>
- <pt x="1012" y="1086" on="1"/>
- <pt x="601" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 22 values pushed */
- 3 1 0 2 6 0 1 0 5 4 2 1 1 3 14 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="w" xMin="11" yMin="0" xMax="1465" yMax="1086">
- <contour>
- <pt x="273" y="0" on="1"/>
- <pt x="11" y="1086" on="1"/>
- <pt x="204" y="1086" on="1"/>
- <pt x="400" y="268" on="1"/>
- <pt x="650" y="1086" on="1"/>
- <pt x="847" y="1086" on="1"/>
- <pt x="1067" y="265" on="1"/>
- <pt x="1295" y="1086" on="1"/>
- <pt x="1465" y="1086" on="1"/>
- <pt x="1160" y="0" on="1"/>
- <pt x="962" y="0" on="1"/>
- <pt x="732" y="841" on="1"/>
- <pt x="472" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 35 values pushed */
- 11 6 3 3 1 0 3 12 10 9 0 3 0 8 7 5 4 2 1 1 5 14 12 11 10
- 9 8 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="wcircumflex" xMin="11" yMin="0" xMax="1465" yMax="1604">
- <contour>
- <pt x="273" y="0" on="1"/>
- <pt x="11" y="1086" on="1"/>
- <pt x="204" y="1086" on="1"/>
- <pt x="400" y="268" on="1"/>
- <pt x="650" y="1086" on="1"/>
- <pt x="847" y="1086" on="1"/>
- <pt x="1067" y="265" on="1"/>
- <pt x="1295" y="1086" on="1"/>
- <pt x="1465" y="1086" on="1"/>
- <pt x="1160" y="0" on="1"/>
- <pt x="962" y="0" on="1"/>
- <pt x="732" y="841" on="1"/>
- <pt x="472" y="0" on="1"/>
- </contour>
- <contour>
- <pt x="398" y="1283" on="1"/>
- <pt x="639" y="1604" on="1"/>
- <pt x="857" y="1604" on="1"/>
- <pt x="1098" y="1283" on="1"/>
- <pt x="950" y="1283" on="1"/>
- <pt x="749" y="1485" on="1"/>
- <pt x="747" y="1485" on="1"/>
- <pt x="546" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 58 values pushed */
- 19 18 2 14 13 3 11 6 3 3 1 0 3 15 14 1 20 17 16 13 3 12 10 9 0
- 3 3 0 8 7 5 4 2 1 1 5 14 20 19 18 17 16 15 14 13 12 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="x" xMin="28" yMin="0" xMax="993" yMax="1086">
- <contour>
- <pt x="28" y="0" on="1"/>
- <pt x="381" y="574" on="1"/>
- <pt x="40" y="1086" on="1"/>
- <pt x="268" y="1086" on="1"/>
- <pt x="540" y="679" on="1"/>
- <pt x="784" y="1086" on="1"/>
- <pt x="966" y="1086" on="1"/>
- <pt x="634" y="539" on="1"/>
- <pt x="993" y="0" on="1"/>
- <pt x="766" y="0" on="1"/>
- <pt x="472" y="436" on="1"/>
- <pt x="210" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 33 values pushed */
- 10 7 4 1 4 2 0 3 11 9 8 0 3 0 6 5 3 2 1 3 14 11 10 9 8
- 7 6 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="y" xMin="19" yMin="-395" xMax="1012" yMax="1086">
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="19" y="1086" on="1"/>
- <pt x="219" y="1086" on="1"/>
- <pt x="514" y="253" on="1"/>
- <pt x="838" y="1086" on="1"/>
- <pt x="1012" y="1086" on="1"/>
- <pt x="438" y="-395" on="1"/>
- <pt x="233" y="-395" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 31 values pushed */
- 1 3 1 2 2 0 1 0 2 6 2 0 7 6 1 0 5 4 2 1 1 3 14 7 6
- 5 4 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="yacute" xMin="19" yMin="-395" xMax="1012" yMax="1604">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="259" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="ycircumflex" xMin="19" yMin="-395" xMax="1012" yMax="1604">
- <contour>
- <pt x="404" y="0" on="1"/>
- <pt x="19" y="1086" on="1"/>
- <pt x="219" y="1086" on="1"/>
- <pt x="514" y="253" on="1"/>
- <pt x="838" y="1086" on="1"/>
- <pt x="1012" y="1086" on="1"/>
- <pt x="438" y="-395" on="1"/>
- <pt x="233" y="-395" on="1"/>
- </contour>
- <contour>
- <pt x="178" y="1283" on="1"/>
- <pt x="419" y="1604" on="1"/>
- <pt x="637" y="1604" on="1"/>
- <pt x="878" y="1283" on="1"/>
- <pt x="730" y="1283" on="1"/>
- <pt x="529" y="1485" on="1"/>
- <pt x="527" y="1485" on="1"/>
- <pt x="326" y="1283" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 54 values pushed */
- 14 13 2 9 8 3 1 3 1 2 2 0 1 0 2 6 2 0 10 9 1 15 12 11 8
- 3 7 6 1 3 0 5 4 2 1 1 3 14 15 14 13 12 11 10 9 8 7 6 5 4
- 3 2 1 0
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- MDAP[0]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SZP1[ ]
- CALL[ ]
- SZP1[ ]
- SZP0[ ]
- CALL[ ]
- SZP0[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="ydieresis" xMin="19" yMin="-395" xMax="1012" yMax="1456">
- <component glyphName="y" x="0" y="0" flags="0x4"/>
- <component glyphName="dieresis" x="188" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="yen" xMin="25" yMin="0" xMax="1077" yMax="1480">
- <contour>
- <pt x="453" y="0" on="1"/>
- <pt x="453" y="345" on="1"/>
- <pt x="157" y="345" on="1"/>
- <pt x="157" y="469" on="1"/>
- <pt x="453" y="469" on="1"/>
- <pt x="453" y="617" on="1"/>
- <pt x="157" y="617" on="1"/>
- <pt x="157" y="740" on="1"/>
- <pt x="453" y="740" on="1"/>
- <pt x="25" y="1480" on="1"/>
- <pt x="253" y="1480" on="1"/>
- <pt x="575" y="922" on="1"/>
- <pt x="577" y="922" on="1"/>
- <pt x="900" y="1480" on="1"/>
- <pt x="1077" y="1480" on="1"/>
- <pt x="650" y="740" on="1"/>
- <pt x="946" y="740" on="1"/>
- <pt x="946" y="617" on="1"/>
- <pt x="650" y="617" on="1"/>
- <pt x="650" y="469" on="1"/>
- <pt x="946" y="469" on="1"/>
- <pt x="946" y="345" on="1"/>
- <pt x="650" y="345" on="1"/>
- <pt x="650" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 93 values pushed */
- 12 11 2 9 7 3 0 0 18 17 6 5 6 3 7 20 19 4 3 6 3 1 2 4 48
- 196 16 15 8 7 3 22 21 2 1 3 23 0 1 3 0 14 13 10 9 0 3 14 12 11
- 2 15 0 3 21 20 17 16 14 13 6 13 15 10 9 7 6 3 2 6 13 0 0 0 23
- 22 19 18 15 4 4 0 1 4 48 196 8 5 4 1 0 4 0
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- LOOPCALL[ ]
- SRP0[ ]
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- SLOOP[ ]
- MIAP[1]
- ALIGNRP[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="z" xMin="74" yMin="0" xMax="950" yMax="1086">
- <contour>
- <pt x="74" y="0" on="1"/>
- <pt x="74" y="148" on="1"/>
- <pt x="695" y="938" on="1"/>
- <pt x="105" y="938" on="1"/>
- <pt x="105" y="1086" on="1"/>
- <pt x="938" y="1086" on="1"/>
- <pt x="938" y="938" on="1"/>
- <pt x="317" y="148" on="1"/>
- <pt x="950" y="148" on="1"/>
- <pt x="950" y="0" on="1"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 46 values pushed */
- 0 0 6 3 2 7 2 4 8 7 1 7 2 0 2 4 48 196 9 0 1 0 5 4 1
- 14 7 2 2 5 3 3 9 8 1 6 5 1 4 3 1 1 0 1 4 0
- LOOPCALL[ ]
- CALL[ ]
- CALL[ ]
- MIAP[1]
- ALIGNRP[ ]
- CALL[ ]
- SSW[ ]
- SSWCI[ ]
- LOOPCALL[ ]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- <TTGlyph name="zacute" xMin="74" yMin="0" xMax="950" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="acute" x="257" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zcaron" xMin="74" yMin="0" xMax="950" yMax="1604">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="caron" x="174" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zdotaccent" xMin="74" yMin="0" xMax="950" yMax="1480">
- <component glyphName="z" x="0" y="0" flags="0x4"/>
- <component glyphName="dotaccent" x="168" y="0" flags="0x4"/>
- </TTGlyph>
-
- <TTGlyph name="zero" xMin="80" yMin="-37" xMax="1058" yMax="1517">
- <contour>
- <pt x="569" y="1517" on="1"/>
- <pt x="794" y="1517" on="0"/>
- <pt x="926" y="1309" on="1"/>
- <pt x="1058" y="1101" on="0"/>
- <pt x="1058" y="744" on="1"/>
- <pt x="1058" y="378" on="0"/>
- <pt x="926" y="171" on="1"/>
- <pt x="794" y="-37" on="0"/>
- <pt x="563" y="-37" on="1"/>
- <pt x="365" y="-37" on="0"/>
- <pt x="240" y="132" on="1"/>
- <pt x="80" y="346" on="0"/>
- <pt x="80" y="742" on="1"/>
- <pt x="80" y="1101" on="0"/>
- <pt x="212" y="1308" on="1"/>
- <pt x="344" y="1517" on="0"/>
- </contour>
- <contour>
- <pt x="569" y="1369" on="1"/>
- <pt x="435" y="1369" on="0"/>
- <pt x="363" y="1205" on="1"/>
- <pt x="290" y="1040" on="0"/>
- <pt x="290" y="741" on="1"/>
- <pt x="290" y="444" on="0"/>
- <pt x="363" y="277" on="1"/>
- <pt x="435" y="111" on="0"/>
- <pt x="570" y="111" on="1"/>
- <pt x="692" y="111" on="0"/>
- <pt x="759" y="233" on="1"/>
- <pt x="849" y="395" on="0"/>
- <pt x="849" y="743" on="1"/>
- <pt x="849" y="1045" on="0"/>
- <pt x="776" y="1206" on="1"/>
- <pt x="701" y="1369" on="0"/>
- </contour>
- <instructions><assembly>
- NPUSHB[ ] /* 27 values pushed */
- 0 0 24 40 8 16 40 0 48 196 8 2 0 0 14 0 0 28 43 4 20 9 12 48 196
- 12 4
- MDAP[1]
- MDAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- CALL[ ]
- MIAP[1]
- MIAP[1]
- SSW[ ]
- SSWCI[ ]
- SRP0[ ]
- MIRP[01101]
- SRP0[ ]
- MIRP[01101]
- SSW[ ]
- SSWCI[ ]
- IUP[1]
- IUP[0]
- </assembly></instructions>
- </TTGlyph>
-
- </glyf>
-
- <kern>
- <version value="0"/>
- <kernsubtable coverage="1" format="0">
- <pair l="A" r="C" v="-76"/>
- <pair l="A" r="Ccedilla" v="-80"/>
- <pair l="A" r="G" v="-63"/>
- <pair l="A" r="O" v="-67"/>
- <pair l="A" r="Odieresis" v="-67"/>
- <pair l="A" r="Q" v="-70"/>
- <pair l="A" r="T" v="-178"/>
- <pair l="A" r="U" v="-71"/>
- <pair l="A" r="Uacute" v="-71"/>
- <pair l="A" r="Ucircumflex" v="-71"/>
- <pair l="A" r="Udieresis" v="-71"/>
- <pair l="A" r="Ugrave" v="-71"/>
- <pair l="A" r="V" v="-144"/>
- <pair l="A" r="W" v="-90"/>
- <pair l="A" r="Y" v="-185"/>
- <pair l="A" r="a" v="-9"/>
- <pair l="A" r="b" v="-4"/>
- <pair l="A" r="c" v="-40"/>
- <pair l="A" r="ccedilla" v="-41"/>
- <pair l="A" r="comma" v="28"/>
- <pair l="A" r="d" v="-32"/>
- <pair l="A" r="e" v="-41"/>
- <pair l="A" r="g" v="-46"/>
- <pair l="A" r="guillemotleft" v="-76"/>
- <pair l="A" r="guilsinglleft" v="-56"/>
- <pair l="A" r="hyphen" v="-4"/>
- <pair l="A" r="o" v="-36"/>
- <pair l="A" r="period" v="27"/>
- <pair l="A" r="q" v="-32"/>
- <pair l="A" r="quotedblright" v="-117"/>
- <pair l="A" r="quoteright" v="-130"/>
- <pair l="A" r="t" v="-30"/>
- <pair l="A" r="u" v="-29"/>
- <pair l="A" r="v" v="-65"/>
- <pair l="A" r="w" v="-29"/>
- <pair l="A" r="y" v="-65"/>
- <pair l="Aacute" r="C" v="-76"/>
- <pair l="Aacute" r="G" v="-63"/>
- <pair l="Aacute" r="O" v="-67"/>
- <pair l="Aacute" r="Q" v="-70"/>
- <pair l="Aacute" r="T" v="-178"/>
- <pair l="Aacute" r="U" v="-71"/>
- <pair l="Aacute" r="V" v="-144"/>
- <pair l="Aacute" r="W" v="-90"/>
- <pair l="Aacute" r="Y" v="-185"/>
- <pair l="Aacute" r="a" v="-9"/>
- <pair l="Aacute" r="b" v="-4"/>
- <pair l="Aacute" r="c" v="-40"/>
- <pair l="Aacute" r="comma" v="28"/>
- <pair l="Aacute" r="d" v="-32"/>
- <pair l="Aacute" r="e" v="-41"/>
- <pair l="Aacute" r="g" v="-46"/>
- <pair l="Aacute" r="guillemotleft" v="-76"/>
- <pair l="Aacute" r="guilsinglleft" v="-56"/>
- <pair l="Aacute" r="hyphen" v="-4"/>
- <pair l="Aacute" r="o" v="-36"/>
- <pair l="Aacute" r="period" v="27"/>
- <pair l="Aacute" r="q" v="-32"/>
- <pair l="Aacute" r="quoteright" v="-130"/>
- <pair l="Aacute" r="t" v="-30"/>
- <pair l="Aacute" r="u" v="-29"/>
- <pair l="Aacute" r="v" v="-65"/>
- <pair l="Aacute" r="w" v="-29"/>
- <pair l="Aacute" r="y" v="-65"/>
- <pair l="Acircumflex" r="C" v="-76"/>
- <pair l="Acircumflex" r="G" v="-63"/>
- <pair l="Acircumflex" r="O" v="-67"/>
- <pair l="Acircumflex" r="Q" v="-70"/>
- <pair l="Acircumflex" r="T" v="-178"/>
- <pair l="Acircumflex" r="U" v="-71"/>
- <pair l="Acircumflex" r="V" v="-144"/>
- <pair l="Acircumflex" r="W" v="-90"/>
- <pair l="Acircumflex" r="Y" v="-185"/>
- <pair l="Acircumflex" r="comma" v="28"/>
- <pair l="Acircumflex" r="period" v="27"/>
- <pair l="Adieresis" r="C" v="-76"/>
- <pair l="Adieresis" r="G" v="-63"/>
- <pair l="Adieresis" r="O" v="-67"/>
- <pair l="Adieresis" r="Q" v="-70"/>
- <pair l="Adieresis" r="T" v="-178"/>
- <pair l="Adieresis" r="U" v="-71"/>
- <pair l="Adieresis" r="V" v="-144"/>
- <pair l="Adieresis" r="W" v="-90"/>
- <pair l="Adieresis" r="Y" v="-185"/>
- <pair l="Adieresis" r="a" v="-9"/>
- <pair l="Adieresis" r="b" v="-4"/>
- <pair l="Adieresis" r="c" v="-40"/>
- <pair l="Adieresis" r="comma" v="28"/>
- <pair l="Adieresis" r="d" v="-32"/>
- <pair l="Adieresis" r="g" v="-46"/>
- <pair l="Adieresis" r="guillemotleft" v="-76"/>
- <pair l="Adieresis" r="guilsinglleft" v="-56"/>
- <pair l="Adieresis" r="hyphen" v="-4"/>
- <pair l="Adieresis" r="o" v="-36"/>
- <pair l="Adieresis" r="period" v="27"/>
- <pair l="Adieresis" r="q" v="-32"/>
- <pair l="Adieresis" r="quotedblright" v="-117"/>
- <pair l="Adieresis" r="quoteright" v="-130"/>
- <pair l="Adieresis" r="t" v="-30"/>
- <pair l="Adieresis" r="u" v="-29"/>
- <pair l="Adieresis" r="v" v="-65"/>
- <pair l="Adieresis" r="w" v="-29"/>
- <pair l="Adieresis" r="y" v="-65"/>
- <pair l="Agrave" r="C" v="-76"/>
- <pair l="Agrave" r="G" v="-63"/>
- <pair l="Agrave" r="O" v="-67"/>
- <pair l="Agrave" r="Q" v="-70"/>
- <pair l="Agrave" r="T" v="-178"/>
- <pair l="Agrave" r="U" v="-71"/>
- <pair l="Agrave" r="V" v="-144"/>
- <pair l="Agrave" r="W" v="-90"/>
- <pair l="Agrave" r="Y" v="-185"/>
- <pair l="Agrave" r="comma" v="28"/>
- <pair l="Agrave" r="period" v="27"/>
- <pair l="Aring" r="C" v="-76"/>
- <pair l="Aring" r="G" v="-63"/>
- <pair l="Aring" r="O" v="-67"/>
- <pair l="Aring" r="Q" v="-70"/>
- <pair l="Aring" r="T" v="-178"/>
- <pair l="Aring" r="U" v="-71"/>
- <pair l="Aring" r="V" v="-144"/>
- <pair l="Aring" r="W" v="-90"/>
- <pair l="Aring" r="Y" v="-185"/>
- <pair l="Aring" r="a" v="-9"/>
- <pair l="Aring" r="b" v="-4"/>
- <pair l="Aring" r="c" v="-40"/>
- <pair l="Aring" r="comma" v="28"/>
- <pair l="Aring" r="d" v="-32"/>
- <pair l="Aring" r="e" v="-41"/>
- <pair l="Aring" r="g" v="-46"/>
- <pair l="Aring" r="guillemotleft" v="-76"/>
- <pair l="Aring" r="guilsinglleft" v="-56"/>
- <pair l="Aring" r="hyphen" v="-4"/>
- <pair l="Aring" r="o" v="-36"/>
- <pair l="Aring" r="period" v="27"/>
- <pair l="Aring" r="q" v="-32"/>
- <pair l="Aring" r="quotedblright" v="-117"/>
- <pair l="Aring" r="quoteright" v="-130"/>
- <pair l="Aring" r="t" v="-30"/>
- <pair l="Aring" r="u" v="-29"/>
- <pair l="Aring" r="v" v="-65"/>
- <pair l="Aring" r="w" v="-29"/>
- <pair l="Aring" r="y" v="-65"/>
- <pair l="Atilde" r="C" v="-76"/>
- <pair l="Atilde" r="G" v="-63"/>
- <pair l="Atilde" r="O" v="-67"/>
- <pair l="Atilde" r="Q" v="-70"/>
- <pair l="Atilde" r="T" v="-178"/>
- <pair l="Atilde" r="U" v="-71"/>
- <pair l="Atilde" r="V" v="-144"/>
- <pair l="Atilde" r="W" v="-90"/>
- <pair l="Atilde" r="Y" v="-185"/>
- <pair l="Atilde" r="comma" v="28"/>
- <pair l="Atilde" r="period" v="27"/>
- <pair l="B" r="A" v="-39"/>
- <pair l="B" r="AE" v="-61"/>
- <pair l="B" r="Aacute" v="-39"/>
- <pair l="B" r="Acircumflex" v="-39"/>
- <pair l="B" r="Adieresis" v="-39"/>
- <pair l="B" r="Aring" v="-39"/>
- <pair l="B" r="Atilde" v="-39"/>
- <pair l="B" r="O" v="-37"/>
- <pair l="B" r="OE" v="-37"/>
- <pair l="B" r="Oacute" v="-37"/>
- <pair l="B" r="Ocircumflex" v="-37"/>
- <pair l="B" r="Odieresis" v="-37"/>
- <pair l="B" r="Ograve" v="-37"/>
- <pair l="B" r="Oslash" v="-30"/>
- <pair l="B" r="V" v="-69"/>
- <pair l="B" r="W" v="-50"/>
- <pair l="B" r="Y" v="-82"/>
- <pair l="C" r="A" v="3"/>
- <pair l="C" r="AE" v="-5"/>
- <pair l="C" r="Aacute" v="3"/>
- <pair l="C" r="Adieresis" v="3"/>
- <pair l="C" r="Aring" v="3"/>
- <pair l="C" r="H" v="-56"/>
- <pair l="C" r="K" v="-69"/>
- <pair l="C" r="O" v="-84"/>
- <pair l="C" r="Oacute" v="-84"/>
- <pair l="C" r="Odieresis" v="-84"/>
- <pair l="Ccedilla" r="A" v="0"/>
- <pair l="D" r="A" v="-72"/>
- <pair l="D" r="Aacute" v="-72"/>
- <pair l="D" r="Acircumflex" v="-72"/>
- <pair l="D" r="Adieresis" v="-72"/>
- <pair l="D" r="Agrave" v="-72"/>
- <pair l="D" r="Aring" v="-72"/>
- <pair l="D" r="Atilde" v="-72"/>
- <pair l="D" r="J" v="-247"/>
- <pair l="D" r="T" v="-63"/>
- <pair l="D" r="V" v="-69"/>
- <pair l="D" r="W" v="-33"/>
- <pair l="D" r="X" v="-87"/>
- <pair l="D" r="Y" v="-100"/>
- <pair l="F" r="A" v="-122"/>
- <pair l="F" r="Aacute" v="-122"/>
- <pair l="F" r="Acircumflex" v="-122"/>
- <pair l="F" r="Adieresis" v="-122"/>
- <pair l="F" r="Agrave" v="-122"/>
- <pair l="F" r="Aring" v="-122"/>
- <pair l="F" r="Atilde" v="-122"/>
- <pair l="F" r="J" v="-251"/>
- <pair l="F" r="O" v="-33"/>
- <pair l="F" r="Odieresis" v="-32"/>
- <pair l="F" r="a" v="-102"/>
- <pair l="F" r="aacute" v="-102"/>
- <pair l="F" r="adieresis" v="-77"/>
- <pair l="F" r="ae" v="-102"/>
- <pair l="F" r="aring" v="-102"/>
- <pair l="F" r="comma" v="-189"/>
- <pair l="F" r="e" v="-35"/>
- <pair l="F" r="eacute" v="-35"/>
- <pair l="F" r="hyphen" v="4"/>
- <pair l="F" r="i" v="-4"/>
- <pair l="F" r="j" v="-6"/>
- <pair l="F" r="o" v="-35"/>
- <pair l="F" r="oacute" v="-35"/>
- <pair l="F" r="odieresis" v="-35"/>
- <pair l="F" r="oe" v="-36"/>
- <pair l="F" r="oslash" v="-64"/>
- <pair l="F" r="period" v="-190"/>
- <pair l="F" r="r" v="-66"/>
- <pair l="F" r="u" v="-60"/>
- <pair l="G" r="A" v="-20"/>
- <pair l="G" r="AE" v="-24"/>
- <pair l="G" r="Aacute" v="-20"/>
- <pair l="G" r="Acircumflex" v="-20"/>
- <pair l="G" r="Adieresis" v="-20"/>
- <pair l="G" r="Agrave" v="-20"/>
- <pair l="G" r="Aring" v="-20"/>
- <pair l="G" r="Atilde" v="-20"/>
- <pair l="G" r="T" v="-14"/>
- <pair l="G" r="V" v="-29"/>
- <pair l="G" r="W" v="-22"/>
- <pair l="G" r="Y" v="-30"/>
- <pair l="J" r="A" v="-23"/>
- <pair l="J" r="AE" v="-24"/>
- <pair l="J" r="Adieresis" v="-23"/>
- <pair l="J" r="Aring" v="-23"/>
- <pair l="K" r="C" v="-148"/>
- <pair l="K" r="G" v="-138"/>
- <pair l="K" r="O" v="-140"/>
- <pair l="K" r="OE" v="-139"/>
- <pair l="K" r="Oacute" v="-139"/>
- <pair l="K" r="Odieresis" v="-139"/>
- <pair l="K" r="S" v="-8"/>
- <pair l="K" r="T" v="3"/>
- <pair l="K" r="a" v="-46"/>
- <pair l="K" r="adieresis" v="-46"/>
- <pair l="K" r="ae" v="-46"/>
- <pair l="K" r="aring" v="-46"/>
- <pair l="K" r="e" v="-105"/>
- <pair l="K" r="hyphen" v="-173"/>
- <pair l="K" r="o" v="-94"/>
- <pair l="K" r="oacute" v="-94"/>
- <pair l="K" r="odieresis" v="-94"/>
- <pair l="K" r="u" v="-63"/>
- <pair l="K" r="udieresis" v="-63"/>
- <pair l="K" r="y" v="-138"/>
- <pair l="L" r="A" v="60"/>
- <pair l="L" r="AE" v="59"/>
- <pair l="L" r="Aacute" v="60"/>
- <pair l="L" r="Adieresis" v="60"/>
- <pair l="L" r="Aring" v="60"/>
- <pair l="L" r="C" v="-76"/>
- <pair l="L" r="Ccedilla" v="-84"/>
- <pair l="L" r="G" v="-65"/>
- <pair l="L" r="O" v="-71"/>
- <pair l="L" r="Oacute" v="-70"/>
- <pair l="L" r="Ocircumflex" v="-70"/>
- <pair l="L" r="Odieresis" v="-70"/>
- <pair l="L" r="Ograve" v="-70"/>
- <pair l="L" r="Otilde" v="-70"/>
- <pair l="L" r="S" v="11"/>
- <pair l="L" r="T" v="-188"/>
- <pair l="L" r="U" v="-54"/>
- <pair l="L" r="Udieresis" v="-54"/>
- <pair l="L" r="V" v="-198"/>
- <pair l="L" r="W" v="-108"/>
- <pair l="L" r="Y" v="-208"/>
- <pair l="L" r="hyphen" v="-259"/>
- <pair l="L" r="quotedblright" v="-260"/>
- <pair l="L" r="quoteright" v="-277"/>
- <pair l="L" r="u" v="-9"/>
- <pair l="L" r="udieresis" v="-9"/>
- <pair l="L" r="y" v="-102"/>
- <pair l="N" r="A" v="-4"/>
- <pair l="N" r="AE" v="-5"/>
- <pair l="N" r="Aacute" v="-4"/>
- <pair l="N" r="Adieresis" v="-4"/>
- <pair l="N" r="Aring" v="-4"/>
- <pair l="N" r="C" v="-11"/>
- <pair l="N" r="Ccedilla" v="-11"/>
- <pair l="N" r="G" v="0"/>
- <pair l="N" r="O" v="-2"/>
- <pair l="N" r="Oacute" v="-1"/>
- <pair l="N" r="Odieresis" v="-1"/>
- <pair l="N" r="a" v="-24"/>
- <pair l="N" r="aacute" v="-24"/>
- <pair l="N" r="adieresis" v="-24"/>
- <pair l="N" r="ae" v="-25"/>
- <pair l="N" r="aring" v="-24"/>
- <pair l="N" r="comma" v="-1"/>
- <pair l="N" r="e" v="-5"/>
- <pair l="N" r="eacute" v="-5"/>
- <pair l="N" r="o" v="-2"/>
- <pair l="N" r="oacute" v="-2"/>
- <pair l="N" r="odieresis" v="-2"/>
- <pair l="N" r="oslash" v="-25"/>
- <pair l="N" r="period" v="-2"/>
- <pair l="N" r="u" v="-3"/>
- <pair l="N" r="udieresis" v="-3"/>
- <pair l="O" r="A" v="-66"/>
- <pair l="O" r="AE" v="-106"/>
- <pair l="O" r="Aacute" v="-66"/>
- <pair l="O" r="Adieresis" v="-66"/>
- <pair l="O" r="Aring" v="-66"/>
- <pair l="O" r="T" v="-66"/>
- <pair l="O" r="V" v="-72"/>
- <pair l="O" r="W" v="-31"/>
- <pair l="O" r="X" v="-84"/>
- <pair l="O" r="Y" v="-106"/>
- <pair l="Oacute" r="A" v="-66"/>
- <pair l="Oacute" r="T" v="-67"/>
- <pair l="Oacute" r="V" v="-73"/>
- <pair l="Oacute" r="W" v="-32"/>
- <pair l="Oacute" r="Y" v="-107"/>
- <pair l="Ocircumflex" r="T" v="-67"/>
- <pair l="Ocircumflex" r="V" v="-73"/>
- <pair l="Ocircumflex" r="Y" v="-107"/>
- <pair l="Odieresis" r="A" v="-66"/>
- <pair l="Odieresis" r="T" v="-67"/>
- <pair l="Odieresis" r="V" v="-73"/>
- <pair l="Odieresis" r="W" v="-32"/>
- <pair l="Odieresis" r="X" v="-84"/>
- <pair l="Odieresis" r="Y" v="-107"/>
- <pair l="Ograve" r="T" v="-67"/>
- <pair l="Ograve" r="V" v="-73"/>
- <pair l="Ograve" r="Y" v="-107"/>
- <pair l="Oslash" r="A" v="-65"/>
- <pair l="Otilde" r="T" v="-67"/>
- <pair l="Otilde" r="V" v="-73"/>
- <pair l="Otilde" r="Y" v="-107"/>
- <pair l="P" r="A" v="-125"/>
- <pair l="P" r="AE" v="-226"/>
- <pair l="P" r="Aacute" v="-125"/>
- <pair l="P" r="Adieresis" v="-125"/>
- <pair l="P" r="Aring" v="-125"/>
- <pair l="P" r="J" v="-249"/>
- <pair l="P" r="a" v="-32"/>
- <pair l="P" r="aacute" v="-32"/>
- <pair l="P" r="adieresis" v="-32"/>
- <pair l="P" r="ae" v="-32"/>
- <pair l="P" r="aring" v="-32"/>
- <pair l="P" r="comma" v="-226"/>
- <pair l="P" r="e" v="-29"/>
- <pair l="P" r="eacute" v="-29"/>
- <pair l="P" r="hyphen" v="-27"/>
- <pair l="P" r="o" v="-30"/>
- <pair l="P" r="oacute" v="-30"/>
- <pair l="P" r="odieresis" v="-30"/>
- <pair l="P" r="oe" v="-32"/>
- <pair l="P" r="oslash" v="-58"/>
- <pair l="P" r="period" v="-227"/>
- <pair l="R" r="C" v="-87"/>
- <pair l="R" r="Ccedilla" v="-87"/>
- <pair l="R" r="G" v="-76"/>
- <pair l="R" r="O" v="-78"/>
- <pair l="R" r="OE" v="-77"/>
- <pair l="R" r="Oacute" v="-78"/>
- <pair l="R" r="Odieresis" v="-78"/>
- <pair l="R" r="T" v="-64"/>
- <pair l="R" r="U" v="-75"/>
- <pair l="R" r="Udieresis" v="-75"/>
- <pair l="R" r="V" v="-97"/>
- <pair l="R" r="W" v="-78"/>
- <pair l="R" r="Y" v="-112"/>
- <pair l="R" r="a" v="-39"/>
- <pair l="R" r="aacute" v="-39"/>
- <pair l="R" r="adieresis" v="-39"/>
- <pair l="R" r="ae" v="-37"/>
- <pair l="R" r="aring" v="-39"/>
- <pair l="R" r="e" v="-82"/>
- <pair l="R" r="eacute" v="-82"/>
- <pair l="R" r="hyphen" v="-98"/>
- <pair l="R" r="o" v="-77"/>
- <pair l="R" r="oacute" v="-77"/>
- <pair l="R" r="odieresis" v="-77"/>
- <pair l="R" r="oe" v="-81"/>
- <pair l="R" r="u" v="-56"/>
- <pair l="R" r="uacute" v="-56"/>
- <pair l="R" r="udieresis" v="-56"/>
- <pair l="R" r="y" v="-44"/>
- <pair l="S" r="A" v="-36"/>
- <pair l="S" r="AE" v="-60"/>
- <pair l="S" r="Aacute" v="-36"/>
- <pair l="S" r="Adieresis" v="-36"/>
- <pair l="S" r="Aring" v="-36"/>
- <pair l="S" r="T" v="-27"/>
- <pair l="S" r="V" v="-42"/>
- <pair l="S" r="W" v="-35"/>
- <pair l="S" r="Y" v="-43"/>
- <pair l="S" r="t" v="-48"/>
- <pair l="T" r="A" v="-180"/>
- <pair l="T" r="AE" v="-182"/>
- <pair l="T" r="Aacute" v="-180"/>
- <pair l="T" r="Acircumflex" v="-180"/>
- <pair l="T" r="Adieresis" v="-180"/>
- <pair l="T" r="Agrave" v="-180"/>
- <pair l="T" r="Aring" v="-180"/>
- <pair l="T" r="Atilde" v="-180"/>
- <pair l="T" r="C" v="-75"/>
- <pair l="T" r="G" v="-66"/>
- <pair l="T" r="J" v="-235"/>
- <pair l="T" r="O" v="-66"/>
- <pair l="T" r="OE" v="-65"/>
- <pair l="T" r="Oacute" v="-66"/>
- <pair l="T" r="Ocircumflex" v="-66"/>
- <pair l="T" r="Odieresis" v="-66"/>
- <pair l="T" r="Ograve" v="-66"/>
- <pair l="T" r="Oslash" v="-66"/>
- <pair l="T" r="Otilde" v="-66"/>
- <pair l="T" r="S" v="-5"/>
- <pair l="T" r="V" v="58"/>
- <pair l="T" r="W" v="65"/>
- <pair l="T" r="Y" v="59"/>
- <pair l="T" r="a" v="-211"/>
- <pair l="T" r="ae" v="-211"/>
- <pair l="T" r="c" v="-191"/>
- <pair l="T" r="colon" v="-238"/>
- <pair l="T" r="comma" v="-179"/>
- <pair l="T" r="e" v="-192"/>
- <pair l="T" r="g" v="-196"/>
- <pair l="T" r="guillemotleft" v="-227"/>
- <pair l="T" r="guilsinglleft" v="-206"/>
- <pair l="T" r="hyphen" v="-140"/>
- <pair l="T" r="i" v="12"/>
- <pair l="T" r="j" v="9"/>
- <pair l="T" r="o" v="-188"/>
- <pair l="T" r="oslash" v="-208"/>
- <pair l="T" r="period" v="-180"/>
- <pair l="T" r="r" v="-183"/>
- <pair l="T" r="s" v="-216"/>
- <pair l="T" r="semicolon" v="-229"/>
- <pair l="T" r="u" v="-182"/>
- <pair l="T" r="v" v="-184"/>
- <pair l="T" r="w" v="-175"/>
- <pair l="T" r="y" v="-184"/>
- <pair l="U" r="A" v="-64"/>
- <pair l="U" r="AE" v="-89"/>
- <pair l="U" r="Aacute" v="-64"/>
- <pair l="U" r="Acircumflex" v="-64"/>
- <pair l="U" r="Adieresis" v="-64"/>
- <pair l="U" r="Aring" v="-64"/>
- <pair l="U" r="Atilde" v="-64"/>
- <pair l="U" r="comma" v="-37"/>
- <pair l="U" r="m" v="-15"/>
- <pair l="U" r="n" v="-15"/>
- <pair l="U" r="p" v="-15"/>
- <pair l="U" r="period" v="-33"/>
- <pair l="U" r="r" v="-15"/>
- <pair l="Uacute" r="A" v="-64"/>
- <pair l="Uacute" r="comma" v="-37"/>
- <pair l="Uacute" r="m" v="-15"/>
- <pair l="Uacute" r="n" v="-15"/>
- <pair l="Uacute" r="p" v="-15"/>
- <pair l="Uacute" r="period" v="-33"/>
- <pair l="Uacute" r="r" v="-15"/>
- <pair l="Ucircumflex" r="A" v="-64"/>
- <pair l="Udieresis" r="A" v="-64"/>
- <pair l="Udieresis" r="b" v="-14"/>
- <pair l="Udieresis" r="comma" v="-37"/>
- <pair l="Udieresis" r="m" v="-15"/>
- <pair l="Udieresis" r="n" v="-15"/>
- <pair l="Udieresis" r="p" v="-15"/>
- <pair l="Udieresis" r="period" v="-33"/>
- <pair l="Udieresis" r="r" v="-15"/>
- <pair l="Ugrave" r="A" v="-64"/>
- <pair l="V" r="A" v="-125"/>
- <pair l="V" r="AE" v="-200"/>
- <pair l="V" r="Aacute" v="-125"/>
- <pair l="V" r="Acircumflex" v="-125"/>
- <pair l="V" r="Adieresis" v="-125"/>
- <pair l="V" r="Agrave" v="-125"/>
- <pair l="V" r="Aring" v="-125"/>
- <pair l="V" r="Atilde" v="-125"/>
- <pair l="V" r="C" v="-67"/>
- <pair l="V" r="G" v="-58"/>
- <pair l="V" r="O" v="-58"/>
- <pair l="V" r="Oacute" v="-57"/>
- <pair l="V" r="Ocircumflex" v="-57"/>
- <pair l="V" r="Odieresis" v="-57"/>
- <pair l="V" r="Ograve" v="-57"/>
- <pair l="V" r="Oslash" v="-58"/>
- <pair l="V" r="Otilde" v="-57"/>
- <pair l="V" r="S" v="-23"/>
- <pair l="V" r="T" v="74"/>
- <pair l="V" r="a" v="-96"/>
- <pair l="V" r="ae" v="-96"/>
- <pair l="V" r="colon" v="-83"/>
- <pair l="V" r="comma" v="-153"/>
- <pair l="V" r="e" v="-101"/>
- <pair l="V" r="g" v="-100"/>
- <pair l="V" r="guillemotleft" v="-142"/>
- <pair l="V" r="guilsinglleft" v="-122"/>
- <pair l="V" r="hyphen" v="-48"/>
- <pair l="V" r="i" v="16"/>
- <pair l="V" r="o" v="-101"/>
- <pair l="V" r="oslash" v="-124"/>
- <pair l="V" r="period" v="-154"/>
- <pair l="V" r="r" v="-66"/>
- <pair l="V" r="semicolon" v="-79"/>
- <pair l="V" r="u" v="-64"/>
- <pair l="V" r="y" v="-4"/>
- <pair l="W" r="A" v="-100"/>
- <pair l="W" r="AE" v="-142"/>
- <pair l="W" r="Aacute" v="-100"/>
- <pair l="W" r="Acircumflex" v="-100"/>
- <pair l="W" r="Adieresis" v="-100"/>
- <pair l="W" r="Agrave" v="-100"/>
- <pair l="W" r="Aring" v="-100"/>
- <pair l="W" r="Atilde" v="-100"/>
- <pair l="W" r="C" v="-50"/>
- <pair l="W" r="G" v="-39"/>
- <pair l="W" r="O" v="-41"/>
- <pair l="W" r="Oacute" v="-40"/>
- <pair l="W" r="Ocircumflex" v="-40"/>
- <pair l="W" r="Odieresis" v="-40"/>
- <pair l="W" r="Ograve" v="-40"/>
- <pair l="W" r="Oslash" v="-34"/>
- <pair l="W" r="Otilde" v="-40"/>
- <pair l="W" r="S" v="-23"/>
- <pair l="W" r="T" v="65"/>
- <pair l="W" r="a" v="-84"/>
- <pair l="W" r="ae" v="-84"/>
- <pair l="W" r="colon" v="-73"/>
- <pair l="W" r="comma" v="-106"/>
- <pair l="W" r="e" v="-72"/>
- <pair l="W" r="g" v="-75"/>
- <pair l="W" r="guillemotleft" v="-109"/>
- <pair l="W" r="guilsinglleft" v="-89"/>
- <pair l="W" r="hyphen" v="-17"/>
- <pair l="W" r="i" v="8"/>
- <pair l="W" r="o" v="-69"/>
- <pair l="W" r="oslash" v="-91"/>
- <pair l="W" r="period" v="-107"/>
- <pair l="W" r="r" v="-57"/>
- <pair l="W" r="semicolon" v="-70"/>
- <pair l="W" r="u" v="-54"/>
- <pair l="W" r="y" v="4"/>
- <pair l="X" r="C" v="-89"/>
- <pair l="X" r="O" v="-81"/>
- <pair l="X" r="Odieresis" v="-80"/>
- <pair l="X" r="Q" v="-81"/>
- <pair l="X" r="a" v="-30"/>
- <pair l="X" r="e" v="-83"/>
- <pair l="X" r="hyphen" v="-105"/>
- <pair l="X" r="o" v="-73"/>
- <pair l="X" r="u" v="-47"/>
- <pair l="X" r="y" v="-94"/>
- <pair l="Y" r="A" v="-197"/>
- <pair l="Y" r="AE" v="-219"/>
- <pair l="Y" r="Aacute" v="-197"/>
- <pair l="Y" r="Acircumflex" v="-197"/>
- <pair l="Y" r="Adieresis" v="-197"/>
- <pair l="Y" r="Agrave" v="-197"/>
- <pair l="Y" r="Aring" v="-197"/>
- <pair l="Y" r="Atilde" v="-197"/>
- <pair l="Y" r="C" v="-118"/>
- <pair l="Y" r="G" v="-111"/>
- <pair l="Y" r="O" v="-110"/>
- <pair l="Y" r="Oacute" v="-109"/>
- <pair l="Y" r="Ocircumflex" v="-109"/>
- <pair l="Y" r="Odieresis" v="-109"/>
- <pair l="Y" r="Ograve" v="-109"/>
- <pair l="Y" r="Oslash" v="-110"/>
- <pair l="Y" r="Otilde" v="-109"/>
- <pair l="Y" r="S" v="-55"/>
- <pair l="Y" r="T" v="65"/>
- <pair l="Y" r="a" v="-167"/>
- <pair l="Y" r="ae" v="-167"/>
- <pair l="Y" r="colon" v="-150"/>
- <pair l="Y" r="comma" v="-216"/>
- <pair l="Y" r="e" v="-193"/>
- <pair l="Y" r="g" v="-191"/>
- <pair l="Y" r="guillemotleft" v="-258"/>
- <pair l="Y" r="guilsinglleft" v="-238"/>
- <pair l="Y" r="hyphen" v="-166"/>
- <pair l="Y" r="i" v="7"/>
- <pair l="Y" r="o" v="-189"/>
- <pair l="Y" r="oslash" v="-211"/>
- <pair l="Y" r="p" v="-130"/>
- <pair l="Y" r="period" v="-217"/>
- <pair l="Y" r="semicolon" v="-143"/>
- <pair l="Y" r="u" v="-131"/>
- <pair l="Y" r="v" v="-72"/>
- <pair l="Z" r="v" v="-60"/>
- <pair l="Z" r="y" v="-60"/>
- <pair l="a" r="j" v="-2"/>
- <pair l="a" r="quoteright" v="-45"/>
- <pair l="a" r="v" v="-55"/>
- <pair l="a" r="w" v="-22"/>
- <pair l="a" r="y" v="-55"/>
- <pair l="aacute" r="v" v="-55"/>
- <pair l="aacute" r="w" v="-22"/>
- <pair l="aacute" r="y" v="-55"/>
- <pair l="adieresis" r="v" v="-55"/>
- <pair l="adieresis" r="w" v="-22"/>
- <pair l="adieresis" r="y" v="-55"/>
- <pair l="ae" r="v" v="-42"/>
- <pair l="ae" r="w" v="-26"/>
- <pair l="ae" r="y" v="-42"/>
- <pair l="agrave" r="v" v="-55"/>
- <pair l="agrave" r="w" v="-22"/>
- <pair l="agrave" r="y" v="-55"/>
- <pair l="aring" r="v" v="-55"/>
- <pair l="aring" r="w" v="-22"/>
- <pair l="aring" r="y" v="-55"/>
- <pair l="b" r="v" v="-28"/>
- <pair l="b" r="w" v="0"/>
- <pair l="b" r="y" v="-28"/>
- <pair l="c" r="h" v="-41"/>
- <pair l="c" r="k" v="-41"/>
- <pair l="comma" r="one" v="-104"/>
- <pair l="comma" r="quotedblright" v="-54"/>
- <pair l="comma" r="quoteright" v="-67"/>
- <pair l="e" r="quoteright" v="-27"/>
- <pair l="e" r="t" v="-29"/>
- <pair l="e" r="v" v="-41"/>
- <pair l="e" r="w" v="-24"/>
- <pair l="e" r="x" v="-2"/>
- <pair l="e" r="y" v="-41"/>
- <pair l="eacute" r="v" v="-41"/>
- <pair l="eacute" r="w" v="-24"/>
- <pair l="eacute" r="y" v="-41"/>
- <pair l="ecircumflex" r="v" v="-41"/>
- <pair l="ecircumflex" r="w" v="-24"/>
- <pair l="ecircumflex" r="y" v="-41"/>
- <pair l="eight" r="four" v="48"/>
- <pair l="eight" r="one" v="-80"/>
- <pair l="eight" r="seven" v="-36"/>
- <pair l="f" r="a" v="-10"/>
- <pair l="f" r="aacute" v="-10"/>
- <pair l="f" r="adieresis" v="-10"/>
- <pair l="f" r="ae" v="-10"/>
- <pair l="f" r="aring" v="-10"/>
- <pair l="f" r="e" v="-12"/>
- <pair l="f" r="eacute" v="-12"/>
- <pair l="f" r="f" v="68"/>
- <pair l="f" r="i" v="50"/>
- <pair l="f" r="j" v="48"/>
- <pair l="f" r="l" v="50"/>
- <pair l="f" r="o" v="-11"/>
- <pair l="f" r="oacute" v="-11"/>
- <pair l="f" r="odieresis" v="-11"/>
- <pair l="f" r="oe" v="-16"/>
- <pair l="f" r="oslash" v="-40"/>
- <pair l="f" r="quoteright" v="60"/>
- <pair l="f" r="s" v="14"/>
- <pair l="f" r="t" v="69"/>
- <pair l="five" r="four" v="-11"/>
- <pair l="five" r="one" v="-125"/>
- <pair l="five" r="seven" v="-79"/>
- <pair l="four" r="four" v="41"/>
- <pair l="four" r="one" v="-157"/>
- <pair l="four" r="seven" v="-110"/>
- <pair l="g" r="a" v="-27"/>
- <pair l="g" r="adieresis" v="-27"/>
- <pair l="g" r="ae" v="-27"/>
- <pair l="g" r="aring" v="-27"/>
- <pair l="g" r="e" v="-7"/>
- <pair l="g" r="eacute" v="-7"/>
- <pair l="g" r="l" v="3"/>
- <pair l="g" r="oacute" v="-4"/>
- <pair l="g" r="odieresis" v="-4"/>
- <pair l="g" r="r" v="-9"/>
- <pair l="guillemotright" r="A" v="-75"/>
- <pair l="guillemotright" r="AE" v="-142"/>
- <pair l="guillemotright" r="Aacute" v="-75"/>
- <pair l="guillemotright" r="Adieresis" v="-75"/>
- <pair l="guillemotright" r="Aring" v="-75"/>
- <pair l="guillemotright" r="T" v="-226"/>
- <pair l="guillemotright" r="V" v="-162"/>
- <pair l="guillemotright" r="W" v="-97"/>
- <pair l="guillemotright" r="Y" v="-242"/>
- <pair l="guilsinglright" r="A" v="-54"/>
- <pair l="guilsinglright" r="AE" v="-120"/>
- <pair l="guilsinglright" r="Aacute" v="-54"/>
- <pair l="guilsinglright" r="Adieresis" v="-54"/>
- <pair l="guilsinglright" r="Aring" v="-54"/>
- <pair l="guilsinglright" r="T" v="-205"/>
- <pair l="guilsinglright" r="V" v="-140"/>
- <pair l="guilsinglright" r="W" v="-75"/>
- <pair l="guilsinglright" r="Y" v="-221"/>
- <pair l="h" r="quoteright" v="-11"/>
- <pair l="h" r="y" v="-29"/>
- <pair l="hyphen" r="A" v="-2"/>
- <pair l="hyphen" r="AE" v="-79"/>
- <pair l="hyphen" r="Aacute" v="-2"/>
- <pair l="hyphen" r="Adieresis" v="-2"/>
- <pair l="hyphen" r="Aring" v="-2"/>
- <pair l="hyphen" r="T" v="-139"/>
- <pair l="hyphen" r="V" v="-65"/>
- <pair l="hyphen" r="W" v="-4"/>
- <pair l="hyphen" r="Y" v="-148"/>
- <pair l="i" r="T" v="14"/>
- <pair l="i" r="j" v="12"/>
- <pair l="k" r="a" v="-31"/>
- <pair l="k" r="aacute" v="-31"/>
- <pair l="k" r="adieresis" v="-31"/>
- <pair l="k" r="ae" v="-29"/>
- <pair l="k" r="aring" v="-31"/>
- <pair l="k" r="comma" v="-5"/>
- <pair l="k" r="e" v="-76"/>
- <pair l="k" r="eacute" v="-76"/>
- <pair l="k" r="g" v="-81"/>
- <pair l="k" r="hyphen" v="-102"/>
- <pair l="k" r="o" v="-71"/>
- <pair l="k" r="oacute" v="-71"/>
- <pair l="k" r="odieresis" v="-71"/>
- <pair l="k" r="period" v="-5"/>
- <pair l="k" r="s" v="5"/>
- <pair l="k" r="u" v="-46"/>
- <pair l="k" r="udieresis" v="-46"/>
- <pair l="l" r="v" v="9"/>
- <pair l="l" r="y" v="9"/>
- <pair l="m" r="p" v="-9"/>
- <pair l="m" r="v" v="-29"/>
- <pair l="m" r="w" v="-1"/>
- <pair l="m" r="y" v="-29"/>
- <pair l="n" r="T" v="-182"/>
- <pair l="n" r="p" v="-8"/>
- <pair l="n" r="quoteright" v="-11"/>
- <pair l="n" r="v" v="-29"/>
- <pair l="n" r="w" v="0"/>
- <pair l="n" r="y" v="-29"/>
- <pair l="nine" r="four" v="12"/>
- <pair l="nine" r="one" v="-121"/>
- <pair l="nine" r="seven" v="-84"/>
- <pair l="o" r="T" v="-188"/>
- <pair l="o" r="quoteright" v="-23"/>
- <pair l="o" r="t" v="-9"/>
- <pair l="o" r="v" v="-33"/>
- <pair l="o" r="w" v="-3"/>
- <pair l="o" r="x" v="-41"/>
- <pair l="o" r="y" v="-33"/>
- <pair l="oacute" r="v" v="-33"/>
- <pair l="oacute" r="w" v="-3"/>
- <pair l="oacute" r="y" v="-33"/>
- <pair l="ocircumflex" r="t" v="-9"/>
- <pair l="odieresis" r="t" v="-9"/>
- <pair l="odieresis" r="v" v="-33"/>
- <pair l="odieresis" r="w" v="-3"/>
- <pair l="odieresis" r="x" v="-41"/>
- <pair l="odieresis" r="y" v="-33"/>
- <pair l="ograve" r="v" v="-33"/>
- <pair l="ograve" r="w" v="-3"/>
- <pair l="ograve" r="y" v="-33"/>
- <pair l="one" r="comma" v="-48"/>
- <pair l="one" r="eight" v="-50"/>
- <pair l="one" r="five" v="-49"/>
- <pair l="one" r="four" v="-111"/>
- <pair l="one" r="nine" v="-50"/>
- <pair l="one" r="one" v="-83"/>
- <pair l="one" r="period" v="-48"/>
- <pair l="one" r="seven" v="-80"/>
- <pair l="one" r="six" v="-76"/>
- <pair l="one" r="three" v="-44"/>
- <pair l="one" r="two" v="-19"/>
- <pair l="one" r="zero" v="-81"/>
- <pair l="p" r="t" v="-5"/>
- <pair l="p" r="y" v="-28"/>
- <pair l="period" r="one" v="-104"/>
- <pair l="period" r="quotedblright" v="-56"/>
- <pair l="period" r="quoteright" v="-69"/>
- <pair l="q" r="c" v="-10"/>
- <pair l="q" r="u" v="-8"/>
- <pair l="quotedblbase" r="A" v="75"/>
- <pair l="quotedblbase" r="AE" v="47"/>
- <pair l="quotedblbase" r="T" v="-134"/>
- <pair l="quotedblbase" r="V" v="-130"/>
- <pair l="quotedblbase" r="W" v="-46"/>
- <pair l="quotedblbase" r="Y" v="-155"/>
- <pair l="quotedblleft" r="A" v="-118"/>
- <pair l="quotedblleft" r="AE" v="-274"/>
- <pair l="quotedblleft" r="Aacute" v="-118"/>
- <pair l="quotedblleft" r="Adieresis" v="-118"/>
- <pair l="quotedblleft" r="Aring" v="-118"/>
- <pair l="quotedblleft" r="T" v="32"/>
- <pair l="quotedblleft" r="V" v="54"/>
- <pair l="quotedblleft" r="W" v="75"/>
- <pair l="quotedblleft" r="Y" v="29"/>
- <pair l="quotedblright" r="A" v="-115"/>
- <pair l="quotedblright" r="AE" v="-270"/>
- <pair l="quotedblright" r="Aacute" v="-115"/>
- <pair l="quotedblright" r="Adieresis" v="-115"/>
- <pair l="quotedblright" r="Aring" v="-115"/>
- <pair l="quotedblright" r="T" v="52"/>
- <pair l="quotedblright" r="V" v="64"/>
- <pair l="quotedblright" r="W" v="84"/>
- <pair l="quotedblright" r="Y" v="42"/>
- <pair l="quoteleft" r="A" v="-131"/>
- <pair l="quoteleft" r="AE" v="-282"/>
- <pair l="quoteleft" r="Aacute" v="-131"/>
- <pair l="quoteleft" r="Adieresis" v="-131"/>
- <pair l="quoteleft" r="Aring" v="-131"/>
- <pair l="quoteleft" r="T" v="15"/>
- <pair l="quoteleft" r="V" v="34"/>
- <pair l="quoteleft" r="W" v="56"/>
- <pair l="quoteleft" r="Y" v="7"/>
- <pair l="quoteright" r="A" v="-127"/>
- <pair l="quoteright" r="AE" v="-279"/>
- <pair l="quoteright" r="Aacute" v="-127"/>
- <pair l="quoteright" r="Adieresis" v="-127"/>
- <pair l="quoteright" r="Aring" v="-127"/>
- <pair l="quoteright" r="comma" v="-81"/>
- <pair l="quoteright" r="d" v="-41"/>
- <pair l="quoteright" r="o" v="-37"/>
- <pair l="quoteright" r="period" v="-83"/>
- <pair l="quoteright" r="r" v="-16"/>
- <pair l="quoteright" r="s" v="-19"/>
- <pair l="quoteright" r="t" v="15"/>
- <pair l="quoteright" r="v" v="22"/>
- <pair l="quoteright" r="w" v="35"/>
- <pair l="quoteright" r="y" v="22"/>
- <pair l="r" r="a" v="-16"/>
- <pair l="r" r="aacute" v="-16"/>
- <pair l="r" r="acircumflex" v="-16"/>
- <pair l="r" r="adieresis" v="-16"/>
- <pair l="r" r="ae" v="-16"/>
- <pair l="r" r="agrave" v="-16"/>
- <pair l="r" r="aring" v="-16"/>
- <pair l="r" r="c" v="-13"/>
- <pair l="r" r="ccedilla" v="-7"/>
- <pair l="r" r="colon" v="-11"/>
- <pair l="r" r="comma" v="-100"/>
- <pair l="r" r="d" v="-13"/>
- <pair l="r" r="e" v="-11"/>
- <pair l="r" r="eacute" v="-11"/>
- <pair l="r" r="ecircumflex" v="-11"/>
- <pair l="r" r="egrave" v="-11"/>
- <pair l="r" r="f" v="62"/>
- <pair l="r" r="g" v="-5"/>
- <pair l="r" r="h" v="1"/>
- <pair l="r" r="hyphen" v="-64"/>
- <pair l="r" r="i" v="13"/>
- <pair l="r" r="j" v="11"/>
- <pair l="r" r="k" v="1"/>
- <pair l="r" r="l" v="13"/>
- <pair l="r" r="m" v="1"/>
- <pair l="r" r="n" v="1"/>
- <pair l="r" r="o" v="-10"/>
- <pair l="r" r="oacute" v="-10"/>
- <pair l="r" r="ocircumflex" v="-10"/>
- <pair l="r" r="odieresis" v="-10"/>
- <pair l="r" r="oe" v="-14"/>
- <pair l="r" r="ograve" v="-10"/>
- <pair l="r" r="oslash" v="-39"/>
- <pair l="r" r="p" v="1"/>
- <pair l="r" r="period" v="-101"/>
- <pair l="r" r="q" v="-13"/>
- <pair l="r" r="quoteright" v="31"/>
- <pair l="r" r="r" v="1"/>
- <pair l="r" r="s" v="11"/>
- <pair l="r" r="semicolon" v="-11"/>
- <pair l="r" r="t" v="63"/>
- <pair l="r" r="u" v="7"/>
- <pair l="r" r="v" v="66"/>
- <pair l="r" r="w" v="71"/>
- <pair l="r" r="x" v="55"/>
- <pair l="r" r="y" v="66"/>
- <pair l="r" r="z" v="26"/>
- <pair l="s" r="quoteright" v="-69"/>
- <pair l="s" r="t" v="-29"/>
- <pair l="seven" r="colon" v="-103"/>
- <pair l="seven" r="comma" v="-230"/>
- <pair l="seven" r="eight" v="-34"/>
- <pair l="seven" r="five" v="-29"/>
- <pair l="seven" r="four" v="-164"/>
- <pair l="seven" r="one" v="-50"/>
- <pair l="seven" r="period" v="-231"/>
- <pair l="seven" r="seven" v="-3"/>
- <pair l="seven" r="six" v="-46"/>
- <pair l="seven" r="three" v="-22"/>
- <pair l="seven" r="two" v="-5"/>
- <pair l="six" r="four" v="18"/>
- <pair l="six" r="one" v="-120"/>
- <pair l="six" r="seven" v="-73"/>
- <pair l="t" r="S" v="19"/>
- <pair l="t" r="a" v="-1"/>
- <pair l="t" r="aacute" v="-1"/>
- <pair l="t" r="adieresis" v="-1"/>
- <pair l="t" r="ae" v="0"/>
- <pair l="t" r="aring" v="-1"/>
- <pair l="t" r="colon" v="-9"/>
- <pair l="t" r="e" v="-16"/>
- <pair l="t" r="eacute" v="-16"/>
- <pair l="t" r="h" v="3"/>
- <pair l="t" r="o" v="-15"/>
- <pair l="t" r="oacute" v="-15"/>
- <pair l="t" r="odieresis" v="-15"/>
- <pair l="t" r="quoteright" v="30"/>
- <pair l="t" r="semicolon" v="-9"/>
- <pair l="three" r="four" v="-11"/>
- <pair l="three" r="one" v="-137"/>
- <pair l="three" r="seven" v="-94"/>
- <pair l="two" r="four" v="-145"/>
- <pair l="two" r="one" v="-126"/>
- <pair l="two" r="seven" v="-91"/>
- <pair l="u" r="quoteright" v="0"/>
- <pair l="v" r="a" v="-26"/>
- <pair l="v" r="aacute" v="-26"/>
- <pair l="v" r="acircumflex" v="-26"/>
- <pair l="v" r="adieresis" v="-26"/>
- <pair l="v" r="ae" v="-26"/>
- <pair l="v" r="agrave" v="-26"/>
- <pair l="v" r="aring" v="-26"/>
- <pair l="v" r="atilde" v="-26"/>
- <pair l="v" r="c" v="-35"/>
- <pair l="v" r="colon" v="-11"/>
- <pair l="v" r="comma" v="-112"/>
- <pair l="v" r="e" v="-32"/>
- <pair l="v" r="eacute" v="-32"/>
- <pair l="v" r="ecircumflex" v="-32"/>
- <pair l="v" r="egrave" v="-32"/>
- <pair l="v" r="g" v="-31"/>
- <pair l="v" r="hyphen" v="2"/>
- <pair l="v" r="l" v="14"/>
- <pair l="v" r="o" v="-33"/>
- <pair l="v" r="oacute" v="-33"/>
- <pair l="v" r="odieresis" v="-33"/>
- <pair l="v" r="ograve" v="-33"/>
- <pair l="v" r="oslash" v="-61"/>
- <pair l="v" r="period" v="-113"/>
- <pair l="v" r="s" v="-17"/>
- <pair l="v" r="semicolon" v="-11"/>
- <pair l="w" r="a" v="-25"/>
- <pair l="w" r="aacute" v="-25"/>
- <pair l="w" r="acircumflex" v="-25"/>
- <pair l="w" r="adieresis" v="-25"/>
- <pair l="w" r="ae" v="-25"/>
- <pair l="w" r="agrave" v="-25"/>
- <pair l="w" r="aring" v="-25"/>
- <pair l="w" r="atilde" v="-25"/>
- <pair l="w" r="c" v="-18"/>
- <pair l="w" r="colon" v="-13"/>
- <pair l="w" r="comma" v="-70"/>
- <pair l="w" r="e" v="-19"/>
- <pair l="w" r="eacute" v="-19"/>
- <pair l="w" r="ecircumflex" v="-19"/>
- <pair l="w" r="egrave" v="-19"/>
- <pair l="w" r="g" v="-21"/>
- <pair l="w" r="hyphen" v="23"/>
- <pair l="w" r="l" v="12"/>
- <pair l="w" r="o" v="-15"/>
- <pair l="w" r="oacute" v="-15"/>
- <pair l="w" r="odieresis" v="-15"/>
- <pair l="w" r="ograve" v="-15"/>
- <pair l="w" r="oslash" v="-38"/>
- <pair l="w" r="period" v="-71"/>
- <pair l="w" r="s" v="-12"/>
- <pair l="w" r="semicolon" v="-13"/>
- <pair l="x" r="a" v="-32"/>
- <pair l="x" r="c" v="-49"/>
- <pair l="x" r="e" v="-50"/>
- <pair l="x" r="eacute" v="-50"/>
- <pair l="x" r="o" v="-45"/>
- <pair l="x" r="q" v="-43"/>
- <pair l="y" r="a" v="-26"/>
- <pair l="y" r="aacute" v="-26"/>
- <pair l="y" r="acircumflex" v="-26"/>
- <pair l="y" r="adieresis" v="-26"/>
- <pair l="y" r="ae" v="-26"/>
- <pair l="y" r="agrave" v="-26"/>
- <pair l="y" r="aring" v="-26"/>
- <pair l="y" r="atilde" v="-26"/>
- <pair l="y" r="c" v="-36"/>
- <pair l="y" r="colon" v="-11"/>
- <pair l="y" r="comma" v="-116"/>
- <pair l="y" r="e" v="-33"/>
- <pair l="y" r="eacute" v="-33"/>
- <pair l="y" r="ecircumflex" v="-33"/>
- <pair l="y" r="egrave" v="-33"/>
- <pair l="y" r="g" v="-32"/>
- <pair l="y" r="hyphen" v="0"/>
- <pair l="y" r="l" v="14"/>
- <pair l="y" r="o" v="-35"/>
- <pair l="y" r="oacute" v="-35"/>
- <pair l="y" r="odieresis" v="-35"/>
- <pair l="y" r="ograve" v="-35"/>
- <pair l="y" r="oslash" v="-62"/>
- <pair l="y" r="period" v="-117"/>
- <pair l="y" r="s" v="-17"/>
- <pair l="y" r="semicolon" v="-11"/>
- <pair l="zero" r="four" v="30"/>
- <pair l="zero" r="one" v="-111"/>
- <pair l="zero" r="seven" v="-73"/>
- </kernsubtable>
- </kern>
-
- <name>
- <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
- Luxi Sans
- </namerecord>
- <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
- Luxi Sans Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
- Luxi Sans Regular
- </namerecord>
- <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
- LuxiSans
- </namerecord>
- <namerecord nameID="7" platformID="1" platEncID="0" langID="0x0">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="1" platEncID="0" langID="0x0">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="1" platEncID="0" langID="0x0">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="1" platEncID="0" langID="0x0">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="1" platEncID="0" langID="0x0">
- design@bigelowandholmes.com
- </namerecord>
- <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
- Copyright (c) 2001 by Bigelow &amp; Holmes Inc. Instructions copyright (c) 2001 by URW++.
- </namerecord>
- <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Luxi Sans
- </namerecord>
- <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
- Regular
- </namerecord>
- <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
- Luxi Sans Regular: B&amp;H
- </namerecord>
- <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Luxi Sans Regular
- </namerecord>
- <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
- 1.2 : October 12, 2001
- </namerecord>
- <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
- LuxiSans
- </namerecord>
- <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
- Luxi is a registered trademark of Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
- Bigelow &amp; Holmes Inc.
- </namerecord>
- <namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
- Kris Holmes and Charles Bigelow
- </namerecord>
- <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
- http://www.urwpp.de
- </namerecord>
- <namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
- design@bigelowandholmes.com
- </namerecord>
- </name>
-
- <post>
- <formatType value="2.0"/>
- <italicAngle value="0.0"/>
- <underlinePosition value="0"/>
- <underlineThickness value="0"/>
- <isFixedPitch value="0"/>
- <minMemType42 value="0"/>
- <maxMemType42 value="0"/>
- <minMemType1 value="0"/>
- <maxMemType1 value="0"/>
- <psNames>
- <!-- This file uses unique glyph names based on the information
- found in the 'post' table. Since these names might not be unique,
- we have to invent artificial names in case of clashes. In order to
- be able to retain the original information, we need a name to
- ps name mapping for those cases where they differ. That's what
- you see below.
- -->
- <psName name=".notdef#1" psName=".notdef"/>
- <psName name=".notdef#10" psName=".notdef"/>
- <psName name=".notdef#11" psName=".notdef"/>
- <psName name=".notdef#12" psName=".notdef"/>
- <psName name=".notdef#13" psName=".notdef"/>
- <psName name=".notdef#14" psName=".notdef"/>
- <psName name=".notdef#15" psName=".notdef"/>
- <psName name=".notdef#16" psName=".notdef"/>
- <psName name=".notdef#17" psName=".notdef"/>
- <psName name=".notdef#18" psName=".notdef"/>
- <psName name=".notdef#2" psName=".notdef"/>
- <psName name=".notdef#3" psName=".notdef"/>
- <psName name=".notdef#4" psName=".notdef"/>
- <psName name=".notdef#5" psName=".notdef"/>
- <psName name=".notdef#6" psName=".notdef"/>
- <psName name=".notdef#7" psName=".notdef"/>
- <psName name=".notdef#8" psName=".notdef"/>
- <psName name=".notdef#9" psName=".notdef"/>
- <psName name="Euro#1" psName="Euro"/>
- <psName name="fi#1" psName="fi"/>
- <psName name="fl#1" psName="fl"/>
- <psName name="fraction#1" psName="fraction"/>
- <psName name="hyphen#1" psName="hyphen"/>
- <psName name="macron#1" psName="macron"/>
- <psName name="periodcentered#1" psName="periodcentered"/>
- <psName name="semicolon#1" psName="semicolon"/>
- </psNames>
- <extraNames>
- <!-- following are the name that are not taken from the standard Mac glyph order -->
- <psName name="fraction"/>
- <psName name="fi"/>
- <psName name="Euro"/>
- <psName name="tilde"/>
- <psName name="macron"/>
- <psName name="Euro"/>
- <psName name="sfthyphen"/>
- <psName name="periodcentered"/>
- <psName name="Amacron"/>
- <psName name="amacron"/>
- <psName name="Abreve"/>
- <psName name="abreve"/>
- <psName name="Aogonek"/>
- <psName name="aogonek"/>
- <psName name="Ccircumflex"/>
- <psName name="ccircumflex"/>
- <psName name="Cdotaccent"/>
- <psName name="cdotaccent"/>
- <psName name="Dcaron"/>
- <psName name="dcaron"/>
- <psName name="Dcroat"/>
- <psName name="dcroat"/>
- <psName name="Emacron"/>
- <psName name="emacron"/>
- <psName name="Ebreve"/>
- <psName name="ebreve"/>
- <psName name="Edotaccent"/>
- <psName name="edotaccent"/>
- <psName name="Eogonek"/>
- <psName name="eogonek"/>
- <psName name="Ecaron"/>
- <psName name="ecaron"/>
- <psName name="Gcircumflex"/>
- <psName name="gcircumflex"/>
- <psName name="Gdotaccent"/>
- <psName name="gdotaccent"/>
- <psName name="Gcommaaccent"/>
- <psName name="gcommaaccent"/>
- <psName name="Hcircumflex"/>
- <psName name="hcircumflex"/>
- <psName name="Hbar"/>
- <psName name="hbar"/>
- <psName name="Itilde"/>
- <psName name="itilde"/>
- <psName name="Imacron"/>
- <psName name="imacron"/>
- <psName name="Ibreve"/>
- <psName name="ibreve"/>
- <psName name="Iogonek"/>
- <psName name="iogonek"/>
- <psName name="IJ"/>
- <psName name="ij"/>
- <psName name="Jcircumflex"/>
- <psName name="jcircumflex"/>
- <psName name="Kcommaaccent"/>
- <psName name="kcommaaccent"/>
- <psName name="kgreenlandic"/>
- <psName name="Lacute"/>
- <psName name="lacute"/>
- <psName name="Lcommaaccent"/>
- <psName name="lcommaaccent"/>
- <psName name="Lcaron"/>
- <psName name="lcaron"/>
- <psName name="Ldot"/>
- <psName name="ldot"/>
- <psName name="Nacute"/>
- <psName name="nacute"/>
- <psName name="Ncommaaccent"/>
- <psName name="ncommaaccent"/>
- <psName name="Ncaron"/>
- <psName name="ncaron"/>
- <psName name="napostrophe"/>
- <psName name="Eng"/>
- <psName name="eng"/>
- <psName name="Omacron"/>
- <psName name="omacron"/>
- <psName name="Obreve"/>
- <psName name="obreve"/>
- <psName name="Ohungarumlaut"/>
- <psName name="ohungarumlaut"/>
- <psName name="Racute"/>
- <psName name="racute"/>
- <psName name="Rcommaaccent"/>
- <psName name="rcommaaccent"/>
- <psName name="Rcaron"/>
- <psName name="rcaron"/>
- <psName name="Sacute"/>
- <psName name="sacute"/>
- <psName name="Scircumflex"/>
- <psName name="scircumflex"/>
- <psName name="Tcommaaccent"/>
- <psName name="tcommaaccent"/>
- <psName name="Tcaron"/>
- <psName name="tcaron"/>
- <psName name="Tbar"/>
- <psName name="tbar"/>
- <psName name="Utilde"/>
- <psName name="utilde"/>
- <psName name="Umacron"/>
- <psName name="umacron"/>
- <psName name="Ubreve"/>
- <psName name="ubreve"/>
- <psName name="Uring"/>
- <psName name="uring"/>
- <psName name="Uhungarumlaut"/>
- <psName name="uhungarumlaut"/>
- <psName name="Uogonek"/>
- <psName name="uogonek"/>
- <psName name="Wcircumflex"/>
- <psName name="wcircumflex"/>
- <psName name="Ycircumflex"/>
- <psName name="ycircumflex"/>
- <psName name="Zacute"/>
- <psName name="zacute"/>
- <psName name="Zdotaccent"/>
- <psName name="zdotaccent"/>
- <psName name="longs"/>
- <psName name="Scommaaccent"/>
- <psName name="scommaaccent"/>
- <psName name="Tcommabelow"/>
- <psName name="tcommabelow"/>
- <psName name="Unterkomma"/>
- <psName name="semicolon"/>
- <psName name="anoteleia"/>
- <psName name="hyphen"/>
- <psName name="nbhyphen"/>
- <psName name="figuredash"/>
- <psName name="afii00208"/>
- <psName name="quotereversed"/>
- <psName name="radicalex"/>
- <psName name="estimated"/>
- <psName name="dotmath"/>
- <psName name="fi"/>
- <psName name="fl"/>
- <psName name="foursuperiour"/>
- <psName name="dotlessj"/>
- </extraNames>
- </post>
-
- <gasp>
- <gaspRange rangeMaxPPEM="8" rangeGaspBehavior="2"/>
- <gaspRange rangeMaxPPEM="16" rangeGaspBehavior="1"/>
- <gaspRange rangeMaxPPEM="65535" rangeGaspBehavior="3"/>
- </gasp>
-
- <vhea>
- <tableVersion value="1.0"/>
- <ascent value="2033"/>
- <descent value="432"/>
- <lineGap value="0"/>
- <advanceHeightMax value="2465"/>
- <minTopSideBearing value="0"/>
- <minBottomSideBearing value="0"/>
- <yMaxExtent value="2465"/>
- <caretSlopeRise value="0"/>
- <caretSlopeRun value="1"/>
- <reserved0 value="0"/>
- <reserved1 value="0"/>
- <reserved2 value="0"/>
- <reserved3 value="0"/>
- <reserved4 value="0"/>
- <metricDataFormat value="0"/>
- <numberOfVMetrics value="391"/>
- </vhea>
-
- <vmtx>
- <mtx name=".notdef" height="2465" tsb="553"/>
- <mtx name=".notdef#1" height="0" tsb="0"/>
- <mtx name=".notdef#10" height="2465" tsb="0"/>
- <mtx name=".notdef#11" height="2465" tsb="0"/>
- <mtx name=".notdef#12" height="2465" tsb="0"/>
- <mtx name=".notdef#13" height="2465" tsb="0"/>
- <mtx name=".notdef#14" height="2465" tsb="0"/>
- <mtx name=".notdef#15" height="2465" tsb="0"/>
- <mtx name=".notdef#16" height="1139" tsb="0"/>
- <mtx name=".notdef#17" height="2465" tsb="0"/>
- <mtx name=".notdef#18" height="2465" tsb="0"/>
- <mtx name=".notdef#2" height="2465" tsb="0"/>
- <mtx name=".notdef#3" height="2465" tsb="0"/>
- <mtx name=".notdef#4" height="2465" tsb="0"/>
- <mtx name=".notdef#5" height="2465" tsb="0"/>
- <mtx name=".notdef#6" height="2465" tsb="0"/>
- <mtx name=".notdef#7" height="2465" tsb="0"/>
- <mtx name=".notdef#8" height="2465" tsb="0"/>
- <mtx name=".notdef#9" height="2465" tsb="0"/>
- <mtx name="A" height="2465" tsb="553"/>
- <mtx name="AE" height="2465" tsb="553"/>
- <mtx name="Aacute" height="2465" tsb="108"/>
- <mtx name="Abreve" height="2465" tsb="108"/>
- <mtx name="Acircumflex" height="2465" tsb="108"/>
- <mtx name="Adieresis" height="2465" tsb="256"/>
- <mtx name="Agrave" height="2465" tsb="108"/>
- <mtx name="Amacron" height="2465" tsb="281"/>
- <mtx name="Aogonek" height="2465" tsb="553"/>
- <mtx name="Aring" height="2465" tsb="98"/>
- <mtx name="Atilde" height="2465" tsb="195"/>
- <mtx name="B" height="2465" tsb="553"/>
- <mtx name="C" height="2465" tsb="516"/>
- <mtx name="Cacute" height="2465" tsb="108"/>
- <mtx name="Ccaron" height="2465" tsb="108"/>
- <mtx name="Ccedilla" height="2465" tsb="516"/>
- <mtx name="Ccircumflex" height="2465" tsb="108"/>
- <mtx name="Cdotaccent" height="2465" tsb="232"/>
- <mtx name="D" height="2465" tsb="553"/>
- <mtx name="Dcaron" height="2465" tsb="108"/>
- <mtx name="Dcroat" height="2465" tsb="553"/>
- <mtx name="E" height="2465" tsb="553"/>
- <mtx name="Eacute" height="2465" tsb="108"/>
- <mtx name="Ebreve" height="2465" tsb="108"/>
- <mtx name="Ecaron" height="2465" tsb="108"/>
- <mtx name="Ecircumflex" height="2465" tsb="108"/>
- <mtx name="Edieresis" height="2465" tsb="256"/>
- <mtx name="Edotaccent" height="2465" tsb="232"/>
- <mtx name="Egrave" height="2465" tsb="108"/>
- <mtx name="Emacron" height="2465" tsb="281"/>
- <mtx name="Eng" height="2465" tsb="553"/>
- <mtx name="Eogonek" height="2465" tsb="553"/>
- <mtx name="Eth" height="2465" tsb="553"/>
- <mtx name="Euro" height="2465" tsb="518"/>
- <mtx name="Euro#1" height="2465" tsb="518"/>
- <mtx name="F" height="2465" tsb="553"/>
- <mtx name="G" height="2465" tsb="516"/>
- <mtx name="Gbreve" height="2465" tsb="108"/>
- <mtx name="Gcircumflex" height="2465" tsb="108"/>
- <mtx name="Gcommaaccent" height="2465" tsb="516"/>
- <mtx name="Gdotaccent" height="2465" tsb="232"/>
- <mtx name="H" height="2465" tsb="553"/>
- <mtx name="Hbar" height="2465" tsb="553"/>
- <mtx name="Hcircumflex" height="2465" tsb="108"/>
- <mtx name="I" height="2465" tsb="553"/>
- <mtx name="IJ" height="2465" tsb="553"/>
- <mtx name="Iacute" height="2465" tsb="108"/>
- <mtx name="Ibreve" height="2465" tsb="108"/>
- <mtx name="Icircumflex" height="2465" tsb="108"/>
- <mtx name="Idieresis" height="2465" tsb="256"/>
- <mtx name="Idotaccent" height="2465" tsb="232"/>
- <mtx name="Igrave" height="2465" tsb="108"/>
- <mtx name="Imacron" height="2465" tsb="281"/>
- <mtx name="Iogonek" height="2465" tsb="553"/>
- <mtx name="Itilde" height="2465" tsb="195"/>
- <mtx name="J" height="2465" tsb="553"/>
- <mtx name="Jcircumflex" height="2465" tsb="108"/>
- <mtx name="K" height="2465" tsb="553"/>
- <mtx name="Kcommaaccent" height="2465" tsb="553"/>
- <mtx name="L" height="2465" tsb="553"/>
- <mtx name="Lacute" height="2465" tsb="108"/>
- <mtx name="Lcaron" height="2465" tsb="553"/>
- <mtx name="Lcommaaccent" height="2465" tsb="553"/>
- <mtx name="Ldot" height="2465" tsb="553"/>
- <mtx name="Lslash" height="2465" tsb="553"/>
- <mtx name="M" height="2465" tsb="553"/>
- <mtx name="N" height="2465" tsb="553"/>
- <mtx name="Nacute" height="2465" tsb="108"/>
- <mtx name="Ncaron" height="2465" tsb="108"/>
- <mtx name="Ncommaaccent" height="2465" tsb="553"/>
- <mtx name="Ntilde" height="2465" tsb="195"/>
- <mtx name="O" height="2465" tsb="516"/>
- <mtx name="OE" height="2465" tsb="516"/>
- <mtx name="Oacute" height="2465" tsb="108"/>
- <mtx name="Obreve" height="2465" tsb="108"/>
- <mtx name="Ocircumflex" height="2465" tsb="108"/>
- <mtx name="Odieresis" height="2465" tsb="256"/>
- <mtx name="Ograve" height="2465" tsb="108"/>
- <mtx name="Ohungarumlaut" height="2465" tsb="108"/>
- <mtx name="Omacron" height="2465" tsb="281"/>
- <mtx name="Oslash" height="2465" tsb="516"/>
- <mtx name="Otilde" height="2465" tsb="195"/>
- <mtx name="P" height="2465" tsb="553"/>
- <mtx name="Q" height="2465" tsb="516"/>
- <mtx name="R" height="2465" tsb="553"/>
- <mtx name="Racute" height="2465" tsb="108"/>
- <mtx name="Rcaron" height="2465" tsb="108"/>
- <mtx name="Rcommaaccent" height="2465" tsb="553"/>
- <mtx name="S" height="2465" tsb="516"/>
- <mtx name="Sacute" height="2465" tsb="108"/>
- <mtx name="Scaron" height="2465" tsb="108"/>
- <mtx name="Scedilla" height="2465" tsb="516"/>
- <mtx name="Scircumflex" height="2465" tsb="108"/>
- <mtx name="Scommaaccent" height="2465" tsb="516"/>
- <mtx name="T" height="2465" tsb="553"/>
- <mtx name="Tbar" height="2465" tsb="553"/>
- <mtx name="Tcaron" height="2465" tsb="108"/>
- <mtx name="Tcommaaccent" height="2465" tsb="553"/>
- <mtx name="Tcommabelow" height="2465" tsb="553"/>
- <mtx name="Thorn" height="2465" tsb="553"/>
- <mtx name="U" height="2465" tsb="553"/>
- <mtx name="Uacute" height="2465" tsb="108"/>
- <mtx name="Ubreve" height="2465" tsb="108"/>
- <mtx name="Ucircumflex" height="2465" tsb="108"/>
- <mtx name="Udieresis" height="2465" tsb="256"/>
- <mtx name="Ugrave" height="2465" tsb="108"/>
- <mtx name="Uhungarumlaut" height="2465" tsb="108"/>
- <mtx name="Umacron" height="2465" tsb="281"/>
- <mtx name="Unterkomma" height="2465" tsb="2144"/>
- <mtx name="Uogonek" height="2465" tsb="553"/>
- <mtx name="Uring" height="2465" tsb="0"/>
- <mtx name="Utilde" height="2465" tsb="195"/>
- <mtx name="V" height="2465" tsb="553"/>
- <mtx name="W" height="2465" tsb="553"/>
- <mtx name="Wcircumflex" height="2465" tsb="108"/>
- <mtx name="X" height="2465" tsb="553"/>
- <mtx name="Y" height="2465" tsb="553"/>
- <mtx name="Yacute" height="2465" tsb="108"/>
- <mtx name="Ycircumflex" height="2465" tsb="108"/>
- <mtx name="Ydieresis" height="2465" tsb="256"/>
- <mtx name="Z" height="2465" tsb="553"/>
- <mtx name="Zacute" height="2465" tsb="108"/>
- <mtx name="Zcaron" height="2465" tsb="108"/>
- <mtx name="Zdotaccent" height="2465" tsb="232"/>
- <mtx name="a" height="2465" tsb="923"/>
- <mtx name="aacute" height="2465" tsb="429"/>
- <mtx name="abreve" height="2465" tsb="429"/>
- <mtx name="acircumflex" height="2465" tsb="429"/>
- <mtx name="acute" height="2465" tsb="429"/>
- <mtx name="adieresis" height="2465" tsb="577"/>
- <mtx name="ae" height="2465" tsb="923"/>
- <mtx name="afii00208" height="2465" tsb="1391"/>
- <mtx name="agrave" height="2465" tsb="429"/>
- <mtx name="amacron" height="2465" tsb="602"/>
- <mtx name="ampersand" height="2465" tsb="516"/>
- <mtx name="anoteleia" height="2465" tsb="1295"/>
- <mtx name="aogonek" height="2465" tsb="923"/>
- <mtx name="aring" height="2465" tsb="296"/>
- <mtx name="asciicircum" height="2465" tsb="553"/>
- <mtx name="asciitilde" height="2465" tsb="1261"/>
- <mtx name="asterisk" height="2465" tsb="553"/>
- <mtx name="at" height="2465" tsb="516"/>
- <mtx name="atilde" height="2465" tsb="516"/>
- <mtx name="b" height="2465" tsb="454"/>
- <mtx name="backslash" height="2465" tsb="553"/>
- <mtx name="bar" height="2465" tsb="454"/>
- <mtx name="braceleft" height="2465" tsb="454"/>
- <mtx name="braceright" height="2465" tsb="454"/>
- <mtx name="bracketleft" height="2465" tsb="454"/>
- <mtx name="bracketright" height="2465" tsb="454"/>
- <mtx name="breve" height="2465" tsb="429"/>
- <mtx name="brokenbar" height="2465" tsb="454"/>
- <mtx name="bullet" height="2465" tsb="923"/>
- <mtx name="c" height="2465" tsb="923"/>
- <mtx name="cacute" height="2465" tsb="429"/>
- <mtx name="caron" height="2465" tsb="429"/>
- <mtx name="ccaron" height="2465" tsb="429"/>
- <mtx name="ccedilla" height="2465" tsb="923"/>
- <mtx name="ccircumflex" height="2465" tsb="429"/>
- <mtx name="cdotaccent" height="2465" tsb="553"/>
- <mtx name="cedilla" height="2465" tsb="2033"/>
- <mtx name="cent" height="2465" tsb="553"/>
- <mtx name="circumflex" height="2465" tsb="429"/>
- <mtx name="colon" height="2465" tsb="947"/>
- <mtx name="comma" height="2465" tsb="1786"/>
- <mtx name="copyright" height="2465" tsb="553"/>
- <mtx name="currency" height="2465" tsb="845"/>
- <mtx name="d" height="2465" tsb="454"/>
- <mtx name="dagger" height="2465" tsb="553"/>
- <mtx name="daggerdbl" height="2465" tsb="553"/>
- <mtx name="dcaron" height="2465" tsb="454"/>
- <mtx name="dcroat" height="2465" tsb="454"/>
- <mtx name="degree" height="2465" tsb="516"/>
- <mtx name="dieresis" height="2465" tsb="577"/>
- <mtx name="divide" height="2465" tsb="849"/>
- <mtx name="dollar" height="2465" tsb="429"/>
- <mtx name="dotaccent" height="2465" tsb="553"/>
- <mtx name="dotlessi" height="2465" tsb="947"/>
- <mtx name="dotlessj" height="2465" tsb="947"/>
- <mtx name="dotmath" height="2465" tsb="1295"/>
- <mtx name="e" height="2465" tsb="923"/>
- <mtx name="eacute" height="2465" tsb="429"/>
- <mtx name="ebreve" height="2465" tsb="429"/>
- <mtx name="ecaron" height="2465" tsb="429"/>
- <mtx name="ecircumflex" height="2465" tsb="429"/>
- <mtx name="edieresis" height="2465" tsb="577"/>
- <mtx name="edotaccent" height="2465" tsb="553"/>
- <mtx name="egrave" height="2465" tsb="429"/>
- <mtx name="eight" height="2465" tsb="516"/>
- <mtx name="ellipsis" height="2465" tsb="1836"/>
- <mtx name="emacron" height="2465" tsb="602"/>
- <mtx name="emdash" height="2465" tsb="1391"/>
- <mtx name="endash" height="2465" tsb="1367"/>
- <mtx name="eng" height="2465" tsb="923"/>
- <mtx name="eogonek" height="2465" tsb="923"/>
- <mtx name="equal" height="2465" tsb="1182"/>
- <mtx name="estimated" height="2465" tsb="923"/>
- <mtx name="eth" height="2465" tsb="357"/>
- <mtx name="exclam" height="2465" tsb="553"/>
- <mtx name="exclamdown" height="2465" tsb="947"/>
- <mtx name="f" height="2465" tsb="429"/>
- <mtx name="fi" height="2465" tsb="429"/>
- <mtx name="fi#1" height="2465" tsb="429"/>
- <mtx name="figuredash" height="2465" tsb="1367"/>
- <mtx name="five" height="2465" tsb="553"/>
- <mtx name="fl" height="2465" tsb="429"/>
- <mtx name="fl#1" height="2465" tsb="429"/>
- <mtx name="florin" height="2465" tsb="516"/>
- <mtx name="four" height="2465" tsb="553"/>
- <mtx name="foursuperiour" height="2465" tsb="553"/>
- <mtx name="fraction" height="2465" tsb="516"/>
- <mtx name="fraction#1" height="2465" tsb="516"/>
- <mtx name="g" height="2465" tsb="923"/>
- <mtx name="gbreve" height="2465" tsb="429"/>
- <mtx name="gcircumflex" height="2465" tsb="429"/>
- <mtx name="gcommaaccent" height="2465" tsb="296"/>
- <mtx name="gdotaccent" height="2465" tsb="553"/>
- <mtx name="germandbls" height="2465" tsb="429"/>
- <mtx name="grave" height="2465" tsb="429"/>
- <mtx name="greater" height="2465" tsb="947"/>
- <mtx name="guillemotleft" height="2465" tsb="1046"/>
- <mtx name="guillemotright" height="2465" tsb="1046"/>
- <mtx name="guilsinglleft" height="2465" tsb="1046"/>
- <mtx name="guilsinglright" height="2465" tsb="1046"/>
- <mtx name="h" height="2465" tsb="454"/>
- <mtx name="hbar" height="2465" tsb="454"/>
- <mtx name="hcircumflex" height="2465" tsb="34"/>
- <mtx name="hungarumlaut" height="2465" tsb="429"/>
- <mtx name="hyphen" height="2465" tsb="1367"/>
- <mtx name="hyphen#1" height="2465" tsb="1367"/>
- <mtx name="i" height="2465" tsb="553"/>
- <mtx name="iacute" height="2465" tsb="429"/>
- <mtx name="ibreve" height="2465" tsb="429"/>
- <mtx name="icircumflex" height="2465" tsb="429"/>
- <mtx name="idieresis" height="2465" tsb="577"/>
- <mtx name="igrave" height="2465" tsb="429"/>
- <mtx name="ij" height="2465" tsb="553"/>
- <mtx name="imacron" height="2465" tsb="602"/>
- <mtx name="iogonek" height="2465" tsb="553"/>
- <mtx name="itilde" height="2465" tsb="516"/>
- <mtx name="j" height="2465" tsb="553"/>
- <mtx name="jcircumflex" height="2465" tsb="429"/>
- <mtx name="k" height="2465" tsb="454"/>
- <mtx name="kcommaaccent" height="2465" tsb="454"/>
- <mtx name="kgreenlandic" height="2465" tsb="947"/>
- <mtx name="l" height="2465" tsb="454"/>
- <mtx name="lacute" height="2465" tsb="34"/>
- <mtx name="lcaron" height="2465" tsb="454"/>
- <mtx name="lcommaaccent" height="2465" tsb="454"/>
- <mtx name="ldot" height="2465" tsb="454"/>
- <mtx name="less" height="2465" tsb="947"/>
- <mtx name="logicalnot" height="2465" tsb="1145"/>
- <mtx name="longs" height="2465" tsb="429"/>
- <mtx name="lslash" height="2465" tsb="454"/>
- <mtx name="m" height="2465" tsb="923"/>
- <mtx name="macron" height="2465" tsb="602"/>
- <mtx name="macron#1" height="2465" tsb="429"/>
- <mtx name="minus" height="2465" tsb="1367"/>
- <mtx name="mu" height="2465" tsb="947"/>
- <mtx name="multiply" height="2465" tsb="961"/>
- <mtx name="n" height="2465" tsb="923"/>
- <mtx name="nacute" height="2465" tsb="429"/>
- <mtx name="napostrophe" height="2465" tsb="454"/>
- <mtx name="nbhyphen" height="2465" tsb="1367"/>
- <mtx name="ncaron" height="2465" tsb="429"/>
- <mtx name="ncommaaccent" height="2465" tsb="923"/>
- <mtx name="nine" height="2465" tsb="515"/>
- <mtx name="nonbreakingspace" height="2465" tsb="2033"/>
- <mtx name="ntilde" height="2465" tsb="516"/>
- <mtx name="numbersign" height="2465" tsb="553"/>
- <mtx name="o" height="2465" tsb="923"/>
- <mtx name="oacute" height="2465" tsb="429"/>
- <mtx name="obreve" height="2465" tsb="429"/>
- <mtx name="ocircumflex" height="2465" tsb="429"/>
- <mtx name="odieresis" height="2465" tsb="577"/>
- <mtx name="oe" height="2465" tsb="923"/>
- <mtx name="ogonek" height="2465" tsb="2033"/>
- <mtx name="ograve" height="2465" tsb="429"/>
- <mtx name="ohungarumlaut" height="2465" tsb="429"/>
- <mtx name="omacron" height="2465" tsb="602"/>
- <mtx name="one" height="2465" tsb="516"/>
- <mtx name="onehalf" height="2465" tsb="516"/>
- <mtx name="onequarter" height="2465" tsb="516"/>
- <mtx name="onesuperior" height="2465" tsb="530"/>
- <mtx name="ordfeminine" height="2465" tsb="515"/>
- <mtx name="ordmasculine" height="2465" tsb="516"/>
- <mtx name="oslash" height="2465" tsb="923"/>
- <mtx name="otilde" height="2465" tsb="516"/>
- <mtx name="p" height="2465" tsb="923"/>
- <mtx name="paragraph" height="2465" tsb="553"/>
- <mtx name="parenleft" height="2465" tsb="454"/>
- <mtx name="parenright" height="2465" tsb="454"/>
- <mtx name="percent" height="2465" tsb="516"/>
- <mtx name="period" height="2465" tsb="1786"/>
- <mtx name="periodcentered" height="2465" tsb="1295"/>
- <mtx name="periodcentered#1" height="2465" tsb="1295"/>
- <mtx name="perthousand" height="2465" tsb="516"/>
- <mtx name="plus" height="2465" tsb="947"/>
- <mtx name="plusminus" height="2465" tsb="849"/>
- <mtx name="q" height="2465" tsb="923"/>
- <mtx name="question" height="2465" tsb="516"/>
- <mtx name="questiondown" height="2465" tsb="947"/>
- <mtx name="quotedbl" height="2465" tsb="454"/>
- <mtx name="quotedblbase" height="2465" tsb="1836"/>
- <mtx name="quotedblleft" height="2465" tsb="454"/>
- <mtx name="quotedblright" height="2465" tsb="454"/>
- <mtx name="quoteleft" height="2465" tsb="454"/>
- <mtx name="quotereversed" height="2465" tsb="2033"/>
- <mtx name="quoteright" height="2465" tsb="454"/>
- <mtx name="quotesinglbase" height="2465" tsb="1786"/>
- <mtx name="quotesingle" height="2465" tsb="454"/>
- <mtx name="r" height="2465" tsb="923"/>
- <mtx name="racute" height="2465" tsb="429"/>
- <mtx name="radicalex" height="2465" tsb="429"/>
- <mtx name="rcaron" height="2465" tsb="429"/>
- <mtx name="rcommaaccent" height="2465" tsb="923"/>
- <mtx name="registered" height="2465" tsb="553"/>
- <mtx name="ring" height="2465" tsb="296"/>
- <mtx name="s" height="2465" tsb="923"/>
- <mtx name="sacute" height="2465" tsb="429"/>
- <mtx name="scaron" height="2465" tsb="429"/>
- <mtx name="scedilla" height="2465" tsb="923"/>
- <mtx name="scircumflex" height="2465" tsb="429"/>
- <mtx name="scommaaccent" height="2465" tsb="923"/>
- <mtx name="section" height="2465" tsb="516"/>
- <mtx name="semicolon" height="2465" tsb="947"/>
- <mtx name="semicolon#1" height="2465" tsb="947"/>
- <mtx name="seven" height="2465" tsb="553"/>
- <mtx name="sfthyphen" height="2465" tsb="1367"/>
- <mtx name="six" height="2465" tsb="515"/>
- <mtx name="slash" height="2465" tsb="553"/>
- <mtx name="space" height="2465" tsb="2033"/>
- <mtx name="sterling" height="2465" tsb="516"/>
- <mtx name="t" height="2465" tsb="731"/>
- <mtx name="tbar" height="2465" tsb="731"/>
- <mtx name="tcaron" height="2465" tsb="345"/>
- <mtx name="tcommaaccent" height="2465" tsb="731"/>
- <mtx name="tcommabelow" height="2465" tsb="731"/>
- <mtx name="thorn" height="2465" tsb="454"/>
- <mtx name="three" height="2465" tsb="516"/>
- <mtx name="threequarters" height="2465" tsb="516"/>
- <mtx name="threesuperior" height="2465" tsb="530"/>
- <mtx name="tilde" height="2465" tsb="516"/>
- <mtx name="trademark" height="2465" tsb="553"/>
- <mtx name="two" height="2465" tsb="516"/>
- <mtx name="twosuperior" height="2465" tsb="530"/>
- <mtx name="u" height="2465" tsb="947"/>
- <mtx name="uacute" height="2465" tsb="429"/>
- <mtx name="ubreve" height="2465" tsb="429"/>
- <mtx name="ucircumflex" height="2465" tsb="429"/>
- <mtx name="udieresis" height="2465" tsb="577"/>
- <mtx name="ugrave" height="2465" tsb="429"/>
- <mtx name="uhungarumlaut" height="2465" tsb="429"/>
- <mtx name="umacron" height="2465" tsb="602"/>
- <mtx name="underscore" height="2465" tsb="2033"/>
- <mtx name="uogonek" height="2465" tsb="947"/>
- <mtx name="uring" height="2465" tsb="296"/>
- <mtx name="utilde" height="2465" tsb="516"/>
- <mtx name="v" height="2465" tsb="947"/>
- <mtx name="w" height="2465" tsb="947"/>
- <mtx name="wcircumflex" height="2465" tsb="429"/>
- <mtx name="x" height="2465" tsb="947"/>
- <mtx name="y" height="2465" tsb="947"/>
- <mtx name="yacute" height="2465" tsb="429"/>
- <mtx name="ycircumflex" height="2465" tsb="429"/>
- <mtx name="ydieresis" height="2465" tsb="577"/>
- <mtx name="yen" height="2465" tsb="553"/>
- <mtx name="z" height="2465" tsb="947"/>
- <mtx name="zacute" height="2465" tsb="429"/>
- <mtx name="zcaron" height="2465" tsb="429"/>
- <mtx name="zdotaccent" height="2465" tsb="553"/>
- <mtx name="zero" height="2465" tsb="516"/>
- </vmtx>
-
-</ttFont>
diff --git a/vendor/github.com/golang/freetype/testdata/make-other-hinting-txts.sh b/vendor/github.com/golang/freetype/testdata/make-other-hinting-txts.sh
deleted file mode 100755
index afee131e8..000000000
--- a/vendor/github.com/golang/freetype/testdata/make-other-hinting-txts.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-#
-# This script creates the optional x-*-hinting.txt files from fonts that are
-# not checked in for copyright or file size reasons.
-#
-# Run it from this directory (testdata).
-#
-# It has only been tested on an Ubuntu 14.04 system.
-
-set -e
-
-: ${FONTDIR:=/usr/share/fonts/truetype}
-
-ln -sf $FONTDIR/droid/DroidSansJapanese.ttf x-droid-sans-japanese.ttf
-ln -sf $FONTDIR/msttcorefonts/Arial_Bold.ttf x-arial-bold.ttf
-ln -sf $FONTDIR/msttcorefonts/Times_New_Roman.ttf x-times-new-roman.ttf
-ln -sf $FONTDIR/ttf-dejavu/DejaVuSans-Oblique.ttf x-deja-vu-sans-oblique.ttf
-
-${CC:=gcc} ../cmd/print-glyph-points/main.c $(pkg-config --cflags --libs freetype2) -o print-glyph-points
-
-# Uncomment these lines to also recreate the luxisr-*-hinting.txt files.
-# ./print-glyph-points 12 luxisr.ttf sans_hinting > luxisr-12pt-sans-hinting.txt
-# ./print-glyph-points 12 luxisr.ttf with_hinting > luxisr-12pt-with-hinting.txt
-
-./print-glyph-points 9 x-droid-sans-japanese.ttf sans_hinting > x-droid-sans-japanese-9pt-sans-hinting.txt
-./print-glyph-points 9 x-droid-sans-japanese.ttf with_hinting > x-droid-sans-japanese-9pt-with-hinting.txt
-./print-glyph-points 11 x-arial-bold.ttf sans_hinting > x-arial-bold-11pt-sans-hinting.txt
-./print-glyph-points 11 x-arial-bold.ttf with_hinting > x-arial-bold-11pt-with-hinting.txt
-./print-glyph-points 13 x-times-new-roman.ttf sans_hinting > x-times-new-roman-13pt-sans-hinting.txt
-./print-glyph-points 13 x-times-new-roman.ttf with_hinting > x-times-new-roman-13pt-with-hinting.txt
-./print-glyph-points 17 x-deja-vu-sans-oblique.ttf sans_hinting > x-deja-vu-sans-oblique-17pt-sans-hinting.txt
-./print-glyph-points 17 x-deja-vu-sans-oblique.ttf with_hinting > x-deja-vu-sans-oblique-17pt-with-hinting.txt
-
-rm print-glyph-points
diff --git a/vendor/github.com/golang/freetype/truetype/face_test.go b/vendor/github.com/golang/freetype/truetype/face_test.go
deleted file mode 100644
index 856581dff..000000000
--- a/vendor/github.com/golang/freetype/truetype/face_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-package truetype
-
-import (
- "image"
- "image/draw"
- "io/ioutil"
- "strings"
- "testing"
-
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
-)
-
-func BenchmarkDrawString(b *testing.B) {
- data, err := ioutil.ReadFile("../licenses/gpl.txt")
- if err != nil {
- b.Fatal(err)
- }
- lines := strings.Split(string(data), "\n")
- data, err = ioutil.ReadFile("../testdata/luxisr.ttf")
- if err != nil {
- b.Fatal(err)
- }
- f, err := Parse(data)
- if err != nil {
- b.Fatal(err)
- }
- dst := image.NewRGBA(image.Rect(0, 0, 800, 600))
- draw.Draw(dst, dst.Bounds(), image.White, image.ZP, draw.Src)
- d := &font.Drawer{
- Dst: dst,
- Src: image.Black,
- Face: NewFace(f, nil),
- }
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for j, line := range lines {
- d.Dot = fixed.P(0, (j*16)%600)
- d.DrawString(line)
- }
- }
-}
diff --git a/vendor/github.com/golang/freetype/truetype/hint_test.go b/vendor/github.com/golang/freetype/truetype/hint_test.go
deleted file mode 100644
index 7eb43dde0..000000000
--- a/vendor/github.com/golang/freetype/truetype/hint_test.go
+++ /dev/null
@@ -1,675 +0,0 @@
-// Copyright 2012 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-package truetype
-
-import (
- "reflect"
- "strings"
- "testing"
-
- "golang.org/x/image/math/fixed"
-)
-
-func TestBytecode(t *testing.T) {
- testCases := []struct {
- desc string
- prog []byte
- want []int32
- errStr string
- }{
- {
- "underflow",
- []byte{
- opDUP,
- },
- nil,
- "underflow",
- },
- {
- "infinite loop",
- []byte{
- opPUSHW000, // [-1]
- 0xff,
- 0xff,
- opDUP, // [-1, -1]
- opJMPR, // [-1]
- },
- nil,
- "too many steps",
- },
- {
- "unbalanced if/else",
- []byte{
- opPUSHB000, // [0]
- 0,
- opIF,
- },
- nil,
- "unbalanced",
- },
- {
- "vector set/gets",
- []byte{
- opSVTCA1, // []
- opGPV, // [0x4000, 0]
- opSVTCA0, // [0x4000, 0]
- opGFV, // [0x4000, 0, 0, 0x4000]
- opNEG, // [0x4000, 0, 0, -0x4000]
- opSPVFS, // [0x4000, 0]
- opSFVTPV, // [0x4000, 0]
- opPUSHB000, // [0x4000, 0, 1]
- 1,
- opGFV, // [0x4000, 0, 1, 0, -0x4000]
- opPUSHB000, // [0x4000, 0, 1, 0, -0x4000, 2]
- 2,
- },
- []int32{0x4000, 0, 1, 0, -0x4000, 2},
- "",
- },
- {
- "jumps",
- []byte{
- opPUSHB001, // [10, 2]
- 10,
- 2,
- opJMPR, // [10]
- opDUP, // not executed
- opDUP, // [10, 10]
- opPUSHB010, // [10, 10, 20, 2, 1]
- 20,
- 2,
- 1,
- opJROT, // [10, 10, 20]
- opDUP, // not executed
- opDUP, // [10, 10, 20, 20]
- opPUSHB010, // [10, 10, 20, 20, 30, 2, 1]
- 30,
- 2,
- 1,
- opJROF, // [10, 10, 20, 20, 30]
- opDUP, // [10, 10, 20, 20, 30, 30]
- opDUP, // [10, 10, 20, 20, 30, 30, 30]
- },
- []int32{10, 10, 20, 20, 30, 30, 30},
- "",
- },
- {
- "stack ops",
- []byte{
- opPUSHB010, // [10, 20, 30]
- 10,
- 20,
- 30,
- opCLEAR, // []
- opPUSHB010, // [40, 50, 60]
- 40,
- 50,
- 60,
- opSWAP, // [40, 60, 50]
- opDUP, // [40, 60, 50, 50]
- opDUP, // [40, 60, 50, 50, 50]
- opPOP, // [40, 60, 50, 50]
- opDEPTH, // [40, 60, 50, 50, 4]
- opCINDEX, // [40, 60, 50, 50, 40]
- opPUSHB000, // [40, 60, 50, 50, 40, 4]
- 4,
- opMINDEX, // [40, 50, 50, 40, 60]
- },
- []int32{40, 50, 50, 40, 60},
- "",
- },
- {
- "push ops",
- []byte{
- opPUSHB000, // [255]
- 255,
- opPUSHW001, // [255, -2, 253]
- 255,
- 254,
- 0,
- 253,
- opNPUSHB, // [1, -2, 253, 1, 2]
- 2,
- 1,
- 2,
- opNPUSHW, // [1, -2, 253, 1, 2, 0x0405, 0x0607, 0x0809]
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- },
- []int32{255, -2, 253, 1, 2, 0x0405, 0x0607, 0x0809},
- "",
- },
- {
- "store ops",
- []byte{
- opPUSHB011, // [1, 22, 3, 44]
- 1,
- 22,
- 3,
- 44,
- opWS, // [1, 22]
- opWS, // []
- opPUSHB000, // [3]
- 3,
- opRS, // [44]
- },
- []int32{44},
- "",
- },
- {
- "comparison ops",
- []byte{
- opPUSHB001, // [10, 20]
- 10,
- 20,
- opLT, // [1]
- opPUSHB001, // [1, 10, 20]
- 10,
- 20,
- opLTEQ, // [1, 1]
- opPUSHB001, // [1, 1, 10, 20]
- 10,
- 20,
- opGT, // [1, 1, 0]
- opPUSHB001, // [1, 1, 0, 10, 20]
- 10,
- 20,
- opGTEQ, // [1, 1, 0, 0]
- opEQ, // [1, 1, 1]
- opNEQ, // [1, 0]
- },
- []int32{1, 0},
- "",
- },
- {
- "odd/even",
- // Calculate odd(2+31/64), odd(2+32/64), even(2), even(1).
- []byte{
- opPUSHB000, // [159]
- 159,
- opODD, // [0]
- opPUSHB000, // [0, 160]
- 160,
- opODD, // [0, 1]
- opPUSHB000, // [0, 1, 128]
- 128,
- opEVEN, // [0, 1, 1]
- opPUSHB000, // [0, 1, 1, 64]
- 64,
- opEVEN, // [0, 1, 1, 0]
- },
- []int32{0, 1, 1, 0},
- "",
- },
- {
- "if true",
- []byte{
- opPUSHB001, // [255, 1]
- 255,
- 1,
- opIF,
- opPUSHB000, // [255, 2]
- 2,
- opEIF,
- opPUSHB000, // [255, 2, 254]
- 254,
- },
- []int32{255, 2, 254},
- "",
- },
- {
- "if false",
- []byte{
- opPUSHB001, // [255, 0]
- 255,
- 0,
- opIF,
- opPUSHB000, // [255]
- 2,
- opEIF,
- opPUSHB000, // [255, 254]
- 254,
- },
- []int32{255, 254},
- "",
- },
- {
- "if/else true",
- []byte{
- opPUSHB000, // [1]
- 1,
- opIF,
- opPUSHB000, // [2]
- 2,
- opELSE,
- opPUSHB000, // not executed
- 3,
- opEIF,
- },
- []int32{2},
- "",
- },
- {
- "if/else false",
- []byte{
- opPUSHB000, // [0]
- 0,
- opIF,
- opPUSHB000, // not executed
- 2,
- opELSE,
- opPUSHB000, // [3]
- 3,
- opEIF,
- },
- []int32{3},
- "",
- },
- {
- "if/else true if/else false",
- // 0x58 is the opcode for opIF. The literal 0x58s below are pushed data.
- []byte{
- opPUSHB010, // [255, 0, 1]
- 255,
- 0,
- 1,
- opIF,
- opIF,
- opPUSHB001, // not executed
- 0x58,
- 0x58,
- opELSE,
- opPUSHW000, // [255, 0x5858]
- 0x58,
- 0x58,
- opEIF,
- opELSE,
- opIF,
- opNPUSHB, // not executed
- 3,
- 0x58,
- 0x58,
- 0x58,
- opELSE,
- opNPUSHW, // not executed
- 2,
- 0x58,
- 0x58,
- 0x58,
- 0x58,
- opEIF,
- opEIF,
- opPUSHB000, // [255, 0x5858, 254]
- 254,
- },
- []int32{255, 0x5858, 254},
- "",
- },
- {
- "if/else false if/else true",
- // 0x58 is the opcode for opIF. The literal 0x58s below are pushed data.
- []byte{
- opPUSHB010, // [255, 1, 0]
- 255,
- 1,
- 0,
- opIF,
- opIF,
- opPUSHB001, // not executed
- 0x58,
- 0x58,
- opELSE,
- opPUSHW000, // not executed
- 0x58,
- 0x58,
- opEIF,
- opELSE,
- opIF,
- opNPUSHB, // [255, 0x58, 0x58, 0x58]
- 3,
- 0x58,
- 0x58,
- 0x58,
- opELSE,
- opNPUSHW, // not executed
- 2,
- 0x58,
- 0x58,
- 0x58,
- 0x58,
- opEIF,
- opEIF,
- opPUSHB000, // [255, 0x58, 0x58, 0x58, 254]
- 254,
- },
- []int32{255, 0x58, 0x58, 0x58, 254},
- "",
- },
- {
- "logical ops",
- []byte{
- opPUSHB010, // [0, 10, 20]
- 0,
- 10,
- 20,
- opAND, // [0, 1]
- opOR, // [1]
- opNOT, // [0]
- },
- []int32{0},
- "",
- },
- {
- "arithmetic ops",
- // Calculate abs((-(1 - (2*3)))/2 + 1/64).
- // The answer is 5/2 + 1/64 in ideal numbers, or 161 in 26.6 fixed point math.
- []byte{
- opPUSHB010, // [64, 128, 192]
- 1 << 6,
- 2 << 6,
- 3 << 6,
- opMUL, // [64, 384]
- opSUB, // [-320]
- opNEG, // [320]
- opPUSHB000, // [320, 128]
- 2 << 6,
- opDIV, // [160]
- opPUSHB000, // [160, 1]
- 1,
- opADD, // [161]
- opABS, // [161]
- },
- []int32{161},
- "",
- },
- {
- "floor, ceiling",
- []byte{
- opPUSHB000, // [96]
- 96,
- opFLOOR, // [64]
- opPUSHB000, // [64, 96]
- 96,
- opCEILING, // [64, 128]
- },
- []int32{64, 128},
- "",
- },
- {
- "rounding",
- // Round 1.40625 (which is 90/64) under various rounding policies.
- // See figure 20 of https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding
- []byte{
- opROFF, // []
- opPUSHB000, // [90]
- 90,
- opROUND00, // [90]
- opRTG, // [90]
- opPUSHB000, // [90, 90]
- 90,
- opROUND00, // [90, 64]
- opRTHG, // [90, 64]
- opPUSHB000, // [90, 64, 90]
- 90,
- opROUND00, // [90, 64, 96]
- opRDTG, // [90, 64, 96]
- opPUSHB000, // [90, 64, 96, 90]
- 90,
- opROUND00, // [90, 64, 96, 64]
- opRUTG, // [90, 64, 96, 64]
- opPUSHB000, // [90, 64, 96, 64, 90]
- 90,
- opROUND00, // [90, 64, 96, 64, 128]
- opRTDG, // [90, 64, 96, 64, 128]
- opPUSHB000, // [90, 64, 96, 64, 128, 90]
- 90,
- opROUND00, // [90, 64, 96, 64, 128, 96]
- },
- []int32{90, 64, 96, 64, 128, 96},
- "",
- },
- {
- "super-rounding",
- // See figure 20 of https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding
- // and the sign preservation steps of the "Order of rounding operations" section.
- []byte{
- opPUSHB000, // [0x58]
- 0x58,
- opSROUND, // []
- opPUSHW000, // [-81]
- 0xff,
- 0xaf,
- opROUND00, // [-80]
- opPUSHW000, // [-80, -80]
- 0xff,
- 0xb0,
- opROUND00, // [-80, -80]
- opPUSHW000, // [-80, -80, -17]
- 0xff,
- 0xef,
- opROUND00, // [-80, -80, -16]
- opPUSHW000, // [-80, -80, -16, -16]
- 0xff,
- 0xf0,
- opROUND00, // [-80, -80, -16, -16]
- opPUSHB000, // [-80, -80, -16, -16, 0]
- 0,
- opROUND00, // [-80, -80, -16, -16, 16]
- opPUSHB000, // [-80, -80, -16, -16, 16, 16]
- 16,
- opROUND00, // [-80, -80, -16, -16, 16, 16]
- opPUSHB000, // [-80, -80, -16, -16, 16, 16, 47]
- 47,
- opROUND00, // [-80, -80, -16, -16, 16, 16, 16]
- opPUSHB000, // [-80, -80, -16, -16, 16, 16, 16, 48]
- 48,
- opROUND00, // [-80, -80, -16, -16, 16, 16, 16, 80]
- },
- []int32{-80, -80, -16, -16, 16, 16, 16, 80},
- "",
- },
- {
- "roll",
- []byte{
- opPUSHB010, // [1, 2, 3]
- 1,
- 2,
- 3,
- opROLL, // [2, 3, 1]
- },
- []int32{2, 3, 1},
- "",
- },
- {
- "max/min",
- []byte{
- opPUSHW001, // [-2, -3]
- 0xff,
- 0xfe,
- 0xff,
- 0xfd,
- opMAX, // [-2]
- opPUSHW001, // [-2, -4, -5]
- 0xff,
- 0xfc,
- 0xff,
- 0xfb,
- opMIN, // [-2, -5]
- },
- []int32{-2, -5},
- "",
- },
- {
- "functions",
- []byte{
- opPUSHB011, // [3, 7, 0, 3]
- 3,
- 7,
- 0,
- 3,
-
- opFDEF, // Function #3 (not called)
- opPUSHB000,
- 98,
- opENDF,
-
- opFDEF, // Function #0
- opDUP,
- opADD,
- opENDF,
-
- opFDEF, // Function #7
- opPUSHB001,
- 10,
- 0,
- opCALL,
- opDUP,
- opENDF,
-
- opFDEF, // Function #3 (again)
- opPUSHB000,
- 99,
- opENDF,
-
- opPUSHB001, // [2, 0]
- 2,
- 0,
- opCALL, // [4]
- opPUSHB000, // [4, 3]
- 3,
- opLOOPCALL, // [99, 99, 99, 99]
- opPUSHB000, // [99, 99, 99, 99, 7]
- 7,
- opCALL, // [99, 99, 99, 99, 20, 20]
- },
- []int32{99, 99, 99, 99, 20, 20},
- "",
- },
- }
-
- for _, tc := range testCases {
- h := &hinter{}
- h.init(&Font{
- maxStorage: 32,
- maxStackElements: 100,
- }, 768)
- err, errStr := h.run(tc.prog, nil, nil, nil, nil), ""
- if err != nil {
- errStr = err.Error()
- }
- if tc.errStr != "" {
- if errStr == "" {
- t.Errorf("%s: got no error, want %q", tc.desc, tc.errStr)
- } else if !strings.Contains(errStr, tc.errStr) {
- t.Errorf("%s: got error %q, want one containing %q", tc.desc, errStr, tc.errStr)
- }
- continue
- }
- if errStr != "" {
- t.Errorf("%s: got error %q, want none", tc.desc, errStr)
- continue
- }
- got := h.stack[:len(tc.want)]
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("%s: got %v, want %v", tc.desc, got, tc.want)
- continue
- }
- }
-}
-
-// TestMove tests that the hinter.move method matches the output of the C
-// Freetype implementation.
-func TestMove(t *testing.T) {
- h, p := hinter{}, Point{}
- testCases := []struct {
- pvX, pvY, fvX, fvY f2dot14
- wantX, wantY fixed.Int26_6
- }{
- {+0x4000, +0x0000, +0x4000, +0x0000, +1000, +0},
- {+0x4000, +0x0000, -0x4000, +0x0000, +1000, +0},
- {-0x4000, +0x0000, +0x4000, +0x0000, -1000, +0},
- {-0x4000, +0x0000, -0x4000, +0x0000, -1000, +0},
- {+0x0000, +0x4000, +0x0000, +0x4000, +0, +1000},
- {+0x0000, +0x4000, +0x0000, -0x4000, +0, +1000},
- {+0x4000, +0x0000, +0x2d41, +0x2d41, +1000, +1000},
- {+0x4000, +0x0000, -0x2d41, +0x2d41, +1000, -1000},
- {+0x4000, +0x0000, +0x2d41, -0x2d41, +1000, -1000},
- {+0x4000, +0x0000, -0x2d41, -0x2d41, +1000, +1000},
- {-0x4000, +0x0000, +0x2d41, +0x2d41, -1000, -1000},
- {-0x4000, +0x0000, -0x2d41, +0x2d41, -1000, +1000},
- {-0x4000, +0x0000, +0x2d41, -0x2d41, -1000, +1000},
- {-0x4000, +0x0000, -0x2d41, -0x2d41, -1000, -1000},
- {+0x376d, +0x2000, +0x2d41, +0x2d41, +732, +732},
- {-0x376d, +0x2000, +0x2d41, +0x2d41, -2732, -2732},
- {+0x376d, +0x2000, +0x2d41, -0x2d41, +2732, -2732},
- {-0x376d, +0x2000, +0x2d41, -0x2d41, -732, +732},
- {-0x376d, -0x2000, +0x2d41, +0x2d41, -732, -732},
- {+0x376d, +0x2000, +0x4000, +0x0000, +1155, +0},
- {+0x376d, +0x2000, +0x0000, +0x4000, +0, +2000},
- }
- for _, tc := range testCases {
- p = Point{}
- h.gs.pv = [2]f2dot14{tc.pvX, tc.pvY}
- h.gs.fv = [2]f2dot14{tc.fvX, tc.fvY}
- h.move(&p, 1000, true)
- tx := p.Flags&flagTouchedX != 0
- ty := p.Flags&flagTouchedY != 0
- wantTX := tc.fvX != 0
- wantTY := tc.fvY != 0
- if p.X != tc.wantX || p.Y != tc.wantY || tx != wantTX || ty != wantTY {
- t.Errorf("pv=%v, fv=%v\ngot %d, %d, %t, %t\nwant %d, %d, %t, %t",
- h.gs.pv, h.gs.fv, p.X, p.Y, tx, ty, tc.wantX, tc.wantY, wantTX, wantTY)
- continue
- }
-
- // Check that p is aligned with the freedom vector.
- a := int64(p.X) * int64(tc.fvY)
- b := int64(p.Y) * int64(tc.fvX)
- if a != b {
- t.Errorf("pv=%v, fv=%v, p=%v not aligned with fv", h.gs.pv, h.gs.fv, p)
- continue
- }
-
- // Check that the projected p is 1000 away from the origin.
- dotProd := (int64(p.X)*int64(tc.pvX) + int64(p.Y)*int64(tc.pvY) + 1<<13) >> 14
- if dotProd != 1000 {
- t.Errorf("pv=%v, fv=%v, p=%v not 1000 from origin", h.gs.pv, h.gs.fv, p)
- continue
- }
- }
-}
-
-// TestNormalize tests that the normalize function matches the output of the C
-// Freetype implementation.
-func TestNormalize(t *testing.T) {
- testCases := [][2]f2dot14{
- {-15895, 3974},
- {-15543, 5181},
- {-14654, 7327},
- {-11585, 11585},
- {0, 16384},
- {11585, 11585},
- {14654, 7327},
- {15543, 5181},
- {15895, 3974},
- {16066, 3213},
- {16161, 2694},
- {16219, 2317},
- {16257, 2032},
- {16284, 1809},
- }
- for i, want := range testCases {
- got := normalize(f2dot14(i)-4, 1)
- if got != want {
- t.Errorf("i=%d: got %v, want %v", i, got, want)
- }
- }
-}
diff --git a/vendor/github.com/golang/freetype/truetype/truetype_test.go b/vendor/github.com/golang/freetype/truetype/truetype_test.go
deleted file mode 100644
index a194f3703..000000000
--- a/vendor/github.com/golang/freetype/truetype/truetype_test.go
+++ /dev/null
@@ -1,400 +0,0 @@
-// Copyright 2012 The Freetype-Go Authors. All rights reserved.
-// Use of this source code is governed by your choice of either the
-// FreeType License or the GNU General Public License version 2 (or
-// any later version), both of which can be found in the LICENSE file.
-
-package truetype
-
-import (
- "bufio"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "strconv"
- "strings"
- "testing"
-
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
-)
-
-func parseTestdataFont(name string) (f *Font, testdataIsOptional bool, err error) {
- b, err := ioutil.ReadFile(fmt.Sprintf("../testdata/%s.ttf", name))
- if err != nil {
- // The "x-foo" fonts are optional tests, as they are not checked
- // in for copyright or file size reasons.
- return nil, strings.HasPrefix(name, "x-"), fmt.Errorf("%s: ReadFile: %v", name, err)
- }
- f, err = Parse(b)
- if err != nil {
- return nil, true, fmt.Errorf("%s: Parse: %v", name, err)
- }
- return f, false, nil
-}
-
-func mkBounds(minX, minY, maxX, maxY fixed.Int26_6) fixed.Rectangle26_6 {
- return fixed.Rectangle26_6{
- Min: fixed.Point26_6{
- X: minX,
- Y: minY,
- },
- Max: fixed.Point26_6{
- X: maxX,
- Y: maxY,
- },
- }
-}
-
-// TestParse tests that the luxisr.ttf metrics and glyphs are parsed correctly.
-// The numerical values can be manually verified by examining luxisr.ttx.
-func TestParse(t *testing.T) {
- f, _, err := parseTestdataFont("luxisr")
- if err != nil {
- t.Fatal(err)
- }
- if got, want := f.FUnitsPerEm(), int32(2048); got != want {
- t.Errorf("FUnitsPerEm: got %v, want %v", got, want)
- }
- fupe := fixed.Int26_6(f.FUnitsPerEm())
- if got, want := f.Bounds(fupe), mkBounds(-441, -432, 2024, 2033); got != want {
- t.Errorf("Bounds: got %v, want %v", got, want)
- }
-
- i0 := f.Index('A')
- i1 := f.Index('V')
- if i0 != 36 || i1 != 57 {
- t.Fatalf("Index: i0, i1 = %d, %d, want 36, 57", i0, i1)
- }
- if got, want := f.HMetric(fupe, i0), (HMetric{1366, 19}); got != want {
- t.Errorf("HMetric: got %v, want %v", got, want)
- }
- if got, want := f.VMetric(fupe, i0), (VMetric{2465, 553}); got != want {
- t.Errorf("VMetric: got %v, want %v", got, want)
- }
- if got, want := f.Kern(fupe, i0, i1), fixed.Int26_6(-144); got != want {
- t.Errorf("Kern: got %v, want %v", got, want)
- }
-
- g := &GlyphBuf{}
- err = g.Load(f, fupe, i0, font.HintingNone)
- if err != nil {
- t.Fatalf("Load: %v", err)
- }
- g0 := &GlyphBuf{
- Bounds: g.Bounds,
- Points: g.Points,
- Ends: g.Ends,
- }
- g1 := &GlyphBuf{
- Bounds: mkBounds(19, 0, 1342, 1480),
- Points: []Point{
- {19, 0, 51},
- {581, 1480, 1},
- {789, 1480, 51},
- {1342, 0, 1},
- {1116, 0, 35},
- {962, 410, 3},
- {368, 410, 33},
- {214, 0, 3},
- {428, 566, 19},
- {904, 566, 33},
- {667, 1200, 3},
- },
- Ends: []int{8, 11},
- }
- if got, want := fmt.Sprint(g0), fmt.Sprint(g1); got != want {
- t.Errorf("GlyphBuf:\ngot %v\nwant %v", got, want)
- }
-}
-
-func TestIndex(t *testing.T) {
- testCases := map[string]map[rune]Index{
- "luxisr": {
- ' ': 3,
- '!': 4,
- 'A': 36,
- 'V': 57,
- 'É': 101,
- 'fl': 193,
- '\u22c5': 385,
- '中': 0,
- },
-
- // The x-etc test cases use those versions of the .ttf files provided
- // by Ubuntu 14.04. See testdata/make-other-hinting-txts.sh for details.
-
- "x-arial-bold": {
- ' ': 3,
- '+': 14,
- '0': 19,
- '_': 66,
- 'w': 90,
- '~': 97,
- 'Ä': 98,
- 'fl': 192,
- '½': 242,
- 'σ': 305,
- 'λ': 540,
- 'ỹ': 1275,
- '\u04e9': 1319,
- '中': 0,
- },
- "x-deja-vu-sans-oblique": {
- ' ': 3,
- '*': 13,
- 'Å’': 276,
- 'ω': 861,
- '‡': 2571,
- '⊕': 3110,
- 'fl': 4728,
- '\ufb03': 4729,
- '\ufffd': 4813,
- // TODO: '\U0001f640': ???,
- '中': 0,
- },
- "x-droid-sans-japanese": {
- ' ': 0,
- '\u3000': 3,
- '\u3041': 25,
- '\u30fe': 201,
- '\uff61': 202,
- '\uff67': 208,
- '\uff9e': 263,
- '\uff9f': 264,
- '\u4e00': 265,
- '\u557e': 1000,
- '\u61b6': 2024,
- '\u6ede': 3177,
- '\u7505': 3555,
- '\u81e3': 4602,
- '\u81e5': 4603,
- '\u81e7': 4604,
- '\u81e8': 4605,
- '\u81ea': 4606,
- '\u81ed': 4607,
- '\u81f3': 4608,
- '\u81f4': 4609,
- '\u91c7': 5796,
- '\u9fa0': 6620,
- '\u203e': 12584,
- },
- "x-times-new-roman": {
- ' ': 3,
- ':': 29,
- 'fl': 192,
- 'Ä¿': 273,
- 'â™ ': 388,
- 'Å–': 451,
- 'Σ': 520,
- '\u200D': 745,
- 'Ẽ': 1216,
- '\u04e9': 1319,
- '中': 0,
- },
- }
- for name, wants := range testCases {
- f, testdataIsOptional, err := parseTestdataFont(name)
- if err != nil {
- if testdataIsOptional {
- t.Log(err)
- } else {
- t.Fatal(err)
- }
- continue
- }
- for r, want := range wants {
- if got := f.Index(r); got != want {
- t.Errorf("%s: Index of %q, aka %U: got %d, want %d", name, r, r, got, want)
- }
- }
- }
-}
-
-func TestName(t *testing.T) {
- testCases := map[string]string{
- "luximr": "Luxi Mono",
- "luxirr": "Luxi Serif",
- "luxisr": "Luxi Sans",
- }
-
- for name, want := range testCases {
- f, testdataIsOptional, err := parseTestdataFont(name)
- if err != nil {
- if testdataIsOptional {
- t.Log(err)
- } else {
- t.Fatal(err)
- }
- continue
- }
- if got := f.Name(NameIDFontFamily); got != want {
- t.Errorf("%s: got %q, want %q", name, got, want)
- }
- }
-}
-
-type scalingTestData struct {
- advanceWidth fixed.Int26_6
- bounds fixed.Rectangle26_6
- points []Point
-}
-
-// scalingTestParse parses a line of points like
-// 213 -22 -111 236 555;-22 -111 1, 178 555 1, 236 555 1, 36 -111 1
-// The line will not have a trailing "\n".
-func scalingTestParse(line string) (ret scalingTestData) {
- next := func(s string) (string, fixed.Int26_6) {
- t, i := "", strings.Index(s, " ")
- if i != -1 {
- s, t = s[:i], s[i+1:]
- }
- x, _ := strconv.Atoi(s)
- return t, fixed.Int26_6(x)
- }
-
- i := strings.Index(line, ";")
- prefix, line := line[:i], line[i+1:]
-
- prefix, ret.advanceWidth = next(prefix)
- prefix, ret.bounds.Min.X = next(prefix)
- prefix, ret.bounds.Min.Y = next(prefix)
- prefix, ret.bounds.Max.X = next(prefix)
- prefix, ret.bounds.Max.Y = next(prefix)
-
- ret.points = make([]Point, 0, 1+strings.Count(line, ","))
- for len(line) > 0 {
- s := line
- if i := strings.Index(line, ","); i != -1 {
- s, line = line[:i], line[i+1:]
- for len(line) > 0 && line[0] == ' ' {
- line = line[1:]
- }
- } else {
- line = ""
- }
- s, x := next(s)
- s, y := next(s)
- s, f := next(s)
- ret.points = append(ret.points, Point{X: x, Y: y, Flags: uint32(f)})
- }
- return ret
-}
-
-// scalingTestEquals is equivalent to, but faster than, calling
-// reflect.DeepEqual(a, b), and also returns the index of the first non-equal
-// element. It also treats a nil []Point and an empty non-nil []Point as equal.
-// a and b must have equal length.
-func scalingTestEquals(a, b []Point) (index int, equals bool) {
- for i, p := range a {
- if p != b[i] {
- return i, false
- }
- }
- return 0, true
-}
-
-var scalingTestCases = []struct {
- name string
- size int
-}{
- {"luxisr", 12},
- {"x-arial-bold", 11},
- {"x-deja-vu-sans-oblique", 17},
- {"x-droid-sans-japanese", 9},
- {"x-times-new-roman", 13},
-}
-
-func testScaling(t *testing.T, h font.Hinting) {
- for _, tc := range scalingTestCases {
- f, testdataIsOptional, err := parseTestdataFont(tc.name)
- if err != nil {
- if testdataIsOptional {
- t.Log(err)
- } else {
- t.Error(err)
- }
- continue
- }
- hintingStr := "sans"
- if h != font.HintingNone {
- hintingStr = "with"
- }
- testFile, err := os.Open(fmt.Sprintf(
- "../testdata/%s-%dpt-%s-hinting.txt", tc.name, tc.size, hintingStr))
- if err != nil {
- t.Errorf("%s: Open: %v", tc.name, err)
- continue
- }
- defer testFile.Close()
-
- wants := []scalingTestData{}
- scanner := bufio.NewScanner(testFile)
- if scanner.Scan() {
- major, minor, patch := 0, 0, 0
- _, err := fmt.Sscanf(scanner.Text(), "freetype version %d.%d.%d", &major, &minor, &patch)
- if err != nil {
- t.Errorf("%s: version information: %v", tc.name, err)
- }
- if (major < 2) || (major == 2 && minor < 5) || (major == 2 && minor == 5 && patch < 1) {
- t.Errorf("%s: need freetype version >= 2.5.1.\n"+
- "Try setting LD_LIBRARY_PATH=/path/to/freetype_built_from_src/objs/.libs/\n"+
- "and re-running testdata/make-other-hinting-txts.sh",
- tc.name)
- continue
- }
- } else {
- t.Errorf("%s: no version information", tc.name)
- continue
- }
- for scanner.Scan() {
- wants = append(wants, scalingTestParse(scanner.Text()))
- }
- if err := scanner.Err(); err != nil && err != io.EOF {
- t.Errorf("%s: Scanner: %v", tc.name, err)
- continue
- }
-
- glyphBuf := &GlyphBuf{}
- for i, want := range wants {
- if err = glyphBuf.Load(f, fixed.I(tc.size), Index(i), h); err != nil {
- t.Errorf("%s: glyph #%d: Load: %v", tc.name, i, err)
- continue
- }
- got := scalingTestData{
- advanceWidth: glyphBuf.AdvanceWidth,
- bounds: glyphBuf.Bounds,
- points: glyphBuf.Points,
- }
-
- if got.advanceWidth != want.advanceWidth {
- t.Errorf("%s: glyph #%d advance width:\ngot %v\nwant %v",
- tc.name, i, got.advanceWidth, want.advanceWidth)
- continue
- }
-
- if got.bounds != want.bounds {
- t.Errorf("%s: glyph #%d bounds:\ngot %v\nwant %v",
- tc.name, i, got.bounds, want.bounds)
- continue
- }
-
- for i := range got.points {
- got.points[i].Flags &= 0x01
- }
- if len(got.points) != len(want.points) {
- t.Errorf("%s: glyph #%d:\ngot %v\nwant %v\ndifferent slice lengths: %d versus %d",
- tc.name, i, got.points, want.points, len(got.points), len(want.points))
- continue
- }
- if j, equals := scalingTestEquals(got.points, want.points); !equals {
- t.Errorf("%s: glyph #%d:\ngot %v\nwant %v\nat index %d: %v versus %v",
- tc.name, i, got.points, want.points, j, got.points[j], want.points[j])
- continue
- }
- }
- }
-}
-
-func TestScalingHintingNone(t *testing.T) { testScaling(t, font.HintingNone) }
-func TestScalingHintingFull(t *testing.T) { testScaling(t, font.HintingFull) }
diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore
deleted file mode 100644
index 8f5b596b1..000000000
--- a/vendor/github.com/golang/protobuf/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-.DS_Store
-*.[568ao]
-*.ao
-*.so
-*.pyc
-._*
-.nfs.*
-[568a].out
-*~
-*.orig
-core
-_obj
-_test
-_testmain.go
-protoc-gen-go/testdata/multi/*.pb.go
-_conformance/_conformance
diff --git a/vendor/github.com/golang/protobuf/.travis.yml b/vendor/github.com/golang/protobuf/.travis.yml
deleted file mode 100644
index 93c67805b..000000000
--- a/vendor/github.com/golang/protobuf/.travis.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-sudo: false
-language: go
-go:
-- 1.6.x
-- 1.7.x
-- 1.8.x
-- 1.9.x
-
-install:
- - go get -v -d -t github.com/golang/protobuf/...
- - curl -L https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip -o /tmp/protoc.zip
- - unzip /tmp/protoc.zip -d $HOME/protoc
-
-env:
- - PATH=$HOME/protoc/bin:$PATH
-
-script:
- - make all test
diff --git a/vendor/github.com/golang/protobuf/Make.protobuf b/vendor/github.com/golang/protobuf/Make.protobuf
deleted file mode 100644
index 15071de10..000000000
--- a/vendor/github.com/golang/protobuf/Make.protobuf
+++ /dev/null
@@ -1,40 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-# Includable Makefile to add a rule for generating .pb.go files from .proto files
-# (Google protocol buffer descriptions).
-# Typical use if myproto.proto is a file in package mypackage in this directory:
-#
-# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf
-
-%.pb.go: %.proto
- protoc --go_out=. $<
-
diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile
deleted file mode 100644
index a1421d8b7..000000000
--- a/vendor/github.com/golang/protobuf/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-
-all: install
-
-install:
- go install ./proto ./jsonpb ./ptypes
- go install ./protoc-gen-go
-
-test:
- go test ./proto ./jsonpb ./ptypes
- make -C protoc-gen-go/testdata test
-
-clean:
- go clean ./...
-
-nuke:
- go clean -i ./...
-
-regenerate:
- make -C protoc-gen-go/descriptor regenerate
- make -C protoc-gen-go/plugin regenerate
- make -C protoc-gen-go/testdata regenerate
- make -C proto/testdata regenerate
- make -C jsonpb/jsonpb_test_proto regenerate
- make -C _conformance regenerate
diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md
deleted file mode 100644
index 9c4c815c0..000000000
--- a/vendor/github.com/golang/protobuf/README.md
+++ /dev/null
@@ -1,244 +0,0 @@
-# Go support for Protocol Buffers
-
-[![Build Status](https://travis-ci.org/golang/protobuf.svg?branch=master)](https://travis-ci.org/golang/protobuf)
-[![GoDoc](https://godoc.org/github.com/golang/protobuf?status.svg)](https://godoc.org/github.com/golang/protobuf)
-
-Google's data interchange format.
-Copyright 2010 The Go Authors.
-https://github.com/golang/protobuf
-
-This package and the code it generates requires at least Go 1.4.
-
-This software implements Go bindings for protocol buffers. For
-information about protocol buffers themselves, see
- https://developers.google.com/protocol-buffers/
-
-## Installation ##
-
-To use this software, you must:
-- Install the standard C++ implementation of protocol buffers from
- https://developers.google.com/protocol-buffers/
-- Of course, install the Go compiler and tools from
- https://golang.org/
- See
- https://golang.org/doc/install
- for details or, if you are using gccgo, follow the instructions at
- https://golang.org/doc/install/gccgo
-- Grab the code from the repository and install the proto package.
- The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
- The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
- defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
- compiler, protoc, to find it.
-
-This software has two parts: a 'protocol compiler plugin' that
-generates Go source files that, once compiled, can access and manage
-protocol buffers; and a library that implements run-time support for
-encoding (marshaling), decoding (unmarshaling), and accessing protocol
-buffers.
-
-There is support for gRPC in Go using protocol buffers.
-See the note at the bottom of this file for details.
-
-There are no insertion points in the plugin.
-
-
-## Using protocol buffers with Go ##
-
-Once the software is installed, there are two steps to using it.
-First you must compile the protocol buffer definitions and then import
-them, with the support library, into your program.
-
-To compile the protocol buffer definition, run protoc with the --go_out
-parameter set to the directory you want to output the Go code to.
-
- protoc --go_out=. *.proto
-
-The generated files will be suffixed .pb.go. See the Test code below
-for an example using such a file.
-
-
-The package comment for the proto library contains text describing
-the interface provided in Go for protocol buffers. Here is an edited
-version.
-
-==========
-
-The proto package converts data structures to and from the
-wire format of protocol buffers. It works in concert with the
-Go source code generated for .proto files by the protocol compiler.
-
-A summary of the properties of the protocol buffer interface
-for a protocol buffer variable v:
-
- - Names are turned from camel_case to CamelCase for export.
- - There are no methods on v to set fields; just treat
- them as structure fields.
- - There are getters that return a field's value if set,
- and return the field's default value if unset.
- The getters work even if the receiver is a nil message.
- - The zero value for a struct is its correct initialization state.
- All desired fields must be set before marshaling.
- - A Reset() method will restore a protobuf struct to its zero state.
- - Non-repeated fields are pointers to the values; nil means unset.
- That is, optional or required field int32 f becomes F *int32.
- - Repeated fields are slices.
- - Helper functions are available to aid the setting of fields.
- Helpers for getting values are superseded by the
- GetFoo methods and their use is deprecated.
- msg.Foo = proto.String("hello") // set field
- - Constants are defined to hold the default values of all fields that
- have them. They have the form Default_StructName_FieldName.
- Because the getter methods handle defaulted values,
- direct use of these constants should be rare.
- - Enums are given type names and maps from names to values.
- Enum values are prefixed with the enum's type name. Enum types have
- a String method, and a Enum method to assist in message construction.
- - Nested groups and enums have type names prefixed with the name of
- the surrounding message type.
- - Extensions are given descriptor names that start with E_,
- followed by an underscore-delimited list of the nested messages
- that contain it (if any) followed by the CamelCased name of the
- extension field itself. HasExtension, ClearExtension, GetExtension
- and SetExtension are functions for manipulating extensions.
- - Oneof field sets are given a single field in their message,
- with distinguished wrapper types for each possible field value.
- - Marshal and Unmarshal are functions to encode and decode the wire format.
-
-When the .proto file specifies `syntax="proto3"`, there are some differences:
-
- - Non-repeated fields of non-message type are values instead of pointers.
- - Enum types do not get an Enum method.
-
-Consider file test.proto, containing
-
-```proto
- syntax = "proto2";
- package example;
-
- enum FOO { X = 17; };
-
- message Test {
- required string label = 1;
- optional int32 type = 2 [default=77];
- repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
- }
-```
-
-To create and play with a Test object from the example package,
-
-```go
- package main
-
- import (
- "log"
-
- "github.com/golang/protobuf/proto"
- "path/to/example"
- )
-
- func main() {
- test := &example.Test {
- Label: proto.String("hello"),
- Type: proto.Int32(17),
- Reps: []int64{1, 2, 3},
- Optionalgroup: &example.Test_OptionalGroup {
- RequiredField: proto.String("good bye"),
- },
- }
- data, err := proto.Marshal(test)
- if err != nil {
- log.Fatal("marshaling error: ", err)
- }
- newTest := &example.Test{}
- err = proto.Unmarshal(data, newTest)
- if err != nil {
- log.Fatal("unmarshaling error: ", err)
- }
- // Now test and newTest contain the same data.
- if test.GetLabel() != newTest.GetLabel() {
- log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
- }
- // etc.
- }
-```
-
-## Parameters ##
-
-To pass extra parameters to the plugin, use a comma-separated
-parameter list separated from the output directory by a colon:
-
-
- protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto
-
-
-- `import_prefix=xxx` - a prefix that is added onto the beginning of
- all imports. Useful for things like generating protos in a
- subdirectory, or regenerating vendored protobufs in-place.
-- `import_path=foo/bar` - used as the package if no input files
- declare `go_package`. If it contains slashes, everything up to the
- rightmost slash is ignored.
-- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to
- load. The only plugin in this repo is `grpc`.
-- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is
- associated with Go package quux/shme. This is subject to the
- import_prefix parameter.
-
-## gRPC Support ##
-
-If a proto file specifies RPC services, protoc-gen-go can be instructed to
-generate code compatible with gRPC (http://www.grpc.io/). To do this, pass
-the `plugins` parameter to protoc-gen-go; the usual way is to insert it into
-the --go_out argument to protoc:
-
- protoc --go_out=plugins=grpc:. *.proto
-
-## Compatibility ##
-
-The library and the generated code are expected to be stable over time.
-However, we reserve the right to make breaking changes without notice for the
-following reasons:
-
-- Security. A security issue in the specification or implementation may come to
- light whose resolution requires breaking compatibility. We reserve the right
- to address such security issues.
-- Unspecified behavior. There are some aspects of the Protocol Buffers
- specification that are undefined. Programs that depend on such unspecified
- behavior may break in future releases.
-- Specification errors or changes. If it becomes necessary to address an
- inconsistency, incompleteness, or change in the Protocol Buffers
- specification, resolving the issue could affect the meaning or legality of
- existing programs. We reserve the right to address such issues, including
- updating the implementations.
-- Bugs. If the library has a bug that violates the specification, a program
- that depends on the buggy behavior may break if the bug is fixed. We reserve
- the right to fix such bugs.
-- Adding methods or fields to generated structs. These may conflict with field
- names that already exist in a schema, causing applications to break. When the
- code generator encounters a field in the schema that would collide with a
- generated field or method name, the code generator will append an underscore
- to the generated field or method name.
-- Adding, removing, or changing methods or fields in generated structs that
- start with `XXX`. These parts of the generated code are exported out of
- necessity, but should not be considered part of the public API.
-- Adding, removing, or changing unexported symbols in generated code.
-
-Any breaking changes outside of these will be announced 6 months in advance to
-protobuf@googlegroups.com.
-
-You should, whenever possible, use generated code created by the `protoc-gen-go`
-tool built at the same commit as the `proto` package. The `proto` package
-declares package-level constants in the form `ProtoPackageIsVersionX`.
-Application code and generated code may depend on one of these constants to
-ensure that compilation will fail if the available version of the proto library
-is too old. Whenever we make a change to the generated code that requires newer
-library support, in the same commit we will increment the version number of the
-generated code and declare a new package-level constant whose name incorporates
-the latest version number. Removing a compatibility constant is considered a
-breaking change and would be subject to the announcement policy stated above.
-
-The `protoc-gen-go/generator` package exposes a plugin interface,
-which is used by the gRPC code generation. This interface is not
-supported and is subject to incompatible changes without notice.
diff --git a/vendor/github.com/golang/protobuf/_conformance/Makefile b/vendor/github.com/golang/protobuf/_conformance/Makefile
deleted file mode 100644
index 89800e2d9..000000000
--- a/vendor/github.com/golang/protobuf/_conformance/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2016 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-regenerate:
- protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers,Mgoogle/protobuf/field_mask.proto=google.golang.org/genproto/protobuf:. conformance_proto/conformance.proto
diff --git a/vendor/github.com/golang/protobuf/_conformance/conformance.go b/vendor/github.com/golang/protobuf/_conformance/conformance.go
deleted file mode 100644
index c54212c80..000000000
--- a/vendor/github.com/golang/protobuf/_conformance/conformance.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// conformance implements the conformance test subprocess protocol as
-// documented in conformance.proto.
-package main
-
-import (
- "encoding/binary"
- "fmt"
- "io"
- "os"
-
- pb "github.com/golang/protobuf/_conformance/conformance_proto"
- "github.com/golang/protobuf/jsonpb"
- "github.com/golang/protobuf/proto"
-)
-
-func main() {
- var sizeBuf [4]byte
- inbuf := make([]byte, 0, 4096)
- outbuf := proto.NewBuffer(nil)
- for {
- if _, err := io.ReadFull(os.Stdin, sizeBuf[:]); err == io.EOF {
- break
- } else if err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: read request:", err)
- os.Exit(1)
- }
- size := binary.LittleEndian.Uint32(sizeBuf[:])
- if int(size) > cap(inbuf) {
- inbuf = make([]byte, size)
- }
- inbuf = inbuf[:size]
- if _, err := io.ReadFull(os.Stdin, inbuf); err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: read request:", err)
- os.Exit(1)
- }
-
- req := new(pb.ConformanceRequest)
- if err := proto.Unmarshal(inbuf, req); err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: parse request:", err)
- os.Exit(1)
- }
- res := handle(req)
-
- if err := outbuf.Marshal(res); err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: marshal response:", err)
- os.Exit(1)
- }
- binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(outbuf.Bytes())))
- if _, err := os.Stdout.Write(sizeBuf[:]); err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: write response:", err)
- os.Exit(1)
- }
- if _, err := os.Stdout.Write(outbuf.Bytes()); err != nil {
- fmt.Fprintln(os.Stderr, "go conformance: write response:", err)
- os.Exit(1)
- }
- outbuf.Reset()
- }
-}
-
-var jsonMarshaler = jsonpb.Marshaler{
- OrigName: true,
-}
-
-func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse {
- var err error
- var msg pb.TestAllTypes
- switch p := req.Payload.(type) {
- case *pb.ConformanceRequest_ProtobufPayload:
- err = proto.Unmarshal(p.ProtobufPayload, &msg)
- case *pb.ConformanceRequest_JsonPayload:
- err = jsonpb.UnmarshalString(p.JsonPayload, &msg)
- if err != nil && err.Error() == "unmarshaling Any not supported yet" {
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_Skipped{
- Skipped: err.Error(),
- },
- }
- }
- default:
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_RuntimeError{
- RuntimeError: "unknown request payload type",
- },
- }
- }
- if err != nil {
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_ParseError{
- ParseError: err.Error(),
- },
- }
- }
- switch req.RequestedOutputFormat {
- case pb.WireFormat_PROTOBUF:
- p, err := proto.Marshal(&msg)
- if err != nil {
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_SerializeError{
- SerializeError: err.Error(),
- },
- }
- }
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_ProtobufPayload{
- ProtobufPayload: p,
- },
- }
- case pb.WireFormat_JSON:
- p, err := jsonMarshaler.MarshalToString(&msg)
- if err != nil {
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_SerializeError{
- SerializeError: err.Error(),
- },
- }
- }
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_JsonPayload{
- JsonPayload: p,
- },
- }
- default:
- return &pb.ConformanceResponse{
- Result: &pb.ConformanceResponse_RuntimeError{
- RuntimeError: "unknown output format",
- },
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go b/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go
deleted file mode 100644
index ec354eada..000000000
--- a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go
+++ /dev/null
@@ -1,1885 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: conformance_proto/conformance.proto
-
-/*
-Package conformance is a generated protocol buffer package.
-
-It is generated from these files:
- conformance_proto/conformance.proto
-
-It has these top-level messages:
- ConformanceRequest
- ConformanceResponse
- TestAllTypes
- ForeignMessage
-*/
-package conformance
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/ptypes/any"
-import google_protobuf1 "github.com/golang/protobuf/ptypes/duration"
-import google_protobuf2 "google.golang.org/genproto/protobuf"
-import google_protobuf3 "github.com/golang/protobuf/ptypes/struct"
-import google_protobuf4 "github.com/golang/protobuf/ptypes/timestamp"
-import google_protobuf5 "github.com/golang/protobuf/ptypes/wrappers"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type WireFormat int32
-
-const (
- WireFormat_UNSPECIFIED WireFormat = 0
- WireFormat_PROTOBUF WireFormat = 1
- WireFormat_JSON WireFormat = 2
-)
-
-var WireFormat_name = map[int32]string{
- 0: "UNSPECIFIED",
- 1: "PROTOBUF",
- 2: "JSON",
-}
-var WireFormat_value = map[string]int32{
- "UNSPECIFIED": 0,
- "PROTOBUF": 1,
- "JSON": 2,
-}
-
-func (x WireFormat) String() string {
- return proto.EnumName(WireFormat_name, int32(x))
-}
-func (WireFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-type ForeignEnum int32
-
-const (
- ForeignEnum_FOREIGN_FOO ForeignEnum = 0
- ForeignEnum_FOREIGN_BAR ForeignEnum = 1
- ForeignEnum_FOREIGN_BAZ ForeignEnum = 2
-)
-
-var ForeignEnum_name = map[int32]string{
- 0: "FOREIGN_FOO",
- 1: "FOREIGN_BAR",
- 2: "FOREIGN_BAZ",
-}
-var ForeignEnum_value = map[string]int32{
- "FOREIGN_FOO": 0,
- "FOREIGN_BAR": 1,
- "FOREIGN_BAZ": 2,
-}
-
-func (x ForeignEnum) String() string {
- return proto.EnumName(ForeignEnum_name, int32(x))
-}
-func (ForeignEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-type TestAllTypes_NestedEnum int32
-
-const (
- TestAllTypes_FOO TestAllTypes_NestedEnum = 0
- TestAllTypes_BAR TestAllTypes_NestedEnum = 1
- TestAllTypes_BAZ TestAllTypes_NestedEnum = 2
- TestAllTypes_NEG TestAllTypes_NestedEnum = -1
-)
-
-var TestAllTypes_NestedEnum_name = map[int32]string{
- 0: "FOO",
- 1: "BAR",
- 2: "BAZ",
- -1: "NEG",
-}
-var TestAllTypes_NestedEnum_value = map[string]int32{
- "FOO": 0,
- "BAR": 1,
- "BAZ": 2,
- "NEG": -1,
-}
-
-func (x TestAllTypes_NestedEnum) String() string {
- return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x))
-}
-func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-// Represents a single test case's input. The testee should:
-//
-// 1. parse this proto (which should always succeed)
-// 2. parse the protobuf or JSON payload in "payload" (which may fail)
-// 3. if the parse succeeded, serialize the message in the requested format.
-type ConformanceRequest struct {
- // The payload (whether protobuf of JSON) is always for a TestAllTypes proto
- // (see below).
- //
- // Types that are valid to be assigned to Payload:
- // *ConformanceRequest_ProtobufPayload
- // *ConformanceRequest_JsonPayload
- Payload isConformanceRequest_Payload `protobuf_oneof:"payload"`
- // Which format should the testee serialize its message to?
- RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,enum=conformance.WireFormat" json:"requested_output_format,omitempty"`
-}
-
-func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} }
-func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) }
-func (*ConformanceRequest) ProtoMessage() {}
-func (*ConformanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-type isConformanceRequest_Payload interface {
- isConformanceRequest_Payload()
-}
-
-type ConformanceRequest_ProtobufPayload struct {
- ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
-}
-type ConformanceRequest_JsonPayload struct {
- JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,oneof"`
-}
-
-func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {}
-func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {}
-
-func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload {
- if m != nil {
- return m.Payload
- }
- return nil
-}
-
-func (m *ConformanceRequest) GetProtobufPayload() []byte {
- if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok {
- return x.ProtobufPayload
- }
- return nil
-}
-
-func (m *ConformanceRequest) GetJsonPayload() string {
- if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok {
- return x.JsonPayload
- }
- return ""
-}
-
-func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat {
- if m != nil {
- return m.RequestedOutputFormat
- }
- return WireFormat_UNSPECIFIED
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{
- (*ConformanceRequest_ProtobufPayload)(nil),
- (*ConformanceRequest_JsonPayload)(nil),
- }
-}
-
-func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*ConformanceRequest)
- // payload
- switch x := m.Payload.(type) {
- case *ConformanceRequest_ProtobufPayload:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.ProtobufPayload)
- case *ConformanceRequest_JsonPayload:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.JsonPayload)
- case nil:
- default:
- return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x)
- }
- return nil
-}
-
-func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*ConformanceRequest)
- switch tag {
- case 1: // payload.protobuf_payload
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Payload = &ConformanceRequest_ProtobufPayload{x}
- return true, err
- case 2: // payload.json_payload
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Payload = &ConformanceRequest_JsonPayload{x}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*ConformanceRequest)
- // payload
- switch x := m.Payload.(type) {
- case *ConformanceRequest_ProtobufPayload:
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
- n += len(x.ProtobufPayload)
- case *ConformanceRequest_JsonPayload:
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.JsonPayload)))
- n += len(x.JsonPayload)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Represents a single test case's output.
-type ConformanceResponse struct {
- // Types that are valid to be assigned to Result:
- // *ConformanceResponse_ParseError
- // *ConformanceResponse_SerializeError
- // *ConformanceResponse_RuntimeError
- // *ConformanceResponse_ProtobufPayload
- // *ConformanceResponse_JsonPayload
- // *ConformanceResponse_Skipped
- Result isConformanceResponse_Result `protobuf_oneof:"result"`
-}
-
-func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} }
-func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) }
-func (*ConformanceResponse) ProtoMessage() {}
-func (*ConformanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-type isConformanceResponse_Result interface {
- isConformanceResponse_Result()
-}
-
-type ConformanceResponse_ParseError struct {
- ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,oneof"`
-}
-type ConformanceResponse_SerializeError struct {
- SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,oneof"`
-}
-type ConformanceResponse_RuntimeError struct {
- RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,oneof"`
-}
-type ConformanceResponse_ProtobufPayload struct {
- ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
-}
-type ConformanceResponse_JsonPayload struct {
- JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,oneof"`
-}
-type ConformanceResponse_Skipped struct {
- Skipped string `protobuf:"bytes,5,opt,name=skipped,oneof"`
-}
-
-func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {}
-func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {}
-func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {}
-func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {}
-func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {}
-func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {}
-
-func (m *ConformanceResponse) GetResult() isConformanceResponse_Result {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (m *ConformanceResponse) GetParseError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok {
- return x.ParseError
- }
- return ""
-}
-
-func (m *ConformanceResponse) GetSerializeError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok {
- return x.SerializeError
- }
- return ""
-}
-
-func (m *ConformanceResponse) GetRuntimeError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok {
- return x.RuntimeError
- }
- return ""
-}
-
-func (m *ConformanceResponse) GetProtobufPayload() []byte {
- if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok {
- return x.ProtobufPayload
- }
- return nil
-}
-
-func (m *ConformanceResponse) GetJsonPayload() string {
- if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok {
- return x.JsonPayload
- }
- return ""
-}
-
-func (m *ConformanceResponse) GetSkipped() string {
- if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok {
- return x.Skipped
- }
- return ""
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{
- (*ConformanceResponse_ParseError)(nil),
- (*ConformanceResponse_SerializeError)(nil),
- (*ConformanceResponse_RuntimeError)(nil),
- (*ConformanceResponse_ProtobufPayload)(nil),
- (*ConformanceResponse_JsonPayload)(nil),
- (*ConformanceResponse_Skipped)(nil),
- }
-}
-
-func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*ConformanceResponse)
- // result
- switch x := m.Result.(type) {
- case *ConformanceResponse_ParseError:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.ParseError)
- case *ConformanceResponse_SerializeError:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.SerializeError)
- case *ConformanceResponse_RuntimeError:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.RuntimeError)
- case *ConformanceResponse_ProtobufPayload:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.ProtobufPayload)
- case *ConformanceResponse_JsonPayload:
- b.EncodeVarint(4<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.JsonPayload)
- case *ConformanceResponse_Skipped:
- b.EncodeVarint(5<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Skipped)
- case nil:
- default:
- return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x)
- }
- return nil
-}
-
-func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*ConformanceResponse)
- switch tag {
- case 1: // result.parse_error
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Result = &ConformanceResponse_ParseError{x}
- return true, err
- case 6: // result.serialize_error
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Result = &ConformanceResponse_SerializeError{x}
- return true, err
- case 2: // result.runtime_error
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Result = &ConformanceResponse_RuntimeError{x}
- return true, err
- case 3: // result.protobuf_payload
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Result = &ConformanceResponse_ProtobufPayload{x}
- return true, err
- case 4: // result.json_payload
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Result = &ConformanceResponse_JsonPayload{x}
- return true, err
- case 5: // result.skipped
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Result = &ConformanceResponse_Skipped{x}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*ConformanceResponse)
- // result
- switch x := m.Result.(type) {
- case *ConformanceResponse_ParseError:
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.ParseError)))
- n += len(x.ParseError)
- case *ConformanceResponse_SerializeError:
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.SerializeError)))
- n += len(x.SerializeError)
- case *ConformanceResponse_RuntimeError:
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.RuntimeError)))
- n += len(x.RuntimeError)
- case *ConformanceResponse_ProtobufPayload:
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
- n += len(x.ProtobufPayload)
- case *ConformanceResponse_JsonPayload:
- n += proto.SizeVarint(4<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.JsonPayload)))
- n += len(x.JsonPayload)
- case *ConformanceResponse_Skipped:
- n += proto.SizeVarint(5<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Skipped)))
- n += len(x.Skipped)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// This proto includes every type of field in both singular and repeated
-// forms.
-type TestAllTypes struct {
- // Singular
- OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32" json:"optional_int32,omitempty"`
- OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64" json:"optional_int64,omitempty"`
- OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32" json:"optional_uint32,omitempty"`
- OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64" json:"optional_uint64,omitempty"`
- OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32" json:"optional_sint32,omitempty"`
- OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64" json:"optional_sint64,omitempty"`
- OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32" json:"optional_fixed32,omitempty"`
- OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64" json:"optional_fixed64,omitempty"`
- OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32" json:"optional_sfixed32,omitempty"`
- OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64" json:"optional_sfixed64,omitempty"`
- OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat" json:"optional_float,omitempty"`
- OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble" json:"optional_double,omitempty"`
- OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool" json:"optional_bool,omitempty"`
- OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString" json:"optional_string,omitempty"`
- OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"`
- OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage" json:"optional_nested_message,omitempty"`
- OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage" json:"optional_foreign_message,omitempty"`
- OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"`
- OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"`
- OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece" json:"optional_string_piece,omitempty"`
- OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord" json:"optional_cord,omitempty"`
- RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"`
- // Repeated
- RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"`
- RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"`
- RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"`
- RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"`
- RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"`
- RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"`
- RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"`
- RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"`
- RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"`
- RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"`
- RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"`
- RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"`
- RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"`
- RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"`
- RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"`
- RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"`
- RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"`
- RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"`
- RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"`
- RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece" json:"repeated_string_piece,omitempty"`
- RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord" json:"repeated_cord,omitempty"`
- // Map
- MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"`
- MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"`
- MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
- MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
- MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
- MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
- MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
- MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
- MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=conformance.TestAllTypes_NestedEnum"`
- MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=conformance.ForeignEnum"`
- // Types that are valid to be assigned to OneofField:
- // *TestAllTypes_OneofUint32
- // *TestAllTypes_OneofNestedMessage
- // *TestAllTypes_OneofString
- // *TestAllTypes_OneofBytes
- // *TestAllTypes_OneofBool
- // *TestAllTypes_OneofUint64
- // *TestAllTypes_OneofFloat
- // *TestAllTypes_OneofDouble
- // *TestAllTypes_OneofEnum
- OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
- // Well-known types
- OptionalBoolWrapper *google_protobuf5.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper" json:"optional_bool_wrapper,omitempty"`
- OptionalInt32Wrapper *google_protobuf5.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper" json:"optional_int32_wrapper,omitempty"`
- OptionalInt64Wrapper *google_protobuf5.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper" json:"optional_int64_wrapper,omitempty"`
- OptionalUint32Wrapper *google_protobuf5.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper" json:"optional_uint32_wrapper,omitempty"`
- OptionalUint64Wrapper *google_protobuf5.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper" json:"optional_uint64_wrapper,omitempty"`
- OptionalFloatWrapper *google_protobuf5.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper" json:"optional_float_wrapper,omitempty"`
- OptionalDoubleWrapper *google_protobuf5.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper" json:"optional_double_wrapper,omitempty"`
- OptionalStringWrapper *google_protobuf5.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper" json:"optional_string_wrapper,omitempty"`
- OptionalBytesWrapper *google_protobuf5.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper" json:"optional_bytes_wrapper,omitempty"`
- RepeatedBoolWrapper []*google_protobuf5.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper" json:"repeated_bool_wrapper,omitempty"`
- RepeatedInt32Wrapper []*google_protobuf5.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper" json:"repeated_int32_wrapper,omitempty"`
- RepeatedInt64Wrapper []*google_protobuf5.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper" json:"repeated_int64_wrapper,omitempty"`
- RepeatedUint32Wrapper []*google_protobuf5.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper" json:"repeated_uint32_wrapper,omitempty"`
- RepeatedUint64Wrapper []*google_protobuf5.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper" json:"repeated_uint64_wrapper,omitempty"`
- RepeatedFloatWrapper []*google_protobuf5.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper" json:"repeated_float_wrapper,omitempty"`
- RepeatedDoubleWrapper []*google_protobuf5.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper" json:"repeated_double_wrapper,omitempty"`
- RepeatedStringWrapper []*google_protobuf5.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper" json:"repeated_string_wrapper,omitempty"`
- RepeatedBytesWrapper []*google_protobuf5.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper" json:"repeated_bytes_wrapper,omitempty"`
- OptionalDuration *google_protobuf1.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration" json:"optional_duration,omitempty"`
- OptionalTimestamp *google_protobuf4.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp" json:"optional_timestamp,omitempty"`
- OptionalFieldMask *google_protobuf2.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask" json:"optional_field_mask,omitempty"`
- OptionalStruct *google_protobuf3.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct" json:"optional_struct,omitempty"`
- OptionalAny *google_protobuf.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny" json:"optional_any,omitempty"`
- OptionalValue *google_protobuf3.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue" json:"optional_value,omitempty"`
- RepeatedDuration []*google_protobuf1.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration" json:"repeated_duration,omitempty"`
- RepeatedTimestamp []*google_protobuf4.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp" json:"repeated_timestamp,omitempty"`
- RepeatedFieldmask []*google_protobuf2.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask" json:"repeated_fieldmask,omitempty"`
- RepeatedStruct []*google_protobuf3.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct" json:"repeated_struct,omitempty"`
- RepeatedAny []*google_protobuf.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny" json:"repeated_any,omitempty"`
- RepeatedValue []*google_protobuf3.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue" json:"repeated_value,omitempty"`
- // Test field-name-to-JSON-name convention.
- // (protobuf says names can be any valid C/C++ identifier.)
- Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"`
- FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"`
- XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"`
- Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"`
- Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"`
- Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"`
- FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"`
- FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"`
- Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"`
- Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"`
- FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"`
- FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"`
- XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"`
- X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"`
- Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"`
- Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"`
- FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"`
- FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"`
-}
-
-func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
-func (m *TestAllTypes) String() string { return proto.CompactTextString(m) }
-func (*TestAllTypes) ProtoMessage() {}
-func (*TestAllTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-type isTestAllTypes_OneofField interface {
- isTestAllTypes_OneofField()
-}
-
-type TestAllTypes_OneofUint32 struct {
- OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,oneof"`
-}
-type TestAllTypes_OneofNestedMessage struct {
- OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"`
-}
-type TestAllTypes_OneofString struct {
- OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,oneof"`
-}
-type TestAllTypes_OneofBytes struct {
- OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"`
-}
-type TestAllTypes_OneofBool struct {
- OneofBool bool `protobuf:"varint,115,opt,name=oneof_bool,json=oneofBool,oneof"`
-}
-type TestAllTypes_OneofUint64 struct {
- OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,oneof"`
-}
-type TestAllTypes_OneofFloat struct {
- OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,oneof"`
-}
-type TestAllTypes_OneofDouble struct {
- OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,oneof"`
-}
-type TestAllTypes_OneofEnum struct {
- OneofEnum TestAllTypes_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,enum=conformance.TestAllTypes_NestedEnum,oneof"`
-}
-
-func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofBool) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofUint64) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofFloat) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofDouble) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofEnum) isTestAllTypes_OneofField() {}
-
-func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField {
- if m != nil {
- return m.OneofField
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalInt32() int32 {
- if m != nil {
- return m.OptionalInt32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalInt64() int64 {
- if m != nil {
- return m.OptionalInt64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalUint32() uint32 {
- if m != nil {
- return m.OptionalUint32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalUint64() uint64 {
- if m != nil {
- return m.OptionalUint64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalSint32() int32 {
- if m != nil {
- return m.OptionalSint32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalSint64() int64 {
- if m != nil {
- return m.OptionalSint64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalFixed32() uint32 {
- if m != nil {
- return m.OptionalFixed32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalFixed64() uint64 {
- if m != nil {
- return m.OptionalFixed64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalSfixed32() int32 {
- if m != nil {
- return m.OptionalSfixed32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalSfixed64() int64 {
- if m != nil {
- return m.OptionalSfixed64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalFloat() float32 {
- if m != nil {
- return m.OptionalFloat
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalDouble() float64 {
- if m != nil {
- return m.OptionalDouble
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOptionalBool() bool {
- if m != nil {
- return m.OptionalBool
- }
- return false
-}
-
-func (m *TestAllTypes) GetOptionalString() string {
- if m != nil {
- return m.OptionalString
- }
- return ""
-}
-
-func (m *TestAllTypes) GetOptionalBytes() []byte {
- if m != nil {
- return m.OptionalBytes
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
- if m != nil {
- return m.OptionalNestedMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
- if m != nil {
- return m.OptionalForeignMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
- if m != nil {
- return m.OptionalNestedEnum
- }
- return TestAllTypes_FOO
-}
-
-func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
- if m != nil {
- return m.OptionalForeignEnum
- }
- return ForeignEnum_FOREIGN_FOO
-}
-
-func (m *TestAllTypes) GetOptionalStringPiece() string {
- if m != nil {
- return m.OptionalStringPiece
- }
- return ""
-}
-
-func (m *TestAllTypes) GetOptionalCord() string {
- if m != nil {
- return m.OptionalCord
- }
- return ""
-}
-
-func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes {
- if m != nil {
- return m.RecursiveMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedInt32() []int32 {
- if m != nil {
- return m.RepeatedInt32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedInt64() []int64 {
- if m != nil {
- return m.RepeatedInt64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedUint32() []uint32 {
- if m != nil {
- return m.RepeatedUint32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedUint64() []uint64 {
- if m != nil {
- return m.RepeatedUint64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedSint32() []int32 {
- if m != nil {
- return m.RepeatedSint32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedSint64() []int64 {
- if m != nil {
- return m.RepeatedSint64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedFixed32() []uint32 {
- if m != nil {
- return m.RepeatedFixed32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedFixed64() []uint64 {
- if m != nil {
- return m.RepeatedFixed64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedSfixed32() []int32 {
- if m != nil {
- return m.RepeatedSfixed32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedSfixed64() []int64 {
- if m != nil {
- return m.RepeatedSfixed64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedFloat() []float32 {
- if m != nil {
- return m.RepeatedFloat
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedDouble() []float64 {
- if m != nil {
- return m.RepeatedDouble
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedBool() []bool {
- if m != nil {
- return m.RepeatedBool
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedString() []string {
- if m != nil {
- return m.RepeatedString
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedBytes() [][]byte {
- if m != nil {
- return m.RepeatedBytes
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
- if m != nil {
- return m.RepeatedNestedMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
- if m != nil {
- return m.RepeatedForeignMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
- if m != nil {
- return m.RepeatedNestedEnum
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
- if m != nil {
- return m.RepeatedForeignEnum
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedStringPiece() []string {
- if m != nil {
- return m.RepeatedStringPiece
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedCord() []string {
- if m != nil {
- return m.RepeatedCord
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
- if m != nil {
- return m.MapInt32Int32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
- if m != nil {
- return m.MapInt64Int64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
- if m != nil {
- return m.MapUint32Uint32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
- if m != nil {
- return m.MapUint64Uint64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
- if m != nil {
- return m.MapSint32Sint32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
- if m != nil {
- return m.MapSint64Sint64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
- if m != nil {
- return m.MapFixed32Fixed32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
- if m != nil {
- return m.MapFixed64Fixed64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
- if m != nil {
- return m.MapSfixed32Sfixed32
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
- if m != nil {
- return m.MapSfixed64Sfixed64
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 {
- if m != nil {
- return m.MapInt32Float
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 {
- if m != nil {
- return m.MapInt32Double
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapBoolBool() map[bool]bool {
- if m != nil {
- return m.MapBoolBool
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringString() map[string]string {
- if m != nil {
- return m.MapStringString
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringBytes() map[string][]byte {
- if m != nil {
- return m.MapStringBytes
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
- if m != nil {
- return m.MapStringNestedMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage {
- if m != nil {
- return m.MapStringForeignMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
- if m != nil {
- return m.MapStringNestedEnum
- }
- return nil
-}
-
-func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum {
- if m != nil {
- return m.MapStringForeignEnum
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOneofUint32() uint32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok {
- return x.OneofUint32
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
- return x.OneofNestedMessage
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOneofString() string {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok {
- return x.OneofString
- }
- return ""
-}
-
-func (m *TestAllTypes) GetOneofBytes() []byte {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok {
- return x.OneofBytes
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOneofBool() bool {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBool); ok {
- return x.OneofBool
- }
- return false
-}
-
-func (m *TestAllTypes) GetOneofUint64() uint64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint64); ok {
- return x.OneofUint64
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOneofFloat() float32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofFloat); ok {
- return x.OneofFloat
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOneofDouble() float64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofDouble); ok {
- return x.OneofDouble
- }
- return 0
-}
-
-func (m *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofEnum); ok {
- return x.OneofEnum
- }
- return TestAllTypes_FOO
-}
-
-func (m *TestAllTypes) GetOptionalBoolWrapper() *google_protobuf5.BoolValue {
- if m != nil {
- return m.OptionalBoolWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalInt32Wrapper() *google_protobuf5.Int32Value {
- if m != nil {
- return m.OptionalInt32Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalInt64Wrapper() *google_protobuf5.Int64Value {
- if m != nil {
- return m.OptionalInt64Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalUint32Wrapper() *google_protobuf5.UInt32Value {
- if m != nil {
- return m.OptionalUint32Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalUint64Wrapper() *google_protobuf5.UInt64Value {
- if m != nil {
- return m.OptionalUint64Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalFloatWrapper() *google_protobuf5.FloatValue {
- if m != nil {
- return m.OptionalFloatWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalDoubleWrapper() *google_protobuf5.DoubleValue {
- if m != nil {
- return m.OptionalDoubleWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalStringWrapper() *google_protobuf5.StringValue {
- if m != nil {
- return m.OptionalStringWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalBytesWrapper() *google_protobuf5.BytesValue {
- if m != nil {
- return m.OptionalBytesWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedBoolWrapper() []*google_protobuf5.BoolValue {
- if m != nil {
- return m.RepeatedBoolWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*google_protobuf5.Int32Value {
- if m != nil {
- return m.RepeatedInt32Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*google_protobuf5.Int64Value {
- if m != nil {
- return m.RepeatedInt64Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*google_protobuf5.UInt32Value {
- if m != nil {
- return m.RepeatedUint32Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*google_protobuf5.UInt64Value {
- if m != nil {
- return m.RepeatedUint64Wrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedFloatWrapper() []*google_protobuf5.FloatValue {
- if m != nil {
- return m.RepeatedFloatWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*google_protobuf5.DoubleValue {
- if m != nil {
- return m.RepeatedDoubleWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedStringWrapper() []*google_protobuf5.StringValue {
- if m != nil {
- return m.RepeatedStringWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedBytesWrapper() []*google_protobuf5.BytesValue {
- if m != nil {
- return m.RepeatedBytesWrapper
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalDuration() *google_protobuf1.Duration {
- if m != nil {
- return m.OptionalDuration
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalTimestamp() *google_protobuf4.Timestamp {
- if m != nil {
- return m.OptionalTimestamp
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalFieldMask() *google_protobuf2.FieldMask {
- if m != nil {
- return m.OptionalFieldMask
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalStruct() *google_protobuf3.Struct {
- if m != nil {
- return m.OptionalStruct
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalAny() *google_protobuf.Any {
- if m != nil {
- return m.OptionalAny
- }
- return nil
-}
-
-func (m *TestAllTypes) GetOptionalValue() *google_protobuf3.Value {
- if m != nil {
- return m.OptionalValue
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedDuration() []*google_protobuf1.Duration {
- if m != nil {
- return m.RepeatedDuration
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedTimestamp() []*google_protobuf4.Timestamp {
- if m != nil {
- return m.RepeatedTimestamp
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedFieldmask() []*google_protobuf2.FieldMask {
- if m != nil {
- return m.RepeatedFieldmask
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedStruct() []*google_protobuf3.Struct {
- if m != nil {
- return m.RepeatedStruct
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedAny() []*google_protobuf.Any {
- if m != nil {
- return m.RepeatedAny
- }
- return nil
-}
-
-func (m *TestAllTypes) GetRepeatedValue() []*google_protobuf3.Value {
- if m != nil {
- return m.RepeatedValue
- }
- return nil
-}
-
-func (m *TestAllTypes) GetFieldname1() int32 {
- if m != nil {
- return m.Fieldname1
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFieldName2() int32 {
- if m != nil {
- return m.FieldName2
- }
- return 0
-}
-
-func (m *TestAllTypes) GetXFieldName3() int32 {
- if m != nil {
- return m.XFieldName3
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField_Name4_() int32 {
- if m != nil {
- return m.Field_Name4_
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField0Name5() int32 {
- if m != nil {
- return m.Field0Name5
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField_0Name6() int32 {
- if m != nil {
- return m.Field_0Name6
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFieldName7() int32 {
- if m != nil {
- return m.FieldName7
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFieldName8() int32 {
- if m != nil {
- return m.FieldName8
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField_Name9() int32 {
- if m != nil {
- return m.Field_Name9
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField_Name10() int32 {
- if m != nil {
- return m.Field_Name10
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFIELD_NAME11() int32 {
- if m != nil {
- return m.FIELD_NAME11
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFIELDName12() int32 {
- if m != nil {
- return m.FIELDName12
- }
- return 0
-}
-
-func (m *TestAllTypes) GetXFieldName13() int32 {
- if m != nil {
- return m.XFieldName13
- }
- return 0
-}
-
-func (m *TestAllTypes) GetX_FieldName14() int32 {
- if m != nil {
- return m.X_FieldName14
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField_Name15() int32 {
- if m != nil {
- return m.Field_Name15
- }
- return 0
-}
-
-func (m *TestAllTypes) GetField__Name16() int32 {
- if m != nil {
- return m.Field__Name16
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFieldName17__() int32 {
- if m != nil {
- return m.FieldName17__
- }
- return 0
-}
-
-func (m *TestAllTypes) GetFieldName18__() int32 {
- if m != nil {
- return m.FieldName18__
- }
- return 0
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{
- (*TestAllTypes_OneofUint32)(nil),
- (*TestAllTypes_OneofNestedMessage)(nil),
- (*TestAllTypes_OneofString)(nil),
- (*TestAllTypes_OneofBytes)(nil),
- (*TestAllTypes_OneofBool)(nil),
- (*TestAllTypes_OneofUint64)(nil),
- (*TestAllTypes_OneofFloat)(nil),
- (*TestAllTypes_OneofDouble)(nil),
- (*TestAllTypes_OneofEnum)(nil),
- }
-}
-
-func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*TestAllTypes)
- // oneof_field
- switch x := m.OneofField.(type) {
- case *TestAllTypes_OneofUint32:
- b.EncodeVarint(111<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.OneofUint32))
- case *TestAllTypes_OneofNestedMessage:
- b.EncodeVarint(112<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.OneofNestedMessage); err != nil {
- return err
- }
- case *TestAllTypes_OneofString:
- b.EncodeVarint(113<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.OneofString)
- case *TestAllTypes_OneofBytes:
- b.EncodeVarint(114<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.OneofBytes)
- case *TestAllTypes_OneofBool:
- t := uint64(0)
- if x.OneofBool {
- t = 1
- }
- b.EncodeVarint(115<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *TestAllTypes_OneofUint64:
- b.EncodeVarint(116<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.OneofUint64))
- case *TestAllTypes_OneofFloat:
- b.EncodeVarint(117<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.OneofFloat)))
- case *TestAllTypes_OneofDouble:
- b.EncodeVarint(118<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.OneofDouble))
- case *TestAllTypes_OneofEnum:
- b.EncodeVarint(119<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.OneofEnum))
- case nil:
- default:
- return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x)
- }
- return nil
-}
-
-func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*TestAllTypes)
- switch tag {
- case 111: // oneof_field.oneof_uint32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.OneofField = &TestAllTypes_OneofUint32{uint32(x)}
- return true, err
- case 112: // oneof_field.oneof_nested_message
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(TestAllTypes_NestedMessage)
- err := b.DecodeMessage(msg)
- m.OneofField = &TestAllTypes_OneofNestedMessage{msg}
- return true, err
- case 113: // oneof_field.oneof_string
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.OneofField = &TestAllTypes_OneofString{x}
- return true, err
- case 114: // oneof_field.oneof_bytes
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.OneofField = &TestAllTypes_OneofBytes{x}
- return true, err
- case 115: // oneof_field.oneof_bool
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.OneofField = &TestAllTypes_OneofBool{x != 0}
- return true, err
- case 116: // oneof_field.oneof_uint64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.OneofField = &TestAllTypes_OneofUint64{x}
- return true, err
- case 117: // oneof_field.oneof_float
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.OneofField = &TestAllTypes_OneofFloat{math.Float32frombits(uint32(x))}
- return true, err
- case 118: // oneof_field.oneof_double
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.OneofField = &TestAllTypes_OneofDouble{math.Float64frombits(x)}
- return true, err
- case 119: // oneof_field.oneof_enum
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.OneofField = &TestAllTypes_OneofEnum{TestAllTypes_NestedEnum(x)}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _TestAllTypes_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*TestAllTypes)
- // oneof_field
- switch x := m.OneofField.(type) {
- case *TestAllTypes_OneofUint32:
- n += proto.SizeVarint(111<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.OneofUint32))
- case *TestAllTypes_OneofNestedMessage:
- s := proto.Size(x.OneofNestedMessage)
- n += proto.SizeVarint(112<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *TestAllTypes_OneofString:
- n += proto.SizeVarint(113<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.OneofString)))
- n += len(x.OneofString)
- case *TestAllTypes_OneofBytes:
- n += proto.SizeVarint(114<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.OneofBytes)))
- n += len(x.OneofBytes)
- case *TestAllTypes_OneofBool:
- n += proto.SizeVarint(115<<3 | proto.WireVarint)
- n += 1
- case *TestAllTypes_OneofUint64:
- n += proto.SizeVarint(116<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.OneofUint64))
- case *TestAllTypes_OneofFloat:
- n += proto.SizeVarint(117<<3 | proto.WireFixed32)
- n += 4
- case *TestAllTypes_OneofDouble:
- n += proto.SizeVarint(118<<3 | proto.WireFixed64)
- n += 8
- case *TestAllTypes_OneofEnum:
- n += proto.SizeVarint(119<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.OneofEnum))
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type TestAllTypes_NestedMessage struct {
- A int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
- Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"`
-}
-
-func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} }
-func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) }
-func (*TestAllTypes_NestedMessage) ProtoMessage() {}
-func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-func (m *TestAllTypes_NestedMessage) GetA() int32 {
- if m != nil {
- return m.A
- }
- return 0
-}
-
-func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
- if m != nil {
- return m.Corecursive
- }
- return nil
-}
-
-type ForeignMessage struct {
- C int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
-}
-
-func (m *ForeignMessage) Reset() { *m = ForeignMessage{} }
-func (m *ForeignMessage) String() string { return proto.CompactTextString(m) }
-func (*ForeignMessage) ProtoMessage() {}
-func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *ForeignMessage) GetC() int32 {
- if m != nil {
- return m.C
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest")
- proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse")
- proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes")
- proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage")
- proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage")
- proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value)
- proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value)
- proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value)
-}
-
-func init() { proto.RegisterFile("conformance_proto/conformance.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 2737 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x72, 0xdb, 0xc8,
- 0xd5, 0x16, 0x08, 0x59, 0x4b, 0x93, 0x92, 0xa8, 0xd6, 0xd6, 0x96, 0x5d, 0x63, 0x58, 0xb2, 0x7f,
- 0xd3, 0xf6, 0x8c, 0xac, 0x05, 0x86, 0x65, 0xcf, 0x3f, 0x8e, 0x45, 0x9b, 0xb4, 0xe4, 0x8c, 0x25,
- 0x17, 0x64, 0x8d, 0xab, 0x9c, 0x0b, 0x06, 0xa6, 0x20, 0x15, 0xc7, 0x24, 0xc1, 0x01, 0x48, 0x4f,
- 0x94, 0xcb, 0xbc, 0x41, 0xf6, 0x7d, 0xbd, 0xcf, 0x7a, 0x93, 0xa4, 0x92, 0xab, 0x54, 0x6e, 0xb2,
- 0x27, 0x95, 0x3d, 0x79, 0x85, 0xbc, 0x43, 0x52, 0xbd, 0xa2, 0xbb, 0x01, 0x50, 0xf4, 0x54, 0x0d,
- 0x25, 0x1e, 0x7c, 0xfd, 0x9d, 0xd3, 0xe7, 0x1c, 0x7c, 0x2d, 0x1c, 0x18, 0x2c, 0xd7, 0x83, 0xf6,
- 0x51, 0x10, 0xb6, 0xbc, 0x76, 0xdd, 0xaf, 0x75, 0xc2, 0xa0, 0x1b, 0xdc, 0x90, 0x2c, 0x2b, 0xc4,
- 0x02, 0xf3, 0x92, 0x69, 0xf1, 0xec, 0x71, 0x10, 0x1c, 0x37, 0xfd, 0x1b, 0xe4, 0xd2, 0x8b, 0xde,
- 0xd1, 0x0d, 0xaf, 0x7d, 0x42, 0x71, 0x8b, 0x6f, 0xe8, 0x97, 0x0e, 0x7b, 0xa1, 0xd7, 0x6d, 0x04,
- 0x6d, 0x76, 0xdd, 0xd2, 0xaf, 0x1f, 0x35, 0xfc, 0xe6, 0x61, 0xad, 0xe5, 0x45, 0x2f, 0x19, 0xe2,
- 0xbc, 0x8e, 0x88, 0xba, 0x61, 0xaf, 0xde, 0x65, 0x57, 0x2f, 0xe8, 0x57, 0xbb, 0x8d, 0x96, 0x1f,
- 0x75, 0xbd, 0x56, 0x27, 0x2b, 0x80, 0x0f, 0x43, 0xaf, 0xd3, 0xf1, 0xc3, 0x88, 0x5e, 0x5f, 0xfa,
- 0x85, 0x01, 0xe0, 0xfd, 0x78, 0x2f, 0xae, 0xff, 0x41, 0xcf, 0x8f, 0xba, 0xf0, 0x3a, 0x28, 0xf2,
- 0x15, 0xb5, 0x8e, 0x77, 0xd2, 0x0c, 0xbc, 0x43, 0x64, 0x58, 0x46, 0xa9, 0xb0, 0x3d, 0xe4, 0x4e,
- 0xf1, 0x2b, 0x4f, 0xe8, 0x05, 0xb8, 0x0c, 0x0a, 0xef, 0x47, 0x41, 0x5b, 0x00, 0x73, 0x96, 0x51,
- 0x1a, 0xdf, 0x1e, 0x72, 0xf3, 0xd8, 0xca, 0x41, 0x7b, 0x60, 0x21, 0xa4, 0xe4, 0xfe, 0x61, 0x2d,
- 0xe8, 0x75, 0x3b, 0xbd, 0x6e, 0x8d, 0x78, 0xed, 0x22, 0xd3, 0x32, 0x4a, 0x93, 0xeb, 0x0b, 0x2b,
- 0x72, 0x9a, 0x9f, 0x35, 0x42, 0xbf, 0x4a, 0x2e, 0xbb, 0x73, 0x62, 0xdd, 0x1e, 0x59, 0x46, 0xcd,
- 0xe5, 0x71, 0x30, 0xca, 0x1c, 0x2e, 0x7d, 0x2a, 0x07, 0x66, 0x94, 0x4d, 0x44, 0x9d, 0xa0, 0x1d,
- 0xf9, 0xf0, 0x22, 0xc8, 0x77, 0xbc, 0x30, 0xf2, 0x6b, 0x7e, 0x18, 0x06, 0x21, 0xd9, 0x00, 0x8e,
- 0x0b, 0x10, 0x63, 0x05, 0xdb, 0xe0, 0x55, 0x30, 0x15, 0xf9, 0x61, 0xc3, 0x6b, 0x36, 0x3e, 0xc9,
- 0x61, 0x23, 0x0c, 0x36, 0x29, 0x2e, 0x50, 0xe8, 0x65, 0x30, 0x11, 0xf6, 0xda, 0x38, 0xc1, 0x0c,
- 0xc8, 0xf7, 0x59, 0x60, 0x66, 0x0a, 0x4b, 0x4b, 0x9d, 0x39, 0x68, 0xea, 0x86, 0xd3, 0x52, 0xb7,
- 0x08, 0x46, 0xa3, 0x97, 0x8d, 0x4e, 0xc7, 0x3f, 0x44, 0x67, 0xd8, 0x75, 0x6e, 0x28, 0x8f, 0x81,
- 0x91, 0xd0, 0x8f, 0x7a, 0xcd, 0xee, 0xd2, 0x7f, 0xaa, 0xa0, 0xf0, 0xd4, 0x8f, 0xba, 0x5b, 0xcd,
- 0xe6, 0xd3, 0x93, 0x8e, 0x1f, 0xc1, 0xcb, 0x60, 0x32, 0xe8, 0xe0, 0x5e, 0xf3, 0x9a, 0xb5, 0x46,
- 0xbb, 0xbb, 0xb1, 0x4e, 0x12, 0x70, 0xc6, 0x9d, 0xe0, 0xd6, 0x1d, 0x6c, 0xd4, 0x61, 0x8e, 0x4d,
- 0xf6, 0x65, 0x2a, 0x30, 0xc7, 0x86, 0x57, 0xc0, 0x94, 0x80, 0xf5, 0x28, 0x1d, 0xde, 0xd5, 0x84,
- 0x2b, 0x56, 0x1f, 0x10, 0x6b, 0x02, 0xe8, 0xd8, 0x64, 0x57, 0xc3, 0x2a, 0x50, 0x63, 0x8c, 0x28,
- 0x23, 0xde, 0xde, 0x74, 0x0c, 0xdc, 0x4f, 0x32, 0x46, 0x94, 0x11, 0xd7, 0x08, 0xaa, 0x40, 0xc7,
- 0x86, 0x57, 0x41, 0x51, 0x00, 0x8f, 0x1a, 0x9f, 0xf0, 0x0f, 0x37, 0xd6, 0xd1, 0xa8, 0x65, 0x94,
- 0x46, 0x5d, 0x41, 0x50, 0xa5, 0xe6, 0x24, 0xd4, 0xb1, 0xd1, 0x98, 0x65, 0x94, 0x46, 0x34, 0xa8,
- 0x63, 0xc3, 0xeb, 0x60, 0x3a, 0x76, 0xcf, 0x69, 0xc7, 0x2d, 0xa3, 0x34, 0xe5, 0x0a, 0x8e, 0x7d,
- 0x66, 0x4f, 0x01, 0x3b, 0x36, 0x02, 0x96, 0x51, 0x2a, 0xea, 0x60, 0xc7, 0x56, 0x52, 0x7f, 0xd4,
- 0x0c, 0xbc, 0x2e, 0xca, 0x5b, 0x46, 0x29, 0x17, 0xa7, 0xbe, 0x8a, 0x8d, 0xca, 0xfe, 0x0f, 0x83,
- 0xde, 0x8b, 0xa6, 0x8f, 0x0a, 0x96, 0x51, 0x32, 0xe2, 0xfd, 0x3f, 0x20, 0x56, 0xb8, 0x0c, 0xc4,
- 0xca, 0xda, 0x8b, 0x20, 0x68, 0xa2, 0x09, 0xcb, 0x28, 0x8d, 0xb9, 0x05, 0x6e, 0x2c, 0x07, 0x41,
- 0x53, 0xcd, 0x66, 0x37, 0x6c, 0xb4, 0x8f, 0xd1, 0x24, 0xee, 0x2a, 0x29, 0x9b, 0xc4, 0xaa, 0x44,
- 0xf7, 0xe2, 0xa4, 0xeb, 0x47, 0x68, 0x0a, 0xb7, 0x71, 0x1c, 0x5d, 0x19, 0x1b, 0x61, 0x0d, 0x2c,
- 0x08, 0x58, 0x9b, 0xde, 0xde, 0x2d, 0x3f, 0x8a, 0xbc, 0x63, 0x1f, 0x41, 0xcb, 0x28, 0xe5, 0xd7,
- 0xaf, 0x28, 0x37, 0xb6, 0xdc, 0xa2, 0x2b, 0xbb, 0x04, 0xff, 0x98, 0xc2, 0xdd, 0x39, 0xce, 0xa3,
- 0x98, 0xe1, 0x01, 0x40, 0x71, 0x96, 0x82, 0xd0, 0x6f, 0x1c, 0xb7, 0x85, 0x87, 0x19, 0xe2, 0xe1,
- 0x9c, 0xe2, 0xa1, 0x4a, 0x31, 0x9c, 0x75, 0x5e, 0x24, 0x53, 0xb1, 0xc3, 0xf7, 0xc0, 0xac, 0x1e,
- 0xb7, 0xdf, 0xee, 0xb5, 0xd0, 0x1c, 0x51, 0xa3, 0x4b, 0xa7, 0x05, 0x5d, 0x69, 0xf7, 0x5a, 0x2e,
- 0x54, 0x23, 0xc6, 0x36, 0xf8, 0x2e, 0x98, 0x4b, 0x84, 0x4b, 0x88, 0xe7, 0x09, 0x31, 0x4a, 0x8b,
- 0x95, 0x90, 0xcd, 0x68, 0x81, 0x12, 0x36, 0x47, 0x62, 0xa3, 0xd5, 0xaa, 0x75, 0x1a, 0x7e, 0xdd,
- 0x47, 0x08, 0xd7, 0xac, 0x9c, 0x1b, 0xcb, 0xc5, 0xeb, 0x68, 0xdd, 0x9e, 0xe0, 0xcb, 0xf0, 0x8a,
- 0xd4, 0x0a, 0xf5, 0x20, 0x3c, 0x44, 0x67, 0x19, 0xde, 0x88, 0xdb, 0xe1, 0x7e, 0x10, 0x1e, 0xc2,
- 0x2a, 0x98, 0x0e, 0xfd, 0x7a, 0x2f, 0x8c, 0x1a, 0xaf, 0x7c, 0x91, 0xd6, 0x73, 0x24, 0xad, 0x67,
- 0x33, 0x73, 0xe0, 0x16, 0xc5, 0x1a, 0x9e, 0xce, 0xcb, 0x60, 0x32, 0xf4, 0x3b, 0xbe, 0x87, 0xf3,
- 0x48, 0x6f, 0xe6, 0x0b, 0x96, 0x89, 0xd5, 0x86, 0x5b, 0x85, 0xda, 0xc8, 0x30, 0xc7, 0x46, 0x96,
- 0x65, 0x62, 0xb5, 0x91, 0x60, 0x54, 0x1b, 0x04, 0x8c, 0xa9, 0xcd, 0x45, 0xcb, 0xc4, 0x6a, 0xc3,
- 0xcd, 0xb1, 0xda, 0x28, 0x40, 0xc7, 0x46, 0x4b, 0x96, 0x89, 0xd5, 0x46, 0x06, 0x6a, 0x8c, 0x4c,
- 0x6d, 0x96, 0x2d, 0x13, 0xab, 0x0d, 0x37, 0xef, 0x27, 0x19, 0x99, 0xda, 0x5c, 0xb2, 0x4c, 0xac,
- 0x36, 0x32, 0x90, 0xaa, 0x8d, 0x00, 0x72, 0x59, 0xb8, 0x6c, 0x99, 0x58, 0x6d, 0xb8, 0x5d, 0x52,
- 0x1b, 0x15, 0xea, 0xd8, 0xe8, 0xff, 0x2c, 0x13, 0xab, 0x8d, 0x02, 0xa5, 0x6a, 0x13, 0xbb, 0xe7,
- 0xb4, 0x57, 0x2c, 0x13, 0xab, 0x8d, 0x08, 0x40, 0x52, 0x1b, 0x0d, 0xec, 0xd8, 0xa8, 0x64, 0x99,
- 0x58, 0x6d, 0x54, 0x30, 0x55, 0x9b, 0x38, 0x08, 0xa2, 0x36, 0x57, 0x2d, 0x13, 0xab, 0x8d, 0x08,
- 0x81, 0xab, 0x8d, 0x80, 0x31, 0xb5, 0xb9, 0x66, 0x99, 0x58, 0x6d, 0xb8, 0x39, 0x56, 0x1b, 0x01,
- 0x24, 0x6a, 0x73, 0xdd, 0x32, 0xb1, 0xda, 0x70, 0x23, 0x57, 0x9b, 0x38, 0x42, 0xaa, 0x36, 0x6f,
- 0x5a, 0x26, 0x56, 0x1b, 0x11, 0x9f, 0x50, 0x9b, 0x98, 0x8d, 0xa8, 0xcd, 0x5b, 0x96, 0x89, 0xd5,
- 0x46, 0xd0, 0x71, 0xb5, 0x11, 0x30, 0x4d, 0x6d, 0x56, 0x2d, 0xf3, 0xb5, 0xd4, 0x86, 0xf3, 0x24,
- 0xd4, 0x26, 0xce, 0x92, 0xa6, 0x36, 0x6b, 0xc4, 0x43, 0x7f, 0xb5, 0x11, 0xc9, 0x4c, 0xa8, 0x8d,
- 0x1e, 0x37, 0x11, 0x85, 0x0d, 0xcb, 0x1c, 0x5c, 0x6d, 0xd4, 0x88, 0xb9, 0xda, 0x24, 0xc2, 0x25,
- 0xc4, 0x36, 0x21, 0xee, 0xa3, 0x36, 0x5a, 0xa0, 0x5c, 0x6d, 0xb4, 0x6a, 0x31, 0xb5, 0x71, 0x70,
- 0xcd, 0xa8, 0xda, 0xa8, 0x75, 0x13, 0x6a, 0x23, 0xd6, 0x11, 0xb5, 0xb9, 0xc5, 0xf0, 0x46, 0xdc,
- 0x0e, 0x44, 0x6d, 0x9e, 0x82, 0xa9, 0x96, 0xd7, 0xa1, 0x02, 0xc1, 0x64, 0x62, 0x93, 0x24, 0xf5,
- 0xcd, 0xec, 0x0c, 0x3c, 0xf6, 0x3a, 0x44, 0x3b, 0xc8, 0x47, 0xa5, 0xdd, 0x0d, 0x4f, 0xdc, 0x89,
- 0x96, 0x6c, 0x93, 0x58, 0x1d, 0x9b, 0xa9, 0xca, 0xed, 0xc1, 0x58, 0x1d, 0x9b, 0x7c, 0x28, 0xac,
- 0xcc, 0x06, 0x9f, 0x83, 0x69, 0xcc, 0x4a, 0xe5, 0x87, 0xab, 0xd0, 0x1d, 0xc2, 0xbb, 0xd2, 0x97,
- 0x97, 0x4a, 0x13, 0xfd, 0xa4, 0xcc, 0x38, 0x3c, 0xd9, 0x2a, 0x73, 0x3b, 0x36, 0x17, 0xae, 0xb7,
- 0x07, 0xe4, 0x76, 0x6c, 0xfa, 0xa9, 0x72, 0x73, 0x2b, 0xe7, 0xa6, 0x22, 0xc7, 0xb5, 0xee, 0xff,
- 0x07, 0xe0, 0xa6, 0x02, 0xb8, 0xaf, 0xc5, 0x2d, 0x5b, 0x65, 0x6e, 0xc7, 0xe6, 0xf2, 0xf8, 0xce,
- 0x80, 0xdc, 0x8e, 0xbd, 0xaf, 0xc5, 0x2d, 0x5b, 0xe1, 0xc7, 0xc1, 0x0c, 0xe6, 0x66, 0xda, 0x26,
- 0x24, 0xf5, 0x2e, 0x61, 0x5f, 0xed, 0xcb, 0xce, 0x74, 0x96, 0xfd, 0xa0, 0xfc, 0x38, 0x50, 0xd5,
- 0xae, 0x78, 0x70, 0x6c, 0xa1, 0xc4, 0x1f, 0x19, 0xd4, 0x83, 0x63, 0xb3, 0x1f, 0x9a, 0x07, 0x61,
- 0x87, 0x47, 0x60, 0x8e, 0xe4, 0x87, 0x6f, 0x42, 0x28, 0xf8, 0x3d, 0xe2, 0x63, 0xbd, 0x7f, 0x8e,
- 0x18, 0x98, 0xff, 0xa4, 0x5e, 0x70, 0xc8, 0xfa, 0x15, 0xd5, 0x0f, 0xae, 0x04, 0xdf, 0xcb, 0xd6,
- 0xc0, 0x7e, 0x1c, 0x9b, 0xff, 0xd4, 0xfd, 0xc4, 0x57, 0xd4, 0xfb, 0x95, 0x1e, 0x1a, 0xe5, 0x41,
- 0xef, 0x57, 0x72, 0x9c, 0x68, 0xf7, 0x2b, 0x3d, 0x62, 0x9e, 0x81, 0x62, 0xcc, 0xca, 0xce, 0x98,
- 0xfb, 0x84, 0xf6, 0xad, 0xd3, 0x69, 0xe9, 0xe9, 0x43, 0x79, 0x27, 0x5b, 0x8a, 0x11, 0xee, 0x02,
- 0xec, 0x89, 0x9c, 0x46, 0xf4, 0x48, 0x7a, 0x40, 0x58, 0xaf, 0xf5, 0x65, 0xc5, 0xe7, 0x14, 0xfe,
- 0x9f, 0x52, 0xe6, 0x5b, 0xb1, 0x45, 0xb4, 0x3b, 0x95, 0x42, 0x76, 0x7e, 0x55, 0x06, 0x69, 0x77,
- 0x02, 0xa5, 0x9f, 0x52, 0xbb, 0x4b, 0x56, 0x9e, 0x04, 0xc6, 0x4d, 0x8f, 0xbc, 0xea, 0x00, 0x49,
- 0xa0, 0xcb, 0xc9, 0x69, 0x18, 0x27, 0x41, 0x32, 0xc2, 0x0e, 0x38, 0x2b, 0x11, 0x6b, 0x87, 0xe4,
- 0x43, 0xe2, 0xe1, 0xe6, 0x00, 0x1e, 0x94, 0x63, 0x91, 0x7a, 0x9a, 0x6f, 0xa5, 0x5e, 0x84, 0x11,
- 0x58, 0x94, 0x3c, 0xea, 0xa7, 0xe6, 0x36, 0x71, 0xe9, 0x0c, 0xe0, 0x52, 0x3d, 0x33, 0xa9, 0xcf,
- 0x85, 0x56, 0xfa, 0x55, 0x78, 0x0c, 0xe6, 0x93, 0xdb, 0x24, 0x47, 0xdf, 0xce, 0x20, 0xf7, 0x80,
- 0xb4, 0x0d, 0x7c, 0xf4, 0x49, 0xf7, 0x80, 0x76, 0x05, 0xbe, 0x0f, 0x16, 0x52, 0x76, 0x47, 0x3c,
- 0x3d, 0x22, 0x9e, 0x36, 0x06, 0xdf, 0x5a, 0xec, 0x6a, 0xb6, 0x95, 0x72, 0x09, 0x2e, 0x83, 0x42,
- 0xd0, 0xf6, 0x83, 0x23, 0x7e, 0xdc, 0x04, 0xf8, 0x11, 0x7b, 0x7b, 0xc8, 0xcd, 0x13, 0x2b, 0x3b,
- 0x3c, 0x3e, 0x06, 0x66, 0x29, 0x48, 0xab, 0x6d, 0xe7, 0xb5, 0x1e, 0xb7, 0xb6, 0x87, 0x5c, 0x48,
- 0x68, 0xd4, 0x5a, 0x8a, 0x08, 0x58, 0xb7, 0x7f, 0xc0, 0x27, 0x12, 0xc4, 0xca, 0x7a, 0xf7, 0x22,
- 0xa0, 0x5f, 0x59, 0xdb, 0x86, 0x6c, 0xbc, 0x01, 0x88, 0x91, 0x76, 0xe1, 0x05, 0x00, 0x18, 0x04,
- 0xdf, 0x87, 0x11, 0x7e, 0x10, 0xdd, 0x1e, 0x72, 0xc7, 0x29, 0x02, 0xdf, 0x5b, 0xca, 0x56, 0x1d,
- 0x1b, 0x75, 0x2d, 0xa3, 0x34, 0xac, 0x6c, 0xd5, 0xb1, 0x63, 0x47, 0x54, 0x7b, 0x7a, 0xf8, 0xf1,
- 0x58, 0x38, 0xa2, 0x62, 0x22, 0x78, 0x98, 0x90, 0xbc, 0xc2, 0x8f, 0xc6, 0x82, 0x87, 0x09, 0x43,
- 0x85, 0x47, 0x43, 0xca, 0xf6, 0xe1, 0xe0, 0x8f, 0x78, 0x22, 0x66, 0x52, 0x9e, 0x3d, 0xe9, 0x69,
- 0x8c, 0x88, 0x0c, 0x9b, 0xa6, 0xa1, 0x5f, 0x19, 0x24, 0xf7, 0x8b, 0x2b, 0x74, 0xdc, 0xb6, 0xc2,
- 0xe7, 0x3c, 0x2b, 0x78, 0xab, 0xef, 0x79, 0xcd, 0x9e, 0x1f, 0x3f, 0xa6, 0x61, 0xd3, 0x33, 0xba,
- 0x0e, 0xba, 0x60, 0x5e, 0x9d, 0xd1, 0x08, 0xc6, 0x5f, 0x1b, 0xec, 0xd1, 0x56, 0x67, 0x24, 0x7a,
- 0x47, 0x29, 0x67, 0x95, 0x49, 0x4e, 0x06, 0xa7, 0x63, 0x0b, 0xce, 0xdf, 0xf4, 0xe1, 0x74, 0xec,
- 0x24, 0xa7, 0x63, 0x73, 0xce, 0x03, 0xe9, 0x21, 0xbf, 0xa7, 0x06, 0xfa, 0x5b, 0x4a, 0x7a, 0x3e,
- 0x41, 0x7a, 0x20, 0x45, 0x3a, 0xa7, 0x0e, 0x89, 0xb2, 0x68, 0xa5, 0x58, 0x7f, 0xd7, 0x8f, 0x96,
- 0x07, 0x3b, 0xa7, 0x8e, 0x94, 0xd2, 0x32, 0x40, 0x1a, 0x47, 0xb0, 0xfe, 0x3e, 0x2b, 0x03, 0xa4,
- 0x97, 0xb4, 0x0c, 0x10, 0x5b, 0x5a, 0xa8, 0xb4, 0xd3, 0x04, 0xe9, 0x1f, 0xb2, 0x42, 0xa5, 0xcd,
- 0xa7, 0x85, 0x4a, 0x8d, 0x69, 0xb4, 0x4c, 0x61, 0x38, 0xed, 0x1f, 0xb3, 0x68, 0xe9, 0x4d, 0xa8,
- 0xd1, 0x52, 0x63, 0x5a, 0x06, 0xc8, 0x3d, 0x2a, 0x58, 0xff, 0x94, 0x95, 0x01, 0x72, 0xdb, 0x6a,
- 0x19, 0x20, 0x36, 0xce, 0xb9, 0x27, 0x3d, 0x1c, 0x28, 0xcd, 0xff, 0x67, 0x83, 0xc8, 0x60, 0xdf,
- 0xe6, 0x97, 0x1f, 0x0a, 0xa5, 0x20, 0xd5, 0x91, 0x81, 0x60, 0xfc, 0x8b, 0xc1, 0x9e, 0xb4, 0xfa,
- 0x35, 0xbf, 0x32, 0x58, 0xc8, 0xe0, 0x94, 0x1a, 0xea, 0xaf, 0x7d, 0x38, 0x45, 0xf3, 0x2b, 0x53,
- 0x08, 0xa9, 0x46, 0xda, 0x30, 0x42, 0x90, 0xfe, 0x8d, 0x92, 0x9e, 0xd2, 0xfc, 0xea, 0xcc, 0x22,
- 0x8b, 0x56, 0x8a, 0xf5, 0xef, 0xfd, 0x68, 0x45, 0xf3, 0xab, 0x13, 0x8e, 0xb4, 0x0c, 0xa8, 0xcd,
- 0xff, 0x8f, 0xac, 0x0c, 0xc8, 0xcd, 0xaf, 0x0c, 0x03, 0xd2, 0x42, 0xd5, 0x9a, 0xff, 0x9f, 0x59,
- 0xa1, 0x2a, 0xcd, 0xaf, 0x8e, 0x0e, 0xd2, 0x68, 0xb5, 0xe6, 0xff, 0x57, 0x16, 0xad, 0xd2, 0xfc,
- 0xea, 0xb3, 0x68, 0x5a, 0x06, 0xd4, 0xe6, 0xff, 0x77, 0x56, 0x06, 0xe4, 0xe6, 0x57, 0x06, 0x0e,
- 0x9c, 0xf3, 0xa1, 0x34, 0xd7, 0xe5, 0xef, 0x70, 0xd0, 0x77, 0x73, 0x6c, 0x4e, 0x96, 0xd8, 0x3b,
- 0x43, 0xc4, 0x33, 0x5f, 0x6e, 0x81, 0x8f, 0x80, 0x18, 0x1a, 0xd6, 0xc4, 0xcb, 0x1a, 0xf4, 0xbd,
- 0x5c, 0xc6, 0xf9, 0xf1, 0x94, 0x43, 0x5c, 0xe1, 0x5f, 0x98, 0xe0, 0x47, 0xc1, 0x8c, 0x34, 0xc4,
- 0xe6, 0x2f, 0x8e, 0xd0, 0xf7, 0xb3, 0xc8, 0xaa, 0x18, 0xf3, 0xd8, 0x8b, 0x5e, 0xc6, 0x64, 0xc2,
- 0x04, 0xb7, 0xd4, 0xb9, 0x70, 0xaf, 0xde, 0x45, 0x3f, 0xa0, 0x44, 0x0b, 0x69, 0x45, 0xe8, 0xd5,
- 0xbb, 0xca, 0xc4, 0xb8, 0x57, 0xef, 0xc2, 0x4d, 0x20, 0x66, 0x8b, 0x35, 0xaf, 0x7d, 0x82, 0x7e,
- 0x48, 0xd7, 0xcf, 0x26, 0xd6, 0x6f, 0xb5, 0x4f, 0xdc, 0x3c, 0x87, 0x6e, 0xb5, 0x4f, 0xe0, 0x5d,
- 0x69, 0xd6, 0xfc, 0x0a, 0x97, 0x01, 0xfd, 0x88, 0xae, 0x9d, 0x4f, 0xac, 0xa5, 0x55, 0x12, 0xd3,
- 0x4d, 0xf2, 0x15, 0x97, 0x27, 0x6e, 0x50, 0x5e, 0x9e, 0x1f, 0xe7, 0x48, 0xb5, 0xfb, 0x95, 0x47,
- 0xf4, 0xa5, 0x54, 0x1e, 0x41, 0x14, 0x97, 0xe7, 0x27, 0xb9, 0x0c, 0x85, 0x93, 0xca, 0xc3, 0x97,
- 0xc5, 0xe5, 0x91, 0xb9, 0x48, 0x79, 0x48, 0x75, 0x7e, 0x9a, 0xc5, 0x25, 0x55, 0x27, 0x1e, 0x0a,
- 0xb2, 0x55, 0xb8, 0x3a, 0xf2, 0xad, 0x82, 0xab, 0xf3, 0x4b, 0x4a, 0x94, 0x5d, 0x1d, 0xe9, 0xee,
- 0x60, 0xd5, 0x11, 0x14, 0xb8, 0x3a, 0x3f, 0xa3, 0xeb, 0x33, 0xaa, 0xc3, 0xa1, 0xac, 0x3a, 0x62,
- 0x25, 0xad, 0xce, 0xcf, 0xe9, 0xda, 0xcc, 0xea, 0x70, 0x38, 0xad, 0xce, 0x05, 0x00, 0xc8, 0xfe,
- 0xdb, 0x5e, 0xcb, 0x5f, 0x43, 0x9f, 0x36, 0xc9, 0x6b, 0x28, 0xc9, 0x04, 0x2d, 0x90, 0xa7, 0xfd,
- 0x8b, 0xbf, 0xae, 0xa3, 0xcf, 0xc8, 0x88, 0x5d, 0x6c, 0x82, 0x17, 0x41, 0xa1, 0x16, 0x43, 0x36,
- 0xd0, 0x67, 0x19, 0xa4, 0xca, 0x21, 0x1b, 0x70, 0x09, 0x4c, 0x50, 0x04, 0x81, 0xd8, 0x35, 0xf4,
- 0x39, 0x9d, 0x86, 0xfc, 0x3d, 0x49, 0xbe, 0xad, 0x62, 0xc8, 0x4d, 0xf4, 0x79, 0x8a, 0x90, 0x6d,
- 0x70, 0x99, 0xd3, 0xac, 0x12, 0x1e, 0x07, 0x7d, 0x41, 0x01, 0x61, 0x1e, 0x47, 0xec, 0x08, 0x7f,
- 0xbb, 0x85, 0xbe, 0xa8, 0x3b, 0xba, 0x85, 0x01, 0x22, 0xb4, 0x4d, 0xf4, 0x25, 0x3d, 0xda, 0xcd,
- 0x78, 0xcb, 0xf8, 0xeb, 0x6d, 0xf4, 0x65, 0x9d, 0xe2, 0x36, 0x5c, 0x02, 0x85, 0xaa, 0x40, 0xac,
- 0xad, 0xa2, 0xaf, 0xb0, 0x38, 0x04, 0xc9, 0xda, 0x2a, 0xc1, 0xec, 0x54, 0xde, 0x7d, 0x50, 0xdb,
- 0xdd, 0x7a, 0x5c, 0x59, 0x5b, 0x43, 0x5f, 0xe5, 0x18, 0x6c, 0xa4, 0xb6, 0x18, 0x43, 0x72, 0xbd,
- 0x8e, 0xbe, 0xa6, 0x60, 0x88, 0x0d, 0x5e, 0x02, 0x93, 0x35, 0x29, 0xbf, 0x6b, 0x1b, 0xe8, 0xeb,
- 0x09, 0x6f, 0x1b, 0x14, 0x55, 0x8d, 0x51, 0x36, 0xfa, 0x46, 0x02, 0x65, 0xc7, 0x09, 0xa4, 0xa0,
- 0x9b, 0xe8, 0x9b, 0x72, 0x02, 0x09, 0x48, 0xca, 0x32, 0xdd, 0x9d, 0x83, 0xbe, 0x95, 0x00, 0x39,
- 0xd8, 0x9f, 0x14, 0xd3, 0xad, 0x5a, 0x0d, 0x7d, 0x3b, 0x81, 0xba, 0x85, 0x51, 0x52, 0x4c, 0x9b,
- 0xb5, 0x1a, 0xfa, 0x4e, 0x22, 0xaa, 0xcd, 0xc5, 0xe7, 0x60, 0x42, 0x7d, 0xd0, 0x29, 0x00, 0xc3,
- 0x63, 0x6f, 0x44, 0x0d, 0x0f, 0xbe, 0x0d, 0xf2, 0xf5, 0x40, 0xbc, 0xd4, 0x40, 0xb9, 0xd3, 0x5e,
- 0x80, 0xc8, 0xe8, 0xc5, 0x7b, 0x00, 0x26, 0x87, 0x94, 0xb0, 0x08, 0xcc, 0x97, 0xfe, 0x09, 0x73,
- 0x81, 0x7f, 0x85, 0xb3, 0xe0, 0x0c, 0xbd, 0x7d, 0x72, 0xc4, 0x46, 0xbf, 0xdc, 0xc9, 0x6d, 0x1a,
- 0x31, 0x83, 0x3c, 0x90, 0x94, 0x19, 0xcc, 0x14, 0x06, 0x53, 0x66, 0x28, 0x83, 0xd9, 0xb4, 0xd1,
- 0xa3, 0xcc, 0x31, 0x91, 0xc2, 0x31, 0x91, 0xce, 0xa1, 0x8c, 0x18, 0x65, 0x8e, 0xe1, 0x14, 0x8e,
- 0xe1, 0x24, 0x47, 0x62, 0x94, 0x28, 0x73, 0x4c, 0xa7, 0x70, 0x4c, 0xa7, 0x73, 0x28, 0x23, 0x43,
- 0x99, 0x03, 0xa6, 0x70, 0x40, 0x99, 0xe3, 0x01, 0x98, 0x4f, 0x1f, 0x0c, 0xca, 0x2c, 0xa3, 0x29,
- 0x2c, 0xa3, 0x19, 0x2c, 0xea, 0xf0, 0x4f, 0x66, 0x19, 0x49, 0x61, 0x19, 0x91, 0x59, 0xaa, 0x00,
- 0x65, 0x8d, 0xf7, 0x64, 0x9e, 0xa9, 0x14, 0x9e, 0xa9, 0x2c, 0x1e, 0x6d, 0x7c, 0x27, 0xf3, 0x14,
- 0x53, 0x78, 0x8a, 0xa9, 0xdd, 0x26, 0x0f, 0xe9, 0x4e, 0xeb, 0xd7, 0x9c, 0xcc, 0xb0, 0x05, 0x66,
- 0x52, 0xe6, 0x71, 0xa7, 0x51, 0x18, 0x32, 0xc5, 0x5d, 0x50, 0xd4, 0x87, 0x6f, 0xf2, 0xfa, 0xb1,
- 0x94, 0xf5, 0x63, 0x29, 0x4d, 0xa2, 0x0f, 0xda, 0x64, 0x8e, 0xf1, 0x14, 0x8e, 0xf1, 0xe4, 0x36,
- 0xf4, 0x89, 0xda, 0x69, 0x14, 0x05, 0x99, 0x22, 0x04, 0xe7, 0xfa, 0x8c, 0xcc, 0x52, 0xa8, 0xde,
- 0x91, 0xa9, 0x5e, 0xe3, 0x7d, 0x95, 0xe4, 0xf3, 0x18, 0x9c, 0xef, 0x37, 0x33, 0x4b, 0x71, 0xba,
- 0xa6, 0x3a, 0xed, 0xfb, 0x0a, 0x4b, 0x72, 0xd4, 0xa4, 0x0d, 0x97, 0x36, 0x2b, 0x4b, 0x71, 0x72,
- 0x47, 0x76, 0x32, 0xe8, 0x4b, 0x2d, 0xc9, 0x9b, 0x07, 0xce, 0x66, 0xce, 0xcb, 0x52, 0xdc, 0xad,
- 0xa8, 0xee, 0xb2, 0x5f, 0x75, 0xc5, 0x2e, 0x96, 0x6e, 0x03, 0x20, 0x4d, 0xf6, 0x46, 0x81, 0x59,
- 0xdd, 0xdb, 0x2b, 0x0e, 0xe1, 0x5f, 0xca, 0x5b, 0x6e, 0xd1, 0xa0, 0xbf, 0x3c, 0x2f, 0xe6, 0xb0,
- 0xbb, 0xdd, 0xca, 0xc3, 0xe2, 0x7f, 0xf9, 0x7f, 0x46, 0x79, 0x42, 0x8c, 0xa2, 0xf0, 0xa9, 0xb2,
- 0xf4, 0x06, 0x98, 0xd4, 0x06, 0x92, 0x05, 0x60, 0xd4, 0xf9, 0x81, 0x52, 0xbf, 0x76, 0x13, 0x80,
- 0xf8, 0xdf, 0x30, 0xc1, 0x29, 0x90, 0x3f, 0xd8, 0xdd, 0x7f, 0x52, 0xb9, 0xbf, 0x53, 0xdd, 0xa9,
- 0x3c, 0x28, 0x0e, 0xc1, 0x02, 0x18, 0x7b, 0xe2, 0xee, 0x3d, 0xdd, 0x2b, 0x1f, 0x54, 0x8b, 0x06,
- 0x1c, 0x03, 0xc3, 0x8f, 0xf6, 0xf7, 0x76, 0x8b, 0xb9, 0x6b, 0xf7, 0x40, 0x5e, 0x9e, 0x07, 0x4e,
- 0x81, 0x7c, 0x75, 0xcf, 0xad, 0xec, 0x3c, 0xdc, 0xad, 0xd1, 0x48, 0x25, 0x03, 0x8d, 0x58, 0x31,
- 0x3c, 0x2f, 0xe6, 0xca, 0x17, 0xc1, 0x85, 0x7a, 0xd0, 0x4a, 0xfc, 0x61, 0x26, 0x25, 0xe7, 0xc5,
- 0x08, 0xb1, 0x6e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x33, 0xc2, 0x0c, 0xb6, 0xeb, 0x26, 0x00,
- 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto b/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto
deleted file mode 100644
index 95a8fd135..000000000
--- a/vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto
+++ /dev/null
@@ -1,285 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-package conformance;
-option java_package = "com.google.protobuf.conformance";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/duration.proto";
-import "google/protobuf/field_mask.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/timestamp.proto";
-import "google/protobuf/wrappers.proto";
-
-// This defines the conformance testing protocol. This protocol exists between
-// the conformance test suite itself and the code being tested. For each test,
-// the suite will send a ConformanceRequest message and expect a
-// ConformanceResponse message.
-//
-// You can either run the tests in two different ways:
-//
-// 1. in-process (using the interface in conformance_test.h).
-//
-// 2. as a sub-process communicating over a pipe. Information about how to
-// do this is in conformance_test_runner.cc.
-//
-// Pros/cons of the two approaches:
-//
-// - running as a sub-process is much simpler for languages other than C/C++.
-//
-// - running as a sub-process may be more tricky in unusual environments like
-// iOS apps, where fork/stdin/stdout are not available.
-
-enum WireFormat {
- UNSPECIFIED = 0;
- PROTOBUF = 1;
- JSON = 2;
-}
-
-// Represents a single test case's input. The testee should:
-//
-// 1. parse this proto (which should always succeed)
-// 2. parse the protobuf or JSON payload in "payload" (which may fail)
-// 3. if the parse succeeded, serialize the message in the requested format.
-message ConformanceRequest {
- // The payload (whether protobuf of JSON) is always for a TestAllTypes proto
- // (see below).
- oneof payload {
- bytes protobuf_payload = 1;
- string json_payload = 2;
- }
-
- // Which format should the testee serialize its message to?
- WireFormat requested_output_format = 3;
-}
-
-// Represents a single test case's output.
-message ConformanceResponse {
- oneof result {
- // This string should be set to indicate parsing failed. The string can
- // provide more information about the parse error if it is available.
- //
- // Setting this string does not necessarily mean the testee failed the
- // test. Some of the test cases are intentionally invalid input.
- string parse_error = 1;
-
- // If the input was successfully parsed but errors occurred when
- // serializing it to the requested output format, set the error message in
- // this field.
- string serialize_error = 6;
-
- // This should be set if some other error occurred. This will always
- // indicate that the test failed. The string can provide more information
- // about the failure.
- string runtime_error = 2;
-
- // If the input was successfully parsed and the requested output was
- // protobuf, serialize it to protobuf and set it in this field.
- bytes protobuf_payload = 3;
-
- // If the input was successfully parsed and the requested output was JSON,
- // serialize to JSON and set it in this field.
- string json_payload = 4;
-
- // For when the testee skipped the test, likely because a certain feature
- // wasn't supported, like JSON input/output.
- string skipped = 5;
- }
-}
-
-// This proto includes every type of field in both singular and repeated
-// forms.
-message TestAllTypes {
- message NestedMessage {
- int32 a = 1;
- TestAllTypes corecursive = 2;
- }
-
- enum NestedEnum {
- FOO = 0;
- BAR = 1;
- BAZ = 2;
- NEG = -1; // Intentionally negative.
- }
-
- // Singular
- int32 optional_int32 = 1;
- int64 optional_int64 = 2;
- uint32 optional_uint32 = 3;
- uint64 optional_uint64 = 4;
- sint32 optional_sint32 = 5;
- sint64 optional_sint64 = 6;
- fixed32 optional_fixed32 = 7;
- fixed64 optional_fixed64 = 8;
- sfixed32 optional_sfixed32 = 9;
- sfixed64 optional_sfixed64 = 10;
- float optional_float = 11;
- double optional_double = 12;
- bool optional_bool = 13;
- string optional_string = 14;
- bytes optional_bytes = 15;
-
- NestedMessage optional_nested_message = 18;
- ForeignMessage optional_foreign_message = 19;
-
- NestedEnum optional_nested_enum = 21;
- ForeignEnum optional_foreign_enum = 22;
-
- string optional_string_piece = 24 [ctype=STRING_PIECE];
- string optional_cord = 25 [ctype=CORD];
-
- TestAllTypes recursive_message = 27;
-
- // Repeated
- repeated int32 repeated_int32 = 31;
- repeated int64 repeated_int64 = 32;
- repeated uint32 repeated_uint32 = 33;
- repeated uint64 repeated_uint64 = 34;
- repeated sint32 repeated_sint32 = 35;
- repeated sint64 repeated_sint64 = 36;
- repeated fixed32 repeated_fixed32 = 37;
- repeated fixed64 repeated_fixed64 = 38;
- repeated sfixed32 repeated_sfixed32 = 39;
- repeated sfixed64 repeated_sfixed64 = 40;
- repeated float repeated_float = 41;
- repeated double repeated_double = 42;
- repeated bool repeated_bool = 43;
- repeated string repeated_string = 44;
- repeated bytes repeated_bytes = 45;
-
- repeated NestedMessage repeated_nested_message = 48;
- repeated ForeignMessage repeated_foreign_message = 49;
-
- repeated NestedEnum repeated_nested_enum = 51;
- repeated ForeignEnum repeated_foreign_enum = 52;
-
- repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
- repeated string repeated_cord = 55 [ctype=CORD];
-
- // Map
- map < int32, int32> map_int32_int32 = 56;
- map < int64, int64> map_int64_int64 = 57;
- map < uint32, uint32> map_uint32_uint32 = 58;
- map < uint64, uint64> map_uint64_uint64 = 59;
- map < sint32, sint32> map_sint32_sint32 = 60;
- map < sint64, sint64> map_sint64_sint64 = 61;
- map < fixed32, fixed32> map_fixed32_fixed32 = 62;
- map < fixed64, fixed64> map_fixed64_fixed64 = 63;
- map <sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
- map <sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
- map < int32, float> map_int32_float = 66;
- map < int32, double> map_int32_double = 67;
- map < bool, bool> map_bool_bool = 68;
- map < string, string> map_string_string = 69;
- map < string, bytes> map_string_bytes = 70;
- map < string, NestedMessage> map_string_nested_message = 71;
- map < string, ForeignMessage> map_string_foreign_message = 72;
- map < string, NestedEnum> map_string_nested_enum = 73;
- map < string, ForeignEnum> map_string_foreign_enum = 74;
-
- oneof oneof_field {
- uint32 oneof_uint32 = 111;
- NestedMessage oneof_nested_message = 112;
- string oneof_string = 113;
- bytes oneof_bytes = 114;
- bool oneof_bool = 115;
- uint64 oneof_uint64 = 116;
- float oneof_float = 117;
- double oneof_double = 118;
- NestedEnum oneof_enum = 119;
- }
-
- // Well-known types
- google.protobuf.BoolValue optional_bool_wrapper = 201;
- google.protobuf.Int32Value optional_int32_wrapper = 202;
- google.protobuf.Int64Value optional_int64_wrapper = 203;
- google.protobuf.UInt32Value optional_uint32_wrapper = 204;
- google.protobuf.UInt64Value optional_uint64_wrapper = 205;
- google.protobuf.FloatValue optional_float_wrapper = 206;
- google.protobuf.DoubleValue optional_double_wrapper = 207;
- google.protobuf.StringValue optional_string_wrapper = 208;
- google.protobuf.BytesValue optional_bytes_wrapper = 209;
-
- repeated google.protobuf.BoolValue repeated_bool_wrapper = 211;
- repeated google.protobuf.Int32Value repeated_int32_wrapper = 212;
- repeated google.protobuf.Int64Value repeated_int64_wrapper = 213;
- repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214;
- repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215;
- repeated google.protobuf.FloatValue repeated_float_wrapper = 216;
- repeated google.protobuf.DoubleValue repeated_double_wrapper = 217;
- repeated google.protobuf.StringValue repeated_string_wrapper = 218;
- repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219;
-
- google.protobuf.Duration optional_duration = 301;
- google.protobuf.Timestamp optional_timestamp = 302;
- google.protobuf.FieldMask optional_field_mask = 303;
- google.protobuf.Struct optional_struct = 304;
- google.protobuf.Any optional_any = 305;
- google.protobuf.Value optional_value = 306;
-
- repeated google.protobuf.Duration repeated_duration = 311;
- repeated google.protobuf.Timestamp repeated_timestamp = 312;
- repeated google.protobuf.FieldMask repeated_fieldmask = 313;
- repeated google.protobuf.Struct repeated_struct = 324;
- repeated google.protobuf.Any repeated_any = 315;
- repeated google.protobuf.Value repeated_value = 316;
-
- // Test field-name-to-JSON-name convention.
- // (protobuf says names can be any valid C/C++ identifier.)
- int32 fieldname1 = 401;
- int32 field_name2 = 402;
- int32 _field_name3 = 403;
- int32 field__name4_ = 404;
- int32 field0name5 = 405;
- int32 field_0_name6 = 406;
- int32 fieldName7 = 407;
- int32 FieldName8 = 408;
- int32 field_Name9 = 409;
- int32 Field_Name10 = 410;
- int32 FIELD_NAME11 = 411;
- int32 FIELD_name12 = 412;
- int32 __field_name13 = 413;
- int32 __Field_name14 = 414;
- int32 field__name15 = 415;
- int32 field__Name16 = 416;
- int32 field_name17__ = 417;
- int32 Field_name18__ = 418;
-}
-
-message ForeignMessage {
- int32 c = 1;
-}
-
-enum ForeignEnum {
- FOREIGN_FOO = 0;
- FOREIGN_BAR = 1;
- FOREIGN_BAZ = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/descriptor/descriptor.go b/vendor/github.com/golang/protobuf/descriptor/descriptor.go
deleted file mode 100644
index ac7e51bfb..000000000
--- a/vendor/github.com/golang/protobuf/descriptor/descriptor.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Package descriptor provides functions for obtaining protocol buffer
-// descriptors for generated Go types.
-//
-// These functions cannot go in package proto because they depend on the
-// generated protobuf descriptor messages, which themselves depend on proto.
-package descriptor
-
-import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io/ioutil"
-
- "github.com/golang/protobuf/proto"
- protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
-)
-
-// extractFile extracts a FileDescriptorProto from a gzip'd buffer.
-func extractFile(gz []byte) (*protobuf.FileDescriptorProto, error) {
- r, err := gzip.NewReader(bytes.NewReader(gz))
- if err != nil {
- return nil, fmt.Errorf("failed to open gzip reader: %v", err)
- }
- defer r.Close()
-
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, fmt.Errorf("failed to uncompress descriptor: %v", err)
- }
-
- fd := new(protobuf.FileDescriptorProto)
- if err := proto.Unmarshal(b, fd); err != nil {
- return nil, fmt.Errorf("malformed FileDescriptorProto: %v", err)
- }
-
- return fd, nil
-}
-
-// Message is a proto.Message with a method to return its descriptor.
-//
-// Message types generated by the protocol compiler always satisfy
-// the Message interface.
-type Message interface {
- proto.Message
- Descriptor() ([]byte, []int)
-}
-
-// ForMessage returns a FileDescriptorProto and a DescriptorProto from within it
-// describing the given message.
-func ForMessage(msg Message) (fd *protobuf.FileDescriptorProto, md *protobuf.DescriptorProto) {
- gz, path := msg.Descriptor()
- fd, err := extractFile(gz)
- if err != nil {
- panic(fmt.Sprintf("invalid FileDescriptorProto for %T: %v", msg, err))
- }
-
- md = fd.MessageType[path[0]]
- for _, i := range path[1:] {
- md = md.NestedType[i]
- }
- return fd, md
-}
diff --git a/vendor/github.com/golang/protobuf/descriptor/descriptor_test.go b/vendor/github.com/golang/protobuf/descriptor/descriptor_test.go
deleted file mode 100644
index 27b0729cb..000000000
--- a/vendor/github.com/golang/protobuf/descriptor/descriptor_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package descriptor_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/golang/protobuf/descriptor"
- tpb "github.com/golang/protobuf/proto/testdata"
- protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
-)
-
-func TestMessage(t *testing.T) {
- var msg *protobuf.DescriptorProto
- fd, md := descriptor.ForMessage(msg)
- if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want {
- t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want)
- }
- if name, want := md.GetName(), "DescriptorProto"; name != want {
- t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want)
- }
-}
-
-func Example_Options() {
- var msg *tpb.MyMessageSet
- _, md := descriptor.ForMessage(msg)
- if md.GetOptions().GetMessageSetWireFormat() {
- fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName())
- }
-
- // Output:
- // MyMessageSet uses option message_set_wire_format.
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
deleted file mode 100644
index 110ae1384..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
+++ /dev/null
@@ -1,1083 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-/*
-Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
-It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json.
-
-This package produces a different output than the standard "encoding/json" package,
-which does not operate correctly on protocol buffers.
-*/
-package jsonpb
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "math"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/golang/protobuf/proto"
-
- stpb "github.com/golang/protobuf/ptypes/struct"
-)
-
-// Marshaler is a configurable object for converting between
-// protocol buffer objects and a JSON representation for them.
-type Marshaler struct {
- // Whether to render enum values as integers, as opposed to string values.
- EnumsAsInts bool
-
- // Whether to render fields with zero values.
- EmitDefaults bool
-
- // A string to indent each level by. The presence of this field will
- // also cause a space to appear between the field separator and
- // value, and for newlines to be appear between fields and array
- // elements.
- Indent string
-
- // Whether to use the original (.proto) name for fields.
- OrigName bool
-
- // A custom URL resolver to use when marshaling Any messages to JSON.
- // If unset, the default resolution strategy is to extract the
- // fully-qualified type name from the type URL and pass that to
- // proto.MessageType(string).
- AnyResolver AnyResolver
-}
-
-// AnyResolver takes a type URL, present in an Any message, and resolves it into
-// an instance of the associated message.
-type AnyResolver interface {
- Resolve(typeUrl string) (proto.Message, error)
-}
-
-func defaultResolveAny(typeUrl string) (proto.Message, error) {
- // Only the part of typeUrl after the last slash is relevant.
- mname := typeUrl
- if slash := strings.LastIndex(mname, "/"); slash >= 0 {
- mname = mname[slash+1:]
- }
- mt := proto.MessageType(mname)
- if mt == nil {
- return nil, fmt.Errorf("unknown message type %q", mname)
- }
- return reflect.New(mt.Elem()).Interface().(proto.Message), nil
-}
-
-// JSONPBMarshaler is implemented by protobuf messages that customize the
-// way they are marshaled to JSON. Messages that implement this should
-// also implement JSONPBUnmarshaler so that the custom format can be
-// parsed.
-type JSONPBMarshaler interface {
- MarshalJSONPB(*Marshaler) ([]byte, error)
-}
-
-// JSONPBUnmarshaler is implemented by protobuf messages that customize
-// the way they are unmarshaled from JSON. Messages that implement this
-// should also implement JSONPBMarshaler so that the custom format can be
-// produced.
-type JSONPBUnmarshaler interface {
- UnmarshalJSONPB(*Unmarshaler, []byte) error
-}
-
-// Marshal marshals a protocol buffer into JSON.
-func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error {
- writer := &errWriter{writer: out}
- return m.marshalObject(writer, pb, "", "")
-}
-
-// MarshalToString converts a protocol buffer object to JSON string.
-func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) {
- var buf bytes.Buffer
- if err := m.Marshal(&buf, pb); err != nil {
- return "", err
- }
- return buf.String(), nil
-}
-
-type int32Slice []int32
-
-var nonFinite = map[string]float64{
- `"NaN"`: math.NaN(),
- `"Infinity"`: math.Inf(1),
- `"-Infinity"`: math.Inf(-1),
-}
-
-// For sorting extensions ids to ensure stable output.
-func (s int32Slice) Len() int { return len(s) }
-func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
-func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-type wkt interface {
- XXX_WellKnownType() string
-}
-
-// marshalObject writes a struct to the Writer.
-func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error {
- if jsm, ok := v.(JSONPBMarshaler); ok {
- b, err := jsm.MarshalJSONPB(m)
- if err != nil {
- return err
- }
- if typeURL != "" {
- // we are marshaling this object to an Any type
- var js map[string]*json.RawMessage
- if err = json.Unmarshal(b, &js); err != nil {
- return fmt.Errorf("type %T produced invalid JSON: %v", v, err)
- }
- turl, err := json.Marshal(typeURL)
- if err != nil {
- return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err)
- }
- js["@type"] = (*json.RawMessage)(&turl)
- if b, err = json.Marshal(js); err != nil {
- return err
- }
- }
-
- out.write(string(b))
- return out.err
- }
-
- s := reflect.ValueOf(v).Elem()
-
- // Handle well-known types.
- if wkt, ok := v.(wkt); ok {
- switch wkt.XXX_WellKnownType() {
- case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value",
- "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue":
- // "Wrappers use the same representation in JSON
- // as the wrapped primitive type, ..."
- sprop := proto.GetProperties(s.Type())
- return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent)
- case "Any":
- // Any is a bit more involved.
- return m.marshalAny(out, v, indent)
- case "Duration":
- // "Generated output always contains 3, 6, or 9 fractional digits,
- // depending on required precision."
- s, ns := s.Field(0).Int(), s.Field(1).Int()
- d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond
- x := fmt.Sprintf("%.9f", d.Seconds())
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, "000")
- out.write(`"`)
- out.write(x)
- out.write(`s"`)
- return out.err
- case "Struct", "ListValue":
- // Let marshalValue handle the `Struct.fields` map or the `ListValue.values` slice.
- // TODO: pass the correct Properties if needed.
- return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent)
- case "Timestamp":
- // "RFC 3339, where generated output will always be Z-normalized
- // and uses 3, 6 or 9 fractional digits."
- s, ns := s.Field(0).Int(), s.Field(1).Int()
- t := time.Unix(s, ns).UTC()
- // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits).
- x := t.Format("2006-01-02T15:04:05.000000000")
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, "000")
- out.write(`"`)
- out.write(x)
- out.write(`Z"`)
- return out.err
- case "Value":
- // Value has a single oneof.
- kind := s.Field(0)
- if kind.IsNil() {
- // "absence of any variant indicates an error"
- return errors.New("nil Value")
- }
- // oneof -> *T -> T -> T.F
- x := kind.Elem().Elem().Field(0)
- // TODO: pass the correct Properties if needed.
- return m.marshalValue(out, &proto.Properties{}, x, indent)
- }
- }
-
- out.write("{")
- if m.Indent != "" {
- out.write("\n")
- }
-
- firstField := true
-
- if typeURL != "" {
- if err := m.marshalTypeURL(out, indent, typeURL); err != nil {
- return err
- }
- firstField = false
- }
-
- for i := 0; i < s.NumField(); i++ {
- value := s.Field(i)
- valueField := s.Type().Field(i)
- if strings.HasPrefix(valueField.Name, "XXX_") {
- continue
- }
-
- // IsNil will panic on most value kinds.
- switch value.Kind() {
- case reflect.Chan, reflect.Func, reflect.Interface:
- if value.IsNil() {
- continue
- }
- }
-
- if !m.EmitDefaults {
- switch value.Kind() {
- case reflect.Bool:
- if !value.Bool() {
- continue
- }
- case reflect.Int32, reflect.Int64:
- if value.Int() == 0 {
- continue
- }
- case reflect.Uint32, reflect.Uint64:
- if value.Uint() == 0 {
- continue
- }
- case reflect.Float32, reflect.Float64:
- if value.Float() == 0 {
- continue
- }
- case reflect.String:
- if value.Len() == 0 {
- continue
- }
- case reflect.Map, reflect.Ptr, reflect.Slice:
- if value.IsNil() {
- continue
- }
- }
- }
-
- // Oneof fields need special handling.
- if valueField.Tag.Get("protobuf_oneof") != "" {
- // value is an interface containing &T{real_value}.
- sv := value.Elem().Elem() // interface -> *T -> T
- value = sv.Field(0)
- valueField = sv.Type().Field(0)
- }
- prop := jsonProperties(valueField, m.OrigName)
- if !firstField {
- m.writeSep(out)
- }
- if err := m.marshalField(out, prop, value, indent); err != nil {
- return err
- }
- firstField = false
- }
-
- // Handle proto2 extensions.
- if ep, ok := v.(proto.Message); ok {
- extensions := proto.RegisteredExtensions(v)
- // Sort extensions for stable output.
- ids := make([]int32, 0, len(extensions))
- for id, desc := range extensions {
- if !proto.HasExtension(ep, desc) {
- continue
- }
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids))
- for _, id := range ids {
- desc := extensions[id]
- if desc == nil {
- // unknown extension
- continue
- }
- ext, extErr := proto.GetExtension(ep, desc)
- if extErr != nil {
- return extErr
- }
- value := reflect.ValueOf(ext)
- var prop proto.Properties
- prop.Parse(desc.Tag)
- prop.JSONName = fmt.Sprintf("[%s]", desc.Name)
- if !firstField {
- m.writeSep(out)
- }
- if err := m.marshalField(out, &prop, value, indent); err != nil {
- return err
- }
- firstField = false
- }
-
- }
-
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- }
- out.write("}")
- return out.err
-}
-
-func (m *Marshaler) writeSep(out *errWriter) {
- if m.Indent != "" {
- out.write(",\n")
- } else {
- out.write(",")
- }
-}
-
-func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error {
- // "If the Any contains a value that has a special JSON mapping,
- // it will be converted as follows: {"@type": xxx, "value": yyy}.
- // Otherwise, the value will be converted into a JSON object,
- // and the "@type" field will be inserted to indicate the actual data type."
- v := reflect.ValueOf(any).Elem()
- turl := v.Field(0).String()
- val := v.Field(1).Bytes()
-
- var msg proto.Message
- var err error
- if m.AnyResolver != nil {
- msg, err = m.AnyResolver.Resolve(turl)
- } else {
- msg, err = defaultResolveAny(turl)
- }
- if err != nil {
- return err
- }
-
- if err := proto.Unmarshal(val, msg); err != nil {
- return err
- }
-
- if _, ok := msg.(wkt); ok {
- out.write("{")
- if m.Indent != "" {
- out.write("\n")
- }
- if err := m.marshalTypeURL(out, indent, turl); err != nil {
- return err
- }
- m.writeSep(out)
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- out.write(`"value": `)
- } else {
- out.write(`"value":`)
- }
- if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil {
- return err
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- }
- out.write("}")
- return out.err
- }
-
- return m.marshalObject(out, msg, indent, turl)
-}
-
-func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error {
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`"@type":`)
- if m.Indent != "" {
- out.write(" ")
- }
- b, err := json.Marshal(typeURL)
- if err != nil {
- return err
- }
- out.write(string(b))
- return out.err
-}
-
-// marshalField writes field description and value to the Writer.
-func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error {
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`"`)
- out.write(prop.JSONName)
- out.write(`":`)
- if m.Indent != "" {
- out.write(" ")
- }
- if err := m.marshalValue(out, prop, v, indent); err != nil {
- return err
- }
- return nil
-}
-
-// marshalValue writes the value to the Writer.
-func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error {
- var err error
- v = reflect.Indirect(v)
-
- // Handle nil pointer
- if v.Kind() == reflect.Invalid {
- out.write("null")
- return out.err
- }
-
- // Handle repeated elements.
- if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 {
- out.write("[")
- comma := ""
- for i := 0; i < v.Len(); i++ {
- sliceVal := v.Index(i)
- out.write(comma)
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- out.write(m.Indent)
- }
- if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil {
- return err
- }
- comma = ","
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- }
- out.write("]")
- return out.err
- }
-
- // Handle well-known types.
- // Most are handled up in marshalObject (because 99% are messages).
- if wkt, ok := v.Interface().(wkt); ok {
- switch wkt.XXX_WellKnownType() {
- case "NullValue":
- out.write("null")
- return out.err
- }
- }
-
- // Handle enumerations.
- if !m.EnumsAsInts && prop.Enum != "" {
- // Unknown enum values will are stringified by the proto library as their
- // value. Such values should _not_ be quoted or they will be interpreted
- // as an enum string instead of their value.
- enumStr := v.Interface().(fmt.Stringer).String()
- var valStr string
- if v.Kind() == reflect.Ptr {
- valStr = strconv.Itoa(int(v.Elem().Int()))
- } else {
- valStr = strconv.Itoa(int(v.Int()))
- }
- isKnownEnum := enumStr != valStr
- if isKnownEnum {
- out.write(`"`)
- }
- out.write(enumStr)
- if isKnownEnum {
- out.write(`"`)
- }
- return out.err
- }
-
- // Handle nested messages.
- if v.Kind() == reflect.Struct {
- return m.marshalObject(out, v.Addr().Interface().(proto.Message), indent+m.Indent, "")
- }
-
- // Handle maps.
- // Since Go randomizes map iteration, we sort keys for stable output.
- if v.Kind() == reflect.Map {
- out.write(`{`)
- keys := v.MapKeys()
- sort.Sort(mapKeys(keys))
- for i, k := range keys {
- if i > 0 {
- out.write(`,`)
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- out.write(m.Indent)
- }
-
- b, err := json.Marshal(k.Interface())
- if err != nil {
- return err
- }
- s := string(b)
-
- // If the JSON is not a string value, encode it again to make it one.
- if !strings.HasPrefix(s, `"`) {
- b, err := json.Marshal(s)
- if err != nil {
- return err
- }
- s = string(b)
- }
-
- out.write(s)
- out.write(`:`)
- if m.Indent != "" {
- out.write(` `)
- }
-
- if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil {
- return err
- }
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`}`)
- return out.err
- }
-
- // Handle non-finite floats, e.g. NaN, Infinity and -Infinity.
- if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
- f := v.Float()
- var sval string
- switch {
- case math.IsInf(f, 1):
- sval = `"Infinity"`
- case math.IsInf(f, -1):
- sval = `"-Infinity"`
- case math.IsNaN(f):
- sval = `"NaN"`
- }
- if sval != "" {
- out.write(sval)
- return out.err
- }
- }
-
- // Default handling defers to the encoding/json library.
- b, err := json.Marshal(v.Interface())
- if err != nil {
- return err
- }
- needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64)
- if needToQuote {
- out.write(`"`)
- }
- out.write(string(b))
- if needToQuote {
- out.write(`"`)
- }
- return out.err
-}
-
-// Unmarshaler is a configurable object for converting from a JSON
-// representation to a protocol buffer object.
-type Unmarshaler struct {
- // Whether to allow messages to contain unknown fields, as opposed to
- // failing to unmarshal.
- AllowUnknownFields bool
-
- // A custom URL resolver to use when unmarshaling Any messages from JSON.
- // If unset, the default resolution strategy is to extract the
- // fully-qualified type name from the type URL and pass that to
- // proto.MessageType(string).
- AnyResolver AnyResolver
-}
-
-// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream.
-// This function is lenient and will decode any options permutations of the
-// related Marshaler.
-func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error {
- inputValue := json.RawMessage{}
- if err := dec.Decode(&inputValue); err != nil {
- return err
- }
- return u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil)
-}
-
-// Unmarshal unmarshals a JSON object stream into a protocol
-// buffer. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error {
- dec := json.NewDecoder(r)
- return u.UnmarshalNext(dec, pb)
-}
-
-// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream.
-// This function is lenient and will decode any options permutations of the
-// related Marshaler.
-func UnmarshalNext(dec *json.Decoder, pb proto.Message) error {
- return new(Unmarshaler).UnmarshalNext(dec, pb)
-}
-
-// Unmarshal unmarshals a JSON object stream into a protocol
-// buffer. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func Unmarshal(r io.Reader, pb proto.Message) error {
- return new(Unmarshaler).Unmarshal(r, pb)
-}
-
-// UnmarshalString will populate the fields of a protocol buffer based
-// on a JSON string. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func UnmarshalString(str string, pb proto.Message) error {
- return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb)
-}
-
-// unmarshalValue converts/copies a value into the target.
-// prop may be nil.
-func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error {
- targetType := target.Type()
-
- // Allocate memory for pointer fields.
- if targetType.Kind() == reflect.Ptr {
- // If input value is "null" and target is a pointer type, then the field should be treated as not set
- // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue.
- _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler)
- if string(inputValue) == "null" && targetType != reflect.TypeOf(&stpb.Value{}) && !isJSONPBUnmarshaler {
- return nil
- }
- target.Set(reflect.New(targetType.Elem()))
-
- return u.unmarshalValue(target.Elem(), inputValue, prop)
- }
-
- if jsu, ok := target.Addr().Interface().(JSONPBUnmarshaler); ok {
- return jsu.UnmarshalJSONPB(u, []byte(inputValue))
- }
-
- // Handle well-known types that are not pointers.
- if w, ok := target.Addr().Interface().(wkt); ok {
- switch w.XXX_WellKnownType() {
- case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value",
- "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue":
- return u.unmarshalValue(target.Field(0), inputValue, prop)
- case "Any":
- // Use json.RawMessage pointer type instead of value to support pre-1.8 version.
- // 1.8 changed RawMessage.MarshalJSON from pointer type to value type, see
- // https://github.com/golang/go/issues/14493
- var jsonFields map[string]*json.RawMessage
- if err := json.Unmarshal(inputValue, &jsonFields); err != nil {
- return err
- }
-
- val, ok := jsonFields["@type"]
- if !ok || val == nil {
- return errors.New("Any JSON doesn't have '@type'")
- }
-
- var turl string
- if err := json.Unmarshal([]byte(*val), &turl); err != nil {
- return fmt.Errorf("can't unmarshal Any's '@type': %q", *val)
- }
- target.Field(0).SetString(turl)
-
- var m proto.Message
- var err error
- if u.AnyResolver != nil {
- m, err = u.AnyResolver.Resolve(turl)
- } else {
- m, err = defaultResolveAny(turl)
- }
- if err != nil {
- return err
- }
-
- if _, ok := m.(wkt); ok {
- val, ok := jsonFields["value"]
- if !ok {
- return errors.New("Any JSON doesn't have 'value'")
- }
-
- if err := u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil {
- return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err)
- }
- } else {
- delete(jsonFields, "@type")
- nestedProto, err := json.Marshal(jsonFields)
- if err != nil {
- return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", err)
- }
-
- if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil {
- return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err)
- }
- }
-
- b, err := proto.Marshal(m)
- if err != nil {
- return fmt.Errorf("can't marshal proto %T into Any.Value: %v", m, err)
- }
- target.Field(1).SetBytes(b)
-
- return nil
- case "Duration":
- unq, err := strconv.Unquote(string(inputValue))
- if err != nil {
- return err
- }
-
- d, err := time.ParseDuration(unq)
- if err != nil {
- return fmt.Errorf("bad Duration: %v", err)
- }
-
- ns := d.Nanoseconds()
- s := ns / 1e9
- ns %= 1e9
- target.Field(0).SetInt(s)
- target.Field(1).SetInt(ns)
- return nil
- case "Timestamp":
- unq, err := strconv.Unquote(string(inputValue))
- if err != nil {
- return err
- }
-
- t, err := time.Parse(time.RFC3339Nano, unq)
- if err != nil {
- return fmt.Errorf("bad Timestamp: %v", err)
- }
-
- target.Field(0).SetInt(t.Unix())
- target.Field(1).SetInt(int64(t.Nanosecond()))
- return nil
- case "Struct":
- var m map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &m); err != nil {
- return fmt.Errorf("bad StructValue: %v", err)
- }
-
- target.Field(0).Set(reflect.ValueOf(map[string]*stpb.Value{}))
- for k, jv := range m {
- pv := &stpb.Value{}
- if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil {
- return fmt.Errorf("bad value in StructValue for key %q: %v", k, err)
- }
- target.Field(0).SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(pv))
- }
- return nil
- case "ListValue":
- var s []json.RawMessage
- if err := json.Unmarshal(inputValue, &s); err != nil {
- return fmt.Errorf("bad ListValue: %v", err)
- }
-
- target.Field(0).Set(reflect.ValueOf(make([]*stpb.Value, len(s), len(s))))
- for i, sv := range s {
- if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil {
- return err
- }
- }
- return nil
- case "Value":
- ivStr := string(inputValue)
- if ivStr == "null" {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_NullValue{}))
- } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_NumberValue{v}))
- } else if v, err := strconv.Unquote(ivStr); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_StringValue{v}))
- } else if v, err := strconv.ParseBool(ivStr); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_BoolValue{v}))
- } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil {
- lv := &stpb.ListValue{}
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_ListValue{lv}))
- return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop)
- } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil {
- sv := &stpb.Struct{}
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_StructValue{sv}))
- return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop)
- } else {
- return fmt.Errorf("unrecognized type for Value %q", ivStr)
- }
- return nil
- }
- }
-
- // Handle enums, which have an underlying type of int32,
- // and may appear as strings.
- // The case of an enum appearing as a number is handled
- // at the bottom of this function.
- if inputValue[0] == '"' && prop != nil && prop.Enum != "" {
- vmap := proto.EnumValueMap(prop.Enum)
- // Don't need to do unquoting; valid enum names
- // are from a limited character set.
- s := inputValue[1 : len(inputValue)-1]
- n, ok := vmap[string(s)]
- if !ok {
- return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum)
- }
- if target.Kind() == reflect.Ptr { // proto2
- target.Set(reflect.New(targetType.Elem()))
- target = target.Elem()
- }
- target.SetInt(int64(n))
- return nil
- }
-
- // Handle nested messages.
- if targetType.Kind() == reflect.Struct {
- var jsonFields map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &jsonFields); err != nil {
- return err
- }
-
- consumeField := func(prop *proto.Properties) (json.RawMessage, bool) {
- // Be liberal in what names we accept; both orig_name and camelName are okay.
- fieldNames := acceptedJSONFieldNames(prop)
-
- vOrig, okOrig := jsonFields[fieldNames.orig]
- vCamel, okCamel := jsonFields[fieldNames.camel]
- if !okOrig && !okCamel {
- return nil, false
- }
- // If, for some reason, both are present in the data, favour the camelName.
- var raw json.RawMessage
- if okOrig {
- raw = vOrig
- delete(jsonFields, fieldNames.orig)
- }
- if okCamel {
- raw = vCamel
- delete(jsonFields, fieldNames.camel)
- }
- return raw, true
- }
-
- sprops := proto.GetProperties(targetType)
- for i := 0; i < target.NumField(); i++ {
- ft := target.Type().Field(i)
- if strings.HasPrefix(ft.Name, "XXX_") {
- continue
- }
-
- valueForField, ok := consumeField(sprops.Prop[i])
- if !ok {
- continue
- }
-
- if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil {
- return err
- }
- }
- // Check for any oneof fields.
- if len(jsonFields) > 0 {
- for _, oop := range sprops.OneofTypes {
- raw, ok := consumeField(oop.Prop)
- if !ok {
- continue
- }
- nv := reflect.New(oop.Type.Elem())
- target.Field(oop.Field).Set(nv)
- if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil {
- return err
- }
- }
- }
- // Handle proto2 extensions.
- if len(jsonFields) > 0 {
- if ep, ok := target.Addr().Interface().(proto.Message); ok {
- for _, ext := range proto.RegisteredExtensions(ep) {
- name := fmt.Sprintf("[%s]", ext.Name)
- raw, ok := jsonFields[name]
- if !ok {
- continue
- }
- delete(jsonFields, name)
- nv := reflect.New(reflect.TypeOf(ext.ExtensionType).Elem())
- if err := u.unmarshalValue(nv.Elem(), raw, nil); err != nil {
- return err
- }
- if err := proto.SetExtension(ep, ext, nv.Interface()); err != nil {
- return err
- }
- }
- }
- }
- if !u.AllowUnknownFields && len(jsonFields) > 0 {
- // Pick any field to be the scapegoat.
- var f string
- for fname := range jsonFields {
- f = fname
- break
- }
- return fmt.Errorf("unknown field %q in %v", f, targetType)
- }
- return nil
- }
-
- // Handle arrays (which aren't encoded bytes)
- if targetType.Kind() == reflect.Slice && targetType.Elem().Kind() != reflect.Uint8 {
- var slc []json.RawMessage
- if err := json.Unmarshal(inputValue, &slc); err != nil {
- return err
- }
- if slc != nil {
- l := len(slc)
- target.Set(reflect.MakeSlice(targetType, l, l))
- for i := 0; i < l; i++ {
- if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil {
- return err
- }
- }
- }
- return nil
- }
-
- // Handle maps (whose keys are always strings)
- if targetType.Kind() == reflect.Map {
- var mp map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &mp); err != nil {
- return err
- }
- if mp != nil {
- target.Set(reflect.MakeMap(targetType))
- var keyprop, valprop *proto.Properties
- if prop != nil {
- // These could still be nil if the protobuf metadata is broken somehow.
- // TODO: This won't work because the fields are unexported.
- // We should probably just reparse them.
- //keyprop, valprop = prop.mkeyprop, prop.mvalprop
- }
- for ks, raw := range mp {
- // Unmarshal map key. The core json library already decoded the key into a
- // string, so we handle that specially. Other types were quoted post-serialization.
- var k reflect.Value
- if targetType.Key().Kind() == reflect.String {
- k = reflect.ValueOf(ks)
- } else {
- k = reflect.New(targetType.Key()).Elem()
- if err := u.unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil {
- return err
- }
- }
-
- // Unmarshal map value.
- v := reflect.New(targetType.Elem()).Elem()
- if err := u.unmarshalValue(v, raw, valprop); err != nil {
- return err
- }
- target.SetMapIndex(k, v)
- }
- }
- return nil
- }
-
- // 64-bit integers can be encoded as strings. In this case we drop
- // the quotes and proceed as normal.
- isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64
- if isNum && strings.HasPrefix(string(inputValue), `"`) {
- inputValue = inputValue[1 : len(inputValue)-1]
- }
-
- // Non-finite numbers can be encoded as strings.
- isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
- if isFloat {
- if num, ok := nonFinite[string(inputValue)]; ok {
- target.SetFloat(num)
- return nil
- }
- }
-
- // Use the encoding/json for parsing other value types.
- return json.Unmarshal(inputValue, target.Addr().Interface())
-}
-
-// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute.
-func jsonProperties(f reflect.StructField, origName bool) *proto.Properties {
- var prop proto.Properties
- prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f)
- if origName || prop.JSONName == "" {
- prop.JSONName = prop.OrigName
- }
- return &prop
-}
-
-type fieldNames struct {
- orig, camel string
-}
-
-func acceptedJSONFieldNames(prop *proto.Properties) fieldNames {
- opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName}
- if prop.JSONName != "" {
- opts.camel = prop.JSONName
- }
- return opts
-}
-
-// Writer wrapper inspired by https://blog.golang.org/errors-are-values
-type errWriter struct {
- writer io.Writer
- err error
-}
-
-func (w *errWriter) write(str string) {
- if w.err != nil {
- return
- }
- _, w.err = w.writer.Write([]byte(str))
-}
-
-// Map fields may have key types of non-float scalars, strings and enums.
-// The easiest way to sort them in some deterministic order is to use fmt.
-// If this turns out to be inefficient we can always consider other options,
-// such as doing a Schwartzian transform.
-//
-// Numeric keys are sorted in numeric order per
-// https://developers.google.com/protocol-buffers/docs/proto#maps.
-type mapKeys []reflect.Value
-
-func (s mapKeys) Len() int { return len(s) }
-func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s mapKeys) Less(i, j int) bool {
- if k := s[i].Kind(); k == s[j].Kind() {
- switch k {
- case reflect.Int32, reflect.Int64:
- return s[i].Int() < s[j].Int()
- case reflect.Uint32, reflect.Uint64:
- return s[i].Uint() < s[j].Uint()
- }
- }
- return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface())
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go
deleted file mode 100644
index 2428d0566..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go
+++ /dev/null
@@ -1,896 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package jsonpb
-
-import (
- "bytes"
- "encoding/json"
- "io"
- "math"
- "reflect"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- pb "github.com/golang/protobuf/jsonpb/jsonpb_test_proto"
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- "github.com/golang/protobuf/ptypes"
- anypb "github.com/golang/protobuf/ptypes/any"
- durpb "github.com/golang/protobuf/ptypes/duration"
- stpb "github.com/golang/protobuf/ptypes/struct"
- tspb "github.com/golang/protobuf/ptypes/timestamp"
- wpb "github.com/golang/protobuf/ptypes/wrappers"
-)
-
-var (
- marshaler = Marshaler{}
-
- marshalerAllOptions = Marshaler{
- Indent: " ",
- }
-
- simpleObject = &pb.Simple{
- OInt32: proto.Int32(-32),
- OInt64: proto.Int64(-6400000000),
- OUint32: proto.Uint32(32),
- OUint64: proto.Uint64(6400000000),
- OSint32: proto.Int32(-13),
- OSint64: proto.Int64(-2600000000),
- OFloat: proto.Float32(3.14),
- ODouble: proto.Float64(6.02214179e23),
- OBool: proto.Bool(true),
- OString: proto.String("hello \"there\""),
- OBytes: []byte("beep boop"),
- }
-
- simpleObjectJSON = `{` +
- `"oBool":true,` +
- `"oInt32":-32,` +
- `"oInt64":"-6400000000",` +
- `"oUint32":32,` +
- `"oUint64":"6400000000",` +
- `"oSint32":-13,` +
- `"oSint64":"-2600000000",` +
- `"oFloat":3.14,` +
- `"oDouble":6.02214179e+23,` +
- `"oString":"hello \"there\"",` +
- `"oBytes":"YmVlcCBib29w"` +
- `}`
-
- simpleObjectPrettyJSON = `{
- "oBool": true,
- "oInt32": -32,
- "oInt64": "-6400000000",
- "oUint32": 32,
- "oUint64": "6400000000",
- "oSint32": -13,
- "oSint64": "-2600000000",
- "oFloat": 3.14,
- "oDouble": 6.02214179e+23,
- "oString": "hello \"there\"",
- "oBytes": "YmVlcCBib29w"
-}`
-
- repeatsObject = &pb.Repeats{
- RBool: []bool{true, false, true},
- RInt32: []int32{-3, -4, -5},
- RInt64: []int64{-123456789, -987654321},
- RUint32: []uint32{1, 2, 3},
- RUint64: []uint64{6789012345, 3456789012},
- RSint32: []int32{-1, -2, -3},
- RSint64: []int64{-6789012345, -3456789012},
- RFloat: []float32{3.14, 6.28},
- RDouble: []float64{299792458 * 1e20, 6.62606957e-34},
- RString: []string{"happy", "days"},
- RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")},
- }
-
- repeatsObjectJSON = `{` +
- `"rBool":[true,false,true],` +
- `"rInt32":[-3,-4,-5],` +
- `"rInt64":["-123456789","-987654321"],` +
- `"rUint32":[1,2,3],` +
- `"rUint64":["6789012345","3456789012"],` +
- `"rSint32":[-1,-2,-3],` +
- `"rSint64":["-6789012345","-3456789012"],` +
- `"rFloat":[3.14,6.28],` +
- `"rDouble":[2.99792458e+28,6.62606957e-34],` +
- `"rString":["happy","days"],` +
- `"rBytes":["c2tpdHRsZXM=","bSZtJ3M="]` +
- `}`
-
- repeatsObjectPrettyJSON = `{
- "rBool": [
- true,
- false,
- true
- ],
- "rInt32": [
- -3,
- -4,
- -5
- ],
- "rInt64": [
- "-123456789",
- "-987654321"
- ],
- "rUint32": [
- 1,
- 2,
- 3
- ],
- "rUint64": [
- "6789012345",
- "3456789012"
- ],
- "rSint32": [
- -1,
- -2,
- -3
- ],
- "rSint64": [
- "-6789012345",
- "-3456789012"
- ],
- "rFloat": [
- 3.14,
- 6.28
- ],
- "rDouble": [
- 2.99792458e+28,
- 6.62606957e-34
- ],
- "rString": [
- "happy",
- "days"
- ],
- "rBytes": [
- "c2tpdHRsZXM=",
- "bSZtJ3M="
- ]
-}`
-
- innerSimple = &pb.Simple{OInt32: proto.Int32(-32)}
- innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)}
- innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}}
- innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}}
- complexObject = &pb.Widget{
- Color: pb.Widget_GREEN.Enum(),
- RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE},
- Simple: innerSimple,
- RSimple: []*pb.Simple{innerSimple, innerSimple2},
- Repeats: innerRepeats,
- RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2},
- }
-
- complexObjectJSON = `{"color":"GREEN",` +
- `"rColor":["RED","GREEN","BLUE"],` +
- `"simple":{"oInt32":-32},` +
- `"rSimple":[{"oInt32":-32},{"oInt64":"25"}],` +
- `"repeats":{"rString":["roses","red"]},` +
- `"rRepeats":[{"rString":["roses","red"]},{"rString":["violets","blue"]}]` +
- `}`
-
- complexObjectPrettyJSON = `{
- "color": "GREEN",
- "rColor": [
- "RED",
- "GREEN",
- "BLUE"
- ],
- "simple": {
- "oInt32": -32
- },
- "rSimple": [
- {
- "oInt32": -32
- },
- {
- "oInt64": "25"
- }
- ],
- "repeats": {
- "rString": [
- "roses",
- "red"
- ]
- },
- "rRepeats": [
- {
- "rString": [
- "roses",
- "red"
- ]
- },
- {
- "rString": [
- "violets",
- "blue"
- ]
- }
- ]
-}`
-
- colorPrettyJSON = `{
- "color": 2
-}`
-
- colorListPrettyJSON = `{
- "color": 1000,
- "rColor": [
- "RED"
- ]
-}`
-
- nummyPrettyJSON = `{
- "nummy": {
- "1": 2,
- "3": 4
- }
-}`
-
- objjyPrettyJSON = `{
- "objjy": {
- "1": {
- "dub": 1
- }
- }
-}`
- realNumber = &pb.Real{Value: proto.Float64(3.14159265359)}
- realNumberName = "Pi"
- complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)}
- realNumberJSON = `{` +
- `"value":3.14159265359,` +
- `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` +
- `"[jsonpb.name]":"Pi"` +
- `}`
-
- anySimple = &pb.KnownTypes{
- An: &anypb.Any{
- TypeUrl: "something.example.com/jsonpb.Simple",
- Value: []byte{
- // &pb.Simple{OBool:true}
- 1 << 3, 1,
- },
- },
- }
- anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}`
- anySimplePrettyJSON = `{
- "an": {
- "@type": "something.example.com/jsonpb.Simple",
- "oBool": true
- }
-}`
-
- anyWellKnown = &pb.KnownTypes{
- An: &anypb.Any{
- TypeUrl: "type.googleapis.com/google.protobuf.Duration",
- Value: []byte{
- // &durpb.Duration{Seconds: 1, Nanos: 212000000 }
- 1 << 3, 1, // seconds
- 2 << 3, 0x80, 0xba, 0x8b, 0x65, // nanos
- },
- },
- }
- anyWellKnownJSON = `{"an":{"@type":"type.googleapis.com/google.protobuf.Duration","value":"1.212s"}}`
- anyWellKnownPrettyJSON = `{
- "an": {
- "@type": "type.googleapis.com/google.protobuf.Duration",
- "value": "1.212s"
- }
-}`
-
- nonFinites = &pb.NonFinites{
- FNan: proto.Float32(float32(math.NaN())),
- FPinf: proto.Float32(float32(math.Inf(1))),
- FNinf: proto.Float32(float32(math.Inf(-1))),
- DNan: proto.Float64(float64(math.NaN())),
- DPinf: proto.Float64(float64(math.Inf(1))),
- DNinf: proto.Float64(float64(math.Inf(-1))),
- }
- nonFinitesJSON = `{` +
- `"fNan":"NaN",` +
- `"fPinf":"Infinity",` +
- `"fNinf":"-Infinity",` +
- `"dNan":"NaN",` +
- `"dPinf":"Infinity",` +
- `"dNinf":"-Infinity"` +
- `}`
-)
-
-func init() {
- if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil {
- panic(err)
- }
- if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil {
- panic(err)
- }
-}
-
-var marshalingTests = []struct {
- desc string
- marshaler Marshaler
- pb proto.Message
- json string
-}{
- {"simple flat object", marshaler, simpleObject, simpleObjectJSON},
- {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON},
- {"non-finite floats fields object", marshaler, nonFinites, nonFinitesJSON},
- {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON},
- {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON},
- {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON},
- {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON},
- {"enum-string flat object", Marshaler{},
- &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`},
- {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "},
- &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON},
- {"unknown enum value object", marshalerAllOptions,
- &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON},
- {"repeated proto3 enum", Marshaler{},
- &proto3pb.Message{RFunny: []proto3pb.Message_Humour{
- proto3pb.Message_PUNS,
- proto3pb.Message_SLAPSTICK,
- }},
- `{"rFunny":["PUNS","SLAPSTICK"]}`},
- {"repeated proto3 enum as int", Marshaler{EnumsAsInts: true},
- &proto3pb.Message{RFunny: []proto3pb.Message_Humour{
- proto3pb.Message_PUNS,
- proto3pb.Message_SLAPSTICK,
- }},
- `{"rFunny":[1,2]}`},
- {"empty value", marshaler, &pb.Simple3{}, `{}`},
- {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`},
- {"empty repeated emitted", Marshaler{EmitDefaults: true}, &pb.SimpleSlice3{}, `{"slices":[]}`},
- {"empty map emitted", Marshaler{EmitDefaults: true}, &pb.SimpleMap3{}, `{"stringy":{}}`},
- {"nested struct null", Marshaler{EmitDefaults: true}, &pb.SimpleNull3{}, `{"simple":null}`},
- {"map<int64, int32>", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`},
- {"map<int64, int32>", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON},
- {"map<string, string>", marshaler,
- &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}},
- `{"strry":{"\"one\"":"two","three":"four"}}`},
- {"map<int32, Object>", marshaler,
- &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`},
- {"map<int32, Object>", marshalerAllOptions,
- &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON},
- {"map<int64, string>", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}},
- `{"buggy":{"1234":"yup"}}`},
- {"map<bool, bool>", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`},
- // TODO: This is broken.
- //{"map<string, enum>", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`},
- {"map<string, enum as int>", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`},
- {"map<int32, bool>", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`},
- {"map<int64, bool>", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`},
- {"map<uint32, bool>", marshaler, &pb.Mappy{U32Booly: map[uint32]bool{1: true, 3: false, 10: true, 12: false}}, `{"u32booly":{"1":true,"3":false,"10":true,"12":false}}`},
- {"map<uint64, bool>", marshaler, &pb.Mappy{U64Booly: map[uint64]bool{1: true, 3: false, 10: true, 12: false}}, `{"u64booly":{"1":true,"3":false,"10":true,"12":false}}`},
- {"proto2 map<int64, string>", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}},
- `{"mInt64Str":{"213":"cat"}}`},
- {"proto2 map<bool, Object>", marshaler,
- &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}},
- `{"mBoolSimple":{"true":{"oInt32":1}}}`},
- {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`},
- {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{"Grand Poobah"}}, `{"title":"Grand Poobah"}`},
- {"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)},
- `{"o_int32":4}`},
- {"proto2 extension", marshaler, realNumber, realNumberJSON},
- {"Any with message", marshaler, anySimple, anySimpleJSON},
- {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON},
- {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON},
- {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON},
- {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`},
- {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{
- Fields: map[string]*stpb.Value{
- "one": {Kind: &stpb.Value_StringValue{"loneliest number"}},
- "two": {Kind: &stpb.Value_NullValue{stpb.NullValue_NULL_VALUE}},
- },
- }}, `{"st":{"one":"loneliest number","two":null}}`},
- {"empty ListValue", marshaler, &pb.KnownTypes{Lv: &stpb.ListValue{}}, `{"lv":[]}`},
- {"basic ListValue", marshaler, &pb.KnownTypes{Lv: &stpb.ListValue{Values: []*stpb.Value{
- {Kind: &stpb.Value_StringValue{"x"}},
- {Kind: &stpb.Value_NullValue{}},
- {Kind: &stpb.Value_NumberValue{3}},
- {Kind: &stpb.Value_BoolValue{true}},
- }}}, `{"lv":["x",null,3,true]}`},
- {"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`},
- {"number Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NumberValue{1}}}, `{"val":1}`},
- {"null Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NullValue{stpb.NullValue_NULL_VALUE}}}, `{"val":null}`},
- {"string number value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_StringValue{"9223372036854775807"}}}, `{"val":"9223372036854775807"}`},
- {"list of lists Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{
- Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{
- {Kind: &stpb.Value_StringValue{"x"}},
- {Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{
- {Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{{Kind: &stpb.Value_StringValue{"y"}}},
- }}},
- {Kind: &stpb.Value_StringValue{"z"}},
- },
- }}},
- },
- }},
- }}, `{"val":["x",[["y"],"z"]]}`},
-
- {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`},
- {"FloatValue", marshaler, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}, `{"flt":1.2}`},
- {"Int64Value", marshaler, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}, `{"i64":"-3"}`},
- {"UInt64Value", marshaler, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}, `{"u64":"3"}`},
- {"Int32Value", marshaler, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}, `{"i32":-4}`},
- {"UInt32Value", marshaler, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}, `{"u32":4}`},
- {"BoolValue", marshaler, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}, `{"bool":true}`},
- {"StringValue", marshaler, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}, `{"str":"plush"}`},
- {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}, `{"bytes":"d293"}`},
-}
-
-func TestMarshaling(t *testing.T) {
- for _, tt := range marshalingTests {
- json, err := tt.marshaler.MarshalToString(tt.pb)
- if err != nil {
- t.Errorf("%s: marshaling error: %v", tt.desc, err)
- } else if tt.json != json {
- t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json)
- }
- }
-}
-
-func TestMarshalJSONPBMarshaler(t *testing.T) {
- rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }`
- msg := dynamicMessage{rawJson: rawJson}
- str, err := new(Marshaler).MarshalToString(&msg)
- if err != nil {
- t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err)
- }
- if str != rawJson {
- t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, rawJson)
- }
-}
-
-func TestMarshalAnyJSONPBMarshaler(t *testing.T) {
- msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`}
- a, err := ptypes.MarshalAny(&msg)
- if err != nil {
- t.Errorf("an unexpected error occurred when marshalling to Any: %v", err)
- }
- str, err := new(Marshaler).MarshalToString(a)
- if err != nil {
- t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err)
- }
- // after custom marshaling, it's round-tripped through JSON decoding/encoding already,
- // so the keys are sorted, whitespace is compacted, and "@type" key has been added
- expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}`
- if str != expected {
- t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected)
- }
-}
-
-var unmarshalingTests = []struct {
- desc string
- unmarshaler Unmarshaler
- json string
- pb proto.Message
-}{
- {"simple flat object", Unmarshaler{}, simpleObjectJSON, simpleObject},
- {"simple pretty object", Unmarshaler{}, simpleObjectPrettyJSON, simpleObject},
- {"repeated fields flat object", Unmarshaler{}, repeatsObjectJSON, repeatsObject},
- {"repeated fields pretty object", Unmarshaler{}, repeatsObjectPrettyJSON, repeatsObject},
- {"nested message/enum flat object", Unmarshaler{}, complexObjectJSON, complexObject},
- {"nested message/enum pretty object", Unmarshaler{}, complexObjectPrettyJSON, complexObject},
- {"enum-string object", Unmarshaler{}, `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}},
- {"enum-value object", Unmarshaler{}, "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}},
- {"unknown field with allowed option", Unmarshaler{AllowUnknownFields: true}, `{"unknown": "foo"}`, new(pb.Simple)},
- {"proto3 enum string", Unmarshaler{}, `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}},
- {"proto3 enum value", Unmarshaler{}, `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}},
- {"unknown enum value object",
- Unmarshaler{},
- "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}",
- &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}},
- {"repeated proto3 enum", Unmarshaler{}, `{"rFunny":["PUNS","SLAPSTICK"]}`,
- &proto3pb.Message{RFunny: []proto3pb.Message_Humour{
- proto3pb.Message_PUNS,
- proto3pb.Message_SLAPSTICK,
- }}},
- {"repeated proto3 enum as int", Unmarshaler{}, `{"rFunny":[1,2]}`,
- &proto3pb.Message{RFunny: []proto3pb.Message_Humour{
- proto3pb.Message_PUNS,
- proto3pb.Message_SLAPSTICK,
- }}},
- {"repeated proto3 enum as mix of strings and ints", Unmarshaler{}, `{"rFunny":["PUNS",2]}`,
- &proto3pb.Message{RFunny: []proto3pb.Message_Humour{
- proto3pb.Message_PUNS,
- proto3pb.Message_SLAPSTICK,
- }}},
- {"unquoted int64 object", Unmarshaler{}, `{"oInt64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}},
- {"unquoted uint64 object", Unmarshaler{}, `{"oUint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}},
- {"NaN", Unmarshaler{}, `{"oDouble":"NaN"}`, &pb.Simple{ODouble: proto.Float64(math.NaN())}},
- {"Inf", Unmarshaler{}, `{"oFloat":"Infinity"}`, &pb.Simple{OFloat: proto.Float32(float32(math.Inf(1)))}},
- {"-Inf", Unmarshaler{}, `{"oDouble":"-Infinity"}`, &pb.Simple{ODouble: proto.Float64(math.Inf(-1))}},
- {"map<int64, int32>", Unmarshaler{}, `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}},
- {"map<string, string>", Unmarshaler{}, `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}},
- {"map<int32, Object>", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}},
- {"proto2 extension", Unmarshaler{}, realNumberJSON, realNumber},
- {"Any with message", Unmarshaler{}, anySimpleJSON, anySimple},
- {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple},
- {"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown},
- {"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown},
- // TODO: This is broken.
- //{"map<string, enum>", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}},
- {"map<string, enum as int>", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}},
- {"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{31000}}},
- {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}},
- {"oneof orig_name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}},
- {"oneof spec name2", Unmarshaler{}, `{"homeAddress":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{"Australia"}}},
- {"oneof orig_name2", Unmarshaler{}, `{"home_address":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{"Australia"}}},
- {"orig_name input", Unmarshaler{}, `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
- {"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
-
- {"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}},
- {"null Duration", Unmarshaler{}, `{"dur":null}`, &pb.KnownTypes{Dur: nil}},
- {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}},
- {"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -2, Nanos: 999999995}}},
- {"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -62135596800, Nanos: 0}}},
- {"null Timestamp", Unmarshaler{}, `{"ts":null}`, &pb.KnownTypes{Ts: nil}},
- {"null Struct", Unmarshaler{}, `{"st": null}`, &pb.KnownTypes{St: nil}},
- {"empty Struct", Unmarshaler{}, `{"st": {}}`, &pb.KnownTypes{St: &stpb.Struct{}}},
- {"basic Struct", Unmarshaler{}, `{"st": {"a": "x", "b": null, "c": 3, "d": true}}`, &pb.KnownTypes{St: &stpb.Struct{Fields: map[string]*stpb.Value{
- "a": {Kind: &stpb.Value_StringValue{"x"}},
- "b": {Kind: &stpb.Value_NullValue{}},
- "c": {Kind: &stpb.Value_NumberValue{3}},
- "d": {Kind: &stpb.Value_BoolValue{true}},
- }}}},
- {"nested Struct", Unmarshaler{}, `{"st": {"a": {"b": 1, "c": [{"d": true}, "f"]}}}`, &pb.KnownTypes{St: &stpb.Struct{Fields: map[string]*stpb.Value{
- "a": {Kind: &stpb.Value_StructValue{&stpb.Struct{Fields: map[string]*stpb.Value{
- "b": {Kind: &stpb.Value_NumberValue{1}},
- "c": {Kind: &stpb.Value_ListValue{&stpb.ListValue{Values: []*stpb.Value{
- {Kind: &stpb.Value_StructValue{&stpb.Struct{Fields: map[string]*stpb.Value{"d": {Kind: &stpb.Value_BoolValue{true}}}}}},
- {Kind: &stpb.Value_StringValue{"f"}},
- }}}},
- }}}},
- }}}},
- {"null ListValue", Unmarshaler{}, `{"lv": null}`, &pb.KnownTypes{Lv: nil}},
- {"empty ListValue", Unmarshaler{}, `{"lv": []}`, &pb.KnownTypes{Lv: &stpb.ListValue{}}},
- {"basic ListValue", Unmarshaler{}, `{"lv": ["x", null, 3, true]}`, &pb.KnownTypes{Lv: &stpb.ListValue{Values: []*stpb.Value{
- {Kind: &stpb.Value_StringValue{"x"}},
- {Kind: &stpb.Value_NullValue{}},
- {Kind: &stpb.Value_NumberValue{3}},
- {Kind: &stpb.Value_BoolValue{true}},
- }}}},
- {"number Value", Unmarshaler{}, `{"val":1}`, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NumberValue{1}}}},
- {"null Value", Unmarshaler{}, `{"val":null}`, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NullValue{stpb.NullValue_NULL_VALUE}}}},
- {"bool Value", Unmarshaler{}, `{"val":true}`, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_BoolValue{true}}}},
- {"string Value", Unmarshaler{}, `{"val":"x"}`, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_StringValue{"x"}}}},
- {"string number value", Unmarshaler{}, `{"val":"9223372036854775807"}`, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_StringValue{"9223372036854775807"}}}},
- {"list of lists Value", Unmarshaler{}, `{"val":["x", [["y"], "z"]]}`, &pb.KnownTypes{Val: &stpb.Value{
- Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{
- {Kind: &stpb.Value_StringValue{"x"}},
- {Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{
- {Kind: &stpb.Value_ListValue{&stpb.ListValue{
- Values: []*stpb.Value{{Kind: &stpb.Value_StringValue{"y"}}},
- }}},
- {Kind: &stpb.Value_StringValue{"z"}},
- },
- }}},
- },
- }}}}},
-
- {"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}},
- {"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}},
- {"Int64Value", Unmarshaler{}, `{"i64":"-3"}`, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}},
- {"UInt64Value", Unmarshaler{}, `{"u64":"3"}`, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}},
- {"Int32Value", Unmarshaler{}, `{"i32":-4}`, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}},
- {"UInt32Value", Unmarshaler{}, `{"u32":4}`, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}},
- {"BoolValue", Unmarshaler{}, `{"bool":true}`, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}},
- {"StringValue", Unmarshaler{}, `{"str":"plush"}`, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}},
- {"BytesValue", Unmarshaler{}, `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}},
-
- // Ensure that `null` as a value ends up with a nil pointer instead of a [type]Value struct.
- {"null DoubleValue", Unmarshaler{}, `{"dbl":null}`, &pb.KnownTypes{Dbl: nil}},
- {"null FloatValue", Unmarshaler{}, `{"flt":null}`, &pb.KnownTypes{Flt: nil}},
- {"null Int64Value", Unmarshaler{}, `{"i64":null}`, &pb.KnownTypes{I64: nil}},
- {"null UInt64Value", Unmarshaler{}, `{"u64":null}`, &pb.KnownTypes{U64: nil}},
- {"null Int32Value", Unmarshaler{}, `{"i32":null}`, &pb.KnownTypes{I32: nil}},
- {"null UInt32Value", Unmarshaler{}, `{"u32":null}`, &pb.KnownTypes{U32: nil}},
- {"null BoolValue", Unmarshaler{}, `{"bool":null}`, &pb.KnownTypes{Bool: nil}},
- {"null StringValue", Unmarshaler{}, `{"str":null}`, &pb.KnownTypes{Str: nil}},
- {"null BytesValue", Unmarshaler{}, `{"bytes":null}`, &pb.KnownTypes{Bytes: nil}},
-}
-
-func TestUnmarshaling(t *testing.T) {
- for _, tt := range unmarshalingTests {
- // Make a new instance of the type of our expected object.
- p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message)
-
- err := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p)
- if err != nil {
- t.Errorf("%s: %v", tt.desc, err)
- continue
- }
-
- // For easier diffs, compare text strings of the protos.
- exp := proto.MarshalTextString(tt.pb)
- act := proto.MarshalTextString(p)
- if string(exp) != string(act) {
- t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp)
- }
- }
-}
-
-func TestUnmarshalNullArray(t *testing.T) {
- var repeats pb.Repeats
- if err := UnmarshalString(`{"rBool":null}`, &repeats); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(repeats, pb.Repeats{}) {
- t.Errorf("got non-nil fields in [%#v]", repeats)
- }
-}
-
-func TestUnmarshalNullObject(t *testing.T) {
- var maps pb.Maps
- if err := UnmarshalString(`{"mInt64Str":null}`, &maps); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(maps, pb.Maps{}) {
- t.Errorf("got non-nil fields in [%#v]", maps)
- }
-}
-
-func TestUnmarshalNext(t *testing.T) {
- // We only need to check against a few, not all of them.
- tests := unmarshalingTests[:5]
-
- // Create a buffer with many concatenated JSON objects.
- var b bytes.Buffer
- for _, tt := range tests {
- b.WriteString(tt.json)
- }
-
- dec := json.NewDecoder(&b)
- for _, tt := range tests {
- // Make a new instance of the type of our expected object.
- p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message)
-
- err := tt.unmarshaler.UnmarshalNext(dec, p)
- if err != nil {
- t.Errorf("%s: %v", tt.desc, err)
- continue
- }
-
- // For easier diffs, compare text strings of the protos.
- exp := proto.MarshalTextString(tt.pb)
- act := proto.MarshalTextString(p)
- if string(exp) != string(act) {
- t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp)
- }
- }
-
- p := &pb.Simple{}
- err := new(Unmarshaler).UnmarshalNext(dec, p)
- if err != io.EOF {
- t.Errorf("eof: got %v, expected io.EOF", err)
- }
-}
-
-var unmarshalingShouldError = []struct {
- desc string
- in string
- pb proto.Message
-}{
- {"a value", "666", new(pb.Simple)},
- {"gibberish", "{adskja123;l23=-=", new(pb.Simple)},
- {"unknown field", `{"unknown": "foo"}`, new(pb.Simple)},
- {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)},
-}
-
-func TestUnmarshalingBadInput(t *testing.T) {
- for _, tt := range unmarshalingShouldError {
- err := UnmarshalString(tt.in, tt.pb)
- if err == nil {
- t.Errorf("an error was expected when parsing %q instead of an object", tt.desc)
- }
- }
-}
-
-type funcResolver func(turl string) (proto.Message, error)
-
-func (fn funcResolver) Resolve(turl string) (proto.Message, error) {
- return fn(turl)
-}
-
-func TestAnyWithCustomResolver(t *testing.T) {
- var resolvedTypeUrls []string
- resolver := funcResolver(func(turl string) (proto.Message, error) {
- resolvedTypeUrls = append(resolvedTypeUrls, turl)
- return new(pb.Simple), nil
- })
- msg := &pb.Simple{
- OBytes: []byte{1, 2, 3, 4},
- OBool: proto.Bool(true),
- OString: proto.String("foobar"),
- OInt64: proto.Int64(1020304),
- }
- msgBytes, err := proto.Marshal(msg)
- if err != nil {
- t.Errorf("an unexpected error occurred when marshaling message: %v", err)
- }
- // make an Any with a type URL that won't resolve w/out custom resolver
- any := &anypb.Any{
- TypeUrl: "https://foobar.com/some.random.MessageKind",
- Value: msgBytes,
- }
-
- m := Marshaler{AnyResolver: resolver}
- js, err := m.MarshalToString(any)
- if err != nil {
- t.Errorf("an unexpected error occurred when marshaling any to JSON: %v", err)
- }
- if len(resolvedTypeUrls) != 1 {
- t.Errorf("custom resolver was not invoked during marshaling")
- } else if resolvedTypeUrls[0] != "https://foobar.com/some.random.MessageKind" {
- t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[0], "https://foobar.com/some.random.MessageKind")
- }
- wanted := `{"@type":"https://foobar.com/some.random.MessageKind","oBool":true,"oInt64":"1020304","oString":"foobar","oBytes":"AQIDBA=="}`
- if js != wanted {
- t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", js, wanted)
- }
-
- u := Unmarshaler{AnyResolver: resolver}
- roundTrip := &anypb.Any{}
- err = u.Unmarshal(bytes.NewReader([]byte(js)), roundTrip)
- if err != nil {
- t.Errorf("an unexpected error occurred when unmarshaling any from JSON: %v", err)
- }
- if len(resolvedTypeUrls) != 2 {
- t.Errorf("custom resolver was not invoked during marshaling")
- } else if resolvedTypeUrls[1] != "https://foobar.com/some.random.MessageKind" {
- t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[1], "https://foobar.com/some.random.MessageKind")
- }
- if !proto.Equal(any, roundTrip) {
- t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", roundTrip, any)
- }
-}
-
-func TestUnmarshalJSONPBUnmarshaler(t *testing.T) {
- rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }`
- var msg dynamicMessage
- if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil {
- t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err)
- }
- if msg.rawJson != rawJson {
- t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.rawJson, rawJson)
- }
-}
-
-func TestUnmarshalNullWithJSONPBUnmarshaler(t *testing.T) {
- rawJson := `{"stringField":null}`
- var ptrFieldMsg ptrFieldMessage
- if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil {
- t.Errorf("unmarshal error: %v", err)
- }
-
- want := ptrFieldMessage{StringField: &stringField{IsSet: true, StringValue: "null"}}
- if !proto.Equal(&ptrFieldMsg, &want) {
- t.Errorf("unmarshal result StringField: got %v, want %v", ptrFieldMsg, want)
- }
-}
-
-func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) {
- rawJson := `{ "@type": "blah.com/` + dynamicMessageName + `", "foo": "bar", "baz": [0, 1, 2, 3] }`
- var got anypb.Any
- if err := Unmarshal(strings.NewReader(rawJson), &got); err != nil {
- t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err)
- }
-
- dm := &dynamicMessage{rawJson: `{"baz":[0,1,2,3],"foo":"bar"}`}
- var want anypb.Any
- if b, err := proto.Marshal(dm); err != nil {
- t.Errorf("an unexpected error occurred when marshaling message: %v", err)
- } else {
- want.TypeUrl = "blah.com/" + dynamicMessageName
- want.Value = b
- }
-
- if !proto.Equal(&got, &want) {
- t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", got, want)
- }
-}
-
-const (
- dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage"
-)
-
-func init() {
- // we register the custom type below so that we can use it in Any types
- proto.RegisterType((*dynamicMessage)(nil), dynamicMessageName)
-}
-
-type ptrFieldMessage struct {
- StringField *stringField `protobuf:"bytes,1,opt,name=stringField"`
-}
-
-func (m *ptrFieldMessage) Reset() {
-}
-
-func (m *ptrFieldMessage) String() string {
- return m.StringField.StringValue
-}
-
-func (m *ptrFieldMessage) ProtoMessage() {
-}
-
-type stringField struct {
- IsSet bool `protobuf:"varint,1,opt,name=isSet"`
- StringValue string `protobuf:"bytes,2,opt,name=stringValue"`
-}
-
-func (s *stringField) Reset() {
-}
-
-func (s *stringField) String() string {
- return s.StringValue
-}
-
-func (s *stringField) ProtoMessage() {
-}
-
-func (s *stringField) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error {
- s.IsSet = true
- s.StringValue = string(js)
- return nil
-}
-
-// dynamicMessage implements protobuf.Message but is not a normal generated message type.
-// It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support.
-type dynamicMessage struct {
- rawJson string `protobuf:"bytes,1,opt,name=rawJson"`
-}
-
-func (m *dynamicMessage) Reset() {
- m.rawJson = "{}"
-}
-
-func (m *dynamicMessage) String() string {
- return m.rawJson
-}
-
-func (m *dynamicMessage) ProtoMessage() {
-}
-
-func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) {
- return []byte(m.rawJson), nil
-}
-
-func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error {
- m.rawJson = string(js)
- return nil
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile
deleted file mode 100644
index eeda8ae53..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2015 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-regenerate:
- protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers:. *.proto
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
deleted file mode 100644
index ebb180e88..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
+++ /dev/null
@@ -1,266 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: more_test_objects.proto
-
-/*
-Package jsonpb is a generated protocol buffer package.
-
-It is generated from these files:
- more_test_objects.proto
- test_objects.proto
-
-It has these top-level messages:
- Simple3
- SimpleSlice3
- SimpleMap3
- SimpleNull3
- Mappy
- Simple
- NonFinites
- Repeats
- Widget
- Maps
- MsgWithOneof
- Real
- Complex
- KnownTypes
-*/
-package jsonpb
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type Numeral int32
-
-const (
- Numeral_UNKNOWN Numeral = 0
- Numeral_ARABIC Numeral = 1
- Numeral_ROMAN Numeral = 2
-)
-
-var Numeral_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "ARABIC",
- 2: "ROMAN",
-}
-var Numeral_value = map[string]int32{
- "UNKNOWN": 0,
- "ARABIC": 1,
- "ROMAN": 2,
-}
-
-func (x Numeral) String() string {
- return proto.EnumName(Numeral_name, int32(x))
-}
-func (Numeral) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-type Simple3 struct {
- Dub float64 `protobuf:"fixed64,1,opt,name=dub" json:"dub,omitempty"`
-}
-
-func (m *Simple3) Reset() { *m = Simple3{} }
-func (m *Simple3) String() string { return proto.CompactTextString(m) }
-func (*Simple3) ProtoMessage() {}
-func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *Simple3) GetDub() float64 {
- if m != nil {
- return m.Dub
- }
- return 0
-}
-
-type SimpleSlice3 struct {
- Slices []string `protobuf:"bytes,1,rep,name=slices" json:"slices,omitempty"`
-}
-
-func (m *SimpleSlice3) Reset() { *m = SimpleSlice3{} }
-func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) }
-func (*SimpleSlice3) ProtoMessage() {}
-func (*SimpleSlice3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *SimpleSlice3) GetSlices() []string {
- if m != nil {
- return m.Slices
- }
- return nil
-}
-
-type SimpleMap3 struct {
- Stringy map[string]string `protobuf:"bytes,1,rep,name=stringy" json:"stringy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
-}
-
-func (m *SimpleMap3) Reset() { *m = SimpleMap3{} }
-func (m *SimpleMap3) String() string { return proto.CompactTextString(m) }
-func (*SimpleMap3) ProtoMessage() {}
-func (*SimpleMap3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *SimpleMap3) GetStringy() map[string]string {
- if m != nil {
- return m.Stringy
- }
- return nil
-}
-
-type SimpleNull3 struct {
- Simple *Simple3 `protobuf:"bytes,1,opt,name=simple" json:"simple,omitempty"`
-}
-
-func (m *SimpleNull3) Reset() { *m = SimpleNull3{} }
-func (m *SimpleNull3) String() string { return proto.CompactTextString(m) }
-func (*SimpleNull3) ProtoMessage() {}
-func (*SimpleNull3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *SimpleNull3) GetSimple() *Simple3 {
- if m != nil {
- return m.Simple
- }
- return nil
-}
-
-type Mappy struct {
- Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=jsonpb.Numeral"`
- S32Booly map[int32]bool `protobuf:"bytes,7,rep,name=s32booly" json:"s32booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- S64Booly map[int64]bool `protobuf:"bytes,8,rep,name=s64booly" json:"s64booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- U32Booly map[uint32]bool `protobuf:"bytes,9,rep,name=u32booly" json:"u32booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- U64Booly map[uint64]bool `protobuf:"bytes,10,rep,name=u64booly" json:"u64booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
-}
-
-func (m *Mappy) Reset() { *m = Mappy{} }
-func (m *Mappy) String() string { return proto.CompactTextString(m) }
-func (*Mappy) ProtoMessage() {}
-func (*Mappy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *Mappy) GetNummy() map[int64]int32 {
- if m != nil {
- return m.Nummy
- }
- return nil
-}
-
-func (m *Mappy) GetStrry() map[string]string {
- if m != nil {
- return m.Strry
- }
- return nil
-}
-
-func (m *Mappy) GetObjjy() map[int32]*Simple3 {
- if m != nil {
- return m.Objjy
- }
- return nil
-}
-
-func (m *Mappy) GetBuggy() map[int64]string {
- if m != nil {
- return m.Buggy
- }
- return nil
-}
-
-func (m *Mappy) GetBooly() map[bool]bool {
- if m != nil {
- return m.Booly
- }
- return nil
-}
-
-func (m *Mappy) GetEnumy() map[string]Numeral {
- if m != nil {
- return m.Enumy
- }
- return nil
-}
-
-func (m *Mappy) GetS32Booly() map[int32]bool {
- if m != nil {
- return m.S32Booly
- }
- return nil
-}
-
-func (m *Mappy) GetS64Booly() map[int64]bool {
- if m != nil {
- return m.S64Booly
- }
- return nil
-}
-
-func (m *Mappy) GetU32Booly() map[uint32]bool {
- if m != nil {
- return m.U32Booly
- }
- return nil
-}
-
-func (m *Mappy) GetU64Booly() map[uint64]bool {
- if m != nil {
- return m.U64Booly
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3")
- proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3")
- proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3")
- proto.RegisterType((*SimpleNull3)(nil), "jsonpb.SimpleNull3")
- proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy")
- proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value)
-}
-
-func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 526 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c,
- 0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0,
- 0xad, 0x0c, 0xe6, 0x8b, 0x78, 0x74, 0x5d, 0x77, 0x95, 0x8e, 0x5e, 0x94, 0x11, 0x07, 0x1c, 0xc2,
- 0x2e, 0x4b, 0xdc, 0x99, 0x90, 0xcc, 0x5f, 0xd8, 0xd6, 0xc0, 0xd7, 0xfb, 0xbb, 0x07, 0xe3, 0x48,
- 0x72, 0x2d, 0x07, 0x85, 0x6c, 0x77, 0x52, 0x7e, 0xcf, 0xe3, 0x73, 0x24, 0x1d, 0x02, 0x2f, 0xd3,
- 0xbc, 0x8c, 0x1f, 0xea, 0xb8, 0xaa, 0x1f, 0xf2, 0x68, 0x17, 0x3f, 0xd6, 0x95, 0x57, 0x94, 0x79,
- 0x9d, 0x13, 0x63, 0x57, 0xe5, 0x59, 0x11, 0xb9, 0xe7, 0x60, 0x2e, 0xb7, 0x69, 0x91, 0xc4, 0x3e,
- 0x19, 0xc3, 0xf0, 0x3b, 0x8d, 0x1c, 0xed, 0x42, 0xbb, 0xd4, 0x42, 0x5c, 0xba, 0x6f, 0xe0, 0x94,
- 0x87, 0xcb, 0x64, 0xfb, 0x18, 0xfb, 0xe4, 0x05, 0x18, 0x15, 0xae, 0x2a, 0x47, 0xbb, 0x18, 0x5e,
- 0xda, 0xa1, 0xd8, 0xb9, 0xbf, 0x34, 0x00, 0x0e, 0xce, 0xd7, 0x85, 0x4f, 0x3e, 0x81, 0x59, 0xd5,
- 0xe5, 0x36, 0xdb, 0x34, 0x8c, 0x1b, 0x4d, 0x5f, 0x79, 0xbc, 0x9a, 0xd7, 0x41, 0xde, 0x92, 0x13,
- 0x77, 0x59, 0x5d, 0x36, 0x61, 0xcb, 0x4f, 0x6e, 0xe0, 0x54, 0x0e, 0xb0, 0xa7, 0x1f, 0x71, 0xc3,
- 0x7a, 0xb2, 0x43, 0x5c, 0x92, 0xe7, 0xa0, 0xff, 0x5c, 0x27, 0x34, 0x76, 0x06, 0xec, 0x37, 0xbe,
- 0xb9, 0x19, 0x5c, 0x6b, 0xee, 0x15, 0x8c, 0xf8, 0xf7, 0x03, 0x9a, 0x24, 0x3e, 0x79, 0x0b, 0x46,
- 0xc5, 0xb6, 0xcc, 0x1e, 0x4d, 0x9f, 0xf5, 0x9b, 0xf0, 0x43, 0x11, 0xbb, 0xbf, 0x2d, 0xd0, 0xe7,
- 0xeb, 0xa2, 0x68, 0x88, 0x07, 0x7a, 0x46, 0xd3, 0xb4, 0x6d, 0xdb, 0x69, 0x0d, 0x96, 0x7a, 0x01,
- 0x46, 0xbc, 0x5f, 0x8e, 0x21, 0x5f, 0xd5, 0x65, 0xd9, 0x38, 0x03, 0x15, 0xbf, 0xc4, 0x48, 0xf0,
- 0x0c, 0x43, 0x3e, 0x8f, 0x76, 0xbb, 0xc6, 0x19, 0xaa, 0xf8, 0x05, 0x46, 0x82, 0x67, 0x18, 0xf2,
- 0x11, 0xdd, 0x6c, 0x1a, 0xe7, 0x44, 0xc5, 0xdf, 0x62, 0x24, 0x78, 0x86, 0x31, 0x3e, 0xcf, 0x93,
- 0xc6, 0xd1, 0x95, 0x3c, 0x46, 0x2d, 0x8f, 0x6b, 0xe4, 0xe3, 0x8c, 0xa6, 0x8d, 0x63, 0xa8, 0xf8,
- 0x3b, 0x8c, 0x04, 0xcf, 0x30, 0xf2, 0x11, 0xac, 0xca, 0x9f, 0xf2, 0x12, 0x26, 0x53, 0xce, 0xf7,
- 0x8e, 0x2c, 0x52, 0x6e, 0x3d, 0xc1, 0x4c, 0xbc, 0xfa, 0xc0, 0x45, 0x4b, 0x29, 0x8a, 0xb4, 0x15,
- 0xc5, 0x16, 0x45, 0xda, 0x56, 0xb4, 0x55, 0xe2, 0xaa, 0x5f, 0x91, 0x4a, 0x15, 0x69, 0x5b, 0x11,
- 0x94, 0x62, 0xbf, 0x62, 0x0b, 0x4f, 0xae, 0x01, 0xba, 0x87, 0x96, 0xe7, 0x6f, 0xa8, 0x98, 0x3f,
- 0x5d, 0x9a, 0x3f, 0x34, 0xbb, 0x27, 0xff, 0x97, 0xc9, 0x9d, 0xdc, 0x03, 0x74, 0x8f, 0x2f, 0x9b,
- 0x3a, 0x37, 0x5f, 0xcb, 0xa6, 0x62, 0x92, 0xfb, 0x4d, 0x74, 0x73, 0x71, 0xac, 0x7d, 0x7b, 0xdf,
- 0x7c, 0xba, 0x10, 0xd9, 0xb4, 0x14, 0xa6, 0xb5, 0xd7, 0x7e, 0x37, 0x2b, 0x8a, 0x83, 0xf7, 0xda,
- 0xff, 0xbf, 0x6b, 0x3f, 0xa0, 0x69, 0x5c, 0xae, 0x13, 0xf9, 0x53, 0x9f, 0xe1, 0xac, 0x37, 0x43,
- 0x8a, 0xcb, 0x38, 0xdc, 0x07, 0xca, 0xf2, 0xab, 0x1e, 0x3b, 0xfe, 0xbe, 0xbc, 0x3a, 0x54, 0xf9,
- 0xec, 0x6f, 0xe4, 0x43, 0x95, 0x4f, 0x8e, 0xc8, 0xef, 0xde, 0x83, 0x29, 0x6e, 0x82, 0x8c, 0xc0,
- 0x5c, 0x05, 0x5f, 0x83, 0xc5, 0xb7, 0x60, 0xfc, 0x1f, 0x01, 0x30, 0x66, 0xe1, 0xec, 0xf6, 0xfe,
- 0xcb, 0x58, 0x23, 0x36, 0xe8, 0xe1, 0x62, 0x3e, 0x0b, 0xc6, 0x83, 0xc8, 0x60, 0x7f, 0xe0, 0xfe,
- 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x34, 0xaf, 0xdb, 0x05, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto
deleted file mode 100644
index d254fa5fa..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto
+++ /dev/null
@@ -1,69 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package jsonpb;
-
-message Simple3 {
- double dub = 1;
-}
-
-message SimpleSlice3 {
- repeated string slices = 1;
-}
-
-message SimpleMap3 {
- map<string,string> stringy = 1;
-}
-
-message SimpleNull3 {
- Simple3 simple = 1;
-}
-
-enum Numeral {
- UNKNOWN = 0;
- ARABIC = 1;
- ROMAN = 2;
-}
-
-message Mappy {
- map<int64, int32> nummy = 1;
- map<string, string> strry = 2;
- map<int32, Simple3> objjy = 3;
- map<int64, string> buggy = 4;
- map<bool, bool> booly = 5;
- map<string, Numeral> enumy = 6;
- map<int32, bool> s32booly = 7;
- map<int64, bool> s64booly = 8;
- map<uint32, bool> u32booly = 9;
- map<uint64, bool> u64booly = 10;
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go
deleted file mode 100644
index d413d740d..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go
+++ /dev/null
@@ -1,852 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: test_objects.proto
-
-package jsonpb
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/ptypes/any"
-import google_protobuf1 "github.com/golang/protobuf/ptypes/duration"
-import google_protobuf2 "github.com/golang/protobuf/ptypes/struct"
-import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
-import google_protobuf4 "github.com/golang/protobuf/ptypes/wrappers"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-type Widget_Color int32
-
-const (
- Widget_RED Widget_Color = 0
- Widget_GREEN Widget_Color = 1
- Widget_BLUE Widget_Color = 2
-)
-
-var Widget_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var Widget_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x Widget_Color) Enum() *Widget_Color {
- p := new(Widget_Color)
- *p = x
- return p
-}
-func (x Widget_Color) String() string {
- return proto.EnumName(Widget_Color_name, int32(x))
-}
-func (x *Widget_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
- if err != nil {
- return err
- }
- *x = Widget_Color(value)
- return nil
-}
-func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{3, 0} }
-
-// Test message for holding primitive types.
-type Simple struct {
- OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"`
- OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"`
- OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"`
- OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"`
- OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"`
- OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"`
- OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"`
- OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"`
- ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"`
- OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"`
- OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Simple) Reset() { *m = Simple{} }
-func (m *Simple) String() string { return proto.CompactTextString(m) }
-func (*Simple) ProtoMessage() {}
-func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
-
-func (m *Simple) GetOBool() bool {
- if m != nil && m.OBool != nil {
- return *m.OBool
- }
- return false
-}
-
-func (m *Simple) GetOInt32() int32 {
- if m != nil && m.OInt32 != nil {
- return *m.OInt32
- }
- return 0
-}
-
-func (m *Simple) GetOInt64() int64 {
- if m != nil && m.OInt64 != nil {
- return *m.OInt64
- }
- return 0
-}
-
-func (m *Simple) GetOUint32() uint32 {
- if m != nil && m.OUint32 != nil {
- return *m.OUint32
- }
- return 0
-}
-
-func (m *Simple) GetOUint64() uint64 {
- if m != nil && m.OUint64 != nil {
- return *m.OUint64
- }
- return 0
-}
-
-func (m *Simple) GetOSint32() int32 {
- if m != nil && m.OSint32 != nil {
- return *m.OSint32
- }
- return 0
-}
-
-func (m *Simple) GetOSint64() int64 {
- if m != nil && m.OSint64 != nil {
- return *m.OSint64
- }
- return 0
-}
-
-func (m *Simple) GetOFloat() float32 {
- if m != nil && m.OFloat != nil {
- return *m.OFloat
- }
- return 0
-}
-
-func (m *Simple) GetODouble() float64 {
- if m != nil && m.ODouble != nil {
- return *m.ODouble
- }
- return 0
-}
-
-func (m *Simple) GetOString() string {
- if m != nil && m.OString != nil {
- return *m.OString
- }
- return ""
-}
-
-func (m *Simple) GetOBytes() []byte {
- if m != nil {
- return m.OBytes
- }
- return nil
-}
-
-// Test message for holding special non-finites primitives.
-type NonFinites struct {
- FNan *float32 `protobuf:"fixed32,1,opt,name=f_nan,json=fNan" json:"f_nan,omitempty"`
- FPinf *float32 `protobuf:"fixed32,2,opt,name=f_pinf,json=fPinf" json:"f_pinf,omitempty"`
- FNinf *float32 `protobuf:"fixed32,3,opt,name=f_ninf,json=fNinf" json:"f_ninf,omitempty"`
- DNan *float64 `protobuf:"fixed64,4,opt,name=d_nan,json=dNan" json:"d_nan,omitempty"`
- DPinf *float64 `protobuf:"fixed64,5,opt,name=d_pinf,json=dPinf" json:"d_pinf,omitempty"`
- DNinf *float64 `protobuf:"fixed64,6,opt,name=d_ninf,json=dNinf" json:"d_ninf,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NonFinites) Reset() { *m = NonFinites{} }
-func (m *NonFinites) String() string { return proto.CompactTextString(m) }
-func (*NonFinites) ProtoMessage() {}
-func (*NonFinites) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
-
-func (m *NonFinites) GetFNan() float32 {
- if m != nil && m.FNan != nil {
- return *m.FNan
- }
- return 0
-}
-
-func (m *NonFinites) GetFPinf() float32 {
- if m != nil && m.FPinf != nil {
- return *m.FPinf
- }
- return 0
-}
-
-func (m *NonFinites) GetFNinf() float32 {
- if m != nil && m.FNinf != nil {
- return *m.FNinf
- }
- return 0
-}
-
-func (m *NonFinites) GetDNan() float64 {
- if m != nil && m.DNan != nil {
- return *m.DNan
- }
- return 0
-}
-
-func (m *NonFinites) GetDPinf() float64 {
- if m != nil && m.DPinf != nil {
- return *m.DPinf
- }
- return 0
-}
-
-func (m *NonFinites) GetDNinf() float64 {
- if m != nil && m.DNinf != nil {
- return *m.DNinf
- }
- return 0
-}
-
-// Test message for holding repeated primitives.
-type Repeats struct {
- RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"`
- RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"`
- RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"`
- RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"`
- RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"`
- RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"`
- RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"`
- RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"`
- RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"`
- RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"`
- RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Repeats) Reset() { *m = Repeats{} }
-func (m *Repeats) String() string { return proto.CompactTextString(m) }
-func (*Repeats) ProtoMessage() {}
-func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
-
-func (m *Repeats) GetRBool() []bool {
- if m != nil {
- return m.RBool
- }
- return nil
-}
-
-func (m *Repeats) GetRInt32() []int32 {
- if m != nil {
- return m.RInt32
- }
- return nil
-}
-
-func (m *Repeats) GetRInt64() []int64 {
- if m != nil {
- return m.RInt64
- }
- return nil
-}
-
-func (m *Repeats) GetRUint32() []uint32 {
- if m != nil {
- return m.RUint32
- }
- return nil
-}
-
-func (m *Repeats) GetRUint64() []uint64 {
- if m != nil {
- return m.RUint64
- }
- return nil
-}
-
-func (m *Repeats) GetRSint32() []int32 {
- if m != nil {
- return m.RSint32
- }
- return nil
-}
-
-func (m *Repeats) GetRSint64() []int64 {
- if m != nil {
- return m.RSint64
- }
- return nil
-}
-
-func (m *Repeats) GetRFloat() []float32 {
- if m != nil {
- return m.RFloat
- }
- return nil
-}
-
-func (m *Repeats) GetRDouble() []float64 {
- if m != nil {
- return m.RDouble
- }
- return nil
-}
-
-func (m *Repeats) GetRString() []string {
- if m != nil {
- return m.RString
- }
- return nil
-}
-
-func (m *Repeats) GetRBytes() [][]byte {
- if m != nil {
- return m.RBytes
- }
- return nil
-}
-
-// Test message for holding enums and nested messages.
-type Widget struct {
- Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"`
- RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"`
- Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"`
- RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"`
- Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"`
- RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Widget) Reset() { *m = Widget{} }
-func (m *Widget) String() string { return proto.CompactTextString(m) }
-func (*Widget) ProtoMessage() {}
-func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
-
-func (m *Widget) GetColor() Widget_Color {
- if m != nil && m.Color != nil {
- return *m.Color
- }
- return Widget_RED
-}
-
-func (m *Widget) GetRColor() []Widget_Color {
- if m != nil {
- return m.RColor
- }
- return nil
-}
-
-func (m *Widget) GetSimple() *Simple {
- if m != nil {
- return m.Simple
- }
- return nil
-}
-
-func (m *Widget) GetRSimple() []*Simple {
- if m != nil {
- return m.RSimple
- }
- return nil
-}
-
-func (m *Widget) GetRepeats() *Repeats {
- if m != nil {
- return m.Repeats
- }
- return nil
-}
-
-func (m *Widget) GetRRepeats() []*Repeats {
- if m != nil {
- return m.RRepeats
- }
- return nil
-}
-
-type Maps struct {
- MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Maps) Reset() { *m = Maps{} }
-func (m *Maps) String() string { return proto.CompactTextString(m) }
-func (*Maps) ProtoMessage() {}
-func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
-
-func (m *Maps) GetMInt64Str() map[int64]string {
- if m != nil {
- return m.MInt64Str
- }
- return nil
-}
-
-func (m *Maps) GetMBoolSimple() map[bool]*Simple {
- if m != nil {
- return m.MBoolSimple
- }
- return nil
-}
-
-type MsgWithOneof struct {
- // Types that are valid to be assigned to Union:
- // *MsgWithOneof_Title
- // *MsgWithOneof_Salary
- // *MsgWithOneof_Country
- // *MsgWithOneof_HomeAddress
- Union isMsgWithOneof_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} }
-func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
-func (*MsgWithOneof) ProtoMessage() {}
-func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
-
-type isMsgWithOneof_Union interface {
- isMsgWithOneof_Union()
-}
-
-type MsgWithOneof_Title struct {
- Title string `protobuf:"bytes,1,opt,name=title,oneof"`
-}
-type MsgWithOneof_Salary struct {
- Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"`
-}
-type MsgWithOneof_Country struct {
- Country string `protobuf:"bytes,3,opt,name=Country,oneof"`
-}
-type MsgWithOneof_HomeAddress struct {
- HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"`
-}
-
-func (*MsgWithOneof_Title) isMsgWithOneof_Union() {}
-func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {}
-func (*MsgWithOneof_Country) isMsgWithOneof_Union() {}
-func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {}
-
-func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-
-func (m *MsgWithOneof) GetTitle() string {
- if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok {
- return x.Title
- }
- return ""
-}
-
-func (m *MsgWithOneof) GetSalary() int64 {
- if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok {
- return x.Salary
- }
- return 0
-}
-
-func (m *MsgWithOneof) GetCountry() string {
- if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok {
- return x.Country
- }
- return ""
-}
-
-func (m *MsgWithOneof) GetHomeAddress() string {
- if x, ok := m.GetUnion().(*MsgWithOneof_HomeAddress); ok {
- return x.HomeAddress
- }
- return ""
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{
- (*MsgWithOneof_Title)(nil),
- (*MsgWithOneof_Salary)(nil),
- (*MsgWithOneof_Country)(nil),
- (*MsgWithOneof_HomeAddress)(nil),
- }
-}
-
-func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*MsgWithOneof)
- // union
- switch x := m.Union.(type) {
- case *MsgWithOneof_Title:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Title)
- case *MsgWithOneof_Salary:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Salary))
- case *MsgWithOneof_Country:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Country)
- case *MsgWithOneof_HomeAddress:
- b.EncodeVarint(4<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.HomeAddress)
- case nil:
- default:
- return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x)
- }
- return nil
-}
-
-func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*MsgWithOneof)
- switch tag {
- case 1: // union.title
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &MsgWithOneof_Title{x}
- return true, err
- case 2: // union.salary
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &MsgWithOneof_Salary{int64(x)}
- return true, err
- case 3: // union.Country
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &MsgWithOneof_Country{x}
- return true, err
- case 4: // union.home_address
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &MsgWithOneof_HomeAddress{x}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*MsgWithOneof)
- // union
- switch x := m.Union.(type) {
- case *MsgWithOneof_Title:
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Title)))
- n += len(x.Title)
- case *MsgWithOneof_Salary:
- n += proto.SizeVarint(2<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Salary))
- case *MsgWithOneof_Country:
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Country)))
- n += len(x.Country)
- case *MsgWithOneof_HomeAddress:
- n += proto.SizeVarint(4<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.HomeAddress)))
- n += len(x.HomeAddress)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Real struct {
- Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Real) Reset() { *m = Real{} }
-func (m *Real) String() string { return proto.CompactTextString(m) }
-func (*Real) ProtoMessage() {}
-func (*Real) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
-
-var extRange_Real = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*Real) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_Real
-}
-
-func (m *Real) GetValue() float64 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return 0
-}
-
-type Complex struct {
- Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Complex) Reset() { *m = Complex{} }
-func (m *Complex) String() string { return proto.CompactTextString(m) }
-func (*Complex) ProtoMessage() {}
-func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
-
-var extRange_Complex = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*Complex) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_Complex
-}
-
-func (m *Complex) GetImaginary() float64 {
- if m != nil && m.Imaginary != nil {
- return *m.Imaginary
- }
- return 0
-}
-
-var E_Complex_RealExtension = &proto.ExtensionDesc{
- ExtendedType: (*Real)(nil),
- ExtensionType: (*Complex)(nil),
- Field: 123,
- Name: "jsonpb.Complex.real_extension",
- Tag: "bytes,123,opt,name=real_extension,json=realExtension",
- Filename: "test_objects.proto",
-}
-
-type KnownTypes struct {
- An *google_protobuf.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"`
- Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"`
- St *google_protobuf2.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"`
- Ts *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"`
- Lv *google_protobuf2.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"`
- Val *google_protobuf2.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"`
- Dbl *google_protobuf4.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"`
- Flt *google_protobuf4.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"`
- I64 *google_protobuf4.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"`
- U64 *google_protobuf4.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"`
- I32 *google_protobuf4.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"`
- U32 *google_protobuf4.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"`
- Bool *google_protobuf4.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"`
- Str *google_protobuf4.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"`
- Bytes *google_protobuf4.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *KnownTypes) Reset() { *m = KnownTypes{} }
-func (m *KnownTypes) String() string { return proto.CompactTextString(m) }
-func (*KnownTypes) ProtoMessage() {}
-func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
-
-func (m *KnownTypes) GetAn() *google_protobuf.Any {
- if m != nil {
- return m.An
- }
- return nil
-}
-
-func (m *KnownTypes) GetDur() *google_protobuf1.Duration {
- if m != nil {
- return m.Dur
- }
- return nil
-}
-
-func (m *KnownTypes) GetSt() *google_protobuf2.Struct {
- if m != nil {
- return m.St
- }
- return nil
-}
-
-func (m *KnownTypes) GetTs() *google_protobuf3.Timestamp {
- if m != nil {
- return m.Ts
- }
- return nil
-}
-
-func (m *KnownTypes) GetLv() *google_protobuf2.ListValue {
- if m != nil {
- return m.Lv
- }
- return nil
-}
-
-func (m *KnownTypes) GetVal() *google_protobuf2.Value {
- if m != nil {
- return m.Val
- }
- return nil
-}
-
-func (m *KnownTypes) GetDbl() *google_protobuf4.DoubleValue {
- if m != nil {
- return m.Dbl
- }
- return nil
-}
-
-func (m *KnownTypes) GetFlt() *google_protobuf4.FloatValue {
- if m != nil {
- return m.Flt
- }
- return nil
-}
-
-func (m *KnownTypes) GetI64() *google_protobuf4.Int64Value {
- if m != nil {
- return m.I64
- }
- return nil
-}
-
-func (m *KnownTypes) GetU64() *google_protobuf4.UInt64Value {
- if m != nil {
- return m.U64
- }
- return nil
-}
-
-func (m *KnownTypes) GetI32() *google_protobuf4.Int32Value {
- if m != nil {
- return m.I32
- }
- return nil
-}
-
-func (m *KnownTypes) GetU32() *google_protobuf4.UInt32Value {
- if m != nil {
- return m.U32
- }
- return nil
-}
-
-func (m *KnownTypes) GetBool() *google_protobuf4.BoolValue {
- if m != nil {
- return m.Bool
- }
- return nil
-}
-
-func (m *KnownTypes) GetStr() *google_protobuf4.StringValue {
- if m != nil {
- return m.Str
- }
- return nil
-}
-
-func (m *KnownTypes) GetBytes() *google_protobuf4.BytesValue {
- if m != nil {
- return m.Bytes
- }
- return nil
-}
-
-var E_Name = &proto.ExtensionDesc{
- ExtendedType: (*Real)(nil),
- ExtensionType: (*string)(nil),
- Field: 124,
- Name: "jsonpb.name",
- Tag: "bytes,124,opt,name=name",
- Filename: "test_objects.proto",
-}
-
-func init() {
- proto.RegisterType((*Simple)(nil), "jsonpb.Simple")
- proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites")
- proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats")
- proto.RegisterType((*Widget)(nil), "jsonpb.Widget")
- proto.RegisterType((*Maps)(nil), "jsonpb.Maps")
- proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
- proto.RegisterType((*Real)(nil), "jsonpb.Real")
- proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
- proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
- proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
- proto.RegisterExtension(E_Complex_RealExtension)
- proto.RegisterExtension(E_Name)
-}
-
-func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) }
-
-var fileDescriptor1 = []byte{
- // 1160 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x95, 0x41, 0x73, 0xdb, 0x44,
- 0x14, 0xc7, 0x23, 0xc9, 0x92, 0xed, 0x75, 0x92, 0x9a, 0x6d, 0xda, 0x2a, 0x26, 0x80, 0xc6, 0x94,
- 0x22, 0x0a, 0x75, 0x07, 0xc7, 0xe3, 0x61, 0x0a, 0x97, 0xa4, 0x71, 0x29, 0x43, 0x13, 0x98, 0x4d,
- 0x43, 0x8f, 0x1e, 0x39, 0x5a, 0xbb, 0x2a, 0xf2, 0xae, 0x67, 0x77, 0x95, 0xd4, 0x03, 0x87, 0x9c,
- 0x39, 0x32, 0x7c, 0x05, 0xf8, 0x08, 0x1c, 0xf8, 0x74, 0xcc, 0xdb, 0x95, 0xac, 0xc4, 0x8e, 0x4f,
- 0xf1, 0x7b, 0xef, 0xff, 0xfe, 0x59, 0xed, 0x6f, 0x77, 0x1f, 0xc2, 0x8a, 0x4a, 0x35, 0xe4, 0xa3,
- 0x77, 0xf4, 0x5c, 0xc9, 0xce, 0x4c, 0x70, 0xc5, 0xb1, 0xf7, 0x4e, 0x72, 0x36, 0x1b, 0xb5, 0x76,
- 0x27, 0x9c, 0x4f, 0x52, 0xfa, 0x54, 0x67, 0x47, 0xd9, 0xf8, 0x69, 0xc4, 0xe6, 0x46, 0xd2, 0xfa,
- 0x78, 0xb9, 0x14, 0x67, 0x22, 0x52, 0x09, 0x67, 0x79, 0x7d, 0x6f, 0xb9, 0x2e, 0x95, 0xc8, 0xce,
- 0x55, 0x5e, 0xfd, 0x64, 0xb9, 0xaa, 0x92, 0x29, 0x95, 0x2a, 0x9a, 0xce, 0xd6, 0xd9, 0x5f, 0x8a,
- 0x68, 0x36, 0xa3, 0x22, 0x5f, 0x61, 0xfb, 0x6f, 0x1b, 0x79, 0xa7, 0xc9, 0x74, 0x96, 0x52, 0x7c,
- 0x0f, 0x79, 0x7c, 0x38, 0xe2, 0x3c, 0xf5, 0xad, 0xc0, 0x0a, 0x6b, 0xc4, 0xe5, 0x87, 0x9c, 0xa7,
- 0xf8, 0x01, 0xaa, 0xf2, 0x61, 0xc2, 0xd4, 0x7e, 0xd7, 0xb7, 0x03, 0x2b, 0x74, 0x89, 0xc7, 0x7f,
- 0x80, 0x68, 0x51, 0xe8, 0xf7, 0x7c, 0x27, 0xb0, 0x42, 0xc7, 0x14, 0xfa, 0x3d, 0xbc, 0x8b, 0x6a,
- 0x7c, 0x98, 0x99, 0x96, 0x4a, 0x60, 0x85, 0x5b, 0xa4, 0xca, 0xcf, 0x74, 0x58, 0x96, 0xfa, 0x3d,
- 0xdf, 0x0d, 0xac, 0xb0, 0x92, 0x97, 0x8a, 0x2e, 0x69, 0xba, 0xbc, 0xc0, 0x0a, 0x3f, 0x20, 0x55,
- 0x7e, 0x7a, 0xad, 0x4b, 0x9a, 0xae, 0x6a, 0x60, 0x85, 0x38, 0x2f, 0xf5, 0x7b, 0x66, 0x11, 0xe3,
- 0x94, 0x47, 0xca, 0xaf, 0x05, 0x56, 0x68, 0x13, 0x8f, 0xbf, 0x80, 0xc8, 0xf4, 0xc4, 0x3c, 0x1b,
- 0xa5, 0xd4, 0xaf, 0x07, 0x56, 0x68, 0x91, 0x2a, 0x3f, 0xd2, 0x61, 0x6e, 0xa7, 0x44, 0xc2, 0x26,
- 0x3e, 0x0a, 0xac, 0xb0, 0x0e, 0x76, 0x3a, 0x34, 0x76, 0xa3, 0xb9, 0xa2, 0xd2, 0x6f, 0x04, 0x56,
- 0xb8, 0x49, 0x3c, 0x7e, 0x08, 0x51, 0xfb, 0x4f, 0x0b, 0xa1, 0x13, 0xce, 0x5e, 0x24, 0x2c, 0x51,
- 0x54, 0xe2, 0xbb, 0xc8, 0x1d, 0x0f, 0x59, 0xc4, 0xf4, 0x56, 0xd9, 0xa4, 0x32, 0x3e, 0x89, 0x18,
- 0x6c, 0xe0, 0x78, 0x38, 0x4b, 0xd8, 0x58, 0x6f, 0x94, 0x4d, 0xdc, 0xf1, 0xcf, 0x09, 0x1b, 0x9b,
- 0x34, 0x83, 0xb4, 0x93, 0xa7, 0x4f, 0x20, 0x7d, 0x17, 0xb9, 0xb1, 0xb6, 0xa8, 0xe8, 0xd5, 0x55,
- 0xe2, 0xdc, 0x22, 0x36, 0x16, 0xae, 0xce, 0xba, 0x71, 0x61, 0x11, 0x1b, 0x0b, 0x2f, 0x4f, 0x83,
- 0x45, 0xfb, 0x1f, 0x1b, 0x55, 0x09, 0x9d, 0xd1, 0x48, 0x49, 0x90, 0x88, 0x82, 0x9e, 0x03, 0xf4,
- 0x44, 0x41, 0x4f, 0x2c, 0xe8, 0x39, 0x40, 0x4f, 0x2c, 0xe8, 0x89, 0x05, 0x3d, 0x07, 0xe8, 0x89,
- 0x05, 0x3d, 0x51, 0xd2, 0x73, 0x80, 0x9e, 0x28, 0xe9, 0x89, 0x92, 0x9e, 0x03, 0xf4, 0x44, 0x49,
- 0x4f, 0x94, 0xf4, 0x1c, 0xa0, 0x27, 0x4e, 0xaf, 0x75, 0x2d, 0xe8, 0x39, 0x40, 0x4f, 0x94, 0xf4,
- 0xc4, 0x82, 0x9e, 0x03, 0xf4, 0xc4, 0x82, 0x9e, 0x28, 0xe9, 0x39, 0x40, 0x4f, 0x94, 0xf4, 0x44,
- 0x49, 0xcf, 0x01, 0x7a, 0xa2, 0xa4, 0x27, 0x16, 0xf4, 0x1c, 0xa0, 0x27, 0x0c, 0xbd, 0x7f, 0x6d,
- 0xe4, 0xbd, 0x49, 0xe2, 0x09, 0x55, 0xf8, 0x31, 0x72, 0xcf, 0x79, 0xca, 0x85, 0x26, 0xb7, 0xdd,
- 0xdd, 0xe9, 0x98, 0x2b, 0xda, 0x31, 0xe5, 0xce, 0x73, 0xa8, 0x11, 0x23, 0xc1, 0x4f, 0xc0, 0xcf,
- 0xa8, 0x61, 0xf3, 0xd6, 0xa9, 0x3d, 0xa1, 0xff, 0xe2, 0x47, 0xc8, 0x93, 0xfa, 0x2a, 0xe9, 0x53,
- 0xd5, 0xe8, 0x6e, 0x17, 0x6a, 0x73, 0xc1, 0x48, 0x5e, 0xc5, 0x5f, 0x98, 0x0d, 0xd1, 0x4a, 0x58,
- 0xe7, 0xaa, 0x12, 0x36, 0x28, 0x97, 0x56, 0x85, 0x01, 0xec, 0xef, 0x68, 0xcf, 0x3b, 0x85, 0x32,
- 0xe7, 0x4e, 0x8a, 0x3a, 0xfe, 0x0a, 0xd5, 0xc5, 0xb0, 0x10, 0xdf, 0xd3, 0xb6, 0x2b, 0xe2, 0x9a,
- 0xc8, 0x7f, 0xb5, 0x3f, 0x43, 0xae, 0x59, 0x74, 0x15, 0x39, 0x64, 0x70, 0xd4, 0xdc, 0xc0, 0x75,
- 0xe4, 0x7e, 0x4f, 0x06, 0x83, 0x93, 0xa6, 0x85, 0x6b, 0xa8, 0x72, 0xf8, 0xea, 0x6c, 0xd0, 0xb4,
- 0xdb, 0x7f, 0xd9, 0xa8, 0x72, 0x1c, 0xcd, 0x24, 0xfe, 0x16, 0x35, 0xa6, 0xe6, 0xb8, 0xc0, 0xde,
- 0xeb, 0x33, 0xd6, 0xe8, 0x7e, 0x58, 0xf8, 0x83, 0xa4, 0x73, 0xac, 0xcf, 0xcf, 0xa9, 0x12, 0x03,
- 0xa6, 0xc4, 0x9c, 0xd4, 0xa7, 0x45, 0x8c, 0x0f, 0xd0, 0xd6, 0x54, 0x9f, 0xcd, 0xe2, 0xab, 0x6d,
- 0xdd, 0xfe, 0xd1, 0xcd, 0x76, 0x38, 0xaf, 0xe6, 0xb3, 0x8d, 0x41, 0x63, 0x5a, 0x66, 0x5a, 0xdf,
- 0xa1, 0xed, 0x9b, 0xfe, 0xb8, 0x89, 0x9c, 0x5f, 0xe9, 0x5c, 0x63, 0x74, 0x08, 0xfc, 0xc4, 0x3b,
- 0xc8, 0xbd, 0x88, 0xd2, 0x8c, 0xea, 0xeb, 0x57, 0x27, 0x26, 0x78, 0x66, 0x7f, 0x63, 0xb5, 0x4e,
- 0x50, 0x73, 0xd9, 0xfe, 0x7a, 0x7f, 0xcd, 0xf4, 0x3f, 0xbc, 0xde, 0xbf, 0x0a, 0xa5, 0xf4, 0x6b,
- 0xff, 0x61, 0xa1, 0xcd, 0x63, 0x39, 0x79, 0x93, 0xa8, 0xb7, 0x3f, 0x31, 0xca, 0xc7, 0xf8, 0x3e,
- 0x72, 0x55, 0xa2, 0x52, 0xaa, 0xed, 0xea, 0x2f, 0x37, 0x88, 0x09, 0xb1, 0x8f, 0x3c, 0x19, 0xa5,
- 0x91, 0x98, 0x6b, 0x4f, 0xe7, 0xe5, 0x06, 0xc9, 0x63, 0xdc, 0x42, 0xd5, 0xe7, 0x3c, 0x83, 0x95,
- 0xe8, 0x67, 0x01, 0x7a, 0x8a, 0x04, 0xfe, 0x14, 0x6d, 0xbe, 0xe5, 0x53, 0x3a, 0x8c, 0xe2, 0x58,
- 0x50, 0x29, 0xf5, 0x0b, 0x01, 0x82, 0x06, 0x64, 0x0f, 0x4c, 0xf2, 0xb0, 0x8a, 0xdc, 0x8c, 0x25,
- 0x9c, 0xb5, 0x1f, 0xa1, 0x0a, 0xa1, 0x51, 0x5a, 0x7e, 0xbe, 0x65, 0xde, 0x08, 0x1d, 0x3c, 0xae,
- 0xd5, 0xe2, 0xe6, 0xd5, 0xd5, 0xd5, 0x95, 0xdd, 0xbe, 0x84, 0xff, 0x08, 0x5f, 0xf2, 0x1e, 0xef,
- 0xa1, 0x7a, 0x32, 0x8d, 0x26, 0x09, 0x83, 0x95, 0x19, 0x79, 0x99, 0x28, 0x5b, 0xba, 0x47, 0x68,
- 0x5b, 0xd0, 0x28, 0x1d, 0xd2, 0xf7, 0x8a, 0x32, 0x99, 0x70, 0x86, 0x37, 0xcb, 0x23, 0x15, 0xa5,
- 0xfe, 0x6f, 0x37, 0xcf, 0x64, 0x6e, 0x4f, 0xb6, 0xa0, 0x69, 0x50, 0xf4, 0xb4, 0xff, 0x73, 0x11,
- 0xfa, 0x91, 0xf1, 0x4b, 0xf6, 0x7a, 0x3e, 0xa3, 0x12, 0x3f, 0x44, 0x76, 0xc4, 0xfc, 0x6d, 0xdd,
- 0xba, 0xd3, 0x31, 0xf3, 0xa9, 0x53, 0xcc, 0xa7, 0xce, 0x01, 0x9b, 0x13, 0x3b, 0x62, 0xf8, 0x4b,
- 0xe4, 0xc4, 0x99, 0xb9, 0xa5, 0x8d, 0xee, 0xee, 0x8a, 0xec, 0x28, 0x9f, 0x92, 0x04, 0x54, 0xf8,
- 0x73, 0x64, 0x4b, 0xe5, 0x6f, 0x6a, 0xed, 0x83, 0x15, 0xed, 0xa9, 0x9e, 0x98, 0xc4, 0x96, 0x70,
- 0xfb, 0x6d, 0x25, 0x73, 0xbe, 0xad, 0x15, 0xe1, 0xeb, 0x62, 0x78, 0x12, 0x5b, 0x49, 0xd0, 0xa6,
- 0x17, 0xfe, 0x9d, 0x35, 0xda, 0x57, 0x89, 0x54, 0xbf, 0xc0, 0x0e, 0x13, 0x3b, 0xbd, 0xc0, 0x21,
- 0x72, 0x2e, 0xa2, 0xd4, 0x6f, 0x6a, 0xf1, 0xfd, 0x15, 0xb1, 0x11, 0x82, 0x04, 0x77, 0x90, 0x13,
- 0x8f, 0x52, 0xcd, 0xbc, 0xd1, 0xdd, 0x5b, 0xfd, 0x2e, 0xfd, 0xc8, 0xe5, 0xfa, 0x78, 0x94, 0xe2,
- 0x27, 0xc8, 0x19, 0xa7, 0x4a, 0x1f, 0x01, 0xb8, 0x70, 0xcb, 0x7a, 0xfd, 0x5c, 0xe6, 0xf2, 0x71,
- 0xaa, 0x40, 0x9e, 0xe4, 0xb3, 0xf5, 0x36, 0xb9, 0xbe, 0x42, 0xb9, 0x3c, 0xe9, 0xf7, 0x60, 0x35,
- 0x59, 0xbf, 0xa7, 0xa7, 0xca, 0x6d, 0xab, 0x39, 0xbb, 0xae, 0xcf, 0xfa, 0x3d, 0x6d, 0xbf, 0xdf,
- 0xd5, 0x43, 0x78, 0x8d, 0xfd, 0x7e, 0xb7, 0xb0, 0xdf, 0xef, 0x6a, 0xfb, 0xfd, 0xae, 0x9e, 0xcc,
- 0xeb, 0xec, 0x17, 0xfa, 0x4c, 0xeb, 0x2b, 0x7a, 0x84, 0xd5, 0xd7, 0x6c, 0x3a, 0xdc, 0x61, 0x23,
- 0xd7, 0x3a, 0xf0, 0x87, 0xd7, 0x08, 0xad, 0xf1, 0x37, 0x63, 0x21, 0xf7, 0x97, 0x4a, 0xe0, 0xaf,
- 0x91, 0x5b, 0x0e, 0xf7, 0xdb, 0x3e, 0x40, 0x8f, 0x0b, 0xd3, 0x60, 0x94, 0xcf, 0x02, 0x54, 0x61,
- 0xd1, 0x94, 0x2e, 0x1d, 0xfc, 0xdf, 0xf5, 0x0b, 0xa3, 0x2b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff,
- 0xd5, 0x39, 0x32, 0x09, 0xf9, 0x09, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto
deleted file mode 100644
index 0d2fc1fad..000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto
+++ /dev/null
@@ -1,147 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/duration.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/timestamp.proto";
-import "google/protobuf/wrappers.proto";
-
-package jsonpb;
-
-// Test message for holding primitive types.
-message Simple {
- optional bool o_bool = 1;
- optional int32 o_int32 = 2;
- optional int64 o_int64 = 3;
- optional uint32 o_uint32 = 4;
- optional uint64 o_uint64 = 5;
- optional sint32 o_sint32 = 6;
- optional sint64 o_sint64 = 7;
- optional float o_float = 8;
- optional double o_double = 9;
- optional string o_string = 10;
- optional bytes o_bytes = 11;
-}
-
-// Test message for holding special non-finites primitives.
-message NonFinites {
- optional float f_nan = 1;
- optional float f_pinf = 2;
- optional float f_ninf = 3;
- optional double d_nan = 4;
- optional double d_pinf = 5;
- optional double d_ninf = 6;
-}
-
-// Test message for holding repeated primitives.
-message Repeats {
- repeated bool r_bool = 1;
- repeated int32 r_int32 = 2;
- repeated int64 r_int64 = 3;
- repeated uint32 r_uint32 = 4;
- repeated uint64 r_uint64 = 5;
- repeated sint32 r_sint32 = 6;
- repeated sint64 r_sint64 = 7;
- repeated float r_float = 8;
- repeated double r_double = 9;
- repeated string r_string = 10;
- repeated bytes r_bytes = 11;
-}
-
-// Test message for holding enums and nested messages.
-message Widget {
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- };
- optional Color color = 1;
- repeated Color r_color = 2;
-
- optional Simple simple = 10;
- repeated Simple r_simple = 11;
-
- optional Repeats repeats = 20;
- repeated Repeats r_repeats = 21;
-}
-
-message Maps {
- map<int64, string> m_int64_str = 1;
- map<bool, Simple> m_bool_simple = 2;
-}
-
-message MsgWithOneof {
- oneof union {
- string title = 1;
- int64 salary = 2;
- string Country = 3;
- string home_address = 4;
- }
-}
-
-message Real {
- optional double value = 1;
- extensions 100 to max;
-}
-
-extend Real {
- optional string name = 124;
-}
-
-message Complex {
- extend Real {
- optional Complex real_extension = 123;
- }
- optional double imaginary = 1;
- extensions 100 to max;
-}
-
-message KnownTypes {
- optional google.protobuf.Any an = 14;
- optional google.protobuf.Duration dur = 1;
- optional google.protobuf.Struct st = 12;
- optional google.protobuf.Timestamp ts = 2;
- optional google.protobuf.ListValue lv = 15;
- optional google.protobuf.Value val = 16;
-
- optional google.protobuf.DoubleValue dbl = 3;
- optional google.protobuf.FloatValue flt = 4;
- optional google.protobuf.Int64Value i64 = 5;
- optional google.protobuf.UInt64Value u64 = 6;
- optional google.protobuf.Int32Value i32 = 7;
- optional google.protobuf.UInt32Value u32 = 8;
- optional google.protobuf.BoolValue bool = 9;
- optional google.protobuf.StringValue str = 10;
- optional google.protobuf.BytesValue bytes = 11;
-}
diff --git a/vendor/github.com/golang/protobuf/proto/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go
deleted file mode 100644
index 41451a407..000000000
--- a/vendor/github.com/golang/protobuf/proto/all_test.go
+++ /dev/null
@@ -1,2278 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "math"
- "math/rand"
- "reflect"
- "runtime/debug"
- "strings"
- "testing"
- "time"
-
- . "github.com/golang/protobuf/proto"
- . "github.com/golang/protobuf/proto/testdata"
-)
-
-var globalO *Buffer
-
-func old() *Buffer {
- if globalO == nil {
- globalO = NewBuffer(nil)
- }
- globalO.Reset()
- return globalO
-}
-
-func equalbytes(b1, b2 []byte, t *testing.T) {
- if len(b1) != len(b2) {
- t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2))
- return
- }
- for i := 0; i < len(b1); i++ {
- if b1[i] != b2[i] {
- t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2)
- }
- }
-}
-
-func initGoTestField() *GoTestField {
- f := new(GoTestField)
- f.Label = String("label")
- f.Type = String("type")
- return f
-}
-
-// These are all structurally equivalent but the tag numbers differ.
-// (It's remarkable that required, optional, and repeated all have
-// 8 letters.)
-func initGoTest_RequiredGroup() *GoTest_RequiredGroup {
- return &GoTest_RequiredGroup{
- RequiredField: String("required"),
- }
-}
-
-func initGoTest_OptionalGroup() *GoTest_OptionalGroup {
- return &GoTest_OptionalGroup{
- RequiredField: String("optional"),
- }
-}
-
-func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup {
- return &GoTest_RepeatedGroup{
- RequiredField: String("repeated"),
- }
-}
-
-func initGoTest(setdefaults bool) *GoTest {
- pb := new(GoTest)
- if setdefaults {
- pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted)
- pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted)
- pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted)
- pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted)
- pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted)
- pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted)
- pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted)
- pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted)
- pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted)
- pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted)
- pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted
- pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted)
- pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted)
- }
-
- pb.Kind = GoTest_TIME.Enum()
- pb.RequiredField = initGoTestField()
- pb.F_BoolRequired = Bool(true)
- pb.F_Int32Required = Int32(3)
- pb.F_Int64Required = Int64(6)
- pb.F_Fixed32Required = Uint32(32)
- pb.F_Fixed64Required = Uint64(64)
- pb.F_Uint32Required = Uint32(3232)
- pb.F_Uint64Required = Uint64(6464)
- pb.F_FloatRequired = Float32(3232)
- pb.F_DoubleRequired = Float64(6464)
- pb.F_StringRequired = String("string")
- pb.F_BytesRequired = []byte("bytes")
- pb.F_Sint32Required = Int32(-32)
- pb.F_Sint64Required = Int64(-64)
- pb.Requiredgroup = initGoTest_RequiredGroup()
-
- return pb
-}
-
-func fail(msg string, b *bytes.Buffer, s string, t *testing.T) {
- data := b.Bytes()
- ld := len(data)
- ls := len(s) / 2
-
- fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls)
-
- // find the interesting spot - n
- n := ls
- if ld < ls {
- n = ld
- }
- j := 0
- for i := 0; i < n; i++ {
- bs := hex(s[j])*16 + hex(s[j+1])
- j += 2
- if data[i] == bs {
- continue
- }
- n = i
- break
- }
- l := n - 10
- if l < 0 {
- l = 0
- }
- h := n + 10
-
- // find the interesting spot - n
- fmt.Printf("is[%d]:", l)
- for i := l; i < h; i++ {
- if i >= ld {
- fmt.Printf(" --")
- continue
- }
- fmt.Printf(" %.2x", data[i])
- }
- fmt.Printf("\n")
-
- fmt.Printf("sb[%d]:", l)
- for i := l; i < h; i++ {
- if i >= ls {
- fmt.Printf(" --")
- continue
- }
- bs := hex(s[j])*16 + hex(s[j+1])
- j += 2
- fmt.Printf(" %.2x", bs)
- }
- fmt.Printf("\n")
-
- t.Fail()
-
- // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes())
- // Print the output in a partially-decoded format; can
- // be helpful when updating the test. It produces the output
- // that is pasted, with minor edits, into the argument to verify().
- // data := b.Bytes()
- // nesting := 0
- // for b.Len() > 0 {
- // start := len(data) - b.Len()
- // var u uint64
- // u, err := DecodeVarint(b)
- // if err != nil {
- // fmt.Printf("decode error on varint:", err)
- // return
- // }
- // wire := u & 0x7
- // tag := u >> 3
- // switch wire {
- // case WireVarint:
- // v, err := DecodeVarint(b)
- // if err != nil {
- // fmt.Printf("decode error on varint:", err)
- // return
- // }
- // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n",
- // data[start:len(data)-b.Len()], tag, wire, v)
- // case WireFixed32:
- // v, err := DecodeFixed32(b)
- // if err != nil {
- // fmt.Printf("decode error on fixed32:", err)
- // return
- // }
- // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n",
- // data[start:len(data)-b.Len()], tag, wire, v)
- // case WireFixed64:
- // v, err := DecodeFixed64(b)
- // if err != nil {
- // fmt.Printf("decode error on fixed64:", err)
- // return
- // }
- // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n",
- // data[start:len(data)-b.Len()], tag, wire, v)
- // case WireBytes:
- // nb, err := DecodeVarint(b)
- // if err != nil {
- // fmt.Printf("decode error on bytes:", err)
- // return
- // }
- // after_tag := len(data) - b.Len()
- // str := make([]byte, nb)
- // _, err = b.Read(str)
- // if err != nil {
- // fmt.Printf("decode error on bytes:", err)
- // return
- // }
- // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n",
- // data[start:after_tag], str, tag, wire)
- // case WireStartGroup:
- // nesting++
- // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n",
- // data[start:len(data)-b.Len()], tag, nesting)
- // case WireEndGroup:
- // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n",
- // data[start:len(data)-b.Len()], tag, nesting)
- // nesting--
- // default:
- // fmt.Printf("unrecognized wire type %d\n", wire)
- // return
- // }
- // }
-}
-
-func hex(c uint8) uint8 {
- if '0' <= c && c <= '9' {
- return c - '0'
- }
- if 'a' <= c && c <= 'f' {
- return 10 + c - 'a'
- }
- if 'A' <= c && c <= 'F' {
- return 10 + c - 'A'
- }
- return 0
-}
-
-func equal(b []byte, s string, t *testing.T) bool {
- if 2*len(b) != len(s) {
- // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t)
- fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s))
- return false
- }
- for i, j := 0, 0; i < len(b); i, j = i+1, j+2 {
- x := hex(s[j])*16 + hex(s[j+1])
- if b[i] != x {
- // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t)
- fmt.Printf("bad byte[%d]:%x %x", i, b[i], x)
- return false
- }
- }
- return true
-}
-
-func overify(t *testing.T, pb *GoTest, expected string) {
- o := old()
- err := o.Marshal(pb)
- if err != nil {
- fmt.Printf("overify marshal-1 err = %v", err)
- o.DebugPrint("", o.Bytes())
- t.Fatalf("expected = %s", expected)
- }
- if !equal(o.Bytes(), expected, t) {
- o.DebugPrint("overify neq 1", o.Bytes())
- t.Fatalf("expected = %s", expected)
- }
-
- // Now test Unmarshal by recreating the original buffer.
- pbd := new(GoTest)
- err = o.Unmarshal(pbd)
- if err != nil {
- t.Fatalf("overify unmarshal err = %v", err)
- o.DebugPrint("", o.Bytes())
- t.Fatalf("string = %s", expected)
- }
- o.Reset()
- err = o.Marshal(pbd)
- if err != nil {
- t.Errorf("overify marshal-2 err = %v", err)
- o.DebugPrint("", o.Bytes())
- t.Fatalf("string = %s", expected)
- }
- if !equal(o.Bytes(), expected, t) {
- o.DebugPrint("overify neq 2", o.Bytes())
- t.Fatalf("string = %s", expected)
- }
-}
-
-// Simple tests for numeric encode/decode primitives (varint, etc.)
-func TestNumericPrimitives(t *testing.T) {
- for i := uint64(0); i < 1e6; i += 111 {
- o := old()
- if o.EncodeVarint(i) != nil {
- t.Error("EncodeVarint")
- break
- }
- x, e := o.DecodeVarint()
- if e != nil {
- t.Fatal("DecodeVarint")
- }
- if x != i {
- t.Fatal("varint decode fail:", i, x)
- }
-
- o = old()
- if o.EncodeFixed32(i) != nil {
- t.Fatal("encFixed32")
- }
- x, e = o.DecodeFixed32()
- if e != nil {
- t.Fatal("decFixed32")
- }
- if x != i {
- t.Fatal("fixed32 decode fail:", i, x)
- }
-
- o = old()
- if o.EncodeFixed64(i*1234567) != nil {
- t.Error("encFixed64")
- break
- }
- x, e = o.DecodeFixed64()
- if e != nil {
- t.Error("decFixed64")
- break
- }
- if x != i*1234567 {
- t.Error("fixed64 decode fail:", i*1234567, x)
- break
- }
-
- o = old()
- i32 := int32(i - 12345)
- if o.EncodeZigzag32(uint64(i32)) != nil {
- t.Fatal("EncodeZigzag32")
- }
- x, e = o.DecodeZigzag32()
- if e != nil {
- t.Fatal("DecodeZigzag32")
- }
- if x != uint64(uint32(i32)) {
- t.Fatal("zigzag32 decode fail:", i32, x)
- }
-
- o = old()
- i64 := int64(i - 12345)
- if o.EncodeZigzag64(uint64(i64)) != nil {
- t.Fatal("EncodeZigzag64")
- }
- x, e = o.DecodeZigzag64()
- if e != nil {
- t.Fatal("DecodeZigzag64")
- }
- if x != uint64(i64) {
- t.Fatal("zigzag64 decode fail:", i64, x)
- }
- }
-}
-
-// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces.
-type fakeMarshaler struct {
- b []byte
- err error
-}
-
-func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err }
-func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) }
-func (f *fakeMarshaler) ProtoMessage() {}
-func (f *fakeMarshaler) Reset() {}
-
-type msgWithFakeMarshaler struct {
- M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"`
-}
-
-func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) }
-func (m *msgWithFakeMarshaler) ProtoMessage() {}
-func (m *msgWithFakeMarshaler) Reset() {}
-
-// Simple tests for proto messages that implement the Marshaler interface.
-func TestMarshalerEncoding(t *testing.T) {
- tests := []struct {
- name string
- m Message
- want []byte
- errType reflect.Type
- }{
- {
- name: "Marshaler that fails",
- m: &fakeMarshaler{
- err: errors.New("some marshal err"),
- b: []byte{5, 6, 7},
- },
- // Since the Marshal method returned bytes, they should be written to the
- // buffer. (For efficiency, we assume that Marshal implementations are
- // always correct w.r.t. RequiredNotSetError and output.)
- want: []byte{5, 6, 7},
- errType: reflect.TypeOf(errors.New("some marshal err")),
- },
- {
- name: "Marshaler that fails with RequiredNotSetError",
- m: &msgWithFakeMarshaler{
- M: &fakeMarshaler{
- err: &RequiredNotSetError{},
- b: []byte{5, 6, 7},
- },
- },
- // Since there's an error that can be continued after,
- // the buffer should be written.
- want: []byte{
- 10, 3, // for &msgWithFakeMarshaler
- 5, 6, 7, // for &fakeMarshaler
- },
- errType: reflect.TypeOf(&RequiredNotSetError{}),
- },
- {
- name: "Marshaler that succeeds",
- m: &fakeMarshaler{
- b: []byte{0, 1, 2, 3, 4, 127, 255},
- },
- want: []byte{0, 1, 2, 3, 4, 127, 255},
- },
- }
- for _, test := range tests {
- b := NewBuffer(nil)
- err := b.Marshal(test.m)
- if reflect.TypeOf(err) != test.errType {
- t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType)
- }
- if !reflect.DeepEqual(test.want, b.Bytes()) {
- t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want)
- }
- if size := Size(test.m); size != len(b.Bytes()) {
- t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes()))
- }
-
- m, mErr := Marshal(test.m)
- if !bytes.Equal(b.Bytes(), m) {
- t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes())
- }
- if !reflect.DeepEqual(err, mErr) {
- t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q",
- test.name, fmt.Sprint(mErr), fmt.Sprint(err))
- }
- }
-}
-
-// Simple tests for bytes
-func TestBytesPrimitives(t *testing.T) {
- o := old()
- bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'}
- if o.EncodeRawBytes(bytes) != nil {
- t.Error("EncodeRawBytes")
- }
- decb, e := o.DecodeRawBytes(false)
- if e != nil {
- t.Error("DecodeRawBytes")
- }
- equalbytes(bytes, decb, t)
-}
-
-// Simple tests for strings
-func TestStringPrimitives(t *testing.T) {
- o := old()
- s := "now is the time"
- if o.EncodeStringBytes(s) != nil {
- t.Error("enc_string")
- }
- decs, e := o.DecodeStringBytes()
- if e != nil {
- t.Error("dec_string")
- }
- if s != decs {
- t.Error("string encode/decode fail:", s, decs)
- }
-}
-
-// Do we catch the "required bit not set" case?
-func TestRequiredBit(t *testing.T) {
- o := old()
- pb := new(GoTest)
- err := o.Marshal(pb)
- if err == nil {
- t.Error("did not catch missing required fields")
- } else if strings.Index(err.Error(), "Kind") < 0 {
- t.Error("wrong error type:", err)
- }
-}
-
-// Check that all fields are nil.
-// Clearly silly, and a residue from a more interesting test with an earlier,
-// different initialization property, but it once caught a compiler bug so
-// it lives.
-func checkInitialized(pb *GoTest, t *testing.T) {
- if pb.F_BoolDefaulted != nil {
- t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted)
- }
- if pb.F_Int32Defaulted != nil {
- t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted)
- }
- if pb.F_Int64Defaulted != nil {
- t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted)
- }
- if pb.F_Fixed32Defaulted != nil {
- t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted)
- }
- if pb.F_Fixed64Defaulted != nil {
- t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted)
- }
- if pb.F_Uint32Defaulted != nil {
- t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted)
- }
- if pb.F_Uint64Defaulted != nil {
- t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted)
- }
- if pb.F_FloatDefaulted != nil {
- t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted)
- }
- if pb.F_DoubleDefaulted != nil {
- t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted)
- }
- if pb.F_StringDefaulted != nil {
- t.Error("New or Reset did not set string:", *pb.F_StringDefaulted)
- }
- if pb.F_BytesDefaulted != nil {
- t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted))
- }
- if pb.F_Sint32Defaulted != nil {
- t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted)
- }
- if pb.F_Sint64Defaulted != nil {
- t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted)
- }
-}
-
-// Does Reset() reset?
-func TestReset(t *testing.T) {
- pb := initGoTest(true)
- // muck with some values
- pb.F_BoolDefaulted = Bool(false)
- pb.F_Int32Defaulted = Int32(237)
- pb.F_Int64Defaulted = Int64(12346)
- pb.F_Fixed32Defaulted = Uint32(32000)
- pb.F_Fixed64Defaulted = Uint64(666)
- pb.F_Uint32Defaulted = Uint32(323232)
- pb.F_Uint64Defaulted = nil
- pb.F_FloatDefaulted = nil
- pb.F_DoubleDefaulted = Float64(0)
- pb.F_StringDefaulted = String("gotcha")
- pb.F_BytesDefaulted = []byte("asdfasdf")
- pb.F_Sint32Defaulted = Int32(123)
- pb.F_Sint64Defaulted = Int64(789)
- pb.Reset()
- checkInitialized(pb, t)
-}
-
-// All required fields set, no defaults provided.
-func TestEncodeDecode1(t *testing.T) {
- pb := initGoTest(false)
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 0x20
- "714000000000000000"+ // field 14, encoding 1, value 0x40
- "78a019"+ // field 15, encoding 0, value 0xca0 = 3232
- "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string"
- "b304"+ // field 70, encoding 3, start group
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // field 70, encoding 4, end group
- "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f") // field 103, encoding 0, 0x7f zigzag64
-}
-
-// All required fields set, defaults provided.
-func TestEncodeDecode2(t *testing.T) {
- pb := initGoTest(true)
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 32
- "714000000000000000"+ // field 14, encoding 1, value 64
- "78a019"+ // field 15, encoding 0, value 3232
- "8001c032"+ // field 16, encoding 0, value 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string"
- "c00201"+ // field 40, encoding 0, value 1
- "c80220"+ // field 41, encoding 0, value 32
- "d00240"+ // field 42, encoding 0, value 64
- "dd0240010000"+ // field 43, encoding 5, value 320
- "e1028002000000000000"+ // field 44, encoding 1, value 640
- "e8028019"+ // field 45, encoding 0, value 3200
- "f0028032"+ // field 46, encoding 0, value 6400
- "fd02e0659948"+ // field 47, encoding 5, value 314159.0
- "81030000000050971041"+ // field 48, encoding 1, value 271828.0
- "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n"
- "b304"+ // start group field 70 level 1
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // end group field 70 level 1
- "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f"+ // field 103, encoding 0, 0x7f zigzag64
- "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose"
- "90193f"+ // field 402, encoding 0, value 63
- "98197f") // field 403, encoding 0, value 127
-
-}
-
-// All default fields set to their default value by hand
-func TestEncodeDecode3(t *testing.T) {
- pb := initGoTest(false)
- pb.F_BoolDefaulted = Bool(true)
- pb.F_Int32Defaulted = Int32(32)
- pb.F_Int64Defaulted = Int64(64)
- pb.F_Fixed32Defaulted = Uint32(320)
- pb.F_Fixed64Defaulted = Uint64(640)
- pb.F_Uint32Defaulted = Uint32(3200)
- pb.F_Uint64Defaulted = Uint64(6400)
- pb.F_FloatDefaulted = Float32(314159)
- pb.F_DoubleDefaulted = Float64(271828)
- pb.F_StringDefaulted = String("hello, \"world!\"\n")
- pb.F_BytesDefaulted = []byte("Bignose")
- pb.F_Sint32Defaulted = Int32(-32)
- pb.F_Sint64Defaulted = Int64(-64)
-
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 32
- "714000000000000000"+ // field 14, encoding 1, value 64
- "78a019"+ // field 15, encoding 0, value 3232
- "8001c032"+ // field 16, encoding 0, value 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string"
- "c00201"+ // field 40, encoding 0, value 1
- "c80220"+ // field 41, encoding 0, value 32
- "d00240"+ // field 42, encoding 0, value 64
- "dd0240010000"+ // field 43, encoding 5, value 320
- "e1028002000000000000"+ // field 44, encoding 1, value 640
- "e8028019"+ // field 45, encoding 0, value 3200
- "f0028032"+ // field 46, encoding 0, value 6400
- "fd02e0659948"+ // field 47, encoding 5, value 314159.0
- "81030000000050971041"+ // field 48, encoding 1, value 271828.0
- "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n"
- "b304"+ // start group field 70 level 1
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // end group field 70 level 1
- "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f"+ // field 103, encoding 0, 0x7f zigzag64
- "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose"
- "90193f"+ // field 402, encoding 0, value 63
- "98197f") // field 403, encoding 0, value 127
-
-}
-
-// All required fields set, defaults provided, all non-defaulted optional fields have values.
-func TestEncodeDecode4(t *testing.T) {
- pb := initGoTest(true)
- pb.Table = String("hello")
- pb.Param = Int32(7)
- pb.OptionalField = initGoTestField()
- pb.F_BoolOptional = Bool(true)
- pb.F_Int32Optional = Int32(32)
- pb.F_Int64Optional = Int64(64)
- pb.F_Fixed32Optional = Uint32(3232)
- pb.F_Fixed64Optional = Uint64(6464)
- pb.F_Uint32Optional = Uint32(323232)
- pb.F_Uint64Optional = Uint64(646464)
- pb.F_FloatOptional = Float32(32.)
- pb.F_DoubleOptional = Float64(64.)
- pb.F_StringOptional = String("hello")
- pb.F_BytesOptional = []byte("Bignose")
- pb.F_Sint32Optional = Int32(-32)
- pb.F_Sint64Optional = Int64(-64)
- pb.Optionalgroup = initGoTest_OptionalGroup()
-
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello"
- "1807"+ // field 3, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 32
- "714000000000000000"+ // field 14, encoding 1, value 64
- "78a019"+ // field 15, encoding 0, value 3232
- "8001c032"+ // field 16, encoding 0, value 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string"
- "f00101"+ // field 30, encoding 0, value 1
- "f80120"+ // field 31, encoding 0, value 32
- "800240"+ // field 32, encoding 0, value 64
- "8d02a00c0000"+ // field 33, encoding 5, value 3232
- "91024019000000000000"+ // field 34, encoding 1, value 6464
- "9802a0dd13"+ // field 35, encoding 0, value 323232
- "a002c0ba27"+ // field 36, encoding 0, value 646464
- "ad0200000042"+ // field 37, encoding 5, value 32.0
- "b1020000000000005040"+ // field 38, encoding 1, value 64.0
- "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello"
- "c00201"+ // field 40, encoding 0, value 1
- "c80220"+ // field 41, encoding 0, value 32
- "d00240"+ // field 42, encoding 0, value 64
- "dd0240010000"+ // field 43, encoding 5, value 320
- "e1028002000000000000"+ // field 44, encoding 1, value 640
- "e8028019"+ // field 45, encoding 0, value 3200
- "f0028032"+ // field 46, encoding 0, value 6400
- "fd02e0659948"+ // field 47, encoding 5, value 314159.0
- "81030000000050971041"+ // field 48, encoding 1, value 271828.0
- "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n"
- "b304"+ // start group field 70 level 1
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // end group field 70 level 1
- "d305"+ // start group field 90 level 1
- "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional"
- "d405"+ // end group field 90 level 1
- "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f"+ // field 103, encoding 0, 0x7f zigzag64
- "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose"
- "f0123f"+ // field 302, encoding 0, value 63
- "f8127f"+ // field 303, encoding 0, value 127
- "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose"
- "90193f"+ // field 402, encoding 0, value 63
- "98197f") // field 403, encoding 0, value 127
-
-}
-
-// All required fields set, defaults provided, all repeated fields given two values.
-func TestEncodeDecode5(t *testing.T) {
- pb := initGoTest(true)
- pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()}
- pb.F_BoolRepeated = []bool{false, true}
- pb.F_Int32Repeated = []int32{32, 33}
- pb.F_Int64Repeated = []int64{64, 65}
- pb.F_Fixed32Repeated = []uint32{3232, 3333}
- pb.F_Fixed64Repeated = []uint64{6464, 6565}
- pb.F_Uint32Repeated = []uint32{323232, 333333}
- pb.F_Uint64Repeated = []uint64{646464, 656565}
- pb.F_FloatRepeated = []float32{32., 33.}
- pb.F_DoubleRepeated = []float64{64., 65.}
- pb.F_StringRepeated = []string{"hello", "sailor"}
- pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")}
- pb.F_Sint32Repeated = []int32{32, -32}
- pb.F_Sint64Repeated = []int64{64, -64}
- pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()}
-
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField)
- "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 32
- "714000000000000000"+ // field 14, encoding 1, value 64
- "78a019"+ // field 15, encoding 0, value 3232
- "8001c032"+ // field 16, encoding 0, value 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string"
- "a00100"+ // field 20, encoding 0, value 0
- "a00101"+ // field 20, encoding 0, value 1
- "a80120"+ // field 21, encoding 0, value 32
- "a80121"+ // field 21, encoding 0, value 33
- "b00140"+ // field 22, encoding 0, value 64
- "b00141"+ // field 22, encoding 0, value 65
- "bd01a00c0000"+ // field 23, encoding 5, value 3232
- "bd01050d0000"+ // field 23, encoding 5, value 3333
- "c1014019000000000000"+ // field 24, encoding 1, value 6464
- "c101a519000000000000"+ // field 24, encoding 1, value 6565
- "c801a0dd13"+ // field 25, encoding 0, value 323232
- "c80195ac14"+ // field 25, encoding 0, value 333333
- "d001c0ba27"+ // field 26, encoding 0, value 646464
- "d001b58928"+ // field 26, encoding 0, value 656565
- "dd0100000042"+ // field 27, encoding 5, value 32.0
- "dd0100000442"+ // field 27, encoding 5, value 33.0
- "e1010000000000005040"+ // field 28, encoding 1, value 64.0
- "e1010000000000405040"+ // field 28, encoding 1, value 65.0
- "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello"
- "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor"
- "c00201"+ // field 40, encoding 0, value 1
- "c80220"+ // field 41, encoding 0, value 32
- "d00240"+ // field 42, encoding 0, value 64
- "dd0240010000"+ // field 43, encoding 5, value 320
- "e1028002000000000000"+ // field 44, encoding 1, value 640
- "e8028019"+ // field 45, encoding 0, value 3200
- "f0028032"+ // field 46, encoding 0, value 6400
- "fd02e0659948"+ // field 47, encoding 5, value 314159.0
- "81030000000050971041"+ // field 48, encoding 1, value 271828.0
- "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n"
- "b304"+ // start group field 70 level 1
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // end group field 70 level 1
- "8305"+ // start group field 80 level 1
- "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated"
- "8405"+ // end group field 80 level 1
- "8305"+ // start group field 80 level 1
- "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated"
- "8405"+ // end group field 80 level 1
- "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f"+ // field 103, encoding 0, 0x7f zigzag64
- "ca0c03"+"626967"+ // field 201, encoding 2, string "big"
- "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose"
- "d00c40"+ // field 202, encoding 0, value 32
- "d00c3f"+ // field 202, encoding 0, value -32
- "d80c8001"+ // field 203, encoding 0, value 64
- "d80c7f"+ // field 203, encoding 0, value -64
- "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose"
- "90193f"+ // field 402, encoding 0, value 63
- "98197f") // field 403, encoding 0, value 127
-
-}
-
-// All required fields set, all packed repeated fields given two values.
-func TestEncodeDecode6(t *testing.T) {
- pb := initGoTest(false)
- pb.F_BoolRepeatedPacked = []bool{false, true}
- pb.F_Int32RepeatedPacked = []int32{32, 33}
- pb.F_Int64RepeatedPacked = []int64{64, 65}
- pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333}
- pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565}
- pb.F_Uint32RepeatedPacked = []uint32{323232, 333333}
- pb.F_Uint64RepeatedPacked = []uint64{646464, 656565}
- pb.F_FloatRepeatedPacked = []float32{32., 33.}
- pb.F_DoubleRepeatedPacked = []float64{64., 65.}
- pb.F_Sint32RepeatedPacked = []int32{32, -32}
- pb.F_Sint64RepeatedPacked = []int64{64, -64}
-
- overify(t, pb,
- "0807"+ // field 1, encoding 0, value 7
- "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField)
- "5001"+ // field 10, encoding 0, value 1
- "5803"+ // field 11, encoding 0, value 3
- "6006"+ // field 12, encoding 0, value 6
- "6d20000000"+ // field 13, encoding 5, value 32
- "714000000000000000"+ // field 14, encoding 1, value 64
- "78a019"+ // field 15, encoding 0, value 3232
- "8001c032"+ // field 16, encoding 0, value 6464
- "8d0100004a45"+ // field 17, encoding 5, value 3232.0
- "9101000000000040b940"+ // field 18, encoding 1, value 6464.0
- "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string"
- "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1
- "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33
- "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65
- "aa0308"+ // field 53, encoding 2, 8 bytes
- "a00c0000050d0000"+ // value 3232, value 3333
- "b20310"+ // field 54, encoding 2, 16 bytes
- "4019000000000000a519000000000000"+ // value 6464, value 6565
- "ba0306"+ // field 55, encoding 2, 6 bytes
- "a0dd1395ac14"+ // value 323232, value 333333
- "c20306"+ // field 56, encoding 2, 6 bytes
- "c0ba27b58928"+ // value 646464, value 656565
- "ca0308"+ // field 57, encoding 2, 8 bytes
- "0000004200000442"+ // value 32.0, value 33.0
- "d20310"+ // field 58, encoding 2, 16 bytes
- "00000000000050400000000000405040"+ // value 64.0, value 65.0
- "b304"+ // start group field 70 level 1
- "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required"
- "b404"+ // end group field 70 level 1
- "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes"
- "b0063f"+ // field 102, encoding 0, 0x3f zigzag32
- "b8067f"+ // field 103, encoding 0, 0x7f zigzag64
- "b21f02"+ // field 502, encoding 2, 2 bytes
- "403f"+ // value 32, value -32
- "ba1f03"+ // field 503, encoding 2, 3 bytes
- "80017f") // value 64, value -64
-}
-
-// Test that we can encode empty bytes fields.
-func TestEncodeDecodeBytes1(t *testing.T) {
- pb := initGoTest(false)
-
- // Create our bytes
- pb.F_BytesRequired = []byte{}
- pb.F_BytesRepeated = [][]byte{{}}
- pb.F_BytesOptional = []byte{}
-
- d, err := Marshal(pb)
- if err != nil {
- t.Error(err)
- }
-
- pbd := new(GoTest)
- if err := Unmarshal(d, pbd); err != nil {
- t.Error(err)
- }
-
- if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 {
- t.Error("required empty bytes field is incorrect")
- }
- if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil {
- t.Error("repeated empty bytes field is incorrect")
- }
- if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 {
- t.Error("optional empty bytes field is incorrect")
- }
-}
-
-// Test that we encode nil-valued fields of a repeated bytes field correctly.
-// Since entries in a repeated field cannot be nil, nil must mean empty value.
-func TestEncodeDecodeBytes2(t *testing.T) {
- pb := initGoTest(false)
-
- // Create our bytes
- pb.F_BytesRepeated = [][]byte{nil}
-
- d, err := Marshal(pb)
- if err != nil {
- t.Error(err)
- }
-
- pbd := new(GoTest)
- if err := Unmarshal(d, pbd); err != nil {
- t.Error(err)
- }
-
- if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil {
- t.Error("Unexpected value for repeated bytes field")
- }
-}
-
-// All required fields set, defaults provided, all repeated fields given two values.
-func TestSkippingUnrecognizedFields(t *testing.T) {
- o := old()
- pb := initGoTestField()
-
- // Marshal it normally.
- o.Marshal(pb)
-
- // Now new a GoSkipTest record.
- skip := &GoSkipTest{
- SkipInt32: Int32(32),
- SkipFixed32: Uint32(3232),
- SkipFixed64: Uint64(6464),
- SkipString: String("skipper"),
- Skipgroup: &GoSkipTest_SkipGroup{
- GroupInt32: Int32(75),
- GroupString: String("wxyz"),
- },
- }
-
- // Marshal it into same buffer.
- o.Marshal(skip)
-
- pbd := new(GoTestField)
- o.Unmarshal(pbd)
-
- // The __unrecognized field should be a marshaling of GoSkipTest
- skipd := new(GoSkipTest)
-
- o.SetBuf(pbd.XXX_unrecognized)
- o.Unmarshal(skipd)
-
- if *skipd.SkipInt32 != *skip.SkipInt32 {
- t.Error("skip int32", skipd.SkipInt32)
- }
- if *skipd.SkipFixed32 != *skip.SkipFixed32 {
- t.Error("skip fixed32", skipd.SkipFixed32)
- }
- if *skipd.SkipFixed64 != *skip.SkipFixed64 {
- t.Error("skip fixed64", skipd.SkipFixed64)
- }
- if *skipd.SkipString != *skip.SkipString {
- t.Error("skip string", *skipd.SkipString)
- }
- if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 {
- t.Error("skip group int32", skipd.Skipgroup.GroupInt32)
- }
- if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString {
- t.Error("skip group string", *skipd.Skipgroup.GroupString)
- }
-}
-
-// Check that unrecognized fields of a submessage are preserved.
-func TestSubmessageUnrecognizedFields(t *testing.T) {
- nm := &NewMessage{
- Nested: &NewMessage_Nested{
- Name: String("Nigel"),
- FoodGroup: String("carbs"),
- },
- }
- b, err := Marshal(nm)
- if err != nil {
- t.Fatalf("Marshal of NewMessage: %v", err)
- }
-
- // Unmarshal into an OldMessage.
- om := new(OldMessage)
- if err := Unmarshal(b, om); err != nil {
- t.Fatalf("Unmarshal to OldMessage: %v", err)
- }
- exp := &OldMessage{
- Nested: &OldMessage_Nested{
- Name: String("Nigel"),
- // normal protocol buffer users should not do this
- XXX_unrecognized: []byte("\x12\x05carbs"),
- },
- }
- if !Equal(om, exp) {
- t.Errorf("om = %v, want %v", om, exp)
- }
-
- // Clone the OldMessage.
- om = Clone(om).(*OldMessage)
- if !Equal(om, exp) {
- t.Errorf("Clone(om) = %v, want %v", om, exp)
- }
-
- // Marshal the OldMessage, then unmarshal it into an empty NewMessage.
- if b, err = Marshal(om); err != nil {
- t.Fatalf("Marshal of OldMessage: %v", err)
- }
- t.Logf("Marshal(%v) -> %q", om, b)
- nm2 := new(NewMessage)
- if err := Unmarshal(b, nm2); err != nil {
- t.Fatalf("Unmarshal to NewMessage: %v", err)
- }
- if !Equal(nm, nm2) {
- t.Errorf("NewMessage round-trip: %v => %v", nm, nm2)
- }
-}
-
-// Check that an int32 field can be upgraded to an int64 field.
-func TestNegativeInt32(t *testing.T) {
- om := &OldMessage{
- Num: Int32(-1),
- }
- b, err := Marshal(om)
- if err != nil {
- t.Fatalf("Marshal of OldMessage: %v", err)
- }
-
- // Check the size. It should be 11 bytes;
- // 1 for the field/wire type, and 10 for the negative number.
- if len(b) != 11 {
- t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b)
- }
-
- // Unmarshal into a NewMessage.
- nm := new(NewMessage)
- if err := Unmarshal(b, nm); err != nil {
- t.Fatalf("Unmarshal to NewMessage: %v", err)
- }
- want := &NewMessage{
- Num: Int64(-1),
- }
- if !Equal(nm, want) {
- t.Errorf("nm = %v, want %v", nm, want)
- }
-}
-
-// Check that we can grow an array (repeated field) to have many elements.
-// This test doesn't depend only on our encoding; for variety, it makes sure
-// we create, encode, and decode the correct contents explicitly. It's therefore
-// a bit messier.
-// This test also uses (and hence tests) the Marshal/Unmarshal functions
-// instead of the methods.
-func TestBigRepeated(t *testing.T) {
- pb := initGoTest(true)
-
- // Create the arrays
- const N = 50 // Internally the library starts much smaller.
- pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N)
- pb.F_Sint64Repeated = make([]int64, N)
- pb.F_Sint32Repeated = make([]int32, N)
- pb.F_BytesRepeated = make([][]byte, N)
- pb.F_StringRepeated = make([]string, N)
- pb.F_DoubleRepeated = make([]float64, N)
- pb.F_FloatRepeated = make([]float32, N)
- pb.F_Uint64Repeated = make([]uint64, N)
- pb.F_Uint32Repeated = make([]uint32, N)
- pb.F_Fixed64Repeated = make([]uint64, N)
- pb.F_Fixed32Repeated = make([]uint32, N)
- pb.F_Int64Repeated = make([]int64, N)
- pb.F_Int32Repeated = make([]int32, N)
- pb.F_BoolRepeated = make([]bool, N)
- pb.RepeatedField = make([]*GoTestField, N)
-
- // Fill in the arrays with checkable values.
- igtf := initGoTestField()
- igtrg := initGoTest_RepeatedGroup()
- for i := 0; i < N; i++ {
- pb.Repeatedgroup[i] = igtrg
- pb.F_Sint64Repeated[i] = int64(i)
- pb.F_Sint32Repeated[i] = int32(i)
- s := fmt.Sprint(i)
- pb.F_BytesRepeated[i] = []byte(s)
- pb.F_StringRepeated[i] = s
- pb.F_DoubleRepeated[i] = float64(i)
- pb.F_FloatRepeated[i] = float32(i)
- pb.F_Uint64Repeated[i] = uint64(i)
- pb.F_Uint32Repeated[i] = uint32(i)
- pb.F_Fixed64Repeated[i] = uint64(i)
- pb.F_Fixed32Repeated[i] = uint32(i)
- pb.F_Int64Repeated[i] = int64(i)
- pb.F_Int32Repeated[i] = int32(i)
- pb.F_BoolRepeated[i] = i%2 == 0
- pb.RepeatedField[i] = igtf
- }
-
- // Marshal.
- buf, _ := Marshal(pb)
-
- // Now test Unmarshal by recreating the original buffer.
- pbd := new(GoTest)
- Unmarshal(buf, pbd)
-
- // Check the checkable values
- for i := uint64(0); i < N; i++ {
- if pbd.Repeatedgroup[i] == nil { // TODO: more checking?
- t.Error("pbd.Repeatedgroup bad")
- }
- var x uint64
- x = uint64(pbd.F_Sint64Repeated[i])
- if x != i {
- t.Error("pbd.F_Sint64Repeated bad", x, i)
- }
- x = uint64(pbd.F_Sint32Repeated[i])
- if x != i {
- t.Error("pbd.F_Sint32Repeated bad", x, i)
- }
- s := fmt.Sprint(i)
- equalbytes(pbd.F_BytesRepeated[i], []byte(s), t)
- if pbd.F_StringRepeated[i] != s {
- t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i)
- }
- x = uint64(pbd.F_DoubleRepeated[i])
- if x != i {
- t.Error("pbd.F_DoubleRepeated bad", x, i)
- }
- x = uint64(pbd.F_FloatRepeated[i])
- if x != i {
- t.Error("pbd.F_FloatRepeated bad", x, i)
- }
- x = pbd.F_Uint64Repeated[i]
- if x != i {
- t.Error("pbd.F_Uint64Repeated bad", x, i)
- }
- x = uint64(pbd.F_Uint32Repeated[i])
- if x != i {
- t.Error("pbd.F_Uint32Repeated bad", x, i)
- }
- x = pbd.F_Fixed64Repeated[i]
- if x != i {
- t.Error("pbd.F_Fixed64Repeated bad", x, i)
- }
- x = uint64(pbd.F_Fixed32Repeated[i])
- if x != i {
- t.Error("pbd.F_Fixed32Repeated bad", x, i)
- }
- x = uint64(pbd.F_Int64Repeated[i])
- if x != i {
- t.Error("pbd.F_Int64Repeated bad", x, i)
- }
- x = uint64(pbd.F_Int32Repeated[i])
- if x != i {
- t.Error("pbd.F_Int32Repeated bad", x, i)
- }
- if pbd.F_BoolRepeated[i] != (i%2 == 0) {
- t.Error("pbd.F_BoolRepeated bad", x, i)
- }
- if pbd.RepeatedField[i] == nil { // TODO: more checking?
- t.Error("pbd.RepeatedField bad")
- }
- }
-}
-
-// Verify we give a useful message when decoding to the wrong structure type.
-func TestTypeMismatch(t *testing.T) {
- pb1 := initGoTest(true)
-
- // Marshal
- o := old()
- o.Marshal(pb1)
-
- // Now Unmarshal it to the wrong type.
- pb2 := initGoTestField()
- err := o.Unmarshal(pb2)
- if err == nil {
- t.Error("expected error, got no error")
- } else if !strings.Contains(err.Error(), "bad wiretype") {
- t.Error("expected bad wiretype error, got", err)
- }
-}
-
-func encodeDecode(t *testing.T, in, out Message, msg string) {
- buf, err := Marshal(in)
- if err != nil {
- t.Fatalf("failed marshaling %v: %v", msg, err)
- }
- if err := Unmarshal(buf, out); err != nil {
- t.Fatalf("failed unmarshaling %v: %v", msg, err)
- }
-}
-
-func TestPackedNonPackedDecoderSwitching(t *testing.T) {
- np, p := new(NonPackedTest), new(PackedTest)
-
- // non-packed -> packed
- np.A = []int32{0, 1, 1, 2, 3, 5}
- encodeDecode(t, np, p, "non-packed -> packed")
- if !reflect.DeepEqual(np.A, p.B) {
- t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B)
- }
-
- // packed -> non-packed
- np.Reset()
- p.B = []int32{3, 1, 4, 1, 5, 9}
- encodeDecode(t, p, np, "packed -> non-packed")
- if !reflect.DeepEqual(p.B, np.A) {
- t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A)
- }
-}
-
-func TestProto1RepeatedGroup(t *testing.T) {
- pb := &MessageList{
- Message: []*MessageList_Message{
- {
- Name: String("blah"),
- Count: Int32(7),
- },
- // NOTE: pb.Message[1] is a nil
- nil,
- },
- }
-
- o := old()
- err := o.Marshal(pb)
- if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") {
- t.Fatalf("unexpected or no error when marshaling: %v", err)
- }
-}
-
-// Test that enums work. Checks for a bug introduced by making enums
-// named types instead of int32: newInt32FromUint64 would crash with
-// a type mismatch in reflect.PointTo.
-func TestEnum(t *testing.T) {
- pb := new(GoEnum)
- pb.Foo = FOO_FOO1.Enum()
- o := old()
- if err := o.Marshal(pb); err != nil {
- t.Fatal("error encoding enum:", err)
- }
- pb1 := new(GoEnum)
- if err := o.Unmarshal(pb1); err != nil {
- t.Fatal("error decoding enum:", err)
- }
- if *pb1.Foo != FOO_FOO1 {
- t.Error("expected 7 but got ", *pb1.Foo)
- }
-}
-
-// Enum types have String methods. Check that enum fields can be printed.
-// We don't care what the value actually is, just as long as it doesn't crash.
-func TestPrintingNilEnumFields(t *testing.T) {
- pb := new(GoEnum)
- _ = fmt.Sprintf("%+v", pb)
-}
-
-// Verify that absent required fields cause Marshal/Unmarshal to return errors.
-func TestRequiredFieldEnforcement(t *testing.T) {
- pb := new(GoTestField)
- _, err := Marshal(pb)
- if err == nil {
- t.Error("marshal: expected error, got nil")
- } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") {
- t.Errorf("marshal: bad error type: %v", err)
- }
-
- // A slightly sneaky, yet valid, proto. It encodes the same required field twice,
- // so simply counting the required fields is insufficient.
- // field 1, encoding 2, value "hi"
- buf := []byte("\x0A\x02hi\x0A\x02hi")
- err = Unmarshal(buf, pb)
- if err == nil {
- t.Error("unmarshal: expected error, got nil")
- } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "{Unknown}") {
- t.Errorf("unmarshal: bad error type: %v", err)
- }
-}
-
-// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors.
-func TestRequiredFieldEnforcementGroups(t *testing.T) {
- pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}}
- if _, err := Marshal(pb); err == nil {
- t.Error("marshal: expected error, got nil")
- } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") {
- t.Errorf("marshal: bad error type: %v", err)
- }
-
- buf := []byte{11, 12}
- if err := Unmarshal(buf, pb); err == nil {
- t.Error("unmarshal: expected error, got nil")
- } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.{Unknown}") {
- t.Errorf("unmarshal: bad error type: %v", err)
- }
-}
-
-func TestTypedNilMarshal(t *testing.T) {
- // A typed nil should return ErrNil and not crash.
- {
- var m *GoEnum
- if _, err := Marshal(m); err != ErrNil {
- t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err)
- }
- }
-
- {
- m := &Communique{Union: &Communique_Msg{nil}}
- if _, err := Marshal(m); err == nil || err == ErrNil {
- t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err)
- }
- }
-}
-
-// A type that implements the Marshaler interface, but is not nillable.
-type nonNillableInt uint64
-
-func (nni nonNillableInt) Marshal() ([]byte, error) {
- return EncodeVarint(uint64(nni)), nil
-}
-
-type NNIMessage struct {
- nni nonNillableInt
-}
-
-func (*NNIMessage) Reset() {}
-func (*NNIMessage) String() string { return "" }
-func (*NNIMessage) ProtoMessage() {}
-
-// A type that implements the Marshaler interface and is nillable.
-type nillableMessage struct {
- x uint64
-}
-
-func (nm *nillableMessage) Marshal() ([]byte, error) {
- return EncodeVarint(nm.x), nil
-}
-
-type NMMessage struct {
- nm *nillableMessage
-}
-
-func (*NMMessage) Reset() {}
-func (*NMMessage) String() string { return "" }
-func (*NMMessage) ProtoMessage() {}
-
-// Verify a type that uses the Marshaler interface, but has a nil pointer.
-func TestNilMarshaler(t *testing.T) {
- // Try a struct with a Marshaler field that is nil.
- // It should be directly marshable.
- nmm := new(NMMessage)
- if _, err := Marshal(nmm); err != nil {
- t.Error("unexpected error marshaling nmm: ", err)
- }
-
- // Try a struct with a Marshaler field that is not nillable.
- nnim := new(NNIMessage)
- nnim.nni = 7
- var _ Marshaler = nnim.nni // verify it is truly a Marshaler
- if _, err := Marshal(nnim); err != nil {
- t.Error("unexpected error marshaling nnim: ", err)
- }
-}
-
-func TestAllSetDefaults(t *testing.T) {
- // Exercise SetDefaults with all scalar field types.
- m := &Defaults{
- // NaN != NaN, so override that here.
- F_Nan: Float32(1.7),
- }
- expected := &Defaults{
- F_Bool: Bool(true),
- F_Int32: Int32(32),
- F_Int64: Int64(64),
- F_Fixed32: Uint32(320),
- F_Fixed64: Uint64(640),
- F_Uint32: Uint32(3200),
- F_Uint64: Uint64(6400),
- F_Float: Float32(314159),
- F_Double: Float64(271828),
- F_String: String(`hello, "world!"` + "\n"),
- F_Bytes: []byte("Bignose"),
- F_Sint32: Int32(-32),
- F_Sint64: Int64(-64),
- F_Enum: Defaults_GREEN.Enum(),
- F_Pinf: Float32(float32(math.Inf(1))),
- F_Ninf: Float32(float32(math.Inf(-1))),
- F_Nan: Float32(1.7),
- StrZero: String(""),
- }
- SetDefaults(m)
- if !Equal(m, expected) {
- t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected)
- }
-}
-
-func TestSetDefaultsWithSetField(t *testing.T) {
- // Check that a set value is not overridden.
- m := &Defaults{
- F_Int32: Int32(12),
- }
- SetDefaults(m)
- if v := m.GetF_Int32(); v != 12 {
- t.Errorf("m.FInt32 = %v, want 12", v)
- }
-}
-
-func TestSetDefaultsWithSubMessage(t *testing.T) {
- m := &OtherMessage{
- Key: Int64(123),
- Inner: &InnerMessage{
- Host: String("gopher"),
- },
- }
- expected := &OtherMessage{
- Key: Int64(123),
- Inner: &InnerMessage{
- Host: String("gopher"),
- Port: Int32(4000),
- },
- }
- SetDefaults(m)
- if !Equal(m, expected) {
- t.Errorf("\n got %v\nwant %v", m, expected)
- }
-}
-
-func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) {
- m := &MyMessage{
- RepInner: []*InnerMessage{{}},
- }
- expected := &MyMessage{
- RepInner: []*InnerMessage{{
- Port: Int32(4000),
- }},
- }
- SetDefaults(m)
- if !Equal(m, expected) {
- t.Errorf("\n got %v\nwant %v", m, expected)
- }
-}
-
-func TestSetDefaultWithRepeatedNonMessage(t *testing.T) {
- m := &MyMessage{
- Pet: []string{"turtle", "wombat"},
- }
- expected := Clone(m)
- SetDefaults(m)
- if !Equal(m, expected) {
- t.Errorf("\n got %v\nwant %v", m, expected)
- }
-}
-
-func TestMaximumTagNumber(t *testing.T) {
- m := &MaxTag{
- LastField: String("natural goat essence"),
- }
- buf, err := Marshal(m)
- if err != nil {
- t.Fatalf("proto.Marshal failed: %v", err)
- }
- m2 := new(MaxTag)
- if err := Unmarshal(buf, m2); err != nil {
- t.Fatalf("proto.Unmarshal failed: %v", err)
- }
- if got, want := m2.GetLastField(), *m.LastField; got != want {
- t.Errorf("got %q, want %q", got, want)
- }
-}
-
-func TestJSON(t *testing.T) {
- m := &MyMessage{
- Count: Int32(4),
- Pet: []string{"bunny", "kitty"},
- Inner: &InnerMessage{
- Host: String("cauchy"),
- },
- Bikeshed: MyMessage_GREEN.Enum(),
- }
- const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}`
-
- b, err := json.Marshal(m)
- if err != nil {
- t.Fatalf("json.Marshal failed: %v", err)
- }
- s := string(b)
- if s != expected {
- t.Errorf("got %s\nwant %s", s, expected)
- }
-
- received := new(MyMessage)
- if err := json.Unmarshal(b, received); err != nil {
- t.Fatalf("json.Unmarshal failed: %v", err)
- }
- if !Equal(received, m) {
- t.Fatalf("got %s, want %s", received, m)
- }
-
- // Test unmarshalling of JSON with symbolic enum name.
- const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}`
- received.Reset()
- if err := json.Unmarshal([]byte(old), received); err != nil {
- t.Fatalf("json.Unmarshal failed: %v", err)
- }
- if !Equal(received, m) {
- t.Fatalf("got %s, want %s", received, m)
- }
-}
-
-func TestBadWireType(t *testing.T) {
- b := []byte{7<<3 | 6} // field 7, wire type 6
- pb := new(OtherMessage)
- if err := Unmarshal(b, pb); err == nil {
- t.Errorf("Unmarshal did not fail")
- } else if !strings.Contains(err.Error(), "unknown wire type") {
- t.Errorf("wrong error: %v", err)
- }
-}
-
-func TestBytesWithInvalidLength(t *testing.T) {
- // If a byte sequence has an invalid (negative) length, Unmarshal should not panic.
- b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0}
- Unmarshal(b, new(MyMessage))
-}
-
-func TestLengthOverflow(t *testing.T) {
- // Overflowing a length should not panic.
- b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01}
- Unmarshal(b, new(MyMessage))
-}
-
-func TestVarintOverflow(t *testing.T) {
- // Overflowing a 64-bit length should not be allowed.
- b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01}
- if err := Unmarshal(b, new(MyMessage)); err == nil {
- t.Fatalf("Overflowed uint64 length without error")
- }
-}
-
-func TestUnmarshalFuzz(t *testing.T) {
- const N = 1000
- seed := time.Now().UnixNano()
- t.Logf("RNG seed is %d", seed)
- rng := rand.New(rand.NewSource(seed))
- buf := make([]byte, 20)
- for i := 0; i < N; i++ {
- for j := range buf {
- buf[j] = byte(rng.Intn(256))
- }
- fuzzUnmarshal(t, buf)
- }
-}
-
-func TestMergeMessages(t *testing.T) {
- pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}}
- data, err := Marshal(pb)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
-
- pb1 := new(MessageList)
- if err := Unmarshal(data, pb1); err != nil {
- t.Fatalf("first Unmarshal: %v", err)
- }
- if err := Unmarshal(data, pb1); err != nil {
- t.Fatalf("second Unmarshal: %v", err)
- }
- if len(pb1.Message) != 1 {
- t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message))
- }
-
- pb2 := new(MessageList)
- if err := UnmarshalMerge(data, pb2); err != nil {
- t.Fatalf("first UnmarshalMerge: %v", err)
- }
- if err := UnmarshalMerge(data, pb2); err != nil {
- t.Fatalf("second UnmarshalMerge: %v", err)
- }
- if len(pb2.Message) != 2 {
- t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message))
- }
-}
-
-func TestExtensionMarshalOrder(t *testing.T) {
- m := &MyMessage{Count: Int(123)}
- if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil {
- t.Fatalf("SetExtension: %v", err)
- }
- if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil {
- t.Fatalf("SetExtension: %v", err)
- }
- if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil {
- t.Fatalf("SetExtension: %v", err)
- }
-
- // Serialize m several times, and check we get the same bytes each time.
- var orig []byte
- for i := 0; i < 100; i++ {
- b, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- if i == 0 {
- orig = b
- continue
- }
- if !bytes.Equal(b, orig) {
- t.Errorf("Bytes differ on attempt #%d", i)
- }
- }
-}
-
-// Many extensions, because small maps might not iterate differently on each iteration.
-var exts = []*ExtensionDesc{
- E_X201,
- E_X202,
- E_X203,
- E_X204,
- E_X205,
- E_X206,
- E_X207,
- E_X208,
- E_X209,
- E_X210,
- E_X211,
- E_X212,
- E_X213,
- E_X214,
- E_X215,
- E_X216,
- E_X217,
- E_X218,
- E_X219,
- E_X220,
- E_X221,
- E_X222,
- E_X223,
- E_X224,
- E_X225,
- E_X226,
- E_X227,
- E_X228,
- E_X229,
- E_X230,
- E_X231,
- E_X232,
- E_X233,
- E_X234,
- E_X235,
- E_X236,
- E_X237,
- E_X238,
- E_X239,
- E_X240,
- E_X241,
- E_X242,
- E_X243,
- E_X244,
- E_X245,
- E_X246,
- E_X247,
- E_X248,
- E_X249,
- E_X250,
-}
-
-func TestMessageSetMarshalOrder(t *testing.T) {
- m := &MyMessageSet{}
- for _, x := range exts {
- if err := SetExtension(m, x, &Empty{}); err != nil {
- t.Fatalf("SetExtension: %v", err)
- }
- }
-
- buf, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
-
- // Serialize m several times, and check we get the same bytes each time.
- for i := 0; i < 10; i++ {
- b1, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- if !bytes.Equal(b1, buf) {
- t.Errorf("Bytes differ on re-Marshal #%d", i)
- }
-
- m2 := &MyMessageSet{}
- if err := Unmarshal(buf, m2); err != nil {
- t.Errorf("Unmarshal: %v", err)
- }
- b2, err := Marshal(m2)
- if err != nil {
- t.Errorf("re-Marshal: %v", err)
- }
- if !bytes.Equal(b2, buf) {
- t.Errorf("Bytes differ on round-trip #%d", i)
- }
- }
-}
-
-func TestUnmarshalMergesMessages(t *testing.T) {
- // If a nested message occurs twice in the input,
- // the fields should be merged when decoding.
- a := &OtherMessage{
- Key: Int64(123),
- Inner: &InnerMessage{
- Host: String("polhode"),
- Port: Int32(1234),
- },
- }
- aData, err := Marshal(a)
- if err != nil {
- t.Fatalf("Marshal(a): %v", err)
- }
- b := &OtherMessage{
- Weight: Float32(1.2),
- Inner: &InnerMessage{
- Host: String("herpolhode"),
- Connected: Bool(true),
- },
- }
- bData, err := Marshal(b)
- if err != nil {
- t.Fatalf("Marshal(b): %v", err)
- }
- want := &OtherMessage{
- Key: Int64(123),
- Weight: Float32(1.2),
- Inner: &InnerMessage{
- Host: String("herpolhode"),
- Port: Int32(1234),
- Connected: Bool(true),
- },
- }
- got := new(OtherMessage)
- if err := Unmarshal(append(aData, bData...), got); err != nil {
- t.Fatalf("Unmarshal: %v", err)
- }
- if !Equal(got, want) {
- t.Errorf("\n got %v\nwant %v", got, want)
- }
-}
-
-func TestEncodingSizes(t *testing.T) {
- tests := []struct {
- m Message
- n int
- }{
- {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6},
- {&Defaults{F_Int32: Int32(math.MinInt32)}, 11},
- {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6},
- {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6},
- }
- for _, test := range tests {
- b, err := Marshal(test.m)
- if err != nil {
- t.Errorf("Marshal(%v): %v", test.m, err)
- continue
- }
- if len(b) != test.n {
- t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n)
- }
- }
-}
-
-func TestRequiredNotSetError(t *testing.T) {
- pb := initGoTest(false)
- pb.RequiredField.Label = nil
- pb.F_Int32Required = nil
- pb.F_Int64Required = nil
-
- expected := "0807" + // field 1, encoding 0, value 7
- "2206" + "120474797065" + // field 4, encoding 2 (GoTestField)
- "5001" + // field 10, encoding 0, value 1
- "6d20000000" + // field 13, encoding 5, value 0x20
- "714000000000000000" + // field 14, encoding 1, value 0x40
- "78a019" + // field 15, encoding 0, value 0xca0 = 3232
- "8001c032" + // field 16, encoding 0, value 0x1940 = 6464
- "8d0100004a45" + // field 17, encoding 5, value 3232.0
- "9101000000000040b940" + // field 18, encoding 1, value 6464.0
- "9a0106" + "737472696e67" + // field 19, encoding 2, string "string"
- "b304" + // field 70, encoding 3, start group
- "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required"
- "b404" + // field 70, encoding 4, end group
- "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes"
- "b0063f" + // field 102, encoding 0, 0x3f zigzag32
- "b8067f" // field 103, encoding 0, 0x7f zigzag64
-
- o := old()
- bytes, err := Marshal(pb)
- if _, ok := err.(*RequiredNotSetError); !ok {
- fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err)
- o.DebugPrint("", bytes)
- t.Fatalf("expected = %s", expected)
- }
- if strings.Index(err.Error(), "RequiredField.Label") < 0 {
- t.Errorf("marshal-1 wrong err msg: %v", err)
- }
- if !equal(bytes, expected, t) {
- o.DebugPrint("neq 1", bytes)
- t.Fatalf("expected = %s", expected)
- }
-
- // Now test Unmarshal by recreating the original buffer.
- pbd := new(GoTest)
- err = Unmarshal(bytes, pbd)
- if _, ok := err.(*RequiredNotSetError); !ok {
- t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err)
- o.DebugPrint("", bytes)
- t.Fatalf("string = %s", expected)
- }
- if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 {
- t.Errorf("unmarshal wrong err msg: %v", err)
- }
- bytes, err = Marshal(pbd)
- if _, ok := err.(*RequiredNotSetError); !ok {
- t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err)
- o.DebugPrint("", bytes)
- t.Fatalf("string = %s", expected)
- }
- if strings.Index(err.Error(), "RequiredField.Label") < 0 {
- t.Errorf("marshal-2 wrong err msg: %v", err)
- }
- if !equal(bytes, expected, t) {
- o.DebugPrint("neq 2", bytes)
- t.Fatalf("string = %s", expected)
- }
-}
-
-func fuzzUnmarshal(t *testing.T, data []byte) {
- defer func() {
- if e := recover(); e != nil {
- t.Errorf("These bytes caused a panic: %+v", data)
- t.Logf("Stack:\n%s", debug.Stack())
- t.FailNow()
- }
- }()
-
- pb := new(MyMessage)
- Unmarshal(data, pb)
-}
-
-func TestMapFieldMarshal(t *testing.T) {
- m := &MessageWithMap{
- NameMapping: map[int32]string{
- 1: "Rob",
- 4: "Ian",
- 8: "Dave",
- },
- }
- b, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
-
- // b should be the concatenation of these three byte sequences in some order.
- parts := []string{
- "\n\a\b\x01\x12\x03Rob",
- "\n\a\b\x04\x12\x03Ian",
- "\n\b\b\x08\x12\x04Dave",
- }
- ok := false
- for i := range parts {
- for j := range parts {
- if j == i {
- continue
- }
- for k := range parts {
- if k == i || k == j {
- continue
- }
- try := parts[i] + parts[j] + parts[k]
- if bytes.Equal(b, []byte(try)) {
- ok = true
- break
- }
- }
- }
- }
- if !ok {
- t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2])
- }
- t.Logf("FYI b: %q", b)
-
- (new(Buffer)).DebugPrint("Dump of b", b)
-}
-
-func TestMapFieldRoundTrips(t *testing.T) {
- m := &MessageWithMap{
- NameMapping: map[int32]string{
- 1: "Rob",
- 4: "Ian",
- 8: "Dave",
- },
- MsgMapping: map[int64]*FloatingPoint{
- 0x7001: &FloatingPoint{F: Float64(2.0)},
- },
- ByteMapping: map[bool][]byte{
- false: []byte("that's not right!"),
- true: []byte("aye, 'tis true!"),
- },
- }
- b, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- t.Logf("FYI b: %q", b)
- m2 := new(MessageWithMap)
- if err := Unmarshal(b, m2); err != nil {
- t.Fatalf("Unmarshal: %v", err)
- }
- for _, pair := range [][2]interface{}{
- {m.NameMapping, m2.NameMapping},
- {m.MsgMapping, m2.MsgMapping},
- {m.ByteMapping, m2.ByteMapping},
- } {
- if !reflect.DeepEqual(pair[0], pair[1]) {
- t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1])
- }
- }
-}
-
-func TestMapFieldWithNil(t *testing.T) {
- m1 := &MessageWithMap{
- MsgMapping: map[int64]*FloatingPoint{
- 1: nil,
- },
- }
- b, err := Marshal(m1)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- m2 := new(MessageWithMap)
- if err := Unmarshal(b, m2); err != nil {
- t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b)
- }
- if v, ok := m2.MsgMapping[1]; !ok {
- t.Error("msg_mapping[1] not present")
- } else if v != nil {
- t.Errorf("msg_mapping[1] not nil: %v", v)
- }
-}
-
-func TestMapFieldWithNilBytes(t *testing.T) {
- m1 := &MessageWithMap{
- ByteMapping: map[bool][]byte{
- false: []byte{},
- true: nil,
- },
- }
- n := Size(m1)
- b, err := Marshal(m1)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- if n != len(b) {
- t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b))
- }
- m2 := new(MessageWithMap)
- if err := Unmarshal(b, m2); err != nil {
- t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b)
- }
- if v, ok := m2.ByteMapping[false]; !ok {
- t.Error("byte_mapping[false] not present")
- } else if len(v) != 0 {
- t.Errorf("byte_mapping[false] not empty: %#v", v)
- }
- if v, ok := m2.ByteMapping[true]; !ok {
- t.Error("byte_mapping[true] not present")
- } else if len(v) != 0 {
- t.Errorf("byte_mapping[true] not empty: %#v", v)
- }
-}
-
-func TestDecodeMapFieldMissingKey(t *testing.T) {
- b := []byte{
- 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes
- // no key
- 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m"
- }
- got := &MessageWithMap{}
- err := Unmarshal(b, got)
- if err != nil {
- t.Fatalf("failed to marshal map with missing key: %v", err)
- }
- want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}}
- if !Equal(got, want) {
- t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want)
- }
-}
-
-func TestDecodeMapFieldMissingValue(t *testing.T) {
- b := []byte{
- 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes
- 0x08, 0x01, // varint key, value 1
- // no value
- }
- got := &MessageWithMap{}
- err := Unmarshal(b, got)
- if err != nil {
- t.Fatalf("failed to marshal map with missing value: %v", err)
- }
- want := &MessageWithMap{NameMapping: map[int32]string{1: ""}}
- if !Equal(got, want) {
- t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want)
- }
-}
-
-func TestOneof(t *testing.T) {
- m := &Communique{}
- b, err := Marshal(m)
- if err != nil {
- t.Fatalf("Marshal of empty message with oneof: %v", err)
- }
- if len(b) != 0 {
- t.Errorf("Marshal of empty message yielded too many bytes: %v", b)
- }
-
- m = &Communique{
- Union: &Communique_Name{"Barry"},
- }
-
- // Round-trip.
- b, err = Marshal(m)
- if err != nil {
- t.Fatalf("Marshal of message with oneof: %v", err)
- }
- if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5)
- t.Errorf("Incorrect marshal of message with oneof: %v", b)
- }
- m.Reset()
- if err := Unmarshal(b, m); err != nil {
- t.Fatalf("Unmarshal of message with oneof: %v", err)
- }
- if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" {
- t.Errorf("After round trip, Union = %+v", m.Union)
- }
- if name := m.GetName(); name != "Barry" {
- t.Errorf("After round trip, GetName = %q, want %q", name, "Barry")
- }
-
- // Let's try with a message in the oneof.
- m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}}
- b, err = Marshal(m)
- if err != nil {
- t.Fatalf("Marshal of message with oneof set to message: %v", err)
- }
- if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16)
- t.Errorf("Incorrect marshal of message with oneof set to message: %v", b)
- }
- m.Reset()
- if err := Unmarshal(b, m); err != nil {
- t.Fatalf("Unmarshal of message with oneof set to message: %v", err)
- }
- ss, ok := m.Union.(*Communique_Msg)
- if !ok || ss.Msg.GetStringField() != "deep deep string" {
- t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union)
- }
-}
-
-func TestInefficientPackedBool(t *testing.T) {
- // https://github.com/golang/protobuf/issues/76
- inp := []byte{
- 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes
- // Usually a bool should take a single byte,
- // but it is permitted to be any varint.
- 0xb9, 0x30,
- }
- if err := Unmarshal(inp, new(MoreRepeated)); err != nil {
- t.Error(err)
- }
-}
-
-// Benchmarks
-
-func testMsg() *GoTest {
- pb := initGoTest(true)
- const N = 1000 // Internally the library starts much smaller.
- pb.F_Int32Repeated = make([]int32, N)
- pb.F_DoubleRepeated = make([]float64, N)
- for i := 0; i < N; i++ {
- pb.F_Int32Repeated[i] = int32(i)
- pb.F_DoubleRepeated[i] = float64(i)
- }
- return pb
-}
-
-func bytesMsg() *GoTest {
- pb := initGoTest(true)
- buf := make([]byte, 4000)
- for i := range buf {
- buf[i] = byte(i)
- }
- pb.F_BytesDefaulted = buf
- return pb
-}
-
-func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) {
- d, _ := marshal(pb)
- b.SetBytes(int64(len(d)))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- marshal(pb)
- }
-}
-
-func benchmarkBufferMarshal(b *testing.B, pb Message) {
- p := NewBuffer(nil)
- benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) {
- p.Reset()
- err := p.Marshal(pb0)
- return p.Bytes(), err
- })
-}
-
-func benchmarkSize(b *testing.B, pb Message) {
- benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) {
- Size(pb)
- return nil, nil
- })
-}
-
-func newOf(pb Message) Message {
- in := reflect.ValueOf(pb)
- if in.IsNil() {
- return pb
- }
- return reflect.New(in.Type().Elem()).Interface().(Message)
-}
-
-func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) {
- d, _ := Marshal(pb)
- b.SetBytes(int64(len(d)))
- pbd := newOf(pb)
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- unmarshal(d, pbd)
- }
-}
-
-func benchmarkBufferUnmarshal(b *testing.B, pb Message) {
- p := NewBuffer(nil)
- benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error {
- p.SetBuf(d)
- return p.Unmarshal(pb0)
- })
-}
-
-// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes}
-
-func BenchmarkMarshal(b *testing.B) {
- benchmarkMarshal(b, testMsg(), Marshal)
-}
-
-func BenchmarkBufferMarshal(b *testing.B) {
- benchmarkBufferMarshal(b, testMsg())
-}
-
-func BenchmarkSize(b *testing.B) {
- benchmarkSize(b, testMsg())
-}
-
-func BenchmarkUnmarshal(b *testing.B) {
- benchmarkUnmarshal(b, testMsg(), Unmarshal)
-}
-
-func BenchmarkBufferUnmarshal(b *testing.B) {
- benchmarkBufferUnmarshal(b, testMsg())
-}
-
-func BenchmarkMarshalBytes(b *testing.B) {
- benchmarkMarshal(b, bytesMsg(), Marshal)
-}
-
-func BenchmarkBufferMarshalBytes(b *testing.B) {
- benchmarkBufferMarshal(b, bytesMsg())
-}
-
-func BenchmarkSizeBytes(b *testing.B) {
- benchmarkSize(b, bytesMsg())
-}
-
-func BenchmarkUnmarshalBytes(b *testing.B) {
- benchmarkUnmarshal(b, bytesMsg(), Unmarshal)
-}
-
-func BenchmarkBufferUnmarshalBytes(b *testing.B) {
- benchmarkBufferUnmarshal(b, bytesMsg())
-}
-
-func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) {
- b.StopTimer()
- pb := initGoTestField()
- skip := &GoSkipTest{
- SkipInt32: Int32(32),
- SkipFixed32: Uint32(3232),
- SkipFixed64: Uint64(6464),
- SkipString: String("skipper"),
- Skipgroup: &GoSkipTest_SkipGroup{
- GroupInt32: Int32(75),
- GroupString: String("wxyz"),
- },
- }
-
- pbd := new(GoTestField)
- p := NewBuffer(nil)
- p.Marshal(pb)
- p.Marshal(skip)
- p2 := NewBuffer(nil)
-
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- p2.SetBuf(p.Bytes())
- p2.Unmarshal(pbd)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go
deleted file mode 100644
index 1a3c22ed4..000000000
--- a/vendor/github.com/golang/protobuf/proto/any_test.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- pb "github.com/golang/protobuf/proto/proto3_proto"
- testpb "github.com/golang/protobuf/proto/testdata"
- anypb "github.com/golang/protobuf/ptypes/any"
-)
-
-var (
- expandedMarshaler = proto.TextMarshaler{ExpandAny: true}
- expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true}
-)
-
-// anyEqual reports whether two messages which may be google.protobuf.Any or may
-// contain google.protobuf.Any fields are equal. We can't use proto.Equal for
-// comparison, because semantically equivalent messages may be marshaled to
-// binary in different tag order. Instead, trust that TextMarshaler with
-// ExpandAny option works and compare the text marshaling results.
-func anyEqual(got, want proto.Message) bool {
- // if messages are proto.Equal, no need to marshal.
- if proto.Equal(got, want) {
- return true
- }
- g := expandedMarshaler.Text(got)
- w := expandedMarshaler.Text(want)
- return g == w
-}
-
-type golden struct {
- m proto.Message
- t, c string
-}
-
-var goldenMessages = makeGolden()
-
-func makeGolden() []golden {
- nested := &pb.Nested{Bunny: "Monty"}
- nb, err := proto.Marshal(nested)
- if err != nil {
- panic(err)
- }
- m1 := &pb.Message{
- Name: "David",
- ResultCount: 47,
- Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb},
- }
- m2 := &pb.Message{
- Name: "David",
- ResultCount: 47,
- Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb},
- }
- m3 := &pb.Message{
- Name: "David",
- ResultCount: 47,
- Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb},
- }
- m4 := &pb.Message{
- Name: "David",
- ResultCount: 47,
- Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb},
- }
- m5 := &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}
-
- any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")}
- proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")})
- proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar"))
- any1b, err := proto.Marshal(any1)
- if err != nil {
- panic(err)
- }
- any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}}
- proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")})
- any2b, err := proto.Marshal(any2)
- if err != nil {
- panic(err)
- }
- m6 := &pb.Message{
- Name: "David",
- ResultCount: 47,
- Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b},
- ManyThings: []*anypb.Any{
- &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b},
- &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b},
- },
- }
-
- const (
- m1Golden = `
-name: "David"
-result_count: 47
-anything: <
- [type.googleapis.com/proto3_proto.Nested]: <
- bunny: "Monty"
- >
->
-`
- m2Golden = `
-name: "David"
-result_count: 47
-anything: <
- ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: <
- bunny: "Monty"
- >
->
-`
- m3Golden = `
-name: "David"
-result_count: 47
-anything: <
- ["type.googleapis.com/\"/proto3_proto.Nested"]: <
- bunny: "Monty"
- >
->
-`
- m4Golden = `
-name: "David"
-result_count: 47
-anything: <
- [type.googleapis.com/a/path/proto3_proto.Nested]: <
- bunny: "Monty"
- >
->
-`
- m5Golden = `
-[type.googleapis.com/proto3_proto.Nested]: <
- bunny: "Monty"
->
-`
- m6Golden = `
-name: "David"
-result_count: 47
-anything: <
- [type.googleapis.com/testdata.MyMessage]: <
- count: 47
- name: "David"
- [testdata.Ext.more]: <
- data: "foo"
- >
- [testdata.Ext.text]: "bar"
- >
->
-many_things: <
- [type.googleapis.com/testdata.MyMessage]: <
- count: 42
- bikeshed: GREEN
- rep_bytes: "roboto"
- [testdata.Ext.more]: <
- data: "baz"
- >
- >
->
-many_things: <
- [type.googleapis.com/testdata.MyMessage]: <
- count: 47
- name: "David"
- [testdata.Ext.more]: <
- data: "foo"
- >
- [testdata.Ext.text]: "bar"
- >
->
-`
- )
- return []golden{
- {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "},
- {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "},
- {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "},
- {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "},
- {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "},
- {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "},
- }
-}
-
-func TestMarshalGolden(t *testing.T) {
- for _, tt := range goldenMessages {
- if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want {
- t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want)
- }
- if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want {
- t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want)
- }
- }
-}
-
-func TestUnmarshalGolden(t *testing.T) {
- for _, tt := range goldenMessages {
- want := tt.m
- got := proto.Clone(tt.m)
- got.Reset()
- if err := proto.UnmarshalText(tt.t, got); err != nil {
- t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err)
- }
- if !anyEqual(got, want) {
- t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want)
- }
- got.Reset()
- if err := proto.UnmarshalText(tt.c, got); err != nil {
- t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err)
- }
- if !anyEqual(got, want) {
- t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want)
- }
- }
-}
-
-func TestMarshalUnknownAny(t *testing.T) {
- m := &pb.Message{
- Anything: &anypb.Any{
- TypeUrl: "foo",
- Value: []byte("bar"),
- },
- }
- want := `anything: <
- type_url: "foo"
- value: "bar"
->
-`
- got := expandedMarshaler.Text(m)
- if got != want {
- t.Errorf("got\n`%s`\nwant\n`%s`", got, want)
- }
-}
-
-func TestAmbiguousAny(t *testing.T) {
- pb := &anypb.Any{}
- err := proto.UnmarshalText(`
- type_url: "ttt/proto3_proto.Nested"
- value: "\n\x05Monty"
- `, pb)
- t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err)
- if err != nil {
- t.Errorf("failed to parse ambiguous Any message: %v", err)
- }
-}
-
-func TestUnmarshalOverwriteAny(t *testing.T) {
- pb := &anypb.Any{}
- err := proto.UnmarshalText(`
- [type.googleapis.com/a/path/proto3_proto.Nested]: <
- bunny: "Monty"
- >
- [type.googleapis.com/a/path/proto3_proto.Nested]: <
- bunny: "Rabbit of Caerbannog"
- >
- `, pb)
- want := `line 7: Any message unpacked multiple times, or "type_url" already set`
- if err.Error() != want {
- t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want)
- }
-}
-
-func TestUnmarshalAnyMixAndMatch(t *testing.T) {
- pb := &anypb.Any{}
- err := proto.UnmarshalText(`
- value: "\n\x05Monty"
- [type.googleapis.com/a/path/proto3_proto.Nested]: <
- bunny: "Rabbit of Caerbannog"
- >
- `, pb)
- want := `line 5: Any message unpacked multiple times, or "value" already set`
- if err.Error() != want {
- t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go
deleted file mode 100644
index f607ff49e..000000000
--- a/vendor/github.com/golang/protobuf/proto/clone_test.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- pb "github.com/golang/protobuf/proto/testdata"
-)
-
-var cloneTestMessage = &pb.MyMessage{
- Count: proto.Int32(42),
- Name: proto.String("Dave"),
- Pet: []string{"bunny", "kitty", "horsey"},
- Inner: &pb.InnerMessage{
- Host: proto.String("niles"),
- Port: proto.Int32(9099),
- Connected: proto.Bool(true),
- },
- Others: []*pb.OtherMessage{
- {
- Value: []byte("some bytes"),
- },
- },
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: proto.Int32(6),
- },
- RepBytes: [][]byte{[]byte("sham"), []byte("wow")},
-}
-
-func init() {
- ext := &pb.Ext{
- Data: proto.String("extension"),
- }
- if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil {
- panic("SetExtension: " + err.Error())
- }
-}
-
-func TestClone(t *testing.T) {
- m := proto.Clone(cloneTestMessage).(*pb.MyMessage)
- if !proto.Equal(m, cloneTestMessage) {
- t.Errorf("Clone(%v) = %v", cloneTestMessage, m)
- }
-
- // Verify it was a deep copy.
- *m.Inner.Port++
- if proto.Equal(m, cloneTestMessage) {
- t.Error("Mutating clone changed the original")
- }
- // Byte fields and repeated fields should be copied.
- if &m.Pet[0] == &cloneTestMessage.Pet[0] {
- t.Error("Pet: repeated field not copied")
- }
- if &m.Others[0] == &cloneTestMessage.Others[0] {
- t.Error("Others: repeated field not copied")
- }
- if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] {
- t.Error("Others[0].Value: bytes field not copied")
- }
- if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] {
- t.Error("RepBytes: repeated field not copied")
- }
- if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] {
- t.Error("RepBytes[0]: bytes field not copied")
- }
-}
-
-func TestCloneNil(t *testing.T) {
- var m *pb.MyMessage
- if c := proto.Clone(m); !proto.Equal(m, c) {
- t.Errorf("Clone(%v) = %v", m, c)
- }
-}
-
-var mergeTests = []struct {
- src, dst, want proto.Message
-}{
- {
- src: &pb.MyMessage{
- Count: proto.Int32(42),
- },
- dst: &pb.MyMessage{
- Name: proto.String("Dave"),
- },
- want: &pb.MyMessage{
- Count: proto.Int32(42),
- Name: proto.String("Dave"),
- },
- },
- {
- src: &pb.MyMessage{
- Inner: &pb.InnerMessage{
- Host: proto.String("hey"),
- Connected: proto.Bool(true),
- },
- Pet: []string{"horsey"},
- Others: []*pb.OtherMessage{
- {
- Value: []byte("some bytes"),
- },
- },
- },
- dst: &pb.MyMessage{
- Inner: &pb.InnerMessage{
- Host: proto.String("niles"),
- Port: proto.Int32(9099),
- },
- Pet: []string{"bunny", "kitty"},
- Others: []*pb.OtherMessage{
- {
- Key: proto.Int64(31415926535),
- },
- {
- // Explicitly test a src=nil field
- Inner: nil,
- },
- },
- },
- want: &pb.MyMessage{
- Inner: &pb.InnerMessage{
- Host: proto.String("hey"),
- Connected: proto.Bool(true),
- Port: proto.Int32(9099),
- },
- Pet: []string{"bunny", "kitty", "horsey"},
- Others: []*pb.OtherMessage{
- {
- Key: proto.Int64(31415926535),
- },
- {},
- {
- Value: []byte("some bytes"),
- },
- },
- },
- },
- {
- src: &pb.MyMessage{
- RepBytes: [][]byte{[]byte("wow")},
- },
- dst: &pb.MyMessage{
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: proto.Int32(6),
- },
- RepBytes: [][]byte{[]byte("sham")},
- },
- want: &pb.MyMessage{
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: proto.Int32(6),
- },
- RepBytes: [][]byte{[]byte("sham"), []byte("wow")},
- },
- },
- // Check that a scalar bytes field replaces rather than appends.
- {
- src: &pb.OtherMessage{Value: []byte("foo")},
- dst: &pb.OtherMessage{Value: []byte("bar")},
- want: &pb.OtherMessage{Value: []byte("foo")},
- },
- {
- src: &pb.MessageWithMap{
- NameMapping: map[int32]string{6: "Nigel"},
- MsgMapping: map[int64]*pb.FloatingPoint{
- 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)},
- 0x4002: &pb.FloatingPoint{
- F: proto.Float64(2.0),
- },
- },
- ByteMapping: map[bool][]byte{true: []byte("wowsa")},
- },
- dst: &pb.MessageWithMap{
- NameMapping: map[int32]string{
- 6: "Bruce", // should be overwritten
- 7: "Andrew",
- },
- MsgMapping: map[int64]*pb.FloatingPoint{
- 0x4002: &pb.FloatingPoint{
- F: proto.Float64(3.0),
- Exact: proto.Bool(true),
- }, // the entire message should be overwritten
- },
- },
- want: &pb.MessageWithMap{
- NameMapping: map[int32]string{
- 6: "Nigel",
- 7: "Andrew",
- },
- MsgMapping: map[int64]*pb.FloatingPoint{
- 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)},
- 0x4002: &pb.FloatingPoint{
- F: proto.Float64(2.0),
- },
- },
- ByteMapping: map[bool][]byte{true: []byte("wowsa")},
- },
- },
- // proto3 shouldn't merge zero values,
- // in the same way that proto2 shouldn't merge nils.
- {
- src: &proto3pb.Message{
- Name: "Aaron",
- Data: []byte(""), // zero value, but not nil
- },
- dst: &proto3pb.Message{
- HeightInCm: 176,
- Data: []byte("texas!"),
- },
- want: &proto3pb.Message{
- Name: "Aaron",
- HeightInCm: 176,
- Data: []byte("texas!"),
- },
- },
- // Oneof fields should merge by assignment.
- {
- src: &pb.Communique{
- Union: &pb.Communique_Number{41},
- },
- dst: &pb.Communique{
- Union: &pb.Communique_Name{"Bobby Tables"},
- },
- want: &pb.Communique{
- Union: &pb.Communique_Number{41},
- },
- },
- // Oneof nil is the same as not set.
- {
- src: &pb.Communique{},
- dst: &pb.Communique{
- Union: &pb.Communique_Name{"Bobby Tables"},
- },
- want: &pb.Communique{
- Union: &pb.Communique_Name{"Bobby Tables"},
- },
- },
- {
- src: &proto3pb.Message{
- Terrain: map[string]*proto3pb.Nested{
- "kay_a": &proto3pb.Nested{Cute: true}, // replace
- "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, // insert
- },
- },
- dst: &proto3pb.Message{
- Terrain: map[string]*proto3pb.Nested{
- "kay_a": &proto3pb.Nested{Bunny: "lost"}, // replaced
- "kay_c": &proto3pb.Nested{Bunny: "bunny"}, // keep
- },
- },
- want: &proto3pb.Message{
- Terrain: map[string]*proto3pb.Nested{
- "kay_a": &proto3pb.Nested{Cute: true},
- "kay_b": &proto3pb.Nested{Bunny: "rabbit"},
- "kay_c": &proto3pb.Nested{Bunny: "bunny"},
- },
- },
- },
-}
-
-func TestMerge(t *testing.T) {
- for _, m := range mergeTests {
- got := proto.Clone(m.dst)
- proto.Merge(got, m.src)
- if !proto.Equal(got, m.want) {
- t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/decode_test.go b/vendor/github.com/golang/protobuf/proto/decode_test.go
deleted file mode 100644
index 2c4c31d12..000000000
--- a/vendor/github.com/golang/protobuf/proto/decode_test.go
+++ /dev/null
@@ -1,258 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// +build go1.7
-
-package proto_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/golang/protobuf/proto"
- tpb "github.com/golang/protobuf/proto/proto3_proto"
-)
-
-var (
- bytesBlackhole []byte
- msgBlackhole = new(tpb.Message)
-)
-
-// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and
-// 2 bytes long).
-func BenchmarkVarint32ArraySmall(b *testing.B) {
- for i := uint(1); i <= 10; i++ {
- dist := genInt32Dist([7]int{0, 3, 1}, 1<<i)
- raw, err := proto.Marshal(&tpb.Message{
- ShortKey: dist,
- })
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.Run(fmt.Sprintf("Len%v", len(dist)), func(b *testing.B) {
- scratchBuf := proto.NewBuffer(nil)
- b.ResetTimer()
- for k := 0; k < b.N; k++ {
- scratchBuf.SetBuf(raw)
- msgBlackhole.Reset()
- if err := scratchBuf.Unmarshal(msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
- })
- }
-}
-
-// BenchmarkVarint32ArrayLarge shows the performance on an array of large int32 fields (3 and
-// 4 bytes long, with a small number of 1, 2, 5 and 10 byte long versions).
-func BenchmarkVarint32ArrayLarge(b *testing.B) {
- for i := uint(1); i <= 10; i++ {
- dist := genInt32Dist([7]int{0, 1, 2, 4, 8, 1, 1}, 1<<i)
- raw, err := proto.Marshal(&tpb.Message{
- ShortKey: dist,
- })
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.Run(fmt.Sprintf("Len%v", len(dist)), func(b *testing.B) {
- scratchBuf := proto.NewBuffer(nil)
- b.ResetTimer()
- for k := 0; k < b.N; k++ {
- scratchBuf.SetBuf(raw)
- msgBlackhole.Reset()
- if err := scratchBuf.Unmarshal(msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
- })
- }
-}
-
-// BenchmarkVarint64ArraySmall shows the performance on an array of small int64 fields (1 and
-// 2 bytes long).
-func BenchmarkVarint64ArraySmall(b *testing.B) {
- for i := uint(1); i <= 10; i++ {
- dist := genUint64Dist([11]int{0, 3, 1}, 1<<i)
- raw, err := proto.Marshal(&tpb.Message{
- Key: dist,
- })
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.Run(fmt.Sprintf("Len%v", len(dist)), func(b *testing.B) {
- scratchBuf := proto.NewBuffer(nil)
- b.ResetTimer()
- for k := 0; k < b.N; k++ {
- scratchBuf.SetBuf(raw)
- msgBlackhole.Reset()
- if err := scratchBuf.Unmarshal(msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
- })
- }
-}
-
-// BenchmarkVarint64ArrayLarge shows the performance on an array of large int64 fields (6, 7,
-// and 8 bytes long with a small number of the other sizes).
-func BenchmarkVarint64ArrayLarge(b *testing.B) {
- for i := uint(1); i <= 10; i++ {
- dist := genUint64Dist([11]int{0, 1, 1, 2, 4, 8, 16, 32, 16, 1, 1}, 1<<i)
- raw, err := proto.Marshal(&tpb.Message{
- Key: dist,
- })
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.Run(fmt.Sprintf("Len%v", len(dist)), func(b *testing.B) {
- scratchBuf := proto.NewBuffer(nil)
- b.ResetTimer()
- for k := 0; k < b.N; k++ {
- scratchBuf.SetBuf(raw)
- msgBlackhole.Reset()
- if err := scratchBuf.Unmarshal(msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
- })
- }
-}
-
-// BenchmarkVarint64ArrayMixed shows the performance of lots of small messages, each
-// containing a small number of large (3, 4, and 5 byte) repeated int64s.
-func BenchmarkVarint64ArrayMixed(b *testing.B) {
- for i := uint(1); i <= 1<<5; i <<= 1 {
- dist := genUint64Dist([11]int{0, 0, 0, 4, 6, 4, 0, 0, 0, 0, 0}, int(i))
- // number of sub fields
- for k := uint(1); k <= 1<<10; k <<= 2 {
- msg := &tpb.Message{}
- for m := uint(0); m < k; m++ {
- msg.Children = append(msg.Children, &tpb.Message{
- Key: dist,
- })
- }
- raw, err := proto.Marshal(msg)
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.Run(fmt.Sprintf("Fields%vLen%v", k, i), func(b *testing.B) {
- scratchBuf := proto.NewBuffer(nil)
- b.ResetTimer()
- for k := 0; k < b.N; k++ {
- scratchBuf.SetBuf(raw)
- msgBlackhole.Reset()
- if err := scratchBuf.Unmarshal(msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
- })
- }
- }
-}
-
-// genInt32Dist generates a slice of ints that will match the size distribution of dist.
-// A size of 6 corresponds to a max length varint32, which is 10 bytes. The distribution
-// is 1-indexed. (i.e. the value at index 1 is how many 1 byte ints to create).
-func genInt32Dist(dist [7]int, count int) (dest []int32) {
- for i := 0; i < count; i++ {
- for k := 0; k < len(dist); k++ {
- var num int32
- switch k {
- case 1:
- num = 1<<7 - 1
- case 2:
- num = 1<<14 - 1
- case 3:
- num = 1<<21 - 1
- case 4:
- num = 1<<28 - 1
- case 5:
- num = 1<<29 - 1
- case 6:
- num = -1
- }
- for m := 0; m < dist[k]; m++ {
- dest = append(dest, num)
- }
- }
- }
- return
-}
-
-// genUint64Dist generates a slice of ints that will match the size distribution of dist.
-// The distribution is 1-indexed. (i.e. the value at index 1 is how many 1 byte ints to create).
-func genUint64Dist(dist [11]int, count int) (dest []uint64) {
- for i := 0; i < count; i++ {
- for k := 0; k < len(dist); k++ {
- var num uint64
- switch k {
- case 1:
- num = 1<<7 - 1
- case 2:
- num = 1<<14 - 1
- case 3:
- num = 1<<21 - 1
- case 4:
- num = 1<<28 - 1
- case 5:
- num = 1<<35 - 1
- case 6:
- num = 1<<42 - 1
- case 7:
- num = 1<<49 - 1
- case 8:
- num = 1<<56 - 1
- case 9:
- num = 1<<63 - 1
- case 10:
- num = 1<<64 - 1
- }
- for m := 0; m < dist[k]; m++ {
- dest = append(dest, num)
- }
- }
- }
- return
-}
-
-// BenchmarkDecodeEmpty measures the overhead of doing the minimal possible decode.
-func BenchmarkDecodeEmpty(b *testing.B) {
- raw, err := proto.Marshal(&tpb.Message{})
- if err != nil {
- b.Error("wrong encode", err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if err := proto.Unmarshal(raw, msgBlackhole); err != nil {
- b.Error("wrong decode", err)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/encode_test.go b/vendor/github.com/golang/protobuf/proto/encode_test.go
deleted file mode 100644
index a7209475f..000000000
--- a/vendor/github.com/golang/protobuf/proto/encode_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// +build go1.7
-
-package proto_test
-
-import (
- "strconv"
- "testing"
-
- "github.com/golang/protobuf/proto"
- tpb "github.com/golang/protobuf/proto/proto3_proto"
- "github.com/golang/protobuf/ptypes"
-)
-
-var (
- blackhole []byte
-)
-
-// BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the
-// same.
-func BenchmarkAny(b *testing.B) {
- data := make([]byte, 1<<20)
- quantum := 1 << 10
- for i := uint(0); i <= 10; i++ {
- b.Run(strconv.Itoa(quantum<<i), func(b *testing.B) {
- for k := 0; k < b.N; k++ {
- inner := &tpb.Message{
- Data: data[:quantum<<i],
- }
- outer, err := ptypes.MarshalAny(inner)
- if err != nil {
- b.Error("wrong encode", err)
- }
- raw, err := proto.Marshal(&tpb.Message{
- Anything: outer,
- })
- if err != nil {
- b.Error("wrong encode", err)
- }
- blackhole = raw
- }
- })
- }
-}
-
-// BenchmarkEmpy measures the overhead of doing the minimal possible encode.
-func BenchmarkEmpy(b *testing.B) {
- for i := 0; i < b.N; i++ {
- raw, err := proto.Marshal(&tpb.Message{})
- if err != nil {
- b.Error("wrong encode", err)
- }
- blackhole = raw
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/equal_test.go b/vendor/github.com/golang/protobuf/proto/equal_test.go
deleted file mode 100644
index a2febb391..000000000
--- a/vendor/github.com/golang/protobuf/proto/equal_test.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "testing"
-
- . "github.com/golang/protobuf/proto"
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- pb "github.com/golang/protobuf/proto/testdata"
-)
-
-// Four identical base messages.
-// The init function adds extensions to some of them.
-var messageWithoutExtension = &pb.MyMessage{Count: Int32(7)}
-var messageWithExtension1a = &pb.MyMessage{Count: Int32(7)}
-var messageWithExtension1b = &pb.MyMessage{Count: Int32(7)}
-var messageWithExtension2 = &pb.MyMessage{Count: Int32(7)}
-
-// Two messages with non-message extensions.
-var messageWithInt32Extension1 = &pb.MyMessage{Count: Int32(8)}
-var messageWithInt32Extension2 = &pb.MyMessage{Count: Int32(8)}
-
-func init() {
- ext1 := &pb.Ext{Data: String("Kirk")}
- ext2 := &pb.Ext{Data: String("Picard")}
-
- // messageWithExtension1a has ext1, but never marshals it.
- if err := SetExtension(messageWithExtension1a, pb.E_Ext_More, ext1); err != nil {
- panic("SetExtension on 1a failed: " + err.Error())
- }
-
- // messageWithExtension1b is the unmarshaled form of messageWithExtension1a.
- if err := SetExtension(messageWithExtension1b, pb.E_Ext_More, ext1); err != nil {
- panic("SetExtension on 1b failed: " + err.Error())
- }
- buf, err := Marshal(messageWithExtension1b)
- if err != nil {
- panic("Marshal of 1b failed: " + err.Error())
- }
- messageWithExtension1b.Reset()
- if err := Unmarshal(buf, messageWithExtension1b); err != nil {
- panic("Unmarshal of 1b failed: " + err.Error())
- }
-
- // messageWithExtension2 has ext2.
- if err := SetExtension(messageWithExtension2, pb.E_Ext_More, ext2); err != nil {
- panic("SetExtension on 2 failed: " + err.Error())
- }
-
- if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(23)); err != nil {
- panic("SetExtension on Int32-1 failed: " + err.Error())
- }
- if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(24)); err != nil {
- panic("SetExtension on Int32-2 failed: " + err.Error())
- }
-}
-
-var EqualTests = []struct {
- desc string
- a, b Message
- exp bool
-}{
- {"different types", &pb.GoEnum{}, &pb.GoTestField{}, false},
- {"equal empty", &pb.GoEnum{}, &pb.GoEnum{}, true},
- {"nil vs nil", nil, nil, true},
- {"typed nil vs typed nil", (*pb.GoEnum)(nil), (*pb.GoEnum)(nil), true},
- {"typed nil vs empty", (*pb.GoEnum)(nil), &pb.GoEnum{}, false},
- {"different typed nil", (*pb.GoEnum)(nil), (*pb.GoTestField)(nil), false},
-
- {"one set field, one unset field", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{}, false},
- {"one set field zero, one unset field", &pb.GoTest{Param: Int32(0)}, &pb.GoTest{}, false},
- {"different set fields", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("bar")}, false},
- {"equal set", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("foo")}, true},
-
- {"repeated, one set", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{}, false},
- {"repeated, different length", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{F_Int32Repeated: []int32{2}}, false},
- {"repeated, different value", &pb.GoTest{F_Int32Repeated: []int32{2}}, &pb.GoTest{F_Int32Repeated: []int32{3}}, false},
- {"repeated, equal", &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, true},
- {"repeated, nil equal nil", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: nil}, true},
- {"repeated, nil equal empty", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: []int32{}}, true},
- {"repeated, empty equal nil", &pb.GoTest{F_Int32Repeated: []int32{}}, &pb.GoTest{F_Int32Repeated: nil}, true},
-
- {
- "nested, different",
- &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("foo")}},
- &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("bar")}},
- false,
- },
- {
- "nested, equal",
- &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}},
- &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}},
- true,
- },
-
- {"bytes", &pb.OtherMessage{Value: []byte("foo")}, &pb.OtherMessage{Value: []byte("foo")}, true},
- {"bytes, empty", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: []byte{}}, true},
- {"bytes, empty vs nil", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: nil}, false},
- {
- "repeated bytes",
- &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}},
- &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}},
- true,
- },
- // In proto3, []byte{} and []byte(nil) are equal.
- {"proto3 bytes, empty vs nil", &proto3pb.Message{Data: []byte{}}, &proto3pb.Message{Data: nil}, true},
-
- {"extension vs. no extension", messageWithoutExtension, messageWithExtension1a, false},
- {"extension vs. same extension", messageWithExtension1a, messageWithExtension1b, true},
- {"extension vs. different extension", messageWithExtension1a, messageWithExtension2, false},
-
- {"int32 extension vs. itself", messageWithInt32Extension1, messageWithInt32Extension1, true},
- {"int32 extension vs. a different int32", messageWithInt32Extension1, messageWithInt32Extension2, false},
-
- {
- "message with group",
- &pb.MyMessage{
- Count: Int32(1),
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: Int32(5),
- },
- },
- &pb.MyMessage{
- Count: Int32(1),
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: Int32(5),
- },
- },
- true,
- },
-
- {
- "map same",
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}},
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}},
- true,
- },
- {
- "map different entry",
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}},
- &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob"}},
- false,
- },
- {
- "map different key only",
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}},
- &pb.MessageWithMap{NameMapping: map[int32]string{2: "Ken"}},
- false,
- },
- {
- "map different value only",
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}},
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob"}},
- false,
- },
- {
- "zero-length maps same",
- &pb.MessageWithMap{NameMapping: map[int32]string{}},
- &pb.MessageWithMap{NameMapping: nil},
- true,
- },
- {
- "orders in map don't matter",
- &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken", 2: "Rob"}},
- &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob", 1: "Ken"}},
- true,
- },
- {
- "oneof same",
- &pb.Communique{Union: &pb.Communique_Number{41}},
- &pb.Communique{Union: &pb.Communique_Number{41}},
- true,
- },
- {
- "oneof one nil",
- &pb.Communique{Union: &pb.Communique_Number{41}},
- &pb.Communique{},
- false,
- },
- {
- "oneof different",
- &pb.Communique{Union: &pb.Communique_Number{41}},
- &pb.Communique{Union: &pb.Communique_Name{"Bobby Tables"}},
- false,
- },
-}
-
-func TestEqual(t *testing.T) {
- for _, tc := range EqualTests {
- if res := Equal(tc.a, tc.b); res != tc.exp {
- t.Errorf("%v: Equal(%v, %v) = %v, want %v", tc.desc, tc.a, tc.b, res, tc.exp)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions_test.go b/vendor/github.com/golang/protobuf/proto/extensions_test.go
deleted file mode 100644
index a25503088..000000000
--- a/vendor/github.com/golang/protobuf/proto/extensions_test.go
+++ /dev/null
@@ -1,536 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2014 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "sort"
- "testing"
-
- "github.com/golang/protobuf/proto"
- pb "github.com/golang/protobuf/proto/testdata"
- "golang.org/x/sync/errgroup"
-)
-
-func TestGetExtensionsWithMissingExtensions(t *testing.T) {
- msg := &pb.MyMessage{}
- ext1 := &pb.Ext{}
- if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil {
- t.Fatalf("Could not set ext1: %s", err)
- }
- exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{
- pb.E_Ext_More,
- pb.E_Ext_Text,
- })
- if err != nil {
- t.Fatalf("GetExtensions() failed: %s", err)
- }
- if exts[0] != ext1 {
- t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0])
- }
- if exts[1] != nil {
- t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1])
- }
-}
-
-func TestExtensionDescsWithMissingExtensions(t *testing.T) {
- msg := &pb.MyMessage{Count: proto.Int32(0)}
- extdesc1 := pb.E_Ext_More
- if descs, err := proto.ExtensionDescs(msg); len(descs) != 0 || err != nil {
- t.Errorf("proto.ExtensionDescs: got %d descs, error %v; want 0, nil", len(descs), err)
- }
-
- ext1 := &pb.Ext{}
- if err := proto.SetExtension(msg, extdesc1, ext1); err != nil {
- t.Fatalf("Could not set ext1: %s", err)
- }
- extdesc2 := &proto.ExtensionDesc{
- ExtendedType: (*pb.MyMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 123456789,
- Name: "a.b",
- Tag: "varint,123456789,opt",
- }
- ext2 := proto.Bool(false)
- if err := proto.SetExtension(msg, extdesc2, ext2); err != nil {
- t.Fatalf("Could not set ext2: %s", err)
- }
-
- b, err := proto.Marshal(msg)
- if err != nil {
- t.Fatalf("Could not marshal msg: %v", err)
- }
- if err := proto.Unmarshal(b, msg); err != nil {
- t.Fatalf("Could not unmarshal into msg: %v", err)
- }
-
- descs, err := proto.ExtensionDescs(msg)
- if err != nil {
- t.Fatalf("proto.ExtensionDescs: got error %v", err)
- }
- sortExtDescs(descs)
- wantDescs := []*proto.ExtensionDesc{extdesc1, &proto.ExtensionDesc{Field: extdesc2.Field}}
- if !reflect.DeepEqual(descs, wantDescs) {
- t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs)
- }
-}
-
-type ExtensionDescSlice []*proto.ExtensionDesc
-
-func (s ExtensionDescSlice) Len() int { return len(s) }
-func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field }
-func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-func sortExtDescs(s []*proto.ExtensionDesc) {
- sort.Sort(ExtensionDescSlice(s))
-}
-
-func TestGetExtensionStability(t *testing.T) {
- check := func(m *pb.MyMessage) bool {
- ext1, err := proto.GetExtension(m, pb.E_Ext_More)
- if err != nil {
- t.Fatalf("GetExtension() failed: %s", err)
- }
- ext2, err := proto.GetExtension(m, pb.E_Ext_More)
- if err != nil {
- t.Fatalf("GetExtension() failed: %s", err)
- }
- return ext1 == ext2
- }
- msg := &pb.MyMessage{Count: proto.Int32(4)}
- ext0 := &pb.Ext{}
- if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil {
- t.Fatalf("Could not set ext1: %s", ext0)
- }
- if !check(msg) {
- t.Errorf("GetExtension() not stable before marshaling")
- }
- bb, err := proto.Marshal(msg)
- if err != nil {
- t.Fatalf("Marshal() failed: %s", err)
- }
- msg1 := &pb.MyMessage{}
- err = proto.Unmarshal(bb, msg1)
- if err != nil {
- t.Fatalf("Unmarshal() failed: %s", err)
- }
- if !check(msg1) {
- t.Errorf("GetExtension() not stable after unmarshaling")
- }
-}
-
-func TestGetExtensionDefaults(t *testing.T) {
- var setFloat64 float64 = 1
- var setFloat32 float32 = 2
- var setInt32 int32 = 3
- var setInt64 int64 = 4
- var setUint32 uint32 = 5
- var setUint64 uint64 = 6
- var setBool = true
- var setBool2 = false
- var setString = "Goodnight string"
- var setBytes = []byte("Goodnight bytes")
- var setEnum = pb.DefaultsMessage_TWO
-
- type testcase struct {
- ext *proto.ExtensionDesc // Extension we are testing.
- want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail).
- def interface{} // Expected value of extension after ClearExtension().
- }
- tests := []testcase{
- {pb.E_NoDefaultDouble, setFloat64, nil},
- {pb.E_NoDefaultFloat, setFloat32, nil},
- {pb.E_NoDefaultInt32, setInt32, nil},
- {pb.E_NoDefaultInt64, setInt64, nil},
- {pb.E_NoDefaultUint32, setUint32, nil},
- {pb.E_NoDefaultUint64, setUint64, nil},
- {pb.E_NoDefaultSint32, setInt32, nil},
- {pb.E_NoDefaultSint64, setInt64, nil},
- {pb.E_NoDefaultFixed32, setUint32, nil},
- {pb.E_NoDefaultFixed64, setUint64, nil},
- {pb.E_NoDefaultSfixed32, setInt32, nil},
- {pb.E_NoDefaultSfixed64, setInt64, nil},
- {pb.E_NoDefaultBool, setBool, nil},
- {pb.E_NoDefaultBool, setBool2, nil},
- {pb.E_NoDefaultString, setString, nil},
- {pb.E_NoDefaultBytes, setBytes, nil},
- {pb.E_NoDefaultEnum, setEnum, nil},
- {pb.E_DefaultDouble, setFloat64, float64(3.1415)},
- {pb.E_DefaultFloat, setFloat32, float32(3.14)},
- {pb.E_DefaultInt32, setInt32, int32(42)},
- {pb.E_DefaultInt64, setInt64, int64(43)},
- {pb.E_DefaultUint32, setUint32, uint32(44)},
- {pb.E_DefaultUint64, setUint64, uint64(45)},
- {pb.E_DefaultSint32, setInt32, int32(46)},
- {pb.E_DefaultSint64, setInt64, int64(47)},
- {pb.E_DefaultFixed32, setUint32, uint32(48)},
- {pb.E_DefaultFixed64, setUint64, uint64(49)},
- {pb.E_DefaultSfixed32, setInt32, int32(50)},
- {pb.E_DefaultSfixed64, setInt64, int64(51)},
- {pb.E_DefaultBool, setBool, true},
- {pb.E_DefaultBool, setBool2, true},
- {pb.E_DefaultString, setString, "Hello, string"},
- {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")},
- {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE},
- }
-
- checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error {
- val, err := proto.GetExtension(msg, test.ext)
- if err != nil {
- if valWant != nil {
- return fmt.Errorf("GetExtension(): %s", err)
- }
- if want := proto.ErrMissingExtension; err != want {
- return fmt.Errorf("Unexpected error: got %v, want %v", err, want)
- }
- return nil
- }
-
- // All proto2 extension values are either a pointer to a value or a slice of values.
- ty := reflect.TypeOf(val)
- tyWant := reflect.TypeOf(test.ext.ExtensionType)
- if got, want := ty, tyWant; got != want {
- return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want)
- }
- tye := ty.Elem()
- tyeWant := tyWant.Elem()
- if got, want := tye, tyeWant; got != want {
- return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want)
- }
-
- // Check the name of the type of the value.
- // If it is an enum it will be type int32 with the name of the enum.
- if got, want := tye.Name(), tye.Name(); got != want {
- return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want)
- }
-
- // Check that value is what we expect.
- // If we have a pointer in val, get the value it points to.
- valExp := val
- if ty.Kind() == reflect.Ptr {
- valExp = reflect.ValueOf(val).Elem().Interface()
- }
- if got, want := valExp, valWant; !reflect.DeepEqual(got, want) {
- return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want)
- }
-
- return nil
- }
-
- setTo := func(test testcase) interface{} {
- setTo := reflect.ValueOf(test.want)
- if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr {
- setTo = reflect.New(typ).Elem()
- setTo.Set(reflect.New(setTo.Type().Elem()))
- setTo.Elem().Set(reflect.ValueOf(test.want))
- }
- return setTo.Interface()
- }
-
- for _, test := range tests {
- msg := &pb.DefaultsMessage{}
- name := test.ext.Name
-
- // Check the initial value.
- if err := checkVal(test, msg, test.def); err != nil {
- t.Errorf("%s: %v", name, err)
- }
-
- // Set the per-type value and check value.
- name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want)
- if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil {
- t.Errorf("%s: SetExtension(): %v", name, err)
- continue
- }
- if err := checkVal(test, msg, test.want); err != nil {
- t.Errorf("%s: %v", name, err)
- continue
- }
-
- // Set and check the value.
- name += " (cleared)"
- proto.ClearExtension(msg, test.ext)
- if err := checkVal(test, msg, test.def); err != nil {
- t.Errorf("%s: %v", name, err)
- }
- }
-}
-
-func TestExtensionsRoundTrip(t *testing.T) {
- msg := &pb.MyMessage{}
- ext1 := &pb.Ext{
- Data: proto.String("hi"),
- }
- ext2 := &pb.Ext{
- Data: proto.String("there"),
- }
- exists := proto.HasExtension(msg, pb.E_Ext_More)
- if exists {
- t.Error("Extension More present unexpectedly")
- }
- if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil {
- t.Error(err)
- }
- if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil {
- t.Error(err)
- }
- e, err := proto.GetExtension(msg, pb.E_Ext_More)
- if err != nil {
- t.Error(err)
- }
- x, ok := e.(*pb.Ext)
- if !ok {
- t.Errorf("e has type %T, expected testdata.Ext", e)
- } else if *x.Data != "there" {
- t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x)
- }
- proto.ClearExtension(msg, pb.E_Ext_More)
- if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension {
- t.Errorf("got %v, expected ErrMissingExtension", e)
- }
- if _, err := proto.GetExtension(msg, pb.E_X215); err == nil {
- t.Error("expected bad extension error, got nil")
- }
- if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil {
- t.Error("expected extension err")
- }
- if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil {
- t.Error("expected some sort of type mismatch error, got nil")
- }
-}
-
-func TestNilExtension(t *testing.T) {
- msg := &pb.MyMessage{
- Count: proto.Int32(1),
- }
- if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil {
- t.Fatal(err)
- }
- if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil {
- t.Error("expected SetExtension to fail due to a nil extension")
- } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want {
- t.Errorf("expected error %v, got %v", want, err)
- }
- // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update
- // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal.
-}
-
-func TestMarshalUnmarshalRepeatedExtension(t *testing.T) {
- // Add a repeated extension to the result.
- tests := []struct {
- name string
- ext []*pb.ComplexExtension
- }{
- {
- "two fields",
- []*pb.ComplexExtension{
- {First: proto.Int32(7)},
- {Second: proto.Int32(11)},
- },
- },
- {
- "repeated field",
- []*pb.ComplexExtension{
- {Third: []int32{1000}},
- {Third: []int32{2000}},
- },
- },
- {
- "two fields and repeated field",
- []*pb.ComplexExtension{
- {Third: []int32{1000}},
- {First: proto.Int32(9)},
- {Second: proto.Int32(21)},
- {Third: []int32{2000}},
- },
- },
- }
- for _, test := range tests {
- // Marshal message with a repeated extension.
- msg1 := new(pb.OtherMessage)
- err := proto.SetExtension(msg1, pb.E_RComplex, test.ext)
- if err != nil {
- t.Fatalf("[%s] Error setting extension: %v", test.name, err)
- }
- b, err := proto.Marshal(msg1)
- if err != nil {
- t.Fatalf("[%s] Error marshaling message: %v", test.name, err)
- }
-
- // Unmarshal and read the merged proto.
- msg2 := new(pb.OtherMessage)
- err = proto.Unmarshal(b, msg2)
- if err != nil {
- t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err)
- }
- e, err := proto.GetExtension(msg2, pb.E_RComplex)
- if err != nil {
- t.Fatalf("[%s] Error getting extension: %v", test.name, err)
- }
- ext := e.([]*pb.ComplexExtension)
- if ext == nil {
- t.Fatalf("[%s] Invalid extension", test.name)
- }
- if !reflect.DeepEqual(ext, test.ext) {
- t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext)
- }
- }
-}
-
-func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) {
- // We may see multiple instances of the same extension in the wire
- // format. For example, the proto compiler may encode custom options in
- // this way. Here, we verify that we merge the extensions together.
- tests := []struct {
- name string
- ext []*pb.ComplexExtension
- }{
- {
- "two fields",
- []*pb.ComplexExtension{
- {First: proto.Int32(7)},
- {Second: proto.Int32(11)},
- },
- },
- {
- "repeated field",
- []*pb.ComplexExtension{
- {Third: []int32{1000}},
- {Third: []int32{2000}},
- },
- },
- {
- "two fields and repeated field",
- []*pb.ComplexExtension{
- {Third: []int32{1000}},
- {First: proto.Int32(9)},
- {Second: proto.Int32(21)},
- {Third: []int32{2000}},
- },
- },
- }
- for _, test := range tests {
- var buf bytes.Buffer
- var want pb.ComplexExtension
-
- // Generate a serialized representation of a repeated extension
- // by catenating bytes together.
- for i, e := range test.ext {
- // Merge to create the wanted proto.
- proto.Merge(&want, e)
-
- // serialize the message
- msg := new(pb.OtherMessage)
- err := proto.SetExtension(msg, pb.E_Complex, e)
- if err != nil {
- t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err)
- }
- b, err := proto.Marshal(msg)
- if err != nil {
- t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err)
- }
- buf.Write(b)
- }
-
- // Unmarshal and read the merged proto.
- msg2 := new(pb.OtherMessage)
- err := proto.Unmarshal(buf.Bytes(), msg2)
- if err != nil {
- t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err)
- }
- e, err := proto.GetExtension(msg2, pb.E_Complex)
- if err != nil {
- t.Fatalf("[%s] Error getting extension: %v", test.name, err)
- }
- ext := e.(*pb.ComplexExtension)
- if ext == nil {
- t.Fatalf("[%s] Invalid extension", test.name)
- }
- if !reflect.DeepEqual(*ext, want) {
- t.Errorf("[%s] Wrong value for ComplexExtension: got: %s want: %s\n", test.name, ext, &want)
- }
- }
-}
-
-func TestClearAllExtensions(t *testing.T) {
- // unregistered extension
- desc := &proto.ExtensionDesc{
- ExtendedType: (*pb.MyMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 101010100,
- Name: "emptyextension",
- Tag: "varint,0,opt",
- }
- m := &pb.MyMessage{}
- if proto.HasExtension(m, desc) {
- t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m))
- }
- if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil {
- t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err)
- }
- if !proto.HasExtension(m, desc) {
- t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m))
- }
- proto.ClearAllExtensions(m)
- if proto.HasExtension(m, desc) {
- t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m))
- }
-}
-
-func TestMarshalRace(t *testing.T) {
- // unregistered extension
- desc := &proto.ExtensionDesc{
- ExtendedType: (*pb.MyMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 101010100,
- Name: "emptyextension",
- Tag: "varint,0,opt",
- }
-
- m := &pb.MyMessage{Count: proto.Int32(4)}
- if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil {
- t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err)
- }
-
- var g errgroup.Group
- for n := 3; n > 0; n-- {
- g.Go(func() error {
- _, err := proto.Marshal(m)
- return err
- })
- }
- if err := g.Wait(); err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/map_test.go b/vendor/github.com/golang/protobuf/proto/map_test.go
deleted file mode 100644
index 313e87924..000000000
--- a/vendor/github.com/golang/protobuf/proto/map_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package proto_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/golang/protobuf/proto"
- ppb "github.com/golang/protobuf/proto/proto3_proto"
-)
-
-func marshalled() []byte {
- m := &ppb.IntMaps{}
- for i := 0; i < 1000; i++ {
- m.Maps = append(m.Maps, &ppb.IntMap{
- Rtt: map[int32]int32{1: 2},
- })
- }
- b, err := proto.Marshal(m)
- if err != nil {
- panic(fmt.Sprintf("Can't marshal %+v: %v", m, err))
- }
- return b
-}
-
-func BenchmarkConcurrentMapUnmarshal(b *testing.B) {
- in := marshalled()
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- var out ppb.IntMaps
- if err := proto.Unmarshal(in, &out); err != nil {
- b.Errorf("Can't unmarshal ppb.IntMaps: %v", err)
- }
- }
- })
-}
-
-func BenchmarkSequentialMapUnmarshal(b *testing.B) {
- in := marshalled()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- var out ppb.IntMaps
- if err := proto.Unmarshal(in, &out); err != nil {
- b.Errorf("Can't unmarshal ppb.IntMaps: %v", err)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go
deleted file mode 100644
index 353a3ea76..000000000
--- a/vendor/github.com/golang/protobuf/proto/message_set_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2014 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto
-
-import (
- "bytes"
- "testing"
-)
-
-func TestUnmarshalMessageSetWithDuplicate(t *testing.T) {
- // Check that a repeated message set entry will be concatenated.
- in := &messageSet{
- Item: []*_MessageSet_Item{
- {TypeId: Int32(12345), Message: []byte("hoo")},
- {TypeId: Int32(12345), Message: []byte("hah")},
- },
- }
- b, err := Marshal(in)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- t.Logf("Marshaled bytes: %q", b)
-
- var extensions XXX_InternalExtensions
- if err := UnmarshalMessageSet(b, &extensions); err != nil {
- t.Fatalf("UnmarshalMessageSet: %v", err)
- }
- ext, ok := extensions.p.extensionMap[12345]
- if !ok {
- t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap)
- }
- // Skip wire type/field number and length varints.
- got := skipVarint(skipVarint(ext.enc))
- if want := []byte("hoohah"); !bytes.Equal(got, want) {
- t.Errorf("Combined extension is %q, want %q", got, want)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go
deleted file mode 100644
index cc4d0489f..000000000
--- a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go
+++ /dev/null
@@ -1,347 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: proto3_proto/proto3.proto
-// DO NOT EDIT!
-
-/*
-Package proto3_proto is a generated protocol buffer package.
-
-It is generated from these files:
- proto3_proto/proto3.proto
-
-It has these top-level messages:
- Message
- Nested
- MessageWithMap
- IntMap
- IntMaps
-*/
-package proto3_proto
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/ptypes/any"
-import testdata "github.com/golang/protobuf/proto/testdata"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type Message_Humour int32
-
-const (
- Message_UNKNOWN Message_Humour = 0
- Message_PUNS Message_Humour = 1
- Message_SLAPSTICK Message_Humour = 2
- Message_BILL_BAILEY Message_Humour = 3
-)
-
-var Message_Humour_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "PUNS",
- 2: "SLAPSTICK",
- 3: "BILL_BAILEY",
-}
-var Message_Humour_value = map[string]int32{
- "UNKNOWN": 0,
- "PUNS": 1,
- "SLAPSTICK": 2,
- "BILL_BAILEY": 3,
-}
-
-func (x Message_Humour) String() string {
- return proto.EnumName(Message_Humour_name, int32(x))
-}
-func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
-
-type Message struct {
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"`
- HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm" json:"height_in_cm,omitempty"`
- Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
- ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount" json:"result_count,omitempty"`
- TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"`
- Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"`
- Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"`
- ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey" json:"short_key,omitempty"`
- Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"`
- RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
- Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"`
- Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Anything *google_protobuf.Any `protobuf:"bytes,14,opt,name=anything" json:"anything,omitempty"`
- ManyThings []*google_protobuf.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings" json:"many_things,omitempty"`
- Submessage *Message `protobuf:"bytes,17,opt,name=submessage" json:"submessage,omitempty"`
- Children []*Message `protobuf:"bytes,18,rep,name=children" json:"children,omitempty"`
-}
-
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return proto.CompactTextString(m) }
-func (*Message) ProtoMessage() {}
-func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *Message) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Message) GetHilarity() Message_Humour {
- if m != nil {
- return m.Hilarity
- }
- return Message_UNKNOWN
-}
-
-func (m *Message) GetHeightInCm() uint32 {
- if m != nil {
- return m.HeightInCm
- }
- return 0
-}
-
-func (m *Message) GetData() []byte {
- if m != nil {
- return m.Data
- }
- return nil
-}
-
-func (m *Message) GetResultCount() int64 {
- if m != nil {
- return m.ResultCount
- }
- return 0
-}
-
-func (m *Message) GetTrueScotsman() bool {
- if m != nil {
- return m.TrueScotsman
- }
- return false
-}
-
-func (m *Message) GetScore() float32 {
- if m != nil {
- return m.Score
- }
- return 0
-}
-
-func (m *Message) GetKey() []uint64 {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *Message) GetShortKey() []int32 {
- if m != nil {
- return m.ShortKey
- }
- return nil
-}
-
-func (m *Message) GetNested() *Nested {
- if m != nil {
- return m.Nested
- }
- return nil
-}
-
-func (m *Message) GetRFunny() []Message_Humour {
- if m != nil {
- return m.RFunny
- }
- return nil
-}
-
-func (m *Message) GetTerrain() map[string]*Nested {
- if m != nil {
- return m.Terrain
- }
- return nil
-}
-
-func (m *Message) GetProto2Field() *testdata.SubDefaults {
- if m != nil {
- return m.Proto2Field
- }
- return nil
-}
-
-func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults {
- if m != nil {
- return m.Proto2Value
- }
- return nil
-}
-
-func (m *Message) GetAnything() *google_protobuf.Any {
- if m != nil {
- return m.Anything
- }
- return nil
-}
-
-func (m *Message) GetManyThings() []*google_protobuf.Any {
- if m != nil {
- return m.ManyThings
- }
- return nil
-}
-
-func (m *Message) GetSubmessage() *Message {
- if m != nil {
- return m.Submessage
- }
- return nil
-}
-
-func (m *Message) GetChildren() []*Message {
- if m != nil {
- return m.Children
- }
- return nil
-}
-
-type Nested struct {
- Bunny string `protobuf:"bytes,1,opt,name=bunny" json:"bunny,omitempty"`
- Cute bool `protobuf:"varint,2,opt,name=cute" json:"cute,omitempty"`
-}
-
-func (m *Nested) Reset() { *m = Nested{} }
-func (m *Nested) String() string { return proto.CompactTextString(m) }
-func (*Nested) ProtoMessage() {}
-func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *Nested) GetBunny() string {
- if m != nil {
- return m.Bunny
- }
- return ""
-}
-
-func (m *Nested) GetCute() bool {
- if m != nil {
- return m.Cute
- }
- return false
-}
-
-type MessageWithMap struct {
- ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
-}
-
-func (m *MessageWithMap) Reset() { *m = MessageWithMap{} }
-func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
-func (*MessageWithMap) ProtoMessage() {}
-func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *MessageWithMap) GetByteMapping() map[bool][]byte {
- if m != nil {
- return m.ByteMapping
- }
- return nil
-}
-
-type IntMap struct {
- Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
-}
-
-func (m *IntMap) Reset() { *m = IntMap{} }
-func (m *IntMap) String() string { return proto.CompactTextString(m) }
-func (*IntMap) ProtoMessage() {}
-func (*IntMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *IntMap) GetRtt() map[int32]int32 {
- if m != nil {
- return m.Rtt
- }
- return nil
-}
-
-type IntMaps struct {
- Maps []*IntMap `protobuf:"bytes,1,rep,name=maps" json:"maps,omitempty"`
-}
-
-func (m *IntMaps) Reset() { *m = IntMaps{} }
-func (m *IntMaps) String() string { return proto.CompactTextString(m) }
-func (*IntMaps) ProtoMessage() {}
-func (*IntMaps) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *IntMaps) GetMaps() []*IntMap {
- if m != nil {
- return m.Maps
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Message)(nil), "proto3_proto.Message")
- proto.RegisterType((*Nested)(nil), "proto3_proto.Nested")
- proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap")
- proto.RegisterType((*IntMap)(nil), "proto3_proto.IntMap")
- proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps")
- proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
-}
-
-func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 733 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x53, 0x6d, 0x6f, 0xf3, 0x34,
- 0x14, 0x25, 0x4d, 0x5f, 0xd2, 0x9b, 0x74, 0x0b, 0x5e, 0x91, 0xbc, 0x02, 0x52, 0x28, 0x12, 0x8a,
- 0x78, 0x49, 0xa1, 0xd3, 0xd0, 0x84, 0x10, 0x68, 0x1b, 0x9b, 0xa8, 0xd6, 0x95, 0xca, 0xdd, 0x98,
- 0xf8, 0x14, 0xa5, 0xad, 0xdb, 0x46, 0x34, 0x4e, 0x49, 0x1c, 0xa4, 0xfc, 0x1d, 0xfe, 0x28, 0x8f,
- 0x6c, 0xa7, 0x5d, 0x36, 0x65, 0xcf, 0xf3, 0x29, 0xf6, 0xf1, 0xb9, 0xf7, 0x9c, 0x1c, 0x5f, 0xc3,
- 0xe9, 0x2e, 0x89, 0x79, 0x7c, 0xe6, 0xcb, 0xcf, 0x40, 0x6d, 0x3c, 0xf9, 0x41, 0x56, 0xf9, 0xa8,
- 0x77, 0xba, 0x8e, 0xe3, 0xf5, 0x96, 0x2a, 0xca, 0x3c, 0x5b, 0x0d, 0x02, 0x96, 0x2b, 0x62, 0xef,
- 0x84, 0xd3, 0x94, 0x2f, 0x03, 0x1e, 0x0c, 0xc4, 0x42, 0x81, 0xfd, 0xff, 0x5b, 0xd0, 0xba, 0xa7,
- 0x69, 0x1a, 0xac, 0x29, 0x42, 0x50, 0x67, 0x41, 0x44, 0xb1, 0xe6, 0x68, 0x6e, 0x9b, 0xc8, 0x35,
- 0xba, 0x00, 0x63, 0x13, 0x6e, 0x83, 0x24, 0xe4, 0x39, 0xae, 0x39, 0x9a, 0x7b, 0x34, 0xfc, 0xcc,
- 0x2b, 0x0b, 0x7a, 0x45, 0xb1, 0xf7, 0x7b, 0x16, 0xc5, 0x59, 0x42, 0x0e, 0x6c, 0xe4, 0x80, 0xb5,
- 0xa1, 0xe1, 0x7a, 0xc3, 0xfd, 0x90, 0xf9, 0x8b, 0x08, 0xeb, 0x8e, 0xe6, 0x76, 0x08, 0x28, 0x6c,
- 0xc4, 0xae, 0x23, 0xa1, 0x27, 0xec, 0xe0, 0xba, 0xa3, 0xb9, 0x16, 0x91, 0x6b, 0xf4, 0x05, 0x58,
- 0x09, 0x4d, 0xb3, 0x2d, 0xf7, 0x17, 0x71, 0xc6, 0x38, 0x6e, 0x39, 0x9a, 0xab, 0x13, 0x53, 0x61,
- 0xd7, 0x02, 0x42, 0x5f, 0x42, 0x87, 0x27, 0x19, 0xf5, 0xd3, 0x45, 0xcc, 0xd3, 0x28, 0x60, 0xd8,
- 0x70, 0x34, 0xd7, 0x20, 0x96, 0x00, 0x67, 0x05, 0x86, 0xba, 0xd0, 0x48, 0x17, 0x71, 0x42, 0x71,
- 0xdb, 0xd1, 0xdc, 0x1a, 0x51, 0x1b, 0x64, 0x83, 0xfe, 0x37, 0xcd, 0x71, 0xc3, 0xd1, 0xdd, 0x3a,
- 0x11, 0x4b, 0xf4, 0x29, 0xb4, 0xd3, 0x4d, 0x9c, 0x70, 0x5f, 0xe0, 0x27, 0x8e, 0xee, 0x36, 0x88,
- 0x21, 0x81, 0x3b, 0x9a, 0xa3, 0x6f, 0xa1, 0xc9, 0x68, 0xca, 0xe9, 0x12, 0x37, 0x1d, 0xcd, 0x35,
- 0x87, 0xdd, 0x97, 0xbf, 0x3e, 0x91, 0x67, 0xa4, 0xe0, 0xa0, 0x73, 0x68, 0x25, 0xfe, 0x2a, 0x63,
- 0x2c, 0xc7, 0xb6, 0xa3, 0x7f, 0x30, 0xa9, 0x66, 0x72, 0x2b, 0xb8, 0xe8, 0x67, 0x68, 0x71, 0x9a,
- 0x24, 0x41, 0xc8, 0x30, 0x38, 0xba, 0x6b, 0x0e, 0xfb, 0xd5, 0x65, 0x0f, 0x8a, 0x74, 0xc3, 0x78,
- 0x92, 0x93, 0x7d, 0x09, 0xba, 0x00, 0x75, 0xff, 0x43, 0x7f, 0x15, 0xd2, 0xed, 0x12, 0x9b, 0xd2,
- 0xe8, 0x27, 0xde, 0xfe, 0xae, 0xbd, 0x59, 0x36, 0xff, 0x8d, 0xae, 0x82, 0x6c, 0xcb, 0x53, 0x62,
- 0x2a, 0xea, 0xad, 0x60, 0xa2, 0xd1, 0xa1, 0xf2, 0xdf, 0x60, 0x9b, 0x51, 0xdc, 0x91, 0xe2, 0x5f,
- 0x55, 0x8b, 0x4f, 0x25, 0xf3, 0x4f, 0x41, 0x54, 0x06, 0x8a, 0x56, 0x12, 0x41, 0xdf, 0x83, 0x11,
- 0xb0, 0x9c, 0x6f, 0x42, 0xb6, 0xc6, 0x47, 0x45, 0x52, 0x6a, 0x0e, 0xbd, 0xfd, 0x1c, 0x7a, 0x97,
- 0x2c, 0x27, 0x07, 0x16, 0x3a, 0x07, 0x33, 0x0a, 0x58, 0xee, 0xcb, 0x5d, 0x8a, 0x8f, 0xa5, 0x76,
- 0x75, 0x11, 0x08, 0xe2, 0x83, 0xe4, 0xa1, 0x73, 0x80, 0x34, 0x9b, 0x47, 0xca, 0x14, 0xfe, 0xb8,
- 0xf8, 0xd7, 0x2a, 0xc7, 0xa4, 0x44, 0x44, 0x3f, 0x80, 0xb1, 0xd8, 0x84, 0xdb, 0x65, 0x42, 0x19,
- 0x46, 0x52, 0xea, 0x8d, 0xa2, 0x03, 0xad, 0x37, 0x05, 0xab, 0x1c, 0xf8, 0x7e, 0x72, 0xd4, 0xd3,
- 0x90, 0x93, 0xf3, 0x35, 0x34, 0x54, 0x70, 0xb5, 0xf7, 0xcc, 0x86, 0xa2, 0xfc, 0x54, 0xbb, 0xd0,
- 0x7a, 0x8f, 0x60, 0xbf, 0x4e, 0xb1, 0xa2, 0xeb, 0x37, 0x2f, 0xbb, 0xbe, 0x71, 0x91, 0xcf, 0x6d,
- 0xfb, 0xbf, 0x42, 0x53, 0x0d, 0x14, 0x32, 0xa1, 0xf5, 0x38, 0xb9, 0x9b, 0xfc, 0xf1, 0x34, 0xb1,
- 0x3f, 0x42, 0x06, 0xd4, 0xa7, 0x8f, 0x93, 0x99, 0xad, 0xa1, 0x0e, 0xb4, 0x67, 0xe3, 0xcb, 0xe9,
- 0xec, 0x61, 0x74, 0x7d, 0x67, 0xd7, 0xd0, 0x31, 0x98, 0x57, 0xa3, 0xf1, 0xd8, 0xbf, 0xba, 0x1c,
- 0x8d, 0x6f, 0xfe, 0xb2, 0xf5, 0xfe, 0x10, 0x9a, 0xca, 0xac, 0x78, 0x33, 0x73, 0x39, 0xbe, 0xca,
- 0x8f, 0xda, 0x88, 0x57, 0xba, 0xc8, 0xb8, 0x32, 0x64, 0x10, 0xb9, 0xee, 0xff, 0xa7, 0xc1, 0x51,
- 0x91, 0xd9, 0x53, 0xc8, 0x37, 0xf7, 0xc1, 0x0e, 0x4d, 0xc1, 0x9a, 0xe7, 0x9c, 0xfa, 0x51, 0xb0,
- 0xdb, 0x89, 0x39, 0xd0, 0x64, 0xce, 0xdf, 0x55, 0xe6, 0x5c, 0xd4, 0x78, 0x57, 0x39, 0xa7, 0xf7,
- 0x8a, 0x5f, 0x4c, 0xd5, 0xfc, 0x19, 0xe9, 0xfd, 0x02, 0xf6, 0x6b, 0x42, 0x39, 0x30, 0x43, 0x05,
- 0xd6, 0x2d, 0x07, 0x66, 0x95, 0x93, 0xf9, 0x07, 0x9a, 0x23, 0xc6, 0x85, 0xb7, 0x01, 0xe8, 0x09,
- 0xe7, 0x85, 0xa5, 0xcf, 0x5f, 0x5a, 0x52, 0x14, 0x8f, 0x70, 0xae, 0x2c, 0x08, 0x66, 0xef, 0x47,
- 0x30, 0xf6, 0x40, 0x59, 0xb2, 0x51, 0x21, 0xd9, 0x28, 0x4b, 0x9e, 0x41, 0x4b, 0xf5, 0x4b, 0x91,
- 0x0b, 0xf5, 0x28, 0xd8, 0xa5, 0x85, 0x68, 0xb7, 0x4a, 0x94, 0x48, 0xc6, 0xbc, 0xa9, 0x8e, 0xde,
- 0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0x38, 0xad, 0x84, 0xe4, 0x05, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto
deleted file mode 100644
index 204865571..000000000
--- a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto
+++ /dev/null
@@ -1,87 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2014 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-import "google/protobuf/any.proto";
-import "testdata/test.proto";
-
-package proto3_proto;
-
-message Message {
- enum Humour {
- UNKNOWN = 0;
- PUNS = 1;
- SLAPSTICK = 2;
- BILL_BAILEY = 3;
- }
-
- string name = 1;
- Humour hilarity = 2;
- uint32 height_in_cm = 3;
- bytes data = 4;
- int64 result_count = 7;
- bool true_scotsman = 8;
- float score = 9;
-
- repeated uint64 key = 5;
- repeated int32 short_key = 19;
- Nested nested = 6;
- repeated Humour r_funny = 16;
-
- map<string, Nested> terrain = 10;
- testdata.SubDefaults proto2_field = 11;
- map<string, testdata.SubDefaults> proto2_value = 13;
-
- google.protobuf.Any anything = 14;
- repeated google.protobuf.Any many_things = 15;
-
- Message submessage = 17;
- repeated Message children = 18;
-}
-
-message Nested {
- string bunny = 1;
- bool cute = 2;
-}
-
-message MessageWithMap {
- map<bool, bytes> byte_mapping = 1;
-}
-
-
-message IntMap {
- map<int32, int32> rtt = 1;
-}
-
-message IntMaps {
- repeated IntMap maps = 1;
-}
diff --git a/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go
deleted file mode 100644
index 735837f2d..000000000
--- a/vendor/github.com/golang/protobuf/proto/proto3_test.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2014 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "testing"
-
- "github.com/golang/protobuf/proto"
- pb "github.com/golang/protobuf/proto/proto3_proto"
- tpb "github.com/golang/protobuf/proto/testdata"
-)
-
-func TestProto3ZeroValues(t *testing.T) {
- tests := []struct {
- desc string
- m proto.Message
- }{
- {"zero message", &pb.Message{}},
- {"empty bytes field", &pb.Message{Data: []byte{}}},
- }
- for _, test := range tests {
- b, err := proto.Marshal(test.m)
- if err != nil {
- t.Errorf("%s: proto.Marshal: %v", test.desc, err)
- continue
- }
- if len(b) > 0 {
- t.Errorf("%s: Encoding is non-empty: %q", test.desc, b)
- }
- }
-}
-
-func TestRoundTripProto3(t *testing.T) {
- m := &pb.Message{
- Name: "David", // (2 | 1<<3): 0x0a 0x05 "David"
- Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01
- HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01
- Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto"
- ResultCount: 47, // (0 | 7<<3): 0x38 0x2f
- TrueScotsman: true, // (0 | 8<<3): 0x40 0x01
- Score: 8.1, // (5 | 9<<3): 0x4d <8.1>
-
- Key: []uint64{1, 0xdeadbeef},
- Nested: &pb.Nested{
- Bunny: "Monty",
- },
- }
- t.Logf(" m: %v", m)
-
- b, err := proto.Marshal(m)
- if err != nil {
- t.Fatalf("proto.Marshal: %v", err)
- }
- t.Logf(" b: %q", b)
-
- m2 := new(pb.Message)
- if err := proto.Unmarshal(b, m2); err != nil {
- t.Fatalf("proto.Unmarshal: %v", err)
- }
- t.Logf("m2: %v", m2)
-
- if !proto.Equal(m, m2) {
- t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2)
- }
-}
-
-func TestGettersForBasicTypesExist(t *testing.T) {
- var m pb.Message
- if got := m.GetNested().GetBunny(); got != "" {
- t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got)
- }
- if got := m.GetNested().GetCute(); got {
- t.Errorf("m.GetNested().GetCute() = %t, want false", got)
- }
-}
-
-func TestProto3SetDefaults(t *testing.T) {
- in := &pb.Message{
- Terrain: map[string]*pb.Nested{
- "meadow": new(pb.Nested),
- },
- Proto2Field: new(tpb.SubDefaults),
- Proto2Value: map[string]*tpb.SubDefaults{
- "badlands": new(tpb.SubDefaults),
- },
- }
-
- got := proto.Clone(in).(*pb.Message)
- proto.SetDefaults(got)
-
- // There are no defaults in proto3. Everything should be the zero value, but
- // we need to remember to set defaults for nested proto2 messages.
- want := &pb.Message{
- Terrain: map[string]*pb.Nested{
- "meadow": new(pb.Nested),
- },
- Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)},
- Proto2Value: map[string]*tpb.SubDefaults{
- "badlands": &tpb.SubDefaults{N: proto.Int64(7)},
- },
- }
-
- if !proto.Equal(got, want) {
- t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go
deleted file mode 100644
index a2729c39a..000000000
--- a/vendor/github.com/golang/protobuf/proto/size2_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto
-
-import (
- "testing"
-)
-
-// This is a separate file and package from size_test.go because that one uses
-// generated messages and thus may not be in package proto without having a circular
-// dependency, whereas this file tests unexported details of size.go.
-
-func TestVarintSize(t *testing.T) {
- // Check the edge cases carefully.
- testCases := []struct {
- n uint64
- size int
- }{
- {0, 1},
- {1, 1},
- {127, 1},
- {128, 2},
- {16383, 2},
- {16384, 3},
- {1<<63 - 1, 9},
- {1 << 63, 10},
- }
- for _, tc := range testCases {
- size := sizeVarint(tc.n)
- if size != tc.size {
- t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go
deleted file mode 100644
index af1034dc7..000000000
--- a/vendor/github.com/golang/protobuf/proto/size_test.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "log"
- "strings"
- "testing"
-
- . "github.com/golang/protobuf/proto"
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- pb "github.com/golang/protobuf/proto/testdata"
-)
-
-var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)}
-
-// messageWithExtension2 is in equal_test.go.
-var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)}
-
-func init() {
- if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil {
- log.Panicf("SetExtension: %v", err)
- }
- if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil {
- log.Panicf("SetExtension: %v", err)
- }
-
- // Force messageWithExtension3 to have the extension encoded.
- Marshal(messageWithExtension3)
-
-}
-
-var SizeTests = []struct {
- desc string
- pb Message
-}{
- {"empty", &pb.OtherMessage{}},
- // Basic types.
- {"bool", &pb.Defaults{F_Bool: Bool(true)}},
- {"int32", &pb.Defaults{F_Int32: Int32(12)}},
- {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}},
- {"small int64", &pb.Defaults{F_Int64: Int64(1)}},
- {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}},
- {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}},
- {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}},
- {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}},
- {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}},
- {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}},
- {"float", &pb.Defaults{F_Float: Float32(12.6)}},
- {"double", &pb.Defaults{F_Double: Float64(13.9)}},
- {"string", &pb.Defaults{F_String: String("niles")}},
- {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}},
- {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}},
- {"sint32", &pb.Defaults{F_Sint32: Int32(65)}},
- {"sint64", &pb.Defaults{F_Sint64: Int64(67)}},
- {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}},
- // Repeated.
- {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}},
- {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}},
- {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}},
- {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}},
- {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}},
- {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{
- // Need enough large numbers to verify that the header is counting the number of bytes
- // for the field, not the number of elements.
- 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62,
- 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62,
- }}},
- {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}},
- {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}},
- // Nested.
- {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}},
- {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}},
- // Other things.
- {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}},
- {"extension (unencoded)", messageWithExtension1},
- {"extension (encoded)", messageWithExtension3},
- // proto3 message
- {"proto3 empty", &proto3pb.Message{}},
- {"proto3 bool", &proto3pb.Message{TrueScotsman: true}},
- {"proto3 int64", &proto3pb.Message{ResultCount: 1}},
- {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}},
- {"proto3 float", &proto3pb.Message{Score: 12.6}},
- {"proto3 string", &proto3pb.Message{Name: "Snezana"}},
- {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}},
- {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}},
- {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}},
- {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: []byte{}}}},
-
- {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}},
- {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{F: Float64(2.0)}}}},
- {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}},
- {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte{}}}},
-
- {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}},
- {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}},
- {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}},
-
- {"oneof not set", &pb.Oneof{}},
- {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{true}}},
- {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}},
- {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}},
- {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}},
- {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}},
- {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}},
- {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}},
- {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}},
- {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}},
- {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}},
- {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}},
- {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}},
- {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}},
- {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}},
- {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{pb.MyMessage_BLUE}}},
- {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}},
- {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{&pb.GoTestField{Label: String("k"), Type: String("v")}}}},
- {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}},
- {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}},
- {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_Value{2}}},
-}
-
-func TestSize(t *testing.T) {
- for _, tc := range SizeTests {
- size := Size(tc.pb)
- b, err := Marshal(tc.pb)
- if err != nil {
- t.Errorf("%v: Marshal failed: %v", tc.desc, err)
- continue
- }
- if size != len(b) {
- t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b))
- t.Logf("%v: bytes: %#v", tc.desc, b)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/testdata/Makefile b/vendor/github.com/golang/protobuf/proto/testdata/Makefile
deleted file mode 100644
index fc288628a..000000000
--- a/vendor/github.com/golang/protobuf/proto/testdata/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-
-include ../../Make.protobuf
-
-all: regenerate
-
-regenerate:
- rm -f test.pb.go
- make test.pb.go
-
-# The following rules are just aids to development. Not needed for typical testing.
-
-diff: regenerate
- git diff test.pb.go
-
-restore:
- cp test.pb.go.golden test.pb.go
-
-preserve:
- cp test.pb.go test.pb.go.golden
diff --git a/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go b/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go
deleted file mode 100644
index 7172d0e96..000000000
--- a/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Verify that the compiler output for test.proto is unchanged.
-
-package testdata
-
-import (
- "crypto/sha1"
- "fmt"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "testing"
-)
-
-// sum returns in string form (for easy comparison) the SHA-1 hash of the named file.
-func sum(t *testing.T, name string) string {
- data, err := ioutil.ReadFile(name)
- if err != nil {
- t.Fatal(err)
- }
- t.Logf("sum(%q): length is %d", name, len(data))
- hash := sha1.New()
- _, err = hash.Write(data)
- if err != nil {
- t.Fatal(err)
- }
- return fmt.Sprintf("% x", hash.Sum(nil))
-}
-
-func run(t *testing.T, name string, args ...string) {
- cmd := exec.Command(name, args...)
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- err := cmd.Run()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestGolden(t *testing.T) {
- // Compute the original checksum.
- goldenSum := sum(t, "test.pb.go")
- // Run the proto compiler.
- run(t, "protoc", "--go_out="+os.TempDir(), "test.proto")
- newFile := filepath.Join(os.TempDir(), "test.pb.go")
- defer os.Remove(newFile)
- // Compute the new checksum.
- newSum := sum(t, newFile)
- // Verify
- if newSum != goldenSum {
- run(t, "diff", "-u", "test.pb.go", newFile)
- t.Fatal("Code generated by protoc-gen-go has changed; update test.pb.go")
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go b/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go
deleted file mode 100644
index e980d1a03..000000000
--- a/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go
+++ /dev/null
@@ -1,4147 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: test.proto
-
-/*
-Package testdata is a generated protocol buffer package.
-
-It is generated from these files:
- test.proto
-
-It has these top-level messages:
- GoEnum
- GoTestField
- GoTest
- GoTestRequiredGroupField
- GoSkipTest
- NonPackedTest
- PackedTest
- MaxTag
- OldMessage
- NewMessage
- InnerMessage
- OtherMessage
- RequiredInnerMessage
- MyMessage
- Ext
- ComplexExtension
- DefaultsMessage
- MyMessageSet
- Empty
- MessageList
- Strings
- Defaults
- SubDefaults
- RepeatedEnum
- MoreRepeated
- GroupOld
- GroupNew
- FloatingPoint
- MessageWithMap
- Oneof
- Communique
-*/
-package testdata
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type FOO int32
-
-const (
- FOO_FOO1 FOO = 1
-)
-
-var FOO_name = map[int32]string{
- 1: "FOO1",
-}
-var FOO_value = map[string]int32{
- "FOO1": 1,
-}
-
-func (x FOO) Enum() *FOO {
- p := new(FOO)
- *p = x
- return p
-}
-func (x FOO) String() string {
- return proto.EnumName(FOO_name, int32(x))
-}
-func (x *FOO) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
- if err != nil {
- return err
- }
- *x = FOO(value)
- return nil
-}
-func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-// An enum, for completeness.
-type GoTest_KIND int32
-
-const (
- GoTest_VOID GoTest_KIND = 0
- // Basic types
- GoTest_BOOL GoTest_KIND = 1
- GoTest_BYTES GoTest_KIND = 2
- GoTest_FINGERPRINT GoTest_KIND = 3
- GoTest_FLOAT GoTest_KIND = 4
- GoTest_INT GoTest_KIND = 5
- GoTest_STRING GoTest_KIND = 6
- GoTest_TIME GoTest_KIND = 7
- // Groupings
- GoTest_TUPLE GoTest_KIND = 8
- GoTest_ARRAY GoTest_KIND = 9
- GoTest_MAP GoTest_KIND = 10
- // Table types
- GoTest_TABLE GoTest_KIND = 11
- // Functions
- GoTest_FUNCTION GoTest_KIND = 12
-)
-
-var GoTest_KIND_name = map[int32]string{
- 0: "VOID",
- 1: "BOOL",
- 2: "BYTES",
- 3: "FINGERPRINT",
- 4: "FLOAT",
- 5: "INT",
- 6: "STRING",
- 7: "TIME",
- 8: "TUPLE",
- 9: "ARRAY",
- 10: "MAP",
- 11: "TABLE",
- 12: "FUNCTION",
-}
-var GoTest_KIND_value = map[string]int32{
- "VOID": 0,
- "BOOL": 1,
- "BYTES": 2,
- "FINGERPRINT": 3,
- "FLOAT": 4,
- "INT": 5,
- "STRING": 6,
- "TIME": 7,
- "TUPLE": 8,
- "ARRAY": 9,
- "MAP": 10,
- "TABLE": 11,
- "FUNCTION": 12,
-}
-
-func (x GoTest_KIND) Enum() *GoTest_KIND {
- p := new(GoTest_KIND)
- *p = x
- return p
-}
-func (x GoTest_KIND) String() string {
- return proto.EnumName(GoTest_KIND_name, int32(x))
-}
-func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
- if err != nil {
- return err
- }
- *x = GoTest_KIND(value)
- return nil
-}
-func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-type MyMessage_Color int32
-
-const (
- MyMessage_RED MyMessage_Color = 0
- MyMessage_GREEN MyMessage_Color = 1
- MyMessage_BLUE MyMessage_Color = 2
-)
-
-var MyMessage_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var MyMessage_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x MyMessage_Color) Enum() *MyMessage_Color {
- p := new(MyMessage_Color)
- *p = x
- return p
-}
-func (x MyMessage_Color) String() string {
- return proto.EnumName(MyMessage_Color_name, int32(x))
-}
-func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
- if err != nil {
- return err
- }
- *x = MyMessage_Color(value)
- return nil
-}
-func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} }
-
-type DefaultsMessage_DefaultsEnum int32
-
-const (
- DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0
- DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1
- DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2
-)
-
-var DefaultsMessage_DefaultsEnum_name = map[int32]string{
- 0: "ZERO",
- 1: "ONE",
- 2: "TWO",
-}
-var DefaultsMessage_DefaultsEnum_value = map[string]int32{
- "ZERO": 0,
- "ONE": 1,
- "TWO": 2,
-}
-
-func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum {
- p := new(DefaultsMessage_DefaultsEnum)
- *p = x
- return p
-}
-func (x DefaultsMessage_DefaultsEnum) String() string {
- return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x))
-}
-func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum")
- if err != nil {
- return err
- }
- *x = DefaultsMessage_DefaultsEnum(value)
- return nil
-}
-func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{16, 0}
-}
-
-type Defaults_Color int32
-
-const (
- Defaults_RED Defaults_Color = 0
- Defaults_GREEN Defaults_Color = 1
- Defaults_BLUE Defaults_Color = 2
-)
-
-var Defaults_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var Defaults_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x Defaults_Color) Enum() *Defaults_Color {
- p := new(Defaults_Color)
- *p = x
- return p
-}
-func (x Defaults_Color) String() string {
- return proto.EnumName(Defaults_Color_name, int32(x))
-}
-func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
- if err != nil {
- return err
- }
- *x = Defaults_Color(value)
- return nil
-}
-func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{21, 0} }
-
-type RepeatedEnum_Color int32
-
-const (
- RepeatedEnum_RED RepeatedEnum_Color = 1
-)
-
-var RepeatedEnum_Color_name = map[int32]string{
- 1: "RED",
-}
-var RepeatedEnum_Color_value = map[string]int32{
- "RED": 1,
-}
-
-func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
- p := new(RepeatedEnum_Color)
- *p = x
- return p
-}
-func (x RepeatedEnum_Color) String() string {
- return proto.EnumName(RepeatedEnum_Color_name, int32(x))
-}
-func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
- if err != nil {
- return err
- }
- *x = RepeatedEnum_Color(value)
- return nil
-}
-func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{23, 0} }
-
-type GoEnum struct {
- Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoEnum) Reset() { *m = GoEnum{} }
-func (m *GoEnum) String() string { return proto.CompactTextString(m) }
-func (*GoEnum) ProtoMessage() {}
-func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *GoEnum) GetFoo() FOO {
- if m != nil && m.Foo != nil {
- return *m.Foo
- }
- return FOO_FOO1
-}
-
-type GoTestField struct {
- Label *string `protobuf:"bytes,1,req,name=Label" json:"Label,omitempty"`
- Type *string `protobuf:"bytes,2,req,name=Type" json:"Type,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTestField) Reset() { *m = GoTestField{} }
-func (m *GoTestField) String() string { return proto.CompactTextString(m) }
-func (*GoTestField) ProtoMessage() {}
-func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *GoTestField) GetLabel() string {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return ""
-}
-
-func (m *GoTestField) GetType() string {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return ""
-}
-
-type GoTest struct {
- // Some typical parameters
- Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
- Table *string `protobuf:"bytes,2,opt,name=Table" json:"Table,omitempty"`
- Param *int32 `protobuf:"varint,3,opt,name=Param" json:"Param,omitempty"`
- // Required, repeated and optional foreign fields.
- RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField" json:"RequiredField,omitempty"`
- RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField" json:"RepeatedField,omitempty"`
- OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField" json:"OptionalField,omitempty"`
- // Required fields of all basic types
- F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=FBoolRequired" json:"F_Bool_required,omitempty"`
- F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=FInt32Required" json:"F_Int32_required,omitempty"`
- F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=FInt64Required" json:"F_Int64_required,omitempty"`
- F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=FFixed32Required" json:"F_Fixed32_required,omitempty"`
- F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=FFixed64Required" json:"F_Fixed64_required,omitempty"`
- F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=FUint32Required" json:"F_Uint32_required,omitempty"`
- F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=FUint64Required" json:"F_Uint64_required,omitempty"`
- F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=FFloatRequired" json:"F_Float_required,omitempty"`
- F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=FDoubleRequired" json:"F_Double_required,omitempty"`
- F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=FStringRequired" json:"F_String_required,omitempty"`
- F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=FBytesRequired" json:"F_Bytes_required,omitempty"`
- F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=FSint32Required" json:"F_Sint32_required,omitempty"`
- F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=FSint64Required" json:"F_Sint64_required,omitempty"`
- // Repeated fields of all basic types
- F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=FBoolRepeated" json:"F_Bool_repeated,omitempty"`
- F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=FInt32Repeated" json:"F_Int32_repeated,omitempty"`
- F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=FInt64Repeated" json:"F_Int64_repeated,omitempty"`
- F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=FFixed32Repeated" json:"F_Fixed32_repeated,omitempty"`
- F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=FFixed64Repeated" json:"F_Fixed64_repeated,omitempty"`
- F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=FUint32Repeated" json:"F_Uint32_repeated,omitempty"`
- F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=FUint64Repeated" json:"F_Uint64_repeated,omitempty"`
- F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=FFloatRepeated" json:"F_Float_repeated,omitempty"`
- F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=FDoubleRepeated" json:"F_Double_repeated,omitempty"`
- F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=FStringRepeated" json:"F_String_repeated,omitempty"`
- F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=FBytesRepeated" json:"F_Bytes_repeated,omitempty"`
- F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=FSint32Repeated" json:"F_Sint32_repeated,omitempty"`
- F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=FSint64Repeated" json:"F_Sint64_repeated,omitempty"`
- // Optional fields of all basic types
- F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=FBoolOptional" json:"F_Bool_optional,omitempty"`
- F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=FInt32Optional" json:"F_Int32_optional,omitempty"`
- F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=FInt64Optional" json:"F_Int64_optional,omitempty"`
- F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=FFixed32Optional" json:"F_Fixed32_optional,omitempty"`
- F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=FFixed64Optional" json:"F_Fixed64_optional,omitempty"`
- F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=FUint32Optional" json:"F_Uint32_optional,omitempty"`
- F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=FUint64Optional" json:"F_Uint64_optional,omitempty"`
- F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=FFloatOptional" json:"F_Float_optional,omitempty"`
- F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=FDoubleOptional" json:"F_Double_optional,omitempty"`
- F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=FStringOptional" json:"F_String_optional,omitempty"`
- F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=FBytesOptional" json:"F_Bytes_optional,omitempty"`
- F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=FSint32Optional" json:"F_Sint32_optional,omitempty"`
- F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=FSint64Optional" json:"F_Sint64_optional,omitempty"`
- // Default-valued fields of all basic types
- F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=FBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"`
- F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=FInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
- F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=FInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
- F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=FFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
- F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=FFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
- F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=FUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
- F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=FUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
- F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=FFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"`
- F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=FDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"`
- F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=FStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
- F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=FBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
- F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=FSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
- F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=FSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
- // Packed repeated fields (no string or bytes).
- F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=FBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"`
- F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=FInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"`
- F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=FInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"`
- F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=FFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"`
- F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=FFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"`
- F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=FUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"`
- F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=FUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"`
- F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=FFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"`
- F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=FDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"`
- F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=FSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"`
- F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=FSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"`
- Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"`
- Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"`
- Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest) Reset() { *m = GoTest{} }
-func (m *GoTest) String() string { return proto.CompactTextString(m) }
-func (*GoTest) ProtoMessage() {}
-func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-const Default_GoTest_F_BoolDefaulted bool = true
-const Default_GoTest_F_Int32Defaulted int32 = 32
-const Default_GoTest_F_Int64Defaulted int64 = 64
-const Default_GoTest_F_Fixed32Defaulted uint32 = 320
-const Default_GoTest_F_Fixed64Defaulted uint64 = 640
-const Default_GoTest_F_Uint32Defaulted uint32 = 3200
-const Default_GoTest_F_Uint64Defaulted uint64 = 6400
-const Default_GoTest_F_FloatDefaulted float32 = 314159
-const Default_GoTest_F_DoubleDefaulted float64 = 271828
-const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
-
-var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
-
-const Default_GoTest_F_Sint32Defaulted int32 = -32
-const Default_GoTest_F_Sint64Defaulted int64 = -64
-
-func (m *GoTest) GetKind() GoTest_KIND {
- if m != nil && m.Kind != nil {
- return *m.Kind
- }
- return GoTest_VOID
-}
-
-func (m *GoTest) GetTable() string {
- if m != nil && m.Table != nil {
- return *m.Table
- }
- return ""
-}
-
-func (m *GoTest) GetParam() int32 {
- if m != nil && m.Param != nil {
- return *m.Param
- }
- return 0
-}
-
-func (m *GoTest) GetRequiredField() *GoTestField {
- if m != nil {
- return m.RequiredField
- }
- return nil
-}
-
-func (m *GoTest) GetRepeatedField() []*GoTestField {
- if m != nil {
- return m.RepeatedField
- }
- return nil
-}
-
-func (m *GoTest) GetOptionalField() *GoTestField {
- if m != nil {
- return m.OptionalField
- }
- return nil
-}
-
-func (m *GoTest) GetF_BoolRequired() bool {
- if m != nil && m.F_BoolRequired != nil {
- return *m.F_BoolRequired
- }
- return false
-}
-
-func (m *GoTest) GetF_Int32Required() int32 {
- if m != nil && m.F_Int32Required != nil {
- return *m.F_Int32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Int64Required() int64 {
- if m != nil && m.F_Int64Required != nil {
- return *m.F_Int64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed32Required() uint32 {
- if m != nil && m.F_Fixed32Required != nil {
- return *m.F_Fixed32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed64Required() uint64 {
- if m != nil && m.F_Fixed64Required != nil {
- return *m.F_Fixed64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint32Required() uint32 {
- if m != nil && m.F_Uint32Required != nil {
- return *m.F_Uint32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint64Required() uint64 {
- if m != nil && m.F_Uint64Required != nil {
- return *m.F_Uint64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_FloatRequired() float32 {
- if m != nil && m.F_FloatRequired != nil {
- return *m.F_FloatRequired
- }
- return 0
-}
-
-func (m *GoTest) GetF_DoubleRequired() float64 {
- if m != nil && m.F_DoubleRequired != nil {
- return *m.F_DoubleRequired
- }
- return 0
-}
-
-func (m *GoTest) GetF_StringRequired() string {
- if m != nil && m.F_StringRequired != nil {
- return *m.F_StringRequired
- }
- return ""
-}
-
-func (m *GoTest) GetF_BytesRequired() []byte {
- if m != nil {
- return m.F_BytesRequired
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Required() int32 {
- if m != nil && m.F_Sint32Required != nil {
- return *m.F_Sint32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Sint64Required() int64 {
- if m != nil && m.F_Sint64Required != nil {
- return *m.F_Sint64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_BoolRepeated() []bool {
- if m != nil {
- return m.F_BoolRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int32Repeated() []int32 {
- if m != nil {
- return m.F_Int32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int64Repeated() []int64 {
- if m != nil {
- return m.F_Int64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed32Repeated() []uint32 {
- if m != nil {
- return m.F_Fixed32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed64Repeated() []uint64 {
- if m != nil {
- return m.F_Fixed64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint32Repeated() []uint32 {
- if m != nil {
- return m.F_Uint32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint64Repeated() []uint64 {
- if m != nil {
- return m.F_Uint64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_FloatRepeated() []float32 {
- if m != nil {
- return m.F_FloatRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_DoubleRepeated() []float64 {
- if m != nil {
- return m.F_DoubleRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_StringRepeated() []string {
- if m != nil {
- return m.F_StringRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_BytesRepeated() [][]byte {
- if m != nil {
- return m.F_BytesRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Repeated() []int32 {
- if m != nil {
- return m.F_Sint32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint64Repeated() []int64 {
- if m != nil {
- return m.F_Sint64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_BoolOptional() bool {
- if m != nil && m.F_BoolOptional != nil {
- return *m.F_BoolOptional
- }
- return false
-}
-
-func (m *GoTest) GetF_Int32Optional() int32 {
- if m != nil && m.F_Int32Optional != nil {
- return *m.F_Int32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Int64Optional() int64 {
- if m != nil && m.F_Int64Optional != nil {
- return *m.F_Int64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed32Optional() uint32 {
- if m != nil && m.F_Fixed32Optional != nil {
- return *m.F_Fixed32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed64Optional() uint64 {
- if m != nil && m.F_Fixed64Optional != nil {
- return *m.F_Fixed64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint32Optional() uint32 {
- if m != nil && m.F_Uint32Optional != nil {
- return *m.F_Uint32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint64Optional() uint64 {
- if m != nil && m.F_Uint64Optional != nil {
- return *m.F_Uint64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_FloatOptional() float32 {
- if m != nil && m.F_FloatOptional != nil {
- return *m.F_FloatOptional
- }
- return 0
-}
-
-func (m *GoTest) GetF_DoubleOptional() float64 {
- if m != nil && m.F_DoubleOptional != nil {
- return *m.F_DoubleOptional
- }
- return 0
-}
-
-func (m *GoTest) GetF_StringOptional() string {
- if m != nil && m.F_StringOptional != nil {
- return *m.F_StringOptional
- }
- return ""
-}
-
-func (m *GoTest) GetF_BytesOptional() []byte {
- if m != nil {
- return m.F_BytesOptional
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Optional() int32 {
- if m != nil && m.F_Sint32Optional != nil {
- return *m.F_Sint32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Sint64Optional() int64 {
- if m != nil && m.F_Sint64Optional != nil {
- return *m.F_Sint64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_BoolDefaulted() bool {
- if m != nil && m.F_BoolDefaulted != nil {
- return *m.F_BoolDefaulted
- }
- return Default_GoTest_F_BoolDefaulted
-}
-
-func (m *GoTest) GetF_Int32Defaulted() int32 {
- if m != nil && m.F_Int32Defaulted != nil {
- return *m.F_Int32Defaulted
- }
- return Default_GoTest_F_Int32Defaulted
-}
-
-func (m *GoTest) GetF_Int64Defaulted() int64 {
- if m != nil && m.F_Int64Defaulted != nil {
- return *m.F_Int64Defaulted
- }
- return Default_GoTest_F_Int64Defaulted
-}
-
-func (m *GoTest) GetF_Fixed32Defaulted() uint32 {
- if m != nil && m.F_Fixed32Defaulted != nil {
- return *m.F_Fixed32Defaulted
- }
- return Default_GoTest_F_Fixed32Defaulted
-}
-
-func (m *GoTest) GetF_Fixed64Defaulted() uint64 {
- if m != nil && m.F_Fixed64Defaulted != nil {
- return *m.F_Fixed64Defaulted
- }
- return Default_GoTest_F_Fixed64Defaulted
-}
-
-func (m *GoTest) GetF_Uint32Defaulted() uint32 {
- if m != nil && m.F_Uint32Defaulted != nil {
- return *m.F_Uint32Defaulted
- }
- return Default_GoTest_F_Uint32Defaulted
-}
-
-func (m *GoTest) GetF_Uint64Defaulted() uint64 {
- if m != nil && m.F_Uint64Defaulted != nil {
- return *m.F_Uint64Defaulted
- }
- return Default_GoTest_F_Uint64Defaulted
-}
-
-func (m *GoTest) GetF_FloatDefaulted() float32 {
- if m != nil && m.F_FloatDefaulted != nil {
- return *m.F_FloatDefaulted
- }
- return Default_GoTest_F_FloatDefaulted
-}
-
-func (m *GoTest) GetF_DoubleDefaulted() float64 {
- if m != nil && m.F_DoubleDefaulted != nil {
- return *m.F_DoubleDefaulted
- }
- return Default_GoTest_F_DoubleDefaulted
-}
-
-func (m *GoTest) GetF_StringDefaulted() string {
- if m != nil && m.F_StringDefaulted != nil {
- return *m.F_StringDefaulted
- }
- return Default_GoTest_F_StringDefaulted
-}
-
-func (m *GoTest) GetF_BytesDefaulted() []byte {
- if m != nil && m.F_BytesDefaulted != nil {
- return m.F_BytesDefaulted
- }
- return append([]byte(nil), Default_GoTest_F_BytesDefaulted...)
-}
-
-func (m *GoTest) GetF_Sint32Defaulted() int32 {
- if m != nil && m.F_Sint32Defaulted != nil {
- return *m.F_Sint32Defaulted
- }
- return Default_GoTest_F_Sint32Defaulted
-}
-
-func (m *GoTest) GetF_Sint64Defaulted() int64 {
- if m != nil && m.F_Sint64Defaulted != nil {
- return *m.F_Sint64Defaulted
- }
- return Default_GoTest_F_Sint64Defaulted
-}
-
-func (m *GoTest) GetF_BoolRepeatedPacked() []bool {
- if m != nil {
- return m.F_BoolRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int32RepeatedPacked() []int32 {
- if m != nil {
- return m.F_Int32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int64RepeatedPacked() []int64 {
- if m != nil {
- return m.F_Int64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 {
- if m != nil {
- return m.F_Fixed32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 {
- if m != nil {
- return m.F_Fixed64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 {
- if m != nil {
- return m.F_Uint32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 {
- if m != nil {
- return m.F_Uint64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_FloatRepeatedPacked() []float32 {
- if m != nil {
- return m.F_FloatRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 {
- if m != nil {
- return m.F_DoubleRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 {
- if m != nil {
- return m.F_Sint32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 {
- if m != nil {
- return m.F_Sint64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup {
- if m != nil {
- return m.Requiredgroup
- }
- return nil
-}
-
-func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup {
- if m != nil {
- return m.Repeatedgroup
- }
- return nil
-}
-
-func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
- }
- return nil
-}
-
-// Required, repeated, and optional groups.
-type GoTest_RequiredGroup struct {
- RequiredField *string `protobuf:"bytes,71,req,name=RequiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} }
-func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_RequiredGroup) ProtoMessage() {}
-func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-func (m *GoTest_RequiredGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-type GoTest_RepeatedGroup struct {
- RequiredField *string `protobuf:"bytes,81,req,name=RequiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} }
-func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_RepeatedGroup) ProtoMessage() {}
-func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} }
-
-func (m *GoTest_RepeatedGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-type GoTest_OptionalGroup struct {
- RequiredField *string `protobuf:"bytes,91,req,name=RequiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} }
-func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_OptionalGroup) ProtoMessage() {}
-func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} }
-
-func (m *GoTest_OptionalGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-// For testing a group containing a required field.
-type GoTestRequiredGroupField struct {
- Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} }
-func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) }
-func (*GoTestRequiredGroupField) ProtoMessage() {}
-func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group {
- if m != nil {
- return m.Group
- }
- return nil
-}
-
-type GoTestRequiredGroupField_Group struct {
- Field *int32 `protobuf:"varint,2,req,name=Field" json:"Field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} }
-func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) }
-func (*GoTestRequiredGroupField_Group) ProtoMessage() {}
-func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{3, 0}
-}
-
-func (m *GoTestRequiredGroupField_Group) GetField() int32 {
- if m != nil && m.Field != nil {
- return *m.Field
- }
- return 0
-}
-
-// For testing skipping of unrecognized fields.
-// Numbers are all big, larger than tag numbers in GoTestField,
-// the message used in the corresponding test.
-type GoSkipTest struct {
- SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"`
- SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"`
- SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"`
- SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"`
- Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoSkipTest) Reset() { *m = GoSkipTest{} }
-func (m *GoSkipTest) String() string { return proto.CompactTextString(m) }
-func (*GoSkipTest) ProtoMessage() {}
-func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *GoSkipTest) GetSkipInt32() int32 {
- if m != nil && m.SkipInt32 != nil {
- return *m.SkipInt32
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipFixed32() uint32 {
- if m != nil && m.SkipFixed32 != nil {
- return *m.SkipFixed32
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipFixed64() uint64 {
- if m != nil && m.SkipFixed64 != nil {
- return *m.SkipFixed64
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipString() string {
- if m != nil && m.SkipString != nil {
- return *m.SkipString
- }
- return ""
-}
-
-func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup {
- if m != nil {
- return m.Skipgroup
- }
- return nil
-}
-
-type GoSkipTest_SkipGroup struct {
- GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"`
- GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} }
-func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) }
-func (*GoSkipTest_SkipGroup) ProtoMessage() {}
-func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
-
-func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 {
- if m != nil && m.GroupInt32 != nil {
- return *m.GroupInt32
- }
- return 0
-}
-
-func (m *GoSkipTest_SkipGroup) GetGroupString() string {
- if m != nil && m.GroupString != nil {
- return *m.GroupString
- }
- return ""
-}
-
-// For testing packed/non-packed decoder switching.
-// A serialized instance of one should be deserializable as the other.
-type NonPackedTest struct {
- A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NonPackedTest) Reset() { *m = NonPackedTest{} }
-func (m *NonPackedTest) String() string { return proto.CompactTextString(m) }
-func (*NonPackedTest) ProtoMessage() {}
-func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-
-func (m *NonPackedTest) GetA() []int32 {
- if m != nil {
- return m.A
- }
- return nil
-}
-
-type PackedTest struct {
- B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *PackedTest) Reset() { *m = PackedTest{} }
-func (m *PackedTest) String() string { return proto.CompactTextString(m) }
-func (*PackedTest) ProtoMessage() {}
-func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-
-func (m *PackedTest) GetB() []int32 {
- if m != nil {
- return m.B
- }
- return nil
-}
-
-type MaxTag struct {
- // Maximum possible tag number.
- LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MaxTag) Reset() { *m = MaxTag{} }
-func (m *MaxTag) String() string { return proto.CompactTextString(m) }
-func (*MaxTag) ProtoMessage() {}
-func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-
-func (m *MaxTag) GetLastField() string {
- if m != nil && m.LastField != nil {
- return *m.LastField
- }
- return ""
-}
-
-type OldMessage struct {
- Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
- Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldMessage) Reset() { *m = OldMessage{} }
-func (m *OldMessage) String() string { return proto.CompactTextString(m) }
-func (*OldMessage) ProtoMessage() {}
-func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-
-func (m *OldMessage) GetNested() *OldMessage_Nested {
- if m != nil {
- return m.Nested
- }
- return nil
-}
-
-func (m *OldMessage) GetNum() int32 {
- if m != nil && m.Num != nil {
- return *m.Num
- }
- return 0
-}
-
-type OldMessage_Nested struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} }
-func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) }
-func (*OldMessage_Nested) ProtoMessage() {}
-func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} }
-
-func (m *OldMessage_Nested) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-// NewMessage is wire compatible with OldMessage;
-// imagine it as a future version.
-type NewMessage struct {
- Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
- // This is an int32 in OldMessage.
- Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NewMessage) Reset() { *m = NewMessage{} }
-func (m *NewMessage) String() string { return proto.CompactTextString(m) }
-func (*NewMessage) ProtoMessage() {}
-func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
-
-func (m *NewMessage) GetNested() *NewMessage_Nested {
- if m != nil {
- return m.Nested
- }
- return nil
-}
-
-func (m *NewMessage) GetNum() int64 {
- if m != nil && m.Num != nil {
- return *m.Num
- }
- return 0
-}
-
-type NewMessage_Nested struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} }
-func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) }
-func (*NewMessage_Nested) ProtoMessage() {}
-func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} }
-
-func (m *NewMessage_Nested) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *NewMessage_Nested) GetFoodGroup() string {
- if m != nil && m.FoodGroup != nil {
- return *m.FoodGroup
- }
- return ""
-}
-
-type InnerMessage struct {
- Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
- Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
- Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *InnerMessage) Reset() { *m = InnerMessage{} }
-func (m *InnerMessage) String() string { return proto.CompactTextString(m) }
-func (*InnerMessage) ProtoMessage() {}
-func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
-
-const Default_InnerMessage_Port int32 = 4000
-
-func (m *InnerMessage) GetHost() string {
- if m != nil && m.Host != nil {
- return *m.Host
- }
- return ""
-}
-
-func (m *InnerMessage) GetPort() int32 {
- if m != nil && m.Port != nil {
- return *m.Port
- }
- return Default_InnerMessage_Port
-}
-
-func (m *InnerMessage) GetConnected() bool {
- if m != nil && m.Connected != nil {
- return *m.Connected
- }
- return false
-}
-
-type OtherMessage struct {
- Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
- Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
- Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
- Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherMessage) Reset() { *m = OtherMessage{} }
-func (m *OtherMessage) String() string { return proto.CompactTextString(m) }
-func (*OtherMessage) ProtoMessage() {}
-func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
-
-var extRange_OtherMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OtherMessage
-}
-
-func (m *OtherMessage) GetKey() int64 {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return 0
-}
-
-func (m *OtherMessage) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *OtherMessage) GetWeight() float32 {
- if m != nil && m.Weight != nil {
- return *m.Weight
- }
- return 0
-}
-
-func (m *OtherMessage) GetInner() *InnerMessage {
- if m != nil {
- return m.Inner
- }
- return nil
-}
-
-type RequiredInnerMessage struct {
- LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} }
-func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) }
-func (*RequiredInnerMessage) ProtoMessage() {}
-func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
-
-func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage {
- if m != nil {
- return m.LeoFinallyWonAnOscar
- }
- return nil
-}
-
-type MyMessage struct {
- Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
- Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
- Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
- Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
- Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
- Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
- WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"`
- RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"`
- Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
- Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"`
- // This field becomes [][]byte in the generated code.
- RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"`
- Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessage) Reset() { *m = MyMessage{} }
-func (m *MyMessage) String() string { return proto.CompactTextString(m) }
-func (*MyMessage) ProtoMessage() {}
-func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
-
-var extRange_MyMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MyMessage
-}
-
-func (m *MyMessage) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *MyMessage) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MyMessage) GetQuote() string {
- if m != nil && m.Quote != nil {
- return *m.Quote
- }
- return ""
-}
-
-func (m *MyMessage) GetPet() []string {
- if m != nil {
- return m.Pet
- }
- return nil
-}
-
-func (m *MyMessage) GetInner() *InnerMessage {
- if m != nil {
- return m.Inner
- }
- return nil
-}
-
-func (m *MyMessage) GetOthers() []*OtherMessage {
- if m != nil {
- return m.Others
- }
- return nil
-}
-
-func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage {
- if m != nil {
- return m.WeMustGoDeeper
- }
- return nil
-}
-
-func (m *MyMessage) GetRepInner() []*InnerMessage {
- if m != nil {
- return m.RepInner
- }
- return nil
-}
-
-func (m *MyMessage) GetBikeshed() MyMessage_Color {
- if m != nil && m.Bikeshed != nil {
- return *m.Bikeshed
- }
- return MyMessage_RED
-}
-
-func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup {
- if m != nil {
- return m.Somegroup
- }
- return nil
-}
-
-func (m *MyMessage) GetRepBytes() [][]byte {
- if m != nil {
- return m.RepBytes
- }
- return nil
-}
-
-func (m *MyMessage) GetBigfloat() float64 {
- if m != nil && m.Bigfloat != nil {
- return *m.Bigfloat
- }
- return 0
-}
-
-type MyMessage_SomeGroup struct {
- GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} }
-func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*MyMessage_SomeGroup) ProtoMessage() {}
-func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} }
-
-func (m *MyMessage_SomeGroup) GetGroupField() int32 {
- if m != nil && m.GroupField != nil {
- return *m.GroupField
- }
- return 0
-}
-
-type Ext struct {
- Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Ext) Reset() { *m = Ext{} }
-func (m *Ext) String() string { return proto.CompactTextString(m) }
-func (*Ext) ProtoMessage() {}
-func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
-
-func (m *Ext) GetData() string {
- if m != nil && m.Data != nil {
- return *m.Data
- }
- return ""
-}
-
-var E_Ext_More = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*Ext)(nil),
- Field: 103,
- Name: "testdata.Ext.more",
- Tag: "bytes,103,opt,name=more",
- Filename: "test.proto",
-}
-
-var E_Ext_Text = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 104,
- Name: "testdata.Ext.text",
- Tag: "bytes,104,opt,name=text",
- Filename: "test.proto",
-}
-
-var E_Ext_Number = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 105,
- Name: "testdata.Ext.number",
- Tag: "varint,105,opt,name=number",
- Filename: "test.proto",
-}
-
-type ComplexExtension struct {
- First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"`
- Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"`
- Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ComplexExtension) Reset() { *m = ComplexExtension{} }
-func (m *ComplexExtension) String() string { return proto.CompactTextString(m) }
-func (*ComplexExtension) ProtoMessage() {}
-func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
-
-func (m *ComplexExtension) GetFirst() int32 {
- if m != nil && m.First != nil {
- return *m.First
- }
- return 0
-}
-
-func (m *ComplexExtension) GetSecond() int32 {
- if m != nil && m.Second != nil {
- return *m.Second
- }
- return 0
-}
-
-func (m *ComplexExtension) GetThird() []int32 {
- if m != nil {
- return m.Third
- }
- return nil
-}
-
-type DefaultsMessage struct {
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} }
-func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) }
-func (*DefaultsMessage) ProtoMessage() {}
-func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
-
-var extRange_DefaultsMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_DefaultsMessage
-}
-
-type MyMessageSet struct {
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessageSet) Reset() { *m = MyMessageSet{} }
-func (m *MyMessageSet) String() string { return proto.CompactTextString(m) }
-func (*MyMessageSet) ProtoMessage() {}
-func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
-
-func (m *MyMessageSet) Marshal() ([]byte, error) {
- return proto.MarshalMessageSet(&m.XXX_InternalExtensions)
-}
-func (m *MyMessageSet) Unmarshal(buf []byte) error {
- return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)
-}
-func (m *MyMessageSet) MarshalJSON() ([]byte, error) {
- return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *MyMessageSet) UnmarshalJSON(buf []byte) error {
- return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
-}
-
-// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler
-var _ proto.Marshaler = (*MyMessageSet)(nil)
-var _ proto.Unmarshaler = (*MyMessageSet)(nil)
-
-var extRange_MyMessageSet = []proto.ExtensionRange{
- {100, 2147483646},
-}
-
-func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MyMessageSet
-}
-
-type Empty struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Empty) Reset() { *m = Empty{} }
-func (m *Empty) String() string { return proto.CompactTextString(m) }
-func (*Empty) ProtoMessage() {}
-func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
-
-type MessageList struct {
- Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageList) Reset() { *m = MessageList{} }
-func (m *MessageList) String() string { return proto.CompactTextString(m) }
-func (*MessageList) ProtoMessage() {}
-func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
-
-func (m *MessageList) GetMessage() []*MessageList_Message {
- if m != nil {
- return m.Message
- }
- return nil
-}
-
-type MessageList_Message struct {
- Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
- Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageList_Message) Reset() { *m = MessageList_Message{} }
-func (m *MessageList_Message) String() string { return proto.CompactTextString(m) }
-func (*MessageList_Message) ProtoMessage() {}
-func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} }
-
-func (m *MessageList_Message) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MessageList_Message) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-type Strings struct {
- StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
- BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Strings) Reset() { *m = Strings{} }
-func (m *Strings) String() string { return proto.CompactTextString(m) }
-func (*Strings) ProtoMessage() {}
-func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
-
-func (m *Strings) GetStringField() string {
- if m != nil && m.StringField != nil {
- return *m.StringField
- }
- return ""
-}
-
-func (m *Strings) GetBytesField() []byte {
- if m != nil {
- return m.BytesField
- }
- return nil
-}
-
-type Defaults struct {
- // Default-valued fields of all basic types.
- // Same as GoTest, but copied here to make testing easier.
- F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,def=1" json:"F_Bool,omitempty"`
- F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,def=32" json:"F_Int32,omitempty"`
- F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,def=64" json:"F_Int64,omitempty"`
- F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,def=320" json:"F_Fixed32,omitempty"`
- F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,def=640" json:"F_Fixed64,omitempty"`
- F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,def=3200" json:"F_Uint32,omitempty"`
- F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,def=6400" json:"F_Uint64,omitempty"`
- F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,def=314159" json:"F_Float,omitempty"`
- F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,def=271828" json:"F_Double,omitempty"`
- F_String *string `protobuf:"bytes,10,opt,name=F_String,json=FString,def=hello, \"world!\"\n" json:"F_String,omitempty"`
- F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,def=Bignose" json:"F_Bytes,omitempty"`
- F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,def=-32" json:"F_Sint32,omitempty"`
- F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,def=-64" json:"F_Sint64,omitempty"`
- F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
- // More fields with crazy defaults.
- F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=FPinf,def=inf" json:"F_Pinf,omitempty"`
- F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=FNinf,def=-inf" json:"F_Ninf,omitempty"`
- F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=FNan,def=nan" json:"F_Nan,omitempty"`
- // Sub-message.
- Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
- // Redundant but explicit defaults.
- StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Defaults) Reset() { *m = Defaults{} }
-func (m *Defaults) String() string { return proto.CompactTextString(m) }
-func (*Defaults) ProtoMessage() {}
-func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
-
-const Default_Defaults_F_Bool bool = true
-const Default_Defaults_F_Int32 int32 = 32
-const Default_Defaults_F_Int64 int64 = 64
-const Default_Defaults_F_Fixed32 uint32 = 320
-const Default_Defaults_F_Fixed64 uint64 = 640
-const Default_Defaults_F_Uint32 uint32 = 3200
-const Default_Defaults_F_Uint64 uint64 = 6400
-const Default_Defaults_F_Float float32 = 314159
-const Default_Defaults_F_Double float64 = 271828
-const Default_Defaults_F_String string = "hello, \"world!\"\n"
-
-var Default_Defaults_F_Bytes []byte = []byte("Bignose")
-
-const Default_Defaults_F_Sint32 int32 = -32
-const Default_Defaults_F_Sint64 int64 = -64
-const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
-
-var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
-var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
-var Default_Defaults_F_Nan float32 = float32(math.NaN())
-
-func (m *Defaults) GetF_Bool() bool {
- if m != nil && m.F_Bool != nil {
- return *m.F_Bool
- }
- return Default_Defaults_F_Bool
-}
-
-func (m *Defaults) GetF_Int32() int32 {
- if m != nil && m.F_Int32 != nil {
- return *m.F_Int32
- }
- return Default_Defaults_F_Int32
-}
-
-func (m *Defaults) GetF_Int64() int64 {
- if m != nil && m.F_Int64 != nil {
- return *m.F_Int64
- }
- return Default_Defaults_F_Int64
-}
-
-func (m *Defaults) GetF_Fixed32() uint32 {
- if m != nil && m.F_Fixed32 != nil {
- return *m.F_Fixed32
- }
- return Default_Defaults_F_Fixed32
-}
-
-func (m *Defaults) GetF_Fixed64() uint64 {
- if m != nil && m.F_Fixed64 != nil {
- return *m.F_Fixed64
- }
- return Default_Defaults_F_Fixed64
-}
-
-func (m *Defaults) GetF_Uint32() uint32 {
- if m != nil && m.F_Uint32 != nil {
- return *m.F_Uint32
- }
- return Default_Defaults_F_Uint32
-}
-
-func (m *Defaults) GetF_Uint64() uint64 {
- if m != nil && m.F_Uint64 != nil {
- return *m.F_Uint64
- }
- return Default_Defaults_F_Uint64
-}
-
-func (m *Defaults) GetF_Float() float32 {
- if m != nil && m.F_Float != nil {
- return *m.F_Float
- }
- return Default_Defaults_F_Float
-}
-
-func (m *Defaults) GetF_Double() float64 {
- if m != nil && m.F_Double != nil {
- return *m.F_Double
- }
- return Default_Defaults_F_Double
-}
-
-func (m *Defaults) GetF_String() string {
- if m != nil && m.F_String != nil {
- return *m.F_String
- }
- return Default_Defaults_F_String
-}
-
-func (m *Defaults) GetF_Bytes() []byte {
- if m != nil && m.F_Bytes != nil {
- return m.F_Bytes
- }
- return append([]byte(nil), Default_Defaults_F_Bytes...)
-}
-
-func (m *Defaults) GetF_Sint32() int32 {
- if m != nil && m.F_Sint32 != nil {
- return *m.F_Sint32
- }
- return Default_Defaults_F_Sint32
-}
-
-func (m *Defaults) GetF_Sint64() int64 {
- if m != nil && m.F_Sint64 != nil {
- return *m.F_Sint64
- }
- return Default_Defaults_F_Sint64
-}
-
-func (m *Defaults) GetF_Enum() Defaults_Color {
- if m != nil && m.F_Enum != nil {
- return *m.F_Enum
- }
- return Default_Defaults_F_Enum
-}
-
-func (m *Defaults) GetF_Pinf() float32 {
- if m != nil && m.F_Pinf != nil {
- return *m.F_Pinf
- }
- return Default_Defaults_F_Pinf
-}
-
-func (m *Defaults) GetF_Ninf() float32 {
- if m != nil && m.F_Ninf != nil {
- return *m.F_Ninf
- }
- return Default_Defaults_F_Ninf
-}
-
-func (m *Defaults) GetF_Nan() float32 {
- if m != nil && m.F_Nan != nil {
- return *m.F_Nan
- }
- return Default_Defaults_F_Nan
-}
-
-func (m *Defaults) GetSub() *SubDefaults {
- if m != nil {
- return m.Sub
- }
- return nil
-}
-
-func (m *Defaults) GetStrZero() string {
- if m != nil && m.StrZero != nil {
- return *m.StrZero
- }
- return ""
-}
-
-type SubDefaults struct {
- N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SubDefaults) Reset() { *m = SubDefaults{} }
-func (m *SubDefaults) String() string { return proto.CompactTextString(m) }
-func (*SubDefaults) ProtoMessage() {}
-func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
-
-const Default_SubDefaults_N int64 = 7
-
-func (m *SubDefaults) GetN() int64 {
- if m != nil && m.N != nil {
- return *m.N
- }
- return Default_SubDefaults_N
-}
-
-type RepeatedEnum struct {
- Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} }
-func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) }
-func (*RepeatedEnum) ProtoMessage() {}
-func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
-
-func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color {
- if m != nil {
- return m.Color
- }
- return nil
-}
-
-type MoreRepeated struct {
- Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"`
- BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"`
- Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"`
- IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"`
- Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"`
- Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"`
- Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MoreRepeated) Reset() { *m = MoreRepeated{} }
-func (m *MoreRepeated) String() string { return proto.CompactTextString(m) }
-func (*MoreRepeated) ProtoMessage() {}
-func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
-
-func (m *MoreRepeated) GetBools() []bool {
- if m != nil {
- return m.Bools
- }
- return nil
-}
-
-func (m *MoreRepeated) GetBoolsPacked() []bool {
- if m != nil {
- return m.BoolsPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetInts() []int32 {
- if m != nil {
- return m.Ints
- }
- return nil
-}
-
-func (m *MoreRepeated) GetIntsPacked() []int32 {
- if m != nil {
- return m.IntsPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetInt64SPacked() []int64 {
- if m != nil {
- return m.Int64SPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetStrings() []string {
- if m != nil {
- return m.Strings
- }
- return nil
-}
-
-func (m *MoreRepeated) GetFixeds() []uint32 {
- if m != nil {
- return m.Fixeds
- }
- return nil
-}
-
-type GroupOld struct {
- G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupOld) Reset() { *m = GroupOld{} }
-func (m *GroupOld) String() string { return proto.CompactTextString(m) }
-func (*GroupOld) ProtoMessage() {}
-func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
-
-func (m *GroupOld) GetG() *GroupOld_G {
- if m != nil {
- return m.G
- }
- return nil
-}
-
-type GroupOld_G struct {
- X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupOld_G) Reset() { *m = GroupOld_G{} }
-func (m *GroupOld_G) String() string { return proto.CompactTextString(m) }
-func (*GroupOld_G) ProtoMessage() {}
-func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} }
-
-func (m *GroupOld_G) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-type GroupNew struct {
- G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupNew) Reset() { *m = GroupNew{} }
-func (m *GroupNew) String() string { return proto.CompactTextString(m) }
-func (*GroupNew) ProtoMessage() {}
-func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
-
-func (m *GroupNew) GetG() *GroupNew_G {
- if m != nil {
- return m.G
- }
- return nil
-}
-
-type GroupNew_G struct {
- X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"`
- Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupNew_G) Reset() { *m = GroupNew_G{} }
-func (m *GroupNew_G) String() string { return proto.CompactTextString(m) }
-func (*GroupNew_G) ProtoMessage() {}
-func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26, 0} }
-
-func (m *GroupNew_G) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-func (m *GroupNew_G) GetY() int32 {
- if m != nil && m.Y != nil {
- return *m.Y
- }
- return 0
-}
-
-type FloatingPoint struct {
- F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"`
- Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FloatingPoint) Reset() { *m = FloatingPoint{} }
-func (m *FloatingPoint) String() string { return proto.CompactTextString(m) }
-func (*FloatingPoint) ProtoMessage() {}
-func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
-
-func (m *FloatingPoint) GetF() float64 {
- if m != nil && m.F != nil {
- return *m.F
- }
- return 0
-}
-
-func (m *FloatingPoint) GetExact() bool {
- if m != nil && m.Exact != nil {
- return *m.Exact
- }
- return false
-}
-
-type MessageWithMap struct {
- NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageWithMap) Reset() { *m = MessageWithMap{} }
-func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
-func (*MessageWithMap) ProtoMessage() {}
-func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
-
-func (m *MessageWithMap) GetNameMapping() map[int32]string {
- if m != nil {
- return m.NameMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint {
- if m != nil {
- return m.MsgMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetByteMapping() map[bool][]byte {
- if m != nil {
- return m.ByteMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetStrToStr() map[string]string {
- if m != nil {
- return m.StrToStr
- }
- return nil
-}
-
-type Oneof struct {
- // Types that are valid to be assigned to Union:
- // *Oneof_F_Bool
- // *Oneof_F_Int32
- // *Oneof_F_Int64
- // *Oneof_F_Fixed32
- // *Oneof_F_Fixed64
- // *Oneof_F_Uint32
- // *Oneof_F_Uint64
- // *Oneof_F_Float
- // *Oneof_F_Double
- // *Oneof_F_String
- // *Oneof_F_Bytes
- // *Oneof_F_Sint32
- // *Oneof_F_Sint64
- // *Oneof_F_Enum
- // *Oneof_F_Message
- // *Oneof_FGroup
- // *Oneof_F_Largest_Tag
- Union isOneof_Union `protobuf_oneof:"union"`
- // Types that are valid to be assigned to Tormato:
- // *Oneof_Value
- Tormato isOneof_Tormato `protobuf_oneof:"tormato"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Oneof) Reset() { *m = Oneof{} }
-func (m *Oneof) String() string { return proto.CompactTextString(m) }
-func (*Oneof) ProtoMessage() {}
-func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
-
-type isOneof_Union interface {
- isOneof_Union()
-}
-type isOneof_Tormato interface {
- isOneof_Tormato()
-}
-
-type Oneof_F_Bool struct {
- F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"`
-}
-type Oneof_F_Int32 struct {
- F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"`
-}
-type Oneof_F_Int64 struct {
- F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"`
-}
-type Oneof_F_Fixed32 struct {
- F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"`
-}
-type Oneof_F_Fixed64 struct {
- F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"`
-}
-type Oneof_F_Uint32 struct {
- F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"`
-}
-type Oneof_F_Uint64 struct {
- F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"`
-}
-type Oneof_F_Float struct {
- F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"`
-}
-type Oneof_F_Double struct {
- F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"`
-}
-type Oneof_F_String struct {
- F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"`
-}
-type Oneof_F_Bytes struct {
- F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"`
-}
-type Oneof_F_Sint32 struct {
- F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"`
-}
-type Oneof_F_Sint64 struct {
- F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"`
-}
-type Oneof_F_Enum struct {
- F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=testdata.MyMessage_Color,oneof"`
-}
-type Oneof_F_Message struct {
- F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"`
-}
-type Oneof_FGroup struct {
- FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"`
-}
-type Oneof_F_Largest_Tag struct {
- F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"`
-}
-type Oneof_Value struct {
- Value int32 `protobuf:"varint,100,opt,name=value,oneof"`
-}
-
-func (*Oneof_F_Bool) isOneof_Union() {}
-func (*Oneof_F_Int32) isOneof_Union() {}
-func (*Oneof_F_Int64) isOneof_Union() {}
-func (*Oneof_F_Fixed32) isOneof_Union() {}
-func (*Oneof_F_Fixed64) isOneof_Union() {}
-func (*Oneof_F_Uint32) isOneof_Union() {}
-func (*Oneof_F_Uint64) isOneof_Union() {}
-func (*Oneof_F_Float) isOneof_Union() {}
-func (*Oneof_F_Double) isOneof_Union() {}
-func (*Oneof_F_String) isOneof_Union() {}
-func (*Oneof_F_Bytes) isOneof_Union() {}
-func (*Oneof_F_Sint32) isOneof_Union() {}
-func (*Oneof_F_Sint64) isOneof_Union() {}
-func (*Oneof_F_Enum) isOneof_Union() {}
-func (*Oneof_F_Message) isOneof_Union() {}
-func (*Oneof_FGroup) isOneof_Union() {}
-func (*Oneof_F_Largest_Tag) isOneof_Union() {}
-func (*Oneof_Value) isOneof_Tormato() {}
-
-func (m *Oneof) GetUnion() isOneof_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-func (m *Oneof) GetTormato() isOneof_Tormato {
- if m != nil {
- return m.Tormato
- }
- return nil
-}
-
-func (m *Oneof) GetF_Bool() bool {
- if x, ok := m.GetUnion().(*Oneof_F_Bool); ok {
- return x.F_Bool
- }
- return false
-}
-
-func (m *Oneof) GetF_Int32() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Int32); ok {
- return x.F_Int32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Int64() int64 {
- if x, ok := m.GetUnion().(*Oneof_F_Int64); ok {
- return x.F_Int64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Fixed32() uint32 {
- if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok {
- return x.F_Fixed32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Fixed64() uint64 {
- if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok {
- return x.F_Fixed64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Uint32() uint32 {
- if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok {
- return x.F_Uint32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Uint64() uint64 {
- if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok {
- return x.F_Uint64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Float() float32 {
- if x, ok := m.GetUnion().(*Oneof_F_Float); ok {
- return x.F_Float
- }
- return 0
-}
-
-func (m *Oneof) GetF_Double() float64 {
- if x, ok := m.GetUnion().(*Oneof_F_Double); ok {
- return x.F_Double
- }
- return 0
-}
-
-func (m *Oneof) GetF_String() string {
- if x, ok := m.GetUnion().(*Oneof_F_String); ok {
- return x.F_String
- }
- return ""
-}
-
-func (m *Oneof) GetF_Bytes() []byte {
- if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok {
- return x.F_Bytes
- }
- return nil
-}
-
-func (m *Oneof) GetF_Sint32() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok {
- return x.F_Sint32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Sint64() int64 {
- if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok {
- return x.F_Sint64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Enum() MyMessage_Color {
- if x, ok := m.GetUnion().(*Oneof_F_Enum); ok {
- return x.F_Enum
- }
- return MyMessage_RED
-}
-
-func (m *Oneof) GetF_Message() *GoTestField {
- if x, ok := m.GetUnion().(*Oneof_F_Message); ok {
- return x.F_Message
- }
- return nil
-}
-
-func (m *Oneof) GetFGroup() *Oneof_F_Group {
- if x, ok := m.GetUnion().(*Oneof_FGroup); ok {
- return x.FGroup
- }
- return nil
-}
-
-func (m *Oneof) GetF_Largest_Tag() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok {
- return x.F_Largest_Tag
- }
- return 0
-}
-
-func (m *Oneof) GetValue() int32 {
- if x, ok := m.GetTormato().(*Oneof_Value); ok {
- return x.Value
- }
- return 0
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{
- (*Oneof_F_Bool)(nil),
- (*Oneof_F_Int32)(nil),
- (*Oneof_F_Int64)(nil),
- (*Oneof_F_Fixed32)(nil),
- (*Oneof_F_Fixed64)(nil),
- (*Oneof_F_Uint32)(nil),
- (*Oneof_F_Uint64)(nil),
- (*Oneof_F_Float)(nil),
- (*Oneof_F_Double)(nil),
- (*Oneof_F_String)(nil),
- (*Oneof_F_Bytes)(nil),
- (*Oneof_F_Sint32)(nil),
- (*Oneof_F_Sint64)(nil),
- (*Oneof_F_Enum)(nil),
- (*Oneof_F_Message)(nil),
- (*Oneof_FGroup)(nil),
- (*Oneof_F_Largest_Tag)(nil),
- (*Oneof_Value)(nil),
- }
-}
-
-func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Oneof)
- // union
- switch x := m.Union.(type) {
- case *Oneof_F_Bool:
- t := uint64(0)
- if x.F_Bool {
- t = 1
- }
- b.EncodeVarint(1<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Oneof_F_Int32:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Int32))
- case *Oneof_F_Int64:
- b.EncodeVarint(3<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Int64))
- case *Oneof_F_Fixed32:
- b.EncodeVarint(4<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(x.F_Fixed32))
- case *Oneof_F_Fixed64:
- b.EncodeVarint(5<<3 | proto.WireFixed64)
- b.EncodeFixed64(uint64(x.F_Fixed64))
- case *Oneof_F_Uint32:
- b.EncodeVarint(6<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Uint32))
- case *Oneof_F_Uint64:
- b.EncodeVarint(7<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Uint64))
- case *Oneof_F_Float:
- b.EncodeVarint(8<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.F_Float)))
- case *Oneof_F_Double:
- b.EncodeVarint(9<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.F_Double))
- case *Oneof_F_String:
- b.EncodeVarint(10<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.F_String)
- case *Oneof_F_Bytes:
- b.EncodeVarint(11<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.F_Bytes)
- case *Oneof_F_Sint32:
- b.EncodeVarint(12<<3 | proto.WireVarint)
- b.EncodeZigzag32(uint64(x.F_Sint32))
- case *Oneof_F_Sint64:
- b.EncodeVarint(13<<3 | proto.WireVarint)
- b.EncodeZigzag64(uint64(x.F_Sint64))
- case *Oneof_F_Enum:
- b.EncodeVarint(14<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Enum))
- case *Oneof_F_Message:
- b.EncodeVarint(15<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.F_Message); err != nil {
- return err
- }
- case *Oneof_FGroup:
- b.EncodeVarint(16<<3 | proto.WireStartGroup)
- if err := b.Marshal(x.FGroup); err != nil {
- return err
- }
- b.EncodeVarint(16<<3 | proto.WireEndGroup)
- case *Oneof_F_Largest_Tag:
- b.EncodeVarint(536870911<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Largest_Tag))
- case nil:
- default:
- return fmt.Errorf("Oneof.Union has unexpected type %T", x)
- }
- // tormato
- switch x := m.Tormato.(type) {
- case *Oneof_Value:
- b.EncodeVarint(100<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Value))
- case nil:
- default:
- return fmt.Errorf("Oneof.Tormato has unexpected type %T", x)
- }
- return nil
-}
-
-func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Oneof)
- switch tag {
- case 1: // union.F_Bool
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Bool{x != 0}
- return true, err
- case 2: // union.F_Int32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Int32{int32(x)}
- return true, err
- case 3: // union.F_Int64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Int64{int64(x)}
- return true, err
- case 4: // union.F_Fixed32
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Oneof_F_Fixed32{uint32(x)}
- return true, err
- case 5: // union.F_Fixed64
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Oneof_F_Fixed64{x}
- return true, err
- case 6: // union.F_Uint32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Uint32{uint32(x)}
- return true, err
- case 7: // union.F_Uint64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Uint64{x}
- return true, err
- case 8: // union.F_Float
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))}
- return true, err
- case 9: // union.F_Double
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Oneof_F_Double{math.Float64frombits(x)}
- return true, err
- case 10: // union.F_String
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Oneof_F_String{x}
- return true, err
- case 11: // union.F_Bytes
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Oneof_F_Bytes{x}
- return true, err
- case 12: // union.F_Sint32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag32()
- m.Union = &Oneof_F_Sint32{int32(x)}
- return true, err
- case 13: // union.F_Sint64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag64()
- m.Union = &Oneof_F_Sint64{int64(x)}
- return true, err
- case 14: // union.F_Enum
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Enum{MyMessage_Color(x)}
- return true, err
- case 15: // union.F_Message
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(GoTestField)
- err := b.DecodeMessage(msg)
- m.Union = &Oneof_F_Message{msg}
- return true, err
- case 16: // union.f_group
- if wire != proto.WireStartGroup {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oneof_F_Group)
- err := b.DecodeGroup(msg)
- m.Union = &Oneof_FGroup{msg}
- return true, err
- case 536870911: // union.F_Largest_Tag
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Largest_Tag{int32(x)}
- return true, err
- case 100: // tormato.value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Tormato = &Oneof_Value{int32(x)}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Oneof_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Oneof)
- // union
- switch x := m.Union.(type) {
- case *Oneof_F_Bool:
- n += proto.SizeVarint(1<<3 | proto.WireVarint)
- n += 1
- case *Oneof_F_Int32:
- n += proto.SizeVarint(2<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Int32))
- case *Oneof_F_Int64:
- n += proto.SizeVarint(3<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Int64))
- case *Oneof_F_Fixed32:
- n += proto.SizeVarint(4<<3 | proto.WireFixed32)
- n += 4
- case *Oneof_F_Fixed64:
- n += proto.SizeVarint(5<<3 | proto.WireFixed64)
- n += 8
- case *Oneof_F_Uint32:
- n += proto.SizeVarint(6<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Uint32))
- case *Oneof_F_Uint64:
- n += proto.SizeVarint(7<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Uint64))
- case *Oneof_F_Float:
- n += proto.SizeVarint(8<<3 | proto.WireFixed32)
- n += 4
- case *Oneof_F_Double:
- n += proto.SizeVarint(9<<3 | proto.WireFixed64)
- n += 8
- case *Oneof_F_String:
- n += proto.SizeVarint(10<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.F_String)))
- n += len(x.F_String)
- case *Oneof_F_Bytes:
- n += proto.SizeVarint(11<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.F_Bytes)))
- n += len(x.F_Bytes)
- case *Oneof_F_Sint32:
- n += proto.SizeVarint(12<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31))))
- case *Oneof_F_Sint64:
- n += proto.SizeVarint(13<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63))))
- case *Oneof_F_Enum:
- n += proto.SizeVarint(14<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Enum))
- case *Oneof_F_Message:
- s := proto.Size(x.F_Message)
- n += proto.SizeVarint(15<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Oneof_FGroup:
- n += proto.SizeVarint(16<<3 | proto.WireStartGroup)
- n += proto.Size(x.FGroup)
- n += proto.SizeVarint(16<<3 | proto.WireEndGroup)
- case *Oneof_F_Largest_Tag:
- n += proto.SizeVarint(536870911<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Largest_Tag))
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- // tormato
- switch x := m.Tormato.(type) {
- case *Oneof_Value:
- n += proto.SizeVarint(100<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Value))
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Oneof_F_Group struct {
- X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} }
-func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) }
-func (*Oneof_F_Group) ProtoMessage() {}
-func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29, 0} }
-
-func (m *Oneof_F_Group) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-type Communique struct {
- MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"`
- // This is a oneof, called "union".
- //
- // Types that are valid to be assigned to Union:
- // *Communique_Number
- // *Communique_Name
- // *Communique_Data
- // *Communique_TempC
- // *Communique_Col
- // *Communique_Msg
- Union isCommunique_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique) Reset() { *m = Communique{} }
-func (m *Communique) String() string { return proto.CompactTextString(m) }
-func (*Communique) ProtoMessage() {}
-func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
-
-type isCommunique_Union interface {
- isCommunique_Union()
-}
-
-type Communique_Number struct {
- Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
-}
-type Communique_Name struct {
- Name string `protobuf:"bytes,6,opt,name=name,oneof"`
-}
-type Communique_Data struct {
- Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
-}
-type Communique_TempC struct {
- TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
-}
-type Communique_Col struct {
- Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"`
-}
-type Communique_Msg struct {
- Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"`
-}
-
-func (*Communique_Number) isCommunique_Union() {}
-func (*Communique_Name) isCommunique_Union() {}
-func (*Communique_Data) isCommunique_Union() {}
-func (*Communique_TempC) isCommunique_Union() {}
-func (*Communique_Col) isCommunique_Union() {}
-func (*Communique_Msg) isCommunique_Union() {}
-
-func (m *Communique) GetUnion() isCommunique_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-
-func (m *Communique) GetMakeMeCry() bool {
- if m != nil && m.MakeMeCry != nil {
- return *m.MakeMeCry
- }
- return false
-}
-
-func (m *Communique) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Communique_Number); ok {
- return x.Number
- }
- return 0
-}
-
-func (m *Communique) GetName() string {
- if x, ok := m.GetUnion().(*Communique_Name); ok {
- return x.Name
- }
- return ""
-}
-
-func (m *Communique) GetData() []byte {
- if x, ok := m.GetUnion().(*Communique_Data); ok {
- return x.Data
- }
- return nil
-}
-
-func (m *Communique) GetTempC() float64 {
- if x, ok := m.GetUnion().(*Communique_TempC); ok {
- return x.TempC
- }
- return 0
-}
-
-func (m *Communique) GetCol() MyMessage_Color {
- if x, ok := m.GetUnion().(*Communique_Col); ok {
- return x.Col
- }
- return MyMessage_RED
-}
-
-func (m *Communique) GetMsg() *Strings {
- if x, ok := m.GetUnion().(*Communique_Msg); ok {
- return x.Msg
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
- (*Communique_Number)(nil),
- (*Communique_Name)(nil),
- (*Communique_Data)(nil),
- (*Communique_TempC)(nil),
- (*Communique_Col)(nil),
- (*Communique_Msg)(nil),
- }
-}
-
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- b.EncodeVarint(5<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Number))
- case *Communique_Name:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Name)
- case *Communique_Data:
- b.EncodeVarint(7<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.Data)
- case *Communique_TempC:
- b.EncodeVarint(8<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.TempC))
- case *Communique_Col:
- b.EncodeVarint(9<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Col))
- case *Communique_Msg:
- b.EncodeVarint(10<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Msg); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Communique.Union has unexpected type %T", x)
- }
- return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Communique)
- switch tag {
- case 5: // union.number
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Number{int32(x)}
- return true, err
- case 6: // union.name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Communique_Name{x}
- return true, err
- case 7: // union.data
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Communique_Data{x}
- return true, err
- case 8: // union.temp_c
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Communique_TempC{math.Float64frombits(x)}
- return true, err
- case 9: // union.col
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Col{MyMessage_Color(x)}
- return true, err
- case 10: // union.msg
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Strings)
- err := b.DecodeMessage(msg)
- m.Union = &Communique_Msg{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- n += proto.SizeVarint(5<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Number))
- case *Communique_Name:
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Name)))
- n += len(x.Name)
- case *Communique_Data:
- n += proto.SizeVarint(7<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Data)))
- n += len(x.Data)
- case *Communique_TempC:
- n += proto.SizeVarint(8<<3 | proto.WireFixed64)
- n += 8
- case *Communique_Col:
- n += proto.SizeVarint(9<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Col))
- case *Communique_Msg:
- s := proto.Size(x.Msg)
- n += proto.SizeVarint(10<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-var E_Greeting = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: ([]string)(nil),
- Field: 106,
- Name: "testdata.greeting",
- Tag: "bytes,106,rep,name=greeting",
- Filename: "test.proto",
-}
-
-var E_Complex = &proto.ExtensionDesc{
- ExtendedType: (*OtherMessage)(nil),
- ExtensionType: (*ComplexExtension)(nil),
- Field: 200,
- Name: "testdata.complex",
- Tag: "bytes,200,opt,name=complex",
- Filename: "test.proto",
-}
-
-var E_RComplex = &proto.ExtensionDesc{
- ExtendedType: (*OtherMessage)(nil),
- ExtensionType: ([]*ComplexExtension)(nil),
- Field: 201,
- Name: "testdata.r_complex",
- Tag: "bytes,201,rep,name=r_complex,json=rComplex",
- Filename: "test.proto",
-}
-
-var E_NoDefaultDouble = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float64)(nil),
- Field: 101,
- Name: "testdata.no_default_double",
- Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble",
- Filename: "test.proto",
-}
-
-var E_NoDefaultFloat = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float32)(nil),
- Field: 102,
- Name: "testdata.no_default_float",
- Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat",
- Filename: "test.proto",
-}
-
-var E_NoDefaultInt32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 103,
- Name: "testdata.no_default_int32",
- Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32",
- Filename: "test.proto",
-}
-
-var E_NoDefaultInt64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 104,
- Name: "testdata.no_default_int64",
- Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64",
- Filename: "test.proto",
-}
-
-var E_NoDefaultUint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 105,
- Name: "testdata.no_default_uint32",
- Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32",
- Filename: "test.proto",
-}
-
-var E_NoDefaultUint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 106,
- Name: "testdata.no_default_uint64",
- Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64",
- Filename: "test.proto",
-}
-
-var E_NoDefaultSint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 107,
- Name: "testdata.no_default_sint32",
- Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32",
- Filename: "test.proto",
-}
-
-var E_NoDefaultSint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 108,
- Name: "testdata.no_default_sint64",
- Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64",
- Filename: "test.proto",
-}
-
-var E_NoDefaultFixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 109,
- Name: "testdata.no_default_fixed32",
- Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32",
- Filename: "test.proto",
-}
-
-var E_NoDefaultFixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 110,
- Name: "testdata.no_default_fixed64",
- Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64",
- Filename: "test.proto",
-}
-
-var E_NoDefaultSfixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 111,
- Name: "testdata.no_default_sfixed32",
- Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32",
- Filename: "test.proto",
-}
-
-var E_NoDefaultSfixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 112,
- Name: "testdata.no_default_sfixed64",
- Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64",
- Filename: "test.proto",
-}
-
-var E_NoDefaultBool = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 113,
- Name: "testdata.no_default_bool",
- Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool",
- Filename: "test.proto",
-}
-
-var E_NoDefaultString = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 114,
- Name: "testdata.no_default_string",
- Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString",
- Filename: "test.proto",
-}
-
-var E_NoDefaultBytes = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: ([]byte)(nil),
- Field: 115,
- Name: "testdata.no_default_bytes",
- Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes",
- Filename: "test.proto",
-}
-
-var E_NoDefaultEnum = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
- Field: 116,
- Name: "testdata.no_default_enum",
- Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum",
- Filename: "test.proto",
-}
-
-var E_DefaultDouble = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float64)(nil),
- Field: 201,
- Name: "testdata.default_double",
- Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415",
- Filename: "test.proto",
-}
-
-var E_DefaultFloat = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float32)(nil),
- Field: 202,
- Name: "testdata.default_float",
- Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14",
- Filename: "test.proto",
-}
-
-var E_DefaultInt32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 203,
- Name: "testdata.default_int32",
- Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42",
- Filename: "test.proto",
-}
-
-var E_DefaultInt64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 204,
- Name: "testdata.default_int64",
- Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43",
- Filename: "test.proto",
-}
-
-var E_DefaultUint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 205,
- Name: "testdata.default_uint32",
- Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44",
- Filename: "test.proto",
-}
-
-var E_DefaultUint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 206,
- Name: "testdata.default_uint64",
- Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45",
- Filename: "test.proto",
-}
-
-var E_DefaultSint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 207,
- Name: "testdata.default_sint32",
- Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46",
- Filename: "test.proto",
-}
-
-var E_DefaultSint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 208,
- Name: "testdata.default_sint64",
- Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47",
- Filename: "test.proto",
-}
-
-var E_DefaultFixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 209,
- Name: "testdata.default_fixed32",
- Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48",
- Filename: "test.proto",
-}
-
-var E_DefaultFixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 210,
- Name: "testdata.default_fixed64",
- Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49",
- Filename: "test.proto",
-}
-
-var E_DefaultSfixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 211,
- Name: "testdata.default_sfixed32",
- Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50",
- Filename: "test.proto",
-}
-
-var E_DefaultSfixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 212,
- Name: "testdata.default_sfixed64",
- Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51",
- Filename: "test.proto",
-}
-
-var E_DefaultBool = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 213,
- Name: "testdata.default_bool",
- Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1",
- Filename: "test.proto",
-}
-
-var E_DefaultString = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 214,
- Name: "testdata.default_string",
- Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string",
- Filename: "test.proto",
-}
-
-var E_DefaultBytes = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: ([]byte)(nil),
- Field: 215,
- Name: "testdata.default_bytes",
- Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes",
- Filename: "test.proto",
-}
-
-var E_DefaultEnum = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
- Field: 216,
- Name: "testdata.default_enum",
- Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1",
- Filename: "test.proto",
-}
-
-var E_X201 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 201,
- Name: "testdata.x201",
- Tag: "bytes,201,opt,name=x201",
- Filename: "test.proto",
-}
-
-var E_X202 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 202,
- Name: "testdata.x202",
- Tag: "bytes,202,opt,name=x202",
- Filename: "test.proto",
-}
-
-var E_X203 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 203,
- Name: "testdata.x203",
- Tag: "bytes,203,opt,name=x203",
- Filename: "test.proto",
-}
-
-var E_X204 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 204,
- Name: "testdata.x204",
- Tag: "bytes,204,opt,name=x204",
- Filename: "test.proto",
-}
-
-var E_X205 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 205,
- Name: "testdata.x205",
- Tag: "bytes,205,opt,name=x205",
- Filename: "test.proto",
-}
-
-var E_X206 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 206,
- Name: "testdata.x206",
- Tag: "bytes,206,opt,name=x206",
- Filename: "test.proto",
-}
-
-var E_X207 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 207,
- Name: "testdata.x207",
- Tag: "bytes,207,opt,name=x207",
- Filename: "test.proto",
-}
-
-var E_X208 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 208,
- Name: "testdata.x208",
- Tag: "bytes,208,opt,name=x208",
- Filename: "test.proto",
-}
-
-var E_X209 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 209,
- Name: "testdata.x209",
- Tag: "bytes,209,opt,name=x209",
- Filename: "test.proto",
-}
-
-var E_X210 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 210,
- Name: "testdata.x210",
- Tag: "bytes,210,opt,name=x210",
- Filename: "test.proto",
-}
-
-var E_X211 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 211,
- Name: "testdata.x211",
- Tag: "bytes,211,opt,name=x211",
- Filename: "test.proto",
-}
-
-var E_X212 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 212,
- Name: "testdata.x212",
- Tag: "bytes,212,opt,name=x212",
- Filename: "test.proto",
-}
-
-var E_X213 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 213,
- Name: "testdata.x213",
- Tag: "bytes,213,opt,name=x213",
- Filename: "test.proto",
-}
-
-var E_X214 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 214,
- Name: "testdata.x214",
- Tag: "bytes,214,opt,name=x214",
- Filename: "test.proto",
-}
-
-var E_X215 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 215,
- Name: "testdata.x215",
- Tag: "bytes,215,opt,name=x215",
- Filename: "test.proto",
-}
-
-var E_X216 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 216,
- Name: "testdata.x216",
- Tag: "bytes,216,opt,name=x216",
- Filename: "test.proto",
-}
-
-var E_X217 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 217,
- Name: "testdata.x217",
- Tag: "bytes,217,opt,name=x217",
- Filename: "test.proto",
-}
-
-var E_X218 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 218,
- Name: "testdata.x218",
- Tag: "bytes,218,opt,name=x218",
- Filename: "test.proto",
-}
-
-var E_X219 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 219,
- Name: "testdata.x219",
- Tag: "bytes,219,opt,name=x219",
- Filename: "test.proto",
-}
-
-var E_X220 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 220,
- Name: "testdata.x220",
- Tag: "bytes,220,opt,name=x220",
- Filename: "test.proto",
-}
-
-var E_X221 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 221,
- Name: "testdata.x221",
- Tag: "bytes,221,opt,name=x221",
- Filename: "test.proto",
-}
-
-var E_X222 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 222,
- Name: "testdata.x222",
- Tag: "bytes,222,opt,name=x222",
- Filename: "test.proto",
-}
-
-var E_X223 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 223,
- Name: "testdata.x223",
- Tag: "bytes,223,opt,name=x223",
- Filename: "test.proto",
-}
-
-var E_X224 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 224,
- Name: "testdata.x224",
- Tag: "bytes,224,opt,name=x224",
- Filename: "test.proto",
-}
-
-var E_X225 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 225,
- Name: "testdata.x225",
- Tag: "bytes,225,opt,name=x225",
- Filename: "test.proto",
-}
-
-var E_X226 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 226,
- Name: "testdata.x226",
- Tag: "bytes,226,opt,name=x226",
- Filename: "test.proto",
-}
-
-var E_X227 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 227,
- Name: "testdata.x227",
- Tag: "bytes,227,opt,name=x227",
- Filename: "test.proto",
-}
-
-var E_X228 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 228,
- Name: "testdata.x228",
- Tag: "bytes,228,opt,name=x228",
- Filename: "test.proto",
-}
-
-var E_X229 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 229,
- Name: "testdata.x229",
- Tag: "bytes,229,opt,name=x229",
- Filename: "test.proto",
-}
-
-var E_X230 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 230,
- Name: "testdata.x230",
- Tag: "bytes,230,opt,name=x230",
- Filename: "test.proto",
-}
-
-var E_X231 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 231,
- Name: "testdata.x231",
- Tag: "bytes,231,opt,name=x231",
- Filename: "test.proto",
-}
-
-var E_X232 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 232,
- Name: "testdata.x232",
- Tag: "bytes,232,opt,name=x232",
- Filename: "test.proto",
-}
-
-var E_X233 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 233,
- Name: "testdata.x233",
- Tag: "bytes,233,opt,name=x233",
- Filename: "test.proto",
-}
-
-var E_X234 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 234,
- Name: "testdata.x234",
- Tag: "bytes,234,opt,name=x234",
- Filename: "test.proto",
-}
-
-var E_X235 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 235,
- Name: "testdata.x235",
- Tag: "bytes,235,opt,name=x235",
- Filename: "test.proto",
-}
-
-var E_X236 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 236,
- Name: "testdata.x236",
- Tag: "bytes,236,opt,name=x236",
- Filename: "test.proto",
-}
-
-var E_X237 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 237,
- Name: "testdata.x237",
- Tag: "bytes,237,opt,name=x237",
- Filename: "test.proto",
-}
-
-var E_X238 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 238,
- Name: "testdata.x238",
- Tag: "bytes,238,opt,name=x238",
- Filename: "test.proto",
-}
-
-var E_X239 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 239,
- Name: "testdata.x239",
- Tag: "bytes,239,opt,name=x239",
- Filename: "test.proto",
-}
-
-var E_X240 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 240,
- Name: "testdata.x240",
- Tag: "bytes,240,opt,name=x240",
- Filename: "test.proto",
-}
-
-var E_X241 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 241,
- Name: "testdata.x241",
- Tag: "bytes,241,opt,name=x241",
- Filename: "test.proto",
-}
-
-var E_X242 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 242,
- Name: "testdata.x242",
- Tag: "bytes,242,opt,name=x242",
- Filename: "test.proto",
-}
-
-var E_X243 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 243,
- Name: "testdata.x243",
- Tag: "bytes,243,opt,name=x243",
- Filename: "test.proto",
-}
-
-var E_X244 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 244,
- Name: "testdata.x244",
- Tag: "bytes,244,opt,name=x244",
- Filename: "test.proto",
-}
-
-var E_X245 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 245,
- Name: "testdata.x245",
- Tag: "bytes,245,opt,name=x245",
- Filename: "test.proto",
-}
-
-var E_X246 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 246,
- Name: "testdata.x246",
- Tag: "bytes,246,opt,name=x246",
- Filename: "test.proto",
-}
-
-var E_X247 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 247,
- Name: "testdata.x247",
- Tag: "bytes,247,opt,name=x247",
- Filename: "test.proto",
-}
-
-var E_X248 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 248,
- Name: "testdata.x248",
- Tag: "bytes,248,opt,name=x248",
- Filename: "test.proto",
-}
-
-var E_X249 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 249,
- Name: "testdata.x249",
- Tag: "bytes,249,opt,name=x249",
- Filename: "test.proto",
-}
-
-var E_X250 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 250,
- Name: "testdata.x250",
- Tag: "bytes,250,opt,name=x250",
- Filename: "test.proto",
-}
-
-func init() {
- proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum")
- proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField")
- proto.RegisterType((*GoTest)(nil), "testdata.GoTest")
- proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup")
- proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup")
- proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup")
- proto.RegisterType((*GoTestRequiredGroupField)(nil), "testdata.GoTestRequiredGroupField")
- proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "testdata.GoTestRequiredGroupField.Group")
- proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest")
- proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup")
- proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest")
- proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest")
- proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag")
- proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage")
- proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested")
- proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage")
- proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested")
- proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage")
- proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage")
- proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage")
- proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage")
- proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup")
- proto.RegisterType((*Ext)(nil), "testdata.Ext")
- proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension")
- proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage")
- proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet")
- proto.RegisterType((*Empty)(nil), "testdata.Empty")
- proto.RegisterType((*MessageList)(nil), "testdata.MessageList")
- proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message")
- proto.RegisterType((*Strings)(nil), "testdata.Strings")
- proto.RegisterType((*Defaults)(nil), "testdata.Defaults")
- proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults")
- proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum")
- proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated")
- proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld")
- proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G")
- proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew")
- proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G")
- proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint")
- proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap")
- proto.RegisterType((*Oneof)(nil), "testdata.Oneof")
- proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group")
- proto.RegisterType((*Communique)(nil), "testdata.Communique")
- proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
- proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
- proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
- proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
- proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
- proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
- proto.RegisterExtension(E_Ext_More)
- proto.RegisterExtension(E_Ext_Text)
- proto.RegisterExtension(E_Ext_Number)
- proto.RegisterExtension(E_Greeting)
- proto.RegisterExtension(E_Complex)
- proto.RegisterExtension(E_RComplex)
- proto.RegisterExtension(E_NoDefaultDouble)
- proto.RegisterExtension(E_NoDefaultFloat)
- proto.RegisterExtension(E_NoDefaultInt32)
- proto.RegisterExtension(E_NoDefaultInt64)
- proto.RegisterExtension(E_NoDefaultUint32)
- proto.RegisterExtension(E_NoDefaultUint64)
- proto.RegisterExtension(E_NoDefaultSint32)
- proto.RegisterExtension(E_NoDefaultSint64)
- proto.RegisterExtension(E_NoDefaultFixed32)
- proto.RegisterExtension(E_NoDefaultFixed64)
- proto.RegisterExtension(E_NoDefaultSfixed32)
- proto.RegisterExtension(E_NoDefaultSfixed64)
- proto.RegisterExtension(E_NoDefaultBool)
- proto.RegisterExtension(E_NoDefaultString)
- proto.RegisterExtension(E_NoDefaultBytes)
- proto.RegisterExtension(E_NoDefaultEnum)
- proto.RegisterExtension(E_DefaultDouble)
- proto.RegisterExtension(E_DefaultFloat)
- proto.RegisterExtension(E_DefaultInt32)
- proto.RegisterExtension(E_DefaultInt64)
- proto.RegisterExtension(E_DefaultUint32)
- proto.RegisterExtension(E_DefaultUint64)
- proto.RegisterExtension(E_DefaultSint32)
- proto.RegisterExtension(E_DefaultSint64)
- proto.RegisterExtension(E_DefaultFixed32)
- proto.RegisterExtension(E_DefaultFixed64)
- proto.RegisterExtension(E_DefaultSfixed32)
- proto.RegisterExtension(E_DefaultSfixed64)
- proto.RegisterExtension(E_DefaultBool)
- proto.RegisterExtension(E_DefaultString)
- proto.RegisterExtension(E_DefaultBytes)
- proto.RegisterExtension(E_DefaultEnum)
- proto.RegisterExtension(E_X201)
- proto.RegisterExtension(E_X202)
- proto.RegisterExtension(E_X203)
- proto.RegisterExtension(E_X204)
- proto.RegisterExtension(E_X205)
- proto.RegisterExtension(E_X206)
- proto.RegisterExtension(E_X207)
- proto.RegisterExtension(E_X208)
- proto.RegisterExtension(E_X209)
- proto.RegisterExtension(E_X210)
- proto.RegisterExtension(E_X211)
- proto.RegisterExtension(E_X212)
- proto.RegisterExtension(E_X213)
- proto.RegisterExtension(E_X214)
- proto.RegisterExtension(E_X215)
- proto.RegisterExtension(E_X216)
- proto.RegisterExtension(E_X217)
- proto.RegisterExtension(E_X218)
- proto.RegisterExtension(E_X219)
- proto.RegisterExtension(E_X220)
- proto.RegisterExtension(E_X221)
- proto.RegisterExtension(E_X222)
- proto.RegisterExtension(E_X223)
- proto.RegisterExtension(E_X224)
- proto.RegisterExtension(E_X225)
- proto.RegisterExtension(E_X226)
- proto.RegisterExtension(E_X227)
- proto.RegisterExtension(E_X228)
- proto.RegisterExtension(E_X229)
- proto.RegisterExtension(E_X230)
- proto.RegisterExtension(E_X231)
- proto.RegisterExtension(E_X232)
- proto.RegisterExtension(E_X233)
- proto.RegisterExtension(E_X234)
- proto.RegisterExtension(E_X235)
- proto.RegisterExtension(E_X236)
- proto.RegisterExtension(E_X237)
- proto.RegisterExtension(E_X238)
- proto.RegisterExtension(E_X239)
- proto.RegisterExtension(E_X240)
- proto.RegisterExtension(E_X241)
- proto.RegisterExtension(E_X242)
- proto.RegisterExtension(E_X243)
- proto.RegisterExtension(E_X244)
- proto.RegisterExtension(E_X245)
- proto.RegisterExtension(E_X246)
- proto.RegisterExtension(E_X247)
- proto.RegisterExtension(E_X248)
- proto.RegisterExtension(E_X249)
- proto.RegisterExtension(E_X250)
-}
-
-func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 4453 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xc9, 0x77, 0xdb, 0x48,
- 0x7a, 0x37, 0xc0, 0xfd, 0x23, 0x25, 0x42, 0x65, 0xb5, 0x9b, 0x96, 0xbc, 0xc0, 0x9c, 0xe9, 0x6e,
- 0x7a, 0xd3, 0x48, 0x20, 0x44, 0xdb, 0x74, 0xa7, 0xdf, 0xf3, 0x42, 0xca, 0x7a, 0x63, 0x89, 0x0a,
- 0xa4, 0xee, 0x7e, 0xd3, 0x39, 0xf0, 0x51, 0x22, 0x44, 0xb3, 0x4d, 0x02, 0x34, 0x09, 0xc5, 0x52,
- 0x72, 0xe9, 0x4b, 0x72, 0xcd, 0x76, 0xc9, 0x35, 0xa7, 0x9c, 0x92, 0xbc, 0x97, 0x7f, 0x22, 0xe9,
- 0xee, 0x59, 0x7b, 0xd6, 0xac, 0x93, 0x7d, 0x99, 0xec, 0xdb, 0x4c, 0x92, 0x4b, 0xcf, 0xab, 0xaf,
- 0x0a, 0x40, 0x01, 0x24, 0x20, 0xf9, 0x24, 0x56, 0xd5, 0xef, 0xf7, 0xd5, 0xf6, 0xab, 0xef, 0xab,
- 0xaf, 0x20, 0x00, 0xc7, 0x9c, 0x38, 0x2b, 0xa3, 0xb1, 0xed, 0xd8, 0x24, 0x4b, 0x7f, 0x77, 0x3b,
- 0x4e, 0xa7, 0x7c, 0x1d, 0xd2, 0x1b, 0x76, 0xc3, 0x3a, 0x1a, 0x92, 0xab, 0x90, 0x38, 0xb4, 0xed,
- 0x92, 0xa4, 0xca, 0x95, 0x79, 0x6d, 0x6e, 0xc5, 0x45, 0xac, 0x34, 0x5b, 0x2d, 0x83, 0xb6, 0x94,
- 0xef, 0x40, 0x7e, 0xc3, 0xde, 0x33, 0x27, 0x4e, 0xb3, 0x6f, 0x0e, 0xba, 0x64, 0x11, 0x52, 0x4f,
- 0x3b, 0xfb, 0xe6, 0x00, 0x19, 0x39, 0x83, 0x15, 0x08, 0x81, 0xe4, 0xde, 0xc9, 0xc8, 0x2c, 0xc9,
- 0x58, 0x89, 0xbf, 0xcb, 0xbf, 0x72, 0x85, 0x76, 0x42, 0x99, 0xe4, 0x3a, 0x24, 0xbf, 0xdc, 0xb7,
- 0xba, 0xbc, 0x97, 0xd7, 0xfc, 0x5e, 0x58, 0xfb, 0xca, 0x97, 0x37, 0xb7, 0x1f, 0x1b, 0x08, 0xa1,
- 0xf6, 0xf7, 0x3a, 0xfb, 0x03, 0x6a, 0x4a, 0xa2, 0xf6, 0xb1, 0x40, 0x6b, 0x77, 0x3a, 0xe3, 0xce,
- 0xb0, 0x94, 0x50, 0xa5, 0x4a, 0xca, 0x60, 0x05, 0x72, 0x1f, 0xe6, 0x0c, 0xf3, 0xc5, 0x51, 0x7f,
- 0x6c, 0x76, 0x71, 0x70, 0xa5, 0xa4, 0x2a, 0x57, 0xf2, 0xd3, 0xf6, 0xb1, 0xd1, 0x08, 0x62, 0x19,
- 0x79, 0x64, 0x76, 0x1c, 0x97, 0x9c, 0x52, 0x13, 0xb1, 0x64, 0x01, 0x4b, 0xc9, 0xad, 0x91, 0xd3,
- 0xb7, 0xad, 0xce, 0x80, 0x91, 0xd3, 0xaa, 0x14, 0x43, 0x0e, 0x60, 0xc9, 0x9b, 0x50, 0x6c, 0xb6,
- 0x1f, 0xda, 0xf6, 0xa0, 0x3d, 0xe6, 0x23, 0x2a, 0x81, 0x2a, 0x57, 0xb2, 0xc6, 0x5c, 0x93, 0xd6,
- 0xba, 0xc3, 0x24, 0x15, 0x50, 0x9a, 0xed, 0x4d, 0xcb, 0xa9, 0x6a, 0x3e, 0x30, 0xaf, 0xca, 0x95,
- 0x94, 0x31, 0xdf, 0xc4, 0xea, 0x29, 0x64, 0x4d, 0xf7, 0x91, 0x05, 0x55, 0xae, 0x24, 0x18, 0xb2,
- 0xa6, 0x7b, 0xc8, 0x5b, 0x40, 0x9a, 0xed, 0x66, 0xff, 0xd8, 0xec, 0x8a, 0x56, 0xe7, 0x54, 0xb9,
- 0x92, 0x31, 0x94, 0x26, 0x6f, 0x98, 0x81, 0x16, 0x2d, 0xcf, 0xab, 0x72, 0x25, 0xed, 0xa2, 0x05,
- 0xdb, 0x37, 0x60, 0xa1, 0xd9, 0x7e, 0xb7, 0x1f, 0x1c, 0x70, 0x51, 0x95, 0x2b, 0x73, 0x46, 0xb1,
- 0xc9, 0xea, 0xa7, 0xb1, 0xa2, 0x61, 0x45, 0x95, 0x2b, 0x49, 0x8e, 0x15, 0xec, 0xe2, 0xec, 0x9a,
- 0x03, 0xbb, 0xe3, 0xf8, 0xd0, 0x05, 0x55, 0xae, 0xc8, 0xc6, 0x7c, 0x13, 0xab, 0x83, 0x56, 0x1f,
- 0xdb, 0x47, 0xfb, 0x03, 0xd3, 0x87, 0x12, 0x55, 0xae, 0x48, 0x46, 0xb1, 0xc9, 0xea, 0x83, 0xd8,
- 0x5d, 0x67, 0xdc, 0xb7, 0x7a, 0x3e, 0xf6, 0x3c, 0xea, 0xb7, 0xd8, 0x64, 0xf5, 0xc1, 0x11, 0x3c,
- 0x3c, 0x71, 0xcc, 0x89, 0x0f, 0x35, 0x55, 0xb9, 0x52, 0x30, 0xe6, 0x9b, 0x58, 0x1d, 0xb2, 0x1a,
- 0x5a, 0x83, 0x43, 0x55, 0xae, 0x2c, 0x50, 0xab, 0x33, 0xd6, 0x60, 0x37, 0xb4, 0x06, 0x3d, 0x55,
- 0xae, 0x10, 0x8e, 0x15, 0xd6, 0x40, 0xd4, 0x0c, 0x13, 0x62, 0x69, 0x51, 0x4d, 0x08, 0x9a, 0x61,
- 0x95, 0x41, 0xcd, 0x70, 0xe0, 0x6b, 0x6a, 0x42, 0xd4, 0x4c, 0x08, 0x89, 0x9d, 0x73, 0xe4, 0x05,
- 0x35, 0x21, 0x6a, 0x86, 0x23, 0x43, 0x9a, 0xe1, 0xd8, 0xd7, 0xd5, 0x44, 0x50, 0x33, 0x53, 0x68,
- 0xd1, 0x72, 0x49, 0x4d, 0x04, 0x35, 0xc3, 0xd1, 0x41, 0xcd, 0x70, 0xf0, 0x45, 0x35, 0x11, 0xd0,
- 0x4c, 0x18, 0x2b, 0x1a, 0x5e, 0x52, 0x13, 0x01, 0xcd, 0x88, 0xb3, 0x73, 0x35, 0xc3, 0xa1, 0xcb,
- 0x6a, 0x42, 0xd4, 0x8c, 0x68, 0xd5, 0xd3, 0x0c, 0x87, 0x5e, 0x52, 0x13, 0x01, 0xcd, 0x88, 0x58,
- 0x4f, 0x33, 0x1c, 0x7b, 0x59, 0x4d, 0x04, 0x34, 0xc3, 0xb1, 0xd7, 0x45, 0xcd, 0x70, 0xe8, 0xc7,
- 0x92, 0x9a, 0x10, 0x45, 0xc3, 0xa1, 0x37, 0x03, 0xa2, 0xe1, 0xd8, 0x4f, 0x28, 0x56, 0x54, 0x4d,
- 0x18, 0x2c, 0xae, 0xc2, 0xa7, 0x14, 0x2c, 0xca, 0x86, 0x83, 0x7d, 0xd9, 0xd8, 0xdc, 0x05, 0x95,
- 0xae, 0xa8, 0x92, 0x27, 0x1b, 0xd7, 0x2f, 0x89, 0xb2, 0xf1, 0x80, 0x57, 0xd1, 0xd5, 0x72, 0xd9,
- 0x4c, 0x21, 0x6b, 0xba, 0x8f, 0x54, 0x55, 0xc9, 0x97, 0x8d, 0x87, 0x0c, 0xc8, 0xc6, 0xc3, 0x5e,
- 0x53, 0x25, 0x51, 0x36, 0x33, 0xd0, 0xa2, 0xe5, 0xb2, 0x2a, 0x89, 0xb2, 0xf1, 0xd0, 0xa2, 0x6c,
- 0x3c, 0xf0, 0x17, 0x54, 0x49, 0x90, 0xcd, 0x34, 0x56, 0x34, 0xfc, 0x45, 0x55, 0x12, 0x64, 0x13,
- 0x9c, 0x1d, 0x93, 0x8d, 0x07, 0x7d, 0x43, 0x95, 0x7c, 0xd9, 0x04, 0xad, 0x72, 0xd9, 0x78, 0xd0,
- 0x37, 0x55, 0x49, 0x90, 0x4d, 0x10, 0xcb, 0x65, 0xe3, 0x61, 0xdf, 0xc2, 0xf8, 0xe6, 0xca, 0xc6,
- 0xc3, 0x0a, 0xb2, 0xf1, 0xa0, 0xbf, 0x43, 0x63, 0xa1, 0x27, 0x1b, 0x0f, 0x2a, 0xca, 0xc6, 0xc3,
- 0xfe, 0x2e, 0xc5, 0xfa, 0xb2, 0x99, 0x06, 0x8b, 0xab, 0xf0, 0x7b, 0x14, 0xec, 0xcb, 0xc6, 0x03,
- 0xaf, 0xe0, 0x20, 0xa8, 0x6c, 0xba, 0xe6, 0x61, 0xe7, 0x68, 0x40, 0x25, 0x56, 0xa1, 0xba, 0xa9,
- 0x27, 0x9d, 0xf1, 0x91, 0x49, 0x47, 0x62, 0xdb, 0x83, 0xc7, 0x6e, 0x1b, 0x59, 0xa1, 0xc6, 0x99,
- 0x7c, 0x7c, 0xc2, 0x75, 0xaa, 0x9f, 0xba, 0x5c, 0xd5, 0x8c, 0x22, 0xd3, 0xd0, 0x34, 0xbe, 0xa6,
- 0x0b, 0xf8, 0x1b, 0x54, 0x45, 0x75, 0xb9, 0xa6, 0x33, 0x7c, 0x4d, 0xf7, 0xf1, 0x55, 0x38, 0xef,
- 0x4b, 0xc9, 0x67, 0xdc, 0xa4, 0x5a, 0xaa, 0x27, 0xaa, 0xda, 0xaa, 0xb1, 0xe0, 0x0a, 0x6a, 0x16,
- 0x29, 0xd0, 0xcd, 0x2d, 0x2a, 0xa9, 0x7a, 0xa2, 0xa6, 0x7b, 0x24, 0xb1, 0x27, 0x8d, 0xca, 0x90,
- 0x0b, 0xcb, 0xe7, 0xdc, 0xa6, 0xca, 0xaa, 0x27, 0xab, 0xda, 0xea, 0xaa, 0xa1, 0x70, 0x7d, 0xcd,
- 0xe0, 0x04, 0xfa, 0x59, 0xa1, 0x0a, 0xab, 0x27, 0x6b, 0xba, 0xc7, 0x09, 0xf6, 0xb3, 0xe0, 0x0a,
- 0xcd, 0xa7, 0x7c, 0x89, 0x2a, 0xad, 0x9e, 0xae, 0xae, 0xe9, 0x6b, 0xeb, 0xf7, 0x8c, 0x22, 0x53,
- 0x9c, 0xcf, 0xd1, 0x69, 0x3f, 0x5c, 0x72, 0x3e, 0x69, 0x95, 0x6a, 0xae, 0x9e, 0xd6, 0xee, 0xac,
- 0xdd, 0xd5, 0xee, 0x1a, 0x0a, 0xd7, 0x9e, 0xcf, 0x7a, 0x87, 0xb2, 0xb8, 0xf8, 0x7c, 0xd6, 0x1a,
- 0x55, 0x5f, 0x5d, 0x79, 0x66, 0x0e, 0x06, 0xf6, 0x2d, 0xb5, 0xfc, 0xd2, 0x1e, 0x0f, 0xba, 0xd7,
- 0xca, 0x60, 0x28, 0x5c, 0x8f, 0x62, 0xaf, 0x0b, 0xae, 0x20, 0x7d, 0xfa, 0xaf, 0xd1, 0x7b, 0x58,
- 0xa1, 0x9e, 0x79, 0xd8, 0xef, 0x59, 0xf6, 0xc4, 0x34, 0x8a, 0x4c, 0x9a, 0xa1, 0x35, 0xd9, 0x0d,
- 0xaf, 0xe3, 0xaf, 0x53, 0xda, 0x42, 0x3d, 0x71, 0xbb, 0xaa, 0xd1, 0x9e, 0x66, 0xad, 0xe3, 0x6e,
- 0x78, 0x1d, 0x7f, 0x83, 0x72, 0x48, 0x3d, 0x71, 0xbb, 0xa6, 0x73, 0x8e, 0xb8, 0x8e, 0x77, 0xe0,
- 0x42, 0x28, 0x2e, 0xb6, 0x47, 0x9d, 0x83, 0xe7, 0x66, 0xb7, 0xa4, 0xd1, 0xf0, 0xf8, 0x50, 0x56,
- 0x24, 0xe3, 0x7c, 0x20, 0x44, 0xee, 0x60, 0x33, 0xb9, 0x07, 0xaf, 0x87, 0x03, 0xa5, 0xcb, 0xac,
- 0xd2, 0x78, 0x89, 0xcc, 0xc5, 0x60, 0xcc, 0x0c, 0x51, 0x05, 0x07, 0xec, 0x52, 0x75, 0x1a, 0x40,
- 0x7d, 0xaa, 0xef, 0x89, 0x39, 0xf5, 0x67, 0xe0, 0xe2, 0x74, 0x28, 0x75, 0xc9, 0xeb, 0x34, 0xa2,
- 0x22, 0xf9, 0x42, 0x38, 0xaa, 0x4e, 0xd1, 0x67, 0xf4, 0x5d, 0xa3, 0x21, 0x56, 0xa4, 0x4f, 0xf5,
- 0x7e, 0x1f, 0x4a, 0x53, 0xc1, 0xd6, 0x65, 0xdf, 0xa1, 0x31, 0x17, 0xd9, 0xaf, 0x85, 0xe2, 0x6e,
- 0x98, 0x3c, 0xa3, 0xeb, 0xbb, 0x34, 0x08, 0x0b, 0xe4, 0xa9, 0x9e, 0x71, 0xc9, 0x82, 0xe1, 0xd8,
- 0xe5, 0xde, 0xa3, 0x51, 0x99, 0x2f, 0x59, 0x20, 0x32, 0x8b, 0xfd, 0x86, 0xe2, 0xb3, 0xcb, 0xad,
- 0xd3, 0x30, 0xcd, 0xfb, 0x0d, 0x86, 0x6a, 0x4e, 0x7e, 0x9b, 0x92, 0x77, 0x67, 0xcf, 0xf8, 0xc7,
- 0x09, 0x1a, 0x60, 0x39, 0x7b, 0x77, 0xd6, 0x94, 0x3d, 0xf6, 0x8c, 0x29, 0xff, 0x84, 0xb2, 0x89,
- 0xc0, 0x9e, 0x9a, 0xf3, 0x63, 0x98, 0x73, 0x6f, 0x75, 0xbd, 0xb1, 0x7d, 0x34, 0x2a, 0x35, 0x55,
- 0xb9, 0x02, 0xda, 0x95, 0xa9, 0xec, 0xc7, 0xbd, 0xe4, 0x6d, 0x50, 0x94, 0x11, 0x24, 0x31, 0x2b,
- 0xcc, 0x2e, 0xb3, 0xb2, 0xa3, 0x26, 0x22, 0xac, 0x30, 0x94, 0x67, 0x45, 0x20, 0x51, 0x2b, 0xae,
- 0xd3, 0x67, 0x56, 0x3e, 0x50, 0xa5, 0x99, 0x56, 0xdc, 0x10, 0xc0, 0xad, 0x04, 0x48, 0x4b, 0xeb,
- 0x7e, 0xbe, 0x85, 0xed, 0xe4, 0x8b, 0xe1, 0x04, 0x6c, 0x03, 0xef, 0xcf, 0xc1, 0x4a, 0x46, 0x13,
- 0x06, 0x37, 0x4d, 0xfb, 0xd9, 0x08, 0x5a, 0x60, 0x34, 0xd3, 0xb4, 0x9f, 0x9b, 0x41, 0x2b, 0xff,
- 0xa6, 0x04, 0x49, 0x9a, 0x4f, 0x92, 0x2c, 0x24, 0xdf, 0x6b, 0x6d, 0x3e, 0x56, 0xce, 0xd1, 0x5f,
- 0x0f, 0x5b, 0xad, 0xa7, 0x8a, 0x44, 0x72, 0x90, 0x7a, 0xf8, 0x95, 0xbd, 0xc6, 0xae, 0x22, 0x93,
- 0x22, 0xe4, 0x9b, 0x9b, 0xdb, 0x1b, 0x0d, 0x63, 0xc7, 0xd8, 0xdc, 0xde, 0x53, 0x12, 0xb4, 0xad,
- 0xf9, 0xb4, 0xf5, 0x60, 0x4f, 0x49, 0x92, 0x0c, 0x24, 0x68, 0x5d, 0x8a, 0x00, 0xa4, 0x77, 0xf7,
- 0x8c, 0xcd, 0xed, 0x0d, 0x25, 0x4d, 0xad, 0xec, 0x6d, 0x6e, 0x35, 0x94, 0x0c, 0x45, 0xee, 0xbd,
- 0xbb, 0xf3, 0xb4, 0xa1, 0x64, 0xe9, 0xcf, 0x07, 0x86, 0xf1, 0xe0, 0x2b, 0x4a, 0x8e, 0x92, 0xb6,
- 0x1e, 0xec, 0x28, 0x80, 0xcd, 0x0f, 0x1e, 0x3e, 0x6d, 0x28, 0x79, 0x52, 0x80, 0x6c, 0xf3, 0xdd,
- 0xed, 0x47, 0x7b, 0x9b, 0xad, 0x6d, 0xa5, 0x50, 0x3e, 0x81, 0x12, 0x5b, 0xe6, 0xc0, 0x2a, 0xb2,
- 0xa4, 0xf0, 0x1d, 0x48, 0xb1, 0x9d, 0x91, 0x50, 0x25, 0x95, 0xf0, 0xce, 0x4c, 0x53, 0x56, 0xd8,
- 0x1e, 0x31, 0xda, 0xd2, 0x65, 0x48, 0xb1, 0x55, 0x5a, 0x84, 0x14, 0x5b, 0x1d, 0x19, 0x53, 0x45,
- 0x56, 0x28, 0xff, 0x96, 0x0c, 0xb0, 0x61, 0xef, 0x3e, 0xef, 0x8f, 0x30, 0x21, 0xbf, 0x0c, 0x30,
- 0x79, 0xde, 0x1f, 0xb5, 0x51, 0xf5, 0x3c, 0xa9, 0xcc, 0xd1, 0x1a, 0xf4, 0x77, 0xe4, 0x1a, 0x14,
- 0xb0, 0xf9, 0x90, 0x79, 0x21, 0xcc, 0x25, 0x33, 0x46, 0x9e, 0xd6, 0x71, 0xc7, 0x14, 0x84, 0xd4,
- 0x74, 0x4c, 0x21, 0xd3, 0x02, 0xa4, 0xa6, 0x93, 0xab, 0x80, 0xc5, 0xf6, 0x04, 0x23, 0x0a, 0xa6,
- 0x8d, 0x39, 0x03, 0xfb, 0x65, 0x31, 0x86, 0xbc, 0x0d, 0xd8, 0x27, 0x9b, 0x77, 0x71, 0xfa, 0x74,
- 0xb8, 0xc3, 0x5d, 0xa1, 0x3f, 0xd8, 0x6c, 0x7d, 0xc2, 0x52, 0x0b, 0x72, 0x5e, 0x3d, 0xed, 0x0b,
- 0x6b, 0xf9, 0x8c, 0x14, 0x9c, 0x11, 0x60, 0x95, 0x37, 0x25, 0x06, 0xe0, 0xa3, 0x59, 0xc0, 0xd1,
- 0x30, 0x12, 0x1b, 0x4e, 0xf9, 0x32, 0xcc, 0x6d, 0xdb, 0x16, 0x3b, 0xbd, 0xb8, 0x4a, 0x05, 0x90,
- 0x3a, 0x25, 0x09, 0xb3, 0x27, 0xa9, 0x53, 0xbe, 0x02, 0x20, 0xb4, 0x29, 0x20, 0xed, 0xb3, 0x36,
- 0xf4, 0x01, 0xd2, 0x7e, 0xf9, 0x26, 0xa4, 0xb7, 0x3a, 0xc7, 0x7b, 0x9d, 0x1e, 0xb9, 0x06, 0x30,
- 0xe8, 0x4c, 0x9c, 0xf6, 0x21, 0xee, 0xc3, 0xe7, 0x9f, 0x7f, 0xfe, 0xb9, 0x84, 0x97, 0xbd, 0x1c,
- 0xad, 0x65, 0xfb, 0xf1, 0x02, 0xa0, 0x35, 0xe8, 0x6e, 0x99, 0x93, 0x49, 0xa7, 0x67, 0x92, 0x2a,
- 0xa4, 0x2d, 0x73, 0x42, 0xa3, 0x9d, 0x84, 0xef, 0x08, 0xcb, 0xfe, 0x2a, 0xf8, 0xa8, 0x95, 0x6d,
- 0x84, 0x18, 0x1c, 0x4a, 0x14, 0x48, 0x58, 0x47, 0x43, 0x7c, 0x27, 0x49, 0x19, 0xf4, 0xe7, 0xd2,
- 0x25, 0x48, 0x33, 0x0c, 0x21, 0x90, 0xb4, 0x3a, 0x43, 0xb3, 0xc4, 0xfa, 0xc5, 0xdf, 0xe5, 0x5f,
- 0x95, 0x00, 0xb6, 0xcd, 0x97, 0x67, 0xe8, 0xd3, 0x47, 0xc5, 0xf4, 0x99, 0x60, 0x7d, 0xde, 0x8f,
- 0xeb, 0x93, 0xea, 0xec, 0xd0, 0xb6, 0xbb, 0x6d, 0xb6, 0xc5, 0xec, 0x49, 0x27, 0x47, 0x6b, 0x70,
- 0xd7, 0xca, 0x1f, 0x40, 0x61, 0xd3, 0xb2, 0xcc, 0xb1, 0x3b, 0x26, 0x02, 0xc9, 0x67, 0xf6, 0xc4,
- 0xe1, 0x6f, 0x4b, 0xf8, 0x9b, 0x94, 0x20, 0x39, 0xb2, 0xc7, 0x0e, 0x9b, 0x67, 0x3d, 0xa9, 0xaf,
- 0xae, 0xae, 0x1a, 0x58, 0x43, 0x2e, 0x41, 0xee, 0xc0, 0xb6, 0x2c, 0xf3, 0x80, 0x4e, 0x22, 0x81,
- 0x69, 0x8d, 0x5f, 0x51, 0xfe, 0x65, 0x09, 0x0a, 0x2d, 0xe7, 0x99, 0x6f, 0x5c, 0x81, 0xc4, 0x73,
- 0xf3, 0x04, 0x87, 0x97, 0x30, 0xe8, 0x4f, 0x7a, 0x54, 0x7e, 0xbe, 0x33, 0x38, 0x62, 0x6f, 0x4d,
- 0x05, 0x83, 0x15, 0xc8, 0x05, 0x48, 0xbf, 0x34, 0xfb, 0xbd, 0x67, 0x0e, 0xda, 0x94, 0x0d, 0x5e,
- 0x22, 0xb7, 0x20, 0xd5, 0xa7, 0x83, 0x2d, 0x25, 0x71, 0xbd, 0x2e, 0xf8, 0xeb, 0x25, 0xce, 0xc1,
- 0x60, 0xa0, 0x1b, 0xd9, 0x6c, 0x57, 0xf9, 0xe8, 0xa3, 0x8f, 0x3e, 0x92, 0xcb, 0x87, 0xb0, 0xe8,
- 0x1e, 0xde, 0xc0, 0x64, 0xb7, 0xa1, 0x34, 0x30, 0xed, 0xf6, 0x61, 0xdf, 0xea, 0x0c, 0x06, 0x27,
- 0xed, 0x97, 0xb6, 0xd5, 0xee, 0x58, 0x6d, 0x7b, 0x72, 0xd0, 0x19, 0xe3, 0x02, 0x44, 0x77, 0xb1,
- 0x38, 0x30, 0xed, 0x26, 0xa3, 0xbd, 0x6f, 0x5b, 0x0f, 0xac, 0x16, 0xe5, 0x94, 0xff, 0x20, 0x09,
- 0xb9, 0xad, 0x13, 0xd7, 0xfa, 0x22, 0xa4, 0x0e, 0xec, 0x23, 0x8b, 0xad, 0x65, 0xca, 0x60, 0x05,
- 0x6f, 0x8f, 0x64, 0x61, 0x8f, 0x16, 0x21, 0xf5, 0xe2, 0xc8, 0x76, 0x4c, 0x9c, 0x6e, 0xce, 0x60,
- 0x05, 0xba, 0x5a, 0x23, 0xd3, 0x29, 0x25, 0x31, 0xb9, 0xa5, 0x3f, 0xfd, 0xf9, 0xa7, 0xce, 0x30,
- 0x7f, 0xb2, 0x02, 0x69, 0x9b, 0xae, 0xfe, 0xa4, 0x94, 0xc6, 0x77, 0x35, 0x01, 0x2e, 0xee, 0x8a,
- 0xc1, 0x51, 0x64, 0x13, 0x16, 0x5e, 0x9a, 0xed, 0xe1, 0xd1, 0xc4, 0x69, 0xf7, 0xec, 0x76, 0xd7,
- 0x34, 0x47, 0xe6, 0xb8, 0x34, 0x87, 0x3d, 0x09, 0x3e, 0x61, 0xd6, 0x42, 0x1a, 0xf3, 0x2f, 0xcd,
- 0xad, 0xa3, 0x89, 0xb3, 0x61, 0x3f, 0x46, 0x16, 0xa9, 0x42, 0x6e, 0x6c, 0x52, 0x4f, 0x40, 0x07,
- 0x5b, 0x08, 0xf7, 0x1e, 0xa0, 0x66, 0xc7, 0xe6, 0x08, 0x2b, 0xc8, 0x3a, 0x64, 0xf7, 0xfb, 0xcf,
- 0xcd, 0xc9, 0x33, 0xb3, 0x5b, 0xca, 0xa8, 0x52, 0x65, 0x5e, 0xbb, 0xe8, 0x73, 0xbc, 0x65, 0x5d,
- 0x79, 0x64, 0x0f, 0xec, 0xb1, 0xe1, 0x41, 0xc9, 0x7d, 0xc8, 0x4d, 0xec, 0xa1, 0xc9, 0xf4, 0x9d,
- 0xc5, 0xa0, 0x7a, 0x79, 0x16, 0x6f, 0xd7, 0x1e, 0x9a, 0xae, 0x07, 0x73, 0xf1, 0x64, 0x99, 0x0d,
- 0x74, 0x9f, 0x5e, 0x9d, 0x4b, 0x80, 0x4f, 0x03, 0x74, 0x40, 0x78, 0x95, 0x26, 0x4b, 0x74, 0x40,
- 0xbd, 0x43, 0x7a, 0x23, 0x2a, 0xe5, 0x31, 0xaf, 0xf4, 0xca, 0x4b, 0xb7, 0x20, 0xe7, 0x19, 0xf4,
- 0x5d, 0x1f, 0x73, 0x37, 0x39, 0xf4, 0x07, 0xcc, 0xf5, 0x31, 0x5f, 0xf3, 0x06, 0xa4, 0x70, 0xd8,
- 0x34, 0x42, 0x19, 0x0d, 0x1a, 0x10, 0x73, 0x90, 0xda, 0x30, 0x1a, 0x8d, 0x6d, 0x45, 0xc2, 0xd8,
- 0xf8, 0xf4, 0xdd, 0x86, 0x22, 0x0b, 0x8a, 0xfd, 0x6d, 0x09, 0x12, 0x8d, 0x63, 0x54, 0x0b, 0x9d,
- 0x86, 0x7b, 0xa2, 0xe9, 0x6f, 0xad, 0x06, 0xc9, 0xa1, 0x3d, 0x36, 0xc9, 0xf9, 0x19, 0xb3, 0x2c,
- 0xf5, 0x70, 0xbf, 0x84, 0x57, 0xe4, 0xc6, 0xb1, 0x63, 0x20, 0x5e, 0x7b, 0x0b, 0x92, 0x8e, 0x79,
- 0xec, 0xcc, 0xe6, 0x3d, 0x63, 0x1d, 0x50, 0x80, 0x76, 0x13, 0xd2, 0xd6, 0xd1, 0x70, 0xdf, 0x1c,
- 0xcf, 0x86, 0xf6, 0x71, 0x7a, 0x1c, 0x52, 0x7e, 0x0f, 0x94, 0x47, 0xf6, 0x70, 0x34, 0x30, 0x8f,
- 0x1b, 0xc7, 0x8e, 0x69, 0x4d, 0xfa, 0xb6, 0x45, 0xf5, 0x7c, 0xd8, 0x1f, 0xa3, 0x17, 0xc1, 0xb7,
- 0x62, 0x2c, 0xd0, 0x53, 0x3d, 0x31, 0x0f, 0x6c, 0xab, 0xcb, 0x1d, 0x26, 0x2f, 0x51, 0xb4, 0xf3,
- 0xac, 0x3f, 0xa6, 0x0e, 0x84, 0xfa, 0x79, 0x56, 0x28, 0x6f, 0x40, 0x91, 0xe7, 0x18, 0x13, 0xde,
- 0x71, 0xf9, 0x06, 0x14, 0xdc, 0x2a, 0x7c, 0x38, 0xcf, 0x42, 0xf2, 0x83, 0x86, 0xd1, 0x52, 0xce,
- 0xd1, 0x65, 0x6d, 0x6d, 0x37, 0x14, 0x89, 0xfe, 0xd8, 0x7b, 0xbf, 0x15, 0x58, 0xca, 0x4b, 0x50,
- 0xf0, 0xc6, 0xbe, 0x6b, 0x3a, 0xd8, 0x42, 0x03, 0x42, 0xa6, 0x2e, 0x67, 0xa5, 0x72, 0x06, 0x52,
- 0x8d, 0xe1, 0xc8, 0x39, 0x29, 0xff, 0x22, 0xe4, 0x39, 0xe8, 0x69, 0x7f, 0xe2, 0x90, 0x3b, 0x90,
- 0x19, 0xf2, 0xf9, 0x4a, 0x78, 0xdd, 0x13, 0x35, 0xe5, 0xe3, 0xdc, 0xdf, 0x86, 0x8b, 0x5e, 0xaa,
- 0x42, 0x46, 0xf0, 0xa5, 0xfc, 0xa8, 0xcb, 0xe2, 0x51, 0x67, 0x4e, 0x21, 0x21, 0x38, 0x85, 0xf2,
- 0x16, 0x64, 0x58, 0x04, 0x9c, 0x60, 0x54, 0x67, 0xa9, 0x22, 0x13, 0x13, 0xdb, 0xf9, 0x3c, 0xab,
- 0x63, 0x17, 0x95, 0xab, 0x90, 0x47, 0xc1, 0x72, 0x04, 0x73, 0x9d, 0x80, 0x55, 0x4c, 0x6e, 0xbf,
- 0x9f, 0x82, 0xac, 0xbb, 0x52, 0x64, 0x19, 0xd2, 0x2c, 0x3f, 0x43, 0x53, 0xee, 0xfb, 0x41, 0x0a,
- 0x33, 0x32, 0xb2, 0x0c, 0x19, 0x9e, 0x83, 0x71, 0xef, 0x2e, 0x57, 0x35, 0x23, 0xcd, 0x72, 0x2e,
- 0xaf, 0xb1, 0xa6, 0xa3, 0x63, 0x62, 0x2f, 0x03, 0x69, 0x96, 0x55, 0x11, 0x15, 0x72, 0x5e, 0x1e,
- 0x85, 0xfe, 0x98, 0x3f, 0x03, 0x64, 0xdd, 0xc4, 0x49, 0x40, 0xd4, 0x74, 0xf4, 0x58, 0x3c, 0xe7,
- 0xcf, 0x36, 0xfd, 0xeb, 0x49, 0xd6, 0xcd, 0x86, 0xf0, 0xf9, 0xde, 0x4d, 0xf0, 0x33, 0x3c, 0xff,
- 0xf1, 0x01, 0x35, 0x1d, 0x5d, 0x82, 0x9b, 0xcd, 0x67, 0x78, 0x8e, 0x43, 0xae, 0xd2, 0x21, 0x62,
- 0xce, 0x82, 0x47, 0xdf, 0x4f, 0xdd, 0xd3, 0x2c, 0x93, 0x21, 0xd7, 0xa8, 0x05, 0x96, 0x98, 0xe0,
- 0xb9, 0xf4, 0xf3, 0xf4, 0x0c, 0xcf, 0x57, 0xc8, 0x4d, 0x0a, 0x61, 0xcb, 0x5f, 0x82, 0x88, 0xa4,
- 0x3c, 0xc3, 0x93, 0x72, 0xa2, 0xd2, 0x0e, 0xd1, 0x3d, 0xa0, 0x4b, 0x10, 0x12, 0xf0, 0x34, 0x4b,
- 0xc0, 0xc9, 0x15, 0x34, 0xc7, 0x26, 0x55, 0xf0, 0x93, 0xed, 0x0c, 0x4f, 0x70, 0xfc, 0x76, 0xbc,
- 0xb2, 0x79, 0x89, 0x75, 0x86, 0xa7, 0x30, 0xa4, 0x46, 0xf7, 0x8b, 0xea, 0xbb, 0x34, 0x8f, 0x4e,
- 0xb0, 0xe4, 0x0b, 0xcf, 0xdd, 0x53, 0xe6, 0x03, 0xeb, 0xcc, 0x83, 0x18, 0xa9, 0x26, 0x9e, 0x86,
- 0x25, 0xca, 0xdb, 0xe9, 0x5b, 0x87, 0xa5, 0x22, 0xae, 0x44, 0xa2, 0x6f, 0x1d, 0x1a, 0xa9, 0x26,
- 0xad, 0x61, 0x1a, 0xd8, 0xa6, 0x6d, 0x0a, 0xb6, 0x25, 0x6f, 0xb3, 0x46, 0x5a, 0x45, 0x4a, 0x90,
- 0x6a, 0xb6, 0xb7, 0x3b, 0x56, 0x69, 0x81, 0xf1, 0xac, 0x8e, 0x65, 0x24, 0x9b, 0xdb, 0x1d, 0x8b,
- 0xbc, 0x05, 0x89, 0xc9, 0xd1, 0x7e, 0x89, 0x84, 0xbf, 0xac, 0xec, 0x1e, 0xed, 0xbb, 0x43, 0x31,
- 0x28, 0x82, 0x2c, 0x43, 0x76, 0xe2, 0x8c, 0xdb, 0xbf, 0x60, 0x8e, 0xed, 0xd2, 0x79, 0x5c, 0xc2,
- 0x73, 0x46, 0x66, 0xe2, 0x8c, 0x3f, 0x30, 0xc7, 0xf6, 0x19, 0x9d, 0x5f, 0xf9, 0x0a, 0xe4, 0x05,
- 0xbb, 0xa4, 0x08, 0x92, 0xc5, 0x6e, 0x0a, 0x75, 0xe9, 0x8e, 0x21, 0x59, 0xe5, 0x3d, 0x28, 0xb8,
- 0x39, 0x0c, 0xce, 0x57, 0xa3, 0x27, 0x69, 0x60, 0x8f, 0xf1, 0x7c, 0xce, 0x6b, 0x97, 0xc4, 0x10,
- 0xe5, 0xc3, 0x78, 0xb8, 0x60, 0xd0, 0xb2, 0x12, 0x1a, 0x8a, 0x54, 0xfe, 0xa1, 0x04, 0x85, 0x2d,
- 0x7b, 0xec, 0x3f, 0x30, 0x2f, 0x42, 0x6a, 0xdf, 0xb6, 0x07, 0x13, 0x34, 0x9b, 0x35, 0x58, 0x81,
- 0xbc, 0x01, 0x05, 0xfc, 0xe1, 0xe6, 0x9e, 0xb2, 0xf7, 0xb4, 0x91, 0xc7, 0x7a, 0x9e, 0x70, 0x12,
- 0x48, 0xf6, 0x2d, 0x67, 0xc2, 0x3d, 0x19, 0xfe, 0x26, 0x5f, 0x80, 0x3c, 0xfd, 0xeb, 0x32, 0x93,
- 0xde, 0x85, 0x15, 0x68, 0x35, 0x27, 0xbe, 0x05, 0x73, 0xb8, 0xfb, 0x1e, 0x2c, 0xe3, 0x3d, 0x63,
- 0x14, 0x58, 0x03, 0x07, 0x96, 0x20, 0xc3, 0x5c, 0xc1, 0x04, 0xbf, 0x96, 0xe5, 0x0c, 0xb7, 0x48,
- 0xdd, 0x2b, 0x66, 0x02, 0x2c, 0xdc, 0x67, 0x0c, 0x5e, 0x2a, 0x3f, 0x80, 0x2c, 0x46, 0xa9, 0xd6,
- 0xa0, 0x4b, 0xca, 0x20, 0xf5, 0x4a, 0x26, 0xc6, 0xc8, 0x45, 0xe1, 0x9a, 0xcf, 0x9b, 0x57, 0x36,
- 0x0c, 0xa9, 0xb7, 0xb4, 0x00, 0xd2, 0x06, 0xbd, 0x77, 0x1f, 0x73, 0x37, 0x2d, 0x1d, 0x97, 0x5b,
- 0xdc, 0xc4, 0xb6, 0xf9, 0x32, 0xce, 0xc4, 0xb6, 0xf9, 0x92, 0x99, 0xb8, 0x3a, 0x65, 0x82, 0x96,
- 0x4e, 0xf8, 0xa7, 0x43, 0xe9, 0xa4, 0x5c, 0x85, 0x39, 0x3c, 0x9e, 0x7d, 0xab, 0xb7, 0x63, 0xf7,
- 0x2d, 0xbc, 0xe7, 0x1f, 0xe2, 0x3d, 0x49, 0x32, 0xa4, 0x43, 0xba, 0x07, 0xe6, 0x71, 0xe7, 0x80,
- 0xdd, 0x38, 0xb3, 0x06, 0x2b, 0x94, 0x3f, 0x4b, 0xc2, 0x3c, 0x77, 0xad, 0xef, 0xf7, 0x9d, 0x67,
- 0x5b, 0x9d, 0x11, 0x79, 0x0a, 0x05, 0xea, 0x55, 0xdb, 0xc3, 0xce, 0x68, 0x44, 0x8f, 0xaf, 0x84,
- 0x57, 0x8d, 0xeb, 0x53, 0xae, 0x9a, 0xe3, 0x57, 0xb6, 0x3b, 0x43, 0x73, 0x8b, 0x61, 0x1b, 0x96,
- 0x33, 0x3e, 0x31, 0xf2, 0x96, 0x5f, 0x43, 0x36, 0x21, 0x3f, 0x9c, 0xf4, 0x3c, 0x63, 0x32, 0x1a,
- 0xab, 0x44, 0x1a, 0xdb, 0x9a, 0xf4, 0x02, 0xb6, 0x60, 0xe8, 0x55, 0xd0, 0x81, 0x51, 0x7f, 0xec,
- 0xd9, 0x4a, 0x9c, 0x32, 0x30, 0xea, 0x3a, 0x82, 0x03, 0xdb, 0xf7, 0x6b, 0xc8, 0x63, 0x00, 0x7a,
- 0xbc, 0x1c, 0x9b, 0xa6, 0x4e, 0xa8, 0xa0, 0xbc, 0xf6, 0x66, 0xa4, 0xad, 0x5d, 0x67, 0xbc, 0x67,
- 0xef, 0x3a, 0x63, 0x66, 0x88, 0x1e, 0x4c, 0x2c, 0x2e, 0xbd, 0x03, 0x4a, 0x78, 0xfe, 0xe2, 0x8d,
- 0x3c, 0x35, 0xe3, 0x46, 0x9e, 0xe3, 0x37, 0xf2, 0xba, 0x7c, 0x57, 0x5a, 0x7a, 0x0f, 0x8a, 0xa1,
- 0x29, 0x8b, 0x74, 0xc2, 0xe8, 0xb7, 0x45, 0x7a, 0x5e, 0x7b, 0x5d, 0xf8, 0x9c, 0x2d, 0x6e, 0xb8,
- 0x68, 0xf7, 0x1d, 0x50, 0xc2, 0xd3, 0x17, 0x0d, 0x67, 0x63, 0x32, 0x05, 0xe4, 0xdf, 0x87, 0xb9,
- 0xc0, 0x94, 0x45, 0x72, 0xee, 0x94, 0x49, 0x95, 0x7f, 0x29, 0x05, 0xa9, 0x96, 0x65, 0xda, 0x87,
- 0xe4, 0xf5, 0x60, 0x9c, 0x7c, 0x72, 0xce, 0x8d, 0x91, 0x17, 0x43, 0x31, 0xf2, 0xc9, 0x39, 0x2f,
- 0x42, 0x5e, 0x0c, 0x45, 0x48, 0xb7, 0xa9, 0xa6, 0x93, 0xcb, 0x53, 0xf1, 0xf1, 0xc9, 0x39, 0x21,
- 0x38, 0x5e, 0x9e, 0x0a, 0x8e, 0x7e, 0x73, 0x4d, 0xa7, 0x0e, 0x35, 0x18, 0x19, 0x9f, 0x9c, 0xf3,
- 0xa3, 0xe2, 0x72, 0x38, 0x2a, 0x7a, 0x8d, 0x35, 0x9d, 0x0d, 0x49, 0x88, 0x88, 0x38, 0x24, 0x16,
- 0x0b, 0x97, 0xc3, 0xb1, 0x10, 0x79, 0x3c, 0x0a, 0x2e, 0x87, 0xa3, 0x20, 0x36, 0xf2, 0xa8, 0x77,
- 0x31, 0x14, 0xf5, 0xd0, 0x28, 0x0b, 0x77, 0xcb, 0xe1, 0x70, 0xc7, 0x78, 0xc2, 0x48, 0xc5, 0x58,
- 0xe7, 0x35, 0xd6, 0x74, 0xa2, 0x85, 0x02, 0x5d, 0xf4, 0x6d, 0x1f, 0xf7, 0x02, 0x9d, 0xbe, 0x4e,
- 0x97, 0xcd, 0xbd, 0x88, 0x16, 0x63, 0xbe, 0xf8, 0xe3, 0x6a, 0xba, 0x17, 0x31, 0x0d, 0x32, 0x87,
- 0x3c, 0x01, 0x56, 0xd0, 0x73, 0x09, 0xb2, 0xc4, 0xcd, 0x5f, 0x69, 0xb6, 0xd1, 0x83, 0xd1, 0x79,
- 0x1d, 0xb2, 0x3b, 0x7d, 0x05, 0xe6, 0x9a, 0xed, 0xa7, 0x9d, 0x71, 0xcf, 0x9c, 0x38, 0xed, 0xbd,
- 0x4e, 0xcf, 0x7b, 0x44, 0xa0, 0xfb, 0x9f, 0x6f, 0xf2, 0x96, 0xbd, 0x4e, 0x8f, 0x5c, 0x70, 0xc5,
- 0xd5, 0xc5, 0x56, 0x89, 0xcb, 0x6b, 0xe9, 0x75, 0xba, 0x68, 0xcc, 0x18, 0xfa, 0xc2, 0x05, 0xee,
- 0x0b, 0x1f, 0x66, 0x20, 0x75, 0x64, 0xf5, 0x6d, 0xeb, 0x61, 0x0e, 0x32, 0x8e, 0x3d, 0x1e, 0x76,
- 0x1c, 0xbb, 0xfc, 0x23, 0x09, 0xe0, 0x91, 0x3d, 0x1c, 0x1e, 0x59, 0xfd, 0x17, 0x47, 0x26, 0xb9,
- 0x02, 0xf9, 0x61, 0xe7, 0xb9, 0xd9, 0x1e, 0x9a, 0xed, 0x83, 0xb1, 0x7b, 0x0e, 0x72, 0xb4, 0x6a,
- 0xcb, 0x7c, 0x34, 0x3e, 0x21, 0x25, 0xf7, 0x8a, 0x8e, 0xda, 0x41, 0x49, 0xf2, 0x2b, 0xfb, 0x22,
- 0xbf, 0x74, 0xa6, 0xf9, 0x1e, 0xba, 0xd7, 0x4e, 0x96, 0x47, 0x64, 0xf8, 0xee, 0x61, 0x89, 0x4a,
- 0xde, 0x31, 0x87, 0xa3, 0xf6, 0x01, 0x4a, 0x85, 0xca, 0x21, 0x45, 0xcb, 0x8f, 0xc8, 0x6d, 0x48,
- 0x1c, 0xd8, 0x03, 0x14, 0xc9, 0x29, 0xfb, 0x42, 0x71, 0xe4, 0x0d, 0x48, 0x0c, 0x27, 0x4c, 0x36,
- 0x79, 0x6d, 0x41, 0xb8, 0x27, 0xb0, 0xd0, 0x44, 0x61, 0xc3, 0x49, 0xcf, 0x9b, 0xf7, 0x8d, 0x22,
- 0x24, 0x9a, 0xad, 0x16, 0x8d, 0xfd, 0xcd, 0x56, 0x6b, 0x4d, 0x91, 0xea, 0x5f, 0x82, 0x6c, 0x6f,
- 0x6c, 0x9a, 0xd4, 0x3d, 0xcc, 0xce, 0x39, 0x3e, 0xc4, 0x58, 0xe7, 0x81, 0xea, 0x5b, 0x90, 0x39,
- 0x60, 0x59, 0x07, 0x89, 0x48, 0x6b, 0x4b, 0x7f, 0xc8, 0x1e, 0x55, 0x96, 0xfc, 0xe6, 0x70, 0x9e,
- 0x62, 0xb8, 0x36, 0xea, 0x3b, 0x90, 0x1b, 0xb7, 0x4f, 0x33, 0xf8, 0x31, 0x8b, 0x2e, 0x71, 0x06,
- 0xb3, 0x63, 0x5e, 0x55, 0x6f, 0xc0, 0x82, 0x65, 0xbb, 0xdf, 0x50, 0xda, 0x5d, 0x76, 0xc6, 0x2e,
- 0x4e, 0x5f, 0xe5, 0x5c, 0xe3, 0x26, 0xfb, 0x6e, 0x69, 0xd9, 0xbc, 0x81, 0x9d, 0xca, 0xfa, 0x23,
- 0x50, 0x04, 0x33, 0x98, 0x7a, 0xc6, 0x59, 0x39, 0x64, 0x1f, 0x4a, 0x3d, 0x2b, 0x78, 0xee, 0x43,
- 0x46, 0xd8, 0xc9, 0x8c, 0x31, 0xd2, 0x63, 0x5f, 0x9d, 0x3d, 0x23, 0xe8, 0xea, 0xa6, 0x8d, 0x50,
- 0x5f, 0x13, 0x6d, 0xe4, 0x19, 0xfb, 0x20, 0x2d, 0x1a, 0xa9, 0xe9, 0xa1, 0x55, 0x39, 0x3a, 0x75,
- 0x28, 0x7d, 0xf6, 0x3d, 0xd9, 0xb3, 0xc2, 0x1c, 0xe0, 0x0c, 0x33, 0xf1, 0x83, 0xf9, 0x90, 0x7d,
- 0x6a, 0x0e, 0x98, 0x99, 0x1a, 0xcd, 0xe4, 0xd4, 0xd1, 0x3c, 0x67, 0xdf, 0x75, 0x3d, 0x33, 0xbb,
- 0xb3, 0x46, 0x33, 0x39, 0x75, 0x34, 0x03, 0xf6, 0xc5, 0x37, 0x60, 0xa6, 0xa6, 0xd7, 0x37, 0x80,
- 0x88, 0x5b, 0xcd, 0xe3, 0x44, 0x8c, 0x9d, 0x21, 0xfb, 0x8e, 0xef, 0x6f, 0x36, 0xa3, 0xcc, 0x32,
- 0x14, 0x3f, 0x20, 0x8b, 0x7d, 0xe2, 0x0f, 0x1a, 0xaa, 0xe9, 0xf5, 0x4d, 0x38, 0x2f, 0x4e, 0xec,
- 0x0c, 0x43, 0xb2, 0x55, 0xa9, 0x52, 0x34, 0x16, 0xfc, 0xa9, 0x71, 0xce, 0x4c, 0x53, 0xf1, 0x83,
- 0x1a, 0xa9, 0x52, 0x45, 0x99, 0x32, 0x55, 0xd3, 0xeb, 0x0f, 0xa0, 0x28, 0x98, 0xda, 0xc7, 0x08,
- 0x1d, 0x6d, 0xe6, 0x05, 0xfb, 0x5f, 0x0b, 0xcf, 0x0c, 0x8d, 0xe8, 0xe1, 0x1d, 0xe3, 0x31, 0x2e,
- 0xda, 0xc8, 0x98, 0xfd, 0xa3, 0x80, 0x3f, 0x16, 0x64, 0x84, 0x8e, 0x04, 0xe6, 0xdf, 0x71, 0x56,
- 0x26, 0xec, 0x5f, 0x08, 0xfc, 0xa1, 0x50, 0x42, 0xbd, 0x1f, 0x98, 0x8e, 0x49, 0x83, 0x5c, 0x8c,
- 0x0d, 0x07, 0x3d, 0xf2, 0x9b, 0x91, 0x80, 0x15, 0xf1, 0x81, 0x44, 0x98, 0x36, 0x2d, 0xd6, 0x37,
- 0x61, 0xfe, 0xec, 0x0e, 0xe9, 0x63, 0x89, 0x65, 0xcb, 0xd5, 0x15, 0x9a, 0x50, 0x1b, 0x73, 0xdd,
- 0x80, 0x5f, 0x6a, 0xc0, 0xdc, 0x99, 0x9d, 0xd2, 0x27, 0x12, 0xcb, 0x39, 0xa9, 0x25, 0xa3, 0xd0,
- 0x0d, 0x7a, 0xa6, 0xb9, 0x33, 0xbb, 0xa5, 0x4f, 0x25, 0xf6, 0x40, 0xa1, 0x6b, 0x9e, 0x11, 0xd7,
- 0x33, 0xcd, 0x9d, 0xd9, 0x2d, 0x7d, 0x95, 0x65, 0x94, 0xb2, 0x5e, 0x15, 0x8d, 0xa0, 0x2f, 0x98,
- 0x3f, 0xbb, 0x5b, 0xfa, 0x9a, 0x84, 0x8f, 0x15, 0xb2, 0xae, 0x7b, 0xeb, 0xe2, 0x79, 0xa6, 0xf9,
- 0xb3, 0xbb, 0xa5, 0xaf, 0x4b, 0xf8, 0xa4, 0x21, 0xeb, 0xeb, 0x01, 0x33, 0xc1, 0xd1, 0x9c, 0xee,
- 0x96, 0xbe, 0x21, 0xe1, 0x2b, 0x83, 0xac, 0xd7, 0x3c, 0x33, 0xbb, 0x53, 0xa3, 0x39, 0xdd, 0x2d,
- 0x7d, 0x13, 0x6f, 0xf1, 0x75, 0x59, 0xbf, 0x13, 0x30, 0x83, 0x9e, 0xa9, 0xf8, 0x0a, 0x6e, 0xe9,
- 0x5b, 0x12, 0x3e, 0x06, 0xc9, 0xfa, 0x5d, 0xc3, 0xed, 0xdd, 0xf7, 0x4c, 0xc5, 0x57, 0x70, 0x4b,
- 0x9f, 0x49, 0xf8, 0x66, 0x24, 0xeb, 0xf7, 0x82, 0x86, 0xd0, 0x33, 0x29, 0xaf, 0xe2, 0x96, 0xbe,
- 0x4d, 0x2d, 0x15, 0xeb, 0xf2, 0xfa, 0xaa, 0xe1, 0x0e, 0x40, 0xf0, 0x4c, 0xca, 0xab, 0xb8, 0xa5,
- 0xef, 0x50, 0x53, 0x4a, 0x5d, 0x5e, 0x5f, 0x0b, 0x99, 0xaa, 0xe9, 0xf5, 0x47, 0x50, 0x38, 0xab,
- 0x5b, 0xfa, 0xae, 0xf8, 0x16, 0x97, 0xef, 0x0a, 0xbe, 0x69, 0x47, 0xd8, 0xb3, 0x53, 0x1d, 0xd3,
- 0xf7, 0x30, 0xc7, 0xa9, 0xcf, 0x3d, 0x61, 0xef, 0x55, 0x8c, 0xe0, 0x6f, 0x1f, 0x73, 0x53, 0x5b,
- 0xfe, 0xf9, 0x38, 0xd5, 0x47, 0x7d, 0x5f, 0xc2, 0x47, 0xad, 0x02, 0x37, 0x88, 0x78, 0xef, 0xa4,
- 0x30, 0x87, 0xf5, 0xa1, 0x3f, 0xcb, 0xd3, 0xbc, 0xd5, 0x0f, 0xa4, 0x57, 0x71, 0x57, 0xf5, 0x44,
- 0x6b, 0xbb, 0xe1, 0x2d, 0x06, 0xd6, 0xbc, 0x0d, 0xc9, 0x63, 0x6d, 0x75, 0x4d, 0xbc, 0x92, 0x89,
- 0x6f, 0xb9, 0xcc, 0x49, 0xe5, 0xb5, 0xa2, 0xf0, 0xdc, 0x3d, 0x1c, 0x39, 0x27, 0x06, 0xb2, 0x38,
- 0x5b, 0x8b, 0x64, 0x7f, 0x12, 0xc3, 0xd6, 0x38, 0xbb, 0x1a, 0xc9, 0xfe, 0x34, 0x86, 0x5d, 0xe5,
- 0x6c, 0x3d, 0x92, 0xfd, 0xd5, 0x18, 0xb6, 0xce, 0xd9, 0xeb, 0x91, 0xec, 0xaf, 0xc5, 0xb0, 0xd7,
- 0x39, 0xbb, 0x16, 0xc9, 0xfe, 0x7a, 0x0c, 0xbb, 0xc6, 0xd9, 0x77, 0x22, 0xd9, 0xdf, 0x88, 0x61,
- 0xdf, 0xe1, 0xec, 0xbb, 0x91, 0xec, 0x6f, 0xc6, 0xb0, 0xef, 0x72, 0xf6, 0xbd, 0x48, 0xf6, 0xb7,
- 0x62, 0xd8, 0xf7, 0x18, 0x7b, 0x6d, 0x35, 0x92, 0xfd, 0x59, 0x34, 0x7b, 0x6d, 0x95, 0xb3, 0xa3,
- 0xb5, 0xf6, 0xed, 0x18, 0x36, 0xd7, 0xda, 0x5a, 0xb4, 0xd6, 0xbe, 0x13, 0xc3, 0xe6, 0x5a, 0x5b,
- 0x8b, 0xd6, 0xda, 0x77, 0x63, 0xd8, 0x5c, 0x6b, 0x6b, 0xd1, 0x5a, 0xfb, 0x5e, 0x0c, 0x9b, 0x6b,
- 0x6d, 0x2d, 0x5a, 0x6b, 0xdf, 0x8f, 0x61, 0x73, 0xad, 0xad, 0x45, 0x6b, 0xed, 0x07, 0x31, 0x6c,
- 0xae, 0xb5, 0xb5, 0x68, 0xad, 0xfd, 0x51, 0x0c, 0x9b, 0x6b, 0x6d, 0x2d, 0x5a, 0x6b, 0x7f, 0x1c,
- 0xc3, 0xe6, 0x5a, 0x5b, 0x8b, 0xd6, 0xda, 0x9f, 0xc4, 0xb0, 0xb9, 0xd6, 0xb4, 0x68, 0xad, 0xfd,
- 0x69, 0x34, 0x5b, 0xe3, 0x5a, 0xd3, 0xa2, 0xb5, 0xf6, 0x67, 0x31, 0x6c, 0xae, 0x35, 0x2d, 0x5a,
- 0x6b, 0x7f, 0x1e, 0xc3, 0xe6, 0x5a, 0xd3, 0xa2, 0xb5, 0xf6, 0xc3, 0x18, 0x36, 0xd7, 0x9a, 0x16,
- 0xad, 0xb5, 0xbf, 0x88, 0x61, 0x73, 0xad, 0x69, 0xd1, 0x5a, 0xfb, 0xcb, 0x18, 0x36, 0xd7, 0x9a,
- 0x16, 0xad, 0xb5, 0xbf, 0x8a, 0x61, 0x73, 0xad, 0x69, 0xd1, 0x5a, 0xfb, 0xeb, 0x18, 0x36, 0xd7,
- 0x9a, 0x16, 0xad, 0xb5, 0xbf, 0x89, 0x61, 0x73, 0xad, 0x69, 0xd1, 0x5a, 0xfb, 0xdb, 0x18, 0x36,
- 0xd7, 0x5a, 0x35, 0x5a, 0x6b, 0x7f, 0x17, 0xcd, 0xae, 0x72, 0xad, 0x55, 0xa3, 0xb5, 0xf6, 0xf7,
- 0x31, 0x6c, 0xae, 0xb5, 0x6a, 0xb4, 0xd6, 0xfe, 0x21, 0x86, 0xcd, 0xb5, 0x56, 0x8d, 0xd6, 0xda,
- 0x3f, 0xc6, 0xb0, 0xb9, 0xd6, 0xaa, 0xd1, 0x5a, 0xfb, 0x51, 0x0c, 0x9b, 0x6b, 0xad, 0x1a, 0xad,
- 0xb5, 0x7f, 0x8a, 0x61, 0x73, 0xad, 0x55, 0xa3, 0xb5, 0xf6, 0xcf, 0x31, 0x6c, 0xae, 0xb5, 0x6a,
- 0xb4, 0xd6, 0xfe, 0x25, 0x86, 0xcd, 0xb5, 0x56, 0x8d, 0xd6, 0xda, 0xbf, 0xc6, 0xb0, 0xb9, 0xd6,
- 0xaa, 0xd1, 0x5a, 0xfb, 0xb7, 0x18, 0x36, 0xd7, 0x9a, 0x1e, 0xad, 0xb5, 0x7f, 0x8f, 0x66, 0xeb,
- 0x5c, 0x6b, 0x7a, 0xb4, 0xd6, 0xfe, 0x23, 0x86, 0xcd, 0xb5, 0xa6, 0x47, 0x6b, 0xed, 0x3f, 0x63,
- 0xd8, 0x5c, 0x6b, 0x7a, 0xb4, 0xd6, 0xfe, 0x2b, 0x86, 0xcd, 0xb5, 0xa6, 0x47, 0x6b, 0xed, 0xbf,
- 0x63, 0xd8, 0x5c, 0x6b, 0x7a, 0xb4, 0xd6, 0xfe, 0x27, 0x86, 0xcd, 0xb5, 0xa6, 0x47, 0x6b, 0xed,
- 0xc7, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0x3f, 0x89, 0x61, 0x73, 0xad, 0xe9, 0xd1, 0x5a,
- 0xfb, 0xdf, 0x18, 0x36, 0xd7, 0x9a, 0x1e, 0xad, 0xb5, 0xff, 0x8b, 0x61, 0x73, 0xad, 0xad, 0x47,
- 0x6b, 0xed, 0xff, 0xa3, 0xd9, 0xeb, 0xab, 0x3f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x00, 0xcd,
- 0x32, 0x57, 0x39, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/proto/testdata/test.proto b/vendor/github.com/golang/protobuf/proto/testdata/test.proto
deleted file mode 100644
index 70e3cfcda..000000000
--- a/vendor/github.com/golang/protobuf/proto/testdata/test.proto
+++ /dev/null
@@ -1,548 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// A feature-rich test file for the protocol compiler and libraries.
-
-syntax = "proto2";
-
-package testdata;
-
-enum FOO { FOO1 = 1; };
-
-message GoEnum {
- required FOO foo = 1;
-}
-
-message GoTestField {
- required string Label = 1;
- required string Type = 2;
-}
-
-message GoTest {
- // An enum, for completeness.
- enum KIND {
- VOID = 0;
-
- // Basic types
- BOOL = 1;
- BYTES = 2;
- FINGERPRINT = 3;
- FLOAT = 4;
- INT = 5;
- STRING = 6;
- TIME = 7;
-
- // Groupings
- TUPLE = 8;
- ARRAY = 9;
- MAP = 10;
-
- // Table types
- TABLE = 11;
-
- // Functions
- FUNCTION = 12; // last tag
- };
-
- // Some typical parameters
- required KIND Kind = 1;
- optional string Table = 2;
- optional int32 Param = 3;
-
- // Required, repeated and optional foreign fields.
- required GoTestField RequiredField = 4;
- repeated GoTestField RepeatedField = 5;
- optional GoTestField OptionalField = 6;
-
- // Required fields of all basic types
- required bool F_Bool_required = 10;
- required int32 F_Int32_required = 11;
- required int64 F_Int64_required = 12;
- required fixed32 F_Fixed32_required = 13;
- required fixed64 F_Fixed64_required = 14;
- required uint32 F_Uint32_required = 15;
- required uint64 F_Uint64_required = 16;
- required float F_Float_required = 17;
- required double F_Double_required = 18;
- required string F_String_required = 19;
- required bytes F_Bytes_required = 101;
- required sint32 F_Sint32_required = 102;
- required sint64 F_Sint64_required = 103;
-
- // Repeated fields of all basic types
- repeated bool F_Bool_repeated = 20;
- repeated int32 F_Int32_repeated = 21;
- repeated int64 F_Int64_repeated = 22;
- repeated fixed32 F_Fixed32_repeated = 23;
- repeated fixed64 F_Fixed64_repeated = 24;
- repeated uint32 F_Uint32_repeated = 25;
- repeated uint64 F_Uint64_repeated = 26;
- repeated float F_Float_repeated = 27;
- repeated double F_Double_repeated = 28;
- repeated string F_String_repeated = 29;
- repeated bytes F_Bytes_repeated = 201;
- repeated sint32 F_Sint32_repeated = 202;
- repeated sint64 F_Sint64_repeated = 203;
-
- // Optional fields of all basic types
- optional bool F_Bool_optional = 30;
- optional int32 F_Int32_optional = 31;
- optional int64 F_Int64_optional = 32;
- optional fixed32 F_Fixed32_optional = 33;
- optional fixed64 F_Fixed64_optional = 34;
- optional uint32 F_Uint32_optional = 35;
- optional uint64 F_Uint64_optional = 36;
- optional float F_Float_optional = 37;
- optional double F_Double_optional = 38;
- optional string F_String_optional = 39;
- optional bytes F_Bytes_optional = 301;
- optional sint32 F_Sint32_optional = 302;
- optional sint64 F_Sint64_optional = 303;
-
- // Default-valued fields of all basic types
- optional bool F_Bool_defaulted = 40 [default=true];
- optional int32 F_Int32_defaulted = 41 [default=32];
- optional int64 F_Int64_defaulted = 42 [default=64];
- optional fixed32 F_Fixed32_defaulted = 43 [default=320];
- optional fixed64 F_Fixed64_defaulted = 44 [default=640];
- optional uint32 F_Uint32_defaulted = 45 [default=3200];
- optional uint64 F_Uint64_defaulted = 46 [default=6400];
- optional float F_Float_defaulted = 47 [default=314159.];
- optional double F_Double_defaulted = 48 [default=271828.];
- optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"];
- optional bytes F_Bytes_defaulted = 401 [default="Bignose"];
- optional sint32 F_Sint32_defaulted = 402 [default = -32];
- optional sint64 F_Sint64_defaulted = 403 [default = -64];
-
- // Packed repeated fields (no string or bytes).
- repeated bool F_Bool_repeated_packed = 50 [packed=true];
- repeated int32 F_Int32_repeated_packed = 51 [packed=true];
- repeated int64 F_Int64_repeated_packed = 52 [packed=true];
- repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true];
- repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true];
- repeated uint32 F_Uint32_repeated_packed = 55 [packed=true];
- repeated uint64 F_Uint64_repeated_packed = 56 [packed=true];
- repeated float F_Float_repeated_packed = 57 [packed=true];
- repeated double F_Double_repeated_packed = 58 [packed=true];
- repeated sint32 F_Sint32_repeated_packed = 502 [packed=true];
- repeated sint64 F_Sint64_repeated_packed = 503 [packed=true];
-
- // Required, repeated, and optional groups.
- required group RequiredGroup = 70 {
- required string RequiredField = 71;
- };
-
- repeated group RepeatedGroup = 80 {
- required string RequiredField = 81;
- };
-
- optional group OptionalGroup = 90 {
- required string RequiredField = 91;
- };
-}
-
-// For testing a group containing a required field.
-message GoTestRequiredGroupField {
- required group Group = 1 {
- required int32 Field = 2;
- };
-}
-
-// For testing skipping of unrecognized fields.
-// Numbers are all big, larger than tag numbers in GoTestField,
-// the message used in the corresponding test.
-message GoSkipTest {
- required int32 skip_int32 = 11;
- required fixed32 skip_fixed32 = 12;
- required fixed64 skip_fixed64 = 13;
- required string skip_string = 14;
- required group SkipGroup = 15 {
- required int32 group_int32 = 16;
- required string group_string = 17;
- }
-}
-
-// For testing packed/non-packed decoder switching.
-// A serialized instance of one should be deserializable as the other.
-message NonPackedTest {
- repeated int32 a = 1;
-}
-
-message PackedTest {
- repeated int32 b = 1 [packed=true];
-}
-
-message MaxTag {
- // Maximum possible tag number.
- optional string last_field = 536870911;
-}
-
-message OldMessage {
- message Nested {
- optional string name = 1;
- }
- optional Nested nested = 1;
-
- optional int32 num = 2;
-}
-
-// NewMessage is wire compatible with OldMessage;
-// imagine it as a future version.
-message NewMessage {
- message Nested {
- optional string name = 1;
- optional string food_group = 2;
- }
- optional Nested nested = 1;
-
- // This is an int32 in OldMessage.
- optional int64 num = 2;
-}
-
-// Smaller tests for ASCII formatting.
-
-message InnerMessage {
- required string host = 1;
- optional int32 port = 2 [default=4000];
- optional bool connected = 3;
-}
-
-message OtherMessage {
- optional int64 key = 1;
- optional bytes value = 2;
- optional float weight = 3;
- optional InnerMessage inner = 4;
-
- extensions 100 to max;
-}
-
-message RequiredInnerMessage {
- required InnerMessage leo_finally_won_an_oscar = 1;
-}
-
-message MyMessage {
- required int32 count = 1;
- optional string name = 2;
- optional string quote = 3;
- repeated string pet = 4;
- optional InnerMessage inner = 5;
- repeated OtherMessage others = 6;
- optional RequiredInnerMessage we_must_go_deeper = 13;
- repeated InnerMessage rep_inner = 12;
-
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- };
- optional Color bikeshed = 7;
-
- optional group SomeGroup = 8 {
- optional int32 group_field = 9;
- }
-
- // This field becomes [][]byte in the generated code.
- repeated bytes rep_bytes = 10;
-
- optional double bigfloat = 11;
-
- extensions 100 to max;
-}
-
-message Ext {
- extend MyMessage {
- optional Ext more = 103;
- optional string text = 104;
- optional int32 number = 105;
- }
-
- optional string data = 1;
-}
-
-extend MyMessage {
- repeated string greeting = 106;
-}
-
-message ComplexExtension {
- optional int32 first = 1;
- optional int32 second = 2;
- repeated int32 third = 3;
-}
-
-extend OtherMessage {
- optional ComplexExtension complex = 200;
- repeated ComplexExtension r_complex = 201;
-}
-
-message DefaultsMessage {
- enum DefaultsEnum {
- ZERO = 0;
- ONE = 1;
- TWO = 2;
- };
- extensions 100 to max;
-}
-
-extend DefaultsMessage {
- optional double no_default_double = 101;
- optional float no_default_float = 102;
- optional int32 no_default_int32 = 103;
- optional int64 no_default_int64 = 104;
- optional uint32 no_default_uint32 = 105;
- optional uint64 no_default_uint64 = 106;
- optional sint32 no_default_sint32 = 107;
- optional sint64 no_default_sint64 = 108;
- optional fixed32 no_default_fixed32 = 109;
- optional fixed64 no_default_fixed64 = 110;
- optional sfixed32 no_default_sfixed32 = 111;
- optional sfixed64 no_default_sfixed64 = 112;
- optional bool no_default_bool = 113;
- optional string no_default_string = 114;
- optional bytes no_default_bytes = 115;
- optional DefaultsMessage.DefaultsEnum no_default_enum = 116;
-
- optional double default_double = 201 [default = 3.1415];
- optional float default_float = 202 [default = 3.14];
- optional int32 default_int32 = 203 [default = 42];
- optional int64 default_int64 = 204 [default = 43];
- optional uint32 default_uint32 = 205 [default = 44];
- optional uint64 default_uint64 = 206 [default = 45];
- optional sint32 default_sint32 = 207 [default = 46];
- optional sint64 default_sint64 = 208 [default = 47];
- optional fixed32 default_fixed32 = 209 [default = 48];
- optional fixed64 default_fixed64 = 210 [default = 49];
- optional sfixed32 default_sfixed32 = 211 [default = 50];
- optional sfixed64 default_sfixed64 = 212 [default = 51];
- optional bool default_bool = 213 [default = true];
- optional string default_string = 214 [default = "Hello, string"];
- optional bytes default_bytes = 215 [default = "Hello, bytes"];
- optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE];
-}
-
-message MyMessageSet {
- option message_set_wire_format = true;
- extensions 100 to max;
-}
-
-message Empty {
-}
-
-extend MyMessageSet {
- optional Empty x201 = 201;
- optional Empty x202 = 202;
- optional Empty x203 = 203;
- optional Empty x204 = 204;
- optional Empty x205 = 205;
- optional Empty x206 = 206;
- optional Empty x207 = 207;
- optional Empty x208 = 208;
- optional Empty x209 = 209;
- optional Empty x210 = 210;
- optional Empty x211 = 211;
- optional Empty x212 = 212;
- optional Empty x213 = 213;
- optional Empty x214 = 214;
- optional Empty x215 = 215;
- optional Empty x216 = 216;
- optional Empty x217 = 217;
- optional Empty x218 = 218;
- optional Empty x219 = 219;
- optional Empty x220 = 220;
- optional Empty x221 = 221;
- optional Empty x222 = 222;
- optional Empty x223 = 223;
- optional Empty x224 = 224;
- optional Empty x225 = 225;
- optional Empty x226 = 226;
- optional Empty x227 = 227;
- optional Empty x228 = 228;
- optional Empty x229 = 229;
- optional Empty x230 = 230;
- optional Empty x231 = 231;
- optional Empty x232 = 232;
- optional Empty x233 = 233;
- optional Empty x234 = 234;
- optional Empty x235 = 235;
- optional Empty x236 = 236;
- optional Empty x237 = 237;
- optional Empty x238 = 238;
- optional Empty x239 = 239;
- optional Empty x240 = 240;
- optional Empty x241 = 241;
- optional Empty x242 = 242;
- optional Empty x243 = 243;
- optional Empty x244 = 244;
- optional Empty x245 = 245;
- optional Empty x246 = 246;
- optional Empty x247 = 247;
- optional Empty x248 = 248;
- optional Empty x249 = 249;
- optional Empty x250 = 250;
-}
-
-message MessageList {
- repeated group Message = 1 {
- required string name = 2;
- required int32 count = 3;
- }
-}
-
-message Strings {
- optional string string_field = 1;
- optional bytes bytes_field = 2;
-}
-
-message Defaults {
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- }
-
- // Default-valued fields of all basic types.
- // Same as GoTest, but copied here to make testing easier.
- optional bool F_Bool = 1 [default=true];
- optional int32 F_Int32 = 2 [default=32];
- optional int64 F_Int64 = 3 [default=64];
- optional fixed32 F_Fixed32 = 4 [default=320];
- optional fixed64 F_Fixed64 = 5 [default=640];
- optional uint32 F_Uint32 = 6 [default=3200];
- optional uint64 F_Uint64 = 7 [default=6400];
- optional float F_Float = 8 [default=314159.];
- optional double F_Double = 9 [default=271828.];
- optional string F_String = 10 [default="hello, \"world!\"\n"];
- optional bytes F_Bytes = 11 [default="Bignose"];
- optional sint32 F_Sint32 = 12 [default=-32];
- optional sint64 F_Sint64 = 13 [default=-64];
- optional Color F_Enum = 14 [default=GREEN];
-
- // More fields with crazy defaults.
- optional float F_Pinf = 15 [default=inf];
- optional float F_Ninf = 16 [default=-inf];
- optional float F_Nan = 17 [default=nan];
-
- // Sub-message.
- optional SubDefaults sub = 18;
-
- // Redundant but explicit defaults.
- optional string str_zero = 19 [default=""];
-}
-
-message SubDefaults {
- optional int64 n = 1 [default=7];
-}
-
-message RepeatedEnum {
- enum Color {
- RED = 1;
- }
- repeated Color color = 1;
-}
-
-message MoreRepeated {
- repeated bool bools = 1;
- repeated bool bools_packed = 2 [packed=true];
- repeated int32 ints = 3;
- repeated int32 ints_packed = 4 [packed=true];
- repeated int64 int64s_packed = 7 [packed=true];
- repeated string strings = 5;
- repeated fixed32 fixeds = 6;
-}
-
-// GroupOld and GroupNew have the same wire format.
-// GroupNew has a new field inside a group.
-
-message GroupOld {
- optional group G = 101 {
- optional int32 x = 2;
- }
-}
-
-message GroupNew {
- optional group G = 101 {
- optional int32 x = 2;
- optional int32 y = 3;
- }
-}
-
-message FloatingPoint {
- required double f = 1;
- optional bool exact = 2;
-}
-
-message MessageWithMap {
- map<int32, string> name_mapping = 1;
- map<sint64, FloatingPoint> msg_mapping = 2;
- map<bool, bytes> byte_mapping = 3;
- map<string, string> str_to_str = 4;
-}
-
-message Oneof {
- oneof union {
- bool F_Bool = 1;
- int32 F_Int32 = 2;
- int64 F_Int64 = 3;
- fixed32 F_Fixed32 = 4;
- fixed64 F_Fixed64 = 5;
- uint32 F_Uint32 = 6;
- uint64 F_Uint64 = 7;
- float F_Float = 8;
- double F_Double = 9;
- string F_String = 10;
- bytes F_Bytes = 11;
- sint32 F_Sint32 = 12;
- sint64 F_Sint64 = 13;
- MyMessage.Color F_Enum = 14;
- GoTestField F_Message = 15;
- group F_Group = 16 {
- optional int32 x = 17;
- }
- int32 F_Largest_Tag = 536870911;
- }
-
- oneof tormato {
- int32 value = 100;
- }
-}
-
-message Communique {
- optional bool make_me_cry = 1;
-
- // This is a oneof, called "union".
- oneof union {
- int32 number = 5;
- string name = 6;
- bytes data = 7;
- double temp_c = 8;
- MyMessage.Color col = 9;
- Strings msg = 10;
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go
deleted file mode 100644
index 8f7cb4d27..000000000
--- a/vendor/github.com/golang/protobuf/proto/text_parser_test.go
+++ /dev/null
@@ -1,673 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "math"
- "reflect"
- "testing"
-
- . "github.com/golang/protobuf/proto"
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- . "github.com/golang/protobuf/proto/testdata"
-)
-
-type UnmarshalTextTest struct {
- in string
- err string // if "", no error expected
- out *MyMessage
-}
-
-func buildExtStructTest(text string) UnmarshalTextTest {
- msg := &MyMessage{
- Count: Int32(42),
- }
- SetExtension(msg, E_Ext_More, &Ext{
- Data: String("Hello, world!"),
- })
- return UnmarshalTextTest{in: text, out: msg}
-}
-
-func buildExtDataTest(text string) UnmarshalTextTest {
- msg := &MyMessage{
- Count: Int32(42),
- }
- SetExtension(msg, E_Ext_Text, String("Hello, world!"))
- SetExtension(msg, E_Ext_Number, Int32(1729))
- return UnmarshalTextTest{in: text, out: msg}
-}
-
-func buildExtRepStringTest(text string) UnmarshalTextTest {
- msg := &MyMessage{
- Count: Int32(42),
- }
- if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil {
- panic(err)
- }
- return UnmarshalTextTest{in: text, out: msg}
-}
-
-var unMarshalTextTests = []UnmarshalTextTest{
- // Basic
- {
- in: " count:42\n name:\"Dave\" ",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("Dave"),
- },
- },
-
- // Empty quoted string
- {
- in: `count:42 name:""`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String(""),
- },
- },
-
- // Quoted string concatenation with double quotes
- {
- in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String("My name is elsewhere"),
- },
- },
-
- // Quoted string concatenation with single quotes
- {
- in: "count:42 name: 'My name is '\n'elsewhere'",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("My name is elsewhere"),
- },
- },
-
- // Quoted string concatenations with mixed quotes
- {
- in: "count:42 name: 'My name is '\n\"elsewhere\"",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("My name is elsewhere"),
- },
- },
- {
- in: "count:42 name: \"My name is \"\n'elsewhere'",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("My name is elsewhere"),
- },
- },
-
- // Quoted string with escaped apostrophe
- {
- in: `count:42 name: "HOLIDAY - New Year\'s Day"`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String("HOLIDAY - New Year's Day"),
- },
- },
-
- // Quoted string with single quote
- {
- in: `count:42 name: 'Roger "The Ramster" Ramjet'`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String(`Roger "The Ramster" Ramjet`),
- },
- },
-
- // Quoted string with all the accepted special characters from the C++ test
- {
- in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"),
- },
- },
-
- // Quoted string with quoted backslash
- {
- in: `count:42 name: "\\'xyz"`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String(`\'xyz`),
- },
- },
-
- // Quoted string with UTF-8 bytes.
- {
- in: "count:42 name: '\303\277\302\201\xAB'",
- out: &MyMessage{
- Count: Int32(42),
- Name: String("\303\277\302\201\xAB"),
- },
- },
-
- // Bad quoted string
- {
- in: `inner: < host: "\0" >` + "\n",
- err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`,
- },
-
- // Number too large for int64
- {
- in: "count: 1 others { key: 123456789012345678901 }",
- err: "line 1.23: invalid int64: 123456789012345678901",
- },
-
- // Number too large for int32
- {
- in: "count: 1234567890123",
- err: "line 1.7: invalid int32: 1234567890123",
- },
-
- // Number in hexadecimal
- {
- in: "count: 0x2beef",
- out: &MyMessage{
- Count: Int32(0x2beef),
- },
- },
-
- // Number in octal
- {
- in: "count: 024601",
- out: &MyMessage{
- Count: Int32(024601),
- },
- },
-
- // Floating point number with "f" suffix
- {
- in: "count: 4 others:< weight: 17.0f >",
- out: &MyMessage{
- Count: Int32(4),
- Others: []*OtherMessage{
- {
- Weight: Float32(17),
- },
- },
- },
- },
-
- // Floating point positive infinity
- {
- in: "count: 4 bigfloat: inf",
- out: &MyMessage{
- Count: Int32(4),
- Bigfloat: Float64(math.Inf(1)),
- },
- },
-
- // Floating point negative infinity
- {
- in: "count: 4 bigfloat: -inf",
- out: &MyMessage{
- Count: Int32(4),
- Bigfloat: Float64(math.Inf(-1)),
- },
- },
-
- // Number too large for float32
- {
- in: "others:< weight: 12345678901234567890123456789012345678901234567890 >",
- err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890",
- },
-
- // Number posing as a quoted string
- {
- in: `inner: < host: 12 >` + "\n",
- err: `line 1.15: invalid string: 12`,
- },
-
- // Quoted string posing as int32
- {
- in: `count: "12"`,
- err: `line 1.7: invalid int32: "12"`,
- },
-
- // Quoted string posing a float32
- {
- in: `others:< weight: "17.4" >`,
- err: `line 1.17: invalid float32: "17.4"`,
- },
-
- // Enum
- {
- in: `count:42 bikeshed: BLUE`,
- out: &MyMessage{
- Count: Int32(42),
- Bikeshed: MyMessage_BLUE.Enum(),
- },
- },
-
- // Repeated field
- {
- in: `count:42 pet: "horsey" pet:"bunny"`,
- out: &MyMessage{
- Count: Int32(42),
- Pet: []string{"horsey", "bunny"},
- },
- },
-
- // Repeated field with list notation
- {
- in: `count:42 pet: ["horsey", "bunny"]`,
- out: &MyMessage{
- Count: Int32(42),
- Pet: []string{"horsey", "bunny"},
- },
- },
-
- // Repeated message with/without colon and <>/{}
- {
- in: `count:42 others:{} others{} others:<> others:{}`,
- out: &MyMessage{
- Count: Int32(42),
- Others: []*OtherMessage{
- {},
- {},
- {},
- {},
- },
- },
- },
-
- // Missing colon for inner message
- {
- in: `count:42 inner < host: "cauchy.syd" >`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("cauchy.syd"),
- },
- },
- },
-
- // Missing colon for string field
- {
- in: `name "Dave"`,
- err: `line 1.5: expected ':', found "\"Dave\""`,
- },
-
- // Missing colon for int32 field
- {
- in: `count 42`,
- err: `line 1.6: expected ':', found "42"`,
- },
-
- // Missing required field
- {
- in: `name: "Pawel"`,
- err: `proto: required field "testdata.MyMessage.count" not set`,
- out: &MyMessage{
- Name: String("Pawel"),
- },
- },
-
- // Missing required field in a required submessage
- {
- in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`,
- err: `proto: required field "testdata.InnerMessage.host" not set`,
- out: &MyMessage{
- Count: Int32(42),
- WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}},
- },
- },
-
- // Repeated non-repeated field
- {
- in: `name: "Rob" name: "Russ"`,
- err: `line 1.12: non-repeated field "name" was repeated`,
- },
-
- // Group
- {
- in: `count: 17 SomeGroup { group_field: 12 }`,
- out: &MyMessage{
- Count: Int32(17),
- Somegroup: &MyMessage_SomeGroup{
- GroupField: Int32(12),
- },
- },
- },
-
- // Semicolon between fields
- {
- in: `count:3;name:"Calvin"`,
- out: &MyMessage{
- Count: Int32(3),
- Name: String("Calvin"),
- },
- },
- // Comma between fields
- {
- in: `count:4,name:"Ezekiel"`,
- out: &MyMessage{
- Count: Int32(4),
- Name: String("Ezekiel"),
- },
- },
-
- // Boolean false
- {
- in: `count:42 inner { host: "example.com" connected: false }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(false),
- },
- },
- },
- // Boolean true
- {
- in: `count:42 inner { host: "example.com" connected: true }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(true),
- },
- },
- },
- // Boolean 0
- {
- in: `count:42 inner { host: "example.com" connected: 0 }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(false),
- },
- },
- },
- // Boolean 1
- {
- in: `count:42 inner { host: "example.com" connected: 1 }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(true),
- },
- },
- },
- // Boolean f
- {
- in: `count:42 inner { host: "example.com" connected: f }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(false),
- },
- },
- },
- // Boolean t
- {
- in: `count:42 inner { host: "example.com" connected: t }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(true),
- },
- },
- },
- // Boolean False
- {
- in: `count:42 inner { host: "example.com" connected: False }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(false),
- },
- },
- },
- // Boolean True
- {
- in: `count:42 inner { host: "example.com" connected: True }`,
- out: &MyMessage{
- Count: Int32(42),
- Inner: &InnerMessage{
- Host: String("example.com"),
- Connected: Bool(true),
- },
- },
- },
-
- // Extension
- buildExtStructTest(`count: 42 [testdata.Ext.more]:<data:"Hello, world!" >`),
- buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`),
- buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`),
- buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`),
-
- // Big all-in-one
- {
- in: "count:42 # Meaning\n" +
- `name:"Dave" ` +
- `quote:"\"I didn't want to go.\"" ` +
- `pet:"bunny" ` +
- `pet:"kitty" ` +
- `pet:"horsey" ` +
- `inner:<` +
- ` host:"footrest.syd" ` +
- ` port:7001 ` +
- ` connected:true ` +
- `> ` +
- `others:<` +
- ` key:3735928559 ` +
- ` value:"\x01A\a\f" ` +
- `> ` +
- `others:<` +
- " weight:58.9 # Atomic weight of Co\n" +
- ` inner:<` +
- ` host:"lesha.mtv" ` +
- ` port:8002 ` +
- ` >` +
- `>`,
- out: &MyMessage{
- Count: Int32(42),
- Name: String("Dave"),
- Quote: String(`"I didn't want to go."`),
- Pet: []string{"bunny", "kitty", "horsey"},
- Inner: &InnerMessage{
- Host: String("footrest.syd"),
- Port: Int32(7001),
- Connected: Bool(true),
- },
- Others: []*OtherMessage{
- {
- Key: Int64(3735928559),
- Value: []byte{0x1, 'A', '\a', '\f'},
- },
- {
- Weight: Float32(58.9),
- Inner: &InnerMessage{
- Host: String("lesha.mtv"),
- Port: Int32(8002),
- },
- },
- },
- },
- },
-}
-
-func TestUnmarshalText(t *testing.T) {
- for i, test := range unMarshalTextTests {
- pb := new(MyMessage)
- err := UnmarshalText(test.in, pb)
- if test.err == "" {
- // We don't expect failure.
- if err != nil {
- t.Errorf("Test %d: Unexpected error: %v", i, err)
- } else if !reflect.DeepEqual(pb, test.out) {
- t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v",
- i, pb, test.out)
- }
- } else {
- // We do expect failure.
- if err == nil {
- t.Errorf("Test %d: Didn't get expected error: %v", i, test.err)
- } else if err.Error() != test.err {
- t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v",
- i, err.Error(), test.err)
- } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) {
- t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v",
- i, pb, test.out)
- }
- }
- }
-}
-
-func TestUnmarshalTextCustomMessage(t *testing.T) {
- msg := &textMessage{}
- if err := UnmarshalText("custom", msg); err != nil {
- t.Errorf("Unexpected error from custom unmarshal: %v", err)
- }
- if UnmarshalText("not custom", msg) == nil {
- t.Errorf("Didn't get expected error from custom unmarshal")
- }
-}
-
-// Regression test; this caused a panic.
-func TestRepeatedEnum(t *testing.T) {
- pb := new(RepeatedEnum)
- if err := UnmarshalText("color: RED", pb); err != nil {
- t.Fatal(err)
- }
- exp := &RepeatedEnum{
- Color: []RepeatedEnum_Color{RepeatedEnum_RED},
- }
- if !Equal(pb, exp) {
- t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp)
- }
-}
-
-func TestProto3TextParsing(t *testing.T) {
- m := new(proto3pb.Message)
- const in = `name: "Wallace" true_scotsman: true`
- want := &proto3pb.Message{
- Name: "Wallace",
- TrueScotsman: true,
- }
- if err := UnmarshalText(in, m); err != nil {
- t.Fatal(err)
- }
- if !Equal(m, want) {
- t.Errorf("\n got %v\nwant %v", m, want)
- }
-}
-
-func TestMapParsing(t *testing.T) {
- m := new(MessageWithMap)
- const in = `name_mapping:<key:1234 value:"Feist"> name_mapping:<key:1 value:"Beatles">` +
- `msg_mapping:<key:-4, value:<f: 2.0>,>` + // separating commas are okay
- `msg_mapping<key:-2 value<f: 4.0>>` + // no colon after "value"
- `msg_mapping:<value:<f: 5.0>>` + // omitted key
- `msg_mapping:<key:1>` + // omitted value
- `byte_mapping:<key:true value:"so be it">` +
- `byte_mapping:<>` // omitted key and value
- want := &MessageWithMap{
- NameMapping: map[int32]string{
- 1: "Beatles",
- 1234: "Feist",
- },
- MsgMapping: map[int64]*FloatingPoint{
- -4: {F: Float64(2.0)},
- -2: {F: Float64(4.0)},
- 0: {F: Float64(5.0)},
- 1: nil,
- },
- ByteMapping: map[bool][]byte{
- false: nil,
- true: []byte("so be it"),
- },
- }
- if err := UnmarshalText(in, m); err != nil {
- t.Fatal(err)
- }
- if !Equal(m, want) {
- t.Errorf("\n got %v\nwant %v", m, want)
- }
-}
-
-func TestOneofParsing(t *testing.T) {
- const in = `name:"Shrek"`
- m := new(Communique)
- want := &Communique{Union: &Communique_Name{"Shrek"}}
- if err := UnmarshalText(in, m); err != nil {
- t.Fatal(err)
- }
- if !Equal(m, want) {
- t.Errorf("\n got %v\nwant %v", m, want)
- }
-
- const inOverwrite = `name:"Shrek" number:42`
- m = new(Communique)
- testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'"
- if err := UnmarshalText(inOverwrite, m); err == nil {
- t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr)
- } else if err.Error() != testErr {
- t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v",
- err.Error(), testErr)
- }
-
-}
-
-var benchInput string
-
-func init() {
- benchInput = "count: 4\n"
- for i := 0; i < 1000; i++ {
- benchInput += "pet: \"fido\"\n"
- }
-
- // Check it is valid input.
- pb := new(MyMessage)
- err := UnmarshalText(benchInput, pb)
- if err != nil {
- panic("Bad benchmark input: " + err.Error())
- }
-}
-
-func BenchmarkUnmarshalText(b *testing.B) {
- pb := new(MyMessage)
- for i := 0; i < b.N; i++ {
- UnmarshalText(benchInput, pb)
- }
- b.SetBytes(int64(len(benchInput)))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go
deleted file mode 100644
index 3eabacac8..000000000
--- a/vendor/github.com/golang/protobuf/proto/text_test.go
+++ /dev/null
@@ -1,474 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package proto_test
-
-import (
- "bytes"
- "errors"
- "io/ioutil"
- "math"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- proto3pb "github.com/golang/protobuf/proto/proto3_proto"
- pb "github.com/golang/protobuf/proto/testdata"
-)
-
-// textMessage implements the methods that allow it to marshal and unmarshal
-// itself as text.
-type textMessage struct {
-}
-
-func (*textMessage) MarshalText() ([]byte, error) {
- return []byte("custom"), nil
-}
-
-func (*textMessage) UnmarshalText(bytes []byte) error {
- if string(bytes) != "custom" {
- return errors.New("expected 'custom'")
- }
- return nil
-}
-
-func (*textMessage) Reset() {}
-func (*textMessage) String() string { return "" }
-func (*textMessage) ProtoMessage() {}
-
-func newTestMessage() *pb.MyMessage {
- msg := &pb.MyMessage{
- Count: proto.Int32(42),
- Name: proto.String("Dave"),
- Quote: proto.String(`"I didn't want to go."`),
- Pet: []string{"bunny", "kitty", "horsey"},
- Inner: &pb.InnerMessage{
- Host: proto.String("footrest.syd"),
- Port: proto.Int32(7001),
- Connected: proto.Bool(true),
- },
- Others: []*pb.OtherMessage{
- {
- Key: proto.Int64(0xdeadbeef),
- Value: []byte{1, 65, 7, 12},
- },
- {
- Weight: proto.Float32(6.022),
- Inner: &pb.InnerMessage{
- Host: proto.String("lesha.mtv"),
- Port: proto.Int32(8002),
- },
- },
- },
- Bikeshed: pb.MyMessage_BLUE.Enum(),
- Somegroup: &pb.MyMessage_SomeGroup{
- GroupField: proto.Int32(8),
- },
- // One normally wouldn't do this.
- // This is an undeclared tag 13, as a varint (wire type 0) with value 4.
- XXX_unrecognized: []byte{13<<3 | 0, 4},
- }
- ext := &pb.Ext{
- Data: proto.String("Big gobs for big rats"),
- }
- if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil {
- panic(err)
- }
- greetings := []string{"adg", "easy", "cow"}
- if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil {
- panic(err)
- }
-
- // Add an unknown extension. We marshal a pb.Ext, and fake the ID.
- b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")})
- if err != nil {
- panic(err)
- }
- b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...)
- proto.SetRawExtension(msg, 201, b)
-
- // Extensions can be plain fields, too, so let's test that.
- b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19)
- proto.SetRawExtension(msg, 202, b)
-
- return msg
-}
-
-const text = `count: 42
-name: "Dave"
-quote: "\"I didn't want to go.\""
-pet: "bunny"
-pet: "kitty"
-pet: "horsey"
-inner: <
- host: "footrest.syd"
- port: 7001
- connected: true
->
-others: <
- key: 3735928559
- value: "\001A\007\014"
->
-others: <
- weight: 6.022
- inner: <
- host: "lesha.mtv"
- port: 8002
- >
->
-bikeshed: BLUE
-SomeGroup {
- group_field: 8
-}
-/* 2 unknown bytes */
-13: 4
-[testdata.Ext.more]: <
- data: "Big gobs for big rats"
->
-[testdata.greeting]: "adg"
-[testdata.greeting]: "easy"
-[testdata.greeting]: "cow"
-/* 13 unknown bytes */
-201: "\t3G skiing"
-/* 3 unknown bytes */
-202: 19
-`
-
-func TestMarshalText(t *testing.T) {
- buf := new(bytes.Buffer)
- if err := proto.MarshalText(buf, newTestMessage()); err != nil {
- t.Fatalf("proto.MarshalText: %v", err)
- }
- s := buf.String()
- if s != text {
- t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text)
- }
-}
-
-func TestMarshalTextCustomMessage(t *testing.T) {
- buf := new(bytes.Buffer)
- if err := proto.MarshalText(buf, &textMessage{}); err != nil {
- t.Fatalf("proto.MarshalText: %v", err)
- }
- s := buf.String()
- if s != "custom" {
- t.Errorf("Got %q, expected %q", s, "custom")
- }
-}
-func TestMarshalTextNil(t *testing.T) {
- want := "<nil>"
- tests := []proto.Message{nil, (*pb.MyMessage)(nil)}
- for i, test := range tests {
- buf := new(bytes.Buffer)
- if err := proto.MarshalText(buf, test); err != nil {
- t.Fatal(err)
- }
- if got := buf.String(); got != want {
- t.Errorf("%d: got %q want %q", i, got, want)
- }
- }
-}
-
-func TestMarshalTextUnknownEnum(t *testing.T) {
- // The Color enum only specifies values 0-2.
- m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()}
- got := m.String()
- const want = `bikeshed:3 `
- if got != want {
- t.Errorf("\n got %q\nwant %q", got, want)
- }
-}
-
-func TestTextOneof(t *testing.T) {
- tests := []struct {
- m proto.Message
- want string
- }{
- // zero message
- {&pb.Communique{}, ``},
- // scalar field
- {&pb.Communique{Union: &pb.Communique_Number{4}}, `number:4`},
- // message field
- {&pb.Communique{Union: &pb.Communique_Msg{
- &pb.Strings{StringField: proto.String("why hello!")},
- }}, `msg:<string_field:"why hello!" >`},
- // bad oneof (should not panic)
- {&pb.Communique{Union: &pb.Communique_Msg{nil}}, `msg:/* nil */`},
- }
- for _, test := range tests {
- got := strings.TrimSpace(test.m.String())
- if got != test.want {
- t.Errorf("\n got %s\nwant %s", got, test.want)
- }
- }
-}
-
-func BenchmarkMarshalTextBuffered(b *testing.B) {
- buf := new(bytes.Buffer)
- m := newTestMessage()
- for i := 0; i < b.N; i++ {
- buf.Reset()
- proto.MarshalText(buf, m)
- }
-}
-
-func BenchmarkMarshalTextUnbuffered(b *testing.B) {
- w := ioutil.Discard
- m := newTestMessage()
- for i := 0; i < b.N; i++ {
- proto.MarshalText(w, m)
- }
-}
-
-func compact(src string) string {
- // s/[ \n]+/ /g; s/ $//;
- dst := make([]byte, len(src))
- space, comment := false, false
- j := 0
- for i := 0; i < len(src); i++ {
- if strings.HasPrefix(src[i:], "/*") {
- comment = true
- i++
- continue
- }
- if comment && strings.HasPrefix(src[i:], "*/") {
- comment = false
- i++
- continue
- }
- if comment {
- continue
- }
- c := src[i]
- if c == ' ' || c == '\n' {
- space = true
- continue
- }
- if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') {
- space = false
- }
- if c == '{' {
- space = false
- }
- if space {
- dst[j] = ' '
- j++
- space = false
- }
- dst[j] = c
- j++
- }
- if space {
- dst[j] = ' '
- j++
- }
- return string(dst[0:j])
-}
-
-var compactText = compact(text)
-
-func TestCompactText(t *testing.T) {
- s := proto.CompactTextString(newTestMessage())
- if s != compactText {
- t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText)
- }
-}
-
-func TestStringEscaping(t *testing.T) {
- testCases := []struct {
- in *pb.Strings
- out string
- }{
- {
- // Test data from C++ test (TextFormatTest.StringEscape).
- // Single divergence: we don't escape apostrophes.
- &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")},
- "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n",
- },
- {
- // Test data from the same C++ test.
- &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")},
- "string_field: \"\\350\\260\\267\\346\\255\\214\"\n",
- },
- {
- // Some UTF-8.
- &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")},
- `string_field: "\000\001\377\201"` + "\n",
- },
- }
-
- for i, tc := range testCases {
- var buf bytes.Buffer
- if err := proto.MarshalText(&buf, tc.in); err != nil {
- t.Errorf("proto.MarsalText: %v", err)
- continue
- }
- s := buf.String()
- if s != tc.out {
- t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out)
- continue
- }
-
- // Check round-trip.
- pb := new(pb.Strings)
- if err := proto.UnmarshalText(s, pb); err != nil {
- t.Errorf("#%d: UnmarshalText: %v", i, err)
- continue
- }
- if !proto.Equal(pb, tc.in) {
- t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb)
- }
- }
-}
-
-// A limitedWriter accepts some output before it fails.
-// This is a proxy for something like a nearly-full or imminently-failing disk,
-// or a network connection that is about to die.
-type limitedWriter struct {
- b bytes.Buffer
- limit int
-}
-
-var outOfSpace = errors.New("proto: insufficient space")
-
-func (w *limitedWriter) Write(p []byte) (n int, err error) {
- var avail = w.limit - w.b.Len()
- if avail <= 0 {
- return 0, outOfSpace
- }
- if len(p) <= avail {
- return w.b.Write(p)
- }
- n, _ = w.b.Write(p[:avail])
- return n, outOfSpace
-}
-
-func TestMarshalTextFailing(t *testing.T) {
- // Try lots of different sizes to exercise more error code-paths.
- for lim := 0; lim < len(text); lim++ {
- buf := new(limitedWriter)
- buf.limit = lim
- err := proto.MarshalText(buf, newTestMessage())
- // We expect a certain error, but also some partial results in the buffer.
- if err != outOfSpace {
- t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace)
- }
- s := buf.b.String()
- x := text[:buf.limit]
- if s != x {
- t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x)
- }
- }
-}
-
-func TestFloats(t *testing.T) {
- tests := []struct {
- f float64
- want string
- }{
- {0, "0"},
- {4.7, "4.7"},
- {math.Inf(1), "inf"},
- {math.Inf(-1), "-inf"},
- {math.NaN(), "nan"},
- }
- for _, test := range tests {
- msg := &pb.FloatingPoint{F: &test.f}
- got := strings.TrimSpace(msg.String())
- want := `f:` + test.want
- if got != want {
- t.Errorf("f=%f: got %q, want %q", test.f, got, want)
- }
- }
-}
-
-func TestRepeatedNilText(t *testing.T) {
- m := &pb.MessageList{
- Message: []*pb.MessageList_Message{
- nil,
- &pb.MessageList_Message{
- Name: proto.String("Horse"),
- },
- nil,
- },
- }
- want := `Message <nil>
-Message {
- name: "Horse"
-}
-Message <nil>
-`
- if s := proto.MarshalTextString(m); s != want {
- t.Errorf(" got: %s\nwant: %s", s, want)
- }
-}
-
-func TestProto3Text(t *testing.T) {
- tests := []struct {
- m proto.Message
- want string
- }{
- // zero message
- {&proto3pb.Message{}, ``},
- // zero message except for an empty byte slice
- {&proto3pb.Message{Data: []byte{}}, ``},
- // trivial case
- {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`},
- // empty map
- {&pb.MessageWithMap{}, ``},
- // non-empty map; map format is the same as a repeated struct,
- // and they are sorted by key (numerically for numeric keys).
- {
- &pb.MessageWithMap{NameMapping: map[int32]string{
- -1: "Negatory",
- 7: "Lucky",
- 1234: "Feist",
- 6345789: "Otis",
- }},
- `name_mapping:<key:-1 value:"Negatory" > ` +
- `name_mapping:<key:7 value:"Lucky" > ` +
- `name_mapping:<key:1234 value:"Feist" > ` +
- `name_mapping:<key:6345789 value:"Otis" >`,
- },
- // map with nil value; not well-defined, but we shouldn't crash
- {
- &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}},
- `msg_mapping:<key:7 >`,
- },
- }
- for _, test := range tests {
- got := strings.TrimSpace(test.m.String())
- if got != test.want {
- t.Errorf("\n got %s\nwant %s", got, test.want)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile
deleted file mode 100644
index a42cc3717..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-test:
- cd testdata && make test
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile
deleted file mode 100644
index f706871a6..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/
-# at src/google/protobuf/descriptor.proto
-regenerate:
- @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION
- cp $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto .
- protoc --go_out=../../../../.. -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
deleted file mode 100644
index c6a91bcab..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
+++ /dev/null
@@ -1,2215 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/descriptor.proto
-
-/*
-Package descriptor is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/descriptor.proto
-
-It has these top-level messages:
- FileDescriptorSet
- FileDescriptorProto
- DescriptorProto
- ExtensionRangeOptions
- FieldDescriptorProto
- OneofDescriptorProto
- EnumDescriptorProto
- EnumValueDescriptorProto
- ServiceDescriptorProto
- MethodDescriptorProto
- FileOptions
- MessageOptions
- FieldOptions
- OneofOptions
- EnumOptions
- EnumValueOptions
- ServiceOptions
- MethodOptions
- UninterpretedOption
- SourceCodeInfo
- GeneratedCodeInfo
-*/
-package descriptor
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type FieldDescriptorProto_Type int32
-
-const (
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1
- FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3
- FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5
- FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6
- FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7
- FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8
- FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10
- FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11
- // New in version 2.
- FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12
- FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13
- FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14
- FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15
- FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16
- FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17
- FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18
-)
-
-var FieldDescriptorProto_Type_name = map[int32]string{
- 1: "TYPE_DOUBLE",
- 2: "TYPE_FLOAT",
- 3: "TYPE_INT64",
- 4: "TYPE_UINT64",
- 5: "TYPE_INT32",
- 6: "TYPE_FIXED64",
- 7: "TYPE_FIXED32",
- 8: "TYPE_BOOL",
- 9: "TYPE_STRING",
- 10: "TYPE_GROUP",
- 11: "TYPE_MESSAGE",
- 12: "TYPE_BYTES",
- 13: "TYPE_UINT32",
- 14: "TYPE_ENUM",
- 15: "TYPE_SFIXED32",
- 16: "TYPE_SFIXED64",
- 17: "TYPE_SINT32",
- 18: "TYPE_SINT64",
-}
-var FieldDescriptorProto_Type_value = map[string]int32{
- "TYPE_DOUBLE": 1,
- "TYPE_FLOAT": 2,
- "TYPE_INT64": 3,
- "TYPE_UINT64": 4,
- "TYPE_INT32": 5,
- "TYPE_FIXED64": 6,
- "TYPE_FIXED32": 7,
- "TYPE_BOOL": 8,
- "TYPE_STRING": 9,
- "TYPE_GROUP": 10,
- "TYPE_MESSAGE": 11,
- "TYPE_BYTES": 12,
- "TYPE_UINT32": 13,
- "TYPE_ENUM": 14,
- "TYPE_SFIXED32": 15,
- "TYPE_SFIXED64": 16,
- "TYPE_SINT32": 17,
- "TYPE_SINT64": 18,
-}
-
-func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type {
- p := new(FieldDescriptorProto_Type)
- *p = x
- return p
-}
-func (x FieldDescriptorProto_Type) String() string {
- return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
-}
-func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type")
- if err != nil {
- return err
- }
- *x = FieldDescriptorProto_Type(value)
- return nil
-}
-func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
-
-type FieldDescriptorProto_Label int32
-
-const (
- // 0 is reserved for errors
- FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1
- FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2
- FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3
-)
-
-var FieldDescriptorProto_Label_name = map[int32]string{
- 1: "LABEL_OPTIONAL",
- 2: "LABEL_REQUIRED",
- 3: "LABEL_REPEATED",
-}
-var FieldDescriptorProto_Label_value = map[string]int32{
- "LABEL_OPTIONAL": 1,
- "LABEL_REQUIRED": 2,
- "LABEL_REPEATED": 3,
-}
-
-func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label {
- p := new(FieldDescriptorProto_Label)
- *p = x
- return p
-}
-func (x FieldDescriptorProto_Label) String() string {
- return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
-}
-func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
- if err != nil {
- return err
- }
- *x = FieldDescriptorProto_Label(value)
- return nil
-}
-func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{4, 1}
-}
-
-// Generated classes can be optimized for speed or code size.
-type FileOptions_OptimizeMode int32
-
-const (
- FileOptions_SPEED FileOptions_OptimizeMode = 1
- // etc.
- FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2
- FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3
-)
-
-var FileOptions_OptimizeMode_name = map[int32]string{
- 1: "SPEED",
- 2: "CODE_SIZE",
- 3: "LITE_RUNTIME",
-}
-var FileOptions_OptimizeMode_value = map[string]int32{
- "SPEED": 1,
- "CODE_SIZE": 2,
- "LITE_RUNTIME": 3,
-}
-
-func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode {
- p := new(FileOptions_OptimizeMode)
- *p = x
- return p
-}
-func (x FileOptions_OptimizeMode) String() string {
- return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
-}
-func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
- if err != nil {
- return err
- }
- *x = FileOptions_OptimizeMode(value)
- return nil
-}
-func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{10, 0} }
-
-type FieldOptions_CType int32
-
-const (
- // Default mode.
- FieldOptions_STRING FieldOptions_CType = 0
- FieldOptions_CORD FieldOptions_CType = 1
- FieldOptions_STRING_PIECE FieldOptions_CType = 2
-)
-
-var FieldOptions_CType_name = map[int32]string{
- 0: "STRING",
- 1: "CORD",
- 2: "STRING_PIECE",
-}
-var FieldOptions_CType_value = map[string]int32{
- "STRING": 0,
- "CORD": 1,
- "STRING_PIECE": 2,
-}
-
-func (x FieldOptions_CType) Enum() *FieldOptions_CType {
- p := new(FieldOptions_CType)
- *p = x
- return p
-}
-func (x FieldOptions_CType) String() string {
- return proto.EnumName(FieldOptions_CType_name, int32(x))
-}
-func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
- if err != nil {
- return err
- }
- *x = FieldOptions_CType(value)
- return nil
-}
-func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} }
-
-type FieldOptions_JSType int32
-
-const (
- // Use the default type.
- FieldOptions_JS_NORMAL FieldOptions_JSType = 0
- // Use JavaScript strings.
- FieldOptions_JS_STRING FieldOptions_JSType = 1
- // Use JavaScript numbers.
- FieldOptions_JS_NUMBER FieldOptions_JSType = 2
-)
-
-var FieldOptions_JSType_name = map[int32]string{
- 0: "JS_NORMAL",
- 1: "JS_STRING",
- 2: "JS_NUMBER",
-}
-var FieldOptions_JSType_value = map[string]int32{
- "JS_NORMAL": 0,
- "JS_STRING": 1,
- "JS_NUMBER": 2,
-}
-
-func (x FieldOptions_JSType) Enum() *FieldOptions_JSType {
- p := new(FieldOptions_JSType)
- *p = x
- return p
-}
-func (x FieldOptions_JSType) String() string {
- return proto.EnumName(FieldOptions_JSType_name, int32(x))
-}
-func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType")
- if err != nil {
- return err
- }
- *x = FieldOptions_JSType(value)
- return nil
-}
-func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 1} }
-
-// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
-// or neither? HTTP based RPC implementation may choose GET verb for safe
-// methods, and PUT verb for idempotent methods instead of the default POST.
-type MethodOptions_IdempotencyLevel int32
-
-const (
- MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0
- MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1
- MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2
-)
-
-var MethodOptions_IdempotencyLevel_name = map[int32]string{
- 0: "IDEMPOTENCY_UNKNOWN",
- 1: "NO_SIDE_EFFECTS",
- 2: "IDEMPOTENT",
-}
-var MethodOptions_IdempotencyLevel_value = map[string]int32{
- "IDEMPOTENCY_UNKNOWN": 0,
- "NO_SIDE_EFFECTS": 1,
- "IDEMPOTENT": 2,
-}
-
-func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel {
- p := new(MethodOptions_IdempotencyLevel)
- *p = x
- return p
-}
-func (x MethodOptions_IdempotencyLevel) String() string {
- return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x))
-}
-func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel")
- if err != nil {
- return err
- }
- *x = MethodOptions_IdempotencyLevel(value)
- return nil
-}
-func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{17, 0}
-}
-
-// The protocol compiler can output a FileDescriptorSet containing the .proto
-// files it parses.
-type FileDescriptorSet struct {
- File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} }
-func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorSet) ProtoMessage() {}
-func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto {
- if m != nil {
- return m.File
- }
- return nil
-}
-
-// Describes a complete .proto file.
-type FileDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"`
- // Names of files imported by this file.
- Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"`
- // Indexes of the public imported files in the dependency list above.
- PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"`
- // Indexes of the weak imported files in the dependency list.
- // For Google-internal migration only. Do not use.
- WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"`
- // All top-level definitions in this file.
- MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"`
- EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
- Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"`
- Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"`
- Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
- // This field contains optional information about the original source code.
- // You may safely remove this entire field without harming runtime
- // functionality of the descriptors -- the information is needed only by
- // development tools.
- SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
- // The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
- Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} }
-func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorProto) ProtoMessage() {}
-func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *FileDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *FileDescriptorProto) GetPackage() string {
- if m != nil && m.Package != nil {
- return *m.Package
- }
- return ""
-}
-
-func (m *FileDescriptorProto) GetDependency() []string {
- if m != nil {
- return m.Dependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetPublicDependency() []int32 {
- if m != nil {
- return m.PublicDependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetWeakDependency() []int32 {
- if m != nil {
- return m.WeakDependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto {
- if m != nil {
- return m.MessageType
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto {
- if m != nil {
- return m.Service
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetOptions() *FileOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo {
- if m != nil {
- return m.SourceCodeInfo
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetSyntax() string {
- if m != nil && m.Syntax != nil {
- return *m.Syntax
- }
- return ""
-}
-
-// Describes a message type.
-type DescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"`
- Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"`
- NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"`
- EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
- ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"`
- OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"`
- Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"`
- ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
- // Reserved field names, which may not be used by fields in the same message.
- // A given name may only be reserved once.
- ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto) Reset() { *m = DescriptorProto{} }
-func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto) ProtoMessage() {}
-func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *DescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *DescriptorProto) GetField() []*FieldDescriptorProto {
- if m != nil {
- return m.Field
- }
- return nil
-}
-
-func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
- }
- return nil
-}
-
-func (m *DescriptorProto) GetNestedType() []*DescriptorProto {
- if m != nil {
- return m.NestedType
- }
- return nil
-}
-
-func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
- }
- return nil
-}
-
-func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange {
- if m != nil {
- return m.ExtensionRange
- }
- return nil
-}
-
-func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto {
- if m != nil {
- return m.OneofDecl
- }
- return nil
-}
-
-func (m *DescriptorProto) GetOptions() *MessageOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange {
- if m != nil {
- return m.ReservedRange
- }
- return nil
-}
-
-func (m *DescriptorProto) GetReservedName() []string {
- if m != nil {
- return m.ReservedName
- }
- return nil
-}
-
-type DescriptorProto_ExtensionRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} }
-func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
-func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{2, 0}
-}
-
-func (m *DescriptorProto_ExtensionRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
- }
- return 0
-}
-
-func (m *DescriptorProto_ExtensionRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Range of reserved tag numbers. Reserved tag numbers may not be used by
-// fields or extension ranges in the same message. Reserved ranges may
-// not overlap.
-type DescriptorProto_ReservedRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} }
-func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto_ReservedRange) ProtoMessage() {}
-func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{2, 1}
-}
-
-func (m *DescriptorProto_ReservedRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
- }
- return 0
-}
-
-func (m *DescriptorProto_ReservedRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-type ExtensionRangeOptions struct {
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} }
-func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
-func (*ExtensionRangeOptions) ProtoMessage() {}
-func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-var extRange_ExtensionRangeOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ExtensionRangeOptions
-}
-
-func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-// Describes a field within a message.
-type FieldDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"`
- Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"`
- // If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"`
- // For message and enum types, this is the name of the type. If the name
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- // rules are used to find the type (i.e. first the nested types within this
- // message are searched, then within the parent, on up to the root
- // namespace).
- TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
- // For extensions, this is the name of the type being extended. It is
- // resolved in the same manner as type_name.
- Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"`
- // For numeric types, contains the original text representation of the value.
- // For booleans, "true" or "false".
- // For strings, contains the default text contents (not escaped in any way).
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
- DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"`
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof.
- OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"`
- // JSON name of this field. The value is set by protocol compiler. If the
- // user has set a "json_name" option on this field, that option's value
- // will be used. Otherwise, it's deduced from the field's name by converting
- // it to camelCase.
- JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
- Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} }
-func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FieldDescriptorProto) ProtoMessage() {}
-func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *FieldDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
- }
- return 0
-}
-
-func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return FieldDescriptorProto_LABEL_OPTIONAL
-}
-
-func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return FieldDescriptorProto_TYPE_DOUBLE
-}
-
-func (m *FieldDescriptorProto) GetTypeName() string {
- if m != nil && m.TypeName != nil {
- return *m.TypeName
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetExtendee() string {
- if m != nil && m.Extendee != nil {
- return *m.Extendee
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetDefaultValue() string {
- if m != nil && m.DefaultValue != nil {
- return *m.DefaultValue
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetOneofIndex() int32 {
- if m != nil && m.OneofIndex != nil {
- return *m.OneofIndex
- }
- return 0
-}
-
-func (m *FieldDescriptorProto) GetJsonName() string {
- if m != nil && m.JsonName != nil {
- return *m.JsonName
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetOptions() *FieldOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a oneof.
-type OneofDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} }
-func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*OneofDescriptorProto) ProtoMessage() {}
-func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-
-func (m *OneofDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *OneofDescriptorProto) GetOptions() *OneofOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes an enum type.
-type EnumDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
- Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} }
-func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*EnumDescriptorProto) ProtoMessage() {}
-func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-
-func (m *EnumDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *EnumDescriptorProto) GetOptions() *EnumOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a value within an enum.
-type EnumValueDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
- Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} }
-func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*EnumValueDescriptorProto) ProtoMessage() {}
-func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-
-func (m *EnumValueDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *EnumValueDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
- }
- return 0
-}
-
-func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a service.
-type ServiceDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
- Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} }
-func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*ServiceDescriptorProto) ProtoMessage() {}
-func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-
-func (m *ServiceDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto {
- if m != nil {
- return m.Method
- }
- return nil
-}
-
-func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a method of a service.
-type MethodDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Input and output type names. These are resolved in the same way as
- // FieldDescriptorProto.type_name, but must refer to a message type.
- InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"`
- OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"`
- Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"`
- // Identifies if client streams multiple client messages
- ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"`
- // Identifies if server streams multiple server messages
- ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} }
-func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*MethodDescriptorProto) ProtoMessage() {}
-func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
-
-const Default_MethodDescriptorProto_ClientStreaming bool = false
-const Default_MethodDescriptorProto_ServerStreaming bool = false
-
-func (m *MethodDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetInputType() string {
- if m != nil && m.InputType != nil {
- return *m.InputType
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetOutputType() string {
- if m != nil && m.OutputType != nil {
- return *m.OutputType
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetOptions() *MethodOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *MethodDescriptorProto) GetClientStreaming() bool {
- if m != nil && m.ClientStreaming != nil {
- return *m.ClientStreaming
- }
- return Default_MethodDescriptorProto_ClientStreaming
-}
-
-func (m *MethodDescriptorProto) GetServerStreaming() bool {
- if m != nil && m.ServerStreaming != nil {
- return *m.ServerStreaming
- }
- return Default_MethodDescriptorProto_ServerStreaming
-}
-
-type FileOptions struct {
- // Sets the Java package where classes generated from this .proto will be
- // placed. By default, the proto package is used, but this is often
- // inappropriate because proto packages do not normally start with backwards
- // domain names.
- JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"`
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
- JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"`
- // If set true, then the Java code generator will generate a separate .java
- // file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
- // generated to contain the file's getDescriptor() method as well as any
- // top-level extensions defined in the file.
- JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
- // This option does nothing.
- JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"`
- OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"`
- // Sets the Go package where structs generated from this .proto will be
- // placed. If omitted, the Go package will be derived from the following:
- // - The basename of the package import path, if provided.
- // - Otherwise, the package statement in the .proto file, if present.
- // - Otherwise, the basename of the .proto file, without extension.
- GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"`
- // Should generic services be generated in each language? "Generic" services
- // are not specific to any particular RPC system. They are generated by the
- // main code generators in each language (without additional plugins).
- // Generic services were the only kind of service generation supported by
- // early versions of google.protobuf.
- //
- // Generic services are now considered deprecated in favor of using plugins
- // that generate code specific to your particular RPC system. Therefore,
- // these default to false. Old code which depends on generic services should
- // explicitly set them to true.
- CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"`
- JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"`
- PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"`
- PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"`
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // Enables the use of arenas for the proto messages in this file. This applies
- // only to generated classes for C++.
- CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"`
- // Sets the objective c class prefix which is prepended to all objective c
- // generated classes from this .proto. There is no default.
- ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"`
- // Namespace for generated classes; defaults to the package.
- CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"`
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"`
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"`
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileOptions) Reset() { *m = FileOptions{} }
-func (m *FileOptions) String() string { return proto.CompactTextString(m) }
-func (*FileOptions) ProtoMessage() {}
-func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
-
-var extRange_FileOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_FileOptions
-}
-
-const Default_FileOptions_JavaMultipleFiles bool = false
-const Default_FileOptions_JavaStringCheckUtf8 bool = false
-const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
-const Default_FileOptions_CcGenericServices bool = false
-const Default_FileOptions_JavaGenericServices bool = false
-const Default_FileOptions_PyGenericServices bool = false
-const Default_FileOptions_PhpGenericServices bool = false
-const Default_FileOptions_Deprecated bool = false
-const Default_FileOptions_CcEnableArenas bool = false
-
-func (m *FileOptions) GetJavaPackage() string {
- if m != nil && m.JavaPackage != nil {
- return *m.JavaPackage
- }
- return ""
-}
-
-func (m *FileOptions) GetJavaOuterClassname() string {
- if m != nil && m.JavaOuterClassname != nil {
- return *m.JavaOuterClassname
- }
- return ""
-}
-
-func (m *FileOptions) GetJavaMultipleFiles() bool {
- if m != nil && m.JavaMultipleFiles != nil {
- return *m.JavaMultipleFiles
- }
- return Default_FileOptions_JavaMultipleFiles
-}
-
-func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool {
- if m != nil && m.JavaGenerateEqualsAndHash != nil {
- return *m.JavaGenerateEqualsAndHash
- }
- return false
-}
-
-func (m *FileOptions) GetJavaStringCheckUtf8() bool {
- if m != nil && m.JavaStringCheckUtf8 != nil {
- return *m.JavaStringCheckUtf8
- }
- return Default_FileOptions_JavaStringCheckUtf8
-}
-
-func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode {
- if m != nil && m.OptimizeFor != nil {
- return *m.OptimizeFor
- }
- return Default_FileOptions_OptimizeFor
-}
-
-func (m *FileOptions) GetGoPackage() string {
- if m != nil && m.GoPackage != nil {
- return *m.GoPackage
- }
- return ""
-}
-
-func (m *FileOptions) GetCcGenericServices() bool {
- if m != nil && m.CcGenericServices != nil {
- return *m.CcGenericServices
- }
- return Default_FileOptions_CcGenericServices
-}
-
-func (m *FileOptions) GetJavaGenericServices() bool {
- if m != nil && m.JavaGenericServices != nil {
- return *m.JavaGenericServices
- }
- return Default_FileOptions_JavaGenericServices
-}
-
-func (m *FileOptions) GetPyGenericServices() bool {
- if m != nil && m.PyGenericServices != nil {
- return *m.PyGenericServices
- }
- return Default_FileOptions_PyGenericServices
-}
-
-func (m *FileOptions) GetPhpGenericServices() bool {
- if m != nil && m.PhpGenericServices != nil {
- return *m.PhpGenericServices
- }
- return Default_FileOptions_PhpGenericServices
-}
-
-func (m *FileOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_FileOptions_Deprecated
-}
-
-func (m *FileOptions) GetCcEnableArenas() bool {
- if m != nil && m.CcEnableArenas != nil {
- return *m.CcEnableArenas
- }
- return Default_FileOptions_CcEnableArenas
-}
-
-func (m *FileOptions) GetObjcClassPrefix() string {
- if m != nil && m.ObjcClassPrefix != nil {
- return *m.ObjcClassPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetCsharpNamespace() string {
- if m != nil && m.CsharpNamespace != nil {
- return *m.CsharpNamespace
- }
- return ""
-}
-
-func (m *FileOptions) GetSwiftPrefix() string {
- if m != nil && m.SwiftPrefix != nil {
- return *m.SwiftPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetPhpClassPrefix() string {
- if m != nil && m.PhpClassPrefix != nil {
- return *m.PhpClassPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetPhpNamespace() string {
- if m != nil && m.PhpNamespace != nil {
- return *m.PhpNamespace
- }
- return ""
-}
-
-func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type MessageOptions struct {
- // Set true to use the old proto1 MessageSet wire format for extensions.
- // This is provided for backwards-compatibility with the MessageSet wire
- // format. You should not use this for any other reason: It's less
- // efficient, has fewer features, and is more complicated.
- //
- // The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
- // Note that the message cannot have any defined fields; MessageSets only
- // have extensions.
- //
- // All extensions of your type must be singular messages; e.g. they cannot
- // be int32s, enums, or repeated messages.
- //
- // Because this is an option, the above two restrictions are not enforced by
- // the protocol compiler.
- MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"`
- // Disables the generation of the standard "descriptor()" accessor, which can
- // conflict with a field of the same name. This is meant to make migration
- // from proto1 easier; new code should avoid fields named "descriptor".
- NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"`
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // Whether the message is an automatically generated map entry type for the
- // maps field.
- //
- // For maps fields:
- // map<KeyType, ValueType> map_field = 1;
- // The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
- //
- // Implementations may choose not to generate the map_entry=true message, but
- // use a native map in the target language to hold the keys and values.
- // The reflection APIs in such implementions still need to work as
- // if the field is a repeated message field.
- //
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
- // instead. The option should only be implicitly set by the proto compiler
- // parser.
- MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageOptions) Reset() { *m = MessageOptions{} }
-func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
-func (*MessageOptions) ProtoMessage() {}
-func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
-
-var extRange_MessageOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MessageOptions
-}
-
-const Default_MessageOptions_MessageSetWireFormat bool = false
-const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
-const Default_MessageOptions_Deprecated bool = false
-
-func (m *MessageOptions) GetMessageSetWireFormat() bool {
- if m != nil && m.MessageSetWireFormat != nil {
- return *m.MessageSetWireFormat
- }
- return Default_MessageOptions_MessageSetWireFormat
-}
-
-func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool {
- if m != nil && m.NoStandardDescriptorAccessor != nil {
- return *m.NoStandardDescriptorAccessor
- }
- return Default_MessageOptions_NoStandardDescriptorAccessor
-}
-
-func (m *MessageOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_MessageOptions_Deprecated
-}
-
-func (m *MessageOptions) GetMapEntry() bool {
- if m != nil && m.MapEntry != nil {
- return *m.MapEntry
- }
- return false
-}
-
-func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type FieldOptions struct {
- // The ctype option instructs the C++ code generator to use a different
- // representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
- Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"`
- // The packed option can be enabled for repeated primitive fields to enable
- // a more efficient representation on the wire. Rather than repeatedly
- // writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
- Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"`
- // The jstype option determines the JavaScript type used for values of the
- // field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- // is represented as JavaScript string, which avoids loss of precision that
- // can happen when a large value is converted to a floating point JavaScript.
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- // use the JavaScript "number" type. The behavior of the default option
- // JS_NORMAL is implementation dependent.
- //
- // This option is an enum to permit additional types to be added, e.g.
- // goog.math.Integer.
- Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"`
- // Should this field be parsed lazily? Lazy applies only to message-type
- // fields. It means that when the outer message is initially parsed, the
- // inner message's contents will not be parsed but instead stored in encoded
- // form. The inner message will actually be parsed when it is first accessed.
- //
- // This is only a hint. Implementations are free to choose whether to use
- // eager or lazy parsing regardless of the value of this option. However,
- // setting this option true suggests that the protocol author believes that
- // using lazy parsing on this field is worth the additional bookkeeping
- // overhead typically needed to implement it.
- //
- // This option does not affect the public interface of any generated code;
- // all method signatures remain the same. Furthermore, thread-safety of the
- // interface is not affected by this option; const methods remain safe to
- // call from multiple threads concurrently, while non-const methods continue
- // to require exclusive access.
- //
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
- Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"`
- // Is this field deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for accessors, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating fields.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // For Google-internal migration only. Do not use.
- Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FieldOptions) Reset() { *m = FieldOptions{} }
-func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
-func (*FieldOptions) ProtoMessage() {}
-func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
-
-var extRange_FieldOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_FieldOptions
-}
-
-const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING
-const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL
-const Default_FieldOptions_Lazy bool = false
-const Default_FieldOptions_Deprecated bool = false
-const Default_FieldOptions_Weak bool = false
-
-func (m *FieldOptions) GetCtype() FieldOptions_CType {
- if m != nil && m.Ctype != nil {
- return *m.Ctype
- }
- return Default_FieldOptions_Ctype
-}
-
-func (m *FieldOptions) GetPacked() bool {
- if m != nil && m.Packed != nil {
- return *m.Packed
- }
- return false
-}
-
-func (m *FieldOptions) GetJstype() FieldOptions_JSType {
- if m != nil && m.Jstype != nil {
- return *m.Jstype
- }
- return Default_FieldOptions_Jstype
-}
-
-func (m *FieldOptions) GetLazy() bool {
- if m != nil && m.Lazy != nil {
- return *m.Lazy
- }
- return Default_FieldOptions_Lazy
-}
-
-func (m *FieldOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_FieldOptions_Deprecated
-}
-
-func (m *FieldOptions) GetWeak() bool {
- if m != nil && m.Weak != nil {
- return *m.Weak
- }
- return Default_FieldOptions_Weak
-}
-
-func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type OneofOptions struct {
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OneofOptions) Reset() { *m = OneofOptions{} }
-func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
-func (*OneofOptions) ProtoMessage() {}
-func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
-
-var extRange_OneofOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OneofOptions
-}
-
-func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type EnumOptions struct {
- // Set this option to true to allow mapping different tag names to the same
- // value.
- AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"`
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumOptions) Reset() { *m = EnumOptions{} }
-func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumOptions) ProtoMessage() {}
-func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
-
-var extRange_EnumOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_EnumOptions
-}
-
-const Default_EnumOptions_Deprecated bool = false
-
-func (m *EnumOptions) GetAllowAlias() bool {
- if m != nil && m.AllowAlias != nil {
- return *m.AllowAlias
- }
- return false
-}
-
-func (m *EnumOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_EnumOptions_Deprecated
-}
-
-func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type EnumValueOptions struct {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} }
-func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumValueOptions) ProtoMessage() {}
-func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
-
-var extRange_EnumValueOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_EnumValueOptions
-}
-
-const Default_EnumValueOptions_Deprecated bool = false
-
-func (m *EnumValueOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_EnumValueOptions_Deprecated
-}
-
-func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type ServiceOptions struct {
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ServiceOptions) Reset() { *m = ServiceOptions{} }
-func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
-func (*ServiceOptions) ProtoMessage() {}
-func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
-
-var extRange_ServiceOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ServiceOptions
-}
-
-const Default_ServiceOptions_Deprecated bool = false
-
-func (m *ServiceOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_ServiceOptions_Deprecated
-}
-
-func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type MethodOptions struct {
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MethodOptions) Reset() { *m = MethodOptions{} }
-func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
-func (*MethodOptions) ProtoMessage() {}
-func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
-
-var extRange_MethodOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MethodOptions
-}
-
-const Default_MethodOptions_Deprecated bool = false
-const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN
-
-func (m *MethodOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_MethodOptions_Deprecated
-}
-
-func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {
- if m != nil && m.IdempotencyLevel != nil {
- return *m.IdempotencyLevel
- }
- return Default_MethodOptions_IdempotencyLevel
-}
-
-func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-// A message representing a option the parser does not recognize. This only
-// appears in options protos created by the compiler::Parser class.
-// DescriptorPool resolves these when building Descriptor objects. Therefore,
-// options protos in descriptor objects (e.g. returned by Descriptor::options(),
-// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
-// in them.
-type UninterpretedOption struct {
- Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"`
- // The value of the uninterpreted option, in whatever type the tokenizer
- // identified it as during parsing. Exactly one of these should be set.
- IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
- PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
- NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
- DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
- StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
- AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} }
-func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
-func (*UninterpretedOption) ProtoMessage() {}
-func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
-
-func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {
- if m != nil {
- return m.Name
- }
- return nil
-}
-
-func (m *UninterpretedOption) GetIdentifierValue() string {
- if m != nil && m.IdentifierValue != nil {
- return *m.IdentifierValue
- }
- return ""
-}
-
-func (m *UninterpretedOption) GetPositiveIntValue() uint64 {
- if m != nil && m.PositiveIntValue != nil {
- return *m.PositiveIntValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetNegativeIntValue() int64 {
- if m != nil && m.NegativeIntValue != nil {
- return *m.NegativeIntValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetDoubleValue() float64 {
- if m != nil && m.DoubleValue != nil {
- return *m.DoubleValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetStringValue() []byte {
- if m != nil {
- return m.StringValue
- }
- return nil
-}
-
-func (m *UninterpretedOption) GetAggregateValue() string {
- if m != nil && m.AggregateValue != nil {
- return *m.AggregateValue
- }
- return ""
-}
-
-// The name of the uninterpreted option. Each string represents a segment in
-// a dot-separated name. is_extension is true iff a segment represents an
-// extension (denoted with parentheses in options specs in .proto files).
-// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
-// "foo.(bar.baz).qux".
-type UninterpretedOption_NamePart struct {
- NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
- IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} }
-func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
-func (*UninterpretedOption_NamePart) ProtoMessage() {}
-func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{18, 0}
-}
-
-func (m *UninterpretedOption_NamePart) GetNamePart() string {
- if m != nil && m.NamePart != nil {
- return *m.NamePart
- }
- return ""
-}
-
-func (m *UninterpretedOption_NamePart) GetIsExtension() bool {
- if m != nil && m.IsExtension != nil {
- return *m.IsExtension
- }
- return false
-}
-
-// Encapsulates information about the original source file from which a
-// FileDescriptorProto was generated.
-type SourceCodeInfo struct {
- // A Location identifies a piece of source code in a .proto file which
- // corresponds to a particular definition. This information is intended
- // to be useful to IDEs, code indexers, documentation generators, and similar
- // tools.
- //
- // For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
- // Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
- // We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- //
- // Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendent. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
- Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} }
-func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*SourceCodeInfo) ProtoMessage() {}
-func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
-
-func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
- if m != nil {
- return m.Location
- }
- return nil
-}
-
-type SourceCodeInfo_Location struct {
- // Identifies which part of the FileDescriptorProto was defined at this
- // location.
- //
- // Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
- // refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
- // This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
- // and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
- // and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
- //
- // Thus, the above path gives the location of a field name. If we removed
- // the last element:
- // [ 4, 3, 2, 7 ]
- // this path refers to the whole field declaration (from the beginning
- // of the label to the terminating semicolon).
- Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"`
- // Always has exactly three or four elements: start line, start column,
- // end line (optional, otherwise assumed same as start line), end column.
- // These are packed into a single field for efficiency. Note that line
- // and column numbers are zero-based -- typically you will want to add
- // 1 to each before displaying to a user.
- Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"`
- // If this SourceCodeInfo represents a complete declaration, these are any
- // comments appearing before and after the declaration which appear to be
- // attached to the declaration.
- //
- // A series of line comments appearing on consecutive lines, with no other
- // tokens appearing on those lines, will be treated as a single comment.
- //
- // leading_detached_comments will keep paragraphs of comments that appear
- // before (but not connected to) the current element. Each paragraph,
- // separated by empty lines, will be one comment element in the repeated
- // field.
- //
- // Only the comment content is provided; comment markers (e.g. //) are
- // stripped out. For block comments, leading whitespace and an asterisk
- // will be stripped from the beginning of each line other than the first.
- // Newlines are included in the output.
- //
- // Examples:
- //
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
- //
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
- //
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
- //
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
- //
- // // Detached comment for corge paragraph 2.
- //
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
- //
- // // ignored detached comments.
- LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
- TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
- LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} }
-func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
-func (*SourceCodeInfo_Location) ProtoMessage() {}
-func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} }
-
-func (m *SourceCodeInfo_Location) GetPath() []int32 {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-func (m *SourceCodeInfo_Location) GetSpan() []int32 {
- if m != nil {
- return m.Span
- }
- return nil
-}
-
-func (m *SourceCodeInfo_Location) GetLeadingComments() string {
- if m != nil && m.LeadingComments != nil {
- return *m.LeadingComments
- }
- return ""
-}
-
-func (m *SourceCodeInfo_Location) GetTrailingComments() string {
- if m != nil && m.TrailingComments != nil {
- return *m.TrailingComments
- }
- return ""
-}
-
-func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {
- if m != nil {
- return m.LeadingDetachedComments
- }
- return nil
-}
-
-// Describes the relationship between generated code and its original source
-// file. A GeneratedCodeInfo message is associated with only one generated
-// source file, but may contain references to different source .proto files.
-type GeneratedCodeInfo struct {
- // An Annotation connects some span of text in generated code to an element
- // of its generating .proto file.
- Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} }
-func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*GeneratedCodeInfo) ProtoMessage() {}
-func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
-
-func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
- if m != nil {
- return m.Annotation
- }
- return nil
-}
-
-type GeneratedCodeInfo_Annotation struct {
- // Identifies the element in the original source .proto file. This field
- // is formatted the same as SourceCodeInfo.Location.path.
- Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"`
- // Identifies the filesystem path to the original source .proto.
- SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"`
- // Identifies the starting offset in bytes in the generated code
- // that relates to the identified object.
- Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"`
- // Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
- // the last relevant byte (so the length of the text = end - begin).
- End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} }
-func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) }
-func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
-func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{20, 0}
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string {
- if m != nil && m.SourceFile != nil {
- return *m.SourceFile
- }
- return ""
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 {
- if m != nil && m.Begin != nil {
- return *m.Begin
- }
- return 0
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet")
- proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto")
- proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto")
- proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange")
- proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange")
- proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions")
- proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto")
- proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto")
- proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto")
- proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto")
- proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto")
- proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto")
- proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions")
- proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions")
- proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions")
- proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions")
- proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions")
- proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions")
- proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions")
- proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions")
- proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption")
- proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart")
- proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo")
- proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location")
- proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo")
- proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation")
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
- proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
- proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
-}
-
-func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 2519 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6e, 0x1b, 0xc7,
- 0x15, 0x0e, 0x7f, 0x45, 0x1e, 0x52, 0xd4, 0x68, 0xa4, 0xd8, 0x6b, 0xe5, 0xc7, 0x32, 0xf3, 0x63,
- 0xd9, 0x69, 0xa8, 0x40, 0xb1, 0x1d, 0x47, 0x29, 0xd2, 0x52, 0xe4, 0x5a, 0xa1, 0x4a, 0x91, 0xec,
- 0x92, 0x6a, 0x7e, 0x6e, 0x16, 0xa3, 0xdd, 0x21, 0xb9, 0xf6, 0x72, 0x77, 0xb3, 0xbb, 0xb4, 0xad,
- 0xa0, 0x17, 0x06, 0x7a, 0x55, 0xa0, 0x0f, 0x50, 0x14, 0x45, 0x2f, 0x72, 0x13, 0xa0, 0x0f, 0x50,
- 0x20, 0x77, 0x7d, 0x82, 0x02, 0x79, 0x83, 0xa2, 0x28, 0xd0, 0x3e, 0x46, 0x31, 0x33, 0xbb, 0xcb,
- 0x5d, 0xfe, 0xc4, 0x6a, 0x80, 0x38, 0x57, 0xe4, 0x7c, 0xe7, 0x3b, 0x67, 0xce, 0x9c, 0x39, 0x33,
- 0x73, 0x66, 0x16, 0x76, 0x47, 0xb6, 0x3d, 0x32, 0xe9, 0xbe, 0xe3, 0xda, 0xbe, 0x7d, 0x3e, 0x1d,
- 0xee, 0xeb, 0xd4, 0xd3, 0x5c, 0xc3, 0xf1, 0x6d, 0xb7, 0xc6, 0x31, 0xbc, 0x21, 0x18, 0xb5, 0x90,
- 0x51, 0x3d, 0x85, 0xcd, 0x07, 0x86, 0x49, 0x9b, 0x11, 0xb1, 0x4f, 0x7d, 0x7c, 0x1f, 0xb2, 0x43,
- 0xc3, 0xa4, 0x52, 0x6a, 0x37, 0xb3, 0x57, 0x3a, 0x78, 0xb3, 0x36, 0xa7, 0x54, 0x4b, 0x6a, 0xf4,
- 0x18, 0xac, 0x70, 0x8d, 0xea, 0xbf, 0xb3, 0xb0, 0xb5, 0x44, 0x8a, 0x31, 0x64, 0x2d, 0x32, 0x61,
- 0x16, 0x53, 0x7b, 0x45, 0x85, 0xff, 0xc7, 0x12, 0xac, 0x39, 0x44, 0x7b, 0x44, 0x46, 0x54, 0x4a,
- 0x73, 0x38, 0x6c, 0xe2, 0xd7, 0x01, 0x74, 0xea, 0x50, 0x4b, 0xa7, 0x96, 0x76, 0x21, 0x65, 0x76,
- 0x33, 0x7b, 0x45, 0x25, 0x86, 0xe0, 0x77, 0x60, 0xd3, 0x99, 0x9e, 0x9b, 0x86, 0xa6, 0xc6, 0x68,
- 0xb0, 0x9b, 0xd9, 0xcb, 0x29, 0x48, 0x08, 0x9a, 0x33, 0xf2, 0x4d, 0xd8, 0x78, 0x42, 0xc9, 0xa3,
- 0x38, 0xb5, 0xc4, 0xa9, 0x15, 0x06, 0xc7, 0x88, 0x0d, 0x28, 0x4f, 0xa8, 0xe7, 0x91, 0x11, 0x55,
- 0xfd, 0x0b, 0x87, 0x4a, 0x59, 0x3e, 0xfa, 0xdd, 0x85, 0xd1, 0xcf, 0x8f, 0xbc, 0x14, 0x68, 0x0d,
- 0x2e, 0x1c, 0x8a, 0xeb, 0x50, 0xa4, 0xd6, 0x74, 0x22, 0x2c, 0xe4, 0x56, 0xc4, 0x4f, 0xb6, 0xa6,
- 0x93, 0x79, 0x2b, 0x05, 0xa6, 0x16, 0x98, 0x58, 0xf3, 0xa8, 0xfb, 0xd8, 0xd0, 0xa8, 0x94, 0xe7,
- 0x06, 0x6e, 0x2e, 0x18, 0xe8, 0x0b, 0xf9, 0xbc, 0x8d, 0x50, 0x0f, 0x37, 0xa0, 0x48, 0x9f, 0xfa,
- 0xd4, 0xf2, 0x0c, 0xdb, 0x92, 0xd6, 0xb8, 0x91, 0xb7, 0x96, 0xcc, 0x22, 0x35, 0xf5, 0x79, 0x13,
- 0x33, 0x3d, 0x7c, 0x0f, 0xd6, 0x6c, 0xc7, 0x37, 0x6c, 0xcb, 0x93, 0x0a, 0xbb, 0xa9, 0xbd, 0xd2,
- 0xc1, 0xab, 0x4b, 0x13, 0xa1, 0x2b, 0x38, 0x4a, 0x48, 0xc6, 0x2d, 0x40, 0x9e, 0x3d, 0x75, 0x35,
- 0xaa, 0x6a, 0xb6, 0x4e, 0x55, 0xc3, 0x1a, 0xda, 0x52, 0x91, 0x1b, 0xb8, 0xbe, 0x38, 0x10, 0x4e,
- 0x6c, 0xd8, 0x3a, 0x6d, 0x59, 0x43, 0x5b, 0xa9, 0x78, 0x89, 0x36, 0xbe, 0x02, 0x79, 0xef, 0xc2,
- 0xf2, 0xc9, 0x53, 0xa9, 0xcc, 0x33, 0x24, 0x68, 0x55, 0xbf, 0xcd, 0xc3, 0xc6, 0x65, 0x52, 0xec,
- 0x23, 0xc8, 0x0d, 0xd9, 0x28, 0xa5, 0xf4, 0xff, 0x13, 0x03, 0xa1, 0x93, 0x0c, 0x62, 0xfe, 0x07,
- 0x06, 0xb1, 0x0e, 0x25, 0x8b, 0x7a, 0x3e, 0xd5, 0x45, 0x46, 0x64, 0x2e, 0x99, 0x53, 0x20, 0x94,
- 0x16, 0x53, 0x2a, 0xfb, 0x83, 0x52, 0xea, 0x33, 0xd8, 0x88, 0x5c, 0x52, 0x5d, 0x62, 0x8d, 0xc2,
- 0xdc, 0xdc, 0x7f, 0x9e, 0x27, 0x35, 0x39, 0xd4, 0x53, 0x98, 0x9a, 0x52, 0xa1, 0x89, 0x36, 0x6e,
- 0x02, 0xd8, 0x16, 0xb5, 0x87, 0xaa, 0x4e, 0x35, 0x53, 0x2a, 0xac, 0x88, 0x52, 0x97, 0x51, 0x16,
- 0xa2, 0x64, 0x0b, 0x54, 0x33, 0xf1, 0x87, 0xb3, 0x54, 0x5b, 0x5b, 0x91, 0x29, 0xa7, 0x62, 0x91,
- 0x2d, 0x64, 0xdb, 0x19, 0x54, 0x5c, 0xca, 0xf2, 0x9e, 0xea, 0xc1, 0xc8, 0x8a, 0xdc, 0x89, 0xda,
- 0x73, 0x47, 0xa6, 0x04, 0x6a, 0x62, 0x60, 0xeb, 0x6e, 0xbc, 0x89, 0xdf, 0x80, 0x08, 0x50, 0x79,
- 0x5a, 0x01, 0xdf, 0x85, 0xca, 0x21, 0xd8, 0x21, 0x13, 0xba, 0xf3, 0x15, 0x54, 0x92, 0xe1, 0xc1,
- 0xdb, 0x90, 0xf3, 0x7c, 0xe2, 0xfa, 0x3c, 0x0b, 0x73, 0x8a, 0x68, 0x60, 0x04, 0x19, 0x6a, 0xe9,
- 0x7c, 0x97, 0xcb, 0x29, 0xec, 0x2f, 0xfe, 0xe5, 0x6c, 0xc0, 0x19, 0x3e, 0xe0, 0xb7, 0x17, 0x67,
- 0x34, 0x61, 0x79, 0x7e, 0xdc, 0x3b, 0x1f, 0xc0, 0x7a, 0x62, 0x00, 0x97, 0xed, 0xba, 0xfa, 0x5b,
- 0x78, 0x79, 0xa9, 0x69, 0xfc, 0x19, 0x6c, 0x4f, 0x2d, 0xc3, 0xf2, 0xa9, 0xeb, 0xb8, 0x94, 0x65,
- 0xac, 0xe8, 0x4a, 0xfa, 0xcf, 0xda, 0x8a, 0x9c, 0x3b, 0x8b, 0xb3, 0x85, 0x15, 0x65, 0x6b, 0xba,
- 0x08, 0xde, 0x2e, 0x16, 0xfe, 0xbb, 0x86, 0x9e, 0x3d, 0x7b, 0xf6, 0x2c, 0x5d, 0xfd, 0x63, 0x1e,
- 0xb6, 0x97, 0xad, 0x99, 0xa5, 0xcb, 0xf7, 0x0a, 0xe4, 0xad, 0xe9, 0xe4, 0x9c, 0xba, 0x3c, 0x48,
- 0x39, 0x25, 0x68, 0xe1, 0x3a, 0xe4, 0x4c, 0x72, 0x4e, 0x4d, 0x29, 0xbb, 0x9b, 0xda, 0xab, 0x1c,
- 0xbc, 0x73, 0xa9, 0x55, 0x59, 0x6b, 0x33, 0x15, 0x45, 0x68, 0xe2, 0x8f, 0x21, 0x1b, 0x6c, 0xd1,
- 0xcc, 0xc2, 0xed, 0xcb, 0x59, 0x60, 0x6b, 0x49, 0xe1, 0x7a, 0xf8, 0x15, 0x28, 0xb2, 0x5f, 0x91,
- 0x1b, 0x79, 0xee, 0x73, 0x81, 0x01, 0x2c, 0x2f, 0xf0, 0x0e, 0x14, 0xf8, 0x32, 0xd1, 0x69, 0x78,
- 0xb4, 0x45, 0x6d, 0x96, 0x58, 0x3a, 0x1d, 0x92, 0xa9, 0xe9, 0xab, 0x8f, 0x89, 0x39, 0xa5, 0x3c,
- 0xe1, 0x8b, 0x4a, 0x39, 0x00, 0x7f, 0xc3, 0x30, 0x7c, 0x1d, 0x4a, 0x62, 0x55, 0x19, 0x96, 0x4e,
- 0x9f, 0xf2, 0xdd, 0x33, 0xa7, 0x88, 0x85, 0xd6, 0x62, 0x08, 0xeb, 0xfe, 0xa1, 0x67, 0x5b, 0x61,
- 0x6a, 0xf2, 0x2e, 0x18, 0xc0, 0xbb, 0xff, 0x60, 0x7e, 0xe3, 0x7e, 0x6d, 0xf9, 0xf0, 0xe6, 0x73,
- 0xaa, 0xfa, 0xb7, 0x34, 0x64, 0xf9, 0x7e, 0xb1, 0x01, 0xa5, 0xc1, 0xe7, 0x3d, 0x59, 0x6d, 0x76,
- 0xcf, 0x8e, 0xda, 0x32, 0x4a, 0xe1, 0x0a, 0x00, 0x07, 0x1e, 0xb4, 0xbb, 0xf5, 0x01, 0x4a, 0x47,
- 0xed, 0x56, 0x67, 0x70, 0xef, 0x0e, 0xca, 0x44, 0x0a, 0x67, 0x02, 0xc8, 0xc6, 0x09, 0xef, 0x1f,
- 0xa0, 0x1c, 0x46, 0x50, 0x16, 0x06, 0x5a, 0x9f, 0xc9, 0xcd, 0x7b, 0x77, 0x50, 0x3e, 0x89, 0xbc,
- 0x7f, 0x80, 0xd6, 0xf0, 0x3a, 0x14, 0x39, 0x72, 0xd4, 0xed, 0xb6, 0x51, 0x21, 0xb2, 0xd9, 0x1f,
- 0x28, 0xad, 0xce, 0x31, 0x2a, 0x46, 0x36, 0x8f, 0x95, 0xee, 0x59, 0x0f, 0x41, 0x64, 0xe1, 0x54,
- 0xee, 0xf7, 0xeb, 0xc7, 0x32, 0x2a, 0x45, 0x8c, 0xa3, 0xcf, 0x07, 0x72, 0x1f, 0x95, 0x13, 0x6e,
- 0xbd, 0x7f, 0x80, 0xd6, 0xa3, 0x2e, 0xe4, 0xce, 0xd9, 0x29, 0xaa, 0xe0, 0x4d, 0x58, 0x17, 0x5d,
- 0x84, 0x4e, 0x6c, 0xcc, 0x41, 0xf7, 0xee, 0x20, 0x34, 0x73, 0x44, 0x58, 0xd9, 0x4c, 0x00, 0xf7,
- 0xee, 0x20, 0x5c, 0x6d, 0x40, 0x8e, 0x67, 0x17, 0xc6, 0x50, 0x69, 0xd7, 0x8f, 0xe4, 0xb6, 0xda,
- 0xed, 0x0d, 0x5a, 0xdd, 0x4e, 0xbd, 0x8d, 0x52, 0x33, 0x4c, 0x91, 0x7f, 0x7d, 0xd6, 0x52, 0xe4,
- 0x26, 0x4a, 0xc7, 0xb1, 0x9e, 0x5c, 0x1f, 0xc8, 0x4d, 0x94, 0xa9, 0x6a, 0xb0, 0xbd, 0x6c, 0x9f,
- 0x5c, 0xba, 0x32, 0x62, 0x53, 0x9c, 0x5e, 0x31, 0xc5, 0xdc, 0xd6, 0xc2, 0x14, 0x7f, 0x9d, 0x82,
- 0xad, 0x25, 0x67, 0xc5, 0xd2, 0x4e, 0x7e, 0x01, 0x39, 0x91, 0xa2, 0xe2, 0xf4, 0xbc, 0xb5, 0xf4,
- 0xd0, 0xe1, 0x09, 0xbb, 0x70, 0x82, 0x72, 0xbd, 0x78, 0x05, 0x91, 0x59, 0x51, 0x41, 0x30, 0x13,
- 0x0b, 0x4e, 0xfe, 0x2e, 0x05, 0xd2, 0x2a, 0xdb, 0xcf, 0xd9, 0x28, 0xd2, 0x89, 0x8d, 0xe2, 0xa3,
- 0x79, 0x07, 0x6e, 0xac, 0x1e, 0xc3, 0x82, 0x17, 0xdf, 0xa4, 0xe0, 0xca, 0xf2, 0x42, 0x6b, 0xa9,
- 0x0f, 0x1f, 0x43, 0x7e, 0x42, 0xfd, 0xb1, 0x1d, 0x16, 0x1b, 0x6f, 0x2f, 0x39, 0xc2, 0x98, 0x78,
- 0x3e, 0x56, 0x81, 0x56, 0xfc, 0x0c, 0xcc, 0xac, 0xaa, 0x96, 0x84, 0x37, 0x0b, 0x9e, 0xfe, 0x3e,
- 0x0d, 0x2f, 0x2f, 0x35, 0xbe, 0xd4, 0xd1, 0xd7, 0x00, 0x0c, 0xcb, 0x99, 0xfa, 0xa2, 0xa0, 0x10,
- 0xfb, 0x53, 0x91, 0x23, 0x7c, 0xed, 0xb3, 0xbd, 0x67, 0xea, 0x47, 0xf2, 0x0c, 0x97, 0x83, 0x80,
- 0x38, 0xe1, 0xfe, 0xcc, 0xd1, 0x2c, 0x77, 0xf4, 0xf5, 0x15, 0x23, 0x5d, 0x38, 0xab, 0xdf, 0x03,
- 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x26, 0x86, 0x35, 0xe2, 0x1b, 0x70, 0xe1,
- 0x30, 0x37, 0x24, 0xa6, 0x47, 0x95, 0x0d, 0x21, 0xee, 0x87, 0x52, 0xa6, 0xc1, 0xcf, 0x38, 0x37,
- 0xa6, 0x91, 0x4f, 0x68, 0x08, 0x71, 0xa4, 0x51, 0xfd, 0xb6, 0x00, 0xa5, 0x58, 0x59, 0x8a, 0x6f,
- 0x40, 0xf9, 0x21, 0x79, 0x4c, 0xd4, 0xf0, 0xaa, 0x21, 0x22, 0x51, 0x62, 0x58, 0x2f, 0xb8, 0x6e,
- 0xbc, 0x07, 0xdb, 0x9c, 0x62, 0x4f, 0x7d, 0xea, 0xaa, 0x9a, 0x49, 0x3c, 0x8f, 0x07, 0xad, 0xc0,
- 0xa9, 0x98, 0xc9, 0xba, 0x4c, 0xd4, 0x08, 0x25, 0xf8, 0x2e, 0x6c, 0x71, 0x8d, 0xc9, 0xd4, 0xf4,
- 0x0d, 0xc7, 0xa4, 0x2a, 0xbb, 0xfc, 0x78, 0x7c, 0x23, 0x8e, 0x3c, 0xdb, 0x64, 0x8c, 0xd3, 0x80,
- 0xc0, 0x3c, 0xf2, 0x70, 0x13, 0x5e, 0xe3, 0x6a, 0x23, 0x6a, 0x51, 0x97, 0xf8, 0x54, 0xa5, 0x5f,
- 0x4e, 0x89, 0xe9, 0xa9, 0xc4, 0xd2, 0xd5, 0x31, 0xf1, 0xc6, 0xd2, 0x36, 0x33, 0x70, 0x94, 0x96,
- 0x52, 0xca, 0x35, 0x46, 0x3c, 0x0e, 0x78, 0x32, 0xa7, 0xd5, 0x2d, 0xfd, 0x13, 0xe2, 0x8d, 0xf1,
- 0x21, 0x5c, 0xe1, 0x56, 0x3c, 0xdf, 0x35, 0xac, 0x91, 0xaa, 0x8d, 0xa9, 0xf6, 0x48, 0x9d, 0xfa,
- 0xc3, 0xfb, 0xd2, 0x2b, 0xf1, 0xfe, 0xb9, 0x87, 0x7d, 0xce, 0x69, 0x30, 0xca, 0x99, 0x3f, 0xbc,
- 0x8f, 0xfb, 0x50, 0x66, 0x93, 0x31, 0x31, 0xbe, 0xa2, 0xea, 0xd0, 0x76, 0xf9, 0xc9, 0x52, 0x59,
- 0xb2, 0xb2, 0x63, 0x11, 0xac, 0x75, 0x03, 0x85, 0x53, 0x5b, 0xa7, 0x87, 0xb9, 0x7e, 0x4f, 0x96,
- 0x9b, 0x4a, 0x29, 0xb4, 0xf2, 0xc0, 0x76, 0x59, 0x42, 0x8d, 0xec, 0x28, 0xc0, 0x25, 0x91, 0x50,
- 0x23, 0x3b, 0x0c, 0xef, 0x5d, 0xd8, 0xd2, 0x34, 0x31, 0x66, 0x43, 0x53, 0x83, 0x2b, 0x8a, 0x27,
- 0xa1, 0x44, 0xb0, 0x34, 0xed, 0x58, 0x10, 0x82, 0x1c, 0xf7, 0xf0, 0x87, 0xf0, 0xf2, 0x2c, 0x58,
- 0x71, 0xc5, 0xcd, 0x85, 0x51, 0xce, 0xab, 0xde, 0x85, 0x2d, 0xe7, 0x62, 0x51, 0x11, 0x27, 0x7a,
- 0x74, 0x2e, 0xe6, 0xd5, 0x3e, 0x80, 0x6d, 0x67, 0xec, 0x2c, 0xea, 0xdd, 0x8e, 0xeb, 0x61, 0x67,
- 0xec, 0xcc, 0x2b, 0xbe, 0xc5, 0xef, 0xab, 0x2e, 0xd5, 0x88, 0x4f, 0x75, 0xe9, 0x6a, 0x9c, 0x1e,
- 0x13, 0xe0, 0x7d, 0x40, 0x9a, 0xa6, 0x52, 0x8b, 0x9c, 0x9b, 0x54, 0x25, 0x2e, 0xb5, 0x88, 0x27,
- 0x5d, 0x8f, 0x93, 0x2b, 0x9a, 0x26, 0x73, 0x69, 0x9d, 0x0b, 0xf1, 0x6d, 0xd8, 0xb4, 0xcf, 0x1f,
- 0x6a, 0x22, 0x25, 0x55, 0xc7, 0xa5, 0x43, 0xe3, 0xa9, 0xf4, 0x26, 0x8f, 0xef, 0x06, 0x13, 0xf0,
- 0x84, 0xec, 0x71, 0x18, 0xdf, 0x02, 0xa4, 0x79, 0x63, 0xe2, 0x3a, 0xbc, 0x26, 0xf0, 0x1c, 0xa2,
- 0x51, 0xe9, 0x2d, 0x41, 0x15, 0x78, 0x27, 0x84, 0xd9, 0x92, 0xf0, 0x9e, 0x18, 0x43, 0x3f, 0xb4,
- 0x78, 0x53, 0x2c, 0x09, 0x8e, 0x05, 0xd6, 0xf6, 0x00, 0xb1, 0x50, 0x24, 0x3a, 0xde, 0xe3, 0xb4,
- 0x8a, 0x33, 0x76, 0xe2, 0xfd, 0xbe, 0x01, 0xeb, 0x8c, 0x39, 0xeb, 0xf4, 0x96, 0xa8, 0x67, 0x9c,
- 0x71, 0xac, 0xc7, 0x1f, 0xad, 0xb4, 0xac, 0x1e, 0x42, 0x39, 0x9e, 0x9f, 0xb8, 0x08, 0x22, 0x43,
- 0x51, 0x8a, 0x9d, 0xf5, 0x8d, 0x6e, 0x93, 0x9d, 0xd2, 0x5f, 0xc8, 0x28, 0xcd, 0xaa, 0x85, 0x76,
- 0x6b, 0x20, 0xab, 0xca, 0x59, 0x67, 0xd0, 0x3a, 0x95, 0x51, 0x26, 0x56, 0x96, 0x9e, 0x64, 0x0b,
- 0x6f, 0xa3, 0x9b, 0xd5, 0xef, 0xd2, 0x50, 0x49, 0xde, 0x33, 0xf0, 0xcf, 0xe1, 0x6a, 0xf8, 0x28,
- 0xe0, 0x51, 0x5f, 0x7d, 0x62, 0xb8, 0x7c, 0xe1, 0x4c, 0x88, 0xa8, 0xb3, 0xa3, 0xa9, 0xdb, 0x0e,
- 0x58, 0x7d, 0xea, 0x7f, 0x6a, 0xb8, 0x6c, 0x59, 0x4c, 0x88, 0x8f, 0xdb, 0x70, 0xdd, 0xb2, 0x55,
- 0xcf, 0x27, 0x96, 0x4e, 0x5c, 0x5d, 0x9d, 0x3d, 0xc7, 0xa8, 0x44, 0xd3, 0xa8, 0xe7, 0xd9, 0xe2,
- 0xc0, 0x8a, 0xac, 0xbc, 0x6a, 0xd9, 0xfd, 0x80, 0x3c, 0xdb, 0xc9, 0xeb, 0x01, 0x75, 0x2e, 0xcd,
- 0x32, 0xab, 0xd2, 0xec, 0x15, 0x28, 0x4e, 0x88, 0xa3, 0x52, 0xcb, 0x77, 0x2f, 0x78, 0x75, 0x59,
- 0x50, 0x0a, 0x13, 0xe2, 0xc8, 0xac, 0xfd, 0x42, 0x8a, 0xfc, 0x93, 0x6c, 0xa1, 0x80, 0x8a, 0x27,
- 0xd9, 0x42, 0x11, 0x41, 0xf5, 0x5f, 0x19, 0x28, 0xc7, 0xab, 0x4d, 0x56, 0xbc, 0x6b, 0xfc, 0x64,
- 0x49, 0xf1, 0xbd, 0xe7, 0x8d, 0xef, 0xad, 0x4d, 0x6b, 0x0d, 0x76, 0xe4, 0x1c, 0xe6, 0x45, 0x0d,
- 0xa8, 0x08, 0x4d, 0x76, 0xdc, 0xb3, 0xdd, 0x86, 0x8a, 0x7b, 0x4d, 0x41, 0x09, 0x5a, 0xf8, 0x18,
- 0xf2, 0x0f, 0x3d, 0x6e, 0x3b, 0xcf, 0x6d, 0xbf, 0xf9, 0xfd, 0xb6, 0x4f, 0xfa, 0xdc, 0x78, 0xf1,
- 0xa4, 0xaf, 0x76, 0xba, 0xca, 0x69, 0xbd, 0xad, 0x04, 0xea, 0xf8, 0x1a, 0x64, 0x4d, 0xf2, 0xd5,
- 0x45, 0xf2, 0x70, 0xe2, 0xd0, 0x65, 0x27, 0xe1, 0x1a, 0x64, 0x9f, 0x50, 0xf2, 0x28, 0x79, 0x24,
- 0x70, 0xe8, 0x47, 0x5c, 0x0c, 0xfb, 0x90, 0xe3, 0xf1, 0xc2, 0x00, 0x41, 0xc4, 0xd0, 0x4b, 0xb8,
- 0x00, 0xd9, 0x46, 0x57, 0x61, 0x0b, 0x02, 0x41, 0x59, 0xa0, 0x6a, 0xaf, 0x25, 0x37, 0x64, 0x94,
- 0xae, 0xde, 0x85, 0xbc, 0x08, 0x02, 0x5b, 0x2c, 0x51, 0x18, 0xd0, 0x4b, 0x41, 0x33, 0xb0, 0x91,
- 0x0a, 0xa5, 0x67, 0xa7, 0x47, 0xb2, 0x82, 0xd2, 0xc9, 0xa9, 0xce, 0xa2, 0x5c, 0xd5, 0x83, 0x72,
- 0xbc, 0xdc, 0x7c, 0x31, 0x57, 0xc9, 0xbf, 0xa7, 0xa0, 0x14, 0x2b, 0x1f, 0x59, 0xe1, 0x42, 0x4c,
- 0xd3, 0x7e, 0xa2, 0x12, 0xd3, 0x20, 0x5e, 0x90, 0x1a, 0xc0, 0xa1, 0x3a, 0x43, 0x2e, 0x3b, 0x75,
- 0x2f, 0x68, 0x89, 0xe4, 0x50, 0xbe, 0xfa, 0x97, 0x14, 0xa0, 0xf9, 0x02, 0x74, 0xce, 0xcd, 0xd4,
- 0x4f, 0xe9, 0x66, 0xf5, 0xcf, 0x29, 0xa8, 0x24, 0xab, 0xce, 0x39, 0xf7, 0x6e, 0xfc, 0xa4, 0xee,
- 0xfd, 0x33, 0x0d, 0xeb, 0x89, 0x5a, 0xf3, 0xb2, 0xde, 0x7d, 0x09, 0x9b, 0x86, 0x4e, 0x27, 0x8e,
- 0xed, 0x53, 0x4b, 0xbb, 0x50, 0x4d, 0xfa, 0x98, 0x9a, 0x52, 0x95, 0x6f, 0x1a, 0xfb, 0xdf, 0x5f,
- 0xcd, 0xd6, 0x5a, 0x33, 0xbd, 0x36, 0x53, 0x3b, 0xdc, 0x6a, 0x35, 0xe5, 0xd3, 0x5e, 0x77, 0x20,
- 0x77, 0x1a, 0x9f, 0xab, 0x67, 0x9d, 0x5f, 0x75, 0xba, 0x9f, 0x76, 0x14, 0x64, 0xcc, 0xd1, 0x7e,
- 0xc4, 0x65, 0xdf, 0x03, 0x34, 0xef, 0x14, 0xbe, 0x0a, 0xcb, 0xdc, 0x42, 0x2f, 0xe1, 0x2d, 0xd8,
- 0xe8, 0x74, 0xd5, 0x7e, 0xab, 0x29, 0xab, 0xf2, 0x83, 0x07, 0x72, 0x63, 0xd0, 0x17, 0xd7, 0xfb,
- 0x88, 0x3d, 0x48, 0x2c, 0xf0, 0xea, 0x9f, 0x32, 0xb0, 0xb5, 0xc4, 0x13, 0x5c, 0x0f, 0x6e, 0x16,
- 0xe2, 0xb2, 0xf3, 0xee, 0x65, 0xbc, 0xaf, 0xb1, 0x82, 0xa0, 0x47, 0x5c, 0x3f, 0xb8, 0x88, 0xdc,
- 0x02, 0x16, 0x25, 0xcb, 0x37, 0x86, 0x06, 0x75, 0x83, 0xd7, 0x10, 0x71, 0xdd, 0xd8, 0x98, 0xe1,
- 0xe2, 0x41, 0xe4, 0x67, 0x80, 0x1d, 0xdb, 0x33, 0x7c, 0xe3, 0x31, 0x55, 0x0d, 0x2b, 0x7c, 0x3a,
- 0x61, 0xd7, 0x8f, 0xac, 0x82, 0x42, 0x49, 0xcb, 0xf2, 0x23, 0xb6, 0x45, 0x47, 0x64, 0x8e, 0xcd,
- 0x36, 0xf3, 0x8c, 0x82, 0x42, 0x49, 0xc4, 0xbe, 0x01, 0x65, 0xdd, 0x9e, 0xb2, 0x9a, 0x4c, 0xf0,
- 0xd8, 0xd9, 0x91, 0x52, 0x4a, 0x02, 0x8b, 0x28, 0x41, 0xb5, 0x3d, 0x7b, 0xb3, 0x29, 0x2b, 0x25,
- 0x81, 0x09, 0xca, 0x4d, 0xd8, 0x20, 0xa3, 0x91, 0xcb, 0x8c, 0x87, 0x86, 0xc4, 0xfd, 0xa1, 0x12,
- 0xc1, 0x9c, 0xb8, 0x73, 0x02, 0x85, 0x30, 0x0e, 0xec, 0xa8, 0x66, 0x91, 0x50, 0x1d, 0xf1, 0x6e,
- 0x97, 0xde, 0x2b, 0x2a, 0x05, 0x2b, 0x14, 0xde, 0x80, 0xb2, 0xe1, 0xa9, 0xb3, 0x27, 0xe8, 0xf4,
- 0x6e, 0x7a, 0xaf, 0xa0, 0x94, 0x0c, 0x2f, 0x7a, 0xbe, 0xab, 0x7e, 0x93, 0x86, 0x4a, 0xf2, 0x09,
- 0x1d, 0x37, 0xa1, 0x60, 0xda, 0x1a, 0xe1, 0xa9, 0x25, 0xbe, 0xdf, 0xec, 0x3d, 0xe7, 0xd5, 0xbd,
- 0xd6, 0x0e, 0xf8, 0x4a, 0xa4, 0xb9, 0xf3, 0x8f, 0x14, 0x14, 0x42, 0x18, 0x5f, 0x81, 0xac, 0x43,
- 0xfc, 0x31, 0x37, 0x97, 0x3b, 0x4a, 0xa3, 0x94, 0xc2, 0xdb, 0x0c, 0xf7, 0x1c, 0x62, 0xf1, 0x14,
- 0x08, 0x70, 0xd6, 0x66, 0xf3, 0x6a, 0x52, 0xa2, 0xf3, 0xcb, 0x89, 0x3d, 0x99, 0x50, 0xcb, 0xf7,
- 0xc2, 0x79, 0x0d, 0xf0, 0x46, 0x00, 0xe3, 0x77, 0x60, 0xd3, 0x77, 0x89, 0x61, 0x26, 0xb8, 0x59,
- 0xce, 0x45, 0xa1, 0x20, 0x22, 0x1f, 0xc2, 0xb5, 0xd0, 0xae, 0x4e, 0x7d, 0xa2, 0x8d, 0xa9, 0x3e,
- 0x53, 0xca, 0xf3, 0xf7, 0xd9, 0xab, 0x01, 0xa1, 0x19, 0xc8, 0x43, 0xdd, 0xea, 0x77, 0x29, 0xd8,
- 0x0c, 0xaf, 0x53, 0x7a, 0x14, 0xac, 0x53, 0x00, 0x62, 0x59, 0xb6, 0x1f, 0x0f, 0xd7, 0x62, 0x2a,
- 0x2f, 0xe8, 0xd5, 0xea, 0x91, 0x92, 0x12, 0x33, 0xb0, 0x33, 0x01, 0x98, 0x49, 0x56, 0x86, 0xed,
- 0x3a, 0x94, 0x82, 0xef, 0x23, 0xfc, 0x23, 0x9b, 0xb8, 0x80, 0x83, 0x80, 0xd8, 0xbd, 0x0b, 0x6f,
- 0x43, 0xee, 0x9c, 0x8e, 0x0c, 0x2b, 0x78, 0xf5, 0x14, 0x8d, 0xf0, 0x25, 0x37, 0x1b, 0xbd, 0xe4,
- 0x1e, 0xfd, 0x21, 0x05, 0x5b, 0x9a, 0x3d, 0x99, 0xf7, 0xf7, 0x08, 0xcd, 0xbd, 0x02, 0x78, 0x9f,
- 0xa4, 0xbe, 0xf8, 0x78, 0x64, 0xf8, 0xe3, 0xe9, 0x79, 0x4d, 0xb3, 0x27, 0xfb, 0x23, 0xdb, 0x24,
- 0xd6, 0x68, 0xf6, 0x95, 0x90, 0xff, 0xd1, 0xde, 0x1d, 0x51, 0xeb, 0xdd, 0x91, 0x1d, 0xfb, 0x66,
- 0xf8, 0xd1, 0xec, 0xef, 0xd7, 0xe9, 0xcc, 0x71, 0xef, 0xe8, 0xaf, 0xe9, 0x9d, 0x63, 0xd1, 0x57,
- 0x2f, 0x8c, 0x8d, 0x42, 0x87, 0x26, 0xd5, 0xd8, 0x78, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x0c,
- 0xab, 0xb6, 0x37, 0x7e, 0x1c, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
deleted file mode 100644
index 4d4fb378f..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
+++ /dev/null
@@ -1,849 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// The messages in this file describe the definitions found in .proto files.
-// A valid .proto file can be translated directly to a FileDescriptorProto
-// without any other information (e.g. without reading its imports).
-
-
-syntax = "proto2";
-
-package google.protobuf;
-option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "DescriptorProtos";
-option csharp_namespace = "Google.Protobuf.Reflection";
-option objc_class_prefix = "GPB";
-
-// descriptor.proto must be optimized for speed because reflection-based
-// algorithms don't work during bootstrapping.
-option optimize_for = SPEED;
-
-// The protocol compiler can output a FileDescriptorSet containing the .proto
-// files it parses.
-message FileDescriptorSet {
- repeated FileDescriptorProto file = 1;
-}
-
-// Describes a complete .proto file.
-message FileDescriptorProto {
- optional string name = 1; // file name, relative to root of source tree
- optional string package = 2; // e.g. "foo", "foo.bar", etc.
-
- // Names of files imported by this file.
- repeated string dependency = 3;
- // Indexes of the public imported files in the dependency list above.
- repeated int32 public_dependency = 10;
- // Indexes of the weak imported files in the dependency list.
- // For Google-internal migration only. Do not use.
- repeated int32 weak_dependency = 11;
-
- // All top-level definitions in this file.
- repeated DescriptorProto message_type = 4;
- repeated EnumDescriptorProto enum_type = 5;
- repeated ServiceDescriptorProto service = 6;
- repeated FieldDescriptorProto extension = 7;
-
- optional FileOptions options = 8;
-
- // This field contains optional information about the original source code.
- // You may safely remove this entire field without harming runtime
- // functionality of the descriptors -- the information is needed only by
- // development tools.
- optional SourceCodeInfo source_code_info = 9;
-
- // The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
- optional string syntax = 12;
-}
-
-// Describes a message type.
-message DescriptorProto {
- optional string name = 1;
-
- repeated FieldDescriptorProto field = 2;
- repeated FieldDescriptorProto extension = 6;
-
- repeated DescriptorProto nested_type = 3;
- repeated EnumDescriptorProto enum_type = 4;
-
- message ExtensionRange {
- optional int32 start = 1;
- optional int32 end = 2;
-
- optional ExtensionRangeOptions options = 3;
- }
- repeated ExtensionRange extension_range = 5;
-
- repeated OneofDescriptorProto oneof_decl = 8;
-
- optional MessageOptions options = 7;
-
- // Range of reserved tag numbers. Reserved tag numbers may not be used by
- // fields or extension ranges in the same message. Reserved ranges may
- // not overlap.
- message ReservedRange {
- optional int32 start = 1; // Inclusive.
- optional int32 end = 2; // Exclusive.
- }
- repeated ReservedRange reserved_range = 9;
- // Reserved field names, which may not be used by fields in the same message.
- // A given name may only be reserved once.
- repeated string reserved_name = 10;
-}
-
-message ExtensionRangeOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-// Describes a field within a message.
-message FieldDescriptorProto {
- enum Type {
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- TYPE_DOUBLE = 1;
- TYPE_FLOAT = 2;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- TYPE_INT64 = 3;
- TYPE_UINT64 = 4;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- TYPE_INT32 = 5;
- TYPE_FIXED64 = 6;
- TYPE_FIXED32 = 7;
- TYPE_BOOL = 8;
- TYPE_STRING = 9;
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- TYPE_GROUP = 10;
- TYPE_MESSAGE = 11; // Length-delimited aggregate.
-
- // New in version 2.
- TYPE_BYTES = 12;
- TYPE_UINT32 = 13;
- TYPE_ENUM = 14;
- TYPE_SFIXED32 = 15;
- TYPE_SFIXED64 = 16;
- TYPE_SINT32 = 17; // Uses ZigZag encoding.
- TYPE_SINT64 = 18; // Uses ZigZag encoding.
- };
-
- enum Label {
- // 0 is reserved for errors
- LABEL_OPTIONAL = 1;
- LABEL_REQUIRED = 2;
- LABEL_REPEATED = 3;
- };
-
- optional string name = 1;
- optional int32 number = 3;
- optional Label label = 4;
-
- // If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- optional Type type = 5;
-
- // For message and enum types, this is the name of the type. If the name
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- // rules are used to find the type (i.e. first the nested types within this
- // message are searched, then within the parent, on up to the root
- // namespace).
- optional string type_name = 6;
-
- // For extensions, this is the name of the type being extended. It is
- // resolved in the same manner as type_name.
- optional string extendee = 2;
-
- // For numeric types, contains the original text representation of the value.
- // For booleans, "true" or "false".
- // For strings, contains the default text contents (not escaped in any way).
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
- optional string default_value = 7;
-
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof.
- optional int32 oneof_index = 9;
-
- // JSON name of this field. The value is set by protocol compiler. If the
- // user has set a "json_name" option on this field, that option's value
- // will be used. Otherwise, it's deduced from the field's name by converting
- // it to camelCase.
- optional string json_name = 10;
-
- optional FieldOptions options = 8;
-}
-
-// Describes a oneof.
-message OneofDescriptorProto {
- optional string name = 1;
- optional OneofOptions options = 2;
-}
-
-// Describes an enum type.
-message EnumDescriptorProto {
- optional string name = 1;
-
- repeated EnumValueDescriptorProto value = 2;
-
- optional EnumOptions options = 3;
-}
-
-// Describes a value within an enum.
-message EnumValueDescriptorProto {
- optional string name = 1;
- optional int32 number = 2;
-
- optional EnumValueOptions options = 3;
-}
-
-// Describes a service.
-message ServiceDescriptorProto {
- optional string name = 1;
- repeated MethodDescriptorProto method = 2;
-
- optional ServiceOptions options = 3;
-}
-
-// Describes a method of a service.
-message MethodDescriptorProto {
- optional string name = 1;
-
- // Input and output type names. These are resolved in the same way as
- // FieldDescriptorProto.type_name, but must refer to a message type.
- optional string input_type = 2;
- optional string output_type = 3;
-
- optional MethodOptions options = 4;
-
- // Identifies if client streams multiple client messages
- optional bool client_streaming = 5 [default=false];
- // Identifies if server streams multiple server messages
- optional bool server_streaming = 6 [default=false];
-}
-
-
-// ===================================================================
-// Options
-
-// Each of the definitions above may have "options" attached. These are
-// just annotations which may cause code to be generated slightly differently
-// or may contain hints for code that manipulates protocol messages.
-//
-// Clients may define custom options as extensions of the *Options messages.
-// These extensions may not yet be known at parsing time, so the parser cannot
-// store the values in them. Instead it stores them in a field in the *Options
-// message called uninterpreted_option. This field must have the same name
-// across all *Options messages. We then use this field to populate the
-// extensions when we build a descriptor, at which point all protos have been
-// parsed and so all extensions are known.
-//
-// Extension numbers for custom options may be chosen as follows:
-// * For options which will only be used within a single application or
-// organization, or for experimental options, use field numbers 50000
-// through 99999. It is up to you to ensure that you do not use the
-// same number for multiple options.
-// * For options which will be published and used publicly by multiple
-// independent entities, e-mail protobuf-global-extension-registry@google.com
-// to reserve extension numbers. Simply provide your project name (e.g.
-// Objective-C plugin) and your project website (if available) -- there's no
-// need to explain how you intend to use them. Usually you only need one
-// extension number. You can declare multiple options with only one extension
-// number by putting them in a sub-message. See the Custom Options section of
-// the docs for examples:
-// https://developers.google.com/protocol-buffers/docs/proto#options
-// If this turns out to be popular, a web service will be set up
-// to automatically assign option numbers.
-
-
-message FileOptions {
-
- // Sets the Java package where classes generated from this .proto will be
- // placed. By default, the proto package is used, but this is often
- // inappropriate because proto packages do not normally start with backwards
- // domain names.
- optional string java_package = 1;
-
-
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
- optional string java_outer_classname = 8;
-
- // If set true, then the Java code generator will generate a separate .java
- // file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
- // generated to contain the file's getDescriptor() method as well as any
- // top-level extensions defined in the file.
- optional bool java_multiple_files = 10 [default=false];
-
- // This option does nothing.
- optional bool java_generate_equals_and_hash = 20 [deprecated=true];
-
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- optional bool java_string_check_utf8 = 27 [default=false];
-
-
- // Generated classes can be optimized for speed or code size.
- enum OptimizeMode {
- SPEED = 1; // Generate complete code for parsing, serialization,
- // etc.
- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
- }
- optional OptimizeMode optimize_for = 9 [default=SPEED];
-
- // Sets the Go package where structs generated from this .proto will be
- // placed. If omitted, the Go package will be derived from the following:
- // - The basename of the package import path, if provided.
- // - Otherwise, the package statement in the .proto file, if present.
- // - Otherwise, the basename of the .proto file, without extension.
- optional string go_package = 11;
-
-
-
- // Should generic services be generated in each language? "Generic" services
- // are not specific to any particular RPC system. They are generated by the
- // main code generators in each language (without additional plugins).
- // Generic services were the only kind of service generation supported by
- // early versions of google.protobuf.
- //
- // Generic services are now considered deprecated in favor of using plugins
- // that generate code specific to your particular RPC system. Therefore,
- // these default to false. Old code which depends on generic services should
- // explicitly set them to true.
- optional bool cc_generic_services = 16 [default=false];
- optional bool java_generic_services = 17 [default=false];
- optional bool py_generic_services = 18 [default=false];
- optional bool php_generic_services = 42 [default=false];
-
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- optional bool deprecated = 23 [default=false];
-
- // Enables the use of arenas for the proto messages in this file. This applies
- // only to generated classes for C++.
- optional bool cc_enable_arenas = 31 [default=false];
-
-
- // Sets the objective c class prefix which is prepended to all objective c
- // generated classes from this .proto. There is no default.
- optional string objc_class_prefix = 36;
-
- // Namespace for generated classes; defaults to the package.
- optional string csharp_namespace = 37;
-
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- optional string swift_prefix = 39;
-
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- optional string php_class_prefix = 40;
-
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- optional string php_namespace = 41;
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 38;
-}
-
-message MessageOptions {
- // Set true to use the old proto1 MessageSet wire format for extensions.
- // This is provided for backwards-compatibility with the MessageSet wire
- // format. You should not use this for any other reason: It's less
- // efficient, has fewer features, and is more complicated.
- //
- // The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
- // Note that the message cannot have any defined fields; MessageSets only
- // have extensions.
- //
- // All extensions of your type must be singular messages; e.g. they cannot
- // be int32s, enums, or repeated messages.
- //
- // Because this is an option, the above two restrictions are not enforced by
- // the protocol compiler.
- optional bool message_set_wire_format = 1 [default=false];
-
- // Disables the generation of the standard "descriptor()" accessor, which can
- // conflict with a field of the same name. This is meant to make migration
- // from proto1 easier; new code should avoid fields named "descriptor".
- optional bool no_standard_descriptor_accessor = 2 [default=false];
-
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- optional bool deprecated = 3 [default=false];
-
- // Whether the message is an automatically generated map entry type for the
- // maps field.
- //
- // For maps fields:
- // map<KeyType, ValueType> map_field = 1;
- // The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
- //
- // Implementations may choose not to generate the map_entry=true message, but
- // use a native map in the target language to hold the keys and values.
- // The reflection APIs in such implementions still need to work as
- // if the field is a repeated message field.
- //
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
- // instead. The option should only be implicitly set by the proto compiler
- // parser.
- optional bool map_entry = 7;
-
- reserved 8; // javalite_serializable
- reserved 9; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message FieldOptions {
- // The ctype option instructs the C++ code generator to use a different
- // representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
- optional CType ctype = 1 [default = STRING];
- enum CType {
- // Default mode.
- STRING = 0;
-
- CORD = 1;
-
- STRING_PIECE = 2;
- }
- // The packed option can be enabled for repeated primitive fields to enable
- // a more efficient representation on the wire. Rather than repeatedly
- // writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
- optional bool packed = 2;
-
- // The jstype option determines the JavaScript type used for values of the
- // field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- // is represented as JavaScript string, which avoids loss of precision that
- // can happen when a large value is converted to a floating point JavaScript.
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- // use the JavaScript "number" type. The behavior of the default option
- // JS_NORMAL is implementation dependent.
- //
- // This option is an enum to permit additional types to be added, e.g.
- // goog.math.Integer.
- optional JSType jstype = 6 [default = JS_NORMAL];
- enum JSType {
- // Use the default type.
- JS_NORMAL = 0;
-
- // Use JavaScript strings.
- JS_STRING = 1;
-
- // Use JavaScript numbers.
- JS_NUMBER = 2;
- }
-
- // Should this field be parsed lazily? Lazy applies only to message-type
- // fields. It means that when the outer message is initially parsed, the
- // inner message's contents will not be parsed but instead stored in encoded
- // form. The inner message will actually be parsed when it is first accessed.
- //
- // This is only a hint. Implementations are free to choose whether to use
- // eager or lazy parsing regardless of the value of this option. However,
- // setting this option true suggests that the protocol author believes that
- // using lazy parsing on this field is worth the additional bookkeeping
- // overhead typically needed to implement it.
- //
- // This option does not affect the public interface of any generated code;
- // all method signatures remain the same. Furthermore, thread-safety of the
- // interface is not affected by this option; const methods remain safe to
- // call from multiple threads concurrently, while non-const methods continue
- // to require exclusive access.
- //
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
- optional bool lazy = 5 [default=false];
-
- // Is this field deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for accessors, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating fields.
- optional bool deprecated = 3 [default=false];
-
- // For Google-internal migration only. Do not use.
- optional bool weak = 10 [default=false];
-
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 4; // removed jtype
-}
-
-message OneofOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumOptions {
-
- // Set this option to true to allow mapping different tag names to the same
- // value.
- optional bool allow_alias = 2;
-
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- optional bool deprecated = 3 [default=false];
-
- reserved 5; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumValueOptions {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- optional bool deprecated = 1 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message ServiceOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- optional bool deprecated = 33 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message MethodOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- optional bool deprecated = 33 [default=false];
-
- // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
- // or neither? HTTP based RPC implementation may choose GET verb for safe
- // methods, and PUT verb for idempotent methods instead of the default POST.
- enum IdempotencyLevel {
- IDEMPOTENCY_UNKNOWN = 0;
- NO_SIDE_EFFECTS = 1; // implies idempotent
- IDEMPOTENT = 2; // idempotent, but may have side effects
- }
- optional IdempotencyLevel idempotency_level =
- 34 [default=IDEMPOTENCY_UNKNOWN];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-
-// A message representing a option the parser does not recognize. This only
-// appears in options protos created by the compiler::Parser class.
-// DescriptorPool resolves these when building Descriptor objects. Therefore,
-// options protos in descriptor objects (e.g. returned by Descriptor::options(),
-// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
-// in them.
-message UninterpretedOption {
- // The name of the uninterpreted option. Each string represents a segment in
- // a dot-separated name. is_extension is true iff a segment represents an
- // extension (denoted with parentheses in options specs in .proto files).
- // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
- // "foo.(bar.baz).qux".
- message NamePart {
- required string name_part = 1;
- required bool is_extension = 2;
- }
- repeated NamePart name = 2;
-
- // The value of the uninterpreted option, in whatever type the tokenizer
- // identified it as during parsing. Exactly one of these should be set.
- optional string identifier_value = 3;
- optional uint64 positive_int_value = 4;
- optional int64 negative_int_value = 5;
- optional double double_value = 6;
- optional bytes string_value = 7;
- optional string aggregate_value = 8;
-}
-
-// ===================================================================
-// Optional source code info
-
-// Encapsulates information about the original source file from which a
-// FileDescriptorProto was generated.
-message SourceCodeInfo {
- // A Location identifies a piece of source code in a .proto file which
- // corresponds to a particular definition. This information is intended
- // to be useful to IDEs, code indexers, documentation generators, and similar
- // tools.
- //
- // For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
- // Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
- // We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- //
- // Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendent. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
- repeated Location location = 1;
- message Location {
- // Identifies which part of the FileDescriptorProto was defined at this
- // location.
- //
- // Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
- // refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
- // This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
- // and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
- // and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
- //
- // Thus, the above path gives the location of a field name. If we removed
- // the last element:
- // [ 4, 3, 2, 7 ]
- // this path refers to the whole field declaration (from the beginning
- // of the label to the terminating semicolon).
- repeated int32 path = 1 [packed=true];
-
- // Always has exactly three or four elements: start line, start column,
- // end line (optional, otherwise assumed same as start line), end column.
- // These are packed into a single field for efficiency. Note that line
- // and column numbers are zero-based -- typically you will want to add
- // 1 to each before displaying to a user.
- repeated int32 span = 2 [packed=true];
-
- // If this SourceCodeInfo represents a complete declaration, these are any
- // comments appearing before and after the declaration which appear to be
- // attached to the declaration.
- //
- // A series of line comments appearing on consecutive lines, with no other
- // tokens appearing on those lines, will be treated as a single comment.
- //
- // leading_detached_comments will keep paragraphs of comments that appear
- // before (but not connected to) the current element. Each paragraph,
- // separated by empty lines, will be one comment element in the repeated
- // field.
- //
- // Only the comment content is provided; comment markers (e.g. //) are
- // stripped out. For block comments, leading whitespace and an asterisk
- // will be stripped from the beginning of each line other than the first.
- // Newlines are included in the output.
- //
- // Examples:
- //
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
- //
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
- //
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
- //
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
- //
- // // Detached comment for corge paragraph 2.
- //
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
- //
- // // ignored detached comments.
- optional string leading_comments = 3;
- optional string trailing_comments = 4;
- repeated string leading_detached_comments = 6;
- }
-}
-
-// Describes the relationship between generated code and its original source
-// file. A GeneratedCodeInfo message is associated with only one generated
-// source file, but may contain references to different source .proto files.
-message GeneratedCodeInfo {
- // An Annotation connects some span of text in generated code to an element
- // of its generating .proto file.
- repeated Annotation annotation = 1;
- message Annotation {
- // Identifies the element in the original source .proto file. This field
- // is formatted the same as SourceCodeInfo.Location.path.
- repeated int32 path = 1 [packed=true];
-
- // Identifies the filesystem path to the original source .proto.
- optional string source_file = 2;
-
- // Identifies the starting offset in bytes in the generated code
- // that relates to the identified object.
- optional int32 begin = 3;
-
- // Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
- // the last relevant byte (so the length of the text = end - begin).
- optional int32 end = 4;
- }
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go
deleted file mode 100644
index 0d6055d61..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-/*
- A plugin for the Google protocol buffer compiler to generate Go code.
- Run it by building this program and putting it in your path with the name
- protoc-gen-go
- That word 'go' at the end becomes part of the option string set for the
- protocol compiler, so once the protocol compiler (protoc) is installed
- you can run
- protoc --go_out=output_directory input_directory/file.proto
- to generate Go bindings for the protocol defined by file.proto.
- With that input, the output will be written to
- output_directory/file.pb.go
-
- The generated code is documented in the package comment for
- the library.
-
- See the README and documentation for protocol buffers to learn more:
- https://developers.google.com/protocol-buffers/
-
-*/
-package documentation
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile
deleted file mode 100644
index b5715c357..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-include $(GOROOT)/src/Make.inc
-
-TARG=github.com/golang/protobuf/compiler/generator
-GOFILES=\
- generator.go\
-
-DEPS=../descriptor ../plugin ../../proto
-
-include $(GOROOT)/src/Make.pkg
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go
deleted file mode 100644
index 569451f80..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go
+++ /dev/null
@@ -1,2870 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-/*
- The code generator for the plugin for the Google protocol buffer compiler.
- It generates Go code from the protocol buffer description files read by the
- main routine.
-*/
-package generator
-
-import (
- "bufio"
- "bytes"
- "compress/gzip"
- "fmt"
- "go/parser"
- "go/printer"
- "go/token"
- "log"
- "os"
- "path"
- "strconv"
- "strings"
- "unicode"
- "unicode/utf8"
-
- "github.com/golang/protobuf/proto"
-
- "github.com/golang/protobuf/protoc-gen-go/descriptor"
- plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
-)
-
-// generatedCodeVersion indicates a version of the generated code.
-// It is incremented whenever an incompatibility between the generated code and
-// proto package is introduced; the generated code references
-// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion).
-const generatedCodeVersion = 2
-
-// A Plugin provides functionality to add to the output during Go code generation,
-// such as to produce RPC stubs.
-type Plugin interface {
- // Name identifies the plugin.
- Name() string
- // Init is called once after data structures are built but before
- // code generation begins.
- Init(g *Generator)
- // Generate produces the code generated by the plugin for this file,
- // except for the imports, by calling the generator's methods P, In, and Out.
- Generate(file *FileDescriptor)
- // GenerateImports produces the import declarations for this file.
- // It is called after Generate.
- GenerateImports(file *FileDescriptor)
-}
-
-var plugins []Plugin
-
-// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated.
-// It is typically called during initialization.
-func RegisterPlugin(p Plugin) {
- plugins = append(plugins, p)
-}
-
-// Each type we import as a protocol buffer (other than FileDescriptorProto) needs
-// a pointer to the FileDescriptorProto that represents it. These types achieve that
-// wrapping by placing each Proto inside a struct with the pointer to its File. The
-// structs have the same names as their contents, with "Proto" removed.
-// FileDescriptor is used to store the things that it points to.
-
-// The file and package name method are common to messages and enums.
-type common struct {
- file *descriptor.FileDescriptorProto // File this object comes from.
-}
-
-// PackageName is name in the package clause in the generated file.
-func (c *common) PackageName() string { return uniquePackageOf(c.file) }
-
-func (c *common) File() *descriptor.FileDescriptorProto { return c.file }
-
-func fileIsProto3(file *descriptor.FileDescriptorProto) bool {
- return file.GetSyntax() == "proto3"
-}
-
-func (c *common) proto3() bool { return fileIsProto3(c.file) }
-
-// Descriptor represents a protocol buffer message.
-type Descriptor struct {
- common
- *descriptor.DescriptorProto
- parent *Descriptor // The containing message, if any.
- nested []*Descriptor // Inner messages, if any.
- enums []*EnumDescriptor // Inner enums, if any.
- ext []*ExtensionDescriptor // Extensions, if any.
- typename []string // Cached typename vector.
- index int // The index into the container, whether the file or another message.
- path string // The SourceCodeInfo path as comma-separated integers.
- group bool
-}
-
-// TypeName returns the elements of the dotted type name.
-// The package name is not part of this name.
-func (d *Descriptor) TypeName() []string {
- if d.typename != nil {
- return d.typename
- }
- n := 0
- for parent := d; parent != nil; parent = parent.parent {
- n++
- }
- s := make([]string, n, n)
- for parent := d; parent != nil; parent = parent.parent {
- n--
- s[n] = parent.GetName()
- }
- d.typename = s
- return s
-}
-
-// EnumDescriptor describes an enum. If it's at top level, its parent will be nil.
-// Otherwise it will be the descriptor of the message in which it is defined.
-type EnumDescriptor struct {
- common
- *descriptor.EnumDescriptorProto
- parent *Descriptor // The containing message, if any.
- typename []string // Cached typename vector.
- index int // The index into the container, whether the file or a message.
- path string // The SourceCodeInfo path as comma-separated integers.
-}
-
-// TypeName returns the elements of the dotted type name.
-// The package name is not part of this name.
-func (e *EnumDescriptor) TypeName() (s []string) {
- if e.typename != nil {
- return e.typename
- }
- name := e.GetName()
- if e.parent == nil {
- s = make([]string, 1)
- } else {
- pname := e.parent.TypeName()
- s = make([]string, len(pname)+1)
- copy(s, pname)
- }
- s[len(s)-1] = name
- e.typename = s
- return s
-}
-
-// Everything but the last element of the full type name, CamelCased.
-// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... .
-func (e *EnumDescriptor) prefix() string {
- if e.parent == nil {
- // If the enum is not part of a message, the prefix is just the type name.
- return CamelCase(*e.Name) + "_"
- }
- typeName := e.TypeName()
- return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_"
-}
-
-// The integer value of the named constant in this enumerated type.
-func (e *EnumDescriptor) integerValueAsString(name string) string {
- for _, c := range e.Value {
- if c.GetName() == name {
- return fmt.Sprint(c.GetNumber())
- }
- }
- log.Fatal("cannot find value for enum constant")
- return ""
-}
-
-// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil.
-// Otherwise it will be the descriptor of the message in which it is defined.
-type ExtensionDescriptor struct {
- common
- *descriptor.FieldDescriptorProto
- parent *Descriptor // The containing message, if any.
-}
-
-// TypeName returns the elements of the dotted type name.
-// The package name is not part of this name.
-func (e *ExtensionDescriptor) TypeName() (s []string) {
- name := e.GetName()
- if e.parent == nil {
- // top-level extension
- s = make([]string, 1)
- } else {
- pname := e.parent.TypeName()
- s = make([]string, len(pname)+1)
- copy(s, pname)
- }
- s[len(s)-1] = name
- return s
-}
-
-// DescName returns the variable name used for the generated descriptor.
-func (e *ExtensionDescriptor) DescName() string {
- // The full type name.
- typeName := e.TypeName()
- // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix.
- for i, s := range typeName {
- typeName[i] = CamelCase(s)
- }
- return "E_" + strings.Join(typeName, "_")
-}
-
-// ImportedDescriptor describes a type that has been publicly imported from another file.
-type ImportedDescriptor struct {
- common
- o Object
-}
-
-func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() }
-
-// FileDescriptor describes an protocol buffer descriptor file (.proto).
-// It includes slices of all the messages and enums defined within it.
-// Those slices are constructed by WrapTypes.
-type FileDescriptor struct {
- *descriptor.FileDescriptorProto
- desc []*Descriptor // All the messages defined in this file.
- enum []*EnumDescriptor // All the enums defined in this file.
- ext []*ExtensionDescriptor // All the top-level extensions defined in this file.
- imp []*ImportedDescriptor // All types defined in files publicly imported by this file.
-
- // Comments, stored as a map of path (comma-separated integers) to the comment.
- comments map[string]*descriptor.SourceCodeInfo_Location
-
- // The full list of symbols that are exported,
- // as a map from the exported object to its symbols.
- // This is used for supporting public imports.
- exported map[Object][]symbol
-
- index int // The index of this file in the list of files to generate code for
-
- proto3 bool // whether to generate proto3 code for this file
-}
-
-// PackageName is the package name we'll use in the generated code to refer to this file.
-func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) }
-
-// VarName is the variable name we'll use in the generated code to refer
-// to the compressed bytes of this descriptor. It is not exported, so
-// it is only valid inside the generated package.
-func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%d", d.index) }
-
-// goPackageOption interprets the file's go_package option.
-// If there is no go_package, it returns ("", "", false).
-// If there's a simple name, it returns ("", pkg, true).
-// If the option implies an import path, it returns (impPath, pkg, true).
-func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) {
- pkg = d.GetOptions().GetGoPackage()
- if pkg == "" {
- return
- }
- ok = true
- // The presence of a slash implies there's an import path.
- slash := strings.LastIndex(pkg, "/")
- if slash < 0 {
- return
- }
- impPath, pkg = pkg, pkg[slash+1:]
- // A semicolon-delimited suffix overrides the package name.
- sc := strings.IndexByte(impPath, ';')
- if sc < 0 {
- return
- }
- impPath, pkg = impPath[:sc], impPath[sc+1:]
- return
-}
-
-// goPackageName returns the Go package name to use in the
-// generated Go file. The result explicit reports whether the name
-// came from an option go_package statement. If explicit is false,
-// the name was derived from the protocol buffer's package statement
-// or the input file name.
-func (d *FileDescriptor) goPackageName() (name string, explicit bool) {
- // Does the file have a "go_package" option?
- if _, pkg, ok := d.goPackageOption(); ok {
- return pkg, true
- }
-
- // Does the file have a package clause?
- if pkg := d.GetPackage(); pkg != "" {
- return pkg, false
- }
- // Use the file base name.
- return baseName(d.GetName()), false
-}
-
-// goFileName returns the output name for the generated Go file.
-func (d *FileDescriptor) goFileName() string {
- name := *d.Name
- if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" {
- name = name[:len(name)-len(ext)]
- }
- name += ".pb.go"
-
- // Does the file have a "go_package" option?
- // If it does, it may override the filename.
- if impPath, _, ok := d.goPackageOption(); ok && impPath != "" {
- // Replace the existing dirname with the declared import path.
- _, name = path.Split(name)
- name = path.Join(impPath, name)
- return name
- }
-
- return name
-}
-
-func (d *FileDescriptor) addExport(obj Object, sym symbol) {
- d.exported[obj] = append(d.exported[obj], sym)
-}
-
-// symbol is an interface representing an exported Go symbol.
-type symbol interface {
- // GenerateAlias should generate an appropriate alias
- // for the symbol from the named package.
- GenerateAlias(g *Generator, pkg string)
-}
-
-type messageSymbol struct {
- sym string
- hasExtensions, isMessageSet bool
- hasOneof bool
- getters []getterSymbol
-}
-
-type getterSymbol struct {
- name string
- typ string
- typeName string // canonical name in proto world; empty for proto.Message and similar
- genType bool // whether typ contains a generated type (message/group/enum)
-}
-
-func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) {
- remoteSym := pkg + "." + ms.sym
-
- g.P("type ", ms.sym, " ", remoteSym)
- g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }")
- g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }")
- g.P("func (*", ms.sym, ") ProtoMessage() {}")
- if ms.hasExtensions {
- g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ",
- "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }")
- if ms.isMessageSet {
- g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ",
- "{ return (*", remoteSym, ")(m).Marshal() }")
- g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ",
- "{ return (*", remoteSym, ")(m).Unmarshal(buf) }")
- }
- }
- if ms.hasOneof {
- // Oneofs and public imports do not mix well.
- // We can make them work okay for the binary format,
- // but they're going to break weirdly for text/JSON.
- enc := "_" + ms.sym + "_OneofMarshaler"
- dec := "_" + ms.sym + "_OneofUnmarshaler"
- size := "_" + ms.sym + "_OneofSizer"
- encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
- decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
- sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int"
- g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
- g.P("return ", enc, ", ", dec, ", ", size, ", nil")
- g.P("}")
-
- g.P("func ", enc, encSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("enc, _, _, _ := m0.XXX_OneofFuncs()")
- g.P("return enc(m0, b)")
- g.P("}")
-
- g.P("func ", dec, decSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("_, dec, _, _ := m0.XXX_OneofFuncs()")
- g.P("return dec(m0, tag, wire, b)")
- g.P("}")
-
- g.P("func ", size, sizeSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("_, _, size, _ := m0.XXX_OneofFuncs()")
- g.P("return size(m0)")
- g.P("}")
- }
- for _, get := range ms.getters {
-
- if get.typeName != "" {
- g.RecordTypeUse(get.typeName)
- }
- typ := get.typ
- val := "(*" + remoteSym + ")(m)." + get.name + "()"
- if get.genType {
- // typ will be "*pkg.T" (message/group) or "pkg.T" (enum)
- // or "map[t]*pkg.T" (map to message/enum).
- // The first two of those might have a "[]" prefix if it is repeated.
- // Drop any package qualifier since we have hoisted the type into this package.
- rep := strings.HasPrefix(typ, "[]")
- if rep {
- typ = typ[2:]
- }
- isMap := strings.HasPrefix(typ, "map[")
- star := typ[0] == '*'
- if !isMap { // map types handled lower down
- typ = typ[strings.Index(typ, ".")+1:]
- }
- if star {
- typ = "*" + typ
- }
- if rep {
- // Go does not permit conversion between slice types where both
- // element types are named. That means we need to generate a bit
- // of code in this situation.
- // typ is the element type.
- // val is the expression to get the slice from the imported type.
-
- ctyp := typ // conversion type expression; "Foo" or "(*Foo)"
- if star {
- ctyp = "(" + typ + ")"
- }
-
- g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {")
- g.In()
- g.P("o := ", val)
- g.P("if o == nil {")
- g.In()
- g.P("return nil")
- g.Out()
- g.P("}")
- g.P("s := make([]", typ, ", len(o))")
- g.P("for i, x := range o {")
- g.In()
- g.P("s[i] = ", ctyp, "(x)")
- g.Out()
- g.P("}")
- g.P("return s")
- g.Out()
- g.P("}")
- continue
- }
- if isMap {
- // Split map[keyTyp]valTyp.
- bra, ket := strings.Index(typ, "["), strings.Index(typ, "]")
- keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:]
- // Drop any package qualifier.
- // Only the value type may be foreign.
- star := valTyp[0] == '*'
- valTyp = valTyp[strings.Index(valTyp, ".")+1:]
- if star {
- valTyp = "*" + valTyp
- }
-
- typ := "map[" + keyTyp + "]" + valTyp
- g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {")
- g.P("o := ", val)
- g.P("if o == nil { return nil }")
- g.P("s := make(", typ, ", len(o))")
- g.P("for k, v := range o {")
- g.P("s[k] = (", valTyp, ")(v)")
- g.P("}")
- g.P("return s")
- g.P("}")
- continue
- }
- // Convert imported type into the forwarding type.
- val = "(" + typ + ")(" + val + ")"
- }
-
- g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }")
- }
-
-}
-
-type enumSymbol struct {
- name string
- proto3 bool // Whether this came from a proto3 file.
-}
-
-func (es enumSymbol) GenerateAlias(g *Generator, pkg string) {
- s := es.name
- g.P("type ", s, " ", pkg, ".", s)
- g.P("var ", s, "_name = ", pkg, ".", s, "_name")
- g.P("var ", s, "_value = ", pkg, ".", s, "_value")
- g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }")
- if !es.proto3 {
- g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }")
- g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }")
- }
-}
-
-type constOrVarSymbol struct {
- sym string
- typ string // either "const" or "var"
- cast string // if non-empty, a type cast is required (used for enums)
-}
-
-func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) {
- v := pkg + "." + cs.sym
- if cs.cast != "" {
- v = cs.cast + "(" + v + ")"
- }
- g.P(cs.typ, " ", cs.sym, " = ", v)
-}
-
-// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects.
-type Object interface {
- PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness.
- TypeName() []string
- File() *descriptor.FileDescriptorProto
-}
-
-// Each package name we generate must be unique. The package we're generating
-// gets its own name but every other package must have a unique name that does
-// not conflict in the code we generate. These names are chosen globally (although
-// they don't have to be, it simplifies things to do them globally).
-func uniquePackageOf(fd *descriptor.FileDescriptorProto) string {
- s, ok := uniquePackageName[fd]
- if !ok {
- log.Fatal("internal error: no package name defined for " + fd.GetName())
- }
- return s
-}
-
-// Generator is the type whose methods generate the output, stored in the associated response structure.
-type Generator struct {
- *bytes.Buffer
-
- Request *plugin.CodeGeneratorRequest // The input.
- Response *plugin.CodeGeneratorResponse // The output.
-
- Param map[string]string // Command-line parameters.
- PackageImportPath string // Go import path of the package we're generating code for
- ImportPrefix string // String to prefix to imported package file names.
- ImportMap map[string]string // Mapping from .proto file name to import path
-
- Pkg map[string]string // The names under which we import support packages
-
- packageName string // What we're calling ourselves.
- allFiles []*FileDescriptor // All files in the tree
- allFilesByName map[string]*FileDescriptor // All files by filename.
- genFiles []*FileDescriptor // Those files we will generate output for.
- file *FileDescriptor // The file we are compiling now.
- usedPackages map[string]bool // Names of packages used in current file.
- typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax.
- init []string // Lines to emit in the init function.
- indent string
- writeOutput bool
-}
-
-// New creates a new generator and allocates the request and response protobufs.
-func New() *Generator {
- g := new(Generator)
- g.Buffer = new(bytes.Buffer)
- g.Request = new(plugin.CodeGeneratorRequest)
- g.Response = new(plugin.CodeGeneratorResponse)
- return g
-}
-
-// Error reports a problem, including an error, and exits the program.
-func (g *Generator) Error(err error, msgs ...string) {
- s := strings.Join(msgs, " ") + ":" + err.Error()
- log.Print("protoc-gen-go: error:", s)
- os.Exit(1)
-}
-
-// Fail reports a problem and exits the program.
-func (g *Generator) Fail(msgs ...string) {
- s := strings.Join(msgs, " ")
- log.Print("protoc-gen-go: error:", s)
- os.Exit(1)
-}
-
-// CommandLineParameters breaks the comma-separated list of key=value pairs
-// in the parameter (a member of the request protobuf) into a key/value map.
-// It then sets file name mappings defined by those entries.
-func (g *Generator) CommandLineParameters(parameter string) {
- g.Param = make(map[string]string)
- for _, p := range strings.Split(parameter, ",") {
- if i := strings.Index(p, "="); i < 0 {
- g.Param[p] = ""
- } else {
- g.Param[p[0:i]] = p[i+1:]
- }
- }
-
- g.ImportMap = make(map[string]string)
- pluginList := "none" // Default list of plugin names to enable (empty means all).
- for k, v := range g.Param {
- switch k {
- case "import_prefix":
- g.ImportPrefix = v
- case "import_path":
- g.PackageImportPath = v
- case "plugins":
- pluginList = v
- default:
- if len(k) > 0 && k[0] == 'M' {
- g.ImportMap[k[1:]] = v
- }
- }
- }
- if pluginList != "" {
- // Amend the set of plugins.
- enabled := make(map[string]bool)
- for _, name := range strings.Split(pluginList, "+") {
- enabled[name] = true
- }
- var nplugins []Plugin
- for _, p := range plugins {
- if enabled[p.Name()] {
- nplugins = append(nplugins, p)
- }
- }
- plugins = nplugins
- }
-}
-
-// DefaultPackageName returns the package name printed for the object.
-// If its file is in a different package, it returns the package name we're using for this file, plus ".".
-// Otherwise it returns the empty string.
-func (g *Generator) DefaultPackageName(obj Object) string {
- pkg := obj.PackageName()
- if pkg == g.packageName {
- return ""
- }
- return pkg + "."
-}
-
-// For each input file, the unique package name to use, underscored.
-var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string)
-
-// Package names already registered. Key is the name from the .proto file;
-// value is the name that appears in the generated code.
-var pkgNamesInUse = make(map[string]bool)
-
-// Create and remember a guaranteed unique package name for this file descriptor.
-// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and
-// has no file descriptor.
-func RegisterUniquePackageName(pkg string, f *FileDescriptor) string {
- // Convert dots to underscores before finding a unique alias.
- pkg = strings.Map(badToUnderscore, pkg)
-
- for i, orig := 1, pkg; pkgNamesInUse[pkg]; i++ {
- // It's a duplicate; must rename.
- pkg = orig + strconv.Itoa(i)
- }
- // Install it.
- pkgNamesInUse[pkg] = true
- if f != nil {
- uniquePackageName[f.FileDescriptorProto] = pkg
- }
- return pkg
-}
-
-var isGoKeyword = map[string]bool{
- "break": true,
- "case": true,
- "chan": true,
- "const": true,
- "continue": true,
- "default": true,
- "else": true,
- "defer": true,
- "fallthrough": true,
- "for": true,
- "func": true,
- "go": true,
- "goto": true,
- "if": true,
- "import": true,
- "interface": true,
- "map": true,
- "package": true,
- "range": true,
- "return": true,
- "select": true,
- "struct": true,
- "switch": true,
- "type": true,
- "var": true,
-}
-
-// defaultGoPackage returns the package name to use,
-// derived from the import path of the package we're building code for.
-func (g *Generator) defaultGoPackage() string {
- p := g.PackageImportPath
- if i := strings.LastIndex(p, "/"); i >= 0 {
- p = p[i+1:]
- }
- if p == "" {
- return ""
- }
-
- p = strings.Map(badToUnderscore, p)
- // Identifier must not be keyword: insert _.
- if isGoKeyword[p] {
- p = "_" + p
- }
- // Identifier must not begin with digit: insert _.
- if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) {
- p = "_" + p
- }
- return p
-}
-
-// SetPackageNames sets the package name for this run.
-// The package name must agree across all files being generated.
-// It also defines unique package names for all imported files.
-func (g *Generator) SetPackageNames() {
- // Register the name for this package. It will be the first name
- // registered so is guaranteed to be unmodified.
- pkg, explicit := g.genFiles[0].goPackageName()
-
- // Check all files for an explicit go_package option.
- for _, f := range g.genFiles {
- thisPkg, thisExplicit := f.goPackageName()
- if thisExplicit {
- if !explicit {
- // Let this file's go_package option serve for all input files.
- pkg, explicit = thisPkg, true
- } else if thisPkg != pkg {
- g.Fail("inconsistent package names:", thisPkg, pkg)
- }
- }
- }
-
- // If we don't have an explicit go_package option but we have an
- // import path, use that.
- if !explicit {
- p := g.defaultGoPackage()
- if p != "" {
- pkg, explicit = p, true
- }
- }
-
- // If there was no go_package and no import path to use,
- // double-check that all the inputs have the same implicit
- // Go package name.
- if !explicit {
- for _, f := range g.genFiles {
- thisPkg, _ := f.goPackageName()
- if thisPkg != pkg {
- g.Fail("inconsistent package names:", thisPkg, pkg)
- }
- }
- }
-
- g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0])
-
- // Register the support package names. They might collide with the
- // name of a package we import.
- g.Pkg = map[string]string{
- "fmt": RegisterUniquePackageName("fmt", nil),
- "math": RegisterUniquePackageName("math", nil),
- "proto": RegisterUniquePackageName("proto", nil),
- }
-
-AllFiles:
- for _, f := range g.allFiles {
- for _, genf := range g.genFiles {
- if f == genf {
- // In this package already.
- uniquePackageName[f.FileDescriptorProto] = g.packageName
- continue AllFiles
- }
- }
- // The file is a dependency, so we want to ignore its go_package option
- // because that is only relevant for its specific generated output.
- pkg := f.GetPackage()
- if pkg == "" {
- pkg = baseName(*f.Name)
- }
- RegisterUniquePackageName(pkg, f)
- }
-}
-
-// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos
-// and FileDescriptorProtos into file-referenced objects within the Generator.
-// It also creates the list of files to generate and so should be called before GenerateAllFiles.
-func (g *Generator) WrapTypes() {
- g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile))
- g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles))
- for _, f := range g.Request.ProtoFile {
- // We must wrap the descriptors before we wrap the enums
- descs := wrapDescriptors(f)
- g.buildNestedDescriptors(descs)
- enums := wrapEnumDescriptors(f, descs)
- g.buildNestedEnums(descs, enums)
- exts := wrapExtensions(f)
- fd := &FileDescriptor{
- FileDescriptorProto: f,
- desc: descs,
- enum: enums,
- ext: exts,
- exported: make(map[Object][]symbol),
- proto3: fileIsProto3(f),
- }
- extractComments(fd)
- g.allFiles = append(g.allFiles, fd)
- g.allFilesByName[f.GetName()] = fd
- }
- for _, fd := range g.allFiles {
- fd.imp = wrapImported(fd.FileDescriptorProto, g)
- }
-
- g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate))
- for _, fileName := range g.Request.FileToGenerate {
- fd := g.allFilesByName[fileName]
- if fd == nil {
- g.Fail("could not find file named", fileName)
- }
- fd.index = len(g.genFiles)
- g.genFiles = append(g.genFiles, fd)
- }
-}
-
-// Scan the descriptors in this file. For each one, build the slice of nested descriptors
-func (g *Generator) buildNestedDescriptors(descs []*Descriptor) {
- for _, desc := range descs {
- if len(desc.NestedType) != 0 {
- for _, nest := range descs {
- if nest.parent == desc {
- desc.nested = append(desc.nested, nest)
- }
- }
- if len(desc.nested) != len(desc.NestedType) {
- g.Fail("internal error: nesting failure for", desc.GetName())
- }
- }
- }
-}
-
-func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) {
- for _, desc := range descs {
- if len(desc.EnumType) != 0 {
- for _, enum := range enums {
- if enum.parent == desc {
- desc.enums = append(desc.enums, enum)
- }
- }
- if len(desc.enums) != len(desc.EnumType) {
- g.Fail("internal error: enum nesting failure for", desc.GetName())
- }
- }
- }
-}
-
-// Construct the Descriptor
-func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor {
- d := &Descriptor{
- common: common{file},
- DescriptorProto: desc,
- parent: parent,
- index: index,
- }
- if parent == nil {
- d.path = fmt.Sprintf("%d,%d", messagePath, index)
- } else {
- d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index)
- }
-
- // The only way to distinguish a group from a message is whether
- // the containing message has a TYPE_GROUP field that matches.
- if parent != nil {
- parts := d.TypeName()
- if file.Package != nil {
- parts = append([]string{*file.Package}, parts...)
- }
- exp := "." + strings.Join(parts, ".")
- for _, field := range parent.Field {
- if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp {
- d.group = true
- break
- }
- }
- }
-
- for _, field := range desc.Extension {
- d.ext = append(d.ext, &ExtensionDescriptor{common{file}, field, d})
- }
-
- return d
-}
-
-// Return a slice of all the Descriptors defined within this file
-func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor {
- sl := make([]*Descriptor, 0, len(file.MessageType)+10)
- for i, desc := range file.MessageType {
- sl = wrapThisDescriptor(sl, desc, nil, file, i)
- }
- return sl
-}
-
-// Wrap this Descriptor, recursively
-func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor {
- sl = append(sl, newDescriptor(desc, parent, file, index))
- me := sl[len(sl)-1]
- for i, nested := range desc.NestedType {
- sl = wrapThisDescriptor(sl, nested, me, file, i)
- }
- return sl
-}
-
-// Construct the EnumDescriptor
-func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor {
- ed := &EnumDescriptor{
- common: common{file},
- EnumDescriptorProto: desc,
- parent: parent,
- index: index,
- }
- if parent == nil {
- ed.path = fmt.Sprintf("%d,%d", enumPath, index)
- } else {
- ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index)
- }
- return ed
-}
-
-// Return a slice of all the EnumDescriptors defined within this file
-func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor {
- sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10)
- // Top-level enums.
- for i, enum := range file.EnumType {
- sl = append(sl, newEnumDescriptor(enum, nil, file, i))
- }
- // Enums within messages. Enums within embedded messages appear in the outer-most message.
- for _, nested := range descs {
- for i, enum := range nested.EnumType {
- sl = append(sl, newEnumDescriptor(enum, nested, file, i))
- }
- }
- return sl
-}
-
-// Return a slice of all the top-level ExtensionDescriptors defined within this file.
-func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor {
- var sl []*ExtensionDescriptor
- for _, field := range file.Extension {
- sl = append(sl, &ExtensionDescriptor{common{file}, field, nil})
- }
- return sl
-}
-
-// Return a slice of all the types that are publicly imported into this file.
-func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) {
- for _, index := range file.PublicDependency {
- df := g.fileByName(file.Dependency[index])
- for _, d := range df.desc {
- if d.GetOptions().GetMapEntry() {
- continue
- }
- sl = append(sl, &ImportedDescriptor{common{file}, d})
- }
- for _, e := range df.enum {
- sl = append(sl, &ImportedDescriptor{common{file}, e})
- }
- for _, ext := range df.ext {
- sl = append(sl, &ImportedDescriptor{common{file}, ext})
- }
- }
- return
-}
-
-func extractComments(file *FileDescriptor) {
- file.comments = make(map[string]*descriptor.SourceCodeInfo_Location)
- for _, loc := range file.GetSourceCodeInfo().GetLocation() {
- if loc.LeadingComments == nil {
- continue
- }
- var p []string
- for _, n := range loc.Path {
- p = append(p, strconv.Itoa(int(n)))
- }
- file.comments[strings.Join(p, ",")] = loc
- }
-}
-
-// BuildTypeNameMap builds the map from fully qualified type names to objects.
-// The key names for the map come from the input data, which puts a period at the beginning.
-// It should be called after SetPackageNames and before GenerateAllFiles.
-func (g *Generator) BuildTypeNameMap() {
- g.typeNameToObject = make(map[string]Object)
- for _, f := range g.allFiles {
- // The names in this loop are defined by the proto world, not us, so the
- // package name may be empty. If so, the dotted package name of X will
- // be ".X"; otherwise it will be ".pkg.X".
- dottedPkg := "." + f.GetPackage()
- if dottedPkg != "." {
- dottedPkg += "."
- }
- for _, enum := range f.enum {
- name := dottedPkg + dottedSlice(enum.TypeName())
- g.typeNameToObject[name] = enum
- }
- for _, desc := range f.desc {
- name := dottedPkg + dottedSlice(desc.TypeName())
- g.typeNameToObject[name] = desc
- }
- }
-}
-
-// ObjectNamed, given a fully-qualified input type name as it appears in the input data,
-// returns the descriptor for the message or enum with that name.
-func (g *Generator) ObjectNamed(typeName string) Object {
- o, ok := g.typeNameToObject[typeName]
- if !ok {
- g.Fail("can't find object with type", typeName)
- }
-
- // If the file of this object isn't a direct dependency of the current file,
- // or in the current file, then this object has been publicly imported into
- // a dependency of the current file.
- // We should return the ImportedDescriptor object for it instead.
- direct := *o.File().Name == *g.file.Name
- if !direct {
- for _, dep := range g.file.Dependency {
- if *g.fileByName(dep).Name == *o.File().Name {
- direct = true
- break
- }
- }
- }
- if !direct {
- found := false
- Loop:
- for _, dep := range g.file.Dependency {
- df := g.fileByName(*g.fileByName(dep).Name)
- for _, td := range df.imp {
- if td.o == o {
- // Found it!
- o = td
- found = true
- break Loop
- }
- }
- }
- if !found {
- log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name)
- }
- }
-
- return o
-}
-
-// P prints the arguments to the generated output. It handles strings and int32s, plus
-// handling indirections because they may be *string, etc.
-func (g *Generator) P(str ...interface{}) {
- if !g.writeOutput {
- return
- }
- g.WriteString(g.indent)
- for _, v := range str {
- switch s := v.(type) {
- case string:
- g.WriteString(s)
- case *string:
- g.WriteString(*s)
- case bool:
- fmt.Fprintf(g, "%t", s)
- case *bool:
- fmt.Fprintf(g, "%t", *s)
- case int:
- fmt.Fprintf(g, "%d", s)
- case *int32:
- fmt.Fprintf(g, "%d", *s)
- case *int64:
- fmt.Fprintf(g, "%d", *s)
- case float64:
- fmt.Fprintf(g, "%g", s)
- case *float64:
- fmt.Fprintf(g, "%g", *s)
- default:
- g.Fail(fmt.Sprintf("unknown type in printer: %T", v))
- }
- }
- g.WriteByte('\n')
-}
-
-// addInitf stores the given statement to be printed inside the file's init function.
-// The statement is given as a format specifier and arguments.
-func (g *Generator) addInitf(stmt string, a ...interface{}) {
- g.init = append(g.init, fmt.Sprintf(stmt, a...))
-}
-
-// In Indents the output one tab stop.
-func (g *Generator) In() { g.indent += "\t" }
-
-// Out unindents the output one tab stop.
-func (g *Generator) Out() {
- if len(g.indent) > 0 {
- g.indent = g.indent[1:]
- }
-}
-
-// GenerateAllFiles generates the output for all the files we're outputting.
-func (g *Generator) GenerateAllFiles() {
- // Initialize the plugins
- for _, p := range plugins {
- p.Init(g)
- }
- // Generate the output. The generator runs for every file, even the files
- // that we don't generate output for, so that we can collate the full list
- // of exported symbols to support public imports.
- genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles))
- for _, file := range g.genFiles {
- genFileMap[file] = true
- }
- for _, file := range g.allFiles {
- g.Reset()
- g.writeOutput = genFileMap[file]
- g.generate(file)
- if !g.writeOutput {
- continue
- }
- g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{
- Name: proto.String(file.goFileName()),
- Content: proto.String(g.String()),
- })
- }
-}
-
-// Run all the plugins associated with the file.
-func (g *Generator) runPlugins(file *FileDescriptor) {
- for _, p := range plugins {
- p.Generate(file)
- }
-}
-
-// FileOf return the FileDescriptor for this FileDescriptorProto.
-func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor {
- for _, file := range g.allFiles {
- if file.FileDescriptorProto == fd {
- return file
- }
- }
- g.Fail("could not find file in table:", fd.GetName())
- return nil
-}
-
-// Fill the response protocol buffer with the generated output for all the files we're
-// supposed to generate.
-func (g *Generator) generate(file *FileDescriptor) {
- g.file = g.FileOf(file.FileDescriptorProto)
- g.usedPackages = make(map[string]bool)
-
- if g.file.index == 0 {
- // For one file in the package, assert version compatibility.
- g.P("// This is a compile-time assertion to ensure that this generated file")
- g.P("// is compatible with the proto package it is being compiled against.")
- g.P("// A compilation error at this line likely means your copy of the")
- g.P("// proto package needs to be updated.")
- g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
- g.P()
- }
- for _, td := range g.file.imp {
- g.generateImported(td)
- }
- for _, enum := range g.file.enum {
- g.generateEnum(enum)
- }
- for _, desc := range g.file.desc {
- // Don't generate virtual messages for maps.
- if desc.GetOptions().GetMapEntry() {
- continue
- }
- g.generateMessage(desc)
- }
- for _, ext := range g.file.ext {
- g.generateExtension(ext)
- }
- g.generateInitFunction()
-
- // Run the plugins before the imports so we know which imports are necessary.
- g.runPlugins(file)
-
- g.generateFileDescriptor(file)
-
- // Generate header and imports last, though they appear first in the output.
- rem := g.Buffer
- g.Buffer = new(bytes.Buffer)
- g.generateHeader()
- g.generateImports()
- if !g.writeOutput {
- return
- }
- g.Write(rem.Bytes())
-
- // Reformat generated code.
- fset := token.NewFileSet()
- raw := g.Bytes()
- ast, err := parser.ParseFile(fset, "", g, parser.ParseComments)
- if err != nil {
- // Print out the bad code with line numbers.
- // This should never happen in practice, but it can while changing generated code,
- // so consider this a debugging aid.
- var src bytes.Buffer
- s := bufio.NewScanner(bytes.NewReader(raw))
- for line := 1; s.Scan(); line++ {
- fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes())
- }
- g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String())
- }
- g.Reset()
- err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast)
- if err != nil {
- g.Fail("generated Go source code could not be reformatted:", err.Error())
- }
-}
-
-// Generate the header, including package definition
-func (g *Generator) generateHeader() {
- g.P("// Code generated by protoc-gen-go. DO NOT EDIT.")
- g.P("// source: ", g.file.Name)
- g.P()
-
- name := g.file.PackageName()
-
- if g.file.index == 0 {
- // Generate package docs for the first file in the package.
- g.P("/*")
- g.P("Package ", name, " is a generated protocol buffer package.")
- g.P()
- if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok {
- // not using g.PrintComments because this is a /* */ comment block.
- text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
- for _, line := range strings.Split(text, "\n") {
- line = strings.TrimPrefix(line, " ")
- // ensure we don't escape from the block comment
- line = strings.Replace(line, "*/", "* /", -1)
- g.P(line)
- }
- g.P()
- }
- var topMsgs []string
- g.P("It is generated from these files:")
- for _, f := range g.genFiles {
- g.P("\t", f.Name)
- for _, msg := range f.desc {
- if msg.parent != nil {
- continue
- }
- topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName()))
- }
- }
- g.P()
- g.P("It has these top-level messages:")
- for _, msg := range topMsgs {
- g.P("\t", msg)
- }
- g.P("*/")
- }
-
- g.P("package ", name)
- g.P()
-}
-
-// PrintComments prints any comments from the source .proto file.
-// The path is a comma-separated list of integers.
-// It returns an indication of whether any comments were printed.
-// See descriptor.proto for its format.
-func (g *Generator) PrintComments(path string) bool {
- if !g.writeOutput {
- return false
- }
- if loc, ok := g.file.comments[path]; ok {
- text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
- for _, line := range strings.Split(text, "\n") {
- g.P("// ", strings.TrimPrefix(line, " "))
- }
- return true
- }
- return false
-}
-
-func (g *Generator) fileByName(filename string) *FileDescriptor {
- return g.allFilesByName[filename]
-}
-
-// weak returns whether the ith import of the current file is a weak import.
-func (g *Generator) weak(i int32) bool {
- for _, j := range g.file.WeakDependency {
- if j == i {
- return true
- }
- }
- return false
-}
-
-// Generate the imports
-func (g *Generator) generateImports() {
- // We almost always need a proto import. Rather than computing when we
- // do, which is tricky when there's a plugin, just import it and
- // reference it later. The same argument applies to the fmt and math packages.
- g.P("import " + g.Pkg["proto"] + " " + strconv.Quote(g.ImportPrefix+"github.com/golang/protobuf/proto"))
- g.P("import " + g.Pkg["fmt"] + ` "fmt"`)
- g.P("import " + g.Pkg["math"] + ` "math"`)
- for i, s := range g.file.Dependency {
- fd := g.fileByName(s)
- // Do not import our own package.
- if fd.PackageName() == g.packageName {
- continue
- }
- filename := fd.goFileName()
- // By default, import path is the dirname of the Go filename.
- importPath := path.Dir(filename)
- if substitution, ok := g.ImportMap[s]; ok {
- importPath = substitution
- }
- importPath = g.ImportPrefix + importPath
- // Skip weak imports.
- if g.weak(int32(i)) {
- g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath))
- continue
- }
- // We need to import all the dependencies, even if we don't reference them,
- // because other code and tools depend on having the full transitive closure
- // of protocol buffer types in the binary.
- pname := fd.PackageName()
- if _, ok := g.usedPackages[pname]; !ok {
- pname = "_"
- }
- g.P("import ", pname, " ", strconv.Quote(importPath))
- }
- g.P()
- // TODO: may need to worry about uniqueness across plugins
- for _, p := range plugins {
- p.GenerateImports(g.file)
- g.P()
- }
- g.P("// Reference imports to suppress errors if they are not otherwise used.")
- g.P("var _ = ", g.Pkg["proto"], ".Marshal")
- g.P("var _ = ", g.Pkg["fmt"], ".Errorf")
- g.P("var _ = ", g.Pkg["math"], ".Inf")
- g.P()
-}
-
-func (g *Generator) generateImported(id *ImportedDescriptor) {
- // Don't generate public import symbols for files that we are generating
- // code for, since those symbols will already be in this package.
- // We can't simply avoid creating the ImportedDescriptor objects,
- // because g.genFiles isn't populated at that stage.
- tn := id.TypeName()
- sn := tn[len(tn)-1]
- df := g.FileOf(id.o.File())
- filename := *df.Name
- for _, fd := range g.genFiles {
- if *fd.Name == filename {
- g.P("// Ignoring public import of ", sn, " from ", filename)
- g.P()
- return
- }
- }
- g.P("// ", sn, " from public import ", filename)
- g.usedPackages[df.PackageName()] = true
-
- for _, sym := range df.exported[id.o] {
- sym.GenerateAlias(g, df.PackageName())
- }
-
- g.P()
-}
-
-// Generate the enum definitions for this EnumDescriptor.
-func (g *Generator) generateEnum(enum *EnumDescriptor) {
- // The full type name
- typeName := enum.TypeName()
- // The full type name, CamelCased.
- ccTypeName := CamelCaseSlice(typeName)
- ccPrefix := enum.prefix()
-
- g.PrintComments(enum.path)
- g.P("type ", ccTypeName, " int32")
- g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()})
- g.P("const (")
- g.In()
- for i, e := range enum.Value {
- g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i))
-
- name := ccPrefix + *e.Name
- g.P(name, " ", ccTypeName, " = ", e.Number)
- g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName})
- }
- g.Out()
- g.P(")")
- g.P("var ", ccTypeName, "_name = map[int32]string{")
- g.In()
- generated := make(map[int32]bool) // avoid duplicate values
- for _, e := range enum.Value {
- duplicate := ""
- if _, present := generated[*e.Number]; present {
- duplicate = "// Duplicate value: "
- }
- g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",")
- generated[*e.Number] = true
- }
- g.Out()
- g.P("}")
- g.P("var ", ccTypeName, "_value = map[string]int32{")
- g.In()
- for _, e := range enum.Value {
- g.P(strconv.Quote(*e.Name), ": ", e.Number, ",")
- }
- g.Out()
- g.P("}")
-
- if !enum.proto3() {
- g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {")
- g.In()
- g.P("p := new(", ccTypeName, ")")
- g.P("*p = x")
- g.P("return p")
- g.Out()
- g.P("}")
- }
-
- g.P("func (x ", ccTypeName, ") String() string {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))")
- g.Out()
- g.P("}")
-
- if !enum.proto3() {
- g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {")
- g.In()
- g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`)
- g.P("if err != nil {")
- g.In()
- g.P("return err")
- g.Out()
- g.P("}")
- g.P("*x = ", ccTypeName, "(value)")
- g.P("return nil")
- g.Out()
- g.P("}")
- }
-
- var indexes []string
- for m := enum.parent; m != nil; m = m.parent {
- // XXX: skip groups?
- indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
- }
- indexes = append(indexes, strconv.Itoa(enum.index))
- g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }")
- if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" {
- g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`)
- }
-
- g.P()
-}
-
-// The tag is a string like "varint,2,opt,name=fieldname,def=7" that
-// identifies details of the field for the protocol buffer marshaling and unmarshaling
-// code. The fields are:
-// wire encoding
-// protocol tag number
-// opt,req,rep for optional, required, or repeated
-// packed whether the encoding is "packed" (optional; repeated primitives only)
-// name= the original declared name
-// enum= the name of the enum type if it is an enum-typed field.
-// proto3 if this field is in a proto3 message
-// def= string representation of the default value, if any.
-// The default value must be in a representation that can be used at run-time
-// to generate the default value. Thus bools become 0 and 1, for instance.
-func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string {
- optrepreq := ""
- switch {
- case isOptional(field):
- optrepreq = "opt"
- case isRequired(field):
- optrepreq = "req"
- case isRepeated(field):
- optrepreq = "rep"
- }
- var defaultValue string
- if dv := field.DefaultValue; dv != nil { // set means an explicit default
- defaultValue = *dv
- // Some types need tweaking.
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- if defaultValue == "true" {
- defaultValue = "1"
- } else {
- defaultValue = "0"
- }
- case descriptor.FieldDescriptorProto_TYPE_STRING,
- descriptor.FieldDescriptorProto_TYPE_BYTES:
- // Nothing to do. Quoting is done for the whole tag.
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- // For enums we need to provide the integer constant.
- obj := g.ObjectNamed(field.GetTypeName())
- if id, ok := obj.(*ImportedDescriptor); ok {
- // It is an enum that was publicly imported.
- // We need the underlying type.
- obj = id.o
- }
- enum, ok := obj.(*EnumDescriptor)
- if !ok {
- log.Printf("obj is a %T", obj)
- if id, ok := obj.(*ImportedDescriptor); ok {
- log.Printf("id.o is a %T", id.o)
- }
- g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName()))
- }
- defaultValue = enum.integerValueAsString(defaultValue)
- }
- defaultValue = ",def=" + defaultValue
- }
- enum := ""
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM {
- // We avoid using obj.PackageName(), because we want to use the
- // original (proto-world) package name.
- obj := g.ObjectNamed(field.GetTypeName())
- if id, ok := obj.(*ImportedDescriptor); ok {
- obj = id.o
- }
- enum = ",enum="
- if pkg := obj.File().GetPackage(); pkg != "" {
- enum += pkg + "."
- }
- enum += CamelCaseSlice(obj.TypeName())
- }
- packed := ""
- if (field.Options != nil && field.Options.GetPacked()) ||
- // Per https://developers.google.com/protocol-buffers/docs/proto3#simple:
- // "In proto3, repeated fields of scalar numeric types use packed encoding by default."
- (message.proto3() && (field.Options == nil || field.Options.Packed == nil) &&
- isRepeated(field) && isScalar(field)) {
- packed = ",packed"
- }
- fieldName := field.GetName()
- name := fieldName
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
- // We must use the type name for groups instead of
- // the field name to preserve capitalization.
- // type_name in FieldDescriptorProto is fully-qualified,
- // but we only want the local part.
- name = *field.TypeName
- if i := strings.LastIndex(name, "."); i >= 0 {
- name = name[i+1:]
- }
- }
- if json := field.GetJsonName(); json != "" && json != name {
- // TODO: escaping might be needed, in which case
- // perhaps this should be in its own "json" tag.
- name += ",json=" + json
- }
- name = ",name=" + name
- if message.proto3() {
- // We only need the extra tag for []byte fields;
- // no need to add noise for the others.
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES {
- name += ",proto3"
- }
-
- }
- oneof := ""
- if field.OneofIndex != nil {
- oneof = ",oneof"
- }
- return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s",
- wiretype,
- field.GetNumber(),
- optrepreq,
- packed,
- name,
- enum,
- oneof,
- defaultValue))
-}
-
-func needsStar(typ descriptor.FieldDescriptorProto_Type) bool {
- switch typ {
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- return false
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- return false
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- return false
- }
- return true
-}
-
-// TypeName is the printed name appropriate for an item. If the object is in the current file,
-// TypeName drops the package name and underscores the rest.
-// Otherwise the object is from another package; and the result is the underscored
-// package name followed by the item name.
-// The result always has an initial capital.
-func (g *Generator) TypeName(obj Object) string {
- return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName())
-}
-
-// TypeNameWithPackage is like TypeName, but always includes the package
-// name even if the object is in our own package.
-func (g *Generator) TypeNameWithPackage(obj Object) string {
- return obj.PackageName() + CamelCaseSlice(obj.TypeName())
-}
-
-// GoType returns a string representing the type name, and the wire type
-func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) {
- // TODO: Options.
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- typ, wire = "float64", "fixed64"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- typ, wire = "float32", "fixed32"
- case descriptor.FieldDescriptorProto_TYPE_INT64:
- typ, wire = "int64", "varint"
- case descriptor.FieldDescriptorProto_TYPE_UINT64:
- typ, wire = "uint64", "varint"
- case descriptor.FieldDescriptorProto_TYPE_INT32:
- typ, wire = "int32", "varint"
- case descriptor.FieldDescriptorProto_TYPE_UINT32:
- typ, wire = "uint32", "varint"
- case descriptor.FieldDescriptorProto_TYPE_FIXED64:
- typ, wire = "uint64", "fixed64"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32:
- typ, wire = "uint32", "fixed32"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- typ, wire = "bool", "varint"
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- typ, wire = "string", "bytes"
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- desc := g.ObjectNamed(field.GetTypeName())
- typ, wire = "*"+g.TypeName(desc), "group"
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- desc := g.ObjectNamed(field.GetTypeName())
- typ, wire = "*"+g.TypeName(desc), "bytes"
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- typ, wire = "[]byte", "bytes"
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- desc := g.ObjectNamed(field.GetTypeName())
- typ, wire = g.TypeName(desc), "varint"
- case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- typ, wire = "int32", "fixed32"
- case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- typ, wire = "int64", "fixed64"
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- typ, wire = "int32", "zigzag32"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- typ, wire = "int64", "zigzag64"
- default:
- g.Fail("unknown type for", field.GetName())
- }
- if isRepeated(field) {
- typ = "[]" + typ
- } else if message != nil && message.proto3() {
- return
- } else if field.OneofIndex != nil && message != nil {
- return
- } else if needsStar(*field.Type) {
- typ = "*" + typ
- }
- return
-}
-
-func (g *Generator) RecordTypeUse(t string) {
- if obj, ok := g.typeNameToObject[t]; ok {
- // Call ObjectNamed to get the true object to record the use.
- obj = g.ObjectNamed(t)
- g.usedPackages[obj.PackageName()] = true
- }
-}
-
-// Method names that may be generated. Fields with these names get an
-// underscore appended. Any change to this set is a potential incompatible
-// API change because it changes generated field names.
-var methodNames = [...]string{
- "Reset",
- "String",
- "ProtoMessage",
- "Marshal",
- "Unmarshal",
- "ExtensionRangeArray",
- "ExtensionMap",
- "Descriptor",
-}
-
-// Names of messages in the `google.protobuf` package for which
-// we will generate XXX_WellKnownType methods.
-var wellKnownTypes = map[string]bool{
- "Any": true,
- "Duration": true,
- "Empty": true,
- "Struct": true,
- "Timestamp": true,
-
- "Value": true,
- "ListValue": true,
- "DoubleValue": true,
- "FloatValue": true,
- "Int64Value": true,
- "UInt64Value": true,
- "Int32Value": true,
- "UInt32Value": true,
- "BoolValue": true,
- "StringValue": true,
- "BytesValue": true,
-}
-
-// Generate the type and default constant definitions for this Descriptor.
-func (g *Generator) generateMessage(message *Descriptor) {
- // The full type name
- typeName := message.TypeName()
- // The full type name, CamelCased.
- ccTypeName := CamelCaseSlice(typeName)
-
- usedNames := make(map[string]bool)
- for _, n := range methodNames {
- usedNames[n] = true
- }
- fieldNames := make(map[*descriptor.FieldDescriptorProto]string)
- fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string)
- fieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
- mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
-
- oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto
- oneofDisc := make(map[int32]string) // name of discriminator method
- oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star
- oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer
-
- g.PrintComments(message.path)
- g.P("type ", ccTypeName, " struct {")
- g.In()
-
- // allocNames finds a conflict-free variation of the given strings,
- // consistently mutating their suffixes.
- // It returns the same number of strings.
- allocNames := func(ns ...string) []string {
- Loop:
- for {
- for _, n := range ns {
- if usedNames[n] {
- for i := range ns {
- ns[i] += "_"
- }
- continue Loop
- }
- }
- for _, n := range ns {
- usedNames[n] = true
- }
- return ns
- }
- }
-
- for i, field := range message.Field {
- // Allocate the getter and the field at the same time so name
- // collisions create field/method consistent names.
- // TODO: This allocation occurs based on the order of the fields
- // in the proto file, meaning that a change in the field
- // ordering can change generated Method/Field names.
- base := CamelCase(*field.Name)
- ns := allocNames(base, "Get"+base)
- fieldName, fieldGetterName := ns[0], ns[1]
- typename, wiretype := g.GoType(message, field)
- jsonName := *field.Name
- tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty")
-
- fieldNames[field] = fieldName
- fieldGetterNames[field] = fieldGetterName
-
- oneof := field.OneofIndex != nil
- if oneof && oneofFieldName[*field.OneofIndex] == "" {
- odp := message.OneofDecl[int(*field.OneofIndex)]
- fname := allocNames(CamelCase(odp.GetName()))[0]
-
- // This is the first field of a oneof we haven't seen before.
- // Generate the union field.
- com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex))
- if com {
- g.P("//")
- }
- g.P("// Types that are valid to be assigned to ", fname, ":")
- // Generate the rest of this comment later,
- // when we've computed any disambiguation.
- oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len()
-
- dname := "is" + ccTypeName + "_" + fname
- oneofFieldName[*field.OneofIndex] = fname
- oneofDisc[*field.OneofIndex] = dname
- tag := `protobuf_oneof:"` + odp.GetName() + `"`
- g.P(fname, " ", dname, " `", tag, "`")
- }
-
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE {
- desc := g.ObjectNamed(field.GetTypeName())
- if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() {
- // Figure out the Go types and tags for the key and value types.
- keyField, valField := d.Field[0], d.Field[1]
- keyType, keyWire := g.GoType(d, keyField)
- valType, valWire := g.GoType(d, valField)
- keyTag, valTag := g.goTag(d, keyField, keyWire), g.goTag(d, valField, valWire)
-
- // We don't use stars, except for message-typed values.
- // Message and enum types are the only two possibly foreign types used in maps,
- // so record their use. They are not permitted as map keys.
- keyType = strings.TrimPrefix(keyType, "*")
- switch *valField.Type {
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- valType = strings.TrimPrefix(valType, "*")
- g.RecordTypeUse(valField.GetTypeName())
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- g.RecordTypeUse(valField.GetTypeName())
- default:
- valType = strings.TrimPrefix(valType, "*")
- }
-
- typename = fmt.Sprintf("map[%s]%s", keyType, valType)
- mapFieldTypes[field] = typename // record for the getter generation
-
- tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag)
- }
- }
-
- fieldTypes[field] = typename
-
- if oneof {
- tname := ccTypeName + "_" + fieldName
- // It is possible for this to collide with a message or enum
- // nested in this message. Check for collisions.
- for {
- ok := true
- for _, desc := range message.nested {
- if CamelCaseSlice(desc.TypeName()) == tname {
- ok = false
- break
- }
- }
- for _, enum := range message.enums {
- if CamelCaseSlice(enum.TypeName()) == tname {
- ok = false
- break
- }
- }
- if !ok {
- tname += "_"
- continue
- }
- break
- }
-
- oneofTypeName[field] = tname
- continue
- }
-
- g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i))
- g.P(fieldName, "\t", typename, "\t`", tag, "`")
- g.RecordTypeUse(field.GetTypeName())
- }
- if len(message.ExtensionRange) > 0 {
- g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`")
- }
- if !message.proto3() {
- g.P("XXX_unrecognized\t[]byte `json:\"-\"`")
- }
- g.Out()
- g.P("}")
-
- // Update g.Buffer to list valid oneof types.
- // We do this down here, after we've disambiguated the oneof type names.
- // We go in reverse order of insertion point to avoid invalidating offsets.
- for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- {
- ip := oneofInsertPoints[oi]
- all := g.Buffer.Bytes()
- rem := all[ip:]
- g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem
- for _, field := range message.Field {
- if field.OneofIndex == nil || *field.OneofIndex != oi {
- continue
- }
- g.P("//\t*", oneofTypeName[field])
- }
- g.Buffer.Write(rem)
- }
-
- // Reset, String and ProtoMessage methods.
- g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }")
- g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }")
- g.P("func (*", ccTypeName, ") ProtoMessage() {}")
- var indexes []string
- for m := message; m != nil; m = m.parent {
- indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
- }
- g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }")
- // TODO: Revisit the decision to use a XXX_WellKnownType method
- // if we change proto.MessageName to work with multiple equivalents.
- if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] {
- g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`)
- }
-
- // Extension support methods
- var hasExtensions, isMessageSet bool
- if len(message.ExtensionRange) > 0 {
- hasExtensions = true
- // message_set_wire_format only makes sense when extensions are defined.
- if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() {
- isMessageSet = true
- g.P()
- g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler")
- g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)")
- g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)")
- }
-
- g.P()
- g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{")
- g.In()
- for _, r := range message.ExtensionRange {
- end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends
- g.P("{", r.Start, ", ", end, "},")
- }
- g.Out()
- g.P("}")
- g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
- g.In()
- g.P("return extRange_", ccTypeName)
- g.Out()
- g.P("}")
- }
-
- // Default constants
- defNames := make(map[*descriptor.FieldDescriptorProto]string)
- for _, field := range message.Field {
- def := field.GetDefaultValue()
- if def == "" {
- continue
- }
- fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name)
- defNames[field] = fieldname
- typename, _ := g.GoType(message, field)
- if typename[0] == '*' {
- typename = typename[1:]
- }
- kind := "const "
- switch {
- case typename == "bool":
- case typename == "string":
- def = strconv.Quote(def)
- case typename == "[]byte":
- def = "[]byte(" + strconv.Quote(unescape(def)) + ")"
- kind = "var "
- case def == "inf", def == "-inf", def == "nan":
- // These names are known to, and defined by, the protocol language.
- switch def {
- case "inf":
- def = "math.Inf(1)"
- case "-inf":
- def = "math.Inf(-1)"
- case "nan":
- def = "math.NaN()"
- }
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT {
- def = "float32(" + def + ")"
- }
- kind = "var "
- case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM:
- // Must be an enum. Need to construct the prefixed name.
- obj := g.ObjectNamed(field.GetTypeName())
- var enum *EnumDescriptor
- if id, ok := obj.(*ImportedDescriptor); ok {
- // The enum type has been publicly imported.
- enum, _ = id.o.(*EnumDescriptor)
- } else {
- enum, _ = obj.(*EnumDescriptor)
- }
- if enum == nil {
- log.Printf("don't know how to generate constant for %s", fieldname)
- continue
- }
- def = g.DefaultPackageName(obj) + enum.prefix() + def
- }
- g.P(kind, fieldname, " ", typename, " = ", def)
- g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""})
- }
- g.P()
-
- // Oneof per-field types, discriminants and getters.
- //
- // Generate unexported named types for the discriminant interfaces.
- // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug
- // that was triggered by using anonymous interfaces here.
- // TODO: Revisit this and consider reverting back to anonymous interfaces.
- for oi := range message.OneofDecl {
- dname := oneofDisc[int32(oi)]
- g.P("type ", dname, " interface {")
- g.In()
- g.P(dname, "()")
- g.Out()
- g.P("}")
- }
- g.P()
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- _, wiretype := g.GoType(message, field)
- tag := "protobuf:" + g.goTag(message, field, wiretype)
- g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }")
- g.RecordTypeUse(field.GetTypeName())
- }
- g.P()
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}")
- }
- g.P()
- for oi := range message.OneofDecl {
- fname := oneofFieldName[int32(oi)]
- g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {")
- g.P("if m != nil { return m.", fname, " }")
- g.P("return nil")
- g.P("}")
- }
- g.P()
-
- // Field getters
- var getters []getterSymbol
- for _, field := range message.Field {
- oneof := field.OneofIndex != nil
-
- fname := fieldNames[field]
- typename, _ := g.GoType(message, field)
- if t, ok := mapFieldTypes[field]; ok {
- typename = t
- }
- mname := fieldGetterNames[field]
- star := ""
- if needsStar(*field.Type) && typename[0] == '*' {
- typename = typename[1:]
- star = "*"
- }
-
- // Only export getter symbols for basic types,
- // and for messages and enums in the same package.
- // Groups are not exported.
- // Foreign types can't be hoisted through a public import because
- // the importer may not already be importing the defining .proto.
- // As an example, imagine we have an import tree like this:
- // A.proto -> B.proto -> C.proto
- // If A publicly imports B, we need to generate the getters from B in A's output,
- // but if one such getter returns something from C then we cannot do that
- // because A is not importing C already.
- var getter, genType bool
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- getter = false
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM:
- // Only export getter if its return type is in this package.
- getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName()
- genType = true
- default:
- getter = true
- }
- if getter {
- getters = append(getters, getterSymbol{
- name: mname,
- typ: typename,
- typeName: field.GetTypeName(),
- genType: genType,
- })
- }
-
- g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {")
- g.In()
- def, hasDef := defNames[field]
- typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- typeDefaultIsNil = !hasDef
- case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- typeDefaultIsNil = true
- }
- if isRepeated(field) {
- typeDefaultIsNil = true
- }
- if typeDefaultIsNil && !oneof {
- // A bytes field with no explicit default needs less generated code,
- // as does a message or group field, or a repeated field.
- g.P("if m != nil {")
- g.In()
- g.P("return m." + fname)
- g.Out()
- g.P("}")
- g.P("return nil")
- g.Out()
- g.P("}")
- g.P()
- continue
- }
- if !oneof {
- if message.proto3() {
- g.P("if m != nil {")
- } else {
- g.P("if m != nil && m." + fname + " != nil {")
- }
- g.In()
- g.P("return " + star + "m." + fname)
- g.Out()
- g.P("}")
- } else {
- uname := oneofFieldName[*field.OneofIndex]
- tname := oneofTypeName[field]
- g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {")
- g.P("return x.", fname)
- g.P("}")
- }
- if hasDef {
- if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES {
- g.P("return " + def)
- } else {
- // The default is a []byte var.
- // Make a copy when returning it to be safe.
- g.P("return append([]byte(nil), ", def, "...)")
- }
- } else {
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- g.P("return false")
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- g.P(`return ""`)
- case descriptor.FieldDescriptorProto_TYPE_GROUP,
- descriptor.FieldDescriptorProto_TYPE_MESSAGE,
- descriptor.FieldDescriptorProto_TYPE_BYTES:
- // This is only possible for oneof fields.
- g.P("return nil")
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- // The default default for an enum is the first value in the enum,
- // not zero.
- obj := g.ObjectNamed(field.GetTypeName())
- var enum *EnumDescriptor
- if id, ok := obj.(*ImportedDescriptor); ok {
- // The enum type has been publicly imported.
- enum, _ = id.o.(*EnumDescriptor)
- } else {
- enum, _ = obj.(*EnumDescriptor)
- }
- if enum == nil {
- log.Printf("don't know how to generate getter for %s", field.GetName())
- continue
- }
- if len(enum.Value) == 0 {
- g.P("return 0 // empty enum")
- } else {
- first := enum.Value[0].GetName()
- g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first)
- }
- default:
- g.P("return 0")
- }
- }
- g.Out()
- g.P("}")
- g.P()
- }
-
- if !message.group {
- ms := &messageSymbol{
- sym: ccTypeName,
- hasExtensions: hasExtensions,
- isMessageSet: isMessageSet,
- hasOneof: len(message.OneofDecl) > 0,
- getters: getters,
- }
- g.file.addExport(message, ms)
- }
-
- // Oneof functions
- if len(message.OneofDecl) > 0 {
- fieldWire := make(map[*descriptor.FieldDescriptorProto]string)
-
- // method
- enc := "_" + ccTypeName + "_OneofMarshaler"
- dec := "_" + ccTypeName + "_OneofUnmarshaler"
- size := "_" + ccTypeName + "_OneofSizer"
- encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
- decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
- sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)"
-
- g.P("// XXX_OneofFuncs is for the internal use of the proto package.")
- g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
- g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{")
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- g.P("(*", oneofTypeName[field], ")(nil),")
- }
- g.P("}")
- g.P("}")
- g.P()
-
- // marshaler
- g.P("func ", enc, encSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- for oi, odp := range message.OneofDecl {
- g.P("// ", odp.GetName())
- fname := oneofFieldName[int32(oi)]
- g.P("switch x := m.", fname, ".(type) {")
- for _, field := range message.Field {
- if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
- continue
- }
- g.P("case *", oneofTypeName[field], ":")
- var wire, pre, post string
- val := "x." + fieldNames[field] // overridden for TYPE_BOOL
- canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- wire = "WireFixed64"
- pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits("
- post = "))"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- wire = "WireFixed32"
- pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits("
- post = ")))"
- case descriptor.FieldDescriptorProto_TYPE_INT64,
- descriptor.FieldDescriptorProto_TYPE_UINT64:
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_INT32,
- descriptor.FieldDescriptorProto_TYPE_UINT32,
- descriptor.FieldDescriptorProto_TYPE_ENUM:
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_FIXED64,
- descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- wire = "WireFixed64"
- pre, post = "b.EncodeFixed64(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32,
- descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- wire = "WireFixed32"
- pre, post = "b.EncodeFixed32(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- // bool needs special handling.
- g.P("t := uint64(0)")
- g.P("if ", val, " { t = 1 }")
- val = "t"
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(", ")"
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- wire = "WireBytes"
- pre, post = "b.EncodeStringBytes(", ")"
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- wire = "WireStartGroup"
- pre, post = "b.Marshal(", ")"
- canFail = true
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- wire = "WireBytes"
- pre, post = "b.EncodeMessage(", ")"
- canFail = true
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- wire = "WireBytes"
- pre, post = "b.EncodeRawBytes(", ")"
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- wire = "WireVarint"
- pre, post = "b.EncodeZigzag32(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- wire = "WireVarint"
- pre, post = "b.EncodeZigzag64(uint64(", "))"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- fieldWire[field] = wire
- g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")")
- if !canFail {
- g.P(pre, val, post)
- } else {
- g.P("if err := ", pre, val, post, "; err != nil {")
- g.P("return err")
- g.P("}")
- }
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
- g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
- }
- }
- g.P("case nil:")
- g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`)
- g.P("}")
- }
- g.P("return nil")
- g.P("}")
- g.P()
-
- // unmarshaler
- g.P("func ", dec, decSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- g.P("switch tag {")
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- odp := message.OneofDecl[int(*field.OneofIndex)]
- g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name)
- g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {")
- g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType")
- g.P("}")
- lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP
- var dec, cast, cast2 string
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits"
- case descriptor.FieldDescriptorProto_TYPE_INT64:
- dec, cast = "b.DecodeVarint()", "int64"
- case descriptor.FieldDescriptorProto_TYPE_UINT64:
- dec = "b.DecodeVarint()"
- case descriptor.FieldDescriptorProto_TYPE_INT32:
- dec, cast = "b.DecodeVarint()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_FIXED64:
- dec = "b.DecodeFixed64()"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32:
- dec, cast = "b.DecodeFixed32()", "uint32"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- dec = "b.DecodeVarint()"
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- dec = "b.DecodeStringBytes()"
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
- lhs = "err"
- dec = "b.DecodeGroup(msg)"
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
- lhs = "err"
- dec = "b.DecodeMessage(msg)"
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- dec = "b.DecodeRawBytes(true)"
- case descriptor.FieldDescriptorProto_TYPE_UINT32:
- dec, cast = "b.DecodeVarint()", "uint32"
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- dec, cast = "b.DecodeVarint()", fieldTypes[field]
- case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- dec, cast = "b.DecodeFixed32()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- dec, cast = "b.DecodeFixed64()", "int64"
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- dec, cast = "b.DecodeZigzag32()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- dec, cast = "b.DecodeZigzag64()", "int64"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- g.P(lhs, " := ", dec)
- val := "x"
- if cast != "" {
- val = cast + "(" + val + ")"
- }
- if cast2 != "" {
- val = cast2 + "(" + val + ")"
- }
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- val += " != 0"
- case descriptor.FieldDescriptorProto_TYPE_GROUP,
- descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- val = "msg"
- }
- g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}")
- g.P("return true, err")
- }
- g.P("default: return false, nil")
- g.P("}")
- g.P("}")
- g.P()
-
- // sizer
- g.P("func ", size, sizeSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- for oi, odp := range message.OneofDecl {
- g.P("// ", odp.GetName())
- fname := oneofFieldName[int32(oi)]
- g.P("switch x := m.", fname, ".(type) {")
- for _, field := range message.Field {
- if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
- continue
- }
- g.P("case *", oneofTypeName[field], ":")
- val := "x." + fieldNames[field]
- var wire, varint, fixed string
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- wire = "WireFixed64"
- fixed = "8"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- wire = "WireFixed32"
- fixed = "4"
- case descriptor.FieldDescriptorProto_TYPE_INT64,
- descriptor.FieldDescriptorProto_TYPE_UINT64,
- descriptor.FieldDescriptorProto_TYPE_INT32,
- descriptor.FieldDescriptorProto_TYPE_UINT32,
- descriptor.FieldDescriptorProto_TYPE_ENUM:
- wire = "WireVarint"
- varint = val
- case descriptor.FieldDescriptorProto_TYPE_FIXED64,
- descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- wire = "WireFixed64"
- fixed = "8"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32,
- descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- wire = "WireFixed32"
- fixed = "4"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- wire = "WireVarint"
- fixed = "1"
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- wire = "WireBytes"
- fixed = "len(" + val + ")"
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- wire = "WireStartGroup"
- fixed = g.Pkg["proto"] + ".Size(" + val + ")"
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- wire = "WireBytes"
- g.P("s := ", g.Pkg["proto"], ".Size(", val, ")")
- fixed = "s"
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- wire = "WireBytes"
- fixed = "len(" + val + ")"
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- wire = "WireVarint"
- varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- wire = "WireVarint"
- varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")")
- if varint != "" {
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))")
- }
- if fixed != "" {
- g.P("n += ", fixed)
- }
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
- }
- }
- g.P("case nil:")
- g.P("default:")
- g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))")
- g.P("}")
- }
- g.P("return n")
- g.P("}")
- g.P()
- }
-
- for _, ext := range message.ext {
- g.generateExtension(ext)
- }
-
- fullName := strings.Join(message.TypeName(), ".")
- if g.file.Package != nil {
- fullName = *g.file.Package + "." + fullName
- }
-
- g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName)
-}
-
-var escapeChars = [256]byte{
- 'a': '\a', 'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t', 'v': '\v', '\\': '\\', '"': '"', '\'': '\'', '?': '?',
-}
-
-// unescape reverses the "C" escaping that protoc does for default values of bytes fields.
-// It is best effort in that it effectively ignores malformed input. Seemingly invalid escape
-// sequences are conveyed, unmodified, into the decoded result.
-func unescape(s string) string {
- // NB: Sadly, we can't use strconv.Unquote because protoc will escape both
- // single and double quotes, but strconv.Unquote only allows one or the
- // other (based on actual surrounding quotes of its input argument).
-
- var out []byte
- for len(s) > 0 {
- // regular character, or too short to be valid escape
- if s[0] != '\\' || len(s) < 2 {
- out = append(out, s[0])
- s = s[1:]
- } else if c := escapeChars[s[1]]; c != 0 {
- // escape sequence
- out = append(out, c)
- s = s[2:]
- } else if s[1] == 'x' || s[1] == 'X' {
- // hex escape, e.g. "\x80
- if len(s) < 4 {
- // too short to be valid
- out = append(out, s[:2]...)
- s = s[2:]
- continue
- }
- v, err := strconv.ParseUint(s[2:4], 16, 8)
- if err != nil {
- out = append(out, s[:4]...)
- } else {
- out = append(out, byte(v))
- }
- s = s[4:]
- } else if '0' <= s[1] && s[1] <= '7' {
- // octal escape, can vary from 1 to 3 octal digits; e.g., "\0" "\40" or "\164"
- // so consume up to 2 more bytes or up to end-of-string
- n := len(s[1:]) - len(strings.TrimLeft(s[1:], "01234567"))
- if n > 3 {
- n = 3
- }
- v, err := strconv.ParseUint(s[1:1+n], 8, 8)
- if err != nil {
- out = append(out, s[:1+n]...)
- } else {
- out = append(out, byte(v))
- }
- s = s[1+n:]
- } else {
- // bad escape, just propagate the slash as-is
- out = append(out, s[0])
- s = s[1:]
- }
- }
-
- return string(out)
-}
-
-func (g *Generator) generateExtension(ext *ExtensionDescriptor) {
- ccTypeName := ext.DescName()
-
- extObj := g.ObjectNamed(*ext.Extendee)
- var extDesc *Descriptor
- if id, ok := extObj.(*ImportedDescriptor); ok {
- // This is extending a publicly imported message.
- // We need the underlying type for goTag.
- extDesc = id.o.(*Descriptor)
- } else {
- extDesc = extObj.(*Descriptor)
- }
- extendedType := "*" + g.TypeName(extObj) // always use the original
- field := ext.FieldDescriptorProto
- fieldType, wireType := g.GoType(ext.parent, field)
- tag := g.goTag(extDesc, field, wireType)
- g.RecordTypeUse(*ext.Extendee)
- if n := ext.FieldDescriptorProto.TypeName; n != nil {
- // foreign extension type
- g.RecordTypeUse(*n)
- }
-
- typeName := ext.TypeName()
-
- // Special case for proto2 message sets: If this extension is extending
- // proto2_bridge.MessageSet, and its final name component is "message_set_extension",
- // then drop that last component.
- mset := false
- if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" {
- typeName = typeName[:len(typeName)-1]
- mset = true
- }
-
- // For text formatting, the package must be exactly what the .proto file declares,
- // ignoring overrides such as the go_package option, and with no dot/underscore mapping.
- extName := strings.Join(typeName, ".")
- if g.file.Package != nil {
- extName = *g.file.Package + "." + extName
- }
-
- g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{")
- g.In()
- g.P("ExtendedType: (", extendedType, ")(nil),")
- g.P("ExtensionType: (", fieldType, ")(nil),")
- g.P("Field: ", field.Number, ",")
- g.P(`Name: "`, extName, `",`)
- g.P("Tag: ", tag, ",")
- g.P(`Filename: "`, g.file.GetName(), `",`)
-
- g.Out()
- g.P("}")
- g.P()
-
- if mset {
- // Generate a bit more code to register with message_set.go.
- g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName)
- }
-
- g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""})
-}
-
-func (g *Generator) generateInitFunction() {
- for _, enum := range g.file.enum {
- g.generateEnumRegistration(enum)
- }
- for _, d := range g.file.desc {
- for _, ext := range d.ext {
- g.generateExtensionRegistration(ext)
- }
- }
- for _, ext := range g.file.ext {
- g.generateExtensionRegistration(ext)
- }
- if len(g.init) == 0 {
- return
- }
- g.P("func init() {")
- g.In()
- for _, l := range g.init {
- g.P(l)
- }
- g.Out()
- g.P("}")
- g.init = nil
-}
-
-func (g *Generator) generateFileDescriptor(file *FileDescriptor) {
- // Make a copy and trim source_code_info data.
- // TODO: Trim this more when we know exactly what we need.
- pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto)
- pb.SourceCodeInfo = nil
-
- b, err := proto.Marshal(pb)
- if err != nil {
- g.Fail(err.Error())
- }
-
- var buf bytes.Buffer
- w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression)
- w.Write(b)
- w.Close()
- b = buf.Bytes()
-
- v := file.VarName()
- g.P()
- g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }")
- g.P("var ", v, " = []byte{")
- g.In()
- g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto")
- for len(b) > 0 {
- n := 16
- if n > len(b) {
- n = len(b)
- }
-
- s := ""
- for _, c := range b[:n] {
- s += fmt.Sprintf("0x%02x,", c)
- }
- g.P(s)
-
- b = b[n:]
- }
- g.Out()
- g.P("}")
-}
-
-func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) {
- // // We always print the full (proto-world) package name here.
- pkg := enum.File().GetPackage()
- if pkg != "" {
- pkg += "."
- }
- // The full type name
- typeName := enum.TypeName()
- // The full type name, CamelCased.
- ccTypeName := CamelCaseSlice(typeName)
- g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName)
-}
-
-func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) {
- g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
-}
-
-// And now lots of helper functions.
-
-// Is c an ASCII lower-case letter?
-func isASCIILower(c byte) bool {
- return 'a' <= c && c <= 'z'
-}
-
-// Is c an ASCII digit?
-func isASCIIDigit(c byte) bool {
- return '0' <= c && c <= '9'
-}
-
-// CamelCase returns the CamelCased name.
-// If there is an interior underscore followed by a lower case letter,
-// drop the underscore and convert the letter to upper case.
-// There is a remote possibility of this rewrite causing a name collision,
-// but it's so remote we're prepared to pretend it's nonexistent - since the
-// C++ generator lowercases names, it's extremely unlikely to have two fields
-// with different capitalizations.
-// In short, _my_field_name_2 becomes XMyFieldName_2.
-func CamelCase(s string) string {
- if s == "" {
- return ""
- }
- t := make([]byte, 0, 32)
- i := 0
- if s[0] == '_' {
- // Need a capital letter; drop the '_'.
- t = append(t, 'X')
- i++
- }
- // Invariant: if the next letter is lower case, it must be converted
- // to upper case.
- // That is, we process a word at a time, where words are marked by _ or
- // upper case letter. Digits are treated as words.
- for ; i < len(s); i++ {
- c := s[i]
- if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) {
- continue // Skip the underscore in s.
- }
- if isASCIIDigit(c) {
- t = append(t, c)
- continue
- }
- // Assume we have a letter now - if not, it's a bogus identifier.
- // The next word is a sequence of characters that must start upper case.
- if isASCIILower(c) {
- c ^= ' ' // Make it a capital letter.
- }
- t = append(t, c) // Guaranteed not lower case.
- // Accept lower case sequence that follows.
- for i+1 < len(s) && isASCIILower(s[i+1]) {
- i++
- t = append(t, s[i])
- }
- }
- return string(t)
-}
-
-// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to
-// be joined with "_".
-func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) }
-
-// dottedSlice turns a sliced name into a dotted name.
-func dottedSlice(elem []string) string { return strings.Join(elem, ".") }
-
-// Is this field optional?
-func isOptional(field *descriptor.FieldDescriptorProto) bool {
- return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL
-}
-
-// Is this field required?
-func isRequired(field *descriptor.FieldDescriptorProto) bool {
- return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED
-}
-
-// Is this field repeated?
-func isRepeated(field *descriptor.FieldDescriptorProto) bool {
- return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED
-}
-
-// Is this field a scalar numeric type?
-func isScalar(field *descriptor.FieldDescriptorProto) bool {
- if field.Type == nil {
- return false
- }
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE,
- descriptor.FieldDescriptorProto_TYPE_FLOAT,
- descriptor.FieldDescriptorProto_TYPE_INT64,
- descriptor.FieldDescriptorProto_TYPE_UINT64,
- descriptor.FieldDescriptorProto_TYPE_INT32,
- descriptor.FieldDescriptorProto_TYPE_FIXED64,
- descriptor.FieldDescriptorProto_TYPE_FIXED32,
- descriptor.FieldDescriptorProto_TYPE_BOOL,
- descriptor.FieldDescriptorProto_TYPE_UINT32,
- descriptor.FieldDescriptorProto_TYPE_ENUM,
- descriptor.FieldDescriptorProto_TYPE_SFIXED32,
- descriptor.FieldDescriptorProto_TYPE_SFIXED64,
- descriptor.FieldDescriptorProto_TYPE_SINT32,
- descriptor.FieldDescriptorProto_TYPE_SINT64:
- return true
- default:
- return false
- }
-}
-
-// badToUnderscore is the mapping function used to generate Go names from package names,
-// which can be dotted in the input .proto file. It replaces non-identifier characters such as
-// dot or dash with underscore.
-func badToUnderscore(r rune) rune {
- if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' {
- return r
- }
- return '_'
-}
-
-// baseName returns the last path element of the name, with the last dotted suffix removed.
-func baseName(name string) string {
- // First, find the last element
- if i := strings.LastIndex(name, "/"); i >= 0 {
- name = name[i+1:]
- }
- // Now drop the suffix
- if i := strings.LastIndex(name, "."); i >= 0 {
- name = name[0:i]
- }
- return name
-}
-
-// The SourceCodeInfo message describes the location of elements of a parsed
-// .proto file by way of a "path", which is a sequence of integers that
-// describe the route from a FileDescriptorProto to the relevant submessage.
-// The path alternates between a field number of a repeated field, and an index
-// into that repeated field. The constants below define the field numbers that
-// are used.
-//
-// See descriptor.proto for more information about this.
-const (
- // tag numbers in FileDescriptorProto
- packagePath = 2 // package
- messagePath = 4 // message_type
- enumPath = 5 // enum_type
- // tag numbers in DescriptorProto
- messageFieldPath = 2 // field
- messageMessagePath = 3 // nested_type
- messageEnumPath = 4 // enum_type
- messageOneofPath = 8 // oneof_decl
- // tag numbers in EnumDescriptorProto
- enumValuePath = 2 // value
-)
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go
deleted file mode 100644
index 76808f3b7..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2013 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package generator
-
-import (
- "testing"
-
- "github.com/golang/protobuf/protoc-gen-go/descriptor"
-)
-
-func TestCamelCase(t *testing.T) {
- tests := []struct {
- in, want string
- }{
- {"one", "One"},
- {"one_two", "OneTwo"},
- {"_my_field_name_2", "XMyFieldName_2"},
- {"Something_Capped", "Something_Capped"},
- {"my_Name", "My_Name"},
- {"OneTwo", "OneTwo"},
- {"_", "X"},
- {"_a_", "XA_"},
- }
- for _, tc := range tests {
- if got := CamelCase(tc.in); got != tc.want {
- t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want)
- }
- }
-}
-
-func TestGoPackageOption(t *testing.T) {
- tests := []struct {
- in string
- impPath, pkg string
- ok bool
- }{
- {"", "", "", false},
- {"foo", "", "foo", true},
- {"github.com/golang/bar", "github.com/golang/bar", "bar", true},
- {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true},
- }
- for _, tc := range tests {
- d := &FileDescriptor{
- FileDescriptorProto: &descriptor.FileDescriptorProto{
- Options: &descriptor.FileOptions{
- GoPackage: &tc.in,
- },
- },
- }
- impPath, pkg, ok := d.goPackageOption()
- if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok {
- t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in,
- impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok)
- }
- }
-}
-
-func TestUnescape(t *testing.T) {
- tests := []struct {
- in string
- out string
- }{
- // successful cases, including all kinds of escapes
- {"", ""},
- {"foo bar baz frob nitz", "foo bar baz frob nitz"},
- {`\000\001\002\003\004\005\006\007`, string([]byte{0, 1, 2, 3, 4, 5, 6, 7})},
- {`\a\b\f\n\r\t\v\\\?\'\"`, string([]byte{'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '?', '\'', '"'})},
- {`\x10\x20\x30\x40\x50\x60\x70\x80`, string([]byte{16, 32, 48, 64, 80, 96, 112, 128})},
- // variable length octal escapes
- {`\0\018\222\377\3\04\005\6\07`, string([]byte{0, 1, '8', 0222, 255, 3, 4, 5, 6, 7})},
- // malformed escape sequences left as is
- {"foo \\g bar", "foo \\g bar"},
- {"foo \\xg0 bar", "foo \\xg0 bar"},
- {"\\", "\\"},
- {"\\x", "\\x"},
- {"\\xf", "\\xf"},
- {"\\777", "\\777"}, // overflows byte
- }
- for _, tc := range tests {
- s := unescape(tc.in)
- if s != tc.out {
- t.Errorf("doUnescape(%q) = %q; should have been %q", tc.in, s, tc.out)
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go
deleted file mode 100644
index 2660e47a2..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go
+++ /dev/null
@@ -1,463 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Package grpc outputs gRPC service descriptions in Go code.
-// It runs as a plugin for the Go protocol buffer compiler plugin.
-// It is linked in to protoc-gen-go.
-package grpc
-
-import (
- "fmt"
- "path"
- "strconv"
- "strings"
-
- pb "github.com/golang/protobuf/protoc-gen-go/descriptor"
- "github.com/golang/protobuf/protoc-gen-go/generator"
-)
-
-// generatedCodeVersion indicates a version of the generated code.
-// It is incremented whenever an incompatibility between the generated code and
-// the grpc package is introduced; the generated code references
-// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion).
-const generatedCodeVersion = 4
-
-// Paths for packages used by code generated in this file,
-// relative to the import_prefix of the generator.Generator.
-const (
- contextPkgPath = "golang.org/x/net/context"
- grpcPkgPath = "google.golang.org/grpc"
-)
-
-func init() {
- generator.RegisterPlugin(new(grpc))
-}
-
-// grpc is an implementation of the Go protocol buffer compiler's
-// plugin architecture. It generates bindings for gRPC support.
-type grpc struct {
- gen *generator.Generator
-}
-
-// Name returns the name of this plugin, "grpc".
-func (g *grpc) Name() string {
- return "grpc"
-}
-
-// The names for packages imported in the generated code.
-// They may vary from the final path component of the import path
-// if the name is used by other packages.
-var (
- contextPkg string
- grpcPkg string
-)
-
-// Init initializes the plugin.
-func (g *grpc) Init(gen *generator.Generator) {
- g.gen = gen
- contextPkg = generator.RegisterUniquePackageName("context", nil)
- grpcPkg = generator.RegisterUniquePackageName("grpc", nil)
-}
-
-// Given a type name defined in a .proto, return its object.
-// Also record that we're using it, to guarantee the associated import.
-func (g *grpc) objectNamed(name string) generator.Object {
- g.gen.RecordTypeUse(name)
- return g.gen.ObjectNamed(name)
-}
-
-// Given a type name defined in a .proto, return its name as we will print it.
-func (g *grpc) typeName(str string) string {
- return g.gen.TypeName(g.objectNamed(str))
-}
-
-// P forwards to g.gen.P.
-func (g *grpc) P(args ...interface{}) { g.gen.P(args...) }
-
-// Generate generates code for the services in the given file.
-func (g *grpc) Generate(file *generator.FileDescriptor) {
- if len(file.FileDescriptorProto.Service) == 0 {
- return
- }
-
- g.P("// Reference imports to suppress errors if they are not otherwise used.")
- g.P("var _ ", contextPkg, ".Context")
- g.P("var _ ", grpcPkg, ".ClientConn")
- g.P()
-
- // Assert version compatibility.
- g.P("// This is a compile-time assertion to ensure that this generated file")
- g.P("// is compatible with the grpc package it is being compiled against.")
- g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion)
- g.P()
-
- for i, service := range file.FileDescriptorProto.Service {
- g.generateService(file, service, i)
- }
-}
-
-// GenerateImports generates the import declaration for this file.
-func (g *grpc) GenerateImports(file *generator.FileDescriptor) {
- if len(file.FileDescriptorProto.Service) == 0 {
- return
- }
- g.P("import (")
- g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath)))
- g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath)))
- g.P(")")
- g.P()
-}
-
-// reservedClientName records whether a client name is reserved on the client side.
-var reservedClientName = map[string]bool{
-// TODO: do we need any in gRPC?
-}
-
-func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] }
-
-// generateService generates all the code for the named service.
-func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) {
- path := fmt.Sprintf("6,%d", index) // 6 means service.
-
- origServName := service.GetName()
- fullServName := origServName
- if pkg := file.GetPackage(); pkg != "" {
- fullServName = pkg + "." + fullServName
- }
- servName := generator.CamelCase(origServName)
-
- g.P()
- g.P("// Client API for ", servName, " service")
- g.P()
-
- // Client interface.
- g.P("type ", servName, "Client interface {")
- for i, method := range service.Method {
- g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service.
- g.P(g.generateClientSignature(servName, method))
- }
- g.P("}")
- g.P()
-
- // Client structure.
- g.P("type ", unexport(servName), "Client struct {")
- g.P("cc *", grpcPkg, ".ClientConn")
- g.P("}")
- g.P()
-
- // NewClient factory.
- g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {")
- g.P("return &", unexport(servName), "Client{cc}")
- g.P("}")
- g.P()
-
- var methodIndex, streamIndex int
- serviceDescVar := "_" + servName + "_serviceDesc"
- // Client method implementations.
- for _, method := range service.Method {
- var descExpr string
- if !method.GetServerStreaming() && !method.GetClientStreaming() {
- // Unary RPC method
- descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex)
- methodIndex++
- } else {
- // Streaming RPC method
- descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex)
- streamIndex++
- }
- g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr)
- }
-
- g.P("// Server API for ", servName, " service")
- g.P()
-
- // Server interface.
- serverType := servName + "Server"
- g.P("type ", serverType, " interface {")
- for i, method := range service.Method {
- g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service.
- g.P(g.generateServerSignature(servName, method))
- }
- g.P("}")
- g.P()
-
- // Server registration.
- g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {")
- g.P("s.RegisterService(&", serviceDescVar, `, srv)`)
- g.P("}")
- g.P()
-
- // Server handler implementations.
- var handlerNames []string
- for _, method := range service.Method {
- hname := g.generateServerMethod(servName, fullServName, method)
- handlerNames = append(handlerNames, hname)
- }
-
- // Service descriptor.
- g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {")
- g.P("ServiceName: ", strconv.Quote(fullServName), ",")
- g.P("HandlerType: (*", serverType, ")(nil),")
- g.P("Methods: []", grpcPkg, ".MethodDesc{")
- for i, method := range service.Method {
- if method.GetServerStreaming() || method.GetClientStreaming() {
- continue
- }
- g.P("{")
- g.P("MethodName: ", strconv.Quote(method.GetName()), ",")
- g.P("Handler: ", handlerNames[i], ",")
- g.P("},")
- }
- g.P("},")
- g.P("Streams: []", grpcPkg, ".StreamDesc{")
- for i, method := range service.Method {
- if !method.GetServerStreaming() && !method.GetClientStreaming() {
- continue
- }
- g.P("{")
- g.P("StreamName: ", strconv.Quote(method.GetName()), ",")
- g.P("Handler: ", handlerNames[i], ",")
- if method.GetServerStreaming() {
- g.P("ServerStreams: true,")
- }
- if method.GetClientStreaming() {
- g.P("ClientStreams: true,")
- }
- g.P("},")
- }
- g.P("},")
- g.P("Metadata: \"", file.GetName(), "\",")
- g.P("}")
- g.P()
-}
-
-// generateClientSignature returns the client-side signature for a method.
-func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string {
- origMethName := method.GetName()
- methName := generator.CamelCase(origMethName)
- if reservedClientName[methName] {
- methName += "_"
- }
- reqArg := ", in *" + g.typeName(method.GetInputType())
- if method.GetClientStreaming() {
- reqArg = ""
- }
- respName := "*" + g.typeName(method.GetOutputType())
- if method.GetServerStreaming() || method.GetClientStreaming() {
- respName = servName + "_" + generator.CamelCase(origMethName) + "Client"
- }
- return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName)
-}
-
-func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) {
- sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName())
- methName := generator.CamelCase(method.GetName())
- inType := g.typeName(method.GetInputType())
- outType := g.typeName(method.GetOutputType())
-
- g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{")
- if !method.GetServerStreaming() && !method.GetClientStreaming() {
- g.P("out := new(", outType, ")")
- // TODO: Pass descExpr to Invoke.
- g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`)
- g.P("if err != nil { return nil, err }")
- g.P("return out, nil")
- g.P("}")
- g.P()
- return
- }
- streamType := unexport(servName) + methName + "Client"
- g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`)
- g.P("if err != nil { return nil, err }")
- g.P("x := &", streamType, "{stream}")
- if !method.GetClientStreaming() {
- g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }")
- g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }")
- }
- g.P("return x, nil")
- g.P("}")
- g.P()
-
- genSend := method.GetClientStreaming()
- genRecv := method.GetServerStreaming()
- genCloseAndRecv := !method.GetServerStreaming()
-
- // Stream auxiliary types and methods.
- g.P("type ", servName, "_", methName, "Client interface {")
- if genSend {
- g.P("Send(*", inType, ") error")
- }
- if genRecv {
- g.P("Recv() (*", outType, ", error)")
- }
- if genCloseAndRecv {
- g.P("CloseAndRecv() (*", outType, ", error)")
- }
- g.P(grpcPkg, ".ClientStream")
- g.P("}")
- g.P()
-
- g.P("type ", streamType, " struct {")
- g.P(grpcPkg, ".ClientStream")
- g.P("}")
- g.P()
-
- if genSend {
- g.P("func (x *", streamType, ") Send(m *", inType, ") error {")
- g.P("return x.ClientStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genRecv {
- g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {")
- g.P("m := new(", outType, ")")
- g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
- if genCloseAndRecv {
- g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {")
- g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }")
- g.P("m := new(", outType, ")")
- g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
-}
-
-// generateServerSignature returns the server-side signature for a method.
-func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string {
- origMethName := method.GetName()
- methName := generator.CamelCase(origMethName)
- if reservedClientName[methName] {
- methName += "_"
- }
-
- var reqArgs []string
- ret := "error"
- if !method.GetServerStreaming() && !method.GetClientStreaming() {
- reqArgs = append(reqArgs, contextPkg+".Context")
- ret = "(*" + g.typeName(method.GetOutputType()) + ", error)"
- }
- if !method.GetClientStreaming() {
- reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType()))
- }
- if method.GetServerStreaming() || method.GetClientStreaming() {
- reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server")
- }
-
- return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret
-}
-
-func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string {
- methName := generator.CamelCase(method.GetName())
- hname := fmt.Sprintf("_%s_%s_Handler", servName, methName)
- inType := g.typeName(method.GetInputType())
- outType := g.typeName(method.GetOutputType())
-
- if !method.GetServerStreaming() && !method.GetClientStreaming() {
- g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {")
- g.P("in := new(", inType, ")")
- g.P("if err := dec(in); err != nil { return nil, err }")
- g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }")
- g.P("info := &", grpcPkg, ".UnaryServerInfo{")
- g.P("Server: srv,")
- g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",")
- g.P("}")
- g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {")
- g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))")
- g.P("}")
- g.P("return interceptor(ctx, in, info, handler)")
- g.P("}")
- g.P()
- return hname
- }
- streamType := unexport(servName) + methName + "Server"
- g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {")
- if !method.GetClientStreaming() {
- g.P("m := new(", inType, ")")
- g.P("if err := stream.RecvMsg(m); err != nil { return err }")
- g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})")
- } else {
- g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})")
- }
- g.P("}")
- g.P()
-
- genSend := method.GetServerStreaming()
- genSendAndClose := !method.GetServerStreaming()
- genRecv := method.GetClientStreaming()
-
- // Stream auxiliary types and methods.
- g.P("type ", servName, "_", methName, "Server interface {")
- if genSend {
- g.P("Send(*", outType, ") error")
- }
- if genSendAndClose {
- g.P("SendAndClose(*", outType, ") error")
- }
- if genRecv {
- g.P("Recv() (*", inType, ", error)")
- }
- g.P(grpcPkg, ".ServerStream")
- g.P("}")
- g.P()
-
- g.P("type ", streamType, " struct {")
- g.P(grpcPkg, ".ServerStream")
- g.P("}")
- g.P()
-
- if genSend {
- g.P("func (x *", streamType, ") Send(m *", outType, ") error {")
- g.P("return x.ServerStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genSendAndClose {
- g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {")
- g.P("return x.ServerStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genRecv {
- g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {")
- g.P("m := new(", inType, ")")
- g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
-
- return hname
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go
deleted file mode 100644
index 532a55005..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package main
-
-import _ "github.com/golang/protobuf/protoc-gen-go/grpc"
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/main.go b/vendor/github.com/golang/protobuf/protoc-gen-go/main.go
deleted file mode 100644
index 8e2486de0..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/main.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate
-// Go code. Run it by building this program and putting it in your path with
-// the name
-// protoc-gen-go
-// That word 'go' at the end becomes part of the option string set for the
-// protocol compiler, so once the protocol compiler (protoc) is installed
-// you can run
-// protoc --go_out=output_directory input_directory/file.proto
-// to generate Go bindings for the protocol defined by file.proto.
-// With that input, the output will be written to
-// output_directory/file.pb.go
-//
-// The generated code is documented in the package comment for
-// the library.
-//
-// See the README and documentation for protocol buffers to learn more:
-// https://developers.google.com/protocol-buffers/
-package main
-
-import (
- "io/ioutil"
- "os"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/protoc-gen-go/generator"
-)
-
-func main() {
- // Begin by allocating a generator. The request and response structures are stored there
- // so we can do error handling easily - the response structure contains the field to
- // report failure.
- g := generator.New()
-
- data, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- g.Error(err, "reading input")
- }
-
- if err := proto.Unmarshal(data, g.Request); err != nil {
- g.Error(err, "parsing input proto")
- }
-
- if len(g.Request.FileToGenerate) == 0 {
- g.Fail("no files to generate")
- }
-
- g.CommandLineParameters(g.Request.GetParameter())
-
- // Create a wrapped version of the Descriptors and EnumDescriptors that
- // point to the file that defines them.
- g.WrapTypes()
-
- g.SetPackageNames()
- g.BuildTypeNameMap()
-
- g.GenerateAllFiles()
-
- // Send back the results.
- data, err = proto.Marshal(g.Response)
- if err != nil {
- g.Error(err, "failed to marshal output proto")
- }
- _, err = os.Stdout.Write(data)
- if err != nil {
- g.Error(err, "failed to write output proto")
- }
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile
deleted file mode 100644
index bc0463d57..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-# Not stored here, but plugin.proto is in https://github.com/google/protobuf/
-# at src/google/protobuf/compiler/plugin.proto
-# Also we need to fix an import.
-regenerate:
- @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION
- cp $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto .
- protoc --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:../../../../.. \
- -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto
-
-restore:
- cp plugin.pb.golden plugin.pb.go
-
-preserve:
- cp plugin.pb.go plugin.pb.golden
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go
deleted file mode 100644
index c608a248b..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/compiler/plugin.proto
-
-/*
-Package plugin_go is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/compiler/plugin.proto
-
-It has these top-level messages:
- Version
- CodeGeneratorRequest
- CodeGeneratorResponse
-*/
-package plugin_go
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// The version number of protocol compiler.
-type Version struct {
- Major *int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
- Minor *int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
- Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
- // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
- // be empty for mainline stable releases.
- Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Version) Reset() { *m = Version{} }
-func (m *Version) String() string { return proto.CompactTextString(m) }
-func (*Version) ProtoMessage() {}
-func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *Version) GetMajor() int32 {
- if m != nil && m.Major != nil {
- return *m.Major
- }
- return 0
-}
-
-func (m *Version) GetMinor() int32 {
- if m != nil && m.Minor != nil {
- return *m.Minor
- }
- return 0
-}
-
-func (m *Version) GetPatch() int32 {
- if m != nil && m.Patch != nil {
- return *m.Patch
- }
- return 0
-}
-
-func (m *Version) GetSuffix() string {
- if m != nil && m.Suffix != nil {
- return *m.Suffix
- }
- return ""
-}
-
-// An encoded CodeGeneratorRequest is written to the plugin's stdin.
-type CodeGeneratorRequest struct {
- // The .proto files that were explicitly listed on the command-line. The
- // code generator should generate code only for these files. Each file's
- // descriptor will be included in proto_file, below.
- FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"`
- // The generator parameter passed on the command-line.
- Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
- // FileDescriptorProtos for all files in files_to_generate and everything
- // they import. The files will appear in topological order, so each file
- // appears before any file that imports it.
- //
- // protoc guarantees that all proto_files will be written after
- // the fields above, even though this is not technically guaranteed by the
- // protobuf wire format. This theoretically could allow a plugin to stream
- // in the FileDescriptorProtos and handle them one by one rather than read
- // the entire set into memory at once. However, as of this writing, this
- // is not similarly optimized on protoc's end -- it will store all fields in
- // memory at once before sending them to the plugin.
- //
- // Type names of fields and extensions in the FileDescriptorProto are always
- // fully qualified.
- ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
- // The version number of protocol compiler.
- CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
-func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
-func (*CodeGeneratorRequest) ProtoMessage() {}
-func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
- if m != nil {
- return m.FileToGenerate
- }
- return nil
-}
-
-func (m *CodeGeneratorRequest) GetParameter() string {
- if m != nil && m.Parameter != nil {
- return *m.Parameter
- }
- return ""
-}
-
-func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
- if m != nil {
- return m.ProtoFile
- }
- return nil
-}
-
-func (m *CodeGeneratorRequest) GetCompilerVersion() *Version {
- if m != nil {
- return m.CompilerVersion
- }
- return nil
-}
-
-// The plugin writes an encoded CodeGeneratorResponse to stdout.
-type CodeGeneratorResponse struct {
- // Error message. If non-empty, code generation failed. The plugin process
- // should exit with status code zero even if it reports an error in this way.
- //
- // This should be used to indicate errors in .proto files which prevent the
- // code generator from generating correct code. Errors which indicate a
- // problem in protoc itself -- such as the input CodeGeneratorRequest being
- // unparseable -- should be reported by writing a message to stderr and
- // exiting with a non-zero status code.
- Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
- File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
-func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
-func (*CodeGeneratorResponse) ProtoMessage() {}
-func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *CodeGeneratorResponse) GetError() string {
- if m != nil && m.Error != nil {
- return *m.Error
- }
- return ""
-}
-
-func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
- if m != nil {
- return m.File
- }
- return nil
-}
-
-// Represents a single generated file.
-type CodeGeneratorResponse_File struct {
- // The file name, relative to the output directory. The name must not
- // contain "." or ".." components and must be relative, not be absolute (so,
- // the file cannot lie outside the output directory). "/" must be used as
- // the path separator, not "\".
- //
- // If the name is omitted, the content will be appended to the previous
- // file. This allows the generator to break large files into small chunks,
- // and allows the generated text to be streamed back to protoc so that large
- // files need not reside completely in memory at one time. Note that as of
- // this writing protoc does not optimize for this -- it will read the entire
- // CodeGeneratorResponse before writing files to disk.
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // If non-empty, indicates that the named file should already exist, and the
- // content here is to be inserted into that file at a defined insertion
- // point. This feature allows a code generator to extend the output
- // produced by another code generator. The original generator may provide
- // insertion points by placing special annotations in the file that look
- // like:
- // @@protoc_insertion_point(NAME)
- // The annotation can have arbitrary text before and after it on the line,
- // which allows it to be placed in a comment. NAME should be replaced with
- // an identifier naming the point -- this is what other generators will use
- // as the insertion_point. Code inserted at this point will be placed
- // immediately above the line containing the insertion point (thus multiple
- // insertions to the same point will come out in the order they were added).
- // The double-@ is intended to make it unlikely that the generated code
- // could contain things that look like insertion points by accident.
- //
- // For example, the C++ code generator places the following line in the
- // .pb.h files that it generates:
- // // @@protoc_insertion_point(namespace_scope)
- // This line appears within the scope of the file's package namespace, but
- // outside of any particular class. Another plugin can then specify the
- // insertion_point "namespace_scope" to generate additional classes or
- // other declarations that should be placed in this scope.
- //
- // Note that if the line containing the insertion point begins with
- // whitespace, the same whitespace will be added to every line of the
- // inserted text. This is useful for languages like Python, where
- // indentation matters. In these languages, the insertion point comment
- // should be indented the same amount as any inserted code will need to be
- // in order to work correctly in that context.
- //
- // The code generator that generates the initial file and the one which
- // inserts into it must both run as part of a single invocation of protoc.
- // Code generators are executed in the order in which they appear on the
- // command line.
- //
- // If |insertion_point| is present, |name| must also be present.
- InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
- // The file contents.
- Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
-func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
-func (*CodeGeneratorResponse_File) ProtoMessage() {}
-func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-func (m *CodeGeneratorResponse_File) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
- if m != nil && m.InsertionPoint != nil {
- return *m.InsertionPoint
- }
- return ""
-}
-
-func (m *CodeGeneratorResponse_File) GetContent() string {
- if m != nil && m.Content != nil {
- return *m.Content
- }
- return ""
-}
-
-func init() {
- proto.RegisterType((*Version)(nil), "google.protobuf.compiler.Version")
- proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest")
- proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse")
- proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
-}
-
-func init() { proto.RegisterFile("google/protobuf/compiler/plugin.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 417 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x6a, 0x14, 0x41,
- 0x10, 0xc6, 0x19, 0x77, 0x63, 0x98, 0x8a, 0x64, 0x43, 0x13, 0xa5, 0x09, 0x39, 0x8c, 0x8b, 0xe2,
- 0x5c, 0x32, 0x0b, 0xc1, 0x8b, 0x78, 0x4b, 0x44, 0x3d, 0x78, 0x58, 0x1a, 0xf1, 0x20, 0xc8, 0x30,
- 0x99, 0xd4, 0x74, 0x5a, 0x66, 0xba, 0xc6, 0xee, 0x1e, 0xf1, 0x49, 0x7d, 0x0f, 0xdf, 0x40, 0xfa,
- 0xcf, 0x24, 0xb2, 0xb8, 0xa7, 0xee, 0xef, 0x57, 0xd5, 0xd5, 0x55, 0x1f, 0x05, 0x2f, 0x25, 0x91,
- 0xec, 0x71, 0x33, 0x1a, 0x72, 0x74, 0x33, 0x75, 0x9b, 0x96, 0x86, 0x51, 0xf5, 0x68, 0x36, 0x63,
- 0x3f, 0x49, 0xa5, 0xab, 0x10, 0x60, 0x3c, 0xa6, 0x55, 0x73, 0x5a, 0x35, 0xa7, 0x9d, 0x15, 0xbb,
- 0x05, 0x6e, 0xd1, 0xb6, 0x46, 0x8d, 0x8e, 0x4c, 0xcc, 0x5e, 0xb7, 0x70, 0xf8, 0x05, 0x8d, 0x55,
- 0xa4, 0xd9, 0x29, 0x1c, 0x0c, 0xcd, 0x77, 0x32, 0x3c, 0x2b, 0xb2, 0xf2, 0x40, 0x44, 0x11, 0xa8,
- 0xd2, 0x64, 0xf8, 0xa3, 0x44, 0xbd, 0xf0, 0x74, 0x6c, 0x5c, 0x7b, 0xc7, 0x17, 0x91, 0x06, 0xc1,
- 0x9e, 0xc1, 0x63, 0x3b, 0x75, 0x9d, 0xfa, 0xc5, 0x97, 0x45, 0x56, 0xe6, 0x22, 0xa9, 0xf5, 0x9f,
- 0x0c, 0x4e, 0xaf, 0xe9, 0x16, 0x3f, 0xa0, 0x46, 0xd3, 0x38, 0x32, 0x02, 0x7f, 0x4c, 0x68, 0x1d,
- 0x2b, 0xe1, 0xa4, 0x53, 0x3d, 0xd6, 0x8e, 0x6a, 0x19, 0x63, 0xc8, 0xb3, 0x62, 0x51, 0xe6, 0xe2,
- 0xd8, 0xf3, 0xcf, 0x94, 0x5e, 0x20, 0x3b, 0x87, 0x7c, 0x6c, 0x4c, 0x33, 0xa0, 0xc3, 0xd8, 0x4a,
- 0x2e, 0x1e, 0x00, 0xbb, 0x06, 0x08, 0xe3, 0xd4, 0xfe, 0x15, 0x5f, 0x15, 0x8b, 0xf2, 0xe8, 0xf2,
- 0x45, 0xb5, 0x6b, 0xcb, 0x7b, 0xd5, 0xe3, 0xbb, 0x7b, 0x03, 0xb6, 0x1e, 0x8b, 0x3c, 0x44, 0x7d,
- 0x84, 0x7d, 0x82, 0x93, 0xd9, 0xb8, 0xfa, 0x67, 0xf4, 0x24, 0x8c, 0x77, 0x74, 0xf9, 0xbc, 0xda,
- 0xe7, 0x70, 0x95, 0xcc, 0x13, 0xab, 0x99, 0x24, 0xb0, 0xfe, 0x9d, 0xc1, 0xd3, 0x9d, 0x99, 0xed,
- 0x48, 0xda, 0xa2, 0xf7, 0x0e, 0x8d, 0x49, 0x3e, 0xe7, 0x22, 0x0a, 0xf6, 0x11, 0x96, 0xff, 0x34,
- 0xff, 0x7a, 0xff, 0x8f, 0xff, 0x2d, 0x1a, 0x66, 0x13, 0xa1, 0xc2, 0xd9, 0x37, 0x58, 0x86, 0x79,
- 0x18, 0x2c, 0x75, 0x33, 0x60, 0xfa, 0x26, 0xdc, 0xd9, 0x2b, 0x58, 0x29, 0x6d, 0xd1, 0x38, 0x45,
- 0xba, 0x1e, 0x49, 0x69, 0x97, 0xcc, 0x3c, 0xbe, 0xc7, 0x5b, 0x4f, 0x19, 0x87, 0xc3, 0x96, 0xb4,
- 0x43, 0xed, 0xf8, 0x2a, 0x24, 0xcc, 0xf2, 0x4a, 0xc2, 0x79, 0x4b, 0xc3, 0xde, 0xfe, 0xae, 0x9e,
- 0x6c, 0xc3, 0x6e, 0x06, 0x7b, 0xed, 0xd7, 0x37, 0x52, 0xb9, 0xbb, 0xe9, 0xc6, 0x87, 0x37, 0x92,
- 0xfa, 0x46, 0xcb, 0x87, 0x65, 0x0c, 0x97, 0xf6, 0x42, 0xa2, 0xbe, 0x90, 0x94, 0x56, 0xfa, 0x6d,
- 0x3c, 0x6a, 0x49, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x15, 0x40, 0xc5, 0xfe, 0x02, 0x00,
- 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden
deleted file mode 100644
index 8953d0ff8..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden
+++ /dev/null
@@ -1,83 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: google/protobuf/compiler/plugin.proto
-// DO NOT EDIT!
-
-package google_protobuf_compiler
-
-import proto "github.com/golang/protobuf/proto"
-import "math"
-import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
-
-// Reference proto and math imports to suppress error if they are not otherwise used.
-var _ = proto.GetString
-var _ = math.Inf
-
-type CodeGeneratorRequest struct {
- FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate" json:"file_to_generate,omitempty"`
- Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
- ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file" json:"proto_file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (this *CodeGeneratorRequest) Reset() { *this = CodeGeneratorRequest{} }
-func (this *CodeGeneratorRequest) String() string { return proto.CompactTextString(this) }
-func (*CodeGeneratorRequest) ProtoMessage() {}
-
-func (this *CodeGeneratorRequest) GetParameter() string {
- if this != nil && this.Parameter != nil {
- return *this.Parameter
- }
- return ""
-}
-
-type CodeGeneratorResponse struct {
- Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
- File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (this *CodeGeneratorResponse) Reset() { *this = CodeGeneratorResponse{} }
-func (this *CodeGeneratorResponse) String() string { return proto.CompactTextString(this) }
-func (*CodeGeneratorResponse) ProtoMessage() {}
-
-func (this *CodeGeneratorResponse) GetError() string {
- if this != nil && this.Error != nil {
- return *this.Error
- }
- return ""
-}
-
-type CodeGeneratorResponse_File struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point" json:"insertion_point,omitempty"`
- Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (this *CodeGeneratorResponse_File) Reset() { *this = CodeGeneratorResponse_File{} }
-func (this *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(this) }
-func (*CodeGeneratorResponse_File) ProtoMessage() {}
-
-func (this *CodeGeneratorResponse_File) GetName() string {
- if this != nil && this.Name != nil {
- return *this.Name
- }
- return ""
-}
-
-func (this *CodeGeneratorResponse_File) GetInsertionPoint() string {
- if this != nil && this.InsertionPoint != nil {
- return *this.InsertionPoint
- }
- return ""
-}
-
-func (this *CodeGeneratorResponse_File) GetContent() string {
- if this != nil && this.Content != nil {
- return *this.Content
- }
- return ""
-}
-
-func init() {
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto
deleted file mode 100644
index 5b5574529..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto
+++ /dev/null
@@ -1,167 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Author: kenton@google.com (Kenton Varda)
-//
-// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
-// change.
-//
-// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
-// just a program that reads a CodeGeneratorRequest from stdin and writes a
-// CodeGeneratorResponse to stdout.
-//
-// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
-// of dealing with the raw protocol defined here.
-//
-// A plugin executable needs only to be placed somewhere in the path. The
-// plugin should be named "protoc-gen-$NAME", and will then be used when the
-// flag "--${NAME}_out" is passed to protoc.
-
-syntax = "proto2";
-package google.protobuf.compiler;
-option java_package = "com.google.protobuf.compiler";
-option java_outer_classname = "PluginProtos";
-
-option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
-
-import "google/protobuf/descriptor.proto";
-
-// The version number of protocol compiler.
-message Version {
- optional int32 major = 1;
- optional int32 minor = 2;
- optional int32 patch = 3;
- // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
- // be empty for mainline stable releases.
- optional string suffix = 4;
-}
-
-// An encoded CodeGeneratorRequest is written to the plugin's stdin.
-message CodeGeneratorRequest {
- // The .proto files that were explicitly listed on the command-line. The
- // code generator should generate code only for these files. Each file's
- // descriptor will be included in proto_file, below.
- repeated string file_to_generate = 1;
-
- // The generator parameter passed on the command-line.
- optional string parameter = 2;
-
- // FileDescriptorProtos for all files in files_to_generate and everything
- // they import. The files will appear in topological order, so each file
- // appears before any file that imports it.
- //
- // protoc guarantees that all proto_files will be written after
- // the fields above, even though this is not technically guaranteed by the
- // protobuf wire format. This theoretically could allow a plugin to stream
- // in the FileDescriptorProtos and handle them one by one rather than read
- // the entire set into memory at once. However, as of this writing, this
- // is not similarly optimized on protoc's end -- it will store all fields in
- // memory at once before sending them to the plugin.
- //
- // Type names of fields and extensions in the FileDescriptorProto are always
- // fully qualified.
- repeated FileDescriptorProto proto_file = 15;
-
- // The version number of protocol compiler.
- optional Version compiler_version = 3;
-
-}
-
-// The plugin writes an encoded CodeGeneratorResponse to stdout.
-message CodeGeneratorResponse {
- // Error message. If non-empty, code generation failed. The plugin process
- // should exit with status code zero even if it reports an error in this way.
- //
- // This should be used to indicate errors in .proto files which prevent the
- // code generator from generating correct code. Errors which indicate a
- // problem in protoc itself -- such as the input CodeGeneratorRequest being
- // unparseable -- should be reported by writing a message to stderr and
- // exiting with a non-zero status code.
- optional string error = 1;
-
- // Represents a single generated file.
- message File {
- // The file name, relative to the output directory. The name must not
- // contain "." or ".." components and must be relative, not be absolute (so,
- // the file cannot lie outside the output directory). "/" must be used as
- // the path separator, not "\".
- //
- // If the name is omitted, the content will be appended to the previous
- // file. This allows the generator to break large files into small chunks,
- // and allows the generated text to be streamed back to protoc so that large
- // files need not reside completely in memory at one time. Note that as of
- // this writing protoc does not optimize for this -- it will read the entire
- // CodeGeneratorResponse before writing files to disk.
- optional string name = 1;
-
- // If non-empty, indicates that the named file should already exist, and the
- // content here is to be inserted into that file at a defined insertion
- // point. This feature allows a code generator to extend the output
- // produced by another code generator. The original generator may provide
- // insertion points by placing special annotations in the file that look
- // like:
- // @@protoc_insertion_point(NAME)
- // The annotation can have arbitrary text before and after it on the line,
- // which allows it to be placed in a comment. NAME should be replaced with
- // an identifier naming the point -- this is what other generators will use
- // as the insertion_point. Code inserted at this point will be placed
- // immediately above the line containing the insertion point (thus multiple
- // insertions to the same point will come out in the order they were added).
- // The double-@ is intended to make it unlikely that the generated code
- // could contain things that look like insertion points by accident.
- //
- // For example, the C++ code generator places the following line in the
- // .pb.h files that it generates:
- // // @@protoc_insertion_point(namespace_scope)
- // This line appears within the scope of the file's package namespace, but
- // outside of any particular class. Another plugin can then specify the
- // insertion_point "namespace_scope" to generate additional classes or
- // other declarations that should be placed in this scope.
- //
- // Note that if the line containing the insertion point begins with
- // whitespace, the same whitespace will be added to every line of the
- // inserted text. This is useful for languages like Python, where
- // indentation matters. In these languages, the insertion point comment
- // should be indented the same amount as any inserted code will need to be
- // in order to work correctly in that context.
- //
- // The code generator that generates the initial file and the one which
- // inserts into it must both run as part of a single invocation of protoc.
- // Code generators are executed in the order in which they appear on the
- // command line.
- //
- // If |insertion_point| is present, |name| must also be present.
- optional string insertion_point = 2;
-
- // The file contents.
- optional string content = 15;
- }
- repeated File file = 15;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile
deleted file mode 100644
index a0bf9fefd..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-# Go support for Protocol Buffers - Google's data interchange format
-#
-# Copyright 2010 The Go Authors. All rights reserved.
-# https://github.com/golang/protobuf
-#
-# 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.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may 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
-# OWNER 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.
-
-all:
- @echo run make test
-
-include ../../Make.protobuf
-
-test: golden testbuild
-
-#test: golden testbuild extension_test
-# ./extension_test
-# @echo PASS
-
-my_test/test.pb.go: my_test/test.proto
- protoc --go_out=Mmulti/multi1.proto=github.com/golang/protobuf/protoc-gen-go/testdata/multi:. $<
-
-golden:
- make -B my_test/test.pb.go
- sed -i -e '/return.*fileDescriptor/d' my_test/test.pb.go
- sed -i -e '/^var fileDescriptor/,/^}/d' my_test/test.pb.go
- sed -i -e '/proto.RegisterFile.*fileDescriptor/d' my_test/test.pb.go
- gofmt -w my_test/test.pb.go
- diff -w my_test/test.pb.go my_test/test.pb.go.golden
-
-nuke: clean
-
-testbuild: regenerate
- go test
-
-regenerate:
- # Invoke protoc once to generate three independent .pb.go files in the same package.
- protoc --go_out=. multi/multi1.proto multi/multi2.proto multi/multi3.proto
-
-#extension_test: extension_test.$O
-# $(LD) -L. -o $@ $<
-
-#multi.a: multi3.pb.$O multi2.pb.$O multi1.pb.$O
-# rm -f multi.a
-# $(QUOTED_GOBIN)/gopack grc $@ $<
-
-#test.pb.go: imp.pb.go
-#multi1.pb.go: multi2.pb.go multi3.pb.go
-#main.$O: imp.pb.$O test.pb.$O multi.a
-#extension_test.$O: extension_base.pb.$O extension_extra.pb.$O extension_user.pb.$O
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto
deleted file mode 100644
index 94acfc1bc..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto
+++ /dev/null
@@ -1,46 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package extension_base;
-
-message BaseMessage {
- optional int32 height = 1;
- extensions 4 to 9;
- extensions 16 to max;
-}
-
-// Another message that may be extended, using message_set_wire_format.
-message OldStyleMessage {
- option message_set_wire_format = true;
- extensions 100 to max;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto
deleted file mode 100644
index fca7f600c..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package extension_extra;
-
-message ExtraMessage {
- optional int32 width = 1;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go
deleted file mode 100644
index 86e9c118a..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Test that we can use protocol buffers that use extensions.
-
-package testdata
-
-/*
-
-import (
- "bytes"
- "regexp"
- "testing"
-
- "github.com/golang/protobuf/proto"
- base "extension_base.pb"
- user "extension_user.pb"
-)
-
-func TestSingleFieldExtension(t *testing.T) {
- bm := &base.BaseMessage{
- Height: proto.Int32(178),
- }
-
- // Use extension within scope of another type.
- vol := proto.Uint32(11)
- err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol)
- if err != nil {
- t.Fatal("Failed setting extension:", err)
- }
- buf, err := proto.Marshal(bm)
- if err != nil {
- t.Fatal("Failed encoding message with extension:", err)
- }
- bm_new := new(base.BaseMessage)
- if err := proto.Unmarshal(buf, bm_new); err != nil {
- t.Fatal("Failed decoding message with extension:", err)
- }
- if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) {
- t.Fatal("Decoded message didn't contain extension.")
- }
- vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume)
- if err != nil {
- t.Fatal("Failed getting extension:", err)
- }
- if v := vol_out.(*uint32); *v != *vol {
- t.Errorf("vol_out = %v, expected %v", *v, *vol)
- }
- proto.ClearExtension(bm_new, user.E_LoudMessage_Volume)
- if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) {
- t.Fatal("Failed clearing extension.")
- }
-}
-
-func TestMessageExtension(t *testing.T) {
- bm := &base.BaseMessage{
- Height: proto.Int32(179),
- }
-
- // Use extension that is itself a message.
- um := &user.UserMessage{
- Name: proto.String("Dave"),
- Rank: proto.String("Major"),
- }
- err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um)
- if err != nil {
- t.Fatal("Failed setting extension:", err)
- }
- buf, err := proto.Marshal(bm)
- if err != nil {
- t.Fatal("Failed encoding message with extension:", err)
- }
- bm_new := new(base.BaseMessage)
- if err := proto.Unmarshal(buf, bm_new); err != nil {
- t.Fatal("Failed decoding message with extension:", err)
- }
- if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) {
- t.Fatal("Decoded message didn't contain extension.")
- }
- um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage)
- if err != nil {
- t.Fatal("Failed getting extension:", err)
- }
- if n := um_out.(*user.UserMessage).Name; *n != *um.Name {
- t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name)
- }
- if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank {
- t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank)
- }
- proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage)
- if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) {
- t.Fatal("Failed clearing extension.")
- }
-}
-
-func TestTopLevelExtension(t *testing.T) {
- bm := &base.BaseMessage{
- Height: proto.Int32(179),
- }
-
- width := proto.Int32(17)
- err := proto.SetExtension(bm, user.E_Width, width)
- if err != nil {
- t.Fatal("Failed setting extension:", err)
- }
- buf, err := proto.Marshal(bm)
- if err != nil {
- t.Fatal("Failed encoding message with extension:", err)
- }
- bm_new := new(base.BaseMessage)
- if err := proto.Unmarshal(buf, bm_new); err != nil {
- t.Fatal("Failed decoding message with extension:", err)
- }
- if !proto.HasExtension(bm_new, user.E_Width) {
- t.Fatal("Decoded message didn't contain extension.")
- }
- width_out, err := proto.GetExtension(bm_new, user.E_Width)
- if err != nil {
- t.Fatal("Failed getting extension:", err)
- }
- if w := width_out.(*int32); *w != *width {
- t.Errorf("width_out = %v, expected %v", *w, *width)
- }
- proto.ClearExtension(bm_new, user.E_Width)
- if proto.HasExtension(bm_new, user.E_Width) {
- t.Fatal("Failed clearing extension.")
- }
-}
-
-func TestMessageSetWireFormat(t *testing.T) {
- osm := new(base.OldStyleMessage)
- osp := &user.OldStyleParcel{
- Name: proto.String("Dave"),
- Height: proto.Int32(178),
- }
-
- err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp)
- if err != nil {
- t.Fatal("Failed setting extension:", err)
- }
-
- buf, err := proto.Marshal(osm)
- if err != nil {
- t.Fatal("Failed encoding message:", err)
- }
-
- // Data generated from Python implementation.
- expected := []byte{
- 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12,
- }
-
- if !bytes.Equal(expected, buf) {
- t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf)
- }
-
- // Check that it is restored correctly.
- osm = new(base.OldStyleMessage)
- if err := proto.Unmarshal(buf, osm); err != nil {
- t.Fatal("Failed decoding message:", err)
- }
- osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension)
- if err != nil {
- t.Fatal("Failed getting extension:", err)
- }
- osp = osp_out.(*user.OldStyleParcel)
- if *osp.Name != "Dave" || *osp.Height != 178 {
- t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp)
- }
-}
-
-func main() {
- // simpler than rigging up gotest
- testing.Main(regexp.MatchString, []testing.InternalTest{
- {"TestSingleFieldExtension", TestSingleFieldExtension},
- {"TestMessageExtension", TestMessageExtension},
- {"TestTopLevelExtension", TestTopLevelExtension},
- },
- []testing.InternalBenchmark{},
- []testing.InternalExample{})
-}
-
-*/
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto
deleted file mode 100644
index ff65873dd..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto
+++ /dev/null
@@ -1,100 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-import "extension_base.proto";
-import "extension_extra.proto";
-
-package extension_user;
-
-message UserMessage {
- optional string name = 1;
- optional string rank = 2;
-}
-
-// Extend with a message
-extend extension_base.BaseMessage {
- optional UserMessage user_message = 5;
-}
-
-// Extend with a foreign message
-extend extension_base.BaseMessage {
- optional extension_extra.ExtraMessage extra_message = 9;
-}
-
-// Extend with some primitive types
-extend extension_base.BaseMessage {
- optional int32 width = 6;
- optional int64 area = 7;
-}
-
-// Extend inside the scope of another type
-message LoudMessage {
- extend extension_base.BaseMessage {
- optional uint32 volume = 8;
- }
- extensions 100 to max;
-}
-
-// Extend inside the scope of another type, using a message.
-message LoginMessage {
- extend extension_base.BaseMessage {
- optional UserMessage user_message = 16;
- }
-}
-
-// Extend with a repeated field
-extend extension_base.BaseMessage {
- repeated Detail detail = 17;
-}
-
-message Detail {
- optional string color = 1;
-}
-
-// An extension of an extension
-message Announcement {
- optional string words = 1;
- extend LoudMessage {
- optional Announcement loud_ext = 100;
- }
-}
-
-// Something that can be put in a message set.
-message OldStyleParcel {
- extend extension_base.OldStyleMessage {
- optional OldStyleParcel message_set_extension = 2001;
- }
-
- required string name = 1;
- optional int32 height = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto
deleted file mode 100644
index b8bc41acd..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto
+++ /dev/null
@@ -1,59 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package grpc.testing;
-
-message SimpleRequest {
-}
-
-message SimpleResponse {
-}
-
-message StreamMsg {
-}
-
-message StreamMsg2 {
-}
-
-service Test {
- rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
-
- // This RPC streams from the server only.
- rpc Downstream(SimpleRequest) returns (stream StreamMsg);
-
- // This RPC streams from the client.
- rpc Upstream(stream StreamMsg) returns (SimpleResponse);
-
- // This one streams in both directions.
- rpc Bidi(stream StreamMsg) returns (stream StreamMsg2);
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden
deleted file mode 100644
index 784a4f865..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden
+++ /dev/null
@@ -1,113 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: imp.proto
-// DO NOT EDIT!
-
-package imp
-
-import proto "github.com/golang/protobuf/proto"
-import "math"
-import "os"
-import imp1 "imp2.pb"
-
-// Reference proto & math imports to suppress error if they are not otherwise used.
-var _ = proto.GetString
-var _ = math.Inf
-
-// Types from public import imp2.proto
-type PubliclyImportedMessage imp1.PubliclyImportedMessage
-
-func (this *PubliclyImportedMessage) Reset() { (*imp1.PubliclyImportedMessage)(this).Reset() }
-func (this *PubliclyImportedMessage) String() string {
- return (*imp1.PubliclyImportedMessage)(this).String()
-}
-
-// PubliclyImportedMessage from public import imp.proto
-
-type ImportedMessage_Owner int32
-
-const (
- ImportedMessage_DAVE ImportedMessage_Owner = 1
- ImportedMessage_MIKE ImportedMessage_Owner = 2
-)
-
-var ImportedMessage_Owner_name = map[int32]string{
- 1: "DAVE",
- 2: "MIKE",
-}
-var ImportedMessage_Owner_value = map[string]int32{
- "DAVE": 1,
- "MIKE": 2,
-}
-
-// NewImportedMessage_Owner is deprecated. Use x.Enum() instead.
-func NewImportedMessage_Owner(x ImportedMessage_Owner) *ImportedMessage_Owner {
- e := ImportedMessage_Owner(x)
- return &e
-}
-func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner {
- p := new(ImportedMessage_Owner)
- *p = x
- return p
-}
-func (x ImportedMessage_Owner) String() string {
- return proto.EnumName(ImportedMessage_Owner_name, int32(x))
-}
-
-type ImportedMessage struct {
- Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"`
- XXX_extensions map[int32][]byte `json:",omitempty"`
- XXX_unrecognized []byte `json:",omitempty"`
-}
-
-func (this *ImportedMessage) Reset() { *this = ImportedMessage{} }
-func (this *ImportedMessage) String() string { return proto.CompactTextString(this) }
-
-var extRange_ImportedMessage = []proto.ExtensionRange{
- proto.ExtensionRange{90, 100},
-}
-
-func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ImportedMessage
-}
-func (this *ImportedMessage) ExtensionMap() map[int32][]byte {
- if this.XXX_extensions == nil {
- this.XXX_extensions = make(map[int32][]byte)
- }
- return this.XXX_extensions
-}
-
-type ImportedExtendable struct {
- XXX_extensions map[int32][]byte `json:",omitempty"`
- XXX_unrecognized []byte `json:",omitempty"`
-}
-
-func (this *ImportedExtendable) Reset() { *this = ImportedExtendable{} }
-func (this *ImportedExtendable) String() string { return proto.CompactTextString(this) }
-
-func (this *ImportedExtendable) Marshal() ([]byte, error) {
- return proto.MarshalMessageSet(this.ExtensionMap())
-}
-func (this *ImportedExtendable) Unmarshal(buf []byte) error {
- return proto.UnmarshalMessageSet(buf, this.ExtensionMap())
-}
-// ensure ImportedExtendable satisfies proto.Marshaler and proto.Unmarshaler
-var _ proto.Marshaler = (*ImportedExtendable)(nil)
-var _ proto.Unmarshaler = (*ImportedExtendable)(nil)
-
-var extRange_ImportedExtendable = []proto.ExtensionRange{
- proto.ExtensionRange{100, 536870911},
-}
-
-func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ImportedExtendable
-}
-func (this *ImportedExtendable) ExtensionMap() map[int32][]byte {
- if this.XXX_extensions == nil {
- this.XXX_extensions = make(map[int32][]byte)
- }
- return this.XXX_extensions
-}
-
-func init() {
- proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value)
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto
deleted file mode 100644
index 156e078d1..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto
+++ /dev/null
@@ -1,70 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package imp;
-
-import "imp2.proto";
-import "imp3.proto";
-
-message ImportedMessage {
- required int64 field = 1;
-
- // The forwarded getters for these fields are fiddly to get right.
- optional ImportedMessage2 local_msg = 2;
- optional ForeignImportedMessage foreign_msg = 3; // in imp3.proto
- optional Owner enum_field = 4;
- oneof union {
- int32 state = 9;
- }
-
- repeated string name = 5;
- repeated Owner boss = 6;
- repeated ImportedMessage2 memo = 7;
-
- map<string, ImportedMessage2> msg_map = 8;
-
- enum Owner {
- DAVE = 1;
- MIKE = 2;
- }
-
- extensions 90 to 100;
-}
-
-message ImportedMessage2 {
-}
-
-message ImportedExtendable {
- option message_set_wire_format = true;
- extensions 100 to max;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto
deleted file mode 100644
index 3bb0632b2..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2011 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package imp;
-
-message PubliclyImportedMessage {
- optional int64 field = 1;
-}
-
-enum PubliclyImportedEnum {
- GLASSES = 1;
- HAIR = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto
deleted file mode 100644
index 58fc7598b..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2012 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package imp;
-
-message ForeignImportedMessage {
- optional string tuber = 1;
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go
deleted file mode 100644
index f9b5ccf20..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// A simple binary to link together the protocol buffers in this test.
-
-package testdata
-
-import (
- "testing"
-
- mytestpb "./my_test"
- multipb "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
-)
-
-func TestLink(t *testing.T) {
- _ = &multipb.Multi1{}
- _ = &mytestpb.Request{}
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto
deleted file mode 100644
index 0da6e0af4..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto
+++ /dev/null
@@ -1,44 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-import "multi/multi2.proto";
-import "multi/multi3.proto";
-
-package multitest;
-
-message Multi1 {
- required Multi2 multi2 = 1;
- optional Multi2.Color color = 2;
- optional Multi3.HatType hat_type = 3;
-}
-
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto
deleted file mode 100644
index e6bfc71b3..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto
+++ /dev/null
@@ -1,46 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package multitest;
-
-message Multi2 {
- required int32 required_value = 1;
-
- enum Color {
- BLUE = 1;
- GREEN = 2;
- RED = 3;
- };
- optional Color color = 2;
-}
-
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto
deleted file mode 100644
index 146c255bd..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-package multitest;
-
-message Multi3 {
- enum HatType {
- FEDORA = 1;
- FEZ = 2;
- };
- optional HatType hat_type = 1;
-}
-
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go
deleted file mode 100644
index 1954e3fb7..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go
+++ /dev/null
@@ -1,870 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: my_test/test.proto
-
-/*
-Package my_test is a generated protocol buffer package.
-
-This package holds interesting messages.
-
-It is generated from these files:
- my_test/test.proto
-
-It has these top-level messages:
- Request
- Reply
- OtherBase
- ReplyExtensions
- OtherReplyExtensions
- OldReply
- Communique
-*/
-package my_test
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type HatType int32
-
-const (
- // deliberately skipping 0
- HatType_FEDORA HatType = 1
- HatType_FEZ HatType = 2
-)
-
-var HatType_name = map[int32]string{
- 1: "FEDORA",
- 2: "FEZ",
-}
-var HatType_value = map[string]int32{
- "FEDORA": 1,
- "FEZ": 2,
-}
-
-func (x HatType) Enum() *HatType {
- p := new(HatType)
- *p = x
- return p
-}
-func (x HatType) String() string {
- return proto.EnumName(HatType_name, int32(x))
-}
-func (x *HatType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType")
- if err != nil {
- return err
- }
- *x = HatType(value)
- return nil
-}
-
-// This enum represents days of the week.
-type Days int32
-
-const (
- Days_MONDAY Days = 1
- Days_TUESDAY Days = 2
- Days_LUNDI Days = 1
-)
-
-var Days_name = map[int32]string{
- 1: "MONDAY",
- 2: "TUESDAY",
- // Duplicate value: 1: "LUNDI",
-}
-var Days_value = map[string]int32{
- "MONDAY": 1,
- "TUESDAY": 2,
- "LUNDI": 1,
-}
-
-func (x Days) Enum() *Days {
- p := new(Days)
- *p = x
- return p
-}
-func (x Days) String() string {
- return proto.EnumName(Days_name, int32(x))
-}
-func (x *Days) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days")
- if err != nil {
- return err
- }
- *x = Days(value)
- return nil
-}
-
-type Request_Color int32
-
-const (
- Request_RED Request_Color = 0
- Request_GREEN Request_Color = 1
- Request_BLUE Request_Color = 2
-)
-
-var Request_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var Request_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x Request_Color) Enum() *Request_Color {
- p := new(Request_Color)
- *p = x
- return p
-}
-func (x Request_Color) String() string {
- return proto.EnumName(Request_Color_name, int32(x))
-}
-func (x *Request_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color")
- if err != nil {
- return err
- }
- *x = Request_Color(value)
- return nil
-}
-
-type Reply_Entry_Game int32
-
-const (
- Reply_Entry_FOOTBALL Reply_Entry_Game = 1
- Reply_Entry_TENNIS Reply_Entry_Game = 2
-)
-
-var Reply_Entry_Game_name = map[int32]string{
- 1: "FOOTBALL",
- 2: "TENNIS",
-}
-var Reply_Entry_Game_value = map[string]int32{
- "FOOTBALL": 1,
- "TENNIS": 2,
-}
-
-func (x Reply_Entry_Game) Enum() *Reply_Entry_Game {
- p := new(Reply_Entry_Game)
- *p = x
- return p
-}
-func (x Reply_Entry_Game) String() string {
- return proto.EnumName(Reply_Entry_Game_name, int32(x))
-}
-func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game")
- if err != nil {
- return err
- }
- *x = Reply_Entry_Game(value)
- return nil
-}
-
-// This is a message that might be sent somewhere.
-type Request struct {
- Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"`
- // optional imp.ImportedMessage imported_message = 2;
- Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"`
- Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"`
- // optional imp.ImportedMessage.Owner owner = 6;
- Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"`
- Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"`
- // This is a map field. It will generate map[int32]string.
- NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- // This is a map field whose value type is a message.
- MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"`
- // This field should not conflict with any getters.
- GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Request) Reset() { *m = Request{} }
-func (m *Request) String() string { return proto.CompactTextString(m) }
-func (*Request) ProtoMessage() {}
-
-const Default_Request_Hat HatType = HatType_FEDORA
-
-var Default_Request_Deadline float32 = float32(math.Inf(1))
-
-func (m *Request) GetKey() []int64 {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *Request) GetHue() Request_Color {
- if m != nil && m.Hue != nil {
- return *m.Hue
- }
- return Request_RED
-}
-
-func (m *Request) GetHat() HatType {
- if m != nil && m.Hat != nil {
- return *m.Hat
- }
- return Default_Request_Hat
-}
-
-func (m *Request) GetDeadline() float32 {
- if m != nil && m.Deadline != nil {
- return *m.Deadline
- }
- return Default_Request_Deadline
-}
-
-func (m *Request) GetSomegroup() *Request_SomeGroup {
- if m != nil {
- return m.Somegroup
- }
- return nil
-}
-
-func (m *Request) GetNameMapping() map[int32]string {
- if m != nil {
- return m.NameMapping
- }
- return nil
-}
-
-func (m *Request) GetMsgMapping() map[int64]*Reply {
- if m != nil {
- return m.MsgMapping
- }
- return nil
-}
-
-func (m *Request) GetReset_() int32 {
- if m != nil && m.Reset_ != nil {
- return *m.Reset_
- }
- return 0
-}
-
-func (m *Request) GetGetKey_() string {
- if m != nil && m.GetKey_ != nil {
- return *m.GetKey_
- }
- return ""
-}
-
-type Request_SomeGroup struct {
- GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} }
-func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*Request_SomeGroup) ProtoMessage() {}
-
-func (m *Request_SomeGroup) GetGroupField() int32 {
- if m != nil && m.GroupField != nil {
- return *m.GroupField
- }
- return 0
-}
-
-type Reply struct {
- Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"`
- CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Reply) Reset() { *m = Reply{} }
-func (m *Reply) String() string { return proto.CompactTextString(m) }
-func (*Reply) ProtoMessage() {}
-
-var extRange_Reply = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*Reply) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_Reply
-}
-
-func (m *Reply) GetFound() []*Reply_Entry {
- if m != nil {
- return m.Found
- }
- return nil
-}
-
-func (m *Reply) GetCompactKeys() []int32 {
- if m != nil {
- return m.CompactKeys
- }
- return nil
-}
-
-type Reply_Entry struct {
- KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"`
- Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"`
- XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Reply_Entry) Reset() { *m = Reply_Entry{} }
-func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
-func (*Reply_Entry) ProtoMessage() {}
-
-const Default_Reply_Entry_Value int64 = 7
-
-func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 {
- if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil {
- return *m.KeyThatNeeds_1234Camel_CasIng
- }
- return 0
-}
-
-func (m *Reply_Entry) GetValue() int64 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return Default_Reply_Entry_Value
-}
-
-func (m *Reply_Entry) GetXMyFieldName_2() int64 {
- if m != nil && m.XMyFieldName_2 != nil {
- return *m.XMyFieldName_2
- }
- return 0
-}
-
-type OtherBase struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherBase) Reset() { *m = OtherBase{} }
-func (m *OtherBase) String() string { return proto.CompactTextString(m) }
-func (*OtherBase) ProtoMessage() {}
-
-var extRange_OtherBase = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OtherBase
-}
-
-func (m *OtherBase) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-type ReplyExtensions struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} }
-func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) }
-func (*ReplyExtensions) ProtoMessage() {}
-
-var E_ReplyExtensions_Time = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*float64)(nil),
- Field: 101,
- Name: "my.test.ReplyExtensions.time",
- Tag: "fixed64,101,opt,name=time",
- Filename: "my_test/test.proto",
-}
-
-var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*ReplyExtensions)(nil),
- Field: 105,
- Name: "my.test.ReplyExtensions.carrot",
- Tag: "bytes,105,opt,name=carrot",
- Filename: "my_test/test.proto",
-}
-
-var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
- ExtendedType: (*OtherBase)(nil),
- ExtensionType: (*ReplyExtensions)(nil),
- Field: 101,
- Name: "my.test.ReplyExtensions.donut",
- Tag: "bytes,101,opt,name=donut",
- Filename: "my_test/test.proto",
-}
-
-type OtherReplyExtensions struct {
- Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} }
-func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
-func (*OtherReplyExtensions) ProtoMessage() {}
-
-func (m *OtherReplyExtensions) GetKey() int32 {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return 0
-}
-
-type OldReply struct {
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldReply) Reset() { *m = OldReply{} }
-func (m *OldReply) String() string { return proto.CompactTextString(m) }
-func (*OldReply) ProtoMessage() {}
-
-func (m *OldReply) Marshal() ([]byte, error) {
- return proto.MarshalMessageSet(&m.XXX_InternalExtensions)
-}
-func (m *OldReply) Unmarshal(buf []byte) error {
- return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)
-}
-func (m *OldReply) MarshalJSON() ([]byte, error) {
- return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *OldReply) UnmarshalJSON(buf []byte) error {
- return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
-}
-
-// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler
-var _ proto.Marshaler = (*OldReply)(nil)
-var _ proto.Unmarshaler = (*OldReply)(nil)
-
-var extRange_OldReply = []proto.ExtensionRange{
- {100, 2147483646},
-}
-
-func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OldReply
-}
-
-type Communique struct {
- MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"`
- // This is a oneof, called "union".
- //
- // Types that are valid to be assigned to Union:
- // *Communique_Number
- // *Communique_Name
- // *Communique_Data
- // *Communique_TempC
- // *Communique_Height
- // *Communique_Today
- // *Communique_Maybe
- // *Communique_Delta_
- // *Communique_Msg
- // *Communique_Somegroup
- Union isCommunique_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique) Reset() { *m = Communique{} }
-func (m *Communique) String() string { return proto.CompactTextString(m) }
-func (*Communique) ProtoMessage() {}
-
-type isCommunique_Union interface {
- isCommunique_Union()
-}
-
-type Communique_Number struct {
- Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
-}
-type Communique_Name struct {
- Name string `protobuf:"bytes,6,opt,name=name,oneof"`
-}
-type Communique_Data struct {
- Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
-}
-type Communique_TempC struct {
- TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
-}
-type Communique_Height struct {
- Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"`
-}
-type Communique_Today struct {
- Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"`
-}
-type Communique_Maybe struct {
- Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"`
-}
-type Communique_Delta_ struct {
- Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"`
-}
-type Communique_Msg struct {
- Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"`
-}
-type Communique_Somegroup struct {
- Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"`
-}
-
-func (*Communique_Number) isCommunique_Union() {}
-func (*Communique_Name) isCommunique_Union() {}
-func (*Communique_Data) isCommunique_Union() {}
-func (*Communique_TempC) isCommunique_Union() {}
-func (*Communique_Height) isCommunique_Union() {}
-func (*Communique_Today) isCommunique_Union() {}
-func (*Communique_Maybe) isCommunique_Union() {}
-func (*Communique_Delta_) isCommunique_Union() {}
-func (*Communique_Msg) isCommunique_Union() {}
-func (*Communique_Somegroup) isCommunique_Union() {}
-
-func (m *Communique) GetUnion() isCommunique_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-
-func (m *Communique) GetMakeMeCry() bool {
- if m != nil && m.MakeMeCry != nil {
- return *m.MakeMeCry
- }
- return false
-}
-
-func (m *Communique) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Communique_Number); ok {
- return x.Number
- }
- return 0
-}
-
-func (m *Communique) GetName() string {
- if x, ok := m.GetUnion().(*Communique_Name); ok {
- return x.Name
- }
- return ""
-}
-
-func (m *Communique) GetData() []byte {
- if x, ok := m.GetUnion().(*Communique_Data); ok {
- return x.Data
- }
- return nil
-}
-
-func (m *Communique) GetTempC() float64 {
- if x, ok := m.GetUnion().(*Communique_TempC); ok {
- return x.TempC
- }
- return 0
-}
-
-func (m *Communique) GetHeight() float32 {
- if x, ok := m.GetUnion().(*Communique_Height); ok {
- return x.Height
- }
- return 0
-}
-
-func (m *Communique) GetToday() Days {
- if x, ok := m.GetUnion().(*Communique_Today); ok {
- return x.Today
- }
- return Days_MONDAY
-}
-
-func (m *Communique) GetMaybe() bool {
- if x, ok := m.GetUnion().(*Communique_Maybe); ok {
- return x.Maybe
- }
- return false
-}
-
-func (m *Communique) GetDelta() int32 {
- if x, ok := m.GetUnion().(*Communique_Delta_); ok {
- return x.Delta
- }
- return 0
-}
-
-func (m *Communique) GetMsg() *Reply {
- if x, ok := m.GetUnion().(*Communique_Msg); ok {
- return x.Msg
- }
- return nil
-}
-
-func (m *Communique) GetSomegroup() *Communique_SomeGroup {
- if x, ok := m.GetUnion().(*Communique_Somegroup); ok {
- return x.Somegroup
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
- (*Communique_Number)(nil),
- (*Communique_Name)(nil),
- (*Communique_Data)(nil),
- (*Communique_TempC)(nil),
- (*Communique_Height)(nil),
- (*Communique_Today)(nil),
- (*Communique_Maybe)(nil),
- (*Communique_Delta_)(nil),
- (*Communique_Msg)(nil),
- (*Communique_Somegroup)(nil),
- }
-}
-
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- b.EncodeVarint(5<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Number))
- case *Communique_Name:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Name)
- case *Communique_Data:
- b.EncodeVarint(7<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.Data)
- case *Communique_TempC:
- b.EncodeVarint(8<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.TempC))
- case *Communique_Height:
- b.EncodeVarint(9<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.Height)))
- case *Communique_Today:
- b.EncodeVarint(10<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Today))
- case *Communique_Maybe:
- t := uint64(0)
- if x.Maybe {
- t = 1
- }
- b.EncodeVarint(11<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Communique_Delta_:
- b.EncodeVarint(12<<3 | proto.WireVarint)
- b.EncodeZigzag32(uint64(x.Delta))
- case *Communique_Msg:
- b.EncodeVarint(13<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Msg); err != nil {
- return err
- }
- case *Communique_Somegroup:
- b.EncodeVarint(14<<3 | proto.WireStartGroup)
- if err := b.Marshal(x.Somegroup); err != nil {
- return err
- }
- b.EncodeVarint(14<<3 | proto.WireEndGroup)
- case nil:
- default:
- return fmt.Errorf("Communique.Union has unexpected type %T", x)
- }
- return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Communique)
- switch tag {
- case 5: // union.number
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Number{int32(x)}
- return true, err
- case 6: // union.name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Communique_Name{x}
- return true, err
- case 7: // union.data
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Communique_Data{x}
- return true, err
- case 8: // union.temp_c
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Communique_TempC{math.Float64frombits(x)}
- return true, err
- case 9: // union.height
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Communique_Height{math.Float32frombits(uint32(x))}
- return true, err
- case 10: // union.today
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Today{Days(x)}
- return true, err
- case 11: // union.maybe
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Maybe{x != 0}
- return true, err
- case 12: // union.delta
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag32()
- m.Union = &Communique_Delta_{int32(x)}
- return true, err
- case 13: // union.msg
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Reply)
- err := b.DecodeMessage(msg)
- m.Union = &Communique_Msg{msg}
- return true, err
- case 14: // union.somegroup
- if wire != proto.WireStartGroup {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Communique_SomeGroup)
- err := b.DecodeGroup(msg)
- m.Union = &Communique_Somegroup{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- n += proto.SizeVarint(5<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Number))
- case *Communique_Name:
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Name)))
- n += len(x.Name)
- case *Communique_Data:
- n += proto.SizeVarint(7<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Data)))
- n += len(x.Data)
- case *Communique_TempC:
- n += proto.SizeVarint(8<<3 | proto.WireFixed64)
- n += 8
- case *Communique_Height:
- n += proto.SizeVarint(9<<3 | proto.WireFixed32)
- n += 4
- case *Communique_Today:
- n += proto.SizeVarint(10<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Today))
- case *Communique_Maybe:
- n += proto.SizeVarint(11<<3 | proto.WireVarint)
- n += 1
- case *Communique_Delta_:
- n += proto.SizeVarint(12<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31))))
- case *Communique_Msg:
- s := proto.Size(x.Msg)
- n += proto.SizeVarint(13<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Communique_Somegroup:
- n += proto.SizeVarint(14<<3 | proto.WireStartGroup)
- n += proto.Size(x.Somegroup)
- n += proto.SizeVarint(14<<3 | proto.WireEndGroup)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Communique_SomeGroup struct {
- Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} }
-func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*Communique_SomeGroup) ProtoMessage() {}
-
-func (m *Communique_SomeGroup) GetMember() string {
- if m != nil && m.Member != nil {
- return *m.Member
- }
- return ""
-}
-
-type Communique_Delta struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique_Delta) Reset() { *m = Communique_Delta{} }
-func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
-func (*Communique_Delta) ProtoMessage() {}
-
-var E_Tag = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*string)(nil),
- Field: 103,
- Name: "my.test.tag",
- Tag: "bytes,103,opt,name=tag",
- Filename: "my_test/test.proto",
-}
-
-var E_Donut = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*OtherReplyExtensions)(nil),
- Field: 106,
- Name: "my.test.donut",
- Tag: "bytes,106,opt,name=donut",
- Filename: "my_test/test.proto",
-}
-
-func init() {
- proto.RegisterType((*Request)(nil), "my.test.Request")
- proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup")
- proto.RegisterType((*Reply)(nil), "my.test.Reply")
- proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry")
- proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase")
- proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions")
- proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions")
- proto.RegisterType((*OldReply)(nil), "my.test.OldReply")
- proto.RegisterType((*Communique)(nil), "my.test.Communique")
- proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup")
- proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta")
- proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
- proto.RegisterEnum("my.test.Days", Days_name, Days_value)
- proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
- proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
- proto.RegisterExtension(E_ReplyExtensions_Time)
- proto.RegisterExtension(E_ReplyExtensions_Carrot)
- proto.RegisterExtension(E_ReplyExtensions_Donut)
- proto.RegisterExtension(E_Tag)
- proto.RegisterExtension(E_Donut)
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden
deleted file mode 100644
index 1954e3fb7..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden
+++ /dev/null
@@ -1,870 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: my_test/test.proto
-
-/*
-Package my_test is a generated protocol buffer package.
-
-This package holds interesting messages.
-
-It is generated from these files:
- my_test/test.proto
-
-It has these top-level messages:
- Request
- Reply
- OtherBase
- ReplyExtensions
- OtherReplyExtensions
- OldReply
- Communique
-*/
-package my_test
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type HatType int32
-
-const (
- // deliberately skipping 0
- HatType_FEDORA HatType = 1
- HatType_FEZ HatType = 2
-)
-
-var HatType_name = map[int32]string{
- 1: "FEDORA",
- 2: "FEZ",
-}
-var HatType_value = map[string]int32{
- "FEDORA": 1,
- "FEZ": 2,
-}
-
-func (x HatType) Enum() *HatType {
- p := new(HatType)
- *p = x
- return p
-}
-func (x HatType) String() string {
- return proto.EnumName(HatType_name, int32(x))
-}
-func (x *HatType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType")
- if err != nil {
- return err
- }
- *x = HatType(value)
- return nil
-}
-
-// This enum represents days of the week.
-type Days int32
-
-const (
- Days_MONDAY Days = 1
- Days_TUESDAY Days = 2
- Days_LUNDI Days = 1
-)
-
-var Days_name = map[int32]string{
- 1: "MONDAY",
- 2: "TUESDAY",
- // Duplicate value: 1: "LUNDI",
-}
-var Days_value = map[string]int32{
- "MONDAY": 1,
- "TUESDAY": 2,
- "LUNDI": 1,
-}
-
-func (x Days) Enum() *Days {
- p := new(Days)
- *p = x
- return p
-}
-func (x Days) String() string {
- return proto.EnumName(Days_name, int32(x))
-}
-func (x *Days) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days")
- if err != nil {
- return err
- }
- *x = Days(value)
- return nil
-}
-
-type Request_Color int32
-
-const (
- Request_RED Request_Color = 0
- Request_GREEN Request_Color = 1
- Request_BLUE Request_Color = 2
-)
-
-var Request_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var Request_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x Request_Color) Enum() *Request_Color {
- p := new(Request_Color)
- *p = x
- return p
-}
-func (x Request_Color) String() string {
- return proto.EnumName(Request_Color_name, int32(x))
-}
-func (x *Request_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color")
- if err != nil {
- return err
- }
- *x = Request_Color(value)
- return nil
-}
-
-type Reply_Entry_Game int32
-
-const (
- Reply_Entry_FOOTBALL Reply_Entry_Game = 1
- Reply_Entry_TENNIS Reply_Entry_Game = 2
-)
-
-var Reply_Entry_Game_name = map[int32]string{
- 1: "FOOTBALL",
- 2: "TENNIS",
-}
-var Reply_Entry_Game_value = map[string]int32{
- "FOOTBALL": 1,
- "TENNIS": 2,
-}
-
-func (x Reply_Entry_Game) Enum() *Reply_Entry_Game {
- p := new(Reply_Entry_Game)
- *p = x
- return p
-}
-func (x Reply_Entry_Game) String() string {
- return proto.EnumName(Reply_Entry_Game_name, int32(x))
-}
-func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game")
- if err != nil {
- return err
- }
- *x = Reply_Entry_Game(value)
- return nil
-}
-
-// This is a message that might be sent somewhere.
-type Request struct {
- Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"`
- // optional imp.ImportedMessage imported_message = 2;
- Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"`
- Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"`
- // optional imp.ImportedMessage.Owner owner = 6;
- Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"`
- Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"`
- // This is a map field. It will generate map[int32]string.
- NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- // This is a map field whose value type is a message.
- MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"`
- // This field should not conflict with any getters.
- GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Request) Reset() { *m = Request{} }
-func (m *Request) String() string { return proto.CompactTextString(m) }
-func (*Request) ProtoMessage() {}
-
-const Default_Request_Hat HatType = HatType_FEDORA
-
-var Default_Request_Deadline float32 = float32(math.Inf(1))
-
-func (m *Request) GetKey() []int64 {
- if m != nil {
- return m.Key
- }
- return nil
-}
-
-func (m *Request) GetHue() Request_Color {
- if m != nil && m.Hue != nil {
- return *m.Hue
- }
- return Request_RED
-}
-
-func (m *Request) GetHat() HatType {
- if m != nil && m.Hat != nil {
- return *m.Hat
- }
- return Default_Request_Hat
-}
-
-func (m *Request) GetDeadline() float32 {
- if m != nil && m.Deadline != nil {
- return *m.Deadline
- }
- return Default_Request_Deadline
-}
-
-func (m *Request) GetSomegroup() *Request_SomeGroup {
- if m != nil {
- return m.Somegroup
- }
- return nil
-}
-
-func (m *Request) GetNameMapping() map[int32]string {
- if m != nil {
- return m.NameMapping
- }
- return nil
-}
-
-func (m *Request) GetMsgMapping() map[int64]*Reply {
- if m != nil {
- return m.MsgMapping
- }
- return nil
-}
-
-func (m *Request) GetReset_() int32 {
- if m != nil && m.Reset_ != nil {
- return *m.Reset_
- }
- return 0
-}
-
-func (m *Request) GetGetKey_() string {
- if m != nil && m.GetKey_ != nil {
- return *m.GetKey_
- }
- return ""
-}
-
-type Request_SomeGroup struct {
- GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} }
-func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*Request_SomeGroup) ProtoMessage() {}
-
-func (m *Request_SomeGroup) GetGroupField() int32 {
- if m != nil && m.GroupField != nil {
- return *m.GroupField
- }
- return 0
-}
-
-type Reply struct {
- Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"`
- CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Reply) Reset() { *m = Reply{} }
-func (m *Reply) String() string { return proto.CompactTextString(m) }
-func (*Reply) ProtoMessage() {}
-
-var extRange_Reply = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*Reply) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_Reply
-}
-
-func (m *Reply) GetFound() []*Reply_Entry {
- if m != nil {
- return m.Found
- }
- return nil
-}
-
-func (m *Reply) GetCompactKeys() []int32 {
- if m != nil {
- return m.CompactKeys
- }
- return nil
-}
-
-type Reply_Entry struct {
- KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"`
- Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"`
- XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Reply_Entry) Reset() { *m = Reply_Entry{} }
-func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
-func (*Reply_Entry) ProtoMessage() {}
-
-const Default_Reply_Entry_Value int64 = 7
-
-func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 {
- if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil {
- return *m.KeyThatNeeds_1234Camel_CasIng
- }
- return 0
-}
-
-func (m *Reply_Entry) GetValue() int64 {
- if m != nil && m.Value != nil {
- return *m.Value
- }
- return Default_Reply_Entry_Value
-}
-
-func (m *Reply_Entry) GetXMyFieldName_2() int64 {
- if m != nil && m.XMyFieldName_2 != nil {
- return *m.XMyFieldName_2
- }
- return 0
-}
-
-type OtherBase struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherBase) Reset() { *m = OtherBase{} }
-func (m *OtherBase) String() string { return proto.CompactTextString(m) }
-func (*OtherBase) ProtoMessage() {}
-
-var extRange_OtherBase = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OtherBase
-}
-
-func (m *OtherBase) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-type ReplyExtensions struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} }
-func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) }
-func (*ReplyExtensions) ProtoMessage() {}
-
-var E_ReplyExtensions_Time = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*float64)(nil),
- Field: 101,
- Name: "my.test.ReplyExtensions.time",
- Tag: "fixed64,101,opt,name=time",
- Filename: "my_test/test.proto",
-}
-
-var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*ReplyExtensions)(nil),
- Field: 105,
- Name: "my.test.ReplyExtensions.carrot",
- Tag: "bytes,105,opt,name=carrot",
- Filename: "my_test/test.proto",
-}
-
-var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
- ExtendedType: (*OtherBase)(nil),
- ExtensionType: (*ReplyExtensions)(nil),
- Field: 101,
- Name: "my.test.ReplyExtensions.donut",
- Tag: "bytes,101,opt,name=donut",
- Filename: "my_test/test.proto",
-}
-
-type OtherReplyExtensions struct {
- Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} }
-func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
-func (*OtherReplyExtensions) ProtoMessage() {}
-
-func (m *OtherReplyExtensions) GetKey() int32 {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return 0
-}
-
-type OldReply struct {
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldReply) Reset() { *m = OldReply{} }
-func (m *OldReply) String() string { return proto.CompactTextString(m) }
-func (*OldReply) ProtoMessage() {}
-
-func (m *OldReply) Marshal() ([]byte, error) {
- return proto.MarshalMessageSet(&m.XXX_InternalExtensions)
-}
-func (m *OldReply) Unmarshal(buf []byte) error {
- return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)
-}
-func (m *OldReply) MarshalJSON() ([]byte, error) {
- return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *OldReply) UnmarshalJSON(buf []byte) error {
- return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
-}
-
-// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler
-var _ proto.Marshaler = (*OldReply)(nil)
-var _ proto.Unmarshaler = (*OldReply)(nil)
-
-var extRange_OldReply = []proto.ExtensionRange{
- {100, 2147483646},
-}
-
-func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OldReply
-}
-
-type Communique struct {
- MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"`
- // This is a oneof, called "union".
- //
- // Types that are valid to be assigned to Union:
- // *Communique_Number
- // *Communique_Name
- // *Communique_Data
- // *Communique_TempC
- // *Communique_Height
- // *Communique_Today
- // *Communique_Maybe
- // *Communique_Delta_
- // *Communique_Msg
- // *Communique_Somegroup
- Union isCommunique_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique) Reset() { *m = Communique{} }
-func (m *Communique) String() string { return proto.CompactTextString(m) }
-func (*Communique) ProtoMessage() {}
-
-type isCommunique_Union interface {
- isCommunique_Union()
-}
-
-type Communique_Number struct {
- Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
-}
-type Communique_Name struct {
- Name string `protobuf:"bytes,6,opt,name=name,oneof"`
-}
-type Communique_Data struct {
- Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
-}
-type Communique_TempC struct {
- TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
-}
-type Communique_Height struct {
- Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"`
-}
-type Communique_Today struct {
- Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"`
-}
-type Communique_Maybe struct {
- Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"`
-}
-type Communique_Delta_ struct {
- Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"`
-}
-type Communique_Msg struct {
- Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"`
-}
-type Communique_Somegroup struct {
- Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"`
-}
-
-func (*Communique_Number) isCommunique_Union() {}
-func (*Communique_Name) isCommunique_Union() {}
-func (*Communique_Data) isCommunique_Union() {}
-func (*Communique_TempC) isCommunique_Union() {}
-func (*Communique_Height) isCommunique_Union() {}
-func (*Communique_Today) isCommunique_Union() {}
-func (*Communique_Maybe) isCommunique_Union() {}
-func (*Communique_Delta_) isCommunique_Union() {}
-func (*Communique_Msg) isCommunique_Union() {}
-func (*Communique_Somegroup) isCommunique_Union() {}
-
-func (m *Communique) GetUnion() isCommunique_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-
-func (m *Communique) GetMakeMeCry() bool {
- if m != nil && m.MakeMeCry != nil {
- return *m.MakeMeCry
- }
- return false
-}
-
-func (m *Communique) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Communique_Number); ok {
- return x.Number
- }
- return 0
-}
-
-func (m *Communique) GetName() string {
- if x, ok := m.GetUnion().(*Communique_Name); ok {
- return x.Name
- }
- return ""
-}
-
-func (m *Communique) GetData() []byte {
- if x, ok := m.GetUnion().(*Communique_Data); ok {
- return x.Data
- }
- return nil
-}
-
-func (m *Communique) GetTempC() float64 {
- if x, ok := m.GetUnion().(*Communique_TempC); ok {
- return x.TempC
- }
- return 0
-}
-
-func (m *Communique) GetHeight() float32 {
- if x, ok := m.GetUnion().(*Communique_Height); ok {
- return x.Height
- }
- return 0
-}
-
-func (m *Communique) GetToday() Days {
- if x, ok := m.GetUnion().(*Communique_Today); ok {
- return x.Today
- }
- return Days_MONDAY
-}
-
-func (m *Communique) GetMaybe() bool {
- if x, ok := m.GetUnion().(*Communique_Maybe); ok {
- return x.Maybe
- }
- return false
-}
-
-func (m *Communique) GetDelta() int32 {
- if x, ok := m.GetUnion().(*Communique_Delta_); ok {
- return x.Delta
- }
- return 0
-}
-
-func (m *Communique) GetMsg() *Reply {
- if x, ok := m.GetUnion().(*Communique_Msg); ok {
- return x.Msg
- }
- return nil
-}
-
-func (m *Communique) GetSomegroup() *Communique_SomeGroup {
- if x, ok := m.GetUnion().(*Communique_Somegroup); ok {
- return x.Somegroup
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
- (*Communique_Number)(nil),
- (*Communique_Name)(nil),
- (*Communique_Data)(nil),
- (*Communique_TempC)(nil),
- (*Communique_Height)(nil),
- (*Communique_Today)(nil),
- (*Communique_Maybe)(nil),
- (*Communique_Delta_)(nil),
- (*Communique_Msg)(nil),
- (*Communique_Somegroup)(nil),
- }
-}
-
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- b.EncodeVarint(5<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Number))
- case *Communique_Name:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Name)
- case *Communique_Data:
- b.EncodeVarint(7<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.Data)
- case *Communique_TempC:
- b.EncodeVarint(8<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.TempC))
- case *Communique_Height:
- b.EncodeVarint(9<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.Height)))
- case *Communique_Today:
- b.EncodeVarint(10<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Today))
- case *Communique_Maybe:
- t := uint64(0)
- if x.Maybe {
- t = 1
- }
- b.EncodeVarint(11<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Communique_Delta_:
- b.EncodeVarint(12<<3 | proto.WireVarint)
- b.EncodeZigzag32(uint64(x.Delta))
- case *Communique_Msg:
- b.EncodeVarint(13<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Msg); err != nil {
- return err
- }
- case *Communique_Somegroup:
- b.EncodeVarint(14<<3 | proto.WireStartGroup)
- if err := b.Marshal(x.Somegroup); err != nil {
- return err
- }
- b.EncodeVarint(14<<3 | proto.WireEndGroup)
- case nil:
- default:
- return fmt.Errorf("Communique.Union has unexpected type %T", x)
- }
- return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Communique)
- switch tag {
- case 5: // union.number
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Number{int32(x)}
- return true, err
- case 6: // union.name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Communique_Name{x}
- return true, err
- case 7: // union.data
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Communique_Data{x}
- return true, err
- case 8: // union.temp_c
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Communique_TempC{math.Float64frombits(x)}
- return true, err
- case 9: // union.height
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Communique_Height{math.Float32frombits(uint32(x))}
- return true, err
- case 10: // union.today
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Today{Days(x)}
- return true, err
- case 11: // union.maybe
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Maybe{x != 0}
- return true, err
- case 12: // union.delta
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag32()
- m.Union = &Communique_Delta_{int32(x)}
- return true, err
- case 13: // union.msg
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Reply)
- err := b.DecodeMessage(msg)
- m.Union = &Communique_Msg{msg}
- return true, err
- case 14: // union.somegroup
- if wire != proto.WireStartGroup {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Communique_SomeGroup)
- err := b.DecodeGroup(msg)
- m.Union = &Communique_Somegroup{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- n += proto.SizeVarint(5<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Number))
- case *Communique_Name:
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Name)))
- n += len(x.Name)
- case *Communique_Data:
- n += proto.SizeVarint(7<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Data)))
- n += len(x.Data)
- case *Communique_TempC:
- n += proto.SizeVarint(8<<3 | proto.WireFixed64)
- n += 8
- case *Communique_Height:
- n += proto.SizeVarint(9<<3 | proto.WireFixed32)
- n += 4
- case *Communique_Today:
- n += proto.SizeVarint(10<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Today))
- case *Communique_Maybe:
- n += proto.SizeVarint(11<<3 | proto.WireVarint)
- n += 1
- case *Communique_Delta_:
- n += proto.SizeVarint(12<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31))))
- case *Communique_Msg:
- s := proto.Size(x.Msg)
- n += proto.SizeVarint(13<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Communique_Somegroup:
- n += proto.SizeVarint(14<<3 | proto.WireStartGroup)
- n += proto.Size(x.Somegroup)
- n += proto.SizeVarint(14<<3 | proto.WireEndGroup)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Communique_SomeGroup struct {
- Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} }
-func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*Communique_SomeGroup) ProtoMessage() {}
-
-func (m *Communique_SomeGroup) GetMember() string {
- if m != nil && m.Member != nil {
- return *m.Member
- }
- return ""
-}
-
-type Communique_Delta struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique_Delta) Reset() { *m = Communique_Delta{} }
-func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
-func (*Communique_Delta) ProtoMessage() {}
-
-var E_Tag = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*string)(nil),
- Field: 103,
- Name: "my.test.tag",
- Tag: "bytes,103,opt,name=tag",
- Filename: "my_test/test.proto",
-}
-
-var E_Donut = &proto.ExtensionDesc{
- ExtendedType: (*Reply)(nil),
- ExtensionType: (*OtherReplyExtensions)(nil),
- Field: 106,
- Name: "my.test.donut",
- Tag: "bytes,106,opt,name=donut",
- Filename: "my_test/test.proto",
-}
-
-func init() {
- proto.RegisterType((*Request)(nil), "my.test.Request")
- proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup")
- proto.RegisterType((*Reply)(nil), "my.test.Reply")
- proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry")
- proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase")
- proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions")
- proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions")
- proto.RegisterType((*OldReply)(nil), "my.test.OldReply")
- proto.RegisterType((*Communique)(nil), "my.test.Communique")
- proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup")
- proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta")
- proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
- proto.RegisterEnum("my.test.Days", Days_name, Days_value)
- proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
- proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
- proto.RegisterExtension(E_ReplyExtensions_Time)
- proto.RegisterExtension(E_ReplyExtensions_Carrot)
- proto.RegisterExtension(E_ReplyExtensions_Donut)
- proto.RegisterExtension(E_Tag)
- proto.RegisterExtension(E_Donut)
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto
deleted file mode 100644
index 8e7094632..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto
+++ /dev/null
@@ -1,156 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto2";
-
-// This package holds interesting messages.
-package my.test; // dotted package name
-
-//import "imp.proto";
-import "multi/multi1.proto"; // unused import
-
-enum HatType {
- // deliberately skipping 0
- FEDORA = 1;
- FEZ = 2;
-}
-
-// This enum represents days of the week.
-enum Days {
- option allow_alias = true;
-
- MONDAY = 1;
- TUESDAY = 2;
- LUNDI = 1; // same value as MONDAY
-}
-
-// This is a message that might be sent somewhere.
-message Request {
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- }
- repeated int64 key = 1;
-// optional imp.ImportedMessage imported_message = 2;
- optional Color hue = 3; // no default
- optional HatType hat = 4 [default=FEDORA];
-// optional imp.ImportedMessage.Owner owner = 6;
- optional float deadline = 7 [default=inf];
- optional group SomeGroup = 8 {
- optional int32 group_field = 9;
- }
-
- // These foreign types are in imp2.proto,
- // which is publicly imported by imp.proto.
-// optional imp.PubliclyImportedMessage pub = 10;
-// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR];
-
-
- // This is a map field. It will generate map[int32]string.
- map<int32, string> name_mapping = 14;
- // This is a map field whose value type is a message.
- map<sint64, Reply> msg_mapping = 15;
-
- optional int32 reset = 12;
- // This field should not conflict with any getters.
- optional string get_key = 16;
-}
-
-message Reply {
- message Entry {
- required int64 key_that_needs_1234camel_CasIng = 1;
- optional int64 value = 2 [default=7];
- optional int64 _my_field_name_2 = 3;
- enum Game {
- FOOTBALL = 1;
- TENNIS = 2;
- }
- }
- repeated Entry found = 1;
- repeated int32 compact_keys = 2 [packed=true];
- extensions 100 to max;
-}
-
-message OtherBase {
- optional string name = 1;
- extensions 100 to max;
-}
-
-message ReplyExtensions {
- extend Reply {
- optional double time = 101;
- optional ReplyExtensions carrot = 105;
- }
- extend OtherBase {
- optional ReplyExtensions donut = 101;
- }
-}
-
-message OtherReplyExtensions {
- optional int32 key = 1;
-}
-
-// top-level extension
-extend Reply {
- optional string tag = 103;
- optional OtherReplyExtensions donut = 106;
-// optional imp.ImportedMessage elephant = 107; // extend with message from another file.
-}
-
-message OldReply {
- // Extensions will be encoded in MessageSet wire format.
- option message_set_wire_format = true;
- extensions 100 to max;
-}
-
-message Communique {
- optional bool make_me_cry = 1;
-
- // This is a oneof, called "union".
- oneof union {
- int32 number = 5;
- string name = 6;
- bytes data = 7;
- double temp_c = 8;
- float height = 9;
- Days today = 10;
- bool maybe = 11;
- sint32 delta = 12; // name will conflict with Delta below
- Reply msg = 13;
- group SomeGroup = 14 {
- optional string member = 15;
- }
- }
-
- message Delta {}
-}
-
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto
deleted file mode 100644
index 869b9af5a..000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto
+++ /dev/null
@@ -1,53 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2014 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package proto3;
-
-message Request {
- enum Flavour {
- SWEET = 0;
- SOUR = 1;
- UMAMI = 2;
- GOPHERLICIOUS = 3;
- }
- string name = 1;
- repeated int64 key = 2;
- Flavour taste = 3;
- Book book = 4;
- repeated int64 unpacked = 5 [packed=false];
-}
-
-message Book {
- string title = 1;
- bytes raw_data = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go
deleted file mode 100644
index b2af97f4a..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-// This file implements functions to marshal proto.Message to/from
-// google.protobuf.Any message.
-
-import (
- "fmt"
- "reflect"
- "strings"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes/any"
-)
-
-const googleApis = "type.googleapis.com/"
-
-// AnyMessageName returns the name of the message contained in a google.protobuf.Any message.
-//
-// Note that regular type assertions should be done using the Is
-// function. AnyMessageName is provided for less common use cases like filtering a
-// sequence of Any messages based on a set of allowed message type names.
-func AnyMessageName(any *any.Any) (string, error) {
- if any == nil {
- return "", fmt.Errorf("message is nil")
- }
- slash := strings.LastIndex(any.TypeUrl, "/")
- if slash < 0 {
- return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl)
- }
- return any.TypeUrl[slash+1:], nil
-}
-
-// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any.
-func MarshalAny(pb proto.Message) (*any.Any, error) {
- value, err := proto.Marshal(pb)
- if err != nil {
- return nil, err
- }
- return &any.Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil
-}
-
-// DynamicAny is a value that can be passed to UnmarshalAny to automatically
-// allocate a proto.Message for the type specified in a google.protobuf.Any
-// message. The allocated message is stored in the embedded proto.Message.
-//
-// Example:
-//
-// var x ptypes.DynamicAny
-// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... }
-// fmt.Printf("unmarshaled message: %v", x.Message)
-type DynamicAny struct {
- proto.Message
-}
-
-// Empty returns a new proto.Message of the type specified in a
-// google.protobuf.Any message. It returns an error if corresponding message
-// type isn't linked in.
-func Empty(any *any.Any) (proto.Message, error) {
- aname, err := AnyMessageName(any)
- if err != nil {
- return nil, err
- }
-
- t := proto.MessageType(aname)
- if t == nil {
- return nil, fmt.Errorf("any: message type %q isn't linked in", aname)
- }
- return reflect.New(t.Elem()).Interface().(proto.Message), nil
-}
-
-// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any
-// message and places the decoded result in pb. It returns an error if type of
-// contents of Any message does not match type of pb message.
-//
-// pb can be a proto.Message, or a *DynamicAny.
-func UnmarshalAny(any *any.Any, pb proto.Message) error {
- if d, ok := pb.(*DynamicAny); ok {
- if d.Message == nil {
- var err error
- d.Message, err = Empty(any)
- if err != nil {
- return err
- }
- }
- return UnmarshalAny(any, d.Message)
- }
-
- aname, err := AnyMessageName(any)
- if err != nil {
- return err
- }
-
- mname := proto.MessageName(pb)
- if aname != mname {
- return fmt.Errorf("mismatched message type: got %q want %q", aname, mname)
- }
- return proto.Unmarshal(any.Value, pb)
-}
-
-// Is returns true if any value contains a given message type.
-func Is(any *any.Any, pb proto.Message) bool {
- aname, err := AnyMessageName(any)
- if err != nil {
- return false
- }
-
- return aname == proto.MessageName(pb)
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
deleted file mode 100644
index f34601723..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/any.proto
-
-/*
-Package any is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/any.proto
-
-It has these top-level messages:
- Any
-*/
-package any
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
-// any, err := ptypes.MarshalAny(foo)
-// ...
-// foo := &pb.Foo{}
-// if err := ptypes.UnmarshalAny(any, foo); err != nil {
-// ...
-// }
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": <string>,
-// "lastName": <string>
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-type Any struct {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
- //
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
- //
- // * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
-}
-
-func (m *Any) Reset() { *m = Any{} }
-func (m *Any) String() string { return proto.CompactTextString(m) }
-func (*Any) ProtoMessage() {}
-func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Any) XXX_WellKnownType() string { return "Any" }
-
-func (m *Any) GetTypeUrl() string {
- if m != nil {
- return m.TypeUrl
- }
- return ""
-}
-
-func (m *Any) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Any)(nil), "google.protobuf.Any")
-}
-
-func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 185 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
- 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a,
- 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46,
- 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7,
- 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce,
- 0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52,
- 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc,
- 0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c,
- 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce,
- 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff,
- 0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto
deleted file mode 100644
index c74866762..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto
+++ /dev/null
@@ -1,149 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option go_package = "github.com/golang/protobuf/ptypes/any";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "AnyProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
-// any, err := ptypes.MarshalAny(foo)
-// ...
-// foo := &pb.Foo{}
-// if err := ptypes.UnmarshalAny(any, foo); err != nil {
-// ...
-// }
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": <string>,
-// "lastName": <string>
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-message Any {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
- //
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
- //
- // * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- string type_url = 1;
-
- // Must be a valid serialized protocol buffer of the above specified type.
- bytes value = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any_test.go b/vendor/github.com/golang/protobuf/ptypes/any_test.go
deleted file mode 100644
index ed675b489..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any_test.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-import (
- "testing"
-
- "github.com/golang/protobuf/proto"
- pb "github.com/golang/protobuf/protoc-gen-go/descriptor"
- "github.com/golang/protobuf/ptypes/any"
-)
-
-func TestMarshalUnmarshal(t *testing.T) {
- orig := &any.Any{Value: []byte("test")}
-
- packed, err := MarshalAny(orig)
- if err != nil {
- t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err)
- }
-
- unpacked := &any.Any{}
- err = UnmarshalAny(packed, unpacked)
- if err != nil || !proto.Equal(unpacked, orig) {
- t.Errorf("got: %v, %+v; want nil, %+v", err, unpacked, orig)
- }
-}
-
-func TestIs(t *testing.T) {
- a, err := MarshalAny(&pb.FileDescriptorProto{})
- if err != nil {
- t.Fatal(err)
- }
- if Is(a, &pb.DescriptorProto{}) {
- t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is")
- }
- if !Is(a, &pb.FileDescriptorProto{}) {
- t.Error("FileDescriptorProto is indeed a FileDescriptorProto, but Is says it is not")
- }
-}
-
-func TestIsDifferentUrlPrefixes(t *testing.T) {
- m := &pb.FileDescriptorProto{}
- a := &any.Any{TypeUrl: "foo/bar/" + proto.MessageName(m)}
- if !Is(a, m) {
- t.Errorf("message with type url %q didn't satisfy Is for type %q", a.TypeUrl, proto.MessageName(m))
- }
-}
-
-func TestUnmarshalDynamic(t *testing.T) {
- want := &pb.FileDescriptorProto{Name: proto.String("foo")}
- a, err := MarshalAny(want)
- if err != nil {
- t.Fatal(err)
- }
- var got DynamicAny
- if err := UnmarshalAny(a, &got); err != nil {
- t.Fatal(err)
- }
- if !proto.Equal(got.Message, want) {
- t.Errorf("invalid result from UnmarshalAny, got %q want %q", got.Message, want)
- }
-}
-
-func TestEmpty(t *testing.T) {
- want := &pb.FileDescriptorProto{}
- a, err := MarshalAny(want)
- if err != nil {
- t.Fatal(err)
- }
- got, err := Empty(a)
- if err != nil {
- t.Fatal(err)
- }
- if !proto.Equal(got, want) {
- t.Errorf("unequal empty message, got %q, want %q", got, want)
- }
-
- // that's a valid type_url for a message which shouldn't be linked into this
- // test binary. We want an error.
- a.TypeUrl = "type.googleapis.com/google.protobuf.FieldMask"
- if _, err := Empty(a); err == nil {
- t.Errorf("got no error for an attempt to create a message of type %q, which shouldn't be linked in", a.TypeUrl)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/doc.go b/vendor/github.com/golang/protobuf/ptypes/doc.go
deleted file mode 100644
index c0d595da7..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/doc.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-/*
-Package ptypes contains code for interacting with well-known types.
-*/
-package ptypes
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go
deleted file mode 100644
index 65cb0f8eb..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-// This file implements conversions between google.protobuf.Duration
-// and time.Duration.
-
-import (
- "errors"
- "fmt"
- "time"
-
- durpb "github.com/golang/protobuf/ptypes/duration"
-)
-
-const (
- // Range of a durpb.Duration in seconds, as specified in
- // google/protobuf/duration.proto. This is about 10,000 years in seconds.
- maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60)
- minSeconds = -maxSeconds
-)
-
-// validateDuration determines whether the durpb.Duration is valid according to the
-// definition in google/protobuf/duration.proto. A valid durpb.Duration
-// may still be too large to fit into a time.Duration (the range of durpb.Duration
-// is about 10,000 years, and the range of time.Duration is about 290).
-func validateDuration(d *durpb.Duration) error {
- if d == nil {
- return errors.New("duration: nil Duration")
- }
- if d.Seconds < minSeconds || d.Seconds > maxSeconds {
- return fmt.Errorf("duration: %v: seconds out of range", d)
- }
- if d.Nanos <= -1e9 || d.Nanos >= 1e9 {
- return fmt.Errorf("duration: %v: nanos out of range", d)
- }
- // Seconds and Nanos must have the same sign, unless d.Nanos is zero.
- if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) {
- return fmt.Errorf("duration: %v: seconds and nanos have different signs", d)
- }
- return nil
-}
-
-// Duration converts a durpb.Duration to a time.Duration. Duration
-// returns an error if the durpb.Duration is invalid or is too large to be
-// represented in a time.Duration.
-func Duration(p *durpb.Duration) (time.Duration, error) {
- if err := validateDuration(p); err != nil {
- return 0, err
- }
- d := time.Duration(p.Seconds) * time.Second
- if int64(d/time.Second) != p.Seconds {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
- }
- if p.Nanos != 0 {
- d += time.Duration(p.Nanos)
- if (d < 0) != (p.Nanos < 0) {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
- }
- }
- return d, nil
-}
-
-// DurationProto converts a time.Duration to a durpb.Duration.
-func DurationProto(d time.Duration) *durpb.Duration {
- nanos := d.Nanoseconds()
- secs := nanos / 1e9
- nanos -= secs * 1e9
- return &durpb.Duration{
- Seconds: secs,
- Nanos: int32(nanos),
- }
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
deleted file mode 100644
index b2410a098..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/duration.proto
-
-/*
-Package duration is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/duration.proto
-
-It has these top-level messages:
- Duration
-*/
-package duration
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// A Duration represents a signed, fixed-length span of time represented
-// as a count of seconds and fractions of seconds at nanosecond
-// resolution. It is independent of any calendar and concepts like "day"
-// or "month". It is related to Timestamp in that the difference between
-// two Timestamp values is a Duration and it can be added or subtracted
-// from a Timestamp. Range is approximately +-10,000 years.
-//
-// # Examples
-//
-// Example 1: Compute Duration from two Timestamps in pseudo code.
-//
-// Timestamp start = ...;
-// Timestamp end = ...;
-// Duration duration = ...;
-//
-// duration.seconds = end.seconds - start.seconds;
-// duration.nanos = end.nanos - start.nanos;
-//
-// if (duration.seconds < 0 && duration.nanos > 0) {
-// duration.seconds += 1;
-// duration.nanos -= 1000000000;
-// } else if (durations.seconds > 0 && duration.nanos < 0) {
-// duration.seconds -= 1;
-// duration.nanos += 1000000000;
-// }
-//
-// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-//
-// Timestamp start = ...;
-// Duration duration = ...;
-// Timestamp end = ...;
-//
-// end.seconds = start.seconds + duration.seconds;
-// end.nanos = start.nanos + duration.nanos;
-//
-// if (end.nanos < 0) {
-// end.seconds -= 1;
-// end.nanos += 1000000000;
-// } else if (end.nanos >= 1000000000) {
-// end.seconds += 1;
-// end.nanos -= 1000000000;
-// }
-//
-// Example 3: Compute Duration from datetime.timedelta in Python.
-//
-// td = datetime.timedelta(days=3, minutes=10)
-// duration = Duration()
-// duration.FromTimedelta(td)
-//
-// # JSON Mapping
-//
-// In JSON format, the Duration type is encoded as a string rather than an
-// object, where the string ends in the suffix "s" (indicating seconds) and
-// is preceded by the number of seconds, with nanoseconds expressed as
-// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
-// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
-// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
-// microsecond should be expressed in JSON format as "3.000001s".
-//
-//
-type Duration struct {
- // Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive. Note: these bounds are computed from:
- // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
- // Signed fractions of a second at nanosecond resolution of the span
- // of time. Durations less than one second are represented with a 0
- // `seconds` field and a positive or negative `nanos` field. For durations
- // of one second or more, a non-zero value for the `nanos` field must be
- // of the same sign as the `seconds` field. Must be from -999,999,999
- // to +999,999,999 inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
-}
-
-func (m *Duration) Reset() { *m = Duration{} }
-func (m *Duration) String() string { return proto.CompactTextString(m) }
-func (*Duration) ProtoMessage() {}
-func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Duration) XXX_WellKnownType() string { return "Duration" }
-
-func (m *Duration) GetSeconds() int64 {
- if m != nil {
- return m.Seconds
- }
- return 0
-}
-
-func (m *Duration) GetNanos() int32 {
- if m != nil {
- return m.Nanos
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
-}
-
-func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 190 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a,
- 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56,
- 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5,
- 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e,
- 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0xc3, 0x25, 0x9c, 0x9c,
- 0x9f, 0xab, 0x87, 0x66, 0xa4, 0x13, 0x2f, 0xcc, 0xc0, 0x00, 0x90, 0x48, 0x00, 0x63, 0x94, 0x56,
- 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e,
- 0x3a, 0xc2, 0x7d, 0x05, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x70, 0x67, 0xfe, 0x60, 0x64, 0x5c, 0xc4,
- 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, 0x00, 0x54, 0xa9, 0x5e, 0x78,
- 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, 0x12, 0x1b, 0xd8, 0x0c, 0x63,
- 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x30, 0xff, 0xf3, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto
deleted file mode 100644
index 975fce41a..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto
+++ /dev/null
@@ -1,117 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/duration";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "DurationProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// A Duration represents a signed, fixed-length span of time represented
-// as a count of seconds and fractions of seconds at nanosecond
-// resolution. It is independent of any calendar and concepts like "day"
-// or "month". It is related to Timestamp in that the difference between
-// two Timestamp values is a Duration and it can be added or subtracted
-// from a Timestamp. Range is approximately +-10,000 years.
-//
-// # Examples
-//
-// Example 1: Compute Duration from two Timestamps in pseudo code.
-//
-// Timestamp start = ...;
-// Timestamp end = ...;
-// Duration duration = ...;
-//
-// duration.seconds = end.seconds - start.seconds;
-// duration.nanos = end.nanos - start.nanos;
-//
-// if (duration.seconds < 0 && duration.nanos > 0) {
-// duration.seconds += 1;
-// duration.nanos -= 1000000000;
-// } else if (durations.seconds > 0 && duration.nanos < 0) {
-// duration.seconds -= 1;
-// duration.nanos += 1000000000;
-// }
-//
-// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-//
-// Timestamp start = ...;
-// Duration duration = ...;
-// Timestamp end = ...;
-//
-// end.seconds = start.seconds + duration.seconds;
-// end.nanos = start.nanos + duration.nanos;
-//
-// if (end.nanos < 0) {
-// end.seconds -= 1;
-// end.nanos += 1000000000;
-// } else if (end.nanos >= 1000000000) {
-// end.seconds += 1;
-// end.nanos -= 1000000000;
-// }
-//
-// Example 3: Compute Duration from datetime.timedelta in Python.
-//
-// td = datetime.timedelta(days=3, minutes=10)
-// duration = Duration()
-// duration.FromTimedelta(td)
-//
-// # JSON Mapping
-//
-// In JSON format, the Duration type is encoded as a string rather than an
-// object, where the string ends in the suffix "s" (indicating seconds) and
-// is preceded by the number of seconds, with nanoseconds expressed as
-// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
-// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
-// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
-// microsecond should be expressed in JSON format as "3.000001s".
-//
-//
-message Duration {
-
- // Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive. Note: these bounds are computed from:
- // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- int64 seconds = 1;
-
- // Signed fractions of a second at nanosecond resolution of the span
- // of time. Durations less than one second are represented with a 0
- // `seconds` field and a positive or negative `nanos` field. For durations
- // of one second or more, a non-zero value for the `nanos` field must be
- // of the same sign as the `seconds` field. Must be from -999,999,999
- // to +999,999,999 inclusive.
- int32 nanos = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration_test.go b/vendor/github.com/golang/protobuf/ptypes/duration_test.go
deleted file mode 100644
index e00491a34..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration_test.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-import (
- "math"
- "testing"
- "time"
-
- "github.com/golang/protobuf/proto"
- durpb "github.com/golang/protobuf/ptypes/duration"
-)
-
-const (
- minGoSeconds = math.MinInt64 / int64(1e9)
- maxGoSeconds = math.MaxInt64 / int64(1e9)
-)
-
-var durationTests = []struct {
- proto *durpb.Duration
- isValid bool
- inRange bool
- dur time.Duration
-}{
- // The zero duration.
- {&durpb.Duration{Seconds: 0, Nanos: 0}, true, true, 0},
- // Some ordinary non-zero durations.
- {&durpb.Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second},
- {&durpb.Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second},
- {&durpb.Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987},
- {&durpb.Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)},
- // The largest duration representable in Go.
- {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64},
- // The smallest duration representable in Go.
- {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64},
- {nil, false, false, 0},
- {&durpb.Duration{Seconds: -100, Nanos: 987}, false, false, 0},
- {&durpb.Duration{Seconds: 100, Nanos: -987}, false, false, 0},
- {&durpb.Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0},
- {&durpb.Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0},
- // The largest valid duration.
- {&durpb.Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0},
- // The smallest valid duration.
- {&durpb.Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0},
- // The smallest invalid duration above the valid range.
- {&durpb.Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0},
- // The largest invalid duration below the valid range.
- {&durpb.Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0},
- // One nanosecond past the largest duration representable in Go.
- {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0},
- // One nanosecond past the smallest duration representable in Go.
- {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0},
- // One second past the largest duration representable in Go.
- {&durpb.Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0},
- // One second past the smallest duration representable in Go.
- {&durpb.Duration{Seconds: minGoSeconds - 1, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, false, 0},
-}
-
-func TestValidateDuration(t *testing.T) {
- for _, test := range durationTests {
- err := validateDuration(test.proto)
- gotValid := (err == nil)
- if gotValid != test.isValid {
- t.Errorf("validateDuration(%v) = %t, want %t", test.proto, gotValid, test.isValid)
- }
- }
-}
-
-func TestDuration(t *testing.T) {
- for _, test := range durationTests {
- got, err := Duration(test.proto)
- gotOK := (err == nil)
- wantOK := test.isValid && test.inRange
- if gotOK != wantOK {
- t.Errorf("Duration(%v) ok = %t, want %t", test.proto, gotOK, wantOK)
- }
- if err == nil && got != test.dur {
- t.Errorf("Duration(%v) = %v, want %v", test.proto, got, test.dur)
- }
- }
-}
-
-func TestDurationProto(t *testing.T) {
- for _, test := range durationTests {
- if test.isValid && test.inRange {
- got := DurationProto(test.dur)
- if !proto.Equal(got, test.proto) {
- t.Errorf("DurationProto(%v) = %v, want %v", test.dur, got, test.proto)
- }
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go
deleted file mode 100644
index e877b72c3..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/empty.proto
-
-/*
-Package empty is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/empty.proto
-
-It has these top-level messages:
- Empty
-*/
-package empty
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// A generic empty message that you can re-use to avoid defining duplicated
-// empty messages in your APIs. A typical example is to use it as the request
-// or the response type of an API method. For instance:
-//
-// service Foo {
-// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
-// }
-//
-// The JSON representation for `Empty` is empty JSON object `{}`.
-type Empty struct {
-}
-
-func (m *Empty) Reset() { *m = Empty{} }
-func (m *Empty) String() string { return proto.CompactTextString(m) }
-func (*Empty) ProtoMessage() {}
-func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Empty) XXX_WellKnownType() string { return "Empty" }
-
-func init() {
- proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
-}
-
-func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 148 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
- 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57,
- 0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36,
- 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf,
- 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0x47, 0x58, 0x53, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x0c,
- 0xb1, 0xed, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10,
- 0x13, 0x03, 0xa0, 0xea, 0xf4, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40,
- 0xea, 0x93, 0xd8, 0xc0, 0x06, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd4, 0xb3, 0xa6,
- 0xb7, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto
deleted file mode 100644
index 03cacd233..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto
+++ /dev/null
@@ -1,52 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option go_package = "github.com/golang/protobuf/ptypes/empty";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "EmptyProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-option cc_enable_arenas = true;
-
-// A generic empty message that you can re-use to avoid defining duplicated
-// empty messages in your APIs. A typical example is to use it as the request
-// or the response type of an API method. For instance:
-//
-// service Foo {
-// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
-// }
-//
-// The JSON representation for `Empty` is empty JSON object `{}`.
-message Empty {}
diff --git a/vendor/github.com/golang/protobuf/ptypes/regen.sh b/vendor/github.com/golang/protobuf/ptypes/regen.sh
deleted file mode 100755
index b50a9414a..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/regen.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash -e
-#
-# This script fetches and rebuilds the "well-known types" protocol buffers.
-# To run this you will need protoc and goprotobuf installed;
-# see https://github.com/golang/protobuf for instructions.
-# You also need Go and Git installed.
-
-PKG=github.com/golang/protobuf/ptypes
-UPSTREAM=https://github.com/google/protobuf
-UPSTREAM_SUBDIR=src/google/protobuf
-PROTO_FILES=(any duration empty struct timestamp wrappers)
-
-function die() {
- echo 1>&2 $*
- exit 1
-}
-
-# Sanity check that the right tools are accessible.
-for tool in go git protoc protoc-gen-go; do
- q=$(which $tool) || die "didn't find $tool"
- echo 1>&2 "$tool: $q"
-done
-
-tmpdir=$(mktemp -d -t regen-wkt.XXXXXX)
-trap 'rm -rf $tmpdir' EXIT
-
-echo -n 1>&2 "finding package dir... "
-pkgdir=$(go list -f '{{.Dir}}' $PKG)
-echo 1>&2 $pkgdir
-base=$(echo $pkgdir | sed "s,/$PKG\$,,")
-echo 1>&2 "base: $base"
-cd "$base"
-
-echo 1>&2 "fetching latest protos... "
-git clone -q $UPSTREAM $tmpdir
-
-for file in ${PROTO_FILES[@]}; do
- echo 1>&2 "* $file"
- protoc --go_out=. -I$tmpdir/src $tmpdir/src/google/protobuf/$file.proto || die
- cp $tmpdir/src/google/protobuf/$file.proto $PKG/$file
-done
-
-echo 1>&2 "All OK"
diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go
deleted file mode 100644
index 4cfe60818..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go
+++ /dev/null
@@ -1,380 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/struct.proto
-
-/*
-Package structpb is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/struct.proto
-
-It has these top-level messages:
- Struct
- Value
- ListValue
-*/
-package structpb
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// `NullValue` is a singleton enumeration to represent the null value for the
-// `Value` type union.
-//
-// The JSON representation for `NullValue` is JSON `null`.
-type NullValue int32
-
-const (
- // Null value.
- NullValue_NULL_VALUE NullValue = 0
-)
-
-var NullValue_name = map[int32]string{
- 0: "NULL_VALUE",
-}
-var NullValue_value = map[string]int32{
- "NULL_VALUE": 0,
-}
-
-func (x NullValue) String() string {
- return proto.EnumName(NullValue_name, int32(x))
-}
-func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (NullValue) XXX_WellKnownType() string { return "NullValue" }
-
-// `Struct` represents a structured data value, consisting of fields
-// which map to dynamically typed values. In some languages, `Struct`
-// might be supported by a native representation. For example, in
-// scripting languages like JS a struct is represented as an
-// object. The details of that representation are described together
-// with the proto support for the language.
-//
-// The JSON representation for `Struct` is JSON object.
-type Struct struct {
- // Unordered map of dynamically typed values.
- Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
-}
-
-func (m *Struct) Reset() { *m = Struct{} }
-func (m *Struct) String() string { return proto.CompactTextString(m) }
-func (*Struct) ProtoMessage() {}
-func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Struct) XXX_WellKnownType() string { return "Struct" }
-
-func (m *Struct) GetFields() map[string]*Value {
- if m != nil {
- return m.Fields
- }
- return nil
-}
-
-// `Value` represents a dynamically typed value which can be either
-// null, a number, a string, a boolean, a recursive struct value, or a
-// list of values. A producer of value is expected to set one of that
-// variants, absence of any variant indicates an error.
-//
-// The JSON representation for `Value` is JSON value.
-type Value struct {
- // The kind of value.
- //
- // Types that are valid to be assigned to Kind:
- // *Value_NullValue
- // *Value_NumberValue
- // *Value_StringValue
- // *Value_BoolValue
- // *Value_StructValue
- // *Value_ListValue
- Kind isValue_Kind `protobuf_oneof:"kind"`
-}
-
-func (m *Value) Reset() { *m = Value{} }
-func (m *Value) String() string { return proto.CompactTextString(m) }
-func (*Value) ProtoMessage() {}
-func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-func (*Value) XXX_WellKnownType() string { return "Value" }
-
-type isValue_Kind interface {
- isValue_Kind()
-}
-
-type Value_NullValue struct {
- NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
-}
-type Value_NumberValue struct {
- NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
-}
-type Value_StringValue struct {
- StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
-}
-type Value_BoolValue struct {
- BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
-}
-type Value_StructValue struct {
- StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
-}
-type Value_ListValue struct {
- ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
-}
-
-func (*Value_NullValue) isValue_Kind() {}
-func (*Value_NumberValue) isValue_Kind() {}
-func (*Value_StringValue) isValue_Kind() {}
-func (*Value_BoolValue) isValue_Kind() {}
-func (*Value_StructValue) isValue_Kind() {}
-func (*Value_ListValue) isValue_Kind() {}
-
-func (m *Value) GetKind() isValue_Kind {
- if m != nil {
- return m.Kind
- }
- return nil
-}
-
-func (m *Value) GetNullValue() NullValue {
- if x, ok := m.GetKind().(*Value_NullValue); ok {
- return x.NullValue
- }
- return NullValue_NULL_VALUE
-}
-
-func (m *Value) GetNumberValue() float64 {
- if x, ok := m.GetKind().(*Value_NumberValue); ok {
- return x.NumberValue
- }
- return 0
-}
-
-func (m *Value) GetStringValue() string {
- if x, ok := m.GetKind().(*Value_StringValue); ok {
- return x.StringValue
- }
- return ""
-}
-
-func (m *Value) GetBoolValue() bool {
- if x, ok := m.GetKind().(*Value_BoolValue); ok {
- return x.BoolValue
- }
- return false
-}
-
-func (m *Value) GetStructValue() *Struct {
- if x, ok := m.GetKind().(*Value_StructValue); ok {
- return x.StructValue
- }
- return nil
-}
-
-func (m *Value) GetListValue() *ListValue {
- if x, ok := m.GetKind().(*Value_ListValue); ok {
- return x.ListValue
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
- (*Value_NullValue)(nil),
- (*Value_NumberValue)(nil),
- (*Value_StringValue)(nil),
- (*Value_BoolValue)(nil),
- (*Value_StructValue)(nil),
- (*Value_ListValue)(nil),
- }
-}
-
-func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Value)
- // kind
- switch x := m.Kind.(type) {
- case *Value_NullValue:
- b.EncodeVarint(1<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.NullValue))
- case *Value_NumberValue:
- b.EncodeVarint(2<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.NumberValue))
- case *Value_StringValue:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.StringValue)
- case *Value_BoolValue:
- t := uint64(0)
- if x.BoolValue {
- t = 1
- }
- b.EncodeVarint(4<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Value_StructValue:
- b.EncodeVarint(5<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.StructValue); err != nil {
- return err
- }
- case *Value_ListValue:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.ListValue); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Value.Kind has unexpected type %T", x)
- }
- return nil
-}
-
-func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Value)
- switch tag {
- case 1: // kind.null_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Kind = &Value_NullValue{NullValue(x)}
- return true, err
- case 2: // kind.number_value
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Kind = &Value_NumberValue{math.Float64frombits(x)}
- return true, err
- case 3: // kind.string_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Kind = &Value_StringValue{x}
- return true, err
- case 4: // kind.bool_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Kind = &Value_BoolValue{x != 0}
- return true, err
- case 5: // kind.struct_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Struct)
- err := b.DecodeMessage(msg)
- m.Kind = &Value_StructValue{msg}
- return true, err
- case 6: // kind.list_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(ListValue)
- err := b.DecodeMessage(msg)
- m.Kind = &Value_ListValue{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Value_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Value)
- // kind
- switch x := m.Kind.(type) {
- case *Value_NullValue:
- n += proto.SizeVarint(1<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.NullValue))
- case *Value_NumberValue:
- n += proto.SizeVarint(2<<3 | proto.WireFixed64)
- n += 8
- case *Value_StringValue:
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.StringValue)))
- n += len(x.StringValue)
- case *Value_BoolValue:
- n += proto.SizeVarint(4<<3 | proto.WireVarint)
- n += 1
- case *Value_StructValue:
- s := proto.Size(x.StructValue)
- n += proto.SizeVarint(5<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Value_ListValue:
- s := proto.Size(x.ListValue)
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// `ListValue` is a wrapper around a repeated field of values.
-//
-// The JSON representation for `ListValue` is JSON array.
-type ListValue struct {
- // Repeated field of dynamically typed values.
- Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
-}
-
-func (m *ListValue) Reset() { *m = ListValue{} }
-func (m *ListValue) String() string { return proto.CompactTextString(m) }
-func (*ListValue) ProtoMessage() {}
-func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
-
-func (m *ListValue) GetValues() []*Value {
- if m != nil {
- return m.Values
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
- proto.RegisterType((*Value)(nil), "google.protobuf.Value")
- proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
- proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
-}
-
-func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 417 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40,
- 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09,
- 0x22, 0x29, 0xd6, 0x8b, 0x18, 0x2f, 0x06, 0xd6, 0x5d, 0x30, 0x2c, 0x31, 0xba, 0x15, 0xbc, 0x94,
- 0x26, 0x4d, 0x63, 0xe8, 0x74, 0x26, 0x24, 0x33, 0x4a, 0x8f, 0x7e, 0x0b, 0xcf, 0x1e, 0x3d, 0xfa,
- 0xe9, 0x3c, 0xca, 0xcc, 0x24, 0xa9, 0xb4, 0xf4, 0x94, 0xbc, 0xf7, 0x7e, 0xef, 0x3f, 0xef, 0xff,
- 0x66, 0xe0, 0x71, 0xc1, 0x58, 0x41, 0xf2, 0x49, 0x55, 0x33, 0xce, 0x52, 0xb1, 0x9a, 0x34, 0xbc,
- 0x16, 0x19, 0xf7, 0x55, 0x8c, 0xef, 0xe9, 0xaa, 0xdf, 0x55, 0xc7, 0x3f, 0x11, 0x58, 0x1f, 0x15,
- 0x81, 0x03, 0xb0, 0x56, 0x65, 0x4e, 0x96, 0xcd, 0x08, 0xb9, 0xa6, 0xe7, 0x4c, 0x2f, 0xfc, 0x3d,
- 0xd8, 0xd7, 0xa0, 0xff, 0x4e, 0x51, 0x97, 0x94, 0xd7, 0xdb, 0xa4, 0x6d, 0x39, 0xff, 0x00, 0xce,
- 0x7f, 0x69, 0x7c, 0x06, 0xe6, 0x3a, 0xdf, 0x8e, 0x90, 0x8b, 0x3c, 0x3b, 0x91, 0xbf, 0xf8, 0x39,
- 0x0c, 0xbf, 0x2d, 0x88, 0xc8, 0x47, 0x86, 0x8b, 0x3c, 0x67, 0xfa, 0xe0, 0x40, 0x7c, 0x26, 0xab,
- 0x89, 0x86, 0x5e, 0x1b, 0xaf, 0xd0, 0xf8, 0x8f, 0x01, 0x43, 0x95, 0xc4, 0x01, 0x00, 0x15, 0x84,
- 0xcc, 0xb5, 0x80, 0x14, 0x3d, 0x9d, 0x9e, 0x1f, 0x08, 0xdc, 0x08, 0x42, 0x14, 0x7f, 0x3d, 0x48,
- 0x6c, 0xda, 0x05, 0xf8, 0x02, 0xee, 0x52, 0xb1, 0x49, 0xf3, 0x7a, 0xbe, 0x3b, 0x1f, 0x5d, 0x0f,
- 0x12, 0x47, 0x67, 0x7b, 0xa8, 0xe1, 0x75, 0x49, 0x8b, 0x16, 0x32, 0xe5, 0xe0, 0x12, 0xd2, 0x59,
- 0x0d, 0x3d, 0x05, 0x48, 0x19, 0xeb, 0xc6, 0x38, 0x71, 0x91, 0x77, 0x47, 0x1e, 0x25, 0x73, 0x1a,
- 0x78, 0xa3, 0x54, 0x44, 0xc6, 0x5b, 0x64, 0xa8, 0xac, 0x3e, 0x3c, 0xb2, 0xc7, 0x56, 0x5e, 0x64,
- 0xbc, 0x77, 0x49, 0xca, 0xa6, 0xeb, 0xb5, 0x54, 0xef, 0xa1, 0xcb, 0xa8, 0x6c, 0x78, 0xef, 0x92,
- 0x74, 0x41, 0x68, 0xc1, 0xc9, 0xba, 0xa4, 0xcb, 0x71, 0x00, 0x76, 0x4f, 0x60, 0x1f, 0x2c, 0x25,
- 0xd6, 0xdd, 0xe8, 0xb1, 0xa5, 0xb7, 0xd4, 0xb3, 0x47, 0x60, 0xf7, 0x4b, 0xc4, 0xa7, 0x00, 0x37,
- 0xb7, 0x51, 0x34, 0x9f, 0xbd, 0x8d, 0x6e, 0x2f, 0xcf, 0x06, 0xe1, 0x0f, 0x04, 0xf7, 0x33, 0xb6,
- 0xd9, 0x97, 0x08, 0x1d, 0xed, 0x26, 0x96, 0x71, 0x8c, 0xbe, 0xbc, 0x28, 0x4a, 0xfe, 0x55, 0xa4,
- 0x7e, 0xc6, 0x36, 0x93, 0x82, 0x91, 0x05, 0x2d, 0x76, 0x4f, 0xb1, 0xe2, 0xdb, 0x2a, 0x6f, 0xda,
- 0x17, 0x19, 0xe8, 0x4f, 0x95, 0xfe, 0x45, 0xe8, 0x97, 0x61, 0x5e, 0xc5, 0xe1, 0x6f, 0xe3, 0xc9,
- 0x95, 0x16, 0x8f, 0xbb, 0xf9, 0x3e, 0xe7, 0x84, 0xbc, 0xa7, 0xec, 0x3b, 0xfd, 0x24, 0x3b, 0x53,
- 0x4b, 0x49, 0xbd, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x1b, 0x59, 0xf8, 0xe5, 0x02, 0x00,
- 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto
deleted file mode 100644
index 7d7808e7f..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto
+++ /dev/null
@@ -1,96 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "StructProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-
-// `Struct` represents a structured data value, consisting of fields
-// which map to dynamically typed values. In some languages, `Struct`
-// might be supported by a native representation. For example, in
-// scripting languages like JS a struct is represented as an
-// object. The details of that representation are described together
-// with the proto support for the language.
-//
-// The JSON representation for `Struct` is JSON object.
-message Struct {
- // Unordered map of dynamically typed values.
- map<string, Value> fields = 1;
-}
-
-// `Value` represents a dynamically typed value which can be either
-// null, a number, a string, a boolean, a recursive struct value, or a
-// list of values. A producer of value is expected to set one of that
-// variants, absence of any variant indicates an error.
-//
-// The JSON representation for `Value` is JSON value.
-message Value {
- // The kind of value.
- oneof kind {
- // Represents a null value.
- NullValue null_value = 1;
- // Represents a double value.
- double number_value = 2;
- // Represents a string value.
- string string_value = 3;
- // Represents a boolean value.
- bool bool_value = 4;
- // Represents a structured value.
- Struct struct_value = 5;
- // Represents a repeated `Value`.
- ListValue list_value = 6;
- }
-}
-
-// `NullValue` is a singleton enumeration to represent the null value for the
-// `Value` type union.
-//
-// The JSON representation for `NullValue` is JSON `null`.
-enum NullValue {
- // Null value.
- NULL_VALUE = 0;
-}
-
-// `ListValue` is a wrapper around a repeated field of values.
-//
-// The JSON representation for `ListValue` is JSON array.
-message ListValue {
- // Repeated field of dynamically typed values.
- repeated Value values = 1;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go
deleted file mode 100644
index 47f10dbc2..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-// This file implements operations on google.protobuf.Timestamp.
-
-import (
- "errors"
- "fmt"
- "time"
-
- tspb "github.com/golang/protobuf/ptypes/timestamp"
-)
-
-const (
- // Seconds field of the earliest valid Timestamp.
- // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- minValidSeconds = -62135596800
- // Seconds field just after the latest valid Timestamp.
- // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- maxValidSeconds = 253402300800
-)
-
-// validateTimestamp determines whether a Timestamp is valid.
-// A valid timestamp represents a time in the range
-// [0001-01-01, 10000-01-01) and has a Nanos field
-// in the range [0, 1e9).
-//
-// If the Timestamp is valid, validateTimestamp returns nil.
-// Otherwise, it returns an error that describes
-// the problem.
-//
-// Every valid Timestamp can be represented by a time.Time, but the converse is not true.
-func validateTimestamp(ts *tspb.Timestamp) error {
- if ts == nil {
- return errors.New("timestamp: nil Timestamp")
- }
- if ts.Seconds < minValidSeconds {
- return fmt.Errorf("timestamp: %v before 0001-01-01", ts)
- }
- if ts.Seconds >= maxValidSeconds {
- return fmt.Errorf("timestamp: %v after 10000-01-01", ts)
- }
- if ts.Nanos < 0 || ts.Nanos >= 1e9 {
- return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts)
- }
- return nil
-}
-
-// Timestamp converts a google.protobuf.Timestamp proto to a time.Time.
-// It returns an error if the argument is invalid.
-//
-// Unlike most Go functions, if Timestamp returns an error, the first return value
-// is not the zero time.Time. Instead, it is the value obtained from the
-// time.Unix function when passed the contents of the Timestamp, in the UTC
-// locale. This may or may not be a meaningful time; many invalid Timestamps
-// do map to valid time.Times.
-//
-// A nil Timestamp returns an error. The first return value in that case is
-// undefined.
-func Timestamp(ts *tspb.Timestamp) (time.Time, error) {
- // Don't return the zero value on error, because corresponds to a valid
- // timestamp. Instead return whatever time.Unix gives us.
- var t time.Time
- if ts == nil {
- t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp
- } else {
- t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC()
- }
- return t, validateTimestamp(ts)
-}
-
-// TimestampNow returns a google.protobuf.Timestamp for the current time.
-func TimestampNow() *tspb.Timestamp {
- ts, err := TimestampProto(time.Now())
- if err != nil {
- panic("ptypes: time.Now() out of Timestamp range")
- }
- return ts
-}
-
-// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
-// It returns an error if the resulting Timestamp is invalid.
-func TimestampProto(t time.Time) (*tspb.Timestamp, error) {
- seconds := t.Unix()
- nanos := int32(t.Sub(time.Unix(seconds, 0)))
- ts := &tspb.Timestamp{
- Seconds: seconds,
- Nanos: nanos,
- }
- if err := validateTimestamp(ts); err != nil {
- return nil, err
- }
- return ts, nil
-}
-
-// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid
-// Timestamps, it returns an error message in parentheses.
-func TimestampString(ts *tspb.Timestamp) string {
- t, err := Timestamp(ts)
- if err != nil {
- return fmt.Sprintf("(%v)", err)
- }
- return t.Format(time.RFC3339Nano)
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
deleted file mode 100644
index e23e4a25d..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/timestamp.proto
-
-/*
-Package timestamp is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/timestamp.proto
-
-It has these top-level messages:
- Timestamp
-*/
-package timestamp
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
-//
-// # Examples
-//
-// Example 1: Compute Timestamp from POSIX `time()`.
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(time(NULL));
-// timestamp.set_nanos(0);
-//
-// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
-//
-// struct timeval tv;
-// gettimeofday(&tv, NULL);
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(tv.tv_sec);
-// timestamp.set_nanos(tv.tv_usec * 1000);
-//
-// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
-//
-// FILETIME ft;
-// GetSystemTimeAsFileTime(&ft);
-// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-//
-// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
-// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
-// Timestamp timestamp;
-// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
-// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
-//
-// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
-//
-// long millis = System.currentTimeMillis();
-//
-// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
-// .setNanos((int) ((millis % 1000) * 1000000)).build();
-//
-//
-// Example 5: Compute Timestamp from current time in Python.
-//
-// timestamp = Timestamp()
-// timestamp.GetCurrentTime()
-//
-// # JSON Mapping
-//
-// In JSON format, the Timestamp type is encoded as a string in the
-// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
-// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
-// where {year} is always expressed using four digits while {month}, {day},
-// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
-// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
-// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
-//
-// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
-// 01:30 UTC on January 15, 2017.
-//
-// In JavaScript, one can convert a Date object to this format using the
-// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
-// method. In Python, a standard `datetime.datetime` object can be converted
-// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
-// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
-// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
-// to obtain a formatter capable of generating timestamps in this format.
-//
-//
-type Timestamp struct {
- // Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59Z inclusive.
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
- // Non-negative fractions of a second at nanosecond resolution. Negative
- // second values with fractions must still have non-negative nanos values
- // that count forward in time. Must be from 0 to 999,999,999
- // inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
-}
-
-func (m *Timestamp) Reset() { *m = Timestamp{} }
-func (m *Timestamp) String() string { return proto.CompactTextString(m) }
-func (*Timestamp) ProtoMessage() {}
-func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
-
-func (m *Timestamp) GetSeconds() int64 {
- if m != nil {
- return m.Seconds
- }
- return 0
-}
-
-func (m *Timestamp) GetNanos() int32 {
- if m != nil {
- return m.Nanos
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
-}
-
-func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 191 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d,
- 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28,
- 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5,
- 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89,
- 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x1d, 0x97, 0x70,
- 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0x99, 0x4e, 0x7c, 0x70, 0x13, 0x03, 0x40, 0x42, 0x01, 0x8c, 0x51,
- 0xda, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89,
- 0x79, 0xe9, 0x08, 0x27, 0x16, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x23, 0x5c, 0xfa, 0x83, 0x91, 0x71,
- 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xc9, 0x01, 0x50, 0xb5, 0x7a,
- 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x3d, 0x49, 0x6c, 0x60, 0x43,
- 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x77, 0x4a, 0x07, 0xf7, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
deleted file mode 100644
index b7cbd1750..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
+++ /dev/null
@@ -1,133 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/timestamp";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "TimestampProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
-//
-// # Examples
-//
-// Example 1: Compute Timestamp from POSIX `time()`.
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(time(NULL));
-// timestamp.set_nanos(0);
-//
-// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
-//
-// struct timeval tv;
-// gettimeofday(&tv, NULL);
-//
-// Timestamp timestamp;
-// timestamp.set_seconds(tv.tv_sec);
-// timestamp.set_nanos(tv.tv_usec * 1000);
-//
-// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
-//
-// FILETIME ft;
-// GetSystemTimeAsFileTime(&ft);
-// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-//
-// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
-// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
-// Timestamp timestamp;
-// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
-// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
-//
-// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
-//
-// long millis = System.currentTimeMillis();
-//
-// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
-// .setNanos((int) ((millis % 1000) * 1000000)).build();
-//
-//
-// Example 5: Compute Timestamp from current time in Python.
-//
-// timestamp = Timestamp()
-// timestamp.GetCurrentTime()
-//
-// # JSON Mapping
-//
-// In JSON format, the Timestamp type is encoded as a string in the
-// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
-// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
-// where {year} is always expressed using four digits while {month}, {day},
-// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
-// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
-// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
-//
-// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
-// 01:30 UTC on January 15, 2017.
-//
-// In JavaScript, one can convert a Date object to this format using the
-// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
-// method. In Python, a standard `datetime.datetime` object can be converted
-// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
-// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
-// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
-// to obtain a formatter capable of generating timestamps in this format.
-//
-//
-message Timestamp {
-
- // Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59Z inclusive.
- int64 seconds = 1;
-
- // Non-negative fractions of a second at nanosecond resolution. Negative
- // second values with fractions must still have non-negative nanos values
- // that count forward in time. Must be from 0 to 999,999,999
- // inclusive.
- int32 nanos = 2;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go
deleted file mode 100644
index 6e3c969b9..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go
+++ /dev/null
@@ -1,153 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2016 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-package ptypes
-
-import (
- "math"
- "testing"
- "time"
-
- "github.com/golang/protobuf/proto"
- tspb "github.com/golang/protobuf/ptypes/timestamp"
-)
-
-var tests = []struct {
- ts *tspb.Timestamp
- valid bool
- t time.Time
-}{
- // The timestamp representing the Unix epoch date.
- {&tspb.Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)},
- // The smallest representable timestamp.
- {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false,
- time.Unix(math.MinInt64, math.MinInt32).UTC()},
- // The smallest representable timestamp with non-negative nanos.
- {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()},
- // The earliest valid timestamp.
- {&tspb.Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)},
- //"0001-01-01T00:00:00Z"},
- // The largest representable timestamp.
- {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false,
- time.Unix(math.MaxInt64, math.MaxInt32).UTC()},
- // The largest representable timestamp with nanos in range.
- {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false,
- time.Unix(math.MaxInt64, 1e9-1).UTC()},
- // The largest valid timestamp.
- {&tspb.Timestamp{Seconds: maxValidSeconds - 1, Nanos: 1e9 - 1}, true,
- time.Date(9999, 12, 31, 23, 59, 59, 1e9-1, time.UTC)},
- // The smallest invalid timestamp that is larger than the valid range.
- {&tspb.Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()},
- // A date before the epoch.
- {&tspb.Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)},
- // A date after the epoch.
- {&tspb.Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)},
- // A date after the epoch, in the middle of the day.
- {&tspb.Timestamp{Seconds: 1296012345, Nanos: 940483}, true,
- time.Date(2011, 1, 26, 3, 25, 45, 940483, time.UTC)},
-}
-
-func TestValidateTimestamp(t *testing.T) {
- for _, s := range tests {
- got := validateTimestamp(s.ts)
- if (got == nil) != s.valid {
- t.Errorf("validateTimestamp(%v) = %v, want %v", s.ts, got, s.valid)
- }
- }
-}
-
-func TestTimestamp(t *testing.T) {
- for _, s := range tests {
- got, err := Timestamp(s.ts)
- if (err == nil) != s.valid {
- t.Errorf("Timestamp(%v) error = %v, but valid = %t", s.ts, err, s.valid)
- } else if s.valid && got != s.t {
- t.Errorf("Timestamp(%v) = %v, want %v", s.ts, got, s.t)
- }
- }
- // Special case: a nil Timestamp is an error, but returns the 0 Unix time.
- got, err := Timestamp(nil)
- want := time.Unix(0, 0).UTC()
- if got != want {
- t.Errorf("Timestamp(nil) = %v, want %v", got, want)
- }
- if err == nil {
- t.Errorf("Timestamp(nil) error = nil, expected error")
- }
-}
-
-func TestTimestampProto(t *testing.T) {
- for _, s := range tests {
- got, err := TimestampProto(s.t)
- if (err == nil) != s.valid {
- t.Errorf("TimestampProto(%v) error = %v, but valid = %t", s.t, err, s.valid)
- } else if s.valid && !proto.Equal(got, s.ts) {
- t.Errorf("TimestampProto(%v) = %v, want %v", s.t, got, s.ts)
- }
- }
- // No corresponding special case here: no time.Time results in a nil Timestamp.
-}
-
-func TestTimestampString(t *testing.T) {
- for _, test := range []struct {
- ts *tspb.Timestamp
- want string
- }{
- // Not much testing needed because presumably time.Format is
- // well-tested.
- {&tspb.Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"},
- {&tspb.Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: seconds:-62135596801 before 0001-01-01)"},
- } {
- got := TimestampString(test.ts)
- if got != test.want {
- t.Errorf("TimestampString(%v) = %q, want %q", test.ts, got, test.want)
- }
- }
-}
-
-func utcDate(year, month, day int) time.Time {
- return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC)
-}
-
-func TestTimestampNow(t *testing.T) {
- // Bracket the expected time.
- before := time.Now()
- ts := TimestampNow()
- after := time.Now()
-
- tm, err := Timestamp(ts)
- if err != nil {
- t.Errorf("between %v and %v\nTimestampNow() = %v\nwhich is invalid (%v)", before, after, ts, err)
- }
- if tm.Before(before) || tm.After(after) {
- t.Errorf("between %v and %v\nTimestamp(TimestampNow()) = %v", before, after, tm)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go
deleted file mode 100644
index 0ed59bf19..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go
+++ /dev/null
@@ -1,260 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/wrappers.proto
-
-/*
-Package wrappers is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/wrappers.proto
-
-It has these top-level messages:
- DoubleValue
- FloatValue
- Int64Value
- UInt64Value
- Int32Value
- UInt32Value
- BoolValue
- StringValue
- BytesValue
-*/
-package wrappers
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// Wrapper message for `double`.
-//
-// The JSON representation for `DoubleValue` is JSON number.
-type DoubleValue struct {
- // The double value.
- Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *DoubleValue) Reset() { *m = DoubleValue{} }
-func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
-func (*DoubleValue) ProtoMessage() {}
-func (*DoubleValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
-
-func (m *DoubleValue) GetValue() float64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `float`.
-//
-// The JSON representation for `FloatValue` is JSON number.
-type FloatValue struct {
- // The float value.
- Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *FloatValue) Reset() { *m = FloatValue{} }
-func (m *FloatValue) String() string { return proto.CompactTextString(m) }
-func (*FloatValue) ProtoMessage() {}
-func (*FloatValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
-
-func (m *FloatValue) GetValue() float32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `int64`.
-//
-// The JSON representation for `Int64Value` is JSON string.
-type Int64Value struct {
- // The int64 value.
- Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *Int64Value) Reset() { *m = Int64Value{} }
-func (m *Int64Value) String() string { return proto.CompactTextString(m) }
-func (*Int64Value) ProtoMessage() {}
-func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
-
-func (m *Int64Value) GetValue() int64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `uint64`.
-//
-// The JSON representation for `UInt64Value` is JSON string.
-type UInt64Value struct {
- // The uint64 value.
- Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *UInt64Value) Reset() { *m = UInt64Value{} }
-func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
-func (*UInt64Value) ProtoMessage() {}
-func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
-
-func (m *UInt64Value) GetValue() uint64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `int32`.
-//
-// The JSON representation for `Int32Value` is JSON number.
-type Int32Value struct {
- // The int32 value.
- Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *Int32Value) Reset() { *m = Int32Value{} }
-func (m *Int32Value) String() string { return proto.CompactTextString(m) }
-func (*Int32Value) ProtoMessage() {}
-func (*Int32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
-
-func (m *Int32Value) GetValue() int32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `uint32`.
-//
-// The JSON representation for `UInt32Value` is JSON number.
-type UInt32Value struct {
- // The uint32 value.
- Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *UInt32Value) Reset() { *m = UInt32Value{} }
-func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
-func (*UInt32Value) ProtoMessage() {}
-func (*UInt32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
-
-func (m *UInt32Value) GetValue() uint32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `bool`.
-//
-// The JSON representation for `BoolValue` is JSON `true` and `false`.
-type BoolValue struct {
- // The bool value.
- Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *BoolValue) Reset() { *m = BoolValue{} }
-func (m *BoolValue) String() string { return proto.CompactTextString(m) }
-func (*BoolValue) ProtoMessage() {}
-func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
-
-func (m *BoolValue) GetValue() bool {
- if m != nil {
- return m.Value
- }
- return false
-}
-
-// Wrapper message for `string`.
-//
-// The JSON representation for `StringValue` is JSON string.
-type StringValue struct {
- // The string value.
- Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
-}
-
-func (m *StringValue) Reset() { *m = StringValue{} }
-func (m *StringValue) String() string { return proto.CompactTextString(m) }
-func (*StringValue) ProtoMessage() {}
-func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
-
-func (m *StringValue) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-// Wrapper message for `bytes`.
-//
-// The JSON representation for `BytesValue` is JSON string.
-type BytesValue struct {
- // The bytes value.
- Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
-}
-
-func (m *BytesValue) Reset() { *m = BytesValue{} }
-func (m *BytesValue) String() string { return proto.CompactTextString(m) }
-func (*BytesValue) ProtoMessage() {}
-func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
-
-func (m *BytesValue) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
- proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
- proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value")
- proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value")
- proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value")
- proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value")
- proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue")
- proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
- proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
-}
-
-func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 259 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,
- 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca,
- 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c,
- 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5,
- 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13,
- 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8,
- 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca,
- 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a,
- 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x0d,
- 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x5a, 0xe8, 0x3a, 0xf1, 0x86, 0x43, 0x83, 0x3f, 0x00, 0x24,
- 0x12, 0xc0, 0x18, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f,
- 0x9e, 0x9f, 0x93, 0x98, 0x97, 0x8e, 0x88, 0xaa, 0x82, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x78, 0x8c,
- 0xfd, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e,
- 0x00, 0x54, 0xa9, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b,
- 0x12, 0x1b, 0xd8, 0x0c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6c, 0xb9, 0xb8, 0xfe,
- 0x01, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
deleted file mode 100644
index 01947639a..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
+++ /dev/null
@@ -1,118 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// Wrappers for primitive (non-message) types. These types are useful
-// for embedding primitives in the `google.protobuf.Any` type and for places
-// where we need to distinguish between the absence of a primitive
-// typed field and its default value.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/wrappers";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "WrappersProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// Wrapper message for `double`.
-//
-// The JSON representation for `DoubleValue` is JSON number.
-message DoubleValue {
- // The double value.
- double value = 1;
-}
-
-// Wrapper message for `float`.
-//
-// The JSON representation for `FloatValue` is JSON number.
-message FloatValue {
- // The float value.
- float value = 1;
-}
-
-// Wrapper message for `int64`.
-//
-// The JSON representation for `Int64Value` is JSON string.
-message Int64Value {
- // The int64 value.
- int64 value = 1;
-}
-
-// Wrapper message for `uint64`.
-//
-// The JSON representation for `UInt64Value` is JSON string.
-message UInt64Value {
- // The uint64 value.
- uint64 value = 1;
-}
-
-// Wrapper message for `int32`.
-//
-// The JSON representation for `Int32Value` is JSON number.
-message Int32Value {
- // The int32 value.
- int32 value = 1;
-}
-
-// Wrapper message for `uint32`.
-//
-// The JSON representation for `UInt32Value` is JSON number.
-message UInt32Value {
- // The uint32 value.
- uint32 value = 1;
-}
-
-// Wrapper message for `bool`.
-//
-// The JSON representation for `BoolValue` is JSON `true` and `false`.
-message BoolValue {
- // The bool value.
- bool value = 1;
-}
-
-// Wrapper message for `string`.
-//
-// The JSON representation for `StringValue` is JSON string.
-message StringValue {
- // The string value.
- string value = 1;
-}
-
-// Wrapper message for `bytes`.
-//
-// The JSON representation for `BytesValue` is JSON string.
-message BytesValue {
- // The bytes value.
- bytes value = 1;
-}
diff --git a/vendor/github.com/gorilla/context/.travis.yml b/vendor/github.com/gorilla/context/.travis.yml
index 6f440f1e4..faca4dad3 100644
--- a/vendor/github.com/gorilla/context/.travis.yml
+++ b/vendor/github.com/gorilla/context/.travis.yml
@@ -7,13 +7,13 @@ matrix:
- go: 1.4
- go: 1.5
- go: 1.6
- - go: 1.7
- - go: tip
- allow_failures:
- go: tip
+install:
+ - go get golang.org/x/tools/cmd/vet
+
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d .)
- - go vet $(go list ./... | grep -v /vendor/)
+ - go tool vet .
- go test -v -race ./...
diff --git a/vendor/github.com/gorilla/context/README.md b/vendor/github.com/gorilla/context/README.md
index 08f86693b..c60a31b05 100644
--- a/vendor/github.com/gorilla/context/README.md
+++ b/vendor/github.com/gorilla/context/README.md
@@ -4,7 +4,4 @@ context
gorilla/context is a general purpose registry for global request variables.
-> Note: gorilla/context, having been born well before `context.Context` existed, does not play well
-> with the shallow copying of the request that [`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext) (added to net/http Go 1.7 onwards) performs. You should either use *just* gorilla/context, or moving forward, the new `http.Request.Context()`.
-
Read the full documentation here: http://www.gorillatoolkit.org/pkg/context
diff --git a/vendor/github.com/gorilla/context/context_test.go b/vendor/github.com/gorilla/context/context_test.go
deleted file mode 100644
index d70e91a23..000000000
--- a/vendor/github.com/gorilla/context/context_test.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package context
-
-import (
- "net/http"
- "testing"
-)
-
-type keyType int
-
-const (
- key1 keyType = iota
- key2
-)
-
-func TestContext(t *testing.T) {
- assertEqual := func(val interface{}, exp interface{}) {
- if val != exp {
- t.Errorf("Expected %v, got %v.", exp, val)
- }
- }
-
- r, _ := http.NewRequest("GET", "http://localhost:8080/", nil)
- emptyR, _ := http.NewRequest("GET", "http://localhost:8080/", nil)
-
- // Get()
- assertEqual(Get(r, key1), nil)
-
- // Set()
- Set(r, key1, "1")
- assertEqual(Get(r, key1), "1")
- assertEqual(len(data[r]), 1)
-
- Set(r, key2, "2")
- assertEqual(Get(r, key2), "2")
- assertEqual(len(data[r]), 2)
-
- //GetOk
- value, ok := GetOk(r, key1)
- assertEqual(value, "1")
- assertEqual(ok, true)
-
- value, ok = GetOk(r, "not exists")
- assertEqual(value, nil)
- assertEqual(ok, false)
-
- Set(r, "nil value", nil)
- value, ok = GetOk(r, "nil value")
- assertEqual(value, nil)
- assertEqual(ok, true)
-
- // GetAll()
- values := GetAll(r)
- assertEqual(len(values), 3)
-
- // GetAll() for empty request
- values = GetAll(emptyR)
- if values != nil {
- t.Error("GetAll didn't return nil value for invalid request")
- }
-
- // GetAllOk()
- values, ok = GetAllOk(r)
- assertEqual(len(values), 3)
- assertEqual(ok, true)
-
- // GetAllOk() for empty request
- values, ok = GetAllOk(emptyR)
- assertEqual(len(values), 0)
- assertEqual(ok, false)
-
- // Delete()
- Delete(r, key1)
- assertEqual(Get(r, key1), nil)
- assertEqual(len(data[r]), 2)
-
- Delete(r, key2)
- assertEqual(Get(r, key2), nil)
- assertEqual(len(data[r]), 1)
-
- // Clear()
- Clear(r)
- assertEqual(len(data), 0)
-}
-
-func parallelReader(r *http.Request, key string, iterations int, wait, done chan struct{}) {
- <-wait
- for i := 0; i < iterations; i++ {
- Get(r, key)
- }
- done <- struct{}{}
-
-}
-
-func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) {
- <-wait
- for i := 0; i < iterations; i++ {
- Set(r, key, value)
- }
- done <- struct{}{}
-
-}
-
-func benchmarkMutex(b *testing.B, numReaders, numWriters, iterations int) {
-
- b.StopTimer()
- r, _ := http.NewRequest("GET", "http://localhost:8080/", nil)
- done := make(chan struct{})
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- wait := make(chan struct{})
-
- for i := 0; i < numReaders; i++ {
- go parallelReader(r, "test", iterations, wait, done)
- }
-
- for i := 0; i < numWriters; i++ {
- go parallelWriter(r, "test", "123", iterations, wait, done)
- }
-
- close(wait)
-
- for i := 0; i < numReaders+numWriters; i++ {
- <-done
- }
-
- }
-
-}
-
-func BenchmarkMutexSameReadWrite1(b *testing.B) {
- benchmarkMutex(b, 1, 1, 32)
-}
-func BenchmarkMutexSameReadWrite2(b *testing.B) {
- benchmarkMutex(b, 2, 2, 32)
-}
-func BenchmarkMutexSameReadWrite4(b *testing.B) {
- benchmarkMutex(b, 4, 4, 32)
-}
-func BenchmarkMutex1(b *testing.B) {
- benchmarkMutex(b, 2, 8, 32)
-}
-func BenchmarkMutex2(b *testing.B) {
- benchmarkMutex(b, 16, 4, 64)
-}
-func BenchmarkMutex3(b *testing.B) {
- benchmarkMutex(b, 1, 2, 128)
-}
-func BenchmarkMutex4(b *testing.B) {
- benchmarkMutex(b, 128, 32, 256)
-}
-func BenchmarkMutex5(b *testing.B) {
- benchmarkMutex(b, 1024, 2048, 64)
-}
-func BenchmarkMutex6(b *testing.B) {
- benchmarkMutex(b, 2048, 1024, 512)
-}
diff --git a/vendor/github.com/gorilla/context/doc.go b/vendor/github.com/gorilla/context/doc.go
index 448d1bfca..73c740031 100644
--- a/vendor/github.com/gorilla/context/doc.go
+++ b/vendor/github.com/gorilla/context/doc.go
@@ -5,12 +5,6 @@
/*
Package context stores values shared during a request lifetime.
-Note: gorilla/context, having been born well before `context.Context` existed,
-does not play well > with the shallow copying of the request that
-[`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext)
-(added to net/http Go 1.7 onwards) performs. You should either use *just*
-gorilla/context, or moving forward, the new `http.Request.Context()`.
-
For example, a router can set variables extracted from the URL and later
application handlers can access those values, or it can be used to store
sessions values to be saved at the end of a request. There are several
diff --git a/vendor/github.com/gorilla/handlers/canonical_test.go b/vendor/github.com/gorilla/handlers/canonical_test.go
deleted file mode 100644
index 615e4b056..000000000
--- a/vendor/github.com/gorilla/handlers/canonical_test.go
+++ /dev/null
@@ -1,127 +0,0 @@
-package handlers
-
-import (
- "bufio"
- "bytes"
- "log"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strings"
- "testing"
-)
-
-func TestCleanHost(t *testing.T) {
- tests := []struct {
- in, want string
- }{
- {"www.google.com", "www.google.com"},
- {"www.google.com foo", "www.google.com"},
- {"www.google.com/foo", "www.google.com"},
- {" first character is a space", ""},
- }
- for _, tt := range tests {
- got := cleanHost(tt.in)
- if tt.want != got {
- t.Errorf("cleanHost(%q) = %q, want %q", tt.in, got, tt.want)
- }
- }
-}
-
-func TestCanonicalHost(t *testing.T) {
- gorilla := "http://www.gorillatoolkit.org"
-
- rr := httptest.NewRecorder()
- r := newRequest("GET", "http://www.example.com/")
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- // Test a re-direct: should return a 302 Found.
- CanonicalHost(gorilla, http.StatusFound)(testHandler).ServeHTTP(rr, r)
-
- if rr.Code != http.StatusFound {
- t.Fatalf("bad status: got %v want %v", rr.Code, http.StatusFound)
- }
-
- if rr.Header().Get("Location") != gorilla+r.URL.Path {
- t.Fatalf("bad re-direct: got %q want %q", rr.Header().Get("Location"), gorilla+r.URL.Path)
- }
-
-}
-
-func TestKeepsQueryString(t *testing.T) {
- google := "https://www.google.com"
-
- rr := httptest.NewRecorder()
- querystring := url.Values{"q": {"golang"}, "format": {"json"}}.Encode()
- r := newRequest("GET", "http://www.example.com/search?"+querystring)
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
- CanonicalHost(google, http.StatusFound)(testHandler).ServeHTTP(rr, r)
-
- want := google + r.URL.Path + "?" + querystring
- if rr.Header().Get("Location") != want {
- t.Fatalf("bad re-direct: got %q want %q", rr.Header().Get("Location"), want)
- }
-}
-
-func TestBadDomain(t *testing.T) {
- rr := httptest.NewRecorder()
- r := newRequest("GET", "http://www.example.com/")
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- // Test a bad domain - should return 200 OK.
- CanonicalHost("%", http.StatusFound)(testHandler).ServeHTTP(rr, r)
-
- if rr.Code != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", rr.Code, http.StatusOK)
- }
-}
-
-func TestEmptyHost(t *testing.T) {
- rr := httptest.NewRecorder()
- r := newRequest("GET", "http://www.example.com/")
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- // Test a domain that returns an empty url.Host from url.Parse.
- CanonicalHost("hello.com", http.StatusFound)(testHandler).ServeHTTP(rr, r)
-
- if rr.Code != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", rr.Code, http.StatusOK)
- }
-}
-
-func TestHeaderWrites(t *testing.T) {
- gorilla := "http://www.gorillatoolkit.org"
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(200)
- })
-
- // Catch the log output to ensure we don't write multiple headers.
- var b bytes.Buffer
- buf := bufio.NewWriter(&b)
- tl := log.New(buf, "test: ", log.Lshortfile)
-
- srv := httptest.NewServer(
- CanonicalHost(gorilla, http.StatusFound)(testHandler))
- defer srv.Close()
- srv.Config.ErrorLog = tl
-
- _, err := http.Get(srv.URL)
- if err != nil {
- t.Fatal(err)
- }
-
- err = buf.Flush()
- if err != nil {
- t.Fatal(err)
- }
-
- // We rely on the error not changing: net/http does not export it.
- if strings.Contains(b.String(), "multiple response.WriteHeader calls") {
- t.Fatalf("re-direct did not return early: multiple header writes")
- }
-}
diff --git a/vendor/github.com/gorilla/handlers/compress_test.go b/vendor/github.com/gorilla/handlers/compress_test.go
deleted file mode 100644
index 6f07f440d..000000000
--- a/vendor/github.com/gorilla/handlers/compress_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2013 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package handlers
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
- "net/http/httptest"
- "strconv"
- "testing"
-)
-
-var contentType = "text/plain; charset=utf-8"
-
-func compressedRequest(w *httptest.ResponseRecorder, compression string) {
- CompressHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Length", strconv.Itoa(9*1024))
- w.Header().Set("Content-Type", contentType)
- for i := 0; i < 1024; i++ {
- io.WriteString(w, "Gorilla!\n")
- }
- })).ServeHTTP(w, &http.Request{
- Method: "GET",
- Header: http.Header{
- "Accept-Encoding": []string{compression},
- },
- })
-
-}
-
-func TestCompressHandlerNoCompression(t *testing.T) {
- w := httptest.NewRecorder()
- compressedRequest(w, "")
- if enc := w.HeaderMap.Get("Content-Encoding"); enc != "" {
- t.Errorf("wrong content encoding, got %q want %q", enc, "")
- }
- if ct := w.HeaderMap.Get("Content-Type"); ct != contentType {
- t.Errorf("wrong content type, got %q want %q", ct, contentType)
- }
- if w.Body.Len() != 1024*9 {
- t.Errorf("wrong len, got %d want %d", w.Body.Len(), 1024*9)
- }
- if l := w.HeaderMap.Get("Content-Length"); l != "9216" {
- t.Errorf("wrong content-length. got %q expected %d", l, 1024*9)
- }
-}
-
-func TestCompressHandlerGzip(t *testing.T) {
- w := httptest.NewRecorder()
- compressedRequest(w, "gzip")
- if w.HeaderMap.Get("Content-Encoding") != "gzip" {
- t.Errorf("wrong content encoding, got %q want %q", w.HeaderMap.Get("Content-Encoding"), "gzip")
- }
- if w.HeaderMap.Get("Content-Type") != "text/plain; charset=utf-8" {
- t.Errorf("wrong content type, got %s want %s", w.HeaderMap.Get("Content-Type"), "text/plain; charset=utf-8")
- }
- if w.Body.Len() != 72 {
- t.Errorf("wrong len, got %d want %d", w.Body.Len(), 72)
- }
- if l := w.HeaderMap.Get("Content-Length"); l != "" {
- t.Errorf("wrong content-length. got %q expected %q", l, "")
- }
-}
-
-func TestCompressHandlerDeflate(t *testing.T) {
- w := httptest.NewRecorder()
- compressedRequest(w, "deflate")
- if w.HeaderMap.Get("Content-Encoding") != "deflate" {
- t.Fatalf("wrong content encoding, got %q want %q", w.HeaderMap.Get("Content-Encoding"), "deflate")
- }
- if w.HeaderMap.Get("Content-Type") != "text/plain; charset=utf-8" {
- t.Fatalf("wrong content type, got %s want %s", w.HeaderMap.Get("Content-Type"), "text/plain; charset=utf-8")
- }
- if w.Body.Len() != 54 {
- t.Fatalf("wrong len, got %d want %d", w.Body.Len(), 54)
- }
-}
-
-func TestCompressHandlerGzipDeflate(t *testing.T) {
- w := httptest.NewRecorder()
- compressedRequest(w, "gzip, deflate ")
- if w.HeaderMap.Get("Content-Encoding") != "gzip" {
- t.Fatalf("wrong content encoding, got %q want %q", w.HeaderMap.Get("Content-Encoding"), "gzip")
- }
- if w.HeaderMap.Get("Content-Type") != "text/plain; charset=utf-8" {
- t.Fatalf("wrong content type, got %s want %s", w.HeaderMap.Get("Content-Type"), "text/plain; charset=utf-8")
- }
-}
-
-type fullyFeaturedResponseWriter struct{}
-
-// Header/Write/WriteHeader implement the http.ResponseWriter interface.
-func (fullyFeaturedResponseWriter) Header() http.Header {
- return http.Header{}
-}
-func (fullyFeaturedResponseWriter) Write([]byte) (int, error) {
- return 0, nil
-}
-func (fullyFeaturedResponseWriter) WriteHeader(int) {}
-
-// Flush implements the http.Flusher interface.
-func (fullyFeaturedResponseWriter) Flush() {}
-
-// Hijack implements the http.Hijacker interface.
-func (fullyFeaturedResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- return nil, nil, nil
-}
-
-// CloseNotify implements the http.CloseNotifier interface.
-func (fullyFeaturedResponseWriter) CloseNotify() <-chan bool {
- return nil
-}
-
-func TestCompressHandlerPreserveInterfaces(t *testing.T) {
- // Compile time validation fullyFeaturedResponseWriter implements all the
- // interfaces we're asserting in the test case below.
- var (
- _ http.Flusher = fullyFeaturedResponseWriter{}
- _ http.CloseNotifier = fullyFeaturedResponseWriter{}
- _ http.Hijacker = fullyFeaturedResponseWriter{}
- )
- var h http.Handler = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- comp := r.Header.Get("Accept-Encoding")
- if _, ok := rw.(*compressResponseWriter); !ok {
- t.Fatalf("ResponseWriter wasn't wrapped by compressResponseWriter, got %T type", rw)
- }
- if _, ok := rw.(http.Flusher); !ok {
- t.Errorf("ResponseWriter lost http.Flusher interface for %q", comp)
- }
- if _, ok := rw.(http.CloseNotifier); !ok {
- t.Errorf("ResponseWriter lost http.CloseNotifier interface for %q", comp)
- }
- if _, ok := rw.(http.Hijacker); !ok {
- t.Errorf("ResponseWriter lost http.Hijacker interface for %q", comp)
- }
- })
- h = CompressHandler(h)
- var (
- rw fullyFeaturedResponseWriter
- )
- r, err := http.NewRequest("GET", "/", nil)
- if err != nil {
- t.Fatalf("Failed to create test request: %v", err)
- }
- r.Header.Set("Accept-Encoding", "gzip")
- h.ServeHTTP(rw, r)
-
- r.Header.Set("Accept-Encoding", "deflate")
- h.ServeHTTP(rw, r)
-}
diff --git a/vendor/github.com/gorilla/handlers/cors_test.go b/vendor/github.com/gorilla/handlers/cors_test.go
deleted file mode 100644
index 61eb18f77..000000000
--- a/vendor/github.com/gorilla/handlers/cors_test.go
+++ /dev/null
@@ -1,371 +0,0 @@
-package handlers
-
-import (
- "net/http"
- "net/http/httptest"
- "strings"
- "testing"
-)
-
-func TestDefaultCORSHandlerReturnsOk(t *testing.T) {
- r := newRequest("GET", "http://www.example.com/")
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusFound)
- }
-}
-
-func TestDefaultCORSHandlerReturnsOkWithOrigin(t *testing.T) {
- r := newRequest("GET", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusFound)
- }
-}
-
-func TestCORSHandlerIgnoreOptionsFallsThrough(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusTeapot)
- })
-
- CORS(IgnoreOptions())(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusTeapot {
- t.Fatalf("bad status: got %v want %v", status, http.StatusTeapot)
- }
-}
-
-func TestCORSHandlerSetsExposedHeaders(t *testing.T) {
- // Test default configuration.
- r := newRequest("GET", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(ExposedHeaders([]string{"X-CORS-TEST"}))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsExposeHeadersHeader)
- if header != "X-Cors-Test" {
- t.Fatal("bad header: expected X-Cors-Test header, got empty header for method.")
- }
-}
-
-func TestCORSHandlerUnsetRequestMethodForPreflightBadRequest(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(AllowedMethods([]string{"DELETE"}))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusBadRequest {
- t.Fatalf("bad status: got %v want %v", status, http.StatusBadRequest)
- }
-}
-
-func TestCORSHandlerInvalidRequestMethodForPreflightMethodNotAllowed(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "DELETE")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusMethodNotAllowed {
- t.Fatalf("bad status: got %v want %v", status, http.StatusMethodNotAllowed)
- }
-}
-
-func TestCORSHandlerOptionsRequestMustNotBePassedToNextHandler(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "GET")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- t.Fatal("Options request must not be passed to next handler")
- })
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-}
-
-func TestCORSHandlerAllowedMethodForPreflight(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "DELETE")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(AllowedMethods([]string{"DELETE"}))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsAllowMethodsHeader)
- if header != "DELETE" {
- t.Fatalf("bad header: expected DELETE method header, got empty header.")
- }
-}
-
-func TestCORSHandlerAllowMethodsNotSetForSimpleRequestPreflight(t *testing.T) {
- for _, method := range defaultCorsMethods {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, method)
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsAllowMethodsHeader)
- if header != "" {
- t.Fatalf("bad header: expected empty method header, got %s.", header)
- }
- }
-}
-
-func TestCORSHandlerAllowedHeaderNotSetForSimpleRequestPreflight(t *testing.T) {
- for _, simpleHeader := range defaultCorsHeaders {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "GET")
- r.Header.Set(corsRequestHeadersHeader, simpleHeader)
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsAllowHeadersHeader)
- if header != "" {
- t.Fatalf("bad header: expected empty header, got %s.", header)
- }
- }
-}
-
-func TestCORSHandlerAllowedHeaderForPreflight(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "POST")
- r.Header.Set(corsRequestHeadersHeader, "Content-Type")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(AllowedHeaders([]string{"Content-Type"}))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsAllowHeadersHeader)
- if header != "Content-Type" {
- t.Fatalf("bad header: expected Content-Type header, got empty header.")
- }
-}
-
-func TestCORSHandlerInvalidHeaderForPreflightForbidden(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "POST")
- r.Header.Set(corsRequestHeadersHeader, "Content-Type")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusForbidden {
- t.Fatalf("bad status: got %v want %v", status, http.StatusForbidden)
- }
-}
-
-func TestCORSHandlerMaxAgeForPreflight(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "POST")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(MaxAge(3500))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsMaxAgeHeader)
- if header != "600" {
- t.Fatalf("bad header: expected %s to be %s, got %s.", corsMaxAgeHeader, "600", header)
- }
-}
-
-func TestCORSHandlerAllowedCredentials(t *testing.T) {
- r := newRequest("GET", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(AllowCredentials())(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsAllowCredentialsHeader)
- if header != "true" {
- t.Fatalf("bad header: expected %s to be %s, got %s.", corsAllowCredentialsHeader, "true", header)
- }
-}
-
-func TestCORSHandlerMultipleAllowOriginsSetsVaryHeader(t *testing.T) {
- r := newRequest("GET", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- CORS(AllowedOrigins([]string{r.URL.String(), "http://google.com"}))(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-
- header := rr.HeaderMap.Get(corsVaryHeader)
- if header != corsOriginHeader {
- t.Fatalf("bad header: expected %s to be %s, got %s.", corsVaryHeader, corsOriginHeader, header)
- }
-}
-
-func TestCORSWithMultipleHandlers(t *testing.T) {
- var lastHandledBy string
- corsMiddleware := CORS()
-
- testHandler1 := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- lastHandledBy = "testHandler1"
- })
- testHandler2 := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- lastHandledBy = "testHandler2"
- })
-
- r1 := newRequest("GET", "http://www.example.com/")
- rr1 := httptest.NewRecorder()
- handler1 := corsMiddleware(testHandler1)
-
- corsMiddleware(testHandler2)
-
- handler1.ServeHTTP(rr1, r1)
- if lastHandledBy != "testHandler1" {
- t.Fatalf("bad CORS() registration: Handler served should be Handler registered")
- }
-}
-
-func TestCORSHandlerWithCustomValidator(t *testing.T) {
- r := newRequest("GET", "http://a.example.com")
- r.Header.Set("Origin", r.URL.String())
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
-
- originValidator := func(origin string) bool {
- if strings.HasSuffix(origin, ".example.com") {
- return true
- }
- return false
- }
-
- // Specially craft a CORS object.
- handleFunc := func(h http.Handler) http.Handler {
- c := &cors{
- allowedMethods: defaultCorsMethods,
- allowedHeaders: defaultCorsHeaders,
- allowedOrigins: []string{"http://a.example.com"},
- h: h,
- }
- AllowedOriginValidator(originValidator)(c)
- return c
- }
-
- handleFunc(testHandler).ServeHTTP(rr, r)
- header := rr.HeaderMap.Get(corsAllowOriginHeader)
- if header != r.URL.String() {
- t.Fatalf("bad header: expected %s to be %s, got %s.", corsAllowOriginHeader, r.URL.String(), header)
- }
-
-}
-
-func TestCORSAllowStar(t *testing.T) {
- r := newRequest("GET", "http://a.example.com")
- r.Header.Set("Origin", r.URL.String())
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
- originValidator := func(origin string) bool {
- if strings.HasSuffix(origin, ".example.com") {
- return true
- }
- return false
- }
-
- CORS(AllowedOriginValidator(originValidator))(testHandler).ServeHTTP(rr, r)
- header := rr.HeaderMap.Get(corsAllowOriginHeader)
- // Because * is the default CORS policy (which is safe), we should be
- // expect a * returned here as the Access Control Allow Origin header
- if header != "*" {
- t.Fatalf("bad header: expected %s to be %s, got %s.", corsAllowOriginHeader, r.URL.String(), header)
- }
-
-}
diff --git a/vendor/github.com/gorilla/handlers/handlers_go18_test.go b/vendor/github.com/gorilla/handlers/handlers_go18_test.go
deleted file mode 100644
index c8cfa722f..000000000
--- a/vendor/github.com/gorilla/handlers/handlers_go18_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// +build go1.8
-
-package handlers
-
-import (
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-func TestLoggingHandlerWithPush(t *testing.T) {
- handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if _, ok := w.(http.Pusher); !ok {
- t.Fatalf("%T from LoggingHandler does not satisfy http.Pusher interface when built with Go >=1.8", w)
- }
- w.WriteHeader(200)
- })
-
- logger := LoggingHandler(ioutil.Discard, handler)
- logger.ServeHTTP(httptest.NewRecorder(), newRequest("GET", "/"))
-}
-
-func TestCombinedLoggingHandlerWithPush(t *testing.T) {
- handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if _, ok := w.(http.Pusher); !ok {
- t.Fatalf("%T from CombinedLoggingHandler does not satisfy http.Pusher interface when built with Go >=1.8", w)
- }
- w.WriteHeader(200)
- })
-
- logger := CombinedLoggingHandler(ioutil.Discard, handler)
- logger.ServeHTTP(httptest.NewRecorder(), newRequest("GET", "/"))
-}
diff --git a/vendor/github.com/gorilla/handlers/handlers_test.go b/vendor/github.com/gorilla/handlers/handlers_test.go
deleted file mode 100644
index 04ee24497..000000000
--- a/vendor/github.com/gorilla/handlers/handlers_test.go
+++ /dev/null
@@ -1,378 +0,0 @@
-// Copyright 2013 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package handlers
-
-import (
- "bytes"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strings"
- "testing"
- "time"
-)
-
-const (
- ok = "ok\n"
- notAllowed = "Method not allowed\n"
-)
-
-var okHandler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- w.Write([]byte(ok))
-})
-
-func newRequest(method, url string) *http.Request {
- req, err := http.NewRequest(method, url, nil)
- if err != nil {
- panic(err)
- }
- return req
-}
-
-func TestMethodHandler(t *testing.T) {
- tests := []struct {
- req *http.Request
- handler http.Handler
- code int
- allow string // Contents of the Allow header
- body string
- }{
- // No handlers
- {newRequest("GET", "/foo"), MethodHandler{}, http.StatusMethodNotAllowed, "", notAllowed},
- {newRequest("OPTIONS", "/foo"), MethodHandler{}, http.StatusOK, "", ""},
-
- // A single handler
- {newRequest("GET", "/foo"), MethodHandler{"GET": okHandler}, http.StatusOK, "", ok},
- {newRequest("POST", "/foo"), MethodHandler{"GET": okHandler}, http.StatusMethodNotAllowed, "GET", notAllowed},
-
- // Multiple handlers
- {newRequest("GET", "/foo"), MethodHandler{"GET": okHandler, "POST": okHandler}, http.StatusOK, "", ok},
- {newRequest("POST", "/foo"), MethodHandler{"GET": okHandler, "POST": okHandler}, http.StatusOK, "", ok},
- {newRequest("DELETE", "/foo"), MethodHandler{"GET": okHandler, "POST": okHandler}, http.StatusMethodNotAllowed, "GET, POST", notAllowed},
- {newRequest("OPTIONS", "/foo"), MethodHandler{"GET": okHandler, "POST": okHandler}, http.StatusOK, "GET, POST", ""},
-
- // Override OPTIONS
- {newRequest("OPTIONS", "/foo"), MethodHandler{"OPTIONS": okHandler}, http.StatusOK, "", ok},
- }
-
- for i, test := range tests {
- rec := httptest.NewRecorder()
- test.handler.ServeHTTP(rec, test.req)
- if rec.Code != test.code {
- t.Fatalf("%d: wrong code, got %d want %d", i, rec.Code, test.code)
- }
- if allow := rec.HeaderMap.Get("Allow"); allow != test.allow {
- t.Fatalf("%d: wrong Allow, got %s want %s", i, allow, test.allow)
- }
- if body := rec.Body.String(); body != test.body {
- t.Fatalf("%d: wrong body, got %q want %q", i, body, test.body)
- }
- }
-}
-
-func TestMakeLogger(t *testing.T) {
- rec := httptest.NewRecorder()
- logger := makeLogger(rec)
- // initial status
- if logger.Status() != http.StatusOK {
- t.Fatalf("wrong status, got %d want %d", logger.Status(), http.StatusOK)
- }
- // WriteHeader
- logger.WriteHeader(http.StatusInternalServerError)
- if logger.Status() != http.StatusInternalServerError {
- t.Fatalf("wrong status, got %d want %d", logger.Status(), http.StatusInternalServerError)
- }
- // Write
- logger.Write([]byte(ok))
- if logger.Size() != len(ok) {
- t.Fatalf("wrong size, got %d want %d", logger.Size(), len(ok))
- }
- // Header
- logger.Header().Set("key", "value")
- if val := logger.Header().Get("key"); val != "value" {
- t.Fatalf("wrong header, got %s want %s", val, "value")
- }
-}
-
-func TestWriteLog(t *testing.T) {
- loc, err := time.LoadLocation("Europe/Warsaw")
- if err != nil {
- panic(err)
- }
- ts := time.Date(1983, 05, 26, 3, 30, 45, 0, loc)
-
- // A typical request with an OK response
- req := newRequest("GET", "http://example.com")
- req.RemoteAddr = "192.168.100.5"
-
- buf := new(bytes.Buffer)
- writeLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log := buf.String()
-
- expected := "192.168.100.5 - - [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 200 100\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // CONNECT request over http/2.0
- req = &http.Request{
- Method: "CONNECT",
- Proto: "HTTP/2.0",
- ProtoMajor: 2,
- ProtoMinor: 0,
- URL: &url.URL{Host: "www.example.com:443"},
- Host: "www.example.com:443",
- RemoteAddr: "192.168.100.5",
- }
-
- buf = new(bytes.Buffer)
- writeLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log = buf.String()
-
- expected = "192.168.100.5 - - [26/May/1983:03:30:45 +0200] \"CONNECT www.example.com:443 HTTP/2.0\" 200 100\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // Request with an unauthorized user
- req = newRequest("GET", "http://example.com")
- req.RemoteAddr = "192.168.100.5"
- req.URL.User = url.User("kamil")
-
- buf.Reset()
- writeLog(buf, req, *req.URL, ts, http.StatusUnauthorized, 500)
- log = buf.String()
-
- expected = "192.168.100.5 - kamil [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 401 500\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // Request with url encoded parameters
- req = newRequest("GET", "http://example.com/test?abc=hello%20world&a=b%3F")
- req.RemoteAddr = "192.168.100.5"
-
- buf.Reset()
- writeLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log = buf.String()
-
- expected = "192.168.100.5 - - [26/May/1983:03:30:45 +0200] \"GET /test?abc=hello%20world&a=b%3F HTTP/1.1\" 200 100\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-}
-
-func TestWriteCombinedLog(t *testing.T) {
- loc, err := time.LoadLocation("Europe/Warsaw")
- if err != nil {
- panic(err)
- }
- ts := time.Date(1983, 05, 26, 3, 30, 45, 0, loc)
-
- // A typical request with an OK response
- req := newRequest("GET", "http://example.com")
- req.RemoteAddr = "192.168.100.5"
- req.Header.Set("Referer", "http://example.com")
- req.Header.Set(
- "User-Agent",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.33 "+
- "(KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33",
- )
-
- buf := new(bytes.Buffer)
- writeCombinedLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log := buf.String()
-
- expected := "192.168.100.5 - - [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 200 100 \"http://example.com\" " +
- "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) " +
- "AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33\"\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // CONNECT request over http/2.0
- req1 := &http.Request{
- Method: "CONNECT",
- Host: "www.example.com:443",
- Proto: "HTTP/2.0",
- ProtoMajor: 2,
- ProtoMinor: 0,
- RemoteAddr: "192.168.100.5",
- Header: http.Header{},
- URL: &url.URL{Host: "www.example.com:443"},
- }
- req1.Header.Set("Referer", "http://example.com")
- req1.Header.Set(
- "User-Agent",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.33 "+
- "(KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33",
- )
-
- buf = new(bytes.Buffer)
- writeCombinedLog(buf, req1, *req1.URL, ts, http.StatusOK, 100)
- log = buf.String()
-
- expected = "192.168.100.5 - - [26/May/1983:03:30:45 +0200] \"CONNECT www.example.com:443 HTTP/2.0\" 200 100 \"http://example.com\" " +
- "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) " +
- "AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33\"\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // Request with an unauthorized user
- req.URL.User = url.User("kamil")
-
- buf.Reset()
- writeCombinedLog(buf, req, *req.URL, ts, http.StatusUnauthorized, 500)
- log = buf.String()
-
- expected = "192.168.100.5 - kamil [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 401 500 \"http://example.com\" " +
- "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) " +
- "AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33\"\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // Test with remote ipv6 address
- req.RemoteAddr = "::1"
-
- buf.Reset()
- writeCombinedLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log = buf.String()
-
- expected = "::1 - kamil [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 200 100 \"http://example.com\" " +
- "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) " +
- "AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33\"\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-
- // Test remote ipv6 addr, with port
- req.RemoteAddr = net.JoinHostPort("::1", "65000")
-
- buf.Reset()
- writeCombinedLog(buf, req, *req.URL, ts, http.StatusOK, 100)
- log = buf.String()
-
- expected = "::1 - kamil [26/May/1983:03:30:45 +0200] \"GET / HTTP/1.1\" 200 100 \"http://example.com\" " +
- "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) " +
- "AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33\"\n"
- if log != expected {
- t.Fatalf("wrong log, got %q want %q", log, expected)
- }
-}
-
-func TestLogPathRewrites(t *testing.T) {
- var buf bytes.Buffer
-
- handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- req.URL.Path = "/" // simulate http.StripPrefix and friends
- w.WriteHeader(200)
- })
- logger := LoggingHandler(&buf, handler)
-
- logger.ServeHTTP(httptest.NewRecorder(), newRequest("GET", "/subdir/asdf"))
-
- if !strings.Contains(buf.String(), "GET /subdir/asdf HTTP") {
- t.Fatalf("Got log %#v, wanted substring %#v", buf.String(), "GET /subdir/asdf HTTP")
- }
-}
-
-func BenchmarkWriteLog(b *testing.B) {
- loc, err := time.LoadLocation("Europe/Warsaw")
- if err != nil {
- b.Fatalf(err.Error())
- }
- ts := time.Date(1983, 05, 26, 3, 30, 45, 0, loc)
-
- req := newRequest("GET", "http://example.com")
- req.RemoteAddr = "192.168.100.5"
-
- b.ResetTimer()
-
- buf := &bytes.Buffer{}
- for i := 0; i < b.N; i++ {
- buf.Reset()
- writeLog(buf, req, *req.URL, ts, http.StatusUnauthorized, 500)
- }
-}
-
-func TestContentTypeHandler(t *testing.T) {
- tests := []struct {
- Method string
- AllowContentTypes []string
- ContentType string
- Code int
- }{
- {"POST", []string{"application/json"}, "application/json", http.StatusOK},
- {"POST", []string{"application/json", "application/xml"}, "application/json", http.StatusOK},
- {"POST", []string{"application/json"}, "application/json; charset=utf-8", http.StatusOK},
- {"POST", []string{"application/json"}, "application/json+xxx", http.StatusUnsupportedMediaType},
- {"POST", []string{"application/json"}, "text/plain", http.StatusUnsupportedMediaType},
- {"GET", []string{"application/json"}, "", http.StatusOK},
- {"GET", []string{}, "", http.StatusOK},
- }
- for _, test := range tests {
- r, err := http.NewRequest(test.Method, "/", nil)
- if err != nil {
- t.Error(err)
- continue
- }
-
- h := ContentTypeHandler(okHandler, test.AllowContentTypes...)
- r.Header.Set("Content-Type", test.ContentType)
- w := httptest.NewRecorder()
- h.ServeHTTP(w, r)
- if w.Code != test.Code {
- t.Errorf("expected %d, got %d", test.Code, w.Code)
- }
- }
-}
-
-func TestHTTPMethodOverride(t *testing.T) {
- var tests = []struct {
- Method string
- OverrideMethod string
- ExpectedMethod string
- }{
- {"POST", "PUT", "PUT"},
- {"POST", "PATCH", "PATCH"},
- {"POST", "DELETE", "DELETE"},
- {"PUT", "DELETE", "PUT"},
- {"GET", "GET", "GET"},
- {"HEAD", "HEAD", "HEAD"},
- {"GET", "PUT", "GET"},
- {"HEAD", "DELETE", "HEAD"},
- }
-
- for _, test := range tests {
- h := HTTPMethodOverrideHandler(okHandler)
- reqs := make([]*http.Request, 0, 2)
-
- rHeader, err := http.NewRequest(test.Method, "/", nil)
- if err != nil {
- t.Error(err)
- }
- rHeader.Header.Set(HTTPMethodOverrideHeader, test.OverrideMethod)
- reqs = append(reqs, rHeader)
-
- f := url.Values{HTTPMethodOverrideFormKey: []string{test.OverrideMethod}}
- rForm, err := http.NewRequest(test.Method, "/", strings.NewReader(f.Encode()))
- if err != nil {
- t.Error(err)
- }
- rForm.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- reqs = append(reqs, rForm)
-
- for _, r := range reqs {
- w := httptest.NewRecorder()
- h.ServeHTTP(w, r)
- if r.Method != test.ExpectedMethod {
- t.Errorf("Expected %s, got %s", test.ExpectedMethod, r.Method)
- }
- }
- }
-}
diff --git a/vendor/github.com/gorilla/handlers/proxy_headers_test.go b/vendor/github.com/gorilla/handlers/proxy_headers_test.go
deleted file mode 100644
index 1bd78052d..000000000
--- a/vendor/github.com/gorilla/handlers/proxy_headers_test.go
+++ /dev/null
@@ -1,111 +0,0 @@
-package handlers
-
-import (
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-type headerTable struct {
- key string // header key
- val string // header val
- expected string // expected result
-}
-
-func TestGetIP(t *testing.T) {
- headers := []headerTable{
- {xForwardedFor, "8.8.8.8", "8.8.8.8"}, // Single address
- {xForwardedFor, "8.8.8.8, 8.8.4.4", "8.8.8.8"}, // Multiple
- {xForwardedFor, "[2001:db8:cafe::17]:4711", "[2001:db8:cafe::17]:4711"}, // IPv6 address
- {xForwardedFor, "", ""}, // None
- {xRealIP, "8.8.8.8", "8.8.8.8"}, // Single address
- {xRealIP, "8.8.8.8, 8.8.4.4", "8.8.8.8, 8.8.4.4"}, // Multiple
- {xRealIP, "[2001:db8:cafe::17]:4711", "[2001:db8:cafe::17]:4711"}, // IPv6 address
- {xRealIP, "", ""}, // None
- {forwarded, `for="_gazonk"`, "_gazonk"}, // Hostname
- {forwarded, `For="[2001:db8:cafe::17]:4711`, `[2001:db8:cafe::17]:4711`}, // IPv6 address
- {forwarded, `for=192.0.2.60;proto=http;by=203.0.113.43`, `192.0.2.60`}, // Multiple params
- {forwarded, `for=192.0.2.43, for=198.51.100.17`, "192.0.2.43"}, // Multiple params
- {forwarded, `for="workstation.local",for=198.51.100.17`, "workstation.local"}, // Hostname
- }
-
- for _, v := range headers {
- req := &http.Request{
- Header: http.Header{
- v.key: []string{v.val},
- }}
- res := getIP(req)
- if res != v.expected {
- t.Fatalf("wrong header for %s: got %s want %s", v.key, res,
- v.expected)
- }
- }
-}
-
-func TestGetScheme(t *testing.T) {
- headers := []headerTable{
- {xForwardedProto, "https", "https"},
- {xForwardedProto, "http", "http"},
- {xForwardedProto, "HTTP", "http"},
- {xForwardedScheme, "https", "https"},
- {xForwardedScheme, "http", "http"},
- {xForwardedScheme, "HTTP", "http"},
- {forwarded, `For="[2001:db8:cafe::17]:4711`, ""}, // No proto
- {forwarded, `for=192.0.2.43, for=198.51.100.17;proto=https`, "https"}, // Multiple params before proto
- {forwarded, `for=172.32.10.15; proto=https;by=127.0.0.1`, "https"}, // Space before proto
- {forwarded, `for=192.0.2.60;proto=http;by=203.0.113.43`, "http"}, // Multiple params
- }
-
- for _, v := range headers {
- req := &http.Request{
- Header: http.Header{
- v.key: []string{v.val},
- },
- }
- res := getScheme(req)
- if res != v.expected {
- t.Fatalf("wrong header for %s: got %s want %s", v.key, res,
- v.expected)
- }
- }
-}
-
-// Test the middleware end-to-end
-func TestProxyHeaders(t *testing.T) {
- rr := httptest.NewRecorder()
- r := newRequest("GET", "/")
-
- r.Header.Set(xForwardedFor, "8.8.8.8")
- r.Header.Set(xForwardedProto, "https")
- r.Header.Set(xForwardedHost, "google.com")
- var (
- addr string
- proto string
- host string
- )
- ProxyHeaders(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- addr = r.RemoteAddr
- proto = r.URL.Scheme
- host = r.Host
- })).ServeHTTP(rr, r)
-
- if rr.Code != http.StatusOK {
- t.Fatalf("bad status: got %d want %d", rr.Code, http.StatusOK)
- }
-
- if addr != r.Header.Get(xForwardedFor) {
- t.Fatalf("wrong address: got %s want %s", addr,
- r.Header.Get(xForwardedFor))
- }
-
- if proto != r.Header.Get(xForwardedProto) {
- t.Fatalf("wrong address: got %s want %s", proto,
- r.Header.Get(xForwardedProto))
- }
- if host != r.Header.Get(xForwardedHost) {
- t.Fatalf("wrong address: got %s want %s", host,
- r.Header.Get(xForwardedHost))
- }
-
-}
diff --git a/vendor/github.com/gorilla/handlers/recovery_test.go b/vendor/github.com/gorilla/handlers/recovery_test.go
deleted file mode 100644
index 1ae0e5805..000000000
--- a/vendor/github.com/gorilla/handlers/recovery_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package handlers
-
-import (
- "bytes"
- "log"
- "net/http"
- "net/http/httptest"
- "strings"
- "testing"
-)
-
-func TestRecoveryLoggerWithDefaultOptions(t *testing.T) {
- var buf bytes.Buffer
- log.SetOutput(&buf)
-
- handler := RecoveryHandler()
- handlerFunc := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- panic("Unexpected error!")
- })
-
- recovery := handler(handlerFunc)
- recovery.ServeHTTP(httptest.NewRecorder(), newRequest("GET", "/subdir/asdf"))
-
- if !strings.Contains(buf.String(), "Unexpected error!") {
- t.Fatalf("Got log %#v, wanted substring %#v", buf.String(), "Unexpected error!")
- }
-}
-
-func TestRecoveryLoggerWithCustomLogger(t *testing.T) {
- var buf bytes.Buffer
- var logger = log.New(&buf, "", log.LstdFlags)
-
- handler := RecoveryHandler(RecoveryLogger(logger), PrintRecoveryStack(false))
- handlerFunc := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- panic("Unexpected error!")
- })
-
- recovery := handler(handlerFunc)
- recovery.ServeHTTP(httptest.NewRecorder(), newRequest("GET", "/subdir/asdf"))
-
- if !strings.Contains(buf.String(), "Unexpected error!") {
- t.Fatalf("Got log %#v, wanted substring %#v", buf.String(), "Unexpected error!")
- }
-}
diff --git a/vendor/github.com/gorilla/mux/bench_test.go b/vendor/github.com/gorilla/mux/bench_test.go
deleted file mode 100644
index 522156dcc..000000000
--- a/vendor/github.com/gorilla/mux/bench_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mux
-
-import (
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-func BenchmarkMux(b *testing.B) {
- router := new(Router)
- handler := func(w http.ResponseWriter, r *http.Request) {}
- router.HandleFunc("/v1/{v1}", handler)
-
- request, _ := http.NewRequest("GET", "/v1/anything", nil)
- for i := 0; i < b.N; i++ {
- router.ServeHTTP(nil, request)
- }
-}
-
-func BenchmarkMuxAlternativeInRegexp(b *testing.B) {
- router := new(Router)
- handler := func(w http.ResponseWriter, r *http.Request) {}
- router.HandleFunc("/v1/{v1:(?:a|b)}", handler)
-
- requestA, _ := http.NewRequest("GET", "/v1/a", nil)
- requestB, _ := http.NewRequest("GET", "/v1/b", nil)
- for i := 0; i < b.N; i++ {
- router.ServeHTTP(nil, requestA)
- router.ServeHTTP(nil, requestB)
- }
-}
-
-func BenchmarkManyPathVariables(b *testing.B) {
- router := new(Router)
- handler := func(w http.ResponseWriter, r *http.Request) {}
- router.HandleFunc("/v1/{v1}/{v2}/{v3}/{v4}/{v5}", handler)
-
- matchingRequest, _ := http.NewRequest("GET", "/v1/1/2/3/4/5", nil)
- notMatchingRequest, _ := http.NewRequest("GET", "/v1/1/2/3/4", nil)
- recorder := httptest.NewRecorder()
- for i := 0; i < b.N; i++ {
- router.ServeHTTP(nil, matchingRequest)
- router.ServeHTTP(recorder, notMatchingRequest)
- }
-}
diff --git a/vendor/github.com/gorilla/mux/context_gorilla_test.go b/vendor/github.com/gorilla/mux/context_gorilla_test.go
deleted file mode 100644
index ffaf384c0..000000000
--- a/vendor/github.com/gorilla/mux/context_gorilla_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// +build !go1.7
-
-package mux
-
-import (
- "net/http"
- "testing"
-
- "github.com/gorilla/context"
-)
-
-// Tests that the context is cleared or not cleared properly depending on
-// the configuration of the router
-func TestKeepContext(t *testing.T) {
- func1 := func(w http.ResponseWriter, r *http.Request) {}
-
- r := NewRouter()
- r.HandleFunc("/", func1).Name("func1")
-
- req, _ := http.NewRequest("GET", "http://localhost/", nil)
- context.Set(req, "t", 1)
-
- res := new(http.ResponseWriter)
- r.ServeHTTP(*res, req)
-
- if _, ok := context.GetOk(req, "t"); ok {
- t.Error("Context should have been cleared at end of request")
- }
-
- r.KeepContext = true
-
- req, _ = http.NewRequest("GET", "http://localhost/", nil)
- context.Set(req, "t", 1)
-
- r.ServeHTTP(*res, req)
- if _, ok := context.GetOk(req, "t"); !ok {
- t.Error("Context should NOT have been cleared at end of request")
- }
-
-}
diff --git a/vendor/github.com/gorilla/mux/context_native_test.go b/vendor/github.com/gorilla/mux/context_native_test.go
deleted file mode 100644
index c150edf01..000000000
--- a/vendor/github.com/gorilla/mux/context_native_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// +build go1.7
-
-package mux
-
-import (
- "context"
- "net/http"
- "testing"
- "time"
-)
-
-func TestNativeContextMiddleware(t *testing.T) {
- withTimeout := func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx, cancel := context.WithTimeout(r.Context(), time.Minute)
- defer cancel()
- h.ServeHTTP(w, r.WithContext(ctx))
- })
- }
-
- r := NewRouter()
- r.Handle("/path/{foo}", withTimeout(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- vars := Vars(r)
- if vars["foo"] != "bar" {
- t.Fatal("Expected foo var to be set")
- }
- })))
-
- rec := NewRecorder()
- req := newRequest("GET", "/path/bar")
- r.ServeHTTP(rec, req)
-}
diff --git a/vendor/github.com/gorilla/mux/example_route_test.go b/vendor/github.com/gorilla/mux/example_route_test.go
deleted file mode 100644
index 112557071..000000000
--- a/vendor/github.com/gorilla/mux/example_route_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package mux_test
-
-import (
- "fmt"
- "net/http"
-
- "github.com/gorilla/mux"
-)
-
-// This example demonstrates setting a regular expression matcher for
-// the header value. A plain word will match any value that contains a
-// matching substring as if the pattern was wrapped with `.*`.
-func ExampleRoute_HeadersRegexp() {
- r := mux.NewRouter()
- route := r.NewRoute().HeadersRegexp("Accept", "html")
-
- req1, _ := http.NewRequest("GET", "example.com", nil)
- req1.Header.Add("Accept", "text/plain")
- req1.Header.Add("Accept", "text/html")
-
- req2, _ := http.NewRequest("GET", "example.com", nil)
- req2.Header.Set("Accept", "application/xhtml+xml")
-
- matchInfo := &mux.RouteMatch{}
- fmt.Printf("Match: %v %q\n", route.Match(req1, matchInfo), req1.Header["Accept"])
- fmt.Printf("Match: %v %q\n", route.Match(req2, matchInfo), req2.Header["Accept"])
- // Output:
- // Match: true ["text/plain" "text/html"]
- // Match: true ["application/xhtml+xml"]
-}
-
-// This example demonstrates setting a strict regular expression matcher
-// for the header value. Using the start and end of string anchors, the
-// value must be an exact match.
-func ExampleRoute_HeadersRegexp_exactMatch() {
- r := mux.NewRouter()
- route := r.NewRoute().HeadersRegexp("Origin", "^https://example.co$")
-
- yes, _ := http.NewRequest("GET", "example.co", nil)
- yes.Header.Set("Origin", "https://example.co")
-
- no, _ := http.NewRequest("GET", "example.co.uk", nil)
- no.Header.Set("Origin", "https://example.co.uk")
-
- matchInfo := &mux.RouteMatch{}
- fmt.Printf("Match: %v %q\n", route.Match(yes, matchInfo), yes.Header["Origin"])
- fmt.Printf("Match: %v %q\n", route.Match(no, matchInfo), no.Header["Origin"])
- // Output:
- // Match: true ["https://example.co"]
- // Match: false ["https://example.co.uk"]
-}
diff --git a/vendor/github.com/gorilla/mux/middleware_test.go b/vendor/github.com/gorilla/mux/middleware_test.go
deleted file mode 100644
index 93947e8cb..000000000
--- a/vendor/github.com/gorilla/mux/middleware_test.go
+++ /dev/null
@@ -1,336 +0,0 @@
-package mux
-
-import (
- "bytes"
- "net/http"
- "testing"
-)
-
-type testMiddleware struct {
- timesCalled uint
-}
-
-func (tm *testMiddleware) Middleware(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- tm.timesCalled++
- h.ServeHTTP(w, r)
- })
-}
-
-func dummyHandler(w http.ResponseWriter, r *http.Request) {}
-
-func TestMiddlewareAdd(t *testing.T) {
- router := NewRouter()
- router.HandleFunc("/", dummyHandler).Methods("GET")
-
- mw := &testMiddleware{}
-
- router.useInterface(mw)
- if len(router.middlewares) != 1 || router.middlewares[0] != mw {
- t.Fatal("Middleware was not added correctly")
- }
-
- router.Use(mw.Middleware)
- if len(router.middlewares) != 2 {
- t.Fatal("MiddlewareFunc method was not added correctly")
- }
-
- banalMw := func(handler http.Handler) http.Handler {
- return handler
- }
- router.Use(banalMw)
- if len(router.middlewares) != 3 {
- t.Fatal("MiddlewareFunc method was not added correctly")
- }
-}
-
-func TestMiddleware(t *testing.T) {
- router := NewRouter()
- router.HandleFunc("/", dummyHandler).Methods("GET")
-
- mw := &testMiddleware{}
- router.useInterface(mw)
-
- rw := NewRecorder()
- req := newRequest("GET", "/")
-
- // Test regular middleware call
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 1 {
- t.Fatalf("Expected %d calls, but got only %d", 1, mw.timesCalled)
- }
-
- // Middleware should not be called for 404
- req = newRequest("GET", "/not/found")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 1 {
- t.Fatalf("Expected %d calls, but got only %d", 1, mw.timesCalled)
- }
-
- // Middleware should not be called if there is a method mismatch
- req = newRequest("POST", "/")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 1 {
- t.Fatalf("Expected %d calls, but got only %d", 1, mw.timesCalled)
- }
-
- // Add the middleware again as function
- router.Use(mw.Middleware)
- req = newRequest("GET", "/")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 3 {
- t.Fatalf("Expected %d calls, but got only %d", 3, mw.timesCalled)
- }
-
-}
-
-func TestMiddlewareSubrouter(t *testing.T) {
- router := NewRouter()
- router.HandleFunc("/", dummyHandler).Methods("GET")
-
- subrouter := router.PathPrefix("/sub").Subrouter()
- subrouter.HandleFunc("/x", dummyHandler).Methods("GET")
-
- mw := &testMiddleware{}
- subrouter.useInterface(mw)
-
- rw := NewRecorder()
- req := newRequest("GET", "/")
-
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 0 {
- t.Fatalf("Expected %d calls, but got only %d", 0, mw.timesCalled)
- }
-
- req = newRequest("GET", "/sub/")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 0 {
- t.Fatalf("Expected %d calls, but got only %d", 0, mw.timesCalled)
- }
-
- req = newRequest("GET", "/sub/x")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 1 {
- t.Fatalf("Expected %d calls, but got only %d", 1, mw.timesCalled)
- }
-
- req = newRequest("GET", "/sub/not/found")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 1 {
- t.Fatalf("Expected %d calls, but got only %d", 1, mw.timesCalled)
- }
-
- router.useInterface(mw)
-
- req = newRequest("GET", "/")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 2 {
- t.Fatalf("Expected %d calls, but got only %d", 2, mw.timesCalled)
- }
-
- req = newRequest("GET", "/sub/x")
- router.ServeHTTP(rw, req)
- if mw.timesCalled != 4 {
- t.Fatalf("Expected %d calls, but got only %d", 4, mw.timesCalled)
- }
-}
-
-func TestMiddlewareExecution(t *testing.T) {
- mwStr := []byte("Middleware\n")
- handlerStr := []byte("Logic\n")
-
- router := NewRouter()
- router.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- })
-
- rw := NewRecorder()
- req := newRequest("GET", "/")
-
- // Test handler-only call
- router.ServeHTTP(rw, req)
-
- if bytes.Compare(rw.Body.Bytes(), handlerStr) != 0 {
- t.Fatal("Handler response is not what it should be")
- }
-
- // Test middleware call
- rw = NewRecorder()
-
- router.Use(func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write(mwStr)
- h.ServeHTTP(w, r)
- })
- })
-
- router.ServeHTTP(rw, req)
- if bytes.Compare(rw.Body.Bytes(), append(mwStr, handlerStr...)) != 0 {
- t.Fatal("Middleware + handler response is not what it should be")
- }
-}
-
-func TestMiddlewareNotFound(t *testing.T) {
- mwStr := []byte("Middleware\n")
- handlerStr := []byte("Logic\n")
-
- router := NewRouter()
- router.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- })
- router.Use(func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write(mwStr)
- h.ServeHTTP(w, r)
- })
- })
-
- // Test not found call with default handler
- rw := NewRecorder()
- req := newRequest("GET", "/notfound")
-
- router.ServeHTTP(rw, req)
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a 404")
- }
-
- // Test not found call with custom handler
- rw = NewRecorder()
- req = newRequest("GET", "/notfound")
-
- router.NotFoundHandler = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- rw.Write([]byte("Custom 404 handler"))
- })
- router.ServeHTTP(rw, req)
-
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a custom 404")
- }
-}
-
-func TestMiddlewareMethodMismatch(t *testing.T) {
- mwStr := []byte("Middleware\n")
- handlerStr := []byte("Logic\n")
-
- router := NewRouter()
- router.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- }).Methods("GET")
-
- router.Use(func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write(mwStr)
- h.ServeHTTP(w, r)
- })
- })
-
- // Test method mismatch
- rw := NewRecorder()
- req := newRequest("POST", "/")
-
- router.ServeHTTP(rw, req)
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a method mismatch")
- }
-
- // Test not found call
- rw = NewRecorder()
- req = newRequest("POST", "/")
-
- router.MethodNotAllowedHandler = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- rw.Write([]byte("Method not allowed"))
- })
- router.ServeHTTP(rw, req)
-
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a method mismatch")
- }
-}
-
-func TestMiddlewareNotFoundSubrouter(t *testing.T) {
- mwStr := []byte("Middleware\n")
- handlerStr := []byte("Logic\n")
-
- router := NewRouter()
- router.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- })
-
- subrouter := router.PathPrefix("/sub/").Subrouter()
- subrouter.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- })
-
- router.Use(func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write(mwStr)
- h.ServeHTTP(w, r)
- })
- })
-
- // Test not found call for default handler
- rw := NewRecorder()
- req := newRequest("GET", "/sub/notfound")
-
- router.ServeHTTP(rw, req)
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a 404")
- }
-
- // Test not found call with custom handler
- rw = NewRecorder()
- req = newRequest("GET", "/sub/notfound")
-
- subrouter.NotFoundHandler = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- rw.Write([]byte("Custom 404 handler"))
- })
- router.ServeHTTP(rw, req)
-
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a custom 404")
- }
-}
-
-func TestMiddlewareMethodMismatchSubrouter(t *testing.T) {
- mwStr := []byte("Middleware\n")
- handlerStr := []byte("Logic\n")
-
- router := NewRouter()
- router.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- })
-
- subrouter := router.PathPrefix("/sub/").Subrouter()
- subrouter.HandleFunc("/", func(w http.ResponseWriter, e *http.Request) {
- w.Write(handlerStr)
- }).Methods("GET")
-
- router.Use(func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write(mwStr)
- h.ServeHTTP(w, r)
- })
- })
-
- // Test method mismatch without custom handler
- rw := NewRecorder()
- req := newRequest("POST", "/sub/")
-
- router.ServeHTTP(rw, req)
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a method mismatch")
- }
-
- // Test method mismatch with custom handler
- rw = NewRecorder()
- req = newRequest("POST", "/sub/")
-
- router.MethodNotAllowedHandler = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- rw.Write([]byte("Method not allowed"))
- })
- router.ServeHTTP(rw, req)
-
- if bytes.Contains(rw.Body.Bytes(), mwStr) {
- t.Fatal("Middleware was called for a method mismatch")
- }
-}
diff --git a/vendor/github.com/gorilla/mux/mux_test.go b/vendor/github.com/gorilla/mux/mux_test.go
deleted file mode 100644
index 9e93c9830..000000000
--- a/vendor/github.com/gorilla/mux/mux_test.go
+++ /dev/null
@@ -1,2347 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mux
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "net/http"
- "net/url"
- "reflect"
- "strings"
- "testing"
-)
-
-func (r *Route) GoString() string {
- matchers := make([]string, len(r.matchers))
- for i, m := range r.matchers {
- matchers[i] = fmt.Sprintf("%#v", m)
- }
- return fmt.Sprintf("&Route{matchers:[]matcher{%s}}", strings.Join(matchers, ", "))
-}
-
-func (r *routeRegexp) GoString() string {
- return fmt.Sprintf("&routeRegexp{template: %q, regexpType: %v, options: %v, regexp: regexp.MustCompile(%q), reverse: %q, varsN: %v, varsR: %v", r.template, r.regexpType, r.options, r.regexp.String(), r.reverse, r.varsN, r.varsR)
-}
-
-type routeTest struct {
- title string // title of the test
- route *Route // the route being tested
- request *http.Request // a request to test the route
- vars map[string]string // the expected vars of the match
- scheme string // the expected scheme of the built URL
- host string // the expected host of the built URL
- path string // the expected path of the built URL
- query string // the expected query string of the built URL
- pathTemplate string // the expected path template of the route
- hostTemplate string // the expected host template of the route
- queriesTemplate string // the expected query template of the route
- methods []string // the expected route methods
- pathRegexp string // the expected path regexp
- queriesRegexp string // the expected query regexp
- shouldMatch bool // whether the request is expected to match the route at all
- shouldRedirect bool // whether the request should result in a redirect
-}
-
-func TestHost(t *testing.T) {
- // newRequestHost a new request with a method, url, and host header
- newRequestHost := func(method, url, host string) *http.Request {
- req, err := http.NewRequest(method, url, nil)
- if err != nil {
- panic(err)
- }
- req.Host = host
- return req
- }
-
- tests := []routeTest{
- {
- title: "Host route match",
- route: new(Route).Host("aaa.bbb.ccc"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc",
- path: "",
- shouldMatch: true,
- },
- {
- title: "Host route, wrong host in request URL",
- route: new(Route).Host("aaa.bbb.ccc"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc",
- path: "",
- shouldMatch: false,
- },
- {
- title: "Host route with port, match",
- route: new(Route).Host("aaa.bbb.ccc:1234"),
- request: newRequest("GET", "http://aaa.bbb.ccc:1234/111/222/333"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc:1234",
- path: "",
- shouldMatch: true,
- },
- {
- title: "Host route with port, wrong port in request URL",
- route: new(Route).Host("aaa.bbb.ccc:1234"),
- request: newRequest("GET", "http://aaa.bbb.ccc:9999/111/222/333"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc:1234",
- path: "",
- shouldMatch: false,
- },
- {
- title: "Host route, match with host in request header",
- route: new(Route).Host("aaa.bbb.ccc"),
- request: newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc",
- path: "",
- shouldMatch: true,
- },
- {
- title: "Host route, wrong host in request header",
- route: new(Route).Host("aaa.bbb.ccc"),
- request: newRequestHost("GET", "/111/222/333", "aaa.222.ccc"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc",
- path: "",
- shouldMatch: false,
- },
- // BUG {new(Route).Host("aaa.bbb.ccc:1234"), newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc:1234"), map[string]string{}, "aaa.bbb.ccc:1234", "", true},
- {
- title: "Host route with port, wrong host in request header",
- route: new(Route).Host("aaa.bbb.ccc:1234"),
- request: newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc:9999"),
- vars: map[string]string{},
- host: "aaa.bbb.ccc:1234",
- path: "",
- shouldMatch: false,
- },
- {
- title: "Host route with pattern, match",
- route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `aaa.{v1:[a-z]{3}}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host route with pattern, additional capturing group, match",
- route: new(Route).Host("aaa.{v1:[a-z]{2}(?:b|c)}.ccc"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `aaa.{v1:[a-z]{2}(?:b|c)}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host route with pattern, wrong host in request URL",
- route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `aaa.{v1:[a-z]{3}}.ccc`,
- shouldMatch: false,
- },
- {
- title: "Host route with multiple patterns, match",
- route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}`,
- shouldMatch: true,
- },
- {
- title: "Host route with multiple patterns, wrong host in request URL",
- route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}`,
- shouldMatch: false,
- },
- {
- title: "Host route with hyphenated name and pattern, match",
- route: new(Route).Host("aaa.{v-1:[a-z]{3}}.ccc"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v-1": "bbb"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `aaa.{v-1:[a-z]{3}}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host route with hyphenated name and pattern, additional capturing group, match",
- route: new(Route).Host("aaa.{v-1:[a-z]{2}(?:b|c)}.ccc"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v-1": "bbb"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `aaa.{v-1:[a-z]{2}(?:b|c)}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host route with multiple hyphenated names and patterns, match",
- route: new(Route).Host("{v-1:[a-z]{3}}.{v-2:[a-z]{3}}.{v-3:[a-z]{3}}"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v-1": "aaa", "v-2": "bbb", "v-3": "ccc"},
- host: "aaa.bbb.ccc",
- path: "",
- hostTemplate: `{v-1:[a-z]{3}}.{v-2:[a-z]{3}}.{v-3:[a-z]{3}}`,
- shouldMatch: true,
- },
- }
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestPath(t *testing.T) {
- tests := []routeTest{
- {
- title: "Path route, match",
- route: new(Route).Path("/111/222/333"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{},
- host: "",
- path: "/111/222/333",
- shouldMatch: true,
- },
- {
- title: "Path route, match with trailing slash in request and path",
- route: new(Route).Path("/111/"),
- request: newRequest("GET", "http://localhost/111/"),
- vars: map[string]string{},
- host: "",
- path: "/111/",
- shouldMatch: true,
- },
- {
- title: "Path route, do not match with trailing slash in path",
- route: new(Route).Path("/111/"),
- request: newRequest("GET", "http://localhost/111"),
- vars: map[string]string{},
- host: "",
- path: "/111",
- pathTemplate: `/111/`,
- pathRegexp: `^/111/$`,
- shouldMatch: false,
- },
- {
- title: "Path route, do not match with trailing slash in request",
- route: new(Route).Path("/111"),
- request: newRequest("GET", "http://localhost/111/"),
- vars: map[string]string{},
- host: "",
- path: "/111/",
- pathTemplate: `/111`,
- shouldMatch: false,
- },
- {
- title: "Path route, match root with no host",
- route: new(Route).Path("/"),
- request: newRequest("GET", "/"),
- vars: map[string]string{},
- host: "",
- path: "/",
- pathTemplate: `/`,
- pathRegexp: `^/$`,
- shouldMatch: true,
- },
- {
- title: "Path route, match root with no host, App Engine format",
- route: new(Route).Path("/"),
- request: func() *http.Request {
- r := newRequest("GET", "http://localhost/")
- r.RequestURI = "/"
- return r
- }(),
- vars: map[string]string{},
- host: "",
- path: "/",
- pathTemplate: `/`,
- shouldMatch: true,
- },
- {
- title: "Path route, wrong path in request in request URL",
- route: new(Route).Path("/111/222/333"),
- request: newRequest("GET", "http://localhost/1/2/3"),
- vars: map[string]string{},
- host: "",
- path: "/111/222/333",
- shouldMatch: false,
- },
- {
- title: "Path route with pattern, match",
- route: new(Route).Path("/111/{v1:[0-9]{3}}/333"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v1": "222"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/111/{v1:[0-9]{3}}/333`,
- shouldMatch: true,
- },
- {
- title: "Path route with pattern, URL in request does not match",
- route: new(Route).Path("/111/{v1:[0-9]{3}}/333"),
- request: newRequest("GET", "http://localhost/111/aaa/333"),
- vars: map[string]string{"v1": "222"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/111/{v1:[0-9]{3}}/333`,
- pathRegexp: `^/111/(?P<v0>[0-9]{3})/333$`,
- shouldMatch: false,
- },
- {
- title: "Path route with multiple patterns, match",
- route: new(Route).Path("/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v1": "111", "v2": "222", "v3": "333"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}`,
- pathRegexp: `^/(?P<v0>[0-9]{3})/(?P<v1>[0-9]{3})/(?P<v2>[0-9]{3})$`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple patterns, URL in request does not match",
- route: new(Route).Path("/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/aaa/333"),
- vars: map[string]string{"v1": "111", "v2": "222", "v3": "333"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}`,
- pathRegexp: `^/(?P<v0>[0-9]{3})/(?P<v1>[0-9]{3})/(?P<v2>[0-9]{3})$`,
- shouldMatch: false,
- },
- {
- title: "Path route with multiple patterns with pipe, match",
- route: new(Route).Path("/{category:a|(?:b/c)}/{product}/{id:[0-9]+}"),
- request: newRequest("GET", "http://localhost/a/product_name/1"),
- vars: map[string]string{"category": "a", "product": "product_name", "id": "1"},
- host: "",
- path: "/a/product_name/1",
- pathTemplate: `/{category:a|(?:b/c)}/{product}/{id:[0-9]+}`,
- pathRegexp: `^/(?P<v0>a|(?:b/c))/(?P<v1>[^/]+)/(?P<v2>[0-9]+)$`,
- shouldMatch: true,
- },
- {
- title: "Path route with hyphenated name and pattern, match",
- route: new(Route).Path("/111/{v-1:[0-9]{3}}/333"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v-1": "222"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/111/{v-1:[0-9]{3}}/333`,
- pathRegexp: `^/111/(?P<v0>[0-9]{3})/333$`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple hyphenated names and patterns, match",
- route: new(Route).Path("/{v-1:[0-9]{3}}/{v-2:[0-9]{3}}/{v-3:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v-1": "111", "v-2": "222", "v-3": "333"},
- host: "",
- path: "/111/222/333",
- pathTemplate: `/{v-1:[0-9]{3}}/{v-2:[0-9]{3}}/{v-3:[0-9]{3}}`,
- pathRegexp: `^/(?P<v0>[0-9]{3})/(?P<v1>[0-9]{3})/(?P<v2>[0-9]{3})$`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple hyphenated names and patterns with pipe, match",
- route: new(Route).Path("/{product-category:a|(?:b/c)}/{product-name}/{product-id:[0-9]+}"),
- request: newRequest("GET", "http://localhost/a/product_name/1"),
- vars: map[string]string{"product-category": "a", "product-name": "product_name", "product-id": "1"},
- host: "",
- path: "/a/product_name/1",
- pathTemplate: `/{product-category:a|(?:b/c)}/{product-name}/{product-id:[0-9]+}`,
- pathRegexp: `^/(?P<v0>a|(?:b/c))/(?P<v1>[^/]+)/(?P<v2>[0-9]+)$`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple hyphenated names and patterns with pipe and case insensitive, match",
- route: new(Route).Path("/{type:(?i:daily|mini|variety)}-{date:\\d{4,4}-\\d{2,2}-\\d{2,2}}"),
- request: newRequest("GET", "http://localhost/daily-2016-01-01"),
- vars: map[string]string{"type": "daily", "date": "2016-01-01"},
- host: "",
- path: "/daily-2016-01-01",
- pathTemplate: `/{type:(?i:daily|mini|variety)}-{date:\d{4,4}-\d{2,2}-\d{2,2}}`,
- pathRegexp: `^/(?P<v0>(?i:daily|mini|variety))-(?P<v1>\d{4,4}-\d{2,2}-\d{2,2})$`,
- shouldMatch: true,
- },
- {
- title: "Path route with empty match right after other match",
- route: new(Route).Path(`/{v1:[0-9]*}{v2:[a-z]*}/{v3:[0-9]*}`),
- request: newRequest("GET", "http://localhost/111/222"),
- vars: map[string]string{"v1": "111", "v2": "", "v3": "222"},
- host: "",
- path: "/111/222",
- pathTemplate: `/{v1:[0-9]*}{v2:[a-z]*}/{v3:[0-9]*}`,
- pathRegexp: `^/(?P<v0>[0-9]*)(?P<v1>[a-z]*)/(?P<v2>[0-9]*)$`,
- shouldMatch: true,
- },
- {
- title: "Path route with single pattern with pipe, match",
- route: new(Route).Path("/{category:a|b/c}"),
- request: newRequest("GET", "http://localhost/a"),
- vars: map[string]string{"category": "a"},
- host: "",
- path: "/a",
- pathTemplate: `/{category:a|b/c}`,
- shouldMatch: true,
- },
- {
- title: "Path route with single pattern with pipe, match",
- route: new(Route).Path("/{category:a|b/c}"),
- request: newRequest("GET", "http://localhost/b/c"),
- vars: map[string]string{"category": "b/c"},
- host: "",
- path: "/b/c",
- pathTemplate: `/{category:a|b/c}`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple patterns with pipe, match",
- route: new(Route).Path("/{category:a|b/c}/{product}/{id:[0-9]+}"),
- request: newRequest("GET", "http://localhost/a/product_name/1"),
- vars: map[string]string{"category": "a", "product": "product_name", "id": "1"},
- host: "",
- path: "/a/product_name/1",
- pathTemplate: `/{category:a|b/c}/{product}/{id:[0-9]+}`,
- shouldMatch: true,
- },
- {
- title: "Path route with multiple patterns with pipe, match",
- route: new(Route).Path("/{category:a|b/c}/{product}/{id:[0-9]+}"),
- request: newRequest("GET", "http://localhost/b/c/product_name/1"),
- vars: map[string]string{"category": "b/c", "product": "product_name", "id": "1"},
- host: "",
- path: "/b/c/product_name/1",
- pathTemplate: `/{category:a|b/c}/{product}/{id:[0-9]+}`,
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testUseEscapedRoute(t, test)
- testRegexp(t, test)
- }
-}
-
-func TestPathPrefix(t *testing.T) {
- tests := []routeTest{
- {
- title: "PathPrefix route, match",
- route: new(Route).PathPrefix("/111"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{},
- host: "",
- path: "/111",
- shouldMatch: true,
- },
- {
- title: "PathPrefix route, match substring",
- route: new(Route).PathPrefix("/1"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{},
- host: "",
- path: "/1",
- shouldMatch: true,
- },
- {
- title: "PathPrefix route, URL prefix in request does not match",
- route: new(Route).PathPrefix("/111"),
- request: newRequest("GET", "http://localhost/1/2/3"),
- vars: map[string]string{},
- host: "",
- path: "/111",
- shouldMatch: false,
- },
- {
- title: "PathPrefix route with pattern, match",
- route: new(Route).PathPrefix("/111/{v1:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v1": "222"},
- host: "",
- path: "/111/222",
- pathTemplate: `/111/{v1:[0-9]{3}}`,
- shouldMatch: true,
- },
- {
- title: "PathPrefix route with pattern, URL prefix in request does not match",
- route: new(Route).PathPrefix("/111/{v1:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/aaa/333"),
- vars: map[string]string{"v1": "222"},
- host: "",
- path: "/111/222",
- pathTemplate: `/111/{v1:[0-9]{3}}`,
- shouldMatch: false,
- },
- {
- title: "PathPrefix route with multiple patterns, match",
- route: new(Route).PathPrefix("/{v1:[0-9]{3}}/{v2:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/222/333"),
- vars: map[string]string{"v1": "111", "v2": "222"},
- host: "",
- path: "/111/222",
- pathTemplate: `/{v1:[0-9]{3}}/{v2:[0-9]{3}}`,
- shouldMatch: true,
- },
- {
- title: "PathPrefix route with multiple patterns, URL prefix in request does not match",
- route: new(Route).PathPrefix("/{v1:[0-9]{3}}/{v2:[0-9]{3}}"),
- request: newRequest("GET", "http://localhost/111/aaa/333"),
- vars: map[string]string{"v1": "111", "v2": "222"},
- host: "",
- path: "/111/222",
- pathTemplate: `/{v1:[0-9]{3}}/{v2:[0-9]{3}}`,
- shouldMatch: false,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testUseEscapedRoute(t, test)
- }
-}
-
-func TestSchemeHostPath(t *testing.T) {
- tests := []routeTest{
- {
- title: "Host and Path route, match",
- route: new(Route).Host("aaa.bbb.ccc").Path("/111/222/333"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/222/333`,
- hostTemplate: `aaa.bbb.ccc`,
- shouldMatch: true,
- },
- {
- title: "Scheme, Host, and Path route, match",
- route: new(Route).Schemes("https").Host("aaa.bbb.ccc").Path("/111/222/333"),
- request: newRequest("GET", "https://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{},
- scheme: "https",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/222/333`,
- hostTemplate: `aaa.bbb.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host and Path route, wrong host in request URL",
- route: new(Route).Host("aaa.bbb.ccc").Path("/111/222/333"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/222/333`,
- hostTemplate: `aaa.bbb.ccc`,
- shouldMatch: false,
- },
- {
- title: "Host and Path route with pattern, match",
- route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc").Path("/111/{v2:[0-9]{3}}/333"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb", "v2": "222"},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/{v2:[0-9]{3}}/333`,
- hostTemplate: `aaa.{v1:[a-z]{3}}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Scheme, Host, and Path route with host and path patterns, match",
- route: new(Route).Schemes("ftp", "ssss").Host("aaa.{v1:[a-z]{3}}.ccc").Path("/111/{v2:[0-9]{3}}/333"),
- request: newRequest("GET", "ssss://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb", "v2": "222"},
- scheme: "ftp",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/{v2:[0-9]{3}}/333`,
- hostTemplate: `aaa.{v1:[a-z]{3}}.ccc`,
- shouldMatch: true,
- },
- {
- title: "Host and Path route with pattern, URL in request does not match",
- route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc").Path("/111/{v2:[0-9]{3}}/333"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{"v1": "bbb", "v2": "222"},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/111/{v2:[0-9]{3}}/333`,
- hostTemplate: `aaa.{v1:[a-z]{3}}.ccc`,
- shouldMatch: false,
- },
- {
- title: "Host and Path route with multiple patterns, match",
- route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}").Path("/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}"),
- request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc", "v4": "111", "v5": "222", "v6": "333"},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}`,
- hostTemplate: `{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}`,
- shouldMatch: true,
- },
- {
- title: "Host and Path route with multiple patterns, URL in request does not match",
- route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}").Path("/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}"),
- request: newRequest("GET", "http://aaa.222.ccc/111/222/333"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc", "v4": "111", "v5": "222", "v6": "333"},
- scheme: "http",
- host: "aaa.bbb.ccc",
- path: "/111/222/333",
- pathTemplate: `/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}`,
- hostTemplate: `{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}`,
- shouldMatch: false,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testUseEscapedRoute(t, test)
- }
-}
-
-func TestHeaders(t *testing.T) {
- // newRequestHeaders creates a new request with a method, url, and headers
- newRequestHeaders := func(method, url string, headers map[string]string) *http.Request {
- req, err := http.NewRequest(method, url, nil)
- if err != nil {
- panic(err)
- }
- for k, v := range headers {
- req.Header.Add(k, v)
- }
- return req
- }
-
- tests := []routeTest{
- {
- title: "Headers route, match",
- route: new(Route).Headers("foo", "bar", "baz", "ding"),
- request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar", "baz": "ding"}),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: true,
- },
- {
- title: "Headers route, bad header values",
- route: new(Route).Headers("foo", "bar", "baz", "ding"),
- request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar", "baz": "dong"}),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: false,
- },
- {
- title: "Headers route, regex header values to match",
- route: new(Route).Headers("foo", "ba[zr]"),
- request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar"}),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: false,
- },
- {
- title: "Headers route, regex header values to match",
- route: new(Route).HeadersRegexp("foo", "ba[zr]"),
- request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "baz"}),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestMethods(t *testing.T) {
- tests := []routeTest{
- {
- title: "Methods route, match GET",
- route: new(Route).Methods("GET", "POST"),
- request: newRequest("GET", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- methods: []string{"GET", "POST"},
- shouldMatch: true,
- },
- {
- title: "Methods route, match POST",
- route: new(Route).Methods("GET", "POST"),
- request: newRequest("POST", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- methods: []string{"GET", "POST"},
- shouldMatch: true,
- },
- {
- title: "Methods route, bad method",
- route: new(Route).Methods("GET", "POST"),
- request: newRequest("PUT", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- methods: []string{"GET", "POST"},
- shouldMatch: false,
- },
- {
- title: "Route without methods",
- route: new(Route),
- request: newRequest("PUT", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- methods: []string{},
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testMethods(t, test)
- }
-}
-
-func TestQueries(t *testing.T) {
- tests := []routeTest{
- {
- title: "Queries route, match",
- route: new(Route).Queries("foo", "bar", "baz", "ding"),
- request: newRequest("GET", "http://localhost?foo=bar&baz=ding"),
- vars: map[string]string{},
- host: "",
- path: "",
- query: "foo=bar&baz=ding",
- queriesTemplate: "foo=bar,baz=ding",
- queriesRegexp: "^foo=bar$,^baz=ding$",
- shouldMatch: true,
- },
- {
- title: "Queries route, match with a query string",
- route: new(Route).Host("www.example.com").Path("/api").Queries("foo", "bar", "baz", "ding"),
- request: newRequest("GET", "http://www.example.com/api?foo=bar&baz=ding"),
- vars: map[string]string{},
- host: "",
- path: "",
- query: "foo=bar&baz=ding",
- pathTemplate: `/api`,
- hostTemplate: `www.example.com`,
- queriesTemplate: "foo=bar,baz=ding",
- queriesRegexp: "^foo=bar$,^baz=ding$",
- shouldMatch: true,
- },
- {
- title: "Queries route, match with a query string out of order",
- route: new(Route).Host("www.example.com").Path("/api").Queries("foo", "bar", "baz", "ding"),
- request: newRequest("GET", "http://www.example.com/api?baz=ding&foo=bar"),
- vars: map[string]string{},
- host: "",
- path: "",
- query: "foo=bar&baz=ding",
- pathTemplate: `/api`,
- hostTemplate: `www.example.com`,
- queriesTemplate: "foo=bar,baz=ding",
- queriesRegexp: "^foo=bar$,^baz=ding$",
- shouldMatch: true,
- },
- {
- title: "Queries route, bad query",
- route: new(Route).Queries("foo", "bar", "baz", "ding"),
- request: newRequest("GET", "http://localhost?foo=bar&baz=dong"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo=bar,baz=ding",
- queriesRegexp: "^foo=bar$,^baz=ding$",
- shouldMatch: false,
- },
- {
- title: "Queries route with pattern, match",
- route: new(Route).Queries("foo", "{v1}"),
- request: newRequest("GET", "http://localhost?foo=bar"),
- vars: map[string]string{"v1": "bar"},
- host: "",
- path: "",
- query: "foo=bar",
- queriesTemplate: "foo={v1}",
- queriesRegexp: "^foo=(?P<v0>.*)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with multiple patterns, match",
- route: new(Route).Queries("foo", "{v1}", "baz", "{v2}"),
- request: newRequest("GET", "http://localhost?foo=bar&baz=ding"),
- vars: map[string]string{"v1": "bar", "v2": "ding"},
- host: "",
- path: "",
- query: "foo=bar&baz=ding",
- queriesTemplate: "foo={v1},baz={v2}",
- queriesRegexp: "^foo=(?P<v0>.*)$,^baz=(?P<v0>.*)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with regexp pattern, match",
- route: new(Route).Queries("foo", "{v1:[0-9]+}"),
- request: newRequest("GET", "http://localhost?foo=10"),
- vars: map[string]string{"v1": "10"},
- host: "",
- path: "",
- query: "foo=10",
- queriesTemplate: "foo={v1:[0-9]+}",
- queriesRegexp: "^foo=(?P<v0>[0-9]+)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with regexp pattern, regexp does not match",
- route: new(Route).Queries("foo", "{v1:[0-9]+}"),
- request: newRequest("GET", "http://localhost?foo=a"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo={v1:[0-9]+}",
- queriesRegexp: "^foo=(?P<v0>[0-9]+)$",
- shouldMatch: false,
- },
- {
- title: "Queries route with regexp pattern with quantifier, match",
- route: new(Route).Queries("foo", "{v1:[0-9]{1}}"),
- request: newRequest("GET", "http://localhost?foo=1"),
- vars: map[string]string{"v1": "1"},
- host: "",
- path: "",
- query: "foo=1",
- queriesTemplate: "foo={v1:[0-9]{1}}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1})$",
- shouldMatch: true,
- },
- {
- title: "Queries route with regexp pattern with quantifier, additional variable in query string, match",
- route: new(Route).Queries("foo", "{v1:[0-9]{1}}"),
- request: newRequest("GET", "http://localhost?bar=2&foo=1"),
- vars: map[string]string{"v1": "1"},
- host: "",
- path: "",
- query: "foo=1",
- queriesTemplate: "foo={v1:[0-9]{1}}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1})$",
- shouldMatch: true,
- },
- {
- title: "Queries route with regexp pattern with quantifier, regexp does not match",
- route: new(Route).Queries("foo", "{v1:[0-9]{1}}"),
- request: newRequest("GET", "http://localhost?foo=12"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo={v1:[0-9]{1}}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1})$",
- shouldMatch: false,
- },
- {
- title: "Queries route with regexp pattern with quantifier, additional capturing group",
- route: new(Route).Queries("foo", "{v1:[0-9]{1}(?:a|b)}"),
- request: newRequest("GET", "http://localhost?foo=1a"),
- vars: map[string]string{"v1": "1a"},
- host: "",
- path: "",
- query: "foo=1a",
- queriesTemplate: "foo={v1:[0-9]{1}(?:a|b)}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1}(?:a|b))$",
- shouldMatch: true,
- },
- {
- title: "Queries route with regexp pattern with quantifier, additional variable in query string, regexp does not match",
- route: new(Route).Queries("foo", "{v1:[0-9]{1}}"),
- request: newRequest("GET", "http://localhost?foo=12"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo={v1:[0-9]{1}}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1})$",
- shouldMatch: false,
- },
- {
- title: "Queries route with hyphenated name, match",
- route: new(Route).Queries("foo", "{v-1}"),
- request: newRequest("GET", "http://localhost?foo=bar"),
- vars: map[string]string{"v-1": "bar"},
- host: "",
- path: "",
- query: "foo=bar",
- queriesTemplate: "foo={v-1}",
- queriesRegexp: "^foo=(?P<v0>.*)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with multiple hyphenated names, match",
- route: new(Route).Queries("foo", "{v-1}", "baz", "{v-2}"),
- request: newRequest("GET", "http://localhost?foo=bar&baz=ding"),
- vars: map[string]string{"v-1": "bar", "v-2": "ding"},
- host: "",
- path: "",
- query: "foo=bar&baz=ding",
- queriesTemplate: "foo={v-1},baz={v-2}",
- queriesRegexp: "^foo=(?P<v0>.*)$,^baz=(?P<v0>.*)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with hyphenate name and pattern, match",
- route: new(Route).Queries("foo", "{v-1:[0-9]+}"),
- request: newRequest("GET", "http://localhost?foo=10"),
- vars: map[string]string{"v-1": "10"},
- host: "",
- path: "",
- query: "foo=10",
- queriesTemplate: "foo={v-1:[0-9]+}",
- queriesRegexp: "^foo=(?P<v0>[0-9]+)$",
- shouldMatch: true,
- },
- {
- title: "Queries route with hyphenated name and pattern with quantifier, additional capturing group",
- route: new(Route).Queries("foo", "{v-1:[0-9]{1}(?:a|b)}"),
- request: newRequest("GET", "http://localhost?foo=1a"),
- vars: map[string]string{"v-1": "1a"},
- host: "",
- path: "",
- query: "foo=1a",
- queriesTemplate: "foo={v-1:[0-9]{1}(?:a|b)}",
- queriesRegexp: "^foo=(?P<v0>[0-9]{1}(?:a|b))$",
- shouldMatch: true,
- },
- {
- title: "Queries route with empty value, should match",
- route: new(Route).Queries("foo", ""),
- request: newRequest("GET", "http://localhost?foo=bar"),
- vars: map[string]string{},
- host: "",
- path: "",
- query: "foo=",
- queriesTemplate: "foo=",
- queriesRegexp: "^foo=.*$",
- shouldMatch: true,
- },
- {
- title: "Queries route with empty value and no parameter in request, should not match",
- route: new(Route).Queries("foo", ""),
- request: newRequest("GET", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo=",
- queriesRegexp: "^foo=.*$",
- shouldMatch: false,
- },
- {
- title: "Queries route with empty value and empty parameter in request, should match",
- route: new(Route).Queries("foo", ""),
- request: newRequest("GET", "http://localhost?foo="),
- vars: map[string]string{},
- host: "",
- path: "",
- query: "foo=",
- queriesTemplate: "foo=",
- queriesRegexp: "^foo=.*$",
- shouldMatch: true,
- },
- {
- title: "Queries route with overlapping value, should not match",
- route: new(Route).Queries("foo", "bar"),
- request: newRequest("GET", "http://localhost?foo=barfoo"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo=bar",
- queriesRegexp: "^foo=bar$",
- shouldMatch: false,
- },
- {
- title: "Queries route with no parameter in request, should not match",
- route: new(Route).Queries("foo", "{bar}"),
- request: newRequest("GET", "http://localhost"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo={bar}",
- queriesRegexp: "^foo=(?P<v0>.*)$",
- shouldMatch: false,
- },
- {
- title: "Queries route with empty parameter in request, should match",
- route: new(Route).Queries("foo", "{bar}"),
- request: newRequest("GET", "http://localhost?foo="),
- vars: map[string]string{"foo": ""},
- host: "",
- path: "",
- query: "foo=",
- queriesTemplate: "foo={bar}",
- queriesRegexp: "^foo=(?P<v0>.*)$",
- shouldMatch: true,
- },
- {
- title: "Queries route, bad submatch",
- route: new(Route).Queries("foo", "bar", "baz", "ding"),
- request: newRequest("GET", "http://localhost?fffoo=bar&baz=dingggg"),
- vars: map[string]string{},
- host: "",
- path: "",
- queriesTemplate: "foo=bar,baz=ding",
- queriesRegexp: "^foo=bar$,^baz=ding$",
- shouldMatch: false,
- },
- {
- title: "Queries route with pattern, match, escaped value",
- route: new(Route).Queries("foo", "{v1}"),
- request: newRequest("GET", "http://localhost?foo=%25bar%26%20%2F%3D%3F"),
- vars: map[string]string{"v1": "%bar& /=?"},
- host: "",
- path: "",
- query: "foo=%25bar%26+%2F%3D%3F",
- queriesTemplate: "foo={v1}",
- queriesRegexp: "^foo=(?P<v0>.*)$",
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testQueriesTemplates(t, test)
- testUseEscapedRoute(t, test)
- testQueriesRegexp(t, test)
- }
-}
-
-func TestSchemes(t *testing.T) {
- tests := []routeTest{
- // Schemes
- {
- title: "Schemes route, default scheme, match http, build http",
- route: new(Route).Host("localhost"),
- request: newRequest("GET", "http://localhost"),
- scheme: "http",
- host: "localhost",
- shouldMatch: true,
- },
- {
- title: "Schemes route, match https, build https",
- route: new(Route).Schemes("https", "ftp").Host("localhost"),
- request: newRequest("GET", "https://localhost"),
- scheme: "https",
- host: "localhost",
- shouldMatch: true,
- },
- {
- title: "Schemes route, match ftp, build https",
- route: new(Route).Schemes("https", "ftp").Host("localhost"),
- request: newRequest("GET", "ftp://localhost"),
- scheme: "https",
- host: "localhost",
- shouldMatch: true,
- },
- {
- title: "Schemes route, match ftp, build ftp",
- route: new(Route).Schemes("ftp", "https").Host("localhost"),
- request: newRequest("GET", "ftp://localhost"),
- scheme: "ftp",
- host: "localhost",
- shouldMatch: true,
- },
- {
- title: "Schemes route, bad scheme",
- route: new(Route).Schemes("https", "ftp").Host("localhost"),
- request: newRequest("GET", "http://localhost"),
- scheme: "https",
- host: "localhost",
- shouldMatch: false,
- },
- }
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestMatcherFunc(t *testing.T) {
- m := func(r *http.Request, m *RouteMatch) bool {
- if r.URL.Host == "aaa.bbb.ccc" {
- return true
- }
- return false
- }
-
- tests := []routeTest{
- {
- title: "MatchFunc route, match",
- route: new(Route).MatcherFunc(m),
- request: newRequest("GET", "http://aaa.bbb.ccc"),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: true,
- },
- {
- title: "MatchFunc route, non-match",
- route: new(Route).MatcherFunc(m),
- request: newRequest("GET", "http://aaa.222.ccc"),
- vars: map[string]string{},
- host: "",
- path: "",
- shouldMatch: false,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestBuildVarsFunc(t *testing.T) {
- tests := []routeTest{
- {
- title: "BuildVarsFunc set on route",
- route: new(Route).Path(`/111/{v1:\d}{v2:.*}`).BuildVarsFunc(func(vars map[string]string) map[string]string {
- vars["v1"] = "3"
- vars["v2"] = "a"
- return vars
- }),
- request: newRequest("GET", "http://localhost/111/2"),
- path: "/111/3a",
- pathTemplate: `/111/{v1:\d}{v2:.*}`,
- shouldMatch: true,
- },
- {
- title: "BuildVarsFunc set on route and parent route",
- route: new(Route).PathPrefix(`/{v1:\d}`).BuildVarsFunc(func(vars map[string]string) map[string]string {
- vars["v1"] = "2"
- return vars
- }).Subrouter().Path(`/{v2:\w}`).BuildVarsFunc(func(vars map[string]string) map[string]string {
- vars["v2"] = "b"
- return vars
- }),
- request: newRequest("GET", "http://localhost/1/a"),
- path: "/2/b",
- pathTemplate: `/{v1:\d}/{v2:\w}`,
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestSubRouter(t *testing.T) {
- subrouter1 := new(Route).Host("{v1:[a-z]+}.google.com").Subrouter()
- subrouter2 := new(Route).PathPrefix("/foo/{v1}").Subrouter()
- subrouter3 := new(Route).PathPrefix("/foo").Subrouter()
- subrouter4 := new(Route).PathPrefix("/foo/bar").Subrouter()
- subrouter5 := new(Route).PathPrefix("/{category}").Subrouter()
-
- tests := []routeTest{
- {
- route: subrouter1.Path("/{v2:[a-z]+}"),
- request: newRequest("GET", "http://aaa.google.com/bbb"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb"},
- host: "aaa.google.com",
- path: "/bbb",
- pathTemplate: `/{v2:[a-z]+}`,
- hostTemplate: `{v1:[a-z]+}.google.com`,
- shouldMatch: true,
- },
- {
- route: subrouter1.Path("/{v2:[a-z]+}"),
- request: newRequest("GET", "http://111.google.com/111"),
- vars: map[string]string{"v1": "aaa", "v2": "bbb"},
- host: "aaa.google.com",
- path: "/bbb",
- pathTemplate: `/{v2:[a-z]+}`,
- hostTemplate: `{v1:[a-z]+}.google.com`,
- shouldMatch: false,
- },
- {
- route: subrouter2.Path("/baz/{v2}"),
- request: newRequest("GET", "http://localhost/foo/bar/baz/ding"),
- vars: map[string]string{"v1": "bar", "v2": "ding"},
- host: "",
- path: "/foo/bar/baz/ding",
- pathTemplate: `/foo/{v1}/baz/{v2}`,
- shouldMatch: true,
- },
- {
- route: subrouter2.Path("/baz/{v2}"),
- request: newRequest("GET", "http://localhost/foo/bar"),
- vars: map[string]string{"v1": "bar", "v2": "ding"},
- host: "",
- path: "/foo/bar/baz/ding",
- pathTemplate: `/foo/{v1}/baz/{v2}`,
- shouldMatch: false,
- },
- {
- route: subrouter3.Path("/"),
- request: newRequest("GET", "http://localhost/foo/"),
- vars: map[string]string{},
- host: "",
- path: "/foo/",
- pathTemplate: `/foo/`,
- shouldMatch: true,
- },
- {
- route: subrouter3.Path(""),
- request: newRequest("GET", "http://localhost/foo"),
- vars: map[string]string{},
- host: "",
- path: "/foo",
- pathTemplate: `/foo`,
- shouldMatch: true,
- },
-
- {
- route: subrouter4.Path("/"),
- request: newRequest("GET", "http://localhost/foo/bar/"),
- vars: map[string]string{},
- host: "",
- path: "/foo/bar/",
- pathTemplate: `/foo/bar/`,
- shouldMatch: true,
- },
- {
- route: subrouter4.Path(""),
- request: newRequest("GET", "http://localhost/foo/bar"),
- vars: map[string]string{},
- host: "",
- path: "/foo/bar",
- pathTemplate: `/foo/bar`,
- shouldMatch: true,
- },
- {
- route: subrouter5.Path("/"),
- request: newRequest("GET", "http://localhost/baz/"),
- vars: map[string]string{"category": "baz"},
- host: "",
- path: "/baz/",
- pathTemplate: `/{category}/`,
- shouldMatch: true,
- },
- {
- route: subrouter5.Path(""),
- request: newRequest("GET", "http://localhost/baz"),
- vars: map[string]string{"category": "baz"},
- host: "",
- path: "/baz",
- pathTemplate: `/{category}`,
- shouldMatch: true,
- },
- {
- title: "Build with scheme on parent router",
- route: new(Route).Schemes("ftp").Host("google.com").Subrouter().Path("/"),
- request: newRequest("GET", "ftp://google.com/"),
- scheme: "ftp",
- host: "google.com",
- path: "/",
- pathTemplate: `/`,
- hostTemplate: `google.com`,
- shouldMatch: true,
- },
- {
- title: "Prefer scheme on child route when building URLs",
- route: new(Route).Schemes("https", "ftp").Host("google.com").Subrouter().Schemes("ftp").Path("/"),
- request: newRequest("GET", "ftp://google.com/"),
- scheme: "ftp",
- host: "google.com",
- path: "/",
- pathTemplate: `/`,
- hostTemplate: `google.com`,
- shouldMatch: true,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testUseEscapedRoute(t, test)
- }
-}
-
-func TestNamedRoutes(t *testing.T) {
- r1 := NewRouter()
- r1.NewRoute().Name("a")
- r1.NewRoute().Name("b")
- r1.NewRoute().Name("c")
-
- r2 := r1.NewRoute().Subrouter()
- r2.NewRoute().Name("d")
- r2.NewRoute().Name("e")
- r2.NewRoute().Name("f")
-
- r3 := r2.NewRoute().Subrouter()
- r3.NewRoute().Name("g")
- r3.NewRoute().Name("h")
- r3.NewRoute().Name("i")
-
- if r1.namedRoutes == nil || len(r1.namedRoutes) != 9 {
- t.Errorf("Expected 9 named routes, got %v", r1.namedRoutes)
- } else if r1.Get("i") == nil {
- t.Errorf("Subroute name not registered")
- }
-}
-
-func TestStrictSlash(t *testing.T) {
- r := NewRouter()
- r.StrictSlash(true)
-
- tests := []routeTest{
- {
- title: "Redirect path without slash",
- route: r.NewRoute().Path("/111/"),
- request: newRequest("GET", "http://localhost/111"),
- vars: map[string]string{},
- host: "",
- path: "/111/",
- shouldMatch: true,
- shouldRedirect: true,
- },
- {
- title: "Do not redirect path with slash",
- route: r.NewRoute().Path("/111/"),
- request: newRequest("GET", "http://localhost/111/"),
- vars: map[string]string{},
- host: "",
- path: "/111/",
- shouldMatch: true,
- shouldRedirect: false,
- },
- {
- title: "Redirect path with slash",
- route: r.NewRoute().Path("/111"),
- request: newRequest("GET", "http://localhost/111/"),
- vars: map[string]string{},
- host: "",
- path: "/111",
- shouldMatch: true,
- shouldRedirect: true,
- },
- {
- title: "Do not redirect path without slash",
- route: r.NewRoute().Path("/111"),
- request: newRequest("GET", "http://localhost/111"),
- vars: map[string]string{},
- host: "",
- path: "/111",
- shouldMatch: true,
- shouldRedirect: false,
- },
- {
- title: "Propagate StrictSlash to subrouters",
- route: r.NewRoute().PathPrefix("/static/").Subrouter().Path("/images/"),
- request: newRequest("GET", "http://localhost/static/images"),
- vars: map[string]string{},
- host: "",
- path: "/static/images/",
- shouldMatch: true,
- shouldRedirect: true,
- },
- {
- title: "Ignore StrictSlash for path prefix",
- route: r.NewRoute().PathPrefix("/static/"),
- request: newRequest("GET", "http://localhost/static/logo.png"),
- vars: map[string]string{},
- host: "",
- path: "/static/",
- shouldMatch: true,
- shouldRedirect: false,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- testUseEscapedRoute(t, test)
- }
-}
-
-func TestUseEncodedPath(t *testing.T) {
- r := NewRouter()
- r.UseEncodedPath()
-
- tests := []routeTest{
- {
- title: "Router with useEncodedPath, URL with encoded slash does match",
- route: r.NewRoute().Path("/v1/{v1}/v2"),
- request: newRequest("GET", "http://localhost/v1/1%2F2/v2"),
- vars: map[string]string{"v1": "1%2F2"},
- host: "",
- path: "/v1/1%2F2/v2",
- pathTemplate: `/v1/{v1}/v2`,
- shouldMatch: true,
- },
- {
- title: "Router with useEncodedPath, URL with encoded slash doesn't match",
- route: r.NewRoute().Path("/v1/1/2/v2"),
- request: newRequest("GET", "http://localhost/v1/1%2F2/v2"),
- vars: map[string]string{"v1": "1%2F2"},
- host: "",
- path: "/v1/1%2F2/v2",
- pathTemplate: `/v1/1/2/v2`,
- shouldMatch: false,
- },
- }
-
- for _, test := range tests {
- testRoute(t, test)
- testTemplate(t, test)
- }
-}
-
-func TestWalkSingleDepth(t *testing.T) {
- r0 := NewRouter()
- r1 := NewRouter()
- r2 := NewRouter()
-
- r0.Path("/g")
- r0.Path("/o")
- r0.Path("/d").Handler(r1)
- r0.Path("/r").Handler(r2)
- r0.Path("/a")
-
- r1.Path("/z")
- r1.Path("/i")
- r1.Path("/l")
- r1.Path("/l")
-
- r2.Path("/i")
- r2.Path("/l")
- r2.Path("/l")
-
- paths := []string{"g", "o", "r", "i", "l", "l", "a"}
- depths := []int{0, 0, 0, 1, 1, 1, 0}
- i := 0
- err := r0.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- matcher := route.matchers[0].(*routeRegexp)
- if matcher.template == "/d" {
- return SkipRouter
- }
- if len(ancestors) != depths[i] {
- t.Errorf(`Expected depth of %d at i = %d; got "%d"`, depths[i], i, len(ancestors))
- }
- if matcher.template != "/"+paths[i] {
- t.Errorf(`Expected "/%s" at i = %d; got "%s"`, paths[i], i, matcher.template)
- }
- i++
- return nil
- })
- if err != nil {
- panic(err)
- }
- if i != len(paths) {
- t.Errorf("Expected %d routes, found %d", len(paths), i)
- }
-}
-
-func TestWalkNested(t *testing.T) {
- router := NewRouter()
-
- g := router.Path("/g").Subrouter()
- o := g.PathPrefix("/o").Subrouter()
- r := o.PathPrefix("/r").Subrouter()
- i := r.PathPrefix("/i").Subrouter()
- l1 := i.PathPrefix("/l").Subrouter()
- l2 := l1.PathPrefix("/l").Subrouter()
- l2.Path("/a")
-
- testCases := []struct {
- path string
- ancestors []*Route
- }{
- {"/g", []*Route{}},
- {"/g/o", []*Route{g.parent.(*Route)}},
- {"/g/o/r", []*Route{g.parent.(*Route), o.parent.(*Route)}},
- {"/g/o/r/i", []*Route{g.parent.(*Route), o.parent.(*Route), r.parent.(*Route)}},
- {"/g/o/r/i/l", []*Route{g.parent.(*Route), o.parent.(*Route), r.parent.(*Route), i.parent.(*Route)}},
- {"/g/o/r/i/l/l", []*Route{g.parent.(*Route), o.parent.(*Route), r.parent.(*Route), i.parent.(*Route), l1.parent.(*Route)}},
- {"/g/o/r/i/l/l/a", []*Route{g.parent.(*Route), o.parent.(*Route), r.parent.(*Route), i.parent.(*Route), l1.parent.(*Route), l2.parent.(*Route)}},
- }
-
- idx := 0
- err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- path := testCases[idx].path
- tpl := route.regexp.path.template
- if tpl != path {
- t.Errorf(`Expected %s got %s`, path, tpl)
- }
- currWantAncestors := testCases[idx].ancestors
- if !reflect.DeepEqual(currWantAncestors, ancestors) {
- t.Errorf(`Expected %+v got %+v`, currWantAncestors, ancestors)
- }
- idx++
- return nil
- })
- if err != nil {
- panic(err)
- }
- if idx != len(testCases) {
- t.Errorf("Expected %d routes, found %d", len(testCases), idx)
- }
-}
-
-func TestWalkSubrouters(t *testing.T) {
- router := NewRouter()
-
- g := router.Path("/g").Subrouter()
- o := g.PathPrefix("/o").Subrouter()
- o.Methods("GET")
- o.Methods("PUT")
-
- // all 4 routes should be matched, but final 2 routes do not have path templates
- paths := []string{"/g", "/g/o", "", ""}
- idx := 0
- err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- path := paths[idx]
- tpl, _ := route.GetPathTemplate()
- if tpl != path {
- t.Errorf(`Expected %s got %s`, path, tpl)
- }
- idx++
- return nil
- })
- if err != nil {
- panic(err)
- }
- if idx != len(paths) {
- t.Errorf("Expected %d routes, found %d", len(paths), idx)
- }
-}
-
-func TestWalkErrorRoute(t *testing.T) {
- router := NewRouter()
- router.Path("/g")
- expectedError := errors.New("error")
- err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- return expectedError
- })
- if err != expectedError {
- t.Errorf("Expected %v routes, found %v", expectedError, err)
- }
-}
-
-func TestWalkErrorMatcher(t *testing.T) {
- router := NewRouter()
- expectedError := router.Path("/g").Subrouter().Path("").GetError()
- err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- return route.GetError()
- })
- if err != expectedError {
- t.Errorf("Expected %v routes, found %v", expectedError, err)
- }
-}
-
-func TestWalkErrorHandler(t *testing.T) {
- handler := NewRouter()
- expectedError := handler.Path("/path").Subrouter().Path("").GetError()
- router := NewRouter()
- router.Path("/g").Handler(handler)
- err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error {
- return route.GetError()
- })
- if err != expectedError {
- t.Errorf("Expected %v routes, found %v", expectedError, err)
- }
-}
-
-func TestSubrouterErrorHandling(t *testing.T) {
- superRouterCalled := false
- subRouterCalled := false
-
- router := NewRouter()
- router.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- superRouterCalled = true
- })
- subRouter := router.PathPrefix("/bign8").Subrouter()
- subRouter.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- subRouterCalled = true
- })
-
- req, _ := http.NewRequest("GET", "http://localhost/bign8/was/here", nil)
- router.ServeHTTP(NewRecorder(), req)
-
- if superRouterCalled {
- t.Error("Super router 404 handler called when sub-router 404 handler is available.")
- }
- if !subRouterCalled {
- t.Error("Sub-router 404 handler was not called.")
- }
-}
-
-// See: https://github.com/gorilla/mux/issues/200
-func TestPanicOnCapturingGroups(t *testing.T) {
- defer func() {
- if recover() == nil {
- t.Errorf("(Test that capturing groups now fail fast) Expected panic, however test completed successfully.\n")
- }
- }()
- NewRouter().NewRoute().Path("/{type:(promo|special)}/{promoId}.json")
-}
-
-// ----------------------------------------------------------------------------
-// Helpers
-// ----------------------------------------------------------------------------
-
-func getRouteTemplate(route *Route) string {
- host, err := route.GetHostTemplate()
- if err != nil {
- host = "none"
- }
- path, err := route.GetPathTemplate()
- if err != nil {
- path = "none"
- }
- return fmt.Sprintf("Host: %v, Path: %v", host, path)
-}
-
-func testRoute(t *testing.T, test routeTest) {
- request := test.request
- route := test.route
- vars := test.vars
- shouldMatch := test.shouldMatch
- query := test.query
- shouldRedirect := test.shouldRedirect
- uri := url.URL{
- Scheme: test.scheme,
- Host: test.host,
- Path: test.path,
- }
- if uri.Scheme == "" {
- uri.Scheme = "http"
- }
-
- var match RouteMatch
- ok := route.Match(request, &match)
- if ok != shouldMatch {
- msg := "Should match"
- if !shouldMatch {
- msg = "Should not match"
- }
- t.Errorf("(%v) %v:\nRoute: %#v\nRequest: %#v\nVars: %v\n", test.title, msg, route, request, vars)
- return
- }
- if shouldMatch {
- if vars != nil && !stringMapEqual(vars, match.Vars) {
- t.Errorf("(%v) Vars not equal: expected %v, got %v", test.title, vars, match.Vars)
- return
- }
- if test.scheme != "" {
- u, err := route.URL(mapToPairs(match.Vars)...)
- if err != nil {
- t.Fatalf("(%v) URL error: %v -- %v", test.title, err, getRouteTemplate(route))
- }
- if uri.Scheme != u.Scheme {
- t.Errorf("(%v) URLScheme not equal: expected %v, got %v", test.title, uri.Scheme, u.Scheme)
- return
- }
- }
- if test.host != "" {
- u, err := test.route.URLHost(mapToPairs(match.Vars)...)
- if err != nil {
- t.Fatalf("(%v) URLHost error: %v -- %v", test.title, err, getRouteTemplate(route))
- }
- if uri.Scheme != u.Scheme {
- t.Errorf("(%v) URLHost scheme not equal: expected %v, got %v -- %v", test.title, uri.Scheme, u.Scheme, getRouteTemplate(route))
- return
- }
- if uri.Host != u.Host {
- t.Errorf("(%v) URLHost host not equal: expected %v, got %v -- %v", test.title, uri.Host, u.Host, getRouteTemplate(route))
- return
- }
- }
- if test.path != "" {
- u, err := route.URLPath(mapToPairs(match.Vars)...)
- if err != nil {
- t.Fatalf("(%v) URLPath error: %v -- %v", test.title, err, getRouteTemplate(route))
- }
- if uri.Path != u.Path {
- t.Errorf("(%v) URLPath not equal: expected %v, got %v -- %v", test.title, uri.Path, u.Path, getRouteTemplate(route))
- return
- }
- }
- if test.host != "" && test.path != "" {
- u, err := route.URL(mapToPairs(match.Vars)...)
- if err != nil {
- t.Fatalf("(%v) URL error: %v -- %v", test.title, err, getRouteTemplate(route))
- }
- if expected, got := uri.String(), u.String(); expected != got {
- t.Errorf("(%v) URL not equal: expected %v, got %v -- %v", test.title, expected, got, getRouteTemplate(route))
- return
- }
- }
- if query != "" {
- u, _ := route.URL(mapToPairs(match.Vars)...)
- if query != u.RawQuery {
- t.Errorf("(%v) URL query not equal: expected %v, got %v", test.title, query, u.RawQuery)
- return
- }
- }
- if shouldRedirect && match.Handler == nil {
- t.Errorf("(%v) Did not redirect", test.title)
- return
- }
- if !shouldRedirect && match.Handler != nil {
- t.Errorf("(%v) Unexpected redirect", test.title)
- return
- }
- }
-}
-
-func testUseEscapedRoute(t *testing.T, test routeTest) {
- test.route.useEncodedPath = true
- testRoute(t, test)
-}
-
-func testTemplate(t *testing.T, test routeTest) {
- route := test.route
- pathTemplate := test.pathTemplate
- if len(pathTemplate) == 0 {
- pathTemplate = test.path
- }
- hostTemplate := test.hostTemplate
- if len(hostTemplate) == 0 {
- hostTemplate = test.host
- }
-
- routePathTemplate, pathErr := route.GetPathTemplate()
- if pathErr == nil && routePathTemplate != pathTemplate {
- t.Errorf("(%v) GetPathTemplate not equal: expected %v, got %v", test.title, pathTemplate, routePathTemplate)
- }
-
- routeHostTemplate, hostErr := route.GetHostTemplate()
- if hostErr == nil && routeHostTemplate != hostTemplate {
- t.Errorf("(%v) GetHostTemplate not equal: expected %v, got %v", test.title, hostTemplate, routeHostTemplate)
- }
-}
-
-func testMethods(t *testing.T, test routeTest) {
- route := test.route
- methods, _ := route.GetMethods()
- if strings.Join(methods, ",") != strings.Join(test.methods, ",") {
- t.Errorf("(%v) GetMethods not equal: expected %v, got %v", test.title, test.methods, methods)
- }
-}
-
-func testRegexp(t *testing.T, test routeTest) {
- route := test.route
- routePathRegexp, regexpErr := route.GetPathRegexp()
- if test.pathRegexp != "" && regexpErr == nil && routePathRegexp != test.pathRegexp {
- t.Errorf("(%v) GetPathRegexp not equal: expected %v, got %v", test.title, test.pathRegexp, routePathRegexp)
- }
-}
-
-func testQueriesRegexp(t *testing.T, test routeTest) {
- route := test.route
- queries, queriesErr := route.GetQueriesRegexp()
- gotQueries := strings.Join(queries, ",")
- if test.queriesRegexp != "" && queriesErr == nil && gotQueries != test.queriesRegexp {
- t.Errorf("(%v) GetQueriesRegexp not equal: expected %v, got %v", test.title, test.queriesRegexp, gotQueries)
- }
-}
-
-func testQueriesTemplates(t *testing.T, test routeTest) {
- route := test.route
- queries, queriesErr := route.GetQueriesTemplates()
- gotQueries := strings.Join(queries, ",")
- if test.queriesTemplate != "" && queriesErr == nil && gotQueries != test.queriesTemplate {
- t.Errorf("(%v) GetQueriesTemplates not equal: expected %v, got %v", test.title, test.queriesTemplate, gotQueries)
- }
-}
-
-type TestA301ResponseWriter struct {
- hh http.Header
- status int
-}
-
-func (ho *TestA301ResponseWriter) Header() http.Header {
- return http.Header(ho.hh)
-}
-
-func (ho *TestA301ResponseWriter) Write(b []byte) (int, error) {
- return 0, nil
-}
-
-func (ho *TestA301ResponseWriter) WriteHeader(code int) {
- ho.status = code
-}
-
-func Test301Redirect(t *testing.T) {
- m := make(http.Header)
-
- func1 := func(w http.ResponseWriter, r *http.Request) {}
- func2 := func(w http.ResponseWriter, r *http.Request) {}
-
- r := NewRouter()
- r.HandleFunc("/api/", func2).Name("func2")
- r.HandleFunc("/", func1).Name("func1")
-
- req, _ := http.NewRequest("GET", "http://localhost//api/?abc=def", nil)
-
- res := TestA301ResponseWriter{
- hh: m,
- status: 0,
- }
- r.ServeHTTP(&res, req)
-
- if "http://localhost/api/?abc=def" != res.hh["Location"][0] {
- t.Errorf("Should have complete URL with query string")
- }
-}
-
-func TestSkipClean(t *testing.T) {
- func1 := func(w http.ResponseWriter, r *http.Request) {}
- func2 := func(w http.ResponseWriter, r *http.Request) {}
-
- r := NewRouter()
- r.SkipClean(true)
- r.HandleFunc("/api/", func2).Name("func2")
- r.HandleFunc("/", func1).Name("func1")
-
- req, _ := http.NewRequest("GET", "http://localhost//api/?abc=def", nil)
- res := NewRecorder()
- r.ServeHTTP(res, req)
-
- if len(res.HeaderMap["Location"]) != 0 {
- t.Errorf("Shouldn't redirect since skip clean is disabled")
- }
-}
-
-// https://plus.google.com/101022900381697718949/posts/eWy6DjFJ6uW
-func TestSubrouterHeader(t *testing.T) {
- expected := "func1 response"
- func1 := func(w http.ResponseWriter, r *http.Request) {
- fmt.Fprint(w, expected)
- }
- func2 := func(http.ResponseWriter, *http.Request) {}
-
- r := NewRouter()
- s := r.Headers("SomeSpecialHeader", "").Subrouter()
- s.HandleFunc("/", func1).Name("func1")
- r.HandleFunc("/", func2).Name("func2")
-
- req, _ := http.NewRequest("GET", "http://localhost/", nil)
- req.Header.Add("SomeSpecialHeader", "foo")
- match := new(RouteMatch)
- matched := r.Match(req, match)
- if !matched {
- t.Errorf("Should match request")
- }
- if match.Route.GetName() != "func1" {
- t.Errorf("Expecting func1 handler, got %s", match.Route.GetName())
- }
- resp := NewRecorder()
- match.Handler.ServeHTTP(resp, req)
- if resp.Body.String() != expected {
- t.Errorf("Expecting %q", expected)
- }
-}
-
-func TestNoMatchMethodErrorHandler(t *testing.T) {
- func1 := func(w http.ResponseWriter, r *http.Request) {}
-
- r := NewRouter()
- r.HandleFunc("/", func1).Methods("GET", "POST")
-
- req, _ := http.NewRequest("PUT", "http://localhost/", nil)
- match := new(RouteMatch)
- matched := r.Match(req, match)
-
- if matched {
- t.Error("Should not have matched route for methods")
- }
-
- if match.MatchErr != ErrMethodMismatch {
- t.Error("Should get ErrMethodMismatch error")
- }
-
- resp := NewRecorder()
- r.ServeHTTP(resp, req)
- if resp.Code != 405 {
- t.Errorf("Expecting code %v", 405)
- }
-
- // Add matching route
- r.HandleFunc("/", func1).Methods("PUT")
-
- match = new(RouteMatch)
- matched = r.Match(req, match)
-
- if !matched {
- t.Error("Should have matched route for methods")
- }
-
- if match.MatchErr != nil {
- t.Error("Should not have any matching error. Found:", match.MatchErr)
- }
-}
-
-func TestErrMatchNotFound(t *testing.T) {
- emptyHandler := func(w http.ResponseWriter, r *http.Request) {}
-
- r := NewRouter()
- r.HandleFunc("/", emptyHandler)
- s := r.PathPrefix("/sub/").Subrouter()
- s.HandleFunc("/", emptyHandler)
-
- // Regular 404 not found
- req, _ := http.NewRequest("GET", "/sub/whatever", nil)
- match := new(RouteMatch)
- matched := r.Match(req, match)
-
- if matched {
- t.Errorf("Subrouter should not have matched that, got %v", match.Route)
- }
- // Even without a custom handler, MatchErr is set to ErrNotFound
- if match.MatchErr != ErrNotFound {
- t.Errorf("Expected ErrNotFound MatchErr, but was %v", match.MatchErr)
- }
-
- // Now lets add a 404 handler to subrouter
- s.NotFoundHandler = http.NotFoundHandler()
- req, _ = http.NewRequest("GET", "/sub/whatever", nil)
-
- // Test the subrouter first
- match = new(RouteMatch)
- matched = s.Match(req, match)
- // Now we should get a match
- if !matched {
- t.Errorf("Subrouter should have matched %s", req.RequestURI)
- }
- // But MatchErr should be set to ErrNotFound anyway
- if match.MatchErr != ErrNotFound {
- t.Errorf("Expected ErrNotFound MatchErr, but was %v", match.MatchErr)
- }
-
- // Now test the parent (MatchErr should propagate)
- match = new(RouteMatch)
- matched = r.Match(req, match)
-
- // Now we should get a match
- if !matched {
- t.Errorf("Router should have matched %s via subrouter", req.RequestURI)
- }
- // But MatchErr should be set to ErrNotFound anyway
- if match.MatchErr != ErrNotFound {
- t.Errorf("Expected ErrNotFound MatchErr, but was %v", match.MatchErr)
- }
-}
-
-// methodsSubrouterTest models the data necessary for testing handler
-// matching for subrouters created after HTTP methods matcher registration.
-type methodsSubrouterTest struct {
- title string
- wantCode int
- router *Router
- // method is the input into the request and expected response
- method string
- // input request path
- path string
- // redirectTo is the expected location path for strict-slash matches
- redirectTo string
-}
-
-// methodHandler writes the method string in response.
-func methodHandler(method string) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte(method))
- }
-}
-
-// TestMethodsSubrouterCatchall matches handlers for subrouters where a
-// catchall handler is set for a mis-matching method.
-func TestMethodsSubrouterCatchall(t *testing.T) {
- t.Parallel()
-
- router := NewRouter()
- router.Methods("PATCH").Subrouter().PathPrefix("/").HandlerFunc(methodHandler("PUT"))
- router.Methods("GET").Subrouter().HandleFunc("/foo", methodHandler("GET"))
- router.Methods("POST").Subrouter().HandleFunc("/foo", methodHandler("POST"))
- router.Methods("DELETE").Subrouter().HandleFunc("/foo", methodHandler("DELETE"))
-
- tests := []methodsSubrouterTest{
- {
- title: "match GET handler",
- router: router,
- path: "http://localhost/foo",
- method: "GET",
- wantCode: http.StatusOK,
- },
- {
- title: "match POST handler",
- router: router,
- method: "POST",
- path: "http://localhost/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "match DELETE handler",
- router: router,
- method: "DELETE",
- path: "http://localhost/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "disallow PUT method",
- router: router,
- method: "PUT",
- path: "http://localhost/foo",
- wantCode: http.StatusMethodNotAllowed,
- },
- }
-
- for _, test := range tests {
- testMethodsSubrouter(t, test)
- }
-}
-
-// TestMethodsSubrouterStrictSlash matches handlers on subrouters with
-// strict-slash matchers.
-func TestMethodsSubrouterStrictSlash(t *testing.T) {
- t.Parallel()
-
- router := NewRouter()
- sub := router.PathPrefix("/").Subrouter()
- sub.StrictSlash(true).Path("/foo").Methods("GET").Subrouter().HandleFunc("", methodHandler("GET"))
- sub.StrictSlash(true).Path("/foo/").Methods("PUT").Subrouter().HandleFunc("/", methodHandler("PUT"))
- sub.StrictSlash(true).Path("/foo/").Methods("POST").Subrouter().HandleFunc("/", methodHandler("POST"))
-
- tests := []methodsSubrouterTest{
- {
- title: "match POST handler",
- router: router,
- method: "POST",
- path: "http://localhost/foo/",
- wantCode: http.StatusOK,
- },
- {
- title: "match GET handler",
- router: router,
- method: "GET",
- path: "http://localhost/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "match POST handler, redirect strict-slash",
- router: router,
- method: "POST",
- path: "http://localhost/foo",
- redirectTo: "http://localhost/foo/",
- wantCode: http.StatusMovedPermanently,
- },
- {
- title: "match GET handler, redirect strict-slash",
- router: router,
- method: "GET",
- path: "http://localhost/foo/",
- redirectTo: "http://localhost/foo",
- wantCode: http.StatusMovedPermanently,
- },
- {
- title: "disallow DELETE method",
- router: router,
- method: "DELETE",
- path: "http://localhost/foo",
- wantCode: http.StatusMethodNotAllowed,
- },
- }
-
- for _, test := range tests {
- testMethodsSubrouter(t, test)
- }
-}
-
-// TestMethodsSubrouterPathPrefix matches handlers on subrouters created
-// on a router with a path prefix matcher and method matcher.
-func TestMethodsSubrouterPathPrefix(t *testing.T) {
- t.Parallel()
-
- router := NewRouter()
- router.PathPrefix("/1").Methods("POST").Subrouter().HandleFunc("/2", methodHandler("POST"))
- router.PathPrefix("/1").Methods("DELETE").Subrouter().HandleFunc("/2", methodHandler("DELETE"))
- router.PathPrefix("/1").Methods("PUT").Subrouter().HandleFunc("/2", methodHandler("PUT"))
- router.PathPrefix("/1").Methods("POST").Subrouter().HandleFunc("/2", methodHandler("POST2"))
-
- tests := []methodsSubrouterTest{
- {
- title: "match first POST handler",
- router: router,
- method: "POST",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "match DELETE handler",
- router: router,
- method: "DELETE",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "match PUT handler",
- router: router,
- method: "PUT",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "disallow PATCH method",
- router: router,
- method: "PATCH",
- path: "http://localhost/1/2",
- wantCode: http.StatusMethodNotAllowed,
- },
- }
-
- for _, test := range tests {
- testMethodsSubrouter(t, test)
- }
-}
-
-// TestMethodsSubrouterSubrouter matches handlers on subrouters produced
-// from method matchers registered on a root subrouter.
-func TestMethodsSubrouterSubrouter(t *testing.T) {
- t.Parallel()
-
- router := NewRouter()
- sub := router.PathPrefix("/1").Subrouter()
- sub.Methods("POST").Subrouter().HandleFunc("/2", methodHandler("POST"))
- sub.Methods("GET").Subrouter().HandleFunc("/2", methodHandler("GET"))
- sub.Methods("PATCH").Subrouter().HandleFunc("/2", methodHandler("PATCH"))
- sub.HandleFunc("/2", methodHandler("PUT")).Subrouter().Methods("PUT")
- sub.HandleFunc("/2", methodHandler("POST2")).Subrouter().Methods("POST")
-
- tests := []methodsSubrouterTest{
- {
- title: "match first POST handler",
- router: router,
- method: "POST",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "match GET handler",
- router: router,
- method: "GET",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "match PATCH handler",
- router: router,
- method: "PATCH",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "match PUT handler",
- router: router,
- method: "PUT",
- path: "http://localhost/1/2",
- wantCode: http.StatusOK,
- },
- {
- title: "disallow DELETE method",
- router: router,
- method: "DELETE",
- path: "http://localhost/1/2",
- wantCode: http.StatusMethodNotAllowed,
- },
- }
-
- for _, test := range tests {
- testMethodsSubrouter(t, test)
- }
-}
-
-// TestMethodsSubrouterPathVariable matches handlers on matching paths
-// with path variables in them.
-func TestMethodsSubrouterPathVariable(t *testing.T) {
- t.Parallel()
-
- router := NewRouter()
- router.Methods("GET").Subrouter().HandleFunc("/foo", methodHandler("GET"))
- router.Methods("POST").Subrouter().HandleFunc("/{any}", methodHandler("POST"))
- router.Methods("DELETE").Subrouter().HandleFunc("/1/{any}", methodHandler("DELETE"))
- router.Methods("PUT").Subrouter().HandleFunc("/1/{any}", methodHandler("PUT"))
-
- tests := []methodsSubrouterTest{
- {
- title: "match GET handler",
- router: router,
- method: "GET",
- path: "http://localhost/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "match POST handler",
- router: router,
- method: "POST",
- path: "http://localhost/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "match DELETE handler",
- router: router,
- method: "DELETE",
- path: "http://localhost/1/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "match PUT handler",
- router: router,
- method: "PUT",
- path: "http://localhost/1/foo",
- wantCode: http.StatusOK,
- },
- {
- title: "disallow PATCH method",
- router: router,
- method: "PATCH",
- path: "http://localhost/1/foo",
- wantCode: http.StatusMethodNotAllowed,
- },
- }
-
- for _, test := range tests {
- testMethodsSubrouter(t, test)
- }
-}
-
-// testMethodsSubrouter runs an individual methodsSubrouterTest.
-func testMethodsSubrouter(t *testing.T, test methodsSubrouterTest) {
- // Execute request
- req, _ := http.NewRequest(test.method, test.path, nil)
- resp := NewRecorder()
- test.router.ServeHTTP(resp, req)
-
- switch test.wantCode {
- case http.StatusMethodNotAllowed:
- if resp.Code != http.StatusMethodNotAllowed {
- t.Errorf(`(%s) Expected "405 Method Not Allowed", but got %d code`, test.title, resp.Code)
- } else if matchedMethod := resp.Body.String(); matchedMethod != "" {
- t.Errorf(`(%s) Expected "405 Method Not Allowed", but %q handler was called`, test.title, matchedMethod)
- }
-
- case http.StatusMovedPermanently:
- if gotLocation := resp.HeaderMap.Get("Location"); gotLocation != test.redirectTo {
- t.Errorf("(%s) Expected %q route-match to redirect to %q, but got %q", test.title, test.method, test.redirectTo, gotLocation)
- }
-
- case http.StatusOK:
- if matchedMethod := resp.Body.String(); matchedMethod != test.method {
- t.Errorf("(%s) Expected %q handler to be called, but %q handler was called", test.title, test.method, matchedMethod)
- }
-
- default:
- expectedCodes := []int{http.StatusMethodNotAllowed, http.StatusMovedPermanently, http.StatusOK}
- t.Errorf("(%s) Expected wantCode to be one of: %v, but got %d", test.title, expectedCodes, test.wantCode)
- }
-}
-
-// mapToPairs converts a string map to a slice of string pairs
-func mapToPairs(m map[string]string) []string {
- var i int
- p := make([]string, len(m)*2)
- for k, v := range m {
- p[i] = k
- p[i+1] = v
- i += 2
- }
- return p
-}
-
-// stringMapEqual checks the equality of two string maps
-func stringMapEqual(m1, m2 map[string]string) bool {
- nil1 := m1 == nil
- nil2 := m2 == nil
- if nil1 != nil2 || len(m1) != len(m2) {
- return false
- }
- for k, v := range m1 {
- if v != m2[k] {
- return false
- }
- }
- return true
-}
-
-// newRequest is a helper function to create a new request with a method and url.
-// The request returned is a 'server' request as opposed to a 'client' one through
-// simulated write onto the wire and read off of the wire.
-// The differences between requests are detailed in the net/http package.
-func newRequest(method, url string) *http.Request {
- req, err := http.NewRequest(method, url, nil)
- if err != nil {
- panic(err)
- }
- // extract the escaped original host+path from url
- // http://localhost/path/here?v=1#frag -> //localhost/path/here
- opaque := ""
- if i := len(req.URL.Scheme); i > 0 {
- opaque = url[i+1:]
- }
-
- if i := strings.LastIndex(opaque, "?"); i > -1 {
- opaque = opaque[:i]
- }
- if i := strings.LastIndex(opaque, "#"); i > -1 {
- opaque = opaque[:i]
- }
-
- // Escaped host+path workaround as detailed in https://golang.org/pkg/net/url/#URL
- // for < 1.5 client side workaround
- req.URL.Opaque = opaque
-
- // Simulate writing to wire
- var buff bytes.Buffer
- req.Write(&buff)
- ioreader := bufio.NewReader(&buff)
-
- // Parse request off of 'wire'
- req, err = http.ReadRequest(ioreader)
- if err != nil {
- panic(err)
- }
- return req
-}
diff --git a/vendor/github.com/gorilla/mux/old_test.go b/vendor/github.com/gorilla/mux/old_test.go
deleted file mode 100644
index b228983c4..000000000
--- a/vendor/github.com/gorilla/mux/old_test.go
+++ /dev/null
@@ -1,704 +0,0 @@
-// Old tests ported to Go1. This is a mess. Want to drop it one day.
-
-// Copyright 2011 Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mux
-
-import (
- "bytes"
- "net/http"
- "testing"
-)
-
-// ----------------------------------------------------------------------------
-// ResponseRecorder
-// ----------------------------------------------------------------------------
-// Copyright 2009 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 file.
-
-// ResponseRecorder is an implementation of http.ResponseWriter that
-// records its mutations for later inspection in tests.
-type ResponseRecorder struct {
- Code int // the HTTP response code from WriteHeader
- HeaderMap http.Header // the HTTP response headers
- Body *bytes.Buffer // if non-nil, the bytes.Buffer to append written data to
- Flushed bool
-}
-
-// NewRecorder returns an initialized ResponseRecorder.
-func NewRecorder() *ResponseRecorder {
- return &ResponseRecorder{
- HeaderMap: make(http.Header),
- Body: new(bytes.Buffer),
- }
-}
-
-// Header returns the response headers.
-func (rw *ResponseRecorder) Header() http.Header {
- return rw.HeaderMap
-}
-
-// Write always succeeds and writes to rw.Body, if not nil.
-func (rw *ResponseRecorder) Write(buf []byte) (int, error) {
- if rw.Body != nil {
- rw.Body.Write(buf)
- }
- if rw.Code == 0 {
- rw.Code = http.StatusOK
- }
- return len(buf), nil
-}
-
-// WriteHeader sets rw.Code.
-func (rw *ResponseRecorder) WriteHeader(code int) {
- rw.Code = code
-}
-
-// Flush sets rw.Flushed to true.
-func (rw *ResponseRecorder) Flush() {
- rw.Flushed = true
-}
-
-// ----------------------------------------------------------------------------
-
-func TestRouteMatchers(t *testing.T) {
- var scheme, host, path, query, method string
- var headers map[string]string
- var resultVars map[bool]map[string]string
-
- router := NewRouter()
- router.NewRoute().Host("{var1}.google.com").
- Path("/{var2:[a-z]+}/{var3:[0-9]+}").
- Queries("foo", "bar").
- Methods("GET").
- Schemes("https").
- Headers("x-requested-with", "XMLHttpRequest")
- router.NewRoute().Host("www.{var4}.com").
- PathPrefix("/foo/{var5:[a-z]+}/{var6:[0-9]+}").
- Queries("baz", "ding").
- Methods("POST").
- Schemes("http").
- Headers("Content-Type", "application/json")
-
- reset := func() {
- // Everything match.
- scheme = "https"
- host = "www.google.com"
- path = "/product/42"
- query = "?foo=bar"
- method = "GET"
- headers = map[string]string{"X-Requested-With": "XMLHttpRequest"}
- resultVars = map[bool]map[string]string{
- true: {"var1": "www", "var2": "product", "var3": "42"},
- false: {},
- }
- }
-
- reset2 := func() {
- // Everything match.
- scheme = "http"
- host = "www.google.com"
- path = "/foo/product/42/path/that/is/ignored"
- query = "?baz=ding"
- method = "POST"
- headers = map[string]string{"Content-Type": "application/json"}
- resultVars = map[bool]map[string]string{
- true: {"var4": "google", "var5": "product", "var6": "42"},
- false: {},
- }
- }
-
- match := func(shouldMatch bool) {
- url := scheme + "://" + host + path + query
- request, _ := http.NewRequest(method, url, nil)
- for key, value := range headers {
- request.Header.Add(key, value)
- }
-
- var routeMatch RouteMatch
- matched := router.Match(request, &routeMatch)
- if matched != shouldMatch {
- t.Errorf("Expected: %v\nGot: %v\nRequest: %v %v", shouldMatch, matched, request.Method, url)
- }
-
- if matched {
- currentRoute := routeMatch.Route
- if currentRoute == nil {
- t.Errorf("Expected a current route.")
- }
- vars := routeMatch.Vars
- expectedVars := resultVars[shouldMatch]
- if len(vars) != len(expectedVars) {
- t.Errorf("Expected vars: %v Got: %v.", expectedVars, vars)
- }
- for name, value := range vars {
- if expectedVars[name] != value {
- t.Errorf("Expected vars: %v Got: %v.", expectedVars, vars)
- }
- }
- }
- }
-
- // 1st route --------------------------------------------------------------
-
- // Everything match.
- reset()
- match(true)
-
- // Scheme doesn't match.
- reset()
- scheme = "http"
- match(false)
-
- // Host doesn't match.
- reset()
- host = "www.mygoogle.com"
- match(false)
-
- // Path doesn't match.
- reset()
- path = "/product/notdigits"
- match(false)
-
- // Query doesn't match.
- reset()
- query = "?foo=baz"
- match(false)
-
- // Method doesn't match.
- reset()
- method = "POST"
- match(false)
-
- // Header doesn't match.
- reset()
- headers = map[string]string{}
- match(false)
-
- // Everything match, again.
- reset()
- match(true)
-
- // 2nd route --------------------------------------------------------------
- // Everything match.
- reset2()
- match(true)
-
- // Scheme doesn't match.
- reset2()
- scheme = "https"
- match(false)
-
- // Host doesn't match.
- reset2()
- host = "sub.google.com"
- match(false)
-
- // Path doesn't match.
- reset2()
- path = "/bar/product/42"
- match(false)
-
- // Query doesn't match.
- reset2()
- query = "?foo=baz"
- match(false)
-
- // Method doesn't match.
- reset2()
- method = "GET"
- match(false)
-
- // Header doesn't match.
- reset2()
- headers = map[string]string{}
- match(false)
-
- // Everything match, again.
- reset2()
- match(true)
-}
-
-type headerMatcherTest struct {
- matcher headerMatcher
- headers map[string]string
- result bool
-}
-
-var headerMatcherTests = []headerMatcherTest{
- {
- matcher: headerMatcher(map[string]string{"x-requested-with": "XMLHttpRequest"}),
- headers: map[string]string{"X-Requested-With": "XMLHttpRequest"},
- result: true,
- },
- {
- matcher: headerMatcher(map[string]string{"x-requested-with": ""}),
- headers: map[string]string{"X-Requested-With": "anything"},
- result: true,
- },
- {
- matcher: headerMatcher(map[string]string{"x-requested-with": "XMLHttpRequest"}),
- headers: map[string]string{},
- result: false,
- },
-}
-
-type hostMatcherTest struct {
- matcher *Route
- url string
- vars map[string]string
- result bool
-}
-
-var hostMatcherTests = []hostMatcherTest{
- {
- matcher: NewRouter().NewRoute().Host("{foo:[a-z][a-z][a-z]}.{bar:[a-z][a-z][a-z]}.{baz:[a-z][a-z][a-z]}"),
- url: "http://abc.def.ghi/",
- vars: map[string]string{"foo": "abc", "bar": "def", "baz": "ghi"},
- result: true,
- },
- {
- matcher: NewRouter().NewRoute().Host("{foo:[a-z][a-z][a-z]}.{bar:[a-z][a-z][a-z]}.{baz:[a-z][a-z][a-z]}"),
- url: "http://a.b.c/",
- vars: map[string]string{"foo": "abc", "bar": "def", "baz": "ghi"},
- result: false,
- },
-}
-
-type methodMatcherTest struct {
- matcher methodMatcher
- method string
- result bool
-}
-
-var methodMatcherTests = []methodMatcherTest{
- {
- matcher: methodMatcher([]string{"GET", "POST", "PUT"}),
- method: "GET",
- result: true,
- },
- {
- matcher: methodMatcher([]string{"GET", "POST", "PUT"}),
- method: "POST",
- result: true,
- },
- {
- matcher: methodMatcher([]string{"GET", "POST", "PUT"}),
- method: "PUT",
- result: true,
- },
- {
- matcher: methodMatcher([]string{"GET", "POST", "PUT"}),
- method: "DELETE",
- result: false,
- },
-}
-
-type pathMatcherTest struct {
- matcher *Route
- url string
- vars map[string]string
- result bool
-}
-
-var pathMatcherTests = []pathMatcherTest{
- {
- matcher: NewRouter().NewRoute().Path("/{foo:[0-9][0-9][0-9]}/{bar:[0-9][0-9][0-9]}/{baz:[0-9][0-9][0-9]}"),
- url: "http://localhost:8080/123/456/789",
- vars: map[string]string{"foo": "123", "bar": "456", "baz": "789"},
- result: true,
- },
- {
- matcher: NewRouter().NewRoute().Path("/{foo:[0-9][0-9][0-9]}/{bar:[0-9][0-9][0-9]}/{baz:[0-9][0-9][0-9]}"),
- url: "http://localhost:8080/1/2/3",
- vars: map[string]string{"foo": "123", "bar": "456", "baz": "789"},
- result: false,
- },
-}
-
-type schemeMatcherTest struct {
- matcher schemeMatcher
- url string
- result bool
-}
-
-var schemeMatcherTests = []schemeMatcherTest{
- {
- matcher: schemeMatcher([]string{"http", "https"}),
- url: "http://localhost:8080/",
- result: true,
- },
- {
- matcher: schemeMatcher([]string{"http", "https"}),
- url: "https://localhost:8080/",
- result: true,
- },
- {
- matcher: schemeMatcher([]string{"https"}),
- url: "http://localhost:8080/",
- result: false,
- },
- {
- matcher: schemeMatcher([]string{"http"}),
- url: "https://localhost:8080/",
- result: false,
- },
-}
-
-type urlBuildingTest struct {
- route *Route
- vars []string
- url string
-}
-
-var urlBuildingTests = []urlBuildingTest{
- {
- route: new(Route).Host("foo.domain.com"),
- vars: []string{},
- url: "http://foo.domain.com",
- },
- {
- route: new(Route).Host("{subdomain}.domain.com"),
- vars: []string{"subdomain", "bar"},
- url: "http://bar.domain.com",
- },
- {
- route: new(Route).Host("foo.domain.com").Path("/articles"),
- vars: []string{},
- url: "http://foo.domain.com/articles",
- },
- {
- route: new(Route).Path("/articles"),
- vars: []string{},
- url: "/articles",
- },
- {
- route: new(Route).Path("/articles/{category}/{id:[0-9]+}"),
- vars: []string{"category", "technology", "id", "42"},
- url: "/articles/technology/42",
- },
- {
- route: new(Route).Host("{subdomain}.domain.com").Path("/articles/{category}/{id:[0-9]+}"),
- vars: []string{"subdomain", "foo", "category", "technology", "id", "42"},
- url: "http://foo.domain.com/articles/technology/42",
- },
-}
-
-func TestHeaderMatcher(t *testing.T) {
- for _, v := range headerMatcherTests {
- request, _ := http.NewRequest("GET", "http://localhost:8080/", nil)
- for key, value := range v.headers {
- request.Header.Add(key, value)
- }
- var routeMatch RouteMatch
- result := v.matcher.Match(request, &routeMatch)
- if result != v.result {
- if v.result {
- t.Errorf("%#v: should match %v.", v.matcher, request.Header)
- } else {
- t.Errorf("%#v: should not match %v.", v.matcher, request.Header)
- }
- }
- }
-}
-
-func TestHostMatcher(t *testing.T) {
- for _, v := range hostMatcherTests {
- request, _ := http.NewRequest("GET", v.url, nil)
- var routeMatch RouteMatch
- result := v.matcher.Match(request, &routeMatch)
- vars := routeMatch.Vars
- if result != v.result {
- if v.result {
- t.Errorf("%#v: should match %v.", v.matcher, v.url)
- } else {
- t.Errorf("%#v: should not match %v.", v.matcher, v.url)
- }
- }
- if result {
- if len(vars) != len(v.vars) {
- t.Errorf("%#v: vars length should be %v, got %v.", v.matcher, len(v.vars), len(vars))
- }
- for name, value := range vars {
- if v.vars[name] != value {
- t.Errorf("%#v: expected value %v for key %v, got %v.", v.matcher, v.vars[name], name, value)
- }
- }
- } else {
- if len(vars) != 0 {
- t.Errorf("%#v: vars length should be 0, got %v.", v.matcher, len(vars))
- }
- }
- }
-}
-
-func TestMethodMatcher(t *testing.T) {
- for _, v := range methodMatcherTests {
- request, _ := http.NewRequest(v.method, "http://localhost:8080/", nil)
- var routeMatch RouteMatch
- result := v.matcher.Match(request, &routeMatch)
- if result != v.result {
- if v.result {
- t.Errorf("%#v: should match %v.", v.matcher, v.method)
- } else {
- t.Errorf("%#v: should not match %v.", v.matcher, v.method)
- }
- }
- }
-}
-
-func TestPathMatcher(t *testing.T) {
- for _, v := range pathMatcherTests {
- request, _ := http.NewRequest("GET", v.url, nil)
- var routeMatch RouteMatch
- result := v.matcher.Match(request, &routeMatch)
- vars := routeMatch.Vars
- if result != v.result {
- if v.result {
- t.Errorf("%#v: should match %v.", v.matcher, v.url)
- } else {
- t.Errorf("%#v: should not match %v.", v.matcher, v.url)
- }
- }
- if result {
- if len(vars) != len(v.vars) {
- t.Errorf("%#v: vars length should be %v, got %v.", v.matcher, len(v.vars), len(vars))
- }
- for name, value := range vars {
- if v.vars[name] != value {
- t.Errorf("%#v: expected value %v for key %v, got %v.", v.matcher, v.vars[name], name, value)
- }
- }
- } else {
- if len(vars) != 0 {
- t.Errorf("%#v: vars length should be 0, got %v.", v.matcher, len(vars))
- }
- }
- }
-}
-
-func TestSchemeMatcher(t *testing.T) {
- for _, v := range schemeMatcherTests {
- request, _ := http.NewRequest("GET", v.url, nil)
- var routeMatch RouteMatch
- result := v.matcher.Match(request, &routeMatch)
- if result != v.result {
- if v.result {
- t.Errorf("%#v: should match %v.", v.matcher, v.url)
- } else {
- t.Errorf("%#v: should not match %v.", v.matcher, v.url)
- }
- }
- }
-}
-
-func TestUrlBuilding(t *testing.T) {
-
- for _, v := range urlBuildingTests {
- u, _ := v.route.URL(v.vars...)
- url := u.String()
- if url != v.url {
- t.Errorf("expected %v, got %v", v.url, url)
- /*
- reversePath := ""
- reverseHost := ""
- if v.route.pathTemplate != nil {
- reversePath = v.route.pathTemplate.Reverse
- }
- if v.route.hostTemplate != nil {
- reverseHost = v.route.hostTemplate.Reverse
- }
-
- t.Errorf("%#v:\nexpected: %q\ngot: %q\nreverse path: %q\nreverse host: %q", v.route, v.url, url, reversePath, reverseHost)
- */
- }
- }
-
- ArticleHandler := func(w http.ResponseWriter, r *http.Request) {
- }
-
- router := NewRouter()
- router.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler).Name("article")
-
- url, _ := router.Get("article").URL("category", "technology", "id", "42")
- expected := "/articles/technology/42"
- if url.String() != expected {
- t.Errorf("Expected %v, got %v", expected, url.String())
- }
-}
-
-func TestMatchedRouteName(t *testing.T) {
- routeName := "stock"
- router := NewRouter()
- route := router.NewRoute().Path("/products/").Name(routeName)
-
- url := "http://www.example.com/products/"
- request, _ := http.NewRequest("GET", url, nil)
- var rv RouteMatch
- ok := router.Match(request, &rv)
-
- if !ok || rv.Route != route {
- t.Errorf("Expected same route, got %+v.", rv.Route)
- }
-
- retName := rv.Route.GetName()
- if retName != routeName {
- t.Errorf("Expected %q, got %q.", routeName, retName)
- }
-}
-
-func TestSubRouting(t *testing.T) {
- // Example from docs.
- router := NewRouter()
- subrouter := router.NewRoute().Host("www.example.com").Subrouter()
- route := subrouter.NewRoute().Path("/products/").Name("products")
-
- url := "http://www.example.com/products/"
- request, _ := http.NewRequest("GET", url, nil)
- var rv RouteMatch
- ok := router.Match(request, &rv)
-
- if !ok || rv.Route != route {
- t.Errorf("Expected same route, got %+v.", rv.Route)
- }
-
- u, _ := router.Get("products").URL()
- builtURL := u.String()
- // Yay, subroute aware of the domain when building!
- if builtURL != url {
- t.Errorf("Expected %q, got %q.", url, builtURL)
- }
-}
-
-func TestVariableNames(t *testing.T) {
- route := new(Route).Host("{arg1}.domain.com").Path("/{arg1}/{arg2:[0-9]+}")
- if route.err == nil {
- t.Errorf("Expected error for duplicated variable names")
- }
-}
-
-func TestRedirectSlash(t *testing.T) {
- var route *Route
- var routeMatch RouteMatch
- r := NewRouter()
-
- r.StrictSlash(false)
- route = r.NewRoute()
- if route.strictSlash != false {
- t.Errorf("Expected false redirectSlash.")
- }
-
- r.StrictSlash(true)
- route = r.NewRoute()
- if route.strictSlash != true {
- t.Errorf("Expected true redirectSlash.")
- }
-
- route = new(Route)
- route.strictSlash = true
- route.Path("/{arg1}/{arg2:[0-9]+}/")
- request, _ := http.NewRequest("GET", "http://localhost/foo/123", nil)
- routeMatch = RouteMatch{}
- _ = route.Match(request, &routeMatch)
- vars := routeMatch.Vars
- if vars["arg1"] != "foo" {
- t.Errorf("Expected foo.")
- }
- if vars["arg2"] != "123" {
- t.Errorf("Expected 123.")
- }
- rsp := NewRecorder()
- routeMatch.Handler.ServeHTTP(rsp, request)
- if rsp.HeaderMap.Get("Location") != "http://localhost/foo/123/" {
- t.Errorf("Expected redirect header.")
- }
-
- route = new(Route)
- route.strictSlash = true
- route.Path("/{arg1}/{arg2:[0-9]+}")
- request, _ = http.NewRequest("GET", "http://localhost/foo/123/", nil)
- routeMatch = RouteMatch{}
- _ = route.Match(request, &routeMatch)
- vars = routeMatch.Vars
- if vars["arg1"] != "foo" {
- t.Errorf("Expected foo.")
- }
- if vars["arg2"] != "123" {
- t.Errorf("Expected 123.")
- }
- rsp = NewRecorder()
- routeMatch.Handler.ServeHTTP(rsp, request)
- if rsp.HeaderMap.Get("Location") != "http://localhost/foo/123" {
- t.Errorf("Expected redirect header.")
- }
-}
-
-// Test for the new regexp library, still not available in stable Go.
-func TestNewRegexp(t *testing.T) {
- var p *routeRegexp
- var matches []string
-
- tests := map[string]map[string][]string{
- "/{foo:a{2}}": {
- "/a": nil,
- "/aa": {"aa"},
- "/aaa": nil,
- "/aaaa": nil,
- },
- "/{foo:a{2,}}": {
- "/a": nil,
- "/aa": {"aa"},
- "/aaa": {"aaa"},
- "/aaaa": {"aaaa"},
- },
- "/{foo:a{2,3}}": {
- "/a": nil,
- "/aa": {"aa"},
- "/aaa": {"aaa"},
- "/aaaa": nil,
- },
- "/{foo:[a-z]{3}}/{bar:[a-z]{2}}": {
- "/a": nil,
- "/ab": nil,
- "/abc": nil,
- "/abcd": nil,
- "/abc/ab": {"abc", "ab"},
- "/abc/abc": nil,
- "/abcd/ab": nil,
- },
- `/{foo:\w{3,}}/{bar:\d{2,}}`: {
- "/a": nil,
- "/ab": nil,
- "/abc": nil,
- "/abc/1": nil,
- "/abc/12": {"abc", "12"},
- "/abcd/12": {"abcd", "12"},
- "/abcd/123": {"abcd", "123"},
- },
- }
-
- for pattern, paths := range tests {
- p, _ = newRouteRegexp(pattern, regexpTypePath, routeRegexpOptions{})
- for path, result := range paths {
- matches = p.regexp.FindStringSubmatch(path)
- if result == nil {
- if matches != nil {
- t.Errorf("%v should not match %v.", pattern, path)
- }
- } else {
- if len(matches) != len(result)+1 {
- t.Errorf("Expected %v matches, got %v.", len(result)+1, len(matches))
- } else {
- for k, v := range result {
- if matches[k+1] != v {
- t.Errorf("Expected %v, got %v.", v, matches[k+1])
- }
- }
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/gorilla/schema/cache.go b/vendor/github.com/gorilla/schema/cache.go
index afa20a3a3..73b75f48d 100644
--- a/vendor/github.com/gorilla/schema/cache.go
+++ b/vendor/github.com/gorilla/schema/cache.go
@@ -63,7 +63,7 @@ func (c *cache) parsePath(p string, t reflect.Type) ([]pathPart, error) {
}
// Valid field. Append index.
path = append(path, field.name)
- if field.ss {
+ if field.isSliceOfStructs && (!field.unmarshalerInfo.IsValid || (field.unmarshalerInfo.IsValid && field.unmarshalerInfo.IsSliceElement)) {
// Parse a special case: slices of structs.
// i+1 must be the slice index.
//
@@ -142,7 +142,7 @@ func (c *cache) create(t reflect.Type, info *structInfo) *structInfo {
c.create(ft, info)
for _, fi := range info.fields[bef:len(info.fields)] {
// exclude required check because duplicated to embedded field
- fi.required = false
+ fi.isRequired = false
}
}
}
@@ -162,6 +162,7 @@ func (c *cache) createField(field reflect.StructField, info *structInfo) {
// First let's get the basic type.
isSlice, isStruct := false, false
ft := field.Type
+ m := isTextUnmarshaler(reflect.Zero(ft))
if ft.Kind() == reflect.Ptr {
ft = ft.Elem()
}
@@ -185,12 +186,13 @@ func (c *cache) createField(field reflect.StructField, info *structInfo) {
}
info.fields = append(info.fields, &fieldInfo{
- typ: field.Type,
- name: field.Name,
- ss: isSlice && isStruct,
- alias: alias,
- anon: field.Anonymous,
- required: options.Contains("required"),
+ typ: field.Type,
+ name: field.Name,
+ alias: alias,
+ unmarshalerInfo: m,
+ isSliceOfStructs: isSlice && isStruct,
+ isAnonymous: field.Anonymous,
+ isRequired: options.Contains("required"),
})
}
@@ -215,12 +217,18 @@ func (i *structInfo) get(alias string) *fieldInfo {
}
type fieldInfo struct {
- typ reflect.Type
- name string // field name in the struct.
- ss bool // true if this is a slice of structs.
- alias string
- anon bool // is an embedded field
- required bool // tag option
+ typ reflect.Type
+ // name is the field name in the struct.
+ name string
+ alias string
+ // unmarshalerInfo contains information regarding the
+ // encoding.TextUnmarshaler implementation of the field type.
+ unmarshalerInfo unmarshaler
+ // isSliceOfStructs indicates if the field type is a slice of structs.
+ isSliceOfStructs bool
+ // isAnonymous indicates whether the field is embedded in the struct.
+ isAnonymous bool
+ isRequired bool
}
type pathPart struct {
diff --git a/vendor/github.com/gorilla/schema/decoder.go b/vendor/github.com/gorilla/schema/decoder.go
index e49b53c87..5352a908b 100644
--- a/vendor/github.com/gorilla/schema/decoder.go
+++ b/vendor/github.com/gorilla/schema/decoder.go
@@ -106,7 +106,7 @@ func (d *Decoder) checkRequired(t reflect.Type, src map[string][]string, prefix
if f.typ.Kind() == reflect.Struct {
err := d.checkRequired(f.typ, src, prefix+f.alias+".")
if err != nil {
- if !f.anon {
+ if !f.isAnonymous {
return err
}
// check embedded parent field.
@@ -116,7 +116,7 @@ func (d *Decoder) checkRequired(t reflect.Type, src map[string][]string, prefix
}
}
}
- if f.required {
+ if f.isRequired {
key := f.alias
if prefix != "" {
key = prefix + key
@@ -185,7 +185,7 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
// Get the converter early in case there is one for a slice type.
conv := d.cache.converter(t)
m := isTextUnmarshaler(v)
- if conv == nil && t.Kind() == reflect.Slice && m.IsSlice {
+ if conv == nil && t.Kind() == reflect.Slice && m.IsSliceElement {
var items []reflect.Value
elemT := t.Elem()
isPtrElem := elemT.Kind() == reflect.Ptr
@@ -211,7 +211,7 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
}
} else if m.IsValid {
u := reflect.New(elemT)
- if m.IsPtr {
+ if m.IsSliceElementPtr {
u = reflect.New(reflect.PtrTo(elemT).Elem())
}
if err := u.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(value)); err != nil {
@@ -222,7 +222,7 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
Err: err,
}
}
- if m.IsPtr {
+ if m.IsSliceElementPtr {
items = append(items, u.Elem().Addr())
} else if u.Kind() == reflect.Ptr {
items = append(items, u.Elem())
@@ -283,11 +283,7 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
val = values[len(values)-1]
}
- if val == "" {
- if d.zeroEmpty {
- v.Set(reflect.Zero(t))
- }
- } else if conv != nil {
+ if conv != nil {
if value := conv(val); value.IsValid() {
v.Set(value.Convert(t))
} else {
@@ -298,15 +294,32 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
}
}
} else if m.IsValid {
- // If the value implements the encoding.TextUnmarshaler interface
- // apply UnmarshalText as the converter
- if err := m.Unmarshaler.UnmarshalText([]byte(val)); err != nil {
- return ConversionError{
- Key: path,
- Type: t,
- Index: -1,
- Err: err,
+ if m.IsPtr {
+ u := reflect.New(v.Type())
+ if err := u.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(val)); err != nil {
+ return ConversionError{
+ Key: path,
+ Type: t,
+ Index: -1,
+ Err: err,
+ }
}
+ v.Set(reflect.Indirect(u))
+ } else {
+ // If the value implements the encoding.TextUnmarshaler interface
+ // apply UnmarshalText as the converter
+ if err := m.Unmarshaler.UnmarshalText([]byte(val)); err != nil {
+ return ConversionError{
+ Key: path,
+ Type: t,
+ Index: -1,
+ Err: err,
+ }
+ }
+ }
+ } else if val == "" {
+ if d.zeroEmpty {
+ v.Set(reflect.Zero(t))
}
} else if conv := builtinConverters[t.Kind()]; conv != nil {
if value := conv(val); value.IsValid() {
@@ -326,18 +339,18 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
}
func isTextUnmarshaler(v reflect.Value) unmarshaler {
-
// Create a new unmarshaller instance
m := unmarshaler{}
-
- // As the UnmarshalText function should be applied
- // to the pointer of the type, we convert the value to pointer.
- if v.CanAddr() {
- v = v.Addr()
- }
if m.Unmarshaler, m.IsValid = v.Interface().(encoding.TextUnmarshaler); m.IsValid {
return m
}
+ // As the UnmarshalText function should be applied to the pointer of the
+ // type, we check that type to see if it implements the necessary
+ // method.
+ if m.Unmarshaler, m.IsValid = reflect.New(v.Type()).Interface().(encoding.TextUnmarshaler); m.IsValid {
+ m.IsPtr = true
+ return m
+ }
// if v is []T or *[]T create new T
t := v.Type()
@@ -345,12 +358,17 @@ func isTextUnmarshaler(v reflect.Value) unmarshaler {
t = t.Elem()
}
if t.Kind() == reflect.Slice {
- // if t is a pointer slice, check if it implements encoding.TextUnmarshaler
- m.IsSlice = true
+ // Check if the slice implements encoding.TextUnmarshaller
+ if m.Unmarshaler, m.IsValid = v.Interface().(encoding.TextUnmarshaler); m.IsValid {
+ return m
+ }
+ // If t is a pointer slice, check if its elements implement
+ // encoding.TextUnmarshaler
+ m.IsSliceElement = true
if t = t.Elem(); t.Kind() == reflect.Ptr {
t = reflect.PtrTo(t.Elem())
v = reflect.Zero(t)
- m.IsPtr = true
+ m.IsSliceElementPtr = true
m.Unmarshaler, m.IsValid = v.Interface().(encoding.TextUnmarshaler)
return m
}
@@ -365,9 +383,18 @@ func isTextUnmarshaler(v reflect.Value) unmarshaler {
// unmarshaller contains information about a TextUnmarshaler type
type unmarshaler struct {
Unmarshaler encoding.TextUnmarshaler
- IsSlice bool
- IsPtr bool
- IsValid bool
+ // IsValid indicates whether the resolved type indicated by the other
+ // flags implements the encoding.TextUnmarshaler interface.
+ IsValid bool
+ // IsPtr indicates that the resolved type is the pointer of the original
+ // type.
+ IsPtr bool
+ // IsSliceElement indicates that the resolved type is a slice element of
+ // the original type.
+ IsSliceElement bool
+ // IsSliceElementPtr indicates that the resolved type is a pointer to a
+ // slice element of the original type.
+ IsSliceElementPtr bool
}
// Errors ---------------------------------------------------------------------
diff --git a/vendor/github.com/gorilla/schema/decoder_test.go b/vendor/github.com/gorilla/schema/decoder_test.go
deleted file mode 100644
index 18b3b3270..000000000
--- a/vendor/github.com/gorilla/schema/decoder_test.go
+++ /dev/null
@@ -1,1693 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package schema
-
-import (
- "encoding/hex"
- "errors"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-type IntAlias int
-
-type rudeBool bool
-
-func (id *rudeBool) UnmarshalText(text []byte) error {
- value := string(text)
- switch {
- case strings.EqualFold("Yup", value):
- *id = true
- case strings.EqualFold("Nope", value):
- *id = false
- default:
- return errors.New("value must be yup or nope")
- }
- return nil
-}
-
-// All cases we want to cover, in a nutshell.
-type S1 struct {
- F01 int `schema:"f1"`
- F02 *int `schema:"f2"`
- F03 []int `schema:"f3"`
- F04 []*int `schema:"f4"`
- F05 *[]int `schema:"f5"`
- F06 *[]*int `schema:"f6"`
- F07 S2 `schema:"f7"`
- F08 *S1 `schema:"f8"`
- F09 int `schema:"-"`
- F10 []S1 `schema:"f10"`
- F11 []*S1 `schema:"f11"`
- F12 *[]S1 `schema:"f12"`
- F13 *[]*S1 `schema:"f13"`
- F14 int `schema:"f14"`
- F15 IntAlias `schema:"f15"`
- F16 []IntAlias `schema:"f16"`
- F17 S19 `schema:"f17"`
- F18 rudeBool `schema:"f18"`
- F19 *rudeBool `schema:"f19"`
- F20 []rudeBool `schema:"f20"`
- F21 []*rudeBool `schema:"f21"`
-}
-
-type S2 struct {
- F01 *[]*int `schema:"f1"`
-}
-
-type S19 [2]byte
-
-func (id *S19) UnmarshalText(text []byte) error {
- buf, err := hex.DecodeString(string(text))
- if err != nil {
- return err
- }
- if len(buf) > len(*id) {
- return errors.New("out of range")
- }
- for i := range buf {
- (*id)[i] = buf[i]
- }
- return nil
-}
-
-func TestAll(t *testing.T) {
- v := map[string][]string{
- "f1": {"1"},
- "f2": {"2"},
- "f3": {"31", "32"},
- "f4": {"41", "42"},
- "f5": {"51", "52"},
- "f6": {"61", "62"},
- "f7.f1": {"71", "72"},
- "f8.f8.f7.f1": {"81", "82"},
- "f9": {"9"},
- "f10.0.f10.0.f6": {"101", "102"},
- "f10.0.f10.1.f6": {"103", "104"},
- "f11.0.f11.0.f6": {"111", "112"},
- "f11.0.f11.1.f6": {"113", "114"},
- "f12.0.f12.0.f6": {"121", "122"},
- "f12.0.f12.1.f6": {"123", "124"},
- "f13.0.f13.0.f6": {"131", "132"},
- "f13.0.f13.1.f6": {"133", "134"},
- "f14": {},
- "f15": {"151"},
- "f16": {"161", "162"},
- "f17": {"1a2b"},
- "f18": {"yup"},
- "f19": {"nope"},
- "f20": {"nope", "yup"},
- "f21": {"yup", "nope"},
- }
- f2 := 2
- f41, f42 := 41, 42
- f61, f62 := 61, 62
- f71, f72 := 71, 72
- f81, f82 := 81, 82
- f101, f102, f103, f104 := 101, 102, 103, 104
- f111, f112, f113, f114 := 111, 112, 113, 114
- f121, f122, f123, f124 := 121, 122, 123, 124
- f131, f132, f133, f134 := 131, 132, 133, 134
- var f151 IntAlias = 151
- var f161, f162 IntAlias = 161, 162
- var f152, f153 rudeBool = true, false
- e := S1{
- F01: 1,
- F02: &f2,
- F03: []int{31, 32},
- F04: []*int{&f41, &f42},
- F05: &[]int{51, 52},
- F06: &[]*int{&f61, &f62},
- F07: S2{
- F01: &[]*int{&f71, &f72},
- },
- F08: &S1{
- F08: &S1{
- F07: S2{
- F01: &[]*int{&f81, &f82},
- },
- },
- },
- F09: 0,
- F10: []S1{
- S1{
- F10: []S1{
- S1{F06: &[]*int{&f101, &f102}},
- S1{F06: &[]*int{&f103, &f104}},
- },
- },
- },
- F11: []*S1{
- &S1{
- F11: []*S1{
- &S1{F06: &[]*int{&f111, &f112}},
- &S1{F06: &[]*int{&f113, &f114}},
- },
- },
- },
- F12: &[]S1{
- S1{
- F12: &[]S1{
- S1{F06: &[]*int{&f121, &f122}},
- S1{F06: &[]*int{&f123, &f124}},
- },
- },
- },
- F13: &[]*S1{
- &S1{
- F13: &[]*S1{
- &S1{F06: &[]*int{&f131, &f132}},
- &S1{F06: &[]*int{&f133, &f134}},
- },
- },
- },
- F14: 0,
- F15: f151,
- F16: []IntAlias{f161, f162},
- F17: S19{0x1a, 0x2b},
- F18: f152,
- F19: &f153,
- F20: []rudeBool{f153, f152},
- F21: []*rudeBool{&f152, &f153},
- }
-
- s := &S1{}
- _ = NewDecoder().Decode(s, v)
-
- vals := func(values []*int) []int {
- r := make([]int, len(values))
- for k, v := range values {
- r[k] = *v
- }
- return r
- }
-
- if s.F01 != e.F01 {
- t.Errorf("f1: expected %v, got %v", e.F01, s.F01)
- }
- if s.F02 == nil {
- t.Errorf("f2: expected %v, got nil", *e.F02)
- } else if *s.F02 != *e.F02 {
- t.Errorf("f2: expected %v, got %v", *e.F02, *s.F02)
- }
- if s.F03 == nil {
- t.Errorf("f3: expected %v, got nil", e.F03)
- } else if len(s.F03) != 2 || s.F03[0] != e.F03[0] || s.F03[1] != e.F03[1] {
- t.Errorf("f3: expected %v, got %v", e.F03, s.F03)
- }
- if s.F04 == nil {
- t.Errorf("f4: expected %v, got nil", e.F04)
- } else {
- if len(s.F04) != 2 || *(s.F04)[0] != *(e.F04)[0] || *(s.F04)[1] != *(e.F04)[1] {
- t.Errorf("f4: expected %v, got %v", vals(e.F04), vals(s.F04))
- }
- }
- if s.F05 == nil {
- t.Errorf("f5: expected %v, got nil", e.F05)
- } else {
- sF05, eF05 := *s.F05, *e.F05
- if len(sF05) != 2 || sF05[0] != eF05[0] || sF05[1] != eF05[1] {
- t.Errorf("f5: expected %v, got %v", eF05, sF05)
- }
- }
- if s.F06 == nil {
- t.Errorf("f6: expected %v, got nil", vals(*e.F06))
- } else {
- sF06, eF06 := *s.F06, *e.F06
- if len(sF06) != 2 || *(sF06)[0] != *(eF06)[0] || *(sF06)[1] != *(eF06)[1] {
- t.Errorf("f6: expected %v, got %v", vals(eF06), vals(sF06))
- }
- }
- if s.F07.F01 == nil {
- t.Errorf("f7.f1: expected %v, got nil", vals(*e.F07.F01))
- } else {
- sF07, eF07 := *s.F07.F01, *e.F07.F01
- if len(sF07) != 2 || *(sF07)[0] != *(eF07)[0] || *(sF07)[1] != *(eF07)[1] {
- t.Errorf("f7.f1: expected %v, got %v", vals(eF07), vals(sF07))
- }
- }
- if s.F08 == nil {
- t.Errorf("f8: got nil")
- } else if s.F08.F08 == nil {
- t.Errorf("f8.f8: got nil")
- } else if s.F08.F08.F07.F01 == nil {
- t.Errorf("f8.f8.f7.f1: expected %v, got nil", vals(*e.F08.F08.F07.F01))
- } else {
- sF08, eF08 := *s.F08.F08.F07.F01, *e.F08.F08.F07.F01
- if len(sF08) != 2 || *(sF08)[0] != *(eF08)[0] || *(sF08)[1] != *(eF08)[1] {
- t.Errorf("f8.f8.f7.f1: expected %v, got %v", vals(eF08), vals(sF08))
- }
- }
- if s.F09 != e.F09 {
- t.Errorf("f9: expected %v, got %v", e.F09, s.F09)
- }
- if s.F10 == nil {
- t.Errorf("f10: got nil")
- } else if len(s.F10) != 1 {
- t.Errorf("f10: expected 1 element, got %v", s.F10)
- } else {
- if len(s.F10[0].F10) != 2 {
- t.Errorf("f10.0.f10: expected 1 element, got %v", s.F10[0].F10)
- } else {
- sF10, eF10 := *s.F10[0].F10[0].F06, *e.F10[0].F10[0].F06
- if sF10 == nil {
- t.Errorf("f10.0.f10.0.f6: expected %v, got nil", vals(eF10))
- } else {
- if len(sF10) != 2 || *(sF10)[0] != *(eF10)[0] || *(sF10)[1] != *(eF10)[1] {
- t.Errorf("f10.0.f10.0.f6: expected %v, got %v", vals(eF10), vals(sF10))
- }
- }
- sF10, eF10 = *s.F10[0].F10[1].F06, *e.F10[0].F10[1].F06
- if sF10 == nil {
- t.Errorf("f10.0.f10.0.f6: expected %v, got nil", vals(eF10))
- } else {
- if len(sF10) != 2 || *(sF10)[0] != *(eF10)[0] || *(sF10)[1] != *(eF10)[1] {
- t.Errorf("f10.0.f10.0.f6: expected %v, got %v", vals(eF10), vals(sF10))
- }
- }
- }
- }
- if s.F11 == nil {
- t.Errorf("f11: got nil")
- } else if len(s.F11) != 1 {
- t.Errorf("f11: expected 1 element, got %v", s.F11)
- } else {
- if len(s.F11[0].F11) != 2 {
- t.Errorf("f11.0.f11: expected 1 element, got %v", s.F11[0].F11)
- } else {
- sF11, eF11 := *s.F11[0].F11[0].F06, *e.F11[0].F11[0].F06
- if sF11 == nil {
- t.Errorf("f11.0.f11.0.f6: expected %v, got nil", vals(eF11))
- } else {
- if len(sF11) != 2 || *(sF11)[0] != *(eF11)[0] || *(sF11)[1] != *(eF11)[1] {
- t.Errorf("f11.0.f11.0.f6: expected %v, got %v", vals(eF11), vals(sF11))
- }
- }
- sF11, eF11 = *s.F11[0].F11[1].F06, *e.F11[0].F11[1].F06
- if sF11 == nil {
- t.Errorf("f11.0.f11.0.f6: expected %v, got nil", vals(eF11))
- } else {
- if len(sF11) != 2 || *(sF11)[0] != *(eF11)[0] || *(sF11)[1] != *(eF11)[1] {
- t.Errorf("f11.0.f11.0.f6: expected %v, got %v", vals(eF11), vals(sF11))
- }
- }
- }
- }
- if s.F12 == nil {
- t.Errorf("f12: got nil")
- } else if len(*s.F12) != 1 {
- t.Errorf("f12: expected 1 element, got %v", *s.F12)
- } else {
- sF12, eF12 := *(s.F12), *(e.F12)
- if len(*sF12[0].F12) != 2 {
- t.Errorf("f12.0.f12: expected 1 element, got %v", *sF12[0].F12)
- } else {
- sF122, eF122 := *(*sF12[0].F12)[0].F06, *(*eF12[0].F12)[0].F06
- if sF122 == nil {
- t.Errorf("f12.0.f12.0.f6: expected %v, got nil", vals(eF122))
- } else {
- if len(sF122) != 2 || *(sF122)[0] != *(eF122)[0] || *(sF122)[1] != *(eF122)[1] {
- t.Errorf("f12.0.f12.0.f6: expected %v, got %v", vals(eF122), vals(sF122))
- }
- }
- sF122, eF122 = *(*sF12[0].F12)[1].F06, *(*eF12[0].F12)[1].F06
- if sF122 == nil {
- t.Errorf("f12.0.f12.0.f6: expected %v, got nil", vals(eF122))
- } else {
- if len(sF122) != 2 || *(sF122)[0] != *(eF122)[0] || *(sF122)[1] != *(eF122)[1] {
- t.Errorf("f12.0.f12.0.f6: expected %v, got %v", vals(eF122), vals(sF122))
- }
- }
- }
- }
- if s.F13 == nil {
- t.Errorf("f13: got nil")
- } else if len(*s.F13) != 1 {
- t.Errorf("f13: expected 1 element, got %v", *s.F13)
- } else {
- sF13, eF13 := *(s.F13), *(e.F13)
- if len(*sF13[0].F13) != 2 {
- t.Errorf("f13.0.f13: expected 1 element, got %v", *sF13[0].F13)
- } else {
- sF132, eF132 := *(*sF13[0].F13)[0].F06, *(*eF13[0].F13)[0].F06
- if sF132 == nil {
- t.Errorf("f13.0.f13.0.f6: expected %v, got nil", vals(eF132))
- } else {
- if len(sF132) != 2 || *(sF132)[0] != *(eF132)[0] || *(sF132)[1] != *(eF132)[1] {
- t.Errorf("f13.0.f13.0.f6: expected %v, got %v", vals(eF132), vals(sF132))
- }
- }
- sF132, eF132 = *(*sF13[0].F13)[1].F06, *(*eF13[0].F13)[1].F06
- if sF132 == nil {
- t.Errorf("f13.0.f13.0.f6: expected %v, got nil", vals(eF132))
- } else {
- if len(sF132) != 2 || *(sF132)[0] != *(eF132)[0] || *(sF132)[1] != *(eF132)[1] {
- t.Errorf("f13.0.f13.0.f6: expected %v, got %v", vals(eF132), vals(sF132))
- }
- }
- }
- }
- if s.F14 != e.F14 {
- t.Errorf("f14: expected %v, got %v", e.F14, s.F14)
- }
- if s.F15 != e.F15 {
- t.Errorf("f15: expected %v, got %v", e.F15, s.F15)
- }
- if s.F16 == nil {
- t.Errorf("f16: nil")
- } else if len(s.F16) != len(e.F16) {
- t.Errorf("f16: expected len %d, got %d", len(e.F16), len(s.F16))
- } else if !reflect.DeepEqual(s.F16, e.F16) {
- t.Errorf("f16: expected %v, got %v", e.F16, s.F16)
- }
- if s.F17 != e.F17 {
- t.Errorf("f17: expected %v, got %v", e.F17, s.F17)
- }
- if s.F18 != e.F18 {
- t.Errorf("f18: expected %v, got %v", e.F18, s.F18)
- }
- if *s.F19 != *e.F19 {
- t.Errorf("f19: expected %v, got %v", *e.F19, *s.F19)
- }
- if s.F20 == nil {
- t.Errorf("f20: nil")
- } else if len(s.F20) != len(e.F20) {
- t.Errorf("f20: expected %v, got %v", e.F20, s.F20)
- } else if !reflect.DeepEqual(s.F20, e.F20) {
- t.Errorf("f20: expected %v, got %v", e.F20, s.F20)
- }
- if s.F21 == nil {
- t.Errorf("f21: nil")
- } else if len(s.F21) != len(e.F21) {
- t.Errorf("f21: expected length %d, got %d", len(e.F21), len(s.F21))
- } else if !reflect.DeepEqual(s.F21, e.F21) {
- t.Errorf("f21: expected %v, got %v", e.F21, s.F21)
- }
-}
-
-func BenchmarkAll(b *testing.B) {
- v := map[string][]string{
- "f1": {"1"},
- "f2": {"2"},
- "f3": {"31", "32"},
- "f4": {"41", "42"},
- "f5": {"51", "52"},
- "f6": {"61", "62"},
- "f7.f1": {"71", "72"},
- "f8.f8.f7.f1": {"81", "82"},
- "f9": {"9"},
- "f10.0.f10.0.f6": {"101", "102"},
- "f10.0.f10.1.f6": {"103", "104"},
- "f11.0.f11.0.f6": {"111", "112"},
- "f11.0.f11.1.f6": {"113", "114"},
- "f12.0.f12.0.f6": {"121", "122"},
- "f12.0.f12.1.f6": {"123", "124"},
- "f13.0.f13.0.f6": {"131", "132"},
- "f13.0.f13.1.f6": {"133", "134"},
- }
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- s := &S1{}
- _ = NewDecoder().Decode(s, v)
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S3 struct {
- F01 bool
- F02 float32
- F03 float64
- F04 int
- F05 int8
- F06 int16
- F07 int32
- F08 int64
- F09 string
- F10 uint
- F11 uint8
- F12 uint16
- F13 uint32
- F14 uint64
-}
-
-func TestDefaultConverters(t *testing.T) {
- v := map[string][]string{
- "F01": {"true"},
- "F02": {"4.2"},
- "F03": {"4.3"},
- "F04": {"-42"},
- "F05": {"-43"},
- "F06": {"-44"},
- "F07": {"-45"},
- "F08": {"-46"},
- "F09": {"foo"},
- "F10": {"42"},
- "F11": {"43"},
- "F12": {"44"},
- "F13": {"45"},
- "F14": {"46"},
- }
- e := S3{
- F01: true,
- F02: 4.2,
- F03: 4.3,
- F04: -42,
- F05: -43,
- F06: -44,
- F07: -45,
- F08: -46,
- F09: "foo",
- F10: 42,
- F11: 43,
- F12: 44,
- F13: 45,
- F14: 46,
- }
- s := &S3{}
- _ = NewDecoder().Decode(s, v)
- if s.F01 != e.F01 {
- t.Errorf("F01: expected %v, got %v", e.F01, s.F01)
- }
- if s.F02 != e.F02 {
- t.Errorf("F02: expected %v, got %v", e.F02, s.F02)
- }
- if s.F03 != e.F03 {
- t.Errorf("F03: expected %v, got %v", e.F03, s.F03)
- }
- if s.F04 != e.F04 {
- t.Errorf("F04: expected %v, got %v", e.F04, s.F04)
- }
- if s.F05 != e.F05 {
- t.Errorf("F05: expected %v, got %v", e.F05, s.F05)
- }
- if s.F06 != e.F06 {
- t.Errorf("F06: expected %v, got %v", e.F06, s.F06)
- }
- if s.F07 != e.F07 {
- t.Errorf("F07: expected %v, got %v", e.F07, s.F07)
- }
- if s.F08 != e.F08 {
- t.Errorf("F08: expected %v, got %v", e.F08, s.F08)
- }
- if s.F09 != e.F09 {
- t.Errorf("F09: expected %v, got %v", e.F09, s.F09)
- }
- if s.F10 != e.F10 {
- t.Errorf("F10: expected %v, got %v", e.F10, s.F10)
- }
- if s.F11 != e.F11 {
- t.Errorf("F11: expected %v, got %v", e.F11, s.F11)
- }
- if s.F12 != e.F12 {
- t.Errorf("F12: expected %v, got %v", e.F12, s.F12)
- }
- if s.F13 != e.F13 {
- t.Errorf("F13: expected %v, got %v", e.F13, s.F13)
- }
- if s.F14 != e.F14 {
- t.Errorf("F14: expected %v, got %v", e.F14, s.F14)
- }
-}
-
-func TestOn(t *testing.T) {
- v := map[string][]string{
- "F01": {"on"},
- }
- s := S3{}
- err := NewDecoder().Decode(&s, v)
- if err != nil {
- t.Fatal(err)
- }
- if !s.F01 {
- t.Fatal("Value was not set to true")
- }
-}
-
-// ----------------------------------------------------------------------------
-
-func TestInlineStruct(t *testing.T) {
- s1 := &struct {
- F01 bool
- }{}
- s2 := &struct {
- F01 int
- }{}
- v1 := map[string][]string{
- "F01": {"true"},
- }
- v2 := map[string][]string{
- "F01": {"42"},
- }
- decoder := NewDecoder()
- _ = decoder.Decode(s1, v1)
- if s1.F01 != true {
- t.Errorf("s1: expected %v, got %v", true, s1.F01)
- }
- _ = decoder.Decode(s2, v2)
- if s2.F01 != 42 {
- t.Errorf("s2: expected %v, got %v", 42, s2.F01)
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type Foo struct {
- F01 int
- F02 Bar
- Bif []Baz
-}
-
-type Bar struct {
- F01 string
- F02 string
- F03 string
- F14 string
- S05 string
- Str string
-}
-
-type Baz struct {
- F99 []string
-}
-
-func TestSimpleExample(t *testing.T) {
- data := map[string][]string{
- "F01": {"1"},
- "F02.F01": {"S1"},
- "F02.F02": {"S2"},
- "F02.F03": {"S3"},
- "F02.F14": {"S4"},
- "F02.S05": {"S5"},
- "F02.Str": {"Str"},
- "Bif.0.F99": {"A", "B", "C"},
- }
-
- e := &Foo{
- F01: 1,
- F02: Bar{
- F01: "S1",
- F02: "S2",
- F03: "S3",
- F14: "S4",
- S05: "S5",
- Str: "Str",
- },
- Bif: []Baz{{
- F99: []string{"A", "B", "C"}},
- },
- }
-
- s := &Foo{}
- _ = NewDecoder().Decode(s, data)
-
- if s.F01 != e.F01 {
- t.Errorf("F01: expected %v, got %v", e.F01, s.F01)
- }
- if s.F02.F01 != e.F02.F01 {
- t.Errorf("F02.F01: expected %v, got %v", e.F02.F01, s.F02.F01)
- }
- if s.F02.F02 != e.F02.F02 {
- t.Errorf("F02.F02: expected %v, got %v", e.F02.F02, s.F02.F02)
- }
- if s.F02.F03 != e.F02.F03 {
- t.Errorf("F02.F03: expected %v, got %v", e.F02.F03, s.F02.F03)
- }
- if s.F02.F14 != e.F02.F14 {
- t.Errorf("F02.F14: expected %v, got %v", e.F02.F14, s.F02.F14)
- }
- if s.F02.S05 != e.F02.S05 {
- t.Errorf("F02.S05: expected %v, got %v", e.F02.S05, s.F02.S05)
- }
- if s.F02.Str != e.F02.Str {
- t.Errorf("F02.Str: expected %v, got %v", e.F02.Str, s.F02.Str)
- }
- if len(s.Bif) != len(e.Bif) {
- t.Errorf("Bif len: expected %d, got %d", len(e.Bif), len(s.Bif))
- } else {
- if len(s.Bif[0].F99) != len(e.Bif[0].F99) {
- t.Errorf("Bif[0].F99 len: expected %d, got %d", len(e.Bif[0].F99), len(s.Bif[0].F99))
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S4 struct {
- F01 int64
- F02 float64
- F03 bool
- F04 rudeBool
-}
-
-func TestConversionError(t *testing.T) {
- data := map[string][]string{
- "F01": {"foo"},
- "F02": {"bar"},
- "F03": {"baz"},
- "F04": {"not-a-yes-or-nope"},
- }
- s := &S4{}
- e := NewDecoder().Decode(s, data)
-
- m := e.(MultiError)
- if len(m) != 4 {
- t.Errorf("Expected 3 errors, got %v", m)
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S5 struct {
- F01 []string
-}
-
-func TestEmptyValue(t *testing.T) {
- data := map[string][]string{
- "F01": {"", "foo"},
- }
- s := &S5{}
- NewDecoder().Decode(s, data)
- if len(s.F01) != 1 {
- t.Errorf("Expected 1 values in F01")
- }
-}
-
-func TestEmptyValueZeroEmpty(t *testing.T) {
- data := map[string][]string{
- "F01": {"", "foo"},
- }
- s := S5{}
- d := NewDecoder()
- d.ZeroEmpty(true)
- err := d.Decode(&s, data)
- if err != nil {
- t.Fatal(err)
- }
- if len(s.F01) != 2 {
- t.Errorf("Expected 1 values in F01")
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S6 struct {
- id string
-}
-
-func TestUnexportedField(t *testing.T) {
- data := map[string][]string{
- "id": {"identifier"},
- }
- s := &S6{}
- NewDecoder().Decode(s, data)
- if s.id != "" {
- t.Errorf("Unexported field expected to be ignored")
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S7 struct {
- ID string
-}
-
-func TestMultipleValues(t *testing.T) {
- data := map[string][]string{
- "ID": {"0", "1"},
- }
-
- s := S7{}
- NewDecoder().Decode(&s, data)
- if s.ID != "1" {
- t.Errorf("Last defined value must be used when multiple values for same field are provided")
- }
-}
-
-type S8 struct {
- ID string `json:"id"`
-}
-
-func TestSetAliasTag(t *testing.T) {
- data := map[string][]string{
- "id": {"foo"},
- }
-
- s := S8{}
- dec := NewDecoder()
- dec.SetAliasTag("json")
- dec.Decode(&s, data)
- if s.ID != "foo" {
- t.Fatalf("Bad value: got %q, want %q", s.ID, "foo")
- }
-}
-
-func TestZeroEmpty(t *testing.T) {
- data := map[string][]string{
- "F01": {""},
- "F03": {"true"},
- }
- s := S4{1, 1, false, false}
- d := NewDecoder()
- d.ZeroEmpty(true)
-
- err := d.Decode(&s, data)
- if err != nil {
- t.Fatal(err)
- }
- if s.F01 != 0 {
- t.Errorf("F01: got %v, want %v", s.F01, 0)
- }
- if s.F02 != 1 {
- t.Errorf("F02: got %v, want %v", s.F02, 1)
- }
- if s.F03 != true {
- t.Errorf("F03: got %v, want %v", s.F03, true)
- }
-}
-
-func TestNoZeroEmpty(t *testing.T) {
- data := map[string][]string{
- "F01": {""},
- "F03": {"true"},
- }
- s := S4{1, 1, false, false}
- d := NewDecoder()
- d.ZeroEmpty(false)
- err := d.Decode(&s, data)
- if err != nil {
- t.Fatal(err)
- }
- if s.F01 != 1 {
- t.Errorf("F01: got %v, want %v", s.F01, 1)
- }
- if s.F02 != 1 {
- t.Errorf("F02: got %v, want %v", s.F02, 1)
- }
- if s.F03 != true {
- t.Errorf("F03: got %v, want %v", s.F03, true)
- }
- if s.F04 != false {
- t.Errorf("F04: got %v, want %v", s.F04, false)
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S9 struct {
- Id string
-}
-
-type S10 struct {
- S9
-}
-
-func TestEmbeddedField(t *testing.T) {
- data := map[string][]string{
- "Id": {"identifier"},
- }
- s := &S10{}
- NewDecoder().Decode(s, data)
- if s.Id != "identifier" {
- t.Errorf("Missing support for embedded fields")
- }
-}
-
-type S11 struct {
- S10
-}
-
-func TestMultipleLevelEmbeddedField(t *testing.T) {
- data := map[string][]string{
- "Id": {"identifier"},
- }
- s := &S11{}
- err := NewDecoder().Decode(s, data)
- if s.Id != "identifier" {
- t.Errorf("Missing support for multiple-level embedded fields (%v)", err)
- }
-}
-
-func TestInvalidPath(t *testing.T) {
- data := map[string][]string{
- "Foo.Bar": {"baz"},
- }
- s := S9{}
- err := NewDecoder().Decode(&s, data)
- expectedErr := `schema: invalid path "Foo.Bar"`
- if err.Error() != expectedErr {
- t.Fatalf("got %q, want %q", err, expectedErr)
- }
-}
-
-func TestInvalidPathIgnoreUnknownKeys(t *testing.T) {
- data := map[string][]string{
- "Foo.Bar": {"baz"},
- }
- s := S9{}
- dec := NewDecoder()
- dec.IgnoreUnknownKeys(true)
- err := dec.Decode(&s, data)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S1NT struct {
- F1 int
- F2 *int
- F3 []int
- F4 []*int
- F5 *[]int
- F6 *[]*int
- F7 S2
- F8 *S1
- F9 int `schema:"-"`
- F10 []S1
- F11 []*S1
- F12 *[]S1
- F13 *[]*S1
-}
-
-func TestAllNT(t *testing.T) {
- v := map[string][]string{
- "f1": {"1"},
- "f2": {"2"},
- "f3": {"31", "32"},
- "f4": {"41", "42"},
- "f5": {"51", "52"},
- "f6": {"61", "62"},
- "f7.f1": {"71", "72"},
- "f8.f8.f7.f1": {"81", "82"},
- "f9": {"9"},
- "f10.0.f10.0.f6": {"101", "102"},
- "f10.0.f10.1.f6": {"103", "104"},
- "f11.0.f11.0.f6": {"111", "112"},
- "f11.0.f11.1.f6": {"113", "114"},
- "f12.0.f12.0.f6": {"121", "122"},
- "f12.0.f12.1.f6": {"123", "124"},
- "f13.0.f13.0.f6": {"131", "132"},
- "f13.0.f13.1.f6": {"133", "134"},
- }
- f2 := 2
- f41, f42 := 41, 42
- f61, f62 := 61, 62
- f71, f72 := 71, 72
- f81, f82 := 81, 82
- f101, f102, f103, f104 := 101, 102, 103, 104
- f111, f112, f113, f114 := 111, 112, 113, 114
- f121, f122, f123, f124 := 121, 122, 123, 124
- f131, f132, f133, f134 := 131, 132, 133, 134
- e := S1NT{
- F1: 1,
- F2: &f2,
- F3: []int{31, 32},
- F4: []*int{&f41, &f42},
- F5: &[]int{51, 52},
- F6: &[]*int{&f61, &f62},
- F7: S2{
- F01: &[]*int{&f71, &f72},
- },
- F8: &S1{
- F08: &S1{
- F07: S2{
- F01: &[]*int{&f81, &f82},
- },
- },
- },
- F9: 0,
- F10: []S1{
- S1{
- F10: []S1{
- S1{F06: &[]*int{&f101, &f102}},
- S1{F06: &[]*int{&f103, &f104}},
- },
- },
- },
- F11: []*S1{
- &S1{
- F11: []*S1{
- &S1{F06: &[]*int{&f111, &f112}},
- &S1{F06: &[]*int{&f113, &f114}},
- },
- },
- },
- F12: &[]S1{
- S1{
- F12: &[]S1{
- S1{F06: &[]*int{&f121, &f122}},
- S1{F06: &[]*int{&f123, &f124}},
- },
- },
- },
- F13: &[]*S1{
- &S1{
- F13: &[]*S1{
- &S1{F06: &[]*int{&f131, &f132}},
- &S1{F06: &[]*int{&f133, &f134}},
- },
- },
- },
- }
-
- s := &S1NT{}
- _ = NewDecoder().Decode(s, v)
-
- vals := func(values []*int) []int {
- r := make([]int, len(values))
- for k, v := range values {
- r[k] = *v
- }
- return r
- }
-
- if s.F1 != e.F1 {
- t.Errorf("f1: expected %v, got %v", e.F1, s.F1)
- }
- if s.F2 == nil {
- t.Errorf("f2: expected %v, got nil", *e.F2)
- } else if *s.F2 != *e.F2 {
- t.Errorf("f2: expected %v, got %v", *e.F2, *s.F2)
- }
- if s.F3 == nil {
- t.Errorf("f3: expected %v, got nil", e.F3)
- } else if len(s.F3) != 2 || s.F3[0] != e.F3[0] || s.F3[1] != e.F3[1] {
- t.Errorf("f3: expected %v, got %v", e.F3, s.F3)
- }
- if s.F4 == nil {
- t.Errorf("f4: expected %v, got nil", e.F4)
- } else {
- if len(s.F4) != 2 || *(s.F4)[0] != *(e.F4)[0] || *(s.F4)[1] != *(e.F4)[1] {
- t.Errorf("f4: expected %v, got %v", vals(e.F4), vals(s.F4))
- }
- }
- if s.F5 == nil {
- t.Errorf("f5: expected %v, got nil", e.F5)
- } else {
- sF5, eF5 := *s.F5, *e.F5
- if len(sF5) != 2 || sF5[0] != eF5[0] || sF5[1] != eF5[1] {
- t.Errorf("f5: expected %v, got %v", eF5, sF5)
- }
- }
- if s.F6 == nil {
- t.Errorf("f6: expected %v, got nil", vals(*e.F6))
- } else {
- sF6, eF6 := *s.F6, *e.F6
- if len(sF6) != 2 || *(sF6)[0] != *(eF6)[0] || *(sF6)[1] != *(eF6)[1] {
- t.Errorf("f6: expected %v, got %v", vals(eF6), vals(sF6))
- }
- }
- if s.F7.F01 == nil {
- t.Errorf("f7.f1: expected %v, got nil", vals(*e.F7.F01))
- } else {
- sF7, eF7 := *s.F7.F01, *e.F7.F01
- if len(sF7) != 2 || *(sF7)[0] != *(eF7)[0] || *(sF7)[1] != *(eF7)[1] {
- t.Errorf("f7.f1: expected %v, got %v", vals(eF7), vals(sF7))
- }
- }
- if s.F8 == nil {
- t.Errorf("f8: got nil")
- } else if s.F8.F08 == nil {
- t.Errorf("f8.f8: got nil")
- } else if s.F8.F08.F07.F01 == nil {
- t.Errorf("f8.f8.f7.f1: expected %v, got nil", vals(*e.F8.F08.F07.F01))
- } else {
- sF8, eF8 := *s.F8.F08.F07.F01, *e.F8.F08.F07.F01
- if len(sF8) != 2 || *(sF8)[0] != *(eF8)[0] || *(sF8)[1] != *(eF8)[1] {
- t.Errorf("f8.f8.f7.f1: expected %v, got %v", vals(eF8), vals(sF8))
- }
- }
- if s.F9 != e.F9 {
- t.Errorf("f9: expected %v, got %v", e.F9, s.F9)
- }
- if s.F10 == nil {
- t.Errorf("f10: got nil")
- } else if len(s.F10) != 1 {
- t.Errorf("f10: expected 1 element, got %v", s.F10)
- } else {
- if len(s.F10[0].F10) != 2 {
- t.Errorf("f10.0.f10: expected 1 element, got %v", s.F10[0].F10)
- } else {
- sF10, eF10 := *s.F10[0].F10[0].F06, *e.F10[0].F10[0].F06
- if sF10 == nil {
- t.Errorf("f10.0.f10.0.f6: expected %v, got nil", vals(eF10))
- } else {
- if len(sF10) != 2 || *(sF10)[0] != *(eF10)[0] || *(sF10)[1] != *(eF10)[1] {
- t.Errorf("f10.0.f10.0.f6: expected %v, got %v", vals(eF10), vals(sF10))
- }
- }
- sF10, eF10 = *s.F10[0].F10[1].F06, *e.F10[0].F10[1].F06
- if sF10 == nil {
- t.Errorf("f10.0.f10.0.f6: expected %v, got nil", vals(eF10))
- } else {
- if len(sF10) != 2 || *(sF10)[0] != *(eF10)[0] || *(sF10)[1] != *(eF10)[1] {
- t.Errorf("f10.0.f10.0.f6: expected %v, got %v", vals(eF10), vals(sF10))
- }
- }
- }
- }
- if s.F11 == nil {
- t.Errorf("f11: got nil")
- } else if len(s.F11) != 1 {
- t.Errorf("f11: expected 1 element, got %v", s.F11)
- } else {
- if len(s.F11[0].F11) != 2 {
- t.Errorf("f11.0.f11: expected 1 element, got %v", s.F11[0].F11)
- } else {
- sF11, eF11 := *s.F11[0].F11[0].F06, *e.F11[0].F11[0].F06
- if sF11 == nil {
- t.Errorf("f11.0.f11.0.f6: expected %v, got nil", vals(eF11))
- } else {
- if len(sF11) != 2 || *(sF11)[0] != *(eF11)[0] || *(sF11)[1] != *(eF11)[1] {
- t.Errorf("f11.0.f11.0.f6: expected %v, got %v", vals(eF11), vals(sF11))
- }
- }
- sF11, eF11 = *s.F11[0].F11[1].F06, *e.F11[0].F11[1].F06
- if sF11 == nil {
- t.Errorf("f11.0.f11.0.f6: expected %v, got nil", vals(eF11))
- } else {
- if len(sF11) != 2 || *(sF11)[0] != *(eF11)[0] || *(sF11)[1] != *(eF11)[1] {
- t.Errorf("f11.0.f11.0.f6: expected %v, got %v", vals(eF11), vals(sF11))
- }
- }
- }
- }
- if s.F12 == nil {
- t.Errorf("f12: got nil")
- } else if len(*s.F12) != 1 {
- t.Errorf("f12: expected 1 element, got %v", *s.F12)
- } else {
- sF12, eF12 := *(s.F12), *(e.F12)
- if len(*sF12[0].F12) != 2 {
- t.Errorf("f12.0.f12: expected 1 element, got %v", *sF12[0].F12)
- } else {
- sF122, eF122 := *(*sF12[0].F12)[0].F06, *(*eF12[0].F12)[0].F06
- if sF122 == nil {
- t.Errorf("f12.0.f12.0.f6: expected %v, got nil", vals(eF122))
- } else {
- if len(sF122) != 2 || *(sF122)[0] != *(eF122)[0] || *(sF122)[1] != *(eF122)[1] {
- t.Errorf("f12.0.f12.0.f6: expected %v, got %v", vals(eF122), vals(sF122))
- }
- }
- sF122, eF122 = *(*sF12[0].F12)[1].F06, *(*eF12[0].F12)[1].F06
- if sF122 == nil {
- t.Errorf("f12.0.f12.0.f6: expected %v, got nil", vals(eF122))
- } else {
- if len(sF122) != 2 || *(sF122)[0] != *(eF122)[0] || *(sF122)[1] != *(eF122)[1] {
- t.Errorf("f12.0.f12.0.f6: expected %v, got %v", vals(eF122), vals(sF122))
- }
- }
- }
- }
- if s.F13 == nil {
- t.Errorf("f13: got nil")
- } else if len(*s.F13) != 1 {
- t.Errorf("f13: expected 1 element, got %v", *s.F13)
- } else {
- sF13, eF13 := *(s.F13), *(e.F13)
- if len(*sF13[0].F13) != 2 {
- t.Errorf("f13.0.f13: expected 1 element, got %v", *sF13[0].F13)
- } else {
- sF132, eF132 := *(*sF13[0].F13)[0].F06, *(*eF13[0].F13)[0].F06
- if sF132 == nil {
- t.Errorf("f13.0.f13.0.f6: expected %v, got nil", vals(eF132))
- } else {
- if len(sF132) != 2 || *(sF132)[0] != *(eF132)[0] || *(sF132)[1] != *(eF132)[1] {
- t.Errorf("f13.0.f13.0.f6: expected %v, got %v", vals(eF132), vals(sF132))
- }
- }
- sF132, eF132 = *(*sF13[0].F13)[1].F06, *(*eF13[0].F13)[1].F06
- if sF132 == nil {
- t.Errorf("f13.0.f13.0.f6: expected %v, got nil", vals(eF132))
- } else {
- if len(sF132) != 2 || *(sF132)[0] != *(eF132)[0] || *(sF132)[1] != *(eF132)[1] {
- t.Errorf("f13.0.f13.0.f6: expected %v, got %v", vals(eF132), vals(sF132))
- }
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S12A struct {
- ID []int
-}
-
-func TestCSVSlice(t *testing.T) {
- data := map[string][]string{
- "ID": {"0,1"},
- }
-
- s := S12A{}
- NewDecoder().Decode(&s, data)
- if len(s.ID) != 2 {
- t.Errorf("Expected two values in the result list, got %+v", s.ID)
- }
- if s.ID[0] != 0 || s.ID[1] != 1 {
- t.Errorf("Expected []{0, 1} got %+v", s)
- }
-}
-
-type S12B struct {
- ID []string
-}
-
-//Decode should not split on , into a slice for string only
-func TestCSVStringSlice(t *testing.T) {
- data := map[string][]string{
- "ID": {"0,1"},
- }
-
- s := S12B{}
- NewDecoder().Decode(&s, data)
- if len(s.ID) != 1 {
- t.Errorf("Expected one value in the result list, got %+v", s.ID)
- }
- if s.ID[0] != "0,1" {
- t.Errorf("Expected []{0, 1} got %+v", s)
- }
-}
-
-//Invalid data provided by client should not panic (github issue 33)
-func TestInvalidDataProvidedByClient(t *testing.T) {
- defer func() {
- if r := recover(); r != nil {
- t.Errorf("Panicked calling decoder.Decode: %v", r)
- }
- }()
-
- type S struct {
- f string
- }
-
- data := map[string][]string{
- "f.f": {"v"},
- }
-
- err := NewDecoder().Decode(new(S), data)
- if err == nil {
- t.Errorf("invalid path in decoder.Decode should return an error.")
- }
-}
-
-// underlying cause of error in issue 33
-func TestInvalidPathInCacheParsePath(t *testing.T) {
- type S struct {
- f string
- }
-
- typ := reflect.ValueOf(new(S)).Elem().Type()
- c := newCache()
- _, err := c.parsePath("f.f", typ)
- if err == nil {
- t.Errorf("invalid path in cache.parsePath should return an error.")
- }
-}
-
-// issue 32
-func TestDecodeToTypedField(t *testing.T) {
- type Aa bool
- s1 := &struct{ Aa }{}
- v1 := map[string][]string{"Aa": {"true"}}
- NewDecoder().Decode(s1, v1)
- if s1.Aa != Aa(true) {
- t.Errorf("s1: expected %v, got %v", true, s1.Aa)
- }
-}
-
-// issue 37
-func TestRegisterConverter(t *testing.T) {
- type Aa int
- type Bb int
- s1 := &struct {
- Aa
- Bb
- }{}
- decoder := NewDecoder()
-
- decoder.RegisterConverter(s1.Aa, func(s string) reflect.Value { return reflect.ValueOf(1) })
- decoder.RegisterConverter(s1.Bb, func(s string) reflect.Value { return reflect.ValueOf(2) })
-
- v1 := map[string][]string{"Aa": {"4"}, "Bb": {"5"}}
- decoder.Decode(s1, v1)
-
- if s1.Aa != Aa(1) {
- t.Errorf("s1.Aa: expected %v, got %v", 1, s1.Aa)
- }
- if s1.Bb != Bb(2) {
- t.Errorf("s1.Bb: expected %v, got %v", 2, s1.Bb)
- }
-}
-
-// Issue #40
-func TestRegisterConverterSlice(t *testing.T) {
- decoder := NewDecoder()
- decoder.RegisterConverter([]string{}, func(input string) reflect.Value {
- return reflect.ValueOf(strings.Split(input, ","))
- })
-
- result := struct {
- Multiple []string `schema:"multiple"`
- }{}
-
- expected := []string{"one", "two", "three"}
- decoder.Decode(&result, map[string][]string{
- "multiple": []string{"one,two,three"},
- })
- for i := range expected {
- if got, want := expected[i], result.Multiple[i]; got != want {
- t.Errorf("%d: got %s, want %s", i, got, want)
- }
- }
-}
-
-func TestRegisterConverterMap(t *testing.T) {
- decoder := NewDecoder()
- decoder.IgnoreUnknownKeys(false)
- decoder.RegisterConverter(map[string]string{}, func(input string) reflect.Value {
- m := make(map[string]string)
- for _, pair := range strings.Split(input, ",") {
- parts := strings.Split(pair, ":")
- switch len(parts) {
- case 2:
- m[parts[0]] = parts[1]
- }
- }
- return reflect.ValueOf(m)
- })
-
- result := struct {
- Multiple map[string]string `schema:"multiple"`
- }{}
-
- err := decoder.Decode(&result, map[string][]string{
- "multiple": []string{"a:one,b:two"},
- })
- if err != nil {
- t.Fatal(err)
- }
- expected := map[string]string{"a": "one", "b": "two"}
- for k, v := range expected {
- got, ok := result.Multiple[k]
- if !ok {
- t.Fatalf("got %v, want %v", result.Multiple, expected)
- }
- if got != v {
- t.Errorf("got %s, want %s", got, v)
- }
- }
-}
-
-type S13 struct {
- Value []S14
-}
-
-type S14 struct {
- F1 string
- F2 string
-}
-
-func (n *S14) UnmarshalText(text []byte) error {
- textParts := strings.Split(string(text), " ")
- if len(textParts) < 2 {
- return errors.New("Not a valid name!")
- }
-
- n.F1, n.F2 = textParts[0], textParts[len(textParts)-1]
- return nil
-}
-
-type S15 struct {
- Value []S16
-}
-
-type S16 struct {
- F1 string
- F2 string
-}
-
-func TestCustomTypeSlice(t *testing.T) {
- data := map[string][]string{
- "Value.0": []string{"Louisa May Alcott"},
- "Value.1": []string{"Florence Nightingale"},
- "Value.2": []string{"Clara Barton"},
- }
-
- s := S13{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err != nil {
- t.Fatal(err)
- }
-
- if len(s.Value) != 3 {
- t.Fatalf("Expected 3 values in the result list, got %+v", s.Value)
- }
- if s.Value[0].F1 != "Louisa" || s.Value[0].F2 != "Alcott" {
- t.Errorf("Expected S14{'Louisa', 'Alcott'} got %+v", s.Value[0])
- }
- if s.Value[1].F1 != "Florence" || s.Value[1].F2 != "Nightingale" {
- t.Errorf("Expected S14{'Florence', 'Nightingale'} got %+v", s.Value[1])
- }
- if s.Value[2].F1 != "Clara" || s.Value[2].F2 != "Barton" {
- t.Errorf("Expected S14{'Clara', 'Barton'} got %+v", s.Value[2])
- }
-}
-
-func TestCustomTypeSliceWithError(t *testing.T) {
- data := map[string][]string{
- "Value.0": []string{"Louisa May Alcott"},
- "Value.1": []string{"Florence Nightingale"},
- "Value.2": []string{"Clara"},
- }
-
- s := S13{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err == nil {
- t.Error("Not detecting error in conversion")
- }
-}
-
-func TestNoTextUnmarshalerTypeSlice(t *testing.T) {
- data := map[string][]string{
- "Value.0": []string{"Louisa May Alcott"},
- "Value.1": []string{"Florence Nightingale"},
- "Value.2": []string{"Clara Barton"},
- }
-
- s := S15{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err == nil {
- t.Error("Not detecting when there's no converter")
- }
-}
-
-// ----------------------------------------------------------------------------
-
-type S17 struct {
- Value S14
-}
-
-type S18 struct {
- Value S16
-}
-
-func TestCustomType(t *testing.T) {
- data := map[string][]string{
- "Value": []string{"Louisa May Alcott"},
- }
-
- s := S17{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err != nil {
- t.Fatal(err)
- }
-
- if s.Value.F1 != "Louisa" || s.Value.F2 != "Alcott" {
- t.Errorf("Expected S14{'Louisa', 'Alcott'} got %+v", s.Value)
- }
-}
-
-func TestCustomTypeWithError(t *testing.T) {
- data := map[string][]string{
- "Value": []string{"Louisa"},
- }
-
- s := S17{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err == nil {
- t.Error("Not detecting error in conversion")
- }
-}
-
-func TestNoTextUnmarshalerType(t *testing.T) {
- data := map[string][]string{
- "Value": []string{"Louisa May Alcott"},
- }
-
- s := S18{}
- decoder := NewDecoder()
-
- if err := decoder.Decode(&s, data); err == nil {
- t.Error("Not detecting when there's no converter")
- }
-}
-
-func TestExpectedType(t *testing.T) {
- data := map[string][]string{
- "bools": []string{"1", "a"},
- "date": []string{"invalid"},
- "Foo.Bar": []string{"a", "b"},
- }
-
- type B struct {
- Bar *int
- }
- type A struct {
- Bools []bool `schema:"bools"`
- Date time.Time `schema:"date"`
- Foo B
- }
-
- a := A{}
-
- err := NewDecoder().Decode(&a, data)
-
- e := err.(MultiError)["bools"].(ConversionError)
- if e.Type != reflect.TypeOf(false) && e.Index == 1 {
- t.Errorf("Expected bool, index: 1 got %+v, index: %d", e.Type, e.Index)
- }
- e = err.(MultiError)["date"].(ConversionError)
- if e.Type != reflect.TypeOf(time.Time{}) {
- t.Errorf("Expected time.Time got %+v", e.Type)
- }
- e = err.(MultiError)["Foo.Bar"].(ConversionError)
- if e.Type != reflect.TypeOf(0) {
- t.Errorf("Expected int got %+v", e.Type)
- }
-}
-
-type R1 struct {
- A string `schema:"a,required"`
- B struct {
- C int `schema:"c,required"`
- D float64 `schema:"d"`
- E string `schema:"e,required"`
- } `schema:"b"`
- F []string `schema:"f,required"`
- G []int `schema:"g,othertag"`
- H bool `schema:"h,required"`
-}
-
-func TestRequiredField(t *testing.T) {
- var a R1
- v := map[string][]string{
- "a": []string{"bbb"},
- "b.c": []string{"88"},
- "b.d": []string{"9"},
- "f": []string{""},
- "h": []string{"true"},
- }
- err := NewDecoder().Decode(&a, v)
- if err == nil {
- t.Errorf("error nil, b.e is empty expect")
- return
- }
- // b.e empty
- v["b.e"] = []string{""} // empty string
- err = NewDecoder().Decode(&a, v)
- if err == nil {
- t.Errorf("error nil, b.e is empty expect")
- return
- }
-
- // all fields ok
- v["b.e"] = []string{"nonempty"}
- err = NewDecoder().Decode(&a, v)
- if err != nil {
- t.Errorf("error: %v", err)
- return
- }
-
- // set f empty
- v["f"] = []string{}
- err = NewDecoder().Decode(&a, v)
- if err == nil {
- t.Errorf("error nil, f is empty expect")
- return
- }
- v["f"] = []string{"nonempty"}
-
- // b.c type int with empty string
- v["b.c"] = []string{""}
- err = NewDecoder().Decode(&a, v)
- if err == nil {
- t.Errorf("error nil, b.c is empty expect")
- return
- }
- v["b.c"] = []string{"3"}
-
- // h type bool with empty string
- v["h"] = []string{""}
- err = NewDecoder().Decode(&a, v)
- if err == nil {
- t.Errorf("error nil, h is empty expect")
- return
- }
-}
-
-type AS1 struct {
- A int32 `schema:"a,required"`
- E int32 `schema:"e,required"`
-}
-type AS2 struct {
- AS1
- B string `schema:"b,required"`
-}
-type AS3 struct {
- C int32 `schema:"c"`
-}
-
-type AS4 struct {
- AS3
- D string `schema:"d"`
-}
-
-func TestAnonymousStructField(t *testing.T) {
- patterns := []map[string][]string{
- {
- "a": {"1"},
- "e": {"2"},
- "b": {"abc"},
- },
- {
- "AS1.a": {"1"},
- "AS1.e": {"2"},
- "b": {"abc"},
- },
- }
- for _, v := range patterns {
- a := AS2{}
- err := NewDecoder().Decode(&a, v)
- if err != nil {
- t.Errorf("Decode failed %s, %#v", err, v)
- continue
- }
- if a.A != 1 {
- t.Errorf("A: expected %v, got %v", 1, a.A)
- }
- if a.E != 2 {
- t.Errorf("E: expected %v, got %v", 2, a.E)
- }
- if a.B != "abc" {
- t.Errorf("B: expected %v, got %v", "abc", a.B)
- }
- if a.AS1.A != 1 {
- t.Errorf("AS1.A: expected %v, got %v", 1, a.AS1.A)
- }
- if a.AS1.E != 2 {
- t.Errorf("AS1.E: expected %v, got %v", 2, a.AS1.E)
- }
- }
- a := AS2{}
- err := NewDecoder().Decode(&a, map[string][]string{
- "e": {"2"},
- "b": {"abc"},
- })
- if err == nil {
- t.Errorf("error nil, a is empty expect")
- }
- patterns = []map[string][]string{
- {
- "c": {"1"},
- "d": {"abc"},
- },
- {
- "AS3.c": {"1"},
- "d": {"abc"},
- },
- }
- for _, v := range patterns {
- a := AS4{}
- err := NewDecoder().Decode(&a, v)
- if err != nil {
- t.Errorf("Decode failed %s, %#v", err, v)
- continue
- }
- if a.C != 1 {
- t.Errorf("C: expected %v, got %v", 1, a.C)
- }
- if a.D != "abc" {
- t.Errorf("D: expected %v, got %v", "abc", a.D)
- }
- if a.AS3.C != 1 {
- t.Errorf("AS3.C: expected %v, got %v", 1, a.AS3.C)
- }
- }
-}
-
-// Test to ensure that a registered converter overrides the default text unmarshaler.
-func TestRegisterConverterOverridesTextUnmarshaler(t *testing.T) {
- type MyTime time.Time
- s1 := &struct {
- MyTime
- }{}
- decoder := NewDecoder()
-
- ts := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
- decoder.RegisterConverter(s1.MyTime, func(s string) reflect.Value { return reflect.ValueOf(ts) })
-
- v1 := map[string][]string{"MyTime": {"4"}, "Bb": {"5"}}
- decoder.Decode(s1, v1)
-
- if s1.MyTime != MyTime(ts) {
- t.Errorf("s1.Aa: expected %v, got %v", ts, s1.MyTime)
- }
-}
-
-type S20E string
-
-func (e *S20E) UnmarshalText(text []byte) error {
- *e = S20E("x")
- return nil
-}
-
-type S20 []S20E
-
-func (s *S20) UnmarshalText(text []byte) error {
- *s = S20{"a", "b", "c"}
- return nil
-}
-
-// Test to ensure that when a custom type based on a slice implements an
-// encoding.TextUnmarshaler interface that it takes precedence over any
-// implementations by its elements.
-func TestTextUnmarshalerTypeSlice(t *testing.T) {
- data := map[string][]string{
- "Value": []string{"a,b,c"},
- }
- s := struct {
- Value S20
- }{}
- decoder := NewDecoder()
- if err := decoder.Decode(&s, data); err != nil {
- t.Error("Error while decoding:", err)
- }
- expected := S20{"a", "b", "c"}
- if !reflect.DeepEqual(expected, s.Value) {
- t.Errorf("Expected %v errors, got %v", expected, s.Value)
- }
-}
diff --git a/vendor/github.com/gorilla/schema/encoder_test.go b/vendor/github.com/gorilla/schema/encoder_test.go
deleted file mode 100644
index ac4cd6137..000000000
--- a/vendor/github.com/gorilla/schema/encoder_test.go
+++ /dev/null
@@ -1,420 +0,0 @@
-package schema
-
-import (
- "fmt"
- "reflect"
- "testing"
-)
-
-type E1 struct {
- F01 int `schema:"f01"`
- F02 int `schema:"-"`
- F03 string `schema:"f03"`
- F04 string `schema:"f04,omitempty"`
- F05 bool `schema:"f05"`
- F06 bool `schema:"f06"`
- F07 *string `schema:"f07"`
- F08 *int8 `schema:"f08"`
- F09 float64 `schema:"f09"`
- F10 func() `schema:"f10"`
- F11 inner
-}
-type inner struct {
- F12 int
-}
-
-func TestFilled(t *testing.T) {
- f07 := "seven"
- var f08 int8 = 8
- s := &E1{
- F01: 1,
- F02: 2,
- F03: "three",
- F04: "four",
- F05: true,
- F06: false,
- F07: &f07,
- F08: &f08,
- F09: 1.618,
- F10: func() {},
- F11: inner{12},
- }
-
- vals := make(map[string][]string)
- errs := NewEncoder().Encode(s, vals)
-
- valExists(t, "f01", "1", vals)
- valNotExists(t, "f02", vals)
- valExists(t, "f03", "three", vals)
- valExists(t, "f05", "true", vals)
- valExists(t, "f06", "false", vals)
- valExists(t, "f07", "seven", vals)
- valExists(t, "f08", "8", vals)
- valExists(t, "f09", "1.618000", vals)
- valExists(t, "F12", "12", vals)
-
- emptyErr := MultiError{}
- if errs.Error() == emptyErr.Error() {
- t.Errorf("Expected error got %v", errs)
- }
-}
-
-type Aa int
-
-type E3 struct {
- F01 bool `schema:"f01"`
- F02 float32 `schema:"f02"`
- F03 float64 `schema:"f03"`
- F04 int `schema:"f04"`
- F05 int8 `schema:"f05"`
- F06 int16 `schema:"f06"`
- F07 int32 `schema:"f07"`
- F08 int64 `schema:"f08"`
- F09 string `schema:"f09"`
- F10 uint `schema:"f10"`
- F11 uint8 `schema:"f11"`
- F12 uint16 `schema:"f12"`
- F13 uint32 `schema:"f13"`
- F14 uint64 `schema:"f14"`
- F15 Aa `schema:"f15"`
-}
-
-// Test compatibility with default decoder types.
-func TestCompat(t *testing.T) {
- src := &E3{
- F01: true,
- F02: 4.2,
- F03: 4.3,
- F04: -42,
- F05: -43,
- F06: -44,
- F07: -45,
- F08: -46,
- F09: "foo",
- F10: 42,
- F11: 43,
- F12: 44,
- F13: 45,
- F14: 46,
- F15: 1,
- }
- dst := &E3{}
-
- vals := make(map[string][]string)
- encoder := NewEncoder()
- decoder := NewDecoder()
-
- encoder.RegisterEncoder(src.F15, func(reflect.Value) string { return "1" })
- decoder.RegisterConverter(src.F15, func(string) reflect.Value { return reflect.ValueOf(1) })
-
- err := encoder.Encode(src, vals)
- if err != nil {
- t.Errorf("Encoder has non-nil error: %v", err)
- }
- err = decoder.Decode(dst, vals)
- if err != nil {
- t.Errorf("Decoder has non-nil error: %v", err)
- }
-
- if *src != *dst {
- t.Errorf("Decoder-Encoder compatibility: expected %v, got %v\n", src, dst)
- }
-}
-
-func TestEmpty(t *testing.T) {
- s := &E1{
- F01: 1,
- F02: 2,
- F03: "three",
- }
-
- estr := "schema: encoder not found for <nil>"
- vals := make(map[string][]string)
- err := NewEncoder().Encode(s, vals)
- if err.Error() != estr {
- t.Errorf("Expected: %s, got %v", estr, err)
- }
-
- valExists(t, "f03", "three", vals)
- valNotExists(t, "f04", vals)
-}
-
-func TestStruct(t *testing.T) {
- estr := "schema: interface must be a struct"
- vals := make(map[string][]string)
- err := NewEncoder().Encode("hello world", vals)
-
- if err.Error() != estr {
- t.Errorf("Expected: %s, got %v", estr, err)
- }
-}
-
-func TestSlices(t *testing.T) {
- type oneAsWord int
- ones := []oneAsWord{1, 2}
- s1 := &struct {
- ones []oneAsWord `schema:"ones"`
- ints []int `schema:"ints"`
- nonempty []int `schema:"nonempty"`
- empty []int `schema:"empty,omitempty"`
- }{ones, []int{1, 1}, []int{}, []int{}}
- vals := make(map[string][]string)
-
- encoder := NewEncoder()
- encoder.RegisterEncoder(ones[0], func(v reflect.Value) string { return "one" })
- err := encoder.Encode(s1, vals)
- if err != nil {
- t.Errorf("Encoder has non-nil error: %v", err)
- }
-
- valsExist(t, "ones", []string{"one", "one"}, vals)
- valsExist(t, "ints", []string{"1", "1"}, vals)
- valsExist(t, "nonempty", []string{}, vals)
- valNotExists(t, "empty", vals)
-}
-
-func TestCompatSlices(t *testing.T) {
- type oneAsWord int
- type s1 struct {
- Ones []oneAsWord `schema:"ones"`
- Ints []int `schema:"ints"`
- }
- ones := []oneAsWord{1, 1}
- src := &s1{ones, []int{1, 1}}
- vals := make(map[string][]string)
- dst := &s1{}
-
- encoder := NewEncoder()
- encoder.RegisterEncoder(ones[0], func(v reflect.Value) string { return "one" })
-
- decoder := NewDecoder()
- decoder.RegisterConverter(ones[0], func(s string) reflect.Value {
- if s == "one" {
- return reflect.ValueOf(1)
- }
- return reflect.ValueOf(2)
- })
-
- err := encoder.Encode(src, vals)
- if err != nil {
- t.Errorf("Encoder has non-nil error: %v", err)
- }
- err = decoder.Decode(dst, vals)
- if err != nil {
- t.Errorf("Dncoder has non-nil error: %v", err)
- }
-
- if len(src.Ints) != len(dst.Ints) || len(src.Ones) != len(src.Ones) {
- t.Fatalf("Expected %v, got %v", src, dst)
- }
-
- for i, v := range src.Ones {
- if dst.Ones[i] != v {
- t.Fatalf("Expected %v, got %v", v, dst.Ones[i])
- }
- }
-
- for i, v := range src.Ints {
- if dst.Ints[i] != v {
- t.Fatalf("Expected %v, got %v", v, dst.Ints[i])
- }
- }
-}
-
-func TestRegisterEncoder(t *testing.T) {
- type oneAsWord int
- type twoAsWord int
- type oneSliceAsWord []int
-
- s1 := &struct {
- oneAsWord
- twoAsWord
- oneSliceAsWord
- }{1, 2, []int{1, 1}}
- v1 := make(map[string][]string)
-
- encoder := NewEncoder()
- encoder.RegisterEncoder(s1.oneAsWord, func(v reflect.Value) string { return "one" })
- encoder.RegisterEncoder(s1.twoAsWord, func(v reflect.Value) string { return "two" })
- encoder.RegisterEncoder(s1.oneSliceAsWord, func(v reflect.Value) string { return "one" })
-
- err := encoder.Encode(s1, v1)
- if err != nil {
- t.Errorf("Encoder has non-nil error: %v", err)
- }
-
- valExists(t, "oneAsWord", "one", v1)
- valExists(t, "twoAsWord", "two", v1)
- valExists(t, "oneSliceAsWord", "one", v1)
-}
-
-func TestEncoderOrder(t *testing.T) {
- type builtinEncoderSimple int
- type builtinEncoderSimpleOverridden int
- type builtinEncoderSlice []int
- type builtinEncoderSliceOverridden []int
- type builtinEncoderStruct struct{ nr int }
- type builtinEncoderStructOverridden struct{ nr int }
-
- s1 := &struct {
- builtinEncoderSimple `schema:"simple"`
- builtinEncoderSimpleOverridden `schema:"simple_overridden"`
- builtinEncoderSlice `schema:"slice"`
- builtinEncoderSliceOverridden `schema:"slice_overridden"`
- builtinEncoderStruct `schema:"struct"`
- builtinEncoderStructOverridden `schema:"struct_overridden"`
- }{
- 1,
- 1,
- []int{2},
- []int{2},
- builtinEncoderStruct{3},
- builtinEncoderStructOverridden{3},
- }
- v1 := make(map[string][]string)
-
- encoder := NewEncoder()
- encoder.RegisterEncoder(s1.builtinEncoderSimpleOverridden, func(v reflect.Value) string { return "one" })
- encoder.RegisterEncoder(s1.builtinEncoderSliceOverridden, func(v reflect.Value) string { return "two" })
- encoder.RegisterEncoder(s1.builtinEncoderStructOverridden, func(v reflect.Value) string { return "three" })
-
- err := encoder.Encode(s1, v1)
- if err != nil {
- t.Errorf("Encoder has non-nil error: %v", err)
- }
-
- valExists(t, "simple", "1", v1)
- valExists(t, "simple_overridden", "one", v1)
- valExists(t, "slice", "2", v1)
- valExists(t, "slice_overridden", "two", v1)
- valExists(t, "nr", "3", v1)
- valExists(t, "struct_overridden", "three", v1)
-}
-
-func valExists(t *testing.T, key string, expect string, result map[string][]string) {
- valsExist(t, key, []string{expect}, result)
-}
-
-func valsExist(t *testing.T, key string, expect []string, result map[string][]string) {
- vals, ok := result[key]
- if !ok {
- t.Fatalf("Key not found. Expected: %s", key)
- }
-
- if len(expect) != len(vals) {
- t.Fatalf("Expected: %v, got: %v", expect, vals)
- }
-
- for i, v := range expect {
- if vals[i] != v {
- t.Fatalf("Unexpected value. Expected: %v, got %v", v, vals[i])
- }
- }
-}
-
-func valNotExists(t *testing.T, key string, result map[string][]string) {
- if val, ok := result[key]; ok {
- t.Error("Key not ommited. Expected: empty; got: " + val[0] + ".")
- }
-}
-
-type E4 struct {
- ID string `json:"id"`
-}
-
-func TestEncoderSetAliasTag(t *testing.T) {
- data := map[string][]string{}
-
- s := E4{
- ID: "foo",
- }
- encoder := NewEncoder()
- encoder.SetAliasTag("json")
- encoder.Encode(&s, data)
- valExists(t, "id", "foo", data)
-}
-
-type E5 struct {
- F01 int `schema:"f01,omitempty"`
- F02 string `schema:"f02,omitempty"`
- F03 *string `schema:"f03,omitempty"`
- F04 *int8 `schema:"f04,omitempty"`
- F05 float64 `schema:"f05,omitempty"`
- F06 E5F06 `schema:"f06,omitempty"`
- F07 E5F06 `schema:"f07,omitempty"`
- F08 []string `schema:"f08,omitempty"`
- F09 []string `schema:"f09,omitempty"`
-}
-
-type E5F06 struct {
- F0601 string `schema:"f0601,omitempty"`
-}
-
-func TestEncoderWithOmitempty(t *testing.T) {
- vals := map[string][]string{}
-
- s := E5{
- F02: "test",
- F07: E5F06{
- F0601: "test",
- },
- F09: []string{"test"},
- }
-
- encoder := NewEncoder()
- encoder.Encode(&s, vals)
-
- valNotExists(t, "f01", vals)
- valExists(t, "f02", "test", vals)
- valNotExists(t, "f03", vals)
- valNotExists(t, "f04", vals)
- valNotExists(t, "f05", vals)
- valNotExists(t, "f06", vals)
- valExists(t, "f0601", "test", vals)
- valNotExists(t, "f08", vals)
- valsExist(t, "f09", []string{"test"}, vals)
-}
-
-type E6 struct {
- F01 *inner
- F02 *inner
- F03 *inner `schema:",omitempty"`
-}
-
-func TestStructPointer(t *testing.T) {
- vals := map[string][]string{}
- s := E6{
- F01: &inner{2},
- }
-
- encoder := NewEncoder()
- encoder.Encode(&s, vals)
- valExists(t, "F12", "2", vals)
- valExists(t, "F02", "null", vals)
- valNotExists(t, "F03", vals)
-}
-
-func TestRegisterEncoderCustomArrayType(t *testing.T) {
- type CustomInt []int
- type S1 struct {
- SomeInts CustomInt `schema:",omitempty"`
- }
-
- ss := []S1{
- {},
- {CustomInt{}},
- {CustomInt{1, 2, 3}},
- }
-
- for s := range ss {
- vals := map[string][]string{}
-
- encoder := NewEncoder()
- encoder.RegisterEncoder(CustomInt{}, func(value reflect.Value) string {
- return fmt.Sprint(value.Interface())
- })
-
- encoder.Encode(s, vals)
- t.Log(vals)
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/gorilla/websocket/.gitignore
index ac710204f..cd3fcd1ef 100644
--- a/vendor/github.com/gorilla/websocket/.gitignore
+++ b/vendor/github.com/gorilla/websocket/.gitignore
@@ -22,4 +22,4 @@ _testmain.go
*.exe
.idea/
-*.iml \ No newline at end of file
+*.iml
diff --git a/vendor/github.com/gorilla/websocket/.travis.yml b/vendor/github.com/gorilla/websocket/.travis.yml
index 9f233f983..1f730470a 100644
--- a/vendor/github.com/gorilla/websocket/.travis.yml
+++ b/vendor/github.com/gorilla/websocket/.travis.yml
@@ -4,11 +4,12 @@ sudo: false
matrix:
include:
- go: 1.4
- - go: 1.5
- - go: 1.6
- - go: 1.7
- - go: 1.8
- - go: 1.9
+ - go: 1.5.x
+ - go: 1.6.x
+ - go: 1.7.x
+ - go: 1.8.x
+ - go: 1.9.x
+ - go: 1.10.x
- go: tip
allow_failures:
- go: tip
diff --git a/vendor/github.com/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md
index 33c3d2be3..20e391f86 100644
--- a/vendor/github.com/gorilla/websocket/README.md
+++ b/vendor/github.com/gorilla/websocket/README.md
@@ -51,7 +51,7 @@ subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn
<tr><td>Write message using io.WriteCloser</td><td><a href="http://godoc.org/github.com/gorilla/websocket#Conn.NextWriter">Yes</a></td><td>No, see note 3</td></tr>
</table>
-Notes:
+Notes:
1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html).
2. The application can get the type of a received data message by implementing
diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go
index 934e28e96..8e90de27f 100644
--- a/vendor/github.com/gorilla/websocket/client.go
+++ b/vendor/github.com/gorilla/websocket/client.go
@@ -106,9 +106,13 @@ func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) {
// DefaultDialer is a dialer with all fields set to the default values.
var DefaultDialer = &Dialer{
- Proxy: http.ProxyFromEnvironment,
+ Proxy: http.ProxyFromEnvironment,
+ HandshakeTimeout: 45 * time.Second,
}
+// nilDialer is dialer to use when receiver is nil.
+var nilDialer Dialer = *DefaultDialer
+
// Dial creates a new client connection. Use requestHeader to specify the
// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie).
// Use the response.Header to get the selected subprotocol
@@ -121,9 +125,7 @@ var DefaultDialer = &Dialer{
func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) {
if d == nil {
- d = &Dialer{
- Proxy: http.ProxyFromEnvironment,
- }
+ d = &nilDialer
}
challengeKey, err := generateChallengeKey()
@@ -191,6 +193,8 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
k == "Sec-Websocket-Extensions" ||
(k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0):
return nil, nil, errors.New("websocket: duplicate header not allowed: " + k)
+ case k == "Sec-Websocket-Protocol":
+ req.Header["Sec-WebSocket-Protocol"] = vs
default:
req.Header[k] = vs
}
diff --git a/vendor/github.com/gorilla/websocket/client_server_test.go b/vendor/github.com/gorilla/websocket/client_server_test.go
deleted file mode 100644
index 50063b7e0..000000000
--- a/vendor/github.com/gorilla/websocket/client_server_test.go
+++ /dev/null
@@ -1,602 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bytes"
- "crypto/tls"
- "crypto/x509"
- "encoding/base64"
- "encoding/binary"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "net/http/cookiejar"
- "net/http/httptest"
- "net/url"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-var cstUpgrader = Upgrader{
- Subprotocols: []string{"p0", "p1"},
- ReadBufferSize: 1024,
- WriteBufferSize: 1024,
- EnableCompression: true,
- Error: func(w http.ResponseWriter, r *http.Request, status int, reason error) {
- http.Error(w, reason.Error(), status)
- },
-}
-
-var cstDialer = Dialer{
- Subprotocols: []string{"p1", "p2"},
- ReadBufferSize: 1024,
- WriteBufferSize: 1024,
- HandshakeTimeout: 30 * time.Second,
-}
-
-type cstHandler struct{ *testing.T }
-
-type cstServer struct {
- *httptest.Server
- URL string
-}
-
-const (
- cstPath = "/a/b"
- cstRawQuery = "x=y"
- cstRequestURI = cstPath + "?" + cstRawQuery
-)
-
-func newServer(t *testing.T) *cstServer {
- var s cstServer
- s.Server = httptest.NewServer(cstHandler{t})
- s.Server.URL += cstRequestURI
- s.URL = makeWsProto(s.Server.URL)
- return &s
-}
-
-func newTLSServer(t *testing.T) *cstServer {
- var s cstServer
- s.Server = httptest.NewTLSServer(cstHandler{t})
- s.Server.URL += cstRequestURI
- s.URL = makeWsProto(s.Server.URL)
- return &s
-}
-
-func (t cstHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != cstPath {
- t.Logf("path=%v, want %v", r.URL.Path, cstPath)
- http.Error(w, "bad path", 400)
- return
- }
- if r.URL.RawQuery != cstRawQuery {
- t.Logf("query=%v, want %v", r.URL.RawQuery, cstRawQuery)
- http.Error(w, "bad path", 400)
- return
- }
- subprotos := Subprotocols(r)
- if !reflect.DeepEqual(subprotos, cstDialer.Subprotocols) {
- t.Logf("subprotols=%v, want %v", subprotos, cstDialer.Subprotocols)
- http.Error(w, "bad protocol", 400)
- return
- }
- ws, err := cstUpgrader.Upgrade(w, r, http.Header{"Set-Cookie": {"sessionID=1234"}})
- if err != nil {
- t.Logf("Upgrade: %v", err)
- return
- }
- defer ws.Close()
-
- if ws.Subprotocol() != "p1" {
- t.Logf("Subprotocol() = %s, want p1", ws.Subprotocol())
- ws.Close()
- return
- }
- op, rd, err := ws.NextReader()
- if err != nil {
- t.Logf("NextReader: %v", err)
- return
- }
- wr, err := ws.NextWriter(op)
- if err != nil {
- t.Logf("NextWriter: %v", err)
- return
- }
- if _, err = io.Copy(wr, rd); err != nil {
- t.Logf("NextWriter: %v", err)
- return
- }
- if err := wr.Close(); err != nil {
- t.Logf("Close: %v", err)
- return
- }
-}
-
-func makeWsProto(s string) string {
- return "ws" + strings.TrimPrefix(s, "http")
-}
-
-func sendRecv(t *testing.T, ws *Conn) {
- const message = "Hello World!"
- if err := ws.SetWriteDeadline(time.Now().Add(time.Second)); err != nil {
- t.Fatalf("SetWriteDeadline: %v", err)
- }
- if err := ws.WriteMessage(TextMessage, []byte(message)); err != nil {
- t.Fatalf("WriteMessage: %v", err)
- }
- if err := ws.SetReadDeadline(time.Now().Add(time.Second)); err != nil {
- t.Fatalf("SetReadDeadline: %v", err)
- }
- _, p, err := ws.ReadMessage()
- if err != nil {
- t.Fatalf("ReadMessage: %v", err)
- }
- if string(p) != message {
- t.Fatalf("message=%s, want %s", p, message)
- }
-}
-
-func TestProxyDial(t *testing.T) {
-
- s := newServer(t)
- defer s.Close()
-
- surl, _ := url.Parse(s.Server.URL)
-
- cstDialer := cstDialer // make local copy for modification on next line.
- cstDialer.Proxy = http.ProxyURL(surl)
-
- connect := false
- origHandler := s.Server.Config.Handler
-
- // Capture the request Host header.
- s.Server.Config.Handler = http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "CONNECT" {
- connect = true
- w.WriteHeader(200)
- return
- }
-
- if !connect {
- t.Log("connect not received")
- http.Error(w, "connect not received", 405)
- return
- }
- origHandler.ServeHTTP(w, r)
- })
-
- ws, _, err := cstDialer.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func TestProxyAuthorizationDial(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- surl, _ := url.Parse(s.Server.URL)
- surl.User = url.UserPassword("username", "password")
-
- cstDialer := cstDialer // make local copy for modification on next line.
- cstDialer.Proxy = http.ProxyURL(surl)
-
- connect := false
- origHandler := s.Server.Config.Handler
-
- // Capture the request Host header.
- s.Server.Config.Handler = http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- proxyAuth := r.Header.Get("Proxy-Authorization")
- expectedProxyAuth := "Basic " + base64.StdEncoding.EncodeToString([]byte("username:password"))
- if r.Method == "CONNECT" && proxyAuth == expectedProxyAuth {
- connect = true
- w.WriteHeader(200)
- return
- }
-
- if !connect {
- t.Log("connect with proxy authorization not received")
- http.Error(w, "connect with proxy authorization not received", 405)
- return
- }
- origHandler.ServeHTTP(w, r)
- })
-
- ws, _, err := cstDialer.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func TestDial(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- ws, _, err := cstDialer.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func TestDialCookieJar(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- jar, _ := cookiejar.New(nil)
- d := cstDialer
- d.Jar = jar
-
- u, _ := url.Parse(s.URL)
-
- switch u.Scheme {
- case "ws":
- u.Scheme = "http"
- case "wss":
- u.Scheme = "https"
- }
-
- cookies := []*http.Cookie{{Name: "gorilla", Value: "ws", Path: "/"}}
- d.Jar.SetCookies(u, cookies)
-
- ws, _, err := d.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
-
- var gorilla string
- var sessionID string
- for _, c := range d.Jar.Cookies(u) {
- if c.Name == "gorilla" {
- gorilla = c.Value
- }
-
- if c.Name == "sessionID" {
- sessionID = c.Value
- }
- }
- if gorilla != "ws" {
- t.Error("Cookie not present in jar.")
- }
-
- if sessionID != "1234" {
- t.Error("Set-Cookie not received from the server.")
- }
-
- sendRecv(t, ws)
-}
-
-func TestDialTLS(t *testing.T) {
- s := newTLSServer(t)
- defer s.Close()
-
- certs := x509.NewCertPool()
- for _, c := range s.TLS.Certificates {
- roots, err := x509.ParseCertificates(c.Certificate[len(c.Certificate)-1])
- if err != nil {
- t.Fatalf("error parsing server's root cert: %v", err)
- }
- for _, root := range roots {
- certs.AddCert(root)
- }
- }
-
- d := cstDialer
- d.TLSClientConfig = &tls.Config{RootCAs: certs}
- ws, _, err := d.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func xTestDialTLSBadCert(t *testing.T) {
- // This test is deactivated because of noisy logging from the net/http package.
- s := newTLSServer(t)
- defer s.Close()
-
- ws, _, err := cstDialer.Dial(s.URL, nil)
- if err == nil {
- ws.Close()
- t.Fatalf("Dial: nil")
- }
-}
-
-func TestDialTLSNoVerify(t *testing.T) {
- s := newTLSServer(t)
- defer s.Close()
-
- d := cstDialer
- d.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
- ws, _, err := d.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func TestDialTimeout(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- d := cstDialer
- d.HandshakeTimeout = -1
- ws, _, err := d.Dial(s.URL, nil)
- if err == nil {
- ws.Close()
- t.Fatalf("Dial: nil")
- }
-}
-
-func TestDialBadScheme(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- ws, _, err := cstDialer.Dial(s.Server.URL, nil)
- if err == nil {
- ws.Close()
- t.Fatalf("Dial: nil")
- }
-}
-
-func TestDialBadOrigin(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- ws, resp, err := cstDialer.Dial(s.URL, http.Header{"Origin": {"bad"}})
- if err == nil {
- ws.Close()
- t.Fatalf("Dial: nil")
- }
- if resp == nil {
- t.Fatalf("resp=nil, err=%v", err)
- }
- if resp.StatusCode != http.StatusForbidden {
- t.Fatalf("status=%d, want %d", resp.StatusCode, http.StatusForbidden)
- }
-}
-
-func TestDialBadHeader(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- for _, k := range []string{"Upgrade",
- "Connection",
- "Sec-Websocket-Key",
- "Sec-Websocket-Version",
- "Sec-Websocket-Protocol"} {
- h := http.Header{}
- h.Set(k, "bad")
- ws, _, err := cstDialer.Dial(s.URL, http.Header{"Origin": {"bad"}})
- if err == nil {
- ws.Close()
- t.Errorf("Dial with header %s returned nil", k)
- }
- }
-}
-
-func TestBadMethod(t *testing.T) {
- s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ws, err := cstUpgrader.Upgrade(w, r, nil)
- if err == nil {
- t.Errorf("handshake succeeded, expect fail")
- ws.Close()
- }
- }))
- defer s.Close()
-
- req, err := http.NewRequest("POST", s.URL, strings.NewReader(""))
- if err != nil {
- t.Fatalf("NewRequest returned error %v", err)
- }
- req.Header.Set("Connection", "upgrade")
- req.Header.Set("Upgrade", "websocket")
- req.Header.Set("Sec-Websocket-Version", "13")
-
- resp, err := http.DefaultClient.Do(req)
- if err != nil {
- t.Fatalf("Do returned error %v", err)
- }
- resp.Body.Close()
- if resp.StatusCode != http.StatusMethodNotAllowed {
- t.Errorf("Status = %d, want %d", resp.StatusCode, http.StatusMethodNotAllowed)
- }
-}
-
-func TestHandshake(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- ws, resp, err := cstDialer.Dial(s.URL, http.Header{"Origin": {s.URL}})
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
-
- var sessionID string
- for _, c := range resp.Cookies() {
- if c.Name == "sessionID" {
- sessionID = c.Value
- }
- }
- if sessionID != "1234" {
- t.Error("Set-Cookie not received from the server.")
- }
-
- if ws.Subprotocol() != "p1" {
- t.Errorf("ws.Subprotocol() = %s, want p1", ws.Subprotocol())
- }
- sendRecv(t, ws)
-}
-
-func TestRespOnBadHandshake(t *testing.T) {
- const expectedStatus = http.StatusGone
- const expectedBody = "This is the response body."
-
- s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(expectedStatus)
- io.WriteString(w, expectedBody)
- }))
- defer s.Close()
-
- ws, resp, err := cstDialer.Dial(makeWsProto(s.URL), nil)
- if err == nil {
- ws.Close()
- t.Fatalf("Dial: nil")
- }
-
- if resp == nil {
- t.Fatalf("resp=nil, err=%v", err)
- }
-
- if resp.StatusCode != expectedStatus {
- t.Errorf("resp.StatusCode=%d, want %d", resp.StatusCode, expectedStatus)
- }
-
- p, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- t.Fatalf("ReadFull(resp.Body) returned error %v", err)
- }
-
- if string(p) != expectedBody {
- t.Errorf("resp.Body=%s, want %s", p, expectedBody)
- }
-}
-
-// TestHostHeader confirms that the host header provided in the call to Dial is
-// sent to the server.
-func TestHostHeader(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- specifiedHost := make(chan string, 1)
- origHandler := s.Server.Config.Handler
-
- // Capture the request Host header.
- s.Server.Config.Handler = http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- specifiedHost <- r.Host
- origHandler.ServeHTTP(w, r)
- })
-
- ws, _, err := cstDialer.Dial(s.URL, http.Header{"Host": {"testhost"}})
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
-
- if gotHost := <-specifiedHost; gotHost != "testhost" {
- t.Fatalf("gotHost = %q, want \"testhost\"", gotHost)
- }
-
- sendRecv(t, ws)
-}
-
-func TestDialCompression(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- dialer := cstDialer
- dialer.EnableCompression = true
- ws, _, err := dialer.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
-
-func TestSocksProxyDial(t *testing.T) {
- s := newServer(t)
- defer s.Close()
-
- proxyListener, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("listen failed: %v", err)
- }
- defer proxyListener.Close()
- go func() {
- c1, err := proxyListener.Accept()
- if err != nil {
- t.Errorf("proxy accept failed: %v", err)
- return
- }
- defer c1.Close()
-
- c1.SetDeadline(time.Now().Add(30 * time.Second))
-
- buf := make([]byte, 32)
- if _, err := io.ReadFull(c1, buf[:3]); err != nil {
- t.Errorf("read failed: %v", err)
- return
- }
- if want := []byte{5, 1, 0}; !bytes.Equal(want, buf[:len(want)]) {
- t.Errorf("read %x, want %x", buf[:len(want)], want)
- }
- if _, err := c1.Write([]byte{5, 0}); err != nil {
- t.Errorf("write failed: %v", err)
- return
- }
- if _, err := io.ReadFull(c1, buf[:10]); err != nil {
- t.Errorf("read failed: %v", err)
- return
- }
- if want := []byte{5, 1, 0, 1}; !bytes.Equal(want, buf[:len(want)]) {
- t.Errorf("read %x, want %x", buf[:len(want)], want)
- return
- }
- buf[1] = 0
- if _, err := c1.Write(buf[:10]); err != nil {
- t.Errorf("write failed: %v", err)
- return
- }
-
- ip := net.IP(buf[4:8])
- port := binary.BigEndian.Uint16(buf[8:10])
-
- c2, err := net.DialTCP("tcp", nil, &net.TCPAddr{IP: ip, Port: int(port)})
- if err != nil {
- t.Errorf("dial failed; %v", err)
- return
- }
- defer c2.Close()
- done := make(chan struct{})
- go func() {
- io.Copy(c1, c2)
- close(done)
- }()
- io.Copy(c2, c1)
- <-done
- }()
-
- purl, err := url.Parse("socks5://" + proxyListener.Addr().String())
- if err != nil {
- t.Fatalf("parse failed: %v", err)
- }
-
- cstDialer := cstDialer // make local copy for modification on next line.
- cstDialer.Proxy = http.ProxyURL(purl)
-
- ws, _, err := cstDialer.Dial(s.URL, nil)
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- defer ws.Close()
- sendRecv(t, ws)
-}
diff --git a/vendor/github.com/gorilla/websocket/client_test.go b/vendor/github.com/gorilla/websocket/client_test.go
deleted file mode 100644
index 5aa27b37d..000000000
--- a/vendor/github.com/gorilla/websocket/client_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "net/url"
- "testing"
-)
-
-var hostPortNoPortTests = []struct {
- u *url.URL
- hostPort, hostNoPort string
-}{
- {&url.URL{Scheme: "ws", Host: "example.com"}, "example.com:80", "example.com"},
- {&url.URL{Scheme: "wss", Host: "example.com"}, "example.com:443", "example.com"},
- {&url.URL{Scheme: "ws", Host: "example.com:7777"}, "example.com:7777", "example.com"},
- {&url.URL{Scheme: "wss", Host: "example.com:7777"}, "example.com:7777", "example.com"},
-}
-
-func TestHostPortNoPort(t *testing.T) {
- for _, tt := range hostPortNoPortTests {
- hostPort, hostNoPort := hostPortNoPort(tt.u)
- if hostPort != tt.hostPort {
- t.Errorf("hostPortNoPort(%v) returned hostPort %q, want %q", tt.u, hostPort, tt.hostPort)
- }
- if hostNoPort != tt.hostNoPort {
- t.Errorf("hostPortNoPort(%v) returned hostNoPort %q, want %q", tt.u, hostNoPort, tt.hostNoPort)
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/compression_test.go b/vendor/github.com/gorilla/websocket/compression_test.go
deleted file mode 100644
index 659cf4215..000000000
--- a/vendor/github.com/gorilla/websocket/compression_test.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package websocket
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "testing"
-)
-
-type nopCloser struct{ io.Writer }
-
-func (nopCloser) Close() error { return nil }
-
-func TestTruncWriter(t *testing.T) {
- const data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz987654321"
- for n := 1; n <= 10; n++ {
- var b bytes.Buffer
- w := &truncWriter{w: nopCloser{&b}}
- p := []byte(data)
- for len(p) > 0 {
- m := len(p)
- if m > n {
- m = n
- }
- w.Write(p[:m])
- p = p[m:]
- }
- if b.String() != data[:len(data)-len(w.p)] {
- t.Errorf("%d: %q", n, b.String())
- }
- }
-}
-
-func textMessages(num int) [][]byte {
- messages := make([][]byte, num)
- for i := 0; i < num; i++ {
- msg := fmt.Sprintf("planet: %d, country: %d, city: %d, street: %d", i, i, i, i)
- messages[i] = []byte(msg)
- }
- return messages
-}
-
-func BenchmarkWriteNoCompression(b *testing.B) {
- w := ioutil.Discard
- c := newConn(fakeNetConn{Reader: nil, Writer: w}, false, 1024, 1024)
- messages := textMessages(100)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- c.WriteMessage(TextMessage, messages[i%len(messages)])
- }
- b.ReportAllocs()
-}
-
-func BenchmarkWriteWithCompression(b *testing.B) {
- w := ioutil.Discard
- c := newConn(fakeNetConn{Reader: nil, Writer: w}, false, 1024, 1024)
- messages := textMessages(100)
- c.enableWriteCompression = true
- c.newCompressionWriter = compressNoContextTakeover
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- c.WriteMessage(TextMessage, messages[i%len(messages)])
- }
- b.ReportAllocs()
-}
-
-func TestValidCompressionLevel(t *testing.T) {
- c := newConn(fakeNetConn{}, false, 1024, 1024)
- for _, level := range []int{minCompressionLevel - 1, maxCompressionLevel + 1} {
- if err := c.SetCompressionLevel(level); err == nil {
- t.Errorf("no error for level %d", level)
- }
- }
- for _, level := range []int{minCompressionLevel, maxCompressionLevel} {
- if err := c.SetCompressionLevel(level); err != nil {
- t.Errorf("error for level %d", level)
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go
index b051e9591..5f46bf4a5 100644
--- a/vendor/github.com/gorilla/websocket/conn.go
+++ b/vendor/github.com/gorilla/websocket/conn.go
@@ -370,7 +370,7 @@ func (c *Conn) writeFatal(err error) error {
return err
}
-func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error {
+func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error {
<-c.mu
defer func() { c.mu <- true }()
@@ -382,15 +382,14 @@ func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error {
}
c.conn.SetWriteDeadline(deadline)
- for _, buf := range bufs {
- if len(buf) > 0 {
- _, err := c.conn.Write(buf)
- if err != nil {
- return c.writeFatal(err)
- }
- }
+ if len(buf1) == 0 {
+ _, err = c.conn.Write(buf0)
+ } else {
+ err = c.writeBufs(buf0, buf1)
+ }
+ if err != nil {
+ return c.writeFatal(err)
}
-
if frameType == CloseMessage {
c.writeFatal(ErrCloseSent)
}
diff --git a/vendor/github.com/gorilla/websocket/conn_broadcast_test.go b/vendor/github.com/gorilla/websocket/conn_broadcast_test.go
deleted file mode 100644
index 45038e488..000000000
--- a/vendor/github.com/gorilla/websocket/conn_broadcast_test.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2017 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package websocket
-
-import (
- "io"
- "io/ioutil"
- "sync/atomic"
- "testing"
-)
-
-// broadcastBench allows to run broadcast benchmarks.
-// In every broadcast benchmark we create many connections, then send the same
-// message into every connection and wait for all writes complete. This emulates
-// an application where many connections listen to the same data - i.e. PUB/SUB
-// scenarios with many subscribers in one channel.
-type broadcastBench struct {
- w io.Writer
- message *broadcastMessage
- closeCh chan struct{}
- doneCh chan struct{}
- count int32
- conns []*broadcastConn
- compression bool
- usePrepared bool
-}
-
-type broadcastMessage struct {
- payload []byte
- prepared *PreparedMessage
-}
-
-type broadcastConn struct {
- conn *Conn
- msgCh chan *broadcastMessage
-}
-
-func newBroadcastConn(c *Conn) *broadcastConn {
- return &broadcastConn{
- conn: c,
- msgCh: make(chan *broadcastMessage, 1),
- }
-}
-
-func newBroadcastBench(usePrepared, compression bool) *broadcastBench {
- bench := &broadcastBench{
- w: ioutil.Discard,
- doneCh: make(chan struct{}),
- closeCh: make(chan struct{}),
- usePrepared: usePrepared,
- compression: compression,
- }
- msg := &broadcastMessage{
- payload: textMessages(1)[0],
- }
- if usePrepared {
- pm, _ := NewPreparedMessage(TextMessage, msg.payload)
- msg.prepared = pm
- }
- bench.message = msg
- bench.makeConns(10000)
- return bench
-}
-
-func (b *broadcastBench) makeConns(numConns int) {
- conns := make([]*broadcastConn, numConns)
-
- for i := 0; i < numConns; i++ {
- c := newConn(fakeNetConn{Reader: nil, Writer: b.w}, true, 1024, 1024)
- if b.compression {
- c.enableWriteCompression = true
- c.newCompressionWriter = compressNoContextTakeover
- }
- conns[i] = newBroadcastConn(c)
- go func(c *broadcastConn) {
- for {
- select {
- case msg := <-c.msgCh:
- if b.usePrepared {
- c.conn.WritePreparedMessage(msg.prepared)
- } else {
- c.conn.WriteMessage(TextMessage, msg.payload)
- }
- val := atomic.AddInt32(&b.count, 1)
- if val%int32(numConns) == 0 {
- b.doneCh <- struct{}{}
- }
- case <-b.closeCh:
- return
- }
- }
- }(conns[i])
- }
- b.conns = conns
-}
-
-func (b *broadcastBench) close() {
- close(b.closeCh)
-}
-
-func (b *broadcastBench) runOnce() {
- for _, c := range b.conns {
- c.msgCh <- b.message
- }
- <-b.doneCh
-}
-
-func BenchmarkBroadcast(b *testing.B) {
- benchmarks := []struct {
- name string
- usePrepared bool
- compression bool
- }{
- {"NoCompression", false, false},
- {"WithCompression", false, true},
- {"NoCompressionPrepared", true, false},
- {"WithCompressionPrepared", true, true},
- }
- for _, bm := range benchmarks {
- b.Run(bm.name, func(b *testing.B) {
- bench := newBroadcastBench(bm.usePrepared, bm.compression)
- defer bench.close()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- bench.runOnce()
- }
- b.ReportAllocs()
- })
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/conn_test.go b/vendor/github.com/gorilla/websocket/conn_test.go
deleted file mode 100644
index 5fda7b5ca..000000000
--- a/vendor/github.com/gorilla/websocket/conn_test.go
+++ /dev/null
@@ -1,496 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "reflect"
- "testing"
- "testing/iotest"
- "time"
-)
-
-var _ net.Error = errWriteTimeout
-
-type fakeNetConn struct {
- io.Reader
- io.Writer
-}
-
-func (c fakeNetConn) Close() error { return nil }
-func (c fakeNetConn) LocalAddr() net.Addr { return localAddr }
-func (c fakeNetConn) RemoteAddr() net.Addr { return remoteAddr }
-func (c fakeNetConn) SetDeadline(t time.Time) error { return nil }
-func (c fakeNetConn) SetReadDeadline(t time.Time) error { return nil }
-func (c fakeNetConn) SetWriteDeadline(t time.Time) error { return nil }
-
-type fakeAddr int
-
-var (
- localAddr = fakeAddr(1)
- remoteAddr = fakeAddr(2)
-)
-
-func (a fakeAddr) Network() string {
- return "net"
-}
-
-func (a fakeAddr) String() string {
- return "str"
-}
-
-func TestFraming(t *testing.T) {
- frameSizes := []int{0, 1, 2, 124, 125, 126, 127, 128, 129, 65534, 65535, 65536, 65537}
- var readChunkers = []struct {
- name string
- f func(io.Reader) io.Reader
- }{
- {"half", iotest.HalfReader},
- {"one", iotest.OneByteReader},
- {"asis", func(r io.Reader) io.Reader { return r }},
- }
- writeBuf := make([]byte, 65537)
- for i := range writeBuf {
- writeBuf[i] = byte(i)
- }
- var writers = []struct {
- name string
- f func(w io.Writer, n int) (int, error)
- }{
- {"iocopy", func(w io.Writer, n int) (int, error) {
- nn, err := io.Copy(w, bytes.NewReader(writeBuf[:n]))
- return int(nn), err
- }},
- {"write", func(w io.Writer, n int) (int, error) {
- return w.Write(writeBuf[:n])
- }},
- {"string", func(w io.Writer, n int) (int, error) {
- return io.WriteString(w, string(writeBuf[:n]))
- }},
- }
-
- for _, compress := range []bool{false, true} {
- for _, isServer := range []bool{true, false} {
- for _, chunker := range readChunkers {
-
- var connBuf bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &connBuf}, isServer, 1024, 1024)
- rc := newConn(fakeNetConn{Reader: chunker.f(&connBuf), Writer: nil}, !isServer, 1024, 1024)
- if compress {
- wc.newCompressionWriter = compressNoContextTakeover
- rc.newDecompressionReader = decompressNoContextTakeover
- }
- for _, n := range frameSizes {
- for _, writer := range writers {
- name := fmt.Sprintf("z:%v, s:%v, r:%s, n:%d w:%s", compress, isServer, chunker.name, n, writer.name)
-
- w, err := wc.NextWriter(TextMessage)
- if err != nil {
- t.Errorf("%s: wc.NextWriter() returned %v", name, err)
- continue
- }
- nn, err := writer.f(w, n)
- if err != nil || nn != n {
- t.Errorf("%s: w.Write(writeBuf[:n]) returned %d, %v", name, nn, err)
- continue
- }
- err = w.Close()
- if err != nil {
- t.Errorf("%s: w.Close() returned %v", name, err)
- continue
- }
-
- opCode, r, err := rc.NextReader()
- if err != nil || opCode != TextMessage {
- t.Errorf("%s: NextReader() returned %d, r, %v", name, opCode, err)
- continue
- }
- rbuf, err := ioutil.ReadAll(r)
- if err != nil {
- t.Errorf("%s: ReadFull() returned rbuf, %v", name, err)
- continue
- }
-
- if len(rbuf) != n {
- t.Errorf("%s: len(rbuf) is %d, want %d", name, len(rbuf), n)
- continue
- }
-
- for i, b := range rbuf {
- if byte(i) != b {
- t.Errorf("%s: bad byte at offset %d", name, i)
- break
- }
- }
- }
- }
- }
- }
- }
-}
-
-func TestControl(t *testing.T) {
- const message = "this is a ping/pong messsage"
- for _, isServer := range []bool{true, false} {
- for _, isWriteControl := range []bool{true, false} {
- name := fmt.Sprintf("s:%v, wc:%v", isServer, isWriteControl)
- var connBuf bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &connBuf}, isServer, 1024, 1024)
- rc := newConn(fakeNetConn{Reader: &connBuf, Writer: nil}, !isServer, 1024, 1024)
- if isWriteControl {
- wc.WriteControl(PongMessage, []byte(message), time.Now().Add(time.Second))
- } else {
- w, err := wc.NextWriter(PongMessage)
- if err != nil {
- t.Errorf("%s: wc.NextWriter() returned %v", name, err)
- continue
- }
- if _, err := w.Write([]byte(message)); err != nil {
- t.Errorf("%s: w.Write() returned %v", name, err)
- continue
- }
- if err := w.Close(); err != nil {
- t.Errorf("%s: w.Close() returned %v", name, err)
- continue
- }
- var actualMessage string
- rc.SetPongHandler(func(s string) error { actualMessage = s; return nil })
- rc.NextReader()
- if actualMessage != message {
- t.Errorf("%s: pong=%q, want %q", name, actualMessage, message)
- continue
- }
- }
- }
- }
-}
-
-func TestCloseFrameBeforeFinalMessageFrame(t *testing.T) {
- const bufSize = 512
-
- expectedErr := &CloseError{Code: CloseNormalClosure, Text: "hello"}
-
- var b1, b2 bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, bufSize)
- rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024)
-
- w, _ := wc.NextWriter(BinaryMessage)
- w.Write(make([]byte, bufSize+bufSize/2))
- wc.WriteControl(CloseMessage, FormatCloseMessage(expectedErr.Code, expectedErr.Text), time.Now().Add(10*time.Second))
- w.Close()
-
- op, r, err := rc.NextReader()
- if op != BinaryMessage || err != nil {
- t.Fatalf("NextReader() returned %d, %v", op, err)
- }
- _, err = io.Copy(ioutil.Discard, r)
- if !reflect.DeepEqual(err, expectedErr) {
- t.Fatalf("io.Copy() returned %v, want %v", err, expectedErr)
- }
- _, _, err = rc.NextReader()
- if !reflect.DeepEqual(err, expectedErr) {
- t.Fatalf("NextReader() returned %v, want %v", err, expectedErr)
- }
-}
-
-func TestEOFWithinFrame(t *testing.T) {
- const bufSize = 64
-
- for n := 0; ; n++ {
- var b bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &b}, false, 1024, 1024)
- rc := newConn(fakeNetConn{Reader: &b, Writer: nil}, true, 1024, 1024)
-
- w, _ := wc.NextWriter(BinaryMessage)
- w.Write(make([]byte, bufSize))
- w.Close()
-
- if n >= b.Len() {
- break
- }
- b.Truncate(n)
-
- op, r, err := rc.NextReader()
- if err == errUnexpectedEOF {
- continue
- }
- if op != BinaryMessage || err != nil {
- t.Fatalf("%d: NextReader() returned %d, %v", n, op, err)
- }
- _, err = io.Copy(ioutil.Discard, r)
- if err != errUnexpectedEOF {
- t.Fatalf("%d: io.Copy() returned %v, want %v", n, err, errUnexpectedEOF)
- }
- _, _, err = rc.NextReader()
- if err != errUnexpectedEOF {
- t.Fatalf("%d: NextReader() returned %v, want %v", n, err, errUnexpectedEOF)
- }
- }
-}
-
-func TestEOFBeforeFinalFrame(t *testing.T) {
- const bufSize = 512
-
- var b1, b2 bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, bufSize)
- rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024)
-
- w, _ := wc.NextWriter(BinaryMessage)
- w.Write(make([]byte, bufSize+bufSize/2))
-
- op, r, err := rc.NextReader()
- if op != BinaryMessage || err != nil {
- t.Fatalf("NextReader() returned %d, %v", op, err)
- }
- _, err = io.Copy(ioutil.Discard, r)
- if err != errUnexpectedEOF {
- t.Fatalf("io.Copy() returned %v, want %v", err, errUnexpectedEOF)
- }
- _, _, err = rc.NextReader()
- if err != errUnexpectedEOF {
- t.Fatalf("NextReader() returned %v, want %v", err, errUnexpectedEOF)
- }
-}
-
-func TestWriteAfterMessageWriterClose(t *testing.T) {
- wc := newConn(fakeNetConn{Reader: nil, Writer: &bytes.Buffer{}}, false, 1024, 1024)
- w, _ := wc.NextWriter(BinaryMessage)
- io.WriteString(w, "hello")
- if err := w.Close(); err != nil {
- t.Fatalf("unxpected error closing message writer, %v", err)
- }
-
- if _, err := io.WriteString(w, "world"); err == nil {
- t.Fatalf("no error writing after close")
- }
-
- w, _ = wc.NextWriter(BinaryMessage)
- io.WriteString(w, "hello")
-
- // close w by getting next writer
- _, err := wc.NextWriter(BinaryMessage)
- if err != nil {
- t.Fatalf("unexpected error getting next writer, %v", err)
- }
-
- if _, err := io.WriteString(w, "world"); err == nil {
- t.Fatalf("no error writing after close")
- }
-}
-
-func TestReadLimit(t *testing.T) {
-
- const readLimit = 512
- message := make([]byte, readLimit+1)
-
- var b1, b2 bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, 1024, readLimit-2)
- rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, 1024, 1024)
- rc.SetReadLimit(readLimit)
-
- // Send message at the limit with interleaved pong.
- w, _ := wc.NextWriter(BinaryMessage)
- w.Write(message[:readLimit-1])
- wc.WriteControl(PongMessage, []byte("this is a pong"), time.Now().Add(10*time.Second))
- w.Write(message[:1])
- w.Close()
-
- // Send message larger than the limit.
- wc.WriteMessage(BinaryMessage, message[:readLimit+1])
-
- op, _, err := rc.NextReader()
- if op != BinaryMessage || err != nil {
- t.Fatalf("1: NextReader() returned %d, %v", op, err)
- }
- op, r, err := rc.NextReader()
- if op != BinaryMessage || err != nil {
- t.Fatalf("2: NextReader() returned %d, %v", op, err)
- }
- _, err = io.Copy(ioutil.Discard, r)
- if err != ErrReadLimit {
- t.Fatalf("io.Copy() returned %v", err)
- }
-}
-
-func TestAddrs(t *testing.T) {
- c := newConn(&fakeNetConn{}, true, 1024, 1024)
- if c.LocalAddr() != localAddr {
- t.Errorf("LocalAddr = %v, want %v", c.LocalAddr(), localAddr)
- }
- if c.RemoteAddr() != remoteAddr {
- t.Errorf("RemoteAddr = %v, want %v", c.RemoteAddr(), remoteAddr)
- }
-}
-
-func TestUnderlyingConn(t *testing.T) {
- var b1, b2 bytes.Buffer
- fc := fakeNetConn{Reader: &b1, Writer: &b2}
- c := newConn(fc, true, 1024, 1024)
- ul := c.UnderlyingConn()
- if ul != fc {
- t.Fatalf("Underlying conn is not what it should be.")
- }
-}
-
-func TestBufioReadBytes(t *testing.T) {
- // Test calling bufio.ReadBytes for value longer than read buffer size.
-
- m := make([]byte, 512)
- m[len(m)-1] = '\n'
-
- var b1, b2 bytes.Buffer
- wc := newConn(fakeNetConn{Reader: nil, Writer: &b1}, false, len(m)+64, len(m)+64)
- rc := newConn(fakeNetConn{Reader: &b1, Writer: &b2}, true, len(m)-64, len(m)-64)
-
- w, _ := wc.NextWriter(BinaryMessage)
- w.Write(m)
- w.Close()
-
- op, r, err := rc.NextReader()
- if op != BinaryMessage || err != nil {
- t.Fatalf("NextReader() returned %d, %v", op, err)
- }
-
- br := bufio.NewReader(r)
- p, err := br.ReadBytes('\n')
- if err != nil {
- t.Fatalf("ReadBytes() returned %v", err)
- }
- if len(p) != len(m) {
- t.Fatalf("read returned %d bytes, want %d bytes", len(p), len(m))
- }
-}
-
-var closeErrorTests = []struct {
- err error
- codes []int
- ok bool
-}{
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNormalClosure}, true},
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived}, false},
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived, CloseNormalClosure}, true},
- {errors.New("hello"), []int{CloseNormalClosure}, false},
-}
-
-func TestCloseError(t *testing.T) {
- for _, tt := range closeErrorTests {
- ok := IsCloseError(tt.err, tt.codes...)
- if ok != tt.ok {
- t.Errorf("IsCloseError(%#v, %#v) returned %v, want %v", tt.err, tt.codes, ok, tt.ok)
- }
- }
-}
-
-var unexpectedCloseErrorTests = []struct {
- err error
- codes []int
- ok bool
-}{
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNormalClosure}, false},
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived}, true},
- {&CloseError{Code: CloseNormalClosure}, []int{CloseNoStatusReceived, CloseNormalClosure}, false},
- {errors.New("hello"), []int{CloseNormalClosure}, false},
-}
-
-func TestUnexpectedCloseErrors(t *testing.T) {
- for _, tt := range unexpectedCloseErrorTests {
- ok := IsUnexpectedCloseError(tt.err, tt.codes...)
- if ok != tt.ok {
- t.Errorf("IsUnexpectedCloseError(%#v, %#v) returned %v, want %v", tt.err, tt.codes, ok, tt.ok)
- }
- }
-}
-
-type blockingWriter struct {
- c1, c2 chan struct{}
-}
-
-func (w blockingWriter) Write(p []byte) (int, error) {
- // Allow main to continue
- close(w.c1)
- // Wait for panic in main
- <-w.c2
- return len(p), nil
-}
-
-func TestConcurrentWritePanic(t *testing.T) {
- w := blockingWriter{make(chan struct{}), make(chan struct{})}
- c := newConn(fakeNetConn{Reader: nil, Writer: w}, false, 1024, 1024)
- go func() {
- c.WriteMessage(TextMessage, []byte{})
- }()
-
- // wait for goroutine to block in write.
- <-w.c1
-
- defer func() {
- close(w.c2)
- if v := recover(); v != nil {
- return
- }
- }()
-
- c.WriteMessage(TextMessage, []byte{})
- t.Fatal("should not get here")
-}
-
-type failingReader struct{}
-
-func (r failingReader) Read(p []byte) (int, error) {
- return 0, io.EOF
-}
-
-func TestFailedConnectionReadPanic(t *testing.T) {
- c := newConn(fakeNetConn{Reader: failingReader{}, Writer: nil}, false, 1024, 1024)
-
- defer func() {
- if v := recover(); v != nil {
- return
- }
- }()
-
- for i := 0; i < 20000; i++ {
- c.ReadMessage()
- }
- t.Fatal("should not get here")
-}
-
-func TestBufioReuse(t *testing.T) {
- brw := bufio.NewReadWriter(bufio.NewReader(nil), bufio.NewWriter(nil))
- c := newConnBRW(nil, false, 0, 0, brw)
-
- if c.br != brw.Reader {
- t.Error("connection did not reuse bufio.Reader")
- }
-
- var wh writeHook
- brw.Writer.Reset(&wh)
- brw.WriteByte(0)
- brw.Flush()
- if &c.writeBuf[0] != &wh.p[0] {
- t.Error("connection did not reuse bufio.Writer")
- }
-
- brw = bufio.NewReadWriter(bufio.NewReaderSize(nil, 0), bufio.NewWriterSize(nil, 0))
- c = newConnBRW(nil, false, 0, 0, brw)
-
- if c.br == brw.Reader {
- t.Error("connection used bufio.Reader with small size")
- }
-
- brw.Writer.Reset(&wh)
- brw.WriteByte(0)
- brw.Flush()
- if &c.writeBuf[0] != &wh.p[0] {
- t.Error("connection used bufio.Writer with small size")
- }
-
-}
diff --git a/vendor/github.com/gorilla/websocket/conn_write.go b/vendor/github.com/gorilla/websocket/conn_write.go
new file mode 100644
index 000000000..a509a21f8
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/conn_write.go
@@ -0,0 +1,15 @@
+// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.8
+
+package websocket
+
+import "net"
+
+func (c *Conn) writeBufs(bufs ...[]byte) error {
+ b := net.Buffers(bufs)
+ _, err := b.WriteTo(c.conn)
+ return err
+}
diff --git a/vendor/github.com/gorilla/websocket/conn_write_legacy.go b/vendor/github.com/gorilla/websocket/conn_write_legacy.go
new file mode 100644
index 000000000..37edaff5a
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/conn_write_legacy.go
@@ -0,0 +1,18 @@
+// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !go1.8
+
+package websocket
+
+func (c *Conn) writeBufs(bufs ...[]byte) error {
+ for _, buf := range bufs {
+ if len(buf) > 0 {
+ if _, err := c.conn.Write(buf); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/gorilla/websocket/example_test.go b/vendor/github.com/gorilla/websocket/example_test.go
deleted file mode 100644
index 96449eac7..000000000
--- a/vendor/github.com/gorilla/websocket/example_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket_test
-
-import (
- "log"
- "net/http"
- "testing"
-
- "github.com/gorilla/websocket"
-)
-
-var (
- c *websocket.Conn
- req *http.Request
-)
-
-// The websocket.IsUnexpectedCloseError function is useful for identifying
-// application and protocol errors.
-//
-// This server application works with a client application running in the
-// browser. The client application does not explicitly close the websocket. The
-// only expected close message from the client has the code
-// websocket.CloseGoingAway. All other other close messages are likely the
-// result of an application or protocol error and are logged to aid debugging.
-func ExampleIsUnexpectedCloseError() {
-
- for {
- messageType, p, err := c.ReadMessage()
- if err != nil {
- if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) {
- log.Printf("error: %v, user-agent: %v", err, req.Header.Get("User-Agent"))
- }
- return
- }
- processMesage(messageType, p)
- }
-}
-
-func processMesage(mt int, p []byte) {}
-
-// TestX prevents godoc from showing this entire file in the example. Remove
-// this function when a second example is added.
-func TestX(t *testing.T) {}
diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/README.md b/vendor/github.com/gorilla/websocket/examples/autobahn/README.md
deleted file mode 100644
index 075ac1530..000000000
--- a/vendor/github.com/gorilla/websocket/examples/autobahn/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Test Server
-
-This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite).
-
-To test the server, run
-
- go run server.go
-
-and start the client test driver
-
- wstest -m fuzzingclient -s fuzzingclient.json
-
-When the client completes, it writes a report to reports/clients/index.html.
diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json b/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json
deleted file mode 100644
index aa3a0bc0a..000000000
--- a/vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json
+++ /dev/null
@@ -1,15 +0,0 @@
-
-{
- "options": {"failByDrop": false},
- "outdir": "./reports/clients",
- "servers": [
- {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}},
- {"agent": "ReadAllWritePreparedMessage", "url": "ws://localhost:9000/p", "options": {"version": 18}},
- {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}},
- {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}},
- {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}}
- ],
- "cases": ["*"],
- "exclude-cases": [],
- "exclude-agent-cases": {}
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/autobahn/server.go b/vendor/github.com/gorilla/websocket/examples/autobahn/server.go
deleted file mode 100644
index 3db880f90..000000000
--- a/vendor/github.com/gorilla/websocket/examples/autobahn/server.go
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Command server is a test server for the Autobahn WebSockets Test Suite.
-package main
-
-import (
- "errors"
- "flag"
- "io"
- "log"
- "net/http"
- "time"
- "unicode/utf8"
-
- "github.com/gorilla/websocket"
-)
-
-var upgrader = websocket.Upgrader{
- ReadBufferSize: 4096,
- WriteBufferSize: 4096,
- EnableCompression: true,
- CheckOrigin: func(r *http.Request) bool {
- return true
- },
-}
-
-// echoCopy echoes messages from the client using io.Copy.
-func echoCopy(w http.ResponseWriter, r *http.Request, writerOnly bool) {
- conn, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- log.Println("Upgrade:", err)
- return
- }
- defer conn.Close()
- for {
- mt, r, err := conn.NextReader()
- if err != nil {
- if err != io.EOF {
- log.Println("NextReader:", err)
- }
- return
- }
- if mt == websocket.TextMessage {
- r = &validator{r: r}
- }
- w, err := conn.NextWriter(mt)
- if err != nil {
- log.Println("NextWriter:", err)
- return
- }
- if mt == websocket.TextMessage {
- r = &validator{r: r}
- }
- if writerOnly {
- _, err = io.Copy(struct{ io.Writer }{w}, r)
- } else {
- _, err = io.Copy(w, r)
- }
- if err != nil {
- if err == errInvalidUTF8 {
- conn.WriteControl(websocket.CloseMessage,
- websocket.FormatCloseMessage(websocket.CloseInvalidFramePayloadData, ""),
- time.Time{})
- }
- log.Println("Copy:", err)
- return
- }
- err = w.Close()
- if err != nil {
- log.Println("Close:", err)
- return
- }
- }
-}
-
-func echoCopyWriterOnly(w http.ResponseWriter, r *http.Request) {
- echoCopy(w, r, true)
-}
-
-func echoCopyFull(w http.ResponseWriter, r *http.Request) {
- echoCopy(w, r, false)
-}
-
-// echoReadAll echoes messages from the client by reading the entire message
-// with ioutil.ReadAll.
-func echoReadAll(w http.ResponseWriter, r *http.Request, writeMessage, writePrepared bool) {
- conn, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- log.Println("Upgrade:", err)
- return
- }
- defer conn.Close()
- for {
- mt, b, err := conn.ReadMessage()
- if err != nil {
- if err != io.EOF {
- log.Println("NextReader:", err)
- }
- return
- }
- if mt == websocket.TextMessage {
- if !utf8.Valid(b) {
- conn.WriteControl(websocket.CloseMessage,
- websocket.FormatCloseMessage(websocket.CloseInvalidFramePayloadData, ""),
- time.Time{})
- log.Println("ReadAll: invalid utf8")
- }
- }
- if writeMessage {
- if !writePrepared {
- err = conn.WriteMessage(mt, b)
- if err != nil {
- log.Println("WriteMessage:", err)
- }
- } else {
- pm, err := websocket.NewPreparedMessage(mt, b)
- if err != nil {
- log.Println("NewPreparedMessage:", err)
- return
- }
- err = conn.WritePreparedMessage(pm)
- if err != nil {
- log.Println("WritePreparedMessage:", err)
- }
- }
- } else {
- w, err := conn.NextWriter(mt)
- if err != nil {
- log.Println("NextWriter:", err)
- return
- }
- if _, err := w.Write(b); err != nil {
- log.Println("Writer:", err)
- return
- }
- if err := w.Close(); err != nil {
- log.Println("Close:", err)
- return
- }
- }
- }
-}
-
-func echoReadAllWriter(w http.ResponseWriter, r *http.Request) {
- echoReadAll(w, r, false, false)
-}
-
-func echoReadAllWriteMessage(w http.ResponseWriter, r *http.Request) {
- echoReadAll(w, r, true, false)
-}
-
-func echoReadAllWritePreparedMessage(w http.ResponseWriter, r *http.Request) {
- echoReadAll(w, r, true, true)
-}
-
-func serveHome(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" {
- http.Error(w, "Not found.", 404)
- return
- }
- if r.Method != "GET" {
- http.Error(w, "Method not allowed", 405)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- io.WriteString(w, "<html><body>Echo Server</body></html>")
-}
-
-var addr = flag.String("addr", ":9000", "http service address")
-
-func main() {
- flag.Parse()
- http.HandleFunc("/", serveHome)
- http.HandleFunc("/c", echoCopyWriterOnly)
- http.HandleFunc("/f", echoCopyFull)
- http.HandleFunc("/r", echoReadAllWriter)
- http.HandleFunc("/m", echoReadAllWriteMessage)
- http.HandleFunc("/p", echoReadAllWritePreparedMessage)
- err := http.ListenAndServe(*addr, nil)
- if err != nil {
- log.Fatal("ListenAndServe: ", err)
- }
-}
-
-type validator struct {
- state int
- x rune
- r io.Reader
-}
-
-var errInvalidUTF8 = errors.New("invalid utf8")
-
-func (r *validator) Read(p []byte) (int, error) {
- n, err := r.r.Read(p)
- state := r.state
- x := r.x
- for _, b := range p[:n] {
- state, x = decode(state, x, b)
- if state == utf8Reject {
- break
- }
- }
- r.state = state
- r.x = x
- if state == utf8Reject || (err == io.EOF && state != utf8Accept) {
- return n, errInvalidUTF8
- }
- return n, err
-}
-
-// UTF-8 decoder from http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
-//
-// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
-//
-// 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.
-var utf8d = [...]byte{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1f
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3f
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5f
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7f
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9f
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // a0..bf
- 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // c0..df
- 0xa, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // e0..ef
- 0xb, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // f0..ff
- 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
- 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
- 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // s7..s8
-}
-
-const (
- utf8Accept = 0
- utf8Reject = 1
-)
-
-func decode(state int, x rune, b byte) (int, rune) {
- t := utf8d[b]
- if state != utf8Accept {
- x = rune(b&0x3f) | (x << 6)
- } else {
- x = rune((0xff >> t) & b)
- }
- state = int(utf8d[256+state*16+int(t)])
- return state, x
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/chat/README.md b/vendor/github.com/gorilla/websocket/examples/chat/README.md
deleted file mode 100644
index 7baf3e328..000000000
--- a/vendor/github.com/gorilla/websocket/examples/chat/README.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# Chat Example
-
-This application shows how to use the
-[websocket](https://github.com/gorilla/websocket) package to implement a simple
-web chat application.
-
-## Running the example
-
-The example requires a working Go development environment. The [Getting
-Started](http://golang.org/doc/install) page describes how to install the
-development environment.
-
-Once you have Go up and running, you can download, build and run the example
-using the following commands.
-
- $ go get github.com/gorilla/websocket
- $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat`
- $ go run *.go
-
-To use the chat example, open http://localhost:8080/ in your browser.
-
-## Server
-
-The server application defines two types, `Client` and `Hub`. The server
-creates an instance of the `Client` type for each websocket connection. A
-`Client` acts as an intermediary between the websocket connection and a single
-instance of the `Hub` type. The `Hub` maintains a set of registered clients and
-broadcasts messages to the clients.
-
-The application runs one goroutine for the `Hub` and two goroutines for each
-`Client`. The goroutines communicate with each other using channels. The `Hub`
-has channels for registering clients, unregistering clients and broadcasting
-messages. A `Client` has a buffered channel of outbound messages. One of the
-client's goroutines reads messages from this channel and writes the messages to
-the websocket. The other client goroutine reads messages from the websocket and
-sends them to the hub.
-
-### Hub
-
-The code for the `Hub` type is in
-[hub.go](https://github.com/gorilla/websocket/blob/master/examples/chat/hub.go).
-The application's `main` function starts the hub's `run` method as a goroutine.
-Clients send requests to the hub using the `register`, `unregister` and
-`broadcast` channels.
-
-The hub registers clients by adding the client pointer as a key in the
-`clients` map. The map value is always true.
-
-The unregister code is a little more complicated. In addition to deleting the
-client pointer from the `clients` map, the hub closes the clients's `send`
-channel to signal the client that no more messages will be sent to the client.
-
-The hub handles messages by looping over the registered clients and sending the
-message to the client's `send` channel. If the client's `send` buffer is full,
-then the hub assumes that the client is dead or stuck. In this case, the hub
-unregisters the client and closes the websocket.
-
-### Client
-
-The code for the `Client` type is in [client.go](https://github.com/gorilla/websocket/blob/master/examples/chat/client.go).
-
-The `serveWs` function is registered by the application's `main` function as
-an HTTP handler. The handler upgrades the HTTP connection to the WebSocket
-protocol, creates a client, registers the client with the hub and schedules the
-client to be unregistered using a defer statement.
-
-Next, the HTTP handler starts the client's `writePump` method as a goroutine.
-This method transfers messages from the client's send channel to the websocket
-connection. The writer method exits when the channel is closed by the hub or
-there's an error writing to the websocket connection.
-
-Finally, the HTTP handler calls the client's `readPump` method. This method
-transfers inbound messages from the websocket to the hub.
-
-WebSocket connections [support one concurrent reader and one concurrent
-writer](https://godoc.org/github.com/gorilla/websocket#hdr-Concurrency). The
-application ensures that these concurrency requirements are met by executing
-all reads from the `readPump` goroutine and all writes from the `writePump`
-goroutine.
-
-To improve efficiency under high load, the `writePump` function coalesces
-pending chat messages in the `send` channel to a single WebSocket message. This
-reduces the number of system calls and the amount of data sent over the
-network.
-
-## Frontend
-
-The frontend code is in [home.html](https://github.com/gorilla/websocket/blob/master/examples/chat/home.html).
-
-On document load, the script checks for websocket functionality in the browser.
-If websocket functionality is available, then the script opens a connection to
-the server and registers a callback to handle messages from the server. The
-callback appends the message to the chat log using the appendLog function.
-
-To allow the user to manually scroll through the chat log without interruption
-from new messages, the `appendLog` function checks the scroll position before
-adding new content. If the chat log is scrolled to the bottom, then the
-function scrolls new content into view after adding the content. Otherwise, the
-scroll position is not changed.
-
-The form handler writes the user input to the websocket and clears the input
-field.
diff --git a/vendor/github.com/gorilla/websocket/examples/chat/client.go b/vendor/github.com/gorilla/websocket/examples/chat/client.go
deleted file mode 100644
index 9461c1ea0..000000000
--- a/vendor/github.com/gorilla/websocket/examples/chat/client.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "bytes"
- "log"
- "net/http"
- "time"
-
- "github.com/gorilla/websocket"
-)
-
-const (
- // Time allowed to write a message to the peer.
- writeWait = 10 * time.Second
-
- // Time allowed to read the next pong message from the peer.
- pongWait = 60 * time.Second
-
- // Send pings to peer with this period. Must be less than pongWait.
- pingPeriod = (pongWait * 9) / 10
-
- // Maximum message size allowed from peer.
- maxMessageSize = 512
-)
-
-var (
- newline = []byte{'\n'}
- space = []byte{' '}
-)
-
-var upgrader = websocket.Upgrader{
- ReadBufferSize: 1024,
- WriteBufferSize: 1024,
-}
-
-// Client is a middleman between the websocket connection and the hub.
-type Client struct {
- hub *Hub
-
- // The websocket connection.
- conn *websocket.Conn
-
- // Buffered channel of outbound messages.
- send chan []byte
-}
-
-// readPump pumps messages from the websocket connection to the hub.
-//
-// The application runs readPump in a per-connection goroutine. The application
-// ensures that there is at most one reader on a connection by executing all
-// reads from this goroutine.
-func (c *Client) readPump() {
- defer func() {
- c.hub.unregister <- c
- c.conn.Close()
- }()
- c.conn.SetReadLimit(maxMessageSize)
- c.conn.SetReadDeadline(time.Now().Add(pongWait))
- c.conn.SetPongHandler(func(string) error { c.conn.SetReadDeadline(time.Now().Add(pongWait)); return nil })
- for {
- _, message, err := c.conn.ReadMessage()
- if err != nil {
- if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
- log.Printf("error: %v", err)
- }
- break
- }
- message = bytes.TrimSpace(bytes.Replace(message, newline, space, -1))
- c.hub.broadcast <- message
- }
-}
-
-// writePump pumps messages from the hub to the websocket connection.
-//
-// A goroutine running writePump is started for each connection. The
-// application ensures that there is at most one writer to a connection by
-// executing all writes from this goroutine.
-func (c *Client) writePump() {
- ticker := time.NewTicker(pingPeriod)
- defer func() {
- ticker.Stop()
- c.conn.Close()
- }()
- for {
- select {
- case message, ok := <-c.send:
- c.conn.SetWriteDeadline(time.Now().Add(writeWait))
- if !ok {
- // The hub closed the channel.
- c.conn.WriteMessage(websocket.CloseMessage, []byte{})
- return
- }
-
- w, err := c.conn.NextWriter(websocket.TextMessage)
- if err != nil {
- return
- }
- w.Write(message)
-
- // Add queued chat messages to the current websocket message.
- n := len(c.send)
- for i := 0; i < n; i++ {
- w.Write(newline)
- w.Write(<-c.send)
- }
-
- if err := w.Close(); err != nil {
- return
- }
- case <-ticker.C:
- c.conn.SetWriteDeadline(time.Now().Add(writeWait))
- if err := c.conn.WriteMessage(websocket.PingMessage, nil); err != nil {
- return
- }
- }
- }
-}
-
-// serveWs handles websocket requests from the peer.
-func serveWs(hub *Hub, w http.ResponseWriter, r *http.Request) {
- conn, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- log.Println(err)
- return
- }
- client := &Client{hub: hub, conn: conn, send: make(chan []byte, 256)}
- client.hub.register <- client
-
- // Allow collection of memory referenced by the caller by doing all work in
- // new goroutines.
- go client.writePump()
- go client.readPump()
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/chat/home.html b/vendor/github.com/gorilla/websocket/examples/chat/home.html
deleted file mode 100644
index a39a0c276..000000000
--- a/vendor/github.com/gorilla/websocket/examples/chat/home.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<title>Chat Example</title>
-<script type="text/javascript">
-window.onload = function () {
- var conn;
- var msg = document.getElementById("msg");
- var log = document.getElementById("log");
-
- function appendLog(item) {
- var doScroll = log.scrollTop > log.scrollHeight - log.clientHeight - 1;
- log.appendChild(item);
- if (doScroll) {
- log.scrollTop = log.scrollHeight - log.clientHeight;
- }
- }
-
- document.getElementById("form").onsubmit = function () {
- if (!conn) {
- return false;
- }
- if (!msg.value) {
- return false;
- }
- conn.send(msg.value);
- msg.value = "";
- return false;
- };
-
- if (window["WebSocket"]) {
- conn = new WebSocket("ws://" + document.location.host + "/ws");
- conn.onclose = function (evt) {
- var item = document.createElement("div");
- item.innerHTML = "<b>Connection closed.</b>";
- appendLog(item);
- };
- conn.onmessage = function (evt) {
- var messages = evt.data.split('\n');
- for (var i = 0; i < messages.length; i++) {
- var item = document.createElement("div");
- item.innerText = messages[i];
- appendLog(item);
- }
- };
- } else {
- var item = document.createElement("div");
- item.innerHTML = "<b>Your browser does not support WebSockets.</b>";
- appendLog(item);
- }
-};
-</script>
-<style type="text/css">
-html {
- overflow: hidden;
-}
-
-body {
- overflow: hidden;
- padding: 0;
- margin: 0;
- width: 100%;
- height: 100%;
- background: gray;
-}
-
-#log {
- background: white;
- margin: 0;
- padding: 0.5em 0.5em 0.5em 0.5em;
- position: absolute;
- top: 0.5em;
- left: 0.5em;
- right: 0.5em;
- bottom: 3em;
- overflow: auto;
-}
-
-#form {
- padding: 0 0.5em 0 0.5em;
- margin: 0;
- position: absolute;
- bottom: 1em;
- left: 0px;
- width: 100%;
- overflow: hidden;
-}
-
-</style>
-</head>
-<body>
-<div id="log"></div>
-<form id="form">
- <input type="submit" value="Send" />
- <input type="text" id="msg" size="64"/>
-</form>
-</body>
-</html>
diff --git a/vendor/github.com/gorilla/websocket/examples/chat/hub.go b/vendor/github.com/gorilla/websocket/examples/chat/hub.go
deleted file mode 100644
index 7f07ea079..000000000
--- a/vendor/github.com/gorilla/websocket/examples/chat/hub.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-// hub maintains the set of active clients and broadcasts messages to the
-// clients.
-type Hub struct {
- // Registered clients.
- clients map[*Client]bool
-
- // Inbound messages from the clients.
- broadcast chan []byte
-
- // Register requests from the clients.
- register chan *Client
-
- // Unregister requests from clients.
- unregister chan *Client
-}
-
-func newHub() *Hub {
- return &Hub{
- broadcast: make(chan []byte),
- register: make(chan *Client),
- unregister: make(chan *Client),
- clients: make(map[*Client]bool),
- }
-}
-
-func (h *Hub) run() {
- for {
- select {
- case client := <-h.register:
- h.clients[client] = true
- case client := <-h.unregister:
- if _, ok := h.clients[client]; ok {
- delete(h.clients, client)
- close(client.send)
- }
- case message := <-h.broadcast:
- for client := range h.clients {
- select {
- case client.send <- message:
- default:
- close(client.send)
- delete(h.clients, client)
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/chat/main.go b/vendor/github.com/gorilla/websocket/examples/chat/main.go
deleted file mode 100644
index 74615d59c..000000000
--- a/vendor/github.com/gorilla/websocket/examples/chat/main.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "flag"
- "log"
- "net/http"
-)
-
-var addr = flag.String("addr", ":8080", "http service address")
-
-func serveHome(w http.ResponseWriter, r *http.Request) {
- log.Println(r.URL)
- if r.URL.Path != "/" {
- http.Error(w, "Not found", 404)
- return
- }
- if r.Method != "GET" {
- http.Error(w, "Method not allowed", 405)
- return
- }
- http.ServeFile(w, r, "home.html")
-}
-
-func main() {
- flag.Parse()
- hub := newHub()
- go hub.run()
- http.HandleFunc("/", serveHome)
- http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) {
- serveWs(hub, w, r)
- })
- err := http.ListenAndServe(*addr, nil)
- if err != nil {
- log.Fatal("ListenAndServe: ", err)
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/command/README.md b/vendor/github.com/gorilla/websocket/examples/command/README.md
deleted file mode 100644
index ed6f78684..000000000
--- a/vendor/github.com/gorilla/websocket/examples/command/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Command example
-
-This example connects a websocket connection to stdin and stdout of a command.
-Received messages are written to stdin followed by a `\n`. Each line read from
-standard out is sent as a message to the client.
-
- $ go get github.com/gorilla/websocket
- $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command`
- $ go run main.go <command and arguments to run>
- # Open http://localhost:8080/ .
-
-Try the following commands.
-
- # Echo sent messages to the output area.
- $ go run main.go cat
-
- # Run a shell.Try sending "ls" and "cat main.go".
- $ go run main.go sh
-
diff --git a/vendor/github.com/gorilla/websocket/examples/command/home.html b/vendor/github.com/gorilla/websocket/examples/command/home.html
deleted file mode 100644
index 19c46128a..000000000
--- a/vendor/github.com/gorilla/websocket/examples/command/home.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<title>Command Example</title>
-<script type="text/javascript">
-window.onload = function () {
- var conn;
- var msg = document.getElementById("msg");
- var log = document.getElementById("log");
-
- function appendLog(item) {
- var doScroll = log.scrollTop > log.scrollHeight - log.clientHeight - 1;
- log.appendChild(item);
- if (doScroll) {
- log.scrollTop = log.scrollHeight - log.clientHeight;
- }
- }
-
- document.getElementById("form").onsubmit = function () {
- if (!conn) {
- return false;
- }
- if (!msg.value) {
- return false;
- }
- conn.send(msg.value);
- msg.value = "";
- return false;
- };
-
- if (window["WebSocket"]) {
- conn = new WebSocket("ws://" + document.location.host + "/ws");
- conn.onclose = function (evt) {
- var item = document.createElement("div");
- item.innerHTML = "<b>Connection closed.</b>";
- appendLog(item);
- };
- conn.onmessage = function (evt) {
- var messages = evt.data.split('\n');
- for (var i = 0; i < messages.length; i++) {
- var item = document.createElement("div");
- item.innerText = messages[i];
- appendLog(item);
- }
- };
- } else {
- var item = document.createElement("div");
- item.innerHTML = "<b>Your browser does not support WebSockets.</b>";
- appendLog(item);
- }
-};
-</script>
-<style type="text/css">
-html {
- overflow: hidden;
-}
-
-body {
- overflow: hidden;
- padding: 0;
- margin: 0;
- width: 100%;
- height: 100%;
- background: gray;
-}
-
-#log {
- background: white;
- margin: 0;
- padding: 0.5em 0.5em 0.5em 0.5em;
- position: absolute;
- top: 0.5em;
- left: 0.5em;
- right: 0.5em;
- bottom: 3em;
- overflow: auto;
-}
-
-#log pre {
- margin: 0;
-}
-
-#form {
- padding: 0 0.5em 0 0.5em;
- margin: 0;
- position: absolute;
- bottom: 1em;
- left: 0px;
- width: 100%;
- overflow: hidden;
-}
-
-</style>
-</head>
-<body>
-<div id="log"></div>
-<form id="form">
- <input type="submit" value="Send" />
- <input type="text" id="msg" size="64"/>
-</form>
-</body>
-</html>
diff --git a/vendor/github.com/gorilla/websocket/examples/command/main.go b/vendor/github.com/gorilla/websocket/examples/command/main.go
deleted file mode 100644
index 239c5c85c..000000000
--- a/vendor/github.com/gorilla/websocket/examples/command/main.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "bufio"
- "flag"
- "io"
- "log"
- "net/http"
- "os"
- "os/exec"
- "time"
-
- "github.com/gorilla/websocket"
-)
-
-var (
- addr = flag.String("addr", "127.0.0.1:8080", "http service address")
- cmdPath string
-)
-
-const (
- // Time allowed to write a message to the peer.
- writeWait = 10 * time.Second
-
- // Maximum message size allowed from peer.
- maxMessageSize = 8192
-
- // Time allowed to read the next pong message from the peer.
- pongWait = 60 * time.Second
-
- // Send pings to peer with this period. Must be less than pongWait.
- pingPeriod = (pongWait * 9) / 10
-
- // Time to wait before force close on connection.
- closeGracePeriod = 10 * time.Second
-)
-
-func pumpStdin(ws *websocket.Conn, w io.Writer) {
- defer ws.Close()
- ws.SetReadLimit(maxMessageSize)
- ws.SetReadDeadline(time.Now().Add(pongWait))
- ws.SetPongHandler(func(string) error { ws.SetReadDeadline(time.Now().Add(pongWait)); return nil })
- for {
- _, message, err := ws.ReadMessage()
- if err != nil {
- break
- }
- message = append(message, '\n')
- if _, err := w.Write(message); err != nil {
- break
- }
- }
-}
-
-func pumpStdout(ws *websocket.Conn, r io.Reader, done chan struct{}) {
- defer func() {
- }()
- s := bufio.NewScanner(r)
- for s.Scan() {
- ws.SetWriteDeadline(time.Now().Add(writeWait))
- if err := ws.WriteMessage(websocket.TextMessage, s.Bytes()); err != nil {
- ws.Close()
- break
- }
- }
- if s.Err() != nil {
- log.Println("scan:", s.Err())
- }
- close(done)
-
- ws.SetWriteDeadline(time.Now().Add(writeWait))
- ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
- time.Sleep(closeGracePeriod)
- ws.Close()
-}
-
-func ping(ws *websocket.Conn, done chan struct{}) {
- ticker := time.NewTicker(pingPeriod)
- defer ticker.Stop()
- for {
- select {
- case <-ticker.C:
- if err := ws.WriteControl(websocket.PingMessage, []byte{}, time.Now().Add(writeWait)); err != nil {
- log.Println("ping:", err)
- }
- case <-done:
- return
- }
- }
-}
-
-func internalError(ws *websocket.Conn, msg string, err error) {
- log.Println(msg, err)
- ws.WriteMessage(websocket.TextMessage, []byte("Internal server error."))
-}
-
-var upgrader = websocket.Upgrader{}
-
-func serveWs(w http.ResponseWriter, r *http.Request) {
- ws, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- log.Println("upgrade:", err)
- return
- }
-
- defer ws.Close()
-
- outr, outw, err := os.Pipe()
- if err != nil {
- internalError(ws, "stdout:", err)
- return
- }
- defer outr.Close()
- defer outw.Close()
-
- inr, inw, err := os.Pipe()
- if err != nil {
- internalError(ws, "stdin:", err)
- return
- }
- defer inr.Close()
- defer inw.Close()
-
- proc, err := os.StartProcess(cmdPath, flag.Args(), &os.ProcAttr{
- Files: []*os.File{inr, outw, outw},
- })
- if err != nil {
- internalError(ws, "start:", err)
- return
- }
-
- inr.Close()
- outw.Close()
-
- stdoutDone := make(chan struct{})
- go pumpStdout(ws, outr, stdoutDone)
- go ping(ws, stdoutDone)
-
- pumpStdin(ws, inw)
-
- // Some commands will exit when stdin is closed.
- inw.Close()
-
- // Other commands need a bonk on the head.
- if err := proc.Signal(os.Interrupt); err != nil {
- log.Println("inter:", err)
- }
-
- select {
- case <-stdoutDone:
- case <-time.After(time.Second):
- // A bigger bonk on the head.
- if err := proc.Signal(os.Kill); err != nil {
- log.Println("term:", err)
- }
- <-stdoutDone
- }
-
- if _, err := proc.Wait(); err != nil {
- log.Println("wait:", err)
- }
-}
-
-func serveHome(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" {
- http.Error(w, "Not found", 404)
- return
- }
- if r.Method != "GET" {
- http.Error(w, "Method not allowed", 405)
- return
- }
- http.ServeFile(w, r, "home.html")
-}
-
-func main() {
- flag.Parse()
- if len(flag.Args()) < 1 {
- log.Fatal("must specify at least one argument")
- }
- var err error
- cmdPath, err = exec.LookPath(flag.Args()[0])
- if err != nil {
- log.Fatal(err)
- }
- http.HandleFunc("/", serveHome)
- http.HandleFunc("/ws", serveWs)
- log.Fatal(http.ListenAndServe(*addr, nil))
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/echo/README.md b/vendor/github.com/gorilla/websocket/examples/echo/README.md
deleted file mode 100644
index 6ad79ed76..000000000
--- a/vendor/github.com/gorilla/websocket/examples/echo/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Client and server example
-
-This example shows a simple client and server.
-
-The server echoes messages sent to it. The client sends a message every second
-and prints all messages received.
-
-To run the example, start the server:
-
- $ go run server.go
-
-Next, start the client:
-
- $ go run client.go
-
-The server includes a simple web client. To use the client, open
-http://127.0.0.1:8080 in the browser and follow the instructions on the page.
diff --git a/vendor/github.com/gorilla/websocket/examples/echo/client.go b/vendor/github.com/gorilla/websocket/examples/echo/client.go
deleted file mode 100644
index 6578094e7..000000000
--- a/vendor/github.com/gorilla/websocket/examples/echo/client.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import (
- "flag"
- "log"
- "net/url"
- "os"
- "os/signal"
- "time"
-
- "github.com/gorilla/websocket"
-)
-
-var addr = flag.String("addr", "localhost:8080", "http service address")
-
-func main() {
- flag.Parse()
- log.SetFlags(0)
-
- interrupt := make(chan os.Signal, 1)
- signal.Notify(interrupt, os.Interrupt)
-
- u := url.URL{Scheme: "ws", Host: *addr, Path: "/echo"}
- log.Printf("connecting to %s", u.String())
-
- c, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
- if err != nil {
- log.Fatal("dial:", err)
- }
- defer c.Close()
-
- done := make(chan struct{})
-
- go func() {
- defer c.Close()
- defer close(done)
- for {
- _, message, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- return
- }
- log.Printf("recv: %s", message)
- }
- }()
-
- ticker := time.NewTicker(time.Second)
- defer ticker.Stop()
-
- for {
- select {
- case t := <-ticker.C:
- err := c.WriteMessage(websocket.TextMessage, []byte(t.String()))
- if err != nil {
- log.Println("write:", err)
- return
- }
- case <-interrupt:
- log.Println("interrupt")
- // To cleanly close a connection, a client should send a close
- // frame and wait for the server to close the connection.
- err := c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
- if err != nil {
- log.Println("write close:", err)
- return
- }
- select {
- case <-done:
- case <-time.After(time.Second):
- }
- c.Close()
- return
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/examples/echo/server.go b/vendor/github.com/gorilla/websocket/examples/echo/server.go
deleted file mode 100644
index ecc680c8b..000000000
--- a/vendor/github.com/gorilla/websocket/examples/echo/server.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import (
- "flag"
- "html/template"
- "log"
- "net/http"
-
- "github.com/gorilla/websocket"
-)
-
-var addr = flag.String("addr", "localhost:8080", "http service address")
-
-var upgrader = websocket.Upgrader{} // use default options
-
-func echo(w http.ResponseWriter, r *http.Request) {
- c, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- log.Print("upgrade:", err)
- return
- }
- defer c.Close()
- for {
- mt, message, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", message)
- err = c.WriteMessage(mt, message)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
-}
-
-func home(w http.ResponseWriter, r *http.Request) {
- homeTemplate.Execute(w, "ws://"+r.Host+"/echo")
-}
-
-func main() {
- flag.Parse()
- log.SetFlags(0)
- http.HandleFunc("/echo", echo)
- http.HandleFunc("/", home)
- log.Fatal(http.ListenAndServe(*addr, nil))
-}
-
-var homeTemplate = template.Must(template.New("").Parse(`
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script>
-window.addEventListener("load", function(evt) {
-
- var output = document.getElementById("output");
- var input = document.getElementById("input");
- var ws;
-
- var print = function(message) {
- var d = document.createElement("div");
- d.innerHTML = message;
- output.appendChild(d);
- };
-
- document.getElementById("open").onclick = function(evt) {
- if (ws) {
- return false;
- }
- ws = new WebSocket("{{.}}");
- ws.onopen = function(evt) {
- print("OPEN");
- }
- ws.onclose = function(evt) {
- print("CLOSE");
- ws = null;
- }
- ws.onmessage = function(evt) {
- print("RESPONSE: " + evt.data);
- }
- ws.onerror = function(evt) {
- print("ERROR: " + evt.data);
- }
- return false;
- };
-
- document.getElementById("send").onclick = function(evt) {
- if (!ws) {
- return false;
- }
- print("SEND: " + input.value);
- ws.send(input.value);
- return false;
- };
-
- document.getElementById("close").onclick = function(evt) {
- if (!ws) {
- return false;
- }
- ws.close();
- return false;
- };
-
-});
-</script>
-</head>
-<body>
-<table>
-<tr><td valign="top" width="50%">
-<p>Click "Open" to create a connection to the server,
-"Send" to send a message to the server and "Close" to close the connection.
-You can change the message and send multiple times.
-<p>
-<form>
-<button id="open">Open</button>
-<button id="close">Close</button>
-<p><input id="input" type="text" value="Hello world!">
-<button id="send">Send</button>
-</form>
-</td><td valign="top" width="50%">
-<div id="output"></div>
-</td></tr></table>
-</body>
-</html>
-`))
diff --git a/vendor/github.com/gorilla/websocket/examples/filewatch/README.md b/vendor/github.com/gorilla/websocket/examples/filewatch/README.md
deleted file mode 100644
index ca4931f3b..000000000
--- a/vendor/github.com/gorilla/websocket/examples/filewatch/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# File Watch example.
-
-This example sends a file to the browser client for display whenever the file is modified.
-
- $ go get github.com/gorilla/websocket
- $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch`
- $ go run main.go <name of file to watch>
- # Open http://localhost:8080/ .
- # Modify the file to see it update in the browser.
diff --git a/vendor/github.com/gorilla/websocket/examples/filewatch/main.go b/vendor/github.com/gorilla/websocket/examples/filewatch/main.go
deleted file mode 100644
index f5f9da5c3..000000000
--- a/vendor/github.com/gorilla/websocket/examples/filewatch/main.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "flag"
- "html/template"
- "io/ioutil"
- "log"
- "net/http"
- "os"
- "strconv"
- "time"
-
- "github.com/gorilla/websocket"
-)
-
-const (
- // Time allowed to write the file to the client.
- writeWait = 10 * time.Second
-
- // Time allowed to read the next pong message from the client.
- pongWait = 60 * time.Second
-
- // Send pings to client with this period. Must be less than pongWait.
- pingPeriod = (pongWait * 9) / 10
-
- // Poll file for changes with this period.
- filePeriod = 10 * time.Second
-)
-
-var (
- addr = flag.String("addr", ":8080", "http service address")
- homeTempl = template.Must(template.New("").Parse(homeHTML))
- filename string
- upgrader = websocket.Upgrader{
- ReadBufferSize: 1024,
- WriteBufferSize: 1024,
- }
-)
-
-func readFileIfModified(lastMod time.Time) ([]byte, time.Time, error) {
- fi, err := os.Stat(filename)
- if err != nil {
- return nil, lastMod, err
- }
- if !fi.ModTime().After(lastMod) {
- return nil, lastMod, nil
- }
- p, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, fi.ModTime(), err
- }
- return p, fi.ModTime(), nil
-}
-
-func reader(ws *websocket.Conn) {
- defer ws.Close()
- ws.SetReadLimit(512)
- ws.SetReadDeadline(time.Now().Add(pongWait))
- ws.SetPongHandler(func(string) error { ws.SetReadDeadline(time.Now().Add(pongWait)); return nil })
- for {
- _, _, err := ws.ReadMessage()
- if err != nil {
- break
- }
- }
-}
-
-func writer(ws *websocket.Conn, lastMod time.Time) {
- lastError := ""
- pingTicker := time.NewTicker(pingPeriod)
- fileTicker := time.NewTicker(filePeriod)
- defer func() {
- pingTicker.Stop()
- fileTicker.Stop()
- ws.Close()
- }()
- for {
- select {
- case <-fileTicker.C:
- var p []byte
- var err error
-
- p, lastMod, err = readFileIfModified(lastMod)
-
- if err != nil {
- if s := err.Error(); s != lastError {
- lastError = s
- p = []byte(lastError)
- }
- } else {
- lastError = ""
- }
-
- if p != nil {
- ws.SetWriteDeadline(time.Now().Add(writeWait))
- if err := ws.WriteMessage(websocket.TextMessage, p); err != nil {
- return
- }
- }
- case <-pingTicker.C:
- ws.SetWriteDeadline(time.Now().Add(writeWait))
- if err := ws.WriteMessage(websocket.PingMessage, []byte{}); err != nil {
- return
- }
- }
- }
-}
-
-func serveWs(w http.ResponseWriter, r *http.Request) {
- ws, err := upgrader.Upgrade(w, r, nil)
- if err != nil {
- if _, ok := err.(websocket.HandshakeError); !ok {
- log.Println(err)
- }
- return
- }
-
- var lastMod time.Time
- if n, err := strconv.ParseInt(r.FormValue("lastMod"), 16, 64); err == nil {
- lastMod = time.Unix(0, n)
- }
-
- go writer(ws, lastMod)
- reader(ws)
-}
-
-func serveHome(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" {
- http.Error(w, "Not found", 404)
- return
- }
- if r.Method != "GET" {
- http.Error(w, "Method not allowed", 405)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- p, lastMod, err := readFileIfModified(time.Time{})
- if err != nil {
- p = []byte(err.Error())
- lastMod = time.Unix(0, 0)
- }
- var v = struct {
- Host string
- Data string
- LastMod string
- }{
- r.Host,
- string(p),
- strconv.FormatInt(lastMod.UnixNano(), 16),
- }
- homeTempl.Execute(w, &v)
-}
-
-func main() {
- flag.Parse()
- if flag.NArg() != 1 {
- log.Fatal("filename not specified")
- }
- filename = flag.Args()[0]
- http.HandleFunc("/", serveHome)
- http.HandleFunc("/ws", serveWs)
- if err := http.ListenAndServe(*addr, nil); err != nil {
- log.Fatal(err)
- }
-}
-
-const homeHTML = `<!DOCTYPE html>
-<html lang="en">
- <head>
- <title>WebSocket Example</title>
- </head>
- <body>
- <pre id="fileData">{{.Data}}</pre>
- <script type="text/javascript">
- (function() {
- var data = document.getElementById("fileData");
- var conn = new WebSocket("ws://{{.Host}}/ws?lastMod={{.LastMod}}");
- conn.onclose = function(evt) {
- data.textContent = 'Connection closed';
- }
- conn.onmessage = function(evt) {
- console.log('file updated');
- data.textContent = evt.data;
- }
- })();
- </script>
- </body>
-</html>
-`
diff --git a/vendor/github.com/gorilla/websocket/json_test.go b/vendor/github.com/gorilla/websocket/json_test.go
deleted file mode 100644
index 61100e481..000000000
--- a/vendor/github.com/gorilla/websocket/json_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bytes"
- "encoding/json"
- "io"
- "reflect"
- "testing"
-)
-
-func TestJSON(t *testing.T) {
- var buf bytes.Buffer
- c := fakeNetConn{&buf, &buf}
- wc := newConn(c, true, 1024, 1024)
- rc := newConn(c, false, 1024, 1024)
-
- var actual, expect struct {
- A int
- B string
- }
- expect.A = 1
- expect.B = "hello"
-
- if err := wc.WriteJSON(&expect); err != nil {
- t.Fatal("write", err)
- }
-
- if err := rc.ReadJSON(&actual); err != nil {
- t.Fatal("read", err)
- }
-
- if !reflect.DeepEqual(&actual, &expect) {
- t.Fatal("equal", actual, expect)
- }
-}
-
-func TestPartialJSONRead(t *testing.T) {
- var buf bytes.Buffer
- c := fakeNetConn{&buf, &buf}
- wc := newConn(c, true, 1024, 1024)
- rc := newConn(c, false, 1024, 1024)
-
- var v struct {
- A int
- B string
- }
- v.A = 1
- v.B = "hello"
-
- messageCount := 0
-
- // Partial JSON values.
-
- data, err := json.Marshal(v)
- if err != nil {
- t.Fatal(err)
- }
- for i := len(data) - 1; i >= 0; i-- {
- if err := wc.WriteMessage(TextMessage, data[:i]); err != nil {
- t.Fatal(err)
- }
- messageCount++
- }
-
- // Whitespace.
-
- if err := wc.WriteMessage(TextMessage, []byte(" ")); err != nil {
- t.Fatal(err)
- }
- messageCount++
-
- // Close.
-
- if err := wc.WriteMessage(CloseMessage, FormatCloseMessage(CloseNormalClosure, "")); err != nil {
- t.Fatal(err)
- }
-
- for i := 0; i < messageCount; i++ {
- err := rc.ReadJSON(&v)
- if err != io.ErrUnexpectedEOF {
- t.Error("read", i, err)
- }
- }
-
- err = rc.ReadJSON(&v)
- if _, ok := err.(*CloseError); !ok {
- t.Error("final", err)
- }
-}
-
-func TestDeprecatedJSON(t *testing.T) {
- var buf bytes.Buffer
- c := fakeNetConn{&buf, &buf}
- wc := newConn(c, true, 1024, 1024)
- rc := newConn(c, false, 1024, 1024)
-
- var actual, expect struct {
- A int
- B string
- }
- expect.A = 1
- expect.B = "hello"
-
- if err := WriteJSON(wc, &expect); err != nil {
- t.Fatal("write", err)
- }
-
- if err := ReadJSON(rc, &actual); err != nil {
- t.Fatal("read", err)
- }
-
- if !reflect.DeepEqual(&actual, &expect) {
- t.Fatal("equal", actual, expect)
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/mask_test.go b/vendor/github.com/gorilla/websocket/mask_test.go
deleted file mode 100644
index 298a1e509..000000000
--- a/vendor/github.com/gorilla/websocket/mask_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of
-// this source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-// Require 1.7 for sub-bencmarks
-// +build go1.7,!appengine
-
-package websocket
-
-import (
- "fmt"
- "testing"
-)
-
-func maskBytesByByte(key [4]byte, pos int, b []byte) int {
- for i := range b {
- b[i] ^= key[pos&3]
- pos++
- }
- return pos & 3
-}
-
-func notzero(b []byte) int {
- for i := range b {
- if b[i] != 0 {
- return i
- }
- }
- return -1
-}
-
-func TestMaskBytes(t *testing.T) {
- key := [4]byte{1, 2, 3, 4}
- for size := 1; size <= 1024; size++ {
- for align := 0; align < wordSize; align++ {
- for pos := 0; pos < 4; pos++ {
- b := make([]byte, size+align)[align:]
- maskBytes(key, pos, b)
- maskBytesByByte(key, pos, b)
- if i := notzero(b); i >= 0 {
- t.Errorf("size:%d, align:%d, pos:%d, offset:%d", size, align, pos, i)
- }
- }
- }
- }
-}
-
-func BenchmarkMaskBytes(b *testing.B) {
- for _, size := range []int{2, 4, 8, 16, 32, 512, 1024} {
- b.Run(fmt.Sprintf("size-%d", size), func(b *testing.B) {
- for _, align := range []int{wordSize / 2} {
- b.Run(fmt.Sprintf("align-%d", align), func(b *testing.B) {
- for _, fn := range []struct {
- name string
- fn func(key [4]byte, pos int, b []byte) int
- }{
- {"byte", maskBytesByByte},
- {"word", maskBytes},
- } {
- b.Run(fn.name, func(b *testing.B) {
- key := newMaskKey()
- data := make([]byte, size+align)[align:]
- for i := 0; i < b.N; i++ {
- fn.fn(key, 0, data)
- }
- b.SetBytes(int64(len(data)))
- })
- }
- })
- }
- })
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/prepared_test.go b/vendor/github.com/gorilla/websocket/prepared_test.go
deleted file mode 100644
index cf98c6c10..000000000
--- a/vendor/github.com/gorilla/websocket/prepared_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2017 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bytes"
- "compress/flate"
- "math/rand"
- "testing"
-)
-
-var preparedMessageTests = []struct {
- messageType int
- isServer bool
- enableWriteCompression bool
- compressionLevel int
-}{
- // Server
- {TextMessage, true, false, flate.BestSpeed},
- {TextMessage, true, true, flate.BestSpeed},
- {TextMessage, true, true, flate.BestCompression},
- {PingMessage, true, false, flate.BestSpeed},
- {PingMessage, true, true, flate.BestSpeed},
-
- // Client
- {TextMessage, false, false, flate.BestSpeed},
- {TextMessage, false, true, flate.BestSpeed},
- {TextMessage, false, true, flate.BestCompression},
- {PingMessage, false, false, flate.BestSpeed},
- {PingMessage, false, true, flate.BestSpeed},
-}
-
-func TestPreparedMessage(t *testing.T) {
- for _, tt := range preparedMessageTests {
- var data = []byte("this is a test")
- var buf bytes.Buffer
- c := newConn(fakeNetConn{Reader: nil, Writer: &buf}, tt.isServer, 1024, 1024)
- if tt.enableWriteCompression {
- c.newCompressionWriter = compressNoContextTakeover
- }
- c.SetCompressionLevel(tt.compressionLevel)
-
- // Seed random number generator for consistent frame mask.
- rand.Seed(1234)
-
- if err := c.WriteMessage(tt.messageType, data); err != nil {
- t.Fatal(err)
- }
- want := buf.String()
-
- pm, err := NewPreparedMessage(tt.messageType, data)
- if err != nil {
- t.Fatal(err)
- }
-
- // Scribble on data to ensure that NewPreparedMessage takes a snapshot.
- copy(data, "hello world")
-
- // Seed random number generator for consistent frame mask.
- rand.Seed(1234)
-
- buf.Reset()
- if err := c.WritePreparedMessage(pm); err != nil {
- t.Fatal(err)
- }
- got := buf.String()
-
- if got != want {
- t.Errorf("write message != prepared message for %+v", tt)
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go
index 50b58a893..3e96a00c8 100644
--- a/vendor/github.com/gorilla/websocket/server.go
+++ b/vendor/github.com/gorilla/websocket/server.go
@@ -243,7 +243,7 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
// of the same origin policy check is:
//
// if req.Header.Get("Origin") != "http://"+req.Host {
-// http.Error(w, "Origin not allowed", 403)
+// http.Error(w, "Origin not allowed", http.StatusForbidden)
// return
// }
//
diff --git a/vendor/github.com/gorilla/websocket/server_test.go b/vendor/github.com/gorilla/websocket/server_test.go
deleted file mode 100644
index c43dbb267..000000000
--- a/vendor/github.com/gorilla/websocket/server_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "net/http"
- "reflect"
- "testing"
-)
-
-var subprotocolTests = []struct {
- h string
- protocols []string
-}{
- {"", nil},
- {"foo", []string{"foo"}},
- {"foo,bar", []string{"foo", "bar"}},
- {"foo, bar", []string{"foo", "bar"}},
- {" foo, bar", []string{"foo", "bar"}},
- {" foo, bar ", []string{"foo", "bar"}},
-}
-
-func TestSubprotocols(t *testing.T) {
- for _, st := range subprotocolTests {
- r := http.Request{Header: http.Header{"Sec-Websocket-Protocol": {st.h}}}
- protocols := Subprotocols(&r)
- if !reflect.DeepEqual(st.protocols, protocols) {
- t.Errorf("SubProtocols(%q) returned %#v, want %#v", st.h, protocols, st.protocols)
- }
- }
-}
-
-var isWebSocketUpgradeTests = []struct {
- ok bool
- h http.Header
-}{
- {false, http.Header{"Upgrade": {"websocket"}}},
- {false, http.Header{"Connection": {"upgrade"}}},
- {true, http.Header{"Connection": {"upgRade"}, "Upgrade": {"WebSocket"}}},
-}
-
-func TestIsWebSocketUpgrade(t *testing.T) {
- for _, tt := range isWebSocketUpgradeTests {
- ok := IsWebSocketUpgrade(&http.Request{Header: tt.h})
- if tt.ok != ok {
- t.Errorf("IsWebSocketUpgrade(%v) returned %v, want %v", tt.h, ok, tt.ok)
- }
- }
-}
-
-var checkSameOriginTests = []struct {
- ok bool
- r *http.Request
-}{
- {false, &http.Request{Host: "example.org", Header: map[string][]string{"Origin": []string{"https://other.org"}}}},
- {true, &http.Request{Host: "example.org", Header: map[string][]string{"Origin": []string{"https://example.org"}}}},
- {true, &http.Request{Host: "Example.org", Header: map[string][]string{"Origin": []string{"https://example.org"}}}},
-}
-
-func TestCheckSameOrigin(t *testing.T) {
- for _, tt := range checkSameOriginTests {
- ok := checkSameOrigin(tt.r)
- if tt.ok != ok {
- t.Errorf("checkSameOrigin(%+v) returned %v, want %v", tt.r, ok, tt.ok)
- }
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/util_test.go b/vendor/github.com/gorilla/websocket/util_test.go
deleted file mode 100644
index 6e15965f5..000000000
--- a/vendor/github.com/gorilla/websocket/util_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2014 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "net/http"
- "reflect"
- "testing"
-)
-
-var equalASCIIFoldTests = []struct {
- t, s string
- eq bool
-}{
- {"WebSocket", "websocket", true},
- {"websocket", "WebSocket", true},
- {"Öyster", "öyster", false},
-}
-
-func TestEqualASCIIFold(t *testing.T) {
- for _, tt := range equalASCIIFoldTests {
- eq := equalASCIIFold(tt.s, tt.t)
- if eq != tt.eq {
- t.Errorf("equalASCIIFold(%q, %q) = %v, want %v", tt.s, tt.t, eq, tt.eq)
- }
- }
-}
-
-var tokenListContainsValueTests = []struct {
- value string
- ok bool
-}{
- {"WebSocket", true},
- {"WEBSOCKET", true},
- {"websocket", true},
- {"websockets", false},
- {"x websocket", false},
- {"websocket x", false},
- {"other,websocket,more", true},
- {"other, websocket, more", true},
-}
-
-func TestTokenListContainsValue(t *testing.T) {
- for _, tt := range tokenListContainsValueTests {
- h := http.Header{"Upgrade": {tt.value}}
- ok := tokenListContainsValue(h, "Upgrade", "websocket")
- if ok != tt.ok {
- t.Errorf("tokenListContainsValue(h, n, %q) = %v, want %v", tt.value, ok, tt.ok)
- }
- }
-}
-
-var parseExtensionTests = []struct {
- value string
- extensions []map[string]string
-}{
- {`foo`, []map[string]string{{"": "foo"}}},
- {`foo, bar; baz=2`, []map[string]string{
- {"": "foo"},
- {"": "bar", "baz": "2"}}},
- {`foo; bar="b,a;z"`, []map[string]string{
- {"": "foo", "bar": "b,a;z"}}},
- {`foo , bar; baz = 2`, []map[string]string{
- {"": "foo"},
- {"": "bar", "baz": "2"}}},
- {`foo, bar; baz=2 junk`, []map[string]string{
- {"": "foo"}}},
- {`foo junk, bar; baz=2 junk`, nil},
- {`mux; max-channels=4; flow-control, deflate-stream`, []map[string]string{
- {"": "mux", "max-channels": "4", "flow-control": ""},
- {"": "deflate-stream"}}},
- {`permessage-foo; x="10"`, []map[string]string{
- {"": "permessage-foo", "x": "10"}}},
- {`permessage-foo; use_y, permessage-foo`, []map[string]string{
- {"": "permessage-foo", "use_y": ""},
- {"": "permessage-foo"}}},
- {`permessage-deflate; client_max_window_bits; server_max_window_bits=10 , permessage-deflate; client_max_window_bits`, []map[string]string{
- {"": "permessage-deflate", "client_max_window_bits": "", "server_max_window_bits": "10"},
- {"": "permessage-deflate", "client_max_window_bits": ""}}},
- {"permessage-deflate; server_no_context_takeover; client_max_window_bits=15", []map[string]string{
- {"": "permessage-deflate", "server_no_context_takeover": "", "client_max_window_bits": "15"},
- }},
-}
-
-func TestParseExtensions(t *testing.T) {
- for _, tt := range parseExtensionTests {
- h := http.Header{http.CanonicalHeaderKey("Sec-WebSocket-Extensions"): {tt.value}}
- extensions := parseExtensions(h)
- if !reflect.DeepEqual(extensions, tt.extensions) {
- t.Errorf("parseExtensions(%q)\n = %v,\nwant %v", tt.value, extensions, tt.extensions)
- }
- }
-}
diff --git a/vendor/github.com/hako/durafmt/durafmt_test.go b/vendor/github.com/hako/durafmt/durafmt_test.go
deleted file mode 100644
index 1a94f026f..000000000
--- a/vendor/github.com/hako/durafmt/durafmt_test.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package durafmt
-
-import (
- "testing"
- "time"
-)
-
-var (
- testStrings []struct {
- test string
- expected string
- }
- testTimes []struct {
- test time.Duration
- expected string
- }
-)
-
-// TestParse for durafmt time.Duration conversion.
-func TestParse(t *testing.T) {
- testTimes = []struct {
- test time.Duration
- expected string
- }{
- {1 * time.Millisecond, "1 millisecond"},
- {1 * time.Second, "1 second"},
- {1 * time.Hour, "1 hour"},
- {1 * time.Minute, "1 minute"},
- {2 * time.Millisecond, "2 milliseconds"},
- {2 * time.Second, "2 seconds"},
- {2 * time.Minute, "2 minutes"},
- {1 * time.Hour, "1 hour"},
- {2 * time.Hour, "2 hours"},
- {10 * time.Hour, "10 hours"},
- {24 * time.Hour, "1 day"},
- {48 * time.Hour, "2 days"},
- {120 * time.Hour, "5 days"},
- {168 * time.Hour, "1 week"},
- {672 * time.Hour, "4 weeks"},
- {8759 * time.Hour, "52 weeks 23 hours"},
- {8760 * time.Hour, "1 year"},
- {17519 * time.Hour, "1 year 52 weeks 23 hours"},
- {17520 * time.Hour, "2 years"},
- {26279 * time.Hour, "2 years 52 weeks 23 hours"},
- {26280 * time.Hour, "3 years"},
- {201479 * time.Hour, "22 years 52 weeks 23 hours"},
- {201480 * time.Hour, "23 years"},
- {-1 * time.Second, "-1 second"},
- {-10 * time.Second, "-10 seconds"},
- {-100 * time.Second, "-1 minute 40 seconds"},
- {-1 * time.Millisecond, "-1 millisecond"},
- {-10 * time.Millisecond, "-10 milliseconds"},
- {-100 * time.Millisecond, "-100 milliseconds"},
- }
-
- for _, table := range testTimes {
- result := Parse(table.test).String()
- if result != table.expected {
- t.Errorf("Parse(%q).String() = %q. got %q, expected %q",
- table.test, result, result, table.expected)
- }
- }
-}
-
-// TestParseString for durafmt duration string conversion.
-func TestParseString(t *testing.T) {
- testStrings = []struct {
- test string
- expected string
- }{
- {"1ms", "1 millisecond"},
- {"2ms", "2 milliseconds"},
- {"1s", "1 second"},
- {"2s", "2 seconds"},
- {"1m", "1 minute"},
- {"2m", "2 minutes"},
- {"1h", "1 hour"},
- {"2h", "2 hours"},
- {"10h", "10 hours"},
- {"24h", "1 day"},
- {"48h", "2 days"},
- {"120h", "5 days"},
- {"168h", "1 week"},
- {"672h", "4 weeks"},
- {"8759h", "52 weeks 23 hours"},
- {"8760h", "1 year"},
- {"17519h", "1 year 52 weeks 23 hours"},
- {"17520h", "2 years"},
- {"26279h", "2 years 52 weeks 23 hours"},
- {"26280h", "3 years"},
- {"201479h", "22 years 52 weeks 23 hours"},
- {"201480h", "23 years"},
- {"1m0s", "1 minute"},
- {"1m2s", "1 minute 2 seconds"},
- {"3h4m5s", "3 hours 4 minutes 5 seconds"},
- {"6h7m8s9ms", "6 hours 7 minutes 8 seconds 9 milliseconds"},
- {"0ms", "0 milliseconds"},
- {"0s", "0 seconds"},
- {"0m", "0 minutes"},
- {"0h", "0 hours"},
- {"0m1ms", "1 millisecond"},
- {"0m1s", "1 second"},
- {"0m1m", "1 minute"},
- {"0m2ms", "2 milliseconds"},
- {"0m2s", "2 seconds"},
- {"0m2m", "2 minutes"},
- {"0m2m3h", "3 hours 2 minutes"},
- {"0m2m34h", "1 day 10 hours 2 minutes"},
- {"0m56h7m8ms", "2 days 8 hours 7 minutes 8 milliseconds"},
- {"-1ms", "-1 millisecond"},
- {"-1s", "-1 second"},
- {"-1m", "-1 minute"},
- {"-1h", "-1 hour"},
- {"-2ms", "-2 milliseconds"},
- {"-2s", "-2 seconds"},
- {"-2m", "-2 minutes"},
- {"-2h", "-2 hours"},
- {"-10h", "-10 hours"},
- {"-24h", "-1 day"},
- {"-48h", "-2 days"},
- {"-120h", "-5 days"},
- {"-168h", "-1 week"},
- {"-672h", "-4 weeks"},
- {"-8760h", "-1 year"},
- {"-1m0s", "-1 minute"},
- {"-0m2s", "-2 seconds"},
- {"-0m2m", "-2 minutes"},
- {"-0m2m3h", "-3 hours 2 minutes"},
- {"-0m2m34h", "-1 day 10 hours 2 minutes"},
- {"-0ms", "-0 milliseconds"},
- {"-0s", "-0 seconds"},
- {"-0m", "-0 minutes"},
- {"-0h", "-0 hours"},
- }
-
- for _, table := range testStrings {
- d, err := ParseString(table.test)
- if err != nil {
- t.Errorf("%q", err)
- }
- result := d.String()
- if result != table.expected {
- t.Errorf("d.String() = %q. got %q, expected %q",
- table.test, result, table.expected)
- }
- }
-}
-
-// TestInvalidDuration for invalid inputs.
-func TestInvalidDuration(t *testing.T) {
- testStrings = []struct {
- test string
- expected string
- }{
- {"1", ""},
- {"1d", ""},
- {"1w", ""},
- {"1wk", ""},
- {"1y", ""},
- {"", ""},
- {"m1", ""},
- {"1nmd", ""},
- {"0", ""},
- {"-0", ""},
- }
-
- for _, table := range testStrings {
- _, err := ParseString(table.test)
- if err == nil {
- t.Errorf("ParseString(%q). got %q, expected %q",
- table.test, err, table.expected)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/errwrap/errwrap_test.go b/vendor/github.com/hashicorp/errwrap/errwrap_test.go
deleted file mode 100644
index 5ae5f8e3c..000000000
--- a/vendor/github.com/hashicorp/errwrap/errwrap_test.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package errwrap
-
-import (
- "fmt"
- "testing"
-)
-
-func TestWrappedError_impl(t *testing.T) {
- var _ error = new(wrappedError)
-}
-
-func TestGetAll(t *testing.T) {
- cases := []struct {
- Err error
- Msg string
- Len int
- }{
- {},
- {
- fmt.Errorf("foo"),
- "foo",
- 1,
- },
- {
- fmt.Errorf("bar"),
- "foo",
- 0,
- },
- {
- Wrapf("bar", fmt.Errorf("foo")),
- "foo",
- 1,
- },
- {
- Wrapf("{{err}}", fmt.Errorf("foo")),
- "foo",
- 2,
- },
- {
- Wrapf("bar", Wrapf("baz", fmt.Errorf("foo"))),
- "foo",
- 1,
- },
- }
-
- for i, tc := range cases {
- actual := GetAll(tc.Err, tc.Msg)
- if len(actual) != tc.Len {
- t.Fatalf("%d: bad: %#v", i, actual)
- }
- for _, v := range actual {
- if v.Error() != tc.Msg {
- t.Fatalf("%d: bad: %#v", i, actual)
- }
- }
- }
-}
-
-func TestGetAllType(t *testing.T) {
- cases := []struct {
- Err error
- Type interface{}
- Len int
- }{
- {},
- {
- fmt.Errorf("foo"),
- "foo",
- 0,
- },
- {
- fmt.Errorf("bar"),
- fmt.Errorf("foo"),
- 1,
- },
- {
- Wrapf("bar", fmt.Errorf("foo")),
- fmt.Errorf("baz"),
- 2,
- },
- {
- Wrapf("bar", Wrapf("baz", fmt.Errorf("foo"))),
- Wrapf("", nil),
- 0,
- },
- }
-
- for i, tc := range cases {
- actual := GetAllType(tc.Err, tc.Type)
- if len(actual) != tc.Len {
- t.Fatalf("%d: bad: %#v", i, actual)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/iradix_test.go b/vendor/github.com/hashicorp/go-immutable-radix/iradix_test.go
deleted file mode 100644
index 326299de8..000000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/iradix_test.go
+++ /dev/null
@@ -1,1531 +0,0 @@
-package iradix
-
-import (
- "fmt"
- "reflect"
- "sort"
- "testing"
-
- "github.com/hashicorp/go-uuid"
-)
-
-func CopyTree(t *Tree) *Tree {
- nt := &Tree{
- root: CopyNode(t.root),
- size: t.size,
- }
- return nt
-}
-
-func CopyNode(n *Node) *Node {
- nn := &Node{}
- if n.mutateCh != nil {
- nn.mutateCh = n.mutateCh
- }
- if n.prefix != nil {
- nn.prefix = make([]byte, len(n.prefix))
- copy(nn.prefix, n.prefix)
- }
- if n.leaf != nil {
- nn.leaf = CopyLeaf(n.leaf)
- }
- if len(n.edges) != 0 {
- nn.edges = make([]edge, len(n.edges))
- for idx, edge := range n.edges {
- nn.edges[idx].label = edge.label
- nn.edges[idx].node = CopyNode(edge.node)
- }
- }
- return nn
-}
-
-func CopyLeaf(l *leafNode) *leafNode {
- ll := &leafNode{
- mutateCh: l.mutateCh,
- key: l.key,
- val: l.val,
- }
- return ll
-}
-
-func TestRadix_HugeTxn(t *testing.T) {
- r := New()
-
- // Insert way more nodes than the cache can fit
- txn1 := r.Txn()
- var expect []string
- for i := 0; i < defaultModifiedCache*100; i++ {
- gen, err := uuid.GenerateUUID()
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- txn1.Insert([]byte(gen), i)
- expect = append(expect, gen)
- }
- r = txn1.Commit()
- sort.Strings(expect)
-
- // Collect the output, should be sorted
- var out []string
- fn := func(k []byte, v interface{}) bool {
- out = append(out, string(k))
- return false
- }
- r.Root().Walk(fn)
-
- // Verify the match
- if len(out) != len(expect) {
- t.Fatalf("length mis-match: %d vs %d", len(out), len(expect))
- }
- for i := 0; i < len(out); i++ {
- if out[i] != expect[i] {
- t.Fatalf("mis-match: %v %v", out[i], expect[i])
- }
- }
-}
-
-func TestRadix(t *testing.T) {
- var min, max string
- inp := make(map[string]interface{})
- for i := 0; i < 1000; i++ {
- gen, err := uuid.GenerateUUID()
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- inp[gen] = i
- if gen < min || i == 0 {
- min = gen
- }
- if gen > max || i == 0 {
- max = gen
- }
- }
-
- r := New()
- rCopy := CopyTree(r)
- for k, v := range inp {
- newR, _, _ := r.Insert([]byte(k), v)
- if !reflect.DeepEqual(r, rCopy) {
- t.Errorf("r: %#v rc: %#v", r, rCopy)
- t.Errorf("r: %#v rc: %#v", r.root, rCopy.root)
- t.Fatalf("structure modified %d", newR.Len())
- }
- r = newR
- rCopy = CopyTree(r)
- }
-
- if r.Len() != len(inp) {
- t.Fatalf("bad length: %v %v", r.Len(), len(inp))
- }
-
- for k, v := range inp {
- out, ok := r.Get([]byte(k))
- if !ok {
- t.Fatalf("missing key: %v", k)
- }
- if out != v {
- t.Fatalf("value mis-match: %v %v", out, v)
- }
- }
-
- // Check min and max
- outMin, _, _ := r.Root().Minimum()
- if string(outMin) != min {
- t.Fatalf("bad minimum: %v %v", outMin, min)
- }
- outMax, _, _ := r.Root().Maximum()
- if string(outMax) != max {
- t.Fatalf("bad maximum: %v %v", outMax, max)
- }
-
- // Copy the full tree before delete
- orig := r
- origCopy := CopyTree(r)
-
- for k, v := range inp {
- tree, out, ok := r.Delete([]byte(k))
- r = tree
- if !ok {
- t.Fatalf("missing key: %v", k)
- }
- if out != v {
- t.Fatalf("value mis-match: %v %v", out, v)
- }
- }
- if r.Len() != 0 {
- t.Fatalf("bad length: %v", r.Len())
- }
-
- if !reflect.DeepEqual(orig, origCopy) {
- t.Fatalf("structure modified")
- }
-}
-
-func TestRoot(t *testing.T) {
- r := New()
- r, _, ok := r.Delete(nil)
- if ok {
- t.Fatalf("bad")
- }
- r, _, ok = r.Insert(nil, true)
- if ok {
- t.Fatalf("bad")
- }
- val, ok := r.Get(nil)
- if !ok || val != true {
- t.Fatalf("bad: %#v", val)
- }
- r, val, ok = r.Delete(nil)
- if !ok || val != true {
- t.Fatalf("bad: %v", val)
- }
-}
-
-func TestInsert_UpdateFeedback(t *testing.T) {
- r := New()
- txn1 := r.Txn()
-
- for i := 0; i < 10; i++ {
- var old interface{}
- var didUpdate bool
- old, didUpdate = txn1.Insert([]byte("helloworld"), i)
- if i == 0 {
- if old != nil || didUpdate {
- t.Fatalf("bad: %d %v %v", i, old, didUpdate)
- }
- } else {
- if old == nil || old.(int) != i-1 || !didUpdate {
- t.Fatalf("bad: %d %v %v", i, old, didUpdate)
- }
- }
- }
-}
-
-func TestDelete(t *testing.T) {
- r := New()
- s := []string{"", "A", "AB"}
-
- for _, ss := range s {
- r, _, _ = r.Insert([]byte(ss), true)
- }
- var ok bool
- for _, ss := range s {
- r, _, ok = r.Delete([]byte(ss))
- if !ok {
- t.Fatalf("bad %q", ss)
- }
- }
-}
-
-func TestDeletePrefix(t *testing.T) {
-
- type exp struct {
- desc string
- treeNodes []string
- prefix string
- expectedOut []string
- }
-
- //various test cases where DeletePrefix should succeed
- cases := []exp{
- {
- "prefix not a node in tree",
- []string{
- "",
- "test/test1",
- "test/test2",
- "test/test3",
- "R",
- "RA"},
- "test",
- []string{
- "",
- "R",
- "RA",
- },
- },
- {
- "prefix matches a node in tree",
- []string{
- "",
- "test",
- "test/test1",
- "test/test2",
- "test/test3",
- "test/testAAA",
- "R",
- "RA",
- },
- "test",
- []string{
- "",
- "R",
- "RA",
- },
- },
- {
- "longer prefix, but prefix is not a node in tree",
- []string{
- "",
- "test/test1",
- "test/test2",
- "test/test3",
- "test/testAAA",
- "R",
- "RA",
- },
- "test/test",
- []string{
- "",
- "R",
- "RA",
- },
- },
- {
- "prefix only matches one node",
- []string{
- "",
- "AB",
- "ABC",
- "AR",
- "R",
- "RA",
- },
- "AR",
- []string{
- "",
- "AB",
- "ABC",
- "R",
- "RA",
- },
- },
- }
-
- for _, testCase := range cases {
- t.Run(testCase.desc, func(t *testing.T) {
- r := New()
- for _, ss := range testCase.treeNodes {
- r, _, _ = r.Insert([]byte(ss), true)
- }
- if got, want := r.Len(), len(testCase.treeNodes); got != want {
- t.Fatalf("Unexpected tree length after insert, got %d want %d ", got, want)
- }
- r, ok := r.DeletePrefix([]byte(testCase.prefix))
- if !ok {
- t.Fatalf("DeletePrefix should have returned true for tree %v, deleting prefix %v", testCase.treeNodes, testCase.prefix)
- }
- if got, want := r.Len(), len(testCase.expectedOut); got != want {
- t.Fatalf("Bad tree length, got %d want %d tree %v, deleting prefix %v ", got, want, testCase.treeNodes, testCase.prefix)
- }
-
- verifyTree(t, testCase.expectedOut, r)
- //Delete a non-existant node
- r, ok = r.DeletePrefix([]byte("CCCCC"))
- if ok {
- t.Fatalf("Expected DeletePrefix to return false ")
- }
- verifyTree(t, testCase.expectedOut, r)
- })
- }
-}
-
-func TestTrackMutate_DeletePrefix(t *testing.T) {
-
- r := New()
-
- keys := []string{
- "foo",
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "bazbaz",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- rootWatch, _, _ := r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("Should have returned a watch")
- }
-
- nodeWatch1, _, _ := r.Root().GetWatch([]byte("foo/bar/baz"))
- if nodeWatch1 == nil {
- t.Fatalf("Should have returned a watch")
- }
-
- nodeWatch2, _, _ := r.Root().GetWatch([]byte("foo/baz/bar"))
- if nodeWatch2 == nil {
- t.Fatalf("Should have returned a watch")
- }
-
- nodeWatch3, _, _ := r.Root().GetWatch([]byte("foo/zip/zap"))
- if nodeWatch3 == nil {
- t.Fatalf("Should have returned a watch")
- }
-
- unknownNodeWatch, _, _ := r.Root().GetWatch([]byte("bazbaz"))
- if unknownNodeWatch == nil {
- t.Fatalf("Should have returned a watch")
- }
-
- // Verify that deleting prefixes triggers the right set of watches
- txn := r.Txn()
- txn.TrackMutate(true)
- ok := txn.DeletePrefix([]byte("foo"))
- if !ok {
- t.Fatalf("Expected delete prefix to return true")
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("Transaction was not committed, no channel should have been closed")
- }
-
- txn.Commit()
-
- // Verify that all the leaf nodes we set up watches for above get triggered from the delete prefix call
- select {
- case <-rootWatch:
- default:
- t.Fatalf("root watch was not triggered")
- }
- select {
- case <-nodeWatch1:
- default:
- t.Fatalf("node watch was not triggered")
- }
- select {
- case <-nodeWatch2:
- default:
- t.Fatalf("node watch was not triggered")
- }
- select {
- case <-nodeWatch3:
- default:
- t.Fatalf("node watch was not triggered")
- }
- select {
- case <-unknownNodeWatch:
- t.Fatalf("Unrelated node watch was triggered during a prefix delete")
- default:
- }
-
-}
-
-func verifyTree(t *testing.T, expected []string, r *Tree) {
- root := r.Root()
- out := []string{}
- fn := func(k []byte, v interface{}) bool {
- out = append(out, string(k))
- return false
- }
- root.Walk(fn)
-
- if !reflect.DeepEqual(expected, out) {
- t.Fatalf("Unexpected contents of tree after delete prefix: expected %v, but got %v", expected, out)
- }
-}
-
-func TestLongestPrefix(t *testing.T) {
- r := New()
-
- keys := []string{
- "",
- "foo",
- "foobar",
- "foobarbaz",
- "foobarbazzip",
- "foozip",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- type exp struct {
- inp string
- out string
- }
- cases := []exp{
- {"a", ""},
- {"abc", ""},
- {"fo", ""},
- {"foo", "foo"},
- {"foob", "foo"},
- {"foobar", "foobar"},
- {"foobarba", "foobar"},
- {"foobarbaz", "foobarbaz"},
- {"foobarbazzi", "foobarbaz"},
- {"foobarbazzip", "foobarbazzip"},
- {"foozi", "foo"},
- {"foozip", "foozip"},
- {"foozipzap", "foozip"},
- }
- root := r.Root()
- for _, test := range cases {
- m, _, ok := root.LongestPrefix([]byte(test.inp))
- if !ok {
- t.Fatalf("no match: %v", test)
- }
- if string(m) != test.out {
- t.Fatalf("mis-match: %v %v", m, test)
- }
- }
-}
-
-func TestWalkPrefix(t *testing.T) {
- r := New()
-
- keys := []string{
- "foobar",
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- type exp struct {
- inp string
- out []string
- }
- cases := []exp{
- exp{
- "f",
- []string{"foobar", "foo/bar/baz", "foo/baz/bar", "foo/zip/zap"},
- },
- exp{
- "foo",
- []string{"foobar", "foo/bar/baz", "foo/baz/bar", "foo/zip/zap"},
- },
- exp{
- "foob",
- []string{"foobar"},
- },
- exp{
- "foo/",
- []string{"foo/bar/baz", "foo/baz/bar", "foo/zip/zap"},
- },
- exp{
- "foo/b",
- []string{"foo/bar/baz", "foo/baz/bar"},
- },
- exp{
- "foo/ba",
- []string{"foo/bar/baz", "foo/baz/bar"},
- },
- exp{
- "foo/bar",
- []string{"foo/bar/baz"},
- },
- exp{
- "foo/bar/baz",
- []string{"foo/bar/baz"},
- },
- exp{
- "foo/bar/bazoo",
- []string{},
- },
- exp{
- "z",
- []string{"zipzap"},
- },
- }
-
- root := r.Root()
- for _, test := range cases {
- out := []string{}
- fn := func(k []byte, v interface{}) bool {
- out = append(out, string(k))
- return false
- }
- root.WalkPrefix([]byte(test.inp), fn)
- sort.Strings(out)
- sort.Strings(test.out)
- if !reflect.DeepEqual(out, test.out) {
- t.Fatalf("mis-match: %v %v", out, test.out)
- }
- }
-}
-
-func TestWalkPath(t *testing.T) {
- r := New()
-
- keys := []string{
- "foo",
- "foo/bar",
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- type exp struct {
- inp string
- out []string
- }
- cases := []exp{
- exp{
- "f",
- []string{},
- },
- exp{
- "foo",
- []string{"foo"},
- },
- exp{
- "foo/",
- []string{"foo"},
- },
- exp{
- "foo/ba",
- []string{"foo"},
- },
- exp{
- "foo/bar",
- []string{"foo", "foo/bar"},
- },
- exp{
- "foo/bar/baz",
- []string{"foo", "foo/bar", "foo/bar/baz"},
- },
- exp{
- "foo/bar/bazoo",
- []string{"foo", "foo/bar", "foo/bar/baz"},
- },
- exp{
- "z",
- []string{},
- },
- }
-
- root := r.Root()
- for _, test := range cases {
- out := []string{}
- fn := func(k []byte, v interface{}) bool {
- out = append(out, string(k))
- return false
- }
- root.WalkPath([]byte(test.inp), fn)
- sort.Strings(out)
- sort.Strings(test.out)
- if !reflect.DeepEqual(out, test.out) {
- t.Fatalf("mis-match: %v %v", out, test.out)
- }
- }
-}
-
-func TestIteratePrefix(t *testing.T) {
- r := New()
-
- keys := []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- type exp struct {
- inp string
- out []string
- }
- cases := []exp{
- exp{
- "",
- keys,
- },
- exp{
- "f",
- []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- },
- },
- exp{
- "foo",
- []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- },
- },
- exp{
- "foob",
- []string{"foobar"},
- },
- exp{
- "foo/",
- []string{"foo/bar/baz", "foo/baz/bar", "foo/zip/zap"},
- },
- exp{
- "foo/b",
- []string{"foo/bar/baz", "foo/baz/bar"},
- },
- exp{
- "foo/ba",
- []string{"foo/bar/baz", "foo/baz/bar"},
- },
- exp{
- "foo/bar",
- []string{"foo/bar/baz"},
- },
- exp{
- "foo/bar/baz",
- []string{"foo/bar/baz"},
- },
- exp{
- "foo/bar/bazoo",
- []string{},
- },
- exp{
- "z",
- []string{"zipzap"},
- },
- }
-
- root := r.Root()
- for idx, test := range cases {
- iter := root.Iterator()
- if test.inp != "" {
- iter.SeekPrefix([]byte(test.inp))
- }
-
- // Consume all the keys
- out := []string{}
- for {
- key, _, ok := iter.Next()
- if !ok {
- break
- }
- out = append(out, string(key))
- }
- if !reflect.DeepEqual(out, test.out) {
- t.Fatalf("mis-match: %d %v %v", idx, out, test.out)
- }
- }
-}
-
-func TestMergeChildNilEdges(t *testing.T) {
- r := New()
- r, _, _ = r.Insert([]byte("foobar"), 42)
- r, _, _ = r.Insert([]byte("foozip"), 43)
- r, _, _ = r.Delete([]byte("foobar"))
-
- root := r.Root()
- out := []string{}
- fn := func(k []byte, v interface{}) bool {
- out = append(out, string(k))
- return false
- }
- root.Walk(fn)
-
- expect := []string{"foozip"}
- sort.Strings(out)
- sort.Strings(expect)
- if !reflect.DeepEqual(out, expect) {
- t.Fatalf("mis-match: %v %v", out, expect)
- }
-}
-
-func TestMergeChildVisibility(t *testing.T) {
- r := New()
- r, _, _ = r.Insert([]byte("foobar"), 42)
- r, _, _ = r.Insert([]byte("foobaz"), 43)
- r, _, _ = r.Insert([]byte("foozip"), 10)
-
- txn1 := r.Txn()
- txn2 := r.Txn()
-
- // Ensure we get the expected value foobar and foobaz
- if val, ok := txn1.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn1.Get([]byte("foobaz")); !ok || val != 43 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn2.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn2.Get([]byte("foobaz")); !ok || val != 43 {
- t.Fatalf("bad: %v", val)
- }
-
- // Delete of foozip will cause a merge child between the
- // "foo" and "ba" nodes.
- if val, ok := txn2.Delete([]byte("foozip")); !ok || val != 10 {
- t.Fatalf("bad: %v", val)
- }
-
- // Insert of "foobaz" will update the slice of the "fooba" node
- // in-place to point to the new "foobaz" node. This in-place update
- // will cause the visibility of the update to leak into txn1 (prior
- // to the fix).
- if val, ok := txn2.Insert([]byte("foobaz"), 44); !ok || val != 43 {
- t.Fatalf("bad: %v", val)
- }
-
- // Ensure we get the expected value foobar and foobaz
- if val, ok := txn1.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn1.Get([]byte("foobaz")); !ok || val != 43 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn2.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn2.Get([]byte("foobaz")); !ok || val != 44 {
- t.Fatalf("bad: %v", val)
- }
-
- // Commit txn2
- r = txn2.Commit()
-
- // Ensure we get the expected value foobar and foobaz
- if val, ok := txn1.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := txn1.Get([]byte("foobaz")); !ok || val != 43 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := r.Get([]byte("foobar")); !ok || val != 42 {
- t.Fatalf("bad: %v", val)
- }
- if val, ok := r.Get([]byte("foobaz")); !ok || val != 44 {
- t.Fatalf("bad: %v", val)
- }
-}
-
-// isClosed returns true if the given channel is closed.
-func isClosed(ch chan struct{}) bool {
- select {
- case <-ch:
- return true
- default:
- return false
- }
-}
-
-// hasAnyClosedMutateCh scans the given tree and returns true if there are any
-// closed mutate channels on any nodes or leaves.
-func hasAnyClosedMutateCh(r *Tree) bool {
- for iter := r.root.rawIterator(); iter.Front() != nil; iter.Next() {
- n := iter.Front()
- if isClosed(n.mutateCh) {
- return true
- }
- if n.isLeaf() && isClosed(n.leaf.mutateCh) {
- return true
- }
- }
- return false
-}
-
-func TestTrackMutate_SeekPrefixWatch(t *testing.T) {
- for i := 0; i < 3; i++ {
- r := New()
-
- keys := []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- iter := r.Root().Iterator()
- rootWatch := iter.SeekPrefixWatch([]byte("nope"))
-
- iter = r.Root().Iterator()
- parentWatch := iter.SeekPrefixWatch([]byte("foo"))
-
- iter = r.Root().Iterator()
- leafWatch := iter.SeekPrefixWatch([]byte("foobar"))
-
- iter = r.Root().Iterator()
- missingWatch := iter.SeekPrefixWatch([]byte("foobarbaz"))
-
- iter = r.Root().Iterator()
- otherWatch := iter.SeekPrefixWatch([]byte("foo/b"))
-
- // Write to a sub-child should trigger the leaf!
- txn := r.Txn()
- txn.TrackMutate(true)
- txn.Insert([]byte("foobarbaz"), nil)
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Verify root and parent triggered, and leaf affected
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-missingWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
-
- iter = r.Root().Iterator()
- rootWatch = iter.SeekPrefixWatch([]byte("nope"))
-
- iter = r.Root().Iterator()
- parentWatch = iter.SeekPrefixWatch([]byte("foo"))
-
- iter = r.Root().Iterator()
- leafWatch = iter.SeekPrefixWatch([]byte("foobar"))
-
- iter = r.Root().Iterator()
- missingWatch = iter.SeekPrefixWatch([]byte("foobarbaz"))
-
- // Delete to a sub-child should trigger the leaf!
- txn = r.Txn()
- txn.TrackMutate(true)
- txn.Delete([]byte("foobarbaz"))
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Verify root and parent triggered, and leaf affected
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-missingWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
- }
-}
-
-func TestTrackMutate_GetWatch(t *testing.T) {
- for i := 0; i < 3; i++ {
- r := New()
-
- keys := []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- "zipzap",
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- if r.Len() != len(keys) {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- rootWatch, _, ok := r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("bad")
- }
-
- parentWatch, _, ok := r.Root().GetWatch([]byte("foo"))
- if parentWatch == nil {
- t.Fatalf("bad")
- }
-
- leafWatch, _, ok := r.Root().GetWatch([]byte("foobar"))
- if !ok {
- t.Fatalf("should be found")
- }
- if leafWatch == nil {
- t.Fatalf("bad")
- }
-
- otherWatch, _, ok := r.Root().GetWatch([]byte("foo/b"))
- if otherWatch == nil {
- t.Fatalf("bad")
- }
-
- // Write to a sub-child should not trigger the leaf!
- txn := r.Txn()
- txn.TrackMutate(true)
- txn.Insert([]byte("foobarbaz"), nil)
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Verify root and parent triggered, not leaf affected
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- t.Fatalf("bad")
- default:
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
-
- // Setup new watchers
- rootWatch, _, ok = r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("bad")
- }
-
- parentWatch, _, ok = r.Root().GetWatch([]byte("foo"))
- if parentWatch == nil {
- t.Fatalf("bad")
- }
-
- // Write to a exactly leaf should trigger the leaf!
- txn = r.Txn()
- txn.TrackMutate(true)
- txn.Insert([]byte("foobar"), nil)
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
-
- // Setup all the watchers again
- rootWatch, _, ok = r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("bad")
- }
-
- parentWatch, _, ok = r.Root().GetWatch([]byte("foo"))
- if parentWatch == nil {
- t.Fatalf("bad")
- }
-
- leafWatch, _, ok = r.Root().GetWatch([]byte("foobar"))
- if !ok {
- t.Fatalf("should be found")
- }
- if leafWatch == nil {
- t.Fatalf("bad")
- }
-
- // Delete to a sub-child should not trigger the leaf!
- txn = r.Txn()
- txn.TrackMutate(true)
- txn.Delete([]byte("foobarbaz"))
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Verify root and parent triggered, not leaf affected
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- t.Fatalf("bad")
- default:
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
-
- // Setup new watchers
- rootWatch, _, ok = r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("bad")
- }
-
- parentWatch, _, ok = r.Root().GetWatch([]byte("foo"))
- if parentWatch == nil {
- t.Fatalf("bad")
- }
-
- // Write to a exactly leaf should trigger the leaf!
- txn = r.Txn()
- txn.TrackMutate(true)
- txn.Delete([]byte("foobar"))
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-otherWatch:
- t.Fatalf("bad")
- default:
- }
- }
-}
-
-func TestTrackMutate_HugeTxn(t *testing.T) {
- r := New()
-
- keys := []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- "nochange",
- }
- for i := 0; i < defaultModifiedCache; i++ {
- key := fmt.Sprintf("aaa%d", i)
- r, _, _ = r.Insert([]byte(key), nil)
- }
- for _, k := range keys {
- r, _, _ = r.Insert([]byte(k), nil)
- }
- for i := 0; i < defaultModifiedCache; i++ {
- key := fmt.Sprintf("zzz%d", i)
- r, _, _ = r.Insert([]byte(key), nil)
- }
- if r.Len() != len(keys)+2*defaultModifiedCache {
- t.Fatalf("bad len: %v %v", r.Len(), len(keys))
- }
-
- rootWatch, _, ok := r.Root().GetWatch(nil)
- if rootWatch == nil {
- t.Fatalf("bad")
- }
-
- parentWatch, _, ok := r.Root().GetWatch([]byte("foo"))
- if parentWatch == nil {
- t.Fatalf("bad")
- }
-
- leafWatch, _, ok := r.Root().GetWatch([]byte("foobar"))
- if !ok {
- t.Fatalf("should be found")
- }
- if leafWatch == nil {
- t.Fatalf("bad")
- }
-
- nopeWatch, _, ok := r.Root().GetWatch([]byte("nochange"))
- if !ok {
- t.Fatalf("should be found")
- }
- if nopeWatch == nil {
- t.Fatalf("bad")
- }
-
- beforeWatch, _, ok := r.Root().GetWatch([]byte("aaa123"))
- if beforeWatch == nil {
- t.Fatalf("bad")
- }
-
- afterWatch, _, ok := r.Root().GetWatch([]byte("zzz123"))
- if afterWatch == nil {
- t.Fatalf("bad")
- }
-
- // Start the transaction.
- txn := r.Txn()
- txn.TrackMutate(true)
-
- // Add new nodes on both sides of the tree and delete enough nodes to
- // overflow the tracking.
- txn.Insert([]byte("aaa"), nil)
- for i := 0; i < defaultModifiedCache; i++ {
- key := fmt.Sprintf("aaa%d", i)
- txn.Delete([]byte(key))
- }
- for i := 0; i < defaultModifiedCache; i++ {
- key := fmt.Sprintf("zzz%d", i)
- txn.Delete([]byte(key))
- }
- txn.Insert([]byte("zzz"), nil)
-
- // Hit the leaf, and add a child so we make multiple mutations to the
- // same node.
- txn.Insert([]byte("foobar"), nil)
- txn.Insert([]byte("foobarbaz"), nil)
-
- // Commit and make sure we overflowed but didn't take on extra stuff.
- r = txn.CommitOnly()
- if !txn.trackOverflow || txn.trackChannels != nil {
- t.Fatalf("bad")
- }
-
- // Now do the trigger.
- txn.Notify()
-
- // Make sure no closed channels escaped the transaction.
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Verify the watches fired as expected.
- select {
- case <-rootWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-parentWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-leafWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-nopeWatch:
- t.Fatalf("bad")
- default:
- }
- select {
- case <-beforeWatch:
- default:
- t.Fatalf("bad")
- }
- select {
- case <-afterWatch:
- default:
- t.Fatalf("bad")
- }
-}
-
-func TestTrackMutate_mergeChild(t *testing.T) {
- // This case does a delete of the "acb" leaf, which causes the "aca"
- // leaf to get merged with the old "ac" node:
- //
- // [root] [root]
- // |a |a
- // [node] [node]
- // b/ \c b/ \c
- // (ab) [node] (ab) (aca)
- // a/ \b
- // (aca) (acb)
- //
- for i := 0; i < 3; i++ {
- r := New()
- r, _, _ = r.Insert([]byte("ab"), nil)
- r, _, _ = r.Insert([]byte("aca"), nil)
- r, _, _ = r.Insert([]byte("acb"), nil)
- snapIter := r.root.rawIterator()
-
- // Run through all notification methods as there were bugs in
- // both that affected these operations. The slowNotify path
- // would detect copied but otherwise identical leaves as changed
- // and wrongly close channels. The normal path would fail to
- // notify on a child node that had been merged.
- txn := r.Txn()
- txn.TrackMutate(true)
- txn.Delete([]byte("acb"))
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Run through the old tree and make sure the exact channels we
- // expected were closed.
- for ; snapIter.Front() != nil; snapIter.Next() {
- n := snapIter.Front()
- path := snapIter.Path()
- switch path {
- case "", "a", "ac": // parent nodes all change
- if !isClosed(n.mutateCh) || n.leaf != nil {
- t.Fatalf("bad")
- }
- case "ab": // unrelated node / leaf sees no change
- if isClosed(n.mutateCh) || isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- case "aca": // this node gets merged, but the leaf doesn't change
- if !isClosed(n.mutateCh) || isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- case "acb": // this node / leaf gets deleted
- if !isClosed(n.mutateCh) || !isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- default:
- t.Fatalf("bad: %s", path)
- }
- }
- }
-}
-
-func TestTrackMutate_cachedNodeChange(t *testing.T) {
- // This case does a delete of the "acb" leaf, which causes the "aca"
- // leaf to get merged with the old "ac" node:
- //
- // [root] [root]
- // |a |a
- // [node] [node]
- // b/ \c b/ \c
- // (ab) [node] (ab) (aca*) <- this leaf gets modified
- // a/ \b post-merge
- // (aca) (acb)
- //
- // Then it makes a modification to the "aca" leaf on a node that will
- // be in the cache, so this makes sure that the leaf watch fires.
- for i := 0; i < 3; i++ {
- r := New()
- r, _, _ = r.Insert([]byte("ab"), nil)
- r, _, _ = r.Insert([]byte("aca"), nil)
- r, _, _ = r.Insert([]byte("acb"), nil)
- snapIter := r.root.rawIterator()
-
- txn := r.Txn()
- txn.TrackMutate(true)
- txn.Delete([]byte("acb"))
- txn.Insert([]byte("aca"), nil)
- switch i {
- case 0:
- r = txn.Commit()
- case 1:
- r = txn.CommitOnly()
- txn.Notify()
- default:
- r = txn.CommitOnly()
- txn.slowNotify()
- }
- if hasAnyClosedMutateCh(r) {
- t.Fatalf("bad")
- }
-
- // Run through the old tree and make sure the exact channels we
- // expected were closed.
- for ; snapIter.Front() != nil; snapIter.Next() {
- n := snapIter.Front()
- path := snapIter.Path()
- switch path {
- case "", "a", "ac": // parent nodes all change
- if !isClosed(n.mutateCh) || n.leaf != nil {
- t.Fatalf("bad")
- }
- case "ab": // unrelated node / leaf sees no change
- if isClosed(n.mutateCh) || isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- case "aca": // merge changes the node, then we update the leaf
- if !isClosed(n.mutateCh) || !isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- case "acb": // this node / leaf gets deleted
- if !isClosed(n.mutateCh) || !isClosed(n.leaf.mutateCh) {
- t.Fatalf("bad")
- }
- default:
- t.Fatalf("bad: %s", path)
- }
- }
- }
-}
-
-func TestLenTxn(t *testing.T) {
- r := New()
-
- if r.Len() != 0 {
- t.Fatalf("not starting with empty tree")
- }
-
- txn := r.Txn()
- keys := []string{
- "foo/bar/baz",
- "foo/baz/bar",
- "foo/zip/zap",
- "foobar",
- "nochange",
- }
- for _, k := range keys {
- txn.Insert([]byte(k), nil)
- }
- r = txn.Commit()
-
- if r.Len() != len(keys) {
- t.Fatalf("bad: expected %d, got %d", len(keys), r.Len())
- }
-
- txn = r.Txn()
- for _, k := range keys {
- txn.Delete([]byte(k))
- }
- r = txn.Commit()
-
- if r.Len() != 0 {
- t.Fatalf("tree len should be zero, got %d", r.Len())
- }
-}
diff --git a/vendor/github.com/hashicorp/go-msgpack/README.md b/vendor/github.com/hashicorp/go-msgpack/README.md
deleted file mode 100644
index 0d9d754d0..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# go
-
-Collection of Open-Source Go libraries and tools.
-
-## Codec
-
-[Codec](https://github.com/ugorji/go/tree/master/codec#readme) is a High Performance and Feature-Rich Idiomatic encode/decode and rpc library for [msgpack](http://msgpack.org) and [Binc](https://github.com/ugorji/binc).
-
-Online documentation is at [http://godoc.org/github.com/ugorji/go/codec].
-
-Install using:
-
- go get github.com/ugorji/go/codec
-
diff --git a/vendor/github.com/hashicorp/go-msgpack/codec/bench_test.go b/vendor/github.com/hashicorp/go-msgpack/codec/bench_test.go
deleted file mode 100644
index 4d437035e..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/codec/bench_test.go
+++ /dev/null
@@ -1,319 +0,0 @@
-// Copyright (c) 2012, 2013 Ugorji Nwoke. All rights reserved.
-// Use of this source code is governed by a BSD-style license found in the LICENSE file.
-
-package codec
-
-import (
- "bytes"
- "encoding/gob"
- "encoding/json"
- "flag"
- "fmt"
- "reflect"
- "runtime"
- "testing"
- "time"
-)
-
-// Sample way to run:
-// go test -bi -bv -bd=1 -benchmem -bench=.
-
-var (
- _ = fmt.Printf
- benchTs *TestStruc
-
- approxSize int
-
- benchDoInitBench bool
- benchVerify bool
- benchUnscientificRes bool = false
- //depth of 0 maps to ~400bytes json-encoded string, 1 maps to ~1400 bytes, etc
- //For depth>1, we likely trigger stack growth for encoders, making benchmarking unreliable.
- benchDepth int
- benchInitDebug bool
- benchCheckers []benchChecker
-)
-
-type benchEncFn func(interface{}) ([]byte, error)
-type benchDecFn func([]byte, interface{}) error
-type benchIntfFn func() interface{}
-
-type benchChecker struct {
- name string
- encodefn benchEncFn
- decodefn benchDecFn
-}
-
-func benchInitFlags() {
- flag.BoolVar(&benchInitDebug, "bg", false, "Bench Debug")
- flag.IntVar(&benchDepth, "bd", 1, "Bench Depth: If >1, potential unreliable results due to stack growth")
- flag.BoolVar(&benchDoInitBench, "bi", false, "Run Bench Init")
- flag.BoolVar(&benchVerify, "bv", false, "Verify Decoded Value during Benchmark")
- flag.BoolVar(&benchUnscientificRes, "bu", false, "Show Unscientific Results during Benchmark")
-}
-
-func benchInit() {
- benchTs = newTestStruc(benchDepth, true)
- approxSize = approxDataSize(reflect.ValueOf(benchTs))
- bytesLen := 1024 * 4 * (benchDepth + 1) * (benchDepth + 1)
- if bytesLen < approxSize {
- bytesLen = approxSize
- }
-
- benchCheckers = append(benchCheckers,
- benchChecker{"msgpack", fnMsgpackEncodeFn, fnMsgpackDecodeFn},
- benchChecker{"binc-nosym", fnBincNoSymEncodeFn, fnBincNoSymDecodeFn},
- benchChecker{"binc-sym", fnBincSymEncodeFn, fnBincSymDecodeFn},
- benchChecker{"simple", fnSimpleEncodeFn, fnSimpleDecodeFn},
- benchChecker{"gob", fnGobEncodeFn, fnGobDecodeFn},
- benchChecker{"json", fnJsonEncodeFn, fnJsonDecodeFn},
- )
- if benchDoInitBench {
- runBenchInit()
- }
-}
-
-func runBenchInit() {
- logT(nil, "..............................................")
- logT(nil, "BENCHMARK INIT: %v", time.Now())
- logT(nil, "To run full benchmark comparing encodings (MsgPack, Binc, Simple, JSON, GOB, etc), "+
- "use: \"go test -bench=.\"")
- logT(nil, "Benchmark: ")
- logT(nil, "\tStruct recursive Depth: %d", benchDepth)
- if approxSize > 0 {
- logT(nil, "\tApproxDeepSize Of benchmark Struct: %d bytes", approxSize)
- }
- if benchUnscientificRes {
- logT(nil, "Benchmark One-Pass Run (with Unscientific Encode/Decode times): ")
- } else {
- logT(nil, "Benchmark One-Pass Run:")
- }
- for _, bc := range benchCheckers {
- doBenchCheck(bc.name, bc.encodefn, bc.decodefn)
- }
- logT(nil, "..............................................")
- if benchInitDebug {
- logT(nil, "<<<<====>>>> depth: %v, ts: %#v\n", benchDepth, benchTs)
- }
-}
-
-func fnBenchNewTs() interface{} {
- return new(TestStruc)
-}
-
-func doBenchCheck(name string, encfn benchEncFn, decfn benchDecFn) {
- runtime.GC()
- tnow := time.Now()
- buf, err := encfn(benchTs)
- if err != nil {
- logT(nil, "\t%10s: **** Error encoding benchTs: %v", name, err)
- }
- encDur := time.Now().Sub(tnow)
- encLen := len(buf)
- runtime.GC()
- if !benchUnscientificRes {
- logT(nil, "\t%10s: len: %d bytes\n", name, encLen)
- return
- }
- tnow = time.Now()
- if err = decfn(buf, new(TestStruc)); err != nil {
- logT(nil, "\t%10s: **** Error decoding into new TestStruc: %v", name, err)
- }
- decDur := time.Now().Sub(tnow)
- logT(nil, "\t%10s: len: %d bytes, encode: %v, decode: %v\n", name, encLen, encDur, decDur)
-}
-
-func fnBenchmarkEncode(b *testing.B, encName string, ts interface{}, encfn benchEncFn) {
- runtime.GC()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, err := encfn(ts)
- if err != nil {
- logT(b, "Error encoding benchTs: %s: %v", encName, err)
- b.FailNow()
- }
- }
-}
-
-func fnBenchmarkDecode(b *testing.B, encName string, ts interface{},
- encfn benchEncFn, decfn benchDecFn, newfn benchIntfFn,
-) {
- buf, err := encfn(ts)
- if err != nil {
- logT(b, "Error encoding benchTs: %s: %v", encName, err)
- b.FailNow()
- }
- runtime.GC()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- ts = newfn()
- if err = decfn(buf, ts); err != nil {
- logT(b, "Error decoding into new TestStruc: %s: %v", encName, err)
- b.FailNow()
- }
- if benchVerify {
- if vts, vok := ts.(*TestStruc); vok {
- verifyTsTree(b, vts)
- }
- }
- }
-}
-
-func verifyTsTree(b *testing.B, ts *TestStruc) {
- var ts0, ts1m, ts2m, ts1s, ts2s *TestStruc
- ts0 = ts
-
- if benchDepth > 0 {
- ts1m, ts1s = verifyCheckAndGet(b, ts0)
- }
-
- if benchDepth > 1 {
- ts2m, ts2s = verifyCheckAndGet(b, ts1m)
- }
- for _, tsx := range []*TestStruc{ts0, ts1m, ts2m, ts1s, ts2s} {
- if tsx != nil {
- verifyOneOne(b, tsx)
- }
- }
-}
-
-func verifyCheckAndGet(b *testing.B, ts0 *TestStruc) (ts1m *TestStruc, ts1s *TestStruc) {
- // if len(ts1m.Ms) <= 2 {
- // logT(b, "Error: ts1m.Ms len should be > 2. Got: %v", len(ts1m.Ms))
- // b.FailNow()
- // }
- if len(ts0.Its) == 0 {
- logT(b, "Error: ts0.Islice len should be > 0. Got: %v", len(ts0.Its))
- b.FailNow()
- }
- ts1m = ts0.Mtsptr["0"]
- ts1s = ts0.Its[0]
- if ts1m == nil || ts1s == nil {
- logT(b, "Error: At benchDepth 1, No *TestStruc found")
- b.FailNow()
- }
- return
-}
-
-func verifyOneOne(b *testing.B, ts *TestStruc) {
- if ts.I64slice[2] != int64(3) {
- logT(b, "Error: Decode failed by checking values")
- b.FailNow()
- }
-}
-
-func fnMsgpackEncodeFn(ts interface{}) (bs []byte, err error) {
- err = NewEncoderBytes(&bs, testMsgpackH).Encode(ts)
- return
-}
-
-func fnMsgpackDecodeFn(buf []byte, ts interface{}) error {
- return NewDecoderBytes(buf, testMsgpackH).Decode(ts)
-}
-
-func fnBincEncodeFn(ts interface{}, sym AsSymbolFlag) (bs []byte, err error) {
- tSym := testBincH.AsSymbols
- testBincH.AsSymbols = sym
- err = NewEncoderBytes(&bs, testBincH).Encode(ts)
- testBincH.AsSymbols = tSym
- return
-}
-
-func fnBincDecodeFn(buf []byte, ts interface{}, sym AsSymbolFlag) (err error) {
- tSym := testBincH.AsSymbols
- testBincH.AsSymbols = sym
- err = NewDecoderBytes(buf, testBincH).Decode(ts)
- testBincH.AsSymbols = tSym
- return
-}
-
-func fnBincNoSymEncodeFn(ts interface{}) (bs []byte, err error) {
- return fnBincEncodeFn(ts, AsSymbolNone)
-}
-
-func fnBincNoSymDecodeFn(buf []byte, ts interface{}) error {
- return fnBincDecodeFn(buf, ts, AsSymbolNone)
-}
-
-func fnBincSymEncodeFn(ts interface{}) (bs []byte, err error) {
- return fnBincEncodeFn(ts, AsSymbolAll)
-}
-
-func fnBincSymDecodeFn(buf []byte, ts interface{}) error {
- return fnBincDecodeFn(buf, ts, AsSymbolAll)
-}
-
-func fnSimpleEncodeFn(ts interface{}) (bs []byte, err error) {
- err = NewEncoderBytes(&bs, testSimpleH).Encode(ts)
- return
-}
-
-func fnSimpleDecodeFn(buf []byte, ts interface{}) error {
- return NewDecoderBytes(buf, testSimpleH).Decode(ts)
-}
-
-func fnGobEncodeFn(ts interface{}) ([]byte, error) {
- bbuf := new(bytes.Buffer)
- err := gob.NewEncoder(bbuf).Encode(ts)
- return bbuf.Bytes(), err
-}
-
-func fnGobDecodeFn(buf []byte, ts interface{}) error {
- return gob.NewDecoder(bytes.NewBuffer(buf)).Decode(ts)
-}
-
-func fnJsonEncodeFn(ts interface{}) ([]byte, error) {
- return json.Marshal(ts)
-}
-
-func fnJsonDecodeFn(buf []byte, ts interface{}) error {
- return json.Unmarshal(buf, ts)
-}
-
-func Benchmark__Msgpack____Encode(b *testing.B) {
- fnBenchmarkEncode(b, "msgpack", benchTs, fnMsgpackEncodeFn)
-}
-
-func Benchmark__Msgpack____Decode(b *testing.B) {
- fnBenchmarkDecode(b, "msgpack", benchTs, fnMsgpackEncodeFn, fnMsgpackDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__Binc_NoSym_Encode(b *testing.B) {
- fnBenchmarkEncode(b, "binc", benchTs, fnBincNoSymEncodeFn)
-}
-
-func Benchmark__Binc_NoSym_Decode(b *testing.B) {
- fnBenchmarkDecode(b, "binc", benchTs, fnBincNoSymEncodeFn, fnBincNoSymDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__Binc_Sym___Encode(b *testing.B) {
- fnBenchmarkEncode(b, "binc", benchTs, fnBincSymEncodeFn)
-}
-
-func Benchmark__Binc_Sym___Decode(b *testing.B) {
- fnBenchmarkDecode(b, "binc", benchTs, fnBincSymEncodeFn, fnBincSymDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__Simple____Encode(b *testing.B) {
- fnBenchmarkEncode(b, "simple", benchTs, fnSimpleEncodeFn)
-}
-
-func Benchmark__Simple____Decode(b *testing.B) {
- fnBenchmarkDecode(b, "simple", benchTs, fnSimpleEncodeFn, fnSimpleDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__Gob________Encode(b *testing.B) {
- fnBenchmarkEncode(b, "gob", benchTs, fnGobEncodeFn)
-}
-
-func Benchmark__Gob________Decode(b *testing.B) {
- fnBenchmarkDecode(b, "gob", benchTs, fnGobEncodeFn, fnGobDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__Json_______Encode(b *testing.B) {
- fnBenchmarkEncode(b, "json", benchTs, fnJsonEncodeFn)
-}
-
-func Benchmark__Json_______Decode(b *testing.B) {
- fnBenchmarkDecode(b, "json", benchTs, fnJsonEncodeFn, fnJsonDecodeFn, fnBenchNewTs)
-}
diff --git a/vendor/github.com/hashicorp/go-msgpack/codec/codecs_test.go b/vendor/github.com/hashicorp/go-msgpack/codec/codecs_test.go
deleted file mode 100644
index cb184491f..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/codec/codecs_test.go
+++ /dev/null
@@ -1,1002 +0,0 @@
-// Copyright (c) 2012, 2013 Ugorji Nwoke. All rights reserved.
-// Use of this source code is governed by a BSD-style license found in the LICENSE file.
-
-package codec
-
-// Test works by using a slice of interfaces.
-// It can test for encoding/decoding into/from a nil interface{}
-// or passing the object to encode/decode into.
-//
-// There are basically 2 main tests here.
-// First test internally encodes and decodes things and verifies that
-// the artifact was as expected.
-// Second test will use python msgpack to create a bunch of golden files,
-// read those files, and compare them to what it should be. It then
-// writes those files back out and compares the byte streams.
-//
-// Taken together, the tests are pretty extensive.
-
-import (
- "bytes"
- "encoding/gob"
- "flag"
- "fmt"
- "io/ioutil"
- "math"
- "net"
- "net/rpc"
- "os"
- "os/exec"
- "path/filepath"
- "reflect"
- "runtime"
- "strconv"
- "sync/atomic"
- "testing"
- "time"
-)
-
-type testVerifyArg int
-
-const (
- testVerifyMapTypeSame testVerifyArg = iota
- testVerifyMapTypeStrIntf
- testVerifyMapTypeIntfIntf
- // testVerifySliceIntf
- testVerifyForPython
-)
-
-var (
- testInitDebug bool
- testUseIoEncDec bool
- testStructToArray bool
- testWriteNoSymbols bool
-
- _ = fmt.Printf
- skipVerifyVal interface{} = &(struct{}{})
-
- // For Go Time, do not use a descriptive timezone.
- // It's unnecessary, and makes it harder to do a reflect.DeepEqual.
- // The Offset already tells what the offset should be, if not on UTC and unknown zone name.
- timeLoc = time.FixedZone("", -8*60*60) // UTC-08:00 //time.UTC-8
- timeToCompare1 = time.Date(2012, 2, 2, 2, 2, 2, 2000, timeLoc)
- timeToCompare2 = time.Date(1900, 2, 2, 2, 2, 2, 2000, timeLoc)
- timeToCompare3 = time.Unix(0, 0).UTC()
- timeToCompare4 = time.Time{}.UTC()
-
- table []interface{} // main items we encode
- tableVerify []interface{} // we verify encoded things against this after decode
- tableTestNilVerify []interface{} // for nil interface, use this to verify (rules are different)
- tablePythonVerify []interface{} // for verifying for python, since Python sometimes
- // will encode a float32 as float64, or large int as uint
- testRpcInt = new(TestRpcInt)
- testMsgpackH = &MsgpackHandle{}
- testBincH = &BincHandle{}
- testSimpleH = &SimpleHandle{}
-)
-
-func testInitFlags() {
- // delete(testDecOpts.ExtFuncs, timeTyp)
- flag.BoolVar(&testInitDebug, "tg", false, "Test Debug")
- flag.BoolVar(&testUseIoEncDec, "ti", false, "Use IO Reader/Writer for Marshal/Unmarshal")
- flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option")
- flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option")
-}
-
-type AnonInTestStruc struct {
- AS string
- AI64 int64
- AI16 int16
- AUi64 uint64
- ASslice []string
- AI64slice []int64
-}
-
-type TestStruc struct {
- S string
- I64 int64
- I16 int16
- Ui64 uint64
- Ui8 uint8
- B bool
- By byte
-
- Sslice []string
- I64slice []int64
- I16slice []int16
- Ui64slice []uint64
- Ui8slice []uint8
- Bslice []bool
- Byslice []byte
-
- Islice []interface{}
- Iptrslice []*int64
-
- AnonInTestStruc
-
- //M map[interface{}]interface{} `json:"-",bson:"-"`
- Ms map[string]interface{}
- Msi64 map[string]int64
-
- Nintf interface{} //don't set this, so we can test for nil
- T time.Time
- Nmap map[string]bool //don't set this, so we can test for nil
- Nslice []byte //don't set this, so we can test for nil
- Nint64 *int64 //don't set this, so we can test for nil
- Mtsptr map[string]*TestStruc
- Mts map[string]TestStruc
- Its []*TestStruc
- Nteststruc *TestStruc
-}
-
-type TestABC struct {
- A, B, C string
-}
-
-type TestRpcInt struct {
- i int
-}
-
-func (r *TestRpcInt) Update(n int, res *int) error { r.i = n; *res = r.i; return nil }
-func (r *TestRpcInt) Square(ignore int, res *int) error { *res = r.i * r.i; return nil }
-func (r *TestRpcInt) Mult(n int, res *int) error { *res = r.i * n; return nil }
-func (r *TestRpcInt) EchoStruct(arg TestABC, res *string) error {
- *res = fmt.Sprintf("%#v", arg)
- return nil
-}
-func (r *TestRpcInt) Echo123(args []string, res *string) error {
- *res = fmt.Sprintf("%#v", args)
- return nil
-}
-
-func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) {
- //for python msgpack,
- // - all positive integers are unsigned 64-bit ints
- // - all floats are float64
- switch iv := v.(type) {
- case int8:
- if iv > 0 {
- v2 = uint64(iv)
- } else {
- v2 = int64(iv)
- }
- case int16:
- if iv > 0 {
- v2 = uint64(iv)
- } else {
- v2 = int64(iv)
- }
- case int32:
- if iv > 0 {
- v2 = uint64(iv)
- } else {
- v2 = int64(iv)
- }
- case int64:
- if iv > 0 {
- v2 = uint64(iv)
- } else {
- v2 = int64(iv)
- }
- case uint8:
- v2 = uint64(iv)
- case uint16:
- v2 = uint64(iv)
- case uint32:
- v2 = uint64(iv)
- case uint64:
- v2 = uint64(iv)
- case float32:
- v2 = float64(iv)
- case float64:
- v2 = float64(iv)
- case []interface{}:
- m2 := make([]interface{}, len(iv))
- for j, vj := range iv {
- m2[j] = testVerifyVal(vj, arg)
- }
- v2 = m2
- case map[string]bool:
- switch arg {
- case testVerifyMapTypeSame:
- m2 := make(map[string]bool)
- for kj, kv := range iv {
- m2[kj] = kv
- }
- v2 = m2
- case testVerifyMapTypeStrIntf, testVerifyForPython:
- m2 := make(map[string]interface{})
- for kj, kv := range iv {
- m2[kj] = kv
- }
- v2 = m2
- case testVerifyMapTypeIntfIntf:
- m2 := make(map[interface{}]interface{})
- for kj, kv := range iv {
- m2[kj] = kv
- }
- v2 = m2
- }
- case map[string]interface{}:
- switch arg {
- case testVerifyMapTypeSame:
- m2 := make(map[string]interface{})
- for kj, kv := range iv {
- m2[kj] = testVerifyVal(kv, arg)
- }
- v2 = m2
- case testVerifyMapTypeStrIntf, testVerifyForPython:
- m2 := make(map[string]interface{})
- for kj, kv := range iv {
- m2[kj] = testVerifyVal(kv, arg)
- }
- v2 = m2
- case testVerifyMapTypeIntfIntf:
- m2 := make(map[interface{}]interface{})
- for kj, kv := range iv {
- m2[kj] = testVerifyVal(kv, arg)
- }
- v2 = m2
- }
- case map[interface{}]interface{}:
- m2 := make(map[interface{}]interface{})
- for kj, kv := range iv {
- m2[testVerifyVal(kj, arg)] = testVerifyVal(kv, arg)
- }
- v2 = m2
- case time.Time:
- switch arg {
- case testVerifyForPython:
- if iv2 := iv.UnixNano(); iv2 > 0 {
- v2 = uint64(iv2)
- } else {
- v2 = int64(iv2)
- }
- default:
- v2 = v
- }
- default:
- v2 = v
- }
- return
-}
-
-func testInit() {
- gob.Register(new(TestStruc))
- if testInitDebug {
- ts0 := newTestStruc(2, false)
- fmt.Printf("====> depth: %v, ts: %#v\n", 2, ts0)
- }
-
- testBincH.StructToArray = testStructToArray
- if testWriteNoSymbols {
- testBincH.AsSymbols = AsSymbolNone
- } else {
- testBincH.AsSymbols = AsSymbolAll
- }
- testMsgpackH.StructToArray = testStructToArray
- testMsgpackH.RawToString = true
- // testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt)
- // testMsgpackH.AddExt(timeTyp, 1, testMsgpackH.TimeEncodeExt, testMsgpackH.TimeDecodeExt)
- timeEncExt := func(rv reflect.Value) ([]byte, error) {
- return encodeTime(rv.Interface().(time.Time)), nil
- }
- timeDecExt := func(rv reflect.Value, bs []byte) error {
- tt, err := decodeTime(bs)
- if err == nil {
- rv.Set(reflect.ValueOf(tt))
- }
- return err
- }
-
- // add extensions for msgpack, simple for time.Time, so we can encode/decode same way.
- testMsgpackH.AddExt(timeTyp, 1, timeEncExt, timeDecExt)
- testSimpleH.AddExt(timeTyp, 1, timeEncExt, timeDecExt)
-
- primitives := []interface{}{
- int8(-8),
- int16(-1616),
- int32(-32323232),
- int64(-6464646464646464),
- uint8(192),
- uint16(1616),
- uint32(32323232),
- uint64(6464646464646464),
- byte(192),
- float32(-3232.0),
- float64(-6464646464.0),
- float32(3232.0),
- float64(6464646464.0),
- false,
- true,
- nil,
- "someday",
- "",
- "bytestring",
- timeToCompare1,
- timeToCompare2,
- timeToCompare3,
- timeToCompare4,
- }
- mapsAndStrucs := []interface{}{
- map[string]bool{
- "true": true,
- "false": false,
- },
- map[string]interface{}{
- "true": "True",
- "false": false,
- "uint16(1616)": uint16(1616),
- },
- //add a complex combo map in here. (map has list which has map)
- //note that after the first thing, everything else should be generic.
- map[string]interface{}{
- "list": []interface{}{
- int16(1616),
- int32(32323232),
- true,
- float32(-3232.0),
- map[string]interface{}{
- "TRUE": true,
- "FALSE": false,
- },
- []interface{}{true, false},
- },
- "int32": int32(32323232),
- "bool": true,
- "LONG STRING": "123456789012345678901234567890123456789012345678901234567890",
- "SHORT STRING": "1234567890",
- },
- map[interface{}]interface{}{
- true: "true",
- uint8(138): false,
- "false": uint8(200),
- },
- newTestStruc(0, false),
- }
-
- table = []interface{}{}
- table = append(table, primitives...) //0-19 are primitives
- table = append(table, primitives) //20 is a list of primitives
- table = append(table, mapsAndStrucs...) //21-24 are maps. 25 is a *struct
-
- tableVerify = make([]interface{}, len(table))
- tableTestNilVerify = make([]interface{}, len(table))
- tablePythonVerify = make([]interface{}, len(table))
-
- lp := len(primitives)
- av := tableVerify
- for i, v := range table {
- if i == lp+3 {
- av[i] = skipVerifyVal
- continue
- }
- //av[i] = testVerifyVal(v, testVerifyMapTypeSame)
- switch v.(type) {
- case []interface{}:
- av[i] = testVerifyVal(v, testVerifyMapTypeSame)
- case map[string]interface{}:
- av[i] = testVerifyVal(v, testVerifyMapTypeSame)
- case map[interface{}]interface{}:
- av[i] = testVerifyVal(v, testVerifyMapTypeSame)
- default:
- av[i] = v
- }
- }
-
- av = tableTestNilVerify
- for i, v := range table {
- if i > lp+3 {
- av[i] = skipVerifyVal
- continue
- }
- av[i] = testVerifyVal(v, testVerifyMapTypeStrIntf)
- }
-
- av = tablePythonVerify
- for i, v := range table {
- if i > lp+3 {
- av[i] = skipVerifyVal
- continue
- }
- av[i] = testVerifyVal(v, testVerifyForPython)
- }
-
- tablePythonVerify = tablePythonVerify[:24]
-}
-
-func testUnmarshal(v interface{}, data []byte, h Handle) error {
- if testUseIoEncDec {
- return NewDecoder(bytes.NewBuffer(data), h).Decode(v)
- }
- return NewDecoderBytes(data, h).Decode(v)
-}
-
-func testMarshal(v interface{}, h Handle) (bs []byte, err error) {
- if testUseIoEncDec {
- var buf bytes.Buffer
- err = NewEncoder(&buf, h).Encode(v)
- bs = buf.Bytes()
- return
- }
- err = NewEncoderBytes(&bs, h).Encode(v)
- return
-}
-
-func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []byte, err error) {
- if bs, err = testMarshal(v, h); err != nil {
- logT(t, "Error encoding %s: %v, Err: %v", name, v, err)
- t.FailNow()
- }
- return
-}
-
-func testUnmarshalErr(v interface{}, data []byte, h Handle, t *testing.T, name string) (err error) {
- if err = testUnmarshal(v, data, h); err != nil {
- logT(t, "Error Decoding into %s: %v, Err: %v", name, v, err)
- t.FailNow()
- }
- return
-}
-
-func newTestStruc(depth int, bench bool) (ts *TestStruc) {
- var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464
-
- ts = &TestStruc{
- S: "some string",
- I64: math.MaxInt64 * 2 / 3, // 64,
- I16: 16,
- Ui64: uint64(int64(math.MaxInt64 * 2 / 3)), // 64, //don't use MaxUint64, as bson can't write it
- Ui8: 160,
- B: true,
- By: 5,
-
- Sslice: []string{"one", "two", "three"},
- I64slice: []int64{1, 2, 3},
- I16slice: []int16{4, 5, 6},
- Ui64slice: []uint64{137, 138, 139},
- Ui8slice: []uint8{210, 211, 212},
- Bslice: []bool{true, false, true, false},
- Byslice: []byte{13, 14, 15},
-
- Islice: []interface{}{"true", true, "no", false, uint64(288), float64(0.4)},
-
- Ms: map[string]interface{}{
- "true": "true",
- "int64(9)": false,
- },
- Msi64: map[string]int64{
- "one": 1,
- "two": 2,
- },
- T: timeToCompare1,
- AnonInTestStruc: AnonInTestStruc{
- AS: "A-String",
- AI64: 64,
- AI16: 16,
- AUi64: 64,
- ASslice: []string{"Aone", "Atwo", "Athree"},
- AI64slice: []int64{1, 2, 3},
- },
- }
- //For benchmarks, some things will not work.
- if !bench {
- //json and bson require string keys in maps
- //ts.M = map[interface{}]interface{}{
- // true: "true",
- // int8(9): false,
- //}
- //gob cannot encode nil in element in array (encodeArray: nil element)
- ts.Iptrslice = []*int64{nil, &i64a, nil, &i64b, nil, &i64c, nil, &i64d, nil}
- // ts.Iptrslice = nil
- }
- if depth > 0 {
- depth--
- if ts.Mtsptr == nil {
- ts.Mtsptr = make(map[string]*TestStruc)
- }
- if ts.Mts == nil {
- ts.Mts = make(map[string]TestStruc)
- }
- ts.Mtsptr["0"] = newTestStruc(depth, bench)
- ts.Mts["0"] = *(ts.Mtsptr["0"])
- ts.Its = append(ts.Its, ts.Mtsptr["0"])
- }
- return
-}
-
-// doTestCodecTableOne allows us test for different variations based on arguments passed.
-func doTestCodecTableOne(t *testing.T, testNil bool, h Handle,
- vs []interface{}, vsVerify []interface{}) {
- //if testNil, then just test for when a pointer to a nil interface{} is passed. It should work.
- //Current setup allows us test (at least manually) the nil interface or typed interface.
- logT(t, "================ TestNil: %v ================\n", testNil)
- for i, v0 := range vs {
- logT(t, "..............................................")
- logT(t, " Testing: #%d:, %T, %#v\n", i, v0, v0)
- b0, err := testMarshalErr(v0, h, t, "v0")
- if err != nil {
- continue
- }
- logT(t, " Encoded bytes: len: %v, %v\n", len(b0), b0)
-
- var v1 interface{}
-
- if testNil {
- err = testUnmarshal(&v1, b0, h)
- } else {
- if v0 != nil {
- v0rt := reflect.TypeOf(v0) // ptr
- rv1 := reflect.New(v0rt)
- err = testUnmarshal(rv1.Interface(), b0, h)
- v1 = rv1.Elem().Interface()
- // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface()
- }
- }
-
- logT(t, " v1 returned: %T, %#v", v1, v1)
- // if v1 != nil {
- // logT(t, " v1 returned: %T, %#v", v1, v1)
- // //we always indirect, because ptr to typed value may be passed (if not testNil)
- // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface()
- // }
- if err != nil {
- logT(t, "-------- Error: %v. Partial return: %v", err, v1)
- failT(t)
- continue
- }
- v0check := vsVerify[i]
- if v0check == skipVerifyVal {
- logT(t, " Nil Check skipped: Decoded: %T, %#v\n", v1, v1)
- continue
- }
-
- if err = deepEqual(v0check, v1); err == nil {
- logT(t, "++++++++ Before and After marshal matched\n")
- } else {
- logT(t, "-------- Before and After marshal do not match: Error: %v"+
- " ====> GOLDEN: (%T) %#v, DECODED: (%T) %#v\n", err, v0check, v0check, v1, v1)
- failT(t)
- }
- }
-}
-
-func testCodecTableOne(t *testing.T, h Handle) {
- // func TestMsgpackAllExperimental(t *testing.T) {
- // dopts := testDecOpts(nil, nil, false, true, true),
-
- switch v := h.(type) {
- case *MsgpackHandle:
- var oldWriteExt, oldRawToString bool
- oldWriteExt, v.WriteExt = v.WriteExt, true
- oldRawToString, v.RawToString = v.RawToString, true
- doTestCodecTableOne(t, false, h, table, tableVerify)
- v.WriteExt, v.RawToString = oldWriteExt, oldRawToString
- default:
- doTestCodecTableOne(t, false, h, table, tableVerify)
- }
- // func TestMsgpackAll(t *testing.T) {
- idxTime, numPrim, numMap := 19, 23, 4
-
- //skip []interface{} containing time.Time
- doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim])
- doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:])
- // func TestMsgpackNilStringMap(t *testing.T) {
- var oldMapType reflect.Type
- v := h.getBasicHandle()
- oldMapType, v.MapType = v.MapType, mapStrIntfTyp
-
- //skip time.Time, []interface{} containing time.Time, last map, and newStruc
- doTestCodecTableOne(t, true, h, table[:idxTime], tableTestNilVerify[:idxTime])
- doTestCodecTableOne(t, true, h, table[numPrim+1:numPrim+numMap], tableTestNilVerify[numPrim+1:numPrim+numMap])
-
- v.MapType = oldMapType
-
- // func TestMsgpackNilIntf(t *testing.T) {
-
- //do newTestStruc and last element of map
- doTestCodecTableOne(t, true, h, table[numPrim+numMap:], tableTestNilVerify[numPrim+numMap:])
- //TODO? What is this one?
- //doTestCodecTableOne(t, true, h, table[17:18], tableTestNilVerify[17:18])
-}
-
-func testCodecMiscOne(t *testing.T, h Handle) {
- b, err := testMarshalErr(32, h, t, "32")
- // Cannot do this nil one, because faster type assertion decoding will panic
- // var i *int32
- // if err = testUnmarshal(b, i, nil); err == nil {
- // logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr")
- // t.FailNow()
- // }
- var i2 int32 = 0
- err = testUnmarshalErr(&i2, b, h, t, "int32-ptr")
- if i2 != int32(32) {
- logT(t, "------- didn't unmarshal to 32: Received: %d", i2)
- t.FailNow()
- }
-
- // func TestMsgpackDecodePtr(t *testing.T) {
- ts := newTestStruc(0, false)
- b, err = testMarshalErr(ts, h, t, "pointer-to-struct")
- if len(b) < 40 {
- logT(t, "------- Size must be > 40. Size: %d", len(b))
- t.FailNow()
- }
- logT(t, "------- b: %v", b)
- ts2 := new(TestStruc)
- err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct")
- if ts2.I64 != math.MaxInt64*2/3 {
- logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64)
- t.FailNow()
- }
-
- // func TestMsgpackIntfDecode(t *testing.T) {
- m := map[string]int{"A": 2, "B": 3}
- p := []interface{}{m}
- bs, err := testMarshalErr(p, h, t, "p")
-
- m2 := map[string]int{}
- p2 := []interface{}{m2}
- err = testUnmarshalErr(&p2, bs, h, t, "&p2")
-
- if m2["A"] != 2 || m2["B"] != 3 {
- logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2)
- t.FailNow()
- }
- // log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2)
- checkEqualT(t, p, p2, "p=p2")
- checkEqualT(t, m, m2, "m=m2")
- if err = deepEqual(p, p2); err == nil {
- logT(t, "p and p2 match")
- } else {
- logT(t, "Not Equal: %v. p: %v, p2: %v", err, p, p2)
- t.FailNow()
- }
- if err = deepEqual(m, m2); err == nil {
- logT(t, "m and m2 match")
- } else {
- logT(t, "Not Equal: %v. m: %v, m2: %v", err, m, m2)
- t.FailNow()
- }
-
- // func TestMsgpackDecodeStructSubset(t *testing.T) {
- // test that we can decode a subset of the stream
- mm := map[string]interface{}{"A": 5, "B": 99, "C": 333}
- bs, err = testMarshalErr(mm, h, t, "mm")
- type ttt struct {
- A uint8
- C int32
- }
- var t2 ttt
- testUnmarshalErr(&t2, bs, h, t, "t2")
- t3 := ttt{5, 333}
- checkEqualT(t, t2, t3, "t2=t3")
-
- // println(">>>>>")
- // test simple arrays, non-addressable arrays, slices
- type tarr struct {
- A int64
- B [3]int64
- C []byte
- D [3]byte
- }
- var tarr0 = tarr{1, [3]int64{2, 3, 4}, []byte{4, 5, 6}, [3]byte{7, 8, 9}}
- // test both pointer and non-pointer (value)
- for _, tarr1 := range []interface{}{tarr0, &tarr0} {
- bs, err = testMarshalErr(tarr1, h, t, "tarr1")
- var tarr2 tarr
- testUnmarshalErr(&tarr2, bs, h, t, "tarr2")
- checkEqualT(t, tarr0, tarr2, "tarr0=tarr2")
- // fmt.Printf(">>>> err: %v. tarr1: %v, tarr2: %v\n", err, tarr0, tarr2)
- }
-
- // test byte array, even if empty (msgpack only)
- if h == testMsgpackH {
- type ystruct struct {
- Anarray []byte
- }
- var ya = ystruct{}
- testUnmarshalErr(&ya, []byte{0x91, 0x90}, h, t, "ya")
- }
-}
-
-func testCodecEmbeddedPointer(t *testing.T, h Handle) {
- type Z int
- type A struct {
- AnInt int
- }
- type B struct {
- *Z
- *A
- MoreInt int
- }
- var z Z = 4
- x1 := &B{&z, &A{5}, 6}
- bs, err := testMarshalErr(x1, h, t, "x1")
- // fmt.Printf("buf: len(%v): %x\n", buf.Len(), buf.Bytes())
- var x2 = new(B)
- err = testUnmarshalErr(x2, bs, h, t, "x2")
- err = checkEqualT(t, x1, x2, "x1=x2")
- _ = err
-}
-
-func doTestRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs time.Duration,
-) (port int) {
- // rpc needs EOF, which is sent via a panic, and so must be recovered.
- if !recoverPanicToErr {
- logT(t, "EXPECTED. set recoverPanicToErr=true, since rpc needs EOF")
- t.FailNow()
- }
- srv := rpc.NewServer()
- srv.Register(testRpcInt)
- ln, err := net.Listen("tcp", "127.0.0.1:0")
- // log("listener: %v", ln.Addr())
- checkErrT(t, err)
- port = (ln.Addr().(*net.TCPAddr)).Port
- // var opts *DecoderOptions
- // opts := testDecOpts
- // opts.MapType = mapStrIntfTyp
- // opts.RawToString = false
- serverExitChan := make(chan bool, 1)
- var serverExitFlag uint64 = 0
- serverFn := func() {
- for {
- conn1, err1 := ln.Accept()
- // if err1 != nil {
- // //fmt.Printf("accept err1: %v\n", err1)
- // continue
- // }
- if atomic.LoadUint64(&serverExitFlag) == 1 {
- serverExitChan <- true
- conn1.Close()
- return // exit serverFn goroutine
- }
- if err1 == nil {
- var sc rpc.ServerCodec = rr.ServerCodec(conn1, h)
- srv.ServeCodec(sc)
- }
- }
- }
-
- clientFn := func(cc rpc.ClientCodec) {
- cl := rpc.NewClientWithCodec(cc)
- defer cl.Close()
- var up, sq, mult int
- var rstr string
- // log("Calling client")
- checkErrT(t, cl.Call("TestRpcInt.Update", 5, &up))
- // log("Called TestRpcInt.Update")
- checkEqualT(t, testRpcInt.i, 5, "testRpcInt.i=5")
- checkEqualT(t, up, 5, "up=5")
- checkErrT(t, cl.Call("TestRpcInt.Square", 1, &sq))
- checkEqualT(t, sq, 25, "sq=25")
- checkErrT(t, cl.Call("TestRpcInt.Mult", 20, &mult))
- checkEqualT(t, mult, 100, "mult=100")
- checkErrT(t, cl.Call("TestRpcInt.EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr))
- checkEqualT(t, rstr, fmt.Sprintf("%#v", TestABC{"Aa", "Bb", "Cc"}), "rstr=")
- checkErrT(t, cl.Call("TestRpcInt.Echo123", []string{"A1", "B2", "C3"}, &rstr))
- checkEqualT(t, rstr, fmt.Sprintf("%#v", []string{"A1", "B2", "C3"}), "rstr=")
- }
-
- connFn := func() (bs net.Conn) {
- // log("calling f1")
- bs, err2 := net.Dial(ln.Addr().Network(), ln.Addr().String())
- //fmt.Printf("f1. bs: %v, err2: %v\n", bs, err2)
- checkErrT(t, err2)
- return
- }
-
- exitFn := func() {
- atomic.StoreUint64(&serverExitFlag, 1)
- bs := connFn()
- <-serverExitChan
- bs.Close()
- // serverExitChan <- true
- }
-
- go serverFn()
- runtime.Gosched()
- //time.Sleep(100 * time.Millisecond)
- if exitSleepMs == 0 {
- defer ln.Close()
- defer exitFn()
- }
- if doRequest {
- bs := connFn()
- cc := rr.ClientCodec(bs, h)
- clientFn(cc)
- }
- if exitSleepMs != 0 {
- go func() {
- defer ln.Close()
- time.Sleep(exitSleepMs)
- exitFn()
- }()
- }
- return
-}
-
-// Comprehensive testing that generates data encoded from python msgpack,
-// and validates that our code can read and write it out accordingly.
-// We keep this unexported here, and put actual test in ext_dep_test.go.
-// This way, it can be excluded by excluding file completely.
-func doTestMsgpackPythonGenStreams(t *testing.T) {
- logT(t, "TestPythonGenStreams")
- tmpdir, err := ioutil.TempDir("", "golang-msgpack-test")
- if err != nil {
- logT(t, "-------- Unable to create temp directory\n")
- t.FailNow()
- }
- defer os.RemoveAll(tmpdir)
- logT(t, "tmpdir: %v", tmpdir)
- cmd := exec.Command("python", "msgpack_test.py", "testdata", tmpdir)
- //cmd.Stdin = strings.NewReader("some input")
- //cmd.Stdout = &out
- var cmdout []byte
- if cmdout, err = cmd.CombinedOutput(); err != nil {
- logT(t, "-------- Error running msgpack_test.py testdata. Err: %v", err)
- logT(t, " %v", string(cmdout))
- t.FailNow()
- }
-
- oldMapType := testMsgpackH.MapType
- for i, v := range tablePythonVerify {
- testMsgpackH.MapType = oldMapType
- //load up the golden file based on number
- //decode it
- //compare to in-mem object
- //encode it again
- //compare to output stream
- logT(t, "..............................................")
- logT(t, " Testing: #%d: %T, %#v\n", i, v, v)
- var bss []byte
- bss, err = ioutil.ReadFile(filepath.Join(tmpdir, strconv.Itoa(i)+".golden"))
- if err != nil {
- logT(t, "-------- Error reading golden file: %d. Err: %v", i, err)
- failT(t)
- continue
- }
- testMsgpackH.MapType = mapStrIntfTyp
-
- var v1 interface{}
- if err = testUnmarshal(&v1, bss, testMsgpackH); err != nil {
- logT(t, "-------- Error decoding stream: %d: Err: %v", i, err)
- failT(t)
- continue
- }
- if v == skipVerifyVal {
- continue
- }
- //no need to indirect, because we pass a nil ptr, so we already have the value
- //if v1 != nil { v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() }
- if err = deepEqual(v, v1); err == nil {
- logT(t, "++++++++ Objects match")
- } else {
- logT(t, "-------- Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1)
- logT(t, "-------- AGAINST: %#v", v)
- logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface())
- failT(t)
- }
- bsb, err := testMarshal(v1, testMsgpackH)
- if err != nil {
- logT(t, "Error encoding to stream: %d: Err: %v", i, err)
- failT(t)
- continue
- }
- if err = deepEqual(bsb, bss); err == nil {
- logT(t, "++++++++ Bytes match")
- } else {
- logT(t, "???????? Bytes do not match. %v.", err)
- xs := "--------"
- if reflect.ValueOf(v).Kind() == reflect.Map {
- xs = " "
- logT(t, "%s It's a map. Ok that they don't match (dependent on ordering).", xs)
- } else {
- logT(t, "%s It's not a map. They should match.", xs)
- failT(t)
- }
- logT(t, "%s FROM_FILE: %4d] %v", xs, len(bss), bss)
- logT(t, "%s ENCODED: %4d] %v", xs, len(bsb), bsb)
- }
- }
- testMsgpackH.MapType = oldMapType
-}
-
-// To test MsgpackSpecRpc, we test 3 scenarios:
-// - Go Client to Go RPC Service (contained within TestMsgpackRpcSpec)
-// - Go client to Python RPC Service (contained within doTestMsgpackRpcSpecGoClientToPythonSvc)
-// - Python Client to Go RPC Service (contained within doTestMsgpackRpcSpecPythonClientToGoSvc)
-//
-// This allows us test the different calling conventions
-// - Go Service requires only one argument
-// - Python Service allows multiple arguments
-
-func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) {
- openPort := "6789"
- cmd := exec.Command("python", "msgpack_test.py", "rpc-server", openPort, "2")
- checkErrT(t, cmd.Start())
- time.Sleep(100 * time.Millisecond) // time for python rpc server to start
- bs, err2 := net.Dial("tcp", ":"+openPort)
- checkErrT(t, err2)
- cc := MsgpackSpecRpc.ClientCodec(bs, testMsgpackH)
- cl := rpc.NewClientWithCodec(cc)
- defer cl.Close()
- var rstr string
- checkErrT(t, cl.Call("EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr))
- //checkEqualT(t, rstr, "{'A': 'Aa', 'B': 'Bb', 'C': 'Cc'}")
- var mArgs MsgpackSpecRpcMultiArgs = []interface{}{"A1", "B2", "C3"}
- checkErrT(t, cl.Call("Echo123", mArgs, &rstr))
- checkEqualT(t, rstr, "1:A1 2:B2 3:C3", "rstr=")
-}
-
-func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) {
- port := doTestRpcOne(t, MsgpackSpecRpc, testMsgpackH, false, 1*time.Second)
- //time.Sleep(1000 * time.Millisecond)
- cmd := exec.Command("python", "msgpack_test.py", "rpc-client-go-service", strconv.Itoa(port))
- var cmdout []byte
- var err error
- if cmdout, err = cmd.CombinedOutput(); err != nil {
- logT(t, "-------- Error running msgpack_test.py rpc-client-go-service. Err: %v", err)
- logT(t, " %v", string(cmdout))
- t.FailNow()
- }
- checkEqualT(t, string(cmdout),
- fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestABC{"Aa", "Bb", "Cc"}), "cmdout=")
-}
-
-func TestBincCodecsTable(t *testing.T) {
- testCodecTableOne(t, testBincH)
-}
-
-func TestBincCodecsMisc(t *testing.T) {
- testCodecMiscOne(t, testBincH)
-}
-
-func TestBincCodecsEmbeddedPointer(t *testing.T) {
- testCodecEmbeddedPointer(t, testBincH)
-}
-
-func TestSimpleCodecsTable(t *testing.T) {
- testCodecTableOne(t, testSimpleH)
-}
-
-func TestSimpleCodecsMisc(t *testing.T) {
- testCodecMiscOne(t, testSimpleH)
-}
-
-func TestSimpleCodecsEmbeddedPointer(t *testing.T) {
- testCodecEmbeddedPointer(t, testSimpleH)
-}
-
-func TestMsgpackCodecsTable(t *testing.T) {
- testCodecTableOne(t, testMsgpackH)
-}
-
-func TestMsgpackCodecsMisc(t *testing.T) {
- testCodecMiscOne(t, testMsgpackH)
-}
-
-func TestMsgpackCodecsEmbeddedPointer(t *testing.T) {
- testCodecEmbeddedPointer(t, testMsgpackH)
-}
-
-func TestBincRpcGo(t *testing.T) {
- doTestRpcOne(t, GoRpc, testBincH, true, 0)
-}
-
-func _TestSimpleRpcGo(t *testing.T) {
- doTestRpcOne(t, GoRpc, testSimpleH, true, 0)
-}
-
-func TestMsgpackRpcGo(t *testing.T) {
- doTestRpcOne(t, GoRpc, testMsgpackH, true, 0)
-}
-
-func TestMsgpackRpcSpec(t *testing.T) {
- doTestRpcOne(t, MsgpackSpecRpc, testMsgpackH, true, 0)
-}
-
-// TODO:
-// Add Tests for:
-// - decoding empty list/map in stream into a nil slice/map
-// - binary(M|Unm)arsher support for time.Time
diff --git a/vendor/github.com/hashicorp/go-msgpack/codec/ext_dep_test.go b/vendor/github.com/hashicorp/go-msgpack/codec/ext_dep_test.go
deleted file mode 100644
index bdf448d52..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/codec/ext_dep_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// //+build ignore
-
-// Copyright (c) 2012, 2013 Ugorji Nwoke. All rights reserved.
-// Use of this source code is governed by a BSD-style license found in the LICENSE file.
-
-package codec
-
-// This file includes benchmarks which have dependencies on 3rdparty
-// packages (bson and vmihailenco/msgpack) which must be installed locally.
-//
-// To run the benchmarks including these 3rdparty packages, first
-// - Uncomment first line in this file (put // // in front of it)
-// - Get those packages:
-// go get github.com/vmihailenco/msgpack
-// go get labix.org/v2/mgo/bson
-// - Run:
-// go test -bi -bench=.
-
-import (
- "testing"
-
- vmsgpack "gopkg.in/vmihailenco/msgpack.v2"
- "labix.org/v2/mgo/bson"
-)
-
-func init() {
- benchCheckers = append(benchCheckers,
- benchChecker{"v-msgpack", fnVMsgpackEncodeFn, fnVMsgpackDecodeFn},
- benchChecker{"bson", fnBsonEncodeFn, fnBsonDecodeFn},
- )
-}
-
-func fnVMsgpackEncodeFn(ts interface{}) ([]byte, error) {
- return vmsgpack.Marshal(ts)
-}
-
-func fnVMsgpackDecodeFn(buf []byte, ts interface{}) error {
- return vmsgpack.Unmarshal(buf, ts)
-}
-
-func fnBsonEncodeFn(ts interface{}) ([]byte, error) {
- return bson.Marshal(ts)
-}
-
-func fnBsonDecodeFn(buf []byte, ts interface{}) error {
- return bson.Unmarshal(buf, ts)
-}
-
-func Benchmark__Bson_______Encode(b *testing.B) {
- fnBenchmarkEncode(b, "bson", benchTs, fnBsonEncodeFn)
-}
-
-func Benchmark__Bson_______Decode(b *testing.B) {
- fnBenchmarkDecode(b, "bson", benchTs, fnBsonEncodeFn, fnBsonDecodeFn, fnBenchNewTs)
-}
-
-func Benchmark__VMsgpack___Encode(b *testing.B) {
- fnBenchmarkEncode(b, "v-msgpack", benchTs, fnVMsgpackEncodeFn)
-}
-
-func Benchmark__VMsgpack___Decode(b *testing.B) {
- fnBenchmarkDecode(b, "v-msgpack", benchTs, fnVMsgpackEncodeFn, fnVMsgpackDecodeFn, fnBenchNewTs)
-}
-
-func TestMsgpackPythonGenStreams(t *testing.T) {
- doTestMsgpackPythonGenStreams(t)
-}
-
-func TestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) {
- doTestMsgpackRpcSpecGoClientToPythonSvc(t)
-}
-
-func TestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) {
- doTestMsgpackRpcSpecPythonClientToGoSvc(t)
-}
diff --git a/vendor/github.com/hashicorp/go-msgpack/codec/z_helper_test.go b/vendor/github.com/hashicorp/go-msgpack/codec/z_helper_test.go
deleted file mode 100644
index 2e9b3a0f0..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/codec/z_helper_test.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2012, 2013 Ugorji Nwoke. All rights reserved.
-// Use of this source code is governed by a BSD-style license found in the LICENSE file.
-
-package codec
-
-// All non-std package dependencies related to testing live in this file,
-// so porting to different environment is easy (just update functions).
-//
-// Also, this file is called z_helper_test, to give a "hint" to compiler
-// that its init() function should be called last. (not guaranteed by spec)
-
-import (
- "errors"
- "reflect"
- "flag"
- "testing"
-)
-
-var (
- testLogToT = true
- failNowOnFail = true
-)
-
-func init() {
- testInitFlags()
- benchInitFlags()
- flag.Parse()
- testInit()
- benchInit()
-}
-
-func checkErrT(t *testing.T, err error) {
- if err != nil {
- logT(t, err.Error())
- failT(t)
- }
-}
-
-func checkEqualT(t *testing.T, v1 interface{}, v2 interface{}, desc string) (err error) {
- if err = deepEqual(v1, v2); err != nil {
- logT(t, "Not Equal: %s: %v. v1: %v, v2: %v", desc, err, v1, v2)
- failT(t)
- }
- return
-}
-
-func logT(x interface{}, format string, args ...interface{}) {
- if t, ok := x.(*testing.T); ok && t != nil && testLogToT {
- t.Logf(format, args...)
- } else if b, ok := x.(*testing.B); ok && b != nil && testLogToT {
- b.Logf(format, args...)
- } else {
- debugf(format, args...)
- }
-}
-
-func failT(t *testing.T) {
- if failNowOnFail {
- t.FailNow()
- } else {
- t.Fail()
- }
-}
-
-func deepEqual(v1, v2 interface{}) (err error) {
- if !reflect.DeepEqual(v1, v2) {
- err = errors.New("Not Match")
- }
- return
-}
-
-func approxDataSize(rv reflect.Value) (sum int) {
- switch rk := rv.Kind(); rk {
- case reflect.Invalid:
- case reflect.Ptr, reflect.Interface:
- sum += int(rv.Type().Size())
- sum += approxDataSize(rv.Elem())
- case reflect.Slice:
- sum += int(rv.Type().Size())
- for j := 0; j < rv.Len(); j++ {
- sum += approxDataSize(rv.Index(j))
- }
- case reflect.String:
- sum += int(rv.Type().Size())
- sum += rv.Len()
- case reflect.Map:
- sum += int(rv.Type().Size())
- for _, mk := range rv.MapKeys() {
- sum += approxDataSize(mk)
- sum += approxDataSize(rv.MapIndex(mk))
- }
- case reflect.Struct:
- //struct size already includes the full data size.
- //sum += int(rv.Type().Size())
- for j := 0; j < rv.NumField(); j++ {
- sum += approxDataSize(rv.Field(j))
- }
- default:
- //pure value types
- sum += int(rv.Type().Size())
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-msgpack/msgpack.org.md b/vendor/github.com/hashicorp/go-msgpack/msgpack.org.md
deleted file mode 100644
index d5ebe71d6..000000000
--- a/vendor/github.com/hashicorp/go-msgpack/msgpack.org.md
+++ /dev/null
@@ -1,47 +0,0 @@
-**MessagePack and [Binc](http://github.com/ugorji/binc) Codec for [Go](http://golang.org) Language.**
-
-*A High Performance, Feature-Rich, Idiomatic encode/decode and rpc library*.
-
-To install:
-
- go get github.com/ugorji/go/codec
-
-Source: [http://github.com/ugorji/go]
-Online documentation: [http://godoc.org/github.com/ugorji/go/codec]
-
-Typical usage:
-
-```go
- // create and use decoder/encoder
- var (
- v interface{} // value to decode/encode into
- r io.Reader
- w io.Writer
- b []byte
- mh codec.MsgpackHandle
- )
-
- dec = codec.NewDecoder(r, &mh)
- dec = codec.NewDecoderBytes(b, &mh)
- err = dec.Decode(&v)
-
- enc = codec.NewEncoder(w, &mh)
- enc = codec.NewEncoderBytes(&b, &mh)
- 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)
-```
diff --git a/vendor/github.com/hashicorp/go-multierror/append_test.go b/vendor/github.com/hashicorp/go-multierror/append_test.go
deleted file mode 100644
index 58ddafa8d..000000000
--- a/vendor/github.com/hashicorp/go-multierror/append_test.go
+++ /dev/null
@@ -1,82 +0,0 @@
-package multierror
-
-import (
- "errors"
- "testing"
-)
-
-func TestAppend_Error(t *testing.T) {
- original := &Error{
- Errors: []error{errors.New("foo")},
- }
-
- result := Append(original, errors.New("bar"))
- if len(result.Errors) != 2 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-
- original = &Error{}
- result = Append(original, errors.New("bar"))
- if len(result.Errors) != 1 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-
- // Test when a typed nil is passed
- var e *Error
- result = Append(e, errors.New("baz"))
- if len(result.Errors) != 1 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-
- // Test flattening
- original = &Error{
- Errors: []error{errors.New("foo")},
- }
-
- result = Append(original, Append(nil, errors.New("foo"), errors.New("bar")))
- if len(result.Errors) != 3 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
-
-func TestAppend_NilError(t *testing.T) {
- var err error
- result := Append(err, errors.New("bar"))
- if len(result.Errors) != 1 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
-
-func TestAppend_NilErrorArg(t *testing.T) {
- var err error
- var nilErr *Error
- result := Append(err, nilErr)
- if len(result.Errors) != 0 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
-
-func TestAppend_NilErrorIfaceArg(t *testing.T) {
- var err error
- var nilErr error
- result := Append(err, nilErr)
- if len(result.Errors) != 0 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
-
-func TestAppend_NonError(t *testing.T) {
- original := errors.New("foo")
- result := Append(original, errors.New("bar"))
- if len(result.Errors) != 2 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
-
-func TestAppend_NonError_Error(t *testing.T) {
- original := errors.New("foo")
- result := Append(original, Append(nil, errors.New("bar")))
- if len(result.Errors) != 2 {
- t.Fatalf("wrong len: %d", len(result.Errors))
- }
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/flatten_test.go b/vendor/github.com/hashicorp/go-multierror/flatten_test.go
deleted file mode 100644
index 9fbacadca..000000000
--- a/vendor/github.com/hashicorp/go-multierror/flatten_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package multierror
-
-import (
- "errors"
- "fmt"
- "reflect"
- "strings"
- "testing"
-)
-
-func TestFlatten(t *testing.T) {
- original := &Error{
- Errors: []error{
- errors.New("one"),
- &Error{
- Errors: []error{
- errors.New("two"),
- &Error{
- Errors: []error{
- errors.New("three"),
- },
- },
- },
- },
- },
- }
-
- expected := strings.TrimSpace(`
-3 errors occurred:
-
-* one
-* two
-* three
- `)
- actual := fmt.Sprintf("%s", Flatten(original))
-
- if expected != actual {
- t.Fatalf("expected: %s, got: %s", expected, actual)
- }
-}
-
-func TestFlatten_nonError(t *testing.T) {
- err := errors.New("foo")
- actual := Flatten(err)
- if !reflect.DeepEqual(actual, err) {
- t.Fatalf("bad: %#v", actual)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/format_test.go b/vendor/github.com/hashicorp/go-multierror/format_test.go
deleted file mode 100644
index 3359e0271..000000000
--- a/vendor/github.com/hashicorp/go-multierror/format_test.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package multierror
-
-import (
- "errors"
- "testing"
-)
-
-func TestListFormatFuncSingle(t *testing.T) {
- expected := `1 error occurred:
-
-* foo`
-
- errors := []error{
- errors.New("foo"),
- }
-
- actual := ListFormatFunc(errors)
- if actual != expected {
- t.Fatalf("bad: %#v", actual)
- }
-}
-
-func TestListFormatFuncMultiple(t *testing.T) {
- expected := `2 errors occurred:
-
-* foo
-* bar`
-
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- actual := ListFormatFunc(errors)
- if actual != expected {
- t.Fatalf("bad: %#v", actual)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/multierror_test.go b/vendor/github.com/hashicorp/go-multierror/multierror_test.go
deleted file mode 100644
index 5567d1c2d..000000000
--- a/vendor/github.com/hashicorp/go-multierror/multierror_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package multierror
-
-import (
- "errors"
- "reflect"
- "testing"
-)
-
-func TestError_Impl(t *testing.T) {
- var _ error = new(Error)
-}
-
-func TestErrorError_custom(t *testing.T) {
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- fn := func(es []error) string {
- return "foo"
- }
-
- multi := &Error{Errors: errors, ErrorFormat: fn}
- if multi.Error() != "foo" {
- t.Fatalf("bad: %s", multi.Error())
- }
-}
-
-func TestErrorError_default(t *testing.T) {
- expected := `2 errors occurred:
-
-* foo
-* bar`
-
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- multi := &Error{Errors: errors}
- if multi.Error() != expected {
- t.Fatalf("bad: %s", multi.Error())
- }
-}
-
-func TestErrorErrorOrNil(t *testing.T) {
- err := new(Error)
- if err.ErrorOrNil() != nil {
- t.Fatalf("bad: %#v", err.ErrorOrNil())
- }
-
- err.Errors = []error{errors.New("foo")}
- if v := err.ErrorOrNil(); v == nil {
- t.Fatal("should not be nil")
- } else if !reflect.DeepEqual(v, err) {
- t.Fatalf("bad: %#v", v)
- }
-}
-
-func TestErrorWrappedErrors(t *testing.T) {
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- multi := &Error{Errors: errors}
- if !reflect.DeepEqual(multi.Errors, multi.WrappedErrors()) {
- t.Fatalf("bad: %s", multi.WrappedErrors())
- }
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/prefix_test.go b/vendor/github.com/hashicorp/go-multierror/prefix_test.go
deleted file mode 100644
index 1d4a6f6d3..000000000
--- a/vendor/github.com/hashicorp/go-multierror/prefix_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package multierror
-
-import (
- "errors"
- "testing"
-)
-
-func TestPrefix_Error(t *testing.T) {
- original := &Error{
- Errors: []error{errors.New("foo")},
- }
-
- result := Prefix(original, "bar")
- if result.(*Error).Errors[0].Error() != "bar foo" {
- t.Fatalf("bad: %s", result)
- }
-}
-
-func TestPrefix_NilError(t *testing.T) {
- var err error
- result := Prefix(err, "bar")
- if result != nil {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-func TestPrefix_NonError(t *testing.T) {
- original := errors.New("foo")
- result := Prefix(original, "bar")
- if result.Error() != "bar foo" {
- t.Fatalf("bad: %s", result)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/scripts/deps.sh b/vendor/github.com/hashicorp/go-multierror/scripts/deps.sh
deleted file mode 100755
index 1d2fcf98c..000000000
--- a/vendor/github.com/hashicorp/go-multierror/scripts/deps.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env bash
-#
-# This script updates dependencies using a temporary directory. This is required
-# to avoid any auxillary dependencies that sneak into GOPATH.
-set -e
-
-# Get the parent directory of where this script is.
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
-DIR="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
-
-# Change into that directory
-cd "$DIR"
-
-# Get the name from the directory
-NAME=${NAME:-"$(basename $(pwd))"}
-
-# Announce
-echo "==> Updating dependencies..."
-
-echo "--> Making tmpdir..."
-tmpdir=$(mktemp -d)
-function cleanup {
- rm -rf "${tmpdir}"
-}
-trap cleanup EXIT
-
-export GOPATH="${tmpdir}"
-export PATH="${tmpdir}/bin:$PATH"
-
-mkdir -p "${tmpdir}/src/github.com/hashicorp"
-pushd "${tmpdir}/src/github.com/hashicorp" &>/dev/null
-
-echo "--> Copying ${NAME}..."
-cp -R "$DIR" "${tmpdir}/src/github.com/hashicorp/${NAME}"
-pushd "${tmpdir}/src/github.com/hashicorp/${NAME}" &>/dev/null
-rm -rf vendor/
-
-echo "--> Installing dependency manager..."
-go get -u github.com/kardianos/govendor
-govendor init
-
-echo "--> Installing all dependencies (may take some time)..."
-govendor fetch -v +outside
-
-echo "--> Vendoring..."
-govendor add +external
-
-echo "--> Moving into place..."
-vpath="${tmpdir}/src/github.com/hashicorp/${NAME}/vendor"
-popd &>/dev/null
-popd &>/dev/null
-rm -rf vendor/
-cp -R "${vpath}" .
diff --git a/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/LICENSE b/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/LICENSE
deleted file mode 100644
index c33dcc7c9..000000000
--- a/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/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/go-multierror/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/README.md
deleted file mode 100644
index 1c95f5978..000000000
--- a/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/README.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# 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, ErrNotExist) {
- // 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/go-multierror/vendor/github.com/hashicorp/errwrap/errwrap.go b/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/errwrap.go
deleted file mode 100644
index a733bef18..000000000
--- a/vendor/github.com/hashicorp/go-multierror/vendor/github.com/hashicorp/errwrap/errwrap.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Package errwrap implements methods to formalize error wrapping in Go.
-//
-// All of the top-level functions that take an `error` are built to be able
-// to take any error, not just wrapped errors. This allows you to use errwrap
-// without having to type-check and type-cast everywhere.
-package errwrap
-
-import (
- "errors"
- "reflect"
- "strings"
-)
-
-// WalkFunc is the callback called for Walk.
-type WalkFunc func(error)
-
-// Wrapper is an interface that can be implemented by custom types to
-// have all the Contains, Get, etc. functions in errwrap work.
-//
-// When Walk reaches a Wrapper, it will call the callback for every
-// wrapped error in addition to the wrapper itself. Since all the top-level
-// functions in errwrap use Walk, this means that all those functions work
-// with your custom type.
-type Wrapper interface {
- WrappedErrors() []error
-}
-
-// Wrap defines that outer wraps inner, returning an error type that
-// can be cleanly used with the other methods in this package, such as
-// Contains, GetAll, etc.
-//
-// This function won't modify the error message at all (the outer message
-// will be used).
-func Wrap(outer, inner error) error {
- return &wrappedError{
- Outer: outer,
- Inner: inner,
- }
-}
-
-// Wrapf wraps an error with a formatting message. This is similar to using
-// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap
-// errors, you should replace it with this.
-//
-// format is the format of the error message. The string '{{err}}' will
-// be replaced with the original error message.
-func Wrapf(format string, err error) error {
- outerMsg := "<nil>"
- if err != nil {
- outerMsg = err.Error()
- }
-
- outer := errors.New(strings.Replace(
- format, "{{err}}", outerMsg, -1))
-
- return Wrap(outer, err)
-}
-
-// Contains checks if the given error contains an error with the
-// message msg. If err is not a wrapped error, this will always return
-// false unless the error itself happens to match this msg.
-func Contains(err error, msg string) bool {
- return len(GetAll(err, msg)) > 0
-}
-
-// ContainsType checks if the given error contains an error with
-// the same concrete type as v. If err is not a wrapped error, this will
-// check the err itself.
-func ContainsType(err error, v interface{}) bool {
- return len(GetAllType(err, v)) > 0
-}
-
-// Get is the same as GetAll but returns the deepest matching error.
-func Get(err error, msg string) error {
- es := GetAll(err, msg)
- if len(es) > 0 {
- return es[len(es)-1]
- }
-
- return nil
-}
-
-// GetType is the same as GetAllType but returns the deepest matching error.
-func GetType(err error, v interface{}) error {
- es := GetAllType(err, v)
- if len(es) > 0 {
- return es[len(es)-1]
- }
-
- return nil
-}
-
-// GetAll gets all the errors that might be wrapped in err with the
-// given message. The order of the errors is such that the outermost
-// matching error (the most recent wrap) is index zero, and so on.
-func GetAll(err error, msg string) []error {
- var result []error
-
- Walk(err, func(err error) {
- if err.Error() == msg {
- result = append(result, err)
- }
- })
-
- return result
-}
-
-// GetAllType gets all the errors that are the same type as v.
-//
-// The order of the return value is the same as described in GetAll.
-func GetAllType(err error, v interface{}) []error {
- var result []error
-
- var search string
- if v != nil {
- search = reflect.TypeOf(v).String()
- }
- Walk(err, func(err error) {
- var needle string
- if err != nil {
- needle = reflect.TypeOf(err).String()
- }
-
- if needle == search {
- result = append(result, err)
- }
- })
-
- return result
-}
-
-// Walk walks all the wrapped errors in err and calls the callback. If
-// err isn't a wrapped error, this will be called once for err. If err
-// is a wrapped error, the callback will be called for both the wrapper
-// that implements error as well as the wrapped error itself.
-func Walk(err error, cb WalkFunc) {
- if err == nil {
- return
- }
-
- switch e := err.(type) {
- case *wrappedError:
- cb(e.Outer)
- Walk(e.Inner, cb)
- case Wrapper:
- cb(err)
-
- for _, err := range e.WrappedErrors() {
- Walk(err, cb)
- }
- default:
- cb(err)
- }
-}
-
-// wrappedError is an implementation of error that has both the
-// outer and inner errors.
-type wrappedError struct {
- Outer error
- Inner error
-}
-
-func (w *wrappedError) Error() string {
- return w.Outer.Error()
-}
-
-func (w *wrappedError) WrappedErrors() []error {
- return []error{w.Outer, w.Inner}
-}
diff --git a/vendor/github.com/hashicorp/go-multierror/vendor/vendor.json b/vendor/github.com/hashicorp/go-multierror/vendor/vendor.json
deleted file mode 100644
index 56de487e0..000000000
--- a/vendor/github.com/hashicorp/go-multierror/vendor/vendor.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "comment": "",
- "ignore": "test",
- "package": [
- {
- "checksumSHA1": "cdOCt0Yb+hdErz8NAQqayxPmRsY=",
- "path": "github.com/hashicorp/errwrap",
- "revision": "7554cd9344cec97297fa6649b055a8c98c2a1e55",
- "revisionTime": "2014-10-28T05:47:10Z"
- }
- ],
- "rootPath": "github.com/hashicorp/go-multierror"
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/.gitignore b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/.gitignore
deleted file mode 100644
index a9fcc3a54..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/sockaddr
-/bin/
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/GNUmakefile b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/GNUmakefile
deleted file mode 100644
index 6d0039ae5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/GNUmakefile
+++ /dev/null
@@ -1,29 +0,0 @@
-BIN:=sockaddr
-SRCS:=$(shell find . -name '*.go' ! -path '*/vendor/*')
-
-.DEFAULT_GOAL := dev
-
-.PHONY: dev
-dev: $(BIN)
- @install $(BIN) ${GOPATH}/bin/
-
-$(BIN): $(SRCS)
- go build -o $@
-
-.PHONY: clean
-clean::
- rm -f $(BIN) bin/* regression/*.diff
- rmdir bin/ || true
-
-.PHONY: install
-install:: $(BIN)
- install sockaddr ${GOPATH}/bin/
-
-.PHONY: test
-test:: $(BIN)
- @$(MAKE) -C regression
-
-.PHONY: world
-world::
- mkdir -p bin
- gox -os="solaris darwin freebsd linux windows" -arch="386 amd64 arm" -output="bin/sockaddr_{{.OS}}_{{.Arch}}" .
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/README.md
deleted file mode 100644
index e9914ffc1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/README.md
+++ /dev/null
@@ -1,239 +0,0 @@
-# `sockaddr(1)`
-
-`sockaddr` is a CLI utility that wraps and exposes `go-sockaddr` functionality
-from the command line.
-
-```text
-$ go get -u github.com/hashicorp/go-sockaddr/cmd/sockaddr
-```
-
-```text
-% sockaddr -h
-usage: sockaddr [--version] [--help] <command> [<args>]
-
-Available commands are:
- dump Parses IP addresses
- eval Evaluates a sockaddr template
- rfc Test to see if an IP is part of a known RFC
- version Prints the sockaddr version
-```
-
-## `sockaddr dump`
-
-```text
-Usage: sockaddr dump [options] input [...]
-
- Parse address(es) or interface and dumps various output.
-
-Options:
-
- -4 Parse the input as IPv4 only
- -6 Parse the input as IPv6 only
- -H Machine readable output
- -I Parse the argument as an interface name
- -i Parse the input as IP address (either IPv4 or IPv6)
- -n Show only the value
- -o Name of an attribute to pass through
- -u Parse the input as a UNIX Socket only
-```
-
-### `sockaddr dump` example output
-
-By default it prints out all available information unless the `-o` flag is
-specified.
-
-```text
-% sockaddr dump 127.0.0.2/8
-Attribute Value
-type IPv4
-string 127.0.0.2/8
-host 127.0.0.2
-address 127.0.0.2
-port 0
-netmask 255.0.0.0
-network 127.0.0.0/8
-mask_bits 8
-binary 01111111000000000000000000000010
-hex 7f000002
-first_usable 127.0.0.1
-last_usable 127.255.255.254
-octets 127 0 0 2
-size 16777216
-broadcast 127.255.255.255
-uint32 2130706434
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
-$ sockaddr dump -H -o host,address,port -o mask_bits 127.0.0.3:8600
-host 127.0.0.3:8600
-address 127.0.0.3
-port 8600
-mask_bits 32
-$ sockaddr dump -H -n -o host,address,port -o mask_bits 127.0.0.3:8600
-127.0.0.3:8600
-127.0.0.3
-8600
-32
-$ sockaddr dump -o type,address,hex,network '[2001:db8::3/32]'
-Attribute Value
-type IPv6
-address 2001:db8::3
-network 2001:db8::/32
-hex 20010db8000000000000000000000003
-$ sockaddr dump /tmp/example.sock
-Attribute Value
-type UNIX
-string "/tmp/example.sock"
-path /tmp/example.sock
-DialPacket "unixgram" "/tmp/example.sock"
-DialStream "unix" "/tmp/example.sock"
-ListenPacket "unixgram" "/tmp/example.sock"
-ListenStream "unix" "/tmp/example.sock"
-```
-
-## `sockaddr eval`
-
-```text
-Usage: sockaddr eval [options] [template ...]
-
- Parse the sockaddr template and evaluates the output.
-
- The `sockaddr` library has the potential to be very complex,
- which is why the `sockaddr` command supports an `eval`
- subcommand in order to test configurations from the command
- line. The `eval` subcommand automatically wraps its input
- with the `{{` and `}}` template delimiters unless the `-r`
- command is specified, in which case `eval` parses the raw
- input. If the `template` argument passed to `eval` is a
- dash (`-`), then `sockaddr eval` will read from stdin and
- automatically sets the `-r` flag.
-
-Options:
-
- -d Debug output
- -n Suppress newlines between args
- -r Suppress wrapping the input with {{ }} delimiters
-```
-
-Here are a few impractical examples to get you started:
-
-```text
-$ sockaddr eval 'GetAllInterfaces | include "flags" "forwardable" | include "up" | sort "default,type,size" | include "RFC" "6890" | attr "address"'
-172.14.6.167
-$ sockaddr eval 'GetDefaultInterfaces | sort "type,size" | include "RFC" "6890" | limit 1 | join "address" " "'
-172.14.6.167
-$ sockaddr eval 'GetPublicIP'
-203.0.113.4
-$ sockaddr eval 'GetPrivateIP'
-172.14.6.167
-$ sockaddr eval 'GetInterfaceIP "eth0"'
-172.14.6.167
-$ sockaddr eval 'GetAllInterfaces | include "network" "172.14.6.0/24" | attr "address"'
-172.14.6.167
-$ sockaddr eval 'GetPrivateInterfaces | join "type" " "'
-IPv4 IPv6
-$ sockaddr eval 'GetAllInterfaces | include "flags" "forwardable" | join "address" " "'
-203.0.113.4 2001:0DB8::1
-$ sockaddr eval 'GetAllInterfaces | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "address" " "'
-100:: fe80::1
-$ sockaddr eval '. | include "rfc" "1918" | print | len | lt 2'
-true
-$ sockaddr eval -r '{{with $ifSet := include "name" "lo0" . }}{{ range include "type" "IPv6" $ifSet | sort "address" | reverse}}{{ . }} {{end}}{{end}}'
-fe80::1/64 {1 16384 lo0 up|loopback|multicast} 100:: {1 16384 lo0 up|loopback|multicast}
-$ sockaddr eval '. | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "address" " "'
-100:: fe80::1
-$ cat <<'EOF' | sockaddr eval -
-{{. | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "address" " "}}
-EOF
-100:: fe80::1
-$ sockaddr eval 'GetPrivateInterfaces | include "flags" "forwardable|up" | include "type" "IPv4" | math "network" "+2" | attr "address"'
-172.14.6.2
-$ cat <<'EOF' | sudo tee -a /etc/profile
-export CONSUL_HTTP_ADDR="http://`sockaddr eval 'GetInterfaceIP \"eth0\"'`:8500"
-EOF
-```
-
-## `sockaddr rfc`
-
-```text
-$ sockaddr rfc
-Usage: sockaddr rfc [RFC Number] [IP Address]
-
- Tests a given IP address to see if it is part of a known
- RFC. If the IP address belongs to a known RFC, return exit
- code 0 and print the status. If the IP does not belong to
- an RFC, return 1. If the RFC is not known, return 2.
-
-Options:
-
- -s Silent, only return different exit codes
-$ sockaddr rfc 1918 192.168.1.10
-192.168.1.10 is part of RFC 1918
-$ sockaddr rfc 6890 '[::1]'
-100:: is part of RFC 6890
-$ sockaddr rfc list
-919
-1112
-1122
-1918
-2544
-2765
-2928
-3056
-3068
-3171
-3330
-3849
-3927
-4038
-4193
-4291
-4380
-4773
-4843
-5180
-5735
-5737
-6052
-6333
-6598
-6666
-6890
-7335
-```
-
-## `sockaddr tech-support`
-
-If one of the helper methods that derives its output from `GetDefaultInterfaces`
-is misbehaving, submit the output from this command as an issue along with
-any miscellaneous details that are specific to your environment.
-
-```text
-Usage: sockaddr tech-support [options]
-
- Print out network diagnostic information that can be used by
- support.
-
- The `sockaddr` library relies on OS-specific commands and
- output which can potentially be brittle. The `tech-support`
- subcommand emits all of the platform-specific network
- details required to debug why a given `sockaddr` API call is
- behaving differently than expected. The `-output` flag
- controls the output format. The default output mode is
- Markdown (`md`) however a raw mode (`raw`) is available to
- obtain the original output.
-
-Options:
-
- -output Encode the output using one of Markdown ("md") or Raw ("raw")
-```
-
-## `sockaddr version`
-
-The lowly version stub.
-
-```text
-$ sockaddr version
-sockaddr 0.1.0-dev
-```
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/autohelp.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/autohelp.go
deleted file mode 100644
index 082c53e27..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/autohelp.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package command
-
-import (
- "flag"
- "fmt"
- "sort"
- "strings"
-
- wordwrap "github.com/mitchellh/go-wordwrap"
- "github.com/ryanuber/columnize"
-)
-
-// AutoHelp specifies the necessary methods required to have their help
-// completely generated for them.
-type AutoHelp interface {
- Usage() string
- Description() string
- InitOpts()
- VisitAllFlags(func(f *flag.Flag))
-}
-
-// MakeHelp generates a help string based on the capabilities of the Command
-func MakeHelp(c AutoHelp) string {
- usageText := c.Usage()
-
- // If the length of Usage() is zero, then assume this is a hidden
- // command.
- if len(usageText) == 0 {
- return ""
- }
-
- descriptionText := wordwrap.WrapString(c.Description(), 60)
- descrLines := strings.Split(descriptionText, "\n")
- prefixedLines := make([]string, len(descrLines))
- for i := range descrLines {
- prefixedLines[i] = " " + descrLines[i]
- }
- descriptionText = strings.Join(prefixedLines, "\n")
-
- c.InitOpts()
- flags := []*flag.Flag{}
- c.VisitAllFlags(func(f *flag.Flag) {
- flags = append(flags, f)
- })
- optionsText := OptionsHelpOutput(flags)
-
- var helpOutput string
- switch {
- case len(optionsText) == 0 && len(descriptionText) == 0:
- helpOutput = usageText
- case len(optionsText) == 0:
- helpOutput = fmt.Sprintf(`Usage: %s
-
-%s`,
- usageText, descriptionText)
- case len(descriptionText) == 0 && len(optionsText) > 0:
- helpOutput = fmt.Sprintf(`Usage: %s
-
-Options:
-
-%s`,
- usageText, optionsText)
- default:
- helpOutput = fmt.Sprintf(`Usage: %s
-
-%s
-
-Options:
-
-%s`,
- usageText, descriptionText, optionsText)
- }
-
- return strings.TrimSpace(helpOutput)
-}
-
-// ByOptName implements sort.Interface for flag.Flag based on the Name field.
-type ByName []*flag.Flag
-
-func (a ByName) Len() int { return len(a) }
-func (a ByName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a ByName) Less(i, j int) bool {
- // Bubble up single-char args to the top of the list
- switch {
- case len(a[i].Name) == 1 && len(a[j].Name) != 1:
- return true
- case len(a[i].Name) != 1 && len(a[j].Name) == 1:
- return false
- default:
- // Case-insensitive sort. Use case as a tie breaker, however.
- a1 := strings.ToLower(a[i].Name)
- a2 := strings.ToLower(a[j].Name)
- if a1 == a2 {
- return a[i].Name < a[j].Name
- } else {
- return a1 < a2
- }
- }
-}
-
-// OptionsHelpOutput returns a string of formatted options
-func OptionsHelpOutput(flags []*flag.Flag) string {
- sort.Sort(ByName(flags))
-
- var output []string
- for _, f := range flags {
- if len(f.Usage) == 0 {
- continue
- }
-
- output = append(output, fmt.Sprintf("-%s | %s", f.Name, f.Usage))
- }
-
- optionsOutput := columnize.Format(output, &columnize.Config{
- Delim: "|",
- Glue: " ",
- Prefix: " ",
- Empty: "",
- })
- return optionsOutput
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/dump.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/dump.go
deleted file mode 100644
index a5618b357..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/dump.go
+++ /dev/null
@@ -1,274 +0,0 @@
-package command
-
-import (
- "flag"
- "fmt"
-
- "github.com/hashicorp/errwrap"
- sockaddr "github.com/hashicorp/go-sockaddr"
- "github.com/mitchellh/cli"
- "github.com/ryanuber/columnize"
-)
-
-type DumpCommand struct {
- Ui cli.Ui
-
- // attrNames is a list of attribute names to include in the output
- attrNames []string
-
- // flags is a list of options belonging to this command
- flags *flag.FlagSet
-
- // machineMode changes the output format to be machine friendly
- // (i.e. tab-separated values).
- machineMode bool
-
- // valueOnly changes the output format to include only values
- valueOnly bool
-
- // ifOnly parses the input as an interface name
- ifOnly bool
-
- // ipOnly parses the input as an IP address (either IPv4 or IPv6)
- ipOnly bool
-
- // v4Only parses the input exclusively as an IPv4 address
- v4Only bool
-
- // v6Only parses the input exclusively as an IPv6 address
- v6Only bool
-
- // unixOnly parses the input exclusively as a UNIX Socket
- unixOnly bool
-}
-
-// Description is the long-form command help.
-func (c *DumpCommand) Description() string {
- return `Parse address(es) or interface and dumps various output.`
-}
-
-// Help returns the full help output expected by `sockaddr -h cmd`
-func (c *DumpCommand) Help() string {
- return MakeHelp(c)
-}
-
-// InitOpts is responsible for setup of this command's configuration via the
-// command line. InitOpts() does not parse the arguments (see parseOpts()).
-func (c *DumpCommand) InitOpts() {
- c.flags = flag.NewFlagSet("dump", flag.ContinueOnError)
- c.flags.Usage = func() { c.Ui.Output(c.Help()) }
- c.flags.BoolVar(&c.machineMode, "H", false, "Machine readable output")
- c.flags.BoolVar(&c.valueOnly, "n", false, "Show only the value")
- c.flags.BoolVar(&c.v4Only, "4", false, "Parse the input as IPv4 only")
- c.flags.BoolVar(&c.v6Only, "6", false, "Parse the input as IPv6 only")
- c.flags.BoolVar(&c.ifOnly, "I", false, "Parse the argument as an interface name")
- c.flags.BoolVar(&c.ipOnly, "i", false, "Parse the input as IP address (either IPv4 or IPv6)")
- c.flags.BoolVar(&c.unixOnly, "u", false, "Parse the input as a UNIX Socket only")
- c.flags.Var((*MultiArg)(&c.attrNames), "o", "Name of an attribute to pass through")
-}
-
-// Run executes this command.
-func (c *DumpCommand) Run(args []string) int {
- if len(args) == 0 {
- c.Ui.Error(c.Help())
- return 1
- }
-
- c.InitOpts()
- addrs, err := c.parseOpts(args)
- if err != nil {
- if errwrap.Contains(err, "flag: help requested") {
- return 0
- }
- return 1
- }
- for _, addr := range addrs {
- var sa sockaddr.SockAddr
- var ifAddrs sockaddr.IfAddrs
- var err error
- switch {
- case c.v4Only:
- sa, err = sockaddr.NewIPv4Addr(addr)
- case c.v6Only:
- sa, err = sockaddr.NewIPv6Addr(addr)
- case c.unixOnly:
- sa, err = sockaddr.NewUnixSock(addr)
- case c.ipOnly:
- sa, err = sockaddr.NewIPAddr(addr)
- case c.ifOnly:
- ifAddrs, err = sockaddr.GetAllInterfaces()
- if err != nil {
- break
- }
-
- ifAddrs, _, err = sockaddr.IfByName(addr, ifAddrs)
- default:
- sa, err = sockaddr.NewSockAddr(addr)
- }
- if err != nil {
- c.Ui.Error(fmt.Sprintf("Unable to parse %+q: %v", addr, err))
- return 1
- }
- if sa != nil {
- c.dumpSockAddr(sa)
- } else if ifAddrs != nil {
- c.dumpIfAddrs(ifAddrs)
- } else {
- panic("bad")
- }
- }
- return 0
-}
-
-// Synopsis returns a terse description used when listing sub-commands.
-func (c *DumpCommand) Synopsis() string {
- return `Parses input as an IP or interface name(s) and dumps various information`
-}
-
-// Usage is the one-line usage description
-func (c *DumpCommand) Usage() string {
- return `sockaddr dump [options] input [...]`
-}
-
-// VisitAllFlags forwards the visitor function to the FlagSet
-func (c *DumpCommand) VisitAllFlags(fn func(*flag.Flag)) {
- c.flags.VisitAll(fn)
-}
-
-func (c *DumpCommand) dumpIfAddrs(ifAddrs sockaddr.IfAddrs) {
- for _, ifAddr := range ifAddrs {
- c.dumpSockAddr(ifAddr.SockAddr)
- }
-}
-
-func (c *DumpCommand) dumpSockAddr(sa sockaddr.SockAddr) {
- reservedAttrs := []sockaddr.AttrName{"Attribute"}
- const maxNumAttrs = 32
-
- output := make([]string, 0, maxNumAttrs+len(reservedAttrs))
- allowedAttrs := make(map[sockaddr.AttrName]struct{}, len(c.attrNames)+len(reservedAttrs))
- for _, attr := range reservedAttrs {
- allowedAttrs[attr] = struct{}{}
- }
- for _, attr := range c.attrNames {
- allowedAttrs[sockaddr.AttrName(attr)] = struct{}{}
- }
-
- // allowedAttr returns true if the attribute is allowed to be appended
- // to the output.
- allowedAttr := func(k sockaddr.AttrName) bool {
- if len(allowedAttrs) == len(reservedAttrs) {
- return true
- }
-
- _, found := allowedAttrs[k]
- return found
- }
-
- // outFmt is a small helper function to reduce the tedium below. outFmt
- // returns a new slice and expects the value to already be a string.
- outFmt := func(o []string, k sockaddr.AttrName, v interface{}) []string {
- if !allowedAttr(k) {
- return o
- }
- switch {
- case c.valueOnly:
- return append(o, fmt.Sprintf("%s", v))
- case !c.valueOnly && c.machineMode:
- return append(o, fmt.Sprintf("%s\t%s", k, v))
- case !c.valueOnly && !c.machineMode:
- fallthrough
- default:
- return append(o, fmt.Sprintf("%s | %s", k, v))
- }
- }
-
- if !c.machineMode {
- output = outFmt(output, "Attribute", "Value")
- }
-
- // Attributes for all SockAddr types
- for _, attr := range sockaddr.SockAddrAttrs() {
- output = outFmt(output, attr, sockaddr.SockAddrAttr(sa, attr))
- }
-
- // Attributes for all IP types (both IPv4 and IPv6)
- if sa.Type()&sockaddr.TypeIP != 0 {
- ip := *sockaddr.ToIPAddr(sa)
- for _, attr := range sockaddr.IPAttrs() {
- output = outFmt(output, attr, sockaddr.IPAddrAttr(ip, attr))
- }
- }
-
- if sa.Type() == sockaddr.TypeIPv4 {
- ipv4 := *sockaddr.ToIPv4Addr(sa)
- for _, attr := range sockaddr.IPv4Attrs() {
- output = outFmt(output, attr, sockaddr.IPv4AddrAttr(ipv4, attr))
- }
- }
-
- if sa.Type() == sockaddr.TypeIPv6 {
- ipv6 := *sockaddr.ToIPv6Addr(sa)
- for _, attr := range sockaddr.IPv6Attrs() {
- output = outFmt(output, attr, sockaddr.IPv6AddrAttr(ipv6, attr))
- }
- }
-
- if sa.Type() == sockaddr.TypeUnix {
- us := *sockaddr.ToUnixSock(sa)
- for _, attr := range sockaddr.UnixSockAttrs() {
- output = outFmt(output, attr, sockaddr.UnixSockAttr(us, attr))
- }
- }
-
- // Developer-focused arguments
- {
- arg1, arg2 := sa.DialPacketArgs()
- output = outFmt(output, "DialPacket", fmt.Sprintf("%+q %+q", arg1, arg2))
- }
- {
- arg1, arg2 := sa.DialStreamArgs()
- output = outFmt(output, "DialStream", fmt.Sprintf("%+q %+q", arg1, arg2))
- }
- {
- arg1, arg2 := sa.ListenPacketArgs()
- output = outFmt(output, "ListenPacket", fmt.Sprintf("%+q %+q", arg1, arg2))
- }
- {
- arg1, arg2 := sa.ListenStreamArgs()
- output = outFmt(output, "ListenStream", fmt.Sprintf("%+q %+q", arg1, arg2))
- }
-
- result := columnize.SimpleFormat(output)
- c.Ui.Output(result)
-}
-
-// parseOpts is responsible for parsing the options set in InitOpts(). Returns
-// a list of non-parsed flags.
-func (c *DumpCommand) parseOpts(args []string) ([]string, error) {
- if err := c.flags.Parse(args); err != nil {
- return nil, err
- }
-
- conflictingOptsCount := 0
- if c.v4Only {
- conflictingOptsCount++
- }
- if c.v6Only {
- conflictingOptsCount++
- }
- if c.unixOnly {
- conflictingOptsCount++
- }
- if c.ifOnly {
- conflictingOptsCount++
- }
- if c.ipOnly {
- conflictingOptsCount++
- }
- if conflictingOptsCount > 1 {
- return nil, fmt.Errorf("Conflicting options specified, only one parsing mode may be specified at a time")
- }
-
- return c.flags.Args(), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/eval.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/eval.go
deleted file mode 100644
index 0554cda4f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/eval.go
+++ /dev/null
@@ -1,158 +0,0 @@
-package command
-
-import (
- "bytes"
- "flag"
- "fmt"
- "io"
- "os"
- "strings"
-
- "github.com/hashicorp/errwrap"
- "github.com/hashicorp/go-sockaddr/template"
- "github.com/mitchellh/cli"
-)
-
-type EvalCommand struct {
- Ui cli.Ui
-
- // debugOutput emits framed output vs raw output.
- debugOutput bool
-
- // flags is a list of options belonging to this command
- flags *flag.FlagSet
-
- // rawInput disables wrapping the string in the text/template {{ }}
- // handlebars.
- rawInput bool
-
- // suppressNewline changes whether or not there's a newline between each
- // arg passed to the eval subcommand.
- suppressNewline bool
-}
-
-// Description is the long-form command help.
-func (c *EvalCommand) Description() string {
- return `Parse the sockaddr template and evaluates the output.
-
-` + "The `sockaddr` library has the potential to be very complex, which is why the " +
- "`sockaddr` command supports an `eval` subcommand in order to test configurations " +
- "from the command line. The `eval` subcommand automatically wraps its input with " +
- "the `{{` and `}}` template delimiters unless the `-r` command is specified, in " +
- "which case `eval` parses the raw input. If the `template` argument passed to " +
- "`eval` is a dash (`-`), then `sockaddr eval` will read from stdin and " +
- "automatically sets the `-r` flag."
-
-}
-
-// Help returns the full help output expected by `sockaddr -h cmd`
-func (c *EvalCommand) Help() string {
- return MakeHelp(c)
-}
-
-// InitOpts is responsible for setup of this command's configuration via the
-// command line. InitOpts() does not parse the arguments (see parseOpts()).
-func (c *EvalCommand) InitOpts() {
- c.flags = flag.NewFlagSet("eval", flag.ContinueOnError)
- c.flags.Usage = func() { c.Ui.Output(c.Help()) }
- c.flags.BoolVar(&c.debugOutput, "d", false, "Debug output")
- c.flags.BoolVar(&c.suppressNewline, "n", false, "Suppress newlines between args")
- c.flags.BoolVar(&c.rawInput, "r", false, "Suppress wrapping the input with {{ }} delimiters")
-}
-
-// Run executes this command.
-func (c *EvalCommand) Run(args []string) int {
- if len(args) == 0 {
- c.Ui.Error(c.Help())
- return 1
- }
-
- c.InitOpts()
- tmpls, err := c.parseOpts(args)
- if err != nil {
- if errwrap.Contains(err, "flag: help requested") {
- return 0
- }
- return 1
- }
- inputs, outputs := make([]string, len(tmpls)), make([]string, len(tmpls))
- var rawInput, readStdin bool
- for i, in := range tmpls {
- if readStdin {
- break
- }
-
- rawInput = c.rawInput
- if in == "-" {
- rawInput = true
- var f io.Reader = os.Stdin
- var buf bytes.Buffer
- if _, err := io.Copy(&buf, f); err != nil {
- c.Ui.Error(fmt.Sprintf("[ERROR]: Error reading from stdin: %v", err))
- return 1
- }
- in = buf.String()
- if len(in) == 0 {
- return 0
- }
- readStdin = true
- }
- inputs[i] = in
-
- if !rawInput {
- in = `{{` + in + `}}`
- inputs[i] = in
- }
-
- out, err := template.Parse(in)
- if err != nil {
- c.Ui.Error(fmt.Sprintf("ERROR[%d] in: %q\n[%d] msg: %v\n", i, in, i, err))
- return 1
- }
- outputs[i] = out
- }
-
- if c.debugOutput {
- for i, out := range outputs {
- c.Ui.Output(fmt.Sprintf("[%d] in: %q\n[%d] out: %q\n", i, inputs[i], i, out))
- if i != len(outputs)-1 {
- if c.debugOutput {
- c.Ui.Output(fmt.Sprintf("---\n"))
- }
- }
- }
- } else {
- sep := "\n"
- if c.suppressNewline {
- sep = ""
- }
- c.Ui.Output(strings.Join(outputs, sep))
- }
-
- return 0
-}
-
-// Synopsis returns a terse description used when listing sub-commands.
-func (c *EvalCommand) Synopsis() string {
- return `Evaluates a sockaddr template`
-}
-
-// Usage is the one-line usage description
-func (c *EvalCommand) Usage() string {
- return `sockaddr eval [options] [template ...]`
-}
-
-// VisitAllFlags forwards the visitor function to the FlagSet
-func (c *EvalCommand) VisitAllFlags(fn func(*flag.Flag)) {
- c.flags.VisitAll(fn)
-}
-
-// parseOpts is responsible for parsing the options set in InitOpts(). Returns
-// a list of non-parsed flags.
-func (c *EvalCommand) parseOpts(args []string) ([]string, error) {
- if err := c.flags.Parse(args); err != nil {
- return nil, err
- }
-
- return c.flags.Args(), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/multi_arg.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/multi_arg.go
deleted file mode 100644
index c626dab0f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/multi_arg.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package command
-
-import "regexp"
-
-type MultiArg []string
-
-func (v *MultiArg) String() string {
- return ""
-}
-
-func (v *MultiArg) Set(raw string) error {
- parts := regexp.MustCompile(`[\s]*,[\s]*`).Split(raw, -1)
- for _, part := range parts {
- *v = append(*v, part)
- }
- return nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc.go
deleted file mode 100644
index 4c66b8517..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package command
-
-import (
- "flag"
- "fmt"
- "strconv"
-
- "github.com/hashicorp/errwrap"
- sockaddr "github.com/hashicorp/go-sockaddr"
- "github.com/mitchellh/cli"
-)
-
-type RFCCommand struct {
- Ui cli.Ui
-
- // flags is a list of options belonging to this command
- flags *flag.FlagSet
-
- // silentMode prevents any output and only returns exit code 1 when the
- // IP address is NOT a member of the known RFC. Unknown RFCs return a
- // status code of 2.
- silentMode bool
-}
-
-// Description is the long-form command help.
-func (c *RFCCommand) Description() string {
- return `Tests a given IP address to see if it is part of a known RFC. If the IP address belongs to a known RFC, return exit code 0 and print the status. If the IP does not belong to an RFC, return 1. If the RFC is not known, return 2.`
-}
-
-// Help returns the full help output expected by `sockaddr -h cmd`
-func (c *RFCCommand) Help() string {
- return MakeHelp(c)
-}
-
-// InitOpts is responsible for setup of this command's configuration via the
-// command line. InitOpts() does not parse the arguments (see parseOpts()).
-func (c *RFCCommand) InitOpts() {
- c.flags = flag.NewFlagSet("rfc", flag.ContinueOnError)
- c.flags.Usage = func() { c.Ui.Output(c.Help()) }
- c.flags.BoolVar(&c.silentMode, "s", false, "Silent, only return different exit codes")
-}
-
-// Run executes this command.
-func (c *RFCCommand) Run(args []string) int {
- if len(args) == 0 {
- c.Ui.Error(c.Help())
- return 1
- }
-
- c.InitOpts()
- unprocessedArgs, err := c.parseOpts(args)
- if err != nil {
- if errwrap.Contains(err, "flag: help requested") {
- return 0
- }
- return 1
- }
-
- switch numArgs := len(unprocessedArgs); {
- case numArgs != 2 && numArgs != 0:
- c.Ui.Error(`ERROR: Need an RFC Number and an IP address to test.`)
- c.Ui.Error(c.Help())
- fallthrough
- case numArgs == 0:
- return 1
- }
-
- // Parse the RFC Number
- rfcNum, err := strconv.ParseUint(unprocessedArgs[0], 10, 32)
- if err != nil {
- c.Ui.Error(fmt.Sprintf("ERROR: Invalid RFC Number %+q: %v", unprocessedArgs[0], err))
- return 2
- }
-
- // Parse the IP address
- ipAddr, err := sockaddr.NewIPAddr(unprocessedArgs[1])
- if err != nil {
- c.Ui.Error(fmt.Sprintf("ERROR: Invalid IP address %+q: %v", unprocessedArgs[1], err))
- return 3
- }
-
- switch inRFC := sockaddr.IsRFC(uint(rfcNum), ipAddr); {
- case inRFC && !c.silentMode:
- c.Ui.Output(fmt.Sprintf("%s is part of RFC %d", ipAddr, rfcNum))
- fallthrough
- case inRFC:
- return 0
- case !inRFC && !c.silentMode:
- c.Ui.Output(fmt.Sprintf("%s is not part of RFC %d", ipAddr, rfcNum))
- fallthrough
- case !inRFC:
- return 1
- default:
- panic("bad")
- }
-}
-
-// Synopsis returns a terse description used when listing sub-commands.
-func (c *RFCCommand) Synopsis() string {
- return `Test to see if an IP is part of a known RFC`
-}
-
-// Usage is the one-line usage description
-func (c *RFCCommand) Usage() string {
- return `sockaddr rfc [RFC Number] [IP Address]`
-}
-
-// VisitAllFlags forwards the visitor function to the FlagSet
-func (c *RFCCommand) VisitAllFlags(fn func(*flag.Flag)) {
- c.flags.VisitAll(fn)
-}
-
-// parseOpts is responsible for parsing the options set in InitOpts(). Returns
-// a list of non-parsed flags.
-func (c *RFCCommand) parseOpts(args []string) ([]string, error) {
- if err := c.flags.Parse(args); err != nil {
- return nil, err
- }
-
- return c.flags.Args(), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc_list.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc_list.go
deleted file mode 100644
index 11c1ac365..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/rfc_list.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package command
-
-import (
- "flag"
- "fmt"
- "sort"
-
- "github.com/hashicorp/errwrap"
- sockaddr "github.com/hashicorp/go-sockaddr"
- "github.com/mitchellh/cli"
-)
-
-type RFCListCommand struct {
- Ui cli.Ui
-
- // flags is a list of options belonging to this command
- flags *flag.FlagSet
-}
-
-// Description is the long-form command help.
-func (c *RFCListCommand) Description() string {
- return `Lists all known RFCs.`
-}
-
-// Help returns the full help output expected by `sockaddr -h cmd`
-func (c *RFCListCommand) Help() string {
- return MakeHelp(c)
-}
-
-// InitOpts is responsible for setup of this command's configuration via the
-// command line. InitOpts() does not parse the arguments (see parseOpts()).
-func (c *RFCListCommand) InitOpts() {
- c.flags = flag.NewFlagSet("list", flag.ContinueOnError)
- c.flags.Usage = func() { c.Ui.Output(c.Help()) }
-}
-
-type rfcNums []uint
-
-func (s rfcNums) Len() int { return len(s) }
-func (s rfcNums) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s rfcNums) Less(i, j int) bool { return s[i] < s[j] }
-
-// Run executes this command.
-func (c *RFCListCommand) Run(args []string) int {
- if len(args) != 0 {
- c.Ui.Error(c.Help())
- return 1
- }
-
- c.InitOpts()
- _, err := c.parseOpts(args)
- if err != nil {
- if errwrap.Contains(err, "flag: help requested") {
- return 0
- }
- return 1
- }
-
- var rfcs rfcNums
- sockaddr.VisitAllRFCs(func(rfcNum uint, sas sockaddr.SockAddrs) {
- rfcs = append(rfcs, rfcNum)
- })
-
- sort.Sort(rfcs)
-
- for _, rfcNum := range rfcs {
- c.Ui.Output(fmt.Sprintf("%d", rfcNum))
- }
-
- return 0
-}
-
-// Synopsis returns a terse description used when listing sub-commands.
-func (c *RFCListCommand) Synopsis() string {
- return `Lists all known RFCs`
-}
-
-// Usage is the one-line usage description
-func (c *RFCListCommand) Usage() string {
- return `sockaddr rfc list`
-}
-
-// VisitAllFlags forwards the visitor function to the FlagSet
-func (c *RFCListCommand) VisitAllFlags(fn func(*flag.Flag)) {
- c.flags.VisitAll(fn)
-}
-
-func (c *RFCListCommand) parseOpts(args []string) ([]string, error) {
- if err := c.flags.Parse(args); err != nil {
- return nil, err
- }
-
- return c.flags.Args(), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/tech_support.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/tech_support.go
deleted file mode 100644
index fd706009d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/tech_support.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package command
-
-import (
- "flag"
- "fmt"
- "net"
- "os/exec"
- "runtime"
-
- "github.com/hashicorp/errwrap"
- sockaddr "github.com/hashicorp/go-sockaddr"
- "github.com/mitchellh/cli"
-)
-
-type TechSupportCommand struct {
- Ui cli.Ui
-
- // outputMode controls the type of output encoding.
- outputMode string
-
- // flags is a list of options belonging to this command
- flags *flag.FlagSet
-}
-
-// Description is the long-form command help.
-func (c *TechSupportCommand) Description() string {
- return `Print out network diagnostic information that can be used by support.
-
-` + "The `sockaddr` library relies on OS-specific commands and output which can potentially be " +
- "brittle. The `tech-support` subcommand emits all of the platform-specific " +
- "network details required to debug why a given `sockaddr` API call is behaving " +
- "differently than expected. The `-output` flag controls the output format. " +
- "The default output mode is Markdown (`md`) however a raw mode (`raw`) is " +
- "available to obtain the original output."
-}
-
-// Help returns the full help output expected by `sockaddr -h cmd`
-func (c *TechSupportCommand) Help() string {
- return MakeHelp(c)
-}
-
-// InitOpts is responsible for setup of this command's configuration via the
-// command line. InitOpts() does not parse the arguments (see parseOpts()).
-func (c *TechSupportCommand) InitOpts() {
- c.flags = flag.NewFlagSet("tech-support", flag.ContinueOnError)
- c.flags.Usage = func() { c.Ui.Output(c.Help()) }
- c.flags.StringVar(&c.outputMode, "output", "md", `Encode the output using one of Markdown ("md") or Raw ("raw")`)
-}
-
-// Run executes this command.
-func (c *TechSupportCommand) Run(args []string) int {
- c.InitOpts()
- rest, err := c.parseOpts(args)
- if err != nil {
- if errwrap.Contains(err, "flag: help requested") {
- return 0
- }
- return 1
- }
- if len(rest) != 0 {
- c.Ui.Error(c.Help())
- return 1
- }
-
- ri, err := sockaddr.NewRouteInfo()
- if err != nil {
- c.Ui.Error(fmt.Sprintf("error loading route information: %v", err))
- return 1
- }
-
- const initNumCmds = 4
- type cmdResult struct {
- cmd []string
- out string
- }
- output := make(map[string]cmdResult, initNumCmds)
- ri.VisitCommands(func(name string, cmd []string) {
- out, err := exec.Command(cmd[0], cmd[1:]...).Output()
- if err != nil {
- out = []byte(fmt.Sprintf("ERROR: command %q failed: %v", name, err))
- }
-
- output[name] = cmdResult{
- cmd: cmd,
- out: string(out),
- }
- })
-
- out := c.rowWriterOutputFactory()
-
- for cmdName, result := range output {
- switch c.outputMode {
- case "md":
- c.Ui.Output(fmt.Sprintf("## cmd: `%s`", cmdName))
- c.Ui.Output("")
- c.Ui.Output(fmt.Sprintf("Command: `%#v`", result.cmd))
- c.Ui.Output("```")
- c.Ui.Output(result.out)
- c.Ui.Output("```")
- c.Ui.Output("")
- case "raw":
- c.Ui.Output(fmt.Sprintf("cmd: %q: %#v", cmdName, result.cmd))
- c.Ui.Output("")
- c.Ui.Output(result.out)
- c.Ui.Output("")
- default:
- c.Ui.Error(fmt.Sprintf("Unsupported output type: %q", c.outputMode))
- return 1
- }
-
- out("s", "GOOS", runtime.GOOS)
- out("s", "GOARCH", runtime.GOARCH)
- out("s", "Compiler", runtime.Compiler)
- out("s", "Version", runtime.Version())
- ifs, err := net.Interfaces()
- if err != nil {
- out("v", "net.Interfaces", err)
- } else {
- for i, intf := range ifs {
- out("s", fmt.Sprintf("net.Interfaces[%d].Name", i), intf.Name)
- out("s", fmt.Sprintf("net.Interfaces[%d].Flags", i), intf.Flags)
- out("+v", fmt.Sprintf("net.Interfaces[%d].Raw", i), intf)
- addrs, err := intf.Addrs()
- if err != nil {
- out("v", fmt.Sprintf("net.Interfaces[%d].Addrs", i), err)
- } else {
- for j, addr := range addrs {
- out("s", fmt.Sprintf("net.Interfaces[%d].Addrs[%d]", i, j), addr)
- }
- }
- }
- }
- }
-
- return 0
-}
-
-// Synopsis returns a terse description used when listing sub-commands.
-func (c *TechSupportCommand) Synopsis() string {
- return `Dumps diagnostic information about a platform's network`
-}
-
-// Usage is the one-line usage description
-func (c *TechSupportCommand) Usage() string {
- return `sockaddr tech-support [options]`
-}
-
-// VisitAllFlags forwards the visitor function to the FlagSet
-func (c *TechSupportCommand) VisitAllFlags(fn func(*flag.Flag)) {
- c.flags.VisitAll(fn)
-}
-
-// parseOpts is responsible for parsing the options set in InitOpts(). Returns
-// a list of non-parsed flags.
-func (c *TechSupportCommand) parseOpts(args []string) ([]string, error) {
- if err := c.flags.Parse(args); err != nil {
- return nil, err
- }
-
- switch c.outputMode {
- case "md", "markdown":
- c.outputMode = "md"
- case "raw":
- default:
- return nil, fmt.Errorf(`Invalid output mode %q, supported output types are "md" (default) and "raw"`, c.outputMode)
- }
- return c.flags.Args(), nil
-}
-
-func (c *TechSupportCommand) rowWriterOutputFactory() func(valueVerb, key string, val interface{}) {
- type _Fmt string
- type _Verb string
- var lineNoFmt string
- var keyVerb _Verb
- var fmtMap map[_Verb]_Fmt
- switch c.outputMode {
- case "md":
- lineNoFmt = "%02d."
- keyVerb = "s"
- fmtMap = map[_Verb]_Fmt{
- "s": "`%s`",
- "-s": "%s",
- "v": "`%v`",
- "+v": "`%#v`",
- }
- case "raw":
- lineNoFmt = "%02d:"
- keyVerb = "-s"
- fmtMap = map[_Verb]_Fmt{
- "s": "%q",
- "-s": "%s",
- "v": "%v",
- "+v": "%#v",
- }
- default:
- panic(fmt.Sprintf("Unsupported output type: %q", c.outputMode))
- }
-
- var count int
- return func(valueVerb, key string, val interface{}) {
- count++
-
- keyFmt, ok := fmtMap[keyVerb]
- if !ok {
- panic(fmt.Sprintf("Invalid key verb: %q", keyVerb))
- }
-
- valFmt, ok := fmtMap[_Verb(valueVerb)]
- if !ok {
- panic(fmt.Sprintf("Invalid value verb: %q", valueVerb))
- }
-
- outputModeFmt := fmt.Sprintf("%s %s:\t%s", lineNoFmt, keyFmt, valFmt)
- c.Ui.Output(fmt.Sprintf(outputModeFmt, count, key, val))
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/version.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/version.go
deleted file mode 100644
index add3d1cc6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/command/version.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package command
-
-import (
- "fmt"
-
- "github.com/mitchellh/cli"
-)
-
-// VersionCommand is a Command implementation prints the version.
-type VersionCommand struct {
- HumanVersion string
- Ui cli.Ui
-}
-
-func (c *VersionCommand) Help() string {
- return ""
-}
-
-func (c *VersionCommand) Run(_ []string) int {
- c.Ui.Output(fmt.Sprintf("sockaddr %s", c.HumanVersion))
-
- return 0
-}
-
-func (c *VersionCommand) Synopsis() string {
- return "Prints the sockaddr version"
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/commands.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/commands.go
deleted file mode 100644
index ca2e23145..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/commands.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package main
-
-import (
- "os"
-
- "github.com/hashicorp/go-sockaddr/cmd/sockaddr/command"
- "github.com/mitchellh/cli"
-)
-
-// Commands is the mapping of all the available CLI commands.
-var Commands map[string]cli.CommandFactory
-
-func init() {
- ui := &cli.BasicUi{Writer: os.Stdout}
-
- Commands = map[string]cli.CommandFactory{
- "dump": func() (cli.Command, error) {
- return &command.DumpCommand{
- Ui: ui,
- }, nil
- },
- "eval": func() (cli.Command, error) {
- return &command.EvalCommand{
- Ui: ui,
- }, nil
- },
- "rfc": func() (cli.Command, error) {
- return &command.RFCCommand{
- Ui: ui,
- }, nil
- },
- "rfc list": func() (cli.Command, error) {
- return &command.RFCListCommand{
- Ui: ui,
- }, nil
- },
- "tech-support": func() (cli.Command, error) {
- return &command.TechSupportCommand{
- Ui: ui,
- }, nil
- },
- "version": func() (cli.Command, error) {
- return &command.VersionCommand{
- HumanVersion: GetHumanVersion(),
- Ui: ui,
- }, nil
- },
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/main.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/main.go
deleted file mode 100644
index b5cac9a3e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/main.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package main
-
-import (
- "fmt"
- "io/ioutil"
- "log"
- "os"
-
- "github.com/mitchellh/cli"
-)
-
-func main() {
- os.Exit(realMain())
-}
-
-func realMain() int {
- log.SetOutput(ioutil.Discard)
-
- // Get the command line args. We shortcut "--version" and "-v" to just
- // show the version.
- args := os.Args[1:]
- for _, arg := range args {
- if arg == "--" {
- break
- }
- if arg == "-v" || arg == "--version" {
- newArgs := make([]string, len(args)+1)
- newArgs[0] = "version"
- copy(newArgs[1:], args)
- args = newArgs
- break
- }
- }
-
- cli := &cli.CLI{
- Args: args,
- Commands: Commands,
- HelpFunc: cli.BasicHelpFunc("sockaddr"),
- }
- exitCode, err := cli.Run()
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error executing CLI: %s\n", err.Error())
- return 1
- }
-
- return exitCode
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/.gitignore b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/.gitignore
deleted file mode 100644
index d1aff0152..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.diff
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/GNUmakefile b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/GNUmakefile
deleted file mode 100644
index 4be178cc4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/GNUmakefile
+++ /dev/null
@@ -1,10 +0,0 @@
-.DEFAULT_GOAL := test
-
-clean::
- rm -f *.diff *.out
-
-test::
- @rm -f *.diff
- @./run_all.sh
- @printf "All tests ran successfully.\n"
-
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr.out
deleted file mode 100644
index 858f1516e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr.out
+++ /dev/null
@@ -1,9 +0,0 @@
-Usage: sockaddr [--version] [--help] <command> [<args>]
-
-Available commands are:
- dump Parses input as an IP or interface name(s) and dumps various information
- eval Evaluates a sockaddr template
- rfc Test to see if an IP is part of a known RFC
- tech-support Dumps diagnostic information about a platform's network
- version Prints the sockaddr version
-
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_-v.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_-v.out
deleted file mode 100644
index f5bbd70b2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_-v.out
+++ /dev/null
@@ -1 +0,0 @@
-sockaddr 0.1.0-dev
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-00-help.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-00-help.out
deleted file mode 100644
index 9ce419014..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-00-help.out
+++ /dev/null
@@ -1,14 +0,0 @@
-Usage: sockaddr dump [options] input [...]
-
- Parse address(es) or interface and dumps various output.
-
-Options:
-
- -4 Parse the input as IPv4 only
- -6 Parse the input as IPv6 only
- -H Machine readable output
- -I Parse the argument as an interface name
- -i Parse the input as IP address (either IPv4 or IPv6)
- -n Show only the value
- -o Name of an attribute to pass through
- -u Parse the input as a UNIX Socket only
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-01.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-01.out
deleted file mode 100644
index e48682ce7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-01.out
+++ /dev/null
@@ -1,21 +0,0 @@
-Attribute Value
-type IPv4
-string 127.0.0.1
-host 127.0.0.1
-address 127.0.0.1
-port 0
-netmask 255.255.255.255
-network 127.0.0.1
-mask_bits 32
-binary 01111111000000000000000000000001
-hex 7f000001
-first_usable 127.0.0.1
-last_usable 127.0.0.1
-octets 127 0 0 1
-size 1
-broadcast 127.0.0.1
-uint32 2130706433
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" "127.0.0.1:0"
-ListenStream "tcp4" "127.0.0.1:0"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-02.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-02.out
deleted file mode 100644
index c7871d6b7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-02.out
+++ /dev/null
@@ -1,21 +0,0 @@
-Attribute Value
-type IPv4
-string 127.0.0.2/8
-host 127.0.0.2
-address 127.0.0.2
-port 0
-netmask 255.0.0.0
-network 127.0.0.0
-mask_bits 8
-binary 01111111000000000000000000000010
-hex 7f000002
-first_usable 127.0.0.1
-last_usable 127.255.255.254
-octets 127 0 0 2
-size 16777216
-broadcast 127.255.255.255
-uint32 2130706434
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-03.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-03.out
deleted file mode 100644
index b79480919..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-03.out
+++ /dev/null
@@ -1,20 +0,0 @@
-Attribute Value
-type IPv6
-string 2001:db8::3
-host 2001:db8::3
-address 2001:db8::3
-port 0
-netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
-network 2001:db8::3
-mask_bits 128
-binary 00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011
-hex 20010db8000000000000000000000003
-first_usable 2001:db8::3
-last_usable 2001:db8::3
-octets 32 1 13 184 0 0 0 0 0 0 0 0 0 0 0 3
-size 1
-uint128 42540766411282592856903984951653826563
-DialPacket "udp6" ""
-DialStream "tcp6" ""
-ListenPacket "udp6" "[2001:db8::3]:0"
-ListenStream "tcp6" "[2001:db8::3]:0"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-04.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-04.out
deleted file mode 100644
index e1b5146ec..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-04.out
+++ /dev/null
@@ -1,20 +0,0 @@
-Attribute Value
-type IPv6
-string 2001:db8::4/64
-host 2001:db8::4
-address 2001:db8::4
-port 0
-netmask ffff:ffff:ffff:ffff::
-network 2001:db8::
-mask_bits 64
-binary 00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100
-hex 20010db8000000000000000000000004
-first_usable 2001:db8::
-last_usable 2001:db8::ffff:ffff:ffff:ffff
-octets 32 1 13 184 0 0 0 0 0 0 0 0 0 0 0 4
-size 18446744073709551616
-uint128 42540766411282592856903984951653826564
-DialPacket "udp6" ""
-DialStream "tcp6" ""
-ListenPacket "udp6" ""
-ListenStream "tcp6" ""
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-05.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-05.out
deleted file mode 100644
index 58d807edc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-05.out
+++ /dev/null
@@ -1,8 +0,0 @@
-Attribute Value
-type UNIX
-string "/tmp/example"
-path /tmp/example
-DialPacket "unixgram" "/tmp/example"
-DialStream "unix" "/tmp/example"
-ListenPacket "unixgram" "/tmp/example"
-ListenStream "unix" "/tmp/example"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-06.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-06.out
deleted file mode 100644
index 4cb5d4566..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-06.out
+++ /dev/null
@@ -1,20 +0,0 @@
-Attribute Value
-type IPv6
-string [2001:db8::6]:22
-host [2001:db8::6]:22
-address 2001:db8::6
-port 22
-netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
-network 2001:db8::6
-mask_bits 128
-binary 00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110
-hex 20010db8000000000000000000000006
-first_usable 2001:db8::6
-last_usable 2001:db8::6
-octets 32 1 13 184 0 0 0 0 0 0 0 0 0 0 0 6
-size 1
-uint128 42540766411282592856903984951653826566
-DialPacket "udp6" "[2001:db8::6]:22"
-DialStream "tcp6" "[2001:db8::6]:22"
-ListenPacket "udp6" "[2001:db8::6]:22"
-ListenStream "tcp6" "[2001:db8::6]:22"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-07.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-07.out
deleted file mode 100644
index 32a3949df..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-07.out
+++ /dev/null
@@ -1,19 +0,0 @@
-type IPv6
-string [2001:db8::7]:22
-host [2001:db8::7]:22
-address 2001:db8::7
-port 22
-netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
-network 2001:db8::7
-mask_bits 128
-binary 00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111
-hex 20010db8000000000000000000000007
-first_usable 2001:db8::7
-last_usable 2001:db8::7
-octets 32 1 13 184 0 0 0 0 0 0 0 0 0 0 0 7
-size 1
-uint128 42540766411282592856903984951653826567
-DialPacket "udp6" "[2001:db8::7]:22"
-DialStream "tcp6" "[2001:db8::7]:22"
-ListenPacket "udp6" "[2001:db8::7]:22"
-ListenStream "tcp6" "[2001:db8::7]:22"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-08.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-08.out
deleted file mode 100644
index faff939a1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-08.out
+++ /dev/null
@@ -1,3 +0,0 @@
-Attribute Value
-type IPv6
-string [2001:db8::8]:22
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-09.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-09.out
deleted file mode 100644
index 20ffe53ef..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-09.out
+++ /dev/null
@@ -1,3 +0,0 @@
-Value
-IPv6
-[2001:db8::8]:22
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-10.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-10.out
deleted file mode 100644
index 3ffcbb817..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-10.out
+++ /dev/null
@@ -1,2 +0,0 @@
-IPv6
-[2001:db8::8]:22
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-11.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-11.out
deleted file mode 100644
index 9b8c9aed2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-11.out
+++ /dev/null
@@ -1,63 +0,0 @@
-Attribute Value
-type IPv4
-string 192.168.0.1
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.255.255
-network 192.168.0.1
-mask_bits 32
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.0.1
-octets 192 168 0 1
-size 1
-broadcast 192.168.0.1
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" "192.168.0.1:0"
-ListenStream "tcp4" "192.168.0.1:0"
-Attribute Value
-type IPv4
-string 192.168.0.1
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.255.255
-network 192.168.0.1
-mask_bits 32
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.0.1
-octets 192 168 0 1
-size 1
-broadcast 192.168.0.1
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" "192.168.0.1:0"
-ListenStream "tcp4" "192.168.0.1:0"
-Attribute Value
-type IPv4
-string 192.168.0.1
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.255.255
-network 192.168.0.1
-mask_bits 32
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.0.1
-octets 192 168 0 1
-size 1
-broadcast 192.168.0.1
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" "192.168.0.1:0"
-ListenStream "tcp4" "192.168.0.1:0"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-12.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-12.out
deleted file mode 100644
index 1f404616f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-12.out
+++ /dev/null
@@ -1,63 +0,0 @@
-Attribute Value
-type IPv4
-string 192.168.0.1/16
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.0.0
-network 192.168.0.0
-mask_bits 16
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.255.254
-octets 192 168 0 1
-size 65536
-broadcast 192.168.255.255
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
-Attribute Value
-type IPv4
-string 192.168.0.1/16
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.0.0
-network 192.168.0.0
-mask_bits 16
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.255.254
-octets 192 168 0 1
-size 65536
-broadcast 192.168.255.255
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
-Attribute Value
-type IPv4
-string 192.168.0.1/16
-host 192.168.0.1
-address 192.168.0.1
-port 0
-netmask 255.255.0.0
-network 192.168.0.0
-mask_bits 16
-binary 11000000101010000000000000000001
-hex c0a80001
-first_usable 192.168.0.1
-last_usable 192.168.255.254
-octets 192 168 0 1
-size 65536
-broadcast 192.168.255.255
-uint32 3232235521
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-13.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-13.out
deleted file mode 100644
index 0d9000f20..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-13.out
+++ /dev/null
@@ -1,62 +0,0 @@
-Attribute Value
-type IPv4
-string 0.0.0.0/1
-host 0.0.0.0
-address 0.0.0.0
-port 0
-netmask 128.0.0.0
-network 0.0.0.0
-mask_bits 1
-binary 00000000000000000000000000000000
-hex 00000000
-first_usable 0.0.0.1
-last_usable 127.255.255.254
-octets 0 0 0 0
-size 2147483648
-broadcast 127.255.255.255
-uint32 0
-DialPacket "udp4" ""
-DialStream "tcp4" ""
-ListenPacket "udp4" ""
-ListenStream "tcp4" ""
-Unable to parse "0:0:0:0:0:0::/97": Unable to convert 0:0:0:0:0:0::/97 to an IPv4 address
-Attribute Value
-type IPv6
-string ::/97
-host ::
-address ::
-port 0
-netmask ffff:ffff:ffff:ffff:ffff:ffff:8000:0
-network ::
-mask_bits 97
-binary 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-hex 00000000000000000000000000000000
-first_usable ::
-last_usable ::7fff:ffff
-octets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-size 2147483648
-uint128 0
-DialPacket "udp6" ""
-DialStream "tcp6" ""
-ListenPacket "udp6" ""
-ListenStream "tcp6" ""
-Attribute Value
-type IPv6
-string ::/97
-host ::
-address ::
-port 0
-netmask ffff:ffff:ffff:ffff:ffff:ffff:8000:0
-network ::
-mask_bits 97
-binary 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-hex 00000000000000000000000000000000
-first_usable ::
-last_usable ::7fff:ffff
-octets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-size 2147483648
-uint128 0
-DialPacket "udp6" ""
-DialStream "tcp6" ""
-ListenPacket "udp6" ""
-ListenStream "tcp6" ""
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-14.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-14.out
deleted file mode 100644
index 91756c359..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_dump-14.out
+++ /dev/null
@@ -1 +0,0 @@
-Unable to parse "::c0a8:1": Unable to string convert "::c0a8:1" to an IPv4 address
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-00-help.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-00-help.out
deleted file mode 100644
index 89247bfc2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-00-help.out
+++ /dev/null
@@ -1,19 +0,0 @@
-Usage: sockaddr eval [options] [template ...]
-
- Parse the sockaddr template and evaluates the output.
-
- The `sockaddr` library has the potential to be very complex,
- which is why the `sockaddr` command supports an `eval`
- subcommand in order to test configurations from the command
- line. The `eval` subcommand automatically wraps its input
- with the `{{` and `}}` template delimiters unless the `-r`
- command is specified, in which case `eval` parses the raw
- input. If the `template` argument passed to `eval` is a
- dash (`-`), then `sockaddr eval` will read from stdin and
- automatically sets the `-r` flag.
-
-Options:
-
- -d Debug output
- -n Suppress newlines between args
- -r Suppress wrapping the input with {{ }} delimiters
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-01.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-01.out
deleted file mode 100644
index 67b5c0bd1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-01.out
+++ /dev/null
@@ -1 +0,0 @@
-[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-02.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-02.out
deleted file mode 100644
index b8acd1fac..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-02.out
+++ /dev/null
@@ -1,2 +0,0 @@
-[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]
-[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-03.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-03.out
deleted file mode 100644
index cbfd44e55..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-03.out
+++ /dev/null
@@ -1 +0,0 @@
-::1 fe80::1
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-04.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-04.out
deleted file mode 100644
index a944e97c6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-04.out
+++ /dev/null
@@ -1,2 +0,0 @@
-[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]
-
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-05.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-05.out
deleted file mode 100644
index fc8b8bbab..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_eval-05.out
+++ /dev/null
@@ -1 +0,0 @@
-up|broadcast|multicast
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-00.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-00.out
deleted file mode 100644
index 82f4f4e13..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-00.out
+++ /dev/null
@@ -1,13 +0,0 @@
-Usage: sockaddr rfc [RFC Number] [IP Address]
-
- Tests a given IP address to see if it is part of a known
- RFC. If the IP address belongs to a known RFC, return exit
- code 0 and print the status. If the IP does not belong to
- an RFC, return 1. If the RFC is not known, return 2.
-
-Options:
-
- -s Silent, only return different exit codes
-
-Subcommands:
- list Lists all known RFCs
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-01.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-01.out
deleted file mode 100644
index 82f4f4e13..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc-01.out
+++ /dev/null
@@ -1,13 +0,0 @@
-Usage: sockaddr rfc [RFC Number] [IP Address]
-
- Tests a given IP address to see if it is part of a known
- RFC. If the IP address belongs to a known RFC, return exit
- code 0 and print the status. If the IP does not belong to
- an RFC, return 1. If the RFC is not known, return 2.
-
-Options:
-
- -s Silent, only return different exit codes
-
-Subcommands:
- list Lists all known RFCs
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-00.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-00.out
deleted file mode 100644
index 229a81023..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-00.out
+++ /dev/null
@@ -1,3 +0,0 @@
-Usage: sockaddr rfc list
-
- Lists all known RFCs.
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-01.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-01.out
deleted file mode 100644
index 3f9ead214..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-01.out
+++ /dev/null
@@ -1,28 +0,0 @@
-919
-1112
-1122
-1918
-2544
-2765
-2928
-3056
-3068
-3171
-3330
-3849
-3927
-4038
-4193
-4291
-4380
-4773
-4843
-5180
-5735
-5737
-6052
-6333
-6598
-6666
-6890
-7335
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-02.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-02.out
deleted file mode 100644
index 229a81023..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_rfc_list-02.out
+++ /dev/null
@@ -1,3 +0,0 @@
-Usage: sockaddr rfc list
-
- Lists all known RFCs.
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-00.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-00.out
deleted file mode 100644
index f5bbd70b2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-00.out
+++ /dev/null
@@ -1 +0,0 @@
-sockaddr 0.1.0-dev
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-01.out b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-01.out
deleted file mode 100644
index f5bbd70b2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/expected/sockaddr_version-01.out
+++ /dev/null
@@ -1 +0,0 @@
-sockaddr 0.1.0-dev
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_all.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_all.sh
deleted file mode 100755
index 9fa39ee9e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_all.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh --
-
-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`
-set -e
-set -u
-
-num_cpus=$(getconf NPROCESSORS_ONLN)
-set +e
-${FIND} . -maxdepth 1 -name 'test_*.sh' -print0 | ${XARGS} -0 -n1 -P${num_cpus} ./run_one.sh
-set -e
-
-# rune_one.sh generates the .diff files
-diffs=$(find . -name '*.diff')
-if [ -z "${diffs}" ]; then
- exit 0
-fi
-
-printf "The following tests failed (check the respective .diff file for details):\n\n"
-for d in ${diffs}; do
- printf "\t%s\n" "$(basename ${d} .diff)"
-done
-exit 1
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_one.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_one.sh
deleted file mode 100755
index b2166440c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_one.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh -e -u --
-
-set -e
-set -u
-
-verbose=""
-if [ "$1" = "-v" ]; then
- verbose="true"
- shift
-fi
-
-if [ $# -ne 1 ]; then
- printf "Usage: %s [ test script ]\n\n" "$(basename $0)"
- printf "ERROR: Need a single test script to execute\n"
- exit 1
-fi
-
-# chdir(2) to the directory where the script resides
-cd "$(dirname "$0")"
-
-exact_name="$(basename ${1} .sh)"
-test_name="$(echo ${exact_name} | sed -e s@^test_@@)"
-test_script="${exact_name}.sh"
-test_out="${test_name}.out"
-expected_out="expected/${test_name}.out"
-
-if [ ! -r "${test_script}" ]; then
- printf "ERROR: Test script %s does not exist\n" "${test_script}"
- exit 2
-fi
-
-if [ -n "${verbose}" ]; then
- cat "${test_script}" | tail -n 1
-fi
-
-set +e
-"./${test_script}" > "${test_out}" 2>&1
-
-if [ ! -r "${expected_out}" ]; then
- printf "ERROR: Expected test output (%s) does not exist\n" "${expected_out}"
- exit 2
-fi
-
-cmp -s "${expected_out}" "${test_out}"
-result=$?
-set -e
-
-if [ "${result}" -eq 0 ]; then
- if [ -n "${verbose}" ]; then
- cat "${test_out}"
- fi
- rm -f "${test_out}"
- exit 0
-fi
-
-diff_out="${test_name}.diff"
-set +e
-diff -u "${test_out}" "${expected_out}" > "${diff_out}"
-set -e
-
-# If run as an interactive TTY, pass along the diff to the caller
-if [ -t 0 -o -n "${verbose}" ]; then
- cat "${diff_out}"
-fi
-
-exit 1
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr.sh
deleted file mode 100755
index 818e7a370..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-00-help.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-00-help.sh
deleted file mode 100755
index d28d4bb5c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-00-help.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-01.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-01.sh
deleted file mode 100755
index c157a6e93..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-01.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump 127.0.0.1
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-02.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-02.sh
deleted file mode 100755
index 47d700c12..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-02.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump 127.0.0.2/8
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-03.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-03.sh
deleted file mode 100755
index 30b8d804d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-03.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump '[2001:db8::3]'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-04.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-04.sh
deleted file mode 100755
index 721384c6d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-04.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump '2001:db8::4/64'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-05.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-05.sh
deleted file mode 100755
index 298454e82..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-05.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump /tmp/example
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-06.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-06.sh
deleted file mode 100755
index b9ec1ac98..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-06.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump '[2001:db8::6]:22'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-07.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-07.sh
deleted file mode 100755
index ff8614e95..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-07.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump -H '[2001:db8::7]:22'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-08.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-08.sh
deleted file mode 100755
index c837a3c6c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-08.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump -o string,type '[2001:db8::8]:22'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-09.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-09.sh
deleted file mode 100755
index 9d2740caa..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-09.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump -n -o string,type '[2001:db8::8]:22'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-10.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-10.sh
deleted file mode 100755
index 203b31bf8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-10.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr dump -H -n -o string,type '[2001:db8::8]:22'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-11.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-11.sh
deleted file mode 100755
index f1c7322ad..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-11.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-# Verified via: cat sockaddr_dump-11.out | sort | uniq -c
-../sockaddr dump '192.168.0.1'
-../sockaddr dump '::ffff:192.168.0.1'
-../sockaddr dump '0:0:0:0:0:ffff:192.168.0.1'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-12.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-12.sh
deleted file mode 100755
index feb5816ac..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-12.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-# Verified via: cat sockaddr_dump-12.out | sort | uniq -c
-../sockaddr dump '192.168.0.1/16'
-../sockaddr dump '::ffff:192.168.0.1/112'
-../sockaddr dump '0:0:0:0:0:ffff:192.168.0.1/112'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-13.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-13.sh
deleted file mode 100755
index d4348a770..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-13.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh --
-
-exec 2>&1
-# This should succeed because it is a mapped address
-../sockaddr dump -4 '0:0:0:0:0:ffff::/97'
-
-# This should fail even though it is an IPv4 compatible address
-../sockaddr dump -4 '0:0:0:0:0:0::/97'
-
-# These should succeed as an IPv6 addresses
-../sockaddr dump -6 '0:0:0:0:0:0::/97'
-../sockaddr dump -i '0:0:0:0:0:0::/97'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-14.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-14.sh
deleted file mode 100755
index c238e14d8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_dump-14.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-../sockaddr dump -4 '::c0a8:1'
-../sockaddr dump -6 '::c0a8:1'
-../sockaddr dump -4 '::c0a8:1/112'
-../sockaddr dump -6 '::c0a8:1/112'
-../sockaddr dump -4 '0:0:0:0:0:ffff:c0a8:1/112'
-../sockaddr dump -6 '0:0:0:0:0:ffff:c0a8:1/112'
-../sockaddr dump -4 '[0:0:0:0:0:ffff:c0a8:1/112]'
-../sockaddr dump -6 '[0:0:0:0:0:ffff:c0a8:1/112]'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-00-help.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-00-help.sh
deleted file mode 100755
index de444b9c5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-00-help.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr eval
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-01.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-01.sh
deleted file mode 100755
index e3cf5c321..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-01.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr eval 'GetAllInterfaces | include "name" "lo0" | printf "%v"'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-02.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-02.sh
deleted file mode 100755
index 8f91dd835..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-02.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr eval 'GetAllInterfaces | include "name" "lo0" | printf "%v"' 'GetAllInterfaces | include "name" "lo0" | printf "%v"'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-03.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-03.sh
deleted file mode 100755
index 63e85aea3..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-03.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr eval '. | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "address" " "'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-04.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-04.sh
deleted file mode 100755
index 68bac5b64..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-04.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-cat <<'EOF' | exec ../sockaddr eval -
-{{GetAllInterfaces | include "name" "lo0" | printf "%v"}}
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-05.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-05.sh
deleted file mode 100755
index 1ac5cdd8f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_eval-05.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-../sockaddr eval 'GetPrivateInterfaces | include "flags" "up|multicast" | attr "flags"'
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-00.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-00.sh
deleted file mode 100755
index 6477e7eb3..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-00.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr -h rfc
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-01.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-01.sh
deleted file mode 100755
index 5837744a3..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc-01.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr rfc -h list
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-00.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-00.sh
deleted file mode 100755
index 652bf1959..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-00.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr -h rfc list
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-01.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-01.sh
deleted file mode 100755
index 22a61ef89..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-01.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr rfc list
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-02.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-02.sh
deleted file mode 100755
index a7fa19451..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_rfc_list-02.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr rfc list -h
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-00.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-00.sh
deleted file mode 100755
index 793a80b1b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-00.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr version
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-01.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-01.sh
deleted file mode 100755
index 793a80b1b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/test_sockaddr_version-01.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh --
-
-set -e
-exec 2>&1
-exec ../sockaddr version
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/LICENSE
deleted file mode 100644
index a5df10e67..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Armon Dadgar
-
-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-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/README.md
deleted file mode 100644
index 26f42a283..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-go-radix [![Build Status](https://travis-ci.org/armon/go-radix.png)](https://travis-ci.org/armon/go-radix)
-=========
-
-Provides the `radix` package that implements a [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
-
-For an immutable variant, see [go-immutable-radix](https://github.com/hashicorp/go-immutable-radix).
-
-Documentation
-=============
-
-The full documentation is available on [Godoc](http://godoc.org/github.com/armon/go-radix).
-
-Example
-=======
-
-Below is a simple example of usage
-
-```go
-// Create a tree
-r := radix.New()
-r.Insert("foo", 1)
-r.Insert("bar", 2)
-r.Insert("foobar", 2)
-
-// Find the longest prefix match
-m, _, _ := r.LongestPrefix("foozip")
-if m != "foo" {
- panic("should be foo")
-}
-```
-
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/radix.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/radix.go
deleted file mode 100644
index d2914c13b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/armon/go-radix/radix.go
+++ /dev/null
@@ -1,496 +0,0 @@
-package radix
-
-import (
- "sort"
- "strings"
-)
-
-// WalkFn is used when walking the tree. Takes a
-// key and value, returning if iteration should
-// be terminated.
-type WalkFn func(s string, v interface{}) bool
-
-// leafNode is used to represent a value
-type leafNode struct {
- key string
- val interface{}
-}
-
-// edge is used to represent an edge node
-type edge struct {
- label byte
- node *node
-}
-
-type node struct {
- // leaf is used to store possible leaf
- leaf *leafNode
-
- // prefix is the common prefix we ignore
- prefix string
-
- // Edges should be stored in-order for iteration.
- // We avoid a fully materialized slice to save memory,
- // since in most cases we expect to be sparse
- edges edges
-}
-
-func (n *node) isLeaf() bool {
- return n.leaf != nil
-}
-
-func (n *node) addEdge(e edge) {
- n.edges = append(n.edges, e)
- n.edges.Sort()
-}
-
-func (n *node) replaceEdge(e edge) {
- num := len(n.edges)
- idx := sort.Search(num, func(i int) bool {
- return n.edges[i].label >= e.label
- })
- if idx < num && n.edges[idx].label == e.label {
- n.edges[idx].node = e.node
- return
- }
- panic("replacing missing edge")
-}
-
-func (n *node) getEdge(label byte) *node {
- num := len(n.edges)
- idx := sort.Search(num, func(i int) bool {
- return n.edges[i].label >= label
- })
- if idx < num && n.edges[idx].label == label {
- return n.edges[idx].node
- }
- return nil
-}
-
-func (n *node) delEdge(label byte) {
- num := len(n.edges)
- idx := sort.Search(num, func(i int) bool {
- return n.edges[i].label >= label
- })
- if idx < num && n.edges[idx].label == label {
- copy(n.edges[idx:], n.edges[idx+1:])
- n.edges[len(n.edges)-1] = edge{}
- n.edges = n.edges[:len(n.edges)-1]
- }
-}
-
-type edges []edge
-
-func (e edges) Len() int {
- return len(e)
-}
-
-func (e edges) Less(i, j int) bool {
- return e[i].label < e[j].label
-}
-
-func (e edges) Swap(i, j int) {
- e[i], e[j] = e[j], e[i]
-}
-
-func (e edges) Sort() {
- sort.Sort(e)
-}
-
-// Tree implements a radix tree. This can be treated as a
-// Dictionary abstract data type. The main advantage over
-// a standard hash map is prefix-based lookups and
-// ordered iteration,
-type Tree struct {
- root *node
- size int
-}
-
-// New returns an empty Tree
-func New() *Tree {
- return NewFromMap(nil)
-}
-
-// NewFromMap returns a new tree containing the keys
-// from an existing map
-func NewFromMap(m map[string]interface{}) *Tree {
- t := &Tree{root: &node{}}
- for k, v := range m {
- t.Insert(k, v)
- }
- return t
-}
-
-// Len is used to return the number of elements in the tree
-func (t *Tree) Len() int {
- return t.size
-}
-
-// longestPrefix finds the length of the shared prefix
-// of two strings
-func longestPrefix(k1, k2 string) int {
- max := len(k1)
- if l := len(k2); l < max {
- max = l
- }
- var i int
- for i = 0; i < max; i++ {
- if k1[i] != k2[i] {
- break
- }
- }
- return i
-}
-
-// Insert is used to add a newentry or update
-// an existing entry. Returns if updated.
-func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) {
- var parent *node
- n := t.root
- search := s
- for {
- // Handle key exhaution
- if len(search) == 0 {
- if n.isLeaf() {
- old := n.leaf.val
- n.leaf.val = v
- return old, true
- }
-
- n.leaf = &leafNode{
- key: s,
- val: v,
- }
- t.size++
- return nil, false
- }
-
- // Look for the edge
- parent = n
- n = n.getEdge(search[0])
-
- // No edge, create one
- if n == nil {
- e := edge{
- label: search[0],
- node: &node{
- leaf: &leafNode{
- key: s,
- val: v,
- },
- prefix: search,
- },
- }
- parent.addEdge(e)
- t.size++
- return nil, false
- }
-
- // Determine longest prefix of the search key on match
- commonPrefix := longestPrefix(search, n.prefix)
- if commonPrefix == len(n.prefix) {
- search = search[commonPrefix:]
- continue
- }
-
- // Split the node
- t.size++
- child := &node{
- prefix: search[:commonPrefix],
- }
- parent.replaceEdge(edge{
- label: search[0],
- node: child,
- })
-
- // Restore the existing node
- child.addEdge(edge{
- label: n.prefix[commonPrefix],
- node: n,
- })
- n.prefix = n.prefix[commonPrefix:]
-
- // Create a new leaf node
- leaf := &leafNode{
- key: s,
- val: v,
- }
-
- // If the new key is a subset, add to to this node
- search = search[commonPrefix:]
- if len(search) == 0 {
- child.leaf = leaf
- return nil, false
- }
-
- // Create a new edge for the node
- child.addEdge(edge{
- label: search[0],
- node: &node{
- leaf: leaf,
- prefix: search,
- },
- })
- return nil, false
- }
-}
-
-// Delete is used to delete a key, returning the previous
-// value and if it was deleted
-func (t *Tree) Delete(s string) (interface{}, bool) {
- var parent *node
- var label byte
- n := t.root
- search := s
- for {
- // Check for key exhaution
- if len(search) == 0 {
- if !n.isLeaf() {
- break
- }
- goto DELETE
- }
-
- // Look for an edge
- parent = n
- label = search[0]
- n = n.getEdge(label)
- if n == nil {
- break
- }
-
- // Consume the search prefix
- if strings.HasPrefix(search, n.prefix) {
- search = search[len(n.prefix):]
- } else {
- break
- }
- }
- return nil, false
-
-DELETE:
- // Delete the leaf
- leaf := n.leaf
- n.leaf = nil
- t.size--
-
- // Check if we should delete this node from the parent
- if parent != nil && len(n.edges) == 0 {
- parent.delEdge(label)
- }
-
- // Check if we should merge this node
- if n != t.root && len(n.edges) == 1 {
- n.mergeChild()
- }
-
- // Check if we should merge the parent's other child
- if parent != nil && parent != t.root && len(parent.edges) == 1 && !parent.isLeaf() {
- parent.mergeChild()
- }
-
- return leaf.val, true
-}
-
-func (n *node) mergeChild() {
- e := n.edges[0]
- child := e.node
- n.prefix = n.prefix + child.prefix
- n.leaf = child.leaf
- n.edges = child.edges
-}
-
-// Get is used to lookup a specific key, returning
-// the value and if it was found
-func (t *Tree) Get(s string) (interface{}, bool) {
- n := t.root
- search := s
- for {
- // Check for key exhaution
- if len(search) == 0 {
- if n.isLeaf() {
- return n.leaf.val, true
- }
- break
- }
-
- // Look for an edge
- n = n.getEdge(search[0])
- if n == nil {
- break
- }
-
- // Consume the search prefix
- if strings.HasPrefix(search, n.prefix) {
- search = search[len(n.prefix):]
- } else {
- break
- }
- }
- return nil, false
-}
-
-// LongestPrefix is like Get, but instead of an
-// exact match, it will return the longest prefix match.
-func (t *Tree) LongestPrefix(s string) (string, interface{}, bool) {
- var last *leafNode
- n := t.root
- search := s
- for {
- // Look for a leaf node
- if n.isLeaf() {
- last = n.leaf
- }
-
- // Check for key exhaution
- if len(search) == 0 {
- break
- }
-
- // Look for an edge
- n = n.getEdge(search[0])
- if n == nil {
- break
- }
-
- // Consume the search prefix
- if strings.HasPrefix(search, n.prefix) {
- search = search[len(n.prefix):]
- } else {
- break
- }
- }
- if last != nil {
- return last.key, last.val, true
- }
- return "", nil, false
-}
-
-// Minimum is used to return the minimum value in the tree
-func (t *Tree) Minimum() (string, interface{}, bool) {
- n := t.root
- for {
- if n.isLeaf() {
- return n.leaf.key, n.leaf.val, true
- }
- if len(n.edges) > 0 {
- n = n.edges[0].node
- } else {
- break
- }
- }
- return "", nil, false
-}
-
-// Maximum is used to return the maximum value in the tree
-func (t *Tree) Maximum() (string, interface{}, bool) {
- n := t.root
- for {
- if num := len(n.edges); num > 0 {
- n = n.edges[num-1].node
- continue
- }
- if n.isLeaf() {
- return n.leaf.key, n.leaf.val, true
- }
- break
- }
- return "", nil, false
-}
-
-// Walk is used to walk the tree
-func (t *Tree) Walk(fn WalkFn) {
- recursiveWalk(t.root, fn)
-}
-
-// WalkPrefix is used to walk the tree under a prefix
-func (t *Tree) WalkPrefix(prefix string, fn WalkFn) {
- n := t.root
- search := prefix
- for {
- // Check for key exhaution
- if len(search) == 0 {
- recursiveWalk(n, fn)
- return
- }
-
- // Look for an edge
- n = n.getEdge(search[0])
- if n == nil {
- break
- }
-
- // Consume the search prefix
- if strings.HasPrefix(search, n.prefix) {
- search = search[len(n.prefix):]
-
- } else if strings.HasPrefix(n.prefix, search) {
- // Child may be under our search prefix
- recursiveWalk(n, fn)
- return
- } else {
- break
- }
- }
-
-}
-
-// WalkPath is used to walk the tree, but only visiting nodes
-// from the root down to a given leaf. Where WalkPrefix walks
-// all the entries *under* the given prefix, this walks the
-// entries *above* the given prefix.
-func (t *Tree) WalkPath(path string, fn WalkFn) {
- n := t.root
- search := path
- for {
- // Visit the leaf values if any
- if n.leaf != nil && fn(n.leaf.key, n.leaf.val) {
- return
- }
-
- // Check for key exhaution
- if len(search) == 0 {
- return
- }
-
- // Look for an edge
- n = n.getEdge(search[0])
- if n == nil {
- return
- }
-
- // Consume the search prefix
- if strings.HasPrefix(search, n.prefix) {
- search = search[len(n.prefix):]
- } else {
- break
- }
- }
-}
-
-// recursiveWalk is used to do a pre-order walk of a node
-// recursively. Returns true if the walk should be aborted
-func recursiveWalk(n *node, fn WalkFn) bool {
- // Visit the leaf values if any
- if n.leaf != nil && fn(n.leaf.key, n.leaf.val) {
- return true
- }
-
- // Recurse on the children
- for _, e := range n.edges {
- if recursiveWalk(e.node, fn) {
- return true
- }
- }
- return false
-}
-
-// ToMap is used to walk the tree and convert it into a map
-func (t *Tree) ToMap() map[string]interface{} {
- out := make(map[string]interface{}, t.size)
- t.Walk(func(k string, v interface{}) bool {
- out[k] = v
- return false
- })
- return out
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/LICENSE_WINDOWS b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/LICENSE_WINDOWS
deleted file mode 100644
index ff177f612..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/LICENSE_WINDOWS
+++ /dev/null
@@ -1,201 +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 [2013] [the CloudFoundry Authors]
-
-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/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/Readme.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/Readme.md
deleted file mode 100644
index fceda7518..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/Readme.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Speakeasy
-
-This package provides cross-platform Go (#golang) helpers for taking user input
-from the terminal while not echoing the input back (similar to `getpasswd`). The
-package uses syscalls to avoid any dependence on cgo, and is therefore
-compatible with cross-compiling.
-
-[![GoDoc](https://godoc.org/github.com/bgentry/speakeasy?status.png)][godoc]
-
-## Unicode
-
-Multi-byte unicode characters work successfully on Mac OS X. On Windows,
-however, this may be problematic (as is UTF in general on Windows). Other
-platforms have not been tested.
-
-## License
-
-The code herein was not written by me, but was compiled from two separate open
-source packages. Unix portions were imported from [gopass][gopass], while
-Windows portions were imported from the [CloudFoundry Go CLI][cf-cli]'s
-[Windows terminal helpers][cf-ui-windows].
-
-The [license for the windows portion](./LICENSE_WINDOWS) has been copied exactly
-from the source (though I attempted to fill in the correct owner in the
-boilerplate copyright notice).
-
-[cf-cli]: https://github.com/cloudfoundry/cli "CloudFoundry Go CLI"
-[cf-ui-windows]: https://github.com/cloudfoundry/cli/blob/master/src/cf/terminal/ui_windows.go "CloudFoundry Go CLI Windows input helpers"
-[godoc]: https://godoc.org/github.com/bgentry/speakeasy "speakeasy on Godoc.org"
-[gopass]: https://code.google.com/p/gopass "gopass"
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy.go
deleted file mode 100644
index 71c1dd1b9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package speakeasy
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
-)
-
-// Ask the user to enter a password with input hidden. prompt is a string to
-// display before the user's input. Returns the provided password, or an error
-// if the command failed.
-func Ask(prompt string) (password string, err error) {
- return FAsk(os.Stdout, prompt)
-}
-
-// FAsk is the same as Ask, except it is possible to specify the file to write
-// the prompt to. If 'nil' is passed as the writer, no prompt will be written.
-func FAsk(wr io.Writer, prompt string) (password string, err error) {
- if wr != nil && prompt != "" {
- fmt.Fprint(wr, prompt) // Display the prompt.
- }
- password, err = getPassword()
-
- // Carriage return after the user input.
- if wr != nil {
- fmt.Fprintln(wr, "")
- }
- return
-}
-
-func readline() (value string, err error) {
- var valb []byte
- var n int
- b := make([]byte, 1)
- for {
- // read one byte at a time so we don't accidentally read extra bytes
- n, err = os.Stdin.Read(b)
- if err != nil && err != io.EOF {
- return "", err
- }
- if n == 0 || b[0] == '\n' {
- break
- }
- valb = append(valb, b[0])
- }
-
- return strings.TrimSuffix(string(valb), "\r"), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go
deleted file mode 100644
index d99fda191..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// based on https://code.google.com/p/gopass
-// Author: johnsiilver@gmail.com (John Doak)
-//
-// Original code is based on code by RogerV in the golang-nuts thread:
-// https://groups.google.com/group/golang-nuts/browse_thread/thread/40cc41e9d9fc9247
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package speakeasy
-
-import (
- "fmt"
- "os"
- "os/signal"
- "strings"
- "syscall"
-)
-
-const sttyArg0 = "/bin/stty"
-
-var (
- sttyArgvEOff = []string{"stty", "-echo"}
- sttyArgvEOn = []string{"stty", "echo"}
-)
-
-// getPassword gets input hidden from the terminal from a user. This is
-// accomplished by turning off terminal echo, reading input from the user and
-// finally turning on terminal echo.
-func getPassword() (password string, err error) {
- sig := make(chan os.Signal, 10)
- brk := make(chan bool)
-
- // File descriptors for stdin, stdout, and stderr.
- fd := []uintptr{os.Stdin.Fd(), os.Stdout.Fd(), os.Stderr.Fd()}
-
- // Setup notifications of termination signals to channel sig, create a process to
- // watch for these signals so we can turn back on echo if need be.
- signal.Notify(sig, syscall.SIGHUP, syscall.SIGINT, syscall.SIGKILL, syscall.SIGQUIT,
- syscall.SIGTERM)
- go catchSignal(fd, sig, brk)
-
- // Turn off the terminal echo.
- pid, err := echoOff(fd)
- if err != nil {
- return "", err
- }
-
- // Turn on the terminal echo and stop listening for signals.
- defer signal.Stop(sig)
- defer close(brk)
- defer echoOn(fd)
-
- syscall.Wait4(pid, nil, 0, nil)
-
- line, err := readline()
- if err == nil {
- password = strings.TrimSpace(line)
- } else {
- err = fmt.Errorf("failed during password entry: %s", err)
- }
-
- return password, err
-}
-
-// echoOff turns off the terminal echo.
-func echoOff(fd []uintptr) (int, error) {
- pid, err := syscall.ForkExec(sttyArg0, sttyArgvEOff, &syscall.ProcAttr{Dir: "", Files: fd})
- if err != nil {
- return 0, fmt.Errorf("failed turning off console echo for password entry:\n\t%s", err)
- }
- return pid, nil
-}
-
-// echoOn turns back on the terminal echo.
-func echoOn(fd []uintptr) {
- // Turn on the terminal echo.
- pid, e := syscall.ForkExec(sttyArg0, sttyArgvEOn, &syscall.ProcAttr{Dir: "", Files: fd})
- if e == nil {
- syscall.Wait4(pid, nil, 0, nil)
- }
-}
-
-// catchSignal tries to catch SIGKILL, SIGQUIT and SIGINT so that we can turn
-// terminal echo back on before the program ends. Otherwise the user is left
-// with echo off on their terminal.
-func catchSignal(fd []uintptr, sig chan os.Signal, brk chan bool) {
- select {
- case <-sig:
- echoOn(fd)
- os.Exit(-1)
- case <-brk:
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go
deleted file mode 100644
index c2093a809..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// +build windows
-
-package speakeasy
-
-import (
- "syscall"
-)
-
-// SetConsoleMode function can be used to change value of ENABLE_ECHO_INPUT:
-// http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx
-const ENABLE_ECHO_INPUT = 0x0004
-
-func getPassword() (password string, err error) {
- var oldMode uint32
-
- err = syscall.GetConsoleMode(syscall.Stdin, &oldMode)
- if err != nil {
- return
- }
-
- var newMode uint32 = (oldMode &^ ENABLE_ECHO_INPUT)
-
- err = setConsoleMode(syscall.Stdin, newMode)
- defer setConsoleMode(syscall.Stdin, oldMode)
- if err != nil {
- return
- }
-
- return readline()
-}
-
-func setConsoleMode(console syscall.Handle, mode uint32) (err error) {
- dll := syscall.MustLoadDLL("kernel32")
- proc := dll.MustFindProc("SetConsoleMode")
- r, _, err := proc.Call(uintptr(console), uintptr(mode))
-
- if r == 0 {
- return err
- }
- return nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/LICENSE
deleted file mode 100644
index c33dcc7c9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/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/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/errwrap.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/errwrap.go
deleted file mode 100644
index a733bef18..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/hashicorp/errwrap/errwrap.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Package errwrap implements methods to formalize error wrapping in Go.
-//
-// All of the top-level functions that take an `error` are built to be able
-// to take any error, not just wrapped errors. This allows you to use errwrap
-// without having to type-check and type-cast everywhere.
-package errwrap
-
-import (
- "errors"
- "reflect"
- "strings"
-)
-
-// WalkFunc is the callback called for Walk.
-type WalkFunc func(error)
-
-// Wrapper is an interface that can be implemented by custom types to
-// have all the Contains, Get, etc. functions in errwrap work.
-//
-// When Walk reaches a Wrapper, it will call the callback for every
-// wrapped error in addition to the wrapper itself. Since all the top-level
-// functions in errwrap use Walk, this means that all those functions work
-// with your custom type.
-type Wrapper interface {
- WrappedErrors() []error
-}
-
-// Wrap defines that outer wraps inner, returning an error type that
-// can be cleanly used with the other methods in this package, such as
-// Contains, GetAll, etc.
-//
-// This function won't modify the error message at all (the outer message
-// will be used).
-func Wrap(outer, inner error) error {
- return &wrappedError{
- Outer: outer,
- Inner: inner,
- }
-}
-
-// Wrapf wraps an error with a formatting message. This is similar to using
-// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap
-// errors, you should replace it with this.
-//
-// format is the format of the error message. The string '{{err}}' will
-// be replaced with the original error message.
-func Wrapf(format string, err error) error {
- outerMsg := "<nil>"
- if err != nil {
- outerMsg = err.Error()
- }
-
- outer := errors.New(strings.Replace(
- format, "{{err}}", outerMsg, -1))
-
- return Wrap(outer, err)
-}
-
-// Contains checks if the given error contains an error with the
-// message msg. If err is not a wrapped error, this will always return
-// false unless the error itself happens to match this msg.
-func Contains(err error, msg string) bool {
- return len(GetAll(err, msg)) > 0
-}
-
-// ContainsType checks if the given error contains an error with
-// the same concrete type as v. If err is not a wrapped error, this will
-// check the err itself.
-func ContainsType(err error, v interface{}) bool {
- return len(GetAllType(err, v)) > 0
-}
-
-// Get is the same as GetAll but returns the deepest matching error.
-func Get(err error, msg string) error {
- es := GetAll(err, msg)
- if len(es) > 0 {
- return es[len(es)-1]
- }
-
- return nil
-}
-
-// GetType is the same as GetAllType but returns the deepest matching error.
-func GetType(err error, v interface{}) error {
- es := GetAllType(err, v)
- if len(es) > 0 {
- return es[len(es)-1]
- }
-
- return nil
-}
-
-// GetAll gets all the errors that might be wrapped in err with the
-// given message. The order of the errors is such that the outermost
-// matching error (the most recent wrap) is index zero, and so on.
-func GetAll(err error, msg string) []error {
- var result []error
-
- Walk(err, func(err error) {
- if err.Error() == msg {
- result = append(result, err)
- }
- })
-
- return result
-}
-
-// GetAllType gets all the errors that are the same type as v.
-//
-// The order of the return value is the same as described in GetAll.
-func GetAllType(err error, v interface{}) []error {
- var result []error
-
- var search string
- if v != nil {
- search = reflect.TypeOf(v).String()
- }
- Walk(err, func(err error) {
- var needle string
- if err != nil {
- needle = reflect.TypeOf(err).String()
- }
-
- if needle == search {
- result = append(result, err)
- }
- })
-
- return result
-}
-
-// Walk walks all the wrapped errors in err and calls the callback. If
-// err isn't a wrapped error, this will be called once for err. If err
-// is a wrapped error, the callback will be called for both the wrapper
-// that implements error as well as the wrapped error itself.
-func Walk(err error, cb WalkFunc) {
- if err == nil {
- return
- }
-
- switch e := err.(type) {
- case *wrappedError:
- cb(e.Outer)
- Walk(e.Inner, cb)
- case Wrapper:
- cb(err)
-
- for _, err := range e.WrappedErrors() {
- Walk(err, cb)
- }
- default:
- cb(err)
- }
-}
-
-// wrappedError is an implementation of error that has both the
-// outer and inner errors.
-type wrappedError struct {
- Outer error
- Inner error
-}
-
-func (w *wrappedError) Error() string {
- return w.Outer.Error()
-}
-
-func (w *wrappedError) WrappedErrors() []error {
- return []error{w.Outer, w.Inner}
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/LICENSE
deleted file mode 100644
index 65dc692b6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright (c) Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
-
-MIT License (Expat)
-
-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-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/README.md
deleted file mode 100644
index 74845de4a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# go-isatty
-
-isatty for golang
-
-## Usage
-
-```go
-package main
-
-import (
- "fmt"
- "github.com/mattn/go-isatty"
- "os"
-)
-
-func main() {
- if isatty.IsTerminal(os.Stdout.Fd()) {
- fmt.Println("Is Terminal")
- } else {
- fmt.Println("Is Not Terminal")
- }
-}
-```
-
-## Installation
-
-```
-$ go get github.com/mattn/go-isatty
-```
-
-# License
-
-MIT
-
-# Author
-
-Yasuhiro Matsumoto (a.k.a mattn)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/doc.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/doc.go
deleted file mode 100644
index 17d4f90eb..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/doc.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package isatty implements interface to isatty
-package isatty
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_appengine.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_appengine.go
deleted file mode 100644
index 83c588773..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_appengine.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build appengine
-
-package isatty
-
-// IsTerminal returns true if the file descriptor is terminal which
-// is always false on on appengine classic which is a sandboxed PaaS.
-func IsTerminal(fd uintptr) bool {
- return false
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_bsd.go
deleted file mode 100644
index 42f2514d1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_bsd.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build darwin freebsd openbsd netbsd dragonfly
-// +build !appengine
-
-package isatty
-
-import (
- "syscall"
- "unsafe"
-)
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-// IsTerminal return true if the file descriptor is terminal.
-func IsTerminal(fd uintptr) bool {
- var termios syscall.Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_linux.go
deleted file mode 100644
index 9d24bac1d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_linux.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build linux
-// +build !appengine
-
-package isatty
-
-import (
- "syscall"
- "unsafe"
-)
-
-const ioctlReadTermios = syscall.TCGETS
-
-// IsTerminal return true if the file descriptor is terminal.
-func IsTerminal(fd uintptr) bool {
- var termios syscall.Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_solaris.go
deleted file mode 100644
index 1f0c6bf53..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_solaris.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build solaris
-// +build !appengine
-
-package isatty
-
-import (
- "golang.org/x/sys/unix"
-)
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-// see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
-func IsTerminal(fd uintptr) bool {
- var termio unix.Termio
- err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
- return err == nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_windows.go
deleted file mode 100644
index 83c398b16..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mattn/go-isatty/isatty_windows.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build windows
-// +build !appengine
-
-package isatty
-
-import (
- "syscall"
- "unsafe"
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-var procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
-
-// IsTerminal return true if the file descriptor is terminal.
-func IsTerminal(fd uintptr) bool {
- var st uint32
- r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
- return r != 0 && e == 0
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/LICENSE
deleted file mode 100644
index c33dcc7c9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/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/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/Makefile b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/Makefile
deleted file mode 100644
index 4874b0082..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TEST?=./...
-
-default: test
-
-# test runs the test suite and vets the code
-test:
- go list $(TEST) | xargs -n1 go test -timeout=60s -parallel=10 $(TESTARGS)
-
-# testrace runs the race checker
-testrace:
- go list $(TEST) | xargs -n1 go test -race $(TESTARGS)
-
-# updatedeps installs all the dependencies to run and build
-updatedeps:
- go list ./... \
- | xargs go list -f '{{ join .Deps "\n" }}{{ printf "\n" }}{{ join .TestImports "\n" }}' \
- | grep -v github.com/mitchellh/cli \
- | xargs go get -f -u -v
-
-.PHONY: test testrace updatedeps
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md
deleted file mode 100644
index dd211cf0e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Go CLI Library [![GoDoc](https://godoc.org/github.com/mitchellh/cli?status.png)](https://godoc.org/github.com/mitchellh/cli)
-
-cli is a library for implementing powerful command-line interfaces in Go.
-cli is the library that powers the CLI for
-[Packer](https://github.com/mitchellh/packer),
-[Serf](https://github.com/hashicorp/serf),
-[Consul](https://github.com/hashicorp/consul),
-[Vault](https://github.com/hashicorp/vault),
-[Terraform](https://github.com/hashicorp/terraform), and
-[Nomad](https://github.com/hashicorp/nomad).
-
-## Features
-
-* Easy sub-command based CLIs: `cli foo`, `cli bar`, etc.
-
-* Support for nested subcommands such as `cli foo bar`.
-
-* Optional support for default subcommands so `cli` does something
- other than error.
-
-* Automatic help generation for listing subcommands
-
-* Automatic help flag recognition of `-h`, `--help`, etc.
-
-* Automatic version flag recognition of `-v`, `--version`.
-
-* Helpers for interacting with the terminal, such as outputting information,
- asking for input, etc. These are optional, you can always interact with the
- terminal however you choose.
-
-* Use of Go interfaces/types makes augmenting various parts of the library a
- piece of cake.
-
-## Example
-
-Below is a simple example of creating and running a CLI
-
-```go
-package main
-
-import (
- "log"
- "os"
-
- "github.com/mitchellh/cli"
-)
-
-func main() {
- c := cli.NewCLI("app", "1.0.0")
- c.Args = os.Args[1:]
- c.Commands = map[string]cli.CommandFactory{
- "foo": fooCommandFactory,
- "bar": barCommandFactory,
- }
-
- exitStatus, err := c.Run()
- if err != nil {
- log.Println(err)
- }
-
- os.Exit(exitStatus)
-}
-```
-
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go
deleted file mode 100644
index 4a69d176d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go
+++ /dev/null
@@ -1,466 +0,0 @@
-package cli
-
-import (
- "fmt"
- "io"
- "os"
- "regexp"
- "sort"
- "strings"
- "sync"
- "text/template"
-
- "github.com/armon/go-radix"
-)
-
-// CLI contains the state necessary to run subcommands and parse the
-// command line arguments.
-//
-// CLI also supports nested subcommands, such as "cli foo bar". To use
-// nested subcommands, the key in the Commands mapping below contains the
-// full subcommand. In this example, it would be "foo bar".
-//
-// If you use a CLI with nested subcommands, some semantics change due to
-// ambiguities:
-//
-// * We use longest prefix matching to find a matching subcommand. This
-// means if you register "foo bar" and the user executes "cli foo qux",
-// the "foo" command will be executed with the arg "qux". It is up to
-// you to handle these args. One option is to just return the special
-// help return code `RunResultHelp` to display help and exit.
-//
-// * The help flag "-h" or "-help" will look at all args to determine
-// the help function. For example: "otto apps list -h" will show the
-// help for "apps list" but "otto apps -h" will show it for "apps".
-// In the normal CLI, only the first subcommand is used.
-//
-// * The help flag will list any subcommands that a command takes
-// as well as the command's help itself. If there are no subcommands,
-// it will note this. If the CLI itself has no subcommands, this entire
-// section is omitted.
-//
-// * Any parent commands that don't exist are automatically created as
-// no-op commands that just show help for other subcommands. For example,
-// if you only register "foo bar", then "foo" is automatically created.
-//
-type CLI struct {
- // Args is the list of command-line arguments received excluding
- // the name of the app. For example, if the command "./cli foo bar"
- // was invoked, then Args should be []string{"foo", "bar"}.
- Args []string
-
- // Commands is a mapping of subcommand names to a factory function
- // for creating that Command implementation. If there is a command
- // with a blank string "", then it will be used as the default command
- // if no subcommand is specified.
- //
- // If the key has a space in it, this will create a nested subcommand.
- // For example, if the key is "foo bar", then to access it our CLI
- // must be accessed with "./cli foo bar". See the docs for CLI for
- // notes on how this changes some other behavior of the CLI as well.
- Commands map[string]CommandFactory
-
- // Name defines the name of the CLI.
- Name string
-
- // Version of the CLI.
- Version string
-
- // HelpFunc and HelpWriter are used to output help information, if
- // requested.
- //
- // HelpFunc is the function called to generate the generic help
- // text that is shown if help must be shown for the CLI that doesn't
- // pertain to a specific command.
- //
- // HelpWriter is the Writer where the help text is outputted to. If
- // not specified, it will default to Stderr.
- HelpFunc HelpFunc
- HelpWriter io.Writer
-
- once sync.Once
- commandTree *radix.Tree
- commandNested bool
- isHelp bool
- subcommand string
- subcommandArgs []string
- topFlags []string
-
- isVersion bool
-}
-
-// NewClI returns a new CLI instance with sensible defaults.
-func NewCLI(app, version string) *CLI {
- return &CLI{
- Name: app,
- Version: version,
- HelpFunc: BasicHelpFunc(app),
- }
-
-}
-
-// IsHelp returns whether or not the help flag is present within the
-// arguments.
-func (c *CLI) IsHelp() bool {
- c.once.Do(c.init)
- return c.isHelp
-}
-
-// IsVersion returns whether or not the version flag is present within the
-// arguments.
-func (c *CLI) IsVersion() bool {
- c.once.Do(c.init)
- return c.isVersion
-}
-
-// Run runs the actual CLI based on the arguments given.
-func (c *CLI) Run() (int, error) {
- c.once.Do(c.init)
-
- // Just show the version and exit if instructed.
- if c.IsVersion() && c.Version != "" {
- c.HelpWriter.Write([]byte(c.Version + "\n"))
- return 0, nil
- }
-
- // Just print the help when only '-h' or '--help' is passed.
- if c.IsHelp() && c.Subcommand() == "" {
- c.HelpWriter.Write([]byte(c.HelpFunc(c.Commands) + "\n"))
- return 0, nil
- }
-
- // Attempt to get the factory function for creating the command
- // implementation. If the command is invalid or blank, it is an error.
- raw, ok := c.commandTree.Get(c.Subcommand())
- if !ok {
- c.HelpWriter.Write([]byte(c.HelpFunc(c.helpCommands(c.subcommandParent())) + "\n"))
- return 1, nil
- }
-
- command, err := raw.(CommandFactory)()
- if err != nil {
- return 1, err
- }
-
- // If we've been instructed to just print the help, then print it
- if c.IsHelp() {
- c.commandHelp(command)
- return 0, nil
- }
-
- // If there is an invalid flag, then error
- if len(c.topFlags) > 0 {
- c.HelpWriter.Write([]byte(
- "Invalid flags before the subcommand. If these flags are for\n" +
- "the subcommand, please put them after the subcommand.\n\n"))
- c.commandHelp(command)
- return 1, nil
- }
-
- code := command.Run(c.SubcommandArgs())
- if code == RunResultHelp {
- // Requesting help
- c.commandHelp(command)
- return 1, nil
- }
-
- return code, nil
-}
-
-// Subcommand returns the subcommand that the CLI would execute. For
-// example, a CLI from "--version version --help" would return a Subcommand
-// of "version"
-func (c *CLI) Subcommand() string {
- c.once.Do(c.init)
- return c.subcommand
-}
-
-// SubcommandArgs returns the arguments that will be passed to the
-// subcommand.
-func (c *CLI) SubcommandArgs() []string {
- c.once.Do(c.init)
- return c.subcommandArgs
-}
-
-// subcommandParent returns the parent of this subcommand, if there is one.
-// If there isn't on, "" is returned.
-func (c *CLI) subcommandParent() string {
- // Get the subcommand, if it is "" alread just return
- sub := c.Subcommand()
- if sub == "" {
- return sub
- }
-
- // Clear any trailing spaces and find the last space
- sub = strings.TrimRight(sub, " ")
- idx := strings.LastIndex(sub, " ")
-
- if idx == -1 {
- // No space means our parent is root
- return ""
- }
-
- return sub[:idx]
-}
-
-func (c *CLI) init() {
- if c.HelpFunc == nil {
- c.HelpFunc = BasicHelpFunc("app")
-
- if c.Name != "" {
- c.HelpFunc = BasicHelpFunc(c.Name)
- }
- }
-
- if c.HelpWriter == nil {
- c.HelpWriter = os.Stderr
- }
-
- // Build our command tree
- c.commandTree = radix.New()
- c.commandNested = false
- for k, v := range c.Commands {
- k = strings.TrimSpace(k)
- c.commandTree.Insert(k, v)
- if strings.ContainsRune(k, ' ') {
- c.commandNested = true
- }
- }
-
- // Go through the key and fill in any missing parent commands
- if c.commandNested {
- var walkFn radix.WalkFn
- toInsert := make(map[string]struct{})
- walkFn = func(k string, raw interface{}) bool {
- idx := strings.LastIndex(k, " ")
- if idx == -1 {
- // If there is no space, just ignore top level commands
- return false
- }
-
- // Trim up to that space so we can get the expected parent
- k = k[:idx]
- if _, ok := c.commandTree.Get(k); ok {
- // Yay we have the parent!
- return false
- }
-
- // We're missing the parent, so let's insert this
- toInsert[k] = struct{}{}
-
- // Call the walk function recursively so we check this one too
- return walkFn(k, nil)
- }
-
- // Walk!
- c.commandTree.Walk(walkFn)
-
- // Insert any that we're missing
- for k := range toInsert {
- var f CommandFactory = func() (Command, error) {
- return &MockCommand{
- HelpText: "This command is accessed by using one of the subcommands below.",
- RunResult: RunResultHelp,
- }, nil
- }
-
- c.commandTree.Insert(k, f)
- }
- }
-
- // Process the args
- c.processArgs()
-}
-
-func (c *CLI) commandHelp(command Command) {
- // Get the template to use
- tpl := strings.TrimSpace(defaultHelpTemplate)
- if t, ok := command.(CommandHelpTemplate); ok {
- tpl = t.HelpTemplate()
- }
- if !strings.HasSuffix(tpl, "\n") {
- tpl += "\n"
- }
-
- // Parse it
- t, err := template.New("root").Parse(tpl)
- if err != nil {
- t = template.Must(template.New("root").Parse(fmt.Sprintf(
- "Internal error! Failed to parse command help template: %s\n", err)))
- }
-
- // Template data
- data := map[string]interface{}{
- "Name": c.Name,
- "Help": command.Help(),
- }
-
- // Build subcommand list if we have it
- var subcommandsTpl []map[string]interface{}
- if c.commandNested {
- // Get the matching keys
- subcommands := c.helpCommands(c.Subcommand())
- keys := make([]string, 0, len(subcommands))
- for k := range subcommands {
- keys = append(keys, k)
- }
-
- // Sort the keys
- sort.Strings(keys)
-
- // Figure out the padding length
- var longest int
- for _, k := range keys {
- if v := len(k); v > longest {
- longest = v
- }
- }
-
- // Go through and create their structures
- subcommandsTpl = make([]map[string]interface{}, 0, len(subcommands))
- for _, k := range keys {
- // Get the command
- raw, ok := subcommands[k]
- if !ok {
- c.HelpWriter.Write([]byte(fmt.Sprintf(
- "Error getting subcommand %q", k)))
- }
- sub, err := raw()
- if err != nil {
- c.HelpWriter.Write([]byte(fmt.Sprintf(
- "Error instantiating %q: %s", k, err)))
- }
-
- // Find the last space and make sure we only include that last part
- name := k
- if idx := strings.LastIndex(k, " "); idx > -1 {
- name = name[idx+1:]
- }
-
- subcommandsTpl = append(subcommandsTpl, map[string]interface{}{
- "Name": name,
- "NameAligned": name + strings.Repeat(" ", longest-len(k)),
- "Help": sub.Help(),
- "Synopsis": sub.Synopsis(),
- })
- }
- }
- data["Subcommands"] = subcommandsTpl
-
- // Write
- err = t.Execute(c.HelpWriter, data)
- if err == nil {
- return
- }
-
- // An error, just output...
- c.HelpWriter.Write([]byte(fmt.Sprintf(
- "Internal error rendering help: %s", err)))
-}
-
-// helpCommands returns the subcommands for the HelpFunc argument.
-// This will only contain immediate subcommands.
-func (c *CLI) helpCommands(prefix string) map[string]CommandFactory {
- // If our prefix isn't empty, make sure it ends in ' '
- if prefix != "" && prefix[len(prefix)-1] != ' ' {
- prefix += " "
- }
-
- // Get all the subkeys of this command
- var keys []string
- c.commandTree.WalkPrefix(prefix, func(k string, raw interface{}) bool {
- // Ignore any sub-sub keys, i.e. "foo bar baz" when we want "foo bar"
- if !strings.Contains(k[len(prefix):], " ") {
- keys = append(keys, k)
- }
-
- return false
- })
-
- // For each of the keys return that in the map
- result := make(map[string]CommandFactory, len(keys))
- for _, k := range keys {
- raw, ok := c.commandTree.Get(k)
- if !ok {
- // We just got it via WalkPrefix above, so we just panic
- panic("not found: " + k)
- }
-
- result[k] = raw.(CommandFactory)
- }
-
- return result
-}
-
-func (c *CLI) processArgs() {
- for i, arg := range c.Args {
- if arg == "--" {
- break
- }
-
- // Check for help flags.
- if arg == "-h" || arg == "-help" || arg == "--help" {
- c.isHelp = true
- continue
- }
-
- if c.subcommand == "" {
- // Check for version flags if not in a subcommand.
- if arg == "-v" || arg == "-version" || arg == "--version" {
- c.isVersion = true
- continue
- }
-
- if arg != "" && arg[0] == '-' {
- // Record the arg...
- c.topFlags = append(c.topFlags, arg)
- }
- }
-
- // If we didn't find a subcommand yet and this is the first non-flag
- // argument, then this is our subcommand.
- if c.subcommand == "" && arg != "" && arg[0] != '-' {
- c.subcommand = arg
- if c.commandNested {
- // Nested CLI, the subcommand is actually the entire
- // arg list up to a flag that is still a valid subcommand.
- searchKey := strings.Join(c.Args[i:], " ")
- k, _, ok := c.commandTree.LongestPrefix(searchKey)
- if ok {
- // k could be a prefix that doesn't contain the full
- // command such as "foo" instead of "foobar", so we
- // need to verify that we have an entire key. To do that,
- // we look for an ending in a space or an end of string.
- reVerify := regexp.MustCompile(regexp.QuoteMeta(k) + `( |$)`)
- if reVerify.MatchString(searchKey) {
- c.subcommand = k
- i += strings.Count(k, " ")
- }
- }
- }
-
- // The remaining args the subcommand arguments
- c.subcommandArgs = c.Args[i+1:]
- }
- }
-
- // If we never found a subcommand and support a default command, then
- // switch to using that.
- if c.subcommand == "" {
- if _, ok := c.Commands[""]; ok {
- args := c.topFlags
- args = append(args, c.subcommandArgs...)
- c.topFlags = nil
- c.subcommandArgs = args
- }
- }
-}
-
-const defaultHelpTemplate = `
-{{.Help}}{{if gt (len .Subcommands) 0}}
-
-Subcommands:
-{{- range $value := .Subcommands }}
- {{ $value.NameAligned }} {{ $value.Synopsis }}{{ end }}
-{{- end }}
-`
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command.go
deleted file mode 100644
index b4924eb00..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package cli
-
-const (
- // RunResultHelp is a value that can be returned from Run to signal
- // to the CLI to render the help output.
- RunResultHelp = -18511
-)
-
-// A command is a runnable sub-command of a CLI.
-type Command interface {
- // Help should return long-form help text that includes the command-line
- // usage, a brief few sentences explaining the function of the command,
- // and the complete list of flags the command accepts.
- Help() string
-
- // Run should run the actual command with the given CLI instance and
- // command-line arguments. It should return the exit status when it is
- // finished.
- //
- // There are a handful of special exit codes this can return documented
- // above that change behavior.
- Run(args []string) int
-
- // Synopsis should return a one-line, short synopsis of the command.
- // This should be less than 50 characters ideally.
- Synopsis() string
-}
-
-// CommandHelpTemplate is an extension of Command that also has a function
-// for returning a template for the help rather than the help itself. In
-// this scenario, both Help and HelpTemplate should be implemented.
-//
-// If CommandHelpTemplate isn't implemented, the Help is output as-is.
-type CommandHelpTemplate interface {
- // HelpTemplate is the template in text/template format to use for
- // displaying the Help. The keys available are:
- //
- // * ".Help" - The help text itself
- // * ".Subcommands"
- //
- HelpTemplate() string
-}
-
-// CommandFactory is a type of function that is a factory for commands.
-// We need a factory because we may need to setup some state on the
-// struct that implements the command itself.
-type CommandFactory func() (Command, error)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command_mock.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command_mock.go
deleted file mode 100644
index 6371e573b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/command_mock.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package cli
-
-// MockCommand is an implementation of Command that can be used for tests.
-// It is publicly exported from this package in case you want to use it
-// externally.
-type MockCommand struct {
- // Settable
- HelpText string
- RunResult int
- SynopsisText string
-
- // Set by the command
- RunCalled bool
- RunArgs []string
-}
-
-func (c *MockCommand) Help() string {
- return c.HelpText
-}
-
-func (c *MockCommand) Run(args []string) int {
- c.RunCalled = true
- c.RunArgs = args
-
- return c.RunResult
-}
-
-func (c *MockCommand) Synopsis() string {
- return c.SynopsisText
-}
-
-// MockCommandHelpTemplate is an implementation of CommandHelpTemplate.
-type MockCommandHelpTemplate struct {
- MockCommand
-
- // Settable
- HelpTemplateText string
-}
-
-func (c *MockCommandHelpTemplate) HelpTemplate() string {
- return c.HelpTemplateText
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/help.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/help.go
deleted file mode 100644
index f5ca58f59..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/help.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package cli
-
-import (
- "bytes"
- "fmt"
- "log"
- "sort"
- "strings"
-)
-
-// HelpFunc is the type of the function that is responsible for generating
-// the help output when the CLI must show the general help text.
-type HelpFunc func(map[string]CommandFactory) string
-
-// BasicHelpFunc generates some basic help output that is usually good enough
-// for most CLI applications.
-func BasicHelpFunc(app string) HelpFunc {
- return func(commands map[string]CommandFactory) string {
- var buf bytes.Buffer
- buf.WriteString(fmt.Sprintf(
- "Usage: %s [--version] [--help] <command> [<args>]\n\n",
- app))
- buf.WriteString("Available commands are:\n")
-
- // Get the list of keys so we can sort them, and also get the maximum
- // key length so they can be aligned properly.
- keys := make([]string, 0, len(commands))
- maxKeyLen := 0
- for key := range commands {
- if len(key) > maxKeyLen {
- maxKeyLen = len(key)
- }
-
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
- commandFunc, ok := commands[key]
- if !ok {
- // This should never happen since we JUST built the list of
- // keys.
- panic("command not found: " + key)
- }
-
- command, err := commandFunc()
- if err != nil {
- log.Printf("[ERR] cli: Command '%s' failed to load: %s",
- key, err)
- continue
- }
-
- key = fmt.Sprintf("%s%s", key, strings.Repeat(" ", maxKeyLen-len(key)))
- buf.WriteString(fmt.Sprintf(" %s %s\n", key, command.Synopsis()))
- }
-
- return buf.String()
- }
-}
-
-// FilteredHelpFunc will filter the commands to only include the keys
-// in the include parameter.
-func FilteredHelpFunc(include []string, f HelpFunc) HelpFunc {
- return func(commands map[string]CommandFactory) string {
- set := make(map[string]struct{})
- for _, k := range include {
- set[k] = struct{}{}
- }
-
- filtered := make(map[string]CommandFactory)
- for k, f := range commands {
- if _, ok := set[k]; ok {
- filtered[k] = f
- }
- }
-
- return f(filtered)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui.go
deleted file mode 100644
index a2d6f94f4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui.go
+++ /dev/null
@@ -1,187 +0,0 @@
-package cli
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "os"
- "os/signal"
- "strings"
-
- "github.com/bgentry/speakeasy"
- "github.com/mattn/go-isatty"
-)
-
-// Ui is an interface for interacting with the terminal, or "interface"
-// of a CLI. This abstraction doesn't have to be used, but helps provide
-// a simple, layerable way to manage user interactions.
-type Ui interface {
- // Ask asks the user for input using the given query. The response is
- // returned as the given string, or an error.
- Ask(string) (string, error)
-
- // AskSecret asks the user for input using the given query, but does not echo
- // the keystrokes to the terminal.
- AskSecret(string) (string, error)
-
- // Output is called for normal standard output.
- Output(string)
-
- // Info is called for information related to the previous output.
- // In general this may be the exact same as Output, but this gives
- // Ui implementors some flexibility with output formats.
- Info(string)
-
- // Error is used for any error messages that might appear on standard
- // error.
- Error(string)
-
- // Warn is used for any warning messages that might appear on standard
- // error.
- Warn(string)
-}
-
-// BasicUi is an implementation of Ui that just outputs to the given
-// writer. This UI is not threadsafe by default, but you can wrap it
-// in a ConcurrentUi to make it safe.
-type BasicUi struct {
- Reader io.Reader
- Writer io.Writer
- ErrorWriter io.Writer
-}
-
-func (u *BasicUi) Ask(query string) (string, error) {
- return u.ask(query, false)
-}
-
-func (u *BasicUi) AskSecret(query string) (string, error) {
- return u.ask(query, true)
-}
-
-func (u *BasicUi) ask(query string, secret bool) (string, error) {
- if _, err := fmt.Fprint(u.Writer, query+" "); err != nil {
- return "", err
- }
-
- // Register for interrupts so that we can catch it and immediately
- // return...
- sigCh := make(chan os.Signal, 1)
- signal.Notify(sigCh, os.Interrupt)
- defer signal.Stop(sigCh)
-
- // Ask for input in a go-routine so that we can ignore it.
- errCh := make(chan error, 1)
- lineCh := make(chan string, 1)
- go func() {
- var line string
- var err error
- if secret && isatty.IsTerminal(os.Stdin.Fd()) {
- line, err = speakeasy.Ask("")
- } else {
- r := bufio.NewReader(u.Reader)
- line, err = r.ReadString('\n')
- }
- if err != nil {
- errCh <- err
- return
- }
-
- lineCh <- strings.TrimRight(line, "\r\n")
- }()
-
- select {
- case err := <-errCh:
- return "", err
- case line := <-lineCh:
- return line, nil
- case <-sigCh:
- // Print a newline so that any further output starts properly
- // on a new line.
- fmt.Fprintln(u.Writer)
-
- return "", errors.New("interrupted")
- }
-}
-
-func (u *BasicUi) Error(message string) {
- w := u.Writer
- if u.ErrorWriter != nil {
- w = u.ErrorWriter
- }
-
- fmt.Fprint(w, message)
- fmt.Fprint(w, "\n")
-}
-
-func (u *BasicUi) Info(message string) {
- u.Output(message)
-}
-
-func (u *BasicUi) Output(message string) {
- fmt.Fprint(u.Writer, message)
- fmt.Fprint(u.Writer, "\n")
-}
-
-func (u *BasicUi) Warn(message string) {
- u.Error(message)
-}
-
-// PrefixedUi is an implementation of Ui that prefixes messages.
-type PrefixedUi struct {
- AskPrefix string
- AskSecretPrefix string
- OutputPrefix string
- InfoPrefix string
- ErrorPrefix string
- WarnPrefix string
- Ui Ui
-}
-
-func (u *PrefixedUi) Ask(query string) (string, error) {
- if query != "" {
- query = fmt.Sprintf("%s%s", u.AskPrefix, query)
- }
-
- return u.Ui.Ask(query)
-}
-
-func (u *PrefixedUi) AskSecret(query string) (string, error) {
- if query != "" {
- query = fmt.Sprintf("%s%s", u.AskSecretPrefix, query)
- }
-
- return u.Ui.AskSecret(query)
-}
-
-func (u *PrefixedUi) Error(message string) {
- if message != "" {
- message = fmt.Sprintf("%s%s", u.ErrorPrefix, message)
- }
-
- u.Ui.Error(message)
-}
-
-func (u *PrefixedUi) Info(message string) {
- if message != "" {
- message = fmt.Sprintf("%s%s", u.InfoPrefix, message)
- }
-
- u.Ui.Info(message)
-}
-
-func (u *PrefixedUi) Output(message string) {
- if message != "" {
- message = fmt.Sprintf("%s%s", u.OutputPrefix, message)
- }
-
- u.Ui.Output(message)
-}
-
-func (u *PrefixedUi) Warn(message string) {
- if message != "" {
- message = fmt.Sprintf("%s%s", u.WarnPrefix, message)
- }
-
- u.Ui.Warn(message)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_colored.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_colored.go
deleted file mode 100644
index e3d5131d1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_colored.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package cli
-
-import (
- "fmt"
-)
-
-// UiColor is a posix shell color code to use.
-type UiColor struct {
- Code int
- Bold bool
-}
-
-// A list of colors that are useful. These are all non-bolded by default.
-var (
- UiColorNone UiColor = UiColor{-1, false}
- UiColorRed = UiColor{31, false}
- UiColorGreen = UiColor{32, false}
- UiColorYellow = UiColor{33, false}
- UiColorBlue = UiColor{34, false}
- UiColorMagenta = UiColor{35, false}
- UiColorCyan = UiColor{36, false}
-)
-
-// ColoredUi is a Ui implementation that colors its output according
-// to the given color schemes for the given type of output.
-type ColoredUi struct {
- OutputColor UiColor
- InfoColor UiColor
- ErrorColor UiColor
- WarnColor UiColor
- Ui Ui
-}
-
-func (u *ColoredUi) Ask(query string) (string, error) {
- return u.Ui.Ask(u.colorize(query, u.OutputColor))
-}
-
-func (u *ColoredUi) AskSecret(query string) (string, error) {
- return u.Ui.AskSecret(u.colorize(query, u.OutputColor))
-}
-
-func (u *ColoredUi) Output(message string) {
- u.Ui.Output(u.colorize(message, u.OutputColor))
-}
-
-func (u *ColoredUi) Info(message string) {
- u.Ui.Info(u.colorize(message, u.InfoColor))
-}
-
-func (u *ColoredUi) Error(message string) {
- u.Ui.Error(u.colorize(message, u.ErrorColor))
-}
-
-func (u *ColoredUi) Warn(message string) {
- u.Ui.Warn(u.colorize(message, u.WarnColor))
-}
-
-func (u *ColoredUi) colorize(message string, color UiColor) string {
- if color.Code == -1 {
- return message
- }
-
- attr := 0
- if color.Bold {
- attr = 1
- }
-
- return fmt.Sprintf("\033[%d;%dm%s\033[0m", attr, color.Code, message)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_concurrent.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_concurrent.go
deleted file mode 100644
index b4f4dbfaa..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_concurrent.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package cli
-
-import (
- "sync"
-)
-
-// ConcurrentUi is a wrapper around a Ui interface (and implements that
-// interface) making the underlying Ui concurrency safe.
-type ConcurrentUi struct {
- Ui Ui
- l sync.Mutex
-}
-
-func (u *ConcurrentUi) Ask(query string) (string, error) {
- u.l.Lock()
- defer u.l.Unlock()
-
- return u.Ui.Ask(query)
-}
-
-func (u *ConcurrentUi) AskSecret(query string) (string, error) {
- u.l.Lock()
- defer u.l.Unlock()
-
- return u.Ui.AskSecret(query)
-}
-
-func (u *ConcurrentUi) Error(message string) {
- u.l.Lock()
- defer u.l.Unlock()
-
- u.Ui.Error(message)
-}
-
-func (u *ConcurrentUi) Info(message string) {
- u.l.Lock()
- defer u.l.Unlock()
-
- u.Ui.Info(message)
-}
-
-func (u *ConcurrentUi) Output(message string) {
- u.l.Lock()
- defer u.l.Unlock()
-
- u.Ui.Output(message)
-}
-
-func (u *ConcurrentUi) Warn(message string) {
- u.l.Lock()
- defer u.l.Unlock()
-
- u.Ui.Warn(message)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_mock.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_mock.go
deleted file mode 100644
index c46772855..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_mock.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package cli
-
-import (
- "bytes"
- "fmt"
- "io"
- "sync"
-)
-
-// MockUi is a mock UI that is used for tests and is exported publicly for
-// use in external tests if needed as well.
-type MockUi struct {
- InputReader io.Reader
- ErrorWriter *bytes.Buffer
- OutputWriter *bytes.Buffer
-
- once sync.Once
-}
-
-func (u *MockUi) Ask(query string) (string, error) {
- u.once.Do(u.init)
-
- var result string
- fmt.Fprint(u.OutputWriter, query)
- if _, err := fmt.Fscanln(u.InputReader, &result); err != nil {
- return "", err
- }
-
- return result, nil
-}
-
-func (u *MockUi) AskSecret(query string) (string, error) {
- return u.Ask(query)
-}
-
-func (u *MockUi) Error(message string) {
- u.once.Do(u.init)
-
- fmt.Fprint(u.ErrorWriter, message)
- fmt.Fprint(u.ErrorWriter, "\n")
-}
-
-func (u *MockUi) Info(message string) {
- u.Output(message)
-}
-
-func (u *MockUi) Output(message string) {
- u.once.Do(u.init)
-
- fmt.Fprint(u.OutputWriter, message)
- fmt.Fprint(u.OutputWriter, "\n")
-}
-
-func (u *MockUi) Warn(message string) {
- u.once.Do(u.init)
-
- fmt.Fprint(u.ErrorWriter, message)
- fmt.Fprint(u.ErrorWriter, "\n")
-}
-
-func (u *MockUi) init() {
- u.ErrorWriter = new(bytes.Buffer)
- u.OutputWriter = new(bytes.Buffer)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_writer.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_writer.go
deleted file mode 100644
index 1e1db3cf6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/ui_writer.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package cli
-
-// UiWriter is an io.Writer implementation that can be used with
-// loggers that writes every line of log output data to a Ui at the
-// Info level.
-type UiWriter struct {
- Ui Ui
-}
-
-func (w *UiWriter) Write(p []byte) (n int, err error) {
- n = len(p)
- if n > 0 && p[n-1] == '\n' {
- p = p[:n-1]
- }
-
- w.Ui.Info(string(p))
- return n, nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/README.md
deleted file mode 100644
index 60ae31170..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# go-wordwrap
-
-`go-wordwrap` (Golang package: `wordwrap`) is a package for Go that
-automatically wraps words into multiple lines. The primary use case for this
-is in formatting CLI output, but of course word wrapping is a generally useful
-thing to do.
-
-## Installation and Usage
-
-Install using `go get github.com/mitchellh/go-wordwrap`.
-
-Full documentation is available at
-http://godoc.org/github.com/mitchellh/go-wordwrap
-
-Below is an example of its usage ignoring errors:
-
-```go
-wrapped := wordwrap.WrapString("foo bar baz", 3)
-fmt.Println(wrapped)
-```
-
-Would output:
-
-```
-foo
-bar
-baz
-```
-
-## Word Wrap Algorithm
-
-This library doesn't use any clever algorithm for word wrapping. The wrapping
-is actually very naive: whenever there is whitespace or an explicit linebreak.
-The goal of this library is for word wrapping CLI output, so the input is
-typically pretty well controlled human language. Because of this, the naive
-approach typically works just fine.
-
-In the future, we'd like to make the algorithm more advanced. We would do
-so without breaking the API.
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
deleted file mode 100644
index ac67205bc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package wordwrap
-
-import (
- "bytes"
- "unicode"
-)
-
-// WrapString wraps the given string within lim width in characters.
-//
-// Wrapping is currently naive and only happens at white-space. A future
-// version of the library will implement smarter wrapping. This means that
-// pathological cases can dramatically reach past the limit, such as a very
-// long word.
-func WrapString(s string, lim uint) string {
- // Initialize a buffer with a slightly larger size to account for breaks
- init := make([]byte, 0, len(s))
- buf := bytes.NewBuffer(init)
-
- var current uint
- var wordBuf, spaceBuf bytes.Buffer
-
- for _, char := range s {
- if char == '\n' {
- if wordBuf.Len() == 0 {
- if current+uint(spaceBuf.Len()) > lim {
- current = 0
- } else {
- current += uint(spaceBuf.Len())
- spaceBuf.WriteTo(buf)
- }
- spaceBuf.Reset()
- } else {
- current += uint(spaceBuf.Len() + wordBuf.Len())
- spaceBuf.WriteTo(buf)
- spaceBuf.Reset()
- wordBuf.WriteTo(buf)
- wordBuf.Reset()
- }
- buf.WriteRune(char)
- current = 0
- } else if unicode.IsSpace(char) {
- if spaceBuf.Len() == 0 || wordBuf.Len() > 0 {
- current += uint(spaceBuf.Len() + wordBuf.Len())
- spaceBuf.WriteTo(buf)
- spaceBuf.Reset()
- wordBuf.WriteTo(buf)
- wordBuf.Reset()
- }
-
- spaceBuf.WriteRune(char)
- } else {
-
- wordBuf.WriteRune(char)
-
- if current+uint(spaceBuf.Len()+wordBuf.Len()) > lim && uint(wordBuf.Len()) < lim {
- buf.WriteRune('\n')
- current = 0
- spaceBuf.Reset()
- }
- }
- }
-
- if wordBuf.Len() == 0 {
- if current+uint(spaceBuf.Len()) <= lim {
- spaceBuf.WriteTo(buf)
- }
- } else {
- spaceBuf.WriteTo(buf)
- wordBuf.WriteTo(buf)
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/LICENSE
deleted file mode 100644
index b9c0e2b68..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2016 Ryan Uber
-
-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-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/README.md
deleted file mode 100644
index e47634fc6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-Columnize
-=========
-
-Easy column-formatted output for golang
-
-[![Build Status](https://travis-ci.org/ryanuber/columnize.svg)](https://travis-ci.org/ryanuber/columnize)
-[![GoDoc](https://godoc.org/github.com/ryanuber/columnize?status.svg)](https://godoc.org/github.com/ryanuber/columnize)
-
-Columnize is a really small Go package that makes building CLI's a little bit
-easier. In some CLI designs, you want to output a number similar items in a
-human-readable way with nicely aligned columns. However, figuring out how wide
-to make each column is a boring problem to solve and eats your valuable time.
-
-Here is an example:
-
-```go
-package main
-
-import (
- "fmt"
- "github.com/ryanuber/columnize"
-)
-
-func main() {
- output := []string{
- "Name | Gender | Age",
- "Bob | Male | 38",
- "Sally | Female | 26",
- }
- result := columnize.SimpleFormat(output)
- fmt.Println(result)
-}
-```
-
-As you can see, you just pass in a list of strings. And the result:
-
-```
-Name Gender Age
-Bob Male 38
-Sally Female 26
-```
-
-Columnize is tolerant of missing or empty fields, or even empty lines, so
-passing in extra lines for spacing should show up as you would expect.
-
-Configuration
-=============
-
-Columnize is configured using a `Config`, which can be obtained by calling the
-`DefaultConfig()` method. You can then tweak the settings in the resulting
-`Config`:
-
-```
-config := columnize.DefaultConfig()
-config.Delim = "|"
-config.Glue = " "
-config.Prefix = ""
-config.Empty = ""
-```
-
-* `Delim` is the string by which columns of **input** are delimited
-* `Glue` is the string by which columns of **output** are delimited
-* `Prefix` is a string by which each line of **output** is prefixed
-* `Empty` is a string used to replace blank values found in output
-
-You can then pass the `Config` in using the `Format` method (signature below) to
-have text formatted to your liking.
-
-See the [godoc](https://godoc.org/github.com/ryanuber/columnize) page for usage.
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/columnize.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/columnize.go
deleted file mode 100644
index bff014fac..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/ryanuber/columnize/columnize.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package columnize
-
-import (
- "bytes"
- "fmt"
- "strings"
-)
-
-// Config can be used to tune certain parameters which affect the way
-// in which Columnize will format output text.
-type Config struct {
- // The string by which the lines of input will be split.
- Delim string
-
- // The string by which columns of output will be separated.
- Glue string
-
- // The string by which columns of output will be prefixed.
- Prefix string
-
- // A replacement string to replace empty fields
- Empty string
-}
-
-// DefaultConfig returns a *Config with default values.
-func DefaultConfig() *Config {
- return &Config{
- Delim: "|",
- Glue: " ",
- Prefix: "",
- Empty: "",
- }
-}
-
-// MergeConfig merges two config objects together and returns the resulting
-// configuration. Values from the right take precedence over the left side.
-func MergeConfig(a, b *Config) *Config {
- var result Config = *a
-
- // Return quickly if either side was nil
- if a == nil || b == nil {
- return &result
- }
-
- if b.Delim != "" {
- result.Delim = b.Delim
- }
- if b.Glue != "" {
- result.Glue = b.Glue
- }
- if b.Prefix != "" {
- result.Prefix = b.Prefix
- }
- if b.Empty != "" {
- result.Empty = b.Empty
- }
-
- return &result
-}
-
-// stringFormat, given a set of column widths and the number of columns in
-// the current line, returns a sprintf-style format string which can be used
-// to print output aligned properly with other lines using the same widths set.
-func stringFormat(c *Config, widths []int, columns int) string {
- // Create the buffer with an estimate of the length
- buf := bytes.NewBuffer(make([]byte, 0, (6+len(c.Glue))*columns))
-
- // Start with the prefix, if any was given. The buffer will not return an
- // error so it does not need to be handled
- buf.WriteString(c.Prefix)
-
- // Create the format string from the discovered widths
- for i := 0; i < columns && i < len(widths); i++ {
- if i == columns-1 {
- buf.WriteString("%s\n")
- } else {
- fmt.Fprintf(buf, "%%-%ds%s", widths[i], c.Glue)
- }
- }
- return buf.String()
-}
-
-// elementsFromLine returns a list of elements, each representing a single
-// item which will belong to a column of output.
-func elementsFromLine(config *Config, line string) []interface{} {
- separated := strings.Split(line, config.Delim)
- elements := make([]interface{}, len(separated))
- for i, field := range separated {
- value := strings.TrimSpace(field)
-
- // Apply the empty value, if configured.
- if value == "" && config.Empty != "" {
- value = config.Empty
- }
- elements[i] = value
- }
- return elements
-}
-
-// runeLen calculates the number of visible "characters" in a string
-func runeLen(s string) int {
- l := 0
- for _ = range s {
- l++
- }
- return l
-}
-
-// widthsFromLines examines a list of strings and determines how wide each
-// column should be considering all of the elements that need to be printed
-// within it.
-func widthsFromLines(config *Config, lines []string) []int {
- widths := make([]int, 0, 8)
-
- for _, line := range lines {
- elems := elementsFromLine(config, line)
- for i := 0; i < len(elems); i++ {
- l := runeLen(elems[i].(string))
- if len(widths) <= i {
- widths = append(widths, l)
- } else if widths[i] < l {
- widths[i] = l
- }
- }
- }
- return widths
-}
-
-// Format is the public-facing interface that takes a list of strings and
-// returns nicely aligned column-formatted text.
-func Format(lines []string, config *Config) string {
- conf := MergeConfig(DefaultConfig(), config)
- widths := widthsFromLines(conf, lines)
-
- // Estimate the buffer size
- glueSize := len(conf.Glue)
- var size int
- for _, w := range widths {
- size += w + glueSize
- }
- size *= len(lines)
-
- // Create the buffer
- buf := bytes.NewBuffer(make([]byte, 0, size))
-
- // Create a cache for the string formats
- fmtCache := make(map[int]string, 16)
-
- // Create the formatted output using the format string
- for _, line := range lines {
- elems := elementsFromLine(conf, line)
-
- // Get the string format using cache
- numElems := len(elems)
- stringfmt, ok := fmtCache[numElems]
- if !ok {
- stringfmt = stringFormat(conf, widths, numElems)
- fmtCache[numElems] = stringfmt
- }
-
- fmt.Fprintf(buf, stringfmt, elems...)
- }
-
- // Get the string result
- result := buf.String()
-
- // Remove trailing newline without removing leading/trailing space
- if n := len(result); n > 0 && result[n-1] == '\n' {
- result = result[:n-1]
- }
-
- return result
-}
-
-// SimpleFormat is a convenience function to format text with the defaults.
-func SimpleFormat(lines []string) string {
- return Format(lines, nil)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/LICENSE b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/LICENSE
deleted file mode 100644
index 6a66aea5e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. 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.
- * Neither the name of Google Inc. nor the names of its
-contributors may 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
-OWNER 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/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/PATENTS b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/PATENTS
deleted file mode 100644
index 733099041..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google 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,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm.s
deleted file mode 100644
index 8ed2fdb94..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·use(SB),NOSPLIT,$0
- RET
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a7278319..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
deleted file mode 100644
index 6321421f2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d50..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e017437..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index d5ed6726c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-112
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-64
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a2601..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 35172477c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c875b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_386.s
deleted file mode 100644
index 4db290932..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- JMP syscall·rawsocketcall(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-28
- JMP syscall·seek(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
deleted file mode 100644
index 44e25c62f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·gettimeofday(SB),NOSPLIT,$0-16
- JMP syscall·gettimeofday(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm.s
deleted file mode 100644
index cf0b57465..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-32
- B syscall·seek(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
deleted file mode 100644
index 4be9bfede..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build linux
-// +build arm64
-// +build !gccgo
-
-#include "textflag.h"
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
deleted file mode 100644
index 724e580c4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build linux
-// +build mips64 mips64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
deleted file mode 100644
index 8d231feb4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build linux
-// +build ppc64 ppc64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
deleted file mode 100644
index 11889859f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build s390x
-// +build linux
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for s390x, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd763..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
deleted file mode 100644
index 2ede05c72..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
deleted file mode 100644
index e8928571c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3c8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77f8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
deleted file mode 100644
index 43ed17a05..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
-//
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-64
- JMP syscall·sysvicall6(SB)
-
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
- JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/bluetooth_linux.go
deleted file mode 100644
index 6e3229697..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/bluetooth_linux.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 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 file.
-
-// Bluetooth sockets and messages
-
-package unix
-
-// Bluetooth Protocols
-const (
- BTPROTO_L2CAP = 0
- BTPROTO_HCI = 1
- BTPROTO_SCO = 2
- BTPROTO_RFCOMM = 3
- BTPROTO_BNEP = 4
- BTPROTO_CMTP = 5
- BTPROTO_HIDP = 6
- BTPROTO_AVDTP = 7
-)
-
-const (
- HCI_CHANNEL_RAW = 0
- HCI_CHANNEL_USER = 1
- HCI_CHANNEL_MONITOR = 2
- HCI_CHANNEL_CONTROL = 3
-)
-
-// Socketoption Level
-const (
- SOL_BLUETOOTH = 0x112
- SOL_HCI = 0x0
- SOL_L2CAP = 0x6
- SOL_RFCOMM = 0x12
- SOL_SCO = 0x11
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/constants.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/constants.go
deleted file mode 100644
index a96f0ebc2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/constants.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-const (
- R_OK = 0x4
- W_OK = 0x2
- X_OK = 0x1
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unix.go
deleted file mode 100644
index 45e281a04..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unix.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2010 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Unix environment variables.
-
-package unix
-
-import "syscall"
-
-func Getenv(key string) (value string, found bool) {
- return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
- return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
- syscall.Clearenv()
-}
-
-func Environ() []string {
- return syscall.Environ()
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unset.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unset.go
deleted file mode 100644
index 922226255..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/env_unset.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build go1.4
-
-package unix
-
-import "syscall"
-
-func Unsetenv(key string) error {
- // This was added in Go 1.4.
- return syscall.Unsetenv(key)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock.go
deleted file mode 100644
index ce67a5952..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package unix
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
- if errno == 0 {
- return nil
- }
- return errno
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
deleted file mode 100644
index 362831c3f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm
-
-// Copyright 2014 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 file.
-
-package unix
-
-func init() {
- // On 32-bit Linux systems, the fcntl syscall that matches Go's
- // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
- fcntl64Syscall = SYS_FCNTL64
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo.go
deleted file mode 100644
index 94c823212..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build gccgo
-
-package unix
-
-import "syscall"
-
-// We can't use the gc-syntax .s files for gccgo. On the plus side
-// much of the functionality can be written directly in Go.
-
-//extern gccgoRealSyscall
-func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_c.c
deleted file mode 100644
index 07f6be039..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build gccgo
-
-#include <errno.h>
-#include <stdint.h>
-#include <unistd.h>
-
-#define _STRINGIFY2_(x) #x
-#define _STRINGIFY_(x) _STRINGIFY2_(x)
-#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
-
-// Call syscall from C code because the gccgo support for calling from
-// Go to C does not support varargs functions.
-
-struct ret {
- uintptr_t r;
- uintptr_t err;
-};
-
-struct ret
-gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
-{
- struct ret r;
-
- errno = 0;
- r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- r.err = errno;
- return r;
-}
-
-// Define the use function in C so that it is not inlined.
-
-extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
-
-void
-use(void *p __attribute__ ((unused)))
-{
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
deleted file mode 100644
index bffe1a77d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build gccgo,linux,amd64
-
-package unix
-
-import "syscall"
-
-//extern gettimeofday
-func realGettimeofday(*Timeval, *byte) int32
-
-func gettimeofday(tv *Timeval) (err syscall.Errno) {
- r := realGettimeofday(tv, nil)
- if r < 0 {
- return syscall.GetErrno()
- }
- return 0
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
deleted file mode 100644
index 56332692c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build gccgo,linux,sparc64
-
-package unix
-
-import "syscall"
-
-//extern sysconf
-func realSysconf(name int) int64
-
-func sysconf(name int) (n int64, err syscall.Errno) {
- r := realSysconf(name)
- if r < 0 {
- return 0, syscall.GetErrno()
- }
- return r, 0
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkall.sh
deleted file mode 100755
index 2a1473f16..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkall.sh
+++ /dev/null
@@ -1,292 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 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 file.
-
-# The unix package provides access to the raw system call
-# interface of the underlying operating system. Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process. The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system. Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated. Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension). The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers. The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-GOOSARCH_in=syscall_$GOOSARCH.go
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm)
- mkerrors="$mkerrors"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_amd64)
- unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm64)
- unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mksysnum="./mksysnum_linux.pl $unistd_h"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_ppc64)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_ppc64le)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_s390x)
- GOOSARCH_in=syscall_linux_s390x.go
- unistd_h=/usr/include/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- # Let the type of C char be signed to make the bare sys
- # API more consistent between platforms.
- # This is a deliberate departure from the way the syscall
- # package generates its version of the types file.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_sparc64)
- GOOSARCH_in=syscall_linux_sparc64.go
- unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then
- echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
- echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go";
- fi
-) | $run
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkerrors.sh
deleted file mode 100755
index 33b7922bd..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ /dev/null
@@ -1,483 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 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 file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-if test -z "$GOARCH" -o -z "$GOOS"; then
- echo 1>&2 "GOARCH or GOOS not defined in environment"
- exit 1
-fi
-
-CC=${CC:-cc}
-
-if [[ "$GOOS" -eq "solaris" ]]; then
- # Assumes GNU versions of utilities in PATH.
- export PATH=/usr/gnu/bin:$PATH
-fi
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/ptrace.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <termios.h>
-'
-
-includes_DragonFly='
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <net/ip_mroute/ip_mroute.h>
-'
-
-includes_FreeBSD='
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <sys/extattr.h>
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#ifndef __LP64__
-#define _FILE_OFFSET_BITS 64
-#endif
-#define _GNU_SOURCE
-
-#include <bits/sockaddr.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/prctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/if_ether.h>
-#include <linux/if_tun.h>
-#include <linux/if_packet.h>
-#include <linux/if_addr.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/reboot.h>
-#include <linux/rtnetlink.h>
-#include <linux/ptrace.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
-#include <linux/icmpv6.h>
-#include <linux/serial.h>
-#include <net/route.h>
-#include <asm/termbits.h>
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-
-#ifndef PTRACE_GETREGS
-#define PTRACE_GETREGS 0xc
-#endif
-
-#ifndef PTRACE_SETREGS
-#define PTRACE_SETREGS 0xd
-#endif
-
-#ifdef SOL_BLUETOOTH
-// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
-// but it is already in bluetooth_linux.go
-#undef SOL_BLUETOOTH
-#endif
-'
-
-includes_NetBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-
-// Needed since <sys/param.h> refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-#include <net/if_bridge.h>
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED 0x1
-#define EMUL_NATIVE 0x2
-#define IPV6_FAITH 0x1d
-#define IPV6_OPTIONS 0x1
-#define IPV6_RTHDR_STRICT 0x1
-#define IPV6_SOCKOPT_RESERVED1 0x3
-#define SIOCGIFGENERIC 0xc020693a
-#define SIOCSIFGENERIC 0x80206939
-#define WALTSIG 0x4
-'
-
-includes_SunOS='
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-'
-
-
-includes='
-#include <sys/types.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-#include <netinet/tcp.h>
-#include <errno.h>
-#include <sys/signal.h>
-#include <signal.h>
-#include <sys/resource.h>
-#include <time.h>
-'
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
- echo package unix
- echo
- echo '/*'
- indirect="includes_$(uname)"
- echo "${!indirect} $includes"
- echo '*/'
- echo 'import "C"'
- echo 'import "syscall"'
- echo
- echo 'const ('
-
- # The gcc command line prints all the #defines
- # it encounters while processing the input
- echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
- awk '
- $1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
- $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
- $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
- $2 ~ /^(SCM_SRCRT)$/ {next}
- $2 ~ /^(MAP_FAILED)$/ {next}
- $2 ~ /^ELF_.*$/ {next}# <asm/elf.h> contains ELF_ARCH, etc.
-
- $2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
- $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
-
- $2 !~ /^ETH_/ &&
- $2 !~ /^EPROC_/ &&
- $2 !~ /^EQUIV_/ &&
- $2 !~ /^EXPR_/ &&
- $2 ~ /^E[A-Z0-9_]+$/ ||
- $2 ~ /^B[0-9_]+$/ ||
- $2 == "BOTHER" ||
- $2 ~ /^CI?BAUD(EX)?$/ ||
- $2 == "IBSHIFT" ||
- $2 ~ /^V[A-Z0-9]+$/ ||
- $2 ~ /^CS[A-Z0-9]/ ||
- $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
- $2 ~ /^IGN/ ||
- $2 ~ /^IX(ON|ANY|OFF)$/ ||
- $2 ~ /^IN(LCR|PCK)$/ ||
- $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
- $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
- $2 == "BRKINT" ||
- $2 == "HUPCL" ||
- $2 == "PENDIN" ||
- $2 == "TOSTOP" ||
- $2 == "XCASE" ||
- $2 == "ALTWERASE" ||
- $2 == "NOKERNINFO" ||
- $2 ~ /^PAR/ ||
- $2 ~ /^SIG[^_]/ ||
- $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
- $2 ~ /^O?XTABS$/ ||
- $2 ~ /^TC[IO](ON|OFF)$/ ||
- $2 ~ /^IN_/ ||
- $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
- $2 == "ICMPV6_FILTER" ||
- $2 == "SOMAXCONN" ||
- $2 == "NAME_MAX" ||
- $2 == "IFNAMSIZ" ||
- $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
- $2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
- $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
- $2 ~ /^LINUX_REBOOT_CMD_/ ||
- $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
- $2 !~ "NLA_TYPE_MASK" &&
- $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
- $2 ~ /^SIOC/ ||
- $2 ~ /^TIOC/ ||
- $2 ~ /^TCGET/ ||
- $2 ~ /^TCSET/ ||
- $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
- $2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
- $2 ~ /^BIOC/ ||
- $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
- $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
- $2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL)$/ &&
- $2 ~ /^(BPF|DLT)_/ ||
- $2 ~ /^CLOCK_/ ||
- $2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
- $2 ~ /^__WCOREFLAG$/ {next}
- $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
- {next}
- ' | sort
-
- echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
- echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
- sort
-)
-
-# Pull out the signal names for later.
-signals=$(
- echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort
-)
-
-# Again, writing regexps to a file.
-echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
- sort >_error.grep
-echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
-echo
-echo "// +build ${GOARCH},${GOOS}"
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
- echo -E "
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <string.h>
-#include <signal.h>
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
- for i in $errors
- do
- echo -E ' '$i,
- done
-
- echo -E "
-};
-
-int signals[] = {
-"
- for i in $signals
- do
- echo -E ' '$i,
- done
-
- # Use -E because on some systems bash builtin interprets \n itself.
- echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
- return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
- int i, j, e;
- char buf[1024], *p;
-
- printf("\n\n// Error table\n");
- printf("var errors = [...]string {\n");
- qsort(errors, nelem(errors), sizeof errors[0], intcmp);
- for(i=0; i<nelem(errors); i++) {
- e = errors[i];
- if(i > 0 && errors[i-1] == e)
- continue;
- strcpy(buf, strerror(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- printf("\n\n// Signal table\n");
- printf("var signals = [...]string {\n");
- qsort(signals, nelem(signals), sizeof signals[0], intcmp);
- for(i=0; i<nelem(signals); i++) {
- e = signals[i];
- if(i > 0 && signals[i-1] == e)
- continue;
- strcpy(buf, strsignal(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- // cut trailing : number.
- p = strrchr(buf, ":"[0]);
- if(p)
- *p = '\0';
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkpost.go
deleted file mode 100644
index ed50d902a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mkpost.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-// mkpost processes the output of cgo -godefs to
-// modify the generated types. It is used to clean up
-// the sys API in an architecture specific manner.
-//
-// mkpost is run after cgo -godefs by mkall.sh.
-package main
-
-import (
- "fmt"
- "go/format"
- "io/ioutil"
- "log"
- "os"
- "regexp"
-)
-
-func main() {
- b, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- log.Fatal(err)
- }
- s := string(b)
-
- goarch := os.Getenv("GOARCH")
- goos := os.Getenv("GOOS")
- if goarch == "s390x" && goos == "linux" {
- // Export the types of PtraceRegs fields.
- re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)")
- s = re.ReplaceAllString(s, "Ptrace$1")
-
- // Replace padding fields inserted by cgo with blank identifiers.
- re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*")
- s = re.ReplaceAllString(s, "_")
-
- // Replace other unwanted fields with blank identifiers.
- re = regexp.MustCompile("X_[A-Za-z0-9_]*")
- s = re.ReplaceAllString(s, "_")
-
- // Replace the control_regs union with a blank identifier for now.
- re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64")
- s = re.ReplaceAllString(s, "_ [0]uint64")
- }
-
- // gofmt
- b, err = format.Source([]byte(s))
- if err != nil {
- log.Fatal(err)
- }
-
- // Append this command to the header to show where the new file
- // came from.
- re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)")
- b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go"))
-
- fmt.Printf("%s", b)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall.pl
deleted file mode 100755
index b1e7766da..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall.pl
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-
-# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call. This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-if($ARGV[0] eq "-plan9") {
- $plan9 = 1;
- shift;
-}
-if($ARGV[0] eq "-openbsd") {
- $openbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-netbsd") {
- $netbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-dragonfly") {
- $dragonfly = 1;
- shift;
-}
-if($ARGV[0] eq "-arm") {
- $arm = 1;
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, errno error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # Try in vain to keep people from editing this file.
- # The theory is that they jump into the middle of the file
- # without reading the header.
- $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
- # Go function header.
- my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my @uses = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass dummy pointer in that case.
- # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
- $text .= "\tvar _p$n unsafe.Pointer\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
- $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
- $text .= "\n";
- push @args, "uintptr(_p$n)", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && ($openbsd || $netbsd)) {
- push @args, "0";
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $dragonfly) {
- if ($func !~ /^extp(read|write)/i) {
- push @args, "0";
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $_32bit ne "") {
- if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
- # (even, odd) pair
- push @args, "0"
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- }
- } else {
- push @args, "uintptr($name)";
- }
- }
-
- # Determine which form to use; pad args with zeros.
- my $asm = "Syscall";
- if ($nonblock) {
- $asm = "RawSyscall";
- }
- if(@args <= 3) {
- while(@args < 3) {
- push @args, "0";
- }
- } elsif(@args <= 6) {
- $asm .= "6";
- while(@args < 6) {
- push @args, "0";
- }
- } elsif(@args <= 9) {
- $asm .= "9";
- while(@args < 9) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # System call number.
- if($sysname eq "") {
- $sysname = "SYS_$func";
- $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
- $sysname =~ y/a-z/A-Z/;
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysname, $args)";
-
- # Assign return values.
- my $body = "";
- my @ret = ("_", "_", "_");
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err" && !$plan9) {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } elsif($name eq "err" && $plan9) {
- $ret[0] = "r0";
- $ret[2] = "e1";
- next;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1" || $plan9) {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
- $text .= $body;
-
- if ($plan9 && $ret[2] eq "e1") {
- $text .= "\tif int32(r0) == -1 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- } elsif ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = errnoErr(e1)\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
- exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-$text
-EOF
-exit 0;
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
deleted file mode 100755
index 06bade768..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-
-# This program reads a file containing function prototypes
-# (like syscall_solaris.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named err.
-# * If go func name needs to be different than its libc name,
-# * or the function is not in libc, name could be specified
-# * at the end, after "=" sign, like
-# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
-
-use strict;
-
-my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-
-binmode STDOUT;
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $package = "";
-my $text = "";
-my $dynimports = "";
-my $linknames = "";
-my @vars = ();
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- $package = $1 if !$package && /^package (\S+)$/;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, err error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # So file name.
- if($modname eq "") {
- $modname = "libc";
- }
-
- # System call name.
- if($sysname eq "") {
- $sysname = "$func";
- }
-
- # System call pointer variable name.
- my $sysvarname = "proc$sysname";
-
- my $strconvfunc = "BytePtrFromString";
- my $strconvtype = "*byte";
-
- $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
-
- # Runtime import of function to allow cross-platform builds.
- $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
- # Link symbol to proc address variable.
- $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
- # Library proc address variable.
- push @vars, $sysvarname;
-
- # Go function header.
- $out = join(', ', @out);
- if($out ne "") {
- $out = " ($out)";
- }
- if($text ne "") {
- $text .= "\n"
- }
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my @uses = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, _ = $strconvfunc($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass nil in that case.
- $text .= "\tvar _p$n *$1\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && $_32bit ne "") {
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name >> 32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name >> 32)";
- }
- } elsif($type eq "bool") {
- $text .= "\tvar _p$n uint32\n";
- $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
- push @args, "uintptr(_p$n)";
- $n++;
- } else {
- push @args, "uintptr($name)";
- }
- }
- my $nargs = @args;
-
- # Determine which form to use; pad args with zeros.
- my $asm = "sysvicall6";
- if ($nonblock) {
- $asm = "rawSysvicall6";
- }
- if(@args <= 6) {
- while(@args < 6) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
-
- # Assign return values.
- my $body = "";
- my $failexpr = "";
- my @ret = ("_", "_", "_");
- my @pout= ();
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err") {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1") {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
- $text .= $body;
-
- if ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n";
-}
-
-if($errors) {
- exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package $package
-
-import (
- "syscall"
- "unsafe"
-)
-EOF
-
-print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
-
-my $vardecls = "\t" . join(",\n\t", @vars);
-$vardecls .= " syscallFunc";
-
-chomp($_=<<EOF);
-
-$dynimports
-$linknames
-var (
-$vardecls
-)
-
-$text
-EOF
-print $_;
-exit 0;
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
deleted file mode 100755
index be67afa41..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
+++ /dev/null
@@ -1,264 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright 2011 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 file.
-
-#
-# Parse the header files for OpenBSD and generate a Go usable sysctl MIB.
-#
-# Build a MIB with each entry being an array containing the level, type and
-# a hash that will contain additional entries if the current entry is a node.
-# We then walk this MIB and create a flattened sysctl name to OID hash.
-#
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $debug = 0;
-my %ctls = ();
-
-my @headers = qw (
- sys/sysctl.h
- sys/socket.h
- sys/tty.h
- sys/malloc.h
- sys/mount.h
- sys/namei.h
- sys/sem.h
- sys/shm.h
- sys/vmmeter.h
- uvm/uvm_param.h
- uvm/uvm_swap_encrypt.h
- ddb/db_var.h
- net/if.h
- net/if_pfsync.h
- net/pipex.h
- netinet/in.h
- netinet/icmp_var.h
- netinet/igmp_var.h
- netinet/ip_ah.h
- netinet/ip_carp.h
- netinet/ip_divert.h
- netinet/ip_esp.h
- netinet/ip_ether.h
- netinet/ip_gre.h
- netinet/ip_ipcomp.h
- netinet/ip_ipip.h
- netinet/pim_var.h
- netinet/tcp_var.h
- netinet/udp_var.h
- netinet6/in6.h
- netinet6/ip6_divert.h
- netinet6/pim6_var.h
- netinet/icmp6.h
- netmpls/mpls.h
-);
-
-my @ctls = qw (
- kern
- vm
- fs
- net
- #debug # Special handling required
- hw
- #machdep # Arch specific
- user
- ddb
- #vfs # Special handling required
- fs.posix
- kern.forkstat
- kern.intrcnt
- kern.malloc
- kern.nchstats
- kern.seminfo
- kern.shminfo
- kern.timecounter
- kern.tty
- kern.watchdog
- net.bpf
- net.ifq
- net.inet
- net.inet.ah
- net.inet.carp
- net.inet.divert
- net.inet.esp
- net.inet.etherip
- net.inet.gre
- net.inet.icmp
- net.inet.igmp
- net.inet.ip
- net.inet.ip.ifq
- net.inet.ipcomp
- net.inet.ipip
- net.inet.mobileip
- net.inet.pfsync
- net.inet.pim
- net.inet.tcp
- net.inet.udp
- net.inet6
- net.inet6.divert
- net.inet6.ip6
- net.inet6.icmp6
- net.inet6.pim6
- net.inet6.tcp6
- net.inet6.udp6
- net.mpls
- net.mpls.ifq
- net.key
- net.pflow
- net.pfsync
- net.pipex
- net.rt
- vm.swapencrypt
- #vfsgenctl # Special handling required
-);
-
-# Node name "fixups"
-my %ctl_map = (
- "ipproto" => "net.inet",
- "net.inet.ipproto" => "net.inet",
- "net.inet6.ipv6proto" => "net.inet6",
- "net.inet6.ipv6" => "net.inet6.ip6",
- "net.inet.icmpv6" => "net.inet6.icmp6",
- "net.inet6.divert6" => "net.inet6.divert",
- "net.inet6.tcp6" => "net.inet.tcp",
- "net.inet6.udp6" => "net.inet.udp",
- "mpls" => "net.mpls",
- "swpenc" => "vm.swapencrypt"
-);
-
-# Node mappings
-my %node_map = (
- "net.inet.ip.ifq" => "net.ifq",
- "net.inet.pfsync" => "net.pfsync",
- "net.mpls.ifq" => "net.ifq"
-);
-
-my $ctlname;
-my %mib = ();
-my %sysctl = ();
-my $node;
-
-sub debug() {
- print STDERR "$_[0]\n" if $debug;
-}
-
-# Walk the MIB and build a sysctl name to OID mapping.
-sub build_sysctl() {
- my ($node, $name, $oid) = @_;
- my %node = %{$node};
- my @oid = @{$oid};
-
- foreach my $key (sort keys %node) {
- my @node = @{$node{$key}};
- my $nodename = $name.($name ne '' ? '.' : '').$key;
- my @nodeoid = (@oid, $node[0]);
- if ($node[1] eq 'CTLTYPE_NODE') {
- if (exists $node_map{$nodename}) {
- $node = \%mib;
- $ctlname = $node_map{$nodename};
- foreach my $part (split /\./, $ctlname) {
- $node = \%{@{$$node{$part}}[2]};
- }
- } else {
- $node = $node[2];
- }
- &build_sysctl($node, $nodename, \@nodeoid);
- } elsif ($node[1] ne '') {
- $sysctl{$nodename} = \@nodeoid;
- }
- }
-}
-
-foreach my $ctl (@ctls) {
- $ctls{$ctl} = $ctl;
-}
-
-# Build MIB
-foreach my $header (@headers) {
- &debug("Processing $header...");
- open HEADER, "/usr/include/$header" ||
- print STDERR "Failed to open $header\n";
- while (<HEADER>) {
- if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
- $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
- $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
- if ($1 eq 'CTL_NAMES') {
- # Top level.
- $node = \%mib;
- } else {
- # Node.
- my $nodename = lc($2);
- if ($header =~ /^netinet\//) {
- $ctlname = "net.inet.$nodename";
- } elsif ($header =~ /^netinet6\//) {
- $ctlname = "net.inet6.$nodename";
- } elsif ($header =~ /^net\//) {
- $ctlname = "net.$nodename";
- } else {
- $ctlname = "$nodename";
- $ctlname =~ s/^(fs|net|kern)_/$1\./;
- }
- if (exists $ctl_map{$ctlname}) {
- $ctlname = $ctl_map{$ctlname};
- }
- if (not exists $ctls{$ctlname}) {
- &debug("Ignoring $ctlname...");
- next;
- }
-
- # Walk down from the top of the MIB.
- $node = \%mib;
- foreach my $part (split /\./, $ctlname) {
- if (not exists $$node{$part}) {
- &debug("Missing node $part");
- $$node{$part} = [ 0, '', {} ];
- }
- $node = \%{@{$$node{$part}}[2]};
- }
- }
-
- # Populate current node with entries.
- my $i = -1;
- while (defined($_) && $_ !~ /^}/) {
- $_ = <HEADER>;
- $i++ if $_ =~ /{.*}/;
- next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
- $$node{$1} = [ $i, $2, {} ];
- }
- }
- }
- close HEADER;
-}
-
-&build_sysctl(\%mib, "", []);
-
-print <<EOF;
-// mksysctl_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix;
-
-type mibentry struct {
- ctlname string
- ctloid []_C_int
-}
-
-var sysctlMib = []mibentry {
-EOF
-
-foreach my $name (sort keys %sysctl) {
- my @oid = @{$sysctl{$name}};
- print "\t{ \"$name\", []_C_int{ ", join(', ', @oid), " } }, \n";
-}
-
-print <<EOF;
-}
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
deleted file mode 100755
index d3e5147fc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-#
-# Generate system call table for Darwin from sys/syscall.h
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
- if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
- my $name = $1;
- my $num = $2;
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;"
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
deleted file mode 100755
index 266a248c7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-#
-# Generate system call table for DragonFly from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
deleted file mode 100755
index b767e124c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-#
-# Generate system call table for FreeBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
- if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
- next
- }
-
- print " $name = $num; // $proto\n";
-
- # We keep Capsicum syscall numbers for FreeBSD
- # 9-STABLE here because we are not sure whether they
- # are mature and stable.
- if($num == 513){
- print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
- print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
- print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
- print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
- }
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_linux.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
deleted file mode 100755
index 4d4017deb..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const(
-EOF
-
-sub fmt {
- my ($name, $num) = @_;
- if($num > 999){
- # ignore deprecated syscalls that are no longer implemented
- # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
- return;
- }
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;\n";
-}
-
-my $prev;
-open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
-while(<GCC>){
- if(/^#define __NR_syscalls\s+/) {
- # ignore redefinitions of __NR_syscalls
- }
- elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
- fmt($1, $prev+$2)
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
deleted file mode 100755
index e74616a65..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-#
-# Generate system call table for OpenBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-my $line = '';
-while(<>){
- if($line =~ /^(.*)\\$/) {
- # Handle continuation
- $line = $1;
- $_ =~ s/^\s+//;
- $line .= $_;
- } else {
- # New line
- $line = $_;
- }
- next if $line =~ /\\$/;
- if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
- my $num = $1;
- my $proto = $6;
- my $compat = $8;
- my $name = "$7_$9";
-
- $name = "$7_$11" if $11 ne '';
- $name =~ y/a-z/A-Z/;
-
- if($compat eq '' || $compat eq '30' || $compat eq '50') {
- print " $name = $num; // $proto\n";
- }
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
deleted file mode 100755
index ae5aad586..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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 file.
-#
-# Generate system call table for OpenBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
- my $num = $1;
- my $proto = $3;
- my $name = $4;
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race.go
deleted file mode 100644
index 3c7627eb5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin,race linux,race freebsd,race
-
-package unix
-
-import (
- "runtime"
- "unsafe"
-)
-
-const raceenabled = true
-
-func raceAcquire(addr unsafe.Pointer) {
- runtime.RaceAcquire(addr)
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
- runtime.RaceReleaseMerge(addr)
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
- runtime.RaceReadRange(addr, len)
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
- runtime.RaceWriteRange(addr, len)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race0.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race0.go
deleted file mode 100644
index f8678e0d2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/race0.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
-
-package unix
-
-import (
- "unsafe"
-)
-
-const raceenabled = false
-
-func raceAcquire(addr unsafe.Pointer) {
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
deleted file mode 100644
index d9ff4731a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2011 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 file.
-
-// Socket control messages
-
-package unix
-
-import "unsafe"
-
-// UnixCredentials encodes credentials into a socket control message
-// for sending to another process. This can be used for
-// authentication.
-func UnixCredentials(ucred *Ucred) []byte {
- b := make([]byte, CmsgSpace(SizeofUcred))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_CREDENTIALS
- h.SetLen(CmsgLen(SizeofUcred))
- *((*Ucred)(cmsgData(h))) = *ucred
- return b
-}
-
-// ParseUnixCredentials decodes a socket control message that contains
-// credentials in a Ucred structure. To receive such a message, the
-// SO_PASSCRED option must be enabled on the socket.
-func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_CREDENTIALS {
- return nil, EINVAL
- }
- ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
- return &ucred, nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
deleted file mode 100644
index f1493a3e6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2011 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Socket control messages
-
-package unix
-
-import "unsafe"
-
-// Round the length of a raw sockaddr up to align it properly.
-func cmsgAlignOf(salen int) int {
- salign := sizeofPtr
- // NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels
- // still require 32-bit aligned access to network subsystem.
- if darwin64Bit || dragonfly64Bit {
- salign = 4
- }
- return (salen + salign - 1) & ^(salign - 1)
-}
-
-// CmsgLen returns the value to store in the Len field of the Cmsghdr
-// structure, taking into account any necessary alignment.
-func CmsgLen(datalen int) int {
- return cmsgAlignOf(SizeofCmsghdr) + datalen
-}
-
-// CmsgSpace returns the number of bytes an ancillary element with
-// payload of the passed data length occupies.
-func CmsgSpace(datalen int) int {
- return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)
-}
-
-func cmsgData(h *Cmsghdr) unsafe.Pointer {
- return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
-}
-
-// SocketControlMessage represents a socket control message.
-type SocketControlMessage struct {
- Header Cmsghdr
- Data []byte
-}
-
-// ParseSocketControlMessage parses b as an array of socket control
-// messages.
-func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
- var msgs []SocketControlMessage
- i := 0
- for i+CmsgLen(0) <= len(b) {
- h, dbuf, err := socketControlMessageHeaderAndData(b[i:])
- if err != nil {
- return nil, err
- }
- m := SocketControlMessage{Header: *h, Data: dbuf}
- msgs = append(msgs, m)
- i += cmsgAlignOf(int(h.Len))
- }
- return msgs, nil
-}
-
-func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
- return nil, nil, EINVAL
- }
- return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
-}
-
-// UnixRights encodes a set of open file descriptors into a socket
-// control message for sending to another process.
-func UnixRights(fds ...int) []byte {
- datalen := len(fds) * 4
- b := make([]byte, CmsgSpace(datalen))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_RIGHTS
- h.SetLen(CmsgLen(datalen))
- data := cmsgData(h)
- for _, fd := range fds {
- *(*int32)(data) = int32(fd)
- data = unsafe.Pointer(uintptr(data) + 4)
- }
- return b
-}
-
-// ParseUnixRights decodes a socket control message that contains an
-// integer array of open file descriptors from another process.
-func ParseUnixRights(m *SocketControlMessage) ([]int, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_RIGHTS {
- return nil, EINVAL
- }
- fds := make([]int, len(m.Data)>>2)
- for i, j := 0, 0; i < len(m.Data); i += 4 {
- fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))
- j++
- }
- return fds, nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/str.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 35ed66435..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + uitoa(uint(-val))
- }
- return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall.go
deleted file mode 100644
index a0bcf842c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Package unix contains an interface to the low-level operating system
-// primitives. OS details vary depending on the underlying system, and
-// by default, godoc will display OS-specific documentation for the current
-// system. If you want godoc to display OS documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
-// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
-// to freebsd and $GOARCH to arm.
-// The primary use of this package is inside other packages that provide a more
-// portable interface to the system, such as "os", "time" and "net". Use
-// those packages rather than this one if you can.
-// For details of the functions and data types in this package consult
-// the manuals for the appropriate operating system.
-// These calls return err == nil to indicate success; otherwise
-// err represents an operating system error describing the failure and
-// holds a value of type syscall.Errno.
-package unix // import "golang.org/x/sys/unix"
-
-import "unsafe"
-
-// ByteSliceFromString returns a NUL-terminated slice of bytes
-// containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- a := make([]byte, len(s)+1)
- copy(a, s)
- return a, nil
-}
-
-// BytePtrFromString returns a pointer to a NUL-terminated array of
-// bytes containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func BytePtrFromString(s string) (*byte, error) {
- a, err := ByteSliceFromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mkunix.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
- return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
- return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
- return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
- return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-// use is a no-op, but the compiler cannot see that it is.
-// Calling use(p) ensures that p is kept live until that point.
-//go:noescape
-func use(p unsafe.Pointer)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_bsd.go
deleted file mode 100644
index e9671764c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// BSD system call wrappers shared by *BSD based systems
-// including OS X (Darwin) and FreeBSD. Like the other
-// syscall_*.go files it is compiled as Go code but also
-// used as input to mksyscall which parses the //sys
-// lines and generates system call stubs.
-
-package unix
-
-import (
- "runtime"
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 16 on BSD.
- if n < 0 || n > 1000 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // 64 bits should be enough. (32 bits isn't even on 386). Since the
- // actual system call is getdirentries64, 64 is a good guess.
- // TODO(rsc): Can we use a single global basep for all calls?
- var base = (*uintptr)(unsafe.Pointer(new(uint64)))
- return Getdirentries(fd, buf, base)
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys Shutdown(s int, how int) (err error)
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet4
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet6
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) || n == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Index == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = sa.Len
- sa.raw.Family = AF_LINK
- sa.raw.Index = sa.Index
- sa.raw.Type = sa.Type
- sa.raw.Nlen = sa.Nlen
- sa.raw.Alen = sa.Alen
- sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_LINK:
- pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
- sa := new(SockaddrDatalink)
- sa.Len = pp.Len
- sa.Family = pp.Family
- sa.Index = pp.Index
- sa.Type = pp.Type
- sa.Nlen = pp.Nlen
- sa.Alen = pp.Alen
- sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- if pp.Len < 2 || pp.Len > SizeofSockaddrUnix {
- return nil, EINVAL
- }
- sa := new(SockaddrUnix)
-
- // Some BSDs include the trailing NUL in the length, whereas
- // others do not. Work around this by subtracting the leading
- // family and len. The path is then scanned to see if a NUL
- // terminator still exists within the length.
- n := int(pp.Len) - 2 // subtract leading Family, Len
- for i := 0; i < n; i++ {
- if pp.Path[i] == 0 {
- // found early NUL; assume Len included the NUL
- // or was overestimating.
- n = i
- break
- }
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- if runtime.GOOS == "darwin" && len == 0 {
- // Accepted socket has no address.
- // This is likely due to a bug in xnu kernels,
- // where instead of ECONNABORTED error socket
- // is accepted, but has no address.
- Close(nfd)
- return 0, nil, ECONNABORTED
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
- // reported upstream.
- if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
- rsa.Addr.Family = AF_UNIX
- rsa.Addr.Len = SizeofSockaddrUnix
- }
- return anyToSockaddr(&rsa)
-}
-
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-
-func GetsockoptByte(fd, level, opt int) (value byte, err error) {
- var n byte
- vallen := _Socklen(1)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return n, err
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)
-
-func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {
- var change, event unsafe.Pointer
- if len(changes) > 0 {
- change = unsafe.Pointer(&changes[0])
- }
- if len(events) > 0 {
- event = unsafe.Pointer(&events[0])
- }
- return kevent(kq, change, len(changes), event, len(events), timeout)
-}
-
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
-// sysctlmib translates name to mib number and appends any additional args.
-func sysctlmib(name string, args ...int) ([]_C_int, error) {
- // Translate name to mib number.
- mib, err := nametomib(name)
- if err != nil {
- return nil, err
- }
-
- for _, a := range args {
- mib = append(mib, _C_int(a))
- }
-
- return mib, nil
-}
-
-func Sysctl(name string) (string, error) {
- return SysctlArgs(name)
-}
-
-func SysctlArgs(name string, args ...int) (string, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return "", err
- }
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return "", err
- }
- if n == 0 {
- return "", nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return "", err
- }
-
- // Throw away terminating NUL.
- if n > 0 && buf[n-1] == '\x00' {
- n--
- }
- return string(buf[0:n]), nil
-}
-
-func SysctlUint32(name string) (uint32, error) {
- return SysctlUint32Args(name)
-}
-
-func SysctlUint32Args(name string, args ...int) (uint32, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(4)
- buf := make([]byte, 4)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 4 {
- return 0, EIO
- }
- return *(*uint32)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlUint64(name string, args ...int) (uint64, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(8)
- buf := make([]byte, 8)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 8 {
- return 0, EIO
- }
- return *(*uint64)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlRaw(name string, args ...int) ([]byte, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return nil, err
- }
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return nil, err
- }
-
- // The actual call may return less than the original reported required
- // size so ensure we deal with that.
- return buf[:n], nil
-}
-
-//sys utimes(path string, timeval *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimes(path, nil)
- }
- // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
- // isn't supported by darwin so this uses utimes instead
- if len(ts) != 2 {
- return EINVAL
- }
- // Not as efficient as it could be because Timespec and
- // Timeval have different types in the different OSes
- tv := [2]Timeval{
- NsecToTimeval(TimespecToNsec(ts[0])),
- NsecToTimeval(TimespecToNsec(ts[1])),
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys futimes(fd int, timeval *[2]Timeval) (err error)
-
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimes(fd, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// TODO: wrap
-// Acct(name nil-string) (err error)
-// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
-// Madvise(addr *byte, len int, behav int) (err error)
-// Mprotect(addr *byte, len int, prot int) (err error)
-// Msync(addr *byte, len int, flags int) (err error)
-// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin.go
deleted file mode 100644
index 3d534d2da..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ /dev/null
@@ -1,511 +0,0 @@
-// Copyright 2009,2010 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 file.
-
-// Darwin system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- errorspkg "errors"
- "syscall"
- "unsafe"
-)
-
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
- buf := make([]byte, 2048)
- attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
- if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
- wd := string(attrs[0])
- // Sanity check that it's an absolute path and ends
- // in a null byte, which we then strip.
- if wd[0] == '/' && wd[len(wd)-1] == 0 {
- return wd[:len(wd)-1], nil
- }
- }
- // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
- // slow algorithm.
- return "", ENOTSUP
-}
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
-func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
- if len(attrBuf) < 4 {
- return nil, errorspkg.New("attrBuf too small")
- }
- attrList.bitmapCount = attrBitMapCount
-
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- _, _, e1 := Syscall6(
- SYS_GETATTRLIST,
- uintptr(unsafe.Pointer(_p0)),
- uintptr(unsafe.Pointer(&attrList)),
- uintptr(unsafe.Pointer(&attrBuf[0])),
- uintptr(len(attrBuf)),
- uintptr(options),
- 0,
- )
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- return nil, e1
- }
- size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
- // dat is the section of attrBuf that contains valid data,
- // without the 4 byte length header. All attribute offsets
- // are relative to dat.
- dat := attrBuf
- if int(size) < len(attrBuf) {
- dat = dat[:size]
- }
- dat = dat[4:] // remove length prefix
-
- for i := uint32(0); int(i) < len(dat); {
- header := dat[i:]
- if len(header) < 8 {
- return attrs, errorspkg.New("truncated attribute header")
- }
- datOff := *(*int32)(unsafe.Pointer(&header[0]))
- attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
- if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
- return attrs, errorspkg.New("truncated results; attrBuf too small")
- }
- end := uint32(datOff) + attrLen
- attrs = append(attrs, dat[datOff:end])
- i = end
- if r := i % 4; r != 0 {
- i += (4 - r)
- }
- }
- return
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Wrapped
- */
-
-//sys kill(pid int, signum int, posix int) (err error)
-
-func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exchangedata(path1 string, path2 string, options int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Getuid() (uid int)
-//sysnb Issetugid() (tainted bool)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sys Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setprivexec(flag int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
deleted file mode 100644
index c172a3da5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build 386,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
deleted file mode 100644
index fc1e5a4a8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
deleted file mode 100644
index d286cf408..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2015 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 file.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
deleted file mode 100644
index c33905cdc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build arm64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 16384 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
deleted file mode 100644
index ec408ee78..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2009,2010 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 file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- reclen := int(16+dirent.Namlen+1+7) & ^7
- buf = buf[reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- return extpread(fd, p, 0, offset)
-}
-
-//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- return extpwrite(fd, p, 0, offset)
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
deleted file mode 100644
index da7cb7982..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,dragonfly
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd.go
deleted file mode 100644
index 520ccbeaf..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ /dev/null
@@ -1,683 +0,0 @@
-// Copyright 2009,2010 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 file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, errno
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// Derive extattr namespace and attribute name
-
-func xattrnamespace(fullattr string) (ns int, attr string, err error) {
- s := -1
- for idx, val := range fullattr {
- if val == '.' {
- s = idx
- break
- }
- }
-
- if s == -1 {
- return -1, "", ENOATTR
- }
-
- namespace := fullattr[0:s]
- attr = fullattr[s+1:]
-
- switch namespace {
- case "user":
- return EXTATTR_NAMESPACE_USER, attr, nil
- case "system":
- return EXTATTR_NAMESPACE_SYSTEM, attr, nil
- default:
- return -1, "", ENOATTR
- }
-}
-
-func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
- if len(dest) > idx {
- return unsafe.Pointer(&dest[idx])
- } else {
- return unsafe.Pointer(_zero)
- }
-}
-
-// FreeBSD implements its own syscalls to handle extended attributes
-
-func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
-}
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
-}
-
-func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
-}
-
-// flags are unused on FreeBSD
-
-func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Setxattr(file string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Removexattr(file string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFile(file, nsid, a)
- return
-}
-
-func Fremovexattr(fd int, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFd(fd, nsid, a)
- return
-}
-
-func Lremovexattr(link string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteLink(link, nsid, a)
- return
-}
-
-func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- // FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
-
- /* Errors accessing system attrs are ignored so that
- * we can implement the Linux-like behavior of omitting errors that
- * we don't have read permissions on
- *
- * Linux will still error if we ask for user attributes on a file that
- * we don't have read permissions on, so don't ignore those errors
- */
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Llistxattr(link string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
deleted file mode 100644
index 6a0cd804d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build 386,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
deleted file mode 100644
index e142540ef..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
deleted file mode 100644
index 5504cb125..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build arm,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux.go
deleted file mode 100644
index cfac4a440..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ /dev/null
@@ -1,1110 +0,0 @@
-// Copyright 2009 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 file.
-
-// Linux system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and
-// wrap it in our own nicer implementation.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-func Access(path string, mode uint32) (err error) {
- return Faccessat(AT_FDCWD, path, mode, 0)
-}
-
-func Chmod(path string, mode uint32) (err error) {
- return Fchmodat(AT_FDCWD, path, mode, 0)
-}
-
-func Chown(path string, uid int, gid int) (err error) {
- return Fchownat(AT_FDCWD, path, uid, gid, 0)
-}
-
-func Creat(path string, mode uint32) (fd int, err error) {
- return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
-}
-
-//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
-
-func Link(oldpath string, newpath string) (err error) {
- return Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- return Mkdirat(AT_FDCWD, path, mode)
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- return Mknodat(AT_FDCWD, path, mode, dev)
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm)
-}
-
-//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- return openat(dirfd, path, flags|O_LARGEFILE, mode)
-}
-
-//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
-
-func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- if len(fds) == 0 {
- return ppoll(nil, 0, timeout, sigmask)
- }
- return ppoll(&fds[0], len(fds), timeout, sigmask)
-}
-
-//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
-
-func Readlink(path string, buf []byte) (n int, err error) {
- return Readlinkat(AT_FDCWD, path, buf)
-}
-
-func Rename(oldpath string, newpath string) (err error) {
- return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath)
-}
-
-func Rmdir(path string) error {
- return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
-}
-
-//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
-
-func Symlink(oldpath string, newpath string) (err error) {
- return Symlinkat(oldpath, AT_FDCWD, newpath)
-}
-
-func Unlink(path string) error {
- return Unlinkat(AT_FDCWD, path, 0)
-}
-
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
- if tv == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- var ts [2]Timespec
- ts[0] = NsecToTimespec(TimevalToNsec(tv[0]))
- ts[1] = NsecToTimespec(TimevalToNsec(tv[1]))
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- // If the utimensat syscall isn't available (utimensat was added to Linux
- // in 2.6.22, Released, 8 July 2007) then fall back to utimes
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func Futimes(fd int, tv []Timeval) (err error) {
- // Believe it or not, this is the best we can do on Linux
- // (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- n, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- // Getcwd returns the number of bytes written to buf, including the NUL.
- if n < 1 || n > len(buf) || buf[n-1] != 0 {
- return "", EINVAL
- }
- return string(buf[0 : n-1]), nil
-}
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 1<<16 on Linux.
- if n < 0 || n > 1<<20 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-type WaitStatus uint32
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits. At least that's the idea.
-// There are various irregularities. For example, the
-// "continued" status is 0xFFFF, distinguishing itself
-// from stopped via the core dump bit.
-
-const (
- mask = 0x7F
- core = 0x80
- exited = 0x00
- stopped = 0x7F
- shift = 8
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
-
-func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
-
-func (w WaitStatus) Continued() bool { return w == 0xFFFF }
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) ExitStatus() int {
- if !w.Exited() {
- return -1
- }
- return int(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) Signal() syscall.Signal {
- if !w.Signaled() {
- return -1
- }
- return syscall.Signal(w & mask)
-}
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int {
- if w.StopSignal() != SIGTRAP {
- return -1
- }
- return int(w>>shift) >> 8
-}
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
- return Mknod(path, mode|S_IFIFO, 0)
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-type SockaddrLinklayer struct {
- Protocol uint16
- Ifindex int
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]byte
- raw RawSockaddrLinklayer
-}
-
-func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_PACKET
- sa.raw.Protocol = sa.Protocol
- sa.raw.Ifindex = int32(sa.Ifindex)
- sa.raw.Hatype = sa.Hatype
- sa.raw.Pkttype = sa.Pkttype
- sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
-}
-
-type SockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
- raw RawSockaddrNetlink
-}
-
-func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_NETLINK
- sa.raw.Pad = sa.Pad
- sa.raw.Pid = sa.Pid
- sa.raw.Groups = sa.Groups
- return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
-}
-
-type SockaddrHCI struct {
- Dev uint16
- Channel uint16
- raw RawSockaddrHCI
-}
-
-func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_BLUETOOTH
- sa.raw.Dev = sa.Dev
- sa.raw.Channel = sa.Channel
- return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_NETLINK:
- pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
- sa := new(SockaddrNetlink)
- sa.Family = pp.Family
- sa.Pad = pp.Pad
- sa.Pid = pp.Pid
- sa.Groups = pp.Groups
- return sa, nil
-
- case AF_PACKET:
- pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))
- sa := new(SockaddrLinklayer)
- sa.Protocol = pp.Protocol
- sa.Ifindex = int(pp.Ifindex)
- sa.Hatype = pp.Hatype
- sa.Pkttype = pp.Pkttype
- sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- if pp.Path[0] == 0 {
- // "Abstract" Unix domain socket.
- // Rewrite leading NUL as @ for textual display.
- // (This is the standard convention.)
- // Not friendly to overwrite in place,
- // but the callers below don't care.
- pp.Path[0] = '@'
- }
-
- // Assume path ends at NUL.
- // This is not technically the Linux semantics for
- // abstract Unix domain sockets--they are supposed
- // to be uninterpreted fixed-size binary blobs--but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
- var value Ucred
- vallen := _Socklen(SizeofUcred)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- var err error
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-// BindToDevice binds the socket associated with fd to device.
-func BindToDevice(fd int, device string) (err error) {
- return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
- // The peek requests are machine-size oriented, so we wrap it
- // to retrieve arbitrary-length data.
-
- // The ptrace syscall differs from glibc's ptrace.
- // Peeks returns the word in *data, not as the return value.
-
- var buf [sizeofPtr]byte
-
- // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
- // access (PEEKUSER warns that it might), but if we don't
- // align our reads, we might straddle an unmapped page
- // boundary and not get the bytes leading up to the page
- // boundary.
- n := 0
- if addr%sizeofPtr != 0 {
- err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(out, buf[addr%sizeofPtr:])
- out = out[n:]
- }
-
- // Remainder.
- for len(out) > 0 {
- // We use an internal buffer to guarantee alignment.
- // It's not documented if this is necessary, but we're paranoid.
- err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copied := copy(out, buf[0:])
- n += copied
- out = out[copied:]
- }
-
- return n, nil
-}
-
-func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)
-}
-
-func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
-}
-
-func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
- // As for ptracePeek, we need to align our accesses to deal
- // with the possibility of straddling an invalid page.
-
- // Leading edge.
- n := 0
- if addr%sizeofPtr != 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(buf[addr%sizeofPtr:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
- if err != nil {
- return 0, err
- }
- data = data[n:]
- }
-
- // Interior.
- for len(data) > sizeofPtr {
- word := *((*uintptr)(unsafe.Pointer(&data[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += sizeofPtr
- data = data[sizeofPtr:]
- }
-
- // Trailing edge.
- if len(data) > 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copy(buf[0:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += len(data)
- }
-
- return n, nil
-}
-
-func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)
-}
-
-func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
-}
-
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
-}
-
-func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
-}
-
-func PtraceSetOptions(pid int, options int) (err error) {
- return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))
-}
-
-func PtraceGetEventMsg(pid int) (msg uint, err error) {
- var data _C_long
- err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
- msg = uint(data)
- return
-}
-
-func PtraceCont(pid int, signal int) (err error) {
- return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
-}
-
-func PtraceSyscall(pid int, signal int) (err error) {
- return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
-}
-
-func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
-
-func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
-
-func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
-
-//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
-
-func Reboot(cmd int) (err error) {
- return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- return Getdents(fd, buf)
-}
-
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
-
-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
- // Certain file systems get rather angry and EINVAL if you give
- // them an empty string of data, rather than NULL.
- if data == "" {
- return mount(source, target, fstype, flags, nil)
- }
- datap, err := BytePtrFromString(data)
- if err != nil {
- return err
- }
- return mount(source, target, fstype, flags, datap)
-}
-
-// Sendto
-// Recvfrom
-// Socketpair
-
-/*
- * Direct access
- */
-//sys Acct(path string) (err error)
-//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Chdir(path string) (err error)
-//sys Chroot(path string) (err error)
-//sys ClockGettime(clockid int32, time *Timespec) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(oldfd int) (fd int, err error)
-//sys Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
-//sysnb EpollCreate1(flag int) (fd int, err error)
-//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys Exit(code int) = SYS_EXIT_GROUP
-//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-//sys Fdatasync(fd int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fsync(fd int) (err error)
-//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
-//sysnb Getpgid(pid int) (pgid int, err error)
-
-func Getpgrp() (pid int) {
- pid, _ = Getpgid(0)
- return
-}
-
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettid() (tid int)
-//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
-//sysnb InotifyInit1(flags int) (fd int, err error)
-//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
-//sysnb Kill(pid int, sig syscall.Signal) (err error)
-//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
-//sys Listxattr(path string, dest []byte) (sz int, err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
-//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Removexattr(path string, attr string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Setdomainname(p []byte) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tv *Timeval) (err error)
-//sys Setns(fd int, nstype int) (err error)
-
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
-func Setuid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
-//sys Sync()
-//sysnb Sysinfo(info *Sysinfo_t) (err error)
-//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
-//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sysnb Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
-//sys Unshare(flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys exitThread(code int) (err error) = SYS_EXIT
-//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
-
-// mmap varies by architecture; see syscall_linux_*.go.
-//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Munlockall() (err error)
-
-/*
- * Unimplemented
- */
-// AddKey
-// AfsSyscall
-// Alarm
-// ArchPrctl
-// Brk
-// Capget
-// Capset
-// ClockGetres
-// ClockNanosleep
-// ClockSettime
-// Clone
-// CreateModule
-// DeleteModule
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Eventfd
-// Execve
-// Fgetxattr
-// Flistxattr
-// Fork
-// Fremovexattr
-// Fsetxattr
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getitimer
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// Ioctl
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// Keyctl
-// Lgetxattr
-// Llistxattr
-// LookupDcookie
-// Lremovexattr
-// Lsetxattr
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// Mprotect
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Msync
-// Newfstatat
-// Nfsservctl
-// Personality
-// Pselect6
-// Ptrace
-// Putpmsg
-// QueryModule
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RequestKey
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigprocmask
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetaffinity
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetaffinity
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Sigaltstack
-// Signalfd
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Timerfd
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vmsplice
-// Vserver
-// Waitid
-// _Sysctl
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_386.go
deleted file mode 100644
index 2b881b979..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright 2009 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 file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-// +build 386,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// 64-bit file system and 32-bit uid calls
-// (386 default is 32-bit file system and 16-bit uid).
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Pause() (err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-// On x86 Linux, all the socket calls go through an extra indirection,
-// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom. Instead the
-// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr. We hide the pointer in the
-// socketcall assembly to avoid allocation on every system call.
-
-const (
- // see linux/net.h
- _SOCKET = 1
- _BIND = 2
- _CONNECT = 3
- _LISTEN = 4
- _ACCEPT = 5
- _GETSOCKNAME = 6
- _GETPEERNAME = 7
- _SOCKETPAIR = 8
- _SEND = 9
- _RECV = 10
- _SENDTO = 11
- _RECVFROM = 12
- _SHUTDOWN = 13
- _SETSOCKOPT = 14
- _GETSOCKOPT = 15
- _SENDMSG = 16
- _RECVMSG = 17
- _ACCEPT4 = 18
- _RECVMMSG = 19
- _SENDMMSG = 20
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Listen(s int, n int) (err error) {
- _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Shutdown(s, how int) (err error) {
- _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
deleted file mode 100644
index 18911c2d9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,linux
-
-package unix
-
-import "syscall"
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-//go:noescape
-func gettimeofday(tv *Timeval) (err syscall.Errno)
-
-func Gettimeofday(tv *Timeval) (err error) {
- errno := gettimeofday(tv)
- if errno != 0 {
- return errno
- }
- return nil
-}
-
-func Getpagesize() int { return 4096 }
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- errno := gettimeofday(&tv)
- if errno != 0 {
- return 0, errno
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Rip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
deleted file mode 100644
index 71d870228..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build arm,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socketpair(domain int, typ int, flags int, fd *[2]int32) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-// 64-bit file system and 32-bit uid calls
-// (16-bit uid calls are not always supported in newer kernels)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Pause() (err error)
-
-func Time(t *Time_t) (Time_t, error) {
- var tv Timeval
- err := Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
- tv := []Timeval{
- {Sec: buf.Actime},
- {Sec: buf.Modtime},
- }
- return Utimes(path, tv)
-}
-
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
deleted file mode 100644
index 4a136396c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build arm64,linux
-
-package unix
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-
-func Stat(path string, stat *Stat_t) (err error) {
- return Fstatat(AT_FDCWD, path, stat, 0)
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
- return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
- return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
-}
-
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func Time(t *Time_t) (Time_t, error) {
- var tv Timeval
- err := Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
- tv := []Timeval{
- {Sec: buf.Actime},
- {Sec: buf.Modtime},
- }
- return Utimes(path, tv)
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Pc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
-}
-
-func Pause() (err error) {
- _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
-// these when the deprecated syscalls that the syscall package relies on
-// are removed.
-const (
- SYS_GETPGRP = 1060
- SYS_UTIMES = 1037
- SYS_FUTIMESAT = 1066
- SYS_PAUSE = 1061
- SYS_USTAT = 1070
- SYS_UTIME = 1063
- SYS_LCHOWN = 1032
- SYS_TIME = 1062
- SYS_EPOLL_CREATE = 1042
- SYS_EPOLL_WAIT = 1069
-)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- return ppoll(&fds[0], len(fds), ts, nil)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
deleted file mode 100644
index 8119fde37..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build linux
-// +build mips64 mips64le
-
-package unix
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-type stat_t struct {
- Dev uint32
- Pad0 [3]int32
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- Pad1 [3]uint32
- Size int64
- Atime uint32
- Atime_nsec uint32
- Mtime uint32
- Mtime_nsec uint32
- Ctime uint32
- Ctime_nsec uint32
- Blksize uint32
- Pad2 uint32
- Blocks int64
-}
-
-//sys fstat(fd int, st *stat_t) (err error)
-//sys lstat(path string, st *stat_t) (err error)
-//sys stat(path string, st *stat_t) (err error)
-
-func Fstat(fd int, s *Stat_t) (err error) {
- st := &stat_t{}
- err = fstat(fd, st)
- fillStat_t(s, st)
- return
-}
-
-func Lstat(path string, s *Stat_t) (err error) {
- st := &stat_t{}
- err = lstat(path, st)
- fillStat_t(s, st)
- return
-}
-
-func Stat(path string, s *Stat_t) (err error) {
- st := &stat_t{}
- err = stat(path, st)
- fillStat_t(s, st)
- return
-}
-
-func fillStat_t(s *Stat_t, st *stat_t) {
- s.Dev = st.Dev
- s.Ino = st.Ino
- s.Mode = st.Mode
- s.Nlink = st.Nlink
- s.Uid = st.Uid
- s.Gid = st.Gid
- s.Rdev = st.Rdev
- s.Size = st.Size
- s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)}
- s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)}
- s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)}
- s.Blksize = st.Blksize
- s.Blocks = st.Blocks
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Regs[64] }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
deleted file mode 100644
index 60770f627..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package unix
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Nip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
deleted file mode 100644
index 81c5f4732..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build s390x,linux
-
-package unix
-
-import (
- "unsafe"
-)
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-
-func Getpagesize() int { return 4096 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
-// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
- r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
- use(unsafe.Pointer(&mmap_args[0]))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// On s390x Linux, all the socket calls go through an extra indirection.
-// The arguments to the underlying system call (SYS_SOCKETCALL) are the
-// number below and a pointer to an array of uintptr.
-const (
- // see linux/net.h
- netSocket = 1
- netBind = 2
- netConnect = 3
- netListen = 4
- netAccept = 5
- netGetSockName = 6
- netGetPeerName = 7
- netSocketPair = 8
- netSend = 9
- netRecv = 10
- netSendTo = 11
- netRecvFrom = 12
- netShutdown = 13
- netSetSockOpt = 14
- netGetSockOpt = 15
- netSendMsg = 16
- netRecvMsg = 17
- netAccept4 = 18
- netRecvMMsg = 19
- netSendMMsg = 20
-)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
- args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
- fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) error {
- args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func socket(domain int, typ int, proto int) (int, error) {
- args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}
- fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {
- args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}
- _, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
- args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
- _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}
- n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
- n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
- n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func Listen(s int, n int) error {
- args := [2]uintptr{uintptr(s), uintptr(n)}
- _, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func Shutdown(s, how int) error {
- args := [2]uintptr{uintptr(s), uintptr(how)}
- _, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
deleted file mode 100644
index 20b7454d7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build sparc64,linux
-
-package unix
-
-import (
- "sync/atomic"
- "syscall"
-)
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func sysconf(name int) (n int64, err syscall.Errno)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
- n := atomic.LoadInt64(&pageSize)
- if n == 0 {
- n, _ = sysconf(_SC_PAGESIZE)
- atomic.StoreInt64(&pageSize, n)
- }
- return int(n)
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Tpc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd.go
deleted file mode 100644
index c4e945cd6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright 2009,2010 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 file.
-
-// NetBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
- var olen uintptr
-
- // Get a list of all sysctl nodes below the given MIB by performing
- // a sysctl for the given MIB with CTL_QUERY appended.
- mib = append(mib, CTL_QUERY)
- qnode := Sysctlnode{Flags: SYSCTL_VERS_1}
- qp := (*byte)(unsafe.Pointer(&qnode))
- sz := unsafe.Sizeof(qnode)
- if err = sysctl(mib, nil, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- // Now that we know the size, get the actual nodes.
- nodes = make([]Sysctlnode, olen/sz)
- np := (*byte)(unsafe.Pointer(&nodes[0]))
- if err = sysctl(mib, np, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- return nodes, nil
-}
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Split name into components.
- var parts []string
- last := 0
- for i := 0; i < len(name); i++ {
- if name[i] == '.' {
- parts = append(parts, name[last:i])
- last = i + 1
- }
- }
- parts = append(parts, name[last:])
-
- // Discover the nodes and construct the MIB OID.
- for partno, part := range parts {
- nodes, err := sysctlNodes(mib)
- if err != nil {
- return nil, err
- }
- for _, node := range nodes {
- n := make([]byte, 0)
- for i := range node.Name {
- if node.Name[i] != 0 {
- n = append(n, byte(node.Name[i]))
- }
- }
- if string(n) == part {
- mib = append(mib, _C_int(node.Num))
- break
- }
- }
- if len(mib) != partno+1 {
- return nil, EINVAL
- }
- }
-
- return mib, nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (fd1 int, fd2 int, err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __getfh30
-// __getlogin
-// __lstat30
-// __mount50
-// __msgctl13
-// __msync13
-// __ntp_gettime30
-// __posix_chown
-// __posix_fadvise50
-// __posix_fchown
-// __posix_lchown
-// __posix_rename
-// __setlogin
-// __shmctl13
-// __sigaction_sigtramp
-// __sigaltstack14
-// __sigpending14
-// __sigprocmask14
-// __sigsuspend14
-// __sigtimedwait
-// __stat30
-// __syscall
-// __vfork14
-// _ksem_close
-// _ksem_destroy
-// _ksem_getvalue
-// _ksem_init
-// _ksem_open
-// _ksem_post
-// _ksem_trywait
-// _ksem_unlink
-// _ksem_wait
-// _lwp_continue
-// _lwp_create
-// _lwp_ctl
-// _lwp_detach
-// _lwp_exit
-// _lwp_getname
-// _lwp_getprivate
-// _lwp_kill
-// _lwp_park
-// _lwp_self
-// _lwp_setname
-// _lwp_setprivate
-// _lwp_suspend
-// _lwp_unpark
-// _lwp_unpark_all
-// _lwp_wait
-// _lwp_wakeup
-// _pset_bind
-// _sched_getaffinity
-// _sched_getparam
-// _sched_setaffinity
-// _sched_setparam
-// acct
-// aio_cancel
-// aio_error
-// aio_fsync
-// aio_read
-// aio_return
-// aio_suspend
-// aio_write
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// compat_09_ogetdomainname
-// compat_09_osetdomainname
-// compat_09_ouname
-// compat_10_omsgsys
-// compat_10_osemsys
-// compat_10_oshmsys
-// compat_12_fstat12
-// compat_12_getdirentries
-// compat_12_lstat12
-// compat_12_msync
-// compat_12_oreboot
-// compat_12_oswapon
-// compat_12_stat12
-// compat_13_sigaction13
-// compat_13_sigaltstack13
-// compat_13_sigpending13
-// compat_13_sigprocmask13
-// compat_13_sigreturn13
-// compat_13_sigsuspend13
-// compat_14___semctl
-// compat_14_msgctl
-// compat_14_shmctl
-// compat_16___sigaction14
-// compat_16___sigreturn14
-// compat_20_fhstatfs
-// compat_20_fstatfs
-// compat_20_getfsstat
-// compat_20_statfs
-// compat_30___fhstat30
-// compat_30___fstat13
-// compat_30___lstat13
-// compat_30___stat13
-// compat_30_fhopen
-// compat_30_fhstat
-// compat_30_fhstatvfs1
-// compat_30_getdents
-// compat_30_getfh
-// compat_30_ntp_gettime
-// compat_30_socket
-// compat_40_mount
-// compat_43_fstat43
-// compat_43_lstat43
-// compat_43_oaccept
-// compat_43_ocreat
-// compat_43_oftruncate
-// compat_43_ogetdirentries
-// compat_43_ogetdtablesize
-// compat_43_ogethostid
-// compat_43_ogethostname
-// compat_43_ogetkerninfo
-// compat_43_ogetpagesize
-// compat_43_ogetpeername
-// compat_43_ogetrlimit
-// compat_43_ogetsockname
-// compat_43_okillpg
-// compat_43_olseek
-// compat_43_ommap
-// compat_43_oquota
-// compat_43_orecv
-// compat_43_orecvfrom
-// compat_43_orecvmsg
-// compat_43_osend
-// compat_43_osendmsg
-// compat_43_osethostid
-// compat_43_osethostname
-// compat_43_osetrlimit
-// compat_43_osigblock
-// compat_43_osigsetmask
-// compat_43_osigstack
-// compat_43_osigvec
-// compat_43_otruncate
-// compat_43_owait
-// compat_43_stat43
-// execve
-// extattr_delete_fd
-// extattr_delete_file
-// extattr_delete_link
-// extattr_get_fd
-// extattr_get_file
-// extattr_get_link
-// extattr_list_fd
-// extattr_list_file
-// extattr_list_link
-// extattr_set_fd
-// extattr_set_file
-// extattr_set_link
-// extattrctl
-// fchroot
-// fdatasync
-// fgetxattr
-// fktrace
-// flistxattr
-// fork
-// fremovexattr
-// fsetxattr
-// fstatvfs1
-// fsync_range
-// getcontext
-// getitimer
-// getvfsstat
-// getxattr
-// ioctl
-// ktrace
-// lchflags
-// lchmod
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// lgetxattr
-// lio_listio
-// listxattr
-// llistxattr
-// lremovexattr
-// lseek
-// lsetxattr
-// lutimes
-// madvise
-// mincore
-// minherit
-// modctl
-// mq_close
-// mq_getattr
-// mq_notify
-// mq_open
-// mq_receive
-// mq_send
-// mq_setattr
-// mq_timedreceive
-// mq_timedsend
-// mq_unlink
-// mremap
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// ntp_adjtime
-// pmc_control
-// pmc_get_info
-// poll
-// pollts
-// preadv
-// profil
-// pselect
-// pset_assign
-// pset_create
-// pset_destroy
-// ptrace
-// pwritev
-// quotactl
-// rasctl
-// readv
-// reboot
-// removexattr
-// sa_enable
-// sa_preempt
-// sa_register
-// sa_setconcurrency
-// sa_stacks
-// sa_yield
-// sbrk
-// sched_yield
-// semconfig
-// semget
-// semop
-// setcontext
-// setitimer
-// setxattr
-// shmat
-// shmdt
-// shmget
-// sstk
-// statvfs1
-// swapctl
-// sysarch
-// syscall
-// timer_create
-// timer_delete
-// timer_getoverrun
-// timer_gettime
-// timer_settime
-// undelete
-// utrace
-// uuidgen
-// vadvise
-// vfork
-// writev
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
deleted file mode 100644
index afaca0983..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build 386,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
deleted file mode 100644
index a6ff04ce5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int64(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
deleted file mode 100644
index 68a6969b2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build arm,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
deleted file mode 100644
index 530792ea9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package unix
-
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd.go
deleted file mode 100644
index 554a82342..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ /dev/null
@@ -1,304 +0,0 @@
-// Copyright 2009,2010 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 file.
-
-// OpenBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [24]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Perform lookup via a binary search
- left := 0
- right := len(sysctlMib) - 1
- for {
- idx := left + (right-left)/2
- switch {
- case name == sysctlMib[idx].ctlname:
- return sysctlMib[idx].ctloid, nil
- case name > sysctlMib[idx].ctlname:
- left = idx + 1
- default:
- right = idx - 1
- }
- if left > right {
- break
- }
- }
- return nil, EINVAL
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// faccessat
-// fchmodat
-// fchownat
-// fcntl
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// fstatat
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getrtable
-// getthrid
-// ioctl
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// linkat
-// mincore
-// minherit
-// mkdirat
-// mkfifoat
-// mknodat
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// nnpfspioctl
-// openat
-// poll
-// preadv
-// profil
-// pwritev
-// quotactl
-// readlinkat
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setrtable
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// symlinkat
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// unlinkat
-// utimensat
-// vfork
-// writev
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
deleted file mode 100644
index a66ddc59c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build 386,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
deleted file mode 100644
index 0776c1faf..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris.go
deleted file mode 100644
index acb74b1d1..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ /dev/null
@@ -1,725 +0,0 @@
-// Copyright 2009 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 file.
-
-// Solaris system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_solaris.go or syscall_unix.go.
-
-package unix
-
-import (
- "sync/atomic"
- "syscall"
- "unsafe"
-)
-
-// Implemented in runtime/syscall_solaris.go.
-type syscallFunc uintptr
-
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-type SockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
- raw RawSockaddrDatalink
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe(p *[2]_C_int) (n int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- n, err := pipe(&pp)
- if n != 0 {
- return err
- }
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return nil
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- // Getcwd will return an error if it failed for any reason.
- _, err = Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- // Check for error and sanity check group count. Newer versions of
- // Solaris allow up to 1024 (NGROUPS_MAX).
- if n < 0 || n > 1024 {
- if err != nil {
- return nil, err
- }
- return nil, EINVAL
- } else if n == 0 {
- return nil, nil
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if n == -1 {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // TODO(rsc): Can we use a single global basep for all calls?
- return Getdents(fd, buf, new(uintptr))
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
- var status _C_int
- rpid, err := wait4(int32(pid), &status, options, rusage)
- wpid := int(rpid)
- if wpid == -1 {
- return wpid, err
- }
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return wpid, nil
-}
-
-//sys gethostname(buf []byte) (n int, err error)
-
-func Gethostname() (name string, err error) {
- var buf [MaxHostNameLen]byte
- n, err := gethostname(buf[:])
- if n != 0 {
- return "", err
- }
- n = clen(buf[:])
- if n < 1 {
- return "", EFAULT
- }
- return string(buf[:n]), nil
-}
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimensat(AT_FDCWD, path, nil, 0)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
- if e1 != 0 {
- return e1
- }
- return nil
-}
-
-//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-// Solaris doesn't have an futimes function because it allows NULL to be
-// specified as the path for futimesat. However, Go doesn't like
-// NULL-style string interfaces, so this simple wrapper is provided.
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimesat(fd, nil, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- // Assume path ends at NUL.
- // This is not technically the Solaris semantics for
- // abstract Unix domain sockets -- they are supposed
- // to be uninterpreted fixed-size binary blobs -- but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if nfd == -1 {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); n == -1 {
- return
- }
- oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys acct(path *byte) (err error)
-
-func Acct(path string) (err error) {
- if len(path) == 0 {
- // Assume caller wants to disable accounting.
- return acct(nil)
- }
-
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- return acct(pathp)
-}
-
-/*
- * Expose the ioctl function
- */
-
-//sys ioctl(fd int, req int, arg uintptr) (err error)
-
-func IoctlSetInt(fd int, req int, value int) (err error) {
- return ioctl(fd, req, uintptr(value))
-}
-
-func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermios(fd int, req int, value *Termios) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermio(fd int, req int, value *Termio) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlGetInt(fd int, req int) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req int) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermio(fd int, req int) (*Termio, error) {
- var value Termio
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Creat(path string, mode uint32) (fd int, err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys Fdatasync(fd int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sysnb Getgid() (gid int)
-//sysnb Getpid() (pid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgid int, err error)
-//sys Geteuid() (euid int)
-//sys Getegid() (egid int)
-//sys Getppid() (ppid int)
-//sys Getpriority(which int, who int) (n int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error) = libsocket.listen
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Setuid(uid int) (err error)
-//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = libc.umount
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
-//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
-//sys write(fd int, p []byte) (n int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys sysconf(name int) (n int64, err error)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
- n := atomic.LoadInt64(&pageSize)
- if n == 0 {
- n, _ = sysconf(_SC_PAGESIZE)
- atomic.StoreInt64(&pageSize, n)
- }
- return int(n)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
deleted file mode 100644
index 5aff62c3b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build amd64,solaris
-
-package unix
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- // TODO(aram): implement this, see issue 5847.
- panic("unimplemented")
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_unix.go
deleted file mode 100644
index b46b25028..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-import (
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-const (
- darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
- dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
- netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
-)
-
-// Do the interface allocations only once for common
-// Errno values.
-var (
- errEAGAIN error = syscall.EAGAIN
- errEINVAL error = syscall.EINVAL
- errENOENT error = syscall.ENOENT
-)
-
-// errnoErr returns common boxed Errno values, to prevent
-// allocations at runtime.
-func errnoErr(e syscall.Errno) error {
- switch e {
- case 0:
- return nil
- case EAGAIN:
- return errEAGAIN
- case EINVAL:
- return errEINVAL
- case ENOENT:
- return errENOENT
- }
- return e
-}
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// Mmap manager, for use by operating system-specific implementations.
-
-type mmapper struct {
- sync.Mutex
- active map[*byte][]byte // active mappings; key is last byte in mapping
- mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
- munmap func(addr uintptr, length uintptr) error
-}
-
-func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- if length <= 0 {
- return nil, EINVAL
- }
-
- // Map the requested memory.
- addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
- if errno != nil {
- return nil, errno
- }
-
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
-
- // Register mapping in m and return it.
- p := &b[cap(b)-1]
- m.Lock()
- defer m.Unlock()
- m.active[p] = b
- return b, nil
-}
-
-func (m *mmapper) Munmap(data []byte) (err error) {
- if len(data) == 0 || len(data) != cap(data) {
- return EINVAL
- }
-
- // Find the base of the mapping.
- p := &data[cap(data)-1]
- m.Lock()
- defer m.Unlock()
- b := m.active[p]
- if b == nil || &b[0] != &data[0] {
- return EINVAL
- }
-
- // Unmap the memory and update m.
- if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
- return errno
- }
- delete(m.active, p)
- return nil
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- n, err = read(fd, p)
- if raceenabled {
- if n > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), n)
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
- }
- return
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = write(fd, p)
- if raceenabled && n > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), n)
- }
- return
-}
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type Sockaddr interface {
- sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
- raw RawSockaddrInet4
-}
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
- raw RawSockaddrInet6
-}
-
-type SockaddrUnix struct {
- Name string
- raw RawSockaddrUnix
-}
-
-func Bind(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return bind(fd, ptr, n)
-}
-
-func Connect(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connect(fd, ptr, n)
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getpeername(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
- var n int32
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return int(n), err
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
- return
- }
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
- }
- return sendto(fd, p, flags, ptr, n)
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
-}
-
-func SetsockoptInt(fd, level, opt int, value int) (err error) {
- var n = int32(value)
- return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
-}
-
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
-}
-
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
-}
-
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
- return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
-}
-
-func SetsockoptString(fd, level, opt int, s string) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
-}
-
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
-}
-
-func Socket(domain, typ, proto int) (fd int, err error) {
- if domain == AF_INET6 && SocketDisableIPv6 {
- return -1, EAFNOSUPPORT
- }
- fd, err = socket(domain, typ, proto)
- return
-}
-
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
- var fdx [2]int32
- err = socketpair(domain, typ, proto, &fdx)
- if err == nil {
- fd[0] = int(fdx[0])
- fd[1] = int(fdx[1])
- }
- return
-}
-
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- return sendfile(outfd, infd, offset, count)
-}
-
-var ioSync int64
-
-func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
-
-func SetNonblock(fd int, nonblocking bool) (err error) {
- flag, err := fcntl(fd, F_GETFL, 0)
- if err != nil {
- return err
- }
- if nonblocking {
- flag |= O_NONBLOCK
- } else {
- flag &= ^O_NONBLOCK
- }
- _, err = fcntl(fd, F_SETFL, flag)
- return err
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_darwin.go
deleted file mode 100644
index 115326182..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_darwin.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <mach/mach.h>
-#include <mach/message.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat64
-
-type Statfs_t C.struct_statfs64
-
-type Flock_t C.struct_flock
-
-type Fstore_t C.struct_fstore
-
-type Radvisory_t C.struct_radvisory
-
-type Fbootstraptransfer_t C.struct_fbootstraptransfer
-
-type Log2phys_t C.struct_log2phys
-
-type Fsid C.struct_fsid
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfmaMsghdr2 C.struct_ifma_msghdr2
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// fchmodat-like syscalls.
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_dragonfly.go
deleted file mode 100644
index f3c971dff..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_dragonfly.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_freebsd.go
deleted file mode 100644
index ae24557ad..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_freebsd.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// This structure is a duplicate of stat on FreeBSD 8-STABLE.
-// See /usr/include/sys/stat.h.
-struct stat8 {
-#undef st_atimespec st_atim
-#undef st_mtimespec st_mtim
-#undef st_ctimespec st_ctim
-#undef st_birthtimespec st_birthtim
- __dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- __dev_t st_rdev;
-#if __BSD_VISIBLE
- struct timespec st_atimespec;
- struct timespec st_mtimespec;
- struct timespec st_ctimespec;
-#else
- time_t st_atime;
- long __st_atimensec;
- time_t st_mtime;
- long __st_mtimensec;
- time_t st_ctime;
- long __st_ctimensec;
-#endif
- off_t st_size;
- blkcnt_t st_blocks;
- blksize_t st_blksize;
- fflags_t st_flags;
- __uint32_t st_gen;
- __int32_t st_lspare;
-#if __BSD_VISIBLE
- struct timespec st_birthtimespec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
-#else
- time_t st_birthtime;
- long st_birthtimensec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
-#endif
-};
-
-// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_data8 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t ifi_epoch;
- struct timeval ifi_lastchange;
-};
-
-// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_msghdr8 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data8 ifm_data;
-};
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat8
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Advice to Fadvise
-
-const (
- FADV_NORMAL = C.POSIX_FADV_NORMAL
- FADV_RANDOM = C.POSIX_FADV_RANDOM
- FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
- FADV_WILLNEED = C.POSIX_FADV_WILLNEED
- FADV_DONTNEED = C.POSIX_FADV_DONTNEED
- FADV_NOREUSE = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- sizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
- sizeofIfData = C.sizeof_struct_if_data
- SizeofIfData = C.sizeof_struct_if_data8
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type ifMsghdr C.struct_if_msghdr
-
-type IfMsghdr C.struct_if_msghdr8
-
-type ifData C.struct_if_data
-
-type IfData C.struct_if_data8
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
- SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfZbuf C.struct_bpf_zbuf
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfZbufHeader C.struct_bpf_zbuf_header
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_linux.go
deleted file mode 100644
index de80e2c8c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_linux.go
+++ /dev/null
@@ -1,457 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netpacket/packet.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/sysinfo.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/timex.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/user.h>
-#include <sys/utsname.h>
-#include <sys/wait.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#include <linux/icmpv6.h>
-#include <asm/termbits.h>
-#include <time.h>
-#include <unistd.h>
-#include <ustat.h>
-#include <utime.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-
-#ifdef TCSETS2
-// On systems that have "struct termios2" use this as type Termios.
-typedef struct termios2 termios_t;
-#else
-typedef struct termios termios_t;
-#endif
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_ll s5;
- struct sockaddr_nl s6;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// copied from /usr/include/linux/un.h
-struct my_sockaddr_un {
- sa_family_t sun_family;
-#if defined(__ARM_EABI__) || defined(__powerpc64__)
- // on ARM char is by default unsigned
- signed char sun_path[108];
-#else
- char sun_path[108];
-#endif
-};
-
-#ifdef __ARM_EABI__
-typedef struct user_regs PtraceRegs;
-#elif defined(__aarch64__)
-typedef struct user_pt_regs PtraceRegs;
-#elif defined(__powerpc64__)
-typedef struct pt_regs PtraceRegs;
-#elif defined(__mips__)
-typedef struct user PtraceRegs;
-#elif defined(__s390x__)
-typedef struct _user_regs_struct PtraceRegs;
-#elif defined(__sparc__)
-#include <asm/ptrace.h>
-typedef struct pt_regs PtraceRegs;
-#else
-typedef struct user_regs_struct PtraceRegs;
-#endif
-
-#if defined(__s390x__)
-typedef struct _user_psw_struct ptracePsw;
-typedef struct _user_fpregs_struct ptraceFpregs;
-typedef struct _user_per_struct ptracePer;
-#else
-typedef struct {} ptracePsw;
-typedef struct {} ptraceFpregs;
-typedef struct {} ptracePer;
-#endif
-
-// The real epoll_event is a union, and godefs doesn't handle it well.
-struct my_epoll_event {
- uint32_t events;
-#if defined(__ARM_EABI__) || defined(__aarch64__)
- // padding is not specified in linux/eventpoll.h but added to conform to the
- // alignment requirements of EABI
- int32_t padFd;
-#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
- int32_t _padFd;
-#endif
- int32_t fd;
- int32_t pad;
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
- PathMax = C.PATH_MAX
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timex C.struct_timex
-
-type Time_t C.time_t
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-type Flock_t C.struct_flock
-
-// Advice to Fadvise
-
-const (
- FADV_NORMAL = C.POSIX_FADV_NORMAL
- FADV_RANDOM = C.POSIX_FADV_RANDOM
- FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
- FADV_WILLNEED = C.POSIX_FADV_WILLNEED
- FADV_DONTNEED = C.POSIX_FADV_DONTNEED
- FADV_NOREUSE = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_my_sockaddr_un
-
-type RawSockaddrLinklayer C.struct_sockaddr_ll
-
-type RawSockaddrNetlink C.struct_sockaddr_nl
-
-type RawSockaddrHCI C.struct_sockaddr_hci
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-type Ucred C.struct_ucred
-
-type TCPInfo C.struct_tcp_info
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
- SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
- SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
- SizeofUcred = C.sizeof_struct_ucred
- SizeofTCPInfo = C.sizeof_struct_tcp_info
-)
-
-// Netlink routing and interface messages
-
-const (
- IFA_UNSPEC = C.IFA_UNSPEC
- IFA_ADDRESS = C.IFA_ADDRESS
- IFA_LOCAL = C.IFA_LOCAL
- IFA_LABEL = C.IFA_LABEL
- IFA_BROADCAST = C.IFA_BROADCAST
- IFA_ANYCAST = C.IFA_ANYCAST
- IFA_CACHEINFO = C.IFA_CACHEINFO
- IFA_MULTICAST = C.IFA_MULTICAST
- IFLA_UNSPEC = C.IFLA_UNSPEC
- IFLA_ADDRESS = C.IFLA_ADDRESS
- IFLA_BROADCAST = C.IFLA_BROADCAST
- IFLA_IFNAME = C.IFLA_IFNAME
- IFLA_MTU = C.IFLA_MTU
- IFLA_LINK = C.IFLA_LINK
- IFLA_QDISC = C.IFLA_QDISC
- IFLA_STATS = C.IFLA_STATS
- IFLA_COST = C.IFLA_COST
- IFLA_PRIORITY = C.IFLA_PRIORITY
- IFLA_MASTER = C.IFLA_MASTER
- IFLA_WIRELESS = C.IFLA_WIRELESS
- IFLA_PROTINFO = C.IFLA_PROTINFO
- IFLA_TXQLEN = C.IFLA_TXQLEN
- IFLA_MAP = C.IFLA_MAP
- IFLA_WEIGHT = C.IFLA_WEIGHT
- IFLA_OPERSTATE = C.IFLA_OPERSTATE
- IFLA_LINKMODE = C.IFLA_LINKMODE
- IFLA_LINKINFO = C.IFLA_LINKINFO
- IFLA_NET_NS_PID = C.IFLA_NET_NS_PID
- IFLA_IFALIAS = C.IFLA_IFALIAS
- IFLA_MAX = C.IFLA_MAX
- RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE
- RT_SCOPE_SITE = C.RT_SCOPE_SITE
- RT_SCOPE_LINK = C.RT_SCOPE_LINK
- RT_SCOPE_HOST = C.RT_SCOPE_HOST
- RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE
- RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC
- RT_TABLE_COMPAT = C.RT_TABLE_COMPAT
- RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT
- RT_TABLE_MAIN = C.RT_TABLE_MAIN
- RT_TABLE_LOCAL = C.RT_TABLE_LOCAL
- RT_TABLE_MAX = C.RT_TABLE_MAX
- RTA_UNSPEC = C.RTA_UNSPEC
- RTA_DST = C.RTA_DST
- RTA_SRC = C.RTA_SRC
- RTA_IIF = C.RTA_IIF
- RTA_OIF = C.RTA_OIF
- RTA_GATEWAY = C.RTA_GATEWAY
- RTA_PRIORITY = C.RTA_PRIORITY
- RTA_PREFSRC = C.RTA_PREFSRC
- RTA_METRICS = C.RTA_METRICS
- RTA_MULTIPATH = C.RTA_MULTIPATH
- RTA_FLOW = C.RTA_FLOW
- RTA_CACHEINFO = C.RTA_CACHEINFO
- RTA_TABLE = C.RTA_TABLE
- RTN_UNSPEC = C.RTN_UNSPEC
- RTN_UNICAST = C.RTN_UNICAST
- RTN_LOCAL = C.RTN_LOCAL
- RTN_BROADCAST = C.RTN_BROADCAST
- RTN_ANYCAST = C.RTN_ANYCAST
- RTN_MULTICAST = C.RTN_MULTICAST
- RTN_BLACKHOLE = C.RTN_BLACKHOLE
- RTN_UNREACHABLE = C.RTN_UNREACHABLE
- RTN_PROHIBIT = C.RTN_PROHIBIT
- RTN_THROW = C.RTN_THROW
- RTN_NAT = C.RTN_NAT
- RTN_XRESOLVE = C.RTN_XRESOLVE
- RTNLGRP_NONE = C.RTNLGRP_NONE
- RTNLGRP_LINK = C.RTNLGRP_LINK
- RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY
- RTNLGRP_NEIGH = C.RTNLGRP_NEIGH
- RTNLGRP_TC = C.RTNLGRP_TC
- RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
- RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
- RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE
- RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE
- RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
- RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
- RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE
- RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
- RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
- RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE
- RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT
- SizeofNlMsghdr = C.sizeof_struct_nlmsghdr
- SizeofNlMsgerr = C.sizeof_struct_nlmsgerr
- SizeofRtGenmsg = C.sizeof_struct_rtgenmsg
- SizeofNlAttr = C.sizeof_struct_nlattr
- SizeofRtAttr = C.sizeof_struct_rtattr
- SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
- SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
- SizeofRtMsg = C.sizeof_struct_rtmsg
- SizeofRtNexthop = C.sizeof_struct_rtnexthop
-)
-
-type NlMsghdr C.struct_nlmsghdr
-
-type NlMsgerr C.struct_nlmsgerr
-
-type RtGenmsg C.struct_rtgenmsg
-
-type NlAttr C.struct_nlattr
-
-type RtAttr C.struct_rtattr
-
-type IfInfomsg C.struct_ifinfomsg
-
-type IfAddrmsg C.struct_ifaddrmsg
-
-type RtMsg C.struct_rtmsg
-
-type RtNexthop C.struct_rtnexthop
-
-// Linux socket filter
-
-const (
- SizeofSockFilter = C.sizeof_struct_sock_filter
- SizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type SockFilter C.struct_sock_filter
-
-type SockFprog C.struct_sock_fprog
-
-// Inotify
-
-type InotifyEvent C.struct_inotify_event
-
-const SizeofInotifyEvent = C.sizeof_struct_inotify_event
-
-// Ptrace
-
-// Register structures
-type PtraceRegs C.PtraceRegs
-
-// Structures contained in PtraceRegs on s390x (exported by mkpost.go)
-type ptracePsw C.ptracePsw
-
-type ptraceFpregs C.ptraceFpregs
-
-type ptracePer C.ptracePer
-
-// Misc
-
-type FdSet C.fd_set
-
-type Sysinfo_t C.struct_sysinfo
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-type EpollEvent C.struct_my_epoll_event
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_REMOVEDIR = C.AT_REMOVEDIR
- AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
-
-type PollFd C.struct_pollfd
-
-const (
- POLLIN = C.POLLIN
- POLLPRI = C.POLLPRI
- POLLOUT = C.POLLOUT
- POLLRDHUP = C.POLLRDHUP
- POLLERR = C.POLLERR
- POLLHUP = C.POLLHUP
- POLLNVAL = C.POLLNVAL
-)
-
-type Sigset_t C.sigset_t
-
-// sysconf information
-
-const _SC_PAGESIZE = C._SC_PAGESIZE
-
-// Terminal handling
-
-type Termios C.termios_t
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_netbsd.go
deleted file mode 100644
index d15f93d19..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_netbsd.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// Sysctl
-
-type Sysctlnode C.struct_sysctlnode
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_openbsd.go
deleted file mode 100644
index b66fe25f7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_openbsd.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_solaris.go
deleted file mode 100644
index c5d5c8f16..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/types_solaris.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2009 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 file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-// These defines ensure that builds done on newer versions of Solaris are
-// backwards-compatible with older versions of Solaris and
-// OpenSolaris-based derivatives.
-#define __USE_SUNOS_SOCKETS__ // msghdr
-#define __USE_LEGACY_PROTOTYPES__ // iovec
-#include <dirent.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <limits.h>
-#include <signal.h>
-#include <termios.h>
-#include <termio.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-#include <ustat.h>
-#include <utime.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
- PathMax = C.PATH_MAX
- MaxHostNameLen = C.MAXHOSTNAMELEN
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Select
-
-type FdSet C.fd_set
-
-// Misc
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
- AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
- AT_REMOVEDIR = C.AT_REMOVEDIR
- AT_EACCESS = C.AT_EACCESS
-)
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfTimeval C.struct_bpf_timeval
-
-type BpfHdr C.struct_bpf_hdr
-
-// sysconf information
-
-const _SC_PAGESIZE = C._SC_PAGESIZE
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-type Termio C.struct_termio
-
-type Winsize C.struct_winsize
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
deleted file mode 100644
index 8e6388835..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x8008427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf5
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xe
- EVFILT_THREADMARKER = 0xe
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6981
- SIOCRSLVMULTI = 0xc008693b
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_ENABLE_ECN = 0x104
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40087458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x20
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
- EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "resource busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "device power is off",
- 83: "device error",
- 84: "value too large to be stored in data type",
- 85: "bad executable (or shared library)",
- 86: "bad CPU type in executable",
- 87: "shared library version mismatch",
- 88: "malformed Mach-o file",
- 89: "operation canceled",
- 90: "identifier removed",
- 91: "no message of desired type",
- 92: "illegal byte sequence",
- 93: "attribute not found",
- 94: "bad message",
- 95: "EMULTIHOP (Reserved)",
- 96: "no message available on STREAM",
- 97: "ENOLINK (Reserved)",
- 98: "no STREAM resources",
- 99: "not a STREAM",
- 100: "protocol error",
- 101: "STREAM ioctl timeout",
- 102: "operation not supported on socket",
- 103: "policy not found",
- 104: "state not recoverable",
- 105: "previous owner died",
- 106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
deleted file mode 100644
index 9594f9381..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf5
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xe
- EVFILT_THREADMARKER = 0xe
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_ENABLE_ECN = 0x104
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
- EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "resource busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "device power is off",
- 83: "device error",
- 84: "value too large to be stored in data type",
- 85: "bad executable (or shared library)",
- 86: "bad CPU type in executable",
- 87: "shared library version mismatch",
- 88: "malformed Mach-o file",
- 89: "operation canceled",
- 90: "identifier removed",
- 91: "no message of desired type",
- 92: "illegal byte sequence",
- 93: "attribute not found",
- 94: "bad message",
- 95: "EMULTIHOP (Reserved)",
- 96: "no message available on STREAM",
- 97: "ENOLINK (Reserved)",
- 98: "no STREAM resources",
- 99: "not a STREAM",
- 100: "protocol error",
- 101: "STREAM ioctl timeout",
- 102: "operation not supported on socket",
- 103: "policy not found",
- 104: "state not recoverable",
- 105: "previous owner died",
- 106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
deleted file mode 100644
index a410e88ed..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ /dev/null
@@ -1,1293 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-// +build arm,darwin
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xc
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xe
- EVFILT_THREADMARKER = 0xe
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_ENABLE_ECN = 0x104
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
- EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
deleted file mode 100644
index 3189c6b34..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf5
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xe
- EVFILT_THREADMARKER = 0xe
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_ENABLE_ECN = 0x104
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
- EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "resource busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "device power is off",
- 83: "device error",
- 84: "value too large to be stored in data type",
- 85: "bad executable (or shared library)",
- 86: "bad CPU type in executable",
- 87: "shared library version mismatch",
- 88: "malformed Mach-o file",
- 89: "operation canceled",
- 90: "identifier removed",
- 91: "no message of desired type",
- 92: "illegal byte sequence",
- 93: "attribute not found",
- 94: "bad message",
- 95: "EMULTIHOP (Reserved)",
- 96: "no message available on STREAM",
- 97: "ENOLINK (Reserved)",
- 98: "no STREAM resources",
- 99: "not a STREAM",
- 100: "protocol error",
- 101: "STREAM ioctl timeout",
- 102: "operation not supported on socket",
- 103: "policy not found",
- 104: "state not recoverable",
- 105: "previous owner died",
- 106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
deleted file mode 100644
index 0feceee15..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ /dev/null
@@ -1,1530 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,dragonfly
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x21
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x23
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x22
- AF_NATM = 0x1d
- AF_NETGRAPH = 0x20
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8010427b
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DEFAULTBUFSIZE = 0x1000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MAX_CLONES = 0x80
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_REDBACK_SMARTEDGE = 0x20
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DBF = 0xf
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0x8
- EVFILT_MARKER = 0xf
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x8
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_NODATA = 0x1000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTEXIT_LWP = 0x10000
- EXTEXIT_PROC = 0x0
- EXTEXIT_SETINT = 0x1
- EXTEXIT_SIMPLE = 0x0
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x118e72
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NPOLLING = 0x100000
- IFF_OACTIVE = 0x400
- IFF_OACTIVE_COMPAT = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_POLLING = 0x10000
- IFF_POLLING_COMPAT = 0x10000
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xf3
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UNKNOWN = 0x102
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PKTOPTIONS = 0x34
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_RESETLOG = 0x37
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CONTROL_END = 0xb
- MADV_CONTROL_START = 0xa
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_INVAL = 0xa
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SETMAP = 0xb
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_NOCORE = 0x20000
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_SIZEALIGN = 0x40000
- MAP_STACK = 0x400
- MAP_TRYFIXED = 0x10000
- MAP_VPAGETABLE = 0x2000
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FBLOCKING = 0x10000
- MSG_FMASK = 0xffff0000
- MSG_FNONBLOCKING = 0x20000
- MSG_NOSIGNAL = 0x400
- MSG_NOTIFICATION = 0x200
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_SYNC = 0x800
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x4
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x20000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x8000000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FAPPEND = 0x100000
- O_FASYNCWRITE = 0x800000
- O_FBLOCKING = 0x40000
- O_FBUFFERED = 0x2000000
- O_FMASK = 0x7fc0000
- O_FNONBLOCKING = 0x80000
- O_FOFFSET = 0x200000
- O_FSYNC = 0x80
- O_FSYNCWRITE = 0x400000
- O_FUNBUFFERED = 0x1000000
- O_MAPONREAD = 0x4000000
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0xb
- RTAX_MPLS1 = 0x8
- RTAX_MPLS2 = 0x9
- RTAX_MPLS3 = 0xa
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_MPLS1 = 0x100
- RTA_MPLS2 = 0x200
- RTA_MPLS3 = 0x400
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MPLSOPS = 0x1000000
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x6
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_IWCAPSEGS = 0x400
- RTV_IWMAXSEGS = 0x200
- RTV_MSL = 0x100
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETSGCNT = 0xc0207210
- SIOCGETVIFCNT = 0xc028720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDATA = 0xc0206926
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMEDIA = 0xc0306938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPOLLCPU = 0xc020697e
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGIFTSOLEN = 0xc0206980
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSDRVSPEC = 0x8028697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFPOLLCPU = 0x8020697d
- SIOCSIFTSOLEN = 0x8020697f
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDSPACE = 0x100a
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_FASTKEEP = 0x80
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x20
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0x100
- TCP_MIN_WINSHIFT = 0x5
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_SIGNATURE_ENABLE = 0x10
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCISPTMASTER = 0x20007455
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VCHECKPT = 0x13
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EASYNC = syscall.Errno(0x63)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x59)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x55)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDOOFUS = syscall.Errno(0x58)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x56)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x63)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5a)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x57)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5b)
- ENOMEDIUM = syscall.Errno(0x5d)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x5c)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUNUSED94 = syscall.Errno(0x5e)
- EUNUSED95 = syscall.Errno(0x5f)
- EUNUSED96 = syscall.Errno(0x60)
- EUNUSED97 = syscall.Errno(0x61)
- EUNUSED98 = syscall.Errno(0x62)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCKPT = syscall.Signal(0x21)
- SIGCKPTEXIT = syscall.Signal(0x22)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "no medium found",
- 94: "unknown error: 94",
- 95: "unknown error: 95",
- 96: "unknown error: 96",
- 97: "unknown error: 97",
- 98: "unknown error: 98",
- 99: "unknown error: 99",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread Scheduler",
- 33: "checkPoint",
- 34: "checkPointExit",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
deleted file mode 100644
index 7b95751c3..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ /dev/null
@@ -1,1743 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4004427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x400c4280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x80084282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8008427b
- BIOCSETZBUF = 0x800c4281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x4
- CLOCK_MONOTONIC_FAST = 0xc
- CLOCK_MONOTONIC_PRECISE = 0xb
- CLOCK_PROCESS_CPUTIME_ID = 0xf
- CLOCK_PROF = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_FAST = 0xa
- CLOCK_REALTIME_PRECISE = 0x9
- CLOCK_SECOND = 0xd
- CLOCK_THREAD_CPUTIME_ID = 0xe
- CLOCK_UPTIME = 0x5
- CLOCK_UPTIME_FAST = 0x8
- CLOCK_UPTIME_PRECISE = 0x7
- CLOCK_VIRTUAL = 0x1
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTATTR_NAMESPACE_EMPTY = 0x0
- EXTATTR_NAMESPACE_SYSTEM = 0x2
- EXTATTR_NAMESPACE_USER = 0x1
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HIP = 0x8b
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_RESERVED_253 = 0xfd
- IPPROTO_RESERVED_254 = 0xfe
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SHIM6 = 0x8c
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_EXCL = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_ALL_FIBS = -0x1
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc0147210
- SIOCGETVIFCNT = 0xc014720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSDRVSPEC = 0x801c697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x59)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x55)
- ECAPMODE = syscall.Errno(0x5e)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDOOFUS = syscall.Errno(0x58)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x56)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5a)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x57)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCAPABLE = syscall.Errno(0x5d)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x5f)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x60)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x5c)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGLIBRT = syscall.Signal(0x21)
- SIGLWP = syscall.Signal(0x20)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
deleted file mode 100644
index e48e7799a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ /dev/null
@@ -1,1748 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4008427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x40184280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x80104282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8010427b
- BIOCSETZBUF = 0x80184281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x4
- CLOCK_MONOTONIC_FAST = 0xc
- CLOCK_MONOTONIC_PRECISE = 0xb
- CLOCK_PROCESS_CPUTIME_ID = 0xf
- CLOCK_PROF = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_FAST = 0xa
- CLOCK_REALTIME_PRECISE = 0x9
- CLOCK_SECOND = 0xd
- CLOCK_THREAD_CPUTIME_ID = 0xe
- CLOCK_UPTIME = 0x5
- CLOCK_UPTIME_FAST = 0x8
- CLOCK_UPTIME_PRECISE = 0x7
- CLOCK_VIRTUAL = 0x1
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTATTR_NAMESPACE_EMPTY = 0x0
- EXTATTR_NAMESPACE_SYSTEM = 0x2
- EXTATTR_NAMESPACE_USER = 0x1
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HIP = 0x8b
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_RESERVED_253 = 0xfd
- IPPROTO_RESERVED_254 = 0xfe
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SHIM6 = 0x8c
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x80000
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_EXCL = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_MSECONDS = 0x2
- NOTE_NSECONDS = 0x8
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x4
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_ALL_FIBS = -0x1
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80286987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80286989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETSGCNT = 0xc0207210
- SIOCGETVIFCNT = 0xc028720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFGROUP = 0xc0286988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0306938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSDRVSPEC = 0x8028697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x59)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x55)
- ECAPMODE = syscall.Errno(0x5e)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDOOFUS = syscall.Errno(0x58)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x56)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5a)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x57)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCAPABLE = syscall.Errno(0x5d)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x5f)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x60)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x5c)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGLIBRT = syscall.Signal(0x21)
- SIGLWP = syscall.Signal(0x20)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
deleted file mode 100644
index 2afbe2d5e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ /dev/null
@@ -1,1729 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4004427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x400c4280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x80084282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8008427b
- BIOCSETZBUF = 0x800c4281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTATTR_NAMESPACE_EMPTY = 0x0
- EXTATTR_NAMESPACE_SYSTEM = 0x2
- EXTATTR_NAMESPACE_USER = 0x1
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HIP = 0x8b
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_RESERVED_253 = 0xfd
- IPPROTO_RESERVED_254 = 0xfe
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SHIM6 = 0x8c
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_EXCL = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_ALL_FIBS = -0x1
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc0147210
- SIOCGETVIFCNT = 0xc014720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSDRVSPEC = 0x801c697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x59)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x55)
- ECAPMODE = syscall.Errno(0x5e)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDOOFUS = syscall.Errno(0x58)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x56)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5a)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x57)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCAPABLE = syscall.Errno(0x5d)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x5f)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x60)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x5c)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGLIBRT = syscall.Signal(0x21)
- SIGLWP = syscall.Signal(0x20)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
deleted file mode 100644
index 8f920124b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ /dev/null
@@ -1,1819 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_802_1Q_VLAN = 0x1
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BONDING = 0x20
- IFF_BRIDGE_PORT = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DISABLE_NETPOLL = 0x1000
- IFF_DONT_BRIDGE = 0x800
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_EBRIDGE = 0x2
- IFF_ECHO = 0x40000
- IFF_ISATAP = 0x80
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MACVLAN_PORT = 0x2000
- IFF_MASTER = 0x400
- IFF_MASTER_8023AD = 0x8
- IFF_MASTER_ALB = 0x10
- IFF_MASTER_ARPMON = 0x100
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_OVS_DATAPATH = 0x8000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_SLAVE_INACTIVE = 0x4
- IFF_SLAVE_NEEDARP = 0x40
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_TX_SKB_SHARING = 0x10000
- IFF_UNICAST_FLT = 0x20000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFF_WAN_HDLC = 0x200
- IFF_XMIT_DST_RELEASE = 0x400
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x8000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0xff
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SEIZE_DEVEL = 0x80000000
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x6
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x23)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
deleted file mode 100644
index 49b6c3546..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ /dev/null
@@ -1,1820 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_802_1Q_VLAN = 0x1
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BONDING = 0x20
- IFF_BRIDGE_PORT = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DISABLE_NETPOLL = 0x1000
- IFF_DONT_BRIDGE = 0x800
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_EBRIDGE = 0x2
- IFF_ECHO = 0x40000
- IFF_ISATAP = 0x80
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MACVLAN_PORT = 0x2000
- IFF_MASTER = 0x400
- IFF_MASTER_8023AD = 0x8
- IFF_MASTER_ALB = 0x10
- IFF_MASTER_ARPMON = 0x100
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_OVS_DATAPATH = 0x8000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_SLAVE_INACTIVE = 0x4
- IFF_SLAVE_NEEDARP = 0x40
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_TX_SKB_SHARING = 0x10000
- IFF_UNICAST_FLT = 0x20000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFF_WAN_HDLC = 0x200
- IFF_XMIT_DST_RELEASE = 0x400
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ARCH_PRCTL = 0x1e
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0xff
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SEIZE_DEVEL = 0x80000000
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x6
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x23)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
deleted file mode 100644
index f036758f9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ /dev/null
@@ -1,1743 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x27
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_PHY = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ELF_NGREG = 0x12
- ELF_PRARGSZ = 0x50
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- EPOLLERR = 0x8
- EPOLLET = -0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DYNAMIC = 0x8000
- IFF_LOOPBACK = 0x8
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x1000
- O_LARGEFILE = 0x20000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x1000
- O_SYNC = 0x1000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_BROADCAST = 0x1
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FASTROUTE = 0x6
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MULTICAST = 0x2
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PARENB = 0x100
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CLEAR_SECCOMP_FILTER = 0x25
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECCOMP_FILTER = 0x23
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SECCOMP_FILTER_EVENT = 0x1
- PR_SECCOMP_FILTER_SYSCALL = 0x0
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_NAME = 0xf
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_SECCOMP = 0x16
- PR_SET_SECCOMP_FILTER = 0x24
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETCRUNCHREGS = 0x19
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETHBPREGS = 0x1d
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETVFPREGS = 0x1b
- PTRACE_GETWMMXREGS = 0x12
- PTRACE_GET_THREAD_AREA = 0x16
- PTRACE_KILL = 0x8
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0x7f
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SETCRUNCHREGS = 0x1a
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETHBPREGS = 0x1e
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETVFPREGS = 0x1c
- PTRACE_SETWMMXREGS = 0x13
- PTRACE_SET_SYSCALL = 0x17
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- PT_DATA_ADDR = 0x10004
- PT_TEXT_ADDR = 0x10000
- PT_TEXT_END_ADDR = 0x10008
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x6
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x23)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
deleted file mode 100644
index 16dcbc9cb..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ /dev/null
@@ -1,1897 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ELF_NGREG = 0x22
- ELF_PRARGSZ = 0x50
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_802_1Q_VLAN = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BONDING = 0x20
- IFF_BRIDGE_PORT = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DISABLE_NETPOLL = 0x1000
- IFF_DONT_BRIDGE = 0x800
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_EBRIDGE = 0x2
- IFF_ECHO = 0x40000
- IFF_ISATAP = 0x80
- IFF_LIVE_ADDR_CHANGE = 0x100000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MACVLAN = 0x200000
- IFF_MACVLAN_PORT = 0x2000
- IFF_MASTER = 0x400
- IFF_MASTER_8023AD = 0x8
- IFF_MASTER_ALB = 0x10
- IFF_MASTER_ARPMON = 0x100
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_OVS_DATAPATH = 0x8000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_SLAVE_INACTIVE = 0x4
- IFF_SLAVE_NEEDARP = 0x40
- IFF_SUPP_NOFCS = 0x80000
- IFF_TAP = 0x2
- IFF_TEAM_PORT = 0x40000
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_TX_SKB_SHARING = 0x10000
- IFF_UNICAST_FLT = 0x20000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFF_WAN_HDLC = 0x200
- IFF_XMIT_DST_RELEASE = 0x400
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x1000ff
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xf
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x11
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x57
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x12
- RTM_NR_MSGTYPES = 0x48
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x6
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x23)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
deleted file mode 100644
index 36535b242..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ /dev/null
@@ -1,1917 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x80
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x2000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x8
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x10
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x16
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x5b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x13
- RTM_NR_MSGTYPES = 0x4c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x11
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x40047309
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x1008
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCFLSH = 0x5407
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCXONC = 0x5406
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x8000
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETDEBUG = 0x800454c9
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x4
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x7d)
- EADDRNOTAVAIL = syscall.Errno(0x7e)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x95)
- EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x51)
- EBADMSG = syscall.Errno(0x4d)
- EBADR = syscall.Errno(0x33)
- EBADRQC = syscall.Errno(0x36)
- EBADSLT = syscall.Errno(0x37)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x25)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x82)
- ECONNREFUSED = syscall.Errno(0x92)
- ECONNRESET = syscall.Errno(0x83)
- EDEADLK = syscall.Errno(0x2d)
- EDEADLOCK = syscall.Errno(0x38)
- EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x93)
- EHOSTUNREACH = syscall.Errno(0x94)
- EHWPOISON = syscall.Errno(0xa8)
- EIDRM = syscall.Errno(0x24)
- EILSEQ = syscall.Errno(0x58)
- EINIT = syscall.Errno(0x8d)
- EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x8b)
- EKEYEXPIRED = syscall.Errno(0xa2)
- EKEYREJECTED = syscall.Errno(0xa4)
- EKEYREVOKED = syscall.Errno(0xa3)
- EL2HLT = syscall.Errno(0x2c)
- EL2NSYNC = syscall.Errno(0x26)
- EL3HLT = syscall.Errno(0x27)
- EL3RST = syscall.Errno(0x28)
- ELIBACC = syscall.Errno(0x53)
- ELIBBAD = syscall.Errno(0x54)
- ELIBEXEC = syscall.Errno(0x57)
- ELIBMAX = syscall.Errno(0x56)
- ELIBSCN = syscall.Errno(0x55)
- ELNRNG = syscall.Errno(0x29)
- ELOOP = syscall.Errno(0x5a)
- EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x61)
- EMULTIHOP = syscall.Errno(0x4a)
- ENAMETOOLONG = syscall.Errno(0x4e)
- ENAVAIL = syscall.Errno(0x8a)
- ENETDOWN = syscall.Errno(0x7f)
- ENETRESET = syscall.Errno(0x81)
- ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x35)
- ENOBUFS = syscall.Errno(0x84)
- ENOCSI = syscall.Errno(0x2b)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0xa1)
- ENOLCK = syscall.Errno(0x2e)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x23)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x5d)
- ENOTNAM = syscall.Errno(0x89)
- ENOTRECOVERABLE = syscall.Errno(0xa6)
- ENOTSOCK = syscall.Errno(0x5f)
- ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x7a)
- EOVERFLOW = syscall.Errno(0x4f)
- EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x78)
- EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x52)
- EREMDEV = syscall.Errno(0x8e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x8c)
- ERESTART = syscall.Errno(0x5b)
- ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x8f)
- ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x97)
- ESTRPIPE = syscall.Errno(0x5c)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x91)
- ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x87)
- EUNATCH = syscall.Errno(0x2a)
- EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x34)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x12)
- SIGCLD = syscall.Signal(0x12)
- SIGCONT = syscall.Signal(0x19)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x16)
- SIGPROF = syscall.Signal(0x1d)
- SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x17)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x18)
- SIGTTIN = syscall.Signal(0x1a)
- SIGTTOU = syscall.Signal(0x1b)
- SIGURG = syscall.Signal(0x15)
- SIGUSR1 = syscall.Signal(0x10)
- SIGUSR2 = syscall.Signal(0x11)
- SIGVTALRM = syscall.Signal(0x1c)
- SIGWINCH = syscall.Signal(0x14)
- SIGXCPU = syscall.Signal(0x1e)
- SIGXFSZ = syscall.Signal(0x1f)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "no message of desired type",
- 36: "identifier removed",
- 37: "channel number out of range",
- 38: "level 2 not synchronized",
- 39: "level 3 halted",
- 40: "level 3 reset",
- 41: "link number out of range",
- 42: "protocol driver not attached",
- 43: "no CSI structure available",
- 44: "level 2 halted",
- 45: "resource deadlock avoided",
- 46: "no locks available",
- 50: "invalid exchange",
- 51: "invalid request descriptor",
- 52: "exchange full",
- 53: "no anode",
- 54: "invalid request code",
- 55: "invalid slot",
- 56: "file locking deadlock error",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 73: "RFS specific error",
- 74: "multihop attempted",
- 77: "bad message",
- 78: "file name too long",
- 79: "value too large for defined data type",
- 80: "name not unique on network",
- 81: "file descriptor in bad state",
- 82: "remote address changed",
- 83: "can not access a needed shared library",
- 84: "accessing a corrupted shared library",
- 85: ".lib section in a.out corrupted",
- 86: "attempting to link in too many shared libraries",
- 87: "cannot exec a shared library directly",
- 88: "invalid or incomplete multibyte or wide character",
- 89: "function not implemented",
- 90: "too many levels of symbolic links",
- 91: "interrupted system call should be restarted",
- 92: "streams pipe error",
- 93: "directory not empty",
- 94: "too many users",
- 95: "socket operation on non-socket",
- 96: "destination address required",
- 97: "message too long",
- 98: "protocol wrong type for socket",
- 99: "protocol not available",
- 120: "protocol not supported",
- 121: "socket type not supported",
- 122: "operation not supported",
- 123: "protocol family not supported",
- 124: "address family not supported by protocol",
- 125: "address already in use",
- 126: "cannot assign requested address",
- 127: "network is down",
- 128: "network is unreachable",
- 129: "network dropped connection on reset",
- 130: "software caused connection abort",
- 131: "connection reset by peer",
- 132: "no buffer space available",
- 133: "transport endpoint is already connected",
- 134: "transport endpoint is not connected",
- 135: "structure needs cleaning",
- 137: "not a XENIX named type file",
- 138: "no XENIX semaphores available",
- 139: "is a named type file",
- 140: "remote I/O error",
- 141: "unknown error 141",
- 142: "unknown error 142",
- 143: "cannot send after transport endpoint shutdown",
- 144: "too many references: cannot splice",
- 145: "connection timed out",
- 146: "connection refused",
- 147: "host is down",
- 148: "no route to host",
- 149: "operation already in progress",
- 150: "operation now in progress",
- 151: "stale file handle",
- 158: "operation canceled",
- 159: "no medium found",
- 160: "wrong medium type",
- 161: "required key not available",
- 162: "key has expired",
- 163: "key has been revoked",
- 164: "key was rejected by service",
- 165: "owner died",
- 166: "state not recoverable",
- 167: "operation not possible due to RF-kill",
- 168: "memory page has hardware error",
- 1133: "disk quota exceeded",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "user defined signal 1",
- 17: "user defined signal 2",
- 18: "child exited",
- 19: "power failure",
- 20: "window changed",
- 21: "urgent I/O condition",
- 22: "I/O possible",
- 23: "stopped (signal)",
- 24: "stopped",
- 25: "continued",
- 26: "stopped (tty input)",
- 27: "stopped (tty output)",
- 28: "virtual timer expired",
- 29: "profiling timer expired",
- 30: "CPU time limit exceeded",
- 31: "file size limit exceeded",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
deleted file mode 100644
index 112f05de5..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ /dev/null
@@ -1,1917 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64le,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x80
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x2000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x8
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x10
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x16
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x5b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x13
- RTM_NR_MSGTYPES = 0x4c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x11
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x40047309
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x1008
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCFLSH = 0x5407
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCXONC = 0x5406
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x8000
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETDEBUG = 0x800454c9
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x4
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x7d)
- EADDRNOTAVAIL = syscall.Errno(0x7e)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x95)
- EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x51)
- EBADMSG = syscall.Errno(0x4d)
- EBADR = syscall.Errno(0x33)
- EBADRQC = syscall.Errno(0x36)
- EBADSLT = syscall.Errno(0x37)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x25)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x82)
- ECONNREFUSED = syscall.Errno(0x92)
- ECONNRESET = syscall.Errno(0x83)
- EDEADLK = syscall.Errno(0x2d)
- EDEADLOCK = syscall.Errno(0x38)
- EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x93)
- EHOSTUNREACH = syscall.Errno(0x94)
- EHWPOISON = syscall.Errno(0xa8)
- EIDRM = syscall.Errno(0x24)
- EILSEQ = syscall.Errno(0x58)
- EINIT = syscall.Errno(0x8d)
- EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x8b)
- EKEYEXPIRED = syscall.Errno(0xa2)
- EKEYREJECTED = syscall.Errno(0xa4)
- EKEYREVOKED = syscall.Errno(0xa3)
- EL2HLT = syscall.Errno(0x2c)
- EL2NSYNC = syscall.Errno(0x26)
- EL3HLT = syscall.Errno(0x27)
- EL3RST = syscall.Errno(0x28)
- ELIBACC = syscall.Errno(0x53)
- ELIBBAD = syscall.Errno(0x54)
- ELIBEXEC = syscall.Errno(0x57)
- ELIBMAX = syscall.Errno(0x56)
- ELIBSCN = syscall.Errno(0x55)
- ELNRNG = syscall.Errno(0x29)
- ELOOP = syscall.Errno(0x5a)
- EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x61)
- EMULTIHOP = syscall.Errno(0x4a)
- ENAMETOOLONG = syscall.Errno(0x4e)
- ENAVAIL = syscall.Errno(0x8a)
- ENETDOWN = syscall.Errno(0x7f)
- ENETRESET = syscall.Errno(0x81)
- ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x35)
- ENOBUFS = syscall.Errno(0x84)
- ENOCSI = syscall.Errno(0x2b)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0xa1)
- ENOLCK = syscall.Errno(0x2e)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x23)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x5d)
- ENOTNAM = syscall.Errno(0x89)
- ENOTRECOVERABLE = syscall.Errno(0xa6)
- ENOTSOCK = syscall.Errno(0x5f)
- ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x7a)
- EOVERFLOW = syscall.Errno(0x4f)
- EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x78)
- EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x52)
- EREMDEV = syscall.Errno(0x8e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x8c)
- ERESTART = syscall.Errno(0x5b)
- ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x8f)
- ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x97)
- ESTRPIPE = syscall.Errno(0x5c)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x91)
- ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x87)
- EUNATCH = syscall.Errno(0x2a)
- EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x34)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x12)
- SIGCLD = syscall.Signal(0x12)
- SIGCONT = syscall.Signal(0x19)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x16)
- SIGPROF = syscall.Signal(0x1d)
- SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x17)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x18)
- SIGTTIN = syscall.Signal(0x1a)
- SIGTTOU = syscall.Signal(0x1b)
- SIGURG = syscall.Signal(0x15)
- SIGUSR1 = syscall.Signal(0x10)
- SIGUSR2 = syscall.Signal(0x11)
- SIGVTALRM = syscall.Signal(0x1c)
- SIGWINCH = syscall.Signal(0x14)
- SIGXCPU = syscall.Signal(0x1e)
- SIGXFSZ = syscall.Signal(0x1f)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "no message of desired type",
- 36: "identifier removed",
- 37: "channel number out of range",
- 38: "level 2 not synchronized",
- 39: "level 3 halted",
- 40: "level 3 reset",
- 41: "link number out of range",
- 42: "protocol driver not attached",
- 43: "no CSI structure available",
- 44: "level 2 halted",
- 45: "resource deadlock avoided",
- 46: "no locks available",
- 50: "invalid exchange",
- 51: "invalid request descriptor",
- 52: "exchange full",
- 53: "no anode",
- 54: "invalid request code",
- 55: "invalid slot",
- 56: "file locking deadlock error",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 73: "RFS specific error",
- 74: "multihop attempted",
- 77: "bad message",
- 78: "file name too long",
- 79: "value too large for defined data type",
- 80: "name not unique on network",
- 81: "file descriptor in bad state",
- 82: "remote address changed",
- 83: "can not access a needed shared library",
- 84: "accessing a corrupted shared library",
- 85: ".lib section in a.out corrupted",
- 86: "attempting to link in too many shared libraries",
- 87: "cannot exec a shared library directly",
- 88: "invalid or incomplete multibyte or wide character",
- 89: "function not implemented",
- 90: "too many levels of symbolic links",
- 91: "interrupted system call should be restarted",
- 92: "streams pipe error",
- 93: "directory not empty",
- 94: "too many users",
- 95: "socket operation on non-socket",
- 96: "destination address required",
- 97: "message too long",
- 98: "protocol wrong type for socket",
- 99: "protocol not available",
- 120: "protocol not supported",
- 121: "socket type not supported",
- 122: "operation not supported",
- 123: "protocol family not supported",
- 124: "address family not supported by protocol",
- 125: "address already in use",
- 126: "cannot assign requested address",
- 127: "network is down",
- 128: "network is unreachable",
- 129: "network dropped connection on reset",
- 130: "software caused connection abort",
- 131: "connection reset by peer",
- 132: "no buffer space available",
- 133: "transport endpoint is already connected",
- 134: "transport endpoint is not connected",
- 135: "structure needs cleaning",
- 137: "not a XENIX named type file",
- 138: "no XENIX semaphores available",
- 139: "is a named type file",
- 140: "remote I/O error",
- 141: "unknown error 141",
- 142: "unknown error 142",
- 143: "cannot send after transport endpoint shutdown",
- 144: "too many references: cannot splice",
- 145: "connection timed out",
- 146: "connection refused",
- 147: "host is down",
- 148: "no route to host",
- 149: "operation already in progress",
- 150: "operation now in progress",
- 151: "stale file handle",
- 158: "operation canceled",
- 159: "no medium found",
- 160: "wrong medium type",
- 161: "required key not available",
- 162: "key has expired",
- 163: "key has been revoked",
- 164: "key was rejected by service",
- 165: "owner died",
- 166: "state not recoverable",
- 167: "operation not possible due to RF-kill",
- 168: "memory page has hardware error",
- 1133: "disk quota exceeded",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "user defined signal 1",
- 17: "user defined signal 2",
- 18: "child exited",
- 19: "power failure",
- 20: "window changed",
- 21: "urgent I/O condition",
- 22: "I/O possible",
- 23: "stopped (signal)",
- 24: "stopped",
- 25: "continued",
- 26: "stopped (tty input)",
- 27: "stopped (tty output)",
- 28: "virtual timer expired",
- 29: "profiling timer expired",
- 30: "CPU time limit exceeded",
- 31: "file size limit exceeded",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
deleted file mode 100644
index 8b42ca2fe..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ /dev/null
@@ -1,1970 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x8
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x1000ff
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xf
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x11
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x57
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x12
- RTM_NR_MSGTYPES = 0x48
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0xc00
- TABDLY = 0xc00
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x400000
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETHDRSZ = 0x400454d7
- TUNSETDEBUG = 0x800454c9
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETHDRSZ = 0x800454d8
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x5
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4000
- XTABS = 0xc00
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x3a)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 58: "file locking deadlock error",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
deleted file mode 100644
index e8d12b5d6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ /dev/null
@@ -1,1969 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64le,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_802_1Q_VLAN = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BONDING = 0x20
- IFF_BRIDGE_PORT = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DISABLE_NETPOLL = 0x1000
- IFF_DONT_BRIDGE = 0x800
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_EBRIDGE = 0x2
- IFF_ECHO = 0x40000
- IFF_ISATAP = 0x80
- IFF_LIVE_ADDR_CHANGE = 0x100000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MACVLAN = 0x200000
- IFF_MACVLAN_PORT = 0x2000
- IFF_MASTER = 0x400
- IFF_MASTER_8023AD = 0x8
- IFF_MASTER_ALB = 0x10
- IFF_MASTER_ARPMON = 0x100
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_OVS_DATAPATH = 0x8000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_SLAVE_INACTIVE = 0x4
- IFF_SLAVE_NEEDARP = 0x40
- IFF_SUPP_NOFCS = 0x80000
- IFF_TAP = 0x2
- IFF_TEAM_PORT = 0x40000
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_TX_SKB_SHARING = 0x10000
- IFF_UNICAST_FLT = 0x20000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFF_WAN_HDLC = 0x200
- IFF_XMIT_DST_RELEASE = 0x400
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x1000ff
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xf
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x11
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x57
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x12
- RTM_NR_MSGTYPES = 0x48
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0xc00
- TABDLY = 0xc00
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x400000
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETHDRSZ = 0x400454d7
- TUNSETDEBUG = 0x800454c9
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETHDRSZ = 0x800454d8
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x5
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4000
- XTABS = 0xc00
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x3a)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 58: "file locking deadlock error",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
deleted file mode 100644
index 329f25e7c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ /dev/null
@@ -1,2027 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build s390x,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x8
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_DISABLE_TE = 0x5010
- PTRACE_ENABLE_TE = 0x5009
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_LAST_BREAK = 0x5006
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_AREA = 0x5003
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_AREA = 0x5002
- PTRACE_PEEKUSR = 0x3
- PTRACE_PEEKUSR_AREA = 0x5000
- PTRACE_PEEK_SYSTEM_CALL = 0x5007
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_AREA = 0x5005
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_AREA = 0x5004
- PTRACE_POKEUSR = 0x6
- PTRACE_POKEUSR_AREA = 0x5001
- PTRACE_POKE_SYSTEM_CALL = 0x5008
- PTRACE_PROT = 0x15
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLEBLOCK = 0xc
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TE_ABORT_RAND = 0x5011
- PTRACE_TRACEME = 0x0
- PT_ACR0 = 0x90
- PT_ACR1 = 0x94
- PT_ACR10 = 0xb8
- PT_ACR11 = 0xbc
- PT_ACR12 = 0xc0
- PT_ACR13 = 0xc4
- PT_ACR14 = 0xc8
- PT_ACR15 = 0xcc
- PT_ACR2 = 0x98
- PT_ACR3 = 0x9c
- PT_ACR4 = 0xa0
- PT_ACR5 = 0xa4
- PT_ACR6 = 0xa8
- PT_ACR7 = 0xac
- PT_ACR8 = 0xb0
- PT_ACR9 = 0xb4
- PT_CR_10 = 0x168
- PT_CR_11 = 0x170
- PT_CR_9 = 0x160
- PT_ENDREGS = 0x1af
- PT_FPC = 0xd8
- PT_FPR0 = 0xe0
- PT_FPR1 = 0xe8
- PT_FPR10 = 0x130
- PT_FPR11 = 0x138
- PT_FPR12 = 0x140
- PT_FPR13 = 0x148
- PT_FPR14 = 0x150
- PT_FPR15 = 0x158
- PT_FPR2 = 0xf0
- PT_FPR3 = 0xf8
- PT_FPR4 = 0x100
- PT_FPR5 = 0x108
- PT_FPR6 = 0x110
- PT_FPR7 = 0x118
- PT_FPR8 = 0x120
- PT_FPR9 = 0x128
- PT_GPR0 = 0x10
- PT_GPR1 = 0x18
- PT_GPR10 = 0x60
- PT_GPR11 = 0x68
- PT_GPR12 = 0x70
- PT_GPR13 = 0x78
- PT_GPR14 = 0x80
- PT_GPR15 = 0x88
- PT_GPR2 = 0x20
- PT_GPR3 = 0x28
- PT_GPR4 = 0x30
- PT_GPR5 = 0x38
- PT_GPR6 = 0x40
- PT_GPR7 = 0x48
- PT_GPR8 = 0x50
- PT_GPR9 = 0x58
- PT_IEEE_IP = 0x1a8
- PT_LASTOFF = 0x1a8
- PT_ORIGGPR2 = 0xd0
- PT_PSWADDR = 0x8
- PT_PSWMASK = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x10
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x16
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x5b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x13
- RTM_NR_MSGTYPES = 0x4c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x11
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SCM_WIFI_STATUS = 0x29
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- SO_WIFI_STATUS = 0x29
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CC_INFO = 0x1a
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x6
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x62)
- EADDRNOTAVAIL = syscall.Errno(0x63)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x72)
- EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x4d)
- EBADMSG = syscall.Errno(0x4a)
- EBADR = syscall.Errno(0x35)
- EBADRQC = syscall.Errno(0x38)
- EBADSLT = syscall.Errno(0x39)
- EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x2c)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x67)
- ECONNREFUSED = syscall.Errno(0x6f)
- ECONNRESET = syscall.Errno(0x68)
- EDEADLK = syscall.Errno(0x23)
- EDEADLOCK = syscall.Errno(0x23)
- EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x49)
- EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x70)
- EHOSTUNREACH = syscall.Errno(0x71)
- EHWPOISON = syscall.Errno(0x85)
- EIDRM = syscall.Errno(0x2b)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x7f)
- EKEYREJECTED = syscall.Errno(0x81)
- EKEYREVOKED = syscall.Errno(0x80)
- EL2HLT = syscall.Errno(0x33)
- EL2NSYNC = syscall.Errno(0x2d)
- EL3HLT = syscall.Errno(0x2e)
- EL3RST = syscall.Errno(0x2f)
- ELIBACC = syscall.Errno(0x4f)
- ELIBBAD = syscall.Errno(0x50)
- ELIBEXEC = syscall.Errno(0x53)
- ELIBMAX = syscall.Errno(0x52)
- ELIBSCN = syscall.Errno(0x51)
- ELNRNG = syscall.Errno(0x30)
- ELOOP = syscall.Errno(0x28)
- EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x5a)
- EMULTIHOP = syscall.Errno(0x48)
- ENAMETOOLONG = syscall.Errno(0x24)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x64)
- ENETRESET = syscall.Errno(0x66)
- ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x37)
- ENOBUFS = syscall.Errno(0x69)
- ENOCSI = syscall.Errno(0x32)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x7e)
- ENOLCK = syscall.Errno(0x25)
- ENOLINK = syscall.Errno(0x43)
- ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x2a)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x27)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x83)
- ENOTSOCK = syscall.Errno(0x58)
- ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x5f)
- EOVERFLOW = syscall.Errno(0x4b)
- EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x5d)
- EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x4e)
- EREMOTE = syscall.Errno(0x42)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x55)
- ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x6c)
- ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x74)
- ESTRPIPE = syscall.Errno(0x56)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x6e)
- ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x31)
- EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0x7)
- SIGCHLD = syscall.Signal(0x11)
- SIGCLD = syscall.Signal(0x11)
- SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x1d)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTKFLT = syscall.Signal(0x10)
- SIGSTOP = syscall.Signal(0x13)
- SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x14)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGUNUSED = syscall.Signal(0x1f)
- SIGURG = syscall.Signal(0x17)
- SIGUSR1 = syscall.Signal(0xa)
- SIGUSR2 = syscall.Signal(0xc)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
deleted file mode 100644
index 766d1e612..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ /dev/null
@@ -1,2077 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build sparc64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- ASI_LEON_DFLUSH = 0x11
- ASI_LEON_IFLUSH = 0x10
- ASI_LEON_MMUFLUSH = 0x18
- B0 = 0x0
- B1000000 = 0x100c
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x100d
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100e
- B153600 = 0x1006
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100f
- B230400 = 0x1003
- B2400 = 0xb
- B300 = 0x7
- B307200 = 0x1007
- B38400 = 0xf
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x100a
- B57600 = 0x1001
- B576000 = 0x100b
- B600 = 0x8
- B614400 = 0x1008
- B75 = 0x2
- B76800 = 0x1005
- B921600 = 0x1009
- B9600 = 0xd
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- EMT_TAGOVF = 0x1
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x400000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x7
- F_GETLK64 = 0x7
- F_GETOWN = 0x5
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x8
- F_SETLK64 = 0x8
- F_SETLKW = 0x9
- F_SETLKW64 = 0x9
- F_SETOWN = 0x6
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x3
- F_WRLCK = 0x2
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x8
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x400000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x4000
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x200
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x100
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x100000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x2000
- O_EXCL = 0x800
- O_FSYNC = 0x802000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x4004
- O_NOATIME = 0x200000
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x4000
- O_PATH = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x802000
- O_SYNC = 0x802000
- O_TMPFILE = 0x2010000
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = -0x1
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPAREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPREGS64 = 0x19
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_READDATA = 0x10
- PTRACE_READTEXT = 0x12
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPAREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPREGS64 = 0x1a
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SPARC_DETACH = 0xb
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- PTRACE_WRITEDATA = 0x11
- PTRACE_WRITETEXT = 0x13
- PT_FP = 0x48
- PT_G0 = 0x10
- PT_G1 = 0x14
- PT_G2 = 0x18
- PT_G3 = 0x1c
- PT_G4 = 0x20
- PT_G5 = 0x24
- PT_G6 = 0x28
- PT_G7 = 0x2c
- PT_I0 = 0x30
- PT_I1 = 0x34
- PT_I2 = 0x38
- PT_I3 = 0x3c
- PT_I4 = 0x40
- PT_I5 = 0x44
- PT_I6 = 0x48
- PT_I7 = 0x4c
- PT_NPC = 0x8
- PT_PC = 0x4
- PT_PSR = 0x0
- PT_REGS_MAGIC = 0x57ac6c00
- PT_TNPC = 0x90
- PT_TPC = 0x88
- PT_TSTATE = 0x80
- PT_V9_FP = 0x70
- PT_V9_G0 = 0x0
- PT_V9_G1 = 0x8
- PT_V9_G2 = 0x10
- PT_V9_G3 = 0x18
- PT_V9_G4 = 0x20
- PT_V9_G5 = 0x28
- PT_V9_G6 = 0x30
- PT_V9_G7 = 0x38
- PT_V9_I0 = 0x40
- PT_V9_I1 = 0x48
- PT_V9_I2 = 0x50
- PT_V9_I3 = 0x58
- PT_V9_I4 = 0x60
- PT_V9_I5 = 0x68
- PT_V9_I6 = 0x70
- PT_V9_I7 = 0x78
- PT_V9_MAGIC = 0x9c
- PT_V9_TNPC = 0x90
- PT_V9_TPC = 0x88
- PT_V9_TSTATE = 0x80
- PT_V9_Y = 0x98
- PT_WIM = 0x10
- PT_Y = 0xc
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x6
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x10
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x18
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x5f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x14
- RTM_NR_MSGTYPES = 0x50
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x11
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x23
- SCM_TIMESTAMPNS = 0x21
- SCM_WIFI_STATUS = 0x25
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SOCK_CLOEXEC = 0x400000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x4000
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x8000
- SO_ATTACH_BPF = 0x34
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x35
- SO_ATTACH_REUSEPORT_EBPF = 0x36
- SO_BINDTODEVICE = 0xd
- SO_BPF_EXTENSIONS = 0x32
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0x400
- SO_BUSY_POLL = 0x30
- SO_CNX_ADVICE = 0x37
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x33
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x28
- SO_MARK = 0x22
- SO_MAX_PACING_RATE = 0x31
- SO_NOFCS = 0x27
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x2
- SO_PASSSEC = 0x1f
- SO_PEEK_OFF = 0x26
- SO_PEERCRED = 0x40
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x100b
- SO_RCVLOWAT = 0x800
- SO_RCVTIMEO = 0x2000
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x24
- SO_SECURITY_AUTHENTICATION = 0x5001
- SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
- SO_SELECT_ERR_QUEUE = 0x29
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x100a
- SO_SNDLOWAT = 0x1000
- SO_SNDTIMEO = 0x4000
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x23
- SO_TIMESTAMPNS = 0x21
- SO_TYPE = 0x1008
- SO_WIFI_STATUS = 0x25
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x20005407
- TCGETA = 0x40125401
- TCGETS = 0x40245408
- TCGETS2 = 0x402c540c
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_CC_INFO = 0x1a
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCSAFLUSH = 0x2
- TCSBRK = 0x20005405
- TCSBRKP = 0x5425
- TCSETA = 0x80125402
- TCSETAF = 0x80125404
- TCSETAW = 0x80125403
- TCSETS = 0x80245409
- TCSETS2 = 0x802c540d
- TCSETSF = 0x8024540b
- TCSETSF2 = 0x802c540f
- TCSETSW = 0x8024540a
- TCSETSW2 = 0x802c540e
- TCXONC = 0x20005406
- TIOCCBRK = 0x2000747a
- TIOCCONS = 0x20007424
- TIOCEXCL = 0x2000740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x40047400
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x40047483
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40047486
- TIOCGRS485 = 0x40205441
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x40047485
- TIOCGSOFTCAR = 0x40047464
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007484
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x80047401
- TIOCSIG = 0x80047488
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x80047482
- TIOCSPTLCK = 0x80047487
- TIOCSRS485 = 0xc0205442
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x80047465
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x20005437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETDEBUG = 0x800454c9
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- VDISCARD = 0xd
- VDSUSP = 0xb
- VEOF = 0x4
- VEOL = 0x5
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x4
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WRAP = 0x20000
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XCASE = 0x4
- XTABS = 0x1800
- __TIOCFLUSH = 0x80047410
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EADV = syscall.Errno(0x53)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x25)
- EBADE = syscall.Errno(0x66)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x5d)
- EBADMSG = syscall.Errno(0x4c)
- EBADR = syscall.Errno(0x67)
- EBADRQC = syscall.Errno(0x6a)
- EBADSLT = syscall.Errno(0x6b)
- EBFONT = syscall.Errno(0x6d)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x7f)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x5e)
- ECOMM = syscall.Errno(0x55)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0x4e)
- EDEADLOCK = syscall.Errno(0x6c)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDOTDOT = syscall.Errno(0x58)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EHWPOISON = syscall.Errno(0x87)
- EIDRM = syscall.Errno(0x4d)
- EILSEQ = syscall.Errno(0x7a)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- EISNAM = syscall.Errno(0x78)
- EKEYEXPIRED = syscall.Errno(0x81)
- EKEYREJECTED = syscall.Errno(0x83)
- EKEYREVOKED = syscall.Errno(0x82)
- EL2HLT = syscall.Errno(0x65)
- EL2NSYNC = syscall.Errno(0x5f)
- EL3HLT = syscall.Errno(0x60)
- EL3RST = syscall.Errno(0x61)
- ELIBACC = syscall.Errno(0x72)
- ELIBBAD = syscall.Errno(0x70)
- ELIBEXEC = syscall.Errno(0x6e)
- ELIBMAX = syscall.Errno(0x7b)
- ELIBSCN = syscall.Errno(0x7c)
- ELNRNG = syscall.Errno(0x62)
- ELOOP = syscall.Errno(0x3e)
- EMEDIUMTYPE = syscall.Errno(0x7e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x57)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENAVAIL = syscall.Errno(0x77)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x69)
- ENOBUFS = syscall.Errno(0x37)
- ENOCSI = syscall.Errno(0x64)
- ENODATA = syscall.Errno(0x6f)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOKEY = syscall.Errno(0x80)
- ENOLCK = syscall.Errno(0x4f)
- ENOLINK = syscall.Errno(0x52)
- ENOMEDIUM = syscall.Errno(0x7d)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x4b)
- ENONET = syscall.Errno(0x50)
- ENOPKG = syscall.Errno(0x71)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x4a)
- ENOSTR = syscall.Errno(0x48)
- ENOSYS = syscall.Errno(0x5a)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTNAM = syscall.Errno(0x76)
- ENOTRECOVERABLE = syscall.Errno(0x85)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x73)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x5c)
- EOWNERDEAD = syscall.Errno(0x84)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROTO = syscall.Errno(0x56)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x59)
- EREMOTE = syscall.Errno(0x47)
- EREMOTEIO = syscall.Errno(0x79)
- ERESTART = syscall.Errno(0x74)
- ERFKILL = syscall.Errno(0x86)
- EROFS = syscall.Errno(0x1e)
- ERREMOTE = syscall.Errno(0x51)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x54)
- ESTALE = syscall.Errno(0x46)
- ESTRPIPE = syscall.Errno(0x5b)
- ETIME = syscall.Errno(0x49)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUCLEAN = syscall.Errno(0x75)
- EUNATCH = syscall.Errno(0x63)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x68)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGLOST = syscall.Signal(0x1d)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x17)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x1d)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol",
- 48: "address already in use",
- 49: "cannot assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "transport endpoint is already connected",
- 57: "transport endpoint is not connected",
- 58: "cannot send after transport endpoint shutdown",
- 59: "too many references: cannot splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disk quota exceeded",
- 70: "stale file handle",
- 71: "object is remote",
- 72: "device not a stream",
- 73: "timer expired",
- 74: "out of streams resources",
- 75: "no message of desired type",
- 76: "bad message",
- 77: "identifier removed",
- 78: "resource deadlock avoided",
- 79: "no locks available",
- 80: "machine is not on the network",
- 81: "unknown error 81",
- 82: "link has been severed",
- 83: "advertise error",
- 84: "srmount error",
- 85: "communication error on send",
- 86: "protocol error",
- 87: "multihop attempted",
- 88: "RFS specific error",
- 89: "remote address changed",
- 90: "function not implemented",
- 91: "streams pipe error",
- 92: "value too large for defined data type",
- 93: "file descriptor in bad state",
- 94: "channel number out of range",
- 95: "level 2 not synchronized",
- 96: "level 3 halted",
- 97: "level 3 reset",
- 98: "link number out of range",
- 99: "protocol driver not attached",
- 100: "no CSI structure available",
- 101: "level 2 halted",
- 102: "invalid exchange",
- 103: "invalid request descriptor",
- 104: "exchange full",
- 105: "no anode",
- 106: "invalid request code",
- 107: "invalid slot",
- 108: "file locking deadlock error",
- 109: "bad font file format",
- 110: "cannot exec a shared library directly",
- 111: "no data available",
- 112: "accessing a corrupted shared library",
- 113: "package not installed",
- 114: "can not access a needed shared library",
- 115: "name not unique on network",
- 116: "interrupted system call should be restarted",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "invalid or incomplete multibyte or wide character",
- 123: "attempting to link in too many shared libraries",
- 124: ".lib section in a.out corrupted",
- 125: "no medium found",
- 126: "wrong medium type",
- 127: "operation canceled",
- 128: "required key not available",
- 129: "key has expired",
- 130: "key has been revoked",
- 131: "key was rejected by service",
- 132: "owner died",
- 133: "state not recoverable",
- 134: "operation not possible due to RF-kill",
- 135: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "resource lost",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
deleted file mode 100644
index b4338d5f2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ /dev/null
@@ -1,1712 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x400c427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x800c427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80084272
- BIOCSUDPF = 0x80084273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLONE_CSIGNAL = 0xff
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_PID = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SIGHAND = 0x800
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- EN_SW_CTL_INF = 0x1000
- EN_SW_CTL_PREC = 0x300
- EN_SW_CTL_ROUND = 0xc00
- EN_SW_DATACHAIN = 0x80
- EN_SW_DENORM = 0x2
- EN_SW_INVOP = 0x1
- EN_SW_OVERFLOW = 0x8
- EN_SW_PRECLOSS = 0x20
- EN_SW_UNDERFLOW = 0x10
- EN_SW_ZERODIV = 0x4
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x4
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PRI_IOFLUSH = 0x7c
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0946920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0086926
- SIOCGIFDATA = 0xc0946985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc01c6987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCINITIFADDR = 0xc0446984
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8094691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x801c6988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0946986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- S_LOGIN_SET = 0x1
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x400c7458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x40287446
- TIOCPTSNAME = 0x40287448
- TIOCRCVFRAME = 0x80047445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80047444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x58)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x57)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x55)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5e)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x59)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5f)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x5a)
- ENOSTR = syscall.Errno(0x5b)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x56)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x60)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x5c)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x20)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
deleted file mode 100644
index 4994437b6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ /dev/null
@@ -1,1702 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x4010427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x8010427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80104272
- BIOCSUDPF = 0x80104273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLONE_CSIGNAL = 0xff
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_PID = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SIGHAND = 0x800
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x4
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PRI_IOFLUSH = 0x7c
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8038720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8038720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0207534
- SIOCGETVIFCNT = 0xc0287533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0986920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0106926
- SIOCGIFDATA = 0xc0986985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0306936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc0286987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc0106978
- SIOCINITIFADDR = 0xc0706984
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8098691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x80286988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0986986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- S_LOGIN_SET = 0x1
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x40287446
- TIOCPTSNAME = 0x40287448
- TIOCRCVFRAME = 0x80087445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80087444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x58)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x57)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x55)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5e)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x59)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5f)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x5a)
- ENOSTR = syscall.Errno(0x5b)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x56)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x60)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x5c)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x20)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
deleted file mode 100644
index ac85ca645..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ /dev/null
@@ -1,1688 +0,0 @@
-// mkerrors.sh -marm
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -marm _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x400c427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x800c427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80084272
- BIOCSUDPF = 0x80084273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PRI_IOFLUSH = 0x7c
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0946920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0086926
- SIOCGIFDATA = 0xc0946985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc01c6987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCINITIFADDR = 0xc0446984
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8094691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x801c6988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0946986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x400c7458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x48087446
- TIOCPTSNAME = 0x48087448
- TIOCRCVFRAME = 0x80047445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80047444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADMSG = syscall.Errno(0x58)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x57)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x52)
- EILSEQ = syscall.Errno(0x55)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x60)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5e)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x59)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x5f)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x53)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x5a)
- ENOSTR = syscall.Errno(0x5b)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x56)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x54)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x60)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x5c)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGPWR = syscall.Signal(0x20)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
deleted file mode 100644
index 3322e998d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ /dev/null
@@ -1,1584 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,openbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_BLUETOOTH = 0x20
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_ENCAP = 0x1c
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_KEY = 0x1e
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x1d
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRFILT = 0x4004427c
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc008427b
- BIOCGETIF = 0x4020426b
- BIOCGFILDROP = 0x40044278
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044273
- BIOCGRTIMEOUT = 0x400c426e
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x20004276
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDIRFILT = 0x8004427d
- BIOCSDLT = 0x8004427a
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x80084277
- BIOCSFILDROP = 0x80044279
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044272
- BIOCSRTIMEOUT = 0x800c426d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIRECTION_IN = 0x1
- BPF_DIRECTION_OUT = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x200000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0xff
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DIOCOSFPFLUSH = 0x2000444e
- DLT_ARCNET = 0x7
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0xd
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_LOOP = 0xc
- DLT_MPLS = 0xdb
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xe
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
- ENDRUNDISC = 0x9
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_AOE = 0x88a2
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LLDP = 0x88cc
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_QINQ = 0x88a8
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOW = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_ALIGN = 0x2
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_DIX_LEN = 0x600
- ETHER_MAX_LEN = 0x5ee
- ETHER_MIN_LEN = 0x40
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = -0x3
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xa
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8e52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BLUETOOTH = 0xf8
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf7
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DUMMY = 0xf1
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf3
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFLOW = 0xf9
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf2
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_HOST = 0x1
- IN_RFC3021_NET = 0xfffffffe
- IN_RFC3021_NSHIFT = 0x1f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DIVERT = 0x102
- IPPROTO_DIVERT_INIT = 0x2
- IPPROTO_DIVERT_RESP = 0x1
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x103
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPV6_AUTH_LEVEL = 0x35
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_ESP_NETWORK_LEVEL = 0x37
- IPV6_ESP_TRANS_LEVEL = 0x36
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPCOMP_LEVEL = 0x3c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_OPTIONS = 0x1
- IPV6_PATHMTU = 0x2c
- IPV6_PIPEX = 0x3f
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVDSTPORT = 0x40
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTABLE = 0x1021
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_AUTH_LEVEL = 0x14
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DIVERTFL = 0x1022
- IP_DROP_MEMBERSHIP = 0xd
- IP_ESP_NETWORK_LEVEL = 0x16
- IP_ESP_TRANS_LEVEL = 0x15
- IP_HDRINCL = 0x2
- IP_IPCOMP_LEVEL = 0x1d
- IP_IPSECFLOWINFO = 0x24
- IP_IPSEC_LOCAL_AUTH = 0x1b
- IP_IPSEC_LOCAL_CRED = 0x19
- IP_IPSEC_LOCAL_ID = 0x17
- IP_IPSEC_REMOTE_AUTH = 0x1c
- IP_IPSEC_REMOTE_CRED = 0x1a
- IP_IPSEC_REMOTE_ID = 0x18
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MF = 0x2000
- IP_MINTTL = 0x20
- IP_MIN_MEMBERSHIPS = 0xf
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PIPEX = 0x22
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVDSTPORT = 0x21
- IP_RECVIF = 0x1e
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVRTABLE = 0x23
- IP_RECVTTL = 0x1f
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RTABLE = 0x1021
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LCNT_OVERLOAD_FLUSH = 0x6
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x4
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x1ff7
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TRYFIXED = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_MCAST = 0x200
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x4
- MS_SYNC = 0x2
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x6
- NET_RT_STATS = 0x4
- NET_RT_TABLE = 0x5
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EOF = 0x2
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRUNCATE = 0x80
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x80
- ONOCR = 0x40
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x10000
- O_CREAT = 0x200
- O_DIRECTORY = 0x20000
- O_DSYNC = 0x80
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x80
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PF_FLUSH = 0x1
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_MASK = 0x3ff000
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_LABEL = 0xa
- RTAX_MAX = 0xb
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTAX_SRCMASK = 0x9
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_LABEL = 0x400
- RTA_NETMASK = 0x4
- RTA_SRC = 0x100
- RTA_SRCMASK = 0x200
- RTF_ANNOUNCE = 0x4000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x10000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x10f808
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MPATH = 0x40000
- RTF_MPLS = 0x100000
- RTF_PERMANENT_ARP = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x2000
- RTF_REJECT = 0x8
- RTF_SOURCE = 0x20000
- RTF_STATIC = 0x800
- RTF_TUNNEL = 0x100000
- RTF_UP = 0x1
- RTF_USETRAILERS = 0x8000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DESYNC = 0x10
- RTM_GET = 0x4
- RTM_IFANNOUNCE = 0xf
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MAXSIZE = 0x800
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_TABLEID_MAX = 0xff
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8218691c
- SIOCATMARK = 0x40047307
- SIOCBRDGADD = 0x8054693c
- SIOCBRDGADDS = 0x80546941
- SIOCBRDGARL = 0x806e694d
- SIOCBRDGDADDR = 0x81286947
- SIOCBRDGDEL = 0x8054693d
- SIOCBRDGDELS = 0x80546942
- SIOCBRDGFLUSH = 0x80546948
- SIOCBRDGFRL = 0x806e694e
- SIOCBRDGGCACHE = 0xc0146941
- SIOCBRDGGFD = 0xc0146952
- SIOCBRDGGHT = 0xc0146951
- SIOCBRDGGIFFLGS = 0xc054693e
- SIOCBRDGGMA = 0xc0146953
- SIOCBRDGGPARAM = 0xc03c6958
- SIOCBRDGGPRI = 0xc0146950
- SIOCBRDGGRL = 0xc028694f
- SIOCBRDGGSIFS = 0xc054693c
- SIOCBRDGGTO = 0xc0146946
- SIOCBRDGIFS = 0xc0546942
- SIOCBRDGRTS = 0xc0186943
- SIOCBRDGSADDR = 0xc1286944
- SIOCBRDGSCACHE = 0x80146940
- SIOCBRDGSFD = 0x80146952
- SIOCBRDGSHT = 0x80146951
- SIOCBRDGSIFCOST = 0x80546955
- SIOCBRDGSIFFLGS = 0x8054693f
- SIOCBRDGSIFPRIO = 0x80546954
- SIOCBRDGSMA = 0x80146953
- SIOCBRDGSPRI = 0x80146950
- SIOCBRDGSPROTO = 0x8014695a
- SIOCBRDGSTO = 0x80146945
- SIOCBRDGSTXHC = 0x80146959
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8218691e
- SIOCGETKALIVE = 0xc01869a4
- SIOCGETLABEL = 0x8020699a
- SIOCGETPFLOW = 0xc02069fe
- SIOCGETPFSYNC = 0xc02069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGETVLAN = 0xc0206990
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDATA = 0xc020691b
- SIOCGIFDESCR = 0xc0206981
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGATTR = 0xc024698b
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFHARDMTU = 0xc02069a5
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc020697e
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPRIORITY = 0xc020699c
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFRDOMAIN = 0xc02069a0
- SIOCGIFRTLABEL = 0xc0206983
- SIOCGIFTIMESLOT = 0xc0206986
- SIOCGIFXFLAGS = 0xc020699e
- SIOCGLIFADDR = 0xc218691d
- SIOCGLIFPHYADDR = 0xc218694b
- SIOCGLIFPHYRTABLE = 0xc02069a2
- SIOCGLIFPHYTTL = 0xc02069a9
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGSPPPPARAMS = 0xc0206994
- SIOCGVH = 0xc02069f6
- SIOCGVNETID = 0xc02069a7
- SIOCIFCREATE = 0x8020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSETKALIVE = 0x801869a3
- SIOCSETLABEL = 0x80206999
- SIOCSETPFLOW = 0x802069fd
- SIOCSETPFSYNC = 0x802069f7
- SIOCSETVLAN = 0x8020698f
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFDESCR = 0x80206980
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGATTR = 0x8024698c
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020691f
- SIOCSIFMEDIA = 0xc0206935
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x8020697f
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPRIORITY = 0x8020699b
- SIOCSIFRDOMAIN = 0x8020699f
- SIOCSIFRTLABEL = 0x80206982
- SIOCSIFTIMESLOT = 0x80206985
- SIOCSIFXFLAGS = 0x8020699d
- SIOCSLIFPHYADDR = 0x8218694a
- SIOCSLIFPHYRTABLE = 0x802069a1
- SIOCSLIFPHYTTL = 0x802069a8
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSSPPPPARAMS = 0x80206993
- SIOCSVH = 0xc02069f5
- SIOCSVNETID = 0x802069a6
- SOCK_DGRAM = 0x2
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BINDANY = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NETPROC = 0x1020
- SO_OOBINLINE = 0x100
- SO_PEERCRED = 0x1022
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RTABLE = 0x1021
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SPLICE = 0x1023
- SO_TIMESTAMP = 0x800
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x4
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOPUSH = 0x10
- TCP_NSTATES = 0xb
- TCP_SACK_ENABLE = 0x8
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_PPS = 0x10
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGTSTAMP = 0x400c745b
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x4004746a
- TIOCMODS = 0x8004746d
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x8004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSTSTAMP = 0x8008745a
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALTSIG = 0x4
- WCONTINUED = 0x8
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x58)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x59)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EIPSEC = syscall.Errno(0x52)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x5b)
- ELOOP = syscall.Errno(0x3e)
- EMEDIUMTYPE = syscall.Errno(0x56)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x53)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOMEDIUM = syscall.Errno(0x55)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5a)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x5b)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x57)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "IPsec processing failure",
- 83: "attribute not found",
- 84: "illegal byte sequence",
- 85: "no medium found",
- 86: "wrong medium type",
- 87: "value too large to be stored in data type",
- 88: "operation canceled",
- 89: "identifier removed",
- 90: "no message of desired type",
- 91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread AST",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
deleted file mode 100644
index 1758ecca9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ /dev/null
@@ -1,1583 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,openbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_APPLETALK = 0x10
- AF_BLUETOOTH = 0x20
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_ENCAP = 0x1c
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_KEY = 0x1e
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x1d
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRFILT = 0x4004427c
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc010427b
- BIOCGETIF = 0x4020426b
- BIOCGFILDROP = 0x40044278
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044273
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x20004276
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDIRFILT = 0x8004427d
- BIOCSDLT = 0x8004427a
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x80104277
- BIOCSFILDROP = 0x80044279
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044272
- BIOCSRTIMEOUT = 0x8010426d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIRECTION_IN = 0x1
- BPF_DIRECTION_OUT = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x200000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0xff
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DIOCOSFPFLUSH = 0x2000444e
- DLT_ARCNET = 0x7
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0xd
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_LOOP = 0xc
- DLT_MPLS = 0xdb
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xe
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
- ENDRUNDISC = 0x9
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_AOE = 0x88a2
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LLDP = 0x88cc
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_QINQ = 0x88a8
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOW = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_ALIGN = 0x2
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_DIX_LEN = 0x600
- ETHER_MAX_LEN = 0x5ee
- ETHER_MIN_LEN = 0x40
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = -0x3
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xa
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8e52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BLUETOOTH = 0xf8
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf7
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DUMMY = 0xf1
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf3
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFLOW = 0xf9
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf2
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_HOST = 0x1
- IN_RFC3021_NET = 0xfffffffe
- IN_RFC3021_NSHIFT = 0x1f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DIVERT = 0x102
- IPPROTO_DIVERT_INIT = 0x2
- IPPROTO_DIVERT_RESP = 0x1
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x103
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPV6_AUTH_LEVEL = 0x35
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_ESP_NETWORK_LEVEL = 0x37
- IPV6_ESP_TRANS_LEVEL = 0x36
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPCOMP_LEVEL = 0x3c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_OPTIONS = 0x1
- IPV6_PATHMTU = 0x2c
- IPV6_PIPEX = 0x3f
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVDSTPORT = 0x40
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTABLE = 0x1021
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_AUTH_LEVEL = 0x14
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DIVERTFL = 0x1022
- IP_DROP_MEMBERSHIP = 0xd
- IP_ESP_NETWORK_LEVEL = 0x16
- IP_ESP_TRANS_LEVEL = 0x15
- IP_HDRINCL = 0x2
- IP_IPCOMP_LEVEL = 0x1d
- IP_IPSECFLOWINFO = 0x24
- IP_IPSEC_LOCAL_AUTH = 0x1b
- IP_IPSEC_LOCAL_CRED = 0x19
- IP_IPSEC_LOCAL_ID = 0x17
- IP_IPSEC_REMOTE_AUTH = 0x1c
- IP_IPSEC_REMOTE_CRED = 0x1a
- IP_IPSEC_REMOTE_ID = 0x18
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MF = 0x2000
- IP_MINTTL = 0x20
- IP_MIN_MEMBERSHIPS = 0xf
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PIPEX = 0x22
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVDSTPORT = 0x21
- IP_RECVIF = 0x1e
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVRTABLE = 0x23
- IP_RECVTTL = 0x1f
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RTABLE = 0x1021
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LCNT_OVERLOAD_FLUSH = 0x6
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x4
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x1ff7
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TRYFIXED = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_MCAST = 0x200
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x4
- MS_SYNC = 0x2
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x6
- NET_RT_STATS = 0x4
- NET_RT_TABLE = 0x5
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EOF = 0x2
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRUNCATE = 0x80
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x80
- ONOCR = 0x40
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x10000
- O_CREAT = 0x200
- O_DIRECTORY = 0x20000
- O_DSYNC = 0x80
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x80
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PF_FLUSH = 0x1
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_LABEL = 0xa
- RTAX_MAX = 0xb
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTAX_SRCMASK = 0x9
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_LABEL = 0x400
- RTA_NETMASK = 0x4
- RTA_SRC = 0x100
- RTA_SRCMASK = 0x200
- RTF_ANNOUNCE = 0x4000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x10000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x10f808
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MPATH = 0x40000
- RTF_MPLS = 0x100000
- RTF_PERMANENT_ARP = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x2000
- RTF_REJECT = 0x8
- RTF_SOURCE = 0x20000
- RTF_STATIC = 0x800
- RTF_TUNNEL = 0x100000
- RTF_UP = 0x1
- RTF_USETRAILERS = 0x8000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DESYNC = 0x10
- RTM_GET = 0x4
- RTM_IFANNOUNCE = 0xf
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MAXSIZE = 0x800
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_TABLEID_MAX = 0xff
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80286987
- SIOCALIFADDR = 0x8218691c
- SIOCATMARK = 0x40047307
- SIOCBRDGADD = 0x8058693c
- SIOCBRDGADDS = 0x80586941
- SIOCBRDGARL = 0x806e694d
- SIOCBRDGDADDR = 0x81286947
- SIOCBRDGDEL = 0x8058693d
- SIOCBRDGDELS = 0x80586942
- SIOCBRDGFLUSH = 0x80586948
- SIOCBRDGFRL = 0x806e694e
- SIOCBRDGGCACHE = 0xc0146941
- SIOCBRDGGFD = 0xc0146952
- SIOCBRDGGHT = 0xc0146951
- SIOCBRDGGIFFLGS = 0xc058693e
- SIOCBRDGGMA = 0xc0146953
- SIOCBRDGGPARAM = 0xc0406958
- SIOCBRDGGPRI = 0xc0146950
- SIOCBRDGGRL = 0xc030694f
- SIOCBRDGGSIFS = 0xc058693c
- SIOCBRDGGTO = 0xc0146946
- SIOCBRDGIFS = 0xc0586942
- SIOCBRDGRTS = 0xc0206943
- SIOCBRDGSADDR = 0xc1286944
- SIOCBRDGSCACHE = 0x80146940
- SIOCBRDGSFD = 0x80146952
- SIOCBRDGSHT = 0x80146951
- SIOCBRDGSIFCOST = 0x80586955
- SIOCBRDGSIFFLGS = 0x8058693f
- SIOCBRDGSIFPRIO = 0x80586954
- SIOCBRDGSMA = 0x80146953
- SIOCBRDGSPRI = 0x80146950
- SIOCBRDGSPROTO = 0x8014695a
- SIOCBRDGSTO = 0x80146945
- SIOCBRDGSTXHC = 0x80146959
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80286989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8218691e
- SIOCGETKALIVE = 0xc01869a4
- SIOCGETLABEL = 0x8020699a
- SIOCGETPFLOW = 0xc02069fe
- SIOCGETPFSYNC = 0xc02069f8
- SIOCGETSGCNT = 0xc0207534
- SIOCGETVIFCNT = 0xc0287533
- SIOCGETVLAN = 0xc0206990
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDATA = 0xc020691b
- SIOCGIFDESCR = 0xc0206981
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGATTR = 0xc028698b
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFGROUP = 0xc0286988
- SIOCGIFHARDMTU = 0xc02069a5
- SIOCGIFMEDIA = 0xc0306936
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc020697e
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPRIORITY = 0xc020699c
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFRDOMAIN = 0xc02069a0
- SIOCGIFRTLABEL = 0xc0206983
- SIOCGIFTIMESLOT = 0xc0206986
- SIOCGIFXFLAGS = 0xc020699e
- SIOCGLIFADDR = 0xc218691d
- SIOCGLIFPHYADDR = 0xc218694b
- SIOCGLIFPHYRTABLE = 0xc02069a2
- SIOCGLIFPHYTTL = 0xc02069a9
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGSPPPPARAMS = 0xc0206994
- SIOCGVH = 0xc02069f6
- SIOCGVNETID = 0xc02069a7
- SIOCIFCREATE = 0x8020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSETKALIVE = 0x801869a3
- SIOCSETLABEL = 0x80206999
- SIOCSETPFLOW = 0x802069fd
- SIOCSETPFSYNC = 0x802069f7
- SIOCSETVLAN = 0x8020698f
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFDESCR = 0x80206980
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGATTR = 0x8028698c
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020691f
- SIOCSIFMEDIA = 0xc0206935
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x8020697f
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPRIORITY = 0x8020699b
- SIOCSIFRDOMAIN = 0x8020699f
- SIOCSIFRTLABEL = 0x80206982
- SIOCSIFTIMESLOT = 0x80206985
- SIOCSIFXFLAGS = 0x8020699d
- SIOCSLIFPHYADDR = 0x8218694a
- SIOCSLIFPHYRTABLE = 0x802069a1
- SIOCSLIFPHYTTL = 0x802069a8
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSSPPPPARAMS = 0x80206993
- SIOCSVH = 0xc02069f5
- SIOCSVNETID = 0x802069a6
- SOCK_DGRAM = 0x2
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BINDANY = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NETPROC = 0x1020
- SO_OOBINLINE = 0x100
- SO_PEERCRED = 0x1022
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RTABLE = 0x1021
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SPLICE = 0x1023
- SO_TIMESTAMP = 0x800
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x4
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOPUSH = 0x10
- TCP_NSTATES = 0xb
- TCP_SACK_ENABLE = 0x8
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_PPS = 0x10
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGTSTAMP = 0x4010745b
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x4004746a
- TIOCMODS = 0x8004746d
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x8004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSTSTAMP = 0x8008745a
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALTSIG = 0x4
- WCONTINUED = 0x8
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADF = syscall.Errno(0x9)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x58)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x59)
- EILSEQ = syscall.Errno(0x54)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EIPSEC = syscall.Errno(0x52)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x5b)
- ELOOP = syscall.Errno(0x3e)
- EMEDIUMTYPE = syscall.Errno(0x56)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x53)
- ENOBUFS = syscall.Errno(0x37)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOMEDIUM = syscall.Errno(0x55)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5a)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x5b)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x2d)
- EOVERFLOW = syscall.Errno(0x57)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHR = syscall.Signal(0x20)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "IPsec processing failure",
- 83: "attribute not found",
- 84: "illegal byte sequence",
- 85: "no medium found",
- 86: "wrong medium type",
- 87: "value too large to be stored in data type",
- 88: "operation canceled",
- 89: "identifier removed",
- 90: "no message of desired type",
- 91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread AST",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
deleted file mode 100644
index a08922b98..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ /dev/null
@@ -1,1436 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,solaris
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
- AF_802 = 0x12
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_ECMA = 0x8
- AF_FILE = 0x1
- AF_GOSIP = 0x16
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1a
- AF_INET_OFFLOAD = 0x1e
- AF_IPX = 0x17
- AF_KEY = 0x1b
- AF_LAT = 0xe
- AF_LINK = 0x19
- AF_LOCAL = 0x1
- AF_MAX = 0x20
- AF_NBS = 0x7
- AF_NCA = 0x1c
- AF_NIT = 0x11
- AF_NS = 0x6
- AF_OSI = 0x13
- AF_OSINET = 0x15
- AF_PACKET = 0x20
- AF_POLICY = 0x1d
- AF_PUP = 0x4
- AF_ROUTE = 0x18
- AF_SNA = 0xb
- AF_TRILL = 0x1f
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_X25 = 0x14
- ARPHRD_ARCNET = 0x7
- ARPHRD_ATM = 0x10
- ARPHRD_AX25 = 0x3
- ARPHRD_CHAOS = 0x5
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_FC = 0x12
- ARPHRD_FRAME = 0xf
- ARPHRD_HDLC = 0x11
- ARPHRD_IB = 0x20
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IPATM = 0x13
- ARPHRD_METRICOM = 0x17
- ARPHRD_TUNNEL = 0x1f
- B0 = 0x0
- B110 = 0x3
- B115200 = 0x12
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B153600 = 0x13
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B230400 = 0x14
- B2400 = 0xb
- B300 = 0x7
- B307200 = 0x15
- B38400 = 0xf
- B460800 = 0x16
- B4800 = 0xc
- B50 = 0x1
- B57600 = 0x10
- B600 = 0x8
- B75 = 0x2
- B76800 = 0x11
- B921600 = 0x17
- B9600 = 0xd
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = -0x3fefbd89
- BIOCGDLTLIST32 = -0x3ff7bd89
- BIOCGETIF = 0x4020426b
- BIOCGETLIF = 0x4078426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x4010427b
- BIOCGRTIMEOUT32 = 0x4008427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = -0x7ffbbd90
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = -0x3ffbbd9a
- BIOCSDLT = -0x7ffbbd8a
- BIOCSETF = -0x7fefbd99
- BIOCSETF32 = -0x7ff7bd99
- BIOCSETIF = -0x7fdfbd94
- BIOCSETLIF = -0x7f87bd94
- BIOCSHDRCMPLT = -0x7ffbbd8b
- BIOCSRTIMEOUT = -0x7fefbd86
- BIOCSRTIMEOUT32 = -0x7ff7bd86
- BIOCSSEESENT = -0x7ffbbd87
- BIOCSTCPF = -0x7fefbd8e
- BIOCSUDPF = -0x7fefbd8d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x800
- CLOCK_HIGHRES = 0x4
- CLOCK_LEVEL = 0xa
- CLOCK_MONOTONIC = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x5
- CLOCK_PROF = 0x2
- CLOCK_REALTIME = 0x3
- CLOCK_THREAD_CPUTIME_ID = 0x2
- CLOCK_VIRTUAL = 0x1
- CREAD = 0x80
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- CSWTCH = 0x1a
- DLT_AIRONET_HEADER = 0x78
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_BACNET_MS_TP = 0xa5
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FDDI = 0xa
- DLT_FRELAY = 0x6b
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xa2
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_PPPD = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- EMPTY_SET = 0x0
- EMT_CPCOVF = 0x1
- EQUALITY_CHECK = 0x0
- EXTA = 0xe
- EXTB = 0xf
- FD_CLOEXEC = 0x1
- FD_NFDBITS = 0x40
- FD_SETSIZE = 0x10000
- FLUSHALL = 0x1
- FLUSHDATA = 0x0
- FLUSHO = 0x2000
- F_ALLOCSP = 0xa
- F_ALLOCSP64 = 0xa
- F_BADFD = 0x2e
- F_BLKSIZE = 0x13
- F_BLOCKS = 0x12
- F_CHKFL = 0x8
- F_COMPAT = 0x8
- F_DUP2FD = 0x9
- F_DUP2FD_CLOEXEC = 0x24
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x25
- F_FREESP = 0xb
- F_FREESP64 = 0xb
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETXFL = 0x2d
- F_HASREMOTELOCKS = 0x1a
- F_ISSTREAM = 0xd
- F_MANDDNY = 0x10
- F_MDACC = 0x20
- F_NODNY = 0x0
- F_NPRIV = 0x10
- F_PRIV = 0xf
- F_QUOTACTL = 0x11
- F_RDACC = 0x1
- F_RDDNY = 0x1
- F_RDLCK = 0x1
- F_REVOKE = 0x19
- F_RMACC = 0x4
- F_RMDNY = 0x4
- F_RWACC = 0x3
- F_RWDNY = 0x3
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLK64_NBMAND = 0x2a
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETLK_NBMAND = 0x2a
- F_SETOWN = 0x18
- F_SHARE = 0x28
- F_SHARE_NBMAND = 0x2b
- F_UNLCK = 0x3
- F_UNLKSYS = 0x4
- F_UNSHARE = 0x29
- F_WRACC = 0x2
- F_WRDNY = 0x2
- F_WRLCK = 0x2
- HUPCL = 0x400
- ICANON = 0x2
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFF_ADDRCONF = 0x80000
- IFF_ALLMULTI = 0x200
- IFF_ANYCAST = 0x400000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x7f203003b5a
- IFF_COS_ENABLED = 0x200000000
- IFF_DEBUG = 0x4
- IFF_DEPRECATED = 0x40000
- IFF_DHCPRUNNING = 0x4000
- IFF_DUPLICATE = 0x4000000000
- IFF_FAILED = 0x10000000
- IFF_FIXEDMTU = 0x1000000000
- IFF_INACTIVE = 0x40000000
- IFF_INTELLIGENT = 0x400
- IFF_IPMP = 0x8000000000
- IFF_IPMP_CANTCHANGE = 0x10000000
- IFF_IPMP_INVALID = 0x1ec200080
- IFF_IPV4 = 0x1000000
- IFF_IPV6 = 0x2000000
- IFF_L3PROTECT = 0x40000000000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x800
- IFF_MULTI_BCAST = 0x1000
- IFF_NOACCEPT = 0x4000000
- IFF_NOARP = 0x80
- IFF_NOFAILOVER = 0x8000000
- IFF_NOLINKLOCAL = 0x20000000000
- IFF_NOLOCAL = 0x20000
- IFF_NONUD = 0x200000
- IFF_NORTEXCH = 0x800000
- IFF_NOTRAILERS = 0x20
- IFF_NOXMIT = 0x10000
- IFF_OFFLINE = 0x80000000
- IFF_POINTOPOINT = 0x10
- IFF_PREFERRED = 0x400000000
- IFF_PRIVATE = 0x8000
- IFF_PROMISC = 0x100
- IFF_ROUTER = 0x100000
- IFF_RUNNING = 0x40
- IFF_STANDBY = 0x20000000
- IFF_TEMPORARY = 0x800000000
- IFF_UNNUMBERED = 0x2000
- IFF_UP = 0x1
- IFF_VIRTUAL = 0x2000000000
- IFF_VRRP = 0x10000000000
- IFF_XRESOLV = 0x100000000
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6TO4 = 0xca
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IB = 0xc7
- IFT_IPV4 = 0xc8
- IFT_IPV6 = 0xc9
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_AUTOCONF_MASK = 0xffff0000
- IN_AUTOCONF_NET = 0xa9fe0000
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_CLASSE_NET = 0xffffffff
- IN_LOOPBACKNET = 0x7f
- IN_PRIVATE12_MASK = 0xfff00000
- IN_PRIVATE12_NET = 0xac100000
- IN_PRIVATE16_MASK = 0xffff0000
- IN_PRIVATE16_NET = 0xc0a80000
- IN_PRIVATE8_MASK = 0xff000000
- IN_PRIVATE8_NET = 0xa000000
- IPPROTO_AH = 0x33
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x4
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_HELLO = 0x3f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_ND = 0x4d
- IPPROTO_NONE = 0x3b
- IPPROTO_OSPF = 0x59
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_UDP = 0x11
- IPV6_ADD_MEMBERSHIP = 0x9
- IPV6_BOUND_IF = 0x41
- IPV6_CHECKSUM = 0x18
- IPV6_DONTFRAG = 0x21
- IPV6_DROP_MEMBERSHIP = 0xa
- IPV6_DSTOPTS = 0xf
- IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00
- IPV6_FLOWINFO_TCLASS = 0xf00f
- IPV6_HOPLIMIT = 0xc
- IPV6_HOPOPTS = 0xe
- IPV6_JOIN_GROUP = 0x9
- IPV6_LEAVE_GROUP = 0xa
- IPV6_MULTICAST_HOPS = 0x7
- IPV6_MULTICAST_IF = 0x6
- IPV6_MULTICAST_LOOP = 0x8
- IPV6_NEXTHOP = 0xd
- IPV6_PAD1_OPT = 0x0
- IPV6_PATHMTU = 0x25
- IPV6_PKTINFO = 0xb
- IPV6_PREFER_SRC_CGA = 0x20
- IPV6_PREFER_SRC_CGADEFAULT = 0x10
- IPV6_PREFER_SRC_CGAMASK = 0x30
- IPV6_PREFER_SRC_COA = 0x2
- IPV6_PREFER_SRC_DEFAULT = 0x15
- IPV6_PREFER_SRC_HOME = 0x1
- IPV6_PREFER_SRC_MASK = 0x3f
- IPV6_PREFER_SRC_MIPDEFAULT = 0x1
- IPV6_PREFER_SRC_MIPMASK = 0x3
- IPV6_PREFER_SRC_NONCGA = 0x10
- IPV6_PREFER_SRC_PUBLIC = 0x4
- IPV6_PREFER_SRC_TMP = 0x8
- IPV6_PREFER_SRC_TMPDEFAULT = 0x4
- IPV6_PREFER_SRC_TMPMASK = 0xc
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x13
- IPV6_RECVHOPOPTS = 0x14
- IPV6_RECVPATHMTU = 0x24
- IPV6_RECVPKTINFO = 0x12
- IPV6_RECVRTHDR = 0x16
- IPV6_RECVRTHDRDSTOPTS = 0x17
- IPV6_RECVTCLASS = 0x19
- IPV6_RTHDR = 0x10
- IPV6_RTHDRDSTOPTS = 0x11
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SEC_OPT = 0x22
- IPV6_SRC_PREFERENCES = 0x23
- IPV6_TCLASS = 0x26
- IPV6_UNICAST_HOPS = 0x5
- IPV6_UNSPEC_SRC = 0x42
- IPV6_USE_MIN_MTU = 0x20
- IPV6_V6ONLY = 0x27
- IP_ADD_MEMBERSHIP = 0x13
- IP_ADD_SOURCE_MEMBERSHIP = 0x17
- IP_BLOCK_SOURCE = 0x15
- IP_BOUND_IF = 0x41
- IP_BROADCAST = 0x106
- IP_BROADCAST_TTL = 0x43
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DHCPINIT_IF = 0x45
- IP_DONTFRAG = 0x1b
- IP_DONTROUTE = 0x105
- IP_DROP_MEMBERSHIP = 0x14
- IP_DROP_SOURCE_MEMBERSHIP = 0x18
- IP_HDRINCL = 0x2
- IP_MAXPACKET = 0xffff
- IP_MF = 0x2000
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x10
- IP_MULTICAST_LOOP = 0x12
- IP_MULTICAST_TTL = 0x11
- IP_NEXTHOP = 0x19
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x9
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVSLLA = 0xa
- IP_RECVTTL = 0xb
- IP_RETOPTS = 0x8
- IP_REUSEADDR = 0x104
- IP_SEC_OPT = 0x22
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x16
- IP_UNSPEC_SRC = 0x42
- ISIG = 0x1
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- MADV_ACCESS_DEFAULT = 0x6
- MADV_ACCESS_LWP = 0x7
- MADV_ACCESS_MANY = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x80
- MAP_ALIGN = 0x200
- MAP_ANON = 0x100
- MAP_ANONYMOUS = 0x100
- MAP_FIXED = 0x10
- MAP_INITDATA = 0x800
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TEXT = 0x400
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x10
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_DUPCTRL = 0x800
- MSG_EOR = 0x8
- MSG_MAXIOVLEN = 0x10
- MSG_NOTIFICATION = 0x100
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x20
- MSG_WAITALL = 0x40
- MSG_XPG4_2 = 0x8000
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_OLDSYNC = 0x0
- MS_SYNC = 0x4
- M_FLUSH = 0x86
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENFAIL = -0x1
- OPOST = 0x1
- O_ACCMODE = 0x600003
- O_APPEND = 0x8
- O_CLOEXEC = 0x800000
- O_CREAT = 0x100
- O_DSYNC = 0x40
- O_EXCL = 0x400
- O_EXEC = 0x400000
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x4
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NOLINKS = 0x40000
- O_NONBLOCK = 0x80
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x8000
- O_SEARCH = 0x200000
- O_SIOCGIFCONF = -0x3ff796ec
- O_SIOCGLIFCONF = -0x3fef9688
- O_SYNC = 0x10
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- O_XATTR = 0x4000
- PARENB = 0x100
- PAREXT = 0x100000
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x3
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_NUMBITS = 0x9
- RTA_SRC = 0x100
- RTF_BLACKHOLE = 0x1000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INDIRECT = 0x40000
- RTF_KERNEL = 0x80000
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MULTIRT = 0x10000
- RTF_PRIVATE = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SETSRC = 0x20000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTF_ZONE = 0x100000
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0xf
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_FREEADDR = 0x10
- RTM_GET = 0x4
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_VERSION = 0x3
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_AWARE = 0x1
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_RIGHTS = 0x1010
- SCM_TIMESTAMP = 0x1013
- SCM_UCRED = 0x1012
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIG2STR_MAX = 0x20
- SIOCADDMULTI = -0x7fdf96cf
- SIOCADDRT = -0x7fcf8df6
- SIOCATMARK = 0x40047307
- SIOCDARP = -0x7fdb96e0
- SIOCDELMULTI = -0x7fdf96ce
- SIOCDELRT = -0x7fcf8df5
- SIOCDXARP = -0x7fff9658
- SIOCGARP = -0x3fdb96e1
- SIOCGDSTINFO = -0x3fff965c
- SIOCGENADDR = -0x3fdf96ab
- SIOCGENPSTATS = -0x3fdf96c7
- SIOCGETLSGCNT = -0x3fef8deb
- SIOCGETNAME = 0x40107334
- SIOCGETPEER = 0x40107335
- SIOCGETPROP = -0x3fff8f44
- SIOCGETSGCNT = -0x3feb8deb
- SIOCGETSYNC = -0x3fdf96d3
- SIOCGETVIFCNT = -0x3feb8dec
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = -0x3fdf96f3
- SIOCGIFBRDADDR = -0x3fdf96e9
- SIOCGIFCONF = -0x3ff796a4
- SIOCGIFDSTADDR = -0x3fdf96f1
- SIOCGIFFLAGS = -0x3fdf96ef
- SIOCGIFHWADDR = -0x3fdf9647
- SIOCGIFINDEX = -0x3fdf96a6
- SIOCGIFMEM = -0x3fdf96ed
- SIOCGIFMETRIC = -0x3fdf96e5
- SIOCGIFMTU = -0x3fdf96ea
- SIOCGIFMUXID = -0x3fdf96a8
- SIOCGIFNETMASK = -0x3fdf96e7
- SIOCGIFNUM = 0x40046957
- SIOCGIP6ADDRPOLICY = -0x3fff965e
- SIOCGIPMSFILTER = -0x3ffb964c
- SIOCGLIFADDR = -0x3f87968f
- SIOCGLIFBINDING = -0x3f879666
- SIOCGLIFBRDADDR = -0x3f879685
- SIOCGLIFCONF = -0x3fef965b
- SIOCGLIFDADSTATE = -0x3f879642
- SIOCGLIFDSTADDR = -0x3f87968d
- SIOCGLIFFLAGS = -0x3f87968b
- SIOCGLIFGROUPINFO = -0x3f4b9663
- SIOCGLIFGROUPNAME = -0x3f879664
- SIOCGLIFHWADDR = -0x3f879640
- SIOCGLIFINDEX = -0x3f87967b
- SIOCGLIFLNKINFO = -0x3f879674
- SIOCGLIFMETRIC = -0x3f879681
- SIOCGLIFMTU = -0x3f879686
- SIOCGLIFMUXID = -0x3f87967d
- SIOCGLIFNETMASK = -0x3f879683
- SIOCGLIFNUM = -0x3ff3967e
- SIOCGLIFSRCOF = -0x3fef964f
- SIOCGLIFSUBNET = -0x3f879676
- SIOCGLIFTOKEN = -0x3f879678
- SIOCGLIFUSESRC = -0x3f879651
- SIOCGLIFZONE = -0x3f879656
- SIOCGLOWAT = 0x40047303
- SIOCGMSFILTER = -0x3ffb964e
- SIOCGPGRP = 0x40047309
- SIOCGSTAMP = -0x3fef9646
- SIOCGXARP = -0x3fff9659
- SIOCIFDETACH = -0x7fdf96c8
- SIOCILB = -0x3ffb9645
- SIOCLIFADDIF = -0x3f879691
- SIOCLIFDELND = -0x7f879673
- SIOCLIFGETND = -0x3f879672
- SIOCLIFREMOVEIF = -0x7f879692
- SIOCLIFSETND = -0x7f879671
- SIOCLOWER = -0x7fdf96d7
- SIOCSARP = -0x7fdb96e2
- SIOCSCTPGOPT = -0x3fef9653
- SIOCSCTPPEELOFF = -0x3ffb9652
- SIOCSCTPSOPT = -0x7fef9654
- SIOCSENABLESDP = -0x3ffb9649
- SIOCSETPROP = -0x7ffb8f43
- SIOCSETSYNC = -0x7fdf96d4
- SIOCSHIWAT = -0x7ffb8d00
- SIOCSIFADDR = -0x7fdf96f4
- SIOCSIFBRDADDR = -0x7fdf96e8
- SIOCSIFDSTADDR = -0x7fdf96f2
- SIOCSIFFLAGS = -0x7fdf96f0
- SIOCSIFINDEX = -0x7fdf96a5
- SIOCSIFMEM = -0x7fdf96ee
- SIOCSIFMETRIC = -0x7fdf96e4
- SIOCSIFMTU = -0x7fdf96eb
- SIOCSIFMUXID = -0x7fdf96a7
- SIOCSIFNAME = -0x7fdf96b7
- SIOCSIFNETMASK = -0x7fdf96e6
- SIOCSIP6ADDRPOLICY = -0x7fff965d
- SIOCSIPMSFILTER = -0x7ffb964b
- SIOCSLGETREQ = -0x3fdf96b9
- SIOCSLIFADDR = -0x7f879690
- SIOCSLIFBRDADDR = -0x7f879684
- SIOCSLIFDSTADDR = -0x7f87968e
- SIOCSLIFFLAGS = -0x7f87968c
- SIOCSLIFGROUPNAME = -0x7f879665
- SIOCSLIFINDEX = -0x7f87967a
- SIOCSLIFLNKINFO = -0x7f879675
- SIOCSLIFMETRIC = -0x7f879680
- SIOCSLIFMTU = -0x7f879687
- SIOCSLIFMUXID = -0x7f87967c
- SIOCSLIFNAME = -0x3f87967f
- SIOCSLIFNETMASK = -0x7f879682
- SIOCSLIFPREFIX = -0x3f879641
- SIOCSLIFSUBNET = -0x7f879677
- SIOCSLIFTOKEN = -0x7f879679
- SIOCSLIFUSESRC = -0x7f879650
- SIOCSLIFZONE = -0x7f879655
- SIOCSLOWAT = -0x7ffb8cfe
- SIOCSLSTAT = -0x7fdf96b8
- SIOCSMSFILTER = -0x7ffb964d
- SIOCSPGRP = -0x7ffb8cf8
- SIOCSPROMISC = -0x7ffb96d0
- SIOCSQPTR = -0x3ffb9648
- SIOCSSDSTATS = -0x3fdf96d2
- SIOCSSESTATS = -0x3fdf96d1
- SIOCSXARP = -0x7fff965a
- SIOCTMYADDR = -0x3ff79670
- SIOCTMYSITE = -0x3ff7966e
- SIOCTONLINK = -0x3ff7966f
- SIOCUPPER = -0x7fdf96d8
- SIOCX25RCV = -0x3fdf96c4
- SIOCX25TBL = -0x3fdf96c3
- SIOCX25XMT = -0x3fdf96c5
- SIOCXPROTO = 0x20007337
- SOCK_CLOEXEC = 0x80000
- SOCK_DGRAM = 0x1
- SOCK_NDELAY = 0x200000
- SOCK_NONBLOCK = 0x100000
- SOCK_RAW = 0x4
- SOCK_RDM = 0x5
- SOCK_SEQPACKET = 0x6
- SOCK_STREAM = 0x2
- SOCK_TYPE_MASK = 0xffff
- SOL_FILTER = 0xfffc
- SOL_PACKET = 0xfffd
- SOL_ROUTE = 0xfffe
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ALL = 0x3f
- SO_ALLZONES = 0x1014
- SO_ANON_MLP = 0x100a
- SO_ATTACH_FILTER = 0x40000001
- SO_BAND = 0x4000
- SO_BROADCAST = 0x20
- SO_COPYOPT = 0x80000
- SO_DEBUG = 0x1
- SO_DELIM = 0x8000
- SO_DETACH_FILTER = 0x40000002
- SO_DGRAM_ERRIND = 0x200
- SO_DOMAIN = 0x100c
- SO_DONTLINGER = -0x81
- SO_DONTROUTE = 0x10
- SO_ERROPT = 0x40000
- SO_ERROR = 0x1007
- SO_EXCLBIND = 0x1015
- SO_HIWAT = 0x10
- SO_ISNTTY = 0x800
- SO_ISTTY = 0x400
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOWAT = 0x20
- SO_MAC_EXEMPT = 0x100b
- SO_MAC_IMPLICIT = 0x1016
- SO_MAXBLK = 0x100000
- SO_MAXPSZ = 0x8
- SO_MINPSZ = 0x4
- SO_MREADOFF = 0x80
- SO_MREADON = 0x40
- SO_NDELOFF = 0x200
- SO_NDELON = 0x100
- SO_NODELIM = 0x10000
- SO_OOBINLINE = 0x100
- SO_PROTOTYPE = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVPSH = 0x100d
- SO_RCVTIMEO = 0x1006
- SO_READOPT = 0x1
- SO_RECVUCRED = 0x400
- SO_REUSEADDR = 0x4
- SO_SECATTR = 0x1011
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_STRHOLD = 0x20000
- SO_TAIL = 0x200000
- SO_TIMESTAMP = 0x1013
- SO_TONSTOP = 0x2000
- SO_TOSTOP = 0x1000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_VRRP = 0x1017
- SO_WROFF = 0x2
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_ABORT_THRESHOLD = 0x11
- TCP_ANONPRIVBIND = 0x20
- TCP_CONN_ABORT_THRESHOLD = 0x13
- TCP_CONN_NOTIFY_THRESHOLD = 0x12
- TCP_CORK = 0x18
- TCP_EXCLBIND = 0x21
- TCP_INIT_CWND = 0x15
- TCP_KEEPALIVE = 0x8
- TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17
- TCP_KEEPALIVE_THRESHOLD = 0x16
- TCP_KEEPCNT = 0x23
- TCP_KEEPIDLE = 0x22
- TCP_KEEPINTVL = 0x24
- TCP_LINGER2 = 0x1c
- TCP_MAXSEG = 0x2
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOTIFY_THRESHOLD = 0x10
- TCP_RECVDSTADDR = 0x14
- TCP_RTO_INITIAL = 0x19
- TCP_RTO_MAX = 0x1b
- TCP_RTO_MIN = 0x1a
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETSF = 0x5410
- TCSETSW = 0x540f
- TCXONC = 0x5406
- TIOC = 0x5400
- TIOCCBRK = 0x747a
- TIOCCDTR = 0x7478
- TIOCCILOOP = 0x746c
- TIOCEXCL = 0x740d
- TIOCFLUSH = 0x7410
- TIOCGETC = 0x7412
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x7414
- TIOCGPPS = 0x547d
- TIOCGPPSEV = 0x547f
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5469
- TIOCGWINSZ = 0x5468
- TIOCHPCL = 0x7402
- TIOCKBOF = 0x5409
- TIOCKBON = 0x5408
- TIOCLBIC = 0x747e
- TIOCLBIS = 0x747f
- TIOCLGET = 0x747c
- TIOCLSET = 0x747d
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x7471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7473
- TIOCREMOTE = 0x741e
- TIOCSBRK = 0x747b
- TIOCSCTTY = 0x7484
- TIOCSDTR = 0x7479
- TIOCSETC = 0x7411
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIGNAL = 0x741f
- TIOCSILOOP = 0x746d
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x7415
- TIOCSPPS = 0x547e
- TIOCSSOFTCAR = 0x546a
- TIOCSTART = 0x746e
- TIOCSTI = 0x7417
- TIOCSTOP = 0x746f
- TIOCSWINSZ = 0x5467
- TOSTOP = 0x100
- VCEOF = 0x8
- VCEOL = 0x9
- VDISCARD = 0xd
- VDSUSP = 0xb
- VEOF = 0x4
- VEOL = 0x5
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x4
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTATUS = 0x10
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WCONTFLG = 0xffff
- WCONTINUED = 0x8
- WCOREFLG = 0x80
- WEXITED = 0x1
- WNOHANG = 0x40
- WNOWAIT = 0x80
- WOPTMASK = 0xcf
- WRAP = 0x20000
- WSIGMASK = 0x7f
- WSTOPFLG = 0x7f
- WSTOPPED = 0x4
- WTRAPPED = 0x2
- WUNTRACED = 0x4
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x7d)
- EADDRNOTAVAIL = syscall.Errno(0x7e)
- EADV = syscall.Errno(0x44)
- EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
- EALREADY = syscall.Errno(0x95)
- EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
- EBADFD = syscall.Errno(0x51)
- EBADMSG = syscall.Errno(0x4d)
- EBADR = syscall.Errno(0x33)
- EBADRQC = syscall.Errno(0x36)
- EBADSLT = syscall.Errno(0x37)
- EBFONT = syscall.Errno(0x39)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x2f)
- ECHILD = syscall.Errno(0xa)
- ECHRNG = syscall.Errno(0x25)
- ECOMM = syscall.Errno(0x46)
- ECONNABORTED = syscall.Errno(0x82)
- ECONNREFUSED = syscall.Errno(0x92)
- ECONNRESET = syscall.Errno(0x83)
- EDEADLK = syscall.Errno(0x2d)
- EDEADLOCK = syscall.Errno(0x38)
- EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x31)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EHOSTDOWN = syscall.Errno(0x93)
- EHOSTUNREACH = syscall.Errno(0x94)
- EIDRM = syscall.Errno(0x24)
- EILSEQ = syscall.Errno(0x58)
- EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
- EL2HLT = syscall.Errno(0x2c)
- EL2NSYNC = syscall.Errno(0x26)
- EL3HLT = syscall.Errno(0x27)
- EL3RST = syscall.Errno(0x28)
- ELIBACC = syscall.Errno(0x53)
- ELIBBAD = syscall.Errno(0x54)
- ELIBEXEC = syscall.Errno(0x57)
- ELIBMAX = syscall.Errno(0x56)
- ELIBSCN = syscall.Errno(0x55)
- ELNRNG = syscall.Errno(0x29)
- ELOCKUNMAPPED = syscall.Errno(0x48)
- ELOOP = syscall.Errno(0x5a)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x61)
- EMULTIHOP = syscall.Errno(0x4a)
- ENAMETOOLONG = syscall.Errno(0x4e)
- ENETDOWN = syscall.Errno(0x7f)
- ENETRESET = syscall.Errno(0x81)
- ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
- ENOANO = syscall.Errno(0x35)
- ENOBUFS = syscall.Errno(0x84)
- ENOCSI = syscall.Errno(0x2b)
- ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x2e)
- ENOLINK = syscall.Errno(0x43)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x23)
- ENONET = syscall.Errno(0x40)
- ENOPKG = syscall.Errno(0x41)
- ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x3f)
- ENOSTR = syscall.Errno(0x3c)
- ENOSYS = syscall.Errno(0x59)
- ENOTACTIVE = syscall.Errno(0x49)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x5d)
- ENOTRECOVERABLE = syscall.Errno(0x3b)
- ENOTSOCK = syscall.Errno(0x5f)
- ENOTSUP = syscall.Errno(0x30)
- ENOTTY = syscall.Errno(0x19)
- ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x7a)
- EOVERFLOW = syscall.Errno(0x4f)
- EOWNERDEAD = syscall.Errno(0x3a)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
- EPROTO = syscall.Errno(0x47)
- EPROTONOSUPPORT = syscall.Errno(0x78)
- EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
- EREMCHG = syscall.Errno(0x52)
- EREMOTE = syscall.Errno(0x42)
- ERESTART = syscall.Errno(0x5b)
- EROFS = syscall.Errno(0x1e)
- ESHUTDOWN = syscall.Errno(0x8f)
- ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESRMNT = syscall.Errno(0x45)
- ESTALE = syscall.Errno(0x97)
- ESTRPIPE = syscall.Errno(0x5c)
- ETIME = syscall.Errno(0x3e)
- ETIMEDOUT = syscall.Errno(0x91)
- ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
- EUNATCH = syscall.Errno(0x2a)
- EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
- EXFULL = syscall.Errno(0x34)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCANCEL = syscall.Signal(0x24)
- SIGCHLD = syscall.Signal(0x12)
- SIGCLD = syscall.Signal(0x12)
- SIGCONT = syscall.Signal(0x19)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGFREEZE = syscall.Signal(0x22)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x29)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGJVM1 = syscall.Signal(0x27)
- SIGJVM2 = syscall.Signal(0x28)
- SIGKILL = syscall.Signal(0x9)
- SIGLOST = syscall.Signal(0x25)
- SIGLWP = syscall.Signal(0x21)
- SIGPIPE = syscall.Signal(0xd)
- SIGPOLL = syscall.Signal(0x16)
- SIGPROF = syscall.Signal(0x1d)
- SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x17)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTHAW = syscall.Signal(0x23)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x18)
- SIGTTIN = syscall.Signal(0x1a)
- SIGTTOU = syscall.Signal(0x1b)
- SIGURG = syscall.Signal(0x15)
- SIGUSR1 = syscall.Signal(0x10)
- SIGUSR2 = syscall.Signal(0x11)
- SIGVTALRM = syscall.Signal(0x1c)
- SIGWAITING = syscall.Signal(0x20)
- SIGWINCH = syscall.Signal(0x14)
- SIGXCPU = syscall.Signal(0x1e)
- SIGXFSZ = syscall.Signal(0x1f)
- SIGXRES = syscall.Signal(0x26)
-)
-
-// Error table
-var errors = [...]string{
- 1: "not owner",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "I/O error",
- 6: "no such device or address",
- 7: "arg list too long",
- 8: "exec format error",
- 9: "bad file number",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "not enough space",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "file table overflow",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "argument out of domain",
- 34: "result too large",
- 35: "no message of desired type",
- 36: "identifier removed",
- 37: "channel number out of range",
- 38: "level 2 not synchronized",
- 39: "level 3 halted",
- 40: "level 3 reset",
- 41: "link number out of range",
- 42: "protocol driver not attached",
- 43: "no CSI structure available",
- 44: "level 2 halted",
- 45: "deadlock situation detected/avoided",
- 46: "no record locks available",
- 47: "operation canceled",
- 48: "operation not supported",
- 49: "disc quota exceeded",
- 50: "bad exchange descriptor",
- 51: "bad request descriptor",
- 52: "message tables full",
- 53: "anode table overflow",
- 54: "bad request code",
- 55: "invalid slot",
- 56: "file locking deadlock",
- 57: "bad font file format",
- 58: "owner of the lock died",
- 59: "lock is not recoverable",
- 60: "not a stream device",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of stream resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "locked lock was unmapped ",
- 73: "facility is not active",
- 74: "multihop attempted",
- 77: "not a data message",
- 78: "file name too long",
- 79: "value too large for defined data type",
- 80: "name not unique on network",
- 81: "file descriptor in bad state",
- 82: "remote address changed",
- 83: "can not access a needed shared library",
- 84: "accessing a corrupted shared library",
- 85: ".lib section in a.out corrupted",
- 86: "attempting to link in more shared libraries than system limit",
- 87: "can not exec a shared library directly",
- 88: "illegal byte sequence",
- 89: "operation not applicable",
- 90: "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS",
- 91: "error 91",
- 92: "error 92",
- 93: "directory not empty",
- 94: "too many users",
- 95: "socket operation on non-socket",
- 96: "destination address required",
- 97: "message too long",
- 98: "protocol wrong type for socket",
- 99: "option not supported by protocol",
- 120: "protocol not supported",
- 121: "socket type not supported",
- 122: "operation not supported on transport endpoint",
- 123: "protocol family not supported",
- 124: "address family not supported by protocol family",
- 125: "address already in use",
- 126: "cannot assign requested address",
- 127: "network is down",
- 128: "network is unreachable",
- 129: "network dropped connection because of reset",
- 130: "software caused connection abort",
- 131: "connection reset by peer",
- 132: "no buffer space available",
- 133: "transport endpoint is already connected",
- 134: "transport endpoint is not connected",
- 143: "cannot send after socket shutdown",
- 144: "too many references: cannot splice",
- 145: "connection timed out",
- 146: "connection refused",
- 147: "host is down",
- 148: "no route to host",
- 149: "operation already in progress",
- 150: "operation now in progress",
- 151: "stale NFS file handle",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal Instruction",
- 5: "trace/Breakpoint Trap",
- 6: "abort",
- 7: "emulation Trap",
- 8: "arithmetic Exception",
- 9: "killed",
- 10: "bus Error",
- 11: "segmentation Fault",
- 12: "bad System Call",
- 13: "broken Pipe",
- 14: "alarm Clock",
- 15: "terminated",
- 16: "user Signal 1",
- 17: "user Signal 2",
- 18: "child Status Changed",
- 19: "power-Fail/Restart",
- 20: "window Size Change",
- 21: "urgent Socket Condition",
- 22: "pollable Event",
- 23: "stopped (signal)",
- 24: "stopped (user)",
- 25: "continued",
- 26: "stopped (tty input)",
- 27: "stopped (tty output)",
- 28: "virtual Timer Expired",
- 29: "profiling Timer Expired",
- 30: "cpu Limit Exceeded",
- 31: "file Size Limit Exceeded",
- 32: "no runnable lwp",
- 33: "inter-lwp signal",
- 34: "checkpoint Freeze",
- 35: "checkpoint Thaw",
- 36: "thread Cancellation",
- 37: "resource Lost",
- 38: "resource Control Exceeded",
- 39: "reserved for JVM 1",
- 40: "reserved for JVM 2",
- 41: "information Request",
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
deleted file mode 100644
index 031034a34..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
deleted file mode 100644
index ee96f78ba..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ /dev/null
@@ -1,1443 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
deleted file mode 100644
index e52cd0d54..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
deleted file mode 100644
index 9863ef99e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
deleted file mode 100644
index 78de48dcf..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,1413 +0,0 @@
-// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,dragonfly
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
deleted file mode 100644
index fade994dc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
deleted file mode 100644
index c28281e83..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
deleted file mode 100644
index a18ba5c88..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(file)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attrname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
- use(unsafe.Pointer(_p0))
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
deleted file mode 100644
index 80f6a1b0a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ /dev/null
@@ -1,1660 +0,0 @@
-// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
- r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
- tt = Time_t(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
deleted file mode 100644
index 078c8f05a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ /dev/null
@@ -1,1854 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
deleted file mode 100644
index 76e5f7c0b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ /dev/null
@@ -1,1761 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
deleted file mode 100644
index 72b79470a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ /dev/null
@@ -1,1734 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
deleted file mode 100644
index ba55509ea..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ /dev/null
@@ -1,1803 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstat(fd int, st *stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func lstat(path string, st *stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, st *stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
deleted file mode 100644
index 2b1cc8473..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ /dev/null
@@ -1,1803 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64le,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstat(fd int, st *stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func lstat(path string, st *stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, st *stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
deleted file mode 100644
index 25f39db9d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ /dev/null
@@ -1,1865 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
- r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
- tt = Time_t(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
deleted file mode 100644
index 70702b516..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ /dev/null
@@ -1,1865 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64le,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
- r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
- tt = Time_t(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
deleted file mode 100644
index 94b93d3d0..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ /dev/null
@@ -1,1645 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_s390x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build s390x,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
deleted file mode 100644
index 774b10ed8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ /dev/null
@@ -1,1834 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_sparc64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build sparc64,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- use(unsafe.Pointer(_p2))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- use(unsafe.Pointer(_p0))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- use(unsafe.Pointer(_p0))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
deleted file mode 100644
index b16e1d0ee..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ /dev/null
@@ -1,1327 +0,0 @@
-// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,netbsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
deleted file mode 100644
index b63667da9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ /dev/null
@@ -1,1327 +0,0 @@
-// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,netbsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
deleted file mode 100644
index b0d19038d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ /dev/null
@@ -1,1327 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,netbsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
deleted file mode 100644
index f91a5b856..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ /dev/null
@@ -1,1387 +0,0 @@
-// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,openbsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
deleted file mode 100644
index 2e8d59d72..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ /dev/null
@@ -1,1387 +0,0 @@
-// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,openbsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- use(_p0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
deleted file mode 100644
index c0ecfc044..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ /dev/null
@@ -1,1599 +0,0 @@
-// mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,solaris
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-//go:cgo_import_dynamic libc_pipe pipe "libc.so"
-//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
-//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
-//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
-//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
-//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
-//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
-//go:cgo_import_dynamic libc_utimes utimes "libc.so"
-//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
-//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
-//go:cgo_import_dynamic libc_futimesat futimesat "libc.so"
-//go:cgo_import_dynamic libc_accept accept "libsocket.so"
-//go:cgo_import_dynamic libc_recvmsg recvmsg "libsocket.so"
-//go:cgo_import_dynamic libc_sendmsg sendmsg "libsocket.so"
-//go:cgo_import_dynamic libc_acct acct "libc.so"
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-//go:cgo_import_dynamic libc_access access "libc.so"
-//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
-//go:cgo_import_dynamic libc_chdir chdir "libc.so"
-//go:cgo_import_dynamic libc_chmod chmod "libc.so"
-//go:cgo_import_dynamic libc_chown chown "libc.so"
-//go:cgo_import_dynamic libc_chroot chroot "libc.so"
-//go:cgo_import_dynamic libc_close close "libc.so"
-//go:cgo_import_dynamic libc_creat creat "libc.so"
-//go:cgo_import_dynamic libc_dup dup "libc.so"
-//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
-//go:cgo_import_dynamic libc_exit exit "libc.so"
-//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
-//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
-//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
-//go:cgo_import_dynamic libc_fchown fchown "libc.so"
-//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
-//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
-//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
-//go:cgo_import_dynamic libc_fstat fstat "libc.so"
-//go:cgo_import_dynamic libc_getdents getdents "libc.so"
-//go:cgo_import_dynamic libc_getgid getgid "libc.so"
-//go:cgo_import_dynamic libc_getpid getpid "libc.so"
-//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
-//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
-//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
-//go:cgo_import_dynamic libc_getegid getegid "libc.so"
-//go:cgo_import_dynamic libc_getppid getppid "libc.so"
-//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
-//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
-//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
-//go:cgo_import_dynamic libc_getuid getuid "libc.so"
-//go:cgo_import_dynamic libc_kill kill "libc.so"
-//go:cgo_import_dynamic libc_lchown lchown "libc.so"
-//go:cgo_import_dynamic libc_link link "libc.so"
-//go:cgo_import_dynamic libc_listen listen "libsocket.so"
-//go:cgo_import_dynamic libc_lstat lstat "libc.so"
-//go:cgo_import_dynamic libc_madvise madvise "libc.so"
-//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
-//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
-//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
-//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
-//go:cgo_import_dynamic libc_mknod mknod "libc.so"
-//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
-//go:cgo_import_dynamic libc_mlock mlock "libc.so"
-//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
-//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
-//go:cgo_import_dynamic libc_munlock munlock "libc.so"
-//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
-//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
-//go:cgo_import_dynamic libc_open open "libc.so"
-//go:cgo_import_dynamic libc_openat openat "libc.so"
-//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
-//go:cgo_import_dynamic libc_pause pause "libc.so"
-//go:cgo_import_dynamic libc_pread pread "libc.so"
-//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
-//go:cgo_import_dynamic libc_read read "libc.so"
-//go:cgo_import_dynamic libc_readlink readlink "libc.so"
-//go:cgo_import_dynamic libc_rename rename "libc.so"
-//go:cgo_import_dynamic libc_renameat renameat "libc.so"
-//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
-//go:cgo_import_dynamic libc_lseek lseek "libc.so"
-//go:cgo_import_dynamic libc_setegid setegid "libc.so"
-//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
-//go:cgo_import_dynamic libc_setgid setgid "libc.so"
-//go:cgo_import_dynamic libc_sethostname sethostname "libc.so"
-//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
-//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
-//go:cgo_import_dynamic libc_setregid setregid "libc.so"
-//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-//go:cgo_import_dynamic libc_setsid setsid "libc.so"
-//go:cgo_import_dynamic libc_setuid setuid "libc.so"
-//go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
-//go:cgo_import_dynamic libc_stat stat "libc.so"
-//go:cgo_import_dynamic libc_symlink symlink "libc.so"
-//go:cgo_import_dynamic libc_sync sync "libc.so"
-//go:cgo_import_dynamic libc_times times "libc.so"
-//go:cgo_import_dynamic libc_truncate truncate "libc.so"
-//go:cgo_import_dynamic libc_fsync fsync "libc.so"
-//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
-//go:cgo_import_dynamic libc_umask umask "libc.so"
-//go:cgo_import_dynamic libc_uname uname "libc.so"
-//go:cgo_import_dynamic libc_umount umount "libc.so"
-//go:cgo_import_dynamic libc_unlink unlink "libc.so"
-//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
-//go:cgo_import_dynamic libc_ustat ustat "libc.so"
-//go:cgo_import_dynamic libc_utime utime "libc.so"
-//go:cgo_import_dynamic libc_bind bind "libsocket.so"
-//go:cgo_import_dynamic libc_connect connect "libsocket.so"
-//go:cgo_import_dynamic libc_mmap mmap "libc.so"
-//go:cgo_import_dynamic libc_munmap munmap "libc.so"
-//go:cgo_import_dynamic libc_sendto sendto "libsocket.so"
-//go:cgo_import_dynamic libc_socket socket "libsocket.so"
-//go:cgo_import_dynamic libc_socketpair socketpair "libsocket.so"
-//go:cgo_import_dynamic libc_write write "libc.so"
-//go:cgo_import_dynamic libc_getsockopt getsockopt "libsocket.so"
-//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
-//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
-//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
-//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
-
-//go:linkname procpipe libc_pipe
-//go:linkname procgetsockname libc_getsockname
-//go:linkname procGetcwd libc_getcwd
-//go:linkname procgetgroups libc_getgroups
-//go:linkname procsetgroups libc_setgroups
-//go:linkname procwait4 libc_wait4
-//go:linkname procgethostname libc_gethostname
-//go:linkname procutimes libc_utimes
-//go:linkname procutimensat libc_utimensat
-//go:linkname procfcntl libc_fcntl
-//go:linkname procfutimesat libc_futimesat
-//go:linkname procaccept libc_accept
-//go:linkname procrecvmsg libc_recvmsg
-//go:linkname procsendmsg libc_sendmsg
-//go:linkname procacct libc_acct
-//go:linkname procioctl libc_ioctl
-//go:linkname procAccess libc_access
-//go:linkname procAdjtime libc_adjtime
-//go:linkname procChdir libc_chdir
-//go:linkname procChmod libc_chmod
-//go:linkname procChown libc_chown
-//go:linkname procChroot libc_chroot
-//go:linkname procClose libc_close
-//go:linkname procCreat libc_creat
-//go:linkname procDup libc_dup
-//go:linkname procDup2 libc_dup2
-//go:linkname procExit libc_exit
-//go:linkname procFchdir libc_fchdir
-//go:linkname procFchmod libc_fchmod
-//go:linkname procFchmodat libc_fchmodat
-//go:linkname procFchown libc_fchown
-//go:linkname procFchownat libc_fchownat
-//go:linkname procFdatasync libc_fdatasync
-//go:linkname procFpathconf libc_fpathconf
-//go:linkname procFstat libc_fstat
-//go:linkname procGetdents libc_getdents
-//go:linkname procGetgid libc_getgid
-//go:linkname procGetpid libc_getpid
-//go:linkname procGetpgid libc_getpgid
-//go:linkname procGetpgrp libc_getpgrp
-//go:linkname procGeteuid libc_geteuid
-//go:linkname procGetegid libc_getegid
-//go:linkname procGetppid libc_getppid
-//go:linkname procGetpriority libc_getpriority
-//go:linkname procGetrlimit libc_getrlimit
-//go:linkname procGetrusage libc_getrusage
-//go:linkname procGettimeofday libc_gettimeofday
-//go:linkname procGetuid libc_getuid
-//go:linkname procKill libc_kill
-//go:linkname procLchown libc_lchown
-//go:linkname procLink libc_link
-//go:linkname proclisten libc_listen
-//go:linkname procLstat libc_lstat
-//go:linkname procMadvise libc_madvise
-//go:linkname procMkdir libc_mkdir
-//go:linkname procMkdirat libc_mkdirat
-//go:linkname procMkfifo libc_mkfifo
-//go:linkname procMkfifoat libc_mkfifoat
-//go:linkname procMknod libc_mknod
-//go:linkname procMknodat libc_mknodat
-//go:linkname procMlock libc_mlock
-//go:linkname procMlockall libc_mlockall
-//go:linkname procMprotect libc_mprotect
-//go:linkname procMunlock libc_munlock
-//go:linkname procMunlockall libc_munlockall
-//go:linkname procNanosleep libc_nanosleep
-//go:linkname procOpen libc_open
-//go:linkname procOpenat libc_openat
-//go:linkname procPathconf libc_pathconf
-//go:linkname procPause libc_pause
-//go:linkname procPread libc_pread
-//go:linkname procPwrite libc_pwrite
-//go:linkname procread libc_read
-//go:linkname procReadlink libc_readlink
-//go:linkname procRename libc_rename
-//go:linkname procRenameat libc_renameat
-//go:linkname procRmdir libc_rmdir
-//go:linkname proclseek libc_lseek
-//go:linkname procSetegid libc_setegid
-//go:linkname procSeteuid libc_seteuid
-//go:linkname procSetgid libc_setgid
-//go:linkname procSethostname libc_sethostname
-//go:linkname procSetpgid libc_setpgid
-//go:linkname procSetpriority libc_setpriority
-//go:linkname procSetregid libc_setregid
-//go:linkname procSetreuid libc_setreuid
-//go:linkname procSetrlimit libc_setrlimit
-//go:linkname procSetsid libc_setsid
-//go:linkname procSetuid libc_setuid
-//go:linkname procshutdown libc_shutdown
-//go:linkname procStat libc_stat
-//go:linkname procSymlink libc_symlink
-//go:linkname procSync libc_sync
-//go:linkname procTimes libc_times
-//go:linkname procTruncate libc_truncate
-//go:linkname procFsync libc_fsync
-//go:linkname procFtruncate libc_ftruncate
-//go:linkname procUmask libc_umask
-//go:linkname procUname libc_uname
-//go:linkname procumount libc_umount
-//go:linkname procUnlink libc_unlink
-//go:linkname procUnlinkat libc_unlinkat
-//go:linkname procUstat libc_ustat
-//go:linkname procUtime libc_utime
-//go:linkname procbind libc_bind
-//go:linkname procconnect libc_connect
-//go:linkname procmmap libc_mmap
-//go:linkname procmunmap libc_munmap
-//go:linkname procsendto libc_sendto
-//go:linkname procsocket libc_socket
-//go:linkname procsocketpair libc_socketpair
-//go:linkname procwrite libc_write
-//go:linkname procgetsockopt libc_getsockopt
-//go:linkname procgetpeername libc_getpeername
-//go:linkname procsetsockopt libc_setsockopt
-//go:linkname procrecvfrom libc_recvfrom
-//go:linkname procsysconf libc_sysconf
-
-var (
- procpipe,
- procgetsockname,
- procGetcwd,
- procgetgroups,
- procsetgroups,
- procwait4,
- procgethostname,
- procutimes,
- procutimensat,
- procfcntl,
- procfutimesat,
- procaccept,
- procrecvmsg,
- procsendmsg,
- procacct,
- procioctl,
- procAccess,
- procAdjtime,
- procChdir,
- procChmod,
- procChown,
- procChroot,
- procClose,
- procCreat,
- procDup,
- procDup2,
- procExit,
- procFchdir,
- procFchmod,
- procFchmodat,
- procFchown,
- procFchownat,
- procFdatasync,
- procFpathconf,
- procFstat,
- procGetdents,
- procGetgid,
- procGetpid,
- procGetpgid,
- procGetpgrp,
- procGeteuid,
- procGetegid,
- procGetppid,
- procGetpriority,
- procGetrlimit,
- procGetrusage,
- procGettimeofday,
- procGetuid,
- procKill,
- procLchown,
- procLink,
- proclisten,
- procLstat,
- procMadvise,
- procMkdir,
- procMkdirat,
- procMkfifo,
- procMkfifoat,
- procMknod,
- procMknodat,
- procMlock,
- procMlockall,
- procMprotect,
- procMunlock,
- procMunlockall,
- procNanosleep,
- procOpen,
- procOpenat,
- procPathconf,
- procPause,
- procPread,
- procPwrite,
- procread,
- procReadlink,
- procRename,
- procRenameat,
- procRmdir,
- proclseek,
- procSetegid,
- procSeteuid,
- procSetgid,
- procSethostname,
- procSetpgid,
- procSetpriority,
- procSetregid,
- procSetreuid,
- procSetrlimit,
- procSetsid,
- procSetuid,
- procshutdown,
- procStat,
- procSymlink,
- procSync,
- procTimes,
- procTruncate,
- procFsync,
- procFtruncate,
- procUmask,
- procUname,
- procumount,
- procUnlink,
- procUnlinkat,
- procUstat,
- procUtime,
- procbind,
- procconnect,
- procmmap,
- procmunmap,
- procsendto,
- procsocket,
- procsocketpair,
- procwrite,
- procgetsockopt,
- procgetpeername,
- procsetsockopt,
- procrecvfrom,
- procsysconf syscallFunc
-)
-
-func pipe(p *[2]_C_int) (n int, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int32(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func gethostname(buf []byte) (n int, err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func acct(path *byte) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func ioctl(fd int, req int, arg uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Close(fd int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Creat(path string, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Exit(code int) {
- sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
- return
-}
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getgid() (gid int) {
- r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-func Getpid() (pid int) {
- r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getpgrp() (pgid int, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Geteuid() (euid int) {
- r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-func Getegid() (egid int) {
- r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-func Getppid() (ppid int) {
- r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-func Getpriority(which int, who int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getuid() (uid int) {
- r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 *byte
- if len(b) > 0 {
- _p0 = &b[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mlock(b []byte) (err error) {
- var _p0 *byte
- if len(b) > 0 {
- _p0 = &b[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 *byte
- if len(b) > 0 {
- _p0 = &b[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Munlock(b []byte) (err error) {
- var _p0 *byte
- if len(b) > 0 {
- _p0 = &b[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Munlockall() (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pause() (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- if len(buf) > 0 {
- _p1 = &buf[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setegid(egid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setgid(gid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Sethostname(p []byte) (err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setuid(uid int) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Sync() (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fsync(fd int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
- oldmask = int(r0)
- return
-}
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
- use(unsafe.Pointer(_p0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procbind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procconnect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsocket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsocketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func sysconf(name int) (n int64, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go
deleted file mode 100644
index 83bb935b9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// mksysctl_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package unix
-
-type mibentry struct {
- ctlname string
- ctloid []_C_int
-}
-
-var sysctlMib = []mibentry{
- {"ddb.console", []_C_int{9, 6}},
- {"ddb.log", []_C_int{9, 7}},
- {"ddb.max_line", []_C_int{9, 3}},
- {"ddb.max_width", []_C_int{9, 2}},
- {"ddb.panic", []_C_int{9, 5}},
- {"ddb.radix", []_C_int{9, 1}},
- {"ddb.tab_stop_width", []_C_int{9, 4}},
- {"ddb.trigger", []_C_int{9, 8}},
- {"fs.posix.setuid", []_C_int{3, 1, 1}},
- {"hw.allowpowerdown", []_C_int{6, 22}},
- {"hw.byteorder", []_C_int{6, 4}},
- {"hw.cpuspeed", []_C_int{6, 12}},
- {"hw.diskcount", []_C_int{6, 10}},
- {"hw.disknames", []_C_int{6, 8}},
- {"hw.diskstats", []_C_int{6, 9}},
- {"hw.machine", []_C_int{6, 1}},
- {"hw.model", []_C_int{6, 2}},
- {"hw.ncpu", []_C_int{6, 3}},
- {"hw.ncpufound", []_C_int{6, 21}},
- {"hw.pagesize", []_C_int{6, 7}},
- {"hw.physmem", []_C_int{6, 19}},
- {"hw.product", []_C_int{6, 15}},
- {"hw.serialno", []_C_int{6, 17}},
- {"hw.setperf", []_C_int{6, 13}},
- {"hw.usermem", []_C_int{6, 20}},
- {"hw.uuid", []_C_int{6, 18}},
- {"hw.vendor", []_C_int{6, 14}},
- {"hw.version", []_C_int{6, 16}},
- {"kern.arandom", []_C_int{1, 37}},
- {"kern.argmax", []_C_int{1, 8}},
- {"kern.boottime", []_C_int{1, 21}},
- {"kern.bufcachepercent", []_C_int{1, 72}},
- {"kern.ccpu", []_C_int{1, 45}},
- {"kern.clockrate", []_C_int{1, 12}},
- {"kern.consdev", []_C_int{1, 75}},
- {"kern.cp_time", []_C_int{1, 40}},
- {"kern.cp_time2", []_C_int{1, 71}},
- {"kern.cryptodevallowsoft", []_C_int{1, 53}},
- {"kern.domainname", []_C_int{1, 22}},
- {"kern.file", []_C_int{1, 73}},
- {"kern.forkstat", []_C_int{1, 42}},
- {"kern.fscale", []_C_int{1, 46}},
- {"kern.fsync", []_C_int{1, 33}},
- {"kern.hostid", []_C_int{1, 11}},
- {"kern.hostname", []_C_int{1, 10}},
- {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
- {"kern.job_control", []_C_int{1, 19}},
- {"kern.malloc.buckets", []_C_int{1, 39, 1}},
- {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
- {"kern.maxclusters", []_C_int{1, 67}},
- {"kern.maxfiles", []_C_int{1, 7}},
- {"kern.maxlocksperuid", []_C_int{1, 70}},
- {"kern.maxpartitions", []_C_int{1, 23}},
- {"kern.maxproc", []_C_int{1, 6}},
- {"kern.maxthread", []_C_int{1, 25}},
- {"kern.maxvnodes", []_C_int{1, 5}},
- {"kern.mbstat", []_C_int{1, 59}},
- {"kern.msgbuf", []_C_int{1, 48}},
- {"kern.msgbufsize", []_C_int{1, 38}},
- {"kern.nchstats", []_C_int{1, 41}},
- {"kern.netlivelocks", []_C_int{1, 76}},
- {"kern.nfiles", []_C_int{1, 56}},
- {"kern.ngroups", []_C_int{1, 18}},
- {"kern.nosuidcoredump", []_C_int{1, 32}},
- {"kern.nprocs", []_C_int{1, 47}},
- {"kern.nselcoll", []_C_int{1, 43}},
- {"kern.nthreads", []_C_int{1, 26}},
- {"kern.numvnodes", []_C_int{1, 58}},
- {"kern.osrelease", []_C_int{1, 2}},
- {"kern.osrevision", []_C_int{1, 3}},
- {"kern.ostype", []_C_int{1, 1}},
- {"kern.osversion", []_C_int{1, 27}},
- {"kern.pool_debug", []_C_int{1, 77}},
- {"kern.posix1version", []_C_int{1, 17}},
- {"kern.proc", []_C_int{1, 66}},
- {"kern.random", []_C_int{1, 31}},
- {"kern.rawpartition", []_C_int{1, 24}},
- {"kern.saved_ids", []_C_int{1, 20}},
- {"kern.securelevel", []_C_int{1, 9}},
- {"kern.seminfo", []_C_int{1, 61}},
- {"kern.shminfo", []_C_int{1, 62}},
- {"kern.somaxconn", []_C_int{1, 28}},
- {"kern.sominconn", []_C_int{1, 29}},
- {"kern.splassert", []_C_int{1, 54}},
- {"kern.stackgap_random", []_C_int{1, 50}},
- {"kern.sysvipc_info", []_C_int{1, 51}},
- {"kern.sysvmsg", []_C_int{1, 34}},
- {"kern.sysvsem", []_C_int{1, 35}},
- {"kern.sysvshm", []_C_int{1, 36}},
- {"kern.timecounter.choice", []_C_int{1, 69, 4}},
- {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
- {"kern.timecounter.tick", []_C_int{1, 69, 1}},
- {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
- {"kern.tty.maxptys", []_C_int{1, 44, 6}},
- {"kern.tty.nptys", []_C_int{1, 44, 7}},
- {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
- {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
- {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
- {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
- {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
- {"kern.ttycount", []_C_int{1, 57}},
- {"kern.userasymcrypto", []_C_int{1, 60}},
- {"kern.usercrypto", []_C_int{1, 52}},
- {"kern.usermount", []_C_int{1, 30}},
- {"kern.version", []_C_int{1, 4}},
- {"kern.vnode", []_C_int{1, 13}},
- {"kern.watchdog.auto", []_C_int{1, 64, 2}},
- {"kern.watchdog.period", []_C_int{1, 64, 1}},
- {"net.bpf.bufsize", []_C_int{4, 31, 1}},
- {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
- {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
- {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
- {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
- {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
- {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
- {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
- {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
- {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
- {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
- {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
- {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
- {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
- {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
- {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
- {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
- {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
- {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
- {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
- {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
- {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
- {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
- {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
- {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
- {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
- {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
- {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
- {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
- {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
- {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
- {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
- {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
- {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
- {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
- {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
- {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
- {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
- {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
- {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
- {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
- {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
- {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
- {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
- {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
- {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
- {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
- {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
- {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
- {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
- {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
- {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
- {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
- {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
- {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}},
- {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
- {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}},
- {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
- {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
- {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
- {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
- {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
- {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
- {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
- {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
- {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
- {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
- {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
- {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
- {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
- {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
- {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
- {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
- {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
- {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
- {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
- {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
- {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
- {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
- {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
- {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
- {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
- {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
- {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
- {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
- {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
- {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
- {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
- {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
- {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
- {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
- {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
- {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}},
- {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
- {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}},
- {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}},
- {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}},
- {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
- {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}},
- {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
- {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
- {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
- {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
- {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
- {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
- {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
- {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
- {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
- {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
- {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
- {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
- {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}},
- {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}},
- {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
- {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
- {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
- {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
- {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
- {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
- {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
- {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}},
- {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
- {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
- {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
- {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}},
- {"net.key.sadb_dump", []_C_int{4, 30, 1}},
- {"net.key.spd_dump", []_C_int{4, 30, 2}},
- {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
- {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
- {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
- {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
- {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
- {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
- {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}},
- {"net.mpls.ttl", []_C_int{4, 33, 2}},
- {"net.pflow.stats", []_C_int{4, 34, 1}},
- {"net.pipex.enable", []_C_int{4, 35, 1}},
- {"vm.anonmin", []_C_int{2, 7}},
- {"vm.loadavg", []_C_int{2, 2}},
- {"vm.maxslp", []_C_int{2, 10}},
- {"vm.nkmempages", []_C_int{2, 6}},
- {"vm.psstrings", []_C_int{2, 3}},
- {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
- {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
- {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
- {"vm.uspace", []_C_int{2, 11}},
- {"vm.uvmexp", []_C_int{2, 4}},
- {"vm.vmmeter", []_C_int{2, 1}},
- {"vm.vnodemin", []_C_int{2, 9}},
- {"vm.vtextmin", []_C_int{2, 8}},
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
deleted file mode 100644
index 2786773ba..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build 386,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TRACE64 = 179
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS_SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SYSCTLBYNAME = 274
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MEMORYSTATUS_CONTROL = 440
- SYS_GUARDED_OPEN_NP = 441
- SYS_GUARDED_CLOSE_NP = 442
- SYS_GUARDED_KQUEUE_NP = 443
- SYS_CHANGE_FDGUARD_NP = 444
- SYS_PROC_RLIMIT_CONTROL = 446
- SYS_CONNECTX = 447
- SYS_DISCONNECTX = 448
- SYS_PEELOFF = 449
- SYS_SOCKET_DELEGATE = 450
- SYS_TELEMETRY = 451
- SYS_PROC_UUID_POLICY = 452
- SYS_MEMORYSTATUS_GET_LEVEL = 453
- SYS_SYSTEM_OVERRIDE = 454
- SYS_VFS_PURGE = 455
- SYS_SFI_CTL = 456
- SYS_SFI_PIDCTL = 457
- SYS_COALITION = 458
- SYS_COALITION_INFO = 459
- SYS_NECP_MATCH_POLICY = 460
- SYS_GETATTRLISTBULK = 461
- SYS_OPENAT = 463
- SYS_OPENAT_NOCANCEL = 464
- SYS_RENAMEAT = 465
- SYS_FACCESSAT = 466
- SYS_FCHMODAT = 467
- SYS_FCHOWNAT = 468
- SYS_FSTATAT = 469
- SYS_FSTATAT64 = 470
- SYS_LINKAT = 471
- SYS_UNLINKAT = 472
- SYS_READLINKAT = 473
- SYS_SYMLINKAT = 474
- SYS_MKDIRAT = 475
- SYS_GETATTRLISTAT = 476
- SYS_PROC_TRACE_LOG = 477
- SYS_BSDTHREAD_CTL = 478
- SYS_OPENBYID_NP = 479
- SYS_RECVMSG_X = 480
- SYS_SENDMSG_X = 481
- SYS_THREAD_SELFUSAGE = 482
- SYS_CSRCTL = 483
- SYS_GUARDED_OPEN_DPROTECTED_NP = 484
- SYS_GUARDED_WRITE_NP = 485
- SYS_GUARDED_PWRITE_NP = 486
- SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAME_EXT = 488
- SYS_MREMAP_ENCRYPTED = 489
- SYS_MAXSYSCALL = 490
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
deleted file mode 100644
index 09de240c8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TRACE64 = 179
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS_SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SYSCTLBYNAME = 274
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MEMORYSTATUS_CONTROL = 440
- SYS_GUARDED_OPEN_NP = 441
- SYS_GUARDED_CLOSE_NP = 442
- SYS_GUARDED_KQUEUE_NP = 443
- SYS_CHANGE_FDGUARD_NP = 444
- SYS_PROC_RLIMIT_CONTROL = 446
- SYS_CONNECTX = 447
- SYS_DISCONNECTX = 448
- SYS_PEELOFF = 449
- SYS_SOCKET_DELEGATE = 450
- SYS_TELEMETRY = 451
- SYS_PROC_UUID_POLICY = 452
- SYS_MEMORYSTATUS_GET_LEVEL = 453
- SYS_SYSTEM_OVERRIDE = 454
- SYS_VFS_PURGE = 455
- SYS_SFI_CTL = 456
- SYS_SFI_PIDCTL = 457
- SYS_COALITION = 458
- SYS_COALITION_INFO = 459
- SYS_NECP_MATCH_POLICY = 460
- SYS_GETATTRLISTBULK = 461
- SYS_OPENAT = 463
- SYS_OPENAT_NOCANCEL = 464
- SYS_RENAMEAT = 465
- SYS_FACCESSAT = 466
- SYS_FCHMODAT = 467
- SYS_FCHOWNAT = 468
- SYS_FSTATAT = 469
- SYS_FSTATAT64 = 470
- SYS_LINKAT = 471
- SYS_UNLINKAT = 472
- SYS_READLINKAT = 473
- SYS_SYMLINKAT = 474
- SYS_MKDIRAT = 475
- SYS_GETATTRLISTAT = 476
- SYS_PROC_TRACE_LOG = 477
- SYS_BSDTHREAD_CTL = 478
- SYS_OPENBYID_NP = 479
- SYS_RECVMSG_X = 480
- SYS_SENDMSG_X = 481
- SYS_THREAD_SELFUSAGE = 482
- SYS_CSRCTL = 483
- SYS_GUARDED_OPEN_DPROTECTED_NP = 484
- SYS_GUARDED_WRITE_NP = 485
- SYS_GUARDED_PWRITE_NP = 486
- SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAME_EXT = 488
- SYS_MREMAP_ENCRYPTED = 489
- SYS_MAXSYSCALL = 490
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
deleted file mode 100644
index b8c9aea85..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
+++ /dev/null
@@ -1,358 +0,0 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS___SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_ATSOCKET = 206
- SYS_ATGETMSG = 207
- SYS_ATPUTMSG = 208
- SYS_ATPSNDREQ = 209
- SYS_ATPSNDRSP = 210
- SYS_ATPGETREQ = 211
- SYS_ATPGETRSP = 212
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SEM_GETVALUE = 274
- SYS_SEM_INIT = 275
- SYS_SEM_DESTROY = 276
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MAXSYSCALL = 440
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
deleted file mode 100644
index 26677ebbf..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm64,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TRACE64 = 179
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS_SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SYSCTLBYNAME = 274
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MEMORYSTATUS_CONTROL = 440
- SYS_GUARDED_OPEN_NP = 441
- SYS_GUARDED_CLOSE_NP = 442
- SYS_GUARDED_KQUEUE_NP = 443
- SYS_CHANGE_FDGUARD_NP = 444
- SYS_PROC_RLIMIT_CONTROL = 446
- SYS_CONNECTX = 447
- SYS_DISCONNECTX = 448
- SYS_PEELOFF = 449
- SYS_SOCKET_DELEGATE = 450
- SYS_TELEMETRY = 451
- SYS_PROC_UUID_POLICY = 452
- SYS_MEMORYSTATUS_GET_LEVEL = 453
- SYS_SYSTEM_OVERRIDE = 454
- SYS_VFS_PURGE = 455
- SYS_SFI_CTL = 456
- SYS_SFI_PIDCTL = 457
- SYS_COALITION = 458
- SYS_COALITION_INFO = 459
- SYS_NECP_MATCH_POLICY = 460
- SYS_GETATTRLISTBULK = 461
- SYS_OPENAT = 463
- SYS_OPENAT_NOCANCEL = 464
- SYS_RENAMEAT = 465
- SYS_FACCESSAT = 466
- SYS_FCHMODAT = 467
- SYS_FCHOWNAT = 468
- SYS_FSTATAT = 469
- SYS_FSTATAT64 = 470
- SYS_LINKAT = 471
- SYS_UNLINKAT = 472
- SYS_READLINKAT = 473
- SYS_SYMLINKAT = 474
- SYS_MKDIRAT = 475
- SYS_GETATTRLISTAT = 476
- SYS_PROC_TRACE_LOG = 477
- SYS_BSDTHREAD_CTL = 478
- SYS_OPENBYID_NP = 479
- SYS_RECVMSG_X = 480
- SYS_SENDMSG_X = 481
- SYS_THREAD_SELFUSAGE = 482
- SYS_CSRCTL = 483
- SYS_GUARDED_OPEN_DPROTECTED_NP = 484
- SYS_GUARDED_WRITE_NP = 485
- SYS_GUARDED_PWRITE_NP = 486
- SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAME_EXT = 488
- SYS_MREMAP_ENCRYPTED = 489
- SYS_MAXSYSCALL = 490
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
deleted file mode 100644
index d6038fa9b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
+++ /dev/null
@@ -1,304 +0,0 @@
-// mksysnum_dragonfly.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,dragonfly
-
-package unix
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void exit(int rval); }
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
- SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
- SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
- SYS_ACCESS = 33 // { int access(char *path, int flags); }
- SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
- SYS_VFORK = 66 // { pid_t vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
- SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
- SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
- SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
- SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
- SYS_UNAME = 164 // { int uname(struct utsname *name); }
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
- SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
- // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
- SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
- SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
- SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
- SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
- SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
- SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
- SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
- SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
- SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
- SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
- SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
- SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
- SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
- SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
- SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
- SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
- SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
- SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); }
- SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
- SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
- SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
- SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
- SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
- SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
- SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
- SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
- SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
- SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
- SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
- SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
- SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
- SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
- SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
- SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
- SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
- SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
- SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
- SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
- SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
- SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
- SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
- SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
- SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
- SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
- SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
- SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
- SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
- SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
- SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
- SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
- SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
- SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
- SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
- SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
- SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
- SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
- SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
- SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
- SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
- SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
- SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
- SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
- SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
- SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
- SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
- SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
- SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
- SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
- SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
- SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
- SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
- SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
- SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
- SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
- SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
- SYS_SWAPOFF = 529 // { int swapoff(char *name); }
- SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
- SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
- SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
- SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
- SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
deleted file mode 100644
index 262a84536..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
+++ /dev/null
@@ -1,351 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build 386,freebsd
-
-package unix
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
- SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
deleted file mode 100644
index 57a60ea12..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
+++ /dev/null
@@ -1,351 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,freebsd
-
-package unix
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
- SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
deleted file mode 100644
index 206b9f612..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
+++ /dev/null
@@ -1,351 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,freebsd
-
-package unix
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
- SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
deleted file mode 100644
index ba952c675..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ /dev/null
@@ -1,355 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd_32.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build 386,linux
-
-package unix
-
-const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86OLD = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_VM86 = 166
- SYS_QUERY_MODULE = 167
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_SETRESGID = 170
- SYS_GETRESGID = 171
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_CHOWN = 182
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_GETPMSG = 188
- SYS_PUTPMSG = 189
- SYS_VFORK = 190
- SYS_UGETRLIMIT = 191
- SYS_MMAP2 = 192
- SYS_TRUNCATE64 = 193
- SYS_FTRUNCATE64 = 194
- SYS_STAT64 = 195
- SYS_LSTAT64 = 196
- SYS_FSTAT64 = 197
- SYS_LCHOWN32 = 198
- SYS_GETUID32 = 199
- SYS_GETGID32 = 200
- SYS_GETEUID32 = 201
- SYS_GETEGID32 = 202
- SYS_SETREUID32 = 203
- SYS_SETREGID32 = 204
- SYS_GETGROUPS32 = 205
- SYS_SETGROUPS32 = 206
- SYS_FCHOWN32 = 207
- SYS_SETRESUID32 = 208
- SYS_GETRESUID32 = 209
- SYS_SETRESGID32 = 210
- SYS_GETRESGID32 = 211
- SYS_CHOWN32 = 212
- SYS_SETUID32 = 213
- SYS_SETGID32 = 214
- SYS_SETFSUID32 = 215
- SYS_SETFSGID32 = 216
- SYS_PIVOT_ROOT = 217
- SYS_MINCORE = 218
- SYS_MADVISE = 219
- SYS_MADVISE1 = 219
- SYS_GETDENTS64 = 220
- SYS_FCNTL64 = 221
- SYS_GETTID = 224
- SYS_READAHEAD = 225
- SYS_SETXATTR = 226
- SYS_LSETXATTR = 227
- SYS_FSETXATTR = 228
- SYS_GETXATTR = 229
- SYS_LGETXATTR = 230
- SYS_FGETXATTR = 231
- SYS_LISTXATTR = 232
- SYS_LLISTXATTR = 233
- SYS_FLISTXATTR = 234
- SYS_REMOVEXATTR = 235
- SYS_LREMOVEXATTR = 236
- SYS_FREMOVEXATTR = 237
- SYS_TKILL = 238
- SYS_SENDFILE64 = 239
- SYS_FUTEX = 240
- SYS_SCHED_SETAFFINITY = 241
- SYS_SCHED_GETAFFINITY = 242
- SYS_SET_THREAD_AREA = 243
- SYS_GET_THREAD_AREA = 244
- SYS_IO_SETUP = 245
- SYS_IO_DESTROY = 246
- SYS_IO_GETEVENTS = 247
- SYS_IO_SUBMIT = 248
- SYS_IO_CANCEL = 249
- SYS_FADVISE64 = 250
- SYS_EXIT_GROUP = 252
- SYS_LOOKUP_DCOOKIE = 253
- SYS_EPOLL_CREATE = 254
- SYS_EPOLL_CTL = 255
- SYS_EPOLL_WAIT = 256
- SYS_REMAP_FILE_PAGES = 257
- SYS_SET_TID_ADDRESS = 258
- SYS_TIMER_CREATE = 259
- SYS_TIMER_SETTIME = 260
- SYS_TIMER_GETTIME = 261
- SYS_TIMER_GETOVERRUN = 262
- SYS_TIMER_DELETE = 263
- SYS_CLOCK_SETTIME = 264
- SYS_CLOCK_GETTIME = 265
- SYS_CLOCK_GETRES = 266
- SYS_CLOCK_NANOSLEEP = 267
- SYS_STATFS64 = 268
- SYS_FSTATFS64 = 269
- SYS_TGKILL = 270
- SYS_UTIMES = 271
- SYS_FADVISE64_64 = 272
- SYS_VSERVER = 273
- SYS_MBIND = 274
- SYS_GET_MEMPOLICY = 275
- SYS_SET_MEMPOLICY = 276
- SYS_MQ_OPEN = 277
- SYS_MQ_UNLINK = 278
- SYS_MQ_TIMEDSEND = 279
- SYS_MQ_TIMEDRECEIVE = 280
- SYS_MQ_NOTIFY = 281
- SYS_MQ_GETSETATTR = 282
- SYS_KEXEC_LOAD = 283
- SYS_WAITID = 284
- SYS_ADD_KEY = 286
- SYS_REQUEST_KEY = 287
- SYS_KEYCTL = 288
- SYS_IOPRIO_SET = 289
- SYS_IOPRIO_GET = 290
- SYS_INOTIFY_INIT = 291
- SYS_INOTIFY_ADD_WATCH = 292
- SYS_INOTIFY_RM_WATCH = 293
- SYS_MIGRATE_PAGES = 294
- SYS_OPENAT = 295
- SYS_MKDIRAT = 296
- SYS_MKNODAT = 297
- SYS_FCHOWNAT = 298
- SYS_FUTIMESAT = 299
- SYS_FSTATAT64 = 300
- SYS_UNLINKAT = 301
- SYS_RENAMEAT = 302
- SYS_LINKAT = 303
- SYS_SYMLINKAT = 304
- SYS_READLINKAT = 305
- SYS_FCHMODAT = 306
- SYS_FACCESSAT = 307
- SYS_PSELECT6 = 308
- SYS_PPOLL = 309
- SYS_UNSHARE = 310
- SYS_SET_ROBUST_LIST = 311
- SYS_GET_ROBUST_LIST = 312
- SYS_SPLICE = 313
- SYS_SYNC_FILE_RANGE = 314
- SYS_TEE = 315
- SYS_VMSPLICE = 316
- SYS_MOVE_PAGES = 317
- SYS_GETCPU = 318
- SYS_EPOLL_PWAIT = 319
- SYS_UTIMENSAT = 320
- SYS_SIGNALFD = 321
- SYS_TIMERFD_CREATE = 322
- SYS_EVENTFD = 323
- SYS_FALLOCATE = 324
- SYS_TIMERFD_SETTIME = 325
- SYS_TIMERFD_GETTIME = 326
- SYS_SIGNALFD4 = 327
- SYS_EVENTFD2 = 328
- SYS_EPOLL_CREATE1 = 329
- SYS_DUP3 = 330
- SYS_PIPE2 = 331
- SYS_INOTIFY_INIT1 = 332
- SYS_PREADV = 333
- SYS_PWRITEV = 334
- SYS_RT_TGSIGQUEUEINFO = 335
- SYS_PERF_EVENT_OPEN = 336
- SYS_RECVMMSG = 337
- SYS_FANOTIFY_INIT = 338
- SYS_FANOTIFY_MARK = 339
- SYS_PRLIMIT64 = 340
- SYS_NAME_TO_HANDLE_AT = 341
- SYS_OPEN_BY_HANDLE_AT = 342
- SYS_CLOCK_ADJTIME = 343
- SYS_SYNCFS = 344
- SYS_SENDMMSG = 345
- SYS_SETNS = 346
- SYS_PROCESS_VM_READV = 347
- SYS_PROCESS_VM_WRITEV = 348
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
deleted file mode 100644
index ddac31f58..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ /dev/null
@@ -1,321 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd_64.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,linux
-
-package unix
-
-const (
- SYS_READ = 0
- SYS_WRITE = 1
- SYS_OPEN = 2
- SYS_CLOSE = 3
- SYS_STAT = 4
- SYS_FSTAT = 5
- SYS_LSTAT = 6
- SYS_POLL = 7
- SYS_LSEEK = 8
- SYS_MMAP = 9
- SYS_MPROTECT = 10
- SYS_MUNMAP = 11
- SYS_BRK = 12
- SYS_RT_SIGACTION = 13
- SYS_RT_SIGPROCMASK = 14
- SYS_RT_SIGRETURN = 15
- SYS_IOCTL = 16
- SYS_PREAD64 = 17
- SYS_PWRITE64 = 18
- SYS_READV = 19
- SYS_WRITEV = 20
- SYS_ACCESS = 21
- SYS_PIPE = 22
- SYS_SELECT = 23
- SYS_SCHED_YIELD = 24
- SYS_MREMAP = 25
- SYS_MSYNC = 26
- SYS_MINCORE = 27
- SYS_MADVISE = 28
- SYS_SHMGET = 29
- SYS_SHMAT = 30
- SYS_SHMCTL = 31
- SYS_DUP = 32
- SYS_DUP2 = 33
- SYS_PAUSE = 34
- SYS_NANOSLEEP = 35
- SYS_GETITIMER = 36
- SYS_ALARM = 37
- SYS_SETITIMER = 38
- SYS_GETPID = 39
- SYS_SENDFILE = 40
- SYS_SOCKET = 41
- SYS_CONNECT = 42
- SYS_ACCEPT = 43
- SYS_SENDTO = 44
- SYS_RECVFROM = 45
- SYS_SENDMSG = 46
- SYS_RECVMSG = 47
- SYS_SHUTDOWN = 48
- SYS_BIND = 49
- SYS_LISTEN = 50
- SYS_GETSOCKNAME = 51
- SYS_GETPEERNAME = 52
- SYS_SOCKETPAIR = 53
- SYS_SETSOCKOPT = 54
- SYS_GETSOCKOPT = 55
- SYS_CLONE = 56
- SYS_FORK = 57
- SYS_VFORK = 58
- SYS_EXECVE = 59
- SYS_EXIT = 60
- SYS_WAIT4 = 61
- SYS_KILL = 62
- SYS_UNAME = 63
- SYS_SEMGET = 64
- SYS_SEMOP = 65
- SYS_SEMCTL = 66
- SYS_SHMDT = 67
- SYS_MSGGET = 68
- SYS_MSGSND = 69
- SYS_MSGRCV = 70
- SYS_MSGCTL = 71
- SYS_FCNTL = 72
- SYS_FLOCK = 73
- SYS_FSYNC = 74
- SYS_FDATASYNC = 75
- SYS_TRUNCATE = 76
- SYS_FTRUNCATE = 77
- SYS_GETDENTS = 78
- SYS_GETCWD = 79
- SYS_CHDIR = 80
- SYS_FCHDIR = 81
- SYS_RENAME = 82
- SYS_MKDIR = 83
- SYS_RMDIR = 84
- SYS_CREAT = 85
- SYS_LINK = 86
- SYS_UNLINK = 87
- SYS_SYMLINK = 88
- SYS_READLINK = 89
- SYS_CHMOD = 90
- SYS_FCHMOD = 91
- SYS_CHOWN = 92
- SYS_FCHOWN = 93
- SYS_LCHOWN = 94
- SYS_UMASK = 95
- SYS_GETTIMEOFDAY = 96
- SYS_GETRLIMIT = 97
- SYS_GETRUSAGE = 98
- SYS_SYSINFO = 99
- SYS_TIMES = 100
- SYS_PTRACE = 101
- SYS_GETUID = 102
- SYS_SYSLOG = 103
- SYS_GETGID = 104
- SYS_SETUID = 105
- SYS_SETGID = 106
- SYS_GETEUID = 107
- SYS_GETEGID = 108
- SYS_SETPGID = 109
- SYS_GETPPID = 110
- SYS_GETPGRP = 111
- SYS_SETSID = 112
- SYS_SETREUID = 113
- SYS_SETREGID = 114
- SYS_GETGROUPS = 115
- SYS_SETGROUPS = 116
- SYS_SETRESUID = 117
- SYS_GETRESUID = 118
- SYS_SETRESGID = 119
- SYS_GETRESGID = 120
- SYS_GETPGID = 121
- SYS_SETFSUID = 122
- SYS_SETFSGID = 123
- SYS_GETSID = 124
- SYS_CAPGET = 125
- SYS_CAPSET = 126
- SYS_RT_SIGPENDING = 127
- SYS_RT_SIGTIMEDWAIT = 128
- SYS_RT_SIGQUEUEINFO = 129
- SYS_RT_SIGSUSPEND = 130
- SYS_SIGALTSTACK = 131
- SYS_UTIME = 132
- SYS_MKNOD = 133
- SYS_USELIB = 134
- SYS_PERSONALITY = 135
- SYS_USTAT = 136
- SYS_STATFS = 137
- SYS_FSTATFS = 138
- SYS_SYSFS = 139
- SYS_GETPRIORITY = 140
- SYS_SETPRIORITY = 141
- SYS_SCHED_SETPARAM = 142
- SYS_SCHED_GETPARAM = 143
- SYS_SCHED_SETSCHEDULER = 144
- SYS_SCHED_GETSCHEDULER = 145
- SYS_SCHED_GET_PRIORITY_MAX = 146
- SYS_SCHED_GET_PRIORITY_MIN = 147
- SYS_SCHED_RR_GET_INTERVAL = 148
- SYS_MLOCK = 149
- SYS_MUNLOCK = 150
- SYS_MLOCKALL = 151
- SYS_MUNLOCKALL = 152
- SYS_VHANGUP = 153
- SYS_MODIFY_LDT = 154
- SYS_PIVOT_ROOT = 155
- SYS__SYSCTL = 156
- SYS_PRCTL = 157
- SYS_ARCH_PRCTL = 158
- SYS_ADJTIMEX = 159
- SYS_SETRLIMIT = 160
- SYS_CHROOT = 161
- SYS_SYNC = 162
- SYS_ACCT = 163
- SYS_SETTIMEOFDAY = 164
- SYS_MOUNT = 165
- SYS_UMOUNT2 = 166
- SYS_SWAPON = 167
- SYS_SWAPOFF = 168
- SYS_REBOOT = 169
- SYS_SETHOSTNAME = 170
- SYS_SETDOMAINNAME = 171
- SYS_IOPL = 172
- SYS_IOPERM = 173
- SYS_CREATE_MODULE = 174
- SYS_INIT_MODULE = 175
- SYS_DELETE_MODULE = 176
- SYS_GET_KERNEL_SYMS = 177
- SYS_QUERY_MODULE = 178
- SYS_QUOTACTL = 179
- SYS_NFSSERVCTL = 180
- SYS_GETPMSG = 181
- SYS_PUTPMSG = 182
- SYS_AFS_SYSCALL = 183
- SYS_TUXCALL = 184
- SYS_SECURITY = 185
- SYS_GETTID = 186
- SYS_READAHEAD = 187
- SYS_SETXATTR = 188
- SYS_LSETXATTR = 189
- SYS_FSETXATTR = 190
- SYS_GETXATTR = 191
- SYS_LGETXATTR = 192
- SYS_FGETXATTR = 193
- SYS_LISTXATTR = 194
- SYS_LLISTXATTR = 195
- SYS_FLISTXATTR = 196
- SYS_REMOVEXATTR = 197
- SYS_LREMOVEXATTR = 198
- SYS_FREMOVEXATTR = 199
- SYS_TKILL = 200
- SYS_TIME = 201
- SYS_FUTEX = 202
- SYS_SCHED_SETAFFINITY = 203
- SYS_SCHED_GETAFFINITY = 204
- SYS_SET_THREAD_AREA = 205
- SYS_IO_SETUP = 206
- SYS_IO_DESTROY = 207
- SYS_IO_GETEVENTS = 208
- SYS_IO_SUBMIT = 209
- SYS_IO_CANCEL = 210
- SYS_GET_THREAD_AREA = 211
- SYS_LOOKUP_DCOOKIE = 212
- SYS_EPOLL_CREATE = 213
- SYS_EPOLL_CTL_OLD = 214
- SYS_EPOLL_WAIT_OLD = 215
- SYS_REMAP_FILE_PAGES = 216
- SYS_GETDENTS64 = 217
- SYS_SET_TID_ADDRESS = 218
- SYS_RESTART_SYSCALL = 219
- SYS_SEMTIMEDOP = 220
- SYS_FADVISE64 = 221
- SYS_TIMER_CREATE = 222
- SYS_TIMER_SETTIME = 223
- SYS_TIMER_GETTIME = 224
- SYS_TIMER_GETOVERRUN = 225
- SYS_TIMER_DELETE = 226
- SYS_CLOCK_SETTIME = 227
- SYS_CLOCK_GETTIME = 228
- SYS_CLOCK_GETRES = 229
- SYS_CLOCK_NANOSLEEP = 230
- SYS_EXIT_GROUP = 231
- SYS_EPOLL_WAIT = 232
- SYS_EPOLL_CTL = 233
- SYS_TGKILL = 234
- SYS_UTIMES = 235
- SYS_VSERVER = 236
- SYS_MBIND = 237
- SYS_SET_MEMPOLICY = 238
- SYS_GET_MEMPOLICY = 239
- SYS_MQ_OPEN = 240
- SYS_MQ_UNLINK = 241
- SYS_MQ_TIMEDSEND = 242
- SYS_MQ_TIMEDRECEIVE = 243
- SYS_MQ_NOTIFY = 244
- SYS_MQ_GETSETATTR = 245
- SYS_KEXEC_LOAD = 246
- SYS_WAITID = 247
- SYS_ADD_KEY = 248
- SYS_REQUEST_KEY = 249
- SYS_KEYCTL = 250
- SYS_IOPRIO_SET = 251
- SYS_IOPRIO_GET = 252
- SYS_INOTIFY_INIT = 253
- SYS_INOTIFY_ADD_WATCH = 254
- SYS_INOTIFY_RM_WATCH = 255
- SYS_MIGRATE_PAGES = 256
- SYS_OPENAT = 257
- SYS_MKDIRAT = 258
- SYS_MKNODAT = 259
- SYS_FCHOWNAT = 260
- SYS_FUTIMESAT = 261
- SYS_NEWFSTATAT = 262
- SYS_UNLINKAT = 263
- SYS_RENAMEAT = 264
- SYS_LINKAT = 265
- SYS_SYMLINKAT = 266
- SYS_READLINKAT = 267
- SYS_FCHMODAT = 268
- SYS_FACCESSAT = 269
- SYS_PSELECT6 = 270
- SYS_PPOLL = 271
- SYS_UNSHARE = 272
- SYS_SET_ROBUST_LIST = 273
- SYS_GET_ROBUST_LIST = 274
- SYS_SPLICE = 275
- SYS_TEE = 276
- SYS_SYNC_FILE_RANGE = 277
- SYS_VMSPLICE = 278
- SYS_MOVE_PAGES = 279
- SYS_UTIMENSAT = 280
- SYS_EPOLL_PWAIT = 281
- SYS_SIGNALFD = 282
- SYS_TIMERFD_CREATE = 283
- SYS_EVENTFD = 284
- SYS_FALLOCATE = 285
- SYS_TIMERFD_SETTIME = 286
- SYS_TIMERFD_GETTIME = 287
- SYS_ACCEPT4 = 288
- SYS_SIGNALFD4 = 289
- SYS_EVENTFD2 = 290
- SYS_EPOLL_CREATE1 = 291
- SYS_DUP3 = 292
- SYS_PIPE2 = 293
- SYS_INOTIFY_INIT1 = 294
- SYS_PREADV = 295
- SYS_PWRITEV = 296
- SYS_RT_TGSIGQUEUEINFO = 297
- SYS_PERF_EVENT_OPEN = 298
- SYS_RECVMMSG = 299
- SYS_FANOTIFY_INIT = 300
- SYS_FANOTIFY_MARK = 301
- SYS_PRLIMIT64 = 302
- SYS_NAME_TO_HANDLE_AT = 303
- SYS_OPEN_BY_HANDLE_AT = 304
- SYS_CLOCK_ADJTIME = 305
- SYS_SYNCFS = 306
- SYS_SENDMMSG = 307
- SYS_SETNS = 308
- SYS_GETCPU = 309
- SYS_PROCESS_VM_READV = 310
- SYS_PROCESS_VM_WRITEV = 311
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
deleted file mode 100644
index 45ced17fc..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// mksysnum_linux.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,linux
-
-package unix
-
-const (
- SYS_OABI_SYSCALL_BASE = 0
- SYS_SYSCALL_BASE = 0
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_SETPGID = 57
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_VHANGUP = 111
- SYS_SYSCALL = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_SETRESGID = 170
- SYS_GETRESGID = 171
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_CHOWN = 182
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_VFORK = 190
- SYS_UGETRLIMIT = 191
- SYS_MMAP2 = 192
- SYS_TRUNCATE64 = 193
- SYS_FTRUNCATE64 = 194
- SYS_STAT64 = 195
- SYS_LSTAT64 = 196
- SYS_FSTAT64 = 197
- SYS_LCHOWN32 = 198
- SYS_GETUID32 = 199
- SYS_GETGID32 = 200
- SYS_GETEUID32 = 201
- SYS_GETEGID32 = 202
- SYS_SETREUID32 = 203
- SYS_SETREGID32 = 204
- SYS_GETGROUPS32 = 205
- SYS_SETGROUPS32 = 206
- SYS_FCHOWN32 = 207
- SYS_SETRESUID32 = 208
- SYS_GETRESUID32 = 209
- SYS_SETRESGID32 = 210
- SYS_GETRESGID32 = 211
- SYS_CHOWN32 = 212
- SYS_SETUID32 = 213
- SYS_SETGID32 = 214
- SYS_SETFSUID32 = 215
- SYS_SETFSGID32 = 216
- SYS_GETDENTS64 = 217
- SYS_PIVOT_ROOT = 218
- SYS_MINCORE = 219
- SYS_MADVISE = 220
- SYS_FCNTL64 = 221
- SYS_GETTID = 224
- SYS_READAHEAD = 225
- SYS_SETXATTR = 226
- SYS_LSETXATTR = 227
- SYS_FSETXATTR = 228
- SYS_GETXATTR = 229
- SYS_LGETXATTR = 230
- SYS_FGETXATTR = 231
- SYS_LISTXATTR = 232
- SYS_LLISTXATTR = 233
- SYS_FLISTXATTR = 234
- SYS_REMOVEXATTR = 235
- SYS_LREMOVEXATTR = 236
- SYS_FREMOVEXATTR = 237
- SYS_TKILL = 238
- SYS_SENDFILE64 = 239
- SYS_FUTEX = 240
- SYS_SCHED_SETAFFINITY = 241
- SYS_SCHED_GETAFFINITY = 242
- SYS_IO_SETUP = 243
- SYS_IO_DESTROY = 244
- SYS_IO_GETEVENTS = 245
- SYS_IO_SUBMIT = 246
- SYS_IO_CANCEL = 247
- SYS_EXIT_GROUP = 248
- SYS_LOOKUP_DCOOKIE = 249
- SYS_EPOLL_CREATE = 250
- SYS_EPOLL_CTL = 251
- SYS_EPOLL_WAIT = 252
- SYS_REMAP_FILE_PAGES = 253
- SYS_SET_TID_ADDRESS = 256
- SYS_TIMER_CREATE = 257
- SYS_TIMER_SETTIME = 258
- SYS_TIMER_GETTIME = 259
- SYS_TIMER_GETOVERRUN = 260
- SYS_TIMER_DELETE = 261
- SYS_CLOCK_SETTIME = 262
- SYS_CLOCK_GETTIME = 263
- SYS_CLOCK_GETRES = 264
- SYS_CLOCK_NANOSLEEP = 265
- SYS_STATFS64 = 266
- SYS_FSTATFS64 = 267
- SYS_TGKILL = 268
- SYS_UTIMES = 269
- SYS_ARM_FADVISE64_64 = 270
- SYS_PCICONFIG_IOBASE = 271
- SYS_PCICONFIG_READ = 272
- SYS_PCICONFIG_WRITE = 273
- SYS_MQ_OPEN = 274
- SYS_MQ_UNLINK = 275
- SYS_MQ_TIMEDSEND = 276
- SYS_MQ_TIMEDRECEIVE = 277
- SYS_MQ_NOTIFY = 278
- SYS_MQ_GETSETATTR = 279
- SYS_WAITID = 280
- SYS_SOCKET = 281
- SYS_BIND = 282
- SYS_CONNECT = 283
- SYS_LISTEN = 284
- SYS_ACCEPT = 285
- SYS_GETSOCKNAME = 286
- SYS_GETPEERNAME = 287
- SYS_SOCKETPAIR = 288
- SYS_SEND = 289
- SYS_SENDTO = 290
- SYS_RECV = 291
- SYS_RECVFROM = 292
- SYS_SHUTDOWN = 293
- SYS_SETSOCKOPT = 294
- SYS_GETSOCKOPT = 295
- SYS_SENDMSG = 296
- SYS_RECVMSG = 297
- SYS_SEMOP = 298
- SYS_SEMGET = 299
- SYS_SEMCTL = 300
- SYS_MSGSND = 301
- SYS_MSGRCV = 302
- SYS_MSGGET = 303
- SYS_MSGCTL = 304
- SYS_SHMAT = 305
- SYS_SHMDT = 306
- SYS_SHMGET = 307
- SYS_SHMCTL = 308
- SYS_ADD_KEY = 309
- SYS_REQUEST_KEY = 310
- SYS_KEYCTL = 311
- SYS_SEMTIMEDOP = 312
- SYS_VSERVER = 313
- SYS_IOPRIO_SET = 314
- SYS_IOPRIO_GET = 315
- SYS_INOTIFY_INIT = 316
- SYS_INOTIFY_ADD_WATCH = 317
- SYS_INOTIFY_RM_WATCH = 318
- SYS_MBIND = 319
- SYS_GET_MEMPOLICY = 320
- SYS_SET_MEMPOLICY = 321
- SYS_OPENAT = 322
- SYS_MKDIRAT = 323
- SYS_MKNODAT = 324
- SYS_FCHOWNAT = 325
- SYS_FUTIMESAT = 326
- SYS_FSTATAT64 = 327
- SYS_UNLINKAT = 328
- SYS_RENAMEAT = 329
- SYS_LINKAT = 330
- SYS_SYMLINKAT = 331
- SYS_READLINKAT = 332
- SYS_FCHMODAT = 333
- SYS_FACCESSAT = 334
- SYS_PSELECT6 = 335
- SYS_PPOLL = 336
- SYS_UNSHARE = 337
- SYS_SET_ROBUST_LIST = 338
- SYS_GET_ROBUST_LIST = 339
- SYS_SPLICE = 340
- SYS_ARM_SYNC_FILE_RANGE = 341
- SYS_TEE = 342
- SYS_VMSPLICE = 343
- SYS_MOVE_PAGES = 344
- SYS_GETCPU = 345
- SYS_EPOLL_PWAIT = 346
- SYS_KEXEC_LOAD = 347
- SYS_UTIMENSAT = 348
- SYS_SIGNALFD = 349
- SYS_TIMERFD_CREATE = 350
- SYS_EVENTFD = 351
- SYS_FALLOCATE = 352
- SYS_TIMERFD_SETTIME = 353
- SYS_TIMERFD_GETTIME = 354
- SYS_SIGNALFD4 = 355
- SYS_EVENTFD2 = 356
- SYS_EPOLL_CREATE1 = 357
- SYS_DUP3 = 358
- SYS_PIPE2 = 359
- SYS_INOTIFY_INIT1 = 360
- SYS_PREADV = 361
- SYS_PWRITEV = 362
- SYS_RT_TGSIGQUEUEINFO = 363
- SYS_PERF_EVENT_OPEN = 364
- SYS_RECVMMSG = 365
- SYS_ACCEPT4 = 366
- SYS_FANOTIFY_INIT = 367
- SYS_FANOTIFY_MARK = 368
- SYS_PRLIMIT64 = 369
- SYS_NAME_TO_HANDLE_AT = 370
- SYS_OPEN_BY_HANDLE_AT = 371
- SYS_CLOCK_ADJTIME = 372
- SYS_SYNCFS = 373
- SYS_SENDMMSG = 374
- SYS_SETNS = 375
- SYS_PROCESS_VM_READV = 376
- SYS_PROCESS_VM_WRITEV = 377
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
deleted file mode 100644
index 2e9514f28..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ /dev/null
@@ -1,272 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm-generic/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm64,linux
-
-package unix
-
-const (
- SYS_IO_SETUP = 0
- SYS_IO_DESTROY = 1
- SYS_IO_SUBMIT = 2
- SYS_IO_CANCEL = 3
- SYS_IO_GETEVENTS = 4
- SYS_SETXATTR = 5
- SYS_LSETXATTR = 6
- SYS_FSETXATTR = 7
- SYS_GETXATTR = 8
- SYS_LGETXATTR = 9
- SYS_FGETXATTR = 10
- SYS_LISTXATTR = 11
- SYS_LLISTXATTR = 12
- SYS_FLISTXATTR = 13
- SYS_REMOVEXATTR = 14
- SYS_LREMOVEXATTR = 15
- SYS_FREMOVEXATTR = 16
- SYS_GETCWD = 17
- SYS_LOOKUP_DCOOKIE = 18
- SYS_EVENTFD2 = 19
- SYS_EPOLL_CREATE1 = 20
- SYS_EPOLL_CTL = 21
- SYS_EPOLL_PWAIT = 22
- SYS_DUP = 23
- SYS_DUP3 = 24
- SYS_FCNTL = 25
- SYS_INOTIFY_INIT1 = 26
- SYS_INOTIFY_ADD_WATCH = 27
- SYS_INOTIFY_RM_WATCH = 28
- SYS_IOCTL = 29
- SYS_IOPRIO_SET = 30
- SYS_IOPRIO_GET = 31
- SYS_FLOCK = 32
- SYS_MKNODAT = 33
- SYS_MKDIRAT = 34
- SYS_UNLINKAT = 35
- SYS_SYMLINKAT = 36
- SYS_LINKAT = 37
- SYS_RENAMEAT = 38
- SYS_UMOUNT2 = 39
- SYS_MOUNT = 40
- SYS_PIVOT_ROOT = 41
- SYS_NFSSERVCTL = 42
- SYS_STATFS = 43
- SYS_FSTATFS = 44
- SYS_TRUNCATE = 45
- SYS_FTRUNCATE = 46
- SYS_FALLOCATE = 47
- SYS_FACCESSAT = 48
- SYS_CHDIR = 49
- SYS_FCHDIR = 50
- SYS_CHROOT = 51
- SYS_FCHMOD = 52
- SYS_FCHMODAT = 53
- SYS_FCHOWNAT = 54
- SYS_FCHOWN = 55
- SYS_OPENAT = 56
- SYS_CLOSE = 57
- SYS_VHANGUP = 58
- SYS_PIPE2 = 59
- SYS_QUOTACTL = 60
- SYS_GETDENTS64 = 61
- SYS_LSEEK = 62
- SYS_READ = 63
- SYS_WRITE = 64
- SYS_READV = 65
- SYS_WRITEV = 66
- SYS_PREAD64 = 67
- SYS_PWRITE64 = 68
- SYS_PREADV = 69
- SYS_PWRITEV = 70
- SYS_SENDFILE = 71
- SYS_PSELECT6 = 72
- SYS_PPOLL = 73
- SYS_SIGNALFD4 = 74
- SYS_VMSPLICE = 75
- SYS_SPLICE = 76
- SYS_TEE = 77
- SYS_READLINKAT = 78
- SYS_FSTATAT = 79
- SYS_FSTAT = 80
- SYS_SYNC = 81
- SYS_FSYNC = 82
- SYS_FDATASYNC = 83
- SYS_SYNC_FILE_RANGE = 84
- SYS_TIMERFD_CREATE = 85
- SYS_TIMERFD_SETTIME = 86
- SYS_TIMERFD_GETTIME = 87
- SYS_UTIMENSAT = 88
- SYS_ACCT = 89
- SYS_CAPGET = 90
- SYS_CAPSET = 91
- SYS_PERSONALITY = 92
- SYS_EXIT = 93
- SYS_EXIT_GROUP = 94
- SYS_WAITID = 95
- SYS_SET_TID_ADDRESS = 96
- SYS_UNSHARE = 97
- SYS_FUTEX = 98
- SYS_SET_ROBUST_LIST = 99
- SYS_GET_ROBUST_LIST = 100
- SYS_NANOSLEEP = 101
- SYS_GETITIMER = 102
- SYS_SETITIMER = 103
- SYS_KEXEC_LOAD = 104
- SYS_INIT_MODULE = 105
- SYS_DELETE_MODULE = 106
- SYS_TIMER_CREATE = 107
- SYS_TIMER_GETTIME = 108
- SYS_TIMER_GETOVERRUN = 109
- SYS_TIMER_SETTIME = 110
- SYS_TIMER_DELETE = 111
- SYS_CLOCK_SETTIME = 112
- SYS_CLOCK_GETTIME = 113
- SYS_CLOCK_GETRES = 114
- SYS_CLOCK_NANOSLEEP = 115
- SYS_SYSLOG = 116
- SYS_PTRACE = 117
- SYS_SCHED_SETPARAM = 118
- SYS_SCHED_SETSCHEDULER = 119
- SYS_SCHED_GETSCHEDULER = 120
- SYS_SCHED_GETPARAM = 121
- SYS_SCHED_SETAFFINITY = 122
- SYS_SCHED_GETAFFINITY = 123
- SYS_SCHED_YIELD = 124
- SYS_SCHED_GET_PRIORITY_MAX = 125
- SYS_SCHED_GET_PRIORITY_MIN = 126
- SYS_SCHED_RR_GET_INTERVAL = 127
- SYS_RESTART_SYSCALL = 128
- SYS_KILL = 129
- SYS_TKILL = 130
- SYS_TGKILL = 131
- SYS_SIGALTSTACK = 132
- SYS_RT_SIGSUSPEND = 133
- SYS_RT_SIGACTION = 134
- SYS_RT_SIGPROCMASK = 135
- SYS_RT_SIGPENDING = 136
- SYS_RT_SIGTIMEDWAIT = 137
- SYS_RT_SIGQUEUEINFO = 138
- SYS_RT_SIGRETURN = 139
- SYS_SETPRIORITY = 140
- SYS_GETPRIORITY = 141
- SYS_REBOOT = 142
- SYS_SETREGID = 143
- SYS_SETGID = 144
- SYS_SETREUID = 145
- SYS_SETUID = 146
- SYS_SETRESUID = 147
- SYS_GETRESUID = 148
- SYS_SETRESGID = 149
- SYS_GETRESGID = 150
- SYS_SETFSUID = 151
- SYS_SETFSGID = 152
- SYS_TIMES = 153
- SYS_SETPGID = 154
- SYS_GETPGID = 155
- SYS_GETSID = 156
- SYS_SETSID = 157
- SYS_GETGROUPS = 158
- SYS_SETGROUPS = 159
- SYS_UNAME = 160
- SYS_SETHOSTNAME = 161
- SYS_SETDOMAINNAME = 162
- SYS_GETRLIMIT = 163
- SYS_SETRLIMIT = 164
- SYS_GETRUSAGE = 165
- SYS_UMASK = 166
- SYS_PRCTL = 167
- SYS_GETCPU = 168
- SYS_GETTIMEOFDAY = 169
- SYS_SETTIMEOFDAY = 170
- SYS_ADJTIMEX = 171
- SYS_GETPID = 172
- SYS_GETPPID = 173
- SYS_GETUID = 174
- SYS_GETEUID = 175
- SYS_GETGID = 176
- SYS_GETEGID = 177
- SYS_GETTID = 178
- SYS_SYSINFO = 179
- SYS_MQ_OPEN = 180
- SYS_MQ_UNLINK = 181
- SYS_MQ_TIMEDSEND = 182
- SYS_MQ_TIMEDRECEIVE = 183
- SYS_MQ_NOTIFY = 184
- SYS_MQ_GETSETATTR = 185
- SYS_MSGGET = 186
- SYS_MSGCTL = 187
- SYS_MSGRCV = 188
- SYS_MSGSND = 189
- SYS_SEMGET = 190
- SYS_SEMCTL = 191
- SYS_SEMTIMEDOP = 192
- SYS_SEMOP = 193
- SYS_SHMGET = 194
- SYS_SHMCTL = 195
- SYS_SHMAT = 196
- SYS_SHMDT = 197
- SYS_SOCKET = 198
- SYS_SOCKETPAIR = 199
- SYS_BIND = 200
- SYS_LISTEN = 201
- SYS_ACCEPT = 202
- SYS_CONNECT = 203
- SYS_GETSOCKNAME = 204
- SYS_GETPEERNAME = 205
- SYS_SENDTO = 206
- SYS_RECVFROM = 207
- SYS_SETSOCKOPT = 208
- SYS_GETSOCKOPT = 209
- SYS_SHUTDOWN = 210
- SYS_SENDMSG = 211
- SYS_RECVMSG = 212
- SYS_READAHEAD = 213
- SYS_BRK = 214
- SYS_MUNMAP = 215
- SYS_MREMAP = 216
- SYS_ADD_KEY = 217
- SYS_REQUEST_KEY = 218
- SYS_KEYCTL = 219
- SYS_CLONE = 220
- SYS_EXECVE = 221
- SYS_MMAP = 222
- SYS_FADVISE64 = 223
- SYS_SWAPON = 224
- SYS_SWAPOFF = 225
- SYS_MPROTECT = 226
- SYS_MSYNC = 227
- SYS_MLOCK = 228
- SYS_MUNLOCK = 229
- SYS_MLOCKALL = 230
- SYS_MUNLOCKALL = 231
- SYS_MINCORE = 232
- SYS_MADVISE = 233
- SYS_REMAP_FILE_PAGES = 234
- SYS_MBIND = 235
- SYS_GET_MEMPOLICY = 236
- SYS_SET_MEMPOLICY = 237
- SYS_MIGRATE_PAGES = 238
- SYS_MOVE_PAGES = 239
- SYS_RT_TGSIGQUEUEINFO = 240
- SYS_PERF_EVENT_OPEN = 241
- SYS_ACCEPT4 = 242
- SYS_RECVMMSG = 243
- SYS_ARCH_SPECIFIC_SYSCALL = 244
- SYS_WAIT4 = 260
- SYS_PRLIMIT64 = 261
- SYS_FANOTIFY_INIT = 262
- SYS_FANOTIFY_MARK = 263
- SYS_NAME_TO_HANDLE_AT = 264
- SYS_OPEN_BY_HANDLE_AT = 265
- SYS_CLOCK_ADJTIME = 266
- SYS_SYNCFS = 267
- SYS_SETNS = 268
- SYS_SENDMMSG = 269
- SYS_PROCESS_VM_READV = 270
- SYS_PROCESS_VM_WRITEV = 271
- SYS_KCMP = 272
- SYS_FINIT_MODULE = 273
- SYS_SCHED_SETATTR = 274
- SYS_SCHED_GETATTR = 275
- SYS_RENAMEAT2 = 276
- SYS_SECCOMP = 277
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
deleted file mode 100644
index 5ffe1c719..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ /dev/null
@@ -1,327 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build mips64,linux
-
-package unix
-
-const (
- SYS_READ = 5000
- SYS_WRITE = 5001
- SYS_OPEN = 5002
- SYS_CLOSE = 5003
- SYS_STAT = 5004
- SYS_FSTAT = 5005
- SYS_LSTAT = 5006
- SYS_POLL = 5007
- SYS_LSEEK = 5008
- SYS_MMAP = 5009
- SYS_MPROTECT = 5010
- SYS_MUNMAP = 5011
- SYS_BRK = 5012
- SYS_RT_SIGACTION = 5013
- SYS_RT_SIGPROCMASK = 5014
- SYS_IOCTL = 5015
- SYS_PREAD64 = 5016
- SYS_PWRITE64 = 5017
- SYS_READV = 5018
- SYS_WRITEV = 5019
- SYS_ACCESS = 5020
- SYS_PIPE = 5021
- SYS__NEWSELECT = 5022
- SYS_SCHED_YIELD = 5023
- SYS_MREMAP = 5024
- SYS_MSYNC = 5025
- SYS_MINCORE = 5026
- SYS_MADVISE = 5027
- SYS_SHMGET = 5028
- SYS_SHMAT = 5029
- SYS_SHMCTL = 5030
- SYS_DUP = 5031
- SYS_DUP2 = 5032
- SYS_PAUSE = 5033
- SYS_NANOSLEEP = 5034
- SYS_GETITIMER = 5035
- SYS_SETITIMER = 5036
- SYS_ALARM = 5037
- SYS_GETPID = 5038
- SYS_SENDFILE = 5039
- SYS_SOCKET = 5040
- SYS_CONNECT = 5041
- SYS_ACCEPT = 5042
- SYS_SENDTO = 5043
- SYS_RECVFROM = 5044
- SYS_SENDMSG = 5045
- SYS_RECVMSG = 5046
- SYS_SHUTDOWN = 5047
- SYS_BIND = 5048
- SYS_LISTEN = 5049
- SYS_GETSOCKNAME = 5050
- SYS_GETPEERNAME = 5051
- SYS_SOCKETPAIR = 5052
- SYS_SETSOCKOPT = 5053
- SYS_GETSOCKOPT = 5054
- SYS_CLONE = 5055
- SYS_FORK = 5056
- SYS_EXECVE = 5057
- SYS_EXIT = 5058
- SYS_WAIT4 = 5059
- SYS_KILL = 5060
- SYS_UNAME = 5061
- SYS_SEMGET = 5062
- SYS_SEMOP = 5063
- SYS_SEMCTL = 5064
- SYS_SHMDT = 5065
- SYS_MSGGET = 5066
- SYS_MSGSND = 5067
- SYS_MSGRCV = 5068
- SYS_MSGCTL = 5069
- SYS_FCNTL = 5070
- SYS_FLOCK = 5071
- SYS_FSYNC = 5072
- SYS_FDATASYNC = 5073
- SYS_TRUNCATE = 5074
- SYS_FTRUNCATE = 5075
- SYS_GETDENTS = 5076
- SYS_GETCWD = 5077
- SYS_CHDIR = 5078
- SYS_FCHDIR = 5079
- SYS_RENAME = 5080
- SYS_MKDIR = 5081
- SYS_RMDIR = 5082
- SYS_CREAT = 5083
- SYS_LINK = 5084
- SYS_UNLINK = 5085
- SYS_SYMLINK = 5086
- SYS_READLINK = 5087
- SYS_CHMOD = 5088
- SYS_FCHMOD = 5089
- SYS_CHOWN = 5090
- SYS_FCHOWN = 5091
- SYS_LCHOWN = 5092
- SYS_UMASK = 5093
- SYS_GETTIMEOFDAY = 5094
- SYS_GETRLIMIT = 5095
- SYS_GETRUSAGE = 5096
- SYS_SYSINFO = 5097
- SYS_TIMES = 5098
- SYS_PTRACE = 5099
- SYS_GETUID = 5100
- SYS_SYSLOG = 5101
- SYS_GETGID = 5102
- SYS_SETUID = 5103
- SYS_SETGID = 5104
- SYS_GETEUID = 5105
- SYS_GETEGID = 5106
- SYS_SETPGID = 5107
- SYS_GETPPID = 5108
- SYS_GETPGRP = 5109
- SYS_SETSID = 5110
- SYS_SETREUID = 5111
- SYS_SETREGID = 5112
- SYS_GETGROUPS = 5113
- SYS_SETGROUPS = 5114
- SYS_SETRESUID = 5115
- SYS_GETRESUID = 5116
- SYS_SETRESGID = 5117
- SYS_GETRESGID = 5118
- SYS_GETPGID = 5119
- SYS_SETFSUID = 5120
- SYS_SETFSGID = 5121
- SYS_GETSID = 5122
- SYS_CAPGET = 5123
- SYS_CAPSET = 5124
- SYS_RT_SIGPENDING = 5125
- SYS_RT_SIGTIMEDWAIT = 5126
- SYS_RT_SIGQUEUEINFO = 5127
- SYS_RT_SIGSUSPEND = 5128
- SYS_SIGALTSTACK = 5129
- SYS_UTIME = 5130
- SYS_MKNOD = 5131
- SYS_PERSONALITY = 5132
- SYS_USTAT = 5133
- SYS_STATFS = 5134
- SYS_FSTATFS = 5135
- SYS_SYSFS = 5136
- SYS_GETPRIORITY = 5137
- SYS_SETPRIORITY = 5138
- SYS_SCHED_SETPARAM = 5139
- SYS_SCHED_GETPARAM = 5140
- SYS_SCHED_SETSCHEDULER = 5141
- SYS_SCHED_GETSCHEDULER = 5142
- SYS_SCHED_GET_PRIORITY_MAX = 5143
- SYS_SCHED_GET_PRIORITY_MIN = 5144
- SYS_SCHED_RR_GET_INTERVAL = 5145
- SYS_MLOCK = 5146
- SYS_MUNLOCK = 5147
- SYS_MLOCKALL = 5148
- SYS_MUNLOCKALL = 5149
- SYS_VHANGUP = 5150
- SYS_PIVOT_ROOT = 5151
- SYS__SYSCTL = 5152
- SYS_PRCTL = 5153
- SYS_ADJTIMEX = 5154
- SYS_SETRLIMIT = 5155
- SYS_CHROOT = 5156
- SYS_SYNC = 5157
- SYS_ACCT = 5158
- SYS_SETTIMEOFDAY = 5159
- SYS_MOUNT = 5160
- SYS_UMOUNT2 = 5161
- SYS_SWAPON = 5162
- SYS_SWAPOFF = 5163
- SYS_REBOOT = 5164
- SYS_SETHOSTNAME = 5165
- SYS_SETDOMAINNAME = 5166
- SYS_CREATE_MODULE = 5167
- SYS_INIT_MODULE = 5168
- SYS_DELETE_MODULE = 5169
- SYS_GET_KERNEL_SYMS = 5170
- SYS_QUERY_MODULE = 5171
- SYS_QUOTACTL = 5172
- SYS_NFSSERVCTL = 5173
- SYS_GETPMSG = 5174
- SYS_PUTPMSG = 5175
- SYS_AFS_SYSCALL = 5176
- SYS_RESERVED177 = 5177
- SYS_GETTID = 5178
- SYS_READAHEAD = 5179
- SYS_SETXATTR = 5180
- SYS_LSETXATTR = 5181
- SYS_FSETXATTR = 5182
- SYS_GETXATTR = 5183
- SYS_LGETXATTR = 5184
- SYS_FGETXATTR = 5185
- SYS_LISTXATTR = 5186
- SYS_LLISTXATTR = 5187
- SYS_FLISTXATTR = 5188
- SYS_REMOVEXATTR = 5189
- SYS_LREMOVEXATTR = 5190
- SYS_FREMOVEXATTR = 5191
- SYS_TKILL = 5192
- SYS_RESERVED193 = 5193
- SYS_FUTEX = 5194
- SYS_SCHED_SETAFFINITY = 5195
- SYS_SCHED_GETAFFINITY = 5196
- SYS_CACHEFLUSH = 5197
- SYS_CACHECTL = 5198
- SYS_SYSMIPS = 5199
- SYS_IO_SETUP = 5200
- SYS_IO_DESTROY = 5201
- SYS_IO_GETEVENTS = 5202
- SYS_IO_SUBMIT = 5203
- SYS_IO_CANCEL = 5204
- SYS_EXIT_GROUP = 5205
- SYS_LOOKUP_DCOOKIE = 5206
- SYS_EPOLL_CREATE = 5207
- SYS_EPOLL_CTL = 5208
- SYS_EPOLL_WAIT = 5209
- SYS_REMAP_FILE_PAGES = 5210
- SYS_RT_SIGRETURN = 5211
- SYS_SET_TID_ADDRESS = 5212
- SYS_RESTART_SYSCALL = 5213
- SYS_SEMTIMEDOP = 5214
- SYS_FADVISE64 = 5215
- SYS_TIMER_CREATE = 5216
- SYS_TIMER_SETTIME = 5217
- SYS_TIMER_GETTIME = 5218
- SYS_TIMER_GETOVERRUN = 5219
- SYS_TIMER_DELETE = 5220
- SYS_CLOCK_SETTIME = 5221
- SYS_CLOCK_GETTIME = 5222
- SYS_CLOCK_GETRES = 5223
- SYS_CLOCK_NANOSLEEP = 5224
- SYS_TGKILL = 5225
- SYS_UTIMES = 5226
- SYS_MBIND = 5227
- SYS_GET_MEMPOLICY = 5228
- SYS_SET_MEMPOLICY = 5229
- SYS_MQ_OPEN = 5230
- SYS_MQ_UNLINK = 5231
- SYS_MQ_TIMEDSEND = 5232
- SYS_MQ_TIMEDRECEIVE = 5233
- SYS_MQ_NOTIFY = 5234
- SYS_MQ_GETSETATTR = 5235
- SYS_VSERVER = 5236
- SYS_WAITID = 5237
- SYS_ADD_KEY = 5239
- SYS_REQUEST_KEY = 5240
- SYS_KEYCTL = 5241
- SYS_SET_THREAD_AREA = 5242
- SYS_INOTIFY_INIT = 5243
- SYS_INOTIFY_ADD_WATCH = 5244
- SYS_INOTIFY_RM_WATCH = 5245
- SYS_MIGRATE_PAGES = 5246
- SYS_OPENAT = 5247
- SYS_MKDIRAT = 5248
- SYS_MKNODAT = 5249
- SYS_FCHOWNAT = 5250
- SYS_FUTIMESAT = 5251
- SYS_NEWFSTATAT = 5252
- SYS_UNLINKAT = 5253
- SYS_RENAMEAT = 5254
- SYS_LINKAT = 5255
- SYS_SYMLINKAT = 5256
- SYS_READLINKAT = 5257
- SYS_FCHMODAT = 5258
- SYS_FACCESSAT = 5259
- SYS_PSELECT6 = 5260
- SYS_PPOLL = 5261
- SYS_UNSHARE = 5262
- SYS_SPLICE = 5263
- SYS_SYNC_FILE_RANGE = 5264
- SYS_TEE = 5265
- SYS_VMSPLICE = 5266
- SYS_MOVE_PAGES = 5267
- SYS_SET_ROBUST_LIST = 5268
- SYS_GET_ROBUST_LIST = 5269
- SYS_KEXEC_LOAD = 5270
- SYS_GETCPU = 5271
- SYS_EPOLL_PWAIT = 5272
- SYS_IOPRIO_SET = 5273
- SYS_IOPRIO_GET = 5274
- SYS_UTIMENSAT = 5275
- SYS_SIGNALFD = 5276
- SYS_TIMERFD = 5277
- SYS_EVENTFD = 5278
- SYS_FALLOCATE = 5279
- SYS_TIMERFD_CREATE = 5280
- SYS_TIMERFD_GETTIME = 5281
- SYS_TIMERFD_SETTIME = 5282
- SYS_SIGNALFD4 = 5283
- SYS_EVENTFD2 = 5284
- SYS_EPOLL_CREATE1 = 5285
- SYS_DUP3 = 5286
- SYS_PIPE2 = 5287
- SYS_INOTIFY_INIT1 = 5288
- SYS_PREADV = 5289
- SYS_PWRITEV = 5290
- SYS_RT_TGSIGQUEUEINFO = 5291
- SYS_PERF_EVENT_OPEN = 5292
- SYS_ACCEPT4 = 5293
- SYS_RECVMMSG = 5294
- SYS_FANOTIFY_INIT = 5295
- SYS_FANOTIFY_MARK = 5296
- SYS_PRLIMIT64 = 5297
- SYS_NAME_TO_HANDLE_AT = 5298
- SYS_OPEN_BY_HANDLE_AT = 5299
- SYS_CLOCK_ADJTIME = 5300
- SYS_SYNCFS = 5301
- SYS_SENDMMSG = 5302
- SYS_SETNS = 5303
- SYS_PROCESS_VM_READV = 5304
- SYS_PROCESS_VM_WRITEV = 5305
- SYS_KCMP = 5306
- SYS_FINIT_MODULE = 5307
- SYS_GETDENTS64 = 5308
- SYS_SCHED_SETATTR = 5309
- SYS_SCHED_GETATTR = 5310
- SYS_RENAMEAT2 = 5311
- SYS_SECCOMP = 5312
- SYS_GETRANDOM = 5313
- SYS_MEMFD_CREATE = 5314
- SYS_BPF = 5315
- SYS_EXECVEAT = 5316
- SYS_USERFAULTFD = 5317
- SYS_MEMBARRIER = 5318
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
deleted file mode 100644
index d192b940c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ /dev/null
@@ -1,327 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build mips64le,linux
-
-package unix
-
-const (
- SYS_READ = 5000
- SYS_WRITE = 5001
- SYS_OPEN = 5002
- SYS_CLOSE = 5003
- SYS_STAT = 5004
- SYS_FSTAT = 5005
- SYS_LSTAT = 5006
- SYS_POLL = 5007
- SYS_LSEEK = 5008
- SYS_MMAP = 5009
- SYS_MPROTECT = 5010
- SYS_MUNMAP = 5011
- SYS_BRK = 5012
- SYS_RT_SIGACTION = 5013
- SYS_RT_SIGPROCMASK = 5014
- SYS_IOCTL = 5015
- SYS_PREAD64 = 5016
- SYS_PWRITE64 = 5017
- SYS_READV = 5018
- SYS_WRITEV = 5019
- SYS_ACCESS = 5020
- SYS_PIPE = 5021
- SYS__NEWSELECT = 5022
- SYS_SCHED_YIELD = 5023
- SYS_MREMAP = 5024
- SYS_MSYNC = 5025
- SYS_MINCORE = 5026
- SYS_MADVISE = 5027
- SYS_SHMGET = 5028
- SYS_SHMAT = 5029
- SYS_SHMCTL = 5030
- SYS_DUP = 5031
- SYS_DUP2 = 5032
- SYS_PAUSE = 5033
- SYS_NANOSLEEP = 5034
- SYS_GETITIMER = 5035
- SYS_SETITIMER = 5036
- SYS_ALARM = 5037
- SYS_GETPID = 5038
- SYS_SENDFILE = 5039
- SYS_SOCKET = 5040
- SYS_CONNECT = 5041
- SYS_ACCEPT = 5042
- SYS_SENDTO = 5043
- SYS_RECVFROM = 5044
- SYS_SENDMSG = 5045
- SYS_RECVMSG = 5046
- SYS_SHUTDOWN = 5047
- SYS_BIND = 5048
- SYS_LISTEN = 5049
- SYS_GETSOCKNAME = 5050
- SYS_GETPEERNAME = 5051
- SYS_SOCKETPAIR = 5052
- SYS_SETSOCKOPT = 5053
- SYS_GETSOCKOPT = 5054
- SYS_CLONE = 5055
- SYS_FORK = 5056
- SYS_EXECVE = 5057
- SYS_EXIT = 5058
- SYS_WAIT4 = 5059
- SYS_KILL = 5060
- SYS_UNAME = 5061
- SYS_SEMGET = 5062
- SYS_SEMOP = 5063
- SYS_SEMCTL = 5064
- SYS_SHMDT = 5065
- SYS_MSGGET = 5066
- SYS_MSGSND = 5067
- SYS_MSGRCV = 5068
- SYS_MSGCTL = 5069
- SYS_FCNTL = 5070
- SYS_FLOCK = 5071
- SYS_FSYNC = 5072
- SYS_FDATASYNC = 5073
- SYS_TRUNCATE = 5074
- SYS_FTRUNCATE = 5075
- SYS_GETDENTS = 5076
- SYS_GETCWD = 5077
- SYS_CHDIR = 5078
- SYS_FCHDIR = 5079
- SYS_RENAME = 5080
- SYS_MKDIR = 5081
- SYS_RMDIR = 5082
- SYS_CREAT = 5083
- SYS_LINK = 5084
- SYS_UNLINK = 5085
- SYS_SYMLINK = 5086
- SYS_READLINK = 5087
- SYS_CHMOD = 5088
- SYS_FCHMOD = 5089
- SYS_CHOWN = 5090
- SYS_FCHOWN = 5091
- SYS_LCHOWN = 5092
- SYS_UMASK = 5093
- SYS_GETTIMEOFDAY = 5094
- SYS_GETRLIMIT = 5095
- SYS_GETRUSAGE = 5096
- SYS_SYSINFO = 5097
- SYS_TIMES = 5098
- SYS_PTRACE = 5099
- SYS_GETUID = 5100
- SYS_SYSLOG = 5101
- SYS_GETGID = 5102
- SYS_SETUID = 5103
- SYS_SETGID = 5104
- SYS_GETEUID = 5105
- SYS_GETEGID = 5106
- SYS_SETPGID = 5107
- SYS_GETPPID = 5108
- SYS_GETPGRP = 5109
- SYS_SETSID = 5110
- SYS_SETREUID = 5111
- SYS_SETREGID = 5112
- SYS_GETGROUPS = 5113
- SYS_SETGROUPS = 5114
- SYS_SETRESUID = 5115
- SYS_GETRESUID = 5116
- SYS_SETRESGID = 5117
- SYS_GETRESGID = 5118
- SYS_GETPGID = 5119
- SYS_SETFSUID = 5120
- SYS_SETFSGID = 5121
- SYS_GETSID = 5122
- SYS_CAPGET = 5123
- SYS_CAPSET = 5124
- SYS_RT_SIGPENDING = 5125
- SYS_RT_SIGTIMEDWAIT = 5126
- SYS_RT_SIGQUEUEINFO = 5127
- SYS_RT_SIGSUSPEND = 5128
- SYS_SIGALTSTACK = 5129
- SYS_UTIME = 5130
- SYS_MKNOD = 5131
- SYS_PERSONALITY = 5132
- SYS_USTAT = 5133
- SYS_STATFS = 5134
- SYS_FSTATFS = 5135
- SYS_SYSFS = 5136
- SYS_GETPRIORITY = 5137
- SYS_SETPRIORITY = 5138
- SYS_SCHED_SETPARAM = 5139
- SYS_SCHED_GETPARAM = 5140
- SYS_SCHED_SETSCHEDULER = 5141
- SYS_SCHED_GETSCHEDULER = 5142
- SYS_SCHED_GET_PRIORITY_MAX = 5143
- SYS_SCHED_GET_PRIORITY_MIN = 5144
- SYS_SCHED_RR_GET_INTERVAL = 5145
- SYS_MLOCK = 5146
- SYS_MUNLOCK = 5147
- SYS_MLOCKALL = 5148
- SYS_MUNLOCKALL = 5149
- SYS_VHANGUP = 5150
- SYS_PIVOT_ROOT = 5151
- SYS__SYSCTL = 5152
- SYS_PRCTL = 5153
- SYS_ADJTIMEX = 5154
- SYS_SETRLIMIT = 5155
- SYS_CHROOT = 5156
- SYS_SYNC = 5157
- SYS_ACCT = 5158
- SYS_SETTIMEOFDAY = 5159
- SYS_MOUNT = 5160
- SYS_UMOUNT2 = 5161
- SYS_SWAPON = 5162
- SYS_SWAPOFF = 5163
- SYS_REBOOT = 5164
- SYS_SETHOSTNAME = 5165
- SYS_SETDOMAINNAME = 5166
- SYS_CREATE_MODULE = 5167
- SYS_INIT_MODULE = 5168
- SYS_DELETE_MODULE = 5169
- SYS_GET_KERNEL_SYMS = 5170
- SYS_QUERY_MODULE = 5171
- SYS_QUOTACTL = 5172
- SYS_NFSSERVCTL = 5173
- SYS_GETPMSG = 5174
- SYS_PUTPMSG = 5175
- SYS_AFS_SYSCALL = 5176
- SYS_RESERVED177 = 5177
- SYS_GETTID = 5178
- SYS_READAHEAD = 5179
- SYS_SETXATTR = 5180
- SYS_LSETXATTR = 5181
- SYS_FSETXATTR = 5182
- SYS_GETXATTR = 5183
- SYS_LGETXATTR = 5184
- SYS_FGETXATTR = 5185
- SYS_LISTXATTR = 5186
- SYS_LLISTXATTR = 5187
- SYS_FLISTXATTR = 5188
- SYS_REMOVEXATTR = 5189
- SYS_LREMOVEXATTR = 5190
- SYS_FREMOVEXATTR = 5191
- SYS_TKILL = 5192
- SYS_RESERVED193 = 5193
- SYS_FUTEX = 5194
- SYS_SCHED_SETAFFINITY = 5195
- SYS_SCHED_GETAFFINITY = 5196
- SYS_CACHEFLUSH = 5197
- SYS_CACHECTL = 5198
- SYS_SYSMIPS = 5199
- SYS_IO_SETUP = 5200
- SYS_IO_DESTROY = 5201
- SYS_IO_GETEVENTS = 5202
- SYS_IO_SUBMIT = 5203
- SYS_IO_CANCEL = 5204
- SYS_EXIT_GROUP = 5205
- SYS_LOOKUP_DCOOKIE = 5206
- SYS_EPOLL_CREATE = 5207
- SYS_EPOLL_CTL = 5208
- SYS_EPOLL_WAIT = 5209
- SYS_REMAP_FILE_PAGES = 5210
- SYS_RT_SIGRETURN = 5211
- SYS_SET_TID_ADDRESS = 5212
- SYS_RESTART_SYSCALL = 5213
- SYS_SEMTIMEDOP = 5214
- SYS_FADVISE64 = 5215
- SYS_TIMER_CREATE = 5216
- SYS_TIMER_SETTIME = 5217
- SYS_TIMER_GETTIME = 5218
- SYS_TIMER_GETOVERRUN = 5219
- SYS_TIMER_DELETE = 5220
- SYS_CLOCK_SETTIME = 5221
- SYS_CLOCK_GETTIME = 5222
- SYS_CLOCK_GETRES = 5223
- SYS_CLOCK_NANOSLEEP = 5224
- SYS_TGKILL = 5225
- SYS_UTIMES = 5226
- SYS_MBIND = 5227
- SYS_GET_MEMPOLICY = 5228
- SYS_SET_MEMPOLICY = 5229
- SYS_MQ_OPEN = 5230
- SYS_MQ_UNLINK = 5231
- SYS_MQ_TIMEDSEND = 5232
- SYS_MQ_TIMEDRECEIVE = 5233
- SYS_MQ_NOTIFY = 5234
- SYS_MQ_GETSETATTR = 5235
- SYS_VSERVER = 5236
- SYS_WAITID = 5237
- SYS_ADD_KEY = 5239
- SYS_REQUEST_KEY = 5240
- SYS_KEYCTL = 5241
- SYS_SET_THREAD_AREA = 5242
- SYS_INOTIFY_INIT = 5243
- SYS_INOTIFY_ADD_WATCH = 5244
- SYS_INOTIFY_RM_WATCH = 5245
- SYS_MIGRATE_PAGES = 5246
- SYS_OPENAT = 5247
- SYS_MKDIRAT = 5248
- SYS_MKNODAT = 5249
- SYS_FCHOWNAT = 5250
- SYS_FUTIMESAT = 5251
- SYS_NEWFSTATAT = 5252
- SYS_UNLINKAT = 5253
- SYS_RENAMEAT = 5254
- SYS_LINKAT = 5255
- SYS_SYMLINKAT = 5256
- SYS_READLINKAT = 5257
- SYS_FCHMODAT = 5258
- SYS_FACCESSAT = 5259
- SYS_PSELECT6 = 5260
- SYS_PPOLL = 5261
- SYS_UNSHARE = 5262
- SYS_SPLICE = 5263
- SYS_SYNC_FILE_RANGE = 5264
- SYS_TEE = 5265
- SYS_VMSPLICE = 5266
- SYS_MOVE_PAGES = 5267
- SYS_SET_ROBUST_LIST = 5268
- SYS_GET_ROBUST_LIST = 5269
- SYS_KEXEC_LOAD = 5270
- SYS_GETCPU = 5271
- SYS_EPOLL_PWAIT = 5272
- SYS_IOPRIO_SET = 5273
- SYS_IOPRIO_GET = 5274
- SYS_UTIMENSAT = 5275
- SYS_SIGNALFD = 5276
- SYS_TIMERFD = 5277
- SYS_EVENTFD = 5278
- SYS_FALLOCATE = 5279
- SYS_TIMERFD_CREATE = 5280
- SYS_TIMERFD_GETTIME = 5281
- SYS_TIMERFD_SETTIME = 5282
- SYS_SIGNALFD4 = 5283
- SYS_EVENTFD2 = 5284
- SYS_EPOLL_CREATE1 = 5285
- SYS_DUP3 = 5286
- SYS_PIPE2 = 5287
- SYS_INOTIFY_INIT1 = 5288
- SYS_PREADV = 5289
- SYS_PWRITEV = 5290
- SYS_RT_TGSIGQUEUEINFO = 5291
- SYS_PERF_EVENT_OPEN = 5292
- SYS_ACCEPT4 = 5293
- SYS_RECVMMSG = 5294
- SYS_FANOTIFY_INIT = 5295
- SYS_FANOTIFY_MARK = 5296
- SYS_PRLIMIT64 = 5297
- SYS_NAME_TO_HANDLE_AT = 5298
- SYS_OPEN_BY_HANDLE_AT = 5299
- SYS_CLOCK_ADJTIME = 5300
- SYS_SYNCFS = 5301
- SYS_SENDMMSG = 5302
- SYS_SETNS = 5303
- SYS_PROCESS_VM_READV = 5304
- SYS_PROCESS_VM_WRITEV = 5305
- SYS_KCMP = 5306
- SYS_FINIT_MODULE = 5307
- SYS_GETDENTS64 = 5308
- SYS_SCHED_SETATTR = 5309
- SYS_SCHED_GETATTR = 5310
- SYS_RENAMEAT2 = 5311
- SYS_SECCOMP = 5312
- SYS_GETRANDOM = 5313
- SYS_MEMFD_CREATE = 5314
- SYS_BPF = 5315
- SYS_EXECVEAT = 5316
- SYS_USERFAULTFD = 5317
- SYS_MEMBARRIER = 5318
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
deleted file mode 100644
index e1b08f00d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ /dev/null
@@ -1,360 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build ppc64,linux
-
-package unix
-
-const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86 = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_QUERY_MODULE = 166
- SYS_POLL = 167
- SYS_NFSSERVCTL = 168
- SYS_SETRESGID = 169
- SYS_GETRESGID = 170
- SYS_PRCTL = 171
- SYS_RT_SIGRETURN = 172
- SYS_RT_SIGACTION = 173
- SYS_RT_SIGPROCMASK = 174
- SYS_RT_SIGPENDING = 175
- SYS_RT_SIGTIMEDWAIT = 176
- SYS_RT_SIGQUEUEINFO = 177
- SYS_RT_SIGSUSPEND = 178
- SYS_PREAD64 = 179
- SYS_PWRITE64 = 180
- SYS_CHOWN = 181
- SYS_GETCWD = 182
- SYS_CAPGET = 183
- SYS_CAPSET = 184
- SYS_SIGALTSTACK = 185
- SYS_SENDFILE = 186
- SYS_GETPMSG = 187
- SYS_PUTPMSG = 188
- SYS_VFORK = 189
- SYS_UGETRLIMIT = 190
- SYS_READAHEAD = 191
- SYS_PCICONFIG_READ = 198
- SYS_PCICONFIG_WRITE = 199
- SYS_PCICONFIG_IOBASE = 200
- SYS_MULTIPLEXER = 201
- SYS_GETDENTS64 = 202
- SYS_PIVOT_ROOT = 203
- SYS_MADVISE = 205
- SYS_MINCORE = 206
- SYS_GETTID = 207
- SYS_TKILL = 208
- SYS_SETXATTR = 209
- SYS_LSETXATTR = 210
- SYS_FSETXATTR = 211
- SYS_GETXATTR = 212
- SYS_LGETXATTR = 213
- SYS_FGETXATTR = 214
- SYS_LISTXATTR = 215
- SYS_LLISTXATTR = 216
- SYS_FLISTXATTR = 217
- SYS_REMOVEXATTR = 218
- SYS_LREMOVEXATTR = 219
- SYS_FREMOVEXATTR = 220
- SYS_FUTEX = 221
- SYS_SCHED_SETAFFINITY = 222
- SYS_SCHED_GETAFFINITY = 223
- SYS_TUXCALL = 225
- SYS_IO_SETUP = 227
- SYS_IO_DESTROY = 228
- SYS_IO_GETEVENTS = 229
- SYS_IO_SUBMIT = 230
- SYS_IO_CANCEL = 231
- SYS_SET_TID_ADDRESS = 232
- SYS_FADVISE64 = 233
- SYS_EXIT_GROUP = 234
- SYS_LOOKUP_DCOOKIE = 235
- SYS_EPOLL_CREATE = 236
- SYS_EPOLL_CTL = 237
- SYS_EPOLL_WAIT = 238
- SYS_REMAP_FILE_PAGES = 239
- SYS_TIMER_CREATE = 240
- SYS_TIMER_SETTIME = 241
- SYS_TIMER_GETTIME = 242
- SYS_TIMER_GETOVERRUN = 243
- SYS_TIMER_DELETE = 244
- SYS_CLOCK_SETTIME = 245
- SYS_CLOCK_GETTIME = 246
- SYS_CLOCK_GETRES = 247
- SYS_CLOCK_NANOSLEEP = 248
- SYS_SWAPCONTEXT = 249
- SYS_TGKILL = 250
- SYS_UTIMES = 251
- SYS_STATFS64 = 252
- SYS_FSTATFS64 = 253
- SYS_RTAS = 255
- SYS_SYS_DEBUG_SETCONTEXT = 256
- SYS_MIGRATE_PAGES = 258
- SYS_MBIND = 259
- SYS_GET_MEMPOLICY = 260
- SYS_SET_MEMPOLICY = 261
- SYS_MQ_OPEN = 262
- SYS_MQ_UNLINK = 263
- SYS_MQ_TIMEDSEND = 264
- SYS_MQ_TIMEDRECEIVE = 265
- SYS_MQ_NOTIFY = 266
- SYS_MQ_GETSETATTR = 267
- SYS_KEXEC_LOAD = 268
- SYS_ADD_KEY = 269
- SYS_REQUEST_KEY = 270
- SYS_KEYCTL = 271
- SYS_WAITID = 272
- SYS_IOPRIO_SET = 273
- SYS_IOPRIO_GET = 274
- SYS_INOTIFY_INIT = 275
- SYS_INOTIFY_ADD_WATCH = 276
- SYS_INOTIFY_RM_WATCH = 277
- SYS_SPU_RUN = 278
- SYS_SPU_CREATE = 279
- SYS_PSELECT6 = 280
- SYS_PPOLL = 281
- SYS_UNSHARE = 282
- SYS_SPLICE = 283
- SYS_TEE = 284
- SYS_VMSPLICE = 285
- SYS_OPENAT = 286
- SYS_MKDIRAT = 287
- SYS_MKNODAT = 288
- SYS_FCHOWNAT = 289
- SYS_FUTIMESAT = 290
- SYS_NEWFSTATAT = 291
- SYS_UNLINKAT = 292
- SYS_RENAMEAT = 293
- SYS_LINKAT = 294
- SYS_SYMLINKAT = 295
- SYS_READLINKAT = 296
- SYS_FCHMODAT = 297
- SYS_FACCESSAT = 298
- SYS_GET_ROBUST_LIST = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_MOVE_PAGES = 301
- SYS_GETCPU = 302
- SYS_EPOLL_PWAIT = 303
- SYS_UTIMENSAT = 304
- SYS_SIGNALFD = 305
- SYS_TIMERFD_CREATE = 306
- SYS_EVENTFD = 307
- SYS_SYNC_FILE_RANGE2 = 308
- SYS_FALLOCATE = 309
- SYS_SUBPAGE_PROT = 310
- SYS_TIMERFD_SETTIME = 311
- SYS_TIMERFD_GETTIME = 312
- SYS_SIGNALFD4 = 313
- SYS_EVENTFD2 = 314
- SYS_EPOLL_CREATE1 = 315
- SYS_DUP3 = 316
- SYS_PIPE2 = 317
- SYS_INOTIFY_INIT1 = 318
- SYS_PERF_EVENT_OPEN = 319
- SYS_PREADV = 320
- SYS_PWRITEV = 321
- SYS_RT_TGSIGQUEUEINFO = 322
- SYS_FANOTIFY_INIT = 323
- SYS_FANOTIFY_MARK = 324
- SYS_PRLIMIT64 = 325
- SYS_SOCKET = 326
- SYS_BIND = 327
- SYS_CONNECT = 328
- SYS_LISTEN = 329
- SYS_ACCEPT = 330
- SYS_GETSOCKNAME = 331
- SYS_GETPEERNAME = 332
- SYS_SOCKETPAIR = 333
- SYS_SEND = 334
- SYS_SENDTO = 335
- SYS_RECV = 336
- SYS_RECVFROM = 337
- SYS_SHUTDOWN = 338
- SYS_SETSOCKOPT = 339
- SYS_GETSOCKOPT = 340
- SYS_SENDMSG = 341
- SYS_RECVMSG = 342
- SYS_RECVMMSG = 343
- SYS_ACCEPT4 = 344
- SYS_NAME_TO_HANDLE_AT = 345
- SYS_OPEN_BY_HANDLE_AT = 346
- SYS_CLOCK_ADJTIME = 347
- SYS_SYNCFS = 348
- SYS_SENDMMSG = 349
- SYS_SETNS = 350
- SYS_PROCESS_VM_READV = 351
- SYS_PROCESS_VM_WRITEV = 352
- SYS_FINIT_MODULE = 353
- SYS_KCMP = 354
- SYS_SCHED_SETATTR = 355
- SYS_SCHED_GETATTR = 356
- SYS_RENAMEAT2 = 357
- SYS_SECCOMP = 358
- SYS_GETRANDOM = 359
- SYS_MEMFD_CREATE = 360
- SYS_BPF = 361
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
deleted file mode 100644
index 45e63f51a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build ppc64le,linux
-
-package unix
-
-const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86 = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_QUERY_MODULE = 166
- SYS_POLL = 167
- SYS_NFSSERVCTL = 168
- SYS_SETRESGID = 169
- SYS_GETRESGID = 170
- SYS_PRCTL = 171
- SYS_RT_SIGRETURN = 172
- SYS_RT_SIGACTION = 173
- SYS_RT_SIGPROCMASK = 174
- SYS_RT_SIGPENDING = 175
- SYS_RT_SIGTIMEDWAIT = 176
- SYS_RT_SIGQUEUEINFO = 177
- SYS_RT_SIGSUSPEND = 178
- SYS_PREAD64 = 179
- SYS_PWRITE64 = 180
- SYS_CHOWN = 181
- SYS_GETCWD = 182
- SYS_CAPGET = 183
- SYS_CAPSET = 184
- SYS_SIGALTSTACK = 185
- SYS_SENDFILE = 186
- SYS_GETPMSG = 187
- SYS_PUTPMSG = 188
- SYS_VFORK = 189
- SYS_UGETRLIMIT = 190
- SYS_READAHEAD = 191
- SYS_PCICONFIG_READ = 198
- SYS_PCICONFIG_WRITE = 199
- SYS_PCICONFIG_IOBASE = 200
- SYS_MULTIPLEXER = 201
- SYS_GETDENTS64 = 202
- SYS_PIVOT_ROOT = 203
- SYS_MADVISE = 205
- SYS_MINCORE = 206
- SYS_GETTID = 207
- SYS_TKILL = 208
- SYS_SETXATTR = 209
- SYS_LSETXATTR = 210
- SYS_FSETXATTR = 211
- SYS_GETXATTR = 212
- SYS_LGETXATTR = 213
- SYS_FGETXATTR = 214
- SYS_LISTXATTR = 215
- SYS_LLISTXATTR = 216
- SYS_FLISTXATTR = 217
- SYS_REMOVEXATTR = 218
- SYS_LREMOVEXATTR = 219
- SYS_FREMOVEXATTR = 220
- SYS_FUTEX = 221
- SYS_SCHED_SETAFFINITY = 222
- SYS_SCHED_GETAFFINITY = 223
- SYS_TUXCALL = 225
- SYS_IO_SETUP = 227
- SYS_IO_DESTROY = 228
- SYS_IO_GETEVENTS = 229
- SYS_IO_SUBMIT = 230
- SYS_IO_CANCEL = 231
- SYS_SET_TID_ADDRESS = 232
- SYS_FADVISE64 = 233
- SYS_EXIT_GROUP = 234
- SYS_LOOKUP_DCOOKIE = 235
- SYS_EPOLL_CREATE = 236
- SYS_EPOLL_CTL = 237
- SYS_EPOLL_WAIT = 238
- SYS_REMAP_FILE_PAGES = 239
- SYS_TIMER_CREATE = 240
- SYS_TIMER_SETTIME = 241
- SYS_TIMER_GETTIME = 242
- SYS_TIMER_GETOVERRUN = 243
- SYS_TIMER_DELETE = 244
- SYS_CLOCK_SETTIME = 245
- SYS_CLOCK_GETTIME = 246
- SYS_CLOCK_GETRES = 247
- SYS_CLOCK_NANOSLEEP = 248
- SYS_SWAPCONTEXT = 249
- SYS_TGKILL = 250
- SYS_UTIMES = 251
- SYS_STATFS64 = 252
- SYS_FSTATFS64 = 253
- SYS_RTAS = 255
- SYS_SYS_DEBUG_SETCONTEXT = 256
- SYS_MIGRATE_PAGES = 258
- SYS_MBIND = 259
- SYS_GET_MEMPOLICY = 260
- SYS_SET_MEMPOLICY = 261
- SYS_MQ_OPEN = 262
- SYS_MQ_UNLINK = 263
- SYS_MQ_TIMEDSEND = 264
- SYS_MQ_TIMEDRECEIVE = 265
- SYS_MQ_NOTIFY = 266
- SYS_MQ_GETSETATTR = 267
- SYS_KEXEC_LOAD = 268
- SYS_ADD_KEY = 269
- SYS_REQUEST_KEY = 270
- SYS_KEYCTL = 271
- SYS_WAITID = 272
- SYS_IOPRIO_SET = 273
- SYS_IOPRIO_GET = 274
- SYS_INOTIFY_INIT = 275
- SYS_INOTIFY_ADD_WATCH = 276
- SYS_INOTIFY_RM_WATCH = 277
- SYS_SPU_RUN = 278
- SYS_SPU_CREATE = 279
- SYS_PSELECT6 = 280
- SYS_PPOLL = 281
- SYS_UNSHARE = 282
- SYS_SPLICE = 283
- SYS_TEE = 284
- SYS_VMSPLICE = 285
- SYS_OPENAT = 286
- SYS_MKDIRAT = 287
- SYS_MKNODAT = 288
- SYS_FCHOWNAT = 289
- SYS_FUTIMESAT = 290
- SYS_NEWFSTATAT = 291
- SYS_UNLINKAT = 292
- SYS_RENAMEAT = 293
- SYS_LINKAT = 294
- SYS_SYMLINKAT = 295
- SYS_READLINKAT = 296
- SYS_FCHMODAT = 297
- SYS_FACCESSAT = 298
- SYS_GET_ROBUST_LIST = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_MOVE_PAGES = 301
- SYS_GETCPU = 302
- SYS_EPOLL_PWAIT = 303
- SYS_UTIMENSAT = 304
- SYS_SIGNALFD = 305
- SYS_TIMERFD_CREATE = 306
- SYS_EVENTFD = 307
- SYS_SYNC_FILE_RANGE2 = 308
- SYS_FALLOCATE = 309
- SYS_SUBPAGE_PROT = 310
- SYS_TIMERFD_SETTIME = 311
- SYS_TIMERFD_GETTIME = 312
- SYS_SIGNALFD4 = 313
- SYS_EVENTFD2 = 314
- SYS_EPOLL_CREATE1 = 315
- SYS_DUP3 = 316
- SYS_PIPE2 = 317
- SYS_INOTIFY_INIT1 = 318
- SYS_PERF_EVENT_OPEN = 319
- SYS_PREADV = 320
- SYS_PWRITEV = 321
- SYS_RT_TGSIGQUEUEINFO = 322
- SYS_FANOTIFY_INIT = 323
- SYS_FANOTIFY_MARK = 324
- SYS_PRLIMIT64 = 325
- SYS_SOCKET = 326
- SYS_BIND = 327
- SYS_CONNECT = 328
- SYS_LISTEN = 329
- SYS_ACCEPT = 330
- SYS_GETSOCKNAME = 331
- SYS_GETPEERNAME = 332
- SYS_SOCKETPAIR = 333
- SYS_SEND = 334
- SYS_SENDTO = 335
- SYS_RECV = 336
- SYS_RECVFROM = 337
- SYS_SHUTDOWN = 338
- SYS_SETSOCKOPT = 339
- SYS_GETSOCKOPT = 340
- SYS_SENDMSG = 341
- SYS_RECVMSG = 342
- SYS_RECVMMSG = 343
- SYS_ACCEPT4 = 344
- SYS_NAME_TO_HANDLE_AT = 345
- SYS_OPEN_BY_HANDLE_AT = 346
- SYS_CLOCK_ADJTIME = 347
- SYS_SYNCFS = 348
- SYS_SENDMMSG = 349
- SYS_SETNS = 350
- SYS_PROCESS_VM_READV = 351
- SYS_PROCESS_VM_WRITEV = 352
- SYS_FINIT_MODULE = 353
- SYS_KCMP = 354
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
deleted file mode 100644
index 42d4f5cda..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ /dev/null
@@ -1,328 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build s390x,linux
-
-package unix
-
-const (
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_RESTART_SYSCALL = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_BRK = 45
- SYS_SIGNAL = 48
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_SETPGID = 57
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_SYMLINK = 83
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_LOOKUP_DCOOKIE = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_GETDENTS = 141
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_QUERY_MODULE = 167
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_GETPMSG = 188
- SYS_PUTPMSG = 189
- SYS_VFORK = 190
- SYS_PIVOT_ROOT = 217
- SYS_MINCORE = 218
- SYS_MADVISE = 219
- SYS_GETDENTS64 = 220
- SYS_READAHEAD = 222
- SYS_SETXATTR = 224
- SYS_LSETXATTR = 225
- SYS_FSETXATTR = 226
- SYS_GETXATTR = 227
- SYS_LGETXATTR = 228
- SYS_FGETXATTR = 229
- SYS_LISTXATTR = 230
- SYS_LLISTXATTR = 231
- SYS_FLISTXATTR = 232
- SYS_REMOVEXATTR = 233
- SYS_LREMOVEXATTR = 234
- SYS_FREMOVEXATTR = 235
- SYS_GETTID = 236
- SYS_TKILL = 237
- SYS_FUTEX = 238
- SYS_SCHED_SETAFFINITY = 239
- SYS_SCHED_GETAFFINITY = 240
- SYS_TGKILL = 241
- SYS_IO_SETUP = 243
- SYS_IO_DESTROY = 244
- SYS_IO_GETEVENTS = 245
- SYS_IO_SUBMIT = 246
- SYS_IO_CANCEL = 247
- SYS_EXIT_GROUP = 248
- SYS_EPOLL_CREATE = 249
- SYS_EPOLL_CTL = 250
- SYS_EPOLL_WAIT = 251
- SYS_SET_TID_ADDRESS = 252
- SYS_FADVISE64 = 253
- SYS_TIMER_CREATE = 254
- SYS_TIMER_SETTIME = 255
- SYS_TIMER_GETTIME = 256
- SYS_TIMER_GETOVERRUN = 257
- SYS_TIMER_DELETE = 258
- SYS_CLOCK_SETTIME = 259
- SYS_CLOCK_GETTIME = 260
- SYS_CLOCK_GETRES = 261
- SYS_CLOCK_NANOSLEEP = 262
- SYS_STATFS64 = 265
- SYS_FSTATFS64 = 266
- SYS_REMAP_FILE_PAGES = 267
- SYS_MBIND = 268
- SYS_GET_MEMPOLICY = 269
- SYS_SET_MEMPOLICY = 270
- SYS_MQ_OPEN = 271
- SYS_MQ_UNLINK = 272
- SYS_MQ_TIMEDSEND = 273
- SYS_MQ_TIMEDRECEIVE = 274
- SYS_MQ_NOTIFY = 275
- SYS_MQ_GETSETATTR = 276
- SYS_KEXEC_LOAD = 277
- SYS_ADD_KEY = 278
- SYS_REQUEST_KEY = 279
- SYS_KEYCTL = 280
- SYS_WAITID = 281
- SYS_IOPRIO_SET = 282
- SYS_IOPRIO_GET = 283
- SYS_INOTIFY_INIT = 284
- SYS_INOTIFY_ADD_WATCH = 285
- SYS_INOTIFY_RM_WATCH = 286
- SYS_MIGRATE_PAGES = 287
- SYS_OPENAT = 288
- SYS_MKDIRAT = 289
- SYS_MKNODAT = 290
- SYS_FCHOWNAT = 291
- SYS_FUTIMESAT = 292
- SYS_UNLINKAT = 294
- SYS_RENAMEAT = 295
- SYS_LINKAT = 296
- SYS_SYMLINKAT = 297
- SYS_READLINKAT = 298
- SYS_FCHMODAT = 299
- SYS_FACCESSAT = 300
- SYS_PSELECT6 = 301
- SYS_PPOLL = 302
- SYS_UNSHARE = 303
- SYS_SET_ROBUST_LIST = 304
- SYS_GET_ROBUST_LIST = 305
- SYS_SPLICE = 306
- SYS_SYNC_FILE_RANGE = 307
- SYS_TEE = 308
- SYS_VMSPLICE = 309
- SYS_MOVE_PAGES = 310
- SYS_GETCPU = 311
- SYS_EPOLL_PWAIT = 312
- SYS_UTIMES = 313
- SYS_FALLOCATE = 314
- SYS_UTIMENSAT = 315
- SYS_SIGNALFD = 316
- SYS_TIMERFD = 317
- SYS_EVENTFD = 318
- SYS_TIMERFD_CREATE = 319
- SYS_TIMERFD_SETTIME = 320
- SYS_TIMERFD_GETTIME = 321
- SYS_SIGNALFD4 = 322
- SYS_EVENTFD2 = 323
- SYS_INOTIFY_INIT1 = 324
- SYS_PIPE2 = 325
- SYS_DUP3 = 326
- SYS_EPOLL_CREATE1 = 327
- SYS_PREADV = 328
- SYS_PWRITEV = 329
- SYS_RT_TGSIGQUEUEINFO = 330
- SYS_PERF_EVENT_OPEN = 331
- SYS_FANOTIFY_INIT = 332
- SYS_FANOTIFY_MARK = 333
- SYS_PRLIMIT64 = 334
- SYS_NAME_TO_HANDLE_AT = 335
- SYS_OPEN_BY_HANDLE_AT = 336
- SYS_CLOCK_ADJTIME = 337
- SYS_SYNCFS = 338
- SYS_SETNS = 339
- SYS_PROCESS_VM_READV = 340
- SYS_PROCESS_VM_WRITEV = 341
- SYS_S390_RUNTIME_INSTR = 342
- SYS_KCMP = 343
- SYS_FINIT_MODULE = 344
- SYS_SCHED_SETATTR = 345
- SYS_SCHED_GETATTR = 346
- SYS_RENAMEAT2 = 347
- SYS_SECCOMP = 348
- SYS_GETRANDOM = 349
- SYS_MEMFD_CREATE = 350
- SYS_BPF = 351
- SYS_S390_PCI_MMIO_WRITE = 352
- SYS_S390_PCI_MMIO_READ = 353
- SYS_EXECVEAT = 354
- SYS_USERFAULTFD = 355
- SYS_MEMBARRIER = 356
- SYS_RECVMMSG = 357
- SYS_SENDMMSG = 358
- SYS_SOCKET = 359
- SYS_SOCKETPAIR = 360
- SYS_BIND = 361
- SYS_CONNECT = 362
- SYS_LISTEN = 363
- SYS_ACCEPT4 = 364
- SYS_GETSOCKOPT = 365
- SYS_SETSOCKOPT = 366
- SYS_GETSOCKNAME = 367
- SYS_GETPEERNAME = 368
- SYS_SENDTO = 369
- SYS_SENDMSG = 370
- SYS_RECVFROM = 371
- SYS_RECVMSG = 372
- SYS_SHUTDOWN = 373
- SYS_MLOCK2 = 374
- SYS_SELECT = 142
- SYS_GETRLIMIT = 191
- SYS_LCHOWN = 198
- SYS_GETUID = 199
- SYS_GETGID = 200
- SYS_GETEUID = 201
- SYS_GETEGID = 202
- SYS_SETREUID = 203
- SYS_SETREGID = 204
- SYS_GETGROUPS = 205
- SYS_SETGROUPS = 206
- SYS_FCHOWN = 207
- SYS_SETRESUID = 208
- SYS_GETRESUID = 209
- SYS_SETRESGID = 210
- SYS_GETRESGID = 211
- SYS_CHOWN = 212
- SYS_SETUID = 213
- SYS_SETGID = 214
- SYS_SETFSUID = 215
- SYS_SETFSGID = 216
- SYS_NEWFSTATAT = 293
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
deleted file mode 100644
index 46b5bee1d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// mksysnum_linux.pl /usr/include/sparc64-linux-gnu/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build sparc64,linux
-
-package unix
-
-const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECV = 11
- SYS_CHDIR = 12
- SYS_CHOWN = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BRK = 17
- SYS_PERFCTR = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_CAPGET = 21
- SYS_CAPSET = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_VMSPLICE = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_SIGALTSTACK = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_STAT = 38
- SYS_SENDFILE = 39
- SYS_LSTAT = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_UMOUNT2 = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_MEMORY_ORDERING = 52
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_FSTAT = 62
- SYS_FSTAT64 = 63
- SYS_GETPAGESIZE = 64
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_PREAD64 = 67
- SYS_PWRITE64 = 68
- SYS_MMAP = 71
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_VHANGUP = 76
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_SETHOSTNAME = 88
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_ACCEPT = 99
- SYS_GETPRIORITY = 100
- SYS_RT_SIGRETURN = 101
- SYS_RT_SIGACTION = 102
- SYS_RT_SIGPROCMASK = 103
- SYS_RT_SIGPENDING = 104
- SYS_RT_SIGTIMEDWAIT = 105
- SYS_RT_SIGQUEUEINFO = 106
- SYS_RT_SIGSUSPEND = 107
- SYS_SETRESUID = 108
- SYS_GETRESUID = 109
- SYS_SETRESGID = 110
- SYS_GETRESGID = 111
- SYS_RECVMSG = 113
- SYS_SENDMSG = 114
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_GETCWD = 119
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_RECVFROM = 125
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_TRUNCATE = 129
- SYS_FTRUNCATE = 130
- SYS_FLOCK = 131
- SYS_LSTAT64 = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_STAT64 = 139
- SYS_SENDFILE64 = 140
- SYS_GETPEERNAME = 141
- SYS_FUTEX = 142
- SYS_GETTID = 143
- SYS_GETRLIMIT = 144
- SYS_SETRLIMIT = 145
- SYS_PIVOT_ROOT = 146
- SYS_PRCTL = 147
- SYS_PCICONFIG_READ = 148
- SYS_PCICONFIG_WRITE = 149
- SYS_GETSOCKNAME = 150
- SYS_INOTIFY_INIT = 151
- SYS_INOTIFY_ADD_WATCH = 152
- SYS_POLL = 153
- SYS_GETDENTS64 = 154
- SYS_INOTIFY_RM_WATCH = 156
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UMOUNT = 159
- SYS_SCHED_SET_AFFINITY = 160
- SYS_SCHED_GET_AFFINITY = 161
- SYS_GETDOMAINNAME = 162
- SYS_SETDOMAINNAME = 163
- SYS_UTRAP_INSTALL = 164
- SYS_QUOTACTL = 165
- SYS_SET_TID_ADDRESS = 166
- SYS_MOUNT = 167
- SYS_USTAT = 168
- SYS_SETXATTR = 169
- SYS_LSETXATTR = 170
- SYS_FSETXATTR = 171
- SYS_GETXATTR = 172
- SYS_LGETXATTR = 173
- SYS_GETDENTS = 174
- SYS_SETSID = 175
- SYS_FCHDIR = 176
- SYS_FGETXATTR = 177
- SYS_LISTXATTR = 178
- SYS_LLISTXATTR = 179
- SYS_FLISTXATTR = 180
- SYS_REMOVEXATTR = 181
- SYS_LREMOVEXATTR = 182
- SYS_SIGPENDING = 183
- SYS_QUERY_MODULE = 184
- SYS_SETPGID = 185
- SYS_FREMOVEXATTR = 186
- SYS_TKILL = 187
- SYS_EXIT_GROUP = 188
- SYS_UNAME = 189
- SYS_INIT_MODULE = 190
- SYS_PERSONALITY = 191
- SYS_REMAP_FILE_PAGES = 192
- SYS_EPOLL_CREATE = 193
- SYS_EPOLL_CTL = 194
- SYS_EPOLL_WAIT = 195
- SYS_IOPRIO_SET = 196
- SYS_GETPPID = 197
- SYS_SIGACTION = 198
- SYS_SGETMASK = 199
- SYS_SSETMASK = 200
- SYS_SIGSUSPEND = 201
- SYS_OLDLSTAT = 202
- SYS_USELIB = 203
- SYS_READDIR = 204
- SYS_READAHEAD = 205
- SYS_SOCKETCALL = 206
- SYS_SYSLOG = 207
- SYS_LOOKUP_DCOOKIE = 208
- SYS_FADVISE64 = 209
- SYS_FADVISE64_64 = 210
- SYS_TGKILL = 211
- SYS_WAITPID = 212
- SYS_SWAPOFF = 213
- SYS_SYSINFO = 214
- SYS_IPC = 215
- SYS_SIGRETURN = 216
- SYS_CLONE = 217
- SYS_IOPRIO_GET = 218
- SYS_ADJTIMEX = 219
- SYS_SIGPROCMASK = 220
- SYS_CREATE_MODULE = 221
- SYS_DELETE_MODULE = 222
- SYS_GET_KERNEL_SYMS = 223
- SYS_GETPGID = 224
- SYS_BDFLUSH = 225
- SYS_SYSFS = 226
- SYS_AFS_SYSCALL = 227
- SYS_SETFSUID = 228
- SYS_SETFSGID = 229
- SYS__NEWSELECT = 230
- SYS_SPLICE = 232
- SYS_STIME = 233
- SYS_STATFS64 = 234
- SYS_FSTATFS64 = 235
- SYS__LLSEEK = 236
- SYS_MLOCK = 237
- SYS_MUNLOCK = 238
- SYS_MLOCKALL = 239
- SYS_MUNLOCKALL = 240
- SYS_SCHED_SETPARAM = 241
- SYS_SCHED_GETPARAM = 242
- SYS_SCHED_SETSCHEDULER = 243
- SYS_SCHED_GETSCHEDULER = 244
- SYS_SCHED_YIELD = 245
- SYS_SCHED_GET_PRIORITY_MAX = 246
- SYS_SCHED_GET_PRIORITY_MIN = 247
- SYS_SCHED_RR_GET_INTERVAL = 248
- SYS_NANOSLEEP = 249
- SYS_MREMAP = 250
- SYS__SYSCTL = 251
- SYS_GETSID = 252
- SYS_FDATASYNC = 253
- SYS_NFSSERVCTL = 254
- SYS_SYNC_FILE_RANGE = 255
- SYS_CLOCK_SETTIME = 256
- SYS_CLOCK_GETTIME = 257
- SYS_CLOCK_GETRES = 258
- SYS_CLOCK_NANOSLEEP = 259
- SYS_SCHED_GETAFFINITY = 260
- SYS_SCHED_SETAFFINITY = 261
- SYS_TIMER_SETTIME = 262
- SYS_TIMER_GETTIME = 263
- SYS_TIMER_GETOVERRUN = 264
- SYS_TIMER_DELETE = 265
- SYS_TIMER_CREATE = 266
- SYS_IO_SETUP = 268
- SYS_IO_DESTROY = 269
- SYS_IO_SUBMIT = 270
- SYS_IO_CANCEL = 271
- SYS_IO_GETEVENTS = 272
- SYS_MQ_OPEN = 273
- SYS_MQ_UNLINK = 274
- SYS_MQ_TIMEDSEND = 275
- SYS_MQ_TIMEDRECEIVE = 276
- SYS_MQ_NOTIFY = 277
- SYS_MQ_GETSETATTR = 278
- SYS_WAITID = 279
- SYS_TEE = 280
- SYS_ADD_KEY = 281
- SYS_REQUEST_KEY = 282
- SYS_KEYCTL = 283
- SYS_OPENAT = 284
- SYS_MKDIRAT = 285
- SYS_MKNODAT = 286
- SYS_FCHOWNAT = 287
- SYS_FUTIMESAT = 288
- SYS_FSTATAT64 = 289
- SYS_UNLINKAT = 290
- SYS_RENAMEAT = 291
- SYS_LINKAT = 292
- SYS_SYMLINKAT = 293
- SYS_READLINKAT = 294
- SYS_FCHMODAT = 295
- SYS_FACCESSAT = 296
- SYS_PSELECT6 = 297
- SYS_PPOLL = 298
- SYS_UNSHARE = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_GET_ROBUST_LIST = 301
- SYS_MIGRATE_PAGES = 302
- SYS_MBIND = 303
- SYS_GET_MEMPOLICY = 304
- SYS_SET_MEMPOLICY = 305
- SYS_KEXEC_LOAD = 306
- SYS_MOVE_PAGES = 307
- SYS_GETCPU = 308
- SYS_EPOLL_PWAIT = 309
- SYS_UTIMENSAT = 310
- SYS_SIGNALFD = 311
- SYS_TIMERFD_CREATE = 312
- SYS_EVENTFD = 313
- SYS_FALLOCATE = 314
- SYS_TIMERFD_SETTIME = 315
- SYS_TIMERFD_GETTIME = 316
- SYS_SIGNALFD4 = 317
- SYS_EVENTFD2 = 318
- SYS_EPOLL_CREATE1 = 319
- SYS_DUP3 = 320
- SYS_PIPE2 = 321
- SYS_INOTIFY_INIT1 = 322
- SYS_ACCEPT4 = 323
- SYS_PREADV = 324
- SYS_PWRITEV = 325
- SYS_RT_TGSIGQUEUEINFO = 326
- SYS_PERF_EVENT_OPEN = 327
- SYS_RECVMMSG = 328
- SYS_FANOTIFY_INIT = 329
- SYS_FANOTIFY_MARK = 330
- SYS_PRLIMIT64 = 331
- SYS_NAME_TO_HANDLE_AT = 332
- SYS_OPEN_BY_HANDLE_AT = 333
- SYS_CLOCK_ADJTIME = 334
- SYS_SYNCFS = 335
- SYS_SENDMMSG = 336
- SYS_SETNS = 337
- SYS_PROCESS_VM_READV = 338
- SYS_PROCESS_VM_WRITEV = 339
- SYS_KERN_FEATURES = 340
- SYS_KCMP = 341
- SYS_FINIT_MODULE = 342
- SYS_SCHED_SETATTR = 343
- SYS_SCHED_GETATTR = 344
- SYS_RENAMEAT2 = 345
- SYS_SECCOMP = 346
- SYS_GETRANDOM = 347
- SYS_MEMFD_CREATE = 348
- SYS_BPF = 349
- SYS_EXECVEAT = 350
- SYS_MEMBARRIER = 351
- SYS_USERFAULTFD = 352
- SYS_BIND = 353
- SYS_LISTEN = 354
- SYS_SETSOCKOPT = 355
- SYS_MLOCK2 = 356
- SYS_COPY_FILE_RANGE = 357
- SYS_PREADV2 = 358
- SYS_PWRITEV2 = 359
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
deleted file mode 100644
index f60d8f988..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// mksysnum_netbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build 386,netbsd
-
-package unix
-
-const (
- SYS_EXIT = 1 // { void|sys||exit(int rval); }
- SYS_FORK = 2 // { int|sys||fork(void); }
- SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
- SYS_CLOSE = 6 // { int|sys||close(int fd); }
- SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
- SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
- SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
- SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
- SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
- SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
- SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); }
- SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
- SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
- SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
- SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
- SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
- SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { void|sys||sync(void); }
- SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
- SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
- SYS_DUP = 41 // { int|sys||dup(int fd); }
- SYS_PIPE = 42 // { int|sys||pipe(void); }
- SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
- SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
- SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
- SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
- SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
- SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int|sys||acct(const char *path); }
- SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
- SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
- SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
- SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
- SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
- SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
- SYS_VFORK = 66 // { int|sys||vfork(void); }
- SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
- SYS_SSTK = 70 // { int|sys||sstk(int incr); }
- SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
- SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
- SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
- SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
- SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
- SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
- SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
- SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
- SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
- SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
- SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
- SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
- SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
- SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
- SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
- SYS_SETSID = 147 // { int|sys||setsid(void); }
- SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
- SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
- SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
- SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
- SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
- SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
- SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
- SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); }
- SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
- SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
- SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
- SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
- SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
- SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
- SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
- SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
- SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
- SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
- SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
- SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
- SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
- SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
- SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
- SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
- SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
- SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
- SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
- SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
- SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
- SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
- SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
- SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
- SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
- SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
- SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
- SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
- SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
- SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
- SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
- SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
- SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
- SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
- SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
- SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
- SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
- SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
- SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
- SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
- SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
- SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
- SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
- SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
- SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
- SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
- SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
- SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
- SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
- SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
- SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
- SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
- SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
- SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
- SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
- SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
- SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
- SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
- SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
- SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
- SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
- SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
- SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
- SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
- SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
- SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
- SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
- SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
- SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
- SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
- SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
- SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
- SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
- SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
- SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
- SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
- SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
- SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
- SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
- SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
- SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
- SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
- SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
- SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
- SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
- SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
- SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
- SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
- SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
- SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
- SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
- SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
- SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
- SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
- SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
- SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
- SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
- SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
- SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
- SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
- SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
- SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
- SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
- SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
- SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
- SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
- SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
- SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
- SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
- SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
- SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
- SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
- SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
- SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
- SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
- SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
- SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
- SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
- SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
- SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
- SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
- SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
- SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
- SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
- SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
- SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
- SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
- SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
- SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
deleted file mode 100644
index 48a91d464..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// mksysnum_netbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,netbsd
-
-package unix
-
-const (
- SYS_EXIT = 1 // { void|sys||exit(int rval); }
- SYS_FORK = 2 // { int|sys||fork(void); }
- SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
- SYS_CLOSE = 6 // { int|sys||close(int fd); }
- SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
- SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
- SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
- SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
- SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
- SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
- SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); }
- SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
- SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
- SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
- SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
- SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
- SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { void|sys||sync(void); }
- SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
- SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
- SYS_DUP = 41 // { int|sys||dup(int fd); }
- SYS_PIPE = 42 // { int|sys||pipe(void); }
- SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
- SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
- SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
- SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
- SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
- SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int|sys||acct(const char *path); }
- SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
- SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
- SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
- SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
- SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
- SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
- SYS_VFORK = 66 // { int|sys||vfork(void); }
- SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
- SYS_SSTK = 70 // { int|sys||sstk(int incr); }
- SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
- SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
- SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
- SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
- SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
- SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
- SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
- SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
- SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
- SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
- SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
- SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
- SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
- SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
- SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
- SYS_SETSID = 147 // { int|sys||setsid(void); }
- SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
- SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
- SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
- SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
- SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
- SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
- SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
- SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); }
- SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
- SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
- SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
- SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
- SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
- SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
- SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
- SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
- SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
- SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
- SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
- SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
- SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
- SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
- SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
- SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
- SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
- SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
- SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
- SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
- SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
- SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
- SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
- SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
- SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
- SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
- SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
- SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
- SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
- SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
- SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
- SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
- SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
- SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
- SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
- SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
- SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
- SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
- SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
- SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
- SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
- SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
- SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
- SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
- SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
- SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
- SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
- SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
- SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
- SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
- SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
- SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
- SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
- SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
- SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
- SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
- SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
- SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
- SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
- SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
- SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
- SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
- SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
- SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
- SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
- SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
- SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
- SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
- SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
- SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
- SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
- SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
- SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
- SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
- SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
- SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
- SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
- SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
- SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
- SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
- SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
- SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
- SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
- SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
- SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
- SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
- SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
- SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
- SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
- SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
- SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
- SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
- SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
- SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
- SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
- SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
- SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
- SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
- SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
- SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
- SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
- SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
- SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
- SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
- SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
- SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
- SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
- SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
- SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
- SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
- SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
- SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
- SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
- SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
- SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
- SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
- SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
- SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
- SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
- SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
- SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
- SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
- SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
- SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
- SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
- SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
- SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
- SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
- SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
deleted file mode 100644
index 612ba662c..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// mksysnum_netbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,netbsd
-
-package unix
-
-const (
- SYS_EXIT = 1 // { void|sys||exit(int rval); }
- SYS_FORK = 2 // { int|sys||fork(void); }
- SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
- SYS_CLOSE = 6 // { int|sys||close(int fd); }
- SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
- SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
- SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
- SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
- SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
- SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
- SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); }
- SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
- SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
- SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
- SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
- SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
- SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
- SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { void|sys||sync(void); }
- SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
- SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
- SYS_DUP = 41 // { int|sys||dup(int fd); }
- SYS_PIPE = 42 // { int|sys||pipe(void); }
- SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
- SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
- SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
- SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
- SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
- SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int|sys||acct(const char *path); }
- SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
- SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
- SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
- SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
- SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
- SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
- SYS_VFORK = 66 // { int|sys||vfork(void); }
- SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
- SYS_SSTK = 70 // { int|sys||sstk(int incr); }
- SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
- SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
- SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
- SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
- SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
- SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
- SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
- SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
- SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
- SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
- SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
- SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
- SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
- SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
- SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
- SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
- SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
- SYS_SETSID = 147 // { int|sys||setsid(void); }
- SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
- SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
- SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
- SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
- SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
- SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
- SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
- SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
- SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); }
- SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
- SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
- SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
- SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
- SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
- SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
- SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
- SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
- SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
- SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
- SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
- SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
- SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
- SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
- SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
- SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
- SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
- SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
- SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
- SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
- SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
- SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
- SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
- SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
- SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
- SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
- SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
- SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
- SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
- SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
- SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
- SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
- SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
- SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
- SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
- SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
- SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
- SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
- SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
- SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
- SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
- SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
- SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
- SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
- SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
- SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
- SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
- SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
- SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
- SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
- SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
- SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
- SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
- SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
- SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
- SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
- SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
- SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
- SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
- SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
- SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
- SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
- SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
- SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
- SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
- SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
- SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
- SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
- SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
- SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
- SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
- SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
- SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
- SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
- SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
- SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
- SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
- SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
- SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
- SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
- SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
- SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
- SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
- SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
- SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
- SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
- SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
- SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
- SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
- SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
- SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
- SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
- SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
- SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
- SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
- SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
- SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
- SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
- SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
- SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
- SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
- SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
- SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
- SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
- SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
- SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
- SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
- SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
- SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
- SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
- SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
- SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
- SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
- SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
- SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
- SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
- SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
- SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
- SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
- SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
- SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
- SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
- SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
- SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
- SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
- SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
- SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
- SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
- SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
- SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
- SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
- SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
- SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
- SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
- SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
- SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
- SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
deleted file mode 100644
index 3e8ce2a1d..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// mksysnum_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build 386,openbsd
-
-package unix
-
-const (
- SYS_EXIT = 1 // { void sys_exit(int rval); }
- SYS_FORK = 2 // { int sys_fork(void); }
- SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int sys_open(const char *path, \
- SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
- SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
- SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
- SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
- SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
- SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
- SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
- SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
- SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
- SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
- SYS_GETPID = 20 // { pid_t sys_getpid(void); }
- SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
- SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t sys_getuid(void); }
- SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
- SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
- SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
- SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
- SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
- SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
- SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
- SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
- SYS_SYNC = 36 // { void sys_sync(void); }
- SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
- SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
- SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
- SYS_DUP = 41 // { int sys_dup(int fd); }
- SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
- SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
- SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
- SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
- SYS_GETGID = 47 // { gid_t sys_getgid(void); }
- SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
- SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int sys_acct(const char *path); }
- SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
- SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
- SYS_REBOOT = 55 // { int sys_reboot(int opt); }
- SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
- SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
- SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
- SYS_EXECVE = 59 // { int sys_execve(const char *path, \
- SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
- SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 63 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
- SYS_VFORK = 66 // { int sys_vfork(void); }
- SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
- SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
- SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
- SYS_KEVENT = 72 // { int sys_kevent(int fd, \
- SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
- SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
- SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
- SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
- SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
- SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
- SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
- SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
- SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
- SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
- SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
- SYS_FSYNC = 95 // { int sys_fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
- SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
- SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
- SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
- SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
- SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
- SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
- SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
- SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { ssize_t sys_readv(int fd, \
- SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
- SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
- SYS_SETSID = 147 // { int sys_setsid(void); }
- SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
- SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
- SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
- SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
- SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
- SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
- SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
- SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
- SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
- SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
- SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
- SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
- SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
- SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
- SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
- SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
- SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
- SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
- SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
- SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
- SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
- SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
- SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
- SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
- SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
- SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
- SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
- SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
- SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
- SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
- SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
- SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
- SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
- SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
- SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
- SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
- SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
- SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
- SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
- SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
- SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
- SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
- SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
- SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
- SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
- SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
- SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
- SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
- SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
- SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
- SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
- SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
- SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
- SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
- SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
deleted file mode 100644
index bd28146dd..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// mksysnum_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build amd64,openbsd
-
-package unix
-
-const (
- SYS_EXIT = 1 // { void sys_exit(int rval); }
- SYS_FORK = 2 // { int sys_fork(void); }
- SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int sys_open(const char *path, \
- SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
- SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
- SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
- SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
- SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
- SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
- SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
- SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
- SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
- SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
- SYS_GETPID = 20 // { pid_t sys_getpid(void); }
- SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
- SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t sys_getuid(void); }
- SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
- SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
- SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
- SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
- SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
- SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
- SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
- SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
- SYS_SYNC = 36 // { void sys_sync(void); }
- SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
- SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
- SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
- SYS_DUP = 41 // { int sys_dup(int fd); }
- SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
- SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
- SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
- SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
- SYS_GETGID = 47 // { gid_t sys_getgid(void); }
- SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
- SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int sys_acct(const char *path); }
- SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
- SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
- SYS_REBOOT = 55 // { int sys_reboot(int opt); }
- SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
- SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
- SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
- SYS_EXECVE = 59 // { int sys_execve(const char *path, \
- SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
- SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 63 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
- SYS_VFORK = 66 // { int sys_vfork(void); }
- SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
- SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
- SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
- SYS_KEVENT = 72 // { int sys_kevent(int fd, \
- SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
- SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
- SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
- SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
- SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
- SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
- SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
- SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
- SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
- SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
- SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
- SYS_FSYNC = 95 // { int sys_fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
- SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
- SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
- SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
- SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
- SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
- SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
- SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
- SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { ssize_t sys_readv(int fd, \
- SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
- SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
- SYS_SETSID = 147 // { int sys_setsid(void); }
- SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
- SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
- SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
- SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
- SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
- SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
- SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
- SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
- SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
- SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
- SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
- SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
- SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
- SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
- SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
- SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
- SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
- SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
- SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
- SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
- SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
- SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
- SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
- SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
- SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
- SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
- SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
- SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
- SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
- SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
- SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
- SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
- SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
- SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
- SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
- SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
- SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
- SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
- SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
- SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
- SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
- SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
- SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
- SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
- SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
- SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
- SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
- SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
- SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
- SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
- SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
- SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
- SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
- SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
- SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go
deleted file mode 100644
index c70865985..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build amd64,solaris
-
-package unix
-
-// TODO(aram): remove these before Go 1.3.
-const (
- SYS_EXECVE = 59
- SYS_FCNTL = 62
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
deleted file mode 100644
index 2de1d44e2..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
+++ /dev/null
@@ -1,447 +0,0 @@
-// +build 386,darwin
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timeval32 struct{}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint32
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
deleted file mode 100644
index 044657878..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ /dev/null
@@ -1,462 +0,0 @@
-// +build amd64,darwin
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval32 struct {
- Sec int32
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Pad_cgo_0 [4]byte
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
- Pad_cgo_0 [4]byte
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint64
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Pad_cgo_0 [8]byte
- Pad_cgo_1 [8]byte
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval32
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval32
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint64
- Oflag uint64
- Cflag uint64
- Lflag uint64
- Cc [20]uint8
- Pad_cgo_0 [4]byte
- Ispeed uint64
- Ospeed uint64
-}
-
-const (
- AT_FDCWD = -0x2
- AT_SYMLINK_NOFOLLOW = 0x20
-)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
deleted file mode 100644
index 66df363ce..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
+++ /dev/null
@@ -1,449 +0,0 @@
-// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-// +build arm,darwin
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timeval32 [0]byte
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint32
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
deleted file mode 100644
index 85d56eabd..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ /dev/null
@@ -1,457 +0,0 @@
-// +build arm64,darwin
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval32 struct {
- Sec int32
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Pad_cgo_0 [4]byte
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
- Pad_cgo_0 [4]byte
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint64
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Pad_cgo_0 [8]byte
- Pad_cgo_1 [8]byte
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval32
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval32
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint64
- Oflag uint64
- Cflag uint64
- Lflag uint64
- Cc [20]uint8
- Pad_cgo_0 [4]byte
- Ispeed uint64
- Ospeed uint64
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
deleted file mode 100644
index 8a6f4e1ce..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ /dev/null
@@ -1,443 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_dragonfly.go
-
-// +build amd64,dragonfly
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Ino uint64
- Nlink uint32
- Dev uint32
- Mode uint16
- Padding1 uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare1 int64
- Qspare2 int64
-}
-
-type Statfs_t struct {
- Spare2 int64
- Bsize int64
- Iosize int64
- Blocks int64
- Bfree int64
- Bavail int64
- Files int64
- Ffree int64
- Fsid Fsid
- Owner uint32
- Type int32
- Flags int32
- Pad_cgo_0 [4]byte
- Syncwrites int64
- Asyncwrites int64
- Fstypename [16]int8
- Mntonname [80]int8
- Syncreads int64
- Asyncreads int64
- Spares1 int16
- Mntfromname [80]int8
- Spares2 int16
- Pad_cgo_1 [4]byte
- Spare [2]int64
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Namlen uint16
- Type uint8
- Unused1 uint8
- Unused2 uint32
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [16]uint64
-}
-
-const (
- SizeofIfMsghdr = 0xb0
- SizeofIfData = 0xa0
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x98
- SizeofRtMetrics = 0x70
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Pad_cgo_0 [2]byte
- Mtu uint64
- Metric uint64
- Link_state uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Unused uint64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint64
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Pksent uint64
- Expire uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Recvpipe uint64
- Hopcount uint64
- Mssopt uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Msl uint64
- Iwmaxsegs uint64
- Iwcapsegs uint64
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
deleted file mode 100644
index 8cf30947b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ /dev/null
@@ -1,502 +0,0 @@
-// +build 386,freebsd
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
- Pad_cgo_0 [8]byte
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
-}
-
-type Dirent struct {
- Fileno uint32
- Reclen uint16
- Type uint8
- Namlen uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [32]uint32
-}
-
-const (
- sizeofIfMsghdr = 0x64
- SizeofIfMsghdr = 0x60
- sizeofIfData = 0x54
- SizeofIfData = 0x50
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint64
- Epoch int32
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint32
- Epoch int32
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Weight uint32
- Filler [3]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0xc
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
deleted file mode 100644
index e5feb207b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ /dev/null
@@ -1,505 +0,0 @@
-// +build amd64,freebsd
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
- Pad_cgo_0 [4]byte
-}
-
-type Dirent struct {
- Fileno uint32
- Reclen uint16
- Type uint8
- Namlen uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [16]uint64
-}
-
-const (
- sizeofIfMsghdr = 0xa8
- SizeofIfMsghdr = 0xa8
- sizeofIfData = 0x98
- SizeofIfData = 0x98
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x98
- SizeofRtMetrics = 0x70
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint64
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Expire uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Pksent uint64
- Weight uint64
- Filler [3]uint64
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0x18
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
deleted file mode 100644
index 5472b5428..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ /dev/null
@@ -1,497 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_freebsd.go
-
-// +build arm,freebsd
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
- Pad_cgo_0 [4]byte
-}
-
-type Dirent struct {
- Fileno uint32
- Reclen uint16
- Type uint8
- Namlen uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [32]uint32
-}
-
-const (
- sizeofIfMsghdr = 0x70
- SizeofIfMsghdr = 0x70
- sizeofIfData = 0x60
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint32
- Pad_cgo_0 [4]byte
- Epoch int64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Weight uint32
- Filler [3]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0xc
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
deleted file mode 100644
index f3ddf5345..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ /dev/null
@@ -1,627 +0,0 @@
-// +build 386,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timex struct {
- Modes uint32
- Offset int32
- Freq int32
- Maxerror int32
- Esterror int32
- Status int32
- Constant int32
- Precision int32
- Tolerance int32
- Time Timeval
- Tick int32
- Ppsfreq int32
- Jitter int32
- Shift int32
- Stabil int32
- Jitcnt int32
- Calcnt int32
- Errcnt int32
- Stbcnt int32
- Tai int32
- Pad_cgo_0 [44]byte
-}
-
-type Time_t int32
-
-type Tms struct {
- Utime int32
- Stime int32
- Cutime int32
- Cstime int32
-}
-
-type Utimbuf struct {
- Actime int32
- Modtime int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- X__pad1 uint16
- Pad_cgo_0 [2]byte
- X__st_ino uint32
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad2 uint16
- Pad_cgo_1 [2]byte
- Size int64
- Blksize int32
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Ino uint64
-}
-
-type Statfs_t struct {
- Type int32
- Bsize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int32
- Frsize int32
- Flags int32
- Spare [4]int32
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [1]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Start int64
- Len int64
- Pid int32
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]int8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Ebx int32
- Ecx int32
- Edx int32
- Esi int32
- Edi int32
- Ebp int32
- Eax int32
- Xds int32
- Xes int32
- Xfs int32
- Xgs int32
- Orig_eax int32
- Eip int32
- Xcs int32
- Eflags int32
- Esp int32
- Xss int32
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-type Sysinfo_t struct {
- Uptime int32
- Loads [3]uint32
- Totalram uint32
- Freeram uint32
- Sharedram uint32
- Bufferram uint32
- Totalswap uint32
- Freeswap uint32
- Procs uint16
- Pad uint16
- Totalhigh uint32
- Freehigh uint32
- Unit uint32
- X_f [8]int8
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Tinode uint32
- Fname [6]int8
- Fpack [6]int8
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
deleted file mode 100644
index a923bef35..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ /dev/null
@@ -1,645 +0,0 @@
-// +build amd64,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- Uid uint32
- Gid uint32
- X__pad0 int32
- Rdev uint64
- Size int64
- Blksize int64
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__unused [3]int64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]int8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- R15 uint64
- R14 uint64
- R13 uint64
- R12 uint64
- Rbp uint64
- Rbx uint64
- R11 uint64
- R10 uint64
- R9 uint64
- R8 uint64
- Rax uint64
- Rcx uint64
- Rdx uint64
- Rsi uint64
- Rdi uint64
- Orig_rax uint64
- Rip uint64
- Cs uint64
- Eflags uint64
- Rsp uint64
- Ss uint64
- Fs_base uint64
- Gs_base uint64
- Ds uint64
- Es uint64
- Fs uint64
- Gs uint64
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]int8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
deleted file mode 100644
index 35f11bd1b..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ /dev/null
@@ -1,616 +0,0 @@
-// +build arm,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go | go run mkpost.go
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timex struct {
- Modes uint32
- Offset int32
- Freq int32
- Maxerror int32
- Esterror int32
- Status int32
- Constant int32
- Precision int32
- Tolerance int32
- Time Timeval
- Tick int32
- Ppsfreq int32
- Jitter int32
- Shift int32
- Stabil int32
- Jitcnt int32
- Calcnt int32
- Errcnt int32
- Stbcnt int32
- Tai int32
- Pad_cgo_0 [44]byte
-}
-
-type Time_t int32
-
-type Tms struct {
- Utime int32
- Stime int32
- Cutime int32
- Cstime int32
-}
-
-type Utimbuf struct {
- Actime int32
- Modtime int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- X__pad1 uint16
- Pad_cgo_0 [2]byte
- X__st_ino uint32
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad2 uint16
- Pad_cgo_1 [6]byte
- Size int64
- Blksize int32
- Pad_cgo_2 [4]byte
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Ino uint64
-}
-
-type Statfs_t struct {
- Type int32
- Bsize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int32
- Frsize int32
- Flags int32
- Spare [4]int32
- Pad_cgo_0 [4]byte
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]uint8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]uint8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]uint8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Uregs [18]uint32
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-type Sysinfo_t struct {
- Uptime int32
- Loads [3]uint32
- Totalram uint32
- Freeram uint32
- Sharedram uint32
- Bufferram uint32
- Totalswap uint32
- Freeswap uint32
- Procs uint16
- Pad uint16
- Totalhigh uint32
- Freehigh uint32
- Unit uint32
- X_f [8]uint8
-}
-
-type Utsname struct {
- Sysname [65]uint8
- Nodename [65]uint8
- Release [65]uint8
- Version [65]uint8
- Machine [65]uint8
- Domainname [65]uint8
-}
-
-type Ustat_t struct {
- Tfree int32
- Tinode uint32
- Fname [6]uint8
- Fpack [6]uint8
-}
-
-type EpollEvent struct {
- Events uint32
- PadFd int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
deleted file mode 100644
index e786addf7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ /dev/null
@@ -1,624 +0,0 @@
-// +build arm64,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad1 uint64
- Size int64
- Blksize int32
- X__pad2 int32
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__glibc_reserved [2]int32
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x22
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]int8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Regs [31]uint64
- Sp uint64
- Pc uint64
- Pstate uint64
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]int8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- PadFd int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
deleted file mode 100644
index b29894deb..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ /dev/null
@@ -1,627 +0,0 @@
-// +build mips64,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint32
- Pad1 [3]int32
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- Pad2 [3]uint32
- Size int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Blksize uint32
- Pad4 uint32
- Blocks int64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Frsize int64
- Blocks uint64
- Bfree uint64
- Files uint64
- Ffree uint64
- Bavail uint64
- Fsid Fsid
- Namelen int64
- Flags int64
- Spare [5]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x27
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Regs [102]uint64
- U_tsize uint64
- U_dsize uint64
- U_ssize uint64
- Start_code uint64
- Start_data uint64
- Start_stack uint64
- Signal int64
- U_ar0 uint64
- Magic uint64
- U_comm [32]int8
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]int8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [32]uint8
- Pad_cgo_0 [3]byte
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
deleted file mode 100644
index d9af71b69..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ /dev/null
@@ -1,627 +0,0 @@
-// +build mips64le,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint32
- Pad1 [3]int32
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- Pad2 [3]uint32
- Size int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Blksize uint32
- Pad4 uint32
- Blocks int64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Frsize int64
- Blocks uint64
- Bfree uint64
- Files uint64
- Ffree uint64
- Bavail uint64
- Fsid Fsid
- Namelen int64
- Flags int64
- Spare [5]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x27
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Regs [102]uint64
- U_tsize uint64
- U_dsize uint64
- U_ssize uint64
- Start_code uint64
- Start_data uint64
- Start_stack uint64
- Signal int64
- U_ar0 uint64
- Magic uint64
- U_comm [32]int8
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]int8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [32]uint8
- Pad_cgo_0 [3]byte
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
deleted file mode 100644
index 4218170a9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ /dev/null
@@ -1,634 +0,0 @@
-// +build ppc64,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- Uid uint32
- Gid uint32
- X__pad2 int32
- Rdev uint64
- Size int64
- Blksize int64
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__glibc_reserved4 uint64
- X__glibc_reserved5 uint64
- X__glibc_reserved6 uint64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]uint8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]uint8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]uint8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x23
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Gpr [32]uint64
- Nip uint64
- Msr uint64
- Orig_gpr3 uint64
- Ctr uint64
- Link uint64
- Xer uint64
- Ccr uint64
- Softe uint64
- Trap uint64
- Dar uint64
- Dsisr uint64
- Result uint64
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]uint8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]uint8
- Nodename [65]uint8
- Release [65]uint8
- Version [65]uint8
- Machine [65]uint8
- Domainname [65]uint8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]uint8
- Fpack [6]uint8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- X_padFd int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [19]uint8
- Line uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
deleted file mode 100644
index 7db4c78c6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ /dev/null
@@ -1,634 +0,0 @@
-// +build ppc64le,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- Uid uint32
- Gid uint32
- X__pad2 int32
- Rdev uint64
- Size int64
- Blksize int64
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__glibc_reserved4 uint64
- X__glibc_reserved5 uint64
- X__glibc_reserved6 uint64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]uint8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]uint8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]uint8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x22
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Gpr [32]uint64
- Nip uint64
- Msr uint64
- Orig_gpr3 uint64
- Ctr uint64
- Link uint64
- Xer uint64
- Ccr uint64
- Softe uint64
- Trap uint64
- Dar uint64
- Dsisr uint64
- Result uint64
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]uint8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]uint8
- Nodename [65]uint8
- Release [65]uint8
- Version [65]uint8
- Machine [65]uint8
- Domainname [65]uint8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]uint8
- Fpack [6]uint8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- X_padFd int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [19]uint8
- Line uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
deleted file mode 100644
index 76ee57cbf..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ /dev/null
@@ -1,649 +0,0 @@
-// +build s390x,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_linux.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- _ [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- _ [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- _ [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- _ [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- Uid uint32
- Gid uint32
- _ int32
- Rdev uint64
- Size int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Blksize int64
- Blocks int64
- _ [3]int64
-}
-
-type Statfs_t struct {
- Type uint32
- Bsize uint32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen uint32
- Frsize uint32
- Flags uint32
- Spare [4]uint32
- _ [4]byte
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- _ [5]byte
-}
-
-type Fsid struct {
- _ [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- _ [4]byte
- Start int64
- Len int64
- Pid int32
- _ [4]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x6
- FADV_NOREUSE = 0x7
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- _ [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- _ [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- _ [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x27
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- _ [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Psw PtracePsw
- Gprs [16]uint64
- Acrs [16]uint32
- Orig_gpr2 uint64
- Fp_regs PtraceFpregs
- Per_info PtracePer
- Ieee_instruction_pointer uint64
-}
-
-type PtracePsw struct {
- Mask uint64
- Addr uint64
-}
-
-type PtraceFpregs struct {
- Fpc uint32
- _ [4]byte
- Fprs [16]float64
-}
-
-type PtracePer struct {
- _ [0]uint64
- _ [24]byte
- _ [8]byte
- Starting_addr uint64
- Ending_addr uint64
- Perc_atmid uint16
- _ [6]byte
- Address uint64
- Access_id uint8
- _ [7]byte
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- _ [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- _ [0]int8
- _ [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- _ [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- _ [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- _ int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
deleted file mode 100644
index 7d18b704a..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ /dev/null
@@ -1,640 +0,0 @@
-// +build sparc64,linux
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go | go run mkpost.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- X__pad1 uint16
- Pad_cgo_0 [6]byte
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad2 uint16
- Pad_cgo_1 [6]byte
- Size int64
- Blksize int64
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__glibc_reserved4 uint64
- X__glibc_reserved5 uint64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- X__glibc_reserved int16
- Pad_cgo_1 [2]byte
-}
-
-const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
-)
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x2a
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Regs [16]uint64
- Tstate uint64
- Tpc uint64
- Tnpc uint64
- Y uint32
- Magic uint32
-}
-
-type ptracePsw struct {
-}
-
-type ptraceFpregs struct {
-}
-
-type ptracePer struct {
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]int8
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- X_padFd int32
- Fd int32
- Pad int32
-}
-
-const (
- AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x200
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
- POLLRDHUP = 0x800
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
-)
-
-type Sigset_t struct {
- X__val [16]uint64
-}
-
-const _SC_PAGESIZE = 0x1e
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [19]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
deleted file mode 100644
index caf755fb8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ /dev/null
@@ -1,396 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_netbsd.go
-
-// +build 386,netbsd
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter uint32
- Flags uint32
- Fflags uint32
- Data int64
- Udata int32
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x84
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
- Pad_cgo_1 [4]byte
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Lastchange Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfTimeval struct {
- Sec int32
- Usec int32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
deleted file mode 100644
index 91b4a5305..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ /dev/null
@@ -1,403 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_netbsd.go
-
-// +build amd64,netbsd
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Pad_cgo_0 [4]byte
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Pad_cgo_1 [4]byte
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
- Pad_cgo_2 [4]byte
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter uint32
- Flags uint32
- Fflags uint32
- Pad_cgo_0 [4]byte
- Data int64
- Udata int64
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x88
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Lastchange Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type BpfTimeval struct {
- Sec int64
- Usec int64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
deleted file mode 100644
index c0758f9d3..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ /dev/null
@@ -1,401 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_netbsd.go
-
-// +build arm,netbsd
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Pad_cgo_0 [4]byte
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Pad_cgo_1 [4]byte
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
- Pad_cgo_2 [4]byte
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter uint32
- Flags uint32
- Fflags uint32
- Data int64
- Udata int32
- Pad_cgo_0 [4]byte
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x88
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Lastchange Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfTimeval struct {
- Sec int32
- Usec int32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
deleted file mode 100644
index 860a46979..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ /dev/null
@@ -1,441 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_openbsd.go
-
-// +build 386,openbsd
-
-package unix
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Mode uint32
- Dev int32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- X__st_birthtim Timespec
-}
-
-type Statfs_t struct {
- F_flags uint32
- F_bsize uint32
- F_iosize uint32
- F_blocks uint64
- F_bfree uint64
- F_bavail int64
- F_files uint64
- F_ffree uint64
- F_favail int64
- F_syncwrites uint64
- F_syncreads uint64
- F_asyncwrites uint64
- F_asyncreads uint64
- F_fsid Fsid
- F_namemax uint32
- F_owner uint32
- F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
- Pad_cgo_0 [2]byte
- Mount_info [160]byte
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Off int64
- Reclen uint16
- Type uint8
- Namlen uint8
- X__d_padding [4]uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [24]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x20
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]uint32
-}
-
-const (
- SizeofIfMsghdr = 0xec
- SizeofIfData = 0xd4
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x1a
- SizeofRtMsghdr = 0x60
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Xflags int32
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Mtu uint32
- Metric uint32
- Pad uint32
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Capabilities uint32
- Lastchange Timeval
- Mclpool [7]Mclpool
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Metric int32
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- What uint16
- Name [16]int8
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Priority uint8
- Mpls uint8
- Addrs int32
- Flags int32
- Fmask int32
- Pid int32
- Seq int32
- Errno int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Pksent uint64
- Expire int64
- Locks uint32
- Mtu uint32
- Refcnt uint32
- Hopcount uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pad uint32
-}
-
-type Mclpool struct {
- Grown int32
- Alive uint16
- Hwm uint16
- Cwm uint16
- Lwm uint16
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfTimeval struct {
- Sec uint32
- Usec uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
deleted file mode 100644
index 23c52727f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ /dev/null
@@ -1,448 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_openbsd.go
-
-// +build amd64,openbsd
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Mode uint32
- Dev int32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Pad_cgo_0 [4]byte
- X__st_birthtim Timespec
-}
-
-type Statfs_t struct {
- F_flags uint32
- F_bsize uint32
- F_iosize uint32
- Pad_cgo_0 [4]byte
- F_blocks uint64
- F_bfree uint64
- F_bavail int64
- F_files uint64
- F_ffree uint64
- F_favail int64
- F_syncwrites uint64
- F_syncreads uint64
- F_asyncwrites uint64
- F_asyncreads uint64
- F_fsid Fsid
- F_namemax uint32
- F_owner uint32
- F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
- Pad_cgo_1 [2]byte
- Mount_info [160]byte
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Off int64
- Reclen uint16
- Type uint8
- Namlen uint8
- X__d_padding [4]uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [24]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x20
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]uint32
-}
-
-const (
- SizeofIfMsghdr = 0xf8
- SizeofIfData = 0xe0
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x1a
- SizeofRtMsghdr = 0x60
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Xflags int32
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Mtu uint32
- Metric uint32
- Pad uint32
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Capabilities uint32
- Pad_cgo_0 [4]byte
- Lastchange Timeval
- Mclpool [7]Mclpool
- Pad_cgo_1 [4]byte
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Metric int32
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- What uint16
- Name [16]int8
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Priority uint8
- Mpls uint8
- Addrs int32
- Flags int32
- Fmask int32
- Pid int32
- Seq int32
- Errno int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Pksent uint64
- Expire int64
- Locks uint32
- Mtu uint32
- Refcnt uint32
- Hopcount uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pad uint32
-}
-
-type Mclpool struct {
- Grown int32
- Alive uint16
- Hwm uint16
- Cwm uint16
- Lwm uint16
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfTimeval struct {
- Sec uint32
- Usec uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
deleted file mode 100644
index 02777e4d8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ /dev/null
@@ -1,423 +0,0 @@
-// +build amd64,solaris
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_solaris.go | go run mkpost.go
-
-package unix
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x400
- MaxHostNameLen = 0x100
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timeval32 struct {
- Sec int32
- Usec int32
-}
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- Size int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Blksize int32
- Pad_cgo_0 [4]byte
- Blocks int64
- Fstype [16]int8
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Sysid int32
- Pid int32
- Pad [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Name [1]int8
- Pad_cgo_0 [5]byte
-}
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [236]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *int8
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Accrights *int8
- Accrightslen int32
- Pad_cgo_2 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- X__icmp6_filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x20
- SizeofSockaddrAny = 0xfc
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrDatalink = 0xfc
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x24
- SizeofICMPv6Filter = 0x20
-)
-
-type FdSet struct {
- Bits [1024]int64
-}
-
-type Utsname struct {
- Sysname [257]int8
- Nodename [257]int8
- Release [257]int8
- Version [257]int8
- Machine [257]int8
-}
-
-type Ustat_t struct {
- Tfree int64
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_0 [4]byte
-}
-
-const (
- AT_FDCWD = 0xffd19553
- AT_SYMLINK_NOFOLLOW = 0x1000
- AT_SYMLINK_FOLLOW = 0x2000
- AT_REMOVEDIR = 0x1
- AT_EACCESS = 0x4
-)
-
-const (
- SizeofIfMsghdr = 0x54
- SizeofIfData = 0x44
- SizeofIfaMsghdr = 0x14
- SizeofRtMsghdr = 0x4c
- SizeofRtMetrics = 0x28
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Lastchange Timeval32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfTimeval struct {
- Sec int32
- Usec int32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-const _SC_PAGESIZE = 0xb
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [19]uint8
- Pad_cgo_0 [1]byte
-}
-
-type Termio struct {
- Iflag uint16
- Oflag uint16
- Cflag uint16
- Lflag uint16
- Line int8
- Cc [8]uint8
- Pad_cgo_0 [1]byte
-}
-
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json
deleted file mode 100644
index cc56af3f9..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "comment": "",
- "ignore": "test",
- "package": [
- {
- "checksumSHA1": "gNO0JNpLzYOdInGeq7HqMZUzx9M=",
- "path": "github.com/armon/go-radix",
- "revision": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2",
- "revisionTime": "2016-01-15T23:47:25Z"
- },
- {
- "checksumSHA1": "Isa9x3nvIJ12hvgdvUUBty+yplU=",
- "path": "github.com/bgentry/speakeasy",
- "revision": "675b82c74c0ed12283ee81ba8a534c8982c07b85",
- "revisionTime": "2016-10-13T10:26:35Z"
- },
- {
- "checksumSHA1": "cdOCt0Yb+hdErz8NAQqayxPmRsY=",
- "path": "github.com/hashicorp/errwrap",
- "revision": "7554cd9344cec97297fa6649b055a8c98c2a1e55",
- "revisionTime": "2014-10-28T05:47:10Z"
- },
- {
- "checksumSHA1": "xZuhljnmBysJPta/lMyYmJdujCg=",
- "path": "github.com/mattn/go-isatty",
- "revision": "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8",
- "revisionTime": "2016-08-06T12:27:52Z"
- },
- {
- "checksumSHA1": "UP+pXl+ic9y6qrpZA5MqDIAuGfw=",
- "path": "github.com/mitchellh/cli",
- "revision": "ee8578a9c12a5bb9d55303b9665cc448772c81b8",
- "revisionTime": "2017-03-28T05:23:52Z"
- },
- {
- "checksumSHA1": "L3leymg2RT8hFl5uL+5KP/LpBkg=",
- "path": "github.com/mitchellh/go-wordwrap",
- "revision": "ad45545899c7b13c020ea92b2072220eefad42b8",
- "revisionTime": "2015-03-14T17:03:34Z"
- },
- {
- "checksumSHA1": "ZOhewV1DsQjTYlx8a+ifrZki2Vg=",
- "path": "github.com/ryanuber/columnize",
- "revision": "e85e216cf3d2864d0db8946e973e6fcd881373a3",
- "revisionTime": "2017-02-08T07:23:47Z"
- },
- {
- "checksumSHA1": "aVgPDgwY3/t4J/JOw9H3FVMHqh0=",
- "path": "golang.org/x/sys/unix",
- "revision": "c200b10b5d5e122be351b67af224adc6128af5bf",
- "revisionTime": "2016-10-22T18:22:21Z"
- }
- ],
- "rootPath": "github.com/hashicorp/go-sockaddr/cmd/sockaddr"
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/version.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/version.go
deleted file mode 100644
index 10da3e698..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/version.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "fmt"
- "strings"
-)
-
-// The git commit that was compiled. This will be filled in by the compiler.
-var (
- GitCommit string
- GitDescribe string
-)
-
-// The main version number that is being run at the moment.
-const Version = "0.2.0"
-
-// A pre-release marker for the version. If this is "" (empty string)
-// then it means that it is a final release. Otherwise, this is a pre-release
-// such as "dev" (in development), "beta", "rc1", etc.
-const VersionPrerelease = "dev"
-
-// GetHumanVersion composes the parts of the version in a way that's suitable
-// for displaying to humans.
-func GetHumanVersion() string {
- version := Version
- if GitDescribe != "" {
- version = GitDescribe
- }
-
- release := VersionPrerelease
- if GitDescribe == "" && release == "" {
- release = "dev"
- }
- if release != "" {
- version += fmt.Sprintf("-%s", release)
- if GitCommit != "" {
- version += fmt.Sprintf(" (%s)", GitCommit)
- }
- }
-
- // Strip off any single quotes added by the git information.
- return strings.Replace(version, "'", "", -1)
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ifaddr_test.go b/vendor/github.com/hashicorp/go-sockaddr/ifaddr_test.go
deleted file mode 100644
index 45a0cc788..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ifaddr_test.go
+++ /dev/null
@@ -1,594 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "net"
- "os"
- "strings"
- "testing"
-
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-func boolEnvVar(envvar string, emptyDefault bool) bool {
- v := os.Getenv(envvar)
- switch strings.ToLower(v) {
- case "":
- return emptyDefault
- case "0", "f", "n":
- return false
- case "1", "t", "y":
- return true
- default:
- fmt.Fprintf(os.Stderr, "Unsupported %s flag %q", envvar, v)
- return true
- }
-}
-
-// havePrivateIP is a helper function that returns true when we believe we
-// should have a private IP address. This changes the failure mode of various
-// tests that expect a private IP address.
-//
-// When you have a private IP assigned to the host, set the environment variable
-// SOCKADDR_HAVE_PRIVATE_IP=1
-func havePrivateIP() bool {
- return boolEnvVar("SOCKADDR_HAVE_PRIVATE_IP", true)
-}
-
-// havePublicIP is a helper function that returns true when we believe we should
-// have a public IP address. This changes the failure mode of various tests
-// that expect a public IP address.
-//
-// When you have a public IP assigned to the host, set the environment variable
-// SOCKADDR_HAVE_PUBLIC_IP=1
-func havePublicIP() bool {
- return boolEnvVar("SOCKADDR_HAVE_PUBLIC_IP", false)
-}
-
-func TestGetPrivateIP(t *testing.T) {
- reportOnPrivate := func(args ...interface{}) {
- if havePrivateIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
- ip, err := sockaddr.GetPrivateIP()
- if err != nil {
- reportOnPrivate("unable to get a private IP: %v", err)
- }
-
- if ip == "" {
- reportOnPrivate("it's hard to test this reliably")
- }
-}
-
-func TestGetPrivateIPs(t *testing.T) {
- reportOnPrivate := func(args ...interface{}) {
- if havePrivateIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
- ips, err := sockaddr.GetPrivateIPs()
- if err != nil {
- reportOnPrivate("unable to get a private IPs: %v", err)
- }
-
- if ips == "" {
- reportOnPrivate("it's hard to test this reliably")
- }
-}
-
-func TestGetPublicIP(t *testing.T) {
- reportOnPublic := func(args ...interface{}) {
- if havePublicIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
- ip, err := sockaddr.GetPublicIP()
- if err != nil {
- reportOnPublic("unable to get a public IP: %v", err)
- }
-
- if ip == "" {
- reportOnPublic("it's hard to test this reliably")
- }
-}
-
-func TestGetPublicIPs(t *testing.T) {
- reportOnPublic := func(args ...interface{}) {
- if havePublicIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
- ips, err := sockaddr.GetPublicIPs()
- if err != nil {
- reportOnPublic("unable to get a public IPs: %v", err)
- }
-
- if ips == "" {
- reportOnPublic("it's hard to test this reliably")
- }
-}
-
-func TestGetInterfaceIP(t *testing.T) {
- ip, err := sockaddr.GetInterfaceIP(`^.*[\d]$`)
- if err != nil {
- t.Fatalf("regexp failed: %v", err)
- }
-
- if ip == "" {
- t.Skip("it's hard to test this reliably")
- }
-}
-
-func TestIfAddrAttr(t *testing.T) {
- tests := []struct {
- name string
- ifAddr sockaddr.IfAddr
- attr string
- expected string
- }{
- {
- name: "name",
- ifAddr: sockaddr.IfAddr{
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- attr: "name",
- expected: "abc0",
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- result, err := sockaddr.IfAttr(test.attr, test.ifAddr)
- if err != nil {
- t.Errorf("failed to get attr %q from %v", test.name, test.ifAddr)
- }
-
- if result != test.expected {
- t.Errorf("unexpected result")
- }
- }
-}
-
-func TestIfAddrMath(t *testing.T) {
- tests := []struct {
- name string
- ifAddr sockaddr.IfAddr
- operation string
- value string
- expected string
- wantFail bool
- }{
- {
- name: "ipv4 address +2",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: "+2",
- expected: "127.0.0.3/8",
- },
- {
- name: "ipv4 address -2",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: "-2",
- expected: "126.255.255.255/8",
- },
- {
- name: "ipv4 address + overflow 0xff00ff03",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: fmt.Sprintf("+%d", 0xff00ff03),
- expected: "126.0.255.4/8",
- },
- {
- name: "ipv4 address - underflow 0xff00ff04",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: fmt.Sprintf("-%d", 0xff00ff04),
- expected: "127.255.0.253/8",
- },
- {
- name: "ipv6 address +2",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "address",
- value: "+2",
- expected: "::3",
- },
- {
- name: "ipv6 address -3",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::4/128"),
- },
- operation: "address",
- value: "-3",
- expected: "::1",
- },
- {
- name: "ipv6 address + overflow",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128"),
- },
- operation: "address",
- value: fmt.Sprintf("+%d", 0x03),
- expected: "::2",
- },
- {
- name: "ipv6 address + underflow",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "address",
- value: fmt.Sprintf("-%d", 0x03),
- expected: "ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffe",
- },
- {
- name: "ipv4 network +2",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: "+2",
- expected: "127.0.0.2/8",
- },
- {
- name: "ipv4 network -2",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: "-2",
- expected: "127.255.255.254/8",
- },
- {
- // Value exceeds /8
- name: "ipv4 network + overflow 0xff00ff03",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: fmt.Sprintf("+%d", 0xff00ff03),
- expected: "127.0.255.3/8",
- },
- {
- // Value exceeds /8
- name: "ipv4 network - underflow+wrap 0xff00ff04",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: fmt.Sprintf("-%d", 0xff00ff04),
- expected: "127.255.0.252/8",
- },
- {
- name: "ipv6 network +6",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("fe80::1/64"),
- },
- operation: "network",
- value: "+6",
- expected: "fe80::6/64",
- },
- {
- name: "ipv6 network -6",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("fe80::ff/64"),
- },
- operation: "network",
- value: "-6",
- expected: "fe80::ffff:ffff:ffff:fffa/64",
- },
- {
- // Value exceeds /104 mask
- name: "ipv6 network + overflow 0xff00ff03",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("fe80::1/104"),
- },
- operation: "network",
- value: fmt.Sprintf("+%d", 0xff00ff03),
- expected: "fe80::ff03/104",
- },
- {
- // Value exceeds /104
- name: "ipv6 network - underflow+wrap 0xff00ff04",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("fe80::1/104"),
- },
- operation: "network",
- value: fmt.Sprintf("-%d", 0xff00ff04),
- expected: "fe80::ff:fc/104",
- },
- {
- name: "ipv4 address missing sign",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: "123",
- wantFail: true,
- },
- {
- name: "ipv4 network missing sign",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: "123",
- wantFail: true,
- },
- {
- name: "ipv6 address missing sign",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "address",
- value: "123",
- wantFail: true,
- },
- {
- name: "ipv6 network missing sign",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "network",
- value: "123",
- wantFail: true,
- },
- {
- name: "ipv4 address bad value",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "address",
- value: "+xyz",
- wantFail: true,
- },
- {
- name: "ipv4 network bad value",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "network",
- value: "-xyz",
- wantFail: true,
- },
- {
- name: "ipv6 address bad value",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "address",
- value: "+xyz",
- wantFail: true,
- },
- {
- name: "ipv6 network bad value",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "network",
- value: "-xyz",
- wantFail: true,
- },
- {
- name: "ipv4 bad operation",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "gooz",
- value: "+xyz",
- wantFail: true,
- },
- {
- name: "ipv6 bad operation",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "frabba",
- value: "+xyz",
- wantFail: true,
- },
- {
- name: "ipv4 mask operand equals input ipv4 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.20.30.40/8"),
- },
- operation: "mask",
- value: "8",
- expected: "10.0.0.0/8",
- },
- {
- name: "ipv4 mask operand larger than input ipv4 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("192.168.10.20/24"),
- },
- operation: "mask",
- value: "16",
- expected: "192.168.0.0/16",
- },
- {
- name: "ipv4 host upper bound mask operand larger than input ipv4 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("192.168.255.255/24"),
- },
- operation: "mask",
- value: "16",
- expected: "192.168.0.0/16",
- },
- {
- name: "ipv4 mask operand smaller than ipv4 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.20.30.40/8"),
- },
- operation: "mask",
- value: "16",
- expected: "10.20.0.0/8",
- },
- {
- name: "ipv4 host upper bound mask operand smaller than input ipv4 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.20.255.255/8"),
- },
- operation: "mask",
- value: "16",
- expected: "10.20.0.0/8",
- },
- {
- name: "ipv4 mask bad value upper bound",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "mask",
- value: "33",
- wantFail: true,
- },
- {
- name: "ipv4 mask bad value lower bound",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1/8"),
- },
- operation: "mask",
- value: "-1",
- wantFail: true,
- },
- {
- name: "ipv6 mask operand equals input ipv6 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("2001:0db8:85a3::8a2e:0370:7334/64"),
- },
- operation: "mask",
- value: "64",
- expected: "2001:db8:85a3::/64",
- },
- {
- name: "ipv6 mask operand larger than input ipv6 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("2001:0db8:85a3::8a2e:0370:7334/64"),
- },
- operation: "mask",
- value: "32",
- expected: "2001:db8::/32",
- },
- {
- name: "ipv6 mask operand smaller than input ipv6 subnet mask",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("2001:0db8:85a3::8a2e:0370:7334/64"),
- },
- operation: "mask",
- value: "96",
- expected: "2001:db8:85a3::8a2e:0:0/64",
- },
- {
- name: "ipv6 mask bad value upper bound",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "mask",
- value: "129",
- wantFail: true,
- },
- {
- name: "ipv6 mask bad value lower bound",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- operation: "mask",
- value: "-1",
- wantFail: true,
- },
- {
- name: "unix unsupported operation",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustUnixSock("/tmp/bar"),
- },
- operation: "address",
- value: "+123",
- wantFail: true,
- },
- {
- name: "unix unsupported operation",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustUnixSock("/tmp/foo"),
- },
- operation: "network",
- value: "+123",
- wantFail: true,
- },
- {
- name: "unix unsupported operation",
- ifAddr: sockaddr.IfAddr{
- SockAddr: sockaddr.MustUnixSock("/tmp/foo"),
- },
- operation: "mask",
- value: "8",
- wantFail: true,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- results, err := sockaddr.IfAddrsMath(test.operation, test.value, sockaddr.IfAddrs{test.ifAddr})
- if test.wantFail {
- if err != nil {
- continue
- } else {
- t.Fatalf("%s: failed to fail math operation %q with value %q on %v", test.name, test.operation, test.value, test.ifAddr)
- }
- } else if err != nil {
- t.Fatalf("%s: failed to compute math operation %q with value %q on %v", test.name, test.operation, test.value, test.ifAddr)
- }
- if len(results) != 1 {
- t.Fatalf("%s: bad", test.name)
- }
-
- result := results[0]
-
- switch saType := result.Type(); saType {
- case sockaddr.TypeIPv4:
- ipv4 := sockaddr.ToIPv4Addr(result.SockAddr)
- if ipv4 == nil {
- t.Fatalf("bad: %T %+#v", result, result)
- }
-
- if got := ipv4.String(); got != test.expected {
- t.Errorf("unexpected result %q: want %q got %q", test.name, test.expected, got)
- }
- case sockaddr.TypeIPv6:
- ipv6 := sockaddr.ToIPv6Addr(result.SockAddr)
- if ipv6 == nil {
- t.Fatalf("bad: %T %+#v", result, result)
- }
-
- if got := ipv6.String(); got != test.expected {
- t.Errorf("unexpected result %q: want %q got %q", test.name, test.expected, got)
- }
- default:
- t.Fatalf("bad")
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go b/vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go
index 90b6576f2..2a706c34e 100644
--- a/vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go
+++ b/vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go
@@ -16,7 +16,7 @@ var (
// Centralize all regexps and regexp.Copy() where necessary.
signRE *regexp.Regexp = regexp.MustCompile(`^[\s]*[+-]`)
whitespaceRE *regexp.Regexp = regexp.MustCompile(`[\s]+`)
- ifNameRE *regexp.Regexp = regexp.MustCompile(`^Ethernet adapter ([^:]+):`)
+ ifNameRE *regexp.Regexp = regexp.MustCompile(`^(?:Ethernet|Wireless LAN) adapter ([^:]+):`)
ipAddrRE *regexp.Regexp = regexp.MustCompile(`^ IPv[46] Address\. \. \. \. \. \. \. \. \. \. \. : ([^\s]+)`)
)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ifaddrs_test.go b/vendor/github.com/hashicorp/go-sockaddr/ifaddrs_test.go
deleted file mode 100644
index aed847808..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ifaddrs_test.go
+++ /dev/null
@@ -1,1987 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "net"
- "reflect"
- "testing"
-
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-const (
- // NOTE(seanc@): Assume "en0" is the interface with a default route attached
- // to it. When this is not the case, change this one constant and tests
- // should pass (i.e. "net0").
- ifNameWithDefault = "en0"
-)
-
-// NOTE: A number of these code paths are exercised in template/ and
-// cmd/sockaddr/.
-//
-// TODO(sean@): Add better coverage for filtering functions (e.g. ExcludeBy*,
-// IncludeBy*).
-
-func TestCmpIfAddrFunc(t *testing.T) {
- tests := []struct {
- name string
- t1 sockaddr.IfAddr // must come before t2 according to the ascOp
- t2 sockaddr.IfAddr
- ascOp sockaddr.CmpIfAddrFunc
- ascResult int
- descOp sockaddr.CmpIfAddrFunc
- descResult int
- }{
- {
- name: "empty test",
- t1: sockaddr.IfAddr{},
- t2: sockaddr.IfAddr{},
- ascOp: sockaddr.AscIfAddress,
- descOp: sockaddr.DescIfAddress,
- ascResult: 0,
- descResult: 0,
- },
- {
- name: "ipv4 address less",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- ascOp: sockaddr.AscIfAddress,
- descOp: sockaddr.DescIfAddress,
- ascResult: -1,
- descResult: -1,
- },
- {
- name: "ipv4 private",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.1.2.3"),
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("203.0.113.3"),
- },
- ascOp: sockaddr.AscIfPrivate,
- descOp: sockaddr.DescIfPrivate,
- ascResult: 0, // not both private, can't complete the test
- descResult: 0,
- },
- {
- name: "IfAddr name",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.1.2.3"),
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("203.0.113.3"),
- Interface: net.Interface{
- Name: "xyz0",
- },
- },
- ascOp: sockaddr.AscIfName,
- descOp: sockaddr.DescIfName,
- ascResult: -1,
- descResult: -1,
- },
- {
- name: "IfAddr network size",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.0.0.0/8"),
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.0/24"),
- },
- ascOp: sockaddr.AscIfNetworkSize,
- descOp: sockaddr.DescIfNetworkSize,
- ascResult: -1,
- descResult: -1,
- },
- {
- name: "IfAddr port",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.0.0.0:80"),
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.0:8600"),
- },
- ascOp: sockaddr.AscIfPort,
- descOp: sockaddr.DescIfPort,
- ascResult: -1,
- descResult: -1,
- },
- {
- name: "IfAddr type",
- t1: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.0.0.0:80"),
- },
- t2: sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("[::1]:80"),
- },
- ascOp: sockaddr.AscIfType,
- descOp: sockaddr.DescIfType,
- ascResult: -1,
- descResult: -1,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- // Test ascending operation
- ascExpected := test.ascResult
- ascResult := test.ascOp(&test.t1, &test.t2)
- if ascResult != ascExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, ascResult, ascExpected, test.t1, test.t2, test.ascOp)
- }
-
- // Test descending operation
- descExpected := test.descResult
- descResult := test.descOp(&test.t2, &test.t1)
- if descResult != descExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, descResult, descExpected, test.t1, test.t2, test.descOp)
- }
-
- if ascResult != descResult {
- t.Fatalf("bad")
- }
-
- // Reverse the args
- ascExpected = -1 * test.ascResult
- ascResult = test.ascOp(&test.t2, &test.t1)
- if ascResult != ascExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, ascResult, ascExpected, test.t1, test.t2, test.ascOp)
- }
-
- descExpected = -1 * test.descResult
- descResult = test.descOp(&test.t1, &test.t2)
- if descResult != descExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, descResult, descExpected, test.t1, test.t2, test.descOp)
- }
-
- if ascResult != descResult {
- t.Fatalf("bad")
- }
-
- // Test equality
- ascExpected = 0
- ascResult = test.ascOp(&test.t1, &test.t1)
- if ascResult != ascExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, ascResult, ascExpected, test.t1, test.t2, test.ascOp)
- }
-
- descExpected = 0
- descResult = test.descOp(&test.t1, &test.t1)
- if descResult != descExpected {
- t.Errorf("%s: Unexpected result %d, expected %d when comparing %v and %v using %v", test.name, descResult, descExpected, test.t1, test.t2, test.descOp)
- }
- }
-}
-
-func TestFilterIfByFlags(t *testing.T) {
- tests := []struct {
- name string
- selector string
- ifAddrs sockaddr.IfAddrs
- flags net.Flags
- fail bool
- }{
- {
- name: "broadcast",
- selector: "broadcast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagBroadcast,
- },
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.1"),
- },
- },
- },
- {
- name: "down",
- selector: "down",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.2"),
- },
- },
- },
- {
- name: "forwardable IPv4",
- selector: "forwardable",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- },
- },
- },
- {
- name: "forwardable IPv6",
- selector: "forwardable",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("cc::1/128"),
- },
- },
- },
- {
- name: "global unicast",
- selector: "global unicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("cc::2"),
- },
- },
- },
- {
- name: "interface-local multicast",
- selector: "interface-local multicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("ff01::2"),
- },
- },
- },
- {
- name: "link-local multicast",
- selector: "link-local multicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("ff02::3"),
- },
- },
- },
- {
- name: "link-local unicast IPv4",
- selector: "link-local unicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv4Addr("169.254.1.101"),
- },
- },
- },
- {
- name: "link-local unicast IPv6",
- selector: "link-local unicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("fe80::3"),
- },
- },
- },
- {
- name: "loopback ipv4",
- selector: "loopback",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagLoopback,
- },
- SockAddr: sockaddr.MustIPv4Addr("127.0.0.1"),
- },
- },
- },
- {
- name: "loopback ipv6",
- selector: "loopback",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagLoopback,
- },
- SockAddr: sockaddr.MustIPv6Addr("::1"),
- },
- },
- },
- {
- name: "multicast IPv4",
- selector: "multicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagMulticast,
- },
- SockAddr: sockaddr.MustIPv4Addr("224.0.0.1"),
- },
- },
- },
- {
- name: "multicast IPv6",
- selector: "multicast",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagMulticast,
- },
- SockAddr: sockaddr.MustIPv6Addr("ff05::3"),
- },
- },
- },
- {
- name: "point-to-point",
- selector: "point-to-point",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagPointToPoint,
- },
- SockAddr: sockaddr.MustIPv6Addr("cc::3"),
- },
- },
- },
- {
- name: "unspecified",
- selector: "unspecified",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("::"),
- },
- },
- },
- {
- name: "up",
- selector: "up",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagUp,
- },
- SockAddr: sockaddr.MustIPv6Addr("cc::3"),
- },
- },
- },
- {
- name: "invalid",
- selector: "foo",
- fail: true,
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{},
- SockAddr: sockaddr.MustIPv6Addr("cc::3"),
- },
- },
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- in, out, err := sockaddr.IfByFlag(test.selector, test.ifAddrs)
- if test.fail == true && err == nil {
- t.Fatalf("%s: expected failure", test.name)
- } else if test.fail == true && err != nil {
- return
- }
-
- if err != nil && test.fail != true {
- t.Fatalf("%s: failed: %v", test.name, err)
- }
- if ilen := len(in); ilen != 1 {
- t.Fatalf("%s: wrong in length %d, expected 1", test.name, ilen)
- }
- if olen := len(out); olen != 0 {
- t.Fatalf("%s: wrong in length %d, expected 0", test.name, olen)
- }
- })
- }
-}
-
-func TestIfByNetwork(t *testing.T) {
- tests := []struct {
- name string
- input sockaddr.IfAddrs
- selector string
- matched sockaddr.IfAddrs
- excluded sockaddr.IfAddrs
- fail bool
- }{
- {
- name: "exact match",
- input: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- },
- selector: "1.2.3.4",
- matched: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- },
- },
- {
- name: "exact match plural",
- input: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.0/24"),
- },
- },
- selector: "1.2.3.0/24",
- matched: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.0/24"),
- },
- },
- },
- {
- name: "split plural",
- input: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("12.2.3.0/24"),
- },
- },
- selector: "1.2.3.0/24",
- excluded: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("12.2.3.0/24"),
- },
- },
- matched: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- },
- },
- {
- name: "excluded plural",
- input: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("12.2.3.0/24"),
- },
- },
- selector: "10.0.0.0/8",
- excluded: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("12.2.3.0/24"),
- },
- },
- },
- {
- name: "invalid selector",
- input: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("12.2.3.0/24"),
- },
- },
- selector: "[:]",
- fail: true,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- matched, excluded, err := sockaddr.IfByNetwork(test.selector, test.input)
- if err != nil && !test.fail {
- t.Fatal("bad")
- } else if err == nil && test.fail {
- t.Fatal("bad")
- }
-
- if len(test.matched) != len(matched) {
- t.Fatal("bad")
- } else if len(test.excluded) != len(excluded) {
- t.Fatal("bad")
- }
-
- for i := 0; i < len(test.excluded); i++ {
- if !reflect.DeepEqual(test.excluded[i], excluded[i]) {
- t.Errorf("wrong excluded: %d %v %v", i, test.excluded[i], excluded[i])
- }
- }
-
- for i := 0; i < len(test.matched); i++ {
- if !reflect.DeepEqual(test.matched[i], matched[i]) {
- t.Errorf("wrong matched: %d %v %v", i, test.matched[i], matched[i])
- }
- }
- })
- }
-}
-
-func TestFilterIfByType(t *testing.T) {
- tests := []struct {
- name string
- ifAddrs sockaddr.IfAddrs
- ifAddrType sockaddr.SockAddrType
- matchedLen int
- remainingLen int
- }{
- {
- name: "include all",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("2.3.4.5"),
- },
- },
- ifAddrType: sockaddr.TypeIPv4,
- matchedLen: 2,
- remainingLen: 0,
- },
- {
- name: "include some",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1"),
- },
- },
- ifAddrType: sockaddr.TypeIPv4,
- matchedLen: 1,
- remainingLen: 1,
- },
- {
- name: "exclude all",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.5"),
- },
- },
- ifAddrType: sockaddr.TypeIPv6,
- matchedLen: 0,
- remainingLen: 2,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- in, out := sockaddr.FilterIfByType(test.ifAddrs, test.ifAddrType)
- if len(in) != test.matchedLen {
- t.Fatalf("%s: wrong length %d, expected %d", test.name, len(in), test.matchedLen)
- }
-
- if len(out) != test.remainingLen {
- t.Fatalf("%s: wrong length %d, expected %d", test.name, len(out), test.remainingLen)
- }
- }
-}
-
-// TestGetIfAddrs runs through the motions of calling sockaddr.GetIfAddrs(), but
-// doesn't do much in the way of testing beyond verifying that `lo0` has a
-// loopback address present.
-func TestGetIfAddrs(t *testing.T) {
- ifAddrs, err := sockaddr.GetAllInterfaces()
- if err != nil {
- t.Fatalf("Unable to proceed: %v", err)
- }
- if len(ifAddrs) == 0 {
- t.Skip()
- }
-
- var loInt *sockaddr.IfAddr
- for _, ifAddr := range ifAddrs {
- val := sockaddr.IfAddrAttr(ifAddr, "name")
- if val == "" {
- t.Fatalf("name failed")
- } else if val == "lo0" || val == "lo" || val == "Loopback Pseudo-Interface 1" {
- loInt = &ifAddr
- break
- }
- }
- if loInt == nil {
- t.Fatalf("No loopback interfaces found, loInt nil")
- }
-
- if val := sockaddr.IfAddrAttr(*loInt, "flags"); !(val == "up|loopback|multicast" || val == "up|loopback") {
- t.Fatalf("expected different flags from loopback: %q", val)
- }
-
- if loInt == nil {
- t.Fatalf("Expected to find an lo0 interface, didn't find any")
- }
-
- haveIPv4, foundIPv4lo := false, false
- haveIPv6, foundIPv6lo := false, false
- switch loInt.SockAddr.(type) {
- case sockaddr.IPv4Addr:
- haveIPv4 = true
-
- // Make the semi-brittle assumption that if we have
- // IPv4, we also have an address at 127.0.0.1 available
- // to us.
- if loInt.SockAddr.String() == "127.0.0.1/8" {
- foundIPv4lo = true
- }
- case sockaddr.IPv6Addr:
- haveIPv6 = true
- if loInt.SockAddr.String() == "::1" {
- foundIPv6lo = true
- }
- default:
- t.Fatalf("Unsupported type %v for address %v", loInt.Type(), loInt)
- }
-
- // While not wise, it's entirely possible a host doesn't have IPv4
- // enabled.
- if haveIPv4 && !foundIPv4lo {
- t.Fatalf("Had an IPv4 w/o an expected IPv4 loopback addresses")
- }
-
- // While prudent to run without, a sane environment may still contain an
- // IPv6 loopback address.
- if haveIPv6 && !foundIPv6lo {
- t.Fatalf("Had an IPv6 w/o an expected IPv6 loopback addresses")
- }
-}
-
-// TestGetDefaultIfName tests to make sure a default interface name is always
-// returned from getDefaultIfName().
-func TestGetDefaultInterface(t *testing.T) {
- reportOnDefault := func(args ...interface{}) {
- if havePublicIP() || havePrivateIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
-
- ifAddrs, err := sockaddr.GetDefaultInterfaces()
- if err != nil {
- switch {
- case len(ifAddrs) == 0:
- reportOnDefault("bad: %v", err)
- case ifAddrs[0].Flags&net.FlagUp == 0:
- reportOnDefault("bad: %v", err)
- default:
- reportOnDefault("bad: %v", err)
- }
- }
-}
-
-func TestIfAddrAttrs(t *testing.T) {
- const expectedNumAttrs = 2
- attrs := sockaddr.IfAddrAttrs()
- if len(attrs) != expectedNumAttrs {
- t.Fatalf("wrong number of attrs")
- }
-
- tests := []struct {
- name string
- ifAddr sockaddr.IfAddr
- attr string
- expected string
- }{
- {
- name: "name",
- ifAddr: sockaddr.IfAddr{
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- attr: "name",
- expected: "abc0",
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- result, err := sockaddr.IfAttrs(test.attr, sockaddr.IfAddrs{test.ifAddr})
- if err != nil {
- t.Errorf("failed to get attr %q from %v", test.name, test.ifAddr)
- }
-
- if result != test.expected {
- t.Errorf("unexpected result")
- }
- }
-
- // Test an empty array
- result, err := sockaddr.IfAttrs("name", sockaddr.IfAddrs{})
- if err != nil {
- t.Error(`failed to get attr "name" from an empty array`)
- }
-
- if result != "" {
- t.Errorf("unexpected result")
- }
-}
-
-func TestGetAllInterfaces(t *testing.T) {
- ifAddrs, err := sockaddr.GetAllInterfaces()
- if err != nil {
- t.Fatalf("unable to gather interfaces: %v", err)
- }
-
- initialLen := len(ifAddrs)
- if initialLen == 0 {
- t.Fatalf("no interfaces available")
- }
-
- ifAddrs, err = sockaddr.SortIfBy("name,type,port,size,address", ifAddrs)
- if err != nil {
- t.Fatalf("unable to initially sort address")
- }
-
- ascSorted, err := sockaddr.SortIfBy("name,type,port,size,address", ifAddrs)
- if err != nil {
- t.Fatalf("unable to asc sort address")
- }
-
- descSorted, err := sockaddr.SortIfBy("name,type,port,size,-address", ascSorted)
- if err != nil {
- t.Fatalf("unable to desc sort address")
- }
-
- if initialLen != len(ascSorted) && len(ascSorted) != len(descSorted) {
- t.Fatalf("wrong len")
- }
-
- for i := initialLen - 1; i >= 0; i-- {
- if !reflect.DeepEqual(descSorted[i], ifAddrs[i]) {
- t.Errorf("wrong sort order: %d %v %v", i, descSorted[i], ifAddrs[i])
- }
- }
-}
-
-func TestGetDefaultInterfaces(t *testing.T) {
- reportOnDefault := func(args ...interface{}) {
- if havePublicIP() || havePrivateIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
-
- ifAddrs, err := sockaddr.GetDefaultInterfaces()
- if err != nil {
- reportOnDefault("unable to gather default interfaces: %v", err)
- }
-
- if len(ifAddrs) == 0 {
- reportOnDefault("no default interfaces available", nil)
- }
-}
-
-func TestGetPrivateInterfaces(t *testing.T) {
- reportOnPrivate := func(args ...interface{}) {
- if havePrivateIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
-
- ifAddrs, err := sockaddr.GetPrivateInterfaces()
- if err != nil {
- reportOnPrivate("failed: %v", err)
- }
-
- if len(ifAddrs) == 0 {
- reportOnPrivate("no public IPs found")
- }
-
- if len(ifAddrs[0].String()) == 0 {
- reportOnPrivate("no string representation of private IP found")
- }
-}
-
-func TestGetPublicInterfaces(t *testing.T) {
- reportOnPublic := func(args ...interface{}) {
- if havePublicIP() {
- t.Fatalf(args[0].(string), args[1:]...)
- } else {
- t.Skipf(args[0].(string), args[1:]...)
- }
- }
-
- ifAddrs, err := sockaddr.GetPublicInterfaces()
- if err != nil {
- reportOnPublic("failed: %v", err)
- }
-
- if len(ifAddrs) == 0 {
- reportOnPublic("no public IPs found")
- }
-}
-
-func TestIncludeExcludeIfs(t *testing.T) {
- tests := []struct {
- name string
- ifAddrs sockaddr.IfAddrs
- fail bool
- excludeNum int
- excludeName string
- excludeParam string
- includeName string
- includeParam string
- includeNum int
- }{
- {
- name: "address",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("2.3.4.5"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("3.4.5.6"),
- },
- },
- excludeName: "address",
- excludeNum: 2,
- excludeParam: `^1\..*\.4$`,
- includeName: "address",
- includeNum: 1,
- includeParam: `^1\.2\.3\.`,
- },
- {
- name: "address invalid",
- fail: true,
- excludeName: "address",
- excludeNum: 0,
- excludeParam: `*`,
- includeName: "address",
- includeNum: 0,
- includeParam: `[`,
- },
- {
- name: "flag",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagUp | net.FlagLoopback,
- },
- },
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagLoopback,
- },
- },
- sockaddr.IfAddr{
- Interface: net.Interface{
- Flags: net.FlagMulticast,
- },
- },
- },
- excludeName: "flags",
- excludeNum: 2,
- excludeParam: `up|loopback`,
- includeName: "flags",
- includeNum: 2,
- includeParam: `loopback`,
- },
- {
- name: "flag invalid",
- fail: true,
- excludeName: "foo",
- excludeNum: 0,
- excludeParam: `*`,
- includeName: "bar",
- includeNum: 0,
- includeParam: `[`,
- },
- {
- name: "name",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- sockaddr.IfAddr{
- Interface: net.Interface{
- Name: "xyz0",
- },
- },
- sockaddr.IfAddr{
- Interface: net.Interface{
- Name: "docker666",
- },
- },
- },
- excludeName: "name",
- excludeNum: 2,
- excludeParam: `^docker[\d]+$`,
- includeName: "name",
- includeNum: 2,
- includeParam: `^([a-z]+)0$`,
- },
- {
- name: "name invalid",
- fail: true,
- excludeName: "name",
- excludeNum: 0,
- excludeParam: `*`,
- includeName: "name",
- includeNum: 0,
- includeParam: `[`,
- },
- {
- name: "network",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.255.255.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("::1"),
- },
- },
- excludeName: "network",
- excludeNum: 1,
- excludeParam: `10.0.0.0/8`,
- includeName: "network",
- includeNum: 1,
- includeParam: `::/127`,
- },
- {
- name: "port",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:8600"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("2.3.4.5:4646"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("3.4.5.6:4647"),
- },
- },
- excludeName: "port",
- excludeNum: 2,
- excludeParam: `0$`,
- includeName: "port",
- includeNum: 2,
- includeParam: `^46[\d]{2}$`,
- },
- {
- name: "port invalid",
- fail: true,
- excludeName: "port",
- excludeNum: 0,
- excludeParam: `*`,
- includeName: "port",
- includeNum: 0,
- includeParam: `[`,
- },
- {
- name: "rfc",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- // Excluded (/127 vs /128)
- SockAddr: sockaddr.MustIPv6Addr("::1/127"),
- },
- sockaddr.IfAddr{
- // Excluded (/127 vs /128)
- SockAddr: sockaddr.MustIPv6Addr("::/127"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- },
- },
- excludeName: "rfc",
- excludeNum: 2,
- excludeParam: `6890`,
- includeName: "rfc",
- includeNum: 1,
- includeParam: `3330`,
- },
- {
- name: "rfc invalid",
- fail: true,
- excludeName: "rfc",
- excludeNum: 0,
- excludeParam: `rfcOneTwoThree`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `99999999999999`,
- },
- {
- name: "rfc IPv4 exclude",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("192.169.1.1"),
- },
- },
- excludeName: "rfc",
- excludeNum: 1,
- excludeParam: `1918`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `1918`,
- },
- {
- name: "rfc IPv4 include",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("192.168.1.1"),
- },
- },
- excludeName: "rfc",
- excludeNum: 0,
- excludeParam: `1918`,
- includeName: "rfc",
- includeNum: 1,
- includeParam: `1918`,
- },
- {
- name: "rfc IPv4 excluded RFCs",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("192.168.1.1"),
- },
- },
- excludeName: "rfc",
- excludeNum: 1,
- excludeParam: `4291`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `4291`,
- },
- {
- name: "rfc IPv6 exclude",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("cc::1/127"),
- },
- },
- excludeName: "rfc",
- excludeNum: 1,
- excludeParam: `4291`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `4291`,
- },
- {
- name: "rfc IPv6 include",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/127"),
- },
- },
- excludeName: "rfc",
- excludeNum: 0,
- excludeParam: `4291`,
- includeName: "rfc",
- includeNum: 1,
- includeParam: `4291`,
- },
- {
- name: "rfc zero match",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- },
- },
- excludeName: "rfc",
- excludeNum: 1,
- excludeParam: `1918`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `1918`,
- },
- {
- name: "rfc empty list",
- ifAddrs: sockaddr.IfAddrs{},
- excludeName: "rfc",
- excludeNum: 0,
- excludeParam: `4291`,
- includeName: "rfc",
- includeNum: 0,
- includeParam: `1918`,
- },
- {
- name: "size",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/24"),
- },
- },
- excludeName: "size",
- excludeParam: `24`,
- excludeNum: 0,
- includeName: "size",
- includeParam: `24`,
- includeNum: 3,
- },
- {
- name: "size invalid",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/128"),
- },
- },
- fail: true,
- excludeName: "size",
- excludeParam: `33`,
- excludeNum: 0,
- includeName: "size",
- includeParam: `-1`,
- includeNum: 0,
- },
- {
- name: "type",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv6Addr("::1/127"),
- },
- },
- excludeName: "type",
- excludeParam: `ipv6`,
- excludeNum: 2,
- includeName: "type",
- includeParam: `ipv4`,
- includeNum: 2,
- },
- {
- name: "type",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("10.2.3.4/24"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("::1"),
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustUnixSock("/tmp/foo"),
- },
- },
- excludeName: "type",
- excludeParam: `ip`,
- excludeNum: 1,
- includeName: "type",
- includeParam: `unix`,
- includeNum: 1,
- },
- {
- name: "type invalid arg",
- fail: true,
- excludeName: "type",
- excludeParam: `*`,
- excludeNum: 0,
- includeName: "type",
- includeParam: `[`,
- includeNum: 0,
- },
- {
- name: "type invalid",
- fail: true,
- excludeName: "foo",
- excludeParam: `bar`,
- excludeNum: 0,
- includeName: "baz",
- includeParam: `bur`,
- includeNum: 0,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
- t.Run(fmt.Sprintf("%s-%s", test.name, "include"), func(t *testing.T) {
- t.Logf("test.ifAddrs: %v", test.ifAddrs)
- inIfAddrs, err := sockaddr.IncludeIfs(test.includeName, test.includeParam, test.ifAddrs)
- t.Logf("inIfAddrs: %v", inIfAddrs)
-
- switch {
- case !test.fail && err != nil:
- t.Errorf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Errorf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- if len(inIfAddrs) != test.includeNum {
- t.Errorf("%s: failed include length check. Expected %d, got %d. Input: %q", test.name, test.includeNum, len(inIfAddrs), test.includeParam)
- }
- })
-
- t.Run(fmt.Sprintf("%s-%s", test.name, "exclude"), func(t *testing.T) {
- t.Logf("test.ifAddrs: %v", test.ifAddrs)
- outIfAddrs, err := sockaddr.ExcludeIfs(test.excludeName, test.excludeParam, test.ifAddrs)
- t.Logf("outIfAddrs: %v", outIfAddrs)
-
- switch {
- case !test.fail && err != nil:
- t.Errorf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Errorf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- if len(outIfAddrs) != test.excludeNum {
- t.Errorf("%s: failed exclude length check. Expected %d, got %d. Input: %q", test.name, test.excludeNum, len(outIfAddrs), test.excludeParam)
- }
- })
- }
-}
-
-func TestNewIPAddr(t *testing.T) {
- tests := []struct {
- name string
- input string
- output string
- pass bool
- }{
- {
- name: "ipv4",
- input: "1.2.3.4",
- output: "1.2.3.4",
- pass: true,
- },
- {
- name: "ipv6",
- input: "::1",
- output: "::1",
- pass: true,
- },
- {
- name: "invalid",
- input: "255.255.255.256",
- output: "",
- pass: false,
- },
- }
-
- for _, test := range tests {
- ip, err := sockaddr.NewIPAddr(test.input)
- switch {
- case err == nil && test.pass,
- err != nil && !test.pass:
-
- default:
- t.Errorf("expected %s's success to be %t", test.input, test.pass)
- }
-
- if !test.pass {
- continue
- }
-
- ipStr := ip.String()
- if ipStr != test.output {
- t.Errorf("Expected %q to match %q", test.input, test.output, ipStr)
- }
-
- }
-}
-
-func TestIPAttrs(t *testing.T) {
- const expectedIPAttrs = 11
- ipAttrs := sockaddr.IPAttrs()
- if len(ipAttrs) != expectedIPAttrs {
- t.Fatalf("wrong number of args")
- }
-}
-
-func TestUniqueIfAddrsBy(t *testing.T) {
- tests := []struct {
- name string
- ifAddrs sockaddr.IfAddrs
- fail bool
- selector string
- expected []string
- }{
- {
- name: "address",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("10.2.3.4"),
- Interface: net.Interface{
- Name: "foo1",
- },
- },
- },
- selector: "address",
- expected: []string{"203.0.113.0/24 {0 0 abc0 0}", "10.2.3.4 {0 0 foo1 0}"},
- },
- {
- name: "name",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("::1"),
- Interface: net.Interface{
- Name: "lo0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("fe80::1"),
- Interface: net.Interface{
- Name: "lo0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("127.0.0.1"),
- Interface: net.Interface{
- Name: "foo1",
- },
- },
- },
- selector: "name",
- expected: []string{"::1 {0 0 lo0 0}", "127.0.0.1 {0 0 foo1 0}"},
- },
- {
- name: "invalid",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{},
- },
- fail: true,
- selector: "goozfraba",
- expected: []string{},
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
- t.Run(test.name, func(t *testing.T) {
-
- uniqueAddrs, err := sockaddr.UniqueIfAddrsBy(test.selector, test.ifAddrs)
- switch {
- case !test.fail && err != nil:
- t.Fatalf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Fatalf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- if len(uniqueAddrs) != len(test.expected) {
- t.Fatalf("%s: failed uniquify by attribute %s", test.name, test.selector)
- }
-
- for i := 0; i < len(uniqueAddrs); i++ {
- got := uniqueAddrs[i].String()
- if got != test.expected[i] {
- t.Fatalf("%s: expected %q got %q", test.name, test.expected[i], got)
- }
- }
-
- })
- }
-}
-
-func TestJoinIfAddrsBy(t *testing.T) {
- tests := []struct {
- name string
- ifAddrs sockaddr.IfAddrs
- fail bool
- selector string
- joinStr string
- expected string
- }{
- {
- name: "address",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.0/24"),
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("203.0.113.1"),
- Interface: net.Interface{
- Name: "abc0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("10.2.3.4"),
- Interface: net.Interface{
- Name: "foo1",
- },
- },
- },
- selector: "address",
- joinStr: " ",
- expected: "203.0.113.0 203.0.113.1 10.2.3.4",
- },
- {
- name: "name",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("::1"),
- Interface: net.Interface{
- Name: "lo0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("fe80::1"),
- Interface: net.Interface{
- Name: "foo0",
- },
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("127.0.0.1"),
- Interface: net.Interface{
- Name: "bar2",
- },
- },
- },
- selector: "name",
- joinStr: "-/-",
- expected: "lo0-/-foo0-/-bar2",
- },
- {
- name: "invalid",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPAddr("127.0.0.1"),
- Interface: net.Interface{
- Name: "bar2",
- },
- },
- },
- fail: true,
- selector: "goozfraba",
- expected: "",
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
- t.Run(test.name, func(t *testing.T) {
-
- result, err := sockaddr.JoinIfAddrs(test.selector, test.joinStr, test.ifAddrs)
- switch {
- case !test.fail && err != nil:
- t.Fatalf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Fatalf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- if result != test.expected {
- t.Fatalf("%s: expected %q got %q", test.name, test.expected, result)
- }
-
- })
- }
-}
-
-func TestLimitOffset(t *testing.T) {
- tests := []struct {
- name string
- ifAddrs sockaddr.IfAddrs
- limit uint
- offset int
- fail bool
- expected sockaddr.IfAddrs
- }{
- {
- name: "basic limit offset",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.0/24")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.2")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.4")},
- },
- limit: 2,
- offset: 1,
- expected: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.2")},
- },
- },
- {
- name: "negative offset with limit",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.0/24")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.2")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.4")},
- },
- limit: 2,
- offset: -3,
- expected: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.2")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.3")},
- },
- },
- {
- name: "large limit",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.0/24")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.2")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.4")},
- },
- limit: 100,
- offset: 3,
- expected: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.4")},
- },
- },
- {
- name: "bigger offset than size",
- ifAddrs: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.0/24")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPAddr("203.0.113.1")},
- },
- fail: true,
- limit: 1,
- offset: 3,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
- t.Run(test.name, func(t *testing.T) {
-
- offsetResults, err := sockaddr.OffsetIfAddrs(test.offset, test.ifAddrs)
- switch {
- case !test.fail && err != nil:
- t.Fatalf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Fatalf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- limitResults, err := sockaddr.LimitIfAddrs(test.limit, offsetResults)
- switch {
- case !test.fail && err != nil:
- t.Fatalf("%s: failed unexpectedly: %v", test.name, err)
- case test.fail && err == nil:
- t.Fatalf("%s: failed to throw an error", test.name)
- case test.fail && err != nil:
- // expected test failure
- return
- }
-
- if len(test.expected) != len(limitResults) {
- t.Fatalf("bad")
- }
-
- for i := 0; i < len(test.expected); i++ {
- if !reflect.DeepEqual(limitResults[i], test.expected[i]) {
- t.Errorf("objects in ordered limit")
- }
- }
- })
- }
-}
-
-func TestSortIfBy(t *testing.T) {
- tests := []struct {
- name string
- sortStr string
- in sockaddr.IfAddrs
- out sockaddr.IfAddrs
- fail bool
- }{
- {
- name: "sort address",
- sortStr: "address",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- },
- },
- {
- name: "sort +address",
- sortStr: "+address",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- },
- },
- {
- name: "sort -address",
- sortStr: "-address",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.3")},
- },
- },
- {
- // NOTE(seanc@): This test requires macOS, or at least a computer where
- // en0 has the default route.
- name: "sort default",
- sortStr: "default",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: "other0"},
- },
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: "other0"},
- },
- },
- },
- {
- // NOTE(seanc@): This test requires macOS, or at least a computer where
- // en0 has the default route.
- name: "sort +default",
- sortStr: "+default",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: "other0"},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: "other0"},
- },
- },
- },
- {
- name: "sort -default",
- sortStr: "-default",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: "other0"},
- },
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.4"),
- Interface: net.Interface{Name: "other0"},
- },
- sockaddr.IfAddr{
- SockAddr: sockaddr.MustIPv4Addr("1.2.3.3"),
- Interface: net.Interface{Name: ifNameWithDefault},
- },
- },
- },
- {
- name: "sort name",
- sortStr: "name",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- },
- },
- {
- name: "sort +name",
- sortStr: "+name",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- },
- },
- {
- name: "sort -name",
- sortStr: "-name",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{Interface: net.Interface{Name: "foo"}},
- sockaddr.IfAddr{Interface: net.Interface{Name: "bar"}},
- },
- },
- {
- name: "sort port",
- sortStr: "port",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort +port",
- sortStr: "+port",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort -port",
- sortStr: "-port",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("[::1]:53")},
- },
- },
- {
- name: "sort private",
- sortStr: "private",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort +private",
- sortStr: "+private",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort -private",
- sortStr: "-private",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1")},
- },
- },
- {
- name: "sort size",
- sortStr: "size",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort +size",
- sortStr: "+size",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort -size",
- sortStr: "-size",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- },
- },
- {
- name: "sort type",
- sortStr: "type",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- },
- },
- {
- name: "sort +type",
- sortStr: "+type",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("192.168.1.1/27")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- },
- },
- {
- name: "sort -type",
- sortStr: "-type",
- in: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- out: sockaddr.IfAddrs{
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv6Addr("::1")},
- sockaddr.IfAddr{SockAddr: sockaddr.MustIPv4Addr("1.2.3.4:80")},
- },
- },
- {
- name: "sort invalid",
- sortStr: "ENOENT",
- fail: true,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %i needs a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- sorted, err := sockaddr.SortIfBy(test.sortStr, test.in)
- if err != nil && !test.fail {
- t.Fatalf("%s: sort failed: %v", test.name, err)
- }
-
- if len(test.in) != len(sorted) {
- t.Fatalf("wrong len")
- }
-
- for i := 0; i < len(sorted); i++ {
- if !reflect.DeepEqual(sorted[i], test.out[i]) {
- t.Errorf("wrong sort order: %d %v %v", i, sorted[i], test.out[i])
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ifattr_test.go b/vendor/github.com/hashicorp/go-sockaddr/ifattr_test.go
deleted file mode 100644
index b1a01b892..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ifattr_test.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package sockaddr_test
-
-import (
- "testing"
-
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-func TestIfAttr_net(t *testing.T) {
- ifAddrs, err := sockaddr.GetAllInterfaces()
- if err != nil {
- t.Fatalf("Unable to proceed: %v", err)
- }
-
- for _, ifAddr := range ifAddrs {
- testSockAddrAttr(t, ifAddr)
- }
-}
-
-func TestIfAttr_unix(t *testing.T) {
- newUnixSock := func(path string) sockaddr.UnixSock {
- sa, err := sockaddr.NewUnixSock(path)
- if err != nil {
- t.Fatalf("unable to create new unix socket: %v", err)
- }
- return sa
- }
- unixSockets := []sockaddr.SockAddr{
- newUnixSock("/tmp/test"),
- }
-
- for _, sa := range unixSockets {
- testSockAddrAttr(t, sa)
- }
-}
-
-func testSockAddrAttr(t *testing.T, sai interface{}) {
- attrNamesPerType := []struct {
- name sockaddr.AttrName
- ipv4Pass bool
- ipv6Pass bool
- unixPass bool
- }{
- // Universal
- {"type", true, true, true},
- {"string", true, true, true},
- // IP
- {"name", true, true, false},
- {"size", true, true, false},
- {"flags", true, true, false},
- {"host", true, true, false},
- {"address", true, true, false},
- {"port", true, true, false},
- {"netmask", true, true, false},
- {"network", true, true, false},
- {"mask_bits", true, true, false},
- {"binary", true, true, false},
- {"hex", true, true, false},
- {"first_usable", true, true, false},
- {"last_usable", true, true, false},
- {"octets", true, true, false},
- // IPv4
- {"broadcast", true, false, false},
- {"uint32", true, false, false},
- // IPv6
- {"uint128", false, true, false},
- // Unix
- {"path", false, false, true},
- }
-
- for _, attrTest := range attrNamesPerType {
- switch v := sai.(type) {
- case sockaddr.IfAddr:
- saType := v.Type()
- _, err := v.Attr(attrTest.name)
- switch saType {
- case sockaddr.TypeIPv4:
- if err == nil && attrTest.ipv4Pass || err != nil && !attrTest.ipv4Pass {
- // pass
- }
- // fallthrough
- case sockaddr.TypeIPv6:
- if err == nil && attrTest.ipv6Pass || err != nil && !attrTest.ipv6Pass {
- // pass
- }
- // fallthrough
- case sockaddr.TypeUnix:
- if err == nil && attrTest.unixPass || err != nil && !attrTest.unixPass {
- // pass
- }
- // fallthrough
- default:
- t.Errorf("Unable to fetch attr name %q: %v", attrTest.name, err)
- }
- case sockaddr.SockAddr:
- val, err := sockaddr.Attr(v, attrTest.name)
- _ = err
-
- pass := len(val) > 0
- switch {
- case v.Type() == sockaddr.TypeIPv4 && attrTest.ipv4Pass == pass,
- v.Type() == sockaddr.TypeIPv6 && attrTest.ipv6Pass == pass,
- v.Type() == sockaddr.TypeUnix && attrTest.unixPass == pass:
- // pass
- default:
- t.Errorf("Unable to fetch attr name %q from %v / %v + %+q", attrTest.name, v, v.Type(), val)
- }
- default:
- t.Fatal("unsupported type %T %v", sai, sai)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ipaddr_test.go b/vendor/github.com/hashicorp/go-sockaddr/ipaddr_test.go
deleted file mode 100644
index 68ce2c8b4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ipaddr_test.go
+++ /dev/null
@@ -1,222 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/hashicorp/go-sockaddr"
-)
-
-func TestSockAddr_IPAddr_CmpAddress(t *testing.T) {
- tests := []struct {
- a string
- b string
- cmp int
- }{
- { // 0: Same IPAddr (v4), same port
- a: "208.67.222.222:0",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 1: Same IPAddr (v6), same port
- a: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:0",
- b: "2607:f0d0:1002:0051:0000:0000:0000:0004/128",
- cmp: 0,
- },
- { // 2: Same IPAddr (v4), different port
- a: "208.67.222.222:4646",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 3: Same IPAddr (v6), different port
- a: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:4646",
- b: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:4647",
- cmp: 0,
- },
- { // 4: Different IPAddr (v4), same port
- a: "208.67.220.220:4648",
- b: "208.67.222.222:4648",
- cmp: -1,
- },
- { // 5: Different IPAddr (v6), same port
- a: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:4648",
- b: "[2607:f0d0:1002:0052:0000:0000:0000:0004]:4648",
- cmp: -1,
- },
- { // 6: Different IPAddr (v4), different port
- a: "208.67.220.220:8600",
- b: "208.67.222.222:4648",
- cmp: -1,
- },
- { // 7: Different IPAddr (v6), different port
- a: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8500",
- b: "[2607:f0d0:1002:0052:0000:0000:0000:0004]:4648",
- cmp: -1,
- },
- { // 8: Incompatible IPAddr (v4 vs v6), same port
- a: "208.67.220.220:8600",
- b: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8600",
- cmp: 0,
- },
- { // 9: Incompatible IPAddr (v4 vs v6), different port
- a: "208.67.220.220:8500",
- b: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8600",
- cmp: 0,
- },
- { // 10: Incompatible SockAddr types
- a: "128.95.120.1:123",
- b: "/tmp/foo.sock",
- cmp: 0,
- },
- { // 11: Incompatible SockAddr types
- a: "[::]:123",
- b: "/tmp/foo.sock",
- cmp: 0,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- saA, err := sockaddr.NewSockAddr(test.a)
- if err != nil {
- t.Fatalf("[%d] Unable to create a SockAddr from %+q: %v", idx, test.a, err)
- }
- saB, err := sockaddr.NewSockAddr(test.b)
- if err != nil {
- t.Fatalf("[%d] Unable to create an SockAddr from %+q: %v", idx, test.b, err)
- }
-
- ipA, ok := saA.(sockaddr.IPAddr)
- if !ok {
- t.Fatalf("[%d] Unable to convert SockAddr %+q to an IPAddr", idx, test.a)
- }
-
- if x := ipA.CmpAddress(saB); x != test.cmp {
- t.Errorf("[%d] IPAddr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipA, saB, test.cmp, x)
- }
-
- ipB, ok := saB.(sockaddr.IPAddr)
- if !ok {
- // Return success for comparing non-IPAddr types
- return
- }
- if x := ipA.CmpAddress(ipB); x != test.cmp {
- t.Errorf("[%d] IPAddr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipA, ipB, test.cmp, x)
- }
- if x := ipB.CmpAddress(ipA); x*-1 != test.cmp {
- t.Errorf("[%d] IPAddr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipB, ipA, test.cmp, x)
- }
-
- if x := ipB.CmpAddress(saA); x*-1 != test.cmp {
- t.Errorf("[%d] IPAddr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipB, saA, test.cmp, x)
- }
- })
- }
-}
-
-func TestSockAddr_IPAddr_CmpPort(t *testing.T) {
- tests := []struct {
- a string
- b string
- cmp int
- }{
- { // 0: Same IPv4Addr, same port
- a: "208.67.222.222:0",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 1: Different IPv4Addr, same port
- a: "208.67.220.220:0",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 2: Same IPv4Addr, different port
- a: "208.67.222.222:80",
- b: "208.67.222.222:443",
- cmp: -1,
- },
- { // 3: Different IPv4Addr, different port
- a: "208.67.220.220:8600",
- b: "208.67.222.222:53",
- cmp: 1,
- },
- { // 4: Same IPv6Addr, same port
- a: "[::]:0",
- b: "::/128",
- cmp: 0,
- },
- { // 5: Different IPv6Addr, same port
- a: "[::]:0",
- b: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:0",
- cmp: 0,
- },
- { // 6: Same IPv6Addr, different port
- a: "[::]:8400",
- b: "[::]:8600",
- cmp: -1,
- },
- { // 7: Different IPv6Addr, different port
- a: "[::]:8600",
- b: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:53",
- cmp: 1,
- },
- { // 8: Mixed IPAddr types, same port
- a: "[::]:53",
- b: "208.67.220.220:53",
- cmp: 0,
- },
- { // 9: Mixed IPAddr types, different port
- a: "[::]:53",
- b: "128.95.120.1:123",
- cmp: -1,
- },
- { // 10: Incompatible SockAddr types
- a: "128.95.120.1:123",
- b: "/tmp/foo.sock",
- cmp: 0,
- },
- { // 11: Incompatible SockAddr types
- a: "[::]:123",
- b: "/tmp/foo.sock",
- cmp: 0,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- saA, err := sockaddr.NewSockAddr(test.a)
- if err != nil {
- t.Fatalf("[%d] Unable to create a SockAddr from %+q: %v", idx, test.a, err)
- }
- saB, err := sockaddr.NewSockAddr(test.b)
- if err != nil {
- t.Fatalf("[%d] Unable to create an SockAddr from %+q: %v", idx, test.b, err)
- }
-
- ipA, ok := saA.(sockaddr.IPAddr)
- if !ok {
- t.Fatalf("[%d] Unable to convert SockAddr %+q to an IPAddr", idx, test.a)
- }
-
- if x := ipA.CmpPort(saB); x != test.cmp {
- t.Errorf("[%d] IPAddr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipA, saB, test.cmp, x)
- }
-
- ipB, ok := saB.(sockaddr.IPAddr)
- if !ok {
- // Return success for comparing non-IPAddr types
- return
- }
- if x := ipA.CmpPort(ipB); x != test.cmp {
- t.Errorf("[%d] IPAddr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipA, ipB, test.cmp, x)
- }
- if x := ipB.CmpPort(ipA); x*-1 != test.cmp {
- t.Errorf("[%d] IPAddr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipB, ipA, test.cmp, x)
- }
-
- if x := ipB.CmpPort(saA); x*-1 != test.cmp {
- t.Errorf("[%d] IPAddr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipB, saA, test.cmp, x)
- }
- })
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ipaddrs_test.go b/vendor/github.com/hashicorp/go-sockaddr/ipaddrs_test.go
deleted file mode 100644
index a72f77f63..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ipaddrs_test.go
+++ /dev/null
@@ -1,460 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "sort"
- "testing"
-
- "github.com/hashicorp/go-sockaddr"
-)
-
-type GoodTestIPAddrTest struct {
- sockAddrs sockaddr.SockAddrs
- sortedBySpecificMasklen sockaddr.SockAddrs
- sortedByBroadMasklen sockaddr.SockAddrs
- sortedByNetwork sockaddr.SockAddrs
-}
-type GoodTestIPAddrTests []*GoodTestIPAddrTest
-
-func makeTestIPAddrs(t *testing.T) GoodTestIPAddrTests {
- goodTestInputs := []struct {
- sockAddrs []string
- sortedBySpecificMasklen []string
- sortedByBroadMasklen []string
- sortedByNetwork []string
- }{
- {
- sockAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- sortedBySpecificMasklen: []string{
- "128.95.120.1/32",
- "192.168.1.10/24",
- "192.168.0.0/16",
- "172.16.1.3/12",
- "10.0.0.0/8",
- "240.0.0.1/4",
- },
- sortedByBroadMasklen: []string{
- "240.0.0.1/4",
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "128.95.120.1/32",
- },
- sortedByNetwork: []string{
- "10.0.0.0/8",
- "128.95.120.1/32",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- },
- }
- gfs := make(GoodTestIPAddrTests, 0, len(goodTestInputs))
- for idx, gfi := range goodTestInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- gf := new(GoodTestIPAddrTest)
- gf.sockAddrs = make(sockaddr.SockAddrs, 0, len(gfi.sockAddrs))
- for _, n := range gfi.sockAddrs {
- sa, err := sockaddr.NewSockAddr(n)
- if err != nil {
- t.Fatalf("Expected valid network")
- }
- gf.sockAddrs = append(gf.sockAddrs, sa)
- }
-
- gf.sortedBySpecificMasklen = make(sockaddr.SockAddrs, 0, len(gfi.sortedBySpecificMasklen))
- for _, n := range gfi.sortedBySpecificMasklen {
- na, err := sockaddr.NewSockAddr(n)
- if err != nil {
- t.Fatalf("Expected valid network")
- }
- gf.sortedBySpecificMasklen = append(gf.sortedBySpecificMasklen, na)
- }
-
- if len(gf.sockAddrs) != len(gf.sortedBySpecificMasklen) {
- t.Fatalf("Expected same number of sortedBySpecificMasklen networks")
- }
-
- gf.sortedByBroadMasklen = make(sockaddr.SockAddrs, 0, len(gfi.sortedByBroadMasklen))
- for _, n := range gfi.sortedByBroadMasklen {
- na, err := sockaddr.NewSockAddr(n)
- if err != nil {
- t.Fatalf("Expected valid network")
- }
- gf.sortedByBroadMasklen = append(gf.sortedByBroadMasklen, na)
- }
-
- if len(gf.sockAddrs) != len(gf.sortedByBroadMasklen) {
- t.Fatalf("Expected same number of sortedByBroadMasklen networks")
- }
-
- gf.sortedByNetwork = make(sockaddr.SockAddrs, 0, len(gfi.sortedByNetwork))
- for _, n := range gfi.sortedByNetwork {
- na, err := sockaddr.NewSockAddr(n)
- if err != nil {
- t.Fatalf("Expected valid network")
- }
- gf.sortedByNetwork = append(gf.sortedByNetwork, na)
- }
-
- if len(gf.sockAddrs) != len(gf.sortedByNetwork) {
- t.Fatalf("Expected same number of sortedByNetwork networks")
- }
- })
- }
-
- return gfs
-}
-
-func TestSockAddr_IPAddrs_BySpecificMaskLen(t *testing.T) {
- testInputs := sockAddrStringInputs{
- {
- inputAddrs: []string{"10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- sortedAddrs: []string{
- "128.95.120.1/32",
- "192.168.1.10/24",
- "192.168.0.0/16",
- "172.16.1.3/12",
- "10.0.0.0/8",
- "240.0.0.1/4",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- inputAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
- sockaddrs := append(sockaddr.SockAddrs(nil), inputAddrs...)
- filteredAddrs, _ := sockaddrs.FilterByType(sockaddr.TypeIPv4)
- ipv4Addrs := make([]sockaddr.IPv4Addr, 0, len(filteredAddrs))
- for _, x := range filteredAddrs {
- switch v := x.(type) {
- case sockaddr.IPv4Addr:
- ipv4Addrs = append(ipv4Addrs, v)
- default:
- t.Fatalf("invalid type")
- }
- }
-
- ipAddrs := make([]sockaddr.IPAddr, 0, len(filteredAddrs))
- for _, x := range filteredAddrs {
- ipAddr, ok := x.(sockaddr.IPAddr)
- if !ok {
- t.Fatalf("Unable to typecast to IPAddr")
- }
- ipAddrs = append(ipAddrs, ipAddr)
- }
- sort.Sort(sockaddr.SortIPAddrsBySpecificMaskLen{ipAddrs})
-
- var lastLen int = 32
- for i, netaddr := range ipAddrs {
- maskLen := netaddr.Maskbits()
- if lastLen < maskLen {
- t.Fatalf("Sort by specific mask length failed")
- }
- lastLen = maskLen
-
- if sortedAddrs[i] != netaddr {
- t.Errorf("Expected %s, received %s in iteration %d", sortedAddrs[i], netaddr, i)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPAddrs_ByBroadMaskLen(t *testing.T) {
- testInputs := sockAddrStringInputs{
- {
- inputAddrs: []string{"10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- sortedAddrs: []string{
- "240.0.0.1/4",
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "128.95.120.1/32",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- inputAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
- sockaddrs := append(sockaddr.SockAddrs(nil), inputAddrs...)
- filteredAddrs, _ := sockaddrs.FilterByType(sockaddr.TypeIP)
- ipAddrs := make([]sockaddr.IPAddr, 0, len(filteredAddrs))
- for _, x := range filteredAddrs {
- ipAddr, ok := x.(sockaddr.IPAddr)
- if !ok {
- t.Fatalf("Unable to typecast to IPAddr")
- }
- ipAddrs = append(ipAddrs, ipAddr)
- }
- sort.Sort(sockaddr.SortIPAddrsByBroadMaskLen{ipAddrs})
-
- var lastLen int
- for i, netaddr := range ipAddrs {
- maskLen := netaddr.Maskbits()
- if lastLen > maskLen {
- t.Fatalf("Sort by specific mask length failed")
- }
- lastLen = maskLen
-
- if sortedAddrs[i] != netaddr {
- t.Errorf("Expected %s, received %s in iteration %d", sortedAddrs[i], netaddr, i)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPAddrs_IPAddrsByNetwork(t *testing.T) {
- testInputs := sockAddrStringInputs{
- {
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- sortedAddrs: []string{
- "10.0.0.0/8",
- "128.95.120.1/32",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "240.0.0.1/4",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- inputAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
- sockaddrs := append(sockaddr.SockAddrs(nil), inputAddrs...)
- ipaddrs, _ := sockaddrs.FilterByType(sockaddr.TypeIP)
- sockaddr.OrderedAddrBy(sockaddr.AscAddress).Sort(ipaddrs)
-
- var lastIpUint sockaddr.IPv4Address
- for i, sa := range ipaddrs {
- ipv4 := *sockaddr.ToIPv4Addr(sa)
- if lastIpUint > ipv4.Address {
- t.Fatalf("Sort by network failed")
- }
- lastIpUint = ipv4.Address
-
- if !ipv4.Equal(sortedAddrs[i]) {
- t.Errorf("[%d] Sort equality failed: expected %s, received %s", i, sortedAddrs[i], ipv4)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPAddrs_IPAddrsByNetworkSize(t *testing.T) {
- testInputs := sockAddrStringInputs{
- {
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "128.95.120.2:53",
- "128.95.120.2/32",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "128.95.120.2:8600",
- "240.0.0.1/4",
- },
- sortedAddrs: []string{
- "128.95.120.1/32",
- "128.95.120.2:53",
- "128.95.120.2:8600",
- "128.95.120.2/32",
- "192.168.1.10/24",
- "192.168.0.0/16",
- "172.16.1.3/12",
- "10.0.0.0/8",
- "240.0.0.1/4",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- inputAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
-
- sockaddrs := append(sockaddr.SockAddrs(nil), inputAddrs...)
- filteredAddrs, _ := sockaddrs.FilterByType(sockaddr.TypeIP)
- ipAddrs := make([]sockaddr.IPAddr, 0, len(filteredAddrs))
- for _, x := range filteredAddrs {
- ipAddr, ok := x.(sockaddr.IPAddr)
- if !ok {
- t.Fatalf("Unable to typecast to IPAddr")
- }
- ipAddrs = append(ipAddrs, ipAddr)
- }
- sort.Sort(sockaddr.SortIPAddrsByNetworkSize{ipAddrs})
-
- // var prevAddr sockaddr.IPAddr
- for i, ipAddr := range ipAddrs {
- // if i == 0 {
- // prevAddr = ipAddr
- // continue
- // }
-
- // if prevAddr.Cmp(ipAddr) > 0 {
- // t.Logf("[%d] Prev:\t%v", i, prevAddr)
- // t.Logf("[%d] ipAddr:\t%v", i, ipAddr)
- // t.Fatalf("Sort by network failed")
- // }
- // prevAddr = ipAddr
-
- if !ipAddr.Equal(sortedAddrs[i]) {
- t.Errorf("[%d] Sort equality failed: expected %s, received %s", i, sortedAddrs[i], ipAddr)
- }
- }
- })
- }
-}
-
-// func TestSockAddr_IPAddrs_IPAddrsByCmp(t *testing.T) {
-// testInputs := testIPAddrsInputs{
-// {
-// sockAddrs: []string{
-// "10.0.0.0/8",
-// "172.16.1.3/12",
-// "128.95.120.2:53",
-// "128.95.120.2/32",
-// "192.168.0.0/16",
-// "128.95.120.1/32",
-// "192.168.1.10/24",
-// "128.95.120.2:8600",
-// "240.0.0.1/4",
-// },
-// sortedSockAddrs: []string{
-// "128.95.120.1/32",
-// "128.95.120.2:53",
-// "128.95.120.2:8600",
-// "128.95.120.2/32",
-// "192.168.1.10/24",
-// "192.168.0.0/16",
-// "172.16.1.3/12",
-// "10.0.0.0/8",
-// "240.0.0.1/4",
-// },
-// },
-// }
-
-// for _, test := range makeTestsFromInput(t, testInputs) {
-// sockaddrs := append(sockaddr.SockAddrs(nil), test.sockAddrs...)
-// ipAddrs := sockaddrs.FilterByTypeIPAddr()
-// sort.Sort(sockaddr.SortIPAddrsByCmp{ipAddrs})
-// t.Logf("Here: %+v", ipAddrs)
-
-// var prevAddr sockaddr.IPAddr
-// for i, ipAddr := range ipAddrs {
-// if i == 0 {
-// prevAddr = ipAddr
-// continue
-// }
-
-// if prevAddr.Cmp(ipAddr) > 0 {
-// t.Logf("[%d] Prev:\t%v", i, prevAddr)
-// t.Logf("[%d] ipAddr:\t%v", i, ipAddr)
-// t.Fatalf("Sort by network failed")
-// }
-// prevAddr = ipAddr
-
-// if !ipAddr.Equal(test.sortedSockAddrs[i]) {
-// t.Errorf("[%d] Sort equality failed: expected %s, received %s", i, test.sortedSockAddrs[i], ipAddr)
-// }
-// }
-// }
-// }
-
-func TestSockAddr_IPAddrs_IPAddrsByCmp(t *testing.T) {
- testInputs := sockAddrStringInputs{
- {
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "128.95.120.2:53",
- "128.95.120.2:53",
- "128.95.120.2/32",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "128.95.120.2:8600",
- "0:0:0:0:0:0:0:0",
- "0:0:0:0:0:0:0:1",
- "2607:f0d0:1002:0051:0000:0000:0000:0004",
- "2607:f0d0:1002:0051:0000:0000:0000:0003",
- "2607:f0d0:1002:0051:0000:0000:0000:0005",
- "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8600",
- "240.0.0.1/4",
- },
- sortedAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "240.0.0.1/4",
- "128.95.120.1/32",
- "128.95.120.2/32",
- "128.95.120.2:53",
- "128.95.120.2:53",
- "128.95.120.2:8600",
- "0:0:0:0:0:0:0:0",
- "0:0:0:0:0:0:0:1",
- "2607:f0d0:1002:0051:0000:0000:0000:0003",
- "2607:f0d0:1002:0051:0000:0000:0000:0004",
- "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8600",
- "2607:f0d0:1002:0051:0000:0000:0000:0005",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- shuffleStrings(test.inputAddrs)
-
- inputAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
-
- sockaddr.OrderedAddrBy(sockaddr.AscType, sockaddr.AscPrivate, sockaddr.AscAddress, sockaddr.AscPort).Sort(inputAddrs)
-
- for i, sockAddr := range inputAddrs {
- if !sockAddr.Equal(sortedAddrs[i]) {
- t.Errorf("[%d] Sort equality failed: expected %s, received %s", i, sortedAddrs[i], sockAddr)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ipv4addr_test.go b/vendor/github.com/hashicorp/go-sockaddr/ipv4addr_test.go
deleted file mode 100644
index 0b3d8b0c6..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ipv4addr_test.go
+++ /dev/null
@@ -1,991 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/hashicorp/go-sockaddr"
-)
-
-func TestSockAddr_IPv4Addr(t *testing.T) {
- tests := []struct {
- z00_input string
- z01_addrHexStr string
- z02_addrBinStr string
- z03_addrStr string
- z04_NetIPStringOut string
- z05_addrInt sockaddr.IPv4Address
- z06_netInt sockaddr.IPv4Network
- z07_ipMaskStr string
- z08_maskbits int
- z09_NetIPNetStringOut string
- z10_maskInt sockaddr.IPv4Mask
- z11_networkStr string
- z12_octets []int
- z13_firstUsable string
- z14_lastUsable string
- z15_broadcast string
- z16_portInt sockaddr.IPPort
- z17_DialPacketArgs []string
- z18_DialStreamArgs []string
- z19_ListenPacketArgs []string
- z20_ListenStreamArgs []string
- z21_IsRFC1918 bool
- z22_IsRFC6598 bool
- z23_IsRFC6890 bool
- z99_pass bool
- }{
- { // 0
- z00_input: "0.0.0.0",
- z01_addrHexStr: "00000000",
- z02_addrBinStr: "00000000000000000000000000000000",
- z03_addrStr: "0.0.0.0",
- z04_NetIPStringOut: "0.0.0.0",
- z05_addrInt: 0,
- z06_netInt: 0,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "0.0.0.0/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "0.0.0.0",
- z12_octets: []int{0, 0, 0, 0},
- z13_firstUsable: "0.0.0.0",
- z14_lastUsable: "0.0.0.0",
- z15_broadcast: "0.0.0.0",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "0.0.0.0:0"},
- z20_ListenStreamArgs: []string{"tcp4", "0.0.0.0:0"},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 1
- z00_input: "0.0.0.0:80",
- z01_addrHexStr: "00000000",
- z02_addrBinStr: "00000000000000000000000000000000",
- z03_addrStr: "0.0.0.0:80",
- z04_NetIPStringOut: "0.0.0.0",
- z05_addrInt: 0,
- z06_netInt: 0,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "0.0.0.0/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "0.0.0.0",
- z12_octets: []int{0, 0, 0, 0},
- z13_firstUsable: "0.0.0.0",
- z14_lastUsable: "0.0.0.0",
- z15_broadcast: "0.0.0.0",
- z16_portInt: 80,
- z17_DialPacketArgs: []string{"udp4", "0.0.0.0:80"},
- z18_DialStreamArgs: []string{"tcp4", "0.0.0.0:80"},
- z19_ListenPacketArgs: []string{"udp4", "0.0.0.0:80"},
- z20_ListenStreamArgs: []string{"tcp4", "0.0.0.0:80"},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 2
- z00_input: "0.0.0.0/0",
- z01_addrHexStr: "00000000",
- z02_addrBinStr: "00000000000000000000000000000000",
- z03_addrStr: "0.0.0.0/0",
- z04_NetIPStringOut: "0.0.0.0",
- z05_addrInt: 0,
- z06_netInt: 0,
- z07_ipMaskStr: "00000000",
- z09_NetIPNetStringOut: "0.0.0.0/0",
- z10_maskInt: 0,
- z11_networkStr: "0.0.0.0/0",
- z12_octets: []int{0, 0, 0, 0},
- z13_firstUsable: "0.0.0.1",
- z14_lastUsable: "255.255.255.254",
- z15_broadcast: "255.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z99_pass: true,
- },
- { // 3
- z00_input: "0.0.0.1",
- z01_addrHexStr: "00000001",
- z02_addrBinStr: "00000000000000000000000000000001",
- z03_addrStr: "0.0.0.1",
- z04_NetIPStringOut: "0.0.0.1",
- z05_addrInt: 1,
- z06_netInt: 1,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "0.0.0.1/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "0.0.0.1",
- z12_octets: []int{0, 0, 0, 1},
- z13_firstUsable: "0.0.0.1",
- z14_lastUsable: "0.0.0.1",
- z15_broadcast: "0.0.0.1",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "0.0.0.1:0"},
- z20_ListenStreamArgs: []string{"tcp4", "0.0.0.1:0"},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 4
- z00_input: "0.0.0.1/1",
- z01_addrHexStr: "00000001",
- z02_addrBinStr: "00000000000000000000000000000001",
- z03_addrStr: "0.0.0.1/1",
- z04_NetIPStringOut: "0.0.0.1",
- z05_addrInt: 1,
- z06_netInt: 0,
- z07_ipMaskStr: "80000000",
- z08_maskbits: 1,
- z09_NetIPNetStringOut: "0.0.0.0/1",
- z10_maskInt: 2147483648,
- z11_networkStr: "0.0.0.0/1",
- z12_octets: []int{0, 0, 0, 1},
- z13_firstUsable: "0.0.0.1",
- z14_lastUsable: "127.255.255.254",
- z15_broadcast: "127.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z99_pass: true,
- },
- { // 5
- z00_input: "1.2.3.4",
- z01_addrHexStr: "01020304",
- z02_addrBinStr: "00000001000000100000001100000100",
- z03_addrStr: "1.2.3.4",
- z04_NetIPStringOut: "1.2.3.4",
- z05_addrInt: 16909060,
- z06_netInt: 16909060,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "1.2.3.4/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "1.2.3.4",
- z12_octets: []int{1, 2, 3, 4},
- z13_firstUsable: "1.2.3.4",
- z14_lastUsable: "1.2.3.4",
- z15_broadcast: "1.2.3.4",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "1.2.3.4:0"},
- z20_ListenStreamArgs: []string{"tcp4", "1.2.3.4:0"},
- z99_pass: true,
- },
- { // 6
- z00_input: "10.0.0.0/8",
- z01_addrHexStr: "0a000000",
- z02_addrBinStr: "00001010000000000000000000000000",
- z03_addrStr: "10.0.0.0/8",
- z04_NetIPStringOut: "10.0.0.0",
- z05_addrInt: 167772160,
- z06_netInt: 167772160,
- z07_ipMaskStr: "ff000000",
- z08_maskbits: 8,
- z09_NetIPNetStringOut: "10.0.0.0/8",
- z10_maskInt: 4278190080,
- z11_networkStr: "10.0.0.0/8",
- z12_octets: []int{10, 0, 0, 0},
- z13_firstUsable: "10.0.0.1",
- z14_lastUsable: "10.255.255.254",
- z15_broadcast: "10.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 7
- z00_input: "128.0.0.0",
- z01_addrHexStr: "80000000",
- z02_addrBinStr: "10000000000000000000000000000000",
- z03_addrStr: "128.0.0.0",
- z04_NetIPStringOut: "128.0.0.0",
- z05_addrInt: 2147483648,
- z06_netInt: 2147483648,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "128.0.0.0/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "128.0.0.0",
- z12_octets: []int{128, 0, 0, 0},
- z13_firstUsable: "128.0.0.0",
- z14_lastUsable: "128.0.0.0",
- z15_broadcast: "128.0.0.0",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "128.0.0.0:0"},
- z20_ListenStreamArgs: []string{"tcp4", "128.0.0.0:0"},
- z99_pass: true,
- },
- { // 8
- z00_input: "128.95.120.1/32",
- z01_addrHexStr: "805f7801",
- z02_addrBinStr: "10000000010111110111100000000001",
- z03_addrStr: "128.95.120.1",
- z04_NetIPStringOut: "128.95.120.1",
- z05_addrInt: 2153740289,
- z06_netInt: 2153740289,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "128.95.120.1/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "128.95.120.1",
- z12_octets: []int{128, 95, 120, 1},
- z13_firstUsable: "128.95.120.1",
- z14_lastUsable: "128.95.120.1",
- z15_broadcast: "128.95.120.1",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "128.95.120.1:0"},
- z20_ListenStreamArgs: []string{"tcp4", "128.95.120.1:0"},
- z99_pass: true,
- },
- { // 9
- z00_input: "172.16.1.3/12",
- z01_addrHexStr: "ac100103",
- z02_addrBinStr: "10101100000100000000000100000011",
- z03_addrStr: "172.16.1.3/12",
- z04_NetIPStringOut: "172.16.1.3",
- z05_addrInt: 2886729987,
- z06_netInt: 2886729728,
- z07_ipMaskStr: "fff00000",
- z08_maskbits: 12,
- z09_NetIPNetStringOut: "172.16.0.0/12",
- z10_maskInt: 4293918720,
- z11_networkStr: "172.16.0.0/12",
- z12_octets: []int{172, 16, 1, 3},
- z13_firstUsable: "172.16.0.1",
- z14_lastUsable: "172.31.255.254",
- z15_broadcast: "172.31.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 10
- z00_input: "192.168.0.0/16",
- z01_addrHexStr: "c0a80000",
- z02_addrBinStr: "11000000101010000000000000000000",
- z03_addrStr: "192.168.0.0/16",
- z04_NetIPStringOut: "192.168.0.0",
- z05_addrInt: 3232235520,
- z06_netInt: 3232235520,
- z07_ipMaskStr: "ffff0000",
- z08_maskbits: 16,
- z09_NetIPNetStringOut: "192.168.0.0/16",
- z10_maskInt: 4294901760,
- z11_networkStr: "192.168.0.0/16",
- z12_octets: []int{192, 168, 0, 0},
- z13_firstUsable: "192.168.0.1",
- z14_lastUsable: "192.168.255.254",
- z15_broadcast: "192.168.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 11
- z00_input: "192.168.0.1",
- z01_addrHexStr: "c0a80001",
- z02_addrBinStr: "11000000101010000000000000000001",
- z03_addrStr: "192.168.0.1",
- z04_NetIPStringOut: "192.168.0.1",
- z05_addrInt: 3232235521,
- z06_netInt: 3232235521,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "192.168.0.1/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "192.168.0.1",
- z12_octets: []int{192, 168, 0, 1},
- z13_firstUsable: "192.168.0.1",
- z14_lastUsable: "192.168.0.1",
- z15_broadcast: "192.168.0.1",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "192.168.0.1:0"},
- z20_ListenStreamArgs: []string{"tcp4", "192.168.0.1:0"},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 12
- z00_input: "192.168.0.2/31",
- z01_addrHexStr: "c0a80002",
- z02_addrBinStr: "11000000101010000000000000000010",
- z03_addrStr: "192.168.0.2/31",
- z04_NetIPStringOut: "192.168.0.2",
- z05_addrInt: 3232235522,
- z06_netInt: 3232235522,
- z07_ipMaskStr: "fffffffe",
- z08_maskbits: 31,
- z09_NetIPNetStringOut: "192.168.0.2/31",
- z10_maskInt: 4294967294,
- z11_networkStr: "192.168.0.2/31",
- z12_octets: []int{192, 168, 0, 2},
- z13_firstUsable: "192.168.0.2",
- z14_lastUsable: "192.168.0.3",
- z15_broadcast: "192.168.0.3",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 13
- z00_input: "192.168.1.10/24",
- z01_addrHexStr: "c0a8010a",
- z02_addrBinStr: "11000000101010000000000100001010",
- z03_addrStr: "192.168.1.10/24",
- z04_NetIPStringOut: "192.168.1.10",
- z05_addrInt: 3232235786,
- z06_netInt: 3232235776,
- z07_ipMaskStr: "ffffff00",
- z08_maskbits: 24,
- z09_NetIPNetStringOut: "192.168.1.0/24",
- z10_maskInt: 4294967040,
- z11_networkStr: "192.168.1.0/24",
- z12_octets: []int{192, 168, 1, 10},
- z13_firstUsable: "192.168.1.1",
- z14_lastUsable: "192.168.1.254",
- z15_broadcast: "192.168.1.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 14
- z00_input: "192.168.10.10/16",
- z01_addrHexStr: "c0a80a0a",
- z02_addrBinStr: "11000000101010000000101000001010",
- z03_addrStr: "192.168.10.10/16",
- z04_NetIPStringOut: "192.168.10.10",
- z05_addrInt: 3232238090,
- z06_netInt: 3232235520,
- z07_ipMaskStr: "ffff0000",
- z08_maskbits: 16,
- z09_NetIPNetStringOut: "192.168.0.0/16",
- z10_maskInt: 4294901760,
- z11_networkStr: "192.168.0.0/16",
- z12_octets: []int{192, 168, 10, 10},
- z13_firstUsable: "192.168.0.1",
- z14_lastUsable: "192.168.255.254",
- z15_broadcast: "192.168.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z21_IsRFC1918: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 15
- z00_input: "240.0.0.0/4",
- z01_addrHexStr: "f0000000",
- z02_addrBinStr: "11110000000000000000000000000000",
- z03_addrStr: "240.0.0.0/4",
- z04_NetIPStringOut: "240.0.0.0",
- z05_addrInt: 4026531840,
- z06_netInt: 4026531840,
- z07_ipMaskStr: "f0000000",
- z08_maskbits: 4,
- z09_NetIPNetStringOut: "240.0.0.0/4",
- z10_maskInt: 4026531840,
- z11_networkStr: "240.0.0.0/4",
- z12_octets: []int{240, 0, 0, 0},
- z13_firstUsable: "240.0.0.1",
- z14_lastUsable: "255.255.255.254",
- z15_broadcast: "255.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 16
- z00_input: "240.0.0.1/4",
- z01_addrHexStr: "f0000001",
- z02_addrBinStr: "11110000000000000000000000000001",
- z03_addrStr: "240.0.0.1/4",
- z04_NetIPStringOut: "240.0.0.1",
- z05_addrInt: 4026531841,
- z06_netInt: 4026531840,
- z07_ipMaskStr: "f0000000",
- z08_maskbits: 4,
- z09_NetIPNetStringOut: "240.0.0.0/4",
- z10_maskInt: 4026531840,
- z11_networkStr: "240.0.0.0/4",
- z12_octets: []int{240, 0, 0, 1},
- z13_firstUsable: "240.0.0.1",
- z14_lastUsable: "255.255.255.254",
- z15_broadcast: "255.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 17
- z00_input: "255.255.255.255",
- z01_addrHexStr: "ffffffff",
- z02_addrBinStr: "11111111111111111111111111111111",
- z03_addrStr: "255.255.255.255",
- z04_NetIPStringOut: "255.255.255.255",
- z05_addrInt: 4294967295,
- z06_netInt: 4294967295,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "255.255.255.255/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "255.255.255.255",
- z12_octets: []int{255, 255, 255, 255},
- z13_firstUsable: "255.255.255.255",
- z14_lastUsable: "255.255.255.255",
- z15_broadcast: "255.255.255.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "255.255.255.255:0"},
- z20_ListenStreamArgs: []string{"tcp4", "255.255.255.255:0"},
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 18
- z00_input: "www.hashicorp.com",
- z99_pass: false,
- },
- { // 19
- z00_input: "2001:DB8::/48",
- z99_pass: false,
- },
- { // 20
- z00_input: "2001:DB8::",
- z99_pass: false,
- },
- { // 21
- z00_input: "128.95.120.1:8600",
- z01_addrHexStr: "805f7801",
- z02_addrBinStr: "10000000010111110111100000000001",
- z03_addrStr: "128.95.120.1:8600",
- z04_NetIPStringOut: "128.95.120.1",
- z05_addrInt: 2153740289,
- z06_netInt: 2153740289,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "128.95.120.1/32",
- z10_maskInt: sockaddr.IPv4HostMask,
- z11_networkStr: "128.95.120.1",
- z12_octets: []int{128, 95, 120, 1},
- z13_firstUsable: "128.95.120.1",
- z14_lastUsable: "128.95.120.1",
- z15_broadcast: "128.95.120.1",
- z16_portInt: 8600,
- z17_DialPacketArgs: []string{"udp4", "128.95.120.1:8600"},
- z18_DialStreamArgs: []string{"tcp4", "128.95.120.1:8600"},
- z19_ListenPacketArgs: []string{"udp4", "128.95.120.1:8600"},
- z20_ListenStreamArgs: []string{"tcp4", "128.95.120.1:8600"},
- z99_pass: true,
- },
- { // 22
- z00_input: "100.64.2.3/23",
- z01_addrHexStr: "64400203",
- z02_addrBinStr: "01100100010000000000001000000011",
- z03_addrStr: "100.64.2.3/23",
- z04_NetIPStringOut: "100.64.2.3",
- z05_addrInt: 1681916419,
- z06_netInt: 1681916416,
- z07_ipMaskStr: "fffffe00",
- z08_maskbits: 23,
- z09_NetIPNetStringOut: "100.64.2.0/23",
- z10_maskInt: 4294966784,
- z11_networkStr: "100.64.2.0/23",
- z12_octets: []int{100, 64, 2, 3},
- z13_firstUsable: "100.64.2.1",
- z14_lastUsable: "100.64.3.254",
- z15_broadcast: "100.64.3.255",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", ""},
- z20_ListenStreamArgs: []string{"tcp4", ""},
- z22_IsRFC6598: true,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- { // 23
- z00_input: "192.168.3.53/00ffffff",
- z01_addrHexStr: "c0a80335",
- z02_addrBinStr: "11000000101010000000001100110101",
- z03_addrStr: "192.168.3.53",
- z04_NetIPStringOut: "192.168.3.53",
- z05_addrInt: 3232236341,
- z06_netInt: 3232236341,
- z07_ipMaskStr: "ffffffff",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "192.168.3.53/32",
- z10_maskInt: 4294967295,
- z11_networkStr: "192.168.3.53",
- z12_octets: []int{192, 168, 3, 53},
- z13_firstUsable: "192.168.3.53",
- z14_lastUsable: "192.168.3.53",
- z15_broadcast: "192.168.3.53",
- z17_DialPacketArgs: []string{"udp4", ""},
- z18_DialStreamArgs: []string{"tcp4", ""},
- z19_ListenPacketArgs: []string{"udp4", "192.168.3.53:0"},
- z20_ListenStreamArgs: []string{"tcp4", "192.168.3.53:0"},
- z21_IsRFC1918: true,
- z22_IsRFC6598: false,
- z23_IsRFC6890: true,
- z99_pass: true,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv4, err := sockaddr.NewIPv4Addr(test.z00_input)
- if test.z99_pass && err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.z00_input, err)
- } else if !test.z99_pass && err == nil {
- t.Fatalf("[%d] Expected test to fail for %+q", idx, test.z00_input)
- } else if !test.z99_pass && err != nil {
- // Expected failure, return successfully
- return
- }
-
- if type_ := ipv4.Type(); type_ != sockaddr.TypeIPv4 {
- t.Errorf("[%d] Expected new IPv4Addr to be Type %d, received %d (int)", idx, sockaddr.TypeIPv4, type_)
- }
-
- h, ok := ipv4.Host().(sockaddr.IPv4Addr)
- if !ok {
- t.Errorf("[%d] Unable to type assert +%q's Host to IPv4Addr", idx, test.z00_input)
- }
-
- if h.Address != ipv4.Address || h.Mask != sockaddr.IPv4HostMask || h.Port != ipv4.Port {
- t.Errorf("[%d] Expected %+q's Host() to return identical IPv4Addr except mask, received %+q", idx, test.z00_input, h.String())
- }
-
- if c := cap(*ipv4.NetIP()); c != sockaddr.IPv4len {
- t.Errorf("[%d] Expected new IPv4Addr's Address capacity to be %d bytes, received %d", idx, sockaddr.IPv4len, c)
- }
-
- if l := len(*ipv4.NetIP()); l != sockaddr.IPv4len {
- t.Errorf("[%d] Expected new IPv4Addr's Address length to be %d bytes, received %d", idx, sockaddr.IPv4len, l)
- }
-
- if s := ipv4.AddressHexString(); s != test.z01_addrHexStr {
- t.Errorf("[%d] Expected address %+q's hexadecimal representation to be %+q, received %+q", idx, test.z00_input, test.z01_addrHexStr, s)
- }
-
- if s := ipv4.AddressBinString(); s != test.z02_addrBinStr {
- t.Errorf("[%d] Expected address %+q's binary representation to be %+q, received %+q", idx, test.z00_input, test.z02_addrBinStr, s)
- }
-
- if s := ipv4.String(); s != test.z03_addrStr {
- t.Errorf("[%d] Expected %+q's String to be %+q, received %+q", idx, test.z00_input, test.z03_addrStr, s)
- }
-
- if s := ipv4.NetIP().String(); s != test.z04_NetIPStringOut {
- t.Errorf("[%d] Expected %+q's address to be %+q, received %+q", idx, test.z00_input, test.z04_NetIPStringOut, s)
- }
-
- if a := ipv4.Address; a != test.z05_addrInt {
- t.Errorf("[%d] Expected %+q's Address to return %d, received %d", idx, test.z00_input, test.z05_addrInt, a)
- }
-
- if n, ok := ipv4.Network().(sockaddr.IPv4Addr); !ok || n.Address != sockaddr.IPv4Address(test.z06_netInt) {
- t.Errorf("[%d] Expected %+q's Network to return %d, received %d", idx, test.z00_input, test.z06_netInt, n.Address)
- }
-
- if m := ipv4.NetIPMask().String(); m != test.z07_ipMaskStr {
- t.Errorf("[%d] Expected %+q's mask to be %+q, received %+q", idx, test.z00_input, test.z07_ipMaskStr, m)
- }
-
- if m := ipv4.Maskbits(); m != test.z08_maskbits {
- t.Errorf("[%d] Expected %+q's port to be %d, received %d", idx, test.z00_input, test.z08_maskbits, m)
- }
-
- if n := ipv4.NetIPNet().String(); n != test.z09_NetIPNetStringOut {
- t.Errorf("[%d] Expected %+q's network to be %+q, received %+q", idx, test.z00_input, test.z09_NetIPNetStringOut, n)
- }
-
- if m := ipv4.Mask; m != test.z10_maskInt {
- t.Errorf("[%d] Expected %+q's Mask to return %d, received %d", idx, test.z00_input, test.z10_maskInt, m)
- }
-
- // Network()'s mask must match the IPv4Addr's Mask
- if n, ok := ipv4.Network().(sockaddr.IPv4Addr); !ok || n.Mask != test.z10_maskInt {
- t.Errorf("[%d] Expected %+q's Network's Mask to return %d, received %d", idx, test.z00_input, test.z10_maskInt, n.Mask)
- }
-
- if n := ipv4.Network().String(); n != test.z11_networkStr {
- t.Errorf("[%d] Expected %+q's Network() to be %+q, received %+q", idx, test.z00_input, test.z11_networkStr, n)
- }
-
- if o := ipv4.Octets(); len(o) != 4 || o[0] != test.z12_octets[0] || o[1] != test.z12_octets[1] || o[2] != test.z12_octets[2] || o[3] != test.z12_octets[3] {
- t.Errorf("[%d] Expected %+q's Octets to be %+v, received %+v", idx, test.z00_input, test.z12_octets, o)
- }
-
- if f := ipv4.FirstUsable().String(); f != test.z13_firstUsable {
- t.Errorf("[%d] Expected %+q's FirstUsable() to be %+q, received %+q", idx, test.z00_input, test.z13_firstUsable, f)
- }
-
- if l := ipv4.LastUsable().String(); l != test.z14_lastUsable {
- t.Errorf("[%d] Expected %+q's LastUsable() to be %+q, received %+q", idx, test.z00_input, test.z14_lastUsable, l)
- }
-
- if b := ipv4.Broadcast().String(); b != test.z15_broadcast {
- t.Errorf("[%d] Expected %+q's broadcast to be %+q, received %+q", idx, test.z00_input, test.z15_broadcast, b)
- }
-
- if p := ipv4.IPPort(); sockaddr.IPPort(p) != test.z16_portInt || sockaddr.IPPort(p) != test.z16_portInt {
- t.Errorf("[%d] Expected %+q's port to be %d, received %d", idx, test.z00_input, test.z16_portInt, p)
- }
-
- if dialNet, dialArgs := ipv4.DialPacketArgs(); dialNet != test.z17_DialPacketArgs[0] || dialArgs != test.z17_DialPacketArgs[1] {
- t.Errorf("[%d] Expected %+q's DialPacketArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z17_DialPacketArgs, dialNet, dialArgs)
- }
-
- if dialNet, dialArgs := ipv4.DialStreamArgs(); dialNet != test.z18_DialStreamArgs[0] || dialArgs != test.z18_DialStreamArgs[1] {
- t.Errorf("[%d] Expected %+q's DialStreamArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z18_DialStreamArgs, dialNet, dialArgs)
- }
-
- if listenNet, listenArgs := ipv4.ListenPacketArgs(); listenNet != test.z19_ListenPacketArgs[0] || listenArgs != test.z19_ListenPacketArgs[1] {
- t.Errorf("[%d] Expected %+q's ListenPacketArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z19_ListenPacketArgs, listenNet, listenArgs)
- }
-
- if listenNet, listenArgs := ipv4.ListenStreamArgs(); listenNet != test.z20_ListenStreamArgs[0] || listenArgs != test.z20_ListenStreamArgs[1] {
- t.Errorf("[%d] Expected %+q's ListenStreamArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z20_ListenStreamArgs, listenNet, listenArgs)
- }
-
- if v := sockaddr.IsRFC(1918, ipv4); v != test.z21_IsRFC1918 {
- t.Errorf("[%d] Expected IsRFC(1918, %+q) to be %+q, received %+q", idx, test.z00_input, test.z21_IsRFC1918, v)
- }
-
- if v := sockaddr.IsRFC(6598, ipv4); v != test.z22_IsRFC6598 {
- t.Errorf("[%d] Expected IsRFC(6598, %+q) to be %+q, received %+q", idx, test.z00_input, test.z22_IsRFC6598, v)
- }
-
- if v := sockaddr.IsRFC(6890, ipv4); v != test.z23_IsRFC6890 {
- t.Errorf("[%d] Expected IsRFC(6890, %+q) to be %+q, received %+q", idx, test.z00_input, test.z23_IsRFC6890, v)
- }
- })
- }
-}
-
-func TestSockAddr_IPv4Addr_CmpAddress(t *testing.T) {
- tests := []struct {
- a string
- b string
- cmp int
- }{
- { // 0
- a: "208.67.222.222/32",
- b: "208.67.222.222",
- cmp: 0,
- },
- { // 1
- a: "208.67.222.222/32",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 2
- a: "208.67.222.222/32",
- b: "208.67.222.222:0",
- cmp: 0,
- },
- { // 3
- a: "208.67.222.220/32",
- b: "208.67.222.222/32",
- cmp: -1,
- },
- { // 4
- a: "208.67.222.222/32",
- b: "208.67.222.220/32",
- cmp: 1,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv4a, err := sockaddr.NewIPv4Addr(test.a)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.a, err)
- }
-
- ipv4b, err := sockaddr.NewIPv4Addr(test.b)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.b, err)
- }
-
- if x := ipv4a.CmpAddress(ipv4b); x != test.cmp {
- t.Errorf("[%d] IPv4Addr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipv4a, ipv4b, test.cmp, x)
- }
-
- if x := ipv4b.CmpAddress(ipv4a); x*-1 != test.cmp {
- t.Errorf("[%d] IPv4Addr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipv4a, ipv4b, test.cmp, x)
- }
- })
- }
-}
-
-func TestSockAddr_IPv4Addr_ContainsAddress(t *testing.T) {
- tests := []struct {
- input string
- pass []string
- fail []string
- }{
- { // 0
- input: "208.67.222.222/32",
- pass: []string{
- "208.67.222.222",
- "208.67.222.222/32",
- "208.67.222.223/31",
- "208.67.222.222/31",
- "0.0.0.0/0",
- },
- fail: []string{
- "0.0.0.0/1",
- "208.67.222.220/31",
- "208.67.220.224/31",
- "208.67.220.220/32",
- },
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv4, err := sockaddr.NewIPv4Addr(test.input)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.input, err)
- }
-
- for passIdx, passInput := range test.pass {
- passAddr, err := sockaddr.NewIPv4Addr(passInput)
- if err != nil {
- t.Fatalf("[%d/%d] Unable to create an IPv4Addr from %+q: %v", idx, passIdx, passInput, err)
- }
-
- if !passAddr.ContainsAddress(ipv4.Address) {
- t.Errorf("[%d/%d] Expected %+q to contain %+q", idx, passIdx, test.input, passInput)
- }
- }
-
- for failIdx, failInput := range test.fail {
- failAddr, err := sockaddr.NewIPv4Addr(failInput)
- if err != nil {
- t.Fatalf("[%d/%d] Unable to create an IPv4Addr from %+q: %v", idx, failIdx, failInput, err)
- }
-
- if failAddr.ContainsAddress(ipv4.Address) {
- t.Errorf("[%d/%d] Expected %+q to contain %+q", idx, failIdx, test.input, failInput)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPv4Addr_CmpPort(t *testing.T) {
- tests := []struct {
- a string
- b string
- cmp int
- }{
- { // 0: Same port, same IP
- a: "208.67.222.222:0",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 1: Same port, different IP
- a: "208.67.222.220:0",
- b: "208.67.222.222/32",
- cmp: 0,
- },
- { // 2: Same IP, different port
- a: "208.67.222.222:80",
- b: "208.67.222.222:443",
- cmp: -1,
- },
- { // 3: Same IP, different port
- a: "208.67.222.222:443",
- b: "208.67.222.222:80",
- cmp: 1,
- },
- { // 4: Different IP, different port
- a: "208.67.222.222:53",
- b: "208.67.220.220:8600",
- cmp: -1,
- },
- { // 5: Different IP, different port
- a: "208.67.222.222:8600",
- b: "208.67.220.220:53",
- cmp: 1,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv4a, err := sockaddr.NewIPv4Addr(test.a)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.a, err)
- }
-
- ipv4b, err := sockaddr.NewIPv4Addr(test.b)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.b, err)
- }
-
- if x := ipv4a.CmpPort(ipv4b); x != test.cmp {
- t.Errorf("[%d] IPv4Addr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipv4a, ipv4b, test.cmp, x)
- }
-
- if x := ipv4b.CmpPort(ipv4a); x*-1 != test.cmp {
- t.Errorf("[%d] IPv4Addr.CmpPort() failed with %+q with %+q (expected %d, received %d)", idx, ipv4a, ipv4b, test.cmp, x)
- }
- })
- }
-}
-
-func TestSockAddr_IPv4Addr_Equal(t *testing.T) {
- tests := []struct {
- name string
- input string
- pass []string
- fail []string
- }{
- {
- name: "passing",
- input: "208.67.222.222/32",
- pass: []string{"208.67.222.222", "208.67.222.222/32", "208.67.222.222:0"},
- fail: []string{"208.67.222.222/31", "208.67.220.220", "208.67.220.220/32", "208.67.222.222:5432"},
- },
- {
- name: "failing",
- input: "4.2.2.1",
- pass: []string{"4.2.2.1", "4.2.2.1/32"},
- fail: []string{"4.2.2.1/0", "4.2.2.2", "4.2.2.2/32", "::1"},
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv4, err := sockaddr.NewIPv4Addr(test.input)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, test.input, err)
- }
-
- for goodIdx, passInput := range test.pass {
- good, err := sockaddr.NewIPv4Addr(passInput)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, passInput, err)
- }
-
- if !ipv4.Equal(good) {
- t.Errorf("[%d/%d] Expected %+q to be equal to %+q: %+q/%+q", idx, goodIdx, test.input, passInput, ipv4.String(), good.String())
- }
- }
-
- for failIdx, failInput := range test.fail {
- fail, err := sockaddr.NewIPAddr(failInput)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv4Addr from %+q: %v", idx, failInput, err)
- }
-
- if ipv4.Equal(fail) {
- t.Errorf("[%d/%d] Expected %+q to be not equal to %+q", idx, failIdx, test.input, failInput)
- }
- }
- })
- }
-}
-
-func TestIPv4CmpRFC(t *testing.T) {
- tests := []struct {
- name string
- ipv4 sockaddr.IPv4Addr
- rfc uint
- sa sockaddr.SockAddr
- ret int
- }{
- {
- name: "ipv4 rfc cmp recv match not arg",
- ipv4: sockaddr.MustIPv4Addr("192.168.1.10"),
- rfc: 1918,
- sa: sockaddr.MustIPv6Addr("::1"),
- ret: -1,
- },
- {
- name: "ipv4 rfc cmp recv match",
- ipv4: sockaddr.MustIPv4Addr("192.168.1.2"),
- rfc: 1918,
- sa: sockaddr.MustIPv4Addr("203.1.2.3"),
- ret: -1,
- },
- {
- name: "ipv4 rfc cmp defer",
- ipv4: sockaddr.MustIPv4Addr("192.168.1.3"),
- rfc: 1918,
- sa: sockaddr.MustIPv4Addr("192.168.1.4"),
- ret: 0,
- },
- {
- name: "ipv4 rfc cmp recv not match",
- ipv4: sockaddr.MustIPv4Addr("1.2.3.4"),
- rfc: 1918,
- sa: sockaddr.MustIPv4Addr("203.1.2.3"),
- ret: 0,
- },
- {
- name: "ipv4 rfc cmp recv not match arg",
- ipv4: sockaddr.MustIPv4Addr("1.2.3.4"),
- rfc: 1918,
- sa: sockaddr.MustIPv6Addr("::1"),
- ret: 0,
- },
- {
- name: "ipv4 rfc cmp arg match",
- ipv4: sockaddr.MustIPv4Addr("1.2.3.4"),
- rfc: 1918,
- sa: sockaddr.MustIPv4Addr("192.168.1.5"),
- ret: 1,
- },
- }
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- ipv4 := test.ipv4
- if ret := ipv4.CmpRFC(test.rfc, test.sa); ret != test.ret {
- t.Errorf("%s: unexpected ret: wanted %d got %d", test.name, test.ret, ret)
- }
- })
- }
-}
-
-func TestIPv4Attrs(t *testing.T) {
- const expectedNumAttrs = 3
- attrs := sockaddr.IPv4Attrs()
- if len(attrs) != expectedNumAttrs {
- t.Fatalf("wrong number of IPv4Attrs: %d vs %d", len(attrs), expectedNumAttrs)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/ipv6addr_test.go b/vendor/github.com/hashicorp/go-sockaddr/ipv6addr_test.go
deleted file mode 100644
index 62b1dfb28..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/ipv6addr_test.go
+++ /dev/null
@@ -1,725 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "math/big"
- "strings"
- "testing"
-
- "github.com/hashicorp/go-sockaddr"
-)
-
-// ipv6HostMask is an unexported big.Int representing a /128 IPv6 address
-var ipv6HostMask sockaddr.IPv6Mask
-
-func init() {
- biMask := big.NewInt(0)
- biMask = biMask.SetBytes([]byte{
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- 0xff, 0xff,
- },
- )
- ipv6HostMask = sockaddr.IPv6Mask(biMask)
-}
-
-func newIPv6BigInt(t *testing.T, ipv6Str string) *big.Int {
- addr := big.NewInt(0)
- addrStr := strings.Join(strings.Split(ipv6Str, ":"), "")
- _, ok := addr.SetString(addrStr, 16)
- if !ok {
- t.Fatal("Unable to create an IPv6Addr from string %+q", ipv6Str)
- }
-
- return addr
-}
-
-func newIPv6Address(t *testing.T, ipv6Str string) sockaddr.IPv6Address {
- return sockaddr.IPv6Address(newIPv6BigInt(t, ipv6Str))
-}
-
-func newIPv6Mask(t *testing.T, ipv6Str string) sockaddr.IPv6Mask {
- return sockaddr.IPv6Mask(newIPv6BigInt(t, ipv6Str))
-}
-
-func newIPv6Network(t *testing.T, ipv6Str string) sockaddr.IPv6Network {
- return sockaddr.IPv6Network(newIPv6BigInt(t, ipv6Str))
-}
-
-func TestSockAddr_IPv6Addr(t *testing.T) {
- tests := []struct {
- z00_input string
- z01_addrHexStr string
- z02_addrBinStr string
- z03_addrStr string
- z04_NetIPStringOut string
- z05_addrInt sockaddr.IPv6Address
- z06_netInt sockaddr.IPv6Network
- z07_ipMaskStr string
- z08_maskbits int
- z09_NetIPNetStringOut string
- z10_maskInt sockaddr.IPv6Mask
- z11_networkStr string
- z12_octets []int
- z13_firstUsable string
- z14_lastUsable string
- z16_portInt sockaddr.IPPort
- z17_DialPacketArgs []string
- z18_DialStreamArgs []string
- z19_ListenPacketArgs []string
- z20_ListenStreamArgs []string
- z99_pass bool
- }{
- { // 0 -- IPv4 fail
- z00_input: "1.2.3.4",
- z99_pass: false,
- },
- { // 1 - IPv4 with port
- z00_input: "5.6.7.8:80",
- z99_pass: false,
- },
- { // 2 - Hostname
- z00_input: "www.hashicorp.com",
- z99_pass: false,
- },
- { // 3 - IPv6 with port, but no square brackets
- z00_input: "2607:f0d0:1002:0051:0000:0000:0000:0004:8600",
- z99_pass: false,
- },
- { // 4 - IPv6 with port
- z00_input: "[2607:f0d0:1002:0051:0000:0000:0000:0004]:8600",
- z01_addrHexStr: "2607f0d0100200510000000000000004",
- z02_addrBinStr: "00100110000001111111000011010000000100000000001000000000010100010000000000000000000000000000000000000000000000000000000000000100",
- z03_addrStr: "[2607:f0d0:1002:51::4]:8600",
- z04_NetIPStringOut: "2607:f0d0:1002:51::4",
- z05_addrInt: newIPv6Address(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z06_netInt: newIPv6Network(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "2607:f0d0:1002:51::4/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "2607:f0d0:1002:51::4",
- z12_octets: []int{0x26, 0x7, 0xf0, 0xd0, 0x10, 0x2, 0x0, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4},
- z13_firstUsable: "2607:f0d0:1002:51::4",
- z14_lastUsable: "2607:f0d0:1002:51::4",
- z16_portInt: 8600,
- z17_DialPacketArgs: []string{"udp6", "[2607:f0d0:1002:51::4]:8600"},
- z18_DialStreamArgs: []string{"tcp6", "[2607:f0d0:1002:51::4]:8600"},
- z19_ListenPacketArgs: []string{"udp6", "[2607:f0d0:1002:51::4]:8600"},
- z20_ListenStreamArgs: []string{"tcp6", "[2607:f0d0:1002:51::4]:8600"},
- z99_pass: true,
- },
- { // 5 - IPv6
- z00_input: "2607:f0d0:1002:0051:0000:0000:0000:0004",
- z01_addrHexStr: "2607f0d0100200510000000000000004",
- z02_addrBinStr: "00100110000001111111000011010000000100000000001000000000010100010000000000000000000000000000000000000000000000000000000000000100",
- z03_addrStr: "2607:f0d0:1002:51::4",
- z04_NetIPStringOut: "2607:f0d0:1002:51::4",
- z05_addrInt: newIPv6Address(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z06_netInt: newIPv6Network(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "2607:f0d0:1002:51::4/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "2607:f0d0:1002:51::4",
- z12_octets: []int{0x26, 0x7, 0xf0, 0xd0, 0x10, 0x2, 0x0, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4},
- z13_firstUsable: "2607:f0d0:1002:51::4",
- z14_lastUsable: "2607:f0d0:1002:51::4",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[2607:f0d0:1002:51::4]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[2607:f0d0:1002:51::4]:0"},
- z99_pass: true,
- },
- { // 6 IPv6 with square brackets, optional
- z00_input: "[2607:f0d0:1002:0051:0000:0000:0000:0004]",
- z01_addrHexStr: "2607f0d0100200510000000000000004",
- z02_addrBinStr: "00100110000001111111000011010000000100000000001000000000010100010000000000000000000000000000000000000000000000000000000000000100",
- z03_addrStr: "2607:f0d0:1002:51::4",
- z04_NetIPStringOut: "2607:f0d0:1002:51::4",
- z05_addrInt: newIPv6Address(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z06_netInt: newIPv6Network(t, "2607:f0d0:1002:0051:0000:0000:0000:0004"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "2607:f0d0:1002:51::4/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "2607:f0d0:1002:51::4",
- z12_octets: []int{0x26, 0x7, 0xf0, 0xd0, 0x10, 0x2, 0x0, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4},
- z13_firstUsable: "2607:f0d0:1002:51::4",
- z14_lastUsable: "2607:f0d0:1002:51::4",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[2607:f0d0:1002:51::4]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[2607:f0d0:1002:51::4]:0"},
- z99_pass: true,
- },
- { // 7 - unspecified address
- z00_input: "0:0:0:0:0:0:0:0",
- z01_addrHexStr: "00000000000000000000000000000000",
- z02_addrBinStr: "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- z03_addrStr: "::",
- z04_NetIPStringOut: "::",
- z05_addrInt: newIPv6Address(t, "0"),
- z06_netInt: newIPv6Network(t, "0"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "::/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "::",
- z12_octets: []int{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
- z13_firstUsable: "::",
- z14_lastUsable: "::",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[::]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[::]:0"},
- z99_pass: true,
- },
- { // 8 - loopback address
- z00_input: "0:0:0:0:0:0:0:1",
- z01_addrHexStr: "00000000000000000000000000000001",
- z02_addrBinStr: "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- z03_addrStr: "::1",
- z04_NetIPStringOut: "::1",
- z05_addrInt: newIPv6Address(t, "0000:0000:0000:0000:0000:0000:0000:0001"),
- z06_netInt: newIPv6Network(t, "0000:0000:0000:0000:0000:0000:0000:0001"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "::1/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "::1",
- z12_octets: []int{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x01},
- z13_firstUsable: "::1",
- z14_lastUsable: "::1",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[::1]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[::1]:0"},
- z99_pass: true,
- },
- { // 9 - IPv6 with CIDR (RFC 3849)
- z00_input: "2001:DB8::/32",
- z01_addrHexStr: "20010db8000000000000000000000000",
- z02_addrBinStr: "00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- z03_addrStr: "2001:db8::/32",
- z04_NetIPStringOut: "2001:db8::",
- z05_addrInt: newIPv6Address(t, "20010db8000000000000000000000000"),
- z06_netInt: newIPv6Network(t, "20010db8000000000000000000000000"),
- z07_ipMaskStr: "ffffffff000000000000000000000000",
- z08_maskbits: 32,
- z09_NetIPNetStringOut: "2001:db8::/32",
- z10_maskInt: newIPv6Mask(t, "ffffffff000000000000000000000000"),
- z11_networkStr: "2001:db8::/32",
- z12_octets: []int{0x20, 0x01, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
- z13_firstUsable: "2001:db8::",
- z14_lastUsable: "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", ""},
- z20_ListenStreamArgs: []string{"tcp6", ""},
- z99_pass: true,
- },
- { // 10 - IPv6 ::1
- z00_input: "::1",
- z01_addrHexStr: "00000000000000000000000000000001",
- z02_addrBinStr: "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- z03_addrStr: "::1",
- z04_NetIPStringOut: "::1",
- z05_addrInt: newIPv6Address(t, "00000000000000000000000000000001"),
- z06_netInt: newIPv6Network(t, "00000000000000000000000000000001"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "::1/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "::1",
- z12_octets: []int{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
- z13_firstUsable: "::1",
- z14_lastUsable: "::1",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[::1]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[::1]:0"},
- z99_pass: true,
- },
- { // 11 - IPv6 100::
- z00_input: "100::",
- z01_addrHexStr: "01000000000000000000000000000000",
- z02_addrBinStr: "00000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- z03_addrStr: "100::",
- z04_NetIPStringOut: "100::",
- z05_addrInt: newIPv6Address(t, "01000000000000000000000000000000"),
- z06_netInt: newIPv6Network(t, "01000000000000000000000000000000"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "100::/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "100::",
- z12_octets: []int{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
- z13_firstUsable: "100::",
- z14_lastUsable: "100::",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[100::]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[100::]:0"},
- z99_pass: true,
- },
- { // 12 - IPv6 100::2
- z00_input: "100::2",
- z01_addrHexStr: "01000000000000000000000000000002",
- z02_addrBinStr: "00000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010",
- z03_addrStr: "100::2",
- z04_NetIPStringOut: "100::2",
- z05_addrInt: newIPv6Address(t, "01000000000000000000000000000002"),
- z06_netInt: newIPv6Network(t, "01000000000000000000000000000002"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "100::2/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "100::2",
- z12_octets: []int{0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x02},
- z13_firstUsable: "100::2",
- z14_lastUsable: "100::2",
- z17_DialPacketArgs: []string{"udp6", ""},
- z18_DialStreamArgs: []string{"tcp6", ""},
- z19_ListenPacketArgs: []string{"udp6", "[100::2]:0"},
- z20_ListenStreamArgs: []string{"tcp6", "[100::2]:0"},
- z99_pass: true,
- },
- { // 13 - IPv6 `[100::2]:80`
- z00_input: "[100::2]:80",
- z01_addrHexStr: "01000000000000000000000000000002",
- z02_addrBinStr: "00000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010",
- z03_addrStr: "[100::2]:80",
- z04_NetIPStringOut: "100::2",
- z05_addrInt: newIPv6Address(t, "01000000000000000000000000000002"),
- z06_netInt: newIPv6Network(t, "01000000000000000000000000000002"),
- z07_ipMaskStr: "ffffffffffffffffffffffffffffffff",
- z08_maskbits: 128,
- z09_NetIPNetStringOut: "100::2/128",
- z10_maskInt: newIPv6Mask(t, "ffffffffffffffffffffffffffffffff"),
- z11_networkStr: "100::2",
- z12_octets: []int{0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x02},
- z13_firstUsable: "100::2",
- z14_lastUsable: "100::2",
- z16_portInt: 80,
- z17_DialPacketArgs: []string{"udp6", "[100::2]:80"},
- z18_DialStreamArgs: []string{"tcp6", "[100::2]:80"},
- z19_ListenPacketArgs: []string{"udp6", "[100::2]:80"},
- z20_ListenStreamArgs: []string{"tcp6", "[100::2]:80"},
- z99_pass: true,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv6, err := sockaddr.NewIPv6Addr(test.z00_input)
- if test.z99_pass && err != nil {
- t.Fatalf("[%d] Unable to create an IPv6Addr from %+q: %v", idx, test.z00_input, err)
- } else if !test.z99_pass && err == nil {
- t.Fatalf("[%d] Expected test to fail for %+q", idx, test.z00_input)
- } else if !test.z99_pass && err != nil {
- // Expected failure, return success
- return
- }
-
- if type_ := ipv6.Type(); type_ != sockaddr.TypeIPv6 {
- t.Errorf("[%d] Expected new IPv6Addr to be Type %d, received %d (int)", idx, sockaddr.TypeIPv6, type_)
- }
-
- h, ok := ipv6.Host().(sockaddr.IPv6Addr)
- if !ok {
- t.Errorf("[%d] Unable to type assert +%q's Host to IPv6Addr", idx, test.z00_input)
- }
-
- hAddressBigInt := big.Int(*h.Address)
- hMaskBigInt := big.Int(*h.Mask)
- if hAddressBigInt.Cmp(ipv6.Address) != 0 || hMaskBigInt.Cmp(ipv6HostMask) != 0 || h.Port != ipv6.Port {
- t.Errorf("[%d] Expected %+q's Host() to return identical IPv6Addr except mask, received %+q", idx, test.z00_input, h.String())
- }
-
- if c := cap(*ipv6.NetIP()); c != sockaddr.IPv6len {
- t.Errorf("[%d] Expected new IPv6Addr's Address capacity to be %d bytes, received %d", idx, sockaddr.IPv6len, c)
- }
-
- if l := len(*ipv6.NetIP()); l != sockaddr.IPv6len {
- t.Errorf("[%d] Expected new IPv6Addr's Address length to be %d bytes, received %d", idx, sockaddr.IPv6len, l)
- }
-
- if s := ipv6.AddressHexString(); s != test.z01_addrHexStr {
- t.Errorf("[%d] Expected address %+q's hexadecimal representation to be %+q, received %+q", idx, test.z00_input, test.z01_addrHexStr, s)
- }
-
- if s := ipv6.AddressBinString(); s != test.z02_addrBinStr {
- t.Errorf("[%d] Expected address %+q's binary representation to be %+q, received %+q", idx, test.z00_input, test.z02_addrBinStr, s)
- }
-
- if s := ipv6.String(); s != test.z03_addrStr {
- t.Errorf("[%d] Expected %+q's String to be %+q, received %+q", idx, test.z00_input, test.z03_addrStr, s)
- }
-
- if s := ipv6.NetIP().String(); s != test.z04_NetIPStringOut {
- t.Errorf("[%d] Expected %+q's address to be %+q, received %+q", idx, test.z00_input, test.z04_NetIPStringOut, s)
- }
-
- if hAddressBigInt.Cmp(test.z05_addrInt) != 0 {
- t.Errorf("[%d] Expected %+q's Address to return %+v, received %+v", idx, test.z00_input, test.z05_addrInt, hAddressBigInt)
- }
-
- n, ok := ipv6.Network().(sockaddr.IPv6Addr)
- if !ok {
- t.Errorf("[%d] Unable to type assert +%q's Network to IPv6Addr", idx, test.z00_input)
- }
-
- nAddressBigInt := big.Int(*n.Address)
- if nAddressBigInt.Cmp(test.z06_netInt) != 0 {
- t.Errorf("[%d] Expected %+q's Network to return %+v, received %+v", idx, test.z00_input, test.z06_netInt, n.Address)
- }
-
- if m := ipv6.NetIPMask().String(); m != test.z07_ipMaskStr {
- t.Errorf("[%d] Expected %+q's mask to be %+q, received %+q", idx, test.z00_input, test.z07_ipMaskStr, m)
- }
-
- if m := ipv6.Maskbits(); m != test.z08_maskbits {
- t.Errorf("[%dr] Expected %+q's port to be %+v, received %+v", idx, test.z00_input, test.z08_maskbits, m)
- }
-
- if n := ipv6.NetIPNet().String(); n != test.z09_NetIPNetStringOut {
- t.Errorf("[%d] Expected %+q's network to be %+q, received %+q", idx, test.z00_input, test.z09_NetIPNetStringOut, n)
- }
-
- ipv6MaskBigInt := big.Int(*ipv6.Mask)
- if ipv6MaskBigInt.Cmp(test.z10_maskInt) != 0 {
- t.Errorf("[%d] Expected %+q's Mask to return %+v, received %+v", idx, test.z00_input, test.z10_maskInt, ipv6MaskBigInt)
- }
-
- nMaskBigInt := big.Int(*n.Mask)
- if nMaskBigInt.Cmp(test.z10_maskInt) != 0 {
- t.Errorf("[%d] Expected %+q's Network's Mask to return %+v, received %+v", idx, test.z00_input, test.z10_maskInt, nMaskBigInt)
- }
-
- // Network()'s mask must match the IPv6Addr's Mask
- if n := ipv6.Network().String(); n != test.z11_networkStr {
- t.Errorf("[%d] Expected %+q's Network() to be %+q, received %+q", idx, test.z00_input, test.z11_networkStr, n)
- }
-
- if o := ipv6.Octets(); len(o) != 16 || cap(o) != 16 ||
- o[0] != test.z12_octets[0] || o[1] != test.z12_octets[1] ||
- o[2] != test.z12_octets[2] || o[3] != test.z12_octets[3] ||
- o[4] != test.z12_octets[4] || o[5] != test.z12_octets[5] ||
- o[6] != test.z12_octets[6] || o[7] != test.z12_octets[7] ||
- o[8] != test.z12_octets[8] || o[9] != test.z12_octets[9] ||
- o[10] != test.z12_octets[10] || o[11] != test.z12_octets[11] ||
- o[12] != test.z12_octets[12] || o[13] != test.z12_octets[13] ||
- o[14] != test.z12_octets[14] || o[15] != test.z12_octets[15] {
- t.Errorf("[%d] Expected %+q's Octets to be %x, received %x", idx, test.z00_input, test.z12_octets, o)
- }
-
- if f := ipv6.FirstUsable().String(); f != test.z13_firstUsable {
- t.Errorf("[%d] Expected %+q's FirstUsable() to be %+q, received %+q", idx, test.z00_input, test.z13_firstUsable, f)
- }
-
- if l := ipv6.LastUsable().String(); l != test.z14_lastUsable {
- t.Errorf("[%d] Expected %+q's LastUsable() to be %+q, received %+q", idx, test.z00_input, test.z14_lastUsable, l)
- }
-
- if p := ipv6.IPPort(); sockaddr.IPPort(p) != test.z16_portInt || sockaddr.IPPort(p) != test.z16_portInt {
- t.Errorf("[%d] Expected %+q's port to be %+v, received %+v", idx, test.z00_input, test.z16_portInt, p)
- }
-
- if dialNet, dialArgs := ipv6.DialPacketArgs(); dialNet != test.z17_DialPacketArgs[0] || dialArgs != test.z17_DialPacketArgs[1] {
- t.Errorf("[%d] Expected %+q's DialPacketArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z17_DialPacketArgs, dialNet, dialArgs)
- }
-
- if dialNet, dialArgs := ipv6.DialStreamArgs(); dialNet != test.z18_DialStreamArgs[0] || dialArgs != test.z18_DialStreamArgs[1] {
- t.Errorf("[%d] Expected %+q's DialStreamArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z18_DialStreamArgs, dialNet, dialArgs)
- }
-
- if listenNet, listenArgs := ipv6.ListenPacketArgs(); listenNet != test.z19_ListenPacketArgs[0] || listenArgs != test.z19_ListenPacketArgs[1] {
- t.Errorf("[%d] Expected %+q's ListenPacketArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z19_ListenPacketArgs, listenNet, listenArgs)
- }
-
- if listenNet, listenArgs := ipv6.ListenStreamArgs(); listenNet != test.z20_ListenStreamArgs[0] || listenArgs != test.z20_ListenStreamArgs[1] {
- t.Errorf("[%d] Expected %+q's ListenStreamArgs() to be %+q, received %+q, %+q", idx, test.z00_input, test.z20_ListenStreamArgs, listenNet, listenArgs)
- }
- })
- }
-}
-
-func TestSockAddr_IPv6Addr_CmpAddress(t *testing.T) {
- tests := []struct {
- a string
- b string
- cmp int
- }{
- { // 0
- a: "2001:4860:0:2001::68/128",
- b: "2001:4860:0:2001::68",
- cmp: 0,
- },
- { // 1
- a: "2607:f0d0:1002:0051:0000:0000:0000:0004/128",
- b: "2607:f0d0:1002:0051:0000:0000:0000:0004",
- cmp: 0,
- },
- { // 2
- a: "2607:f0d0:1002:0051:0000:0000:0000:0004/128",
- b: "2607:f0d0:1002:0051:0000:0000:0000:0004/64",
- cmp: 0,
- },
- { // 3
- a: "2607:f0d0:1002:0051:0000:0000:0000:0004",
- b: "2607:f0d0:1002:0051:0000:0000:0000:0005",
- cmp: -1,
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv6a, err := sockaddr.NewIPv6Addr(test.a)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv6Addr from %+q: %v", idx, test.a, err)
- }
-
- ipv6b, err := sockaddr.NewIPv6Addr(test.b)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv6Addr from %+q: %v", idx, test.b, err)
- }
-
- if x := ipv6a.CmpAddress(ipv6b); x != test.cmp {
- t.Errorf("[%d] IPv6Addr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipv6a, ipv6b, test.cmp, x)
- }
-
- if x := ipv6b.CmpAddress(ipv6a); x*-1 != test.cmp {
- t.Errorf("[%d] IPv6Addr.CmpAddress() failed with %+q with %+q (expected %d, received %d)", idx, ipv6a, ipv6b, test.cmp, x)
- }
- })
- }
-}
-
-func TestSockAddr_IPv6Addr_ContainsAddress(t *testing.T) {
- tests := []struct {
- name string
- input sockaddr.IPv6Addr
- cases []sockaddr.IPv6Addr
- fail bool
- }{
- {
- name: "basic",
- input: sockaddr.MustIPv6Addr("::1/128"),
- cases: []sockaddr.IPv6Addr{
- sockaddr.MustIPv6Addr("::1"),
- sockaddr.MustIPv6Addr("[::1/128]"),
- },
- },
- {
- name: "fail",
- input: sockaddr.MustIPv6Addr("::1/128"),
- cases: []sockaddr.IPv6Addr{
- sockaddr.MustIPv6Addr("100::"),
- },
- fail: true,
- },
- {
- name: "fail2",
- input: sockaddr.MustIPv6Addr("100::/128"),
- cases: []sockaddr.IPv6Addr{
- sockaddr.MustIPv6Addr("::1"),
- },
- fail: true,
- },
- }
-
- for idx, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", idx)
- }
-
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv6 := test.input
-
- for _, tc := range test.cases {
- if ipv6.ContainsAddress(tc.Address) == test.fail {
- t.Errorf("%s: Expected %q.ContainsAddress(%q)==%t", test.name, ipv6, tc, test.fail)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPv6Addr_ContainsNetwork(t *testing.T) {
- tests := []struct {
- input string
- pass []string
- fail []string
- }{
- { // 0
- input: "::1/128",
- pass: []string{
- "::1",
- "[::1/128]",
- },
- fail: []string{
- "100::",
- },
- },
- }
-
- for idx, test := range tests {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- ipv6, err := sockaddr.NewIPv6Addr(test.input)
- if err != nil {
- t.Fatalf("[%d] Unable to create an IPv6Addr from %+q: %v", idx, test.input, err)
- }
-
- for passIdx, passInput := range test.pass {
- passAddr, err := sockaddr.NewIPv6Addr(passInput)
- if err != nil {
- t.Fatalf("[%d/%d] Unable to create an IPv6Addr from %+q: %v", idx, passIdx, passInput, err)
- }
-
- if !passAddr.ContainsNetwork(ipv6) {
- t.Errorf("[%d/%d] Expected %+q to contain %+q", idx, passIdx, test.input, passInput)
- }
- }
-
- for failIdx, failInput := range test.fail {
- failAddr, err := sockaddr.NewIPv6Addr(failInput)
- if err != nil {
- t.Fatalf("[%d/%d] Unable to create an IPv6Addr from %+q: %v", idx, failIdx, failInput, err)
- }
-
- if failAddr.ContainsNetwork(ipv6) {
- t.Errorf("[%d/%d] Expected %+q to contain %+q", idx, failIdx, test.input, failInput)
- }
- }
- })
- }
-}
-
-func TestSockAddr_IPv6Addr_Equal(t *testing.T) {
- tests := []struct {
- name string
- input sockaddr.IPv6Addr
- cases sockaddr.SockAddrs
- fail bool
- }{
- {
- name: "addr equal",
- input: sockaddr.MustIPv6Addr("2001:4860:0:2001::68/128"),
- cases: sockaddr.SockAddrs{
- sockaddr.MustIPv6Addr("2001:4860:0:2001::68"),
- sockaddr.MustIPv6Addr("2001:4860:0:2001::68/128"),
- sockaddr.MustIPv6Addr("[2001:4860:0:2001::68]:0"),
- },
- },
- {
- name: "IPv6Addr not equal",
- input: sockaddr.MustIPv6Addr("2001:4860:0:2001::68/128"),
- cases: sockaddr.SockAddrs{
- sockaddr.MustIPv6Addr("2001:DB8::/48"),
- sockaddr.MustIPv6Addr("2001:4860:0:2001::67/128"),
- sockaddr.MustIPv6Addr("2001:4860:0:2001::67"),
- sockaddr.MustIPv6Addr("[2001:4860:0:2001::68]:80"),
- sockaddr.MustIPv4Addr("1.2.3.4"),
- sockaddr.MustUnixSock("/tmp/foo"),
- },
- fail: true,
- },
- {
- name: "equal CIDR",
- input: sockaddr.MustIPv6Addr("2001:4860:0:2001::68/64"),
- cases: sockaddr.SockAddrs{
- sockaddr.MustIPv6Addr("2001:4860:0:2001::68/64"),
- },
- },
- {
- name: "not equal CIDR",
- input: sockaddr.MustIPv6Addr("2001:4860:0:2001::68/64"),
- cases: sockaddr.SockAddrs{
- sockaddr.MustIPv6Addr("2001:DB8::/48"),
- sockaddr.MustIPv6Addr("2001:4860:0:2001::67/128"),
- sockaddr.MustIPv6Addr("2001:4860:0:2001::67"),
- sockaddr.MustIPv6Addr("[2001:4860:0:2001::68]:80"),
- sockaddr.MustIPv4Addr("1.2.3.4/32"),
- sockaddr.MustUnixSock("/tmp/foo"),
- },
- fail: true,
- },
- }
-
- for idx, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", idx)
- }
-
- t.Run(test.name, func(t *testing.T) {
- ipv6 := test.input
- for _, tc := range test.cases {
- if ipv6.Equal(tc) == test.fail {
- t.Errorf("%s: Expected %s Equal(%q)=%t", test.name, ipv6, tc, test.fail)
- }
- }
- })
- }
-}
-
-func TestIPv6Addr_CmpRFC(t *testing.T) {
- tests := []struct {
- name string
- recv sockaddr.SockAddr
- arg sockaddr.SockAddr
- rfcNum uint
- want int
- }{
- {
- name: "simple in RFC",
- recv: sockaddr.MustIPv6Addr("::1"),
- arg: sockaddr.MustIPv6Addr("100::"),
- rfcNum: 6590,
- },
- {
- name: "ipv6 cmp IPv4",
- recv: sockaddr.MustIPv6Addr("2002:c058:6301::/120"),
- arg: sockaddr.MustIPv4Addr("192.88.99.0/24"),
- rfcNum: 3068,
- want: -1,
- },
- {
- name: "ipv6 cmp IPv4",
- recv: sockaddr.MustIPv6Addr("::1"),
- arg: sockaddr.MustIPv4Addr("1.2.3.4"),
- rfcNum: 6590,
- },
- {
- name: "ipv6 cmp IPv4",
- recv: sockaddr.MustIPv6Addr("::1"),
- arg: sockaddr.MustIPv4Addr("192.168.1.1"),
- rfcNum: 1918,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- if cmp := test.recv.CmpRFC(test.rfcNum, test.arg); cmp != test.want {
- t.Fatalf("%s: want %d got %d", test.name, test.want, cmp)
- }
- })
- }
-}
-
-func TestIPv6Attrs(t *testing.T) {
- const expectedNumAttrs = 2
- attrs := sockaddr.IPv6Attrs()
- if len(attrs) != expectedNumAttrs {
- t.Fatalf("wrong number of IPv6Attrs: %d vs %d", len(attrs), expectedNumAttrs)
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/rfc_test.go b/vendor/github.com/hashicorp/go-sockaddr/rfc_test.go
deleted file mode 100644
index af669a43f..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/rfc_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package sockaddr_test
-
-import (
- "testing"
-
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-func TestVisitAllRFCs(t *testing.T) {
- const expectedNumRFCs = 28
- numRFCs := 0
- sockaddr.VisitAllRFCs(func(rfcNum uint, sas sockaddr.SockAddrs) {
- numRFCs++
- })
- if numRFCs != expectedNumRFCs {
- t.Fatalf("wrong number of RFCs: %d", numRFCs)
- }
-}
-
-func TestIsRFC(t *testing.T) {
- tests := []struct {
- name string
- sa sockaddr.SockAddr
- rfcNum uint
- result bool
- }{
- {
- name: "rfc1918 pass",
- sa: sockaddr.MustIPv4Addr("192.168.0.0/16"),
- rfcNum: 1918,
- result: true,
- },
- {
- name: "rfc1918 fail",
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- rfcNum: 1918,
- result: false,
- },
- {
- name: "rfc1918 pass",
- sa: sockaddr.MustIPv4Addr("192.168.1.1"),
- rfcNum: 1918,
- result: true,
- },
- {
- name: "invalid rfc",
- sa: sockaddr.MustIPv4Addr("192.168.0.0/16"),
- rfcNum: 999999999999,
- result: false,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- result := sockaddr.IsRFC(test.rfcNum, test.sa)
- if result != test.result {
- t.Fatalf("expected a match")
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/route_info_test.go b/vendor/github.com/hashicorp/go-sockaddr/route_info_test.go
deleted file mode 100644
index 1716327e8..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/route_info_test.go
+++ /dev/null
@@ -1,196 +0,0 @@
-package sockaddr
-
-import "testing"
-
-func Test_parseBSDDefaultIfName(t *testing.T) {
- testCases := []struct {
- name string
- routeOut string
- want string
- }{
- {
- name: "macOS Sierra 10.12 - Common",
- routeOut: ` route to: default
-destination: default
- mask: default
- gateway: 10.23.9.1
- interface: en0
- flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
- recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
- 0 0 0 0 0 0 1500 0
-`,
- want: "en0",
- },
- }
-
- for _, tc := range testCases {
- t.Run(tc.name, func(t *testing.T) {
- got, err := parseDefaultIfNameFromRoute(tc.routeOut)
- if err != nil {
- t.Fatalf("unable to parse default interface from route output: %v", err)
- }
-
- if got != tc.want {
- t.Errorf("got %s; want %s", got, tc.want)
- }
- })
- }
-}
-
-func Test_parseLinuxDefaultIfName(t *testing.T) {
- testCases := []struct {
- name string
- routeOut string
- want string
- }{
- {
- name: "Linux Ubuntu 14.04 - Common",
- routeOut: `default via 10.1.2.1 dev eth0
-10.1.2.0/24 dev eth0 proto kernel scope link src 10.1.2.5
-`,
- want: "eth0",
- },
- {
- name: "Chromebook - 8743.85.0 (Official Build) stable-channel gandof, Milestone 54",
- routeOut: `default via 192.168.1.1 dev wlan0 metric 1
-192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.174
-`,
- want: "wlan0",
- },
- }
-
- for _, tc := range testCases {
- t.Run(tc.name, func(t *testing.T) {
- got, err := parseDefaultIfNameFromIPCmd(tc.routeOut)
- if err != nil {
- t.Fatalf("unable to parse default interface from route output: %v", err)
- }
-
- if got != tc.want {
- t.Errorf("got %+q; want %+q", got, tc.want)
- }
- })
- }
-}
-
-func Test_parseWindowsDefaultIfName(t *testing.T) {
- testCases := []struct {
- name string
- routeOut string
- ipconfigOut string
- want string
- }{
- {
- name: "Windows 10 - Enterprise",
- routeOut: `===========================================================================
-Interface List
- 10...08 00 27 a2 e9 51 ......Intel(R) PRO/1000 MT Desktop Adapter
- 13...08 00 27 35 02 ed ......Intel(R) PRO/1000 MT Desktop Adapter #2
- 1...........................Software Loopback Interface 1
- 5...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
- 8...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
-===========================================================================
-
-IPv4 Route Table
-===========================================================================
-Active Routes:
-Network Destination Netmask Gateway Interface Metric
- 0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 25
- 10.0.2.0 255.255.255.0 On-link 10.0.2.15 281
- 10.0.2.15 255.255.255.255 On-link 10.0.2.15 281
- 10.0.2.255 255.255.255.255 On-link 10.0.2.15 281
- 127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
- 127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
- 127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
- 192.168.56.0 255.255.255.0 On-link 192.168.56.100 281
- 192.168.56.100 255.255.255.255 On-link 192.168.56.100 281
- 192.168.56.255 255.255.255.255 On-link 192.168.56.100 281
- 224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
- 224.0.0.0 240.0.0.0 On-link 192.168.56.100 281
- 224.0.0.0 240.0.0.0 On-link 10.0.2.15 281
- 255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
- 255.255.255.255 255.255.255.255 On-link 192.168.56.100 281
- 255.255.255.255 255.255.255.255 On-link 10.0.2.15 281
-===========================================================================
-Persistent Routes:
- None
-
-IPv6 Route Table
-===========================================================================
-Active Routes:
- If Metric Network Destination Gateway
- 1 331 ::1/128 On-link
- 13 281 fe80::/64 On-link
- 10 281 fe80::/64 On-link
- 13 281 fe80::60cc:155f:77a4:ab99/128
- On-link
- 10 281 fe80::cccc:710e:f5bb:3088/128
- On-link
- 1 331 ff00::/8 On-link
- 13 281 ff00::/8 On-link
- 10 281 ff00::/8 On-link
-===========================================================================
-Persistent Routes:
- None
-`,
- ipconfigOut: `Windows IP Configuration
-
-
-Ethernet adapter Ethernet:
-
- Connection-specific DNS Suffix . : host.example.org
- Link-local IPv6 Address . . . . . : fe80::cccc:710e:f5bb:3088%10
- IPv4 Address. . . . . . . . . . . : 10.0.2.15
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Default Gateway . . . . . . . . . : 10.0.2.2
-
-Ethernet adapter Ethernet 2:
-
- Connection-specific DNS Suffix . :
- Link-local IPv6 Address . . . . . : fe80::60cc:155f:77a4:ab99%13
- IPv4 Address. . . . . . . . . . . : 192.168.56.100
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Default Gateway . . . . . . . . . :
-
-Tunnel adapter isatap.host.example.org:
-
- Media State . . . . . . . . . . . : Media disconnected
- Connection-specific DNS Suffix . :
-
-Tunnel adapter Reusable ISATAP Interface {F3F2E4A5-8823-40E5-87EA-1F6881BACC95}:
-
- Media State . . . . . . . . . . . : Media disconnected
- Connection-specific DNS Suffix . : host.example.org
-`,
- want: "Ethernet",
- },
- }
-
- for _, tc := range testCases {
- t.Run(tc.name, func(t *testing.T) {
- got, err := parseDefaultIfNameWindows(tc.routeOut, tc.ipconfigOut)
- if err != nil {
- t.Fatalf("unable to parse default interface from route output: %v", err)
- }
-
- if got != tc.want {
- t.Errorf("got %s; want %s", got, tc.want)
- }
- })
- }
-}
-
-func Test_VisitComands(t *testing.T) {
- ri, err := NewRouteInfo()
- if err != nil {
- t.Fatalf("bad: %v", err)
- }
-
- var count int
- ri.VisitCommands(func(name string, cmd []string) {
- count++
- })
- if count == 0 {
- t.Fatalf("Expected more than 0 items")
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/sockaddr_test.go b/vendor/github.com/hashicorp/go-sockaddr/sockaddr_test.go
deleted file mode 100644
index 2471beb24..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/sockaddr_test.go
+++ /dev/null
@@ -1,440 +0,0 @@
-package sockaddr_test
-
-import (
- "encoding/json"
- "fmt"
- "testing"
-
- "github.com/hashicorp/go-sockaddr"
-)
-
-// TODO(sean@): Either extend this test to include IPv6Addr and UnixSock, or
-// remove and find a good home to test this functionality elsewhere.
-
-func TestSockAddr_New(t *testing.T) {
- type SockAddrFixture struct {
- input string
- ResultType string
- NetworkAddress string
- BroadcastAddress string
- IPUint32 sockaddr.IPv4Address
- Maskbits int
- BinString string
- HexString string
- FirstUsableAddress string
- LastUsableAddress string
- }
- type SockAddrFixtures []SockAddrFixtures
-
- goodResults := []SockAddrFixture{
- {
- input: "0.0.0.0",
- ResultType: "ipv4",
- NetworkAddress: "0.0.0.0",
- BroadcastAddress: "0.0.0.0",
- Maskbits: 32,
- IPUint32: 0,
- BinString: "00000000000000000000000000000000",
- HexString: "00000000",
- FirstUsableAddress: "0.0.0.0",
- LastUsableAddress: "0.0.0.0",
- },
- {
- input: "0.0.0.0/0",
- ResultType: "ipv4",
- NetworkAddress: "0.0.0.0",
- BroadcastAddress: "255.255.255.255",
- Maskbits: 0,
- IPUint32: 0,
- BinString: "00000000000000000000000000000000",
- HexString: "00000000",
- FirstUsableAddress: "0.0.0.1",
- LastUsableAddress: "255.255.255.254",
- },
- {
- input: "0.0.0.1",
- ResultType: "ipv4",
- NetworkAddress: "0.0.0.1",
- BroadcastAddress: "0.0.0.1",
- Maskbits: 32,
- IPUint32: 1,
- BinString: "00000000000000000000000000000001",
- HexString: "00000001",
- FirstUsableAddress: "0.0.0.1",
- LastUsableAddress: "0.0.0.1",
- },
- {
- input: "0.0.0.1/1",
- ResultType: "ipv4",
- NetworkAddress: "0.0.0.0",
- BroadcastAddress: "127.255.255.255",
- Maskbits: 1,
- IPUint32: 1,
- BinString: "00000000000000000000000000000001",
- HexString: "00000001",
- FirstUsableAddress: "0.0.0.1",
- LastUsableAddress: "127.255.255.254",
- },
- {
- input: "128.0.0.0",
- ResultType: "ipv4",
- NetworkAddress: "128.0.0.0",
- BroadcastAddress: "128.0.0.0",
- Maskbits: 32,
- IPUint32: 2147483648,
- BinString: "10000000000000000000000000000000",
- HexString: "80000000",
- FirstUsableAddress: "128.0.0.0",
- LastUsableAddress: "128.0.0.0",
- },
- {
- input: "255.255.255.255",
- ResultType: "ipv4",
- NetworkAddress: "255.255.255.255",
- BroadcastAddress: "255.255.255.255",
- Maskbits: 32,
- IPUint32: 4294967295,
- BinString: "11111111111111111111111111111111",
- HexString: "ffffffff",
- FirstUsableAddress: "255.255.255.255",
- LastUsableAddress: "255.255.255.255",
- },
- {
- input: "1.2.3.4",
- ResultType: "ipv4",
- NetworkAddress: "1.2.3.4",
- BroadcastAddress: "1.2.3.4",
- Maskbits: 32,
- IPUint32: 16909060,
- BinString: "00000001000000100000001100000100",
- HexString: "01020304",
- FirstUsableAddress: "1.2.3.4",
- LastUsableAddress: "1.2.3.4",
- },
- {
- input: "192.168.10.10/16",
- ResultType: "ipv4",
- NetworkAddress: "192.168.0.0",
- BroadcastAddress: "192.168.255.255",
- Maskbits: 16,
- IPUint32: 3232238090,
- BinString: "11000000101010000000101000001010",
- HexString: "c0a80a0a",
- FirstUsableAddress: "192.168.0.1",
- LastUsableAddress: "192.168.255.254",
- },
- {
- input: "192.168.1.10/24",
- ResultType: "ipv4",
- NetworkAddress: "192.168.1.0",
- BroadcastAddress: "192.168.1.255",
- Maskbits: 24,
- IPUint32: 3232235786,
- BinString: "11000000101010000000000100001010",
- HexString: "c0a8010a",
- FirstUsableAddress: "192.168.1.1",
- LastUsableAddress: "192.168.1.254",
- },
- {
- input: "192.168.0.1",
- ResultType: "ipv4",
- NetworkAddress: "192.168.0.1",
- BroadcastAddress: "192.168.0.1",
- Maskbits: 32,
- IPUint32: 3232235521,
- BinString: "11000000101010000000000000000001",
- HexString: "c0a80001",
- FirstUsableAddress: "192.168.0.1",
- LastUsableAddress: "192.168.0.1",
- },
- {
- input: "192.168.0.2/31",
- ResultType: "ipv4",
- NetworkAddress: "192.168.0.2",
- BroadcastAddress: "192.168.0.3",
- Maskbits: 31,
- IPUint32: 3232235522,
- BinString: "11000000101010000000000000000010",
- HexString: "c0a80002",
- FirstUsableAddress: "192.168.0.2",
- LastUsableAddress: "192.168.0.3",
- },
- {
- input: "240.0.0.0/4",
- ResultType: "ipv4",
- NetworkAddress: "240.0.0.0",
- BroadcastAddress: "255.255.255.255",
- Maskbits: 4,
- IPUint32: 4026531840,
- BinString: "11110000000000000000000000000000",
- HexString: "f0000000",
- FirstUsableAddress: "240.0.0.1",
- LastUsableAddress: "255.255.255.254",
- },
- }
-
- for idx, r := range goodResults {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- var (
- addr sockaddr.IPAddr
- str string
- )
-
- sa, err := sockaddr.NewSockAddr(r.input)
- if err != nil {
- t.Fatalf("Failed parse %s", r.input)
- }
-
- switch r.ResultType {
- case "ipv4":
- ipv4b, err := sockaddr.NewIPv4Addr(r.input)
- if err != nil {
- t.Fatalf("[%d] Unable to construct a new IPv4 from %s: %s", idx, r.input, err)
- }
- if !ipv4b.Equal(sa) {
- t.Fatalf("[%d] Equality comparison failed on fresh IPv4", idx)
- }
-
- type_ := sa.Type()
- if type_ != sockaddr.TypeIPv4 {
- t.Fatalf("[%d] Type mismatch for %s: %d", idx, r.input, type_)
- }
-
- ipv4 := sockaddr.ToIPv4Addr(sa)
- if ipv4 == nil {
- t.Fatalf("[%d] Failed ToIPv4Addr() %s", idx, r.input)
- }
-
- addr = ipv4.Broadcast()
- if addr == nil || addr.NetIP().To4().String() != r.BroadcastAddress {
- t.Fatalf("Failed IPv4Addr.BroadcastAddress() %s: expected %+q, received %+q", r.input, r.BroadcastAddress, addr.NetIP().To4().String())
- }
-
- maskbits := ipv4.Maskbits()
- if maskbits != r.Maskbits {
- t.Fatalf("Failed Maskbits %s: %d != %d", r.input, maskbits, r.Maskbits)
- }
-
- if ipv4.Address != r.IPUint32 {
- t.Fatalf("Failed ToUint32() %s: %d != %d", r.input, ipv4.Address, r.IPUint32)
- }
-
- str = ipv4.AddressBinString()
- if str != r.BinString {
- t.Fatalf("Failed BinString %s: %s != %s", r.input, str, r.BinString)
- }
-
- str = ipv4.AddressHexString()
- if str != r.HexString {
- t.Fatalf("Failed HexString %s: %s != %s", r.input, str, r.HexString)
- }
-
- addr = ipv4.Network()
- if addr == nil || addr.NetIP().To4().String() != r.NetworkAddress {
- t.Fatalf("Failed NetworkAddress %s: %s != %s", r.input, addr.NetIP().To4().String(), r.NetworkAddress)
- }
-
- addr = ipv4.FirstUsable()
- if addr == nil || addr.NetIP().To4().String() != r.FirstUsableAddress {
- t.Fatalf("Failed FirstUsableAddress %s: %s != %s", r.input, addr.NetIP().To4().String(), r.FirstUsableAddress)
- }
-
- addr = ipv4.LastUsable()
- if addr == nil || addr.NetIP().To4().String() != r.LastUsableAddress {
- t.Fatalf("Failed LastUsableAddress %s: %s != %s", r.input, addr.NetIP().To4().String(), r.LastUsableAddress)
- }
- default:
- t.Fatalf("Unknown result type: %s", r.ResultType)
- }
- })
- }
-
- badResults := []string{
- "256.0.0.0",
- "0.0.0.0.0",
- }
-
- for idx, badIP := range badResults {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- sa, err := sockaddr.NewSockAddr(badIP)
- if err == nil {
- t.Fatalf("Failed should have failed to parse %s: %v", badIP, sa)
- }
- if sa != nil {
- t.Fatalf("SockAddr should be nil")
- }
- })
- }
-
-}
-
-func TestSockAddrAttrs(t *testing.T) {
- const expectedNumAttrs = 2
- saa := sockaddr.SockAddrAttrs()
- if len(saa) != expectedNumAttrs {
- t.Fatalf("wrong number of SockAddrAttrs: %d vs %d", len(saa), expectedNumAttrs)
- }
-
- tests := []struct {
- name string
- sa sockaddr.SockAddr
- attr sockaddr.AttrName
- want string
- }{
- {
- name: "type",
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- attr: "type",
- want: "IPv4",
- },
- {
- name: "string",
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- attr: "string",
- want: "1.2.3.4",
- },
- {
- name: "invalid",
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- attr: "ENOENT",
- want: "",
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- result := sockaddr.SockAddrAttr(test.sa, test.attr)
- if result != test.want {
- t.Fatalf("%s: expected %s got %s", test.name, test.want, result)
- }
- }
-}
-
-func TestToFoo(t *testing.T) {
- tests := []struct {
- name string
- sa sockaddr.SockAddr
- passIP bool
- passIPv4 bool
- passIPv6 bool
- passUnix bool
- }{
- {
- name: "ipv4",
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- passIP: true,
- passIPv4: true,
- },
- {
- name: "ipv6",
- sa: sockaddr.MustIPv6Addr("::1"),
- passIP: true,
- passIPv6: true,
- },
- {
- name: "unix",
- sa: sockaddr.MustUnixSock("/tmp/foo"),
- passUnix: true,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d must have a name", i)
- }
-
- switch us := sockaddr.ToUnixSock(test.sa); {
- case us == nil && test.passUnix,
- us != nil && !test.passUnix:
- t.Fatalf("bad")
- }
-
- switch ip := sockaddr.ToIPAddr(test.sa); {
- case ip == nil && test.passIP,
- ip != nil && !test.passIP:
- t.Fatalf("bad")
- }
-
- switch ipv4 := sockaddr.ToIPv4Addr(test.sa); {
- case ipv4 == nil && test.passIPv4,
- ipv4 != nil && !test.passIPv4:
- t.Fatalf("bad")
- }
-
- switch ipv6 := sockaddr.ToIPv6Addr(test.sa); {
- case ipv6 == nil && test.passIPv6,
- ipv6 != nil && !test.passIPv6:
- t.Fatalf("bad")
- }
- }
-
-}
-
-func TestSockAddrMarshaler(t *testing.T) {
- addr := "192.168.10.24/24"
- sa, err := sockaddr.NewSockAddr(addr)
- if err != nil {
- t.Fatal(err)
- }
- sam := &sockaddr.SockAddrMarshaler{
- SockAddr: sa,
- }
- marshaled, err := json.Marshal(sam)
- if err != nil {
- t.Fatal(err)
- }
- sam2 := &sockaddr.SockAddrMarshaler{}
- err = json.Unmarshal(marshaled, sam2)
- if err != nil {
- t.Fatal(err)
- }
- if sam.SockAddr.String() != sam2.SockAddr.String() {
- t.Fatalf("mismatch after marshaling: %s vs %s", sam.SockAddr.String(), sam2.SockAddr.String())
- }
- if sam2.SockAddr.String() != addr {
- t.Fatalf("mismatch after marshaling: %s vs %s", addr, sam2.SockAddr.String())
- }
-}
-
-func TestSockAddrMultiMarshaler(t *testing.T) {
- addr := "192.168.10.24/24"
- type d struct {
- Addr *sockaddr.SockAddrMarshaler
- Addrs []*sockaddr.SockAddrMarshaler
- }
- sa, err := sockaddr.NewSockAddr(addr)
- if err != nil {
- t.Fatal(err)
- }
- myD := &d{
- Addr: &sockaddr.SockAddrMarshaler{SockAddr: sa},
- Addrs: []*sockaddr.SockAddrMarshaler{
- &sockaddr.SockAddrMarshaler{SockAddr: sa},
- &sockaddr.SockAddrMarshaler{SockAddr: sa},
- &sockaddr.SockAddrMarshaler{SockAddr: sa},
- },
- }
- marshaled, err := json.Marshal(myD)
- if err != nil {
- t.Fatal(err)
- }
- var myD2 d
- err = json.Unmarshal(marshaled, &myD2)
- if err != nil {
- t.Fatal(err)
- }
- if myD.Addr.String() != myD2.Addr.String() {
- t.Fatalf("mismatch after marshaling: %s vs %s", myD.Addr.String(), myD2.Addr.String())
- }
- if len(myD.Addrs) != len(myD2.Addrs) {
- t.Fatalf("mismatch after marshaling: %d vs %d", len(myD.Addrs), len(myD2.Addrs))
- }
- for i, v := range myD.Addrs {
- if v.String() != myD2.Addrs[i].String() {
- t.Fatalf("mismatch after marshaling: %s vs %s", v.String(), myD2.Addrs[i].String())
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/sockaddrs_test.go b/vendor/github.com/hashicorp/go-sockaddr/sockaddrs_test.go
deleted file mode 100644
index 118cf5b1e..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/sockaddrs_test.go
+++ /dev/null
@@ -1,338 +0,0 @@
-package sockaddr_test
-
-import (
- "fmt"
- "math/rand"
- "testing"
-
- "github.com/hashicorp/consul/lib"
- "github.com/hashicorp/go-sockaddr"
-)
-
-func init() {
- lib.SeedMathRand()
-}
-
-// NOTE: A number of these code paths are exercised in template/ and
-// cmd/sockaddr/
-
-// sockAddrStringInputs allows for easy test creation by developers.
-// Parallel arrays of string inputs are converted to their SockAddr
-// equivalents for use by unit tests.
-type sockAddrStringInputs []struct {
- inputAddrs []string
- sortedAddrs []string
- sortedTypes []sockaddr.SockAddrType
- sortFuncs []sockaddr.CmpAddrFunc
- numIPv4Inputs int
- numIPv6Inputs int
- numUnixInputs int
-}
-
-func convertToSockAddrs(t *testing.T, inputs []string) sockaddr.SockAddrs {
- sockAddrs := make(sockaddr.SockAddrs, 0, len(inputs))
- for i, input := range inputs {
- sa, err := sockaddr.NewSockAddr(input)
- if err != nil {
- t.Fatalf("[%d] Invalid SockAddr input for %+q: %v", i, input, err)
- }
- sockAddrs = append(sockAddrs, sa)
- }
-
- return sockAddrs
-}
-
-// shuffleStrings randomly shuffles the list of strings
-func shuffleStrings(list []string) {
- for i := range list {
- j := rand.Intn(i + 1)
- list[i], list[j] = list[j], list[i]
- }
-}
-
-func TestSockAddr_SockAddrs_AscAddress(t *testing.T) {
- testInputs := sockAddrStringInputs{
- { // testNum: 0
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscAddress,
- },
- numIPv4Inputs: 9,
- numIPv6Inputs: 1,
- numUnixInputs: 0,
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "128.95.120.2:53",
- "128.95.120.2/32",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "128.95.120.2:8600",
- "240.0.0.1/4",
- "::",
- },
- sortedAddrs: []string{
- "10.0.0.0/8",
- "128.95.120.1/32",
- "128.95.120.2:53",
- "128.95.120.2/32",
- "128.95.120.2:8600",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "240.0.0.1/4",
- "::",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- shuffleStrings(test.inputAddrs)
- inputSockAddrs := convertToSockAddrs(t, test.inputAddrs)
- sas := convertToSockAddrs(t, test.sortedAddrs)
- sortedIPv4Addrs, nonIPv4Addrs := sas.FilterByType(sockaddr.TypeIPv4)
- if l := len(sortedIPv4Addrs); l != test.numIPv4Inputs {
- t.Fatal("[%d] Missing IPv4Addrs: expected %d, received %d", idx, test.numIPv4Inputs, l)
- }
- if len(nonIPv4Addrs) != test.numIPv6Inputs+test.numUnixInputs {
- t.Fatal("[%d] Non-IPv4 Address in input", idx)
- }
-
- // Copy inputAddrs so we can manipulate it. wtb const.
- sockAddrs := append(sockaddr.SockAddrs(nil), inputSockAddrs...)
- filteredAddrs, _ := sockAddrs.FilterByType(sockaddr.TypeIPv4)
- sockaddr.OrderedAddrBy(test.sortFuncs...).Sort(filteredAddrs)
- ipv4SockAddrs, nonIPv4s := filteredAddrs.FilterByType(sockaddr.TypeIPv4)
- if len(nonIPv4s) != 0 {
- t.Fatalf("[%d] bad", idx)
- }
-
- for i, ipv4SockAddr := range ipv4SockAddrs {
- ipv4Addr := sockaddr.ToIPv4Addr(ipv4SockAddr)
- sortedIPv4Addr := sockaddr.ToIPv4Addr(sortedIPv4Addrs[i])
- if ipv4Addr.Address != sortedIPv4Addr.Address {
- t.Errorf("[%d/%d] Sort equality failed: expected %s, received %s", idx, i, sortedIPv4Addrs[i], ipv4Addr)
- }
- }
- })
- }
-}
-
-func TestSockAddr_SockAddrs_AscPrivate(t *testing.T) {
- testInputs := []struct {
- sortFuncs []sockaddr.CmpAddrFunc
- inputAddrs []string
- sortedAddrs []string
- }{
- { // testNum: 0
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscType,
- sockaddr.AscPrivate,
- sockaddr.AscAddress,
- sockaddr.AscType,
- sockaddr.AscAddress,
- sockaddr.AscPort,
- },
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "128.95.120.1/32",
- "128.95.120.2/32",
- "128.95.120.2:53",
- "128.95.120.2:8600",
- "240.0.0.1/4",
- "::",
- },
- sortedAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "192.168.0.0/16",
- "192.168.0.0/16",
- "192.168.1.10/24",
- "240.0.0.1/4",
- "128.95.120.1/32",
- "128.95.120.2/32",
- // "128.95.120.2:53",
- // "128.95.120.2:8600",
- // "::",
- },
- },
- {
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscType,
- sockaddr.AscPrivate,
- sockaddr.AscAddress,
- },
- inputAddrs: []string{
- "1.2.3.4:53",
- "192.168.1.2",
- "/tmp/foo",
- "[cc::1]:8600",
- "[::1]:53",
- },
- sortedAddrs: []string{
- "/tmp/foo",
- "192.168.1.2",
- "1.2.3.4:53",
- "[::1]:53",
- "[cc::1]:8600",
- },
- },
- {
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscType,
- sockaddr.AscPrivate,
- sockaddr.AscAddress,
- },
- inputAddrs: []string{
- "/tmp/foo",
- "/tmp/bar",
- "1.2.3.4",
- },
- sortedAddrs: []string{
- "/tmp/bar",
- "/tmp/foo",
- "1.2.3.4",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
-
- inputAddrs := append([]string(nil), test.inputAddrs...)
- shuffleStrings(inputAddrs)
- inputSockAddrs := convertToSockAddrs(t, inputAddrs)
-
- sockaddr.OrderedAddrBy(test.sortFuncs...).Sort(inputSockAddrs)
-
- for i, sockAddr := range sortedAddrs {
- if !sockAddr.Equal(inputSockAddrs[i]) {
- t.Logf("Input Addrs:\t%+v", inputAddrs)
- t.Logf("Sorted Addrs:\t%+v", inputSockAddrs)
- t.Logf("Expected Addrs:\t%+v", test.sortedAddrs)
- t.Fatalf("[%d/%d] Sort AscType/AscAddress failed: expected %+q, received %+q", idx, i, sockAddr, inputSockAddrs[i])
- }
- }
- })
- }
-}
-
-func TestSockAddr_SockAddrs_AscPort(t *testing.T) {
- testInputs := []struct {
- name string
- sortFuncs []sockaddr.CmpAddrFunc
- inputAddrs []string
- sortedAddrs []string
- }{
- {
- name: "simple port test",
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscPort,
- sockaddr.AscType,
- },
- inputAddrs: []string{
- "1.2.3.4:53",
- "/tmp/foo",
- "[::1]:53",
- },
- sortedAddrs: []string{
- "/tmp/foo",
- "1.2.3.4:53",
- "[::1]:53",
- },
- },
- {
- name: "simple port test",
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscPort,
- sockaddr.AscType,
- },
- inputAddrs: []string{
- "1.2.3.4:53",
- "/tmp/foo",
- },
- sortedAddrs: []string{
- "/tmp/foo",
- "1.2.3.4:53",
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(test.name, func(t *testing.T) {
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
-
- inputAddrs := append([]string(nil), test.inputAddrs...)
- shuffleStrings(inputAddrs)
- inputSockAddrs := convertToSockAddrs(t, inputAddrs)
-
- sockaddr.OrderedAddrBy(test.sortFuncs...).Sort(inputSockAddrs)
-
- for i, sockAddr := range sortedAddrs {
- if !sockAddr.Equal(inputSockAddrs[i]) {
- t.Logf("Input Addrs:\t%+v", inputAddrs)
- t.Logf("Sorted Addrs:\t%+v", inputSockAddrs)
- t.Logf("Expected Addrs:\t%+v", test.sortedAddrs)
- t.Fatalf("[%d/%d] Sort AscType/AscAddress failed: expected %+q, received %+q", idx, i, sockAddr, inputSockAddrs[i])
- }
- }
- })
- }
-}
-
-func TestSockAddr_SockAddrs_AscType(t *testing.T) {
- testInputs := sockAddrStringInputs{
- { // testNum: 0
- sortFuncs: []sockaddr.CmpAddrFunc{
- sockaddr.AscType,
- },
- inputAddrs: []string{
- "10.0.0.0/8",
- "172.16.1.3/12",
- "128.95.120.2:53",
- "::",
- "128.95.120.2/32",
- "192.168.0.0/16",
- "128.95.120.1/32",
- "192.168.1.10/24",
- "128.95.120.2:8600",
- "240.0.0.1/4",
- },
- sortedTypes: []sockaddr.SockAddrType{
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv4,
- sockaddr.TypeIPv6,
- },
- },
- }
-
- for idx, test := range testInputs {
- t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
- shuffleStrings(test.inputAddrs)
-
- inputSockAddrs := convertToSockAddrs(t, test.inputAddrs)
- sortedAddrs := convertToSockAddrs(t, test.sortedAddrs)
-
- sockaddr.OrderedAddrBy(test.sortFuncs...).Sort(inputSockAddrs)
-
- for i, sockAddr := range sortedAddrs {
- if sockAddr.Type() != sortedAddrs[i].Type() {
- t.Errorf("[%d/%d] Sort AscType failed: expected %+q, received %+q", idx, i, sortedAddrs[i], sockAddr)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile b/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile
deleted file mode 100644
index ce1e274e4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile
+++ /dev/null
@@ -1,2 +0,0 @@
-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
deleted file mode 100644
index c40905af7..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/template/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/go-sockaddr/template/doc.go b/vendor/github.com/hashicorp/go-sockaddr/template/doc.go
deleted file mode 100644
index 8cc6730a4..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/template/doc.go
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
-
-Package sockaddr/template provides a text/template interface the SockAddr helper
-functions. The primary entry point into the sockaddr/template package is
-through its Parse() call. For example:
-
- import (
- "fmt"
-
- template "github.com/hashicorp/go-sockaddr/template"
- )
-
- results, err := template.Parse(`{{ GetPrivateIP }}`)
- if err != nil {
- fmt.Errorf("Unable to find a private IP address: %v", err)
- }
- fmt.Printf("My Private IP address is: %s\n", results)
-
-Below is a list of builtin template functions and details re: their usage. It
-is possible to add additional functions by calling ParseIfAddrsTemplate
-directly.
-
-In general, the calling convention for this template library is to seed a list
-of initial interfaces via one of the Get*Interfaces() calls, then filter, sort,
-and extract the necessary attributes for use as string input. This template
-interface is primarily geared toward resolving specific values that are only
-available at runtime, but can be defined as a heuristic for execution when a
-config file is parsed.
-
-All functions, unless noted otherwise, return an array of IfAddr structs making
-it possible to `sort`, `filter`, `limit`, seek (via the `offset` function), or
-`unique` the list. To extract useful string information, the `attr` and `join`
-functions return a single string value. See below for details.
-
-Important note: see the
-https://github.com/hashicorp/go-sockaddr/tree/master/cmd/sockaddr utility for
-more examples and for a CLI utility to experiment with the template syntax.
-
-`GetAllInterfaces` - Returns an exhaustive set of IfAddr structs available on
-the host. `GetAllInterfaces` is the initial input and accessible as the initial
-"dot" in the pipeline.
-
-Example:
-
- {{ GetAllInterfaces }}
-
-
-`GetDefaultInterfaces` - Returns one IfAddr for every IP that is on the
-interface containing the default route for the host.
-
-Example:
-
- {{ GetDefaultInterfaces }}
-
-`GetPrivateInterfaces` - Returns one IfAddr for every forwardable IP address
-that is included in RFC 6890 and whose interface is marked as up. NOTE: RFC 6890 is a more exhaustive
-version of RFC1918 because it spans IPv4 and IPv6, however, RFC6890 does permit the
-inclusion of likely undesired addresses such as multicast, therefore our version
-of "private" also filters out non-forwardable addresses.
-
-Example:
-
- {{ GetPrivateInterfaces | sort "default" | join "address" " " }}
-
-
-`GetPublicInterfaces` - Returns a list of IfAddr structs whos IPs are
-forwardable, do not match RFC 6890, and whose interface is marked up.
-
-Example:
-
- {{ GetPublicInterfaces | sort "default" | join "name" " " }}
-
-
-`GetPrivateIP` - Helper function that returns a string of the first IP address
-from GetPrivateInterfaces.
-
-Example:
-
- {{ GetPrivateIP }}
-
-
-`GetPrivateIPs` - Helper function that returns a string of the all private IP
-addresses on the host.
-
-Example:
-
- {{ GetPrivateIPs }}
-
-
-`GetPublicIP` - Helper function that returns a string of the first IP from
-GetPublicInterfaces.
-
-Example:
-
- {{ GetPublicIP }}
-
-`GetPublicIPs` - Helper function that returns a space-delimited string of the
-all public IP addresses on the host.
-
-Example:
-
- {{ GetPrivateIPs }}
-
-
-`GetInterfaceIP` - Helper function that returns a string of the first IP from
-the named interface.
-
-Example:
-
- {{ GetInterfaceIP "en0" }}
-
-
-
-`GetInterfaceIPs` - Helper function that returns a space-delimited list of all
-IPs on a given interface.
-
-Example:
-
- {{ GetInterfaceIPs "en0" }}
-
-
-`sort` - Sorts the IfAddrs result based on its arguments. `sort` takes one
-argument, a list of ways to sort its IfAddrs argument. The list of sort
-criteria is comma separated (`,`):
- - `address`, `+address`: Ascending sort of IfAddrs by Address
- - `-address`: Descending sort of IfAddrs by Address
- - `default`, `+default`: Ascending sort of IfAddrs, IfAddr with a default route first
- - `-default`: Descending sort of IfAddrs, IfAttr with default route last
- - `name`, `+name`: Ascending sort of IfAddrs by lexical ordering of interface name
- - `-name`: Descending sort of IfAddrs by lexical ordering of interface name
- - `port`, `+port`: Ascending sort of IfAddrs by port number
- - `-port`: Descending sort of IfAddrs by port number
- - `private`, `+private`: Ascending sort of IfAddrs with private addresses first
- - `-private`: Descending sort IfAddrs with private addresses last
- - `size`, `+size`: Ascending sort of IfAddrs by their network size as determined
- by their netmask (larger networks first)
- - `-size`: Descending sort of IfAddrs by their network size as determined by their
- netmask (smaller networks first)
- - `type`, `+type`: Ascending sort of IfAddrs by the type of the IfAddr (Unix,
- IPv4, then IPv6)
- - `-type`: Descending sort of IfAddrs by the type of the IfAddr (IPv6, IPv4, Unix)
-
-Example:
-
- {{ GetPrivateInterfaces | sort "default,-type,size,+address" }}
-
-
-`exclude` and `include`: Filters IfAddrs based on the selector criteria and its
-arguments. Both `exclude` and `include` take two arguments. The list of
-available filtering criteria is:
- - "address": Filter IfAddrs based on a regexp matching the string representation
- of the address
- - "flag","flags": Filter IfAddrs based on the list of flags specified. Multiple
- flags can be passed together using the pipe character (`|`) to create an inclusive
- bitmask of flags. The list of flags is included below.
- - "name": Filter IfAddrs based on a regexp matching the interface name.
- - "network": Filter IfAddrs based on whether a netowkr is included in a given
- CIDR. More than one CIDR can be passed in if each network is separated by
- the pipe character (`|`).
- - "port": Filter IfAddrs based on an exact match of the port number (number must
- be expressed as a string)
- - "rfc", "rfcs": Filter IfAddrs based on the matching RFC. If more than one RFC
- is specified, the list of RFCs can be joined together using the pipe character (`|`).
- - "size": Filter IfAddrs based on the exact match of the mask size.
- - "type": Filter IfAddrs based on their SockAddr type. Multiple types can be
- specified together by using the pipe character (`|`). Valid types include:
- `ip`, `ipv4`, `ipv6`, and `unix`.
-
-Example:
-
- {{ GetPrivateInterfaces | exclude "type" "IPv6" }}
-
-
-`unique`: Removes duplicate entries from the IfAddrs list, assuming the list has
-already been sorted. `unique` only takes one argument:
- - "address": Removes duplicates with the same address
- - "name": Removes duplicates with the same interface names
-
-Example:
-
- {{ GetAllInterfaces | sort "default,-type,address" | unique "name" }}
-
-
-`limit`: Reduces the size of the list to the specified value.
-
-Example:
-
- {{ GetPrivateInterfaces | limit 1 }}
-
-
-`offset`: Seeks into the list by the specified value. A negative value can be
-used to seek from the end of the list.
-
-Example:
-
- {{ GetPrivateInterfaces | offset "-2" | limit 1 }}
-
-
-`math`: Perform a "math" operation on each member of the list and return new
-values. `math` takes two arguments, the attribute to operate on and the
-operation's value.
-
-Supported operations include:
-
- - `address`: Adds the value, a positive or negative value expressed as a
- decimal string, to the address. The sign is required. This value is
- allowed to over or underflow networks (e.g. 127.255.255.255 `"address" "+1"`
- will return "128.0.0.0"). Addresses will wrap at IPv4 or IPv6 boundaries.
- - `network`: Add the value, a positive or negative value expressed as a
- decimal string, to the network address. The sign is required. Positive
- values are added to the network address. Negative values are subtracted
- from the network's broadcast address (e.g. 127.0.0.1 `"network" "-1"` will
- return "127.255.255.255"). Values that overflow the network size will
- safely wrap.
- - `mask`: Applies the given network mask to the address. The network mask is
- expressed as a decimal value (e.g. network mask "24" corresponds to
- `255.255.255.0`). After applying the network mask, the network mask of the
- resulting address will be either the applied network mask or the network mask
- of the input address depending on which network is larger
- (e.g. 192.168.10.20/24 `"mask" "16"` will return "192.168.0.0/16" but
- 192.168.10.20/24 `"mask" "28"` will return "192.168.10.16/24").
-
-Example:
-
- {{ GetPrivateInterfaces | include "type" "IP" | math "address" "+256" | attr "address" }}
- {{ GetPrivateInterfaces | include "type" "IP" | math "address" "-256" | attr "address" }}
- {{ GetPrivateInterfaces | include "type" "IP" | math "network" "+2" | attr "address" }}
- {{ GetPrivateInterfaces | include "type" "IP" | math "network" "-2" | attr "address" }}
- {{ GetPrivateInterfaces | include "type" "IP" | math "mask" "24" | attr "address" }}
- {{ GetPrivateInterfaces | include "flags" "forwardable|up" | include "type" "IPv4" | math "network" "+2" | attr "address" }}
-
-
-`attr`: Extracts a single attribute of the first member of the list and returns
-it as a string. `attr` takes a single attribute name. The list of available
-attributes is type-specific and shared between `join`. See below for a list of
-supported attributes.
-
-Example:
-
- {{ GetAllInterfaces | exclude "flags" "up" | attr "address" }}
-
-
-`Attr`: Extracts a single attribute from an `IfAttr` and in every other way
-performs the same as the `attr`.
-
-Example:
-
- {{ with $ifAddrs := GetAllInterfaces | include "type" "IP" | sort "+type,+address" -}}
- {{- range $ifAddrs -}}
- {{- Attr "address" . }} -- {{ Attr "network" . }}/{{ Attr "size" . -}}
- {{- end -}}
- {{- end }}
-
-
-`join`: Similar to `attr`, `join` extracts all matching attributes of the list
-and returns them as a string joined by the separator, the second argument to
-`join`. The list of available attributes is type-specific and shared between
-`join`.
-
-Example:
-
- {{ GetAllInterfaces | include "flags" "forwardable" | join "address" " " }}
-
-
-`exclude` and `include` flags:
- - `broadcast`
- - `down`: Is the interface down?
- - `forwardable`: Is the IP forwardable?
- - `global unicast`
- - `interface-local multicast`
- - `link-local multicast`
- - `link-local unicast`
- - `loopback`
- - `multicast`
- - `point-to-point`
- - `unspecified`: Is the IfAddr the IPv6 unspecified address?
- - `up`: Is the interface up?
-
-
-Attributes for `attr`, `Attr`, and `join`:
-
-SockAddr Type:
- - `string`
- - `type`
-
-IPAddr Type:
- - `address`
- - `binary`
- - `first_usable`
- - `hex`
- - `host`
- - `last_usable`
- - `mask_bits`
- - `netmask`
- - `network`
- - `octets`: Decimal values per byte
- - `port`
- - `size`: Number of hosts in the network
-
-IPv4Addr Type:
- - `broadcast`
- - `uint32`: unsigned integer representation of the value
-
-IPv6Addr Type:
- - `uint128`: unsigned integer representation of the value
-
-UnixSock Type:
- - `path`
-
-*/
-package template
diff --git a/vendor/github.com/hashicorp/go-sockaddr/template/template.go b/vendor/github.com/hashicorp/go-sockaddr/template/template.go
deleted file mode 100644
index bbed51361..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/template/template.go
+++ /dev/null
@@ -1,155 +0,0 @@
-package template
-
-import (
- "bytes"
- "fmt"
- "text/template"
-
- "github.com/hashicorp/errwrap"
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-var (
- // SourceFuncs is a map of all top-level functions that generate
- // sockaddr data types.
- SourceFuncs template.FuncMap
-
- // SortFuncs is a map of all functions used in sorting
- SortFuncs template.FuncMap
-
- // FilterFuncs is a map of all functions used in sorting
- FilterFuncs template.FuncMap
-
- // HelperFuncs is a map of all functions used in sorting
- HelperFuncs template.FuncMap
-)
-
-func init() {
- SourceFuncs = template.FuncMap{
- // GetAllInterfaces - Returns an exhaustive set of IfAddr
- // structs available on the host. `GetAllInterfaces` is the
- // initial input and accessible as the initial "dot" in the
- // pipeline.
- "GetAllInterfaces": sockaddr.GetAllInterfaces,
-
- // GetDefaultInterfaces - Returns one IfAddr for every IP that
- // is on the interface containing the default route for the
- // host.
- "GetDefaultInterfaces": sockaddr.GetDefaultInterfaces,
-
- // GetPrivateInterfaces - Returns one IfAddr for every IP that
- // matches RFC 6890, are attached to the interface with the
- // default route, and are forwardable IP addresses. NOTE: RFC
- // 6890 is a more exhaustive version of RFC1918 because it spans
- // IPv4 and IPv6, however it doespermit the inclusion of likely
- // undesired addresses such as multicast, therefore our
- // definition of a "private" address also excludes
- // non-forwardable IP addresses (as defined by the IETF).
- "GetPrivateInterfaces": sockaddr.GetPrivateInterfaces,
-
- // GetPublicInterfaces - Returns a list of IfAddr that do not
- // match RFC 6890, are attached to the default route, and are
- // forwardable.
- "GetPublicInterfaces": sockaddr.GetPublicInterfaces,
- }
-
- SortFuncs = template.FuncMap{
- "sort": sockaddr.SortIfBy,
- }
-
- FilterFuncs = template.FuncMap{
- "exclude": sockaddr.ExcludeIfs,
- "include": sockaddr.IncludeIfs,
- }
-
- HelperFuncs = template.FuncMap{
- // Misc functions that operate on IfAddrs inputs
- "attr": Attr,
- "join": sockaddr.JoinIfAddrs,
- "limit": sockaddr.LimitIfAddrs,
- "offset": sockaddr.OffsetIfAddrs,
- "unique": sockaddr.UniqueIfAddrsBy,
-
- // Misc math functions that operate on a single IfAddr input
- "math": sockaddr.IfAddrsMath,
-
- // Return a Private RFC 6890 IP address string that is attached
- // to the default route and a forwardable address.
- "GetPrivateIP": sockaddr.GetPrivateIP,
-
- // Return all Private RFC 6890 IP addresses as a space-delimited string of
- // IP addresses. Addresses returned do not have to be on the interface with
- // a default route.
- "GetPrivateIPs": sockaddr.GetPrivateIPs,
-
- // Return a Public RFC 6890 IP address string that is attached
- // to the default route and a forwardable address.
- "GetPublicIP": sockaddr.GetPublicIP,
-
- // Return allPublic RFC 6890 IP addresses as a space-delimited string of IP
- // addresses. Addresses returned do not have to be on the interface with a
- // default route.
- "GetPublicIPs": sockaddr.GetPublicIPs,
-
- // Return the first IP address of the named interface, sorted by
- // the largest network size.
- "GetInterfaceIP": sockaddr.GetInterfaceIP,
-
- // Return all IP addresses on the named interface, sorted by the largest
- // network size.
- "GetInterfaceIPs": sockaddr.GetInterfaceIPs,
- }
-}
-
-// Attr returns the attribute from the ifAddrRaw argument. If the argument is
-// an IfAddrs, only the first element will be evaluated for resolution.
-func Attr(selectorName string, ifAddrsRaw interface{}) (string, error) {
- switch v := ifAddrsRaw.(type) {
- case sockaddr.IfAddr:
- return sockaddr.IfAttr(selectorName, v)
- case sockaddr.IfAddrs:
- return sockaddr.IfAttrs(selectorName, v)
- default:
- return "", fmt.Errorf("unable to obtain attribute %s from type %T (%v)", selectorName, ifAddrsRaw, ifAddrsRaw)
- }
-}
-
-// Parse parses input as template input using the addresses available on the
-// host, then returns the string output if there are no errors.
-func Parse(input string) (string, error) {
- addrs, err := sockaddr.GetAllInterfaces()
- if err != nil {
- return "", errwrap.Wrapf("unable to query interface addresses: {{err}}", err)
- }
-
- return ParseIfAddrs(input, addrs)
-}
-
-// ParseIfAddrs parses input as template input using the IfAddrs inputs, then
-// returns the string output if there are no errors.
-func ParseIfAddrs(input string, ifAddrs sockaddr.IfAddrs) (string, error) {
- return ParseIfAddrsTemplate(input, ifAddrs, template.New("sockaddr.Parse"))
-}
-
-// ParseIfAddrsTemplate parses input as template input using the IfAddrs inputs,
-// then returns the string output if there are no errors.
-func ParseIfAddrsTemplate(input string, ifAddrs sockaddr.IfAddrs, tmplIn *template.Template) (string, error) {
- // Create a template, add the function map, and parse the text.
- tmpl, err := tmplIn.Option("missingkey=error").
- Funcs(SourceFuncs).
- Funcs(SortFuncs).
- Funcs(FilterFuncs).
- Funcs(HelperFuncs).
- Parse(input)
- if err != nil {
- return "", errwrap.Wrapf(fmt.Sprintf("unable to parse template %+q: {{err}}", input), err)
- }
-
- var outWriter bytes.Buffer
- err = tmpl.Execute(&outWriter, ifAddrs)
- if err != nil {
- return "", errwrap.Wrapf(fmt.Sprintf("unable to execute sockaddr input %+q: {{err}}", input), err)
- }
-
- return outWriter.String(), nil
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/template/template_test.go b/vendor/github.com/hashicorp/go-sockaddr/template/template_test.go
deleted file mode 100644
index ec9822e77..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/template/template_test.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package template_test
-
-import (
- "testing"
-
- socktmpl "github.com/hashicorp/go-sockaddr/template"
-)
-
-func TestSockAddr_Parse(t *testing.T) {
- tests := []struct {
- name string
- input string
- output string
- fail bool
- requireOnline bool
- }{
- {
- name: `basic include "name"`,
- input: `{{GetAllInterfaces | include "name" "lo0" | printf "%v"}}`,
- output: `[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: "invalid input",
- input: `{{`,
- output: ``,
- fail: true,
- },
- {
- name: "GetDefaultInterface",
- input: `{{GetDefaultInterfaces | include "type" "IPv4" | attr "name" }}`,
- output: `en0`,
- },
- {
- name: `include "name" regexp`,
- input: `{{GetAllInterfaces | include "name" "^(en|lo)0$" | exclude "name" "^en0$" | sort "type" | sort "address" | join "address" " " }}`,
- output: `127.0.0.1 ::1 fe80::1`,
- },
- {
- name: `exclude "name"`,
- input: `{{. | include "name" "^(en|lo)0$" | exclude "name" "^en0$" | sort "type" | sort "address" | join "address" " " }}`,
- output: `127.0.0.1 ::1 fe80::1`,
- },
- {
- name: `"dot" pipeline, IPv4 type`,
- input: `{{. | include "type" "IPv4" | include "name" "^lo0$" | sort "type" | sort "address" }}`,
- output: `[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: `include "type" "IPv6`,
- input: `{{. | include "type" "IPv6" | include "name" "^lo0$" | sort "address" }}`,
- output: `[::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: "better example for IP types",
- input: `{{. | include "type" "IPv4|IPv6" | include "name" "^lo0$" | sort "type" | sort "address" }}`,
- output: `[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: "ifAddrs1",
- input: `{{. | include "type" "IPv4" | include "name" "^lo0$"}}`,
- output: `[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: "ifAddrs2",
- input: `{{. | include "type" "IP" | include "name" "^lo0$" | sort "type" | sort "address" }}`,
- output: `[127.0.0.1/8 {1 16384 lo0 up|loopback|multicast} ::1 {1 16384 lo0 up|loopback|multicast} fe80::1/64 {1 16384 lo0 up|loopback|multicast}]`,
- },
- {
- name: `range "dot" example`,
- input: `{{range . | include "type" "IP" | include "name" "^lo0$"}}{{.Name}} {{.SockAddr}} {{end}}`,
- output: `lo0 127.0.0.1/8 lo0 ::1 lo0 fe80::1/64 `,
- },
- {
- name: `exclude "type"`,
- input: `{{. | exclude "type" "IPv4" | include "name" "^lo0$" | sort "address" | unique "name" | join "name" " "}} {{range . | exclude "type" "IPv4" | include "name" "^lo0$"}}{{.SockAddr}} {{end}}`,
- output: `lo0 ::1 fe80::1/64 `,
- },
- {
- name: "with variable pipeline",
- input: `{{with $ifSet := include "type" "IPv4" . | include "name" "^lo0$"}}{{range $ifSet }}{{.Name}} {{end}}{{range $ifSet}}{{.SockAddr}} {{end}}{{end}}`,
- output: `lo0 127.0.0.1/8 `,
- },
- {
- name: "range sample on lo0",
- input: `{{with $ifAddrs := . | exclude "rfc" "1918" | include "name" "lo0" | sort "type,address" }}{{range $ifAddrs }}{{.Name}}/{{.SockAddr.NetIP}} {{end}}{{end}}`,
- output: `lo0/127.0.0.1 lo0/::1 lo0/fe80::1 `,
- },
- {
- name: "non-RFC1918 on on lo0",
- input: `{{. | exclude "rfc" "1918" | include "name" "lo0" | sort "type,address" | len | eq 3}}`,
- output: `true`,
- },
- {
- // NOTE(sean@): Difficult to reliably test includeByRFC.
- // In this case, we ass-u-me that the host running the
- // test has at least one RFC1918 address on their host.
- name: `include "rfc"`,
- input: `{{(. | include "rfc" "1918" | attr "name")}}`,
- output: `en0`,
- requireOnline: true,
- },
- {
- name: "test for non-empty array",
- input: `{{. | include "type" "IPv4" | include "rfc" "1918" | print | len | eq (len "[]")}}`,
- output: `false`,
- },
- {
- // NOTE(sean@): This will fail if there is a public IPv4 address on loopback.
- name: "non-IPv4 RFC1918",
- input: `{{. | include "name" "lo0" | exclude "type" "IPv4" | include "rfc" "1918" | len | eq 0}}`,
- output: `true`,
- },
- {
- // NOTE(sean@): There are no RFC6598 addresses on most testing hosts so this should be empty.
- name: "rfc6598",
- input: `{{. | include "type" "IPv4" | include "rfc" "6598" | print | len | eq (len "[]")}}`,
- output: `true`,
- },
- {
- name: "invalid RFC",
- input: `{{. | include "type" "IPv4" | include "rfc" "99999999999" | print | len | eq (len "[]")}}`,
- output: `true`,
- fail: true,
- },
- {
- name: `sort asc address`,
- input: `{{ . | include "name" "lo0" | sort "type,address" | join "address" " " }}`,
- output: `127.0.0.1 ::1 fe80::1`,
- },
- {
- name: `sort asc address old`,
- input: `{{with $ifSet := include "name" "lo0" . }}{{ range include "type" "IPv4" $ifSet | sort "address"}}{{ .SockAddr }} {{end}}{{ range include "type" "IPv6" $ifSet | sort "address"}}{{ .SockAddr }} {{end}}{{end}}`,
- output: `127.0.0.1/8 ::1 fe80::1/64 `,
- },
- {
- name: `sort desc address`,
- input: `{{ . | include "name" "lo0" | sort "type,-address" | join "address" " " }}`,
- output: `127.0.0.1 fe80::1 ::1`,
- },
- {
- name: `sort desc address`,
- input: `{{ . | include "name" "lo0" | include "type" "IPv6" | sort "type,-address" | join "address" " " }}`,
- output: `fe80::1 ::1`,
- },
- {
- name: `sort asc address`,
- input: `{{with $ifSet := include "name" "lo0" . }}{{ range include "type" "IPv6" $ifSet | sort "address"}}{{ .SockAddr }} {{end}}{{end}}`,
- output: `::1 fe80::1/64 `,
- },
- {
- name: "lo0 limit 1",
- input: `{{. | include "name" "lo0" | include "type" "IPv6" | sort "address" | limit 1 | len}}`,
- output: `1`,
- },
- {
- name: "join address",
- input: `{{. | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "address" " " }}`,
- output: `::1 fe80::1`,
- },
- {
- name: "join name",
- input: `{{. | include "name" "lo0" | include "type" "IPv6" | sort "address" | join "name" " " }}`,
- output: `lo0 lo0`,
- },
- {
- name: "lo0 flags up and limit 1",
- input: `{{. | include "name" "lo0" | include "flag" "up" | sort "-type,+address" | attr "address" }}`,
- output: `::1`,
- },
- {
- // NOTE(sean@): This is the HashiCorp default in 2016.
- // Indented for effect. Using "true" as the output
- // instead of printing the correct $rfc*Addrs values.
- name: "HashiCorpDefault2016",
- input: `
-{{- with $addr := GetAllInterfaces | include "type" "IP" | include "rfc" "1918|6598" | sort "address" | attr "address" -}}
-
- {{- if ($addr | len) gt 0 -}}
- {{- print "true" -}}{{/* print $addr*/ -}}
- {{- end -}}
-{{- end -}}`,
- output: `true`,
- },
- {
- name: "math address +",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "address" "+2" | sort "+type,+address" | join "address" " " }}`,
- output: `127.0.0.3 ::3 fe80::3`,
- },
- {
- name: "math address + overflow",
- input: `|{{- with $ifAddrs := GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "address" "+16777217" | sort "+type,+address" -}}
- {{- range $ifAddrs -}}
- {{- attr "address" . }} -- {{ attr "network" . }}/{{ attr "size" . }}|{{ end -}}
-{{- end -}}`,
- output: `|128.0.0.2 -- 128.0.0.0/16777216|::100:2 -- ::100:2/1|fe80::100:2 -- fe80::/18446744073709551616|`,
- },
- {
- name: "math address + overflow+wrap",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "address" "+4294967294" | sort "+type,+address" | join "address" " " }}`,
- output: `126.255.255.255 ::ffff:ffff fe80::ffff:ffff`,
- },
- {
- name: "math address -",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "address" "-256" | sort "+type,+address" | join "address" " " }}`,
- output: `126.255.255.1 fe7f:ffff:ffff:ffff:ffff:ffff:ffff:ff01 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff01`,
- },
- {
- name: "math address - underflow",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "address" "-4278190082" | sort "+type,+address" | join "address" " " }}`,
- output: `127.255.255.255 fe7f:ffff:ffff:ffff:ffff:ffff:ff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ff:ffff`,
- },
- {
- // Note to readers: lo0's link-local address (::1) address has a mask of
- // /128 which means its value never changes and this is expected. lo0's
- // site-local address has a /64 address and is expected to change.
- name: "math network",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "network" "+2" | sort "+type,+address" | join "address" " " }}`,
- output: `127.0.0.2 ::1 fe80::2`,
- },
- {
- // Assume an IPv4 input of 127.0.0.1. With a value of 0xff00ff01, we wrap once on purpose.
- name: "math network + wrap",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "network" "+4278255368" | sort "+type,+address" | join "address" " " }}`,
- output: `127.0.255.8 ::1 fe80::ff00:ff08`,
- },
- {
- name: "math network -",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | math "network" "-2" | sort "+type,+address" | join "address" " " }}`,
- output: `127.255.255.254 ::1 fe80::ffff:ffff:ffff:fffe`,
- },
- {
- // Assume an IPv4 input of 127.0.0.1. With a value of 0xff000008 it
- // should wrap and underflow by 8. Assume an IPv6 input of ::1. With a
- // value of -0xff000008 the value underflows and wraps.
- name: "math network - underflow+wrap",
- input: `{{GetAllInterfaces | include "name" "^lo0$" | include "type" "IP" | sort "+type,+address" | math "network" "-4278190088" | join "address" " " }}`,
- output: `127.255.255.248 ::1 fe80::ffff:ffff:ff:fff8`,
- },
- {
- // Assume the private IPs available on the host are: 10.1.2.3
- // fe80::1025:f732:1001:203
- name: "GetPrivateIPs",
- input: `{{GetPrivateIPs}}`,
- output: `10.1.2.3 fe80::1025:f732:1001:203`,
- },
- {
- // Assume the public IPs available on the host are: 1.2.3.4 6.7.8.9
- name: "GetPublicIPs",
- input: `{{GetPublicIPs}}`,
- output: `1.2.3.4 6.7.8.9`,
- },
- {
- // Assume the private IPs on this host are just the IPv4 addresses:
- // 10.1.2.3 and 172.16.4.6
- name: "GetInterfaceIPs",
- input: `{{GetInterfaceIPs "en0"}}`,
- output: `10.1.2.3 and 172.16.4.6`,
- },
- }
-
- for i, test := range tests {
- test := test // capture range variable
- if test.name == "" {
- t.Fatalf("test number %d has an empty test name", i)
- }
- t.Run(test.name, func(t *testing.T) {
- t.Parallel()
- out, err := socktmpl.Parse(test.input)
- if err != nil && !test.fail {
- t.Fatalf("%q: bad: %v", test.name, err)
- }
-
- if out != test.output && !test.fail {
- t.Fatalf("%q: Expected %+q, received %+q\n%+q", test.name, test.output, out, test.input)
- }
- })
- }
-}
diff --git a/vendor/github.com/hashicorp/go-sockaddr/unixsock_test.go b/vendor/github.com/hashicorp/go-sockaddr/unixsock_test.go
deleted file mode 100644
index 7ed636a29..000000000
--- a/vendor/github.com/hashicorp/go-sockaddr/unixsock_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package sockaddr_test
-
-import (
- "testing"
-
- sockaddr "github.com/hashicorp/go-sockaddr"
-)
-
-func TestUnixSock_impl_SockAddr(t *testing.T) {
- tests := []struct {
- name string
- input sockaddr.UnixSock
- dialPacketArgs []string
- dialStreamArgs []string
- listenPacketArgs []string
- listenStreamArgs []string
- }{
- {
- name: "simple",
- input: sockaddr.MustUnixSock("/tmp/foo"),
- dialPacketArgs: []string{"unixgram", "/tmp/foo"},
- dialStreamArgs: []string{"unixgram", "/tmp/foo"},
- listenPacketArgs: []string{"unixgram", "/tmp/foo"},
- listenStreamArgs: []string{"unixgram", "/tmp/foo"},
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- arg1, arg2 := test.input.DialPacketArgs()
- if arg1 != test.dialPacketArgs[0] && arg2 != test.dialPacketArgs[1] {
- t.Fatalf("%s: %q %q", test.name, arg1, arg2)
- }
-
- arg1, arg2 = test.input.DialStreamArgs()
- if arg1 != test.dialStreamArgs[0] && arg2 != test.dialStreamArgs[1] {
- t.Fatalf("%s: %q %q", test.name, arg1, arg2)
- }
-
- arg1, arg2 = test.input.ListenPacketArgs()
- if arg1 != test.listenPacketArgs[0] && arg2 != test.listenPacketArgs[1] {
- t.Fatalf("%s: %q %q", test.name, arg1, arg2)
- }
-
- arg1, arg2 = test.input.ListenStreamArgs()
- if arg1 != test.listenStreamArgs[0] && arg2 != test.listenStreamArgs[1] {
- t.Fatalf("%s: %q %q", test.name, arg1, arg2)
- }
- }
-}
-
-func TestUnixSock_Equal(t *testing.T) {
- tests := []struct {
- name string
- input sockaddr.UnixSock
- sa sockaddr.SockAddr
- equal bool
- }{
- {
- name: "equal",
- input: sockaddr.MustUnixSock("/tmp/foo"),
- sa: sockaddr.MustUnixSock("/tmp/foo"),
- equal: true,
- },
- {
- name: "not equal",
- input: sockaddr.MustUnixSock("/tmp/foo"),
- sa: sockaddr.MustUnixSock("/tmp/bar"),
- equal: false,
- },
- {
- name: "ipv4",
- input: sockaddr.MustUnixSock("/tmp/foo"),
- sa: sockaddr.MustIPv4Addr("1.2.3.4"),
- equal: false,
- },
- {
- name: "ipv6",
- input: sockaddr.MustUnixSock("/tmp/foo"),
- sa: sockaddr.MustIPv6Addr("::1"),
- equal: false,
- },
- }
-
- for i, test := range tests {
- if test.name == "" {
- t.Fatalf("test %d needs a name", i)
- }
-
- t.Run(test.name, func(t *testing.T) {
- us := test.input
- if ret := us.Equal(test.sa); ret != test.equal {
- t.Fatalf("%s: equal: %v %q %q", test.name, ret, us, test.sa)
- }
- })
- }
-}
-
-func TestUnixSockAttrs(t *testing.T) {
- const expectedNumAttrs = 1
- usa := sockaddr.UnixSockAttrs()
- if len(usa) != expectedNumAttrs {
- t.Fatalf("wrong number of UnixSockAttrs: %d vs %d", len(usa), expectedNumAttrs)
- }
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/2q_test.go b/vendor/github.com/hashicorp/golang-lru/2q_test.go
deleted file mode 100644
index 1b0f35181..000000000
--- a/vendor/github.com/hashicorp/golang-lru/2q_test.go
+++ /dev/null
@@ -1,306 +0,0 @@
-package lru
-
-import (
- "math/rand"
- "testing"
-)
-
-func Benchmark2Q_Rand(b *testing.B) {
- l, err := New2Q(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- trace[i] = rand.Int63() % 32768
- }
-
- b.ResetTimer()
-
- var hit, miss int
- for i := 0; i < 2*b.N; i++ {
- if i%2 == 0 {
- l.Add(trace[i], trace[i])
- } else {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func Benchmark2Q_Freq(b *testing.B) {
- l, err := New2Q(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- if i%2 == 0 {
- trace[i] = rand.Int63() % 16384
- } else {
- trace[i] = rand.Int63() % 32768
- }
- }
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- l.Add(trace[i], trace[i])
- }
- var hit, miss int
- for i := 0; i < b.N; i++ {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func Test2Q_RandomOps(t *testing.T) {
- size := 128
- l, err := New2Q(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- n := 200000
- for i := 0; i < n; i++ {
- key := rand.Int63() % 512
- r := rand.Int63()
- switch r % 3 {
- case 0:
- l.Add(key, key)
- case 1:
- l.Get(key)
- case 2:
- l.Remove(key)
- }
-
- if l.recent.Len()+l.frequent.Len() > size {
- t.Fatalf("bad: recent: %d freq: %d",
- l.recent.Len(), l.frequent.Len())
- }
- }
-}
-
-func Test2Q_Get_RecentToFrequent(t *testing.T) {
- l, err := New2Q(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Touch all the entries, should be in t1
- for i := 0; i < 128; i++ {
- l.Add(i, i)
- }
- if n := l.recent.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
-
- // Get should upgrade to t2
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("missing: %d", i)
- }
- }
- if n := l.recent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
-
- // Get be from t2
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("missing: %d", i)
- }
- }
- if n := l.recent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
-}
-
-func Test2Q_Add_RecentToFrequent(t *testing.T) {
- l, err := New2Q(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Add initially to recent
- l.Add(1, 1)
- if n := l.recent.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
-
- // Add should upgrade to frequent
- l.Add(1, 1)
- if n := l.recent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-
- // Add should remain in frequent
- l.Add(1, 1)
- if n := l.recent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-}
-
-func Test2Q_Add_RecentEvict(t *testing.T) {
- l, err := New2Q(4)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Add 1,2,3,4,5 -> Evict 1
- l.Add(1, 1)
- l.Add(2, 2)
- l.Add(3, 3)
- l.Add(4, 4)
- l.Add(5, 5)
- if n := l.recent.Len(); n != 4 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.recentEvict.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
-
- // Pull in the recently evicted
- l.Add(1, 1)
- if n := l.recent.Len(); n != 3 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.recentEvict.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-
- // Add 6, should cause another recent evict
- l.Add(6, 6)
- if n := l.recent.Len(); n != 3 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.recentEvict.Len(); n != 2 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.frequent.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-}
-
-func Test2Q(t *testing.T) {
- l, err := New2Q(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- for i := 0; i < 256; i++ {
- l.Add(i, i)
- }
- if l.Len() != 128 {
- t.Fatalf("bad len: %v", l.Len())
- }
-
- for i, k := range l.Keys() {
- if v, ok := l.Get(k); !ok || v != k || v != i+128 {
- t.Fatalf("bad key: %v", k)
- }
- }
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be evicted")
- }
- }
- for i := 128; i < 256; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("should not be evicted")
- }
- }
- for i := 128; i < 192; i++ {
- l.Remove(i)
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be deleted")
- }
- }
-
- l.Purge()
- if l.Len() != 0 {
- t.Fatalf("bad len: %v", l.Len())
- }
- if _, ok := l.Get(200); ok {
- t.Fatalf("should contain nothing")
- }
-}
-
-// Test that Contains doesn't update recent-ness
-func Test2Q_Contains(t *testing.T) {
- l, err := New2Q(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if !l.Contains(1) {
- t.Errorf("1 should be contained")
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("Contains should not have updated recent-ness of 1")
- }
-}
-
-// Test that Peek doesn't update recent-ness
-func Test2Q_Peek(t *testing.T) {
- l, err := New2Q(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if v, ok := l.Peek(1); !ok || v != 1 {
- t.Errorf("1 should be set to 1: %v, %v", v, ok)
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("should not have updated recent-ness of 1")
- }
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/arc_test.go b/vendor/github.com/hashicorp/golang-lru/arc_test.go
deleted file mode 100644
index e2d9b68c6..000000000
--- a/vendor/github.com/hashicorp/golang-lru/arc_test.go
+++ /dev/null
@@ -1,377 +0,0 @@
-package lru
-
-import (
- "math/rand"
- "testing"
- "time"
-)
-
-func init() {
- rand.Seed(time.Now().Unix())
-}
-
-func BenchmarkARC_Rand(b *testing.B) {
- l, err := NewARC(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- trace[i] = rand.Int63() % 32768
- }
-
- b.ResetTimer()
-
- var hit, miss int
- for i := 0; i < 2*b.N; i++ {
- if i%2 == 0 {
- l.Add(trace[i], trace[i])
- } else {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func BenchmarkARC_Freq(b *testing.B) {
- l, err := NewARC(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- if i%2 == 0 {
- trace[i] = rand.Int63() % 16384
- } else {
- trace[i] = rand.Int63() % 32768
- }
- }
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- l.Add(trace[i], trace[i])
- }
- var hit, miss int
- for i := 0; i < b.N; i++ {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func TestARC_RandomOps(t *testing.T) {
- size := 128
- l, err := NewARC(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- n := 200000
- for i := 0; i < n; i++ {
- key := rand.Int63() % 512
- r := rand.Int63()
- switch r % 3 {
- case 0:
- l.Add(key, key)
- case 1:
- l.Get(key)
- case 2:
- l.Remove(key)
- }
-
- if l.t1.Len()+l.t2.Len() > size {
- t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d",
- l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p)
- }
- if l.b1.Len()+l.b2.Len() > size {
- t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d",
- l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p)
- }
- }
-}
-
-func TestARC_Get_RecentToFrequent(t *testing.T) {
- l, err := NewARC(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Touch all the entries, should be in t1
- for i := 0; i < 128; i++ {
- l.Add(i, i)
- }
- if n := l.t1.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
-
- // Get should upgrade to t2
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("missing: %d", i)
- }
- }
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
-
- // Get be from t2
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("missing: %d", i)
- }
- }
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 128 {
- t.Fatalf("bad: %d", n)
- }
-}
-
-func TestARC_Add_RecentToFrequent(t *testing.T) {
- l, err := NewARC(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Add initially to t1
- l.Add(1, 1)
- if n := l.t1.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
-
- // Add should upgrade to t2
- l.Add(1, 1)
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-
- // Add should remain in t2
- l.Add(1, 1)
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-}
-
-func TestARC_Adaptive(t *testing.T) {
- l, err := NewARC(4)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Fill t1
- for i := 0; i < 4; i++ {
- l.Add(i, i)
- }
- if n := l.t1.Len(); n != 4 {
- t.Fatalf("bad: %d", n)
- }
-
- // Move to t2
- l.Get(0)
- l.Get(1)
- if n := l.t2.Len(); n != 2 {
- t.Fatalf("bad: %d", n)
- }
-
- // Evict from t1
- l.Add(4, 4)
- if n := l.b1.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-
- // Current state
- // t1 : (MRU) [4, 3] (LRU)
- // t2 : (MRU) [1, 0] (LRU)
- // b1 : (MRU) [2] (LRU)
- // b2 : (MRU) [] (LRU)
-
- // Add 2, should cause hit on b1
- l.Add(2, 2)
- if n := l.b1.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if l.p != 1 {
- t.Fatalf("bad: %d", l.p)
- }
- if n := l.t2.Len(); n != 3 {
- t.Fatalf("bad: %d", n)
- }
-
- // Current state
- // t1 : (MRU) [4] (LRU)
- // t2 : (MRU) [2, 1, 0] (LRU)
- // b1 : (MRU) [3] (LRU)
- // b2 : (MRU) [] (LRU)
-
- // Add 4, should migrate to t2
- l.Add(4, 4)
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 4 {
- t.Fatalf("bad: %d", n)
- }
-
- // Current state
- // t1 : (MRU) [] (LRU)
- // t2 : (MRU) [4, 2, 1, 0] (LRU)
- // b1 : (MRU) [3] (LRU)
- // b2 : (MRU) [] (LRU)
-
- // Add 4, should evict to b2
- l.Add(5, 5)
- if n := l.t1.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 3 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.b2.Len(); n != 1 {
- t.Fatalf("bad: %d", n)
- }
-
- // Current state
- // t1 : (MRU) [5] (LRU)
- // t2 : (MRU) [4, 2, 1] (LRU)
- // b1 : (MRU) [3] (LRU)
- // b2 : (MRU) [0] (LRU)
-
- // Add 0, should decrease p
- l.Add(0, 0)
- if n := l.t1.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.t2.Len(); n != 4 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.b1.Len(); n != 2 {
- t.Fatalf("bad: %d", n)
- }
- if n := l.b2.Len(); n != 0 {
- t.Fatalf("bad: %d", n)
- }
- if l.p != 0 {
- t.Fatalf("bad: %d", l.p)
- }
-
- // Current state
- // t1 : (MRU) [] (LRU)
- // t2 : (MRU) [0, 4, 2, 1] (LRU)
- // b1 : (MRU) [5, 3] (LRU)
- // b2 : (MRU) [0] (LRU)
-}
-
-func TestARC(t *testing.T) {
- l, err := NewARC(128)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- for i := 0; i < 256; i++ {
- l.Add(i, i)
- }
- if l.Len() != 128 {
- t.Fatalf("bad len: %v", l.Len())
- }
-
- for i, k := range l.Keys() {
- if v, ok := l.Get(k); !ok || v != k || v != i+128 {
- t.Fatalf("bad key: %v", k)
- }
- }
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be evicted")
- }
- }
- for i := 128; i < 256; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("should not be evicted")
- }
- }
- for i := 128; i < 192; i++ {
- l.Remove(i)
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be deleted")
- }
- }
-
- l.Purge()
- if l.Len() != 0 {
- t.Fatalf("bad len: %v", l.Len())
- }
- if _, ok := l.Get(200); ok {
- t.Fatalf("should contain nothing")
- }
-}
-
-// Test that Contains doesn't update recent-ness
-func TestARC_Contains(t *testing.T) {
- l, err := NewARC(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if !l.Contains(1) {
- t.Errorf("1 should be contained")
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("Contains should not have updated recent-ness of 1")
- }
-}
-
-// Test that Peek doesn't update recent-ness
-func TestARC_Peek(t *testing.T) {
- l, err := NewARC(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if v, ok := l.Peek(1); !ok || v != 1 {
- t.Errorf("1 should be set to 1: %v, %v", v, ok)
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("should not have updated recent-ness of 1")
- }
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/lru_test.go
deleted file mode 100644
index e7e23505e..000000000
--- a/vendor/github.com/hashicorp/golang-lru/lru_test.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package lru
-
-import (
- "math/rand"
- "testing"
-)
-
-func BenchmarkLRU_Rand(b *testing.B) {
- l, err := New(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- trace[i] = rand.Int63() % 32768
- }
-
- b.ResetTimer()
-
- var hit, miss int
- for i := 0; i < 2*b.N; i++ {
- if i%2 == 0 {
- l.Add(trace[i], trace[i])
- } else {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func BenchmarkLRU_Freq(b *testing.B) {
- l, err := New(8192)
- if err != nil {
- b.Fatalf("err: %v", err)
- }
-
- trace := make([]int64, b.N*2)
- for i := 0; i < b.N*2; i++ {
- if i%2 == 0 {
- trace[i] = rand.Int63() % 16384
- } else {
- trace[i] = rand.Int63() % 32768
- }
- }
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- l.Add(trace[i], trace[i])
- }
- var hit, miss int
- for i := 0; i < b.N; i++ {
- _, ok := l.Get(trace[i])
- if ok {
- hit++
- } else {
- miss++
- }
- }
- b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss))
-}
-
-func TestLRU(t *testing.T) {
- evictCounter := 0
- onEvicted := func(k interface{}, v interface{}) {
- if k != v {
- t.Fatalf("Evict values not equal (%v!=%v)", k, v)
- }
- evictCounter++
- }
- l, err := NewWithEvict(128, onEvicted)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- for i := 0; i < 256; i++ {
- l.Add(i, i)
- }
- if l.Len() != 128 {
- t.Fatalf("bad len: %v", l.Len())
- }
-
- if evictCounter != 128 {
- t.Fatalf("bad evict count: %v", evictCounter)
- }
-
- for i, k := range l.Keys() {
- if v, ok := l.Get(k); !ok || v != k || v != i+128 {
- t.Fatalf("bad key: %v", k)
- }
- }
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be evicted")
- }
- }
- for i := 128; i < 256; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("should not be evicted")
- }
- }
- for i := 128; i < 192; i++ {
- l.Remove(i)
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be deleted")
- }
- }
-
- l.Get(192) // expect 192 to be last key in l.Keys()
-
- for i, k := range l.Keys() {
- if (i < 63 && k != i+193) || (i == 63 && k != 192) {
- t.Fatalf("out of order key: %v", k)
- }
- }
-
- l.Purge()
- if l.Len() != 0 {
- t.Fatalf("bad len: %v", l.Len())
- }
- if _, ok := l.Get(200); ok {
- t.Fatalf("should contain nothing")
- }
-}
-
-// test that Add returns true/false if an eviction occurred
-func TestLRUAdd(t *testing.T) {
- evictCounter := 0
- onEvicted := func(k interface{}, v interface{}) {
- evictCounter++
- }
-
- l, err := NewWithEvict(1, onEvicted)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if l.Add(1, 1) == true || evictCounter != 0 {
- t.Errorf("should not have an eviction")
- }
- if l.Add(2, 2) == false || evictCounter != 1 {
- t.Errorf("should have an eviction")
- }
-}
-
-// test that Contains doesn't update recent-ness
-func TestLRUContains(t *testing.T) {
- l, err := New(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if !l.Contains(1) {
- t.Errorf("1 should be contained")
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("Contains should not have updated recent-ness of 1")
- }
-}
-
-// test that Contains doesn't update recent-ness
-func TestLRUContainsOrAdd(t *testing.T) {
- l, err := New(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- contains, evict := l.ContainsOrAdd(1, 1)
- if !contains {
- t.Errorf("1 should be contained")
- }
- if evict {
- t.Errorf("nothing should be evicted here")
- }
-
- l.Add(3, 3)
- contains, evict = l.ContainsOrAdd(1, 1)
- if contains {
- t.Errorf("1 should not have been contained")
- }
- if !evict {
- t.Errorf("an eviction should have occurred")
- }
- if !l.Contains(1) {
- t.Errorf("now 1 should be contained")
- }
-}
-
-// test that Peek doesn't update recent-ness
-func TestLRUPeek(t *testing.T) {
- l, err := New(2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if v, ok := l.Peek(1); !ok || v != 1 {
- t.Errorf("1 should be set to 1: %v, %v", v, ok)
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("should not have updated recent-ness of 1")
- }
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go
deleted file mode 100644
index ca5676e1e..000000000
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go
+++ /dev/null
@@ -1,167 +0,0 @@
-package simplelru
-
-import "testing"
-
-func TestLRU(t *testing.T) {
- evictCounter := 0
- onEvicted := func(k interface{}, v interface{}) {
- if k != v {
- t.Fatalf("Evict values not equal (%v!=%v)", k, v)
- }
- evictCounter++
- }
- l, err := NewLRU(128, onEvicted)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- for i := 0; i < 256; i++ {
- l.Add(i, i)
- }
- if l.Len() != 128 {
- t.Fatalf("bad len: %v", l.Len())
- }
-
- if evictCounter != 128 {
- t.Fatalf("bad evict count: %v", evictCounter)
- }
-
- for i, k := range l.Keys() {
- if v, ok := l.Get(k); !ok || v != k || v != i+128 {
- t.Fatalf("bad key: %v", k)
- }
- }
- for i := 0; i < 128; i++ {
- _, ok := l.Get(i)
- if ok {
- t.Fatalf("should be evicted")
- }
- }
- for i := 128; i < 256; i++ {
- _, ok := l.Get(i)
- if !ok {
- t.Fatalf("should not be evicted")
- }
- }
- for i := 128; i < 192; i++ {
- ok := l.Remove(i)
- if !ok {
- t.Fatalf("should be contained")
- }
- ok = l.Remove(i)
- if ok {
- t.Fatalf("should not be contained")
- }
- _, ok = l.Get(i)
- if ok {
- t.Fatalf("should be deleted")
- }
- }
-
- l.Get(192) // expect 192 to be last key in l.Keys()
-
- for i, k := range l.Keys() {
- if (i < 63 && k != i+193) || (i == 63 && k != 192) {
- t.Fatalf("out of order key: %v", k)
- }
- }
-
- l.Purge()
- if l.Len() != 0 {
- t.Fatalf("bad len: %v", l.Len())
- }
- if _, ok := l.Get(200); ok {
- t.Fatalf("should contain nothing")
- }
-}
-
-func TestLRU_GetOldest_RemoveOldest(t *testing.T) {
- l, err := NewLRU(128, nil)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- for i := 0; i < 256; i++ {
- l.Add(i, i)
- }
- k, _, ok := l.GetOldest()
- if !ok {
- t.Fatalf("missing")
- }
- if k.(int) != 128 {
- t.Fatalf("bad: %v", k)
- }
-
- k, _, ok = l.RemoveOldest()
- if !ok {
- t.Fatalf("missing")
- }
- if k.(int) != 128 {
- t.Fatalf("bad: %v", k)
- }
-
- k, _, ok = l.RemoveOldest()
- if !ok {
- t.Fatalf("missing")
- }
- if k.(int) != 129 {
- t.Fatalf("bad: %v", k)
- }
-}
-
-// Test that Add returns true/false if an eviction occurred
-func TestLRU_Add(t *testing.T) {
- evictCounter := 0
- onEvicted := func(k interface{}, v interface{}) {
- evictCounter++
- }
-
- l, err := NewLRU(1, onEvicted)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if l.Add(1, 1) == true || evictCounter != 0 {
- t.Errorf("should not have an eviction")
- }
- if l.Add(2, 2) == false || evictCounter != 1 {
- t.Errorf("should have an eviction")
- }
-}
-
-// Test that Contains doesn't update recent-ness
-func TestLRU_Contains(t *testing.T) {
- l, err := NewLRU(2, nil)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if !l.Contains(1) {
- t.Errorf("1 should be contained")
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("Contains should not have updated recent-ness of 1")
- }
-}
-
-// Test that Peek doesn't update recent-ness
-func TestLRU_Peek(t *testing.T) {
- l, err := NewLRU(2, nil)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- l.Add(1, 1)
- l.Add(2, 2)
- if v, ok := l.Peek(1); !ok || v != 1 {
- t.Errorf("1 should be set to 1: %v, %v", v, ok)
- }
-
- l.Add(3, 3)
- if l.Contains(1) {
- t.Errorf("should not have updated recent-ness of 1")
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md b/vendor/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 2d7fc4bf6..000000000
--- a/vendor/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-### HCL Template
-```hcl
-# Place your HCL configuration file here
-```
-
-### Expected behavior
-What should have happened?
-
-### Actual behavior
-What actually happened?
-
-### Steps to reproduce
-1.
-2.
-3.
-
-### References
-Are there any other GitHub issues (open or closed) that should
-be linked here? For example:
-- GH-1234
-- ...
diff --git a/vendor/github.com/hashicorp/hcl/decoder_test.go b/vendor/github.com/hashicorp/hcl/decoder_test.go
deleted file mode 100644
index 8682f470e..000000000
--- a/vendor/github.com/hashicorp/hcl/decoder_test.go
+++ /dev/null
@@ -1,1203 +0,0 @@
-package hcl
-
-import (
- "io/ioutil"
- "path/filepath"
- "reflect"
- "testing"
- "time"
-
- "github.com/davecgh/go-spew/spew"
- "github.com/hashicorp/hcl/hcl/ast"
-)
-
-func TestDecode_interface(t *testing.T) {
- cases := []struct {
- File string
- Err bool
- Out interface{}
- }{
- {
- "basic.hcl",
- false,
- map[string]interface{}{
- "foo": "bar",
- "bar": "${file(\"bing/bong.txt\")}",
- },
- },
- {
- "basic_squish.hcl",
- false,
- map[string]interface{}{
- "foo": "bar",
- "bar": "${file(\"bing/bong.txt\")}",
- "foo-bar": "baz",
- },
- },
- {
- "empty.hcl",
- false,
- map[string]interface{}{
- "resource": []map[string]interface{}{
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{},
- },
- },
- },
- },
- },
- {
- "tfvars.hcl",
- false,
- map[string]interface{}{
- "regularvar": "Should work",
- "map.key1": "Value",
- "map.key2": "Other value",
- },
- },
- {
- "escape.hcl",
- false,
- map[string]interface{}{
- "foo": "bar\"baz\\n",
- "qux": "back\\slash",
- "bar": "new\nline",
- "qax": `slash\:colon`,
- "nested": `${HH\\:mm\\:ss}`,
- "nestedquotes": `${"\"stringwrappedinquotes\""}`,
- },
- },
- {
- "float.hcl",
- false,
- map[string]interface{}{
- "a": 1.02,
- "b": 2,
- },
- },
- {
- "multiline_bad.hcl",
- true,
- nil,
- },
- {
- "multiline_literal.hcl",
- true,
- nil,
- },
- {
- "multiline_literal_with_hil.hcl",
- false,
- map[string]interface{}{"multiline_literal_with_hil": "${hello\n world}"},
- },
- {
- "multiline_no_marker.hcl",
- true,
- nil,
- },
- {
- "multiline.hcl",
- false,
- map[string]interface{}{"foo": "bar\nbaz\n"},
- },
- {
- "multiline_indented.hcl",
- false,
- map[string]interface{}{"foo": " bar\n baz\n"},
- },
- {
- "multiline_no_hanging_indent.hcl",
- false,
- map[string]interface{}{"foo": " baz\n bar\n foo\n"},
- },
- {
- "multiline_no_eof.hcl",
- false,
- map[string]interface{}{"foo": "bar\nbaz\n", "key": "value"},
- },
- {
- "multiline.json",
- false,
- map[string]interface{}{"foo": "bar\nbaz"},
- },
- {
- "null_strings.json",
- false,
- map[string]interface{}{
- "module": []map[string]interface{}{
- map[string]interface{}{
- "app": []map[string]interface{}{
- map[string]interface{}{"foo": ""},
- },
- },
- },
- },
- },
- {
- "scientific.json",
- false,
- map[string]interface{}{
- "a": 1e-10,
- "b": 1e+10,
- "c": 1e10,
- "d": 1.2e-10,
- "e": 1.2e+10,
- "f": 1.2e10,
- },
- },
- {
- "scientific.hcl",
- false,
- map[string]interface{}{
- "a": 1e-10,
- "b": 1e+10,
- "c": 1e10,
- "d": 1.2e-10,
- "e": 1.2e+10,
- "f": 1.2e10,
- },
- },
- {
- "terraform_heroku.hcl",
- false,
- map[string]interface{}{
- "name": "terraform-test-app",
- "config_vars": []map[string]interface{}{
- map[string]interface{}{
- "FOO": "bar",
- },
- },
- },
- },
- {
- "structure_multi.hcl",
- false,
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "baz": []map[string]interface{}{
- map[string]interface{}{"key": 7},
- },
- },
- map[string]interface{}{
- "bar": []map[string]interface{}{
- map[string]interface{}{"key": 12},
- },
- },
- },
- },
- },
- {
- "structure_multi.json",
- false,
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "baz": []map[string]interface{}{
- map[string]interface{}{"key": 7},
- },
- },
- map[string]interface{}{
- "bar": []map[string]interface{}{
- map[string]interface{}{"key": 12},
- },
- },
- },
- },
- },
- {
- "list_of_lists.hcl",
- false,
- map[string]interface{}{
- "foo": []interface{}{
- []interface{}{"foo"},
- []interface{}{"bar"},
- },
- },
- },
- {
- "list_of_maps.hcl",
- false,
- map[string]interface{}{
- "foo": []interface{}{
- map[string]interface{}{"somekey1": "someval1"},
- map[string]interface{}{"somekey2": "someval2", "someextrakey": "someextraval"},
- },
- },
- },
- {
- "assign_deep.hcl",
- false,
- map[string]interface{}{
- "resource": []interface{}{
- map[string]interface{}{
- "foo": []interface{}{
- map[string]interface{}{
- "bar": []map[string]interface{}{
- map[string]interface{}{}}}}}}},
- },
- {
- "structure_list.hcl",
- false,
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "key": 7,
- },
- map[string]interface{}{
- "key": 12,
- },
- },
- },
- },
- {
- "structure_list.json",
- false,
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "key": 7,
- },
- map[string]interface{}{
- "key": 12,
- },
- },
- },
- },
- {
- "structure_list_deep.json",
- false,
- map[string]interface{}{
- "bar": []map[string]interface{}{
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "name": "terraform_example",
- "ingress": []map[string]interface{}{
- map[string]interface{}{
- "from_port": 22,
- },
- map[string]interface{}{
- "from_port": 80,
- },
- },
- },
- },
- },
- },
- },
- },
-
- {
- "structure_list_empty.json",
- false,
- map[string]interface{}{
- "foo": []interface{}{},
- },
- },
-
- {
- "nested_block_comment.hcl",
- false,
- map[string]interface{}{
- "bar": "value",
- },
- },
-
- {
- "unterminated_block_comment.hcl",
- true,
- nil,
- },
-
- {
- "unterminated_brace.hcl",
- true,
- nil,
- },
-
- {
- "nested_provider_bad.hcl",
- true,
- nil,
- },
-
- {
- "object_list.json",
- false,
- map[string]interface{}{
- "resource": []map[string]interface{}{
- map[string]interface{}{
- "aws_instance": []map[string]interface{}{
- map[string]interface{}{
- "db": []map[string]interface{}{
- map[string]interface{}{
- "vpc": "foo",
- "provisioner": []map[string]interface{}{
- map[string]interface{}{
- "file": []map[string]interface{}{
- map[string]interface{}{
- "source": "foo",
- "destination": "bar",
- },
- },
- },
- },
- },
- },
- },
- },
- },
- },
- },
- },
-
- // Terraform GH-8295 sanity test that basic decoding into
- // interface{} works.
- {
- "terraform_variable_invalid.json",
- false,
- map[string]interface{}{
- "variable": []map[string]interface{}{
- map[string]interface{}{
- "whatever": "abc123",
- },
- },
- },
- },
-
- {
- "interpolate.json",
- false,
- map[string]interface{}{
- "default": `${replace("europe-west", "-", " ")}`,
- },
- },
-
- {
- "block_assign.hcl",
- true,
- nil,
- },
-
- {
- "escape_backslash.hcl",
- false,
- map[string]interface{}{
- "output": []map[string]interface{}{
- map[string]interface{}{
- "one": `${replace(var.sub_domain, ".", "\\.")}`,
- "two": `${replace(var.sub_domain, ".", "\\\\.")}`,
- "many": `${replace(var.sub_domain, ".", "\\\\\\\\.")}`,
- },
- },
- },
- },
-
- {
- "git_crypt.hcl",
- true,
- nil,
- },
-
- {
- "object_with_bool.hcl",
- false,
- map[string]interface{}{
- "path": []map[string]interface{}{
- map[string]interface{}{
- "policy": "write",
- "permissions": []map[string]interface{}{
- map[string]interface{}{
- "bool": []interface{}{false},
- },
- },
- },
- },
- },
- },
- }
-
- for _, tc := range cases {
- t.Run(tc.File, func(t *testing.T) {
- d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.File))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- var out interface{}
- err = Decode(&out, string(d))
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %s\n\nError: %s", tc.File, err)
- }
-
- if !reflect.DeepEqual(out, tc.Out) {
- t.Fatalf("Input: %s. Actual, Expected.\n\n%#v\n\n%#v", tc.File, out, tc.Out)
- }
-
- var v interface{}
- err = Unmarshal(d, &v)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %s\n\nError: %s", tc.File, err)
- }
-
- if !reflect.DeepEqual(v, tc.Out) {
- t.Fatalf("Input: %s. Actual, Expected.\n\n%#v\n\n%#v", tc.File, out, tc.Out)
- }
- })
- }
-}
-
-func TestDecode_interfaceInline(t *testing.T) {
- cases := []struct {
- Value string
- Err bool
- Out interface{}
- }{
- {"t t e{{}}", true, nil},
- {"t=0t d {}", true, map[string]interface{}{"t": 0}},
- {"v=0E0v d{}", true, map[string]interface{}{"v": float64(0)}},
- }
-
- for _, tc := range cases {
- t.Logf("Testing: %q", tc.Value)
-
- var out interface{}
- err := Decode(&out, tc.Value)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %q\n\nError: %s", tc.Value, err)
- }
-
- if !reflect.DeepEqual(out, tc.Out) {
- t.Fatalf("Input: %q. Actual, Expected.\n\n%#v\n\n%#v", tc.Value, out, tc.Out)
- }
-
- var v interface{}
- err = Unmarshal([]byte(tc.Value), &v)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %q\n\nError: %s", tc.Value, err)
- }
-
- if !reflect.DeepEqual(v, tc.Out) {
- t.Fatalf("Input: %q. Actual, Expected.\n\n%#v\n\n%#v", tc.Value, out, tc.Out)
- }
- }
-}
-
-func TestDecode_equal(t *testing.T) {
- cases := []struct {
- One, Two string
- }{
- {
- "basic.hcl",
- "basic.json",
- },
- {
- "float.hcl",
- "float.json",
- },
- /*
- {
- "structure.hcl",
- "structure.json",
- },
- */
- {
- "structure.hcl",
- "structure_flat.json",
- },
- {
- "terraform_heroku.hcl",
- "terraform_heroku.json",
- },
- }
-
- for _, tc := range cases {
- p1 := filepath.Join(fixtureDir, tc.One)
- p2 := filepath.Join(fixtureDir, tc.Two)
-
- d1, err := ioutil.ReadFile(p1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- d2, err := ioutil.ReadFile(p2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- var i1, i2 interface{}
- err = Decode(&i1, string(d1))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = Decode(&i2, string(d2))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if !reflect.DeepEqual(i1, i2) {
- t.Fatalf(
- "%s != %s\n\n%#v\n\n%#v",
- tc.One, tc.Two,
- i1, i2)
- }
- }
-}
-
-func TestDecode_flatMap(t *testing.T) {
- var val map[string]map[string]string
-
- err := Decode(&val, testReadFile(t, "structure_flatmap.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- expected := map[string]map[string]string{
- "foo": map[string]string{
- "foo": "bar",
- "key": "7",
- },
- }
-
- if !reflect.DeepEqual(val, expected) {
- t.Fatalf("Actual: %#v\n\nExpected: %#v", val, expected)
- }
-}
-
-func TestDecode_structure(t *testing.T) {
- type Embedded interface{}
-
- type V struct {
- Embedded `hcl:"-"`
- Key int
- Foo string
- }
-
- var actual V
-
- err := Decode(&actual, testReadFile(t, "flat.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- expected := V{
- Key: 7,
- Foo: "bar",
- }
-
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("Actual: %#v\n\nExpected: %#v", actual, expected)
- }
-}
-
-func TestDecode_structurePtr(t *testing.T) {
- type V struct {
- Key int
- Foo string
- }
-
- var actual *V
-
- err := Decode(&actual, testReadFile(t, "flat.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- expected := &V{
- Key: 7,
- Foo: "bar",
- }
-
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("Actual: %#v\n\nExpected: %#v", actual, expected)
- }
-}
-
-func TestDecode_structureArray(t *testing.T) {
- // This test is extracted from a failure in Consul (consul.io),
- // hence the interesting structure naming.
-
- type KeyPolicyType string
-
- type KeyPolicy struct {
- Prefix string `hcl:",key"`
- Policy KeyPolicyType
- }
-
- type Policy struct {
- Keys []KeyPolicy `hcl:"key,expand"`
- }
-
- expected := Policy{
- Keys: []KeyPolicy{
- KeyPolicy{
- Prefix: "",
- Policy: "read",
- },
- KeyPolicy{
- Prefix: "foo/",
- Policy: "write",
- },
- KeyPolicy{
- Prefix: "foo/bar/",
- Policy: "read",
- },
- KeyPolicy{
- Prefix: "foo/bar/baz",
- Policy: "deny",
- },
- },
- }
-
- files := []string{
- "decode_policy.hcl",
- "decode_policy.json",
- }
-
- for _, f := range files {
- var actual Policy
-
- err := Decode(&actual, testReadFile(t, f))
- if err != nil {
- t.Fatalf("Input: %s\n\nerr: %s", f, err)
- }
-
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected)
- }
- }
-}
-
-func TestDecode_sliceExpand(t *testing.T) {
- type testInner struct {
- Name string `hcl:",key"`
- Key string
- }
-
- type testStruct struct {
- Services []testInner `hcl:"service,expand"`
- }
-
- expected := testStruct{
- Services: []testInner{
- testInner{
- Name: "my-service-0",
- Key: "value",
- },
- testInner{
- Name: "my-service-1",
- Key: "value",
- },
- },
- }
-
- files := []string{
- "slice_expand.hcl",
- }
-
- for _, f := range files {
- t.Logf("Testing: %s", f)
-
- var actual testStruct
- err := Decode(&actual, testReadFile(t, f))
- if err != nil {
- t.Fatalf("Input: %s\n\nerr: %s", f, err)
- }
-
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected)
- }
- }
-}
-
-func TestDecode_structureMap(t *testing.T) {
- // This test is extracted from a failure in Terraform (terraform.io),
- // hence the interesting structure naming.
-
- type hclVariable struct {
- Default interface{}
- Description string
- Fields []string `hcl:",decodedFields"`
- }
-
- type rawConfig struct {
- Variable map[string]hclVariable
- }
-
- expected := rawConfig{
- Variable: map[string]hclVariable{
- "foo": hclVariable{
- Default: "bar",
- Description: "bar",
- Fields: []string{"Default", "Description"},
- },
-
- "amis": hclVariable{
- Default: []map[string]interface{}{
- map[string]interface{}{
- "east": "foo",
- },
- },
- Fields: []string{"Default"},
- },
- },
- }
-
- files := []string{
- "decode_tf_variable.hcl",
- "decode_tf_variable.json",
- }
-
- for _, f := range files {
- t.Logf("Testing: %s", f)
-
- var actual rawConfig
- err := Decode(&actual, testReadFile(t, f))
- if err != nil {
- t.Fatalf("Input: %s\n\nerr: %s", f, err)
- }
-
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected)
- }
- }
-}
-
-func TestDecode_structureMapInvalid(t *testing.T) {
- // Terraform GH-8295
-
- type hclVariable struct {
- Default interface{}
- Description string
- Fields []string `hcl:",decodedFields"`
- }
-
- type rawConfig struct {
- Variable map[string]*hclVariable
- }
-
- var actual rawConfig
- err := Decode(&actual, testReadFile(t, "terraform_variable_invalid.json"))
- if err == nil {
- t.Fatal("expected error")
- }
-}
-
-func TestDecode_interfaceNonPointer(t *testing.T) {
- var value interface{}
- err := Decode(value, testReadFile(t, "basic_int_string.hcl"))
- if err == nil {
- t.Fatal("should error")
- }
-}
-
-func TestDecode_intString(t *testing.T) {
- var value struct {
- Count int
- }
-
- err := Decode(&value, testReadFile(t, "basic_int_string.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if value.Count != 3 {
- t.Fatalf("bad: %#v", value.Count)
- }
-}
-
-func TestDecode_float32(t *testing.T) {
- var value struct {
- A float32 `hcl:"a"`
- B float32 `hcl:"b"`
- }
-
- err := Decode(&value, testReadFile(t, "float.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if got, want := value.A, float32(1.02); got != want {
- t.Fatalf("wrong result %#v; want %#v", got, want)
- }
- if got, want := value.B, float32(2); got != want {
- t.Fatalf("wrong result %#v; want %#v", got, want)
- }
-}
-
-func TestDecode_float64(t *testing.T) {
- var value struct {
- A float64 `hcl:"a"`
- B float64 `hcl:"b"`
- }
-
- err := Decode(&value, testReadFile(t, "float.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if got, want := value.A, float64(1.02); got != want {
- t.Fatalf("wrong result %#v; want %#v", got, want)
- }
- if got, want := value.B, float64(2); got != want {
- t.Fatalf("wrong result %#v; want %#v", got, want)
- }
-}
-
-func TestDecode_intStringAliased(t *testing.T) {
- var value struct {
- Count time.Duration
- }
-
- err := Decode(&value, testReadFile(t, "basic_int_string.hcl"))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if value.Count != time.Duration(3) {
- t.Fatalf("bad: %#v", value.Count)
- }
-}
-
-func TestDecode_Node(t *testing.T) {
- // given
- var value struct {
- Content ast.Node
- Nested struct {
- Content ast.Node
- }
- }
-
- content := `
-content {
- hello = "world"
-}
-`
-
- // when
- err := Decode(&value, content)
-
- // then
- if err != nil {
- t.Errorf("unable to decode content, %v", err)
- return
- }
-
- // verify ast.Node can be decoded later
- var v map[string]interface{}
- err = DecodeObject(&v, value.Content)
- if err != nil {
- t.Errorf("unable to decode content, %v", err)
- return
- }
-
- if v["hello"] != "world" {
- t.Errorf("expected mapping to be returned")
- }
-}
-
-func TestDecode_NestedNode(t *testing.T) {
- // given
- var value struct {
- Nested struct {
- Content ast.Node
- }
- }
-
- content := `
-nested "content" {
- hello = "world"
-}
-`
-
- // when
- err := Decode(&value, content)
-
- // then
- if err != nil {
- t.Errorf("unable to decode content, %v", err)
- return
- }
-
- // verify ast.Node can be decoded later
- var v map[string]interface{}
- err = DecodeObject(&v, value.Nested.Content)
- if err != nil {
- t.Errorf("unable to decode content, %v", err)
- return
- }
-
- if v["hello"] != "world" {
- t.Errorf("expected mapping to be returned")
- }
-}
-
-// https://github.com/hashicorp/hcl/issues/60
-func TestDecode_topLevelKeys(t *testing.T) {
- type Template struct {
- Source string
- }
-
- templates := struct {
- Templates []*Template `hcl:"template"`
- }{}
-
- err := Decode(&templates, `
- template {
- source = "blah"
- }
-
- template {
- source = "blahblah"
- }`)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if templates.Templates[0].Source != "blah" {
- t.Errorf("bad source: %s", templates.Templates[0].Source)
- }
-
- if templates.Templates[1].Source != "blahblah" {
- t.Errorf("bad source: %s", templates.Templates[1].Source)
- }
-}
-
-func TestDecode_flattenedJSON(t *testing.T) {
- // make sure we can also correctly extract a Name key too
- type V struct {
- Name string `hcl:",key"`
- Description string
- Default map[string]string
- }
- type Vars struct {
- Variable []*V
- }
-
- cases := []struct {
- JSON string
- Out interface{}
- Expected interface{}
- }{
- { // Nested object, no sibling keys
- JSON: `
-{
- "var_name": {
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
-}
- `,
- Out: &[]*V{},
- Expected: &[]*V{
- &V{
- Name: "var_name",
- Default: map[string]string{"key1": "a", "key2": "b"},
- },
- },
- },
-
- { // Nested object with a sibling key (this worked previously)
- JSON: `
-{
- "var_name": {
- "description": "Described",
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
-}
- `,
- Out: &[]*V{},
- Expected: &[]*V{
- &V{
- Name: "var_name",
- Description: "Described",
- Default: map[string]string{"key1": "a", "key2": "b"},
- },
- },
- },
-
- { // Multiple nested objects, one with a sibling key
- JSON: `
-{
- "variable": {
- "var_1": {
- "default": {
- "key1": "a",
- "key2": "b"
- }
- },
- "var_2": {
- "description": "Described",
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
- }
-}
- `,
- Out: &Vars{},
- Expected: &Vars{
- Variable: []*V{
- &V{
- Name: "var_1",
- Default: map[string]string{"key1": "a", "key2": "b"},
- },
- &V{
- Name: "var_2",
- Description: "Described",
- Default: map[string]string{"key1": "a", "key2": "b"},
- },
- },
- },
- },
-
- { // Nested object to maps
- JSON: `
-{
- "variable": {
- "var_name": {
- "description": "Described",
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
- }
-}
- `,
- Out: &[]map[string]interface{}{},
- Expected: &[]map[string]interface{}{
- {
- "variable": []map[string]interface{}{
- {
- "var_name": []map[string]interface{}{
- {
- "description": "Described",
- "default": []map[string]interface{}{
- {
- "key1": "a",
- "key2": "b",
- },
- },
- },
- },
- },
- },
- },
- },
- },
-
- { // Nested object to maps without a sibling key should decode the same as above
- JSON: `
-{
- "variable": {
- "var_name": {
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
- }
-}
- `,
- Out: &[]map[string]interface{}{},
- Expected: &[]map[string]interface{}{
- {
- "variable": []map[string]interface{}{
- {
- "var_name": []map[string]interface{}{
- {
- "default": []map[string]interface{}{
- {
- "key1": "a",
- "key2": "b",
- },
- },
- },
- },
- },
- },
- },
- },
- },
-
- { // Nested objects, one with a sibling key, and one without
- JSON: `
-{
- "variable": {
- "var_1": {
- "default": {
- "key1": "a",
- "key2": "b"
- }
- },
- "var_2": {
- "description": "Described",
- "default": {
- "key1": "a",
- "key2": "b"
- }
- }
- }
-}
- `,
- Out: &[]map[string]interface{}{},
- Expected: &[]map[string]interface{}{
- {
- "variable": []map[string]interface{}{
- {
- "var_1": []map[string]interface{}{
- {
- "default": []map[string]interface{}{
- {
- "key1": "a",
- "key2": "b",
- },
- },
- },
- },
- },
- },
- },
- {
- "variable": []map[string]interface{}{
- {
- "var_2": []map[string]interface{}{
- {
- "description": "Described",
- "default": []map[string]interface{}{
- {
- "key1": "a",
- "key2": "b",
- },
- },
- },
- },
- },
- },
- },
- },
- },
- }
-
- for i, tc := range cases {
- err := Decode(tc.Out, tc.JSON)
- if err != nil {
- t.Fatalf("[%d] err: %s", i, err)
- }
-
- if !reflect.DeepEqual(tc.Out, tc.Expected) {
- t.Fatalf("[%d]\ngot: %s\nexpected: %s\n", i, spew.Sdump(tc.Out), spew.Sdump(tc.Expected))
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go
deleted file mode 100644
index 942256cad..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go
+++ /dev/null
@@ -1,200 +0,0 @@
-package ast
-
-import (
- "reflect"
- "strings"
- "testing"
-
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-func TestObjectListFilter(t *testing.T) {
- var cases = []struct {
- Filter []string
- Input []*ObjectItem
- Output []*ObjectItem
- }{
- {
- []string{"foo"},
- []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{
- Token: token.Token{Type: token.STRING, Text: `"foo"`},
- },
- },
- },
- },
- []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{},
- },
- },
- },
-
- {
- []string{"foo"},
- []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}},
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}},
- },
- },
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}},
- },
- },
- },
- []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}},
- },
- },
- },
- },
- }
-
- for _, tc := range cases {
- input := &ObjectList{Items: tc.Input}
- expected := &ObjectList{Items: tc.Output}
- if actual := input.Filter(tc.Filter...); !reflect.DeepEqual(actual, expected) {
- t.Fatalf("in order: input, expected, actual\n\n%#v\n\n%#v\n\n%#v", input, expected, actual)
- }
- }
-}
-
-func TestWalk(t *testing.T) {
- items := []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}},
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}},
- },
- Val: &LiteralType{Token: token.Token{Type: token.STRING, Text: `"example"`}},
- },
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}},
- },
- },
- }
-
- node := &ObjectList{Items: items}
-
- order := []string{
- "*ast.ObjectList",
- "*ast.ObjectItem",
- "*ast.ObjectKey",
- "*ast.ObjectKey",
- "*ast.LiteralType",
- "*ast.ObjectItem",
- "*ast.ObjectKey",
- }
- count := 0
-
- Walk(node, func(n Node) (Node, bool) {
- if n == nil {
- return n, false
- }
-
- typeName := reflect.TypeOf(n).String()
- if order[count] != typeName {
- t.Errorf("expected '%s' got: '%s'", order[count], typeName)
- }
- count++
- return n, true
- })
-}
-
-func TestWalkEquality(t *testing.T) {
- items := []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}},
- },
- },
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}},
- },
- },
- }
-
- node := &ObjectList{Items: items}
-
- rewritten := Walk(node, func(n Node) (Node, bool) { return n, true })
-
- newNode, ok := rewritten.(*ObjectList)
- if !ok {
- t.Fatalf("expected Objectlist, got %T", rewritten)
- }
-
- if !reflect.DeepEqual(node, newNode) {
- t.Fatal("rewritten node is not equal to the given node")
- }
-
- if len(newNode.Items) != 2 {
- t.Error("expected newNode length 2, got: %d", len(newNode.Items))
- }
-
- expected := []string{
- `"foo"`,
- `"bar"`,
- }
-
- for i, item := range newNode.Items {
- if len(item.Keys) != 1 {
- t.Error("expected keys newNode length 1, got: %d", len(item.Keys))
- }
-
- if item.Keys[0].Token.Text != expected[i] {
- t.Errorf("expected key %s, got %s", expected[i], item.Keys[0].Token.Text)
- }
-
- if item.Val != nil {
- t.Errorf("expected item value should be nil")
- }
- }
-}
-
-func TestWalkRewrite(t *testing.T) {
- items := []*ObjectItem{
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}},
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}},
- },
- },
- &ObjectItem{
- Keys: []*ObjectKey{
- &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}},
- },
- },
- }
-
- node := &ObjectList{Items: items}
-
- suffix := "_example"
- node = Walk(node, func(n Node) (Node, bool) {
- switch i := n.(type) {
- case *ObjectKey:
- i.Token.Text = i.Token.Text + suffix
- n = i
- }
- return n, true
- }).(*ObjectList)
-
- Walk(node, func(n Node) (Node, bool) {
- switch i := n.(type) {
- case *ObjectKey:
- if !strings.HasSuffix(i.Token.Text, suffix) {
- t.Errorf("Token '%s' should have suffix: %s", i.Token.Text, suffix)
- }
- }
- return n, true
- })
-
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go
deleted file mode 100644
index 2380d71e3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Derivative work from:
-// - https://golang.org/src/cmd/gofmt/gofmt.go
-// - https://github.com/fatih/hclfmt
-
-package fmtcmd
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
-
- "github.com/hashicorp/hcl/hcl/printer"
-)
-
-var (
- ErrWriteStdin = errors.New("cannot use write option with standard input")
-)
-
-type Options struct {
- List bool // list files whose formatting differs
- Write bool // write result to (source) file instead of stdout
- Diff bool // display diffs of formatting changes
-}
-
-func isValidFile(f os.FileInfo, extensions []string) bool {
- if !f.IsDir() && !strings.HasPrefix(f.Name(), ".") {
- for _, ext := range extensions {
- if strings.HasSuffix(f.Name(), "."+ext) {
- return true
- }
- }
- }
-
- return false
-}
-
-// If in == nil, the source is the contents of the file with the given filename.
-func processFile(filename string, in io.Reader, out io.Writer, stdin bool, opts Options) error {
- if in == nil {
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- in = f
- }
-
- src, err := ioutil.ReadAll(in)
- if err != nil {
- return err
- }
-
- res, err := printer.Format(src)
- if err != nil {
- return fmt.Errorf("In %s: %s", filename, err)
- }
-
- if !bytes.Equal(src, res) {
- // formatting has changed
- if opts.List {
- fmt.Fprintln(out, filename)
- }
- if opts.Write {
- err = ioutil.WriteFile(filename, res, 0644)
- if err != nil {
- return err
- }
- }
- if opts.Diff {
- data, err := diff(src, res)
- if err != nil {
- return fmt.Errorf("computing diff: %s", err)
- }
- fmt.Fprintf(out, "diff a/%s b/%s\n", filename, filename)
- out.Write(data)
- }
- }
-
- if !opts.List && !opts.Write && !opts.Diff {
- _, err = out.Write(res)
- }
-
- return err
-}
-
-func walkDir(path string, extensions []string, stdout io.Writer, opts Options) error {
- visitFile := func(path string, f os.FileInfo, err error) error {
- if err == nil && isValidFile(f, extensions) {
- err = processFile(path, nil, stdout, false, opts)
- }
- return err
- }
-
- return filepath.Walk(path, visitFile)
-}
-
-func Run(
- paths, extensions []string,
- stdin io.Reader,
- stdout io.Writer,
- opts Options,
-) error {
- if len(paths) == 0 {
- if opts.Write {
- return ErrWriteStdin
- }
- if err := processFile("<standard input>", stdin, stdout, true, opts); err != nil {
- return err
- }
- return nil
- }
-
- for _, path := range paths {
- switch dir, err := os.Stat(path); {
- case err != nil:
- return err
- case dir.IsDir():
- if err := walkDir(path, extensions, stdout, opts); err != nil {
- return err
- }
- default:
- if err := processFile(path, nil, stdout, false, opts); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
-
-func diff(b1, b2 []byte) (data []byte, err error) {
- f1, err := ioutil.TempFile("", "")
- if err != nil {
- return
- }
- defer os.Remove(f1.Name())
- defer f1.Close()
-
- f2, err := ioutil.TempFile("", "")
- if err != nil {
- return
- }
- defer os.Remove(f2.Name())
- defer f2.Close()
-
- f1.Write(b1)
- f2.Write(b2)
-
- data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput()
- if len(data) > 0 {
- // diff exits with a non-zero status when the files don't match.
- // Ignore that failure as long as we get output.
- err = nil
- }
- return
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go
deleted file mode 100644
index b952d76d8..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go
+++ /dev/null
@@ -1,440 +0,0 @@
-// +build !windows
-// TODO(jen20): These need fixing on Windows but fmt is not used right now
-// and red CI is making it harder to process other bugs, so ignore until
-// we get around to fixing them.
-
-package fmtcmd
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "reflect"
- "regexp"
- "sort"
- "syscall"
- "testing"
-
- "github.com/hashicorp/hcl/testhelper"
-)
-
-var fixtureExtensions = []string{"hcl"}
-
-func init() {
- sort.Sort(ByFilename(fixtures))
-}
-
-func TestIsValidFile(t *testing.T) {
- const fixtureDir = "./test-fixtures"
-
- cases := []struct {
- Path string
- Expected bool
- }{
- {"good.hcl", true},
- {".hidden.ignore", false},
- {"file.ignore", false},
- {"dir.ignore", false},
- }
-
- for _, tc := range cases {
- file, err := os.Stat(filepath.Join(fixtureDir, tc.Path))
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
-
- if res := isValidFile(file, fixtureExtensions); res != tc.Expected {
- t.Errorf("want: %b, got: %b", tc.Expected, res)
- }
- }
-}
-
-func TestRunMultiplePaths(t *testing.T) {
- path1, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path1)
- path2, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path2)
-
- var expectedOut bytes.Buffer
- for _, path := range []string{path1, path2} {
- for _, fixture := range fixtures {
- if !bytes.Equal(fixture.golden, fixture.input) {
- expectedOut.WriteString(filepath.Join(path, fixture.filename) + "\n")
- }
- }
- }
-
- _, stdout := mockIO()
- err = Run(
- []string{path1, path2},
- fixtureExtensions,
- nil, stdout,
- Options{
- List: true,
- },
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if stdout.String() != expectedOut.String() {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunSubDirectories(t *testing.T) {
- pathParent, err := ioutil.TempDir("", "")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(pathParent)
-
- path1, err := renderFixtures(pathParent)
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- path2, err := renderFixtures(pathParent)
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
-
- paths := []string{path1, path2}
- sort.Strings(paths)
-
- var expectedOut bytes.Buffer
- for _, path := range paths {
- for _, fixture := range fixtures {
- if !bytes.Equal(fixture.golden, fixture.input) {
- expectedOut.WriteString(filepath.Join(path, fixture.filename) + "\n")
- }
- }
- }
-
- _, stdout := mockIO()
- err = Run(
- []string{pathParent},
- fixtureExtensions,
- nil, stdout,
- Options{
- List: true,
- },
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if stdout.String() != expectedOut.String() {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunStdin(t *testing.T) {
- var expectedOut bytes.Buffer
- for i, fixture := range fixtures {
- if i != 0 {
- expectedOut.WriteString("\n")
- }
- expectedOut.Write(fixture.golden)
- }
-
- stdin, stdout := mockIO()
- for _, fixture := range fixtures {
- stdin.Write(fixture.input)
- }
-
- err := Run(
- []string{},
- fixtureExtensions,
- stdin, stdout,
- Options{},
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if !bytes.Equal(stdout.Bytes(), expectedOut.Bytes()) {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunStdinAndWrite(t *testing.T) {
- var expectedOut = []byte{}
-
- stdin, stdout := mockIO()
- stdin.WriteString("")
- err := Run(
- []string{}, []string{},
- stdin, stdout,
- Options{
- Write: true,
- },
- )
-
- if err != ErrWriteStdin {
- t.Errorf("error want:\n%s\ngot:\n%s", ErrWriteStdin, err)
- }
- if !bytes.Equal(stdout.Bytes(), expectedOut) {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunFileError(t *testing.T) {
- path, err := ioutil.TempDir("", "")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path)
- filename := filepath.Join(path, "unreadable.hcl")
-
- var expectedError = &os.PathError{
- Op: "open",
- Path: filename,
- Err: syscall.EACCES,
- }
-
- err = ioutil.WriteFile(filename, []byte{}, 0000)
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
-
- _, stdout := mockIO()
- err = Run(
- []string{path},
- fixtureExtensions,
- nil, stdout,
- Options{},
- )
-
- if !reflect.DeepEqual(err, expectedError) {
- t.Errorf("error want: %#v, got: %#v", expectedError, err)
- }
-}
-
-func TestRunNoOptions(t *testing.T) {
- path, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path)
-
- var expectedOut bytes.Buffer
- for _, fixture := range fixtures {
- expectedOut.Write(fixture.golden)
- }
-
- _, stdout := mockIO()
- err = Run(
- []string{path},
- fixtureExtensions,
- nil, stdout,
- Options{},
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if stdout.String() != expectedOut.String() {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunList(t *testing.T) {
- path, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path)
-
- var expectedOut bytes.Buffer
- for _, fixture := range fixtures {
- if !bytes.Equal(fixture.golden, fixture.input) {
- expectedOut.WriteString(fmt.Sprintln(filepath.Join(path, fixture.filename)))
- }
- }
-
- _, stdout := mockIO()
- err = Run(
- []string{path},
- fixtureExtensions,
- nil, stdout,
- Options{
- List: true,
- },
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if stdout.String() != expectedOut.String() {
- t.Errorf("stdout want:\n%s\ngot:\n%s", expectedOut, stdout)
- }
-}
-
-func TestRunWrite(t *testing.T) {
- path, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path)
-
- _, stdout := mockIO()
- err = Run(
- []string{path},
- fixtureExtensions,
- nil, stdout,
- Options{
- Write: true,
- },
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- for _, fixture := range fixtures {
- res, err := ioutil.ReadFile(filepath.Join(path, fixture.filename))
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if !bytes.Equal(res, fixture.golden) {
- t.Errorf("file %q contents want:\n%s\ngot:\n%s", fixture.filename, fixture.golden, res)
- }
- }
-}
-
-func TestRunDiff(t *testing.T) {
- path, err := renderFixtures("")
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- defer os.RemoveAll(path)
-
- var expectedOut bytes.Buffer
- for _, fixture := range fixtures {
- if len(fixture.diff) > 0 {
- expectedOut.WriteString(
- regexp.QuoteMeta(
- fmt.Sprintf("diff a/%s/%s b/%s/%s\n", path, fixture.filename, path, fixture.filename),
- ),
- )
- // Need to use regex to ignore datetimes in diff.
- expectedOut.WriteString(`--- .+?\n`)
- expectedOut.WriteString(`\+\+\+ .+?\n`)
- expectedOut.WriteString(regexp.QuoteMeta(string(fixture.diff)))
- }
- }
-
- expectedOutString := testhelper.Unix2dos(expectedOut.String())
-
- _, stdout := mockIO()
- err = Run(
- []string{path},
- fixtureExtensions,
- nil, stdout,
- Options{
- Diff: true,
- },
- )
-
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- }
- if !regexp.MustCompile(expectedOutString).Match(stdout.Bytes()) {
- t.Errorf("stdout want match:\n%s\ngot:\n%q", expectedOutString, stdout)
- }
-}
-
-func mockIO() (stdin, stdout *bytes.Buffer) {
- return new(bytes.Buffer), new(bytes.Buffer)
-}
-
-type fixture struct {
- filename string
- input, golden, diff []byte
-}
-
-type ByFilename []fixture
-
-func (s ByFilename) Len() int { return len(s) }
-func (s ByFilename) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s ByFilename) Less(i, j int) bool { return len(s[i].filename) > len(s[j].filename) }
-
-var fixtures = []fixture{
- {
- "noop.hcl",
- []byte(`resource "aws_security_group" "firewall" {
- count = 5
-}
-`),
- []byte(`resource "aws_security_group" "firewall" {
- count = 5
-}
-`),
- []byte(``),
- }, {
- "align_equals.hcl",
- []byte(`variable "foo" {
- default = "bar"
- description = "bar"
-}
-`),
- []byte(`variable "foo" {
- default = "bar"
- description = "bar"
-}
-`),
- []byte(`@@ -1,4 +1,4 @@
- variable "foo" {
-- default = "bar"
-+ default = "bar"
- description = "bar"
- }
-`),
- }, {
- "indentation.hcl",
- []byte(`provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-`),
- []byte(`provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-`),
- []byte(`@@ -1,4 +1,4 @@
- provider "aws" {
-- access_key = "foo"
-- secret_key = "bar"
-+ access_key = "foo"
-+ secret_key = "bar"
- }
-`),
- },
-}
-
-// parent can be an empty string, in which case the system's default
-// temporary directory will be used.
-func renderFixtures(parent string) (path string, err error) {
- path, err = ioutil.TempDir(parent, "")
- if err != nil {
- return "", err
- }
-
- for _, fixture := range fixtures {
- err = ioutil.WriteFile(filepath.Join(path, fixture.filename), []byte(fixture.input), 0644)
- if err != nil {
- os.RemoveAll(path)
- return "", err
- }
- }
-
- return path, nil
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore
deleted file mode 100644
index 9977a2836..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore
+++ /dev/null
@@ -1 +0,0 @@
-invalid
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore
+++ /dev/null
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore
deleted file mode 100644
index 9977a2836..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore
+++ /dev/null
@@ -1 +0,0 @@
-invalid
diff --git a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl b/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl
+++ /dev/null
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go
deleted file mode 100644
index 32399fec5..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package parser
-
-import (
- "testing"
-)
-
-func TestPosError_impl(t *testing.T) {
- var _ error = new(PosError)
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
index 098e1bc49..64c83bcfb 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
@@ -205,6 +205,12 @@ func (p *Parser) objectItem() (*ast.ObjectItem, error) {
}
}
+ // key=#comment
+ // val
+ if p.lineComment != nil {
+ o.LineComment, p.lineComment = p.lineComment, nil
+ }
+
// do a look-ahead for line comment
p.scan()
if len(keys) > 0 && o.Val.Pos().Line == keys[0].Pos().Line && p.lineComment != nil {
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go
deleted file mode 100644
index 270212207..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go
+++ /dev/null
@@ -1,575 +0,0 @@
-package parser
-
-import (
- "fmt"
- "io/ioutil"
- "path/filepath"
- "reflect"
- "runtime"
- "strings"
- "testing"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-func TestType(t *testing.T) {
- var literals = []struct {
- typ token.Type
- src string
- }{
- {token.STRING, `foo = "foo"`},
- {token.NUMBER, `foo = 123`},
- {token.NUMBER, `foo = -29`},
- {token.FLOAT, `foo = 123.12`},
- {token.FLOAT, `foo = -123.12`},
- {token.BOOL, `foo = true`},
- {token.HEREDOC, "foo = <<EOF\nHello\nWorld\nEOF"},
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- lit, ok := item.Val.(*ast.LiteralType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if lit.Token.Type != l.typ {
- t.Errorf("want: %s, got: %s", l.typ, lit.Token.Type)
- }
- }
-}
-
-func TestListType(t *testing.T) {
- var literals = []struct {
- src string
- tokens []token.Type
- }{
- {
- `foo = ["123", 123]`,
- []token.Type{token.STRING, token.NUMBER},
- },
- {
- `foo = [123, "123",]`,
- []token.Type{token.NUMBER, token.STRING},
- },
- {
- `foo = [false]`,
- []token.Type{token.BOOL},
- },
- {
- `foo = []`,
- []token.Type{},
- },
- {
- `foo = [1,
-"string",
-<<EOF
-heredoc contents
-EOF
-]`,
- []token.Type{token.NUMBER, token.STRING, token.HEREDOC},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- tokens := []token.Type{}
- for _, li := range list.List {
- if tp, ok := li.(*ast.LiteralType); ok {
- tokens = append(tokens, tp.Token.Type)
- }
- }
-
- equals(t, l.tokens, tokens)
- }
-}
-
-func TestListOfMaps(t *testing.T) {
- src := `foo = [
- {key = "bar"},
- {key = "baz", key2 = "qux"},
- ]`
- p := newParser([]byte(src))
-
- file, err := p.Parse()
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- // Here we make all sorts of assumptions about the input structure w/ type
- // assertions. The intent is only for this to be a "smoke test" ensuring
- // parsing actually performed its duty - giving this test something a bit
- // more robust than _just_ "no error occurred".
- expected := []string{`"bar"`, `"baz"`, `"qux"`}
- actual := make([]string, 0, 3)
- ol := file.Node.(*ast.ObjectList)
- objItem := ol.Items[0]
- list := objItem.Val.(*ast.ListType)
- for _, node := range list.List {
- obj := node.(*ast.ObjectType)
- for _, item := range obj.List.Items {
- val := item.Val.(*ast.LiteralType)
- actual = append(actual, val.Token.Text)
- }
-
- }
- if !reflect.DeepEqual(expected, actual) {
- t.Fatalf("Expected: %#v, got %#v", expected, actual)
- }
-}
-
-func TestListOfMaps_requiresComma(t *testing.T) {
- src := `foo = [
- {key = "bar"}
- {key = "baz"}
- ]`
- p := newParser([]byte(src))
-
- _, err := p.Parse()
- if err == nil {
- t.Fatalf("Expected error, got none!")
- }
-
- expected := "error parsing list, expected comma or list end"
- if !strings.Contains(err.Error(), expected) {
- t.Fatalf("Expected err:\n %s\nTo contain:\n %s\n", err, expected)
- }
-}
-
-func TestListType_leadComment(t *testing.T) {
- var literals = []struct {
- src string
- comment []string
- }{
- {
- `foo = [
- 1,
- # bar
- 2,
- 3,
- ]`,
- []string{"", "# bar", ""},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Fatal(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Fatalf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if len(list.List) != len(l.comment) {
- t.Fatalf("bad: %d", len(list.List))
- }
-
- for i, li := range list.List {
- lt := li.(*ast.LiteralType)
- comment := l.comment[i]
-
- if (lt.LeadComment == nil) != (comment == "") {
- t.Fatalf("bad: %#v", lt)
- }
-
- if comment == "" {
- continue
- }
-
- actual := lt.LeadComment.List[0].Text
- if actual != comment {
- t.Fatalf("bad: %q %q", actual, comment)
- }
- }
- }
-}
-
-func TestListType_lineComment(t *testing.T) {
- var literals = []struct {
- src string
- comment []string
- }{
- {
- `foo = [
- 1,
- 2, # bar
- 3,
- ]`,
- []string{"", "# bar", ""},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Fatal(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Fatalf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if len(list.List) != len(l.comment) {
- t.Fatalf("bad: %d", len(list.List))
- }
-
- for i, li := range list.List {
- lt := li.(*ast.LiteralType)
- comment := l.comment[i]
-
- if (lt.LineComment == nil) != (comment == "") {
- t.Fatalf("bad: %s", lt)
- }
-
- if comment == "" {
- continue
- }
-
- actual := lt.LineComment.List[0].Text
- if actual != comment {
- t.Fatalf("bad: %q %q", actual, comment)
- }
- }
- }
-}
-
-func TestObjectType(t *testing.T) {
- var literals = []struct {
- src string
- nodeType []ast.Node
- itemLen int
- }{
- {
- `foo = {}`,
- nil,
- 0,
- },
- {
- `foo = {
- bar = "fatih"
- }`,
- []ast.Node{&ast.LiteralType{}},
- 1,
- },
- {
- `foo = {
- bar = "fatih"
- baz = ["arslan"]
- }`,
- []ast.Node{
- &ast.LiteralType{},
- &ast.ListType{},
- },
- 2,
- },
- {
- `foo = {
- bar {}
- }`,
- []ast.Node{
- &ast.ObjectType{},
- },
- 1,
- },
- {
- `foo {
- bar {}
- foo = true
- }`,
- []ast.Node{
- &ast.ObjectType{},
- &ast.LiteralType{},
- },
- 2,
- },
- }
-
- for _, l := range literals {
- t.Logf("Source: %s", l.src)
-
- p := newParser([]byte(l.src))
- // p.enableTrace = true
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- continue
- }
-
- // we know that the ObjectKey name is foo for all cases, what matters
- // is the object
- obj, ok := item.Val.(*ast.ObjectType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- continue
- }
-
- // check if the total length of items are correct
- equals(t, l.itemLen, len(obj.List.Items))
-
- // check if the types are correct
- for i, item := range obj.List.Items {
- equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val))
- }
- }
-}
-
-func TestObjectKey(t *testing.T) {
- keys := []struct {
- exp []token.Type
- src string
- }{
- {[]token.Type{token.IDENT}, `foo {}`},
- {[]token.Type{token.IDENT}, `foo = {}`},
- {[]token.Type{token.IDENT}, `foo = bar`},
- {[]token.Type{token.IDENT}, `foo = 123`},
- {[]token.Type{token.IDENT}, `foo = "${var.bar}`},
- {[]token.Type{token.STRING}, `"foo" {}`},
- {[]token.Type{token.STRING}, `"foo" = {}`},
- {[]token.Type{token.STRING}, `"foo" = "${var.bar}`},
- {[]token.Type{token.IDENT, token.IDENT}, `foo bar {}`},
- {[]token.Type{token.IDENT, token.STRING}, `foo "bar" {}`},
- {[]token.Type{token.STRING, token.IDENT}, `"foo" bar {}`},
- {[]token.Type{token.IDENT, token.IDENT, token.IDENT}, `foo bar baz {}`},
- }
-
- for _, k := range keys {
- p := newParser([]byte(k.src))
- keys, err := p.objectKey()
- if err != nil {
- t.Fatal(err)
- }
-
- tokens := []token.Type{}
- for _, o := range keys {
- tokens = append(tokens, o.Token.Type)
- }
-
- equals(t, k.exp, tokens)
- }
-
- errKeys := []struct {
- src string
- }{
- {`foo 12 {}`},
- {`foo bar = {}`},
- {`foo []`},
- {`12 {}`},
- }
-
- for _, k := range errKeys {
- p := newParser([]byte(k.src))
- _, err := p.objectKey()
- if err == nil {
- t.Errorf("case '%s' should give an error", k.src)
- }
- }
-}
-
-func TestCommentGroup(t *testing.T) {
- var cases = []struct {
- src string
- groups int
- }{
- {"# Hello\n# World", 1},
- {"# Hello\r\n# Windows", 1},
- }
-
- for _, tc := range cases {
- t.Run(tc.src, func(t *testing.T) {
- p := newParser([]byte(tc.src))
- file, err := p.Parse()
- if err != nil {
- t.Fatalf("parse error: %s", err)
- }
-
- if len(file.Comments) != tc.groups {
- t.Fatalf("bad: %#v", file.Comments)
- }
- })
- }
-}
-
-// Official HCL tests
-func TestParse(t *testing.T) {
- cases := []struct {
- Name string
- Err bool
- }{
- {
- "assign_colon.hcl",
- true,
- },
- {
- "comment.hcl",
- false,
- },
- {
- "comment_crlf.hcl",
- false,
- },
- {
- "comment_lastline.hcl",
- false,
- },
- {
- "comment_single.hcl",
- false,
- },
- {
- "empty.hcl",
- false,
- },
- {
- "list_comma.hcl",
- false,
- },
- {
- "multiple.hcl",
- false,
- },
- {
- "object_list_comma.hcl",
- false,
- },
- {
- "structure.hcl",
- false,
- },
- {
- "structure_basic.hcl",
- false,
- },
- {
- "structure_empty.hcl",
- false,
- },
- {
- "complex.hcl",
- false,
- },
- {
- "complex_crlf.hcl",
- false,
- },
- {
- "types.hcl",
- false,
- },
- {
- "array_comment.hcl",
- false,
- },
- {
- "array_comment_2.hcl",
- true,
- },
- {
- "missing_braces.hcl",
- true,
- },
- {
- "unterminated_object.hcl",
- true,
- },
- {
- "unterminated_object_2.hcl",
- true,
- },
- {
- "key_without_value.hcl",
- true,
- },
- {
- "object_key_without_value.hcl",
- true,
- },
- {
- "object_key_assign_without_value.hcl",
- true,
- },
- {
- "object_key_assign_without_value2.hcl",
- true,
- },
- {
- "object_key_assign_without_value3.hcl",
- true,
- },
- {
- "git_crypt.hcl",
- true,
- },
- }
-
- const fixtureDir = "./test-fixtures"
-
- for _, tc := range cases {
- t.Run(tc.Name, func(t *testing.T) {
- d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.Name))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- v, err := Parse(d)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %s\n\nError: %s\n\nAST: %#v", tc.Name, err, v)
- }
- })
- }
-}
-
-func TestParse_inline(t *testing.T) {
- cases := []struct {
- Value string
- Err bool
- }{
- {"t t e{{}}", true},
- {"o{{}}", true},
- {"t t e d N{{}}", true},
- {"t t e d{{}}", true},
- {"N{}N{{}}", true},
- {"v\nN{{}}", true},
- {"v=/\n[,", true},
- {"v=10kb", true},
- {"v=/foo", true},
- }
-
- for _, tc := range cases {
- t.Logf("Testing: %q", tc.Value)
- ast, err := Parse([]byte(tc.Value))
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %q\n\nError: %s\n\nAST: %#v", tc.Value, err, ast)
- }
- }
-}
-
-// equals fails the test if exp is not equal to act.
-func equals(tb testing.TB, exp, act interface{}) {
- if !reflect.DeepEqual(exp, act) {
- _, file, line, _ := runtime.Caller(1)
- fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act)
- tb.FailNow()
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
deleted file mode 100644
index 78c267582..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = [
- "1",
- "2", # comment
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
deleted file mode 100644
index f91667738..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-provisioner "remote-exec" {
- scripts = [
- "${path.module}/scripts/install-consul.sh" // missing comma
- "${path.module}/scripts/install-haproxy.sh"
- ]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
deleted file mode 100644
index eb5a99a69..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-resource = [{
- "foo": {
- "bar": {},
- "baz": [1, 2, "foo"],
- }
-}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
deleted file mode 100644
index dd3151cb7..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-resource = [{
- foo = [{
- bar = {}
- }]
-}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
deleted file mode 100644
index e32be87ed..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Foo
-
-/* Bar */
-
-/*
-/*
-Baz
-*/
-
-# Another
-
-# Multiple
-# Lines
-
-foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl
deleted file mode 100644
index 1ff7f29fd..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Foo
-
-/* Bar */
-
-/*
-/*
-Baz
-*/
-
-# Another
-
-# Multiple
-# Lines
-
-foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
deleted file mode 100644
index 5529b9b4c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
+++ /dev/null
@@ -1 +0,0 @@
-#foo \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
deleted file mode 100644
index fec56017d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
+++ /dev/null
@@ -1 +0,0 @@
-# Hello
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
deleted file mode 100644
index 13b3c2726..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
+++ /dev/null
@@ -1,42 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-variable "groups" { }
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}",
- "${element(split(\",\", var.groups)}",
- ]
- network_interface = {
- device_index = 0
- description = "Main network interface"
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = "${aws_instance.web.private_ip}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl
deleted file mode 100644
index 9b071d12b..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl
+++ /dev/null
@@ -1,42 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-variable "groups" { }
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}",
- "${element(split(\",\", var.groups)}",
- ]
- network_interface = {
- device_index = 0
- description = "Main network interface"
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = "${aws_instance.web.private_ip}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
deleted file mode 100644
index 0007aaf5f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
+++ /dev/null
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
deleted file mode 100644
index f691948e1..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
deleted file mode 100644
index 257cc5642..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
deleted file mode 100644
index 059d4ce65..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo"]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
deleted file mode 100644
index 50f4218ac..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo",]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
deleted file mode 100644
index 68e7274e6..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-# should error, but not crash
-resource "template_file" "cloud_config" {
- template = "$file("${path.module}/some/path")"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
deleted file mode 100644
index 029c54b0c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = "bar"
-key = 7
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
deleted file mode 100644
index 37a2c7a06..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-foo {
- bar =
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
deleted file mode 100644
index 83ec5e66e..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo {
- baz = 7
- bar =
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
deleted file mode 100644
index 21136d1d5..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo {
- bar =
- baz = 7
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
deleted file mode 100644
index a9987318c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-foo {
- bar
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
deleted file mode 100644
index 1921ec8f2..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = {one = 1, two = 2}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
deleted file mode 100644
index e9f77cae9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-default = {
- "eu-west-1": "ami-b1cf19c6",
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
deleted file mode 100644
index 92592fbb3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-// This is a test structure for the lexer
-foo bar "baz" {
- key = 7
- foo = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
deleted file mode 100644
index 7229a1f01..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-foo {
- value = 7
- "value" = 8
- "complex::value" = 9
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
deleted file mode 100644
index 4d156ddea..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
+++ /dev/null
@@ -1 +0,0 @@
-resource "foo" "bar" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
deleted file mode 100644
index cf2747ea1..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-foo = "bar"
-bar = 7
-baz = [1,2,3]
-foo = -12
-bar = 3.14159
-foo = true
-bar = false
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
deleted file mode 100644
index 31b37c4f9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo "baz" {
- bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
deleted file mode 100644
index 294e36d65..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-resource "aws_eip" "EIP1" { a { a { a { a { a {
- count = "1"
-
-resource "aws_eip" "EIP2" {
- count = "1"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
index c896d5844..7c038d12a 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
@@ -252,6 +252,14 @@ func (p *printer) objectItem(o *ast.ObjectItem) []byte {
}
}
+ // If key and val are on different lines, treat line comments like lead comments.
+ if o.LineComment != nil && o.Val.Pos().Line != o.Keys[0].Pos().Line {
+ for _, comment := range o.LineComment.List {
+ buf.WriteString(comment.Text)
+ buf.WriteByte(newline)
+ }
+ }
+
for i, k := range o.Keys {
buf.WriteString(k.Token.Text)
buf.WriteByte(blank)
@@ -265,7 +273,7 @@ func (p *printer) objectItem(o *ast.ObjectItem) []byte {
buf.Write(p.output(o.Val))
- if o.Val.Pos().Line == o.Keys[0].Pos().Line && o.LineComment != nil {
+ if o.LineComment != nil && o.Val.Pos().Line == o.Keys[0].Pos().Line {
buf.WriteByte(blank)
for _, comment := range o.LineComment.List {
buf.WriteString(comment.Text)
@@ -509,8 +517,13 @@ func (p *printer) alignedItems(items []*ast.ObjectItem) []byte {
// list returns the printable HCL form of an list type.
func (p *printer) list(l *ast.ListType) []byte {
+ if p.isSingleLineList(l) {
+ return p.singleLineList(l)
+ }
+
var buf bytes.Buffer
buf.WriteString("[")
+ buf.WriteByte(newline)
var longestLine int
for _, item := range l.List {
@@ -523,115 +536,112 @@ func (p *printer) list(l *ast.ListType) []byte {
}
}
- insertSpaceBeforeItem := false
- lastHadLeadComment := false
+ haveEmptyLine := false
for i, item := range l.List {
- // Keep track of whether this item is a heredoc since that has
- // unique behavior.
- heredoc := false
- if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
- heredoc = true
- }
-
- if item.Pos().Line != l.Lbrack.Line {
- // multiline list, add newline before we add each item
- buf.WriteByte(newline)
- insertSpaceBeforeItem = false
-
- // If we have a lead comment, then we want to write that first
- leadComment := false
- if lit, ok := item.(*ast.LiteralType); ok && lit.LeadComment != nil {
- leadComment = true
-
- // If this isn't the first item and the previous element
- // didn't have a lead comment, then we need to add an extra
- // newline to properly space things out. If it did have a
- // lead comment previously then this would be done
- // automatically.
- if i > 0 && !lastHadLeadComment {
- buf.WriteByte(newline)
- }
-
- for _, comment := range lit.LeadComment.List {
- buf.Write(p.indent([]byte(comment.Text)))
- buf.WriteByte(newline)
- }
+ // If we have a lead comment, then we want to write that first
+ leadComment := false
+ if lit, ok := item.(*ast.LiteralType); ok && lit.LeadComment != nil {
+ leadComment = true
+
+ // Ensure an empty line before every element with a
+ // lead comment (except the first item in a list).
+ if !haveEmptyLine && i != 0 {
+ buf.WriteByte(newline)
}
- // also indent each line
- val := p.output(item)
- curLen := len(val)
- buf.Write(p.indent(val))
-
- // if this item is a heredoc, then we output the comma on
- // the next line. This is the only case this happens.
- comma := []byte{','}
- if heredoc {
+ for _, comment := range lit.LeadComment.List {
+ buf.Write(p.indent([]byte(comment.Text)))
buf.WriteByte(newline)
- comma = p.indent(comma)
}
+ }
- buf.Write(comma)
+ // also indent each line
+ val := p.output(item)
+ curLen := len(val)
+ buf.Write(p.indent(val))
- if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil {
- // if the next item doesn't have any comments, do not align
- buf.WriteByte(blank) // align one space
- for i := 0; i < longestLine-curLen; i++ {
- buf.WriteByte(blank)
- }
+ // if this item is a heredoc, then we output the comma on
+ // the next line. This is the only case this happens.
+ comma := []byte{','}
+ if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
+ buf.WriteByte(newline)
+ comma = p.indent(comma)
+ }
- for _, comment := range lit.LineComment.List {
- buf.WriteString(comment.Text)
- }
- }
+ buf.Write(comma)
- lastItem := i == len(l.List)-1
- if lastItem {
- buf.WriteByte(newline)
+ if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil {
+ // if the next item doesn't have any comments, do not align
+ buf.WriteByte(blank) // align one space
+ for i := 0; i < longestLine-curLen; i++ {
+ buf.WriteByte(blank)
}
- if leadComment && !lastItem {
- buf.WriteByte(newline)
+ for _, comment := range lit.LineComment.List {
+ buf.WriteString(comment.Text)
}
+ }
- lastHadLeadComment = leadComment
- } else {
- if insertSpaceBeforeItem {
- buf.WriteByte(blank)
- insertSpaceBeforeItem = false
- }
+ buf.WriteByte(newline)
- // Output the item itself
- // also indent each line
- val := p.output(item)
- curLen := len(val)
- buf.Write(val)
+ // Ensure an empty line after every element with a
+ // lead comment (except the first item in a list).
+ haveEmptyLine = leadComment && i != len(l.List)-1
+ if haveEmptyLine {
+ buf.WriteByte(newline)
+ }
+ }
- // If this is a heredoc item we always have to output a newline
- // so that it parses properly.
- if heredoc {
- buf.WriteByte(newline)
- }
+ buf.WriteString("]")
+ return buf.Bytes()
+}
- // If this isn't the last element, write a comma.
- if i != len(l.List)-1 {
- buf.WriteString(",")
- insertSpaceBeforeItem = true
- }
+// isSingleLineList returns true if:
+// * they were previously formatted entirely on one line
+// * they consist entirely of literals
+// * there are either no heredoc strings or the list has exactly one element
+// * there are no line comments
+func (printer) isSingleLineList(l *ast.ListType) bool {
+ for _, item := range l.List {
+ if item.Pos().Line != l.Lbrack.Line {
+ return false
+ }
- if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil {
- // if the next item doesn't have any comments, do not align
- buf.WriteByte(blank) // align one space
- for i := 0; i < longestLine-curLen; i++ {
- buf.WriteByte(blank)
- }
+ lit, ok := item.(*ast.LiteralType)
+ if !ok {
+ return false
+ }
- for _, comment := range lit.LineComment.List {
- buf.WriteString(comment.Text)
- }
- }
+ if lit.Token.Type == token.HEREDOC && len(l.List) != 1 {
+ return false
+ }
+
+ if lit.LineComment != nil {
+ return false
+ }
+ }
+
+ return true
+}
+
+// singleLineList prints a simple single line list.
+// For a definition of "simple", see isSingleLineList above.
+func (p *printer) singleLineList(l *ast.ListType) []byte {
+ buf := &bytes.Buffer{}
+
+ buf.WriteString("[")
+ for i, item := range l.List {
+ if i != 0 {
+ buf.WriteString(", ")
}
+ // Output the item itself
+ buf.Write(p.output(item))
+
+ // The heredoc marker needs to be at the end of line.
+ if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
+ buf.WriteByte(newline)
+ }
}
buf.WriteString("]")
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/printer_test.go b/vendor/github.com/hashicorp/hcl/hcl/printer/printer_test.go
deleted file mode 100644
index 5248259b9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/printer_test.go
+++ /dev/null
@@ -1,149 +0,0 @@
-package printer
-
-import (
- "bytes"
- "errors"
- "flag"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "testing"
-
- "github.com/hashicorp/hcl/hcl/parser"
-)
-
-var update = flag.Bool("update", false, "update golden files")
-
-const (
- dataDir = "testdata"
-)
-
-type entry struct {
- source, golden string
-}
-
-// Use go test -update to create/update the respective golden files.
-var data = []entry{
- {"complexhcl.input", "complexhcl.golden"},
- {"list.input", "list.golden"},
- {"list_comment.input", "list_comment.golden"},
- {"comment.input", "comment.golden"},
- {"comment_crlf.input", "comment.golden"},
- {"comment_aligned.input", "comment_aligned.golden"},
- {"comment_array.input", "comment_array.golden"},
- {"comment_end_file.input", "comment_end_file.golden"},
- {"comment_multiline_indent.input", "comment_multiline_indent.golden"},
- {"comment_multiline_no_stanza.input", "comment_multiline_no_stanza.golden"},
- {"comment_multiline_stanza.input", "comment_multiline_stanza.golden"},
- {"comment_newline.input", "comment_newline.golden"},
- {"comment_object_multi.input", "comment_object_multi.golden"},
- {"comment_standalone.input", "comment_standalone.golden"},
- {"empty_block.input", "empty_block.golden"},
- {"list_of_objects.input", "list_of_objects.golden"},
- {"multiline_string.input", "multiline_string.golden"},
- {"object_singleline.input", "object_singleline.golden"},
- {"object_with_heredoc.input", "object_with_heredoc.golden"},
-}
-
-func TestFiles(t *testing.T) {
- for _, e := range data {
- source := filepath.Join(dataDir, e.source)
- golden := filepath.Join(dataDir, e.golden)
- t.Run(e.source, func(t *testing.T) {
- check(t, source, golden)
- })
- }
-}
-
-func check(t *testing.T, source, golden string) {
- src, err := ioutil.ReadFile(source)
- if err != nil {
- t.Error(err)
- return
- }
-
- res, err := format(src)
- if err != nil {
- t.Error(err)
- return
- }
-
- // update golden files if necessary
- if *update {
- if err := ioutil.WriteFile(golden, res, 0644); err != nil {
- t.Error(err)
- }
- return
- }
-
- // get golden
- gld, err := ioutil.ReadFile(golden)
- if err != nil {
- t.Error(err)
- return
- }
-
- // formatted source and golden must be the same
- if err := diff(source, golden, res, gld); err != nil {
- t.Error(err)
- return
- }
-}
-
-// diff compares a and b.
-func diff(aname, bname string, a, b []byte) error {
- var buf bytes.Buffer // holding long error message
-
- // compare lengths
- if len(a) != len(b) {
- fmt.Fprintf(&buf, "\nlength changed: len(%s) = %d, len(%s) = %d", aname, len(a), bname, len(b))
- }
-
- // compare contents
- line := 1
- offs := 1
- for i := 0; i < len(a) && i < len(b); i++ {
- ch := a[i]
- if ch != b[i] {
- fmt.Fprintf(&buf, "\n%s:%d:%d: %q", aname, line, i-offs+1, lineAt(a, offs))
- fmt.Fprintf(&buf, "\n%s:%d:%d: %q", bname, line, i-offs+1, lineAt(b, offs))
- fmt.Fprintf(&buf, "\n\n")
- break
- }
- if ch == '\n' {
- line++
- offs = i + 1
- }
- }
-
- if buf.Len() > 0 {
- return errors.New(buf.String())
- }
- return nil
-}
-
-// format parses src, prints the corresponding AST, verifies the resulting
-// src is syntactically correct, and returns the resulting src or an error
-// if any.
-func format(src []byte) ([]byte, error) {
- formatted, err := Format(src)
- if err != nil {
- return nil, err
- }
-
- // make sure formatted output is syntactically correct
- if _, err := parser.Parse(formatted); err != nil {
- return nil, fmt.Errorf("parse: %s\n%s", err, formatted)
- }
-
- return formatted, nil
-}
-
-// lineAt returns the line in text starting at offset offs.
-func lineAt(text []byte, offs int) []byte {
- i := offs
- for i < len(text) && text[i] != '\n' {
- i++
- }
- return text[offs:i]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.golden
deleted file mode 100644
index 9d4b072a0..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.golden
+++ /dev/null
@@ -1,36 +0,0 @@
-// A standalone comment is a comment which is not attached to any kind of node
-
-// This comes from Terraform, as a test
-variable "foo" {
- # Standalone comment should be still here
-
- default = "bar"
- description = "bar" # yooo
-}
-
-/* This is a multi line standalone
-comment*/
-
-// fatih arslan
-/* This is a developer test
-account and a multine comment */
-developer = ["fatih", "arslan"] // fatih arslan
-
-# One line here
-numbers = [1, 2] // another line here
-
-# Another comment
-variable = {
- description = "bar" # another yooo
-
- foo {
- # Nested standalone
-
- bar = "fatih"
- }
-}
-
-// lead comment
-foo {
- bar = "fatih" // line comment 2
-} // line comment 3
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.input
deleted file mode 100644
index 57c37ac1d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.input
+++ /dev/null
@@ -1,37 +0,0 @@
-// A standalone comment is a comment which is not attached to any kind of node
-
- // This comes from Terraform, as a test
-variable "foo" {
- # Standalone comment should be still here
-
- default = "bar"
- description = "bar" # yooo
-}
-
-/* This is a multi line standalone
-comment*/
-
-
-// fatih arslan
-/* This is a developer test
-account and a multine comment */
-developer = [ "fatih", "arslan"] // fatih arslan
-
-# One line here
-numbers = [1,2] // another line here
-
- # Another comment
-variable = {
- description = "bar" # another yooo
- foo {
- # Nested standalone
-
- bar = "fatih"
- }
-}
-
- // lead comment
-foo {
- bar = "fatih" // line comment 2
-} // line comment 3
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.golden
deleted file mode 100644
index 6ff21504c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.golden
+++ /dev/null
@@ -1,32 +0,0 @@
-aligned {
- # We have some aligned items below
- foo = "fatih" # yoo1
- default = "bar" # yoo2
- bar = "bar and foo" # yoo3
-
- default = {
- bar = "example"
- }
-
- #deneme arslan
- fatih = ["fatih"] # yoo4
-
- #fatih arslan
- fatiharslan = ["arslan"] // yoo5
-
- default = {
- bar = "example"
- }
-
- security_groups = [
- "foo", # kenya 1
- "${aws_security_group.firewall.foo}", # kenya 2
- ]
-
- security_groups2 = [
- "foo", # kenya 1
- "bar", # kenya 1.5
- "${aws_security_group.firewall.foo}", # kenya 2
- "foobar", # kenya 3
- ]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.input
deleted file mode 100644
index bd43ab1ad..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.input
+++ /dev/null
@@ -1,28 +0,0 @@
-aligned {
-# We have some aligned items below
- foo = "fatih" # yoo1
- default = "bar" # yoo2
- bar = "bar and foo" # yoo3
- default = {
- bar = "example"
- }
- #deneme arslan
- fatih = ["fatih"] # yoo4
- #fatih arslan
- fatiharslan = ["arslan"] // yoo5
- default = {
- bar = "example"
- }
-
-security_groups = [
- "foo", # kenya 1
- "${aws_security_group.firewall.foo}", # kenya 2
-]
-
-security_groups2 = [
- "foo", # kenya 1
- "bar", # kenya 1.5
- "${aws_security_group.firewall.foo}", # kenya 2
- "foobar", # kenya 3
-]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden
deleted file mode 100644
index e778eafa3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden
+++ /dev/null
@@ -1,13 +0,0 @@
-banana = [
- # I really want to comment this item in the array.
- "a",
-
- # This as well
- "b",
-
- "c", # And C
- "d",
-
- # And another
- "e",
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input
deleted file mode 100644
index e778eafa3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input
+++ /dev/null
@@ -1,13 +0,0 @@
-banana = [
- # I really want to comment this item in the array.
- "a",
-
- # This as well
- "b",
-
- "c", # And C
- "d",
-
- # And another
- "e",
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_crlf.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_crlf.input
deleted file mode 100644
index 5d2720672..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_crlf.input
+++ /dev/null
@@ -1,37 +0,0 @@
-// A standalone comment is a comment which is not attached to any kind of node
-
- // This comes from Terraform, as a test
-variable "foo" {
- # Standalone comment should be still here
-
- default = "bar"
- description = "bar" # yooo
-}
-
-/* This is a multi line standalone
-comment*/
-
-
-// fatih arslan
-/* This is a developer test
-account and a multine comment */
-developer = [ "fatih", "arslan"] // fatih arslan
-
-# One line here
-numbers = [1,2] // another line here
-
- # Another comment
-variable = {
- description = "bar" # another yooo
- foo {
- # Nested standalone
-
- bar = "fatih"
- }
-}
-
- // lead comment
-foo {
- bar = "fatih" // line comment 2
-} // line comment 3
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.golden
deleted file mode 100644
index dbeae36a8..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.golden
+++ /dev/null
@@ -1,6 +0,0 @@
-resource "blah" "blah" {}
-
-//
-//
-//
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.input
deleted file mode 100644
index 68c4c282e..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.input
+++ /dev/null
@@ -1,5 +0,0 @@
-resource "blah" "blah" {}
-
-//
-//
-//
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden
deleted file mode 100644
index 74c4ccd89..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden
+++ /dev/null
@@ -1,12 +0,0 @@
-resource "provider" "resource" {
- /*
- SPACE_SENSITIVE_CODE = <<EOF
-yaml code:
- foo: ""
- bar: ""
-EOF
- */
- /*
- OTHER
- */
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.input
deleted file mode 100644
index b07ac4d3c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.input
+++ /dev/null
@@ -1,13 +0,0 @@
-resource "provider" "resource" {
- /*
- SPACE_SENSITIVE_CODE = <<EOF
-yaml code:
- foo: ""
- bar: ""
-EOF
- */
-
- /*
- OTHER
- */
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.golden
deleted file mode 100644
index 7ad7ca296..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.golden
+++ /dev/null
@@ -1,7 +0,0 @@
-# This is a multiline comment
-# That has values like this:
-#
-# ami-abcd1234
-#
-# Do not delete this comment
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.input
deleted file mode 100644
index 8b818e91d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_no_stanza.input
+++ /dev/null
@@ -1,6 +0,0 @@
-# This is a multiline comment
-# That has values like this:
-#
-# ami-abcd1234
-#
-# Do not delete this comment
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.golden
deleted file mode 100644
index e9db4f2ae..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.golden
+++ /dev/null
@@ -1,10 +0,0 @@
-# This is a multiline comment
-# That has values like this:
-#
-# ami-abcd1234
-#
-# Do not delete this comment
-
-resource "aws_instance" "web" {
- ami_id = "ami-abcd1234"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.input
deleted file mode 100644
index 6a8b90230..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_stanza.input
+++ /dev/null
@@ -1,10 +0,0 @@
-# This is a multiline comment
-# That has values like this:
-#
-# ami-abcd1234
-#
-# Do not delete this comment
-
-resource "aws_instance" "web" {
-ami_id = "ami-abcd1234"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.golden
deleted file mode 100644
index 2162c8845..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.golden
+++ /dev/null
@@ -1,3 +0,0 @@
-# Hello
-# World
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.input
deleted file mode 100644
index aa56a9880..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.input
+++ /dev/null
@@ -1,2 +0,0 @@
-# Hello
-# World
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.golden
deleted file mode 100644
index 4c0f0004a..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.golden
+++ /dev/null
@@ -1,9 +0,0 @@
-variable "environment" {
- default = {}
-
- # default {
- # "region" = "us-west-2"
- # "sg" = "playground"
- # "env" = "prod"
- # }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.input
deleted file mode 100644
index 4c0f0004a..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.input
+++ /dev/null
@@ -1,9 +0,0 @@
-variable "environment" {
- default = {}
-
- # default {
- # "region" = "us-west-2"
- # "sg" = "playground"
- # "env" = "prod"
- # }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.golden
deleted file mode 100644
index 3236d9e69..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.golden
+++ /dev/null
@@ -1,17 +0,0 @@
-// A standalone comment
-
-aligned {
- # Standalone 1
-
- a = "bar" # yoo1
- default = "bar" # yoo2
-
- # Standalone 2
-}
-
-# Standalone 3
-
-numbers = [1, 2] // another line here
-
-# Standalone 4
-
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.input
deleted file mode 100644
index 4436cb16c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_standalone.input
+++ /dev/null
@@ -1,16 +0,0 @@
-// A standalone comment
-
-aligned {
- # Standalone 1
-
- a = "bar" # yoo1
- default = "bar" # yoo2
-
- # Standalone 2
-}
-
- # Standalone 3
-
-numbers = [1,2] // another line here
-
- # Standalone 4
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.golden
deleted file mode 100644
index 198c32d28..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.golden
+++ /dev/null
@@ -1,54 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-developer = ["fatih", "arslan"]
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
-
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}",
- ]
-
- network_interface {
- device_index = 0
- description = "Main network interface"
- }
-
- network_interface = {
- device_index = 1
-
- description = <<EOF
-ANOTHER NETWORK INTERFACE
-EOF
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
-
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = <<EOF
-TUBES
-EOF
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.input
deleted file mode 100644
index 712341840..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/complexhcl.input
+++ /dev/null
@@ -1,53 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-developer = [ "fatih", "arslan"]
-
-provider "aws" {
- access_key ="foo"
- secret_key = "bar"
-}
-
- provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
- }
-
- resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}"
- ]
-
- network_interface {
- device_index = 0
- description = "Main network interface"
- }
-
- network_interface = {
- device_index = 1
- description = <<EOF
-ANOTHER NETWORK INTERFACE
-EOF
- }
- }
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
-
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
-
- value=<<EOF
-TUBES
-EOF
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.golden
deleted file mode 100644
index 4ff1cb3e4..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.golden
+++ /dev/null
@@ -1,12 +0,0 @@
-variable "foo" {}
-variable "foo" {}
-
-variable "foo" {
- # Standalone comment should be still here
-}
-
-foo {}
-
-foo {
- bar = "mssola"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.input
deleted file mode 100644
index 627bf3e3f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.input
+++ /dev/null
@@ -1,14 +0,0 @@
-variable "foo" {}
-variable "foo" {
-}
-
-variable "foo" {
- # Standalone comment should be still here
-}
-
-foo {
-}
-
-foo {
- bar = "mssola"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.golden
deleted file mode 100644
index 14c37ac0f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.golden
+++ /dev/null
@@ -1,43 +0,0 @@
-foo = ["fatih", "arslan"]
-
-foo = ["bar", "qaz"]
-
-foo = ["zeynep",
- "arslan",
-]
-
-foo = ["fatih", "zeynep",
- "arslan",
-]
-
-foo = [
- "vim-go",
- "golang",
- "hcl",
-]
-
-foo = []
-
-foo = [1, 2, 3, 4]
-
-foo = [
- "kenya",
- "ethiopia",
- "columbia",
-]
-
-foo = [
- <<EOS
-one
-EOS
- ,
- <<EOS
-two
-EOS
- ,
-]
-
-foo = [<<EOS
-one
-EOS
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.input
deleted file mode 100644
index f55a38200..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list.input
+++ /dev/null
@@ -1,37 +0,0 @@
-foo = ["fatih", "arslan" ]
-
-foo = [ "bar", "qaz", ]
-
-foo = [ "zeynep",
-"arslan", ]
-
-foo = ["fatih", "zeynep",
-"arslan", ]
-
-foo = [
- "vim-go",
- "golang", "hcl"]
-
-foo = []
-
-foo = [1, 2,3, 4]
-
-foo = [
- "kenya", "ethiopia",
- "columbia"]
-
-foo = [
- <<EOS
-one
-EOS
-,
- <<EOS
-two
-EOS
-,
- ]
-
-foo = [<<EOS
-one
-EOS
- ]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.golden
deleted file mode 100644
index e5753c91a..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.golden
+++ /dev/null
@@ -1,7 +0,0 @@
-foo = [1, # Hello
- 2,
-]
-
-foo = [1, # Hello
- 2, # World
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.input
deleted file mode 100644
index 1d636c88d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_comment.input
+++ /dev/null
@@ -1,6 +0,0 @@
-foo = [1, # Hello
-2]
-
-foo = [1, # Hello
-2, # World
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.golden
deleted file mode 100644
index 401ded6ef..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.golden
+++ /dev/null
@@ -1,10 +0,0 @@
-list_of_objects = [
- {
- key1 = "value1"
- key2 = "value2"
- },
- {
- key3 = "value3"
- key4 = "value4"
- },
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.input
deleted file mode 100644
index f2adcf015..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/list_of_objects.input
+++ /dev/null
@@ -1,10 +0,0 @@
-list_of_objects = [
- {
- key1 = "value1"
- key2 = "value2"
- },
- {
- key3 = "value3"
- key4 = "value4"
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.golden
deleted file mode 100644
index 3d10c741d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.golden
+++ /dev/null
@@ -1,7 +0,0 @@
-resource "null_resource" "some_command" {
- provisioner "local-exec" {
- command = "${echo '
-some newlines
-and additonal output'}"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.input
deleted file mode 100644
index 3d10c741d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/multiline_string.input
+++ /dev/null
@@ -1,7 +0,0 @@
-resource "null_resource" "some_command" {
- provisioner "local-exec" {
- command = "${echo '
-some newlines
-and additonal output'}"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.golden
deleted file mode 100644
index c3d914702..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.golden
+++ /dev/null
@@ -1,26 +0,0 @@
-variable "foo" {}
-variable "bar" {}
-variable "baz" {}
-
-variable "qux" {}
-
-variable "foo" {
- foo = "bar"
-}
-
-variable "foo" {}
-
-# lead comment
-variable "bar" {}
-
-variable "foo" {
- default = "bar"
-}
-
-variable "bar" {}
-
-# Purposeful newline check below:
-
-variable "foo" {}
-
-variable "purposeful-newline" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.input
deleted file mode 100644
index 7b34834a4..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.input
+++ /dev/null
@@ -1,19 +0,0 @@
-variable "foo" {}
-variable "bar" {}
-variable "baz" {}
-
-variable "qux" {}
-variable "foo" { foo = "bar" }
-
-variable "foo" {}
-# lead comment
-variable "bar" {}
-
-variable "foo" { default = "bar" }
-variable "bar" {}
-
-# Purposeful newline check below:
-
-variable "foo" {}
-
-variable "purposeful-newline" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.golden b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.golden
deleted file mode 100644
index 7e92243f6..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.golden
+++ /dev/null
@@ -1,6 +0,0 @@
-obj {
- foo = [<<EOF
- TEXT!
-EOF
- ]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.input b/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.input
deleted file mode 100644
index d70a05ac9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/testdata/object_with_heredoc.input
+++ /dev/null
@@ -1,6 +0,0 @@
-obj {
- foo = [<<EOF
- TEXT!
-EOF
- ]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
index 6601ef76e..624a18fe3 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
@@ -74,14 +74,6 @@ func (s *Scanner) next() rune {
return eof
}
- if ch == utf8.RuneError && size == 1 {
- s.srcPos.Column++
- s.srcPos.Offset += size
- s.lastCharLen = size
- s.err("illegal UTF-8 encoding")
- return ch
- }
-
// remember last position
s.prevPos = s.srcPos
@@ -89,18 +81,27 @@ func (s *Scanner) next() rune {
s.lastCharLen = size
s.srcPos.Offset += size
+ if ch == utf8.RuneError && size == 1 {
+ s.err("illegal UTF-8 encoding")
+ return ch
+ }
+
if ch == '\n' {
s.srcPos.Line++
s.lastLineLen = s.srcPos.Column
s.srcPos.Column = 0
}
- // If we see a null character with data left, then that is an error
- if ch == '\x00' && s.buf.Len() > 0 {
+ if ch == '\x00' {
s.err("unexpected null character (0x00)")
return eof
}
+ if ch == '\uE123' {
+ s.err("unicode code point U+E123 reserved for internal use")
+ return utf8.RuneError
+ }
+
// debug
// fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
return ch
@@ -432,16 +433,16 @@ func (s *Scanner) scanHeredoc() {
// Read the identifier
identBytes := s.src[offs : s.srcPos.Offset-s.lastCharLen]
- if len(identBytes) == 0 {
+ if len(identBytes) == 0 || (len(identBytes) == 1 && identBytes[0] == '-') {
s.err("zero-length heredoc anchor")
return
}
var identRegexp *regexp.Regexp
if identBytes[0] == '-' {
- identRegexp = regexp.MustCompile(fmt.Sprintf(`[[:space:]]*%s\z`, identBytes[1:]))
+ identRegexp = regexp.MustCompile(fmt.Sprintf(`^[[:space:]]*%s\r*\z`, identBytes[1:]))
} else {
- identRegexp = regexp.MustCompile(fmt.Sprintf(`[[:space:]]*%s\z`, identBytes))
+ identRegexp = regexp.MustCompile(fmt.Sprintf(`^[[:space:]]*%s\r*\z`, identBytes))
}
// Read the actual string value
@@ -551,7 +552,7 @@ func (s *Scanner) scanDigits(ch rune, base, n int) rune {
s.err("illegal char escape")
}
- if n != start {
+ if n != start && ch != eof {
// we scanned all digits, put the last non digit char back,
// only if we read anything at all
s.unread()
diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go
deleted file mode 100644
index 4f2c9cbe0..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go
+++ /dev/null
@@ -1,591 +0,0 @@
-package scanner
-
-import (
- "bytes"
- "fmt"
- "testing"
-
- "strings"
-
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-var f100 = strings.Repeat("f", 100)
-
-type tokenPair struct {
- tok token.Type
- text string
-}
-
-var tokenLists = map[string][]tokenPair{
- "comment": []tokenPair{
- {token.COMMENT, "//"},
- {token.COMMENT, "////"},
- {token.COMMENT, "// comment"},
- {token.COMMENT, "// /* comment */"},
- {token.COMMENT, "// // comment //"},
- {token.COMMENT, "//" + f100},
- {token.COMMENT, "#"},
- {token.COMMENT, "##"},
- {token.COMMENT, "# comment"},
- {token.COMMENT, "# /* comment */"},
- {token.COMMENT, "# # comment #"},
- {token.COMMENT, "#" + f100},
- {token.COMMENT, "/**/"},
- {token.COMMENT, "/***/"},
- {token.COMMENT, "/* comment */"},
- {token.COMMENT, "/* // comment */"},
- {token.COMMENT, "/* /* comment */"},
- {token.COMMENT, "/*\n comment\n*/"},
- {token.COMMENT, "/*" + f100 + "*/"},
- },
- "operator": []tokenPair{
- {token.LBRACK, "["},
- {token.LBRACE, "{"},
- {token.COMMA, ","},
- {token.PERIOD, "."},
- {token.RBRACK, "]"},
- {token.RBRACE, "}"},
- {token.ASSIGN, "="},
- {token.ADD, "+"},
- {token.SUB, "-"},
- },
- "bool": []tokenPair{
- {token.BOOL, "true"},
- {token.BOOL, "false"},
- },
- "ident": []tokenPair{
- {token.IDENT, "a"},
- {token.IDENT, "a0"},
- {token.IDENT, "foobar"},
- {token.IDENT, "foo-bar"},
- {token.IDENT, "abc123"},
- {token.IDENT, "LGTM"},
- {token.IDENT, "_"},
- {token.IDENT, "_abc123"},
- {token.IDENT, "abc123_"},
- {token.IDENT, "_abc_123_"},
- {token.IDENT, "_äöü"},
- {token.IDENT, "_本"},
- {token.IDENT, "äöü"},
- {token.IDENT, "本"},
- {token.IDENT, "aÛ°Û±Û¸"},
- {token.IDENT, "foo६४"},
- {token.IDENT, "bar9876"},
- },
- "heredoc": []tokenPair{
- {token.HEREDOC, "<<EOF\nhello\nworld\nEOF"},
- {token.HEREDOC, "<<EOF123\nhello\nworld\nEOF123"},
- },
- "string": []tokenPair{
- {token.STRING, `" "`},
- {token.STRING, `"a"`},
- {token.STRING, `"本"`},
- {token.STRING, `"${file("foo")}"`},
- {token.STRING, `"${file(\"foo\")}"`},
- {token.STRING, `"\a"`},
- {token.STRING, `"\b"`},
- {token.STRING, `"\f"`},
- {token.STRING, `"\n"`},
- {token.STRING, `"\r"`},
- {token.STRING, `"\t"`},
- {token.STRING, `"\v"`},
- {token.STRING, `"\""`},
- {token.STRING, `"\000"`},
- {token.STRING, `"\777"`},
- {token.STRING, `"\x00"`},
- {token.STRING, `"\xff"`},
- {token.STRING, `"\u0000"`},
- {token.STRING, `"\ufA16"`},
- {token.STRING, `"\U00000000"`},
- {token.STRING, `"\U0000ffAB"`},
- {token.STRING, `"` + f100 + `"`},
- },
- "number": []tokenPair{
- {token.NUMBER, "0"},
- {token.NUMBER, "1"},
- {token.NUMBER, "9"},
- {token.NUMBER, "42"},
- {token.NUMBER, "1234567890"},
- {token.NUMBER, "00"},
- {token.NUMBER, "01"},
- {token.NUMBER, "07"},
- {token.NUMBER, "042"},
- {token.NUMBER, "01234567"},
- {token.NUMBER, "0x0"},
- {token.NUMBER, "0x1"},
- {token.NUMBER, "0xf"},
- {token.NUMBER, "0x42"},
- {token.NUMBER, "0x123456789abcDEF"},
- {token.NUMBER, "0x" + f100},
- {token.NUMBER, "0X0"},
- {token.NUMBER, "0X1"},
- {token.NUMBER, "0XF"},
- {token.NUMBER, "0X42"},
- {token.NUMBER, "0X123456789abcDEF"},
- {token.NUMBER, "0X" + f100},
- {token.NUMBER, "-0"},
- {token.NUMBER, "-1"},
- {token.NUMBER, "-9"},
- {token.NUMBER, "-42"},
- {token.NUMBER, "-1234567890"},
- {token.NUMBER, "-00"},
- {token.NUMBER, "-01"},
- {token.NUMBER, "-07"},
- {token.NUMBER, "-29"},
- {token.NUMBER, "-042"},
- {token.NUMBER, "-01234567"},
- {token.NUMBER, "-0x0"},
- {token.NUMBER, "-0x1"},
- {token.NUMBER, "-0xf"},
- {token.NUMBER, "-0x42"},
- {token.NUMBER, "-0x123456789abcDEF"},
- {token.NUMBER, "-0x" + f100},
- {token.NUMBER, "-0X0"},
- {token.NUMBER, "-0X1"},
- {token.NUMBER, "-0XF"},
- {token.NUMBER, "-0X42"},
- {token.NUMBER, "-0X123456789abcDEF"},
- {token.NUMBER, "-0X" + f100},
- },
- "float": []tokenPair{
- {token.FLOAT, "0."},
- {token.FLOAT, "1."},
- {token.FLOAT, "42."},
- {token.FLOAT, "01234567890."},
- {token.FLOAT, ".0"},
- {token.FLOAT, ".1"},
- {token.FLOAT, ".42"},
- {token.FLOAT, ".0123456789"},
- {token.FLOAT, "0.0"},
- {token.FLOAT, "1.0"},
- {token.FLOAT, "42.0"},
- {token.FLOAT, "01234567890.0"},
- {token.FLOAT, "0e0"},
- {token.FLOAT, "1e0"},
- {token.FLOAT, "42e0"},
- {token.FLOAT, "01234567890e0"},
- {token.FLOAT, "0E0"},
- {token.FLOAT, "1E0"},
- {token.FLOAT, "42E0"},
- {token.FLOAT, "01234567890E0"},
- {token.FLOAT, "0e+10"},
- {token.FLOAT, "1e-10"},
- {token.FLOAT, "42e+10"},
- {token.FLOAT, "01234567890e-10"},
- {token.FLOAT, "0E+10"},
- {token.FLOAT, "1E-10"},
- {token.FLOAT, "42E+10"},
- {token.FLOAT, "01234567890E-10"},
- {token.FLOAT, "01.8e0"},
- {token.FLOAT, "1.4e0"},
- {token.FLOAT, "42.2e0"},
- {token.FLOAT, "01234567890.12e0"},
- {token.FLOAT, "0.E0"},
- {token.FLOAT, "1.12E0"},
- {token.FLOAT, "42.123E0"},
- {token.FLOAT, "01234567890.213E0"},
- {token.FLOAT, "0.2e+10"},
- {token.FLOAT, "1.2e-10"},
- {token.FLOAT, "42.54e+10"},
- {token.FLOAT, "01234567890.98e-10"},
- {token.FLOAT, "0.1E+10"},
- {token.FLOAT, "1.1E-10"},
- {token.FLOAT, "42.1E+10"},
- {token.FLOAT, "01234567890.1E-10"},
- {token.FLOAT, "-0.0"},
- {token.FLOAT, "-1.0"},
- {token.FLOAT, "-42.0"},
- {token.FLOAT, "-01234567890.0"},
- {token.FLOAT, "-0e0"},
- {token.FLOAT, "-1e0"},
- {token.FLOAT, "-42e0"},
- {token.FLOAT, "-01234567890e0"},
- {token.FLOAT, "-0E0"},
- {token.FLOAT, "-1E0"},
- {token.FLOAT, "-42E0"},
- {token.FLOAT, "-01234567890E0"},
- {token.FLOAT, "-0e+10"},
- {token.FLOAT, "-1e-10"},
- {token.FLOAT, "-42e+10"},
- {token.FLOAT, "-01234567890e-10"},
- {token.FLOAT, "-0E+10"},
- {token.FLOAT, "-1E-10"},
- {token.FLOAT, "-42E+10"},
- {token.FLOAT, "-01234567890E-10"},
- {token.FLOAT, "-01.8e0"},
- {token.FLOAT, "-1.4e0"},
- {token.FLOAT, "-42.2e0"},
- {token.FLOAT, "-01234567890.12e0"},
- {token.FLOAT, "-0.E0"},
- {token.FLOAT, "-1.12E0"},
- {token.FLOAT, "-42.123E0"},
- {token.FLOAT, "-01234567890.213E0"},
- {token.FLOAT, "-0.2e+10"},
- {token.FLOAT, "-1.2e-10"},
- {token.FLOAT, "-42.54e+10"},
- {token.FLOAT, "-01234567890.98e-10"},
- {token.FLOAT, "-0.1E+10"},
- {token.FLOAT, "-1.1E-10"},
- {token.FLOAT, "-42.1E+10"},
- {token.FLOAT, "-01234567890.1E-10"},
- },
-}
-
-var orderedTokenLists = []string{
- "comment",
- "operator",
- "bool",
- "ident",
- "heredoc",
- "string",
- "number",
- "float",
-}
-
-func TestPosition(t *testing.T) {
- // create artifical source code
- buf := new(bytes.Buffer)
-
- for _, listName := range orderedTokenLists {
- for _, ident := range tokenLists[listName] {
- fmt.Fprintf(buf, "\t\t\t\t%s\n", ident.text)
- }
- }
-
- s := New(buf.Bytes())
-
- pos := token.Pos{"", 4, 1, 5}
- s.Scan()
- for _, listName := range orderedTokenLists {
-
- for _, k := range tokenLists[listName] {
- curPos := s.tokPos
- // fmt.Printf("[%q] s = %+v:%+v\n", k.text, curPos.Offset, curPos.Column)
-
- if curPos.Offset != pos.Offset {
- t.Fatalf("offset = %d, want %d for %q", curPos.Offset, pos.Offset, k.text)
- }
- if curPos.Line != pos.Line {
- t.Fatalf("line = %d, want %d for %q", curPos.Line, pos.Line, k.text)
- }
- if curPos.Column != pos.Column {
- t.Fatalf("column = %d, want %d for %q", curPos.Column, pos.Column, k.text)
- }
- pos.Offset += 4 + len(k.text) + 1 // 4 tabs + token bytes + newline
- pos.Line += countNewlines(k.text) + 1 // each token is on a new line
- s.Scan()
- }
- }
- // make sure there were no token-internal errors reported by scanner
- if s.ErrorCount != 0 {
- t.Errorf("%d errors", s.ErrorCount)
- }
-}
-
-func TestNullChar(t *testing.T) {
- s := New([]byte("\"\\0"))
- s.Scan() // Used to panic
-}
-
-func TestComment(t *testing.T) {
- testTokenList(t, tokenLists["comment"])
-}
-
-func TestOperator(t *testing.T) {
- testTokenList(t, tokenLists["operator"])
-}
-
-func TestBool(t *testing.T) {
- testTokenList(t, tokenLists["bool"])
-}
-
-func TestIdent(t *testing.T) {
- testTokenList(t, tokenLists["ident"])
-}
-
-func TestString(t *testing.T) {
- testTokenList(t, tokenLists["string"])
-}
-
-func TestNumber(t *testing.T) {
- testTokenList(t, tokenLists["number"])
-}
-
-func TestFloat(t *testing.T) {
- testTokenList(t, tokenLists["float"])
-}
-
-func TestWindowsLineEndings(t *testing.T) {
- hcl := `// This should have Windows line endings
-resource "aws_instance" "foo" {
- user_data=<<HEREDOC
- test script
-HEREDOC
-}`
- hclWindowsEndings := strings.Replace(hcl, "\n", "\r\n", -1)
-
- literals := []struct {
- tokenType token.Type
- literal string
- }{
- {token.COMMENT, "// This should have Windows line endings\r"},
- {token.IDENT, `resource`},
- {token.STRING, `"aws_instance"`},
- {token.STRING, `"foo"`},
- {token.LBRACE, `{`},
- {token.IDENT, `user_data`},
- {token.ASSIGN, `=`},
- {token.HEREDOC, "<<HEREDOC\r\n test script\r\nHEREDOC\r\n"},
- {token.RBRACE, `}`},
- }
-
- s := New([]byte(hclWindowsEndings))
- for _, l := range literals {
- tok := s.Scan()
-
- if l.tokenType != tok.Type {
- t.Errorf("got: %s want %s for %s\n", tok, l.tokenType, tok.String())
- }
-
- if l.literal != tok.Text {
- t.Errorf("got:\n%v\nwant:\n%v\n", []byte(tok.Text), []byte(l.literal))
- }
- }
-}
-
-func TestRealExample(t *testing.T) {
- complexHCL := `// This comes from Terraform, as a test
- variable "foo" {
- default = "bar"
- description = "bar"
- }
-
- provider "aws" {
- access_key = "foo"
- secret_key = "${replace(var.foo, ".", "\\.")}"
- }
-
- resource "aws_security_group" "firewall" {
- count = 5
- }
-
- resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}"
- ]
-
- network_interface {
- device_index = 0
- description = <<EOF
-Main interface
-EOF
- }
-
- network_interface {
- device_index = 1
- description = <<-EOF
- Outer text
- Indented text
- EOF
- }
- }`
-
- literals := []struct {
- tokenType token.Type
- literal string
- }{
- {token.COMMENT, `// This comes from Terraform, as a test`},
- {token.IDENT, `variable`},
- {token.STRING, `"foo"`},
- {token.LBRACE, `{`},
- {token.IDENT, `default`},
- {token.ASSIGN, `=`},
- {token.STRING, `"bar"`},
- {token.IDENT, `description`},
- {token.ASSIGN, `=`},
- {token.STRING, `"bar"`},
- {token.RBRACE, `}`},
- {token.IDENT, `provider`},
- {token.STRING, `"aws"`},
- {token.LBRACE, `{`},
- {token.IDENT, `access_key`},
- {token.ASSIGN, `=`},
- {token.STRING, `"foo"`},
- {token.IDENT, `secret_key`},
- {token.ASSIGN, `=`},
- {token.STRING, `"${replace(var.foo, ".", "\\.")}"`},
- {token.RBRACE, `}`},
- {token.IDENT, `resource`},
- {token.STRING, `"aws_security_group"`},
- {token.STRING, `"firewall"`},
- {token.LBRACE, `{`},
- {token.IDENT, `count`},
- {token.ASSIGN, `=`},
- {token.NUMBER, `5`},
- {token.RBRACE, `}`},
- {token.IDENT, `resource`},
- {token.IDENT, `aws_instance`},
- {token.STRING, `"web"`},
- {token.LBRACE, `{`},
- {token.IDENT, `ami`},
- {token.ASSIGN, `=`},
- {token.STRING, `"${var.foo}"`},
- {token.IDENT, `security_groups`},
- {token.ASSIGN, `=`},
- {token.LBRACK, `[`},
- {token.STRING, `"foo"`},
- {token.COMMA, `,`},
- {token.STRING, `"${aws_security_group.firewall.foo}"`},
- {token.RBRACK, `]`},
- {token.IDENT, `network_interface`},
- {token.LBRACE, `{`},
- {token.IDENT, `device_index`},
- {token.ASSIGN, `=`},
- {token.NUMBER, `0`},
- {token.IDENT, `description`},
- {token.ASSIGN, `=`},
- {token.HEREDOC, "<<EOF\nMain interface\nEOF\n"},
- {token.RBRACE, `}`},
- {token.IDENT, `network_interface`},
- {token.LBRACE, `{`},
- {token.IDENT, `device_index`},
- {token.ASSIGN, `=`},
- {token.NUMBER, `1`},
- {token.IDENT, `description`},
- {token.ASSIGN, `=`},
- {token.HEREDOC, "<<-EOF\n\t\t\tOuter text\n\t\t\t\tIndented text\n\t\t\tEOF\n"},
- {token.RBRACE, `}`},
- {token.RBRACE, `}`},
- {token.EOF, ``},
- }
-
- s := New([]byte(complexHCL))
- for _, l := range literals {
- tok := s.Scan()
- if l.tokenType != tok.Type {
- t.Errorf("got: %s want %s for %s\n", tok, l.tokenType, tok.String())
- }
-
- if l.literal != tok.Text {
- t.Errorf("got:\n%+v\n%s\n want:\n%+v\n%s\n", []byte(tok.String()), tok, []byte(l.literal), l.literal)
- }
- }
-
-}
-
-func TestScan_crlf(t *testing.T) {
- complexHCL := "foo {\r\n bar = \"baz\"\r\n}\r\n"
-
- literals := []struct {
- tokenType token.Type
- literal string
- }{
- {token.IDENT, `foo`},
- {token.LBRACE, `{`},
- {token.IDENT, `bar`},
- {token.ASSIGN, `=`},
- {token.STRING, `"baz"`},
- {token.RBRACE, `}`},
- {token.EOF, ``},
- }
-
- s := New([]byte(complexHCL))
- for _, l := range literals {
- tok := s.Scan()
- if l.tokenType != tok.Type {
- t.Errorf("got: %s want %s for %s\n", tok, l.tokenType, tok.String())
- }
-
- if l.literal != tok.Text {
- t.Errorf("got:\n%+v\n%s\n want:\n%+v\n%s\n", []byte(tok.String()), tok, []byte(l.literal), l.literal)
- }
- }
-
-}
-
-func TestError(t *testing.T) {
- testError(t, "\x80", "1:1", "illegal UTF-8 encoding", token.ILLEGAL)
- testError(t, "\xff", "1:1", "illegal UTF-8 encoding", token.ILLEGAL)
-
- testError(t, "ab\x80", "1:3", "illegal UTF-8 encoding", token.IDENT)
- testError(t, "abc\xff", "1:4", "illegal UTF-8 encoding", token.IDENT)
-
- testError(t, `"ab`+"\x80", "1:4", "illegal UTF-8 encoding", token.STRING)
- testError(t, `"abc`+"\xff", "1:5", "illegal UTF-8 encoding", token.STRING)
-
- testError(t, `01238`, "1:6", "illegal octal number", token.NUMBER)
- testError(t, `01238123`, "1:9", "illegal octal number", token.NUMBER)
- testError(t, `0x`, "1:3", "illegal hexadecimal number", token.NUMBER)
- testError(t, `0xg`, "1:3", "illegal hexadecimal number", token.NUMBER)
- testError(t, `'aa'`, "1:1", "illegal char", token.ILLEGAL)
-
- testError(t, `"`, "1:2", "literal not terminated", token.STRING)
- testError(t, `"abc`, "1:5", "literal not terminated", token.STRING)
- testError(t, `"abc`+"\n", "1:5", "literal not terminated", token.STRING)
- testError(t, `"${abc`+"\n", "2:1", "literal not terminated", token.STRING)
- testError(t, `/*/`, "1:4", "comment not terminated", token.COMMENT)
- testError(t, `/foo`, "1:1", "expected '/' for comment", token.COMMENT)
-}
-
-func testError(t *testing.T, src, pos, msg string, tok token.Type) {
- s := New([]byte(src))
-
- errorCalled := false
- s.Error = func(p token.Pos, m string) {
- if !errorCalled {
- if pos != p.String() {
- t.Errorf("pos = %q, want %q for %q", p, pos, src)
- }
-
- if m != msg {
- t.Errorf("msg = %q, want %q for %q", m, msg, src)
- }
- errorCalled = true
- }
- }
-
- tk := s.Scan()
- if tk.Type != tok {
- t.Errorf("tok = %s, want %s for %q", tk, tok, src)
- }
- if !errorCalled {
- t.Errorf("error handler not called for %q", src)
- }
- if s.ErrorCount == 0 {
- t.Errorf("count = %d, want > 0 for %q", s.ErrorCount, src)
- }
-}
-
-func testTokenList(t *testing.T, tokenList []tokenPair) {
- // create artifical source code
- buf := new(bytes.Buffer)
- for _, ident := range tokenList {
- fmt.Fprintf(buf, "%s\n", ident.text)
- }
-
- s := New(buf.Bytes())
- for _, ident := range tokenList {
- tok := s.Scan()
- if tok.Type != ident.tok {
- t.Errorf("tok = %q want %q for %q\n", tok, ident.tok, ident.text)
- }
-
- if tok.Text != ident.text {
- t.Errorf("text = %q want %q", tok.String(), ident.text)
- }
-
- }
-}
-
-func countNewlines(s string) int {
- n := 0
- for _, ch := range s {
- if ch == '\n' {
- n++
- }
- }
- return n
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go b/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go
deleted file mode 100644
index 65be375d9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package strconv
-
-import "testing"
-
-type quoteTest struct {
- in string
- out string
- ascii string
-}
-
-var quotetests = []quoteTest{
- {"\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`, `"\a\b\f\r\n\t\v"`},
- {"\\", `"\\"`, `"\\"`},
- {"abc\xffdef", `"abc\xffdef"`, `"abc\xffdef"`},
- {"\u263a", `"☺"`, `"\u263a"`},
- {"\U0010ffff", `"\U0010ffff"`, `"\U0010ffff"`},
- {"\x04", `"\x04"`, `"\x04"`},
-}
-
-type unQuoteTest struct {
- in string
- out string
-}
-
-var unquotetests = []unQuoteTest{
- {`""`, ""},
- {`"a"`, "a"},
- {`"abc"`, "abc"},
- {`"☺"`, "☺"},
- {`"hello world"`, "hello world"},
- {`"\xFF"`, "\xFF"},
- {`"\377"`, "\377"},
- {`"\u1234"`, "\u1234"},
- {`"\U00010111"`, "\U00010111"},
- {`"\U0001011111"`, "\U0001011111"},
- {`"\a\b\f\n\r\t\v\\\""`, "\a\b\f\n\r\t\v\\\""},
- {`"'"`, "'"},
- {`"${file("foo")}"`, `${file("foo")}`},
- {`"${file("\"foo\"")}"`, `${file("\"foo\"")}`},
- {`"echo ${var.region}${element(split(",",var.zones),0)}"`,
- `echo ${var.region}${element(split(",",var.zones),0)}`},
- {`"${HH\\:mm\\:ss}"`, `${HH\\:mm\\:ss}`},
- {`"${\n}"`, `${\n}`},
-}
-
-var misquoted = []string{
- ``,
- `"`,
- `"a`,
- `"'`,
- `b"`,
- `"\"`,
- `"\9"`,
- `"\19"`,
- `"\129"`,
- `'\'`,
- `'\9'`,
- `'\19'`,
- `'\129'`,
- `'ab'`,
- `"\x1!"`,
- `"\U12345678"`,
- `"\z"`,
- "`",
- "`xxx",
- "`\"",
- `"\'"`,
- `'\"'`,
- "\"\n\"",
- "\"\\n\n\"",
- "'\n'",
- `"${"`,
- `"${foo{}"`,
- "\"${foo}\n\"",
-}
-
-func TestUnquote(t *testing.T) {
- for _, tt := range unquotetests {
- if out, err := Unquote(tt.in); err != nil || out != tt.out {
- t.Errorf("Unquote(%#q) = %q, %v want %q, nil", tt.in, out, err, tt.out)
- }
- }
-
- // run the quote tests too, backward
- for _, tt := range quotetests {
- if in, err := Unquote(tt.out); in != tt.in {
- t.Errorf("Unquote(%#q) = %q, %v, want %q, nil", tt.out, in, err, tt.in)
- }
- }
-
- for _, s := range misquoted {
- if out, err := Unquote(s); out != "" || err != ErrSyntax {
- t.Errorf("Unquote(%#q) = %q, %v want %q, %v", s, out, err, "", ErrSyntax)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl
deleted file mode 100644
index 78c267582..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = [
- "1",
- "2", # comment
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl
deleted file mode 100644
index eb5a99a69..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-resource = [{
- "foo": {
- "bar": {},
- "baz": [1, 2, "foo"],
- }
-}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl
deleted file mode 100644
index 1ff7f29fd..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Foo
-
-/* Bar */
-
-/*
-/*
-Baz
-*/
-
-# Another
-
-# Multiple
-# Lines
-
-foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl
deleted file mode 100644
index fec56017d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl
+++ /dev/null
@@ -1 +0,0 @@
-# Hello
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl
deleted file mode 100644
index cccb5b06f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl
+++ /dev/null
@@ -1,42 +0,0 @@
-// This comes from Terraform, as a test
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}"
- ]
-
- network_interface {
- device_index = 0
- description = "Main network interface"
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
-
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = "${aws_instance.web.private_ip}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl
deleted file mode 100644
index 0007aaf5f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl
+++ /dev/null
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl
deleted file mode 100644
index 059d4ce65..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo"]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl
deleted file mode 100644
index 50f4218ac..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo",]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl
deleted file mode 100644
index 029c54b0c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = "bar"
-key = 7
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl
deleted file mode 100644
index e9f77cae9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-default = {
- "eu-west-1": "ami-b1cf19c6",
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl
deleted file mode 100644
index 92592fbb3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-// This is a test structure for the lexer
-foo bar "baz" {
- key = 7
- foo = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl
deleted file mode 100644
index 7229a1f01..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-foo {
- value = 7
- "value" = 8
- "complex::value" = 9
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl
deleted file mode 100644
index 4d156ddea..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl
+++ /dev/null
@@ -1 +0,0 @@
-resource "foo" "bar" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl
deleted file mode 100644
index cf2747ea1..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-foo = "bar"
-bar = 7
-baz = [1,2,3]
-foo = -12
-bar = 3.14159
-foo = true
-bar = false
diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/token_test.go b/vendor/github.com/hashicorp/hcl/hcl/token/token_test.go
deleted file mode 100644
index e4b4af25b..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/token/token_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package token
-
-import (
- "reflect"
- "testing"
-)
-
-func TestTypeString(t *testing.T) {
- var tokens = []struct {
- tt Type
- str string
- }{
- {ILLEGAL, "ILLEGAL"},
- {EOF, "EOF"},
- {COMMENT, "COMMENT"},
- {IDENT, "IDENT"},
- {NUMBER, "NUMBER"},
- {FLOAT, "FLOAT"},
- {BOOL, "BOOL"},
- {STRING, "STRING"},
- {HEREDOC, "HEREDOC"},
- {LBRACK, "LBRACK"},
- {LBRACE, "LBRACE"},
- {COMMA, "COMMA"},
- {PERIOD, "PERIOD"},
- {RBRACK, "RBRACK"},
- {RBRACE, "RBRACE"},
- {ASSIGN, "ASSIGN"},
- {ADD, "ADD"},
- {SUB, "SUB"},
- }
-
- for _, token := range tokens {
- if token.tt.String() != token.str {
- t.Errorf("want: %q got:%q\n", token.str, token.tt)
- }
- }
-
-}
-
-func TestTokenValue(t *testing.T) {
- var tokens = []struct {
- tt Token
- v interface{}
- }{
- {Token{Type: BOOL, Text: `true`}, true},
- {Token{Type: BOOL, Text: `false`}, false},
- {Token{Type: FLOAT, Text: `3.14`}, float64(3.14)},
- {Token{Type: NUMBER, Text: `42`}, int64(42)},
- {Token{Type: IDENT, Text: `foo`}, "foo"},
- {Token{Type: STRING, Text: `"foo"`}, "foo"},
- {Token{Type: STRING, Text: `"foo\nbar"`}, "foo\nbar"},
- {Token{Type: STRING, Text: `"${file("foo")}"`}, `${file("foo")}`},
- {
- Token{
- Type: STRING,
- Text: `"${replace("foo", ".", "\\.")}"`,
- },
- `${replace("foo", ".", "\\.")}`},
- {Token{Type: HEREDOC, Text: "<<EOF\nfoo\nbar\nEOF"}, "foo\nbar"},
- }
-
- for _, token := range tokens {
- if val := token.tt.Value(); !reflect.DeepEqual(val, token.v) {
- t.Errorf("want: %v got:%v\n", token.v, val)
- }
- }
-
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl_test.go b/vendor/github.com/hashicorp/hcl/hcl_test.go
deleted file mode 100644
index 31dff7c9e..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl_test.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package hcl
-
-import (
- "io/ioutil"
- "path/filepath"
- "testing"
-)
-
-// This is the directory where our test fixtures are.
-const fixtureDir = "./test-fixtures"
-
-func testReadFile(t *testing.T, n string) string {
- d, err := ioutil.ReadFile(filepath.Join(fixtureDir, n))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- return string(d)
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go b/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go
deleted file mode 100644
index e0cebf50a..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go
+++ /dev/null
@@ -1,384 +0,0 @@
-package parser
-
-import (
- "fmt"
- "io/ioutil"
- "path/filepath"
- "reflect"
- "runtime"
- "testing"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-func TestType(t *testing.T) {
- var literals = []struct {
- typ token.Type
- src string
- }{
- {token.STRING, `"foo": "bar"`},
- {token.NUMBER, `"foo": 123`},
- {token.FLOAT, `"foo": 123.12`},
- {token.FLOAT, `"foo": -123.12`},
- {token.BOOL, `"foo": true`},
- {token.STRING, `"foo": null`},
- }
-
- for _, l := range literals {
- t.Logf("Testing: %s", l.src)
-
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- lit, ok := item.Val.(*ast.LiteralType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if lit.Token.Type != l.typ {
- t.Errorf("want: %s, got: %s", l.typ, lit.Token.Type)
- }
- }
-}
-
-func TestListType(t *testing.T) {
- var literals = []struct {
- src string
- tokens []token.Type
- }{
- {
- `"foo": ["123", 123]`,
- []token.Type{token.STRING, token.NUMBER},
- },
- {
- `"foo": [123, "123",]`,
- []token.Type{token.NUMBER, token.STRING},
- },
- {
- `"foo": []`,
- []token.Type{},
- },
- {
- `"foo": ["123", 123]`,
- []token.Type{token.STRING, token.NUMBER},
- },
- {
- `"foo": ["123", {}]`,
- []token.Type{token.STRING, token.LBRACE},
- },
- }
-
- for _, l := range literals {
- t.Logf("Testing: %s", l.src)
-
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- tokens := []token.Type{}
- for _, li := range list.List {
- switch v := li.(type) {
- case *ast.LiteralType:
- tokens = append(tokens, v.Token.Type)
- case *ast.ObjectType:
- tokens = append(tokens, token.LBRACE)
- }
- }
-
- equals(t, l.tokens, tokens)
- }
-}
-
-func TestObjectType(t *testing.T) {
- var literals = []struct {
- src string
- nodeType []ast.Node
- itemLen int
- }{
- {
- `"foo": {}`,
- nil,
- 0,
- },
- {
- `"foo": {
- "bar": "fatih"
- }`,
- []ast.Node{&ast.LiteralType{}},
- 1,
- },
- {
- `"foo": {
- "bar": "fatih",
- "baz": ["arslan"]
- }`,
- []ast.Node{
- &ast.LiteralType{},
- &ast.ListType{},
- },
- 2,
- },
- {
- `"foo": {
- "bar": {}
- }`,
- []ast.Node{
- &ast.ObjectType{},
- },
- 1,
- },
- {
- `"foo": {
- "bar": {},
- "foo": true
- }`,
- []ast.Node{
- &ast.ObjectType{},
- &ast.LiteralType{},
- },
- 2,
- },
- }
-
- for _, l := range literals {
- t.Logf("Testing:\n%s\n", l.src)
-
- p := newParser([]byte(l.src))
- // p.enableTrace = true
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- // we know that the ObjectKey name is foo for all cases, what matters
- // is the object
- obj, ok := item.Val.(*ast.ObjectType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- // check if the total length of items are correct
- equals(t, l.itemLen, len(obj.List.Items))
-
- // check if the types are correct
- for i, item := range obj.List.Items {
- equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val))
- }
- }
-}
-
-func TestFlattenObjects(t *testing.T) {
- var literals = []struct {
- src string
- nodeType []ast.Node
- itemLen int
- }{
- {
- `{
- "foo": [
- {
- "foo": "svh",
- "bar": "fatih"
- }
- ]
- }`,
- []ast.Node{
- &ast.ObjectType{},
- &ast.LiteralType{},
- &ast.LiteralType{},
- },
- 3,
- },
- {
- `{
- "variable": {
- "foo": {}
- }
- }`,
- []ast.Node{
- &ast.ObjectType{},
- },
- 1,
- },
- {
- `{
- "empty": []
- }`,
- []ast.Node{
- &ast.ListType{},
- },
- 1,
- },
- {
- `{
- "basic": [1, 2, 3]
- }`,
- []ast.Node{
- &ast.ListType{},
- },
- 1,
- },
- }
-
- for _, l := range literals {
- t.Logf("Testing:\n%s\n", l.src)
-
- f, err := Parse([]byte(l.src))
- if err != nil {
- t.Error(err)
- }
-
- // the first object is always an ObjectList so just assert that one
- // so we can use it as such
- obj, ok := f.Node.(*ast.ObjectList)
- if !ok {
- t.Errorf("node should be *ast.ObjectList, got: %T", f.Node)
- }
-
- // check if the types are correct
- var i int
- for _, item := range obj.Items {
- equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val))
- i++
-
- if obj, ok := item.Val.(*ast.ObjectType); ok {
- for _, item := range obj.List.Items {
- equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val))
- i++
- }
- }
- }
-
- // check if the number of items is correct
- equals(t, l.itemLen, i)
-
- }
-}
-
-func TestObjectKey(t *testing.T) {
- keys := []struct {
- exp []token.Type
- src string
- }{
- {[]token.Type{token.STRING}, `"foo": {}`},
- }
-
- for _, k := range keys {
- p := newParser([]byte(k.src))
- keys, err := p.objectKey()
- if err != nil {
- t.Fatal(err)
- }
-
- tokens := []token.Type{}
- for _, o := range keys {
- tokens = append(tokens, o.Token.Type)
- }
-
- equals(t, k.exp, tokens)
- }
-
- errKeys := []struct {
- src string
- }{
- {`foo 12 {}`},
- {`foo bar = {}`},
- {`foo []`},
- {`12 {}`},
- }
-
- for _, k := range errKeys {
- p := newParser([]byte(k.src))
- _, err := p.objectKey()
- if err == nil {
- t.Errorf("case '%s' should give an error", k.src)
- }
- }
-}
-
-// Official HCL tests
-func TestParse(t *testing.T) {
- cases := []struct {
- Name string
- Err bool
- }{
- {
- "array.json",
- false,
- },
- {
- "basic.json",
- false,
- },
- {
- "object.json",
- false,
- },
- {
- "types.json",
- false,
- },
- {
- "bad_input_128.json",
- true,
- },
- {
- "bad_input_tf_8110.json",
- true,
- },
- {
- "good_input_tf_8110.json",
- false,
- },
- }
-
- const fixtureDir = "./test-fixtures"
-
- for _, tc := range cases {
- d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.Name))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- _, err = Parse(d)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %s\n\nError: %s", tc.Name, err)
- }
- }
-}
-
-func TestParse_inline(t *testing.T) {
- cases := []struct {
- Value string
- Err bool
- }{
- {"{:{", true},
- }
-
- for _, tc := range cases {
- _, err := Parse([]byte(tc.Value))
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %q\n\nError: %s", tc.Value, err)
- }
- }
-}
-
-// equals fails the test if exp is not equal to act.
-func equals(tb testing.TB, exp, act interface{}) {
- if !reflect.DeepEqual(exp, act) {
- _, file, line, _ := runtime.Caller(1)
- fmt.Printf("\033[31m%s:%d:\n\n\texp: %s\n\n\tgot: %s\033[39m\n\n", filepath.Base(file), line, exp, act)
- tb.FailNow()
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/array.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/array.json
deleted file mode 100644
index e320f17ab..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/array.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": [1, 2, "bar"],
- "bar": "baz"
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_128.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_128.json
deleted file mode 100644
index b5f850c96..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_128.json
+++ /dev/null
@@ -1 +0,0 @@
-{:{
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_tf_8110.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_tf_8110.json
deleted file mode 100644
index a04385833..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_tf_8110.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "variable": {
- "poc": {
- "default": "${replace("europe-west", "-", " ")}"
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json
deleted file mode 100644
index b54bde96c..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "foo": "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/good_input_tf_8110.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/good_input_tf_8110.json
deleted file mode 100644
index f21aa090d..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/good_input_tf_8110.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "variable": {
- "poc": {
- "default": "${replace(\"europe-west\", \"-\", \" \")}"
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/object.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/object.json
deleted file mode 100644
index 72168a3cc..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/object.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "foo": {
- "bar": [1,2]
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/types.json b/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/types.json
deleted file mode 100644
index 9a142a6ca..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/types.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "foo": "bar",
- "bar": 7,
- "baz": [1,2,3],
- "foo": -12,
- "bar": 3.14159,
- "foo": true,
- "bar": false,
- "foo": null
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go
deleted file mode 100644
index 3033a5797..000000000
--- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go
+++ /dev/null
@@ -1,362 +0,0 @@
-package scanner
-
-import (
- "bytes"
- "fmt"
- "testing"
-
- "github.com/hashicorp/hcl/json/token"
-)
-
-var f100 = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
-
-type tokenPair struct {
- tok token.Type
- text string
-}
-
-var tokenLists = map[string][]tokenPair{
- "operator": []tokenPair{
- {token.LBRACK, "["},
- {token.LBRACE, "{"},
- {token.COMMA, ","},
- {token.PERIOD, "."},
- {token.RBRACK, "]"},
- {token.RBRACE, "}"},
- },
- "bool": []tokenPair{
- {token.BOOL, "true"},
- {token.BOOL, "false"},
- },
- "string": []tokenPair{
- {token.STRING, `" "`},
- {token.STRING, `"a"`},
- {token.STRING, `"本"`},
- {token.STRING, `"${file(\"foo\")}"`},
- {token.STRING, `"\a"`},
- {token.STRING, `"\b"`},
- {token.STRING, `"\f"`},
- {token.STRING, `"\n"`},
- {token.STRING, `"\r"`},
- {token.STRING, `"\t"`},
- {token.STRING, `"\v"`},
- {token.STRING, `"\""`},
- {token.STRING, `"\000"`},
- {token.STRING, `"\777"`},
- {token.STRING, `"\x00"`},
- {token.STRING, `"\xff"`},
- {token.STRING, `"\u0000"`},
- {token.STRING, `"\ufA16"`},
- {token.STRING, `"\U00000000"`},
- {token.STRING, `"\U0000ffAB"`},
- {token.STRING, `"` + f100 + `"`},
- },
- "number": []tokenPair{
- {token.NUMBER, "0"},
- {token.NUMBER, "1"},
- {token.NUMBER, "9"},
- {token.NUMBER, "42"},
- {token.NUMBER, "1234567890"},
- {token.NUMBER, "-0"},
- {token.NUMBER, "-1"},
- {token.NUMBER, "-9"},
- {token.NUMBER, "-42"},
- {token.NUMBER, "-1234567890"},
- },
- "float": []tokenPair{
- {token.FLOAT, "0."},
- {token.FLOAT, "1."},
- {token.FLOAT, "42."},
- {token.FLOAT, "01234567890."},
- {token.FLOAT, ".0"},
- {token.FLOAT, ".1"},
- {token.FLOAT, ".42"},
- {token.FLOAT, ".0123456789"},
- {token.FLOAT, "0.0"},
- {token.FLOAT, "1.0"},
- {token.FLOAT, "42.0"},
- {token.FLOAT, "01234567890.0"},
- {token.FLOAT, "0e0"},
- {token.FLOAT, "1e0"},
- {token.FLOAT, "42e0"},
- {token.FLOAT, "01234567890e0"},
- {token.FLOAT, "0E0"},
- {token.FLOAT, "1E0"},
- {token.FLOAT, "42E0"},
- {token.FLOAT, "01234567890E0"},
- {token.FLOAT, "0e+10"},
- {token.FLOAT, "1e-10"},
- {token.FLOAT, "42e+10"},
- {token.FLOAT, "01234567890e-10"},
- {token.FLOAT, "0E+10"},
- {token.FLOAT, "1E-10"},
- {token.FLOAT, "42E+10"},
- {token.FLOAT, "01234567890E-10"},
- {token.FLOAT, "01.8e0"},
- {token.FLOAT, "1.4e0"},
- {token.FLOAT, "42.2e0"},
- {token.FLOAT, "01234567890.12e0"},
- {token.FLOAT, "0.E0"},
- {token.FLOAT, "1.12E0"},
- {token.FLOAT, "42.123E0"},
- {token.FLOAT, "01234567890.213E0"},
- {token.FLOAT, "0.2e+10"},
- {token.FLOAT, "1.2e-10"},
- {token.FLOAT, "42.54e+10"},
- {token.FLOAT, "01234567890.98e-10"},
- {token.FLOAT, "0.1E+10"},
- {token.FLOAT, "1.1E-10"},
- {token.FLOAT, "42.1E+10"},
- {token.FLOAT, "01234567890.1E-10"},
- {token.FLOAT, "-0.0"},
- {token.FLOAT, "-1.0"},
- {token.FLOAT, "-42.0"},
- {token.FLOAT, "-01234567890.0"},
- {token.FLOAT, "-0e0"},
- {token.FLOAT, "-1e0"},
- {token.FLOAT, "-42e0"},
- {token.FLOAT, "-01234567890e0"},
- {token.FLOAT, "-0E0"},
- {token.FLOAT, "-1E0"},
- {token.FLOAT, "-42E0"},
- {token.FLOAT, "-01234567890E0"},
- {token.FLOAT, "-0e+10"},
- {token.FLOAT, "-1e-10"},
- {token.FLOAT, "-42e+10"},
- {token.FLOAT, "-01234567890e-10"},
- {token.FLOAT, "-0E+10"},
- {token.FLOAT, "-1E-10"},
- {token.FLOAT, "-42E+10"},
- {token.FLOAT, "-01234567890E-10"},
- {token.FLOAT, "-01.8e0"},
- {token.FLOAT, "-1.4e0"},
- {token.FLOAT, "-42.2e0"},
- {token.FLOAT, "-01234567890.12e0"},
- {token.FLOAT, "-0.E0"},
- {token.FLOAT, "-1.12E0"},
- {token.FLOAT, "-42.123E0"},
- {token.FLOAT, "-01234567890.213E0"},
- {token.FLOAT, "-0.2e+10"},
- {token.FLOAT, "-1.2e-10"},
- {token.FLOAT, "-42.54e+10"},
- {token.FLOAT, "-01234567890.98e-10"},
- {token.FLOAT, "-0.1E+10"},
- {token.FLOAT, "-1.1E-10"},
- {token.FLOAT, "-42.1E+10"},
- {token.FLOAT, "-01234567890.1E-10"},
- },
-}
-
-var orderedTokenLists = []string{
- "comment",
- "operator",
- "bool",
- "string",
- "number",
- "float",
-}
-
-func TestPosition(t *testing.T) {
- // create artifical source code
- buf := new(bytes.Buffer)
-
- for _, listName := range orderedTokenLists {
- for _, ident := range tokenLists[listName] {
- fmt.Fprintf(buf, "\t\t\t\t%s\n", ident.text)
- }
- }
-
- s := New(buf.Bytes())
-
- pos := token.Pos{"", 4, 1, 5}
- s.Scan()
- for _, listName := range orderedTokenLists {
-
- for _, k := range tokenLists[listName] {
- curPos := s.tokPos
- // fmt.Printf("[%q] s = %+v:%+v\n", k.text, curPos.Offset, curPos.Column)
-
- if curPos.Offset != pos.Offset {
- t.Fatalf("offset = %d, want %d for %q", curPos.Offset, pos.Offset, k.text)
- }
- if curPos.Line != pos.Line {
- t.Fatalf("line = %d, want %d for %q", curPos.Line, pos.Line, k.text)
- }
- if curPos.Column != pos.Column {
- t.Fatalf("column = %d, want %d for %q", curPos.Column, pos.Column, k.text)
- }
- pos.Offset += 4 + len(k.text) + 1 // 4 tabs + token bytes + newline
- pos.Line += countNewlines(k.text) + 1 // each token is on a new line
-
- s.Error = func(pos token.Pos, msg string) {
- t.Errorf("error %q for %q", msg, k.text)
- }
-
- s.Scan()
- }
- }
- // make sure there were no token-internal errors reported by scanner
- if s.ErrorCount != 0 {
- t.Errorf("%d errors", s.ErrorCount)
- }
-}
-
-func TestComment(t *testing.T) {
- testTokenList(t, tokenLists["comment"])
-}
-
-func TestOperator(t *testing.T) {
- testTokenList(t, tokenLists["operator"])
-}
-
-func TestBool(t *testing.T) {
- testTokenList(t, tokenLists["bool"])
-}
-
-func TestIdent(t *testing.T) {
- testTokenList(t, tokenLists["ident"])
-}
-
-func TestString(t *testing.T) {
- testTokenList(t, tokenLists["string"])
-}
-
-func TestNumber(t *testing.T) {
- testTokenList(t, tokenLists["number"])
-}
-
-func TestFloat(t *testing.T) {
- testTokenList(t, tokenLists["float"])
-}
-
-func TestRealExample(t *testing.T) {
- complexReal := `
-{
- "variable": {
- "foo": {
- "default": "bar",
- "description": "bar",
- "depends_on": ["something"]
- }
- }
-}`
-
- literals := []struct {
- tokenType token.Type
- literal string
- }{
- {token.LBRACE, `{`},
- {token.STRING, `"variable"`},
- {token.COLON, `:`},
- {token.LBRACE, `{`},
- {token.STRING, `"foo"`},
- {token.COLON, `:`},
- {token.LBRACE, `{`},
- {token.STRING, `"default"`},
- {token.COLON, `:`},
- {token.STRING, `"bar"`},
- {token.COMMA, `,`},
- {token.STRING, `"description"`},
- {token.COLON, `:`},
- {token.STRING, `"bar"`},
- {token.COMMA, `,`},
- {token.STRING, `"depends_on"`},
- {token.COLON, `:`},
- {token.LBRACK, `[`},
- {token.STRING, `"something"`},
- {token.RBRACK, `]`},
- {token.RBRACE, `}`},
- {token.RBRACE, `}`},
- {token.RBRACE, `}`},
- {token.EOF, ``},
- }
-
- s := New([]byte(complexReal))
- for _, l := range literals {
- tok := s.Scan()
- if l.tokenType != tok.Type {
- t.Errorf("got: %s want %s for %s\n", tok, l.tokenType, tok.String())
- }
-
- if l.literal != tok.Text {
- t.Errorf("got: %s want %s\n", tok, l.literal)
- }
- }
-
-}
-
-func TestError(t *testing.T) {
- testError(t, "\x80", "1:1", "illegal UTF-8 encoding", token.ILLEGAL)
- testError(t, "\xff", "1:1", "illegal UTF-8 encoding", token.ILLEGAL)
-
- testError(t, `"ab`+"\x80", "1:4", "illegal UTF-8 encoding", token.STRING)
- testError(t, `"abc`+"\xff", "1:5", "illegal UTF-8 encoding", token.STRING)
-
- testError(t, `01238`, "1:7", "numbers cannot start with 0", token.NUMBER)
- testError(t, `01238123`, "1:10", "numbers cannot start with 0", token.NUMBER)
- testError(t, `'aa'`, "1:1", "illegal char: '", token.ILLEGAL)
-
- testError(t, `"`, "1:2", "literal not terminated", token.STRING)
- testError(t, `"abc`, "1:5", "literal not terminated", token.STRING)
- testError(t, `"abc`+"\n", "1:5", "literal not terminated", token.STRING)
-}
-
-func testError(t *testing.T, src, pos, msg string, tok token.Type) {
- s := New([]byte(src))
-
- errorCalled := false
- s.Error = func(p token.Pos, m string) {
- if !errorCalled {
- if pos != p.String() {
- t.Errorf("pos = %q, want %q for %q", p, pos, src)
- }
-
- if m != msg {
- t.Errorf("msg = %q, want %q for %q", m, msg, src)
- }
- errorCalled = true
- }
- }
-
- tk := s.Scan()
- if tk.Type != tok {
- t.Errorf("tok = %s, want %s for %q", tk, tok, src)
- }
- if !errorCalled {
- t.Errorf("error handler not called for %q", src)
- }
- if s.ErrorCount == 0 {
- t.Errorf("count = %d, want > 0 for %q", s.ErrorCount, src)
- }
-}
-
-func testTokenList(t *testing.T, tokenList []tokenPair) {
- // create artifical source code
- buf := new(bytes.Buffer)
- for _, ident := range tokenList {
- fmt.Fprintf(buf, "%s\n", ident.text)
- }
-
- s := New(buf.Bytes())
- for _, ident := range tokenList {
- tok := s.Scan()
- if tok.Type != ident.tok {
- t.Errorf("tok = %q want %q for %q\n", tok, ident.tok, ident.text)
- }
-
- if tok.Text != ident.text {
- t.Errorf("text = %q want %q", tok.String(), ident.text)
- }
-
- }
-}
-
-func countNewlines(s string) int {
- n := 0
- for _, ch := range s {
- if ch == '\n' {
- n++
- }
- }
- return n
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json
deleted file mode 100644
index e320f17ab..000000000
--- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": [1, 2, "bar"],
- "bar": "baz"
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json
deleted file mode 100644
index b54bde96c..000000000
--- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "foo": "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json
deleted file mode 100644
index 72168a3cc..000000000
--- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "foo": {
- "bar": [1,2]
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json
deleted file mode 100644
index 9a142a6ca..000000000
--- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "foo": "bar",
- "bar": 7,
- "baz": [1,2,3],
- "foo": -12,
- "bar": 3.14159,
- "foo": true,
- "bar": false,
- "foo": null
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/token/token_test.go b/vendor/github.com/hashicorp/hcl/json/token/token_test.go
deleted file mode 100644
index a83fdd55b..000000000
--- a/vendor/github.com/hashicorp/hcl/json/token/token_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package token
-
-import (
- "testing"
-)
-
-func TestTypeString(t *testing.T) {
- var tokens = []struct {
- tt Type
- str string
- }{
- {ILLEGAL, "ILLEGAL"},
- {EOF, "EOF"},
- {NUMBER, "NUMBER"},
- {FLOAT, "FLOAT"},
- {BOOL, "BOOL"},
- {STRING, "STRING"},
- {NULL, "NULL"},
- {LBRACK, "LBRACK"},
- {LBRACE, "LBRACE"},
- {COMMA, "COMMA"},
- {PERIOD, "PERIOD"},
- {RBRACK, "RBRACK"},
- {RBRACE, "RBRACE"},
- }
-
- for _, token := range tokens {
- if token.tt.String() != token.str {
- t.Errorf("want: %q got:%q\n", token.str, token.tt)
-
- }
- }
-
-}
diff --git a/vendor/github.com/hashicorp/hcl/lex_test.go b/vendor/github.com/hashicorp/hcl/lex_test.go
deleted file mode 100644
index 806276444..000000000
--- a/vendor/github.com/hashicorp/hcl/lex_test.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package hcl
-
-import (
- "testing"
-)
-
-func TestLexMode(t *testing.T) {
- cases := []struct {
- Input string
- Mode lexModeValue
- }{
- {
- "",
- lexModeHcl,
- },
- {
- "foo",
- lexModeHcl,
- },
- {
- "{}",
- lexModeJson,
- },
- {
- " {}",
- lexModeJson,
- },
- }
-
- for i, tc := range cases {
- actual := lexMode([]byte(tc.Input))
-
- if actual != tc.Mode {
- t.Fatalf("%d: %#v", i, actual)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/assign_deep.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/assign_deep.hcl
deleted file mode 100644
index dd3151cb7..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/assign_deep.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-resource = [{
- foo = [{
- bar = {}
- }]
-}]
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl
deleted file mode 100644
index 949994487..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = "bar"
-bar = "${file("bing/bong.txt")}"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json b/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json
deleted file mode 100644
index 7bdddc84b..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": "bar",
- "bar": "${file(\"bing/bong.txt\")}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl
deleted file mode 100644
index 4e415da20..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl
+++ /dev/null
@@ -1 +0,0 @@
-count = "3"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl
deleted file mode 100644
index 363697b49..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-foo="bar"
-bar="${file("bing/bong.txt")}"
-foo-bar="baz"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/block_assign.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/block_assign.hcl
deleted file mode 100644
index ee8b06fe3..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/block_assign.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-environment = "aws" {
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl
deleted file mode 100644
index 5b185cc91..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-key "" {
- policy = "read"
-}
-
-key "foo/" {
- policy = "write"
-}
-
-key "foo/bar/" {
- policy = "read"
-}
-
-key "foo/bar/baz" {
- policy = "deny"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json
deleted file mode 100644
index 151864ee8..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "key": {
- "": {
- "policy": "read"
- },
-
- "foo/": {
- "policy": "write"
- },
-
- "foo/bar/": {
- "policy": "read"
- },
-
- "foo/bar/baz": {
- "policy": "deny"
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl
deleted file mode 100644
index 52dcaa1bc..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl
+++ /dev/null
@@ -1,10 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-variable "amis" {
- default = {
- east = "foo"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json
deleted file mode 100644
index 49f921ed0..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "variable": {
- "foo": {
- "default": "bar",
- "description": "bar"
- },
-
- "amis": {
- "default": {
- "east": "foo"
- }
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl
deleted file mode 100644
index 5be1b2315..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl
+++ /dev/null
@@ -1 +0,0 @@
-resource "foo" {}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl
deleted file mode 100644
index f818b15e0..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-foo = "bar\"baz\\n"
-bar = "new\nline"
-qux = "back\\slash"
-qax = "slash\\:colon"
-nested = "${HH\\:mm\\:ss}"
-nestedquotes = "${"\"stringwrappedinquotes\""}"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/escape_backslash.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/escape_backslash.hcl
deleted file mode 100644
index bc337fb7c..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/escape_backslash.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-output {
- one = "${replace(var.sub_domain, ".", "\\.")}"
- two = "${replace(var.sub_domain, ".", "\\\\.")}"
- many = "${replace(var.sub_domain, ".", "\\\\\\\\.")}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl
deleted file mode 100644
index 9bca551f8..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = "bar"
-Key = 7
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl
deleted file mode 100644
index edf355e38..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-a = 1.02
-b = 2
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json b/vendor/github.com/hashicorp/hcl/test-fixtures/float.json
deleted file mode 100644
index 580868043..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "a": 1.02,
- "b": 2
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/git_crypt.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/git_crypt.hcl
deleted file mode 100644
index f691948e1..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/git_crypt.hcl
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate.json b/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate.json
deleted file mode 100644
index cad015198..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "default": "${replace(\"europe-west\", \"-\", \" \")}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_lists.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_lists.hcl
deleted file mode 100644
index 8af345849..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_lists.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = [["foo"], ["bar"]]
-
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_maps.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_maps.hcl
deleted file mode 100644
index 985a33bae..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/list_of_maps.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = [
- {somekey1 = "someval1"},
- {somekey2 = "someval2", someextrakey = "someextraval"},
-]
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl
deleted file mode 100644
index f883bd707..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = <<EOF
-bar
-baz
-EOF
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.json b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.json
deleted file mode 100644
index 93f7cc55c..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "foo": "bar\nbaz"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_bad.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_bad.hcl
deleted file mode 100644
index 4cd0f4dd7..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_bad.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = <EOF
-bar
-baz
-EOF
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_indented.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_indented.hcl
deleted file mode 100644
index f1d7a843d..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_indented.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = <<-EOF
- bar
- baz
- EOF
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal.hcl
deleted file mode 100644
index f89fdfc71..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-multiline_literal = "hello
- world" \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal_with_hil.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal_with_hil.hcl
deleted file mode 100644
index b55a361ca..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_literal_with_hil.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-multiline_literal_with_hil = "${hello
- world}" \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_eof.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_eof.hcl
deleted file mode 100644
index faa13290b..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_eof.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-foo = <<EOF
-bar
-baz
-EOF
-key = "value"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_hanging_indent.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_hanging_indent.hcl
deleted file mode 100644
index c4331eeae..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_hanging_indent.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-foo = <<-EOF
- baz
- bar
- foo
- EOF
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_marker.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_marker.hcl
deleted file mode 100644
index 55c173966..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline_no_marker.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = <<
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/nested_block_comment.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/nested_block_comment.hcl
deleted file mode 100644
index e827782fe..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/nested_block_comment.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
-foo = "bar/*"
-*/
-
-bar = "value"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/nested_provider_bad.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/nested_provider_bad.hcl
deleted file mode 100644
index 94a753a5a..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/nested_provider_bad.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-resource "aws" "web" {
- provider = "aws" {
- region = "us-west-2"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/null_strings.json b/vendor/github.com/hashicorp/hcl/test-fixtures/null_strings.json
deleted file mode 100644
index a5b8a5af2..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/null_strings.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "module": {
- "app": {
- "foo": null
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/object_list.json b/vendor/github.com/hashicorp/hcl/test-fixtures/object_list.json
deleted file mode 100644
index 73f367438..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/object_list.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "resource": {
- "aws_instance": {
- "db": {
- "vpc": "foo",
- "provisioner": [{
- "file": {
- "source": "foo",
- "destination": "bar"
- }
- }]
- }
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/object_with_bool.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/object_with_bool.hcl
deleted file mode 100644
index e565fb477..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/object_with_bool.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-path {
- policy = "write"
- permissions = {
- "bool" = [false]
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.hcl
deleted file mode 100644
index b9eca28dd..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-a = 1e-10
-b = 1e+10
-c = 1e10
-d = 1.2e-10
-e = 1.2e+10
-f = 1.2e10
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.json b/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.json
deleted file mode 100644
index c1fce3c9d..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/scientific.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "a": 1e-10,
- "b": 1e+10,
- "c": 1e10,
- "d": 1.2e-10,
- "e": 1.2e+10,
- "f": 1.2e10
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/slice_expand.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/slice_expand.hcl
deleted file mode 100644
index 4d3725fc1..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/slice_expand.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-service "my-service-0" {
- key = "value"
-}
-
-service "my-service-1" {
- key = "value"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/structure.hcl
deleted file mode 100644
index 18b6b1e9f..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-// This is a test structure for the lexer
-foo "baz" {
- key = 7
- foo = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure.json
deleted file mode 100644
index 30aa7654e..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "foo": [{
- "baz": [{
- "key": 7,
- "foo": "bar"
- }]
- }]
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.hcl
deleted file mode 100644
index 7577ffc0e..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.hcl
+++ /dev/null
@@ -1,9 +0,0 @@
-// This is a test structure for the lexer
-foo "baz" {
- key = 7
- foo = "bar"
-}
-
-foo {
- key = 7
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.json
deleted file mode 100644
index c51fcf544..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure2.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "foo": [{
- "baz": {
- "key": 7,
- "foo": "bar"
- }
- }, {
- "key": 7
- }]
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flat.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flat.json
deleted file mode 100644
index 5256db475..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flat.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "foo": {
- "baz": {
- "key": 7,
- "foo": "bar"
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flatmap.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flatmap.hcl
deleted file mode 100644
index fcf689e19..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_flatmap.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-foo {
- key = 7
-}
-
-foo {
- foo = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.hcl
deleted file mode 100644
index 33193ae53..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-foo {
- key = 7
-}
-foo {
- key = 12
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.json
deleted file mode 100644
index 806a60e3e..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "foo": [{
- "key": 7
- }, {
- "key": 12
- }]
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_deep.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_deep.json
deleted file mode 100644
index 46e98bef3..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_deep.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "bar": {
- "foo": {
- "name": "terraform_example",
- "ingress": [
- {
- "from_port": 22
- },
- {
- "from_port": 80
- }
- ]
- }
- }
-}
-
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_empty.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_empty.json
deleted file mode 100644
index d99606fb1..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_list_empty.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "foo": []
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.hcl
deleted file mode 100644
index e45b23d52..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-foo "baz" {
- key = 7
-}
-
-foo "bar" {
- key = 12
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.json b/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.json
deleted file mode 100644
index 773761aca..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/structure_multi.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "foo": {
- "baz": {
- "key": 7
- },
-
- "bar": {
- "key": 12
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.hcl
deleted file mode 100644
index fda9241a4..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-name = "terraform-test-app"
-
-config_vars {
- FOO = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.json b/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.json
deleted file mode 100644
index e8c6fac3d..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_heroku.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "terraform-test-app",
- "config_vars": {
- "FOO": "bar"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_variable_invalid.json b/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_variable_invalid.json
deleted file mode 100644
index 081247ea4..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/terraform_variable_invalid.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "variable": {
- "whatever": "abc123"
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/tfvars.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/tfvars.hcl
deleted file mode 100644
index 5f623e04d..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/tfvars.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-regularvar = "Should work"
-map.key1 = "Value"
-map.key2 = "Other value"
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_block_comment.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_block_comment.hcl
deleted file mode 100644
index c0ce34d04..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_block_comment.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-/*
-Foo
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_brace.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_brace.hcl
deleted file mode 100644
index 31b37c4f9..000000000
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/unterminated_brace.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo "baz" {
- bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go b/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go
deleted file mode 100644
index 827ac6f1e..000000000
--- a/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package testhelper
-
-import (
- "runtime"
- "strings"
-)
-
-// Converts the line endings when on Windows
-func Unix2dos(unix string) string {
- if runtime.GOOS != "windows" {
- return unix
- }
-
- return strings.Replace(unix, "\n", "\r\n", -1)
-}
diff --git a/vendor/github.com/hashicorp/memberlist/awareness_test.go b/vendor/github.com/hashicorp/memberlist/awareness_test.go
deleted file mode 100644
index c6ade10af..000000000
--- a/vendor/github.com/hashicorp/memberlist/awareness_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package memberlist
-
-import (
- "testing"
- "time"
-)
-
-func TestAwareness(t *testing.T) {
- cases := []struct {
- delta int
- score int
- timeout time.Duration
- }{
- {0, 0, 1 * time.Second},
- {-1, 0, 1 * time.Second},
- {-10, 0, 1 * time.Second},
- {1, 1, 2 * time.Second},
- {-1, 0, 1 * time.Second},
- {10, 7, 8 * time.Second},
- {-1, 6, 7 * time.Second},
- {-1, 5, 6 * time.Second},
- {-1, 4, 5 * time.Second},
- {-1, 3, 4 * time.Second},
- {-1, 2, 3 * time.Second},
- {-1, 1, 2 * time.Second},
- {-1, 0, 1 * time.Second},
- {-1, 0, 1 * time.Second},
- }
-
- a := newAwareness(8)
- for i, c := range cases {
- a.ApplyDelta(c.delta)
- if a.GetHealthScore() != c.score {
- t.Errorf("case %d: score mismatch %d != %d", i, a.score, c.score)
- }
- if timeout := a.ScaleTimeout(1 * time.Second); timeout != c.timeout {
- t.Errorf("case %d: scaled timeout mismatch %9.6f != %9.6f",
- i, timeout.Seconds(), c.timeout.Seconds())
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/broadcast_test.go b/vendor/github.com/hashicorp/memberlist/broadcast_test.go
deleted file mode 100644
index c6a7302cc..000000000
--- a/vendor/github.com/hashicorp/memberlist/broadcast_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package memberlist
-
-import (
- "reflect"
- "testing"
-)
-
-func TestMemberlistBroadcast_Invalidates(t *testing.T) {
- m1 := &memberlistBroadcast{"test", nil, nil}
- m2 := &memberlistBroadcast{"foo", nil, nil}
-
- if m1.Invalidates(m2) || m2.Invalidates(m1) {
- t.Fatalf("unexpected invalidation")
- }
-
- if !m1.Invalidates(m1) {
- t.Fatalf("expected invalidation")
- }
-}
-
-func TestMemberlistBroadcast_Message(t *testing.T) {
- m1 := &memberlistBroadcast{"test", []byte("test"), nil}
- msg := m1.Message()
- if !reflect.DeepEqual(msg, []byte("test")) {
- t.Fatalf("messages do not match")
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/integ_test.go b/vendor/github.com/hashicorp/memberlist/integ_test.go
deleted file mode 100644
index f519c6baa..000000000
--- a/vendor/github.com/hashicorp/memberlist/integ_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package memberlist
-
-import (
- "fmt"
- "log"
- "os"
- "testing"
- "time"
-)
-
-// CheckInteg will skip a test if integration testing is not enabled.
-func CheckInteg(t *testing.T) {
- if !IsInteg() {
- t.SkipNow()
- }
-}
-
-// IsInteg returns a boolean telling you if we're in integ testing mode.
-func IsInteg() bool {
- return os.Getenv("INTEG_TESTS") != ""
-}
-
-// Tests the memberlist by creating a cluster of 100 nodes
-// and checking that we get strong convergence of changes.
-func TestMemberlist_Integ(t *testing.T) {
- CheckInteg(t)
-
- num := 16
- var members []*Memberlist
-
- secret := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
- eventCh := make(chan NodeEvent, num)
-
- addr := "127.0.0.1"
- for i := 0; i < num; i++ {
- c := DefaultLANConfig()
- c.Name = fmt.Sprintf("%s:%d", addr, 12345+i)
- c.BindAddr = addr
- c.BindPort = 12345 + i
- c.ProbeInterval = 20 * time.Millisecond
- c.ProbeTimeout = 100 * time.Millisecond
- c.GossipInterval = 20 * time.Millisecond
- c.PushPullInterval = 200 * time.Millisecond
- c.SecretKey = secret
-
- if i == 0 {
- c.Events = &ChannelEventDelegate{eventCh}
- }
-
- m, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- members = append(members, m)
- defer m.Shutdown()
-
- if i > 0 {
- last := members[i-1]
- num, err := m.Join([]string{last.config.Name})
- if num == 0 || err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- }
- }
-
- // Wait and print debug info
- breakTimer := time.After(250 * time.Millisecond)
-WAIT:
- for {
- select {
- case e := <-eventCh:
- if e.Event == NodeJoin {
- log.Printf("[DEBUG] Node join: %v (%d)", *e.Node, members[0].NumMembers())
- } else {
- log.Printf("[DEBUG] Node leave: %v (%d)", *e.Node, members[0].NumMembers())
- }
- case <-breakTimer:
- break WAIT
- }
- }
-
- for idx, m := range members {
- got := m.NumMembers()
- if got != num {
- t.Errorf("bad num members at idx %d. Expected %d. Got %d.",
- idx, num, got)
- }
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/keyring_test.go b/vendor/github.com/hashicorp/memberlist/keyring_test.go
deleted file mode 100644
index eec699fd0..000000000
--- a/vendor/github.com/hashicorp/memberlist/keyring_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "testing"
-)
-
-var TestKeys [][]byte = [][]byte{
- []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- []byte{15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- []byte{8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7},
-}
-
-func TestKeyring_EmptyRing(t *testing.T) {
- // Keyrings can be created with no encryption keys (disabled encryption)
- keyring, err := NewKeyring(nil, nil)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- keys := keyring.GetKeys()
- if len(keys) != 0 {
- t.Fatalf("Expected 0 keys but have %d", len(keys))
- }
-}
-
-func TestKeyring_PrimaryOnly(t *testing.T) {
- // Keyrings can be created using only a primary key
- keyring, err := NewKeyring(nil, TestKeys[0])
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- keys := keyring.GetKeys()
- if len(keys) != 1 {
- t.Fatalf("Expected 1 key but have %d", len(keys))
- }
-}
-
-func TestKeyring_GetPrimaryKey(t *testing.T) {
- keyring, err := NewKeyring(TestKeys, TestKeys[1])
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- // GetPrimaryKey returns correct key
- primaryKey := keyring.GetPrimaryKey()
- if !bytes.Equal(primaryKey, TestKeys[1]) {
- t.Fatalf("Unexpected primary key: %v", primaryKey)
- }
-}
-
-func TestKeyring_AddRemoveUse(t *testing.T) {
- keyring, err := NewKeyring(nil, TestKeys[1])
- if err != nil {
- t.Fatalf("err :%s", err)
- }
-
- // Use non-existent key throws error
- if err := keyring.UseKey(TestKeys[2]); err == nil {
- t.Fatalf("Expected key not installed error")
- }
-
- // Add key to ring
- if err := keyring.AddKey(TestKeys[2]); err != nil {
- t.Fatalf("err: %s", err)
- }
-
- keys := keyring.GetKeys()
- if !bytes.Equal(keys[0], TestKeys[1]) {
- t.Fatalf("Unexpected primary key change")
- }
-
- if len(keys) != 2 {
- t.Fatalf("Expected 2 keys but have %d", len(keys))
- }
-
- // Use key that exists should succeed
- if err := keyring.UseKey(TestKeys[2]); err != nil {
- t.Fatalf("err: %s", err)
- }
-
- primaryKey := keyring.GetPrimaryKey()
- if !bytes.Equal(primaryKey, TestKeys[2]) {
- t.Fatalf("Unexpected primary key: %v", primaryKey)
- }
-
- // Removing primary key should fail
- if err := keyring.RemoveKey(TestKeys[2]); err == nil {
- t.Fatalf("Expected primary key removal error")
- }
-
- // Removing non-primary key should succeed
- if err := keyring.RemoveKey(TestKeys[1]); err != nil {
- t.Fatalf("err: %s", err)
- }
-
- keys = keyring.GetKeys()
- if len(keys) != 1 {
- t.Fatalf("Expected 1 key but have %d", len(keys))
- }
-}
-
-func TestKeyRing_MultiKeyEncryptDecrypt(t *testing.T) {
- plaintext := []byte("this is a plain text message")
- extra := []byte("random data")
-
- keyring, err := NewKeyring(TestKeys, TestKeys[0])
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- // First encrypt using the primary key and make sure we can decrypt
- var buf bytes.Buffer
- err = encryptPayload(1, TestKeys[0], plaintext, extra, &buf)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- msg, err := decryptPayload(keyring.GetKeys(), buf.Bytes(), extra)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if !bytes.Equal(msg, plaintext) {
- t.Fatalf("bad: %v", msg)
- }
-
- // Now encrypt with a secondary key and try decrypting again.
- buf.Reset()
- err = encryptPayload(1, TestKeys[2], plaintext, extra, &buf)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- msg, err = decryptPayload(keyring.GetKeys(), buf.Bytes(), extra)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if !bytes.Equal(msg, plaintext) {
- t.Fatalf("bad: %v", msg)
- }
-
- // Remove a key from the ring, and then try decrypting again
- if err := keyring.RemoveKey(TestKeys[2]); err != nil {
- t.Fatalf("err: %s", err)
- }
-
- msg, err = decryptPayload(keyring.GetKeys(), buf.Bytes(), extra)
- if err == nil {
- t.Fatalf("Expected no keys to decrypt message")
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/logging_test.go b/vendor/github.com/hashicorp/memberlist/logging_test.go
deleted file mode 100644
index cc04b8a91..000000000
--- a/vendor/github.com/hashicorp/memberlist/logging_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package memberlist
-
-import (
- "fmt"
- "net"
- "testing"
-)
-
-func TestLogging_Address(t *testing.T) {
- s := LogAddress(nil)
- if s != "from=<unknown address>" {
- t.Fatalf("bad: %s", s)
- }
-
- addr, err := net.ResolveIPAddr("ip4", "127.0.0.1")
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- s = LogAddress(addr)
- if s != "from=127.0.0.1" {
- t.Fatalf("bad: %s", s)
- }
-}
-
-func TestLogging_Conn(t *testing.T) {
- s := LogConn(nil)
- if s != "from=<unknown address>" {
- t.Fatalf("bad: %s", s)
- }
-
- ln, err := net.Listen("tcp", ":0")
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- conn, err := net.Dial("tcp", ln.Addr().String())
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- defer conn.Close()
-
- s = LogConn(conn)
- if s != fmt.Sprintf("from=%s", conn.RemoteAddr().String()) {
- t.Fatalf("bad: %s", s)
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/memberlist_test.go b/vendor/github.com/hashicorp/memberlist/memberlist_test.go
deleted file mode 100644
index ee2fc5d52..000000000
--- a/vendor/github.com/hashicorp/memberlist/memberlist_test.go
+++ /dev/null
@@ -1,1545 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "log"
- "net"
- "os"
- "reflect"
- "strings"
- "sync"
- "testing"
- "time"
-
- "github.com/miekg/dns"
-)
-
-var bindLock sync.Mutex
-var bindNum byte = 10
-
-func getBindAddr() net.IP {
- bindLock.Lock()
- defer bindLock.Unlock()
-
- result := net.IPv4(127, 0, 0, bindNum)
- bindNum++
- if bindNum > 255 {
- bindNum = 10
- }
-
- return result
-}
-
-func testConfig() *Config {
- config := DefaultLANConfig()
- config.BindAddr = getBindAddr().String()
- config.Name = config.BindAddr
- return config
-}
-
-func yield() {
- time.Sleep(5 * time.Millisecond)
-}
-
-type MockDelegate struct {
- meta []byte
- msgs [][]byte
- broadcasts [][]byte
- state []byte
- remoteState []byte
-}
-
-func (m *MockDelegate) NodeMeta(limit int) []byte {
- return m.meta
-}
-
-func (m *MockDelegate) NotifyMsg(msg []byte) {
- cp := make([]byte, len(msg))
- copy(cp, msg)
- m.msgs = append(m.msgs, cp)
-}
-
-func (m *MockDelegate) GetBroadcasts(overhead, limit int) [][]byte {
- b := m.broadcasts
- m.broadcasts = nil
- return b
-}
-
-func (m *MockDelegate) LocalState(join bool) []byte {
- return m.state
-}
-
-func (m *MockDelegate) MergeRemoteState(s []byte, join bool) {
- m.remoteState = s
-}
-
-// Returns a new Memberlist on an open port by trying a range of port numbers
-// until something sticks.
-func NewMemberlistOnOpenPort(c *Config) (*Memberlist, error) {
- c.BindPort = 0
- return newMemberlist(c)
-}
-
-func GetMemberlistDelegate(t *testing.T) (*Memberlist, *MockDelegate) {
- d := &MockDelegate{}
-
- c := testConfig()
- c.Delegate = d
-
- m, err := NewMemberlistOnOpenPort(c)
- if err != nil {
- t.Fatalf("failed to start: %v", err)
- return nil, nil
- }
-
- return m, d
-}
-
-func GetMemberlist(t *testing.T) *Memberlist {
- c := testConfig()
-
- m, err := NewMemberlistOnOpenPort(c)
- if err != nil {
- t.Fatalf("failed to start: %v", err)
- return nil
- }
-
- return m
-}
-
-func TestDefaultLANConfig_protocolVersion(t *testing.T) {
- c := DefaultLANConfig()
- if c.ProtocolVersion != ProtocolVersion2Compatible {
- t.Fatalf("should be max: %d", c.ProtocolVersion)
- }
-}
-
-func TestCreate_protocolVersion(t *testing.T) {
- cases := []struct {
- version uint8
- err bool
- }{
- {ProtocolVersionMin, false},
- {ProtocolVersionMax, false},
- // TODO(mitchellh): uncommon when we're over 0
- //{ProtocolVersionMin - 1, true},
- {ProtocolVersionMax + 1, true},
- {ProtocolVersionMax - 1, false},
- }
-
- for _, tc := range cases {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- c.ProtocolVersion = tc.version
- m, err := Create(c)
- if tc.err && err == nil {
- t.Errorf("Should've failed with version: %d", tc.version)
- } else if !tc.err && err != nil {
- t.Errorf("Version '%d' error: %s", tc.version, err)
- }
-
- if err == nil {
- m.Shutdown()
- }
- }
-}
-
-func TestCreate_secretKey(t *testing.T) {
- cases := []struct {
- key []byte
- err bool
- }{
- {make([]byte, 0), false},
- {[]byte("abc"), true},
- {make([]byte, 16), false},
- {make([]byte, 38), true},
- }
-
- for _, tc := range cases {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- c.SecretKey = tc.key
- m, err := Create(c)
- if tc.err && err == nil {
- t.Errorf("Should've failed with key: %#v", tc.key)
- } else if !tc.err && err != nil {
- t.Errorf("Key '%#v' error: %s", tc.key, err)
- }
-
- if err == nil {
- m.Shutdown()
- }
- }
-}
-
-func TestCreate_secretKeyEmpty(t *testing.T) {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- c.SecretKey = make([]byte, 0)
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- if m.config.EncryptionEnabled() {
- t.Fatalf("Expected encryption to be disabled")
- }
-}
-
-func TestCreate_keyringOnly(t *testing.T) {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- keyring, err := NewKeyring(nil, make([]byte, 16))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- c.Keyring = keyring
-
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- if !m.config.EncryptionEnabled() {
- t.Fatalf("Expected encryption to be enabled")
- }
-}
-
-func TestCreate_keyringAndSecretKey(t *testing.T) {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- keyring, err := NewKeyring(nil, make([]byte, 16))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- c.Keyring = keyring
- c.SecretKey = []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
-
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- if !m.config.EncryptionEnabled() {
- t.Fatalf("Expected encryption to be enabled")
- }
-
- ringKeys := c.Keyring.GetKeys()
- if !bytes.Equal(c.SecretKey, ringKeys[0]) {
- t.Fatalf("Unexpected primary key %v", ringKeys[0])
- }
-}
-
-func TestCreate_invalidLoggerSettings(t *testing.T) {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- c.Logger = log.New(ioutil.Discard, "", log.LstdFlags)
- c.LogOutput = ioutil.Discard
-
- _, err := Create(c)
- if err == nil {
- t.Fatal("Memberlist should not allow both LogOutput and Logger to be set, but it did not raise an error")
- }
-}
-
-func TestCreate(t *testing.T) {
- c := testConfig()
- c.ProtocolVersion = ProtocolVersionMin
- c.DelegateProtocolVersion = 13
- c.DelegateProtocolMin = 12
- c.DelegateProtocolMax = 24
-
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- yield()
-
- members := m.Members()
- if len(members) != 1 {
- t.Fatalf("bad number of members")
- }
-
- if members[0].PMin != ProtocolVersionMin {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].PMax != ProtocolVersionMax {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].PCur != c.ProtocolVersion {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].DMin != c.DelegateProtocolMin {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].DMax != c.DelegateProtocolMax {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].DCur != c.DelegateProtocolVersion {
- t.Fatalf("bad: %#v", members[0])
- }
-}
-
-func TestMemberList_CreateShutdown(t *testing.T) {
- m := GetMemberlist(t)
- m.schedule()
- if err := m.Shutdown(); err != nil {
- t.Fatalf("failed to shutdown %v", err)
- }
-}
-
-func TestMemberList_ResolveAddr(t *testing.T) {
- m := GetMemberlist(t)
- if _, err := m.resolveAddr("localhost"); err != nil {
- t.Fatalf("Could not resolve localhost: %s", err)
- }
- if _, err := m.resolveAddr("[::1]:80"); err != nil {
- t.Fatalf("Could not understand ipv6 pair: %s", err)
- }
- if _, err := m.resolveAddr("[::1]"); err != nil {
- t.Fatalf("Could not understand ipv6 non-pair")
- }
- if _, err := m.resolveAddr(":80"); err == nil {
- t.Fatalf("Understood hostless port")
- }
- if _, err := m.resolveAddr("localhost:80"); err != nil {
- t.Fatalf("Could not understand hostname port combo: %s", err)
- }
- if _, err := m.resolveAddr("localhost:80000"); err == nil {
- t.Fatalf("Understood too high port")
- }
- if _, err := m.resolveAddr("127.0.0.1:80"); err != nil {
- t.Fatalf("Could not understand hostname port combo: %s", err)
- }
- if _, err := m.resolveAddr("[2001:db8:a0b:12f0::1]:80"); err != nil {
- t.Fatalf("Could not understand hostname port combo: %s", err)
- }
- if _, err := m.resolveAddr("127.0.0.1"); err != nil {
- t.Fatalf("Could not understand IPv4 only %s", err)
- }
- if _, err := m.resolveAddr("[2001:db8:a0b:12f0::1]"); err != nil {
- t.Fatalf("Could not understand IPv6 only %s", err)
- }
-}
-
-type dnsHandler struct {
- t *testing.T
-}
-
-func (h dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
- if len(r.Question) != 1 {
- h.t.Fatalf("bad: %#v", r.Question)
- }
-
- name := "join.service.consul."
- question := r.Question[0]
- if question.Name != name || question.Qtype != dns.TypeANY {
- h.t.Fatalf("bad: %#v", question)
- }
-
- m := new(dns.Msg)
- m.SetReply(r)
- m.Authoritative = true
- m.RecursionAvailable = false
- m.Answer = append(m.Answer, &dns.A{
- Hdr: dns.RR_Header{
- Name: name,
- Rrtype: dns.TypeA,
- Class: dns.ClassINET},
- A: net.ParseIP("127.0.0.1"),
- })
- m.Answer = append(m.Answer, &dns.AAAA{
- Hdr: dns.RR_Header{
- Name: name,
- Rrtype: dns.TypeAAAA,
- Class: dns.ClassINET},
- AAAA: net.ParseIP("2001:db8:a0b:12f0::1"),
- })
- if err := w.WriteMsg(m); err != nil {
- h.t.Fatalf("err: %v", err)
- }
-}
-
-func TestMemberList_ResolveAddr_TCP_First(t *testing.T) {
- bind := "127.0.0.1:8600"
-
- var wg sync.WaitGroup
- wg.Add(1)
- server := &dns.Server{
- Addr: bind,
- Handler: dnsHandler{t},
- Net: "tcp",
- NotifyStartedFunc: wg.Done,
- }
- defer server.Shutdown()
-
- go func() {
- if err := server.ListenAndServe(); err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
- t.Fatalf("err: %v", err)
- }
- }()
- wg.Wait()
-
- tmpFile, err := ioutil.TempFile("", "")
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- defer os.Remove(tmpFile.Name())
-
- content := []byte(fmt.Sprintf("nameserver %s", bind))
- if _, err := tmpFile.Write(content); err != nil {
- t.Fatalf("err: %v", err)
- }
- if err := tmpFile.Close(); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- m := GetMemberlist(t)
- m.config.DNSConfigPath = tmpFile.Name()
- m.setAlive()
- m.schedule()
- defer m.Shutdown()
-
- // Try with and without the trailing dot.
- hosts := []string{
- "join.service.consul.",
- "join.service.consul",
- }
- for _, host := range hosts {
- ips, err := m.resolveAddr(host)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- port := uint16(m.config.BindPort)
- expected := []ipPort{
- ipPort{net.ParseIP("127.0.0.1"), port},
- ipPort{net.ParseIP("2001:db8:a0b:12f0::1"), port},
- }
- if !reflect.DeepEqual(ips, expected) {
- t.Fatalf("bad: %#v expected: %#v", ips, expected)
- }
- }
-}
-
-func TestMemberList_Members(t *testing.T) {
- n1 := &Node{Name: "test"}
- n2 := &Node{Name: "test2"}
- n3 := &Node{Name: "test3"}
-
- m := &Memberlist{}
- nodes := []*nodeState{
- &nodeState{Node: *n1, State: stateAlive},
- &nodeState{Node: *n2, State: stateDead},
- &nodeState{Node: *n3, State: stateSuspect},
- }
- m.nodes = nodes
-
- members := m.Members()
- if !reflect.DeepEqual(members, []*Node{n1, n3}) {
- t.Fatalf("bad members")
- }
-}
-
-func TestMemberlist_Join(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
- if m2.estNumNodes() != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-}
-
-type CustomMergeDelegate struct {
- invoked bool
-}
-
-func (c *CustomMergeDelegate) NotifyMerge(nodes []*Node) error {
- log.Printf("Cancel merge")
- c.invoked = true
- return fmt.Errorf("Custom merge canceled")
-}
-
-func TestMemberlist_Join_Cancel(t *testing.T) {
- m1 := GetMemberlist(t)
- merge1 := &CustomMergeDelegate{}
- m1.config.Merge = merge1
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- merge2 := &CustomMergeDelegate{}
- m2.config.Merge = merge2
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 0 {
- t.Fatalf("unexpected 0: %d", num)
- }
- if !strings.Contains(err.Error(), "Custom merge canceled") {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 1 {
- t.Fatalf("should have 1 nodes! %v", m2.Members())
- }
- if len(m1.Members()) != 1 {
- t.Fatalf("should have 1 nodes! %v", m1.Members())
- }
-
- // Check delegate invocation
- if !merge1.invoked {
- t.Fatalf("should invoke delegate")
- }
- if !merge2.invoked {
- t.Fatalf("should invoke delegate")
- }
-}
-
-type CustomAliveDelegate struct {
- Ignore string
- count int
-}
-
-func (c *CustomAliveDelegate) NotifyAlive(peer *Node) error {
- c.count++
- if peer.Name == c.Ignore {
- return nil
- }
- log.Printf("Cancel alive")
- return fmt.Errorf("Custom alive canceled")
-}
-
-func TestMemberlist_Join_Cancel_Passive(t *testing.T) {
- m1 := GetMemberlist(t)
- alive1 := &CustomAliveDelegate{
- Ignore: m1.config.Name,
- }
- m1.config.Alive = alive1
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- alive2 := &CustomAliveDelegate{
- Ignore: c.Name,
- }
- m2.config.Alive = alive2
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 1 {
- t.Fatalf("should have 1 nodes! %v", m2.Members())
- }
- if len(m1.Members()) != 1 {
- t.Fatalf("should have 1 nodes! %v", m1.Members())
- }
-
- // Check delegate invocation
- if alive1.count == 0 {
- t.Fatalf("should invoke delegate: %d", alive1.count)
- }
- if alive2.count == 0 {
- t.Fatalf("should invoke delegate: %d", alive2.count)
- }
-}
-
-func TestMemberlist_Join_protocolVersions(t *testing.T) {
- c1 := testConfig()
- c2 := testConfig()
- c3 := testConfig()
- c3.ProtocolVersion = ProtocolVersionMax
-
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m1.Shutdown()
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- m3, err := Create(c3)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m3.Shutdown()
-
- _, err = m1.Join([]string{c2.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- yield()
-
- _, err = m1.Join([]string{c3.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-}
-
-func TestMemberlist_Leave(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
- c.GossipInterval = time.Millisecond
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
- if len(m1.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- // Leave
- m1.Leave(time.Second)
-
- // Wait for leave
- time.Sleep(10 * time.Millisecond)
-
- // m1 should think dead
- if len(m1.Members()) != 1 {
- t.Fatalf("should have 1 node")
- }
-
- if len(m2.Members()) != 1 {
- t.Fatalf("should have 1 node")
- }
-}
-
-func TestMemberlist_JoinShutdown(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.setAlive()
- m1.schedule()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
- c.ProbeInterval = time.Millisecond
- c.ProbeTimeout = 100 * time.Microsecond
- c.SuspicionMaxTimeoutMult = 1
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- m1.Shutdown()
-
- time.Sleep(10 * time.Millisecond)
-
- if len(m2.Members()) != 1 {
- t.Fatalf("should have 1 nodes! %v", m2.Members())
- }
-}
-
-func TestMemberlist_delegateMeta(t *testing.T) {
- c1 := testConfig()
- c2 := testConfig()
- c1.Delegate = &MockDelegate{meta: []byte("web")}
- c2.Delegate = &MockDelegate{meta: []byte("lb")}
-
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m1.Shutdown()
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- _, err = m1.Join([]string{c2.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- yield()
-
- var roles map[string]string
-
- // Check the roles of members of m1
- m1m := m1.Members()
- if len(m1m) != 2 {
- t.Fatalf("bad: %#v", m1m)
- }
-
- roles = make(map[string]string)
- for _, m := range m1m {
- roles[m.Name] = string(m.Meta)
- }
-
- if r := roles[c1.Name]; r != "web" {
- t.Fatalf("bad role for %s: %s", c1.Name, r)
- }
-
- if r := roles[c2.Name]; r != "lb" {
- t.Fatalf("bad role for %s: %s", c2.Name, r)
- }
-
- // Check the roles of members of m2
- m2m := m2.Members()
- if len(m2m) != 2 {
- t.Fatalf("bad: %#v", m2m)
- }
-
- roles = make(map[string]string)
- for _, m := range m2m {
- roles[m.Name] = string(m.Meta)
- }
-
- if r := roles[c1.Name]; r != "web" {
- t.Fatalf("bad role for %s: %s", c1.Name, r)
- }
-
- if r := roles[c2.Name]; r != "lb" {
- t.Fatalf("bad role for %s: %s", c2.Name, r)
- }
-}
-
-func TestMemberlist_delegateMeta_Update(t *testing.T) {
- c1 := testConfig()
- c2 := testConfig()
- mock1 := &MockDelegate{meta: []byte("web")}
- mock2 := &MockDelegate{meta: []byte("lb")}
- c1.Delegate = mock1
- c2.Delegate = mock2
-
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m1.Shutdown()
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- _, err = m1.Join([]string{c2.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- yield()
-
- // Update the meta data roles
- mock1.meta = []byte("api")
- mock2.meta = []byte("db")
-
- m1.UpdateNode(0)
- m2.UpdateNode(0)
- yield()
-
- // Check the updates have propagated
- var roles map[string]string
-
- // Check the roles of members of m1
- m1m := m1.Members()
- if len(m1m) != 2 {
- t.Fatalf("bad: %#v", m1m)
- }
-
- roles = make(map[string]string)
- for _, m := range m1m {
- roles[m.Name] = string(m.Meta)
- }
-
- if r := roles[c1.Name]; r != "api" {
- t.Fatalf("bad role for %s: %s", c1.Name, r)
- }
-
- if r := roles[c2.Name]; r != "db" {
- t.Fatalf("bad role for %s: %s", c2.Name, r)
- }
-
- // Check the roles of members of m2
- m2m := m2.Members()
- if len(m2m) != 2 {
- t.Fatalf("bad: %#v", m2m)
- }
-
- roles = make(map[string]string)
- for _, m := range m2m {
- roles[m.Name] = string(m.Meta)
- }
-
- if r := roles[c1.Name]; r != "api" {
- t.Fatalf("bad role for %s: %s", c1.Name, r)
- }
-
- if r := roles[c2.Name]; r != "db" {
- t.Fatalf("bad role for %s: %s", c2.Name, r)
- }
-}
-
-func TestMemberlist_UserData(t *testing.T) {
- m1, d1 := GetMemberlistDelegate(t)
- d1.state = []byte("something")
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second delegate with things to send
- d2 := &MockDelegate{}
- d2.broadcasts = [][]byte{
- []byte("test"),
- []byte("foobar"),
- }
- d2.state = []byte("my state")
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
- c.GossipInterval = time.Millisecond
- c.PushPullInterval = time.Millisecond
- c.Delegate = d2
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- // Check the hosts
- if m2.NumMembers() != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- // Wait for a little while
- time.Sleep(3 * time.Millisecond)
-
- // Ensure we got the messages
- if len(d1.msgs) != 2 {
- t.Fatalf("should have 2 messages!")
- }
- if !reflect.DeepEqual(d1.msgs[0], []byte("test")) {
- t.Fatalf("bad msg %v", d1.msgs[0])
- }
- if !reflect.DeepEqual(d1.msgs[1], []byte("foobar")) {
- t.Fatalf("bad msg %v", d1.msgs[1])
- }
-
- // Check the push/pull state
- if !reflect.DeepEqual(d1.remoteState, []byte("my state")) {
- t.Fatalf("bad state %s", d1.remoteState)
- }
- if !reflect.DeepEqual(d2.remoteState, []byte("something")) {
- t.Fatalf("bad state %s", d2.remoteState)
- }
-}
-
-func TestMemberlist_SendTo(t *testing.T) {
- m1, d1 := GetMemberlistDelegate(t)
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second delegate with things to send
- d2 := &MockDelegate{}
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
- c.GossipInterval = time.Millisecond
- c.PushPullInterval = time.Millisecond
- c.Delegate = d2
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if m2.NumMembers() != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- // Try to do a direct send
- m2Addr := &net.UDPAddr{IP: addr1,
- Port: c.BindPort}
- if err := m1.SendTo(m2Addr, []byte("ping")); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- m1Addr := &net.UDPAddr{IP: net.ParseIP(m1.config.BindAddr),
- Port: m1.config.BindPort}
- if err := m2.SendTo(m1Addr, []byte("pong")); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Wait for a little while
- time.Sleep(3 * time.Millisecond)
-
- // Ensure we got the messages
- if len(d1.msgs) != 1 {
- t.Fatalf("should have 1 messages!")
- }
- if !reflect.DeepEqual(d1.msgs[0], []byte("pong")) {
- t.Fatalf("bad msg %v", d1.msgs[0])
- }
-
- if len(d2.msgs) != 1 {
- t.Fatalf("should have 1 messages!")
- }
- if !reflect.DeepEqual(d2.msgs[0], []byte("ping")) {
- t.Fatalf("bad msg %v", d2.msgs[0])
- }
-}
-
-func TestMemberlistProtocolVersion(t *testing.T) {
- c := DefaultLANConfig()
- c.BindAddr = getBindAddr().String()
- c.ProtocolVersion = ProtocolVersionMax
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- result := m.ProtocolVersion()
- if result != ProtocolVersionMax {
- t.Fatalf("bad: %d", result)
- }
-}
-
-func TestMemberlist_Join_DeadNode(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.config.TCPTimeout = 50 * time.Millisecond
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second "node", which is just a TCP listener that
- // does not ever respond. This is to test our deadliens
- addr1 := getBindAddr()
- list, err := net.Listen("tcp", fmt.Sprintf("%s:%d", addr1.String(), m1.config.BindPort))
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- defer list.Close()
-
- // Ensure we don't hang forever
- timer := time.AfterFunc(100*time.Millisecond, func() {
- panic("should have timed out by now")
- })
- defer timer.Stop()
-
- num, err := m1.Join([]string{addr1.String()})
- if num != 0 {
- t.Fatalf("unexpected 0: %d", num)
- }
- if err == nil {
- t.Fatal("expect err")
- }
-}
-
-// Tests that nodes running different versions of the protocol can successfully
-// discover each other and add themselves to their respective member lists.
-func TestMemberlist_Join_Prototocol_Compatibility(t *testing.T) {
- testProtocolVersionPair := func(t *testing.T, pv1 uint8, pv2 uint8) {
- c1 := testConfig()
- c1.ProtocolVersion = pv1
- m1, err := NewMemberlistOnOpenPort(c1)
- if err != nil {
- t.Fatalf("failed to start: %v", err)
- }
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- c2 := DefaultLANConfig()
- addr1 := getBindAddr()
- c2.Name = addr1.String()
- c2.BindAddr = addr1.String()
- c2.BindPort = m1.config.BindPort
- c2.ProtocolVersion = pv2
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- // Check the hosts
- if len(m1.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m1.Members())
- }
- }
-
- testProtocolVersionPair(t, 2, 1)
- testProtocolVersionPair(t, 2, 3)
- testProtocolVersionPair(t, 3, 2)
- testProtocolVersionPair(t, 3, 1)
-}
-
-func TestMemberlist_Join_IPv6(t *testing.T) {
- // Since this binds to all interfaces we need to exclude other tests
- // from grabbing an interface.
- bindLock.Lock()
- defer bindLock.Unlock()
-
- c1 := DefaultLANConfig()
- c1.Name = "A"
- c1.BindAddr = "[::1]"
- var m1 *Memberlist
- var err error
- for i := 0; i < 100; i++ {
- c1.BindPort = 23456 + i
- m1, err = Create(c1)
- if err == nil {
- break
- }
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m1.Shutdown()
-
- // Create a second node
- c2 := DefaultLANConfig()
- c2.Name = "B"
- c2.BindAddr = "[::1]"
- var m2 *Memberlist
- for i := 0; i < 100; i++ {
- c2.BindPort = c1.BindPort + 1 + i
- m2, err = Create(c2)
- if err == nil {
- break
- }
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{fmt.Sprintf("%s:%d", m1.config.BindAddr, 23456)})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- if len(m1.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-}
-
-func TestAdvertiseAddr(t *testing.T) {
- c := testConfig()
- c.AdvertiseAddr = "127.0.1.100"
- c.AdvertisePort = 23456
-
- m, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- yield()
-
- members := m.Members()
- if len(members) != 1 {
- t.Fatalf("bad number of members")
- }
-
- if bytes.Compare(members[0].Addr, []byte{127, 0, 1, 100}) != 0 {
- t.Fatalf("bad: %#v", members[0])
- }
-
- if members[0].Port != 23456 {
- t.Fatalf("bad: %#v", members[0])
- }
-}
-
-type MockConflict struct {
- existing *Node
- other *Node
-}
-
-func (m *MockConflict) NotifyConflict(existing, other *Node) {
- m.existing = existing
- m.other = other
-}
-
-func TestMemberlist_conflictDelegate(t *testing.T) {
- c1 := testConfig()
- c2 := testConfig()
- mock := &MockConflict{}
- c1.Conflict = mock
-
- // Ensure name conflict
- c2.Name = c1.Name
-
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m1.Shutdown()
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- _, err = m1.Join([]string{c2.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- yield()
-
- // Ensure we were notified
- if mock.existing == nil || mock.other == nil {
- t.Fatalf("should get notified")
- }
- if mock.existing.Name != mock.other.Name {
- t.Fatalf("bad: %v %v", mock.existing, mock.other)
- }
-}
-
-type MockPing struct {
- other *Node
- rtt time.Duration
- payload []byte
-}
-
-func (m *MockPing) NotifyPingComplete(other *Node, rtt time.Duration, payload []byte) {
- m.other = other
- m.rtt = rtt
- m.payload = payload
-}
-
-const DEFAULT_PAYLOAD = "whatever"
-
-func (m *MockPing) AckPayload() []byte {
- return []byte(DEFAULT_PAYLOAD)
-}
-
-func TestMemberlist_PingDelegate(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.config.Ping = &MockPing{}
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node
- c := DefaultLANConfig()
- addr1 := getBindAddr()
- c.Name = addr1.String()
- c.BindAddr = addr1.String()
- c.BindPort = m1.config.BindPort
- c.ProbeInterval = time.Millisecond
- mock := &MockPing{}
- c.Ping = mock
-
- m2, err := Create(c)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- _, err = m2.Join([]string{m1.config.BindAddr})
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- yield()
-
- // Ensure we were notified
- if mock.other == nil {
- t.Fatalf("should get notified")
- }
-
- if !reflect.DeepEqual(mock.other, m1.LocalNode()) {
- t.Fatalf("not notified about the correct node; expected: %+v; actual: %+v",
- m2.LocalNode(), mock.other)
- }
-
- if mock.rtt <= 0 {
- t.Fatalf("rtt should be greater than 0")
- }
-
- if bytes.Compare(mock.payload, []byte(DEFAULT_PAYLOAD)) != 0 {
- t.Fatalf("incorrect payload. expected: %v; actual: %v", []byte(DEFAULT_PAYLOAD), mock.payload)
- }
-}
-
-func TestMemberlist_EncryptedGossipTransition(t *testing.T) {
- m1 := GetMemberlist(t)
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- // Create a second node with the first stage of gossip transition settings
- conf2 := DefaultLANConfig()
- addr2 := getBindAddr()
- conf2.Name = addr2.String()
- conf2.BindAddr = addr2.String()
- conf2.BindPort = m1.config.BindPort
- conf2.GossipInterval = time.Millisecond
- conf2.SecretKey = []byte("Hi16ZXu2lNCRVwtr20khAg==")
- conf2.GossipVerifyIncoming = false
- conf2.GossipVerifyOutgoing = false
-
- m2, err := Create(conf2)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m2.Shutdown()
-
- // Join the second node. m1 has no encryption while m2 has encryption configured and
- // can receive encrypted gossip, but will not encrypt outgoing gossip.
- num, err := m2.Join([]string{m1.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m2.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
- if m2.estNumNodes() != 2 {
- t.Fatalf("should have 2 nodes! %v", m2.Members())
- }
-
- // Leave with the first node
- m1.Leave(time.Second)
-
- // Wait for leave
- time.Sleep(10 * time.Millisecond)
-
- // Create a third node that has the second stage of gossip transition settings
- conf3 := DefaultLANConfig()
- addr3 := getBindAddr()
- conf3.Name = addr3.String()
- conf3.BindAddr = addr3.String()
- conf3.BindPort = m1.config.BindPort
- conf3.GossipInterval = time.Millisecond
- conf3.SecretKey = conf2.SecretKey
- conf3.GossipVerifyIncoming = false
-
- m3, err := Create(conf3)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m3.Shutdown()
-
- // Join the third node to the second node. At this step, both nodes have encryption
- // configured but only m3 is sending encrypted gossip.
- num, err = m3.Join([]string{m2.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m3.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m3.Members())
-
- }
- if m3.estNumNodes() != 2 {
- t.Fatalf("should have 2 nodes! %v", m3.Members())
- }
-
- // Leave with the second node
- m2.Leave(time.Second)
-
- // Wait for leave
- time.Sleep(10 * time.Millisecond)
-
- // Create a fourth node that has the second stage of gossip transition settings
- conf4 := DefaultLANConfig()
- addr4 := getBindAddr()
- conf4.Name = addr4.String()
- conf4.BindAddr = addr4.String()
- conf4.BindPort = m3.config.BindPort
- conf4.GossipInterval = time.Millisecond
- conf4.SecretKey = conf2.SecretKey
-
- m4, err := Create(conf4)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- defer m4.Shutdown()
-
- // Join the fourth node to the third node. At this step, both m3 and m4 are speaking
- // encrypted gossip and m3 is still accepting insecure gossip.
- num, err = m4.Join([]string{m3.config.BindAddr})
- if num != 1 {
- t.Fatalf("unexpected 1: %d", num)
- }
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- // Check the hosts
- if len(m4.Members()) != 2 {
- t.Fatalf("should have 2 nodes! %v", m4.Members())
-
- }
- if m4.estNumNodes() != 2 {
- t.Fatalf("should have 2 nodes! %v", m4.Members())
- }
-}
-
-// Consul bug, rapid restart (before failure detection),
-// with an updated meta data. Should be at incarnation 1 for
-// both.
-//
-// This test is uncommented because it requires that either we
-// can rebind the socket (SO_REUSEPORT) which Go does not allow,
-// OR we must disable the address conflict checking in memberlist.
-// I just comment out that code to test this case.
-//
-//func TestMemberlist_Restart_delegateMeta_Update(t *testing.T) {
-// c1 := testConfig()
-// c2 := testConfig()
-// mock1 := &MockDelegate{meta: []byte("web")}
-// mock2 := &MockDelegate{meta: []byte("lb")}
-// c1.Delegate = mock1
-// c2.Delegate = mock2
-
-// m1, err := Create(c1)
-// if err != nil {
-// t.Fatalf("err: %s", err)
-// }
-// defer m1.Shutdown()
-
-// m2, err := Create(c2)
-// if err != nil {
-// t.Fatalf("err: %s", err)
-// }
-// defer m2.Shutdown()
-
-// _, err = m1.Join([]string{c2.BindAddr})
-// if err != nil {
-// t.Fatalf("err: %s", err)
-// }
-
-// yield()
-
-// // Recreate m1 with updated meta
-// m1.Shutdown()
-// c3 := testConfig()
-// c3.Name = c1.Name
-// c3.Delegate = mock1
-// c3.GossipInterval = time.Millisecond
-// mock1.meta = []byte("api")
-
-// m1, err = Create(c3)
-// if err != nil {
-// t.Fatalf("err: %s", err)
-// }
-// defer m1.Shutdown()
-
-// _, err = m1.Join([]string{c2.BindAddr})
-// if err != nil {
-// t.Fatalf("err: %s", err)
-// }
-
-// yield()
-// yield()
-
-// // Check the updates have propagated
-// var roles map[string]string
-
-// // Check the roles of members of m1
-// m1m := m1.Members()
-// if len(m1m) != 2 {
-// t.Fatalf("bad: %#v", m1m)
-// }
-
-// roles = make(map[string]string)
-// for _, m := range m1m {
-// roles[m.Name] = string(m.Meta)
-// }
-
-// if r := roles[c1.Name]; r != "api" {
-// t.Fatalf("bad role for %s: %s", c1.Name, r)
-// }
-
-// if r := roles[c2.Name]; r != "lb" {
-// t.Fatalf("bad role for %s: %s", c2.Name, r)
-// }
-
-// // Check the roles of members of m2
-// m2m := m2.Members()
-// if len(m2m) != 2 {
-// t.Fatalf("bad: %#v", m2m)
-// }
-
-// roles = make(map[string]string)
-// for _, m := range m2m {
-// roles[m.Name] = string(m.Meta)
-// }
-
-// if r := roles[c1.Name]; r != "api" {
-// t.Fatalf("bad role for %s: %s", c1.Name, r)
-// }
-
-// if r := roles[c2.Name]; r != "lb" {
-// t.Fatalf("bad role for %s: %s", c2.Name, r)
-// }
-//}
diff --git a/vendor/github.com/hashicorp/memberlist/net_test.go b/vendor/github.com/hashicorp/memberlist/net_test.go
deleted file mode 100644
index 860535855..000000000
--- a/vendor/github.com/hashicorp/memberlist/net_test.go
+++ /dev/null
@@ -1,814 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "encoding/binary"
- "fmt"
- "io"
- "log"
- "net"
- "reflect"
- "strings"
- "testing"
- "time"
-
- "github.com/hashicorp/go-msgpack/codec"
-)
-
-// As a regression we left this test very low-level and network-ey, even after
-// we abstracted the transport. We added some basic network-free transport tests
-// in transport_test.go to prove that we didn't hard code some network stuff
-// outside of NetTransport.
-
-func TestHandleCompoundPing(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Encode a ping
- ping := ping{SeqNo: 42}
- buf, err := encode(pingMsg, ping)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Make a compound message
- compound := makeCompoundMessage([][]byte{buf.Bytes(), buf.Bytes(), buf.Bytes()})
-
- // Send compound version
- addr := &net.UDPAddr{IP: net.ParseIP(m.config.BindAddr), Port: m.config.BindPort}
- udp.WriteTo(compound.Bytes(), addr)
-
- // Wait for responses
- doneCh := make(chan struct{}, 1)
- go func() {
- select {
- case <-doneCh:
- case <-time.After(2 * time.Second):
- panic("timeout")
- }
- }()
-
- for i := 0; i < 3; i++ {
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- msgType := messageType(in[0])
- if msgType != ackRespMsg {
- t.Fatalf("bad response %v", in)
- }
-
- var ack ackResp
- if err := decode(in[1:], &ack); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- if ack.SeqNo != 42 {
- t.Fatalf("bad sequence no")
- }
- }
-
- doneCh <- struct{}{}
-}
-
-func TestHandlePing(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Encode a ping
- ping := ping{SeqNo: 42}
- buf, err := encode(pingMsg, ping)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Send
- addr := &net.UDPAddr{IP: net.ParseIP(m.config.BindAddr), Port: m.config.BindPort}
- udp.WriteTo(buf.Bytes(), addr)
-
- // Wait for response
- doneCh := make(chan struct{}, 1)
- go func() {
- select {
- case <-doneCh:
- case <-time.After(2 * time.Second):
- panic("timeout")
- }
- }()
-
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- msgType := messageType(in[0])
- if msgType != ackRespMsg {
- t.Fatalf("bad response %v", in)
- }
-
- var ack ackResp
- if err := decode(in[1:], &ack); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- if ack.SeqNo != 42 {
- t.Fatalf("bad sequence no")
- }
-
- doneCh <- struct{}{}
-}
-
-func TestHandlePing_WrongNode(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Encode a ping, wrong node!
- ping := ping{SeqNo: 42, Node: m.config.Name + "-bad"}
- buf, err := encode(pingMsg, ping)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Send
- addr := &net.UDPAddr{IP: net.ParseIP(m.config.BindAddr), Port: m.config.BindPort}
- udp.WriteTo(buf.Bytes(), addr)
-
- // Wait for response
- udp.SetDeadline(time.Now().Add(50 * time.Millisecond))
- in := make([]byte, 1500)
- _, _, err = udp.ReadFrom(in)
-
- // Should get an i/o timeout
- if err == nil {
- t.Fatalf("expected err %s", err)
- }
-}
-
-func TestHandleIndirectPing(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Encode an indirect ping
- ind := indirectPingReq{
- SeqNo: 100,
- Target: net.ParseIP(m.config.BindAddr),
- Port: uint16(m.config.BindPort),
- }
- buf, err := encode(indirectPingMsg, &ind)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Send
- addr := &net.UDPAddr{IP: net.ParseIP(m.config.BindAddr), Port: m.config.BindPort}
- udp.WriteTo(buf.Bytes(), addr)
-
- // Wait for response
- doneCh := make(chan struct{}, 1)
- go func() {
- select {
- case <-doneCh:
- case <-time.After(2 * time.Second):
- panic("timeout")
- }
- }()
-
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- msgType := messageType(in[0])
- if msgType != ackRespMsg {
- t.Fatalf("bad response %v", in)
- }
-
- var ack ackResp
- if err := decode(in[1:], &ack); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- if ack.SeqNo != 100 {
- t.Fatalf("bad sequence no")
- }
-
- doneCh <- struct{}{}
-}
-
-func TestTCPPing(t *testing.T) {
- var tcp *net.TCPListener
- var tcpAddr *net.TCPAddr
- for port := 60000; port < 61000; port++ {
- tcpAddr = &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: port}
- tcpLn, err := net.ListenTCP("tcp", tcpAddr)
- if err == nil {
- tcp = tcpLn
- break
- }
- }
- if tcp == nil {
- t.Fatalf("no tcp listener")
- }
-
- // Note that tcp gets closed in the last test, so we avoid a deferred
- // Close() call here.
-
- m := GetMemberlist(t)
- defer m.Shutdown()
- pingTimeout := m.config.ProbeInterval
- pingTimeMax := m.config.ProbeInterval + 10*time.Millisecond
-
- // Do a normal round trip.
- pingOut := ping{SeqNo: 23, Node: "mongo"}
- go func() {
- tcp.SetDeadline(time.Now().Add(pingTimeMax))
- conn, err := tcp.AcceptTCP()
- if err != nil {
- t.Fatalf("failed to connect: %s", err)
- }
- defer conn.Close()
-
- msgType, _, dec, err := m.readStream(conn)
- if err != nil {
- t.Fatalf("failed to read ping: %s", err)
- }
-
- if msgType != pingMsg {
- t.Fatalf("expecting ping, got message type (%d)", msgType)
- }
-
- var pingIn ping
- if err := dec.Decode(&pingIn); err != nil {
- t.Fatalf("failed to decode ping: %s", err)
- }
-
- if pingIn.SeqNo != pingOut.SeqNo {
- t.Fatalf("sequence number isn't correct (%d) vs (%d)", pingIn.SeqNo, pingOut.SeqNo)
- }
-
- if pingIn.Node != pingOut.Node {
- t.Fatalf("node name isn't correct (%s) vs (%s)", pingIn.Node, pingOut.Node)
- }
-
- ack := ackResp{pingIn.SeqNo, nil}
- out, err := encode(ackRespMsg, &ack)
- if err != nil {
- t.Fatalf("failed to encode ack: %s", err)
- }
-
- err = m.rawSendMsgStream(conn, out.Bytes())
- if err != nil {
- t.Fatalf("failed to send ack: %s", err)
- }
- }()
- deadline := time.Now().Add(pingTimeout)
- didContact, err := m.sendPingAndWaitForAck(tcpAddr.String(), pingOut, deadline)
- if err != nil {
- t.Fatalf("error trying to ping: %s", err)
- }
- if !didContact {
- t.Fatalf("expected successful ping")
- }
-
- // Make sure a mis-matched sequence number is caught.
- go func() {
- tcp.SetDeadline(time.Now().Add(pingTimeMax))
- conn, err := tcp.AcceptTCP()
- if err != nil {
- t.Fatalf("failed to connect: %s", err)
- }
- defer conn.Close()
-
- _, _, dec, err := m.readStream(conn)
- if err != nil {
- t.Fatalf("failed to read ping: %s", err)
- }
-
- var pingIn ping
- if err := dec.Decode(&pingIn); err != nil {
- t.Fatalf("failed to decode ping: %s", err)
- }
-
- ack := ackResp{pingIn.SeqNo + 1, nil}
- out, err := encode(ackRespMsg, &ack)
- if err != nil {
- t.Fatalf("failed to encode ack: %s", err)
- }
-
- err = m.rawSendMsgStream(conn, out.Bytes())
- if err != nil {
- t.Fatalf("failed to send ack: %s", err)
- }
- }()
- deadline = time.Now().Add(pingTimeout)
- didContact, err = m.sendPingAndWaitForAck(tcpAddr.String(), pingOut, deadline)
- if err == nil || !strings.Contains(err.Error(), "Sequence number") {
- t.Fatalf("expected an error from mis-matched sequence number")
- }
- if didContact {
- t.Fatalf("expected failed ping")
- }
-
- // Make sure an unexpected message type is handled gracefully.
- go func() {
- tcp.SetDeadline(time.Now().Add(pingTimeMax))
- conn, err := tcp.AcceptTCP()
- if err != nil {
- t.Fatalf("failed to connect: %s", err)
- }
- defer conn.Close()
-
- _, _, _, err = m.readStream(conn)
- if err != nil {
- t.Fatalf("failed to read ping: %s", err)
- }
-
- bogus := indirectPingReq{}
- out, err := encode(indirectPingMsg, &bogus)
- if err != nil {
- t.Fatalf("failed to encode bogus msg: %s", err)
- }
-
- err = m.rawSendMsgStream(conn, out.Bytes())
- if err != nil {
- t.Fatalf("failed to send bogus msg: %s", err)
- }
- }()
- deadline = time.Now().Add(pingTimeout)
- didContact, err = m.sendPingAndWaitForAck(tcpAddr.String(), pingOut, deadline)
- if err == nil || !strings.Contains(err.Error(), "Unexpected msgType") {
- t.Fatalf("expected an error from bogus message")
- }
- if didContact {
- t.Fatalf("expected failed ping")
- }
-
- // Make sure failed I/O respects the deadline. In this case we try the
- // common case of the receiving node being totally down.
- tcp.Close()
- deadline = time.Now().Add(pingTimeout)
- startPing := time.Now()
- didContact, err = m.sendPingAndWaitForAck(tcpAddr.String(), pingOut, deadline)
- pingTime := time.Now().Sub(startPing)
- if err != nil {
- t.Fatalf("expected no error during ping on closed socket, got: %s", err)
- }
- if didContact {
- t.Fatalf("expected failed ping")
- }
- if pingTime > pingTimeMax {
- t.Fatalf("took too long to fail ping, %9.6f", pingTime.Seconds())
- }
-}
-
-func TestTCPPushPull(t *testing.T) {
- m := GetMemberlist(t)
- defer m.Shutdown()
- m.nodes = append(m.nodes, &nodeState{
- Node: Node{
- Name: "Test 0",
- Addr: net.ParseIP(m.config.BindAddr),
- Port: uint16(m.config.BindPort),
- },
- Incarnation: 0,
- State: stateSuspect,
- StateChange: time.Now().Add(-1 * time.Second),
- })
-
- addr := fmt.Sprintf("%s:%d", m.config.BindAddr, m.config.BindPort)
- conn, err := net.Dial("tcp", addr)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- defer conn.Close()
-
- localNodes := make([]pushNodeState, 3)
- localNodes[0].Name = "Test 0"
- localNodes[0].Addr = net.ParseIP(m.config.BindAddr)
- localNodes[0].Port = uint16(m.config.BindPort)
- localNodes[0].Incarnation = 1
- localNodes[0].State = stateAlive
- localNodes[1].Name = "Test 1"
- localNodes[1].Addr = net.ParseIP(m.config.BindAddr)
- localNodes[1].Port = uint16(m.config.BindPort)
- localNodes[1].Incarnation = 1
- localNodes[1].State = stateAlive
- localNodes[2].Name = "Test 2"
- localNodes[2].Addr = net.ParseIP(m.config.BindAddr)
- localNodes[2].Port = uint16(m.config.BindPort)
- localNodes[2].Incarnation = 1
- localNodes[2].State = stateAlive
-
- // Send our node state
- header := pushPullHeader{Nodes: 3}
- hd := codec.MsgpackHandle{}
- enc := codec.NewEncoder(conn, &hd)
-
- // Send the push/pull indicator
- conn.Write([]byte{byte(pushPullMsg)})
-
- if err := enc.Encode(&header); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- for i := 0; i < header.Nodes; i++ {
- if err := enc.Encode(&localNodes[i]); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- }
-
- // Read the message type
- var msgType messageType
- if err := binary.Read(conn, binary.BigEndian, &msgType); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- var bufConn io.Reader = conn
- msghd := codec.MsgpackHandle{}
- dec := codec.NewDecoder(bufConn, &msghd)
-
- // Check if we have a compressed message
- if msgType == compressMsg {
- var c compress
- if err := dec.Decode(&c); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- decomp, err := decompressBuffer(&c)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Reset the message type
- msgType = messageType(decomp[0])
-
- // Create a new bufConn
- bufConn = bytes.NewReader(decomp[1:])
-
- // Create a new decoder
- dec = codec.NewDecoder(bufConn, &hd)
- }
-
- // Quit if not push/pull
- if msgType != pushPullMsg {
- t.Fatalf("bad message type")
- }
-
- if err := dec.Decode(&header); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Allocate space for the transfer
- remoteNodes := make([]pushNodeState, header.Nodes)
-
- // Try to decode all the states
- for i := 0; i < header.Nodes; i++ {
- if err := dec.Decode(&remoteNodes[i]); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- }
-
- if len(remoteNodes) != 1 {
- t.Fatalf("bad response")
- }
-
- n := &remoteNodes[0]
- if n.Name != "Test 0" {
- t.Fatalf("bad name")
- }
- if bytes.Compare(n.Addr, net.ParseIP(m.config.BindAddr)) != 0 {
- t.Fatal("bad addr")
- }
- if n.Incarnation != 0 {
- t.Fatal("bad incarnation")
- }
- if n.State != stateSuspect {
- t.Fatal("bad state")
- }
-}
-
-func TestSendMsg_Piggyback(t *testing.T) {
- m := GetMemberlist(t)
- defer m.Shutdown()
-
- // Add a message to be broadcast
- a := alive{
- Incarnation: 10,
- Node: "rand",
- Addr: []byte{127, 0, 0, 255},
- Meta: nil,
- }
- m.encodeAndBroadcast("rand", aliveMsg, &a)
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- // Encode a ping
- ping := ping{SeqNo: 42}
- buf, err := encode(pingMsg, ping)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- // Send
- addr := &net.UDPAddr{IP: net.ParseIP(m.config.BindAddr), Port: m.config.BindPort}
- udp.WriteTo(buf.Bytes(), addr)
-
- // Wait for response
- doneCh := make(chan struct{}, 1)
- go func() {
- select {
- case <-doneCh:
- case <-time.After(2 * time.Second):
- panic("timeout")
- }
- }()
-
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- msgType := messageType(in[0])
- if msgType != compoundMsg {
- t.Fatalf("bad response %v", in)
- }
-
- // get the parts
- trunc, parts, err := decodeCompoundMessage(in[1:])
- if trunc != 0 {
- t.Fatalf("unexpected truncation")
- }
- if len(parts) != 2 {
- t.Fatalf("unexpected parts %v", parts)
- }
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- var ack ackResp
- if err := decode(parts[0][1:], &ack); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- if ack.SeqNo != 42 {
- t.Fatalf("bad sequence no")
- }
-
- var aliveout alive
- if err := decode(parts[1][1:], &aliveout); err != nil {
- t.Fatalf("unexpected err %s", err)
- }
-
- if aliveout.Node != "rand" || aliveout.Incarnation != 10 {
- t.Fatalf("bad mesg")
- }
-
- doneCh <- struct{}{}
-}
-
-func TestEncryptDecryptState(t *testing.T) {
- state := []byte("this is our internal state...")
- config := &Config{
- SecretKey: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- ProtocolVersion: ProtocolVersionMax,
- }
-
- m, err := Create(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m.Shutdown()
-
- crypt, err := m.encryptLocalState(state)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Create reader, seek past the type byte
- buf := bytes.NewReader(crypt)
- buf.Seek(1, 0)
-
- plain, err := m.decryptRemoteState(buf)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if !reflect.DeepEqual(state, plain) {
- t.Fatalf("Decrypt failed: %v", plain)
- }
-}
-
-func TestRawSendUdp_CRC(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Pass a nil node with no nodes registered, should result in no checksum
- payload := []byte{3, 3, 3, 3}
- m.rawSendMsgPacket(udp.LocalAddr().String(), nil, payload)
-
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- if len(in) != 4 {
- t.Fatalf("bad: %v", in)
- }
-
- // Pass a non-nil node with PMax >= 5, should result in a checksum
- m.rawSendMsgPacket(udp.LocalAddr().String(), &Node{PMax: 5}, payload)
-
- in = make([]byte, 1500)
- n, _, err = udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- if len(in) != 9 {
- t.Fatalf("bad: %v", in)
- }
-
- // Register a node with PMax >= 5 to be looked up, should result in a checksum
- m.nodeMap["127.0.0.1"] = &nodeState{
- Node: Node{PMax: 5},
- }
- m.rawSendMsgPacket(udp.LocalAddr().String(), nil, payload)
-
- in = make([]byte, 1500)
- n, _, err = udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- if len(in) != 9 {
- t.Fatalf("bad: %v", in)
- }
-}
-
-func TestIngestPacket_CRC(t *testing.T) {
- m := GetMemberlist(t)
- m.config.EnableCompression = false
- defer m.Shutdown()
-
- var udp *net.UDPConn
- for port := 60000; port < 61000; port++ {
- udpAddr := fmt.Sprintf("127.0.0.1:%d", port)
- udpLn, err := net.ListenPacket("udp", udpAddr)
- if err == nil {
- udp = udpLn.(*net.UDPConn)
- break
- }
- }
-
- if udp == nil {
- t.Fatalf("no udp listener")
- }
-
- // Get a message with a checksum
- payload := []byte{3, 3, 3, 3}
- m.rawSendMsgPacket(udp.LocalAddr().String(), &Node{PMax: 5}, payload)
-
- in := make([]byte, 1500)
- n, _, err := udp.ReadFrom(in)
- if err != nil {
- t.Fatalf("unexpected err %s", err)
- }
- in = in[0:n]
-
- if len(in) != 9 {
- t.Fatalf("bad: %v", in)
- }
-
- // Corrupt the checksum
- in[1] <<= 1
-
- logs := &bytes.Buffer{}
- logger := log.New(logs, "", 0)
- m.logger = logger
- m.ingestPacket(in, udp.LocalAddr(), time.Now())
-
- if !strings.Contains(logs.String(), "invalid checksum") {
- t.Fatalf("bad: %s", logs.String())
- }
-}
-
-func TestGossip_MismatchedKeys(t *testing.T) {
- c1 := testConfig()
- c2 := testConfig()
-
- // Create two agents with different gossip keys
- c1.SecretKey = []byte("4W6DGn2VQVqDEceOdmuRTQ==")
- c2.SecretKey = []byte("XhX/w702/JKKK7/7OtM9Ww==")
-
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m1.Shutdown()
-
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
- defer m2.Shutdown()
-
- // Make sure we get this error on the joining side
- _, err = m2.Join([]string{c1.BindAddr})
- if err == nil || !strings.Contains(err.Error(), "No installed keys could decrypt the message") {
- t.Fatalf("bad: %s", err)
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/queue_test.go b/vendor/github.com/hashicorp/memberlist/queue_test.go
deleted file mode 100644
index 765a3b53d..000000000
--- a/vendor/github.com/hashicorp/memberlist/queue_test.go
+++ /dev/null
@@ -1,172 +0,0 @@
-package memberlist
-
-import (
- "testing"
-)
-
-func TestTransmitLimited_Queue(t *testing.T) {
- q := &TransmitLimitedQueue{RetransmitMult: 1, NumNodes: func() int { return 1 }}
- q.QueueBroadcast(&memberlistBroadcast{"test", nil, nil})
- q.QueueBroadcast(&memberlistBroadcast{"foo", nil, nil})
- q.QueueBroadcast(&memberlistBroadcast{"bar", nil, nil})
-
- if len(q.bcQueue) != 3 {
- t.Fatalf("bad len")
- }
- if q.bcQueue[0].b.(*memberlistBroadcast).node != "test" {
- t.Fatalf("missing test")
- }
- if q.bcQueue[1].b.(*memberlistBroadcast).node != "foo" {
- t.Fatalf("missing foo")
- }
- if q.bcQueue[2].b.(*memberlistBroadcast).node != "bar" {
- t.Fatalf("missing bar")
- }
-
- // Should invalidate previous message
- q.QueueBroadcast(&memberlistBroadcast{"test", nil, nil})
-
- if len(q.bcQueue) != 3 {
- t.Fatalf("bad len")
- }
- if q.bcQueue[0].b.(*memberlistBroadcast).node != "foo" {
- t.Fatalf("missing foo")
- }
- if q.bcQueue[1].b.(*memberlistBroadcast).node != "bar" {
- t.Fatalf("missing bar")
- }
- if q.bcQueue[2].b.(*memberlistBroadcast).node != "test" {
- t.Fatalf("missing test")
- }
-}
-
-func TestTransmitLimited_GetBroadcasts(t *testing.T) {
- q := &TransmitLimitedQueue{RetransmitMult: 3, NumNodes: func() int { return 10 }}
-
- // 18 bytes per message
- q.QueueBroadcast(&memberlistBroadcast{"test", []byte("1. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"foo", []byte("2. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"bar", []byte("3. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"baz", []byte("4. this is a test."), nil})
-
- // 2 byte overhead per message, should get all 4 messages
- all := q.GetBroadcasts(2, 80)
- if len(all) != 4 {
- t.Fatalf("missing messages: %v", all)
- }
-
- // 3 byte overhead, should only get 3 messages back
- partial := q.GetBroadcasts(3, 80)
- if len(partial) != 3 {
- t.Fatalf("missing messages: %v", partial)
- }
-}
-
-func TestTransmitLimited_GetBroadcasts_Limit(t *testing.T) {
- q := &TransmitLimitedQueue{RetransmitMult: 1, NumNodes: func() int { return 10 }}
-
- // 18 bytes per message
- q.QueueBroadcast(&memberlistBroadcast{"test", []byte("1. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"foo", []byte("2. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"bar", []byte("3. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"baz", []byte("4. this is a test."), nil})
-
- // 3 byte overhead, should only get 3 messages back
- partial1 := q.GetBroadcasts(3, 80)
- if len(partial1) != 3 {
- t.Fatalf("missing messages: %v", partial1)
- }
-
- partial2 := q.GetBroadcasts(3, 80)
- if len(partial2) != 3 {
- t.Fatalf("missing messages: %v", partial2)
- }
-
- // Only two not expired
- partial3 := q.GetBroadcasts(3, 80)
- if len(partial3) != 2 {
- t.Fatalf("missing messages: %v", partial3)
- }
-
- // Should get nothing
- partial5 := q.GetBroadcasts(3, 80)
- if len(partial5) != 0 {
- t.Fatalf("missing messages: %v", partial5)
- }
-}
-
-func TestTransmitLimited_Prune(t *testing.T) {
- q := &TransmitLimitedQueue{RetransmitMult: 1, NumNodes: func() int { return 10 }}
-
- ch1 := make(chan struct{}, 1)
- ch2 := make(chan struct{}, 1)
-
- // 18 bytes per message
- q.QueueBroadcast(&memberlistBroadcast{"test", []byte("1. this is a test."), ch1})
- q.QueueBroadcast(&memberlistBroadcast{"foo", []byte("2. this is a test."), ch2})
- q.QueueBroadcast(&memberlistBroadcast{"bar", []byte("3. this is a test."), nil})
- q.QueueBroadcast(&memberlistBroadcast{"baz", []byte("4. this is a test."), nil})
-
- // Keep only 2
- q.Prune(2)
-
- if q.NumQueued() != 2 {
- t.Fatalf("bad len")
- }
-
- // Should notify the first two
- select {
- case <-ch1:
- default:
- t.Fatalf("expected invalidation")
- }
- select {
- case <-ch2:
- default:
- t.Fatalf("expected invalidation")
- }
-
- if q.bcQueue[0].b.(*memberlistBroadcast).node != "bar" {
- t.Fatalf("missing bar")
- }
- if q.bcQueue[1].b.(*memberlistBroadcast).node != "baz" {
- t.Fatalf("missing baz")
- }
-}
-
-func TestLimitedBroadcastSort(t *testing.T) {
- bc := limitedBroadcasts([]*limitedBroadcast{
- &limitedBroadcast{
- transmits: 0,
- },
- &limitedBroadcast{
- transmits: 10,
- },
- &limitedBroadcast{
- transmits: 3,
- },
- &limitedBroadcast{
- transmits: 4,
- },
- &limitedBroadcast{
- transmits: 7,
- },
- })
- bc.Sort()
-
- if bc[0].transmits != 10 {
- t.Fatalf("bad val %v", bc[0])
- }
- if bc[1].transmits != 7 {
- t.Fatalf("bad val %v", bc[7])
- }
- if bc[2].transmits != 4 {
- t.Fatalf("bad val %v", bc[2])
- }
- if bc[3].transmits != 3 {
- t.Fatalf("bad val %v", bc[3])
- }
- if bc[4].transmits != 0 {
- t.Fatalf("bad val %v", bc[4])
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/security_test.go b/vendor/github.com/hashicorp/memberlist/security_test.go
deleted file mode 100644
index 15fa4aa8e..000000000
--- a/vendor/github.com/hashicorp/memberlist/security_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "reflect"
- "testing"
-)
-
-func TestPKCS7(t *testing.T) {
- for i := 0; i <= 255; i++ {
- // Make a buffer of size i
- buf := []byte{}
- for j := 0; j < i; j++ {
- buf = append(buf, byte(i))
- }
-
- // Copy to bytes buffer
- inp := bytes.NewBuffer(nil)
- inp.Write(buf)
-
- // Pad this out
- pkcs7encode(inp, 0, 16)
-
- // Unpad
- dec := pkcs7decode(inp.Bytes(), 16)
-
- // Ensure equivilence
- if !reflect.DeepEqual(buf, dec) {
- t.Fatalf("mismatch: %v %v", buf, dec)
- }
- }
-
-}
-
-func TestEncryptDecrypt_V0(t *testing.T) {
- encryptDecryptVersioned(0, t)
-}
-
-func TestEncryptDecrypt_V1(t *testing.T) {
- encryptDecryptVersioned(1, t)
-}
-
-func encryptDecryptVersioned(vsn encryptionVersion, t *testing.T) {
- k1 := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
- plaintext := []byte("this is a plain text message")
- extra := []byte("random data")
-
- var buf bytes.Buffer
- err := encryptPayload(vsn, k1, plaintext, extra, &buf)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- expLen := encryptedLength(vsn, len(plaintext))
- if buf.Len() != expLen {
- t.Fatalf("output length is unexpected %d %d %d", len(plaintext), buf.Len(), expLen)
- }
-
- msg, err := decryptPayload([][]byte{k1}, buf.Bytes(), extra)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- cmp := bytes.Compare(msg, plaintext)
- if cmp != 0 {
- t.Errorf("len %d %v", len(msg), msg)
- t.Errorf("len %d %v", len(plaintext), plaintext)
- t.Fatalf("encrypt/decrypt failed! %d '%s' '%s'", cmp, msg, plaintext)
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/state_test.go b/vendor/github.com/hashicorp/memberlist/state_test.go
deleted file mode 100644
index 71e93ca4e..000000000
--- a/vendor/github.com/hashicorp/memberlist/state_test.go
+++ /dev/null
@@ -1,1900 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "fmt"
- "net"
- "testing"
- "time"
-)
-
-func HostMemberlist(host string, t *testing.T, f func(*Config)) *Memberlist {
- c := DefaultLANConfig()
- c.Name = host
- c.BindAddr = host
- if f != nil {
- f(c)
- }
-
- m, err := newMemberlist(c)
- if err != nil {
- t.Fatalf("failed to get memberlist: %s", err)
- }
- return m
-}
-
-func TestMemberList_Probe(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 10 * time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, nil)
-
- a1 := alive{
- Node: addr1.String(),
- Addr: []byte(addr1),
- Port: uint16(m1.config.BindPort),
- Incarnation: 1,
- }
- m1.aliveNode(&a1, nil, true)
- a2 := alive{
- Node: addr2.String(),
- Addr: []byte(addr2),
- Port: uint16(m2.config.BindPort),
- Incarnation: 1,
- }
- m1.aliveNode(&a2, nil, false)
-
- // should ping addr2
- m1.probe()
-
- // Should not be marked suspect
- n := m1.nodeMap[addr2.String()]
- if n.State != stateAlive {
- t.Fatalf("Expect node to be alive")
- }
-
- // Should increment seqno
- if m1.sequenceNum != 1 {
- t.Fatalf("bad seqno %v", m2.sequenceNum)
- }
-}
-
-func TestMemberList_ProbeNode_Suspect(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 10 * time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, nil)
- m3 := HostMemberlist(addr3.String(), t, nil)
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
- a4 := alive{Node: addr4.String(), Addr: ip4, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a4, nil, false)
-
- n := m1.nodeMap[addr4.String()]
- m1.probeNode(n)
-
- // Should be marked suspect.
- if n.State != stateSuspect {
- t.Fatalf("Expect node to be suspect")
- }
- time.Sleep(10 * time.Millisecond)
-
- // One of the peers should have attempted an indirect probe.
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-}
-
-func TestMemberList_ProbeNode_Suspect_Dogpile(t *testing.T) {
- cases := []struct {
- numPeers int
- confirmations int
- expected time.Duration
- }{
- {1, 0, 500 * time.Millisecond}, // n=2, k=3 (max timeout disabled)
- {2, 0, 500 * time.Millisecond}, // n=3, k=3
- {3, 0, 500 * time.Millisecond}, // n=4, k=3
- {4, 0, 1000 * time.Millisecond}, // n=5, k=3 (max timeout starts to take effect)
- {5, 0, 1000 * time.Millisecond}, // n=6, k=3
- {5, 1, 750 * time.Millisecond}, // n=6, k=3 (confirmations start to lower timeout)
- {5, 2, 604 * time.Millisecond}, // n=6, k=3
- {5, 3, 500 * time.Millisecond}, // n=6, k=3 (timeout driven to nominal value)
- {5, 4, 500 * time.Millisecond}, // n=6, k=3
- }
- for i, c := range cases {
- // Create the main memberlist under test.
- addr := getBindAddr()
- m := HostMemberlist(addr.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 100 * time.Millisecond
- c.SuspicionMult = 5
- c.SuspicionMaxTimeoutMult = 2
- })
- a := alive{Node: addr.String(), Addr: []byte(addr), Port: 7946, Incarnation: 1}
- m.aliveNode(&a, nil, true)
-
- // Make all but one peer be an real, alive instance.
- var peers []*Memberlist
- for j := 0; j < c.numPeers-1; j++ {
- peerAddr := getBindAddr()
- peers = append(peers, HostMemberlist(peerAddr.String(), t, nil))
- a = alive{Node: peerAddr.String(), Addr: []byte(peerAddr), Port: 7946, Incarnation: 1}
- m.aliveNode(&a, nil, false)
- }
-
- // Just use a bogus address for the last peer so it doesn't respond
- // to pings, but tell the memberlist it's alive.
- badPeerAddr := getBindAddr()
- a = alive{Node: badPeerAddr.String(), Addr: []byte(badPeerAddr), Port: 7946, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- // Force a probe, which should start us into the suspect state.
- n := m.nodeMap[badPeerAddr.String()]
- m.probeNode(n)
- if n.State != stateSuspect {
- t.Fatalf("case %d: expected node to be suspect", i)
- }
-
- // Add the requested number of confirmations.
- for j := 0; j < c.confirmations; j++ {
- from := fmt.Sprintf("peer%d", j)
- s := suspect{Node: badPeerAddr.String(), Incarnation: 1, From: from}
- m.suspectNode(&s)
- }
-
- // Wait until right before the timeout and make sure the timer
- // hasn't fired.
- fudge := 25 * time.Millisecond
- time.Sleep(c.expected - fudge)
- if n.State != stateSuspect {
- t.Fatalf("case %d: expected node to still be suspect", i)
- }
-
- // Wait through the timeout and a little after to make sure the
- // timer fires.
- time.Sleep(2 * fudge)
- if n.State != stateDead {
- t.Fatalf("case %d: expected node to be dead", i)
- }
- }
-}
-
-/*
-func TestMemberList_ProbeNode_FallbackTCP(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMax time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMax = c.ProbeInterval + 20*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, nil)
- defer m2.Shutdown()
-
- m3 := HostMemberlist(addr3.String(), t, nil)
- defer m3.Shutdown()
-
- m4 := HostMemberlist(addr4.String(), t, nil)
- defer m4.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
-
- // Make sure m4 is configured with the same protocol version as m1 so
- // the TCP fallback behavior is enabled.
- a4 := alive{
- Node: addr4.String(),
- Addr: ip4,
- Port: 7946,
- Incarnation: 1,
- Vsn: []uint8{
- ProtocolVersionMin,
- ProtocolVersionMax,
- m1.config.ProtocolVersion,
- m1.config.DelegateProtocolMin,
- m1.config.DelegateProtocolMax,
- m1.config.DelegateProtocolVersion,
- },
- }
- m1.aliveNode(&a4, nil, false)
-
- // Isolate m4 from UDP traffic by re-opening its listener on the wrong
- // port. This should force the TCP fallback path to be used.
- var err error
- if err = m4.udpListener.Close(); err != nil {
- t.Fatalf("err: %v", err)
- }
- udpAddr := &net.UDPAddr{IP: ip4, Port: 9999}
- if m4.udpListener, err = net.ListenUDP("udp", udpAddr); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Should be marked alive because of the TCP fallback ping.
- if n.State != stateAlive {
- t.Fatalf("expect node to be alive")
- }
-
- // Make sure TCP activity completed in a timely manner.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- time.Sleep(probeTimeMax)
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-
- // Now shutdown all inbound TCP traffic to make sure the TCP fallback
- // path properly fails when the node is really unreachable.
- if err = m4.tcpListener.Close(); err != nil {
- t.Fatalf("err: %v", err)
- }
- tcpAddr := &net.TCPAddr{IP: ip4, Port: 9999}
- if m4.tcpListener, err = net.ListenTCP("tcp", tcpAddr); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Probe again, this time there should be no contact.
- startProbe = time.Now()
- m1.probeNode(n)
- probeTime = time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure TCP activity didn't cause us to wait too long before
- // timing out.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- time.Sleep(probeTimeMax)
- if m2.sequenceNum != 2 && m3.sequenceNum != 2 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-}
-
-func TestMemberList_ProbeNode_FallbackTCP_Disabled(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMax time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMax = c.ProbeInterval + 20*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, nil)
- defer m2.Shutdown()
-
- m3 := HostMemberlist(addr3.String(), t, nil)
- defer m3.Shutdown()
-
- m4 := HostMemberlist(addr4.String(), t, nil)
- defer m4.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
-
- // Make sure m4 is configured with the same protocol version as m1 so
- // the TCP fallback behavior is enabled.
- a4 := alive{
- Node: addr4.String(),
- Addr: ip4,
- Port: 7946,
- Incarnation: 1,
- Vsn: []uint8{
- ProtocolVersionMin,
- ProtocolVersionMax,
- m1.config.ProtocolVersion,
- m1.config.DelegateProtocolMin,
- m1.config.DelegateProtocolMax,
- m1.config.DelegateProtocolVersion,
- },
- }
- m1.aliveNode(&a4, nil, false)
-
- // Isolate m4 from UDP traffic by re-opening its listener on the wrong
- // port. This should force the TCP fallback path to be used.
- var err error
- if err = m4.udpListener.Close(); err != nil {
- t.Fatalf("err: %v", err)
- }
- udpAddr := &net.UDPAddr{IP: ip4, Port: 9999}
- if m4.udpListener, err = net.ListenUDP("udp", udpAddr); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Disable the TCP pings using the config mechanism.
- m1.config.DisableTcpPings = true
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure TCP activity didn't cause us to wait too long before
- // timing out.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- time.Sleep(probeTimeMax)
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-}
-
-func TestMemberList_ProbeNode_FallbackTCP_OldProtocol(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMax time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMax = c.ProbeInterval + 20*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, nil)
- defer m2.Shutdown()
-
- m3 := HostMemberlist(addr3.String(), t, nil)
- defer m3.Shutdown()
-
- m4 := HostMemberlist(addr4.String(), t, nil)
- defer m4.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
-
- // Set up m4 so that it doesn't understand a version of the protocol
- // that supports TCP pings.
- a4 := alive{
- Node: addr4.String(),
- Addr: ip4,
- Port: 7946,
- Incarnation: 1,
- Vsn: []uint8{
- ProtocolVersionMin,
- ProtocolVersion2Compatible,
- ProtocolVersion2Compatible,
- m1.config.DelegateProtocolMin,
- m1.config.DelegateProtocolMax,
- m1.config.DelegateProtocolVersion,
- },
- }
- m1.aliveNode(&a4, nil, false)
-
- // Isolate m4 from UDP traffic by re-opening its listener on the wrong
- // port. This should force the TCP fallback path to be used.
- var err error
- if err = m4.udpListener.Close(); err != nil {
- t.Fatalf("err: %v", err)
- }
- udpAddr := &net.UDPAddr{IP: ip4, Port: 9999}
- if m4.udpListener, err = net.ListenUDP("udp", udpAddr); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure TCP activity didn't cause us to wait too long before
- // timing out.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- time.Sleep(probeTimeMax)
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-}
-*/
-
-func TestMemberList_ProbeNode_Awareness_Degraded(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMin time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMin = 2*c.ProbeInterval - 50*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- })
- defer m2.Shutdown()
-
- m3 := HostMemberlist(addr3.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- })
- defer m3.Shutdown()
-
- // This will enable nacks by invoking the latest protocol version.
- vsn := []uint8{
- ProtocolVersionMin,
- ProtocolVersionMax,
- m1.config.ProtocolVersion,
- m1.config.DelegateProtocolMin,
- m1.config.DelegateProtocolMax,
- m1.config.DelegateProtocolVersion,
- }
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a3, nil, false)
-
- // Node 4 never gets started.
- a4 := alive{Node: addr4.String(), Addr: ip4, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a4, nil, false)
-
- // Start the health in a degraded state.
- m1.awareness.ApplyDelta(1)
- if score := m1.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure we timed out approximately on time (note that we accounted
- // for the slowed-down failure detector in the probeTimeMin calculation.
- if probeTime < probeTimeMin {
- t.Fatalf("probed too quickly, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-
- // We should have gotten all the nacks, so our score should remain the
- // same, since we didn't get a successful probe.
- if score := m1.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_ProbeNode_Awareness_Improved(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, nil)
- defer m2.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
-
- // Start the health in a degraded state.
- m1.awareness.ApplyDelta(1)
- if score := m1.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-
- // Have node m1 probe m2.
- n := m1.nodeMap[addr2.String()]
- m1.probeNode(n)
-
- // Node should be reported alive.
- if n.State != stateAlive {
- t.Fatalf("expect node to be suspect")
- }
-
- // Our score should have improved since we did a good probe.
- if score := m1.GetHealthScore(); score != 0 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_ProbeNode_Awareness_MissedNack(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMax time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMax = c.ProbeInterval + 50*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- })
- defer m2.Shutdown()
-
- // This will enable nacks by invoking the latest protocol version.
- vsn := []uint8{
- ProtocolVersionMin,
- ProtocolVersionMax,
- m1.config.ProtocolVersion,
- m1.config.DelegateProtocolMin,
- m1.config.DelegateProtocolMax,
- m1.config.DelegateProtocolVersion,
- }
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a2, nil, false)
-
- // Node 3 and node 4 never get started.
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a3, nil, false)
- a4 := alive{Node: addr4.String(), Addr: ip4, Port: 7946, Incarnation: 1, Vsn: vsn}
- m1.aliveNode(&a4, nil, false)
-
- // Make sure health looks good.
- if score := m1.GetHealthScore(); score != 0 {
- t.Fatalf("bad: %d", score)
- }
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure we timed out approximately on time.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // We should have gotten dinged for the missed nack.
- time.Sleep(probeTimeMax)
- if score := m1.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_ProbeNode_Awareness_OldProtocol(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- addr3 := getBindAddr()
- addr4 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
- ip3 := []byte(addr3)
- ip4 := []byte(addr4)
-
- var probeTimeMax time.Duration
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = 10 * time.Millisecond
- c.ProbeInterval = 200 * time.Millisecond
- probeTimeMax = c.ProbeInterval + 20*time.Millisecond
- })
- defer m1.Shutdown()
-
- m2 := HostMemberlist(addr2.String(), t, nil)
- defer m2.Shutdown()
-
- m3 := HostMemberlist(addr3.String(), t, nil)
- defer m3.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: addr3.String(), Addr: ip3, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
-
- // Node 4 never gets started.
- a4 := alive{Node: addr4.String(), Addr: ip4, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a4, nil, false)
-
- // Make sure health looks good.
- if score := m1.GetHealthScore(); score != 0 {
- t.Fatalf("bad: %d", score)
- }
-
- // Have node m1 probe m4.
- n := m1.nodeMap[addr4.String()]
- startProbe := time.Now()
- m1.probeNode(n)
- probeTime := time.Now().Sub(startProbe)
-
- // Node should be reported suspect.
- if n.State != stateSuspect {
- t.Fatalf("expect node to be suspect")
- }
-
- // Make sure we timed out approximately on time.
- if probeTime > probeTimeMax {
- t.Fatalf("took to long to probe, %9.6f", probeTime.Seconds())
- }
-
- // Confirm at least one of the peers attempted an indirect probe.
- time.Sleep(probeTimeMax)
- if m2.sequenceNum != 1 && m3.sequenceNum != 1 {
- t.Fatalf("bad seqnos %v, %v", m2.sequenceNum, m3.sequenceNum)
- }
-
- // Since we are using the old protocol here, we should have gotten dinged
- // for a failed health check.
- if score := m1.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_ProbeNode_Buddy(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 10 * time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, nil)
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
-
- m1.aliveNode(&a1, nil, true)
- m1.aliveNode(&a2, nil, false)
- m2.aliveNode(&a2, nil, true)
-
- // Force the state to suspect so we piggyback a suspect message with the ping.
- // We should see this get refuted later, and the ping will succeed.
- n := m1.nodeMap[addr2.String()]
- n.State = stateSuspect
- m1.probeNode(n)
-
- // Make sure a ping was sent.
- if m1.sequenceNum != 1 {
- t.Fatalf("bad seqno %v", m1.sequenceNum)
- }
-
- // Check a broadcast is queued.
- if num := m2.broadcasts.NumQueued(); num != 1 {
- t.Fatalf("expected only one queued message: %d", num)
- }
-
- // Should be alive msg.
- if messageType(m2.broadcasts.bcQueue[0].b.Message()[0]) != aliveMsg {
- t.Fatalf("expected queued alive msg")
- }
-}
-
-func TestMemberList_ProbeNode(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 10 * time.Millisecond
- })
- _ = HostMemberlist(addr2.String(), t, nil)
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
-
- n := m1.nodeMap[addr2.String()]
- m1.probeNode(n)
-
- // Should be marked alive
- if n.State != stateAlive {
- t.Fatalf("Expect node to be alive")
- }
-
- // Should increment seqno
- if m1.sequenceNum != 1 {
- t.Fatalf("bad seqno %v", m1.sequenceNum)
- }
-}
-
-func TestMemberList_Ping(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.ProbeTimeout = time.Millisecond
- c.ProbeInterval = 10 * time.Second
- })
- _ = HostMemberlist(addr2.String(), t, nil)
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
-
- // Do a legit ping.
- n := m1.nodeMap[addr2.String()]
- addr, err := net.ResolveUDPAddr("udp", net.JoinHostPort(addr2.String(), "7946"))
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- rtt, err := m1.Ping(n.Name, addr)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- if !(rtt > 0) {
- t.Fatalf("bad: %v", rtt)
- }
-
- // This ping has a bad node name so should timeout.
- _, err = m1.Ping("bad", addr)
- if _, ok := err.(NoPingResponseError); !ok || err == nil {
- t.Fatalf("bad: %v", err)
- }
-}
-
-func TestMemberList_ResetNodes(t *testing.T) {
- m := GetMemberlist(t)
- a1 := alive{Node: "test1", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a1, nil, false)
- a2 := alive{Node: "test2", Addr: []byte{127, 0, 0, 2}, Incarnation: 1}
- m.aliveNode(&a2, nil, false)
- a3 := alive{Node: "test3", Addr: []byte{127, 0, 0, 3}, Incarnation: 1}
- m.aliveNode(&a3, nil, false)
- d := dead{Node: "test2", Incarnation: 1}
- m.deadNode(&d)
-
- m.config.GossipToTheDeadTime = 100 * time.Millisecond
- m.resetNodes()
- if len(m.nodes) != 3 {
- t.Fatalf("Bad length")
- }
- if _, ok := m.nodeMap["test2"]; !ok {
- t.Fatalf("test2 should not be unmapped")
- }
-
- time.Sleep(200 * time.Millisecond)
- m.resetNodes()
- if len(m.nodes) != 2 {
- t.Fatalf("Bad length")
- }
- if _, ok := m.nodeMap["test2"]; ok {
- t.Fatalf("test2 should be unmapped")
- }
-}
-
-func TestMemberList_NextSeq(t *testing.T) {
- m := &Memberlist{}
- if m.nextSeqNo() != 1 {
- t.Fatalf("bad sequence no")
- }
- if m.nextSeqNo() != 2 {
- t.Fatalf("bad sequence no")
- }
-}
-
-func TestMemberList_setProbeChannels(t *testing.T) {
- m := &Memberlist{ackHandlers: make(map[uint32]*ackHandler)}
-
- ch := make(chan ackMessage, 1)
- m.setProbeChannels(0, ch, nil, 10*time.Millisecond)
-
- if _, ok := m.ackHandlers[0]; !ok {
- t.Fatalf("missing handler")
- }
- time.Sleep(20 * time.Millisecond)
-
- if _, ok := m.ackHandlers[0]; ok {
- t.Fatalf("non-reaped handler")
- }
-}
-
-func TestMemberList_setAckHandler(t *testing.T) {
- m := &Memberlist{ackHandlers: make(map[uint32]*ackHandler)}
-
- f := func([]byte, time.Time) {}
- m.setAckHandler(0, f, 10*time.Millisecond)
-
- if _, ok := m.ackHandlers[0]; !ok {
- t.Fatalf("missing handler")
- }
- time.Sleep(20 * time.Millisecond)
-
- if _, ok := m.ackHandlers[0]; ok {
- t.Fatalf("non-reaped handler")
- }
-}
-
-func TestMemberList_invokeAckHandler(t *testing.T) {
- m := &Memberlist{ackHandlers: make(map[uint32]*ackHandler)}
-
- // Does nothing
- m.invokeAckHandler(ackResp{}, time.Now())
-
- var b bool
- f := func(payload []byte, timestamp time.Time) { b = true }
- m.setAckHandler(0, f, 10*time.Millisecond)
-
- // Should set b
- m.invokeAckHandler(ackResp{0, nil}, time.Now())
- if !b {
- t.Fatalf("b not set")
- }
-
- if _, ok := m.ackHandlers[0]; ok {
- t.Fatalf("non-reaped handler")
- }
-}
-
-func TestMemberList_invokeAckHandler_Channel_Ack(t *testing.T) {
- m := &Memberlist{ackHandlers: make(map[uint32]*ackHandler)}
-
- ack := ackResp{0, []byte{0, 0, 0}}
-
- // Does nothing
- m.invokeAckHandler(ack, time.Now())
-
- ackCh := make(chan ackMessage, 1)
- nackCh := make(chan struct{}, 1)
- m.setProbeChannels(0, ackCh, nackCh, 10*time.Millisecond)
-
- // Should send message
- m.invokeAckHandler(ack, time.Now())
-
- select {
- case v := <-ackCh:
- if v.Complete != true {
- t.Fatalf("Bad value")
- }
- if bytes.Compare(v.Payload, ack.Payload) != 0 {
- t.Fatalf("wrong payload. expected: %v; actual: %v", ack.Payload, v.Payload)
- }
-
- case <-nackCh:
- t.Fatalf("should not get a nack")
-
- default:
- t.Fatalf("message not sent")
- }
-
- if _, ok := m.ackHandlers[0]; ok {
- t.Fatalf("non-reaped handler")
- }
-}
-
-func TestMemberList_invokeAckHandler_Channel_Nack(t *testing.T) {
- m := &Memberlist{ackHandlers: make(map[uint32]*ackHandler)}
-
- nack := nackResp{0}
-
- // Does nothing.
- m.invokeNackHandler(nack)
-
- ackCh := make(chan ackMessage, 1)
- nackCh := make(chan struct{}, 1)
- m.setProbeChannels(0, ackCh, nackCh, 10*time.Millisecond)
-
- // Should send message.
- m.invokeNackHandler(nack)
-
- select {
- case <-ackCh:
- t.Fatalf("should not get an ack")
-
- case <-nackCh:
- // Good.
-
- default:
- t.Fatalf("message not sent")
- }
-
- // Getting a nack doesn't reap the handler so that we can still forward
- // an ack up to the reap time, if we get one.
- if _, ok := m.ackHandlers[0]; !ok {
- t.Fatalf("handler should not be reaped")
- }
-
- ack := ackResp{0, []byte{0, 0, 0}}
- m.invokeAckHandler(ack, time.Now())
-
- select {
- case v := <-ackCh:
- if v.Complete != true {
- t.Fatalf("Bad value")
- }
- if bytes.Compare(v.Payload, ack.Payload) != 0 {
- t.Fatalf("wrong payload. expected: %v; actual: %v", ack.Payload, v.Payload)
- }
-
- case <-nackCh:
- t.Fatalf("should not get a nack")
-
- default:
- t.Fatalf("message not sent")
- }
-
- if _, ok := m.ackHandlers[0]; ok {
- t.Fatalf("non-reaped handler")
- }
-}
-
-func TestMemberList_AliveNode_NewNode(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
- m.config.Events = &ChannelEventDelegate{ch}
-
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- if len(m.nodes) != 1 {
- t.Fatalf("should add node")
- }
-
- state, ok := m.nodeMap["test"]
- if !ok {
- t.Fatalf("should map node")
- }
-
- if state.Incarnation != 1 {
- t.Fatalf("bad incarnation")
- }
- if state.State != stateAlive {
- t.Fatalf("bad state")
- }
- if time.Now().Sub(state.StateChange) > time.Second {
- t.Fatalf("bad change delta")
- }
-
- // Check for a join message
- select {
- case e := <-ch:
- if e.Node.Name != "test" {
- t.Fatalf("bad node name")
- }
- default:
- t.Fatalf("no join message")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected queued message")
- }
-}
-
-func TestMemberList_AliveNode_SuspectNode(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
-
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- // Listen only after first join
- m.config.Events = &ChannelEventDelegate{ch}
-
- // Make suspect
- state := m.nodeMap["test"]
- state.State = stateSuspect
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- // Old incarnation number, should not change
- m.aliveNode(&a, nil, false)
- if state.State != stateSuspect {
- t.Fatalf("update with old incarnation!")
- }
-
- // Should reset to alive now
- a.Incarnation = 2
- m.aliveNode(&a, nil, false)
- if state.State != stateAlive {
- t.Fatalf("no update with new incarnation!")
- }
-
- if time.Now().Sub(state.StateChange) > time.Second {
- t.Fatalf("bad change delta")
- }
-
- // Check for a no join message
- select {
- case <-ch:
- t.Fatalf("got bad join message")
- default:
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected queued message")
- }
-}
-
-func TestMemberList_AliveNode_Idempotent(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
-
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- // Listen only after first join
- m.config.Events = &ChannelEventDelegate{ch}
-
- // Make suspect
- state := m.nodeMap["test"]
- stateTime := state.StateChange
-
- // Should reset to alive now
- a.Incarnation = 2
- m.aliveNode(&a, nil, false)
- if state.State != stateAlive {
- t.Fatalf("non idempotent")
- }
-
- if stateTime != state.StateChange {
- t.Fatalf("should not change state")
- }
-
- // Check for a no join message
- select {
- case <-ch:
- t.Fatalf("got bad join message")
- default:
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-}
-
-// Serf Bug: GH-58, Meta data does not update
-func TestMemberList_AliveNode_ChangeMeta(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
-
- a := alive{
- Node: "test",
- Addr: []byte{127, 0, 0, 1},
- Meta: []byte("val1"),
- Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- // Listen only after first join
- m.config.Events = &ChannelEventDelegate{ch}
-
- // Make suspect
- state := m.nodeMap["test"]
-
- // Should reset to alive now
- a.Incarnation = 2
- a.Meta = []byte("val2")
- m.aliveNode(&a, nil, false)
-
- // Check updates
- if bytes.Compare(state.Meta, a.Meta) != 0 {
- t.Fatalf("meta did not update")
- }
-
- // Check for a NotifyUpdate
- select {
- case e := <-ch:
- if e.Event != NodeUpdate {
- t.Fatalf("bad event: %v", e)
- }
- if e.Node != &state.Node {
- t.Fatalf("bad event: %v", e)
- }
- if bytes.Compare(e.Node.Meta, a.Meta) != 0 {
- t.Fatalf("meta did not update")
- }
- default:
- t.Fatalf("missing event!")
- }
-
-}
-
-func TestMemberList_AliveNode_Refute(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: m.config.Name, Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, true)
-
- // Clear queue
- m.broadcasts.Reset()
-
- // Conflicting alive
- s := alive{
- Node: m.config.Name,
- Addr: []byte{127, 0, 0, 1},
- Incarnation: 2,
- Meta: []byte("foo"),
- }
- m.aliveNode(&s, nil, false)
-
- state := m.nodeMap[m.config.Name]
- if state.State != stateAlive {
- t.Fatalf("should still be alive")
- }
- if state.Meta != nil {
- t.Fatalf("meta should still be nil")
- }
-
- // Check a broad cast is queued
- if num := m.broadcasts.NumQueued(); num != 1 {
- t.Fatalf("expected only one queued message: %d",
- num)
- }
-
- // Should be alive mesg
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != aliveMsg {
- t.Fatalf("expected queued alive msg")
- }
-}
-
-func TestMemberList_SuspectNode_NoNode(t *testing.T) {
- m := GetMemberlist(t)
- s := suspect{Node: "test", Incarnation: 1}
- m.suspectNode(&s)
- if len(m.nodes) != 0 {
- t.Fatalf("don't expect nodes")
- }
-}
-
-func TestMemberList_SuspectNode(t *testing.T) {
- m := GetMemberlist(t)
- m.config.ProbeInterval = time.Millisecond
- m.config.SuspicionMult = 1
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- s := suspect{Node: "test", Incarnation: 1}
- m.suspectNode(&s)
-
- if state.State != stateSuspect {
- t.Fatalf("Bad state")
- }
-
- change := state.StateChange
- if time.Now().Sub(change) > time.Second {
- t.Fatalf("bad change delta")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-
- // Check its a suspect message
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != suspectMsg {
- t.Fatalf("expected queued suspect msg")
- }
-
- // Wait for the timeout
- time.Sleep(10 * time.Millisecond)
-
- if state.State != stateDead {
- t.Fatalf("Bad state")
- }
-
- if time.Now().Sub(state.StateChange) > time.Second {
- t.Fatalf("bad change delta")
- }
- if !state.StateChange.After(change) {
- t.Fatalf("should increment time")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-
- // Check its a suspect message
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != deadMsg {
- t.Fatalf("expected queued dead msg")
- }
-}
-
-func TestMemberList_SuspectNode_DoubleSuspect(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- s := suspect{Node: "test", Incarnation: 1}
- m.suspectNode(&s)
-
- if state.State != stateSuspect {
- t.Fatalf("Bad state")
- }
-
- change := state.StateChange
- if time.Now().Sub(change) > time.Second {
- t.Fatalf("bad change delta")
- }
-
- // clear the broadcast queue
- m.broadcasts.Reset()
-
- // Suspect again
- m.suspectNode(&s)
-
- if state.StateChange != change {
- t.Fatalf("unexpected state change")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 0 {
- t.Fatalf("expected only one queued message")
- }
-
-}
-
-func TestMemberList_SuspectNode_OldSuspect(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 10}
- m.aliveNode(&a, nil, false)
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- // Clear queue
- m.broadcasts.Reset()
-
- s := suspect{Node: "test", Incarnation: 1}
- m.suspectNode(&s)
-
- if state.State != stateAlive {
- t.Fatalf("Bad state")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 0 {
- t.Fatalf("expected only one queued message")
- }
-}
-
-func TestMemberList_SuspectNode_Refute(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: m.config.Name, Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, true)
-
- // Clear queue
- m.broadcasts.Reset()
-
- // Make sure health is in a good state
- if score := m.GetHealthScore(); score != 0 {
- t.Fatalf("bad: %d", score)
- }
-
- s := suspect{Node: m.config.Name, Incarnation: 1}
- m.suspectNode(&s)
-
- state := m.nodeMap[m.config.Name]
- if state.State != stateAlive {
- t.Fatalf("should still be alive")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-
- // Should be alive mesg
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != aliveMsg {
- t.Fatalf("expected queued alive msg")
- }
-
- // Health should have been dinged
- if score := m.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_DeadNode_NoNode(t *testing.T) {
- m := GetMemberlist(t)
- d := dead{Node: "test", Incarnation: 1}
- m.deadNode(&d)
- if len(m.nodes) != 0 {
- t.Fatalf("don't expect nodes")
- }
-}
-
-func TestMemberList_DeadNode(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
- m.config.Events = &ChannelEventDelegate{ch}
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- // Read the join event
- <-ch
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- d := dead{Node: "test", Incarnation: 1}
- m.deadNode(&d)
-
- if state.State != stateDead {
- t.Fatalf("Bad state")
- }
-
- change := state.StateChange
- if time.Now().Sub(change) > time.Second {
- t.Fatalf("bad change delta")
- }
-
- select {
- case leave := <-ch:
- if leave.Event != NodeLeave || leave.Node.Name != "test" {
- t.Fatalf("bad node name")
- }
- default:
- t.Fatalf("no leave message")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-
- // Check its a suspect message
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != deadMsg {
- t.Fatalf("expected queued dead msg")
- }
-}
-
-func TestMemberList_DeadNode_Double(t *testing.T) {
- ch := make(chan NodeEvent, 1)
- m := GetMemberlist(t)
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, false)
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- d := dead{Node: "test", Incarnation: 1}
- m.deadNode(&d)
-
- // Clear queue
- m.broadcasts.Reset()
-
- // Notify after the first dead
- m.config.Events = &ChannelEventDelegate{ch}
-
- // Should do nothing
- d.Incarnation = 2
- m.deadNode(&d)
-
- select {
- case <-ch:
- t.Fatalf("should not get leave")
- default:
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 0 {
- t.Fatalf("expected only one queued message")
- }
-}
-
-func TestMemberList_DeadNode_OldDead(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 10}
- m.aliveNode(&a, nil, false)
-
- state := m.nodeMap["test"]
- state.StateChange = state.StateChange.Add(-time.Hour)
-
- d := dead{Node: "test", Incarnation: 1}
- m.deadNode(&d)
-
- if state.State != stateAlive {
- t.Fatalf("Bad state")
- }
-}
-
-func TestMemberList_DeadNode_AliveReplay(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: "test", Addr: []byte{127, 0, 0, 1}, Incarnation: 10}
- m.aliveNode(&a, nil, false)
-
- d := dead{Node: "test", Incarnation: 10}
- m.deadNode(&d)
-
- // Replay alive at same incarnation
- m.aliveNode(&a, nil, false)
-
- // Should remain dead
- state, ok := m.nodeMap["test"]
- if ok && state.State != stateDead {
- t.Fatalf("Bad state")
- }
-}
-
-func TestMemberList_DeadNode_Refute(t *testing.T) {
- m := GetMemberlist(t)
- a := alive{Node: m.config.Name, Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a, nil, true)
-
- // Clear queue
- m.broadcasts.Reset()
-
- // Make sure health is in a good state
- if score := m.GetHealthScore(); score != 0 {
- t.Fatalf("bad: %d", score)
- }
-
- d := dead{Node: m.config.Name, Incarnation: 1}
- m.deadNode(&d)
-
- state := m.nodeMap[m.config.Name]
- if state.State != stateAlive {
- t.Fatalf("should still be alive")
- }
-
- // Check a broad cast is queued
- if m.broadcasts.NumQueued() != 1 {
- t.Fatalf("expected only one queued message")
- }
-
- // Should be alive mesg
- if messageType(m.broadcasts.bcQueue[0].b.Message()[0]) != aliveMsg {
- t.Fatalf("expected queued alive msg")
- }
-
- // We should have been dinged
- if score := m.GetHealthScore(); score != 1 {
- t.Fatalf("bad: %d", score)
- }
-}
-
-func TestMemberList_MergeState(t *testing.T) {
- m := GetMemberlist(t)
- a1 := alive{Node: "test1", Addr: []byte{127, 0, 0, 1}, Incarnation: 1}
- m.aliveNode(&a1, nil, false)
- a2 := alive{Node: "test2", Addr: []byte{127, 0, 0, 2}, Incarnation: 1}
- m.aliveNode(&a2, nil, false)
- a3 := alive{Node: "test3", Addr: []byte{127, 0, 0, 3}, Incarnation: 1}
- m.aliveNode(&a3, nil, false)
-
- s := suspect{Node: "test1", Incarnation: 1}
- m.suspectNode(&s)
-
- remote := []pushNodeState{
- pushNodeState{
- Name: "test1",
- Addr: []byte{127, 0, 0, 1},
- Incarnation: 2,
- State: stateAlive,
- },
- pushNodeState{
- Name: "test2",
- Addr: []byte{127, 0, 0, 2},
- Incarnation: 1,
- State: stateSuspect,
- },
- pushNodeState{
- Name: "test3",
- Addr: []byte{127, 0, 0, 3},
- Incarnation: 1,
- State: stateDead,
- },
- pushNodeState{
- Name: "test4",
- Addr: []byte{127, 0, 0, 4},
- Incarnation: 2,
- State: stateAlive,
- },
- }
-
- // Listen for changes
- eventCh := make(chan NodeEvent, 1)
- m.config.Events = &ChannelEventDelegate{eventCh}
-
- // Merge remote state
- m.mergeState(remote)
-
- // Check the states
- state := m.nodeMap["test1"]
- if state.State != stateAlive || state.Incarnation != 2 {
- t.Fatalf("Bad state %v", state)
- }
-
- state = m.nodeMap["test2"]
- if state.State != stateSuspect || state.Incarnation != 1 {
- t.Fatalf("Bad state %v", state)
- }
-
- state = m.nodeMap["test3"]
- if state.State != stateSuspect {
- t.Fatalf("Bad state %v", state)
- }
-
- state = m.nodeMap["test4"]
- if state.State != stateAlive || state.Incarnation != 2 {
- t.Fatalf("Bad state %v", state)
- }
-
- // Check the channels
- select {
- case e := <-eventCh:
- if e.Event != NodeJoin || e.Node.Name != "test4" {
- t.Fatalf("bad node %v", e)
- }
- default:
- t.Fatalf("Expect join")
- }
-
- select {
- case e := <-eventCh:
- t.Fatalf("Unexpect event: %v", e)
- default:
- }
-}
-
-func TestMemberlist_Gossip(t *testing.T) {
- ch := make(chan NodeEvent, 3)
-
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.GossipInterval = time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, func(c *Config) {
- c.Events = &ChannelEventDelegate{ch}
- c.GossipInterval = time.Millisecond
- })
-
- defer m1.Shutdown()
- defer m2.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
- a3 := alive{Node: "172.0.0.1", Addr: []byte{172, 0, 0, 1}, Incarnation: 1}
- m1.aliveNode(&a3, nil, false)
-
- // Gossip should send all this to m2
- m1.gossip()
-
- for i := 0; i < 3; i++ {
- select {
- case <-ch:
- case <-time.After(50 * time.Millisecond):
- t.Fatalf("timeout")
- }
- }
-}
-
-func TestMemberlist_GossipToDead(t *testing.T) {
- ch := make(chan NodeEvent, 2)
-
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.GossipInterval = time.Millisecond
- c.GossipToTheDeadTime = 100 * time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, func(c *Config) {
- c.Events = &ChannelEventDelegate{ch}
- })
-
- defer m1.Shutdown()
- defer m2.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
-
- // Shouldn't send anything to m2 here, node has been dead for 2x the GossipToTheDeadTime
- m1.nodeMap[addr2.String()].State = stateDead
- m1.nodeMap[addr2.String()].StateChange = time.Now().Add(-200 * time.Millisecond)
- m1.gossip()
-
- select {
- case <-ch:
- t.Fatalf("shouldn't get gossip")
- case <-time.After(50 * time.Millisecond):
- }
-
- // Should gossip to m2 because its state has changed within GossipToTheDeadTime
- m1.nodeMap[addr2.String()].StateChange = time.Now().Add(-20 * time.Millisecond)
- m1.gossip()
-
- for i := 0; i < 2; i++ {
- select {
- case <-ch:
- case <-time.After(50 * time.Millisecond):
- t.Fatalf("timeout")
- }
- }
-}
-
-func TestMemberlist_PushPull(t *testing.T) {
- addr1 := getBindAddr()
- addr2 := getBindAddr()
- ip1 := []byte(addr1)
- ip2 := []byte(addr2)
-
- ch := make(chan NodeEvent, 3)
-
- m1 := HostMemberlist(addr1.String(), t, func(c *Config) {
- c.GossipInterval = 10 * time.Second
- c.PushPullInterval = time.Millisecond
- })
- m2 := HostMemberlist(addr2.String(), t, func(c *Config) {
- c.GossipInterval = 10 * time.Second
- c.Events = &ChannelEventDelegate{ch}
- })
-
- defer m1.Shutdown()
- defer m2.Shutdown()
-
- a1 := alive{Node: addr1.String(), Addr: ip1, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a1, nil, true)
- a2 := alive{Node: addr2.String(), Addr: ip2, Port: 7946, Incarnation: 1}
- m1.aliveNode(&a2, nil, false)
-
- // Gossip should send all this to m2
- m1.pushPull()
-
- for i := 0; i < 2; i++ {
- select {
- case <-ch:
- case <-time.After(10 * time.Millisecond):
- t.Fatalf("timeout")
- }
- }
-}
-
-func TestVerifyProtocol(t *testing.T) {
- cases := []struct {
- Anodes [][3]uint8
- Bnodes [][3]uint8
- expected bool
- }{
- // Both running identical everything
- {
- Anodes: [][3]uint8{
- {0, 0, 0},
- },
- Bnodes: [][3]uint8{
- {0, 0, 0},
- },
- expected: true,
- },
-
- // One can understand newer, but speaking same protocol
- {
- Anodes: [][3]uint8{
- {0, 0, 0},
- },
- Bnodes: [][3]uint8{
- {0, 1, 0},
- },
- expected: true,
- },
-
- // One is speaking outside the range
- {
- Anodes: [][3]uint8{
- {0, 0, 0},
- },
- Bnodes: [][3]uint8{
- {1, 1, 1},
- },
- expected: false,
- },
-
- // Transitively outside the range
- {
- Anodes: [][3]uint8{
- {0, 1, 0},
- {0, 2, 1},
- },
- Bnodes: [][3]uint8{
- {1, 3, 1},
- },
- expected: false,
- },
-
- // Multi-node
- {
- Anodes: [][3]uint8{
- {0, 3, 2},
- {0, 2, 0},
- },
- Bnodes: [][3]uint8{
- {0, 2, 1},
- {0, 5, 0},
- },
- expected: true,
- },
- }
-
- for _, tc := range cases {
- aCore := make([][6]uint8, len(tc.Anodes))
- aApp := make([][6]uint8, len(tc.Anodes))
- for i, n := range tc.Anodes {
- aCore[i] = [6]uint8{n[0], n[1], n[2], 0, 0, 0}
- aApp[i] = [6]uint8{0, 0, 0, n[0], n[1], n[2]}
- }
-
- bCore := make([][6]uint8, len(tc.Bnodes))
- bApp := make([][6]uint8, len(tc.Bnodes))
- for i, n := range tc.Bnodes {
- bCore[i] = [6]uint8{n[0], n[1], n[2], 0, 0, 0}
- bApp[i] = [6]uint8{0, 0, 0, n[0], n[1], n[2]}
- }
-
- // Test core protocol verification
- testVerifyProtocolSingle(t, aCore, bCore, tc.expected)
- testVerifyProtocolSingle(t, bCore, aCore, tc.expected)
-
- // Test app protocol verification
- testVerifyProtocolSingle(t, aApp, bApp, tc.expected)
- testVerifyProtocolSingle(t, bApp, aApp, tc.expected)
- }
-}
-
-func testVerifyProtocolSingle(t *testing.T, A [][6]uint8, B [][6]uint8, expect bool) {
- m := GetMemberlist(t)
- defer m.Shutdown()
-
- m.nodes = make([]*nodeState, len(A))
- for i, n := range A {
- m.nodes[i] = &nodeState{
- Node: Node{
- PMin: n[0],
- PMax: n[1],
- PCur: n[2],
- DMin: n[3],
- DMax: n[4],
- DCur: n[5],
- },
- }
- }
-
- remote := make([]pushNodeState, len(B))
- for i, n := range B {
- remote[i] = pushNodeState{
- Name: fmt.Sprintf("node %d", i),
- Vsn: []uint8{n[0], n[1], n[2], n[3], n[4], n[5]},
- }
- }
-
- err := m.verifyProtocol(remote)
- if (err == nil) != expect {
- t.Fatalf("bad:\nA: %v\nB: %v\nErr: %s", A, B, err)
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/suspicion_test.go b/vendor/github.com/hashicorp/memberlist/suspicion_test.go
deleted file mode 100644
index 1b5ca8a5a..000000000
--- a/vendor/github.com/hashicorp/memberlist/suspicion_test.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package memberlist
-
-import (
- "testing"
- "time"
-)
-
-func TestSuspicion_remainingSuspicionTime(t *testing.T) {
- cases := []struct {
- n int32
- k int32
- elapsed time.Duration
- min time.Duration
- max time.Duration
- expected time.Duration
- }{
- {0, 3, 0, 2 * time.Second, 30 * time.Second, 30 * time.Second},
- {1, 3, 2 * time.Second, 2 * time.Second, 30 * time.Second, 14 * time.Second},
- {2, 3, 3 * time.Second, 2 * time.Second, 30 * time.Second, 4810 * time.Millisecond},
- {3, 3, 4 * time.Second, 2 * time.Second, 30 * time.Second, -2 * time.Second},
- {4, 3, 5 * time.Second, 2 * time.Second, 30 * time.Second, -3 * time.Second},
- {5, 3, 10 * time.Second, 2 * time.Second, 30 * time.Second, -8 * time.Second},
- }
- for i, c := range cases {
- remaining := remainingSuspicionTime(c.n, c.k, c.elapsed, c.min, c.max)
- if remaining != c.expected {
- t.Errorf("case %d: remaining %9.6f != expected %9.6f", i, remaining.Seconds(), c.expected.Seconds())
- }
- }
-}
-
-func TestSuspicion_Timer(t *testing.T) {
- const k = 3
- const min = 500 * time.Millisecond
- const max = 2 * time.Second
-
- type pair struct {
- from string
- newInfo bool
- }
- cases := []struct {
- numConfirmations int
- from string
- confirmations []pair
- expected time.Duration
- }{
- {
- 0,
- "me",
- []pair{},
- max,
- },
- {
- 1,
- "me",
- []pair{
- pair{"me", false},
- pair{"foo", true},
- },
- 1250 * time.Millisecond,
- },
- {
- 1,
- "me",
- []pair{
- pair{"me", false},
- pair{"foo", true},
- pair{"foo", false},
- pair{"foo", false},
- },
- 1250 * time.Millisecond,
- },
- {
- 2,
- "me",
- []pair{
- pair{"me", false},
- pair{"foo", true},
- pair{"bar", true},
- },
- 810 * time.Millisecond,
- },
- {
- 3,
- "me",
- []pair{
- pair{"me", false},
- pair{"foo", true},
- pair{"bar", true},
- pair{"baz", true},
- },
- min,
- },
- {
- 3,
- "me",
- []pair{
- pair{"me", false},
- pair{"foo", true},
- pair{"bar", true},
- pair{"baz", true},
- pair{"zoo", false},
- },
- min,
- },
- }
- for i, c := range cases {
- ch := make(chan time.Duration, 1)
- start := time.Now()
- f := func(numConfirmations int) {
- if numConfirmations != c.numConfirmations {
- t.Errorf("case %d: bad %d != %d", i, numConfirmations, c.numConfirmations)
- }
-
- ch <- time.Now().Sub(start)
- }
-
- // Create the timer and add the requested confirmations. Wait
- // the fudge amount to help make sure we calculate the timeout
- // overall, and don't accumulate extra time.
- s := newSuspicion(c.from, k, min, max, f)
- fudge := 25 * time.Millisecond
- for _, p := range c.confirmations {
- time.Sleep(fudge)
- if s.Confirm(p.from) != p.newInfo {
- t.Fatalf("case %d: newInfo mismatch for %s", i, p.from)
- }
- }
-
- // Wait until right before the timeout and make sure the
- // timer hasn't fired.
- already := time.Duration(len(c.confirmations)) * fudge
- time.Sleep(c.expected - already - fudge)
- select {
- case d := <-ch:
- t.Fatalf("case %d: should not have fired (%9.6f)", i, d.Seconds())
- default:
- }
-
- // Wait through the timeout and a little after and make sure it
- // fires.
- time.Sleep(2 * fudge)
- select {
- case <-ch:
- default:
- t.Fatalf("case %d: should have fired", i)
- }
-
- // Confirm after to make sure it handles a negative remaining
- // time correctly and doesn't fire again.
- s.Confirm("late")
- time.Sleep(c.expected + 2*fudge)
- select {
- case d := <-ch:
- t.Fatalf("case %d: should not have fired (%9.6f)", i, d.Seconds())
- default:
- }
- }
-}
-
-func TestSuspicion_Timer_ZeroK(t *testing.T) {
- ch := make(chan struct{}, 1)
- f := func(int) {
- ch <- struct{}{}
- }
-
- // This should select the min time since there are no expected
- // confirmations to accelerate the timer.
- s := newSuspicion("me", 0, 25*time.Millisecond, 30*time.Second, f)
- if s.Confirm("foo") {
- t.Fatalf("should not provide new information")
- }
-
- select {
- case <-ch:
- case <-time.After(50 * time.Millisecond):
- t.Fatalf("should have fired")
- }
-}
-
-func TestSuspicion_Timer_Immediate(t *testing.T) {
- ch := make(chan struct{}, 1)
- f := func(int) {
- ch <- struct{}{}
- }
-
- // This should underflow the timeout and fire immediately.
- s := newSuspicion("me", 1, 100*time.Millisecond, 30*time.Second, f)
- time.Sleep(200 * time.Millisecond)
- s.Confirm("foo")
-
- // Wait a little while since the function gets called in a goroutine.
- select {
- case <-ch:
- case <-time.After(25 * time.Millisecond):
- t.Fatalf("should have fired")
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/test/setup_subnet.sh b/vendor/github.com/hashicorp/memberlist/test/setup_subnet.sh
deleted file mode 100755
index 6651c8ce4..000000000
--- a/vendor/github.com/hashicorp/memberlist/test/setup_subnet.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#
-# This script makes sure that 127.0.0.x is routable. On Darwin, there
-# is a bug that it isn't routable and this causes errors.
-#
-
-# Check if loopback is setup
-ping -c 1 -W 10 127.0.0.2 > /dev/null 2>&1
-if [ $? -eq 0 ]
-then
- exit
-fi
-
-# If we're not on OS X, then error
-case $OSTYPE in
- darwin*)
- ;;
- *)
- echo "Can't setup interfaces on non-Mac. Error!"
- exit 1
- ;;
-esac
-
-# Setup loopback
-for ((i=2;i<256;i++))
-do
- sudo ifconfig lo0 alias 127.0.0.$i up
-done
diff --git a/vendor/github.com/hashicorp/memberlist/transport_test.go b/vendor/github.com/hashicorp/memberlist/transport_test.go
deleted file mode 100644
index b5249eb5f..000000000
--- a/vendor/github.com/hashicorp/memberlist/transport_test.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package memberlist
-
-import (
- "bytes"
- "testing"
- "time"
-)
-
-func TestTransport_Join(t *testing.T) {
- net := &MockNetwork{}
-
- t1 := net.NewTransport()
-
- c1 := DefaultLANConfig()
- c1.Name = "node1"
- c1.Transport = t1
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- c2 := DefaultLANConfig()
- c2.Name = "node2"
- c2.Transport = net.NewTransport()
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- m2.setAlive()
- m2.schedule()
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{t1.addr.String()})
- if num != 1 {
- t.Fatalf("bad: %d", num)
- }
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if len(m2.Members()) != 2 {
- t.Fatalf("bad: %v", m2.Members())
- }
- if m2.estNumNodes() != 2 {
- t.Fatalf("bad: %v", m2.Members())
- }
-
-}
-
-func TestTransport_Send(t *testing.T) {
- net := &MockNetwork{}
-
- t1 := net.NewTransport()
- d1 := &MockDelegate{}
-
- c1 := DefaultLANConfig()
- c1.Name = "node1"
- c1.Transport = t1
- c1.Delegate = d1
- m1, err := Create(c1)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- m1.setAlive()
- m1.schedule()
- defer m1.Shutdown()
-
- c2 := DefaultLANConfig()
- c2.Name = "node2"
- c2.Transport = net.NewTransport()
- m2, err := Create(c2)
- if err != nil {
- t.Fatalf("err: %v", err)
- }
- m2.setAlive()
- m2.schedule()
- defer m2.Shutdown()
-
- num, err := m2.Join([]string{t1.addr.String()})
- if num != 1 {
- t.Fatalf("bad: %d", num)
- }
- if err != nil {
- t.Fatalf("err: %v", err)
- }
-
- if err := m2.SendTo(t1.addr, []byte("SendTo")); err != nil {
- t.Fatalf("err: %v", err)
- }
-
- var n1 *Node
- for _, n := range m2.Members() {
- if n.Name == c1.Name {
- n1 = n
- break
- }
- }
- if n1 == nil {
- t.Fatalf("bad")
- }
-
- if err := m2.SendToUDP(n1, []byte("SendToUDP")); err != nil {
- t.Fatalf("err: %v", err)
- }
- if err := m2.SendToTCP(n1, []byte("SendToTCP")); err != nil {
- t.Fatalf("err: %v", err)
- }
- if err := m2.SendBestEffort(n1, []byte("SendBestEffort")); err != nil {
- t.Fatalf("err: %v", err)
- }
- if err := m2.SendReliable(n1, []byte("SendReliable")); err != nil {
- t.Fatalf("err: %v", err)
- }
- time.Sleep(100 * time.Millisecond)
-
- received := bytes.Join(d1.msgs, []byte("|"))
- expected := []byte("SendTo|SendToUDP|SendToTCP|SendBestEffort|SendReliable")
- if !bytes.Equal(received, expected) {
- t.Fatalf("bad: %s", received)
- }
-}
diff --git a/vendor/github.com/hashicorp/memberlist/util_test.go b/vendor/github.com/hashicorp/memberlist/util_test.go
deleted file mode 100644
index b7f2b4199..000000000
--- a/vendor/github.com/hashicorp/memberlist/util_test.go
+++ /dev/null
@@ -1,358 +0,0 @@
-package memberlist
-
-import (
- "fmt"
- "reflect"
- "testing"
- "time"
-)
-
-func TestUtil_PortFunctions(t *testing.T) {
- tests := []struct {
- addr string
- hasPort bool
- ensurePort string
- }{
- {"1.2.3.4", false, "1.2.3.4:8301"},
- {"1.2.3.4:1234", true, "1.2.3.4:1234"},
- {"2600:1f14:e22:1501:f9a:2e0c:a167:67e8", false, "[2600:1f14:e22:1501:f9a:2e0c:a167:67e8]:8301"},
- {"[2600:1f14:e22:1501:f9a:2e0c:a167:67e8]", false, "[2600:1f14:e22:1501:f9a:2e0c:a167:67e8]:8301"},
- {"[2600:1f14:e22:1501:f9a:2e0c:a167:67e8]:1234", true, "[2600:1f14:e22:1501:f9a:2e0c:a167:67e8]:1234"},
- {"localhost", false, "localhost:8301"},
- {"localhost:1234", true, "localhost:1234"},
- {"hashicorp.com", false, "hashicorp.com:8301"},
- {"hashicorp.com:1234", true, "hashicorp.com:1234"},
- }
- for _, tt := range tests {
- t.Run(tt.addr, func(t *testing.T) {
- if got, want := hasPort(tt.addr), tt.hasPort; got != want {
- t.Fatalf("got %v want %v", got, want)
- }
- if got, want := ensurePort(tt.addr, 8301), tt.ensurePort; got != want {
- t.Fatalf("got %v want %v", got, want)
- }
- })
- }
-}
-
-func TestEncodeDecode(t *testing.T) {
- msg := &ping{SeqNo: 100}
- buf, err := encode(pingMsg, msg)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- var out ping
- if err := decode(buf.Bytes()[1:], &out); err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- if msg.SeqNo != out.SeqNo {
- t.Fatalf("bad sequence no")
- }
-}
-
-func TestRandomOffset(t *testing.T) {
- vals := make(map[int]struct{})
- for i := 0; i < 100; i++ {
- offset := randomOffset(2 << 30)
- if _, ok := vals[offset]; ok {
- t.Fatalf("got collision")
- }
- vals[offset] = struct{}{}
- }
-}
-
-func TestRandomOffset_Zero(t *testing.T) {
- offset := randomOffset(0)
- if offset != 0 {
- t.Fatalf("bad offset")
- }
-}
-
-func TestSuspicionTimeout(t *testing.T) {
- timeouts := map[int]time.Duration{
- 5: 1000 * time.Millisecond,
- 10: 1000 * time.Millisecond,
- 50: 1698 * time.Millisecond,
- 100: 2000 * time.Millisecond,
- 500: 2698 * time.Millisecond,
- 1000: 3000 * time.Millisecond,
- }
- for n, expected := range timeouts {
- timeout := suspicionTimeout(3, n, time.Second) / 3
- if timeout != expected {
- t.Fatalf("bad: %v, %v", expected, timeout)
- }
- }
-}
-
-func TestRetransmitLimit(t *testing.T) {
- lim := retransmitLimit(3, 0)
- if lim != 0 {
- t.Fatalf("bad val %v", lim)
- }
- lim = retransmitLimit(3, 1)
- if lim != 3 {
- t.Fatalf("bad val %v", lim)
- }
- lim = retransmitLimit(3, 99)
- if lim != 6 {
- t.Fatalf("bad val %v", lim)
- }
-}
-
-func TestShuffleNodes(t *testing.T) {
- orig := []*nodeState{
- &nodeState{
- State: stateDead,
- },
- &nodeState{
- State: stateAlive,
- },
- &nodeState{
- State: stateAlive,
- },
- &nodeState{
- State: stateDead,
- },
- &nodeState{
- State: stateAlive,
- },
- &nodeState{
- State: stateAlive,
- },
- &nodeState{
- State: stateDead,
- },
- &nodeState{
- State: stateAlive,
- },
- }
- nodes := make([]*nodeState, len(orig))
- copy(nodes[:], orig[:])
-
- if !reflect.DeepEqual(nodes, orig) {
- t.Fatalf("should match")
- }
-
- shuffleNodes(nodes)
-
- if reflect.DeepEqual(nodes, orig) {
- t.Fatalf("should not match")
- }
-}
-
-func TestPushPullScale(t *testing.T) {
- sec := time.Second
- for i := 0; i <= 32; i++ {
- if s := pushPullScale(sec, i); s != sec {
- t.Fatalf("Bad time scale: %v", s)
- }
- }
- for i := 33; i <= 64; i++ {
- if s := pushPullScale(sec, i); s != 2*sec {
- t.Fatalf("Bad time scale: %v", s)
- }
- }
- for i := 65; i <= 128; i++ {
- if s := pushPullScale(sec, i); s != 3*sec {
- t.Fatalf("Bad time scale: %v", s)
- }
- }
-}
-
-func TestMoveDeadNodes(t *testing.T) {
- nodes := []*nodeState{
- &nodeState{
- State: stateDead,
- StateChange: time.Now().Add(-20 * time.Second),
- },
- &nodeState{
- State: stateAlive,
- StateChange: time.Now().Add(-20 * time.Second),
- },
- // This dead node should not be moved, as its state changed
- // less than the specified GossipToTheDead time ago
- &nodeState{
- State: stateDead,
- StateChange: time.Now().Add(-10 * time.Second),
- },
- &nodeState{
- State: stateAlive,
- StateChange: time.Now().Add(-20 * time.Second),
- },
- &nodeState{
- State: stateDead,
- StateChange: time.Now().Add(-20 * time.Second),
- },
- &nodeState{
- State: stateAlive,
- StateChange: time.Now().Add(-20 * time.Second),
- },
- }
-
- idx := moveDeadNodes(nodes, (15 * time.Second))
- if idx != 4 {
- t.Fatalf("bad index")
- }
- for i := 0; i < idx; i++ {
- switch i {
- case 2:
- // Recently dead node remains at index 2,
- // since nodes are swapped out to move to end.
- if nodes[i].State != stateDead {
- t.Fatalf("Bad state %d", i)
- }
- default:
- if nodes[i].State != stateAlive {
- t.Fatalf("Bad state %d", i)
- }
- }
- }
- for i := idx; i < len(nodes); i++ {
- if nodes[i].State != stateDead {
- t.Fatalf("Bad state %d", i)
- }
- }
-}
-
-func TestKRandomNodes(t *testing.T) {
- nodes := []*nodeState{}
- for i := 0; i < 90; i++ {
- // Half the nodes are in a bad state
- state := stateAlive
- switch i % 3 {
- case 0:
- state = stateAlive
- case 1:
- state = stateSuspect
- case 2:
- state = stateDead
- }
- nodes = append(nodes, &nodeState{
- Node: Node{
- Name: fmt.Sprintf("test%d", i),
- },
- State: state,
- })
- }
-
- filterFunc := func(n *nodeState) bool {
- if n.Name == "test0" || n.State != stateAlive {
- return true
- }
- return false
- }
-
- s1 := kRandomNodes(3, nodes, filterFunc)
- s2 := kRandomNodes(3, nodes, filterFunc)
- s3 := kRandomNodes(3, nodes, filterFunc)
-
- if reflect.DeepEqual(s1, s2) {
- t.Fatalf("unexpected equal")
- }
- if reflect.DeepEqual(s1, s3) {
- t.Fatalf("unexpected equal")
- }
- if reflect.DeepEqual(s2, s3) {
- t.Fatalf("unexpected equal")
- }
-
- for _, s := range [][]*nodeState{s1, s2, s3} {
- if len(s) != 3 {
- t.Fatalf("bad len")
- }
- for _, n := range s {
- if n.Name == "test0" {
- t.Fatalf("Bad name")
- }
- if n.State != stateAlive {
- t.Fatalf("Bad state")
- }
- }
- }
-}
-
-func TestMakeCompoundMessage(t *testing.T) {
- msg := &ping{SeqNo: 100}
- buf, err := encode(pingMsg, msg)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- msgs := [][]byte{buf.Bytes(), buf.Bytes(), buf.Bytes()}
- compound := makeCompoundMessage(msgs)
-
- if compound.Len() != 3*buf.Len()+3*compoundOverhead+compoundHeaderOverhead {
- t.Fatalf("bad len")
- }
-}
-
-func TestDecodeCompoundMessage(t *testing.T) {
- msg := &ping{SeqNo: 100}
- buf, err := encode(pingMsg, msg)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- msgs := [][]byte{buf.Bytes(), buf.Bytes(), buf.Bytes()}
- compound := makeCompoundMessage(msgs)
-
- trunc, parts, err := decodeCompoundMessage(compound.Bytes()[1:])
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- if trunc != 0 {
- t.Fatalf("should not truncate")
- }
- if len(parts) != 3 {
- t.Fatalf("bad parts")
- }
- for _, p := range parts {
- if len(p) != buf.Len() {
- t.Fatalf("bad part len")
- }
- }
-}
-
-func TestDecodeCompoundMessage_Trunc(t *testing.T) {
- msg := &ping{SeqNo: 100}
- buf, err := encode(pingMsg, msg)
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- msgs := [][]byte{buf.Bytes(), buf.Bytes(), buf.Bytes()}
- compound := makeCompoundMessage(msgs)
-
- trunc, parts, err := decodeCompoundMessage(compound.Bytes()[1:38])
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
- if trunc != 1 {
- t.Fatalf("truncate: %d", trunc)
- }
- if len(parts) != 2 {
- t.Fatalf("bad parts")
- }
- for _, p := range parts {
- if len(p) != buf.Len() {
- t.Fatalf("bad part len")
- }
- }
-}
-
-func TestCompressDecompressPayload(t *testing.T) {
- buf, err := compressPayload([]byte("testing"))
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- decomp, err := decompressPayload(buf.Bytes()[1:])
- if err != nil {
- t.Fatalf("unexpected err: %s", err)
- }
-
- if !reflect.DeepEqual(decomp, []byte("testing")) {
- t.Fatalf("bad payload: %v", decomp)
- }
-}
diff --git a/vendor/github.com/icrowley/fake/addresses_test.go b/vendor/github.com/icrowley/fake/addresses_test.go
deleted file mode 100644
index 428e057a0..000000000
--- a/vendor/github.com/icrowley/fake/addresses_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestAddresses(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Continent()
- if v == "" {
- t.Errorf("Continent failed with lang %s", lang)
- }
-
- v = Country()
- if v == "" {
- t.Errorf("Country failed with lang %s", lang)
- }
-
- v = City()
- if v == "" {
- t.Errorf("City failed with lang %s", lang)
- }
-
- v = State()
- if v == "" {
- t.Errorf("State failed with lang %s", lang)
- }
-
- v = StateAbbrev()
- if v == "" && lang == "en" {
- t.Errorf("StateAbbrev failed with lang %s", lang)
- }
-
- v = Street()
- if v == "" {
- t.Errorf("Street failed with lang %s", lang)
- }
-
- v = StreetAddress()
- if v == "" {
- t.Errorf("StreetAddress failed with lang %s", lang)
- }
-
- v = Zip()
- if v == "" {
- t.Errorf("Zip failed with lang %s", lang)
- }
-
- v = Phone()
- if v == "" {
- t.Errorf("Phone failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/credit_cards_test.go b/vendor/github.com/icrowley/fake/credit_cards_test.go
deleted file mode 100644
index 97abe1d1b..000000000
--- a/vendor/github.com/icrowley/fake/credit_cards_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestCreditCards(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := CreditCardType()
- if v == "" {
- t.Errorf("CreditCardType failed with lang %s", lang)
- }
-
- v = CreditCardNum("")
- if v == "" {
- t.Errorf("CreditCardNum failed with lang %s", lang)
- }
-
- v = CreditCardNum("visa")
- if v == "" {
- t.Errorf("CreditCardNum failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/currencies_test.go b/vendor/github.com/icrowley/fake/currencies_test.go
deleted file mode 100644
index f3a07ae8e..000000000
--- a/vendor/github.com/icrowley/fake/currencies_test.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestCurrencies(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Currency()
- if v == "" {
- t.Errorf("Currency failed with lang %s", lang)
- }
-
- v = CurrencyCode()
- if v == "" {
- t.Errorf("CurrencyCode failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/data/en/adjectives b/vendor/github.com/icrowley/fake/data/en/adjectives
deleted file mode 100644
index 1d192c847..000000000
--- a/vendor/github.com/icrowley/fake/data/en/adjectives
+++ /dev/null
@@ -1,19 +0,0 @@
-Air
-Gel
-Auto
-Power
-Tag
-Audible
-HD
-GPS
-Portable
-Disc
-Electric
-Performance
-Side
-Video
-Input
-Output
-Direct
-Remote
-Digital
diff --git a/vendor/github.com/icrowley/fake/data/en/characters b/vendor/github.com/icrowley/fake/data/en/characters
deleted file mode 100644
index c1f9993da..000000000
--- a/vendor/github.com/icrowley/fake/data/en/characters
+++ /dev/null
@@ -1,36 +0,0 @@
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
diff --git a/vendor/github.com/icrowley/fake/data/en/cities b/vendor/github.com/icrowley/fake/data/en/cities
deleted file mode 100644
index 2a83c0f96..000000000
--- a/vendor/github.com/icrowley/fake/data/en/cities
+++ /dev/null
@@ -1,478 +0,0 @@
-Adelanto
-Agoura Hills
-Alameda
-Albany
-Alhambra
-Aliso Viejo
-Alturas
-Amador City
-American Canyon
-Anaheim
-Anderson
-Angels Camp
-Antioch
-Apple Valley
-Arcadia
-Arcata
-Arroyo Grande
-Artesia
-Arvin
-Atascadero
-Atherton
-Atwater
-Auburn
-Avalon
-Avenal
-Azusa
-Bakersfield
-Baldwin Park
-Banning
-Barstow
-Beaumont
-Bell
-Bell Gardens
-Bellflower
-Belmont
-Belvedere
-Benicia
-Berkeley
-Beverly Hills
-Big Bear Lake
-Biggs
-Bishop
-Blue Lake
-Blythe
-Bradbury
-Brawley
-Brea
-Brentwood
-Brisbane
-Buellton
-Buena Park
-Burbank
-Burlingame
-Calabasas
-Calexico
-California City
-Calimesa
-Calipatria
-Calistoga
-Camarillo
-Canyon Lake
-Capitola
-Carlsbad
-Carmel-by-the-Sea
-Carpinteria
-Carson
-Cathedral City
-Ceres
-Cerritos
-Chico
-Chino
-Chino Hills
-Chowchilla
-Chula Vista
-Citrus Heights
-Claremont
-Clayton
-Clearlake
-Cloverdale
-Clovis
-Coachella
-Coalinga
-Colfax
-Colma
-Colton
-Colusa
-City of Commerce
-Compton
-Concord
-Corcoran
-Corning
-Corona
-Coronado
-Corte Madera
-Costa Mesa
-Cotati
-Covina
-Crescent City
-Cudahy
-Culver City
-Cupertino
-Cypress
-Daly City
-Dana Point
-Danville
-Davis
-Del Mar
-Del Rey Oaks
-Delano
-Desert Hot Springs
-Diamond Bar
-Dinuba
-Dixon
-Dorris
-Dos Palos
-Downey
-Duarte
-Dublin
-Dunsmuir
-East Palo Alto
-El Cajon
-El Centro
-El Cerrito
-El Monte
-El Segundo
-Elk Grove
-Emeryville
-Encinitas
-Escalon
-Escondido
-Etna
-Eureka
-Exeter
-Fairfax
-Fairfield
-Farmersville
-Ferndale
-Fillmore
-Firebaugh
-Folsom
-Fontana
-Fort Bragg
-Fort Jones
-Fortuna
-Foster City
-Fountain Valley
-Fowler
-Fremont
-Fresno
-Fullerton
-Galt
-Garden Grove
-Gardena
-Gilroy
-Glendale
-Glendora
-Goleta
-Gonzales
-Grand Terrace
-Grass Valley
-Greenfield
-Gridley
-Grover Beach
-Guadalupe
-Gustine
-Half Moon Bay
-Hanford
-Hawaiian Gardens
-Hawthorne
-Hayward
-Healdsburg
-Hemet
-Hercules
-Hermosa Beach
-Hesperia
-Hidden Hills
-Highland
-Hillsborough
-Hollister
-Holtville
-Hughson
-Huntington Beach
-Huntington Park
-Huron
-Imperial
-Imperial Beach
-Indian Wells
-Indio
-City of Industry
-Inglewood
-Ione
-Irvine
-Irwindale
-Isleton
-Jackson
-Kerman
-King City
-Kingsburg
-La Cañada Flintridge
-La Habra
-La Habra Heights
-La Mesa
-La Mirada
-La Palma
-La Puente
-La Quinta
-La Verne
-Lafayette
-Laguna Beach
-Laguna Hills
-Laguna Niguel
-Laguna Woods
-Lake Elsinore
-Lake Forest
-Lakeport
-Lakewood
-Lancaster
-Larkspur
-Lathrop
-Lawndale
-Lemon Grove
-Lemoore
-Lincoln
-Lindsay
-Live Oak
-Livermore
-Livingston
-Lodi
-Loma Linda
-Lomita
-Lompoc
-Long Beach
-Loomis
-Los Alamitos
-Los Altos
-Los Altos Hills
-Los Angeles
-Los Banos
-Los Gatos
-Loyalton
-Lynwood
-Madera
-Malibu
-Mammoth Lakes
-Manhattan Beach
-Manteca
-Maricopa
-Marina
-Martinez
-Marysville
-Maywood
-McFarland
-Mendota
-Menlo Park
-Menifee
-Merced
-Mill Valley
-Millbrae
-Milpitas
-Mission Viejo
-Modesto
-Monrovia
-Montague
-Montclair
-Monte Sereno
-Montebello
-Monterey
-Monterey Park
-Moorpark
-Moraga
-Moreno Valley
-Morgan Hill
-Morro Bay
-Mount Shasta
-Mountain View
-Murrieta
-Napa
-National City
-Needles
-Nevada City
-Newark
-Newman
-Newport Beach
-Norco
-Norwalk
-Novato
-Oakdale
-Oakland
-Oakley
-Oceanside
-Ojai
-Ontario
-Orange
-Orange Cove
-Orinda
-Orland
-Oroville
-Oxnard
-Pacific Grove
-Pacifica
-Palm Desert
-Palm Springs
-Palmdale
-Palo Alto
-Palos Verdes Estates
-Paradise
-Paramount
-Parlier
-Pasadena
-Paso Robles
-Patterson
-Perris
-Petaluma
-Pico Rivera
-Piedmont
-Pinole
-Pismo Beach
-Pittsburg
-Placentia
-Placerville
-Pleasant Hill
-Pleasanton
-Plymouth
-Point Arena
-Pomona
-Port Hueneme
-Porterville
-Portola
-Portola Valley
-Poway
-Rancho Cordova
-Rancho Cucamonga
-Rancho Mirage
-Rancho Palos Verdes
-Rancho Santa Margarita
-Red Bluff
-Redding
-Redlands
-Redondo Beach
-Redwood City
-Reedley
-Rialto
-Richmond
-Ridgecrest
-Rio Dell
-Rio Vista
-Ripon
-Riverbank
-Riverside
-Rocklin
-Rohnert Park
-Rolling Hills
-Rolling Hills Estates
-Rosemead
-Roseville
-Ross
-Sacramento
-Salinas
-San Anselmo
-San Bernardino
-San Bruno
-San Carlos
-San Clemente
-San Diego
-San Dimas
-San Fernando
-San Francisco
-San Gabriel
-San Jacinto
-San Joaquin
-San Jose
-San Juan Bautista
-San Juan Capistrano
-San Leandro
-San Luis Obispo
-San Marcos
-San Marino
-San Mateo
-San Pablo
-San Rafael
-San Ramon
-Sand City
-Sanger
-Santa Ana
-Santa Barbara
-Santa Clara
-Santa Clarita
-Santa Cruz
-Santa Fe Springs
-Santa Maria
-Santa Monica
-Santa Paula
-Santa Rosa
-Santee
-Saratoga
-Sausalito
-Scotts Valley
-Seal Beach
-Seaside
-Sebastopol
-Selma
-Shafter
-Shasta Lake
-Sierra Madre
-Signal Hill
-Simi Valley
-Solana Beach
-Soledad
-Solvang
-Sonoma
-Sonora
-South El Monte
-South Gate
-South Lake Tahoe
-South Pasadena
-South San Francisco
-St. Helena
-Stanton
-Stockton
-Studio City
-Suisun City
-Sunnyvale
-Susanville
-Sutter Creek
-Taft
-Tehachapi
-Tehama
-Temecula
-Temple City
-Thousand Oaks
-Tiburon
-Torrance
-Tracy
-Trinidad
-Truckee
-Tulare
-Tulelake
-Turlock
-Tustin
-Twentynine Palms
-Ukiah
-Union City
-Upland
-Vacaville
-Vallejo
-Ventura
-Vernon
-Victorville
-Villa Park
-Visalia
-Vista
-Walnut
-Walnut Creek
-Wasco
-Waterford
-Watsonville
-Weed
-West Covina
-West Sacramento
-Westlake Village
-Westminster
-Westmorland
-Wheatland
-Whittier
-Williams
-Willits
-Willows
-Windsor
-Winters
-Woodlake
-Woodland
-Woodside
-Yorba Linda
-Yountville
-Yreka
-Yuba City
-Yucaipa
-Yucca Valley \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/colors b/vendor/github.com/icrowley/fake/data/en/colors
deleted file mode 100644
index d2e269026..000000000
--- a/vendor/github.com/icrowley/fake/data/en/colors
+++ /dev/null
@@ -1,19 +0,0 @@
-Red
-Blue
-Green
-Yellow
-Orange
-Purple
-Violet
-Indigo
-Teal
-Pink
-Fuscia
-Goldenrod
-Mauv
-Aquamarine
-Turquoise
-Crimson
-Maroon
-Puce
-Khaki \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/companies b/vendor/github.com/icrowley/fake/data/en/companies
deleted file mode 100644
index 6b25808c5..000000000
--- a/vendor/github.com/icrowley/fake/data/en/companies
+++ /dev/null
@@ -1,399 +0,0 @@
-Kwilith
-Eayo
-Voolith
-Eabox
-Gigabox
-Meeveo
-Yombu
-Eire
-Oyonder
-Dynazzy
-Demimbu
-Wikizz
-InnoZ
-Pixonyx
-Snaptags
-Yamia
-Avamm
-Centimia
-Abata
-Feedmix
-Fadeo
-Thoughtbridge
-Thoughtmix
-Agivu
-Janyx
-Bubblemix
-Divape
-Leenti
-Buzzbean
-Agimba
-Jaxspan
-Skyvu
-Flipstorm
-Browseblab
-Edgepulse
-Cogibox
-Lajo
-Realbridge
-Twimm
-Kwinu
-Thoughtstorm
-Flipopia
-Dabshots
-Npath
-Avavee
-BlogXS
-Layo
-Skyba
-Jabbersphere
-Thoughtblab
-Skinix
-Photolist
-Innojam
-Skinder
-Oyope
-Wikizz
-Babbleblab
-Rhyzio
-Yambee
-Divanoodle
-Babbleset
-Topicware
-Yodoo
-Devpoint
-Edgeblab
-Devshare
-Trudoo
-Cogidoo
-Blogpad
-Voonder
-Mynte
-Fatz
-Gabtune
-Mybuzz
-Kayveo
-Kazu
-Vinte
-Photojam
-Meetz
-Zooveo
-Photobug
-Oyoba
-Realcube
-Livefish
-Kare
-Jayo
-Brightbean
-Livepath
-Skynoodle
-Devify
-Dabjam
-Katz
-Zoomzone
-Jaloo
-Browsebug
-Shuffledrive
-Meezzy
-Fivebridge
-Gabspot
-Roomm
-Fivechat
-Blogtag
-Zoonoodle
-Kanoodle
-Camido
-Yadel
-Yodo
-Topicstorm
-Jabbertype
-Jatri
-Kwideo
-Izio
-Voomm
-Jaxbean
-Skipstorm
-Mita
-Gigaclub
-Skimia
-Blogtags
-Vitz
-Dynava
-Jetwire
-Miboo
-Quimba
-Einti
-Oba
-JumpXS
-Voonix
-Jabberstorm
-Thoughtstorm
-Myworks
-Devbug
-Linkbridge
-Dabfeed
-Meembee
-Skiba
-Yoveo
-Eazzy
-Photobug
-Edgeclub
-Oyondu
-Flipbug
-Pixoboo
-Zava
-Tagtune
-Zoombox
-Eidel
-Jaxnation
-Twitterworks
-Wordpedia
-Feednation
-DabZ
-Mudo
-Talane
-Twitterbridge
-Trilith
-Meemm
-Pixope
-Twitterlist
-Ooba
-Trudeo
-Brainverse
-Gigashots
-Rhynoodle
-Realfire
-Yata
-Realblab
-Jetpulse
-Yakidoo
-Tagpad
-Edgewire
-Yacero
-Blognation
-Avaveo
-Oloo
-Lazz
-Flashspan
-Skipfire
-Rooxo
-Realbuzz
-Muxo
-Jayo
-Topdrive
-Ntag
-Topicblab
-Meedoo
-Demizz
-Bluezoom
-Tagfeed
-Kamba
-Mycat
-Dynabox
-Brightdog
-Youspan
-Edgetag
-Roombo
-Feedbug
-Meejo
-Flashpoint
-Youbridge
-Gabvine
-Quatz
-Quire
-Camimbo
-Aibox
-Meevee
-Gabcube
-Browsetype
-Shuffletag
-Minyx
-Digitube
-Innotype
-Centidel
-Buzzdog
-Jazzy
-Divavu
-Browsedrive
-Voonte
-Quinu
-Quaxo
-Youopia
-Wordify
-Skivee
-Zoomcast
-Skippad
-Vidoo
-Shufflester
-Linklinks
-Youspan
-Quinu
-Topiclounge
-Feedfish
-Oozz
-Centizu
-Skiptube
-Vipe
-Zoomdog
-Twimbo
-Lazzy
-Nlounge
-Skidoo
-Teklist
-Kimia
-Twitterwire
-Mynte
-Thoughtsphere
-Rhycero
-Fivespan
-Shufflebeat
-Skyble
-Photospace
-Quimm
-Rhynyx
-Skaboo
-Latz
-Kwimbee
-Fliptune
-LiveZ
-Geba
-Wordtune
-Voolia
-Roodel
-Ainyx
-Zoonder
-Wikivu
-Linkbuzz
-Abatz
-Devpulse
-Trunyx
-Ozu
-Zoomlounge
-Mydo
-Tagcat
-Devcast
-Jabbercube
-Skilith
-Realpoint
-Quamba
-Wordware
-Gabtype
-Youtags
-Voomm
-Rhybox
-Tazz
-Riffpedia
-Babbleopia
-Zoombeat
-Photobean
-Zoozzy
-Twiyo
-Trupe
-Feedspan
-Mydeo
-Ntags
-Tekfly
-Tavu
-Riffwire
-Cogilith
-Topiczoom
-Jaxworks
-Tagchat
-Trilia
-Kaymbo
-Yodel
-Eare
-Gigazoom
-Dabtype
-Chatterpoint
-Plajo
-Tagopia
-Wikido
-Twinder
-Zooxo
-Linktype
-Skajo
-Riffpath
-Avamba
-Edgeify
-Midel
-Yozio
-Mymm
-Babblestorm
-Youfeed
-Wikibox
-Skinte
-Brainsphere
-Zoovu
-Flashset
-Ailane
-Zazio
-Brainlounge
-Bubblebox
-Quatz
-Bubbletube
-Browsezoom
-Dazzlesphere
-Feedfire
-Yakijo
-Voonyx
-Dabvine
-Skibox
-Buzzster
-Plambee
-Realcube
-Dynabox
-Jabbersphere
-Demivee
-Oyoyo
-Tanoodle
-Jamia
-Skimia
-Brainbox
-Thoughtworks
-Yotz
-Blogspan
-Eimbee
-Aivee
-Yabox
-Realmix
-Buzzshare
-Omba
-Chatterbridge
-Skyndu
-Browsecat
-Twitternation
-Fanoodle
-Twitterbeat
-Tambee
-Jabberbean
-Livetube
-Livetube
-Viva
-Vimbo
-Podcat
-Dablist
-Leexo
-Kazio
-Twinte
-Aimbo
-Rhyloo
-Flashdog
-Meevee
-Thoughtbeat
-Gevee
-Vinder
-Eamia
-Fiveclub
-Oodoo
-Tazzy
-Katz
-Bluejam
-Skalith
-Oyoloo
-Aimbu
-Photofeed
-Yakitri
-Topicshots
-Reallinks
-Eadel \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/continents b/vendor/github.com/icrowley/fake/data/en/continents
deleted file mode 100644
index f346d25e7..000000000
--- a/vendor/github.com/icrowley/fake/data/en/continents
+++ /dev/null
@@ -1,7 +0,0 @@
-Asia
-North America
-South America
-Australia
-Africa
-Europe
-Antarctica
diff --git a/vendor/github.com/icrowley/fake/data/en/countries b/vendor/github.com/icrowley/fake/data/en/countries
deleted file mode 100644
index 4348a4ecb..000000000
--- a/vendor/github.com/icrowley/fake/data/en/countries
+++ /dev/null
@@ -1,249 +0,0 @@
-Afghanistan
-Ã…land
-Albania
-Algeria
-American Samoa
-Andorra
-Angola
-Anguilla
-Antarctica
-Antigua and Barbuda
-Argentina
-Armenia
-Aruba
-Ascension Island
-Australia
-Austria
-Azerbaijan
-Bahamas
-Bahrain
-Bangladesh
-Barbados
-Belarus
-Belgium
-Belize
-Benin
-Bermuda
-Bhutan
-Bolivia
-Bosnia and Herzegovina
-Botswana
-Bouvet Island
-Brazil
-British Virgin Islands
-British Indian Ocean Territory
-Brunei Darussalam
-Bulgaria
-Burkina Faso
-Burundi
-Cambodia
-Cameroon
-Canada
-Cape Verde
-Cayman Islands
-Central African Republic
-Chad
-Chile
-China
-Christmas Island
-Cocos (Keeling) Island
-Colombia
-Comoros
-Congo, Republic of
-Congo, Democratic Republic of
-Cook Islands
-Costa Rica
-Cote d'Ivoire
-Croatia
-Cuba
-Cyprus
-Czech Republic
-Denmark
-Djibouti
-Dominica
-Dominican Republic
-Ecuador
-Egypt
-El Salvador
-Equatorial Guinea
-Eritrea
-Estonia
-Ethiopia
-Falkland Islands (Malvinas)
-Faroe Islands
-Fiji
-Finland
-France
-French Guiana
-French Polynesia
-French Southern Territories
-Gabon
-Gambia
-Georgia
-Germany
-Ghana
-Gibraltar
-Greece
-Greenland
-Grenada
-Guadeloupe
-Guam
-Guatemala
-Guernsey
-Guinea
-Guinea-Bissau
-Guyana
-Haiti
-Heard and McDonald Islands
-Honduras
-Hong Kong
-Hungary
-Iceland
-India
-Indonesia
-Iran
-Iraq
-Ireland
-Isle of Man
-Israel
-Italy
-Jamaica
-Japan
-Jersey
-Jordan
-Kazakhstan
-Kenya
-Kiribati
-Korea, North
-Korea, South
-Kuwait
-Kyrgyzstan
-Laos
-Latvia
-Lebanon
-Lesotho
-Liberia
-Libya
-Liechtenstein
-Lithuania
-Luxembourg
-Macau
-Macedonia
-Madagascar
-Malawi
-Malaysia
-Maldives
-Mali
-Malta
-Marshall Islands
-Martinique
-Mauritania
-Mauritius
-Mayotte
-Mexico
-Micronesia
-Moldova
-Monaco
-Mongolia
-Montenegro
-Montserrat
-Morocco
-Mozambique
-Myanmar
-Namibia
-Nauru
-Nepal
-Netherlands
-Netherlands Antilles
-New Caledonia
-New Zealand
-Nicaragua
-Niue
-Niger
-Nigeria
-Norfolk Island
-Northern Mariana Islands
-Norway
-Oman
-Pakistan
-Palau
-Palestinian Territory, Occupied
-Panama
-Papua New Guinea
-Paraguay
-Peru
-Philippines
-Pitcairn Island
-Poland
-Portugal
-Puerto Rico
-Qatar
-Reunion
-Romania
-Russia
-Rwanda
-Saint Barthelemy
-Saint Helena
-Saint Kitts and Nevis
-Saint Lucia
-Saint Martin
-Saint Pierre and Miquelon
-Saint Vincent and the Grenadines
-Samoa
-San Marino
-Sao Tome and Principe
-Saudia Arabia
-Senegal
-Serbia
-Seychelles
-Sierra Leone
-Singapore
-Slovakia
-Slovenia
-Solomon Islands
-Somalia
-South Africa
-South Georgia and the South Sandwich Islands
-Spain
-Sri Lanka
-Sudan
-Suriname
-Svalbard and Jan Mayen Islands
-Swaziland
-Sweden
-Switzerland
-Syria
-Taiwan
-Tajikistan
-Tanzania
-Thailand
-Timor-Leste
-Togo
-Tokelau
-Tonga
-Trinidad and Tobago
-Tunisia
-Turkey
-Turkmenistan
-Turks and Caicos Islands
-Tuvalu
-Uganda
-Ukraine
-United Arab Emirates
-United Kingdom
-United States of America
-United States Virgin Islands
-Uruguay
-US Minor Outlying Islands
-USSR
-Uzbekistan
-Vanuatu
-Vatican City State (Holy See)
-Venezuela
-Vietnam
-Wallis and Futuna Islands
-Western Sahara
-Yemen
-Yugoslavia
-Zambia
-Zimbabwe \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/currencies b/vendor/github.com/icrowley/fake/data/en/currencies
deleted file mode 100644
index 8176e7713..000000000
--- a/vendor/github.com/icrowley/fake/data/en/currencies
+++ /dev/null
@@ -1,106 +0,0 @@
-Afghanistan Afghanis
-Albania Leke
-Algeria Dinars
-America (United States) Dollars
-Argentina Pesos
-Australia Dollars
-Austria Schillings
-Bahamas Dollars
-Bahrain Dinars
-Bangladesh Taka
-Barbados Dollars
-Belgium Francs
-Bermuda Dollars
-Brazil Reais
-Bulgaria Leva
-Canada Dollars
-CFA BCEAO Francs
-CFA BEAC Francs
-Chile Pesos
-China Yuan Renminbi
-RMB (China Yuan Renminbi)
-Colombia Pesos
-CFP Francs
-Costa Rica Colones
-Croatia Kuna
-Cyprus Pounds
-Czech Republic Koruny
-Denmark Kroner
-Deutsche (Germany) Marks
-Dominican Republic Pesos
-Dutch (Netherlands) Guilders
-Eastern Caribbean Dollars
-Egypt Pounds
-Estonia Krooni
-Euros
-Fiji Dollars
-Finland Markkaa
-France Francs
-Germany Deutsche Marks
-Gold Ounces
-Greece Drachmae
-Holland (Netherlands) Guilders
-Hong Kong Dollars
-Hungary Forint
-Iceland Kronur
-IMF Special Drawing Right
-India Rupees
-Indonesia Rupiahs
-Iran Rials
-Iraq Dinars
-Ireland Pounds
-Israel New Shekels
-Italy Lire
-Jamaica Dollars
-Japan Yen
-Jordan Dinars
-Kenya Shillings
-Korea (South) Won
-Kuwait Dinars
-Lebanon Pounds
-Luxembourg Francs
-Malaysia Ringgits
-Malta Liri
-Mauritius Rupees
-Mexico Pesos
-Morocco Dirhams
-Netherlands Guilders
-New Zealand Dollars
-Norway Kroner
-Oman Rials
-Pakistan Rupees
-Palladium Ounces
-Peru Nuevos Soles
-Philippines Pesos
-Platinum Ounces
-Polish Zloty
-Portugal Escudos
-Qatar Riyals
-Romania New Lei
-Romania Lei
-Russia Rubles
-Saudi Arabia Riyals
-Silver Ounces
-Singapore Dollars
-Slovakia Koruny
-Slovenia Tolars
-South Africa Rand
-South Korea Won
-Spain Pesetas
-Special Drawing Rights (IMF)
-Sri Lanka Rupees
-Sudan Pounds
-Sweden Kronor
-Switzerland Francs
-Taiwan New Dollars
-Thailand Baht
-Trinidad and Tobago Dollars
-Tunisia Dinars
-Turkey Lira
-United Arab Emirates Dirhams
-United Kingdom Pounds
-United States Dollars
-Venezuela Bolivares
-Venezuela Bolivares Fuertes
-Vietnam Dong
-Zambia Kwacha
diff --git a/vendor/github.com/icrowley/fake/data/en/currency_codes b/vendor/github.com/icrowley/fake/data/en/currency_codes
deleted file mode 100644
index 3995349e4..000000000
--- a/vendor/github.com/icrowley/fake/data/en/currency_codes
+++ /dev/null
@@ -1,130 +0,0 @@
-EUR
-USD
-GBP
-CAD
-AUD
-JPY
-INR
-NZD
-CHF
-ZAR
-EUR
-AFN
-ALL
-DZD
-USD
-ARS
-AUD
-ATS
-BSD
-BHD
-BDT
-BBD
-BEF
-BMD
-BRL
-BGN
-CAD
-XOF
-XAF
-CLP
-CNY
-CNY
-COP
-XPF
-CRC
-HRK
-CYP
-CZK
-DKK
-DEM
-DOP
-NLG
-XCD
-EGP
-EEK
-EUR
-FJD
-FIM
-FRF
-DEM
-XAU
-GRD
-NLG
-HKD
-HUF
-ISK
-XDR
-INR
-IDR
-IRR
-IQD
-IEP
-ILS
-ITL
-JMD
-JPY
-JOD
-KES
-KRW
-KWD
-LBP
-LUF
-MYR
-MTL
-MUR
-MXN
-MAD
-NLG
-NZD
-NOK
-OMR
-PKR
-XPD
-PEN
-PHP
-XPT
-PLN
-PTE
-QAR
-RON
-ROL
-RUB
-SAR
-XAG
-SGD
-SKK
-SIT
-ZAR
-KRW
-ESP
-XDR
-LKR
-SDG
-SEK
-CHF
-TWD
-THB
-TTD
-TND
-TRY
-AED
-GBP
-USD
-VEB
-VEF
-VND
-ZMK
-EUR
-XAF
-XOF
-XPF
-XCD
-EUR
-XDR
-XAU
-XAG
-XAU
-XPT
-XPD
-EUR \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/domain_zones b/vendor/github.com/icrowley/fake/data/en/domain_zones
deleted file mode 100644
index 53dc50ff3..000000000
--- a/vendor/github.com/icrowley/fake/data/en/domain_zones
+++ /dev/null
@@ -1,251 +0,0 @@
-ac
-ad
-ae
-af
-ag
-ai
-al
-am
-an
-ao
-aq
-ar
-as
-at
-au
-aw
-ax
-az
-ba
-bb
-bd
-be
-bf
-bg
-bh
-bi
-bj
-bl
-bm
-bn
-bo
-br
-bs
-bt
-bv
-bw
-by
-bz
-ca
-cc
-cd
-cf
-cg
-ch
-ci
-ck
-cl
-cm
-cn
-co
-cr
-cu
-cv
-cx
-cy
-cz
-de
-dj
-dk
-dm
-do
-dz
-ec
-ee
-eg
-eh
-er
-es
-et
-eu
-fi
-fj
-fk
-fm
-fo
-fr
-ga
-gb
-gd
-ge
-gf
-gg
-gh
-gi
-gl
-gm
-gn
-gp
-gq
-gr
-gs
-gt
-gu
-gw
-gy
-hk
-hm
-hn
-hr
-ht
-hu
-id
-ie
-il
-im
-in
-io
-iq
-ir
-is
-it
-je
-jm
-jo
-jp
-ke
-kg
-kh
-ki
-km
-kn
-kp
-kr
-kw
-ky
-kz
-la
-lb
-lc
-li
-lk
-lr
-ls
-lt
-lu
-lv
-ly
-ma
-mc
-md
-me
-mg
-mh
-mk
-ml
-mm
-mn
-mo
-mp
-mq
-mr
-ms
-mt
-mu
-mv
-mw
-mx
-my
-mz
-na
-nc
-ne
-nf
-ng
-ni
-nl
-no
-np
-nr
-nu
-nz
-om
-pa
-pe
-pf
-pg
-ph
-pk
-pl
-pm
-pn
-pr
-ps
-pt
-pw
-py
-qa
-re
-ro
-rs
-ru
-rw
-sa
-sb
-sc
-sd
-se
-sg
-sh
-si
-sj
-sk
-sl
-sm
-sn
-so
-sr
-st
-su
-sv
-sy
-sz
-tc
-td
-tf
-tg
-th
-tj
-tk
-tl
-tm
-tn
-to
-tp
-tr
-tt
-tv
-tw
-tz
-ua
-ug
-uk
-um
-us
-uy
-uz
-va
-vc
-ve
-vg
-vi
-vn
-vu
-wf
-ws
-ye
-yt
-yu
-za
-zm
-zw
diff --git a/vendor/github.com/icrowley/fake/data/en/female_first_names b/vendor/github.com/icrowley/fake/data/en/female_first_names
deleted file mode 100644
index 39cebece4..000000000
--- a/vendor/github.com/icrowley/fake/data/en/female_first_names
+++ /dev/null
@@ -1,100 +0,0 @@
-Mary
-Patricia
-Linda
-Barbara
-Elizabeth
-Jennifer
-Maria
-Susan
-Margaret
-Dorothy
-Lisa
-Nancy
-Karen
-Betty
-Helen
-Sandra
-Donna
-Carol
-Ruth
-Sharon
-Michelle
-Laura
-Sarah
-Kimberly
-Deborah
-Jessica
-Shirley
-Cynthia
-Angela
-Melissa
-Brenda
-Amy
-Anna
-Rebecca
-Virginia
-Kathleen
-Pamela
-Martha
-Debra
-Amanda
-Stephanie
-Carolyn
-Christine
-Marie
-Janet
-Catherine
-Frances
-Ann
-Joyce
-Diane
-Alice
-Julie
-Heather
-Teresa
-Doris
-Gloria
-Evelyn
-Jean
-Cheryl
-Mildred
-Katherine
-Joan
-Ashley
-Judith
-Rose
-Janice
-Kelly
-Nicole
-Judy
-Christina
-Kathy
-Theresa
-Beverly
-Denise
-Tammy
-Irene
-Jane
-Lori
-Rachel
-Marilyn
-Andrea
-Kathryn
-Louise
-Sara
-Anne
-Jacqueline
-Wanda
-Bonnie
-Julia
-Ruby
-Lois
-Tina
-Phyllis
-Norma
-Paula
-Diana
-Annie
-Lillian
-Emily
-Robin \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/female_last_names b/vendor/github.com/icrowley/fake/data/en/female_last_names
deleted file mode 100644
index af5699b16..000000000
--- a/vendor/github.com/icrowley/fake/data/en/female_last_names
+++ /dev/null
@@ -1,250 +0,0 @@
-Smith
-Johnson
-Williams
-Jones
-Brown
-Davis
-Miller
-Wilson
-Moore
-Taylor
-Anderson
-Thomas
-Jackson
-White
-Harris
-Martin
-Thompson
-Garcia
-Martinez
-Robinson
-Clark
-Rodriguez
-Lewis
-Lee
-Walker
-Hall
-Allen
-Young
-Hernandez
-King
-Wright
-Lopez
-Hill
-Scott
-Green
-Adams
-Baker
-Gonzalez
-Nelson
-Carter
-Mitchell
-Perez
-Roberts
-Turner
-Phillips
-Campbell
-Parker
-Evans
-Edwards
-Collins
-Stewart
-Sanchez
-Morris
-Rogers
-Reed
-Cook
-Morgan
-Bell
-Murphy
-Bailey
-Rivera
-Cooper
-Richardson
-Cox
-Howard
-Ward
-Torres
-Peterson
-Gray
-Ramirez
-James
-Watson
-Brooks
-Kelly
-Sanders
-Price
-Bennett
-Wood
-Barnes
-Ross
-Henderson
-Coleman
-Jenkins
-Perry
-Powell
-Long
-Patterson
-Hughes
-Flores
-Washington
-Butler
-Simmons
-Foster
-Gonzales
-Bryant
-Alexander
-Russell
-Griffin
-Diaz
-Hayes
-Myers
-Ford
-Hamilton
-Graham
-Sullivan
-Wallace
-Woods
-Cole
-West
-Jordan
-Owens
-Reynolds
-Fisher
-Ellis
-Harrison
-Gibson
-Mcdonald
-Cruz
-Marshall
-Ortiz
-Gomez
-Murray
-Freeman
-Wells
-Webb
-Simpson
-Stevens
-Tucker
-Porter
-Hunter
-Hicks
-Crawford
-Henry
-Boyd
-Mason
-Morales
-Kennedy
-Warren
-Dixon
-Ramos
-Reyes
-Burns
-Gordon
-Shaw
-Holmes
-Rice
-Robertson
-Hunt
-Black
-Daniels
-Palmer
-Mills
-Nichols
-Grant
-Knight
-Ferguson
-Rose
-Stone
-Hawkins
-Dunn
-Perkins
-Hudson
-Spencer
-Gardner
-Stephens
-Payne
-Pierce
-Berry
-Matthews
-Arnold
-Wagner
-Willis
-Ray
-Watkins
-Olson
-Carroll
-Duncan
-Snyder
-Hart
-Cunningham
-Bradley
-Lane
-Andrews
-Ruiz
-Harper
-Fox
-Riley
-Armstrong
-Carpenter
-Weaver
-Greene
-Lawrence
-Elliott
-Chavez
-Sims
-Austin
-Peters
-Kelley
-Franklin
-Lawson
-Fields
-Gutierrez
-Ryan
-Schmidt
-Carr
-Vasquez
-Castillo
-Wheeler
-Chapman
-Oliver
-Montgomery
-Richards
-Williamson
-Johnston
-Banks
-Meyer
-Bishop
-Mccoy
-Howell
-Alvarez
-Morrison
-Hansen
-Fernandez
-Garza
-Harvey
-Little
-Burton
-Stanley
-Nguyen
-George
-Jacobs
-Reid
-Kim
-Fuller
-Lynch
-Dean
-Gilbert
-Garrett
-Romero
-Welch
-Larson
-Frazier
-Burke
-Hanson
-Day
-Mendoza
-Moreno
-Bowman
-Medina
-Fowler \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/female_name_prefixes b/vendor/github.com/icrowley/fake/data/en/female_name_prefixes
deleted file mode 100644
index 548d49622..000000000
--- a/vendor/github.com/icrowley/fake/data/en/female_name_prefixes
+++ /dev/null
@@ -1 +0,0 @@
-Mrs. Ms. Miss
diff --git a/vendor/github.com/icrowley/fake/data/en/female_name_suffixes b/vendor/github.com/icrowley/fake/data/en/female_name_suffixes
deleted file mode 100644
index e4fdc502d..000000000
--- a/vendor/github.com/icrowley/fake/data/en/female_name_suffixes
+++ /dev/null
@@ -1 +0,0 @@
-I II III IV V MD DDS PhD DVM
diff --git a/vendor/github.com/icrowley/fake/data/en/female_patronymics b/vendor/github.com/icrowley/fake/data/en/female_patronymics
deleted file mode 100644
index 4b563cd62..000000000
--- a/vendor/github.com/icrowley/fake/data/en/female_patronymics
+++ /dev/null
@@ -1,100 +0,0 @@
-James
-John
-Robert
-Michael
-William
-David
-Richard
-Charles
-Joseph
-Thomas
-Christopher
-Daniel
-Paul
-Mark
-Donald
-George
-Kenneth
-Steven
-Edward
-Brian
-Ronald
-Anthony
-Kevin
-Jason
-Matthew
-Gary
-Timothy
-Jose
-Larry
-Jeffrey
-Frank
-Scott
-Eric
-Stephen
-Andrew
-Raymond
-Gregory
-Joshua
-Jerry
-Dennis
-Walter
-Patrick
-Peter
-Harold
-Douglas
-Henry
-Carl
-Arthur
-Ryan
-Roger
-Joe
-Juan
-Jack
-Albert
-Jonathan
-Justin
-Terry
-Gerald
-Keith
-Samuel
-Willie
-Ralph
-Lawrence
-Nicholas
-Roy
-Benjamin
-Bruce
-Brandon
-Adam
-Harry
-Fred
-Wayne
-Billy
-Steve
-Louis
-Jeremy
-Aaron
-Randy
-Howard
-Eugene
-Carlos
-Russell
-Bobby
-Victor
-Martin
-Ernest
-Phillip
-Todd
-Jesse
-Craig
-Alan
-Shawn
-Clarence
-Sean
-Philip
-Chris
-Johnny
-Earl
-Jimmy
-Antonio
diff --git a/vendor/github.com/icrowley/fake/data/en/genders b/vendor/github.com/icrowley/fake/data/en/genders
deleted file mode 100644
index b78817fd5..000000000
--- a/vendor/github.com/icrowley/fake/data/en/genders
+++ /dev/null
@@ -1,2 +0,0 @@
-Male
-Female \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/industries b/vendor/github.com/icrowley/fake/data/en/industries
deleted file mode 100644
index ecb8239fa..000000000
--- a/vendor/github.com/icrowley/fake/data/en/industries
+++ /dev/null
@@ -1,222 +0,0 @@
-Basic Materials
-Agricultural Chemicals
-Aluminum
-Chemicals - Major Diversified
-Copper
-Gold
-Independent Oil & Gas
-Industrial Metals & Minerals
-Major Integrated Oil & Gas
-Nonmetallic Mineral Mining
-Oil & Gas Drilling & Exploration
-Oil & Gas Equipment & Services
-Oil & Gas Pipelines
-Oil & Gas Refining & Marketing
-Silver
-Specialty Chemicals
-Steel & Iron
-Synthetics
-Conglomerates
-Conglomerates
-Consumer Goods
-Appliances
-Auto Manufacturers - Major
-Auto Parts
-Beverages - Brewers
-Beverages - Soft Drinks
-Beverages - Wineries & Distillers
-Business Equipment
-Cigarettes
-Cleaning Products
-Confectioners
-Dairy Products
-Electronic Equipment
-Farm Products
-Food - Major Diversified
-Home Furnishings & Fixtures
-Housewares & Accessories
-Meat Products
-Office Supplies
-Packaging & Containers
-Paper & Paper Products
-Personal Products
-Photographic Equipment & Supplies
-Processed & Packaged Goods
-Recreational Goods, Other
-Recreational Vehicles
-Rubber & Plastics
-Sporting Goods
-Textile - Apparel Clothing
-Textile - Apparel Footwear & Accessories
-Tobacco Products, Other
-Toys & Games
-Trucks & Other Vehicles
-Financial
-Accident & Health Insurance
-Asset Management
-Closed-End Fund - Debt
-Closed-End Fund - Equity
-Closed-End Fund - Foreign
-Credit Services
-Diversified Investments
-Foreign Money Center Banks
-Foreign Regional Banks
-Insurance Brokers
-Investment Brokerage - National
-Investment Brokerage - Regional
-Life Insurance
-Money Center Banks
-Mortgage Investment
-Property & Casualty Insurance
-Property Management
-REIT - Diversified
-REIT - Healthcare Facilities
-REIT - Hotel/Motel
-REIT - Industrial
-REIT - Office
-REIT - Residential
-REIT - Retail
-Real Estate Development
-Regional - Mid-Atlantic Banks
-Regional - Midwest Banks
-Regional - Northeast Banks
-Regional - Pacific Banks
-Regional - Southeast Banks
-Regional - Southwest Banks
-Savings & Loans
-Surety & Title Insurance
-Healthcare
-Biotechnology
-Diagnostic Substances
-Drug Delivery
-Drug Manufacturers - Major
-Drug Manufacturers - Other
-Drug Related Products
-Drugs - Generic
-Health Care Plans
-Home Health Care
-Hospitals
-Long-Term Care Facilities
-Medical Appliances & Equipment
-Medical Instruments & Supplies
-Medical Laboratories & Research
-Medical Practitioners
-Specialized Health Services
-Industrial Goods
-Aerospace/Defense - Major Diversified
-Aerospace/Defense Products & Services
-Cement
-Diversified Machinery
-Farm & Construction Machinery
-General Building Materials
-General Contractors
-Heavy Construction
-Industrial Electrical Equipment
-Industrial Equipment & Components
-Lumber, Wood Production
-Machine Tools & Accessories
-Manufactured Housing
-Metal Fabrication
-Pollution & Treatment Controls
-Residential Construction
-Small Tools & Accessories
-Textile Industrial
-Waste Management
-Advertising Agencies
-Air Delivery & Freight Services
-Air Services, Other
-Apparel Stores
-Auto Dealerships
-Auto Parts Stores
-Auto Parts Wholesale
-Basic Materials Wholesale
-Broadcasting - Radio
-Broadcasting - TV
-Building Materials Wholesale
-Business Services
-CATV Systems
-Catalog & Mail Order Houses
-Computers Wholesale
-Consumer Services
-Department Stores
-Discount, Variety Stores
-Drug Stores
-Drugs Wholesale
-Education & Training Services
-Electronics Stores
-Electronics Wholesale
-Entertainment - Diversified
-Food Wholesale
-Gaming Activities
-General Entertainment
-Grocery Stores
-Home Furnishing Stores
-Home Improvement Stores
-Industrial Equipment Wholesale
-Jewelry Stores
-Lodging
-Major Airlines
-Management Services
-Marketing Services
-Medical Equipment Wholesale
-Movie Production, Theaters
-Music & Video Stores
-Personal Services
-Publishing - Books
-Publishing - Newspapers
-Publishing - Periodicals
-Railroads
-Regional Airlines
-Rental & Leasing Services
-Research Services
-Resorts & Casinos
-Restaurants
-Security & Protection Services
-Shipping
-Specialty Eateries
-Specialty Retail, Other
-Sporting Activities
-Sporting Goods Stores
-Staffing & Outsourcing Services
-Technical Services
-Toy & Hobby Stores
-Trucking
-Wholesale, Other
-Technology
-Application Software
-Business Software & Services
-Communication Equipment
-Computer Based Systems
-Computer Peripherals
-Data Storage Devices
-Diversified Communication Services
-Diversified Computer Systems
-Diversified Electronics
-Healthcare Information Services
-Information & Delivery Services
-Information Technology Services
-Internet Information Providers
-Internet Service Providers
-Internet Software & Services
-Long Distance Carriers
-Multimedia & Graphics Software
-Networking & Communication Devices
-Personal Computers
-Printed Circuit Boards
-Processing Systems & Products
-Scientific & Technical Instruments
-Security Software & Services
-Semiconductor - Broad Line
-Semiconductor - Integrated Circuits
-Semiconductor - Specialized
-Semiconductor Equipment & Materials
-Semiconductor- Memory Chips
-Technical & System Software
-Telecom Services - Domestic
-Telecom Services - Foreign
-Wireless Communications
-Diversified Utilities
-Electric Utilities
-Foreign Utilities
-Gas Utilities
-Water Utilities
diff --git a/vendor/github.com/icrowley/fake/data/en/jobs b/vendor/github.com/icrowley/fake/data/en/jobs
deleted file mode 100644
index 082272c0e..000000000
--- a/vendor/github.com/icrowley/fake/data/en/jobs
+++ /dev/null
@@ -1,114 +0,0 @@
-Account Coordinator
-Account Executive
-Account Representative #{N}
-Accountant #{N}
-Accounting Assistant #{N}
-Actuary
-Administrative Assistant #{N}
-Administrative Officer
-Analog Circuit Design manager
-Analyst Programmer
-Assistant Manager
-Assistant Media Planner
-Assistant Professor
-Associate Professor
-Automation Specialist #{N}
-Biostatistician #{N}
-Budget/Accounting Analyst #{N}
-Business Systems Development Analyst
-Chemical Engineer
-Chief Design Engineer
-Civil Engineer
-Clinical Specialist
-Community Outreach Specialist
-Compensation Analyst
-Computer Systems Analyst #{N}
-Cost Accountant
-Data Coordinator
-Database Administrator #{N}
-Dental Hygienist
-Design Engineer
-Desktop Support Technician
-Developer #{N}
-Director of Sales
-Editor
-Electrical Engineer
-Engineer #{N}
-Environmental Specialist
-Environmental Tech
-Executive Secretary
-Financial Advisor
-Financial Analyst
-Food Chemist
-GIS Technical Architect
-General Manager
-Geological Engineer
-Geologist #{N}
-Graphic Designer
-Health Coach #{N}
-Help Desk Operator
-Help Desk Technician
-Human Resources Assistant #{N}
-Human Resources Manager
-Information Systems Manager
-Internal Auditor
-Junior Executive
-Legal Assistant
-Librarian
-Marketing Assistant
-Marketing Manager
-Mechanical Systems Engineer
-Media Manager #{N}
-Nuclear Power Engineer
-Nurse
-Nurse Practicioner
-Occupational Therapist
-Office Assistant #{N}
-Operator
-Paralegal
-Payment Adjustment Coordinator
-Pharmacist
-Physical Therapy Assistant
-Product Engineer
-Professor
-Programmer #{N}
-Programmer Analyst #{N}
-Project Manager
-Quality Control Specialist
-Quality Engineer
-Recruiter
-Recruiting Manager
-Registered Nurse
-Research Assistant #{N}
-Research Associate
-Research Nurse
-Safety Technician #{N}
-Sales Associate
-Sales Representative
-Senior Cost Accountant
-Senior Developer
-Senior Editor
-Senior Financial Analyst
-Senior Quality Engineer
-Senior Sales Associate
-Social Worker
-Software Consultant
-Software Engineer #{N}
-Software Test Engineer #{N}
-Speech Pathologist
-Staff Accountant #{N}
-Staff Scientist
-Statistician #{N}
-Structural Analysis Engineer
-Structural Engineer
-Systems Administrator #{N}
-Tax Accountant
-Teacher
-Technical Writer
-VP Accounting
-VP Marketing
-VP Product Management
-VP Quality Control
-VP Sales
-Web Designer #{N}
-Web Developer #{N}
diff --git a/vendor/github.com/icrowley/fake/data/en/jobs_suffixes b/vendor/github.com/icrowley/fake/data/en/jobs_suffixes
deleted file mode 100644
index 05d9eb526..000000000
--- a/vendor/github.com/icrowley/fake/data/en/jobs_suffixes
+++ /dev/null
@@ -1,4 +0,0 @@
-I
-II
-III
-IV
diff --git a/vendor/github.com/icrowley/fake/data/en/languages b/vendor/github.com/icrowley/fake/data/en/languages
deleted file mode 100644
index 3da34ddb7..000000000
--- a/vendor/github.com/icrowley/fake/data/en/languages
+++ /dev/null
@@ -1,97 +0,0 @@
-Afrikaans
-Albanian
-Amharic
-Arabic
-Armenian
-Assamese
-Aymara
-Azeri
-Belarusian
-Bengali
-Bislama
-Bosnian
-Bulgarian
-Burmese
-Catalan
-Chinese
-Croatian
-Czech
-Danish
-Dari
-Dhivehi
-Dutch
-Dzongkha
-English
-Estonian
-Fijian
-Filipino
-Finnish
-French
-West Frisian
-Gagauz
-Georgian
-German
-Greek
-Guaraní
-Gujarati
-Haitian Creole
-Hebrew
-Hindi
-Hiri Motu
-Hungarian
-Icelandic
-Indonesian
-Irish Gaelic
-Italian
-Japanese
-Kannada
-Kashmiri
-Kazakh
-Khmer
-Korean
-Kurdish
-Kyrgyz
-Lao
-Latvian
-Lithuanian
-Luxembourgish
-Macedonian
-Malagasy
-Malay
-Malayalam
-Maltese
-MÄori
-Marathi
-Moldovan
-Mongolian
-Montenegrin
-Ndebele
-Nepali
-New Zealand Sign Language
-Northern Sotho
-Norwegian
-Oriya
-Papiamento
-Pashto
-Persian
-Polish
-Portuguese
-Punjabi
-Quechua
-Romanian
-Somali
-Sotho
-Spanish
-Swahili
-Swati
-Swedish
-Tajik
-Tamil
-Telugu
-Tetum
-Thai
-Tok Pisin
-Tsonga
-Tswana
-Yiddish
-Zulu
diff --git a/vendor/github.com/icrowley/fake/data/en/male_first_names b/vendor/github.com/icrowley/fake/data/en/male_first_names
deleted file mode 100644
index 260b66962..000000000
--- a/vendor/github.com/icrowley/fake/data/en/male_first_names
+++ /dev/null
@@ -1,100 +0,0 @@
-James
-John
-Robert
-Michael
-William
-David
-Richard
-Charles
-Joseph
-Thomas
-Christopher
-Daniel
-Paul
-Mark
-Donald
-George
-Kenneth
-Steven
-Edward
-Brian
-Ronald
-Anthony
-Kevin
-Jason
-Matthew
-Gary
-Timothy
-Jose
-Larry
-Jeffrey
-Frank
-Scott
-Eric
-Stephen
-Andrew
-Raymond
-Gregory
-Joshua
-Jerry
-Dennis
-Walter
-Patrick
-Peter
-Harold
-Douglas
-Henry
-Carl
-Arthur
-Ryan
-Roger
-Joe
-Juan
-Jack
-Albert
-Jonathan
-Justin
-Terry
-Gerald
-Keith
-Samuel
-Willie
-Ralph
-Lawrence
-Nicholas
-Roy
-Benjamin
-Bruce
-Brandon
-Adam
-Harry
-Fred
-Wayne
-Billy
-Steve
-Louis
-Jeremy
-Aaron
-Randy
-Howard
-Eugene
-Carlos
-Russell
-Bobby
-Victor
-Martin
-Ernest
-Phillip
-Todd
-Jesse
-Craig
-Alan
-Shawn
-Clarence
-Sean
-Philip
-Chris
-Johnny
-Earl
-Jimmy
-Antonio \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/male_last_names b/vendor/github.com/icrowley/fake/data/en/male_last_names
deleted file mode 100644
index af5699b16..000000000
--- a/vendor/github.com/icrowley/fake/data/en/male_last_names
+++ /dev/null
@@ -1,250 +0,0 @@
-Smith
-Johnson
-Williams
-Jones
-Brown
-Davis
-Miller
-Wilson
-Moore
-Taylor
-Anderson
-Thomas
-Jackson
-White
-Harris
-Martin
-Thompson
-Garcia
-Martinez
-Robinson
-Clark
-Rodriguez
-Lewis
-Lee
-Walker
-Hall
-Allen
-Young
-Hernandez
-King
-Wright
-Lopez
-Hill
-Scott
-Green
-Adams
-Baker
-Gonzalez
-Nelson
-Carter
-Mitchell
-Perez
-Roberts
-Turner
-Phillips
-Campbell
-Parker
-Evans
-Edwards
-Collins
-Stewart
-Sanchez
-Morris
-Rogers
-Reed
-Cook
-Morgan
-Bell
-Murphy
-Bailey
-Rivera
-Cooper
-Richardson
-Cox
-Howard
-Ward
-Torres
-Peterson
-Gray
-Ramirez
-James
-Watson
-Brooks
-Kelly
-Sanders
-Price
-Bennett
-Wood
-Barnes
-Ross
-Henderson
-Coleman
-Jenkins
-Perry
-Powell
-Long
-Patterson
-Hughes
-Flores
-Washington
-Butler
-Simmons
-Foster
-Gonzales
-Bryant
-Alexander
-Russell
-Griffin
-Diaz
-Hayes
-Myers
-Ford
-Hamilton
-Graham
-Sullivan
-Wallace
-Woods
-Cole
-West
-Jordan
-Owens
-Reynolds
-Fisher
-Ellis
-Harrison
-Gibson
-Mcdonald
-Cruz
-Marshall
-Ortiz
-Gomez
-Murray
-Freeman
-Wells
-Webb
-Simpson
-Stevens
-Tucker
-Porter
-Hunter
-Hicks
-Crawford
-Henry
-Boyd
-Mason
-Morales
-Kennedy
-Warren
-Dixon
-Ramos
-Reyes
-Burns
-Gordon
-Shaw
-Holmes
-Rice
-Robertson
-Hunt
-Black
-Daniels
-Palmer
-Mills
-Nichols
-Grant
-Knight
-Ferguson
-Rose
-Stone
-Hawkins
-Dunn
-Perkins
-Hudson
-Spencer
-Gardner
-Stephens
-Payne
-Pierce
-Berry
-Matthews
-Arnold
-Wagner
-Willis
-Ray
-Watkins
-Olson
-Carroll
-Duncan
-Snyder
-Hart
-Cunningham
-Bradley
-Lane
-Andrews
-Ruiz
-Harper
-Fox
-Riley
-Armstrong
-Carpenter
-Weaver
-Greene
-Lawrence
-Elliott
-Chavez
-Sims
-Austin
-Peters
-Kelley
-Franklin
-Lawson
-Fields
-Gutierrez
-Ryan
-Schmidt
-Carr
-Vasquez
-Castillo
-Wheeler
-Chapman
-Oliver
-Montgomery
-Richards
-Williamson
-Johnston
-Banks
-Meyer
-Bishop
-Mccoy
-Howell
-Alvarez
-Morrison
-Hansen
-Fernandez
-Garza
-Harvey
-Little
-Burton
-Stanley
-Nguyen
-George
-Jacobs
-Reid
-Kim
-Fuller
-Lynch
-Dean
-Gilbert
-Garrett
-Romero
-Welch
-Larson
-Frazier
-Burke
-Hanson
-Day
-Mendoza
-Moreno
-Bowman
-Medina
-Fowler \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/male_name_prefixes b/vendor/github.com/icrowley/fake/data/en/male_name_prefixes
deleted file mode 100644
index 055af9041..000000000
--- a/vendor/github.com/icrowley/fake/data/en/male_name_prefixes
+++ /dev/null
@@ -1 +0,0 @@
-Mr. Dr.
diff --git a/vendor/github.com/icrowley/fake/data/en/male_name_suffixes b/vendor/github.com/icrowley/fake/data/en/male_name_suffixes
deleted file mode 100644
index 17e0dfd9f..000000000
--- a/vendor/github.com/icrowley/fake/data/en/male_name_suffixes
+++ /dev/null
@@ -1 +0,0 @@
-Jr. Sr. I II III IV V MD DDS PhD DVM
diff --git a/vendor/github.com/icrowley/fake/data/en/male_patronymics b/vendor/github.com/icrowley/fake/data/en/male_patronymics
deleted file mode 100644
index 4b563cd62..000000000
--- a/vendor/github.com/icrowley/fake/data/en/male_patronymics
+++ /dev/null
@@ -1,100 +0,0 @@
-James
-John
-Robert
-Michael
-William
-David
-Richard
-Charles
-Joseph
-Thomas
-Christopher
-Daniel
-Paul
-Mark
-Donald
-George
-Kenneth
-Steven
-Edward
-Brian
-Ronald
-Anthony
-Kevin
-Jason
-Matthew
-Gary
-Timothy
-Jose
-Larry
-Jeffrey
-Frank
-Scott
-Eric
-Stephen
-Andrew
-Raymond
-Gregory
-Joshua
-Jerry
-Dennis
-Walter
-Patrick
-Peter
-Harold
-Douglas
-Henry
-Carl
-Arthur
-Ryan
-Roger
-Joe
-Juan
-Jack
-Albert
-Jonathan
-Justin
-Terry
-Gerald
-Keith
-Samuel
-Willie
-Ralph
-Lawrence
-Nicholas
-Roy
-Benjamin
-Bruce
-Brandon
-Adam
-Harry
-Fred
-Wayne
-Billy
-Steve
-Louis
-Jeremy
-Aaron
-Randy
-Howard
-Eugene
-Carlos
-Russell
-Bobby
-Victor
-Martin
-Ernest
-Phillip
-Todd
-Jesse
-Craig
-Alan
-Shawn
-Clarence
-Sean
-Philip
-Chris
-Johnny
-Earl
-Jimmy
-Antonio
diff --git a/vendor/github.com/icrowley/fake/data/en/months b/vendor/github.com/icrowley/fake/data/en/months
deleted file mode 100644
index 750d79377..000000000
--- a/vendor/github.com/icrowley/fake/data/en/months
+++ /dev/null
@@ -1,12 +0,0 @@
-January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
diff --git a/vendor/github.com/icrowley/fake/data/en/months_short b/vendor/github.com/icrowley/fake/data/en/months_short
deleted file mode 100644
index cb6f38f6b..000000000
--- a/vendor/github.com/icrowley/fake/data/en/months_short
+++ /dev/null
@@ -1,12 +0,0 @@
-Jan
-Feb
-Mar
-Apr
-May
-Jun
-Jul
-Aug
-Sep
-Oct
-Nov
-Dec
diff --git a/vendor/github.com/icrowley/fake/data/en/nouns b/vendor/github.com/icrowley/fake/data/en/nouns
deleted file mode 100644
index 3ad0f22bf..000000000
--- a/vendor/github.com/icrowley/fake/data/en/nouns
+++ /dev/null
@@ -1,16 +0,0 @@
-Filter
-Compressor
-System
-Viewer
-Mount
-Case
-Adapter
-Amplifier
-Bridge
-Bracket
-Kit
-Transmitter
-Receiver
-Tuner
-Controller
-Component
diff --git a/vendor/github.com/icrowley/fake/data/en/phones_format b/vendor/github.com/icrowley/fake/data/en/phones_format
deleted file mode 100644
index 82f6acfda..000000000
--- a/vendor/github.com/icrowley/fake/data/en/phones_format
+++ /dev/null
@@ -1,2 +0,0 @@
-#-###-###-##-##
-###-##-##
diff --git a/vendor/github.com/icrowley/fake/data/en/state_abbrevs b/vendor/github.com/icrowley/fake/data/en/state_abbrevs
deleted file mode 100644
index ce7e443cf..000000000
--- a/vendor/github.com/icrowley/fake/data/en/state_abbrevs
+++ /dev/null
@@ -1,50 +0,0 @@
-AL
-AK
-AZ
-AR
-CA
-CO
-CT
-DE
-FL
-GA
-HI
-ID
-IL
-IN
-IA
-KS
-KY
-LA
-ME
-MD
-MA
-MI
-MN
-MS
-MO
-MT
-NE
-NV
-NH
-NJ
-NM
-NY
-NC
-ND
-OH
-OK
-OR
-PA
-RI
-SC
-SD
-TN
-TX
-UT
-VT
-VA
-WA
-WV
-WI
-WY \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/states b/vendor/github.com/icrowley/fake/data/en/states
deleted file mode 100644
index ad6632e6c..000000000
--- a/vendor/github.com/icrowley/fake/data/en/states
+++ /dev/null
@@ -1,50 +0,0 @@
-Alabama
-Alaska
-Arizona
-Arkansas
-California
-Colorado
-Connecticut
-Delaware
-Florida
-Georgia
-Hawaii
-Idaho
-Illinois
-Indiana
-Iowa
-Kansas
-Kentucky
-Louisiana
-Maine
-Maryland
-Massachusetts
-Michigan
-Minnesota
-Mississippi
-Missouri
-Montana
-Nebraska
-Nevada
-New Hampshire
-New Jersey
-New Mexico
-New York
-North Carolina
-North Dakota
-Ohio
-Oklahoma
-Oregon
-Pennsylvania
-Rhode Island
-South Carolina
-South Dakota
-Tennessee
-Texas
-Utah
-Vermont
-Virginia
-Washington
-West Virginia
-Wisconsin
-Wyoming \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/street_suffixes b/vendor/github.com/icrowley/fake/data/en/street_suffixes
deleted file mode 100644
index c06e86a1e..000000000
--- a/vendor/github.com/icrowley/fake/data/en/street_suffixes
+++ /dev/null
@@ -1,21 +0,0 @@
-Alley
-Avenue
-Center
-Circle
-Court
-Crossing
-Drive
-Hill
-Junction
-Lane
-Park
-Parkway
-Pass
-Place
-Plaza
-Point
-Road
-Street
-Terrace
-Trail
-Way \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/streets b/vendor/github.com/icrowley/fake/data/en/streets
deleted file mode 100644
index 3dca2b538..000000000
--- a/vendor/github.com/icrowley/fake/data/en/streets
+++ /dev/null
@@ -1,500 +0,0 @@
-1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-Aberg
-Acker
-Algoma
-Almo
-Alpine
-American
-American Ash
-Amoth
-Anderson
-Anhalt
-Annamark
-Anniversary
-Anthes
-Anzinger
-Arapahoe
-Arizona
-Arkansas
-Armistice
-Arrowood
-Artisan
-Atwood
-Autumn Leaf
-Badeau
-Banding
-Barby
-Barnett
-Bartelt
-Bartillon
-Bashford
-Basil
-Bay
-Bayside
-Becker
-Beilfuss
-Bellgrove
-Birchwood
-Blackbird
-Blaine
-Blue Bill Park
-Bluejay
-Bluestem
-Bobwhite
-Bonner
-Bowman
-Boyd
-Brentwood
-Briar Crest
-Brickson Park
-Brown
-Browning
-Buell
-Buena Vista
-Buhler
-Bultman
-Bunker Hill
-Bunting
-Burning Wood
-Burrows
-Butterfield
-Butternut
-Caliangt
-Calypso
-Cambridge
-Canary
-Carberry
-Cardinal
-Carey
-Carioca
-Carpenter
-Cascade
-Center
-Charing Cross
-Cherokee
-Chinook
-Chive
-Claremont
-Clarendon
-Clemons
-Clove
-Clyde Gallagher
-Cody
-Coleman
-Colorado
-Columbus
-Comanche
-Commercial
-Continental
-Coolidge
-Corben
-Cordelia
-Corry
-Corscot
-Cottonwood
-Crescent Oaks
-Crest Line
-Crowley
-Crownhardt
-Dahle
-Dakota
-Dapin
-Darwin
-David
-Dawn
-Daystar
-Dayton
-Debra
-Debs
-Declaration
-Del Mar
-Del Sol
-Delaware
-Delladonna
-Dennis
-Derek
-Dexter
-Di Loreto
-Division
-Dixon
-Doe Crossing
-Donald
-Dorton
-Dottie
-Dovetail
-Drewry
-Dryden
-Duke
-Dunning
-Dwight
-Eagan
-Eagle Crest
-East
-Eastlawn
-Eastwood
-Eggendart
-Elgar
-Eliot
-Elka
-Elmside
-Emmet
-Erie
-Esch
-Esker
-Everett
-Evergreen
-Express
-Fair Oaks
-Fairfield
-Fairview
-Fallview
-Farmco
-Farragut
-Farwell
-Fieldstone
-Fisk
-Florence
-Fordem
-Forest
-Forest Dale
-Forest Run
-Forster
-Fremont
-Fuller
-Fulton
-Gale
-Garrison
-Gateway
-Gerald
-Gina
-Glacier Hill
-Glendale
-Golden Leaf
-Golf
-Golf Course
-Golf View
-Goodland
-Graceland
-Graedel
-Granby
-Grasskamp
-Grayhawk
-Green
-Green Ridge
-Grim
-Grover
-Gulseth
-Haas
-Hagan
-Hallows
-Hanover
-Hanson
-Hansons
-Harbort
-Harper
-Hauk
-Havey
-Hayes
-Hazelcrest
-Heath
-Heffernan
-Helena
-Hermina
-High Crossing
-Hintze
-Hoard
-Hoepker
-Hoffman
-Hollow Ridge
-Holmberg
-Holy Cross
-Homewood
-Hooker
-Hovde
-Hudson
-Huxley
-Ilene
-Independence
-International
-Iowa
-Jackson
-Jana
-Jay
-Jenifer
-Jenna
-John Wall
-Johnson
-Judy
-Karstens
-Katie
-Kedzie
-Kennedy
-Kensington
-Kenwood
-Killdeer
-Kim
-Kings
-Kingsford
-Kinsman
-Kipling
-Knutson
-Kropf
-La Follette
-Lake View
-Lakeland
-Lakewood
-Lakewood Gardens
-Larry
-Laurel
-Lawn
-Lerdahl
-Leroy
-Lien
-Lighthouse Bay
-Lillian
-Lindbergh
-Linden
-Little Fleur
-Loeprich
-Loftsgordon
-Logan
-Londonderry
-Longview
-Loomis
-Lotheville
-Ludington
-Lukken
-Lunder
-Luster
-Lyons
-Macpherson
-Magdeline
-Main
-Mallard
-Mallory
-Mandrake
-Manitowish
-Manley
-Manufacturers
-Maple
-Maple Wood
-Marcy
-Mariners Cove
-Marquette
-Maryland
-Mayer
-Mayfield
-Maywood
-Mcbride
-Mccormick
-Mcguire
-Meadow Ridge
-Meadow Vale
-Meadow Valley
-Melby
-Melody
-Melrose
-Melvin
-Memorial
-Mendota
-Menomonie
-Merchant
-Merrick
-Merry
-Messerschmidt
-Mesta
-Michigan
-Mifflin
-Miller
-Milwaukee
-Mitchell
-Mockingbird
-Moland
-Monica
-Montana
-Monterey
-Monument
-Moose
-Morning
-Morningstar
-Morrow
-Mosinee
-Moulton
-Muir
-Myrtle
-Namekagon
-Nancy
-Nelson
-Nevada
-New Castle
-Nobel
-North
-Northfield
-Northland
-Northport
-Northridge
-Northview
-Northwestern
-Norway Maple
-Nova
-Novick
-Oak
-Oak Valley
-Oakridge
-Ohio
-Old Gate
-Old Shore
-Oneill
-Onsgard
-Orin
-Oriole
-Oxford
-Packers
-Paget
-Pankratz
-Park Meadow
-Parkside
-Pawling
-Pearson
-Pennsylvania
-Pepper Wood
-Petterle
-Pierstorff
-Pine View
-Pleasure
-Pond
-Portage
-Porter
-Prairie Rose
-Prairieview
-Prentice
-Quincy
-Ramsey
-Randy
-Raven
-Red Cloud
-Redwing
-Reindahl
-Reinke
-Ridge Oak
-Ridgeview
-Ridgeway
-Rieder
-Rigney
-Riverside
-Rockefeller
-Ronald Regan
-Roth
-Rowland
-Roxbury
-Rusk
-Ruskin
-Russell
-Rutledge
-Ryan
-Sachs
-Sachtjen
-Sage
-Saint Paul
-Sauthoff
-Schiller
-Schlimgen
-Schmedeman
-School
-Schurz
-Scofield
-Scott
-Scoville
-Service
-Shasta
-Shelley
-Sheridan
-Sherman
-Shopko
-Shoshone
-Sloan
-Sommers
-South
-Southridge
-Spaight
-Spenser
-Spohn
-Springs
-Springview
-Stang
-Starling
-Steensland
-Stephen
-Stone Corner
-Stoughton
-Straubel
-Stuart
-Sugar
-Sullivan
-Summer Ridge
-Summerview
-Summit
-Sunbrook
-Sundown
-Sunfield
-Sunnyside
-Superior
-Surrey
-Susan
-Sutherland
-Sutteridge
-Swallow
-Sycamore
-Talisman
-Talmadge
-Tennessee
-Tennyson
-Texas
-Thackeray
-Thierer
-Thompson
-Toban
-Tomscot
-Tony
-Towne
-Trailsway
-Transport
-Troy
-Truax
-Twin Pines
-Union
-Upham
-Utah
-Vahlen
-Valley Edge
-Veith
-Vera
-Vermont
-Vernon
-Victoria
-Vidon
-Village
-Village Green
-Walton
-Warbler
-Warner
-Warrior
-Washington
-Waubesa
-Waxwing
-Wayridge
-Waywood
-Weeping Birch
-Welch
-West
-Westend
-Westerfield
-Westport
-Westridge \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/top_level_domains b/vendor/github.com/icrowley/fake/data/en/top_level_domains
deleted file mode 100644
index 7c84e9145..000000000
--- a/vendor/github.com/icrowley/fake/data/en/top_level_domains
+++ /dev/null
@@ -1,9 +0,0 @@
-biz
-com
-info
-name
-net
-org
-gov
-edu
-mil \ No newline at end of file
diff --git a/vendor/github.com/icrowley/fake/data/en/weekdays b/vendor/github.com/icrowley/fake/data/en/weekdays
deleted file mode 100644
index 716a6eefc..000000000
--- a/vendor/github.com/icrowley/fake/data/en/weekdays
+++ /dev/null
@@ -1,7 +0,0 @@
-Sunday
-Monday
-Tuesday
-Wednesday
-Thursday
-Friday
-Saturday
diff --git a/vendor/github.com/icrowley/fake/data/en/weekdays_short b/vendor/github.com/icrowley/fake/data/en/weekdays_short
deleted file mode 100644
index adeebab80..000000000
--- a/vendor/github.com/icrowley/fake/data/en/weekdays_short
+++ /dev/null
@@ -1,7 +0,0 @@
-Sun
-Mon
-Tue
-Wed
-Thu
-Fri
-Sat
diff --git a/vendor/github.com/icrowley/fake/data/en/words b/vendor/github.com/icrowley/fake/data/en/words
deleted file mode 100644
index 46246eaa4..000000000
--- a/vendor/github.com/icrowley/fake/data/en/words
+++ /dev/null
@@ -1,249 +0,0 @@
-alias
-consequatur
-aut
-perferendis
-sit
-voluptatem
-accusantium
-doloremque
-aperiam
-eaque
-ipsa
-quae
-ab
-illo
-inventore
-veritatis
-et
-quasi
-architecto
-beatae
-vitae
-dicta
-sunt
-explicabo
-aspernatur
-aut
-odit
-aut
-fugit
-sed
-quia
-consequuntur
-magni
-dolores
-eos
-qui
-ratione
-voluptatem
-sequi
-nesciunt
-neque
-dolorem
-ipsum
-quia
-dolor
-sit
-amet
-consectetur
-adipisci
-velit
-sed
-quia
-non
-numquam
-eius
-modi
-tempora
-incidunt
-ut
-labore
-et
-dolore
-magnam
-aliquam
-quaerat
-voluptatem
-ut
-enim
-ad
-minima
-veniam
-quis
-nostrum
-exercitationem
-ullam
-corporis
-nemo
-enim
-ipsam
-voluptatem
-quia
-voluptas
-sit
-suscipit
-laboriosam
-nisi
-ut
-aliquid
-ex
-ea
-commodi
-consequatur
-quis
-autem
-vel
-eum
-iure
-reprehenderit
-qui
-in
-ea
-voluptate
-velit
-esse
-quam
-nihil
-molestiae
-et
-iusto
-odio
-dignissimos
-ducimus
-qui
-blanditiis
-praesentium
-laudantium
-totam
-rem
-voluptatum
-deleniti
-atque
-corrupti
-quos
-dolores
-et
-quas
-molestias
-excepturi
-sint
-occaecati
-cupiditate
-non
-provident
-sed
-ut
-perspiciatis
-unde
-omnis
-iste
-natus
-error
-similique
-sunt
-in
-culpa
-qui
-officia
-deserunt
-mollitia
-animi
-id
-est
-laborum
-et
-dolorum
-fuga
-et
-harum
-quidem
-rerum
-facilis
-est
-et
-expedita
-distinctio
-nam
-libero
-tempore
-cum
-soluta
-nobis
-est
-eligendi
-optio
-cumque
-nihil
-impedit
-quo
-porro
-quisquam
-est
-qui
-minus
-id
-quod
-maxime
-placeat
-facere
-possimus
-omnis
-voluptas
-assumenda
-est
-omnis
-dolor
-repellendus
-temporibus
-autem
-quibusdam
-et
-aut
-consequatur
-vel
-illum
-qui
-dolorem
-eum
-fugiat
-quo
-voluptas
-nulla
-pariatur
-at
-vero
-eos
-et
-accusamus
-officiis
-debitis
-aut
-rerum
-necessitatibus
-saepe
-eveniet
-ut
-et
-voluptates
-repudiandae
-sint
-et
-molestiae
-non
-recusandae
-itaque
-earum
-rerum
-hic
-tenetur
-a
-sapiente
-delectus
-ut
-aut
-reiciendis
-voluptatibus
-maiores
-doloribus
-asperiores
-repellat
diff --git a/vendor/github.com/icrowley/fake/data/en/zips_format b/vendor/github.com/icrowley/fake/data/en/zips_format
deleted file mode 100644
index 657c9461b..000000000
--- a/vendor/github.com/icrowley/fake/data/en/zips_format
+++ /dev/null
@@ -1 +0,0 @@
-#######
diff --git a/vendor/github.com/icrowley/fake/data/ru/characters b/vendor/github.com/icrowley/fake/data/ru/characters
deleted file mode 100644
index 1d689c12d..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/characters
+++ /dev/null
@@ -1,43 +0,0 @@
-а
-б
-в
-г
-д
-е
-Ñ‘
-ж
-з
-и
-й
-к
-л
-м
-н
-о
-п
-Ñ€
-Ñ‚
-у
-Ñ„
-Ñ…
-ц
-ч
-ш
-щ
-ÑŠ
-Ñ‹
-ь
-ÑŽ
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
diff --git a/vendor/github.com/icrowley/fake/data/ru/cities b/vendor/github.com/icrowley/fake/data/ru/cities
deleted file mode 100644
index 7f3ce63b1..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/cities
+++ /dev/null
@@ -1,135 +0,0 @@
-Ðдлер
-ÐлекÑандров
-Ðнапа
-ÐрзамаÑ
-ÐрхангельÑк
-Ðрхипо-ОÑиповка
-ÐÑтрахань
-Бежецк
-Белгород
-БоровÑк
-БрÑнÑк
-Валдай
-Великий Ðовгород
-Великий УÑтюг
-ВереÑ
-ВладивоÑток
-Владимир
-Волгоград
-Вологда
-Воронеж
-Выборг
-Ð’Ñзьма
-Галич
-Гатчина
-Геленджик
-Городец
-Гороховец
-Дмитров
-Дубна
-ЕгорьевÑк
-ЕйÑк
-Екатеринбург
-Елабуга
-Елец
-ЗарайÑк
-Звенигород
-Иваново
-ИжевÑк
-ИзборÑк
-Йошкар-Ола
-Казань
-Калининград
-Калуга
-КалÑзин
-КаÑимов
-Кемерово
-Кимры
-Кинешма
-Кириллов
-Киров
-КиÑловодÑк
-Клин
-Ковров
-КозельÑк
-Коломна
-КоÑтрома
-КраÑÐ½Ð°Ñ Ð¿Ð¾Ð»Ñна
-КраÑнодар
-КраÑноÑÑ€Ñк
-Кронштадт
-КурÑк
-ЛазаревÑкое
-Липецк
-Луховицы
-МалоÑроÑлавец
-МожайÑк
-МоÑква
-МурманÑк
-Муром
-МценÑк
-Мытищи
-Мышкин
-Ðижний Ðовгород
-Ðижний Тагил
-ÐовороÑÑийÑк
-ÐовоÑибирÑк
-ОмÑк
-Орёл
-ОÑташков
-Павлово на Оке
-Пенза
-ПереÑлавль-ЗалеÑÑкий
-Пермь
-Петергоф
-ПетрозаводÑк
-ПлеÑ
-ПодольÑк
-Покров
-ПÑков
-Пушкин
-ПушкинÑкие горы
-ПÑтигорÑк
-РоÑтов Великий
-РоÑтов-на-Дону
-Руза
-РыбинÑк
-РÑзань
-Самара
-Санкт-Петербург
-СаранÑк
-Сарапул
-Саратов
-СветлогорÑк
-СеваÑтополь
-Сергиев ПоÑад
-Серпухов
-СмоленÑк
-СоликамÑк
-Соловки
-Сочи
-Суздаль
-Таганрог
-Тамань
-Тамбов
-ТаруÑа
-Тверь
-ТобольÑк
-ТольÑтти
-ТомÑк
-Торжок
-Тотьма
-Тула
-Тутаев
-Тюмень
-Углич
-УльÑновÑк
-Уфа
-Ханты-МанÑийÑк
-ЧебокÑары
-ЧелÑбинÑк
-Череповец
-ЭлиÑта
-Юрьев-ПольÑкий
-Ялта
-ЯроÑлавль
diff --git a/vendor/github.com/icrowley/fake/data/ru/colors b/vendor/github.com/icrowley/fake/data/ru/colors
deleted file mode 100644
index fb8d8fd79..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/colors
+++ /dev/null
@@ -1,14 +0,0 @@
-КраÑный
-Синий
-Голубой
-Зеленый
-Желтый
-Оранжевый
-Фиолетовый
-Лиловый
-Индиго
-Розовый
-Ðквамарин
-Коричневый
-Черный
-Белый
diff --git a/vendor/github.com/icrowley/fake/data/ru/continents b/vendor/github.com/icrowley/fake/data/ru/continents
deleted file mode 100644
index 609827380..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/continents
+++ /dev/null
@@ -1,7 +0,0 @@
-ÐзиÑ
-Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ Ðмерика
-Ð®Ð¶Ð½Ð°Ñ Ðмерика
-ÐвÑтралиÑ
-Ðфрика
-Европа
-Ðнтарктида
diff --git a/vendor/github.com/icrowley/fake/data/ru/countries b/vendor/github.com/icrowley/fake/data/ru/countries
deleted file mode 100644
index 9f24f38ee..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/countries
+++ /dev/null
@@ -1,193 +0,0 @@
-ÐвÑтралиÑ
-ÐвÑтриÑ
-Ðзербайджан
-ÐлбаниÑ
-Ðлжир
-Ðнгола
-Ðндорра
-Ðнтигуа
-Ðргентина
-ÐрмениÑ
-ÐфганиÑтан
-Багамы
-Бангладеш
-БарбадоÑ
-Бахрейн
-БелоруÑÑиÑ
-Белиз
-БельгиÑ
-Бенин
-БолгариÑ
-БоливиÑ
-БоÑниÑ
-БотÑвана
-БразилиÑ
-Бруней
-Буркина-ФаÑо
-Бурунди
-Бутан
-Вануату
-ВеликобританиÑ
-ВенгриÑ
-ВенеÑуÑла
-ВоÑточный
-Вьетнам
-Габон
-Гаити
-Гайана
-ГамбиÑ
-Гана
-Гватемала
-ГвинеÑ
-ГвинеÑ-БиÑау
-ГерманиÑ
-ГондураÑ
-Гренада
-ГрециÑ
-ГрузиÑ
-ДаниÑ
-Джибути
-Доминика
-ДоминиканÑкаÑ
-Египет
-ЗамбиÑ
-Зимбабве
-Израиль
-ИндиÑ
-ИндонезиÑ
-ИорданиÑ
-Ирак
-Иран
-ИрландиÑ
-ИÑландиÑ
-ИÑпаниÑ
-ИталиÑ
-Йемен
-Кабо-Верде
-КазахÑтан
-Камбоджа
-Камерун
-Канада
-Катар
-КениÑ
-Кипр
-КиргизиÑ
-Кирибати
-КÐР
-КолумбиÑ
-Коморы
-РеÑпублика
-ДемократичеÑкаÑ
-КÐДР
-РеÑпублика
-КоÑта-Рика
-Кот-д’Ивуар
-Куба
-Кувейт
-ЛаоÑ
-ЛатвиÑ
-ЛеÑото
-ЛибериÑ
-Ливан
-ЛивиÑ
-Литва
-Лихтенштейн
-ЛюкÑембург
-Маврикий
-МавританиÑ
-МадагаÑкар
-МакедониÑ
-Малави
-МалайзиÑ
-Мали
-Мальдивы
-Мальта
-Марокко
-Маршалловы
-МекÑика
-Мозамбик
-МолдавиÑ
-Монако
-МонголиÑ
-МьÑнма
-ÐамибиÑ
-Ðауру
-Ðепал
-Ðигер
-ÐигериÑ
-Ðидерланды
-Ðикарагуа
-ÐоваÑ
-ÐорвегиÑ
-ОÐЭ
-Оман
-ПакиÑтан
-Палау
-Панама
-Папуа
-Парагвай
-Перу
-Польша
-ПортугалиÑ
-РоÑÑиÑ
-Руанда
-РумыниÑ
-Сальвадор
-Самоа
-Сан-Марино
-Сан-Томе
-СаудовÑкаÑ
-Свазиленд
-СейшельÑкие
-Сенегал
-Сент-ВинÑент
-Сент-КитÑ
-Сент-ЛюÑиÑ
-СербиÑ
-Сингапур
-СириÑ
-СловакиÑ
-СловениÑ
-СШÐ
-Соломоновы
-Сомали
-Судан
-Суринам
-Сьерра-Леоне
-ТаджикиÑтан
-Таиланд
-ТанзаниÑ
-Того
-Тонга
-Тринидад
-Тувалу
-ТуниÑ
-ТуркмениÑ
-ТурциÑ
-Уганда
-УзбекиÑтан
-Украина
-Уругвай
-Федеративные
-Фиджи
-Филиппины
-ФинлÑндиÑ
-ФранциÑ
-ХорватиÑ
-ЦентральноафриканÑкаÑ
-Чад
-ЧерногориÑ
-ЧехиÑ
-Чили
-ШвейцариÑ
-ШвециÑ
-Шри-Ланка
-Эквадор
-ЭкваториальнаÑ
-ЭритреÑ
-ЭÑтониÑ
-ЭфиопиÑ
-ЮÐР
-Южный
-Ямайка
-ЯпониÑ
diff --git a/vendor/github.com/icrowley/fake/data/ru/currencies b/vendor/github.com/icrowley/fake/data/ru/currencies
deleted file mode 100644
index 20d3550bb..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/currencies
+++ /dev/null
@@ -1,129 +0,0 @@
-дирхам ОÐЭ
-афганÑкий афгани
-албанÑкий лек
-армÑнÑкий драм
-антильÑкий гульден
-ангольÑÐºÐ°Ñ ÐºÐ²Ð°Ð½Ð·Ð°
-аргентинÑкое пеÑо
-авÑтралийÑкий доллар
-азербайджанÑкий манат
-бангладешÑÐºÐ°Ñ Ñ‚Ð°ÐºÐ°
-болгарÑкий лев
-бахрейнÑкий динар
-бурундийÑкий франк
-брунейÑкий доллар
-боливийÑкий боливиано
-бразильÑкий реал
-багамÑкий доллар
-ботÑванÑÐºÐ°Ñ Ð¿ÑƒÐ»Ð°
-белоруÑÑкий рубль
-канадÑкий доллар
-конголезÑкий франк
-швейцарÑкий франк
-чилийÑкое пеÑо
-китайÑкий юань
-колумбийÑкое пеÑо
-коÑтариканÑкий колон
-кубинÑкое пеÑо
-чешÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-франк Джибути
-датÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-алжирÑкий динар
-ÑÑтонÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-египетÑкий фунт
-ÑфиопÑкий быр
-евро
-доллар Фиджи
-фунт Ñтерлингов Соединенного королевÑтва
-грузинÑкий лари
-ганÑкий Ñеди
-гамбийÑкий далаÑи
-гвинейÑкий франк
-гватемальÑкий кетцаль
-гонконгÑкий доллар
-гондураÑÑÐºÐ°Ñ Ð»ÐµÐ¼Ð¿Ð¸Ñ€Ð°
-хорватÑÐºÐ°Ñ ÐºÑƒÐ½Ð°
-венгерÑкий форинт ВенгерÑкий национальный банк HUF
-индонезийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-новый израильÑкий шекель
-индийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-иракÑкий динар
-иранÑкий риал
-иÑландÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-ÑмайÑкий доллар
-иорданÑкий динар
-ÑпонÑÐºÐ°Ñ Ð¸ÐµÐ½Ð° Банк Японии JPY
-кенийÑкий шиллинг
-киргизÑкий Ñом
-камбоджийÑкий риель Ðациональный банк Камбоджи KHR
-ÑеверокорейÑÐºÐ°Ñ Ð²Ð¾Ð½Ð°
-вона РеÑпублики КореÑ
-кувейтÑкий динар
-казахÑтанÑкий тенге Ðациональный банк РеÑпублики КазахÑтан KZT
-кип ЛаоÑÑкой ÐДР
-ливанÑкий фунт
-шри-ланкийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-литовÑкий лит
-латвийÑкий лат
-ливийÑкий динар
-марокканÑкий дирхам
-молдавÑкий лей
-малагаÑийÑкий ариари
-денар РеÑпублики МакедониÑ
-мьÑнманÑкий чат
-монгольÑкий тугрик
-мавританÑÐºÐ°Ñ ÑƒÐ³Ð¸Ñ
-маврикийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-малавийÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°
-мекÑиканÑкое пеÑо
-малайзийÑкий ринггит
-мозамбикÑкий метикал
-доллар Ðамибии
-нигерийÑÐºÐ°Ñ Ð½Ð°Ð¹Ñ€Ð°
-никарагуанÑÐºÐ°Ñ Ð·Ð¾Ð»Ð¾Ñ‚Ð°Ñ ÐºÐ¾Ñ€Ð´Ð¾Ð±Ð°
-норвежÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-непальÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-новозеландÑкий доллар
-оманÑкий риал
-панамÑкий бальбоа
-перуанÑкий новый Ñоль
-филиппинÑкое пеÑо
-пакиÑтанÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-польÑкий злотый
-парагвайÑкий гуарани
-катарÑкий риал
-новый румынÑкий лей
-ÑербÑкий динар
-ÑаудовÑкий риÑл
-ÑейшельÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ
-ÑуданÑкий фунт
-шведÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°
-ÑингапурÑкий доллар
-Ñьерра-леонÑкий леоне
-ÑомалийÑкий шиллинг
-ÑуринамÑкий доллар
-ÑирийÑкий фунт
-ÑвазилендÑкий лилангени
-таиландÑкий бат
-таджикÑкий Ñомони
-новый туркменÑкий манат
-туниÑÑкий динар
-Ñ‚ÑƒÑ€ÐµÑ†ÐºÐ°Ñ Ð»Ð¸Ñ€Ð°
-доллар Тринидада и Тобаго
-новый тайваньÑкий доллар
-танзанийÑкий шиллинг
-украинÑÐºÐ°Ñ Ð³Ñ€Ð¸Ð²Ð½Ð°
-угандийÑкий шиллинг
-доллар СШÐ
-уругвайÑкое пеÑо
-узбекÑкий Ñум
-венеÑуÑльÑкий боливар фуÑрте
-вьетнамÑкий донг
-франк КФРЦÐВЭС
-воÑточно-карибÑкий доллар
-Ñпециальные права заимÑтвованиÑ
-франк КФРЗÐЭВС
-йеменÑкий риал
-южноафриканÑкий Ñ€Ñнд
-замбийÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°
-роÑÑийÑкий рубль
diff --git a/vendor/github.com/icrowley/fake/data/ru/female_first_names b/vendor/github.com/icrowley/fake/data/ru/female_first_names
deleted file mode 100644
index 42d9eb7f3..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/female_first_names
+++ /dev/null
@@ -1,36 +0,0 @@
-Ðгриппина
-ÐлекÑандра
-ÐнаÑтаÑиÑ
-Ðнна
-Ðнтонина
-Валентина
-Вера
-ВикториÑ
-Галина
-ДарьÑ
-ЕвдокиÑ
-Екатерина
-Елена
-Елизавета
-ЗоÑ
-Ирина
-КлавдиÑ
-КриÑтина
-ЛариÑа
-ЛидиÑ
-Любовь
-Людмила
-Марина
-МариÑ
-Ðадежда
-ÐатальÑ
-Ðина
-ОкÑана
-Ольга
-ПараÑкева
-ПелагиÑ
-РаиÑа
-Светлана
-Тамара
-ТатьÑна
-ЮлиÑ
diff --git a/vendor/github.com/icrowley/fake/data/ru/female_last_names b/vendor/github.com/icrowley/fake/data/ru/female_last_names
deleted file mode 100644
index 1f8b08443..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/female_last_names
+++ /dev/null
@@ -1,100 +0,0 @@
-Иванова
-ВаÑильева
-Петрова
-Смирнова
-Михайлова
-Фёдорова
-Соколова
-Яковлева
-Попова
-Ðндреева
-ÐлекÑеева
-ÐлекÑандрова
-Лебедева
-Григорьева
-Степанова
-Семёнова
-Павлова
-Богданова
-Ðиколаева
-Дмитриева
-Егорова
-Волкова
-Кузнецова
-Ðикитина
-Соловьёва
-Тимофеева
-Орлова
-ÐфанаÑьева
-Филиппова
-Сергеева
-Захарова
-Матвеева
-Виноградова
-Кузьмина
-МакÑимова
-Козлова
-Ильина
-ГераÑимова
-Маркова
-Ðовикова
-Морозова
-Романова
-ОÑипова
-Макарова
-Зайцева
-БелÑева
-Гаврилова
-Ðнтонова
-Ефимова
-Леонтьева
-Давыдова
-ГуÑева
-Данилова
-КиÑелёва
-Сорокина
-Тихомирова
-Крылова
-Ðикифорова
-Кондратьева
-КудрÑвцева
-БориÑова
-Жукова
-Воробьёва
-Щербакова
-ПолÑкова
-Савельева
-Шмидт
-Трофимова
-ЧиÑÑ‚Ñкова
-Баранова
-Сидорова
-Соболева
-Карпова
-Белова
-Миллера
-Титова
-Львова
-Фролова
-Игнатьева
-Комарова
-Прокофьева
-Быкова
-Ðбрамова
-Голубева
-Пономарёва
-ПокровÑкийа
-Мартынова
-Кириллова
-Шульца
-Миронова
-Фомина
-ВлаÑова
-ТроицкаÑ
-Федотова
-Ðазарова
-Ушакова
-ДениÑова
-КонÑтантинова
-Воронина
-Ðаумова
diff --git a/vendor/github.com/icrowley/fake/data/ru/female_patronymics b/vendor/github.com/icrowley/fake/data/ru/female_patronymics
deleted file mode 100644
index cc51f26e8..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/female_patronymics
+++ /dev/null
@@ -1,11 +0,0 @@
-ÐлекÑандровна
-Ðндреевна
-Ðрхиповна
-ÐлекÑеевна
-Ðнтоновна
-ÐÑкольдовна
-Ðльбертовна
-Ðркадьевна
-ÐфанаÑьевна
-Ðнатольевна
-Ðртемовна
diff --git a/vendor/github.com/icrowley/fake/data/ru/genders b/vendor/github.com/icrowley/fake/data/ru/genders
deleted file mode 100644
index 38b7a9a4f..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/genders
+++ /dev/null
@@ -1,2 +0,0 @@
-МужÑкой
-ЖенÑкий
diff --git a/vendor/github.com/icrowley/fake/data/ru/languages b/vendor/github.com/icrowley/fake/data/ru/languages
deleted file mode 100644
index 61e5bf922..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/languages
+++ /dev/null
@@ -1,23 +0,0 @@
-КитайÑкий
-ИÑпанÑкий
-ÐнглийÑкий
-Хинди
-ÐрабÑкий
-ПортугальÑкий
-БенгальÑкий
-РуÑÑкий
-ЯпонÑкий
-ЯванÑкий
-Лахдна
-Ðемецкий
-КорейÑкий
-ФранцузÑкий
-Телугу
-Маратхи
-Турецкий
-ТамильÑкий
-ВьетнамÑкий
-Урду
-ИтальÑнÑкий
-МалайÑкий
-ПерÑидÑкий
diff --git a/vendor/github.com/icrowley/fake/data/ru/male_first_names b/vendor/github.com/icrowley/fake/data/ru/male_first_names
deleted file mode 100644
index 357267cb4..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/male_first_names
+++ /dev/null
@@ -1,32 +0,0 @@
-ÐлекÑандр
-ÐлекÑей
-Ðнатолий
-Ðндрей
-БориÑ
-Валерий
-ВаÑилий
-Виктор
-Виталий
-Владимир
-Геннадий
-Георгий
-Григорий
-ДениÑ
-Дмитрий
-Евгений
-Иван
-Игорь
-ИльÑ
-КонÑтантин
-МакÑим
-Михаил
-Ðикита
-Ðиколай
-Олег
-Павел
-Петр
-Роман
-Сергей
-Степан
-Федор
-Юрий
diff --git a/vendor/github.com/icrowley/fake/data/ru/male_last_names b/vendor/github.com/icrowley/fake/data/ru/male_last_names
deleted file mode 100644
index 050d9535a..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/male_last_names
+++ /dev/null
@@ -1,101 +0,0 @@
-Иванов
-ВаÑильев
-Петров
-Смирнов
-Михайлов
-Фёдоров
-Соколов
-Яковлев
-Попов
-Ðндреев
-ÐлекÑеев
-ÐлекÑандров
-Лебедев
-Григорьев
-Степанов
-Семёнов
-Павлов
-Богданов
-Ðиколаев
-Дмитриев
-Егоров
-Волков
-Кузнецов
-Ðикитин
-Соловьёв
-Тимофеев
-Орлов
-ÐфанаÑьев
-Филиппов
-Сергеев
-Захаров
-Матвеев
-Виноградов
-Кузьмин
-МакÑимов
-Козлов
-Ильин
-ГераÑимов
-Марков
-Ðовиков
-Морозов
-
-Романов
-ОÑипов
-Макаров
-Зайцев
-БелÑев
-Гаврилов
-Ðнтонов
-Ефимов
-Леонтьев
-Давыдов
-ГуÑев
-Данилов
-КиÑелёв
-Сорокин
-Тихомиров
-Крылов
-Ðикифоров
-Кондратьев
-КудрÑвцев
-БориÑов
-Жуков
-Воробьёв
-Щербаков
-ПолÑков
-Савельев
-Шмидт
-Трофимов
-ЧиÑÑ‚Ñков
-Баранов
-Сидоров
-Соболев
-Карпов
-Белов
-Миллер
-Титов
-Львов
-Фролов
-Игнатьев
-Комаров
-Прокофьев
-Быков
-Ðбрамов
-Голубев
-Пономарёв
-ПокровÑкий
-Мартынов
-Кириллов
-Шульц
-Миронов
-Фомин
-ВлаÑов
-Троицкий
-Федотов
-Ðазаров
-Ушаков
-ДениÑов
-КонÑтантинов
-Воронин
-Ðаумов
diff --git a/vendor/github.com/icrowley/fake/data/ru/male_patronymics b/vendor/github.com/icrowley/fake/data/ru/male_patronymics
deleted file mode 100644
index 6cf358595..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/male_patronymics
+++ /dev/null
@@ -1,57 +0,0 @@
-ÐлекÑандрович
-ÐлекÑеевич
-Ðнатольевич
-Ðндреевич
-Ðнтонович
-Ðркадьевич
-Ðртемович
-Богданович
-БориÑович
-Валентинович
-Валерьевич
-ВаÑильевич
-Викторович
-Витальевич
-Владимирович
-ВладиÑлавович
-Ð’ÑчеÑлавович
-Геннадиевич
-Георгиевич
-Григорьевич
-Данилович
-ДениÑович
-Дмитриевич
-Евгеньевич
-Егорович
-Ефимович
-Иванович
-Игоревич
-Ильич
-ИоÑифович
-Кириллович
-КонÑтантинович
-Леонидович
-Львович
-МакÑимович
-Матвеевич
-Михайлович
-Ðиколаевич
-Олегович
-Павлович
-Петрович
-Платонович
-Робертович
-Романович
-Семенович
-Сергеевич
-СтаниÑлавович
-Степанович
-ТараÑович
-Тимофеевич
-Федорович
-ФеликÑович
-Филиппович
-Эдуардович
-Юрьевич
-Яковлевич
-ЯроÑлавович
diff --git a/vendor/github.com/icrowley/fake/data/ru/months b/vendor/github.com/icrowley/fake/data/ru/months
deleted file mode 100644
index 0fae0740f..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/months
+++ /dev/null
@@ -1,12 +0,0 @@
-Январь
-Февраль
-Март
-Ðпрель
-Май
-Июнь
-Июль
-ÐвгуÑÑ‚
-СентÑбрь
-ОктÑбрь
-ÐоÑбрь
-Декабрь
diff --git a/vendor/github.com/icrowley/fake/data/ru/phones_format b/vendor/github.com/icrowley/fake/data/ru/phones_format
deleted file mode 100644
index 82f6acfda..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/phones_format
+++ /dev/null
@@ -1,2 +0,0 @@
-#-###-###-##-##
-###-##-##
diff --git a/vendor/github.com/icrowley/fake/data/ru/states b/vendor/github.com/icrowley/fake/data/ru/states
deleted file mode 100644
index fef07f83c..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/states
+++ /dev/null
@@ -1,89 +0,0 @@
-ÐдыгеÑ
-Ðлтай
-БашкортоÑтан
-БурÑтиÑ
-ДагеÑтан
-ИнгушетиÑ
-Кабардино-БалкариÑ
-КалмыкиÑ
-Карачаево-ЧеркеÑиÑ
-КарелиÑ
-Коми
-Марий Эл
-МордовиÑ
-Саха (ЯкутиÑ)
-Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÐžÑÐµÑ‚Ð¸Ñ â€” ÐланиÑ
-ТатарÑтан
-Тыва (Тува)
-УдмуртиÑ
-ХакаÑиÑ
-ЧечнÑ
-ЧувашиÑ
-КраÑ
-ÐлтайÑкий край
-ЗабайкальÑкий край
-КамчатÑкий край
-КраÑнодарÑкий край
-КраÑноÑÑ€Ñкий край
-ПермÑкий край
-ПриморÑкий край
-СтавропольÑкий край
-ХабаровÑкий край
-ОблаÑти
-ÐмурÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ÐрхангельÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ÐÑтраханÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-БелгородÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-БрÑнÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ВладимирÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ВолгоградÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ВологодÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ВоронежÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ИвановÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ИркутÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КалининградÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КалужÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КемеровÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КировÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КоÑтромÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КурганÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-КурÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ЛенинградÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-Ð›Ð¸Ð¿ÐµÑ†ÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-МагаданÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-МоÑковÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-МурманÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ÐижегородÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ÐовгородÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ÐовоÑибирÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ОмÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ОренбургÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ОрловÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ПензенÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ПÑковÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-РоÑтовÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-РÑзанÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-СамарÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-СаратовÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-СахалинÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-СвердловÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-СмоленÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ТамбовÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ТверÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ТомÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ТульÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ТюменÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-УльÑновÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ЧелÑбинÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ЯроÑлавÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-Города федерального значениÑ
-МоÑква
-Санкт-Петербург
-СеваÑтополь
-ÐÐ²Ñ‚Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ
-ЕврейÑÐºÐ°Ñ ÐО
-Ðвтономные округа
-Ðенецкий ÐО
-Ханты-МанÑийÑкий ÐО — Югра
-ЧукотÑкий ÐО
-Ямало-Ðенецкий ÐО
diff --git a/vendor/github.com/icrowley/fake/data/ru/streets b/vendor/github.com/icrowley/fake/data/ru/streets
deleted file mode 100644
index 629a74d8f..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/streets
+++ /dev/null
@@ -1,40 +0,0 @@
-ЦентральнаÑ
-МолодежнаÑ
-ШкольнаÑ
-СоветÑкаÑ
-ЛеÑнаÑ
-ÐоваÑ
-СадоваÑ
-ÐабережнаÑ
-ЗаречнаÑ
-Мира
-Ленина
-ЗеленаÑ
-ПолеваÑ
-ЛуговаÑ
-ОктÑбрьÑкаÑ
-КомÑомольÑкаÑ
-Гагарина
-ПервомайÑкаÑ
-СевернаÑ
-СтепнаÑ
-СолнечнаÑ
-Кирова
-ЮжнаÑ
-ПионерÑкаÑ
-БереговаÑ
-ЮбилейнаÑ
-ÐагорнаÑ
-КолхознаÑ
-ВоÑточнаÑ
-РечнаÑ
-Пушкина
-ПролетарÑкаÑ
-ЖелезнодорожнаÑ
-РабочаÑ
-Школьный
-Победы
-ОзернаÑ
-Калинина
-Чапаева
-ДачнаÑ
diff --git a/vendor/github.com/icrowley/fake/data/ru/weekdays b/vendor/github.com/icrowley/fake/data/ru/weekdays
deleted file mode 100644
index ac6f263d3..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/weekdays
+++ /dev/null
@@ -1,7 +0,0 @@
-Понедельник
-Вторник
-Среда
-Четверг
-ПÑтница
-Суббота
-ВоÑкреÑенье
diff --git a/vendor/github.com/icrowley/fake/data/ru/weekdays_short b/vendor/github.com/icrowley/fake/data/ru/weekdays_short
deleted file mode 100644
index a2c51eb66..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/weekdays_short
+++ /dev/null
@@ -1,7 +0,0 @@
-Пн
-Ð’Ñ‚
-Ср
-Чт
-Пт
-Сб
-Ð’Ñ
diff --git a/vendor/github.com/icrowley/fake/data/ru/zips_format b/vendor/github.com/icrowley/fake/data/ru/zips_format
deleted file mode 100644
index 657c9461b..000000000
--- a/vendor/github.com/icrowley/fake/data/ru/zips_format
+++ /dev/null
@@ -1 +0,0 @@
-#######
diff --git a/vendor/github.com/icrowley/fake/dates_test.go b/vendor/github.com/icrowley/fake/dates_test.go
deleted file mode 100644
index 05982cc11..000000000
--- a/vendor/github.com/icrowley/fake/dates_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestDates(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := WeekDay()
- if v == "" {
- t.Errorf("WeekDay failed with lang %s", lang)
- }
-
- v = WeekDayShort()
- if v == "" {
- t.Errorf("WeekDayShort failed with lang %s", lang)
- }
-
- n := WeekdayNum()
- if n < 0 || n > 7 {
- t.Errorf("WeekdayNum failed with lang %s", lang)
- }
-
- v = Month()
- if v == "" {
- t.Errorf("Month failed with lang %s", lang)
- }
-
- v = MonthShort()
- if v == "" {
- t.Errorf("MonthShort failed with lang %s", lang)
- }
-
- n = MonthNum()
- if n < 0 || n > 31 {
- t.Errorf("MonthNum failed with lang %s", lang)
- }
-
- n = Year(1950, 2020)
- if n < 1950 || n > 2020 {
- t.Errorf("Year failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/fake_test.go b/vendor/github.com/icrowley/fake/fake_test.go
deleted file mode 100644
index 8f5568b4b..000000000
--- a/vendor/github.com/icrowley/fake/fake_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestSetLang(t *testing.T) {
- err := SetLang("ru")
- if err != nil {
- t.Error("SetLang should successfully set lang")
- }
-
- err = SetLang("sd")
- if err == nil {
- t.Error("SetLang with nonexistent lang should return error")
- }
-}
-
-func TestFakerRuWithoutCallback(t *testing.T) {
- SetLang("ru")
- EnFallback(false)
- brand := Brand()
- if brand != "" {
- t.Error("Fake call with no samples should return blank string")
- }
-}
-
-func TestFakerRuWithCallback(t *testing.T) {
- SetLang("ru")
- EnFallback(true)
- brand := Brand()
- if brand == "" {
- t.Error("Fake call for name with no samples with callback should not return blank string")
- }
-}
-
-// TestConcurrentSafety runs fake methods in multiple go routines concurrently.
-// This test should be run with the race detector enabled.
-func TestConcurrentSafety(t *testing.T) {
- workerCount := 10
- doneChan := make(chan struct{})
-
- for i := 0; i < workerCount; i++ {
- go func() {
- for j := 0; j < 1000; j++ {
- FirstName()
- LastName()
- Gender()
- FullName()
- Day()
- Country()
- Company()
- Industry()
- Street()
- }
- doneChan <- struct{}{}
- }()
- }
-
- for i := 0; i < workerCount; i++ {
- <-doneChan
- }
-}
diff --git a/vendor/github.com/icrowley/fake/general_test.go b/vendor/github.com/icrowley/fake/general_test.go
deleted file mode 100644
index 373ef3bbf..000000000
--- a/vendor/github.com/icrowley/fake/general_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestGeneral(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Password(4, 10, true, true, true)
- if v == "" {
- t.Errorf("Password failed with lang %s", lang)
- }
-
- v = SimplePassword()
- if v == "" {
- t.Errorf("SimplePassword failed with lang %s", lang)
- }
-
- v = Color()
- if v == "" {
- t.Errorf("Color failed with lang %s", lang)
- }
-
- v = HexColor()
- if v == "" {
- t.Errorf("HexColor failed with lang %s", lang)
- }
-
- v = HexColorShort()
- if v == "" {
- t.Errorf("HexColorShort failed with lang %s", lang)
- }
-
- v = DigitsN(2)
- if v == "" {
- t.Errorf("DigitsN failed with lang %s", lang)
- }
-
- v = Digits()
- if v == "" {
- t.Errorf("Digits failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/geo_test.go b/vendor/github.com/icrowley/fake/geo_test.go
deleted file mode 100644
index d337b0f20..000000000
--- a/vendor/github.com/icrowley/fake/geo_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestGeo(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- f := Latitude()
- if f < -90 || f > 90 {
- t.Errorf("Latitude failed with lang %s", lang)
- }
-
- i := LatitudeDegrees()
- if i < -180 || i > 180 {
- t.Errorf("LatitudeDegrees failed with lang %s", lang)
- }
-
- i = LatitudeMinutes()
- if i < 0 || i >= 60 {
- t.Errorf("LatitudeMinutes failed with lang %s", lang)
- }
-
- i = LatitudeSeconds()
- if i < 0 || i >= 60 {
- t.Errorf("LatitudeSeconds failed with lang %s", lang)
- }
-
- s := LatitudeDirection()
- if s != "N" && s != "S" {
- t.Errorf("LatitudeDirection failed with lang %s", lang)
- }
-
- f = Longitude()
- if f < -180 || f > 180 {
- t.Errorf("Longitude failed with lang %s", lang)
- }
-
- i = LongitudeDegrees()
- if i < -180 || i > 180 {
- t.Errorf("LongitudeDegrees failed with lang %s", lang)
- }
-
- i = LongitudeMinutes()
- if i < 0 || i >= 60 {
- t.Errorf("LongitudeMinutes failed with lang %s", lang)
- }
-
- i = LongitudeSeconds()
- if i < 0 || i >= 60 {
- t.Errorf("LongitudeSeconds failed with lang %s", lang)
- }
-
- s = LongitudeDirection()
- if s != "W" && s != "E" {
- t.Errorf("LongitudeDirection failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/internet_test.go b/vendor/github.com/icrowley/fake/internet_test.go
deleted file mode 100644
index 8536a13f3..000000000
--- a/vendor/github.com/icrowley/fake/internet_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestInternet(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := UserName()
- if v == "" {
- t.Errorf("UserName failed with lang %s", lang)
- }
-
- v = TopLevelDomain()
- if v == "" {
- t.Errorf("TopLevelDomain failed with lang %s", lang)
- }
-
- v = DomainName()
- if v == "" {
- t.Errorf("DomainName failed with lang %s", lang)
- }
-
- v = EmailAddress()
- if v == "" {
- t.Errorf("EmailAddress failed with lang %s", lang)
- }
-
- v = EmailSubject()
- if v == "" {
- t.Errorf("EmailSubject failed with lang %s", lang)
- }
-
- v = EmailBody()
- if v == "" {
- t.Errorf("EmailBody failed with lang %s", lang)
- }
-
- v = DomainZone()
- if v == "" {
- t.Errorf("DomainZone failed with lang %s", lang)
- }
-
- v = IPv4()
- if v == "" {
- t.Errorf("IPv4 failed with lang %s", lang)
- }
-
- v = UserAgent()
- if v == "" {
- t.Errorf("UserAgent failed with lang %s", lang)
- }
-
- v = IPv6()
- if v == "" {
- t.Errorf("IPv6 failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/jobs_test.go b/vendor/github.com/icrowley/fake/jobs_test.go
deleted file mode 100644
index 6ac3e3567..000000000
--- a/vendor/github.com/icrowley/fake/jobs_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestJobs(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Company()
- if v == "" {
- t.Errorf("Company failed with lang %s", lang)
- }
-
- v = JobTitle()
- if v == "" {
- t.Errorf("JobTitle failed with lang %s", lang)
- }
-
- v = Industry()
- if v == "" {
- t.Errorf("Industry failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/lorem_ipsum_test.go b/vendor/github.com/icrowley/fake/lorem_ipsum_test.go
deleted file mode 100644
index d318b0abf..000000000
--- a/vendor/github.com/icrowley/fake/lorem_ipsum_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestLoremIpsum(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Character()
- if v == "" {
- t.Errorf("Character failed with lang %s", lang)
- }
-
- v = CharactersN(2)
- if v == "" {
- t.Errorf("CharactersN failed with lang %s", lang)
- }
-
- v = Characters()
- if v == "" {
- t.Errorf("Characters failed with lang %s", lang)
- }
-
- v = Word()
- if v == "" {
- t.Errorf("Word failed with lang %s", lang)
- }
-
- v = WordsN(2)
- if v == "" {
- t.Errorf("WordsN failed with lang %s", lang)
- }
-
- v = Words()
- if v == "" {
- t.Errorf("Words failed with lang %s", lang)
- }
-
- v = Title()
- if v == "" {
- t.Errorf("Title failed with lang %s", lang)
- }
-
- v = Sentence()
- if v == "" {
- t.Errorf("Sentence failed with lang %s", lang)
- }
-
- v = SentencesN(2)
- if v == "" {
- t.Errorf("SentencesN failed with lang %s", lang)
- }
-
- v = Sentences()
- if v == "" {
- t.Errorf("Sentences failed with lang %s", lang)
- }
-
- v = Paragraph()
- if v == "" {
- t.Errorf("Paragraph failed with lang %s", lang)
- }
-
- v = ParagraphsN(2)
- if v == "" {
- t.Errorf("ParagraphsN failed with lang %s", lang)
- }
-
- v = Paragraphs()
- if v == "" {
- t.Errorf("Paragraphs failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/names_test.go b/vendor/github.com/icrowley/fake/names_test.go
deleted file mode 100644
index 0f620ff14..000000000
--- a/vendor/github.com/icrowley/fake/names_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestNames(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := MaleFirstName()
- if v == "" {
- t.Errorf("MaleFirstName failed with lang %s", lang)
- }
-
- v = FemaleFirstName()
- if v == "" {
- t.Errorf("FemaleFirstName failed with lang %s", lang)
- }
-
- v = FirstName()
- if v == "" {
- t.Errorf("FirstName failed with lang %s", lang)
- }
-
- v = MaleLastName()
- if v == "" {
- t.Errorf("MaleLastName failed with lang %s", lang)
- }
-
- v = FemaleLastName()
- if v == "" {
- t.Errorf("FemaleLastName failed with lang %s", lang)
- }
-
- v = LastName()
- if v == "" {
- t.Errorf("LastName failed with lang %s", lang)
- }
-
- v = MalePatronymic()
- if v == "" {
- t.Errorf("MalePatronymic failed with lang %s", lang)
- }
-
- v = FemalePatronymic()
- if v == "" {
- t.Errorf("FemalePatronymic failed with lang %s", lang)
- }
-
- v = Patronymic()
- if v == "" {
- t.Errorf("Patronymic failed with lang %s", lang)
- }
-
- v = MaleFullNameWithPrefix()
- if v == "" {
- t.Errorf("MaleFullNameWithPrefix failed with lang %s", lang)
- }
-
- v = FemaleFullNameWithPrefix()
- if v == "" {
- t.Errorf("FemaleFullNameWithPrefix failed with lang %s", lang)
- }
-
- v = FullNameWithPrefix()
- if v == "" {
- t.Errorf("FullNameWithPrefix failed with lang %s", lang)
- }
-
- v = MaleFullNameWithSuffix()
- if v == "" {
- t.Errorf("MaleFullNameWithSuffix failed with lang %s", lang)
- }
-
- v = FemaleFullNameWithSuffix()
- if v == "" {
- t.Errorf("FemaleFullNameWithSuffix failed with lang %s", lang)
- }
-
- v = FullNameWithSuffix()
- if v == "" {
- t.Errorf("FullNameWithSuffix failed with lang %s", lang)
- }
-
- v = MaleFullName()
- if v == "" {
- t.Errorf("MaleFullName failed with lang %s", lang)
- }
-
- v = FemaleFullName()
- if v == "" {
- t.Errorf("FemaleFullName failed with lang %s", lang)
- }
-
- v = FullName()
- if v == "" {
- t.Errorf("FullName failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/personal_test.go b/vendor/github.com/icrowley/fake/personal_test.go
deleted file mode 100644
index 6e7edf7a0..000000000
--- a/vendor/github.com/icrowley/fake/personal_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestPersonal(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Gender()
- if v == "" {
- t.Errorf("Gender failed with lang %s", lang)
- }
-
- v = GenderAbbrev()
- if v == "" {
- t.Errorf("GenderAbbrev failed with lang %s", lang)
- }
-
- v = Language()
- if v == "" {
- t.Errorf("Language failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/icrowley/fake/products_test.go b/vendor/github.com/icrowley/fake/products_test.go
deleted file mode 100644
index fd97756aa..000000000
--- a/vendor/github.com/icrowley/fake/products_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package fake
-
-import (
- "testing"
-)
-
-func TestProducts(t *testing.T) {
- for _, lang := range GetLangs() {
- SetLang(lang)
-
- v := Brand()
- if v == "" {
- t.Errorf("Brand failed with lang %s", lang)
- }
-
- v = ProductName()
- if v == "" {
- t.Errorf("ProductName failed with lang %s", lang)
- }
-
- v = Product()
- if v == "" {
- t.Errorf("Product failed with lang %s", lang)
- }
-
- v = Model()
- if v == "" {
- t.Errorf("Model failed with lang %s", lang)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/LICENSE b/vendor/github.com/jehiah/go-strftime/LICENSE
index 8b22cdb60..a49216f13 100644
--- a/vendor/github.com/olivere/elastic/LICENSE
+++ b/vendor/github.com/jehiah/go-strftime/LICENSE
@@ -1,20 +1,19 @@
-The MIT License (MIT)
-Copyright © 2012-2015 Oliver Eilhard
+Copyright (c) 2012 Jehiah Czebotar
Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the “Softwareâ€), to deal
+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 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
+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.
+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/jehiah/go-strftime/README.md b/vendor/github.com/jehiah/go-strftime/README.md
index 8eb240384..10b06f4af 100644
--- a/vendor/github.com/jehiah/go-strftime/README.md
+++ b/vendor/github.com/jehiah/go-strftime/README.md
@@ -1,4 +1,26 @@
go-strftime
===========
-go implementation of strftime \ No newline at end of file
+go implementation of strftime
+
+## Example
+
+```
+package main
+
+import (
+ "fmt"
+ "time"
+
+ strftime "github.com/jehiah/go-strftime"
+)
+
+func main() {
+ t := time.Unix(1340244776, 0)
+ utc, _ := time.LoadLocation("UTC")
+ t = t.In(utc)
+ fmt.Println(strftime.Format("%Y-%m-%d %H:%M:%S", t))
+ // Output:
+ // 2012-06-21 02:12:56
+}
+```
diff --git a/vendor/github.com/jehiah/go-strftime/strftime.go b/vendor/github.com/jehiah/go-strftime/strftime.go
index 99e26716f..bf2eeab48 100644
--- a/vendor/github.com/jehiah/go-strftime/strftime.go
+++ b/vendor/github.com/jehiah/go-strftime/strftime.go
@@ -7,8 +7,8 @@ import (
)
// taken from time/format.go
-var conversion = map[rune]string {
- /*stdLongMonth */ 'B':"January",
+var conversion = map[rune]string{
+ /*stdLongMonth */ 'B': "January",
/*stdMonth */ 'b': "Jan",
// stdNumMonth */ 'm': "1",
/*stdZeroMonth */ 'm': "01",
@@ -31,12 +31,13 @@ var conversion = map[rune]string {
/*stdTZ */ 'Z': "MST",
// stdISO8601TZ */ 'z': "Z0700", // prints Z for UTC
// stdISO8601ColonTZ */ 'z': "Z07:00", // prints Z for UTC
- /*stdNumTZ */ 'z': "-0700", // always numeric
+ /*stdNumTZ */ 'z': "-0700", // always numeric
// stdNumShortTZ */ 'b': "-07", // always numeric
// stdNumColonTZ */ 'b': "-07:00", // always numeric
+ /* nonStdMilli */ 'L': ".000",
}
-// This is an alternative to time.Format because no one knows
+// This is an alternative to time.Format because no one knows
// what date 040305 is supposed to create when used as a 'layout' string
// this takes standard strftime format options. For a complete list
// of format options see http://strftime.org/
@@ -50,8 +51,8 @@ func Format(format string, t time.Time) string {
ni += i
}
retval = append(retval, []byte(format[i:ni])...)
- if ni + 1 < len(format) {
- c := format[ni + 1]
+ if ni+1 < len(format) {
+ c := format[ni+1]
if c == '%' {
retval = append(retval, '%')
} else {
diff --git a/vendor/github.com/jehiah/go-strftime/strftime_test.go b/vendor/github.com/jehiah/go-strftime/strftime_test.go
deleted file mode 100644
index 45cbca345..000000000
--- a/vendor/github.com/jehiah/go-strftime/strftime_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package strftime
-
-import (
- "time"
- "fmt"
- "testing"
-)
-
-func ExampleFormat() {
- t := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- t = t.In(utc)
- fmt.Println(Format("%Y-%m-%d %H:%M:%S", t))
- // Output:
- // 2012-06-21 02:12:56
-}
-
-func TestNoLeadingPercentSign(t *testing.T) {
- tm := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- tm = tm.In(utc)
- result := Format("aaabbb0123456789%Y", tm)
- if result != "aaabbb01234567892012" {
- t.Logf("%s != %s", result, "aaabbb01234567892012")
- t.Fail()
- }
-}
-
-
-func TestUnsupported(t *testing.T) {
- tm := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- tm = tm.In(utc)
- result := Format("%0%1%%%2", tm)
- if result != "%0%1%%2" {
- t.Logf("%s != %s", result, "%0%1%%2")
- t.Fail()
- }
-}
-
diff --git a/vendor/github.com/lib/pq/.travis.sh b/vendor/github.com/lib/pq/.travis.sh
index ead01df73..a297dc452 100755
--- a/vendor/github.com/lib/pq/.travis.sh
+++ b/vendor/github.com/lib/pq/.travis.sh
@@ -71,12 +71,6 @@ postgresql_uninstall() {
}
megacheck_install() {
- # Megacheck is Go 1.6+, so skip if Go 1.5.
- if [[ "$(go version)" =~ "go1.5" ]]
- then
- echo "megacheck not supported, skipping installation"
- return 0
- fi
# Lock megacheck version at $MEGACHECK_VERSION to prevent spontaneous
# new error messages in old code.
go get -d honnef.co/go/tools/...
@@ -86,12 +80,6 @@ megacheck_install() {
}
golint_install() {
- # Golint is Go 1.6+, so skip if Go 1.5.
- if [[ "$(go version)" =~ "go1.5" ]]
- then
- echo "golint not supported, skipping installation"
- return 0
- fi
go get github.com/golang/lint/golint
}
diff --git a/vendor/github.com/lib/pq/.travis.yml b/vendor/github.com/lib/pq/.travis.yml
index 79c59a81d..18556e089 100644
--- a/vendor/github.com/lib/pq/.travis.yml
+++ b/vendor/github.com/lib/pq/.travis.yml
@@ -1,10 +1,9 @@
language: go
go:
- - 1.6.x
- - 1.7.x
- 1.8.x
- 1.9.x
+ - 1.10.x
- master
sudo: true
@@ -15,7 +14,7 @@ env:
- PQGOSSLTESTS=1
- PQSSLCERTTEST_PATH=$PWD/certs
- PGHOST=127.0.0.1
- - MEGACHECK_VERSION=2017.2.1
+ - MEGACHECK_VERSION=2017.2.2
matrix:
- PGVERSION=10
- PGVERSION=9.6
@@ -45,13 +44,7 @@ script:
- >
goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }'
- go vet ./...
- # For compatibility with Go 1.5, launch only if megacheck is present.
- - >
- which megacheck > /dev/null && megacheck -go 1.5 ./...
- || echo 'megacheck is not supported, skipping check'
- # For compatibility with Go 1.5, launch only if golint is present.
- - >
- which golint > /dev/null && golint ./...
- || echo 'golint is not supported, skipping check'
+ - megacheck -go 1.8 ./...
+ - golint ./...
- PQTEST_BINARY_PARAMETERS=no go test -race -v ./...
- PQTEST_BINARY_PARAMETERS=yes go test -race -v ./...
diff --git a/vendor/github.com/lib/pq/array_test.go b/vendor/github.com/lib/pq/array_test.go
deleted file mode 100644
index f724bcd88..000000000
--- a/vendor/github.com/lib/pq/array_test.go
+++ /dev/null
@@ -1,1311 +0,0 @@
-package pq
-
-import (
- "bytes"
- "database/sql"
- "database/sql/driver"
- "math/rand"
- "reflect"
- "strings"
- "testing"
-)
-
-func TestParseArray(t *testing.T) {
- for _, tt := range []struct {
- input string
- delim string
- dims []int
- elems [][]byte
- }{
- {`{}`, `,`, nil, [][]byte{}},
- {`{NULL}`, `,`, []int{1}, [][]byte{nil}},
- {`{a}`, `,`, []int{1}, [][]byte{{'a'}}},
- {`{a,b}`, `,`, []int{2}, [][]byte{{'a'}, {'b'}}},
- {`{{a,b}}`, `,`, []int{1, 2}, [][]byte{{'a'}, {'b'}}},
- {`{{a},{b}}`, `,`, []int{2, 1}, [][]byte{{'a'}, {'b'}}},
- {`{{{a,b},{c,d},{e,f}}}`, `,`, []int{1, 3, 2}, [][]byte{
- {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'},
- }},
- {`{""}`, `,`, []int{1}, [][]byte{{}}},
- {`{","}`, `,`, []int{1}, [][]byte{{','}}},
- {`{",",","}`, `,`, []int{2}, [][]byte{{','}, {','}}},
- {`{{",",","}}`, `,`, []int{1, 2}, [][]byte{{','}, {','}}},
- {`{{","},{","}}`, `,`, []int{2, 1}, [][]byte{{','}, {','}}},
- {`{{{",",","},{",",","},{",",","}}}`, `,`, []int{1, 3, 2}, [][]byte{
- {','}, {','}, {','}, {','}, {','}, {','},
- }},
- {`{"\"}"}`, `,`, []int{1}, [][]byte{{'"', '}'}}},
- {`{"\"","\""}`, `,`, []int{2}, [][]byte{{'"'}, {'"'}}},
- {`{{"\"","\""}}`, `,`, []int{1, 2}, [][]byte{{'"'}, {'"'}}},
- {`{{"\""},{"\""}}`, `,`, []int{2, 1}, [][]byte{{'"'}, {'"'}}},
- {`{{{"\"","\""},{"\"","\""},{"\"","\""}}}`, `,`, []int{1, 3, 2}, [][]byte{
- {'"'}, {'"'}, {'"'}, {'"'}, {'"'}, {'"'},
- }},
- {`{axyzb}`, `xyz`, []int{2}, [][]byte{{'a'}, {'b'}}},
- } {
- dims, elems, err := parseArray([]byte(tt.input), []byte(tt.delim))
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %q", tt.input, err)
- }
- if !reflect.DeepEqual(dims, tt.dims) {
- t.Errorf("Expected %v dimensions for %q, got %v", tt.dims, tt.input, dims)
- }
- if !reflect.DeepEqual(elems, tt.elems) {
- t.Errorf("Expected %v elements for %q, got %v", tt.elems, tt.input, elems)
- }
- }
-}
-
-func TestParseArrayError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "expected '{' at offset 0"},
- {`x`, "expected '{' at offset 0"},
- {`}`, "expected '{' at offset 0"},
- {`{`, "expected '}' at offset 1"},
- {`{{}`, "expected '}' at offset 3"},
- {`{}}`, "unexpected '}' at offset 2"},
- {`{,}`, "unexpected ',' at offset 1"},
- {`{,x}`, "unexpected ',' at offset 1"},
- {`{x,}`, "unexpected '}' at offset 3"},
- {`{x,{`, "unexpected '{' at offset 3"},
- {`{x},`, "unexpected ',' at offset 3"},
- {`{x}}`, "unexpected '}' at offset 3"},
- {`{{x}`, "expected '}' at offset 4"},
- {`{""x}`, "unexpected 'x' at offset 3"},
- {`{{a},{b,c}}`, "multidimensional arrays must have elements with matching dimensions"},
- } {
- _, _, err := parseArray([]byte(tt.input), []byte{','})
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- }
-}
-
-func TestArrayScanner(t *testing.T) {
- var s sql.Scanner = Array(&[]bool{})
- if _, ok := s.(*BoolArray); !ok {
- t.Errorf("Expected *BoolArray, got %T", s)
- }
-
- s = Array(&[]float64{})
- if _, ok := s.(*Float64Array); !ok {
- t.Errorf("Expected *Float64Array, got %T", s)
- }
-
- s = Array(&[]int64{})
- if _, ok := s.(*Int64Array); !ok {
- t.Errorf("Expected *Int64Array, got %T", s)
- }
-
- s = Array(&[]string{})
- if _, ok := s.(*StringArray); !ok {
- t.Errorf("Expected *StringArray, got %T", s)
- }
-
- for _, tt := range []interface{}{
- &[]sql.Scanner{},
- &[][]bool{},
- &[][]float64{},
- &[][]int64{},
- &[][]string{},
- } {
- s = Array(tt)
- if _, ok := s.(GenericArray); !ok {
- t.Errorf("Expected GenericArray for %T, got %T", tt, s)
- }
- }
-}
-
-func TestArrayValuer(t *testing.T) {
- var v driver.Valuer = Array([]bool{})
- if _, ok := v.(*BoolArray); !ok {
- t.Errorf("Expected *BoolArray, got %T", v)
- }
-
- v = Array([]float64{})
- if _, ok := v.(*Float64Array); !ok {
- t.Errorf("Expected *Float64Array, got %T", v)
- }
-
- v = Array([]int64{})
- if _, ok := v.(*Int64Array); !ok {
- t.Errorf("Expected *Int64Array, got %T", v)
- }
-
- v = Array([]string{})
- if _, ok := v.(*StringArray); !ok {
- t.Errorf("Expected *StringArray, got %T", v)
- }
-
- for _, tt := range []interface{}{
- nil,
- []driver.Value{},
- [][]bool{},
- [][]float64{},
- [][]int64{},
- [][]string{},
- } {
- v = Array(tt)
- if _, ok := v.(GenericArray); !ok {
- t.Errorf("Expected GenericArray for %T, got %T", tt, v)
- }
- }
-}
-
-func TestBoolArrayScanUnsupported(t *testing.T) {
- var arr BoolArray
- err := arr.Scan(1)
-
- if err == nil {
- t.Fatal("Expected error when scanning from int")
- }
- if !strings.Contains(err.Error(), "int to BoolArray") {
- t.Errorf("Expected type to be mentioned when scanning, got %q", err)
- }
-}
-
-func TestBoolArrayScanEmpty(t *testing.T) {
- var arr BoolArray
- err := arr.Scan(`{}`)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr == nil || len(arr) != 0 {
- t.Errorf("Expected empty, got %#v", arr)
- }
-}
-
-func TestBoolArrayScanNil(t *testing.T) {
- arr := BoolArray{true, true, true}
- err := arr.Scan(nil)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr != nil {
- t.Errorf("Expected nil, got %+v", arr)
- }
-}
-
-var BoolArrayStringTests = []struct {
- str string
- arr BoolArray
-}{
- {`{}`, BoolArray{}},
- {`{t}`, BoolArray{true}},
- {`{f,t}`, BoolArray{false, true}},
-}
-
-func TestBoolArrayScanBytes(t *testing.T) {
- for _, tt := range BoolArrayStringTests {
- bytes := []byte(tt.str)
- arr := BoolArray{true, true, true}
- err := arr.Scan(bytes)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", bytes, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, bytes, arr)
- }
- }
-}
-
-func BenchmarkBoolArrayScanBytes(b *testing.B) {
- var a BoolArray
- var x interface{} = []byte(`{t,f,t,f,t,f,t,f,t,f}`)
-
- for i := 0; i < b.N; i++ {
- a = BoolArray{}
- a.Scan(x)
- }
-}
-
-func TestBoolArrayScanString(t *testing.T) {
- for _, tt := range BoolArrayStringTests {
- arr := BoolArray{true, true, true}
- err := arr.Scan(tt.str)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.str, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, tt.str, arr)
- }
- }
-}
-
-func TestBoolArrayScanError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "unable to parse array"},
- {`{`, "unable to parse array"},
- {`{{t},{f}}`, "cannot convert ARRAY[2][1] to BoolArray"},
- {`{NULL}`, `could not parse boolean array index 0: invalid boolean ""`},
- {`{a}`, `could not parse boolean array index 0: invalid boolean "a"`},
- {`{t,b}`, `could not parse boolean array index 1: invalid boolean "b"`},
- {`{t,f,cd}`, `could not parse boolean array index 2: invalid boolean "cd"`},
- } {
- arr := BoolArray{true, true, true}
- err := arr.Scan(tt.input)
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- if !reflect.DeepEqual(arr, BoolArray{true, true, true}) {
- t.Errorf("Expected destination not to change for %q, got %+v", tt.input, arr)
- }
- }
-}
-
-func TestBoolArrayValue(t *testing.T) {
- result, err := BoolArray(nil).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- result, err = BoolArray([]bool{}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for empty, got %v", err)
- }
- if expected := `{}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected empty, got %q", result)
- }
-
- result, err = BoolArray([]bool{false, true, false}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if expected := `{f,t,f}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected %q, got %q", expected, result)
- }
-}
-
-func BenchmarkBoolArrayValue(b *testing.B) {
- rand.Seed(1)
- x := make([]bool, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.Intn(2) == 0
- }
- a := BoolArray(x)
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestByteaArrayScanUnsupported(t *testing.T) {
- var arr ByteaArray
- err := arr.Scan(1)
-
- if err == nil {
- t.Fatal("Expected error when scanning from int")
- }
- if !strings.Contains(err.Error(), "int to ByteaArray") {
- t.Errorf("Expected type to be mentioned when scanning, got %q", err)
- }
-}
-
-func TestByteaArrayScanEmpty(t *testing.T) {
- var arr ByteaArray
- err := arr.Scan(`{}`)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr == nil || len(arr) != 0 {
- t.Errorf("Expected empty, got %#v", arr)
- }
-}
-
-func TestByteaArrayScanNil(t *testing.T) {
- arr := ByteaArray{{2}, {6}, {0, 0}}
- err := arr.Scan(nil)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr != nil {
- t.Errorf("Expected nil, got %+v", arr)
- }
-}
-
-var ByteaArrayStringTests = []struct {
- str string
- arr ByteaArray
-}{
- {`{}`, ByteaArray{}},
- {`{NULL}`, ByteaArray{nil}},
- {`{"\\xfeff"}`, ByteaArray{{'\xFE', '\xFF'}}},
- {`{"\\xdead","\\xbeef"}`, ByteaArray{{'\xDE', '\xAD'}, {'\xBE', '\xEF'}}},
-}
-
-func TestByteaArrayScanBytes(t *testing.T) {
- for _, tt := range ByteaArrayStringTests {
- bytes := []byte(tt.str)
- arr := ByteaArray{{2}, {6}, {0, 0}}
- err := arr.Scan(bytes)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", bytes, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, bytes, arr)
- }
- }
-}
-
-func BenchmarkByteaArrayScanBytes(b *testing.B) {
- var a ByteaArray
- var x interface{} = []byte(`{"\\xfe","\\xff","\\xdead","\\xbeef","\\xfe","\\xff","\\xdead","\\xbeef","\\xfe","\\xff"}`)
-
- for i := 0; i < b.N; i++ {
- a = ByteaArray{}
- a.Scan(x)
- }
-}
-
-func TestByteaArrayScanString(t *testing.T) {
- for _, tt := range ByteaArrayStringTests {
- arr := ByteaArray{{2}, {6}, {0, 0}}
- err := arr.Scan(tt.str)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.str, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, tt.str, arr)
- }
- }
-}
-
-func TestByteaArrayScanError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "unable to parse array"},
- {`{`, "unable to parse array"},
- {`{{"\\xfeff"},{"\\xbeef"}}`, "cannot convert ARRAY[2][1] to ByteaArray"},
- {`{"\\abc"}`, "could not parse bytea array index 0: could not parse bytea value"},
- } {
- arr := ByteaArray{{2}, {6}, {0, 0}}
- err := arr.Scan(tt.input)
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- if !reflect.DeepEqual(arr, ByteaArray{{2}, {6}, {0, 0}}) {
- t.Errorf("Expected destination not to change for %q, got %+v", tt.input, arr)
- }
- }
-}
-
-func TestByteaArrayValue(t *testing.T) {
- result, err := ByteaArray(nil).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- result, err = ByteaArray([][]byte{}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for empty, got %v", err)
- }
- if expected := `{}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected empty, got %q", result)
- }
-
- result, err = ByteaArray([][]byte{{'\xDE', '\xAD', '\xBE', '\xEF'}, {'\xFE', '\xFF'}, {}}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if expected := `{"\\xdeadbeef","\\xfeff","\\x"}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected %q, got %q", expected, result)
- }
-}
-
-func BenchmarkByteaArrayValue(b *testing.B) {
- rand.Seed(1)
- x := make([][]byte, 10)
- for i := 0; i < len(x); i++ {
- x[i] = make([]byte, len(x))
- for j := 0; j < len(x); j++ {
- x[i][j] = byte(rand.Int())
- }
- }
- a := ByteaArray(x)
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestFloat64ArrayScanUnsupported(t *testing.T) {
- var arr Float64Array
- err := arr.Scan(true)
-
- if err == nil {
- t.Fatal("Expected error when scanning from bool")
- }
- if !strings.Contains(err.Error(), "bool to Float64Array") {
- t.Errorf("Expected type to be mentioned when scanning, got %q", err)
- }
-}
-
-func TestFloat64ArrayScanEmpty(t *testing.T) {
- var arr Float64Array
- err := arr.Scan(`{}`)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr == nil || len(arr) != 0 {
- t.Errorf("Expected empty, got %#v", arr)
- }
-}
-
-func TestFloat64ArrayScanNil(t *testing.T) {
- arr := Float64Array{5, 5, 5}
- err := arr.Scan(nil)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr != nil {
- t.Errorf("Expected nil, got %+v", arr)
- }
-}
-
-var Float64ArrayStringTests = []struct {
- str string
- arr Float64Array
-}{
- {`{}`, Float64Array{}},
- {`{1.2}`, Float64Array{1.2}},
- {`{3.456,7.89}`, Float64Array{3.456, 7.89}},
- {`{3,1,2}`, Float64Array{3, 1, 2}},
-}
-
-func TestFloat64ArrayScanBytes(t *testing.T) {
- for _, tt := range Float64ArrayStringTests {
- bytes := []byte(tt.str)
- arr := Float64Array{5, 5, 5}
- err := arr.Scan(bytes)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", bytes, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, bytes, arr)
- }
- }
-}
-
-func BenchmarkFloat64ArrayScanBytes(b *testing.B) {
- var a Float64Array
- var x interface{} = []byte(`{1.2,3.4,5.6,7.8,9.01,2.34,5.67,8.90,1.234,5.678}`)
-
- for i := 0; i < b.N; i++ {
- a = Float64Array{}
- a.Scan(x)
- }
-}
-
-func TestFloat64ArrayScanString(t *testing.T) {
- for _, tt := range Float64ArrayStringTests {
- arr := Float64Array{5, 5, 5}
- err := arr.Scan(tt.str)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.str, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, tt.str, arr)
- }
- }
-}
-
-func TestFloat64ArrayScanError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "unable to parse array"},
- {`{`, "unable to parse array"},
- {`{{5.6},{7.8}}`, "cannot convert ARRAY[2][1] to Float64Array"},
- {`{NULL}`, "parsing array element index 0:"},
- {`{a}`, "parsing array element index 0:"},
- {`{5.6,a}`, "parsing array element index 1:"},
- {`{5.6,7.8,a}`, "parsing array element index 2:"},
- } {
- arr := Float64Array{5, 5, 5}
- err := arr.Scan(tt.input)
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- if !reflect.DeepEqual(arr, Float64Array{5, 5, 5}) {
- t.Errorf("Expected destination not to change for %q, got %+v", tt.input, arr)
- }
- }
-}
-
-func TestFloat64ArrayValue(t *testing.T) {
- result, err := Float64Array(nil).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- result, err = Float64Array([]float64{}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for empty, got %v", err)
- }
- if expected := `{}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected empty, got %q", result)
- }
-
- result, err = Float64Array([]float64{1.2, 3.4, 5.6}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if expected := `{1.2,3.4,5.6}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected %q, got %q", expected, result)
- }
-}
-
-func BenchmarkFloat64ArrayValue(b *testing.B) {
- rand.Seed(1)
- x := make([]float64, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.NormFloat64()
- }
- a := Float64Array(x)
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestInt64ArrayScanUnsupported(t *testing.T) {
- var arr Int64Array
- err := arr.Scan(true)
-
- if err == nil {
- t.Fatal("Expected error when scanning from bool")
- }
- if !strings.Contains(err.Error(), "bool to Int64Array") {
- t.Errorf("Expected type to be mentioned when scanning, got %q", err)
- }
-}
-
-func TestInt64ArrayScanEmpty(t *testing.T) {
- var arr Int64Array
- err := arr.Scan(`{}`)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr == nil || len(arr) != 0 {
- t.Errorf("Expected empty, got %#v", arr)
- }
-}
-
-func TestInt64ArrayScanNil(t *testing.T) {
- arr := Int64Array{5, 5, 5}
- err := arr.Scan(nil)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr != nil {
- t.Errorf("Expected nil, got %+v", arr)
- }
-}
-
-var Int64ArrayStringTests = []struct {
- str string
- arr Int64Array
-}{
- {`{}`, Int64Array{}},
- {`{12}`, Int64Array{12}},
- {`{345,678}`, Int64Array{345, 678}},
-}
-
-func TestInt64ArrayScanBytes(t *testing.T) {
- for _, tt := range Int64ArrayStringTests {
- bytes := []byte(tt.str)
- arr := Int64Array{5, 5, 5}
- err := arr.Scan(bytes)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", bytes, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, bytes, arr)
- }
- }
-}
-
-func BenchmarkInt64ArrayScanBytes(b *testing.B) {
- var a Int64Array
- var x interface{} = []byte(`{1,2,3,4,5,6,7,8,9,0}`)
-
- for i := 0; i < b.N; i++ {
- a = Int64Array{}
- a.Scan(x)
- }
-}
-
-func TestInt64ArrayScanString(t *testing.T) {
- for _, tt := range Int64ArrayStringTests {
- arr := Int64Array{5, 5, 5}
- err := arr.Scan(tt.str)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.str, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, tt.str, arr)
- }
- }
-}
-
-func TestInt64ArrayScanError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "unable to parse array"},
- {`{`, "unable to parse array"},
- {`{{5},{6}}`, "cannot convert ARRAY[2][1] to Int64Array"},
- {`{NULL}`, "parsing array element index 0:"},
- {`{a}`, "parsing array element index 0:"},
- {`{5,a}`, "parsing array element index 1:"},
- {`{5,6,a}`, "parsing array element index 2:"},
- } {
- arr := Int64Array{5, 5, 5}
- err := arr.Scan(tt.input)
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- if !reflect.DeepEqual(arr, Int64Array{5, 5, 5}) {
- t.Errorf("Expected destination not to change for %q, got %+v", tt.input, arr)
- }
- }
-}
-
-func TestInt64ArrayValue(t *testing.T) {
- result, err := Int64Array(nil).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- result, err = Int64Array([]int64{}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for empty, got %v", err)
- }
- if expected := `{}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected empty, got %q", result)
- }
-
- result, err = Int64Array([]int64{1, 2, 3}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if expected := `{1,2,3}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected %q, got %q", expected, result)
- }
-}
-
-func BenchmarkInt64ArrayValue(b *testing.B) {
- rand.Seed(1)
- x := make([]int64, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.Int63()
- }
- a := Int64Array(x)
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestStringArrayScanUnsupported(t *testing.T) {
- var arr StringArray
- err := arr.Scan(true)
-
- if err == nil {
- t.Fatal("Expected error when scanning from bool")
- }
- if !strings.Contains(err.Error(), "bool to StringArray") {
- t.Errorf("Expected type to be mentioned when scanning, got %q", err)
- }
-}
-
-func TestStringArrayScanEmpty(t *testing.T) {
- var arr StringArray
- err := arr.Scan(`{}`)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr == nil || len(arr) != 0 {
- t.Errorf("Expected empty, got %#v", arr)
- }
-}
-
-func TestStringArrayScanNil(t *testing.T) {
- arr := StringArray{"x", "x", "x"}
- err := arr.Scan(nil)
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if arr != nil {
- t.Errorf("Expected nil, got %+v", arr)
- }
-}
-
-var StringArrayStringTests = []struct {
- str string
- arr StringArray
-}{
- {`{}`, StringArray{}},
- {`{t}`, StringArray{"t"}},
- {`{f,1}`, StringArray{"f", "1"}},
- {`{"a\\b","c d",","}`, StringArray{"a\\b", "c d", ","}},
-}
-
-func TestStringArrayScanBytes(t *testing.T) {
- for _, tt := range StringArrayStringTests {
- bytes := []byte(tt.str)
- arr := StringArray{"x", "x", "x"}
- err := arr.Scan(bytes)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", bytes, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, bytes, arr)
- }
- }
-}
-
-func BenchmarkStringArrayScanBytes(b *testing.B) {
- var a StringArray
- var x interface{} = []byte(`{a,b,c,d,e,f,g,h,i,j}`)
- var y interface{} = []byte(`{"\a","\b","\c","\d","\e","\f","\g","\h","\i","\j"}`)
-
- for i := 0; i < b.N; i++ {
- a = StringArray{}
- a.Scan(x)
- a = StringArray{}
- a.Scan(y)
- }
-}
-
-func TestStringArrayScanString(t *testing.T) {
- for _, tt := range StringArrayStringTests {
- arr := StringArray{"x", "x", "x"}
- err := arr.Scan(tt.str)
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.str, err)
- }
- if !reflect.DeepEqual(arr, tt.arr) {
- t.Errorf("Expected %+v for %q, got %+v", tt.arr, tt.str, arr)
- }
- }
-}
-
-func TestStringArrayScanError(t *testing.T) {
- for _, tt := range []struct {
- input, err string
- }{
- {``, "unable to parse array"},
- {`{`, "unable to parse array"},
- {`{{a},{b}}`, "cannot convert ARRAY[2][1] to StringArray"},
- {`{NULL}`, "parsing array element index 0: cannot convert nil to string"},
- {`{a,NULL}`, "parsing array element index 1: cannot convert nil to string"},
- {`{a,b,NULL}`, "parsing array element index 2: cannot convert nil to string"},
- } {
- arr := StringArray{"x", "x", "x"}
- err := arr.Scan(tt.input)
-
- if err == nil {
- t.Fatalf("Expected error for %q, got none", tt.input)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for %q, got %q", tt.err, tt.input, err)
- }
- if !reflect.DeepEqual(arr, StringArray{"x", "x", "x"}) {
- t.Errorf("Expected destination not to change for %q, got %+v", tt.input, arr)
- }
- }
-}
-
-func TestStringArrayValue(t *testing.T) {
- result, err := StringArray(nil).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- result, err = StringArray([]string{}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error for empty, got %v", err)
- }
- if expected := `{}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected empty, got %q", result)
- }
-
- result, err = StringArray([]string{`a`, `\b`, `c"`, `d,e`}).Value()
-
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if expected := `{"a","\\b","c\"","d,e"}`; !reflect.DeepEqual(result, expected) {
- t.Errorf("Expected %q, got %q", expected, result)
- }
-}
-
-func BenchmarkStringArrayValue(b *testing.B) {
- x := make([]string, 10)
- for i := 0; i < len(x); i++ {
- x[i] = strings.Repeat(`abc"def\ghi`, 5)
- }
- a := StringArray(x)
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestGenericArrayScanUnsupported(t *testing.T) {
- var s string
- var ss []string
- var nsa [1]sql.NullString
-
- for _, tt := range []struct {
- src, dest interface{}
- err string
- }{
- {nil, nil, "destination <nil> is not a pointer to array or slice"},
- {nil, true, "destination bool is not a pointer to array or slice"},
- {nil, &s, "destination *string is not a pointer to array or slice"},
- {nil, ss, "destination []string is not a pointer to array or slice"},
- {nil, &nsa, "<nil> to [1]sql.NullString"},
- {true, &ss, "bool to []string"},
- {`{{x}}`, &ss, "multidimensional ARRAY[1][1] is not implemented"},
- {`{{x},{x}}`, &ss, "multidimensional ARRAY[2][1] is not implemented"},
- {`{x}`, &ss, "scanning to string is not implemented"},
- } {
- err := GenericArray{tt.dest}.Scan(tt.src)
-
- if err == nil {
- t.Fatalf("Expected error for [%#v %#v]", tt.src, tt.dest)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for [%#v %#v], got %q", tt.err, tt.src, tt.dest, err)
- }
- }
-}
-
-func TestGenericArrayScanScannerArrayBytes(t *testing.T) {
- src, expected, nsa := []byte(`{NULL,abc,"\""}`),
- [3]sql.NullString{{}, {String: `abc`, Valid: true}, {String: `"`, Valid: true}},
- [3]sql.NullString{{String: ``, Valid: true}, {}, {}}
-
- if err := (GenericArray{&nsa}).Scan(src); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if !reflect.DeepEqual(nsa, expected) {
- t.Errorf("Expected %v, got %v", expected, nsa)
- }
-}
-
-func TestGenericArrayScanScannerArrayString(t *testing.T) {
- src, expected, nsa := `{NULL,"\"",xyz}`,
- [3]sql.NullString{{}, {String: `"`, Valid: true}, {String: `xyz`, Valid: true}},
- [3]sql.NullString{{String: ``, Valid: true}, {}, {}}
-
- if err := (GenericArray{&nsa}).Scan(src); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if !reflect.DeepEqual(nsa, expected) {
- t.Errorf("Expected %v, got %v", expected, nsa)
- }
-}
-
-func TestGenericArrayScanScannerSliceEmpty(t *testing.T) {
- var nss []sql.NullString
-
- if err := (GenericArray{&nss}).Scan(`{}`); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if nss == nil || len(nss) != 0 {
- t.Errorf("Expected empty, got %#v", nss)
- }
-}
-
-func TestGenericArrayScanScannerSliceNil(t *testing.T) {
- nss := []sql.NullString{{String: ``, Valid: true}, {}}
-
- if err := (GenericArray{&nss}).Scan(nil); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if nss != nil {
- t.Errorf("Expected nil, got %+v", nss)
- }
-}
-
-func TestGenericArrayScanScannerSliceBytes(t *testing.T) {
- src, expected, nss := []byte(`{NULL,abc,"\""}`),
- []sql.NullString{{}, {String: `abc`, Valid: true}, {String: `"`, Valid: true}},
- []sql.NullString{{String: ``, Valid: true}, {}, {}, {}, {}}
-
- if err := (GenericArray{&nss}).Scan(src); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if !reflect.DeepEqual(nss, expected) {
- t.Errorf("Expected %v, got %v", expected, nss)
- }
-}
-
-func BenchmarkGenericArrayScanScannerSliceBytes(b *testing.B) {
- var a GenericArray
- var x interface{} = []byte(`{a,b,c,d,e,f,g,h,i,j}`)
- var y interface{} = []byte(`{"\a","\b","\c","\d","\e","\f","\g","\h","\i","\j"}`)
-
- for i := 0; i < b.N; i++ {
- a = GenericArray{new([]sql.NullString)}
- a.Scan(x)
- a = GenericArray{new([]sql.NullString)}
- a.Scan(y)
- }
-}
-
-func TestGenericArrayScanScannerSliceString(t *testing.T) {
- src, expected, nss := `{NULL,"\"",xyz}`,
- []sql.NullString{{}, {String: `"`, Valid: true}, {String: `xyz`, Valid: true}},
- []sql.NullString{{String: ``, Valid: true}, {}, {}}
-
- if err := (GenericArray{&nss}).Scan(src); err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if !reflect.DeepEqual(nss, expected) {
- t.Errorf("Expected %v, got %v", expected, nss)
- }
-}
-
-type TildeNullInt64 struct{ sql.NullInt64 }
-
-func (TildeNullInt64) ArrayDelimiter() string { return "~" }
-
-func TestGenericArrayScanDelimiter(t *testing.T) {
- src, expected, tnis := `{12~NULL~76}`,
- []TildeNullInt64{{sql.NullInt64{Int64: 12, Valid: true}}, {}, {sql.NullInt64{Int64: 76, Valid: true}}},
- []TildeNullInt64{{sql.NullInt64{Int64: 0, Valid: true}}, {}}
-
- if err := (GenericArray{&tnis}).Scan(src); err != nil {
- t.Fatalf("Expected no error for %#v, got %v", src, err)
- }
- if !reflect.DeepEqual(tnis, expected) {
- t.Errorf("Expected %v for %#v, got %v", expected, src, tnis)
- }
-}
-
-func TestGenericArrayScanErrors(t *testing.T) {
- var sa [1]string
- var nis []sql.NullInt64
- var pss *[]string
-
- for _, tt := range []struct {
- src, dest interface{}
- err string
- }{
- {nil, pss, "destination *[]string is nil"},
- {`{`, &sa, "unable to parse"},
- {`{}`, &sa, "cannot convert ARRAY[0] to [1]string"},
- {`{x,x}`, &sa, "cannot convert ARRAY[2] to [1]string"},
- {`{x}`, &nis, `parsing array element index 0: converting`},
- } {
- err := GenericArray{tt.dest}.Scan(tt.src)
-
- if err == nil {
- t.Fatalf("Expected error for [%#v %#v]", tt.src, tt.dest)
- }
- if !strings.Contains(err.Error(), tt.err) {
- t.Errorf("Expected error to contain %q for [%#v %#v], got %q", tt.err, tt.src, tt.dest, err)
- }
- }
-}
-
-func TestGenericArrayValueUnsupported(t *testing.T) {
- _, err := GenericArray{true}.Value()
-
- if err == nil {
- t.Fatal("Expected error for bool")
- }
- if !strings.Contains(err.Error(), "bool to array") {
- t.Errorf("Expected type to be mentioned, got %q", err)
- }
-}
-
-type ByteArrayValuer [1]byte
-type ByteSliceValuer []byte
-type FuncArrayValuer struct {
- delimiter func() string
- value func() (driver.Value, error)
-}
-
-func (a ByteArrayValuer) Value() (driver.Value, error) { return a[:], nil }
-func (b ByteSliceValuer) Value() (driver.Value, error) { return []byte(b), nil }
-func (f FuncArrayValuer) ArrayDelimiter() string { return f.delimiter() }
-func (f FuncArrayValuer) Value() (driver.Value, error) { return f.value() }
-
-func TestGenericArrayValue(t *testing.T) {
- result, err := GenericArray{nil}.Value()
-
- if err != nil {
- t.Fatalf("Expected no error for nil, got %v", err)
- }
- if result != nil {
- t.Errorf("Expected nil, got %q", result)
- }
-
- for _, tt := range []interface{}{
- []bool(nil),
- [][]int(nil),
- []*int(nil),
- []sql.NullString(nil),
- } {
- result, err := GenericArray{tt}.Value()
-
- if err != nil {
- t.Fatalf("Expected no error for %#v, got %v", tt, err)
- }
- if result != nil {
- t.Errorf("Expected nil for %#v, got %q", tt, result)
- }
- }
-
- Tilde := func(v driver.Value) FuncArrayValuer {
- return FuncArrayValuer{
- func() string { return "~" },
- func() (driver.Value, error) { return v, nil }}
- }
-
- for _, tt := range []struct {
- result string
- input interface{}
- }{
- {`{}`, []bool{}},
- {`{true}`, []bool{true}},
- {`{true,false}`, []bool{true, false}},
- {`{true,false}`, [2]bool{true, false}},
-
- {`{}`, [][]int{{}}},
- {`{}`, [][]int{{}, {}}},
- {`{{1}}`, [][]int{{1}}},
- {`{{1},{2}}`, [][]int{{1}, {2}}},
- {`{{1,2},{3,4}}`, [][]int{{1, 2}, {3, 4}}},
- {`{{1,2},{3,4}}`, [2][2]int{{1, 2}, {3, 4}}},
-
- {`{"a","\\b","c\"","d,e"}`, []string{`a`, `\b`, `c"`, `d,e`}},
- {`{"a","\\b","c\"","d,e"}`, [][]byte{{'a'}, {'\\', 'b'}, {'c', '"'}, {'d', ',', 'e'}}},
-
- {`{NULL}`, []*int{nil}},
- {`{0,NULL}`, []*int{new(int), nil}},
-
- {`{NULL}`, []sql.NullString{{}}},
- {`{"\"",NULL}`, []sql.NullString{{String: `"`, Valid: true}, {}}},
-
- {`{"a","b"}`, []ByteArrayValuer{{'a'}, {'b'}}},
- {`{{"a","b"},{"c","d"}}`, [][]ByteArrayValuer{{{'a'}, {'b'}}, {{'c'}, {'d'}}}},
-
- {`{"e","f"}`, []ByteSliceValuer{{'e'}, {'f'}}},
- {`{{"e","f"},{"g","h"}}`, [][]ByteSliceValuer{{{'e'}, {'f'}}, {{'g'}, {'h'}}}},
-
- {`{1~2}`, []FuncArrayValuer{Tilde(int64(1)), Tilde(int64(2))}},
- {`{{1~2}~{3~4}}`, [][]FuncArrayValuer{{Tilde(int64(1)), Tilde(int64(2))}, {Tilde(int64(3)), Tilde(int64(4))}}},
- } {
- result, err := GenericArray{tt.input}.Value()
-
- if err != nil {
- t.Fatalf("Expected no error for %q, got %v", tt.input, err)
- }
- if !reflect.DeepEqual(result, tt.result) {
- t.Errorf("Expected %q for %q, got %q", tt.result, tt.input, result)
- }
- }
-}
-
-func TestGenericArrayValueErrors(t *testing.T) {
- v := []interface{}{func() {}}
- if _, err := (GenericArray{v}).Value(); err == nil {
- t.Errorf("Expected error for %q, got nil", v)
- }
-
- v = []interface{}{nil, func() {}}
- if _, err := (GenericArray{v}).Value(); err == nil {
- t.Errorf("Expected error for %q, got nil", v)
- }
-}
-
-func BenchmarkGenericArrayValueBools(b *testing.B) {
- rand.Seed(1)
- x := make([]bool, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.Intn(2) == 0
- }
- a := GenericArray{x}
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func BenchmarkGenericArrayValueFloat64s(b *testing.B) {
- rand.Seed(1)
- x := make([]float64, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.NormFloat64()
- }
- a := GenericArray{x}
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func BenchmarkGenericArrayValueInt64s(b *testing.B) {
- rand.Seed(1)
- x := make([]int64, 10)
- for i := 0; i < len(x); i++ {
- x[i] = rand.Int63()
- }
- a := GenericArray{x}
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func BenchmarkGenericArrayValueByteSlices(b *testing.B) {
- x := make([][]byte, 10)
- for i := 0; i < len(x); i++ {
- x[i] = bytes.Repeat([]byte(`abc"def\ghi`), 5)
- }
- a := GenericArray{x}
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func BenchmarkGenericArrayValueStrings(b *testing.B) {
- x := make([]string, 10)
- for i := 0; i < len(x); i++ {
- x[i] = strings.Repeat(`abc"def\ghi`, 5)
- }
- a := GenericArray{x}
-
- for i := 0; i < b.N; i++ {
- a.Value()
- }
-}
-
-func TestArrayScanBackend(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- for _, tt := range []struct {
- s string
- d sql.Scanner
- e interface{}
- }{
- {`ARRAY[true, false]`, new(BoolArray), &BoolArray{true, false}},
- {`ARRAY[E'\\xdead', E'\\xbeef']`, new(ByteaArray), &ByteaArray{{'\xDE', '\xAD'}, {'\xBE', '\xEF'}}},
- {`ARRAY[1.2, 3.4]`, new(Float64Array), &Float64Array{1.2, 3.4}},
- {`ARRAY[1, 2, 3]`, new(Int64Array), &Int64Array{1, 2, 3}},
- {`ARRAY['a', E'\\b', 'c"', 'd,e']`, new(StringArray), &StringArray{`a`, `\b`, `c"`, `d,e`}},
- } {
- err := db.QueryRow(`SELECT ` + tt.s).Scan(tt.d)
- if err != nil {
- t.Errorf("Expected no error when scanning %s into %T, got %v", tt.s, tt.d, err)
- }
- if !reflect.DeepEqual(tt.d, tt.e) {
- t.Errorf("Expected %v when scanning %s into %T, got %v", tt.e, tt.s, tt.d, tt.d)
- }
- }
-}
-
-func TestArrayValueBackend(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- for _, tt := range []struct {
- s string
- v driver.Valuer
- }{
- {`ARRAY[true, false]`, BoolArray{true, false}},
- {`ARRAY[E'\\xdead', E'\\xbeef']`, ByteaArray{{'\xDE', '\xAD'}, {'\xBE', '\xEF'}}},
- {`ARRAY[1.2, 3.4]`, Float64Array{1.2, 3.4}},
- {`ARRAY[1, 2, 3]`, Int64Array{1, 2, 3}},
- {`ARRAY['a', E'\\b', 'c"', 'd,e']`, StringArray{`a`, `\b`, `c"`, `d,e`}},
- } {
- var x int
- err := db.QueryRow(`SELECT 1 WHERE `+tt.s+` <> $1`, tt.v).Scan(&x)
- if err != sql.ErrNoRows {
- t.Errorf("Expected %v to equal %s, got %v", tt.v, tt.s, err)
- }
- }
-}
diff --git a/vendor/github.com/lib/pq/bench_test.go b/vendor/github.com/lib/pq/bench_test.go
deleted file mode 100644
index e71f41d06..000000000
--- a/vendor/github.com/lib/pq/bench_test.go
+++ /dev/null
@@ -1,435 +0,0 @@
-// +build go1.1
-
-package pq
-
-import (
- "bufio"
- "bytes"
- "database/sql"
- "database/sql/driver"
- "io"
- "math/rand"
- "net"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "testing"
- "time"
-
- "github.com/lib/pq/oid"
-)
-
-var (
- selectStringQuery = "SELECT '" + strings.Repeat("0123456789", 10) + "'"
- selectSeriesQuery = "SELECT generate_series(1, 100)"
-)
-
-func BenchmarkSelectString(b *testing.B) {
- var result string
- benchQuery(b, selectStringQuery, &result)
-}
-
-func BenchmarkSelectSeries(b *testing.B) {
- var result int
- benchQuery(b, selectSeriesQuery, &result)
-}
-
-func benchQuery(b *testing.B, query string, result interface{}) {
- b.StopTimer()
- db := openTestConn(b)
- defer db.Close()
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchQueryLoop(b, db, query, result)
- }
-}
-
-func benchQueryLoop(b *testing.B, db *sql.DB, query string, result interface{}) {
- rows, err := db.Query(query)
- if err != nil {
- b.Fatal(err)
- }
- defer rows.Close()
- for rows.Next() {
- err = rows.Scan(result)
- if err != nil {
- b.Fatal("failed to scan", err)
- }
- }
-}
-
-// reading from circularConn yields content[:prefixLen] once, followed by
-// content[prefixLen:] over and over again. It never returns EOF.
-type circularConn struct {
- content string
- prefixLen int
- pos int
- net.Conn // for all other net.Conn methods that will never be called
-}
-
-func (r *circularConn) Read(b []byte) (n int, err error) {
- n = copy(b, r.content[r.pos:])
- r.pos += n
- if r.pos >= len(r.content) {
- r.pos = r.prefixLen
- }
- return
-}
-
-func (r *circularConn) Write(b []byte) (n int, err error) { return len(b), nil }
-
-func (r *circularConn) Close() error { return nil }
-
-func fakeConn(content string, prefixLen int) *conn {
- c := &circularConn{content: content, prefixLen: prefixLen}
- return &conn{buf: bufio.NewReader(c), c: c}
-}
-
-// This benchmark is meant to be the same as BenchmarkSelectString, but takes
-// out some of the factors this package can't control. The numbers are less noisy,
-// but also the costs of network communication aren't accurately represented.
-func BenchmarkMockSelectString(b *testing.B) {
- b.StopTimer()
- // taken from a recorded run of BenchmarkSelectString
- // See: http://www.postgresql.org/docs/current/static/protocol-message-formats.html
- const response = "1\x00\x00\x00\x04" +
- "t\x00\x00\x00\x06\x00\x00" +
- "T\x00\x00\x00!\x00\x01?column?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xc1\xff\xfe\xff\xff\xff\xff\x00\x00" +
- "Z\x00\x00\x00\x05I" +
- "2\x00\x00\x00\x04" +
- "D\x00\x00\x00n\x00\x01\x00\x00\x00d0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
- "C\x00\x00\x00\rSELECT 1\x00" +
- "Z\x00\x00\x00\x05I" +
- "3\x00\x00\x00\x04" +
- "Z\x00\x00\x00\x05I"
- c := fakeConn(response, 0)
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchMockQuery(b, c, selectStringQuery)
- }
-}
-
-var seriesRowData = func() string {
- var buf bytes.Buffer
- for i := 1; i <= 100; i++ {
- digits := byte(2)
- if i >= 100 {
- digits = 3
- } else if i < 10 {
- digits = 1
- }
- buf.WriteString("D\x00\x00\x00")
- buf.WriteByte(10 + digits)
- buf.WriteString("\x00\x01\x00\x00\x00")
- buf.WriteByte(digits)
- buf.WriteString(strconv.Itoa(i))
- }
- return buf.String()
-}()
-
-func BenchmarkMockSelectSeries(b *testing.B) {
- b.StopTimer()
- var response = "1\x00\x00\x00\x04" +
- "t\x00\x00\x00\x06\x00\x00" +
- "T\x00\x00\x00!\x00\x01?column?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xc1\xff\xfe\xff\xff\xff\xff\x00\x00" +
- "Z\x00\x00\x00\x05I" +
- "2\x00\x00\x00\x04" +
- seriesRowData +
- "C\x00\x00\x00\x0fSELECT 100\x00" +
- "Z\x00\x00\x00\x05I" +
- "3\x00\x00\x00\x04" +
- "Z\x00\x00\x00\x05I"
- c := fakeConn(response, 0)
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchMockQuery(b, c, selectSeriesQuery)
- }
-}
-
-func benchMockQuery(b *testing.B, c *conn, query string) {
- stmt, err := c.Prepare(query)
- if err != nil {
- b.Fatal(err)
- }
- defer stmt.Close()
- rows, err := stmt.Query(nil)
- if err != nil {
- b.Fatal(err)
- }
- defer rows.Close()
- var dest [1]driver.Value
- for {
- if err := rows.Next(dest[:]); err != nil {
- if err == io.EOF {
- break
- }
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkPreparedSelectString(b *testing.B) {
- var result string
- benchPreparedQuery(b, selectStringQuery, &result)
-}
-
-func BenchmarkPreparedSelectSeries(b *testing.B) {
- var result int
- benchPreparedQuery(b, selectSeriesQuery, &result)
-}
-
-func benchPreparedQuery(b *testing.B, query string, result interface{}) {
- b.StopTimer()
- db := openTestConn(b)
- defer db.Close()
- stmt, err := db.Prepare(query)
- if err != nil {
- b.Fatal(err)
- }
- defer stmt.Close()
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchPreparedQueryLoop(b, db, stmt, result)
- }
-}
-
-func benchPreparedQueryLoop(b *testing.B, db *sql.DB, stmt *sql.Stmt, result interface{}) {
- rows, err := stmt.Query()
- if err != nil {
- b.Fatal(err)
- }
- if !rows.Next() {
- rows.Close()
- b.Fatal("no rows")
- }
- defer rows.Close()
- for rows.Next() {
- err = rows.Scan(&result)
- if err != nil {
- b.Fatal("failed to scan")
- }
- }
-}
-
-// See the comment for BenchmarkMockSelectString.
-func BenchmarkMockPreparedSelectString(b *testing.B) {
- b.StopTimer()
- const parseResponse = "1\x00\x00\x00\x04" +
- "t\x00\x00\x00\x06\x00\x00" +
- "T\x00\x00\x00!\x00\x01?column?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xc1\xff\xfe\xff\xff\xff\xff\x00\x00" +
- "Z\x00\x00\x00\x05I"
- const responses = parseResponse +
- "2\x00\x00\x00\x04" +
- "D\x00\x00\x00n\x00\x01\x00\x00\x00d0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
- "C\x00\x00\x00\rSELECT 1\x00" +
- "Z\x00\x00\x00\x05I"
- c := fakeConn(responses, len(parseResponse))
-
- stmt, err := c.Prepare(selectStringQuery)
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchPreparedMockQuery(b, c, stmt)
- }
-}
-
-func BenchmarkMockPreparedSelectSeries(b *testing.B) {
- b.StopTimer()
- const parseResponse = "1\x00\x00\x00\x04" +
- "t\x00\x00\x00\x06\x00\x00" +
- "T\x00\x00\x00!\x00\x01?column?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xc1\xff\xfe\xff\xff\xff\xff\x00\x00" +
- "Z\x00\x00\x00\x05I"
- var responses = parseResponse +
- "2\x00\x00\x00\x04" +
- seriesRowData +
- "C\x00\x00\x00\x0fSELECT 100\x00" +
- "Z\x00\x00\x00\x05I"
- c := fakeConn(responses, len(parseResponse))
-
- stmt, err := c.Prepare(selectSeriesQuery)
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- benchPreparedMockQuery(b, c, stmt)
- }
-}
-
-func benchPreparedMockQuery(b *testing.B, c *conn, stmt driver.Stmt) {
- rows, err := stmt.Query(nil)
- if err != nil {
- b.Fatal(err)
- }
- defer rows.Close()
- var dest [1]driver.Value
- for {
- if err := rows.Next(dest[:]); err != nil {
- if err == io.EOF {
- break
- }
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkEncodeInt64(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{}, int64(1234), oid.T_int8)
- }
-}
-
-func BenchmarkEncodeFloat64(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{}, 3.14159, oid.T_float8)
- }
-}
-
-var testByteString = []byte("abcdefghijklmnopqrstuvwxyz")
-
-func BenchmarkEncodeByteaHex(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{serverVersion: 90000}, testByteString, oid.T_bytea)
- }
-}
-func BenchmarkEncodeByteaEscape(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{serverVersion: 84000}, testByteString, oid.T_bytea)
- }
-}
-
-func BenchmarkEncodeBool(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{}, true, oid.T_bool)
- }
-}
-
-var testTimestamptz = time.Date(2001, time.January, 1, 0, 0, 0, 0, time.Local)
-
-func BenchmarkEncodeTimestamptz(b *testing.B) {
- for i := 0; i < b.N; i++ {
- encode(&parameterStatus{}, testTimestamptz, oid.T_timestamptz)
- }
-}
-
-var testIntBytes = []byte("1234")
-
-func BenchmarkDecodeInt64(b *testing.B) {
- for i := 0; i < b.N; i++ {
- decode(&parameterStatus{}, testIntBytes, oid.T_int8, formatText)
- }
-}
-
-var testFloatBytes = []byte("3.14159")
-
-func BenchmarkDecodeFloat64(b *testing.B) {
- for i := 0; i < b.N; i++ {
- decode(&parameterStatus{}, testFloatBytes, oid.T_float8, formatText)
- }
-}
-
-var testBoolBytes = []byte{'t'}
-
-func BenchmarkDecodeBool(b *testing.B) {
- for i := 0; i < b.N; i++ {
- decode(&parameterStatus{}, testBoolBytes, oid.T_bool, formatText)
- }
-}
-
-func TestDecodeBool(t *testing.T) {
- db := openTestConn(t)
- rows, err := db.Query("select true")
- if err != nil {
- t.Fatal(err)
- }
- rows.Close()
-}
-
-var testTimestamptzBytes = []byte("2013-09-17 22:15:32.360754-07")
-
-func BenchmarkDecodeTimestamptz(b *testing.B) {
- for i := 0; i < b.N; i++ {
- decode(&parameterStatus{}, testTimestamptzBytes, oid.T_timestamptz, formatText)
- }
-}
-
-func BenchmarkDecodeTimestamptzMultiThread(b *testing.B) {
- oldProcs := runtime.GOMAXPROCS(0)
- defer runtime.GOMAXPROCS(oldProcs)
- runtime.GOMAXPROCS(runtime.NumCPU())
- globalLocationCache = newLocationCache()
-
- f := func(wg *sync.WaitGroup, loops int) {
- defer wg.Done()
- for i := 0; i < loops; i++ {
- decode(&parameterStatus{}, testTimestamptzBytes, oid.T_timestamptz, formatText)
- }
- }
-
- wg := &sync.WaitGroup{}
- b.ResetTimer()
- for j := 0; j < 10; j++ {
- wg.Add(1)
- go f(wg, b.N/10)
- }
- wg.Wait()
-}
-
-func BenchmarkLocationCache(b *testing.B) {
- globalLocationCache = newLocationCache()
- for i := 0; i < b.N; i++ {
- globalLocationCache.getLocation(rand.Intn(10000))
- }
-}
-
-func BenchmarkLocationCacheMultiThread(b *testing.B) {
- oldProcs := runtime.GOMAXPROCS(0)
- defer runtime.GOMAXPROCS(oldProcs)
- runtime.GOMAXPROCS(runtime.NumCPU())
- globalLocationCache = newLocationCache()
-
- f := func(wg *sync.WaitGroup, loops int) {
- defer wg.Done()
- for i := 0; i < loops; i++ {
- globalLocationCache.getLocation(rand.Intn(10000))
- }
- }
-
- wg := &sync.WaitGroup{}
- b.ResetTimer()
- for j := 0; j < 10; j++ {
- wg.Add(1)
- go f(wg, b.N/10)
- }
- wg.Wait()
-}
-
-// Stress test the performance of parsing results from the wire.
-func BenchmarkResultParsing(b *testing.B) {
- b.StopTimer()
-
- db := openTestConn(b)
- defer db.Close()
- _, err := db.Exec("BEGIN")
- if err != nil {
- b.Fatal(err)
- }
-
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- res, err := db.Query("SELECT generate_series(1, 50000)")
- if err != nil {
- b.Fatal(err)
- }
- res.Close()
- }
-}
diff --git a/vendor/github.com/lib/pq/certs/README b/vendor/github.com/lib/pq/certs/README
deleted file mode 100644
index 24ab7b256..000000000
--- a/vendor/github.com/lib/pq/certs/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains certificates and private keys for testing some
-SSL-related functionality in Travis. Do NOT use these certificates for
-anything other than testing.
diff --git a/vendor/github.com/lib/pq/certs/bogus_root.crt b/vendor/github.com/lib/pq/certs/bogus_root.crt
deleted file mode 100644
index 1239db3a4..000000000
--- a/vendor/github.com/lib/pq/certs/bogus_root.crt
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDBjCCAe6gAwIBAgIQSnDYp/Naet9HOZljF5PuwDANBgkqhkiG9w0BAQsFADAr
-MRIwEAYDVQQKEwlDb2Nrcm9hY2gxFTATBgNVBAMTDENvY2tyb2FjaCBDQTAeFw0x
-NjAyMDcxNjQ0MzdaFw0xNzAyMDYxNjQ0MzdaMCsxEjAQBgNVBAoTCUNvY2tyb2Fj
-aDEVMBMGA1UEAxMMQ29ja3JvYWNoIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAxdln3/UdgP7ayA/G1kT7upjLe4ERwQjYQ25q0e1+vgsB5jhiirxJ
-e0+WkhhYu/mwoSAXzvlsbZ2PWFyfdanZeD/Lh6SvIeWXVVaPcWVWL1TEcoN2jr5+
-E85MMHmbbmaT2he8s6br2tM/UZxyTQ2XRprIzApbDssyw1c0Yufcpu3C6267FLEl
-IfcWrzDhnluFhthhtGXv3ToD8IuMScMC5qlKBXtKmD1B5x14ngO/ecNJ+OlEi0HU
-mavK4KWgI2rDXRZ2EnCpyTZdkc3kkRnzKcg653oOjMDRZdrhfIrha+Jq38ACsUmZ
-Su7Sp5jkIHOCO8Zg+l6GKVSq37dKMapD8wIDAQABoyYwJDAOBgNVHQ8BAf8EBAMC
-AuQwEgYDVR0TAQH/BAgwBgEB/wIBATANBgkqhkiG9w0BAQsFAAOCAQEAwZ2Tu0Yu
-rrSVdMdoPEjT1IZd+5OhM/SLzL0ddtvTithRweLHsw2lDQYlXFqr24i3UGZJQ1sp
-cqSrNwswgLUQT3vWyTjmM51HEb2vMYWKmjZ+sBQYAUP1CadrN/+OTfNGnlF1+B4w
-IXOzh7EvQmJJnNybLe4a/aRvj1NE2n8Z898B76SVU9WbfKKz8VwLzuIPDqkKcZda
-lMy5yzthyztV9YjcWs2zVOUGZvGdAhDrvZuUq6mSmxrBEvR2LBOggmVf3tGRT+Ls
-lW7c9Lrva5zLHuqmoPP07A+vuI9a0D1X44jwGDuPWJ5RnTOQ63Uez12mKNjqleHw
-DnkwNanuO8dhAA==
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/postgresql.crt b/vendor/github.com/lib/pq/certs/postgresql.crt
deleted file mode 100644
index 6e6b4284a..000000000
--- a/vendor/github.com/lib/pq/certs/postgresql.crt
+++ /dev/null
@@ -1,69 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 2 (0x2)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA
- Validity
- Not Before: Oct 11 15:10:11 2014 GMT
- Not After : Oct 8 15:10:11 2024 GMT
- Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pqgosslcert
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:e3:8c:06:9a:70:54:51:d1:34:34:83:39:cd:a2:
- 59:0f:05:ed:8d:d8:0e:34:d0:92:f4:09:4d:ee:8c:
- 78:55:49:24:f8:3c:e0:34:58:02:b2:e7:94:58:c1:
- e8:e5:bb:d1:af:f6:54:c1:40:b1:90:70:79:0d:35:
- 54:9c:8f:16:e9:c2:f0:92:e6:64:49:38:c1:76:f8:
- 47:66:c4:5b:4a:b6:a9:43:ce:c8:be:6c:4d:2b:94:
- 97:3c:55:bc:d1:d0:6e:b7:53:ae:89:5c:4b:6b:86:
- 40:be:c1:ae:1e:64:ce:9c:ae:87:0a:69:e5:c8:21:
- 12:be:ae:1d:f6:45:df:16:a7
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 9B:25:31:63:A2:D8:06:FF:CB:E3:E9:96:FF:0D:BA:DC:12:7D:04:CF
- X509v3 Authority Key Identifier:
- keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72
-
- X509v3 Basic Constraints:
- CA:FALSE
- X509v3 Key Usage:
- Digital Signature, Non Repudiation, Key Encipherment
- Signature Algorithm: sha256WithRSAEncryption
- 3e:f5:f8:0b:4e:11:bd:00:86:1f:ce:dc:97:02:98:91:11:f5:
- 65:f6:f2:8a:b2:3e:47:92:05:69:28:c9:e9:b4:f7:cf:93:d1:
- 2d:81:5d:00:3c:23:be:da:70:ea:59:e1:2c:d3:25:49:ae:a6:
- 95:54:c1:10:df:23:e3:fe:d6:e4:76:c7:6b:73:ad:1b:34:7c:
- e2:56:cc:c0:37:ae:c5:7a:11:20:6c:3d:05:0e:99:cd:22:6c:
- cf:59:a1:da:28:d4:65:ba:7d:2f:2b:3d:69:6d:a6:c1:ae:57:
- bf:56:64:13:79:f8:48:46:65:eb:81:67:28:0b:7b:de:47:10:
- b3:80:3c:31:d1:58:94:01:51:4a:c7:c8:1a:01:a8:af:c4:cd:
- bb:84:a5:d9:8b:b4:b9:a1:64:3e:95:d9:90:1d:d5:3f:67:cc:
- 3b:ba:f5:b4:d1:33:77:ee:c2:d2:3e:7e:c5:66:6e:b7:35:4c:
- 60:57:b0:b8:be:36:c8:f3:d3:95:8c:28:4a:c9:f7:27:a4:0d:
- e5:96:99:eb:f5:c8:bd:f3:84:6d:ef:02:f9:8a:36:7d:6b:5f:
- 36:68:37:41:d9:74:ae:c6:78:2e:44:86:a1:ad:43:ca:fb:b5:
- 3e:ba:10:23:09:02:ac:62:d1:d0:83:c8:95:b9:e3:5e:30:ff:
- 5b:2b:38:fa
------BEGIN CERTIFICATE-----
-MIIDEzCCAfugAwIBAgIBAjANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP
-MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp
-dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTEwMTFa
-Fw0yNDEwMDgxNTEwMTFaMGQxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx
-EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx
-FDASBgNVBAMTC3BxZ29zc2xjZXJ0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
-gQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0WAKy55RYwejl
-u9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+bE0rlJc8VbzR
-0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQABo1owWDAdBgNV
-HQ4EFgQUmyUxY6LYBv/L4+mW/w263BJ9BM8wHwYDVR0jBBgwFoAUUpPtHnYKn2VP
-3hlmwdUiQDXLoHIwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQEL
-BQADggEBAD71+AtOEb0Ahh/O3JcCmJER9WX28oqyPkeSBWkoyem098+T0S2BXQA8
-I77acOpZ4SzTJUmuppVUwRDfI+P+1uR2x2tzrRs0fOJWzMA3rsV6ESBsPQUOmc0i
-bM9Zodoo1GW6fS8rPWltpsGuV79WZBN5+EhGZeuBZygLe95HELOAPDHRWJQBUUrH
-yBoBqK/EzbuEpdmLtLmhZD6V2ZAd1T9nzDu69bTRM3fuwtI+fsVmbrc1TGBXsLi+
-Nsjz05WMKErJ9yekDeWWmev1yL3zhG3vAvmKNn1rXzZoN0HZdK7GeC5EhqGtQ8r7
-tT66ECMJAqxi0dCDyJW5414w/1srOPo=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/postgresql.key b/vendor/github.com/lib/pq/certs/postgresql.key
deleted file mode 100644
index eb8b20be9..000000000
--- a/vendor/github.com/lib/pq/certs/postgresql.key
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICWwIBAAKBgQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0
-WAKy55RYwejlu9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+
-bE0rlJc8VbzR0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQAB
-AoGAM5dM6/kp9P700i8qjOgRPym96Zoh5nGfz/rIE5z/r36NBkdvIg8OVZfR96nH
-b0b9TOMR5lsPp0sI9yivTWvX6qyvLJRWy2vvx17hXK9NxXUNTAm0PYZUTvCtcPeX
-RnJpzQKNZQPkFzF0uXBc4CtPK2Vz0+FGvAelrhYAxnw1dIkCQQD+9qaW5QhXjsjb
-Nl85CmXgxPmGROcgLQCO+omfrjf9UXrituU9Dz6auym5lDGEdMFnkzfr+wpasEy9
-mf5ZZOhDAkEA5HjXfVGaCtpydOt6hDon/uZsyssCK2lQ7NSuE3vP+sUsYMzIpEoy
-t3VWXqKbo+g9KNDTP4WEliqp1aiSIylzzQJANPeqzihQnlgEdD4MdD4rwhFJwVIp
-Le8Lcais1KaN7StzOwxB/XhgSibd2TbnPpw+3bSg5n5lvUdo+e62/31OHwJAU1jS
-I+F09KikQIr28u3UUWT2IzTT4cpVv1AHAQyV3sG3YsjSGT0IK20eyP9BEBZU2WL0
-7aNjrvR5aHxKc5FXsQJABsFtyGpgI5X4xufkJZVZ+Mklz2n7iXa+XPatMAHFxAtb
-EEMt60rngwMjXAzBSC6OYuYogRRAY3UCacNC5VhLYQ==
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/lib/pq/certs/root.crt b/vendor/github.com/lib/pq/certs/root.crt
deleted file mode 100644
index aecf8f621..000000000
--- a/vendor/github.com/lib/pq/certs/root.crt
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEAzCCAuugAwIBAgIJANmheROCdW1NMA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNV
-BAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGExEjAQBgNVBAcTCUxhcyBWZWdhczEaMBgG
-A1UEChMRZ2l0aHViLmNvbS9saWIvcHExDjAMBgNVBAMTBXBxIENBMB4XDTE0MTAx
-MTE1MDQyOVoXDTI0MTAwODE1MDQyOVowXjELMAkGA1UEBhMCVVMxDzANBgNVBAgT
-Bk5ldmFkYTESMBAGA1UEBxMJTGFzIFZlZ2FzMRowGAYDVQQKExFnaXRodWIuY29t
-L2xpYi9wcTEOMAwGA1UEAxMFcHEgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCV4PxP7ShzWBzUCThcKk3qZtOLtHmszQVtbqhvgTpm1kTRtKBdVMu0
-pLAHQ3JgJCnAYgH0iZxVGoMP16T3irdgsdC48+nNTFM2T0cCdkfDURGIhSFN47cb
-Pgy306BcDUD2q7ucW33+dlFSRuGVewocoh4BWM/vMtMvvWzdi4Ag/L/jhb+5wZxZ
-sWymsadOVSDePEMKOvlCa3EdVwVFV40TVyDb+iWBUivDAYsS2a3KajuJrO6MbZiE
-Sp2RCIkZS2zFmzWxVRi9ZhzIZhh7EVF9JAaNC3T52jhGUdlRq3YpBTMnd89iOh74
-6jWXG7wSuPj3haFzyNhmJ0ZUh+2Ynoh1AgMBAAGjgcMwgcAwHQYDVR0OBBYEFFKT
-7R52Cp9lT94ZZsHVIkA1y6ByMIGQBgNVHSMEgYgwgYWAFFKT7R52Cp9lT94ZZsHV
-IkA1y6ByoWKkYDBeMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGTmV2YWRhMRIwEAYD
-VQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdpdGh1Yi5jb20vbGliL3BxMQ4wDAYD
-VQQDEwVwcSBDQYIJANmheROCdW1NMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF
-BQADggEBAAEhCLWkqJNMI8b4gkbmj5fqQ/4+oO83bZ3w2Oqf6eZ8I8BC4f2NOyE6
-tRUlq5+aU7eqC1cOAvGjO+YHN/bF/DFpwLlzvUSXt+JP/pYcUjL7v+pIvwqec9hD
-ndvM4iIbkD/H/OYQ3L+N3W+G1x7AcFIX+bGCb3PzYVQAjxreV6//wgKBosMGFbZo
-HPxT9RPMun61SViF04H5TNs0derVn1+5eiiYENeAhJzQNyZoOOUuX1X/Inx9bEPh
-C5vFBtSMgIytPgieRJVWAiMLYsfpIAStrHztRAbBs2DU01LmMgRvHdxgFEKinC/d
-UHZZQDP+6pT+zADrGhQGXe4eThaO6f0=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/server.crt b/vendor/github.com/lib/pq/certs/server.crt
deleted file mode 100644
index ddc995a6d..000000000
--- a/vendor/github.com/lib/pq/certs/server.crt
+++ /dev/null
@@ -1,81 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 1 (0x1)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA
- Validity
- Not Before: Oct 11 15:05:15 2014 GMT
- Not After : Oct 8 15:05:15 2024 GMT
- Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=postgres
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (2048 bit)
- Modulus (2048 bit):
- 00:d7:8a:4c:85:fb:17:a5:3c:8f:e0:72:11:29:ce:
- 3f:b0:1f:3f:7d:c6:ee:7f:a7:fc:02:2b:35:47:08:
- a6:3d:90:df:5c:56:14:94:00:c7:6d:d1:d2:e2:61:
- 95:77:b8:e3:a6:66:31:f9:1f:21:7d:62:e1:27:da:
- 94:37:61:4a:ea:63:53:a0:61:b8:9c:bb:a5:e2:e7:
- b7:a6:d8:0f:05:04:c7:29:e2:ea:49:2b:7f:de:15:
- 00:a6:18:70:50:c7:0c:de:9a:f9:5a:96:b0:e1:94:
- 06:c6:6d:4a:21:3b:b4:0f:a5:6d:92:86:34:b2:4e:
- d7:0e:a7:19:c0:77:0b:7b:87:c8:92:de:42:ff:86:
- d2:b7:9a:a4:d4:15:23:ca:ad:a5:69:21:b8:ce:7e:
- 66:cb:85:5d:b9:ed:8b:2d:09:8d:94:e4:04:1e:72:
- ec:ef:d0:76:90:15:5a:a4:f7:91:4b:e9:ce:4e:9d:
- 5d:9a:70:17:9c:d8:e9:73:83:ea:3d:61:99:a6:cd:
- ac:91:40:5a:88:77:e5:4e:2a:8e:3d:13:f3:f9:38:
- 6f:81:6b:8a:95:ca:0e:07:ab:6f:da:b4:8c:d9:ff:
- aa:78:03:aa:c7:c2:cf:6f:64:92:d3:d8:83:d5:af:
- f1:23:18:a7:2e:7b:17:0b:e7:7d:f1:fa:a8:41:a3:
- 04:57
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- EE:F0:B3:46:DC:C7:09:EB:0E:B6:2F:E5:FE:62:60:45:44:9F:59:CC
- X509v3 Authority Key Identifier:
- keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72
-
- X509v3 Basic Constraints:
- CA:FALSE
- X509v3 Key Usage:
- Digital Signature, Non Repudiation, Key Encipherment
- Signature Algorithm: sha256WithRSAEncryption
- 7e:5a:6e:be:bf:d2:6c:c1:d6:fa:b6:fb:3f:06:53:36:08:87:
- 9d:95:b1:39:af:9e:f6:47:38:17:39:da:25:7c:f2:ad:0c:e3:
- ab:74:19:ca:fb:8c:a0:50:c0:1d:19:8a:9c:21:ed:0f:3a:d1:
- 96:54:2e:10:09:4f:b8:70:f7:2b:99:43:d2:c6:15:bc:3f:24:
- 7d:28:39:32:3f:8d:a4:4f:40:75:7f:3e:0d:1c:d1:69:f2:4e:
- 98:83:47:97:d2:25:ac:c9:36:86:2f:04:a6:c4:86:c7:c4:00:
- 5f:7f:b9:ad:fc:bf:e9:f5:78:d7:82:1a:51:0d:fc:ab:9e:92:
- 1d:5f:0c:18:d1:82:e0:14:c9:ce:91:89:71:ff:49:49:ff:35:
- bf:7b:44:78:42:c1:d0:66:65:bb:28:2e:60:ca:9b:20:12:a9:
- 90:61:b1:96:ec:15:46:c9:37:f7:07:90:8a:89:45:2a:3f:37:
- ec:dc:e3:e5:8f:c3:3a:57:80:a5:54:60:0c:e1:b2:26:99:2b:
- 40:7e:36:d1:9a:70:02:ec:63:f4:3b:72:ae:81:fb:30:20:6d:
- cb:48:46:c6:b5:8f:39:b1:84:05:25:55:8d:f5:62:f6:1b:46:
- 2e:da:a3:4c:26:12:44:d7:56:b6:b8:a9:ca:d3:ab:71:45:7c:
- 9f:48:6d:1e
------BEGIN CERTIFICATE-----
-MIIDlDCCAnygAwIBAgIBATANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP
-MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp
-dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTA1MTVa
-Fw0yNDEwMDgxNTA1MTVaMGExCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx
-EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx
-ETAPBgNVBAMTCHBvc3RncmVzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYUlADHbdHS4mGV
-d7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLqSSt/3hUAphhw
-UMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C/4bSt5qk1BUj
-yq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1dmnAXnNjpc4Pq
-PWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOqx8LPb2SS09iD
-1a/xIxinLnsXC+d98fqoQaMEVwIDAQABo1owWDAdBgNVHQ4EFgQU7vCzRtzHCesO
-ti/l/mJgRUSfWcwwHwYDVR0jBBgwFoAUUpPtHnYKn2VP3hlmwdUiQDXLoHIwCQYD
-VR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQELBQADggEBAH5abr6/0mzB
-1vq2+z8GUzYIh52VsTmvnvZHOBc52iV88q0M46t0Gcr7jKBQwB0Zipwh7Q860ZZU
-LhAJT7hw9yuZQ9LGFbw/JH0oOTI/jaRPQHV/Pg0c0WnyTpiDR5fSJazJNoYvBKbE
-hsfEAF9/ua38v+n1eNeCGlEN/Kuekh1fDBjRguAUyc6RiXH/SUn/Nb97RHhCwdBm
-ZbsoLmDKmyASqZBhsZbsFUbJN/cHkIqJRSo/N+zc4+WPwzpXgKVUYAzhsiaZK0B+
-NtGacALsY/Q7cq6B+zAgbctIRsa1jzmxhAUlVY31YvYbRi7ao0wmEkTXVra4qcrT
-q3FFfJ9IbR4=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/server.key b/vendor/github.com/lib/pq/certs/server.key
deleted file mode 100644
index bd7b019b6..000000000
--- a/vendor/github.com/lib/pq/certs/server.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYU
-lADHbdHS4mGVd7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLq
-SSt/3hUAphhwUMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C
-/4bSt5qk1BUjyq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1d
-mnAXnNjpc4PqPWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOq
-x8LPb2SS09iD1a/xIxinLnsXC+d98fqoQaMEVwIDAQABAoIBAF3ZoihUhJ82F4+r
-Gz4QyDpv4L1reT2sb1aiabhcU8ZK5nbWJG+tRyjSS/i2dNaEcttpdCj9HR/zhgZM
-bm0OuAgG58rVwgS80CZUruq++Qs+YVojq8/gWPTiQD4SNhV2Fmx3HkwLgUk3oxuT
-SsvdqzGE3okGVrutCIcgy126eA147VPMoej1Bb3fO6npqK0pFPhZfAc0YoqJuM+k
-obRm5pAnGUipyLCFXjA9HYPKwYZw2RtfdA3CiImHeanSdqS+ctrC9y8BV40Th7gZ
-haXdKUNdjmIxV695QQ1mkGqpKLZFqhzKioGQ2/Ly2d1iaKN9fZltTusu8unepWJ2
-tlT9qMECgYEA9uHaF1t2CqE+AJvWTihHhPIIuLxoOQXYea1qvxfcH/UMtaLKzCNm
-lQ5pqCGsPvp+10f36yttO1ZehIvlVNXuJsjt0zJmPtIolNuJY76yeussfQ9jHheB
-5uPEzCFlHzxYbBUyqgWaF6W74okRGzEGJXjYSP0yHPPdU4ep2q3bGiUCgYEA34Af
-wBSuQSK7uLxArWHvQhyuvi43ZGXls6oRGl+Ysj54s8BP6XGkq9hEJ6G4yxgyV+BR
-DUOs5X8/TLT8POuIMYvKTQthQyCk0eLv2FLdESDuuKx0kBVY3s8lK3/z5HhrdOiN
-VMNZU+xDKgKc3hN9ypkk8vcZe6EtH7Y14e0rVcsCgYBTgxi8F/M5K0wG9rAqphNz
-VFBA9XKn/2M33cKjO5X5tXIEKzpAjaUQvNxexG04rJGljzG8+mar0M6ONahw5yD1
-O7i/XWgazgpuOEkkVYiYbd8RutfDgR4vFVMn3hAP3eDnRtBplRWH9Ec3HTiNIys6
-F8PKBOQjyRZQQC7jyzW3hQKBgACe5HeuFwXLSOYsb6mLmhR+6+VPT4wR1F95W27N
-USk9jyxAnngxfpmTkiziABdgS9N+pfr5cyN4BP77ia/Jn6kzkC5Cl9SN5KdIkA3z
-vPVtN/x/ThuQU5zaymmig1ThGLtMYggYOslG4LDfLPxY5YKIhle+Y+259twdr2yf
-Mf2dAoGAaGv3tWMgnIdGRk6EQL/yb9PKHo7ShN+tKNlGaK7WwzBdKs+Fe8jkgcr7
-pz4Ne887CmxejdISzOCcdT+Zm9Bx6I/uZwWOtDvWpIgIxVX9a9URj/+D1MxTE/y4
-d6H+c89yDY62I2+drMpdjCd3EtCaTlxpTbRS+s1eAHMH7aEkcCE=
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/lib/pq/conn.go b/vendor/github.com/lib/pq/conn.go
index de6e5c17c..43c8df29f 100644
--- a/vendor/github.com/lib/pq/conn.go
+++ b/vendor/github.com/lib/pq/conn.go
@@ -340,7 +340,12 @@ func DialOpen(d Dialer, name string) (_ driver.Conn, err error) {
return nil, err
}
- // cn.ssl and cn.startup panic on error. Make sure we don't leak cn.c.
+ err = cn.ssl(o)
+ if err != nil {
+ return nil, err
+ }
+
+ // cn.startup panics on error. Make sure we don't leak cn.c.
panicking := true
defer func() {
if panicking {
@@ -348,7 +353,6 @@ func DialOpen(d Dialer, name string) (_ driver.Conn, err error) {
}
}()
- cn.ssl(o)
cn.buf = bufio.NewReader(cn.c)
cn.startup(o)
@@ -1029,30 +1033,35 @@ func (cn *conn) recv1() (t byte, r *readBuf) {
return t, r
}
-func (cn *conn) ssl(o values) {
- upgrade := ssl(o)
+func (cn *conn) ssl(o values) error {
+ upgrade, err := ssl(o)
+ if err != nil {
+ return err
+ }
+
if upgrade == nil {
// Nothing to do
- return
+ return nil
}
w := cn.writeBuf(0)
w.int32(80877103)
- if err := cn.sendStartupPacket(w); err != nil {
- panic(err)
+ if err = cn.sendStartupPacket(w); err != nil {
+ return err
}
b := cn.scratch[:1]
- _, err := io.ReadFull(cn.c, b)
+ _, err = io.ReadFull(cn.c, b)
if err != nil {
- panic(err)
+ return err
}
if b[0] != 'S' {
- panic(ErrSSLNotSupported)
+ return ErrSSLNotSupported
}
- cn.c = upgrade(cn.c)
+ cn.c, err = upgrade(cn.c)
+ return err
}
// isDriverSetting returns true iff a setting is purely for configuring the
diff --git a/vendor/github.com/lib/pq/conn_go18.go b/vendor/github.com/lib/pq/conn_go18.go
index ab97a104d..a5254f2b4 100644
--- a/vendor/github.com/lib/pq/conn_go18.go
+++ b/vendor/github.com/lib/pq/conn_go18.go
@@ -108,7 +108,10 @@ func (cn *conn) cancel() error {
can := conn{
c: c,
}
- can.ssl(cn.opts)
+ err = can.ssl(cn.opts)
+ if err != nil {
+ return err
+ }
w := can.writeBuf(0)
w.int32(80877102) // cancel request code
diff --git a/vendor/github.com/lib/pq/conn_test.go b/vendor/github.com/lib/pq/conn_test.go
deleted file mode 100644
index 7c0f30eb7..000000000
--- a/vendor/github.com/lib/pq/conn_test.go
+++ /dev/null
@@ -1,1658 +0,0 @@
-package pq
-
-import (
- "database/sql"
- "database/sql/driver"
- "fmt"
- "io"
- "net"
- "os"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-type Fatalistic interface {
- Fatal(args ...interface{})
-}
-
-func forceBinaryParameters() bool {
- bp := os.Getenv("PQTEST_BINARY_PARAMETERS")
- if bp == "yes" {
- return true
- } else if bp == "" || bp == "no" {
- return false
- } else {
- panic("unexpected value for PQTEST_BINARY_PARAMETERS")
- }
-}
-
-func testConninfo(conninfo string) string {
- defaultTo := func(envvar string, value string) {
- if os.Getenv(envvar) == "" {
- os.Setenv(envvar, value)
- }
- }
- defaultTo("PGDATABASE", "pqgotest")
- defaultTo("PGSSLMODE", "disable")
- defaultTo("PGCONNECT_TIMEOUT", "20")
-
- if forceBinaryParameters() &&
- !strings.HasPrefix(conninfo, "postgres://") &&
- !strings.HasPrefix(conninfo, "postgresql://") {
- conninfo = conninfo + " binary_parameters=yes"
- }
- return conninfo
-}
-
-func openTestConnConninfo(conninfo string) (*sql.DB, error) {
- return sql.Open("postgres", testConninfo(conninfo))
-}
-
-func openTestConn(t Fatalistic) *sql.DB {
- conn, err := openTestConnConninfo("")
- if err != nil {
- t.Fatal(err)
- }
-
- return conn
-}
-
-func getServerVersion(t *testing.T, db *sql.DB) int {
- var version int
- err := db.QueryRow("SHOW server_version_num").Scan(&version)
- if err != nil {
- t.Fatal(err)
- }
- return version
-}
-
-func TestReconnect(t *testing.T) {
- db1 := openTestConn(t)
- defer db1.Close()
- tx, err := db1.Begin()
- if err != nil {
- t.Fatal(err)
- }
- var pid1 int
- err = tx.QueryRow("SELECT pg_backend_pid()").Scan(&pid1)
- if err != nil {
- t.Fatal(err)
- }
- db2 := openTestConn(t)
- defer db2.Close()
- _, err = db2.Exec("SELECT pg_terminate_backend($1)", pid1)
- if err != nil {
- t.Fatal(err)
- }
- // The rollback will probably "fail" because we just killed
- // its connection above
- _ = tx.Rollback()
-
- const expected int = 42
- var result int
- err = db1.QueryRow(fmt.Sprintf("SELECT %d", expected)).Scan(&result)
- if err != nil {
- t.Fatal(err)
- }
- if result != expected {
- t.Errorf("got %v; expected %v", result, expected)
- }
-}
-
-func TestCommitInFailedTransaction(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- rows, err := txn.Query("SELECT error")
- if err == nil {
- rows.Close()
- t.Fatal("expected failure")
- }
- err = txn.Commit()
- if err != ErrInFailedTransaction {
- t.Fatalf("expected ErrInFailedTransaction; got %#v", err)
- }
-}
-
-func TestOpenURL(t *testing.T) {
- testURL := func(url string) {
- db, err := openTestConnConninfo(url)
- if err != nil {
- t.Fatal(err)
- }
- defer db.Close()
- // database/sql might not call our Open at all unless we do something with
- // the connection
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- txn.Rollback()
- }
- testURL("postgres://")
- testURL("postgresql://")
-}
-
-const pgpassFile = "/tmp/pqgotest_pgpass"
-
-func TestPgpass(t *testing.T) {
- if os.Getenv("TRAVIS") != "true" {
- t.Skip("not running under Travis, skipping pgpass tests")
- }
-
- testAssert := func(conninfo string, expected string, reason string) {
- conn, err := openTestConnConninfo(conninfo)
- if err != nil {
- t.Fatal(err)
- }
- defer conn.Close()
-
- txn, err := conn.Begin()
- if err != nil {
- if expected != "fail" {
- t.Fatalf(reason, err)
- }
- return
- }
- rows, err := txn.Query("SELECT USER")
- if err != nil {
- txn.Rollback()
- if expected != "fail" {
- t.Fatalf(reason, err)
- }
- } else {
- rows.Close()
- if expected != "ok" {
- t.Fatalf(reason, err)
- }
- }
- txn.Rollback()
- }
- testAssert("", "ok", "missing .pgpass, unexpected error %#v")
- os.Setenv("PGPASSFILE", pgpassFile)
- testAssert("host=/tmp", "fail", ", unexpected error %#v")
- os.Remove(pgpassFile)
- pgpass, err := os.OpenFile(pgpassFile, os.O_RDWR|os.O_CREATE, 0644)
- if err != nil {
- t.Fatalf("Unexpected error writing pgpass file %#v", err)
- }
- _, err = pgpass.WriteString(`# comment
-server:5432:some_db:some_user:pass_A
-*:5432:some_db:some_user:pass_B
-localhost:*:*:*:pass_C
-*:*:*:*:pass_fallback
-`)
- if err != nil {
- t.Fatalf("Unexpected error writing pgpass file %#v", err)
- }
- pgpass.Close()
-
- assertPassword := func(extra values, expected string) {
- o := values{
- "host": "localhost",
- "sslmode": "disable",
- "connect_timeout": "20",
- "user": "majid",
- "port": "5432",
- "extra_float_digits": "2",
- "dbname": "pqgotest",
- "client_encoding": "UTF8",
- "datestyle": "ISO, MDY",
- }
- for k, v := range extra {
- o[k] = v
- }
- (&conn{}).handlePgpass(o)
- if pw := o["password"]; pw != expected {
- t.Fatalf("For %v expected %s got %s", extra, expected, pw)
- }
- }
- // wrong permissions for the pgpass file means it should be ignored
- assertPassword(values{"host": "example.com", "user": "foo"}, "")
- // fix the permissions and check if it has taken effect
- os.Chmod(pgpassFile, 0600)
- assertPassword(values{"host": "server", "dbname": "some_db", "user": "some_user"}, "pass_A")
- assertPassword(values{"host": "example.com", "user": "foo"}, "pass_fallback")
- assertPassword(values{"host": "example.com", "dbname": "some_db", "user": "some_user"}, "pass_B")
- // localhost also matches the default "" and UNIX sockets
- assertPassword(values{"host": "", "user": "some_user"}, "pass_C")
- assertPassword(values{"host": "/tmp", "user": "some_user"}, "pass_C")
- // cleanup
- os.Remove(pgpassFile)
- os.Setenv("PGPASSFILE", "")
-}
-
-func TestExec(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Exec("CREATE TEMP TABLE temp (a int)")
- if err != nil {
- t.Fatal(err)
- }
-
- r, err := db.Exec("INSERT INTO temp VALUES (1)")
- if err != nil {
- t.Fatal(err)
- }
-
- if n, _ := r.RowsAffected(); n != 1 {
- t.Fatalf("expected 1 row affected, not %d", n)
- }
-
- r, err = db.Exec("INSERT INTO temp VALUES ($1), ($2), ($3)", 1, 2, 3)
- if err != nil {
- t.Fatal(err)
- }
-
- if n, _ := r.RowsAffected(); n != 3 {
- t.Fatalf("expected 3 rows affected, not %d", n)
- }
-
- // SELECT doesn't send the number of returned rows in the command tag
- // before 9.0
- if getServerVersion(t, db) >= 90000 {
- r, err = db.Exec("SELECT g FROM generate_series(1, 2) g")
- if err != nil {
- t.Fatal(err)
- }
- if n, _ := r.RowsAffected(); n != 2 {
- t.Fatalf("expected 2 rows affected, not %d", n)
- }
-
- r, err = db.Exec("SELECT g FROM generate_series(1, $1) g", 3)
- if err != nil {
- t.Fatal(err)
- }
- if n, _ := r.RowsAffected(); n != 3 {
- t.Fatalf("expected 3 rows affected, not %d", n)
- }
- }
-}
-
-func TestStatment(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- st, err := db.Prepare("SELECT 1")
- if err != nil {
- t.Fatal(err)
- }
-
- st1, err := db.Prepare("SELECT 2")
- if err != nil {
- t.Fatal(err)
- }
-
- r, err := st.Query()
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-
- if !r.Next() {
- t.Fatal("expected row")
- }
-
- var i int
- err = r.Scan(&i)
- if err != nil {
- t.Fatal(err)
- }
-
- if i != 1 {
- t.Fatalf("expected 1, got %d", i)
- }
-
- // st1
-
- r1, err := st1.Query()
- if err != nil {
- t.Fatal(err)
- }
- defer r1.Close()
-
- if !r1.Next() {
- if r.Err() != nil {
- t.Fatal(r1.Err())
- }
- t.Fatal("expected row")
- }
-
- err = r1.Scan(&i)
- if err != nil {
- t.Fatal(err)
- }
-
- if i != 2 {
- t.Fatalf("expected 2, got %d", i)
- }
-}
-
-func TestRowsCloseBeforeDone(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- r, err := db.Query("SELECT 1")
- if err != nil {
- t.Fatal(err)
- }
-
- err = r.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if r.Next() {
- t.Fatal("unexpected row")
- }
-
- if r.Err() != nil {
- t.Fatal(r.Err())
- }
-}
-
-func TestParameterCountMismatch(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- var notused int
- err := db.QueryRow("SELECT false", 1).Scan(&notused)
- if err == nil {
- t.Fatal("expected err")
- }
- // make sure we clean up correctly
- err = db.QueryRow("SELECT 1").Scan(&notused)
- if err != nil {
- t.Fatal(err)
- }
-
- err = db.QueryRow("SELECT $1").Scan(&notused)
- if err == nil {
- t.Fatal("expected err")
- }
- // make sure we clean up correctly
- err = db.QueryRow("SELECT 1").Scan(&notused)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// Test that EmptyQueryResponses are handled correctly.
-func TestEmptyQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- res, err := db.Exec("")
- if err != nil {
- t.Fatal(err)
- }
- if _, err := res.RowsAffected(); err != errNoRowsAffected {
- t.Fatalf("expected %s, got %v", errNoRowsAffected, err)
- }
- if _, err := res.LastInsertId(); err != errNoLastInsertID {
- t.Fatalf("expected %s, got %v", errNoLastInsertID, err)
- }
- rows, err := db.Query("")
- if err != nil {
- t.Fatal(err)
- }
- cols, err := rows.Columns()
- if err != nil {
- t.Fatal(err)
- }
- if len(cols) != 0 {
- t.Fatalf("unexpected number of columns %d in response to an empty query", len(cols))
- }
- if rows.Next() {
- t.Fatal("unexpected row")
- }
- if rows.Err() != nil {
- t.Fatal(rows.Err())
- }
-
- stmt, err := db.Prepare("")
- if err != nil {
- t.Fatal(err)
- }
- res, err = stmt.Exec()
- if err != nil {
- t.Fatal(err)
- }
- if _, err := res.RowsAffected(); err != errNoRowsAffected {
- t.Fatalf("expected %s, got %v", errNoRowsAffected, err)
- }
- if _, err := res.LastInsertId(); err != errNoLastInsertID {
- t.Fatalf("expected %s, got %v", errNoLastInsertID, err)
- }
- rows, err = stmt.Query()
- if err != nil {
- t.Fatal(err)
- }
- cols, err = rows.Columns()
- if err != nil {
- t.Fatal(err)
- }
- if len(cols) != 0 {
- t.Fatalf("unexpected number of columns %d in response to an empty query", len(cols))
- }
- if rows.Next() {
- t.Fatal("unexpected row")
- }
- if rows.Err() != nil {
- t.Fatal(rows.Err())
- }
-}
-
-// Test that rows.Columns() is correct even if there are no result rows.
-func TestEmptyResultSetColumns(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- rows, err := db.Query("SELECT 1 AS a, text 'bar' AS bar WHERE FALSE")
- if err != nil {
- t.Fatal(err)
- }
- cols, err := rows.Columns()
- if err != nil {
- t.Fatal(err)
- }
- if len(cols) != 2 {
- t.Fatalf("unexpected number of columns %d in response to an empty query", len(cols))
- }
- if rows.Next() {
- t.Fatal("unexpected row")
- }
- if rows.Err() != nil {
- t.Fatal(rows.Err())
- }
- if cols[0] != "a" || cols[1] != "bar" {
- t.Fatalf("unexpected Columns result %v", cols)
- }
-
- stmt, err := db.Prepare("SELECT $1::int AS a, text 'bar' AS bar WHERE FALSE")
- if err != nil {
- t.Fatal(err)
- }
- rows, err = stmt.Query(1)
- if err != nil {
- t.Fatal(err)
- }
- cols, err = rows.Columns()
- if err != nil {
- t.Fatal(err)
- }
- if len(cols) != 2 {
- t.Fatalf("unexpected number of columns %d in response to an empty query", len(cols))
- }
- if rows.Next() {
- t.Fatal("unexpected row")
- }
- if rows.Err() != nil {
- t.Fatal(rows.Err())
- }
- if cols[0] != "a" || cols[1] != "bar" {
- t.Fatalf("unexpected Columns result %v", cols)
- }
-
-}
-
-func TestEncodeDecode(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- q := `
- SELECT
- E'\\000\\001\\002'::bytea,
- 'foobar'::text,
- NULL::integer,
- '2000-1-1 01:02:03.04-7'::timestamptz,
- 0::boolean,
- 123,
- -321,
- 3.14::float8
- WHERE
- E'\\000\\001\\002'::bytea = $1
- AND 'foobar'::text = $2
- AND $3::integer is NULL
- `
- // AND '2000-1-1 12:00:00.000000-7'::timestamp = $3
-
- exp1 := []byte{0, 1, 2}
- exp2 := "foobar"
-
- r, err := db.Query(q, exp1, exp2, nil)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-
- if !r.Next() {
- if r.Err() != nil {
- t.Fatal(r.Err())
- }
- t.Fatal("expected row")
- }
-
- var got1 []byte
- var got2 string
- var got3 = sql.NullInt64{Valid: true}
- var got4 time.Time
- var got5, got6, got7, got8 interface{}
-
- err = r.Scan(&got1, &got2, &got3, &got4, &got5, &got6, &got7, &got8)
- if err != nil {
- t.Fatal(err)
- }
-
- if !reflect.DeepEqual(exp1, got1) {
- t.Errorf("expected %q byte: %q", exp1, got1)
- }
-
- if !reflect.DeepEqual(exp2, got2) {
- t.Errorf("expected %q byte: %q", exp2, got2)
- }
-
- if got3.Valid {
- t.Fatal("expected invalid")
- }
-
- if got4.Year() != 2000 {
- t.Fatal("wrong year")
- }
-
- if got5 != false {
- t.Fatalf("expected false, got %q", got5)
- }
-
- if got6 != int64(123) {
- t.Fatalf("expected 123, got %d", got6)
- }
-
- if got7 != int64(-321) {
- t.Fatalf("expected -321, got %d", got7)
- }
-
- if got8 != float64(3.14) {
- t.Fatalf("expected 3.14, got %f", got8)
- }
-}
-
-func TestNoData(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- st, err := db.Prepare("SELECT 1 WHERE true = false")
- if err != nil {
- t.Fatal(err)
- }
- defer st.Close()
-
- r, err := st.Query()
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-
- if r.Next() {
- if r.Err() != nil {
- t.Fatal(r.Err())
- }
- t.Fatal("unexpected row")
- }
-
- _, err = db.Query("SELECT * FROM nonexistenttable WHERE age=$1", 20)
- if err == nil {
- t.Fatal("Should have raised an error on non existent table")
- }
-
- _, err = db.Query("SELECT * FROM nonexistenttable")
- if err == nil {
- t.Fatal("Should have raised an error on non existent table")
- }
-}
-
-func TestErrorDuringStartup(t *testing.T) {
- // Don't use the normal connection setup, this is intended to
- // blow up in the startup packet from a non-existent user.
- db, err := openTestConnConninfo("user=thisuserreallydoesntexist")
- if err != nil {
- t.Fatal(err)
- }
- defer db.Close()
-
- _, err = db.Begin()
- if err == nil {
- t.Fatal("expected error")
- }
-
- e, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected Error, got %#v", err)
- } else if e.Code.Name() != "invalid_authorization_specification" && e.Code.Name() != "invalid_password" {
- t.Fatalf("expected invalid_authorization_specification or invalid_password, got %s (%+v)", e.Code.Name(), err)
- }
-}
-
-type testConn struct {
- closed bool
- net.Conn
-}
-
-func (c *testConn) Close() error {
- c.closed = true
- return c.Conn.Close()
-}
-
-type testDialer struct {
- conns []*testConn
-}
-
-func (d *testDialer) Dial(ntw, addr string) (net.Conn, error) {
- c, err := net.Dial(ntw, addr)
- if err != nil {
- return nil, err
- }
- tc := &testConn{Conn: c}
- d.conns = append(d.conns, tc)
- return tc, nil
-}
-
-func (d *testDialer) DialTimeout(ntw, addr string, timeout time.Duration) (net.Conn, error) {
- c, err := net.DialTimeout(ntw, addr, timeout)
- if err != nil {
- return nil, err
- }
- tc := &testConn{Conn: c}
- d.conns = append(d.conns, tc)
- return tc, nil
-}
-
-func TestErrorDuringStartupClosesConn(t *testing.T) {
- // Don't use the normal connection setup, this is intended to
- // blow up in the startup packet from a non-existent user.
- var d testDialer
- c, err := DialOpen(&d, testConninfo("user=thisuserreallydoesntexist"))
- if err == nil {
- c.Close()
- t.Fatal("expected dial error")
- }
- if len(d.conns) != 1 {
- t.Fatalf("got len(d.conns) = %d, want = %d", len(d.conns), 1)
- }
- if !d.conns[0].closed {
- t.Error("connection leaked")
- }
-}
-
-func TestBadConn(t *testing.T) {
- var err error
-
- cn := conn{}
- func() {
- defer cn.errRecover(&err)
- panic(io.EOF)
- }()
- if err != driver.ErrBadConn {
- t.Fatalf("expected driver.ErrBadConn, got: %#v", err)
- }
- if !cn.bad {
- t.Fatalf("expected cn.bad")
- }
-
- cn = conn{}
- func() {
- defer cn.errRecover(&err)
- e := &Error{Severity: Efatal}
- panic(e)
- }()
- if err != driver.ErrBadConn {
- t.Fatalf("expected driver.ErrBadConn, got: %#v", err)
- }
- if !cn.bad {
- t.Fatalf("expected cn.bad")
- }
-}
-
-// TestCloseBadConn tests that the underlying connection can be closed with
-// Close after an error.
-func TestCloseBadConn(t *testing.T) {
- nc, err := net.Dial("tcp", "localhost:5432")
- if err != nil {
- t.Fatal(err)
- }
- cn := conn{c: nc}
- func() {
- defer cn.errRecover(&err)
- panic(io.EOF)
- }()
- // Verify we can write before closing.
- if _, err := nc.Write(nil); err != nil {
- t.Fatal(err)
- }
- // First close should close the connection.
- if err := cn.Close(); err != nil {
- t.Fatal(err)
- }
-
- // During the Go 1.9 cycle, https://github.com/golang/go/commit/3792db5
- // changed this error from
- //
- // net.errClosing = errors.New("use of closed network connection")
- //
- // to
- //
- // internal/poll.ErrClosing = errors.New("use of closed file or network connection")
- const errClosing = "use of closed"
-
- // Verify write after closing fails.
- if _, err := nc.Write(nil); err == nil {
- t.Fatal("expected error")
- } else if !strings.Contains(err.Error(), errClosing) {
- t.Fatalf("expected %s error, got %s", errClosing, err)
- }
- // Verify second close fails.
- if err := cn.Close(); err == nil {
- t.Fatal("expected error")
- } else if !strings.Contains(err.Error(), errClosing) {
- t.Fatalf("expected %s error, got %s", errClosing, err)
- }
-}
-
-func TestErrorOnExec(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMPORARY TABLE foo(f1 int PRIMARY KEY)")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = txn.Exec("INSERT INTO foo VALUES (0), (0)")
- if err == nil {
- t.Fatal("Should have raised error")
- }
-
- e, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected Error, got %#v", err)
- } else if e.Code.Name() != "unique_violation" {
- t.Fatalf("expected unique_violation, got %s (%+v)", e.Code.Name(), err)
- }
-}
-
-func TestErrorOnQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMPORARY TABLE foo(f1 int PRIMARY KEY)")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = txn.Query("INSERT INTO foo VALUES (0), (0)")
- if err == nil {
- t.Fatal("Should have raised error")
- }
-
- e, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected Error, got %#v", err)
- } else if e.Code.Name() != "unique_violation" {
- t.Fatalf("expected unique_violation, got %s (%+v)", e.Code.Name(), err)
- }
-}
-
-func TestErrorOnQueryRowSimpleQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMPORARY TABLE foo(f1 int PRIMARY KEY)")
- if err != nil {
- t.Fatal(err)
- }
-
- var v int
- err = txn.QueryRow("INSERT INTO foo VALUES (0), (0)").Scan(&v)
- if err == nil {
- t.Fatal("Should have raised error")
- }
-
- e, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected Error, got %#v", err)
- } else if e.Code.Name() != "unique_violation" {
- t.Fatalf("expected unique_violation, got %s (%+v)", e.Code.Name(), err)
- }
-}
-
-// Test the QueryRow bug workarounds in stmt.exec() and simpleQuery()
-func TestQueryRowBugWorkaround(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- // stmt.exec()
- _, err := db.Exec("CREATE TEMP TABLE notnulltemp (a varchar(10) not null)")
- if err != nil {
- t.Fatal(err)
- }
-
- var a string
- err = db.QueryRow("INSERT INTO notnulltemp(a) values($1) RETURNING a", nil).Scan(&a)
- if err == sql.ErrNoRows {
- t.Fatalf("expected constraint violation error; got: %v", err)
- }
- pge, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected *Error; got: %#v", err)
- }
- if pge.Code.Name() != "not_null_violation" {
- t.Fatalf("expected not_null_violation; got: %s (%+v)", pge.Code.Name(), err)
- }
-
- // Test workaround in simpleQuery()
- tx, err := db.Begin()
- if err != nil {
- t.Fatalf("unexpected error %s in Begin", err)
- }
- defer tx.Rollback()
-
- _, err = tx.Exec("SET LOCAL check_function_bodies TO FALSE")
- if err != nil {
- t.Fatalf("could not disable check_function_bodies: %s", err)
- }
- _, err = tx.Exec(`
-CREATE OR REPLACE FUNCTION bad_function()
-RETURNS integer
--- hack to prevent the function from being inlined
-SET check_function_bodies TO TRUE
-AS $$
- SELECT text 'bad'
-$$ LANGUAGE sql`)
- if err != nil {
- t.Fatalf("could not create function: %s", err)
- }
-
- err = tx.QueryRow("SELECT * FROM bad_function()").Scan(&a)
- if err == nil {
- t.Fatalf("expected error")
- }
- pge, ok = err.(*Error)
- if !ok {
- t.Fatalf("expected *Error; got: %#v", err)
- }
- if pge.Code.Name() != "invalid_function_definition" {
- t.Fatalf("expected invalid_function_definition; got: %s (%+v)", pge.Code.Name(), err)
- }
-
- err = tx.Rollback()
- if err != nil {
- t.Fatalf("unexpected error %s in Rollback", err)
- }
-
- // Also test that simpleQuery()'s workaround works when the query fails
- // after a row has been received.
- rows, err := db.Query(`
-select
- (select generate_series(1, ss.i))
-from (select gs.i
- from generate_series(1, 2) gs(i)
- order by gs.i limit 2) ss`)
- if err != nil {
- t.Fatalf("query failed: %s", err)
- }
- if !rows.Next() {
- t.Fatalf("expected at least one result row; got %s", rows.Err())
- }
- var i int
- err = rows.Scan(&i)
- if err != nil {
- t.Fatalf("rows.Scan() failed: %s", err)
- }
- if i != 1 {
- t.Fatalf("unexpected value for i: %d", i)
- }
- if rows.Next() {
- t.Fatalf("unexpected row")
- }
- pge, ok = rows.Err().(*Error)
- if !ok {
- t.Fatalf("expected *Error; got: %#v", err)
- }
- if pge.Code.Name() != "cardinality_violation" {
- t.Fatalf("expected cardinality_violation; got: %s (%+v)", pge.Code.Name(), rows.Err())
- }
-}
-
-func TestSimpleQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- r, err := db.Query("select 1")
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-
- if !r.Next() {
- t.Fatal("expected row")
- }
-}
-
-func TestBindError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Exec("create temp table test (i integer)")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Query("select * from test where i=$1", "hhh")
- if err == nil {
- t.Fatal("expected an error")
- }
-
- // Should not get error here
- r, err := db.Query("select * from test where i=$1", 1)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-}
-
-func TestParseErrorInExtendedQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Query("PARSE_ERROR $1", 1)
- pqErr, _ := err.(*Error)
- // Expecting a syntax error.
- if err == nil || pqErr == nil || pqErr.Code != "42601" {
- t.Fatalf("expected syntax error, got %s", err)
- }
-
- rows, err := db.Query("SELECT 1")
- if err != nil {
- t.Fatal(err)
- }
- rows.Close()
-}
-
-// TestReturning tests that an INSERT query using the RETURNING clause returns a row.
-func TestReturning(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Exec("CREATE TEMP TABLE distributors (did integer default 0, dname text)")
- if err != nil {
- t.Fatal(err)
- }
-
- rows, err := db.Query("INSERT INTO distributors (did, dname) VALUES (DEFAULT, 'XYZ Widgets') " +
- "RETURNING did;")
- if err != nil {
- t.Fatal(err)
- }
- if !rows.Next() {
- t.Fatal("no rows")
- }
- var did int
- err = rows.Scan(&did)
- if err != nil {
- t.Fatal(err)
- }
- if did != 0 {
- t.Fatalf("bad value for did: got %d, want %d", did, 0)
- }
-
- if rows.Next() {
- t.Fatal("unexpected next row")
- }
- err = rows.Err()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestIssue186(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- // Exec() a query which returns results
- _, err := db.Exec("VALUES (1), (2), (3)")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("VALUES ($1), ($2), ($3)", 1, 2, 3)
- if err != nil {
- t.Fatal(err)
- }
-
- // Query() a query which doesn't return any results
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- rows, err := txn.Query("CREATE TEMP TABLE foo(f1 int)")
- if err != nil {
- t.Fatal(err)
- }
- if err = rows.Close(); err != nil {
- t.Fatal(err)
- }
-
- // small trick to get NoData from a parameterized query
- _, err = txn.Exec("CREATE RULE nodata AS ON INSERT TO foo DO INSTEAD NOTHING")
- if err != nil {
- t.Fatal(err)
- }
- rows, err = txn.Query("INSERT INTO foo VALUES ($1)", 1)
- if err != nil {
- t.Fatal(err)
- }
- if err = rows.Close(); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestIssue196(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- row := db.QueryRow("SELECT float4 '0.10000122' = $1, float8 '35.03554004971999' = $2",
- float32(0.10000122), float64(35.03554004971999))
-
- var float4match, float8match bool
- err := row.Scan(&float4match, &float8match)
- if err != nil {
- t.Fatal(err)
- }
- if !float4match {
- t.Errorf("Expected float4 fidelity to be maintained; got no match")
- }
- if !float8match {
- t.Errorf("Expected float8 fidelity to be maintained; got no match")
- }
-}
-
-// Test that any CommandComplete messages sent before the query results are
-// ignored.
-func TestIssue282(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- var searchPath string
- err := db.QueryRow(`
- SET LOCAL search_path TO pg_catalog;
- SET LOCAL search_path TO pg_catalog;
- SHOW search_path`).Scan(&searchPath)
- if err != nil {
- t.Fatal(err)
- }
- if searchPath != "pg_catalog" {
- t.Fatalf("unexpected search_path %s", searchPath)
- }
-}
-
-func TestReadFloatPrecision(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- row := db.QueryRow("SELECT float4 '0.10000122', float8 '35.03554004971999'")
- var float4val float32
- var float8val float64
- err := row.Scan(&float4val, &float8val)
- if err != nil {
- t.Fatal(err)
- }
- if float4val != float32(0.10000122) {
- t.Errorf("Expected float4 fidelity to be maintained; got no match")
- }
- if float8val != float64(35.03554004971999) {
- t.Errorf("Expected float8 fidelity to be maintained; got no match")
- }
-}
-
-func TestXactMultiStmt(t *testing.T) {
- // minified test case based on bug reports from
- // pico303@gmail.com and rangelspam@gmail.com
- t.Skip("Skipping failing test")
- db := openTestConn(t)
- defer db.Close()
-
- tx, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer tx.Commit()
-
- rows, err := tx.Query("select 1")
- if err != nil {
- t.Fatal(err)
- }
-
- if rows.Next() {
- var val int32
- if err = rows.Scan(&val); err != nil {
- t.Fatal(err)
- }
- } else {
- t.Fatal("Expected at least one row in first query in xact")
- }
-
- rows2, err := tx.Query("select 2")
- if err != nil {
- t.Fatal(err)
- }
-
- if rows2.Next() {
- var val2 int32
- if err := rows2.Scan(&val2); err != nil {
- t.Fatal(err)
- }
- } else {
- t.Fatal("Expected at least one row in second query in xact")
- }
-
- if err = rows.Err(); err != nil {
- t.Fatal(err)
- }
-
- if err = rows2.Err(); err != nil {
- t.Fatal(err)
- }
-
- if err = tx.Commit(); err != nil {
- t.Fatal(err)
- }
-}
-
-var envParseTests = []struct {
- Expected map[string]string
- Env []string
-}{
- {
- Env: []string{"PGDATABASE=hello", "PGUSER=goodbye"},
- Expected: map[string]string{"dbname": "hello", "user": "goodbye"},
- },
- {
- Env: []string{"PGDATESTYLE=ISO, MDY"},
- Expected: map[string]string{"datestyle": "ISO, MDY"},
- },
- {
- Env: []string{"PGCONNECT_TIMEOUT=30"},
- Expected: map[string]string{"connect_timeout": "30"},
- },
-}
-
-func TestParseEnviron(t *testing.T) {
- for i, tt := range envParseTests {
- results := parseEnviron(tt.Env)
- if !reflect.DeepEqual(tt.Expected, results) {
- t.Errorf("%d: Expected: %#v Got: %#v", i, tt.Expected, results)
- }
- }
-}
-
-func TestParseComplete(t *testing.T) {
- tpc := func(commandTag string, command string, affectedRows int64, shouldFail bool) {
- defer func() {
- if p := recover(); p != nil {
- if !shouldFail {
- t.Error(p)
- }
- }
- }()
- cn := &conn{}
- res, c := cn.parseComplete(commandTag)
- if c != command {
- t.Errorf("Expected %v, got %v", command, c)
- }
- n, err := res.RowsAffected()
- if err != nil {
- t.Fatal(err)
- }
- if n != affectedRows {
- t.Errorf("Expected %d, got %d", affectedRows, n)
- }
- }
-
- tpc("ALTER TABLE", "ALTER TABLE", 0, false)
- tpc("INSERT 0 1", "INSERT", 1, false)
- tpc("UPDATE 100", "UPDATE", 100, false)
- tpc("SELECT 100", "SELECT", 100, false)
- tpc("FETCH 100", "FETCH", 100, false)
- // allow COPY (and others) without row count
- tpc("COPY", "COPY", 0, false)
- // don't fail on command tags we don't recognize
- tpc("UNKNOWNCOMMANDTAG", "UNKNOWNCOMMANDTAG", 0, false)
-
- // failure cases
- tpc("INSERT 1", "", 0, true) // missing oid
- tpc("UPDATE 0 1", "", 0, true) // too many numbers
- tpc("SELECT foo", "", 0, true) // invalid row count
-}
-
-// Test interface conformance.
-var (
- _ driver.Execer = (*conn)(nil)
- _ driver.Queryer = (*conn)(nil)
-)
-
-func TestNullAfterNonNull(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- r, err := db.Query("SELECT 9::integer UNION SELECT NULL::integer")
- if err != nil {
- t.Fatal(err)
- }
-
- var n sql.NullInt64
-
- if !r.Next() {
- if r.Err() != nil {
- t.Fatal(err)
- }
- t.Fatal("expected row")
- }
-
- if err := r.Scan(&n); err != nil {
- t.Fatal(err)
- }
-
- if n.Int64 != 9 {
- t.Fatalf("expected 2, not %d", n.Int64)
- }
-
- if !r.Next() {
- if r.Err() != nil {
- t.Fatal(err)
- }
- t.Fatal("expected row")
- }
-
- if err := r.Scan(&n); err != nil {
- t.Fatal(err)
- }
-
- if n.Valid {
- t.Fatal("expected n to be invalid")
- }
-
- if n.Int64 != 0 {
- t.Fatalf("expected n to 2, not %d", n.Int64)
- }
-}
-
-func Test64BitErrorChecking(t *testing.T) {
- defer func() {
- if err := recover(); err != nil {
- t.Fatal("panic due to 0xFFFFFFFF != -1 " +
- "when int is 64 bits")
- }
- }()
-
- db := openTestConn(t)
- defer db.Close()
-
- r, err := db.Query(`SELECT *
-FROM (VALUES (0::integer, NULL::text), (1, 'test string')) AS t;`)
-
- if err != nil {
- t.Fatal(err)
- }
-
- defer r.Close()
-
- for r.Next() {
- }
-}
-
-func TestCommit(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Exec("CREATE TEMP TABLE temp (a int)")
- if err != nil {
- t.Fatal(err)
- }
- sqlInsert := "INSERT INTO temp VALUES (1)"
- sqlSelect := "SELECT * FROM temp"
- tx, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- _, err = tx.Exec(sqlInsert)
- if err != nil {
- t.Fatal(err)
- }
- err = tx.Commit()
- if err != nil {
- t.Fatal(err)
- }
- var i int
- err = db.QueryRow(sqlSelect).Scan(&i)
- if err != nil {
- t.Fatal(err)
- }
- if i != 1 {
- t.Fatalf("expected 1, got %d", i)
- }
-}
-
-func TestErrorClass(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Query("SELECT int 'notint'")
- if err == nil {
- t.Fatal("expected error")
- }
- pge, ok := err.(*Error)
- if !ok {
- t.Fatalf("expected *pq.Error, got %#+v", err)
- }
- if pge.Code.Class() != "22" {
- t.Fatalf("expected class 28, got %v", pge.Code.Class())
- }
- if pge.Code.Class().Name() != "data_exception" {
- t.Fatalf("expected data_exception, got %v", pge.Code.Class().Name())
- }
-}
-
-func TestParseOpts(t *testing.T) {
- tests := []struct {
- in string
- expected values
- valid bool
- }{
- {"dbname=hello user=goodbye", values{"dbname": "hello", "user": "goodbye"}, true},
- {"dbname=hello user=goodbye ", values{"dbname": "hello", "user": "goodbye"}, true},
- {"dbname = hello user=goodbye", values{"dbname": "hello", "user": "goodbye"}, true},
- {"dbname=hello user =goodbye", values{"dbname": "hello", "user": "goodbye"}, true},
- {"dbname=hello user= goodbye", values{"dbname": "hello", "user": "goodbye"}, true},
- {"host=localhost password='correct horse battery staple'", values{"host": "localhost", "password": "correct horse battery staple"}, true},
- {"dbname=データベース password=パスワード", values{"dbname": "データベース", "password": "パスワード"}, true},
- {"dbname=hello user=''", values{"dbname": "hello", "user": ""}, true},
- {"user='' dbname=hello", values{"dbname": "hello", "user": ""}, true},
- // The last option value is an empty string if there's no non-whitespace after its =
- {"dbname=hello user= ", values{"dbname": "hello", "user": ""}, true},
-
- // The parser ignores spaces after = and interprets the next set of non-whitespace characters as the value.
- {"user= password=foo", values{"user": "password=foo"}, true},
-
- // Backslash escapes next char
- {`user=a\ \'\\b`, values{"user": `a '\b`}, true},
- {`user='a \'b'`, values{"user": `a 'b`}, true},
-
- // Incomplete escape
- {`user=x\`, values{}, false},
-
- // No '=' after the key
- {"postgre://marko@internet", values{}, false},
- {"dbname user=goodbye", values{}, false},
- {"user=foo blah", values{}, false},
- {"user=foo blah ", values{}, false},
-
- // Unterminated quoted value
- {"dbname=hello user='unterminated", values{}, false},
- }
-
- for _, test := range tests {
- o := make(values)
- err := parseOpts(test.in, o)
-
- switch {
- case err != nil && test.valid:
- t.Errorf("%q got unexpected error: %s", test.in, err)
- case err == nil && test.valid && !reflect.DeepEqual(test.expected, o):
- t.Errorf("%q got: %#v want: %#v", test.in, o, test.expected)
- case err == nil && !test.valid:
- t.Errorf("%q expected an error", test.in)
- }
- }
-}
-
-func TestRuntimeParameters(t *testing.T) {
- tests := []struct {
- conninfo string
- param string
- expected string
- success bool
- }{
- // invalid parameter
- {"DOESNOTEXIST=foo", "", "", false},
- // we can only work with a specific value for these two
- {"client_encoding=SQL_ASCII", "", "", false},
- {"datestyle='ISO, YDM'", "", "", false},
- // "options" should work exactly as it does in libpq
- {"options='-c search_path=pqgotest'", "search_path", "pqgotest", true},
- // pq should override client_encoding in this case
- {"options='-c client_encoding=SQL_ASCII'", "client_encoding", "UTF8", true},
- // allow client_encoding to be set explicitly
- {"client_encoding=UTF8", "client_encoding", "UTF8", true},
- // test a runtime parameter not supported by libpq
- {"work_mem='139kB'", "work_mem", "139kB", true},
- // test fallback_application_name
- {"application_name=foo fallback_application_name=bar", "application_name", "foo", true},
- {"application_name='' fallback_application_name=bar", "application_name", "", true},
- {"fallback_application_name=bar", "application_name", "bar", true},
- }
-
- for _, test := range tests {
- db, err := openTestConnConninfo(test.conninfo)
- if err != nil {
- t.Fatal(err)
- }
-
- // application_name didn't exist before 9.0
- if test.param == "application_name" && getServerVersion(t, db) < 90000 {
- db.Close()
- continue
- }
-
- tryGetParameterValue := func() (value string, success bool) {
- defer db.Close()
- row := db.QueryRow("SELECT current_setting($1)", test.param)
- err = row.Scan(&value)
- if err != nil {
- return "", false
- }
- return value, true
- }
-
- value, success := tryGetParameterValue()
- if success != test.success && !test.success {
- t.Fatalf("%v: unexpected error: %v", test.conninfo, err)
- }
- if success != test.success {
- t.Fatalf("unexpected outcome %v (was expecting %v) for conninfo \"%s\"",
- success, test.success, test.conninfo)
- }
- if value != test.expected {
- t.Fatalf("bad value for %s: got %s, want %s with conninfo \"%s\"",
- test.param, value, test.expected, test.conninfo)
- }
- }
-}
-
-func TestIsUTF8(t *testing.T) {
- var cases = []struct {
- name string
- want bool
- }{
- {"unicode", true},
- {"utf-8", true},
- {"utf_8", true},
- {"UTF-8", true},
- {"UTF8", true},
- {"utf8", true},
- {"u n ic_ode", true},
- {"ut_f%8", true},
- {"ubf8", false},
- {"punycode", false},
- }
-
- for _, test := range cases {
- if g := isUTF8(test.name); g != test.want {
- t.Errorf("isUTF8(%q) = %v want %v", test.name, g, test.want)
- }
- }
-}
-
-func TestQuoteIdentifier(t *testing.T) {
- var cases = []struct {
- input string
- want string
- }{
- {`foo`, `"foo"`},
- {`foo bar baz`, `"foo bar baz"`},
- {`foo"bar`, `"foo""bar"`},
- {"foo\x00bar", `"foo"`},
- {"\x00foo", `""`},
- }
-
- for _, test := range cases {
- got := QuoteIdentifier(test.input)
- if got != test.want {
- t.Errorf("QuoteIdentifier(%q) = %v want %v", test.input, got, test.want)
- }
- }
-}
-
-func TestRowsResultTag(t *testing.T) {
- type ResultTag interface {
- Result() driver.Result
- Tag() string
- }
-
- tests := []struct {
- query string
- tag string
- ra int64
- }{
- {
- query: "CREATE TEMP TABLE temp (a int)",
- tag: "CREATE TABLE",
- },
- {
- query: "INSERT INTO temp VALUES (1), (2)",
- tag: "INSERT",
- ra: 2,
- },
- {
- query: "SELECT 1",
- },
- // A SELECT anywhere should take precedent.
- {
- query: "SELECT 1; INSERT INTO temp VALUES (1), (2)",
- },
- {
- query: "INSERT INTO temp VALUES (1), (2); SELECT 1",
- },
- // Multiple statements that don't return rows should return the last tag.
- {
- query: "CREATE TEMP TABLE t (a int); DROP TABLE t",
- tag: "DROP TABLE",
- },
- // Ensure a rows-returning query in any position among various tags-returing
- // statements will prefer the rows.
- {
- query: "SELECT 1; CREATE TEMP TABLE t (a int); DROP TABLE t",
- },
- {
- query: "CREATE TEMP TABLE t (a int); SELECT 1; DROP TABLE t",
- },
- {
- query: "CREATE TEMP TABLE t (a int); DROP TABLE t; SELECT 1",
- },
- // Verify that an no-results query doesn't set the tag.
- {
- query: "CREATE TEMP TABLE t (a int); SELECT 1 WHERE FALSE; DROP TABLE t;",
- },
- }
-
- // If this is the only test run, this will correct the connection string.
- openTestConn(t).Close()
-
- conn, err := Open("")
- if err != nil {
- t.Fatal(err)
- }
- defer conn.Close()
- q := conn.(driver.Queryer)
-
- for _, test := range tests {
- if rows, err := q.Query(test.query, nil); err != nil {
- t.Fatalf("%s: %s", test.query, err)
- } else {
- r := rows.(ResultTag)
- if tag := r.Tag(); tag != test.tag {
- t.Fatalf("%s: unexpected tag %q", test.query, tag)
- }
- res := r.Result()
- if ra, _ := res.RowsAffected(); ra != test.ra {
- t.Fatalf("%s: unexpected rows affected: %d", test.query, ra)
- }
- rows.Close()
- }
- }
-}
-
-// TestQuickClose tests that closing a query early allows a subsequent query to work.
-func TestQuickClose(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- tx, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- rows, err := tx.Query("SELECT 1; SELECT 2;")
- if err != nil {
- t.Fatal(err)
- }
- if err := rows.Close(); err != nil {
- t.Fatal(err)
- }
-
- var id int
- if err := tx.QueryRow("SELECT 3").Scan(&id); err != nil {
- t.Fatal(err)
- }
- if id != 3 {
- t.Fatalf("unexpected %d", id)
- }
- if err := tx.Commit(); err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/lib/pq/copy_test.go b/vendor/github.com/lib/pq/copy_test.go
deleted file mode 100644
index c1a3cd7fa..000000000
--- a/vendor/github.com/lib/pq/copy_test.go
+++ /dev/null
@@ -1,463 +0,0 @@
-package pq
-
-import (
- "bytes"
- "database/sql"
- "database/sql/driver"
- "strings"
- "testing"
-)
-
-func TestCopyInStmt(t *testing.T) {
- stmt := CopyIn("table name")
- if stmt != `COPY "table name" () FROM STDIN` {
- t.Fatal(stmt)
- }
-
- stmt = CopyIn("table name", "column 1", "column 2")
- if stmt != `COPY "table name" ("column 1", "column 2") FROM STDIN` {
- t.Fatal(stmt)
- }
-
- stmt = CopyIn(`table " name """`, `co"lumn""`)
- if stmt != `COPY "table "" name """"""" ("co""lumn""""") FROM STDIN` {
- t.Fatal(stmt)
- }
-}
-
-func TestCopyInSchemaStmt(t *testing.T) {
- stmt := CopyInSchema("schema name", "table name")
- if stmt != `COPY "schema name"."table name" () FROM STDIN` {
- t.Fatal(stmt)
- }
-
- stmt = CopyInSchema("schema name", "table name", "column 1", "column 2")
- if stmt != `COPY "schema name"."table name" ("column 1", "column 2") FROM STDIN` {
- t.Fatal(stmt)
- }
-
- stmt = CopyInSchema(`schema " name """`, `table " name """`, `co"lumn""`)
- if stmt != `COPY "schema "" name """"""".`+
- `"table "" name """"""" ("co""lumn""""") FROM STDIN` {
- t.Fatal(stmt)
- }
-}
-
-func TestCopyInMultipleValues(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (a int, b varchar)")
- if err != nil {
- t.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "a", "b"))
- if err != nil {
- t.Fatal(err)
- }
-
- longString := strings.Repeat("#", 500)
-
- for i := 0; i < 500; i++ {
- _, err = stmt.Exec(int64(i), longString)
- if err != nil {
- t.Fatal(err)
- }
- }
-
- _, err = stmt.Exec()
- if err != nil {
- t.Fatal(err)
- }
-
- err = stmt.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- var num int
- err = txn.QueryRow("SELECT COUNT(*) FROM temp").Scan(&num)
- if err != nil {
- t.Fatal(err)
- }
-
- if num != 500 {
- t.Fatalf("expected 500 items, not %d", num)
- }
-}
-
-func TestCopyInRaiseStmtTrigger(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- if getServerVersion(t, db) < 90000 {
- var exists int
- err := db.QueryRow("SELECT 1 FROM pg_language WHERE lanname = 'plpgsql'").Scan(&exists)
- if err == sql.ErrNoRows {
- t.Skip("language PL/PgSQL does not exist; skipping TestCopyInRaiseStmtTrigger")
- } else if err != nil {
- t.Fatal(err)
- }
- }
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (a int, b varchar)")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = txn.Exec(`
- CREATE OR REPLACE FUNCTION pg_temp.temptest()
- RETURNS trigger AS
- $BODY$ begin
- raise notice 'Hello world';
- return new;
- end $BODY$
- LANGUAGE plpgsql`)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = txn.Exec(`
- CREATE TRIGGER temptest_trigger
- BEFORE INSERT
- ON temp
- FOR EACH ROW
- EXECUTE PROCEDURE pg_temp.temptest()`)
- if err != nil {
- t.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "a", "b"))
- if err != nil {
- t.Fatal(err)
- }
-
- longString := strings.Repeat("#", 500)
-
- _, err = stmt.Exec(int64(1), longString)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = stmt.Exec()
- if err != nil {
- t.Fatal(err)
- }
-
- err = stmt.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- var num int
- err = txn.QueryRow("SELECT COUNT(*) FROM temp").Scan(&num)
- if err != nil {
- t.Fatal(err)
- }
-
- if num != 1 {
- t.Fatalf("expected 1 items, not %d", num)
- }
-}
-
-func TestCopyInTypes(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (num INTEGER, text VARCHAR, blob BYTEA, nothing VARCHAR)")
- if err != nil {
- t.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "num", "text", "blob", "nothing"))
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = stmt.Exec(int64(1234567890), "Héllö\n ☃!\r\t\\", []byte{0, 255, 9, 10, 13}, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = stmt.Exec()
- if err != nil {
- t.Fatal(err)
- }
-
- err = stmt.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- var num int
- var text string
- var blob []byte
- var nothing sql.NullString
-
- err = txn.QueryRow("SELECT * FROM temp").Scan(&num, &text, &blob, &nothing)
- if err != nil {
- t.Fatal(err)
- }
-
- if num != 1234567890 {
- t.Fatal("unexpected result", num)
- }
- if text != "Héllö\n ☃!\r\t\\" {
- t.Fatal("unexpected result", text)
- }
- if !bytes.Equal(blob, []byte{0, 255, 9, 10, 13}) {
- t.Fatal("unexpected result", blob)
- }
- if nothing.Valid {
- t.Fatal("unexpected result", nothing.String)
- }
-}
-
-func TestCopyInWrongType(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (num INTEGER)")
- if err != nil {
- t.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "num"))
- if err != nil {
- t.Fatal(err)
- }
- defer stmt.Close()
-
- _, err = stmt.Exec("Héllö\n ☃!\r\t\\")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = stmt.Exec()
- if err == nil {
- t.Fatal("expected error")
- }
- if pge := err.(*Error); pge.Code.Name() != "invalid_text_representation" {
- t.Fatalf("expected 'invalid input syntax for integer' error, got %s (%+v)", pge.Code.Name(), pge)
- }
-}
-
-func TestCopyOutsideOfTxnError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- _, err := db.Prepare(CopyIn("temp", "num"))
- if err == nil {
- t.Fatal("COPY outside of transaction did not return an error")
- }
- if err != errCopyNotSupportedOutsideTxn {
- t.Fatalf("expected %s, got %s", err, err.Error())
- }
-}
-
-func TestCopyInBinaryError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (num INTEGER)")
- if err != nil {
- t.Fatal(err)
- }
- _, err = txn.Prepare("COPY temp (num) FROM STDIN WITH binary")
- if err != errBinaryCopyNotSupported {
- t.Fatalf("expected %s, got %+v", errBinaryCopyNotSupported, err)
- }
- // check that the protocol is in a valid state
- err = txn.Rollback()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestCopyFromError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (num INTEGER)")
- if err != nil {
- t.Fatal(err)
- }
- _, err = txn.Prepare("COPY temp (num) TO STDOUT")
- if err != errCopyToNotSupported {
- t.Fatalf("expected %s, got %+v", errCopyToNotSupported, err)
- }
- // check that the protocol is in a valid state
- err = txn.Rollback()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestCopySyntaxError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Prepare("COPY ")
- if err == nil {
- t.Fatal("expected error")
- }
- if pge := err.(*Error); pge.Code.Name() != "syntax_error" {
- t.Fatalf("expected syntax error, got %s (%+v)", pge.Code.Name(), pge)
- }
- // check that the protocol is in a valid state
- err = txn.Rollback()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// Tests for connection errors in copyin.resploop()
-func TestCopyRespLoopConnectionError(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- var pid int
- err = txn.QueryRow("SELECT pg_backend_pid()").Scan(&pid)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (a int)")
- if err != nil {
- t.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "a"))
- if err != nil {
- t.Fatal(err)
- }
- defer stmt.Close()
-
- _, err = db.Exec("SELECT pg_terminate_backend($1)", pid)
- if err != nil {
- t.Fatal(err)
- }
-
- if getServerVersion(t, db) < 90500 {
- // We have to try and send something over, since postgres before
- // version 9.5 won't process SIGTERMs while it's waiting for
- // CopyData/CopyEnd messages; see tcop/postgres.c.
- _, err = stmt.Exec(1)
- if err != nil {
- t.Fatal(err)
- }
- }
- _, err = stmt.Exec()
- if err == nil {
- t.Fatalf("expected error")
- }
- pge, ok := err.(*Error)
- if !ok {
- if err == driver.ErrBadConn {
- // likely an EPIPE
- } else {
- t.Fatalf("expected *pq.Error or driver.ErrBadConn, got %+#v", err)
- }
- } else if pge.Code.Name() != "admin_shutdown" {
- t.Fatalf("expected admin_shutdown, got %s", pge.Code.Name())
- }
-
- _ = stmt.Close()
-}
-
-func BenchmarkCopyIn(b *testing.B) {
- db := openTestConn(b)
- defer db.Close()
-
- txn, err := db.Begin()
- if err != nil {
- b.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("CREATE TEMP TABLE temp (a int, b varchar)")
- if err != nil {
- b.Fatal(err)
- }
-
- stmt, err := txn.Prepare(CopyIn("temp", "a", "b"))
- if err != nil {
- b.Fatal(err)
- }
-
- for i := 0; i < b.N; i++ {
- _, err = stmt.Exec(int64(i), "hello world!")
- if err != nil {
- b.Fatal(err)
- }
- }
-
- _, err = stmt.Exec()
- if err != nil {
- b.Fatal(err)
- }
-
- err = stmt.Close()
- if err != nil {
- b.Fatal(err)
- }
-
- var num int
- err = txn.QueryRow("SELECT COUNT(*) FROM temp").Scan(&num)
- if err != nil {
- b.Fatal(err)
- }
-
- if num != b.N {
- b.Fatalf("expected %d items, not %d", b.N, num)
- }
-}
diff --git a/vendor/github.com/lib/pq/encode_test.go b/vendor/github.com/lib/pq/encode_test.go
deleted file mode 100644
index 634a05c66..000000000
--- a/vendor/github.com/lib/pq/encode_test.go
+++ /dev/null
@@ -1,763 +0,0 @@
-package pq
-
-import (
- "bytes"
- "database/sql"
- "fmt"
- "strings"
- "testing"
- "time"
-
- "github.com/lib/pq/oid"
-)
-
-func TestScanTimestamp(t *testing.T) {
- var nt NullTime
- tn := time.Now()
- nt.Scan(tn)
- if !nt.Valid {
- t.Errorf("Expected Valid=false")
- }
- if nt.Time != tn {
- t.Errorf("Time value mismatch")
- }
-}
-
-func TestScanNilTimestamp(t *testing.T) {
- var nt NullTime
- nt.Scan(nil)
- if nt.Valid {
- t.Errorf("Expected Valid=false")
- }
-}
-
-var timeTests = []struct {
- str string
- timeval time.Time
-}{
- {"22001-02-03", time.Date(22001, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))},
- {"2001-02-03", time.Date(2001, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))},
- {"0001-12-31 BC", time.Date(0, time.December, 31, 0, 0, 0, 0, time.FixedZone("", 0))},
- {"2001-02-03 BC", time.Date(-2000, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06", time.Date(2001, time.February, 3, 4, 5, 6, 0, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.000001", time.Date(2001, time.February, 3, 4, 5, 6, 1000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.00001", time.Date(2001, time.February, 3, 4, 5, 6, 10000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.0001", time.Date(2001, time.February, 3, 4, 5, 6, 100000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.001", time.Date(2001, time.February, 3, 4, 5, 6, 1000000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.01", time.Date(2001, time.February, 3, 4, 5, 6, 10000000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.1", time.Date(2001, time.February, 3, 4, 5, 6, 100000000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.12", time.Date(2001, time.February, 3, 4, 5, 6, 120000000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.123", time.Date(2001, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.1234", time.Date(2001, time.February, 3, 4, 5, 6, 123400000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.12345", time.Date(2001, time.February, 3, 4, 5, 6, 123450000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.123456", time.Date(2001, time.February, 3, 4, 5, 6, 123456000, time.FixedZone("", 0))},
- {"2001-02-03 04:05:06.123-07", time.Date(2001, time.February, 3, 4, 5, 6, 123000000,
- time.FixedZone("", -7*60*60))},
- {"2001-02-03 04:05:06-07", time.Date(2001, time.February, 3, 4, 5, 6, 0,
- time.FixedZone("", -7*60*60))},
- {"2001-02-03 04:05:06-07:42", time.Date(2001, time.February, 3, 4, 5, 6, 0,
- time.FixedZone("", -(7*60*60+42*60)))},
- {"2001-02-03 04:05:06-07:30:09", time.Date(2001, time.February, 3, 4, 5, 6, 0,
- time.FixedZone("", -(7*60*60+30*60+9)))},
- {"2001-02-03 04:05:06+07", time.Date(2001, time.February, 3, 4, 5, 6, 0,
- time.FixedZone("", 7*60*60))},
- {"0011-02-03 04:05:06 BC", time.Date(-10, time.February, 3, 4, 5, 6, 0, time.FixedZone("", 0))},
- {"0011-02-03 04:05:06.123 BC", time.Date(-10, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0))},
- {"0011-02-03 04:05:06.123-07 BC", time.Date(-10, time.February, 3, 4, 5, 6, 123000000,
- time.FixedZone("", -7*60*60))},
- {"0001-02-03 04:05:06.123", time.Date(1, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0))},
- {"0001-02-03 04:05:06.123 BC", time.Date(1, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0)).AddDate(-1, 0, 0)},
- {"0001-02-03 04:05:06.123 BC", time.Date(0, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0))},
- {"0002-02-03 04:05:06.123 BC", time.Date(0, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0)).AddDate(-1, 0, 0)},
- {"0002-02-03 04:05:06.123 BC", time.Date(-1, time.February, 3, 4, 5, 6, 123000000, time.FixedZone("", 0))},
- {"12345-02-03 04:05:06.1", time.Date(12345, time.February, 3, 4, 5, 6, 100000000, time.FixedZone("", 0))},
- {"123456-02-03 04:05:06.1", time.Date(123456, time.February, 3, 4, 5, 6, 100000000, time.FixedZone("", 0))},
-}
-
-// Test that parsing the string results in the expected value.
-func TestParseTs(t *testing.T) {
- for i, tt := range timeTests {
- val, err := ParseTimestamp(nil, tt.str)
- if err != nil {
- t.Errorf("%d: got error: %v", i, err)
- } else if val.String() != tt.timeval.String() {
- t.Errorf("%d: expected to parse %q into %q; got %q",
- i, tt.str, tt.timeval, val)
- }
- }
-}
-
-var timeErrorTests = []string{
- "BC",
- " BC",
- "2001",
- "2001-2-03",
- "2001-02-3",
- "2001-02-03 ",
- "2001-02-03 B",
- "2001-02-03 04",
- "2001-02-03 04:",
- "2001-02-03 04:05",
- "2001-02-03 04:05 B",
- "2001-02-03 04:05 BC",
- "2001-02-03 04:05:",
- "2001-02-03 04:05:6",
- "2001-02-03 04:05:06 B",
- "2001-02-03 04:05:06BC",
- "2001-02-03 04:05:06.123 B",
-}
-
-// Test that parsing the string results in an error.
-func TestParseTsErrors(t *testing.T) {
- for i, tt := range timeErrorTests {
- _, err := ParseTimestamp(nil, tt)
- if err == nil {
- t.Errorf("%d: expected an error from parsing: %v", i, tt)
- }
- }
-}
-
-// Now test that sending the value into the database and parsing it back
-// returns the same time.Time value.
-func TestEncodeAndParseTs(t *testing.T) {
- db, err := openTestConnConninfo("timezone='Etc/UTC'")
- if err != nil {
- t.Fatal(err)
- }
- defer db.Close()
-
- for i, tt := range timeTests {
- var dbstr string
- err = db.QueryRow("SELECT ($1::timestamptz)::text", tt.timeval).Scan(&dbstr)
- if err != nil {
- t.Errorf("%d: could not send value %q to the database: %s", i, tt.timeval, err)
- continue
- }
-
- val, err := ParseTimestamp(nil, dbstr)
- if err != nil {
- t.Errorf("%d: could not parse value %q: %s", i, dbstr, err)
- continue
- }
- val = val.In(tt.timeval.Location())
- if val.String() != tt.timeval.String() {
- t.Errorf("%d: expected to parse %q into %q; got %q", i, dbstr, tt.timeval, val)
- }
- }
-}
-
-var formatTimeTests = []struct {
- time time.Time
- expected string
-}{
- {time.Time{}, "0001-01-01 00:00:00Z"},
- {time.Date(2001, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 0)), "2001-02-03 04:05:06.123456789Z"},
- {time.Date(2001, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 2*60*60)), "2001-02-03 04:05:06.123456789+02:00"},
- {time.Date(2001, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", -6*60*60)), "2001-02-03 04:05:06.123456789-06:00"},
- {time.Date(2001, time.February, 3, 4, 5, 6, 0, time.FixedZone("", -(7*60*60+30*60+9))), "2001-02-03 04:05:06-07:30:09"},
-
- {time.Date(1, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 0)), "0001-02-03 04:05:06.123456789Z"},
- {time.Date(1, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 2*60*60)), "0001-02-03 04:05:06.123456789+02:00"},
- {time.Date(1, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", -6*60*60)), "0001-02-03 04:05:06.123456789-06:00"},
-
- {time.Date(0, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 0)), "0001-02-03 04:05:06.123456789Z BC"},
- {time.Date(0, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", 2*60*60)), "0001-02-03 04:05:06.123456789+02:00 BC"},
- {time.Date(0, time.February, 3, 4, 5, 6, 123456789, time.FixedZone("", -6*60*60)), "0001-02-03 04:05:06.123456789-06:00 BC"},
-
- {time.Date(1, time.February, 3, 4, 5, 6, 0, time.FixedZone("", -(7*60*60+30*60+9))), "0001-02-03 04:05:06-07:30:09"},
- {time.Date(0, time.February, 3, 4, 5, 6, 0, time.FixedZone("", -(7*60*60+30*60+9))), "0001-02-03 04:05:06-07:30:09 BC"},
-}
-
-func TestFormatTs(t *testing.T) {
- for i, tt := range formatTimeTests {
- val := string(formatTs(tt.time))
- if val != tt.expected {
- t.Errorf("%d: incorrect time format %q, want %q", i, val, tt.expected)
- }
- }
-}
-
-func TestFormatTsBackend(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- var str string
- err := db.QueryRow("SELECT '2001-02-03T04:05:06.007-08:09:10'::time::text").Scan(&str)
- if err == nil {
- t.Fatalf("PostgreSQL is accepting an ISO timestamp input for time")
- }
-
- for i, tt := range formatTimeTests {
- for _, typ := range []string{"date", "time", "timetz", "timestamp", "timestamptz"} {
- err = db.QueryRow("SELECT $1::"+typ+"::text", tt.time).Scan(&str)
- if err != nil {
- t.Errorf("%d: incorrect time format for %v on the backend: %v", i, typ, err)
- }
- }
- }
-}
-
-func TestTimestampWithTimeZone(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- tx, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer tx.Rollback()
-
- // try several different locations, all included in Go's zoneinfo.zip
- for _, locName := range []string{
- "UTC",
- "America/Chicago",
- "America/New_York",
- "Australia/Darwin",
- "Australia/Perth",
- } {
- loc, err := time.LoadLocation(locName)
- if err != nil {
- t.Logf("Could not load time zone %s - skipping", locName)
- continue
- }
-
- // Postgres timestamps have a resolution of 1 microsecond, so don't
- // use the full range of the Nanosecond argument
- refTime := time.Date(2012, 11, 6, 10, 23, 42, 123456000, loc)
-
- for _, pgTimeZone := range []string{"US/Eastern", "Australia/Darwin"} {
- // Switch Postgres's timezone to test different output timestamp formats
- _, err = tx.Exec(fmt.Sprintf("set time zone '%s'", pgTimeZone))
- if err != nil {
- t.Fatal(err)
- }
-
- var gotTime time.Time
- row := tx.QueryRow("select $1::timestamp with time zone", refTime)
- err = row.Scan(&gotTime)
- if err != nil {
- t.Fatal(err)
- }
-
- if !refTime.Equal(gotTime) {
- t.Errorf("timestamps not equal: %s != %s", refTime, gotTime)
- }
-
- // check that the time zone is set correctly based on TimeZone
- pgLoc, err := time.LoadLocation(pgTimeZone)
- if err != nil {
- t.Logf("Could not load time zone %s - skipping", pgLoc)
- continue
- }
- translated := refTime.In(pgLoc)
- if translated.String() != gotTime.String() {
- t.Errorf("timestamps not equal: %s != %s", translated, gotTime)
- }
- }
- }
-}
-
-func TestTimestampWithOutTimezone(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- test := func(ts, pgts string) {
- r, err := db.Query("SELECT $1::timestamp", pgts)
- if err != nil {
- t.Fatalf("Could not run query: %v", err)
- }
-
- if !r.Next() {
- t.Fatal("Expected at least one row")
- }
-
- var result time.Time
- err = r.Scan(&result)
- if err != nil {
- t.Fatalf("Did not expect error scanning row: %v", err)
- }
-
- expected, err := time.Parse(time.RFC3339, ts)
- if err != nil {
- t.Fatalf("Could not parse test time literal: %v", err)
- }
-
- if !result.Equal(expected) {
- t.Fatalf("Expected time to match %v: got mismatch %v",
- expected, result)
- }
-
- if r.Next() {
- t.Fatal("Expected only one row")
- }
- }
-
- test("2000-01-01T00:00:00Z", "2000-01-01T00:00:00")
-
- // Test higher precision time
- test("2013-01-04T20:14:58.80033Z", "2013-01-04 20:14:58.80033")
-}
-
-func TestInfinityTimestamp(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
- var err error
- var resultT time.Time
-
- expectedErrorStrPrefix := `sql: Scan error on column index 0: unsupported`
- type testCases []struct {
- Query string
- Param string
- ExpectedErrStrPrefix string
- ExpectedVal interface{}
- }
- tc := testCases{
- {"SELECT $1::timestamp", "-infinity", expectedErrorStrPrefix, "-infinity"},
- {"SELECT $1::timestamptz", "-infinity", expectedErrorStrPrefix, "-infinity"},
- {"SELECT $1::timestamp", "infinity", expectedErrorStrPrefix, "infinity"},
- {"SELECT $1::timestamptz", "infinity", expectedErrorStrPrefix, "infinity"},
- }
- // try to assert []byte to time.Time
- for _, q := range tc {
- err = db.QueryRow(q.Query, q.Param).Scan(&resultT)
- if !strings.HasPrefix(err.Error(), q.ExpectedErrStrPrefix) {
- t.Errorf("Scanning -/+infinity, expected error to have prefix %q, got %q", q.ExpectedErrStrPrefix, err)
- }
- }
- // yield []byte
- for _, q := range tc {
- var resultI interface{}
- err = db.QueryRow(q.Query, q.Param).Scan(&resultI)
- if err != nil {
- t.Errorf("Scanning -/+infinity, expected no error, got %q", err)
- }
- result, ok := resultI.([]byte)
- if !ok {
- t.Errorf("Scanning -/+infinity, expected []byte, got %#v", resultI)
- }
- if string(result) != q.ExpectedVal {
- t.Errorf("Scanning -/+infinity, expected %q, got %q", q.ExpectedVal, result)
- }
- }
-
- y1500 := time.Date(1500, time.January, 1, 0, 0, 0, 0, time.UTC)
- y2500 := time.Date(2500, time.January, 1, 0, 0, 0, 0, time.UTC)
- EnableInfinityTs(y1500, y2500)
-
- err = db.QueryRow("SELECT $1::timestamp", "infinity").Scan(&resultT)
- if err != nil {
- t.Errorf("Scanning infinity, expected no error, got %q", err)
- }
- if !resultT.Equal(y2500) {
- t.Errorf("Scanning infinity, expected %q, got %q", y2500, resultT)
- }
-
- err = db.QueryRow("SELECT $1::timestamptz", "infinity").Scan(&resultT)
- if err != nil {
- t.Errorf("Scanning infinity, expected no error, got %q", err)
- }
- if !resultT.Equal(y2500) {
- t.Errorf("Scanning Infinity, expected time %q, got %q", y2500, resultT.String())
- }
-
- err = db.QueryRow("SELECT $1::timestamp", "-infinity").Scan(&resultT)
- if err != nil {
- t.Errorf("Scanning -infinity, expected no error, got %q", err)
- }
- if !resultT.Equal(y1500) {
- t.Errorf("Scanning -infinity, expected time %q, got %q", y1500, resultT.String())
- }
-
- err = db.QueryRow("SELECT $1::timestamptz", "-infinity").Scan(&resultT)
- if err != nil {
- t.Errorf("Scanning -infinity, expected no error, got %q", err)
- }
- if !resultT.Equal(y1500) {
- t.Errorf("Scanning -infinity, expected time %q, got %q", y1500, resultT.String())
- }
-
- ym1500 := time.Date(-1500, time.January, 1, 0, 0, 0, 0, time.UTC)
- y11500 := time.Date(11500, time.January, 1, 0, 0, 0, 0, time.UTC)
- var s string
- err = db.QueryRow("SELECT $1::timestamp::text", ym1500).Scan(&s)
- if err != nil {
- t.Errorf("Encoding -infinity, expected no error, got %q", err)
- }
- if s != "-infinity" {
- t.Errorf("Encoding -infinity, expected %q, got %q", "-infinity", s)
- }
- err = db.QueryRow("SELECT $1::timestamptz::text", ym1500).Scan(&s)
- if err != nil {
- t.Errorf("Encoding -infinity, expected no error, got %q", err)
- }
- if s != "-infinity" {
- t.Errorf("Encoding -infinity, expected %q, got %q", "-infinity", s)
- }
-
- err = db.QueryRow("SELECT $1::timestamp::text", y11500).Scan(&s)
- if err != nil {
- t.Errorf("Encoding infinity, expected no error, got %q", err)
- }
- if s != "infinity" {
- t.Errorf("Encoding infinity, expected %q, got %q", "infinity", s)
- }
- err = db.QueryRow("SELECT $1::timestamptz::text", y11500).Scan(&s)
- if err != nil {
- t.Errorf("Encoding infinity, expected no error, got %q", err)
- }
- if s != "infinity" {
- t.Errorf("Encoding infinity, expected %q, got %q", "infinity", s)
- }
-
- disableInfinityTs()
-
- var panicErrorString string
- func() {
- defer func() {
- panicErrorString, _ = recover().(string)
- }()
- EnableInfinityTs(y2500, y1500)
- }()
- if panicErrorString != infinityTsNegativeMustBeSmaller {
- t.Errorf("Expected error, %q, got %q", infinityTsNegativeMustBeSmaller, panicErrorString)
- }
-}
-
-func TestStringWithNul(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- hello0world := string("hello\x00world")
- _, err := db.Query("SELECT $1::text", &hello0world)
- if err == nil {
- t.Fatal("Postgres accepts a string with nul in it; " +
- "injection attacks may be plausible")
- }
-}
-
-func TestByteSliceToText(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- b := []byte("hello world")
- row := db.QueryRow("SELECT $1::text", b)
-
- var result []byte
- err := row.Scan(&result)
- if err != nil {
- t.Fatal(err)
- }
-
- if string(result) != string(b) {
- t.Fatalf("expected %v but got %v", b, result)
- }
-}
-
-func TestStringToBytea(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- b := "hello world"
- row := db.QueryRow("SELECT $1::bytea", b)
-
- var result []byte
- err := row.Scan(&result)
- if err != nil {
- t.Fatal(err)
- }
-
- if !bytes.Equal(result, []byte(b)) {
- t.Fatalf("expected %v but got %v", b, result)
- }
-}
-
-func TestTextByteSliceToUUID(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- b := []byte("a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11")
- row := db.QueryRow("SELECT $1::uuid", b)
-
- var result string
- err := row.Scan(&result)
- if forceBinaryParameters() {
- pqErr := err.(*Error)
- if pqErr == nil {
- t.Errorf("Expected to get error")
- } else if pqErr.Code != "22P03" {
- t.Fatalf("Expected to get invalid binary encoding error (22P03), got %s", pqErr.Code)
- }
- } else {
- if err != nil {
- t.Fatal(err)
- }
-
- if result != string(b) {
- t.Fatalf("expected %v but got %v", b, result)
- }
- }
-}
-
-func TestBinaryByteSlicetoUUID(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- b := []byte{'\xa0', '\xee', '\xbc', '\x99',
- '\x9c', '\x0b',
- '\x4e', '\xf8',
- '\xbb', '\x00', '\x6b',
- '\xb9', '\xbd', '\x38', '\x0a', '\x11'}
- row := db.QueryRow("SELECT $1::uuid", b)
-
- var result string
- err := row.Scan(&result)
- if forceBinaryParameters() {
- if err != nil {
- t.Fatal(err)
- }
-
- if result != string("a0eebc99-9c0b-4ef8-bb00-6bb9bd380a11") {
- t.Fatalf("expected %v but got %v", b, result)
- }
- } else {
- pqErr := err.(*Error)
- if pqErr == nil {
- t.Errorf("Expected to get error")
- } else if pqErr.Code != "22021" {
- t.Fatalf("Expected to get invalid byte sequence for encoding error (22021), got %s", pqErr.Code)
- }
- }
-}
-
-func TestStringToUUID(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- s := "a0eebc99-9c0b-4ef8-bb00-6bb9bd380a11"
- row := db.QueryRow("SELECT $1::uuid", s)
-
- var result string
- err := row.Scan(&result)
- if err != nil {
- t.Fatal(err)
- }
-
- if result != s {
- t.Fatalf("expected %v but got %v", s, result)
- }
-}
-
-func TestTextByteSliceToInt(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- expected := 12345678
- b := []byte(fmt.Sprintf("%d", expected))
- row := db.QueryRow("SELECT $1::int", b)
-
- var result int
- err := row.Scan(&result)
- if forceBinaryParameters() {
- pqErr := err.(*Error)
- if pqErr == nil {
- t.Errorf("Expected to get error")
- } else if pqErr.Code != "22P03" {
- t.Fatalf("Expected to get invalid binary encoding error (22P03), got %s", pqErr.Code)
- }
- } else {
- if err != nil {
- t.Fatal(err)
- }
- if result != expected {
- t.Fatalf("expected %v but got %v", expected, result)
- }
- }
-}
-
-func TestBinaryByteSliceToInt(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- expected := 12345678
- b := []byte{'\x00', '\xbc', '\x61', '\x4e'}
- row := db.QueryRow("SELECT $1::int", b)
-
- var result int
- err := row.Scan(&result)
- if forceBinaryParameters() {
- if err != nil {
- t.Fatal(err)
- }
- if result != expected {
- t.Fatalf("expected %v but got %v", expected, result)
- }
- } else {
- pqErr := err.(*Error)
- if pqErr == nil {
- t.Errorf("Expected to get error")
- } else if pqErr.Code != "22021" {
- t.Fatalf("Expected to get invalid byte sequence for encoding error (22021), got %s", pqErr.Code)
- }
- }
-}
-
-func TestTextDecodeIntoString(t *testing.T) {
- input := []byte("hello world")
- want := string(input)
- for _, typ := range []oid.Oid{oid.T_char, oid.T_varchar, oid.T_text} {
- got := decode(&parameterStatus{}, input, typ, formatText)
- if got != want {
- t.Errorf("invalid string decoding output for %T(%+v), got %v but expected %v", typ, typ, got, want)
- }
- }
-}
-
-func TestByteaOutputFormatEncoding(t *testing.T) {
- input := []byte("\\x\x00\x01\x02\xFF\xFEabcdefg0123")
- want := []byte("\\x5c78000102fffe6162636465666730313233")
- got := encode(&parameterStatus{serverVersion: 90000}, input, oid.T_bytea)
- if !bytes.Equal(want, got) {
- t.Errorf("invalid hex bytea output, got %v but expected %v", got, want)
- }
-
- want = []byte("\\\\x\\000\\001\\002\\377\\376abcdefg0123")
- got = encode(&parameterStatus{serverVersion: 84000}, input, oid.T_bytea)
- if !bytes.Equal(want, got) {
- t.Errorf("invalid escape bytea output, got %v but expected %v", got, want)
- }
-}
-
-func TestByteaOutputFormats(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- if getServerVersion(t, db) < 90000 {
- // skip
- return
- }
-
- testByteaOutputFormat := func(f string, usePrepared bool) {
- expectedData := []byte("\x5c\x78\x00\xff\x61\x62\x63\x01\x08")
- sqlQuery := "SELECT decode('5c7800ff6162630108', 'hex')"
-
- var data []byte
-
- // use a txn to avoid relying on getting the same connection
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
- defer txn.Rollback()
-
- _, err = txn.Exec("SET LOCAL bytea_output TO " + f)
- if err != nil {
- t.Fatal(err)
- }
- var rows *sql.Rows
- var stmt *sql.Stmt
- if usePrepared {
- stmt, err = txn.Prepare(sqlQuery)
- if err != nil {
- t.Fatal(err)
- }
- rows, err = stmt.Query()
- } else {
- // use Query; QueryRow would hide the actual error
- rows, err = txn.Query(sqlQuery)
- }
- if err != nil {
- t.Fatal(err)
- }
- if !rows.Next() {
- if rows.Err() != nil {
- t.Fatal(rows.Err())
- }
- t.Fatal("shouldn't happen")
- }
- err = rows.Scan(&data)
- if err != nil {
- t.Fatal(err)
- }
- err = rows.Close()
- if err != nil {
- t.Fatal(err)
- }
- if stmt != nil {
- err = stmt.Close()
- if err != nil {
- t.Fatal(err)
- }
- }
- if !bytes.Equal(data, expectedData) {
- t.Errorf("unexpected bytea value %v for format %s; expected %v", data, f, expectedData)
- }
- }
-
- testByteaOutputFormat("hex", false)
- testByteaOutputFormat("escape", false)
- testByteaOutputFormat("hex", true)
- testByteaOutputFormat("escape", true)
-}
-
-func TestAppendEncodedText(t *testing.T) {
- var buf []byte
-
- buf = appendEncodedText(&parameterStatus{serverVersion: 90000}, buf, int64(10))
- buf = append(buf, '\t')
- buf = appendEncodedText(&parameterStatus{serverVersion: 90000}, buf, 42.0000000001)
- buf = append(buf, '\t')
- buf = appendEncodedText(&parameterStatus{serverVersion: 90000}, buf, "hello\tworld")
- buf = append(buf, '\t')
- buf = appendEncodedText(&parameterStatus{serverVersion: 90000}, buf, []byte{0, 128, 255})
-
- if string(buf) != "10\t42.0000000001\thello\\tworld\t\\\\x0080ff" {
- t.Fatal(string(buf))
- }
-}
-
-func TestAppendEscapedText(t *testing.T) {
- if esc := appendEscapedText(nil, "hallo\tescape"); string(esc) != "hallo\\tescape" {
- t.Fatal(string(esc))
- }
- if esc := appendEscapedText(nil, "hallo\\tescape\n"); string(esc) != "hallo\\\\tescape\\n" {
- t.Fatal(string(esc))
- }
- if esc := appendEscapedText(nil, "\n\r\t\f"); string(esc) != "\\n\\r\\t\f" {
- t.Fatal(string(esc))
- }
-}
-
-func TestAppendEscapedTextExistingBuffer(t *testing.T) {
- buf := []byte("123\t")
- if esc := appendEscapedText(buf, "hallo\tescape"); string(esc) != "123\thallo\\tescape" {
- t.Fatal(string(esc))
- }
- buf = []byte("123\t")
- if esc := appendEscapedText(buf, "hallo\\tescape\n"); string(esc) != "123\thallo\\\\tescape\\n" {
- t.Fatal(string(esc))
- }
- buf = []byte("123\t")
- if esc := appendEscapedText(buf, "\n\r\t\f"); string(esc) != "123\t\\n\\r\\t\f" {
- t.Fatal(string(esc))
- }
-}
-
-func BenchmarkAppendEscapedText(b *testing.B) {
- longString := ""
- for i := 0; i < 100; i++ {
- longString += "123456789\n"
- }
- for i := 0; i < b.N; i++ {
- appendEscapedText(nil, longString)
- }
-}
-
-func BenchmarkAppendEscapedTextNoEscape(b *testing.B) {
- longString := ""
- for i := 0; i < 100; i++ {
- longString += "1234567890"
- }
- for i := 0; i < b.N; i++ {
- appendEscapedText(nil, longString)
- }
-}
diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go
index 6928d9670..96aae29c6 100644
--- a/vendor/github.com/lib/pq/error.go
+++ b/vendor/github.com/lib/pq/error.go
@@ -460,6 +460,11 @@ func errorf(s string, args ...interface{}) {
panic(fmt.Errorf("pq: %s", fmt.Sprintf(s, args...)))
}
+// TODO(ainar-g) Rename to errorf after removing panics.
+func fmterrorf(s string, args ...interface{}) error {
+ return fmt.Errorf("pq: %s", fmt.Sprintf(s, args...))
+}
+
func errRecoverNoErrBadConn(err *error) {
e := recover()
if e == nil {
@@ -488,7 +493,8 @@ func (c *conn) errRecover(err *error) {
*err = v
}
case *net.OpError:
- *err = driver.ErrBadConn
+ c.bad = true
+ *err = v
case error:
if v == io.EOF || v.(error).Error() == "remote error: handshake failure" {
*err = driver.ErrBadConn
diff --git a/vendor/github.com/lib/pq/example/listen/doc.go b/vendor/github.com/lib/pq/example/listen/doc.go
deleted file mode 100644
index 91e2ddbad..000000000
--- a/vendor/github.com/lib/pq/example/listen/doc.go
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-
-Package listen is a self-contained Go program which uses the LISTEN / NOTIFY
-mechanism to avoid polling the database while waiting for more work to arrive.
-
- //
- // You can see the program in action by defining a function similar to
- // the following:
- //
- // CREATE OR REPLACE FUNCTION public.get_work()
- // RETURNS bigint
- // LANGUAGE sql
- // AS $$
- // SELECT CASE WHEN random() >= 0.2 THEN int8 '1' END
- // $$
- // ;
-
- package main
-
- import (
- "database/sql"
- "fmt"
- "time"
-
- "github.com/lib/pq"
- )
-
- func doWork(db *sql.DB, work int64) {
- // work here
- }
-
- func getWork(db *sql.DB) {
- for {
- // get work from the database here
- var work sql.NullInt64
- err := db.QueryRow("SELECT get_work()").Scan(&work)
- if err != nil {
- fmt.Println("call to get_work() failed: ", err)
- time.Sleep(10 * time.Second)
- continue
- }
- if !work.Valid {
- // no more work to do
- fmt.Println("ran out of work")
- return
- }
-
- fmt.Println("starting work on ", work.Int64)
- go doWork(db, work.Int64)
- }
- }
-
- func waitForNotification(l *pq.Listener) {
- select {
- case <-l.Notify:
- fmt.Println("received notification, new work available")
- case <-time.After(90 * time.Second):
- go l.Ping()
- // Check if there's more work available, just in case it takes
- // a while for the Listener to notice connection loss and
- // reconnect.
- fmt.Println("received no work for 90 seconds, checking for new work")
- }
- }
-
- func main() {
- var conninfo string = ""
-
- db, err := sql.Open("postgres", conninfo)
- if err != nil {
- panic(err)
- }
-
- reportProblem := func(ev pq.ListenerEventType, err error) {
- if err != nil {
- fmt.Println(err.Error())
- }
- }
-
- minReconn := 10 * time.Second
- maxReconn := time.Minute
- listener := pq.NewListener(conninfo, minReconn, maxReconn, reportProblem)
- err = listener.Listen("getwork")
- if err != nil {
- panic(err)
- }
-
- fmt.Println("entering main loop")
- for {
- // process all available work before waiting for notifications
- getWork(db)
- waitForNotification(listener)
- }
- }
-
-
-*/
-package listen
diff --git a/vendor/github.com/lib/pq/go18_test.go b/vendor/github.com/lib/pq/go18_test.go
deleted file mode 100644
index 4bf6391ef..000000000
--- a/vendor/github.com/lib/pq/go18_test.go
+++ /dev/null
@@ -1,319 +0,0 @@
-// +build go1.8
-
-package pq
-
-import (
- "context"
- "database/sql"
- "runtime"
- "strings"
- "testing"
- "time"
-)
-
-func TestMultipleSimpleQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- rows, err := db.Query("select 1; set time zone default; select 2; select 3")
- if err != nil {
- t.Fatal(err)
- }
- defer rows.Close()
-
- var i int
- for rows.Next() {
- if err := rows.Scan(&i); err != nil {
- t.Fatal(err)
- }
- if i != 1 {
- t.Fatalf("expected 1, got %d", i)
- }
- }
- if !rows.NextResultSet() {
- t.Fatal("expected more result sets", rows.Err())
- }
- for rows.Next() {
- if err := rows.Scan(&i); err != nil {
- t.Fatal(err)
- }
- if i != 2 {
- t.Fatalf("expected 2, got %d", i)
- }
- }
-
- // Make sure that if we ignore a result we can still query.
-
- rows, err = db.Query("select 4; select 5")
- if err != nil {
- t.Fatal(err)
- }
- defer rows.Close()
-
- for rows.Next() {
- if err := rows.Scan(&i); err != nil {
- t.Fatal(err)
- }
- if i != 4 {
- t.Fatalf("expected 4, got %d", i)
- }
- }
- if !rows.NextResultSet() {
- t.Fatal("expected more result sets", rows.Err())
- }
- for rows.Next() {
- if err := rows.Scan(&i); err != nil {
- t.Fatal(err)
- }
- if i != 5 {
- t.Fatalf("expected 5, got %d", i)
- }
- }
- if rows.NextResultSet() {
- t.Fatal("unexpected result set")
- }
-}
-
-const contextRaceIterations = 100
-
-func TestContextCancelExec(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- ctx, cancel := context.WithCancel(context.Background())
-
- // Delay execution for just a bit until db.ExecContext has begun.
- defer time.AfterFunc(time.Millisecond*10, cancel).Stop()
-
- // Not canceled until after the exec has started.
- if _, err := db.ExecContext(ctx, "select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "pq: canceling statement due to user request" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- // Context is already canceled, so error should come before execution.
- if _, err := db.ExecContext(ctx, "select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "context canceled" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- for i := 0; i < contextRaceIterations; i++ {
- func() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- if _, err := db.ExecContext(ctx, "select 1"); err != nil {
- t.Fatal(err)
- }
- }()
-
- if _, err := db.Exec("select 1"); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestContextCancelQuery(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- ctx, cancel := context.WithCancel(context.Background())
-
- // Delay execution for just a bit until db.QueryContext has begun.
- defer time.AfterFunc(time.Millisecond*10, cancel).Stop()
-
- // Not canceled until after the exec has started.
- if _, err := db.QueryContext(ctx, "select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "pq: canceling statement due to user request" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- // Context is already canceled, so error should come before execution.
- if _, err := db.QueryContext(ctx, "select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "context canceled" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- for i := 0; i < contextRaceIterations; i++ {
- func() {
- ctx, cancel := context.WithCancel(context.Background())
- rows, err := db.QueryContext(ctx, "select 1")
- cancel()
- if err != nil {
- t.Fatal(err)
- } else if err := rows.Close(); err != nil {
- t.Fatal(err)
- }
- }()
-
- if rows, err := db.Query("select 1"); err != nil {
- t.Fatal(err)
- } else if err := rows.Close(); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-// TestIssue617 tests that a failed query in QueryContext doesn't lead to a
-// goroutine leak.
-func TestIssue617(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- const N = 10
-
- numGoroutineStart := runtime.NumGoroutine()
- for i := 0; i < N; i++ {
- func() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- _, err := db.QueryContext(ctx, `SELECT * FROM DOESNOTEXIST`)
- pqErr, _ := err.(*Error)
- // Expecting "pq: relation \"doesnotexist\" does not exist" error.
- if err == nil || pqErr == nil || pqErr.Code != "42P01" {
- t.Fatalf("expected undefined table error, got %v", err)
- }
- }()
- }
- numGoroutineFinish := runtime.NumGoroutine()
-
- // We use N/2 and not N because the GC and other actors may increase or
- // decrease the number of goroutines.
- if numGoroutineFinish-numGoroutineStart >= N/2 {
- t.Errorf("goroutine leak detected, was %d, now %d", numGoroutineStart, numGoroutineFinish)
- }
-}
-
-func TestContextCancelBegin(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- ctx, cancel := context.WithCancel(context.Background())
- tx, err := db.BeginTx(ctx, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- // Delay execution for just a bit until tx.Exec has begun.
- defer time.AfterFunc(time.Millisecond*10, cancel).Stop()
-
- // Not canceled until after the exec has started.
- if _, err := tx.Exec("select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "pq: canceling statement due to user request" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- // Transaction is canceled, so expect an error.
- if _, err := tx.Query("select pg_sleep(1)"); err == nil {
- t.Fatal("expected error")
- } else if err != sql.ErrTxDone {
- t.Fatalf("unexpected error: %s", err)
- }
-
- // Context is canceled, so cannot begin a transaction.
- if _, err := db.BeginTx(ctx, nil); err == nil {
- t.Fatal("expected error")
- } else if err.Error() != "context canceled" {
- t.Fatalf("unexpected error: %s", err)
- }
-
- for i := 0; i < contextRaceIterations; i++ {
- func() {
- ctx, cancel := context.WithCancel(context.Background())
- tx, err := db.BeginTx(ctx, nil)
- cancel()
- if err != nil {
- t.Fatal(err)
- } else if err := tx.Rollback(); err != nil && err != sql.ErrTxDone {
- t.Fatal(err)
- }
- }()
-
- if tx, err := db.Begin(); err != nil {
- t.Fatal(err)
- } else if err := tx.Rollback(); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestTxOptions(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
- ctx := context.Background()
-
- tests := []struct {
- level sql.IsolationLevel
- isolation string
- }{
- {
- level: sql.LevelDefault,
- isolation: "",
- },
- {
- level: sql.LevelReadUncommitted,
- isolation: "read uncommitted",
- },
- {
- level: sql.LevelReadCommitted,
- isolation: "read committed",
- },
- {
- level: sql.LevelRepeatableRead,
- isolation: "repeatable read",
- },
- {
- level: sql.LevelSerializable,
- isolation: "serializable",
- },
- }
-
- for _, test := range tests {
- for _, ro := range []bool{true, false} {
- tx, err := db.BeginTx(ctx, &sql.TxOptions{
- Isolation: test.level,
- ReadOnly: ro,
- })
- if err != nil {
- t.Fatal(err)
- }
-
- var isolation string
- err = tx.QueryRow("select current_setting('transaction_isolation')").Scan(&isolation)
- if err != nil {
- t.Fatal(err)
- }
-
- if test.isolation != "" && isolation != test.isolation {
- t.Errorf("wrong isolation level: %s != %s", isolation, test.isolation)
- }
-
- var isRO string
- err = tx.QueryRow("select current_setting('transaction_read_only')").Scan(&isRO)
- if err != nil {
- t.Fatal(err)
- }
-
- if ro != (isRO == "on") {
- t.Errorf("read/[write,only] not set: %t != %s for level %s",
- ro, isRO, test.isolation)
- }
-
- tx.Rollback()
- }
- }
-
- _, err := db.BeginTx(ctx, &sql.TxOptions{
- Isolation: sql.LevelLinearizable,
- })
- if err == nil {
- t.Fatal("expected LevelLinearizable to fail")
- }
- if !strings.Contains(err.Error(), "isolation level not supported") {
- t.Errorf("Expected error to mention isolation level, got %q", err)
- }
-}
diff --git a/vendor/github.com/lib/pq/hstore/hstore.go b/vendor/github.com/lib/pq/hstore/hstore.go
deleted file mode 100644
index f1470db14..000000000
--- a/vendor/github.com/lib/pq/hstore/hstore.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package hstore
-
-import (
- "database/sql"
- "database/sql/driver"
- "strings"
-)
-
-// Hstore is a wrapper for transferring Hstore values back and forth easily.
-type Hstore struct {
- Map map[string]sql.NullString
-}
-
-// escapes and quotes hstore keys/values
-// s should be a sql.NullString or string
-func hQuote(s interface{}) string {
- var str string
- switch v := s.(type) {
- case sql.NullString:
- if !v.Valid {
- return "NULL"
- }
- str = v.String
- case string:
- str = v
- default:
- panic("not a string or sql.NullString")
- }
-
- str = strings.Replace(str, "\\", "\\\\", -1)
- return `"` + strings.Replace(str, "\"", "\\\"", -1) + `"`
-}
-
-// Scan implements the Scanner interface.
-//
-// Note h.Map is reallocated before the scan to clear existing values. If the
-// hstore column's database value is NULL, then h.Map is set to nil instead.
-func (h *Hstore) Scan(value interface{}) error {
- if value == nil {
- h.Map = nil
- return nil
- }
- h.Map = make(map[string]sql.NullString)
- var b byte
- pair := [][]byte{{}, {}}
- pi := 0
- inQuote := false
- didQuote := false
- sawSlash := false
- bindex := 0
- for bindex, b = range value.([]byte) {
- if sawSlash {
- pair[pi] = append(pair[pi], b)
- sawSlash = false
- continue
- }
-
- switch b {
- case '\\':
- sawSlash = true
- continue
- case '"':
- inQuote = !inQuote
- if !didQuote {
- didQuote = true
- }
- continue
- default:
- if !inQuote {
- switch b {
- case ' ', '\t', '\n', '\r':
- continue
- case '=':
- continue
- case '>':
- pi = 1
- didQuote = false
- continue
- case ',':
- s := string(pair[1])
- if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" {
- h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false}
- } else {
- h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true}
- }
- pair[0] = []byte{}
- pair[1] = []byte{}
- pi = 0
- continue
- }
- }
- }
- pair[pi] = append(pair[pi], b)
- }
- if bindex > 0 {
- s := string(pair[1])
- if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" {
- h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false}
- } else {
- h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true}
- }
- }
- return nil
-}
-
-// Value implements the driver Valuer interface. Note if h.Map is nil, the
-// database column value will be set to NULL.
-func (h Hstore) Value() (driver.Value, error) {
- if h.Map == nil {
- return nil, nil
- }
- parts := []string{}
- for key, val := range h.Map {
- thispart := hQuote(key) + "=>" + hQuote(val)
- parts = append(parts, thispart)
- }
- return []byte(strings.Join(parts, ",")), nil
-}
diff --git a/vendor/github.com/lib/pq/hstore/hstore_test.go b/vendor/github.com/lib/pq/hstore/hstore_test.go
deleted file mode 100644
index 1c9f2bd49..000000000
--- a/vendor/github.com/lib/pq/hstore/hstore_test.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package hstore
-
-import (
- "database/sql"
- "os"
- "testing"
-
- _ "github.com/lib/pq"
-)
-
-type Fatalistic interface {
- Fatal(args ...interface{})
-}
-
-func openTestConn(t Fatalistic) *sql.DB {
- datname := os.Getenv("PGDATABASE")
- sslmode := os.Getenv("PGSSLMODE")
-
- if datname == "" {
- os.Setenv("PGDATABASE", "pqgotest")
- }
-
- if sslmode == "" {
- os.Setenv("PGSSLMODE", "disable")
- }
-
- conn, err := sql.Open("postgres", "")
- if err != nil {
- t.Fatal(err)
- }
-
- return conn
-}
-
-func TestHstore(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- // quitely create hstore if it doesn't exist
- _, err := db.Exec("CREATE EXTENSION IF NOT EXISTS hstore")
- if err != nil {
- t.Skipf("Skipping hstore tests - hstore extension create failed: %s", err.Error())
- }
-
- hs := Hstore{}
-
- // test for null-valued hstores
- err = db.QueryRow("SELECT NULL::hstore").Scan(&hs)
- if err != nil {
- t.Fatal(err)
- }
- if hs.Map != nil {
- t.Fatalf("expected null map")
- }
-
- err = db.QueryRow("SELECT $1::hstore", hs).Scan(&hs)
- if err != nil {
- t.Fatalf("re-query null map failed: %s", err.Error())
- }
- if hs.Map != nil {
- t.Fatalf("expected null map")
- }
-
- // test for empty hstores
- err = db.QueryRow("SELECT ''::hstore").Scan(&hs)
- if err != nil {
- t.Fatal(err)
- }
- if hs.Map == nil {
- t.Fatalf("expected empty map, got null map")
- }
- if len(hs.Map) != 0 {
- t.Fatalf("expected empty map, got len(map)=%d", len(hs.Map))
- }
-
- err = db.QueryRow("SELECT $1::hstore", hs).Scan(&hs)
- if err != nil {
- t.Fatalf("re-query empty map failed: %s", err.Error())
- }
- if hs.Map == nil {
- t.Fatalf("expected empty map, got null map")
- }
- if len(hs.Map) != 0 {
- t.Fatalf("expected empty map, got len(map)=%d", len(hs.Map))
- }
-
- // a few example maps to test out
- hsOnePair := Hstore{
- Map: map[string]sql.NullString{
- "key1": {String: "value1", Valid: true},
- },
- }
-
- hsThreePairs := Hstore{
- Map: map[string]sql.NullString{
- "key1": {String: "value1", Valid: true},
- "key2": {String: "value2", Valid: true},
- "key3": {String: "value3", Valid: true},
- },
- }
-
- hsSmorgasbord := Hstore{
- Map: map[string]sql.NullString{
- "nullstring": {String: "NULL", Valid: true},
- "actuallynull": {String: "", Valid: false},
- "NULL": {String: "NULL string key", Valid: true},
- "withbracket": {String: "value>42", Valid: true},
- "withequal": {String: "value=42", Valid: true},
- `"withquotes1"`: {String: `this "should" be fine`, Valid: true},
- `"withquotes"2"`: {String: `this "should\" also be fine`, Valid: true},
- "embedded1": {String: "value1=>x1", Valid: true},
- "embedded2": {String: `"value2"=>x2`, Valid: true},
- "withnewlines": {String: "\n\nvalue\t=>2", Valid: true},
- "<<all sorts of crazy>>": {String: `this, "should,\" also, => be fine`, Valid: true},
- },
- }
-
- // test encoding in query params, then decoding during Scan
- testBidirectional := func(h Hstore) {
- err = db.QueryRow("SELECT $1::hstore", h).Scan(&hs)
- if err != nil {
- t.Fatalf("re-query %d-pair map failed: %s", len(h.Map), err.Error())
- }
- if hs.Map == nil {
- t.Fatalf("expected %d-pair map, got null map", len(h.Map))
- }
- if len(hs.Map) != len(h.Map) {
- t.Fatalf("expected %d-pair map, got len(map)=%d", len(h.Map), len(hs.Map))
- }
-
- for key, val := range hs.Map {
- otherval, found := h.Map[key]
- if !found {
- t.Fatalf(" key '%v' not found in %d-pair map", key, len(h.Map))
- }
- if otherval.Valid != val.Valid {
- t.Fatalf(" value %v <> %v in %d-pair map", otherval, val, len(h.Map))
- }
- if otherval.String != val.String {
- t.Fatalf(" value '%v' <> '%v' in %d-pair map", otherval.String, val.String, len(h.Map))
- }
- }
- }
-
- testBidirectional(hsOnePair)
- testBidirectional(hsThreePairs)
- testBidirectional(hsSmorgasbord)
-}
diff --git a/vendor/github.com/lib/pq/issues_test.go b/vendor/github.com/lib/pq/issues_test.go
deleted file mode 100644
index 3a330a0a9..000000000
--- a/vendor/github.com/lib/pq/issues_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package pq
-
-import "testing"
-
-func TestIssue494(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- query := `CREATE TEMP TABLE t (i INT PRIMARY KEY)`
- if _, err := db.Exec(query); err != nil {
- t.Fatal(err)
- }
-
- txn, err := db.Begin()
- if err != nil {
- t.Fatal(err)
- }
-
- if _, err := txn.Prepare(CopyIn("t", "i")); err != nil {
- t.Fatal(err)
- }
-
- if _, err := txn.Query("SELECT 1"); err == nil {
- t.Fatal("expected error")
- }
-}
diff --git a/vendor/github.com/lib/pq/notify.go b/vendor/github.com/lib/pq/notify.go
index 304e081fe..947d189f4 100644
--- a/vendor/github.com/lib/pq/notify.go
+++ b/vendor/github.com/lib/pq/notify.go
@@ -784,7 +784,7 @@ func (l *Listener) listenerConnLoop() {
}
l.emitEvent(ListenerEventDisconnected, err)
- time.Sleep(nextReconnect.Sub(time.Now()))
+ time.Sleep(time.Until(nextReconnect))
}
}
diff --git a/vendor/github.com/lib/pq/notify_test.go b/vendor/github.com/lib/pq/notify_test.go
deleted file mode 100644
index 075666ddb..000000000
--- a/vendor/github.com/lib/pq/notify_test.go
+++ /dev/null
@@ -1,570 +0,0 @@
-package pq
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "runtime"
- "sync"
- "testing"
- "time"
-)
-
-var errNilNotification = errors.New("nil notification")
-
-func expectNotification(t *testing.T, ch <-chan *Notification, relname string, extra string) error {
- select {
- case n := <-ch:
- if n == nil {
- return errNilNotification
- }
- if n.Channel != relname || n.Extra != extra {
- return fmt.Errorf("unexpected notification %v", n)
- }
- return nil
- case <-time.After(1500 * time.Millisecond):
- return fmt.Errorf("timeout")
- }
-}
-
-func expectNoNotification(t *testing.T, ch <-chan *Notification) error {
- select {
- case n := <-ch:
- return fmt.Errorf("unexpected notification %v", n)
- case <-time.After(100 * time.Millisecond):
- return nil
- }
-}
-
-func expectEvent(t *testing.T, eventch <-chan ListenerEventType, et ListenerEventType) error {
- select {
- case e := <-eventch:
- if e != et {
- return fmt.Errorf("unexpected event %v", e)
- }
- return nil
- case <-time.After(1500 * time.Millisecond):
- panic("expectEvent timeout")
- }
-}
-
-func expectNoEvent(t *testing.T, eventch <-chan ListenerEventType) error {
- select {
- case e := <-eventch:
- return fmt.Errorf("unexpected event %v", e)
- case <-time.After(100 * time.Millisecond):
- return nil
- }
-}
-
-func newTestListenerConn(t *testing.T) (*ListenerConn, <-chan *Notification) {
- datname := os.Getenv("PGDATABASE")
- sslmode := os.Getenv("PGSSLMODE")
-
- if datname == "" {
- os.Setenv("PGDATABASE", "pqgotest")
- }
-
- if sslmode == "" {
- os.Setenv("PGSSLMODE", "disable")
- }
-
- notificationChan := make(chan *Notification)
- l, err := NewListenerConn("", notificationChan)
- if err != nil {
- t.Fatal(err)
- }
-
- return l, notificationChan
-}
-
-func TestNewListenerConn(t *testing.T) {
- l, _ := newTestListenerConn(t)
-
- defer l.Close()
-}
-
-func TestConnListen(t *testing.T) {
- l, channel := newTestListenerConn(t)
-
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- ok, err := l.Listen("notify_test")
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, channel, "notify_test", "")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestConnUnlisten(t *testing.T) {
- l, channel := newTestListenerConn(t)
-
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- ok, err := l.Listen("notify_test")
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, channel, "notify_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- ok, err = l.Unlisten("notify_test")
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNoNotification(t, channel)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestConnUnlistenAll(t *testing.T) {
- l, channel := newTestListenerConn(t)
-
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- ok, err := l.Listen("notify_test")
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, channel, "notify_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- ok, err = l.UnlistenAll()
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNoNotification(t, channel)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestConnClose(t *testing.T) {
- l, _ := newTestListenerConn(t)
- defer l.Close()
-
- err := l.Close()
- if err != nil {
- t.Fatal(err)
- }
- err = l.Close()
- if err != errListenerConnClosed {
- t.Fatalf("expected errListenerConnClosed; got %v", err)
- }
-}
-
-func TestConnPing(t *testing.T) {
- l, _ := newTestListenerConn(t)
- defer l.Close()
- err := l.Ping()
- if err != nil {
- t.Fatal(err)
- }
- err = l.Close()
- if err != nil {
- t.Fatal(err)
- }
- err = l.Ping()
- if err != errListenerConnClosed {
- t.Fatalf("expected errListenerConnClosed; got %v", err)
- }
-}
-
-// Test for deadlock where a query fails while another one is queued
-func TestConnExecDeadlock(t *testing.T) {
- l, _ := newTestListenerConn(t)
- defer l.Close()
-
- var wg sync.WaitGroup
- wg.Add(2)
-
- go func() {
- l.ExecSimpleQuery("SELECT pg_sleep(60)")
- wg.Done()
- }()
- runtime.Gosched()
- go func() {
- l.ExecSimpleQuery("SELECT 1")
- wg.Done()
- }()
- // give the two goroutines some time to get into position
- runtime.Gosched()
- // calls Close on the net.Conn; equivalent to a network failure
- l.Close()
-
- defer time.AfterFunc(10*time.Second, func() {
- panic("timed out")
- }).Stop()
- wg.Wait()
-}
-
-// Test for ListenerConn being closed while a slow query is executing
-func TestListenerConnCloseWhileQueryIsExecuting(t *testing.T) {
- l, _ := newTestListenerConn(t)
- defer l.Close()
-
- var wg sync.WaitGroup
- wg.Add(1)
-
- go func() {
- sent, err := l.ExecSimpleQuery("SELECT pg_sleep(60)")
- if sent {
- panic("expected sent=false")
- }
- // could be any of a number of errors
- if err == nil {
- panic("expected error")
- }
- wg.Done()
- }()
- // give the above goroutine some time to get into position
- runtime.Gosched()
- err := l.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- defer time.AfterFunc(10*time.Second, func() {
- panic("timed out")
- }).Stop()
- wg.Wait()
-}
-
-func TestNotifyExtra(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- if getServerVersion(t, db) < 90000 {
- t.Skip("skipping NOTIFY payload test since the server does not appear to support it")
- }
-
- l, channel := newTestListenerConn(t)
- defer l.Close()
-
- ok, err := l.Listen("notify_test")
- if !ok || err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_test, 'something'")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, channel, "notify_test", "something")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// create a new test listener and also set the timeouts
-func newTestListenerTimeout(t *testing.T, min time.Duration, max time.Duration) (*Listener, <-chan ListenerEventType) {
- datname := os.Getenv("PGDATABASE")
- sslmode := os.Getenv("PGSSLMODE")
-
- if datname == "" {
- os.Setenv("PGDATABASE", "pqgotest")
- }
-
- if sslmode == "" {
- os.Setenv("PGSSLMODE", "disable")
- }
-
- eventch := make(chan ListenerEventType, 16)
- l := NewListener("", min, max, func(t ListenerEventType, err error) { eventch <- t })
- err := expectEvent(t, eventch, ListenerEventConnected)
- if err != nil {
- t.Fatal(err)
- }
- return l, eventch
-}
-
-func newTestListener(t *testing.T) (*Listener, <-chan ListenerEventType) {
- return newTestListenerTimeout(t, time.Hour, time.Hour)
-}
-
-func TestListenerListen(t *testing.T) {
- l, _ := newTestListener(t)
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- err := l.Listen("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestListenerUnlisten(t *testing.T) {
- l, _ := newTestListener(t)
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- err := l.Listen("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = l.Unlisten("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNoNotification(t, l.Notify)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestListenerUnlistenAll(t *testing.T) {
- l, _ := newTestListener(t)
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- err := l.Listen("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = l.UnlistenAll()
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNoNotification(t, l.Notify)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestListenerFailedQuery(t *testing.T) {
- l, eventch := newTestListener(t)
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- err := l.Listen("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- // shouldn't cause a disconnect
- ok, err := l.cn.ExecSimpleQuery("SELECT error")
- if !ok {
- t.Fatalf("could not send query to server: %v", err)
- }
- _, ok = err.(PGError)
- if !ok {
- t.Fatalf("unexpected error %v", err)
- }
- err = expectNoEvent(t, eventch)
- if err != nil {
- t.Fatal(err)
- }
-
- // should still work
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestListenerReconnect(t *testing.T) {
- l, eventch := newTestListenerTimeout(t, 20*time.Millisecond, time.Hour)
- defer l.Close()
-
- db := openTestConn(t)
- defer db.Close()
-
- err := l.Listen("notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-
- // kill the connection and make sure it comes back up
- ok, err := l.cn.ExecSimpleQuery("SELECT pg_terminate_backend(pg_backend_pid())")
- if ok {
- t.Fatalf("could not kill the connection: %v", err)
- }
- if err != io.EOF {
- t.Fatalf("unexpected error %v", err)
- }
- err = expectEvent(t, eventch, ListenerEventDisconnected)
- if err != nil {
- t.Fatal(err)
- }
- err = expectEvent(t, eventch, ListenerEventReconnected)
- if err != nil {
- t.Fatal(err)
- }
-
- // should still work
- _, err = db.Exec("NOTIFY notify_listen_test")
- if err != nil {
- t.Fatal(err)
- }
-
- // should get nil after Reconnected
- err = expectNotification(t, l.Notify, "", "")
- if err != errNilNotification {
- t.Fatal(err)
- }
-
- err = expectNotification(t, l.Notify, "notify_listen_test", "")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestListenerClose(t *testing.T) {
- l, _ := newTestListenerTimeout(t, 20*time.Millisecond, time.Hour)
- defer l.Close()
-
- err := l.Close()
- if err != nil {
- t.Fatal(err)
- }
- err = l.Close()
- if err != errListenerClosed {
- t.Fatalf("expected errListenerClosed; got %v", err)
- }
-}
-
-func TestListenerPing(t *testing.T) {
- l, _ := newTestListenerTimeout(t, 20*time.Millisecond, time.Hour)
- defer l.Close()
-
- err := l.Ping()
- if err != nil {
- t.Fatal(err)
- }
-
- err = l.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- err = l.Ping()
- if err != errListenerClosed {
- t.Fatalf("expected errListenerClosed; got %v", err)
- }
-}
diff --git a/vendor/github.com/lib/pq/rows_test.go b/vendor/github.com/lib/pq/rows_test.go
deleted file mode 100644
index 3033bc01b..000000000
--- a/vendor/github.com/lib/pq/rows_test.go
+++ /dev/null
@@ -1,220 +0,0 @@
-// +build go1.8
-
-package pq
-
-import (
- "math"
- "reflect"
- "testing"
-
- "github.com/lib/pq/oid"
-)
-
-func TestDataTypeName(t *testing.T) {
- tts := []struct {
- typ oid.Oid
- name string
- }{
- {oid.T_int8, "INT8"},
- {oid.T_int4, "INT4"},
- {oid.T_int2, "INT2"},
- {oid.T_varchar, "VARCHAR"},
- {oid.T_text, "TEXT"},
- {oid.T_bool, "BOOL"},
- {oid.T_numeric, "NUMERIC"},
- {oid.T_date, "DATE"},
- {oid.T_time, "TIME"},
- {oid.T_timetz, "TIMETZ"},
- {oid.T_timestamp, "TIMESTAMP"},
- {oid.T_timestamptz, "TIMESTAMPTZ"},
- {oid.T_bytea, "BYTEA"},
- }
-
- for i, tt := range tts {
- dt := fieldDesc{OID: tt.typ}
- if name := dt.Name(); name != tt.name {
- t.Errorf("(%d) got: %s want: %s", i, name, tt.name)
- }
- }
-}
-
-func TestDataType(t *testing.T) {
- tts := []struct {
- typ oid.Oid
- kind reflect.Kind
- }{
- {oid.T_int8, reflect.Int64},
- {oid.T_int4, reflect.Int32},
- {oid.T_int2, reflect.Int16},
- {oid.T_varchar, reflect.String},
- {oid.T_text, reflect.String},
- {oid.T_bool, reflect.Bool},
- {oid.T_date, reflect.Struct},
- {oid.T_time, reflect.Struct},
- {oid.T_timetz, reflect.Struct},
- {oid.T_timestamp, reflect.Struct},
- {oid.T_timestamptz, reflect.Struct},
- {oid.T_bytea, reflect.Slice},
- }
-
- for i, tt := range tts {
- dt := fieldDesc{OID: tt.typ}
- if kind := dt.Type().Kind(); kind != tt.kind {
- t.Errorf("(%d) got: %s want: %s", i, kind, tt.kind)
- }
- }
-}
-
-func TestDataTypeLength(t *testing.T) {
- tts := []struct {
- typ oid.Oid
- len int
- mod int
- length int64
- ok bool
- }{
- {oid.T_int4, 0, -1, 0, false},
- {oid.T_varchar, 65535, 9, 5, true},
- {oid.T_text, 65535, -1, math.MaxInt64, true},
- {oid.T_bytea, 65535, -1, math.MaxInt64, true},
- }
-
- for i, tt := range tts {
- dt := fieldDesc{OID: tt.typ, Len: tt.len, Mod: tt.mod}
- if l, k := dt.Length(); k != tt.ok || l != tt.length {
- t.Errorf("(%d) got: %d, %t want: %d, %t", i, l, k, tt.length, tt.ok)
- }
- }
-}
-
-func TestDataTypePrecisionScale(t *testing.T) {
- tts := []struct {
- typ oid.Oid
- mod int
- precision, scale int64
- ok bool
- }{
- {oid.T_int4, -1, 0, 0, false},
- {oid.T_numeric, 589830, 9, 2, true},
- {oid.T_text, -1, 0, 0, false},
- }
-
- for i, tt := range tts {
- dt := fieldDesc{OID: tt.typ, Mod: tt.mod}
- p, s, k := dt.PrecisionScale()
- if k != tt.ok {
- t.Errorf("(%d) got: %t want: %t", i, k, tt.ok)
- }
- if p != tt.precision {
- t.Errorf("(%d) wrong precision got: %d want: %d", i, p, tt.precision)
- }
- if s != tt.scale {
- t.Errorf("(%d) wrong scale got: %d want: %d", i, s, tt.scale)
- }
- }
-}
-
-func TestRowsColumnTypes(t *testing.T) {
- columnTypesTests := []struct {
- Name string
- TypeName string
- Length struct {
- Len int64
- OK bool
- }
- DecimalSize struct {
- Precision int64
- Scale int64
- OK bool
- }
- ScanType reflect.Type
- }{
- {
- Name: "a",
- TypeName: "INT4",
- Length: struct {
- Len int64
- OK bool
- }{
- Len: 0,
- OK: false,
- },
- DecimalSize: struct {
- Precision int64
- Scale int64
- OK bool
- }{
- Precision: 0,
- Scale: 0,
- OK: false,
- },
- ScanType: reflect.TypeOf(int32(0)),
- }, {
- Name: "bar",
- TypeName: "TEXT",
- Length: struct {
- Len int64
- OK bool
- }{
- Len: math.MaxInt64,
- OK: true,
- },
- DecimalSize: struct {
- Precision int64
- Scale int64
- OK bool
- }{
- Precision: 0,
- Scale: 0,
- OK: false,
- },
- ScanType: reflect.TypeOf(""),
- },
- }
-
- db := openTestConn(t)
- defer db.Close()
-
- rows, err := db.Query("SELECT 1 AS a, text 'bar' AS bar, 1.28::numeric(9, 2) AS dec")
- if err != nil {
- t.Fatal(err)
- }
-
- columns, err := rows.ColumnTypes()
- if err != nil {
- t.Fatal(err)
- }
- if len(columns) != 3 {
- t.Errorf("expected 3 columns found %d", len(columns))
- }
-
- for i, tt := range columnTypesTests {
- c := columns[i]
- if c.Name() != tt.Name {
- t.Errorf("(%d) got: %s, want: %s", i, c.Name(), tt.Name)
- }
- if c.DatabaseTypeName() != tt.TypeName {
- t.Errorf("(%d) got: %s, want: %s", i, c.DatabaseTypeName(), tt.TypeName)
- }
- l, ok := c.Length()
- if l != tt.Length.Len {
- t.Errorf("(%d) got: %d, want: %d", i, l, tt.Length.Len)
- }
- if ok != tt.Length.OK {
- t.Errorf("(%d) got: %t, want: %t", i, ok, tt.Length.OK)
- }
- p, s, ok := c.DecimalSize()
- if p != tt.DecimalSize.Precision {
- t.Errorf("(%d) got: %d, want: %d", i, p, tt.DecimalSize.Precision)
- }
- if s != tt.DecimalSize.Scale {
- t.Errorf("(%d) got: %d, want: %d", i, s, tt.DecimalSize.Scale)
- }
- if ok != tt.DecimalSize.OK {
- t.Errorf("(%d) got: %t, want: %t", i, ok, tt.DecimalSize.OK)
- }
- if c.ScanType() != tt.ScanType {
- t.Errorf("(%d) got: %v, want: %v", i, c.ScanType(), tt.ScanType)
- }
- }
-}
diff --git a/vendor/github.com/lib/pq/ssl.go b/vendor/github.com/lib/pq/ssl.go
index 7deb30436..e1a326a0d 100644
--- a/vendor/github.com/lib/pq/ssl.go
+++ b/vendor/github.com/lib/pq/ssl.go
@@ -12,7 +12,7 @@ import (
// ssl generates a function to upgrade a net.Conn based on the "sslmode" and
// related settings. The function is nil when no upgrade should take place.
-func ssl(o values) func(net.Conn) net.Conn {
+func ssl(o values) (func(net.Conn) (net.Conn, error), error) {
verifyCaOnly := false
tlsConf := tls.Config{}
switch mode := o["sslmode"]; mode {
@@ -45,29 +45,38 @@ func ssl(o values) func(net.Conn) net.Conn {
case "verify-full":
tlsConf.ServerName = o["host"]
case "disable":
- return nil
+ return nil, nil
default:
- errorf(`unsupported sslmode %q; only "require" (default), "verify-full", "verify-ca", and "disable" supported`, mode)
+ return nil, fmterrorf(`unsupported sslmode %q; only "require" (default), "verify-full", "verify-ca", and "disable" supported`, mode)
}
- sslClientCertificates(&tlsConf, o)
- sslCertificateAuthority(&tlsConf, o)
+ err := sslClientCertificates(&tlsConf, o)
+ if err != nil {
+ return nil, err
+ }
+ err = sslCertificateAuthority(&tlsConf, o)
+ if err != nil {
+ return nil, err
+ }
sslRenegotiation(&tlsConf)
- return func(conn net.Conn) net.Conn {
+ return func(conn net.Conn) (net.Conn, error) {
client := tls.Client(conn, &tlsConf)
if verifyCaOnly {
- sslVerifyCertificateAuthority(client, &tlsConf)
+ err := sslVerifyCertificateAuthority(client, &tlsConf)
+ if err != nil {
+ return nil, err
+ }
}
- return client
- }
+ return client, nil
+ }, nil
}
// sslClientCertificates adds the certificate specified in the "sslcert" and
// "sslkey" settings, or if they aren't set, from the .postgresql directory
// in the user's home directory. The configured files must exist and have
// the correct permissions.
-func sslClientCertificates(tlsConf *tls.Config, o values) {
+func sslClientCertificates(tlsConf *tls.Config, o values) error {
// user.Current() might fail when cross-compiling. We have to ignore the
// error and continue without home directory defaults, since we wouldn't
// know from where to load them.
@@ -82,13 +91,13 @@ func sslClientCertificates(tlsConf *tls.Config, o values) {
}
// https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1045
if len(sslcert) == 0 {
- return
+ return nil
}
// https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1050:L1054
if _, err := os.Stat(sslcert); os.IsNotExist(err) {
- return
+ return nil
} else if err != nil {
- panic(err)
+ return err
}
// In libpq, the ssl key is only loaded if the setting is not blank.
@@ -101,19 +110,21 @@ func sslClientCertificates(tlsConf *tls.Config, o values) {
if len(sslkey) > 0 {
if err := sslKeyPermissions(sslkey); err != nil {
- panic(err)
+ return err
}
}
cert, err := tls.LoadX509KeyPair(sslcert, sslkey)
if err != nil {
- panic(err)
+ return err
}
+
tlsConf.Certificates = []tls.Certificate{cert}
+ return nil
}
// sslCertificateAuthority adds the RootCA specified in the "sslrootcert" setting.
-func sslCertificateAuthority(tlsConf *tls.Config, o values) {
+func sslCertificateAuthority(tlsConf *tls.Config, o values) error {
// In libpq, the root certificate is only loaded if the setting is not blank.
//
// https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L950-L951
@@ -122,22 +133,24 @@ func sslCertificateAuthority(tlsConf *tls.Config, o values) {
cert, err := ioutil.ReadFile(sslrootcert)
if err != nil {
- panic(err)
+ return err
}
if !tlsConf.RootCAs.AppendCertsFromPEM(cert) {
- errorf("couldn't parse pem in sslrootcert")
+ return fmterrorf("couldn't parse pem in sslrootcert")
}
}
+
+ return nil
}
// sslVerifyCertificateAuthority carries out a TLS handshake to the server and
// verifies the presented certificate against the CA, i.e. the one specified in
// sslrootcert or the system CA if sslrootcert was not specified.
-func sslVerifyCertificateAuthority(client *tls.Conn, tlsConf *tls.Config) {
+func sslVerifyCertificateAuthority(client *tls.Conn, tlsConf *tls.Config) error {
err := client.Handshake()
if err != nil {
- panic(err)
+ return err
}
certs := client.ConnectionState().PeerCertificates
opts := x509.VerifyOptions{
@@ -152,7 +165,5 @@ func sslVerifyCertificateAuthority(client *tls.Conn, tlsConf *tls.Config) {
opts.Intermediates.AddCert(cert)
}
_, err = certs[0].Verify(opts)
- if err != nil {
- panic(err)
- }
+ return err
}
diff --git a/vendor/github.com/lib/pq/ssl_test.go b/vendor/github.com/lib/pq/ssl_test.go
deleted file mode 100644
index 3eafbfd20..000000000
--- a/vendor/github.com/lib/pq/ssl_test.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package pq
-
-// This file contains SSL tests
-
-import (
- _ "crypto/sha256"
- "crypto/x509"
- "database/sql"
- "os"
- "path/filepath"
- "testing"
-)
-
-func maybeSkipSSLTests(t *testing.T) {
- // Require some special variables for testing certificates
- if os.Getenv("PQSSLCERTTEST_PATH") == "" {
- t.Skip("PQSSLCERTTEST_PATH not set, skipping SSL tests")
- }
-
- value := os.Getenv("PQGOSSLTESTS")
- if value == "" || value == "0" {
- t.Skip("PQGOSSLTESTS not enabled, skipping SSL tests")
- } else if value != "1" {
- t.Fatalf("unexpected value %q for PQGOSSLTESTS", value)
- }
-}
-
-func openSSLConn(t *testing.T, conninfo string) (*sql.DB, error) {
- db, err := openTestConnConninfo(conninfo)
- if err != nil {
- // should never fail
- t.Fatal(err)
- }
- // Do something with the connection to see whether it's working or not.
- tx, err := db.Begin()
- if err == nil {
- return db, tx.Rollback()
- }
- _ = db.Close()
- return nil, err
-}
-
-func checkSSLSetup(t *testing.T, conninfo string) {
- _, err := openSSLConn(t, conninfo)
- if pge, ok := err.(*Error); ok {
- if pge.Code.Name() != "invalid_authorization_specification" {
- t.Fatalf("unexpected error code '%s'", pge.Code.Name())
- }
- } else {
- t.Fatalf("expected %T, got %v", (*Error)(nil), err)
- }
-}
-
-// Connect over SSL and run a simple query to test the basics
-func TestSSLConnection(t *testing.T) {
- maybeSkipSSLTests(t)
- // Environment sanity check: should fail without SSL
- checkSSLSetup(t, "sslmode=disable user=pqgossltest")
-
- db, err := openSSLConn(t, "sslmode=require user=pqgossltest")
- if err != nil {
- t.Fatal(err)
- }
- rows, err := db.Query("SELECT 1")
- if err != nil {
- t.Fatal(err)
- }
- rows.Close()
-}
-
-// Test sslmode=verify-full
-func TestSSLVerifyFull(t *testing.T) {
- maybeSkipSSLTests(t)
- // Environment sanity check: should fail without SSL
- checkSSLSetup(t, "sslmode=disable user=pqgossltest")
-
- // Not OK according to the system CA
- _, err := openSSLConn(t, "host=postgres sslmode=verify-full user=pqgossltest")
- if err == nil {
- t.Fatal("expected error")
- }
- _, ok := err.(x509.UnknownAuthorityError)
- if !ok {
- t.Fatalf("expected x509.UnknownAuthorityError, got %#+v", err)
- }
-
- rootCertPath := filepath.Join(os.Getenv("PQSSLCERTTEST_PATH"), "root.crt")
- rootCert := "sslrootcert=" + rootCertPath + " "
- // No match on Common Name
- _, err = openSSLConn(t, rootCert+"host=127.0.0.1 sslmode=verify-full user=pqgossltest")
- if err == nil {
- t.Fatal("expected error")
- }
- _, ok = err.(x509.HostnameError)
- if !ok {
- t.Fatalf("expected x509.HostnameError, got %#+v", err)
- }
- // OK
- _, err = openSSLConn(t, rootCert+"host=postgres sslmode=verify-full user=pqgossltest")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// Test sslmode=require sslrootcert=rootCertPath
-func TestSSLRequireWithRootCert(t *testing.T) {
- maybeSkipSSLTests(t)
- // Environment sanity check: should fail without SSL
- checkSSLSetup(t, "sslmode=disable user=pqgossltest")
-
- bogusRootCertPath := filepath.Join(os.Getenv("PQSSLCERTTEST_PATH"), "bogus_root.crt")
- bogusRootCert := "sslrootcert=" + bogusRootCertPath + " "
-
- // Not OK according to the bogus CA
- _, err := openSSLConn(t, bogusRootCert+"host=postgres sslmode=require user=pqgossltest")
- if err == nil {
- t.Fatal("expected error")
- }
- _, ok := err.(x509.UnknownAuthorityError)
- if !ok {
- t.Fatalf("expected x509.UnknownAuthorityError, got %s, %#+v", err, err)
- }
-
- nonExistentCertPath := filepath.Join(os.Getenv("PQSSLCERTTEST_PATH"), "non_existent.crt")
- nonExistentCert := "sslrootcert=" + nonExistentCertPath + " "
-
- // No match on Common Name, but that's OK because we're not validating anything.
- _, err = openSSLConn(t, nonExistentCert+"host=127.0.0.1 sslmode=require user=pqgossltest")
- if err != nil {
- t.Fatal(err)
- }
-
- rootCertPath := filepath.Join(os.Getenv("PQSSLCERTTEST_PATH"), "root.crt")
- rootCert := "sslrootcert=" + rootCertPath + " "
-
- // No match on Common Name, but that's OK because we're not validating the CN.
- _, err = openSSLConn(t, rootCert+"host=127.0.0.1 sslmode=require user=pqgossltest")
- if err != nil {
- t.Fatal(err)
- }
- // Everything OK
- _, err = openSSLConn(t, rootCert+"host=postgres sslmode=require user=pqgossltest")
- if err != nil {
- t.Fatal(err)
- }
-}
-
-// Test sslmode=verify-ca
-func TestSSLVerifyCA(t *testing.T) {
- maybeSkipSSLTests(t)
- // Environment sanity check: should fail without SSL
- checkSSLSetup(t, "sslmode=disable user=pqgossltest")
-
- // Not OK according to the system CA
- {
- _, err := openSSLConn(t, "host=postgres sslmode=verify-ca user=pqgossltest")
- if _, ok := err.(x509.UnknownAuthorityError); !ok {
- t.Fatalf("expected %T, got %#+v", x509.UnknownAuthorityError{}, err)
- }
- }
-
- // Still not OK according to the system CA; empty sslrootcert is treated as unspecified.
- {
- _, err := openSSLConn(t, "host=postgres sslmode=verify-ca user=pqgossltest sslrootcert=''")
- if _, ok := err.(x509.UnknownAuthorityError); !ok {
- t.Fatalf("expected %T, got %#+v", x509.UnknownAuthorityError{}, err)
- }
- }
-
- rootCertPath := filepath.Join(os.Getenv("PQSSLCERTTEST_PATH"), "root.crt")
- rootCert := "sslrootcert=" + rootCertPath + " "
- // No match on Common Name, but that's OK
- if _, err := openSSLConn(t, rootCert+"host=127.0.0.1 sslmode=verify-ca user=pqgossltest"); err != nil {
- t.Fatal(err)
- }
- // Everything OK
- if _, err := openSSLConn(t, rootCert+"host=postgres sslmode=verify-ca user=pqgossltest"); err != nil {
- t.Fatal(err)
- }
-}
-
-// Authenticate over SSL using client certificates
-func TestSSLClientCertificates(t *testing.T) {
- maybeSkipSSLTests(t)
- // Environment sanity check: should fail without SSL
- checkSSLSetup(t, "sslmode=disable user=pqgossltest")
-
- const baseinfo = "sslmode=require user=pqgosslcert"
-
- // Certificate not specified, should fail
- {
- _, err := openSSLConn(t, baseinfo)
- if pge, ok := err.(*Error); ok {
- if pge.Code.Name() != "invalid_authorization_specification" {
- t.Fatalf("unexpected error code '%s'", pge.Code.Name())
- }
- } else {
- t.Fatalf("expected %T, got %v", (*Error)(nil), err)
- }
- }
-
- // Empty certificate specified, should fail
- {
- _, err := openSSLConn(t, baseinfo+" sslcert=''")
- if pge, ok := err.(*Error); ok {
- if pge.Code.Name() != "invalid_authorization_specification" {
- t.Fatalf("unexpected error code '%s'", pge.Code.Name())
- }
- } else {
- t.Fatalf("expected %T, got %v", (*Error)(nil), err)
- }
- }
-
- // Non-existent certificate specified, should fail
- {
- _, err := openSSLConn(t, baseinfo+" sslcert=/tmp/filedoesnotexist")
- if pge, ok := err.(*Error); ok {
- if pge.Code.Name() != "invalid_authorization_specification" {
- t.Fatalf("unexpected error code '%s'", pge.Code.Name())
- }
- } else {
- t.Fatalf("expected %T, got %v", (*Error)(nil), err)
- }
- }
-
- certpath, ok := os.LookupEnv("PQSSLCERTTEST_PATH")
- if !ok {
- t.Fatalf("PQSSLCERTTEST_PATH not present in environment")
- }
-
- sslcert := filepath.Join(certpath, "postgresql.crt")
-
- // Cert present, key not specified, should fail
- {
- _, err := openSSLConn(t, baseinfo+" sslcert="+sslcert)
- if _, ok := err.(*os.PathError); !ok {
- t.Fatalf("expected %T, got %#+v", (*os.PathError)(nil), err)
- }
- }
-
- // Cert present, empty key specified, should fail
- {
- _, err := openSSLConn(t, baseinfo+" sslcert="+sslcert+" sslkey=''")
- if _, ok := err.(*os.PathError); !ok {
- t.Fatalf("expected %T, got %#+v", (*os.PathError)(nil), err)
- }
- }
-
- // Cert present, non-existent key, should fail
- {
- _, err := openSSLConn(t, baseinfo+" sslcert="+sslcert+" sslkey=/tmp/filedoesnotexist")
- if _, ok := err.(*os.PathError); !ok {
- t.Fatalf("expected %T, got %#+v", (*os.PathError)(nil), err)
- }
- }
-
- // Key has wrong permissions (passing the cert as the key), should fail
- if _, err := openSSLConn(t, baseinfo+" sslcert="+sslcert+" sslkey="+sslcert); err != ErrSSLKeyHasWorldPermissions {
- t.Fatalf("expected %s, got %#+v", ErrSSLKeyHasWorldPermissions, err)
- }
-
- sslkey := filepath.Join(certpath, "postgresql.key")
-
- // Should work
- if db, err := openSSLConn(t, baseinfo+" sslcert="+sslcert+" sslkey="+sslkey); err != nil {
- t.Fatal(err)
- } else {
- rows, err := db.Query("SELECT 1")
- if err != nil {
- t.Fatal(err)
- }
- if err := rows.Close(); err != nil {
- t.Fatal(err)
- }
- if err := db.Close(); err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/lib/pq/url_test.go b/vendor/github.com/lib/pq/url_test.go
deleted file mode 100644
index 4ff0ce034..000000000
--- a/vendor/github.com/lib/pq/url_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package pq
-
-import (
- "testing"
-)
-
-func TestSimpleParseURL(t *testing.T) {
- expected := "host=hostname.remote"
- str, err := ParseURL("postgres://hostname.remote")
- if err != nil {
- t.Fatal(err)
- }
-
- if str != expected {
- t.Fatalf("unexpected result from ParseURL:\n+ %v\n- %v", str, expected)
- }
-}
-
-func TestIPv6LoopbackParseURL(t *testing.T) {
- expected := "host=::1 port=1234"
- str, err := ParseURL("postgres://[::1]:1234")
- if err != nil {
- t.Fatal(err)
- }
-
- if str != expected {
- t.Fatalf("unexpected result from ParseURL:\n+ %v\n- %v", str, expected)
- }
-}
-
-func TestFullParseURL(t *testing.T) {
- expected := `dbname=database host=hostname.remote password=top\ secret port=1234 user=username`
- str, err := ParseURL("postgres://username:top%20secret@hostname.remote:1234/database")
- if err != nil {
- t.Fatal(err)
- }
-
- if str != expected {
- t.Fatalf("unexpected result from ParseURL:\n+ %s\n- %s", str, expected)
- }
-}
-
-func TestInvalidProtocolParseURL(t *testing.T) {
- _, err := ParseURL("http://hostname.remote")
- switch err {
- case nil:
- t.Fatal("Expected an error from parsing invalid protocol")
- default:
- msg := "invalid connection protocol: http"
- if err.Error() != msg {
- t.Fatalf("Unexpected error message:\n+ %s\n- %s",
- err.Error(), msg)
- }
- }
-}
-
-func TestMinimalURL(t *testing.T) {
- cs, err := ParseURL("postgres://")
- if err != nil {
- t.Fatal(err)
- }
-
- if cs != "" {
- t.Fatalf("expected blank connection string, got: %q", cs)
- }
-}
diff --git a/vendor/github.com/lib/pq/uuid_test.go b/vendor/github.com/lib/pq/uuid_test.go
deleted file mode 100644
index 8ecee2fde..000000000
--- a/vendor/github.com/lib/pq/uuid_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package pq
-
-import (
- "reflect"
- "strings"
- "testing"
-)
-
-func TestDecodeUUIDBinaryError(t *testing.T) {
- t.Parallel()
- _, err := decodeUUIDBinary([]byte{0x12, 0x34})
-
- if err == nil {
- t.Fatal("Expected error, got none")
- }
- if !strings.HasPrefix(err.Error(), "pq:") {
- t.Errorf("Expected error to start with %q, got %q", "pq:", err.Error())
- }
- if !strings.Contains(err.Error(), "bad length: 2") {
- t.Errorf("Expected error to contain length, got %q", err.Error())
- }
-}
-
-func BenchmarkDecodeUUIDBinary(b *testing.B) {
- x := []byte{0x03, 0xa3, 0x52, 0x2f, 0x89, 0x28, 0x49, 0x87, 0x84, 0xd6, 0x93, 0x7b, 0x36, 0xec, 0x27, 0x6f}
-
- for i := 0; i < b.N; i++ {
- decodeUUIDBinary(x)
- }
-}
-
-func TestDecodeUUIDBackend(t *testing.T) {
- db := openTestConn(t)
- defer db.Close()
-
- var s = "a0ecc91d-a13f-4fe4-9fce-7e09777cc70a"
- var scanned interface{}
-
- err := db.QueryRow(`SELECT $1::uuid`, s).Scan(&scanned)
- if err != nil {
- t.Fatalf("Expected no error, got %v", err)
- }
- if !reflect.DeepEqual(scanned, []byte(s)) {
- t.Errorf("Expected []byte(%q), got %T(%q)", s, scanned, scanned)
- }
-}
diff --git a/vendor/github.com/magiconair/properties/assert/assert.go b/vendor/github.com/magiconair/properties/assert/assert.go
deleted file mode 100644
index cb1097baa..000000000
--- a/vendor/github.com/magiconair/properties/assert/assert.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package assert provides helper functions for testing.
-package assert
-
-import (
- "fmt"
- "path/filepath"
- "reflect"
- "regexp"
- "runtime"
- "strings"
- "testing"
-)
-
-// skip defines the default call depth
-const skip = 2
-
-// Equal asserts that got and want are equal as defined by
-// reflect.DeepEqual. The test fails with msg if they are not equal.
-func Equal(t *testing.T, got, want interface{}, msg ...string) {
- if x := equal(2, got, want, msg...); x != "" {
- fmt.Println(x)
- t.Fail()
- }
-}
-
-func equal(skip int, got, want interface{}, msg ...string) string {
- if !reflect.DeepEqual(got, want) {
- return fail(skip, "got %v want %v %s", got, want, strings.Join(msg, " "))
- }
- return ""
-}
-
-// Panic asserts that function fn() panics.
-// It assumes that recover() either returns a string or
-// an error and fails if the message does not match
-// the regular expression in 'matches'.
-func Panic(t *testing.T, fn func(), matches string) {
- if x := doesPanic(2, fn, matches); x != "" {
- fmt.Println(x)
- t.Fail()
- }
-}
-
-func doesPanic(skip int, fn func(), expr string) (err string) {
- defer func() {
- r := recover()
- if r == nil {
- err = fail(skip, "did not panic")
- return
- }
- var v string
- switch r.(type) {
- case error:
- v = r.(error).Error()
- case string:
- v = r.(string)
- }
- err = matches(skip, v, expr)
- }()
- fn()
- return ""
-}
-
-// Matches asserts that a value matches a given regular expression.
-func Matches(t *testing.T, value, expr string) {
- if x := matches(2, value, expr); x != "" {
- fmt.Println(x)
- t.Fail()
- }
-}
-
-func matches(skip int, value, expr string) string {
- ok, err := regexp.MatchString(expr, value)
- if err != nil {
- return fail(skip, "invalid pattern %q. %s", expr, err)
- }
- if !ok {
- return fail(skip, "got %s which does not match %s", value, expr)
- }
- return ""
-}
-
-func fail(skip int, format string, args ...interface{}) string {
- _, file, line, _ := runtime.Caller(skip)
- return fmt.Sprintf("\t%s:%d: %s\n", filepath.Base(file), line, fmt.Sprintf(format, args...))
-}
diff --git a/vendor/github.com/magiconair/properties/assert/assert_test.go b/vendor/github.com/magiconair/properties/assert/assert_test.go
deleted file mode 100644
index dcef73dfc..000000000
--- a/vendor/github.com/magiconair/properties/assert/assert_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package assert
-
-import "testing"
-
-func TestEqualEquals(t *testing.T) {
- if got, want := equal(2, "a", "a"), ""; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestEqualFails(t *testing.T) {
- if got, want := equal(2, "a", "b"), "\tassert_test.go:16: got a want b \n"; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestPanicPanics(t *testing.T) {
- if got, want := doesPanic(2, func() { panic("foo") }, ""), ""; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestPanicPanicsAndMatches(t *testing.T) {
- if got, want := doesPanic(2, func() { panic("foo") }, "foo"), ""; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestPanicPanicsAndDoesNotMatch(t *testing.T) {
- if got, want := doesPanic(2, func() { panic("foo") }, "bar"), "\tassert.go:62: got foo which does not match bar\n"; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestPanicPanicsAndDoesNotPanic(t *testing.T) {
- if got, want := doesPanic(2, func() {}, "bar"), "\tassert.go:65: did not panic\n"; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestMatchesMatches(t *testing.T) {
- if got, want := matches(2, "aaa", "a"), ""; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
-
-func TestMatchesDoesNotMatch(t *testing.T) {
- if got, want := matches(2, "aaa", "b"), "\tassert_test.go:52: got aaa which does not match b\n"; got != want {
- t.Fatalf("got %q want %q", got, want)
- }
-}
diff --git a/vendor/github.com/magiconair/properties/benchmark_test.go b/vendor/github.com/magiconair/properties/benchmark_test.go
deleted file mode 100644
index 62c7cc571..000000000
--- a/vendor/github.com/magiconair/properties/benchmark_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013-2014 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "fmt"
- "testing"
-)
-
-// Benchmarks the decoder by creating a property file with 1000 key/value pairs.
-func BenchmarkLoad(b *testing.B) {
- input := ""
- for i := 0; i < 1000; i++ {
- input += fmt.Sprintf("key%d=value%d\n", i, i)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if _, err := Load([]byte(input), ISO_8859_1); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/magiconair/properties/decode_test.go b/vendor/github.com/magiconair/properties/decode_test.go
deleted file mode 100644
index c82931482..000000000
--- a/vendor/github.com/magiconair/properties/decode_test.go
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "reflect"
- "testing"
- "time"
-)
-
-func TestDecodeValues(t *testing.T) {
- type S struct {
- S string
- BT bool
- BF bool
- I int
- I8 int8
- I16 int16
- I32 int32
- I64 int64
- U uint
- U8 uint8
- U16 uint16
- U32 uint32
- U64 uint64
- F32 float32
- F64 float64
- D time.Duration
- TM time.Time
- }
- in := `
- S=abc
- BT=true
- BF=false
- I=-1
- I8=-8
- I16=-16
- I32=-32
- I64=-64
- U=1
- U8=8
- U16=16
- U32=32
- U64=64
- F32=3.2
- F64=6.4
- D=5s
- TM=2015-01-02T12:34:56Z
- `
- out := &S{
- S: "abc",
- BT: true,
- BF: false,
- I: -1,
- I8: -8,
- I16: -16,
- I32: -32,
- I64: -64,
- U: 1,
- U8: 8,
- U16: 16,
- U32: 32,
- U64: 64,
- F32: 3.2,
- F64: 6.4,
- D: 5 * time.Second,
- TM: tm(t, time.RFC3339, "2015-01-02T12:34:56Z"),
- }
- testDecode(t, in, &S{}, out)
-}
-
-func TestDecodeValueDefaults(t *testing.T) {
- type S struct {
- S string `properties:",default=abc"`
- BT bool `properties:",default=true"`
- BF bool `properties:",default=false"`
- I int `properties:",default=-1"`
- I8 int8 `properties:",default=-8"`
- I16 int16 `properties:",default=-16"`
- I32 int32 `properties:",default=-32"`
- I64 int64 `properties:",default=-64"`
- U uint `properties:",default=1"`
- U8 uint8 `properties:",default=8"`
- U16 uint16 `properties:",default=16"`
- U32 uint32 `properties:",default=32"`
- U64 uint64 `properties:",default=64"`
- F32 float32 `properties:",default=3.2"`
- F64 float64 `properties:",default=6.4"`
- D time.Duration `properties:",default=5s"`
- TM time.Time `properties:",default=2015-01-02T12:34:56Z"`
- }
- out := &S{
- S: "abc",
- BT: true,
- BF: false,
- I: -1,
- I8: -8,
- I16: -16,
- I32: -32,
- I64: -64,
- U: 1,
- U8: 8,
- U16: 16,
- U32: 32,
- U64: 64,
- F32: 3.2,
- F64: 6.4,
- D: 5 * time.Second,
- TM: tm(t, time.RFC3339, "2015-01-02T12:34:56Z"),
- }
- testDecode(t, "", &S{}, out)
-}
-
-func TestDecodeArrays(t *testing.T) {
- type S struct {
- S []string
- B []bool
- I []int
- I8 []int8
- I16 []int16
- I32 []int32
- I64 []int64
- U []uint
- U8 []uint8
- U16 []uint16
- U32 []uint32
- U64 []uint64
- F32 []float32
- F64 []float64
- D []time.Duration
- TM []time.Time
- }
- in := `
- S=a;b
- B=true;false
- I=-1;-2
- I8=-8;-9
- I16=-16;-17
- I32=-32;-33
- I64=-64;-65
- U=1;2
- U8=8;9
- U16=16;17
- U32=32;33
- U64=64;65
- F32=3.2;3.3
- F64=6.4;6.5
- D=4s;5s
- TM=2015-01-01T00:00:00Z;2016-01-01T00:00:00Z
- `
- out := &S{
- S: []string{"a", "b"},
- B: []bool{true, false},
- I: []int{-1, -2},
- I8: []int8{-8, -9},
- I16: []int16{-16, -17},
- I32: []int32{-32, -33},
- I64: []int64{-64, -65},
- U: []uint{1, 2},
- U8: []uint8{8, 9},
- U16: []uint16{16, 17},
- U32: []uint32{32, 33},
- U64: []uint64{64, 65},
- F32: []float32{3.2, 3.3},
- F64: []float64{6.4, 6.5},
- D: []time.Duration{4 * time.Second, 5 * time.Second},
- TM: []time.Time{tm(t, time.RFC3339, "2015-01-01T00:00:00Z"), tm(t, time.RFC3339, "2016-01-01T00:00:00Z")},
- }
- testDecode(t, in, &S{}, out)
-}
-
-func TestDecodeArrayDefaults(t *testing.T) {
- type S struct {
- S []string `properties:",default=a;b"`
- B []bool `properties:",default=true;false"`
- I []int `properties:",default=-1;-2"`
- I8 []int8 `properties:",default=-8;-9"`
- I16 []int16 `properties:",default=-16;-17"`
- I32 []int32 `properties:",default=-32;-33"`
- I64 []int64 `properties:",default=-64;-65"`
- U []uint `properties:",default=1;2"`
- U8 []uint8 `properties:",default=8;9"`
- U16 []uint16 `properties:",default=16;17"`
- U32 []uint32 `properties:",default=32;33"`
- U64 []uint64 `properties:",default=64;65"`
- F32 []float32 `properties:",default=3.2;3.3"`
- F64 []float64 `properties:",default=6.4;6.5"`
- D []time.Duration `properties:",default=4s;5s"`
- TM []time.Time `properties:",default=2015-01-01T00:00:00Z;2016-01-01T00:00:00Z"`
- }
- out := &S{
- S: []string{"a", "b"},
- B: []bool{true, false},
- I: []int{-1, -2},
- I8: []int8{-8, -9},
- I16: []int16{-16, -17},
- I32: []int32{-32, -33},
- I64: []int64{-64, -65},
- U: []uint{1, 2},
- U8: []uint8{8, 9},
- U16: []uint16{16, 17},
- U32: []uint32{32, 33},
- U64: []uint64{64, 65},
- F32: []float32{3.2, 3.3},
- F64: []float64{6.4, 6.5},
- D: []time.Duration{4 * time.Second, 5 * time.Second},
- TM: []time.Time{tm(t, time.RFC3339, "2015-01-01T00:00:00Z"), tm(t, time.RFC3339, "2016-01-01T00:00:00Z")},
- }
- testDecode(t, "", &S{}, out)
-}
-
-func TestDecodeSkipUndef(t *testing.T) {
- type S struct {
- X string `properties:"-"`
- Undef string `properties:",default=some value"`
- }
- in := `X=ignore`
- out := &S{"", "some value"}
- testDecode(t, in, &S{}, out)
-}
-
-func TestDecodeStruct(t *testing.T) {
- type A struct {
- S string
- T string `properties:"t"`
- U string `properties:"u,default=uuu"`
- }
- type S struct {
- A A
- B A `properties:"b"`
- }
- in := `
- A.S=sss
- A.t=ttt
- b.S=SSS
- b.t=TTT
- `
- out := &S{
- A{S: "sss", T: "ttt", U: "uuu"},
- A{S: "SSS", T: "TTT", U: "uuu"},
- }
- testDecode(t, in, &S{}, out)
-}
-
-func TestDecodeMap(t *testing.T) {
- type S struct {
- A string `properties:"a"`
- }
- type X struct {
- A map[string]string
- B map[string][]string
- C map[string]map[string]string
- D map[string]S
- E map[string]int
- F map[string]int `properties:"-"`
- }
- in := `
- A.foo=bar
- A.bar=bang
- B.foo=a;b;c
- B.bar=1;2;3
- C.foo.one=1
- C.foo.two=2
- C.bar.three=3
- C.bar.four=4
- D.foo.a=bar
- `
- out := &X{
- A: map[string]string{"foo": "bar", "bar": "bang"},
- B: map[string][]string{"foo": []string{"a", "b", "c"}, "bar": []string{"1", "2", "3"}},
- C: map[string]map[string]string{"foo": map[string]string{"one": "1", "two": "2"}, "bar": map[string]string{"three": "3", "four": "4"}},
- D: map[string]S{"foo": S{"bar"}},
- E: map[string]int{},
- }
- testDecode(t, in, &X{}, out)
-}
-
-func testDecode(t *testing.T, in string, v, out interface{}) {
- p, err := parse(in)
- if err != nil {
- t.Fatalf("got %v want nil", err)
- }
- if err := p.Decode(v); err != nil {
- t.Fatalf("got %v want nil", err)
- }
- if got, want := v, out; !reflect.DeepEqual(got, want) {
- t.Fatalf("\ngot %+v\nwant %+v", got, want)
- }
-}
-
-func tm(t *testing.T, layout, s string) time.Time {
- tm, err := time.Parse(layout, s)
- if err != nil {
- t.Fatalf("got %v want nil", err)
- }
- return tm
-}
diff --git a/vendor/github.com/magiconair/properties/example_test.go b/vendor/github.com/magiconair/properties/example_test.go
deleted file mode 100644
index 6f21dfbd8..000000000
--- a/vendor/github.com/magiconair/properties/example_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "fmt"
- "log"
-)
-
-func ExampleLoad_iso88591() {
- buf := []byte("key = ISO-8859-1 value with unicode literal \\u2318 and umlaut \xE4") // 0xE4 == ä
- p, _ := Load(buf, ISO_8859_1)
- v, ok := p.Get("key")
- fmt.Println(ok)
- fmt.Println(v)
- // Output:
- // true
- // ISO-8859-1 value with unicode literal ⌘ and umlaut ä
-}
-
-func ExampleLoad_utf8() {
- p, _ := Load([]byte("key = UTF-8 value with unicode character ⌘ and umlaut ä"), UTF8)
- v, ok := p.Get("key")
- fmt.Println(ok)
- fmt.Println(v)
- // Output:
- // true
- // UTF-8 value with unicode character ⌘ and umlaut ä
-}
-
-func ExampleProperties_GetBool() {
- var input = `
- key=1
- key2=On
- key3=YES
- key4=true`
- p, _ := Load([]byte(input), ISO_8859_1)
- fmt.Println(p.GetBool("key", false))
- fmt.Println(p.GetBool("key2", false))
- fmt.Println(p.GetBool("key3", false))
- fmt.Println(p.GetBool("key4", false))
- fmt.Println(p.GetBool("keyX", false))
- // Output:
- // true
- // true
- // true
- // true
- // false
-}
-
-func ExampleProperties_GetString() {
- p, _ := Load([]byte("key=value"), ISO_8859_1)
- v := p.GetString("another key", "default value")
- fmt.Println(v)
- // Output:
- // default value
-}
-
-func Example() {
- // Decode some key/value pairs with expressions
- p, err := Load([]byte("key=value\nkey2=${key}"), ISO_8859_1)
- if err != nil {
- log.Fatal(err)
- }
-
- // Get a valid key
- if v, ok := p.Get("key"); ok {
- fmt.Println(v)
- }
-
- // Get an invalid key
- if _, ok := p.Get("does not exist"); !ok {
- fmt.Println("invalid key")
- }
-
- // Get a key with a default value
- v := p.GetString("does not exist", "some value")
- fmt.Println(v)
-
- // Dump the expanded key/value pairs of the Properties
- fmt.Println("Expanded key/value pairs")
- fmt.Println(p)
-
- // Output:
- // value
- // invalid key
- // some value
- // Expanded key/value pairs
- // key = value
- // key2 = value
-}
diff --git a/vendor/github.com/magiconair/properties/integrate_test.go b/vendor/github.com/magiconair/properties/integrate_test.go
deleted file mode 100644
index cbee181f6..000000000
--- a/vendor/github.com/magiconair/properties/integrate_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "flag"
- "fmt"
- "testing"
-)
-
-// TestFlag verifies Properties.MustFlag without flag.FlagSet.Parse
-func TestFlag(t *testing.T) {
- f := flag.NewFlagSet("src", flag.PanicOnError)
- gotS := f.String("s", "?", "string flag")
- gotI := f.Int("i", -1, "int flag")
-
- p := NewProperties()
- p.MustSet("s", "t")
- p.MustSet("i", "9")
- p.MustFlag(f)
-
- if want := "t"; *gotS != want {
- t.Errorf("Got string s=%q, want %q", *gotS, want)
- }
- if want := 9; *gotI != want {
- t.Errorf("Got int i=%d, want %d", *gotI, want)
- }
-}
-
-// TestFlagOverride verifies Properties.MustFlag with flag.FlagSet.Parse.
-func TestFlagOverride(t *testing.T) {
- f := flag.NewFlagSet("src", flag.PanicOnError)
- gotA := f.Int("a", 1, "remain default")
- gotB := f.Int("b", 2, "customized")
- gotC := f.Int("c", 3, "overridden")
-
- if err := f.Parse([]string{"-c", "4"}); err != nil {
- t.Fatal(err)
- }
-
- p := NewProperties()
- p.MustSet("b", "5")
- p.MustSet("c", "6")
- p.MustFlag(f)
-
- if want := 1; *gotA != want {
- t.Errorf("Got remain default a=%d, want %d", *gotA, want)
- }
- if want := 5; *gotB != want {
- t.Errorf("Got customized b=%d, want %d", *gotB, want)
- }
- if want := 4; *gotC != want {
- t.Errorf("Got overriden c=%d, want %d", *gotC, want)
- }
-}
-
-func ExampleProperties_MustFlag() {
- x := flag.Int("x", 0, "demo customize")
- y := flag.Int("y", 0, "demo override")
-
- // Demo alternative for flag.Parse():
- flag.CommandLine.Parse([]string{"-y", "10"})
- fmt.Printf("flagged as x=%d, y=%d\n", *x, *y)
-
- p := NewProperties()
- p.MustSet("x", "7")
- p.MustSet("y", "42") // note discard
- p.MustFlag(flag.CommandLine)
- fmt.Printf("configured to x=%d, y=%d\n", *x, *y)
-
- // Output:
- // flagged as x=0, y=10
- // configured to x=7, y=10
-}
diff --git a/vendor/github.com/magiconair/properties/load_test.go b/vendor/github.com/magiconair/properties/load_test.go
deleted file mode 100644
index d8770c8a0..000000000
--- a/vendor/github.com/magiconair/properties/load_test.go
+++ /dev/null
@@ -1,231 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "fmt"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "os"
- "strings"
- "testing"
-
- "github.com/magiconair/properties/assert"
-)
-
-func TestLoadFailsWithNotExistingFile(t *testing.T) {
- _, err := LoadFile("doesnotexist.properties", ISO_8859_1)
- assert.Equal(t, err != nil, true, "")
- assert.Matches(t, err.Error(), "open.*no such file or directory")
-}
-
-func TestLoadFilesFailsOnNotExistingFile(t *testing.T) {
- _, err := LoadFile("doesnotexist.properties", ISO_8859_1)
- assert.Equal(t, err != nil, true, "")
- assert.Matches(t, err.Error(), "open.*no such file or directory")
-}
-
-func TestLoadFilesDoesNotFailOnNotExistingFileAndIgnoreMissing(t *testing.T) {
- p, err := LoadFiles([]string{"doesnotexist.properties"}, ISO_8859_1, true)
- assert.Equal(t, err, nil)
- assert.Equal(t, p.Len(), 0)
-}
-
-func TestLoadString(t *testing.T) {
- x := "key=äüö"
- p1 := MustLoadString(x)
- p2 := must(Load([]byte(x), UTF8))
- assert.Equal(t, p1, p2)
-}
-
-func TestLoadMap(t *testing.T) {
- // LoadMap does not guarantee the same import order
- // of keys every time since map access is randomized.
- // Therefore, we need to compare the generated maps.
- m := map[string]string{"key": "value", "abc": "def"}
- assert.Equal(t, LoadMap(m).Map(), m)
-}
-
-func TestLoadFile(t *testing.T) {
- tf := make(tempFiles, 0)
- defer tf.removeAll()
-
- filename := tf.makeFile("key=value")
- p := MustLoadFile(filename, ISO_8859_1)
-
- assert.Equal(t, p.Len(), 1)
- assertKeyValues(t, "", p, "key", "value")
-}
-
-func TestLoadFiles(t *testing.T) {
- tf := make(tempFiles, 0)
- defer tf.removeAll()
-
- filename := tf.makeFile("key=value")
- filename2 := tf.makeFile("key2=value2")
- p := MustLoadFiles([]string{filename, filename2}, ISO_8859_1, false)
- assertKeyValues(t, "", p, "key", "value", "key2", "value2")
-}
-
-func TestLoadExpandedFile(t *testing.T) {
- tf := make(tempFiles, 0)
- defer tf.removeAll()
-
- if err := os.Setenv("_VARX", "some-value"); err != nil {
- t.Fatal(err)
- }
- filename := tf.makeFilePrefix(os.Getenv("_VARX"), "key=value")
- filename = strings.Replace(filename, os.Getenv("_VARX"), "${_VARX}", -1)
- p := MustLoadFile(filename, ISO_8859_1)
- assertKeyValues(t, "", p, "key", "value")
-}
-
-func TestLoadFilesAndIgnoreMissing(t *testing.T) {
- tf := make(tempFiles, 0)
- defer tf.removeAll()
-
- filename := tf.makeFile("key=value")
- filename2 := tf.makeFile("key2=value2")
- p := MustLoadFiles([]string{filename, filename + "foo", filename2, filename2 + "foo"}, ISO_8859_1, true)
- assertKeyValues(t, "", p, "key", "value", "key2", "value2")
-}
-
-func TestLoadURL(t *testing.T) {
- srv := testServer()
- defer srv.Close()
- p := MustLoadURL(srv.URL + "/a")
- assertKeyValues(t, "", p, "key", "value")
-}
-
-func TestLoadURLs(t *testing.T) {
- srv := testServer()
- defer srv.Close()
- p := MustLoadURLs([]string{srv.URL + "/a", srv.URL + "/b"}, false)
- assertKeyValues(t, "", p, "key", "value", "key2", "value2")
-}
-
-func TestLoadURLsAndFailMissing(t *testing.T) {
- srv := testServer()
- defer srv.Close()
- p, err := LoadURLs([]string{srv.URL + "/a", srv.URL + "/c"}, false)
- assert.Equal(t, p, (*Properties)(nil))
- assert.Matches(t, err.Error(), ".*returned 404.*")
-}
-
-func TestLoadURLsAndIgnoreMissing(t *testing.T) {
- srv := testServer()
- defer srv.Close()
- p := MustLoadURLs([]string{srv.URL + "/a", srv.URL + "/b", srv.URL + "/c"}, true)
- assertKeyValues(t, "", p, "key", "value", "key2", "value2")
-}
-
-func TestLoadURLEncoding(t *testing.T) {
- srv := testServer()
- defer srv.Close()
-
- uris := []string{"/none", "/utf8", "/plain", "/latin1", "/iso88591"}
- for i, uri := range uris {
- p := MustLoadURL(srv.URL + uri)
- assert.Equal(t, p.GetString("key", ""), "äöü", fmt.Sprintf("%d", i))
- }
-}
-
-func TestLoadURLFailInvalidEncoding(t *testing.T) {
- srv := testServer()
- defer srv.Close()
-
- p, err := LoadURL(srv.URL + "/json")
- assert.Equal(t, p, (*Properties)(nil))
- assert.Matches(t, err.Error(), ".*invalid content type.*")
-}
-
-func TestLoadAll(t *testing.T) {
- tf := make(tempFiles, 0)
- defer tf.removeAll()
-
- filename := tf.makeFile("key=value")
- filename2 := tf.makeFile("key2=value3")
- filename3 := tf.makeFile("key=value4")
- srv := testServer()
- defer srv.Close()
- p := MustLoadAll([]string{filename, filename2, srv.URL + "/a", srv.URL + "/b", filename3}, UTF8, false)
- assertKeyValues(t, "", p, "key", "value4", "key2", "value2")
-}
-
-type tempFiles []string
-
-func (tf *tempFiles) removeAll() {
- for _, path := range *tf {
- err := os.Remove(path)
- if err != nil {
- fmt.Printf("os.Remove: %v", err)
- }
- }
-}
-
-func (tf *tempFiles) makeFile(data string) string {
- return tf.makeFilePrefix("properties", data)
-}
-
-func (tf *tempFiles) makeFilePrefix(prefix, data string) string {
- f, err := ioutil.TempFile("", prefix)
- if err != nil {
- panic("ioutil.TempFile: " + err.Error())
- }
-
- // remember the temp file so that we can remove it later
- *tf = append(*tf, f.Name())
-
- n, err := fmt.Fprint(f, data)
- if err != nil {
- panic("fmt.Fprintln: " + err.Error())
- }
- if n != len(data) {
- panic(fmt.Sprintf("Data size mismatch. expected=%d wrote=%d\n", len(data), n))
- }
-
- err = f.Close()
- if err != nil {
- panic("f.Close: " + err.Error())
- }
-
- return f.Name()
-}
-
-func testServer() *httptest.Server {
- return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- send := func(data []byte, contentType string) {
- w.Header().Set("Content-Type", contentType)
- if _, err := w.Write(data); err != nil {
- panic(err)
- }
- }
-
- utf8 := []byte("key=äöü")
- iso88591 := []byte{0x6b, 0x65, 0x79, 0x3d, 0xe4, 0xf6, 0xfc} // key=äöü
-
- switch r.RequestURI {
- case "/a":
- send([]byte("key=value"), "")
- case "/b":
- send([]byte("key2=value2"), "")
- case "/none":
- send(utf8, "")
- case "/utf8":
- send(utf8, "text/plain; charset=utf-8")
- case "/json":
- send(utf8, "application/json; charset=utf-8")
- case "/plain":
- send(iso88591, "text/plain")
- case "/latin1":
- send(iso88591, "text/plain; charset=latin1")
- case "/iso88591":
- send(iso88591, "text/plain; charset=iso-8859-1")
- default:
- w.WriteHeader(404)
- }
- }))
-}
diff --git a/vendor/github.com/magiconair/properties/properties_test.go b/vendor/github.com/magiconair/properties/properties_test.go
deleted file mode 100644
index 6401c77e2..000000000
--- a/vendor/github.com/magiconair/properties/properties_test.go
+++ /dev/null
@@ -1,977 +0,0 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package properties
-
-import (
- "bytes"
- "flag"
- "fmt"
- "math"
- "os"
- "reflect"
- "strings"
- "testing"
- "time"
-
- "github.com/magiconair/properties/assert"
-)
-
-var verbose = flag.Bool("verbose", false, "Verbose output")
-
-func init() {
- ErrorHandler = PanicHandler
-}
-
-// ----------------------------------------------------------------------------
-
-// define test cases in the form of
-// {"input", "key1", "value1", "key2", "value2", ...}
-var complexTests = [][]string{
- // whitespace prefix
- {" key=value", "key", "value"}, // SPACE prefix
- {"\fkey=value", "key", "value"}, // FF prefix
- {"\tkey=value", "key", "value"}, // TAB prefix
- {" \f\tkey=value", "key", "value"}, // mix prefix
-
- // multiple keys
- {"key1=value1\nkey2=value2\n", "key1", "value1", "key2", "value2"},
- {"key1=value1\rkey2=value2\r", "key1", "value1", "key2", "value2"},
- {"key1=value1\r\nkey2=value2\r\n", "key1", "value1", "key2", "value2"},
-
- // blank lines
- {"\nkey=value\n", "key", "value"},
- {"\rkey=value\r", "key", "value"},
- {"\r\nkey=value\r\n", "key", "value"},
- {"\nkey=value\n \nkey2=value2", "key", "value", "key2", "value2"},
- {"\nkey=value\n\t\nkey2=value2", "key", "value", "key2", "value2"},
-
- // escaped chars in key
- {"k\\ ey = value", "k ey", "value"},
- {"k\\:ey = value", "k:ey", "value"},
- {"k\\=ey = value", "k=ey", "value"},
- {"k\\fey = value", "k\fey", "value"},
- {"k\\ney = value", "k\ney", "value"},
- {"k\\rey = value", "k\rey", "value"},
- {"k\\tey = value", "k\tey", "value"},
-
- // escaped chars in value
- {"key = v\\ alue", "key", "v alue"},
- {"key = v\\:alue", "key", "v:alue"},
- {"key = v\\=alue", "key", "v=alue"},
- {"key = v\\falue", "key", "v\falue"},
- {"key = v\\nalue", "key", "v\nalue"},
- {"key = v\\ralue", "key", "v\ralue"},
- {"key = v\\talue", "key", "v\talue"},
-
- // silently dropped escape character
- {"k\\zey = value", "kzey", "value"},
- {"key = v\\zalue", "key", "vzalue"},
-
- // unicode literals
- {"key\\u2318 = value", "key⌘", "value"},
- {"k\\u2318ey = value", "k⌘ey", "value"},
- {"key = value\\u2318", "key", "value⌘"},
- {"key = valu\\u2318e", "key", "valu⌘e"},
-
- // multiline values
- {"key = valueA,\\\n valueB", "key", "valueA,valueB"}, // SPACE indent
- {"key = valueA,\\\n\f\f\fvalueB", "key", "valueA,valueB"}, // FF indent
- {"key = valueA,\\\n\t\t\tvalueB", "key", "valueA,valueB"}, // TAB indent
- {"key = valueA,\\\n \f\tvalueB", "key", "valueA,valueB"}, // mix indent
-
- // comments
- {"# this is a comment\n! and so is this\nkey1=value1\nkey#2=value#2\n\nkey!3=value!3\n# and another one\n! and the final one", "key1", "value1", "key#2", "value#2", "key!3", "value!3"},
-
- // expansion tests
- {"key=value\nkey2=${key}", "key", "value", "key2", "value"},
- {"key=value\nkey2=aa${key}", "key", "value", "key2", "aavalue"},
- {"key=value\nkey2=${key}bb", "key", "value", "key2", "valuebb"},
- {"key=value\nkey2=aa${key}bb", "key", "value", "key2", "aavaluebb"},
- {"key=value\nkey2=${key}\nkey3=${key2}", "key", "value", "key2", "value", "key3", "value"},
- {"key=value\nkey2=${key}${key}", "key", "value", "key2", "valuevalue"},
- {"key=value\nkey2=${key}${key}${key}${key}", "key", "value", "key2", "valuevaluevaluevalue"},
- {"key=value\nkey2=${key}${key3}\nkey3=${key}", "key", "value", "key2", "valuevalue", "key3", "value"},
- {"key=value\nkey2=${key3}${key}${key4}\nkey3=${key}\nkey4=${key}", "key", "value", "key2", "valuevaluevalue", "key3", "value", "key4", "value"},
- {"key=${USER}", "key", os.Getenv("USER")},
- {"key=${USER}\nUSER=value", "key", "value", "USER", "value"},
-}
-
-// ----------------------------------------------------------------------------
-
-var commentTests = []struct {
- input, key, value string
- comments []string
-}{
- {"key=value", "key", "value", nil},
- {"#\nkey=value", "key", "value", []string{""}},
- {"#comment\nkey=value", "key", "value", []string{"comment"}},
- {"# comment\nkey=value", "key", "value", []string{"comment"}},
- {"# comment\nkey=value", "key", "value", []string{"comment"}},
- {"# comment\n\nkey=value", "key", "value", []string{"comment"}},
- {"# comment1\n# comment2\nkey=value", "key", "value", []string{"comment1", "comment2"}},
- {"# comment1\n\n# comment2\n\nkey=value", "key", "value", []string{"comment1", "comment2"}},
- {"!comment\nkey=value", "key", "value", []string{"comment"}},
- {"! comment\nkey=value", "key", "value", []string{"comment"}},
- {"! comment\nkey=value", "key", "value", []string{"comment"}},
- {"! comment\n\nkey=value", "key", "value", []string{"comment"}},
- {"! comment1\n! comment2\nkey=value", "key", "value", []string{"comment1", "comment2"}},
- {"! comment1\n\n! comment2\n\nkey=value", "key", "value", []string{"comment1", "comment2"}},
-}
-
-// ----------------------------------------------------------------------------
-
-var errorTests = []struct {
- input, msg string
-}{
- // unicode literals
- {"key\\u1 = value", "invalid unicode literal"},
- {"key\\u12 = value", "invalid unicode literal"},
- {"key\\u123 = value", "invalid unicode literal"},
- {"key\\u123g = value", "invalid unicode literal"},
- {"key\\u123", "invalid unicode literal"},
-
- // circular references
- {"key=${key}", "circular reference"},
- {"key1=${key2}\nkey2=${key1}", "circular reference"},
-
- // malformed expressions
- {"key=${ke", "malformed expression"},
- {"key=valu${ke", "malformed expression"},
-}
-
-// ----------------------------------------------------------------------------
-
-var writeTests = []struct {
- input, output, encoding string
-}{
- // ISO-8859-1 tests
- {"key = value", "key = value\n", "ISO-8859-1"},
- {"key = value \\\n continued", "key = value continued\n", "ISO-8859-1"},
- {"key⌘ = value", "key\\u2318 = value\n", "ISO-8859-1"},
- {"ke\\ \\:y = value", "ke\\ \\:y = value\n", "ISO-8859-1"},
-
- // UTF-8 tests
- {"key = value", "key = value\n", "UTF-8"},
- {"key = value \\\n continued", "key = value continued\n", "UTF-8"},
- {"key⌘ = value⌘", "key⌘ = value⌘\n", "UTF-8"},
- {"ke\\ \\:y = value", "ke\\ \\:y = value\n", "UTF-8"},
-}
-
-// ----------------------------------------------------------------------------
-
-var writeCommentTests = []struct {
- input, output, encoding string
-}{
- // ISO-8859-1 tests
- {"key = value", "key = value\n", "ISO-8859-1"},
- {"#\nkey = value", "key = value\n", "ISO-8859-1"},
- {"#\n#\n#\nkey = value", "key = value\n", "ISO-8859-1"},
- {"# comment\nkey = value", "# comment\nkey = value\n", "ISO-8859-1"},
- {"\n# comment\nkey = value", "# comment\nkey = value\n", "ISO-8859-1"},
- {"# comment\n\nkey = value", "# comment\nkey = value\n", "ISO-8859-1"},
- {"# comment1\n# comment2\nkey = value", "# comment1\n# comment2\nkey = value\n", "ISO-8859-1"},
- {"#comment1\nkey1 = value1\n#comment2\nkey2 = value2", "# comment1\nkey1 = value1\n\n# comment2\nkey2 = value2\n", "ISO-8859-1"},
-
- // UTF-8 tests
- {"key = value", "key = value\n", "UTF-8"},
- {"# comment⌘\nkey = value⌘", "# comment⌘\nkey = value⌘\n", "UTF-8"},
- {"\n# comment⌘\nkey = value⌘", "# comment⌘\nkey = value⌘\n", "UTF-8"},
- {"# comment⌘\n\nkey = value⌘", "# comment⌘\nkey = value⌘\n", "UTF-8"},
- {"# comment1⌘\n# comment2⌘\nkey = value⌘", "# comment1⌘\n# comment2⌘\nkey = value⌘\n", "UTF-8"},
- {"#comment1⌘\nkey1 = value1⌘\n#comment2⌘\nkey2 = value2⌘", "# comment1⌘\nkey1 = value1⌘\n\n# comment2⌘\nkey2 = value2⌘\n", "UTF-8"},
-}
-
-// ----------------------------------------------------------------------------
-
-var boolTests = []struct {
- input, key string
- def, value bool
-}{
- // valid values for TRUE
- {"key = 1", "key", false, true},
- {"key = on", "key", false, true},
- {"key = On", "key", false, true},
- {"key = ON", "key", false, true},
- {"key = true", "key", false, true},
- {"key = True", "key", false, true},
- {"key = TRUE", "key", false, true},
- {"key = yes", "key", false, true},
- {"key = Yes", "key", false, true},
- {"key = YES", "key", false, true},
-
- // valid values for FALSE (all other)
- {"key = 0", "key", true, false},
- {"key = off", "key", true, false},
- {"key = false", "key", true, false},
- {"key = no", "key", true, false},
-
- // non existent key
- {"key = true", "key2", false, false},
-}
-
-// ----------------------------------------------------------------------------
-
-var durationTests = []struct {
- input, key string
- def, value time.Duration
-}{
- // valid values
- {"key = 1", "key", 999, 1},
- {"key = 0", "key", 999, 0},
- {"key = -1", "key", 999, -1},
- {"key = 0123", "key", 999, 123},
-
- // invalid values
- {"key = 0xff", "key", 999, 999},
- {"key = 1.0", "key", 999, 999},
- {"key = a", "key", 999, 999},
-
- // non existent key
- {"key = 1", "key2", 999, 999},
-}
-
-// ----------------------------------------------------------------------------
-
-var parsedDurationTests = []struct {
- input, key string
- def, value time.Duration
-}{
- // valid values
- {"key = -1ns", "key", 999, -1 * time.Nanosecond},
- {"key = 300ms", "key", 999, 300 * time.Millisecond},
- {"key = 5s", "key", 999, 5 * time.Second},
- {"key = 3h", "key", 999, 3 * time.Hour},
- {"key = 2h45m", "key", 999, 2*time.Hour + 45*time.Minute},
-
- // invalid values
- {"key = 0xff", "key", 999, 999},
- {"key = 1.0", "key", 999, 999},
- {"key = a", "key", 999, 999},
- {"key = 1", "key", 999, 999},
- {"key = 0", "key", 999, 0},
-
- // non existent key
- {"key = 1", "key2", 999, 999},
-}
-
-// ----------------------------------------------------------------------------
-
-var floatTests = []struct {
- input, key string
- def, value float64
-}{
- // valid values
- {"key = 1.0", "key", 999, 1.0},
- {"key = 0.0", "key", 999, 0.0},
- {"key = -1.0", "key", 999, -1.0},
- {"key = 1", "key", 999, 1},
- {"key = 0", "key", 999, 0},
- {"key = -1", "key", 999, -1},
- {"key = 0123", "key", 999, 123},
-
- // invalid values
- {"key = 0xff", "key", 999, 999},
- {"key = a", "key", 999, 999},
-
- // non existent key
- {"key = 1", "key2", 999, 999},
-}
-
-// ----------------------------------------------------------------------------
-
-var int64Tests = []struct {
- input, key string
- def, value int64
-}{
- // valid values
- {"key = 1", "key", 999, 1},
- {"key = 0", "key", 999, 0},
- {"key = -1", "key", 999, -1},
- {"key = 0123", "key", 999, 123},
-
- // invalid values
- {"key = 0xff", "key", 999, 999},
- {"key = 1.0", "key", 999, 999},
- {"key = a", "key", 999, 999},
-
- // non existent key
- {"key = 1", "key2", 999, 999},
-}
-
-// ----------------------------------------------------------------------------
-
-var uint64Tests = []struct {
- input, key string
- def, value uint64
-}{
- // valid values
- {"key = 1", "key", 999, 1},
- {"key = 0", "key", 999, 0},
- {"key = 0123", "key", 999, 123},
-
- // invalid values
- {"key = -1", "key", 999, 999},
- {"key = 0xff", "key", 999, 999},
- {"key = 1.0", "key", 999, 999},
- {"key = a", "key", 999, 999},
-
- // non existent key
- {"key = 1", "key2", 999, 999},
-}
-
-// ----------------------------------------------------------------------------
-
-var stringTests = []struct {
- input, key string
- def, value string
-}{
- // valid values
- {"key = abc", "key", "def", "abc"},
-
- // non existent key
- {"key = abc", "key2", "def", "def"},
-}
-
-// ----------------------------------------------------------------------------
-
-var keysTests = []struct {
- input string
- keys []string
-}{
- {"", []string{}},
- {"key = abc", []string{"key"}},
- {"key = abc\nkey2=def", []string{"key", "key2"}},
- {"key2 = abc\nkey=def", []string{"key2", "key"}},
- {"key = abc\nkey=def", []string{"key"}},
-}
-
-// ----------------------------------------------------------------------------
-
-var filterTests = []struct {
- input string
- pattern string
- keys []string
- err string
-}{
- {"", "", []string{}, ""},
- {"", "abc", []string{}, ""},
- {"key=value", "", []string{"key"}, ""},
- {"key=value", "key=", []string{}, ""},
- {"key=value\nfoo=bar", "", []string{"foo", "key"}, ""},
- {"key=value\nfoo=bar", "f", []string{"foo"}, ""},
- {"key=value\nfoo=bar", "fo", []string{"foo"}, ""},
- {"key=value\nfoo=bar", "foo", []string{"foo"}, ""},
- {"key=value\nfoo=bar", "fooo", []string{}, ""},
- {"key=value\nkey2=value2\nfoo=bar", "ey", []string{"key", "key2"}, ""},
- {"key=value\nkey2=value2\nfoo=bar", "key", []string{"key", "key2"}, ""},
- {"key=value\nkey2=value2\nfoo=bar", "^key", []string{"key", "key2"}, ""},
- {"key=value\nkey2=value2\nfoo=bar", "^(key|foo)", []string{"foo", "key", "key2"}, ""},
- {"key=value\nkey2=value2\nfoo=bar", "[ abc", nil, "error parsing regexp.*"},
-}
-
-// ----------------------------------------------------------------------------
-
-var filterPrefixTests = []struct {
- input string
- prefix string
- keys []string
-}{
- {"", "", []string{}},
- {"", "abc", []string{}},
- {"key=value", "", []string{"key"}},
- {"key=value", "key=", []string{}},
- {"key=value\nfoo=bar", "", []string{"foo", "key"}},
- {"key=value\nfoo=bar", "f", []string{"foo"}},
- {"key=value\nfoo=bar", "fo", []string{"foo"}},
- {"key=value\nfoo=bar", "foo", []string{"foo"}},
- {"key=value\nfoo=bar", "fooo", []string{}},
- {"key=value\nkey2=value2\nfoo=bar", "key", []string{"key", "key2"}},
-}
-
-// ----------------------------------------------------------------------------
-
-var filterStripPrefixTests = []struct {
- input string
- prefix string
- keys []string
-}{
- {"", "", []string{}},
- {"", "abc", []string{}},
- {"key=value", "", []string{"key"}},
- {"key=value", "key=", []string{}},
- {"key=value\nfoo=bar", "", []string{"foo", "key"}},
- {"key=value\nfoo=bar", "f", []string{"foo"}},
- {"key=value\nfoo=bar", "fo", []string{"foo"}},
- {"key=value\nfoo=bar", "foo", []string{"foo"}},
- {"key=value\nfoo=bar", "fooo", []string{}},
- {"key=value\nkey2=value2\nfoo=bar", "key", []string{"key", "key2"}},
-}
-
-// ----------------------------------------------------------------------------
-
-var setTests = []struct {
- input string
- key, value string
- prev string
- ok bool
- err string
- keys []string
-}{
- {"", "", "", "", false, "", []string{}},
- {"", "key", "value", "", false, "", []string{"key"}},
- {"key=value", "key2", "value2", "", false, "", []string{"key", "key2"}},
- {"key=value", "abc", "value3", "", false, "", []string{"key", "abc"}},
- {"key=value", "key", "value3", "value", true, "", []string{"key"}},
-}
-
-// ----------------------------------------------------------------------------
-
-// TestBasic tests basic single key/value combinations with all possible
-// whitespace, delimiter and newline permutations.
-func TestBasic(t *testing.T) {
- testWhitespaceAndDelimiterCombinations(t, "key", "")
- testWhitespaceAndDelimiterCombinations(t, "key", "value")
- testWhitespaceAndDelimiterCombinations(t, "key", "value ")
-}
-
-func TestComplex(t *testing.T) {
- for _, test := range complexTests {
- testKeyValue(t, test[0], test[1:]...)
- }
-}
-
-func TestErrors(t *testing.T) {
- for _, test := range errorTests {
- _, err := Load([]byte(test.input), ISO_8859_1)
- assert.Equal(t, err != nil, true, "want error")
- assert.Equal(t, strings.Contains(err.Error(), test.msg), true)
- }
-}
-
-func TestVeryDeep(t *testing.T) {
- input := "key0=value\n"
- prefix := "${"
- postfix := "}"
- i := 0
- for i = 0; i < maxExpansionDepth-1; i++ {
- input += fmt.Sprintf("key%d=%skey%d%s\n", i+1, prefix, i, postfix)
- }
-
- p, err := Load([]byte(input), ISO_8859_1)
- assert.Equal(t, err, nil)
- p.Prefix = prefix
- p.Postfix = postfix
-
- assert.Equal(t, p.MustGet(fmt.Sprintf("key%d", i)), "value")
-
- // Nudge input over the edge
- input += fmt.Sprintf("key%d=%skey%d%s\n", i+1, prefix, i, postfix)
-
- _, err = Load([]byte(input), ISO_8859_1)
- assert.Equal(t, err != nil, true, "want error")
- assert.Equal(t, strings.Contains(err.Error(), "expansion too deep"), true)
-}
-
-func TestDisableExpansion(t *testing.T) {
- input := "key=value\nkey2=${key}"
- p := mustParse(t, input)
- p.DisableExpansion = true
- assert.Equal(t, p.MustGet("key"), "value")
- assert.Equal(t, p.MustGet("key2"), "${key}")
-
- // with expansion disabled we can introduce circular references
- p.MustSet("keyA", "${keyB}")
- p.MustSet("keyB", "${keyA}")
- assert.Equal(t, p.MustGet("keyA"), "${keyB}")
- assert.Equal(t, p.MustGet("keyB"), "${keyA}")
-}
-
-func TestDisableExpansionStillUpdatesKeys(t *testing.T) {
- p := NewProperties()
- p.MustSet("p1", "a")
- assert.Equal(t, p.Keys(), []string{"p1"})
- assert.Equal(t, p.String(), "p1 = a\n")
-
- p.DisableExpansion = true
- p.MustSet("p2", "b")
-
- assert.Equal(t, p.Keys(), []string{"p1", "p2"})
- assert.Equal(t, p.String(), "p1 = a\np2 = b\n")
-}
-
-func TestMustGet(t *testing.T) {
- input := "key = value\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGet("key"), "value")
- assert.Panic(t, func() { p.MustGet("invalid") }, "unknown property: invalid")
-}
-
-func TestGetBool(t *testing.T) {
- for _, test := range boolTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetBool(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetBool(t *testing.T) {
- input := "key = true\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetBool("key"), true)
- assert.Panic(t, func() { p.MustGetBool("invalid") }, "unknown property: invalid")
-}
-
-func TestGetDuration(t *testing.T) {
- for _, test := range durationTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetDuration(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetDuration(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetDuration("key"), time.Duration(123))
- assert.Panic(t, func() { p.MustGetDuration("key2") }, "strconv.ParseInt: parsing.*")
- assert.Panic(t, func() { p.MustGetDuration("invalid") }, "unknown property: invalid")
-}
-
-func TestGetParsedDuration(t *testing.T) {
- for _, test := range parsedDurationTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetParsedDuration(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetParsedDuration(t *testing.T) {
- input := "key = 123ms\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetParsedDuration("key"), 123*time.Millisecond)
- assert.Panic(t, func() { p.MustGetParsedDuration("key2") }, "time: invalid duration ghi")
- assert.Panic(t, func() { p.MustGetParsedDuration("invalid") }, "unknown property: invalid")
-}
-
-func TestGetFloat64(t *testing.T) {
- for _, test := range floatTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetFloat64(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetFloat64(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetFloat64("key"), float64(123))
- assert.Panic(t, func() { p.MustGetFloat64("key2") }, "strconv.ParseFloat: parsing.*")
- assert.Panic(t, func() { p.MustGetFloat64("invalid") }, "unknown property: invalid")
-}
-
-func TestGetInt(t *testing.T) {
- for _, test := range int64Tests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetInt(test.key, int(test.def)), int(test.value))
- }
-}
-
-func TestMustGetInt(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetInt("key"), int(123))
- assert.Panic(t, func() { p.MustGetInt("key2") }, "strconv.ParseInt: parsing.*")
- assert.Panic(t, func() { p.MustGetInt("invalid") }, "unknown property: invalid")
-}
-
-func TestGetInt64(t *testing.T) {
- for _, test := range int64Tests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetInt64(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetInt64(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetInt64("key"), int64(123))
- assert.Panic(t, func() { p.MustGetInt64("key2") }, "strconv.ParseInt: parsing.*")
- assert.Panic(t, func() { p.MustGetInt64("invalid") }, "unknown property: invalid")
-}
-
-func TestGetUint(t *testing.T) {
- for _, test := range uint64Tests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetUint(test.key, uint(test.def)), uint(test.value))
- }
-}
-
-func TestMustGetUint(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetUint("key"), uint(123))
- assert.Panic(t, func() { p.MustGetUint64("key2") }, "strconv.ParseUint: parsing.*")
- assert.Panic(t, func() { p.MustGetUint64("invalid") }, "unknown property: invalid")
-}
-
-func TestGetUint64(t *testing.T) {
- for _, test := range uint64Tests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetUint64(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetUint64(t *testing.T) {
- input := "key = 123\nkey2 = ghi"
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetUint64("key"), uint64(123))
- assert.Panic(t, func() { p.MustGetUint64("key2") }, "strconv.ParseUint: parsing.*")
- assert.Panic(t, func() { p.MustGetUint64("invalid") }, "unknown property: invalid")
-}
-
-func TestGetString(t *testing.T) {
- for _, test := range stringTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), 1)
- assert.Equal(t, p.GetString(test.key, test.def), test.value)
- }
-}
-
-func TestMustGetString(t *testing.T) {
- input := `key = value`
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetString("key"), "value")
- assert.Panic(t, func() { p.MustGetString("invalid") }, "unknown property: invalid")
-}
-
-func TestComment(t *testing.T) {
- for _, test := range commentTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.MustGetString(test.key), test.value)
- assert.Equal(t, p.GetComments(test.key), test.comments)
- if test.comments != nil {
- assert.Equal(t, p.GetComment(test.key), test.comments[len(test.comments)-1])
- } else {
- assert.Equal(t, p.GetComment(test.key), "")
- }
-
- // test setting comments
- if len(test.comments) > 0 {
- // set single comment
- p.ClearComments()
- assert.Equal(t, len(p.c), 0)
- p.SetComment(test.key, test.comments[0])
- assert.Equal(t, p.GetComment(test.key), test.comments[0])
-
- // set multiple comments
- p.ClearComments()
- assert.Equal(t, len(p.c), 0)
- p.SetComments(test.key, test.comments)
- assert.Equal(t, p.GetComments(test.key), test.comments)
-
- // clear comments for a key
- p.SetComments(test.key, nil)
- assert.Equal(t, p.GetComment(test.key), "")
- assert.Equal(t, p.GetComments(test.key), ([]string)(nil))
- }
- }
-}
-
-func TestFilter(t *testing.T) {
- for _, test := range filterTests {
- p := mustParse(t, test.input)
- pp, err := p.Filter(test.pattern)
- if err != nil {
- assert.Matches(t, err.Error(), test.err)
- continue
- }
- assert.Equal(t, pp != nil, true, "want properties")
- assert.Equal(t, pp.Len(), len(test.keys))
- for _, key := range test.keys {
- v1, ok1 := p.Get(key)
- v2, ok2 := pp.Get(key)
- assert.Equal(t, ok1, true)
- assert.Equal(t, ok2, true)
- assert.Equal(t, v1, v2)
- }
- }
-}
-
-func TestFilterPrefix(t *testing.T) {
- for _, test := range filterPrefixTests {
- p := mustParse(t, test.input)
- pp := p.FilterPrefix(test.prefix)
- assert.Equal(t, pp != nil, true, "want properties")
- assert.Equal(t, pp.Len(), len(test.keys))
- for _, key := range test.keys {
- v1, ok1 := p.Get(key)
- v2, ok2 := pp.Get(key)
- assert.Equal(t, ok1, true)
- assert.Equal(t, ok2, true)
- assert.Equal(t, v1, v2)
- }
- }
-}
-
-func TestFilterStripPrefix(t *testing.T) {
- for _, test := range filterStripPrefixTests {
- p := mustParse(t, test.input)
- pp := p.FilterPrefix(test.prefix)
- assert.Equal(t, pp != nil, true, "want properties")
- assert.Equal(t, pp.Len(), len(test.keys))
- for _, key := range test.keys {
- v1, ok1 := p.Get(key)
- v2, ok2 := pp.Get(key)
- assert.Equal(t, ok1, true)
- assert.Equal(t, ok2, true)
- assert.Equal(t, v1, v2)
- }
- }
-}
-
-func TestKeys(t *testing.T) {
- for _, test := range keysTests {
- p := mustParse(t, test.input)
- assert.Equal(t, p.Len(), len(test.keys))
- assert.Equal(t, len(p.Keys()), len(test.keys))
- assert.Equal(t, p.Keys(), test.keys)
- }
-}
-
-func TestSet(t *testing.T) {
- for _, test := range setTests {
- p := mustParse(t, test.input)
- prev, ok, err := p.Set(test.key, test.value)
- if test.err != "" {
- assert.Matches(t, err.Error(), test.err)
- continue
- }
-
- assert.Equal(t, err, nil)
- assert.Equal(t, ok, test.ok)
- if ok {
- assert.Equal(t, prev, test.prev)
- }
- assert.Equal(t, p.Keys(), test.keys)
- }
-}
-
-func TestSetValue(t *testing.T) {
- tests := []interface{}{
- true, false,
- int8(123), int16(123), int32(123), int64(123), int(123),
- uint8(123), uint16(123), uint32(123), uint64(123), uint(123),
- float32(1.23), float64(1.23),
- "abc",
- }
-
- for _, v := range tests {
- p := NewProperties()
- err := p.SetValue("x", v)
- assert.Equal(t, err, nil)
- assert.Equal(t, p.GetString("x", ""), fmt.Sprintf("%v", v))
- }
-}
-
-func TestMustSet(t *testing.T) {
- input := "key=${key}"
- p := mustParse(t, input)
- assert.Panic(t, func() { p.MustSet("key", "${key}") }, "circular reference .*")
-}
-
-func TestWrite(t *testing.T) {
- for _, test := range writeTests {
- p, err := parse(test.input)
-
- buf := new(bytes.Buffer)
- var n int
- switch test.encoding {
- case "UTF-8":
- n, err = p.Write(buf, UTF8)
- case "ISO-8859-1":
- n, err = p.Write(buf, ISO_8859_1)
- }
- assert.Equal(t, err, nil)
- s := string(buf.Bytes())
- assert.Equal(t, n, len(test.output), fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
- assert.Equal(t, s, test.output, fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
- }
-}
-
-func TestWriteComment(t *testing.T) {
- for _, test := range writeCommentTests {
- p, err := parse(test.input)
-
- buf := new(bytes.Buffer)
- var n int
- switch test.encoding {
- case "UTF-8":
- n, err = p.WriteComment(buf, "# ", UTF8)
- case "ISO-8859-1":
- n, err = p.WriteComment(buf, "# ", ISO_8859_1)
- }
- assert.Equal(t, err, nil)
- s := string(buf.Bytes())
- assert.Equal(t, n, len(test.output), fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
- assert.Equal(t, s, test.output, fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
- }
-}
-
-func TestCustomExpansionExpression(t *testing.T) {
- testKeyValuePrePostfix(t, "*[", "]*", "key=value\nkey2=*[key]*", "key", "value", "key2", "value")
-}
-
-func TestPanicOn32BitIntOverflow(t *testing.T) {
- is32Bit = true
- var min, max int64 = math.MinInt32 - 1, math.MaxInt32 + 1
- input := fmt.Sprintf("min=%d\nmax=%d", min, max)
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetInt64("min"), min)
- assert.Equal(t, p.MustGetInt64("max"), max)
- assert.Panic(t, func() { p.MustGetInt("min") }, ".* out of range")
- assert.Panic(t, func() { p.MustGetInt("max") }, ".* out of range")
-}
-
-func TestPanicOn32BitUintOverflow(t *testing.T) {
- is32Bit = true
- var max uint64 = math.MaxUint32 + 1
- input := fmt.Sprintf("max=%d", max)
- p := mustParse(t, input)
- assert.Equal(t, p.MustGetUint64("max"), max)
- assert.Panic(t, func() { p.MustGetUint("max") }, ".* out of range")
-}
-
-func TestDeleteKey(t *testing.T) {
- input := "#comments should also be gone\nkey=to-be-deleted\nsecond=key"
- p := mustParse(t, input)
- assert.Equal(t, len(p.m), 2)
- assert.Equal(t, len(p.c), 1)
- assert.Equal(t, len(p.k), 2)
- p.Delete("key")
- assert.Equal(t, len(p.m), 1)
- assert.Equal(t, len(p.c), 0)
- assert.Equal(t, len(p.k), 1)
- assert.Equal(t, p.k[0], "second")
- assert.Equal(t, p.m["second"], "key")
-}
-
-func TestDeleteUnknownKey(t *testing.T) {
- input := "#comments should also be gone\nkey=to-be-deleted"
- p := mustParse(t, input)
- assert.Equal(t, len(p.m), 1)
- assert.Equal(t, len(p.c), 1)
- assert.Equal(t, len(p.k), 1)
- p.Delete("wrong-key")
- assert.Equal(t, len(p.m), 1)
- assert.Equal(t, len(p.c), 1)
- assert.Equal(t, len(p.k), 1)
-}
-
-func TestMerge(t *testing.T) {
- input1 := "#comment\nkey=value\nkey2=value2"
- input2 := "#another comment\nkey=another value\nkey3=value3"
- p1 := mustParse(t, input1)
- p2 := mustParse(t, input2)
- p1.Merge(p2)
- assert.Equal(t, len(p1.m), 3)
- assert.Equal(t, len(p1.c), 1)
- assert.Equal(t, len(p1.k), 3)
- assert.Equal(t, p1.MustGet("key"), "another value")
- assert.Equal(t, p1.GetComment("key"), "another comment")
-}
-
-func TestMap(t *testing.T) {
- input := "key=value\nabc=def"
- p := mustParse(t, input)
- m := map[string]string{"key": "value", "abc": "def"}
- assert.Equal(t, p.Map(), m)
-}
-
-func TestFilterFunc(t *testing.T) {
- input := "key=value\nabc=def"
- p := mustParse(t, input)
- pp := p.FilterFunc(func(k, v string) bool {
- return k != "abc"
- })
- m := map[string]string{"key": "value"}
- assert.Equal(t, pp.Map(), m)
-}
-
-// ----------------------------------------------------------------------------
-
-// tests all combinations of delimiters, leading and/or trailing whitespace and newlines.
-func testWhitespaceAndDelimiterCombinations(t *testing.T, key, value string) {
- whitespace := []string{"", " ", "\f", "\t"}
- delimiters := []string{"", " ", "=", ":"}
- newlines := []string{"", "\r", "\n", "\r\n"}
- for _, dl := range delimiters {
- for _, ws1 := range whitespace {
- for _, ws2 := range whitespace {
- for _, nl := range newlines {
- // skip the one case where there is nothing between a key and a value
- if ws1 == "" && dl == "" && ws2 == "" && value != "" {
- continue
- }
-
- input := fmt.Sprintf("%s%s%s%s%s%s", key, ws1, dl, ws2, value, nl)
- testKeyValue(t, input, key, value)
- }
- }
- }
- }
-}
-
-// tests whether key/value pairs exist for a given input.
-// keyvalues is expected to be an even number of strings of "key", "value", ...
-func testKeyValue(t *testing.T, input string, keyvalues ...string) {
- testKeyValuePrePostfix(t, "${", "}", input, keyvalues...)
-}
-
-// tests whether key/value pairs exist for a given input.
-// keyvalues is expected to be an even number of strings of "key", "value", ...
-func testKeyValuePrePostfix(t *testing.T, prefix, postfix, input string, keyvalues ...string) {
- p, err := Load([]byte(input), ISO_8859_1)
- assert.Equal(t, err, nil)
- p.Prefix = prefix
- p.Postfix = postfix
- assertKeyValues(t, input, p, keyvalues...)
-}
-
-// tests whether key/value pairs exist for a given input.
-// keyvalues is expected to be an even number of strings of "key", "value", ...
-func assertKeyValues(t *testing.T, input string, p *Properties, keyvalues ...string) {
- assert.Equal(t, p != nil, true, "want properties")
- assert.Equal(t, 2*p.Len(), len(keyvalues), "Odd number of key/value pairs.")
-
- for i := 0; i < len(keyvalues); i += 2 {
- key, value := keyvalues[i], keyvalues[i+1]
- v, ok := p.Get(key)
- if !ok {
- t.Errorf("No key %q found (input=%q)", key, input)
- }
- if got, want := v, value; !reflect.DeepEqual(got, want) {
- t.Errorf("Value %q does not match %q (input=%q)", v, value, input)
- }
- }
-}
-
-func mustParse(t *testing.T, s string) *Properties {
- p, err := parse(s)
- if err != nil {
- t.Fatalf("parse failed with %s", err)
- }
- return p
-}
-
-// prints to stderr if the -verbose flag was given.
-func printf(format string, args ...interface{}) {
- if *verbose {
- fmt.Fprintf(os.Stderr, format, args...)
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/Makefile b/vendor/github.com/mailru/easyjson/Makefile
index f877ab269..49c80f3bd 100644
--- a/vendor/github.com/mailru/easyjson/Makefile
+++ b/vendor/github.com/mailru/easyjson/Makefile
@@ -23,7 +23,9 @@ generate: root build
.root/src/$(PKG)/tests/data.go \
.root/src/$(PKG)/tests/omitempty.go \
.root/src/$(PKG)/tests/nothing.go \
- .root/src/$(PKG)/tests/named_type.go
+ .root/src/$(PKG)/tests/named_type.go \
+ .root/src/$(PKG)/tests/custom_map_key_type.go \
+ .root/src/$(PKG)/tests/embedded_type.go
.root/bin/easyjson -all .root/src/$(PKG)/tests/data.go
.root/bin/easyjson -all .root/src/$(PKG)/tests/nothing.go
@@ -33,6 +35,8 @@ generate: root build
.root/bin/easyjson -build_tags=use_easyjson .root/src/$(PKG)/benchmark/data.go
.root/bin/easyjson .root/src/$(PKG)/tests/nested_easy.go
.root/bin/easyjson .root/src/$(PKG)/tests/named_type.go
+ .root/bin/easyjson .root/src/$(PKG)/tests/custom_map_key_type.go
+ .root/bin/easyjson .root/src/$(PKG)/tests/embedded_type.go
test: generate root
go test \
diff --git a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go b/vendor/github.com/mailru/easyjson/benchmark/codec_test.go
deleted file mode 100644
index 5c77072ee..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// +build use_codec
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/ugorji/go/codec"
-)
-
-func BenchmarkCodec_Unmarshal_M(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
- dec := codec.NewDecoderBytes(nil, h)
-
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- dec.ResetBytes(largeStructText)
- if err := dec.Decode(&s); err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkCodec_Unmarshal_S(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
- dec := codec.NewDecoderBytes(nil, h)
-
- b.SetBytes(int64(len(smallStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- dec.ResetBytes(smallStructText)
- if err := dec.Decode(&s); err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkCodec_Marshal_S(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var out []byte
-
- var h codec.Handle = new(codec.JsonHandle)
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var out []byte
-
- var h codec.Handle = new(codec.JsonHandle)
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data.go b/vendor/github.com/mailru/easyjson/benchmark/data.go
deleted file mode 100644
index 71eb91a94..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Package benchmark provides a simple benchmark for easyjson against default serialization and ffjson.
-// The data example is taken from https://dev.twitter.com/rest/reference/get/search/tweets
-package benchmark
-
-import (
- "io/ioutil"
-)
-
-var largeStructText, _ = ioutil.ReadFile("example.json")
-var xlStructData XLStruct
-
-func init() {
- for i := 0; i < 50; i++ {
- xlStructData.Data = append(xlStructData.Data, largeStructData)
- }
-}
-
-var smallStructText = []byte(`{"hashtags":[{"indices":[5, 10],"text":"some-text"}],"urls":[],"user_mentions":[]}`)
-var smallStructData = Entities{
- Hashtags: []Hashtag{{Indices: []int{5, 10}, Text: "some-text"}},
- Urls: []*string{},
- UserMentions: []*string{},
-}
-
-type SearchMetadata struct {
- CompletedIn float64 `json:"completed_in"`
- Count int `json:"count"`
- MaxID int64 `json:"max_id"`
- MaxIDStr string `json:"max_id_str"`
- NextResults string `json:"next_results"`
- Query string `json:"query"`
- RefreshURL string `json:"refresh_url"`
- SinceID int64 `json:"since_id"`
- SinceIDStr string `json:"since_id_str"`
-}
-
-type Hashtag struct {
- Indices []int `json:"indices"`
- Text string `json:"text"`
-}
-
-//easyjson:json
-type Entities struct {
- Hashtags []Hashtag `json:"hashtags"`
- Urls []*string `json:"urls"`
- UserMentions []*string `json:"user_mentions"`
-}
-
-type UserEntityDescription struct {
- Urls []*string `json:"urls"`
-}
-
-type URL struct {
- ExpandedURL *string `json:"expanded_url"`
- Indices []int `json:"indices"`
- URL string `json:"url"`
-}
-
-type UserEntityURL struct {
- Urls []URL `json:"urls"`
-}
-
-type UserEntities struct {
- Description UserEntityDescription `json:"description"`
- URL UserEntityURL `json:"url"`
-}
-
-type User struct {
- ContributorsEnabled bool `json:"contributors_enabled"`
- CreatedAt string `json:"created_at"`
- DefaultProfile bool `json:"default_profile"`
- DefaultProfileImage bool `json:"default_profile_image"`
- Description string `json:"description"`
- Entities UserEntities `json:"entities"`
- FavouritesCount int `json:"favourites_count"`
- FollowRequestSent *string `json:"follow_request_sent"`
- FollowersCount int `json:"followers_count"`
- Following *string `json:"following"`
- FriendsCount int `json:"friends_count"`
- GeoEnabled bool `json:"geo_enabled"`
- ID int `json:"id"`
- IDStr string `json:"id_str"`
- IsTranslator bool `json:"is_translator"`
- Lang string `json:"lang"`
- ListedCount int `json:"listed_count"`
- Location string `json:"location"`
- Name string `json:"name"`
- Notifications *string `json:"notifications"`
- ProfileBackgroundColor string `json:"profile_background_color"`
- ProfileBackgroundImageURL string `json:"profile_background_image_url"`
- ProfileBackgroundImageURLHTTPS string `json:"profile_background_image_url_https"`
- ProfileBackgroundTile bool `json:"profile_background_tile"`
- ProfileImageURL string `json:"profile_image_url"`
- ProfileImageURLHTTPS string `json:"profile_image_url_https"`
- ProfileLinkColor string `json:"profile_link_color"`
- ProfileSidebarBorderColor string `json:"profile_sidebar_border_color"`
- ProfileSidebarFillColor string `json:"profile_sidebar_fill_color"`
- ProfileTextColor string `json:"profile_text_color"`
- ProfileUseBackgroundImage bool `json:"profile_use_background_image"`
- Protected bool `json:"protected"`
- ScreenName string `json:"screen_name"`
- ShowAllInlineMedia bool `json:"show_all_inline_media"`
- StatusesCount int `json:"statuses_count"`
- TimeZone string `json:"time_zone"`
- URL *string `json:"url"`
- UtcOffset int `json:"utc_offset"`
- Verified bool `json:"verified"`
-}
-
-type StatusMetadata struct {
- IsoLanguageCode string `json:"iso_language_code"`
- ResultType string `json:"result_type"`
-}
-
-type Status struct {
- Contributors *string `json:"contributors"`
- Coordinates *string `json:"coordinates"`
- CreatedAt string `json:"created_at"`
- Entities Entities `json:"entities"`
- Favorited bool `json:"favorited"`
- Geo *string `json:"geo"`
- ID int64 `json:"id"`
- IDStr string `json:"id_str"`
- InReplyToScreenName *string `json:"in_reply_to_screen_name"`
- InReplyToStatusID *string `json:"in_reply_to_status_id"`
- InReplyToStatusIDStr *string `json:"in_reply_to_status_id_str"`
- InReplyToUserID *string `json:"in_reply_to_user_id"`
- InReplyToUserIDStr *string `json:"in_reply_to_user_id_str"`
- Metadata StatusMetadata `json:"metadata"`
- Place *string `json:"place"`
- RetweetCount int `json:"retweet_count"`
- Retweeted bool `json:"retweeted"`
- Source string `json:"source"`
- Text string `json:"text"`
- Truncated bool `json:"truncated"`
- User User `json:"user"`
-}
-
-//easyjson:json
-type LargeStruct struct {
- SearchMetadata SearchMetadata `json:"search_metadata"`
- Statuses []Status `json:"statuses"`
-}
-
-//easyjson:json
-type XLStruct struct {
- Data []LargeStruct
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go b/vendor/github.com/mailru/easyjson/benchmark/data_codec.go
deleted file mode 100644
index d2d83fac6..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go
+++ /dev/null
@@ -1,6914 +0,0 @@
-//+build use_codec
-//+build !easyjson_nounsafe
-//+build !appengine
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package benchmark
-
-import (
- "errors"
- "fmt"
- "reflect"
- "runtime"
- "unsafe"
-
- codec1978 "github.com/ugorji/go/codec"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF89225 = 1
- codecSelferC_RAW9225 = 0
- // ----- value types used ----
- codecSelferValueTypeArray9225 = 10
- codecSelferValueTypeMap9225 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey9225 = 2
- codecSelfer_containerMapValue9225 = 3
- codecSelfer_containerMapEnd9225 = 4
- codecSelfer_containerArrayElem9225 = 6
- codecSelfer_containerArrayEnd9225 = 7
-)
-
-var (
- codecSelferBitsize9225 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr9225 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelferUnsafeString9225 struct {
- Data uintptr
- Len int
-}
-
-type codecSelfer9225 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 unsafe.Pointer
- _ = v0
- }
-}
-
-func (x *SearchMetadata) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [9]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(9)
- } else {
- yynn2 = 9
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeFloat64(float64(x.CompletedIn))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("completed_in"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeFloat64(float64(x.CompletedIn))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeInt(int64(x.Count))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeInt(int64(x.Count))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeInt(int64(x.MaxID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("max_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeInt(int64(x.MaxID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("max_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.NextResults))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("next_results"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.NextResults))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym19 := z.EncBinary()
- _ = yym19
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Query))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("query"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Query))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("refresh_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym25 := z.EncBinary()
- _ = yym25
- if false {
- } else {
- r.EncodeInt(int64(x.SinceID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("since_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeInt(int64(x.SinceID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("since_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym29 := z.EncBinary()
- _ = yym29
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *SearchMetadata) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *SearchMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "completed_in":
- if r.TryDecodeAsNil() {
- x.CompletedIn = 0
- } else {
- yyv4 := &x.CompletedIn
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*float64)(yyv4)) = float64(r.DecodeFloat(false))
- }
- }
- case "count":
- if r.TryDecodeAsNil() {
- x.Count = 0
- } else {
- yyv6 := &x.Count
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*int)(yyv6)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "max_id":
- if r.TryDecodeAsNil() {
- x.MaxID = 0
- } else {
- yyv8 := &x.MaxID
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*int)(yyv8)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "max_id_str":
- if r.TryDecodeAsNil() {
- x.MaxIDStr = ""
- } else {
- yyv10 := &x.MaxIDStr
- yym11 := z.DecBinary()
- _ = yym11
- if false {
- } else {
- *((*string)(yyv10)) = r.DecodeString()
- }
- }
- case "next_results":
- if r.TryDecodeAsNil() {
- x.NextResults = ""
- } else {
- yyv12 := &x.NextResults
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- *((*string)(yyv12)) = r.DecodeString()
- }
- }
- case "query":
- if r.TryDecodeAsNil() {
- x.Query = ""
- } else {
- yyv14 := &x.Query
- yym15 := z.DecBinary()
- _ = yym15
- if false {
- } else {
- *((*string)(yyv14)) = r.DecodeString()
- }
- }
- case "refresh_url":
- if r.TryDecodeAsNil() {
- x.RefreshURL = ""
- } else {
- yyv16 := &x.RefreshURL
- yym17 := z.DecBinary()
- _ = yym17
- if false {
- } else {
- *((*string)(yyv16)) = r.DecodeString()
- }
- }
- case "since_id":
- if r.TryDecodeAsNil() {
- x.SinceID = 0
- } else {
- yyv18 := &x.SinceID
- yym19 := z.DecBinary()
- _ = yym19
- if false {
- } else {
- *((*int)(yyv18)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "since_id_str":
- if r.TryDecodeAsNil() {
- x.SinceIDStr = ""
- } else {
- yyv20 := &x.SinceIDStr
- yym21 := z.DecBinary()
- _ = yym21
- if false {
- } else {
- *((*string)(yyv20)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *SearchMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj22 int
- var yyb22 bool
- var yyhl22 bool = l >= 0
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CompletedIn = 0
- } else {
- yyv23 := &x.CompletedIn
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*float64)(yyv23)) = float64(r.DecodeFloat(false))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Count = 0
- } else {
- yyv25 := &x.Count
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*int)(yyv25)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.MaxID = 0
- } else {
- yyv27 := &x.MaxID
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.MaxIDStr = ""
- } else {
- yyv29 := &x.MaxIDStr
- yym30 := z.DecBinary()
- _ = yym30
- if false {
- } else {
- *((*string)(yyv29)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.NextResults = ""
- } else {
- yyv31 := &x.NextResults
- yym32 := z.DecBinary()
- _ = yym32
- if false {
- } else {
- *((*string)(yyv31)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Query = ""
- } else {
- yyv33 := &x.Query
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else {
- *((*string)(yyv33)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.RefreshURL = ""
- } else {
- yyv35 := &x.RefreshURL
- yym36 := z.DecBinary()
- _ = yym36
- if false {
- } else {
- *((*string)(yyv35)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SinceID = 0
- } else {
- yyv37 := &x.SinceID
- yym38 := z.DecBinary()
- _ = yym38
- if false {
- } else {
- *((*int)(yyv37)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SinceIDStr = ""
- } else {
- yyv39 := &x.SinceIDStr
- yym40 := z.DecBinary()
- _ = yym40
- if false {
- } else {
- *((*string)(yyv39)) = r.DecodeString()
- }
- }
- for {
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj22-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Hashtag) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("indices"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("text"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Hashtag) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Hashtag) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "indices":
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv4 := &x.Indices
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- z.F.DecSliceIntX(yyv4, false, d)
- }
- }
- case "text":
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv6 := &x.Text
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Hashtag) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj8 int
- var yyb8 bool
- var yyhl8 bool = l >= 0
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv9 := &x.Indices
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- z.F.DecSliceIntX(yyv9, false, d)
- }
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv11 := &x.Text
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(yyv11)) = r.DecodeString()
- }
- }
- for {
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj8-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Entities) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [3]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(3)
- } else {
- yynn2 = 3
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Hashtags == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceHashtag(([]Hashtag)(x.Hashtags), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("hashtags"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Hashtags == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceHashtag(([]Hashtag)(x.Hashtags), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.UserMentions == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.UserMentions), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("user_mentions"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.UserMentions == nil {
- r.EncodeNil()
- } else {
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.UserMentions), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Entities) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Entities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "hashtags":
- if r.TryDecodeAsNil() {
- x.Hashtags = nil
- } else {
- yyv4 := &x.Hashtags
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceHashtag((*[]Hashtag)(yyv4), d)
- }
- }
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv6 := &x.Urls
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv6), d)
- }
- }
- case "user_mentions":
- if r.TryDecodeAsNil() {
- x.UserMentions = nil
- } else {
- yyv8 := &x.UserMentions
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv8), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Entities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Hashtags = nil
- } else {
- yyv11 := &x.Hashtags
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- h.decSliceHashtag((*[]Hashtag)(yyv11), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv13 := &x.Urls
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.UserMentions = nil
- } else {
- yyv15 := &x.UserMentions
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv15), d)
- }
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntityDescription) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntityDescription) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntityDescription) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv4 := &x.Urls
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntityDescription) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv7 := &x.Urls
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *URL) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [3]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(3)
- } else {
- yynn2 = 3
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.ExpandedURL == nil {
- r.EncodeNil()
- } else {
- yy4 := *x.ExpandedURL
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy4))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("expanded_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.ExpandedURL == nil {
- r.EncodeNil()
- } else {
- yy6 := *x.ExpandedURL
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy6))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("indices"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.URL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.URL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *URL) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *URL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "expanded_url":
- if r.TryDecodeAsNil() {
- if x.ExpandedURL != nil {
- x.ExpandedURL = nil
- }
- } else {
- if x.ExpandedURL == nil {
- x.ExpandedURL = new(string)
- }
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(x.ExpandedURL)) = r.DecodeString()
- }
- }
- case "indices":
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv6 := &x.Indices
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- z.F.DecSliceIntX(yyv6, false, d)
- }
- }
- case "url":
- if r.TryDecodeAsNil() {
- x.URL = ""
- } else {
- yyv8 := &x.URL
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*string)(yyv8)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *URL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.ExpandedURL != nil {
- x.ExpandedURL = nil
- }
- } else {
- if x.ExpandedURL == nil {
- x.ExpandedURL = new(string)
- }
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(x.ExpandedURL)) = r.DecodeString()
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv13 := &x.Indices
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- z.F.DecSliceIntX(yyv13, false, d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.URL = ""
- } else {
- yyv15 := &x.URL
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*string)(yyv15)) = r.DecodeString()
- }
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntityURL) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceURL(([]URL)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceURL(([]URL)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntityURL) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntityURL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv4 := &x.Urls
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceURL((*[]URL)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntityURL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv7 := &x.Urls
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSliceURL((*[]URL)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntities) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy4 := &x.Description
- yy4.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("description"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy6 := &x.Description
- yy6.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy9 := &x.URL
- yy9.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy11 := &x.URL
- yy11.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntities) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "description":
- if r.TryDecodeAsNil() {
- x.Description = UserEntityDescription{}
- } else {
- yyv4 := &x.Description
- yyv4.CodecDecodeSelf(d)
- }
- case "url":
- if r.TryDecodeAsNil() {
- x.URL = UserEntityURL{}
- } else {
- yyv5 := &x.URL
- yyv5.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Description = UserEntityDescription{}
- } else {
- yyv7 := &x.Description
- yyv7.CodecDecodeSelf(d)
- }
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.URL = UserEntityURL{}
- } else {
- yyv8 := &x.URL
- yyv8.CodecDecodeSelf(d)
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *User) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [39]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(39)
- } else {
- yynn2 = 39
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeBool(bool(x.ContributorsEnabled))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("contributors_enabled"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeBool(bool(x.ContributorsEnabled))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("created_at"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("default_profile"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfile))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfileImage))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("default_profile_image"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfileImage))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Description))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("description"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Description))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy19 := &x.Entities
- yy19.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("entities"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy21 := &x.Entities
- yy21.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym24 := z.EncBinary()
- _ = yym24
- if false {
- } else {
- r.EncodeInt(int64(x.FavouritesCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("favourites_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym25 := z.EncBinary()
- _ = yym25
- if false {
- } else {
- r.EncodeInt(int64(x.FavouritesCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.FollowRequestSent == nil {
- r.EncodeNil()
- } else {
- yy27 := *x.FollowRequestSent
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy27))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("follow_request_sent"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.FollowRequestSent == nil {
- r.EncodeNil()
- } else {
- yy29 := *x.FollowRequestSent
- yym30 := z.EncBinary()
- _ = yym30
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy29))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym32 := z.EncBinary()
- _ = yym32
- if false {
- } else {
- r.EncodeInt(int64(x.FollowersCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("followers_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else {
- r.EncodeInt(int64(x.FollowersCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Following == nil {
- r.EncodeNil()
- } else {
- yy35 := *x.Following
- yym36 := z.EncBinary()
- _ = yym36
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy35))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("following"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Following == nil {
- r.EncodeNil()
- } else {
- yy37 := *x.Following
- yym38 := z.EncBinary()
- _ = yym38
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy37))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym40 := z.EncBinary()
- _ = yym40
- if false {
- } else {
- r.EncodeInt(int64(x.FriendsCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("friends_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym41 := z.EncBinary()
- _ = yym41
- if false {
- } else {
- r.EncodeInt(int64(x.FriendsCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym43 := z.EncBinary()
- _ = yym43
- if false {
- } else {
- r.EncodeBool(bool(x.GeoEnabled))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("geo_enabled"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym44 := z.EncBinary()
- _ = yym44
- if false {
- } else {
- r.EncodeBool(bool(x.GeoEnabled))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym46 := z.EncBinary()
- _ = yym46
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym49 := z.EncBinary()
- _ = yym49
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeBool(bool(x.IsTranslator))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("is_translator"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- r.EncodeBool(bool(x.IsTranslator))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym55 := z.EncBinary()
- _ = yym55
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Lang))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("lang"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym56 := z.EncBinary()
- _ = yym56
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Lang))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym58 := z.EncBinary()
- _ = yym58
- if false {
- } else {
- r.EncodeInt(int64(x.ListedCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("listed_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym59 := z.EncBinary()
- _ = yym59
- if false {
- } else {
- r.EncodeInt(int64(x.ListedCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym61 := z.EncBinary()
- _ = yym61
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Location))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("location"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym62 := z.EncBinary()
- _ = yym62
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Location))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym64 := z.EncBinary()
- _ = yym64
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Name))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym65 := z.EncBinary()
- _ = yym65
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Name))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Notifications == nil {
- r.EncodeNil()
- } else {
- yy67 := *x.Notifications
- yym68 := z.EncBinary()
- _ = yym68
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy67))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("notifications"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Notifications == nil {
- r.EncodeNil()
- } else {
- yy69 := *x.Notifications
- yym70 := z.EncBinary()
- _ = yym70
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy69))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym72 := z.EncBinary()
- _ = yym72
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym73 := z.EncBinary()
- _ = yym73
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym75 := z.EncBinary()
- _ = yym75
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym76 := z.EncBinary()
- _ = yym76
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym78 := z.EncBinary()
- _ = yym78
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url_https"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym79 := z.EncBinary()
- _ = yym79
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileBackgroundTile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_tile"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym82 := z.EncBinary()
- _ = yym82
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileBackgroundTile))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_image_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym85 := z.EncBinary()
- _ = yym85
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym87 := z.EncBinary()
- _ = yym87
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_image_url_https"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym88 := z.EncBinary()
- _ = yym88
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym90 := z.EncBinary()
- _ = yym90
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_link_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym91 := z.EncBinary()
- _ = yym91
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym93 := z.EncBinary()
- _ = yym93
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_border_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym94 := z.EncBinary()
- _ = yym94
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym96 := z.EncBinary()
- _ = yym96
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_fill_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym97 := z.EncBinary()
- _ = yym97
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym99 := z.EncBinary()
- _ = yym99
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_text_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym100 := z.EncBinary()
- _ = yym100
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym102 := z.EncBinary()
- _ = yym102
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileUseBackgroundImage))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_use_background_image"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym103 := z.EncBinary()
- _ = yym103
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileUseBackgroundImage))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym105 := z.EncBinary()
- _ = yym105
- if false {
- } else {
- r.EncodeBool(bool(x.Protected))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("protected"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym106 := z.EncBinary()
- _ = yym106
- if false {
- } else {
- r.EncodeBool(bool(x.Protected))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym108 := z.EncBinary()
- _ = yym108
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("screen_name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym109 := z.EncBinary()
- _ = yym109
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym111 := z.EncBinary()
- _ = yym111
- if false {
- } else {
- r.EncodeBool(bool(x.ShowAllInlineMedia))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("show_all_inline_media"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym112 := z.EncBinary()
- _ = yym112
- if false {
- } else {
- r.EncodeBool(bool(x.ShowAllInlineMedia))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym114 := z.EncBinary()
- _ = yym114
- if false {
- } else {
- r.EncodeInt(int64(x.StatusesCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("statuses_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym115 := z.EncBinary()
- _ = yym115
- if false {
- } else {
- r.EncodeInt(int64(x.StatusesCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym117 := z.EncBinary()
- _ = yym117
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("time_zone"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym118 := z.EncBinary()
- _ = yym118
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.URL == nil {
- r.EncodeNil()
- } else {
- yy120 := *x.URL
- yym121 := z.EncBinary()
- _ = yym121
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy120))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.URL == nil {
- r.EncodeNil()
- } else {
- yy122 := *x.URL
- yym123 := z.EncBinary()
- _ = yym123
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy122))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym125 := z.EncBinary()
- _ = yym125
- if false {
- } else {
- r.EncodeInt(int64(x.UtcOffset))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("utc_offset"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym126 := z.EncBinary()
- _ = yym126
- if false {
- } else {
- r.EncodeInt(int64(x.UtcOffset))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym128 := z.EncBinary()
- _ = yym128
- if false {
- } else {
- r.EncodeBool(bool(x.Verified))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("verified"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym129 := z.EncBinary()
- _ = yym129
- if false {
- } else {
- r.EncodeBool(bool(x.Verified))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *User) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *User) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "contributors_enabled":
- if r.TryDecodeAsNil() {
- x.ContributorsEnabled = false
- } else {
- yyv4 := &x.ContributorsEnabled
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*bool)(yyv4)) = r.DecodeBool()
- }
- }
- case "created_at":
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv6 := &x.CreatedAt
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- case "default_profile":
- if r.TryDecodeAsNil() {
- x.DefaultProfile = false
- } else {
- yyv8 := &x.DefaultProfile
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*bool)(yyv8)) = r.DecodeBool()
- }
- }
- case "default_profile_image":
- if r.TryDecodeAsNil() {
- x.DefaultProfileImage = false
- } else {
- yyv10 := &x.DefaultProfileImage
- yym11 := z.DecBinary()
- _ = yym11
- if false {
- } else {
- *((*bool)(yyv10)) = r.DecodeBool()
- }
- }
- case "description":
- if r.TryDecodeAsNil() {
- x.Description = ""
- } else {
- yyv12 := &x.Description
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- *((*string)(yyv12)) = r.DecodeString()
- }
- }
- case "entities":
- if r.TryDecodeAsNil() {
- x.Entities = UserEntities{}
- } else {
- yyv14 := &x.Entities
- yyv14.CodecDecodeSelf(d)
- }
- case "favourites_count":
- if r.TryDecodeAsNil() {
- x.FavouritesCount = 0
- } else {
- yyv15 := &x.FavouritesCount
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*int)(yyv15)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "follow_request_sent":
- if r.TryDecodeAsNil() {
- if x.FollowRequestSent != nil {
- x.FollowRequestSent = nil
- }
- } else {
- if x.FollowRequestSent == nil {
- x.FollowRequestSent = new(string)
- }
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else {
- *((*string)(x.FollowRequestSent)) = r.DecodeString()
- }
- }
- case "followers_count":
- if r.TryDecodeAsNil() {
- x.FollowersCount = 0
- } else {
- yyv19 := &x.FollowersCount
- yym20 := z.DecBinary()
- _ = yym20
- if false {
- } else {
- *((*int)(yyv19)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "following":
- if r.TryDecodeAsNil() {
- if x.Following != nil {
- x.Following = nil
- }
- } else {
- if x.Following == nil {
- x.Following = new(string)
- }
- yym22 := z.DecBinary()
- _ = yym22
- if false {
- } else {
- *((*string)(x.Following)) = r.DecodeString()
- }
- }
- case "friends_count":
- if r.TryDecodeAsNil() {
- x.FriendsCount = 0
- } else {
- yyv23 := &x.FriendsCount
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*int)(yyv23)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "geo_enabled":
- if r.TryDecodeAsNil() {
- x.GeoEnabled = false
- } else {
- yyv25 := &x.GeoEnabled
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*bool)(yyv25)) = r.DecodeBool()
- }
- }
- case "id":
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv27 := &x.ID
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "id_str":
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv29 := &x.IDStr
- yym30 := z.DecBinary()
- _ = yym30
- if false {
- } else {
- *((*string)(yyv29)) = r.DecodeString()
- }
- }
- case "is_translator":
- if r.TryDecodeAsNil() {
- x.IsTranslator = false
- } else {
- yyv31 := &x.IsTranslator
- yym32 := z.DecBinary()
- _ = yym32
- if false {
- } else {
- *((*bool)(yyv31)) = r.DecodeBool()
- }
- }
- case "lang":
- if r.TryDecodeAsNil() {
- x.Lang = ""
- } else {
- yyv33 := &x.Lang
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else {
- *((*string)(yyv33)) = r.DecodeString()
- }
- }
- case "listed_count":
- if r.TryDecodeAsNil() {
- x.ListedCount = 0
- } else {
- yyv35 := &x.ListedCount
- yym36 := z.DecBinary()
- _ = yym36
- if false {
- } else {
- *((*int)(yyv35)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "location":
- if r.TryDecodeAsNil() {
- x.Location = ""
- } else {
- yyv37 := &x.Location
- yym38 := z.DecBinary()
- _ = yym38
- if false {
- } else {
- *((*string)(yyv37)) = r.DecodeString()
- }
- }
- case "name":
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- yyv39 := &x.Name
- yym40 := z.DecBinary()
- _ = yym40
- if false {
- } else {
- *((*string)(yyv39)) = r.DecodeString()
- }
- }
- case "notifications":
- if r.TryDecodeAsNil() {
- if x.Notifications != nil {
- x.Notifications = nil
- }
- } else {
- if x.Notifications == nil {
- x.Notifications = new(string)
- }
- yym42 := z.DecBinary()
- _ = yym42
- if false {
- } else {
- *((*string)(x.Notifications)) = r.DecodeString()
- }
- }
- case "profile_background_color":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundColor = ""
- } else {
- yyv43 := &x.ProfileBackgroundColor
- yym44 := z.DecBinary()
- _ = yym44
- if false {
- } else {
- *((*string)(yyv43)) = r.DecodeString()
- }
- }
- case "profile_background_image_url":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURL = ""
- } else {
- yyv45 := &x.ProfileBackgroundImageURL
- yym46 := z.DecBinary()
- _ = yym46
- if false {
- } else {
- *((*string)(yyv45)) = r.DecodeString()
- }
- }
- case "profile_background_image_url_https":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURLHTTPS = ""
- } else {
- yyv47 := &x.ProfileBackgroundImageURLHTTPS
- yym48 := z.DecBinary()
- _ = yym48
- if false {
- } else {
- *((*string)(yyv47)) = r.DecodeString()
- }
- }
- case "profile_background_tile":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundTile = false
- } else {
- yyv49 := &x.ProfileBackgroundTile
- yym50 := z.DecBinary()
- _ = yym50
- if false {
- } else {
- *((*bool)(yyv49)) = r.DecodeBool()
- }
- }
- case "profile_image_url":
- if r.TryDecodeAsNil() {
- x.ProfileImageURL = ""
- } else {
- yyv51 := &x.ProfileImageURL
- yym52 := z.DecBinary()
- _ = yym52
- if false {
- } else {
- *((*string)(yyv51)) = r.DecodeString()
- }
- }
- case "profile_image_url_https":
- if r.TryDecodeAsNil() {
- x.ProfileImageURLHTTPS = ""
- } else {
- yyv53 := &x.ProfileImageURLHTTPS
- yym54 := z.DecBinary()
- _ = yym54
- if false {
- } else {
- *((*string)(yyv53)) = r.DecodeString()
- }
- }
- case "profile_link_color":
- if r.TryDecodeAsNil() {
- x.ProfileLinkColor = ""
- } else {
- yyv55 := &x.ProfileLinkColor
- yym56 := z.DecBinary()
- _ = yym56
- if false {
- } else {
- *((*string)(yyv55)) = r.DecodeString()
- }
- }
- case "profile_sidebar_border_color":
- if r.TryDecodeAsNil() {
- x.ProfileSidebarBorderColor = ""
- } else {
- yyv57 := &x.ProfileSidebarBorderColor
- yym58 := z.DecBinary()
- _ = yym58
- if false {
- } else {
- *((*string)(yyv57)) = r.DecodeString()
- }
- }
- case "profile_sidebar_fill_color":
- if r.TryDecodeAsNil() {
- x.ProfileSidebarFillColor = ""
- } else {
- yyv59 := &x.ProfileSidebarFillColor
- yym60 := z.DecBinary()
- _ = yym60
- if false {
- } else {
- *((*string)(yyv59)) = r.DecodeString()
- }
- }
- case "profile_text_color":
- if r.TryDecodeAsNil() {
- x.ProfileTextColor = ""
- } else {
- yyv61 := &x.ProfileTextColor
- yym62 := z.DecBinary()
- _ = yym62
- if false {
- } else {
- *((*string)(yyv61)) = r.DecodeString()
- }
- }
- case "profile_use_background_image":
- if r.TryDecodeAsNil() {
- x.ProfileUseBackgroundImage = false
- } else {
- yyv63 := &x.ProfileUseBackgroundImage
- yym64 := z.DecBinary()
- _ = yym64
- if false {
- } else {
- *((*bool)(yyv63)) = r.DecodeBool()
- }
- }
- case "protected":
- if r.TryDecodeAsNil() {
- x.Protected = false
- } else {
- yyv65 := &x.Protected
- yym66 := z.DecBinary()
- _ = yym66
- if false {
- } else {
- *((*bool)(yyv65)) = r.DecodeBool()
- }
- }
- case "screen_name":
- if r.TryDecodeAsNil() {
- x.ScreenName = ""
- } else {
- yyv67 := &x.ScreenName
- yym68 := z.DecBinary()
- _ = yym68
- if false {
- } else {
- *((*string)(yyv67)) = r.DecodeString()
- }
- }
- case "show_all_inline_media":
- if r.TryDecodeAsNil() {
- x.ShowAllInlineMedia = false
- } else {
- yyv69 := &x.ShowAllInlineMedia
- yym70 := z.DecBinary()
- _ = yym70
- if false {
- } else {
- *((*bool)(yyv69)) = r.DecodeBool()
- }
- }
- case "statuses_count":
- if r.TryDecodeAsNil() {
- x.StatusesCount = 0
- } else {
- yyv71 := &x.StatusesCount
- yym72 := z.DecBinary()
- _ = yym72
- if false {
- } else {
- *((*int)(yyv71)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "time_zone":
- if r.TryDecodeAsNil() {
- x.TimeZone = ""
- } else {
- yyv73 := &x.TimeZone
- yym74 := z.DecBinary()
- _ = yym74
- if false {
- } else {
- *((*string)(yyv73)) = r.DecodeString()
- }
- }
- case "url":
- if r.TryDecodeAsNil() {
- if x.URL != nil {
- x.URL = nil
- }
- } else {
- if x.URL == nil {
- x.URL = new(string)
- }
- yym76 := z.DecBinary()
- _ = yym76
- if false {
- } else {
- *((*string)(x.URL)) = r.DecodeString()
- }
- }
- case "utc_offset":
- if r.TryDecodeAsNil() {
- x.UtcOffset = 0
- } else {
- yyv77 := &x.UtcOffset
- yym78 := z.DecBinary()
- _ = yym78
- if false {
- } else {
- *((*int)(yyv77)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "verified":
- if r.TryDecodeAsNil() {
- x.Verified = false
- } else {
- yyv79 := &x.Verified
- yym80 := z.DecBinary()
- _ = yym80
- if false {
- } else {
- *((*bool)(yyv79)) = r.DecodeBool()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *User) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj81 int
- var yyb81 bool
- var yyhl81 bool = l >= 0
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ContributorsEnabled = false
- } else {
- yyv82 := &x.ContributorsEnabled
- yym83 := z.DecBinary()
- _ = yym83
- if false {
- } else {
- *((*bool)(yyv82)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv84 := &x.CreatedAt
- yym85 := z.DecBinary()
- _ = yym85
- if false {
- } else {
- *((*string)(yyv84)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.DefaultProfile = false
- } else {
- yyv86 := &x.DefaultProfile
- yym87 := z.DecBinary()
- _ = yym87
- if false {
- } else {
- *((*bool)(yyv86)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.DefaultProfileImage = false
- } else {
- yyv88 := &x.DefaultProfileImage
- yym89 := z.DecBinary()
- _ = yym89
- if false {
- } else {
- *((*bool)(yyv88)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Description = ""
- } else {
- yyv90 := &x.Description
- yym91 := z.DecBinary()
- _ = yym91
- if false {
- } else {
- *((*string)(yyv90)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Entities = UserEntities{}
- } else {
- yyv92 := &x.Entities
- yyv92.CodecDecodeSelf(d)
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FavouritesCount = 0
- } else {
- yyv93 := &x.FavouritesCount
- yym94 := z.DecBinary()
- _ = yym94
- if false {
- } else {
- *((*int)(yyv93)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.FollowRequestSent != nil {
- x.FollowRequestSent = nil
- }
- } else {
- if x.FollowRequestSent == nil {
- x.FollowRequestSent = new(string)
- }
- yym96 := z.DecBinary()
- _ = yym96
- if false {
- } else {
- *((*string)(x.FollowRequestSent)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FollowersCount = 0
- } else {
- yyv97 := &x.FollowersCount
- yym98 := z.DecBinary()
- _ = yym98
- if false {
- } else {
- *((*int)(yyv97)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Following != nil {
- x.Following = nil
- }
- } else {
- if x.Following == nil {
- x.Following = new(string)
- }
- yym100 := z.DecBinary()
- _ = yym100
- if false {
- } else {
- *((*string)(x.Following)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FriendsCount = 0
- } else {
- yyv101 := &x.FriendsCount
- yym102 := z.DecBinary()
- _ = yym102
- if false {
- } else {
- *((*int)(yyv101)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.GeoEnabled = false
- } else {
- yyv103 := &x.GeoEnabled
- yym104 := z.DecBinary()
- _ = yym104
- if false {
- } else {
- *((*bool)(yyv103)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv105 := &x.ID
- yym106 := z.DecBinary()
- _ = yym106
- if false {
- } else {
- *((*int)(yyv105)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv107 := &x.IDStr
- yym108 := z.DecBinary()
- _ = yym108
- if false {
- } else {
- *((*string)(yyv107)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IsTranslator = false
- } else {
- yyv109 := &x.IsTranslator
- yym110 := z.DecBinary()
- _ = yym110
- if false {
- } else {
- *((*bool)(yyv109)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Lang = ""
- } else {
- yyv111 := &x.Lang
- yym112 := z.DecBinary()
- _ = yym112
- if false {
- } else {
- *((*string)(yyv111)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ListedCount = 0
- } else {
- yyv113 := &x.ListedCount
- yym114 := z.DecBinary()
- _ = yym114
- if false {
- } else {
- *((*int)(yyv113)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Location = ""
- } else {
- yyv115 := &x.Location
- yym116 := z.DecBinary()
- _ = yym116
- if false {
- } else {
- *((*string)(yyv115)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- yyv117 := &x.Name
- yym118 := z.DecBinary()
- _ = yym118
- if false {
- } else {
- *((*string)(yyv117)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Notifications != nil {
- x.Notifications = nil
- }
- } else {
- if x.Notifications == nil {
- x.Notifications = new(string)
- }
- yym120 := z.DecBinary()
- _ = yym120
- if false {
- } else {
- *((*string)(x.Notifications)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundColor = ""
- } else {
- yyv121 := &x.ProfileBackgroundColor
- yym122 := z.DecBinary()
- _ = yym122
- if false {
- } else {
- *((*string)(yyv121)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURL = ""
- } else {
- yyv123 := &x.ProfileBackgroundImageURL
- yym124 := z.DecBinary()
- _ = yym124
- if false {
- } else {
- *((*string)(yyv123)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURLHTTPS = ""
- } else {
- yyv125 := &x.ProfileBackgroundImageURLHTTPS
- yym126 := z.DecBinary()
- _ = yym126
- if false {
- } else {
- *((*string)(yyv125)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundTile = false
- } else {
- yyv127 := &x.ProfileBackgroundTile
- yym128 := z.DecBinary()
- _ = yym128
- if false {
- } else {
- *((*bool)(yyv127)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileImageURL = ""
- } else {
- yyv129 := &x.ProfileImageURL
- yym130 := z.DecBinary()
- _ = yym130
- if false {
- } else {
- *((*string)(yyv129)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileImageURLHTTPS = ""
- } else {
- yyv131 := &x.ProfileImageURLHTTPS
- yym132 := z.DecBinary()
- _ = yym132
- if false {
- } else {
- *((*string)(yyv131)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileLinkColor = ""
- } else {
- yyv133 := &x.ProfileLinkColor
- yym134 := z.DecBinary()
- _ = yym134
- if false {
- } else {
- *((*string)(yyv133)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileSidebarBorderColor = ""
- } else {
- yyv135 := &x.ProfileSidebarBorderColor
- yym136 := z.DecBinary()
- _ = yym136
- if false {
- } else {
- *((*string)(yyv135)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileSidebarFillColor = ""
- } else {
- yyv137 := &x.ProfileSidebarFillColor
- yym138 := z.DecBinary()
- _ = yym138
- if false {
- } else {
- *((*string)(yyv137)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileTextColor = ""
- } else {
- yyv139 := &x.ProfileTextColor
- yym140 := z.DecBinary()
- _ = yym140
- if false {
- } else {
- *((*string)(yyv139)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileUseBackgroundImage = false
- } else {
- yyv141 := &x.ProfileUseBackgroundImage
- yym142 := z.DecBinary()
- _ = yym142
- if false {
- } else {
- *((*bool)(yyv141)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Protected = false
- } else {
- yyv143 := &x.Protected
- yym144 := z.DecBinary()
- _ = yym144
- if false {
- } else {
- *((*bool)(yyv143)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ScreenName = ""
- } else {
- yyv145 := &x.ScreenName
- yym146 := z.DecBinary()
- _ = yym146
- if false {
- } else {
- *((*string)(yyv145)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ShowAllInlineMedia = false
- } else {
- yyv147 := &x.ShowAllInlineMedia
- yym148 := z.DecBinary()
- _ = yym148
- if false {
- } else {
- *((*bool)(yyv147)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.StatusesCount = 0
- } else {
- yyv149 := &x.StatusesCount
- yym150 := z.DecBinary()
- _ = yym150
- if false {
- } else {
- *((*int)(yyv149)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.TimeZone = ""
- } else {
- yyv151 := &x.TimeZone
- yym152 := z.DecBinary()
- _ = yym152
- if false {
- } else {
- *((*string)(yyv151)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.URL != nil {
- x.URL = nil
- }
- } else {
- if x.URL == nil {
- x.URL = new(string)
- }
- yym154 := z.DecBinary()
- _ = yym154
- if false {
- } else {
- *((*string)(x.URL)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.UtcOffset = 0
- } else {
- yyv155 := &x.UtcOffset
- yym156 := z.DecBinary()
- _ = yym156
- if false {
- } else {
- *((*int)(yyv155)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Verified = false
- } else {
- yyv157 := &x.Verified
- yym158 := z.DecBinary()
- _ = yym158
- if false {
- } else {
- *((*bool)(yyv157)) = r.DecodeBool()
- }
- }
- for {
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj81-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *StatusMetadata) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("iso_language_code"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ResultType))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("result_type"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ResultType))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *StatusMetadata) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *StatusMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "iso_language_code":
- if r.TryDecodeAsNil() {
- x.IsoLanguageCode = ""
- } else {
- yyv4 := &x.IsoLanguageCode
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(yyv4)) = r.DecodeString()
- }
- }
- case "result_type":
- if r.TryDecodeAsNil() {
- x.ResultType = ""
- } else {
- yyv6 := &x.ResultType
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *StatusMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj8 int
- var yyb8 bool
- var yyhl8 bool = l >= 0
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IsoLanguageCode = ""
- } else {
- yyv9 := &x.IsoLanguageCode
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- *((*string)(yyv9)) = r.DecodeString()
- }
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ResultType = ""
- } else {
- yyv11 := &x.ResultType
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(yyv11)) = r.DecodeString()
- }
- }
- for {
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj8-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Status) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [21]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(21)
- } else {
- yynn2 = 21
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Contributors == nil {
- r.EncodeNil()
- } else {
- yy4 := *x.Contributors
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy4))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("contributors"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Contributors == nil {
- r.EncodeNil()
- } else {
- yy6 := *x.Contributors
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy6))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Coordinates == nil {
- r.EncodeNil()
- } else {
- yy9 := *x.Coordinates
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy9))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("coordinates"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Coordinates == nil {
- r.EncodeNil()
- } else {
- yy11 := *x.Coordinates
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy11))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("created_at"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy17 := &x.Entities
- yy17.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("entities"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy19 := &x.Entities
- yy19.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- r.EncodeBool(bool(x.Favorited))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("favorited"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else {
- r.EncodeBool(bool(x.Favorited))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Geo == nil {
- r.EncodeNil()
- } else {
- yy25 := *x.Geo
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy25))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("geo"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Geo == nil {
- r.EncodeNil()
- } else {
- yy27 := *x.Geo
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy27))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym30 := z.EncBinary()
- _ = yym30
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym31 := z.EncBinary()
- _ = yym31
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym34 := z.EncBinary()
- _ = yym34
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToScreenName == nil {
- r.EncodeNil()
- } else {
- yy36 := *x.InReplyToScreenName
- yym37 := z.EncBinary()
- _ = yym37
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy36))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_screen_name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToScreenName == nil {
- r.EncodeNil()
- } else {
- yy38 := *x.InReplyToScreenName
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy38))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToStatusID == nil {
- r.EncodeNil()
- } else {
- yy41 := *x.InReplyToStatusID
- yym42 := z.EncBinary()
- _ = yym42
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy41))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToStatusID == nil {
- r.EncodeNil()
- } else {
- yy43 := *x.InReplyToStatusID
- yym44 := z.EncBinary()
- _ = yym44
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy43))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToStatusIDStr == nil {
- r.EncodeNil()
- } else {
- yy46 := *x.InReplyToStatusIDStr
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy46))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToStatusIDStr == nil {
- r.EncodeNil()
- } else {
- yy48 := *x.InReplyToStatusIDStr
- yym49 := z.EncBinary()
- _ = yym49
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy48))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToUserID == nil {
- r.EncodeNil()
- } else {
- yy51 := *x.InReplyToUserID
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy51))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToUserID == nil {
- r.EncodeNil()
- } else {
- yy53 := *x.InReplyToUserID
- yym54 := z.EncBinary()
- _ = yym54
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy53))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToUserIDStr == nil {
- r.EncodeNil()
- } else {
- yy56 := *x.InReplyToUserIDStr
- yym57 := z.EncBinary()
- _ = yym57
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy56))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToUserIDStr == nil {
- r.EncodeNil()
- } else {
- yy58 := *x.InReplyToUserIDStr
- yym59 := z.EncBinary()
- _ = yym59
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy58))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy61 := &x.Metadata
- yy61.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy63 := &x.Metadata
- yy63.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Place == nil {
- r.EncodeNil()
- } else {
- yy66 := *x.Place
- yym67 := z.EncBinary()
- _ = yym67
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy66))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("place"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Place == nil {
- r.EncodeNil()
- } else {
- yy68 := *x.Place
- yym69 := z.EncBinary()
- _ = yym69
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy68))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym71 := z.EncBinary()
- _ = yym71
- if false {
- } else {
- r.EncodeInt(int64(x.RetweetCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("retweet_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym72 := z.EncBinary()
- _ = yym72
- if false {
- } else {
- r.EncodeInt(int64(x.RetweetCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym74 := z.EncBinary()
- _ = yym74
- if false {
- } else {
- r.EncodeBool(bool(x.Retweeted))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("retweeted"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym75 := z.EncBinary()
- _ = yym75
- if false {
- } else {
- r.EncodeBool(bool(x.Retweeted))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym77 := z.EncBinary()
- _ = yym77
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Source))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("source"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym78 := z.EncBinary()
- _ = yym78
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Source))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym80 := z.EncBinary()
- _ = yym80
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("text"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym83 := z.EncBinary()
- _ = yym83
- if false {
- } else {
- r.EncodeBool(bool(x.Truncated))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("truncated"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- r.EncodeBool(bool(x.Truncated))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy86 := &x.User
- yy86.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("user"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy88 := &x.User
- yy88.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Status) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Status) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "contributors":
- if r.TryDecodeAsNil() {
- if x.Contributors != nil {
- x.Contributors = nil
- }
- } else {
- if x.Contributors == nil {
- x.Contributors = new(string)
- }
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(x.Contributors)) = r.DecodeString()
- }
- }
- case "coordinates":
- if r.TryDecodeAsNil() {
- if x.Coordinates != nil {
- x.Coordinates = nil
- }
- } else {
- if x.Coordinates == nil {
- x.Coordinates = new(string)
- }
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(x.Coordinates)) = r.DecodeString()
- }
- }
- case "created_at":
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv8 := &x.CreatedAt
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*string)(yyv8)) = r.DecodeString()
- }
- }
- case "entities":
- if r.TryDecodeAsNil() {
- x.Entities = Entities{}
- } else {
- yyv10 := &x.Entities
- yyv10.CodecDecodeSelf(d)
- }
- case "favorited":
- if r.TryDecodeAsNil() {
- x.Favorited = false
- } else {
- yyv11 := &x.Favorited
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*bool)(yyv11)) = r.DecodeBool()
- }
- }
- case "geo":
- if r.TryDecodeAsNil() {
- if x.Geo != nil {
- x.Geo = nil
- }
- } else {
- if x.Geo == nil {
- x.Geo = new(string)
- }
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- *((*string)(x.Geo)) = r.DecodeString()
- }
- }
- case "id":
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv15 := &x.ID
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*int64)(yyv15)) = int64(r.DecodeInt(64))
- }
- }
- case "id_str":
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv17 := &x.IDStr
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else {
- *((*string)(yyv17)) = r.DecodeString()
- }
- }
- case "in_reply_to_screen_name":
- if r.TryDecodeAsNil() {
- if x.InReplyToScreenName != nil {
- x.InReplyToScreenName = nil
- }
- } else {
- if x.InReplyToScreenName == nil {
- x.InReplyToScreenName = new(string)
- }
- yym20 := z.DecBinary()
- _ = yym20
- if false {
- } else {
- *((*string)(x.InReplyToScreenName)) = r.DecodeString()
- }
- }
- case "in_reply_to_status_id":
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusID != nil {
- x.InReplyToStatusID = nil
- }
- } else {
- if x.InReplyToStatusID == nil {
- x.InReplyToStatusID = new(string)
- }
- yym22 := z.DecBinary()
- _ = yym22
- if false {
- } else {
- *((*string)(x.InReplyToStatusID)) = r.DecodeString()
- }
- }
- case "in_reply_to_status_id_str":
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusIDStr != nil {
- x.InReplyToStatusIDStr = nil
- }
- } else {
- if x.InReplyToStatusIDStr == nil {
- x.InReplyToStatusIDStr = new(string)
- }
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString()
- }
- }
- case "in_reply_to_user_id":
- if r.TryDecodeAsNil() {
- if x.InReplyToUserID != nil {
- x.InReplyToUserID = nil
- }
- } else {
- if x.InReplyToUserID == nil {
- x.InReplyToUserID = new(string)
- }
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*string)(x.InReplyToUserID)) = r.DecodeString()
- }
- }
- case "in_reply_to_user_id_str":
- if r.TryDecodeAsNil() {
- if x.InReplyToUserIDStr != nil {
- x.InReplyToUserIDStr = nil
- }
- } else {
- if x.InReplyToUserIDStr == nil {
- x.InReplyToUserIDStr = new(string)
- }
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*string)(x.InReplyToUserIDStr)) = r.DecodeString()
- }
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.Metadata = StatusMetadata{}
- } else {
- yyv29 := &x.Metadata
- yyv29.CodecDecodeSelf(d)
- }
- case "place":
- if r.TryDecodeAsNil() {
- if x.Place != nil {
- x.Place = nil
- }
- } else {
- if x.Place == nil {
- x.Place = new(string)
- }
- yym31 := z.DecBinary()
- _ = yym31
- if false {
- } else {
- *((*string)(x.Place)) = r.DecodeString()
- }
- }
- case "retweet_count":
- if r.TryDecodeAsNil() {
- x.RetweetCount = 0
- } else {
- yyv32 := &x.RetweetCount
- yym33 := z.DecBinary()
- _ = yym33
- if false {
- } else {
- *((*int)(yyv32)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "retweeted":
- if r.TryDecodeAsNil() {
- x.Retweeted = false
- } else {
- yyv34 := &x.Retweeted
- yym35 := z.DecBinary()
- _ = yym35
- if false {
- } else {
- *((*bool)(yyv34)) = r.DecodeBool()
- }
- }
- case "source":
- if r.TryDecodeAsNil() {
- x.Source = ""
- } else {
- yyv36 := &x.Source
- yym37 := z.DecBinary()
- _ = yym37
- if false {
- } else {
- *((*string)(yyv36)) = r.DecodeString()
- }
- }
- case "text":
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv38 := &x.Text
- yym39 := z.DecBinary()
- _ = yym39
- if false {
- } else {
- *((*string)(yyv38)) = r.DecodeString()
- }
- }
- case "truncated":
- if r.TryDecodeAsNil() {
- x.Truncated = false
- } else {
- yyv40 := &x.Truncated
- yym41 := z.DecBinary()
- _ = yym41
- if false {
- } else {
- *((*bool)(yyv40)) = r.DecodeBool()
- }
- }
- case "user":
- if r.TryDecodeAsNil() {
- x.User = User{}
- } else {
- yyv42 := &x.User
- yyv42.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Status) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj43 int
- var yyb43 bool
- var yyhl43 bool = l >= 0
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Contributors != nil {
- x.Contributors = nil
- }
- } else {
- if x.Contributors == nil {
- x.Contributors = new(string)
- }
- yym45 := z.DecBinary()
- _ = yym45
- if false {
- } else {
- *((*string)(x.Contributors)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Coordinates != nil {
- x.Coordinates = nil
- }
- } else {
- if x.Coordinates == nil {
- x.Coordinates = new(string)
- }
- yym47 := z.DecBinary()
- _ = yym47
- if false {
- } else {
- *((*string)(x.Coordinates)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv48 := &x.CreatedAt
- yym49 := z.DecBinary()
- _ = yym49
- if false {
- } else {
- *((*string)(yyv48)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Entities = Entities{}
- } else {
- yyv50 := &x.Entities
- yyv50.CodecDecodeSelf(d)
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Favorited = false
- } else {
- yyv51 := &x.Favorited
- yym52 := z.DecBinary()
- _ = yym52
- if false {
- } else {
- *((*bool)(yyv51)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Geo != nil {
- x.Geo = nil
- }
- } else {
- if x.Geo == nil {
- x.Geo = new(string)
- }
- yym54 := z.DecBinary()
- _ = yym54
- if false {
- } else {
- *((*string)(x.Geo)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv55 := &x.ID
- yym56 := z.DecBinary()
- _ = yym56
- if false {
- } else {
- *((*int64)(yyv55)) = int64(r.DecodeInt(64))
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv57 := &x.IDStr
- yym58 := z.DecBinary()
- _ = yym58
- if false {
- } else {
- *((*string)(yyv57)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToScreenName != nil {
- x.InReplyToScreenName = nil
- }
- } else {
- if x.InReplyToScreenName == nil {
- x.InReplyToScreenName = new(string)
- }
- yym60 := z.DecBinary()
- _ = yym60
- if false {
- } else {
- *((*string)(x.InReplyToScreenName)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusID != nil {
- x.InReplyToStatusID = nil
- }
- } else {
- if x.InReplyToStatusID == nil {
- x.InReplyToStatusID = new(string)
- }
- yym62 := z.DecBinary()
- _ = yym62
- if false {
- } else {
- *((*string)(x.InReplyToStatusID)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusIDStr != nil {
- x.InReplyToStatusIDStr = nil
- }
- } else {
- if x.InReplyToStatusIDStr == nil {
- x.InReplyToStatusIDStr = new(string)
- }
- yym64 := z.DecBinary()
- _ = yym64
- if false {
- } else {
- *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToUserID != nil {
- x.InReplyToUserID = nil
- }
- } else {
- if x.InReplyToUserID == nil {
- x.InReplyToUserID = new(string)
- }
- yym66 := z.DecBinary()
- _ = yym66
- if false {
- } else {
- *((*string)(x.InReplyToUserID)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToUserIDStr != nil {
- x.InReplyToUserIDStr = nil
- }
- } else {
- if x.InReplyToUserIDStr == nil {
- x.InReplyToUserIDStr = new(string)
- }
- yym68 := z.DecBinary()
- _ = yym68
- if false {
- } else {
- *((*string)(x.InReplyToUserIDStr)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Metadata = StatusMetadata{}
- } else {
- yyv69 := &x.Metadata
- yyv69.CodecDecodeSelf(d)
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Place != nil {
- x.Place = nil
- }
- } else {
- if x.Place == nil {
- x.Place = new(string)
- }
- yym71 := z.DecBinary()
- _ = yym71
- if false {
- } else {
- *((*string)(x.Place)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.RetweetCount = 0
- } else {
- yyv72 := &x.RetweetCount
- yym73 := z.DecBinary()
- _ = yym73
- if false {
- } else {
- *((*int)(yyv72)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Retweeted = false
- } else {
- yyv74 := &x.Retweeted
- yym75 := z.DecBinary()
- _ = yym75
- if false {
- } else {
- *((*bool)(yyv74)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Source = ""
- } else {
- yyv76 := &x.Source
- yym77 := z.DecBinary()
- _ = yym77
- if false {
- } else {
- *((*string)(yyv76)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv78 := &x.Text
- yym79 := z.DecBinary()
- _ = yym79
- if false {
- } else {
- *((*string)(yyv78)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Truncated = false
- } else {
- yyv80 := &x.Truncated
- yym81 := z.DecBinary()
- _ = yym81
- if false {
- } else {
- *((*bool)(yyv80)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.User = User{}
- } else {
- yyv82 := &x.User
- yyv82.CodecDecodeSelf(d)
- }
- for {
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj43-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *LargeStruct) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy4 := &x.SearchMetadata
- yy4.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("search_metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy6 := &x.SearchMetadata
- yy6.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Statuses == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceStatus(([]Status)(x.Statuses), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("statuses"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Statuses == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceStatus(([]Status)(x.Statuses), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *LargeStruct) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *LargeStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "search_metadata":
- if r.TryDecodeAsNil() {
- x.SearchMetadata = SearchMetadata{}
- } else {
- yyv4 := &x.SearchMetadata
- yyv4.CodecDecodeSelf(d)
- }
- case "statuses":
- if r.TryDecodeAsNil() {
- x.Statuses = nil
- } else {
- yyv5 := &x.Statuses
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSliceStatus((*[]Status)(yyv5), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *LargeStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj7 int
- var yyb7 bool
- var yyhl7 bool = l >= 0
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SearchMetadata = SearchMetadata{}
- } else {
- yyv8 := &x.SearchMetadata
- yyv8.CodecDecodeSelf(d)
- }
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Statuses = nil
- } else {
- yyv9 := &x.Statuses
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- h.decSliceStatus((*[]Status)(yyv9), d)
- }
- }
- for {
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj7-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *XLStruct) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Data == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceLargeStruct(([]LargeStruct)(x.Data), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("Data"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Data == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceLargeStruct(([]LargeStruct)(x.Data), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *XLStruct) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *XLStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "Data":
- if r.TryDecodeAsNil() {
- x.Data = nil
- } else {
- yyv4 := &x.Data
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceLargeStruct((*[]LargeStruct)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *XLStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Data = nil
- } else {
- yyv7 := &x.Data
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSliceLargeStruct((*[]LargeStruct)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) encSliceHashtag(v []Hashtag, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceHashtag(v *[]Hashtag, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Hashtag{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Hashtag, yyrl1)
- }
- } else {
- yyv1 = make([]Hashtag, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Hashtag{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Hashtag{}) // var yyz1 Hashtag
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Hashtag{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSlicePtrtostring(v []*string, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if yyv1 == nil {
- r.EncodeNil()
- } else {
- yy2 := *yyv1
- yym3 := z.EncBinary()
- _ = yym3
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy2))
- }
- }
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSlicePtrtostring(v *[]*string, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []*string{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]*string, yyrl1)
- }
- } else {
- yyv1 = make([]*string, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw2 := yyv1[yyj1]
- yym3 := z.DecBinary()
- _ = yym3
- if false {
- } else {
- *((*string)(yyw2)) = r.DecodeString()
- }
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, nil)
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw4 := yyv1[yyj1]
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(yyw4)) = r.DecodeString()
- }
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, nil) // var yyz1 *string
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw6 := yyv1[yyj1]
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyw6)) = r.DecodeString()
- }
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []*string{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceURL(v []URL, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceURL(v *[]URL, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []URL{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 48)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]URL, yyrl1)
- }
- } else {
- yyv1 = make([]URL, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, URL{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, URL{}) // var yyz1 URL
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []URL{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceStatus(v []Status, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceStatus(v *[]Status, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Status{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Status, yyrl1)
- }
- } else {
- yyv1 = make([]Status, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Status{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Status{}) // var yyz1 Status
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Status{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceLargeStruct(v []LargeStruct, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceLargeStruct(v *[]LargeStruct, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []LargeStruct{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 136)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]LargeStruct, yyrl1)
- }
- } else {
- yyv1 = make([]LargeStruct, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, LargeStruct{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, LargeStruct{}) // var yyz1 LargeStruct
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []LargeStruct{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go b/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go
deleted file mode 100644
index 9f000d3ad..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go
+++ /dev/null
@@ -1,6723 +0,0 @@
-// +build use_ffjson
-
-// DO NOT EDIT!
-// Code generated by ffjson <https://github.com/pquerna/ffjson>
-// source: .root/src/github.com/mailru/easyjson/benchmark/data.go
-// DO NOT EDIT!
-
-package benchmark
-
-import (
- "bytes"
- "errors"
- "fmt"
- fflib "github.com/pquerna/ffjson/fflib/v1"
-)
-
-func (mj *Entities) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Entities) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"hashtags":`)
- if mj.Hashtags != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Hashtags {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"user_mentions":`)
- if mj.UserMentions != nil {
- buf.WriteString(`[`)
- for i, v := range mj.UserMentions {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Entitiesbase = iota
- ffj_t_Entitiesno_such_key
-
- ffj_t_Entities_Hashtags
-
- ffj_t_Entities_Urls
-
- ffj_t_Entities_UserMentions
-)
-
-var ffj_key_Entities_Hashtags = []byte("hashtags")
-
-var ffj_key_Entities_Urls = []byte("urls")
-
-var ffj_key_Entities_UserMentions = []byte("user_mentions")
-
-func (uj *Entities) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Entities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Entitiesbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Entitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'h':
-
- if bytes.Equal(ffj_key_Entities_Hashtags, kn) {
- currentKey = ffj_t_Entities_Hashtags
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_Entities_Urls, kn) {
- currentKey = ffj_t_Entities_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Entities_UserMentions, kn) {
- currentKey = ffj_t_Entities_UserMentions
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_UserMentions, kn) {
- currentKey = ffj_t_Entities_UserMentions
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_Urls, kn) {
- currentKey = ffj_t_Entities_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_Hashtags, kn) {
- currentKey = ffj_t_Entities_Hashtags
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Entitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Entities_Hashtags:
- goto handle_Hashtags
-
- case ffj_t_Entities_Urls:
- goto handle_Urls
-
- case ffj_t_Entities_UserMentions:
- goto handle_UserMentions
-
- case ffj_t_Entitiesno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Hashtags:
-
- /* handler: uj.Hashtags type=[]benchmark.Hashtag kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Hashtags = nil
- } else {
-
- uj.Hashtags = make([]Hashtag, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Hashtags Hashtag
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Hashtags type=benchmark.Hashtag kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Hashtags.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Hashtags = append(uj.Hashtags, tmp_uj__Hashtags)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__Urls = nil
- } else {
- if tmp_uj__Urls == nil {
- tmp_uj__Urls = new(string)
- }
-
- /* handler: tmp_uj__Urls type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__Urls = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__Urls = &tval
-
- }
- }
-
- }
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UserMentions:
-
- /* handler: uj.UserMentions type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.UserMentions = nil
- } else {
-
- uj.UserMentions = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__UserMentions *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__UserMentions type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__UserMentions = nil
- } else {
- if tmp_uj__UserMentions == nil {
- tmp_uj__UserMentions = new(string)
- }
-
- /* handler: tmp_uj__UserMentions type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__UserMentions = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__UserMentions = &tval
-
- }
- }
-
- }
- }
-
- uj.UserMentions = append(uj.UserMentions, tmp_uj__UserMentions)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *Hashtag) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Hashtag) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"indices":`)
- if mj.Indices != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Indices {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.FormatBits2(buf, uint64(v), 10, v < 0)
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"text":`)
- fflib.WriteJsonString(buf, string(mj.Text))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Hashtagbase = iota
- ffj_t_Hashtagno_such_key
-
- ffj_t_Hashtag_Indices
-
- ffj_t_Hashtag_Text
-)
-
-var ffj_key_Hashtag_Indices = []byte("indices")
-
-var ffj_key_Hashtag_Text = []byte("text")
-
-func (uj *Hashtag) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Hashtag) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Hashtagbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Hashtagno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'i':
-
- if bytes.Equal(ffj_key_Hashtag_Indices, kn) {
- currentKey = ffj_t_Hashtag_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_Hashtag_Text, kn) {
- currentKey = ffj_t_Hashtag_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Hashtag_Text, kn) {
- currentKey = ffj_t_Hashtag_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Hashtag_Indices, kn) {
- currentKey = ffj_t_Hashtag_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Hashtagno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Hashtag_Indices:
- goto handle_Indices
-
- case ffj_t_Hashtag_Text:
- goto handle_Text
-
- case ffj_t_Hashtagno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Indices:
-
- /* handler: uj.Indices type=[]int kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Indices = nil
- } else {
-
- uj.Indices = make([]int, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Indices int
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Indices type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- tmp_uj__Indices = int(tval)
-
- }
- }
-
- uj.Indices = append(uj.Indices, tmp_uj__Indices)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Text:
-
- /* handler: uj.Text type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Text = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *LargeStruct) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *LargeStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"search_metadata":`)
-
- {
-
- err = mj.SearchMetadata.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"statuses":`)
- if mj.Statuses != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Statuses {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_LargeStructbase = iota
- ffj_t_LargeStructno_such_key
-
- ffj_t_LargeStruct_SearchMetadata
-
- ffj_t_LargeStruct_Statuses
-)
-
-var ffj_key_LargeStruct_SearchMetadata = []byte("search_metadata")
-
-var ffj_key_LargeStruct_Statuses = []byte("statuses")
-
-func (uj *LargeStruct) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *LargeStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_LargeStructbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_LargeStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 's':
-
- if bytes.Equal(ffj_key_LargeStruct_SearchMetadata, kn) {
- currentKey = ffj_t_LargeStruct_SearchMetadata
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_LargeStruct_Statuses, kn) {
- currentKey = ffj_t_LargeStruct_Statuses
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_LargeStruct_Statuses, kn) {
- currentKey = ffj_t_LargeStruct_Statuses
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_LargeStruct_SearchMetadata, kn) {
- currentKey = ffj_t_LargeStruct_SearchMetadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_LargeStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_LargeStruct_SearchMetadata:
- goto handle_SearchMetadata
-
- case ffj_t_LargeStruct_Statuses:
- goto handle_Statuses
-
- case ffj_t_LargeStructno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_SearchMetadata:
-
- /* handler: uj.SearchMetadata type=benchmark.SearchMetadata kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.SearchMetadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Statuses:
-
- /* handler: uj.Statuses type=[]benchmark.Status kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Statuses = nil
- } else {
-
- uj.Statuses = make([]Status, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Statuses Status
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Statuses type=benchmark.Status kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Statuses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Statuses = append(uj.Statuses, tmp_uj__Statuses)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *SearchMetadata) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *SearchMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"completed_in":`)
- fflib.AppendFloat(buf, float64(mj.CompletedIn), 'g', -1, 64)
- buf.WriteString(`,"count":`)
- fflib.FormatBits2(buf, uint64(mj.Count), 10, mj.Count < 0)
- buf.WriteString(`,"max_id":`)
- fflib.FormatBits2(buf, uint64(mj.MaxID), 10, mj.MaxID < 0)
- buf.WriteString(`,"max_id_str":`)
- fflib.WriteJsonString(buf, string(mj.MaxIDStr))
- buf.WriteString(`,"next_results":`)
- fflib.WriteJsonString(buf, string(mj.NextResults))
- buf.WriteString(`,"query":`)
- fflib.WriteJsonString(buf, string(mj.Query))
- buf.WriteString(`,"refresh_url":`)
- fflib.WriteJsonString(buf, string(mj.RefreshURL))
- buf.WriteString(`,"since_id":`)
- fflib.FormatBits2(buf, uint64(mj.SinceID), 10, mj.SinceID < 0)
- buf.WriteString(`,"since_id_str":`)
- fflib.WriteJsonString(buf, string(mj.SinceIDStr))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_SearchMetadatabase = iota
- ffj_t_SearchMetadatano_such_key
-
- ffj_t_SearchMetadata_CompletedIn
-
- ffj_t_SearchMetadata_Count
-
- ffj_t_SearchMetadata_MaxID
-
- ffj_t_SearchMetadata_MaxIDStr
-
- ffj_t_SearchMetadata_NextResults
-
- ffj_t_SearchMetadata_Query
-
- ffj_t_SearchMetadata_RefreshURL
-
- ffj_t_SearchMetadata_SinceID
-
- ffj_t_SearchMetadata_SinceIDStr
-)
-
-var ffj_key_SearchMetadata_CompletedIn = []byte("completed_in")
-
-var ffj_key_SearchMetadata_Count = []byte("count")
-
-var ffj_key_SearchMetadata_MaxID = []byte("max_id")
-
-var ffj_key_SearchMetadata_MaxIDStr = []byte("max_id_str")
-
-var ffj_key_SearchMetadata_NextResults = []byte("next_results")
-
-var ffj_key_SearchMetadata_Query = []byte("query")
-
-var ffj_key_SearchMetadata_RefreshURL = []byte("refresh_url")
-
-var ffj_key_SearchMetadata_SinceID = []byte("since_id")
-
-var ffj_key_SearchMetadata_SinceIDStr = []byte("since_id_str")
-
-func (uj *SearchMetadata) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *SearchMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_SearchMetadatabase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_SearchMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_SearchMetadata_CompletedIn, kn) {
- currentKey = ffj_t_SearchMetadata_CompletedIn
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_Count, kn) {
- currentKey = ffj_t_SearchMetadata_Count
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffj_key_SearchMetadata_MaxID, kn) {
- currentKey = ffj_t_SearchMetadata_MaxID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_MaxIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_MaxIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffj_key_SearchMetadata_NextResults, kn) {
- currentKey = ffj_t_SearchMetadata_NextResults
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'q':
-
- if bytes.Equal(ffj_key_SearchMetadata_Query, kn) {
- currentKey = ffj_t_SearchMetadata_Query
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_SearchMetadata_RefreshURL, kn) {
- currentKey = ffj_t_SearchMetadata_RefreshURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_SearchMetadata_SinceID, kn) {
- currentKey = ffj_t_SearchMetadata_SinceID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_SinceIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_SinceIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_SinceIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceID, kn) {
- currentKey = ffj_t_SearchMetadata_SinceID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_RefreshURL, kn) {
- currentKey = ffj_t_SearchMetadata_RefreshURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Query, kn) {
- currentKey = ffj_t_SearchMetadata_Query
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_NextResults, kn) {
- currentKey = ffj_t_SearchMetadata_NextResults
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_MaxIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_MaxIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_SearchMetadata_MaxID, kn) {
- currentKey = ffj_t_SearchMetadata_MaxID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Count, kn) {
- currentKey = ffj_t_SearchMetadata_Count
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_SearchMetadata_CompletedIn, kn) {
- currentKey = ffj_t_SearchMetadata_CompletedIn
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_SearchMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_SearchMetadata_CompletedIn:
- goto handle_CompletedIn
-
- case ffj_t_SearchMetadata_Count:
- goto handle_Count
-
- case ffj_t_SearchMetadata_MaxID:
- goto handle_MaxID
-
- case ffj_t_SearchMetadata_MaxIDStr:
- goto handle_MaxIDStr
-
- case ffj_t_SearchMetadata_NextResults:
- goto handle_NextResults
-
- case ffj_t_SearchMetadata_Query:
- goto handle_Query
-
- case ffj_t_SearchMetadata_RefreshURL:
- goto handle_RefreshURL
-
- case ffj_t_SearchMetadata_SinceID:
- goto handle_SinceID
-
- case ffj_t_SearchMetadata_SinceIDStr:
- goto handle_SinceIDStr
-
- case ffj_t_SearchMetadatano_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_CompletedIn:
-
- /* handler: uj.CompletedIn type=float64 kind=float64 quoted=false*/
-
- {
- if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.CompletedIn = float64(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Count:
-
- /* handler: uj.Count type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.Count = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MaxID:
-
- /* handler: uj.MaxID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.MaxID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MaxIDStr:
-
- /* handler: uj.MaxIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.MaxIDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_NextResults:
-
- /* handler: uj.NextResults type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.NextResults = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Query:
-
- /* handler: uj.Query type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Query = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RefreshURL:
-
- /* handler: uj.RefreshURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.RefreshURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_SinceID:
-
- /* handler: uj.SinceID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.SinceID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_SinceIDStr:
-
- /* handler: uj.SinceIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.SinceIDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *Status) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Status) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.Contributors != nil {
- buf.WriteString(`{"contributors":`)
- fflib.WriteJsonString(buf, string(*mj.Contributors))
- } else {
- buf.WriteString(`{"contributors":null`)
- }
- if mj.Coordinates != nil {
- buf.WriteString(`,"coordinates":`)
- fflib.WriteJsonString(buf, string(*mj.Coordinates))
- } else {
- buf.WriteString(`,"coordinates":null`)
- }
- buf.WriteString(`,"created_at":`)
- fflib.WriteJsonString(buf, string(mj.CreatedAt))
- buf.WriteString(`,"entities":`)
-
- {
-
- err = mj.Entities.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- if mj.Favorited {
- buf.WriteString(`,"favorited":true`)
- } else {
- buf.WriteString(`,"favorited":false`)
- }
- if mj.Geo != nil {
- buf.WriteString(`,"geo":`)
- fflib.WriteJsonString(buf, string(*mj.Geo))
- } else {
- buf.WriteString(`,"geo":null`)
- }
- buf.WriteString(`,"id":`)
- fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
- buf.WriteString(`,"id_str":`)
- fflib.WriteJsonString(buf, string(mj.IDStr))
- if mj.InReplyToScreenName != nil {
- buf.WriteString(`,"in_reply_to_screen_name":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToScreenName))
- } else {
- buf.WriteString(`,"in_reply_to_screen_name":null`)
- }
- if mj.InReplyToStatusID != nil {
- buf.WriteString(`,"in_reply_to_status_id":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToStatusID))
- } else {
- buf.WriteString(`,"in_reply_to_status_id":null`)
- }
- if mj.InReplyToStatusIDStr != nil {
- buf.WriteString(`,"in_reply_to_status_id_str":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToStatusIDStr))
- } else {
- buf.WriteString(`,"in_reply_to_status_id_str":null`)
- }
- if mj.InReplyToUserID != nil {
- buf.WriteString(`,"in_reply_to_user_id":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToUserID))
- } else {
- buf.WriteString(`,"in_reply_to_user_id":null`)
- }
- if mj.InReplyToUserIDStr != nil {
- buf.WriteString(`,"in_reply_to_user_id_str":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToUserIDStr))
- } else {
- buf.WriteString(`,"in_reply_to_user_id_str":null`)
- }
- buf.WriteString(`,"metadata":`)
-
- {
-
- err = mj.Metadata.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- if mj.Place != nil {
- buf.WriteString(`,"place":`)
- fflib.WriteJsonString(buf, string(*mj.Place))
- } else {
- buf.WriteString(`,"place":null`)
- }
- buf.WriteString(`,"retweet_count":`)
- fflib.FormatBits2(buf, uint64(mj.RetweetCount), 10, mj.RetweetCount < 0)
- if mj.Retweeted {
- buf.WriteString(`,"retweeted":true`)
- } else {
- buf.WriteString(`,"retweeted":false`)
- }
- buf.WriteString(`,"source":`)
- fflib.WriteJsonString(buf, string(mj.Source))
- buf.WriteString(`,"text":`)
- fflib.WriteJsonString(buf, string(mj.Text))
- if mj.Truncated {
- buf.WriteString(`,"truncated":true`)
- } else {
- buf.WriteString(`,"truncated":false`)
- }
- buf.WriteString(`,"user":`)
-
- {
-
- err = mj.User.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Statusbase = iota
- ffj_t_Statusno_such_key
-
- ffj_t_Status_Contributors
-
- ffj_t_Status_Coordinates
-
- ffj_t_Status_CreatedAt
-
- ffj_t_Status_Entities
-
- ffj_t_Status_Favorited
-
- ffj_t_Status_Geo
-
- ffj_t_Status_ID
-
- ffj_t_Status_IDStr
-
- ffj_t_Status_InReplyToScreenName
-
- ffj_t_Status_InReplyToStatusID
-
- ffj_t_Status_InReplyToStatusIDStr
-
- ffj_t_Status_InReplyToUserID
-
- ffj_t_Status_InReplyToUserIDStr
-
- ffj_t_Status_Metadata
-
- ffj_t_Status_Place
-
- ffj_t_Status_RetweetCount
-
- ffj_t_Status_Retweeted
-
- ffj_t_Status_Source
-
- ffj_t_Status_Text
-
- ffj_t_Status_Truncated
-
- ffj_t_Status_User
-)
-
-var ffj_key_Status_Contributors = []byte("contributors")
-
-var ffj_key_Status_Coordinates = []byte("coordinates")
-
-var ffj_key_Status_CreatedAt = []byte("created_at")
-
-var ffj_key_Status_Entities = []byte("entities")
-
-var ffj_key_Status_Favorited = []byte("favorited")
-
-var ffj_key_Status_Geo = []byte("geo")
-
-var ffj_key_Status_ID = []byte("id")
-
-var ffj_key_Status_IDStr = []byte("id_str")
-
-var ffj_key_Status_InReplyToScreenName = []byte("in_reply_to_screen_name")
-
-var ffj_key_Status_InReplyToStatusID = []byte("in_reply_to_status_id")
-
-var ffj_key_Status_InReplyToStatusIDStr = []byte("in_reply_to_status_id_str")
-
-var ffj_key_Status_InReplyToUserID = []byte("in_reply_to_user_id")
-
-var ffj_key_Status_InReplyToUserIDStr = []byte("in_reply_to_user_id_str")
-
-var ffj_key_Status_Metadata = []byte("metadata")
-
-var ffj_key_Status_Place = []byte("place")
-
-var ffj_key_Status_RetweetCount = []byte("retweet_count")
-
-var ffj_key_Status_Retweeted = []byte("retweeted")
-
-var ffj_key_Status_Source = []byte("source")
-
-var ffj_key_Status_Text = []byte("text")
-
-var ffj_key_Status_Truncated = []byte("truncated")
-
-var ffj_key_Status_User = []byte("user")
-
-func (uj *Status) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Status) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Statusbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Statusno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_Status_Contributors, kn) {
- currentKey = ffj_t_Status_Contributors
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Coordinates, kn) {
- currentKey = ffj_t_Status_Coordinates
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_CreatedAt, kn) {
- currentKey = ffj_t_Status_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffj_key_Status_Entities, kn) {
- currentKey = ffj_t_Status_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'f':
-
- if bytes.Equal(ffj_key_Status_Favorited, kn) {
- currentKey = ffj_t_Status_Favorited
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'g':
-
- if bytes.Equal(ffj_key_Status_Geo, kn) {
- currentKey = ffj_t_Status_Geo
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_Status_ID, kn) {
- currentKey = ffj_t_Status_ID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_IDStr, kn) {
- currentKey = ffj_t_Status_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToScreenName, kn) {
- currentKey = ffj_t_Status_InReplyToScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToStatusID, kn) {
- currentKey = ffj_t_Status_InReplyToStatusID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToStatusIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToStatusIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToUserID, kn) {
- currentKey = ffj_t_Status_InReplyToUserID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToUserIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToUserIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffj_key_Status_Metadata, kn) {
- currentKey = ffj_t_Status_Metadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffj_key_Status_Place, kn) {
- currentKey = ffj_t_Status_Place
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_Status_RetweetCount, kn) {
- currentKey = ffj_t_Status_RetweetCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Retweeted, kn) {
- currentKey = ffj_t_Status_Retweeted
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_Status_Source, kn) {
- currentKey = ffj_t_Status_Source
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_Status_Text, kn) {
- currentKey = ffj_t_Status_Text
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Truncated, kn) {
- currentKey = ffj_t_Status_Truncated
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_Status_User, kn) {
- currentKey = ffj_t_Status_User
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_User, kn) {
- currentKey = ffj_t_Status_User
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Truncated, kn) {
- currentKey = ffj_t_Status_Truncated
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Text, kn) {
- currentKey = ffj_t_Status_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Source, kn) {
- currentKey = ffj_t_Status_Source
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Retweeted, kn) {
- currentKey = ffj_t_Status_Retweeted
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_Status_RetweetCount, kn) {
- currentKey = ffj_t_Status_RetweetCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Place, kn) {
- currentKey = ffj_t_Status_Place
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Metadata, kn) {
- currentKey = ffj_t_Status_Metadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToUserIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserID, kn) {
- currentKey = ffj_t_Status_InReplyToUserID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToStatusIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusID, kn) {
- currentKey = ffj_t_Status_InReplyToStatusID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToScreenName, kn) {
- currentKey = ffj_t_Status_InReplyToScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_IDStr, kn) {
- currentKey = ffj_t_Status_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_ID, kn) {
- currentKey = ffj_t_Status_ID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Geo, kn) {
- currentKey = ffj_t_Status_Geo
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Favorited, kn) {
- currentKey = ffj_t_Status_Favorited
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Entities, kn) {
- currentKey = ffj_t_Status_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_Status_CreatedAt, kn) {
- currentKey = ffj_t_Status_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Coordinates, kn) {
- currentKey = ffj_t_Status_Coordinates
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Contributors, kn) {
- currentKey = ffj_t_Status_Contributors
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Statusno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Status_Contributors:
- goto handle_Contributors
-
- case ffj_t_Status_Coordinates:
- goto handle_Coordinates
-
- case ffj_t_Status_CreatedAt:
- goto handle_CreatedAt
-
- case ffj_t_Status_Entities:
- goto handle_Entities
-
- case ffj_t_Status_Favorited:
- goto handle_Favorited
-
- case ffj_t_Status_Geo:
- goto handle_Geo
-
- case ffj_t_Status_ID:
- goto handle_ID
-
- case ffj_t_Status_IDStr:
- goto handle_IDStr
-
- case ffj_t_Status_InReplyToScreenName:
- goto handle_InReplyToScreenName
-
- case ffj_t_Status_InReplyToStatusID:
- goto handle_InReplyToStatusID
-
- case ffj_t_Status_InReplyToStatusIDStr:
- goto handle_InReplyToStatusIDStr
-
- case ffj_t_Status_InReplyToUserID:
- goto handle_InReplyToUserID
-
- case ffj_t_Status_InReplyToUserIDStr:
- goto handle_InReplyToUserIDStr
-
- case ffj_t_Status_Metadata:
- goto handle_Metadata
-
- case ffj_t_Status_Place:
- goto handle_Place
-
- case ffj_t_Status_RetweetCount:
- goto handle_RetweetCount
-
- case ffj_t_Status_Retweeted:
- goto handle_Retweeted
-
- case ffj_t_Status_Source:
- goto handle_Source
-
- case ffj_t_Status_Text:
- goto handle_Text
-
- case ffj_t_Status_Truncated:
- goto handle_Truncated
-
- case ffj_t_Status_User:
- goto handle_User
-
- case ffj_t_Statusno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Contributors:
-
- /* handler: uj.Contributors type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Contributors = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Contributors = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Coordinates:
-
- /* handler: uj.Coordinates type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Coordinates = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Coordinates = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedAt:
-
- /* handler: uj.CreatedAt type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.CreatedAt = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Entities:
-
- /* handler: uj.Entities type=benchmark.Entities kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Favorited:
-
- /* handler: uj.Favorited type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Favorited = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Favorited = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Geo:
-
- /* handler: uj.Geo type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Geo = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Geo = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ID:
-
- /* handler: uj.ID type=int64 kind=int64 quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ID = int64(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IDStr:
-
- /* handler: uj.IDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToScreenName:
-
- /* handler: uj.InReplyToScreenName type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToScreenName = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToScreenName = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToStatusID:
-
- /* handler: uj.InReplyToStatusID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToStatusID = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToStatusID = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToStatusIDStr:
-
- /* handler: uj.InReplyToStatusIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToStatusIDStr = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToStatusIDStr = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToUserID:
-
- /* handler: uj.InReplyToUserID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToUserID = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToUserID = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToUserIDStr:
-
- /* handler: uj.InReplyToUserIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToUserIDStr = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToUserIDStr = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Metadata:
-
- /* handler: uj.Metadata type=benchmark.StatusMetadata kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Metadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Place:
-
- /* handler: uj.Place type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Place = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Place = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RetweetCount:
-
- /* handler: uj.RetweetCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.RetweetCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Retweeted:
-
- /* handler: uj.Retweeted type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Retweeted = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Retweeted = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Source:
-
- /* handler: uj.Source type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Source = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Text:
-
- /* handler: uj.Text type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Text = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Truncated:
-
- /* handler: uj.Truncated type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Truncated = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Truncated = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_User:
-
- /* handler: uj.User type=benchmark.User kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.User.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *StatusMetadata) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *StatusMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"iso_language_code":`)
- fflib.WriteJsonString(buf, string(mj.IsoLanguageCode))
- buf.WriteString(`,"result_type":`)
- fflib.WriteJsonString(buf, string(mj.ResultType))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_StatusMetadatabase = iota
- ffj_t_StatusMetadatano_such_key
-
- ffj_t_StatusMetadata_IsoLanguageCode
-
- ffj_t_StatusMetadata_ResultType
-)
-
-var ffj_key_StatusMetadata_IsoLanguageCode = []byte("iso_language_code")
-
-var ffj_key_StatusMetadata_ResultType = []byte("result_type")
-
-func (uj *StatusMetadata) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *StatusMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_StatusMetadatabase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_StatusMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'i':
-
- if bytes.Equal(ffj_key_StatusMetadata_IsoLanguageCode, kn) {
- currentKey = ffj_t_StatusMetadata_IsoLanguageCode
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_StatusMetadata_ResultType, kn) {
- currentKey = ffj_t_StatusMetadata_ResultType
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_StatusMetadata_ResultType, kn) {
- currentKey = ffj_t_StatusMetadata_ResultType
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_StatusMetadata_IsoLanguageCode, kn) {
- currentKey = ffj_t_StatusMetadata_IsoLanguageCode
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_StatusMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_StatusMetadata_IsoLanguageCode:
- goto handle_IsoLanguageCode
-
- case ffj_t_StatusMetadata_ResultType:
- goto handle_ResultType
-
- case ffj_t_StatusMetadatano_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_IsoLanguageCode:
-
- /* handler: uj.IsoLanguageCode type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IsoLanguageCode = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ResultType:
-
- /* handler: uj.ResultType type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ResultType = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *URL) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *URL) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.ExpandedURL != nil {
- buf.WriteString(`{"expanded_url":`)
- fflib.WriteJsonString(buf, string(*mj.ExpandedURL))
- } else {
- buf.WriteString(`{"expanded_url":null`)
- }
- buf.WriteString(`,"indices":`)
- if mj.Indices != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Indices {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.FormatBits2(buf, uint64(v), 10, v < 0)
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"url":`)
- fflib.WriteJsonString(buf, string(mj.URL))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_URLbase = iota
- ffj_t_URLno_such_key
-
- ffj_t_URL_ExpandedURL
-
- ffj_t_URL_Indices
-
- ffj_t_URL_URL
-)
-
-var ffj_key_URL_ExpandedURL = []byte("expanded_url")
-
-var ffj_key_URL_Indices = []byte("indices")
-
-var ffj_key_URL_URL = []byte("url")
-
-func (uj *URL) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *URL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_URLbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_URLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'e':
-
- if bytes.Equal(ffj_key_URL_ExpandedURL, kn) {
- currentKey = ffj_t_URL_ExpandedURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_URL_Indices, kn) {
- currentKey = ffj_t_URL_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_URL_URL, kn) {
- currentKey = ffj_t_URL_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_URL_URL, kn) {
- currentKey = ffj_t_URL_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_URL_Indices, kn) {
- currentKey = ffj_t_URL_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_URL_ExpandedURL, kn) {
- currentKey = ffj_t_URL_ExpandedURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_URLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_URL_ExpandedURL:
- goto handle_ExpandedURL
-
- case ffj_t_URL_Indices:
- goto handle_Indices
-
- case ffj_t_URL_URL:
- goto handle_URL
-
- case ffj_t_URLno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ExpandedURL:
-
- /* handler: uj.ExpandedURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.ExpandedURL = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.ExpandedURL = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Indices:
-
- /* handler: uj.Indices type=[]int kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Indices = nil
- } else {
-
- uj.Indices = make([]int, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Indices int
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Indices type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- tmp_uj__Indices = int(tval)
-
- }
- }
-
- uj.Indices = append(uj.Indices, tmp_uj__Indices)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.URL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *User) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.ContributorsEnabled {
- buf.WriteString(`{"contributors_enabled":true`)
- } else {
- buf.WriteString(`{"contributors_enabled":false`)
- }
- buf.WriteString(`,"created_at":`)
- fflib.WriteJsonString(buf, string(mj.CreatedAt))
- if mj.DefaultProfile {
- buf.WriteString(`,"default_profile":true`)
- } else {
- buf.WriteString(`,"default_profile":false`)
- }
- if mj.DefaultProfileImage {
- buf.WriteString(`,"default_profile_image":true`)
- } else {
- buf.WriteString(`,"default_profile_image":false`)
- }
- buf.WriteString(`,"description":`)
- fflib.WriteJsonString(buf, string(mj.Description))
- buf.WriteString(`,"entities":`)
-
- {
-
- err = mj.Entities.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"favourites_count":`)
- fflib.FormatBits2(buf, uint64(mj.FavouritesCount), 10, mj.FavouritesCount < 0)
- if mj.FollowRequestSent != nil {
- buf.WriteString(`,"follow_request_sent":`)
- fflib.WriteJsonString(buf, string(*mj.FollowRequestSent))
- } else {
- buf.WriteString(`,"follow_request_sent":null`)
- }
- buf.WriteString(`,"followers_count":`)
- fflib.FormatBits2(buf, uint64(mj.FollowersCount), 10, mj.FollowersCount < 0)
- if mj.Following != nil {
- buf.WriteString(`,"following":`)
- fflib.WriteJsonString(buf, string(*mj.Following))
- } else {
- buf.WriteString(`,"following":null`)
- }
- buf.WriteString(`,"friends_count":`)
- fflib.FormatBits2(buf, uint64(mj.FriendsCount), 10, mj.FriendsCount < 0)
- if mj.GeoEnabled {
- buf.WriteString(`,"geo_enabled":true`)
- } else {
- buf.WriteString(`,"geo_enabled":false`)
- }
- buf.WriteString(`,"id":`)
- fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
- buf.WriteString(`,"id_str":`)
- fflib.WriteJsonString(buf, string(mj.IDStr))
- if mj.IsTranslator {
- buf.WriteString(`,"is_translator":true`)
- } else {
- buf.WriteString(`,"is_translator":false`)
- }
- buf.WriteString(`,"lang":`)
- fflib.WriteJsonString(buf, string(mj.Lang))
- buf.WriteString(`,"listed_count":`)
- fflib.FormatBits2(buf, uint64(mj.ListedCount), 10, mj.ListedCount < 0)
- buf.WriteString(`,"location":`)
- fflib.WriteJsonString(buf, string(mj.Location))
- buf.WriteString(`,"name":`)
- fflib.WriteJsonString(buf, string(mj.Name))
- if mj.Notifications != nil {
- buf.WriteString(`,"notifications":`)
- fflib.WriteJsonString(buf, string(*mj.Notifications))
- } else {
- buf.WriteString(`,"notifications":null`)
- }
- buf.WriteString(`,"profile_background_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundColor))
- buf.WriteString(`,"profile_background_image_url":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURL))
- buf.WriteString(`,"profile_background_image_url_https":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURLHTTPS))
- if mj.ProfileBackgroundTile {
- buf.WriteString(`,"profile_background_tile":true`)
- } else {
- buf.WriteString(`,"profile_background_tile":false`)
- }
- buf.WriteString(`,"profile_image_url":`)
- fflib.WriteJsonString(buf, string(mj.ProfileImageURL))
- buf.WriteString(`,"profile_image_url_https":`)
- fflib.WriteJsonString(buf, string(mj.ProfileImageURLHTTPS))
- buf.WriteString(`,"profile_link_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileLinkColor))
- buf.WriteString(`,"profile_sidebar_border_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileSidebarBorderColor))
- buf.WriteString(`,"profile_sidebar_fill_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileSidebarFillColor))
- buf.WriteString(`,"profile_text_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileTextColor))
- if mj.ProfileUseBackgroundImage {
- buf.WriteString(`,"profile_use_background_image":true`)
- } else {
- buf.WriteString(`,"profile_use_background_image":false`)
- }
- if mj.Protected {
- buf.WriteString(`,"protected":true`)
- } else {
- buf.WriteString(`,"protected":false`)
- }
- buf.WriteString(`,"screen_name":`)
- fflib.WriteJsonString(buf, string(mj.ScreenName))
- if mj.ShowAllInlineMedia {
- buf.WriteString(`,"show_all_inline_media":true`)
- } else {
- buf.WriteString(`,"show_all_inline_media":false`)
- }
- buf.WriteString(`,"statuses_count":`)
- fflib.FormatBits2(buf, uint64(mj.StatusesCount), 10, mj.StatusesCount < 0)
- buf.WriteString(`,"time_zone":`)
- fflib.WriteJsonString(buf, string(mj.TimeZone))
- if mj.URL != nil {
- buf.WriteString(`,"url":`)
- fflib.WriteJsonString(buf, string(*mj.URL))
- } else {
- buf.WriteString(`,"url":null`)
- }
- buf.WriteString(`,"utc_offset":`)
- fflib.FormatBits2(buf, uint64(mj.UtcOffset), 10, mj.UtcOffset < 0)
- if mj.Verified {
- buf.WriteString(`,"verified":true`)
- } else {
- buf.WriteString(`,"verified":false`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Userbase = iota
- ffj_t_Userno_such_key
-
- ffj_t_User_ContributorsEnabled
-
- ffj_t_User_CreatedAt
-
- ffj_t_User_DefaultProfile
-
- ffj_t_User_DefaultProfileImage
-
- ffj_t_User_Description
-
- ffj_t_User_Entities
-
- ffj_t_User_FavouritesCount
-
- ffj_t_User_FollowRequestSent
-
- ffj_t_User_FollowersCount
-
- ffj_t_User_Following
-
- ffj_t_User_FriendsCount
-
- ffj_t_User_GeoEnabled
-
- ffj_t_User_ID
-
- ffj_t_User_IDStr
-
- ffj_t_User_IsTranslator
-
- ffj_t_User_Lang
-
- ffj_t_User_ListedCount
-
- ffj_t_User_Location
-
- ffj_t_User_Name
-
- ffj_t_User_Notifications
-
- ffj_t_User_ProfileBackgroundColor
-
- ffj_t_User_ProfileBackgroundImageURL
-
- ffj_t_User_ProfileBackgroundImageURLHTTPS
-
- ffj_t_User_ProfileBackgroundTile
-
- ffj_t_User_ProfileImageURL
-
- ffj_t_User_ProfileImageURLHTTPS
-
- ffj_t_User_ProfileLinkColor
-
- ffj_t_User_ProfileSidebarBorderColor
-
- ffj_t_User_ProfileSidebarFillColor
-
- ffj_t_User_ProfileTextColor
-
- ffj_t_User_ProfileUseBackgroundImage
-
- ffj_t_User_Protected
-
- ffj_t_User_ScreenName
-
- ffj_t_User_ShowAllInlineMedia
-
- ffj_t_User_StatusesCount
-
- ffj_t_User_TimeZone
-
- ffj_t_User_URL
-
- ffj_t_User_UtcOffset
-
- ffj_t_User_Verified
-)
-
-var ffj_key_User_ContributorsEnabled = []byte("contributors_enabled")
-
-var ffj_key_User_CreatedAt = []byte("created_at")
-
-var ffj_key_User_DefaultProfile = []byte("default_profile")
-
-var ffj_key_User_DefaultProfileImage = []byte("default_profile_image")
-
-var ffj_key_User_Description = []byte("description")
-
-var ffj_key_User_Entities = []byte("entities")
-
-var ffj_key_User_FavouritesCount = []byte("favourites_count")
-
-var ffj_key_User_FollowRequestSent = []byte("follow_request_sent")
-
-var ffj_key_User_FollowersCount = []byte("followers_count")
-
-var ffj_key_User_Following = []byte("following")
-
-var ffj_key_User_FriendsCount = []byte("friends_count")
-
-var ffj_key_User_GeoEnabled = []byte("geo_enabled")
-
-var ffj_key_User_ID = []byte("id")
-
-var ffj_key_User_IDStr = []byte("id_str")
-
-var ffj_key_User_IsTranslator = []byte("is_translator")
-
-var ffj_key_User_Lang = []byte("lang")
-
-var ffj_key_User_ListedCount = []byte("listed_count")
-
-var ffj_key_User_Location = []byte("location")
-
-var ffj_key_User_Name = []byte("name")
-
-var ffj_key_User_Notifications = []byte("notifications")
-
-var ffj_key_User_ProfileBackgroundColor = []byte("profile_background_color")
-
-var ffj_key_User_ProfileBackgroundImageURL = []byte("profile_background_image_url")
-
-var ffj_key_User_ProfileBackgroundImageURLHTTPS = []byte("profile_background_image_url_https")
-
-var ffj_key_User_ProfileBackgroundTile = []byte("profile_background_tile")
-
-var ffj_key_User_ProfileImageURL = []byte("profile_image_url")
-
-var ffj_key_User_ProfileImageURLHTTPS = []byte("profile_image_url_https")
-
-var ffj_key_User_ProfileLinkColor = []byte("profile_link_color")
-
-var ffj_key_User_ProfileSidebarBorderColor = []byte("profile_sidebar_border_color")
-
-var ffj_key_User_ProfileSidebarFillColor = []byte("profile_sidebar_fill_color")
-
-var ffj_key_User_ProfileTextColor = []byte("profile_text_color")
-
-var ffj_key_User_ProfileUseBackgroundImage = []byte("profile_use_background_image")
-
-var ffj_key_User_Protected = []byte("protected")
-
-var ffj_key_User_ScreenName = []byte("screen_name")
-
-var ffj_key_User_ShowAllInlineMedia = []byte("show_all_inline_media")
-
-var ffj_key_User_StatusesCount = []byte("statuses_count")
-
-var ffj_key_User_TimeZone = []byte("time_zone")
-
-var ffj_key_User_URL = []byte("url")
-
-var ffj_key_User_UtcOffset = []byte("utc_offset")
-
-var ffj_key_User_Verified = []byte("verified")
-
-func (uj *User) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *User) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Userbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Userno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_User_ContributorsEnabled, kn) {
- currentKey = ffj_t_User_ContributorsEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_CreatedAt, kn) {
- currentKey = ffj_t_User_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'd':
-
- if bytes.Equal(ffj_key_User_DefaultProfile, kn) {
- currentKey = ffj_t_User_DefaultProfile
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_DefaultProfileImage, kn) {
- currentKey = ffj_t_User_DefaultProfileImage
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Description, kn) {
- currentKey = ffj_t_User_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffj_key_User_Entities, kn) {
- currentKey = ffj_t_User_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'f':
-
- if bytes.Equal(ffj_key_User_FavouritesCount, kn) {
- currentKey = ffj_t_User_FavouritesCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FollowRequestSent, kn) {
- currentKey = ffj_t_User_FollowRequestSent
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FollowersCount, kn) {
- currentKey = ffj_t_User_FollowersCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Following, kn) {
- currentKey = ffj_t_User_Following
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FriendsCount, kn) {
- currentKey = ffj_t_User_FriendsCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'g':
-
- if bytes.Equal(ffj_key_User_GeoEnabled, kn) {
- currentKey = ffj_t_User_GeoEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_User_ID, kn) {
- currentKey = ffj_t_User_ID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_IDStr, kn) {
- currentKey = ffj_t_User_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_IsTranslator, kn) {
- currentKey = ffj_t_User_IsTranslator
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'l':
-
- if bytes.Equal(ffj_key_User_Lang, kn) {
- currentKey = ffj_t_User_Lang
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ListedCount, kn) {
- currentKey = ffj_t_User_ListedCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Location, kn) {
- currentKey = ffj_t_User_Location
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffj_key_User_Name, kn) {
- currentKey = ffj_t_User_Name
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Notifications, kn) {
- currentKey = ffj_t_User_Notifications
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffj_key_User_ProfileBackgroundColor, kn) {
- currentKey = ffj_t_User_ProfileBackgroundColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURL, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundTile, kn) {
- currentKey = ffj_t_User_ProfileBackgroundTile
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileImageURL, kn) {
- currentKey = ffj_t_User_ProfileImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileLinkColor, kn) {
- currentKey = ffj_t_User_ProfileLinkColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileSidebarBorderColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarBorderColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileSidebarFillColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarFillColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileTextColor, kn) {
- currentKey = ffj_t_User_ProfileTextColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileUseBackgroundImage, kn) {
- currentKey = ffj_t_User_ProfileUseBackgroundImage
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Protected, kn) {
- currentKey = ffj_t_User_Protected
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_User_ScreenName, kn) {
- currentKey = ffj_t_User_ScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ShowAllInlineMedia, kn) {
- currentKey = ffj_t_User_ShowAllInlineMedia
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_StatusesCount, kn) {
- currentKey = ffj_t_User_StatusesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_User_TimeZone, kn) {
- currentKey = ffj_t_User_TimeZone
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_User_URL, kn) {
- currentKey = ffj_t_User_URL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_UtcOffset, kn) {
- currentKey = ffj_t_User_UtcOffset
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'v':
-
- if bytes.Equal(ffj_key_User_Verified, kn) {
- currentKey = ffj_t_User_Verified
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Verified, kn) {
- currentKey = ffj_t_User_Verified
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_UtcOffset, kn) {
- currentKey = ffj_t_User_UtcOffset
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_URL, kn) {
- currentKey = ffj_t_User_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_TimeZone, kn) {
- currentKey = ffj_t_User_TimeZone
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_StatusesCount, kn) {
- currentKey = ffj_t_User_StatusesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ShowAllInlineMedia, kn) {
- currentKey = ffj_t_User_ShowAllInlineMedia
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ScreenName, kn) {
- currentKey = ffj_t_User_ScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Protected, kn) {
- currentKey = ffj_t_User_Protected
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileUseBackgroundImage, kn) {
- currentKey = ffj_t_User_ProfileUseBackgroundImage
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_ProfileTextColor, kn) {
- currentKey = ffj_t_User_ProfileTextColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarFillColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarFillColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarBorderColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarBorderColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileLinkColor, kn) {
- currentKey = ffj_t_User_ProfileLinkColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_ProfileImageURL, kn) {
- currentKey = ffj_t_User_ProfileImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundTile, kn) {
- currentKey = ffj_t_User_ProfileBackgroundTile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURL, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundColor, kn) {
- currentKey = ffj_t_User_ProfileBackgroundColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Notifications, kn) {
- currentKey = ffj_t_User_Notifications
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Name, kn) {
- currentKey = ffj_t_User_Name
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Location, kn) {
- currentKey = ffj_t_User_Location
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ListedCount, kn) {
- currentKey = ffj_t_User_ListedCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Lang, kn) {
- currentKey = ffj_t_User_Lang
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_IsTranslator, kn) {
- currentKey = ffj_t_User_IsTranslator
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_IDStr, kn) {
- currentKey = ffj_t_User_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_ID, kn) {
- currentKey = ffj_t_User_ID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_GeoEnabled, kn) {
- currentKey = ffj_t_User_GeoEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FriendsCount, kn) {
- currentKey = ffj_t_User_FriendsCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Following, kn) {
- currentKey = ffj_t_User_Following
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FollowersCount, kn) {
- currentKey = ffj_t_User_FollowersCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FollowRequestSent, kn) {
- currentKey = ffj_t_User_FollowRequestSent
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FavouritesCount, kn) {
- currentKey = ffj_t_User_FavouritesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Entities, kn) {
- currentKey = ffj_t_User_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Description, kn) {
- currentKey = ffj_t_User_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_DefaultProfileImage, kn) {
- currentKey = ffj_t_User_DefaultProfileImage
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_DefaultProfile, kn) {
- currentKey = ffj_t_User_DefaultProfile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_CreatedAt, kn) {
- currentKey = ffj_t_User_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ContributorsEnabled, kn) {
- currentKey = ffj_t_User_ContributorsEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Userno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_User_ContributorsEnabled:
- goto handle_ContributorsEnabled
-
- case ffj_t_User_CreatedAt:
- goto handle_CreatedAt
-
- case ffj_t_User_DefaultProfile:
- goto handle_DefaultProfile
-
- case ffj_t_User_DefaultProfileImage:
- goto handle_DefaultProfileImage
-
- case ffj_t_User_Description:
- goto handle_Description
-
- case ffj_t_User_Entities:
- goto handle_Entities
-
- case ffj_t_User_FavouritesCount:
- goto handle_FavouritesCount
-
- case ffj_t_User_FollowRequestSent:
- goto handle_FollowRequestSent
-
- case ffj_t_User_FollowersCount:
- goto handle_FollowersCount
-
- case ffj_t_User_Following:
- goto handle_Following
-
- case ffj_t_User_FriendsCount:
- goto handle_FriendsCount
-
- case ffj_t_User_GeoEnabled:
- goto handle_GeoEnabled
-
- case ffj_t_User_ID:
- goto handle_ID
-
- case ffj_t_User_IDStr:
- goto handle_IDStr
-
- case ffj_t_User_IsTranslator:
- goto handle_IsTranslator
-
- case ffj_t_User_Lang:
- goto handle_Lang
-
- case ffj_t_User_ListedCount:
- goto handle_ListedCount
-
- case ffj_t_User_Location:
- goto handle_Location
-
- case ffj_t_User_Name:
- goto handle_Name
-
- case ffj_t_User_Notifications:
- goto handle_Notifications
-
- case ffj_t_User_ProfileBackgroundColor:
- goto handle_ProfileBackgroundColor
-
- case ffj_t_User_ProfileBackgroundImageURL:
- goto handle_ProfileBackgroundImageURL
-
- case ffj_t_User_ProfileBackgroundImageURLHTTPS:
- goto handle_ProfileBackgroundImageURLHTTPS
-
- case ffj_t_User_ProfileBackgroundTile:
- goto handle_ProfileBackgroundTile
-
- case ffj_t_User_ProfileImageURL:
- goto handle_ProfileImageURL
-
- case ffj_t_User_ProfileImageURLHTTPS:
- goto handle_ProfileImageURLHTTPS
-
- case ffj_t_User_ProfileLinkColor:
- goto handle_ProfileLinkColor
-
- case ffj_t_User_ProfileSidebarBorderColor:
- goto handle_ProfileSidebarBorderColor
-
- case ffj_t_User_ProfileSidebarFillColor:
- goto handle_ProfileSidebarFillColor
-
- case ffj_t_User_ProfileTextColor:
- goto handle_ProfileTextColor
-
- case ffj_t_User_ProfileUseBackgroundImage:
- goto handle_ProfileUseBackgroundImage
-
- case ffj_t_User_Protected:
- goto handle_Protected
-
- case ffj_t_User_ScreenName:
- goto handle_ScreenName
-
- case ffj_t_User_ShowAllInlineMedia:
- goto handle_ShowAllInlineMedia
-
- case ffj_t_User_StatusesCount:
- goto handle_StatusesCount
-
- case ffj_t_User_TimeZone:
- goto handle_TimeZone
-
- case ffj_t_User_URL:
- goto handle_URL
-
- case ffj_t_User_UtcOffset:
- goto handle_UtcOffset
-
- case ffj_t_User_Verified:
- goto handle_Verified
-
- case ffj_t_Userno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ContributorsEnabled:
-
- /* handler: uj.ContributorsEnabled type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ContributorsEnabled = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ContributorsEnabled = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedAt:
-
- /* handler: uj.CreatedAt type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.CreatedAt = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DefaultProfile:
-
- /* handler: uj.DefaultProfile type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfile = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfile = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DefaultProfileImage:
-
- /* handler: uj.DefaultProfileImage type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfileImage = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfileImage = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Description:
-
- /* handler: uj.Description type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Description = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Entities:
-
- /* handler: uj.Entities type=benchmark.UserEntities kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FavouritesCount:
-
- /* handler: uj.FavouritesCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FavouritesCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FollowRequestSent:
-
- /* handler: uj.FollowRequestSent type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.FollowRequestSent = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.FollowRequestSent = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FollowersCount:
-
- /* handler: uj.FollowersCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FollowersCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Following:
-
- /* handler: uj.Following type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Following = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Following = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FriendsCount:
-
- /* handler: uj.FriendsCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FriendsCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_GeoEnabled:
-
- /* handler: uj.GeoEnabled type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.GeoEnabled = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.GeoEnabled = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ID:
-
- /* handler: uj.ID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IDStr:
-
- /* handler: uj.IDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IsTranslator:
-
- /* handler: uj.IsTranslator type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.IsTranslator = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.IsTranslator = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Lang:
-
- /* handler: uj.Lang type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Lang = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ListedCount:
-
- /* handler: uj.ListedCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ListedCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Location:
-
- /* handler: uj.Location type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Location = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Name:
-
- /* handler: uj.Name type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Name = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Notifications:
-
- /* handler: uj.Notifications type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Notifications = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Notifications = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundColor:
-
- /* handler: uj.ProfileBackgroundColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundImageURL:
-
- /* handler: uj.ProfileBackgroundImageURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundImageURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundImageURLHTTPS:
-
- /* handler: uj.ProfileBackgroundImageURLHTTPS type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundImageURLHTTPS = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundTile:
-
- /* handler: uj.ProfileBackgroundTile type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ProfileBackgroundTile = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ProfileBackgroundTile = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileImageURL:
-
- /* handler: uj.ProfileImageURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileImageURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileImageURLHTTPS:
-
- /* handler: uj.ProfileImageURLHTTPS type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileImageURLHTTPS = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileLinkColor:
-
- /* handler: uj.ProfileLinkColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileLinkColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileSidebarBorderColor:
-
- /* handler: uj.ProfileSidebarBorderColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileSidebarBorderColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileSidebarFillColor:
-
- /* handler: uj.ProfileSidebarFillColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileSidebarFillColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileTextColor:
-
- /* handler: uj.ProfileTextColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileTextColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileUseBackgroundImage:
-
- /* handler: uj.ProfileUseBackgroundImage type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ProfileUseBackgroundImage = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ProfileUseBackgroundImage = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Protected:
-
- /* handler: uj.Protected type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Protected = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Protected = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ScreenName:
-
- /* handler: uj.ScreenName type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ScreenName = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ShowAllInlineMedia:
-
- /* handler: uj.ShowAllInlineMedia type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ShowAllInlineMedia = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ShowAllInlineMedia = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StatusesCount:
-
- /* handler: uj.StatusesCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.StatusesCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_TimeZone:
-
- /* handler: uj.TimeZone type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.TimeZone = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.URL = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.URL = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UtcOffset:
-
- /* handler: uj.UtcOffset type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.UtcOffset = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Verified:
-
- /* handler: uj.Verified type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Verified = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Verified = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntities) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntities) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"description":`)
-
- {
-
- err = mj.Description.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"url":`)
-
- {
-
- err = mj.URL.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntitiesbase = iota
- ffj_t_UserEntitiesno_such_key
-
- ffj_t_UserEntities_Description
-
- ffj_t_UserEntities_URL
-)
-
-var ffj_key_UserEntities_Description = []byte("description")
-
-var ffj_key_UserEntities_URL = []byte("url")
-
-func (uj *UserEntities) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntitiesbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'd':
-
- if bytes.Equal(ffj_key_UserEntities_Description, kn) {
- currentKey = ffj_t_UserEntities_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntities_URL, kn) {
- currentKey = ffj_t_UserEntities_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_UserEntities_URL, kn) {
- currentKey = ffj_t_UserEntities_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntities_Description, kn) {
- currentKey = ffj_t_UserEntities_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntities_Description:
- goto handle_Description
-
- case ffj_t_UserEntities_URL:
- goto handle_URL
-
- case ffj_t_UserEntitiesno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Description:
-
- /* handler: uj.Description type=benchmark.UserEntityDescription kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Description.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=benchmark.UserEntityURL kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.URL.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntityDescription) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntityDescription) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntityDescriptionbase = iota
- ffj_t_UserEntityDescriptionno_such_key
-
- ffj_t_UserEntityDescription_Urls
-)
-
-var ffj_key_UserEntityDescription_Urls = []byte("urls")
-
-func (uj *UserEntityDescription) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntityDescription) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntityDescriptionbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntityDescriptionno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntityDescription_Urls, kn) {
- currentKey = ffj_t_UserEntityDescription_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntityDescription_Urls, kn) {
- currentKey = ffj_t_UserEntityDescription_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntityDescriptionno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntityDescription_Urls:
- goto handle_Urls
-
- case ffj_t_UserEntityDescriptionno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__Urls = nil
- } else {
- if tmp_uj__Urls == nil {
- tmp_uj__Urls = new(string)
- }
-
- /* handler: tmp_uj__Urls type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__Urls = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__Urls = &tval
-
- }
- }
-
- }
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntityURL) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntityURL) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntityURLbase = iota
- ffj_t_UserEntityURLno_such_key
-
- ffj_t_UserEntityURL_Urls
-)
-
-var ffj_key_UserEntityURL_Urls = []byte("urls")
-
-func (uj *UserEntityURL) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntityURL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntityURLbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntityURLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntityURL_Urls, kn) {
- currentKey = ffj_t_UserEntityURL_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntityURL_Urls, kn) {
- currentKey = ffj_t_UserEntityURL_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntityURLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntityURL_Urls:
- goto handle_Urls
-
- case ffj_t_UserEntityURLno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]benchmark.URL kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]URL, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls URL
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=benchmark.URL kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Urls.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *XLStruct) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *XLStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"Data":`)
- if mj.Data != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Data {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_XLStructbase = iota
- ffj_t_XLStructno_such_key
-
- ffj_t_XLStruct_Data
-)
-
-var ffj_key_XLStruct_Data = []byte("Data")
-
-func (uj *XLStruct) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *XLStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_XLStructbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_XLStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'D':
-
- if bytes.Equal(ffj_key_XLStruct_Data, kn) {
- currentKey = ffj_t_XLStruct_Data
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_XLStruct_Data, kn) {
- currentKey = ffj_t_XLStruct_Data
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_XLStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_XLStruct_Data:
- goto handle_Data
-
- case ffj_t_XLStructno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Data:
-
- /* handler: uj.Data type=[]benchmark.LargeStruct kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Data = nil
- } else {
-
- uj.Data = make([]LargeStruct, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Data LargeStruct
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Data type=benchmark.LargeStruct kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Data.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Data = append(uj.Data, tmp_uj__Data)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_var.go b/vendor/github.com/mailru/easyjson/benchmark/data_var.go
deleted file mode 100644
index ea4202dbe..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_var.go
+++ /dev/null
@@ -1,350 +0,0 @@
-package benchmark
-
-var largeStructData = LargeStruct{
- SearchMetadata: SearchMetadata{
- CompletedIn: 0.035,
- Count: 4,
- MaxID: 250126199840518145,
- MaxIDStr: "250126199840518145",
- NextResults: "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed",
- Query: "%23freebandnames",
- RefreshURL: "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1",
- SinceID: 24012619984051000,
- SinceIDStr: "24012619984051000",
- },
- Statuses: []Status{
- {
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Mon Sep 24 03:35:21 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "freebandnames"},
- },
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 250075927172759552,
- IDStr: "250075927172759552",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "<a href=\"//itunes.apple.com/us/app/twitter/id409789998?mt=12%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for Mac</a>",
- Text: "Aggressive Ponytail #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Mon Apr 26 06:01:55 +0000 2010",
- DefaultProfile: true,
- DefaultProfileImage: false,
- Description: "Born 330 Live 310",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: []*string{},
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 0},
- URL: "",
- }},
- },
- },
- FavouritesCount: 0,
- FollowRequestSent: nil,
- FollowersCount: 70,
- Following: nil,
- FriendsCount: 110,
- GeoEnabled: true,
- ID: 137238150,
- IDStr: "137238150",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 2,
- Location: "LA, CA",
- Name: "Sean Cummings",
- Notifications: nil,
- ProfileBackgroundColor: "C0DEED",
- ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme1/bg.png",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme1/bg.png",
- ProfileBackgroundTile: false,
- ProfileImageURL: "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- ProfileLinkColor: "0084B4",
- ProfileSidebarBorderColor: "C0DEED",
- ProfileSidebarFillColor: "DDEEF6",
- ProfileTextColor: "333333",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "sean_cummings",
- ShowAllInlineMedia: false,
- StatusesCount: 579,
- TimeZone: "Pacific Time (US & Canada)",
- URL: nil,
- UtcOffset: -28800,
- Verified: false,
- },
- },
- {
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 23:40:54 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "FreeBandNames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249292149810667520,
- IDStr: "249292149810667520",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "pl",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "web",
- Text: "Thee Namaste Nerdz. #FreeBandNames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Tue Apr 07 19:05:07 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.",
- Entities: UserEntities{
- Description: UserEntityDescription{Urls: []*string{}},
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 32},
- URL: "http://bullcityrecords.com/wnng/"}},
- },
- },
- FavouritesCount: 8,
- FollowRequestSent: nil,
- FollowersCount: 2052,
- Following: nil,
- FriendsCount: 348,
- GeoEnabled: false,
- ID: 29516238,
- IDStr: "29516238",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 118,
- Location: "Durham, NC",
- Name: "Chaz Martenstein",
- Notifications: nil,
- ProfileBackgroundColor: "9AE4E8",
- ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- ProfileBackgroundTile: true,
- ProfileImageURL: "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- ProfileLinkColor: "0084B4",
- ProfileSidebarBorderColor: "BDDCAD",
- ProfileSidebarFillColor: "DDFFCC",
- ProfileTextColor: "333333",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "bullcityrecords",
- ShowAllInlineMedia: true,
- StatusesCount: 7579,
- TimeZone: "Eastern Time (US & Canada)",
- URL: nil,
- UtcOffset: -18000,
- Verified: false,
- },
- },
- Status{
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 23:30:20 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{29, 43},
- Text: "freebandnames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249289491129438208,
- IDStr: "249289491129438208",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "web",
- Text: "Mexican Heaven, Mexican Hell #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Tue Sep 01 21:21:35 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: nil,
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 0},
- URL: "",
- }},
- },
- },
- FavouritesCount: 19,
- FollowRequestSent: nil,
- FollowersCount: 63,
- Following: nil,
- FriendsCount: 63,
- GeoEnabled: false,
- ID: 70789458,
- IDStr: "70789458",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 1,
- Location: "Kingston New York",
- Name: "Thomas John Wakeman",
- Notifications: nil,
- ProfileBackgroundColor: "352726",
- ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme5/bg.gif",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme5/bg.gif",
- ProfileBackgroundTile: false,
- ProfileImageURL: "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- ProfileLinkColor: "D02B55",
- ProfileSidebarBorderColor: "829D5E",
- ProfileSidebarFillColor: "99CC33",
- ProfileTextColor: "3E4415",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "MonkiesFist",
- ShowAllInlineMedia: false,
- StatusesCount: 1048,
- TimeZone: "Eastern Time (US & Canada)",
- URL: nil,
- UtcOffset: -18000,
- Verified: false,
- },
- },
- Status{
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 22:51:18 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "freebandnames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249279667666817024,
- IDStr: "249279667666817024",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "<a href=\"//twitter.com/download/iphone%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for iPhone</a>",
- Text: "The Foolish Mortals #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Mon May 04 00:05:00 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "Cartoonist, Illustrator, and T-Shirt connoisseur",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: []*string{},
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 24},
- URL: "http://www.omnitarian.me",
- }},
- },
- },
- FavouritesCount: 647,
- FollowRequestSent: nil,
- FollowersCount: 608,
- Following: nil,
- FriendsCount: 249,
- GeoEnabled: false,
- ID: 37539828,
- IDStr: "37539828",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 52,
- Location: "Wisconsin, USA",
- Name: "Marty Elmer",
- Notifications: nil,
- ProfileBackgroundColor: "EEE3C4",
- ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- ProfileBackgroundTile: true,
- ProfileImageURL: "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- ProfileLinkColor: "3B2A26",
- ProfileSidebarBorderColor: "615A44",
- ProfileSidebarFillColor: "BFAC83",
- ProfileTextColor: "000000",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "Omnitarian",
- ShowAllInlineMedia: true,
- StatusesCount: 3575,
- TimeZone: "Central Time (US & Canada)",
- URL: nil,
- UtcOffset: -21600,
- Verified: false,
- },
- },
- },
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/default_test.go b/vendor/github.com/mailru/easyjson/benchmark/default_test.go
deleted file mode 100644
index 68b37910d..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/default_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// +build !use_easyjson,!use_ffjson,!use_codec,!use_jsoniter
-
-package benchmark
-
-import (
- "encoding/json"
- "testing"
-)
-
-func BenchmarkStd_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := json.Unmarshal(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkStd_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := json.Unmarshal(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkStd_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_M_ToWriter(b *testing.B) {
- enc := json.NewEncoder(&DummyWriter{})
- for i := 0; i < b.N; i++ {
- err := enc.Encode(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go b/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go
deleted file mode 100644
index 3d928ca7c..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package benchmark
-
-import (
- "testing"
-)
-
-type DummyWriter struct{}
-
-func (w DummyWriter) Write(data []byte) (int, error) { return len(data), nil }
-
-func TestToSuppressNoTestsWarning(t *testing.T) {}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go
deleted file mode 100644
index 16b670b27..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// +build use_easyjson
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jwriter"
-)
-
-func BenchmarkEJ_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := s.UnmarshalJSON(largeStructText)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkEJ_Unmarshal_S(b *testing.B) {
- b.SetBytes(int64(len(smallStructText)))
-
- for i := 0; i < b.N; i++ {
- var s Entities
- err := s.UnmarshalJSON(smallStructText)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkEJ_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := easyjson.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := easyjson.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L_ToWriter(b *testing.B) {
- var l int64
- out := &DummyWriter{}
- for i := 0; i < b.N; i++ {
- w := jwriter.Writer{}
- xlStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- b.SetBytes(l)
-
-}
-func BenchmarkEJ_Marshal_M_Parallel(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- _, err := largeStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- }
- })
-}
-
-func BenchmarkEJ_Marshal_M_ToWriter(b *testing.B) {
- var l int64
- out := &DummyWriter{}
- for i := 0; i < b.N; i++ {
- w := jwriter.Writer{}
- largeStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- b.SetBytes(l)
-
-}
-func BenchmarkEJ_Marshal_M_ToWriter_Parallel(b *testing.B) {
- out := &DummyWriter{}
-
- b.RunParallel(func(pb *testing.PB) {
- var l int64
- for pb.Next() {
- w := jwriter.Writer{}
- largeStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- if l > 0 {
- b.SetBytes(l)
- }
- })
-
-}
-
-func BenchmarkEJ_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := xlStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L_ToWriter_Parallel(b *testing.B) {
- out := &DummyWriter{}
- b.RunParallel(func(pb *testing.PB) {
- var l int64
- for pb.Next() {
- w := jwriter.Writer{}
-
- xlStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
- l = int64(w.Size())
- w.DumpTo(out)
- }
- if l > 0 {
- b.SetBytes(l)
- }
- })
-}
-
-func BenchmarkEJ_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := smallStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := smallStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/example.json b/vendor/github.com/mailru/easyjson/benchmark/example.json
deleted file mode 100644
index 2405022cf..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/example.json
+++ /dev/null
@@ -1,415 +0,0 @@
-{
- "statuses": [
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Mon Sep 24 03:35:21 +0000 2012",
- "id_str": "250075927172759552",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Aggressive Ponytail #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 250075927172759552,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "DDEEF6",
- "profile_sidebar_border_color": "C0DEED",
- "profile_background_tile": false,
- "name": "Sean Cummings",
- "profile_image_url": "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- "created_at": "Mon Apr 26 06:01:55 +0000 2010",
- "location": "LA, CA",
- "follow_request_sent": null,
- "profile_link_color": "0084B4",
- "is_translator": false,
- "id_str": "137238150",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "",
- "indices": [
- 0,
- 0
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": true,
- "contributors_enabled": false,
- "favourites_count": 0,
- "url": null,
- "profile_image_url_https": "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- "utc_offset": -28800,
- "id": 137238150,
- "profile_use_background_image": true,
- "listed_count": 2,
- "profile_text_color": "333333",
- "lang": "en",
- "followers_count": 70,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png",
- "profile_background_color": "C0DEED",
- "verified": false,
- "geo_enabled": true,
- "time_zone": "Pacific Time (US & Canada)",
- "description": "Born 330 Live 310",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png",
- "statuses_count": 579,
- "friends_count": 110,
- "following": null,
- "show_all_inline_media": false,
- "screen_name": "sean_cummings"
- },
- "in_reply_to_screen_name": null,
- "source": "<a href=\"//itunes.apple.com/us/app/twitter/id409789998?mt=12%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for Mac</a>",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 23:40:54 +0000 2012",
- "id_str": "249292149810667520",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "FreeBandNames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Thee Namaste Nerdz. #FreeBandNames",
- "metadata": {
- "iso_language_code": "pl",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249292149810667520,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "DDFFCC",
- "profile_sidebar_border_color": "BDDCAD",
- "profile_background_tile": true,
- "name": "Chaz Martenstein",
- "profile_image_url": "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- "created_at": "Tue Apr 07 19:05:07 +0000 2009",
- "location": "Durham, NC",
- "follow_request_sent": null,
- "profile_link_color": "0084B4",
- "is_translator": false,
- "id_str": "29516238",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "http://bullcityrecords.com/wnng/",
- "indices": [
- 0,
- 32
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 8,
- "url": "http://bullcityrecords.com/wnng/",
- "profile_image_url_https": "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- "utc_offset": -18000,
- "id": 29516238,
- "profile_use_background_image": true,
- "listed_count": 118,
- "profile_text_color": "333333",
- "lang": "en",
- "followers_count": 2052,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- "profile_background_color": "9AE4E8",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Eastern Time (US & Canada)",
- "description": "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- "statuses_count": 7579,
- "friends_count": 348,
- "following": null,
- "show_all_inline_media": true,
- "screen_name": "bullcityrecords"
- },
- "in_reply_to_screen_name": null,
- "source": "web",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 23:30:20 +0000 2012",
- "id_str": "249289491129438208",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 29,
- 43
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Mexican Heaven, Mexican Hell #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249289491129438208,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "99CC33",
- "profile_sidebar_border_color": "829D5E",
- "profile_background_tile": false,
- "name": "Thomas John Wakeman",
- "profile_image_url": "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- "created_at": "Tue Sep 01 21:21:35 +0000 2009",
- "location": "Kingston New York",
- "follow_request_sent": null,
- "profile_link_color": "D02B55",
- "is_translator": false,
- "id_str": "70789458",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "",
- "indices": [
- 0,
- 0
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 19,
- "url": null,
- "profile_image_url_https": "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- "utc_offset": -18000,
- "id": 70789458,
- "profile_use_background_image": true,
- "listed_count": 1,
- "profile_text_color": "3E4415",
- "lang": "en",
- "followers_count": 63,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme5/bg.gif",
- "profile_background_color": "352726",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Eastern Time (US & Canada)",
- "description": "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/images/themes/theme5/bg.gif",
- "statuses_count": 1048,
- "friends_count": 63,
- "following": null,
- "show_all_inline_media": false,
- "screen_name": "MonkiesFist"
- },
- "in_reply_to_screen_name": null,
- "source": "web",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 22:51:18 +0000 2012",
- "id_str": "249279667666817024",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "The Foolish Mortals #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249279667666817024,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "BFAC83",
- "profile_sidebar_border_color": "615A44",
- "profile_background_tile": true,
- "name": "Marty Elmer",
- "profile_image_url": "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- "created_at": "Mon May 04 00:05:00 +0000 2009",
- "location": "Wisconsin, USA",
- "follow_request_sent": null,
- "profile_link_color": "3B2A26",
- "is_translator": false,
- "id_str": "37539828",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "http://www.omnitarian.me",
- "indices": [
- 0,
- 24
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 647,
- "url": "http://www.omnitarian.me",
- "profile_image_url_https": "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- "utc_offset": -21600,
- "id": 37539828,
- "profile_use_background_image": true,
- "listed_count": 52,
- "profile_text_color": "000000",
- "lang": "en",
- "followers_count": 608,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- "profile_background_color": "EEE3C4",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Central Time (US & Canada)",
- "description": "Cartoonist, Illustrator, and T-Shirt connoisseur",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- "statuses_count": 3575,
- "friends_count": 249,
- "following": null,
- "show_all_inline_media": true,
- "screen_name": "Omnitarian"
- },
- "in_reply_to_screen_name": null,
- "source": "<a href=\"//twitter.com/download/iphone%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for iPhone</a>",
- "in_reply_to_status_id": null
- }
- ],
- "search_metadata": {
- "max_id": 250126199840518145,
- "since_id": 24012619984051000,
- "refresh_url": "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1",
- "next_results": "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed",
- "count": 4,
- "completed_in": 0.035,
- "since_id_str": "24012619984051000",
- "query": "%23freebandnames",
- "max_id_str": "250126199840518145"
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go
deleted file mode 100644
index 03671827c..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// +build use_ffjson
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/pquerna/ffjson/ffjson"
-)
-
-func BenchmarkFF_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := ffjson.UnmarshalFast(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkFF_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := ffjson.UnmarshalFast(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkFF_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_M_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Pool_Parallel(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-func BenchmarkFF_Marshal_M_Pool_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Pool_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go b/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
deleted file mode 100644
index 004f891da..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// +build use_jsoniter
-
-package benchmark
-
-import (
- "testing"
-
- jsoniter "github.com/json-iterator/go"
-)
-
-func BenchmarkJI_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := jsoniter.Unmarshal(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkJI_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := jsoniter.Unmarshal(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkJI_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_ToWriter(b *testing.B) {
- enc := jsoniter.NewEncoder(&DummyWriter{})
- for i := 0; i < b.N; i++ {
- err := enc.Encode(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh b/vendor/github.com/mailru/easyjson/benchmark/ujson.sh
deleted file mode 100755
index 378e7df46..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#/bin/bash
-
-echo -n "Python ujson module, DECODE: "
-python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)'
-
-echo -n "Python ujson module, ENCODE: "
-python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)'
diff --git a/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go b/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go
deleted file mode 100644
index 3c20e09ca..000000000
--- a/vendor/github.com/mailru/easyjson/bootstrap/bootstrap.go
+++ /dev/null
@@ -1,188 +0,0 @@
-// Package bootstrap implements the bootstrapping logic: generation of a .go file to
-// launch the actual generator and launching the generator itself.
-//
-// The package may be preferred to a command-line utility if generating the serializers
-// from golang code is required.
-package bootstrap
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "sort"
-)
-
-const genPackage = "github.com/mailru/easyjson/gen"
-const pkgWriter = "github.com/mailru/easyjson/jwriter"
-const pkgLexer = "github.com/mailru/easyjson/jlexer"
-
-type Generator struct {
- PkgPath, PkgName string
- Types []string
-
- NoStdMarshalers bool
- SnakeCase bool
- LowerCamelCase bool
- OmitEmpty bool
-
- OutName string
- BuildTags string
-
- StubsOnly bool
- LeaveTemps bool
- NoFormat bool
-}
-
-// writeStub outputs an initial stubs for marshalers/unmarshalers so that the package
-// using marshalers/unmarshales compiles correctly for boostrapping code.
-func (g *Generator) writeStub() error {
- f, err := os.Create(g.OutName)
- if err != nil {
- return err
- }
- defer f.Close()
-
- if g.BuildTags != "" {
- fmt.Fprintln(f, "// +build ", g.BuildTags)
- fmt.Fprintln(f)
- }
- fmt.Fprintln(f, "// TEMPORARY AUTOGENERATED FILE: easyjson stub code to make the package")
- fmt.Fprintln(f, "// compilable during generation.")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "package ", g.PkgName)
-
- if len(g.Types) > 0 {
- fmt.Fprintln(f)
- fmt.Fprintln(f, "import (")
- fmt.Fprintln(f, ` "`+pkgWriter+`"`)
- fmt.Fprintln(f, ` "`+pkgLexer+`"`)
- fmt.Fprintln(f, ")")
- }
-
- sort.Strings(g.Types)
- for _, t := range g.Types {
- fmt.Fprintln(f)
- if !g.NoStdMarshalers {
- fmt.Fprintln(f, "func (", t, ") MarshalJSON() ([]byte, error) { return nil, nil }")
- fmt.Fprintln(f, "func (*", t, ") UnmarshalJSON([]byte) error { return nil }")
- }
-
- fmt.Fprintln(f, "func (", t, ") MarshalEasyJSON(w *jwriter.Writer) {}")
- fmt.Fprintln(f, "func (*", t, ") UnmarshalEasyJSON(l *jlexer.Lexer) {}")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "type EasyJSON_exporter_"+t+" *"+t)
- }
- return nil
-}
-
-// writeMain creates a .go file that launches the generator if 'go run'.
-func (g *Generator) writeMain() (path string, err error) {
- f, err := ioutil.TempFile(filepath.Dir(g.OutName), "easyjson-bootstrap")
- if err != nil {
- return "", err
- }
-
- fmt.Fprintln(f, "// +build ignore")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "// TEMPORARY AUTOGENERATED FILE: easyjson bootstapping code to launch")
- fmt.Fprintln(f, "// the actual generator.")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "package main")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "import (")
- fmt.Fprintln(f, ` "fmt"`)
- fmt.Fprintln(f, ` "os"`)
- fmt.Fprintln(f)
- fmt.Fprintf(f, " %q\n", genPackage)
- if len(g.Types) > 0 {
- fmt.Fprintln(f)
- fmt.Fprintf(f, " pkg %q\n", g.PkgPath)
- }
- fmt.Fprintln(f, ")")
- fmt.Fprintln(f)
- fmt.Fprintln(f, "func main() {")
- fmt.Fprintf(f, " g := gen.NewGenerator(%q)\n", filepath.Base(g.OutName))
- fmt.Fprintf(f, " g.SetPkg(%q, %q)\n", g.PkgName, g.PkgPath)
- if g.BuildTags != "" {
- fmt.Fprintf(f, " g.SetBuildTags(%q)\n", g.BuildTags)
- }
- if g.SnakeCase {
- fmt.Fprintln(f, " g.UseSnakeCase()")
- }
- if g.LowerCamelCase {
- fmt.Fprintln(f, " g.UseLowerCamelCase()")
- }
- if g.OmitEmpty {
- fmt.Fprintln(f, " g.OmitEmpty()")
- }
- if g.NoStdMarshalers {
- fmt.Fprintln(f, " g.NoStdMarshalers()")
- }
-
- sort.Strings(g.Types)
- for _, v := range g.Types {
- fmt.Fprintln(f, " g.Add(pkg.EasyJSON_exporter_"+v+"(nil))")
- }
-
- fmt.Fprintln(f, " if err := g.Run(os.Stdout); err != nil {")
- fmt.Fprintln(f, " fmt.Fprintln(os.Stderr, err)")
- fmt.Fprintln(f, " os.Exit(1)")
- fmt.Fprintln(f, " }")
- fmt.Fprintln(f, "}")
-
- src := f.Name()
- if err := f.Close(); err != nil {
- return src, err
- }
-
- dest := src + ".go"
- return dest, os.Rename(src, dest)
-}
-
-func (g *Generator) Run() error {
- if err := g.writeStub(); err != nil {
- return err
- }
- if g.StubsOnly {
- return nil
- }
-
- path, err := g.writeMain()
- if err != nil {
- return err
- }
- if !g.LeaveTemps {
- defer os.Remove(path)
- }
-
- f, err := os.Create(g.OutName + ".tmp")
- if err != nil {
- return err
- }
- if !g.LeaveTemps {
- defer os.Remove(f.Name()) // will not remove after rename
- }
-
- cmd := exec.Command("go", "run", "-tags", g.BuildTags, path)
- cmd.Stdout = f
- cmd.Stderr = os.Stderr
- if err = cmd.Run(); err != nil {
- return err
- }
-
- f.Close()
-
- if !g.NoFormat {
- cmd = exec.Command("gofmt", "-w", f.Name())
- cmd.Stderr = os.Stderr
- cmd.Stdout = os.Stdout
-
- if err = cmd.Run(); err != nil {
- return err
- }
- }
-
- return os.Rename(f.Name(), g.OutName)
-}
diff --git a/vendor/github.com/mailru/easyjson/buffer/pool_test.go b/vendor/github.com/mailru/easyjson/buffer/pool_test.go
deleted file mode 100644
index 680623ace..000000000
--- a/vendor/github.com/mailru/easyjson/buffer/pool_test.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package buffer
-
-import (
- "bytes"
- "testing"
-)
-
-func TestAppendByte(t *testing.T) {
- var b Buffer
- var want []byte
-
- for i := 0; i < 1000; i++ {
- b.AppendByte(1)
- b.AppendByte(2)
- want = append(want, 1, 2)
- }
-
- got := b.BuildBytes()
- if !bytes.Equal(got, want) {
- t.Errorf("BuildBytes() = %v; want %v", got, want)
- }
-}
-
-func TestAppendBytes(t *testing.T) {
- var b Buffer
- var want []byte
-
- for i := 0; i < 1000; i++ {
- b.AppendBytes([]byte{1, 2})
- want = append(want, 1, 2)
- }
-
- got := b.BuildBytes()
- if !bytes.Equal(got, want) {
- t.Errorf("BuildBytes() = %v; want %v", got, want)
- }
-}
-
-func TestAppendString(t *testing.T) {
- var b Buffer
- var want []byte
-
- s := "test"
- for i := 0; i < 1000; i++ {
- b.AppendBytes([]byte(s))
- want = append(want, s...)
- }
-
- got := b.BuildBytes()
- if !bytes.Equal(got, want) {
- t.Errorf("BuildBytes() = %v; want %v", got, want)
- }
-}
-
-func TestDumpTo(t *testing.T) {
- var b Buffer
- var want []byte
-
- s := "test"
- for i := 0; i < 1000; i++ {
- b.AppendBytes([]byte(s))
- want = append(want, s...)
- }
-
- out := &bytes.Buffer{}
- n, err := b.DumpTo(out)
- if err != nil {
- t.Errorf("DumpTo() error: %v", err)
- }
-
- got := out.Bytes()
- if !bytes.Equal(got, want) {
- t.Errorf("DumpTo(): got %v; want %v", got, want)
- }
-
- if n != len(want) {
- t.Errorf("DumpTo() = %v; want %v", n, len(want))
- }
-}
-
-func TestReadCloser(t *testing.T) {
- var b Buffer
- var want []byte
-
- s := "test"
- for i := 0; i < 1000; i++ {
- b.AppendBytes([]byte(s))
- want = append(want, s...)
- }
-
- out := &bytes.Buffer{}
- rc := b.ReadCloser()
- n, err := out.ReadFrom(rc)
- if err != nil {
- t.Errorf("ReadCloser() error: %v", err)
- }
- rc.Close() // Will always return nil
-
- got := out.Bytes()
- if !bytes.Equal(got, want) {
- t.Errorf("DumpTo(): got %v; want %v", got, want)
- }
-
- if n != int64(len(want)) {
- t.Errorf("DumpTo() = %v; want %v", n, len(want))
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/easyjson/main.go b/vendor/github.com/mailru/easyjson/easyjson/main.go
deleted file mode 100644
index 1cd30bb36..000000000
--- a/vendor/github.com/mailru/easyjson/easyjson/main.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package main
-
-import (
- "errors"
- "flag"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/mailru/easyjson/bootstrap"
- // Reference the gen package to be friendly to vendoring tools,
- // as it is an indirect dependency.
- // (The temporary bootstrapping code uses it.)
- _ "github.com/mailru/easyjson/gen"
- "github.com/mailru/easyjson/parser"
-)
-
-var buildTags = flag.String("build_tags", "", "build tags to add to generated file")
-var snakeCase = flag.Bool("snake_case", false, "use snake_case names instead of CamelCase by default")
-var lowerCamelCase = flag.Bool("lower_camel_case", false, "use lowerCamelCase names instead of CamelCase by default")
-var noStdMarshalers = flag.Bool("no_std_marshalers", false, "don't generate MarshalJSON/UnmarshalJSON funcs")
-var omitEmpty = flag.Bool("omit_empty", false, "omit empty fields by default")
-var allStructs = flag.Bool("all", false, "generate marshaler/unmarshalers for all structs in a file")
-var leaveTemps = flag.Bool("leave_temps", false, "do not delete temporary files")
-var stubs = flag.Bool("stubs", false, "only generate stubs for marshaler/unmarshaler funcs")
-var noformat = flag.Bool("noformat", false, "do not run 'gofmt -w' on output file")
-var specifiedName = flag.String("output_filename", "", "specify the filename of the output")
-var processPkg = flag.Bool("pkg", false, "process the whole package instead of just the given file")
-
-func generate(fname string) (err error) {
- fInfo, err := os.Stat(fname)
- if err != nil {
- return err
- }
-
- p := parser.Parser{AllStructs: *allStructs}
- if err := p.Parse(fname, fInfo.IsDir()); err != nil {
- return fmt.Errorf("Error parsing %v: %v", fname, err)
- }
-
- var outName string
- if fInfo.IsDir() {
- outName = filepath.Join(fname, p.PkgName+"_easyjson.go")
- } else {
- if s := strings.TrimSuffix(fname, ".go"); s == fname {
- return errors.New("Filename must end in '.go'")
- } else {
- outName = s + "_easyjson.go"
- }
- }
-
- if *specifiedName != "" {
- outName = *specifiedName
- }
-
- var trimmedBuildTags string
- if *buildTags != "" {
- trimmedBuildTags = strings.TrimSpace(*buildTags)
- }
-
- g := bootstrap.Generator{
- BuildTags: trimmedBuildTags,
- PkgPath: p.PkgPath,
- PkgName: p.PkgName,
- Types: p.StructNames,
- SnakeCase: *snakeCase,
- LowerCamelCase: *lowerCamelCase,
- NoStdMarshalers: *noStdMarshalers,
- OmitEmpty: *omitEmpty,
- LeaveTemps: *leaveTemps,
- OutName: outName,
- StubsOnly: *stubs,
- NoFormat: *noformat,
- }
-
- if err := g.Run(); err != nil {
- return fmt.Errorf("Bootstrap failed: %v", err)
- }
- return nil
-}
-
-func main() {
- flag.Parse()
-
- files := flag.Args()
-
- gofile := os.Getenv("GOFILE")
- if *processPkg {
- gofile = filepath.Dir(gofile)
- }
-
- if len(files) == 0 && gofile != "" {
- files = []string{gofile}
- } else if len(files) == 0 {
- flag.Usage()
- os.Exit(1)
- }
-
- for _, fname := range files {
- if err := generate(fname); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/gen/decoder.go b/vendor/github.com/mailru/easyjson/gen/decoder.go
deleted file mode 100644
index 021933ac8..000000000
--- a/vendor/github.com/mailru/easyjson/gen/decoder.go
+++ /dev/null
@@ -1,489 +0,0 @@
-package gen
-
-import (
- "encoding"
- "encoding/json"
- "fmt"
- "reflect"
- "strings"
- "unicode"
-
- "github.com/mailru/easyjson"
-)
-
-// Target this byte size for initial slice allocation to reduce garbage collection.
-const minSliceBytes = 64
-
-func (g *Generator) getDecoderName(t reflect.Type) string {
- return g.functionName("decode", t)
-}
-
-var primitiveDecoders = map[reflect.Kind]string{
- reflect.String: "in.String()",
- reflect.Bool: "in.Bool()",
- reflect.Int: "in.Int()",
- reflect.Int8: "in.Int8()",
- reflect.Int16: "in.Int16()",
- reflect.Int32: "in.Int32()",
- reflect.Int64: "in.Int64()",
- reflect.Uint: "in.Uint()",
- reflect.Uint8: "in.Uint8()",
- reflect.Uint16: "in.Uint16()",
- reflect.Uint32: "in.Uint32()",
- reflect.Uint64: "in.Uint64()",
- reflect.Float32: "in.Float32()",
- reflect.Float64: "in.Float64()",
-}
-
-var primitiveStringDecoders = map[reflect.Kind]string{
- reflect.String: "in.String()",
- reflect.Int: "in.IntStr()",
- reflect.Int8: "in.Int8Str()",
- reflect.Int16: "in.Int16Str()",
- reflect.Int32: "in.Int32Str()",
- reflect.Int64: "in.Int64Str()",
- reflect.Uint: "in.UintStr()",
- reflect.Uint8: "in.Uint8Str()",
- reflect.Uint16: "in.Uint16Str()",
- reflect.Uint32: "in.Uint32Str()",
- reflect.Uint64: "in.Uint64Str()",
- reflect.Uintptr: "in.UintptrStr()",
-}
-
-var customDecoders = map[string]string{
- "json.Number": "in.JsonNumber()",
-}
-
-// genTypeDecoder generates decoding code for the type t, but uses unmarshaler interface if implemented by t.
-func (g *Generator) genTypeDecoder(t reflect.Type, out string, tags fieldTags, indent int) error {
- ws := strings.Repeat(" ", indent)
-
- unmarshalerIface := reflect.TypeOf((*easyjson.Unmarshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(unmarshalerIface) {
- fmt.Fprintln(g.out, ws+"("+out+").UnmarshalEasyJSON(in)")
- return nil
- }
-
- unmarshalerIface = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(unmarshalerIface) {
- fmt.Fprintln(g.out, ws+"if data := in.Raw(); in.Ok() {")
- fmt.Fprintln(g.out, ws+" in.AddError( ("+out+").UnmarshalJSON(data) )")
- fmt.Fprintln(g.out, ws+"}")
- return nil
- }
-
- unmarshalerIface = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(unmarshalerIface) {
- fmt.Fprintln(g.out, ws+"if data := in.UnsafeBytes(); in.Ok() {")
- fmt.Fprintln(g.out, ws+" in.AddError( ("+out+").UnmarshalText(data) )")
- fmt.Fprintln(g.out, ws+"}")
- return nil
- }
-
- err := g.genTypeDecoderNoCheck(t, out, tags, indent)
- return err
-}
-
-// genTypeDecoderNoCheck generates decoding code for the type t.
-func (g *Generator) genTypeDecoderNoCheck(t reflect.Type, out string, tags fieldTags, indent int) error {
- ws := strings.Repeat(" ", indent)
- // Check whether type is primitive, needs to be done after interface check.
- if dec := customDecoders[t.String()]; dec != "" {
- fmt.Fprintln(g.out, ws+out+" = "+dec)
- return nil
- } else if dec := primitiveStringDecoders[t.Kind()]; dec != "" && tags.asString {
- fmt.Fprintln(g.out, ws+out+" = "+g.getType(t)+"("+dec+")")
- return nil
- } else if dec := primitiveDecoders[t.Kind()]; dec != "" {
- fmt.Fprintln(g.out, ws+out+" = "+g.getType(t)+"("+dec+")")
- return nil
- }
-
- switch t.Kind() {
- case reflect.Slice:
- tmpVar := g.uniqueVarName()
- elem := t.Elem()
-
- if elem.Kind() == reflect.Uint8 {
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+" "+out+" = nil")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" "+out+" = in.Bytes()")
- fmt.Fprintln(g.out, ws+"}")
-
- } else {
-
- capacity := minSliceBytes / elem.Size()
- if capacity == 0 {
- capacity = 1
- }
-
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+" "+out+" = nil")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" in.Delim('[')")
- fmt.Fprintln(g.out, ws+" if "+out+" == nil {")
- fmt.Fprintln(g.out, ws+" if !in.IsDelim(']') {")
- fmt.Fprintln(g.out, ws+" "+out+" = make("+g.getType(t)+", 0, "+fmt.Sprint(capacity)+")")
- fmt.Fprintln(g.out, ws+" } else {")
- fmt.Fprintln(g.out, ws+" "+out+" = "+g.getType(t)+"{}")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" } else { ")
- fmt.Fprintln(g.out, ws+" "+out+" = ("+out+")[:0]")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" for !in.IsDelim(']') {")
- fmt.Fprintln(g.out, ws+" var "+tmpVar+" "+g.getType(elem))
-
- if err := g.genTypeDecoder(elem, tmpVar, tags, indent+2); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+" "+out+" = append("+out+", "+tmpVar+")")
- fmt.Fprintln(g.out, ws+" in.WantComma()")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" in.Delim(']')")
- fmt.Fprintln(g.out, ws+"}")
- }
-
- case reflect.Array:
- iterVar := g.uniqueVarName()
- elem := t.Elem()
-
- if elem.Kind() == reflect.Uint8 {
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" copy("+out+"[:], in.Bytes())")
- fmt.Fprintln(g.out, ws+"}")
-
- } else {
-
- length := t.Len()
-
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" in.Delim('[')")
- fmt.Fprintln(g.out, ws+" "+iterVar+" := 0")
- fmt.Fprintln(g.out, ws+" for !in.IsDelim(']') {")
- fmt.Fprintln(g.out, ws+" if "+iterVar+" < "+fmt.Sprint(length)+" {")
-
- if err := g.genTypeDecoder(elem, out+"["+iterVar+"]", tags, indent+3); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+" "+iterVar+"++")
- fmt.Fprintln(g.out, ws+" } else {")
- fmt.Fprintln(g.out, ws+" in.SkipRecursive()")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" in.WantComma()")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" in.Delim(']')")
- fmt.Fprintln(g.out, ws+"}")
- }
-
- case reflect.Struct:
- dec := g.getDecoderName(t)
- g.addType(t)
-
- fmt.Fprintln(g.out, ws+dec+"(in, &"+out+")")
-
- case reflect.Ptr:
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+" "+out+" = nil")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" if "+out+" == nil {")
- fmt.Fprintln(g.out, ws+" "+out+" = new("+g.getType(t.Elem())+")")
- fmt.Fprintln(g.out, ws+" }")
-
- if err := g.genTypeDecoder(t.Elem(), "*"+out, tags, indent+1); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+"}")
-
- case reflect.Map:
- key := t.Key()
- keyDec, ok := primitiveStringDecoders[key.Kind()]
- if !ok {
- return fmt.Errorf("map type %v not supported: only string and integer keys are allowed", key)
- }
- elem := t.Elem()
- tmpVar := g.uniqueVarName()
-
- fmt.Fprintln(g.out, ws+"if in.IsNull() {")
- fmt.Fprintln(g.out, ws+" in.Skip()")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" in.Delim('{')")
- fmt.Fprintln(g.out, ws+" if !in.IsDelim('}') {")
- fmt.Fprintln(g.out, ws+" "+out+" = make("+g.getType(t)+")")
- fmt.Fprintln(g.out, ws+" } else {")
- fmt.Fprintln(g.out, ws+" "+out+" = nil")
- fmt.Fprintln(g.out, ws+" }")
-
- fmt.Fprintln(g.out, ws+" for !in.IsDelim('}') {")
- fmt.Fprintln(g.out, ws+" key := "+g.getType(key)+"("+keyDec+")")
- fmt.Fprintln(g.out, ws+" in.WantColon()")
- fmt.Fprintln(g.out, ws+" var "+tmpVar+" "+g.getType(elem))
-
- if err := g.genTypeDecoder(elem, tmpVar, tags, indent+2); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+" ("+out+")[key] = "+tmpVar)
- fmt.Fprintln(g.out, ws+" in.WantComma()")
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" in.Delim('}')")
- fmt.Fprintln(g.out, ws+"}")
-
- case reflect.Interface:
- if t.NumMethod() != 0 {
- return fmt.Errorf("interface type %v not supported: only interface{} is allowed", t)
- }
- fmt.Fprintln(g.out, ws+"if m, ok := "+out+".(easyjson.Unmarshaler); ok {")
- fmt.Fprintln(g.out, ws+"m.UnmarshalEasyJSON(in)")
- fmt.Fprintln(g.out, ws+"} else if m, ok := "+out+".(json.Unmarshaler); ok {")
- fmt.Fprintln(g.out, ws+"_ = m.UnmarshalJSON(in.Raw())")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" "+out+" = in.Interface()")
- fmt.Fprintln(g.out, ws+"}")
- default:
- return fmt.Errorf("don't know how to decode %v", t)
- }
- return nil
-
-}
-
-func (g *Generator) genStructFieldDecoder(t reflect.Type, f reflect.StructField) error {
- jsonName := g.fieldNamer.GetJSONFieldName(t, f)
- tags := parseFieldTags(f)
-
- if tags.omit {
- return nil
- }
-
- fmt.Fprintf(g.out, " case %q:\n", jsonName)
- if err := g.genTypeDecoder(f.Type, "out."+f.Name, tags, 3); err != nil {
- return err
- }
-
- if tags.required {
- fmt.Fprintf(g.out, "%sSet = true\n", f.Name)
- }
-
- return nil
-}
-
-func (g *Generator) genRequiredFieldSet(t reflect.Type, f reflect.StructField) {
- tags := parseFieldTags(f)
-
- if !tags.required {
- return
- }
-
- fmt.Fprintf(g.out, "var %sSet bool\n", f.Name)
-}
-
-func (g *Generator) genRequiredFieldCheck(t reflect.Type, f reflect.StructField) {
- jsonName := g.fieldNamer.GetJSONFieldName(t, f)
- tags := parseFieldTags(f)
-
- if !tags.required {
- return
- }
-
- g.imports["fmt"] = "fmt"
-
- fmt.Fprintf(g.out, "if !%sSet {\n", f.Name)
- fmt.Fprintf(g.out, " in.AddError(fmt.Errorf(\"key '%s' is required\"))\n", jsonName)
- fmt.Fprintf(g.out, "}\n")
-}
-
-func mergeStructFields(fields1, fields2 []reflect.StructField) (fields []reflect.StructField) {
- used := map[string]bool{}
- for _, f := range fields2 {
- used[f.Name] = true
- fields = append(fields, f)
- }
-
- for _, f := range fields1 {
- if !used[f.Name] {
- fields = append(fields, f)
- }
- }
- return
-}
-
-func getStructFields(t reflect.Type) ([]reflect.StructField, error) {
- if t.Kind() != reflect.Struct {
- return nil, fmt.Errorf("got %v; expected a struct", t)
- }
-
- var efields []reflect.StructField
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if !f.Anonymous {
- continue
- }
-
- t1 := f.Type
- if t1.Kind() == reflect.Ptr {
- t1 = t1.Elem()
- }
-
- fs, err := getStructFields(t1)
- if err != nil {
- return nil, fmt.Errorf("error processing embedded field: %v", err)
- }
- efields = mergeStructFields(efields, fs)
- }
-
- var fields []reflect.StructField
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if f.Anonymous {
- continue
- }
-
- c := []rune(f.Name)[0]
- if unicode.IsUpper(c) {
- fields = append(fields, f)
- }
- }
- return mergeStructFields(efields, fields), nil
-}
-
-func (g *Generator) genDecoder(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map:
- return g.genSliceArrayDecoder(t)
- default:
- return g.genStructDecoder(t)
- }
-}
-
-func (g *Generator) genSliceArrayDecoder(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map:
- default:
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a slice/array/map type", t)
- }
-
- fname := g.getDecoderName(t)
- typ := g.getType(t)
-
- fmt.Fprintln(g.out, "func "+fname+"(in *jlexer.Lexer, out *"+typ+") {")
- fmt.Fprintln(g.out, " isTopLevel := in.IsStart()")
- err := g.genTypeDecoderNoCheck(t, "*out", fieldTags{}, 1)
- if err != nil {
- return err
- }
- fmt.Fprintln(g.out, " if isTopLevel {")
- fmt.Fprintln(g.out, " in.Consumed()")
- fmt.Fprintln(g.out, " }")
- fmt.Fprintln(g.out, "}")
-
- return nil
-}
-
-func (g *Generator) genStructDecoder(t reflect.Type) error {
- if t.Kind() != reflect.Struct {
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct type", t)
- }
-
- fname := g.getDecoderName(t)
- typ := g.getType(t)
-
- fmt.Fprintln(g.out, "func "+fname+"(in *jlexer.Lexer, out *"+typ+") {")
- fmt.Fprintln(g.out, " isTopLevel := in.IsStart()")
- fmt.Fprintln(g.out, " if in.IsNull() {")
- fmt.Fprintln(g.out, " if isTopLevel {")
- fmt.Fprintln(g.out, " in.Consumed()")
- fmt.Fprintln(g.out, " }")
- fmt.Fprintln(g.out, " in.Skip()")
- fmt.Fprintln(g.out, " return")
- fmt.Fprintln(g.out, " }")
-
- // Init embedded pointer fields.
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if !f.Anonymous || f.Type.Kind() != reflect.Ptr {
- continue
- }
- fmt.Fprintln(g.out, " out."+f.Name+" = new("+g.getType(f.Type.Elem())+")")
- }
-
- fs, err := getStructFields(t)
- if err != nil {
- return fmt.Errorf("cannot generate decoder for %v: %v", t, err)
- }
-
- for _, f := range fs {
- g.genRequiredFieldSet(t, f)
- }
-
- fmt.Fprintln(g.out, " in.Delim('{')")
- fmt.Fprintln(g.out, " for !in.IsDelim('}') {")
- fmt.Fprintln(g.out, " key := in.UnsafeString()")
- fmt.Fprintln(g.out, " in.WantColon()")
- fmt.Fprintln(g.out, " if in.IsNull() {")
- fmt.Fprintln(g.out, " in.Skip()")
- fmt.Fprintln(g.out, " in.WantComma()")
- fmt.Fprintln(g.out, " continue")
- fmt.Fprintln(g.out, " }")
-
- fmt.Fprintln(g.out, " switch key {")
- for _, f := range fs {
- if err := g.genStructFieldDecoder(t, f); err != nil {
- return err
- }
- }
-
- fmt.Fprintln(g.out, " default:")
- fmt.Fprintln(g.out, " in.SkipRecursive()")
- fmt.Fprintln(g.out, " }")
- fmt.Fprintln(g.out, " in.WantComma()")
- fmt.Fprintln(g.out, " }")
- fmt.Fprintln(g.out, " in.Delim('}')")
- fmt.Fprintln(g.out, " if isTopLevel {")
- fmt.Fprintln(g.out, " in.Consumed()")
- fmt.Fprintln(g.out, " }")
-
- for _, f := range fs {
- g.genRequiredFieldCheck(t, f)
- }
-
- fmt.Fprintln(g.out, "}")
-
- return nil
-}
-
-func (g *Generator) genStructUnmarshaler(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map, reflect.Struct:
- default:
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct/slice/array/map type", t)
- }
-
- fname := g.getDecoderName(t)
- typ := g.getType(t)
-
- if !g.noStdMarshalers {
- fmt.Fprintln(g.out, "// UnmarshalJSON supports json.Unmarshaler interface")
- fmt.Fprintln(g.out, "func (v *"+typ+") UnmarshalJSON(data []byte) error {")
- fmt.Fprintln(g.out, " r := jlexer.Lexer{Data: data}")
- fmt.Fprintln(g.out, " "+fname+"(&r, v)")
- fmt.Fprintln(g.out, " return r.Error()")
- fmt.Fprintln(g.out, "}")
- }
-
- fmt.Fprintln(g.out, "// UnmarshalEasyJSON supports easyjson.Unmarshaler interface")
- fmt.Fprintln(g.out, "func (v *"+typ+") UnmarshalEasyJSON(l *jlexer.Lexer) {")
- fmt.Fprintln(g.out, " "+fname+"(l, v)")
- fmt.Fprintln(g.out, "}")
-
- return nil
-}
diff --git a/vendor/github.com/mailru/easyjson/gen/encoder.go b/vendor/github.com/mailru/easyjson/gen/encoder.go
deleted file mode 100644
index 48cba15d4..000000000
--- a/vendor/github.com/mailru/easyjson/gen/encoder.go
+++ /dev/null
@@ -1,382 +0,0 @@
-package gen
-
-import (
- "encoding"
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-
- "github.com/mailru/easyjson"
-)
-
-func (g *Generator) getEncoderName(t reflect.Type) string {
- return g.functionName("encode", t)
-}
-
-var primitiveEncoders = map[reflect.Kind]string{
- reflect.String: "out.String(string(%v))",
- reflect.Bool: "out.Bool(bool(%v))",
- reflect.Int: "out.Int(int(%v))",
- reflect.Int8: "out.Int8(int8(%v))",
- reflect.Int16: "out.Int16(int16(%v))",
- reflect.Int32: "out.Int32(int32(%v))",
- reflect.Int64: "out.Int64(int64(%v))",
- reflect.Uint: "out.Uint(uint(%v))",
- reflect.Uint8: "out.Uint8(uint8(%v))",
- reflect.Uint16: "out.Uint16(uint16(%v))",
- reflect.Uint32: "out.Uint32(uint32(%v))",
- reflect.Uint64: "out.Uint64(uint64(%v))",
- reflect.Float32: "out.Float32(float32(%v))",
- reflect.Float64: "out.Float64(float64(%v))",
-}
-
-var primitiveStringEncoders = map[reflect.Kind]string{
- reflect.String: "out.String(string(%v))",
- reflect.Int: "out.IntStr(int(%v))",
- reflect.Int8: "out.Int8Str(int8(%v))",
- reflect.Int16: "out.Int16Str(int16(%v))",
- reflect.Int32: "out.Int32Str(int32(%v))",
- reflect.Int64: "out.Int64Str(int64(%v))",
- reflect.Uint: "out.UintStr(uint(%v))",
- reflect.Uint8: "out.Uint8Str(uint8(%v))",
- reflect.Uint16: "out.Uint16Str(uint16(%v))",
- reflect.Uint32: "out.Uint32Str(uint32(%v))",
- reflect.Uint64: "out.Uint64Str(uint64(%v))",
- reflect.Uintptr: "out.UintptrStr(uintptr(%v))",
-}
-
-// fieldTags contains parsed version of json struct field tags.
-type fieldTags struct {
- name string
-
- omit bool
- omitEmpty bool
- noOmitEmpty bool
- asString bool
- required bool
-}
-
-// parseFieldTags parses the json field tag into a structure.
-func parseFieldTags(f reflect.StructField) fieldTags {
- var ret fieldTags
-
- for i, s := range strings.Split(f.Tag.Get("json"), ",") {
- switch {
- case i == 0 && s == "-":
- ret.omit = true
- case i == 0:
- ret.name = s
- case s == "omitempty":
- ret.omitEmpty = true
- case s == "!omitempty":
- ret.noOmitEmpty = true
- case s == "string":
- ret.asString = true
- case s == "required":
- ret.required = true
- }
- }
-
- return ret
-}
-
-// genTypeEncoder generates code that encodes in of type t into the writer, but uses marshaler interface if implemented by t.
-func (g *Generator) genTypeEncoder(t reflect.Type, in string, tags fieldTags, indent int, assumeNonEmpty bool) error {
- ws := strings.Repeat(" ", indent)
-
- marshalerIface := reflect.TypeOf((*easyjson.Marshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(marshalerIface) {
- fmt.Fprintln(g.out, ws+"("+in+").MarshalEasyJSON(out)")
- return nil
- }
-
- marshalerIface = reflect.TypeOf((*json.Marshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(marshalerIface) {
- fmt.Fprintln(g.out, ws+"out.Raw( ("+in+").MarshalJSON() )")
- return nil
- }
-
- marshalerIface = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
- if reflect.PtrTo(t).Implements(marshalerIface) {
- fmt.Fprintln(g.out, ws+"out.RawText( ("+in+").MarshalText() )")
- return nil
- }
-
- err := g.genTypeEncoderNoCheck(t, in, tags, indent, assumeNonEmpty)
- return err
-}
-
-// genTypeEncoderNoCheck generates code that encodes in of type t into the writer.
-func (g *Generator) genTypeEncoderNoCheck(t reflect.Type, in string, tags fieldTags, indent int, assumeNonEmpty bool) error {
- ws := strings.Repeat(" ", indent)
-
- // Check whether type is primitive, needs to be done after interface check.
- if enc := primitiveStringEncoders[t.Kind()]; enc != "" && tags.asString {
- fmt.Fprintf(g.out, ws+enc+"\n", in)
- return nil
- } else if enc := primitiveEncoders[t.Kind()]; enc != "" {
- fmt.Fprintf(g.out, ws+enc+"\n", in)
- return nil
- }
-
- switch t.Kind() {
- case reflect.Slice:
- elem := t.Elem()
- iVar := g.uniqueVarName()
- vVar := g.uniqueVarName()
-
- if t.Elem().Kind() == reflect.Uint8 {
- fmt.Fprintln(g.out, ws+"out.Base64Bytes("+in+")")
- } else {
- if !assumeNonEmpty {
- fmt.Fprintln(g.out, ws+"if "+in+" == nil && (out.Flags & jwriter.NilSliceAsEmpty) == 0 {")
- fmt.Fprintln(g.out, ws+` out.RawString("null")`)
- fmt.Fprintln(g.out, ws+"} else {")
- } else {
- fmt.Fprintln(g.out, ws+"{")
- }
- fmt.Fprintln(g.out, ws+" out.RawByte('[')")
- fmt.Fprintln(g.out, ws+" for "+iVar+", "+vVar+" := range "+in+" {")
- fmt.Fprintln(g.out, ws+" if "+iVar+" > 0 {")
- fmt.Fprintln(g.out, ws+" out.RawByte(',')")
- fmt.Fprintln(g.out, ws+" }")
-
- if err := g.genTypeEncoder(elem, vVar, tags, indent+2, false); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" out.RawByte(']')")
- fmt.Fprintln(g.out, ws+"}")
- }
-
- case reflect.Array:
- elem := t.Elem()
- iVar := g.uniqueVarName()
-
- if t.Elem().Kind() == reflect.Uint8 {
- fmt.Fprintln(g.out, ws+"out.Base64Bytes("+in+"[:])")
- } else {
- fmt.Fprintln(g.out, ws+"out.RawByte('[')")
- fmt.Fprintln(g.out, ws+"for "+iVar+" := range "+in+" {")
- fmt.Fprintln(g.out, ws+" if "+iVar+" > 0 {")
- fmt.Fprintln(g.out, ws+" out.RawByte(',')")
- fmt.Fprintln(g.out, ws+" }")
-
- if err := g.genTypeEncoder(elem, in+"["+iVar+"]", tags, indent+1, false); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+"}")
- fmt.Fprintln(g.out, ws+"out.RawByte(']')")
- }
-
- case reflect.Struct:
- enc := g.getEncoderName(t)
- g.addType(t)
-
- fmt.Fprintln(g.out, ws+enc+"(out, "+in+")")
-
- case reflect.Ptr:
- if !assumeNonEmpty {
- fmt.Fprintln(g.out, ws+"if "+in+" == nil {")
- fmt.Fprintln(g.out, ws+` out.RawString("null")`)
- fmt.Fprintln(g.out, ws+"} else {")
- }
-
- if err := g.genTypeEncoder(t.Elem(), "*"+in, tags, indent+1, false); err != nil {
- return err
- }
-
- if !assumeNonEmpty {
- fmt.Fprintln(g.out, ws+"}")
- }
-
- case reflect.Map:
- key := t.Key()
- keyEnc, ok := primitiveStringEncoders[key.Kind()]
- if !ok {
- return fmt.Errorf("map key type %v not supported: only string and integer keys are allowed", key)
- }
- tmpVar := g.uniqueVarName()
-
- if !assumeNonEmpty {
- fmt.Fprintln(g.out, ws+"if "+in+" == nil && (out.Flags & jwriter.NilMapAsEmpty) == 0 {")
- fmt.Fprintln(g.out, ws+" out.RawString(`null`)")
- fmt.Fprintln(g.out, ws+"} else {")
- } else {
- fmt.Fprintln(g.out, ws+"{")
- }
- fmt.Fprintln(g.out, ws+" out.RawByte('{')")
- fmt.Fprintln(g.out, ws+" "+tmpVar+"First := true")
- fmt.Fprintln(g.out, ws+" for "+tmpVar+"Name, "+tmpVar+"Value := range "+in+" {")
- fmt.Fprintln(g.out, ws+" if "+tmpVar+"First { "+tmpVar+"First = false } else { out.RawByte(',') }")
- fmt.Fprintln(g.out, ws+" "+fmt.Sprintf(keyEnc, tmpVar+"Name"))
- fmt.Fprintln(g.out, ws+" out.RawByte(':')")
-
- if err := g.genTypeEncoder(t.Elem(), tmpVar+"Value", tags, indent+2, false); err != nil {
- return err
- }
-
- fmt.Fprintln(g.out, ws+" }")
- fmt.Fprintln(g.out, ws+" out.RawByte('}')")
- fmt.Fprintln(g.out, ws+"}")
-
- case reflect.Interface:
- if t.NumMethod() != 0 {
- return fmt.Errorf("interface type %v not supported: only interface{} is allowed", t)
- }
- fmt.Fprintln(g.out, ws+"if m, ok := "+in+".(easyjson.Marshaler); ok {")
- fmt.Fprintln(g.out, ws+" m.MarshalEasyJSON(out)")
- fmt.Fprintln(g.out, ws+"} else if m, ok := "+in+".(json.Marshaler); ok {")
- fmt.Fprintln(g.out, ws+" out.Raw(m.MarshalJSON())")
- fmt.Fprintln(g.out, ws+"} else {")
- fmt.Fprintln(g.out, ws+" out.Raw(json.Marshal("+in+"))")
- fmt.Fprintln(g.out, ws+"}")
-
- default:
- return fmt.Errorf("don't know how to encode %v", t)
- }
- return nil
-}
-
-func (g *Generator) notEmptyCheck(t reflect.Type, v string) string {
- optionalIface := reflect.TypeOf((*easyjson.Optional)(nil)).Elem()
- if reflect.PtrTo(t).Implements(optionalIface) {
- return "(" + v + ").IsDefined()"
- }
-
- switch t.Kind() {
- case reflect.Slice, reflect.Map:
- return "len(" + v + ") != 0"
- case reflect.Interface, reflect.Ptr:
- return v + " != nil"
- case reflect.Bool:
- return v
- case reflect.String:
- return v + ` != ""`
- case reflect.Float32, reflect.Float64,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
-
- return v + " != 0"
-
- default:
- // note: Array types don't have a useful empty value
- return "true"
- }
-}
-
-func (g *Generator) genStructFieldEncoder(t reflect.Type, f reflect.StructField) error {
- jsonName := g.fieldNamer.GetJSONFieldName(t, f)
- tags := parseFieldTags(f)
-
- if tags.omit {
- return nil
- }
- noOmitEmpty := (!tags.omitEmpty && !g.omitEmpty) || tags.noOmitEmpty
- if noOmitEmpty {
- fmt.Fprintln(g.out, " {")
- } else {
- fmt.Fprintln(g.out, " if", g.notEmptyCheck(f.Type, "in."+f.Name), "{")
- }
- fmt.Fprintf(g.out, " const prefix string = %q\n", ","+strconv.Quote(jsonName)+":")
- fmt.Fprintln(g.out, " if first {")
- fmt.Fprintln(g.out, " first = false")
- fmt.Fprintln(g.out, " out.RawString(prefix[1:])")
- fmt.Fprintln(g.out, " } else {")
- fmt.Fprintln(g.out, " out.RawString(prefix)")
- fmt.Fprintln(g.out, " }")
-
- if err := g.genTypeEncoder(f.Type, "in."+f.Name, tags, 2, !noOmitEmpty); err != nil {
- return err
- }
- fmt.Fprintln(g.out, " }")
- return nil
-}
-
-func (g *Generator) genEncoder(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map:
- return g.genSliceArrayMapEncoder(t)
- default:
- return g.genStructEncoder(t)
- }
-}
-
-func (g *Generator) genSliceArrayMapEncoder(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map:
- default:
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a slice/array/map type", t)
- }
-
- fname := g.getEncoderName(t)
- typ := g.getType(t)
-
- fmt.Fprintln(g.out, "func "+fname+"(out *jwriter.Writer, in "+typ+") {")
- err := g.genTypeEncoderNoCheck(t, "in", fieldTags{}, 1, false)
- if err != nil {
- return err
- }
- fmt.Fprintln(g.out, "}")
- return nil
-}
-
-func (g *Generator) genStructEncoder(t reflect.Type) error {
- if t.Kind() != reflect.Struct {
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct type", t)
- }
-
- fname := g.getEncoderName(t)
- typ := g.getType(t)
-
- fmt.Fprintln(g.out, "func "+fname+"(out *jwriter.Writer, in "+typ+") {")
- fmt.Fprintln(g.out, " out.RawByte('{')")
- fmt.Fprintln(g.out, " first := true")
- fmt.Fprintln(g.out, " _ = first")
-
- fs, err := getStructFields(t)
- if err != nil {
- return fmt.Errorf("cannot generate encoder for %v: %v", t, err)
- }
- for _, f := range fs {
- if err := g.genStructFieldEncoder(t, f); err != nil {
- return err
- }
- }
-
- fmt.Fprintln(g.out, " out.RawByte('}')")
- fmt.Fprintln(g.out, "}")
-
- return nil
-}
-
-func (g *Generator) genStructMarshaler(t reflect.Type) error {
- switch t.Kind() {
- case reflect.Slice, reflect.Array, reflect.Map, reflect.Struct:
- default:
- return fmt.Errorf("cannot generate encoder/decoder for %v, not a struct/slice/array/map type", t)
- }
-
- fname := g.getEncoderName(t)
- typ := g.getType(t)
-
- if !g.noStdMarshalers {
- fmt.Fprintln(g.out, "// MarshalJSON supports json.Marshaler interface")
- fmt.Fprintln(g.out, "func (v "+typ+") MarshalJSON() ([]byte, error) {")
- fmt.Fprintln(g.out, " w := jwriter.Writer{}")
- fmt.Fprintln(g.out, " "+fname+"(&w, v)")
- fmt.Fprintln(g.out, " return w.Buffer.BuildBytes(), w.Error")
- fmt.Fprintln(g.out, "}")
- }
-
- fmt.Fprintln(g.out, "// MarshalEasyJSON supports easyjson.Marshaler interface")
- fmt.Fprintln(g.out, "func (v "+typ+") MarshalEasyJSON(w *jwriter.Writer) {")
- fmt.Fprintln(g.out, " "+fname+"(w, v)")
- fmt.Fprintln(g.out, "}")
-
- return nil
-}
diff --git a/vendor/github.com/mailru/easyjson/gen/generator.go b/vendor/github.com/mailru/easyjson/gen/generator.go
deleted file mode 100644
index eb0d70ba2..000000000
--- a/vendor/github.com/mailru/easyjson/gen/generator.go
+++ /dev/null
@@ -1,523 +0,0 @@
-package gen
-
-import (
- "bytes"
- "fmt"
- "hash/fnv"
- "io"
- "path"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "unicode"
-)
-
-const pkgWriter = "github.com/mailru/easyjson/jwriter"
-const pkgLexer = "github.com/mailru/easyjson/jlexer"
-const pkgEasyJSON = "github.com/mailru/easyjson"
-
-// FieldNamer defines a policy for generating names for struct fields.
-type FieldNamer interface {
- GetJSONFieldName(t reflect.Type, f reflect.StructField) string
-}
-
-// Generator generates the requested marshaler/unmarshalers.
-type Generator struct {
- out *bytes.Buffer
-
- pkgName string
- pkgPath string
- buildTags string
- hashString string
-
- varCounter int
-
- noStdMarshalers bool
- omitEmpty bool
- fieldNamer FieldNamer
-
- // package path to local alias map for tracking imports
- imports map[string]string
-
- // types that marshalers were requested for by user
- marshalers map[reflect.Type]bool
-
- // types that encoders were already generated for
- typesSeen map[reflect.Type]bool
-
- // types that encoders were requested for (e.g. by encoders of other types)
- typesUnseen []reflect.Type
-
- // function name to relevant type maps to track names of de-/encoders in
- // case of a name clash or unnamed structs
- functionNames map[string]reflect.Type
-}
-
-// NewGenerator initializes and returns a Generator.
-func NewGenerator(filename string) *Generator {
- ret := &Generator{
- imports: map[string]string{
- pkgWriter: "jwriter",
- pkgLexer: "jlexer",
- pkgEasyJSON: "easyjson",
- "encoding/json": "json",
- },
- fieldNamer: DefaultFieldNamer{},
- marshalers: make(map[reflect.Type]bool),
- typesSeen: make(map[reflect.Type]bool),
- functionNames: make(map[string]reflect.Type),
- }
-
- // Use a file-unique prefix on all auxiliary funcs to avoid
- // name clashes.
- hash := fnv.New32()
- hash.Write([]byte(filename))
- ret.hashString = fmt.Sprintf("%x", hash.Sum32())
-
- return ret
-}
-
-// SetPkg sets the name and path of output package.
-func (g *Generator) SetPkg(name, path string) {
- g.pkgName = name
- g.pkgPath = path
-}
-
-// SetBuildTags sets build tags for the output file.
-func (g *Generator) SetBuildTags(tags string) {
- g.buildTags = tags
-}
-
-// SetFieldNamer sets field naming strategy.
-func (g *Generator) SetFieldNamer(n FieldNamer) {
- g.fieldNamer = n
-}
-
-// UseSnakeCase sets snake_case field naming strategy.
-func (g *Generator) UseSnakeCase() {
- g.fieldNamer = SnakeCaseFieldNamer{}
-}
-
-// UseLowerCamelCase sets lowerCamelCase field naming strategy.
-func (g *Generator) UseLowerCamelCase() {
- g.fieldNamer = LowerCamelCaseFieldNamer{}
-}
-
-// NoStdMarshalers instructs not to generate standard MarshalJSON/UnmarshalJSON
-// methods (only the custom interface).
-func (g *Generator) NoStdMarshalers() {
- g.noStdMarshalers = true
-}
-
-// OmitEmpty triggers `json=",omitempty"` behaviour by default.
-func (g *Generator) OmitEmpty() {
- g.omitEmpty = true
-}
-
-// addTypes requests to generate encoding/decoding funcs for the given type.
-func (g *Generator) addType(t reflect.Type) {
- if g.typesSeen[t] {
- return
- }
- for _, t1 := range g.typesUnseen {
- if t1 == t {
- return
- }
- }
- g.typesUnseen = append(g.typesUnseen, t)
-}
-
-// Add requests to generate marshaler/unmarshalers and encoding/decoding
-// funcs for the type of given object.
-func (g *Generator) Add(obj interface{}) {
- t := reflect.TypeOf(obj)
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
- g.addType(t)
- g.marshalers[t] = true
-}
-
-// printHeader prints package declaration and imports.
-func (g *Generator) printHeader() {
- if g.buildTags != "" {
- fmt.Println("// +build ", g.buildTags)
- fmt.Println()
- }
- fmt.Println("// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.")
- fmt.Println()
- fmt.Println("package ", g.pkgName)
- fmt.Println()
-
- byAlias := map[string]string{}
- var aliases []string
- for path, alias := range g.imports {
- aliases = append(aliases, alias)
- byAlias[alias] = path
- }
-
- sort.Strings(aliases)
- fmt.Println("import (")
- for _, alias := range aliases {
- fmt.Printf(" %s %q\n", alias, byAlias[alias])
- }
-
- fmt.Println(")")
- fmt.Println("")
- fmt.Println("// suppress unused package warning")
- fmt.Println("var (")
- fmt.Println(" _ *json.RawMessage")
- fmt.Println(" _ *jlexer.Lexer")
- fmt.Println(" _ *jwriter.Writer")
- fmt.Println(" _ easyjson.Marshaler")
- fmt.Println(")")
-
- fmt.Println()
-}
-
-// Run runs the generator and outputs generated code to out.
-func (g *Generator) Run(out io.Writer) error {
- g.out = &bytes.Buffer{}
-
- for len(g.typesUnseen) > 0 {
- t := g.typesUnseen[len(g.typesUnseen)-1]
- g.typesUnseen = g.typesUnseen[:len(g.typesUnseen)-1]
- g.typesSeen[t] = true
-
- if err := g.genDecoder(t); err != nil {
- return err
- }
- if err := g.genEncoder(t); err != nil {
- return err
- }
-
- if !g.marshalers[t] {
- continue
- }
-
- if err := g.genStructMarshaler(t); err != nil {
- return err
- }
- if err := g.genStructUnmarshaler(t); err != nil {
- return err
- }
- }
- g.printHeader()
- _, err := out.Write(g.out.Bytes())
- return err
-}
-
-// fixes vendored paths
-func fixPkgPathVendoring(pkgPath string) string {
- const vendor = "/vendor/"
- if i := strings.LastIndex(pkgPath, vendor); i != -1 {
- return pkgPath[i+len(vendor):]
- }
- return pkgPath
-}
-
-func fixAliasName(alias string) string {
- alias = strings.Replace(
- strings.Replace(alias, ".", "_", -1),
- "-",
- "_",
- -1,
- )
-
- if alias[0] == 'v' { // to void conflicting with var names, say v1
- alias = "_" + alias
- }
- return alias
-}
-
-// pkgAlias creates and returns and import alias for a given package.
-func (g *Generator) pkgAlias(pkgPath string) string {
- pkgPath = fixPkgPathVendoring(pkgPath)
- if alias := g.imports[pkgPath]; alias != "" {
- return alias
- }
-
- for i := 0; ; i++ {
- alias := fixAliasName(path.Base(pkgPath))
- if i > 0 {
- alias += fmt.Sprint(i)
- }
-
- exists := false
- for _, v := range g.imports {
- if v == alias {
- exists = true
- break
- }
- }
-
- if !exists {
- g.imports[pkgPath] = alias
- return alias
- }
- }
-}
-
-// getType return the textual type name of given type that can be used in generated code.
-func (g *Generator) getType(t reflect.Type) string {
- if t.Name() == "" {
- switch t.Kind() {
- case reflect.Ptr:
- return "*" + g.getType(t.Elem())
- case reflect.Slice:
- return "[]" + g.getType(t.Elem())
- case reflect.Array:
- return "[" + strconv.Itoa(t.Len()) + "]" + g.getType(t.Elem())
- case reflect.Map:
- return "map[" + g.getType(t.Key()) + "]" + g.getType(t.Elem())
- }
- }
-
- if t.Name() == "" || t.PkgPath() == "" {
- if t.Kind() == reflect.Struct {
- // the fields of an anonymous struct can have named types,
- // and t.String() will not be sufficient because it does not
- // remove the package name when it matches g.pkgPath.
- // so we convert by hand
- nf := t.NumField()
- lines := make([]string, 0, nf)
- for i := 0; i < nf; i++ {
- f := t.Field(i)
- line := f.Name + " " + g.getType(f.Type)
- t := f.Tag
- if t != "" {
- line += " " + escapeTag(t)
- }
- lines = append(lines, line)
- }
- return strings.Join([]string{"struct { ", strings.Join(lines, "; "), " }"}, "")
- }
- return t.String()
- } else if t.PkgPath() == g.pkgPath {
- return t.Name()
- }
- return g.pkgAlias(t.PkgPath()) + "." + t.Name()
-}
-
-// escape a struct field tag string back to source code
-func escapeTag(tag reflect.StructTag) string {
- t := string(tag)
- if strings.ContainsRune(t, '`') {
- // there are ` in the string; we can't use ` to enclose the string
- return strconv.Quote(t)
- }
- return "`" + t + "`"
-}
-
-// uniqueVarName returns a file-unique name that can be used for generated variables.
-func (g *Generator) uniqueVarName() string {
- g.varCounter++
- return fmt.Sprint("v", g.varCounter)
-}
-
-// safeName escapes unsafe characters in pkg/type name and returns a string that can be used
-// in encoder/decoder names for the type.
-func (g *Generator) safeName(t reflect.Type) string {
- name := t.PkgPath()
- if t.Name() == "" {
- name += "anonymous"
- } else {
- name += "." + t.Name()
- }
-
- parts := []string{}
- part := []rune{}
- for _, c := range name {
- if unicode.IsLetter(c) || unicode.IsDigit(c) {
- part = append(part, c)
- } else if len(part) > 0 {
- parts = append(parts, string(part))
- part = []rune{}
- }
- }
- return joinFunctionNameParts(false, parts...)
-}
-
-// functionName returns a function name for a given type with a given prefix. If a function
-// with this prefix already exists for a type, it is returned.
-//
-// Method is used to track encoder/decoder names for the type.
-func (g *Generator) functionName(prefix string, t reflect.Type) string {
- prefix = joinFunctionNameParts(true, "easyjson", g.hashString, prefix)
- name := joinFunctionNameParts(true, prefix, g.safeName(t))
-
- // Most of the names will be unique, try a shortcut first.
- if e, ok := g.functionNames[name]; !ok || e == t {
- g.functionNames[name] = t
- return name
- }
-
- // Search if the function already exists.
- for name1, t1 := range g.functionNames {
- if t1 == t && strings.HasPrefix(name1, prefix) {
- return name1
- }
- }
-
- // Create a new name in the case of a clash.
- for i := 1; ; i++ {
- nm := fmt.Sprint(name, i)
- if _, ok := g.functionNames[nm]; ok {
- continue
- }
- g.functionNames[nm] = t
- return nm
- }
-}
-
-// DefaultFieldsNamer implements trivial naming policy equivalent to encoding/json.
-type DefaultFieldNamer struct{}
-
-func (DefaultFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField) string {
- jsonName := strings.Split(f.Tag.Get("json"), ",")[0]
- if jsonName != "" {
- return jsonName
- } else {
- return f.Name
- }
-}
-
-// LowerCamelCaseFieldNamer
-type LowerCamelCaseFieldNamer struct{}
-
-func isLower(b byte) bool {
- return b <= 122 && b >= 97
-}
-
-func isUpper(b byte) bool {
- return b >= 65 && b <= 90
-}
-
-// convert HTTPRestClient to httpRestClient
-func lowerFirst(s string) string {
- if s == "" {
- return ""
- }
-
- str := ""
- strlen := len(s)
-
- /**
- Loop each char
- If is uppercase:
- If is first char, LOWER it
- If the following char is lower, LEAVE it
- If the following char is upper OR numeric, LOWER it
- If is the end of string, LEAVE it
- Else lowercase
- */
-
- foundLower := false
- for i := range s {
- ch := s[i]
- if isUpper(ch) {
- if i == 0 {
- str += string(ch + 32)
- } else if !foundLower { // Currently just a stream of capitals, eg JSONRESTS[erver]
- if strlen > (i+1) && isLower(s[i+1]) {
- // Next char is lower, keep this a capital
- str += string(ch)
- } else {
- // Either at end of string or next char is capital
- str += string(ch + 32)
- }
- } else {
- str += string(ch)
- }
- } else {
- foundLower = true
- str += string(ch)
- }
- }
-
- return str
-}
-
-func (LowerCamelCaseFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField) string {
- jsonName := strings.Split(f.Tag.Get("json"), ",")[0]
- if jsonName != "" {
- return jsonName
- } else {
- return lowerFirst(f.Name)
- }
-}
-
-// SnakeCaseFieldNamer implements CamelCase to snake_case conversion for fields names.
-type SnakeCaseFieldNamer struct{}
-
-func camelToSnake(name string) string {
- var ret bytes.Buffer
-
- multipleUpper := false
- var lastUpper rune
- var beforeUpper rune
-
- for _, c := range name {
- // Non-lowercase character after uppercase is considered to be uppercase too.
- isUpper := (unicode.IsUpper(c) || (lastUpper != 0 && !unicode.IsLower(c)))
-
- if lastUpper != 0 {
- // Output a delimiter if last character was either the first uppercase character
- // in a row, or the last one in a row (e.g. 'S' in "HTTPServer").
- // Do not output a delimiter at the beginning of the name.
-
- firstInRow := !multipleUpper
- lastInRow := !isUpper
-
- if ret.Len() > 0 && (firstInRow || lastInRow) && beforeUpper != '_' {
- ret.WriteByte('_')
- }
- ret.WriteRune(unicode.ToLower(lastUpper))
- }
-
- // Buffer uppercase char, do not output it yet as a delimiter may be required if the
- // next character is lowercase.
- if isUpper {
- multipleUpper = (lastUpper != 0)
- lastUpper = c
- continue
- }
-
- ret.WriteRune(c)
- lastUpper = 0
- beforeUpper = c
- multipleUpper = false
- }
-
- if lastUpper != 0 {
- ret.WriteRune(unicode.ToLower(lastUpper))
- }
- return string(ret.Bytes())
-}
-
-func (SnakeCaseFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField) string {
- jsonName := strings.Split(f.Tag.Get("json"), ",")[0]
- if jsonName != "" {
- return jsonName
- }
-
- return camelToSnake(f.Name)
-}
-
-func joinFunctionNameParts(keepFirst bool, parts ...string) string {
- buf := bytes.NewBufferString("")
- for i, part := range parts {
- if i == 0 && keepFirst {
- buf.WriteString(part)
- } else {
- if len(part) > 0 {
- buf.WriteString(strings.ToUpper(string(part[0])))
- }
- if len(part) > 1 {
- buf.WriteString(part[1:])
- }
- }
- }
- return buf.String()
-}
diff --git a/vendor/github.com/mailru/easyjson/gen/generator_test.go b/vendor/github.com/mailru/easyjson/gen/generator_test.go
deleted file mode 100644
index 0c9d27845..000000000
--- a/vendor/github.com/mailru/easyjson/gen/generator_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package gen
-
-import (
- "testing"
-)
-
-func TestCamelToSnake(t *testing.T) {
- for i, test := range []struct {
- In, Out string
- }{
- {"", ""},
- {"A", "a"},
- {"SimpleExample", "simple_example"},
- {"internalField", "internal_field"},
-
- {"SomeHTTPStuff", "some_http_stuff"},
- {"WriteJSON", "write_json"},
- {"HTTP2Server", "http2_server"},
- {"Some_Mixed_Case", "some_mixed_case"},
- {"do_nothing", "do_nothing"},
-
- {"JSONHTTPRPCServer", "jsonhttprpc_server"}, // nothing can be done here without a dictionary
- } {
- got := camelToSnake(test.In)
- if got != test.Out {
- t.Errorf("[%d] camelToSnake(%s) = %s; want %s", i, test.In, got, test.Out)
- }
- }
-}
-
-func TestCamelToLowerCamel(t *testing.T) {
- for i, test := range []struct {
- In, Out string
- }{
- {"", ""},
- {"A", "a"},
- {"SimpleExample", "simpleExample"},
- {"internalField", "internalField"},
-
- {"SomeHTTPStuff", "someHTTPStuff"},
- {"WriteJSON", "writeJSON"},
- {"HTTP2Server", "http2Server"},
-
- {"JSONHTTPRPCServer", "jsonhttprpcServer"}, // nothing can be done here without a dictionary
- } {
- got := lowerFirst(test.In)
- if got != test.Out {
- t.Errorf("[%d] lowerFirst(%s) = %s; want %s", i, test.In, got, test.Out)
- }
- }
-}
-
-func TestJoinFunctionNameParts(t *testing.T) {
- for i, test := range []struct {
- keepFirst bool
- parts []string
- out string
- }{
- {false, []string{}, ""},
- {false, []string{"a"}, "A"},
- {false, []string{"simple", "example"}, "SimpleExample"},
- {true, []string{"first", "example"}, "firstExample"},
- {false, []string{"some", "UPPER", "case"}, "SomeUPPERCase"},
- {false, []string{"number", "123"}, "Number123"},
- } {
- got := joinFunctionNameParts(test.keepFirst, test.parts...)
- if got != test.out {
- t.Errorf("[%d] joinFunctionNameParts(%v) = %s; want %s", i, test.parts, got, test.out)
- }
- }
-}
-
-func TestFixVendorPath(t *testing.T) {
- for i, test := range []struct {
- In, Out string
- }{
- {"", ""},
- {"time", "time"},
- {"project/vendor/subpackage", "subpackage"},
- } {
- got := fixPkgPathVendoring(test.In)
- if got != test.Out {
- t.Errorf("[%d] fixPkgPathVendoring(%s) = %s; want %s", i, test.In, got, test.Out)
- }
- }
-
-}
diff --git a/vendor/github.com/mailru/easyjson/jlexer/lexer.go b/vendor/github.com/mailru/easyjson/jlexer/lexer.go
index e5558ae39..0fd9b122f 100644
--- a/vendor/github.com/mailru/easyjson/jlexer/lexer.go
+++ b/vendor/github.com/mailru/easyjson/jlexer/lexer.go
@@ -997,6 +997,22 @@ func (r *Lexer) Float32() float32 {
return float32(n)
}
+func (r *Lexer) Float32Str() float32 {
+ s, b := r.unsafeString()
+ if !r.Ok() {
+ return 0
+ }
+ n, err := strconv.ParseFloat(s, 32)
+ if err != nil {
+ r.addNonfatalError(&LexerError{
+ Offset: r.start,
+ Reason: err.Error(),
+ Data: string(b),
+ })
+ }
+ return float32(n)
+}
+
func (r *Lexer) Float64() float64 {
s := r.number()
if !r.Ok() {
@@ -1014,6 +1030,22 @@ func (r *Lexer) Float64() float64 {
return n
}
+func (r *Lexer) Float64Str() float64 {
+ s, b := r.unsafeString()
+ if !r.Ok() {
+ return 0
+ }
+ n, err := strconv.ParseFloat(s, 64)
+ if err != nil {
+ r.addNonfatalError(&LexerError{
+ Offset: r.start,
+ Reason: err.Error(),
+ Data: string(b),
+ })
+ }
+ return n
+}
+
func (r *Lexer) Error() error {
return r.fatalError
}
@@ -1056,7 +1088,7 @@ func (r *Lexer) JsonNumber() json.Number {
}
if !r.Ok() {
r.errInvalidToken("json.Number")
- return json.Number("0")
+ return json.Number("")
}
switch r.token.kind {
@@ -1064,9 +1096,12 @@ func (r *Lexer) JsonNumber() json.Number {
return json.Number(r.String())
case tokenNumber:
return json.Number(r.Raw())
+ case tokenNull:
+ r.Null()
+ return json.Number("")
default:
r.errSyntax()
- return json.Number("0")
+ return json.Number("")
}
}
diff --git a/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go b/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go
deleted file mode 100644
index 4ce4abe6a..000000000
--- a/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go
+++ /dev/null
@@ -1,311 +0,0 @@
-package jlexer
-
-import (
- "bytes"
- "encoding/json"
- "reflect"
- "testing"
-)
-
-func TestString(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want string
- wantError bool
- }{
- {toParse: `"simple string"`, want: "simple string"},
- {toParse: " \r\r\n\t " + `"test"`, want: "test"},
- {toParse: `"\n\t\"\/\\\f\r"`, want: "\n\t\"/\\\f\r"},
- {toParse: `"\u0020"`, want: " "},
- {toParse: `"\u0020-\t"`, want: " -\t"},
- {toParse: `"\ufffd\uFFFD"`, want: "\ufffd\ufffd"},
- {toParse: `"\ud83d\ude00"`, want: "😀"},
- {toParse: `"\ud83d\ude08"`, want: "😈"},
- {toParse: `"\ud8"`, wantError: true},
-
- {toParse: `"test"junk`, want: "test"},
-
- {toParse: `5`, wantError: true}, // not a string
- {toParse: `"\x"`, wantError: true}, // invalid escape
- {toParse: `"\ud800"`, want: "�"}, // invalid utf-8 char; return replacement char
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.String()
- if got != test.want {
- t.Errorf("[%d, %q] String() = %v; want %v", i, test.toParse, got, test.want)
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] String() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] String() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestBytes(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want string
- wantError bool
- }{
- {toParse: `"c2ltcGxlIHN0cmluZw=="`, want: "simple string"},
- {toParse: " \r\r\n\t " + `"dGVzdA=="`, want: "test"},
-
- {toParse: `5`, wantError: true}, // not a JSON string
- {toParse: `"foobar"`, wantError: true}, // not base64 encoded
- {toParse: `"c2ltcGxlIHN0cmluZw="`, wantError: true}, // invalid base64 padding
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.Bytes()
- if bytes.Compare(got, []byte(test.want)) != 0 {
- t.Errorf("[%d, %q] Bytes() = %v; want: %v", i, test.toParse, got, []byte(test.want))
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] Bytes() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] Bytes() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestNumber(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want string
- wantError bool
- }{
- {toParse: "123", want: "123"},
- {toParse: "-123", want: "-123"},
- {toParse: "\r\n12.35", want: "12.35"},
- {toParse: "12.35e+1", want: "12.35e+1"},
- {toParse: "12.35e-15", want: "12.35e-15"},
- {toParse: "12.35E-15", want: "12.35E-15"},
- {toParse: "12.35E15", want: "12.35E15"},
-
- {toParse: `"a"`, wantError: true},
- {toParse: "123junk", wantError: true},
- {toParse: "1.2.3", wantError: true},
- {toParse: "1e2e3", wantError: true},
- {toParse: "1e2.3", wantError: true},
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.number()
- if got != test.want {
- t.Errorf("[%d, %q] number() = %v; want %v", i, test.toParse, got, test.want)
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] number() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] number() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestBool(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want bool
- wantError bool
- }{
- {toParse: "true", want: true},
- {toParse: "false", want: false},
-
- {toParse: "1", wantError: true},
- {toParse: "truejunk", wantError: true},
- {toParse: `false"junk"`, wantError: true},
- {toParse: "True", wantError: true},
- {toParse: "False", wantError: true},
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.Bool()
- if got != test.want {
- t.Errorf("[%d, %q] Bool() = %v; want %v", i, test.toParse, got, test.want)
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] Bool() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] Bool() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestSkipRecursive(t *testing.T) {
- for i, test := range []struct {
- toParse string
- left string
- wantError bool
- }{
- {toParse: "5, 4", left: ", 4"},
- {toParse: "[5, 6], 4", left: ", 4"},
- {toParse: "[5, [7,8]]: 4", left: ": 4"},
-
- {toParse: `{"a":1}, 4`, left: ", 4"},
- {toParse: `{"a":1, "b":{"c": 5}, "e":[12,15]}, 4`, left: ", 4"},
-
- // array start/end chars in a string
- {toParse: `[5, "]"], 4`, left: ", 4"},
- {toParse: `[5, "\"]"], 4`, left: ", 4"},
- {toParse: `[5, "["], 4`, left: ", 4"},
- {toParse: `[5, "\"["], 4`, left: ", 4"},
-
- // object start/end chars in a string
- {toParse: `{"a}":1}, 4`, left: ", 4"},
- {toParse: `{"a\"}":1}, 4`, left: ", 4"},
- {toParse: `{"a{":1}, 4`, left: ", 4"},
- {toParse: `{"a\"{":1}, 4`, left: ", 4"},
-
- // object with double slashes at the end of string
- {toParse: `{"a":"hey\\"}, 4`, left: ", 4"},
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- l.SkipRecursive()
-
- got := string(l.Data[l.pos:])
- if got != test.left {
- t.Errorf("[%d, %q] SkipRecursive() left = %v; want %v", i, test.toParse, got, test.left)
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] SkipRecursive() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] SkipRecursive() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestInterface(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want interface{}
- wantError bool
- }{
- {toParse: "null", want: nil},
- {toParse: "true", want: true},
- {toParse: `"a"`, want: "a"},
- {toParse: "5", want: float64(5)},
-
- {toParse: `{}`, want: map[string]interface{}{}},
- {toParse: `[]`, want: []interface{}(nil)},
-
- {toParse: `{"a": "b"}`, want: map[string]interface{}{"a": "b"}},
- {toParse: `[5]`, want: []interface{}{float64(5)}},
-
- {toParse: `{"a":5 , "b" : "string"}`, want: map[string]interface{}{"a": float64(5), "b": "string"}},
- {toParse: `["a", 5 , null, true]`, want: []interface{}{"a", float64(5), nil, true}},
-
- {toParse: `{"a" "b"}`, wantError: true},
- {toParse: `{"a": "b",}`, wantError: true},
- {toParse: `{"a":"b","c" "b"}`, wantError: true},
- {toParse: `{"a": "b","c":"d",}`, wantError: true},
- {toParse: `{,}`, wantError: true},
-
- {toParse: `[1, 2,]`, wantError: true},
- {toParse: `[1 2]`, wantError: true},
- {toParse: `[,]`, wantError: true},
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.Interface()
- if !reflect.DeepEqual(got, test.want) {
- t.Errorf("[%d, %q] Interface() = %v; want %v", i, test.toParse, got, test.want)
- }
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] Interface() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] Interface() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestConsumed(t *testing.T) {
- for i, test := range []struct {
- toParse string
- wantError bool
- }{
- {toParse: "", wantError: false},
- {toParse: " ", wantError: false},
- {toParse: "\r\n", wantError: false},
- {toParse: "\t\t", wantError: false},
-
- {toParse: "{", wantError: true},
- } {
- l := Lexer{Data: []byte(test.toParse)}
- l.Consumed()
-
- err := l.Error()
- if err != nil && !test.wantError {
- t.Errorf("[%d, %q] Consumed() error: %v", i, test.toParse, err)
- } else if err == nil && test.wantError {
- t.Errorf("[%d, %q] Consumed() ok; want error", i, test.toParse)
- }
- }
-}
-
-func TestJsonNumber(t *testing.T) {
- for i, test := range []struct {
- toParse string
- want json.Number
- wantLexerError bool
- wantValue interface{}
- wantValueError bool
- }{
- {toParse: `10`, want: json.Number("10"), wantValue: int64(10)},
- {toParse: `0`, want: json.Number("0"), wantValue: int64(0)},
- {toParse: `0.12`, want: json.Number("0.12"), wantValue: 0.12},
- {toParse: `25E-4`, want: json.Number("25E-4"), wantValue: 25E-4},
-
- {toParse: `"10"`, want: json.Number("10"), wantValue: int64(10)},
- {toParse: `"0"`, want: json.Number("0"), wantValue: int64(0)},
- {toParse: `"0.12"`, want: json.Number("0.12"), wantValue: 0.12},
- {toParse: `"25E-4"`, want: json.Number("25E-4"), wantValue: 25E-4},
-
- {toParse: `"a""`, wantValueError: true},
-
- {toParse: `[1]`, wantLexerError: true},
- {toParse: `{}`, wantLexerError: true},
- {toParse: `a`, wantLexerError: true},
- } {
- l := Lexer{Data: []byte(test.toParse)}
-
- got := l.JsonNumber()
- if got != test.want && !test.wantLexerError && !test.wantValueError {
- t.Errorf("[%d, %q] JsonNumber() = %v; want %v", i, test.toParse, got, test.want)
- }
-
- err := l.Error()
- if err != nil && !test.wantLexerError {
- t.Errorf("[%d, %q] JsonNumber() lexer error: %v", i, test.toParse, err)
- } else if err == nil && test.wantLexerError {
- t.Errorf("[%d, %q] JsonNumber() ok; want lexer error", i, test.toParse)
- }
-
- var valueErr error
- var gotValue interface{}
- switch test.wantValue.(type) {
- case float64:
- gotValue, valueErr = got.Float64()
- default:
- gotValue, valueErr = got.Int64()
- }
-
- if !reflect.DeepEqual(gotValue, test.wantValue) && !test.wantLexerError && !test.wantValueError {
- t.Errorf("[%d, %q] JsonNumber() = %v; want %v", i, test.toParse, gotValue, test.wantValue)
- }
-
- if valueErr != nil && !test.wantValueError {
- t.Errorf("[%d, %q] JsonNumber() value error: %v", i, test.toParse, err)
- } else if valueErr == nil && test.wantValueError {
- t.Errorf("[%d, %q] JsonNumber() ok; want value error", i, test.toParse)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/jwriter/writer.go b/vendor/github.com/mailru/easyjson/jwriter/writer.go
index e5a5ddfdb..b9ed7ccaa 100644
--- a/vendor/github.com/mailru/easyjson/jwriter/writer.go
+++ b/vendor/github.com/mailru/easyjson/jwriter/writer.go
@@ -240,11 +240,25 @@ func (w *Writer) Float32(n float32) {
w.Buffer.Buf = strconv.AppendFloat(w.Buffer.Buf, float64(n), 'g', -1, 32)
}
+func (w *Writer) Float32Str(n float32) {
+ w.Buffer.EnsureSpace(20)
+ w.Buffer.Buf = append(w.Buffer.Buf, '"')
+ w.Buffer.Buf = strconv.AppendFloat(w.Buffer.Buf, float64(n), 'g', -1, 32)
+ w.Buffer.Buf = append(w.Buffer.Buf, '"')
+}
+
func (w *Writer) Float64(n float64) {
w.Buffer.EnsureSpace(20)
w.Buffer.Buf = strconv.AppendFloat(w.Buffer.Buf, n, 'g', -1, 64)
}
+func (w *Writer) Float64Str(n float64) {
+ w.Buffer.EnsureSpace(20)
+ w.Buffer.Buf = append(w.Buffer.Buf, '"')
+ w.Buffer.Buf = strconv.AppendFloat(w.Buffer.Buf, float64(n), 'g', -1, 64)
+ w.Buffer.Buf = append(w.Buffer.Buf, '"')
+}
+
func (w *Writer) Bool(v bool) {
w.Buffer.EnsureSpace(5)
if v {
@@ -340,12 +354,11 @@ func (w *Writer) base64(in []byte) {
return
}
- w.Buffer.EnsureSpace(((len(in) - 1) / 3 + 1) * 4)
+ w.Buffer.EnsureSpace(((len(in)-1)/3 + 1) * 4)
si := 0
n := (len(in) / 3) * 3
-
for si < n {
// Convert 3x 8bit source bytes into 4 bytes
val := uint(in[si+0])<<16 | uint(in[si+1])<<8 | uint(in[si+2])
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go
deleted file mode 100644
index 6978ee971..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Bool struct {
- V bool
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OBool(v bool) Bool {
- return Bool{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Bool) Get(deflt bool) bool {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Bool) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Bool(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Bool{}
- } else {
- v.V = l.Bool()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Bool) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Bool) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Bool) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Bool) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go
deleted file mode 100644
index 643cea359..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Float32 struct {
- V float32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OFloat32(v float32) Float32 {
- return Float32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Float32) Get(deflt float32) float32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Float32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Float32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Float32{}
- } else {
- v.V = l.Float32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Float32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Float32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Float32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Float32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go
deleted file mode 100644
index 75ae72757..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Float64 struct {
- V float64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OFloat64(v float64) Float64 {
- return Float64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Float64) Get(deflt float64) float64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Float64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Float64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Float64{}
- } else {
- v.V = l.Float64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Float64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Float64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Float64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Float64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go
deleted file mode 100644
index 469742fee..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int struct {
- V int
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt(v int) Int {
- return Int{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int) Get(deflt int) int {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int{}
- } else {
- v.V = l.Int()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go
deleted file mode 100644
index b7723e241..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int16 struct {
- V int16
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt16(v int16) Int16 {
- return Int16{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int16) Get(deflt int16) int16 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int16) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int16(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int16{}
- } else {
- v.V = l.Int16()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int16) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int16) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int16) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int16) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go
deleted file mode 100644
index 7c7637a38..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int32 struct {
- V int32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt32(v int32) Int32 {
- return Int32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int32) Get(deflt int32) int32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int32{}
- } else {
- v.V = l.Int32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go
deleted file mode 100644
index e6ea6dc41..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int64 struct {
- V int64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt64(v int64) Int64 {
- return Int64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int64) Get(deflt int64) int64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int64{}
- } else {
- v.V = l.Int64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go
deleted file mode 100644
index ddc666580..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int8 struct {
- V int8
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt8(v int8) Int8 {
- return Int8{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int8) Get(deflt int8) int8 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int8) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int8(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int8{}
- } else {
- v.V = l.Int8()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int8) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int8) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int8) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int8) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go
deleted file mode 100644
index 11c90b4ed..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type String struct {
- V string
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OString(v string) String {
- return String{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v String) Get(deflt string) string {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v String) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.String(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = String{}
- } else {
- v.V = l.String()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v String) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *String) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v String) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v String) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go
deleted file mode 100644
index 57efd3185..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint struct {
- V uint
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint(v uint) Uint {
- return Uint{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint) Get(deflt uint) uint {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint{}
- } else {
- v.V = l.Uint()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go
deleted file mode 100644
index f28e1d2ef..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint16 struct {
- V uint16
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint16(v uint16) Uint16 {
- return Uint16{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint16) Get(deflt uint16) uint16 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint16) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint16(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint16{}
- } else {
- v.V = l.Uint16()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint16) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint16) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint16) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint16) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go
deleted file mode 100644
index 9fb95c0db..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint32 struct {
- V uint32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint32(v uint32) Uint32 {
- return Uint32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint32) Get(deflt uint32) uint32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint32{}
- } else {
- v.V = l.Uint32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go
deleted file mode 100644
index 0e623c62d..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint64 struct {
- V uint64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint64(v uint64) Uint64 {
- return Uint64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint64) Get(deflt uint64) uint64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint64{}
- } else {
- v.V = l.Uint64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go
deleted file mode 100644
index c629e4453..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint8 struct {
- V uint8
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint8(v uint8) Uint8 {
- return Uint8{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint8) Get(deflt uint8) uint8 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint8) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint8(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint8{}
- } else {
- v.V = l.Uint8()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint8) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint8) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint8) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint8) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/optional/opt.go b/vendor/github.com/mailru/easyjson/opt/optional/opt.go
deleted file mode 100644
index 277dd1a3b..000000000
--- a/vendor/github.com/mailru/easyjson/opt/optional/opt.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// +build none
-
-package optional
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-type A int
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Optional struct {
- V A
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OOptional(v A) Optional {
- return Optional{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Optional) Get(deflt A) A {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Optional) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Optional(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Optional) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Optional{}
- } else {
- v.V = l.Optional()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Optional) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Optional) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Optional) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Optional) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/opts.go b/vendor/github.com/mailru/easyjson/opt/opts.go
deleted file mode 100644
index 3617f7f9f..000000000
--- a/vendor/github.com/mailru/easyjson/opt/opts.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package opt
-
-//go:generate sed -i "s/\\+build none/generated by gotemplate/" optional/opt.go
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int(int)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint(uint)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int8(int8)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int16(int16)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int32(int32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int64(int64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint8(uint8)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint16(uint16)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint32(uint32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint64(uint64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float32(float32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float64(float64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Bool(bool)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" String(string)
-//go:generate sed -i "s/generated by gotemplate/+build none/" optional/opt.go
diff --git a/vendor/github.com/mailru/easyjson/parser/parser.go b/vendor/github.com/mailru/easyjson/parser/parser.go
deleted file mode 100644
index 5bd06e946..000000000
--- a/vendor/github.com/mailru/easyjson/parser/parser.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package parser
-
-import (
- "go/ast"
- "go/parser"
- "go/token"
- "os/exec"
- "strings"
-)
-
-const structComment = "easyjson:json"
-
-type Parser struct {
- PkgPath string
- PkgName string
- StructNames []string
- AllStructs bool
-}
-
-type visitor struct {
- *Parser
-
- name string
- explicit bool
-}
-
-func (p *Parser) needType(comments string) bool {
- for _, v := range strings.Split(comments, "\n") {
- if strings.HasPrefix(v, structComment) {
- return true
- }
- }
- return false
-}
-
-func (v *visitor) Visit(n ast.Node) (w ast.Visitor) {
- switch n := n.(type) {
- case *ast.Package:
- return v
- case *ast.File:
- v.PkgName = n.Name.String()
- return v
-
- case *ast.GenDecl:
- v.explicit = v.needType(n.Doc.Text())
-
- if !v.explicit && !v.AllStructs {
- return nil
- }
- return v
- case *ast.TypeSpec:
- v.name = n.Name.String()
-
- // Allow to specify non-structs explicitly independent of '-all' flag.
- if v.explicit {
- v.StructNames = append(v.StructNames, v.name)
- return nil
- }
- return v
- case *ast.StructType:
- v.StructNames = append(v.StructNames, v.name)
- return nil
- }
- return nil
-}
-
-func (p *Parser) Parse(fname string, isDir bool) error {
- var err error
- if p.PkgPath, err = getPkgPath(fname, isDir); err != nil {
- return err
- }
-
- fset := token.NewFileSet()
- if isDir {
- packages, err := parser.ParseDir(fset, fname, nil, parser.ParseComments)
- if err != nil {
- return err
- }
-
- for _, pckg := range packages {
- ast.Walk(&visitor{Parser: p}, pckg)
- }
- } else {
- f, err := parser.ParseFile(fset, fname, nil, parser.ParseComments)
- if err != nil {
- return err
- }
-
- ast.Walk(&visitor{Parser: p}, f)
- }
- return nil
-}
-
-func getDefaultGoPath() (string, error) {
- output, err := exec.Command("go", "env", "GOPATH").Output()
- return string(output), err
-}
diff --git a/vendor/github.com/mailru/easyjson/parser/parser_unix.go b/vendor/github.com/mailru/easyjson/parser/parser_unix.go
deleted file mode 100644
index 09b20a2e1..000000000
--- a/vendor/github.com/mailru/easyjson/parser/parser_unix.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// +build !windows
-
-package parser
-
-import (
- "fmt"
- "os"
- "path"
- "strings"
-)
-
-func getPkgPath(fname string, isDir bool) (string, error) {
- if !path.IsAbs(fname) {
- pwd, err := os.Getwd()
- if err != nil {
- return "", err
- }
- fname = path.Join(pwd, fname)
- }
-
- gopath := os.Getenv("GOPATH")
- if gopath == "" {
- var err error
- gopath, err = getDefaultGoPath()
- if err != nil {
- return "", fmt.Errorf("cannot determine GOPATH: %s", err)
- }
- }
-
- for _, p := range strings.Split(os.Getenv("GOPATH"), ":") {
- prefix := path.Join(p, "src") + "/"
- if rel := strings.TrimPrefix(fname, prefix); rel != fname {
- if !isDir {
- return path.Dir(rel), nil
- } else {
- return path.Clean(rel), nil
- }
- }
- }
-
- return "", fmt.Errorf("file '%v' is not in GOPATH", fname)
-}
diff --git a/vendor/github.com/mailru/easyjson/parser/parser_windows.go b/vendor/github.com/mailru/easyjson/parser/parser_windows.go
deleted file mode 100644
index 90d3a78b5..000000000
--- a/vendor/github.com/mailru/easyjson/parser/parser_windows.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package parser
-
-import (
- "fmt"
- "os"
- "path"
- "path/filepath"
- "strings"
-)
-
-func normalizePath(path string) string {
- // use lower case, as Windows file systems will almost always be case insensitive
- return strings.ToLower(strings.Replace(path, "\\", "/", -1))
-}
-
-func getPkgPath(fname string, isDir bool) (string, error) {
- // path.IsAbs doesn't work properly on Windows; use filepath.IsAbs instead
- if !filepath.IsAbs(fname) {
- pwd, err := os.Getwd()
- if err != nil {
- return "", err
- }
- fname = path.Join(pwd, fname)
- }
-
- fname = normalizePath(fname)
-
- gopath := os.Getenv("GOPATH")
- if gopath == "" {
- var err error
- gopath, err = getDefaultGoPath()
- if err != nil {
- return "", fmt.Errorf("cannot determine GOPATH: %s", err)
- }
- }
-
- for _, p := range strings.Split(os.Getenv("GOPATH"), ";") {
- prefix := path.Join(normalizePath(p), "src") + "/"
- if rel := strings.TrimPrefix(fname, prefix); rel != fname {
- if !isDir {
- return path.Dir(rel), nil
- } else {
- return path.Clean(rel), nil
- }
- }
- }
-
- return "", fmt.Errorf("file '%v' is not in GOPATH", fname)
-}
diff --git a/vendor/github.com/mailru/easyjson/tests/basic_test.go b/vendor/github.com/mailru/easyjson/tests/basic_test.go
deleted file mode 100644
index 018678402..000000000
--- a/vendor/github.com/mailru/easyjson/tests/basic_test.go
+++ /dev/null
@@ -1,231 +0,0 @@
-package tests
-
-import (
- "reflect"
- "testing"
-
- "encoding/json"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jwriter"
-)
-
-type testType interface {
- json.Marshaler
- json.Unmarshaler
-}
-
-var testCases = []struct {
- Decoded testType
- Encoded string
-}{
- {&primitiveTypesValue, primitiveTypesString},
- {&namedPrimitiveTypesValue, namedPrimitiveTypesString},
- {&structsValue, structsString},
- {&omitEmptyValue, omitEmptyString},
- {&snakeStructValue, snakeStructString},
- {&omitEmptyDefaultValue, omitEmptyDefaultString},
- {&optsValue, optsString},
- {&rawValue, rawString},
- {&stdMarshalerValue, stdMarshalerString},
- {&userMarshalerValue, userMarshalerString},
- {&unexportedStructValue, unexportedStructString},
- {&excludedFieldValue, excludedFieldString},
- {&sliceValue, sliceString},
- {&arrayValue, arrayString},
- {&mapsValue, mapsString},
- {&deepNestValue, deepNestString},
- {&IntsValue, IntsString},
- {&mapStringStringValue, mapStringStringString},
- {&namedTypeValue, namedTypeValueString},
- {&mapMyIntStringValue, mapMyIntStringValueString},
- {&mapIntStringValue, mapIntStringValueString},
- {&mapInt32StringValue, mapInt32StringValueString},
- {&mapInt64StringValue, mapInt64StringValueString},
- {&mapUintStringValue, mapUintStringValueString},
- {&mapUint32StringValue, mapUint32StringValueString},
- {&mapUint64StringValue, mapUint64StringValueString},
- {&mapUintptrStringValue, mapUintptrStringValueString},
- {&intKeyedMapStructValue, intKeyedMapStructValueString},
-}
-
-func TestMarshal(t *testing.T) {
- for i, test := range testCases {
- data, err := test.Decoded.MarshalJSON()
- if err != nil {
- t.Errorf("[%d, %T] MarshalJSON() error: %v", i, test.Decoded, err)
- }
-
- got := string(data)
- if got != test.Encoded {
- t.Errorf("[%d, %T] MarshalJSON(): got \n%v\n\t\t want \n%v", i, test.Decoded, got, test.Encoded)
- }
- }
-}
-
-func TestUnmarshal(t *testing.T) {
- for i, test := range testCases {
- v1 := reflect.New(reflect.TypeOf(test.Decoded).Elem()).Interface()
- v := v1.(testType)
-
- err := v.UnmarshalJSON([]byte(test.Encoded))
- if err != nil {
- t.Errorf("[%d, %T] UnmarshalJSON() error: %v", i, test.Decoded, err)
- }
-
- if !reflect.DeepEqual(v, test.Decoded) {
- t.Errorf("[%d, %T] UnmarshalJSON(): got \n%+v\n\t\t want \n%+v", i, test.Decoded, v, test.Decoded)
- }
- }
-}
-
-func TestRawMessageSTD(t *testing.T) {
- type T struct {
- F easyjson.RawMessage
- Fnil easyjson.RawMessage
- }
-
- val := T{F: easyjson.RawMessage([]byte(`"test"`))}
- str := `{"F":"test","Fnil":null}`
-
- data, err := json.Marshal(val)
- if err != nil {
- t.Errorf("json.Marshal() error: %v", err)
- }
- got := string(data)
- if got != str {
- t.Errorf("json.Marshal() = %v; want %v", got, str)
- }
-
- wantV := T{F: easyjson.RawMessage([]byte(`"test"`)), Fnil: easyjson.RawMessage([]byte("null"))}
- var gotV T
-
- err = json.Unmarshal([]byte(str), &gotV)
- if err != nil {
- t.Errorf("json.Unmarshal() error: %v", err)
- }
- if !reflect.DeepEqual(gotV, wantV) {
- t.Errorf("json.Unmarshal() = %v; want %v", gotV, wantV)
- }
-}
-
-func TestParseNull(t *testing.T) {
- var got, want SubStruct
- if err := easyjson.Unmarshal([]byte("null"), &got); err != nil {
- t.Errorf("Unmarshal() error: %v", err)
- }
-
- if !reflect.DeepEqual(got, want) {
- t.Errorf("Unmarshal() = %+v; want %+v", got, want)
- }
-}
-
-var testSpecialCases = []struct {
- EncodedString string
- Value string
-}{
- {`"Username \u003cuser@example.com\u003e"`, `Username <user@example.com>`},
- {`"Username\ufffd"`, "Username\xc5"},
- {`"теÑÑ‚zтеÑÑ‚"`, "теÑÑ‚zтеÑÑ‚"},
- {`"теÑÑ‚\ufffdтеÑÑ‚"`, "теÑÑ‚\xc5теÑÑ‚"},
- {`"绿茶"`, "绿茶"},
- {`"绿\ufffd茶"`, "绿\xc5茶"},
- {`"теÑÑ‚\u2028"`, "теÑÑ‚\xE2\x80\xA8"},
- {`"\\\r\n\t\""`, "\\\r\n\t\""},
- {`"ü"`, "ü"},
-}
-
-func TestSpecialCases(t *testing.T) {
- for i, test := range testSpecialCases {
- w := jwriter.Writer{}
- w.String(test.Value)
- got := string(w.Buffer.BuildBytes())
- if got != test.EncodedString {
- t.Errorf("[%d] Encoded() = %+v; want %+v", i, got, test.EncodedString)
- }
- }
-}
-
-func TestOverflowArray(t *testing.T) {
- var a Arrays
- err := easyjson.Unmarshal([]byte(arrayOverflowString), &a)
- if err != nil {
- t.Error(err)
- }
- if a != arrayValue {
- t.Errorf("Unmarshal(%v) = %+v; want %+v", arrayOverflowString, a, arrayValue)
- }
-}
-
-func TestUnderflowArray(t *testing.T) {
- var a Arrays
- err := easyjson.Unmarshal([]byte(arrayUnderflowString), &a)
- if err != nil {
- t.Error(err)
- }
- if a != arrayUnderflowValue {
- t.Errorf("Unmarshal(%v) = %+v; want %+v", arrayUnderflowString, a, arrayUnderflowValue)
- }
-}
-
-func TestEncodingFlags(t *testing.T) {
- for i, test := range []struct {
- Flags jwriter.Flags
- In easyjson.Marshaler
- Want string
- }{
- {0, EncodingFlagsTestMap{}, `{"F":null}`},
- {0, EncodingFlagsTestSlice{}, `{"F":null}`},
- {jwriter.NilMapAsEmpty, EncodingFlagsTestMap{}, `{"F":{}}`},
- {jwriter.NilSliceAsEmpty, EncodingFlagsTestSlice{}, `{"F":[]}`},
- } {
- w := &jwriter.Writer{Flags: test.Flags}
- test.In.MarshalEasyJSON(w)
-
- data, err := w.BuildBytes()
- if err != nil {
- t.Errorf("[%v] easyjson.Marshal(%+v) error: %v", i, test.In, err)
- }
-
- v := string(data)
- if v != test.Want {
- t.Errorf("[%v] easyjson.Marshal(%+v) = %v; want %v", i, test.In, v, test.Want)
- }
- }
-
-}
-
-func TestNestedEasyJsonMarshal(t *testing.T) {
- n := map[string]*NestedEasyMarshaler{
- "Value": {},
- "Slice1": {},
- "Slice2": {},
- "Map1": {},
- "Map2": {},
- }
-
- ni := NestedInterfaces{
- Value: n["Value"],
- Slice: []interface{}{n["Slice1"], n["Slice2"]},
- Map: map[string]interface{}{"1": n["Map1"], "2": n["Map2"]},
- }
- easyjson.Marshal(ni)
-
- for k, v := range n {
- if !v.EasilyMarshaled {
- t.Errorf("Nested interface %s wasn't easily marshaled", k)
- }
- }
-}
-
-func TestUnmarshalStructWithEmbeddedPtrStruct(t *testing.T) {
- var s = StructWithInterface{Field2: &EmbeddedStruct{}}
- var err error
- err = easyjson.Unmarshal([]byte(structWithInterfaceString), &s)
- if err != nil {
- t.Errorf("easyjson.Unmarshal() error: %v", err)
- }
- if !reflect.DeepEqual(s, structWithInterfaceValueFilled) {
- t.Errorf("easyjson.Unmarshal() = %#v; want %#v", s, structWithInterfaceValueFilled)
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/tests/data.go b/vendor/github.com/mailru/easyjson/tests/data.go
deleted file mode 100644
index 145f093d6..000000000
--- a/vendor/github.com/mailru/easyjson/tests/data.go
+++ /dev/null
@@ -1,759 +0,0 @@
-package tests
-
-import (
- "fmt"
- "math"
- "net"
- "time"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/opt"
-)
-
-type PrimitiveTypes struct {
- String string
- Bool bool
-
- Int int
- Int8 int8
- Int16 int16
- Int32 int32
- Int64 int64
-
- Uint uint
- Uint8 uint8
- Uint16 uint16
- Uint32 uint32
- Uint64 uint64
-
- IntString int `json:",string"`
- Int8String int8 `json:",string"`
- Int16String int16 `json:",string"`
- Int32String int32 `json:",string"`
- Int64String int64 `json:",string"`
-
- UintString uint `json:",string"`
- Uint8String uint8 `json:",string"`
- Uint16String uint16 `json:",string"`
- Uint32String uint32 `json:",string"`
- Uint64String uint64 `json:",string"`
-
- Float32 float32
- Float64 float64
-
- Ptr *string
- PtrNil *string
-}
-
-var str = "bla"
-
-var primitiveTypesValue = PrimitiveTypes{
- String: "test", Bool: true,
-
- Int: math.MinInt32,
- Int8: math.MinInt8,
- Int16: math.MinInt16,
- Int32: math.MinInt32,
- Int64: math.MinInt64,
-
- Uint: math.MaxUint32,
- Uint8: math.MaxUint8,
- Uint16: math.MaxUint16,
- Uint32: math.MaxUint32,
- Uint64: math.MaxUint64,
-
- IntString: math.MinInt32,
- Int8String: math.MinInt8,
- Int16String: math.MinInt16,
- Int32String: math.MinInt32,
- Int64String: math.MinInt64,
-
- UintString: math.MaxUint32,
- Uint8String: math.MaxUint8,
- Uint16String: math.MaxUint16,
- Uint32String: math.MaxUint32,
- Uint64String: math.MaxUint64,
-
- Float32: 1.5,
- Float64: math.MaxFloat64,
-
- Ptr: &str,
-}
-
-var primitiveTypesString = "{" +
- `"String":"test","Bool":true,` +
-
- `"Int":` + fmt.Sprint(math.MinInt32) + `,` +
- `"Int8":` + fmt.Sprint(math.MinInt8) + `,` +
- `"Int16":` + fmt.Sprint(math.MinInt16) + `,` +
- `"Int32":` + fmt.Sprint(math.MinInt32) + `,` +
- `"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` +
-
- `"Uint":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
- `"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` +
- `"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` +
- `"Uint32":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
- `"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` +
-
- `"IntString":"` + fmt.Sprint(math.MinInt32) + `",` +
- `"Int8String":"` + fmt.Sprint(math.MinInt8) + `",` +
- `"Int16String":"` + fmt.Sprint(math.MinInt16) + `",` +
- `"Int32String":"` + fmt.Sprint(math.MinInt32) + `",` +
- `"Int64String":"` + fmt.Sprint(int64(math.MinInt64)) + `",` +
-
- `"UintString":"` + fmt.Sprint(uint32(math.MaxUint32)) + `",` +
- `"Uint8String":"` + fmt.Sprint(math.MaxUint8) + `",` +
- `"Uint16String":"` + fmt.Sprint(math.MaxUint16) + `",` +
- `"Uint32String":"` + fmt.Sprint(uint32(math.MaxUint32)) + `",` +
- `"Uint64String":"` + fmt.Sprint(uint64(math.MaxUint64)) + `",` +
-
- `"Float32":` + fmt.Sprint(1.5) + `,` +
- `"Float64":` + fmt.Sprint(math.MaxFloat64) + `,` +
-
- `"Ptr":"bla",` +
- `"PtrNil":null` +
-
- "}"
-
-type (
- NamedString string
- NamedBool bool
-
- NamedInt int
- NamedInt8 int8
- NamedInt16 int16
- NamedInt32 int32
- NamedInt64 int64
-
- NamedUint uint
- NamedUint8 uint8
- NamedUint16 uint16
- NamedUint32 uint32
- NamedUint64 uint64
-
- NamedFloat32 float32
- NamedFloat64 float64
-
- NamedStrPtr *string
-)
-
-type NamedPrimitiveTypes struct {
- String NamedString
- Bool NamedBool
-
- Int NamedInt
- Int8 NamedInt8
- Int16 NamedInt16
- Int32 NamedInt32
- Int64 NamedInt64
-
- Uint NamedUint
- Uint8 NamedUint8
- Uint16 NamedUint16
- Uint32 NamedUint32
- Uint64 NamedUint64
-
- Float32 NamedFloat32
- Float64 NamedFloat64
-
- Ptr NamedStrPtr
- PtrNil NamedStrPtr
-}
-
-var namedPrimitiveTypesValue = NamedPrimitiveTypes{
- String: "test",
- Bool: true,
-
- Int: math.MinInt32,
- Int8: math.MinInt8,
- Int16: math.MinInt16,
- Int32: math.MinInt32,
- Int64: math.MinInt64,
-
- Uint: math.MaxUint32,
- Uint8: math.MaxUint8,
- Uint16: math.MaxUint16,
- Uint32: math.MaxUint32,
- Uint64: math.MaxUint64,
-
- Float32: 1.5,
- Float64: math.MaxFloat64,
-
- Ptr: NamedStrPtr(&str),
-}
-
-var namedPrimitiveTypesString = "{" +
- `"String":"test",` +
- `"Bool":true,` +
-
- `"Int":` + fmt.Sprint(math.MinInt32) + `,` +
- `"Int8":` + fmt.Sprint(math.MinInt8) + `,` +
- `"Int16":` + fmt.Sprint(math.MinInt16) + `,` +
- `"Int32":` + fmt.Sprint(math.MinInt32) + `,` +
- `"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` +
-
- `"Uint":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
- `"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` +
- `"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` +
- `"Uint32":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
- `"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` +
-
- `"Float32":` + fmt.Sprint(1.5) + `,` +
- `"Float64":` + fmt.Sprint(math.MaxFloat64) + `,` +
-
- `"Ptr":"bla",` +
- `"PtrNil":null` +
- "}"
-
-type SubStruct struct {
- Value string
- Value2 string
- unexpored bool
-}
-
-type SubP struct {
- V string
-}
-
-type SubStructAlias SubStruct
-
-type Structs struct {
- SubStruct
- *SubP
-
- Value2 int
-
- Sub1 SubStruct `json:"substruct"`
- Sub2 *SubStruct
- SubNil *SubStruct
-
- SubSlice []SubStruct
- SubSliceNil []SubStruct
-
- SubPtrSlice []*SubStruct
- SubPtrSliceNil []*SubStruct
-
- SubA1 SubStructAlias
- SubA2 *SubStructAlias
-
- Anonymous struct {
- V string
- I int
- }
- Anonymous1 *struct {
- V string
- }
-
- AnonymousSlice []struct{ V int }
- AnonymousPtrSlice []*struct{ V int }
-
- Slice []string
-
- unexported bool
-}
-
-var structsValue = Structs{
- SubStruct: SubStruct{Value: "test"},
- SubP: &SubP{V: "subp"},
-
- Value2: 5,
-
- Sub1: SubStruct{Value: "test1", Value2: "v"},
- Sub2: &SubStruct{Value: "test2", Value2: "v2"},
-
- SubSlice: []SubStruct{
- {Value: "s1"},
- {Value: "s2"},
- },
-
- SubPtrSlice: []*SubStruct{
- {Value: "p1"},
- {Value: "p2"},
- },
-
- SubA1: SubStructAlias{Value: "test3", Value2: "v3"},
- SubA2: &SubStructAlias{Value: "test4", Value2: "v4"},
-
- Anonymous: struct {
- V string
- I int
- }{V: "bla", I: 5},
-
- Anonymous1: &struct {
- V string
- }{V: "bla1"},
-
- AnonymousSlice: []struct{ V int }{{1}, {2}},
- AnonymousPtrSlice: []*struct{ V int }{{3}, {4}},
-
- Slice: []string{"test5", "test6"},
-}
-
-var structsString = "{" +
- `"Value2":5,` +
-
- `"substruct":{"Value":"test1","Value2":"v"},` +
- `"Sub2":{"Value":"test2","Value2":"v2"},` +
- `"SubNil":null,` +
-
- `"SubSlice":[{"Value":"s1","Value2":""},{"Value":"s2","Value2":""}],` +
- `"SubSliceNil":null,` +
-
- `"SubPtrSlice":[{"Value":"p1","Value2":""},{"Value":"p2","Value2":""}],` +
- `"SubPtrSliceNil":null,` +
-
- `"SubA1":{"Value":"test3","Value2":"v3"},` +
- `"SubA2":{"Value":"test4","Value2":"v4"},` +
-
- `"Anonymous":{"V":"bla","I":5},` +
- `"Anonymous1":{"V":"bla1"},` +
-
- `"AnonymousSlice":[{"V":1},{"V":2}],` +
- `"AnonymousPtrSlice":[{"V":3},{"V":4}],` +
-
- `"Slice":["test5","test6"],` +
-
- // Embedded fields go last.
- `"V":"subp",` +
- `"Value":"test"` +
- "}"
-
-type OmitEmpty struct {
- // NOTE: first field is empty to test comma printing.
-
- StrE, StrNE string `json:",omitempty"`
- PtrE, PtrNE *string `json:",omitempty"`
-
- IntNE int `json:"intField,omitempty"`
- IntE int `json:",omitempty"`
-
- // NOTE: omitempty has no effect on non-pointer struct fields.
- SubE, SubNE SubStruct `json:",omitempty"`
- SubPE, SubPNE *SubStruct `json:",omitempty"`
-}
-
-var omitEmptyValue = OmitEmpty{
- StrNE: "str",
- PtrNE: &str,
- IntNE: 6,
- SubNE: SubStruct{Value: "1", Value2: "2"},
- SubPNE: &SubStruct{Value: "3", Value2: "4"},
-}
-
-var omitEmptyString = "{" +
- `"StrNE":"str",` +
- `"PtrNE":"bla",` +
- `"intField":6,` +
- `"SubE":{"Value":"","Value2":""},` +
- `"SubNE":{"Value":"1","Value2":"2"},` +
- `"SubPNE":{"Value":"3","Value2":"4"}` +
- "}"
-
-type Opts struct {
- StrNull opt.String
- StrEmpty opt.String
- Str opt.String
- StrOmitempty opt.String `json:",omitempty"`
-
- IntNull opt.Int
- IntZero opt.Int
- Int opt.Int
-}
-
-var optsValue = Opts{
- StrEmpty: opt.OString(""),
- Str: opt.OString("test"),
-
- IntZero: opt.OInt(0),
- Int: opt.OInt(5),
-}
-
-var optsString = `{` +
- `"StrNull":null,` +
- `"StrEmpty":"",` +
- `"Str":"test",` +
- `"IntNull":null,` +
- `"IntZero":0,` +
- `"Int":5` +
- `}`
-
-type Raw struct {
- Field easyjson.RawMessage
- Field2 string
-}
-
-var rawValue = Raw{
- Field: []byte(`{"a" : "b"}`),
- Field2: "test",
-}
-
-var rawString = `{` +
- `"Field":{"a" : "b"},` +
- `"Field2":"test"` +
- `}`
-
-type StdMarshaler struct {
- T time.Time
- IP net.IP
-}
-
-var stdMarshalerValue = StdMarshaler{
- T: time.Date(2016, 01, 02, 14, 15, 10, 0, time.UTC),
- IP: net.IPv4(192, 168, 0, 1),
-}
-var stdMarshalerString = `{` +
- `"T":"2016-01-02T14:15:10Z",` +
- `"IP":"192.168.0.1"` +
- `}`
-
-type UserMarshaler struct {
- V vMarshaler
- T tMarshaler
-}
-
-type vMarshaler net.IP
-
-func (v vMarshaler) MarshalJSON() ([]byte, error) {
- return []byte(`"0::0"`), nil
-}
-
-func (v *vMarshaler) UnmarshalJSON([]byte) error {
- *v = vMarshaler(net.IPv6zero)
- return nil
-}
-
-type tMarshaler net.IP
-
-func (v tMarshaler) MarshalText() ([]byte, error) {
- return []byte(`[0::0]`), nil
-}
-
-func (v *tMarshaler) UnmarshalText([]byte) error {
- *v = tMarshaler(net.IPv6zero)
- return nil
-}
-
-var userMarshalerValue = UserMarshaler{
- V: vMarshaler(net.IPv6zero),
- T: tMarshaler(net.IPv6zero),
-}
-var userMarshalerString = `{` +
- `"V":"0::0",` +
- `"T":"[0::0]"` +
- `}`
-
-type unexportedStruct struct {
- Value string
-}
-
-var unexportedStructValue = unexportedStruct{"test"}
-var unexportedStructString = `{"Value":"test"}`
-
-type ExcludedField struct {
- Process bool `json:"process"`
- DoNotProcess bool `json:"-"`
- DoNotProcess1 bool `json:"-"`
-}
-
-var excludedFieldValue = ExcludedField{
- Process: true,
- DoNotProcess: false,
- DoNotProcess1: false,
-}
-var excludedFieldString = `{"process":true}`
-
-type Slices struct {
- ByteSlice []byte
- EmptyByteSlice []byte
- NilByteSlice []byte
- IntSlice []int
- EmptyIntSlice []int
- NilIntSlice []int
-}
-
-var sliceValue = Slices{
- ByteSlice: []byte("abc"),
- EmptyByteSlice: []byte{},
- NilByteSlice: []byte(nil),
- IntSlice: []int{1, 2, 3, 4, 5},
- EmptyIntSlice: []int{},
- NilIntSlice: []int(nil),
-}
-
-var sliceString = `{` +
- `"ByteSlice":"YWJj",` +
- `"EmptyByteSlice":"",` +
- `"NilByteSlice":null,` +
- `"IntSlice":[1,2,3,4,5],` +
- `"EmptyIntSlice":[],` +
- `"NilIntSlice":null` +
- `}`
-
-type Arrays struct {
- ByteArray [3]byte
- EmptyByteArray [0]byte
- IntArray [5]int
- EmptyIntArray [0]int
-}
-
-var arrayValue = Arrays{
- ByteArray: [3]byte{'a', 'b', 'c'},
- EmptyByteArray: [0]byte{},
- IntArray: [5]int{1, 2, 3, 4, 5},
- EmptyIntArray: [0]int{},
-}
-
-var arrayString = `{` +
- `"ByteArray":"YWJj",` +
- `"EmptyByteArray":"",` +
- `"IntArray":[1,2,3,4,5],` +
- `"EmptyIntArray":[]` +
- `}`
-
-var arrayOverflowString = `{` +
- `"ByteArray":"YWJjbnNk",` +
- `"EmptyByteArray":"YWJj",` +
- `"IntArray":[1,2,3,4,5,6],` +
- `"EmptyIntArray":[7,8]` +
- `}`
-
-var arrayUnderflowValue = Arrays{
- ByteArray: [3]byte{'x', 0, 0},
- EmptyByteArray: [0]byte{},
- IntArray: [5]int{1, 2, 0, 0, 0},
- EmptyIntArray: [0]int{},
-}
-
-var arrayUnderflowString = `{` +
- `"ByteArray":"eA==",` +
- `"IntArray":[1,2]` +
- `}`
-
-type Str string
-
-type Maps struct {
- Map map[string]string
- InterfaceMap map[string]interface{}
- NilMap map[string]string
-
- CustomMap map[Str]Str
-}
-
-var mapsValue = Maps{
- Map: map[string]string{"A": "b"}, // only one item since map iteration is randomized
- InterfaceMap: map[string]interface{}{"G": float64(1)},
-
- CustomMap: map[Str]Str{"c": "d"},
-}
-
-var mapsString = `{` +
- `"Map":{"A":"b"},` +
- `"InterfaceMap":{"G":1},` +
- `"NilMap":null,` +
- `"CustomMap":{"c":"d"}` +
- `}`
-
-type NamedSlice []Str
-type NamedMap map[Str]Str
-
-type DeepNest struct {
- SliceMap map[Str][]Str
- SliceMap1 map[Str][]Str
- SliceMap2 map[Str][]Str
- NamedSliceMap map[Str]NamedSlice
- NamedMapMap map[Str]NamedMap
- MapSlice []map[Str]Str
- NamedSliceSlice []NamedSlice
- NamedMapSlice []NamedMap
- NamedStringSlice []NamedString
-}
-
-var deepNestValue = DeepNest{
- SliceMap: map[Str][]Str{
- "testSliceMap": []Str{
- "0",
- "1",
- },
- },
- SliceMap1: map[Str][]Str{
- "testSliceMap1": []Str(nil),
- },
- SliceMap2: map[Str][]Str{
- "testSliceMap2": []Str{},
- },
- NamedSliceMap: map[Str]NamedSlice{
- "testNamedSliceMap": NamedSlice{
- "2",
- "3",
- },
- },
- NamedMapMap: map[Str]NamedMap{
- "testNamedMapMap": NamedMap{
- "key1": "value1",
- },
- },
- MapSlice: []map[Str]Str{
- map[Str]Str{
- "testMapSlice": "someValue",
- },
- },
- NamedSliceSlice: []NamedSlice{
- NamedSlice{
- "someValue1",
- "someValue2",
- },
- NamedSlice{
- "someValue3",
- "someValue4",
- },
- },
- NamedMapSlice: []NamedMap{
- NamedMap{
- "key2": "value2",
- },
- NamedMap{
- "key3": "value3",
- },
- },
- NamedStringSlice: []NamedString{
- "value4", "value5",
- },
-}
-
-var deepNestString = `{` +
- `"SliceMap":{` +
- `"testSliceMap":["0","1"]` +
- `},` +
- `"SliceMap1":{` +
- `"testSliceMap1":null` +
- `},` +
- `"SliceMap2":{` +
- `"testSliceMap2":[]` +
- `},` +
- `"NamedSliceMap":{` +
- `"testNamedSliceMap":["2","3"]` +
- `},` +
- `"NamedMapMap":{` +
- `"testNamedMapMap":{"key1":"value1"}` +
- `},` +
- `"MapSlice":[` +
- `{"testMapSlice":"someValue"}` +
- `],` +
- `"NamedSliceSlice":[` +
- `["someValue1","someValue2"],` +
- `["someValue3","someValue4"]` +
- `],` +
- `"NamedMapSlice":[` +
- `{"key2":"value2"},` +
- `{"key3":"value3"}` +
- `],` +
- `"NamedStringSlice":["value4","value5"]` +
- `}`
-
-//easyjson:json
-type Ints []int
-
-var IntsValue = Ints{1, 2, 3, 4, 5}
-
-var IntsString = `[1,2,3,4,5]`
-
-//easyjson:json
-type MapStringString map[string]string
-
-var mapStringStringValue = MapStringString{"a": "b"}
-
-var mapStringStringString = `{"a":"b"}`
-
-type RequiredOptionalStruct struct {
- FirstName string `json:"first_name,required"`
- Lastname string `json:"last_name"`
-}
-
-//easyjson:json
-type EncodingFlagsTestMap struct {
- F map[string]string
-}
-
-//easyjson:json
-type EncodingFlagsTestSlice struct {
- F []string
-}
-
-type StructWithInterface struct {
- Field1 int `json:"f1"`
- Field2 interface{} `json:"f2"`
- Field3 string `json:"f3"`
-}
-
-type EmbeddedStruct struct {
- Field1 int `json:"f1"`
- Field2 string `json:"f2"`
-}
-
-var structWithInterfaceString = `{"f1":1,"f2":{"f1":11,"f2":"22"},"f3":"3"}`
-var structWithInterfaceValueFilled = StructWithInterface{1, &EmbeddedStruct{11, "22"}, "3"}
-
-//easyjson:json
-type MapIntString map[int]string
-
-var mapIntStringValue = MapIntString{3: "hi"}
-var mapIntStringValueString = `{"3":"hi"}`
-
-//easyjson:json
-type MapInt32String map[int32]string
-
-var mapInt32StringValue = MapInt32String{-354634382: "life"}
-var mapInt32StringValueString = `{"-354634382":"life"}`
-
-//easyjson:json
-type MapInt64String map[int64]string
-
-var mapInt64StringValue = MapInt64String{-3546343826724305832: "life"}
-var mapInt64StringValueString = `{"-3546343826724305832":"life"}`
-
-//easyjson:json
-type MapUintString map[uint]string
-
-var mapUintStringValue = MapUintString{42: "life"}
-var mapUintStringValueString = `{"42":"life"}`
-
-//easyjson:json
-type MapUint32String map[uint32]string
-
-var mapUint32StringValue = MapUint32String{354634382: "life"}
-var mapUint32StringValueString = `{"354634382":"life"}`
-
-//easyjson:json
-type MapUint64String map[uint64]string
-
-var mapUint64StringValue = MapUint64String{3546343826724305832: "life"}
-var mapUint64StringValueString = `{"3546343826724305832":"life"}`
-
-//easyjson:json
-type MapUintptrString map[uintptr]string
-
-var mapUintptrStringValue = MapUintptrString{272679208: "obj"}
-var mapUintptrStringValueString = `{"272679208":"obj"}`
-
-type MyInt int
-
-//easyjson:json
-type MapMyIntString map[MyInt]string
-
-var mapMyIntStringValue = MapMyIntString{MyInt(42): "life"}
-var mapMyIntStringValueString = `{"42":"life"}`
-
-//easyjson:json
-type IntKeyedMapStruct struct {
- Foo MapMyIntString `json:"foo"`
- Bar map[int16]MapUint32String `json:"bar"`
-}
-
-var intKeyedMapStructValue = IntKeyedMapStruct{
- Foo: mapMyIntStringValue,
- Bar: map[int16]MapUint32String{32: mapUint32StringValue},
-}
-var intKeyedMapStructValueString = `{` +
- `"foo":{"42":"life"},` +
- `"bar":{"32":{"354634382":"life"}}` +
- `}`
diff --git a/vendor/github.com/mailru/easyjson/tests/errors.go b/vendor/github.com/mailru/easyjson/tests/errors.go
deleted file mode 100644
index 14360fcc2..000000000
--- a/vendor/github.com/mailru/easyjson/tests/errors.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package tests
-
-//easyjson:json
-type ErrorIntSlice []int
-
-//easyjson:json
-type ErrorBoolSlice []bool
-
-//easyjson:json
-type ErrorUintSlice []uint
-
-//easyjson:json
-type ErrorStruct struct {
- Int int `json:"int"`
- String string `json:"string"`
- Slice []int `json:"slice"`
- IntSlice []int `json:"int_slice"`
-}
-
-type ErrorNestedStruct struct {
- ErrorStruct ErrorStruct `json:"error_struct"`
- Int int `json:"int"`
-}
-
-//easyjson:json
-type ErrorIntMap map[uint32]string
diff --git a/vendor/github.com/mailru/easyjson/tests/errors_test.go b/vendor/github.com/mailru/easyjson/tests/errors_test.go
deleted file mode 100644
index 40fa33544..000000000
--- a/vendor/github.com/mailru/easyjson/tests/errors_test.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package tests
-
-import (
- "testing"
-
- "github.com/mailru/easyjson/jlexer"
-)
-
-func TestMultipleErrorsInt(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`[1, 2, 3, "4", "5"]`),
- Offsets: []int{10, 15},
- },
- {
- Data: []byte(`[1, {"2":"3"}, 3, "4"]`),
- Offsets: []int{4, 18},
- },
- {
- Data: []byte(`[1, "2", "3", "4", "5", "6"]`),
- Offsets: []int{4, 9, 14, 19, 24},
- },
- {
- Data: []byte(`[1, 2, 3, 4, "5"]`),
- Offsets: []int{13},
- },
- {
- Data: []byte(`[{"1": "2"}]`),
- Offsets: []int{1},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
-
- var v ErrorIntSlice
-
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsInt(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
-
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsInt(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
-
-func TestMultipleErrorsBool(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`[true, false, true, false]`),
- },
- {
- Data: []byte(`["test", "value", "lol", "1"]`),
- Offsets: []int{1, 9, 18, 25},
- },
- {
- Data: []byte(`[true, 42, {"a":"b", "c":"d"}, false]`),
- Offsets: []int{7, 11},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
-
- var v ErrorBoolSlice
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsBool(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsBool(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
-
-func TestMultipleErrorsUint(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`[42, 42, 42]`),
- },
- {
- Data: []byte(`[17, "42", 32]`),
- Offsets: []int{5},
- },
- {
- Data: []byte(`["zz", "zz"]`),
- Offsets: []int{1, 7},
- },
- {
- Data: []byte(`[{}, 42]`),
- Offsets: []int{1},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
-
- var v ErrorUintSlice
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsUint(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsUint(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
-
-func TestMultipleErrorsStruct(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`{"string": "test", "slice":[42, 42, 42], "int_slice":[1, 2, 3]}`),
- },
- {
- Data: []byte(`{"string": {"test": "test"}, "slice":[42, 42, 42], "int_slice":["1", 2, 3]}`),
- Offsets: []int{11, 64},
- },
- {
- Data: []byte(`{"slice": [42, 42], "string": {"test": "test"}, "int_slice":["1", "2", 3]}`),
- Offsets: []int{30, 61, 66},
- },
- {
- Data: []byte(`{"string": "test", "slice": {}}`),
- Offsets: []int{28},
- },
- {
- Data: []byte(`{"slice":5, "string" : "test"}`),
- Offsets: []int{9},
- },
- {
- Data: []byte(`{"slice" : "test", "string" : "test"}`),
- Offsets: []int{11},
- },
- {
- Data: []byte(`{"slice": "", "string" : {}, "int":{}}`),
- Offsets: []int{10, 25, 35},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
- var v ErrorStruct
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsStruct(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsStruct(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
-
-func TestMultipleErrorsNestedStruct(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`{"error_struct":{}}`),
- },
- {
- Data: []byte(`{"error_struct":5}`),
- Offsets: []int{16},
- },
- {
- Data: []byte(`{"error_struct":[]}`),
- Offsets: []int{16},
- },
- {
- Data: []byte(`{"error_struct":{"int":{}}}`),
- Offsets: []int{23},
- },
- {
- Data: []byte(`{"error_struct":{"int_slice":{}}, "int":4}`),
- Offsets: []int{29},
- },
- {
- Data: []byte(`{"error_struct":{"int_slice":["1", 2, "3"]}, "int":[]}`),
- Offsets: []int{30, 38, 51},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
- var v ErrorNestedStruct
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsNestedStruct(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsNestedStruct(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
-
-func TestMultipleErrorsIntMap(t *testing.T) {
- for i, test := range []struct {
- Data []byte
- Offsets []int
- }{
- {
- Data: []byte(`{"a":"NumErr"}`),
- Offsets: []int{1},
- },
- {
- Data: []byte(`{"":"ErrSyntax"}`),
- Offsets: []int{1},
- },
- {
- Data: []byte(`{"a":"NumErr","33147483647":"ErrRange","-1":"ErrRange"}`),
- Offsets: []int{1, 14, 39},
- },
- } {
- l := jlexer.Lexer{
- Data: test.Data,
- UseMultipleErrors: true,
- }
-
- var v ErrorIntMap
-
- v.UnmarshalEasyJSON(&l)
-
- errors := l.GetNonFatalErrors()
-
- if len(errors) != len(test.Offsets) {
- t.Errorf("[%d] TestMultipleErrorsInt(): errornum: want: %d, got %d", i, len(test.Offsets), len(errors))
- return
- }
-
- for ii, e := range errors {
- if e.Offset != test.Offsets[ii] {
- t.Errorf("[%d] TestMultipleErrorsInt(): offset[%d]: want %d, got %d", i, ii, test.Offsets[ii], e.Offset)
- }
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/tests/named_type.go b/vendor/github.com/mailru/easyjson/tests/named_type.go
deleted file mode 100644
index 0ff8dfeb3..000000000
--- a/vendor/github.com/mailru/easyjson/tests/named_type.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package tests
-
-//easyjson:json
-type NamedType struct {
- Inner struct {
- // easyjson is mistakenly naming the type of this field 'tests.MyString' in the generated output
- // something about a named type inside an anonmymous type is triggering this bug
- Field MyString `tag:"value"`
- Field2 int "tag:\"value with ` in it\""
- }
-}
-
-type MyString string
-
-var namedTypeValue NamedType
-
-func init() {
- namedTypeValue.Inner.Field = "test"
- namedTypeValue.Inner.Field2 = 123
-}
-
-var namedTypeValueString = `{"Inner":{"Field":"test","Field2":123}}`
diff --git a/vendor/github.com/mailru/easyjson/tests/nested_easy.go b/vendor/github.com/mailru/easyjson/tests/nested_easy.go
deleted file mode 100644
index 6309a49f9..000000000
--- a/vendor/github.com/mailru/easyjson/tests/nested_easy.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package tests
-
-import (
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jwriter"
-)
-
-//easyjson:json
-type NestedInterfaces struct {
- Value interface{}
- Slice []interface{}
- Map map[string]interface{}
-}
-
-type NestedEasyMarshaler struct {
- EasilyMarshaled bool
-}
-
-var _ easyjson.Marshaler = &NestedEasyMarshaler{}
-
-func (i *NestedEasyMarshaler) MarshalEasyJSON(w *jwriter.Writer) {
- // We use this method only to indicate that easyjson.Marshaler
- // interface was really used while encoding.
- i.EasilyMarshaled = true
-} \ No newline at end of file
diff --git a/vendor/github.com/mailru/easyjson/tests/nothing.go b/vendor/github.com/mailru/easyjson/tests/nothing.go
deleted file mode 100644
index 35334f5f5..000000000
--- a/vendor/github.com/mailru/easyjson/tests/nothing.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package tests
-
-// No structs in this file
diff --git a/vendor/github.com/mailru/easyjson/tests/omitempty.go b/vendor/github.com/mailru/easyjson/tests/omitempty.go
deleted file mode 100644
index ede5eb95a..000000000
--- a/vendor/github.com/mailru/easyjson/tests/omitempty.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package tests
-
-//easyjson:json
-type OmitEmptyDefault struct {
- Field string
- Str string
- Str1 string `json:"s,!omitempty"`
- Str2 string `json:",!omitempty"`
-}
-
-var omitEmptyDefaultValue = OmitEmptyDefault{Field: "test"}
-var omitEmptyDefaultString = `{"Field":"test","s":"","Str2":""}`
diff --git a/vendor/github.com/mailru/easyjson/tests/opt_test.go b/vendor/github.com/mailru/easyjson/tests/opt_test.go
deleted file mode 100644
index bdd32aa4a..000000000
--- a/vendor/github.com/mailru/easyjson/tests/opt_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package tests
-
-import (
- "math"
- "reflect"
- "testing"
-
- "encoding/json"
-
- "github.com/mailru/easyjson/opt"
-)
-
-// This struct type must NOT have a generated marshaler
-type OptsVanilla struct {
- Int opt.Int
- Uint opt.Uint
-
- Int8 opt.Int8
- Int16 opt.Int16
- Int32 opt.Int32
- Int64 opt.Int64
-
- Uint8 opt.Uint8
- Uint16 opt.Uint16
- Uint32 opt.Uint32
- Uint64 opt.Uint64
-
- Float32 opt.Float32
- Float64 opt.Float64
-
- Bool opt.Bool
- String opt.String
-}
-
-var optsVanillaValue = OptsVanilla{
- Int: opt.OInt(-123),
- Uint: opt.OUint(123),
-
- Int8: opt.OInt8(math.MaxInt8),
- Int16: opt.OInt16(math.MaxInt16),
- Int32: opt.OInt32(math.MaxInt32),
- Int64: opt.OInt64(math.MaxInt64),
-
- Uint8: opt.OUint8(math.MaxUint8),
- Uint16: opt.OUint16(math.MaxUint16),
- Uint32: opt.OUint32(math.MaxUint32),
- Uint64: opt.OUint64(math.MaxUint64),
-
- Float32: opt.OFloat32(math.MaxFloat32),
- Float64: opt.OFloat64(math.MaxFloat64),
-
- Bool: opt.OBool(true),
- String: opt.OString("foo"),
-}
-
-func TestOptsVanilla(t *testing.T) {
- data, err := json.Marshal(optsVanillaValue)
- if err != nil {
- t.Errorf("Failed to marshal vanilla opts: %v", err)
- }
-
- var ov OptsVanilla
- if err := json.Unmarshal(data, &ov); err != nil {
- t.Errorf("Failed to unmarshal vanilla opts: %v", err)
- }
-
- if !reflect.DeepEqual(optsVanillaValue, ov) {
- t.Errorf("Vanilla opts unmarshal returned invalid value %+v, want %+v", ov, optsVanillaValue)
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/tests/required_test.go b/vendor/github.com/mailru/easyjson/tests/required_test.go
deleted file mode 100644
index 8cc743d8c..000000000
--- a/vendor/github.com/mailru/easyjson/tests/required_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package tests
-
-import (
- "fmt"
- "testing"
-)
-
-func TestRequiredField(t *testing.T) {
- cases := []struct{ json, errorMessage string }{
- {`{"first_name":"Foo", "last_name": "Bar"}`, ""},
- {`{"last_name":"Bar"}`, "key 'first_name' is required"},
- {"{}", "key 'first_name' is required"},
- }
-
- for _, tc := range cases {
- var v RequiredOptionalStruct
- err := v.UnmarshalJSON([]byte(tc.json))
- if tc.errorMessage == "" {
- if err != nil {
- t.Errorf("%s. UnmarshalJSON didn`t expect error: %v", tc.json, err)
- }
- } else {
- if fmt.Sprintf("%v", err) != tc.errorMessage {
- t.Errorf("%s. UnmarshalJSON expected error: %v. got: %v", tc.json, tc.errorMessage, err)
- }
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/tests/snake.go b/vendor/github.com/mailru/easyjson/tests/snake.go
deleted file mode 100644
index 9b64f8612..000000000
--- a/vendor/github.com/mailru/easyjson/tests/snake.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package tests
-
-//easyjson:json
-type SnakeStruct struct {
- WeirdHTTPStuff bool
- CustomNamedField string `json:"cUsToM"`
-}
-
-var snakeStructValue SnakeStruct
-var snakeStructString = `{"weird_http_stuff":false,"cUsToM":""}`
diff --git a/vendor/github.com/mattermost/gorp/dialect_mysql_test.go b/vendor/github.com/mattermost/gorp/dialect_mysql_test.go
deleted file mode 100644
index d1018cf69..000000000
--- a/vendor/github.com/mattermost/gorp/dialect_mysql_test.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2012 James Cooper. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
-
-// Package gorp provides a simple way to marshal Go structs to and from
-// SQL databases. It uses the database/sql package, and should work with any
-// compliant database/sql driver.
-//
-// Source code and project home:
-// https://github.com/go-gorp/gorp
-
-package gorp_test
-
-import (
- "database/sql"
- "reflect"
- "time"
-
- // ginkgo/gomega functions read better as dot-imports.
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/ginkgo/extensions/table"
- . "github.com/onsi/gomega"
-
- "github.com/go-gorp/gorp"
-)
-
-var _ = Describe("MySQLDialect", func() {
- var (
- engine, encoding string
- dialect gorp.MySQLDialect
- )
-
- JustBeforeEach(func() {
- dialect = gorp.MySQLDialect{
- Engine: engine,
- Encoding: encoding,
- }
- })
-
- DescribeTable("ToSqlType",
- func(value interface{}, maxsize int, autoIncr bool, expected string) {
- typ := reflect.TypeOf(value)
- sqlType := dialect.ToSqlType(typ, maxsize, autoIncr)
- Expect(sqlType).To(Equal(expected))
- },
- Entry("bool", true, 0, false, "boolean"),
- Entry("int8", int8(1), 0, false, "tinyint"),
- Entry("uint8", uint8(1), 0, false, "tinyint unsigned"),
- Entry("int16", int16(1), 0, false, "smallint"),
- Entry("uint16", uint16(1), 0, false, "smallint unsigned"),
- Entry("int32", int32(1), 0, false, "int"),
- Entry("int (treated as int32)", int(1), 0, false, "int"),
- Entry("uint32", uint32(1), 0, false, "int unsigned"),
- Entry("uint (treated as uint32)", uint(1), 0, false, "int unsigned"),
- Entry("int64", int64(1), 0, false, "bigint"),
- Entry("uint64", uint64(1), 0, false, "bigint unsigned"),
- Entry("float32", float32(1), 0, false, "double"),
- Entry("float64", float64(1), 0, false, "double"),
- Entry("[]uint8", []uint8{1}, 0, false, "mediumblob"),
- Entry("NullInt64", sql.NullInt64{}, 0, false, "bigint"),
- Entry("NullFloat64", sql.NullFloat64{}, 0, false, "double"),
- Entry("NullBool", sql.NullBool{}, 0, false, "tinyint"),
- Entry("Time", time.Time{}, 0, false, "datetime"),
- Entry("default-size string", "", 0, false, "varchar(255)"),
- Entry("sized string", "", 50, false, "varchar(50)"),
- Entry("large string", "", 1024, false, "text"),
- )
-
- Describe("AutoIncrStr", func() {
- It("returns the auto increment string", func() {
- Expect(dialect.AutoIncrStr()).To(Equal("auto_increment"))
- })
- })
-
- Describe("AutoIncrBindValue", func() {
- It("returns the value used to bind the auto-increment value", func() {
- Expect(dialect.AutoIncrBindValue()).To(Equal("null"))
- })
- })
-
- Describe("AutoIncrInsertSuffix", func() {
- It("returns the suffix needed for auto-incrementing", func() {
- Expect(dialect.AutoIncrInsertSuffix(nil)).To(BeEmpty())
- })
- })
-
- Describe("CreateTableSuffix", func() {
- Context("with an empty engine", func() {
- BeforeEach(func() {
- engine = ""
- encoding = "foo"
- })
- It("panics", func() {
- Expect(func() {
- dialect.CreateTableSuffix()
- }).To(Panic())
- })
- })
-
- Context("with an empty encoding", func() {
- BeforeEach(func() {
- engine = "foo"
- encoding = ""
- })
- It("panics", func() {
- Expect(func() {
- dialect.CreateTableSuffix()
- }).To(Panic())
- })
- })
-
- Context("with an engine and an encoding", func() {
- BeforeEach(func() {
- engine = "foo"
- encoding = "bar"
- })
- It("returns a valid suffix", func() {
- Expect(dialect.CreateTableSuffix()).To(Equal(" engine=foo charset=bar"))
- })
- })
- })
-
- Describe("CreateIndexSuffix", func() {
- It("returns the suffix for creating indexes", func() {
- Expect(dialect.CreateIndexSuffix()).To(Equal("using"))
- })
- })
-
- Describe("DropIndexSuffix", func() {
- It("returns the suffix for deleting indexes", func() {
- Expect(dialect.DropIndexSuffix()).To(Equal("on"))
- })
- })
-
- Describe("TruncateClause", func() {
- It("returns the clause for truncating a table", func() {
- Expect(dialect.TruncateClause()).To(Equal("truncate"))
- })
- })
-
- Describe("BindVar", func() {
- It("returns the variable binding sequence", func() {
- Expect(dialect.BindVar(0)).To(Equal("?"))
- })
- })
-
- PDescribe("InsertAutoIncr", func() {})
-
- Describe("QuoteField", func() {
- It("returns the argument quoted as a field", func() {
- Expect(dialect.QuoteField("foo")).To(Equal("`foo`"))
- })
- })
-
- Describe("QuotedTableForQuery", func() {
- var (
- schema, table string
-
- quotedTable string
- )
-
- JustBeforeEach(func() {
- quotedTable = dialect.QuotedTableForQuery(schema, table)
- })
-
- Context("using the default schema", func() {
- BeforeEach(func() {
- schema = ""
- table = "foo"
- })
- It("returns just the table", func() {
- Expect(quotedTable).To(Equal("`foo`"))
- })
- })
-
- Context("with a supplied schema", func() {
- BeforeEach(func() {
- schema = "foo"
- table = "bar"
- })
- It("returns the schema and table", func() {
- Expect(quotedTable).To(Equal("foo.`bar`"))
- })
- })
- })
-
- Describe("IfSchemaNotExists", func() {
- It("appends 'if not exists' to the command", func() {
- Expect(dialect.IfSchemaNotExists("foo", "bar")).To(Equal("foo if not exists"))
- })
- })
-
- Describe("IfTableExists", func() {
- It("appends 'if exists' to the command", func() {
- Expect(dialect.IfTableExists("foo", "bar", "baz")).To(Equal("foo if exists"))
- })
- })
-
- Describe("IfTableNotExists", func() {
- It("appends 'if not exists' to the command", func() {
- Expect(dialect.IfTableNotExists("foo", "bar", "baz")).To(Equal("foo if not exists"))
- })
- })
-})
diff --git a/vendor/github.com/mattermost/gorp/gorp_suite_test.go b/vendor/github.com/mattermost/gorp/gorp_suite_test.go
deleted file mode 100644
index 2abcaaf71..000000000
--- a/vendor/github.com/mattermost/gorp/gorp_suite_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package gorp_test
-
-import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-
- "testing"
-)
-
-func TestGorp(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "Gorp Suite")
-}
diff --git a/vendor/github.com/mattermost/gorp/gorp_test.go b/vendor/github.com/mattermost/gorp/gorp_test.go
deleted file mode 100644
index 98ea4d3e4..000000000
--- a/vendor/github.com/mattermost/gorp/gorp_test.go
+++ /dev/null
@@ -1,2696 +0,0 @@
-// Copyright 2012 James Cooper. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
-
-// Package gorp provides a simple way to marshal Go structs to and from
-// SQL databases. It uses the database/sql package, and should work with any
-// compliant database/sql driver.
-//
-// Source code and project home:
-// https://github.com/go-gorp/gorp
-
-package gorp_test
-
-import (
- "bytes"
- "database/sql"
- "database/sql/driver"
- "encoding/json"
- "errors"
- "flag"
- "fmt"
- "log"
- "math/rand"
- "os"
- "reflect"
- "strconv"
- "strings"
- "testing"
- "time"
-
- "github.com/go-gorp/gorp"
-
- _ "github.com/go-sql-driver/mysql"
- _ "github.com/lib/pq"
- _ "github.com/mattn/go-sqlite3"
- _ "github.com/ziutek/mymysql/godrv"
-)
-
-var (
- // verify interface compliance
- _ = []gorp.Dialect{
- gorp.SqliteDialect{},
- gorp.PostgresDialect{},
- gorp.MySQLDialect{},
- gorp.SqlServerDialect{},
- gorp.OracleDialect{},
- }
-
- debug bool
-)
-
-func init() {
- flag.BoolVar(&debug, "trace", true, "Turn on or off database tracing (DbMap.TraceOn)")
- flag.Parse()
-}
-
-type testable interface {
- GetId() int64
- Rand()
-}
-
-type Invoice struct {
- Id int64
- Created int64
- Updated int64
- Memo string
- PersonId int64
- IsPaid bool
-}
-
-type InvoiceWithValuer struct {
- Id int64
- Created int64
- Updated int64
- Memo string
- Person PersonValuerScanner `db:"personid"`
- IsPaid bool
-}
-
-func (me *Invoice) GetId() int64 { return me.Id }
-func (me *Invoice) Rand() {
- me.Memo = fmt.Sprintf("random %d", rand.Int63())
- me.Created = rand.Int63()
- me.Updated = rand.Int63()
-}
-
-type InvoiceTag struct {
- Id int64 `db:"myid, primarykey, autoincrement"`
- Created int64 `db:"myCreated"`
- Updated int64 `db:"date_updated"`
- Memo string
- PersonId int64 `db:"person_id"`
- IsPaid bool `db:"is_Paid"`
-}
-
-func (me *InvoiceTag) GetId() int64 { return me.Id }
-func (me *InvoiceTag) Rand() {
- me.Memo = fmt.Sprintf("random %d", rand.Int63())
- me.Created = rand.Int63()
- me.Updated = rand.Int63()
-}
-
-// See: https://github.com/go-gorp/gorp/issues/175
-type AliasTransientField struct {
- Id int64 `db:"id"`
- Bar int64 `db:"-"`
- BarStr string `db:"bar"`
-}
-
-func (me *AliasTransientField) GetId() int64 { return me.Id }
-func (me *AliasTransientField) Rand() {
- me.BarStr = fmt.Sprintf("random %d", rand.Int63())
-}
-
-type OverriddenInvoice struct {
- Invoice
- Id string
-}
-
-type Person struct {
- Id int64
- Created int64
- Updated int64
- FName string
- LName string
- Version int64
-}
-
-// PersonValuerScanner is used as a field in test types to ensure that we
-// make use of "database/sql/driver".Valuer for choosing column types when
-// creating tables and that we don't get in the way of the underlying
-// database libraries when they make use of either Valuer or
-// "database/sql".Scanner.
-type PersonValuerScanner struct {
- Person
-}
-
-// Value implements "database/sql/driver".Valuer. It will be automatically
-// run by the "database/sql" package when inserting/updating data.
-func (p PersonValuerScanner) Value() (driver.Value, error) {
- return p.Id, nil
-}
-
-// Scan implements "database/sql".Scanner. It will be automatically run
-// by the "database/sql" package when reading column data into a field
-// of type PersonValuerScanner.
-func (p *PersonValuerScanner) Scan(value interface{}) (err error) {
- switch src := value.(type) {
- case []byte:
- // TODO: this case is here for mysql only. For some reason,
- // one (both?) of the mysql libraries opt to pass us a []byte
- // instead of an int64 for the bigint column. We should add
- // table tests around valuers/scanners and try to solve these
- // types of odd discrepencies to make it easier for users of
- // gorp to migrate to other database engines.
- p.Id, err = strconv.ParseInt(string(src), 10, 64)
- case int64:
- // Most libraries pass in the type we'd expect.
- p.Id = src
- default:
- typ := reflect.TypeOf(value)
- return fmt.Errorf("Expected person value to be convertible to int64, got %v (type %s)", value, typ)
- }
- return
-}
-
-type FNameOnly struct {
- FName string
-}
-
-type InvoicePersonView struct {
- InvoiceId int64
- PersonId int64
- Memo string
- FName string
- LegacyVersion int64
-}
-
-type TableWithNull struct {
- Id int64
- Str sql.NullString
- Int64 sql.NullInt64
- Float64 sql.NullFloat64
- Bool sql.NullBool
- Bytes []byte
-}
-
-type WithIgnoredColumn struct {
- internal int64 `db:"-"`
- Id int64
- Created int64
-}
-
-type IdCreated struct {
- Id int64
- Created int64
-}
-
-type IdCreatedExternal struct {
- IdCreated
- External int64
-}
-
-type WithStringPk struct {
- Id string
- Name string
-}
-
-type CustomStringType string
-
-type TypeConversionExample struct {
- Id int64
- PersonJSON Person
- Name CustomStringType
-}
-
-type PersonUInt32 struct {
- Id uint32
- Name string
-}
-
-type PersonUInt64 struct {
- Id uint64
- Name string
-}
-
-type PersonUInt16 struct {
- Id uint16
- Name string
-}
-
-type WithEmbeddedStruct struct {
- Id int64
- Names
-}
-
-type WithEmbeddedStructConflictingEmbeddedMemberNames struct {
- Id int64
- Names
- NamesConflict
-}
-
-type WithEmbeddedStructSameMemberName struct {
- Id int64
- SameName
-}
-
-type WithEmbeddedStructBeforeAutoincrField struct {
- Names
- Id int64
-}
-
-type WithEmbeddedAutoincr struct {
- WithEmbeddedStruct
- MiddleName string
-}
-
-type Names struct {
- FirstName string
- LastName string
-}
-
-type NamesConflict struct {
- FirstName string
- Surname string
-}
-
-type SameName struct {
- SameName string
-}
-
-type UniqueColumns struct {
- FirstName string
- LastName string
- City string
- ZipCode int64
-}
-
-type SingleColumnTable struct {
- SomeId string
-}
-
-type CustomDate struct {
- time.Time
-}
-
-type WithCustomDate struct {
- Id int64
- Added CustomDate
-}
-
-type WithNullTime struct {
- Id int64
- Time gorp.NullTime
-}
-
-type testTypeConverter struct{}
-
-func (me testTypeConverter) ToDb(val interface{}) (interface{}, error) {
-
- switch t := val.(type) {
- case Person:
- b, err := json.Marshal(t)
- if err != nil {
- return "", err
- }
- return string(b), nil
- case CustomStringType:
- return string(t), nil
- case CustomDate:
- return t.Time, nil
- }
-
- return val, nil
-}
-
-func (me testTypeConverter) FromDb(target interface{}) (gorp.CustomScanner, bool) {
- switch target.(type) {
- case *Person:
- binder := func(holder, target interface{}) error {
- s, ok := holder.(*string)
- if !ok {
- return errors.New("FromDb: Unable to convert Person to *string")
- }
- b := []byte(*s)
- return json.Unmarshal(b, target)
- }
- return gorp.CustomScanner{new(string), target, binder}, true
- case *CustomStringType:
- binder := func(holder, target interface{}) error {
- s, ok := holder.(*string)
- if !ok {
- return errors.New("FromDb: Unable to convert CustomStringType to *string")
- }
- st, ok := target.(*CustomStringType)
- if !ok {
- return errors.New(fmt.Sprint("FromDb: Unable to convert target to *CustomStringType: ", reflect.TypeOf(target)))
- }
- *st = CustomStringType(*s)
- return nil
- }
- return gorp.CustomScanner{new(string), target, binder}, true
- case *CustomDate:
- binder := func(holder, target interface{}) error {
- t, ok := holder.(*time.Time)
- if !ok {
- return errors.New("FromDb: Unable to convert CustomDate to *time.Time")
- }
- dateTarget, ok := target.(*CustomDate)
- if !ok {
- return errors.New(fmt.Sprint("FromDb: Unable to convert target to *CustomDate: ", reflect.TypeOf(target)))
- }
- dateTarget.Time = *t
- return nil
- }
- return gorp.CustomScanner{new(time.Time), target, binder}, true
- }
-
- return gorp.CustomScanner{}, false
-}
-
-func (p *Person) PreInsert(s gorp.SqlExecutor) error {
- p.Created = time.Now().UnixNano()
- p.Updated = p.Created
- if p.FName == "badname" {
- return fmt.Errorf("Invalid name: %s", p.FName)
- }
- return nil
-}
-
-func (p *Person) PostInsert(s gorp.SqlExecutor) error {
- p.LName = "postinsert"
- return nil
-}
-
-func (p *Person) PreUpdate(s gorp.SqlExecutor) error {
- p.FName = "preupdate"
- return nil
-}
-
-func (p *Person) PostUpdate(s gorp.SqlExecutor) error {
- p.LName = "postupdate"
- return nil
-}
-
-func (p *Person) PreDelete(s gorp.SqlExecutor) error {
- p.FName = "predelete"
- return nil
-}
-
-func (p *Person) PostDelete(s gorp.SqlExecutor) error {
- p.LName = "postdelete"
- return nil
-}
-
-func (p *Person) PostGet(s gorp.SqlExecutor) error {
- p.LName = "postget"
- return nil
-}
-
-type PersistentUser struct {
- Key int32
- Id string
- PassedTraining bool
-}
-
-type TenantDynamic struct {
- Id int64 `db:"id"`
- Name string
- Address string
- curTable string `db:"-"`
-}
-
-func (curObj *TenantDynamic) TableName() string {
- return curObj.curTable
-}
-func (curObj *TenantDynamic) SetTableName(tblName string) {
- curObj.curTable = tblName
-}
-
-var dynTableInst1 = TenantDynamic{curTable: "t_1_tenant_dynamic"}
-var dynTableInst2 = TenantDynamic{curTable: "t_2_tenant_dynamic"}
-
-func dynamicTablesTest(t *testing.T, dbmap *gorp.DbMap) {
-
- dynamicTablesTestTableMap(t, dbmap, &dynTableInst1)
- dynamicTablesTestTableMap(t, dbmap, &dynTableInst2)
-
- // TEST - dbmap.Insert using dynTableInst1
- dynTableInst1.Name = "Test Name 1"
- dynTableInst1.Address = "Test Address 1"
- err := dbmap.Insert(&dynTableInst1)
- if err != nil {
- t.Errorf("Errow while saving dynTableInst1. Details: %v", err)
- }
-
- // TEST - dbmap.Insert using dynTableInst2
- dynTableInst2.Name = "Test Name 2"
- dynTableInst2.Address = "Test Address 2"
- err = dbmap.Insert(&dynTableInst2)
- if err != nil {
- t.Errorf("Errow while saving dynTableInst2. Details: %v", err)
- }
-
- dynamicTablesTestSelect(t, dbmap, &dynTableInst1)
- dynamicTablesTestSelect(t, dbmap, &dynTableInst2)
- dynamicTablesTestSelectOne(t, dbmap, &dynTableInst1)
- dynamicTablesTestSelectOne(t, dbmap, &dynTableInst2)
- dynamicTablesTestGetUpdateGet(t, dbmap, &dynTableInst1)
- dynamicTablesTestGetUpdateGet(t, dbmap, &dynTableInst2)
- dynamicTablesTestDelete(t, dbmap, &dynTableInst1)
- dynamicTablesTestDelete(t, dbmap, &dynTableInst2)
-
-}
-
-func dynamicTablesTestTableMap(t *testing.T,
- dbmap *gorp.DbMap,
- inpInst *TenantDynamic) {
-
- tableName := inpInst.TableName()
-
- tblMap, err := dbmap.DynamicTableFor(tableName, true)
- if err != nil {
- t.Errorf("Error while searching for tablemap for tableName: %v, Error:%v", tableName, err)
- }
- if tblMap == nil {
- t.Errorf("Unable to find tablemap for tableName:%v", tableName)
- }
-}
-
-func dynamicTablesTestSelect(t *testing.T,
- dbmap *gorp.DbMap,
- inpInst *TenantDynamic) {
-
- // TEST - dbmap.Select using inpInst
-
- // read the data back from dynInst to see if the
- // table mapping is correct
- var dbTenantInst1 = TenantDynamic{curTable: inpInst.curTable}
- selectSQL1 := "select * from " + inpInst.curTable
- dbObjs, err := dbmap.Select(&dbTenantInst1, selectSQL1)
- if err != nil {
- t.Errorf("Errow in dbmap.Select. SQL: %v, Details: %v", selectSQL1, err)
- }
- if dbObjs == nil {
- t.Fatalf("Nil return from dbmap.Select")
- }
- rwCnt := len(dbObjs)
- if rwCnt != 1 {
- t.Errorf("Unexpected row count for tenantInst:%v", rwCnt)
- }
-
- dbInst := dbObjs[0].(*TenantDynamic)
-
- inpTableName := inpInst.TableName()
- resTableName := dbInst.TableName()
- if inpTableName != resTableName {
- t.Errorf("Mismatched table names %v != %v ",
- inpTableName, resTableName)
- }
-
- if inpInst.Id != dbInst.Id {
- t.Errorf("Mismatched Id values %v != %v ",
- inpInst.Id, dbInst.Id)
- }
-
- if inpInst.Name != dbInst.Name {
- t.Errorf("Mismatched Name values %v != %v ",
- inpInst.Name, dbInst.Name)
- }
-
- if inpInst.Address != dbInst.Address {
- t.Errorf("Mismatched Address values %v != %v ",
- inpInst.Address, dbInst.Address)
- }
-}
-
-func dynamicTablesTestGetUpdateGet(t *testing.T,
- dbmap *gorp.DbMap,
- inpInst *TenantDynamic) {
-
- // TEST - dbmap.Get, dbmap.Update, dbmap.Get sequence
-
- // read and update one of the instances to make sure
- // that the common gorp APIs are working well with dynamic table
- var inpIface2 = TenantDynamic{curTable: inpInst.curTable}
- dbObj, err := dbmap.Get(&inpIface2, inpInst.Id)
- if err != nil {
- t.Errorf("Errow in dbmap.Get. id: %v, Details: %v", inpInst.Id, err)
- }
- if dbObj == nil {
- t.Errorf("Nil return from dbmap.Get")
- }
-
- dbInst := dbObj.(*TenantDynamic)
-
- {
- inpTableName := inpInst.TableName()
- resTableName := dbInst.TableName()
- if inpTableName != resTableName {
- t.Errorf("Mismatched table names %v != %v ",
- inpTableName, resTableName)
- }
-
- if inpInst.Id != dbInst.Id {
- t.Errorf("Mismatched Id values %v != %v ",
- inpInst.Id, dbInst.Id)
- }
-
- if inpInst.Name != dbInst.Name {
- t.Errorf("Mismatched Name values %v != %v ",
- inpInst.Name, dbInst.Name)
- }
-
- if inpInst.Address != dbInst.Address {
- t.Errorf("Mismatched Address values %v != %v ",
- inpInst.Address, dbInst.Address)
- }
- }
-
- {
- updatedName := "Testing Updated Name2"
- dbInst.Name = updatedName
- cnt, err := dbmap.Update(dbInst)
- if err != nil {
- t.Errorf("Error from dbmap.Update: %v", err.Error())
- }
- if cnt != 1 {
- t.Errorf("Update count must be 1, got %v", cnt)
- }
-
- // Read the object again to make sure that the
- // data was updated in db
- dbObj2, err := dbmap.Get(&inpIface2, inpInst.Id)
- if err != nil {
- t.Errorf("Errow in dbmap.Get. id: %v, Details: %v", inpInst.Id, err)
- }
- if dbObj2 == nil {
- t.Errorf("Nil return from dbmap.Get")
- }
-
- dbInst2 := dbObj2.(*TenantDynamic)
-
- inpTableName := inpInst.TableName()
- resTableName := dbInst2.TableName()
- if inpTableName != resTableName {
- t.Errorf("Mismatched table names %v != %v ",
- inpTableName, resTableName)
- }
-
- if inpInst.Id != dbInst2.Id {
- t.Errorf("Mismatched Id values %v != %v ",
- inpInst.Id, dbInst2.Id)
- }
-
- if updatedName != dbInst2.Name {
- t.Errorf("Mismatched Name values %v != %v ",
- updatedName, dbInst2.Name)
- }
-
- if inpInst.Address != dbInst.Address {
- t.Errorf("Mismatched Address values %v != %v ",
- inpInst.Address, dbInst.Address)
- }
-
- }
-}
-
-func dynamicTablesTestSelectOne(t *testing.T,
- dbmap *gorp.DbMap,
- inpInst *TenantDynamic) {
-
- // TEST - dbmap.SelectOne
-
- // read the data back from inpInst to see if the
- // table mapping is correct
- var dbTenantInst1 = TenantDynamic{curTable: inpInst.curTable}
- selectSQL1 := "select * from " + dbTenantInst1.curTable + " where id = :idKey"
- params := map[string]interface{}{"idKey": inpInst.Id}
- err := dbmap.SelectOne(&dbTenantInst1, selectSQL1, params)
- if err != nil {
- t.Errorf("Errow in dbmap.SelectOne. SQL: %v, Details: %v", selectSQL1, err)
- }
-
- inpTableName := inpInst.curTable
- resTableName := dbTenantInst1.TableName()
- if inpTableName != resTableName {
- t.Errorf("Mismatched table names %v != %v ",
- inpTableName, resTableName)
- }
-
- if inpInst.Id != dbTenantInst1.Id {
- t.Errorf("Mismatched Id values %v != %v ",
- inpInst.Id, dbTenantInst1.Id)
- }
-
- if inpInst.Name != dbTenantInst1.Name {
- t.Errorf("Mismatched Name values %v != %v ",
- inpInst.Name, dbTenantInst1.Name)
- }
-
- if inpInst.Address != dbTenantInst1.Address {
- t.Errorf("Mismatched Address values %v != %v ",
- inpInst.Address, dbTenantInst1.Address)
- }
-}
-
-func dynamicTablesTestDelete(t *testing.T,
- dbmap *gorp.DbMap,
- inpInst *TenantDynamic) {
-
- // TEST - dbmap.Delete
- cnt, err := dbmap.Delete(inpInst)
- if err != nil {
- t.Errorf("Errow in dbmap.Delete. Details: %v", err)
- }
- if cnt != 1 {
- t.Errorf("Expected delete count for %v : 1, found count:%v",
- inpInst.TableName(), cnt)
- }
-
- // Try reading again to make sure instance is gone from db
- getInst := TenantDynamic{curTable: inpInst.TableName()}
- dbInst, err := dbmap.Get(&getInst, inpInst.Id)
- if err != nil {
- t.Errorf("Error while trying to read deleted %v object using id: %v",
- inpInst.TableName(), inpInst.Id)
- }
-
- if dbInst != nil {
- t.Errorf("Found deleted %v instance using id: %v",
- inpInst.TableName(), inpInst.Id)
- }
-
- if getInst.Name != "" {
- t.Errorf("Found data from deleted %v instance using id: %v",
- inpInst.TableName(), inpInst.Id)
- }
-
-}
-
-func TestCreateTablesIfNotExists(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestTruncateTables(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- t.Error(err)
- }
-
- // Insert some data
- p1 := &Person{0, 0, 0, "Bob", "Smith", 0}
- dbmap.Insert(p1)
- inv := &Invoice{0, 0, 1, "my invoice", 0, true}
- dbmap.Insert(inv)
-
- err = dbmap.TruncateTables()
- if err != nil {
- t.Error(err)
- }
-
- // Make sure all rows are deleted
- rows, _ := dbmap.Select(Person{}, "SELECT * FROM person_test")
- if len(rows) != 0 {
- t.Errorf("Expected 0 person rows, got %d", len(rows))
- }
- rows, _ = dbmap.Select(Invoice{}, "SELECT * FROM invoice_test")
- if len(rows) != 0 {
- t.Errorf("Expected 0 invoice rows, got %d", len(rows))
- }
-}
-
-func TestCustomDateType(t *testing.T) {
- dbmap := newDbMap()
- dbmap.TypeConverter = testTypeConverter{}
- dbmap.AddTable(WithCustomDate{}).SetKeys(true, "Id")
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
-
- test1 := &WithCustomDate{Added: CustomDate{Time: time.Now().Truncate(time.Second)}}
- err = dbmap.Insert(test1)
- if err != nil {
- t.Errorf("Could not insert struct with custom date field: %s", err)
- t.FailNow()
- }
- // Unfortunately, the mysql driver doesn't handle time.Time
- // values properly during Get(). I can't find a way to work
- // around that problem - every other type that I've tried is just
- // silently converted. time.Time is the only type that causes
- // the issue that this test checks for. As such, if the driver is
- // mysql, we'll just skip the rest of this test.
- if _, driver := dialectAndDriver(); driver == "mysql" {
- t.Skip("TestCustomDateType can't run Get() with the mysql driver; skipping the rest of this test...")
- }
- result, err := dbmap.Get(new(WithCustomDate), test1.Id)
- if err != nil {
- t.Errorf("Could not get struct with custom date field: %s", err)
- t.FailNow()
- }
- test2 := result.(*WithCustomDate)
- if test2.Added.UTC() != test1.Added.UTC() {
- t.Errorf("Custom dates do not match: %v != %v", test2.Added.UTC(), test1.Added.UTC())
- }
-}
-
-func TestUIntPrimaryKey(t *testing.T) {
- dbmap := newDbMap()
- dbmap.AddTable(PersonUInt64{}).SetKeys(true, "Id")
- dbmap.AddTable(PersonUInt32{}).SetKeys(true, "Id")
- dbmap.AddTable(PersonUInt16{}).SetKeys(true, "Id")
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
-
- p1 := &PersonUInt64{0, "name1"}
- p2 := &PersonUInt32{0, "name2"}
- p3 := &PersonUInt16{0, "name3"}
- err = dbmap.Insert(p1, p2, p3)
- if err != nil {
- t.Error(err)
- }
- if p1.Id != 1 {
- t.Errorf("%d != 1", p1.Id)
- }
- if p2.Id != 1 {
- t.Errorf("%d != 1", p2.Id)
- }
- if p3.Id != 1 {
- t.Errorf("%d != 1", p3.Id)
- }
-}
-
-func TestSetUniqueTogether(t *testing.T) {
- dbmap := newDbMap()
- dbmap.AddTable(UniqueColumns{}).SetUniqueTogether("FirstName", "LastName").SetUniqueTogether("City", "ZipCode")
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
-
- n1 := &UniqueColumns{"Steve", "Jobs", "Cupertino", 95014}
- err = dbmap.Insert(n1)
- if err != nil {
- t.Error(err)
- }
-
- // Should fail because of the first constraint
- n2 := &UniqueColumns{"Steve", "Jobs", "Sunnyvale", 94085}
- err = dbmap.Insert(n2)
- if err == nil {
- t.Error(err)
- }
- // "unique" for Postgres/SQLite, "Duplicate entry" for MySQL
- errLower := strings.ToLower(err.Error())
- if !strings.Contains(errLower, "unique") && !strings.Contains(errLower, "duplicate entry") {
- t.Error(err)
- }
-
- // Should also fail because of the second unique-together
- n3 := &UniqueColumns{"Steve", "Wozniak", "Cupertino", 95014}
- err = dbmap.Insert(n3)
- if err == nil {
- t.Error(err)
- }
- // "unique" for Postgres/SQLite, "Duplicate entry" for MySQL
- errLower = strings.ToLower(err.Error())
- if !strings.Contains(errLower, "unique") && !strings.Contains(errLower, "duplicate entry") {
- t.Error(err)
- }
-
- // This one should finally succeed
- n4 := &UniqueColumns{"Steve", "Wozniak", "Sunnyvale", 94085}
- err = dbmap.Insert(n4)
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestPersistentUser(t *testing.T) {
- dbmap := newDbMap()
- dbmap.Exec("drop table if exists PersistentUser")
- table := dbmap.AddTable(PersistentUser{}).SetKeys(false, "Key")
- table.ColMap("Key").Rename("mykey")
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
- pu := &PersistentUser{43, "33r", false}
- err = dbmap.Insert(pu)
- if err != nil {
- panic(err)
- }
-
- // prove we can pass a pointer into Get
- pu2, err := dbmap.Get(pu, pu.Key)
- if err != nil {
- panic(err)
- }
- if !reflect.DeepEqual(pu, pu2) {
- t.Errorf("%v!=%v", pu, pu2)
- }
-
- arr, err := dbmap.Select(pu, "select * from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if !reflect.DeepEqual(pu, arr[0]) {
- t.Errorf("%v!=%v", pu, arr[0])
- }
-
- // prove we can get the results back in a slice
- var puArr []*PersistentUser
- _, err = dbmap.Select(&puArr, "select * from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu, puArr[0]) {
- t.Errorf("%v!=%v", pu, puArr[0])
- }
-
- // prove we can get the results back in a non-pointer slice
- var puValues []PersistentUser
- _, err = dbmap.Select(&puValues, "select * from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(puValues) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(*pu, puValues[0]) {
- t.Errorf("%v!=%v", *pu, puValues[0])
- }
-
- // prove we can get the results back in a string slice
- var idArr []*string
- _, err = dbmap.Select(&idArr, "select "+columnName(dbmap, PersistentUser{}, "Id")+" from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(idArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu.Id, *idArr[0]) {
- t.Errorf("%v!=%v", pu.Id, *idArr[0])
- }
-
- // prove we can get the results back in an int slice
- var keyArr []*int32
- _, err = dbmap.Select(&keyArr, "select mykey from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(keyArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu.Key, *keyArr[0]) {
- t.Errorf("%v!=%v", pu.Key, *keyArr[0])
- }
-
- // prove we can get the results back in a bool slice
- var passedArr []*bool
- _, err = dbmap.Select(&passedArr, "select "+columnName(dbmap, PersistentUser{}, "PassedTraining")+" from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(passedArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu.PassedTraining, *passedArr[0]) {
- t.Errorf("%v!=%v", pu.PassedTraining, *passedArr[0])
- }
-
- // prove we can get the results back in a non-pointer slice
- var stringArr []string
- _, err = dbmap.Select(&stringArr, "select "+columnName(dbmap, PersistentUser{}, "Id")+" from "+tableName(dbmap, PersistentUser{}))
- if err != nil {
- panic(err)
- }
- if len(stringArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu.Id, stringArr[0]) {
- t.Errorf("%v!=%v", pu.Id, stringArr[0])
- }
-}
-
-func TestNamedQueryMap(t *testing.T) {
- dbmap := newDbMap()
- dbmap.Exec("drop table if exists PersistentUser")
- table := dbmap.AddTable(PersistentUser{}).SetKeys(false, "Key")
- table.ColMap("Key").Rename("mykey")
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
- pu := &PersistentUser{43, "33r", false}
- pu2 := &PersistentUser{500, "abc", false}
- err = dbmap.Insert(pu, pu2)
- if err != nil {
- panic(err)
- }
-
- // Test simple case
- var puArr []*PersistentUser
- _, err = dbmap.Select(&puArr, "select * from "+tableName(dbmap, PersistentUser{})+" where mykey = :Key", map[string]interface{}{
- "Key": 43,
- })
- if err != nil {
- t.Errorf("Failed to select: %s", err)
- t.FailNow()
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu, puArr[0]) {
- t.Errorf("%v!=%v", pu, puArr[0])
- }
-
- // Test more specific map value type is ok
- puArr = nil
- _, err = dbmap.Select(&puArr, "select * from "+tableName(dbmap, PersistentUser{})+" where mykey = :Key", map[string]int{
- "Key": 43,
- })
- if err != nil {
- t.Errorf("Failed to select: %s", err)
- t.FailNow()
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
-
- // Test multiple parameters set.
- puArr = nil
- _, err = dbmap.Select(&puArr, `
-select * from `+tableName(dbmap, PersistentUser{})+`
- where mykey = :Key
- and `+columnName(dbmap, PersistentUser{}, "PassedTraining")+` = :PassedTraining
- and `+columnName(dbmap, PersistentUser{}, "Id")+` = :Id`, map[string]interface{}{
- "Key": 43,
- "PassedTraining": false,
- "Id": "33r",
- })
- if err != nil {
- t.Errorf("Failed to select: %s", err)
- t.FailNow()
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
-
- // Test colon within a non-key string
- // Test having extra, unused properties in the map.
- puArr = nil
- _, err = dbmap.Select(&puArr, `
-select * from `+tableName(dbmap, PersistentUser{})+`
- where mykey = :Key
- and `+columnName(dbmap, PersistentUser{}, "Id")+` != 'abc:def'`, map[string]interface{}{
- "Key": 43,
- "PassedTraining": false,
- })
- if err != nil {
- t.Errorf("Failed to select: %s", err)
- t.FailNow()
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
-
- // Test to delete with Exec and named params.
- result, err := dbmap.Exec("delete from "+tableName(dbmap, PersistentUser{})+" where mykey = :Key", map[string]interface{}{
- "Key": 43,
- })
- count, err := result.RowsAffected()
- if err != nil {
- t.Errorf("Failed to exec: %s", err)
- t.FailNow()
- }
- if count != 1 {
- t.Errorf("Expected 1 persistentuser to be deleted, but %d deleted", count)
- }
-}
-
-func TestNamedQueryStruct(t *testing.T) {
- dbmap := newDbMap()
- dbmap.Exec("drop table if exists PersistentUser")
- table := dbmap.AddTable(PersistentUser{}).SetKeys(false, "Key")
- table.ColMap("Key").Rename("mykey")
- err := dbmap.CreateTablesIfNotExists()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
- pu := &PersistentUser{43, "33r", false}
- pu2 := &PersistentUser{500, "abc", false}
- err = dbmap.Insert(pu, pu2)
- if err != nil {
- panic(err)
- }
-
- // Test select self
- var puArr []*PersistentUser
- _, err = dbmap.Select(&puArr, `
-select * from `+tableName(dbmap, PersistentUser{})+`
- where mykey = :Key
- and `+columnName(dbmap, PersistentUser{}, "PassedTraining")+` = :PassedTraining
- and `+columnName(dbmap, PersistentUser{}, "Id")+` = :Id`, pu)
- if err != nil {
- t.Errorf("Failed to select: %s", err)
- t.FailNow()
- }
- if len(puArr) != 1 {
- t.Errorf("Expected one persistentuser, found none")
- }
- if !reflect.DeepEqual(pu, puArr[0]) {
- t.Errorf("%v!=%v", pu, puArr[0])
- }
-
- // Test delete self.
- result, err := dbmap.Exec(`
-delete from `+tableName(dbmap, PersistentUser{})+`
- where mykey = :Key
- and `+columnName(dbmap, PersistentUser{}, "PassedTraining")+` = :PassedTraining
- and `+columnName(dbmap, PersistentUser{}, "Id")+` = :Id`, pu)
- count, err := result.RowsAffected()
- if err != nil {
- t.Errorf("Failed to exec: %s", err)
- t.FailNow()
- }
- if count != 1 {
- t.Errorf("Expected 1 persistentuser to be deleted, but %d deleted", count)
- }
-}
-
-// Ensure that the slices containing SQL results are non-nil when the result set is empty.
-func TestReturnsNonNilSlice(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
- noResultsSQL := "select * from invoice_test where " + columnName(dbmap, Invoice{}, "Id") + "=99999"
- var r1 []*Invoice
- rawSelect(dbmap, &r1, noResultsSQL)
- if r1 == nil {
- t.Errorf("r1==nil")
- }
-
- r2 := rawSelect(dbmap, Invoice{}, noResultsSQL)
- if r2 == nil {
- t.Errorf("r2==nil")
- }
-}
-
-func TestOverrideVersionCol(t *testing.T) {
- dbmap := newDbMap()
- t1 := dbmap.AddTable(InvoicePersonView{}).SetKeys(false, "InvoiceId", "PersonId")
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
- c1 := t1.SetVersionCol("LegacyVersion")
- if c1.ColumnName != "LegacyVersion" {
- t.Errorf("Wrong col returned: %v", c1)
- }
-
- ipv := &InvoicePersonView{1, 2, "memo", "fname", 0}
- _update(dbmap, ipv)
- if ipv.LegacyVersion != 1 {
- t.Errorf("LegacyVersion not updated: %d", ipv.LegacyVersion)
- }
-}
-
-func TestOptimisticLocking(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &Person{0, 0, 0, "Bob", "Smith", 0}
- dbmap.Insert(p1) // Version is now 1
- if p1.Version != 1 {
- t.Errorf("Insert didn't incr Version: %d != %d", 1, p1.Version)
- return
- }
- if p1.Id == 0 {
- t.Errorf("Insert didn't return a generated PK")
- return
- }
-
- obj, err := dbmap.Get(Person{}, p1.Id)
- if err != nil {
- panic(err)
- }
- p2 := obj.(*Person)
- p2.LName = "Edwards"
- dbmap.Update(p2) // Version is now 2
- if p2.Version != 2 {
- t.Errorf("Update didn't incr Version: %d != %d", 2, p2.Version)
- }
-
- p1.LName = "Howard"
- count, err := dbmap.Update(p1)
- if _, ok := err.(gorp.OptimisticLockError); !ok {
- t.Errorf("update - Expected gorp.OptimisticLockError, got: %v", err)
- }
- if count != -1 {
- t.Errorf("update - Expected -1 count, got: %d", count)
- }
-
- count, err = dbmap.Delete(p1)
- if _, ok := err.(gorp.OptimisticLockError); !ok {
- t.Errorf("delete - Expected gorp.OptimisticLockError, got: %v", err)
- }
- if count != -1 {
- t.Errorf("delete - Expected -1 count, got: %d", count)
- }
-}
-
-// what happens if a legacy table has a null value?
-func TestDoubleAddTable(t *testing.T) {
- dbmap := newDbMap()
- t1 := dbmap.AddTable(TableWithNull{}).SetKeys(false, "Id")
- t2 := dbmap.AddTable(TableWithNull{})
- if t1 != t2 {
- t.Errorf("%v != %v", t1, t2)
- }
-}
-
-// what happens if a legacy table has a null value?
-func TestNullValues(t *testing.T) {
- dbmap := initDbMapNulls()
- defer dropAndClose(dbmap)
-
- // insert a row directly
- rawExec(dbmap, "insert into "+tableName(dbmap, TableWithNull{})+" values (10, null, "+
- "null, null, null, null)")
-
- // try to load it
- expected := &TableWithNull{Id: 10}
- obj := _get(dbmap, TableWithNull{}, 10)
- t1 := obj.(*TableWithNull)
- if !reflect.DeepEqual(expected, t1) {
- t.Errorf("%v != %v", expected, t1)
- }
-
- // update it
- t1.Str = sql.NullString{"hi", true}
- expected.Str = t1.Str
- t1.Int64 = sql.NullInt64{999, true}
- expected.Int64 = t1.Int64
- t1.Float64 = sql.NullFloat64{53.33, true}
- expected.Float64 = t1.Float64
- t1.Bool = sql.NullBool{true, true}
- expected.Bool = t1.Bool
- t1.Bytes = []byte{1, 30, 31, 33}
- expected.Bytes = t1.Bytes
- _update(dbmap, t1)
-
- obj = _get(dbmap, TableWithNull{}, 10)
- t1 = obj.(*TableWithNull)
- if t1.Str.String != "hi" {
- t.Errorf("%s != hi", t1.Str.String)
- }
- if !reflect.DeepEqual(expected, t1) {
- t.Errorf("%v != %v", expected, t1)
- }
-}
-
-func TestScannerValuer(t *testing.T) {
- dbmap := newDbMap()
- dbmap.AddTableWithName(PersonValuerScanner{}, "person_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(InvoiceWithValuer{}, "invoice_test").SetKeys(true, "Id")
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
-
- pv := PersonValuerScanner{}
- pv.FName = "foo"
- pv.LName = "bar"
- err = dbmap.Insert(&pv)
- if err != nil {
- t.Errorf("Could not insert PersonValuerScanner using Person table: %v", err)
- t.FailNow()
- }
-
- inv := InvoiceWithValuer{}
- inv.Memo = "foo"
- inv.Person = pv
- err = dbmap.Insert(&inv)
- if err != nil {
- t.Errorf("Could not insert InvoiceWithValuer using Invoice table: %v", err)
- t.FailNow()
- }
-
- res, err := dbmap.Get(InvoiceWithValuer{}, inv.Id)
- if err != nil {
- t.Errorf("Could not get InvoiceWithValuer: %v", err)
- t.FailNow()
- }
- dbInv := res.(*InvoiceWithValuer)
-
- if dbInv.Person.Id != pv.Id {
- t.Errorf("InvoiceWithValuer got wrong person ID: %d (expected) != %d (actual)", pv.Id, dbInv.Person.Id)
- }
-}
-
-func TestColumnProps(t *testing.T) {
- dbmap := newDbMap()
- t1 := dbmap.AddTable(Invoice{}).SetKeys(true, "Id")
- t1.ColMap("Created").Rename("date_created")
- t1.ColMap("Updated").SetTransient(true)
- t1.ColMap("Memo").SetMaxSize(10)
- t1.ColMap("PersonId").SetUnique(true)
-
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- defer dropAndClose(dbmap)
-
- // test transient
- inv := &Invoice{0, 0, 1, "my invoice", 0, true}
- _insert(dbmap, inv)
- obj := _get(dbmap, Invoice{}, inv.Id)
- inv = obj.(*Invoice)
- if inv.Updated != 0 {
- t.Errorf("Saved transient column 'Updated'")
- }
-
- // test max size
- inv.Memo = "this memo is too long"
- err = dbmap.Insert(inv)
- if err == nil {
- t.Errorf("max size exceeded, but Insert did not fail.")
- }
-
- // test unique - same person id
- inv = &Invoice{0, 0, 1, "my invoice2", 0, false}
- err = dbmap.Insert(inv)
- if err == nil {
- t.Errorf("same PersonId inserted, but Insert did not fail.")
- }
-}
-
-func TestRawSelect(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- _insert(dbmap, p1)
-
- inv1 := &Invoice{0, 0, 0, "xmas order", p1.Id, true}
- _insert(dbmap, inv1)
-
- expected := &InvoicePersonView{inv1.Id, p1.Id, inv1.Memo, p1.FName, 0}
-
- query := "select i." + columnName(dbmap, Invoice{}, "Id") + " InvoiceId, p." + columnName(dbmap, Person{}, "Id") + " PersonId, i." + columnName(dbmap, Invoice{}, "Memo") + ", p." + columnName(dbmap, Person{}, "FName") + " " +
- "from invoice_test i, person_test p " +
- "where i." + columnName(dbmap, Invoice{}, "PersonId") + " = p." + columnName(dbmap, Person{}, "Id")
- list := rawSelect(dbmap, InvoicePersonView{}, query)
- if len(list) != 1 {
- t.Errorf("len(list) != 1: %d", len(list))
- } else if !reflect.DeepEqual(expected, list[0]) {
- t.Errorf("%v != %v", expected, list[0])
- }
-}
-
-func TestHooks(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- _insert(dbmap, p1)
- if p1.Created == 0 || p1.Updated == 0 {
- t.Errorf("p1.PreInsert() didn't run: %v", p1)
- } else if p1.LName != "postinsert" {
- t.Errorf("p1.PostInsert() didn't run: %v", p1)
- }
-
- obj := _get(dbmap, Person{}, p1.Id)
- p1 = obj.(*Person)
- if p1.LName != "postget" {
- t.Errorf("p1.PostGet() didn't run: %v", p1)
- }
-
- _update(dbmap, p1)
- if p1.FName != "preupdate" {
- t.Errorf("p1.PreUpdate() didn't run: %v", p1)
- } else if p1.LName != "postupdate" {
- t.Errorf("p1.PostUpdate() didn't run: %v", p1)
- }
-
- var persons []*Person
- bindVar := dbmap.Dialect.BindVar(0)
- rawSelect(dbmap, &persons, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+" = "+bindVar, p1.Id)
- if persons[0].LName != "postget" {
- t.Errorf("p1.PostGet() didn't run after select: %v", p1)
- }
-
- _del(dbmap, p1)
- if p1.FName != "predelete" {
- t.Errorf("p1.PreDelete() didn't run: %v", p1)
- } else if p1.LName != "postdelete" {
- t.Errorf("p1.PostDelete() didn't run: %v", p1)
- }
-
- // Test error case
- p2 := &Person{0, 0, 0, "badname", "", 0}
- err := dbmap.Insert(p2)
- if err == nil {
- t.Errorf("p2.PreInsert() didn't return an error")
- }
-}
-
-func TestTransaction(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv1 := &Invoice{0, 100, 200, "t1", 0, true}
- inv2 := &Invoice{0, 100, 200, "t2", 0, false}
-
- trans, err := dbmap.Begin()
- if err != nil {
- panic(err)
- }
- trans.Insert(inv1, inv2)
- err = trans.Commit()
- if err != nil {
- panic(err)
- }
-
- obj, err := dbmap.Get(Invoice{}, inv1.Id)
- if err != nil {
- panic(err)
- }
- if !reflect.DeepEqual(inv1, obj) {
- t.Errorf("%v != %v", inv1, obj)
- }
- obj, err = dbmap.Get(Invoice{}, inv2.Id)
- if err != nil {
- panic(err)
- }
- if !reflect.DeepEqual(inv2, obj) {
- t.Errorf("%v != %v", inv2, obj)
- }
-}
-
-func TestSavepoint(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv1 := &Invoice{0, 100, 200, "unpaid", 0, false}
-
- trans, err := dbmap.Begin()
- if err != nil {
- panic(err)
- }
- trans.Insert(inv1)
-
- var checkMemo = func(want string) {
- memo, err := trans.SelectStr("select " + columnName(dbmap, Invoice{}, "Memo") + " from invoice_test")
- if err != nil {
- panic(err)
- }
- if memo != want {
- t.Errorf("%q != %q", want, memo)
- }
- }
- checkMemo("unpaid")
-
- err = trans.Savepoint("foo")
- if err != nil {
- panic(err)
- }
- checkMemo("unpaid")
-
- inv1.Memo = "paid"
- _, err = trans.Update(inv1)
- if err != nil {
- panic(err)
- }
- checkMemo("paid")
-
- err = trans.RollbackToSavepoint("foo")
- if err != nil {
- panic(err)
- }
- checkMemo("unpaid")
-
- err = trans.Rollback()
- if err != nil {
- panic(err)
- }
-}
-
-func TestMultiple(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv1 := &Invoice{0, 100, 200, "a", 0, false}
- inv2 := &Invoice{0, 100, 200, "b", 0, true}
- _insert(dbmap, inv1, inv2)
-
- inv1.Memo = "c"
- inv2.Memo = "d"
- _update(dbmap, inv1, inv2)
-
- count := _del(dbmap, inv1, inv2)
- if count != 2 {
- t.Errorf("%d != 2", count)
- }
-}
-
-func TestCrud(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv := &Invoice{0, 100, 200, "first order", 0, true}
- testCrudInternal(t, dbmap, inv)
-
- invtag := &InvoiceTag{0, 300, 400, "some order", 33, false}
- testCrudInternal(t, dbmap, invtag)
-
- foo := &AliasTransientField{BarStr: "some bar"}
- testCrudInternal(t, dbmap, foo)
-
- dynamicTablesTest(t, dbmap)
-}
-
-func testCrudInternal(t *testing.T, dbmap *gorp.DbMap, val testable) {
- table, err := dbmap.TableFor(reflect.TypeOf(val).Elem(), false)
- if err != nil {
- t.Errorf("couldn't call TableFor: val=%v err=%v", val, err)
- }
-
- _, err = dbmap.Exec("delete from " + table.TableName)
- if err != nil {
- t.Errorf("couldn't delete rows from: val=%v err=%v", val, err)
- }
-
- // INSERT row
- _insert(dbmap, val)
- if val.GetId() == 0 {
- t.Errorf("val.GetId() was not set on INSERT")
- return
- }
-
- // SELECT row
- val2 := _get(dbmap, val, val.GetId())
- if !reflect.DeepEqual(val, val2) {
- t.Errorf("%v != %v", val, val2)
- }
-
- // UPDATE row and SELECT
- val.Rand()
- count := _update(dbmap, val)
- if count != 1 {
- t.Errorf("update 1 != %d", count)
- }
- val2 = _get(dbmap, val, val.GetId())
- if !reflect.DeepEqual(val, val2) {
- t.Errorf("%v != %v", val, val2)
- }
-
- // Select *
- rows, err := dbmap.Select(val, "select * from "+dbmap.Dialect.QuoteField(table.TableName))
- if err != nil {
- t.Errorf("couldn't select * from %s err=%v", dbmap.Dialect.QuoteField(table.TableName), err)
- } else if len(rows) != 1 {
- t.Errorf("unexpected row count in %s: %d", dbmap.Dialect.QuoteField(table.TableName), len(rows))
- } else if !reflect.DeepEqual(val, rows[0]) {
- t.Errorf("select * result: %v != %v", val, rows[0])
- }
-
- // DELETE row
- deleted := _del(dbmap, val)
- if deleted != 1 {
- t.Errorf("Did not delete row with Id: %d", val.GetId())
- return
- }
-
- // VERIFY deleted
- val2 = _get(dbmap, val, val.GetId())
- if val2 != nil {
- t.Errorf("Found invoice with id: %d after Delete()", val.GetId())
- }
-}
-
-func TestWithIgnoredColumn(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- ic := &WithIgnoredColumn{-1, 0, 1}
- _insert(dbmap, ic)
- expected := &WithIgnoredColumn{0, 1, 1}
- ic2 := _get(dbmap, WithIgnoredColumn{}, ic.Id).(*WithIgnoredColumn)
-
- if !reflect.DeepEqual(expected, ic2) {
- t.Errorf("%v != %v", expected, ic2)
- }
- if _del(dbmap, ic) != 1 {
- t.Errorf("Did not delete row with Id: %d", ic.Id)
- return
- }
- if _get(dbmap, WithIgnoredColumn{}, ic.Id) != nil {
- t.Errorf("Found id: %d after Delete()", ic.Id)
- }
-}
-
-func TestColumnFilter(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv1 := &Invoice{0, 100, 200, "a", 0, false}
- _insert(dbmap, inv1)
-
- inv1.Memo = "c"
- inv1.IsPaid = true
- _updateColumns(dbmap, func(col *gorp.ColumnMap) bool {
- return col.ColumnName == "Memo"
- }, inv1)
-
- inv2 := &Invoice{}
- inv2 = _get(dbmap, inv2, inv1.Id).(*Invoice)
- if inv2.Memo != "c" {
- t.Errorf("Expected column to be updated (%#v)", inv2)
- }
- if inv2.IsPaid {
- t.Error("IsPaid shouldn't have been updated")
- }
-}
-
-func TestTypeConversionExample(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p := Person{FName: "Bob", LName: "Smith"}
- tc := &TypeConversionExample{-1, p, CustomStringType("hi")}
- _insert(dbmap, tc)
-
- expected := &TypeConversionExample{1, p, CustomStringType("hi")}
- tc2 := _get(dbmap, TypeConversionExample{}, tc.Id).(*TypeConversionExample)
- if !reflect.DeepEqual(expected, tc2) {
- t.Errorf("tc2 %v != %v", expected, tc2)
- }
-
- tc2.Name = CustomStringType("hi2")
- tc2.PersonJSON = Person{FName: "Jane", LName: "Doe"}
- _update(dbmap, tc2)
-
- expected = &TypeConversionExample{1, tc2.PersonJSON, CustomStringType("hi2")}
- tc3 := _get(dbmap, TypeConversionExample{}, tc.Id).(*TypeConversionExample)
- if !reflect.DeepEqual(expected, tc3) {
- t.Errorf("tc3 %v != %v", expected, tc3)
- }
-
- if _del(dbmap, tc) != 1 {
- t.Errorf("Did not delete row with Id: %d", tc.Id)
- }
-
-}
-
-func TestWithEmbeddedStruct(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- es := &WithEmbeddedStruct{-1, Names{FirstName: "Alice", LastName: "Smith"}}
- _insert(dbmap, es)
- expected := &WithEmbeddedStruct{1, Names{FirstName: "Alice", LastName: "Smith"}}
- es2 := _get(dbmap, WithEmbeddedStruct{}, es.Id).(*WithEmbeddedStruct)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- es2.FirstName = "Bob"
- expected.FirstName = "Bob"
- _update(dbmap, es2)
- es2 = _get(dbmap, WithEmbeddedStruct{}, es.Id).(*WithEmbeddedStruct)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- ess := rawSelect(dbmap, WithEmbeddedStruct{}, "select * from embedded_struct_test")
- if !reflect.DeepEqual(es2, ess[0]) {
- t.Errorf("%v != %v", es2, ess[0])
- }
-}
-
-/*
-func TestWithEmbeddedStructConflictingEmbeddedMemberNames(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- es := &WithEmbeddedStructConflictingEmbeddedMemberNames{-1, Names{FirstName: "Alice", LastName: "Smith"}, NamesConflict{FirstName: "Andrew", Surname: "Wiggin"}}
- _insert(dbmap, es)
- expected := &WithEmbeddedStructConflictingEmbeddedMemberNames{-1, Names{FirstName: "Alice", LastName: "Smith"}, NamesConflict{FirstName: "Andrew", Surname: "Wiggin"}}
- es2 := _get(dbmap, WithEmbeddedStructConflictingEmbeddedMemberNames{}, es.Id).(*WithEmbeddedStructConflictingEmbeddedMemberNames)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- es2.Names.FirstName = "Bob"
- expected.Names.FirstName = "Bob"
- _update(dbmap, es2)
- es2 = _get(dbmap, WithEmbeddedStructConflictingEmbeddedMemberNames{}, es.Id).(*WithEmbeddedStructConflictingEmbeddedMemberNames)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- ess := rawSelect(dbmap, WithEmbeddedStructConflictingEmbeddedMemberNames{}, "select * from embedded_struct_conflict_name_test")
- if !reflect.DeepEqual(es2, ess[0]) {
- t.Errorf("%v != %v", es2, ess[0])
- }
-}
-
-func TestWithEmbeddedStructSameMemberName(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- es := &WithEmbeddedStructSameMemberName{-1, SameName{SameName: "Alice"}}
- _insert(dbmap, es)
- expected := &WithEmbeddedStructSameMemberName{-1, SameName{SameName: "Alice"}}
- es2 := _get(dbmap, WithEmbeddedStructSameMemberName{}, es.Id).(*WithEmbeddedStructSameMemberName)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- es2.SameName = SameName{"Bob"}
- expected.SameName = SameName{"Bob"}
- _update(dbmap, es2)
- es2 = _get(dbmap, WithEmbeddedStructSameMemberName{}, es.Id).(*WithEmbeddedStructSameMemberName)
- if !reflect.DeepEqual(expected, es2) {
- t.Errorf("%v != %v", expected, es2)
- }
-
- ess := rawSelect(dbmap, WithEmbeddedStructSameMemberName{}, "select * from embedded_struct_same_member_name_test")
- if !reflect.DeepEqual(es2, ess[0]) {
- t.Errorf("%v != %v", es2, ess[0])
- }
-}
-//*/
-
-func TestWithEmbeddedStructBeforeAutoincr(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- esba := &WithEmbeddedStructBeforeAutoincrField{Names: Names{FirstName: "Alice", LastName: "Smith"}}
- _insert(dbmap, esba)
- var expectedAutoincrId int64 = 1
- if esba.Id != expectedAutoincrId {
- t.Errorf("%d != %d", expectedAutoincrId, esba.Id)
- }
-}
-
-func TestWithEmbeddedAutoincr(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- esa := &WithEmbeddedAutoincr{
- WithEmbeddedStruct: WithEmbeddedStruct{Names: Names{FirstName: "Alice", LastName: "Smith"}},
- MiddleName: "Rose",
- }
- _insert(dbmap, esa)
- var expectedAutoincrId int64 = 1
- if esa.Id != expectedAutoincrId {
- t.Errorf("%d != %d", expectedAutoincrId, esa.Id)
- }
-}
-
-func TestSelectVal(t *testing.T) {
- dbmap := initDbMapNulls()
- defer dropAndClose(dbmap)
-
- bindVar := dbmap.Dialect.BindVar(0)
-
- t1 := TableWithNull{Str: sql.NullString{"abc", true},
- Int64: sql.NullInt64{78, true},
- Float64: sql.NullFloat64{32.2, true},
- Bool: sql.NullBool{true, true},
- Bytes: []byte("hi")}
- _insert(dbmap, &t1)
-
- // SelectInt
- i64 := selectInt(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Int64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='abc'")
- if i64 != 78 {
- t.Errorf("int64 %d != 78", i64)
- }
- i64 = selectInt(dbmap, "select count(*) from "+tableName(dbmap, TableWithNull{}))
- if i64 != 1 {
- t.Errorf("int64 count %d != 1", i64)
- }
- i64 = selectInt(dbmap, "select count(*) from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"="+bindVar, "asdfasdf")
- if i64 != 0 {
- t.Errorf("int64 no rows %d != 0", i64)
- }
-
- // SelectNullInt
- n := selectNullInt(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Int64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='notfound'")
- if !reflect.DeepEqual(n, sql.NullInt64{0, false}) {
- t.Errorf("nullint %v != 0,false", n)
- }
-
- n = selectNullInt(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Int64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='abc'")
- if !reflect.DeepEqual(n, sql.NullInt64{78, true}) {
- t.Errorf("nullint %v != 78, true", n)
- }
-
- // SelectFloat
- f64 := selectFloat(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Float64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='abc'")
- if f64 != 32.2 {
- t.Errorf("float64 %d != 32.2", f64)
- }
- f64 = selectFloat(dbmap, "select min("+columnName(dbmap, TableWithNull{}, "Float64")+") from "+tableName(dbmap, TableWithNull{}))
- if f64 != 32.2 {
- t.Errorf("float64 min %d != 32.2", f64)
- }
- f64 = selectFloat(dbmap, "select count(*) from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"="+bindVar, "asdfasdf")
- if f64 != 0 {
- t.Errorf("float64 no rows %d != 0", f64)
- }
-
- // SelectNullFloat
- nf := selectNullFloat(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Float64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='notfound'")
- if !reflect.DeepEqual(nf, sql.NullFloat64{0, false}) {
- t.Errorf("nullfloat %v != 0,false", nf)
- }
-
- nf = selectNullFloat(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Float64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='abc'")
- if !reflect.DeepEqual(nf, sql.NullFloat64{32.2, true}) {
- t.Errorf("nullfloat %v != 32.2, true", nf)
- }
-
- // SelectStr
- s := selectStr(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Str")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Int64")+"="+bindVar, 78)
- if s != "abc" {
- t.Errorf("s %s != abc", s)
- }
- s = selectStr(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Str")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='asdfasdf'")
- if s != "" {
- t.Errorf("s no rows %s != ''", s)
- }
-
- // SelectNullStr
- ns := selectNullStr(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Str")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Int64")+"="+bindVar, 78)
- if !reflect.DeepEqual(ns, sql.NullString{"abc", true}) {
- t.Errorf("nullstr %v != abc,true", ns)
- }
- ns = selectNullStr(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Str")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"='asdfasdf'")
- if !reflect.DeepEqual(ns, sql.NullString{"", false}) {
- t.Errorf("nullstr no rows %v != '',false", ns)
- }
-
- // SelectInt/Str with named parameters
- i64 = selectInt(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Int64")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Str")+"=:abc", map[string]string{"abc": "abc"})
- if i64 != 78 {
- t.Errorf("int64 %d != 78", i64)
- }
- ns = selectNullStr(dbmap, "select "+columnName(dbmap, TableWithNull{}, "Str")+" from "+tableName(dbmap, TableWithNull{})+" where "+columnName(dbmap, TableWithNull{}, "Int64")+"=:num", map[string]int{"num": 78})
- if !reflect.DeepEqual(ns, sql.NullString{"abc", true}) {
- t.Errorf("nullstr %v != abc,true", ns)
- }
-}
-
-func TestVersionMultipleRows(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- persons := []*Person{
- &Person{0, 0, 0, "Bob", "Smith", 0},
- &Person{0, 0, 0, "Jane", "Smith", 0},
- &Person{0, 0, 0, "Mike", "Smith", 0},
- }
-
- _insert(dbmap, persons[0], persons[1], persons[2])
-
- for x, p := range persons {
- if p.Version != 1 {
- t.Errorf("person[%d].Version != 1: %d", x, p.Version)
- }
- }
-}
-
-func TestWithStringPk(t *testing.T) {
- dbmap := newDbMap()
- dbmap.AddTableWithName(WithStringPk{}, "string_pk_test").SetKeys(true, "Id")
- _, err := dbmap.Exec("create table string_pk_test (Id varchar(255), Name varchar(255));")
- if err != nil {
- t.Errorf("couldn't create string_pk_test: %v", err)
- }
- defer dropAndClose(dbmap)
-
- row := &WithStringPk{"1", "foo"}
- err = dbmap.Insert(row)
- if err == nil {
- t.Errorf("Expected error when inserting into table w/non Int PK and autoincr set true")
- }
-}
-
-// TestSqlExecutorInterfaceSelects ensures that all gorp.DbMap methods starting with Select...
-// are also exposed in the gorp.SqlExecutor interface. Select... functions can always
-// run on Pre/Post hooks.
-func TestSqlExecutorInterfaceSelects(t *testing.T) {
- dbMapType := reflect.TypeOf(&gorp.DbMap{})
- sqlExecutorType := reflect.TypeOf((*gorp.SqlExecutor)(nil)).Elem()
- numDbMapMethods := dbMapType.NumMethod()
- for i := 0; i < numDbMapMethods; i += 1 {
- dbMapMethod := dbMapType.Method(i)
- if !strings.HasPrefix(dbMapMethod.Name, "Select") {
- continue
- }
- if _, found := sqlExecutorType.MethodByName(dbMapMethod.Name); !found {
- t.Errorf("Method %s is defined on gorp.DbMap but not implemented in gorp.SqlExecutor",
- dbMapMethod.Name)
- }
- }
-}
-
-func TestNullTime(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- // if time is null
- ent := &WithNullTime{
- Id: 0,
- Time: gorp.NullTime{
- Valid: false,
- }}
- err := dbmap.Insert(ent)
- if err != nil {
- t.Error("failed insert on %s", err.Error())
- }
- err = dbmap.SelectOne(ent, `select * from nulltime_test where `+columnName(dbmap, WithNullTime{}, "Id")+`=:Id`, map[string]interface{}{
- "Id": ent.Id,
- })
- if err != nil {
- t.Error("failed select on %s", err.Error())
- }
- if ent.Time.Valid {
- t.Error("gorp.NullTime returns valid but expected null.")
- }
-
- // if time is not null
- ts, err := time.Parse(time.Stamp, "Jan 2 15:04:05")
- ent = &WithNullTime{
- Id: 1,
- Time: gorp.NullTime{
- Valid: true,
- Time: ts,
- }}
- err = dbmap.Insert(ent)
- if err != nil {
- t.Error("failed insert on %s", err.Error())
- }
- err = dbmap.SelectOne(ent, `select * from nulltime_test where `+columnName(dbmap, WithNullTime{}, "Id")+`=:Id`, map[string]interface{}{
- "Id": ent.Id,
- })
- if err != nil {
- t.Error("failed select on %s", err.Error())
- }
- if !ent.Time.Valid {
- t.Error("gorp.NullTime returns invalid but expected valid.")
- }
- if ent.Time.Time.UTC() != ts.UTC() {
- t.Errorf("expect %v but got %v.", ts, ent.Time.Time)
- }
-
- return
-}
-
-type WithTime struct {
- Id int64
- Time time.Time
-}
-
-type Times struct {
- One time.Time
- Two time.Time
-}
-
-type EmbeddedTime struct {
- Id string
- Times
-}
-
-func parseTimeOrPanic(format, date string) time.Time {
- t1, err := time.Parse(format, date)
- if err != nil {
- panic(err)
- }
- return t1
-}
-
-// TODO: re-enable next two tests when this is merged:
-// https://github.com/ziutek/mymysql/pull/77
-//
-// This test currently fails w/MySQL b/c tz info is lost
-func testWithTime(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- t1 := parseTimeOrPanic("2006-01-02 15:04:05 -0700 MST",
- "2013-08-09 21:30:43 +0800 CST")
- w1 := WithTime{1, t1}
- _insert(dbmap, &w1)
-
- obj := _get(dbmap, WithTime{}, w1.Id)
- w2 := obj.(*WithTime)
- if w1.Time.UnixNano() != w2.Time.UnixNano() {
- t.Errorf("%v != %v", w1, w2)
- }
-}
-
-// See: https://github.com/go-gorp/gorp/issues/86
-func testEmbeddedTime(t *testing.T) {
- dbmap := newDbMap()
- dbmap.AddTable(EmbeddedTime{}).SetKeys(false, "Id")
- defer dropAndClose(dbmap)
- err := dbmap.CreateTables()
- if err != nil {
- t.Fatal(err)
- }
-
- time1 := parseTimeOrPanic("2006-01-02 15:04:05", "2013-08-09 21:30:43")
-
- t1 := &EmbeddedTime{Id: "abc", Times: Times{One: time1, Two: time1.Add(10 * time.Second)}}
- _insert(dbmap, t1)
-
- x := _get(dbmap, EmbeddedTime{}, t1.Id)
- t2, _ := x.(*EmbeddedTime)
- if t1.One.UnixNano() != t2.One.UnixNano() || t1.Two.UnixNano() != t2.Two.UnixNano() {
- t.Errorf("%v != %v", t1, t2)
- }
-}
-
-func TestWithTimeSelect(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- halfhourago := time.Now().UTC().Add(-30 * time.Minute)
-
- w1 := WithTime{1, halfhourago.Add(time.Minute * -1)}
- w2 := WithTime{2, halfhourago.Add(time.Second)}
- _insert(dbmap, &w1, &w2)
-
- var caseIds []int64
- _, err := dbmap.Select(&caseIds, "SELECT "+columnName(dbmap, WithTime{}, "Id")+" FROM time_test WHERE "+columnName(dbmap, WithTime{}, "Time")+" < "+dbmap.Dialect.BindVar(0), halfhourago)
-
- if err != nil {
- t.Error(err)
- }
- if len(caseIds) != 1 {
- t.Errorf("%d != 1", len(caseIds))
- }
- if caseIds[0] != w1.Id {
- t.Errorf("%d != %d", caseIds[0], w1.Id)
- }
-}
-
-func TestInvoicePersonView(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- // Create some rows
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- dbmap.Insert(p1)
-
- // notice how we can wire up p1.Id to the invoice easily
- inv1 := &Invoice{0, 0, 0, "xmas order", p1.Id, false}
- dbmap.Insert(inv1)
-
- // Run your query
- query := "select i." + columnName(dbmap, Invoice{}, "Id") + " InvoiceId, p." + columnName(dbmap, Person{}, "Id") + " PersonId, i." + columnName(dbmap, Invoice{}, "Memo") + ", p." + columnName(dbmap, Person{}, "FName") + " " +
- "from invoice_test i, person_test p " +
- "where i." + columnName(dbmap, Invoice{}, "PersonId") + " = p." + columnName(dbmap, Person{}, "Id")
-
- // pass a slice of pointers to Select()
- // this avoids the need to type assert after the query is run
- var list []*InvoicePersonView
- _, err := dbmap.Select(&list, query)
- if err != nil {
- panic(err)
- }
-
- // this should test true
- expected := &InvoicePersonView{inv1.Id, p1.Id, inv1.Memo, p1.FName, 0}
- if !reflect.DeepEqual(list[0], expected) {
- t.Errorf("%v != %v", list[0], expected)
- }
-}
-
-func TestQuoteTableNames(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- quotedTableName := dbmap.Dialect.QuoteField("person_test")
-
- // Use a buffer to hold the log to check generated queries
- logBuffer := &bytes.Buffer{}
- dbmap.TraceOn("", log.New(logBuffer, "gorptest:", log.Lmicroseconds))
-
- // Create some rows
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- errorTemplate := "Expected quoted table name %v in query but didn't find it"
-
- // Check if Insert quotes the table name
- id := dbmap.Insert(p1)
- if !bytes.Contains(logBuffer.Bytes(), []byte(quotedTableName)) {
- t.Errorf(errorTemplate, quotedTableName)
- }
- logBuffer.Reset()
-
- // Check if Get quotes the table name
- dbmap.Get(Person{}, id)
- if !bytes.Contains(logBuffer.Bytes(), []byte(quotedTableName)) {
- t.Errorf(errorTemplate, quotedTableName)
- }
- logBuffer.Reset()
-}
-
-func TestSelectTooManyCols(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- p2 := &Person{0, 0, 0, "jane", "doe", 0}
- _insert(dbmap, p1)
- _insert(dbmap, p2)
-
- obj := _get(dbmap, Person{}, p1.Id)
- p1 = obj.(*Person)
- obj = _get(dbmap, Person{}, p2.Id)
- p2 = obj.(*Person)
-
- params := map[string]interface{}{
- "Id": p1.Id,
- }
-
- var p3 FNameOnly
- err := dbmap.SelectOne(&p3, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if err != nil {
- if !gorp.NonFatalError(err) {
- t.Error(err)
- }
- } else {
- t.Errorf("Non-fatal error expected")
- }
-
- if p1.FName != p3.FName {
- t.Errorf("%v != %v", p1.FName, p3.FName)
- }
-
- var pSlice []FNameOnly
- _, err = dbmap.Select(&pSlice, "select * from person_test order by "+columnName(dbmap, Person{}, "FName")+" asc")
- if err != nil {
- if !gorp.NonFatalError(err) {
- t.Error(err)
- }
- } else {
- t.Errorf("Non-fatal error expected")
- }
-
- if p1.FName != pSlice[0].FName {
- t.Errorf("%v != %v", p1.FName, pSlice[0].FName)
- }
- if p2.FName != pSlice[1].FName {
- t.Errorf("%v != %v", p2.FName, pSlice[1].FName)
- }
-}
-
-func TestSelectSingleVal(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &Person{0, 0, 0, "bob", "smith", 0}
- _insert(dbmap, p1)
-
- obj := _get(dbmap, Person{}, p1.Id)
- p1 = obj.(*Person)
-
- params := map[string]interface{}{
- "Id": p1.Id,
- }
-
- var p2 Person
- err := dbmap.SelectOne(&p2, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if err != nil {
- t.Error(err)
- }
-
- if !reflect.DeepEqual(p1, &p2) {
- t.Errorf("%v != %v", p1, &p2)
- }
-
- // verify SelectOne allows non-struct holders
- var s string
- err = dbmap.SelectOne(&s, "select "+columnName(dbmap, Person{}, "FName")+" from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if err != nil {
- t.Error(err)
- }
- if s != "bob" {
- t.Error("Expected bob but got: " + s)
- }
-
- // verify SelectOne requires pointer receiver
- err = dbmap.SelectOne(s, "select "+columnName(dbmap, Person{}, "FName")+" from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if err == nil {
- t.Error("SelectOne should have returned error for non-pointer holder")
- }
-
- // verify SelectOne works with uninitialized pointers
- var p3 *Person
- err = dbmap.SelectOne(&p3, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if err != nil {
- t.Error(err)
- }
-
- if !reflect.DeepEqual(p1, p3) {
- t.Errorf("%v != %v", p1, p3)
- }
-
- // verify that the receiver is still nil if nothing was found
- var p4 *Person
- dbmap.SelectOne(&p3, "select * from person_test where 2<1 AND "+columnName(dbmap, Person{}, "Id")+"=:Id", params)
- if p4 != nil {
- t.Error("SelectOne should not have changed a nil receiver when no rows were found")
- }
-
- // verify that the error is set to sql.ErrNoRows if not found
- err = dbmap.SelectOne(&p2, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+"=:Id", map[string]interface{}{
- "Id": -2222,
- })
- if err == nil || err != sql.ErrNoRows {
- t.Error("SelectOne should have returned an sql.ErrNoRows")
- }
-
- _insert(dbmap, &Person{0, 0, 0, "bob", "smith", 0})
- err = dbmap.SelectOne(&p2, "select * from person_test where "+columnName(dbmap, Person{}, "FName")+"='bob'")
- if err == nil {
- t.Error("Expected error when two rows found")
- }
-
- // tests for #150
- var tInt int64
- var tStr string
- var tBool bool
- var tFloat float64
- primVals := []interface{}{tInt, tStr, tBool, tFloat}
- for _, prim := range primVals {
- err = dbmap.SelectOne(&prim, "select * from person_test where "+columnName(dbmap, Person{}, "Id")+"=-123")
- if err == nil || err != sql.ErrNoRows {
- t.Error("primVals: SelectOne should have returned sql.ErrNoRows")
- }
- }
-}
-
-func TestSelectAlias(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- p1 := &IdCreatedExternal{IdCreated: IdCreated{Id: 1, Created: 3}, External: 2}
-
- // Insert using embedded IdCreated, which reflects the structure of the table
- _insert(dbmap, &p1.IdCreated)
-
- // Select into IdCreatedExternal type, which includes some fields not present
- // in id_created_test
- var p2 IdCreatedExternal
- err := dbmap.SelectOne(&p2, "select * from id_created_test where "+columnName(dbmap, IdCreatedExternal{}, "Id")+"=1")
- if err != nil {
- t.Error(err)
- }
- if p2.Id != 1 || p2.Created != 3 || p2.External != 0 {
- t.Error("Expected ignored field defaults to not set")
- }
-
- // Prove that we can supply an aliased value in the select, and that it will
- // automatically map to IdCreatedExternal.External
- err = dbmap.SelectOne(&p2, "SELECT *, 1 AS external FROM id_created_test")
- if err != nil {
- t.Error(err)
- }
- if p2.External != 1 {
- t.Error("Expected select as can map to exported field.")
- }
-
- var rows *sql.Rows
- var cols []string
- rows, err = dbmap.Db.Query("SELECT * FROM id_created_test")
- cols, err = rows.Columns()
- if err != nil || len(cols) != 2 {
- t.Error("Expected ignored column not created")
- }
-}
-
-func TestMysqlPanicIfDialectNotInitialized(t *testing.T) {
- _, driver := dialectAndDriver()
- // this test only applies to MySQL
- if os.Getenv("GORP_TEST_DIALECT") != "mysql" {
- return
- }
-
- // The expected behaviour is to catch a panic.
- // Here is the deferred function which will check if a panic has indeed occurred :
- defer func() {
- r := recover()
- if r == nil {
- t.Error("db.CreateTables() should panic if db is initialized with an incorrect gorp.MySQLDialect")
- }
- }()
-
- // invalid MySQLDialect : does not contain Engine or Encoding specification
- dialect := gorp.MySQLDialect{}
- db := &gorp.DbMap{Db: connect(driver), Dialect: dialect}
- db.AddTableWithName(Invoice{}, "invoice")
- // the following call should panic :
- db.CreateTables()
-}
-
-func TestSingleColumnKeyDbReturnsZeroRowsUpdatedOnPKChange(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
- dbmap.AddTableWithName(SingleColumnTable{}, "single_column_table").SetKeys(false, "SomeId")
- err := dbmap.DropTablesIfExists()
- if err != nil {
- t.Error("Drop tables failed")
- }
- err = dbmap.CreateTablesIfNotExists()
- if err != nil {
- t.Error("Create tables failed")
- }
- err = dbmap.TruncateTables()
- if err != nil {
- t.Error("Truncate tables failed")
- }
-
- sct := SingleColumnTable{
- SomeId: "A Unique Id String",
- }
-
- count, err := dbmap.Update(&sct)
- if err != nil {
- t.Error(err)
- }
- if count != 0 {
- t.Errorf("Expected 0 updated rows, got %d", count)
- }
-
-}
-
-func TestPrepare(t *testing.T) {
- dbmap := initDbMap()
- defer dropAndClose(dbmap)
-
- inv1 := &Invoice{0, 100, 200, "prepare-foo", 0, false}
- inv2 := &Invoice{0, 100, 200, "prepare-bar", 0, false}
- _insert(dbmap, inv1, inv2)
-
- bindVar0 := dbmap.Dialect.BindVar(0)
- bindVar1 := dbmap.Dialect.BindVar(1)
- stmt, err := dbmap.Prepare(fmt.Sprintf("UPDATE invoice_test SET "+columnName(dbmap, Invoice{}, "Memo")+"=%s WHERE "+columnName(dbmap, Invoice{}, "Id")+"=%s", bindVar0, bindVar1))
- if err != nil {
- t.Error(err)
- }
- defer stmt.Close()
- _, err = stmt.Exec("prepare-baz", inv1.Id)
- if err != nil {
- t.Error(err)
- }
- err = dbmap.SelectOne(inv1, "SELECT * from invoice_test WHERE "+columnName(dbmap, Invoice{}, "Memo")+"='prepare-baz'")
- if err != nil {
- t.Error(err)
- }
-
- trans, err := dbmap.Begin()
- if err != nil {
- t.Error(err)
- }
- transStmt, err := trans.Prepare(fmt.Sprintf("UPDATE invoice_test SET "+columnName(dbmap, Invoice{}, "IsPaid")+"=%s WHERE "+columnName(dbmap, Invoice{}, "Id")+"=%s", bindVar0, bindVar1))
- if err != nil {
- t.Error(err)
- }
- defer transStmt.Close()
- _, err = transStmt.Exec(true, inv2.Id)
- if err != nil {
- t.Error(err)
- }
- err = dbmap.SelectOne(inv2, fmt.Sprintf("SELECT * from invoice_test WHERE "+columnName(dbmap, Invoice{}, "IsPaid")+"=%s", bindVar0), true)
- if err == nil || err != sql.ErrNoRows {
- t.Error("SelectOne should have returned an sql.ErrNoRows")
- }
- err = trans.SelectOne(inv2, fmt.Sprintf("SELECT * from invoice_test WHERE "+columnName(dbmap, Invoice{}, "IsPaid")+"=%s", bindVar0), true)
- if err != nil {
- t.Error(err)
- }
- err = trans.Commit()
- if err != nil {
- t.Error(err)
- }
- err = dbmap.SelectOne(inv2, fmt.Sprintf("SELECT * from invoice_test WHERE "+columnName(dbmap, Invoice{}, "IsPaid")+"=%s", bindVar0), true)
- if err != nil {
- t.Error(err)
- }
-}
-
-func BenchmarkNativeCrud(b *testing.B) {
- b.StopTimer()
- dbmap := initDbMapBench()
- defer dropAndClose(dbmap)
- columnId := columnName(dbmap, Invoice{}, "Id")
- columnCreated := columnName(dbmap, Invoice{}, "Created")
- columnUpdated := columnName(dbmap, Invoice{}, "Updated")
- columnMemo := columnName(dbmap, Invoice{}, "Memo")
- columnPersonId := columnName(dbmap, Invoice{}, "PersonId")
- b.StartTimer()
-
- var insert, sel, update, delete string
- if os.Getenv("GORP_TEST_DIALECT") != "postgres" {
- insert = "insert into invoice_test (" + columnCreated + ", " + columnUpdated + ", " + columnMemo + ", " + columnPersonId + ") values (?, ?, ?, ?)"
- sel = "select " + columnId + ", " + columnCreated + ", " + columnUpdated + ", " + columnMemo + ", " + columnPersonId + " from invoice_test where " + columnId + "=?"
- update = "update invoice_test set " + columnCreated + "=?, " + columnUpdated + "=?, " + columnMemo + "=?, " + columnPersonId + "=? where " + columnId + "=?"
- delete = "delete from invoice_test where " + columnId + "=?"
- } else {
- insert = "insert into invoice_test (" + columnCreated + ", " + columnUpdated + ", " + columnMemo + ", " + columnPersonId + ") values ($1, $2, $3, $4)"
- sel = "select " + columnId + ", " + columnCreated + ", " + columnUpdated + ", " + columnMemo + ", " + columnPersonId + " from invoice_test where " + columnId + "=$1"
- update = "update invoice_test set " + columnCreated + "=$1, " + columnUpdated + "=$2, " + columnMemo + "=$3, " + columnPersonId + "=$4 where " + columnId + "=$5"
- delete = "delete from invoice_test where " + columnId + "=$1"
- }
-
- inv := &Invoice{0, 100, 200, "my memo", 0, false}
-
- for i := 0; i < b.N; i++ {
- res, err := dbmap.Db.Exec(insert, inv.Created, inv.Updated,
- inv.Memo, inv.PersonId)
- if err != nil {
- panic(err)
- }
-
- newid, err := res.LastInsertId()
- if err != nil {
- panic(err)
- }
- inv.Id = newid
-
- row := dbmap.Db.QueryRow(sel, inv.Id)
- err = row.Scan(&inv.Id, &inv.Created, &inv.Updated, &inv.Memo,
- &inv.PersonId)
- if err != nil {
- panic(err)
- }
-
- inv.Created = 1000
- inv.Updated = 2000
- inv.Memo = "my memo 2"
- inv.PersonId = 3000
-
- _, err = dbmap.Db.Exec(update, inv.Created, inv.Updated, inv.Memo,
- inv.PersonId, inv.Id)
- if err != nil {
- panic(err)
- }
-
- _, err = dbmap.Db.Exec(delete, inv.Id)
- if err != nil {
- panic(err)
- }
- }
-
-}
-
-func BenchmarkGorpCrud(b *testing.B) {
- b.StopTimer()
- dbmap := initDbMapBench()
- defer dropAndClose(dbmap)
- b.StartTimer()
-
- inv := &Invoice{0, 100, 200, "my memo", 0, true}
- for i := 0; i < b.N; i++ {
- err := dbmap.Insert(inv)
- if err != nil {
- panic(err)
- }
-
- obj, err := dbmap.Get(Invoice{}, inv.Id)
- if err != nil {
- panic(err)
- }
-
- inv2, ok := obj.(*Invoice)
- if !ok {
- panic(fmt.Sprintf("expected *Invoice, got: %v", obj))
- }
-
- inv2.Created = 1000
- inv2.Updated = 2000
- inv2.Memo = "my memo 2"
- inv2.PersonId = 3000
- _, err = dbmap.Update(inv2)
- if err != nil {
- panic(err)
- }
-
- _, err = dbmap.Delete(inv2)
- if err != nil {
- panic(err)
- }
-
- }
-}
-
-func initDbMapBench() *gorp.DbMap {
- dbmap := newDbMap()
- dbmap.Db.Exec("drop table if exists invoice_test")
- dbmap.AddTableWithName(Invoice{}, "invoice_test").SetKeys(true, "Id")
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- return dbmap
-}
-
-func initDbMap() *gorp.DbMap {
- dbmap := newDbMap()
- dbmap.AddTableWithName(Invoice{}, "invoice_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(InvoiceTag{}, "invoice_tag_test") //key is set via primarykey attribute
- dbmap.AddTableWithName(AliasTransientField{}, "alias_trans_field_test").SetKeys(true, "id")
- dbmap.AddTableWithName(OverriddenInvoice{}, "invoice_override_test").SetKeys(false, "Id")
- dbmap.AddTableWithName(Person{}, "person_test").SetKeys(true, "Id").SetVersionCol("Version")
- dbmap.AddTableWithName(WithIgnoredColumn{}, "ignored_column_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(IdCreated{}, "id_created_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(TypeConversionExample{}, "type_conv_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(WithEmbeddedStruct{}, "embedded_struct_test").SetKeys(true, "Id")
- //dbmap.AddTableWithName(WithEmbeddedStructConflictingEmbeddedMemberNames{}, "embedded_struct_conflict_name_test").SetKeys(true, "Id")
- //dbmap.AddTableWithName(WithEmbeddedStructSameMemberName{}, "embedded_struct_same_member_name_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(WithEmbeddedStructBeforeAutoincrField{}, "embedded_struct_before_autoincr_test").SetKeys(true, "Id")
- dbmap.AddTableDynamic(&dynTableInst1, "").SetKeys(true, "Id").AddIndex("TenantInst1Index", "Btree", []string{"Name"}).SetUnique(true)
- dbmap.AddTableDynamic(&dynTableInst2, "").SetKeys(true, "Id").AddIndex("TenantInst2Index", "Btree", []string{"Name"}).SetUnique(true)
- dbmap.AddTableWithName(WithEmbeddedAutoincr{}, "embedded_autoincr_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(WithTime{}, "time_test").SetKeys(true, "Id")
- dbmap.AddTableWithName(WithNullTime{}, "nulltime_test").SetKeys(false, "Id")
- dbmap.TypeConverter = testTypeConverter{}
- err := dbmap.DropTablesIfExists()
- if err != nil {
- panic(err)
- }
- err = dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
-
- err = dbmap.CreateIndex()
- if err != nil {
- panic(err)
- }
-
- // See #146 and TestSelectAlias - this type is mapped to the same
- // table as IdCreated, but includes an extra field that isn't in the table
- dbmap.AddTableWithName(IdCreatedExternal{}, "id_created_test").SetKeys(true, "Id")
-
- return dbmap
-}
-
-func initDbMapNulls() *gorp.DbMap {
- dbmap := newDbMap()
- dbmap.AddTable(TableWithNull{}).SetKeys(false, "Id")
- err := dbmap.CreateTables()
- if err != nil {
- panic(err)
- }
- return dbmap
-}
-
-func newDbMap() *gorp.DbMap {
- dialect, driver := dialectAndDriver()
- dbmap := &gorp.DbMap{Db: connect(driver), Dialect: dialect}
- if debug {
- dbmap.TraceOn("", log.New(os.Stdout, "gorptest: ", log.Lmicroseconds))
- }
- return dbmap
-}
-
-func dropAndClose(dbmap *gorp.DbMap) {
- dbmap.DropTablesIfExists()
- dbmap.Db.Close()
-}
-
-func connect(driver string) *sql.DB {
- dsn := os.Getenv("GORP_TEST_DSN")
- if dsn == "" {
- panic("GORP_TEST_DSN env variable is not set. Please see README.md")
- }
-
- db, err := sql.Open(driver, dsn)
- if err != nil {
- panic("Error connecting to db: " + err.Error())
- }
- return db
-}
-
-func dialectAndDriver() (gorp.Dialect, string) {
- switch os.Getenv("GORP_TEST_DIALECT") {
- case "mysql":
- return gorp.MySQLDialect{"InnoDB", "UTF8"}, "mymysql"
- case "gomysql":
- return gorp.MySQLDialect{"InnoDB", "UTF8"}, "mysql"
- case "postgres":
- return gorp.PostgresDialect{}, "postgres"
- case "sqlite":
- return gorp.SqliteDialect{}, "sqlite3"
- }
- panic("GORP_TEST_DIALECT env variable is not set or is invalid. Please see README.md")
-}
-
-func _insert(dbmap *gorp.DbMap, list ...interface{}) {
- err := dbmap.Insert(list...)
- if err != nil {
- panic(err)
- }
-}
-
-func _update(dbmap *gorp.DbMap, list ...interface{}) int64 {
- count, err := dbmap.Update(list...)
- if err != nil {
- panic(err)
- }
- return count
-}
-
-func _updateColumns(dbmap *gorp.DbMap, filter gorp.ColumnFilter, list ...interface{}) int64 {
- count, err := dbmap.UpdateColumns(filter, list...)
- if err != nil {
- panic(err)
- }
- return count
-}
-
-func _del(dbmap *gorp.DbMap, list ...interface{}) int64 {
- count, err := dbmap.Delete(list...)
- if err != nil {
- panic(err)
- }
-
- return count
-}
-
-func _get(dbmap *gorp.DbMap, i interface{}, keys ...interface{}) interface{} {
- obj, err := dbmap.Get(i, keys...)
- if err != nil {
- panic(err)
- }
-
- return obj
-}
-
-func selectInt(dbmap *gorp.DbMap, query string, args ...interface{}) int64 {
- i64, err := gorp.SelectInt(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return i64
-}
-
-func selectNullInt(dbmap *gorp.DbMap, query string, args ...interface{}) sql.NullInt64 {
- i64, err := gorp.SelectNullInt(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return i64
-}
-
-func selectFloat(dbmap *gorp.DbMap, query string, args ...interface{}) float64 {
- f64, err := gorp.SelectFloat(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return f64
-}
-
-func selectNullFloat(dbmap *gorp.DbMap, query string, args ...interface{}) sql.NullFloat64 {
- f64, err := gorp.SelectNullFloat(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return f64
-}
-
-func selectStr(dbmap *gorp.DbMap, query string, args ...interface{}) string {
- s, err := gorp.SelectStr(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return s
-}
-
-func selectNullStr(dbmap *gorp.DbMap, query string, args ...interface{}) sql.NullString {
- s, err := gorp.SelectNullStr(dbmap, query, args...)
- if err != nil {
- panic(err)
- }
-
- return s
-}
-
-func rawExec(dbmap *gorp.DbMap, query string, args ...interface{}) sql.Result {
- res, err := dbmap.Exec(query, args...)
- if err != nil {
- panic(err)
- }
- return res
-}
-
-func rawSelect(dbmap *gorp.DbMap, i interface{}, query string, args ...interface{}) []interface{} {
- list, err := dbmap.Select(i, query, args...)
- if err != nil {
- panic(err)
- }
- return list
-}
-
-func tableName(dbmap *gorp.DbMap, i interface{}) string {
- t := reflect.TypeOf(i)
- if table, err := dbmap.TableFor(t, false); table != nil && err == nil {
- return dbmap.Dialect.QuoteField(table.TableName)
- }
- return t.Name()
-}
-
-func columnName(dbmap *gorp.DbMap, i interface{}, fieldName string) string {
- t := reflect.TypeOf(i)
- if table, err := dbmap.TableFor(t, false); table != nil && err == nil {
- return dbmap.Dialect.QuoteField(table.ColMap(fieldName).ColumnName)
- }
- return fieldName
-}
diff --git a/vendor/github.com/mattermost/gorp/table.go b/vendor/github.com/mattermost/gorp/table.go
index 5c513909a..138f761ec 100644
--- a/vendor/github.com/mattermost/gorp/table.go
+++ b/vendor/github.com/mattermost/gorp/table.go
@@ -87,12 +87,29 @@ func (t *TableMap) SetUniqueTogether(fieldNames ...string) *TableMap {
"gorp: SetUniqueTogether: must provide at least two fieldNames to set uniqueness constraint."))
}
- columns := make([]string, 0)
+ columns := make([]string, 0, len(fieldNames))
for _, name := range fieldNames {
columns = append(columns, name)
}
- t.uniqueTogether = append(t.uniqueTogether, columns)
- t.ResetSql()
+
+ alreadyExists := false
+checkDuplicates:
+ for _, existingColumns := range t.uniqueTogether {
+ if len(existingColumns) == len(columns) {
+ for i := range columns {
+ if existingColumns[i] != columns[i] {
+ continue checkDuplicates
+ }
+ }
+
+ alreadyExists = true
+ break checkDuplicates
+ }
+ }
+ if !alreadyExists {
+ t.uniqueTogether = append(t.uniqueTogether, columns)
+ t.ResetSql()
+ }
return t
}
diff --git a/vendor/github.com/mattermost/html2text/html2text_test.go b/vendor/github.com/mattermost/html2text/html2text_test.go
deleted file mode 100644
index b30d68ac9..000000000
--- a/vendor/github.com/mattermost/html2text/html2text_test.go
+++ /dev/null
@@ -1,674 +0,0 @@
-package html2text
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "path"
- "regexp"
- "strings"
- "testing"
-)
-
-const (
- destPath = "testdata"
-)
-
-func TestParseUTF8(t *testing.T) {
- htmlFiles := []struct {
- file string
- keywordShouldNotExist string
- keywordShouldExist string
- }{
- {
- "utf8.html",
- "学习之é“:美国公认学习第一书title",
- "次世界冠军赛上,我几近疯狂",
- },
- {
- "utf8_with_bom.xhtml",
- "1892年波兰文版åºè¨€title",
- "ç§æ–°çš„波兰文本已æˆä¸ºå¿…è¦",
- },
- }
-
- for _, htmlFile := range htmlFiles {
- bs, err := ioutil.ReadFile(path.Join(destPath, htmlFile.file))
- if err != nil {
- t.Fatal(err)
- }
- text, err := FromReader(bytes.NewReader(bs))
- if err != nil {
- t.Fatal(err)
- }
- if !strings.Contains(text, htmlFile.keywordShouldExist) {
- t.Fatalf("keyword %s should exists in file %s", htmlFile.keywordShouldExist, htmlFile.file)
- }
- if strings.Contains(text, htmlFile.keywordShouldNotExist) {
- t.Fatalf("keyword %s should not exists in file %s", htmlFile.keywordShouldNotExist, htmlFile.file)
- }
- }
-}
-
-func TestStrippingWhitespace(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "test text",
- "test text",
- },
- {
- " \ttext\ntext\n",
- "text text",
- },
- {
- " \na \n\t \n \n a \t",
- "a a",
- },
- {
- "test text",
- "test text",
- },
- {
- "test&nbsp;&nbsp;&nbsp; text&nbsp;",
- "test    text",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestParagraphsAndBreaks(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "Test text",
- "Test text",
- },
- {
- "Test text<br>",
- "Test text",
- },
- {
- "Test text<br>Test",
- "Test text\nTest",
- },
- {
- "<p>Test text</p>",
- "Test text",
- },
- {
- "<p>Test text</p><p>Test text</p>",
- "Test text\n\nTest text",
- },
- {
- "\n<p>Test text</p>\n\n\n\t<p>Test text</p>\n",
- "Test text\n\nTest text",
- },
- {
- "\n<p>Test text<br/>Test text</p>\n",
- "Test text\nTest text",
- },
- {
- "\n<p>Test text<br> \tTest text<br></p>\n",
- "Test text\nTest text",
- },
- {
- "Test text<br><BR />Test text",
- "Test text\n\nTest text",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestTables(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<table><tr><td></td><td></td></tr></table>",
- "",
- },
- {
- "<table><tr><td>cell1</td><td>cell2</td></tr></table>",
- "cell1 cell2",
- },
- {
- "<table><tr><td>row1</td></tr><tr><td>row2</td></tr></table>",
- "row1\nrow2",
- },
- {
- `<table>
- <tr><td>cell1-1</td><td>cell1-2</td></tr>
- <tr><td>cell2-1</td><td>cell2-2</td></tr>
- </table>`,
- "cell1-1 cell1-2\ncell2-1 cell2-2",
- },
- {
- "_<table><tr><td>cell</td></tr></table>_",
- "_\n\ncell\n\n_",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestStrippingLists(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<ul></ul>",
- "",
- },
- {
- "<ul><li>item</li></ul>_",
- "* item\n\n_",
- },
- {
- "<li class='123'>item 1</li> <li>item 2</li>\n_",
- "* item 1\n* item 2\n_",
- },
- {
- "<li>item 1</li> \t\n <li>item 2</li> <li> item 3</li>\n_",
- "* item 1\n* item 2\n* item 3\n_",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestLinks(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- `<a></a>`,
- ``,
- },
- {
- `<a href=""></a>`,
- ``,
- },
- {
- `<a href="http://example.com/"></a>`,
- `( http://example.com/ )`,
- },
- {
- `<a href="">Link</a>`,
- `Link`,
- },
- {
- `<a href="http://example.com/">Link</a>`,
- `Link ( http://example.com/ )`,
- },
- {
- `<a href="http://example.com/"><span class="a">Link</span></a>`,
- `Link ( http://example.com/ )`,
- },
- {
- "<a href='http://example.com/'>\n\t<span class='a'>Link</span>\n\t</a>",
- `Link ( http://example.com/ )`,
- },
- {
- "<a href='mailto:contact@example.org'>Contact Us</a>",
- `Contact Us ( contact@example.org )`,
- },
- {
- "<a href=\"http://example.com:80/~user?aaa=bb&amp;c=d,e,f#foo\">Link</a>",
- `Link ( http://example.com:80/~user?aaa=bb&c=d,e,f#foo )`,
- },
- {
- "<a title='title' href=\"http://example.com/\">Link</a>",
- `Link ( http://example.com/ )`,
- },
- {
- "<a href=\" http://example.com/ \"> Link </a>",
- `Link ( http://example.com/ )`,
- },
- {
- "<a href=\"http://example.com/a/\">Link A</a> <a href=\"http://example.com/b/\">Link B</a>",
- `Link A ( http://example.com/a/ ) Link B ( http://example.com/b/ )`,
- },
- {
- "<a href=\"%%LINK%%\">Link</a>",
- `Link ( %%LINK%% )`,
- },
- {
- "<a href=\"[LINK]\">Link</a>",
- `Link ( [LINK] )`,
- },
- {
- "<a href=\"{LINK}\">Link</a>",
- `Link ( {LINK} )`,
- },
- {
- "<a href=\"[[!unsubscribe]]\">Link</a>",
- `Link ( [[!unsubscribe]] )`,
- },
- {
- "<p>This is <a href=\"http://www.google.com\" >link1</a> and <a href=\"http://www.google.com\" >link2 </a> is next.</p>",
- `This is link1 ( http://www.google.com ) and link2 ( http://www.google.com ) is next.`,
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestImageAltTags(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- `<img />`,
- ``,
- },
- {
- `<img src="http://example.ru/hello.jpg" />`,
- ``,
- },
- {
- `<img alt="Example"/>`,
- ``,
- },
- {
- `<img src="http://example.ru/hello.jpg" alt="Example"/>`,
- ``,
- },
- // Images do matter if they are in a link
- {
- `<a href="http://example.com/"><img src="http://example.ru/hello.jpg" alt="Example"/></a>`,
- `Example ( http://example.com/ )`,
- },
- {
- `<a href="http://example.com/"><img src="http://example.ru/hello.jpg" alt="Example"></a>`,
- `Example ( http://example.com/ )`,
- },
- {
- `<a href='http://example.com/'><img src='http://example.ru/hello.jpg' alt='Example'/></a>`,
- `Example ( http://example.com/ )`,
- },
- {
- `<a href='http://example.com/'><img src='http://example.ru/hello.jpg' alt='Example'></a>`,
- `Example ( http://example.com/ )`,
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestHeadings(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<h1>Test</h1>",
- "****\nTest\n****",
- },
- {
- "\t<h1>\nTest</h1> ",
- "****\nTest\n****",
- },
- {
- "\t<h1>\nTest line 1<br>Test 2</h1> ",
- "***********\nTest line 1\nTest 2\n***********",
- },
- {
- "<h1>Test</h1> <h1>Test</h1>",
- "****\nTest\n****\n\n****\nTest\n****",
- },
- {
- "<h2>Test</h2>",
- "----\nTest\n----",
- },
- {
- "<h1><a href='http://example.com/'>Test</a></h1>",
- "****************************\nTest ( http://example.com/ )\n****************************",
- },
- {
- "<h3> <span class='a'>Test </span></h3>",
- "Test\n----",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-
-}
-
-func TestBold(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<b>Test</b>",
- "*Test*",
- },
- {
- "\t<b>Test</b> ",
- "*Test*",
- },
- {
- "\t<b>Test line 1<br>Test 2</b> ",
- "*Test line 1\nTest 2*",
- },
- {
- "<b>Test</b> <b>Test</b>",
- "*Test* *Test*",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-
-}
-
-func TestDiv(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<div>Test</div>",
- "Test",
- },
- {
- "\t<div>Test</div> ",
- "Test",
- },
- {
- "<div>Test line 1<div>Test 2</div></div>",
- "Test line 1\nTest 2",
- },
- {
- "Test 1<div>Test 2</div> <div>Test 3</div>Test 4",
- "Test 1\nTest 2\nTest 3\nTest 4",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-
-}
-
-func TestBlockquotes(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<div>level 0<blockquote>level 1<br><blockquote>level 2</blockquote>level 1</blockquote><div>level 0</div></div>",
- "level 0\n> \n> level 1\n> \n>> level 2\n> \n> level 1\n\nlevel 0",
- },
- {
- "<blockquote>Test</blockquote>Test",
- "> \n> Test\n\nTest",
- },
- {
- "\t<blockquote> \nTest<br></blockquote> ",
- "> \n> Test\n>",
- },
- {
- "\t<blockquote> \nTest line 1<br>Test 2</blockquote> ",
- "> \n> Test line 1\n> Test 2",
- },
- {
- "<blockquote>Test</blockquote> <blockquote>Test</blockquote> Other Test",
- "> \n> Test\n\n> \n> Test\n\nOther Test",
- },
- {
- "<blockquote>Lorem ipsum Commodo id consectetur pariatur ea occaecat minim aliqua ad sit consequat quis ex commodo Duis incididunt eu mollit consectetur fugiat voluptate dolore in pariatur in commodo occaecat Ut occaecat velit esse labore aute quis commodo non sit dolore officia Excepteur cillum amet cupidatat culpa velit labore ullamco dolore mollit elit in aliqua dolor irure do</blockquote>",
- "> \n> Lorem ipsum Commodo id consectetur pariatur ea occaecat minim aliqua ad\n> sit consequat quis ex commodo Duis incididunt eu mollit consectetur fugiat\n> voluptate dolore in pariatur in commodo occaecat Ut occaecat velit esse\n> labore aute quis commodo non sit dolore officia Excepteur cillum amet\n> cupidatat culpa velit labore ullamco dolore mollit elit in aliqua dolor\n> irure do",
- },
- {
- "<blockquote>Lorem<b>ipsum</b><b>Commodo</b><b>id</b><b>consectetur</b><b>pariatur</b><b>ea</b><b>occaecat</b><b>minim</b><b>aliqua</b><b>ad</b><b>sit</b><b>consequat</b><b>quis</b><b>ex</b><b>commodo</b><b>Duis</b><b>incididunt</b><b>eu</b><b>mollit</b><b>consectetur</b><b>fugiat</b><b>voluptate</b><b>dolore</b><b>in</b><b>pariatur</b><b>in</b><b>commodo</b><b>occaecat</b><b>Ut</b><b>occaecat</b><b>velit</b><b>esse</b><b>labore</b><b>aute</b><b>quis</b><b>commodo</b><b>non</b><b>sit</b><b>dolore</b><b>officia</b><b>Excepteur</b><b>cillum</b><b>amet</b><b>cupidatat</b><b>culpa</b><b>velit</b><b>labore</b><b>ullamco</b><b>dolore</b><b>mollit</b><b>elit</b><b>in</b><b>aliqua</b><b>dolor</b><b>irure</b><b>do</b></blockquote>",
- "> \n> Lorem *ipsum* *Commodo* *id* *consectetur* *pariatur* *ea* *occaecat* *minim*\n> *aliqua* *ad* *sit* *consequat* *quis* *ex* *commodo* *Duis* *incididunt* *eu*\n> *mollit* *consectetur* *fugiat* *voluptate* *dolore* *in* *pariatur* *in* *commodo*\n> *occaecat* *Ut* *occaecat* *velit* *esse* *labore* *aute* *quis* *commodo*\n> *non* *sit* *dolore* *officia* *Excepteur* *cillum* *amet* *cupidatat* *culpa*\n> *velit* *labore* *ullamco* *dolore* *mollit* *elit* *in* *aliqua* *dolor* *irure*\n> *do*",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-
-}
-
-func TestIgnoreStylesScriptsHead(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {
- "<style>Test</style>",
- "",
- },
- {
- "<style type=\"text/css\">body { color: #fff; }</style>",
- "",
- },
- {
- "<link rel=\"stylesheet\" href=\"main.css\">",
- "",
- },
- {
- "<script>Test</script>",
- "",
- },
- {
- "<script src=\"main.js\"></script>",
- "",
- },
- {
- "<script type=\"text/javascript\" src=\"main.js\"></script>",
- "",
- },
- {
- "<script type=\"text/javascript\">Test</script>",
- "",
- },
- {
- "<script type=\"text/ng-template\" id=\"template.html\"><a href=\"http://google.com\">Google</a></script>",
- "",
- },
- {
- "<script type=\"bla-bla-bla\" id=\"template.html\">Test</script>",
- "",
- },
- {
- `<html><head><title>Title</title></head><body></body></html>`,
- "",
- },
- }
-
- for _, testCase := range testCases {
- assertString(t, testCase.input, testCase.output)
- }
-}
-
-func TestText(t *testing.T) {
- testCases := []struct {
- input string
- expr string
- }{
- {
- `<li>
- <a href="/new" data-ga-click="Header, create new repository, icon:repo"><span class="octicon octicon-repo"></span> New repository</a>
- </li>`,
- `\* New repository \( /new \)`,
- },
- {
- `hi
-
- <br>
-
- hello <a href="https://google.com">google</a>
- <br><br>
- test<p>List:</p>
-
- <ul>
- <li><a href="foo">Foo</a></li>
- <li><a href="http://www.microshwhat.com/bar/soapy">Barsoap</a></li>
- <li>Baz</li>
- </ul>
-`,
- `hi
-hello google \( https://google.com \)
-
-test
-
-List:
-
-\* Foo \( foo \)
-\* Barsoap \( http://www.microshwhat.com/bar/soapy \)
-\* Baz`,
- },
- // Malformed input html.
- {
- `hi
-
- hello <a href="https://google.com">google</a>
-
- test<p>List:</p>
-
- <ul>
- <li><a href="foo">Foo</a>
- <li><a href="/
- bar/baz">Bar</a>
- <li>Baz</li>
- </ul>
- `,
- `hi hello google \( https://google.com \) test
-
-List:
-
-\* Foo \( foo \)
-\* Bar \( /\n[ \t]+bar/baz \)
-\* Baz`,
- },
- }
-
- for _, testCase := range testCases {
- assertRegexp(t, testCase.input, testCase.expr)
- }
-}
-
-type StringMatcher interface {
- MatchString(string) bool
- String() string
-}
-
-type RegexpStringMatcher string
-
-func (m RegexpStringMatcher) MatchString(str string) bool {
- return regexp.MustCompile(string(m)).MatchString(str)
-}
-func (m RegexpStringMatcher) String() string {
- return string(m)
-}
-
-type ExactStringMatcher string
-
-func (m ExactStringMatcher) MatchString(str string) bool {
- return string(m) == str
-}
-func (m ExactStringMatcher) String() string {
- return string(m)
-}
-
-func assertRegexp(t *testing.T, input string, outputRE string) {
- assertPlaintext(t, input, RegexpStringMatcher(outputRE))
-}
-
-func assertString(t *testing.T, input string, output string) {
- assertPlaintext(t, input, ExactStringMatcher(output))
-}
-
-func assertPlaintext(t *testing.T, input string, matcher StringMatcher) {
- text, err := FromString(input)
- if err != nil {
- t.Error(err)
- }
- if !matcher.MatchString(text) {
- t.Errorf("Input did not match expression\n"+
- "Input:\n>>>>\n%s\n<<<<\n\n"+
- "Output:\n>>>>\n%s\n<<<<\n\n"+
- "Expected output:\n>>>>\n%s\n<<<<\n\n",
- input, text, matcher.String())
- } else {
- t.Logf("input:\n\n%s\n\n\n\noutput:\n\n%s\n", input, text)
- }
-}
-
-func Example() {
- inputHtml := `
- <html>
- <head>
- <title>My Mega Service</title>
- <link rel=\"stylesheet\" href=\"main.css\">
- <style type=\"text/css\">body { color: #fff; }</style>
- </head>
-
- <body>
- <div class="logo">
- <a href="http://mymegaservice.com/"><img src="/logo-image.jpg" alt="Mega Service"/></a>
- </div>
-
- <h1>Welcome to your new account on my service!</h1>
-
- <p>
- Here is some more information:
-
- <ul>
- <li>Link 1: <a href="https://example.com">Example.com</a></li>
- <li>Link 2: <a href="https://example2.com">Example2.com</a></li>
- <li>Something else</li>
- </ul>
- </p>
- </body>
- </html>
- `
-
- text, err := FromString(inputHtml)
- if err != nil {
- panic(err)
- }
- fmt.Println(text)
-
- // Output:
- // Mega Service ( http://mymegaservice.com/ )
- //
- // ******************************************
- // Welcome to your new account on my service!
- // ******************************************
- //
- // Here is some more information:
- //
- // * Link 1: Example.com ( https://example.com )
- // * Link 2: Example2.com ( https://example2.com )
- // * Something else
-}
diff --git a/vendor/github.com/mattermost/html2text/testdata/utf8.html b/vendor/github.com/mattermost/html2text/testdata/utf8.html
deleted file mode 100755
index 53d401ce9..000000000
--- a/vendor/github.com/mattermost/html2text/testdata/utf8.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>学习之é“:美国公认学习第一书title</title>
- <link href="stylesheet.css" rel="stylesheet" type="text/css" />
- <link href="page_styles.css" rel="stylesheet" type="text/css" />
-</head>
-
-<body class="calibre">
- <p id="filepos9452" class="calibre_"><span class="calibre6"><span class="bold">写在å‰é¢çš„è¯</span></span>
- </p>
- <p class="calibre_12">在å°æ¹¾çš„那次世界冠军赛上,我几近疯狂,直至两年åŽçš„今天,我ä»æ²‰æµ¸åœ¨è¿™æ¬¡çš„ç»åŽ†ä¸­ã€‚这是我生平第一次如此深入地审视我自己,甚至是第一次å°è¯•å®¡è§†è‡ªå·±ã€‚这个过程令人很是兴奋,åŒæ—¶ä¹Ÿæœ‰ç‚¹æ„Ÿè§‰æ€ªå¼‚。我é‡æ–°è®¤è¯†äº†è‡ªæˆ‘,看到了自己的å¦å¤–一é¢ï¼Œè‡ªå·±ä»Žæœªå‘觉的å¦å¤–一é¢ã€‚为了生存,为了å–胜,我æˆäº†ä¸€å角斗士,彻头彻尾,简å•çº¯ç²¹ã€‚我并没有æ„识到这一角色早已在我的心中生根å‘芽,呼之欲出。也许,他的出现已是ä¸å¯é¿å…。</p>
- <p class="calibre_7">而我这全新的一é¢ï¼Œä¸Žæˆ‘一直熟识的那个乔希,那个曾ç»å®³æ€•é»‘æš—çš„å­©å­ï¼Œé‚£ä¸ªè±¡æ£‹æ‰‹ï¼Œé‚£ä¸ªç‹‚热于雨水ã€åå¤è¯µè¯»æ°å…‹Â·å…‹é²äºšå…‹ä½œå“的年轻人之间,åˆæœ‰ä»€ä¹ˆæ ·çš„è”系呢?这些都是我正在努力弄清楚的问题。</p>
- <p class="calibre_7">自å°æ¹¾èµ›äº‹ä¹‹åŽï¼Œæˆ‘急切éžå¸¸ï¼Œä¸€å¿ƒæƒ³è¦å›žåˆ°è®­ç»ƒä¸­åŽ»ï¼Œæ‘†è„±è‡ªå·±å·²ç»è¾¾åˆ°å·…峰的想法。在过去的两年中,我已ç»é‡æ–°å¼€å§‹ã€‚这是一个新的起点。å‰æ–¹çš„路还很长,有待进一步的探索。</p>
- <p class="calibre_7">这本书的创作耗费了相当多的时间和精力。在æˆé•¿çš„过程中,我在我的å°æˆ¿é—´é‡Œä»Žæœªæƒ³è¿‡ç­‰å¾…我的会是这样的战斗。在创作中,我的æ€æƒ³é€æ¸æˆç†Ÿï¼›çˆ±æ‹ä»Žåˆ†å´©ç¦»æžï¼Œåˆ°å¤±è€Œå¤å¾—,世界冠军头衔从失之交臂,到囊中å–物。如果说在我人生的第一个二åä¹å¹´ä¸­ï¼Œæˆ‘学到了什么,那就是,我们永远无法预测结局,无论是é‡è¦çš„比赛ã€å†’险,还是轰轰烈烈的爱情。我们唯一å¯ä»¥è‚¯å®šçš„åªæœ‰ï¼Œå‡ºä¹Žæ„料。ä¸ç®¡æˆ‘们åšäº†å¤šä¹ˆä¸‡å…¨çš„准备,在生活的真实场景中,我们总是会处于陌生的境地。我们也许会无法冷é™ï¼Œå¤±åŽ»ç†æ™ºï¼Œæ„Ÿè§‰ä¼¼ä¹Žæ•´ä¸ªä¸–界都在针对我们。在这个时候,我们所è¦åšçš„是è¦ä»˜å‡ºåŠ å€çš„努力,è¦è¡¨çŽ°å¾—比预想得更好。我认为,关键在于准备好éšæœºåº”å˜ï¼Œå‡†å¤‡å¥½åœ¨æ‰€èƒ½æƒ³è±¡çš„高压下å‘挥出创造力。</p>
- <p class="calibre_7">读者朋å‹ä»¬ï¼Œæˆ‘éžå¸¸å¸Œæœ›ä½ ä»¬åœ¨è¯»è¿‡è¿™æœ¬ä¹¦åŽï¼Œå¯ä»¥å¾—到å¯å‘,甚至会得到触动,从而能够根æ®å„自的天赋与特长,去实现自己的梦想。这就是我写作此书的目的。我在字里行间所传达的ç†å¿µæ›¾ç»ä½¿æˆ‘å—益匪浅,我很希望它们å¯ä»¥ä¸ºå¤§å®¶æ供一个基本的框架和方å‘。如果我的方法言之有ç†ï¼Œé‚£ä¹ˆå°±è¯·æŽ¥å—它,ç¢ç£¨å®ƒï¼Œå¹¶åŠ ä¹‹è‡ªå·±çš„è§è§£ã€‚忘记我的那些数字。真正的掌æ¡éœ€è¦é€šè¿‡è‡ªå·±å‘现一些最能够引起共鸣的信æ¯ï¼Œå¹¶å°†å…¶å½»åº•åœ°èžåˆè¿›æ¥ï¼Œç›´è‡³æˆä¸ºä¸€ä½“,这样我们æ‰èƒ½éšå¿ƒæ‰€æ¬²åœ°é©¾é©­å®ƒã€‚</p>
- <div class="mbp_pagebreak" id="calibre_pb_4"></div>
-</body>
-
-</html> \ No newline at end of file
diff --git a/vendor/github.com/mattermost/html2text/testdata/utf8_with_bom.xhtml b/vendor/github.com/mattermost/html2text/testdata/utf8_with_bom.xhtml
deleted file mode 100755
index 68f0ee707..000000000
--- a/vendor/github.com/mattermost/html2text/testdata/utf8_with_bom.xhtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN">
-
-<head>
- <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
- <title>1892年波兰文版åºè¨€title</title>
- <link rel="stylesheet" href="css/stylesheet.css" type="text/css" />
-</head>
-
-<body>
- <div id="page30" />
- <h2 id="CHP2-6">1892年波兰文版åºè¨€<a id="wzyy_18_30" href="#wz_18_30"><sup>[18]</sup></a></h2>
- <p>出版共产主义宣言的一ç§æ–°çš„波兰文本已æˆä¸ºå¿…è¦ï¼Œè¿™ä¸€äº‹å®žï¼Œå¼•èµ·äº†è®¸å¤šæ„Ÿæƒ³ã€‚</p>
- <p>首先值得注æ„的是,近æ¥å®£è¨€åœ¨ä¸€å®šç¨‹åº¦ä¸Šå·²æˆä¸ºæ¬§æ´²å¤§é™†å¤§å·¥ä¸šå‘展的一ç§å°ºåº¦ã€‚一个国家的大工业越å‘展,该国工人中想认清自己作为工人阶级在有产阶级é¢å‰æ‰€å¤„地ä½çš„è¦æ±‚就越增加,他们中间的社会主义è¿åŠ¨ä¹Ÿè¶Šæ‰©å¤§ï¼Œå› è€Œå¯¹å®£è¨€çš„需求也越增长。这样,根æ®å®£è¨€ç”¨æŸå›½æ–‡å­—销行的份数,ä¸ä»…能够相当确切地断定该国工人è¿åŠ¨çš„状况,而且还能够相当确切地断定该国大工业å‘展的程度。</p>
- <p>因此,波兰文的新版本标志ç€æ³¢å…°å·¥ä¸šçš„决定性进步。从åå¹´å‰å‘表的上一个版本以æ¥ç¡®å®žæœ‰äº†è¿™ç§è¿›æ­¥ï¼Œå¯¹æ­¤ä¸æ¯«ä¸å®¹ç½®ç–‘。俄国的波兰,会议的波兰<a id="wzyy_19_30" href="#wz_19_30"><sup>[19]</sup></a>,æˆäº†ä¿„ç½—æ–¯å¸å›½å·¨å¤§çš„工业区。俄国大工业是零星分散的,一部分在芬兰湾沿岸,一部分在中央区(莫斯科和弗拉基米尔),第三部分在黑海和亚速海沿岸,还有å¦ä¸€äº›æ•£å¸ƒåœ¨åˆ«å¤„;而波兰工业则紧缩于相对狭å°çš„地区,享å—到由这ç§ç§¯èšå¼•èµ·çš„长处与短处。这ç§é•¿å¤„是竞争ç€çš„俄罗斯工厂主所承认的,他们è¦æ±‚实行ä¿æŠ¤å…³ç¨Žä»¥å¯¹ä»˜æ³¢å…°ï¼Œå°½ç®¡ä»–们渴望使波兰人俄罗斯化。这ç§çŸ­å¤„,对波兰工厂主与俄罗斯政府æ¥è¯´ï¼Œè¡¨çŽ°åœ¨ç¤¾ä¼šä¸»ä¹‰æ€æƒ³åœ¨æ³¢å…°å·¥äººä¸­é—´çš„迅速传播和对宣言需求的增长。</p>
- <p>但是,波兰工业的迅速å‘展——它超过了俄国工业——本身<a id="page31" />是波兰人民的åšå¼ºç”Ÿå‘½åŠ›çš„一个新è¯æ˜Žï¼Œæ˜¯æ³¢å…°äººæ°‘临近的民æ—å¤å…´çš„一个新ä¿è¯ã€‚而一个独立强盛的波兰的å¤å…´ï¼Œä¸åªæ˜¯ä¸€ä»¶åŒæ³¢å…°äººæœ‰å…³ã€è€Œä¸”是åŒæˆ‘们大家有关的事情。åªæœ‰å½“æ¯ä¸ªæ°‘æ—在自己内部完全自主时,欧洲å„æ°‘æ—间真诚的国际åˆä½œæ‰æ˜¯å¯èƒ½çš„。1848å¹´é©å‘½åœ¨æ— äº§é˜¶çº§æ——帜下,使无产阶级的战士最终åªä½œäº†èµ„产阶级的工作,这次é©å‘½é€šè¿‡è‡ªå·±é—嘱的执行者路易·波拿巴和俾斯麦也实现了æ„大利ã€å¾·å›½å’ŒåŒˆç‰™åˆ©çš„独立。然而波兰,它从1792年以æ¥ä¸ºé©å‘½åšçš„比所有这三个国家总共åšçš„还è¦å¤šï¼Œè€Œå½“它1863年失败于强大åå€çš„俄军的时候,人们å´æŠŠå®ƒæŠ›å¼ƒä¸é¡¾äº†ã€‚è´µæ—既未能ä¿æŒä½ã€ä¹Ÿæœªèƒ½é‡æ–°äº‰å¾—波兰的独立;今天波兰的独立对资产阶级至少是无所谓的。然而波兰的独立对于欧洲å„æ°‘æ—å’Œè°çš„åˆä½œæ˜¯å¿…需的。这ç§ç‹¬ç«‹åªæœ‰å¹´è½»çš„波兰无产阶级æ‰èƒ½äº‰å¾—,而且在它的手中会很好地ä¿æŒä½ã€‚因为欧洲所有其余的工人都象波兰工人自己一样也需è¦æ³¢å…°çš„独立。</p>
- <p>弗·æ©æ ¼æ–¯</p>
- <p>1892年2月10日于伦敦</p>
- <div id="page74" />
- <div><a id="wz_18_30" href="#wzyy_18_30">[18]</a> æ©æ ¼æ–¯ç”¨å¾·æ–‡ä¸ºã€Šå®£è¨€ã€‹æ–°çš„波兰文本写了这篇åºè¨€ã€‚1892年由波兰社会主义者在伦敦办的《黎明》æ‚志社出版。åºè¨€å¯„出åŽï¼Œæ©æ ¼æ–¯å†™ä¿¡ç»™é—¨å¾·å°”森(1892å¹´2月11日),信中说,他很愿æ„学会波兰文,并且深入研究波兰工人è¿åŠ¨çš„å‘展,以便能够为《宣言》的下一版写一篇更详细的åºè¨€ã€‚——第20页</div>
- <div><a id="wz_19_30" href="#wzyy_19_30">[19]</a> 指维也纳会议的波兰,å³æ ¹æ®1814—1815年维也纳会议的决定,以波兰王国的正å¼å义割给俄国的那部分波兰土地。——第20页</div>
-</body>
-
-</html> \ No newline at end of file
diff --git a/vendor/github.com/mattermost/rsc/.gitignore b/vendor/github.com/mattermost/rsc/.gitignore
deleted file mode 100644
index 00268614f..000000000
--- a/vendor/github.com/mattermost/rsc/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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
diff --git a/vendor/github.com/mattermost/rsc/README.md b/vendor/github.com/mattermost/rsc/README.md
deleted file mode 100644
index d110adfb2..000000000
--- a/vendor/github.com/mattermost/rsc/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-rsc
-===
-
-fork of Russ Cox's code.google.com/p/rsc \ No newline at end of file
diff --git a/vendor/github.com/mattermost/rsc/app/app.go b/vendor/github.com/mattermost/rsc/app/app.go
deleted file mode 100644
index d6db65dd4..000000000
--- a/vendor/github.com/mattermost/rsc/app/app.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package app
-
-import (
- "fmt"
- "net/http"
-
- "appengine"
- "appengine/memcache"
-
- _ "github.com/mattermost/rsc/appfs/server"
- _ "github.com/mattermost/rsc/blog/post"
-)
-
-func init() {
- http.HandleFunc("/admin/", Admin)
-}
-
-func Admin(w http.ResponseWriter, req *http.Request) {
- c := appengine.NewContext(req)
- switch req.FormValue("op") {
- default:
- fmt.Fprintf(w, "unknown op %s\n", req.FormValue("op"))
- case "memcache-get":
- key := req.FormValue("key")
- item, err := memcache.Get(c, key)
- if err != nil {
- fmt.Fprintf(w, "ERROR: %s\n", err)
- return
- }
- w.Write(item.Value)
- case "memcache-delete":
- key := req.FormValue("key")
- if err := memcache.Delete(c, key); err != nil {
- fmt.Fprintf(w, "ERROR: %s\n", err)
- return
- }
- fmt.Fprintf(w, "deleted %s\n", key)
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/app/app.yaml b/vendor/github.com/mattermost/rsc/app/app.yaml
deleted file mode 100644
index d45119345..000000000
--- a/vendor/github.com/mattermost/rsc/app/app.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-# mkapp
-# ~/pub/go_appengine/dev_appserver.py --high_replication tmp
-# ~/pub/go_appengine/appcfg.py update tmp
-
-application: rsc-swtch-app
-runtime: go
-version: test
-api_version: go1
-
-handlers:
-- url: /\.appfs.*
- script: _go_app
- secure: always
-- url: /draft(/.*)?
- script: _go_app
- login: required
-- url: /admin(/.*)?
- script: _go_app
- login: admin
-
-# MUST BE LAST
-- url: /.*
- script: _go_app
diff --git a/vendor/github.com/mattermost/rsc/app/index.yaml b/vendor/github.com/mattermost/rsc/app/index.yaml
deleted file mode 100644
index c94524657..000000000
--- a/vendor/github.com/mattermost/rsc/app/index.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-indexes:
-
-# AUTOGENERATED
-
-# This index.yaml is automatically updated whenever the dev_appserver
-# detects that a new type of query is run. If you want to manage the
-# index.yaml file manually, remove the above marker line (the line
-# saying "# AUTOGENERATED"). If you want to manage some indexes
-# manually, move them above the marker line. The index.yaml file is
-# automatically uploaded to the admin console when you next deploy
-# your application using appcfg.py.
-
-- kind: FileInfo
- ancestor: yes
- properties:
- - name: Path
diff --git a/vendor/github.com/mattermost/rsc/appfs/appfile/main.go b/vendor/github.com/mattermost/rsc/appfs/appfile/main.go
deleted file mode 100644
index 6d77df9aa..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/appfile/main.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2012 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 file.
-
-// appfile is a command-line interface to an appfs file system.
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "log"
- "os"
-
- "github.com/mattermost/rsc/appfs/client"
- "github.com/mattermost/rsc/keychain"
-)
-
-var c client.Client
-
-func init() {
- flag.StringVar(&c.Host, "h", "localhost:8080", "app serving host")
- flag.StringVar(&c.User, "u", "", "user name")
- flag.StringVar(&c.Password, "p", "", "password")
-}
-
-func usage() {
- fmt.Fprintf(os.Stderr, "usage: appfile [-h host] cmd args...\n")
- fmt.Fprintf(os.Stderr, "\n")
- fmt.Fprintf(os.Stderr, "Commands are:\n")
- for _, c := range cmd {
- fmt.Fprintf(os.Stderr, "\t%s\n", c.name)
- }
- os.Exit(2)
-}
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- args := flag.Args()
- if len(args) == 0 {
- usage()
- }
-
- if c.Password == "" {
- var err error
- c.User, c.Password, err = keychain.UserPasswd(c.Host, "")
- if err != nil {
- fmt.Fprintf(os.Stderr, "unable to obtain user and password: %s\n", err)
- os.Exit(2)
- }
- }
-
- name, args := args[0], args[1:]
- for _, c := range cmd {
- if name == c.name {
- switch c.arg {
- case 0, 1:
- if len(args) != c.arg {
- if c.arg == 0 {
- fmt.Fprintf(os.Stderr, "%s takes no arguments\n", name)
- os.Exit(2)
- }
- fmt.Fprintf(os.Stderr, "%s requires 1 argument\n", name)
- os.Exit(2)
- }
- case 2:
- if len(args) == 0 {
- fmt.Fprintf(os.Stderr, "%s requires at least 1 argument\n", name)
- os.Exit(2)
- }
- }
- c.fn(args)
- return
- }
- }
- fmt.Fprintf(os.Stderr, "unknown command %s\n", name)
- os.Exit(2)
-}
-
-var cmd = []struct {
- name string
- fn func([]string)
- arg int
-}{
- {"mkdir", mkdir, 2},
- {"write", write, 1},
- {"read", read, 2},
- {"mkfs", mkfs, 0},
- {"stat", stat, 2},
-}
-
-func mkdir(args []string) {
- for _, name := range args {
- if err := c.Create(name, true); err != nil {
- log.Printf("mkdir %s: %v", name, err)
- }
- }
-}
-
-func write(args []string) {
- name := args[0]
- data, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- log.Printf("reading stdin: %v", err)
- return
- }
- c.Create(name, false)
- if err := c.Write(name, data); err != nil {
- log.Printf("write %s: %v", name, err)
- }
-}
-
-func read(args []string) {
- for _, name := range args {
- fi, err := c.Stat(name)
- if err != nil {
- log.Printf("stat %s: %v", name, err)
- continue
- }
- if fi.IsDir {
- dirs, err := c.ReadDir(name)
- if err != nil {
- log.Printf("read %s: %v", name, err)
- continue
- }
- for _, fi := range dirs {
- fmt.Printf("%+v\n", *fi)
- }
- } else {
- data, err := c.Read(name)
- if err != nil {
- log.Printf("read %s: %v", name, err)
- continue
- }
- os.Stdout.Write(data)
- }
- }
-}
-
-func mkfs([]string) {
- if err := c.Mkfs(); err != nil {
- log.Printf("mkfs: %v", err)
- }
-}
-
-func stat(args []string) {
- for _, name := range args {
- fi, err := c.Stat(name)
- if err != nil {
- log.Printf("stat %s: %v", name, err)
- continue
- }
- fmt.Printf("%+v\n", *fi)
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/appfs/appmount/main.go b/vendor/github.com/mattermost/rsc/appfs/appmount/main.go
deleted file mode 100644
index 2c9f867d3..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/appmount/main.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright 2012 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 file.
-
-// appmount mounts an appfs file system.
-package main
-
-import (
- "bytes"
- "encoding/gob"
- "flag"
- "fmt"
- "log"
- "os"
- "os/exec"
- "path"
- "strings"
- "syscall"
- "time"
- "sync"
- "runtime"
-
- "github.com/mattermost/rsc/appfs/client"
- "github.com/mattermost/rsc/appfs/proto"
- "github.com/mattermost/rsc/fuse"
- "github.com/mattermost/rsc/keychain"
-)
-
-var usageMessage = `usage: appmount [-h host] [-u user] [-p password] /mnt
-
-Appmount mounts the appfs file system on the named mount point.
-
-The default host is localhost:8080.
-`
-
-// Shared between master and slave.
-var z struct {
- Client client.Client
- Debug *bool
- Mtpt string
-}
-
-var fc *fuse.Conn
-var cl = &z.Client
-
-func init() {
- flag.StringVar(&cl.Host, "h", "localhost:8080", "app serving host")
- flag.StringVar(&cl.User, "u", "", "user name")
- flag.StringVar(&cl.Password, "p", "", "password")
- z.Debug = flag.Bool("debug", false, "")
-}
-
-func usage() {
- fmt.Fprint(os.Stderr, usageMessage)
- os.Exit(2)
-}
-
-func main() {
- log.SetFlags(0)
-
- if len(os.Args) == 2 && os.Args[1] == "MOUNTSLAVE" {
- mountslave()
- return
- }
-
- flag.Usage = usage
- flag.Parse()
- args := flag.Args()
- if len(args) == 0 {
- usage()
- }
- z.Mtpt = args[0]
-
- if cl.Password == "" {
- var err error
- cl.User, cl.Password, err = keychain.UserPasswd(cl.Host, "")
- if err != nil {
- fmt.Fprintf(os.Stderr, "unable to obtain user and password: %s\n", err)
- os.Exit(2)
- }
- }
-
- if _, err := cl.Stat("/"); err != nil {
- log.Fatal(err)
- }
-
- // Run in child so that we can exit once child is running.
- r, w, err := os.Pipe()
- if err != nil {
- log.Fatal(err)
- }
-
- var buf bytes.Buffer
- enc := gob.NewEncoder(&buf)
- enc.Encode(&z)
-
- cmd := exec.Command(os.Args[0], "MOUNTSLAVE")
- cmd.Stdin = &buf
- cmd.Stdout = w
- cmd.Stderr = os.Stderr
- if err := cmd.Start(); err != nil {
- log.Fatalf("mount process: %v", err)
- }
- w.Close()
-
- ok := make([]byte, 10)
- n, _ := r.Read(ok)
- if n != 2 || string(ok[0:2]) != "OK" {
- os.Exit(1)
- }
-
- fmt.Fprintf(os.Stderr, "mounted on %s\n", z.Mtpt)
-}
-
-func mountslave() {
- stdout, _ := syscall.Dup(1)
- syscall.Dup2(2, 1)
-
- r := gob.NewDecoder(os.Stdin)
- if err := r.Decode(&z); err != nil {
- log.Fatalf("gob decode: %v", err)
- }
-
- fc, err := fuse.Mount(z.Mtpt)
- if err != nil {
- log.Fatal(err)
- }
- defer exec.Command("umount", z.Mtpt).Run()
-
- if *z.Debug {
- fuse.Debugf = log.Printf
- }
-
- syscall.Write(stdout, []byte("OK"))
- syscall.Close(stdout)
- fc.Serve(FS{})
-}
-
-type FS struct{}
-
-func (FS) Root() (fuse.Node, fuse.Error) {
- return file("/")
-}
-
-type File struct {
- Name string
- FileInfo *proto.FileInfo
- Data []byte
-}
-
-type statEntry struct {
- fi *proto.FileInfo
- err error
- t time.Time
-}
-
-var statCache struct {
- mu sync.Mutex
- m map[string] statEntry
-}
-
-func stat(name string) (*proto.FileInfo, error) {
- if runtime.GOOS == "darwin" && strings.Contains(name, "/._") {
- // Mac resource forks
- return nil, fmt.Errorf("file not found")
- }
- statCache.mu.Lock()
- e, ok := statCache.m[name]
- statCache.mu.Unlock()
- if ok && time.Since(e.t) < 2*time.Minute {
- return e.fi, e.err
- }
- fi, err := cl.Stat(name)
- saveStat(name, fi, err)
- return fi, err
-}
-
-func saveStat(name string, fi *proto.FileInfo, err error) {
- if *z.Debug {
-if fi != nil {
- fmt.Fprintf(os.Stderr, "savestat %s %+v\n", name, *fi)
-} else {
- fmt.Fprintf(os.Stderr, "savestat %s %v\n", name, err)
-}
- }
- statCache.mu.Lock()
- if statCache.m == nil {
- statCache.m = make(map[string]statEntry)
- }
- statCache.m[name] = statEntry{fi, err, time.Now()}
- statCache.mu.Unlock()
-}
-
-func delStat(name string) {
- statCache.mu.Lock()
- if statCache.m != nil {
- delete(statCache.m, name)
- }
- statCache.mu.Unlock()
-}
-
-func file(name string) (fuse.Node, fuse.Error) {
- fi, err := stat(name)
- if err != nil {
- if strings.Contains(err.Error(), "no such entity") {
- return nil, fuse.ENOENT
- }
- if *z.Debug {
- log.Printf("stat %s: %v", name, err)
- }
- return nil, fuse.EIO
- }
- return &File{name, fi, nil}, nil
-}
-
-func (f *File) Attr() (attr fuse.Attr) {
- fi := f.FileInfo
- attr.Mode = 0666
- if fi.IsDir {
- attr.Mode |= 0111 | os.ModeDir
- }
- attr.Mtime = fi.ModTime
- attr.Size = uint64(fi.Size)
- return
-}
-
-func (f *File) Lookup(name string, intr fuse.Intr) (fuse.Node, fuse.Error) {
- return file(path.Join(f.Name, name))
-}
-
-func (f *File) ReadAll(intr fuse.Intr) ([]byte, fuse.Error) {
- data, err := cl.Read(f.Name)
- if err != nil {
- log.Printf("read %s: %v", f.Name, err)
- return nil, fuse.EIO
- }
- return data, nil
-}
-
-func (f *File) ReadDir(intr fuse.Intr) ([]fuse.Dirent, fuse.Error) {
- fis, err := cl.ReadDir(f.Name)
- if err != nil {
- log.Printf("read %s: %v", f.Name, err)
- return nil, fuse.EIO
- }
- var dirs []fuse.Dirent
- for _, fi := range fis {
- saveStat(path.Join(f.Name, fi.Name), fi, nil)
- dirs = append(dirs, fuse.Dirent{Name: fi.Name})
- }
- return dirs, nil
-}
-
-func (f *File) WriteAll(data []byte, intr fuse.Intr) fuse.Error {
- defer delStat(f.Name)
- if err := cl.Write(f.Name[1:], data); err != nil {
- log.Printf("write %s: %v", f.Name, err)
- return fuse.EIO
- }
- return nil
-}
-
-func (f *File) Mkdir(req *fuse.MkdirRequest, intr fuse.Intr) (fuse.Node, fuse.Error) {
- defer delStat(f.Name)
- p := path.Join(f.Name, req.Name)
- if err := cl.Create(p[1:], true); err != nil {
- log.Printf("mkdir %s: %v", p, err)
- return nil, fuse.EIO
- }
- delStat(p)
- return file(p)
-}
-
-func (f *File) Create(req *fuse.CreateRequest, resp *fuse.CreateResponse, intr fuse.Intr) (fuse.Node, fuse.Handle, fuse.Error) {
- defer delStat(f.Name)
- p := path.Join(f.Name, req.Name)
- if err := cl.Create(p[1:], false); err != nil {
- log.Printf("create %s: %v", p, err)
- return nil, nil, fuse.EIO
- }
- delStat(p)
- n, err := file(p)
- if err != nil {
- return nil, nil, err
- }
- return n, n, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/appfs/client/client.go b/vendor/github.com/mattermost/rsc/appfs/client/client.go
deleted file mode 100644
index a1deb291d..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/client/client.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package client implements a basic appfs client.
-package client
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
- "time"
-
- "github.com/mattermost/rsc/appfs/proto"
-)
-
-type Client struct {
- Host string
- User string
- Password string
-}
-
-func (c *Client) url(op, path string) string {
- scheme := "https"
- if strings.HasPrefix(c.Host, "localhost:") {
- scheme = "http"
- }
- if strings.HasSuffix(op, "/") && strings.HasPrefix(path, "/") {
- path = path[1:]
- }
- return scheme + "://"+ c.User + ":" + c.Password + "@" + c.Host + op + path
-}
-
-func (c *Client) do(u string) error {
- _, err := c.get(u)
- return err
-}
-
-func (c *Client) get(u string) ([]byte, error) {
- tries := 0
- for {
- r, err := http.Get(u)
- if err != nil {
- return nil, err
- }
- defer r.Body.Close()
- data, err := ioutil.ReadAll(r.Body)
- if err != nil {
- return nil, err
- }
- if r.StatusCode != 200 {
- if r.StatusCode == 500 {
- if tries++; tries < 3 {
- fmt.Printf("%s %s; sleeping\n", r.Status, data)
- time.Sleep(5*time.Second)
- continue
- }
- }
- return nil, fmt.Errorf("%s %s", r.Status, data)
- }
- return data, nil
- }
- panic("unreachable")
-}
-
-func (c *Client) post(u string, data []byte) ([]byte, error) {
- tries := 0
- for {
- r, err := http.Post(u, proto.PostContentType, bytes.NewBuffer(data))
- if err != nil {
- return nil, err
- }
- defer r.Body.Close()
- rdata, err := ioutil.ReadAll(r.Body)
- if err != nil {
- return nil, err
- }
- if r.StatusCode != 200 {
- if r.StatusCode == 500 {
- if tries++; tries < 3 {
- fmt.Printf("%s %s; sleeping\n", r.Status, rdata)
- time.Sleep(5*time.Second)
- continue
- }
- }
- return nil, fmt.Errorf("%s %s", r.Status, rdata)
- }
- return rdata, nil
- }
- panic("unreachable")
-}
-
-func (c *Client) Create(path string, isdir bool) error {
- u := c.url(proto.CreateURL, path)
- if isdir {
- u += "?dir=1"
- }
- return c.do(u)
-}
-
-func (c *Client) Read(path string) ([]byte, error) {
- return c.get(c.url(proto.ReadURL, path))
-}
-
-func (c *Client) Write(path string, data []byte) error {
- u := c.url(proto.WriteURL, path)
- _, err := c.post(u, data)
- return err
-}
-
-func (c *Client) Mkfs() error {
- return c.do(c.url(proto.MkfsURL, ""))
-}
-
-func (c *Client) Stat(path string) (*proto.FileInfo, error) {
- data, err := c.get(c.url(proto.StatURL, path))
- if err != nil {
- return nil, err
- }
- var fi proto.FileInfo
- if err := json.Unmarshal(data, &fi); err != nil {
- return nil, err
- }
- return &fi, nil
-}
-
-func (c *Client) ReadDir(path string) ([]*proto.FileInfo, error) {
- data, err := c.Read(path)
- if err != nil {
- return nil, err
- }
- dec := json.NewDecoder(bytes.NewBuffer(data))
- var out []*proto.FileInfo
- for {
- var fi proto.FileInfo
- err := dec.Decode(&fi)
- if err == io.EOF {
- break
- }
- if err != nil {
- return out, err
- }
- out = append(out, &fi)
- }
- return out, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/appfs/fs/fs.go b/vendor/github.com/mattermost/rsc/appfs/fs/fs.go
deleted file mode 100644
index ac6657393..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/fs/fs.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package fs is an indirection layer, allowing code to use a
-// file system without knowing whether it is the host file system
-// (running without App Engine) or the datastore-based app
-// file system (running on App Engine).
-//
-// When compiled locally, fs refers to files in the local file system,
-// and the cache saves nothing.
-//
-// When compiled for App Engine, fs uses the appfs file system
-// and the memcache-based cache.
-package fs
-
-import (
- "bytes"
- "encoding/gob"
- "fmt"
- "io"
- "log"
- "net/http"
- "os"
- "time"
-
- "github.com/mattermost/rsc/appfs/proto"
-)
-
-type AppEngine interface {
- NewContext(req *http.Request) interface{}
- CacheRead(ctxt interface{}, name, path string) (key interface{}, data []byte, found bool)
- CacheWrite(ctxt, key interface{}, data []byte)
- Read(ctxt interface{}, path string) ([]byte, *proto.FileInfo, error)
- Write(ctxt interface{}, path string, data []byte) error
- Remove(ctxt interface{}, path string) error
- Mkdir(ctxt interface{}, path string) error
- ReadDir(ctxt interface{}, path string) ([]proto.FileInfo, error)
- Criticalf(ctxt interface{}, format string, args ...interface{})
- User(ctxt interface{}) string
-}
-
-var ae AppEngine
-
-func Register(impl AppEngine) {
- ae = impl
-}
-
-// Root is the root of the local file system. It has no effect on App Engine.
-var Root = "."
-
-// A Context is an opaque context that is needed to perform file system
-// operations. Each context is associated with a single HTTP request.
-type Context struct {
- context
- ae interface{}
-}
-
-// NewContext returns a context associated with the given HTTP request.
-func NewContext(req *http.Request) *Context {
- if ae != nil {
- ctxt := ae.NewContext(req)
- return &Context{ae: ctxt}
- }
- return newContext(req)
-}
-
-// A CacheKey is an opaque cache key that can be used to store new entries
-// in the cache. To ensure that the cache remains consistent with the underlying
-// file system, the correct procedure is:
-//
-// 1. Use CacheRead (or CacheLoad) to attempt to load the entry. If it succeeds, use it.
-// If not, continue, saving the CacheKey.
-//
-// 2. Read from the file system and construct the entry that would have
-// been in the cache. In order to be consistent, all the file system reads
-// should only refer to parts of the file system in the tree rooted at the path
-// passed to CacheRead.
-//
-// 3. Save the entry using CacheWrite (or CacheStore), using the key that was
-// created by the CacheRead (or CacheLoad) executed before reading from the
-// file system.
-//
-type CacheKey struct {
- cacheKey
- ae interface{}
-}
-
-// CacheRead reads from cache the entry with the given name and path.
-// The path specifies the scope of information stored in the cache entry.
-// An entry is invalidated by a write to any location in the file tree rooted at path.
-// The name is an uninterpreted identifier to distinguish the cache entry
-// from other entries using the same path.
-//
-// If it finds a cache entry, CacheRead returns the data and found=true.
-// If it does not find a cache entry, CacheRead returns data=nil and found=false.
-// Either way, CacheRead returns an appropriate cache key for storing to the
-// cache entry using CacheWrite.
-func (c *Context) CacheRead(name, path string) (ckey CacheKey, data []byte, found bool) {
- if ae != nil {
- key, data, found := ae.CacheRead(c.ae, name, path)
- return CacheKey{ae: key}, data, found
- }
- return c.cacheRead(ckey, path)
-}
-
-// CacheLoad uses CacheRead to load gob-encoded data and decodes it into value.
-func (c *Context) CacheLoad(name, path string, value interface{}) (ckey CacheKey, found bool) {
- ckey, data, found := c.CacheRead(name, path)
- if found {
- if err := gob.NewDecoder(bytes.NewBuffer(data)).Decode(value); err != nil {
- c.Criticalf("gob Decode: %v", err)
- found = false
- }
- }
- return
-}
-
-// CacheWrite writes an entry to the cache with the given key, path, and data.
-// The cache entry will be invalidated the next time the file tree rooted at path is
-// modified in anyway.
-func (c *Context) CacheWrite(ckey CacheKey, data []byte) {
- if ae != nil {
- ae.CacheWrite(c.ae, ckey.ae, data)
- return
- }
- c.cacheWrite(ckey, data)
-}
-
-// CacheStore uses CacheWrite to save the gob-encoded form of value.
-func (c *Context) CacheStore(ckey CacheKey, value interface{}) {
- var buf bytes.Buffer
- if err := gob.NewEncoder(&buf).Encode(value); err != nil {
- c.Criticalf("gob Encode: %v", err)
- return
- }
- c.CacheWrite(ckey, buf.Bytes())
-}
-
-// Read returns the data associated with the file named by path.
-// It is a copy and can be modified without affecting the file.
-func (c *Context) Read(path string) ([]byte, *proto.FileInfo, error) {
- if ae != nil {
- return ae.Read(c.ae, path)
- }
- return c.read(path)
-}
-
-// Write replaces the data associated with the file named by path.
-func (c *Context) Write(path string, data []byte) error {
- if ae != nil {
- return ae.Write(c.ae, path, data)
- }
- return c.write(path, data)
-}
-
-// Remove removes the file named by path.
-func (c *Context) Remove(path string) error {
- if ae != nil {
- return ae.Remove(c.ae, path)
- }
- return c.remove(path)
-}
-
-// Mkdir creates a directory with the given path.
-// If the path already exists and is a directory, Mkdir returns no error.
-func (c *Context) Mkdir(path string) error {
- if ae != nil {
- return ae.Mkdir(c.ae, path)
- }
- return c.mkdir(path)
-}
-
-// ReadDir returns the contents of the directory named by the path.
-func (c *Context) ReadDir(path string) ([]proto.FileInfo, error) {
- if ae != nil {
- return ae.ReadDir(c.ae, path)
- }
- return c.readdir(path)
-}
-
-// ServeFile serves the named file as the response to the HTTP request.
-func (c *Context) ServeFile(w http.ResponseWriter, req *http.Request, name string) {
- root := &httpFS{c, name}
- http.FileServer(root).ServeHTTP(w, req)
-}
-
-// Criticalf logs the message at critical priority.
-func (c *Context) Criticalf(format string, args ...interface{}) {
- if ae != nil {
- ae.Criticalf(c.ae, format, args...)
- }
- log.Printf(format, args...)
-}
-
-// User returns the name of the user running the request.
-func (c *Context) User() string {
- if ae != nil {
- return ae.User(c.ae)
- }
- return os.Getenv("USER")
-}
-
-type httpFS struct {
- c *Context
- name string
-}
-
-type httpFile struct {
- data []byte
- fi *proto.FileInfo
- off int
-}
-
-func (h *httpFS) Open(_ string) (http.File, error) {
- data, fi, err := h.c.Read(h.name)
- if err != nil {
- return nil, err
- }
- return &httpFile{data, fi, 0}, nil
-}
-
-func (f *httpFile) Close() error {
- return nil
-}
-
-type fileInfo struct {
- p *proto.FileInfo
-}
-
-func (f *fileInfo) IsDir() bool { return f.p.IsDir }
-func (f *fileInfo) Name() string { return f.p.Name }
-func (f *fileInfo) ModTime() time.Time { return f.p.ModTime }
-func (f *fileInfo) Size() int64 { return f.p.Size }
-func (f *fileInfo) Sys() interface{} { return f.p }
-func (f *fileInfo) Mode() os.FileMode {
- if f.p.IsDir {
- return os.ModeDir | 0777
- }
- return 0666
-}
-
-func (f *httpFile) Stat() (os.FileInfo, error) {
- return &fileInfo{f.fi}, nil
-}
-
-func (f *httpFile) Readdir(count int) ([]os.FileInfo, error) {
- return nil, fmt.Errorf("no directory")
-}
-
-func (f *httpFile) Read(data []byte) (int, error) {
- if f.off >= len(f.data) {
- return 0, io.EOF
- }
- n := copy(data, f.data[f.off:])
- f.off += n
- return n, nil
-}
-
-func (f *httpFile) Seek(offset int64, whence int) (int64, error) {
- off := int(offset)
- if int64(off) != offset {
- return 0, fmt.Errorf("invalid offset")
- }
- switch whence {
- case 1:
- off += f.off
- case 2:
- off += len(f.data)
- }
- f.off = off
- return int64(off), nil
-}
diff --git a/vendor/github.com/mattermost/rsc/appfs/fs/local.go b/vendor/github.com/mattermost/rsc/appfs/fs/local.go
deleted file mode 100644
index c78b35b64..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/fs/local.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012 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 file.
-
-package fs
-
-import (
- "io/ioutil"
- "net/http"
- "os"
- "path/filepath"
-
- "github.com/mattermost/rsc/appfs/proto"
-)
-
-type context struct{}
-
-type cacheKey struct{}
-
-func newContext(req *http.Request) *Context {
- return &Context{}
-}
-
-func (*context) cacheRead(ckey CacheKey, path string) (CacheKey, []byte, bool) {
- return ckey, nil, false
-}
-
-func (*context) cacheWrite(ckey CacheKey, data []byte) {
-}
-
-func (*context) read(path string) ([]byte, *proto.FileInfo, error) {
- p := filepath.Join(Root, path)
- dir, err := os.Stat(p)
- if err != nil {
- return nil, nil, err
- }
- fi := &proto.FileInfo{
- Name: dir.Name(),
- ModTime: dir.ModTime(),
- Size: dir.Size(),
- IsDir: dir.IsDir(),
- }
- data, err := ioutil.ReadFile(p)
- return data, fi, err
-}
-
-func (*context) write(path string, data []byte) error {
- p := filepath.Join(Root, path)
- return ioutil.WriteFile(p, data, 0666)
-}
-
-func (*context) remove(path string) error {
- p := filepath.Join(Root, path)
- return os.Remove(p)
-}
-
-func (*context) mkdir(path string) error {
- p := filepath.Join(Root, path)
- fi, err := os.Stat(p)
- if err == nil && fi.IsDir() {
- return nil
- }
- return os.Mkdir(p, 0777)
-}
-
-func (*context) readdir(path string) ([]proto.FileInfo, error) {
- p := filepath.Join(Root, path)
- dirs, err := ioutil.ReadDir(p)
- if err != nil {
- return nil, err
- }
- var out []proto.FileInfo
- for _, dir := range dirs {
- out = append(out, proto.FileInfo{
- Name: dir.Name(),
- ModTime: dir.ModTime(),
- Size: dir.Size(),
- IsDir: dir.IsDir(),
- })
- }
- return out, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/appfs/proto/data.go b/vendor/github.com/mattermost/rsc/appfs/proto/data.go
deleted file mode 100644
index ac15411a8..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/proto/data.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package proto defines the protocol between appfs client and server.
-package proto
-
-import "time"
-
-// An Auth appears, JSON-encoded, as the X-Appfs-Auth header line,
-// to authenticate a request made to the file server.
-// The authentication scheme could be made more sophisticated, but since
-// we are already forcing the use of TLS, a plain password is fine for now.
-type Auth struct {
- Password string
-}
-
-// GET /.appfs/stat/path returns the metadata for a file or directory,
-// a JSON-encoded FileInfo.
-const StatURL = "/.appfs/stat/"
-
-// GET /.appfs/read/path returns the content of the file or directory.
-// The body of the response is the raw file or directory content.
-// The content of a directory is a sequence of JSON-encoded FileInfo.
-const ReadURL = "/.appfs/read/"
-
-// POST to /.appfs/write/path writes new data to a file.
-// The X-Appfs-SHA1 header is the SHA1 hash of the data.
-// The body of the request is the raw file content.
-const WriteURL = "/.appfs/write/"
-
-// POST to /.appfs/mount initializes the file system if it does not
-// yet exist in the datastore.
-const MkfsURL = "/.appfs/mkfs"
-
-// POST to /.appfs/create/path creates a new file or directory.
-// The named path must not already exist; its parent must exist.
-// The query parameter dir=1 indicates that a directory should be created.
-const CreateURL = "/.appfs/create/"
-
-// POST to /.appfs/remove/path removes the file or directory.
-// A directory must be empty to be removed.
-const RemoveURL = "/.appfs/remove/"
-
-// A FileInfo is a directory entry.
-type FileInfo struct {
- Name string // final path element
- ModTime time.Time
- Size int64
- IsDir bool
-}
-
-// PostContentType is the Content-Type for POSTed data.
-// There is no encoding or framing: it is just raw data bytes.
-const PostContentType = "x-appfs/raw"
diff --git a/vendor/github.com/mattermost/rsc/appfs/server/app.go b/vendor/github.com/mattermost/rsc/appfs/server/app.go
deleted file mode 100644
index 9486eac41..000000000
--- a/vendor/github.com/mattermost/rsc/appfs/server/app.go
+++ /dev/null
@@ -1,982 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package server implements an appfs server backed by the
-// App Engine datastore.
-package server
-
-import (
- "bytes"
- "crypto/sha1"
- "encoding/base64"
- "encoding/json"
- "errors"
- "fmt"
- "io/ioutil"
- "net/http"
- "path"
- "strconv"
- "strings"
- "time"
-
- "appengine"
- "appengine/datastore"
- "appengine/memcache"
- "appengine/user"
-
- "github.com/mattermost/rsc/appfs/fs"
- "github.com/mattermost/rsc/appfs/proto"
-)
-
-const pwFile = "/.password"
-var chatty = false
-
-func init() {
- handle(proto.ReadURL, (*request).read)
- handle(proto.WriteURL, (*request).write)
- handle(proto.StatURL, (*request).stat)
- handle(proto.MkfsURL, (*request).mkfs)
- handle(proto.CreateURL, (*request).create)
- handle(proto.RemoveURL, (*request).remove)
-}
-
-type request struct {
- w http.ResponseWriter
- req *http.Request
- c appengine.Context
- name string
- mname string
- key *datastore.Key
-}
-
-func auth(r *request) bool {
- hdr := r.req.Header.Get("Authorization")
- if !strings.HasPrefix(hdr, "Basic ") {
- return false
- }
- data, err := base64.StdEncoding.DecodeString(hdr[6:])
- if err != nil {
- return false
- }
- i := bytes.IndexByte(data, ':')
- if i < 0 {
- return false
- }
- user, passwd := string(data[:i]), string(data[i+1:])
-
- _, data, err = read(r.c, pwFile)
- if err != nil {
- r.c.Errorf("reading %s: %v", pwFile, err)
- if _, err := mkfs(r.c); err != nil {
- r.c.Errorf("creating fs: %v", err)
- }
- _, data, err = read(r.c, pwFile)
- if err != nil {
- r.c.Errorf("reading %s again: %v", pwFile, err)
- return false
- }
- }
-
- lines := strings.Split(string(data), "\n")
- for _, line := range lines {
- if strings.HasPrefix(line, "#") {
- continue
- }
- f := strings.Fields(line)
- if len(f) < 3 {
- continue
- }
- if f[0] == user {
- return hash(f[1]+passwd) == f[2]
- }
- }
- return false
-}
-
-func hash(s string) string {
- h := sha1.New()
- h.Write([]byte(s))
- return fmt.Sprintf("%x", h.Sum(nil))
-}
-
-func handle(prefix string, f func(*request)) {
- http.HandleFunc(prefix, func(w http.ResponseWriter, req *http.Request) {
- c := appengine.NewContext(req)
- r := &request{
- w: w,
- req: req,
- c: c,
- }
-
- if strings.HasSuffix(prefix, "/") {
- r.name, r.mname, r.key = mangle(c, req.URL.Path[len(prefix)-1:])
- } else {
- req.URL.Path = "/"
- }
- defer func() {
- if err := recover(); err != nil {
- w.WriteHeader(http.StatusConflict)
- fmt.Fprintf(w, "%s\n", err)
- }
- }()
-
- if !auth(r) {
- w.Header().Set("WWW-Authenticate", "Basic realm=\"appfs\"")
- http.Error(w, "Need auth", http.StatusUnauthorized)
- return
- }
-
- f(r)
- })
-}
-
-func mangle(c appengine.Context, name string) (string, string, *datastore.Key) {
- name = path.Clean("/" + name)
- n := strings.Count(name, "/")
- if name == "/" {
- n = 0
- }
- mname := fmt.Sprintf("%d%s", n, name)
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- key := datastore.NewKey(c, "FileInfo", mname, 0, root)
- return name, mname, key
-}
-
-type FileInfo struct {
- Path string // mangled path
- Name string
- Qid int64 // assigned unique id number
- Seq int64 // modification sequence number in file tree
- ModTime time.Time
- Size int64
- IsDir bool
-}
-
-type FileData struct {
- Data []byte
-}
-
-func stat(c appengine.Context, name string) (*FileInfo, error) {
- var fi FileInfo
- name, _, key := mangle(c, name)
- c.Infof("DATASTORE Stat %q", name)
- err := datastore.Get(c, key, &fi)
- if err != nil {
- return nil, err
- }
- return &fi, nil
-}
-
-func (r *request) saveStat(fi *FileInfo) {
- jfi, err := json.Marshal(&fi)
- if err != nil {
- panic(err)
- }
- r.w.Header().Set("X-Appfs-Stat", string(jfi))
-}
-
-func (r *request) tx(f func(c appengine.Context) error) {
- err := datastore.RunInTransaction(r.c, f, &datastore.TransactionOptions{XG: true})
- if err != nil {
- panic(err)
- }
-}
-
-func (r *request) stat() {
- var fi *FileInfo
- r.tx(func(c appengine.Context) error {
- fi1, err := stat(c, r.name)
- if err != nil {
- return err
- }
- fi = fi1
- return nil
- })
-
- jfi, err := json.Marshal(&fi)
- if err != nil {
- panic(err)
- }
- r.w.Write(jfi)
-}
-
-func read(c appengine.Context, name string) (fi *FileInfo, data []byte, err error) {
- name, _, _ = mangle(c, name)
- fi1, err := stat(c, name)
- if err != nil {
- return nil, nil, err
- }
- if fi1.IsDir {
- dt, err := readdir(c, name)
- if err != nil {
- return nil, nil, err
- }
- fi = fi1
- data = dt
- return fi, data, nil
- }
-
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- dkey := datastore.NewKey(c, "FileData", "", fi1.Qid, root)
- var fd FileData
- c.Infof("DATASTORE Read %q", name)
- if err := datastore.Get(c, dkey, &fd); err != nil {
- return nil, nil, err
- }
- fi = fi1
- data = fd.Data
- return fi, data, nil
-}
-
-func (r *request) read() {
- var (
- fi *FileInfo
- data []byte
- )
- r.tx(func(c appengine.Context) error {
- var err error
- fi, data, err = read(r.c, r.name)
- return err
- })
- r.saveStat(fi)
- r.w.Write(data)
-}
-
-func readdir(c appengine.Context, name string) ([]byte, error) {
- name, _, _ = mangle(c, name)
- var buf bytes.Buffer
-
- n := strings.Count(name, "/")
- if name == "/" {
- name = ""
- n = 0
- }
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- first := fmt.Sprintf("%d%s/", n+1, name)
- limit := fmt.Sprintf("%d%s0", n+1, name)
- c.Infof("DATASTORE ReadDir %q", name)
- q := datastore.NewQuery("FileInfo").
- Filter("Path >=", first).
- Filter("Path <", limit).
- Ancestor(root)
- enc := json.NewEncoder(&buf)
- it := q.Run(c)
- var fi FileInfo
- var pfi proto.FileInfo
- for {
- fi = FileInfo{}
- _, err := it.Next(&fi)
- if err != nil {
- if err == datastore.Done {
- break
- }
- return nil, err
- }
- pfi = proto.FileInfo{
- Name: fi.Name,
- ModTime: fi.ModTime,
- Size: fi.Size,
- IsDir: fi.IsDir,
- }
- if err := enc.Encode(&pfi); err != nil {
- return nil, err
- }
- }
-
- return buf.Bytes(), nil
-}
-
-func readdirRaw(c appengine.Context, name string) ([]proto.FileInfo, error) {
- name, _, _ = mangle(c, name)
- n := strings.Count(name, "/")
- if name == "/" {
- name = ""
- n = 0
- }
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- first := fmt.Sprintf("%d%s/", n+1, name)
- limit := fmt.Sprintf("%d%s0", n+1, name)
- c.Infof("DATASTORE ReadDir %q", name)
- q := datastore.NewQuery("FileInfo").
- Filter("Path >=", first).
- Filter("Path <", limit).
- Ancestor(root)
- it := q.Run(c)
- var fi FileInfo
- var pfi proto.FileInfo
- var out []proto.FileInfo
- for {
- fi = FileInfo{}
- _, err := it.Next(&fi)
- if err != nil {
- if err == datastore.Done {
- break
- }
- return nil, err
- }
- pfi = proto.FileInfo{
- Name: fi.Name,
- ModTime: fi.ModTime,
- Size: fi.Size,
- IsDir: fi.IsDir,
- }
- out = append(out, pfi)
- }
-println("READDIR", name, len(out))
- return out, nil
-}
-
-
-var initPasswd = `# Password file
-# This file controls access to the server.
-# The format is lines of space-separated fields:
-# user salt pwhash
-# The pwhash is the SHA1 of the salt string concatenated with the password.
-
-# user=dummy password=dummy (replace with your own entries)
-dummy 12345 faa863c7d3d41893f80165c704b714d5e31bdd3b
-`
-
-func (r *request) mkfs() {
- var fi *FileInfo
- r.tx(func(c appengine.Context) error {
- var err error
- fi, err = mkfs(c)
- return err
- })
- r.saveStat(fi)
-}
-
-func mkfs(c appengine.Context) (fi *FileInfo, err error) {
- fi1, err := stat(c, "/")
- if err == nil {
- return fi1, nil
- }
-
- // Root needs to be created.
- // Probably root key does too.
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- _, err = datastore.Put(c, root, &struct{}{})
- if err != nil {
- return nil, fmt.Errorf("mkfs put root: %s", err)
- }
-
- // Entry for /.
- _, mpath, key := mangle(c, "/")
- fi3 := FileInfo{
- Path: mpath,
- Name: "/",
- Seq: 2, // 2, not 1, because we're going to write password file with #2
- Qid: 1,
- ModTime: time.Now(),
- Size: 0,
- IsDir: true,
- }
- _, err = datastore.Put(c, key, &fi3)
- if err != nil {
- return nil, fmt.Errorf("mkfs put /: %s", err)
- }
-
- /*
- * Would like to use this code but App Engine apparently
- * does not let Get observe the effect of a Put in the same
- * transaction. What planet does that make sense on?
- * Instead, we have to execute just the datastore writes that this
- * sequence would.
- *
- _, err = create(c, pwFile, false)
- if err != nil {
- return nil, fmt.Errorf("mkfs create .password: %s", err)
- }
- _, err = write(c, pwFile, []byte(initPasswd))
- if err != nil {
- return nil, fmt.Errorf("mkfs write .password: %s", err)
- }
- *
- */
-
- {
- name, mname, key := mangle(c, pwFile)
-
- // Create data object.
- dataKey := int64(2)
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- dkey := datastore.NewKey(c, "FileData", "", dataKey, root)
- _, err := datastore.Put(c, dkey, &FileData{[]byte(initPasswd)})
- if err != nil {
- return nil, err
- }
-
- // Create new directory entry.
- _, elem := path.Split(name)
- fi1 = &FileInfo{
- Path: mname,
- Name: elem,
- Qid: 2,
- Seq: 2,
- ModTime: time.Now(),
- Size: int64(len(initPasswd)),
- IsDir: false,
- }
- if _, err := datastore.Put(c, key, fi1); err != nil {
- return nil, err
- }
- }
-
- return &fi3, nil
-}
-
-func (r *request) write() {
- data, err := ioutil.ReadAll(r.req.Body)
- if err != nil {
- panic(err)
- }
-
- var fi *FileInfo
- var seq int64
- r.tx(func(c appengine.Context) error {
- var err error
- fi, seq, err = write(r.c, r.name, data)
- return err
- })
- updateCacheTime(r.c, seq)
- r.saveStat(fi)
-}
-
-func write(c appengine.Context, name string, data []byte) (*FileInfo, int64, error) {
- name, _, key := mangle(c, name)
-
- // Check that file exists and is not a directory.
- fi1, err := stat(c, name)
- if err != nil {
- return nil, 0, err
- }
- if fi1.IsDir {
- return nil, 0, fmt.Errorf("cannot write to directory")
- }
-
- // Fetch and increment root sequence number.
- rfi, err := stat(c, "/")
- if err != nil {
- return nil, 0, err
- }
- rfi.Seq++
-
- // Write data.
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- dkey := datastore.NewKey(c, "FileData", "", fi1.Qid, root)
- fd := &FileData{data}
- if _, err := datastore.Put(c, dkey, fd); err != nil {
- return nil, 0, err
- }
-
- // Update directory entry.
- fi1.Seq = rfi.Seq
- fi1.Size = int64(len(data))
- fi1.ModTime = time.Now()
- if _, err := datastore.Put(c, key, fi1); err != nil {
- return nil, 0, err
- }
-
- // Update sequence numbers all the way to the root.
- if err := updateSeq(c, name, rfi.Seq, 1); err != nil {
- return nil, 0, err
- }
-
- return fi1, rfi.Seq, nil
-}
-
-func updateSeq(c appengine.Context, name string, seq int64, skip int) error {
- p := path.Clean(name)
- for i := 0; ; i++ {
- if i >= skip {
- _, _, key := mangle(c, p)
- var fi FileInfo
- if err := datastore.Get(c, key, &fi); err != nil {
- return err
- }
- fi.Seq = seq
- if _, err := datastore.Put(c, key, &fi); err != nil {
- return err
- }
- }
- if p == "/" {
- break
- }
- p, _ = path.Split(p)
- p = path.Clean(p)
- }
- return nil
-}
-
-func (r *request) remove() {
- panic("remove not implemented")
-}
-
-func (r *request) create() {
- var fi *FileInfo
- var seq int64
- isDir := r.req.FormValue("dir") == "1"
- r.tx(func(c appengine.Context) error {
- var err error
- fi, seq, err = create(r.c, r.name, isDir, nil)
- return err
- })
- updateCacheTime(r.c, seq)
- r.saveStat(fi)
-}
-
-func create(c appengine.Context, name string, isDir bool, data []byte) (*FileInfo, int64, error) {
- name, mname, key := mangle(c, name)
-
- // File must not exist.
- fi1, err := stat(c, name)
- if err == nil {
- return nil, 0, fmt.Errorf("file already exists")
- }
- if err != datastore.ErrNoSuchEntity {
- return nil, 0, err
- }
-
- // Parent must exist and be a directory.
- p, _ := path.Split(name)
- fi2, err := stat(c, p)
- if err != nil {
- if err == datastore.ErrNoSuchEntity {
- return nil, 0, fmt.Errorf("parent directory %q does not exist", p)
- }
- return nil, 0, err
- }
- if !fi2.IsDir {
- return nil, 0, fmt.Errorf("parent %q is not a directory", p)
- }
-
- // Fetch and increment root sequence number.
- rfi, err := stat(c, "/")
- if err != nil {
- return nil, 0, err
- }
- rfi.Seq++
-
- var dataKey int64
- // Create data object.
- if !isDir {
- dataKey = rfi.Seq
- root := datastore.NewKey(c, "RootKey", "v2:", 0, nil)
- dkey := datastore.NewKey(c, "FileData", "", dataKey, root)
- _, err := datastore.Put(c, dkey, &FileData{data})
- if err != nil {
- return nil, 0, err
- }
- }
-
- // Create new directory entry.
- _, elem := path.Split(name)
- fi1 = &FileInfo{
- Path: mname,
- Name: elem,
- Qid: rfi.Seq,
- Seq: rfi.Seq,
- ModTime: time.Now(),
- Size: int64(len(data)),
- IsDir: isDir,
- }
- if _, err := datastore.Put(c, key, fi1); err != nil {
- return nil, 0, err
- }
-
- // Update sequence numbers all the way to root,
- // but skip entry we just wrote.
- if err := updateSeq(c, name, rfi.Seq, 1); err != nil {
- return nil, 0, err
- }
-
- return fi1, rfi.Seq, nil
-}
-
-// Implementation of fs.AppEngine.
-
-func init() {
- fs.Register(ae{})
-}
-
-type ae struct{}
-
-func tx(c interface{}, f func(c appengine.Context) error) error {
- return datastore.RunInTransaction(c.(appengine.Context), f, &datastore.TransactionOptions{XG: true})
-}
-
-func (ae) NewContext(req *http.Request) interface{} {
- return appengine.NewContext(req)
-}
-
-func (ae) User(ctxt interface{}) string {
- c := ctxt.(appengine.Context)
- u := user.Current(c)
- if u == nil {
- return "?"
- }
- return u.String()
-}
-
-type cacheKey struct {
- t int64
- name string
-}
-
-func (ae) CacheRead(ctxt interface{}, name, path string) (key interface{}, data []byte, found bool) {
- c := ctxt.(appengine.Context)
- t, data, _, err := cacheRead(c, "cache", name, path)
- return &cacheKey{t, name}, data, err == nil
-}
-
-func (ae) CacheWrite(ctxt, key interface{}, data []byte) {
- c := ctxt.(appengine.Context)
- k := key.(*cacheKey)
- cacheWrite(c, k.t, "cache", k.name, data)
-}
-
-func (ae ae) Read(ctxt interface{}, name string) (data []byte, pfi *proto.FileInfo, err error) {
- c := ctxt.(appengine.Context)
- name = path.Clean("/"+name)
- if chatty {
- c.Infof("AE Read %s", name)
- }
- _, data, pfi, err = cacheRead(c, "data", name, name)
- if err != nil {
- err = fmt.Errorf("Read %q: %v", name, err)
- }
- return
-}
-
-func (ae) Write(ctxt interface{}, path string, data []byte) error {
- var seq int64
- err := tx(ctxt, func(c appengine.Context) error {
- _, err := stat(c, path)
- if err != nil {
- _, seq, err = create(c, path, false, data)
- } else {
- _, seq, err = write(c, path, data)
- }
- return err
- })
- if seq != 0 {
- updateCacheTime(ctxt.(appengine.Context), seq)
- }
- if err != nil {
- err = fmt.Errorf("Write %q: %v", path, err)
- }
- return err
-}
-
-func (ae) Remove(ctxt interface{}, path string) error {
- return fmt.Errorf("remove not implemented")
-}
-
-func (ae) Mkdir(ctxt interface{}, path string) error {
- var seq int64
- err := tx(ctxt, func(c appengine.Context) error {
- var err error
- _, seq, err = create(c, path, true, nil)
- return err
- })
- if seq != 0 {
- updateCacheTime(ctxt.(appengine.Context), seq)
- }
- if err != nil {
- err = fmt.Errorf("Mkdir %q: %v", path, err)
- }
- return err
-}
-
-func (ae) Criticalf(ctxt interface{}, format string, args ...interface{}) {
- ctxt.(appengine.Context).Criticalf(format, args...)
-}
-
-type readDirCacheEntry struct {
- Dir []proto.FileInfo
- Error string
-}
-
-func (ae) ReadDir(ctxt interface{}, name string) (dir []proto.FileInfo, err error) {
- c := ctxt.(appengine.Context)
- name = path.Clean("/"+name)
- t, data, _, err := cacheRead(c, "dir", name, name)
- if err == nil {
- var e readDirCacheEntry
- if err := json.Unmarshal(data, &e); err == nil {
- if chatty {
- c.Infof("cached ReadDir %q", name)
- }
- if e.Error != "" {
- return nil, errors.New(e.Error)
- }
- return e.Dir, nil
- }
- c.Criticalf("unmarshal cached dir %q: %v", name)
- }
- err = tx(ctxt, func(c appengine.Context) error {
- var err error
- dir, err = readdirRaw(c, name)
- return err
- })
- var e readDirCacheEntry
- e.Dir = dir
- if err != nil {
- err = fmt.Errorf("ReadDir %q: %v", name, err)
- e.Error = err.Error()
- }
- if data, err := json.Marshal(&e); err != nil {
- c.Criticalf("json marshal cached dir: %v", err)
- } else {
- c.Criticalf("caching dir %q@%d %d bytes", name, t, len(data))
- cacheWrite(c, t, "dir", name, data)
- }
- return
-}
-
-// Caching of file system data.
-//
-// The cache stores entries under keys of the form time,space,name,
-// where time is the time at which the entry is valid for, space is a name
-// space identifier, and name is an arbitrary name.
-//
-// A key of the form t,mtime,path maps to an integer value giving the
-// modification time of the named path at root time t.
-// The special key 0,mtime,/ is an integer giving the current time at the root.
-//
-// A key of the form t,data,path maps to the content of path at time t.
-//
-// Thus, a read from path should first obtain the root time,
-// then obtain the modification time for the path at that root time
-// then obtain the data for that path.
-// t1 = get(0,mtime,/)
-// t2 = get(t1,mtime,path)
-// data = get(t2,data,path)
-//
-// The API allows clients to cache their own data too, with expiry tied to
-// the modification time of a particular path (file or directory). To look
-// up one of those, we use:
-// t1 = get(0,mtime,/)
-// t2 = get(t1,mtime,path)
-// data = get(t2,clientdata,name)
-//
-// To store data in the cache, the t1, t2 should be determined before reading
-// from datastore. Then the data should be saved under t2. This ensures
-// that if a datastore update happens after the read but before the cache write,
-// we'll be writing to an entry that will no longer be used (t2).
-
-const rootMemcacheKey = "0,mtime,/"
-
-func updateCacheTime(c appengine.Context, seq int64) {
- const key = rootMemcacheKey
- bseq := []byte(strconv.FormatInt(seq, 10))
- for tries := 0; tries < 10; tries++ {
- item, err := memcache.Get(c, key)
- if err != nil {
- c.Infof("memcache.Get %q: %v", key, err)
- err = memcache.Add(c, &memcache.Item{Key: key, Value: bseq})
- if err == nil {
- c.Infof("memcache.Add %q %q ok", key, bseq)
- return
- }
- c.Infof("memcache.Add %q %q: %v", key, bseq, err)
- }
- v, err := strconv.ParseInt(string(item.Value), 10, 64)
- if err != nil {
- c.Criticalf("memcache.Get %q = %q (%v)", key, item.Value, err)
- return
- }
- if v >= seq {
- return
- }
- item.Value = bseq
- err = memcache.CompareAndSwap(c, item)
- if err == nil {
- c.Infof("memcache.CAS %q %d->%d ok", key, v, seq)
- return
- }
- c.Infof("memcache.CAS %q %d->%d: %v", key, v, seq, err)
- }
- c.Criticalf("repeatedly failed to update root key")
-}
-
-func cacheTime(c appengine.Context) (t int64, err error) {
- const key = rootMemcacheKey
- item, err := memcache.Get(c, key)
- if err == nil {
- v, err := strconv.ParseInt(string(item.Value), 10, 64)
- if err == nil {
- if chatty {
- c.Infof("cacheTime %q = %v", key, v)
- }
- return v, nil
- }
- c.Criticalf("memcache.Get %q = %q (%v) - deleting", key, item.Value, err)
- memcache.Delete(c, key)
- }
- fi, err := stat(c, "/")
- if err != nil {
- c.Criticalf("stat /: %v", err)
- return 0, err
- }
- updateCacheTime(c, fi.Seq)
- return fi.Seq, nil
-}
-
-func cachePathTime(c appengine.Context, path string) (t int64, err error) {
- t, err = cacheTime(c)
- if err != nil {
- return 0, err
- }
-
- key := fmt.Sprintf("%d,mtime,%s", t, path)
- item, err := memcache.Get(c, key)
- if err == nil {
- v, err := strconv.ParseInt(string(item.Value), 10, 64)
- if err == nil {
- if chatty {
- c.Infof("cachePathTime %q = %v", key, v)
- }
- return v, nil
- }
- c.Criticalf("memcache.Get %q = %q (%v) - deleting", key, item.Value, err)
- memcache.Delete(c, key)
- }
-
- var seq int64
- if fi, err := stat(c, path); err == nil {
- seq = fi.Seq
- }
-
- c.Infof("cachePathTime save %q = %v", key, seq)
- item = &memcache.Item{Key: key, Value: []byte(strconv.FormatInt(seq, 10))}
- if err := memcache.Set(c, item); err != nil {
- c.Criticalf("memcache.Set %q %q: %v", key, item.Value, err)
- }
- return seq, nil
-}
-
-type statCacheEntry struct {
- FileInfo *proto.FileInfo
- Error string
-}
-
-func cacheRead(c appengine.Context, kind, name, path string) (mtime int64, data []byte, pfi *proto.FileInfo, err error) {
- for tries := 0; tries < 10; tries++ {
- t, err := cachePathTime(c, path)
- if err != nil {
- return 0, nil, nil, err
- }
-
- key := fmt.Sprintf("%d,%s,%s", t, kind, name)
- item, err := memcache.Get(c, key)
- var data []byte
- if item != nil {
- data = item.Value
- }
- if err != nil {
- c.Infof("memcache miss %q %v", key, err)
- } else if chatty {
- c.Infof("memcache hit %q (%d bytes)", key, len(data))
- }
- if kind != "data" {
- // Not a file; whatever memcache says is all we have.
- return t, data, nil, err
- }
-
- // Load stat from cache (includes negative entry).
- statkey := fmt.Sprintf("%d,stat,%s", t, name)
- var st statCacheEntry
- _, err = memcache.JSON.Get(c, statkey, &st)
- if err == nil {
- if st.Error != "" {
- if chatty {
- c.Infof("memcache hit stat error %q %q", statkey, st.Error)
- }
- err = errors.New(st.Error)
- } else {
- if chatty {
- c.Infof("memcache hit stat %q", statkey)
- }
- }
- if err != nil || data != nil {
- return t, data, st.FileInfo, err
- }
- }
-
- // Need stat, or maybe stat+data.
- var fi *FileInfo
- if data != nil {
- c.Infof("stat %q", name)
- fi, err = stat(c, name)
- if err == nil && fi.Seq != t {
- c.Criticalf("loaded %s but found stat %d", key, fi.Seq)
- continue
- }
- } else {
- c.Infof("read %q", name)
- fi, data, err = read(c, name)
- if err == nil && fi.Seq != t {
- c.Infof("loaded %s but found read %d", key, fi.Seq)
- t = fi.Seq
- key = fmt.Sprintf("%d,data,%s", t, name)
- statkey = fmt.Sprintf("%d,stat,%s", t, name)
- }
-
- // Save data to memcache.
- if err == nil {
- if true || chatty {
- c.Infof("save data in memcache %q", key)
- }
- item := &memcache.Item{Key: key, Value: data}
- if err := memcache.Set(c, item); err != nil {
- c.Criticalf("failed to cache %s: %v", key, err)
- }
- }
- }
-
- // Cache stat, including error.
- st = statCacheEntry{}
- if fi != nil {
- st.FileInfo = &proto.FileInfo{
- Name: fi.Name,
- ModTime: fi.ModTime,
- Size: fi.Size,
- IsDir: fi.IsDir,
- }
- }
- if err != nil {
- st.Error = err.Error()
- // If this is a deadline exceeded, do not cache.
- if strings.Contains(st.Error, "Canceled") || strings.Contains(st.Error, "Deadline") {
- return t, data, st.FileInfo, err
- }
- }
- if chatty {
- c.Infof("save stat in memcache %q", statkey)
- }
- if err := memcache.JSON.Set(c, &memcache.Item{Key: statkey, Object: &st}); err != nil {
- c.Criticalf("failed to cache %s: %v", statkey, err)
- }
-
- // Done!
- return t, data, st.FileInfo, err
- }
-
- c.Criticalf("failed repeatedly in cacheRead")
- return 0, nil, nil, errors.New("cacheRead loop failed")
-}
-
-func cacheWrite(c appengine.Context, t int64, kind, name string, data []byte) error {
- mkey := fmt.Sprintf("%d,%s,%s", t, kind, name)
- if true || chatty {
- c.Infof("cacheWrite %s %d bytes", mkey, len(data))
- }
- err := memcache.Set(c, &memcache.Item{Key: mkey, Value: data})
- if err != nil {
- c.Criticalf("cacheWrite memcache.Set %q: %v", mkey, err)
- }
- return err
-}
diff --git a/vendor/github.com/mattermost/rsc/arq/arq.go b/vendor/github.com/mattermost/rsc/arq/arq.go
deleted file mode 100644
index 85a5138e9..000000000
--- a/vendor/github.com/mattermost/rsc/arq/arq.go
+++ /dev/null
@@ -1,663 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package arq implements read-only access to Arq backups stored on S3.
-// Arq is a Mac backup tool (http://www.haystacksoftware.com/arq/)
-// but the package can read the backups regardless of operating system.
-package arq
-
-import (
- "bytes"
- "compress/gzip"
- "encoding/binary"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
- "runtime"
- "strings"
- "time"
-
- "github.com/mattermost/rsc/plist"
- "launchpad.net/goamz/aws"
- "launchpad.net/goamz/s3"
-)
-
-// A Conn represents a connection to an S3 server holding Arq backups.
-type Conn struct {
- b *s3.Bucket
- cache string
- altCache string
-}
-
-// cachedir returns the canonical directory in which to cache data.
-func cachedir() string {
- if runtime.GOOS == "darwin" {
- return filepath.Join(os.Getenv("HOME"), "Library/Caches/arq-cache")
- }
- return filepath.Join(os.Getenv("HOME"), ".cache/arq-cache")
-}
-
-// Dial establishes a connection to an S3 server holding Arq backups.
-func Dial(auth aws.Auth) (*Conn, error) {
- buck := fmt.Sprintf("%s-com-haystacksoftware-arq", strings.ToLower(auth.AccessKey))
- b := s3.New(auth, aws.USEast).Bucket(buck)
- c := &Conn{
- b: b,
- cache: filepath.Join(cachedir(), buck),
- }
- if runtime.GOOS == "darwin" {
- c.altCache = filepath.Join(os.Getenv("HOME"), "Library/Arq/Cache.noindex/"+buck)
- }
-
- // Check that the bucket works by listing computers (relatively cheap).
- if _, err := c.list("", "/", 10); err != nil {
- return nil, err
- }
-
- // Create S3 lookaside cache directory.
-
- return c, nil
-}
-
-func (c *Conn) list(prefix, delim string, max int) (*s3.ListResp, error) {
- resp, err := c.b.List(prefix, delim, "", max)
- if err != nil {
- return nil, err
- }
- ret := resp
- for max == 0 && resp.IsTruncated {
- last := resp.Contents[len(resp.Contents)-1].Key
- resp, err = c.b.List(prefix, delim, last, max)
- if err != nil {
- return ret, err
- }
- ret.Contents = append(ret.Contents, resp.Contents...)
- ret.CommonPrefixes = append(ret.CommonPrefixes, resp.CommonPrefixes...)
- }
- return ret, nil
-}
-
-func (c *Conn) altCachePath(name string) string {
- if c.altCache == "" || !strings.Contains(name, "/packsets/") {
- return ""
- }
- i := strings.Index(name, "-trees/")
- if i < 0 {
- i = strings.Index(name, "-blobs/")
- if i < 0 {
- return ""
- }
- }
- i += len("-trees/") + 2
- if i >= len(name) {
- return ""
- }
- return filepath.Join(c.altCache, name[:i]+"/"+name[i:])
-}
-
-func (c *Conn) cget(name string) (data []byte, err error) {
- cache := filepath.Join(c.cache, name)
- f, err := os.Open(cache)
- if err == nil {
- defer f.Close()
- return ioutil.ReadAll(f)
- }
- if altCache := c.altCachePath(name); altCache != "" {
- f, err := os.Open(altCache)
- if err == nil {
- defer f.Close()
- return ioutil.ReadAll(f)
- }
- }
-
- data, err = c.bget(name)
- if err != nil {
- return nil, err
- }
-
- dir, _ := filepath.Split(cache)
- os.MkdirAll(dir, 0700)
- ioutil.WriteFile(cache, data, 0600)
- return data, nil
-}
-
-func (c *Conn) bget(name string) (data []byte, err error) {
- for i := 0; ; {
- data, err = c.b.Get(name)
- if err == nil {
- break
- }
- if i++; i >= 5 {
- return nil, err
- }
- log.Print(err)
- }
- return data, nil
-}
-
-func (c *Conn) DeleteCache() {
- os.RemoveAll(c.cache)
-}
-
-// Computers returns a list of the computers with backups available on the S3 server.
-func (c *Conn) Computers() ([]*Computer, error) {
- // Each backup is a top-level directory with a computerinfo file in it.
- list, err := c.list("", "/", 0)
- if err != nil {
- return nil, err
- }
- var out []*Computer
- for _, p := range list.CommonPrefixes {
- data, err := c.bget(p + "computerinfo")
- if err != nil {
- continue
- }
- var info computerInfo
- if err := plist.Unmarshal(data, &info); err != nil {
- return nil, err
- }
-
- comp := &Computer{
- Name: info.ComputerName,
- User: info.UserName,
- UUID: p[:len(p)-1],
- conn: c,
- index: map[score]ientry{},
- }
-
- salt, err := c.cget(p + "salt")
- if err != nil {
- return nil, err
- }
- comp.crypto.salt = salt
-
- out = append(out, comp)
- }
- return out, nil
-}
-
-// A Computer represents a computer with backups (Folders).
-type Computer struct {
- Name string // name of computer
- User string // name of user
- UUID string
- conn *Conn
- crypto cryptoState
- index map[score]ientry
-}
-
-// Folders returns a list of the folders that have been backed up on the computer.
-func (c *Computer) Folders() ([]*Folder, error) {
- // Each folder is a file under computer/buckets/.
- list, err := c.conn.list(c.UUID+"/buckets/", "", 0)
- if err != nil {
- return nil, err
- }
- var out []*Folder
- for _, obj := range list.Contents {
- data, err := c.conn.bget(obj.Key)
- if err != nil {
- return nil, err
- }
- var info folderInfo
- if err := plist.Unmarshal(data, &info); err != nil {
- return nil, err
- }
- out = append(out, &Folder{
- Path: info.LocalPath,
- uuid: info.BucketUUID,
- comp: c,
- conn: c.conn,
- })
- }
- return out, nil
-}
-
-// Unlock records the password to use when decrypting
-// backups from this computer. It must be called before calling Trees
-// in any folder obtained for this computer.
-func (c *Computer) Unlock(pw string) {
- c.crypto.unlock(pw)
-}
-
-func (c *Computer) scget(sc score) ([]byte, error) {
- if c.crypto.c == nil {
- return nil, fmt.Errorf("computer not yet unlocked")
- }
-
- var data []byte
- var err error
- ie, ok := c.index[sc]
- if ok {
- data, err = c.conn.cget(ie.File)
- if err != nil {
- return nil, err
- }
-
- //fmt.Printf("offset size %d %d\n", ie.Offset, ie.Size)
- if len(data) < int(ie.Offset+ie.Size) {
- return nil, fmt.Errorf("short pack block")
- }
-
- data = data[ie.Offset:]
- if ie.Size < 1+8+1+8+8 {
- return nil, fmt.Errorf("short pack block")
- }
-
- bo := binary.BigEndian
-
- if data[0] != 1 {
- return nil, fmt.Errorf("missing mime type")
- }
- n := bo.Uint64(data[1:])
- if 1+8+n > uint64(len(data)) {
- return nil, fmt.Errorf("malformed mime type")
- }
- mimeType := data[1+8 : 1+8+n]
- data = data[1+8+n:]
-
- n = bo.Uint64(data[1:])
- if 1+8+n > uint64(len(data)) {
- return nil, fmt.Errorf("malformed name")
- }
- name := data[1+8 : 1+8+n]
- data = data[1+8+n:]
-
- _, _ = mimeType, name
- // fmt.Printf("%s %s\n", mimeType, name)
-
- n = bo.Uint64(data[0:])
- if int64(n) != ie.Size {
- return nil, fmt.Errorf("unexpected data length %d %d", n, ie.Size)
- }
- if 8+n > uint64(len(data)) {
- return nil, fmt.Errorf("short data %d %d", 8+n, len(data))
- }
-
- data = data[8 : 8+n]
- } else {
- data, err = c.conn.cget(c.UUID + "/objects/" + sc.String())
- if err != nil {
- log.Fatal(err)
- }
- }
-
- data = c.crypto.decrypt(data)
- return data, nil
-}
-
-// A Folder represents a backed-up tree on a computer.
-type Folder struct {
- Path string // root of tree of last backup
- uuid string
- comp *Computer
- conn *Conn
-}
-
-// Load loads xxx
-func (f *Folder) Load() error {
- if err := f.comp.loadPack(f.uuid, "-trees"); err != nil {
- return err
- }
- if err := f.comp.loadPack(f.uuid, "-blobs"); err != nil {
- return err
- }
- return nil
-}
-
-func (c *Computer) loadPack(fold, suf string) error {
- list, err := c.conn.list(c.UUID+"/packsets/"+fold+suf+"/", "", 0)
- if err != nil {
- return err
- }
-
- for _, obj := range list.Contents {
- if !strings.HasSuffix(obj.Key, ".index") {
- continue
- }
- data, err := c.conn.cget(obj.Key)
- if err != nil {
- return err
- }
- // fmt.Printf("pack %s\n", obj.Key)
- c.saveIndex(obj.Key[:len(obj.Key)-len(".index")]+".pack", data)
- }
- return nil
-}
-
-func (c *Computer) saveIndex(file string, data []byte) error {
- const (
- headerSize = 4 + 4 + 4*256
- entrySize = 8 + 8 + 20 + 4
- trailerSize = 20
- )
- bo := binary.BigEndian
- if len(data) < headerSize+trailerSize {
- return fmt.Errorf("short index")
- }
- i := len(data) - trailerSize
- sum1 := sha(data[:i])
- sum2 := binaryScore(data[i:])
- if !sum1.Equal(sum2) {
- return fmt.Errorf("invalid sha index")
- }
-
- obj := data[headerSize : len(data)-trailerSize]
- n := len(obj) / entrySize
- if n*entrySize != len(obj) {
- return fmt.Errorf("misaligned index %d %d", n*entrySize, len(obj))
- }
- nn := bo.Uint32(data[headerSize-4:])
- if int(nn) != n {
- return fmt.Errorf("inconsistent index %d %d\n", nn, n)
- }
-
- for i := 0; i < n; i++ {
- e := obj[i*entrySize:]
- var ie ientry
- ie.File = file
- ie.Offset = int64(bo.Uint64(e[0:]))
- ie.Size = int64(bo.Uint64(e[8:]))
- ie.Score = binaryScore(e[16:])
- c.index[ie.Score] = ie
- }
- return nil
-}
-
-// Trees returns a list of the individual backup snapshots for the folder.
-// Note that different trees from the same Folder might have different Paths
-// if the folder was "relocated" using the Arq interface.
-func (f *Folder) Trees() ([]*Tree, error) {
- data, err := f.conn.bget(f.comp.UUID + "/bucketdata/" + f.uuid + "/refs/heads/master")
- if err != nil {
- return nil, err
- }
- sc := hexScore(string(data))
- if err != nil {
- return nil, err
- }
-
- var out []*Tree
- for {
- data, err = f.comp.scget(sc)
- if err != nil {
- return nil, err
- }
-
- var com commit
- if err := unpack(data, &com); err != nil {
- return nil, err
- }
-
- var info folderInfo
- if err := plist.Unmarshal(com.BucketXML, &info); err != nil {
- return nil, err
- }
-
- t := &Tree{
- Time: com.CreateTime,
- Path: info.LocalPath,
- Score: com.Tree.Score,
-
- commit: com,
- comp: f.comp,
- folder: f,
- info: info,
- }
- out = append(out, t)
-
- if len(com.ParentCommits) == 0 {
- break
- }
-
- sc = com.ParentCommits[0].Score
- }
-
- for i, n := 0, len(out)-1; i < n-i; i++ {
- out[i], out[n-i] = out[n-i], out[i]
- }
- return out, nil
-}
-
-func (f *Folder) Trees2() ([]*Tree, error) {
- list, err := f.conn.list(f.comp.UUID+"/bucketdata/"+f.uuid+"/refs/logs/master/", "", 0)
- if err != nil {
- return nil, err
- }
-
- var out []*Tree
- for _, obj := range list.Contents {
- data, err := f.conn.cget(obj.Key)
- if err != nil {
- return nil, err
- }
- var l reflog
- if err := plist.Unmarshal(data, &l); err != nil {
- return nil, err
- }
-
- sc := hexScore(l.NewHeadSHA1)
- if err != nil {
- return nil, err
- }
-
- data, err = f.comp.scget(sc)
- if err != nil {
- return nil, err
- }
-
- var com commit
- if err := unpack(data, &com); err != nil {
- return nil, err
- }
-
- var info folderInfo
- if err := plist.Unmarshal(com.BucketXML, &info); err != nil {
- return nil, err
- }
-
- t := &Tree{
- Time: com.CreateTime,
- Path: info.LocalPath,
- Score: com.Tree.Score,
-
- commit: com,
- comp: f.comp,
- folder: f,
- info: info,
- }
- out = append(out, t)
- }
- return out, nil
-}
-
-// A Tree represents a single backed-up file tree snapshot.
-type Tree struct {
- Time time.Time // time back-up completed
- Path string // root of backed-up tree
- Score [20]byte
-
- comp *Computer
- folder *Folder
- commit commit
- info folderInfo
-
- raw tree
- haveRaw bool
-}
-
-// Root returns the File for the tree's root directory.
-func (t *Tree) Root() (*File, error) {
- if !t.haveRaw {
- data, err := t.comp.scget(t.Score)
- if err != nil {
- return nil, err
- }
- if err := unpack(data, &t.raw); err != nil {
- return nil, err
- }
- t.haveRaw = true
- }
-
- dir := &File{
- t: t,
- dir: &t.raw,
- n: &nameNode{"/", node{IsTree: true}},
- }
- return dir, nil
-}
-
-// A File represents a file or directory in a tree.
-type File struct {
- t *Tree
- n *nameNode
- dir *tree
- byName map[string]*nameNode
-}
-
-func (f *File) loadDir() error {
- if f.dir == nil {
- data, err := f.t.comp.scget(f.n.Node.Blob[0].Score)
- if err != nil {
- return err
- }
- var dir tree
- if err := unpack(data, &dir); err != nil {
- return err
- }
- f.dir = &dir
- }
- return nil
-}
-
-func (f *File) Lookup(name string) (*File, error) {
- if !f.n.Node.IsTree {
- return nil, fmt.Errorf("lookup in non-directory")
- }
- if f.byName == nil {
- if err := f.loadDir(); err != nil {
- return nil, err
- }
- f.byName = map[string]*nameNode{}
- for _, n := range f.dir.Nodes {
- f.byName[n.Name] = n
- }
- }
- n := f.byName[name]
- if n == nil {
- return nil, fmt.Errorf("no entry %q", name)
- }
- return &File{t: f.t, n: n}, nil
-}
-
-func (f *File) Stat() *Dirent {
- if f.n.Node.IsTree {
- if err := f.loadDir(); err == nil {
- return &Dirent{
- Name: f.n.Name,
- ModTime: f.dir.Mtime.Time(),
- Mode: fileMode(f.dir.Mode),
- Size: 0,
- }
- }
- }
- return &Dirent{
- Name: f.n.Name,
- ModTime: f.n.Node.Mtime.Time(),
- Mode: fileMode(f.n.Node.Mode),
- Size: int64(f.n.Node.UncompressedSize),
- }
-}
-
-type Dirent struct {
- Name string
- ModTime time.Time
- Mode os.FileMode
- Size int64
-}
-
-func (f *File) ReadDir() ([]Dirent, error) {
- if !f.n.Node.IsTree {
- return nil, fmt.Errorf("ReadDir in non-directory")
- }
- if err := f.loadDir(); err != nil {
- return nil, err
- }
- var out []Dirent
- for _, n := range f.dir.Nodes {
- out = append(out, Dirent{
- Name: n.Name,
- ModTime: n.Node.Mtime.Time(),
- Mode: fileMode(n.Node.Mode),
- })
- }
- return out, nil
-}
-
-func (f *File) Open() (io.ReadCloser, error) {
- return &fileReader{t: f.t, blob: f.n.Node.Blob, n: &f.n.Node}, nil
-}
-
-type fileReader struct {
- t *Tree
- n *node
- blob []sscore
- cur io.Reader
- close []io.Closer
-}
-
-func (f *fileReader) Read(b []byte) (int, error) {
- for {
- if f.cur != nil {
- n, err := f.cur.Read(b)
- if n > 0 || err != nil && err != io.EOF {
- return n, err
- }
- for _, cl := range f.close {
- cl.Close()
- }
- f.close = f.close[:0]
- f.cur = nil
- }
-
- if len(f.blob) == 0 {
- break
- }
-
- // TODO: Get a direct reader, not a []byte.
- data, err := f.t.comp.scget(f.blob[0].Score)
- if err != nil {
- return 0, err
- }
- rc := ioutil.NopCloser(bytes.NewBuffer(data))
-
- if f.n.CompressData {
- gz, err := gzip.NewReader(rc)
- if err != nil {
- rc.Close()
- return 0, err
- }
- f.close = append(f.close, gz)
- f.cur = gz
- } else {
- f.cur = rc
- }
- f.close = append(f.close, rc)
- f.blob = f.blob[1:]
- }
-
- return 0, io.EOF
-}
-
-func (f *fileReader) Close() error {
- for _, cl := range f.close {
- cl.Close()
- }
- f.close = f.close[:0]
- f.cur = nil
- return nil
-}
diff --git a/vendor/github.com/mattermost/rsc/arq/arqfs/main.go b/vendor/github.com/mattermost/rsc/arq/arqfs/main.go
deleted file mode 100644
index 9e9001133..000000000
--- a/vendor/github.com/mattermost/rsc/arq/arqfs/main.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Arqfs implements a file system interface to a collection of Arq backups.
-
- usage: arqfs [-m mtpt]
-
-Arqfs mounts the Arq backups on the file system directory mtpt,
-(default /mnt/arq). The directory must exist and be writable by
-the current user.
-
-Arq
-
-Arq is an Amazon S3-based backup system for OS X and sold by
-Haystack Software (http://www.haystacksoftware.com/arq/).
-This software reads backups written by Arq.
-It is not affiliated with or connected to Haystack Software.
-
-Passwords
-
-Arqfs reads necessary passwords from the OS X keychain.
-It expects at least two entries:
-
-The keychain entry for s3.amazonaws.com should list the Amazon S3 access ID
-as user name and the S3 secret key as password.
-
-Each backup being accessed must have its own keychain entry for
-host arq.swtch.com, listing the backup UUID as user name and the encryption
-password as the password.
-
-Arqfs will not prompt for passwords or create these entries itself: they must
-be created using the Keychain Access application.
-
-FUSE
-
-Arqfs creates a virtual file system using the FUSE file system layer.
-On OS X, it requires OSXFUSE (http://osxfuse.github.com/).
-
-Cache
-
-Reading the Arq backups efficiently requires caching directory tree information
-on local disk instead of reading the same data from S3 repeatedly. Arqfs caches
-data downloaded from S3 in $HOME/Library/Caches/arq-cache/.
-If an Arq installation is present on the same machine, arqfs will look in
-its cache ($HOME/Library/Arq/Cache.noindex) first, but arqfs will not
-write to Arq's cache directory.
-
-Bugs
-
-Arqfs only runs on OS X for now, because both FUSE and the keychain access
-packages have not been ported to other systems yet.
-
-Both Arqfs and the FUSE package on which it is based have seen only light
-use. There are likely to be bugs. Mail rsc@swtch.com with reports.
-
-*/
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "os/exec"
- "syscall"
-
- "github.com/mattermost/rsc/arq"
- "github.com/mattermost/rsc/fuse"
- "github.com/mattermost/rsc/keychain"
- "launchpad.net/goamz/aws"
-)
-
-var mtpt = flag.String("m", "/mnt/arq", "")
-
-func main() {
- log.SetFlags(0)
-
- if len(os.Args) == 3 && os.Args[1] == "MOUNTSLAVE" {
- *mtpt = os.Args[2]
- mountslave()
- return
- }
-
- flag.Usage = func() {
- fmt.Fprintf(os.Stderr, "usage: arqfs [-m /mnt/arq]\n")
- os.Exit(2)
- }
- flag.Parse()
- if len(flag.Args()) != 0 {
- flag.Usage()
- }
-
- // Run in child so that we can exit once child is running.
- r, w, err := os.Pipe()
- if err != nil {
- log.Fatal(err)
- }
-
- cmd := exec.Command(os.Args[0], "MOUNTSLAVE", *mtpt)
- cmd.Stdout = w
- cmd.Stderr = os.Stderr
- if err := cmd.Start(); err != nil {
- log.Fatalf("mount process: %v", err)
- }
- w.Close()
-
- buf := make([]byte, 10)
- n, _ := r.Read(buf)
- if n != 2 || string(buf[0:2]) != "OK" {
- os.Exit(1)
- }
-
- fmt.Fprintf(os.Stderr, "mounted on %s\n", *mtpt)
-}
-
-func mountslave() {
- stdout, _ := syscall.Dup(1)
- syscall.Dup2(2, 1)
-
- access, secret, err := keychain.UserPasswd("s3.amazonaws.com", "")
- if err != nil {
- log.Fatal(err)
- }
- auth := aws.Auth{AccessKey: access, SecretKey: secret}
-
- conn, err := arq.Dial(auth)
- if err != nil {
- log.Fatal(err)
- }
-
- comps, err := conn.Computers()
- if err != nil {
- log.Fatal(err)
- }
-
- fs := &fuse.Tree{}
- for _, c := range comps {
- fmt.Fprintf(os.Stderr, "scanning %s...\n", c.Name)
-
- // TODO: Better password protocol.
- _, pw, err := keychain.UserPasswd("arq.swtch.com", c.UUID)
- if err != nil {
- log.Fatal(err)
- }
- c.Unlock(pw)
-
- folders, err := c.Folders()
- if err != nil {
- log.Fatal(err)
- }
-
- lastDate := ""
- n := 0
- for _, f := range folders {
- if err := f.Load(); err != nil {
- log.Fatal(err)
- }
- trees, err := f.Trees()
- if err != nil {
- log.Fatal(err)
- }
- for _, t := range trees {
- y, m, d := t.Time.Date()
- date := fmt.Sprintf("%04d/%02d%02d", y, m, d)
- suffix := ""
- if date == lastDate {
- n++
- suffix = fmt.Sprintf(".%d", n)
- } else {
- n = 0
- }
- lastDate = date
- f, err := t.Root()
- if err != nil {
- log.Print(err)
- }
- // TODO: Pass times to fs.Add.
- // fmt.Fprintf(os.Stderr, "%v %s %x\n", t.Time, c.Name+"/"+date+suffix+"/"+t.Path, t.Score)
- fs.Add(c.Name+"/"+date+suffix+"/"+t.Path, &fuseNode{f})
- }
- }
- }
-
- fmt.Fprintf(os.Stderr, "mounting...\n")
-
- c, err := fuse.Mount(*mtpt)
- if err != nil {
- log.Fatal(err)
- }
- defer exec.Command("umount", *mtpt).Run()
-
- syscall.Write(stdout, []byte("OK"))
- syscall.Close(stdout)
- c.Serve(fs)
-}
-
-type fuseNode struct {
- arq *arq.File
-}
-
-func (f *fuseNode) Attr() fuse.Attr {
- de := f.arq.Stat()
- return fuse.Attr{
- Mode: de.Mode,
- Mtime: de.ModTime,
- Size: uint64(de.Size),
- }
-}
-
-func (f *fuseNode) Lookup(name string, intr fuse.Intr) (fuse.Node, fuse.Error) {
- ff, err := f.arq.Lookup(name)
- if err != nil {
- return nil, fuse.ENOENT
- }
- return &fuseNode{ff}, nil
-}
-
-func (f *fuseNode) ReadDir(intr fuse.Intr) ([]fuse.Dirent, fuse.Error) {
- adir, err := f.arq.ReadDir()
- if err != nil {
- return nil, fuse.EIO
- }
- var dir []fuse.Dirent
- for _, ade := range adir {
- dir = append(dir, fuse.Dirent{
- Name: ade.Name,
- })
- }
- return dir, nil
-}
-
-// TODO: Implement Read+Release, not ReadAll, to avoid giant buffer.
-func (f *fuseNode) ReadAll(intr fuse.Intr) ([]byte, fuse.Error) {
- rc, err := f.arq.Open()
- if err != nil {
- return nil, fuse.EIO
- }
- defer rc.Close()
- data, err := ioutil.ReadAll(rc)
- if err != nil {
- return data, fuse.EIO
- }
- return data, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/arq/crypto.go b/vendor/github.com/mattermost/rsc/arq/crypto.go
deleted file mode 100644
index e567ec36d..000000000
--- a/vendor/github.com/mattermost/rsc/arq/crypto.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2012 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 file.
-
-package arq
-
-import (
- "crypto/aes"
- "crypto/cipher"
- "crypto/sha1"
- "hash"
- "log"
-
- "bitbucket.org/taruti/pbkdf2.go" // TODO: Pull in copy
-)
-
-type cryptoState struct {
- c cipher.Block
- iv []byte
- salt []byte
-}
-
-func (c *cryptoState) unlock(pw string) {
- const (
- iter = 1000
- keyLen = 48
- aesKeyLen = 32
- aesIVLen = 16
- )
- key1 := pbkdf2.Pbkdf2([]byte(pw), c.salt, iter, sha1.New, keyLen)
- var key2 []byte
- key2, c.iv = bytesToKey(sha1.New, c.salt, key1, iter, aesKeyLen, aesIVLen)
- c.c, _ = aes.NewCipher(key2)
-}
-
-func (c *cryptoState) decrypt(data []byte) []byte {
- dec := cipher.NewCBCDecrypter(c.c, c.iv)
- if len(data)%aes.BlockSize != 0 {
- log.Fatal("bad block")
- }
- dec.CryptBlocks(data, data)
- // fmt.Printf("% x\n", data)
- // fmt.Printf("%s\n", data)
-
- // unpad
- {
- n := len(data)
- p := int(data[n-1])
- if p == 0 || p > aes.BlockSize {
- log.Fatal("impossible padding")
- }
- for i := 0; i < p; i++ {
- if data[n-1-i] != byte(p) {
- log.Fatal("bad padding")
- }
- }
- data = data[:n-p]
- }
- return data
-}
-
-func sha(data []byte) score {
- h := sha1.New()
- h.Write(data)
- var sc score
- copy(sc[:], h.Sum(nil))
- return sc
-}
-
-func bytesToKey(hf func() hash.Hash, salt, data []byte, iter int, keySize, ivSize int) (key, iv []byte) {
- h := hf()
- var d, dcat []byte
- sum := make([]byte, 0, h.Size())
- for len(dcat) < keySize+ivSize {
- // D_i = HASH^count(D_(i-1) || data || salt)
- h.Reset()
- h.Write(d)
- h.Write(data)
- h.Write(salt)
- sum = h.Sum(sum[:0])
-
- for j := 1; j < iter; j++ {
- h.Reset()
- h.Write(sum)
- sum = h.Sum(sum[:0])
- }
-
- d = append(d[:0], sum...)
- dcat = append(dcat, d...)
- }
-
- return dcat[:keySize], dcat[keySize : keySize+ivSize]
-}
diff --git a/vendor/github.com/mattermost/rsc/arq/data.go b/vendor/github.com/mattermost/rsc/arq/data.go
deleted file mode 100644
index 74eaba450..000000000
--- a/vendor/github.com/mattermost/rsc/arq/data.go
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2012 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 file.
-
-// On-cloud data structures
-
-package arq
-
-import (
- "fmt"
- "os"
- "time"
-)
-
-// plist data structures
-
-type computerInfo struct {
- UserName string `plist:"userName"`
- ComputerName string `plist:"computerName"`
-}
-
-type folderInfo struct {
- BucketUUID string
- BucketName string
- ComputerUUID string
- LocalPath string
- LocalMountPoint string
- // don't care about IgnoredRelativePaths or Excludes
-}
-
-type reflog struct {
- OldHeadSHA1 string `plist:"oldHeadSHA1"`
- NewHeadSHA1 string `plist:"newHeadSHA1"`
-}
-
-// binary data structures
-
-type score [20]byte
-
-type sscore struct {
- Score score `arq:"HexScore"`
- StretchKey bool // v4+
-}
-
-type tag string
-
-type commit struct {
- Tag tag `arq:"CommitV005"`
- Author string
- Comment string
- ParentCommits []sscore
- Tree sscore
- Location string
- MergeCommonAncestor sscore
- CreateTime time.Time
- Failed []failed // v3+
- BucketXML []byte // v5+
-}
-
-type tree struct {
- Tag tag `arq:"TreeV015"`
- CompressXattr bool
- CompressACL bool
- Xattr sscore
- XattrSize uint64
- ACL sscore
- Uid int32
- Gid int32
- Mode int32
- Mtime unixTime
- Flags int64
- FinderFlags int32
- XFinderFlags int32
- StDev int32
- StIno int32
- StNlink uint32
- StRdev int32
- Ctime unixTime
- StBlocks int64
- StBlksize uint32
- AggrSize uint64
- Crtime unixTime
- Nodes []*nameNode `arq:"count32"`
-}
-
-type nameNode struct {
- Name string
- Node node
-}
-
-type node struct {
- IsTree bool
- CompressData bool
- CompressXattr bool
- CompressACL bool
- Blob []sscore `arq:"count32"`
- UncompressedSize uint64
- Thumbnail sscore
- Preview sscore
- Xattr sscore
- XattrSize uint64
- ACL sscore
- Uid int32
- Gid int32
- Mode int32
- Mtime unixTime
- Flags int64
- FinderFlags int32
- XFinderFlags int32
- FinderFileType string
- FinderFileCreator string
- IsExtHidden bool
- StDev int32
- StIno int32
- StNlink uint32
- StRdev int32
- Ctime unixTime
- CreateTime unixTime
- StBlocks int64
- StBlksize uint32
-}
-
-func fileMode(m int32) os.FileMode {
- const (
- // Darwin file mode.
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- )
- mode := os.FileMode(m & 0777)
- switch m & S_IFMT {
- case S_IFBLK, S_IFWHT:
- mode |= os.ModeDevice
- case S_IFCHR:
- mode |= os.ModeDevice | os.ModeCharDevice
- case S_IFDIR:
- mode |= os.ModeDir
- case S_IFIFO:
- mode |= os.ModeNamedPipe
- case S_IFLNK:
- mode |= os.ModeSymlink
- case S_IFREG:
- // nothing to do
- case S_IFSOCK:
- mode |= os.ModeSocket
- }
- if m&S_ISGID != 0 {
- mode |= os.ModeSetgid
- }
- if m&S_ISUID != 0 {
- mode |= os.ModeSetuid
- }
- if m&S_ISVTX != 0 {
- mode |= os.ModeSticky
- }
- return mode
-}
-
-type unixTime struct {
- Sec int64
- Nsec int64
-}
-
-func (t *unixTime) Time() time.Time {
- return time.Unix(t.Sec, t.Nsec)
-}
-
-type failed struct {
- Path string
- Error string
-}
-
-type ientry struct {
- File string
- Offset int64
- Size int64
- Score score
-}
-
-func (s score) Equal(t score) bool {
- for i := range s {
- if s[i] != t[i] {
- return false
- }
- }
- return true
-}
-
-func (s score) String() string {
- return fmt.Sprintf("%x", s[:])
-}
-
-func binaryScore(b []byte) score {
- if len(b) < 20 {
- panic("BinaryScore: not enough data")
- }
- var sc score
- copy(sc[:], b)
- return sc
-}
-
-func hexScore(b string) score {
- if len(b) < 40 {
- panic("HexScore: not enough data")
- }
- var sc score
- for i := 0; i < 40; i++ {
- ch := b[i]
- if '0' <= ch && ch <= '9' {
- ch -= '0'
- } else if 'a' <= ch && ch <= 'f' {
- ch -= 'a' - 10
- } else {
- panic("HexScore: invalid lower hex digit")
- }
- if i%2 == 0 {
- ch <<= 4
- }
- sc[i/2] |= ch
- }
- return sc
-}
-
-func (ss sscore) String() string {
- str := ss.Score.String()
- if ss.StretchKey {
- str += "Y"
- }
- return str
-}
diff --git a/vendor/github.com/mattermost/rsc/arq/hist/hist.go b/vendor/github.com/mattermost/rsc/arq/hist/hist.go
deleted file mode 100644
index 02fb5fbf0..000000000
--- a/vendor/github.com/mattermost/rsc/arq/hist/hist.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Hist shows the history of a given file, using Arq backups.
-
- usage: hist [-d] [-h host] [-m mtpt] [-s yyyy/mmdd] file ...
-
-The -d flag causes it to show diffs between successive versions.
-
-By default, hist assumes backups are mounted at mtpt/host, where
-mtpt defaults to /mnt/arq and host is the first element of the local host name.
-Hist starts the file list with the present copy of the file.
-
-The -h and -s flags override these assumptions.
-
-*/
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "regexp"
- "strings"
-)
-
-var usageString = `usage: hist [-d] [-h host] [-m mtpt] [-s yyyy/mmdd] file ...
-
-Hist lists the known versions of the given file.
-The -d flag causes it to show diffs between successive versions.
-
-By default, hist assumes backups are mounted at mtpt/host, where
-mtpt defaults to /mnt/arq and host is the first element of the local host name.
-Hist starts the file list with the present copy of the file.
-
-The -h and -s flags override these assumptions.
-`
-
-var (
- diff = flag.Bool("d", false, "diff")
- host = flag.String("h", defaultHost(), "host name")
- mtpt = flag.String("m", "/mnt/arq", "mount point")
- vers = flag.String("s", "", "version")
-)
-
-func defaultHost() string {
- name, _ := os.Hostname()
- if name == "" {
- name = "gnot"
- }
- if i := strings.Index(name, "."); i >= 0 {
- name = name[:i]
- }
- return name
-}
-
-func main() {
- flag.Usage = func() {
- fmt.Fprint(os.Stderr, usageString)
- os.Exit(2)
- }
-
- flag.Parse()
- args := flag.Args()
- if len(args) == 0 {
- flag.Usage()
- }
-
- dates := loadDates()
- for _, file := range args {
- list(dates, file)
- }
-}
-
-var (
- yyyy = regexp.MustCompile(`^\d{4}$`)
- mmdd = regexp.MustCompile(`^\d{4}(\.\d+)?$`)
-)
-
-func loadDates() []string {
- var all []string
- ydir, err := ioutil.ReadDir(filepath.Join(*mtpt, *host))
- if err != nil {
- fmt.Fprintf(os.Stderr, "%v\n", err)
- os.Exit(3)
- }
- for _, y := range ydir {
- if !y.IsDir() || !yyyy.MatchString(y.Name()) {
- continue
- }
- ddir, err := ioutil.ReadDir(filepath.Join(*mtpt, *host, y.Name()))
- if err != nil {
- continue
- }
- for _, d := range ddir {
- if !d.IsDir() || !mmdd.MatchString(d.Name()) {
- continue
- }
- date := y.Name() + "/" + d.Name()
- if *vers > date {
- continue
- }
- all = append(all, filepath.Join(*mtpt, *host, date))
- }
- }
- return all
-}
-
-const timeFormat = "Jan 02 15:04:05 MST 2006"
-
-func list(dates []string, file string) {
- var (
- last os.FileInfo
- lastPath string
- )
-
- fi, err := os.Stat(file)
- if err != nil {
- fmt.Fprintf(os.Stderr, "hist: warning: %s: %v\n", file, err)
- } else {
- fmt.Printf("%s %s %d\n", fi.ModTime().Format(timeFormat), file, fi.Size())
- last = fi
- lastPath = file
- }
-
- file, err = filepath.Abs(file)
- if err != nil {
- fmt.Fprintf(os.Stderr, "hist: abs: %v\n", err)
- return
- }
-
- for i := len(dates)-1; i >= 0; i-- {
- p := filepath.Join(dates[i], file)
- fi, err := os.Stat(p)
- if err != nil {
- continue
- }
- if last != nil && fi.ModTime() == last.ModTime() && fi.Size() == last.Size() {
- continue
- }
- if *diff {
- cmd := exec.Command("diff", lastPath, p)
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Start(); err != nil {
- fmt.Fprintf(os.Stderr, "%s\n", err)
- }
- cmd.Wait()
- }
- fmt.Printf("%s %s %d\n", fi.ModTime().Format(timeFormat), p, fi.Size())
- last = fi
- lastPath = p
- }
-}
-
diff --git a/vendor/github.com/mattermost/rsc/arq/unpack.go b/vendor/github.com/mattermost/rsc/arq/unpack.go
deleted file mode 100644
index ec4296a7c..000000000
--- a/vendor/github.com/mattermost/rsc/arq/unpack.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright 2012 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 file.
-
-// Parsing of Arq's binary data structures.
-
-package arq
-
-import (
- "bytes"
- "encoding/binary"
- "fmt"
- "reflect"
- "time"
-)
-
-var errMalformed = fmt.Errorf("malformed data")
-var tagType = reflect.TypeOf(tag(""))
-var timeType = reflect.TypeOf(time.Time{})
-var scoreType = reflect.TypeOf(score{})
-
-func unpack(data []byte, v interface{}) error {
- data, err := unpackValue(data, reflect.ValueOf(v).Elem(), "")
- if err != nil {
- return err
- }
- if len(data) != 0 {
- if len(data) > 100 {
- return fmt.Errorf("more data than expected: %x...", data[:100])
- }
- return fmt.Errorf("more data than expected: %x", data)
- }
- return nil
-}
-
-func unpackValue(data []byte, v reflect.Value, tag string) ([]byte, error) {
- //println("unpackvalue", v.Type().String(), len(data))
- switch v.Kind() {
- case reflect.String:
- if v.Type() == tagType {
- if tag == "" {
- panic("arqfs: missing reflect tag on Tag field")
- }
- if len(data) < len(tag) || !bytes.Equal(data[:len(tag)], []byte(tag)) {
- return nil, errMalformed
- }
- data = data[len(tag):]
- return data, nil
- }
- if len(data) < 1 {
- return nil, errMalformed
- }
- if data[0] == 0 {
- data = data[1:]
- v.SetString("")
- return data, nil
- }
- if data[0] != 1 || len(data) < 1+8 {
- return nil, errMalformed
- }
- n := binary.BigEndian.Uint64(data[1:])
- data = data[1+8:]
- if n >= uint64(len(data)) {
- return nil, errMalformed
- }
- str := data[:n]
- data = data[n:]
- v.SetString(string(str))
- return data, nil
-
- case reflect.Uint32:
- if len(data) < 4 {
- return nil, errMalformed
- }
- v.SetUint(uint64(binary.BigEndian.Uint32(data)))
- data = data[4:]
- return data, nil
-
- case reflect.Int32:
- if len(data) < 4 {
- return nil, errMalformed
- }
- v.SetInt(int64(binary.BigEndian.Uint32(data)))
- data = data[4:]
- return data, nil
-
- case reflect.Uint8:
- if len(data) < 1 {
- return nil, errMalformed
- }
- v.SetUint(uint64(data[0]))
- data = data[1:]
- return data, nil
-
- case reflect.Uint64:
- if len(data) < 8 {
- return nil, errMalformed
- }
- v.SetUint(binary.BigEndian.Uint64(data))
- data = data[8:]
- return data, nil
-
- case reflect.Int64:
- if len(data) < 8 {
- return nil, errMalformed
- }
- v.SetInt(int64(binary.BigEndian.Uint64(data)))
- data = data[8:]
- return data, nil
-
- case reflect.Ptr:
- v.Set(reflect.New(v.Type().Elem()))
- return unpackValue(data, v.Elem(), tag)
-
- case reflect.Slice:
- var n int
- if tag == "count32" {
- n32 := binary.BigEndian.Uint32(data)
- n = int(n32)
- if uint32(n) != n32 {
- return nil, errMalformed
- }
- data = data[4:]
- } else {
- if len(data) < 8 {
- return nil, errMalformed
- }
- n64 := binary.BigEndian.Uint64(data)
- n = int(n64)
- if uint64(n) != n64 {
- return nil, errMalformed
- }
- data = data[8:]
- }
- v.Set(v.Slice(0, 0))
- if v.Type().Elem().Kind() == reflect.Uint8 {
- // Fast case for []byte
- if len(data) < n {
- return nil, errMalformed
- }
- v.Set(reflect.AppendSlice(v, reflect.ValueOf(data[:n])))
- return data[n:], nil
- }
- for i := 0; i < n; i++ {
- elem := reflect.New(v.Type().Elem()).Elem()
- var err error
- data, err = unpackValue(data, elem, "")
- if err != nil {
- return nil, err
- }
- v.Set(reflect.Append(v, elem))
- }
- return data, nil
-
- case reflect.Array:
- if v.Type() == scoreType && tag == "HexScore" {
- var s string
- data, err := unpackValue(data, reflect.ValueOf(&s).Elem(), "")
- if err != nil {
- return nil, err
- }
- if len(s) != 0 {
- v.Set(reflect.ValueOf(hexScore(s)))
- }
- return data, nil
- }
- n := v.Len()
- if v.Type().Elem().Kind() == reflect.Uint8 {
- // Fast case for [n]byte
- if len(data) < n {
- return nil, errMalformed
- }
- reflect.Copy(v, reflect.ValueOf(data))
- data = data[n:]
- return data, nil
- }
- for i := 0; i < n; i++ {
- var err error
- data, err = unpackValue(data, v.Index(i), "")
- if err != nil {
- return nil, err
- }
- }
- return data, nil
-
- case reflect.Bool:
- if len(data) < 1 || data[0] > 1 {
- if len(data) >= 1 {
- println("badbool", data[0])
- }
- return nil, errMalformed
- }
- v.SetBool(data[0] == 1)
- data = data[1:]
- return data, nil
-
- case reflect.Struct:
- if v.Type() == timeType {
- if len(data) < 1 || data[0] > 1 {
- return nil, errMalformed
- }
- if data[0] == 0 {
- v.Set(reflect.ValueOf(time.Time{}))
- return data[1:], nil
- }
- data = data[1:]
- if len(data) < 8 {
- return nil, errMalformed
- }
- ms := binary.BigEndian.Uint64(data)
- v.Set(reflect.ValueOf(time.Unix(int64(ms/1e3), int64(ms%1e3)*1e6)))
- return data[8:], nil
- }
- for i := 0; i < v.NumField(); i++ {
- f := v.Type().Field(i)
- fv := v.Field(i)
- var err error
- data, err = unpackValue(data, fv, f.Tag.Get("arq"))
- if err != nil {
- return nil, err
- }
- }
- return data, nil
- }
-
- panic("arqfs: unexpected type in unpackValue: " + v.Type().String())
-}
diff --git a/vendor/github.com/mattermost/rsc/blog/atom/atom.go b/vendor/github.com/mattermost/rsc/blog/atom/atom.go
deleted file mode 100644
index 4038e4fcd..000000000
--- a/vendor/github.com/mattermost/rsc/blog/atom/atom.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2009 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 file.
-
-// Adapted from encoding/xml/read_test.go.
-
-// Package atom defines XML data structures for an Atom feed.
-package atom
-
-import (
- "encoding/xml"
- "time"
-)
-
-type Feed struct {
- XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"`
- Title string `xml:"title"`
- ID string `xml:"id"`
- Link []Link `xml:"link"`
- Updated TimeStr `xml:"updated"`
- Author *Person `xml:"author"`
- Entry []*Entry `xml:"entry"`
-}
-
-type Entry struct {
- Title string `xml:"title"`
- ID string `xml:"id"`
- Link []Link `xml:"link"`
- Published TimeStr `xml:"published"`
- Updated TimeStr `xml:"updated"`
- Author *Person `xml:"author"`
- Summary *Text `xml:"summary"`
- Content *Text `xml:"content"`
-}
-
-type Link struct {
- Rel string `xml:"rel,attr"`
- Href string `xml:"href,attr"`
-}
-
-type Person struct {
- Name string `xml:"name"`
- URI string `xml:"uri"`
- Email string `xml:"email"`
- InnerXML string `xml:",innerxml"`
-}
-
-type Text struct {
- Type string `xml:"type,attr"`
- Body string `xml:",chardata"`
-}
-
-type TimeStr string
-
-func Time(t time.Time) TimeStr {
- return TimeStr(t.Format("2006-01-02T15:04:05-07:00"))
-}
-
diff --git a/vendor/github.com/mattermost/rsc/blog/main.go b/vendor/github.com/mattermost/rsc/blog/main.go
deleted file mode 100644
index 182dc88f1..000000000
--- a/vendor/github.com/mattermost/rsc/blog/main.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 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 file.
-
-package main
-
-import (
- "github.com/mattermost/rsc/devweb/slave"
-
- _ "github.com/mattermost/rsc/blog/post"
-)
-
-func main() {
- slave.Main()
-}
diff --git a/vendor/github.com/mattermost/rsc/blog/post/post.go b/vendor/github.com/mattermost/rsc/blog/post/post.go
deleted file mode 100644
index beae651f8..000000000
--- a/vendor/github.com/mattermost/rsc/blog/post/post.go
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright 2011 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 file.
-
-package post
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "fmt"
- "html/template"
- "net/http"
- "os"
- "path"
- "runtime/debug"
- "sort"
- "strings"
- "time"
-
- "github.com/mattermost/rsc/appfs/fs"
- "github.com/mattermost/rsc/appfs/proto"
- "github.com/mattermost/rsc/blog/atom"
-)
-
-func init() {
- fs.Root = os.Getenv("HOME") + "/app/"
- http.HandleFunc("/", serve)
- http.Handle("/feeds/posts/default", http.RedirectHandler("/feed.atom", http.StatusFound))
-}
-
-var funcMap = template.FuncMap{
- "now": time.Now,
- "date": timeFormat,
-}
-
-func timeFormat(fmt string, t time.Time) string {
- return t.Format(fmt)
-}
-
-type blogTime struct {
- time.Time
-}
-
-var timeFormats = []string{
- time.RFC3339,
- "Monday, January 2, 2006",
- "January 2, 2006 15:00 -0700",
-}
-
-func (t *blogTime) UnmarshalJSON(data []byte) (err error) {
- str := string(data)
- for _, f := range timeFormats {
- tt, err := time.Parse(`"`+f+`"`, str)
- if err == nil {
- t.Time = tt
- return nil
- }
- }
- return fmt.Errorf("did not recognize time: %s", str)
-}
-
-type PostData struct {
- FileModTime time.Time
- FileSize int64
-
- Title string
- Date blogTime
- Name string
- OldURL string
- Summary string
- Favorite bool
-
- Reader []string
-
- PlusAuthor string // Google+ ID of author
- PlusPage string // Google+ Post ID for comment post
- PlusAPIKey string // Google+ API key
- PlusURL string
- HostURL string // host URL
- Comments bool
-
- article string
-}
-
-func (d *PostData) canRead(user string) bool {
- for _, r := range d.Reader {
- if r == user {
- return true
- }
- }
- return false
-}
-
-func (d *PostData) IsDraft() bool {
- return d.Date.IsZero() || d.Date.After(time.Now())
-}
-
-// To find PlusPage value:
-// https://www.googleapis.com/plus/v1/people/116810148281701144465/activities/public?key=AIzaSyB_JO6hyAJAL659z0Dmu0RUVVvTx02ZPMM
-//
-
-const owner = "rsc@swtch.com"
-const plusRsc = "116810148281701144465"
-const plusKey = "AIzaSyB_JO6hyAJAL659z0Dmu0RUVVvTx02ZPMM"
-const feedID = "tag:research.swtch.com,2012:research.swtch.com"
-
-var replacer = strings.NewReplacer(
- "â°", "<sup>0</sup>",
- "¹", "<sup>1</sup>",
- "²", "<sup>2</sup>",
- "³", "<sup>3</sup>",
- "â´", "<sup>4</sup>",
- "âµ", "<sup>5</sup>",
- "â¶", "<sup>6</sup>",
- "â·", "<sup>7</sup>",
- "â¸", "<sup>8</sup>",
- "â¹", "<sup>9</sup>",
- "â¿", "<sup>n</sup>",
- "â‚€", "<sub>0</sub>",
- "â‚", "<sub>1</sub>",
- "â‚‚", "<sub>2</sub>",
- "₃", "<sub>3</sub>",
- "â‚„", "<sub>4</sub>",
- "â‚…", "<sub>5</sub>",
- "₆", "<sub>6</sub>",
- "₇", "<sub>7</sub>",
- "₈", "<sub>8</sub>",
- "₉", "<sub>9</sub>",
- "``", "&ldquo;",
- "''", "&rdquo;",
-)
-
-func serve(w http.ResponseWriter, req *http.Request) {
- ctxt := fs.NewContext(req)
-
- defer func() {
- if err := recover(); err != nil {
- var buf bytes.Buffer
- fmt.Fprintf(&buf, "panic: %s\n\n", err)
- buf.Write(debug.Stack())
- ctxt.Criticalf("%s", buf.String())
-
- http.Error(w, buf.String(), 500)
- }
- }()
-
- p := path.Clean("/" + req.URL.Path)
-/*
- if strings.Contains(req.Host, "appspot.com") {
- http.Redirect(w, req, "http://research.swtch.com" + p, http.StatusFound)
- }
-*/
- if p != req.URL.Path {
- http.Redirect(w, req, p, http.StatusFound)
- return
- }
-
- if p == "/feed.atom" {
- atomfeed(w, req)
- return
- }
-
- if strings.HasPrefix(p, "/20") && strings.Contains(p[1:], "/") {
- // Assume this is an old-style URL.
- oldRedirect(ctxt, w, req, p)
- }
-
- user := ctxt.User()
- isOwner := ctxt.User() == owner || len(os.Args) >= 2 && os.Args[1] == "LISTEN_STDIN"
- if p == "" || p == "/" || p == "/draft" {
- if p == "/draft" && user == "?" {
- ctxt.Criticalf("/draft loaded by %s", user)
- notfound(ctxt, w, req)
- return
- }
- toc(w, req, p == "/draft", isOwner, user)
- return
- }
-
- draft := false
- if strings.HasPrefix(p, "/draft/") {
- if user == "?" {
- ctxt.Criticalf("/draft loaded by %s", user)
- notfound(ctxt, w, req)
- return
- }
- draft = true
- p = p[len("/draft"):]
- }
-
- if strings.Contains(p[1:], "/") {
- notfound(ctxt, w, req)
- return
- }
-
- if strings.Contains(p, ".") {
- // Let Google's front end servers cache static
- // content for a short amount of time.
- httpCache(w, 5*time.Minute)
- ctxt.ServeFile(w, req, "blog/static/"+p)
- return
- }
-
- // Use just 'blog' as the cache path so that if we change
- // templates, all the cached HTML gets invalidated.
- var data []byte
- pp := "bloghtml:"+p
- if draft && !isOwner {
- pp += ",user="+user
- }
- if key, ok := ctxt.CacheLoad(pp, "blog", &data); !ok {
- meta, article, err := loadPost(ctxt, p, req)
- if err != nil || meta.IsDraft() != draft || (draft && !isOwner && !meta.canRead(user)) {
- ctxt.Criticalf("no %s for %s", p, user)
- notfound(ctxt, w, req)
- return
- }
- t := mainTemplate(ctxt)
- template.Must(t.New("article").Parse(article))
-
- var buf bytes.Buffer
- meta.Comments = true
- if err := t.Execute(&buf, meta); err != nil {
- panic(err)
- }
- data = buf.Bytes()
- ctxt.CacheStore(key, data)
- }
- w.Write(data)
-}
-
-func notfound(ctxt *fs.Context, w http.ResponseWriter, req *http.Request) {
- var buf bytes.Buffer
- var data struct {
- HostURL string
- }
- data.HostURL = hostURL(req)
- t := mainTemplate(ctxt)
- if err := t.Lookup("404").Execute(&buf, &data); err != nil {
- panic(err)
- }
- w.WriteHeader(404)
- w.Write(buf.Bytes())
-}
-
-func mainTemplate(c *fs.Context) *template.Template {
- t := template.New("main")
- t.Funcs(funcMap)
-
- main, _, err := c.Read("blog/main.html")
- if err != nil {
- panic(err)
- }
- style, _, _ := c.Read("blog/style.html")
- main = append(main, style...)
- _, err = t.Parse(string(main))
- if err != nil {
- panic(err)
- }
- return t
-}
-
-func loadPost(c *fs.Context, name string, req *http.Request) (meta *PostData, article string, err error) {
- meta = &PostData{
- Name: name,
- Title: "TITLE HERE",
- PlusAuthor: plusRsc,
- PlusAPIKey: plusKey,
- HostURL: hostURL(req),
- }
-
- art, fi, err := c.Read("blog/post/" + name)
- if err != nil {
- return nil, "", err
- }
- if bytes.HasPrefix(art, []byte("{\n")) {
- i := bytes.Index(art, []byte("\n}\n"))
- if i < 0 {
- panic("cannot find end of json metadata")
- }
- hdr, rest := art[:i+3], art[i+3:]
- if err := json.Unmarshal(hdr, meta); err != nil {
- panic(fmt.Sprintf("loading %s: %s", name, err))
- }
- art = rest
- }
- meta.FileModTime = fi.ModTime
- meta.FileSize = fi.Size
-
- return meta, replacer.Replace(string(art)), nil
-}
-
-type byTime []*PostData
-
-func (x byTime) Len() int { return len(x) }
-func (x byTime) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byTime) Less(i, j int) bool { return x[i].Date.Time.After(x[j].Date.Time) }
-
-type TocData struct {
- Draft bool
- HostURL string
- Posts []*PostData
-}
-
-func toc(w http.ResponseWriter, req *http.Request, draft bool, isOwner bool, user string) {
- c := fs.NewContext(req)
-
- var data []byte
- keystr := fmt.Sprintf("blog:toc:%v", draft)
- if req.FormValue("readdir") != "" {
- keystr += ",readdir=" + req.FormValue("readdir")
- }
- if draft {
- keystr += ",user="+user
- }
-
- if key, ok := c.CacheLoad(keystr, "blog", &data); !ok {
- c := fs.NewContext(req)
- dir, err := c.ReadDir("blog/post")
- if err != nil {
- panic(err)
- }
-
- if req.FormValue("readdir") == "1" {
- fmt.Fprintf(w, "%d dir entries\n", len(dir))
- return
- }
-
- postCache := map[string]*PostData{}
- if data, _, err := c.Read("blogcache"); err == nil {
- if err := json.Unmarshal(data, &postCache); err != nil {
- c.Criticalf("unmarshal blogcache: %v", err)
- }
- }
-
- ch := make(chan *PostData, len(dir))
- const par = 20
- var limit = make(chan bool, par)
- for i := 0; i < par; i++ {
- limit <- true
- }
- for _, d := range dir {
- if meta := postCache[d.Name]; meta != nil && meta.FileModTime.Equal(d.ModTime) && meta.FileSize == d.Size {
- ch <- meta
- continue
- }
-
- <-limit
- go func(d proto.FileInfo) {
- defer func() { limit <- true }()
- meta, _, err := loadPost(c, d.Name, req)
- if err != nil {
- // Should not happen: we just listed the directory.
- c.Criticalf("loadPost %s: %v", d.Name, err)
- return
- }
- ch <- meta
- }(d)
- }
- for i := 0; i < par; i++ {
- <-limit
- }
- close(ch)
- postCache = map[string]*PostData{}
- var all []*PostData
- for meta := range ch {
- postCache[meta.Name] = meta
- if meta.IsDraft() == draft && (!draft || isOwner || meta.canRead(user)) {
- all = append(all, meta)
- }
- }
- sort.Sort(byTime(all))
-
- if data, err := json.Marshal(postCache); err != nil {
- c.Criticalf("marshal blogcache: %v", err)
- } else if err := c.Write("blogcache", data); err != nil {
- c.Criticalf("write blogcache: %v", err)
- }
-
- var buf bytes.Buffer
- t := mainTemplate(c)
- if err := t.Lookup("toc").Execute(&buf, &TocData{draft, hostURL(req), all}); err != nil {
- panic(err)
- }
- data = buf.Bytes()
- c.CacheStore(key, data)
- }
- w.Write(data)
-}
-
-func oldRedirect(ctxt *fs.Context, w http.ResponseWriter, req *http.Request, p string) {
- m := map[string]string{}
- if key, ok := ctxt.CacheLoad("blog:oldRedirectMap", "blog/post", &m); !ok {
- dir, err := ctxt.ReadDir("blog/post")
- if err != nil {
- panic(err)
- }
-
- for _, d := range dir {
- meta, _, err := loadPost(ctxt, d.Name, req)
- if err != nil {
- // Should not happen: we just listed the directory.
- panic(err)
- }
- m[meta.OldURL] = "/" + d.Name
- }
-
- ctxt.CacheStore(key, m)
- }
-
- if url, ok := m[p]; ok {
- http.Redirect(w, req, url, http.StatusFound)
- return
- }
-
- notfound(ctxt, w, req)
-}
-
-func hostURL(req *http.Request) string {
- if strings.HasPrefix(req.Host, "localhost") {
- return "http://localhost:8080"
- }
- return "http://research.swtch.com"
-}
-
-func atomfeed(w http.ResponseWriter, req *http.Request) {
- c := fs.NewContext(req)
-
- c.Criticalf("Header: %v", req.Header)
-
- var data []byte
- if key, ok := c.CacheLoad("blog:atomfeed", "blog/post", &data); !ok {
- dir, err := c.ReadDir("blog/post")
- if err != nil {
- panic(err)
- }
-
- var all []*PostData
- for _, d := range dir {
- meta, article, err := loadPost(c, d.Name, req)
- if err != nil {
- // Should not happen: we just loaded the directory.
- panic(err)
- }
- if meta.IsDraft() {
- continue
- }
- meta.article = article
- all = append(all, meta)
- }
- sort.Sort(byTime(all))
-
- show := all
- if len(show) > 10 {
- show = show[:10]
- for _, meta := range all[10:] {
- if meta.Favorite {
- show = append(show, meta)
- }
- }
- }
-
- feed := &atom.Feed{
- Title: "research!rsc",
- ID: feedID,
- Updated: atom.Time(show[0].Date.Time),
- Author: &atom.Person{
- Name: "Russ Cox",
- URI: "https://plus.google.com/" + plusRsc,
- Email: "rsc@swtch.com",
- },
- Link: []atom.Link{
- {Rel: "self", Href: hostURL(req) + "/feed.atom"},
- },
- }
-
- for _, meta := range show {
- t := template.New("main")
- t.Funcs(funcMap)
- main, _, err := c.Read("blog/atom.html")
- if err != nil {
- panic(err)
- }
- _, err = t.Parse(string(main))
- if err != nil {
- panic(err)
- }
- template.Must(t.New("article").Parse(meta.article))
- var buf bytes.Buffer
- if err := t.Execute(&buf, meta); err != nil {
- panic(err)
- }
-
- e := &atom.Entry{
- Title: meta.Title,
- ID: feed.ID + "/" + meta.Name,
- Link: []atom.Link{
- {Rel: "alternate", Href: meta.HostURL + "/" + meta.Name},
- },
- Published: atom.Time(meta.Date.Time),
- Updated: atom.Time(meta.Date.Time),
- Summary: &atom.Text{
- Type: "text",
- Body: meta.Summary,
- },
- Content: &atom.Text{
- Type: "html",
- Body: buf.String(),
- },
- }
-
- feed.Entry = append(feed.Entry, e)
- }
-
- data, err = xml.Marshal(&feed)
- if err != nil {
- panic(err)
- }
-
- c.CacheStore(key, data)
- }
-
- // Feed readers like to hammer us; let Google cache the
- // response to reduce the traffic we have to serve.
- httpCache(w, 15*time.Minute)
-
- w.Header().Set("Content-Type", "application/atom+xml")
- w.Write(data)
-}
-
-func httpCache(w http.ResponseWriter, dt time.Duration) {
- w.Header().Set("Cache-Control", fmt.Sprintf("public, max-age=%d", int(dt.Seconds())))
-}
diff --git a/vendor/github.com/mattermost/rsc/blog/post/qr.go b/vendor/github.com/mattermost/rsc/blog/post/qr.go
deleted file mode 100644
index a1a03fdbf..000000000
--- a/vendor/github.com/mattermost/rsc/blog/post/qr.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package post
-
-import (
- "fmt"
- "net/http"
- "runtime/debug"
-
- qrweb "github.com/mattermost/rsc/qr/web"
-)
-
-func carp(f http.HandlerFunc) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- defer func() {
- if err := recover(); err != nil {
- w.Header().Set("Content-Type", "text/plain")
- fmt.Fprintf(w, "<pre>\npanic: %s\n\n%s\n", err, debug.Stack())
- }
- }()
- f.ServeHTTP(w, req)
- })
-}
-
-func init() {
- // http.Handle("/qr/bits", carp(qrweb.Bits))
- http.Handle("/qr/frame", carp(qrweb.Frame))
- http.Handle("/qr/frames", carp(qrweb.Frames))
- http.Handle("/qr/mask", carp(qrweb.Mask))
- http.Handle("/qr/masks", carp(qrweb.Masks))
- http.Handle("/qr/arrow", carp(qrweb.Arrow))
- http.Handle("/qr/draw", carp(qrweb.Draw))
- http.Handle("/qr/bitstable", carp(qrweb.BitsTable))
- http.Handle("/qr/encode", carp(qrweb.Encode))
- http.Handle("/qr/show/", carp(qrweb.Show))
-}
diff --git a/vendor/github.com/mattermost/rsc/cmd/crypt/crypt.go b/vendor/github.com/mattermost/rsc/cmd/crypt/crypt.go
deleted file mode 100644
index 4a2150540..000000000
--- a/vendor/github.com/mattermost/rsc/cmd/crypt/crypt.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2012 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 file.
-
-// Crypt is a simple password-based encryption program,
-// demonstrating how to use github.com/mattermost/rsc/crypt.
-//
-// Encrypt input to output using password:
-// crypt password <input >output
-//
-// Decrypt input to output using password:
-// crypt -d password <input >output
-//
-// Yes, the password is a command-line argument. This is a demo of the
-// github.com/mattermost/rsc/crypt package. It's not intended for real use.
-//
-package main
-
-import (
- "encoding/base64"
- "fmt"
- "io/ioutil"
- "os"
- "strings"
-
- "github.com/mattermost/rsc/crypt"
-)
-
-func main() {
- args := os.Args[1:]
- encrypt := true
- if len(args) >= 1 && args[0] == "-d" {
- encrypt = false
- args = args[1:]
- }
- if len(args) != 1 || strings.HasPrefix(args[0], "-") {
- fmt.Fprintf(os.Stderr, "usage: crypt [-d] password < input > output\n")
- os.Exit(2)
- }
- password := args[0]
-
- data, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- fmt.Fprintf(os.Stderr, "reading stdin: %v\n", err)
- os.Exit(1)
- }
- if encrypt {
- pkt, err := crypt.Encrypt(password, data)
- if err != nil {
- fmt.Fprintf(os.Stderr, "%v\n", err)
- os.Exit(1)
- }
- str := base64.StdEncoding.EncodeToString(pkt)
- for len(str) > 60 {
- fmt.Printf("%s\n", str[:60])
- str = str[60:]
- }
- fmt.Printf("%s\n", str)
- } else {
- pkt, err := base64.StdEncoding.DecodeString(strings.Map(noSpace, string(data)))
- if err != nil {
- fmt.Fprintf(os.Stderr, "decoding input: %v\n", err)
- os.Exit(1)
- }
- dec, err := crypt.Decrypt(password, pkt)
- if err != nil {
- fmt.Fprintf(os.Stderr, "%v\n", err)
- os.Exit(1)
- }
- os.Stdout.Write(dec)
- }
-}
-
-func noSpace(r rune) rune {
- if r == ' ' || r == '\t' || r == '\n' {
- return -1
- }
- return r
-}
diff --git a/vendor/github.com/mattermost/rsc/cmd/issue/issue.go b/vendor/github.com/mattermost/rsc/cmd/issue/issue.go
deleted file mode 100644
index 651a65d96..000000000
--- a/vendor/github.com/mattermost/rsc/cmd/issue/issue.go
+++ /dev/null
@@ -1,185 +0,0 @@
-package main
-
-import (
- "encoding/xml"
- "flag"
- "fmt"
- "html"
- "log"
- "net/http"
- "net/url"
- "os"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-func usage() {
- fmt.Fprintf(os.Stderr, `usage: issue [-p project] query
-
-If query is a single number, prints the full history for the issue.
-Otherwise, prints a table of matching results.
-The special query 'go1' is shorthand for 'Priority-Go1'.
-`)
- os.Exit(2)
-}
-
-type Feed struct {
- Entry Entries `xml:"entry"`
-}
-
-type Entry struct {
- ID string `xml:"id"`
- Title string `xml:"title"`
- Published time.Time `xml:"published"`
- Content string `xml:"content"`
- Updates []Update `xml:"updates"`
- Author struct {
- Name string `xml:"name"`
- } `xml:"author"`
- Owner string `xml:"owner"`
- Status string `xml:"status"`
- Label []string `xml:"label"`
-}
-
-type Update struct {
- Summary string `xml:"summary"`
- Owner string `xml:"ownerUpdate"`
- Label string `xml:"label"`
- Status string `xml:"status"`
-}
-
-type Entries []Entry
-
-func (e Entries) Len() int { return len(e) }
-func (e Entries) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
-func (e Entries) Less(i, j int) bool { return e[i].Title < e[j].Title }
-
-var project = flag.String("p", "go", "code.google.com project identifier")
-var v = flag.Bool("v", false, "verbose")
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- if flag.NArg() != 1 {
- usage()
- }
-
- full := false
- q := flag.Arg(0)
- n, _ := strconv.Atoi(q)
- if n != 0 {
- q = "id:" + q
- full = true
- }
- if q == "go1" {
- q = "label:Priority-Go1"
- }
-
- log.SetFlags(0)
-
- query := url.Values{
- "q": {q},
- "max-results": {"400"},
- }
- if !full {
- query["can"] = []string{"open"}
- }
- u := "https://code.google.com/feeds/issues/p/" + *project + "/issues/full?" + query.Encode()
- if *v {
- log.Print(u)
- }
- r, err := http.Get(u)
- if err != nil {
- log.Fatal(err)
- }
-
- var feed Feed
- if err := xml.NewDecoder(r.Body).Decode(&feed); err != nil {
- log.Fatal(err)
- }
- r.Body.Close()
-
- sort.Sort(feed.Entry)
- for _, e := range feed.Entry {
- id := e.ID
- if i := strings.Index(id, "id="); i >= 0 {
- id = id[:i+len("id=")]
- }
- fmt.Printf("%s\t%s\n", id, e.Title)
- if full {
- fmt.Printf("Reported by %s (%s)\n", e.Author.Name, e.Published.Format("2006-01-02 15:04:05"))
- if e.Owner != "" {
- fmt.Printf("\tOwner: %s\n", e.Owner)
- }
- if e.Status != "" {
- fmt.Printf("\tStatus: %s\n", e.Status)
- }
- for _, l := range e.Label {
- fmt.Printf("\tLabel: %s\n", l)
- }
- if e.Content != "" {
- fmt.Printf("\n\t%s\n", wrap(html.UnescapeString(e.Content), "\t"))
- }
- u := "https://code.google.com/feeds/issues/p/" + *project + "/issues/" + id + "/comments/full"
- if *v {
- log.Print(u)
- }
- r, err := http.Get(u)
- if err != nil {
- log.Fatal(err)
- }
-
- var feed Feed
- if err := xml.NewDecoder(r.Body).Decode(&feed); err != nil {
- log.Fatal(err)
- }
- r.Body.Close()
-
- for _, e := range feed.Entry {
- fmt.Printf("\n%s (%s)\n", e.Title, e.Published.Format("2006-01-02 15:04:05"))
- for _, up := range e.Updates {
- if up.Summary != "" {
- fmt.Printf("\tSummary: %s\n", up.Summary)
- }
- if up.Owner != "" {
- fmt.Printf("\tOwner: %s\n", up.Owner)
- }
- if up.Status != "" {
- fmt.Printf("\tStatus: %s\n", up.Status)
- }
- if up.Label != "" {
- fmt.Printf("\tLabel: %s\n", up.Label)
- }
- }
- if e.Content != "" {
- fmt.Printf("\n\t%s\n", wrap(html.UnescapeString(e.Content), "\t"))
- }
- }
- }
- }
-}
-
-func wrap(t string, prefix string) string {
- out := ""
- t = strings.Replace(t, "\r\n", "\n", -1)
- lines := strings.Split(t, "\n")
- for i, line := range lines {
- if i > 0 {
- out += "\n" + prefix
- }
- s := line
- for len(s) > 70 {
- i := strings.LastIndex(s[:70], " ")
- if i < 0 {
- i = 69
- }
- i++
- out += s[:i] + "\n" + prefix
- s = s[i:]
- }
- out += s
- }
- return out
-}
diff --git a/vendor/github.com/mattermost/rsc/cmd/jfmt/main.go b/vendor/github.com/mattermost/rsc/cmd/jfmt/main.go
deleted file mode 100644
index 31c5eddfc..000000000
--- a/vendor/github.com/mattermost/rsc/cmd/jfmt/main.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2012 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 file.
-
-// jfmt reads JSON from standard input, formats it, and writes it to standard output.
-package main
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "log"
- "os"
-)
-
-func main() {
- log.SetFlags(0)
-
- if len(os.Args) > 1 {
- fmt.Fprintf(os.Stderr, "usage: json < input > output\n")
- os.Exit(2)
- }
-
- // TODO: Can do on the fly.
-
- data, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- log.Fatal(err)
- }
-
- var buf bytes.Buffer
- json.Indent(&buf, data, "", " ")
- buf.WriteByte('\n')
-
- os.Stdout.Write(buf.Bytes())
-}
diff --git a/vendor/github.com/mattermost/rsc/crypt/crypt.go b/vendor/github.com/mattermost/rsc/crypt/crypt.go
deleted file mode 100644
index c65129be4..000000000
--- a/vendor/github.com/mattermost/rsc/crypt/crypt.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package crypt provides simple, password-based encryption and decryption of data blobs.
-package crypt
-
-import (
- "bytes"
- "crypto/aes"
- "crypto/cipher"
- "crypto/hmac"
- "crypto/rand"
- "crypto/sha1"
- "fmt"
- "io"
-
- "code.google.com/p/go.crypto/pbkdf2"
-)
-
-// This program manipulates encrypted, signed packets with the following format:
-// 1 byte version
-// 8 byte salt
-// 4 byte key hash
-// aes.BlockSize-byte IV
-// aes.BlockSize-byte encryption (maybe longer)
-// sha1.Size-byte HMAC signature
-
-const version = 0
-
-// deriveKey returns the AES key, HMAC-SHA1 key, and key hash for
-// the given password, salt combination.
-func deriveKey(password string, salt []byte) (aesKey, hmacKey, keyHash []byte) {
- const keySize = 16
- key := pbkdf2.Key([]byte(password), salt, 4096, 2*keySize, sha1.New)
- aesKey = key[:keySize]
- hmacKey = key[keySize:]
- h := sha1.New()
- h.Write(key)
- keyHash = h.Sum(nil)[:4]
- return
-}
-
-// Encrypt encrypts the plaintext into an encrypted packet
-// using the given password. The password is required for
-// decryption.
-func Encrypt(password string, plaintext []byte) (encrypted []byte, err error) {
- // Derive key material from password and salt.
- salt := make([]byte, 8)
- _, err = io.ReadFull(rand.Reader, salt)
- if err != nil {
- return nil, err
- }
- aesKey, hmacKey, keyHash := deriveKey(password, salt)
-
- // Pad.
- n := aes.BlockSize - len(plaintext)%aes.BlockSize
- dec := make([]byte, len(plaintext)+n)
- copy(dec, plaintext)
- for i := len(plaintext); i < len(dec); i++ {
- dec[i] = byte(n)
- }
-
- // Encrypt.
- iv := make([]byte, aes.BlockSize)
- _, err = io.ReadFull(rand.Reader, iv)
- if err != nil {
- return nil, err
- }
- aesBlock, err := aes.NewCipher(aesKey)
- if err != nil {
- // Cannot happen - key is right size.
- panic("aes: " + err.Error())
- }
- m := cipher.NewCBCEncrypter(aesBlock, iv)
- enc := make([]byte, len(dec))
- m.CryptBlocks(enc, dec)
-
- // Construct packet.
- var pkt []byte
- pkt = append(pkt, version)
- pkt = append(pkt, salt...)
- pkt = append(pkt, keyHash...)
- pkt = append(pkt, iv...)
- pkt = append(pkt, enc...)
-
- // Sign.
- h := hmac.New(sha1.New, hmacKey)
- h.Write(pkt)
- pkt = append(pkt, h.Sum(nil)...)
-
- return pkt, nil
-}
-
-// Decrypt decrypts the encrypted packet using the given password.
-// It returns the decrypted data.
-func Decrypt(password string, encrypted []byte) (plaintext []byte, err error) {
- // Pull apart packet.
- pkt := encrypted
- if len(pkt) < 1+8+4+2*aes.BlockSize+sha1.Size {
- return nil, fmt.Errorf("encrypted packet too short")
- }
- vers, pkt := pkt[:1], pkt[1:]
- salt, pkt := pkt[:8], pkt[8:]
- hash, pkt := pkt[:4], pkt[4:]
- iv, pkt := pkt[:aes.BlockSize], pkt[aes.BlockSize:]
- enc, sig := pkt[:len(pkt)-sha1.Size], pkt[len(pkt)-sha1.Size:]
-
- if vers[0] != version || len(enc)%aes.BlockSize != 0 {
- return nil, fmt.Errorf("malformed encrypted packet")
- }
-
- // Derive key and check against hash.
- aesKey, hmacKey, keyHash := deriveKey(password, salt)
- if !bytes.Equal(hash, keyHash) {
- return nil, fmt.Errorf("incorrect password - %x vs %x", hash, keyHash)
- }
-
- // Verify signature.
- h := hmac.New(sha1.New, hmacKey)
- h.Write(encrypted[:len(encrypted)-len(sig)])
- if !bytes.Equal(sig, h.Sum(nil)) {
- return nil, fmt.Errorf("cannot authenticate encrypted packet")
- }
-
- // Decrypt.
- aesBlock, err := aes.NewCipher(aesKey)
- if err != nil {
- // Cannot happen - key is right size.
- panic("aes: " + err.Error())
- }
- m := cipher.NewCBCDecrypter(aesBlock, iv)
- dec := make([]byte, len(enc))
- m.CryptBlocks(dec, enc)
-
- // Unpad.
- pad := dec[len(dec)-1]
- if pad <= 0 || pad > aes.BlockSize {
- return nil, fmt.Errorf("malformed packet padding")
- }
- for _, b := range dec[len(dec)-int(pad):] {
- if b != pad {
- return nil, fmt.Errorf("malformed packet padding")
- }
- }
- dec = dec[:len(dec)-int(pad)]
-
- // Success!
- return dec, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/devweb/main.go b/vendor/github.com/mattermost/rsc/devweb/main.go
deleted file mode 100644
index 7a09f032b..000000000
--- a/vendor/github.com/mattermost/rsc/devweb/main.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright 2011 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 file.
-
-// Devweb is a simple environment for developing a web server.
-// It runs its own web server on the given address and proxies
-// all requests to the http server program named by importpath.
-// It takes care of recompiling and restarting the program as needed.
-//
-// The server program should be a trivial main program like:
-//
-// package main
-//
-// import (
-// "github.com/mattermost/rsc/devweb/slave"
-//
-// _ "this/package"
-// _ "that/package"
-// )
-//
-// func main() {
-// slave.Main()
-// }
-//
-// The import _ lines import packages that register HTTP handlers,
-// like in an App Engine program.
-//
-// As you make changes to this/package or that/package (or their
-// dependencies), devweb recompiles and relaunches the servers as
-// needed to serve requests.
-//
-package main
-
-// BUG(rsc): Devweb should probably
-
-import (
- "bufio"
- "bytes"
- "encoding/json"
- "flag"
- "fmt"
- "io"
- "log"
- "net"
- "net/http"
- "os"
- "os/exec"
- "path/filepath"
- "sync"
- "time"
-)
-
-func usage() {
- fmt.Fprint(os.Stderr, `usage: devweb [-addr :8000] importpath
-
-Devweb runs a web server on the given address and proxies all requests
-to the http server program named by importpath. It takes care of
-recompiling and restarting the program as needed.
-
-The http server program must itself have a -addr argument that
-says which TCP port to listen on.
-`,
- )
-}
-
-var addr = flag.String("addr", ":8000", "web service address")
-var rootPackage string
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- args := flag.Args()
- if len(args) != 1 {
- usage()
- }
- rootPackage = args[0]
-
- log.Fatal(http.ListenAndServe(*addr, http.HandlerFunc(relay)))
-}
-
-func relay(w http.ResponseWriter, req *http.Request) {
- defer func() {
- if err := recover(); err != nil {
- http.Error(w, fmt.Sprint(err), 200)
- }
- }()
-
- c, proxy, err := buildProxy()
- if err != nil {
- panic(err)
- }
- defer c.Close()
- _ = proxy
-
- outreq := new(http.Request)
- *outreq = *req // includes shallow copies of maps, but okay
-
- outreq.Proto = "HTTP/1.1"
- outreq.ProtoMajor = 1
- outreq.ProtoMinor = 1
- outreq.Close = false
-
- // Remove the connection header to the backend. We want a
- // persistent connection, regardless of what the client sent
- // to us. This is modifying the same underlying map from req
- // (shallow copied above) so we only copy it if necessary.
- if outreq.Header.Get("Connection") != "" {
- outreq.Header = make(http.Header)
- copyHeader(outreq.Header, req.Header)
- outreq.Header.Del("Connection")
- }
-
- outreq.Write(c)
-
- br := bufio.NewReader(c)
- resp, err := http.ReadResponse(br, outreq)
- if err != nil {
- panic(err)
- }
-
- copyHeader(w.Header(), resp.Header)
- w.WriteHeader(resp.StatusCode)
-
- if resp.Body != nil {
- io.Copy(w, resp.Body)
- }
-}
-
-func copyHeader(dst, src http.Header) {
- for k, vv := range src {
- for _, v := range vv {
- dst.Add(k, v)
- }
- }
-}
-
-type cmdProxy struct {
- cmd *exec.Cmd
- addr string
-}
-
-func (p *cmdProxy) kill() {
- if p == nil {
- return
- }
- p.cmd.Process.Kill()
- p.cmd.Wait()
-}
-
-var proxyInfo struct {
- sync.Mutex
- build time.Time
- check time.Time
- active *cmdProxy
- err error
-}
-
-func buildProxy() (c net.Conn, proxy *cmdProxy, err error) {
- p := &proxyInfo
-
- t := time.Now()
- p.Lock()
- defer p.Unlock()
- if t.Before(p.check) {
- // We waited for the lock while someone else dialed.
- // If we can connect, done.
- if p.active != nil {
- if c, err := net.DialTimeout("tcp", p.active.addr, 5*time.Second); err == nil {
- return c, p.active, nil
- }
- }
- }
-
- defer func() {
- p.err = err
- p.check = time.Now()
- }()
-
- pkgs, err := loadPackage(rootPackage)
- if err != nil {
- return nil, nil, fmt.Errorf("load %s: %s", rootPackage, err)
- }
-
- deps := pkgs[0].Deps
- if len(deps) > 0 && deps[0] == "C" {
- deps = deps[1:]
- }
- pkgs1, err := loadPackage(deps...)
- if err != nil {
- return nil, nil, fmt.Errorf("load %v: %s", deps, err)
- }
- pkgs = append(pkgs, pkgs1...)
-
- var latest time.Time
-
- for _, pkg := range pkgs {
- var files []string
- files = append(files, pkg.GoFiles...)
- files = append(files, pkg.CFiles...)
- files = append(files, pkg.HFiles...)
- files = append(files, pkg.SFiles...)
- files = append(files, pkg.CgoFiles...)
-
- for _, file := range files {
- if fi, err := os.Stat(filepath.Join(pkg.Dir, file)); err == nil && fi.ModTime().After(latest) {
- latest = fi.ModTime()
- }
- }
- }
-
- if latest.After(p.build) {
- p.active.kill()
- p.active = nil
-
- out, err := exec.Command("go", "build", "-o", "prox.exe", rootPackage).CombinedOutput()
- if len(out) > 0 {
- return nil, nil, fmt.Errorf("%s", out)
- }
- if err != nil {
- return nil, nil, err
- }
-
- p.build = latest
- }
-
- // If we can connect, done.
- if p.active != nil {
- if c, err := net.DialTimeout("tcp", p.active.addr, 5*time.Second); err == nil {
- return c, p.active, nil
- }
- }
-
- // Otherwise, start a new server.
- p.active.kill()
- p.active = nil
-
- l, err := net.Listen("tcp", "localhost:0")
- if err != nil {
- return nil, nil, err
- }
- addr := l.Addr().String()
-
- cmd := exec.Command("prox.exe", "LISTEN_STDIN")
- cmd.Stdin, err = l.(*net.TCPListener).File()
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err != nil {
- l.Close()
- return nil, nil, err
- }
- err = cmd.Start()
- l.Close()
-
- if err != nil {
- return nil, nil, err
- }
-
- c, err = net.DialTimeout("tcp", addr, 5*time.Second)
- if err != nil {
- return nil, nil, err
- }
-
- p.active = &cmdProxy{cmd, addr}
- return c, p.active, nil
-}
-
-type Pkg struct {
- ImportPath string
- Dir string
- GoFiles []string
- CFiles []string
- HFiles []string
- SFiles []string
- CgoFiles []string
- Deps []string
-}
-
-func loadPackage(name ...string) ([]*Pkg, error) {
- args := []string{"list", "-json"}
- args = append(args, name...)
- var stderr bytes.Buffer
- cmd := exec.Command("go", args...)
- r, err := cmd.StdoutPipe()
- if err != nil {
- return nil, err
- }
- cmd.Stderr = &stderr
- if err := cmd.Start(); err != nil {
- return nil, err
- }
-
- dec := json.NewDecoder(r)
- var pkgs []*Pkg
- for {
- p := new(Pkg)
- if err := dec.Decode(p); err != nil {
- if err == io.EOF {
- break
- }
- cmd.Process.Kill()
- return nil, err
- }
- pkgs = append(pkgs, p)
- }
-
- err = cmd.Wait()
- if b := stderr.Bytes(); len(b) > 0 {
- return nil, fmt.Errorf("%s", b)
- }
- if err != nil {
- return nil, err
- }
- if len(pkgs) != len(name) {
- return nil, fmt.Errorf("found fewer packages than expected")
- }
- return pkgs, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/devweb/slave/slave.go b/vendor/github.com/mattermost/rsc/devweb/slave/slave.go
deleted file mode 100644
index a6983c23c..000000000
--- a/vendor/github.com/mattermost/rsc/devweb/slave/slave.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2011 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 file.
-
-package slave
-
-import (
- "fmt"
- "log"
- "net"
- "net/http"
- "os"
-)
-
-func Main() {
- if len(os.Args) != 2 || os.Args[1] != "LISTEN_STDIN" {
- fmt.Fprintf(os.Stderr, "devweb slave must be invoked by devweb\n")
- os.Exit(2)
- }
- l, err := net.FileListener(os.Stdin)
- if err != nil {
- log.Fatal(err)
- }
- os.Stdin.Close()
- log.Fatal(http.Serve(l, nil))
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/debug.go b/vendor/github.com/mattermost/rsc/fuse/debug.go
deleted file mode 100644
index 2dc5d4312..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/debug.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 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 file.
-
-// FUSE service loop, for servers that wish to use it.
-
-package fuse
-
-import (
- "runtime"
-)
-
-func stack() string {
- buf := make([]byte, 1024)
- return string(buf[:runtime.Stack(buf, false)])
-}
-
-var Debugf = nop
-
-func nop(string, ...interface{}) {}
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse.go b/vendor/github.com/mattermost/rsc/fuse/fuse.go
deleted file mode 100644
index 2ad10c93e..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse.go
+++ /dev/null
@@ -1,1650 +0,0 @@
-// Copyright 2011 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 file.
-
-// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c,
-// which carries this notice:
-//
-// The files in this directory are subject to the following license.
-//
-// The author of this software is Russ Cox.
-//
-// Copyright (c) 2006 Russ Cox
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose without fee is hereby granted, provided that this entire notice
-// is included in all copies of any software which is or includes a copy
-// or modification of this software and in all copies of the supporting
-// documentation for such software.
-//
-// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
-// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY
-// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS
-// FITNESS FOR ANY PARTICULAR PURPOSE.
-
-// Package fuse enables writing FUSE file systems on FreeBSD, Linux, and OS X.
-//
-// On OS X, it requires OSXFUSE (http://osxfuse.github.com/).
-//
-// There are two approaches to writing a FUSE file system. The first is to speak
-// the low-level message protocol, reading from a Conn using ReadRequest and
-// writing using the various Respond methods. This approach is closest to
-// the actual interaction with the kernel and can be the simplest one in contexts
-// such as protocol translators.
-//
-// Servers of synthesized file systems tend to share common bookkeeping
-// abstracted away by the second approach, which is to call the Conn's
-// Serve method to serve the FUSE protocol using
-// an implementation of the service methods in the interfaces
-// FS (file system), Node (file or directory), and Handle (opened file or directory).
-// There are a daunting number of such methods that can be written,
-// but few are required.
-// The specific methods are described in the documentation for those interfaces.
-//
-// The hellofs subdirectory contains a simple illustration of the ServeFS approach.
-//
-// Service Methods
-//
-// The required and optional methods for the FS, Node, and Handle interfaces
-// have the general form
-//
-// Op(req *OpRequest, resp *OpResponse, intr Intr) Error
-//
-// where Op is the name of a FUSE operation. Op reads request parameters
-// from req and writes results to resp. An operation whose only result is
-// the error result omits the resp parameter. Multiple goroutines may call
-// service methods simultaneously; the methods being called are responsible
-// for appropriate synchronization.
-//
-// Interrupted Operations
-//
-// In some file systems, some operations
-// may take an undetermined amount of time. For example, a Read waiting for
-// a network message or a matching Write might wait indefinitely. If the request
-// is cancelled and no longer needed, the package will close intr, a chan struct{}.
-// Blocking operations should select on a receive from intr and attempt to
-// abort the operation early if the receive succeeds (meaning the channel is closed).
-// To indicate that the operation failed because it was aborted, return fuse.EINTR.
-//
-// If an operation does not block for an indefinite amount of time, the intr parameter
-// can be ignored.
-//
-// Authentication
-//
-// All requests types embed a Header, meaning that the method can inspect
-// req.Pid, req.Uid, and req.Gid as necessary to implement permission checking.
-// Alternately, XXX.
-//
-// Mount Options
-//
-// XXX
-//
-package fuse
-
-// BUG(rsc): The mount code for FreeBSD has not been written yet.
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "log"
- "os"
- "runtime"
- "sync"
- "syscall"
- "time"
- "unsafe"
-)
-
-// A Conn represents a connection to a mounted FUSE file system.
-type Conn struct {
- fd int
- buf []byte
- wio sync.Mutex
-
- serveConn
-}
-
-// Mount mounts a new FUSE connection on the named directory
-// and returns a connection for reading and writing FUSE messages.
-func Mount(dir string) (*Conn, error) {
- // TODO(rsc): mount options (...string?)
- fd, errstr := mount(dir)
- if errstr != "" {
- return nil, errors.New(errstr)
- }
-
- return &Conn{fd: fd}, nil
-}
-
-// A Request represents a single FUSE request received from the kernel.
-// Use a type switch to determine the specific kind.
-// A request of unrecognized type will have concrete type *Header.
-type Request interface {
- // Hdr returns the Header associated with this request.
- Hdr() *Header
-
- // RespondError responds to the request with the given error.
- RespondError(Error)
-
- String() string
-
- // handle returns the HandleID for the request, or 0.
- handle() HandleID
-}
-
-// A RequestID identifies an active FUSE request.
-type RequestID uint64
-
-// A NodeID is a number identifying a directory or file.
-// It must be unique among IDs returned in LookupResponses
-// that have not yet been forgotten by ForgetRequests.
-type NodeID uint64
-
-// A HandleID is a number identifying an open directory or file.
-// It only needs to be unique while the directory or file is open.
-type HandleID uint64
-
-// The RootID identifies the root directory of a FUSE file system.
-const RootID NodeID = rootID
-
-// A Header describes the basic information sent in every request.
-type Header struct {
- Conn *Conn // connection this request was received on
- ID RequestID // unique ID for request
- Node NodeID // file or directory the request is about
- Uid uint32 // user ID of process making request
- Gid uint32 // group ID of process making request
- Pid uint32 // process ID of process making request
-}
-
-func (h *Header) String() string {
- return fmt.Sprintf("ID=%#x Node=%#x Uid=%d Gid=%d Pid=%d", h.ID, h.Node, h.Uid, h.Gid, h.Pid)
-}
-
-func (h *Header) Hdr() *Header {
- return h
-}
-
-func (h *Header) handle() HandleID {
- return 0
-}
-
-// An Error is a FUSE error.
-type Error interface {
- errno() int32
-}
-
-const (
- // ENOSYS indicates that the call is not supported.
- ENOSYS = Errno(syscall.ENOSYS)
-
- // ESTALE is used by Serve to respond to violations of the FUSE protocol.
- ESTALE = Errno(syscall.ESTALE)
-
- ENOENT = Errno(syscall.ENOENT)
- EIO = Errno(syscall.EIO)
- EPERM = Errno(syscall.EPERM)
-)
-
-type errno int
-
-func (e errno) errno() int32 {
- return int32(e)
-}
-
-// Errno implements Error using a syscall.Errno.
-type Errno syscall.Errno
-
-func (e Errno) errno() int32 {
- return int32(e)
-}
-
-func (e Errno) String() string {
- return syscall.Errno(e).Error()
-}
-
-func (h *Header) RespondError(err Error) {
- // FUSE uses negative errors!
- // TODO: File bug report against OSXFUSE: positive error causes kernel panic.
- out := &outHeader{Error: -err.errno(), Unique: uint64(h.ID)}
- h.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-var maxWrite = syscall.Getpagesize()
-var bufSize = 4096 + maxWrite
-
-// a message represents the bytes of a single FUSE message
-type message struct {
- conn *Conn
- buf []byte // all bytes
- hdr *inHeader // header
- off int // offset for reading additional fields
-}
-
-func newMessage(c *Conn) *message {
- m := &message{conn: c, buf: make([]byte, bufSize)}
- m.hdr = (*inHeader)(unsafe.Pointer(&m.buf[0]))
- return m
-}
-
-func (m *message) len() uintptr {
- return uintptr(len(m.buf) - m.off)
-}
-
-func (m *message) data() unsafe.Pointer {
- var p unsafe.Pointer
- if m.off < len(m.buf) {
- p = unsafe.Pointer(&m.buf[m.off])
- }
- return p
-}
-
-func (m *message) bytes() []byte {
- return m.buf[m.off:]
-}
-
-func (m *message) Header() Header {
- h := m.hdr
- return Header{Conn: m.conn, ID: RequestID(h.Unique), Node: NodeID(h.Nodeid), Uid: h.Uid, Gid: h.Gid, Pid: h.Pid}
-}
-
-// fileMode returns a Go os.FileMode from a Unix mode.
-func fileMode(unixMode uint32) os.FileMode {
- mode := os.FileMode(unixMode & 0777)
- switch unixMode & syscall.S_IFMT {
- case syscall.S_IFREG:
- // nothing
- case syscall.S_IFDIR:
- mode |= os.ModeDir
- case syscall.S_IFCHR:
- mode |= os.ModeCharDevice | os.ModeDevice
- case syscall.S_IFBLK:
- mode |= os.ModeDevice
- case syscall.S_IFIFO:
- mode |= os.ModeNamedPipe
- case syscall.S_IFLNK:
- mode |= os.ModeSymlink
- case syscall.S_IFSOCK:
- mode |= os.ModeSocket
- default:
- // no idea
- mode |= os.ModeDevice
- }
- if unixMode&syscall.S_ISUID != 0 {
- mode |= os.ModeSetuid
- }
- if unixMode&syscall.S_ISGID != 0 {
- mode |= os.ModeSetgid
- }
- return mode
-}
-
-func (c *Conn) ReadRequest() (Request, error) {
- // TODO: Some kind of buffer reuse.
- m := newMessage(c)
- n, err := syscall.Read(c.fd, m.buf)
- if err != nil && err != syscall.ENODEV {
- return nil, err
- }
- if n <= 0 {
- return nil, io.EOF
- }
- m.buf = m.buf[:n]
-
- if n < inHeaderSize {
- return nil, errors.New("fuse: message too short")
- }
-
- // FreeBSD FUSE sends a short length in the header
- // for FUSE_INIT even though the actual read length is correct.
- if n == inHeaderSize+initInSize && m.hdr.Opcode == opInit && m.hdr.Len < uint32(n) {
- m.hdr.Len = uint32(n)
- }
-
- // OSXFUSE sometimes sends the wrong m.hdr.Len in a FUSE_WRITE message.
- if m.hdr.Len < uint32(n) && m.hdr.Len >= uint32(unsafe.Sizeof(writeIn{})) && m.hdr.Opcode == opWrite {
- m.hdr.Len = uint32(n)
- }
-
- if m.hdr.Len != uint32(n) {
- return nil, fmt.Errorf("fuse: read %d opcode %d but expected %d", n, m.hdr.Opcode, m.hdr.Len)
- }
-
- m.off = inHeaderSize
-
- // Convert to data structures.
- // Do not trust kernel to hand us well-formed data.
- var req Request
- switch m.hdr.Opcode {
- default:
- println("No opcode", m.hdr.Opcode)
- goto unrecognized
-
- case opLookup:
- buf := m.bytes()
- n := len(buf)
- if n == 0 || buf[n-1] != '\x00' {
- goto corrupt
- }
- req = &LookupRequest{
- Header: m.Header(),
- Name: string(buf[:n-1]),
- }
-
- case opForget:
- in := (*forgetIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &ForgetRequest{
- Header: m.Header(),
- N: in.Nlookup,
- }
-
- case opGetattr:
- req = &GetattrRequest{
- Header: m.Header(),
- }
-
- case opSetattr:
- in := (*setattrIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &SetattrRequest{
- Header: m.Header(),
- Valid: SetattrValid(in.Valid),
- Handle: HandleID(in.Fh),
- Size: in.Size,
- Atime: time.Unix(int64(in.Atime), int64(in.AtimeNsec)),
- Mtime: time.Unix(int64(in.Mtime), int64(in.MtimeNsec)),
- Mode: fileMode(in.Mode),
- Uid: in.Uid,
- Gid: in.Gid,
- Bkuptime: in.BkupTime(),
- Chgtime: in.Chgtime(),
- Flags: in.Flags(),
- }
-
- case opReadlink:
- if len(m.bytes()) > 0 {
- goto corrupt
- }
- req = &ReadlinkRequest{
- Header: m.Header(),
- }
-
- case opSymlink:
- // m.bytes() is "newName\0target\0"
- names := m.bytes()
- if len(names) == 0 || names[len(names)-1] != 0 {
- goto corrupt
- }
- i := bytes.IndexByte(names, '\x00')
- if i < 0 {
- goto corrupt
- }
- newName, target := names[0:i], names[i+1:len(names)-1]
- req = &SymlinkRequest{
- Header: m.Header(),
- NewName: string(newName),
- Target: string(target),
- }
-
- case opLink:
- in := (*linkIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- newName := m.bytes()[unsafe.Sizeof(*in):]
- if len(newName) < 2 || newName[len(newName)-1] != 0 {
- goto corrupt
- }
- newName = newName[:len(newName)-1]
- req = &LinkRequest{
- Header: m.Header(),
- OldNode: NodeID(in.Oldnodeid),
- NewName: string(newName),
- }
-
- case opMknod:
- in := (*mknodIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- name := m.bytes()[unsafe.Sizeof(*in):]
- if len(name) < 2 || name[len(name)-1] != '\x00' {
- goto corrupt
- }
- name = name[:len(name)-1]
- req = &MknodRequest{
- Header: m.Header(),
- Mode: fileMode(in.Mode),
- Rdev: in.Rdev,
- Name: string(name),
- }
-
- case opMkdir:
- in := (*mkdirIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- name := m.bytes()[unsafe.Sizeof(*in):]
- i := bytes.IndexByte(name, '\x00')
- if i < 0 {
- goto corrupt
- }
- req = &MkdirRequest{
- Header: m.Header(),
- Name: string(name[:i]),
- Mode: fileMode(in.Mode) | os.ModeDir,
- }
-
- case opUnlink, opRmdir:
- buf := m.bytes()
- n := len(buf)
- if n == 0 || buf[n-1] != '\x00' {
- goto corrupt
- }
- req = &RemoveRequest{
- Header: m.Header(),
- Name: string(buf[:n-1]),
- Dir: m.hdr.Opcode == opRmdir,
- }
-
- case opRename:
- in := (*renameIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- newDirNodeID := NodeID(in.Newdir)
- oldNew := m.bytes()[unsafe.Sizeof(*in):]
- // oldNew should be "old\x00new\x00"
- if len(oldNew) < 4 {
- goto corrupt
- }
- if oldNew[len(oldNew)-1] != '\x00' {
- goto corrupt
- }
- i := bytes.IndexByte(oldNew, '\x00')
- if i < 0 {
- goto corrupt
- }
- oldName, newName := string(oldNew[:i]), string(oldNew[i+1:len(oldNew)-1])
- // log.Printf("RENAME: newDirNode = %d; old = %q, new = %q", newDirNodeID, oldName, newName)
- req = &RenameRequest{
- Header: m.Header(),
- NewDir: newDirNodeID,
- OldName: oldName,
- NewName: newName,
- }
-
- case opOpendir, opOpen:
- in := (*openIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &OpenRequest{
- Header: m.Header(),
- Dir: m.hdr.Opcode == opOpendir,
- Flags: in.Flags,
- Mode: fileMode(in.Mode),
- }
-
- case opRead, opReaddir:
- in := (*readIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &ReadRequest{
- Header: m.Header(),
- Dir: m.hdr.Opcode == opReaddir,
- Handle: HandleID(in.Fh),
- Offset: int64(in.Offset),
- Size: int(in.Size),
- }
-
- case opWrite:
- in := (*writeIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- r := &WriteRequest{
- Header: m.Header(),
- Handle: HandleID(in.Fh),
- Offset: int64(in.Offset),
- Flags: WriteFlags(in.WriteFlags),
- }
- buf := m.bytes()[unsafe.Sizeof(*in):]
- if uint32(len(buf)) < in.Size {
- goto corrupt
- }
- r.Data = buf
- req = r
-
- case opStatfs:
- req = &StatfsRequest{
- Header: m.Header(),
- }
-
- case opRelease, opReleasedir:
- in := (*releaseIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &ReleaseRequest{
- Header: m.Header(),
- Dir: m.hdr.Opcode == opReleasedir,
- Handle: HandleID(in.Fh),
- Flags: in.Flags,
- ReleaseFlags: ReleaseFlags(in.ReleaseFlags),
- LockOwner: in.LockOwner,
- }
-
- case opFsync:
- in := (*fsyncIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &FsyncRequest{
- Header: m.Header(),
- Handle: HandleID(in.Fh),
- Flags: in.FsyncFlags,
- }
-
- case opSetxattr:
- var size uint32
- var r *SetxattrRequest
- if runtime.GOOS == "darwin" {
- in := (*setxattrInOSX)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- r = &SetxattrRequest{
- Flags: in.Flags,
- Position: in.Position,
- }
- size = in.Size
- m.off += int(unsafe.Sizeof(*in))
- } else {
- in := (*setxattrIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- r = &SetxattrRequest{}
- size = in.Size
- m.off += int(unsafe.Sizeof(*in))
- }
- r.Header = m.Header()
- name := m.bytes()
- i := bytes.IndexByte(name, '\x00')
- if i < 0 {
- goto corrupt
- }
- r.Name = string(name[:i])
- r.Xattr = name[i+1:]
- if uint32(len(r.Xattr)) < size {
- goto corrupt
- }
- r.Xattr = r.Xattr[:size]
- req = r
-
- case opGetxattr:
- if runtime.GOOS == "darwin" {
- in := (*getxattrInOSX)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &GetxattrRequest{
- Header: m.Header(),
- Size: in.Size,
- Position: in.Position,
- }
- } else {
- in := (*getxattrIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &GetxattrRequest{
- Header: m.Header(),
- Size: in.Size,
- }
- }
-
- case opListxattr:
- if runtime.GOOS == "darwin" {
- in := (*getxattrInOSX)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &ListxattrRequest{
- Header: m.Header(),
- Size: in.Size,
- Position: in.Position,
- }
- } else {
- in := (*getxattrIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &ListxattrRequest{
- Header: m.Header(),
- Size: in.Size,
- }
- }
-
- case opRemovexattr:
- buf := m.bytes()
- n := len(buf)
- if n == 0 || buf[n-1] != '\x00' {
- goto corrupt
- }
- req = &RemovexattrRequest{
- Header: m.Header(),
- Name: string(buf[:n-1]),
- }
-
- case opFlush:
- in := (*flushIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &FlushRequest{
- Header: m.Header(),
- Handle: HandleID(in.Fh),
- Flags: in.FlushFlags,
- LockOwner: in.LockOwner,
- }
-
- case opInit:
- in := (*initIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &InitRequest{
- Header: m.Header(),
- Major: in.Major,
- Minor: in.Minor,
- MaxReadahead: in.MaxReadahead,
- Flags: InitFlags(in.Flags),
- }
-
- case opFsyncdir:
- panic("opFsyncdir")
- case opGetlk:
- panic("opGetlk")
- case opSetlk:
- panic("opSetlk")
- case opSetlkw:
- panic("opSetlkw")
-
- case opAccess:
- in := (*accessIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- req = &AccessRequest{
- Header: m.Header(),
- Mask: in.Mask,
- }
-
- case opCreate:
- in := (*openIn)(m.data())
- if m.len() < unsafe.Sizeof(*in) {
- goto corrupt
- }
- name := m.bytes()[unsafe.Sizeof(*in):]
- i := bytes.IndexByte(name, '\x00')
- if i < 0 {
- goto corrupt
- }
- req = &CreateRequest{
- Header: m.Header(),
- Flags: in.Flags,
- Mode: fileMode(in.Mode),
- Name: string(name[:i]),
- }
-
- case opInterrupt:
- panic("opInterrupt")
- case opBmap:
- panic("opBmap")
-
- case opDestroy:
- req = &DestroyRequest{
- Header: m.Header(),
- }
-
- // OS X
- case opSetvolname:
- panic("opSetvolname")
- case opGetxtimes:
- panic("opGetxtimes")
- case opExchange:
- panic("opExchange")
- }
-
- return req, nil
-
-corrupt:
- println("malformed message")
- return nil, fmt.Errorf("fuse: malformed message")
-
-unrecognized:
- // Unrecognized message.
- // Assume higher-level code will send a "no idea what you mean" error.
- h := m.Header()
- return &h, nil
-}
-
-func (c *Conn) respond(out *outHeader, n uintptr) {
- c.wio.Lock()
- defer c.wio.Unlock()
- out.Len = uint32(n)
- msg := (*[1 << 30]byte)(unsafe.Pointer(out))[:n]
- nn, err := syscall.Write(c.fd, msg)
- if nn != len(msg) || err != nil {
- log.Printf("RESPOND WRITE: %d %v", nn, err)
- log.Printf("with stack: %s", stack())
- }
-}
-
-func (c *Conn) respondData(out *outHeader, n uintptr, data []byte) {
- c.wio.Lock()
- defer c.wio.Unlock()
- // TODO: use writev
- out.Len = uint32(n + uintptr(len(data)))
- msg := make([]byte, out.Len)
- copy(msg, (*[1 << 30]byte)(unsafe.Pointer(out))[:n])
- copy(msg[n:], data)
- syscall.Write(c.fd, msg)
-}
-
-// An InitRequest is the first request sent on a FUSE file system.
-type InitRequest struct {
- Header
- Major uint32
- Minor uint32
- MaxReadahead uint32
- Flags InitFlags
-}
-
-func (r *InitRequest) String() string {
- return fmt.Sprintf("Init [%s] %d.%d ra=%d fl=%v", &r.Header, r.Major, r.Minor, r.MaxReadahead, r.Flags)
-}
-
-// An InitResponse is the response to an InitRequest.
-type InitResponse struct {
- MaxReadahead uint32
- Flags InitFlags
- MaxWrite uint32
-}
-
-func (r *InitResponse) String() string {
- return fmt.Sprintf("Init %+v", *r)
-}
-
-// Respond replies to the request with the given response.
-func (r *InitRequest) Respond(resp *InitResponse) {
- out := &initOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Major: kernelVersion,
- Minor: kernelMinorVersion,
- MaxReadahead: resp.MaxReadahead,
- Flags: uint32(resp.Flags),
- MaxWrite: resp.MaxWrite,
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A StatfsRequest requests information about the mounted file system.
-type StatfsRequest struct {
- Header
-}
-
-func (r *StatfsRequest) String() string {
- return fmt.Sprintf("Statfs [%s]\n", &r.Header)
-}
-
-// Respond replies to the request with the given response.
-func (r *StatfsRequest) Respond(resp *StatfsResponse) {
- out := &statfsOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- St: kstatfs{
- Blocks: resp.Blocks,
- Bfree: resp.Bfree,
- Bavail: resp.Bavail,
- Files: resp.Files,
- Bsize: resp.Bsize,
- Namelen: resp.Namelen,
- Frsize: resp.Frsize,
- },
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A StatfsResponse is the response to a StatfsRequest.
-type StatfsResponse struct {
- Blocks uint64 // Total data blocks in file system.
- Bfree uint64 // Free blocks in file system.
- Bavail uint64 // Free blocks in file system if you're not root.
- Files uint64 // Total files in file system.
- Ffree uint64 // Free files in file system.
- Bsize uint32 // Block size
- Namelen uint32 // Maximum file name length?
- Frsize uint32 // ?
-}
-
-func (r *StatfsResponse) String() string {
- return fmt.Sprintf("Statfs %+v", *r)
-}
-
-// An AccessRequest asks whether the file can be accessed
-// for the purpose specified by the mask.
-type AccessRequest struct {
- Header
- Mask uint32
-}
-
-func (r *AccessRequest) String() string {
- return fmt.Sprintf("Access [%s] mask=%#x", &r.Header, r.Mask)
-}
-
-// Respond replies to the request indicating that access is allowed.
-// To deny access, use RespondError.
-func (r *AccessRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// An Attr is the metadata for a single file or directory.
-type Attr struct {
- Inode uint64 // inode number
- Size uint64 // size in bytes
- Blocks uint64 // size in blocks
- Atime time.Time // time of last access
- Mtime time.Time // time of last modification
- Ctime time.Time // time of last inode change
- Crtime time.Time // time of creation (OS X only)
- Mode os.FileMode // file mode
- Nlink uint32 // number of links
- Uid uint32 // owner uid
- Gid uint32 // group gid
- Rdev uint32 // device numbers
- Flags uint32 // chflags(2) flags (OS X only)
-}
-
-func unix(t time.Time) (sec uint64, nsec uint32) {
- nano := t.UnixNano()
- sec = uint64(nano / 1e9)
- nsec = uint32(nano % 1e9)
- return
-}
-
-func (a *Attr) attr() (out attr) {
- out.Ino = a.Inode
- out.Size = a.Size
- out.Blocks = a.Blocks
- out.Atime, out.AtimeNsec = unix(a.Atime)
- out.Mtime, out.MtimeNsec = unix(a.Mtime)
- out.Ctime, out.CtimeNsec = unix(a.Ctime)
- out.SetCrtime(unix(a.Crtime))
- out.Mode = uint32(a.Mode) & 0777
- switch {
- default:
- out.Mode |= syscall.S_IFREG
- case a.Mode&os.ModeDir != 0:
- out.Mode |= syscall.S_IFDIR
- case a.Mode&os.ModeDevice != 0:
- if a.Mode&os.ModeCharDevice != 0 {
- out.Mode |= syscall.S_IFCHR
- } else {
- out.Mode |= syscall.S_IFBLK
- }
- case a.Mode&os.ModeNamedPipe != 0:
- out.Mode |= syscall.S_IFIFO
- case a.Mode&os.ModeSymlink != 0:
- out.Mode |= syscall.S_IFLNK
- case a.Mode&os.ModeSocket != 0:
- out.Mode |= syscall.S_IFSOCK
- }
- if a.Mode&os.ModeSetuid != 0 {
- out.Mode |= syscall.S_ISUID
- }
- if a.Mode&os.ModeSetgid != 0 {
- out.Mode |= syscall.S_ISGID
- }
- out.Nlink = a.Nlink
- if out.Nlink < 1 {
- out.Nlink = 1
- }
- out.Uid = a.Uid
- out.Gid = a.Gid
- out.Rdev = a.Rdev
- out.SetFlags(a.Flags)
-
- return
-}
-
-// A GetattrRequest asks for the metadata for the file denoted by r.Node.
-type GetattrRequest struct {
- Header
-}
-
-func (r *GetattrRequest) String() string {
- return fmt.Sprintf("Getattr [%s]", &r.Header)
-}
-
-// Respond replies to the request with the given response.
-func (r *GetattrRequest) Respond(resp *GetattrResponse) {
- out := &attrOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A GetattrResponse is the response to a GetattrRequest.
-type GetattrResponse struct {
- AttrValid time.Duration // how long Attr can be cached
- Attr Attr // file attributes
-}
-
-func (r *GetattrResponse) String() string {
- return fmt.Sprintf("Getattr %+v", *r)
-}
-
-// A GetxattrRequest asks for the extended attributes associated with r.Node.
-type GetxattrRequest struct {
- Header
- Size uint32 // maximum size to return
- Position uint32 // offset within extended attributes
-}
-
-func (r *GetxattrRequest) String() string {
- return fmt.Sprintf("Getxattr [%s] %d @%d", &r.Header, r.Size, r.Position)
-}
-
-// Respond replies to the request with the given response.
-func (r *GetxattrRequest) Respond(resp *GetxattrResponse) {
- out := &getxattrOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Size: uint32(len(resp.Xattr)),
- }
- r.Conn.respondData(&out.outHeader, unsafe.Sizeof(*out), resp.Xattr)
-}
-
-// A GetxattrResponse is the response to a GetxattrRequest.
-type GetxattrResponse struct {
- Xattr []byte
-}
-
-func (r *GetxattrResponse) String() string {
- return fmt.Sprintf("Getxattr %x", r.Xattr)
-}
-
-// A ListxattrRequest asks to list the extended attributes associated with r.Node.
-type ListxattrRequest struct {
- Header
- Size uint32 // maximum size to return
- Position uint32 // offset within attribute list
-}
-
-func (r *ListxattrRequest) String() string {
- return fmt.Sprintf("Listxattr [%s] %d @%d", &r.Header, r.Size, r.Position)
-}
-
-// Respond replies to the request with the given response.
-func (r *ListxattrRequest) Respond(resp *ListxattrResponse) {
- out := &getxattrOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Size: uint32(len(resp.Xattr)),
- }
- r.Conn.respondData(&out.outHeader, unsafe.Sizeof(*out), resp.Xattr)
-}
-
-// A ListxattrResponse is the response to a ListxattrRequest.
-type ListxattrResponse struct {
- Xattr []byte
-}
-
-func (r *ListxattrResponse) String() string {
- return fmt.Sprintf("Listxattr %x", r.Xattr)
-}
-
-// A RemovexattrRequest asks to remove an extended attribute associated with r.Node.
-type RemovexattrRequest struct {
- Header
- Name string // name of extended attribute
-}
-
-func (r *RemovexattrRequest) String() string {
- return fmt.Sprintf("Removexattr [%s] %q", &r.Header, r.Name)
-}
-
-// Respond replies to the request, indicating that the attribute was removed.
-func (r *RemovexattrRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A SetxattrRequest asks to set an extended attribute associated with a file.
-type SetxattrRequest struct {
- Header
- Flags uint32
- Position uint32 // OS X only
- Name string
- Xattr []byte
-}
-
-func (r *SetxattrRequest) String() string {
- return fmt.Sprintf("Setxattr [%s] %q %x fl=%v @%#x", &r.Header, r.Name, r.Xattr, r.Flags, r.Position)
-}
-
-// Respond replies to the request, indicating that the extended attribute was set.
-func (r *SetxattrRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A LookupRequest asks to look up the given name in the directory named by r.Node.
-type LookupRequest struct {
- Header
- Name string
-}
-
-func (r *LookupRequest) String() string {
- return fmt.Sprintf("Lookup [%s] %q", &r.Header, r.Name)
-}
-
-// Respond replies to the request with the given response.
-func (r *LookupRequest) Respond(resp *LookupResponse) {
- out := &entryOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A LookupResponse is the response to a LookupRequest.
-type LookupResponse struct {
- Node NodeID
- Generation uint64
- EntryValid time.Duration
- AttrValid time.Duration
- Attr Attr
-}
-
-func (r *LookupResponse) String() string {
- return fmt.Sprintf("Lookup %+v", *r)
-}
-
-// An OpenRequest asks to open a file or directory
-type OpenRequest struct {
- Header
- Dir bool // is this Opendir?
- Flags uint32
- Mode os.FileMode
-}
-
-func (r *OpenRequest) String() string {
- return fmt.Sprintf("Open [%s] dir=%v fl=%v mode=%v", &r.Header, r.Dir, r.Flags, r.Mode)
-}
-
-// Respond replies to the request with the given response.
-func (r *OpenRequest) Respond(resp *OpenResponse) {
- out := &openOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Fh: uint64(resp.Handle),
- OpenFlags: uint32(resp.Flags),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A OpenResponse is the response to a OpenRequest.
-type OpenResponse struct {
- Handle HandleID
- Flags OpenFlags
-}
-
-func (r *OpenResponse) String() string {
- return fmt.Sprintf("Open %+v", *r)
-}
-
-// A CreateRequest asks to create and open a file (not a directory).
-type CreateRequest struct {
- Header
- Name string
- Flags uint32
- Mode os.FileMode
-}
-
-func (r *CreateRequest) String() string {
- return fmt.Sprintf("Create [%s] %q fl=%v mode=%v", &r.Header, r.Name, r.Flags, r.Mode)
-}
-
-// Respond replies to the request with the given response.
-func (r *CreateRequest) Respond(resp *CreateResponse) {
- out := &createOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
-
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
-
- Fh: uint64(resp.Handle),
- OpenFlags: uint32(resp.Flags),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A CreateResponse is the response to a CreateRequest.
-// It describes the created node and opened handle.
-type CreateResponse struct {
- LookupResponse
- OpenResponse
-}
-
-func (r *CreateResponse) String() string {
- return fmt.Sprintf("Create %+v", *r)
-}
-
-// A MkdirRequest asks to create (but not open) a directory.
-type MkdirRequest struct {
- Header
- Name string
- Mode os.FileMode
-}
-
-func (r *MkdirRequest) String() string {
- return fmt.Sprintf("Mkdir [%s] %q mode=%v", &r.Header, r.Name, r.Mode)
-}
-
-// Respond replies to the request with the given response.
-func (r *MkdirRequest) Respond(resp *MkdirResponse) {
- out := &entryOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A MkdirResponse is the response to a MkdirRequest.
-type MkdirResponse struct {
- LookupResponse
-}
-
-func (r *MkdirResponse) String() string {
- return fmt.Sprintf("Mkdir %+v", *r)
-}
-
-// A ReadRequest asks to read from an open file.
-type ReadRequest struct {
- Header
- Dir bool // is this Readdir?
- Handle HandleID
- Offset int64
- Size int
-}
-
-func (r *ReadRequest) handle() HandleID {
- return r.Handle
-}
-
-func (r *ReadRequest) String() string {
- return fmt.Sprintf("Read [%s] %#x %d @%#x dir=%v", &r.Header, r.Handle, r.Size, r.Offset, r.Dir)
-}
-
-// Respond replies to the request with the given response.
-func (r *ReadRequest) Respond(resp *ReadResponse) {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respondData(out, unsafe.Sizeof(*out), resp.Data)
-}
-
-// A ReadResponse is the response to a ReadRequest.
-type ReadResponse struct {
- Data []byte
-}
-
-func (r *ReadResponse) String() string {
- return fmt.Sprintf("Read %x", r.Data)
-}
-
-// A ReleaseRequest asks to release (close) an open file handle.
-type ReleaseRequest struct {
- Header
- Dir bool // is this Releasedir?
- Handle HandleID
- Flags uint32 // flags from OpenRequest
- ReleaseFlags ReleaseFlags
- LockOwner uint32
-}
-
-func (r *ReleaseRequest) handle() HandleID {
- return r.Handle
-}
-
-func (r *ReleaseRequest) String() string {
- return fmt.Sprintf("Release [%s] %#x fl=%v rfl=%v owner=%#x", &r.Header, r.Handle, r.Flags, r.ReleaseFlags, r.LockOwner)
-}
-
-// Respond replies to the request, indicating that the handle has been released.
-func (r *ReleaseRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A DestroyRequest is sent by the kernel when unmounting the file system.
-// No more requests will be received after this one, but it should still be
-// responded to.
-type DestroyRequest struct {
- Header
-}
-
-func (r *DestroyRequest) String() string {
- return fmt.Sprintf("Destroy [%s]", &r.Header)
-}
-
-// Respond replies to the request.
-func (r *DestroyRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A ForgetRequest is sent by the kernel when forgetting about r.Node
-// as returned by r.N lookup requests.
-type ForgetRequest struct {
- Header
- N uint64
-}
-
-func (r *ForgetRequest) String() string {
- return fmt.Sprintf("Forget [%s] %d", &r.Header, r.N)
-}
-
-// Respond replies to the request, indicating that the forgetfulness has been recorded.
-func (r *ForgetRequest) Respond() {
- // Don't reply to forget messages.
-}
-
-// A Dirent represents a single directory entry.
-type Dirent struct {
- Inode uint64 // inode this entry names
- Type uint32 // ?
- Name string // name of entry
-}
-
-// AppendDirent appends the encoded form of a directory entry to data
-// and returns the resulting slice.
-func AppendDirent(data []byte, dir Dirent) []byte {
- de := dirent{
- Ino: dir.Inode,
- Namelen: uint32(len(dir.Name)),
- Type: dir.Type,
- }
- de.Off = uint64(len(data) + direntSize + (len(dir.Name)+7)&^7)
- data = append(data, (*[direntSize]byte)(unsafe.Pointer(&de))[:]...)
- data = append(data, dir.Name...)
- n := direntSize + uintptr(len(dir.Name))
- if n%8 != 0 {
- var pad [8]byte
- data = append(data, pad[:8-n%8]...)
- }
- return data
-}
-
-// A WriteRequest asks to write to an open file.
-type WriteRequest struct {
- Header
- Handle HandleID
- Offset int64
- Data []byte
- Flags WriteFlags
-}
-
-func (r *WriteRequest) String() string {
- return fmt.Sprintf("Write [%s] %#x %d @%d fl=%v", &r.Header, r.Handle, len(r.Data), r.Offset, r.Flags)
-}
-
-// Respond replies to the request with the given response.
-func (r *WriteRequest) Respond(resp *WriteResponse) {
- out := &writeOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Size: uint32(resp.Size),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-func (r *WriteRequest) handle() HandleID {
- return r.Handle
-}
-
-// A WriteResponse replies to a write indicating how many bytes were written.
-type WriteResponse struct {
- Size int
-}
-
-func (r *WriteResponse) String() string {
- return fmt.Sprintf("Write %+v", *r)
-}
-
-// A SetattrRequest asks to change one or more attributes associated with a file,
-// as indicated by Valid.
-type SetattrRequest struct {
- Header
- Valid SetattrValid
- Handle HandleID
- Size uint64
- Atime time.Time
- Mtime time.Time
- Mode os.FileMode
- Uid uint32
- Gid uint32
-
- // OS X only
- Bkuptime time.Time
- Chgtime time.Time
- Crtime time.Time
- Flags uint32 // see chflags(2)
-}
-
-func (r *SetattrRequest) String() string {
- var buf bytes.Buffer
- fmt.Fprintf(&buf, "Setattr [%s]", &r.Header)
- if r.Valid.Mode() {
- fmt.Fprintf(&buf, " mode=%v", r.Mode)
- }
- if r.Valid.Uid() {
- fmt.Fprintf(&buf, " uid=%d", r.Uid)
- }
- if r.Valid.Gid() {
- fmt.Fprintf(&buf, " gid=%d", r.Gid)
- }
- if r.Valid.Size() {
- fmt.Fprintf(&buf, " size=%d", r.Size)
- }
- if r.Valid.Atime() {
- fmt.Fprintf(&buf, " atime=%v", r.Atime)
- }
- if r.Valid.Mtime() {
- fmt.Fprintf(&buf, " mtime=%v", r.Mtime)
- }
- if r.Valid.Handle() {
- fmt.Fprintf(&buf, " handle=%#x", r.Handle)
- } else {
- fmt.Fprintf(&buf, " handle=INVALID-%#x", r.Handle)
- }
- if r.Valid.Crtime() {
- fmt.Fprintf(&buf, " crtime=%v", r.Crtime)
- }
- if r.Valid.Chgtime() {
- fmt.Fprintf(&buf, " chgtime=%v", r.Chgtime)
- }
- if r.Valid.Bkuptime() {
- fmt.Fprintf(&buf, " bkuptime=%v", r.Bkuptime)
- }
- if r.Valid.Flags() {
- fmt.Fprintf(&buf, " flags=%#x", r.Flags)
- }
- return buf.String()
-}
-
-func (r *SetattrRequest) handle() HandleID {
- if r.Valid.Handle() {
- return r.Handle
- }
- return 0
-}
-
-// Respond replies to the request with the given response,
-// giving the updated attributes.
-func (r *SetattrRequest) Respond(resp *SetattrResponse) {
- out := &attrOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A SetattrResponse is the response to a SetattrRequest.
-type SetattrResponse struct {
- AttrValid time.Duration // how long Attr can be cached
- Attr Attr // file attributes
-}
-
-func (r *SetattrResponse) String() string {
- return fmt.Sprintf("Setattr %+v", *r)
-}
-
-// A FlushRequest asks for the current state of an open file to be flushed
-// to storage, as when a file descriptor is being closed. A single opened Handle
-// may receive multiple FlushRequests over its lifetime.
-type FlushRequest struct {
- Header
- Handle HandleID
- Flags uint32
- LockOwner uint64
-}
-
-func (r *FlushRequest) String() string {
- return fmt.Sprintf("Flush [%s] %#x fl=%#x lk=%#x", &r.Header, r.Handle, r.Flags, r.LockOwner)
-}
-
-func (r *FlushRequest) handle() HandleID {
- return r.Handle
-}
-
-// Respond replies to the request, indicating that the flush succeeded.
-func (r *FlushRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A RemoveRequest asks to remove a file or directory.
-type RemoveRequest struct {
- Header
- Name string // name of extended attribute
- Dir bool // is this rmdir?
-}
-
-func (r *RemoveRequest) String() string {
- return fmt.Sprintf("Remove [%s] %q dir=%v", &r.Header, r.Name, r.Dir)
-}
-
-// Respond replies to the request, indicating that the file was removed.
-func (r *RemoveRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-// A SymlinkRequest is a request to create a symlink making NewName point to Target.
-type SymlinkRequest struct {
- Header
- NewName, Target string
-}
-
-func (r *SymlinkRequest) String() string {
- return fmt.Sprintf("Symlink [%s] from %q to target %q", &r.Header, r.NewName, r.Target)
-}
-
-func (r *SymlinkRequest) handle() HandleID {
- return 0
-}
-
-// Respond replies to the request, indicating that the symlink was created.
-func (r *SymlinkRequest) Respond(resp *SymlinkResponse) {
- out := &entryOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A SymlinkResponse is the response to a SymlinkRequest.
-type SymlinkResponse struct {
- LookupResponse
-}
-
-// A ReadlinkRequest is a request to read a symlink's target.
-type ReadlinkRequest struct {
- Header
-}
-
-func (r *ReadlinkRequest) String() string {
- return fmt.Sprintf("Readlink [%s]", &r.Header)
-}
-
-func (r *ReadlinkRequest) handle() HandleID {
- return 0
-}
-
-func (r *ReadlinkRequest) Respond(target string) {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respondData(out, unsafe.Sizeof(*out), []byte(target))
-}
-
-// A LinkRequest is a request to create a hard link.
-type LinkRequest struct {
- Header
- OldNode NodeID
- NewName string
-}
-
-func (r *LinkRequest) Respond(resp *LookupResponse) {
- out := &entryOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A RenameRequest is a request to rename a file.
-type RenameRequest struct {
- Header
- NewDir NodeID
- OldName, NewName string
-}
-
-func (r *RenameRequest) handle() HandleID {
- return 0
-}
-
-func (r *RenameRequest) String() string {
- return fmt.Sprintf("Rename [%s] from %q to dirnode %d %q", &r.Header, r.OldName, r.NewDir, r.NewName)
-}
-
-func (r *RenameRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-type MknodRequest struct {
- Header
- Name string
- Mode os.FileMode
- Rdev uint32
-}
-
-func (r *MknodRequest) String() string {
- return fmt.Sprintf("Mknod [%s] Name %q mode %v rdev %d", &r.Header, r.Name, r.Mode, r.Rdev)
-}
-
-func (r *MknodRequest) Respond(resp *LookupResponse) {
- out := &entryOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- Nodeid: uint64(resp.Node),
- Generation: resp.Generation,
- EntryValid: uint64(resp.EntryValid / time.Second),
- EntryValidNsec: uint32(resp.EntryValid % time.Second / time.Nanosecond),
- AttrValid: uint64(resp.AttrValid / time.Second),
- AttrValidNsec: uint32(resp.AttrValid % time.Second / time.Nanosecond),
- Attr: resp.Attr.attr(),
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-type FsyncRequest struct {
- Header
- Handle HandleID
- Flags uint32
-}
-
-func (r *FsyncRequest) String() string {
- return fmt.Sprintf("Fsync [%s] Handle %v Flags %v", &r.Header, r.Handle, r.Flags)
-}
-
-func (r *FsyncRequest) Respond() {
- out := &outHeader{Unique: uint64(r.ID)}
- r.Conn.respond(out, unsafe.Sizeof(*out))
-}
-
-/*{
-
-// A XXXRequest xxx.
-type XXXRequest struct {
- Header
- xxx
-}
-
-func (r *XXXRequest) String() string {
- return fmt.Sprintf("XXX [%s] xxx", &r.Header)
-}
-
-func (r *XXXRequest) handle() HandleID {
- return r.Handle
-}
-
-// Respond replies to the request with the given response.
-func (r *XXXRequest) Respond(resp *XXXResponse) {
- out := &xxxOut{
- outHeader: outHeader{Unique: uint64(r.ID)},
- xxx,
- }
- r.Conn.respond(&out.outHeader, unsafe.Sizeof(*out))
-}
-
-// A XXXResponse is the response to a XXXRequest.
-type XXXResponse struct {
- xxx
-}
-
-func (r *XXXResponse) String() string {
- return fmt.Sprintf("XXX %+v", *r)
-}
-
- }
-*/
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel.go b/vendor/github.com/mattermost/rsc/fuse/fuse_kernel.go
deleted file mode 100644
index a57360e63..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel.go
+++ /dev/null
@@ -1,539 +0,0 @@
-// Copyright 2011 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 file.
-
-// Derived from FUSE's fuse_kernel.h
-/*
- This file defines the kernel interface of FUSE
- Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
-
-
- This -- and only this -- header file may also be distributed under
- the terms of the BSD Licence as follows:
-
- Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. 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.
-
- THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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.
-*/
-
-package fuse
-
-import (
- "fmt"
- "unsafe"
-)
-
-// Version is the FUSE version implemented by the package.
-const Version = "7.8"
-
-const (
- kernelVersion = 7
- kernelMinorVersion = 8
- rootID = 1
-)
-
-type kstatfs struct {
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Bsize uint32
- Namelen uint32
- Frsize uint32
- Padding uint32
- Spare [6]uint32
-}
-
-type fileLock struct {
- Start uint64
- End uint64
- Type uint32
- Pid uint32
-}
-
-// The SetattrValid are bit flags describing which fields in the SetattrRequest
-// are included in the change.
-type SetattrValid uint32
-
-const (
- SetattrMode SetattrValid = 1 << 0
- SetattrUid SetattrValid = 1 << 1
- SetattrGid SetattrValid = 1 << 2
- SetattrSize SetattrValid = 1 << 3
- SetattrAtime SetattrValid = 1 << 4
- SetattrMtime SetattrValid = 1 << 5
- SetattrHandle SetattrValid = 1 << 6 // TODO: What does this mean?
-
- // Linux only(?)
- SetattrAtimeNow SetattrValid = 1 << 7
- SetattrMtimeNow SetattrValid = 1 << 8
- SetattrLockOwner SetattrValid = 1 << 9 // http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg27852.html
-
- // OS X only
- SetattrCrtime SetattrValid = 1 << 28
- SetattrChgtime SetattrValid = 1 << 29
- SetattrBkuptime SetattrValid = 1 << 30
- SetattrFlags SetattrValid = 1 << 31
-)
-
-func (fl SetattrValid) Mode() bool { return fl&SetattrMode != 0 }
-func (fl SetattrValid) Uid() bool { return fl&SetattrUid != 0 }
-func (fl SetattrValid) Gid() bool { return fl&SetattrGid != 0 }
-func (fl SetattrValid) Size() bool { return fl&SetattrSize != 0 }
-func (fl SetattrValid) Atime() bool { return fl&SetattrAtime != 0 }
-func (fl SetattrValid) Mtime() bool { return fl&SetattrMtime != 0 }
-func (fl SetattrValid) Handle() bool { return fl&SetattrHandle != 0 }
-func (fl SetattrValid) Crtime() bool { return fl&SetattrCrtime != 0 }
-func (fl SetattrValid) Chgtime() bool { return fl&SetattrChgtime != 0 }
-func (fl SetattrValid) Bkuptime() bool { return fl&SetattrBkuptime != 0 }
-func (fl SetattrValid) Flags() bool { return fl&SetattrFlags != 0 }
-
-func (fl SetattrValid) String() string {
- return flagString(uint32(fl), setattrValidNames)
-}
-
-var setattrValidNames = []flagName{
- {uint32(SetattrMode), "SetattrMode"},
- {uint32(SetattrUid), "SetattrUid"},
- {uint32(SetattrGid), "SetattrGid"},
- {uint32(SetattrSize), "SetattrSize"},
- {uint32(SetattrAtime), "SetattrAtime"},
- {uint32(SetattrMtime), "SetattrMtime"},
- {uint32(SetattrHandle), "SetattrHandle"},
- {uint32(SetattrCrtime), "SetattrCrtime"},
- {uint32(SetattrChgtime), "SetattrChgtime"},
- {uint32(SetattrBkuptime), "SetattrBkuptime"},
- {uint32(SetattrFlags), "SetattrFlags"},
-}
-
-// The OpenFlags are returned in the OpenResponse.
-type OpenFlags uint32
-
-const (
- OpenDirectIO OpenFlags = 1 << 0 // bypass page cache for this open file
- OpenKeepCache OpenFlags = 1 << 1 // don't invalidate the data cache on open
- OpenNonSeekable OpenFlags = 1 << 2 // (Linux?)
-
- OpenPurgeAttr OpenFlags = 1 << 30 // OS X
- OpenPurgeUBC OpenFlags = 1 << 31 // OS X
-)
-
-func (fl OpenFlags) String() string {
- return flagString(uint32(fl), openFlagNames)
-}
-
-var openFlagNames = []flagName{
- {uint32(OpenDirectIO), "OpenDirectIO"},
- {uint32(OpenKeepCache), "OpenKeepCache"},
- {uint32(OpenPurgeAttr), "OpenPurgeAttr"},
- {uint32(OpenPurgeUBC), "OpenPurgeUBC"},
-}
-
-// The InitFlags are used in the Init exchange.
-type InitFlags uint32
-
-const (
- InitAsyncRead InitFlags = 1 << 0
- InitPosixLocks InitFlags = 1 << 1
-
- InitCaseSensitive InitFlags = 1 << 29 // OS X only
- InitVolRename InitFlags = 1 << 30 // OS X only
- InitXtimes InitFlags = 1 << 31 // OS X only
-)
-
-type flagName struct {
- bit uint32
- name string
-}
-
-var initFlagNames = []flagName{
- {uint32(InitAsyncRead), "InitAsyncRead"},
- {uint32(InitPosixLocks), "InitPosixLocks"},
- {uint32(InitCaseSensitive), "InitCaseSensitive"},
- {uint32(InitVolRename), "InitVolRename"},
- {uint32(InitXtimes), "InitXtimes"},
-}
-
-func (fl InitFlags) String() string {
- return flagString(uint32(fl), initFlagNames)
-}
-
-func flagString(f uint32, names []flagName) string {
- var s string
-
- if f == 0 {
- return "0"
- }
-
- for _, n := range names {
- if f&n.bit != 0 {
- s += "+" + n.name
- f &^= n.bit
- }
- }
- if f != 0 {
- s += fmt.Sprintf("%+#x", f)
- }
- return s[1:]
-}
-
-// The ReleaseFlags are used in the Release exchange.
-type ReleaseFlags uint32
-
-const (
- ReleaseFlush ReleaseFlags = 1 << 0
-)
-
-func (fl ReleaseFlags) String() string {
- return flagString(uint32(fl), releaseFlagNames)
-}
-
-var releaseFlagNames = []flagName{
- {uint32(ReleaseFlush), "ReleaseFlush"},
-}
-
-// Opcodes
-const (
- opLookup = 1
- opForget = 2 // no reply
- opGetattr = 3
- opSetattr = 4
- opReadlink = 5
- opSymlink = 6
- opMknod = 8
- opMkdir = 9
- opUnlink = 10
- opRmdir = 11
- opRename = 12
- opLink = 13
- opOpen = 14
- opRead = 15
- opWrite = 16
- opStatfs = 17
- opRelease = 18
- opFsync = 20
- opSetxattr = 21
- opGetxattr = 22
- opListxattr = 23
- opRemovexattr = 24
- opFlush = 25
- opInit = 26
- opOpendir = 27
- opReaddir = 28
- opReleasedir = 29
- opFsyncdir = 30
- opGetlk = 31
- opSetlk = 32
- opSetlkw = 33
- opAccess = 34
- opCreate = 35
- opInterrupt = 36
- opBmap = 37
- opDestroy = 38
- opIoctl = 39 // Linux?
- opPoll = 40 // Linux?
-
- // OS X
- opSetvolname = 61
- opGetxtimes = 62
- opExchange = 63
-)
-
-// The read buffer is required to be at least 8k but may be much larger
-const minReadBuffer = 8192
-
-type entryOut struct {
- outHeader
- Nodeid uint64 // Inode ID
- Generation uint64 // Inode generation
- EntryValid uint64 // Cache timeout for the name
- AttrValid uint64 // Cache timeout for the attributes
- EntryValidNsec uint32
- AttrValidNsec uint32
- Attr attr
-}
-
-type forgetIn struct {
- Nlookup uint64
-}
-
-type attrOut struct {
- outHeader
- AttrValid uint64 // Cache timeout for the attributes
- AttrValidNsec uint32
- Dummy uint32
- Attr attr
-}
-
-// OS X
-type getxtimesOut struct {
- outHeader
- Bkuptime uint64
- Crtime uint64
- BkuptimeNsec uint32
- CrtimeNsec uint32
-}
-
-type mknodIn struct {
- Mode uint32
- Rdev uint32
- // "filename\x00" follows.
-}
-
-type mkdirIn struct {
- Mode uint32
- Padding uint32
- // filename follows
-}
-
-type renameIn struct {
- Newdir uint64
- // "oldname\x00newname\x00" follows
-}
-
-// OS X
-type exchangeIn struct {
- Olddir uint64
- Newdir uint64
- Options uint64
-}
-
-type linkIn struct {
- Oldnodeid uint64
-}
-
-type setattrInCommon struct {
- Valid uint32
- Padding uint32
- Fh uint64
- Size uint64
- LockOwner uint64 // unused on OS X?
- Atime uint64
- Mtime uint64
- Unused2 uint64
- AtimeNsec uint32
- MtimeNsec uint32
- Unused3 uint32
- Mode uint32
- Unused4 uint32
- Uid uint32
- Gid uint32
- Unused5 uint32
-}
-
-type openIn struct {
- Flags uint32
- Mode uint32
-}
-
-type openOut struct {
- outHeader
- Fh uint64
- OpenFlags uint32
- Padding uint32
-}
-
-type createOut struct {
- outHeader
-
- Nodeid uint64 // Inode ID
- Generation uint64 // Inode generation
- EntryValid uint64 // Cache timeout for the name
- AttrValid uint64 // Cache timeout for the attributes
- EntryValidNsec uint32
- AttrValidNsec uint32
- Attr attr
-
- Fh uint64
- OpenFlags uint32
- Padding uint32
-}
-
-type releaseIn struct {
- Fh uint64
- Flags uint32
- ReleaseFlags uint32
- LockOwner uint32
-}
-
-type flushIn struct {
- Fh uint64
- FlushFlags uint32
- Padding uint32
- LockOwner uint64
-}
-
-type readIn struct {
- Fh uint64
- Offset uint64
- Size uint32
- Padding uint32
-}
-
-type writeIn struct {
- Fh uint64
- Offset uint64
- Size uint32
- WriteFlags uint32
-}
-
-type writeOut struct {
- outHeader
- Size uint32
- Padding uint32
-}
-
-// The WriteFlags are returned in the WriteResponse.
-type WriteFlags uint32
-
-func (fl WriteFlags) String() string {
- return flagString(uint32(fl), writeFlagNames)
-}
-
-var writeFlagNames = []flagName{}
-
-const compatStatfsSize = 48
-
-type statfsOut struct {
- outHeader
- St kstatfs
-}
-
-type fsyncIn struct {
- Fh uint64
- FsyncFlags uint32
- Padding uint32
-}
-
-type setxattrIn struct {
- Size uint32
- Flags uint32
-}
-
-type setxattrInOSX struct {
- Size uint32
- Flags uint32
-
- // OS X only
- Position uint32
- Padding uint32
-}
-
-type getxattrIn struct {
- Size uint32
- Padding uint32
-}
-
-type getxattrInOSX struct {
- Size uint32
- Padding uint32
-
- // OS X only
- Position uint32
- Padding2 uint32
-}
-
-type getxattrOut struct {
- outHeader
- Size uint32
- Padding uint32
-}
-
-type lkIn struct {
- Fh uint64
- Owner uint64
- Lk fileLock
-}
-
-type lkOut struct {
- outHeader
- Lk fileLock
-}
-
-type accessIn struct {
- Mask uint32
- Padding uint32
-}
-
-type initIn struct {
- Major uint32
- Minor uint32
- MaxReadahead uint32
- Flags uint32
-}
-
-const initInSize = int(unsafe.Sizeof(initIn{}))
-
-type initOut struct {
- outHeader
- Major uint32
- Minor uint32
- MaxReadahead uint32
- Flags uint32
- Unused uint32
- MaxWrite uint32
-}
-
-type interruptIn struct {
- Unique uint64
-}
-
-type bmapIn struct {
- Block uint64
- BlockSize uint32
- Padding uint32
-}
-
-type bmapOut struct {
- outHeader
- Block uint64
-}
-
-type inHeader struct {
- Len uint32
- Opcode uint32
- Unique uint64
- Nodeid uint64
- Uid uint32
- Gid uint32
- Pid uint32
- Padding uint32
-}
-
-const inHeaderSize = int(unsafe.Sizeof(inHeader{}))
-
-type outHeader struct {
- Len uint32
- Error int32
- Unique uint64
-}
-
-type dirent struct {
- Ino uint64
- Off uint64
- Namelen uint32
- Type uint32
- Name [0]byte
-}
-
-const direntSize = 8 + 8 + 4 + 4
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_darwin.go b/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_darwin.go
deleted file mode 100644
index f7bc37766..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_darwin.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package fuse
-
-import (
- "time"
-)
-
-type attr struct {
- Ino uint64
- Size uint64
- Blocks uint64
- Atime uint64
- Mtime uint64
- Ctime uint64
- Crtime_ uint64 // OS X only
- AtimeNsec uint32
- MtimeNsec uint32
- CtimeNsec uint32
- CrtimeNsec uint32 // OS X only
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- Flags_ uint32 // OS X only; see chflags(2)
-}
-
-func (a *attr) SetCrtime(s uint64, ns uint32) {
- a.Crtime_, a.CrtimeNsec = s, ns
-}
-
-func (a *attr) SetFlags(f uint32) {
- a.Flags_ = f
-}
-
-type setattrIn struct {
- setattrInCommon
-
- // OS X only
- Bkuptime_ uint64
- Chgtime_ uint64
- Crtime uint64
- BkuptimeNsec uint32
- ChgtimeNsec uint32
- CrtimeNsec uint32
- Flags_ uint32 // see chflags(2)
-}
-
-func (in *setattrIn) BkupTime() time.Time {
- return time.Unix(int64(in.Bkuptime_), int64(in.BkuptimeNsec))
-}
-
-func (in *setattrIn) Chgtime() time.Time {
- return time.Unix(int64(in.Chgtime_), int64(in.ChgtimeNsec))
-}
-
-func (in *setattrIn) Flags() uint32 {
- return in.Flags_
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_linux.go b/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_linux.go
deleted file mode 100644
index 914bc3063..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_linux.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package fuse
-
-import "time"
-
-type attr struct {
- Ino uint64
- Size uint64
- Blocks uint64
- Atime uint64
- Mtime uint64
- Ctime uint64
- AtimeNsec uint32
- MtimeNsec uint32
- CtimeNsec uint32
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- // Blksize uint32 // Only in protocol 7.9
- // padding_ uint32 // Only in protocol 7.9
-}
-
-func (a *attr) Crtime() time.Time {
- return time.Time{}
-}
-
-func (a *attr) SetCrtime(s uint64, ns uint32) {
- // Ignored on Linux.
-}
-
-func (a *attr) SetFlags(f uint32) {
- // Ignored on Linux.
-}
-
-type setattrIn struct {
- setattrInCommon
-}
-
-func (in *setattrIn) BkupTime() time.Time {
- return time.Time{}
-}
-
-func (in *setattrIn) Chgtime() time.Time {
- return time.Time{}
-}
-
-func (in *setattrIn) Flags() uint32 {
- return 0
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_std.go b/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_std.go
deleted file mode 100644
index 074cfd322..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse_kernel_std.go
+++ /dev/null
@@ -1 +0,0 @@
-package fuse
diff --git a/vendor/github.com/mattermost/rsc/fuse/fuse_test.go b/vendor/github.com/mattermost/rsc/fuse/fuse_test.go
deleted file mode 100644
index 61533b8c5..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/fuse_test.go
+++ /dev/null
@@ -1,594 +0,0 @@
-// Copyright 2012 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 file.
-
-package fuse
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "os/exec"
- "runtime"
- "syscall"
- "testing"
- "time"
-)
-
-var fuseRun = flag.String("fuserun", "", "which fuse test to run. runs all if empty.")
-
-// umount tries its best to unmount dir.
-func umount(dir string) {
- err := exec.Command("umount", dir).Run()
- if err != nil && runtime.GOOS == "linux" {
- exec.Command("/bin/fusermount", "-u", dir).Run()
- }
-}
-
-func TestFuse(t *testing.T) {
- Debugf = log.Printf
- dir, err := ioutil.TempDir("", "fusetest")
- if err != nil {
- t.Fatal(err)
- }
- os.MkdirAll(dir, 0777)
-
- c, err := Mount(dir)
- if err != nil {
- t.Fatal(err)
- }
- defer umount(dir)
-
- go func() {
- err := c.Serve(testFS{})
- if err != nil {
- fmt.Printf("SERVE ERROR: %v\n", err)
- }
- }()
-
- waitForMount(t, dir)
-
- for _, tt := range fuseTests {
- if *fuseRun == "" || *fuseRun == tt.name {
- t.Logf("running %T", tt.node)
- tt.node.test(dir+"/"+tt.name, t)
- }
- }
-}
-
-func waitForMount(t *testing.T, dir string) {
- // Filename to wait for in dir:
- probeEntry := *fuseRun
- if probeEntry == "" {
- probeEntry = fuseTests[0].name
- }
- for tries := 0; tries < 100; tries++ {
- _, err := os.Stat(dir + "/" + probeEntry)
- if err == nil {
- return
- }
- time.Sleep(10 * time.Millisecond)
- }
- t.Fatalf("mount did not work")
-}
-
-var fuseTests = []struct {
- name string
- node interface {
- Node
- test(string, *testing.T)
- }
-}{
- {"readAll", readAll{}},
- {"readAll1", &readAll1{}},
- {"write", &write{}},
- {"writeAll", &writeAll{}},
- {"writeAll2", &writeAll2{}},
- {"release", &release{}},
- {"mkdir1", &mkdir1{}},
- {"create1", &create1{}},
- {"create2", &create2{}},
- {"symlink1", &symlink1{}},
- {"link1", &link1{}},
- {"rename1", &rename1{}},
- {"mknod1", &mknod1{}},
-}
-
-// TO TEST:
-// Statfs
-// Lookup(*LookupRequest, *LookupResponse)
-// Getattr(*GetattrRequest, *GetattrResponse)
-// Attr with explicit inode
-// Setattr(*SetattrRequest, *SetattrResponse)
-// Access(*AccessRequest)
-// Open(*OpenRequest, *OpenResponse)
-// Getxattr, Setxattr, Listxattr, Removexattr
-// Write(*WriteRequest, *WriteResponse)
-// Flush(*FlushRequest, *FlushResponse)
-
-// Test Read calling ReadAll.
-
-type readAll struct{ file }
-
-const hi = "hello, world"
-
-func (readAll) ReadAll(intr Intr) ([]byte, Error) {
- return []byte(hi), nil
-}
-
-func (readAll) test(path string, t *testing.T) {
- data, err := ioutil.ReadFile(path)
- if err != nil {
- t.Errorf("readAll: %v", err)
- return
- }
- if string(data) != hi {
- t.Errorf("readAll = %q, want %q", data, hi)
- }
-}
-
-// Test Read.
-
-type readAll1 struct{ file }
-
-func (readAll1) Read(req *ReadRequest, resp *ReadResponse, intr Intr) Error {
- HandleRead(req, resp, []byte(hi))
- return nil
-}
-
-func (readAll1) test(path string, t *testing.T) {
- readAll{}.test(path, t)
-}
-
-// Test Write calling basic Write, with an fsync thrown in too.
-
-type write struct {
- file
- data []byte
- gotfsync bool
-}
-
-func (w *write) Write(req *WriteRequest, resp *WriteResponse, intr Intr) Error {
- w.data = append(w.data, req.Data...)
- resp.Size = len(req.Data)
- return nil
-}
-
-func (w *write) Fsync(r *FsyncRequest, intr Intr) Error {
- w.gotfsync = true
- return nil
-}
-
-func (w *write) test(path string, t *testing.T) {
- log.Printf("pre-write Create")
- f, err := os.Create(path)
- if err != nil {
- t.Fatalf("Create: %v", err)
- }
- log.Printf("pre-write Write")
- n, err := f.Write([]byte(hi))
- if err != nil {
- t.Fatalf("Write: %v", err)
- }
- if n != len(hi) {
- t.Fatalf("short write; n=%d; hi=%d", n, len(hi))
- }
-
- err = syscall.Fsync(int(f.Fd()))
- if err != nil {
- t.Fatalf("Fsync = %v", err)
- }
- if !w.gotfsync {
- t.Errorf("never received expected fsync call")
- }
-
- log.Printf("pre-write Close")
- err = f.Close()
- if err != nil {
- t.Fatalf("Close: %v", err)
- }
- log.Printf("post-write Close")
- if string(w.data) != hi {
- t.Errorf("writeAll = %q, want %q", w.data, hi)
- }
-}
-
-// Test Write calling WriteAll.
-
-type writeAll struct {
- file
- data []byte
- gotfsync bool
-}
-
-func (w *writeAll) Fsync(r *FsyncRequest, intr Intr) Error {
- w.gotfsync = true
- return nil
-}
-
-func (w *writeAll) WriteAll(data []byte, intr Intr) Error {
- w.data = data
- return nil
-}
-
-func (w *writeAll) test(path string, t *testing.T) {
- err := ioutil.WriteFile(path, []byte(hi), 0666)
- if err != nil {
- t.Fatalf("WriteFile: %v", err)
- return
- }
- if string(w.data) != hi {
- t.Errorf("writeAll = %q, want %q", w.data, hi)
- }
-}
-
-// Test Write calling Setattr+Write+Flush.
-
-type writeAll2 struct {
- file
- data []byte
- setattr bool
- flush bool
-}
-
-func (w *writeAll2) Setattr(req *SetattrRequest, resp *SetattrResponse, intr Intr) Error {
- w.setattr = true
- return nil
-}
-
-func (w *writeAll2) Flush(req *FlushRequest, intr Intr) Error {
- w.flush = true
- return nil
-}
-
-func (w *writeAll2) Write(req *WriteRequest, resp *WriteResponse, intr Intr) Error {
- w.data = append(w.data, req.Data...)
- resp.Size = len(req.Data)
- return nil
-}
-
-func (w *writeAll2) test(path string, t *testing.T) {
- err := ioutil.WriteFile(path, []byte(hi), 0666)
- if err != nil {
- t.Errorf("WriteFile: %v", err)
- return
- }
- if !w.setattr || string(w.data) != hi || !w.flush {
- t.Errorf("writeAll = %v, %q, %v, want %v, %q, %v", w.setattr, string(w.data), w.flush, true, hi, true)
- }
-}
-
-// Test Mkdir.
-
-type mkdir1 struct {
- dir
- name string
-}
-
-func (f *mkdir1) Mkdir(req *MkdirRequest, intr Intr) (Node, Error) {
- f.name = req.Name
- return &mkdir1{}, nil
-}
-
-func (f *mkdir1) test(path string, t *testing.T) {
- f.name = ""
- err := os.Mkdir(path+"/foo", 0777)
- if err != nil {
- t.Error(err)
- return
- }
- if f.name != "foo" {
- t.Error(err)
- return
- }
-}
-
-// Test Create (and fsync)
-
-type create1 struct {
- dir
- name string
- f *writeAll
-}
-
-func (f *create1) Create(req *CreateRequest, resp *CreateResponse, intr Intr) (Node, Handle, Error) {
- f.name = req.Name
- f.f = &writeAll{}
- return f.f, f.f, nil
-}
-
-func (f *create1) test(path string, t *testing.T) {
- f.name = ""
- ff, err := os.Create(path + "/foo")
- if err != nil {
- t.Errorf("create1 WriteFile: %v", err)
- return
- }
-
- err = syscall.Fsync(int(ff.Fd()))
- if err != nil {
- t.Fatalf("Fsync = %v", err)
- }
-
- if !f.f.gotfsync {
- t.Errorf("never received expected fsync call")
- }
-
- ff.Close()
- if f.name != "foo" {
- t.Errorf("create1 name=%q want foo", f.name)
- }
-}
-
-// Test Create + WriteAll + Remove
-
-type create2 struct {
- dir
- name string
- f *writeAll
- fooExists bool
-}
-
-func (f *create2) Create(req *CreateRequest, resp *CreateResponse, intr Intr) (Node, Handle, Error) {
- f.name = req.Name
- f.f = &writeAll{}
- return f.f, f.f, nil
-}
-
-func (f *create2) Lookup(name string, intr Intr) (Node, Error) {
- if f.fooExists && name == "foo" {
- return file{}, nil
- }
- return nil, ENOENT
-}
-
-func (f *create2) Remove(r *RemoveRequest, intr Intr) Error {
- if f.fooExists && r.Name == "foo" && !r.Dir {
- f.fooExists = false
- return nil
- }
- return ENOENT
-}
-
-func (f *create2) test(path string, t *testing.T) {
- f.name = ""
- err := ioutil.WriteFile(path+"/foo", []byte(hi), 0666)
- if err != nil {
- t.Fatalf("create2 WriteFile: %v", err)
- }
- if string(f.f.data) != hi {
- t.Fatalf("create2 writeAll = %q, want %q", f.f.data, hi)
- }
-
- f.fooExists = true
- log.Printf("pre-Remove")
- err = os.Remove(path + "/foo")
- if err != nil {
- t.Fatalf("Remove: %v", err)
- }
- err = os.Remove(path + "/foo")
- if err == nil {
- t.Fatalf("second Remove = nil; want some error")
- }
-}
-
-// Test symlink + readlink
-
-type symlink1 struct {
- dir
- newName, target string
-}
-
-func (f *symlink1) Symlink(req *SymlinkRequest, intr Intr) (Node, Error) {
- f.newName = req.NewName
- f.target = req.Target
- return symlink{target: req.Target}, nil
-}
-
-func (f *symlink1) test(path string, t *testing.T) {
- const target = "/some-target"
-
- err := os.Symlink(target, path+"/symlink.file")
- if err != nil {
- t.Errorf("os.Symlink: %v", err)
- return
- }
-
- if f.newName != "symlink.file" {
- t.Errorf("symlink newName = %q; want %q", f.newName, "symlink.file")
- }
- if f.target != target {
- t.Errorf("symlink target = %q; want %q", f.target, target)
- }
-
- gotName, err := os.Readlink(path + "/symlink.file")
- if err != nil {
- t.Errorf("os.Readlink: %v", err)
- return
- }
- if gotName != target {
- t.Errorf("os.Readlink = %q; want %q", gotName, target)
- }
-}
-
-// Test link
-
-type link1 struct {
- dir
- newName string
-}
-
-func (f *link1) Lookup(name string, intr Intr) (Node, Error) {
- if name == "old" {
- return file{}, nil
- }
- return nil, ENOENT
-}
-
-func (f *link1) Link(r *LinkRequest, old Node, intr Intr) (Node, Error) {
- f.newName = r.NewName
- return file{}, nil
-}
-
-func (f *link1) test(path string, t *testing.T) {
- err := os.Link(path+"/old", path+"/new")
- if err != nil {
- t.Fatalf("Link: %v", err)
- }
- if f.newName != "new" {
- t.Fatalf("saw Link for newName %q; want %q", f.newName, "new")
- }
-}
-
-// Test Rename
-
-type rename1 struct {
- dir
- renames int
-}
-
-func (f *rename1) Lookup(name string, intr Intr) (Node, Error) {
- if name == "old" {
- return file{}, nil
- }
- return nil, ENOENT
-}
-
-func (f *rename1) Rename(r *RenameRequest, newDir Node, intr Intr) Error {
- if r.OldName == "old" && r.NewName == "new" && newDir == f {
- f.renames++
- return nil
- }
- return EIO
-}
-
-func (f *rename1) test(path string, t *testing.T) {
- err := os.Rename(path+"/old", path+"/new")
- if err != nil {
- t.Fatalf("Rename: %v", err)
- }
- if f.renames != 1 {
- t.Fatalf("expected rename didn't happen")
- }
- err = os.Rename(path+"/old2", path+"/new2")
- if err == nil {
- t.Fatal("expected error on second Rename; got nil")
- }
-}
-
-// Test Release.
-
-type release struct {
- file
- did bool
-}
-
-func (r *release) Release(*ReleaseRequest, Intr) Error {
- r.did = true
- return nil
-}
-
-func (r *release) test(path string, t *testing.T) {
- r.did = false
- f, err := os.Open(path)
- if err != nil {
- t.Error(err)
- return
- }
- f.Close()
- time.Sleep(1 * time.Second)
- if !r.did {
- t.Error("Close did not Release")
- }
-}
-
-// Test mknod
-
-type mknod1 struct {
- dir
- gotr *MknodRequest
-}
-
-func (f *mknod1) Mknod(r *MknodRequest, intr Intr) (Node, Error) {
- f.gotr = r
- return fifo{}, nil
-}
-
-func (f *mknod1) test(path string, t *testing.T) {
- if os.Getuid() != 0 {
- t.Logf("skipping unless root")
- return
- }
- defer syscall.Umask(syscall.Umask(0))
- err := syscall.Mknod(path+"/node", syscall.S_IFIFO|0666, 123)
- if err != nil {
- t.Fatalf("Mknod: %v", err)
- }
- if f.gotr == nil {
- t.Fatalf("no recorded MknodRequest")
- }
- if g, e := f.gotr.Name, "node"; g != e {
- t.Errorf("got Name = %q; want %q", g, e)
- }
- if g, e := f.gotr.Rdev, uint32(123); g != e {
- if runtime.GOOS == "linux" {
- // Linux fuse doesn't echo back the rdev if the node
- // isn't a device (we're using a FIFO here, as that
- // bit is portable.)
- } else {
- t.Errorf("got Rdev = %v; want %v", g, e)
- }
- }
- if g, e := f.gotr.Mode, os.FileMode(os.ModeNamedPipe|0666); g != e {
- t.Errorf("got Mode = %v; want %v", g, e)
- }
- t.Logf("Got request: %#v", f.gotr)
-}
-
-type file struct{}
-type dir struct{}
-type fifo struct{}
-type symlink struct {
- target string
-}
-
-func (f file) Attr() Attr { return Attr{Mode: 0666} }
-func (f dir) Attr() Attr { return Attr{Mode: os.ModeDir | 0777} }
-func (f fifo) Attr() Attr { return Attr{Mode: os.ModeNamedPipe | 0666} }
-func (f symlink) Attr() Attr { return Attr{Mode: os.ModeSymlink | 0666} }
-
-func (f symlink) Readlink(*ReadlinkRequest, Intr) (string, Error) {
- return f.target, nil
-}
-
-type testFS struct{}
-
-func (testFS) Root() (Node, Error) {
- return testFS{}, nil
-}
-
-func (testFS) Attr() Attr {
- return Attr{Mode: os.ModeDir | 0555}
-}
-
-func (testFS) Lookup(name string, intr Intr) (Node, Error) {
- for _, tt := range fuseTests {
- if tt.name == name {
- return tt.node, nil
- }
- }
- return nil, ENOENT
-}
-
-func (testFS) ReadDir(intr Intr) ([]Dirent, Error) {
- var dirs []Dirent
- for _, tt := range fuseTests {
- if *fuseRun == "" || *fuseRun == tt.name {
- log.Printf("Readdir; adding %q", tt.name)
- dirs = append(dirs, Dirent{Name: tt.name})
- }
- }
- return dirs, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/hellofs/hello.go b/vendor/github.com/mattermost/rsc/fuse/hellofs/hello.go
deleted file mode 100644
index d915473f1..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/hellofs/hello.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2012 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 file.
-
-// Hellofs implements a simple "hello world" file system.
-package main
-
-import (
- "log"
- "os"
-
- "github.com/mattermost/rsc/fuse"
-)
-
-func main() {
- c, err := fuse.Mount("/mnt/hellofs")
- if err != nil {
- log.Fatal(err)
- }
-
- c.Serve(FS{})
-}
-
-// FS implements the hello world file system.
-type FS struct{}
-
-func (FS) Root() (fuse.Node, fuse.Error) {
- return Dir{}, nil
-}
-
-// Dir implements both Node and Handle for the root directory.
-type Dir struct{}
-
-func (Dir) Attr() fuse.Attr {
- return fuse.Attr{Mode: os.ModeDir | 0555}
-}
-
-func (Dir) Lookup(name string, intr fuse.Intr) (fuse.Node, fuse.Error) {
- if name == "hello" {
- return File{}, nil
- }
- return nil, fuse.ENOENT
-}
-
-var dirDirs = []fuse.Dirent{
- {Inode: 2, Name: "hello", Type: 0},
-}
-
-func (Dir) ReadDir(intr fuse.Intr) ([]fuse.Dirent, fuse.Error) {
- return dirDirs, nil
-}
-
-// File implements both Node and Handle for the hello file.
-type File struct{}
-
-func (File) Attr() fuse.Attr {
- return fuse.Attr{Mode: 0444}
-}
-
-func (File) ReadAll(intr fuse.Intr) ([]byte, fuse.Error) {
- return []byte("hello, world\n"), nil
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/mount_darwin.go b/vendor/github.com/mattermost/rsc/fuse/mount_darwin.go
deleted file mode 100644
index 5e2caaa76..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/mount_darwin.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2011 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 file.
-
-// TODO: Rewrite using package syscall not cgo
-
-package fuse
-
-/*
-
-// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c,
-// which carries this notice:
-//
-// The files in this directory are subject to the following license.
-//
-// The author of this software is Russ Cox.
-//
-// Copyright (c) 2006 Russ Cox
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose without fee is hereby granted, provided that this entire notice
-// is included in all copies of any software which is or includes a copy
-// or modification of this software and in all copies of the supporting
-// documentation for such software.
-//
-// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
-// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY
-// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS
-// FITNESS FOR ANY PARTICULAR PURPOSE.
-
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#define nil ((void*)0)
-
-static int
-mountfuse(char *mtpt, char **err)
-{
- int i, pid, fd, r;
- char buf[200];
- struct vfsconf vfs;
- char *f;
-
- if(getvfsbyname("fusefs", &vfs) < 0){
- if(access(f="/Library/Filesystems/osxfusefs.fs"
- "/Support/load_osxfusefs", 0) < 0){
- *err = strdup("cannot find load_fusefs");
- return -1;
- }
- if((r=system(f)) < 0){
- snprintf(buf, sizeof buf, "%s: %s", f, strerror(errno));
- *err = strdup(buf);
- return -1;
- }
- if(r != 0){
- snprintf(buf, sizeof buf, "load_fusefs failed: exit %d", r);
- *err = strdup(buf);
- return -1;
- }
- if(getvfsbyname("osxfusefs", &vfs) < 0){
- snprintf(buf, sizeof buf, "getvfsbyname osxfusefs: %s", strerror(errno));
- *err = strdup(buf);
- return -1;
- }
- }
-
- // Look for available FUSE device.
- for(i=0;; i++){
- snprintf(buf, sizeof buf, "/dev/osxfuse%d", i);
- if(access(buf, 0) < 0){
- *err = strdup("no available fuse devices");
- return -1;
- }
- if((fd = open(buf, O_RDWR)) >= 0)
- break;
- }
-
- pid = fork();
- if(pid < 0)
- return -1;
- if(pid == 0){
- snprintf(buf, sizeof buf, "%d", fd);
- setenv("MOUNT_FUSEFS_CALL_BY_LIB", "", 1);
- // Different versions of MacFUSE put the
- // mount_fusefs binary in different places.
- // Try all.
- // Leopard location
- setenv("MOUNT_FUSEFS_DAEMON_PATH",
- "/Library/Filesystems/osxfusefs.fs/Support/mount_osxfusefs", 1);
- execl("/Library/Filesystems/osxfusefs.fs/Support/mount_osxfusefs",
- "mount_osxfusefs",
- "-o", "iosize=4096", buf, mtpt, nil);
- fprintf(stderr, "exec mount_osxfusefs: %s\n", strerror(errno));
- _exit(1);
- }
- return fd;
-}
-
-*/
-import "C"
-
-import "unsafe"
-
-func mount(dir string) (int, string) {
- errp := (**C.char)(C.malloc(16))
- *errp = nil
- defer C.free(unsafe.Pointer(errp))
- cdir := C.CString(dir)
- defer C.free(unsafe.Pointer(cdir))
- fd := C.mountfuse(cdir, errp)
- var err string
- if *errp != nil {
- err = C.GoString(*errp)
- }
- return int(fd), err
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/mount_linux.go b/vendor/github.com/mattermost/rsc/fuse/mount_linux.go
deleted file mode 100644
index e5bc58b8a..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/mount_linux.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2012 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 file.
-
-package fuse
-
-import (
- "fmt"
- "net"
- "os"
- "os/exec"
- "syscall"
-)
-
-func mount(dir string) (fusefd int, errmsg string) {
- fds, err := syscall.Socketpair(syscall.AF_FILE, syscall.SOCK_STREAM, 0)
- if err != nil {
- return -1, fmt.Sprintf("socketpair error: %v", err)
- }
- defer syscall.Close(fds[0])
- defer syscall.Close(fds[1])
-
- cmd := exec.Command("/bin/fusermount", "--", dir)
- cmd.Env = append(os.Environ(), "_FUSE_COMMFD=3")
-
- writeFile := os.NewFile(uintptr(fds[0]), "fusermount-child-writes")
- defer writeFile.Close()
- cmd.ExtraFiles = []*os.File{writeFile}
-
- out, err := cmd.CombinedOutput()
- if len(out) > 0 || err != nil {
- return -1, fmt.Sprintf("fusermount: %q, %v", out, err)
- }
-
- readFile := os.NewFile(uintptr(fds[1]), "fusermount-parent-reads")
- defer readFile.Close()
- c, err := net.FileConn(readFile)
- if err != nil {
- return -1, fmt.Sprintf("FileConn from fusermount socket: %v", err)
- }
- defer c.Close()
-
- uc, ok := c.(*net.UnixConn)
- if !ok {
- return -1, fmt.Sprintf("unexpected FileConn type; expected UnixConn, got %T", c)
- }
-
- buf := make([]byte, 32) // expect 1 byte
- oob := make([]byte, 32) // expect 24 bytes
- _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob)
- scms, err := syscall.ParseSocketControlMessage(oob[:oobn])
- if err != nil {
- return -1, fmt.Sprintf("ParseSocketControlMessage: %v", err)
- }
- if len(scms) != 1 {
- return -1, fmt.Sprintf("expected 1 SocketControlMessage; got scms = %#v", scms)
- }
- scm := scms[0]
- gotFds, err := syscall.ParseUnixRights(&scm)
- if err != nil {
- return -1, fmt.Sprintf("syscall.ParseUnixRights: %v", err)
- }
- if len(gotFds) != 1 {
- return -1, fmt.Sprintf("wanted 1 fd; got %#v", gotFds)
- }
- return gotFds[0], ""
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/serve.go b/vendor/github.com/mattermost/rsc/fuse/serve.go
deleted file mode 100644
index fa4f27e3f..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/serve.go
+++ /dev/null
@@ -1,1022 +0,0 @@
-// Copyright 2012 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 file.
-
-// FUSE service loop, for servers that wish to use it.
-
-package fuse
-
-import (
- "fmt"
- "hash/fnv"
- "io"
- "log"
- "os"
- "path"
- "sync"
- "syscall"
- "time"
-)
-
-// TODO: FINISH DOCS
-
-// An Intr is a channel that signals that a request has been interrupted.
-// Being able to receive from the channel means the request has been
-// interrupted.
-type Intr chan struct{}
-
-func (Intr) String() string { return "fuse.Intr" }
-
-// An FS is the interface required of a file system.
-//
-// Root() (Node, Error)
-//
-// Root is called to obtain the Node for the file system root.
-//
-// Optional Methods
-//
-// An FS implementation may implement
-// additional methods to handle the corresponding FUSE requests:
-//
-// Init(req *InitRequest, resp *InitResponse) Error
-//
-// Init is called to initialize the FUSE connection.
-// It can inspect the request and adjust the response as desired.
-// The default response sets MaxReadahead to 0 and MaxWrite to 4096.
-// Init must return promptly.
-//
-// Statfs(resp *StatfsResponse, intr Intr) Error
-//
-// Statfs is called to obtain file system metadata. It should write that data to resp.
-//
-// Rename(req *RenameRequest, intr Intr) Error
-//
-// XXXX this is not implemented like this. Instead, Rename is a method
-// on the source dierctory node, and takes a newDir Node parameter. Fix it like this?
-// Rename is called to rename the file req.OldName in the directory req.OldDir to
-// become the file req.NewName in the directory req.NewDir.
-//
-type FS interface {
- Root() (Node, Error)
-}
-
-// A Node is the interface required of a file or directory.
-// See the documentation for type FS for general information
-// pertaining to all methods.
-//
-// Getattr(resp *GetattrResponse, intr Intr) fuse.Error
-//
-// Getattr obtains the standard metadata for the receiver.
-// It should store that metadata in resp.
-//
-// Open(xxx, intr Intr) (Handle, fuse.Error)
-//
-// Open opens the receiver.
-// XXX note about access. XXX OpenFlags.
-// XXX note that the Node may be a file or directory.
-//
-// Optional Methods
-//
-// An Node implementation may implement additional methods
-// to handle the corresponding FUSE requests.
-//
-// These optional requests can be called for both file and directory nodes:
-//
-// Access
-//
-// Access checks whether the calling context has permission for
-// the given operations on the receiver. If so, Access should return nil. If not, Access should
-// return EPERM. Note that this call affects the result of the access(2) system call
-// but not the open(2) system call. If Access is not implemented, the Node behaves
-// as if it always returns nil (permission granted), relying on checks in Open instead.
-//
-// Getxattr
-//
-// Getxattr obtains an extended attribute for the receiver.
-// XXX
-//
-// Listxattr
-//
-// Listxattr lists the extended attributes recorded for the receiver.
-//
-// Removexattr
-//
-// Removexattr removes an extended attribute from the receiver.
-//
-// Setattr
-//
-// Setattr sets the standard metadata for the receiver.
-//
-// Setxattr
-//
-// Setxattr sets an extended attribute for the receiver.
-//
-// Optional Directory Methods
-//
-// These optional requests will be called only for directory nodes:
-//
-// Create(xxx)
-//
-// Create creates
-//
-// Link(xxx)
-//
-// Link XXX
-//
-// Lookup(name string, intr Intr) (Node, Error)
-//
-// Lookup looks up a specific entry in the receiver,
-// which must be a directory. Lookup should return a Node
-// corresponding to the entry. If the name does not exist in
-// the directory, Lookup should return nil, err.
-//
-// Lookup need not to handle the names "." and "..".
-//
-// Mkdir
-//
-// Mkdir creates XXX
-//
-// Mknod XXX
-//
-// XXX
-//
-// Remove
-//
-// Remove removes the entry with the given name from
-// the receiver, which must be a directory. The entry to be removed
-// may correspond to a file (unlink) or to a directory (rmdir).
-//
-// Symlink
-//
-// Symlink creates a new symbolic link in the receiver, which must be a directory.
-// The entry
-//
-// Optional Symlink Methods
-//
-// This optional request will be called only for symbolic link nodes:
-//
-// Readlink
-//
-// Readlink reads a symbolic link.
-type Node interface {
- Attr() Attr
-}
-
-var startTime = time.Now()
-
-func nodeAttr(inode uint64, n Node) (attr Attr) {
- attr = n.Attr()
- if attr.Nlink == 0 {
- attr.Nlink = 1
- }
- if attr.Atime.IsZero() {
- attr.Atime = startTime
- }
- if attr.Mtime.IsZero() {
- attr.Mtime = startTime
- }
- if attr.Ctime.IsZero() {
- attr.Ctime = startTime
- }
- if attr.Crtime.IsZero() {
- attr.Crtime = startTime
- }
- if attr.Inode == 0 {
- attr.Inode = inode
- }
- return
-}
-
-// A Handle is the interface required of an opened file or directory.
-// See the documentation for type FS for general information
-// pertaining to all methods.
-//
-// Flush
-//
-// Flush is called each time the file or directory is closed. Because there can be
-// multiple file descriptors referring to a single opened file, Flush can be called
-// multiple times.
-//
-// Optional Methods
-//
-// A Handle implementation may implement additional methods to handle
-// the corresponding FUSE requests. The most common to implement are
-// Read, ReadDir, and Write.
-//
-// Fsync
-//
-// Getlk
-//
-// Read
-//
-// Readdir
-//
-// Release
-//
-// Setlk
-//
-// Setlkw
-//
-// Write
-//
-type Handle interface {
-}
-
-// Serve serves the FUSE connection by making calls to the methods
-// of fs and the Nodes and Handles it makes available. It returns only
-// when the connection has been closed or an unexpected error occurs.
-func (c *Conn) Serve(fs FS) error {
- if c.req != nil {
- panic("fuse: Serve called twice")
- }
- c.req = map[RequestID]*serveRequest{}
-
- root, err := fs.Root()
- if err != nil {
- return fmt.Errorf("cannot obtain root node: %v", syscall.Errno(err.(Errno)).Error())
- }
- c.node = append(c.node, nil, &serveNode{name: "/", node: root})
- c.handle = append(c.handle, nil)
-
- for {
- req, err := c.ReadRequest()
- if err != nil {
- if err == io.EOF {
- break
- }
- return err
- }
-
- go c.serve(fs, req)
- }
- return nil
-}
-
-type serveConn struct {
- meta sync.Mutex
- req map[RequestID]*serveRequest
- node []*serveNode
- handle []*serveHandle
- freeNode []NodeID
- freeHandle []HandleID
- nodeGen uint64
- nodeHandles []map[HandleID]bool // open handles for a node; slice index is NodeID
-}
-
-type serveRequest struct {
- Request Request
- Intr Intr
-}
-
-type serveNode struct {
- name string
- node Node
- inode uint64
- isDir bool
-}
-
-func (sn *serveNode) attr() (attr Attr) {
- attr = nodeAttr(sn.inode, sn.node)
- if attr.Inode == 0 {
- sn.inode = hash(sn.name)
- attr.Inode = sn.inode
- }
- sn.isDir = attr.Mode&os.ModeDir != 0
- return
-}
-
-func hash(s string) uint64 {
- f := fnv.New64()
- f.Write([]byte(s))
- return f.Sum64()
-}
-
-type serveHandle struct {
- handle Handle
- readData []byte
- trunc bool
- writeData []byte
- nodeID NodeID
-}
-
-func (c *Conn) saveNode(name string, node Node) (id NodeID, gen uint64, sn *serveNode) {
- sn = &serveNode{name: name, node: node}
- c.meta.Lock()
- if n := len(c.freeNode); n > 0 {
- id = c.freeNode[n-1]
- c.freeNode = c.freeNode[:n-1]
- c.node[id] = sn
- c.nodeGen++
- } else {
- id = NodeID(len(c.node))
- c.node = append(c.node, sn)
- }
- gen = c.nodeGen
- c.meta.Unlock()
- return
-}
-
-func (c *Conn) saveHandle(handle Handle, nodeID NodeID) (id HandleID, shandle *serveHandle) {
- c.meta.Lock()
- shandle = &serveHandle{handle: handle, nodeID: nodeID}
- if n := len(c.freeHandle); n > 0 {
- id = c.freeHandle[n-1]
- c.freeHandle = c.freeHandle[:n-1]
- c.handle[id] = shandle
- } else {
- id = HandleID(len(c.handle))
- c.handle = append(c.handle, shandle)
- }
-
- // Update mapping from node ID -> set of open Handle IDs.
- for len(c.nodeHandles) <= int(nodeID) {
- c.nodeHandles = append(c.nodeHandles, nil)
- }
- if c.nodeHandles[nodeID] == nil {
- c.nodeHandles[nodeID] = make(map[HandleID]bool)
- }
- c.nodeHandles[nodeID][id] = true
-
- c.meta.Unlock()
- return
-}
-
-func (c *Conn) dropNode(id NodeID) {
- c.meta.Lock()
- c.node[id] = nil
- if len(c.nodeHandles) > int(id) {
- c.nodeHandles[id] = nil
- }
- c.freeNode = append(c.freeNode, id)
- c.meta.Unlock()
-}
-
-func (c *Conn) dropHandle(id HandleID) {
- c.meta.Lock()
- h := c.handle[id]
- delete(c.nodeHandles[h.nodeID], id)
- c.handle[id] = nil
- c.freeHandle = append(c.freeHandle, id)
- c.meta.Unlock()
-}
-
-func (c *Conn) serve(fs FS, r Request) {
- intr := make(Intr)
- req := &serveRequest{Request: r, Intr: intr}
-
- Debugf("<- %s", req)
- var node Node
- var handle Handle
- var snode *serveNode
- var shandle *serveHandle
- c.meta.Lock()
- hdr := r.Hdr()
- if id := hdr.Node; id != 0 {
- if id < NodeID(len(c.node)) {
- snode = c.node[uint(id)]
- }
- if snode == nil {
- c.meta.Unlock()
- println("missing node", id, len(c.node), snode)
- Debugf("-> %#x %v", hdr.ID, ESTALE)
- r.RespondError(ESTALE)
- return
- }
- node = snode.node
- }
- if id := r.handle(); id != 0 {
- if id < HandleID(len(c.handle)) {
- shandle = c.handle[uint(id)]
- }
- if shandle == nil {
- println("missing handle", id, len(c.handle), shandle)
- c.meta.Unlock()
- Debugf("-> %#x %v", hdr.ID, ESTALE)
- r.RespondError(ESTALE)
- return
- }
- handle = shandle.handle
- }
- intr = make(chan struct{})
- if c.req[hdr.ID] != nil {
- // This happens with OSXFUSE. Assume it's okay and
- // that we'll never see an interrupt for this one.
- // Otherwise everything wedges. TODO: Report to OSXFUSE?
- intr = nil
- } else {
- c.req[hdr.ID] = req
- }
- c.meta.Unlock()
-
- // Call this before responding.
- // After responding is too late: we might get another request
- // with the same ID and be very confused.
- done := func(resp interface{}) {
- Debugf("-> %#x %v", hdr.ID, resp)
- c.meta.Lock()
- c.req[hdr.ID] = nil
- c.meta.Unlock()
- }
-
- switch r := r.(type) {
- default:
- // Note: To FUSE, ENOSYS means "this server never implements this request."
- // It would be inappropriate to return ENOSYS for other operations in this
- // switch that might only be unavailable in some contexts, not all.
- done(ENOSYS)
- r.RespondError(ENOSYS)
-
- // FS operations.
- case *InitRequest:
- s := &InitResponse{
- MaxWrite: 4096,
- }
- if fs, ok := fs.(interface {
- Init(*InitRequest, *InitResponse, Intr) Error
- }); ok {
- if err := fs.Init(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- }
- done(s)
- r.Respond(s)
-
- case *StatfsRequest:
- s := &StatfsResponse{}
- if fs, ok := fs.(interface {
- Statfs(*StatfsRequest, *StatfsResponse, Intr) Error
- }); ok {
- if err := fs.Statfs(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- }
- done(s)
- r.Respond(s)
-
- // Node operations.
- case *GetattrRequest:
- s := &GetattrResponse{}
- if n, ok := node.(interface {
- Getattr(*GetattrRequest, *GetattrResponse, Intr) Error
- }); ok {
- if err := n.Getattr(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- } else {
- s.AttrValid = 1 * time.Minute
- s.Attr = snode.attr()
- }
- done(s)
- r.Respond(s)
-
- case *SetattrRequest:
- s := &SetattrResponse{}
-
- // Special-case truncation, if no other bits are set
- // and the open Handles all have a WriteAll method.
- if r.Valid&SetattrSize != 0 && r.Size == 0 {
- type writeAll interface {
- WriteAll([]byte, Intr) Error
- }
- switch r.Valid {
- case SetattrLockOwner | SetattrSize, SetattrSize:
- // Seen on Linux. Handle isn't set.
- c.meta.Lock()
- for hid := range c.nodeHandles[hdr.Node] {
- shandle := c.handle[hid]
- if _, ok := shandle.handle.(writeAll); ok {
- shandle.trunc = true
- }
- }
- c.meta.Unlock()
- case SetattrHandle | SetattrSize:
- // Seen on OS X; the Handle is provided.
- if _, ok := handle.(writeAll); ok {
- shandle.trunc = true
- }
- }
- }
-
- log.Printf("setattr %v", r)
- if n, ok := node.(interface {
- Setattr(*SetattrRequest, *SetattrResponse, Intr) Error
- }); ok {
- if err := n.Setattr(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(s)
- r.Respond(s)
- break
- }
-
- if s.AttrValid == 0 {
- s.AttrValid = 1 * time.Minute
- }
- s.Attr = snode.attr()
- done(s)
- r.Respond(s)
-
- case *SymlinkRequest:
- s := &SymlinkResponse{}
- n, ok := node.(interface {
- Symlink(*SymlinkRequest, Intr) (Node, Error)
- })
- if !ok {
- done(EIO) // XXX or EPERM like Mkdir?
- r.RespondError(EIO)
- break
- }
- n2, err := n.Symlink(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- c.saveLookup(&s.LookupResponse, snode, r.NewName, n2)
- done(s)
- r.Respond(s)
-
- case *ReadlinkRequest:
- n, ok := node.(interface {
- Readlink(*ReadlinkRequest, Intr) (string, Error)
- })
- if !ok {
- done(EIO) /// XXX or EPERM?
- r.RespondError(EIO)
- break
- }
- target, err := n.Readlink(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(target)
- r.Respond(target)
-
- case *LinkRequest:
- n, ok := node.(interface {
- Link(r *LinkRequest, old Node, intr Intr) (Node, Error)
- })
- if !ok {
- log.Printf("Node %T doesn't implement fuse Link", node)
- done(EIO) /// XXX or EPERM?
- r.RespondError(EIO)
- break
- }
- c.meta.Lock()
- var oldNode *serveNode
- if int(r.OldNode) < len(c.node) {
- oldNode = c.node[r.OldNode]
- }
- c.meta.Unlock()
- if oldNode == nil {
- log.Printf("In LinkRequest, node %d not found", r.OldNode)
- done(EIO)
- r.RespondError(EIO)
- break
- }
- n2, err := n.Link(r, oldNode.node, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- s := &LookupResponse{}
- c.saveLookup(s, snode, r.NewName, n2)
- done(s)
- r.Respond(s)
-
- case *RemoveRequest:
- n, ok := node.(interface {
- Remove(*RemoveRequest, Intr) Error
- })
- if !ok {
- done(EIO) /// XXX or EPERM?
- r.RespondError(EIO)
- break
- }
- err := n.Remove(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(nil)
- r.Respond()
-
- case *AccessRequest:
- if n, ok := node.(interface {
- Access(*AccessRequest, Intr) Error
- }); ok {
- if err := n.Access(r, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- }
- done(r)
- r.Respond()
-
- case *LookupRequest:
- var n2 Node
- var err Error
- s := &LookupResponse{}
- if n, ok := node.(interface {
- Lookup(string, Intr) (Node, Error)
- }); ok {
- n2, err = n.Lookup(r.Name, intr)
- } else if n, ok := node.(interface {
- Lookup(*LookupRequest, *LookupResponse, Intr) (Node, Error)
- }); ok {
- n2, err = n.Lookup(r, s, intr)
- } else {
- done(ENOENT)
- r.RespondError(ENOENT)
- break
- }
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- c.saveLookup(s, snode, r.Name, n2)
- done(s)
- r.Respond(s)
-
- case *MkdirRequest:
- s := &MkdirResponse{}
- n, ok := node.(interface {
- Mkdir(*MkdirRequest, Intr) (Node, Error)
- })
- if !ok {
- done(EPERM)
- r.RespondError(EPERM)
- break
- }
- n2, err := n.Mkdir(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- c.saveLookup(&s.LookupResponse, snode, r.Name, n2)
- done(s)
- r.Respond(s)
-
- case *OpenRequest:
- s := &OpenResponse{Flags: OpenDirectIO}
- var h2 Handle
- if n, ok := node.(interface {
- Open(*OpenRequest, *OpenResponse, Intr) (Handle, Error)
- }); ok {
- hh, err := n.Open(r, s, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- h2 = hh
- } else {
- h2 = node
- }
- s.Handle, _ = c.saveHandle(h2, hdr.Node)
- done(s)
- r.Respond(s)
-
- case *CreateRequest:
- n, ok := node.(interface {
- Create(*CreateRequest, *CreateResponse, Intr) (Node, Handle, Error)
- })
- if !ok {
- // If we send back ENOSYS, FUSE will try mknod+open.
- done(EPERM)
- r.RespondError(EPERM)
- break
- }
- s := &CreateResponse{OpenResponse: OpenResponse{Flags: OpenDirectIO}}
- n2, h2, err := n.Create(r, s, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- c.saveLookup(&s.LookupResponse, snode, r.Name, n2)
- h, shandle := c.saveHandle(h2, hdr.Node)
- s.Handle = h
- shandle.trunc = true
- done(s)
- r.Respond(s)
-
- case *GetxattrRequest, *SetxattrRequest, *ListxattrRequest, *RemovexattrRequest:
- // TODO: Use n.
- done(ENOSYS)
- r.RespondError(ENOSYS)
-
- case *ForgetRequest:
- n, ok := node.(interface {
- Forget()
- })
- if ok {
- n.Forget()
- }
- c.dropNode(hdr.Node)
- done(r)
- r.Respond()
-
- // Handle operations.
- case *ReadRequest:
- s := &ReadResponse{Data: make([]byte, 0, r.Size)}
- if snode.isDir {
- if h, ok := handle.(interface {
- ReadDir(Intr) ([]Dirent, Error)
- }); ok {
- if shandle.readData == nil {
- attr := snode.attr()
- dirs, err := h.ReadDir(intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- var data []byte
- data = AppendDirent(data, Dirent{Inode: attr.Inode, Name: "."})
- data = AppendDirent(data, Dirent{Inode: attr.Inode, Name: ".."})
- for _, dir := range dirs {
- if dir.Inode == 0 {
- dir.Inode = hash(path.Join(snode.name, dir.Name))
- }
- data = AppendDirent(data, dir)
- }
- shandle.readData = data
- }
- HandleRead(r, s, shandle.readData)
- done(s)
- r.Respond(s)
- break
- }
- } else {
- if h, ok := handle.(interface {
- ReadAll(Intr) ([]byte, Error)
- }); ok {
- if shandle.readData == nil {
- data, err := h.ReadAll(intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- if data == nil {
- data = []byte{}
- }
- shandle.readData = data
- }
- HandleRead(r, s, shandle.readData)
- done(s)
- r.Respond(s)
- break
- }
- }
- h, ok := handle.(interface {
- Read(*ReadRequest, *ReadResponse, Intr) Error
- })
- if !ok {
- fmt.Printf("NO READ FOR %T\n", handle)
- done(EIO)
- r.RespondError(EIO)
- break
- }
- if err := h.Read(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(s)
- r.Respond(s)
-
- case *WriteRequest:
- s := &WriteResponse{}
- if shandle.trunc && r.Offset == int64(len(shandle.writeData)) {
- shandle.writeData = append(shandle.writeData, r.Data...)
- s.Size = len(r.Data)
- done(s)
- r.Respond(s)
- break
- }
- if h, ok := handle.(interface {
- Write(*WriteRequest, *WriteResponse, Intr) Error
- }); ok {
- if err := h.Write(r, s, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(s)
- r.Respond(s)
- break
- }
- println("NO WRITE")
- done(EIO)
- r.RespondError(EIO)
-
- case *FlushRequest:
- if shandle.trunc {
- h := handle.(interface {
- WriteAll([]byte, Intr) Error
- })
- if err := h.WriteAll(shandle.writeData, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- shandle.writeData = nil
- shandle.trunc = false
- }
- if h, ok := handle.(interface {
- Flush(*FlushRequest, Intr) Error
- }); ok {
- if err := h.Flush(r, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- }
- done(nil)
- r.Respond()
-
- case *ReleaseRequest:
- // No matter what, release the handle.
- c.dropHandle(r.handle())
- if h, ok := handle.(interface {
- Release(*ReleaseRequest, Intr) Error
- }); ok {
- if err := h.Release(r, intr); err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- }
- done(nil)
- r.Respond()
-
- case *DestroyRequest:
- fs, ok := fs.(interface {
- Destroy()
- })
- if ok {
- fs.Destroy()
- }
- done(nil)
- r.Respond()
-
- case *RenameRequest:
- c.meta.Lock()
- var newDirNode *serveNode
- if int(r.NewDir) < len(c.node) {
- newDirNode = c.node[r.NewDir]
- }
- c.meta.Unlock()
- if newDirNode == nil {
- println("RENAME NEW DIR NODE NOT FOUND")
- done(EIO)
- r.RespondError(EIO)
- break
- }
- n, ok := node.(interface {
- Rename(r *RenameRequest, newDir Node, intr Intr) Error
- })
- if !ok {
- log.Printf("Node %T missing Rename method", node)
- done(EIO) // XXX or EPERM like Mkdir?
- r.RespondError(EIO)
- break
- }
- err := n.Rename(r, newDirNode.node, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(nil)
- r.Respond()
-
- case *MknodRequest:
- n, ok := node.(interface {
- Mknod(r *MknodRequest, intr Intr) (Node, Error)
- })
- if !ok {
- log.Printf("Node %T missing Mknod method", node)
- done(EIO)
- r.RespondError(EIO)
- break
- }
- n2, err := n.Mknod(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- s := &LookupResponse{}
- c.saveLookup(s, snode, r.Name, n2)
- done(s)
- r.Respond(s)
-
- case *FsyncRequest:
- n, ok := node.(interface {
- Fsync(r *FsyncRequest, intr Intr) Error
- })
- if !ok {
- log.Printf("Node %T missing Fsync method", node)
- done(EIO)
- r.RespondError(EIO)
- break
- }
- err := n.Fsync(r, intr)
- if err != nil {
- done(err)
- r.RespondError(err)
- break
- }
- done(nil)
- r.Respond()
-
- /* case *FsyncdirRequest:
- done(ENOSYS)
- r.RespondError(ENOSYS)
-
- case *GetlkRequest, *SetlkRequest, *SetlkwRequest:
- done(ENOSYS)
- r.RespondError(ENOSYS)
-
- // One of a kind.
- case *InterruptRequest:
- c.meta.Lock()
- ireq := c.req[r.OldID]
- if ireq != nil && ireq.Intr != nil {
- close(ireq.Intr)
- ireq.Intr = nil
- }
- c.meta.Unlock()
- done(nil)
- r.Respond()
-
- case *BmapRequest:
- done(ENOSYS)
- r.RespondError(ENOSYS)
-
- case *SetvolnameRequest, *GetxtimesRequest, *ExchangeRequest:
- done(ENOSYS)
- r.RespondError(ENOSYS)
- */
- }
-}
-
-func (c *Conn) saveLookup(s *LookupResponse, snode *serveNode, elem string, n2 Node) {
- name := path.Join(snode.name, elem)
- var sn *serveNode
- s.Node, s.Generation, sn = c.saveNode(name, n2)
- if s.EntryValid == 0 {
- s.EntryValid = 1 * time.Minute
- }
- if s.AttrValid == 0 {
- s.AttrValid = 1 * time.Minute
- }
- s.Attr = sn.attr()
-}
-
-// HandleRead handles a read request assuming that data is the entire file content.
-// It adjusts the amount returned in resp according to req.Offset and req.Size.
-func HandleRead(req *ReadRequest, resp *ReadResponse, data []byte) {
- if req.Offset >= int64(len(data)) {
- data = nil
- } else {
- data = data[req.Offset:]
- }
- if len(data) > req.Size {
- data = data[:req.Size]
- }
- n := copy(resp.Data[:req.Size], data)
- resp.Data = resp.Data[:n]
-}
-
-// DataHandle returns a read-only Handle that satisfies reads
-// using the given data.
-func DataHandle(data []byte) Handle {
- return &dataHandle{data}
-}
-
-type dataHandle struct {
- data []byte
-}
-
-func (d *dataHandle) Read(intr Intr) ([]byte, Error) {
- return d.data, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/fuse/tree.go b/vendor/github.com/mattermost/rsc/fuse/tree.go
deleted file mode 100644
index fec0a748f..000000000
--- a/vendor/github.com/mattermost/rsc/fuse/tree.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2012 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 file.
-
-// FUSE directory tree, for servers that wish to use it with the service loop.
-
-package fuse
-
-import (
- "os"
- pathpkg "path"
- "strings"
-)
-
-// A Tree implements a basic directory tree for FUSE.
-type Tree struct {
- tree
-}
-
-func (t *Tree) Root() (Node, Error) {
- return &t.tree, nil
-}
-
-// Add adds the path to the tree, resolving to the given node.
-// If path or a prefix of path has already been added to the tree,
-// Add panics.
-func (t *Tree) Add(path string, node Node) {
- path = pathpkg.Clean("/" + path)[1:]
- elems := strings.Split(path, "/")
- dir := Node(&t.tree)
- for i, elem := range elems {
- dt, ok := dir.(*tree)
- if !ok {
- panic("fuse: Tree.Add for " + strings.Join(elems[:i], "/") + " and " + path)
- }
- n := dt.lookup(elem)
- if n != nil {
- if i+1 == len(elems) {
- panic("fuse: Tree.Add for " + path + " conflicts with " + elem)
- }
- dir = n
- } else {
- if i+1 == len(elems) {
- dt.add(elem, node)
- } else {
- dir = &tree{}
- dt.add(elem, dir)
- }
- }
- }
-}
-
-type treeDir struct {
- name string
- node Node
-}
-
-type tree struct {
- dir []treeDir
-}
-
-func (t *tree) lookup(name string) Node {
- for _, d := range t.dir {
- if d.name == name {
- return d.node
- }
- }
- return nil
-}
-
-func (t *tree) add(name string, n Node) {
- t.dir = append(t.dir, treeDir{name, n})
-}
-
-func (t *tree) Attr() Attr {
- return Attr{Mode: os.ModeDir | 0555}
-}
-
-func (t *tree) Lookup(name string, intr Intr) (Node, Error) {
- n := t.lookup(name)
- if n != nil {
- return n, nil
- }
- return nil, ENOENT
-}
-
-func (t *tree) ReadDir(intr Intr) ([]Dirent, Error) {
- var out []Dirent
- for _, d := range t.dir {
- out = append(out, Dirent{Name: d.name})
- }
- return out, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/gf256/blog_test.go b/vendor/github.com/mattermost/rsc/gf256/blog_test.go
deleted file mode 100644
index 12cc7deb0..000000000
--- a/vendor/github.com/mattermost/rsc/gf256/blog_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2012 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 file.
-
-// This file contains a straightforward implementation of
-// Reed-Solomon encoding, along with a benchmark.
-// It goes with http://research.swtch.com/field.
-//
-// For an optimized implementation, see gf256.go.
-
-package gf256
-
-import (
- "bytes"
- "fmt"
- "testing"
-)
-
-// BlogECC writes to check the error correcting code bytes
-// for data using the given Reed-Solomon parameters.
-func BlogECC(rs *RSEncoder, m []byte, check []byte) {
- if len(check) < rs.c {
- panic("gf256: invalid check byte length")
- }
- if rs.c == 0 {
- return
- }
-
- // The check bytes are the remainder after dividing
- // data padded with c zeros by the generator polynomial.
-
- // p = data padded with c zeros.
- var p []byte
- n := len(m) + rs.c
- if len(rs.p) >= n {
- p = rs.p
- } else {
- p = make([]byte, n)
- }
- copy(p, m)
- for i := len(m); i < len(p); i++ {
- p[i] = 0
- }
-
- gen := rs.gen
-
- // Divide p by gen, leaving the remainder in p[len(data):].
- // p[0] is the most significant term in p, and
- // gen[0] is the most significant term in the generator.
- for i := 0; i < len(m); i++ {
- k := f.Mul(p[i], f.Inv(gen[0])) // k = pi / g0
- // p -= k·g
- for j, g := range gen {
- p[i+j] = f.Add(p[i+j], f.Mul(k, g))
- }
- }
-
- copy(check, p[len(m):])
- rs.p = p
-}
-
-func BenchmarkBlogECC(b *testing.B) {
- data := []byte{0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11}
- check := []byte{0x29, 0x41, 0xb3, 0x93, 0x8, 0xe8, 0xa3, 0xe7, 0x63, 0x8f}
- out := make([]byte, len(check))
- rs := NewRSEncoder(f, len(check))
- for i := 0; i < b.N; i++ {
- BlogECC(rs, data, out)
- }
- b.SetBytes(int64(len(data)))
- if !bytes.Equal(out, check) {
- fmt.Printf("have %#v want %#v\n", out, check)
- }
-}
-
-func TestBlogECC(t *testing.T) {
- data := []byte{0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11}
- check := []byte{0xa5, 0x24, 0xd4, 0xc1, 0xed, 0x36, 0xc7, 0x87, 0x2c, 0x55}
- out := make([]byte, len(check))
- rs := NewRSEncoder(f, len(check))
- BlogECC(rs, data, out)
- if !bytes.Equal(out, check) {
- t.Errorf("have %x want %x", out, check)
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/gf256/gf256_test.go b/vendor/github.com/mattermost/rsc/gf256/gf256_test.go
deleted file mode 100644
index f77fa7d67..000000000
--- a/vendor/github.com/mattermost/rsc/gf256/gf256_test.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2010 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 file.
-
-package gf256
-
-import (
- "bytes"
- "fmt"
- "testing"
-)
-
-var f = NewField(0x11d, 2) // x^8 + x^4 + x^3 + x^2 + 1
-
-func TestBasic(t *testing.T) {
- if f.Exp(0) != 1 || f.Exp(1) != 2 || f.Exp(255) != 1 {
- panic("bad Exp")
- }
-}
-
-func TestECC(t *testing.T) {
- data := []byte{0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11}
- check := []byte{0xa5, 0x24, 0xd4, 0xc1, 0xed, 0x36, 0xc7, 0x87, 0x2c, 0x55}
- out := make([]byte, len(check))
- rs := NewRSEncoder(f, len(check))
- rs.ECC(data, out)
- if !bytes.Equal(out, check) {
- t.Errorf("have %x want %x", out, check)
- }
-}
-
-func TestLinear(t *testing.T) {
- d1 := []byte{0x00, 0x00}
- c1 := []byte{0x00, 0x00}
- out := make([]byte, len(c1))
- rs := NewRSEncoder(f, len(c1))
- if rs.ECC(d1, out); !bytes.Equal(out, c1) {
- t.Errorf("ECBytes(%x, %d) = %x, want 0", d1, len(c1), out)
- }
- d2 := []byte{0x00, 0x01}
- c2 := make([]byte, 2)
- rs.ECC(d2, c2)
- d3 := []byte{0x00, 0x02}
- c3 := make([]byte, 2)
- rs.ECC(d3, c3)
- cx := make([]byte, 2)
- for i := range cx {
- cx[i] = c2[i] ^ c3[i]
- }
- d4 := []byte{0x00, 0x03}
- c4 := make([]byte, 2)
- rs.ECC(d4, c4)
- if !bytes.Equal(cx, c4) {
- t.Errorf("ECBytes(%x, 2) = %x\nECBytes(%x, 2) = %x\nxor = %x\nECBytes(%x, 2) = %x",
- d2, c2, d3, c3, cx, d4, c4)
- }
-}
-
-func TestGaussJordan(t *testing.T) {
- rs := NewRSEncoder(f, 2)
- m := make([][]byte, 16)
- for i := range m {
- m[i] = make([]byte, 4)
- m[i][i/8] = 1 << uint(i%8)
- rs.ECC(m[i][:2], m[i][2:])
- }
- if false {
- fmt.Printf("---\n")
- for _, row := range m {
- fmt.Printf("%x\n", row)
- }
- }
- b := []uint{0, 1, 2, 3, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 26, 27}
- for i := 0; i < 16; i++ {
- bi := b[i]
- if m[i][bi/8]&(1<<(7-bi%8)) == 0 {
- for j := i + 1; ; j++ {
- if j >= len(m) {
- t.Errorf("lost track for %d", bi)
- break
- }
- if m[j][bi/8]&(1<<(7-bi%8)) != 0 {
- m[i], m[j] = m[j], m[i]
- break
- }
- }
- }
- for j := i + 1; j < len(m); j++ {
- if m[j][bi/8]&(1<<(7-bi%8)) != 0 {
- for k := range m[j] {
- m[j][k] ^= m[i][k]
- }
- }
- }
- }
- if false {
- fmt.Printf("---\n")
- for _, row := range m {
- fmt.Printf("%x\n", row)
- }
- }
- for i := 15; i >= 0; i-- {
- bi := b[i]
- for j := i - 1; j >= 0; j-- {
- if m[j][bi/8]&(1<<(7-bi%8)) != 0 {
- for k := range m[j] {
- m[j][k] ^= m[i][k]
- }
- }
- }
- }
- if false {
- fmt.Printf("---\n")
- for _, row := range m {
- fmt.Printf("%x", row)
- out := make([]byte, 2)
- if rs.ECC(row[:2], out); !bytes.Equal(out, row[2:]) {
- fmt.Printf(" - want %x", out)
- }
- fmt.Printf("\n")
- }
- }
-}
-
-func BenchmarkECC(b *testing.B) {
- data := []byte{0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11}
- check := []byte{0x29, 0x41, 0xb3, 0x93, 0x8, 0xe8, 0xa3, 0xe7, 0x63, 0x8f}
- out := make([]byte, len(check))
- rs := NewRSEncoder(f, len(check))
- for i := 0; i < b.N; i++ {
- rs.ECC(data, out)
- }
- b.SetBytes(int64(len(data)))
- if !bytes.Equal(out, check) {
- fmt.Printf("have %#v want %#v\n", out, check)
- }
-}
-
-func TestGen(t *testing.T) {
- for i := 0; i < 256; i++ {
- _, lg := f.gen(i)
- if lg[0] != 0 {
- t.Errorf("#%d: %x", i, lg)
- }
- }
-}
-
-func TestReducible(t *testing.T) {
- var count = []int{1, 2, 3, 6, 9, 18, 30, 56, 99, 186} // oeis.org/A1037
- for i, want := range count {
- n := 0
- for p := 1 << uint(i+2); p < 1<<uint(i+3); p++ {
- if !reducible(p) {
- n++
- }
- }
- if n != want {
- t.Errorf("#reducible(%d-bit) = %d, want %d", i+2, n, want)
- }
- }
-}
-
-func TestExhaustive(t *testing.T) {
- for poly := 0x100; poly < 0x200; poly++ {
- if reducible(poly) {
- continue
- }
- α := 2
- for !generates(α, poly) {
- α++
- }
- f := NewField(poly, α)
- for p := 0; p < 256; p++ {
- for q := 0; q < 256; q++ {
- fm := int(f.Mul(byte(p), byte(q)))
- pm := mul(p, q, poly)
- if fm != pm {
- t.Errorf("NewField(%#x).Mul(%#x, %#x) = %#x, want %#x", poly, p, q, fm, pm)
- }
- }
- }
- }
-}
-
-func generates(α, poly int) bool {
- x := α
- for i := 0; i < 254; i++ {
- if x == 1 {
- return false
- }
- x = mul(x, α, poly)
- }
- return true
-}
diff --git a/vendor/github.com/mattermost/rsc/google/acme/Chat/main.go b/vendor/github.com/mattermost/rsc/google/acme/Chat/main.go
deleted file mode 100644
index a161d8f10..000000000
--- a/vendor/github.com/mattermost/rsc/google/acme/Chat/main.go
+++ /dev/null
@@ -1,575 +0,0 @@
-// Copyright 2011 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 file.
-
-package main
-
-/*
-TODO:
- - Del of main window should move to other window.
- - Editing main window should update status on \n or something like that.
- - Make use of full names from roster
-*/
-
-import (
- "bytes"
- "flag"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "regexp"
- "strings"
- "time"
-
- "code.google.com/p/goplan9/plan9/acme"
- "github.com/mattermost/rsc/google"
- "github.com/mattermost/rsc/xmpp"
-)
-
-var acmeDebug = flag.Bool("acmedebug", false, "print acme debugging")
-
-type Window struct {
- *acme.Win // acme window
- *acme.Event // most recent event received
- err error // error reading event
- typ string // kind of window "main", "chat"
- name string // acme window title
- remote string // for typ=="chat", remote address
- dirty bool // window is dirty
- blinky bool // window's dirty box is blinking
-
- lastTime time.Time
-}
-
-type Msg struct {
- w *Window // window where message belongs
- *xmpp.Chat // recently received chat
- err error // error reading chat message
-}
-
-var (
- client *xmpp.Client // current xmpp client (can reconnect)
- acct google.Account // google acct info
- statusCache = make(map[string][]*xmpp.Presence)
- active = make(map[string]*Window) // active windows
- acmeChan = make(chan *Window) // acme events
- msgChan = make(chan *Msg) // chat events
- mainWin *Window
- status = xmpp.Available
- statusMsg = ""
- lastActivity time.Time
-)
-
-const (
- awayTime = 10 * time.Minute
- extendedAwayTime = 30 * time.Minute
-)
-
-func usage() {
- fmt.Fprintf(os.Stderr, "usage: Chat [-a acct] name...\n")
- flag.PrintDefaults()
- os.Exit(2)
-}
-
-var acctName = flag.String("a", "", "account to use")
-
-func main() {
- flag.Usage = usage
- flag.Parse()
-
- acct = google.Acct(*acctName)
-
- aw, err := acme.New()
- if err != nil {
- log.Fatal(err)
- }
- aw.Name("Chat/" + acct.Nick + "/")
-
- client, err = xmpp.NewClient("talk.google.com:443", acct.Email, acct.Password)
- if err != nil {
- log.Fatal(err)
- }
-
- w := &Window{Win: aw, typ: "main", name: "Chat/" + acct.Nick + "/"}
- data, err := ioutil.ReadFile(google.Dir() + "/chat." + acct.Nick)
- if err != nil {
- log.Fatal(err)
- }
- if err == nil {
- w.Write("body", data)
- }
- mainWin = w
- active[w.name] = w
- go w.readAcme()
- client.Roster()
- setStatus(status)
- go w.readChat()
- lastActivity = time.Now()
-
- tick := time.Tick(0.5e9)
-Loop:
- for len(active) > 0 {
- select {
- case w := <-acmeChan:
- if w == nil {
- // Sync with reader.
- continue
- }
- if w.err != nil {
- if active[w.name] == nil {
- continue
- }
- log.Fatal(w.err)
- }
- if *acmeDebug {
- fmt.Fprintf(os.Stderr, "%s %c%c %d,%d %q\n", w.name, w.C1, w.C2, w.Q0, w.Q1, w.Text)
- }
- if w.C1 == 'M' || w.C1 == 'K' {
- lastActivity = time.Now()
- if status != xmpp.Available {
- setStatus(xmpp.Available)
- }
- }
- if (w.C2 == 'x' || w.C2 == 'X') && string(w.Text) == "Del" {
- // TODO: Hangup connection for w.typ == "acct"?
- delete(active, w.name)
- w.Del(true)
- continue Loop
- }
-
- switch w.typ {
- case "main":
- switch w.C2 {
- case 'L': // Button 3 in body: load chat window for contact.
- w.expand()
- fallthrough
- case 'l': // Button 3 in tag
- arg := string(w.Text)
- showContact(arg)
- continue Loop
- }
- case "chat":
- if w.C1 == 'F' && w.C2 == 'I' {
- continue Loop
- }
- if w.C1 != 'M' && w.C1 != 'K' {
- break
- }
- if w.blinky {
- w.blinky = false
- w.Fprintf("ctl", "dirty\n")
- }
- switch w.C2 {
- case 'X', 'x':
- if string(w.Text) == "Ack" {
- w.Fprintf("ctl", "clean\n")
- }
- case 'I':
- w.sendMsg()
- continue Loop
- }
- }
- w.WriteEvent(w.Event)
-
- case msg := <-msgChan:
- w := msg.w
- if msg.err != nil {
- w.Fprintf("body", "ERROR: %s\n", msg.err)
- continue Loop
- }
- you := msg.Remote
- if i := strings.Index(you, "/"); i >= 0 {
- you = you[:i]
- }
- switch msg.Type {
- case "chat":
- w := showContact(you)
- text := strings.TrimSpace(msg.Text)
- if text == "" {
- // Probably a composing notification.
- continue
- }
- w.message("> %s\n", text)
- w.blinky = true
- w.dirty = true
-
- case "presence":
- pr := msg.Presence
- pr, new := savePresence(pr, you)
- if !new {
- continue
- }
- w := lookContact(you)
- if w != nil {
- w.status(pr)
- }
- mainStatus(pr, you)
- }
-
- case t := <-tick:
- switch status {
- case xmpp.Available:
- if t.Sub(lastActivity) > awayTime {
- setStatus(xmpp.Away)
- }
- case xmpp.Away:
- if t.Sub(lastActivity) > extendedAwayTime {
- setStatus(xmpp.ExtendedAway)
- }
- }
- for _, w := range active {
- if w.blinky {
- w.dirty = !w.dirty
- if w.dirty {
- w.Fprintf("ctl", "dirty\n")
- } else {
- w.Fprintf("ctl", "clean\n")
- }
- }
- }
- }
- }
-}
-
-func setStatus(st xmpp.Status) {
- status = st
- client.Status(status, statusMsg)
- mainWin.statusTag(status, statusMsg)
-}
-
-func savePresence(pr *xmpp.Presence, you string) (pr1 *xmpp.Presence, new bool) {
- old := cachedPresence(you)
-
- pr.StatusMsg = strings.TrimSpace(pr.StatusMsg)
- c := statusCache[you]
- for i, p := range c {
- if p.Remote == pr.Remote {
- c[i] = pr
- c[0], c[i] = c[i], c[0]
- goto Best
- }
- }
- c = append(c, pr)
- c[0], c[len(c)-1] = c[len(c)-1], c[0]
- statusCache[you] = c
-
-Best:
- best := cachedPresence(you)
- return best, old == nil || old.Status != best.Status || old.StatusMsg != best.StatusMsg
-}
-
-func cachedPresence(you string) *xmpp.Presence {
- c := statusCache[you]
- if len(c) == 0 {
- return nil
- }
- best := c[0]
- for _, p := range c {
- if p.Status > best.Status {
- best = p
- }
- }
- return best
-}
-
-func short(st xmpp.Status) string {
- switch st {
- case xmpp.Unavailable:
- return "?"
- case xmpp.ExtendedAway:
- return "x"
- case xmpp.Away:
- return "-"
- case xmpp.Available:
- return "+"
- case xmpp.DoNotDisturb:
- return "!"
- }
- return st.String()
-}
-
-func long(st xmpp.Status) string {
- switch st {
- case xmpp.Unavailable:
- return "unavailable"
- case xmpp.ExtendedAway:
- return "offline"
- case xmpp.Away:
- return "away"
- case xmpp.Available:
- return "available"
- case xmpp.DoNotDisturb:
- return "busy"
- }
- return st.String()
-}
-
-func (w *Window) time() string {
- /*
- Auto-date chat windows:
-
- Show date and time on first message.
- Show time if minute is different from last message.
- Show date if day is different from last message.
-
- Oct 10 12:01 > hi
- 12:03 hello there
- 12:05 > what's up?
-
- 12:10 [Away]
- */
- now := time.Now()
- m1, d1, y1 := w.lastTime.Date()
- m2, d2, y2 := now.Date()
- w.lastTime = now
-
- if m1 != m2 || d1 != d2 || y1 != y2 {
- return now.Format("Jan 2 15:04 ")
- }
- return now.Format("15:04 ")
-}
-
-func (w *Window) status(pr *xmpp.Presence) {
- msg := ""
- if pr.StatusMsg != "" {
- msg = ": " + pr.StatusMsg
- }
- w.message("[%s%s]\n", long(pr.Status), msg)
-
- w.statusTag(pr.Status, pr.StatusMsg)
-}
-
-func (w *Window) statusTag(status xmpp.Status, statusMsg string) {
- data, err := w.ReadAll("tag")
- if err != nil {
- log.Printf("read tag: %v", err)
- return
- }
- //log.Printf("tag1: %s\n", data)
- i := bytes.IndexByte(data, '|')
- if i >= 0 {
- data = data[i+1:]
- } else {
- data = nil
- }
- //log.Printf("tag2: %s\n", data)
- j := bytes.IndexByte(data, '|')
- if j >= 0 {
- data = data[j+1:]
- }
- //log.Printf("tag3: %s\n", data)
-
- msg := ""
- if statusMsg != "" {
- msg = " " + statusMsg
- }
- w.Ctl("cleartag\n")
- w.Write("tag", []byte(" "+short(status)+msg+" |"+string(data)))
-}
-
-func mainStatus(pr *xmpp.Presence, you string) {
- w := mainWin
- if err := w.Addr("#0/^(.[ \t]+)?" + regexp.QuoteMeta(you) + "([ \t]*|$)/"); err != nil {
- return
- }
- q0, q1, err := w.ReadAddr()
- if err != nil {
- log.Printf("ReadAddr: %s\n", err)
- return
- }
- if err := w.Addr("#%d/"+regexp.QuoteMeta(you)+"/", q0); err != nil {
- log.Printf("Addr2: %s\n", err)
- }
- q2, q3, err := w.ReadAddr()
- if err != nil {
- log.Printf("ReadAddr2: %s\n", err)
- return
- }
-
- space := " "
- if q1 > q3 || pr.StatusMsg == "" { // already have or don't need space
- space = ""
- }
- if err := w.Addr("#%d/.*/", q1); err != nil {
- log.Printf("Addr3: %s\n", err)
- }
- w.Fprintf("data", "%s%s", space, pr.StatusMsg)
-
- space = ""
- if q0 == q2 {
- w.Addr("#%d,#%d", q0, q0)
- space = " "
- } else {
- w.Addr("#%d,#%d", q0, q0+1)
- }
- w.Fprintf("data", "%s%s", short(pr.Status), space)
-}
-
-func (w *Window) expand() {
- // Use selection if any.
- w.Fprintf("ctl", "addr=dot\n")
- q0, q1, err := w.ReadAddr()
- if err == nil && q0 <= w.Q0 && w.Q0 <= q1 {
- goto Read
- }
- if err = w.Addr("#%d-/[a-zA-Z0-9_@.\\-]*/,#%d+/[a-zA-Z0-9_@.\\-]*/", w.Q0, w.Q1); err != nil {
- log.Printf("expand: %v", err)
- return
- }
- q0, q1, err = w.ReadAddr()
- if err != nil {
- log.Printf("expand: %v", err)
- return
- }
-
-Read:
- data, err := w.ReadAll("xdata")
- if err != nil {
- log.Printf("read: %v", err)
- return
- }
- w.Text = data
- w.Q0 = q0
- w.Q1 = q1
- return
-}
-
-// Invariant: in chat windows, the acme addr corresponds to the
-// empty string just before the input being typed. Text before addr
-// is the chat history (usually ending in a blank line).
-
-func (w *Window) message(format string, args ...interface{}) {
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("message; addr=%d,%d", q0, q1)
- }
- if err := w.Addr(".-/\\n?\\n?/"); err != nil && *acmeDebug {
- log.Printf("set addr: %s", err)
- }
- q0, _, _ := w.ReadAddr()
- nl := ""
- if q0 > 0 {
- nl = "\n"
- }
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("inserting; addr=%d,%d", q0, q1)
- }
- w.Fprintf("data", nl+w.time()+format+"\n", args...)
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("wrote; addr=%d,%d", q0, q1)
- }
-}
-
-func (w *Window) sendMsg() {
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("sendMsg; addr=%d,%d", q0, q1)
- }
- if err := w.Addr(`.,./(.|\n)*\n/`); err != nil {
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("no text (%s); addr=%d,%d", err, q0, q1)
- }
- return
- }
- q0, q1, _ := w.ReadAddr()
- if *acmeDebug {
- log.Printf("found msg; addr=%d,%d", q0, q1)
- }
- line, _ := w.ReadAll("xdata")
- trim := string(bytes.TrimSpace(line))
- if len(trim) > 0 {
- err := client.Send(xmpp.Chat{Remote: w.remote, Type: "chat", Text: trim})
-
- // Select blank line before input (if any) and input.
- w.Addr("#%d-/\\n?\\n?/,#%d", q0, q1)
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("selected text; addr=%d,%d", q0, q1)
- }
- q0, _, _ := w.ReadAddr()
-
- // Overwrite with \nmsg\n\n.
- // Leaves addr after final \n, which is where we want it.
- nl := ""
- if q0 > 0 {
- nl = "\n"
- }
- errstr := ""
- if err != nil {
- errstr = fmt.Sprintf("\n%s", errstr)
- }
- w.Fprintf("data", "%s%s%s%s\n\n", nl, w.time(), trim, errstr)
- if *acmeDebug {
- q0, q1, _ := w.ReadAddr()
- log.Printf("wrote; addr=%d,%d", q0, q1)
- }
- w.Fprintf("ctl", "clean\n")
- }
-}
-
-func (w *Window) readAcme() {
- for {
- e, err := w.ReadEvent()
- if err != nil {
- w.err = err
- acmeChan <- w
- break
- }
- //fmt.Printf("%c%c %d,%d %d,%d %#x %#q %#q %#q\n", e.C1, e.C2, e.Q0, e.Q1, e.OrigQ0, e.OrigQ1, e.Flag, e.Text, e.Arg, e.Loc)
- w.Event = e
- acmeChan <- w
- acmeChan <- nil
- }
-}
-
-func (w *Window) readChat() {
- for {
- msg, err := client.Recv()
- if err != nil {
- msgChan <- &Msg{w: w, err: err}
- break
- }
- //fmt.Printf("%s\n", *msg)
- msgChan <- &Msg{w: w, Chat: &msg}
- }
-}
-
-func lookContact(you string) *Window {
- return active["Chat/"+acct.Nick+"/"+you]
-}
-
-func showContact(you string) *Window {
- w := lookContact(you)
- if w != nil {
- w.Ctl("show\n")
- return w
- }
-
- ww, err := acme.New()
- if err != nil {
- log.Fatal(err)
- }
-
- name := "Chat/" + acct.Nick + "/" + you
- ww.Name(name)
- w = &Window{Win: ww, typ: "chat", name: name, remote: you}
- w.Fprintf("body", "\n")
- w.Addr("#1")
- w.OpenEvent()
- w.Fprintf("ctl", "cleartag\n")
- w.Fprintf("tag", " Ack")
- if p := cachedPresence(you); p != nil {
- w.status(p)
- }
- active[name] = w
- go w.readAcme()
- return w
-}
-
-func randid() string {
- return fmt.Sprint(time.Now())
-}
diff --git a/vendor/github.com/mattermost/rsc/google/chat.go b/vendor/github.com/mattermost/rsc/google/chat.go
deleted file mode 100644
index 8e9ae1c50..000000000
--- a/vendor/github.com/mattermost/rsc/google/chat.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2011 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 file.
-
-package google
-
-import "github.com/mattermost/rsc/xmpp"
-
-type ChatID struct {
- ID string
- Email string
- Status xmpp.Status
- StatusMsg string
-}
-
-type ChatSend struct {
- ID *ChatID
- Msg xmpp.Chat
-}
-
-func (g *Client) ChatRecv(cid *ChatID) (*xmpp.Chat, error) {
- var msg xmpp.Chat
- if err := g.client.Call("goog.ChatRecv", cid, &msg); err != nil {
- return nil, err
- }
- return &msg, nil
-}
-
-func (g *Client) ChatStatus(cid *ChatID) error {
- return g.client.Call("goog.ChatRecv", cid, &Empty{})
-}
-
-func (g *Client) ChatSend(cid *ChatID, msg *xmpp.Chat) error {
- return g.client.Call("goog.ChatSend", &ChatSend{cid, *msg}, &Empty{})
-}
-
-func (g *Client) ChatRoster(cid *ChatID) error {
- return g.client.Call("goog.ChatRoster", cid, &Empty{})
-}
diff --git a/vendor/github.com/mattermost/rsc/google/gmail/gmail.go b/vendor/github.com/mattermost/rsc/google/gmail/gmail.go
deleted file mode 100644
index 1d4072ef7..000000000
--- a/vendor/github.com/mattermost/rsc/google/gmail/gmail.go
+++ /dev/null
@@ -1,1241 +0,0 @@
-package main
-
-import (
- "bufio"
- "bytes"
- "flag"
- "fmt"
- "io"
- "log"
- "os"
- "os/exec"
- "os/signal"
- "regexp"
- "sort"
- "strings"
- "time"
-
- "github.com/mattermost/rsc/google"
- "github.com/mattermost/rsc/imap"
-)
-
-var cmdtab = []struct {
- Name string
- Args int
- F func(*Cmd, *imap.MsgPart) *imap.MsgPart
- TF func(*Cmd, []*imap.Msg) *imap.MsgPart
- Help string
-}{
- {"+", 0, pluscmd, tpluscmd, "+ print the next message"},
- {"a", 1, rcmd, nil, "a reply to sender and recipients"},
- {"b", 0, bcmd, nil, "b print the next 10 headers"},
- {"d", 0, dcmd, tdcmd, "d mark for deletion"},
- {"f", 1, fcmd, tfcmd, "f forward message"},
- {"h", 0, hcmd, nil, "h print elided message summary (,h for all)"},
- {"help", 0, nil, nil, "help print this info"},
- {"i", 0, icmd, nil, "i incorporate new mail"},
- {"m", 0, mcmd, tmcmd, "m mute and delete thread (gmail only)"},
- {"mime", 0, mimecmd, nil, "mime print message's MIME structure "},
- {"p", 0, pcmd, nil, "p print the processed message"},
- // { "p+", 0, pcmd, nil, "p print the processed message, showing all quoted text" },
- {"P", 0, Pcmd, nil, "P print the raw message"},
- {`"`, 0, quotecmd, nil, `" print a quoted version of msg`},
- {"q", 0, qcmd, nil, "q exit and remove all deleted mail"},
- {"r", 1, rcmd, nil, "r [addr] reply to sender plus any addrs specified"},
- {"s", 1, scmd, tscmd, "s name copy message to named mailbox (label for gmail)"},
- {"u", 0, ucmd, nil, "u remove deletion mark"},
- // { "w", 1, wcmd, nil, "w file store message contents as file" },
- {"W", 0, Wcmd, nil, "W open in web browser"},
- {"x", 0, xcmd, nil, "x exit without flushing deleted messages"},
- {"y", 0, ycmd, nil, "y synchronize with mail box"},
- {"=", 1, eqcmd, nil, "= print current message number"},
- {"|", 1, pipecmd, nil, "|cmd pipe message body to a command"},
- // { "||", 1, rpipecmd, nil, "||cmd pipe raw message to a command" },
- {"!", 1, bangcmd, nil, "!cmd run a command"},
-}
-
-func init() {
- // Have to insert helpcmd by hand because it refers to cmdtab,
- // so it would cause an init loop above.
- for i := range cmdtab {
- if cmdtab[i].Name == "help" {
- cmdtab[i].F = helpcmd
- }
- }
-}
-
-type Cmd struct {
- Name string
- Args []string
- Line string // Args[0:] original text
- ArgLine string // Args[1:] original text
- F func(*Cmd, *imap.MsgPart) *imap.MsgPart
- TF func(*Cmd, []*imap.Msg) *imap.MsgPart
- Delete bool
- Thread bool
- Targ *imap.MsgPart
- Targs []*imap.Msg
- A1, A2 int
-}
-
-var (
- bin = bufio.NewReader(os.Stdin)
- bout = bufio.NewWriter(os.Stdout)
-
- acctName = flag.String("a", "", "account to use")
-
- dot *imap.MsgPart // Selected messages
-
- inbox *imap.Box
- msgs []*imap.Msg
- msgNum = make(map[*imap.Msg]int)
- deleted = make(map[*imap.Msg]bool)
- isGmail = false
- acct google.Account
- threaded bool
- interrupted bool
-
- maxfrom int
- subjlen int
-)
-
-func nextMsg(m *imap.Msg) *imap.Msg {
- i := msgNum[m]
- i++
- if i >= len(msgs) {
- return nil
- }
- return msgs[i]
-}
-
-func main() {
- flag.BoolVar(&imap.Debug, "imapdebug", false, "imap debugging trace")
- flag.Parse()
-
- acct = google.Acct(*acctName)
-
- if args := flag.Args(); len(args) > 0 {
- for i := range args {
- args[i] = "-to=" + args[i]
- }
- cmd := exec.Command("gmailsend", append([]string{"-a", acct.Email, "-i"}, args...)...)
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Run(); err != nil {
- fmt.Fprintf(os.Stderr, "!%s\n", err)
- os.Exit(1)
- }
- return
- }
-
- c, err := imap.NewClient(imap.TLS, "imap.gmail.com", acct.Email, acct.Password, "")
- if err != nil {
- log.Fatal(err)
- }
- isGmail = c.IsGmail()
- threaded = isGmail
-
- inbox = c.Inbox()
- if err := inbox.Check(); err != nil {
- log.Fatal(err)
- }
-
- msgs = inbox.Msgs()
- maxfrom = 12
- for i, m := range msgs {
- msgNum[m] = i
- if n := len(from(m.Hdr)); n > maxfrom {
- maxfrom = n
- }
- }
- if maxfrom > 20 {
- maxfrom = 20
- }
- subjlen = 80 - maxfrom
-
- rethread()
-
- go func() {
- for sig := range signal.Incoming {
- if sig == os.SIGINT {
- fmt.Fprintf(os.Stderr, "!interrupt\n")
- interrupted = true
- continue
- }
- if sig == os.SIGCHLD || sig == os.SIGWINCH {
- continue
- }
- fmt.Fprintf(os.Stderr, "!%s\n", sig)
- }
- }()
-
- for {
- if dot != nil {
- fmt.Fprintf(bout, "%d", msgNum[dot.Msg]+1)
- if dot != &dot.Msg.Root {
- fmt.Fprintf(bout, ".%s", dot.ID)
- }
- }
- fmt.Fprintf(bout, ": ")
- bout.Flush()
-
- line, err := bin.ReadString('\n')
- if err != nil {
- break
- }
-
- cmd, err := parsecmd(line)
- if err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- continue
- }
-
- if cmd.Targ != nil || cmd.Targs == nil && cmd.A2 == 0 {
- x := cmd.F(cmd, cmd.Targ)
- if x != nil {
- dot = x
- }
- } else {
- targs := cmd.Targs
- if targs == nil {
- delta := +1
- if cmd.A1 > cmd.A2 {
- delta = -1
- }
- for i := cmd.A1; i <= cmd.A2; i += delta {
- if i < 1 || i > len(msgs) {
- continue
- }
- targs = append(targs, msgs[i-1])
- }
- }
- if cmd.Thread {
- if !isGmail {
- fmt.Fprintf(bout, "!need gmail for threaded command\n")
- continue
- }
- byThread := make(map[uint64][]*imap.Msg)
- for _, m := range msgs {
- t := m.GmailThread
- byThread[t] = append(byThread[t], m)
- }
- for _, m := range targs {
- t := m.GmailThread
- if byThread[t] != nil {
- if cmd.TF != nil {
- if x := cmd.TF(cmd, byThread[t]); x != nil {
- dot = x
- }
- } else {
- for _, mm := range byThread[t] {
- x := cmd.F(cmd, &mm.Root)
- if x != nil {
- dot = x
- }
- }
- }
- }
- delete(byThread, t)
- }
- continue
- }
- for _, m := range targs {
- if cmd.Delete {
- dcmd(cmd, &m.Root)
- if cmd.Name == "p" {
- // dp is a special case: it advances to the next message before the p.
- next := nextMsg(m)
- if next == nil {
- fmt.Fprintf(bout, "!address\n")
- dot = &m.Root
- break
- }
- m = next
- }
- }
- x := cmd.F(cmd, &m.Root)
- if x != nil {
- dot = x
- }
- // TODO: Break loop on interrupt.
- }
- }
- }
- qcmd(nil, nil)
-}
-
-func parsecmd(line string) (cmd *Cmd, err error) {
- cmd = &Cmd{}
- line = strings.TrimSpace(line)
- if line == "" {
- // Empty command is a special case: advance and print.
- cmd.F = pcmd
- if dot == nil {
- cmd.A1 = 1
- cmd.A2 = 1
- } else {
- n := msgNum[dot.Msg] + 2
- if n > len(msgs) {
- return nil, fmt.Errorf("out of messages")
- }
- cmd.A1 = n
- cmd.A2 = n
- }
- return cmd, nil
- }
-
- // Global search?
- if line[0] == 'g' {
- line = line[1:]
- if line == "" || line[0] != '/' {
- // No search string means all messages.
- cmd.A1 = 1
- cmd.A2 = len(msgs)
- } else if line[0] == '/' {
- re, rest, err := parsere(line)
- if err != nil {
- return nil, err
- }
- line = rest
- // Find all messages matching this search string.
- var targ []*imap.Msg
- for _, m := range msgs {
- if re.MatchString(header(m)) {
- targ = append(targ, m)
- }
- }
- if len(targ) == 0 {
- return nil, fmt.Errorf("no matches")
- }
- cmd.Targs = targ
- }
- } else {
- // Parse an address.
- a1, targ, rest, err := parseaddr(line, 1)
- if err != nil {
- return nil, err
- }
- if targ != nil {
- cmd.Targ = targ
- line = rest
- } else {
- if a1 < 1 || a1 > len(msgs) {
- return nil, fmt.Errorf("message number %d out of range", a1)
- }
- cmd.A1 = a1
- cmd.A2 = a1
- a2 := a1
- if rest != "" && rest[0] == ',' {
- // This is an address range.
- a2, targ, rest, err = parseaddr(rest[1:], len(msgs))
- if err != nil {
- return nil, err
- }
- if a2 < 1 || a2 > len(msgs) {
- return nil, fmt.Errorf("message number %d out of range", a2)
- }
- cmd.A2 = a2
- } else if rest == line {
- // There was no address.
- if dot == nil {
- cmd.A1 = 1
- cmd.A2 = 0
- } else {
- if dot != nil {
- if dot == &dot.Msg.Root {
- // If dot is a plain msg, use a range so that dp works.
- cmd.A1 = msgNum[dot.Msg] + 1
- cmd.A2 = cmd.A1
- } else {
- cmd.Targ = dot
- }
- }
- }
- }
- line = rest
- }
- }
-
- cmd.Line = strings.TrimSpace(line)
-
- // Insert space after ! or | for tokenization.
- switch {
- case strings.HasPrefix(cmd.Line, "||"):
- cmd.Line = cmd.Line[:2] + " " + cmd.Line[2:]
- case strings.HasPrefix(cmd.Line, "!"), strings.HasPrefix(cmd.Line, "|"):
- cmd.Line = cmd.Line[:1] + " " + cmd.Line[1:]
- }
-
- av := strings.Fields(cmd.Line)
- cmd.Args = av
- if len(av) == 0 || av[0] == "" {
- // Default is to print.
- cmd.F = pcmd
- return cmd, nil
- }
-
- name := av[0]
- cmd.ArgLine = strings.TrimSpace(cmd.Line[len(av[0]):])
-
- // Hack to allow t prefix on all commands.
- if len(name) >= 2 && name[0] == 't' {
- cmd.Thread = true
- name = name[1:]
- }
-
- // Hack to allow d prefix on all commands.
- if len(name) >= 2 && name[0] == 'd' {
- cmd.Delete = true
- name = name[1:]
- }
- cmd.Name = name
-
- // Search command table.
- for _, ct := range cmdtab {
- if ct.Name == name {
- if ct.Args == 0 && len(av) > 1 {
- return nil, fmt.Errorf("%s doesn't take an argument", name)
- }
- cmd.F = ct.F
- cmd.TF = ct.TF
- if name == "m" {
- // mute applies to all thread no matter what
- cmd.Thread = true
- }
- return cmd, nil
- }
- }
- return nil, fmt.Errorf("unknown command %s", name)
-}
-
-func parseaddr(addr string, deflt int) (n int, targ *imap.MsgPart, rest string, err error) {
- dot := dot
- n = deflt
- for {
- old := addr
- n, targ, rest, err = parseaddr1(addr, n, dot)
- if targ != nil || rest == old || err != nil {
- break
- }
- if n < 1 || n > len(msgs) {
- return 0, nil, "", fmt.Errorf("message number %d out of range", n)
- }
- dot = &msgs[n-1].Root
- addr = rest
- }
- return
-}
-
-func parseaddr1(addr string, deflt int, dot *imap.MsgPart) (n int, targ *imap.MsgPart, rest string, err error) {
- base := 0
- if dot != nil {
- base = msgNum[dot.Msg] + 1
- }
- if addr == "" {
- return deflt, nil, addr, nil
- }
- var i int
- sign := 0
- switch c := addr[0]; c {
- case '+':
- sign = +1
- addr = addr[1:]
- case '-':
- sign = -1
- addr = addr[1:]
- case '.':
- if base == 0 {
- return 0, nil, "", fmt.Errorf("no message selected")
- }
- n = base
- i = 1
- goto HaveNumber
- case '$':
- if len(msgs) == 0 {
- return 0, nil, "", fmt.Errorf("no messages")
- }
- n = len(msgs)
- i = 1
- goto HaveNumber
- case '/', '?':
- var re *regexp.Regexp
- re, addr, err = parsere(addr)
- if err != nil {
- return
- }
- var delta int
- if c == '/' {
- delta = +1
- } else {
- delta = -1
- }
- for j := base + delta; 1 <= j && j <= len(msgs); j += delta {
- if re.MatchString(header(msgs[j-1])) {
- n = j
- i = 0 // already cut addr
- goto HaveNumber
- }
- }
- err = fmt.Errorf("search")
- return
- // TODO case '%'
- }
- for i = 0; i < len(addr) && '0' <= addr[i] && addr[i] <= '9'; i++ {
- n = 10*n + int(addr[i]) - '0'
- }
- if sign != 0 {
- if n == 0 {
- n = 1
- }
- n = base + n*sign
- goto HaveNumber
- }
- if i == 0 {
- return deflt, nil, addr, nil
- }
-HaveNumber:
- rest = addr[i:]
- if i < len(addr) && addr[i] == '.' {
- if n < 1 || n > len(msgs) {
- err = fmt.Errorf("message number %d out of range", n)
- return
- }
- targ = &msgs[n-1].Root
- for i < len(addr) && addr[i] == '.' {
- i++
- var j int
- n = 0
- for j = i; j < len(addr) && '0' <= addr[j] && addr[j] <= '9'; j++ {
- n = 10*n + int(addr[j]) - '0'
- }
- if j == i {
- err = fmt.Errorf("malformed message number %s", addr[:j])
- return
- }
- if n < 1 || n > len(targ.Child) {
- err = fmt.Errorf("message number %s out of range", addr[:j])
- return
- }
- targ = targ.Child[n-1]
- i = j
- }
- n = 0
- rest = addr[i:]
- return
- }
- return
-}
-
-func parsere(addr string) (re *regexp.Regexp, rest string, err error) {
- prog, rest, err := parseprog(addr)
- if err != nil {
- return
- }
- re, err = regexp.Compile(prog)
- return
-}
-
-var lastProg string
-
-func parseprog(addr string) (prog string, rest string, err error) {
- if len(addr) == 1 {
- if lastProg != "" {
- return lastProg, "", nil
- }
- err = fmt.Errorf("no search")
- return
- }
- i := strings.Index(addr[1:], addr[:1])
- if i < 0 {
- prog = addr[1:]
- rest = ""
- } else {
- i += 1 // adjust for slice in IndexByte arg
- prog, rest = addr[1:i], addr[i+1:]
- }
- lastProg = prog
- return
-}
-
-func bcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- var m *imap.Msg
- if dot == nil {
- if len(msgs) == 0 {
- return nil
- }
- m = msgs[0]
- } else {
- m = dot.Msg
- }
- for i := 0; i < 10; i++ {
- hcmd(c, &m.Root)
- next := nextMsg(m)
- if next == nil {
- break
- }
- m = next
- }
- return &m.Root
-}
-
-func dcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- fmt.Fprintf(bout, "!address\n")
- return nil
- }
- deleted[dot.Msg] = true
- return &dot.Msg.Root
-}
-
-func tdcmd(c *Cmd, msgs []*imap.Msg) *imap.MsgPart {
- if len(msgs) == 0 {
- fmt.Fprintf(bout, "!address\n")
- return nil
- }
- for _, m := range msgs {
- deleted[m] = true
- }
- return &msgs[len(msgs)-1].Root
-}
-
-func ucmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- fmt.Fprintf(bout, "!address\n")
- return nil
- }
- delete(deleted, dot.Msg)
- return &dot.Msg.Root
-}
-
-func eqcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- fmt.Fprintf(bout, "0")
- } else {
- fmt.Fprintf(bout, "%d", msgNum[dot.Msg]+1)
- if dot != &dot.Msg.Root {
- fmt.Fprintf(bout, ".%s", dot.ID)
- }
- }
- fmt.Fprintf(bout, "\n")
- return nil
-}
-
-func from(h *imap.MsgHdr) string {
- if len(h.From) < 1 {
- return "?"
- }
- if name := h.From[0].Name; name != "" {
- return name
- }
- return h.From[0].Email
-}
-
-func header(m *imap.Msg) string {
- var t string
- if time.Now().Sub(m.Date) > 365*24*time.Hour {
- t = m.Date.Format("01/02 15:04")
- } else {
- t = m.Date.Format("01/02 2006 ")
- }
- ch := ' '
- if len(m.Root.Child) > 1 || len(m.Root.Child) == 1 && len(m.Root.Child[0].Child) > 0 {
- ch = 'H'
- }
- del := ' '
- if deleted[m] {
- del = 'd'
- }
- return fmt.Sprintf("%-3d %c%c %s %-*.*s %.*s",
- msgNum[m]+1, ch, del, t,
- maxfrom, maxfrom, from(m.Hdr),
- subjlen, m.Hdr.Subject)
-}
-
-func hcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot != nil {
- fmt.Fprintf(bout, "%s\n", header(dot.Msg))
- }
- return nil
-}
-
-func helpcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- fmt.Fprint(bout, "Commands are of the form [<range>] <command> [args]\n")
- fmt.Fprint(bout, "<range> := <addr> | <addr>','<addr>| 'g'<search>\n")
- fmt.Fprint(bout, "<addr> := '.' | '$' | '^' | <number> | <search> | <addr>'+'<addr> | <addr>'-'<addr>\n")
- fmt.Fprint(bout, "<search> := '/'<gmail search>'/' | '?'<gmail search>'?'\n")
- fmt.Fprint(bout, "<command> :=\n")
- for _, ct := range cmdtab {
- fmt.Fprintf(bout, "%s\n", ct.Help)
- }
- return dot
-}
-
-func mimecmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot != nil {
- mimeH(fmt.Sprint(msgNum[dot.Msg]+1), dot)
- }
- return nil
-}
-
-func mimeH(id string, p *imap.MsgPart) {
- if p.ID != "" {
- id = id + "." + p.ID
- }
- fmt.Fprintf(bout, "%s %s %s %#q %d\n", id, p.Type, p.Encoding+"/"+p.Charset, p.Name, p.Bytes)
- for _, child := range p.Child {
- mimeH(id, child)
- }
-}
-
-func icmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- sync(false)
- return nil
-}
-
-func ycmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- sync(true)
- return nil
-}
-
-func tpluscmd(c *Cmd, msgs []*imap.Msg) *imap.MsgPart {
- if len(msgs) == 0 {
- return nil
- }
- m := nextMsg(msgs[len(msgs)-1])
- if m == nil {
- fmt.Fprintf(bout, "!no more messages\n")
- return nil
- }
- return pcmd(c, &m.Root)
-}
-
-func pluscmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- m := nextMsg(dot.Msg)
- if m == nil {
- fmt.Fprintf(bout, "!no more messages\n")
- return nil
- }
- return pcmd(c, &m.Root)
-}
-
-func addrlist(x []imap.Addr) string {
- var b bytes.Buffer
- for i, a := range x {
- if i > 0 {
- b.WriteString(", ")
- }
- b.WriteString(a.String())
- }
- return b.String()
-}
-
-func wpcmd(w io.Writer, c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- if dot == &dot.Msg.Root {
- h := dot.Msg.Hdr
- if len(h.From) > 0 {
- fmt.Fprintf(w, "From: %s\n", addrlist(h.From))
- }
- fmt.Fprintf(w, "Date: %s\n", dot.Msg.Date)
- if len(h.From) > 0 {
- fmt.Fprintf(w, "To: %s\n", addrlist(h.To))
- }
- if len(h.CC) > 0 {
- fmt.Fprintf(w, "CC: %s\n", addrlist(h.CC))
- }
- if len(h.BCC) > 0 {
- fmt.Fprintf(w, "BCC: %s\n", addrlist(h.BCC))
- }
- if len(h.Subject) > 0 {
- fmt.Fprintf(w, "Subject: %s\n", h.Subject)
- }
- fmt.Fprintf(w, "\n")
- }
- printMIME(w, dot, true)
- fmt.Fprintf(w, "\n")
- return dot
-}
-
-func pcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- defer bout.Flush()
- return wpcmd(bout, c, dot)
-}
-
-func pipecmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- args := c.Args[1:]
- if len(args) == 0 {
- fmt.Fprintf(bout, "!no command\n")
- return dot
- }
- bout.Flush()
- cmd := exec.Command(args[0], args[1:]...)
- w, err := cmd.StdinPipe()
- if err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- return dot
- }
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Start(); err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- return dot
- }
- wpcmd(w, c, dot)
- w.Close()
- if err := cmd.Wait(); err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- }
- return dot
-}
-
-func bangcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- args := c.Args[1:]
- if len(args) == 0 {
- fmt.Fprintf(bout, "!no command\n")
- return dot
- }
- bout.Flush()
- cmd := exec.Command(args[0], args[1:]...)
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Run(); err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- }
- return nil
-}
-
-func unixfrom(h *imap.MsgHdr) string {
- if len(h.From) == 0 {
- return ""
- }
- return h.From[0].Email
-}
-
-func unixtime(m *imap.Msg) string {
- return dot.Msg.Date.Format("Mon Jan _2 15:04:05 MST 2006")
-}
-
-func Pcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- if dot == &dot.Msg.Root {
- fmt.Fprintf(bout, "From %s %s\n",
- unixfrom(dot.Msg.Hdr),
- unixtime(dot.Msg))
- }
- bout.Write(dot.Raw())
- return dot
-}
-
-func printMIME(w io.Writer, p *imap.MsgPart, top bool) {
- switch {
- case top && strings.HasPrefix(p.Type, "text/"):
- text := p.ShortText()
- if p.Type == "text/html" {
- cmd := exec.Command("htmlfmt")
- cmd.Stdin = bytes.NewBuffer(text)
- if w == bout {
- bout.Flush()
- cmd.Stdout = os.Stdout
- } else {
- cmd.Stdout = w
- }
- if err := cmd.Run(); err != nil {
- fmt.Fprintf(w, "%d.%s !%s\n", msgNum[p.Msg]+1, p.ID, err)
- }
- return
- }
- w.Write(text)
- case p.Type == "text/plain":
- if top {
- panic("printMIME loop")
- }
- printMIME(w, p, true)
- case p.Type == "multipart/alternative":
- for _, pp := range p.Child {
- if pp.Type == "text/plain" {
- printMIME(w, pp, false)
- return
- }
- }
- if len(p.Child) > 0 {
- printMIME(w, p.Child[0], false)
- }
- case strings.HasPrefix(p.Type, "multipart/"):
- for _, pp := range p.Child {
- printMIME(w, pp, false)
- }
- default:
- fmt.Fprintf(w, "%d.%s !%s %s %s\n", msgNum[p.Msg]+1, p.ID, p.Type, p.Desc, p.Name)
- }
-}
-
-func qcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- flushDeleted()
- xcmd(c, dot)
- panic("not reached")
-}
-
-type quoter struct {
- bol bool
- w io.Writer
-}
-
-func (q *quoter) Write(b []byte) (n int, err error) {
- n = len(b)
- err = nil
- for len(b) > 0 {
- if q.bol {
- q.w.Write([]byte("> "))
- q.bol = false
- }
- i := bytes.IndexByte(b, '\n')
- if i < 0 {
- i = len(b)
- } else {
- q.bol = true
- i++
- }
- q.w.Write(b[:i])
- b = b[i:]
- }
- return
-}
-
-func quotecmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- m := dot.Msg
- if len(m.Hdr.From) != 0 {
- a := m.Hdr.From[0]
- name := a.Name
- if name == "" {
- name = a.Email
- }
- date := m.Date.Format("Jan 2, 2006 at 15:04")
- fmt.Fprintf(bout, "On %s, %s wrote:\n", date, name)
- }
- printMIME(&quoter{true, bout}, dot, true)
- return dot
-}
-
-func addre(s string) string {
- if len(s) < 4 || !strings.EqualFold(s[:4], "re: ") {
- return "Re: " + s
- }
- return s
-}
-
-func rcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil || dot.Msg.Hdr == nil {
- fmt.Fprintf(bout, "!nothing to reply to\n")
- return nil
- }
-
- h := dot.Msg.Hdr
- replyTo := h.ReplyTo
- have := make(map[string]bool)
- if len(replyTo) == 0 {
- replyTo = h.From
- }
- if c.Name[0] == 'a' {
- for _, a := range replyTo {
- have[a.Email] = true
- }
- for _, a := range append(append(append([]imap.Addr(nil), h.From...), h.To...), h.CC...) {
- if !have[a.Email] {
- have[a.Email] = true
- replyTo = append(replyTo, a)
- }
- }
- }
- if len(replyTo) == 0 {
- fmt.Fprintf(bout, "!no one to reply to\n")
- return dot
- }
-
- args := []string{"-a", acct.Email, "-s", addre(h.Subject), "-in-reply-to", h.MessageID}
- fmt.Fprintf(bout, "replying to:")
- for _, a := range replyTo {
- fmt.Fprintf(bout, " %s", a.Email)
- args = append(args, "-to", a.String())
- }
- for _, arg := range c.Args[1:] {
- fmt.Fprintf(bout, " %s", arg)
- args = append(args, "-to", arg)
- }
- fmt.Fprintf(bout, "\n")
- bout.Flush()
- cmd := exec.Command("gmailsend", args...)
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- err := cmd.Run()
- if err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- }
- return dot
-}
-
-func fcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- fmt.Fprintf(bout, "!nothing to forward\n")
- return nil
- }
-
- return fwd(c, dot, nil)
-}
-
-func tfcmd(c *Cmd, msgs []*imap.Msg) *imap.MsgPart {
- if len(msgs) == 0 {
- fmt.Fprintf(bout, "!nothing to forward\n")
- return nil
- }
-
- return fwd(c, &msgs[len(msgs)-1].Root, msgs)
-}
-
-func fwd(c *Cmd, dot *imap.MsgPart, msgs []*imap.Msg) *imap.MsgPart {
- addrs := c.Args[1:]
- if len(addrs) == 0 {
- fmt.Fprintf(bout, "!f command requires address to forward to\n")
- return dot
- }
-
- h := dot.Msg.Hdr
- args := []string{"-a", acct.Email, "-s", "Fwd: " + h.Subject, "-append", "/dev/fd/3"}
- fmt.Fprintf(bout, "forwarding to:")
- for _, arg := range addrs {
- fmt.Fprintf(bout, " %s", arg)
- args = append(args, "-to", arg)
- }
- fmt.Fprintf(bout, "\n")
- bout.Flush()
-
- cmd := exec.Command("gmailsend", args...)
- r, w, err := os.Pipe()
- if err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- return dot
- }
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- cmd.ExtraFiles = []*os.File{r}
- if err := cmd.Start(); err != nil {
- r.Close()
- fmt.Fprintf(bout, "!%s\n", err)
- return dot
- }
- r.Close()
- what := "message"
- if len(msgs) > 1 {
- what = "conversation"
- }
- fmt.Fprintf(w, "\n\n--- Forwarded %s ---\n", what)
- if msgs == nil {
- wpcmd(w, c, dot)
- } else {
- for _, m := range msgs {
- wpcmd(w, c, &m.Root)
- fmt.Fprintf(w, "\n\n")
- }
- }
- w.Close()
- if err := cmd.Wait(); err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- }
- return dot
-}
-
-func rethread() {
- if !threaded {
- sort.Sort(byUIDRev(msgs))
- } else {
- byThread := make(map[uint64][]*imap.Msg)
- for _, m := range msgs {
- t := m.GmailThread
- byThread[t] = append(byThread[t], m)
- }
-
- var threadList [][]*imap.Msg
- for _, t := range byThread {
- sort.Sort(byUID(t))
- threadList = append(threadList, t)
- }
- sort.Sort(byUIDList(threadList))
-
- msgs = msgs[:0]
- for _, t := range threadList {
- msgs = append(msgs, t...)
- }
- }
- for i, m := range msgs {
- msgNum[m] = i
- }
-}
-
-type byUID []*imap.Msg
-
-func (l byUID) Less(i, j int) bool { return l[i].UID < l[j].UID }
-func (l byUID) Len() int { return len(l) }
-func (l byUID) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
-
-type byUIDRev []*imap.Msg
-
-func (l byUIDRev) Less(i, j int) bool { return l[i].UID > l[j].UID }
-func (l byUIDRev) Len() int { return len(l) }
-func (l byUIDRev) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
-
-type byUIDList [][]*imap.Msg
-
-func (l byUIDList) Less(i, j int) bool { return l[i][len(l[i])-1].UID > l[j][len(l[j])-1].UID }
-func (l byUIDList) Len() int { return len(l) }
-func (l byUIDList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
-
-func subj(m *imap.Msg) string {
- s := m.Hdr.Subject
- for strings.HasPrefix(s, "Re: ") || strings.HasPrefix(s, "RE: ") {
- s = s[4:]
- }
- return s
-}
-
-func mcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- c.ArgLine = "Muted"
- scmd(c, dot)
- return dcmd(c, dot)
-}
-
-func tmcmd(c *Cmd, msgs []*imap.Msg) *imap.MsgPart {
- c.ArgLine = "Muted"
- tscmd(c, msgs)
- return tdcmd(c, msgs)
-}
-
-func scmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- return tscmd(c, []*imap.Msg{dot.Msg})
-}
-
-func tscmd(c *Cmd, msgs []*imap.Msg) *imap.MsgPart {
- if len(msgs) == 0 {
- return nil
- }
- arg := c.ArgLine
- dot := &msgs[len(msgs)-1].Root
- if arg == "" {
- fmt.Fprintf(bout, "!s needs mailbox (label) name as argument\n")
- return dot
- }
- if strings.EqualFold(arg, "Muted") {
- if err := dot.Msg.Box.Mute(msgs); err != nil {
- fmt.Fprintf(bout, "!mute: %s\n", err)
- }
- } else {
- dst := dot.Msg.Box.Client.Box(arg)
- if dst == nil {
- fmt.Fprintf(bout, "!unknown mailbox %#q", arg)
- return dot
- }
- if err := dst.Copy(msgs); err != nil {
- fmt.Fprintf(bout, "!s %#q: %s\n", arg, err)
- }
- }
- return dot
-}
-
-func Wcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- if dot == nil {
- return nil
- }
- if !isGmail {
- fmt.Fprintf(bout, "!cmd W requires gmail\n")
- return dot
- }
- url := fmt.Sprintf("https://mail.google.com/mail/b/%s/?shva=1#inbox/%x", acct.Email, dot.Msg.GmailThread)
- if err := exec.Command("open", url).Run(); err != nil {
- fmt.Fprintf(bout, "!%s\n", err)
- }
- return dot
-}
-
-func xcmd(c *Cmd, dot *imap.MsgPart) *imap.MsgPart {
- // TODO: remove saved attachments?
- os.Exit(0)
- panic("not reached")
-}
-
-func flushDeleted() {
- var toDelete []*imap.Msg
- for m := range deleted {
- toDelete = append(toDelete, m)
- }
- if len(toDelete) == 0 {
- return
- }
- fmt.Fprintf(os.Stderr, "!deleting %d\n", len(toDelete))
- err := inbox.Delete(toDelete)
- if err != nil {
- fmt.Fprintf(os.Stderr, "!deleting: %s\n", err)
- }
-}
-
-func loadNew() {
- if err := inbox.Check(); err != nil {
- fmt.Fprintf(os.Stderr, "!inbox: %s\n", err)
- }
-
- old := make(map[*imap.Msg]bool)
- for _, m := range msgs {
- old[m] = true
- }
-
- nnew := 0
- new := inbox.Msgs()
- for _, m := range new {
- if old[m] {
- delete(old, m)
- } else {
- msgs = append(msgs, m)
- nnew++
- }
- }
- if nnew > 0 {
- fmt.Fprintf(os.Stderr, "!%d new messages\n", nnew)
- }
- for m := range old {
- // Deleted
- m.Flags |= imap.FlagDeleted
- delete(deleted, m)
- }
-}
-
-func sync(delete bool) {
- if delete {
- flushDeleted()
- }
- loadNew()
- if delete {
- w := 0
- for _, m := range msgs {
- if !m.Deleted() {
- msgs[w] = m
- w++
- }
- }
- msgs = msgs[:w]
- }
- rethread()
-}
diff --git a/vendor/github.com/mattermost/rsc/google/gmailsend/send.go b/vendor/github.com/mattermost/rsc/google/gmailsend/send.go
deleted file mode 100644
index ace6eb12b..000000000
--- a/vendor/github.com/mattermost/rsc/google/gmailsend/send.go
+++ /dev/null
@@ -1,370 +0,0 @@
-package main
-
-import (
- "bufio"
- "bytes"
- "encoding/base64"
- "flag"
- "fmt"
- "io"
- "net/smtp"
- "os"
- "regexp"
- "strings"
-
- "github.com/mattermost/rsc/google"
-)
-
-func enc(s string) string {
- // TODO =? .. ?=
- return s
-}
-
-type Addr struct {
- Name string
- Email string
-}
-
-func (a Addr) enc() string {
- if a.Name == "" {
- return "<" + a.Email + ">"
- }
- if a.Email == "" {
- return enc(a.Name) + ":;"
- }
- return enc(a.Name) + " <" + a.Email + ">"
-}
-
-type Addrs []Addr
-
-func (a *Addrs) String() string {
- return "[addrlist]"
-}
-
-func (a Addrs) has(s string) bool {
- for _, aa := range a {
- if aa.Email == s {
- return true
- }
- }
- return false
-}
-
-func (a *Addrs) Set(s string) bool {
- s = strings.TrimSpace(s)
- if strings.HasSuffix(s, ">") {
- j := strings.LastIndex(s, "<")
- if j >= 0 {
- *a = append(*a, Addr{strings.TrimSpace(s[:j]), s[j+1 : len(s)-1]})
- return true
- }
- }
-
- if strings.Contains(s, " ") {
- fmt.Fprintf(os.Stderr, "invalid address: %s", s)
- os.Exit(2)
- }
- *a = append(*a, Addr{"", s})
- return true
-}
-
-func (a *Addrs) parseLine(s string) {
- for _, f := range strings.Split(s, ",") {
- f = strings.TrimSpace(f)
- if f != "" {
- a.Set(f)
- }
- }
-}
-
-func (a Addrs) fixDomain() {
- i := strings.Index(acct.Email, "@")
- if i < 0 {
- return
- }
- dom := acct.Email[i:]
- for i := range a {
- if a[i].Email != "" && !strings.Contains(a[i].Email, "@") {
- a[i].Email += dom
- }
- }
-}
-
-var from, to, cc, bcc, replyTo Addrs
-var inReplyTo, subject string
-var appendFile = flag.String("append", "", "file to append to end of body")
-
-var acct google.Account
-var acctName = flag.String("a", "", "account to use")
-var inputHeader = flag.Bool("i", false, "read additional header lines from stdin")
-
-func holdmode() {
- if os.Getenv("TERM") == "9term" {
- // forgive me
- os.Stdout.WriteString("\x1B];*9term-hold+\x07")
- }
-}
-
-func match(line, prefix string, arg *string) bool {
- if len(line) < len(prefix) || !strings.EqualFold(line[:len(prefix)], prefix) {
- return false
- }
- *arg = strings.TrimSpace(line[len(prefix):])
- return true
-}
-
-func main() {
- flag.StringVar(&inReplyTo, "in-reply-to", "", "In-Reply-To")
- flag.StringVar(&subject, "s", "", "Subject")
- flag.Var(&from, "from", "From (can repeat)")
- flag.Var(&to, "to", "To (can repeat)")
- flag.Var(&cc, "cc", "CC (can repeat)")
- flag.Var(&bcc, "bcc", "BCC (can repeat)")
- flag.Var(&replyTo, "replyTo", "Reply-To (can repeat)")
-
- flag.Parse()
- if flag.NArg() != 0 && !*inputHeader {
- flag.Usage()
- }
-
- var body bytes.Buffer
- input := bufio.NewReader(os.Stdin)
- if *inputHeader {
- holdmode()
- Loop:
- for {
- s, err := input.ReadString('\n')
- if err != nil {
- if err == io.EOF {
- break Loop
- }
- fmt.Fprintf(os.Stderr, "reading stdin: %s\n", err)
- os.Exit(2)
- }
- var arg string
- switch {
- default:
- if ok, _ := regexp.MatchString(`^\S+:`, s); ok {
- fmt.Fprintf(os.Stderr, "unknown header line: %s", s)
- os.Exit(2)
- }
- body.WriteString(s)
- break Loop
- case match(s, "from:", &arg):
- from.parseLine(arg)
- case match(s, "to:", &arg):
- to.parseLine(arg)
- case match(s, "cc:", &arg):
- cc.parseLine(arg)
- case match(s, "bcc:", &arg):
- bcc.parseLine(arg)
- case match(s, "reply-to:", &arg):
- replyTo.parseLine(arg)
- case match(s, "subject:", &arg):
- subject = arg
- case match(s, "in-reply-to:", &arg):
- inReplyTo = arg
- }
- }
- }
-
- acct = google.Acct(*acctName)
- from.fixDomain()
- to.fixDomain()
- cc.fixDomain()
- bcc.fixDomain()
- replyTo.fixDomain()
-
- smtpTo := append(append(to, cc...), bcc...)
-
- if len(from) == 0 {
- // TODO: Much better
- name := ""
- email := acct.Email
- if email == "rsc@swtch.com" || email == "rsc@google.com" {
- name = "Russ Cox"
- }
- if email == "rsc@google.com" && (smtpTo.has("go@googlecode.com") || smtpTo.has("golang-dev@googlegroups.com") || smtpTo.has("golang-nuts@googlegroups.com")) {
- from = append(from, Addr{name, "rsc@golang.org"})
- } else {
- from = append(from, Addr{name, email})
- }
- }
-
- if len(from) > 1 {
- fmt.Fprintf(os.Stderr, "missing -from\n")
- os.Exit(2)
- }
-
- if len(to)+len(cc)+len(bcc) == 0 {
- fmt.Fprintf(os.Stderr, "missing destinations\n")
- os.Exit(2)
- }
-
- if !*inputHeader {
- holdmode()
- }
- _, err := io.Copy(&body, input)
- if err != nil {
- fmt.Fprintf(os.Stderr, "reading stdin: %s\n", err)
- os.Exit(2)
- }
-
- if *appendFile != "" {
- f, err := os.Open(*appendFile)
- if err != nil {
- fmt.Fprintf(os.Stderr, "append: %s\n", err)
- os.Exit(2)
- }
- _, err = io.Copy(&body, f)
- f.Close()
- if err != nil {
- fmt.Fprintf(os.Stderr, "append: %s\n", err)
- os.Exit(2)
- }
- }
-
- var msg bytes.Buffer
- fmt.Fprintf(&msg, "MIME-Version: 1.0\n")
- if len(from) > 0 {
- fmt.Fprintf(&msg, "From: ")
- for i, a := range from {
- if i > 0 {
- fmt.Fprintf(&msg, ", ")
- }
- fmt.Fprintf(&msg, "%s", a.enc())
- }
- fmt.Fprintf(&msg, "\n")
- }
- if len(to) > 0 {
- fmt.Fprintf(&msg, "To: ")
- for i, a := range to {
- if i > 0 {
- fmt.Fprintf(&msg, ", ")
- }
- fmt.Fprintf(&msg, "%s", a.enc())
- }
- fmt.Fprintf(&msg, "\n")
- }
- if len(cc) > 0 {
- fmt.Fprintf(&msg, "CC: ")
- for i, a := range cc {
- if i > 0 {
- fmt.Fprintf(&msg, ", ")
- }
- fmt.Fprintf(&msg, "%s", a.enc())
- }
- fmt.Fprintf(&msg, "\n")
- }
- if len(replyTo) > 0 {
- fmt.Fprintf(&msg, "Reply-To: ")
- for i, a := range replyTo {
- if i > 0 {
- fmt.Fprintf(&msg, ", ")
- }
- fmt.Fprintf(&msg, "%s", a.enc())
- }
- fmt.Fprintf(&msg, "\n")
- }
- if inReplyTo != "" {
- fmt.Fprintf(&msg, "In-Reply-To: %s\n", inReplyTo)
- }
- if subject != "" {
- fmt.Fprintf(&msg, "Subject: %s\n", enc(subject))
- }
- fmt.Fprintf(&msg, "Date: xxx\n")
- fmt.Fprintf(&msg, "Content-Type: text/plain; charset=\"utf-8\"\n")
- fmt.Fprintf(&msg, "Content-Transfer-Encoding: base64\n")
- fmt.Fprintf(&msg, "\n")
- enc64 := base64.StdEncoding.EncodeToString(body.Bytes())
- for len(enc64) > 72 {
- fmt.Fprintf(&msg, "%s\n", enc64[:72])
- enc64 = enc64[72:]
- }
- fmt.Fprintf(&msg, "%s\n\n", enc64)
-
- auth := smtp.PlainAuth(
- "",
- acct.Email,
- acct.Password,
- "smtp.gmail.com",
- )
- var smtpToEmail []string
- for _, a := range smtpTo {
- if a.Email != "" {
- smtpToEmail = append(smtpToEmail, a.Email)
- }
- }
-
- if err := sendMail("smtp.gmail.com:587", auth, from[0].Email, smtpToEmail, msg.Bytes()); err != nil {
- fmt.Fprintf(os.Stderr, "sending mail: %s\n", err)
- os.Exit(2)
- }
-}
-
-/*
- MIME-Version: 1.0
-Subject: commit/plan9port: rsc: 9term: hold mode back door
-From: Bitbucket <commits-noreply@bitbucket.org>
-To: plan9port-dev@googlegroups.com
-Date: Tue, 11 Oct 2011 13:34:30 -0000
-Message-ID: <20111011133430.31146.55070@bitbucket13.managed.contegix.com>
-Reply-To: commits-noreply@bitbucket.org
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: quoted-printable
-
-1 new changeset in plan9port:
-
-http://bitbucket.org/rsc/plan9port/changeset/8735d7708a1b/
-changeset: 8735d7708a1b
-user: rsc
-date: 2011-10-11 15:34:25
-summary: 9term: hold mode back door
-
-R=3Drsc
-http://codereview.appspot.com/5248056
-affected #: 2 files (-1 bytes)
-
-Repository URL: https://bitbucket.org/rsc/plan9port/
-
---
-
-This is a commit notification from bitbucket.org. You are receiving
-this because you have the service enabled, addressing the recipient of
-this email.
-
-*/
-
-func sendMail(addr string, a smtp.Auth, from string, to []string, msg []byte) error {
- c, err := smtp.Dial(addr)
- if err != nil {
- return err
- }
- if err = c.StartTLS(nil); err != nil {
- return err
- }
- if err = c.Auth(a); err != nil {
- return err
- }
- if err = c.Mail(from); err != nil {
- return err
- }
- for _, addr := range to {
- if err = c.Rcpt(addr); err != nil {
- return err
- }
- }
- w, err := c.Data()
- if err != nil {
- return err
- }
- _, err = w.Write(msg)
- if err != nil {
- return err
- }
- err = w.Close()
- if err != nil {
- return err
- }
- return c.Quit()
-}
diff --git a/vendor/github.com/mattermost/rsc/google/googleserver/chat.go b/vendor/github.com/mattermost/rsc/google/googleserver/chat.go
deleted file mode 100644
index 8b064dc92..000000000
--- a/vendor/github.com/mattermost/rsc/google/googleserver/chat.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2011 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 file.
-
-// TODO: Add ChatHangup.
-// TODO: Auto-hangup chats that are gone.
-
-package main
-
-import (
- "fmt"
-
- "github.com/mattermost/rsc/google"
- "github.com/mattermost/rsc/xmpp"
-)
-
-type chatClient struct {
- email string
- id string
- xmpp *xmpp.Client
-}
-
-var chatClients = map[string]*chatClient{}
-
-func (*Server) chatClient(cid *google.ChatID) (*chatClient, error) {
- id := cid.ID
- cc := chatClients[cid.ID]
- if cc == nil {
- a := google.Cfg.AccountByEmail(cid.Email)
- if a == nil {
- return nil, fmt.Errorf("unknown account %s", cid.Email)
- }
- // New client.
- cli, err := xmpp.NewClient("talk.google.com:443", a.Email, a.Password)
- if err != nil {
- return nil, err
- }
- cc = &chatClient{email: a.Email, id: id, xmpp: cli}
- cc.xmpp.Status(cid.Status, cid.StatusMsg)
- chatClients[id] = cc
- }
- return cc, nil
-}
-
-func (srv *Server) ChatRecv(cid *google.ChatID, msg *xmpp.Chat) error {
- cc, err := srv.chatClient(cid)
- if err != nil {
- return err
- }
- chat, err := cc.xmpp.Recv()
- if err != nil {
- return err
- }
- *msg = chat
- return nil
-}
-
-func (srv *Server) ChatStatus(cid *google.ChatID, _ *Empty) error {
- cc, err := srv.chatClient(cid)
- if err != nil {
- return err
- }
- return cc.xmpp.Status(cid.Status, cid.StatusMsg)
-}
-
-func (srv *Server) ChatSend(arg *google.ChatSend, _ *Empty) error {
- cc, err := srv.chatClient(arg.ID)
- if err != nil {
- return err
- }
- return cc.xmpp.Send(arg.Msg)
-}
-
-func (srv *Server) ChatRoster(cid *google.ChatID, _ *Empty) error {
- cc, err := srv.chatClient(cid)
- if err != nil {
- return err
- }
- return cc.xmpp.Roster()
-}
diff --git a/vendor/github.com/mattermost/rsc/google/googleserver/main.go b/vendor/github.com/mattermost/rsc/google/googleserver/main.go
deleted file mode 100644
index 2cd022446..000000000
--- a/vendor/github.com/mattermost/rsc/google/googleserver/main.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2011 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 file.
-
-package main
-
-import (
- // "flag"
- "bufio"
- "fmt"
- "log"
- "net"
- "net/rpc"
- "os"
- "strings"
- "syscall"
-
- "github.com/mattermost/rsc/google"
- "github.com/mattermost/rsc/xmpp"
-)
-
-func main() {
- google.ReadConfig()
- switch os.Args[1] {
- case "add":
- google.Cfg.Account = append(google.Cfg.Account, &google.Account{Email: os.Args[2], Password: os.Args[3]})
- google.WriteConfig()
- case "serve":
- serve()
- case "accounts":
- c, err := google.Dial()
- if err != nil {
- log.Fatal(err)
- }
- out, err := c.Accounts()
- if err != nil {
- log.Fatal(err)
- }
- for _, email := range out {
- fmt.Printf("%s\n", email)
- }
- case "ping":
- c, err := google.Dial()
- if err != nil {
- log.Fatal(err)
- }
- if err := c.Ping(); err != nil {
- log.Fatal(err)
- }
- case "chat":
- c, err := google.Dial()
- if err != nil {
- log.Fatal(err)
- }
- cid := &google.ChatID{ID: "1", Email: os.Args[2], Status: xmpp.Available, StatusMsg: ""}
- go chatRecv(c, cid)
- c.ChatRoster(cid)
- b := bufio.NewReader(os.Stdin)
- for {
- line, err := b.ReadString('\n')
- if err != nil {
- log.Fatal(err)
- }
- line = line[:len(line)-1]
- i := strings.Index(line, ": ")
- if i < 0 {
- log.Printf("<who>: <msg>, please")
- continue
- }
- who, msg := line[:i], line[i+2:]
- if err := c.ChatSend(cid, &xmpp.Chat{Remote: who, Type: "chat", Text: msg}); err != nil {
- log.Fatal(err)
- }
- }
- }
-}
-
-func chatRecv(c *google.Client, cid *google.ChatID) {
- for {
- msg, err := c.ChatRecv(cid)
- if err != nil {
- log.Fatal(err)
- }
- switch msg.Type {
- case "roster":
- for _, contact := range msg.Roster {
- fmt.Printf("%v\n", contact)
- }
- case "presence":
- fmt.Printf("%v\n", msg.Presence)
- case "chat":
- fmt.Printf("%s: %s\n", msg.Remote, msg.Text)
- default:
- fmt.Printf("<%s>\n", msg.Type)
- }
- }
-}
-
-func listen() net.Listener {
- socket := google.Dir() + "/socket"
- os.Remove(socket)
- l, err := net.Listen("unix", socket)
- if err != nil {
- log.Fatal(err)
- }
- return l
-}
-
-func serve() {
- f, err := os.OpenFile(google.Dir()+"/log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600)
- if err != nil {
- log.Fatal(err)
- }
- log.SetOutput(f)
- syscall.Dup2(f.Fd(), 2)
- os.Stdout = f
- os.Stderr = f
- l := listen()
- rpc.RegisterName("goog", &Server{})
- rpc.Accept(l)
- log.Fatal("rpc.Accept finished: server exiting")
-}
-
-type Server struct{}
-
-type Empty google.Empty
-
-func (*Server) Ping(*Empty, *Empty) error {
- return nil
-}
-
-func (*Server) Accounts(_ *Empty, out *[]string) error {
- var email []string
- for _, a := range google.Cfg.Account {
- email = append(email, a.Email)
- }
- *out = email
- return nil
-}
diff --git a/vendor/github.com/mattermost/rsc/google/main.go b/vendor/github.com/mattermost/rsc/google/main.go
deleted file mode 100644
index b11a6eefb..000000000
--- a/vendor/github.com/mattermost/rsc/google/main.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2011 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 file.
-
-// TODO: Something about redialing.
-
-package google
-
-import (
- // "flag"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "log"
- "net"
- "net/rpc"
- "os"
- "os/exec"
- "syscall"
- "time"
-)
-
-func Dir() string {
- dir := os.Getenv("HOME") + "/.goog"
- st, err := os.Stat(dir)
- if err != nil {
- if err := os.Mkdir(dir, 0700); err != nil {
- log.Fatal(err)
- }
- st, err = os.Stat(dir)
- if err != nil {
- log.Fatal(err)
- }
- }
- if !st.IsDir() {
- log.Fatalf("%s exists but is not a directory", dir)
- }
- if st.Mode()&0077 != 0 {
- log.Fatalf("%s exists but allows group or other permissions: %#o", dir, st.Mode()&0777)
- }
- return dir
-}
-
-func Dial() (*Client, error) {
- socket := Dir() + "/socket"
- c, err := net.Dial("unix", socket)
- if err == nil {
- return &Client{rpc.NewClient(c)}, nil
- }
- log.Print("starting server")
- os.Remove(socket)
- runServer()
- for i := 0; i < 50; i++ {
- c, err = net.Dial("unix", socket)
- if err == nil {
- return &Client{rpc.NewClient(c)}, nil
- }
- time.Sleep(200e6)
- if i == 0 {
- log.Print("waiting for server...")
- }
- }
- return nil, err
-}
-
-type Client struct {
- client *rpc.Client
-}
-
-type Empty struct{}
-
-func (g *Client) Ping() error {
- return g.client.Call("goog.Ping", &Empty{}, &Empty{})
-}
-
-func (g *Client) Accounts() ([]string, error) {
- var out []string
- if err := g.client.Call("goog.Accounts", &Empty{}, &out); err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func runServer() {
- cmd := exec.Command("googleserver", "serve")
- cmd.SysProcAttr = &syscall.SysProcAttr{}
- if err := cmd.Start(); err != nil {
- log.Fatal(err)
- }
-}
-
-type Config struct {
- Account []*Account
-}
-
-type Account struct {
- Email string
- Password string
- Nick string
-}
-
-func (cfg *Config) AccountByEmail(email string) *Account {
- for _, a := range cfg.Account {
- if a.Email == email {
- return a
- }
- }
- return nil
-}
-
-var Cfg Config
-
-func ReadConfig() {
- file := Dir() + "/config"
- st, err := os.Stat(file)
- if err != nil {
- return
- }
- if st.Mode()&0077 != 0 {
- log.Fatalf("%s exists but allows group or other permissions: %#o", file, st.Mode()&0777)
- }
- data, err := ioutil.ReadFile(file)
- if err != nil {
- log.Fatal(err)
- }
- Cfg = Config{}
- if err := json.Unmarshal(data, &Cfg); err != nil {
- log.Fatal(err)
- }
-}
-
-func WriteConfig() {
- file := Dir() + "/config"
- st, err := os.Stat(file)
- if err != nil {
- if err := ioutil.WriteFile(file, nil, 0600); err != nil {
- log.Fatal(err)
- }
- st, err = os.Stat(file)
- if err != nil {
- log.Fatal(err)
- }
- }
- if st.Mode()&0077 != 0 {
- log.Fatalf("%s exists but allows group or other permissions: %#o", file, st.Mode()&0777)
- }
- data, err := json.MarshalIndent(&Cfg, "", "\t")
- if err != nil {
- log.Fatal(err)
- }
- if err := ioutil.WriteFile(file, data, 0600); err != nil {
- log.Fatal(err)
- }
- st, err = os.Stat(file)
- if err != nil {
- log.Fatal(err)
- }
- if st.Mode()&0077 != 0 {
- log.Fatalf("%s allows group or other permissions after writing: %#o", file, st.Mode()&0777)
- }
-}
-
-func Acct(name string) Account {
- ReadConfig()
- if name == "" {
- if len(Cfg.Account) == 0 {
- fmt.Fprintf(os.Stderr, "no accounts configured\n")
- os.Exit(2)
- }
- return *Cfg.Account[0]
- }
-
- for _, a := range Cfg.Account {
- if a.Email == name || a.Nick == name {
- return *a
- }
- }
- fmt.Fprintf(os.Stderr, "cannot find account %#q", name)
- os.Exit(2)
- panic("not reached")
-}
diff --git a/vendor/github.com/mattermost/rsc/gtfs/gtfs.pb.go b/vendor/github.com/mattermost/rsc/gtfs/gtfs.pb.go
deleted file mode 100644
index 7a91a74d5..000000000
--- a/vendor/github.com/mattermost/rsc/gtfs/gtfs.pb.go
+++ /dev/null
@@ -1,440 +0,0 @@
-// Code generated by protoc-gen-go from "crashme/gtfs.proto"
-// DO NOT EDIT!
-
-package gtfs
-
-import proto "code.google.com/p/goprotobuf/proto"
-import "math"
-
-// Reference proto, math & os imports to suppress error if they are not otherwise used.
-var _ = proto.GetString
-var _ = math.Inf
-var _ error
-
-type FeedHeader_Incrementality int32
-
-const (
- FeedHeader_FULL_DATASET FeedHeader_Incrementality = 0
- FeedHeader_DIFFERENTIAL FeedHeader_Incrementality = 1
-)
-
-var FeedHeader_Incrementality_name = map[int32]string{
- 0: "FULL_DATASET",
- 1: "DIFFERENTIAL",
-}
-var FeedHeader_Incrementality_value = map[string]int32{
- "FULL_DATASET": 0,
- "DIFFERENTIAL": 1,
-}
-
-func NewFeedHeader_Incrementality(x FeedHeader_Incrementality) *FeedHeader_Incrementality {
- e := FeedHeader_Incrementality(x)
- return &e
-}
-func (x FeedHeader_Incrementality) String() string {
- return proto.EnumName(FeedHeader_Incrementality_name, int32(x))
-}
-
-type TripUpdate_StopTimeUpdate_ScheduleRelationship int32
-
-const (
- TripUpdate_StopTimeUpdate_SCHEDULED TripUpdate_StopTimeUpdate_ScheduleRelationship = 0
- TripUpdate_StopTimeUpdate_SKIPPED TripUpdate_StopTimeUpdate_ScheduleRelationship = 1
- TripUpdate_StopTimeUpdate_NO_DATA TripUpdate_StopTimeUpdate_ScheduleRelationship = 2
-)
-
-var TripUpdate_StopTimeUpdate_ScheduleRelationship_name = map[int32]string{
- 0: "SCHEDULED",
- 1: "SKIPPED",
- 2: "NO_DATA",
-}
-var TripUpdate_StopTimeUpdate_ScheduleRelationship_value = map[string]int32{
- "SCHEDULED": 0,
- "SKIPPED": 1,
- "NO_DATA": 2,
-}
-
-func NewTripUpdate_StopTimeUpdate_ScheduleRelationship(x TripUpdate_StopTimeUpdate_ScheduleRelationship) *TripUpdate_StopTimeUpdate_ScheduleRelationship {
- e := TripUpdate_StopTimeUpdate_ScheduleRelationship(x)
- return &e
-}
-func (x TripUpdate_StopTimeUpdate_ScheduleRelationship) String() string {
- return proto.EnumName(TripUpdate_StopTimeUpdate_ScheduleRelationship_name, int32(x))
-}
-
-type VehiclePosition_VehicleStopStatus int32
-
-const (
- VehiclePosition_INCOMING_AT VehiclePosition_VehicleStopStatus = 0
- VehiclePosition_STOPPED_AT VehiclePosition_VehicleStopStatus = 1
- VehiclePosition_IN_TRANSIT_TO VehiclePosition_VehicleStopStatus = 2
-)
-
-var VehiclePosition_VehicleStopStatus_name = map[int32]string{
- 0: "INCOMING_AT",
- 1: "STOPPED_AT",
- 2: "IN_TRANSIT_TO",
-}
-var VehiclePosition_VehicleStopStatus_value = map[string]int32{
- "INCOMING_AT": 0,
- "STOPPED_AT": 1,
- "IN_TRANSIT_TO": 2,
-}
-
-func NewVehiclePosition_VehicleStopStatus(x VehiclePosition_VehicleStopStatus) *VehiclePosition_VehicleStopStatus {
- e := VehiclePosition_VehicleStopStatus(x)
- return &e
-}
-func (x VehiclePosition_VehicleStopStatus) String() string {
- return proto.EnumName(VehiclePosition_VehicleStopStatus_name, int32(x))
-}
-
-type VehiclePosition_CongestionLevel int32
-
-const (
- VehiclePosition_UNKNOWN_CONGESTION_LEVEL VehiclePosition_CongestionLevel = 0
- VehiclePosition_RUNNING_SMOOTHLY VehiclePosition_CongestionLevel = 1
- VehiclePosition_STOP_AND_GO VehiclePosition_CongestionLevel = 2
- VehiclePosition_CONGESTION VehiclePosition_CongestionLevel = 3
- VehiclePosition_SEVERE_CONGESTION VehiclePosition_CongestionLevel = 4
-)
-
-var VehiclePosition_CongestionLevel_name = map[int32]string{
- 0: "UNKNOWN_CONGESTION_LEVEL",
- 1: "RUNNING_SMOOTHLY",
- 2: "STOP_AND_GO",
- 3: "CONGESTION",
- 4: "SEVERE_CONGESTION",
-}
-var VehiclePosition_CongestionLevel_value = map[string]int32{
- "UNKNOWN_CONGESTION_LEVEL": 0,
- "RUNNING_SMOOTHLY": 1,
- "STOP_AND_GO": 2,
- "CONGESTION": 3,
- "SEVERE_CONGESTION": 4,
-}
-
-func NewVehiclePosition_CongestionLevel(x VehiclePosition_CongestionLevel) *VehiclePosition_CongestionLevel {
- e := VehiclePosition_CongestionLevel(x)
- return &e
-}
-func (x VehiclePosition_CongestionLevel) String() string {
- return proto.EnumName(VehiclePosition_CongestionLevel_name, int32(x))
-}
-
-type Alert_Cause int32
-
-const (
- Alert_UNKNOWN_CAUSE Alert_Cause = 1
- Alert_OTHER_CAUSE Alert_Cause = 2
- Alert_TECHNICAL_PROBLEM Alert_Cause = 3
- Alert_STRIKE Alert_Cause = 4
- Alert_DEMONSTRATION Alert_Cause = 5
- Alert_ACCIDENT Alert_Cause = 6
- Alert_HOLIDAY Alert_Cause = 7
- Alert_WEATHER Alert_Cause = 8
- Alert_MAINTENANCE Alert_Cause = 9
- Alert_CONSTRUCTION Alert_Cause = 10
- Alert_POLICE_ACTIVITY Alert_Cause = 11
- Alert_MEDICAL_EMERGENCY Alert_Cause = 12
-)
-
-var Alert_Cause_name = map[int32]string{
- 1: "UNKNOWN_CAUSE",
- 2: "OTHER_CAUSE",
- 3: "TECHNICAL_PROBLEM",
- 4: "STRIKE",
- 5: "DEMONSTRATION",
- 6: "ACCIDENT",
- 7: "HOLIDAY",
- 8: "WEATHER",
- 9: "MAINTENANCE",
- 10: "CONSTRUCTION",
- 11: "POLICE_ACTIVITY",
- 12: "MEDICAL_EMERGENCY",
-}
-var Alert_Cause_value = map[string]int32{
- "UNKNOWN_CAUSE": 1,
- "OTHER_CAUSE": 2,
- "TECHNICAL_PROBLEM": 3,
- "STRIKE": 4,
- "DEMONSTRATION": 5,
- "ACCIDENT": 6,
- "HOLIDAY": 7,
- "WEATHER": 8,
- "MAINTENANCE": 9,
- "CONSTRUCTION": 10,
- "POLICE_ACTIVITY": 11,
- "MEDICAL_EMERGENCY": 12,
-}
-
-func NewAlert_Cause(x Alert_Cause) *Alert_Cause {
- e := Alert_Cause(x)
- return &e
-}
-func (x Alert_Cause) String() string {
- return proto.EnumName(Alert_Cause_name, int32(x))
-}
-
-type Alert_Effect int32
-
-const (
- Alert_NO_SERVICE Alert_Effect = 1
- Alert_REDUCED_SERVICE Alert_Effect = 2
- Alert_SIGNIFICANT_DELAYS Alert_Effect = 3
- Alert_DETOUR Alert_Effect = 4
- Alert_ADDITIONAL_SERVICE Alert_Effect = 5
- Alert_MODIFIED_SERVICE Alert_Effect = 6
- Alert_OTHER_EFFECT Alert_Effect = 7
- Alert_UNKNOWN_EFFECT Alert_Effect = 8
- Alert_STOP_MOVED Alert_Effect = 9
-)
-
-var Alert_Effect_name = map[int32]string{
- 1: "NO_SERVICE",
- 2: "REDUCED_SERVICE",
- 3: "SIGNIFICANT_DELAYS",
- 4: "DETOUR",
- 5: "ADDITIONAL_SERVICE",
- 6: "MODIFIED_SERVICE",
- 7: "OTHER_EFFECT",
- 8: "UNKNOWN_EFFECT",
- 9: "STOP_MOVED",
-}
-var Alert_Effect_value = map[string]int32{
- "NO_SERVICE": 1,
- "REDUCED_SERVICE": 2,
- "SIGNIFICANT_DELAYS": 3,
- "DETOUR": 4,
- "ADDITIONAL_SERVICE": 5,
- "MODIFIED_SERVICE": 6,
- "OTHER_EFFECT": 7,
- "UNKNOWN_EFFECT": 8,
- "STOP_MOVED": 9,
-}
-
-func NewAlert_Effect(x Alert_Effect) *Alert_Effect {
- e := Alert_Effect(x)
- return &e
-}
-func (x Alert_Effect) String() string {
- return proto.EnumName(Alert_Effect_name, int32(x))
-}
-
-type TripDescriptor_ScheduleRelationship int32
-
-const (
- TripDescriptor_SCHEDULED TripDescriptor_ScheduleRelationship = 0
- TripDescriptor_ADDED TripDescriptor_ScheduleRelationship = 1
- TripDescriptor_UNSCHEDULED TripDescriptor_ScheduleRelationship = 2
- TripDescriptor_CANCELED TripDescriptor_ScheduleRelationship = 3
- TripDescriptor_REPLACEMENT TripDescriptor_ScheduleRelationship = 5
-)
-
-var TripDescriptor_ScheduleRelationship_name = map[int32]string{
- 0: "SCHEDULED",
- 1: "ADDED",
- 2: "UNSCHEDULED",
- 3: "CANCELED",
- 5: "REPLACEMENT",
-}
-var TripDescriptor_ScheduleRelationship_value = map[string]int32{
- "SCHEDULED": 0,
- "ADDED": 1,
- "UNSCHEDULED": 2,
- "CANCELED": 3,
- "REPLACEMENT": 5,
-}
-
-func NewTripDescriptor_ScheduleRelationship(x TripDescriptor_ScheduleRelationship) *TripDescriptor_ScheduleRelationship {
- e := TripDescriptor_ScheduleRelationship(x)
- return &e
-}
-func (x TripDescriptor_ScheduleRelationship) String() string {
- return proto.EnumName(TripDescriptor_ScheduleRelationship_name, int32(x))
-}
-
-type FeedMessage struct {
- Header *FeedHeader `protobuf:"bytes,1,req,name=header" json:"header"`
- Entity []*FeedEntity `protobuf:"bytes,2,rep,name=entity" json:"entity"`
- XXX_unrecognized []byte
-}
-
-func (this *FeedMessage) Reset() { *this = FeedMessage{} }
-func (this *FeedMessage) String() string { return proto.CompactTextString(this) }
-
-type FeedHeader struct {
- GtfsRealtimeVersion *string `protobuf:"bytes,1,req,name=gtfs_realtime_version" json:"gtfs_realtime_version"`
- Incrementality *FeedHeader_Incrementality `protobuf:"varint,2,opt,name=incrementality,enum=transit_realtime.FeedHeader_Incrementality,def=0" json:"incrementality"`
- Timestamp *uint64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp"`
- XXX_unrecognized []byte
-}
-
-func (this *FeedHeader) Reset() { *this = FeedHeader{} }
-func (this *FeedHeader) String() string { return proto.CompactTextString(this) }
-
-const Default_FeedHeader_Incrementality FeedHeader_Incrementality = FeedHeader_FULL_DATASET
-
-type FeedEntity struct {
- Id *string `protobuf:"bytes,1,req,name=id" json:"id"`
- IsDeleted *bool `protobuf:"varint,2,opt,name=is_deleted,def=0" json:"is_deleted"`
- TripUpdate *TripUpdate `protobuf:"bytes,3,opt,name=trip_update" json:"trip_update"`
- Vehicle *VehiclePosition `protobuf:"bytes,4,opt,name=vehicle" json:"vehicle"`
- Alert *Alert `protobuf:"bytes,5,opt,name=alert" json:"alert"`
- XXX_unrecognized []byte
-}
-
-func (this *FeedEntity) Reset() { *this = FeedEntity{} }
-func (this *FeedEntity) String() string { return proto.CompactTextString(this) }
-
-const Default_FeedEntity_IsDeleted bool = false
-
-type TripUpdate struct {
- Trip *TripDescriptor `protobuf:"bytes,1,req,name=trip" json:"trip"`
- Vehicle *VehicleDescriptor `protobuf:"bytes,3,opt,name=vehicle" json:"vehicle"`
- StopTimeUpdate []*TripUpdate_StopTimeUpdate `protobuf:"bytes,2,rep,name=stop_time_update" json:"stop_time_update"`
- XXX_unrecognized []byte
-}
-
-func (this *TripUpdate) Reset() { *this = TripUpdate{} }
-func (this *TripUpdate) String() string { return proto.CompactTextString(this) }
-
-type TripUpdate_StopTimeEvent struct {
- Delay *int32 `protobuf:"varint,1,opt,name=delay" json:"delay"`
- Time *int64 `protobuf:"varint,2,opt,name=time" json:"time"`
- Uncertainty *int32 `protobuf:"varint,3,opt,name=uncertainty" json:"uncertainty"`
- XXX_unrecognized []byte
-}
-
-func (this *TripUpdate_StopTimeEvent) Reset() { *this = TripUpdate_StopTimeEvent{} }
-func (this *TripUpdate_StopTimeEvent) String() string { return proto.CompactTextString(this) }
-
-type TripUpdate_StopTimeUpdate struct {
- StopSequence *uint32 `protobuf:"varint,1,opt,name=stop_sequence" json:"stop_sequence"`
- StopId *string `protobuf:"bytes,4,opt,name=stop_id" json:"stop_id"`
- Arrival *TripUpdate_StopTimeEvent `protobuf:"bytes,2,opt,name=arrival" json:"arrival"`
- Departure *TripUpdate_StopTimeEvent `protobuf:"bytes,3,opt,name=departure" json:"departure"`
- ScheduleRelationship *TripUpdate_StopTimeUpdate_ScheduleRelationship `protobuf:"varint,5,opt,name=schedule_relationship,enum=transit_realtime.TripUpdate_StopTimeUpdate_ScheduleRelationship,def=0" json:"schedule_relationship"`
- XXX_unrecognized []byte
-}
-
-func (this *TripUpdate_StopTimeUpdate) Reset() { *this = TripUpdate_StopTimeUpdate{} }
-func (this *TripUpdate_StopTimeUpdate) String() string { return proto.CompactTextString(this) }
-
-const Default_TripUpdate_StopTimeUpdate_ScheduleRelationship TripUpdate_StopTimeUpdate_ScheduleRelationship = TripUpdate_StopTimeUpdate_SCHEDULED
-
-type VehiclePosition struct {
- Trip *TripDescriptor `protobuf:"bytes,1,opt,name=trip" json:"trip"`
- Vehicle *VehicleDescriptor `protobuf:"bytes,8,opt,name=vehicle" json:"vehicle"`
- Position *Position `protobuf:"bytes,2,opt,name=position" json:"position"`
- CurrentStopSequence *uint32 `protobuf:"varint,3,opt,name=current_stop_sequence" json:"current_stop_sequence"`
- StopId *string `protobuf:"bytes,7,opt,name=stop_id" json:"stop_id"`
- CurrentStatus *VehiclePosition_VehicleStopStatus `protobuf:"varint,4,opt,name=current_status,enum=transit_realtime.VehiclePosition_VehicleStopStatus,def=2" json:"current_status"`
- Timestamp *uint64 `protobuf:"varint,5,opt,name=timestamp" json:"timestamp"`
- CongestionLevel *VehiclePosition_CongestionLevel `protobuf:"varint,6,opt,name=congestion_level,enum=transit_realtime.VehiclePosition_CongestionLevel" json:"congestion_level"`
- XXX_unrecognized []byte
-}
-
-func (this *VehiclePosition) Reset() { *this = VehiclePosition{} }
-func (this *VehiclePosition) String() string { return proto.CompactTextString(this) }
-
-const Default_VehiclePosition_CurrentStatus VehiclePosition_VehicleStopStatus = VehiclePosition_IN_TRANSIT_TO
-
-type Alert struct {
- ActivePeriod []*TimeRange `protobuf:"bytes,1,rep,name=active_period" json:"active_period"`
- InformedEntity []*EntitySelector `protobuf:"bytes,5,rep,name=informed_entity" json:"informed_entity"`
- Cause *Alert_Cause `protobuf:"varint,6,opt,name=cause,enum=transit_realtime.Alert_Cause,def=1" json:"cause"`
- Effect *Alert_Effect `protobuf:"varint,7,opt,name=effect,enum=transit_realtime.Alert_Effect,def=8" json:"effect"`
- Url *TranslatedString `protobuf:"bytes,8,opt,name=url" json:"url"`
- HeaderText *TranslatedString `protobuf:"bytes,10,opt,name=header_text" json:"header_text"`
- DescriptionText *TranslatedString `protobuf:"bytes,11,opt,name=description_text" json:"description_text"`
- XXX_unrecognized []byte
-}
-
-func (this *Alert) Reset() { *this = Alert{} }
-func (this *Alert) String() string { return proto.CompactTextString(this) }
-
-const Default_Alert_Cause Alert_Cause = Alert_UNKNOWN_CAUSE
-const Default_Alert_Effect Alert_Effect = Alert_UNKNOWN_EFFECT
-
-type TimeRange struct {
- Start *uint64 `protobuf:"varint,1,opt,name=start" json:"start"`
- End *uint64 `protobuf:"varint,2,opt,name=end" json:"end"`
- XXX_unrecognized []byte
-}
-
-func (this *TimeRange) Reset() { *this = TimeRange{} }
-func (this *TimeRange) String() string { return proto.CompactTextString(this) }
-
-type Position struct {
- Latitude *float32 `protobuf:"fixed32,1,req,name=latitude" json:"latitude"`
- Longitude *float32 `protobuf:"fixed32,2,req,name=longitude" json:"longitude"`
- Bearing *float32 `protobuf:"fixed32,3,opt,name=bearing" json:"bearing"`
- Odometer *float64 `protobuf:"fixed64,4,opt,name=odometer" json:"odometer"`
- Speed *float32 `protobuf:"fixed32,5,opt,name=speed" json:"speed"`
- XXX_unrecognized []byte
-}
-
-func (this *Position) Reset() { *this = Position{} }
-func (this *Position) String() string { return proto.CompactTextString(this) }
-
-type TripDescriptor struct {
- TripId *string `protobuf:"bytes,1,opt,name=trip_id" json:"trip_id"`
- RouteId *string `protobuf:"bytes,5,opt,name=route_id" json:"route_id"`
- StartTime *string `protobuf:"bytes,2,opt,name=start_time" json:"start_time"`
- StartDate *string `protobuf:"bytes,3,opt,name=start_date" json:"start_date"`
- ScheduleRelationship *TripDescriptor_ScheduleRelationship `protobuf:"varint,4,opt,name=schedule_relationship,enum=transit_realtime.TripDescriptor_ScheduleRelationship" json:"schedule_relationship"`
- XXX_unrecognized []byte
-}
-
-func (this *TripDescriptor) Reset() { *this = TripDescriptor{} }
-func (this *TripDescriptor) String() string { return proto.CompactTextString(this) }
-
-type VehicleDescriptor struct {
- Id *string `protobuf:"bytes,1,opt,name=id" json:"id"`
- Label *string `protobuf:"bytes,2,opt,name=label" json:"label"`
- LicensePlate *string `protobuf:"bytes,3,opt,name=license_plate" json:"license_plate"`
- XXX_unrecognized []byte
-}
-
-func (this *VehicleDescriptor) Reset() { *this = VehicleDescriptor{} }
-func (this *VehicleDescriptor) String() string { return proto.CompactTextString(this) }
-
-type EntitySelector struct {
- AgencyId *string `protobuf:"bytes,1,opt,name=agency_id" json:"agency_id"`
- RouteId *string `protobuf:"bytes,2,opt,name=route_id" json:"route_id"`
- RouteType *int32 `protobuf:"varint,3,opt,name=route_type" json:"route_type"`
- Trip *TripDescriptor `protobuf:"bytes,4,opt,name=trip" json:"trip"`
- StopId *string `protobuf:"bytes,5,opt,name=stop_id" json:"stop_id"`
- XXX_unrecognized []byte
-}
-
-func (this *EntitySelector) Reset() { *this = EntitySelector{} }
-func (this *EntitySelector) String() string { return proto.CompactTextString(this) }
-
-type TranslatedString struct {
- Translation []*TranslatedString_Translation `protobuf:"bytes,1,rep,name=translation" json:"translation"`
- XXX_unrecognized []byte
-}
-
-func (this *TranslatedString) Reset() { *this = TranslatedString{} }
-func (this *TranslatedString) String() string { return proto.CompactTextString(this) }
-
-type TranslatedString_Translation struct {
- Text *string `protobuf:"bytes,1,req,name=text" json:"text"`
- Language *string `protobuf:"bytes,2,opt,name=language" json:"language"`
- XXX_unrecognized []byte
-}
-
-func (this *TranslatedString_Translation) Reset() { *this = TranslatedString_Translation{} }
-func (this *TranslatedString_Translation) String() string { return proto.CompactTextString(this) }
-
-func init() {
- proto.RegisterEnum("transit_realtime.FeedHeader_Incrementality", FeedHeader_Incrementality_name, FeedHeader_Incrementality_value)
- proto.RegisterEnum("transit_realtime.TripUpdate_StopTimeUpdate_ScheduleRelationship", TripUpdate_StopTimeUpdate_ScheduleRelationship_name, TripUpdate_StopTimeUpdate_ScheduleRelationship_value)
- proto.RegisterEnum("transit_realtime.VehiclePosition_VehicleStopStatus", VehiclePosition_VehicleStopStatus_name, VehiclePosition_VehicleStopStatus_value)
- proto.RegisterEnum("transit_realtime.VehiclePosition_CongestionLevel", VehiclePosition_CongestionLevel_name, VehiclePosition_CongestionLevel_value)
- proto.RegisterEnum("transit_realtime.Alert_Cause", Alert_Cause_name, Alert_Cause_value)
- proto.RegisterEnum("transit_realtime.Alert_Effect", Alert_Effect_name, Alert_Effect_value)
- proto.RegisterEnum("transit_realtime.TripDescriptor_ScheduleRelationship", TripDescriptor_ScheduleRelationship_name, TripDescriptor_ScheduleRelationship_value)
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/Makefile b/vendor/github.com/mattermost/rsc/imap/Makefile
deleted file mode 100644
index 8dd3d2be4..000000000
--- a/vendor/github.com/mattermost/rsc/imap/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-include $(GOROOT)/src/Make.inc
-
-# TARG=code.google.com/p/rsc/imap
-
-TARG=rsc.googlecode.com/hg/imap
-GOFILES=\
- decode.go\
- imap.go\
- mail.go\
- sx.go\
- tcs.go\
-
-GCIMPORTS=-I$(GOPATH)/pkg/$(GOOS)_$(GOARCH)
-
-include $(GOROOT)/src/Make.pkg
diff --git a/vendor/github.com/mattermost/rsc/imap/decode.go b/vendor/github.com/mattermost/rsc/imap/decode.go
deleted file mode 100644
index ebeb1d7d7..000000000
--- a/vendor/github.com/mattermost/rsc/imap/decode.go
+++ /dev/null
@@ -1,227 +0,0 @@
-package imap
-
-import (
- "bytes"
- "encoding/base64"
- "strings"
- "unicode"
-)
-
-func decode2047chunk(s string) (conv []byte, rest string, ok bool) {
- // s is =?...
- // and should be =?charset?e?text?=
- j := strings.Index(s[2:], "?")
- if j < 0 {
- return
- }
- j += 2
- if j+2 >= len(s) || s[j+2] != '?' {
- return
- }
- k := strings.Index(s[j+3:], "?=")
- if k < 0 {
- return
- }
- k += j + 3
-
- charset, enc, text, rest := s[2:j], s[j+1], s[j+3:k], s[k+2:]
- var encoding string
- switch enc {
- default:
- return
- case 'q', 'Q':
- encoding = "quoted-printable"
- case 'b', 'B':
- encoding = "base64"
- }
-
- dat := decodeText([]byte(text), encoding, charset, true)
- if dat == nil {
- return
- }
- return dat, rest, true
-}
-
-func decodeQP(dat []byte, underscore bool) []byte {
- out := make([]byte, len(dat))
- w := 0
- for i := 0; i < len(dat); i++ {
- c := dat[i]
- if underscore && c == '_' {
- out[w] = ' '
- w++
- continue
- }
- if c == '\r' {
- continue
- }
- if c == '=' {
- if i+1 < len(dat) && dat[i+1] == '\n' {
- i++
- continue
- }
- if i+2 < len(dat) && dat[i+1] == '\r' && dat[i+2] == '\n' {
- i += 2
- continue
- }
- if i+2 < len(dat) {
- v := unhex(dat[i+1])<<4 | unhex(dat[i+2])
- if v >= 0 {
- out[w] = byte(v)
- w++
- i += 2
- continue
- }
- }
- }
- out[w] = c
- w++
- }
- return out[:w]
-}
-
-func nocrnl(dat []byte) []byte {
- w := 0
- for _, c := range dat {
- if c != '\r' && c != '\n' {
- dat[w] = c
- w++
- }
- }
- return dat[:w]
-}
-
-func decode64(dat []byte) []byte {
- out := make([]byte, len(dat))
- copy(out, dat)
- out = nocrnl(out)
- n, err := base64.StdEncoding.Decode(out, out)
- if err != nil {
- return nil
- }
- return out[:n]
-}
-
-func decodeText(dat []byte, encoding, charset string, underscore bool) []byte {
- odat := dat
- switch strlwr(encoding) {
- case "quoted-printable":
- dat = decodeQP(dat, underscore)
- case "base64":
- dat = decode64(dat)
- }
- if dat == nil {
- return nil
- }
- if bytes.IndexByte(dat, '\r') >= 0 {
- if &odat[0] == &dat[0] {
- dat = append([]byte(nil), dat...)
- }
- dat = nocr(dat)
- }
-
- charset = strlwr(charset)
- if charset == "utf-8" || charset == "us-ascii" {
- return dat
- }
- if charset == "iso-8859-1" {
- // Avoid allocation for iso-8859-1 that is really just ascii.
- for _, c := range dat {
- if c >= 0x80 {
- goto NeedConv
- }
- }
- return dat
- NeedConv:
- }
-
- // TODO: big5, iso-2022-jp
-
- tab := convtab[charset]
- if tab == nil {
- return dat
- }
- var b bytes.Buffer
- for _, c := range dat {
- if tab[c] < 0 {
- b.WriteRune(unicode.ReplacementChar)
- } else {
- b.WriteRune(tab[c])
- }
- }
- return b.Bytes()
-}
-
-var convtab = map[string]*[256]rune{
- "iso-8859-1": &tab_iso8859_1,
- "iso-8859-2": &tab_iso8859_2,
- "iso-8859-3": &tab_iso8859_3,
- "iso-8859-4": &tab_iso8859_4,
- "iso-8859-5": &tab_iso8859_5,
- "iso-8859-6": &tab_iso8859_6,
- "iso-8859-7": &tab_iso8859_7,
- "iso-8859-8": &tab_iso8859_8,
- "iso-8859-9": &tab_iso8859_9,
- "iso-8859-10": &tab_iso8859_10,
- "iso-8859-15": &tab_iso8859_15,
- "koi8-r": &tab_koi8,
- "windows-1250": &tab_cp1250,
- "windows-1251": &tab_cp1251,
- "windows-1252": &tab_cp1252,
- "windows-1253": &tab_cp1253,
- "windows-1254": &tab_cp1254,
- "windows-1255": &tab_cp1255,
- "windows-1256": &tab_cp1256,
- "windows-1257": &tab_cp1257,
- "windows-1258": &tab_cp1258,
-}
-
-func unrfc2047(s string) string {
- if !strings.Contains(s, "=?") {
- return s
- }
- var buf bytes.Buffer
- for {
- // =?charset?e?text?=
- i := strings.Index(s, "=?")
- if i < 0 {
- break
- }
- conv, rest, ok := decode2047chunk(s[i:])
- if !ok {
- buf.WriteString(s[:i+2])
- s = s[i+2:]
- continue
- }
- buf.WriteString(s[:i])
- buf.Write(conv)
- s = rest
- }
- buf.WriteString(s)
- return buf.String()
-}
-
-func lwr(c rune) rune {
- if 'A' <= c && c <= 'Z' {
- return c + 'a' - 'A'
- }
- return c
-}
-
-func strlwr(s string) string {
- return strings.Map(lwr, s)
-}
-
-func unhex(c byte) int {
- switch {
- case '0' <= c && c <= '9':
- return int(c) - '0'
- case 'a' <= c && c <= 'f':
- return int(c) - 'a' + 10
- case 'A' <= c && c <= 'F':
- return int(c) - 'A' + 10
- }
- return -1
-}
-
-// TODO: Will need modified UTF-7 eventually.
diff --git a/vendor/github.com/mattermost/rsc/imap/decode_test.go b/vendor/github.com/mattermost/rsc/imap/decode_test.go
deleted file mode 100644
index 84c31f63a..000000000
--- a/vendor/github.com/mattermost/rsc/imap/decode_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package imap
-
-import "testing"
-
-var unrfc2047Tests = []struct {
- in, out string
-}{
- {"hello world", "hello world"},
- {"hello =?iso-8859-1?q?this is some text?=", "hello this is some text"},
- {"=?US-ASCII?Q?Keith_Moore?=", "Keith Moore"},
- {"=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=", "Keld Jørn Simonsen"},
- {"=?ISO-8859-1?Q?Andr=E9?= Pirard", "André Pirard"},
- {"=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=", "If you can read this yo"},
- {"=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=", "u understand the example."},
- {"=?ISO-8859-1?Q?Olle_J=E4rnefors?=", "Olle Järnefors"},
- // {"=?iso-2022-jp?B?GyRCTTVKISRKP006SiRyS34kPyQ3JEZKcz03JCIkahsoQg==?=", ""},
- {"=?UTF-8?B?Ik5pbHMgTy4gU2Vsw6VzZGFsIg==?=", `"Nils O. Selåsdal"`},
-}
-
-func TestUnrfc2047(t *testing.T) {
- for _, tt := range unrfc2047Tests {
- if out := unrfc2047(tt.in); out != tt.out {
- t.Errorf("unrfc2047(%#q) = %#q, want %#q", tt.in, out, tt.out)
- }
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/imap.go b/vendor/github.com/mattermost/rsc/imap/imap.go
deleted file mode 100644
index 6555984d2..000000000
--- a/vendor/github.com/mattermost/rsc/imap/imap.go
+++ /dev/null
@@ -1,1110 +0,0 @@
-package imap
-
-import (
- "bufio"
- "bytes"
- "crypto/md5"
- "crypto/tls"
- "fmt"
- "io"
- "log"
- "net"
- "os"
- "os/exec"
- "strconv"
- "strings"
- "sync"
-)
-
-var Debug = false
-
-const tag = "#"
-
-// A Mode specifies the IMAP connection mode.
-type Mode int
-
-const (
- Unencrypted Mode = iota // unencrypted TCP connection
- StartTLS // use IMAP STARTTLS command - unimplemented!
- TLS // direct TLS connection
- Command // exec shell command (server name)
-)
-
-type lock struct {
- locked bool
- mu sync.Mutex
-}
-
-func (l *lock) lock() {
- l.mu.Lock()
- l.locked = true
-}
-
-func (l *lock) unlock() {
- l.mustBeLocked()
- l.locked = false
- l.mu.Unlock()
-}
-
-func (l *lock) mustBeLocked() {
- if !l.locked {
- panic("not locked")
- }
-}
-
-type Client struct {
- server string
- user string
- passwd string
- mode Mode
- root string
-
- io lock
- rw io.ReadWriteCloser // i/o to server
- b *bufio.Reader // buffered rw
- autoReconnect bool // reconnect on failure
- connected bool // rw is active
-
- data lock
- capability map[string]bool
- flags Flags
- boxByName map[string]*Box // all known boxes
- allBox []*Box // all known boxes (do we need this?)
- rootBox *Box // root of box tree
- inbox *Box // inbox (special, not in tree)
- box *Box // selected (current) box
- nextBox *Box // next box to select (do we need this?)
-}
-
-func NewClient(mode Mode, server, user, passwd string, root string) (*Client, error) {
- c := &Client{
- server: server,
- user: user,
- passwd: passwd,
- mode: mode,
- root: root,
- boxByName: map[string]*Box{},
- }
- c.io.lock()
- if err := c.reconnect(); err != nil {
- return nil, err
- }
- c.autoReconnect = true
- c.io.unlock()
-
- return c, nil
-}
-
-func (c *Client) Close() error {
- c.io.lock()
- c.autoReconnect = false
- c.connected = false
- if c.rw != nil {
- c.rw.Close()
- c.rw = nil
- }
- c.io.unlock()
- return nil
-}
-
-func (c *Client) reconnect() error {
- c.io.mustBeLocked()
- c.autoReconnect = false
- if c.rw != nil {
- c.rw.Close()
- c.rw = nil
- }
-
- if Debug {
- log.Printf("dial %s...", c.server)
- }
- rw, err := dial(c.server, c.mode)
- if err != nil {
- return err
- }
-
- c.rw = rw
- c.connected = true
- c.capability = nil
- c.box = nil
- if Debug {
- c.b = bufio.NewReader(&tee{rw, os.Stderr})
- } else {
- c.b = bufio.NewReader(rw)
- }
- x, err := c.rdsx()
- if x == nil {
- err = fmt.Errorf("no greeting from %s: %v", c.server, err)
- goto Error
- }
- if len(x.sx) < 2 || !x.sx[0].isAtom("*") || !x.sx[1].isAtom("PREAUTH") {
- if !x.ok() {
- err = fmt.Errorf("bad greeting - %s", x)
- goto Error
- }
- if err = c.login(); err != nil {
- goto Error
- }
- }
- if c.capability == nil {
- if err = c.cmd(nil, "CAPABILITY"); err != nil {
- goto Error
- }
- if c.capability == nil {
- err = fmt.Errorf("CAPABILITY command did not return capability list")
- goto Error
- }
- }
- if err := c.getBoxes(); err != nil {
- goto Error
- }
- c.autoReconnect = true
- return nil
-
-Error:
- if c.rw != nil {
- c.rw.Close()
- c.rw = nil
- }
- c.autoReconnect = true
- c.connected = false
- return err
-}
-
-var testDial func(string, Mode) (io.ReadWriteCloser, error)
-
-func dial(server string, mode Mode) (io.ReadWriteCloser, error) {
- if testDial != nil {
- return testDial(server, mode)
- }
- switch mode {
- default:
- // also case Unencrypted
- return net.Dial("tcp", server+":143")
- case StartTLS:
- return nil, fmt.Errorf("StartTLS not supported")
- case TLS:
- return tls.Dial("tcp", server+":993", nil)
- case Command:
- cmd := exec.Command("sh", "-c", server)
- cmd.Stderr = os.Stderr
- r, err := cmd.StdoutPipe()
- if err != nil {
- return nil, err
- }
- w, err := cmd.StdinPipe()
- if err != nil {
- r.Close()
- return nil, err
- }
- if err := cmd.Start(); err != nil {
- r.Close()
- w.Close()
- return nil, err
- }
- return &pipe2{r, w}, nil
- }
- panic("not reached")
-}
-
-type pipe2 struct {
- io.ReadCloser
- io.WriteCloser
-}
-
-func (p *pipe2) Close() error {
- p.ReadCloser.Close()
- p.WriteCloser.Close()
- return nil
-}
-
-type tee struct {
- r io.Reader
- w io.Writer
-}
-
-func (t tee) Read(p []byte) (n int, err error) {
- n, err = t.r.Read(p)
- if n > 0 {
- t.w.Write(p[0:n])
- }
- return
-}
-
-func (c *Client) rdsx() (*sx, error) {
- c.io.mustBeLocked()
- return rdsx(c.b)
-}
-
-type sxError struct {
- x *sx
-}
-
-func (e *sxError) Error() string { return e.x.String() }
-
-func (c *Client) cmd(b *Box, format string, args ...interface{}) error {
- x, err := c.cmdsx(b, format, args...)
- if err != nil {
- return err
- }
- if !x.ok() {
- return &sxError{x}
- }
- return nil
-}
-
-// cmdsx0 runs a single command and return the sx. Does not redial.
-func (c *Client) cmdsx0(format string, args ...interface{}) (*sx, error) {
- c.io.mustBeLocked()
- if c.rw == nil || !c.connected {
- return nil, fmt.Errorf("not connected")
- }
-
- cmd := fmt.Sprintf(format, args...)
- if Debug {
- fmt.Fprintf(os.Stderr, ">>> %s %s\n", tag, cmd)
- }
- if _, err := fmt.Fprintf(c.rw, "%s %s\r\n", tag, cmd); err != nil {
- c.connected = false
- return nil, err
- }
- return c.waitsx()
-}
-
-// cmdsx runs a command on box b. It does redial.
-func (c *Client) cmdsx(b *Box, format string, args ...interface{}) (*sx, error) {
- c.io.mustBeLocked()
- c.nextBox = b
-
-Trying:
- for tries := 0; ; tries++ {
- if c.rw == nil || !c.connected {
- if !c.autoReconnect {
- return nil, fmt.Errorf("not connected")
- }
- if err := c.reconnect(); err != nil {
- return nil, err
- }
- if b != nil && c.nextBox == nil {
- // box disappeared on reconnect
- return nil, fmt.Errorf("box is gone")
- }
- }
-
- if b != nil && b != c.box {
- if c.box != nil {
- // TODO c.box.init = false
- }
- c.box = b
- if _, err := c.cmdsx0("SELECT %s", iquote(b.Name)); err != nil {
- c.box = nil
- if tries++; tries == 1 && (c.rw == nil || !c.connected) {
- continue Trying
- }
- return nil, err
- }
- }
-
- x, err := c.cmdsx0(format, args...)
- if err != nil {
- if tries++; tries == 1 && (c.rw == nil || !c.connected) {
- continue Trying
- }
- return nil, err
- }
- return x, nil
- }
- panic("not reached")
-}
-
-func (c *Client) waitsx() (*sx, error) {
- c.io.mustBeLocked()
- for {
- x, err := c.rdsx()
- if err != nil {
- c.connected = false
- return nil, err
- }
- if len(x.sx) >= 1 && x.sx[0].kind == sxAtom {
- if x.sx[0].isAtom(tag) {
- return x, nil
- }
- if x.sx[0].isAtom("*") {
- c.unexpected(x)
- }
- }
- if x.kind == sxList && len(x.sx) == 0 {
- c.connected = false
- return nil, fmt.Errorf("empty response")
- }
- }
- panic("not reached")
-}
-
-func iquote(s string) string {
- if s == "" {
- return `""`
- }
-
- for i := 0; i < len(s); i++ {
- if s[i] >= 0x80 || s[i] <= ' ' || s[i] == '\\' || s[i] == '"' {
- goto Quote
- }
- }
- return s
-
-Quote:
- var b bytes.Buffer
- b.WriteByte('"')
- for i := 0; i < len(s); i++ {
- if s[i] == '\\' || s[i] == '"' {
- b.WriteByte('\\')
- }
- b.WriteByte(s[i])
- }
- b.WriteByte('"')
- return b.String()
-}
-
-func (c *Client) login() error {
- c.io.mustBeLocked()
- x, err := c.cmdsx(nil, "LOGIN %s %s", iquote(c.user), iquote(c.passwd))
- if err != nil {
- return err
- }
- if !x.ok() {
- return fmt.Errorf("login rejected: %s", x)
- }
- return nil
-}
-
-func (c *Client) getBoxes() error {
- c.io.mustBeLocked()
- for _, b := range c.allBox {
- b.dead = true
- // b.exists = 0
- // b.maxSeen = 0
- }
- list := "LIST"
- if c.capability["XLIST"] { // Gmail extension
- list = "XLIST"
- }
- if err := c.cmd(nil, "%s %s *", list, iquote(c.root)); err != nil {
- return err
- }
- if err := c.cmd(nil, "%s %s INBOX", list, iquote(c.root)); err != nil {
- return err
- }
- if c.nextBox != nil && c.nextBox.dead {
- c.nextBox = nil
- }
- for _, b := range c.allBox {
- if b.dead {
- delete(c.boxByName, b.Name)
- }
- b.firstNum = 0
- }
- c.allBox = boxTrim(c.allBox)
- for _, b := range c.allBox {
- b.child = boxTrim(b.child)
- }
- return nil
-}
-
-func boxTrim(list []*Box) []*Box {
- w := 0
- for _, b := range list {
- if !b.dead {
- list[w] = b
- w++
- }
- }
- return list[:w]
-}
-
-const maxFetch = 1000
-
-func (c *Client) setAutoReconnect(b bool) {
- c.autoReconnect = b
-}
-
-func (c *Client) check(b *Box) error {
- c.io.mustBeLocked()
- if b.dead {
- return fmt.Errorf("box is gone")
- }
-
- b.load = true
-
- // Update exists count.
- if err := c.cmd(b, "NOOP"); err != nil {
- return err
- }
-
- // Have to get through this in one session.
- // Caller can call again if we get disconnected
- // and return an error.
- c.autoReconnect = false
- defer c.setAutoReconnect(true)
-
- // First load after reconnect: figure out what changed.
- if b.firstNum == 0 && len(b.msgByUID) > 0 {
- var lo, hi uint32 = 1<<32 - 1, 0
- for _, m := range b.msgByUID {
- m.dead = true
- uid := uint32(m.UID)
- if lo > uid {
- lo = uid
- }
- if hi < uid {
- hi = uid
- }
- m.num = 0
- }
- if err := c.cmd(b, "UID FETCH %d:%d FLAGS", lo, hi); err != nil {
- return err
- }
- for _, m := range b.msgByUID {
- if m.dead {
- delete(b.msgByUID, m.UID)
- }
- }
- }
-
- // First-ever load.
- if b.firstNum == 0 {
- if b.exists <= maxFetch {
- b.firstNum = 1
- } else {
- b.firstNum = b.exists - maxFetch + 1
- }
- n := b.exists - b.firstNum + 1
- b.msgByNum = make([]*Msg, n)
- return c.fetchBox(b, b.firstNum, 0)
- }
-
- if b.exists <= b.maxSeen {
- return nil
- }
- return c.fetchBox(b, b.maxSeen, 0)
-}
-
-func (c *Client) fetchBox(b *Box, lo int, hi int) error {
- c.io.mustBeLocked()
- if b != c.box {
- if err := c.cmd(b, "NOOP"); err != nil {
- return err
- }
- }
- extra := ""
- if c.IsGmail() {
- extra = " X-GM-MSGID X-GM-THRID X-GM-LABELS"
- }
- slo := fmt.Sprint(lo)
- shi := "*"
- if hi > 0 {
- shi = fmt.Sprint(hi)
- }
- return c.cmd(b, "FETCH %s:%s (FLAGS UID INTERNALDATE RFC822.SIZE ENVELOPE BODY%s)", slo, shi, extra)
-}
-
-func (c *Client) IsGmail() bool {
- return c.capability["X-GM-EXT-1"]
-}
-
-// Table-driven IMAP "unexpected response" parser.
-// All the interesting data is in the unexpected responses.
-
-var unextab = []struct {
- num int
- name string
- fmt string
- fn func(*Client, *sx)
-}{
- {0, "BYE", "", xbye},
- {0, "CAPABILITY", "", xcapability},
- {0, "FLAGS", "AAL", xflags},
- {0, "LIST", "AALSS", xlist},
- {0, "XLIST", "AALSS", xlist},
- {0, "OK", "", xok},
- // {0, "SEARCH", "AAN*", xsearch},
- {1, "EXISTS", "ANA", xexists},
- {1, "EXPUNGE", "ANA", xexpunge},
- {1, "FETCH", "ANAL", xfetch},
- // {1, "RECENT", "ANA", xrecent}, // why do we care?
-}
-
-func (c *Client) unexpected(x *sx) {
- c.io.mustBeLocked()
- var num int
- var name string
-
- if len(x.sx) >= 3 && x.sx[1].kind == sxNumber && x.sx[2].kind == sxAtom {
- num = 1
- name = string(x.sx[2].data)
- } else if len(x.sx) >= 2 && x.sx[1].kind == sxAtom {
- num = 0
- name = string(x.sx[1].data)
- } else {
- return
- }
-
- c.data.lock()
- for _, t := range unextab {
- if t.num == num && strings.EqualFold(t.name, name) {
- if t.fmt != "" && !x.match(t.fmt) {
- log.Printf("malformd %s: %s", name, x)
- continue
- }
- t.fn(c, x)
- }
- }
- c.data.unlock()
-}
-
-func xbye(c *Client, x *sx) {
- c.io.mustBeLocked()
- c.rw.Close()
- c.rw = nil
- c.connected = false
-}
-
-func xflags(c *Client, x *sx) {
- c.data.mustBeLocked()
- // This response contains in x.sx[2] the list of flags
- // that can be validly attached to messages in c.box.
- if b := c.box; b != nil {
- c.flags = x.sx[2].parseFlags()
- }
-}
-
-func xcapability(c *Client, x *sx) {
- c.data.mustBeLocked()
- c.capability = make(map[string]bool)
- for _, xx := range x.sx[2:] {
- if xx.kind == sxAtom {
- c.capability[string(xx.data)] = true
- }
- }
-}
-
-func xlist(c *Client, x *sx) {
- c.data.mustBeLocked()
- s := string(x.sx[4].data)
- t := string(x.sx[3].data)
-
- // INBOX is the special name for the main mailbox.
- // All the other mailbox names have the root prefix removed, if applicable.
- inbox := strings.EqualFold(s, "inbox")
- if inbox {
- s = "inbox"
- }
-
- b := c.newBox(s, t, inbox)
- if b == nil {
- return
- }
- if inbox {
- c.inbox = b
- }
- if s == c.root {
- c.rootBox = b
- }
- b.dead = false
- b.flags = x.sx[2].parseFlags()
-}
-
-func xexists(c *Client, x *sx) {
- c.data.mustBeLocked()
- if b := c.box; b != nil {
- b.exists = int(x.sx[1].number)
- if b.exists < b.maxSeen {
- b.maxSeen = b.exists
- }
- }
-}
-
-func xexpunge(c *Client, x *sx) {
- c.data.mustBeLocked()
- if b := c.box; b != nil {
- n := int(x.sx[1].number)
- bynum := b.msgByNum
- if bynum != nil {
- if n < b.firstNum {
- b.firstNum--
- } else if n < b.firstNum+len(bynum) {
- copy(bynum[n-b.firstNum:], bynum[n-b.firstNum+1:])
- b.msgByNum = bynum[:len(bynum)-1]
- } else {
- log.Printf("expunge unexpected message %d %d %d", b.firstNum, b.exists, b.firstNum+len(bynum))
- }
- }
- if n <= b.exists {
- b.exists--
- }
- }
-}
-
-// Table-driven OK info parser.
-
-var oktab = []struct {
- name string
- kind sxKind
- fn func(*Client, *Box, *sx)
-}{
- {"UIDVALIDITY", sxNumber, xokuidvalidity},
- {"PERMANENTFLAGS", sxList, xokpermflags},
- {"UNSEEN", sxNumber, xokunseen},
- {"READ-WRITE", 0, xokreadwrite},
- {"READ-ONLY", 0, xokreadonly},
-}
-
-func xok(c *Client, x *sx) {
- c.data.mustBeLocked()
- b := c.box
- if b == nil {
- return
- }
- if len(x.sx) >= 4 && x.sx[2].kind == sxAtom && x.sx[2].data[0] == '[' {
- var arg *sx
- if x.sx[3].kind == sxAtom && x.sx[3].data[0] == ']' {
- arg = nil
- } else if x.sx[4].kind == sxAtom && x.sx[4].data[0] == ']' {
- arg = x.sx[3]
- } else {
- log.Printf("cannot parse OK: %s", x)
- return
- }
- x.sx[2].data = x.sx[2].data[1:]
- for _, t := range oktab {
- if x.sx[2].isAtom(t.name) {
- if t.kind != 0 && (arg == nil || arg.kind != t.kind) {
- log.Printf("malformed %s: %s", t.name, arg)
- continue
- }
- t.fn(c, b, arg)
- }
- }
- }
-}
-
-func xokuidvalidity(c *Client, b *Box, x *sx) {
- c.data.mustBeLocked()
- n := uint32(x.number)
- if b.validity != n {
- if b.msgByUID != nil {
- log.Printf("imap: UID validity reset for %s", b.Name)
- }
- b.validity = n
- b.maxSeen = 0
- b.firstNum = 0
- b.msgByNum = nil
- b.msgByUID = nil
- }
-}
-
-func xokpermflags(c *Client, b *Box, x *sx) {
- c.data.mustBeLocked()
- b.permFlags = x.parseFlags()
-}
-
-func xokunseen(c *Client, b *Box, x *sx) {
- c.data.mustBeLocked()
- b.unseen = int(x.number)
-}
-
-func xokreadwrite(c *Client, b *Box, x *sx) {
- c.data.mustBeLocked()
- b.readOnly = false
-}
-
-func xokreadonly(c *Client, b *Box, x *sx) {
- c.data.mustBeLocked()
- b.readOnly = true
-}
-
-// Table-driven FETCH message info parser.
-
-var msgtab = []struct {
- name string
- fn func(*Msg, *sx, *sx)
-}{
- {"FLAGS", xmsgflags},
- {"INTERNALDATE", xmsgdate},
- {"RFC822.SIZE", xmsgrfc822size},
- {"ENVELOPE", xmsgenvelope},
- {"X-GM-MSGID", xmsggmmsgid},
- {"X-GM-THRID", xmsggmthrid},
- {"BODY", xmsgbody},
- {"BODY[", xmsgbodydata},
-}
-
-func xfetch(c *Client, x *sx) {
- c.data.mustBeLocked()
- if c.box == nil {
- log.Printf("FETCH but no open box: %s", x)
- return
- }
-
- // * 152 FETCH (UID 185 FLAGS() ...)
- n := x.sx[1].number
- xx := x.sx[3]
- if len(xx.sx)%2 != 0 {
- log.Printf("malformed FETCH: %s", x)
- return
- }
- var uid uint64
- for i := 0; i < len(xx.sx); i += 2 {
- if xx.sx[i].isAtom("UID") {
- if xx.sx[i+1].kind == sxNumber {
- uid = uint64(xx.sx[i+1].number) | uint64(c.box.validity)<<32
- goto HaveUID
- }
- }
- }
- // This happens; too bad.
- // log.Printf("FETCH without UID: %s", x)
- return
-
-HaveUID:
- if m := c.box.msgByUID[uid]; m != nil && m.dead {
- // FETCH during box garbage collection.
- m.dead = false
- m.num = int(n)
- return
- }
- m := c.box.newMsg(uid, int(n))
- for i := 0; i < len(xx.sx); i += 2 {
- k, v := xx.sx[i], xx.sx[i+1]
- for _, t := range msgtab {
- if k.isAtom(t.name) {
- t.fn(m, k, v)
- }
- }
- }
-}
-
-func xmsggmmsgid(m *Msg, k, v *sx) {
- m.GmailID = uint64(v.number)
-}
-
-func xmsggmthrid(m *Msg, k, v *sx) {
- m.GmailThread = uint64(v.number)
-}
-
-func xmsgflags(m *Msg, k, v *sx) {
- m.Flags = v.parseFlags()
-}
-
-func xmsgrfc822size(m *Msg, k, v *sx) {
- m.Bytes = v.number
-}
-
-func xmsgdate(m *Msg, k, v *sx) {
- m.Date = v.parseDate()
-}
-
-func xmsgenvelope(m *Msg, k, v *sx) {
- m.Hdr = parseEnvelope(v)
-}
-
-func parseEnvelope(v *sx) *MsgHdr {
- if v.kind != sxList || !v.match("SSLLLLLLSS") {
- log.Printf("bad envelope: %s", v)
- return nil
- }
-
- hdr := &MsgHdr{
- Date: v.sx[0].nstring(),
- Subject: unrfc2047(v.sx[1].nstring()),
- From: parseAddrs(v.sx[2]),
- Sender: parseAddrs(v.sx[3]),
- ReplyTo: parseAddrs(v.sx[4]),
- To: parseAddrs(v.sx[5]),
- CC: parseAddrs(v.sx[6]),
- BCC: parseAddrs(v.sx[7]),
- InReplyTo: unrfc2047(v.sx[8].nstring()),
- MessageID: unrfc2047(v.sx[9].nstring()),
- }
-
- h := md5.New()
- fmt.Fprintf(h, "date: %s\n", hdr.Date)
- fmt.Fprintf(h, "subject: %s\n", hdr.Subject)
- fmt.Fprintf(h, "from: %s\n", hdr.From)
- fmt.Fprintf(h, "sender: %s\n", hdr.Sender)
- fmt.Fprintf(h, "replyto: %s\n", hdr.ReplyTo)
- fmt.Fprintf(h, "to: %s\n", hdr.To)
- fmt.Fprintf(h, "cc: %s\n", hdr.CC)
- fmt.Fprintf(h, "bcc: %s\n", hdr.BCC)
- fmt.Fprintf(h, "inreplyto: %s\n", hdr.InReplyTo)
- fmt.Fprintf(h, "messageid: %s\n", hdr.MessageID)
- hdr.Digest = fmt.Sprintf("%x", h.Sum(nil))
-
- return hdr
-}
-
-func parseAddrs(x *sx) []Addr {
- var addr []Addr
- for _, xx := range x.sx {
- if !xx.match("SSSS") {
- log.Printf("bad address: %s", x)
- continue
- }
- name := unrfc2047(xx.sx[0].nstring())
- // sx[1] is route
- local := unrfc2047(xx.sx[2].nstring())
- host := unrfc2047(xx.sx[3].nstring())
- if local == "" || host == "" {
- // rfc822 group syntax
- addr = append(addr, Addr{name, ""})
- continue
- }
- addr = append(addr, Addr{name, local + "@" + host})
- }
- return addr
-}
-
-func xmsgbody(m *Msg, k, v *sx) {
- if v.isNil() {
- return
- }
- if v.kind != sxList {
- log.Printf("bad body: %s", v)
- }
-
- // To follow the structure exactly we should be doing this
- // to m.NewPart(m.Part[0]) with type message/rfc822,
- // but the extra layer is redundant - what else would be in
- // a mailbox?
- parseStructure(&m.Root, v)
- n := m.num
- if m.Box.maxSeen < n {
- m.Box.maxSeen = n
- }
-}
-
-func parseStructure(p *MsgPart, x *sx) {
- if x.isNil() {
- return
- }
- if x.kind != sxList {
- log.Printf("bad structure: %s", x)
- return
- }
- if x.sx[0].isList() {
- // multipart
- var i int
- for i = 0; i < len(x.sx) && x.sx[i].isList(); i++ {
- parseStructure(p.newPart(), x.sx[i])
- }
- if i != len(x.sx)-1 || !x.sx[i].isString() {
- log.Printf("bad multipart structure: %s", x)
- p.Type = "multipart/mixed"
- return
- }
- s := strlwr(x.sx[i].nstring())
- p.Type = "multipart/" + s
- return
- }
-
- // single type
- if len(x.sx) < 2 || !x.sx[0].isString() {
- log.Printf("bad type structure: %s", x)
- return
- }
- s := strlwr(x.sx[0].nstring())
- t := strlwr(x.sx[1].nstring())
- p.Type = s + "/" + t
- if len(x.sx) < 7 || !x.sx[2].isList() || !x.sx[3].isString() || !x.sx[4].isString() || !x.sx[5].isString() || !x.sx[6].isNumber() {
- log.Printf("bad part structure: %s", x)
- return
- }
- parseParams(p, x.sx[2])
- p.ContentID = x.sx[3].nstring()
- p.Desc = x.sx[4].nstring()
- p.Encoding = x.sx[5].nstring()
- p.Bytes = x.sx[6].number
- if p.Type == "message/rfc822" {
- if len(x.sx) < 10 || !x.sx[7].isList() || !x.sx[8].isList() || !x.sx[9].isNumber() {
- log.Printf("bad rfc822 structure: %s", x)
- return
- }
- p.Hdr = parseEnvelope(x.sx[7])
- parseStructure(p.newPart(), x.sx[8])
- p.Lines = x.sx[9].number
- }
- if s == "text" {
- if len(x.sx) < 8 || !x.sx[7].isNumber() {
- log.Printf("bad text structure: %s", x)
- return
- }
- p.Lines = x.sx[7].number
- }
-}
-
-func parseParams(p *MsgPart, x *sx) {
- if x.isNil() {
- return
- }
- if len(x.sx)%2 != 0 {
- log.Printf("bad message params: %s", x)
- return
- }
-
- for i := 0; i < len(x.sx); i += 2 {
- k, v := x.sx[i].nstring(), x.sx[i+1].nstring()
- k = strlwr(k)
- switch strlwr(k) {
- case "charset":
- p.Charset = strlwr(v)
- case "name":
- p.Name = v
- }
- }
-}
-
-func (c *Client) fetch(p *MsgPart, what string) {
- c.io.mustBeLocked()
- id := p.ID
- if what != "" {
- if id != "" {
- id += "."
- }
- id += what
- }
- c.cmd(p.Msg.Box, "UID FETCH %d BODY[%s]", p.Msg.UID&(1<<32-1), id)
-}
-
-func xmsgbodydata(m *Msg, k, v *sx) {
- // k.data is []byte("BODY[...")
- name := string(k.data[5:])
- if i := strings.Index(name, "]"); i >= 0 {
- name = name[:i]
- }
-
- p := &m.Root
- for name != "" && '1' <= name[0] && name[0] <= '9' {
- var num int
- num, name = parseNum(name)
- if num == 0 {
- log.Printf("unexpected body name: %s", k.data)
- return
- }
- num--
- if num >= len(p.Child) {
- log.Printf("invalid body name: %s", k.data)
- return
- }
- p = p.Child[num]
- }
-
- switch strlwr(name) {
- case "":
- p.raw = v.nbytes()
- case "mime":
- p.mimeHeader = nocr(v.nbytes())
- case "header":
- p.rawHeader = nocr(v.nbytes())
- case "text":
- p.rawBody = nocr(v.nbytes())
- }
-}
-
-func parseNum(name string) (int, string) {
- rest := ""
- i := strings.Index(name, ".")
- if i >= 0 {
- name, rest = name[:i], name[i+1:]
- }
- n, _ := strconv.Atoi(name)
- return n, rest
-}
-
-func nocr(b []byte) []byte {
- w := 0
- for _, c := range b {
- if c != '\r' {
- b[w] = c
- w++
- }
- }
- return b[:w]
-}
-
-type uidList []*Msg
-
-func (l uidList) String() string {
- var b bytes.Buffer
- for i, m := range l {
- if i > 0 {
- b.WriteByte(',')
- }
- fmt.Fprintf(&b, "%d", m.UID&(1<<32-1))
- }
- return b.String()
-}
-
-func (c *Client) deleteList(msgs []*Msg) error {
- if len(msgs) == 0 {
- return nil
- }
- c.io.mustBeLocked()
-
- b := msgs[0].Box
- for _, m := range msgs {
- if m.Box != b {
- return fmt.Errorf("messages span boxes: %q and %q", b.Name, m.Box.Name)
- }
- if uint32(m.UID>>32) != b.validity {
- return fmt.Errorf("stale message")
- }
- }
-
- err := c.cmd(b, "UID STORE %s +FLAGS (\\Deleted)", uidList(msgs))
- if err == nil && c.box == b {
- err = c.cmd(b, "EXPUNGE")
- }
- return err
-}
-
-func (c *Client) copyList(dst, src *Box, msgs []*Msg) error {
- if len(msgs) == 0 {
- return nil
- }
- c.io.mustBeLocked()
-
- for _, m := range msgs {
- if m.Box != src {
- return fmt.Errorf("messages span boxes: %q and %q", src.Name, m.Box.Name)
- }
- if uint32(m.UID>>32) != src.validity {
- return fmt.Errorf("stale message")
- }
- }
-
- var name string
- if dst == c.inbox {
- name = "INBOX"
- } else {
- name = iquote(dst.Name)
- }
- return c.cmd(src, "UID COPY %s %s", uidList(msgs), name)
-}
-
-func (c *Client) muteList(src *Box, msgs []*Msg) error {
- if len(msgs) == 0 {
- return nil
- }
- c.io.mustBeLocked()
-
- for _, m := range msgs {
- if m.Box != src {
- return fmt.Errorf("messages span boxes: %q and %q", src.Name, m.Box.Name)
- }
- if uint32(m.UID>>32) != src.validity {
- return fmt.Errorf("stale message")
- }
- }
-
- return c.cmd(src, "UID STORE %s +X-GM-LABELS (\\Muted)", uidList(msgs))
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/imap_test.go b/vendor/github.com/mattermost/rsc/imap/imap_test.go
deleted file mode 100644
index 75737fcc8..000000000
--- a/vendor/github.com/mattermost/rsc/imap/imap_test.go
+++ /dev/null
@@ -1,433 +0,0 @@
-package imap
-
-import (
- "bufio"
- "fmt"
- "io"
- "io/ioutil"
- "strings"
- "testing"
- "time"
-
- "github.com/mattermost/rsc/google"
-)
-
-// NOTE: web address is https://mail.google.com/mail/b/rsc@swtch.com/?shva=1#inbox/132e5fd3a6a3c17b
-// where the last is the hex for the thread id.
-// have to have the #inbox part right too. #label/Hello+World/...
-// or #all as a fallback
-
-// TODO: ID command support (RFC 2971)
-
-const mock = true
-
-var user = "rsc@swtch.com"
-var pw, _ = ioutil.ReadFile("/Users/rsc/.swtchpass")
-
-func TestImap(t *testing.T) {
- var user, pw string
- if mock {
- testDial = fakeDial
- user = "gre@host.com"
- pw = "password"
- } else {
- acct := google.Acct("rsc@swtch.com")
- user = acct.Email
- pw = acct.Password
- }
- c, err := NewClient(TLS, "imap.gmail.com", user, pw, "")
- if err != nil {
- t.Fatal(err)
- }
-
- inbox := c.Inbox()
- msgs := inbox.Msgs()
-
- for _, m := range msgs {
- if m.UID == 611764547<<32|57046 {
- // c.io.lock()
- // c.cmd(c.boxByName[`[Gmail]/All Mail`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
- // c.cmd(c.inbox, `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
- // c.cmd(c.boxByName[`To Read`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
- // c.cmd(c.boxByName[`[Gmail]/All Mail`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
- // c.fetch(m.Root.Child[0], "")
- // c.io.unlock()
- fmt.Println("--")
- fmt.Println("From:", m.Hdr.From)
- fmt.Println("To:", m.Hdr.To)
- fmt.Println("Subject:", m.Hdr.Subject)
- fmt.Println("M-Date:", time.Unix(m.Date, 0))
- fmt.Println("Date:", m.Hdr.Date)
- fmt.Println()
- fmt.Println(string(m.Root.Child[0].Text()))
- fmt.Println("--")
- }
- }
- c.Close()
-}
-
-func fakeDial(server string, mode Mode) (io.ReadWriteCloser, error) {
- r1, w1 := io.Pipe()
- r2, w2 := io.Pipe()
- go fakeServer(&pipe2{r1, w2})
- return &pipe2{r2, w1}, nil
-}
-
-func fakeServer(rw io.ReadWriteCloser) {
- b := bufio.NewReader(rw)
- rw.Write([]byte(fakeReply[""]))
- for {
- line, err := b.ReadString('\n')
- if err != nil {
- break
- }
- reply := fakeReply[strings.TrimSpace(line)]
- if reply == "" {
- rw.Write([]byte("* BYE\r\n"))
- break
- }
- rw.Write([]byte(reply))
- }
- rw.Close()
-}
-
-var fakeReply = map[string]string{
- ``: "* OK Gimap ready for requests from 71.232.17.63 k7if4537693qcx.66\r\n",
- `# LOGIN gre@host.com password`: "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE\r\n" +
- "# OK gre@host.com Grace Emlin authenticated (Success)\r\n",
- `# XLIST "" INBOX`: `* XLIST (\HasNoChildren \Inbox) "/" "Inbox"` + "\r\n" +
- "# OK Success\r\n",
- `# XLIST "" *`: `* XLIST (\HasNoChildren \Inbox) "/" "Inbox"` + "\r\n" +
- `* XLIST (\HasNoChildren) "/" "Someday"` + "\r\n" +
- `* XLIST (\HasNoChildren) "/" "To Read"` + "\r\n" +
- `* XLIST (\HasNoChildren) "/" "Waiting"` + "\r\n" +
- `* XLIST (\Noselect \HasChildren) "/" "[Gmail]"` + "\r\n" +
- `* XLIST (\HasNoChildren \AllMail) "/" "[Gmail]/All Mail"` + "\r\n" +
- `* XLIST (\HasNoChildren \Drafts) "/" "[Gmail]/Drafts"` + "\r\n" +
- `* XLIST (\HasNoChildren \Important) "/" "[Gmail]/Important"` + "\r\n" +
- `* XLIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"` + "\r\n" +
- `* XLIST (\HasNoChildren \Spam) "/" "[Gmail]/Spam"` + "\r\n" +
- `* XLIST (\HasNoChildren \Starred) "/" "[Gmail]/Starred"` + "\r\n" +
- `* XLIST (\HasNoChildren \Trash) "/" "[Gmail]/Trash"` + "\r\n" +
- `* XLIST (\HasNoChildren) "/" "russcox@gmail.com"` + "\r\n" +
- "# OK Success\r\n",
- `# LIST "" INBOX`: `* LIST (\HasNoChildren) "/" "INBOX"` + "\r\n" +
- "# OK Success\r\n",
- `# LIST "" *`: `* LIST (\HasNoChildren) "/" "INBOX"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "Someday"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "To Read"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "Waiting"` + "\r\n" +
- `* LIST (\Noselect \HasChildren) "/" "[Gmail]"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/All Mail"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Drafts"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Important"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Sent Mail"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Spam"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Starred"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "[Gmail]/Trash"` + "\r\n" +
- `* LIST (\HasNoChildren) "/" "russcox@gmail.com"` + "\r\n" +
- "# OK Success\r\n",
- `# SELECT inbox`: `* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)` + "\r\n" +
- `* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Flags permitted.` + "\r\n" +
- `* OK [UIDVALIDITY 611764547] UIDs valid.` + "\r\n" +
- `* 9 EXISTS` + "\r\n" +
- `* 0 RECENT` + "\r\n" +
- `* OK [UIDNEXT 57027] Predicted next UID.` + "\r\n" +
- "# OK [READ-WRITE] inbox selected. (Success)\r\n",
- `# UID FETCH 1:* (FLAGS)`: `* 1 FETCH (UID 46074 FLAGS (\Seen))` + "\r\n" +
- `* 2 FETCH (UID 49094 FLAGS (\Seen))` + "\r\n" +
- `* 3 FETCH (UID 49317 FLAGS (\Seen))` + "\r\n" +
- `* 4 FETCH (UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
- `* 5 FETCH (UID 49595 FLAGS (\Seen))` + "\r\n" +
- `* 6 FETCH (UID 49810 FLAGS (\Seen))` + "\r\n" +
- `* 7 FETCH (UID 50579 FLAGS (\Seen))` + "\r\n" +
- `* 8 FETCH (UID 50597 FLAGS (\Seen))` + "\r\n" +
- `* 9 FETCH (UID 50598 FLAGS (\Seen))` + "\r\n" +
- "# OK Success\r\n",
- `# FETCH 1:* (UID FLAGS)`: `* 1 FETCH (UID 46074 FLAGS (\Seen))` + "\r\n" +
- `* 2 FETCH (UID 49094 FLAGS (\Seen))` + "\r\n" +
- `* 3 FETCH (UID 49317 FLAGS (\Seen))` + "\r\n" +
- `* 4 FETCH (UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
- `* 5 FETCH (UID 49595 FLAGS (\Seen))` + "\r\n" +
- `* 6 FETCH (UID 49810 FLAGS (\Seen))` + "\r\n" +
- `* 7 FETCH (UID 50579 FLAGS (\Seen))` + "\r\n" +
- `* 8 FETCH (UID 50597 FLAGS (\Seen))` + "\r\n" +
- `* 9 FETCH (UID 50598 FLAGS (\Seen))` + "\r\n" +
- "# OK Success\r\n",
- `# NOOP`: "# OK Success\r\n",
- `# UID FETCH 1:* (FLAGS X-GM-MSGID X-GM-THRID)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 UID 46074 FLAGS (\Seen))` + "\r\n" +
- `* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 UID 49094 FLAGS (\Seen))` + "\r\n" +
- `* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 UID 49317 FLAGS (\Seen))` + "\r\n" +
- `* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
- `* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 UID 49595 FLAGS (\Seen))` + "\r\n" +
- `* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 UID 49810 FLAGS (\Seen))` + "\r\n" +
- `* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 UID 50579 FLAGS (\Seen))` + "\r\n" +
- `* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 UID 50597 FLAGS (\Seen))` + "\r\n" +
- `* 9 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375220551142026521 UID 50598 FLAGS (\Seen))` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 1:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE X-GM-MSGID X-GM-THRID)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 UID 46074 RFC822.SIZE 5700 INTERNALDATE "15-Jun-2011 13:45:39 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 15 Jun 2011 13:45:35 +0000" "[re2-dev] Issue 40 in re2: Please make RE2::Rewrite public" ((NIL NIL "re2" "googlecode.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "codesite-noreply" "google.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<0-13244084390050003171-8842966241254494762-re2=googlecode.com@googlecode.com>"))` + "\r\n" +
- `* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 UID 49094 RFC822.SIZE 3558 INTERNALDATE "11-Jul-2011 10:22:49 +0000" FLAGS (\Seen) ENVELOPE ("Mon, 11 Jul 2011 12:22:46 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJWthFb61R1tqJxZP1SxTPuwY_BBW5ToLuzX2UpHSvsy9w@mail.gmail.com>" "<4E1ACEF6.4060609@gmail.com>"))` + "\r\n" +
- `* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 UID 49317 RFC822.SIZE 3323 INTERNALDATE "12-Jul-2011 23:01:46 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 13 Jul 2011 01:01:41 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+E-0Xtm=dpiSHLbwkZjZ=zDDoE1t1w0CiGYa+pVz66g@mail.gmail.com>" "<4E1CD255.6060807@gmail.com>"))` + "\r\n" +
- `* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 UID 49424 RFC822.SIZE 2681 INTERNALDATE "13-Jul-2011 22:34:31 +0000" FLAGS (\Flagged \Seen) ENVELOPE ("Wed, 13 Jul 2011 16:33:43 -0600" "Minor correction for venti(8) user manual for running plan9port on Linux" (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) ((NIL NIL "rsc" "swtch.com")) (("Xing Lin" NIL "xinglin" "cs.utah.edu") ("Raghuveer Pullakandam" NIL "rgv" "cs.utah.edu") ("Robert Ricci" NIL "ricci" "cs.utah.edu") ("Eric Eide" NIL "eeide" "cs.utah.edu")) NIL NIL "<1310596423.3866.11.camel@xing-utah-cs>"))` + "\r\n" +
- `* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 UID 49595 RFC822.SIZE 6496 INTERNALDATE "15-Jul-2011 11:37:07 +0000" FLAGS (\Seen) ENVELOPE ("Fri, 15 Jul 2011 13:36:54 +0200" "[re2-dev] MSVC not exporting VariadicFunction2<.. FullMatchN>::operator()(..) but VariadicFunction2<.. PartialMatchN>::operator()(..)" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<4E202656.7010408@gmail.com>"))` + "\r\n" +
- `* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 UID 49810 RFC822.SIZE 5485 INTERNALDATE "17-Jul-2011 07:17:29 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 17 Jul 2011 00:17:28 -0700" "Acme IRC client patch" (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) ((NIL NIL "rsc" "swtch.com")) NIL NIL NIL "<CAGE=Ei0bmAjsYYDxCgtDObuxX_tCU18RcWTe6siwemXAuKqDfg@mail.gmail.com>"))` + "\r\n" +
- `* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 UID 50579 RFC822.SIZE 4049 INTERNALDATE "24-Jul-2011 09:41:19 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 02:41:14 -0700 (PDT)" "Re: [re2-dev] Re: MSVC build" ((NIL NIL "talgil" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("ioannis" NIL "ioannis.e" "gmail.com")) NIL "<AANLkTin8_-yDr8tcb9SosfQ_iAM6RmfzpLQB0gX0vv6w@mail.gmail.com>" "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>"))` + "\r\n" +
- `* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 UID 50597 RFC822.SIZE 3070 INTERNALDATE "24-Jul-2011 12:58:22 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 14:58:15 +0200" "Re: [re2-dev] Rearranging platform dependant features" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+eCPkkhsepo5k0w+dqVo0fQOana2bWp4BexGOrCSSUQ@mail.gmail.com>" "<4E2C16E7.3060500@gmail.com>"))` + "\r\n" +
- `* 9 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375220551142026521 UID 50598 RFC822.SIZE 5744 INTERNALDATE "24-Jul-2011 13:01:59 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 15:01:49 +0200" "Re: [re2-dev] Re: MSVC build" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>" "<4E2C17BD.6000702@gmail.com>"))` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57047:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY X-GM-MSGID X-GM-THRID X-GM-LABELS)`: `* 9 FETCH (X-GM-THRID 1382192619814696847 X-GM-MSGID 1382192619814696847 X-GM-LABELS ("\\Important" russcox@gmail.com) UID 57046 RFC822.SIZE 4170 INTERNALDATE "09-Oct-2011 12:00:02 +0000" FLAGS () ENVELOPE ("Sun, 09 Oct 2011 12:00:02 +0000" "You have no events scheduled today." (("Google Calendar" NIL "calendar-notification" "google.com")) (("Google Calendar" NIL "calendar-notification" "google.com")) (("Russ Cox" NIL "russcox" "gmail.com")) (("Russ Cox" NIL "russcox" "gmail.com")) NIL NIL NIL "<bcaec501c5be15fc7204aedc6af6@google.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 465 11)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "QUOTED-PRINTABLE" 914 12) "ALTERNATIVE"))` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 1:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY X-GM-MSGID X-GM-THRID X-GM-LABELS)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 X-GM-LABELS () UID 46074 RFC822.SIZE 5700 INTERNALDATE "15-Jun-2011 13:45:39 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 15 Jun 2011 13:45:35 +0000" "[re2-dev] Issue 40 in re2: Please make RE2::Rewrite public" ((NIL NIL "re2" "googlecode.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "codesite-noreply" "google.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<0-13244084390050003171-8842966241254494762-re2=googlecode.com@googlecode.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 389 11))` + "\r\n" +
- `* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 X-GM-LABELS ("\\Important") UID 49094 RFC822.SIZE 3558 INTERNALDATE "11-Jul-2011 10:22:49 +0000" FLAGS (\Seen) ENVELOPE ("Mon, 11 Jul 2011 12:22:46 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJWthFb61R1tqJxZP1SxTPuwY_BBW5ToLuzX2UpHSvsy9w@mail.gmail.com>" "<4E1ACEF6.4060609@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 766 24))` + "\r\n" +
- `* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 X-GM-LABELS ("\\Important") UID 49317 RFC822.SIZE 3323 INTERNALDATE "12-Jul-2011 23:01:46 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 13 Jul 2011 01:01:41 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+E-0Xtm=dpiSHLbwkZjZ=zDDoE1t1w0CiGYa+pVz66g@mail.gmail.com>" "<4E1CD255.6060807@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 435 12))` + "\r\n" +
- `* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 X-GM-LABELS ("\\Important" "\\Starred") UID 49424 RFC822.SIZE 2681 INTERNALDATE "13-Jul-2011 22:34:31 +0000" FLAGS (\Flagged \Seen) ENVELOPE ("Wed, 13 Jul 2011 16:33:43 -0600" "Minor correction for venti(8) user manual for running plan9port on Linux" (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) ((NIL NIL "rsc" "swtch.com")) (("Xing Lin" NIL "xinglin" "cs.utah.edu") ("Raghuveer Pullakandam" NIL "rgv" "cs.utah.edu") ("Robert Ricci" NIL "ricci" "cs.utah.edu") ("Eric Eide" NIL "eeide" "cs.utah.edu")) NIL NIL "<1310596423.3866.11.camel@xing-utah-cs>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8") NIL NIL "8BIT" 789 25))` + "\r\n" +
- `* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 X-GM-LABELS ("\\Important") UID 49595 RFC822.SIZE 6496 INTERNALDATE "15-Jul-2011 11:37:07 +0000" FLAGS (\Seen) ENVELOPE ("Fri, 15 Jul 2011 13:36:54 +0200" "[re2-dev] MSVC not exporting VariadicFunction2<.. FullMatchN>::operator()(..) but VariadicFunction2<.. PartialMatchN>::operator()(..)" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<4E202656.7010408@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "FORMAT" "flowed") NIL NIL "7BIT" 1660 34))` + "\r\n" +
- `* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 X-GM-LABELS ("\\Important") UID 49810 RFC822.SIZE 5485 INTERNALDATE "17-Jul-2011 07:17:29 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 17 Jul 2011 00:17:28 -0700" "Acme IRC client patch" (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) ((NIL NIL "rsc" "swtch.com")) NIL NIL NIL "<CAGE=Ei0bmAjsYYDxCgtDObuxX_tCU18RcWTe6siwemXAuKqDfg@mail.gmail.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7BIT" 443 13)("TEXT" "X-PATCH" ("CHARSET" "US-ASCII" "NAME" "emote.patch") NIL NIL "BASE64" 2774 35) "MIXED"))` + "\r\n" +
- `* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 X-GM-LABELS ("\\Important") UID 50579 RFC822.SIZE 4049 INTERNALDATE "24-Jul-2011 09:41:19 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 02:41:14 -0700 (PDT)" "Re: [re2-dev] Re: MSVC build" ((NIL NIL "talgil" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("ioannis" NIL "ioannis.e" "gmail.com")) NIL "<AANLkTin8_-yDr8tcb9SosfQ_iAM6RmfzpLQB0gX0vv6w@mail.gmail.com>" "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>") BODY (("TEXT" "PLAIN" ("CHARSET" "UTF-8") NIL NIL "7BIT" 133 8)("TEXT" "HTML" ("CHARSET" "UTF-8") NIL NIL "7BIT" 211 0) "ALTERNATIVE"))` + "\r\n" +
- `* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 X-GM-LABELS ("\\Important") UID 50597 RFC822.SIZE 3070 INTERNALDATE "24-Jul-2011 12:58:22 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 14:58:15 +0200" "Re: [re2-dev] Rearranging platform dependant features" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+eCPkkhsepo5k0w+dqVo0fQOana2bWp4BexGOrCSSUQ@mail.gmail.com>" "<4E2C16E7.3060500@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 450 10))` + "\r\n" +
- `* 9 FETCH (X-GM-THRID 1382192619814696847 X-GM-MSGID 1382192619814696847 X-GM-LABELS ("\\Important" russcox@gmail.com) UID 57046 RFC822.SIZE 4170 INTERNALDATE "09-Oct-2011 12:00:02 +0000" FLAGS () ENVELOPE ("Sun, 09 Oct 2011 12:00:02 +0000" "You have no events scheduled today." (("Google Calendar" NIL "calendar-notification" "google.com")) (("Google Calendar" NIL "calendar-notification" "google.com")) (("Russ Cox" NIL "russcox" "gmail.com")) (("Russ Cox" NIL "russcox" "gmail.com")) NIL NIL NIL "<bcaec501c5be15fc7204aedc6af6@google.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 465 11)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "QUOTED-PRINTABLE" 914 12) "ALTERNATIVE"))` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[1]`: `* 9 FETCH (UID 57046 BODY[1] {465}` + "\r\n" +
- `russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
- `` + "\r\n" +
- `View your calendar at https://www.google.com/calendar/` + "\r\n" +
- `` + "\r\n" +
- `You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
- `are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
- `Cox.` + "\r\n" +
- `` + "\r\n" +
- `To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
- `https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
- `each calendar.` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[1.TEXT]`: `* 9 FETCH (UID 57046 BODY[1.TEXT] NIL)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[1.HEADER]`: `* 9 FETCH (UID 57046 BODY[1.HEADER] NIL)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[1.MIME]`: `* 146 FETCH (UID 57046 BODY[1.MIME] {74}` + "\r\n" +
- `Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
- `` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[2]`: `* 146 FETCH (UID 57046 BODY[2] {914}` + "\r\n" +
- `<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
- `rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
- `oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
- `e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
- `<p style=3D"margin:0;color:#0">russcox@gmail.com,&nbsp;you have no events s=` + "\r\n" +
- `cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
- ` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
- `cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
- `ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
- `www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
- `endar.</p></div>)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[2.TEXT]`: `* 9 FETCH (UID 57046 BODY[2.TEXT] NIL)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[2.HEADER]`: `* 9 FETCH (UID 57046 BODY[2.HEADER] NIL)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[2.MIME]`: `* 146 FETCH (UID 57046 BODY[2.MIME] {92}` + "\r\n" +
- `Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
- `Content-Transfer-Encoding: quoted-printable` + "\r\n" +
- `` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[]`: `* 146 FETCH (UID 57046 BODY[] {4170}` + "\r\n" +
- `Delivered-To: rsc@swtch.com` + "\r\n" +
- `Received: by 10.216.54.148 with SMTP id i20cs32329wec;` + "\r\n" +
- ` Sun, 9 Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
- `Received: by 10.227.11.2 with SMTP id r2mr4751812wbr.43.1318161630585;` + "\r\n" +
- ` Sun, 09 Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
- `DomainKey-Status: good` + "\r\n" +
- `Received-SPF: softfail (google.com: best guess record for domain of transitioning 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com does not designate <unknown> as permitted sender)` + "\r\n" +
- `Received: by 10.241.227.90 with POP3 id 26mf2646912wyj.48;` + "\r\n" +
- ` Sun, 09 Oct 2011 05:00:29 -0700 (PDT)` + "\r\n" +
- `X-Gmail-Fetch-Info: russcox@gmail.com 1 smtp.gmail.com 995 russcox` + "\r\n" +
- `Delivered-To: russcox@gmail.com` + "\r\n" +
- `Received: by 10.142.76.10 with SMTP id y10cs75487wfa;` + "\r\n" +
- ` Sun, 9 Oct 2011 05:00:08 -0700 (PDT)` + "\r\n" +
- `Return-Path: <3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com>` + "\r\n" +
- `Received-SPF: pass (google.com: domain of 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com designates 10.52.73.100 as permitted sender) client-ip=10.52.73.100;` + "\r\n" +
- `Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com designates 10.52.73.100 as permitted sender) smtp.mail=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com; dkim=pass header.i=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
- `Received: from mr.google.com ([10.52.73.100])` + "\r\n" +
- ` by 10.52.73.100 with SMTP id k4mr8053242vdv.5.1318161606360 (num_hops = 1);` + "\r\n" +
- ` Sun, 09 Oct 2011 05:00:06 -0700 (PDT)` + "\r\n" +
- `DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;` + "\r\n" +
- ` d=google.com; s=beta;` + "\r\n" +
- ` h=mime-version:reply-to:auto-submitted:message-id:date:subject:from` + "\r\n" +
- ` :to:content-type;` + "\r\n" +
- ` bh=SGjz0F4q+eFVkoC4yzLKQKvlxTKiUsYbO/KPI+3KOE8=;` + "\r\n" +
- ` b=LRBkWBW7ZZ4UJYa7b92zfHa0ZM1K1d0wP/jbgmDw2OZTWtgDICZb30dzhFUfNVdxeN` + "\r\n" +
- ` kdMFbRhTLP5NpSXWhbDw==` + "\r\n" +
- `MIME-Version: 1.0` + "\r\n" +
- `Received: by 10.52.73.100 with SMTP id k4mr5244039vdv.5.1318161602706; Sun, 09` + "\r\n" +
- ` Oct 2011 05:00:02 -0700 (PDT)` + "\r\n" +
- `Reply-To: Russ Cox <russcox@gmail.com>` + "\r\n" +
- `Auto-Submitted: auto-generated` + "\r\n" +
- `Message-ID: <bcaec501c5be15fc7204aedc6af6@google.com>` + "\r\n" +
- `Date: Sun, 09 Oct 2011 12:00:02 +0000` + "\r\n" +
- `Subject: You have no events scheduled today.` + "\r\n" +
- `From: Google Calendar <calendar-notification@google.com>` + "\r\n" +
- `To: Russ Cox <russcox@gmail.com>` + "\r\n" +
- `Content-Type: multipart/alternative; boundary=bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
- `` + "\r\n" +
- `russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
- `` + "\r\n" +
- `View your calendar at https://www.google.com/calendar/` + "\r\n" +
- `` + "\r\n" +
- `You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
- `are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
- `Cox.` + "\r\n" +
- `` + "\r\n" +
- `To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
- `https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
- `each calendar.` + "\r\n" +
- `` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
- `Content-Transfer-Encoding: quoted-printable` + "\r\n" +
- `` + "\r\n" +
- `<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
- `rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
- `oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
- `e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
- `<p style=3D"margin:0;color:#0">russcox@gmail.com,&nbsp;you have no events s=` + "\r\n" +
- `cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
- ` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
- `cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
- `ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
- `www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
- `endar.</p></div>` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3--` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[TEXT]`: `* 146 FETCH (UID 57046 BODY[TEXT] {1647}` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
- `` + "\r\n" +
- `russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
- `` + "\r\n" +
- `View your calendar at https://www.google.com/calendar/` + "\r\n" +
- `` + "\r\n" +
- `You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
- `are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
- `Cox.` + "\r\n" +
- `` + "\r\n" +
- `To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
- `https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
- `each calendar.` + "\r\n" +
- `` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
- `Content-Transfer-Encoding: quoted-printable` + "\r\n" +
- `` + "\r\n" +
- `<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
- `rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
- `oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
- `e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
- `<p style=3D"margin:0;color:#0">russcox@gmail.com,&nbsp;you have no events s=` + "\r\n" +
- `cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
- ` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
- `cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
- `<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
- `ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
- `www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
- `endar.</p></div>` + "\r\n" +
- `--bcaec501c5be15fc6504aedc6af3--` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[HEADER]`: `* 146 FETCH (UID 57046 BODY[HEADER] {2453}` + "\r\n" +
- `Delivered-To: rsc@swtch.com` + "\r\n" +
- `Received: by 10.216.54.148 with SMTP id i20cs32329wec; Sun, 9 Oct 2011` + "\r\n" +
- ` 05:00:30 -0700 (PDT)` + "\r\n" +
- `Received: by 10.227.11.2 with SMTP id r2mr4751812wbr.43.1318161630585; Sun, 09` + "\r\n" +
- ` Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
- `DomainKey-Status: good` + "\r\n" +
- `Received-SPF: softfail (google.com: best guess record for domain of` + "\r\n" +
- ` transitioning` + "\r\n" +
- ` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
- ` does not designate <unknown> as permitted sender)` + "\r\n" +
- `Received: by 10.241.227.90 with POP3 id 26mf2646912wyj.48; Sun, 09 Oct 2011` + "\r\n" +
- ` 05:00:29 -0700 (PDT)` + "\r\n" +
- `X-Gmail-Fetch-Info: russcox@gmail.com 1 smtp.gmail.com 995 russcox` + "\r\n" +
- `Delivered-To: russcox@gmail.com` + "\r\n" +
- `Received: by 10.142.76.10 with SMTP id y10cs75487wfa; Sun, 9 Oct 2011 05:00:08` + "\r\n" +
- ` -0700 (PDT)` + "\r\n" +
- `Return-Path: <3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com>` + "\r\n" +
- `Received-SPF: pass (google.com: domain of` + "\r\n" +
- ` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
- ` designates 10.52.73.100 as permitted sender) client-ip=10.52.73.100;` + "\r\n" +
- `Authentication-Results: mr.google.com; spf=pass (google.com: domain of` + "\r\n" +
- ` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
- ` designates 10.52.73.100 as permitted sender)` + "\r\n" +
- ` smtp.mail=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com;` + "\r\n" +
- ` dkim=pass` + "\r\n" +
- ` header.i=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
- `Received: from mr.google.com ([10.52.73.100]) by 10.52.73.100 with SMTP id` + "\r\n" +
- ` k4mr8053242vdv.5.1318161606360 (num_hops = 1); Sun, 09 Oct 2011 05:00:06` + "\r\n" +
- ` -0700 (PDT)` + "\r\n" +
- `DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta;` + "\r\n" +
- ` h=mime-version:reply-to:auto-submitted:message-id:date:subject:from` + "\r\n" +
- ` :to:content-type; bh=SGjz0F4q+eFVkoC4yzLKQKvlxTKiUsYbO/KPI+3KOE8=;` + "\r\n" +
- ` b=LRBkWBW7ZZ4UJYa7b92zfHa0ZM1K1d0wP/jbgmDw2OZTWtgDICZb30dzhFUfNVdxeN` + "\r\n" +
- ` kdMFbRhTLP5NpSXWhbDw==` + "\r\n" +
- `MIME-Version: 1.0` + "\r\n" +
- `Received: by 10.52.73.100 with SMTP id k4mr5244039vdv.5.1318161602706; Sun, 09` + "\r\n" +
- ` Oct 2011 05:00:02 -0700 (PDT)` + "\r\n" +
- `Reply-To: Russ Cox <russcox@gmail.com>` + "\r\n" +
- `Auto-Submitted: auto-generated` + "\r\n" +
- `Message-ID: <bcaec501c5be15fc7204aedc6af6@google.com>` + "\r\n" +
- `Date: Sun, 09 Oct 2011 12:00:02 +0000` + "\r\n" +
- `Subject: You have no events scheduled today.` + "\r\n" +
- `From: Google Calendar <calendar-notification@google.com>` + "\r\n" +
- `To: Russ Cox <russcox@gmail.com>` + "\r\n" +
- `Content-Type: multipart/alternative; boundary=bcaec501c5be15fc6504aedc6af3` + "\r\n" +
- `` + "\r\n" +
- `)` + "\r\n" +
- "# OK Success\r\n",
- `# UID FETCH 57046 BODY[MIME]`: "# BAD Could not parse command\r\n",
-}
-
-/*
- mail sending
-
-package main
-
-import (
- "log"
- "io/ioutil"
- "smtp"
- "time"
-)
-var pw, _ = ioutil.ReadFile("/Users/rsc/.swtchpass")
-var msg = `From: "Russ Cox" <rsc@golang.org>
-To: "Russ Cox" <rsc@google.com>
-Subject: test from Go
-
-This is a message sent from Go
-`
-
-BUG: Does not *REQUIRE* auth. Should.
-
-func main() {
- auth := smtp.PlainAuth(
- "",
- "rsc@swtch.com",
- string(pw),
- "smtp.gmail.com",
- )
- if err := smtp.SendMail("smtp.gmail.com:587", auth, "rsc@swtch.com", []string{"rsc@google.com"}, []byte(msg+time.LocalTime().String())); err != nil {
- log.Fatal(err)
- }
- println("SENT")
-}
-*/
diff --git a/vendor/github.com/mattermost/rsc/imap/mail.go b/vendor/github.com/mattermost/rsc/imap/mail.go
deleted file mode 100644
index 365540f82..000000000
--- a/vendor/github.com/mattermost/rsc/imap/mail.go
+++ /dev/null
@@ -1,468 +0,0 @@
-package imap
-
-import (
- "bytes"
- "fmt"
- "log"
- "regexp"
- "sort"
- "strings"
- "time"
-)
-
-type Flags uint32
-
-const (
- FlagJunk Flags = 1 << iota
- FlagNonJunk
- FlagReplied
- FlagFlagged
- FlagDeleted
- FlagDraft
- FlagRecent
- FlagSeen
- FlagNoInferiors
- FlagNoSelect
- FlagMarked
- FlagUnMarked
- FlagHasChildren
- FlagHasNoChildren
- FlagInbox // Gmail extension
- FlagAllMail // Gmail extension
- FlagDrafts // Gmail extension
- FlagSent // Gmail extension
- FlagSpam // Gmail extension
- FlagStarred // Gmail extension
- FlagTrash // Gmail extension
- FlagImportant // Gmail extension
-)
-
-var flagNames = []string{
- "Junk",
- "NonJunk",
- "\\Answered",
- "\\Flagged",
- "\\Deleted",
- "\\Draft",
- "\\Recent",
- "\\Seen",
- "\\NoInferiors",
- "\\NoSelect",
- "\\Marked",
- "\\UnMarked",
- "\\HasChildren",
- "\\HasNoChildren",
- "\\Inbox",
- "\\AllMail",
- "\\Drafts",
- "\\Sent",
- "\\Spam",
- "\\Starred",
- "\\Trash",
- "\\Important",
-}
-
-// A Box represents an IMAP mailbox.
-type Box struct {
- Name string // name of mailbox
- Elem string // last element in name
- Client *Client
-
- parent *Box // parent in hierarchy
- child []*Box // child boxes
- dead bool // box no longer exists
- inbox bool // box is inbox
- flags Flags // allowed flags
- permFlags Flags // client-modifiable permanent flags
- readOnly bool // box is read-only
-
- exists int // number of messages in box (according to server)
- maxSeen int // maximum message number seen (for polling)
- unseen int // number of first unseen message
- validity uint32 // UID validity base number
- load bool // if false, don't track full set of messages
- firstNum int // 0 means box not loaded
- msgByNum []*Msg
- msgByUID map[uint64]*Msg
-}
-
-func (c *Client) Boxes() []*Box {
- c.data.lock()
- defer c.data.unlock()
-
- box := make([]*Box, len(c.allBox))
- copy(box, c.allBox)
- return box
-}
-
-func (c *Client) Box(name string) *Box {
- c.data.lock()
- defer c.data.unlock()
-
- return c.boxByName[name]
-}
-
-func (c *Client) Inbox() *Box {
- c.data.lock()
- defer c.data.unlock()
-
- return c.inbox
-}
-
-func (c *Client) newBox(name, sep string, inbox bool) *Box {
- c.data.mustBeLocked()
- if b := c.boxByName[name]; b != nil {
- return b
- }
-
- b := &Box{
- Name: name,
- Elem: name,
- Client: c,
- inbox: inbox,
- }
- if !inbox {
- b.parent = c.rootBox
- }
- if !inbox && sep != "" && name != c.root {
- if i := strings.LastIndex(name, sep); i >= 0 {
- b.Elem = name[i+len(sep):]
- b.parent = c.newBox(name[:i], sep, false)
- }
- }
- c.allBox = append(c.allBox, b)
- c.boxByName[name] = b
- if b.parent != nil {
- b.parent.child = append(b.parent.child, b)
- }
- return b
-}
-
-// A Msg represents an IMAP message.
-type Msg struct {
- Box *Box // box containing message
- Date time.Time // date
- Flags Flags // message flags
- Bytes int64 // size in bytes
- Lines int64 // number of lines
- Hdr *MsgHdr // MIME header
- Root MsgPart // top-level message part
- GmailID uint64 // Gmail message id
- GmailThread uint64 // Gmail thread id
- UID uint64 // unique id for this message
-
- deleted bool
- dead bool
- num int // message number in box (changes)
-}
-
-// TODO: Return os.Error too
-
-type byUID []*Msg
-
-func (x byUID) Len() int { return len(x) }
-func (x byUID) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byUID) Less(i, j int) bool { return x[i].UID < x[j].UID }
-
-func (b *Box) Msgs() []*Msg {
- b.Client.data.lock()
- defer b.Client.data.unlock()
-
- msgs := make([]*Msg, len(b.msgByUID))
- n := 0
- for _, m := range b.msgByUID {
- msgs[n] = m
- n++
- }
- sort.Sort(byUID(msgs))
- return msgs
-}
-
-func (b *Box) newMsg(uid uint64, id int) *Msg {
- b.Client.data.mustBeLocked()
- if m := b.msgByUID[uid]; m != nil {
- return m
- }
- if b.msgByUID == nil {
- b.msgByUID = map[uint64]*Msg{}
- }
- m := &Msg{
- UID: uid,
- Box: b,
- num: id,
- }
- m.Root.Msg = m
- if b.load {
- if b.firstNum == 0 {
- b.firstNum = id
- }
- if id < b.firstNum {
- log.Printf("warning: unexpected id %d < %d", id, b.firstNum)
- byNum := make([]*Msg, len(b.msgByNum)+b.firstNum-id)
- copy(byNum[b.firstNum-id:], b.msgByNum)
- b.msgByNum = byNum
- b.firstNum = id
- }
- if id-b.firstNum < len(b.msgByNum) {
- b.msgByNum[id-b.firstNum] = m
- } else {
- if id-b.firstNum > len(b.msgByNum) {
- log.Printf("warning: unexpected id %d > %d", id, b.firstNum+len(b.msgByNum))
- byNum := make([]*Msg, id-b.firstNum)
- copy(byNum, b.msgByNum)
- b.msgByNum = byNum
- }
- b.msgByNum = append(b.msgByNum, m)
- }
- }
- b.msgByUID[uid] = m
- return m
-}
-
-func (b *Box) Delete(msgs []*Msg) error {
- for _, m := range msgs {
- if m.Box != b {
- return fmt.Errorf("messages not from this box")
- }
- }
- b.Client.io.lock()
- defer b.Client.io.unlock()
- err := b.Client.deleteList(msgs)
- if err == nil {
- b.Client.data.lock()
- defer b.Client.data.unlock()
- for _, m := range msgs {
- if m.Flags&FlagDeleted != 0 {
- delete(b.msgByUID, m.UID)
- }
- }
- }
- return err
-}
-
-func (b *Box) Copy(msgs []*Msg) error {
- if len(msgs) == 0 {
- return nil
- }
- src := msgs[0].Box
- for _, m := range msgs {
- if m.Box != src {
- return fmt.Errorf("messages span boxes: %q and %q", src.Name, m.Box.Name)
- }
- }
- b.Client.io.lock()
- defer b.Client.io.unlock()
- return b.Client.copyList(b, src, msgs)
-}
-
-func (b *Box) Mute(msgs []*Msg) error {
- if len(msgs) == 0 {
- return nil
- }
- for _, m := range msgs {
- if m.Box != b {
- return fmt.Errorf("messages not from this box")
- }
- }
- b.Client.io.lock()
- defer b.Client.io.unlock()
- return b.Client.muteList(b, msgs)
-}
-
-func (b *Box) Check() error {
- b.Client.io.lock()
- defer b.Client.io.unlock()
-
- return b.Client.check(b)
-}
-
-func (m *Msg) Deleted() bool {
- // Racy but okay. Can add a lock later if it matters.
- return m.Flags&FlagDeleted != 0
-}
-
-// A Hdr represents a message header.
-type MsgHdr struct {
- Date string
- Subject string
- From []Addr
- Sender []Addr
- ReplyTo []Addr
- To []Addr
- CC []Addr
- BCC []Addr
- InReplyTo string
- MessageID string
- Digest string
-}
-
-// An Addr represents a single, named email address.
-// If Name is empty, only the email address is known.
-// If Email is empty, the Addr represents an unspecified (but named) group.
-type Addr struct {
- Name string
- Email string
-}
-
-func (a Addr) String() string {
- if a.Email == "" {
- return a.Name
- }
- if a.Name == "" {
- return a.Email
- }
- return a.Name + " <" + a.Email + ">"
-}
-
-// A MsgPart represents a single part of a MIME-encoded message.
-type MsgPart struct {
- Msg *Msg // containing message
- Type string
- ContentID string
- Desc string
- Encoding string
- Bytes int64
- Lines int64
- Charset string
- Name string
- Hdr *MsgHdr
- ID string
- Child []*MsgPart
-
- raw []byte // raw message
- rawHeader []byte // raw RFC-2822 header, for message/rfc822
- rawBody []byte // raw RFC-2822 body, for message/rfc822
- mimeHeader []byte // mime header, for attachments
-}
-
-func (p *MsgPart) newPart() *MsgPart {
- p.Msg.Box.Client.data.mustBeLocked()
- dot := "."
- if p.ID == "" { // no dot at root
- dot = ""
- }
- pp := &MsgPart{
- Msg: p.Msg,
- ID: fmt.Sprint(p.ID, dot, 1+len(p.Child)),
- }
- p.Child = append(p.Child, pp)
- return pp
-}
-
-func (p *MsgPart) Text() []byte {
- c := p.Msg.Box.Client
- var raw []byte
- c.data.lock()
- if p == &p.Msg.Root {
- raw = p.rawBody
- c.data.unlock()
- if raw == nil {
- c.io.lock()
- if raw = p.rawBody; raw == nil {
- c.fetch(p, "TEXT")
- raw = p.rawBody
- }
- c.io.unlock()
- }
- } else {
- raw = p.raw
- c.data.unlock()
- if raw == nil {
- c.io.lock()
- if raw = p.raw; raw == nil {
- c.fetch(p, "")
- raw = p.raw
- }
- c.io.unlock()
- }
- }
- return decodeText(raw, p.Encoding, p.Charset, false)
-}
-
-func (p *MsgPart) Raw() []byte {
- c := p.Msg.Box.Client
- var raw []byte
- c.data.lock()
- raw = p.rawBody
- c.data.unlock()
- if raw == nil {
- c.io.lock()
- if raw = p.rawBody; raw == nil {
- c.fetch(p, "")
- raw = p.rawBody
- }
- c.io.unlock()
- }
- return raw
-}
-
-var sigDash = []byte("\n--\n")
-var quote = []byte("\n> ")
-var nl = []byte("\n")
-
-var onwrote = regexp.MustCompile(`\A\s*On .* wrote:\s*\z`)
-
-func (p *MsgPart) ShortText() []byte {
- t := p.Text()
-
- return shortText(t)
-}
-
-func shortText(t []byte) []byte {
- if t == nil {
- return nil
- }
-
- // Cut signature.
- i := bytes.LastIndex(t, sigDash)
- j := bytes.LastIndex(t, quote)
- if i > j && bytes.Count(t[i+1:], nl) <= 10 {
- t = t[:i+1]
- }
-
- // Cut trailing quoted text.
- for {
- rest, last := lastLine(t)
- trim := bytes.TrimSpace(last)
- if len(rest) < len(t) && (len(trim) == 0 || trim[0] == '>') {
- t = rest
- continue
- }
- break
- }
-
- // Cut 'On foo.*wrote:' line.
- rest, last := lastLine(t)
- if onwrote.Match(last) {
- t = rest
- }
-
- // Cut trailing blank lines.
- for {
- rest, last := lastLine(t)
- trim := bytes.TrimSpace(last)
- if len(rest) < len(t) && len(trim) == 0 {
- t = rest
- continue
- }
- break
- }
-
- // Cut signature again.
- i = bytes.LastIndex(t, sigDash)
- j = bytes.LastIndex(t, quote)
- if i > j && bytes.Count(t[i+1:], nl) <= 10 {
- t = t[:i+1]
- }
-
- return t
-}
-
-func lastLine(t []byte) (rest, last []byte) {
- n := len(t)
- if n > 0 && t[n-1] == '\n' {
- n--
- }
- j := bytes.LastIndex(t[:n], nl)
- return t[:j+1], t[j+1:]
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/mail_test.go b/vendor/github.com/mattermost/rsc/imap/mail_test.go
deleted file mode 100644
index 3c1aec860..000000000
--- a/vendor/github.com/mattermost/rsc/imap/mail_test.go
+++ /dev/null
@@ -1,335 +0,0 @@
-package imap
-
-import "testing"
-
-var shortTextTests = []struct {
- in, out string
-}{
- {
- in: `From: Brad Fitzpatrick <bradfitz@golang.org>
-Date: Tue Oct 18 18:23:11 EDT 2011
-To: r@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
-Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
-
-Here's a test:
-
-bradfitz@gopher:~/go/src/pkg/rpc$ hg diff
-diff -r b7f9a5e9b87f src/pkg/rpc/server_test.go
---- a/src/pkg/rpc/server_test.go Tue Oct 18 17:01:42 2011 -0500
-+++ b/src/pkg/rpc/server_test.go Tue Oct 18 15:22:19 2011 -0700
-@@ -467,6 +467,27 @@
- fmt.Printf("mallocs per HTTP rpc round trip: %d\n",
-countMallocs(dialHTTP, t))
- }
-
-+type writeCrasher struct{}
-+
-+func (writeCrasher) Close() os.Error {
-+ return nil
-+}
-+
-+func (writeCrasher) Read(p []byte) (int, os.Error) {
-+ return 0, os.EOF
-+}
-+
-+func (writeCrasher) Write(p []byte) (int, os.Error) {
-+ return 0, os.NewError("fake write failure")
-+}
-+
-+func TestClientWriteError(t *testing.T) {
-+ c := NewClient(writeCrasher{})
-+ res := false
-+ c.Call("foo", 1, &res)
-+}
-+
- func benchmarkEndToEnd(dial func() (*Client, os.Error), b *testing.B) {
- b.StopTimer()
- once.Do(startServer)
-
-
-On Tue, Oct 18, 2011 at 3:12 PM, <r@golang.org> wrote:
-
-> Reviewers: golang-dev_googlegroups.com,
->
-> Message:
-> Hello golang-dev@googlegroups.com,
->
-> I'd like you to review this change to
-> https://go.googlecode.com/hg/
->
->
-> Description:
-> rpc: don't panic on write error.
-> The mechanism to record the error in the call is already in place.
-> Fixes issue 2382.
->
-> Please review this at http://codereview.appspot.com/**5307043/<http://codereview.appspot.com/5307043/>
->
-> Affected files:
-> M src/pkg/rpc/client.go
->
->
-> Index: src/pkg/rpc/client.go
-> ==============================**==============================**=======
-> --- a/src/pkg/rpc/client.go
-> +++ b/src/pkg/rpc/client.go
-> @@ -85,7 +85,8 @@
-> client.request.Seq = c.seq
-> client.request.ServiceMethod = c.ServiceMethod
-> if err := client.codec.WriteRequest(&**client.request, c.Args); err
-> != nil {
-> - panic("rpc: client encode error: " + err.String())
-> + c.Error = err
-> + c.done()
-> }
-> }
->
-> @@ -251,10 +252,10 @@
-> // the same Call object. If done is nil, Go will allocate a new channel.
-> // If non-nil, done must be buffered or Go will deliberately crash.
-> func (client *Client) Go(serviceMethod string, args interface{}, reply
-> interface{}, done chan *Call) *Call {
-> - c := new(Call)
-> - c.ServiceMethod = serviceMethod
-> - c.Args = args
-> - c.Reply = reply
-> + call := new(Call)
-> + call.ServiceMethod = serviceMethod
-> + call.Args = args
-> + call.Reply = reply
-> if done == nil {
-> done = make(chan *Call, 10) // buffered.
-> } else {
-> @@ -266,14 +267,14 @@
-> log.Panic("rpc: done channel is unbuffered")
-> }
-> }
-> - c.Done = done
-> + call.Done = done
-> if client.shutdown {
-> - c.Error = ErrShutdown
-> - c.done()
-> - return c
-> + call.Error = ErrShutdown
-> + call.done()
-> + return call
-> }
-> - client.send(c)
-> - return c
-> + client.send(call)
-> + return call
-> }
->
-> // Call invokes the named function, waits for it to complete, and returns
-> its error status.
->
->
->
-
-`,
- out: `From: Brad Fitzpatrick <bradfitz@golang.org>
-Date: Tue Oct 18 18:23:11 EDT 2011
-To: r@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
-Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
-
-Here's a test:
-
-bradfitz@gopher:~/go/src/pkg/rpc$ hg diff
-diff -r b7f9a5e9b87f src/pkg/rpc/server_test.go
---- a/src/pkg/rpc/server_test.go Tue Oct 18 17:01:42 2011 -0500
-+++ b/src/pkg/rpc/server_test.go Tue Oct 18 15:22:19 2011 -0700
-@@ -467,6 +467,27 @@
- fmt.Printf("mallocs per HTTP rpc round trip: %d\n",
-countMallocs(dialHTTP, t))
- }
-
-+type writeCrasher struct{}
-+
-+func (writeCrasher) Close() os.Error {
-+ return nil
-+}
-+
-+func (writeCrasher) Read(p []byte) (int, os.Error) {
-+ return 0, os.EOF
-+}
-+
-+func (writeCrasher) Write(p []byte) (int, os.Error) {
-+ return 0, os.NewError("fake write failure")
-+}
-+
-+func TestClientWriteError(t *testing.T) {
-+ c := NewClient(writeCrasher{})
-+ res := false
-+ c.Call("foo", 1, &res)
-+}
-+
- func benchmarkEndToEnd(dial func() (*Client, os.Error), b *testing.B) {
- b.StopTimer()
- once.Do(startServer)
-`,
- },
- {
- in: `From: David Symonds <dsymonds@golang.org>
-Date: Tue Oct 18 18:17:52 EDT 2011
-To: reply@codereview.appspotmail.com, r@golang.org, golang-dev@googlegroups.com
-Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
-
-LGTM
-On Oct 19, 2011 9:12 AM, <r@golang.org> wrote:
-
-> Reviewers: golang-dev_googlegroups.com,
->
-> Message:
-> Hello golang-dev@googlegroups.com,
->
-> I'd like you to review this change to
-> https://go.googlecode.com/hg/
->
->
-> Description:
-> rpc: don't panic on write error.
-> The mechanism to record the error in the call is already in place.
-> Fixes issue 2382.
->
-> Please review this at http://codereview.appspot.com/**5307043/<http://codereview.appspot.com/5307043/>
->
-> Affected files:
-> M src/pkg/rpc/client.go
->
->
-> Index: src/pkg/rpc/client.go
-> ==============================**==============================**=======
-> --- a/src/pkg/rpc/client.go
-> +++ b/src/pkg/rpc/client.go
-> @@ -85,7 +85,8 @@
-> client.request.Seq = c.seq
-> client.request.ServiceMethod = c.ServiceMethod
-> if err := client.codec.WriteRequest(&**client.request, c.Args); err
-> != nil {
-> - panic("rpc: client encode error: " + err.String())
-> + c.Error = err
-> + c.done()
-> }
-> }
->
-> @@ -251,10 +252,10 @@
-> // the same Call object. If done is nil, Go will allocate a new channel.
-> // If non-nil, done must be buffered or Go will deliberately crash.
-> func (client *Client) Go(serviceMethod string, args interface{}, reply
-> interface{}, done chan *Call) *Call {
-> - c := new(Call)
-> - c.ServiceMethod = serviceMethod
-> - c.Args = args
-> - c.Reply = reply
-> + call := new(Call)
-> + call.ServiceMethod = serviceMethod
-> + call.Args = args
-> + call.Reply = reply
-> if done == nil {
-> done = make(chan *Call, 10) // buffered.
-> } else {
-> @@ -266,14 +267,14 @@
-> log.Panic("rpc: done channel is unbuffered")
-> }
-> }
-> - c.Done = done
-> + call.Done = done
-> if client.shutdown {
-> - c.Error = ErrShutdown
-> - c.done()
-> - return c
-> + call.Error = ErrShutdown
-> + call.done()
-> + return call
-> }
-> - client.send(c)
-> - return c
-> + client.send(call)
-> + return call
-> }
->
-> // Call invokes the named function, waits for it to complete, and returns
-> its error status.
->
->
->
-
-`,
- out: `From: David Symonds <dsymonds@golang.org>
-Date: Tue Oct 18 18:17:52 EDT 2011
-To: reply@codereview.appspotmail.com, r@golang.org, golang-dev@googlegroups.com
-Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
-
-LGTM
-`,
- },
- {
- in: `From: Brad Fitzpatrick <bradfitz@golang.org>
-Date: Tue Oct 18 23:26:07 EDT 2011
-To: rsc@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
-Subject: Re: [golang-dev] code review 5297044: gotest: use $GCFLAGS like make does (issue 5297044)
-
-LGTM
-
-On Tue, Oct 18, 2011 at 7:52 PM, <rsc@golang.org> wrote:
-
-> Reviewers: golang-dev_googlegroups.com,
->
-> Message:
-> Hello golang-dev@googlegroups.com,
->
-> I'd like you to review this change to
-> https://go.googlecode.com/hg/
->
->
-> Description:
-> gotest: use $GCFLAGS like make does
->
-> Please review this at http://codereview.appspot.com/**5297044/<http://codereview.appspot.com/5297044/>
->
-> Affected files:
-> M src/cmd/gotest/gotest.go
->
->
-> Index: src/cmd/gotest/gotest.go
-> ==============================**==============================**=======
-> --- a/src/cmd/gotest/gotest.go
-> +++ b/src/cmd/gotest/gotest.go
-> @@ -153,8 +153,12 @@
-> if gc == "" {
-> gc = O + "g"
-> }
-> - XGC = []string{gc, "-I", "_test", "-o", "_xtest_." + O}
-> - GC = []string{gc, "-I", "_test", "_testmain.go"}
-> + var gcflags []string
-> + if gf := strings.TrimSpace(os.Getenv("**GCFLAGS")); gf != "" {
-> + gcflags = strings.Fields(gf)
-> + }
-> + XGC = append([]string{gc, "-I", "_test", "-o", "_xtest_." + O},
-> gcflags...)
-> + GC = append(append([]string{gc, "-I", "_test"}, gcflags...),
-> "_testmain.go")
-> gl := os.Getenv("GL")
-> if gl == "" {
-> gl = O + "l"
->
->
->
-`,
- out: `From: Brad Fitzpatrick <bradfitz@golang.org>
-Date: Tue Oct 18 23:26:07 EDT 2011
-To: rsc@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
-Subject: Re: [golang-dev] code review 5297044: gotest: use $GCFLAGS like make does (issue 5297044)
-
-LGTM
-`,
- },
-}
-
-func TestShortText(t *testing.T) {
- for i, tt := range shortTextTests {
- if out := string(shortText([]byte(tt.in))); out != tt.out {
- t.Errorf("#%d: = %q, want %q\n", i, out, tt.out)
- }
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/rfc2045.txt b/vendor/github.com/mattermost/rsc/imap/rfc2045.txt
deleted file mode 100644
index 9f286b1a9..000000000
--- a/vendor/github.com/mattermost/rsc/imap/rfc2045.txt
+++ /dev/null
@@ -1,1739 +0,0 @@
-
-
-
-
-
-
-Network Working Group N. Freed
-Request for Comments: 2045 Innosoft
-Obsoletes: 1521, 1522, 1590 N. Borenstein
-Category: Standards Track First Virtual
- November 1996
-
-
- Multipurpose Internet Mail Extensions
- (MIME) Part One:
- Format of Internet Message Bodies
-
-Status of this Memo
-
- This document specifies an Internet standards track protocol for the
- Internet community, and requests discussion and suggestions for
- improvements. Please refer to the current edition of the "Internet
- Official Protocol Standards" (STD 1) for the standardization state
- and status of this protocol. Distribution of this memo is unlimited.
-
-Abstract
-
- STD 11, RFC 822, defines a message representation protocol specifying
- considerable detail about US-ASCII message headers, and leaves the
- message content, or message body, as flat US-ASCII text. This set of
- documents, collectively called the Multipurpose Internet Mail
- Extensions, or MIME, redefines the format of messages to allow for
-
- (1) textual message bodies in character sets other than
- US-ASCII,
-
- (2) an extensible set of different formats for non-textual
- message bodies,
-
- (3) multi-part message bodies, and
-
- (4) textual header information in character sets other than
- US-ASCII.
-
- These documents are based on earlier work documented in RFC 934, STD
- 11, and RFC 1049, but extends and revises them. Because RFC 822 said
- so little about message bodies, these documents are largely
- orthogonal to (rather than a revision of) RFC 822.
-
- This initial document specifies the various headers used to describe
- the structure of MIME messages. The second document, RFC 2046,
- defines the general structure of the MIME media typing system and
- defines an initial set of media types. The third document, RFC 2047,
- describes extensions to RFC 822 to allow non-US-ASCII text data in
-
-
-
-Freed & Borenstein Standards Track [Page 1]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- Internet mail header fields. The fourth document, RFC 2048, specifies
- various IANA registration procedures for MIME-related facilities. The
- fifth and final document, RFC 2049, describes MIME conformance
- criteria as well as providing some illustrative examples of MIME
- message formats, acknowledgements, and the bibliography.
-
- These documents are revisions of RFCs 1521, 1522, and 1590, which
- themselves were revisions of RFCs 1341 and 1342. An appendix in RFC
- 2049 describes differences and changes from previous versions.
-
-Table of Contents
-
- 1. Introduction ......................................... 3
- 2. Definitions, Conventions, and Generic BNF Grammar .... 5
- 2.1 CRLF ................................................ 5
- 2.2 Character Set ....................................... 6
- 2.3 Message ............................................. 6
- 2.4 Entity .............................................. 6
- 2.5 Body Part ........................................... 7
- 2.6 Body ................................................ 7
- 2.7 7bit Data ........................................... 7
- 2.8 8bit Data ........................................... 7
- 2.9 Binary Data ......................................... 7
- 2.10 Lines .............................................. 7
- 3. MIME Header Fields ................................... 8
- 4. MIME-Version Header Field ............................ 8
- 5. Content-Type Header Field ............................ 10
- 5.1 Syntax of the Content-Type Header Field ............. 12
- 5.2 Content-Type Defaults ............................... 14
- 6. Content-Transfer-Encoding Header Field ............... 14
- 6.1 Content-Transfer-Encoding Syntax .................... 14
- 6.2 Content-Transfer-Encodings Semantics ................ 15
- 6.3 New Content-Transfer-Encodings ...................... 16
- 6.4 Interpretation and Use .............................. 16
- 6.5 Translating Encodings ............................... 18
- 6.6 Canonical Encoding Model ............................ 19
- 6.7 Quoted-Printable Content-Transfer-Encoding .......... 19
- 6.8 Base64 Content-Transfer-Encoding .................... 24
- 7. Content-ID Header Field .............................. 26
- 8. Content-Description Header Field ..................... 27
- 9. Additional MIME Header Fields ........................ 27
- 10. Summary ............................................. 27
- 11. Security Considerations ............................. 27
- 12. Authors' Addresses .................................. 28
- A. Collected Grammar .................................... 29
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 2]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-1. Introduction
-
- Since its publication in 1982, RFC 822 has defined the standard
- format of textual mail messages on the Internet. Its success has
- been such that the RFC 822 format has been adopted, wholly or
- partially, well beyond the confines of the Internet and the Internet
- SMTP transport defined by RFC 821. As the format has seen wider use,
- a number of limitations have proven increasingly restrictive for the
- user community.
-
- RFC 822 was intended to specify a format for text messages. As such,
- non-text messages, such as multimedia messages that might include
- audio or images, are simply not mentioned. Even in the case of text,
- however, RFC 822 is inadequate for the needs of mail users whose
- languages require the use of character sets richer than US-ASCII.
- Since RFC 822 does not specify mechanisms for mail containing audio,
- video, Asian language text, or even text in most European languages,
- additional specifications are needed.
-
- One of the notable limitations of RFC 821/822 based mail systems is
- the fact that they limit the contents of electronic mail messages to
- relatively short lines (e.g. 1000 characters or less [RFC-821]) of
- 7bit US-ASCII. This forces users to convert any non-textual data
- that they may wish to send into seven-bit bytes representable as
- printable US-ASCII characters before invoking a local mail UA (User
- Agent, a program with which human users send and receive mail).
- Examples of such encodings currently used in the Internet include
- pure hexadecimal, uuencode, the 3-in-4 base 64 scheme specified in
- RFC 1421, the Andrew Toolkit Representation [ATK], and many others.
-
- The limitations of RFC 822 mail become even more apparent as gateways
- are designed to allow for the exchange of mail messages between RFC
- 822 hosts and X.400 hosts. X.400 [X400] specifies mechanisms for the
- inclusion of non-textual material within electronic mail messages.
- The current standards for the mapping of X.400 messages to RFC 822
- messages specify either that X.400 non-textual material must be
- converted to (not encoded in) IA5Text format, or that they must be
- discarded, notifying the RFC 822 user that discarding has occurred.
- This is clearly undesirable, as information that a user may wish to
- receive is lost. Even though a user agent may not have the
- capability of dealing with the non-textual material, the user might
- have some mechanism external to the UA that can extract useful
- information from the material. Moreover, it does not allow for the
- fact that the message may eventually be gatewayed back into an X.400
- message handling system (i.e., the X.400 message is "tunneled"
- through Internet mail), where the non-textual information would
- definitely become useful again.
-
-
-
-
-Freed & Borenstein Standards Track [Page 3]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- This document describes several mechanisms that combine to solve most
- of these problems without introducing any serious incompatibilities
- with the existing world of RFC 822 mail. In particular, it
- describes:
-
- (1) A MIME-Version header field, which uses a version
- number to declare a message to be conformant with MIME
- and allows mail processing agents to distinguish
- between such messages and those generated by older or
- non-conformant software, which are presumed to lack
- such a field.
-
- (2) A Content-Type header field, generalized from RFC 1049,
- which can be used to specify the media type and subtype
- of data in the body of a message and to fully specify
- the native representation (canonical form) of such
- data.
-
- (3) A Content-Transfer-Encoding header field, which can be
- used to specify both the encoding transformation that
- was applied to the body and the domain of the result.
- Encoding transformations other than the identity
- transformation are usually applied to data in order to
- allow it to pass through mail transport mechanisms
- which may have data or character set limitations.
-
- (4) Two additional header fields that can be used to
- further describe the data in a body, the Content-ID and
- Content-Description header fields.
-
- All of the header fields defined in this document are subject to the
- general syntactic rules for header fields specified in RFC 822. In
- particular, all of these header fields except for Content-Disposition
- can include RFC 822 comments, which have no semantic content and
- should be ignored during MIME processing.
-
- Finally, to specify and promote interoperability, RFC 2049 provides a
- basic applicability statement for a subset of the above mechanisms
- that defines a minimal level of "conformance" with this document.
-
- HISTORICAL NOTE: Several of the mechanisms described in this set of
- documents may seem somewhat strange or even baroque at first reading.
- It is important to note that compatibility with existing standards
- AND robustness across existing practice were two of the highest
- priorities of the working group that developed this set of documents.
- In particular, compatibility was always favored over elegance.
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 4]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- Please refer to the current edition of the "Internet Official
- Protocol Standards" for the standardization state and status of this
- protocol. RFC 822 and STD 3, RFC 1123 also provide essential
- background for MIME since no conforming implementation of MIME can
- violate them. In addition, several other informational RFC documents
- will be of interest to the MIME implementor, in particular RFC 1344,
- RFC 1345, and RFC 1524.
-
-2. Definitions, Conventions, and Generic BNF Grammar
-
- Although the mechanisms specified in this set of documents are all
- described in prose, most are also described formally in the augmented
- BNF notation of RFC 822. Implementors will need to be familiar with
- this notation in order to understand this set of documents, and are
- referred to RFC 822 for a complete explanation of the augmented BNF
- notation.
-
- Some of the augmented BNF in this set of documents makes named
- references to syntax rules defined in RFC 822. A complete formal
- grammar, then, is obtained by combining the collected grammar
- appendices in each document in this set with the BNF of RFC 822 plus
- the modifications to RFC 822 defined in RFC 1123 (which specifically
- changes the syntax for `return', `date' and `mailbox').
-
- All numeric and octet values are given in decimal notation in this
- set of documents. All media type values, subtype values, and
- parameter names as defined are case-insensitive. However, parameter
- values are case-sensitive unless otherwise specified for the specific
- parameter.
-
- FORMATTING NOTE: Notes, such at this one, provide additional
- nonessential information which may be skipped by the reader without
- missing anything essential. The primary purpose of these non-
- essential notes is to convey information about the rationale of this
- set of documents, or to place these documents in the proper
- historical or evolutionary context. Such information may in
- particular be skipped by those who are focused entirely on building a
- conformant implementation, but may be of use to those who wish to
- understand why certain design choices were made.
-
-2.1. CRLF
-
- The term CRLF, in this set of documents, refers to the sequence of
- octets corresponding to the two US-ASCII characters CR (decimal value
- 13) and LF (decimal value 10) which, taken together, in this order,
- denote a line break in RFC 822 mail.
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 5]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-2.2. Character Set
-
- The term "character set" is used in MIME to refer to a method of
- converting a sequence of octets into a sequence of characters. Note
- that unconditional and unambiguous conversion in the other direction
- is not required, in that not all characters may be representable by a
- given character set and a character set may provide more than one
- sequence of octets to represent a particular sequence of characters.
-
- This definition is intended to allow various kinds of character
- encodings, from simple single-table mappings such as US-ASCII to
- complex table switching methods such as those that use ISO 2022's
- techniques, to be used as character sets. However, the definition
- associated with a MIME character set name must fully specify the
- mapping to be performed. In particular, use of external profiling
- information to determine the exact mapping is not permitted.
-
- NOTE: The term "character set" was originally to describe such
- straightforward schemes as US-ASCII and ISO-8859-1 which have a
- simple one-to-one mapping from single octets to single characters.
- Multi-octet coded character sets and switching techniques make the
- situation more complex. For example, some communities use the term
- "character encoding" for what MIME calls a "character set", while
- using the phrase "coded character set" to denote an abstract mapping
- from integers (not octets) to characters.
-
-2.3. Message
-
- The term "message", when not further qualified, means either a
- (complete or "top-level") RFC 822 message being transferred on a
- network, or a message encapsulated in a body of type "message/rfc822"
- or "message/partial".
-
-2.4. Entity
-
- The term "entity", refers specifically to the MIME-defined header
- fields and contents of either a message or one of the parts in the
- body of a multipart entity. The specification of such entities is
- the essence of MIME. Since the contents of an entity are often
- called the "body", it makes sense to speak about the body of an
- entity. Any sort of field may be present in the header of an entity,
- but only those fields whose names begin with "content-" actually have
- any MIME-related meaning. Note that this does NOT imply thay they
- have no meaning at all -- an entity that is also a message has non-
- MIME header fields whose meanings are defined by RFC 822.
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 6]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-2.5. Body Part
-
- The term "body part" refers to an entity inside of a multipart
- entity.
-
-2.6. Body
-
- The term "body", when not further qualified, means the body of an
- entity, that is, the body of either a message or of a body part.
-
- NOTE: The previous four definitions are clearly circular. This is
- unavoidable, since the overall structure of a MIME message is indeed
- recursive.
-
-2.7. 7bit Data
-
- "7bit data" refers to data that is all represented as relatively
- short lines with 998 octets or less between CRLF line separation
- sequences [RFC-821]. No octets with decimal values greater than 127
- are allowed and neither are NULs (octets with decimal value 0). CR
- (decimal value 13) and LF (decimal value 10) octets only occur as
- part of CRLF line separation sequences.
-
-2.8. 8bit Data
-
- "8bit data" refers to data that is all represented as relatively
- short lines with 998 octets or less between CRLF line separation
- sequences [RFC-821]), but octets with decimal values greater than 127
- may be used. As with "7bit data" CR and LF octets only occur as part
- of CRLF line separation sequences and no NULs are allowed.
-
-2.9. Binary Data
-
- "Binary data" refers to data where any sequence of octets whatsoever
- is allowed.
-
-2.10. Lines
-
- "Lines" are defined as sequences of octets separated by a CRLF
- sequences. This is consistent with both RFC 821 and RFC 822.
- "Lines" only refers to a unit of data in a message, which may or may
- not correspond to something that is actually displayed by a user
- agent.
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 7]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-3. MIME Header Fields
-
- MIME defines a number of new RFC 822 header fields that are used to
- describe the content of a MIME entity. These header fields occur in
- at least two contexts:
-
- (1) As part of a regular RFC 822 message header.
-
- (2) In a MIME body part header within a multipart
- construct.
-
- The formal definition of these header fields is as follows:
-
- entity-headers := [ content CRLF ]
- [ encoding CRLF ]
- [ id CRLF ]
- [ description CRLF ]
- *( MIME-extension-field CRLF )
-
- MIME-message-headers := entity-headers
- fields
- version CRLF
- ; The ordering of the header
- ; fields implied by this BNF
- ; definition should be ignored.
-
- MIME-part-headers := entity-headers
- [ fields ]
- ; Any field not beginning with
- ; "content-" can have no defined
- ; meaning and may be ignored.
- ; The ordering of the header
- ; fields implied by this BNF
- ; definition should be ignored.
-
- The syntax of the various specific MIME header fields will be
- described in the following sections.
-
-4. MIME-Version Header Field
-
- Since RFC 822 was published in 1982, there has really been only one
- format standard for Internet messages, and there has been little
- perceived need to declare the format standard in use. This document
- is an independent specification that complements RFC 822. Although
- the extensions in this document have been defined in such a way as to
- be compatible with RFC 822, there are still circumstances in which it
- might be desirable for a mail-processing agent to know whether a
- message was composed with the new standard in mind.
-
-
-
-Freed & Borenstein Standards Track [Page 8]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- Therefore, this document defines a new header field, "MIME-Version",
- which is to be used to declare the version of the Internet message
- body format standard in use.
-
- Messages composed in accordance with this document MUST include such
- a header field, with the following verbatim text:
-
- MIME-Version: 1.0
-
- The presence of this header field is an assertion that the message
- has been composed in compliance with this document.
-
- Since it is possible that a future document might extend the message
- format standard again, a formal BNF is given for the content of the
- MIME-Version field:
-
- version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT
-
- Thus, future format specifiers, which might replace or extend "1.0",
- are constrained to be two integer fields, separated by a period. If
- a message is received with a MIME-version value other than "1.0", it
- cannot be assumed to conform with this document.
-
- Note that the MIME-Version header field is required at the top level
- of a message. It is not required for each body part of a multipart
- entity. It is required for the embedded headers of a body of type
- "message/rfc822" or "message/partial" if and only if the embedded
- message is itself claimed to be MIME-conformant.
-
- It is not possible to fully specify how a mail reader that conforms
- with MIME as defined in this document should treat a message that
- might arrive in the future with some value of MIME-Version other than
- "1.0".
-
- It is also worth noting that version control for specific media types
- is not accomplished using the MIME-Version mechanism. In particular,
- some formats (such as application/postscript) have version numbering
- conventions that are internal to the media format. Where such
- conventions exist, MIME does nothing to supersede them. Where no
- such conventions exist, a MIME media type might use a "version"
- parameter in the content-type field if necessary.
-
-
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 9]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- NOTE TO IMPLEMENTORS: When checking MIME-Version values any RFC 822
- comment strings that are present must be ignored. In particular, the
- following four MIME-Version fields are equivalent:
-
- MIME-Version: 1.0
-
- MIME-Version: 1.0 (produced by MetaSend Vx.x)
-
- MIME-Version: (produced by MetaSend Vx.x) 1.0
-
- MIME-Version: 1.(produced by MetaSend Vx.x)0
-
- In the absence of a MIME-Version field, a receiving mail user agent
- (whether conforming to MIME requirements or not) may optionally
- choose to interpret the body of the message according to local
- conventions. Many such conventions are currently in use and it
- should be noted that in practice non-MIME messages can contain just
- about anything.
-
- It is impossible to be certain that a non-MIME mail message is
- actually plain text in the US-ASCII character set since it might well
- be a message that, using some set of nonstandard local conventions
- that predate MIME, includes text in another character set or non-
- textual data presented in a manner that cannot be automatically
- recognized (e.g., a uuencoded compressed UNIX tar file).
-
-5. Content-Type Header Field
-
- The purpose of the Content-Type field is to describe the data
- contained in the body fully enough that the receiving user agent can
- pick an appropriate agent or mechanism to present the data to the
- user, or otherwise deal with the data in an appropriate manner. The
- value in this field is called a media type.
-
- HISTORICAL NOTE: The Content-Type header field was first defined in
- RFC 1049. RFC 1049 used a simpler and less powerful syntax, but one
- that is largely compatible with the mechanism given here.
-
- The Content-Type header field specifies the nature of the data in the
- body of an entity by giving media type and subtype identifiers, and
- by providing auxiliary information that may be required for certain
- media types. After the media type and subtype names, the remainder
- of the header field is simply a set of parameters, specified in an
- attribute=value notation. The ordering of parameters is not
- significant.
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 10]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- In general, the top-level media type is used to declare the general
- type of data, while the subtype specifies a specific format for that
- type of data. Thus, a media type of "image/xyz" is enough to tell a
- user agent that the data is an image, even if the user agent has no
- knowledge of the specific image format "xyz". Such information can
- be used, for example, to decide whether or not to show a user the raw
- data from an unrecognized subtype -- such an action might be
- reasonable for unrecognized subtypes of text, but not for
- unrecognized subtypes of image or audio. For this reason, registered
- subtypes of text, image, audio, and video should not contain embedded
- information that is really of a different type. Such compound
- formats should be represented using the "multipart" or "application"
- types.
-
- Parameters are modifiers of the media subtype, and as such do not
- fundamentally affect the nature of the content. The set of
- meaningful parameters depends on the media type and subtype. Most
- parameters are associated with a single specific subtype. However, a
- given top-level media type may define parameters which are applicable
- to any subtype of that type. Parameters may be required by their
- defining content type or subtype or they may be optional. MIME
- implementations must ignore any parameters whose names they do not
- recognize.
-
- For example, the "charset" parameter is applicable to any subtype of
- "text", while the "boundary" parameter is required for any subtype of
- the "multipart" media type.
-
- There are NO globally-meaningful parameters that apply to all media
- types. Truly global mechanisms are best addressed, in the MIME
- model, by the definition of additional Content-* header fields.
-
- An initial set of seven top-level media types is defined in RFC 2046.
- Five of these are discrete types whose content is essentially opaque
- as far as MIME processing is concerned. The remaining two are
- composite types whose contents require additional handling by MIME
- processors.
-
- This set of top-level media types is intended to be substantially
- complete. It is expected that additions to the larger set of
- supported types can generally be accomplished by the creation of new
- subtypes of these initial types. In the future, more top-level types
- may be defined only by a standards-track extension to this standard.
- If another top-level type is to be used for any reason, it must be
- given a name starting with "X-" to indicate its non-standard status
- and to avoid a potential conflict with a future official name.
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 11]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-5.1. Syntax of the Content-Type Header Field
-
- In the Augmented BNF notation of RFC 822, a Content-Type header field
- value is defined as follows:
-
- content := "Content-Type" ":" type "/" subtype
- *(";" parameter)
- ; Matching of media type and subtype
- ; is ALWAYS case-insensitive.
-
- type := discrete-type / composite-type
-
- discrete-type := "text" / "image" / "audio" / "video" /
- "application" / extension-token
-
- composite-type := "message" / "multipart" / extension-token
-
- extension-token := ietf-token / x-token
-
- ietf-token := <An extension token defined by a
- standards-track RFC and registered
- with IANA.>
-
- x-token := <The two characters "X-" or "x-" followed, with
- no intervening white space, by any token>
-
- subtype := extension-token / iana-token
-
- iana-token := <A publicly-defined extension token. Tokens
- of this form must be registered with IANA
- as specified in RFC 2048.>
-
- parameter := attribute "=" value
-
- attribute := token
- ; Matching of attributes
- ; is ALWAYS case-insensitive.
-
- value := token / quoted-string
-
- token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
- or tspecials>
-
- tspecials := "(" / ")" / "<" / ">" / "@" /
- "," / ";" / ":" / "\" / <">
- "/" / "[" / "]" / "?" / "="
- ; Must be in quoted-string,
- ; to use within parameter values
-
-
-
-Freed & Borenstein Standards Track [Page 12]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- Note that the definition of "tspecials" is the same as the RFC 822
- definition of "specials" with the addition of the three characters
- "/", "?", and "=", and the removal of ".".
-
- Note also that a subtype specification is MANDATORY -- it may not be
- omitted from a Content-Type header field. As such, there are no
- default subtypes.
-
- The type, subtype, and parameter names are not case sensitive. For
- example, TEXT, Text, and TeXt are all equivalent top-level media
- types. Parameter values are normally case sensitive, but sometimes
- are interpreted in a case-insensitive fashion, depending on the
- intended use. (For example, multipart boundaries are case-sensitive,
- but the "access-type" parameter for message/External-body is not
- case-sensitive.)
-
- Note that the value of a quoted string parameter does not include the
- quotes. That is, the quotation marks in a quoted-string are not a
- part of the value of the parameter, but are merely used to delimit
- that parameter value. In addition, comments are allowed in
- accordance with RFC 822 rules for structured header fields. Thus the
- following two forms
-
- Content-type: text/plain; charset=us-ascii (Plain text)
-
- Content-type: text/plain; charset="us-ascii"
-
- are completely equivalent.
-
- Beyond this syntax, the only syntactic constraint on the definition
- of subtype names is the desire that their uses must not conflict.
- That is, it would be undesirable to have two different communities
- using "Content-Type: application/foobar" to mean two different
- things. The process of defining new media subtypes, then, is not
- intended to be a mechanism for imposing restrictions, but simply a
- mechanism for publicizing their definition and usage. There are,
- therefore, two acceptable mechanisms for defining new media subtypes:
-
- (1) Private values (starting with "X-") may be defined
- bilaterally between two cooperating agents without
- outside registration or standardization. Such values
- cannot be registered or standardized.
-
- (2) New standard values should be registered with IANA as
- described in RFC 2048.
-
- The second document in this set, RFC 2046, defines the initial set of
- media types for MIME.
-
-
-
-Freed & Borenstein Standards Track [Page 13]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-5.2. Content-Type Defaults
-
- Default RFC 822 messages without a MIME Content-Type header are taken
- by this protocol to be plain text in the US-ASCII character set,
- which can be explicitly specified as:
-
- Content-type: text/plain; charset=us-ascii
-
- This default is assumed if no Content-Type header field is specified.
- It is also recommend that this default be assumed when a
- syntactically invalid Content-Type header field is encountered. In
- the presence of a MIME-Version header field and the absence of any
- Content-Type header field, a receiving User Agent can also assume
- that plain US-ASCII text was the sender's intent. Plain US-ASCII
- text may still be assumed in the absence of a MIME-Version or the
- presence of an syntactically invalid Content-Type header field, but
- the sender's intent might have been otherwise.
-
-6. Content-Transfer-Encoding Header Field
-
- Many media types which could be usefully transported via email are
- represented, in their "natural" format, as 8bit character or binary
- data. Such data cannot be transmitted over some transfer protocols.
- For example, RFC 821 (SMTP) restricts mail messages to 7bit US-ASCII
- data with lines no longer than 1000 characters including any trailing
- CRLF line separator.
-
- It is necessary, therefore, to define a standard mechanism for
- encoding such data into a 7bit short line format. Proper labelling
- of unencoded material in less restrictive formats for direct use over
- less restrictive transports is also desireable. This document
- specifies that such encodings will be indicated by a new "Content-
- Transfer-Encoding" header field. This field has not been defined by
- any previous standard.
-
-6.1. Content-Transfer-Encoding Syntax
-
- The Content-Transfer-Encoding field's value is a single token
- specifying the type of encoding, as enumerated below. Formally:
-
- encoding := "Content-Transfer-Encoding" ":" mechanism
-
- mechanism := "7bit" / "8bit" / "binary" /
- "quoted-printable" / "base64" /
- ietf-token / x-token
-
- These values are not case sensitive -- Base64 and BASE64 and bAsE64
- are all equivalent. An encoding type of 7BIT requires that the body
-
-
-
-Freed & Borenstein Standards Track [Page 14]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- is already in a 7bit mail-ready representation. This is the default
- value -- that is, "Content-Transfer-Encoding: 7BIT" is assumed if the
- Content-Transfer-Encoding header field is not present.
-
-6.2. Content-Transfer-Encodings Semantics
-
- This single Content-Transfer-Encoding token actually provides two
- pieces of information. It specifies what sort of encoding
- transformation the body was subjected to and hence what decoding
- operation must be used to restore it to its original form, and it
- specifies what the domain of the result is.
-
- The transformation part of any Content-Transfer-Encodings specifies,
- either explicitly or implicitly, a single, well-defined decoding
- algorithm, which for any sequence of encoded octets either transforms
- it to the original sequence of octets which was encoded, or shows
- that it is illegal as an encoded sequence. Content-Transfer-
- Encodings transformations never depend on any additional external
- profile information for proper operation. Note that while decoders
- must produce a single, well-defined output for a valid encoding no
- such restrictions exist for encoders: Encoding a given sequence of
- octets to different, equivalent encoded sequences is perfectly legal.
-
- Three transformations are currently defined: identity, the "quoted-
- printable" encoding, and the "base64" encoding. The domains are
- "binary", "8bit" and "7bit".
-
- The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all
- mean that the identity (i.e. NO) encoding transformation has been
- performed. As such, they serve simply as indicators of the domain of
- the body data, and provide useful information about the sort of
- encoding that might be needed for transmission in a given transport
- system. The terms "7bit data", "8bit data", and "binary data" are
- all defined in Section 2.
-
- The quoted-printable and base64 encodings transform their input from
- an arbitrary domain into material in the "7bit" range, thus making it
- safe to carry over restricted transports. The specific definition of
- the transformations are given below.
-
- The proper Content-Transfer-Encoding label must always be used.
- Labelling unencoded data containing 8bit characters as "7bit" is not
- allowed, nor is labelling unencoded non-line-oriented data as
- anything other than "binary" allowed.
-
- Unlike media subtypes, a proliferation of Content-Transfer-Encoding
- values is both undesirable and unnecessary. However, establishing
- only a single transformation into the "7bit" domain does not seem
-
-
-
-Freed & Borenstein Standards Track [Page 15]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- possible. There is a tradeoff between the desire for a compact and
- efficient encoding of largely- binary data and the desire for a
- somewhat readable encoding of data that is mostly, but not entirely,
- 7bit. For this reason, at least two encoding mechanisms are
- necessary: a more or less readable encoding (quoted-printable) and a
- "dense" or "uniform" encoding (base64).
-
- Mail transport for unencoded 8bit data is defined in RFC 1652. As of
- the initial publication of this document, there are no standardized
- Internet mail transports for which it is legitimate to include
- unencoded binary data in mail bodies. Thus there are no
- circumstances in which the "binary" Content-Transfer-Encoding is
- actually valid in Internet mail. However, in the event that binary
- mail transport becomes a reality in Internet mail, or when MIME is
- used in conjunction with any other binary-capable mail transport
- mechanism, binary bodies must be labelled as such using this
- mechanism.
-
- NOTE: The five values defined for the Content-Transfer-Encoding field
- imply nothing about the media type other than the algorithm by which
- it was encoded or the transport system requirements if unencoded.
-
-6.3. New Content-Transfer-Encodings
-
- Implementors may, if necessary, define private Content-Transfer-
- Encoding values, but must use an x-token, which is a name prefixed by
- "X-", to indicate its non-standard status, e.g., "Content-Transfer-
- Encoding: x-my-new-encoding". Additional standardized Content-
- Transfer-Encoding values must be specified by a standards-track RFC.
- The requirements such specifications must meet are given in RFC 2048.
- As such, all content-transfer-encoding namespace except that
- beginning with "X-" is explicitly reserved to the IETF for future
- use.
-
- Unlike media types and subtypes, the creation of new Content-
- Transfer-Encoding values is STRONGLY discouraged, as it seems likely
- to hinder interoperability with little potential benefit
-
-6.4. Interpretation and Use
-
- If a Content-Transfer-Encoding header field appears as part of a
- message header, it applies to the entire body of that message. If a
- Content-Transfer-Encoding header field appears as part of an entity's
- headers, it applies only to the body of that entity. If an entity is
- of type "multipart" the Content-Transfer-Encoding is not permitted to
- have any value other than "7bit", "8bit" or "binary". Even more
- severe restrictions apply to some subtypes of the "message" type.
-
-
-
-
-Freed & Borenstein Standards Track [Page 16]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- It should be noted that most media types are defined in terms of
- octets rather than bits, so that the mechanisms described here are
- mechanisms for encoding arbitrary octet streams, not bit streams. If
- a bit stream is to be encoded via one of these mechanisms, it must
- first be converted to an 8bit byte stream using the network standard
- bit order ("big-endian"), in which the earlier bits in a stream
- become the higher-order bits in a 8bit byte. A bit stream not ending
- at an 8bit boundary must be padded with zeroes. RFC 2046 provides a
- mechanism for noting the addition of such padding in the case of the
- application/octet-stream media type, which has a "padding" parameter.
-
- The encoding mechanisms defined here explicitly encode all data in
- US-ASCII. Thus, for example, suppose an entity has header fields
- such as:
-
- Content-Type: text/plain; charset=ISO-8859-1
- Content-transfer-encoding: base64
-
- This must be interpreted to mean that the body is a base64 US-ASCII
- encoding of data that was originally in ISO-8859-1, and will be in
- that character set again after decoding.
-
- Certain Content-Transfer-Encoding values may only be used on certain
- media types. In particular, it is EXPRESSLY FORBIDDEN to use any
- encodings other than "7bit", "8bit", or "binary" with any composite
- media type, i.e. one that recursively includes other Content-Type
- fields. Currently the only composite media types are "multipart" and
- "message". All encodings that are desired for bodies of type
- multipart or message must be done at the innermost level, by encoding
- the actual body that needs to be encoded.
-
- It should also be noted that, by definition, if a composite entity
- has a transfer-encoding value such as "7bit", but one of the enclosed
- entities has a less restrictive value such as "8bit", then either the
- outer "7bit" labelling is in error, because 8bit data are included,
- or the inner "8bit" labelling placed an unnecessarily high demand on
- the transport system because the actual included data were actually
- 7bit-safe.
-
- NOTE ON ENCODING RESTRICTIONS: Though the prohibition against using
- content-transfer-encodings on composite body data may seem overly
- restrictive, it is necessary to prevent nested encodings, in which
- data are passed through an encoding algorithm multiple times, and
- must be decoded multiple times in order to be properly viewed.
- Nested encodings add considerable complexity to user agents: Aside
- from the obvious efficiency problems with such multiple encodings,
- they can obscure the basic structure of a message. In particular,
- they can imply that several decoding operations are necessary simply
-
-
-
-Freed & Borenstein Standards Track [Page 17]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- to find out what types of bodies a message contains. Banning nested
- encodings may complicate the job of certain mail gateways, but this
- seems less of a problem than the effect of nested encodings on user
- agents.
-
- Any entity with an unrecognized Content-Transfer-Encoding must be
- treated as if it has a Content-Type of "application/octet-stream",
- regardless of what the Content-Type header field actually says.
-
- NOTE ON THE RELATIONSHIP BETWEEN CONTENT-TYPE AND CONTENT-TRANSFER-
- ENCODING: It may seem that the Content-Transfer-Encoding could be
- inferred from the characteristics of the media that is to be encoded,
- or, at the very least, that certain Content-Transfer-Encodings could
- be mandated for use with specific media types. There are several
- reasons why this is not the case. First, given the varying types of
- transports used for mail, some encodings may be appropriate for some
- combinations of media types and transports but not for others. (For
- example, in an 8bit transport, no encoding would be required for text
- in certain character sets, while such encodings are clearly required
- for 7bit SMTP.)
-
- Second, certain media types may require different types of transfer
- encoding under different circumstances. For example, many PostScript
- bodies might consist entirely of short lines of 7bit data and hence
- require no encoding at all. Other PostScript bodies (especially
- those using Level 2 PostScript's binary encoding mechanism) may only
- be reasonably represented using a binary transport encoding.
- Finally, since the Content-Type field is intended to be an open-ended
- specification mechanism, strict specification of an association
- between media types and encodings effectively couples the
- specification of an application protocol with a specific lower-level
- transport. This is not desirable since the developers of a media
- type should not have to be aware of all the transports in use and
- what their limitations are.
-
-6.5. Translating Encodings
-
- The quoted-printable and base64 encodings are designed so that
- conversion between them is possible. The only issue that arises in
- such a conversion is the handling of hard line breaks in quoted-
- printable encoding output. When converting from quoted-printable to
- base64 a hard line break in the quoted-printable form represents a
- CRLF sequence in the canonical form of the data. It must therefore be
- converted to a corresponding encoded CRLF in the base64 form of the
- data. Similarly, a CRLF sequence in the canonical form of the data
- obtained after base64 decoding must be converted to a quoted-
- printable hard line break, but ONLY when converting text data.
-
-
-
-
-Freed & Borenstein Standards Track [Page 18]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-6.6. Canonical Encoding Model
-
- There was some confusion, in the previous versions of this RFC,
- regarding the model for when email data was to be converted to
- canonical form and encoded, and in particular how this process would
- affect the treatment of CRLFs, given that the representation of
- newlines varies greatly from system to system, and the relationship
- between content-transfer-encodings and character sets. A canonical
- model for encoding is presented in RFC 2049 for this reason.
-
-6.7. Quoted-Printable Content-Transfer-Encoding
-
- The Quoted-Printable encoding is intended to represent data that
- largely consists of octets that correspond to printable characters in
- the US-ASCII character set. It encodes the data in such a way that
- the resulting octets are unlikely to be modified by mail transport.
- If the data being encoded are mostly US-ASCII text, the encoded form
- of the data remains largely recognizable by humans. A body which is
- entirely US-ASCII may also be encoded in Quoted-Printable to ensure
- the integrity of the data should the message pass through a
- character-translating, and/or line-wrapping gateway.
-
- In this encoding, octets are to be represented as determined by the
- following rules:
-
- (1) (General 8bit representation) Any octet, except a CR or
- LF that is part of a CRLF line break of the canonical
- (standard) form of the data being encoded, may be
- represented by an "=" followed by a two digit
- hexadecimal representation of the octet's value. The
- digits of the hexadecimal alphabet, for this purpose,
- are "0123456789ABCDEF". Uppercase letters must be
- used; lowercase letters are not allowed. Thus, for
- example, the decimal value 12 (US-ASCII form feed) can
- be represented by "=0C", and the decimal value 61 (US-
- ASCII EQUAL SIGN) can be represented by "=3D". This
- rule must be followed except when the following rules
- allow an alternative encoding.
-
- (2) (Literal representation) Octets with decimal values of
- 33 through 60 inclusive, and 62 through 126, inclusive,
- MAY be represented as the US-ASCII characters which
- correspond to those octets (EXCLAMATION POINT through
- LESS THAN, and GREATER THAN through TILDE,
- respectively).
-
- (3) (White Space) Octets with values of 9 and 32 MAY be
- represented as US-ASCII TAB (HT) and SPACE characters,
-
-
-
-Freed & Borenstein Standards Track [Page 19]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- respectively, but MUST NOT be so represented at the end
- of an encoded line. Any TAB (HT) or SPACE characters
- on an encoded line MUST thus be followed on that line
- by a printable character. In particular, an "=" at the
- end of an encoded line, indicating a soft line break
- (see rule #5) may follow one or more TAB (HT) or SPACE
- characters. It follows that an octet with decimal
- value 9 or 32 appearing at the end of an encoded line
- must be represented according to Rule #1. This rule is
- necessary because some MTAs (Message Transport Agents,
- programs which transport messages from one user to
- another, or perform a portion of such transfers) are
- known to pad lines of text with SPACEs, and others are
- known to remove "white space" characters from the end
- of a line. Therefore, when decoding a Quoted-Printable
- body, any trailing white space on a line must be
- deleted, as it will necessarily have been added by
- intermediate transport agents.
-
- (4) (Line Breaks) A line break in a text body, represented
- as a CRLF sequence in the text canonical form, must be
- represented by a (RFC 822) line break, which is also a
- CRLF sequence, in the Quoted-Printable encoding. Since
- the canonical representation of media types other than
- text do not generally include the representation of
- line breaks as CRLF sequences, no hard line breaks
- (i.e. line breaks that are intended to be meaningful
- and to be displayed to the user) can occur in the
- quoted-printable encoding of such types. Sequences
- like "=0D", "=0A", "=0A=0D" and "=0D=0A" will routinely
- appear in non-text data represented in quoted-
- printable, of course.
-
- Note that many implementations may elect to encode the
- local representation of various content types directly
- rather than converting to canonical form first,
- encoding, and then converting back to local
- representation. In particular, this may apply to plain
- text material on systems that use newline conventions
- other than a CRLF terminator sequence. Such an
- implementation optimization is permissible, but only
- when the combined canonicalization-encoding step is
- equivalent to performing the three steps separately.
-
- (5) (Soft Line Breaks) The Quoted-Printable encoding
- REQUIRES that encoded lines be no more than 76
- characters long. If longer lines are to be encoded
- with the Quoted-Printable encoding, "soft" line breaks
-
-
-
-Freed & Borenstein Standards Track [Page 20]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- must be used. An equal sign as the last character on a
- encoded line indicates such a non-significant ("soft")
- line break in the encoded text.
-
- Thus if the "raw" form of the line is a single unencoded line that
- says:
-
- Now's the time for all folk to come to the aid of their country.
-
- This can be represented, in the Quoted-Printable encoding, as:
-
- Now's the time =
- for all folk to come=
- to the aid of their country.
-
- This provides a mechanism with which long lines are encoded in such a
- way as to be restored by the user agent. The 76 character limit does
- not count the trailing CRLF, but counts all other characters,
- including any equal signs.
-
- Since the hyphen character ("-") may be represented as itself in the
- Quoted-Printable encoding, care must be taken, when encapsulating a
- quoted-printable encoded body inside one or more multipart entities,
- to ensure that the boundary delimiter does not appear anywhere in the
- encoded body. (A good strategy is to choose a boundary that includes
- a character sequence such as "=_" which can never appear in a
- quoted-printable body. See the definition of multipart messages in
- RFC 2046.)
-
- NOTE: The quoted-printable encoding represents something of a
- compromise between readability and reliability in transport. Bodies
- encoded with the quoted-printable encoding will work reliably over
- most mail gateways, but may not work perfectly over a few gateways,
- notably those involving translation into EBCDIC. A higher level of
- confidence is offered by the base64 Content-Transfer-Encoding. A way
- to get reasonably reliable transport through EBCDIC gateways is to
- also quote the US-ASCII characters
-
- !"#$@[\]^`{|}~
-
- according to rule #1.
-
- Because quoted-printable data is generally assumed to be line-
- oriented, it is to be expected that the representation of the breaks
- between the lines of quoted-printable data may be altered in
- transport, in the same manner that plain text mail has always been
- altered in Internet mail when passing between systems with differing
- newline conventions. If such alterations are likely to constitute a
-
-
-
-Freed & Borenstein Standards Track [Page 21]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- corruption of the data, it is probably more sensible to use the
- base64 encoding rather than the quoted-printable encoding.
-
- NOTE: Several kinds of substrings cannot be generated according to
- the encoding rules for the quoted-printable content-transfer-
- encoding, and hence are formally illegal if they appear in the output
- of a quoted-printable encoder. This note enumerates these cases and
- suggests ways to handle such illegal substrings if any are
- encountered in quoted-printable data that is to be decoded.
-
- (1) An "=" followed by two hexadecimal digits, one or both
- of which are lowercase letters in "abcdef", is formally
- illegal. A robust implementation might choose to
- recognize them as the corresponding uppercase letters.
-
- (2) An "=" followed by a character that is neither a
- hexadecimal digit (including "abcdef") nor the CR
- character of a CRLF pair is illegal. This case can be
- the result of US-ASCII text having been included in a
- quoted-printable part of a message without itself
- having been subjected to quoted-printable encoding. A
- reasonable approach by a robust implementation might be
- to include the "=" character and the following
- character in the decoded data without any
- transformation and, if possible, indicate to the user
- that proper decoding was not possible at this point in
- the data.
-
- (3) An "=" cannot be the ultimate or penultimate character
- in an encoded object. This could be handled as in case
- (2) above.
-
- (4) Control characters other than TAB, or CR and LF as
- parts of CRLF pairs, must not appear. The same is true
- for octets with decimal values greater than 126. If
- found in incoming quoted-printable data by a decoder, a
- robust implementation might exclude them from the
- decoded data and warn the user that illegal characters
- were discovered.
-
- (5) Encoded lines must not be longer than 76 characters,
- not counting the trailing CRLF. If longer lines are
- found in incoming, encoded data, a robust
- implementation might nevertheless decode the lines, and
- might report the erroneous encoding to the user.
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 22]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- WARNING TO IMPLEMENTORS: If binary data is encoded in quoted-
- printable, care must be taken to encode CR and LF characters as "=0D"
- and "=0A", respectively. In particular, a CRLF sequence in binary
- data should be encoded as "=0D=0A". Otherwise, if CRLF were
- represented as a hard line break, it might be incorrectly decoded on
- platforms with different line break conventions.
-
- For formalists, the syntax of quoted-printable data is described by
- the following grammar:
-
- quoted-printable := qp-line *(CRLF qp-line)
-
- qp-line := *(qp-segment transport-padding CRLF)
- qp-part transport-padding
-
- qp-part := qp-section
- ; Maximum length of 76 characters
-
- qp-segment := qp-section *(SPACE / TAB) "="
- ; Maximum length of 76 characters
-
- qp-section := [*(ptext / SPACE / TAB) ptext]
-
- ptext := hex-octet / safe-char
-
- safe-char := <any octet with decimal value of 33 through
- 60 inclusive, and 62 through 126>
- ; Characters not listed as "mail-safe" in
- ; RFC 2049 are also not recommended.
-
- hex-octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
- ; Octet must be used for characters > 127, =,
- ; SPACEs or TABs at the ends of lines, and is
- ; recommended for any character not listed in
- ; RFC 2049 as "mail-safe".
-
- transport-padding := *LWSP-char
- ; Composers MUST NOT generate
- ; non-zero length transport
- ; padding, but receivers MUST
- ; be able to handle padding
- ; added by message transports.
-
- IMPORTANT: The addition of LWSP between the elements shown in this
- BNF is NOT allowed since this BNF does not specify a structured
- header field.
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 23]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-6.8. Base64 Content-Transfer-Encoding
-
- The Base64 Content-Transfer-Encoding is designed to represent
- arbitrary sequences of octets in a form that need not be humanly
- readable. The encoding and decoding algorithms are simple, but the
- encoded data are consistently only about 33 percent larger than the
- unencoded data. This encoding is virtually identical to the one used
- in Privacy Enhanced Mail (PEM) applications, as defined in RFC 1421.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- NOTE: This subset has the important property that it is represented
- identically in all versions of ISO 646, including US-ASCII, and all
- characters in the subset are also represented identically in all
- versions of EBCDIC. Other popular encodings, such as the encoding
- used by the uuencode utility, Macintosh binhex 4.0 [RFC-1741], and
- the base85 encoding specified as part of Level 2 PostScript, do not
- share these properties, and thus do not fulfill the portability
- requirements a binary transport encoding for mail must meet.
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
- When encoding a bit stream via the base64 encoding, the bit stream
- must be presumed to be ordered with the most-significant-bit first.
- That is, the first bit in the stream will be the high-order bit in
- the first 8bit byte, and the eighth bit will be the low-order bit in
- the first 8bit byte, and so on.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string. These characters, identified in Table 1, below, are
- selected so as to be universally representable, and the set excludes
- characters with particular significance to SMTP (e.g., ".", CR, LF)
- and to the multipart boundary delimiters defined in RFC 2046 (e.g.,
- "-").
-
-
-
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 24]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- The encoded output stream must be represented in lines of no more
- than 76 characters each. All line breaks or other characters not
- found in Table 1 must be ignored by decoding software. In base64
- data, characters other than those in Table 1, line breaks, and other
- white space probably indicate a transmission error, about which a
- warning message or even a message rejection might be appropriate
- under some circumstances.
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a body. When fewer than 24 input bits
- are available in an input group, zero bits are added (on the right)
- to form an integral number of 6-bit groups. Padding at the end of
- the data is performed using the "=" character. Since all base64
- input is an integral number of octets, only the following cases can
- arise: (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded output will be
- an integral multiple of 4 characters with no "=" padding, (2) the
- final quantum of encoding input is exactly 8 bits; here, the final
- unit of encoded output will be two characters followed by two "="
- padding characters, or (3) the final quantum of encoding input is
- exactly 16 bits; here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
-
- Because it is used only for padding at the end of the data, the
- occurrence of any "=" characters may be taken as evidence that the
- end of the data has been reached (without truncation in transit). No
-
-
-
-Freed & Borenstein Standards Track [Page 25]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- such assurance is possible, however, when the number of octets
- transmitted was a multiple of three and no "=" characters are
- present.
-
- Any characters outside of the base64 alphabet are to be ignored in
- base64-encoded data.
-
- Care must be taken to use the proper octets for line breaks if base64
- encoding is applied directly to text material that has not been
- converted to canonical form. In particular, text line breaks must be
- converted into CRLF sequences prior to base64 encoding. The
- important thing to note is that this may be done directly by the
- encoder rather than in a prior canonicalization step in some
- implementations.
-
- NOTE: There is no need to worry about quoting potential boundary
- delimiters within base64-encoded bodies within multipart entities
- because no hyphen characters are used in the base64 encoding.
-
-7. Content-ID Header Field
-
- In constructing a high-level user agent, it may be desirable to allow
- one body to make reference to another. Accordingly, bodies may be
- labelled using the "Content-ID" header field, which is syntactically
- identical to the "Message-ID" header field:
-
- id := "Content-ID" ":" msg-id
-
- Like the Message-ID values, Content-ID values must be generated to be
- world-unique.
-
- The Content-ID value may be used for uniquely identifying MIME
- entities in several contexts, particularly for caching data
- referenced by the message/external-body mechanism. Although the
- Content-ID header is generally optional, its use is MANDATORY in
- implementations which generate data of the optional MIME media type
- "message/external-body". That is, each message/external-body entity
- must have a Content-ID field to permit caching of such data.
-
- It is also worth noting that the Content-ID value has special
- semantics in the case of the multipart/alternative media type. This
- is explained in the section of RFC 2046 dealing with
- multipart/alternative.
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 26]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-8. Content-Description Header Field
-
- The ability to associate some descriptive information with a given
- body is often desirable. For example, it may be useful to mark an
- "image" body as "a picture of the Space Shuttle Endeavor." Such text
- may be placed in the Content-Description header field. This header
- field is always optional.
-
- description := "Content-Description" ":" *text
-
- The description is presumed to be given in the US-ASCII character
- set, although the mechanism specified in RFC 2047 may be used for
- non-US-ASCII Content-Description values.
-
-9. Additional MIME Header Fields
-
- Future documents may elect to define additional MIME header fields
- for various purposes. Any new header field that further describes
- the content of a message should begin with the string "Content-" to
- allow such fields which appear in a message header to be
- distinguished from ordinary RFC 822 message header fields.
-
- MIME-extension-field := <Any RFC 822 header field which
- begins with the string
- "Content-">
-
-10. Summary
-
- Using the MIME-Version, Content-Type, and Content-Transfer-Encoding
- header fields, it is possible to include, in a standardized way,
- arbitrary types of data with RFC 822 conformant mail messages. No
- restrictions imposed by either RFC 821 or RFC 822 are violated, and
- care has been taken to avoid problems caused by additional
- restrictions imposed by the characteristics of some Internet mail
- transport mechanisms (see RFC 2049).
-
- The next document in this set, RFC 2046, specifies the initial set of
- media types that can be labelled and transported using these headers.
-
-11. Security Considerations
-
- Security issues are discussed in the second document in this set, RFC
- 2046.
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 27]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-12. Authors' Addresses
-
- For more information, the authors of this document are best contacted
- via Internet mail:
-
- Ned Freed
- Innosoft International, Inc.
- 1050 East Garvey Avenue South
- West Covina, CA 91790
- USA
-
- Phone: +1 818 919 3600
- Fax: +1 818 919 3614
- EMail: ned@innosoft.com
-
-
- Nathaniel S. Borenstein
- First Virtual Holdings
- 25 Washington Avenue
- Morristown, NJ 07960
- USA
-
- Phone: +1 201 540 8967
- Fax: +1 201 993 3032
- EMail: nsb@nsb.fv.com
-
-
- MIME is a result of the work of the Internet Engineering Task Force
- Working Group on RFC 822 Extensions. The chairman of that group,
- Greg Vaudreuil, may be reached at:
-
- Gregory M. Vaudreuil
- Octel Network Services
- 17080 Dallas Parkway
- Dallas, TX 75248-1905
- USA
-
- EMail: Greg.Vaudreuil@Octel.Com
-
-
-
-
-
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 28]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
-Appendix A -- Collected Grammar
-
- This appendix contains the complete BNF grammar for all the syntax
- specified by this document.
-
- By itself, however, this grammar is incomplete. It refers by name to
- several syntax rules that are defined by RFC 822. Rather than
- reproduce those definitions here, and risk unintentional differences
- between the two, this document simply refers the reader to RFC 822
- for the remaining definitions. Wherever a term is undefined, it
- refers to the RFC 822 definition.
-
- attribute := token
- ; Matching of attributes
- ; is ALWAYS case-insensitive.
-
- composite-type := "message" / "multipart" / extension-token
-
- content := "Content-Type" ":" type "/" subtype
- *(";" parameter)
- ; Matching of media type and subtype
- ; is ALWAYS case-insensitive.
-
- description := "Content-Description" ":" *text
-
- discrete-type := "text" / "image" / "audio" / "video" /
- "application" / extension-token
-
- encoding := "Content-Transfer-Encoding" ":" mechanism
-
- entity-headers := [ content CRLF ]
- [ encoding CRLF ]
- [ id CRLF ]
- [ description CRLF ]
- *( MIME-extension-field CRLF )
-
- extension-token := ietf-token / x-token
-
- hex-octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
- ; Octet must be used for characters > 127, =,
- ; SPACEs or TABs at the ends of lines, and is
- ; recommended for any character not listed in
- ; RFC 2049 as "mail-safe".
-
- iana-token := <A publicly-defined extension token. Tokens
- of this form must be registered with IANA
- as specified in RFC 2048.>
-
-
-
-
-Freed & Borenstein Standards Track [Page 29]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- ietf-token := <An extension token defined by a
- standards-track RFC and registered
- with IANA.>
-
- id := "Content-ID" ":" msg-id
-
- mechanism := "7bit" / "8bit" / "binary" /
- "quoted-printable" / "base64" /
- ietf-token / x-token
-
- MIME-extension-field := <Any RFC 822 header field which
- begins with the string
- "Content-">
-
- MIME-message-headers := entity-headers
- fields
- version CRLF
- ; The ordering of the header
- ; fields implied by this BNF
- ; definition should be ignored.
-
- MIME-part-headers := entity-headers
- [fields]
- ; Any field not beginning with
- ; "content-" can have no defined
- ; meaning and may be ignored.
- ; The ordering of the header
- ; fields implied by this BNF
- ; definition should be ignored.
-
- parameter := attribute "=" value
-
- ptext := hex-octet / safe-char
-
- qp-line := *(qp-segment transport-padding CRLF)
- qp-part transport-padding
-
- qp-part := qp-section
- ; Maximum length of 76 characters
-
- qp-section := [*(ptext / SPACE / TAB) ptext]
-
- qp-segment := qp-section *(SPACE / TAB) "="
- ; Maximum length of 76 characters
-
- quoted-printable := qp-line *(CRLF qp-line)
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 30]
-
-RFC 2045 Internet Message Bodies November 1996
-
-
- safe-char := <any octet with decimal value of 33 through
- 60 inclusive, and 62 through 126>
- ; Characters not listed as "mail-safe" in
- ; RFC 2049 are also not recommended.
-
- subtype := extension-token / iana-token
-
- token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
- or tspecials>
-
- transport-padding := *LWSP-char
- ; Composers MUST NOT generate
- ; non-zero length transport
- ; padding, but receivers MUST
- ; be able to handle padding
- ; added by message transports.
-
- tspecials := "(" / ")" / "<" / ">" / "@" /
- "," / ";" / ":" / "\" / <">
- "/" / "[" / "]" / "?" / "="
- ; Must be in quoted-string,
- ; to use within parameter values
-
- type := discrete-type / composite-type
-
- value := token / quoted-string
-
- version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT
-
- x-token := <The two characters "X-" or "x-" followed, with
- no intervening white space, by any token>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Freed & Borenstein Standards Track [Page 31]
-
diff --git a/vendor/github.com/mattermost/rsc/imap/rfc2971.txt b/vendor/github.com/mattermost/rsc/imap/rfc2971.txt
deleted file mode 100644
index 9e7264dcc..000000000
--- a/vendor/github.com/mattermost/rsc/imap/rfc2971.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-
-
-
-
-
-
-Network Working Group T. Showalter
-Request for Comments: 2971 Mirapoint, Inc.
-Category: Standards Track October 2000
-
-
- IMAP4 ID extension
-
-Status of this Memo
-
- This document specifies an Internet standards track protocol for the
- Internet community, and requests discussion and suggestions for
- improvements. Please refer to the current edition of the "Internet
- Official Protocol Standards" (STD 1) for the standardization state
- and status of this protocol. Distribution of this memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2000). All Rights Reserved.
-
-Abstract
-
- The ID extension to the Internet Message Access Protocol - Version
- 4rev1 (IMAP4rev1) protocol allows the server and client to exchange
- identification information on their implementation in order to make
- bug reports and usage statistics more complete.
-
-1. Introduction
-
- The IMAP4rev1 protocol described in [IMAP4rev1] provides a method for
- accessing remote mail stores, but it provides no facility to
- advertise what program a client or server uses to provide service.
- This makes it difficult for implementors to get complete bug reports
- from users, as it is frequently difficult to know what client or
- server is in use.
-
- Additionally, some sites may wish to assemble usage statistics based
- on what clients are used, but in an an environment where users are
- permitted to obtain and maintain their own clients this is difficult
- to accomplish.
-
- The ID command provides a facility to advertise information on what
- programs are being used along with contact information (should bugs
- ever occur).
-
-
-
-
-
-
-
-
-Showalter Standards Track [Page 1]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
-2. Conventions Used in this Document
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
- document are to be interpreted as described in [KEYWORDS].
-
- The conventions used in this document are the same as specified in
- [IMAP4rev1]. In examples, "C:" and "S:" indicate lines sent by the
- client and server respectively. Line breaks have been inserted for
- readability.
-
-3. Specification
-
- The sole purpose of the ID extension is to enable clients and servers
- to exchange information on their implementations for the purposes of
- statistical analysis and problem determination.
-
- This information is be submitted to a server by any client wishing to
- provide information for statistical purposes, provided the server
- advertises its willingness to take the information with the atom "ID"
- included in the list of capabilities returned by the CAPABILITY
- command.
-
- Implementations MUST NOT make operational changes based on the data
- sent as part of the ID command or response. The ID command is for
- human consumption only, and is not to be used in improving the
- performance of clients or servers.
-
- This includes, but is not limited to, the following:
-
- Servers MUST NOT attempt to work around client bugs by using
- information from the ID command. Clients MUST NOT attempt to work
- around server bugs based on the ID response.
-
- Servers MUST NOT provide features to a client or otherwise
- optimize for a particular client by using information from the ID
- command. Clients MUST NOT provide features to a server or
- otherwise optimize for a particular server based on the ID
- response.
-
- Servers MUST NOT deny access to or refuse service for a client
- based on information from the ID command. Clients MUST NOT refuse
- to operate or limit their operation with a server based on the ID
- response.
-
-
-
-
-
-
-
-Showalter Standards Track [Page 2]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
- Rationale: It is imperative that this extension not supplant IMAP's
- CAPABILITY mechanism with a ad-hoc approach where implementations
- guess each other's features based on who they claim to be.
-
- Implementations MUST NOT send false information in an ID command.
-
- Implementations MAY send less information than they have available or
- no information at all. Such behavior may be useful to preserve user
- privacy. See Security Considerations, section 7.
-
-3.1. ID Command
-
- Arguments: client parameter list or NIL
-
- Responses: OPTIONAL untagged response: ID
-
- Result: OK identification information accepted
- BAD command unknown or arguments invalid
-
- Implementation identification information is sent by the client with
- the ID command.
-
- This command is valid in any state.
-
- The information sent is in the form of a list of field/value pairs.
- Fields are permitted to be any IMAP4 string, and values are permitted
- to be any IMAP4 string or NIL. A value of NIL indicates that the
- client can not or will not specify this information. The client may
- also send NIL instead of the list, indicating that it wants to send
- no information, but would still accept a server response.
-
- The available fields are defined in section 3.3.
-
- Example: C: a023 ID ("name" "sodr" "version" "19.34" "vendor"
- "Pink Floyd Music Limited")
- S: * ID NIL
- S: a023 OK ID completed
-
-3.2. ID Response
-
- Contents: server parameter list
-
- In response to an ID command issued by the client, the server replies
- with a tagged response containing information on its implementation.
- The format is the same as the client list.
-
-
-
-
-
-
-Showalter Standards Track [Page 3]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
- Example: C: a042 ID NIL
- S: * ID ("name" "Cyrus" "version" "1.5" "os" "sunos"
- "os-version" "5.5" "support-url"
- "mailto:cyrus-bugs+@andrew.cmu.edu")
- S: a042 OK ID command completed
-
- A server MUST send a tagged ID response to an ID command. However, a
- server MAY send NIL in place of the list.
-
-3.3. Defined Field Values
-
- Any string may be sent as a field, but the following are defined to
- describe certain values that might be sent. Implementations are free
- to send none, any, or all of these. Strings are not case-sensitive.
- Field strings MUST NOT be longer than 30 octets. Value strings MUST
- NOT be longer than 1024 octets. Implementations MUST NOT send more
- than 30 field-value pairs.
-
- name Name of the program
- version Version number of the program
- os Name of the operating system
- os-version Version of the operating system
- vendor Vendor of the client/server
- support-url URL to contact for support
- address Postal address of contact/vendor
- date Date program was released, specified as a date-time
- in IMAP4rev1
- command Command used to start the program
- arguments Arguments supplied on the command line, if any
- if any
- environment Description of environment, i.e., UNIX environment
- variables or Windows registry settings
-
- Implementations MUST NOT use contact information to submit automatic
- bug reports. Implementations may include information from an ID
- response in a report automatically prepared, but are prohibited from
- sending the report without user authorization.
-
- It is preferable to find the name and version of the underlying
- operating system at runtime in cases where this is possible.
-
- Information sent via an ID response may violate user privacy. See
- Security Considerations, section 7.
-
- Implementations MUST NOT send the same field name more than once.
-
-
-
-
-
-
-Showalter Standards Track [Page 4]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
-4. Formal Syntax
-
- This syntax is intended to augment the grammar specified in
- [IMAP4rev1] in order to provide for the ID command. This
- specification uses the augmented Backus-Naur Form (BNF) notation as
- used in [IMAP4rev1].
-
- command_any ::= "CAPABILITY" / "LOGOUT" / "NOOP" / x_command / id
- ;; adds id command to command_any in [IMAP4rev1]
-
- id ::= "ID" SPACE id_params_list
-
- id_response ::= "ID" SPACE id_params_list
-
- id_params_list ::= "(" #(string SPACE nstring) ")" / nil
- ;; list of field value pairs
-
- response_data ::= "*" SPACE (resp_cond_state / resp_cond_bye /
- mailbox_data / message_data / capability_data / id_response)
-
-5. Use of the ID extension with Firewalls and Other Intermediaries
-
- There exist proxies, firewalls, and other intermediary systems that
- can intercept an IMAP session and make changes to the data exchanged
- in the session. Such intermediaries are not anticipated by the IMAP4
- protocol design and are not within the scope of the IMAP4 standard.
- However, in order for the ID command to be useful in the presence of
- such intermediaries, those intermediaries need to take special note
- of the ID command and response. In particular, if an intermediary
- changes any part of the IMAP session it must also change the ID
- command to advertise its presence.
-
- A firewall MAY act to block transmission of specific information
- fields in the ID command and response that it believes reveal
- information that could expose a security vulnerability. However, a
- firewall SHOULD NOT disable the extension, when present, entirely,
- and SHOULD NOT unconditionally remove either the client or server
- list.
-
- Finally, it should be noted that a firewall, when handling a
- CAPABILITY response, MUST NOT allow the names of extensions to be
- returned to the client that the firewall has no knowledge of.
-
-
-
-
-
-
-
-
-
-Showalter Standards Track [Page 5]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
-6. References
-
- [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
- Requirement Levels", RFC 2119, March 1997.
-
- [IMAP4rev1] Crispin, M., "Internet Message Access Protocol - Version
- 4rev1", RFC 2060, October 1996.
-
- [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet
- Text Messages", STD 11, RFC 822, August 1982.
-
-7. Security Considerations
-
- This extension has the danger of violating the privacy of users if
- misused. Clients and servers should notify users that they implement
- and enable the ID command.
-
- It is highly desirable that implementations provide a method of
- disabling ID support, perhaps by not sending ID at all, or by sending
- NIL as the argument to the ID command or response.
-
- Implementors must exercise extreme care in adding fields sent as part
- of an ID command or response. Some fields, including a processor ID
- number, Ethernet address, or other unique (or mostly unique)
- identifier allow tracking of users in ways that violate user privacy
- expectations.
-
- Having implementation information of a given client or server may
- make it easier for an attacker to gain unauthorized access due to
- security holes.
-
- Since this command includes arbitrary data and does not require the
- user to authenticate, server implementations are cautioned to guard
- against an attacker sending arbitrary garbage data in order to fill
- up the ID log. In particular, if a server naively logs each ID
- command to disk without inspecting it, an attacker can simply fire up
- thousands of connections and send a few kilobytes of random data.
- Servers have to guard against this. Methods include truncating
- abnormally large responses; collating responses by storing only a
- single copy, then keeping a counter of the number of times that
- response has been seen; keeping only particularly interesting parts
- of responses; and only logging responses of users who actually log
- in.
-
- Security is affected by firewalls which modify the IMAP protocol
- stream; see section 5, Use of the ID Extension with Firewalls and
- Other Intermediaries, for more information.
-
-
-
-
-Showalter Standards Track [Page 6]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
-8. Author's Address
-
- Tim Showalter
- Mirapoint, Inc.
- 909 Hermosa Ct.
- Sunnyvale, CA 94095
-
- EMail: tjs@mirapoint.com
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Showalter Standards Track [Page 7]
-
-RFC 2971 IMAP4 ID extension October 2000
-
-
-9. Full Copyright Statement
-
- Copyright (C) The Internet Society (2000). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns.
-
- This document and the information contained herein is provided on an
- "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
- TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Showalter Standards Track [Page 8]
-
diff --git a/vendor/github.com/mattermost/rsc/imap/rfc3501.txt b/vendor/github.com/mattermost/rsc/imap/rfc3501.txt
deleted file mode 100644
index 5ab48e17c..000000000
--- a/vendor/github.com/mattermost/rsc/imap/rfc3501.txt
+++ /dev/null
@@ -1,6051 +0,0 @@
-
-
-
-
-
-
-Network Working Group M. Crispin
-Request for Comments: 3501 University of Washington
-Obsoletes: 2060 March 2003
-Category: Standards Track
-
-
- INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1
-
-Status of this Memo
-
- This document specifies an Internet standards track protocol for the
- Internet community, and requests discussion and suggestions for
- improvements. Please refer to the current edition of the "Internet
- Official Protocol Standards" (STD 1) for the standardization state
- and status of this protocol. Distribution of this memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2003). All Rights Reserved.
-
-Abstract
-
- The Internet Message Access Protocol, Version 4rev1 (IMAP4rev1)
- allows a client to access and manipulate electronic mail messages on
- a server. IMAP4rev1 permits manipulation of mailboxes (remote
- message folders) in a way that is functionally equivalent to local
- folders. IMAP4rev1 also provides the capability for an offline
- client to resynchronize with the server.
-
- IMAP4rev1 includes operations for creating, deleting, and renaming
- mailboxes, checking for new messages, permanently removing messages,
- setting and clearing flags, RFC 2822 and RFC 2045 parsing, searching,
- and selective fetching of message attributes, texts, and portions
- thereof. Messages in IMAP4rev1 are accessed by the use of numbers.
- These numbers are either message sequence numbers or unique
- identifiers.
-
- IMAP4rev1 supports a single server. A mechanism for accessing
- configuration information to support multiple IMAP4rev1 servers is
- discussed in RFC 2244.
-
- IMAP4rev1 does not specify a means of posting mail; this function is
- handled by a mail transfer protocol such as RFC 2821.
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 1]
-
-RFC 3501 IMAPv4 March 2003
-
-
-Table of Contents
-
- IMAP4rev1 Protocol Specification ................................ 4
- 1. How to Read This Document ............................... 4
- 1.1. Organization of This Document ........................... 4
- 1.2. Conventions Used in This Document ....................... 4
- 1.3. Special Notes to Implementors ........................... 5
- 2. Protocol Overview ....................................... 6
- 2.1. Link Level .............................................. 6
- 2.2. Commands and Responses .................................. 6
- 2.2.1. Client Protocol Sender and Server Protocol Receiver ..... 6
- 2.2.2. Server Protocol Sender and Client Protocol Receiver ..... 7
- 2.3. Message Attributes ...................................... 8
- 2.3.1. Message Numbers ......................................... 8
- 2.3.1.1. Unique Identifier (UID) Message Attribute ....... 8
- 2.3.1.2. Message Sequence Number Message Attribute ....... 10
- 2.3.2. Flags Message Attribute ................................. 11
- 2.3.3. Internal Date Message Attribute ......................... 12
- 2.3.4. [RFC-2822] Size Message Attribute ....................... 12
- 2.3.5. Envelope Structure Message Attribute .................... 12
- 2.3.6. Body Structure Message Attribute ........................ 12
- 2.4. Message Texts ........................................... 13
- 3. State and Flow Diagram .................................. 13
- 3.1. Not Authenticated State ................................. 13
- 3.2. Authenticated State ..................................... 13
- 3.3. Selected State .......................................... 13
- 3.4. Logout State ............................................ 14
- 4. Data Formats ............................................ 16
- 4.1. Atom .................................................... 16
- 4.2. Number .................................................. 16
- 4.3. String .................................................. 16
- 4.3.1. 8-bit and Binary Strings ................................ 17
- 4.4. Parenthesized List ...................................... 17
- 4.5. NIL ..................................................... 17
- 5. Operational Considerations .............................. 18
- 5.1. Mailbox Naming .......................................... 18
- 5.1.1. Mailbox Hierarchy Naming ................................ 19
- 5.1.2. Mailbox Namespace Naming Convention ..................... 19
- 5.1.3. Mailbox International Naming Convention ................. 19
- 5.2. Mailbox Size and Message Status Updates ................. 21
- 5.3. Response when no Command in Progress .................... 21
- 5.4. Autologout Timer ........................................ 22
- 5.5. Multiple Commands in Progress ........................... 22
- 6. Client Commands ........................................ 23
- 6.1. Client Commands - Any State ............................ 24
- 6.1.1. CAPABILITY Command ..................................... 24
- 6.1.2. NOOP Command ........................................... 25
- 6.1.3. LOGOUT Command ......................................... 26
-
-
-
-Crispin Standards Track [Page 2]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 6.2. Client Commands - Not Authenticated State .............. 26
- 6.2.1. STARTTLS Command ....................................... 27
- 6.2.2. AUTHENTICATE Command ................................... 28
- 6.2.3. LOGIN Command .......................................... 30
- 6.3. Client Commands - Authenticated State .................. 31
- 6.3.1. SELECT Command ......................................... 32
- 6.3.2. EXAMINE Command ........................................ 34
- 6.3.3. CREATE Command ......................................... 34
- 6.3.4. DELETE Command ......................................... 35
- 6.3.5. RENAME Command ......................................... 37
- 6.3.6. SUBSCRIBE Command ...................................... 39
- 6.3.7. UNSUBSCRIBE Command .................................... 39
- 6.3.8. LIST Command ........................................... 40
- 6.3.9. LSUB Command ........................................... 43
- 6.3.10. STATUS Command ......................................... 44
- 6.3.11. APPEND Command ......................................... 46
- 6.4. Client Commands - Selected State ....................... 47
- 6.4.1. CHECK Command .......................................... 47
- 6.4.2. CLOSE Command .......................................... 48
- 6.4.3. EXPUNGE Command ........................................ 49
- 6.4.4. SEARCH Command ......................................... 49
- 6.4.5. FETCH Command .......................................... 54
- 6.4.6. STORE Command .......................................... 58
- 6.4.7. COPY Command ........................................... 59
- 6.4.8. UID Command ............................................ 60
- 6.5. Client Commands - Experimental/Expansion ............... 62
- 6.5.1. X<atom> Command ........................................ 62
- 7. Server Responses ....................................... 62
- 7.1. Server Responses - Status Responses .................... 63
- 7.1.1. OK Response ............................................ 65
- 7.1.2. NO Response ............................................ 66
- 7.1.3. BAD Response ........................................... 66
- 7.1.4. PREAUTH Response ....................................... 67
- 7.1.5. BYE Response ........................................... 67
- 7.2. Server Responses - Server and Mailbox Status ........... 68
- 7.2.1. CAPABILITY Response .................................... 68
- 7.2.2. LIST Response .......................................... 69
- 7.2.3. LSUB Response .......................................... 70
- 7.2.4 STATUS Response ........................................ 70
- 7.2.5. SEARCH Response ........................................ 71
- 7.2.6. FLAGS Response ......................................... 71
- 7.3. Server Responses - Mailbox Size ........................ 71
- 7.3.1. EXISTS Response ........................................ 71
- 7.3.2. RECENT Response ........................................ 72
- 7.4. Server Responses - Message Status ...................... 72
- 7.4.1. EXPUNGE Response ....................................... 72
- 7.4.2. FETCH Response ......................................... 73
- 7.5. Server Responses - Command Continuation Request ........ 79
-
-
-
-Crispin Standards Track [Page 3]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 8. Sample IMAP4rev1 connection ............................ 80
- 9. Formal Syntax .......................................... 81
- 10. Author's Note .......................................... 92
- 11. Security Considerations ................................ 92
- 11.1. STARTTLS Security Considerations ....................... 92
- 11.2. Other Security Considerations .......................... 93
- 12. IANA Considerations .................................... 94
- Appendices ..................................................... 95
- A. References ............................................. 95
- B. Changes from RFC 2060 .................................. 97
- C. Key Word Index ......................................... 103
- Author's Address ............................................... 107
- Full Copyright Statement ....................................... 108
-
-IMAP4rev1 Protocol Specification
-
-1. How to Read This Document
-
-1.1. Organization of This Document
-
- This document is written from the point of view of the implementor of
- an IMAP4rev1 client or server. Beyond the protocol overview in
- section 2, it is not optimized for someone trying to understand the
- operation of the protocol. The material in sections 3 through 5
- provides the general context and definitions with which IMAP4rev1
- operates.
-
- Sections 6, 7, and 9 describe the IMAP commands, responses, and
- syntax, respectively. The relationships among these are such that it
- is almost impossible to understand any of them separately. In
- particular, do not attempt to deduce command syntax from the command
- section alone; instead refer to the Formal Syntax section.
-
-1.2. Conventions Used in This Document
-
- "Conventions" are basic principles or procedures. Document
- conventions are noted in this section.
-
- In examples, "C:" and "S:" indicate lines sent by the client and
- server respectively.
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this document are to
- be interpreted as described in [KEYWORDS].
-
- The word "can" (not "may") is used to refer to a possible
- circumstance or situation, as opposed to an optional facility of the
- protocol.
-
-
-
-Crispin Standards Track [Page 4]
-
-RFC 3501 IMAPv4 March 2003
-
-
- "User" is used to refer to a human user, whereas "client" refers to
- the software being run by the user.
-
- "Connection" refers to the entire sequence of client/server
- interaction from the initial establishment of the network connection
- until its termination.
-
- "Session" refers to the sequence of client/server interaction from
- the time that a mailbox is selected (SELECT or EXAMINE command) until
- the time that selection ends (SELECT or EXAMINE of another mailbox,
- CLOSE command, or connection termination).
-
- Characters are 7-bit US-ASCII unless otherwise specified. Other
- character sets are indicated using a "CHARSET", as described in
- [MIME-IMT] and defined in [CHARSET]. CHARSETs have important
- additional semantics in addition to defining character set; refer to
- these documents for more detail.
-
- There are several protocol conventions in IMAP. These refer to
- aspects of the specification which are not strictly part of the IMAP
- protocol, but reflect generally-accepted practice. Implementations
- need to be aware of these conventions, and avoid conflicts whether or
- not they implement the convention. For example, "&" may not be used
- as a hierarchy delimiter since it conflicts with the Mailbox
- International Naming Convention, and other uses of "&" in mailbox
- names are impacted as well.
-
-1.3. Special Notes to Implementors
-
- Implementors of the IMAP protocol are strongly encouraged to read the
- IMAP implementation recommendations document [IMAP-IMPLEMENTATION] in
- conjunction with this document, to help understand the intricacies of
- this protocol and how best to build an interoperable product.
-
- IMAP4rev1 is designed to be upwards compatible from the [IMAP2] and
- unpublished IMAP2bis protocols. IMAP4rev1 is largely compatible with
- the IMAP4 protocol described in RFC 1730; the exception being in
- certain facilities added in RFC 1730 that proved problematic and were
- subsequently removed. In the course of the evolution of IMAP4rev1,
- some aspects in the earlier protocols have become obsolete. Obsolete
- commands, responses, and data formats which an IMAP4rev1
- implementation can encounter when used with an earlier implementation
- are described in [IMAP-OBSOLETE].
-
- Other compatibility issues with IMAP2bis, the most common variant of
- the earlier protocol, are discussed in [IMAP-COMPAT]. A full
- discussion of compatibility issues with rare (and presumed extinct)
-
-
-
-
-Crispin Standards Track [Page 5]
-
-RFC 3501 IMAPv4 March 2003
-
-
- variants of [IMAP2] is in [IMAP-HISTORICAL]; this document is
- primarily of historical interest.
-
- IMAP was originally developed for the older [RFC-822] standard, and
- as a consequence several fetch items in IMAP incorporate "RFC822" in
- their name. With the exception of RFC822.SIZE, there are more modern
- replacements; for example, the modern version of RFC822.HEADER is
- BODY.PEEK[HEADER]. In all cases, "RFC822" should be interpreted as a
- reference to the updated [RFC-2822] standard.
-
-2. Protocol Overview
-
-2.1. Link Level
-
- The IMAP4rev1 protocol assumes a reliable data stream such as that
- provided by TCP. When TCP is used, an IMAP4rev1 server listens on
- port 143.
-
-2.2. Commands and Responses
-
- An IMAP4rev1 connection consists of the establishment of a
- client/server network connection, an initial greeting from the
- server, and client/server interactions. These client/server
- interactions consist of a client command, server data, and a server
- completion result response.
-
- All interactions transmitted by client and server are in the form of
- lines, that is, strings that end with a CRLF. The protocol receiver
- of an IMAP4rev1 client or server is either reading a line, or is
- reading a sequence of octets with a known count followed by a line.
-
-2.2.1. Client Protocol Sender and Server Protocol Receiver
-
- The client command begins an operation. Each client command is
- prefixed with an identifier (typically a short alphanumeric string,
- e.g., A0001, A0002, etc.) called a "tag". A different tag is
- generated by the client for each command.
-
- Clients MUST follow the syntax outlined in this specification
- strictly. It is a syntax error to send a command with missing or
- extraneous spaces or arguments.
-
- There are two cases in which a line from the client does not
- represent a complete command. In one case, a command argument is
- quoted with an octet count (see the description of literal in String
- under Data Formats); in the other case, the command arguments require
- server feedback (see the AUTHENTICATE command). In either case, the
-
-
-
-
-Crispin Standards Track [Page 6]
-
-RFC 3501 IMAPv4 March 2003
-
-
- server sends a command continuation request response if it is ready
- for the octets (if appropriate) and the remainder of the command.
- This response is prefixed with the token "+".
-
- Note: If instead, the server detected an error in the
- command, it sends a BAD completion response with a tag
- matching the command (as described below) to reject the
- command and prevent the client from sending any more of the
- command.
-
- It is also possible for the server to send a completion
- response for some other command (if multiple commands are
- in progress), or untagged data. In either case, the
- command continuation request is still pending; the client
- takes the appropriate action for the response, and reads
- another response from the server. In all cases, the client
- MUST send a complete command (including receiving all
- command continuation request responses and command
- continuations for the command) before initiating a new
- command.
-
- The protocol receiver of an IMAP4rev1 server reads a command line
- from the client, parses the command and its arguments, and transmits
- server data and a server command completion result response.
-
-2.2.2. Server Protocol Sender and Client Protocol Receiver
-
- Data transmitted by the server to the client and status responses
- that do not indicate command completion are prefixed with the token
- "*", and are called untagged responses.
-
- Server data MAY be sent as a result of a client command, or MAY be
- sent unilaterally by the server. There is no syntactic difference
- between server data that resulted from a specific command and server
- data that were sent unilaterally.
-
- The server completion result response indicates the success or
- failure of the operation. It is tagged with the same tag as the
- client command which began the operation. Thus, if more than one
- command is in progress, the tag in a server completion response
- identifies the command to which the response applies. There are
- three possible server completion responses: OK (indicating success),
- NO (indicating failure), or BAD (indicating a protocol error such as
- unrecognized command or command syntax error).
-
- Servers SHOULD enforce the syntax outlined in this specification
- strictly. Any client command with a protocol syntax error, including
- (but not limited to) missing or extraneous spaces or arguments,
-
-
-
-Crispin Standards Track [Page 7]
-
-RFC 3501 IMAPv4 March 2003
-
-
- SHOULD be rejected, and the client given a BAD server completion
- response.
-
- The protocol receiver of an IMAP4rev1 client reads a response line
- from the server. It then takes action on the response based upon the
- first token of the response, which can be a tag, a "*", or a "+".
-
- A client MUST be prepared to accept any server response at all times.
- This includes server data that was not requested. Server data SHOULD
- be recorded, so that the client can reference its recorded copy
- rather than sending a command to the server to request the data. In
- the case of certain server data, the data MUST be recorded.
-
- This topic is discussed in greater detail in the Server Responses
- section.
-
-2.3. Message Attributes
-
- In addition to message text, each message has several attributes
- associated with it. These attributes can be retrieved individually
- or in conjunction with other attributes or message texts.
-
-2.3.1. Message Numbers
-
- Messages in IMAP4rev1 are accessed by one of two numbers; the unique
- identifier or the message sequence number.
-
-
-2.3.1.1. Unique Identifier (UID) Message Attribute
-
- A 32-bit value assigned to each message, which when used with the
- unique identifier validity value (see below) forms a 64-bit value
- that MUST NOT refer to any other message in the mailbox or any
- subsequent mailbox with the same name forever. Unique identifiers
- are assigned in a strictly ascending fashion in the mailbox; as each
- message is added to the mailbox it is assigned a higher UID than the
- message(s) which were added previously. Unlike message sequence
- numbers, unique identifiers are not necessarily contiguous.
-
- The unique identifier of a message MUST NOT change during the
- session, and SHOULD NOT change between sessions. Any change of
- unique identifiers between sessions MUST be detectable using the
- UIDVALIDITY mechanism discussed below. Persistent unique identifiers
- are required for a client to resynchronize its state from a previous
- session with the server (e.g., disconnected or offline access
- clients); this is discussed further in [IMAP-DISC].
-
-
-
-
-
-Crispin Standards Track [Page 8]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Associated with every mailbox are two values which aid in unique
- identifier handling: the next unique identifier value and the unique
- identifier validity value.
-
- The next unique identifier value is the predicted value that will be
- assigned to a new message in the mailbox. Unless the unique
- identifier validity also changes (see below), the next unique
- identifier value MUST have the following two characteristics. First,
- the next unique identifier value MUST NOT change unless new messages
- are added to the mailbox; and second, the next unique identifier
- value MUST change whenever new messages are added to the mailbox,
- even if those new messages are subsequently expunged.
-
- Note: The next unique identifier value is intended to
- provide a means for a client to determine whether any
- messages have been delivered to the mailbox since the
- previous time it checked this value. It is not intended to
- provide any guarantee that any message will have this
- unique identifier. A client can only assume, at the time
- that it obtains the next unique identifier value, that
- messages arriving after that time will have a UID greater
- than or equal to that value.
-
- The unique identifier validity value is sent in a UIDVALIDITY
- response code in an OK untagged response at mailbox selection time.
- If unique identifiers from an earlier session fail to persist in this
- session, the unique identifier validity value MUST be greater than
- the one used in the earlier session.
-
- Note: Ideally, unique identifiers SHOULD persist at all
- times. Although this specification recognizes that failure
- to persist can be unavoidable in certain server
- environments, it STRONGLY ENCOURAGES message store
- implementation techniques that avoid this problem. For
- example:
-
- 1) Unique identifiers MUST be strictly ascending in the
- mailbox at all times. If the physical message store is
- re-ordered by a non-IMAP agent, this requires that the
- unique identifiers in the mailbox be regenerated, since
- the former unique identifiers are no longer strictly
- ascending as a result of the re-ordering.
-
- 2) If the message store has no mechanism to store unique
- identifiers, it must regenerate unique identifiers at
- each session, and each session must have a unique
- UIDVALIDITY value.
-
-
-
-
-Crispin Standards Track [Page 9]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 3) If the mailbox is deleted and a new mailbox with the
- same name is created at a later date, the server must
- either keep track of unique identifiers from the
- previous instance of the mailbox, or it must assign a
- new UIDVALIDITY value to the new instance of the
- mailbox. A good UIDVALIDITY value to use in this case
- is a 32-bit representation of the creation date/time of
- the mailbox. It is alright to use a constant such as
- 1, but only if it guaranteed that unique identifiers
- will never be reused, even in the case of a mailbox
- being deleted (or renamed) and a new mailbox by the
- same name created at some future time.
-
- 4) The combination of mailbox name, UIDVALIDITY, and UID
- must refer to a single immutable message on that server
- forever. In particular, the internal date, [RFC-2822]
- size, envelope, body structure, and message texts
- (RFC822, RFC822.HEADER, RFC822.TEXT, and all BODY[...]
- fetch data items) must never change. This does not
- include message numbers, nor does it include attributes
- that can be set by a STORE command (e.g., FLAGS).
-
-
-2.3.1.2. Message Sequence Number Message Attribute
-
- A relative position from 1 to the number of messages in the mailbox.
- This position MUST be ordered by ascending unique identifier. As
- each new message is added, it is assigned a message sequence number
- that is 1 higher than the number of messages in the mailbox before
- that new message was added.
-
- Message sequence numbers can be reassigned during the session. For
- example, when a message is permanently removed (expunged) from the
- mailbox, the message sequence number for all subsequent messages is
- decremented. The number of messages in the mailbox is also
- decremented. Similarly, a new message can be assigned a message
- sequence number that was once held by some other message prior to an
- expunge.
-
- In addition to accessing messages by relative position in the
- mailbox, message sequence numbers can be used in mathematical
- calculations. For example, if an untagged "11 EXISTS" is received,
- and previously an untagged "8 EXISTS" was received, three new
- messages have arrived with message sequence numbers of 9, 10, and 11.
- Another example, if message 287 in a 523 message mailbox has UID
- 12345, there are exactly 286 messages which have lesser UIDs and 236
- messages which have greater UIDs.
-
-
-
-
-Crispin Standards Track [Page 10]
-
-RFC 3501 IMAPv4 March 2003
-
-
-2.3.2. Flags Message Attribute
-
- A list of zero or more named tokens associated with the message. A
- flag is set by its addition to this list, and is cleared by its
- removal. There are two types of flags in IMAP4rev1. A flag of
- either type can be permanent or session-only.
-
- A system flag is a flag name that is pre-defined in this
- specification. All system flags begin with "\". Certain system
- flags (\Deleted and \Seen) have special semantics described
- elsewhere. The currently-defined system flags are:
-
- \Seen
- Message has been read
-
- \Answered
- Message has been answered
-
- \Flagged
- Message is "flagged" for urgent/special attention
-
- \Deleted
- Message is "deleted" for removal by later EXPUNGE
-
- \Draft
- Message has not completed composition (marked as a draft).
-
- \Recent
- Message is "recently" arrived in this mailbox. This session
- is the first session to have been notified about this
- message; if the session is read-write, subsequent sessions
- will not see \Recent set for this message. This flag can not
- be altered by the client.
-
- If it is not possible to determine whether or not this
- session is the first session to be notified about a message,
- then that message SHOULD be considered recent.
-
- If multiple connections have the same mailbox selected
- simultaneously, it is undefined which of these connections
- will see newly-arrived messages with \Recent set and which
- will see it without \Recent set.
-
- A keyword is defined by the server implementation. Keywords do not
- begin with "\". Servers MAY permit the client to define new keywords
- in the mailbox (see the description of the PERMANENTFLAGS response
- code for more information).
-
-
-
-
-Crispin Standards Track [Page 11]
-
-RFC 3501 IMAPv4 March 2003
-
-
- A flag can be permanent or session-only on a per-flag basis.
- Permanent flags are those which the client can add or remove from the
- message flags permanently; that is, concurrent and subsequent
- sessions will see any change in permanent flags. Changes to session
- flags are valid only in that session.
-
- Note: The \Recent system flag is a special case of a
- session flag. \Recent can not be used as an argument in a
- STORE or APPEND command, and thus can not be changed at
- all.
-
-2.3.3. Internal Date Message Attribute
-
- The internal date and time of the message on the server. This
- is not the date and time in the [RFC-2822] header, but rather a
- date and time which reflects when the message was received. In
- the case of messages delivered via [SMTP], this SHOULD be the
- date and time of final delivery of the message as defined by
- [SMTP]. In the case of messages delivered by the IMAP4rev1 COPY
- command, this SHOULD be the internal date and time of the source
- message. In the case of messages delivered by the IMAP4rev1
- APPEND command, this SHOULD be the date and time as specified in
- the APPEND command description. All other cases are
- implementation defined.
-
-2.3.4. [RFC-2822] Size Message Attribute
-
- The number of octets in the message, as expressed in [RFC-2822]
- format.
-
-2.3.5. Envelope Structure Message Attribute
-
- A parsed representation of the [RFC-2822] header of the message.
- Note that the IMAP Envelope structure is not the same as an
- [SMTP] envelope.
-
-2.3.6. Body Structure Message Attribute
-
- A parsed representation of the [MIME-IMB] body structure
- information of the message.
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 12]
-
-RFC 3501 IMAPv4 March 2003
-
-
-2.4. Message Texts
-
- In addition to being able to fetch the full [RFC-2822] text of a
- message, IMAP4rev1 permits the fetching of portions of the full
- message text. Specifically, it is possible to fetch the
- [RFC-2822] message header, [RFC-2822] message body, a [MIME-IMB]
- body part, or a [MIME-IMB] header.
-
-3. State and Flow Diagram
-
- Once the connection between client and server is established, an
- IMAP4rev1 connection is in one of four states. The initial
- state is identified in the server greeting. Most commands are
- only valid in certain states. It is a protocol error for the
- client to attempt a command while the connection is in an
- inappropriate state, and the server will respond with a BAD or
- NO (depending upon server implementation) command completion
- result.
-
-3.1. Not Authenticated State
-
- In the not authenticated state, the client MUST supply
- authentication credentials before most commands will be
- permitted. This state is entered when a connection starts
- unless the connection has been pre-authenticated.
-
-3.2. Authenticated State
-
- In the authenticated state, the client is authenticated and MUST
- select a mailbox to access before commands that affect messages
- will be permitted. This state is entered when a
- pre-authenticated connection starts, when acceptable
- authentication credentials have been provided, after an error in
- selecting a mailbox, or after a successful CLOSE command.
-
-3.3. Selected State
-
- In a selected state, a mailbox has been selected to access.
- This state is entered when a mailbox has been successfully
- selected.
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 13]
-
-RFC 3501 IMAPv4 March 2003
-
-
-3.4. Logout State
-
- In the logout state, the connection is being terminated. This
- state can be entered as a result of a client request (via the
- LOGOUT command) or by unilateral action on the part of either
- the client or server.
-
- If the client requests the logout state, the server MUST send an
- untagged BYE response and a tagged OK response to the LOGOUT
- command before the server closes the connection; and the client
- MUST read the tagged OK response to the LOGOUT command before
- the client closes the connection.
-
- A server MUST NOT unilaterally close the connection without
- sending an untagged BYE response that contains the reason for
- having done so. A client SHOULD NOT unilaterally close the
- connection, and instead SHOULD issue a LOGOUT command. If the
- server detects that the client has unilaterally closed the
- connection, the server MAY omit the untagged BYE response and
- simply close its connection.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 14]
-
-RFC 3501 IMAPv4 March 2003
-
-
- +----------------------+
- |connection established|
- +----------------------+
- ||
- \/
- +--------------------------------------+
- | server greeting |
- +--------------------------------------+
- || (1) || (2) || (3)
- \/ || ||
- +-----------------+ || ||
- |Not Authenticated| || ||
- +-----------------+ || ||
- || (7) || (4) || ||
- || \/ \/ ||
- || +----------------+ ||
- || | Authenticated |<=++ ||
- || +----------------+ || ||
- || || (7) || (5) || (6) ||
- || || \/ || ||
- || || +--------+ || ||
- || || |Selected|==++ ||
- || || +--------+ ||
- || || || (7) ||
- \/ \/ \/ \/
- +--------------------------------------+
- | Logout |
- +--------------------------------------+
- ||
- \/
- +-------------------------------+
- |both sides close the connection|
- +-------------------------------+
-
- (1) connection without pre-authentication (OK greeting)
- (2) pre-authenticated connection (PREAUTH greeting)
- (3) rejected connection (BYE greeting)
- (4) successful LOGIN or AUTHENTICATE command
- (5) successful SELECT or EXAMINE command
- (6) CLOSE command, or failed SELECT or EXAMINE command
- (7) LOGOUT command, server shutdown, or connection closed
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 15]
-
-RFC 3501 IMAPv4 March 2003
-
-
-4. Data Formats
-
- IMAP4rev1 uses textual commands and responses. Data in
- IMAP4rev1 can be in one of several forms: atom, number, string,
- parenthesized list, or NIL. Note that a particular data item
- may take more than one form; for example, a data item defined as
- using "astring" syntax may be either an atom or a string.
-
-4.1. Atom
-
- An atom consists of one or more non-special characters.
-
-4.2. Number
-
- A number consists of one or more digit characters, and
- represents a numeric value.
-
-4.3. String
-
- A string is in one of two forms: either literal or quoted
- string. The literal form is the general form of string. The
- quoted string form is an alternative that avoids the overhead of
- processing a literal at the cost of limitations of characters
- which may be used.
-
- A literal is a sequence of zero or more octets (including CR and
- LF), prefix-quoted with an octet count in the form of an open
- brace ("{"), the number of octets, close brace ("}"), and CRLF.
- In the case of literals transmitted from server to client, the
- CRLF is immediately followed by the octet data. In the case of
- literals transmitted from client to server, the client MUST wait
- to receive a command continuation request (described later in
- this document) before sending the octet data (and the remainder
- of the command).
-
- A quoted string is a sequence of zero or more 7-bit characters,
- excluding CR and LF, with double quote (<">) characters at each
- end.
-
- The empty string is represented as either "" (a quoted string
- with zero characters between double quotes) or as {0} followed
- by CRLF (a literal with an octet count of 0).
-
- Note: Even if the octet count is 0, a client transmitting a
- literal MUST wait to receive a command continuation request.
-
-
-
-
-
-
-Crispin Standards Track [Page 16]
-
-RFC 3501 IMAPv4 March 2003
-
-
-4.3.1. 8-bit and Binary Strings
-
- 8-bit textual and binary mail is supported through the use of a
- [MIME-IMB] content transfer encoding. IMAP4rev1 implementations MAY
- transmit 8-bit or multi-octet characters in literals, but SHOULD do
- so only when the [CHARSET] is identified.
-
- Although a BINARY body encoding is defined, unencoded binary strings
- are not permitted. A "binary string" is any string with NUL
- characters. Implementations MUST encode binary data into a textual
- form, such as BASE64, before transmitting the data. A string with an
- excessive amount of CTL characters MAY also be considered to be
- binary.
-
-4.4. Parenthesized List
-
- Data structures are represented as a "parenthesized list"; a sequence
- of data items, delimited by space, and bounded at each end by
- parentheses. A parenthesized list can contain other parenthesized
- lists, using multiple levels of parentheses to indicate nesting.
-
- The empty list is represented as () -- a parenthesized list with no
- members.
-
-4.5. NIL
-
- The special form "NIL" represents the non-existence of a particular
- data item that is represented as a string or parenthesized list, as
- distinct from the empty string "" or the empty parenthesized list ().
-
- Note: NIL is never used for any data item which takes the
- form of an atom. For example, a mailbox name of "NIL" is a
- mailbox named NIL as opposed to a non-existent mailbox
- name. This is because mailbox uses "astring" syntax which
- is an atom or a string. Conversely, an addr-name of NIL is
- a non-existent personal name, because addr-name uses
- "nstring" syntax which is NIL or a string, but never an
- atom.
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 17]
-
-RFC 3501 IMAPv4 March 2003
-
-
-5. Operational Considerations
-
- The following rules are listed here to ensure that all IMAP4rev1
- implementations interoperate properly.
-
-5.1. Mailbox Naming
-
- Mailbox names are 7-bit. Client implementations MUST NOT attempt to
- create 8-bit mailbox names, and SHOULD interpret any 8-bit mailbox
- names returned by LIST or LSUB as UTF-8. Server implementations
- SHOULD prohibit the creation of 8-bit mailbox names, and SHOULD NOT
- return 8-bit mailbox names in LIST or LSUB. See section 5.1.3 for
- more information on how to represent non-ASCII mailbox names.
-
- Note: 8-bit mailbox names were undefined in earlier
- versions of this protocol. Some sites used a local 8-bit
- character set to represent non-ASCII mailbox names. Such
- usage is not interoperable, and is now formally deprecated.
-
- The case-insensitive mailbox name INBOX is a special name reserved to
- mean "the primary mailbox for this user on this server". The
- interpretation of all other names is implementation-dependent.
-
- In particular, this specification takes no position on case
- sensitivity in non-INBOX mailbox names. Some server implementations
- are fully case-sensitive; others preserve case of a newly-created
- name but otherwise are case-insensitive; and yet others coerce names
- to a particular case. Client implementations MUST interact with any
- of these. If a server implementation interprets non-INBOX mailbox
- names as case-insensitive, it MUST treat names using the
- international naming convention specially as described in section
- 5.1.3.
-
- There are certain client considerations when creating a new mailbox
- name:
-
- 1) Any character which is one of the atom-specials (see the Formal
- Syntax) will require that the mailbox name be represented as a
- quoted string or literal.
-
- 2) CTL and other non-graphic characters are difficult to represent
- in a user interface and are best avoided.
-
- 3) Although the list-wildcard characters ("%" and "*") are valid
- in a mailbox name, it is difficult to use such mailbox names
- with the LIST and LSUB commands due to the conflict with
- wildcard interpretation.
-
-
-
-
-Crispin Standards Track [Page 18]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 4) Usually, a character (determined by the server implementation)
- is reserved to delimit levels of hierarchy.
-
- 5) Two characters, "#" and "&", have meanings by convention, and
- should be avoided except when used in that convention.
-
-5.1.1. Mailbox Hierarchy Naming
-
- If it is desired to export hierarchical mailbox names, mailbox names
- MUST be left-to-right hierarchical using a single character to
- separate levels of hierarchy. The same hierarchy separator character
- is used for all levels of hierarchy within a single name.
-
-5.1.2. Mailbox Namespace Naming Convention
-
- By convention, the first hierarchical element of any mailbox name
- which begins with "#" identifies the "namespace" of the remainder of
- the name. This makes it possible to disambiguate between different
- types of mailbox stores, each of which have their own namespaces.
-
- For example, implementations which offer access to USENET
- newsgroups MAY use the "#news" namespace to partition the
- USENET newsgroup namespace from that of other mailboxes.
- Thus, the comp.mail.misc newsgroup would have a mailbox
- name of "#news.comp.mail.misc", and the name
- "comp.mail.misc" can refer to a different object (e.g., a
- user's private mailbox).
-
-5.1.3. Mailbox International Naming Convention
-
- By convention, international mailbox names in IMAP4rev1 are specified
- using a modified version of the UTF-7 encoding described in [UTF-7].
- Modified UTF-7 may also be usable in servers that implement an
- earlier version of this protocol.
-
- In modified UTF-7, printable US-ASCII characters, except for "&",
- represent themselves; that is, characters with octet values 0x20-0x25
- and 0x27-0x7e. The character "&" (0x26) is represented by the
- two-octet sequence "&-".
-
- All other characters (octet values 0x00-0x1f and 0x7f-0xff) are
- represented in modified BASE64, with a further modification from
- [UTF-7] that "," is used instead of "/". Modified BASE64 MUST NOT be
- used to represent any printing US-ASCII character which can represent
- itself.
-
-
-
-
-
-
-Crispin Standards Track [Page 19]
-
-RFC 3501 IMAPv4 March 2003
-
-
- "&" is used to shift to modified BASE64 and "-" to shift back to
- US-ASCII. There is no implicit shift from BASE64 to US-ASCII, and
- null shifts ("-&" while in BASE64; note that "&-" while in US-ASCII
- means "&") are not permitted. However, all names start in US-ASCII,
- and MUST end in US-ASCII; that is, a name that ends with a non-ASCII
- ISO-10646 character MUST end with a "-").
-
- The purpose of these modifications is to correct the following
- problems with UTF-7:
-
- 1) UTF-7 uses the "+" character for shifting; this conflicts with
- the common use of "+" in mailbox names, in particular USENET
- newsgroup names.
-
- 2) UTF-7's encoding is BASE64 which uses the "/" character; this
- conflicts with the use of "/" as a popular hierarchy delimiter.
-
- 3) UTF-7 prohibits the unencoded usage of "\"; this conflicts with
- the use of "\" as a popular hierarchy delimiter.
-
- 4) UTF-7 prohibits the unencoded usage of "~"; this conflicts with
- the use of "~" in some servers as a home directory indicator.
-
- 5) UTF-7 permits multiple alternate forms to represent the same
- string; in particular, printable US-ASCII characters can be
- represented in encoded form.
-
- Although modified UTF-7 is a convention, it establishes certain
- requirements on server handling of any mailbox name with an
- embedded "&" character. In particular, server implementations
- MUST preserve the exact form of the modified BASE64 portion of a
- modified UTF-7 name and treat that text as case-sensitive, even if
- names are otherwise case-insensitive or case-folded.
-
- Server implementations SHOULD verify that any mailbox name with an
- embedded "&" character, used as an argument to CREATE, is: in the
- correctly modified UTF-7 syntax, has no superfluous shifts, and
- has no encoding in modified BASE64 of any printing US-ASCII
- character which can represent itself. However, client
- implementations MUST NOT depend upon the server doing this, and
- SHOULD NOT attempt to create a mailbox name with an embedded "&"
- character unless it complies with the modified UTF-7 syntax.
-
- Server implementations which export a mail store that does not
- follow the modified UTF-7 convention MUST convert to modified
- UTF-7 any mailbox name that contains either non-ASCII characters
- or the "&" character.
-
-
-
-
-Crispin Standards Track [Page 20]
-
-RFC 3501 IMAPv4 March 2003
-
-
- For example, here is a mailbox name which mixes English,
- Chinese, and Japanese text:
- ~peter/mail/&U,BTFw-/&ZeVnLIqe-
-
- For example, the string "&Jjo!" is not a valid mailbox
- name because it does not contain a shift to US-ASCII
- before the "!". The correct form is "&Jjo-!". The
- string "&U,BTFw-&ZeVnLIqe-" is not permitted because it
- contains a superfluous shift. The correct form is
- "&U,BTF2XlZyyKng-".
-
-5.2. Mailbox Size and Message Status Updates
-
- At any time, a server can send data that the client did not request.
- Sometimes, such behavior is REQUIRED. For example, agents other than
- the server MAY add messages to the mailbox (e.g., new message
- delivery), change the flags of the messages in the mailbox (e.g.,
- simultaneous access to the same mailbox by multiple agents), or even
- remove messages from the mailbox. A server MUST send mailbox size
- updates automatically if a mailbox size change is observed during the
- processing of a command. A server SHOULD send message flag updates
- automatically, without requiring the client to request such updates
- explicitly.
-
- Special rules exist for server notification of a client about the
- removal of messages to prevent synchronization errors; see the
- description of the EXPUNGE response for more detail. In particular,
- it is NOT permitted to send an EXISTS response that would reduce the
- number of messages in the mailbox; only the EXPUNGE response can do
- this.
-
- Regardless of what implementation decisions a client makes on
- remembering data from the server, a client implementation MUST record
- mailbox size updates. It MUST NOT assume that any command after the
- initial mailbox selection will return the size of the mailbox.
-
-5.3. Response when no Command in Progress
-
- Server implementations are permitted to send an untagged response
- (except for EXPUNGE) while there is no command in progress. Server
- implementations that send such responses MUST deal with flow control
- considerations. Specifically, they MUST either (1) verify that the
- size of the data does not exceed the underlying transport's available
- window size, or (2) use non-blocking writes.
-
-
-
-
-
-
-
-Crispin Standards Track [Page 21]
-
-RFC 3501 IMAPv4 March 2003
-
-
-5.4. Autologout Timer
-
- If a server has an inactivity autologout timer, the duration of that
- timer MUST be at least 30 minutes. The receipt of ANY command from
- the client during that interval SHOULD suffice to reset the
- autologout timer.
-
-5.5. Multiple Commands in Progress
-
- The client MAY send another command without waiting for the
- completion result response of a command, subject to ambiguity rules
- (see below) and flow control constraints on the underlying data
- stream. Similarly, a server MAY begin processing another command
- before processing the current command to completion, subject to
- ambiguity rules. However, any command continuation request responses
- and command continuations MUST be negotiated before any subsequent
- command is initiated.
-
- The exception is if an ambiguity would result because of a command
- that would affect the results of other commands. Clients MUST NOT
- send multiple commands without waiting if an ambiguity would result.
- If the server detects a possible ambiguity, it MUST execute commands
- to completion in the order given by the client.
-
- The most obvious example of ambiguity is when a command would affect
- the results of another command, e.g., a FETCH of a message's flags
- and a STORE of that same message's flags.
-
- A non-obvious ambiguity occurs with commands that permit an untagged
- EXPUNGE response (commands other than FETCH, STORE, and SEARCH),
- since an untagged EXPUNGE response can invalidate sequence numbers in
- a subsequent command. This is not a problem for FETCH, STORE, or
- SEARCH commands because servers are prohibited from sending EXPUNGE
- responses while any of those commands are in progress. Therefore, if
- the client sends any command other than FETCH, STORE, or SEARCH, it
- MUST wait for the completion result response before sending a command
- with message sequence numbers.
-
- Note: UID FETCH, UID STORE, and UID SEARCH are different
- commands from FETCH, STORE, and SEARCH. If the client
- sends a UID command, it must wait for a completion result
- response before sending a command with message sequence
- numbers.
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 22]
-
-RFC 3501 IMAPv4 March 2003
-
-
- For example, the following non-waiting command sequences are invalid:
-
- FETCH + NOOP + STORE
- STORE + COPY + FETCH
- COPY + COPY
- CHECK + FETCH
-
- The following are examples of valid non-waiting command sequences:
-
- FETCH + STORE + SEARCH + CHECK
- STORE + COPY + EXPUNGE
-
- UID SEARCH + UID SEARCH may be valid or invalid as a non-waiting
- command sequence, depending upon whether or not the second UID
- SEARCH contains message sequence numbers.
-
-6. Client Commands
-
- IMAP4rev1 commands are described in this section. Commands are
- organized by the state in which the command is permitted. Commands
- which are permitted in multiple states are listed in the minimum
- permitted state (for example, commands valid in authenticated and
- selected state are listed in the authenticated state commands).
-
- Command arguments, identified by "Arguments:" in the command
- descriptions below, are described by function, not by syntax. The
- precise syntax of command arguments is described in the Formal Syntax
- section.
-
- Some commands cause specific server responses to be returned; these
- are identified by "Responses:" in the command descriptions below.
- See the response descriptions in the Responses section for
- information on these responses, and the Formal Syntax section for the
- precise syntax of these responses. It is possible for server data to
- be transmitted as a result of any command. Thus, commands that do
- not specifically require server data specify "no specific responses
- for this command" instead of "none".
-
- The "Result:" in the command description refers to the possible
- tagged status responses to a command, and any special interpretation
- of these status responses.
-
- The state of a connection is only changed by successful commands
- which are documented as changing state. A rejected command (BAD
- response) never changes the state of the connection or of the
- selected mailbox. A failed command (NO response) generally does not
- change the state of the connection or of the selected mailbox; the
- exception being the SELECT and EXAMINE commands.
-
-
-
-Crispin Standards Track [Page 23]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.1. Client Commands - Any State
-
- The following commands are valid in any state: CAPABILITY, NOOP, and
- LOGOUT.
-
-6.1.1. CAPABILITY Command
-
- Arguments: none
-
- Responses: REQUIRED untagged response: CAPABILITY
-
- Result: OK - capability completed
- BAD - command unknown or arguments invalid
-
- The CAPABILITY command requests a listing of capabilities that the
- server supports. The server MUST send a single untagged
- CAPABILITY response with "IMAP4rev1" as one of the listed
- capabilities before the (tagged) OK response.
-
- A capability name which begins with "AUTH=" indicates that the
- server supports that particular authentication mechanism. All
- such names are, by definition, part of this specification. For
- example, the authorization capability for an experimental
- "blurdybloop" authenticator would be "AUTH=XBLURDYBLOOP" and not
- "XAUTH=BLURDYBLOOP" or "XAUTH=XBLURDYBLOOP".
-
- Other capability names refer to extensions, revisions, or
- amendments to this specification. See the documentation of the
- CAPABILITY response for additional information. No capabilities,
- beyond the base IMAP4rev1 set defined in this specification, are
- enabled without explicit client action to invoke the capability.
-
- Client and server implementations MUST implement the STARTTLS,
- LOGINDISABLED, and AUTH=PLAIN (described in [IMAP-TLS])
- capabilities. See the Security Considerations section for
- important information.
-
- See the section entitled "Client Commands -
- Experimental/Expansion" for information about the form of site or
- implementation-specific capabilities.
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 24]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: C: abcd CAPABILITY
- S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=GSSAPI
- LOGINDISABLED
- S: abcd OK CAPABILITY completed
- C: efgh STARTTLS
- S: efgh OK STARTLS completed
- <TLS negotiation, further commands are under [TLS] layer>
- C: ijkl CAPABILITY
- S: * CAPABILITY IMAP4rev1 AUTH=GSSAPI AUTH=PLAIN
- S: ijkl OK CAPABILITY completed
-
-
-6.1.2. NOOP Command
-
- Arguments: none
-
- Responses: no specific responses for this command (but see below)
-
- Result: OK - noop completed
- BAD - command unknown or arguments invalid
-
- The NOOP command always succeeds. It does nothing.
-
- Since any command can return a status update as untagged data, the
- NOOP command can be used as a periodic poll for new messages or
- message status updates during a period of inactivity (this is the
- preferred method to do this). The NOOP command can also be used
- to reset any inactivity autologout timer on the server.
-
- Example: C: a002 NOOP
- S: a002 OK NOOP completed
- . . .
- C: a047 NOOP
- S: * 22 EXPUNGE
- S: * 23 EXISTS
- S: * 3 RECENT
- S: * 14 FETCH (FLAGS (\Seen \Deleted))
- S: a047 OK NOOP completed
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 25]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.1.3. LOGOUT Command
-
- Arguments: none
-
- Responses: REQUIRED untagged response: BYE
-
- Result: OK - logout completed
- BAD - command unknown or arguments invalid
-
- The LOGOUT command informs the server that the client is done with
- the connection. The server MUST send a BYE untagged response
- before the (tagged) OK response, and then close the network
- connection.
-
- Example: C: A023 LOGOUT
- S: * BYE IMAP4rev1 Server logging out
- S: A023 OK LOGOUT completed
- (Server and client then close the connection)
-
-6.2. Client Commands - Not Authenticated State
-
- In the not authenticated state, the AUTHENTICATE or LOGIN command
- establishes authentication and enters the authenticated state. The
- AUTHENTICATE command provides a general mechanism for a variety of
- authentication techniques, privacy protection, and integrity
- checking; whereas the LOGIN command uses a traditional user name and
- plaintext password pair and has no means of establishing privacy
- protection or integrity checking.
-
- The STARTTLS command is an alternate form of establishing session
- privacy protection and integrity checking, but does not establish
- authentication or enter the authenticated state.
-
- Server implementations MAY allow access to certain mailboxes without
- establishing authentication. This can be done by means of the
- ANONYMOUS [SASL] authenticator described in [ANONYMOUS]. An older
- convention is a LOGIN command using the userid "anonymous"; in this
- case, a password is required although the server may choose to accept
- any password. The restrictions placed on anonymous users are
- implementation-dependent.
-
- Once authenticated (including as anonymous), it is not possible to
- re-enter not authenticated state.
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 26]
-
-RFC 3501 IMAPv4 March 2003
-
-
- In addition to the universal commands (CAPABILITY, NOOP, and LOGOUT),
- the following commands are valid in the not authenticated state:
- STARTTLS, AUTHENTICATE and LOGIN. See the Security Considerations
- section for important information about these commands.
-
-6.2.1. STARTTLS Command
-
- Arguments: none
-
- Responses: no specific response for this command
-
- Result: OK - starttls completed, begin TLS negotiation
- BAD - command unknown or arguments invalid
-
- A [TLS] negotiation begins immediately after the CRLF at the end
- of the tagged OK response from the server. Once a client issues a
- STARTTLS command, it MUST NOT issue further commands until a
- server response is seen and the [TLS] negotiation is complete.
-
- The server remains in the non-authenticated state, even if client
- credentials are supplied during the [TLS] negotiation. This does
- not preclude an authentication mechanism such as EXTERNAL (defined
- in [SASL]) from using client identity determined by the [TLS]
- negotiation.
-
- Once [TLS] has been started, the client MUST discard cached
- information about server capabilities and SHOULD re-issue the
- CAPABILITY command. This is necessary to protect against man-in-
- the-middle attacks which alter the capabilities list prior to
- STARTTLS. The server MAY advertise different capabilities after
- STARTTLS.
-
- Example: C: a001 CAPABILITY
- S: * CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED
- S: a001 OK CAPABILITY completed
- C: a002 STARTTLS
- S: a002 OK Begin TLS negotiation now
- <TLS negotiation, further commands are under [TLS] layer>
- C: a003 CAPABILITY
- S: * CAPABILITY IMAP4rev1 AUTH=PLAIN
- S: a003 OK CAPABILITY completed
- C: a004 LOGIN joe password
- S: a004 OK LOGIN completed
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 27]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.2.2. AUTHENTICATE Command
-
- Arguments: authentication mechanism name
-
- Responses: continuation data can be requested
-
- Result: OK - authenticate completed, now in authenticated state
- NO - authenticate failure: unsupported authentication
- mechanism, credentials rejected
- BAD - command unknown or arguments invalid,
- authentication exchange cancelled
-
- The AUTHENTICATE command indicates a [SASL] authentication
- mechanism to the server. If the server supports the requested
- authentication mechanism, it performs an authentication protocol
- exchange to authenticate and identify the client. It MAY also
- negotiate an OPTIONAL security layer for subsequent protocol
- interactions. If the requested authentication mechanism is not
- supported, the server SHOULD reject the AUTHENTICATE command by
- sending a tagged NO response.
-
- The AUTHENTICATE command does not support the optional "initial
- response" feature of [SASL]. Section 5.1 of [SASL] specifies how
- to handle an authentication mechanism which uses an initial
- response.
-
- The service name specified by this protocol's profile of [SASL] is
- "imap".
-
- The authentication protocol exchange consists of a series of
- server challenges and client responses that are specific to the
- authentication mechanism. A server challenge consists of a
- command continuation request response with the "+" token followed
- by a BASE64 encoded string. The client response consists of a
- single line consisting of a BASE64 encoded string. If the client
- wishes to cancel an authentication exchange, it issues a line
- consisting of a single "*". If the server receives such a
- response, it MUST reject the AUTHENTICATE command by sending a
- tagged BAD response.
-
- If a security layer is negotiated through the [SASL]
- authentication exchange, it takes effect immediately following the
- CRLF that concludes the authentication exchange for the client,
- and the CRLF of the tagged OK response for the server.
-
- While client and server implementations MUST implement the
- AUTHENTICATE command itself, it is not required to implement any
- authentication mechanisms other than the PLAIN mechanism described
-
-
-
-Crispin Standards Track [Page 28]
-
-RFC 3501 IMAPv4 March 2003
-
-
- in [IMAP-TLS]. Also, an authentication mechanism is not required
- to support any security layers.
-
- Note: a server implementation MUST implement a
- configuration in which it does NOT permit any plaintext
- password mechanisms, unless either the STARTTLS command
- has been negotiated or some other mechanism that
- protects the session from password snooping has been
- provided. Server sites SHOULD NOT use any configuration
- which permits a plaintext password mechanism without
- such a protection mechanism against password snooping.
- Client and server implementations SHOULD implement
- additional [SASL] mechanisms that do not use plaintext
- passwords, such the GSSAPI mechanism described in [SASL]
- and/or the [DIGEST-MD5] mechanism.
-
- Servers and clients can support multiple authentication
- mechanisms. The server SHOULD list its supported authentication
- mechanisms in the response to the CAPABILITY command so that the
- client knows which authentication mechanisms to use.
-
- A server MAY include a CAPABILITY response code in the tagged OK
- response of a successful AUTHENTICATE command in order to send
- capabilities automatically. It is unnecessary for a client to
- send a separate CAPABILITY command if it recognizes these
- automatic capabilities. This should only be done if a security
- layer was not negotiated by the AUTHENTICATE command, because the
- tagged OK response as part of an AUTHENTICATE command is not
- protected by encryption/integrity checking. [SASL] requires the
- client to re-issue a CAPABILITY command in this case.
-
- If an AUTHENTICATE command fails with a NO response, the client
- MAY try another authentication mechanism by issuing another
- AUTHENTICATE command. It MAY also attempt to authenticate by
- using the LOGIN command (see section 6.2.3 for more detail). In
- other words, the client MAY request authentication types in
- decreasing order of preference, with the LOGIN command as a last
- resort.
-
- The authorization identity passed from the client to the server
- during the authentication exchange is interpreted by the server as
- the user name whose privileges the client is requesting.
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 29]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: S: * OK IMAP4rev1 Server
- C: A001 AUTHENTICATE GSSAPI
- S: +
- C: YIIB+wYJKoZIhvcSAQICAQBuggHqMIIB5qADAgEFoQMCAQ6iBw
- MFACAAAACjggEmYYIBIjCCAR6gAwIBBaESGxB1Lndhc2hpbmd0
- b24uZWR1oi0wK6ADAgEDoSQwIhsEaW1hcBsac2hpdmFtcy5jYW
- Mud2FzaGluZ3Rvbi5lZHWjgdMwgdCgAwIBAaEDAgEDooHDBIHA
- cS1GSa5b+fXnPZNmXB9SjL8Ollj2SKyb+3S0iXMljen/jNkpJX
- AleKTz6BQPzj8duz8EtoOuNfKgweViyn/9B9bccy1uuAE2HI0y
- C/PHXNNU9ZrBziJ8Lm0tTNc98kUpjXnHZhsMcz5Mx2GR6dGknb
- I0iaGcRerMUsWOuBmKKKRmVMMdR9T3EZdpqsBd7jZCNMWotjhi
- vd5zovQlFqQ2Wjc2+y46vKP/iXxWIuQJuDiisyXF0Y8+5GTpAL
- pHDc1/pIGmMIGjoAMCAQGigZsEgZg2on5mSuxoDHEA1w9bcW9n
- FdFxDKpdrQhVGVRDIzcCMCTzvUboqb5KjY1NJKJsfjRQiBYBdE
- NKfzK+g5DlV8nrw81uOcP8NOQCLR5XkoMHC0Dr/80ziQzbNqhx
- O6652Npft0LQwJvenwDI13YxpwOdMXzkWZN/XrEqOWp6GCgXTB
- vCyLWLlWnbaUkZdEYbKHBPjd8t/1x5Yg==
- S: + YGgGCSqGSIb3EgECAgIAb1kwV6ADAgEFoQMCAQ+iSzBJoAMC
- AQGiQgRAtHTEuOP2BXb9sBYFR4SJlDZxmg39IxmRBOhXRKdDA0
- uHTCOT9Bq3OsUTXUlk0CsFLoa8j+gvGDlgHuqzWHPSQg==
- C:
- S: + YDMGCSqGSIb3EgECAgIBAAD/////6jcyG4GE3KkTzBeBiVHe
- ceP2CWY0SR0fAQAgAAQEBAQ=
- C: YDMGCSqGSIb3EgECAgIBAAD/////3LQBHXTpFfZgrejpLlLImP
- wkhbfa2QteAQAgAG1yYwE=
- S: A001 OK GSSAPI authentication successful
-
- Note: The line breaks within server challenges and client
- responses are for editorial clarity and are not in real
- authenticators.
-
-
-6.2.3. LOGIN Command
-
- Arguments: user name
- password
-
- Responses: no specific responses for this command
-
- Result: OK - login completed, now in authenticated state
- NO - login failure: user name or password rejected
- BAD - command unknown or arguments invalid
-
- The LOGIN command identifies the client to the server and carries
- the plaintext password authenticating this user.
-
-
-
-
-
-
-Crispin Standards Track [Page 30]
-
-RFC 3501 IMAPv4 March 2003
-
-
- A server MAY include a CAPABILITY response code in the tagged OK
- response to a successful LOGIN command in order to send
- capabilities automatically. It is unnecessary for a client to
- send a separate CAPABILITY command if it recognizes these
- automatic capabilities.
-
- Example: C: a001 LOGIN SMITH SESAME
- S: a001 OK LOGIN completed
-
- Note: Use of the LOGIN command over an insecure network
- (such as the Internet) is a security risk, because anyone
- monitoring network traffic can obtain plaintext passwords.
- The LOGIN command SHOULD NOT be used except as a last
- resort, and it is recommended that client implementations
- have a means to disable any automatic use of the LOGIN
- command.
-
- Unless either the STARTTLS command has been negotiated or
- some other mechanism that protects the session from
- password snooping has been provided, a server
- implementation MUST implement a configuration in which it
- advertises the LOGINDISABLED capability and does NOT permit
- the LOGIN command. Server sites SHOULD NOT use any
- configuration which permits the LOGIN command without such
- a protection mechanism against password snooping. A client
- implementation MUST NOT send a LOGIN command if the
- LOGINDISABLED capability is advertised.
-
-6.3. Client Commands - Authenticated State
-
- In the authenticated state, commands that manipulate mailboxes as
- atomic entities are permitted. Of these commands, the SELECT and
- EXAMINE commands will select a mailbox for access and enter the
- selected state.
-
- In addition to the universal commands (CAPABILITY, NOOP, and LOGOUT),
- the following commands are valid in the authenticated state: SELECT,
- EXAMINE, CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, LSUB,
- STATUS, and APPEND.
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 31]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.3.1. SELECT Command
-
- Arguments: mailbox name
-
- Responses: REQUIRED untagged responses: FLAGS, EXISTS, RECENT
- REQUIRED OK untagged responses: UNSEEN, PERMANENTFLAGS,
- UIDNEXT, UIDVALIDITY
-
- Result: OK - select completed, now in selected state
- NO - select failure, now in authenticated state: no
- such mailbox, can't access mailbox
- BAD - command unknown or arguments invalid
-
- The SELECT command selects a mailbox so that messages in the
- mailbox can be accessed. Before returning an OK to the client,
- the server MUST send the following untagged data to the client.
- Note that earlier versions of this protocol only required the
- FLAGS, EXISTS, and RECENT untagged data; consequently, client
- implementations SHOULD implement default behavior for missing data
- as discussed with the individual item.
-
- FLAGS Defined flags in the mailbox. See the description
- of the FLAGS response for more detail.
-
- <n> EXISTS The number of messages in the mailbox. See the
- description of the EXISTS response for more detail.
-
- <n> RECENT The number of messages with the \Recent flag set.
- See the description of the RECENT response for more
- detail.
-
- OK [UNSEEN <n>]
- The message sequence number of the first unseen
- message in the mailbox. If this is missing, the
- client can not make any assumptions about the first
- unseen message in the mailbox, and needs to issue a
- SEARCH command if it wants to find it.
-
- OK [PERMANENTFLAGS (<list of flags>)]
- A list of message flags that the client can change
- permanently. If this is missing, the client should
- assume that all flags can be changed permanently.
-
- OK [UIDNEXT <n>]
- The next unique identifier value. Refer to section
- 2.3.1.1 for more information. If this is missing,
- the client can not make any assumptions about the
- next unique identifier value.
-
-
-
-Crispin Standards Track [Page 32]
-
-RFC 3501 IMAPv4 March 2003
-
-
- OK [UIDVALIDITY <n>]
- The unique identifier validity value. Refer to
- section 2.3.1.1 for more information. If this is
- missing, the server does not support unique
- identifiers.
-
- Only one mailbox can be selected at a time in a connection;
- simultaneous access to multiple mailboxes requires multiple
- connections. The SELECT command automatically deselects any
- currently selected mailbox before attempting the new selection.
- Consequently, if a mailbox is selected and a SELECT command that
- fails is attempted, no mailbox is selected.
-
- If the client is permitted to modify the mailbox, the server
- SHOULD prefix the text of the tagged OK response with the
- "[READ-WRITE]" response code.
-
- If the client is not permitted to modify the mailbox but is
- permitted read access, the mailbox is selected as read-only, and
- the server MUST prefix the text of the tagged OK response to
- SELECT with the "[READ-ONLY]" response code. Read-only access
- through SELECT differs from the EXAMINE command in that certain
- read-only mailboxes MAY permit the change of permanent state on a
- per-user (as opposed to global) basis. Netnews messages marked in
- a server-based .newsrc file are an example of such per-user
- permanent state that can be modified with read-only mailboxes.
-
- Example: C: A142 SELECT INBOX
- S: * 172 EXISTS
- S: * 1 RECENT
- S: * OK [UNSEEN 12] Message 12 is first unseen
- S: * OK [UIDVALIDITY 3857529045] UIDs valid
- S: * OK [UIDNEXT 4392] Predicted next UID
- S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
- S: A142 OK [READ-WRITE] SELECT completed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 33]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.3.2. EXAMINE Command
-
- Arguments: mailbox name
-
- Responses: REQUIRED untagged responses: FLAGS, EXISTS, RECENT
- REQUIRED OK untagged responses: UNSEEN, PERMANENTFLAGS,
- UIDNEXT, UIDVALIDITY
-
- Result: OK - examine completed, now in selected state
- NO - examine failure, now in authenticated state: no
- such mailbox, can't access mailbox
- BAD - command unknown or arguments invalid
-
- The EXAMINE command is identical to SELECT and returns the same
- output; however, the selected mailbox is identified as read-only.
- No changes to the permanent state of the mailbox, including
- per-user state, are permitted; in particular, EXAMINE MUST NOT
- cause messages to lose the \Recent flag.
-
- The text of the tagged OK response to the EXAMINE command MUST
- begin with the "[READ-ONLY]" response code.
-
- Example: C: A932 EXAMINE blurdybloop
- S: * 17 EXISTS
- S: * 2 RECENT
- S: * OK [UNSEEN 8] Message 8 is first unseen
- S: * OK [UIDVALIDITY 3857529045] UIDs valid
- S: * OK [UIDNEXT 4392] Predicted next UID
- S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- S: * OK [PERMANENTFLAGS ()] No permanent flags permitted
- S: A932 OK [READ-ONLY] EXAMINE completed
-
-
-6.3.3. CREATE Command
-
- Arguments: mailbox name
-
- Responses: no specific responses for this command
-
- Result: OK - create completed
- NO - create failure: can't create mailbox with that name
- BAD - command unknown or arguments invalid
-
- The CREATE command creates a mailbox with the given name. An OK
- response is returned only if a new mailbox with that name has been
- created. It is an error to attempt to create INBOX or a mailbox
- with a name that refers to an extant mailbox. Any error in
- creation will return a tagged NO response.
-
-
-
-Crispin Standards Track [Page 34]
-
-RFC 3501 IMAPv4 March 2003
-
-
- If the mailbox name is suffixed with the server's hierarchy
- separator character (as returned from the server by a LIST
- command), this is a declaration that the client intends to create
- mailbox names under this name in the hierarchy. Server
- implementations that do not require this declaration MUST ignore
- the declaration. In any case, the name created is without the
- trailing hierarchy delimiter.
-
- If the server's hierarchy separator character appears elsewhere in
- the name, the server SHOULD create any superior hierarchical names
- that are needed for the CREATE command to be successfully
- completed. In other words, an attempt to create "foo/bar/zap" on
- a server in which "/" is the hierarchy separator character SHOULD
- create foo/ and foo/bar/ if they do not already exist.
-
- If a new mailbox is created with the same name as a mailbox which
- was deleted, its unique identifiers MUST be greater than any
- unique identifiers used in the previous incarnation of the mailbox
- UNLESS the new incarnation has a different unique identifier
- validity value. See the description of the UID command for more
- detail.
-
- Example: C: A003 CREATE owatagusiam/
- S: A003 OK CREATE completed
- C: A004 CREATE owatagusiam/blurdybloop
- S: A004 OK CREATE completed
-
- Note: The interpretation of this example depends on whether
- "/" was returned as the hierarchy separator from LIST. If
- "/" is the hierarchy separator, a new level of hierarchy
- named "owatagusiam" with a member called "blurdybloop" is
- created. Otherwise, two mailboxes at the same hierarchy
- level are created.
-
-
-6.3.4. DELETE Command
-
- Arguments: mailbox name
-
- Responses: no specific responses for this command
-
- Result: OK - delete completed
- NO - delete failure: can't delete mailbox with that name
- BAD - command unknown or arguments invalid
-
-
-
-
-
-
-
-Crispin Standards Track [Page 35]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The DELETE command permanently removes the mailbox with the given
- name. A tagged OK response is returned only if the mailbox has
- been deleted. It is an error to attempt to delete INBOX or a
- mailbox name that does not exist.
-
- The DELETE command MUST NOT remove inferior hierarchical names.
- For example, if a mailbox "foo" has an inferior "foo.bar"
- (assuming "." is the hierarchy delimiter character), removing
- "foo" MUST NOT remove "foo.bar". It is an error to attempt to
- delete a name that has inferior hierarchical names and also has
- the \Noselect mailbox name attribute (see the description of the
- LIST response for more details).
-
- It is permitted to delete a name that has inferior hierarchical
- names and does not have the \Noselect mailbox name attribute. In
- this case, all messages in that mailbox are removed, and the name
- will acquire the \Noselect mailbox name attribute.
-
- The value of the highest-used unique identifier of the deleted
- mailbox MUST be preserved so that a new mailbox created with the
- same name will not reuse the identifiers of the former
- incarnation, UNLESS the new incarnation has a different unique
- identifier validity value. See the description of the UID command
- for more detail.
-
- Examples: C: A682 LIST "" *
- S: * LIST () "/" blurdybloop
- S: * LIST (\Noselect) "/" foo
- S: * LIST () "/" foo/bar
- S: A682 OK LIST completed
- C: A683 DELETE blurdybloop
- S: A683 OK DELETE completed
- C: A684 DELETE foo
- S: A684 NO Name "foo" has inferior hierarchical names
- C: A685 DELETE foo/bar
- S: A685 OK DELETE Completed
- C: A686 LIST "" *
- S: * LIST (\Noselect) "/" foo
- S: A686 OK LIST completed
- C: A687 DELETE foo
- S: A687 OK DELETE Completed
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 36]
-
-RFC 3501 IMAPv4 March 2003
-
-
- C: A82 LIST "" *
- S: * LIST () "." blurdybloop
- S: * LIST () "." foo
- S: * LIST () "." foo.bar
- S: A82 OK LIST completed
- C: A83 DELETE blurdybloop
- S: A83 OK DELETE completed
- C: A84 DELETE foo
- S: A84 OK DELETE Completed
- C: A85 LIST "" *
- S: * LIST () "." foo.bar
- S: A85 OK LIST completed
- C: A86 LIST "" %
- S: * LIST (\Noselect) "." foo
- S: A86 OK LIST completed
-
-
-6.3.5. RENAME Command
-
- Arguments: existing mailbox name
- new mailbox name
-
- Responses: no specific responses for this command
-
- Result: OK - rename completed
- NO - rename failure: can't rename mailbox with that name,
- can't rename to mailbox with that name
- BAD - command unknown or arguments invalid
-
- The RENAME command changes the name of a mailbox. A tagged OK
- response is returned only if the mailbox has been renamed. It is
- an error to attempt to rename from a mailbox name that does not
- exist or to a mailbox name that already exists. Any error in
- renaming will return a tagged NO response.
-
- If the name has inferior hierarchical names, then the inferior
- hierarchical names MUST also be renamed. For example, a rename of
- "foo" to "zap" will rename "foo/bar" (assuming "/" is the
- hierarchy delimiter character) to "zap/bar".
-
- If the server's hierarchy separator character appears in the name,
- the server SHOULD create any superior hierarchical names that are
- needed for the RENAME command to complete successfully. In other
- words, an attempt to rename "foo/bar/zap" to baz/rag/zowie on a
- server in which "/" is the hierarchy separator character SHOULD
- create baz/ and baz/rag/ if they do not already exist.
-
-
-
-
-
-Crispin Standards Track [Page 37]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The value of the highest-used unique identifier of the old mailbox
- name MUST be preserved so that a new mailbox created with the same
- name will not reuse the identifiers of the former incarnation,
- UNLESS the new incarnation has a different unique identifier
- validity value. See the description of the UID command for more
- detail.
-
- Renaming INBOX is permitted, and has special behavior. It moves
- all messages in INBOX to a new mailbox with the given name,
- leaving INBOX empty. If the server implementation supports
- inferior hierarchical names of INBOX, these are unaffected by a
- rename of INBOX.
-
- Examples: C: A682 LIST "" *
- S: * LIST () "/" blurdybloop
- S: * LIST (\Noselect) "/" foo
- S: * LIST () "/" foo/bar
- S: A682 OK LIST completed
- C: A683 RENAME blurdybloop sarasoop
- S: A683 OK RENAME completed
- C: A684 RENAME foo zowie
- S: A684 OK RENAME Completed
- C: A685 LIST "" *
- S: * LIST () "/" sarasoop
- S: * LIST (\Noselect) "/" zowie
- S: * LIST () "/" zowie/bar
- S: A685 OK LIST completed
-
- C: Z432 LIST "" *
- S: * LIST () "." INBOX
- S: * LIST () "." INBOX.bar
- S: Z432 OK LIST completed
- C: Z433 RENAME INBOX old-mail
- S: Z433 OK RENAME completed
- C: Z434 LIST "" *
- S: * LIST () "." INBOX
- S: * LIST () "." INBOX.bar
- S: * LIST () "." old-mail
- S: Z434 OK LIST completed
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 38]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.3.6. SUBSCRIBE Command
-
- Arguments: mailbox
-
- Responses: no specific responses for this command
-
- Result: OK - subscribe completed
- NO - subscribe failure: can't subscribe to that name
- BAD - command unknown or arguments invalid
-
- The SUBSCRIBE command adds the specified mailbox name to the
- server's set of "active" or "subscribed" mailboxes as returned by
- the LSUB command. This command returns a tagged OK response only
- if the subscription is successful.
-
- A server MAY validate the mailbox argument to SUBSCRIBE to verify
- that it exists. However, it MUST NOT unilaterally remove an
- existing mailbox name from the subscription list even if a mailbox
- by that name no longer exists.
-
- Note: This requirement is because a server site can
- choose to routinely remove a mailbox with a well-known
- name (e.g., "system-alerts") after its contents expire,
- with the intention of recreating it when new contents
- are appropriate.
-
-
- Example: C: A002 SUBSCRIBE #news.comp.mail.mime
- S: A002 OK SUBSCRIBE completed
-
-
-6.3.7. UNSUBSCRIBE Command
-
- Arguments: mailbox name
-
- Responses: no specific responses for this command
-
- Result: OK - unsubscribe completed
- NO - unsubscribe failure: can't unsubscribe that name
- BAD - command unknown or arguments invalid
-
- The UNSUBSCRIBE command removes the specified mailbox name from
- the server's set of "active" or "subscribed" mailboxes as returned
- by the LSUB command. This command returns a tagged OK response
- only if the unsubscription is successful.
-
- Example: C: A002 UNSUBSCRIBE #news.comp.mail.mime
- S: A002 OK UNSUBSCRIBE completed
-
-
-
-Crispin Standards Track [Page 39]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.3.8. LIST Command
-
- Arguments: reference name
- mailbox name with possible wildcards
-
- Responses: untagged responses: LIST
-
- Result: OK - list completed
- NO - list failure: can't list that reference or name
- BAD - command unknown or arguments invalid
-
- The LIST command returns a subset of names from the complete set
- of all names available to the client. Zero or more untagged LIST
- replies are returned, containing the name attributes, hierarchy
- delimiter, and name; see the description of the LIST reply for
- more detail.
-
- The LIST command SHOULD return its data quickly, without undue
- delay. For example, it SHOULD NOT go to excess trouble to
- calculate the \Marked or \Unmarked status or perform other
- processing; if each name requires 1 second of processing, then a
- list of 1200 names would take 20 minutes!
-
- An empty ("" string) reference name argument indicates that the
- mailbox name is interpreted as by SELECT. The returned mailbox
- names MUST match the supplied mailbox name pattern. A non-empty
- reference name argument is the name of a mailbox or a level of
- mailbox hierarchy, and indicates the context in which the mailbox
- name is interpreted.
-
- An empty ("" string) mailbox name argument is a special request to
- return the hierarchy delimiter and the root name of the name given
- in the reference. The value returned as the root MAY be the empty
- string if the reference is non-rooted or is an empty string. In
- all cases, a hierarchy delimiter (or NIL if there is no hierarchy)
- is returned. This permits a client to get the hierarchy delimiter
- (or find out that the mailbox names are flat) even when no
- mailboxes by that name currently exist.
-
- The reference and mailbox name arguments are interpreted into a
- canonical form that represents an unambiguous left-to-right
- hierarchy. The returned mailbox names will be in the interpreted
- form.
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 40]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Note: The interpretation of the reference argument is
- implementation-defined. It depends upon whether the
- server implementation has a concept of the "current
- working directory" and leading "break out characters",
- which override the current working directory.
-
- For example, on a server which exports a UNIX or NT
- filesystem, the reference argument contains the current
- working directory, and the mailbox name argument would
- contain the name as interpreted in the current working
- directory.
-
- If a server implementation has no concept of break out
- characters, the canonical form is normally the reference
- name appended with the mailbox name. Note that if the
- server implements the namespace convention (section
- 5.1.2), "#" is a break out character and must be treated
- as such.
-
- If the reference argument is not a level of mailbox
- hierarchy (that is, it is a \NoInferiors name), and/or
- the reference argument does not end with the hierarchy
- delimiter, it is implementation-dependent how this is
- interpreted. For example, a reference of "foo/bar" and
- mailbox name of "rag/baz" could be interpreted as
- "foo/bar/rag/baz", "foo/barrag/baz", or "foo/rag/baz".
- A client SHOULD NOT use such a reference argument except
- at the explicit request of the user. A hierarchical
- browser MUST NOT make any assumptions about server
- interpretation of the reference unless the reference is
- a level of mailbox hierarchy AND ends with the hierarchy
- delimiter.
-
- Any part of the reference argument that is included in the
- interpreted form SHOULD prefix the interpreted form. It SHOULD
- also be in the same form as the reference name argument. This
- rule permits the client to determine if the returned mailbox name
- is in the context of the reference argument, or if something about
- the mailbox argument overrode the reference argument. Without
- this rule, the client would have to have knowledge of the server's
- naming semantics including what characters are "breakouts" that
- override a naming context.
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 41]
-
-RFC 3501 IMAPv4 March 2003
-
-
- For example, here are some examples of how references
- and mailbox names might be interpreted on a UNIX-based
- server:
-
- Reference Mailbox Name Interpretation
- ------------ ------------ --------------
- ~smith/Mail/ foo.* ~smith/Mail/foo.*
- archive/ % archive/%
- #news. comp.mail.* #news.comp.mail.*
- ~smith/Mail/ /usr/doc/foo /usr/doc/foo
- archive/ ~fred/Mail/* ~fred/Mail/*
-
- The first three examples demonstrate interpretations in
- the context of the reference argument. Note that
- "~smith/Mail" SHOULD NOT be transformed into something
- like "/u2/users/smith/Mail", or it would be impossible
- for the client to determine that the interpretation was
- in the context of the reference.
-
- The character "*" is a wildcard, and matches zero or more
- characters at this position. The character "%" is similar to "*",
- but it does not match a hierarchy delimiter. If the "%" wildcard
- is the last character of a mailbox name argument, matching levels
- of hierarchy are also returned. If these levels of hierarchy are
- not also selectable mailboxes, they are returned with the
- \Noselect mailbox name attribute (see the description of the LIST
- response for more details).
-
- Server implementations are permitted to "hide" otherwise
- accessible mailboxes from the wildcard characters, by preventing
- certain characters or names from matching a wildcard in certain
- situations. For example, a UNIX-based server might restrict the
- interpretation of "*" so that an initial "/" character does not
- match.
-
- The special name INBOX is included in the output from LIST, if
- INBOX is supported by this server for this user and if the
- uppercase string "INBOX" matches the interpreted reference and
- mailbox name arguments with wildcards as described above. The
- criteria for omitting INBOX is whether SELECT INBOX will return
- failure; it is not relevant whether the user's real INBOX resides
- on this or some other server.
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 42]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: C: A101 LIST "" ""
- S: * LIST (\Noselect) "/" ""
- S: A101 OK LIST Completed
- C: A102 LIST #news.comp.mail.misc ""
- S: * LIST (\Noselect) "." #news.
- S: A102 OK LIST Completed
- C: A103 LIST /usr/staff/jones ""
- S: * LIST (\Noselect) "/" /
- S: A103 OK LIST Completed
- C: A202 LIST ~/Mail/ %
- S: * LIST (\Noselect) "/" ~/Mail/foo
- S: * LIST () "/" ~/Mail/meetings
- S: A202 OK LIST completed
-
-
-6.3.9. LSUB Command
-
- Arguments: reference name
- mailbox name with possible wildcards
-
- Responses: untagged responses: LSUB
-
- Result: OK - lsub completed
- NO - lsub failure: can't list that reference or name
- BAD - command unknown or arguments invalid
-
- The LSUB command returns a subset of names from the set of names
- that the user has declared as being "active" or "subscribed".
- Zero or more untagged LSUB replies are returned. The arguments to
- LSUB are in the same form as those for LIST.
-
- The returned untagged LSUB response MAY contain different mailbox
- flags from a LIST untagged response. If this should happen, the
- flags in the untagged LIST are considered more authoritative.
-
- A special situation occurs when using LSUB with the % wildcard.
- Consider what happens if "foo/bar" (with a hierarchy delimiter of
- "/") is subscribed but "foo" is not. A "%" wildcard to LSUB must
- return foo, not foo/bar, in the LSUB response, and it MUST be
- flagged with the \Noselect attribute.
-
- The server MUST NOT unilaterally remove an existing mailbox name
- from the subscription list even if a mailbox by that name no
- longer exists.
-
-
-
-
-
-
-
-Crispin Standards Track [Page 43]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: C: A002 LSUB "#news." "comp.mail.*"
- S: * LSUB () "." #news.comp.mail.mime
- S: * LSUB () "." #news.comp.mail.misc
- S: A002 OK LSUB completed
- C: A003 LSUB "#news." "comp.%"
- S: * LSUB (\NoSelect) "." #news.comp.mail
- S: A003 OK LSUB completed
-
-
-6.3.10. STATUS Command
-
- Arguments: mailbox name
- status data item names
-
- Responses: untagged responses: STATUS
-
- Result: OK - status completed
- NO - status failure: no status for that name
- BAD - command unknown or arguments invalid
-
- The STATUS command requests the status of the indicated mailbox.
- It does not change the currently selected mailbox, nor does it
- affect the state of any messages in the queried mailbox (in
- particular, STATUS MUST NOT cause messages to lose the \Recent
- flag).
-
- The STATUS command provides an alternative to opening a second
- IMAP4rev1 connection and doing an EXAMINE command on a mailbox to
- query that mailbox's status without deselecting the current
- mailbox in the first IMAP4rev1 connection.
-
- Unlike the LIST command, the STATUS command is not guaranteed to
- be fast in its response. Under certain circumstances, it can be
- quite slow. In some implementations, the server is obliged to
- open the mailbox read-only internally to obtain certain status
- information. Also unlike the LIST command, the STATUS command
- does not accept wildcards.
-
- Note: The STATUS command is intended to access the
- status of mailboxes other than the currently selected
- mailbox. Because the STATUS command can cause the
- mailbox to be opened internally, and because this
- information is available by other means on the selected
- mailbox, the STATUS command SHOULD NOT be used on the
- currently selected mailbox.
-
-
-
-
-
-
-Crispin Standards Track [Page 44]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The STATUS command MUST NOT be used as a "check for new
- messages in the selected mailbox" operation (refer to
- sections 7, 7.3.1, and 7.3.2 for more information about
- the proper method for new message checking).
-
- Because the STATUS command is not guaranteed to be fast
- in its results, clients SHOULD NOT expect to be able to
- issue many consecutive STATUS commands and obtain
- reasonable performance.
-
- The currently defined status data items that can be requested are:
-
- MESSAGES
- The number of messages in the mailbox.
-
- RECENT
- The number of messages with the \Recent flag set.
-
- UIDNEXT
- The next unique identifier value of the mailbox. Refer to
- section 2.3.1.1 for more information.
-
- UIDVALIDITY
- The unique identifier validity value of the mailbox. Refer to
- section 2.3.1.1 for more information.
-
- UNSEEN
- The number of messages which do not have the \Seen flag set.
-
-
- Example: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES)
- S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)
- S: A042 OK STATUS completed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 45]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.3.11. APPEND Command
-
- Arguments: mailbox name
- OPTIONAL flag parenthesized list
- OPTIONAL date/time string
- message literal
-
- Responses: no specific responses for this command
-
- Result: OK - append completed
- NO - append error: can't append to that mailbox, error
- in flags or date/time or message text
- BAD - command unknown or arguments invalid
-
- The APPEND command appends the literal argument as a new message
- to the end of the specified destination mailbox. This argument
- SHOULD be in the format of an [RFC-2822] message. 8-bit
- characters are permitted in the message. A server implementation
- that is unable to preserve 8-bit data properly MUST be able to
- reversibly convert 8-bit APPEND data to 7-bit using a [MIME-IMB]
- content transfer encoding.
-
- Note: There MAY be exceptions, e.g., draft messages, in
- which required [RFC-2822] header lines are omitted in
- the message literal argument to APPEND. The full
- implications of doing so MUST be understood and
- carefully weighed.
-
- If a flag parenthesized list is specified, the flags SHOULD be set
- in the resulting message; otherwise, the flag list of the
- resulting message is set to empty by default. In either case, the
- Recent flag is also set.
-
- If a date-time is specified, the internal date SHOULD be set in
- the resulting message; otherwise, the internal date of the
- resulting message is set to the current date and time by default.
-
- If the append is unsuccessful for any reason, the mailbox MUST be
- restored to its state before the APPEND attempt; no partial
- appending is permitted.
-
- If the destination mailbox does not exist, a server MUST return an
- error, and MUST NOT automatically create the mailbox. Unless it
- is certain that the destination mailbox can not be created, the
- server MUST send the response code "[TRYCREATE]" as the prefix of
- the text of the tagged NO response. This gives a hint to the
- client that it can attempt a CREATE command and retry the APPEND
- if the CREATE is successful.
-
-
-
-Crispin Standards Track [Page 46]
-
-RFC 3501 IMAPv4 March 2003
-
-
- If the mailbox is currently selected, the normal new message
- actions SHOULD occur. Specifically, the server SHOULD notify the
- client immediately via an untagged EXISTS response. If the server
- does not do so, the client MAY issue a NOOP command (or failing
- that, a CHECK command) after one or more APPEND commands.
-
- Example: C: A003 APPEND saved-messages (\Seen) {310}
- S: + Ready for literal data
- C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
- C: From: Fred Foobar <foobar@Blurdybloop.COM>
- C: Subject: afternoon meeting
- C: To: mooch@owatagu.siam.edu
- C: Message-Id: <B27397-0100000@Blurdybloop.COM>
- C: MIME-Version: 1.0
- C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
- C:
- C: Hello Joe, do you think we can meet at 3:30 tomorrow?
- C:
- S: A003 OK APPEND completed
-
- Note: The APPEND command is not used for message delivery,
- because it does not provide a mechanism to transfer [SMTP]
- envelope information.
-
-6.4. Client Commands - Selected State
-
- In the selected state, commands that manipulate messages in a mailbox
- are permitted.
-
- In addition to the universal commands (CAPABILITY, NOOP, and LOGOUT),
- and the authenticated state commands (SELECT, EXAMINE, CREATE,
- DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, LSUB, STATUS, and
- APPEND), the following commands are valid in the selected state:
- CHECK, CLOSE, EXPUNGE, SEARCH, FETCH, STORE, COPY, and UID.
-
-6.4.1. CHECK Command
-
- Arguments: none
-
- Responses: no specific responses for this command
-
- Result: OK - check completed
- BAD - command unknown or arguments invalid
-
- The CHECK command requests a checkpoint of the currently selected
- mailbox. A checkpoint refers to any implementation-dependent
- housekeeping associated with the mailbox (e.g., resolving the
- server's in-memory state of the mailbox with the state on its
-
-
-
-Crispin Standards Track [Page 47]
-
-RFC 3501 IMAPv4 March 2003
-
-
- disk) that is not normally executed as part of each command. A
- checkpoint MAY take a non-instantaneous amount of real time to
- complete. If a server implementation has no such housekeeping
- considerations, CHECK is equivalent to NOOP.
-
- There is no guarantee that an EXISTS untagged response will happen
- as a result of CHECK. NOOP, not CHECK, SHOULD be used for new
- message polling.
-
- Example: C: FXXZ CHECK
- S: FXXZ OK CHECK Completed
-
-
-6.4.2. CLOSE Command
-
- Arguments: none
-
- Responses: no specific responses for this command
-
- Result: OK - close completed, now in authenticated state
- BAD - command unknown or arguments invalid
-
- The CLOSE command permanently removes all messages that have the
- \Deleted flag set from the currently selected mailbox, and returns
- to the authenticated state from the selected state. No untagged
- EXPUNGE responses are sent.
-
- No messages are removed, and no error is given, if the mailbox is
- selected by an EXAMINE command or is otherwise selected read-only.
-
- Even if a mailbox is selected, a SELECT, EXAMINE, or LOGOUT
- command MAY be issued without previously issuing a CLOSE command.
- The SELECT, EXAMINE, and LOGOUT commands implicitly close the
- currently selected mailbox without doing an expunge. However,
- when many messages are deleted, a CLOSE-LOGOUT or CLOSE-SELECT
- sequence is considerably faster than an EXPUNGE-LOGOUT or
- EXPUNGE-SELECT because no untagged EXPUNGE responses (which the
- client would probably ignore) are sent.
-
- Example: C: A341 CLOSE
- S: A341 OK CLOSE completed
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 48]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.4.3. EXPUNGE Command
-
- Arguments: none
-
- Responses: untagged responses: EXPUNGE
-
- Result: OK - expunge completed
- NO - expunge failure: can't expunge (e.g., permission
- denied)
- BAD - command unknown or arguments invalid
-
- The EXPUNGE command permanently removes all messages that have the
- \Deleted flag set from the currently selected mailbox. Before
- returning an OK to the client, an untagged EXPUNGE response is
- sent for each message that is removed.
-
- Example: C: A202 EXPUNGE
- S: * 3 EXPUNGE
- S: * 3 EXPUNGE
- S: * 5 EXPUNGE
- S: * 8 EXPUNGE
- S: A202 OK EXPUNGE completed
-
- Note: In this example, messages 3, 4, 7, and 11 had the
- \Deleted flag set. See the description of the EXPUNGE
- response for further explanation.
-
-
-6.4.4. SEARCH Command
-
- Arguments: OPTIONAL [CHARSET] specification
- searching criteria (one or more)
-
- Responses: REQUIRED untagged response: SEARCH
-
- Result: OK - search completed
- NO - search error: can't search that [CHARSET] or
- criteria
- BAD - command unknown or arguments invalid
-
- The SEARCH command searches the mailbox for messages that match
- the given searching criteria. Searching criteria consist of one
- or more search keys. The untagged SEARCH response from the server
- contains a listing of message sequence numbers corresponding to
- those messages that match the searching criteria.
-
-
-
-
-
-
-Crispin Standards Track [Page 49]
-
-RFC 3501 IMAPv4 March 2003
-
-
- When multiple keys are specified, the result is the intersection
- (AND function) of all the messages that match those keys. For
- example, the criteria DELETED FROM "SMITH" SINCE 1-Feb-1994 refers
- to all deleted messages from Smith that were placed in the mailbox
- since February 1, 1994. A search key can also be a parenthesized
- list of one or more search keys (e.g., for use with the OR and NOT
- keys).
-
- Server implementations MAY exclude [MIME-IMB] body parts with
- terminal content media types other than TEXT and MESSAGE from
- consideration in SEARCH matching.
-
- The OPTIONAL [CHARSET] specification consists of the word
- "CHARSET" followed by a registered [CHARSET]. It indicates the
- [CHARSET] of the strings that appear in the search criteria.
- [MIME-IMB] content transfer encodings, and [MIME-HDRS] strings in
- [RFC-2822]/[MIME-IMB] headers, MUST be decoded before comparing
- text in a [CHARSET] other than US-ASCII. US-ASCII MUST be
- supported; other [CHARSET]s MAY be supported.
-
- If the server does not support the specified [CHARSET], it MUST
- return a tagged NO response (not a BAD). This response SHOULD
- contain the BADCHARSET response code, which MAY list the
- [CHARSET]s supported by the server.
-
- In all search keys that use strings, a message matches the key if
- the string is a substring of the field. The matching is
- case-insensitive.
-
- The defined search keys are as follows. Refer to the Formal
- Syntax section for the precise syntactic definitions of the
- arguments.
-
- <sequence set>
- Messages with message sequence numbers corresponding to the
- specified message sequence number set.
-
- ALL
- All messages in the mailbox; the default initial key for
- ANDing.
-
- ANSWERED
- Messages with the \Answered flag set.
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 50]
-
-RFC 3501 IMAPv4 March 2003
-
-
- BCC <string>
- Messages that contain the specified string in the envelope
- structure's BCC field.
-
- BEFORE <date>
- Messages whose internal date (disregarding time and timezone)
- is earlier than the specified date.
-
- BODY <string>
- Messages that contain the specified string in the body of the
- message.
-
- CC <string>
- Messages that contain the specified string in the envelope
- structure's CC field.
-
- DELETED
- Messages with the \Deleted flag set.
-
- DRAFT
- Messages with the \Draft flag set.
-
- FLAGGED
- Messages with the \Flagged flag set.
-
- FROM <string>
- Messages that contain the specified string in the envelope
- structure's FROM field.
-
- HEADER <field-name> <string>
- Messages that have a header with the specified field-name (as
- defined in [RFC-2822]) and that contains the specified string
- in the text of the header (what comes after the colon). If the
- string to search is zero-length, this matches all messages that
- have a header line with the specified field-name regardless of
- the contents.
-
- KEYWORD <flag>
- Messages with the specified keyword flag set.
-
- LARGER <n>
- Messages with an [RFC-2822] size larger than the specified
- number of octets.
-
- NEW
- Messages that have the \Recent flag set but not the \Seen flag.
- This is functionally equivalent to "(RECENT UNSEEN)".
-
-
-
-
-Crispin Standards Track [Page 51]
-
-RFC 3501 IMAPv4 March 2003
-
-
- NOT <search-key>
- Messages that do not match the specified search key.
-
- OLD
- Messages that do not have the \Recent flag set. This is
- functionally equivalent to "NOT RECENT" (as opposed to "NOT
- NEW").
-
- ON <date>
- Messages whose internal date (disregarding time and timezone)
- is within the specified date.
-
- OR <search-key1> <search-key2>
- Messages that match either search key.
-
- RECENT
- Messages that have the \Recent flag set.
-
- SEEN
- Messages that have the \Seen flag set.
-
- SENTBEFORE <date>
- Messages whose [RFC-2822] Date: header (disregarding time and
- timezone) is earlier than the specified date.
-
- SENTON <date>
- Messages whose [RFC-2822] Date: header (disregarding time and
- timezone) is within the specified date.
-
- SENTSINCE <date>
- Messages whose [RFC-2822] Date: header (disregarding time and
- timezone) is within or later than the specified date.
-
- SINCE <date>
- Messages whose internal date (disregarding time and timezone)
- is within or later than the specified date.
-
- SMALLER <n>
- Messages with an [RFC-2822] size smaller than the specified
- number of octets.
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 52]
-
-RFC 3501 IMAPv4 March 2003
-
-
- SUBJECT <string>
- Messages that contain the specified string in the envelope
- structure's SUBJECT field.
-
- TEXT <string>
- Messages that contain the specified string in the header or
- body of the message.
-
- TO <string>
- Messages that contain the specified string in the envelope
- structure's TO field.
-
- UID <sequence set>
- Messages with unique identifiers corresponding to the specified
- unique identifier set. Sequence set ranges are permitted.
-
- UNANSWERED
- Messages that do not have the \Answered flag set.
-
- UNDELETED
- Messages that do not have the \Deleted flag set.
-
- UNDRAFT
- Messages that do not have the \Draft flag set.
-
- UNFLAGGED
- Messages that do not have the \Flagged flag set.
-
- UNKEYWORD <flag>
- Messages that do not have the specified keyword flag set.
-
- UNSEEN
- Messages that do not have the \Seen flag set.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 53]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: C: A282 SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM "Smith"
- S: * SEARCH 2 84 882
- S: A282 OK SEARCH completed
- C: A283 SEARCH TEXT "string not in mailbox"
- S: * SEARCH
- S: A283 OK SEARCH completed
- C: A284 SEARCH CHARSET UTF-8 TEXT {6}
- C: XXXXXX
- S: * SEARCH 43
- S: A284 OK SEARCH completed
-
- Note: Since this document is restricted to 7-bit ASCII
- text, it is not possible to show actual UTF-8 data. The
- "XXXXXX" is a placeholder for what would be 6 octets of
- 8-bit data in an actual transaction.
-
-
-6.4.5. FETCH Command
-
- Arguments: sequence set
- message data item names or macro
-
- Responses: untagged responses: FETCH
-
- Result: OK - fetch completed
- NO - fetch error: can't fetch that data
- BAD - command unknown or arguments invalid
-
- The FETCH command retrieves data associated with a message in the
- mailbox. The data items to be fetched can be either a single atom
- or a parenthesized list.
-
- Most data items, identified in the formal syntax under the
- msg-att-static rule, are static and MUST NOT change for any
- particular message. Other data items, identified in the formal
- syntax under the msg-att-dynamic rule, MAY change, either as a
- result of a STORE command or due to external events.
-
- For example, if a client receives an ENVELOPE for a
- message when it already knows the envelope, it can
- safely ignore the newly transmitted envelope.
-
- There are three macros which specify commonly-used sets of data
- items, and can be used instead of data items. A macro must be
- used by itself, and not in conjunction with other macros or data
- items.
-
-
-
-
-
-Crispin Standards Track [Page 54]
-
-RFC 3501 IMAPv4 March 2003
-
-
- ALL
- Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)
-
- FAST
- Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE)
-
- FULL
- Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE
- BODY)
-
- The currently defined data items that can be fetched are:
-
- BODY
- Non-extensible form of BODYSTRUCTURE.
-
- BODY[<section>]<<partial>>
- The text of a particular body section. The section
- specification is a set of zero or more part specifiers
- delimited by periods. A part specifier is either a part number
- or one of the following: HEADER, HEADER.FIELDS,
- HEADER.FIELDS.NOT, MIME, and TEXT. An empty section
- specification refers to the entire message, including the
- header.
-
- Every message has at least one part number. Non-[MIME-IMB]
- messages, and non-multipart [MIME-IMB] messages with no
- encapsulated message, only have a part 1.
-
- Multipart messages are assigned consecutive part numbers, as
- they occur in the message. If a particular part is of type
- message or multipart, its parts MUST be indicated by a period
- followed by the part number within that nested multipart part.
-
- A part of type MESSAGE/RFC822 also has nested part numbers,
- referring to parts of the MESSAGE part's body.
-
- The HEADER, HEADER.FIELDS, HEADER.FIELDS.NOT, and TEXT part
- specifiers can be the sole part specifier or can be prefixed by
- one or more numeric part specifiers, provided that the numeric
- part specifier refers to a part of type MESSAGE/RFC822. The
- MIME part specifier MUST be prefixed by one or more numeric
- part specifiers.
-
- The HEADER, HEADER.FIELDS, and HEADER.FIELDS.NOT part
- specifiers refer to the [RFC-2822] header of the message or of
- an encapsulated [MIME-IMT] MESSAGE/RFC822 message.
- HEADER.FIELDS and HEADER.FIELDS.NOT are followed by a list of
- field-name (as defined in [RFC-2822]) names, and return a
-
-
-
-Crispin Standards Track [Page 55]
-
-RFC 3501 IMAPv4 March 2003
-
-
- subset of the header. The subset returned by HEADER.FIELDS
- contains only those header fields with a field-name that
- matches one of the names in the list; similarly, the subset
- returned by HEADER.FIELDS.NOT contains only the header fields
- with a non-matching field-name. The field-matching is
- case-insensitive but otherwise exact. Subsetting does not
- exclude the [RFC-2822] delimiting blank line between the header
- and the body; the blank line is included in all header fetches,
- except in the case of a message which has no body and no blank
- line.
-
- The MIME part specifier refers to the [MIME-IMB] header for
- this part.
-
- The TEXT part specifier refers to the text body of the message,
- omitting the [RFC-2822] header.
-
- Here is an example of a complex message with some of its
- part specifiers:
-
- HEADER ([RFC-2822] header of the message)
- TEXT ([RFC-2822] text body of the message) MULTIPART/MIXED
- 1 TEXT/PLAIN
- 2 APPLICATION/OCTET-STREAM
- 3 MESSAGE/RFC822
- 3.HEADER ([RFC-2822] header of the message)
- 3.TEXT ([RFC-2822] text body of the message) MULTIPART/MIXED
- 3.1 TEXT/PLAIN
- 3.2 APPLICATION/OCTET-STREAM
- 4 MULTIPART/MIXED
- 4.1 IMAGE/GIF
- 4.1.MIME ([MIME-IMB] header for the IMAGE/GIF)
- 4.2 MESSAGE/RFC822
- 4.2.HEADER ([RFC-2822] header of the message)
- 4.2.TEXT ([RFC-2822] text body of the message) MULTIPART/MIXED
- 4.2.1 TEXT/PLAIN
- 4.2.2 MULTIPART/ALTERNATIVE
- 4.2.2.1 TEXT/PLAIN
- 4.2.2.2 TEXT/RICHTEXT
-
-
- It is possible to fetch a substring of the designated text.
- This is done by appending an open angle bracket ("<"), the
- octet position of the first desired octet, a period, the
- maximum number of octets desired, and a close angle bracket
- (">") to the part specifier. If the starting octet is beyond
- the end of the text, an empty string is returned.
-
-
-
-
-Crispin Standards Track [Page 56]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Any partial fetch that attempts to read beyond the end of the
- text is truncated as appropriate. A partial fetch that starts
- at octet 0 is returned as a partial fetch, even if this
- truncation happened.
-
- Note: This means that BODY[]<0.2048> of a 1500-octet message
- will return BODY[]<0> with a literal of size 1500, not
- BODY[].
-
- Note: A substring fetch of a HEADER.FIELDS or
- HEADER.FIELDS.NOT part specifier is calculated after
- subsetting the header.
-
- The \Seen flag is implicitly set; if this causes the flags to
- change, they SHOULD be included as part of the FETCH responses.
-
- BODY.PEEK[<section>]<<partial>>
- An alternate form of BODY[<section>] that does not implicitly
- set the \Seen flag.
-
- BODYSTRUCTURE
- The [MIME-IMB] body structure of the message. This is computed
- by the server by parsing the [MIME-IMB] header fields in the
- [RFC-2822] header and [MIME-IMB] headers.
-
- ENVELOPE
- The envelope structure of the message. This is computed by the
- server by parsing the [RFC-2822] header into the component
- parts, defaulting various fields as necessary.
-
- FLAGS
- The flags that are set for this message.
-
- INTERNALDATE
- The internal date of the message.
-
- RFC822
- Functionally equivalent to BODY[], differing in the syntax of
- the resulting untagged FETCH data (RFC822 is returned).
-
- RFC822.HEADER
- Functionally equivalent to BODY.PEEK[HEADER], differing in the
- syntax of the resulting untagged FETCH data (RFC822.HEADER is
- returned).
-
- RFC822.SIZE
- The [RFC-2822] size of the message.
-
-
-
-
-Crispin Standards Track [Page 57]
-
-RFC 3501 IMAPv4 March 2003
-
-
- RFC822.TEXT
- Functionally equivalent to BODY[TEXT], differing in the syntax
- of the resulting untagged FETCH data (RFC822.TEXT is returned).
-
- UID
- The unique identifier for the message.
-
-
- Example: C: A654 FETCH 2:4 (FLAGS BODY[HEADER.FIELDS (DATE FROM)])
- S: * 2 FETCH ....
- S: * 3 FETCH ....
- S: * 4 FETCH ....
- S: A654 OK FETCH completed
-
-
-6.4.6. STORE Command
-
- Arguments: sequence set
- message data item name
- value for message data item
-
- Responses: untagged responses: FETCH
-
- Result: OK - store completed
- NO - store error: can't store that data
- BAD - command unknown or arguments invalid
-
- The STORE command alters data associated with a message in the
- mailbox. Normally, STORE will return the updated value of the
- data with an untagged FETCH response. A suffix of ".SILENT" in
- the data item name prevents the untagged FETCH, and the server
- SHOULD assume that the client has determined the updated value
- itself or does not care about the updated value.
-
- Note: Regardless of whether or not the ".SILENT" suffix
- was used, the server SHOULD send an untagged FETCH
- response if a change to a message's flags from an
- external source is observed. The intent is that the
- status of the flags is determinate without a race
- condition.
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 58]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The currently defined data items that can be stored are:
-
- FLAGS <flag list>
- Replace the flags for the message (other than \Recent) with the
- argument. The new value of the flags is returned as if a FETCH
- of those flags was done.
-
- FLAGS.SILENT <flag list>
- Equivalent to FLAGS, but without returning a new value.
-
- +FLAGS <flag list>
- Add the argument to the flags for the message. The new value
- of the flags is returned as if a FETCH of those flags was done.
-
- +FLAGS.SILENT <flag list>
- Equivalent to +FLAGS, but without returning a new value.
-
- -FLAGS <flag list>
- Remove the argument from the flags for the message. The new
- value of the flags is returned as if a FETCH of those flags was
- done.
-
- -FLAGS.SILENT <flag list>
- Equivalent to -FLAGS, but without returning a new value.
-
-
- Example: C: A003 STORE 2:4 +FLAGS (\Deleted)
- S: * 2 FETCH (FLAGS (\Deleted \Seen))
- S: * 3 FETCH (FLAGS (\Deleted))
- S: * 4 FETCH (FLAGS (\Deleted \Flagged \Seen))
- S: A003 OK STORE completed
-
-
-6.4.7. COPY Command
-
- Arguments: sequence set
- mailbox name
-
- Responses: no specific responses for this command
-
- Result: OK - copy completed
- NO - copy error: can't copy those messages or to that
- name
- BAD - command unknown or arguments invalid
-
-
-
-
-
-
-
-Crispin Standards Track [Page 59]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The COPY command copies the specified message(s) to the end of the
- specified destination mailbox. The flags and internal date of the
- message(s) SHOULD be preserved, and the Recent flag SHOULD be set,
- in the copy.
-
- If the destination mailbox does not exist, a server SHOULD return
- an error. It SHOULD NOT automatically create the mailbox. Unless
- it is certain that the destination mailbox can not be created, the
- server MUST send the response code "[TRYCREATE]" as the prefix of
- the text of the tagged NO response. This gives a hint to the
- client that it can attempt a CREATE command and retry the COPY if
- the CREATE is successful.
-
- If the COPY command is unsuccessful for any reason, server
- implementations MUST restore the destination mailbox to its state
- before the COPY attempt.
-
- Example: C: A003 COPY 2:4 MEETING
- S: A003 OK COPY completed
-
-
-6.4.8. UID Command
-
- Arguments: command name
- command arguments
-
- Responses: untagged responses: FETCH, SEARCH
-
- Result: OK - UID command completed
- NO - UID command error
- BAD - command unknown or arguments invalid
-
- The UID command has two forms. In the first form, it takes as its
- arguments a COPY, FETCH, or STORE command with arguments
- appropriate for the associated command. However, the numbers in
- the sequence set argument are unique identifiers instead of
- message sequence numbers. Sequence set ranges are permitted, but
- there is no guarantee that unique identifiers will be contiguous.
-
- A non-existent unique identifier is ignored without any error
- message generated. Thus, it is possible for a UID FETCH command
- to return an OK without any data or a UID COPY or UID STORE to
- return an OK without performing any operations.
-
- In the second form, the UID command takes a SEARCH command with
- SEARCH command arguments. The interpretation of the arguments is
- the same as with SEARCH; however, the numbers returned in a SEARCH
- response for a UID SEARCH command are unique identifiers instead
-
-
-
-Crispin Standards Track [Page 60]
-
-RFC 3501 IMAPv4 March 2003
-
-
- of message sequence numbers. For example, the command UID SEARCH
- 1:100 UID 443:557 returns the unique identifiers corresponding to
- the intersection of two sequence sets, the message sequence number
- range 1:100 and the UID range 443:557.
-
- Note: in the above example, the UID range 443:557
- appears. The same comment about a non-existent unique
- identifier being ignored without any error message also
- applies here. Hence, even if neither UID 443 or 557
- exist, this range is valid and would include an existing
- UID 495.
-
- Also note that a UID range of 559:* always includes the
- UID of the last message in the mailbox, even if 559 is
- higher than any assigned UID value. This is because the
- contents of a range are independent of the order of the
- range endpoints. Thus, any UID range with * as one of
- the endpoints indicates at least one message (the
- message with the highest numbered UID), unless the
- mailbox is empty.
-
- The number after the "*" in an untagged FETCH response is always a
- message sequence number, not a unique identifier, even for a UID
- command response. However, server implementations MUST implicitly
- include the UID message data item as part of any FETCH response
- caused by a UID command, regardless of whether a UID was specified
- as a message data item to the FETCH.
-
-
- Note: The rule about including the UID message data item as part
- of a FETCH response primarily applies to the UID FETCH and UID
- STORE commands, including a UID FETCH command that does not
- include UID as a message data item. Although it is unlikely that
- the other UID commands will cause an untagged FETCH, this rule
- applies to these commands as well.
-
- Example: C: A999 UID FETCH 4827313:4828442 FLAGS
- S: * 23 FETCH (FLAGS (\Seen) UID 4827313)
- S: * 24 FETCH (FLAGS (\Seen) UID 4827943)
- S: * 25 FETCH (FLAGS (\Seen) UID 4828442)
- S: A999 OK UID FETCH completed
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 61]
-
-RFC 3501 IMAPv4 March 2003
-
-
-6.5. Client Commands - Experimental/Expansion
-
-
-6.5.1. X<atom> Command
-
- Arguments: implementation defined
-
- Responses: implementation defined
-
- Result: OK - command completed
- NO - failure
- BAD - command unknown or arguments invalid
-
- Any command prefixed with an X is an experimental command.
- Commands which are not part of this specification, a standard or
- standards-track revision of this specification, or an
- IESG-approved experimental protocol, MUST use the X prefix.
-
- Any added untagged responses issued by an experimental command
- MUST also be prefixed with an X. Server implementations MUST NOT
- send any such untagged responses, unless the client requested it
- by issuing the associated experimental command.
-
- Example: C: a441 CAPABILITY
- S: * CAPABILITY IMAP4rev1 XPIG-LATIN
- S: a441 OK CAPABILITY completed
- C: A442 XPIG-LATIN
- S: * XPIG-LATIN ow-nay eaking-spay ig-pay atin-lay
- S: A442 OK XPIG-LATIN ompleted-cay
-
-7. Server Responses
-
- Server responses are in three forms: status responses, server data,
- and command continuation request. The information contained in a
- server response, identified by "Contents:" in the response
- descriptions below, is described by function, not by syntax. The
- precise syntax of server responses is described in the Formal Syntax
- section.
-
- The client MUST be prepared to accept any response at all times.
-
- Status responses can be tagged or untagged. Tagged status responses
- indicate the completion result (OK, NO, or BAD status) of a client
- command, and have a tag matching the command.
-
- Some status responses, and all server data, are untagged. An
- untagged response is indicated by the token "*" instead of a tag.
- Untagged status responses indicate server greeting, or server status
-
-
-
-Crispin Standards Track [Page 62]
-
-RFC 3501 IMAPv4 March 2003
-
-
- that does not indicate the completion of a command (for example, an
- impending system shutdown alert). For historical reasons, untagged
- server data responses are also called "unsolicited data", although
- strictly speaking, only unilateral server data is truly
- "unsolicited".
-
- Certain server data MUST be recorded by the client when it is
- received; this is noted in the description of that data. Such data
- conveys critical information which affects the interpretation of all
- subsequent commands and responses (e.g., updates reflecting the
- creation or destruction of messages).
-
- Other server data SHOULD be recorded for later reference; if the
- client does not need to record the data, or if recording the data has
- no obvious purpose (e.g., a SEARCH response when no SEARCH command is
- in progress), the data SHOULD be ignored.
-
- An example of unilateral untagged server data occurs when the IMAP
- connection is in the selected state. In the selected state, the
- server checks the mailbox for new messages as part of command
- execution. Normally, this is part of the execution of every command;
- hence, a NOOP command suffices to check for new messages. If new
- messages are found, the server sends untagged EXISTS and RECENT
- responses reflecting the new size of the mailbox. Server
- implementations that offer multiple simultaneous access to the same
- mailbox SHOULD also send appropriate unilateral untagged FETCH and
- EXPUNGE responses if another agent changes the state of any message
- flags or expunges any messages.
-
- Command continuation request responses use the token "+" instead of a
- tag. These responses are sent by the server to indicate acceptance
- of an incomplete client command and readiness for the remainder of
- the command.
-
-7.1. Server Responses - Status Responses
-
- Status responses are OK, NO, BAD, PREAUTH and BYE. OK, NO, and BAD
- can be tagged or untagged. PREAUTH and BYE are always untagged.
-
- Status responses MAY include an OPTIONAL "response code". A response
- code consists of data inside square brackets in the form of an atom,
- possibly followed by a space and arguments. The response code
- contains additional information or status codes for client software
- beyond the OK/NO/BAD condition, and are defined when there is a
- specific action that a client can take based upon the additional
- information.
-
-
-
-
-
-Crispin Standards Track [Page 63]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The currently defined response codes are:
-
- ALERT
-
- The human-readable text contains a special alert that MUST be
- presented to the user in a fashion that calls the user's
- attention to the message.
-
- BADCHARSET
-
- Optionally followed by a parenthesized list of charsets. A
- SEARCH failed because the given charset is not supported by
- this implementation. If the optional list of charsets is
- given, this lists the charsets that are supported by this
- implementation.
-
- CAPABILITY
-
- Followed by a list of capabilities. This can appear in the
- initial OK or PREAUTH response to transmit an initial
- capabilities list. This makes it unnecessary for a client to
- send a separate CAPABILITY command if it recognizes this
- response.
-
- PARSE
-
- The human-readable text represents an error in parsing the
- [RFC-2822] header or [MIME-IMB] headers of a message in the
- mailbox.
-
- PERMANENTFLAGS
-
- Followed by a parenthesized list of flags, indicates which of
- the known flags the client can change permanently. Any flags
- that are in the FLAGS untagged response, but not the
- PERMANENTFLAGS list, can not be set permanently. If the client
- attempts to STORE a flag that is not in the PERMANENTFLAGS
- list, the server will either ignore the change or store the
- state change for the remainder of the current session only.
- The PERMANENTFLAGS list can also include the special flag \*,
- which indicates that it is possible to create new keywords by
- attempting to store those flags in the mailbox.
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 64]
-
-RFC 3501 IMAPv4 March 2003
-
-
- READ-ONLY
-
- The mailbox is selected read-only, or its access while selected
- has changed from read-write to read-only.
-
- READ-WRITE
-
- The mailbox is selected read-write, or its access while
- selected has changed from read-only to read-write.
-
- TRYCREATE
-
- An APPEND or COPY attempt is failing because the target mailbox
- does not exist (as opposed to some other reason). This is a
- hint to the client that the operation can succeed if the
- mailbox is first created by the CREATE command.
-
- UIDNEXT
-
- Followed by a decimal number, indicates the next unique
- identifier value. Refer to section 2.3.1.1 for more
- information.
-
- UIDVALIDITY
-
- Followed by a decimal number, indicates the unique identifier
- validity value. Refer to section 2.3.1.1 for more information.
-
- UNSEEN
-
- Followed by a decimal number, indicates the number of the first
- message without the \Seen flag set.
-
- Additional response codes defined by particular client or server
- implementations SHOULD be prefixed with an "X" until they are
- added to a revision of this protocol. Client implementations
- SHOULD ignore response codes that they do not recognize.
-
-7.1.1. OK Response
-
- Contents: OPTIONAL response code
- human-readable text
-
- The OK response indicates an information message from the server.
- When tagged, it indicates successful completion of the associated
- command. The human-readable text MAY be presented to the user as
- an information message. The untagged form indicates an
-
-
-
-
-Crispin Standards Track [Page 65]
-
-RFC 3501 IMAPv4 March 2003
-
-
- information-only message; the nature of the information MAY be
- indicated by a response code.
-
- The untagged form is also used as one of three possible greetings
- at connection startup. It indicates that the connection is not
- yet authenticated and that a LOGIN command is needed.
-
- Example: S: * OK IMAP4rev1 server ready
- C: A001 LOGIN fred blurdybloop
- S: * OK [ALERT] System shutdown in 10 minutes
- S: A001 OK LOGIN Completed
-
-
-7.1.2. NO Response
-
- Contents: OPTIONAL response code
- human-readable text
-
- The NO response indicates an operational error message from the
- server. When tagged, it indicates unsuccessful completion of the
- associated command. The untagged form indicates a warning; the
- command can still complete successfully. The human-readable text
- describes the condition.
-
- Example: C: A222 COPY 1:2 owatagusiam
- S: * NO Disk is 98% full, please delete unnecessary data
- S: A222 OK COPY completed
- C: A223 COPY 3:200 blurdybloop
- S: * NO Disk is 98% full, please delete unnecessary data
- S: * NO Disk is 99% full, please delete unnecessary data
- S: A223 NO COPY failed: disk is full
-
-
-7.1.3. BAD Response
-
- Contents: OPTIONAL response code
- human-readable text
-
- The BAD response indicates an error message from the server. When
- tagged, it reports a protocol-level error in the client's command;
- the tag indicates the command that caused the error. The untagged
- form indicates a protocol-level error for which the associated
- command can not be determined; it can also indicate an internal
- server failure. The human-readable text describes the condition.
-
-
-
-
-
-
-
-Crispin Standards Track [Page 66]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Example: C: ...very long command line...
- S: * BAD Command line too long
- C: ...empty line...
- S: * BAD Empty command line
- C: A443 EXPUNGE
- S: * BAD Disk crash, attempting salvage to a new disk!
- S: * OK Salvage successful, no data lost
- S: A443 OK Expunge completed
-
-
-7.1.4. PREAUTH Response
-
- Contents: OPTIONAL response code
- human-readable text
-
- The PREAUTH response is always untagged, and is one of three
- possible greetings at connection startup. It indicates that the
- connection has already been authenticated by external means; thus
- no LOGIN command is needed.
-
- Example: S: * PREAUTH IMAP4rev1 server logged in as Smith
-
-
-7.1.5. BYE Response
-
- Contents: OPTIONAL response code
- human-readable text
-
- The BYE response is always untagged, and indicates that the server
- is about to close the connection. The human-readable text MAY be
- displayed to the user in a status report by the client. The BYE
- response is sent under one of four conditions:
-
- 1) as part of a normal logout sequence. The server will close
- the connection after sending the tagged OK response to the
- LOGOUT command.
-
- 2) as a panic shutdown announcement. The server closes the
- connection immediately.
-
- 3) as an announcement of an inactivity autologout. The server
- closes the connection immediately.
-
- 4) as one of three possible greetings at connection startup,
- indicating that the server is not willing to accept a
- connection from this client. The server closes the
- connection immediately.
-
-
-
-
-Crispin Standards Track [Page 67]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The difference between a BYE that occurs as part of a normal
- LOGOUT sequence (the first case) and a BYE that occurs because of
- a failure (the other three cases) is that the connection closes
- immediately in the failure case. In all cases the client SHOULD
- continue to read response data from the server until the
- connection is closed; this will ensure that any pending untagged
- or completion responses are read and processed.
-
- Example: S: * BYE Autologout; idle for too long
-
-7.2. Server Responses - Server and Mailbox Status
-
- These responses are always untagged. This is how server and mailbox
- status data are transmitted from the server to the client. Many of
- these responses typically result from a command with the same name.
-
-7.2.1. CAPABILITY Response
-
- Contents: capability listing
-
- The CAPABILITY response occurs as a result of a CAPABILITY
- command. The capability listing contains a space-separated
- listing of capability names that the server supports. The
- capability listing MUST include the atom "IMAP4rev1".
-
- In addition, client and server implementations MUST implement the
- STARTTLS, LOGINDISABLED, and AUTH=PLAIN (described in [IMAP-TLS])
- capabilities. See the Security Considerations section for
- important information.
-
- A capability name which begins with "AUTH=" indicates that the
- server supports that particular authentication mechanism.
-
- The LOGINDISABLED capability indicates that the LOGIN command is
- disabled, and that the server will respond with a tagged NO
- response to any attempt to use the LOGIN command even if the user
- name and password are valid. An IMAP client MUST NOT issue the
- LOGIN command if the server advertises the LOGINDISABLED
- capability.
-
- Other capability names indicate that the server supports an
- extension, revision, or amendment to the IMAP4rev1 protocol.
- Server responses MUST conform to this document until the client
- issues a command that uses the associated capability.
-
- Capability names MUST either begin with "X" or be standard or
- standards-track IMAP4rev1 extensions, revisions, or amendments
- registered with IANA. A server MUST NOT offer unregistered or
-
-
-
-Crispin Standards Track [Page 68]
-
-RFC 3501 IMAPv4 March 2003
-
-
- non-standard capability names, unless such names are prefixed with
- an "X".
-
- Client implementations SHOULD NOT require any capability name
- other than "IMAP4rev1", and MUST ignore any unknown capability
- names.
-
- A server MAY send capabilities automatically, by using the
- CAPABILITY response code in the initial PREAUTH or OK responses,
- and by sending an updated CAPABILITY response code in the tagged
- OK response as part of a successful authentication. It is
- unnecessary for a client to send a separate CAPABILITY command if
- it recognizes these automatic capabilities.
-
- Example: S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=GSSAPI XPIG-LATIN
-
-
-7.2.2. LIST Response
-
- Contents: name attributes
- hierarchy delimiter
- name
-
- The LIST response occurs as a result of a LIST command. It
- returns a single name that matches the LIST specification. There
- can be multiple LIST responses for a single LIST command.
-
- Four name attributes are defined:
-
- \Noinferiors
- It is not possible for any child levels of hierarchy to exist
- under this name; no child levels exist now and none can be
- created in the future.
-
- \Noselect
- It is not possible to use this name as a selectable mailbox.
-
- \Marked
- The mailbox has been marked "interesting" by the server; the
- mailbox probably contains messages that have been added since
- the last time the mailbox was selected.
-
- \Unmarked
- The mailbox does not contain any additional messages since the
- last time the mailbox was selected.
-
-
-
-
-
-
-Crispin Standards Track [Page 69]
-
-RFC 3501 IMAPv4 March 2003
-
-
- If it is not feasible for the server to determine whether or not
- the mailbox is "interesting", or if the name is a \Noselect name,
- the server SHOULD NOT send either \Marked or \Unmarked.
-
- The hierarchy delimiter is a character used to delimit levels of
- hierarchy in a mailbox name. A client can use it to create child
- mailboxes, and to search higher or lower levels of naming
- hierarchy. All children of a top-level hierarchy node MUST use
- the same separator character. A NIL hierarchy delimiter means
- that no hierarchy exists; the name is a "flat" name.
-
- The name represents an unambiguous left-to-right hierarchy, and
- MUST be valid for use as a reference in LIST and LSUB commands.
- Unless \Noselect is indicated, the name MUST also be valid as an
- argument for commands, such as SELECT, that accept mailbox names.
-
- Example: S: * LIST (\Noselect) "/" ~/Mail/foo
-
-
-7.2.3. LSUB Response
-
- Contents: name attributes
- hierarchy delimiter
- name
-
- The LSUB response occurs as a result of an LSUB command. It
- returns a single name that matches the LSUB specification. There
- can be multiple LSUB responses for a single LSUB command. The
- data is identical in format to the LIST response.
-
- Example: S: * LSUB () "." #news.comp.mail.misc
-
-
-7.2.4 STATUS Response
-
- Contents: name
- status parenthesized list
-
- The STATUS response occurs as a result of an STATUS command. It
- returns the mailbox name that matches the STATUS specification and
- the requested mailbox status information.
-
- Example: S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 70]
-
-RFC 3501 IMAPv4 March 2003
-
-
-7.2.5. SEARCH Response
-
- Contents: zero or more numbers
-
- The SEARCH response occurs as a result of a SEARCH or UID SEARCH
- command. The number(s) refer to those messages that match the
- search criteria. For SEARCH, these are message sequence numbers;
- for UID SEARCH, these are unique identifiers. Each number is
- delimited by a space.
-
- Example: S: * SEARCH 2 3 6
-
-
-7.2.6. FLAGS Response
-
- Contents: flag parenthesized list
-
- The FLAGS response occurs as a result of a SELECT or EXAMINE
- command. The flag parenthesized list identifies the flags (at a
- minimum, the system-defined flags) that are applicable for this
- mailbox. Flags other than the system flags can also exist,
- depending on server implementation.
-
- The update from the FLAGS response MUST be recorded by the client.
-
- Example: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
-
-
-7.3. Server Responses - Mailbox Size
-
- These responses are always untagged. This is how changes in the size
- of the mailbox are transmitted from the server to the client.
- Immediately following the "*" token is a number that represents a
- message count.
-
-7.3.1. EXISTS Response
-
- Contents: none
-
- The EXISTS response reports the number of messages in the mailbox.
- This response occurs as a result of a SELECT or EXAMINE command,
- and if the size of the mailbox changes (e.g., new messages).
-
- The update from the EXISTS response MUST be recorded by the
- client.
-
- Example: S: * 23 EXISTS
-
-
-
-
-Crispin Standards Track [Page 71]
-
-RFC 3501 IMAPv4 March 2003
-
-
-7.3.2. RECENT Response
-
- Contents: none
-
- The RECENT response reports the number of messages with the
- \Recent flag set. This response occurs as a result of a SELECT or
- EXAMINE command, and if the size of the mailbox changes (e.g., new
- messages).
-
- Note: It is not guaranteed that the message sequence
- numbers of recent messages will be a contiguous range of
- the highest n messages in the mailbox (where n is the
- value reported by the RECENT response). Examples of
- situations in which this is not the case are: multiple
- clients having the same mailbox open (the first session
- to be notified will see it as recent, others will
- probably see it as non-recent), and when the mailbox is
- re-ordered by a non-IMAP agent.
-
- The only reliable way to identify recent messages is to
- look at message flags to see which have the \Recent flag
- set, or to do a SEARCH RECENT.
-
- The update from the RECENT response MUST be recorded by the
- client.
-
- Example: S: * 5 RECENT
-
-
-7.4. Server Responses - Message Status
-
- These responses are always untagged. This is how message data are
- transmitted from the server to the client, often as a result of a
- command with the same name. Immediately following the "*" token is a
- number that represents a message sequence number.
-
-7.4.1. EXPUNGE Response
-
- Contents: none
-
- The EXPUNGE response reports that the specified message sequence
- number has been permanently removed from the mailbox. The message
- sequence number for each successive message in the mailbox is
- immediately decremented by 1, and this decrement is reflected in
- message sequence numbers in subsequent responses (including other
- untagged EXPUNGE responses).
-
-
-
-
-
-Crispin Standards Track [Page 72]
-
-RFC 3501 IMAPv4 March 2003
-
-
- The EXPUNGE response also decrements the number of messages in the
- mailbox; it is not necessary to send an EXISTS response with the
- new value.
-
- As a result of the immediate decrement rule, message sequence
- numbers that appear in a set of successive EXPUNGE responses
- depend upon whether the messages are removed starting from lower
- numbers to higher numbers, or from higher numbers to lower
- numbers. For example, if the last 5 messages in a 9-message
- mailbox are expunged, a "lower to higher" server will send five
- untagged EXPUNGE responses for message sequence number 5, whereas
- a "higher to lower server" will send successive untagged EXPUNGE
- responses for message sequence numbers 9, 8, 7, 6, and 5.
-
- An EXPUNGE response MUST NOT be sent when no command is in
- progress, nor while responding to a FETCH, STORE, or SEARCH
- command. This rule is necessary to prevent a loss of
- synchronization of message sequence numbers between client and
- server. A command is not "in progress" until the complete command
- has been received; in particular, a command is not "in progress"
- during the negotiation of command continuation.
-
- Note: UID FETCH, UID STORE, and UID SEARCH are different
- commands from FETCH, STORE, and SEARCH. An EXPUNGE
- response MAY be sent during a UID command.
-
- The update from the EXPUNGE response MUST be recorded by the
- client.
-
- Example: S: * 44 EXPUNGE
-
-
-7.4.2. FETCH Response
-
- Contents: message data
-
- The FETCH response returns data about a message to the client.
- The data are pairs of data item names and their values in
- parentheses. This response occurs as the result of a FETCH or
- STORE command, as well as by unilateral server decision (e.g.,
- flag updates).
-
- The current data items are:
-
- BODY
- A form of BODYSTRUCTURE without extension data.
-
-
-
-
-
-Crispin Standards Track [Page 73]
-
-RFC 3501 IMAPv4 March 2003
-
-
- BODY[<section>]<<origin octet>>
- A string expressing the body contents of the specified section.
- The string SHOULD be interpreted by the client according to the
- content transfer encoding, body type, and subtype.
-
- If the origin octet is specified, this string is a substring of
- the entire body contents, starting at that origin octet. This
- means that BODY[]<0> MAY be truncated, but BODY[] is NEVER
- truncated.
-
- Note: The origin octet facility MUST NOT be used by a server
- in a FETCH response unless the client specifically requested
- it by means of a FETCH of a BODY[<section>]<<partial>> data
- item.
-
- 8-bit textual data is permitted if a [CHARSET] identifier is
- part of the body parameter parenthesized list for this section.
- Note that headers (part specifiers HEADER or MIME, or the
- header portion of a MESSAGE/RFC822 part), MUST be 7-bit; 8-bit
- characters are not permitted in headers. Note also that the
- [RFC-2822] delimiting blank line between the header and the
- body is not affected by header line subsetting; the blank line
- is always included as part of header data, except in the case
- of a message which has no body and no blank line.
-
- Non-textual data such as binary data MUST be transfer encoded
- into a textual form, such as BASE64, prior to being sent to the
- client. To derive the original binary data, the client MUST
- decode the transfer encoded string.
-
- BODYSTRUCTURE
- A parenthesized list that describes the [MIME-IMB] body
- structure of a message. This is computed by the server by
- parsing the [MIME-IMB] header fields, defaulting various fields
- as necessary.
-
- For example, a simple text message of 48 lines and 2279 octets
- can have a body structure of: ("TEXT" "PLAIN" ("CHARSET"
- "US-ASCII") NIL NIL "7BIT" 2279 48)
-
- Multiple parts are indicated by parenthesis nesting. Instead
- of a body type as the first element of the parenthesized list,
- there is a sequence of one or more nested body structures. The
- second element of the parenthesized list is the multipart
- subtype (mixed, digest, parallel, alternative, etc.).
-
-
-
-
-
-
-Crispin Standards Track [Page 74]
-
-RFC 3501 IMAPv4 March 2003
-
-
- For example, a two part message consisting of a text and a
- BASE64-encoded text attachment can have a body structure of:
- (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152
- 23)("TEXT" "PLAIN" ("CHARSET" "US-ASCII" "NAME" "cc.diff")
- "<960723163407.20117h@cac.washington.edu>" "Compiler diff"
- "BASE64" 4554 73) "MIXED")
-
- Extension data follows the multipart subtype. Extension data
- is never returned with the BODY fetch, but can be returned with
- a BODYSTRUCTURE fetch. Extension data, if present, MUST be in
- the defined order. The extension data of a multipart body part
- are in the following order:
-
- body parameter parenthesized list
- A parenthesized list of attribute/value pairs [e.g., ("foo"
- "bar" "baz" "rag") where "bar" is the value of "foo", and
- "rag" is the value of "baz"] as defined in [MIME-IMB].
-
- body disposition
- A parenthesized list, consisting of a disposition type
- string, followed by a parenthesized list of disposition
- attribute/value pairs as defined in [DISPOSITION].
-
- body language
- A string or parenthesized list giving the body language
- value as defined in [LANGUAGE-TAGS].
-
- body location
- A string list giving the body content URI as defined in
- [LOCATION].
-
- Any following extension data are not yet defined in this
- version of the protocol. Such extension data can consist of
- zero or more NILs, strings, numbers, or potentially nested
- parenthesized lists of such data. Client implementations that
- do a BODYSTRUCTURE fetch MUST be prepared to accept such
- extension data. Server implementations MUST NOT send such
- extension data until it has been defined by a revision of this
- protocol.
-
- The basic fields of a non-multipart body part are in the
- following order:
-
- body type
- A string giving the content media type name as defined in
- [MIME-IMB].
-
-
-
-
-
-Crispin Standards Track [Page 75]
-
-RFC 3501 IMAPv4 March 2003
-
-
- body subtype
- A string giving the content subtype name as defined in
- [MIME-IMB].
-
- body parameter parenthesized list
- A parenthesized list of attribute/value pairs [e.g., ("foo"
- "bar" "baz" "rag") where "bar" is the value of "foo" and
- "rag" is the value of "baz"] as defined in [MIME-IMB].
-
- body id
- A string giving the content id as defined in [MIME-IMB].
-
- body description
- A string giving the content description as defined in
- [MIME-IMB].
-
- body encoding
- A string giving the content transfer encoding as defined in
- [MIME-IMB].
-
- body size
- A number giving the size of the body in octets. Note that
- this size is the size in its transfer encoding and not the
- resulting size after any decoding.
-
- A body type of type MESSAGE and subtype RFC822 contains,
- immediately after the basic fields, the envelope structure,
- body structure, and size in text lines of the encapsulated
- message.
-
- A body type of type TEXT contains, immediately after the basic
- fields, the size of the body in text lines. Note that this
- size is the size in its content transfer encoding and not the
- resulting size after any decoding.
-
- Extension data follows the basic fields and the type-specific
- fields listed above. Extension data is never returned with the
- BODY fetch, but can be returned with a BODYSTRUCTURE fetch.
- Extension data, if present, MUST be in the defined order.
-
- The extension data of a non-multipart body part are in the
- following order:
-
- body MD5
- A string giving the body MD5 value as defined in [MD5].
-
-
-
-
-
-
-Crispin Standards Track [Page 76]
-
-RFC 3501 IMAPv4 March 2003
-
-
- body disposition
- A parenthesized list with the same content and function as
- the body disposition for a multipart body part.
-
- body language
- A string or parenthesized list giving the body language
- value as defined in [LANGUAGE-TAGS].
-
- body location
- A string list giving the body content URI as defined in
- [LOCATION].
-
- Any following extension data are not yet defined in this
- version of the protocol, and would be as described above under
- multipart extension data.
-
- ENVELOPE
- A parenthesized list that describes the envelope structure of a
- message. This is computed by the server by parsing the
- [RFC-2822] header into the component parts, defaulting various
- fields as necessary.
-
- The fields of the envelope structure are in the following
- order: date, subject, from, sender, reply-to, to, cc, bcc,
- in-reply-to, and message-id. The date, subject, in-reply-to,
- and message-id fields are strings. The from, sender, reply-to,
- to, cc, and bcc fields are parenthesized lists of address
- structures.
-
- An address structure is a parenthesized list that describes an
- electronic mail address. The fields of an address structure
- are in the following order: personal name, [SMTP]
- at-domain-list (source route), mailbox name, and host name.
-
- [RFC-2822] group syntax is indicated by a special form of
- address structure in which the host name field is NIL. If the
- mailbox name field is also NIL, this is an end of group marker
- (semi-colon in RFC 822 syntax). If the mailbox name field is
- non-NIL, this is a start of group marker, and the mailbox name
- field holds the group name phrase.
-
- If the Date, Subject, In-Reply-To, and Message-ID header lines
- are absent in the [RFC-2822] header, the corresponding member
- of the envelope is NIL; if these header lines are present but
- empty the corresponding member of the envelope is the empty
- string.
-
-
-
-
-
-Crispin Standards Track [Page 77]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Note: some servers may return a NIL envelope member in the
- "present but empty" case. Clients SHOULD treat NIL and
- empty string as identical.
-
- Note: [RFC-2822] requires that all messages have a valid
- Date header. Therefore, the date member in the envelope can
- not be NIL or the empty string.
-
- Note: [RFC-2822] requires that the In-Reply-To and
- Message-ID headers, if present, have non-empty content.
- Therefore, the in-reply-to and message-id members in the
- envelope can not be the empty string.
-
- If the From, To, cc, and bcc header lines are absent in the
- [RFC-2822] header, or are present but empty, the corresponding
- member of the envelope is NIL.
-
- If the Sender or Reply-To lines are absent in the [RFC-2822]
- header, or are present but empty, the server sets the
- corresponding member of the envelope to be the same value as
- the from member (the client is not expected to know to do
- this).
-
- Note: [RFC-2822] requires that all messages have a valid
- From header. Therefore, the from, sender, and reply-to
- members in the envelope can not be NIL.
-
- FLAGS
- A parenthesized list of flags that are set for this message.
-
- INTERNALDATE
- A string representing the internal date of the message.
-
- RFC822
- Equivalent to BODY[].
-
- RFC822.HEADER
- Equivalent to BODY[HEADER]. Note that this did not result in
- \Seen being set, because RFC822.HEADER response data occurs as
- a result of a FETCH of RFC822.HEADER. BODY[HEADER] response
- data occurs as a result of a FETCH of BODY[HEADER] (which sets
- \Seen) or BODY.PEEK[HEADER] (which does not set \Seen).
-
- RFC822.SIZE
- A number expressing the [RFC-2822] size of the message.
-
-
-
-
-
-
-Crispin Standards Track [Page 78]
-
-RFC 3501 IMAPv4 March 2003
-
-
- RFC822.TEXT
- Equivalent to BODY[TEXT].
-
- UID
- A number expressing the unique identifier of the message.
-
-
- Example: S: * 23 FETCH (FLAGS (\Seen) RFC822.SIZE 44827)
-
-
-7.5. Server Responses - Command Continuation Request
-
- The command continuation request response is indicated by a "+" token
- instead of a tag. This form of response indicates that the server is
- ready to accept the continuation of a command from the client. The
- remainder of this response is a line of text.
-
- This response is used in the AUTHENTICATE command to transmit server
- data to the client, and request additional client data. This
- response is also used if an argument to any command is a literal.
-
- The client is not permitted to send the octets of the literal unless
- the server indicates that it is expected. This permits the server to
- process commands and reject errors on a line-by-line basis. The
- remainder of the command, including the CRLF that terminates a
- command, follows the octets of the literal. If there are any
- additional command arguments, the literal octets are followed by a
- space and those arguments.
-
- Example: C: A001 LOGIN {11}
- S: + Ready for additional command text
- C: FRED FOOBAR {7}
- S: + Ready for additional command text
- C: fat man
- S: A001 OK LOGIN completed
- C: A044 BLURDYBLOOP {102856}
- S: A044 BAD No such command as "BLURDYBLOOP"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 79]
-
-RFC 3501 IMAPv4 March 2003
-
-
-8. Sample IMAP4rev1 connection
-
- The following is a transcript of an IMAP4rev1 connection. A long
- line in this sample is broken for editorial clarity.
-
-S: * OK IMAP4rev1 Service Ready
-C: a001 login mrc secret
-S: a001 OK LOGIN completed
-C: a002 select inbox
-S: * 18 EXISTS
-S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
-S: * 2 RECENT
-S: * OK [UNSEEN 17] Message 17 is the first unseen message
-S: * OK [UIDVALIDITY 3857529045] UIDs valid
-S: a002 OK [READ-WRITE] SELECT completed
-C: a003 fetch 12 full
-S: * 12 FETCH (FLAGS (\Seen) INTERNALDATE "17-Jul-1996 02:44:25 -0700"
- RFC822.SIZE 4286 ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)"
- "IMAP4rev1 WG mtg summary and minutes"
- (("Terry Gray" NIL "gray" "cac.washington.edu"))
- (("Terry Gray" NIL "gray" "cac.washington.edu"))
- (("Terry Gray" NIL "gray" "cac.washington.edu"))
- ((NIL NIL "imap" "cac.washington.edu"))
- ((NIL NIL "minutes" "CNRI.Reston.VA.US")
- ("John Klensin" NIL "KLENSIN" "MIT.EDU")) NIL NIL
- "<B27397-0100000@cac.washington.edu>")
- BODY ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 3028
- 92))
-S: a003 OK FETCH completed
-C: a004 fetch 12 body[header]
-S: * 12 FETCH (BODY[HEADER] {342}
-S: Date: Wed, 17 Jul 1996 02:23:25 -0700 (PDT)
-S: From: Terry Gray <gray@cac.washington.edu>
-S: Subject: IMAP4rev1 WG mtg summary and minutes
-S: To: imap@cac.washington.edu
-S: cc: minutes@CNRI.Reston.VA.US, John Klensin <KLENSIN@MIT.EDU>
-S: Message-Id: <B27397-0100000@cac.washington.edu>
-S: MIME-Version: 1.0
-S: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
-S:
-S: )
-S: a004 OK FETCH completed
-C: a005 store 12 +flags \deleted
-S: * 12 FETCH (FLAGS (\Seen \Deleted))
-S: a005 OK +FLAGS completed
-C: a006 logout
-S: * BYE IMAP4rev1 server terminating connection
-S: a006 OK LOGOUT completed
-
-
-
-Crispin Standards Track [Page 80]
-
-RFC 3501 IMAPv4 March 2003
-
-
-9. Formal Syntax
-
- The following syntax specification uses the Augmented Backus-Naur
- Form (ABNF) notation as specified in [ABNF].
-
- In the case of alternative or optional rules in which a later rule
- overlaps an earlier rule, the rule which is listed earlier MUST take
- priority. For example, "\Seen" when parsed as a flag is the \Seen
- flag name and not a flag-extension, even though "\Seen" can be parsed
- as a flag-extension. Some, but not all, instances of this rule are
- noted below.
-
- Note: [ABNF] rules MUST be followed strictly; in
- particular:
-
- (1) Except as noted otherwise, all alphabetic characters
- are case-insensitive. The use of upper or lower case
- characters to define token strings is for editorial clarity
- only. Implementations MUST accept these strings in a
- case-insensitive fashion.
-
- (2) In all cases, SP refers to exactly one space. It is
- NOT permitted to substitute TAB, insert additional spaces,
- or otherwise treat SP as being equivalent to LWSP.
-
- (3) The ASCII NUL character, %x00, MUST NOT be used at any
- time.
-
-address = "(" addr-name SP addr-adl SP addr-mailbox SP
- addr-host ")"
-
-addr-adl = nstring
- ; Holds route from [RFC-2822] route-addr if
- ; non-NIL
-
-addr-host = nstring
- ; NIL indicates [RFC-2822] group syntax.
- ; Otherwise, holds [RFC-2822] domain name
-
-addr-mailbox = nstring
- ; NIL indicates end of [RFC-2822] group; if
- ; non-NIL and addr-host is NIL, holds
- ; [RFC-2822] group name.
- ; Otherwise, holds [RFC-2822] local-part
- ; after removing [RFC-2822] quoting
-
-
-
-
-
-
-Crispin Standards Track [Page 81]
-
-RFC 3501 IMAPv4 March 2003
-
-
-addr-name = nstring
- ; If non-NIL, holds phrase from [RFC-2822]
- ; mailbox after removing [RFC-2822] quoting
-
-append = "APPEND" SP mailbox [SP flag-list] [SP date-time] SP
- literal
-
-astring = 1*ASTRING-CHAR / string
-
-ASTRING-CHAR = ATOM-CHAR / resp-specials
-
-atom = 1*ATOM-CHAR
-
-ATOM-CHAR = <any CHAR except atom-specials>
-
-atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards /
- quoted-specials / resp-specials
-
-authenticate = "AUTHENTICATE" SP auth-type *(CRLF base64)
-
-auth-type = atom
- ; Defined by [SASL]
-
-base64 = *(4base64-char) [base64-terminal]
-
-base64-char = ALPHA / DIGIT / "+" / "/"
- ; Case-sensitive
-
-base64-terminal = (2base64-char "==") / (3base64-char "=")
-
-body = "(" (body-type-1part / body-type-mpart) ")"
-
-body-extension = nstring / number /
- "(" body-extension *(SP body-extension) ")"
- ; Future expansion. Client implementations
- ; MUST accept body-extension fields. Server
- ; implementations MUST NOT generate
- ; body-extension fields except as defined by
- ; future standard or standards-track
- ; revisions of this specification.
-
-body-ext-1part = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang
- [SP body-fld-loc *(SP body-extension)]]]
- ; MUST NOT be returned on non-extensible
- ; "BODY" fetch
-
-
-
-
-
-
-Crispin Standards Track [Page 82]
-
-RFC 3501 IMAPv4 March 2003
-
-
-body-ext-mpart = body-fld-param [SP body-fld-dsp [SP body-fld-lang
- [SP body-fld-loc *(SP body-extension)]]]
- ; MUST NOT be returned on non-extensible
- ; "BODY" fetch
-
-body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP
- body-fld-enc SP body-fld-octets
-
-body-fld-desc = nstring
-
-body-fld-dsp = "(" string SP body-fld-param ")" / nil
-
-body-fld-enc = (DQUOTE ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
- "QUOTED-PRINTABLE") DQUOTE) / string
-
-body-fld-id = nstring
-
-body-fld-lang = nstring / "(" string *(SP string) ")"
-
-body-fld-loc = nstring
-
-body-fld-lines = number
-
-body-fld-md5 = nstring
-
-body-fld-octets = number
-
-body-fld-param = "(" string SP string *(SP string SP string) ")" / nil
-
-body-type-1part = (body-type-basic / body-type-msg / body-type-text)
- [SP body-ext-1part]
-
-body-type-basic = media-basic SP body-fields
- ; MESSAGE subtype MUST NOT be "RFC822"
-
-body-type-mpart = 1*body SP media-subtype
- [SP body-ext-mpart]
-
-body-type-msg = media-message SP body-fields SP envelope
- SP body SP body-fld-lines
-
-body-type-text = media-text SP body-fields SP body-fld-lines
-
-capability = ("AUTH=" auth-type) / atom
- ; New capabilities MUST begin with "X" or be
- ; registered with IANA as standard or
- ; standards-track
-
-
-
-
-Crispin Standards Track [Page 83]
-
-RFC 3501 IMAPv4 March 2003
-
-
-capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1"
- *(SP capability)
- ; Servers MUST implement the STARTTLS, AUTH=PLAIN,
- ; and LOGINDISABLED capabilities
- ; Servers which offer RFC 1730 compatibility MUST
- ; list "IMAP4" as the first capability.
-
-CHAR8 = %x01-ff
- ; any OCTET except NUL, %x00
-
-command = tag SP (command-any / command-auth / command-nonauth /
- command-select) CRLF
- ; Modal based on state
-
-command-any = "CAPABILITY" / "LOGOUT" / "NOOP" / x-command
- ; Valid in all states
-
-command-auth = append / create / delete / examine / list / lsub /
- rename / select / status / subscribe / unsubscribe
- ; Valid only in Authenticated or Selected state
-
-command-nonauth = login / authenticate / "STARTTLS"
- ; Valid only when in Not Authenticated state
-
-command-select = "CHECK" / "CLOSE" / "EXPUNGE" / copy / fetch / store /
- uid / search
- ; Valid only when in Selected state
-
-continue-req = "+" SP (resp-text / base64) CRLF
-
-copy = "COPY" SP sequence-set SP mailbox
-
-create = "CREATE" SP mailbox
- ; Use of INBOX gives a NO error
-
-date = date-text / DQUOTE date-text DQUOTE
-
-date-day = 1*2DIGIT
- ; Day of month
-
-date-day-fixed = (SP DIGIT) / 2DIGIT
- ; Fixed-format version of date-day
-
-date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" /
- "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
-
-date-text = date-day "-" date-month "-" date-year
-
-
-
-
-Crispin Standards Track [Page 84]
-
-RFC 3501 IMAPv4 March 2003
-
-
-date-year = 4DIGIT
-
-date-time = DQUOTE date-day-fixed "-" date-month "-" date-year
- SP time SP zone DQUOTE
-
-delete = "DELETE" SP mailbox
- ; Use of INBOX gives a NO error
-
-digit-nz = %x31-39
- ; 1-9
-
-envelope = "(" env-date SP env-subject SP env-from SP
- env-sender SP env-reply-to SP env-to SP env-cc SP
- env-bcc SP env-in-reply-to SP env-message-id ")"
-
-env-bcc = "(" 1*address ")" / nil
-
-env-cc = "(" 1*address ")" / nil
-
-env-date = nstring
-
-env-from = "(" 1*address ")" / nil
-
-env-in-reply-to = nstring
-
-env-message-id = nstring
-
-env-reply-to = "(" 1*address ")" / nil
-
-env-sender = "(" 1*address ")" / nil
-
-env-subject = nstring
-
-env-to = "(" 1*address ")" / nil
-
-examine = "EXAMINE" SP mailbox
-
-fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" /
- fetch-att / "(" fetch-att *(SP fetch-att) ")")
-
-fetch-att = "ENVELOPE" / "FLAGS" / "INTERNALDATE" /
- "RFC822" [".HEADER" / ".SIZE" / ".TEXT"] /
- "BODY" ["STRUCTURE"] / "UID" /
- "BODY" section ["<" number "." nz-number ">"] /
- "BODY.PEEK" section ["<" number "." nz-number ">"]
-
-
-
-
-
-
-Crispin Standards Track [Page 85]
-
-RFC 3501 IMAPv4 March 2003
-
-
-flag = "\Answered" / "\Flagged" / "\Deleted" /
- "\Seen" / "\Draft" / flag-keyword / flag-extension
- ; Does not include "\Recent"
-
-flag-extension = "\" atom
- ; Future expansion. Client implementations
- ; MUST accept flag-extension flags. Server
- ; implementations MUST NOT generate
- ; flag-extension flags except as defined by
- ; future standard or standards-track
- ; revisions of this specification.
-
-flag-fetch = flag / "\Recent"
-
-flag-keyword = atom
-
-flag-list = "(" [flag *(SP flag)] ")"
-
-flag-perm = flag / "\*"
-
-greeting = "*" SP (resp-cond-auth / resp-cond-bye) CRLF
-
-header-fld-name = astring
-
-header-list = "(" header-fld-name *(SP header-fld-name) ")"
-
-list = "LIST" SP mailbox SP list-mailbox
-
-list-mailbox = 1*list-char / string
-
-list-char = ATOM-CHAR / list-wildcards / resp-specials
-
-list-wildcards = "%" / "*"
-
-literal = "{" number "}" CRLF *CHAR8
- ; Number represents the number of CHAR8s
-
-login = "LOGIN" SP userid SP password
-
-lsub = "LSUB" SP mailbox SP list-mailbox
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 86]
-
-RFC 3501 IMAPv4 March 2003
-
-
-mailbox = "INBOX" / astring
- ; INBOX is case-insensitive. All case variants of
- ; INBOX (e.g., "iNbOx") MUST be interpreted as INBOX
- ; not as an astring. An astring which consists of
- ; the case-insensitive sequence "I" "N" "B" "O" "X"
- ; is considered to be INBOX and not an astring.
- ; Refer to section 5.1 for further
- ; semantic details of mailbox names.
-
-mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list /
- "LSUB" SP mailbox-list / "SEARCH" *(SP nz-number) /
- "STATUS" SP mailbox SP "(" [status-att-list] ")" /
- number SP "EXISTS" / number SP "RECENT"
-
-mailbox-list = "(" [mbx-list-flags] ")" SP
- (DQUOTE QUOTED-CHAR DQUOTE / nil) SP mailbox
-
-mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag
- *(SP mbx-list-oflag) /
- mbx-list-oflag *(SP mbx-list-oflag)
-
-mbx-list-oflag = "\Noinferiors" / flag-extension
- ; Other flags; multiple possible per LIST response
-
-mbx-list-sflag = "\Noselect" / "\Marked" / "\Unmarked"
- ; Selectability flags; only one per LIST response
-
-media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" /
- "MESSAGE" / "VIDEO") DQUOTE) / string) SP
- media-subtype
- ; Defined in [MIME-IMT]
-
-media-message = DQUOTE "MESSAGE" DQUOTE SP DQUOTE "RFC822" DQUOTE
- ; Defined in [MIME-IMT]
-
-media-subtype = string
- ; Defined in [MIME-IMT]
-
-media-text = DQUOTE "TEXT" DQUOTE SP media-subtype
- ; Defined in [MIME-IMT]
-
-message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att))
-
-msg-att = "(" (msg-att-dynamic / msg-att-static)
- *(SP (msg-att-dynamic / msg-att-static)) ")"
-
-msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")"
- ; MAY change for a message
-
-
-
-Crispin Standards Track [Page 87]
-
-RFC 3501 IMAPv4 March 2003
-
-
-msg-att-static = "ENVELOPE" SP envelope / "INTERNALDATE" SP date-time /
- "RFC822" [".HEADER" / ".TEXT"] SP nstring /
- "RFC822.SIZE" SP number /
- "BODY" ["STRUCTURE"] SP body /
- "BODY" section ["<" number ">"] SP nstring /
- "UID" SP uniqueid
- ; MUST NOT change for a message
-
-nil = "NIL"
-
-nstring = string / nil
-
-number = 1*DIGIT
- ; Unsigned 32-bit integer
- ; (0 <= n < 4,294,967,296)
-
-nz-number = digit-nz *DIGIT
- ; Non-zero unsigned 32-bit integer
- ; (0 < n < 4,294,967,296)
-
-password = astring
-
-quoted = DQUOTE *QUOTED-CHAR DQUOTE
-
-QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> /
- "\" quoted-specials
-
-quoted-specials = DQUOTE / "\"
-
-rename = "RENAME" SP mailbox SP mailbox
- ; Use of INBOX as a destination gives a NO error
-
-response = *(continue-req / response-data) response-done
-
-response-data = "*" SP (resp-cond-state / resp-cond-bye /
- mailbox-data / message-data / capability-data) CRLF
-
-response-done = response-tagged / response-fatal
-
-response-fatal = "*" SP resp-cond-bye CRLF
- ; Server closes connection immediately
-
-response-tagged = tag SP resp-cond-state CRLF
-
-resp-cond-auth = ("OK" / "PREAUTH") SP resp-text
- ; Authentication condition
-
-
-
-
-
-Crispin Standards Track [Page 88]
-
-RFC 3501 IMAPv4 March 2003
-
-
-resp-cond-bye = "BYE" SP resp-text
-
-resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text
- ; Status condition
-
-resp-specials = "]"
-
-resp-text = ["[" resp-text-code "]" SP] text
-
-resp-text-code = "ALERT" /
- "BADCHARSET" [SP "(" astring *(SP astring) ")" ] /
- capability-data / "PARSE" /
- "PERMANENTFLAGS" SP "("
- [flag-perm *(SP flag-perm)] ")" /
- "READ-ONLY" / "READ-WRITE" / "TRYCREATE" /
- "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number /
- "UNSEEN" SP nz-number /
- atom [SP 1*<any TEXT-CHAR except "]">]
-
-search = "SEARCH" [SP "CHARSET" SP astring] 1*(SP search-key)
- ; CHARSET argument to MUST be registered with IANA
-
-search-key = "ALL" / "ANSWERED" / "BCC" SP astring /
- "BEFORE" SP date / "BODY" SP astring /
- "CC" SP astring / "DELETED" / "FLAGGED" /
- "FROM" SP astring / "KEYWORD" SP flag-keyword /
- "NEW" / "OLD" / "ON" SP date / "RECENT" / "SEEN" /
- "SINCE" SP date / "SUBJECT" SP astring /
- "TEXT" SP astring / "TO" SP astring /
- "UNANSWERED" / "UNDELETED" / "UNFLAGGED" /
- "UNKEYWORD" SP flag-keyword / "UNSEEN" /
- ; Above this line were in [IMAP2]
- "DRAFT" / "HEADER" SP header-fld-name SP astring /
- "LARGER" SP number / "NOT" SP search-key /
- "OR" SP search-key SP search-key /
- "SENTBEFORE" SP date / "SENTON" SP date /
- "SENTSINCE" SP date / "SMALLER" SP number /
- "UID" SP sequence-set / "UNDRAFT" / sequence-set /
- "(" search-key *(SP search-key) ")"
-
-section = "[" [section-spec] "]"
-
-section-msgtext = "HEADER" / "HEADER.FIELDS" [".NOT"] SP header-list /
- "TEXT"
- ; top-level or MESSAGE/RFC822 part
-
-section-part = nz-number *("." nz-number)
- ; body part nesting
-
-
-
-Crispin Standards Track [Page 89]
-
-RFC 3501 IMAPv4 March 2003
-
-
-section-spec = section-msgtext / (section-part ["." section-text])
-
-section-text = section-msgtext / "MIME"
- ; text other than actual body part (headers, etc.)
-
-select = "SELECT" SP mailbox
-
-seq-number = nz-number / "*"
- ; message sequence number (COPY, FETCH, STORE
- ; commands) or unique identifier (UID COPY,
- ; UID FETCH, UID STORE commands).
- ; * represents the largest number in use. In
- ; the case of message sequence numbers, it is
- ; the number of messages in a non-empty mailbox.
- ; In the case of unique identifiers, it is the
- ; unique identifier of the last message in the
- ; mailbox or, if the mailbox is empty, the
- ; mailbox's current UIDNEXT value.
- ; The server should respond with a tagged BAD
- ; response to a command that uses a message
- ; sequence number greater than the number of
- ; messages in the selected mailbox. This
- ; includes "*" if the selected mailbox is empty.
-
-seq-range = seq-number ":" seq-number
- ; two seq-number values and all values between
- ; these two regardless of order.
- ; Example: 2:4 and 4:2 are equivalent and indicate
- ; values 2, 3, and 4.
- ; Example: a unique identifier sequence range of
- ; 3291:* includes the UID of the last message in
- ; the mailbox, even if that value is less than 3291.
-
-sequence-set = (seq-number / seq-range) *("," sequence-set)
- ; set of seq-number values, regardless of order.
- ; Servers MAY coalesce overlaps and/or execute the
- ; sequence in any order.
- ; Example: a message sequence number set of
- ; 2,4:7,9,12:* for a mailbox with 15 messages is
- ; equivalent to 2,4,5,6,7,9,12,13,14,15
- ; Example: a message sequence number set of *:4,5:7
- ; for a mailbox with 10 messages is equivalent to
- ; 10,9,8,7,6,5,4,5,6,7 and MAY be reordered and
- ; overlap coalesced to be 4,5,6,7,8,9,10.
-
-status = "STATUS" SP mailbox SP
- "(" status-att *(SP status-att) ")"
-
-
-
-
-Crispin Standards Track [Page 90]
-
-RFC 3501 IMAPv4 March 2003
-
-
-status-att = "MESSAGES" / "RECENT" / "UIDNEXT" / "UIDVALIDITY" /
- "UNSEEN"
-
-status-att-list = status-att SP number *(SP status-att SP number)
-
-store = "STORE" SP sequence-set SP store-att-flags
-
-store-att-flags = (["+" / "-"] "FLAGS" [".SILENT"]) SP
- (flag-list / (flag *(SP flag)))
-
-string = quoted / literal
-
-subscribe = "SUBSCRIBE" SP mailbox
-
-tag = 1*<any ASTRING-CHAR except "+">
-
-text = 1*TEXT-CHAR
-
-TEXT-CHAR = <any CHAR except CR and LF>
-
-time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
- ; Hours minutes seconds
-
-uid = "UID" SP (copy / fetch / search / store)
- ; Unique identifiers used instead of message
- ; sequence numbers
-
-uniqueid = nz-number
- ; Strictly ascending
-
-unsubscribe = "UNSUBSCRIBE" SP mailbox
-
-userid = astring
-
-x-command = "X" atom <experimental command arguments>
-
-zone = ("+" / "-") 4DIGIT
- ; Signed four-digit value of hhmm representing
- ; hours and minutes east of Greenwich (that is,
- ; the amount that the given time differs from
- ; Universal Time). Subtracting the timezone
- ; from the given time will give the UT form.
- ; The Universal Time zone is "+0000".
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 91]
-
-RFC 3501 IMAPv4 March 2003
-
-
-10. Author's Note
-
- This document is a revision or rewrite of earlier documents, and
- supercedes the protocol specification in those documents: RFC 2060,
- RFC 1730, unpublished IMAP2bis.TXT document, RFC 1176, and RFC 1064.
-
-11. Security Considerations
-
- IMAP4rev1 protocol transactions, including electronic mail data, are
- sent in the clear over the network unless protection from snooping is
- negotiated. This can be accomplished either by the use of STARTTLS,
- negotiated privacy protection in the AUTHENTICATE command, or some
- other protection mechanism.
-
-11.1. STARTTLS Security Considerations
-
- The specification of the STARTTLS command and LOGINDISABLED
- capability in this document replaces that in [IMAP-TLS]. [IMAP-TLS]
- remains normative for the PLAIN [SASL] authenticator.
-
- IMAP client and server implementations MUST implement the
- TLS_RSA_WITH_RC4_128_MD5 [TLS] cipher suite, and SHOULD implement the
- TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA [TLS] cipher suite. This is
- important as it assures that any two compliant implementations can be
- configured to interoperate. All other cipher suites are OPTIONAL.
- Note that this is a change from section 2.1 of [IMAP-TLS].
-
- During the [TLS] negotiation, the client MUST check its understanding
- of the server hostname against the server's identity as presented in
- the server Certificate message, in order to prevent man-in-the-middle
- attacks. If the match fails, the client SHOULD either ask for
- explicit user confirmation, or terminate the connection and indicate
- that the server's identity is suspect. Matching is performed
- according to these rules:
-
- The client MUST use the server hostname it used to open the
- connection as the value to compare against the server name
- as expressed in the server certificate. The client MUST
- NOT use any form of the server hostname derived from an
- insecure remote source (e.g., insecure DNS lookup). CNAME
- canonicalization is not done.
-
- If a subjectAltName extension of type dNSName is present in
- the certificate, it SHOULD be used as the source of the
- server's identity.
-
- Matching is case-insensitive.
-
-
-
-
-Crispin Standards Track [Page 92]
-
-RFC 3501 IMAPv4 March 2003
-
-
- A "*" wildcard character MAY be used as the left-most name
- component in the certificate. For example, *.example.com
- would match a.example.com, foo.example.com, etc. but would
- not match example.com.
-
- If the certificate contains multiple names (e.g., more than
- one dNSName field), then a match with any one of the fields
- is considered acceptable.
-
- Both the client and server MUST check the result of the STARTTLS
- command and subsequent [TLS] negotiation to see whether acceptable
- authentication or privacy was achieved.
-
-11.2. Other Security Considerations
-
- A server error message for an AUTHENTICATE command which fails due to
- invalid credentials SHOULD NOT detail why the credentials are
- invalid.
-
- Use of the LOGIN command sends passwords in the clear. This can be
- avoided by using the AUTHENTICATE command with a [SASL] mechanism
- that does not use plaintext passwords, by first negotiating
- encryption via STARTTLS or some other protection mechanism.
-
- A server implementation MUST implement a configuration that, at the
- time of authentication, requires:
- (1) The STARTTLS command has been negotiated.
- OR
- (2) Some other mechanism that protects the session from password
- snooping has been provided.
- OR
- (3) The following measures are in place:
- (a) The LOGINDISABLED capability is advertised, and [SASL]
- mechanisms (such as PLAIN) using plaintext passwords are NOT
- advertised in the CAPABILITY list.
- AND
- (b) The LOGIN command returns an error even if the password is
- correct.
- AND
- (c) The AUTHENTICATE command returns an error with all [SASL]
- mechanisms that use plaintext passwords, even if the password
- is correct.
-
- A server error message for a failing LOGIN command SHOULD NOT specify
- that the user name, as opposed to the password, is invalid.
-
- A server SHOULD have mechanisms in place to limit or delay failed
- AUTHENTICATE/LOGIN attempts.
-
-
-
-Crispin Standards Track [Page 93]
-
-RFC 3501 IMAPv4 March 2003
-
-
- Additional security considerations are discussed in the section
- discussing the AUTHENTICATE and LOGIN commands.
-
-12. IANA Considerations
-
- IMAP4 capabilities are registered by publishing a standards track or
- IESG approved experimental RFC. The registry is currently located
- at:
-
- http://www.iana.org/assignments/imap4-capabilities
-
- As this specification revises the STARTTLS and LOGINDISABLED
- extensions previously defined in [IMAP-TLS], the registry will be
- updated accordingly.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 94]
-
-RFC 3501 IMAPv4 March 2003
-
-
-Appendices
-
-A. Normative References
-
- The following documents contain definitions or specifications that
- are necessary to understand this document properly:
- [ABNF] Crocker, D. and P. Overell, "Augmented BNF for
- Syntax Specifications: ABNF", RFC 2234,
- November 1997.
-
- [ANONYMOUS] Newman, C., "Anonymous SASL Mechanism", RFC
- 2245, November 1997.
-
- [CHARSET] Freed, N. and J. Postel, "IANA Character Set
- Registration Procedures", RFC 2978, October
- 2000.
-
- [DIGEST-MD5] Leach, P. and C. Newman, "Using Digest
- Authentication as a SASL Mechanism", RFC 2831,
- May 2000.
-
- [DISPOSITION] Troost, R., Dorner, S. and K. Moore,
- "Communicating Presentation Information in
- Internet Messages: The Content-Disposition
- Header", RFC 2183, August 1997.
-
- [IMAP-TLS] Newman, C., "Using TLS with IMAP, POP3 and
- ACAP", RFC 2595, June 1999.
-
- [KEYWORDS] Bradner, S., "Key words for use in RFCs to
- Indicate Requirement Levels", BCP 14, RFC 2119,
- March 1997.
-
- [LANGUAGE-TAGS] Alvestrand, H., "Tags for the Identification of
- Languages", BCP 47, RFC 3066, January 2001.
-
- [LOCATION] Palme, J., Hopmann, A. and N. Shelness, "MIME
- Encapsulation of Aggregate Documents, such as
- HTML (MHTML)", RFC 2557, March 1999.
-
- [MD5] Myers, J. and M. Rose, "The Content-MD5 Header
- Field", RFC 1864, October 1995.
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 95]
-
-RFC 3501 IMAPv4 March 2003
-
-
- [MIME-HDRS] Moore, K., "MIME (Multipurpose Internet Mail
- Extensions) Part Three: Message Header
- Extensions for Non-ASCII Text", RFC 2047,
- November 1996.
-
- [MIME-IMB] Freed, N. and N. Borenstein, "MIME
- (Multipurpose Internet Mail Extensions) Part
- One: Format of Internet Message Bodies", RFC
- 2045, November 1996.
-
- [MIME-IMT] Freed, N. and N. Borenstein, "MIME
- (Multipurpose Internet Mail Extensions) Part
- Two: Media Types", RFC 2046, November 1996.
-
- [RFC-2822] Resnick, P., "Internet Message Format", RFC
- 2822, April 2001.
-
- [SASL] Myers, J., "Simple Authentication and Security
- Layer (SASL)", RFC 2222, October 1997.
-
- [TLS] Dierks, T. and C. Allen, "The TLS Protocol
- Version 1.0", RFC 2246, January 1999.
-
- [UTF-7] Goldsmith, D. and M. Davis, "UTF-7: A Mail-Safe
- Transformation Format of Unicode", RFC 2152,
- May 1997.
-
- The following documents describe quality-of-implementation issues
- that should be carefully considered when implementing this protocol:
-
- [IMAP-IMPLEMENTATION] Leiba, B., "IMAP Implementation
- Recommendations", RFC 2683, September 1999.
-
- [IMAP-MULTIACCESS] Gahrns, M., "IMAP4 Multi-Accessed Mailbox
- Practice", RFC 2180, July 1997.
-
-A.1 Informative References
-
- The following documents describe related protocols:
-
- [IMAP-DISC] Austein, R., "Synchronization Operations for
- Disconnected IMAP4 Clients", Work in Progress.
-
- [IMAP-MODEL] Crispin, M., "Distributed Electronic Mail
- Models in IMAP4", RFC 1733, December 1994.
-
-
-
-
-
-
-Crispin Standards Track [Page 96]
-
-RFC 3501 IMAPv4 March 2003
-
-
- [ACAP] Newman, C. and J. Myers, "ACAP -- Application
- Configuration Access Protocol", RFC 2244,
- November 1997.
-
- [SMTP] Klensin, J., "Simple Mail Transfer Protocol",
- STD 10, RFC 2821, April 2001.
-
- The following documents are historical or describe historical aspects
- of this protocol:
-
- [IMAP-COMPAT] Crispin, M., "IMAP4 Compatibility with
- IMAP2bis", RFC 2061, December 1996.
-
- [IMAP-HISTORICAL] Crispin, M., "IMAP4 Compatibility with IMAP2
- and IMAP2bis", RFC 1732, December 1994.
-
- [IMAP-OBSOLETE] Crispin, M., "Internet Message Access Protocol
- - Obsolete Syntax", RFC 2062, December 1996.
-
- [IMAP2] Crispin, M., "Interactive Mail Access Protocol
- - Version 2", RFC 1176, August 1990.
-
- [RFC-822] Crocker, D., "Standard for the Format of ARPA
- Internet Text Messages", STD 11, RFC 822,
- August 1982.
-
- [RFC-821] Postel, J., "Simple Mail Transfer Protocol",
- STD 10, RFC 821, August 1982.
-
-B. Changes from RFC 2060
-
- 1) Clarify description of unique identifiers and their semantics.
-
- 2) Fix the SELECT description to clarify that UIDVALIDITY is required
- in the SELECT and EXAMINE responses.
-
- 3) Added an example of a failing search.
-
- 4) Correct store-att-flags: "#flag" should be "1#flag".
-
- 5) Made search and section rules clearer.
-
- 6) Correct the STORE example.
-
- 7) Correct "BASE645" misspelling.
-
- 8) Remove extraneous close parenthesis in example of two-part message
- with text and BASE64 attachment.
-
-
-
-Crispin Standards Track [Page 97]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 9) Remove obsolete "MAILBOX" response from mailbox-data.
-
- 10) A spurious "<" in the rule for mailbox-data was removed.
-
- 11) Add CRLF to continue-req.
-
- 12) Specifically exclude "]" from the atom in resp-text-code.
-
- 13) Clarify that clients and servers should adhere strictly to the
- protocol syntax.
-
- 14) Emphasize in 5.2 that EXISTS can not be used to shrink a mailbox.
-
- 15) Add NEWNAME to resp-text-code.
-
- 16) Clarify that the empty string, not NIL, is used as arguments to
- LIST.
-
- 17) Clarify that NIL can be returned as a hierarchy delimiter for the
- empty string mailbox name argument if the mailbox namespace is flat.
-
- 18) Clarify that addr-mailbox and addr-name have RFC-2822 quoting
- removed.
-
- 19) Update UTF-7 reference.
-
- 20) Fix example in 6.3.11.
-
- 21) Clarify that non-existent UIDs are ignored.
-
- 22) Update DISPOSITION reference.
-
- 23) Expand state diagram.
-
- 24) Clarify that partial fetch responses are only returned in
- response to a partial fetch command.
-
- 25) Add UIDNEXT response code. Correct UIDVALIDITY definition
- reference.
-
- 26) Further clarification of "can" vs. "MAY".
-
- 27) Reference RFC-2119.
-
- 28) Clarify that superfluous shifts are not permitted in modified
- UTF-7.
-
- 29) Clarify that there are no implicit shifts in modified UTF-7.
-
-
-
-Crispin Standards Track [Page 98]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 30) Clarify that "INBOX" in a mailbox name is always INBOX, even if
- it is given as a string.
-
- 31) Add missing open parenthesis in media-basic grammar rule.
-
- 32) Correct attribute syntax in mailbox-data.
-
- 33) Add UIDNEXT to EXAMINE responses.
-
- 34) Clarify UNSEEN, PERMANENTFLAGS, UIDVALIDITY, and UIDNEXT
- responses in SELECT and EXAMINE. They are required now, but weren't
- in older versions.
-
- 35) Update references with RFC numbers.
-
- 36) Flush text-mime2.
-
- 37) Clarify that modified UTF-7 names must be case-sensitive and that
- violating the convention should be avoided.
-
- 38) Correct UID FETCH example.
-
- 39) Clarify UID FETCH, UID STORE, and UID SEARCH vs. untagged EXPUNGE
- responses.
-
- 40) Clarify the use of the word "convention".
-
- 41) Clarify that a command is not "in progress" until it has been
- fully received (specifically, that a command is not "in progress"
- during command continuation negotiation).
-
- 42) Clarify envelope defaulting.
-
- 43) Clarify that SP means one and only one space character.
-
- 44) Forbid silly states in LIST response.
-
- 45) Clarify that the ENVELOPE, INTERNALDATE, RFC822*, BODY*, and UID
- for a message is static.
-
- 46) Add BADCHARSET response code.
-
- 47) Update formal syntax to [ABNF] conventions.
-
- 48) Clarify trailing hierarchy delimiter in CREATE semantics.
-
- 49) Clarify that the "blank line" is the [RFC-2822] delimiting blank
- line.
-
-
-
-Crispin Standards Track [Page 99]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 50) Clarify that RENAME should also create hierarchy as needed for
- the command to complete.
-
- 51) Fix body-ext-mpart to not require language if disposition
- present.
-
- 52) Clarify the RFC822.HEADER response.
-
- 53) Correct missing space after charset astring in search.
-
- 54) Correct missing quote for BADCHARSET in resp-text-code.
-
- 55) Clarify that ALL, FAST, and FULL preclude any other data items
- appearing.
-
- 56) Clarify semantics of reference argument in LIST.
-
- 57) Clarify that a null string for SEARCH HEADER X-FOO means any
- message with a header line with a field-name of X-FOO regardless of
- the text of the header.
-
- 58) Specifically reserve 8-bit mailbox names for future use as UTF-8.
-
- 59) It is not an error for the client to store a flag that is not in
- the PERMANENTFLAGS list; however, the server will either ignore the
- change or make the change in the session only.
-
- 60) Correct/clarify the text regarding superfluous shifts.
-
- 61) Correct typographic errors in the "Changes" section.
-
- 62) Clarify that STATUS must not be used to check for new messages in
- the selected mailbox
-
- 63) Clarify LSUB behavior with "%" wildcard.
-
- 64) Change AUTHORIZATION to AUTHENTICATE in section 7.5.
-
- 65) Clarify description of multipart body type.
-
- 66) Clarify that STORE FLAGS does not affect \Recent.
-
- 67) Change "west" to "east" in description of timezone.
-
- 68) Clarify that commands which break command pipelining must wait
- for a completion result response.
-
- 69) Clarify that EXAMINE does not affect \Recent.
-
-
-
-Crispin Standards Track [Page 100]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 70) Make description of MIME structure consistent.
-
- 71) Clarify that date searches disregard the time and timezone of the
- INTERNALDATE or Date: header. In other words, "ON 13-APR-2000" means
- messages with an INTERNALDATE text which starts with "13-APR-2000",
- even if timezone differential from the local timezone is sufficient
- to move that INTERNALDATE into the previous or next day.
-
- 72) Clarify that the header fetches don't add a blank line if one
- isn't in the [RFC-2822] message.
-
- 73) Clarify (in discussion of UIDs) that messages are immutable.
-
- 74) Add an example of CHARSET searching.
-
- 75) Clarify in SEARCH that keywords are a type of flag.
-
- 76) Clarify the mandatory nature of the SELECT data responses.
-
- 77) Add optional CAPABILITY response code in the initial OK or
- PREAUTH.
-
- 78) Add note that server can send an untagged CAPABILITY command as
- part of the responses to AUTHENTICATE and LOGIN.
-
- 79) Remove statement about it being unnecessary to issue a CAPABILITY
- command more than once in a connection. That statement is no longer
- true.
-
- 80) Clarify that untagged EXPUNGE decrements the number of messages
- in the mailbox.
-
- 81) Fix definition of "body" (concatenation has tighter binding than
- alternation).
-
- 82) Add a new "Special Notes to Implementors" section with reference
- to [IMAP-IMPLEMENTATION].
-
- 83) Clarify that an untagged CAPABILITY response to an AUTHENTICATE
- command should only be done if a security layer was not negotiated.
-
- 84) Change the definition of atom to exclude "]". Update astring to
- include "]" for compatibility with the past. Remove resp-text-atom.
-
- 85) Remove NEWNAME. It can't work because mailbox names can be
- literals and can include "]". Functionality can be addressed via
- referrals.
-
-
-
-
-Crispin Standards Track [Page 101]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 86) Move modified UTF-7 rationale in order to have more logical
- paragraph flow.
-
- 87) Clarify UID uniqueness guarantees with the use of MUST.
-
- 88) Note that clients should read response data until the connection
- is closed instead of immediately closing on a BYE.
-
- 89) Change RFC-822 references to RFC-2822.
-
- 90) Clarify that RFC-2822 should be followed instead of RFC-822.
-
- 91) Change recommendation of optional automatic capabilities in LOGIN
- and AUTHENTICATE to use the CAPABILITY response code in the tagged
- OK. This is more interoperable than an unsolicited untagged
- CAPABILITY response.
-
- 92) STARTTLS and AUTH=PLAIN are mandatory to implement; add
- recommendations for other [SASL] mechanisms.
-
- 93) Clarify that a "connection" (as opposed to "server" or "command")
- is in one of the four states.
-
- 94) Clarify that a failed or rejected command does not change state.
-
- 95) Split references between normative and informative.
-
- 96) Discuss authentication failure issues in security section.
-
- 97) Clarify that a data item is not necessarily of only one data
- type.
-
- 98) Clarify that sequence ranges are independent of order.
-
- 99) Change an example to clarify that superfluous shifts in
- Modified-UTF7 can not be fixed just by omitting the shift. The
- entire string must be recalculated.
-
- 100) Change Envelope Structure definition since [RFC-2822] uses
- "envelope" to refer to the [SMTP] envelope and not the envelope data
- that appears in the [RFC-2822] header.
-
- 101) Expand on RFC822.HEADER response data vs. BODY[HEADER].
-
- 102) Clarify Logout state semantics, change ASCII art.
-
- 103) Security changes to comply with IESG requirements.
-
-
-
-
-Crispin Standards Track [Page 102]
-
-RFC 3501 IMAPv4 March 2003
-
-
- 104) Add definition for body URI.
-
- 105) Break sequence range definition into three rules, with rewritten
- descriptions for each.
-
- 106) Move STARTTLS and LOGINDISABLED here from [IMAP-TLS].
-
- 107) Add IANA Considerations section.
-
- 108) Clarify valid client assumptions for new message UIDs vs.
- UIDNEXT.
-
- 109) Clarify that changes to permanentflags affect concurrent
- sessions as well as subsequent sessions.
-
- 110) Clarify that authenticated state can be entered by the CLOSE
- command.
-
- 111) Emphasize that SELECT and EXAMINE are the exceptions to the rule
- that a failing command does not change state.
-
- 112) Clarify that newly-appended messages have the Recent flag set.
-
- 113) Clarify that newly-copied messages SHOULD have the Recent flag
- set.
-
- 114) Clarify that UID commands always return the UID in FETCH
- responses.
-
-C. Key Word Index
-
- +FLAGS <flag list> (store command data item) ............... 59
- +FLAGS.SILENT <flag list> (store command data item) ........ 59
- -FLAGS <flag list> (store command data item) ............... 59
- -FLAGS.SILENT <flag list> (store command data item) ........ 59
- ALERT (response code) ...................................... 64
- ALL (fetch item) ........................................... 55
- ALL (search key) ........................................... 50
- ANSWERED (search key) ...................................... 50
- APPEND (command) ........................................... 45
- AUTHENTICATE (command) ..................................... 27
- BAD (response) ............................................. 66
- BADCHARSET (response code) ................................. 64
- BCC <string> (search key) .................................. 51
- BEFORE <date> (search key) ................................. 51
- BODY (fetch item) .......................................... 55
- BODY (fetch result) ........................................ 73
- BODY <string> (search key) ................................. 51
-
-
-
-Crispin Standards Track [Page 103]
-
-RFC 3501 IMAPv4 March 2003
-
-
- BODY.PEEK[<section>]<<partial>> (fetch item) ............... 57
- BODYSTRUCTURE (fetch item) ................................. 57
- BODYSTRUCTURE (fetch result) ............................... 74
- BODY[<section>]<<origin octet>> (fetch result) ............. 74
- BODY[<section>]<<partial>> (fetch item) .................... 55
- BYE (response) ............................................. 67
- Body Structure (message attribute) ......................... 12
- CAPABILITY (command) ....................................... 24
- CAPABILITY (response code) ................................. 64
- CAPABILITY (response) ...................................... 68
- CC <string> (search key) ................................... 51
- CHECK (command) ............................................ 47
- CLOSE (command) ............................................ 48
- COPY (command) ............................................. 59
- CREATE (command) ........................................... 34
- DELETE (command) ........................................... 35
- DELETED (search key) ....................................... 51
- DRAFT (search key) ......................................... 51
- ENVELOPE (fetch item) ...................................... 57
- ENVELOPE (fetch result) .................................... 77
- EXAMINE (command) .......................................... 33
- EXISTS (response) .......................................... 71
- EXPUNGE (command) .......................................... 48
- EXPUNGE (response) ......................................... 72
- Envelope Structure (message attribute) ..................... 12
- FAST (fetch item) .......................................... 55
- FETCH (command) ............................................ 54
- FETCH (response) ........................................... 73
- FLAGGED (search key) ....................................... 51
- FLAGS (fetch item) ......................................... 57
- FLAGS (fetch result) ....................................... 78
- FLAGS (response) ........................................... 71
- FLAGS <flag list> (store command data item) ................ 59
- FLAGS.SILENT <flag list> (store command data item) ......... 59
- FROM <string> (search key) ................................. 51
- FULL (fetch item) .......................................... 55
- Flags (message attribute) .................................. 11
- HEADER (part specifier) .................................... 55
- HEADER <field-name> <string> (search key) .................. 51
- HEADER.FIELDS <header-list> (part specifier) ............... 55
- HEADER.FIELDS.NOT <header-list> (part specifier) ........... 55
- INTERNALDATE (fetch item) .................................. 57
- INTERNALDATE (fetch result) ................................ 78
- Internal Date (message attribute) .......................... 12
- KEYWORD <flag> (search key) ................................ 51
- Keyword (type of flag) ..................................... 11
- LARGER <n> (search key) .................................... 51
- LIST (command) ............................................. 40
-
-
-
-Crispin Standards Track [Page 104]
-
-RFC 3501 IMAPv4 March 2003
-
-
- LIST (response) ............................................ 69
- LOGIN (command) ............................................ 30
- LOGOUT (command) ........................................... 25
- LSUB (command) ............................................. 43
- LSUB (response) ............................................ 70
- MAY (specification requirement term) ....................... 4
- MESSAGES (status item) ..................................... 45
- MIME (part specifier) ...................................... 56
- MUST (specification requirement term) ...................... 4
- MUST NOT (specification requirement term) .................. 4
- Message Sequence Number (message attribute) ................ 10
- NEW (search key) ........................................... 51
- NO (response) .............................................. 66
- NOOP (command) ............................................. 25
- NOT <search-key> (search key) .............................. 52
- OK (response) .............................................. 65
- OLD (search key) ........................................... 52
- ON <date> (search key) ..................................... 52
- OPTIONAL (specification requirement term) .................. 4
- OR <search-key1> <search-key2> (search key) ................ 52
- PARSE (response code) ...................................... 64
- PERMANENTFLAGS (response code) ............................. 64
- PREAUTH (response) ......................................... 67
- Permanent Flag (class of flag) ............................. 12
- READ-ONLY (response code) .................................. 65
- READ-WRITE (response code) ................................. 65
- RECENT (response) .......................................... 72
- RECENT (search key) ........................................ 52
- RECENT (status item) ....................................... 45
- RENAME (command) ........................................... 37
- REQUIRED (specification requirement term) .................. 4
- RFC822 (fetch item) ........................................ 57
- RFC822 (fetch result) ...................................... 78
- RFC822.HEADER (fetch item) ................................. 57
- RFC822.HEADER (fetch result) ............................... 78
- RFC822.SIZE (fetch item) ................................... 57
- RFC822.SIZE (fetch result) ................................. 78
- RFC822.TEXT (fetch item) ................................... 58
- RFC822.TEXT (fetch result) ................................. 79
- SEARCH (command) ........................................... 49
- SEARCH (response) .......................................... 71
- SEEN (search key) .......................................... 52
- SELECT (command) ........................................... 31
- SENTBEFORE <date> (search key) ............................. 52
- SENTON <date> (search key) ................................. 52
- SENTSINCE <date> (search key) .............................. 52
- SHOULD (specification requirement term) .................... 4
- SHOULD NOT (specification requirement term) ................ 4
-
-
-
-Crispin Standards Track [Page 105]
-
-RFC 3501 IMAPv4 March 2003
-
-
- SINCE <date> (search key) .................................. 52
- SMALLER <n> (search key) ................................... 52
- STARTTLS (command) ......................................... 27
- STATUS (command) ........................................... 44
- STATUS (response) .......................................... 70
- STORE (command) ............................................ 58
- SUBJECT <string> (search key) .............................. 53
- SUBSCRIBE (command) ........................................ 38
- Session Flag (class of flag) ............................... 12
- System Flag (type of flag) ................................. 11
- TEXT (part specifier) ...................................... 56
- TEXT <string> (search key) ................................. 53
- TO <string> (search key) ................................... 53
- TRYCREATE (response code) .................................. 65
- UID (command) .............................................. 60
- UID (fetch item) ........................................... 58
- UID (fetch result) ......................................... 79
- UID <sequence set> (search key) ............................ 53
- UIDNEXT (response code) .................................... 65
- UIDNEXT (status item) ...................................... 45
- UIDVALIDITY (response code) ................................ 65
- UIDVALIDITY (status item) .................................. 45
- UNANSWERED (search key) .................................... 53
- UNDELETED (search key) ..................................... 53
- UNDRAFT (search key) ....................................... 53
- UNFLAGGED (search key) ..................................... 53
- UNKEYWORD <flag> (search key) .............................. 53
- UNSEEN (response code) ..................................... 65
- UNSEEN (search key) ........................................ 53
- UNSEEN (status item) ....................................... 45
- UNSUBSCRIBE (command) ...................................... 39
- Unique Identifier (UID) (message attribute) ................ 8
- X<atom> (command) .......................................... 62
- [RFC-2822] Size (message attribute) ........................ 12
- \Answered (system flag) .................................... 11
- \Deleted (system flag) ..................................... 11
- \Draft (system flag) ....................................... 11
- \Flagged (system flag) ..................................... 11
- \Marked (mailbox name attribute) ........................... 69
- \Noinferiors (mailbox name attribute) ...................... 69
- \Noselect (mailbox name attribute) ......................... 69
- \Recent (system flag) ...................................... 11
- \Seen (system flag) ........................................ 11
- \Unmarked (mailbox name attribute) ......................... 69
-
-
-
-
-
-
-
-Crispin Standards Track [Page 106]
-
-RFC 3501 IMAPv4 March 2003
-
-
-Author's Address
-
- Mark R. Crispin
- Networks and Distributed Computing
- University of Washington
- 4545 15th Avenue NE
- Seattle, WA 98105-4527
-
- Phone: (206) 543-5762
-
- EMail: MRC@CAC.Washington.EDU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 107]
-
-RFC 3501 IMAPv4 March 2003
-
-
-Full Copyright Statement
-
- Copyright (C) The Internet Society (2003). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns. v This
- document and the information contained herein is provided on an "AS
- IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK
- FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL
- NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Crispin Standards Track [Page 108]
-
diff --git a/vendor/github.com/mattermost/rsc/imap/sx.go b/vendor/github.com/mattermost/rsc/imap/sx.go
deleted file mode 100644
index 8b0e361fa..000000000
--- a/vendor/github.com/mattermost/rsc/imap/sx.go
+++ /dev/null
@@ -1,350 +0,0 @@
-package imap
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "log"
- "strings"
- "time"
-)
-
-type sxKind int
-
-const (
- sxNone sxKind = iota
- sxAtom
- sxString
- sxNumber
- sxList
-)
-
-type sx struct {
- kind sxKind
- data []byte
- number int64
- sx []*sx
-}
-
-func rdsx(b *bufio.Reader) (*sx, error) {
- x := &sx{kind: sxList}
- for {
- xx, err := rdsx1(b)
- if err != nil {
- return nil, err
- }
- if xx == nil {
- break
- }
- x.sx = append(x.sx, xx)
- }
- return x, nil
-}
-
-func rdsx1(b *bufio.Reader) (*sx, error) {
- c, err := b.ReadByte()
- if c == ' ' {
- c, err = b.ReadByte()
- }
- if c == '\r' {
- c, err = b.ReadByte()
- }
- if err != nil {
- return nil, err
- }
- if c == '\n' {
- return nil, nil
- }
- if c == ')' { // end of list
- b.UnreadByte()
- return nil, nil
- }
- if c == '(' { // parenthesized list
- x, err := rdsx(b)
- if err != nil {
- return nil, err
- }
- c, err = b.ReadByte()
- if err != nil {
- return nil, err
- }
- if c != ')' {
- // oops! not good
- b.UnreadByte()
- }
- return x, nil
- }
- if c == '{' { // length-prefixed string
- n := 0
- for {
- c, _ = b.ReadByte()
- if c < '0' || c > '9' {
- break
- }
- n = n*10 + int(c) - '0'
- }
- if c != '}' {
- // oops! not good
- b.UnreadByte()
- }
- c, err = b.ReadByte()
- if c != '\r' {
- // oops! not good
- }
- c, err = b.ReadByte()
- if c != '\n' {
- // oops! not good
- }
- data := make([]byte, n)
- if _, err := io.ReadFull(b, data); err != nil {
- return nil, err
- }
- return &sx{kind: sxString, data: data}, nil
- }
- if c == '"' { // quoted string
- var data []byte
- for {
- c, err = b.ReadByte()
- if err != nil {
- return nil, err
- }
- if c == '"' {
- break
- }
- if c == '\\' {
- c, _ = b.ReadByte()
- }
- data = append(data, c)
- }
- return &sx{kind: sxString, data: data}, nil
- }
- if '0' <= c && c <= '9' { // number
- n := int64(c) - '0'
- for {
- c, err := b.ReadByte()
- if err != nil {
- return nil, err
- }
- if c < '0' || c > '9' {
- break
- }
- n = n*10 + int64(c) - '0'
- }
- b.UnreadByte()
- return &sx{kind: sxNumber, number: n}, nil
- }
-
- // atom
- nbr := 0
- var data []byte
- data = append(data, c)
- for {
- c, err = b.ReadByte()
- if err != nil {
- return nil, err
- }
- if c <= ' ' || c == '(' || c == ')' || c == '{' || c == '}' {
- break
- }
- if c == '[' {
- // allow embedded brackets as in BODY[]
- if data[0] == '[' {
- break
- }
- nbr++
- }
- if c == ']' {
- if nbr <= 0 {
- break
- }
- nbr--
- }
- data = append(data, c)
- }
- if c != ' ' {
- b.UnreadByte()
- }
- return &sx{kind: sxAtom, data: data}, nil
-}
-
-func (x *sx) ok() bool {
- return len(x.sx) >= 2 && x.sx[1].kind == sxAtom && strings.EqualFold(string(x.sx[1].data), "ok")
-}
-
-func (x *sx) String() string {
- var b bytes.Buffer
- x.fmt(&b, true)
- return b.String()
-}
-
-func (x *sx) fmt(b *bytes.Buffer, paren bool) {
- if x == nil {
- return
- }
- switch x.kind {
- case sxAtom, sxString:
- fmt.Fprintf(b, "%q", x.data)
- case sxNumber:
- fmt.Fprintf(b, "%d", x.number)
- case sxList:
- if paren {
- b.WriteByte('(')
- }
- for i, xx := range x.sx {
- if i > 0 {
- b.WriteByte(' ')
- }
- xx.fmt(b, paren)
- }
- if paren {
- b.WriteByte(')')
- }
- default:
- b.WriteByte('?')
- }
-}
-
-var bytesNIL = []byte("NIL")
-
-var fmtKind = []sxKind{
- 'L': sxList,
- 'S': sxString,
- 'N': sxNumber,
- 'A': sxAtom,
-}
-
-func (x *sx) match(format string) bool {
- done := false
- c := format[0]
- for i := 0; i < len(x.sx); i++ {
- if !done {
- if i >= len(format) {
- log.Printf("sxmatch: too short")
- return false
- }
- if format[i] == '*' {
- done = true
- } else {
- c = format[i]
- }
- }
- xx := x.sx[i]
- if xx.kind == sxAtom && xx.isNil() {
- if c == 'L' {
- xx.kind = sxList
- xx.data = nil
- } else if c == 'S' {
- xx.kind = sxString
- xx.data = nil
- }
- }
- if xx.kind == sxAtom && c == 'S' {
- xx.kind = sxString
- }
- if xx.kind != fmtKind[c] {
- log.Printf("sxmatch: %s not %c", xx, c)
- return false
- }
- }
- if len(format) > len(x.sx) {
- log.Printf("sxmatch: too long")
- return false
- }
- return true
-}
-
-func (x *sx) isAtom(name string) bool {
- if x == nil || x.kind != sxAtom {
- return false
- }
- data := x.data
- n := len(name)
- if n > 0 && name[n-1] == '[' {
- i := bytes.IndexByte(data, '[')
- if i < 0 {
- return false
- }
- data = data[:i]
- name = name[:n-1]
- }
- for i := 0; i < len(name); i++ {
- if i >= len(data) || lwr(rune(data[i])) != lwr(rune(name[i])) {
- return false
- }
- }
- return len(name) == len(data)
-}
-
-func (x *sx) isString() bool {
- if x.isNil() {
- return true
- }
- if x.kind == sxAtom {
- x.kind = sxString
- }
- return x.kind == sxString
-}
-
-func (x *sx) isNumber() bool {
- return x.kind == sxNumber
-}
-
-func (x *sx) isNil() bool {
- return x == nil ||
- x.kind == sxList && len(x.sx) == 0 ||
- x.kind == sxAtom && bytes.Equal(x.data, bytesNIL)
-}
-
-func (x *sx) isList() bool {
- return x.isNil() || x.kind == sxList
-}
-
-func (x *sx) parseFlags() Flags {
- if x.kind != sxList {
- log.Printf("malformed flags: %s", x)
- return 0
- }
-
- f := Flags(0)
-SX:
- for _, xx := range x.sx {
- if xx.kind != sxAtom {
- continue
- }
- for i, name := range flagNames {
- if xx.isAtom(name) {
- f |= 1 << uint(i)
- continue SX
- }
- }
- if Debug {
- log.Printf("unknown flag: %v", xx)
- }
- }
- return f
-}
-
-func (x *sx) parseDate() time.Time {
- if x.kind != sxString {
- log.Printf("malformed date: %s", x)
- return time.Time{}
- }
-
- t, err := time.Parse("02-Jan-2006 15:04:05 -0700", string(x.data))
- if err != nil {
- log.Printf("malformed date: %s (%s)", x, err)
- }
- return t
-}
-
-func (x *sx) nstring() string {
- return string(x.nbytes())
-}
-
-func (x *sx) nbytes() []byte {
- if x.isNil() {
- return nil
- }
- return x.data
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/sx_test.go b/vendor/github.com/mattermost/rsc/imap/sx_test.go
deleted file mode 100644
index 9644209ca..000000000
--- a/vendor/github.com/mattermost/rsc/imap/sx_test.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package imap
-
-import (
- "bufio"
- "reflect"
- "strings"
- "testing"
-)
-
-var sxTests = []struct {
- in string
- out *sx
-}{
- {"1234", &sx{kind: sxNumber, number: 1234}},
- {"hello", &sx{kind: sxAtom, data: []byte("hello")}},
- {"hello[world]", &sx{kind: sxAtom, data: []byte("hello[world]")}},
- {`"h\\ello"`, &sx{kind: sxString, data: []byte(`h\ello`)}},
- {"{6}\r\nh\\ello", &sx{kind: sxString, data: []byte(`h\ello`)}},
- {`(hello "world" (again) ())`,
- &sx{
- kind: sxList,
- sx: []*sx{
- &sx{
- kind: sxAtom,
- data: []byte("hello"),
- },
- &sx{
- kind: sxString,
- data: []byte("world"),
- },
- &sx{
- kind: sxList,
- sx: []*sx{
- &sx{
- kind: sxAtom,
- data: []byte("again"),
- },
- },
- },
- &sx{
- kind: sxList,
- },
- },
- },
- },
-}
-
-func TestSx(t *testing.T) {
- for _, tt := range sxTests {
- b := bufio.NewReader(strings.NewReader(tt.in + "\n"))
- sx, err := rdsx1(b)
- if err != nil {
- t.Errorf("parse %s: %v", tt.in, err)
- continue
- }
- if !reflect.DeepEqual(sx, tt.out) {
- t.Errorf("rdsx1(%s) = %v, want %v", tt.in, sx, tt.out)
- }
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/imap/tcs.go b/vendor/github.com/mattermost/rsc/imap/tcs.go
deleted file mode 100644
index 6a0939e01..000000000
--- a/vendor/github.com/mattermost/rsc/imap/tcs.go
+++ /dev/null
@@ -1,602 +0,0 @@
-package imap
-
-// NOTE(rsc): These belong elsewhere but the existing charset
-// packages seem too complicated.
-
-var tab_iso8859_1 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
-}
-
-var tab_iso8859_2 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
- 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
- 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
- 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
- 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
- 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
- 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
- 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
- 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
- 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
- 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
- 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
-}
-
-var tab_iso8859_3 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, -1, 0x0124, 0x00a7,
- 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, -1, 0x017b,
- 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7,
- 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, -1, 0x017c,
- 0x00c0, 0x00c1, 0x00c2, -1, 0x00c4, 0x010a, 0x0108, 0x00c7,
- 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
- -1, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7,
- 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
- 0x00e0, 0x00e1, 0x00e2, -1, 0x00e4, 0x010b, 0x0109, 0x00e7,
- 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
- -1, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7,
- 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9,
-}
-
-var tab_iso8859_4 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
- 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
- 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
- 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
- 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
- 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
- 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
- 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
- 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
- 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
- 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
- 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9,
-}
-
-var tab_iso8859_5 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
- 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
- 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
- 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
-}
-
-var tab_iso8859_6 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, -1, -1, -1, 0x00a4, -1, -1, -1,
- -1, -1, -1, -1, 0x060c, 0x00ad, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 0x061b, -1, -1, -1, 0x061f,
- -1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
- 0x0638, 0x0639, 0x063a, -1, -1, -1, -1, -1,
- 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
- 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
- 0x0650, 0x0651, 0x0652, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-}
-
-var tab_iso8859_7 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x2018, 0x2019, 0x00a3, -1, -1, 0x00a6, 0x00a7,
- 0x00a8, 0x00a9, -1, 0x00ab, 0x00ac, 0x00ad, -1, 0x2015,
- 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7,
- 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
- 0x03a0, 0x03a1, -1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
- 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
- 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
- 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
- 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
- 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, -1,
-}
-
-var tab_iso8859_8 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, -1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
- 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x203e,
- 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
- 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 0x2017,
- 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
- 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
- 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
- 0x05e8, 0x05e9, 0x05ea, -1, -1, -1, -1, -1,
-}
-
-var tab_iso8859_9 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
- 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
- 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
- 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
- 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
- 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
- 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
- 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
- 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
- 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
- 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
- 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
-}
-
-var tab_iso8859_10 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7,
- 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
- 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7,
- 0x013c, 0x0110, 0x0161, 0x0167, 0x017e, 0x2014, 0x016b, 0x014b,
- 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
- 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
- 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168,
- 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
- 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
- 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
- 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169,
- 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138,
-}
-
-var tab_iso8859_15 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0x20ac, 0xa5, 0x0160, 0xa7, 0x0161, 0xa9, 0xaa, 0xab, 0xac, 0xad,
- 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0x017d, 0xb5, 0xb6, 0xb7, 0x017e, 0xb9, 0xba, 0xbb,
- 0x0152, 0x0153, 0x0178, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
- 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,
- 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6,
- 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
-}
-
-var tab_koi8 = [256]rune{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
- 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
- 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
- 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
- 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
- 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
- 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
- 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a,
-}
-
-var tab_cp1250 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, -1, 0x201E, 0x2026, 0x2020, 0x2021,
- -1, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- -1, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
- 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
- 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
- 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
- 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
-}
-var tab_cp1251 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
- 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- -1, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
- 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
- 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
- 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
- 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
-}
-var tab_cp1252 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, -1, 0x017D, -1,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, -1, 0x017E, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
-}
-var tab_cp1253 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- -1, 0x2030, -1, 0x2039, -1, -1, -1, -1,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- -1, 0x2122, -1, 0x203A, -1, -1, -1, -1,
- 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, -1, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
- 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, -1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
- 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, -1,
-}
-var tab_cp1254 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, -1, -1, -1,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, -1, -1, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF,
-}
-var tab_cp1255 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, -1, 0x2039, -1, -1, -1, -1,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, -1, 0x203A, -1, -1, -1, -1,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
- 0x05B8, 0x05B9, -1, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
- 0x05F4, -1, -1, -1, -1, -1, -1, -1,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, -1, -1, 0x200E, 0x200F, -1,
-}
-var tab_cp1256 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
- 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
- 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
- 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
- 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
- 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
- 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
- 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2,
-}
-var tab_cp1257 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, -1, 0x201E, 0x2026, 0x2020, 0x2021,
- -1, 0x2030, -1, 0x2039, -1, 0x00A8, 0x02C7, 0x00B8,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- -1, 0x2122, -1, 0x203A, -1, 0x00AF, 0x02DB, -1,
- 0x00A0, -1, 0x00A2, 0x00A3, 0x00A4, -1, 0x00A6, 0x00A7,
- 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
- 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
- 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
- 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
- 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9,
-}
-var tab_cp1258 = [256]rune{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, -1, 0x2039, 0x0152, -1, -1, -1,
- -1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, -1, 0x203A, 0x0153, -1, -1, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
- 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
- 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF,
-}
diff --git a/vendor/github.com/mattermost/rsc/keychain/doc.go b/vendor/github.com/mattermost/rsc/keychain/doc.go
deleted file mode 100644
index e7e21fd2e..000000000
--- a/vendor/github.com/mattermost/rsc/keychain/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package keychain implements access to the passwords and other keys
-// stored in the system-provided keychain.
-package keychain
-
-// BUG(rsc): Package keychain is only implemented on OS X.
-
-import (
- "fmt"
-)
-
-// UserPasswd returns the user name and password for authenticating
-// to the named server. If the user argument is non-empty, UserPasswd
-// restricts its search to passwords for the named user.
-func UserPasswd(server, preferredUser string) (user, passwd string, err error) {
- user, passwd, err = userPasswd(server, preferredUser)
- if err != nil {
- if preferredUser != "" {
- err = fmt.Errorf("loading password for %s@%s: %v", preferredUser, server, err)
- } else {
- err = fmt.Errorf("loading password for %s: %v", server, err)
- }
- }
- return
-}
diff --git a/vendor/github.com/mattermost/rsc/keychain/mac.go b/vendor/github.com/mattermost/rsc/keychain/mac.go
deleted file mode 100644
index 523579169..000000000
--- a/vendor/github.com/mattermost/rsc/keychain/mac.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2012 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 file.
-
-package keychain
-
-/*
-#include <CoreFoundation/CoreFoundation.h>
-#include <Security/Security.h>
-#include <CoreServices/CoreServices.h>
-
-#cgo LDFLAGS: -framework CoreFoundation -framework Security
-
-static char*
-mac2c(CFStringRef s)
-{
- char *p;
- int n;
-
- n = CFStringGetLength(s)*8;
- p = malloc(n);
- CFStringGetCString(s, p, n, kCFStringEncodingUTF8);
- return p;
-}
-
-void
-keychain_getpasswd(char *user0, char *server, char **user, char **passwd, char **error)
-{
- OSStatus st;
- UInt32 len;
- void *data;
- SecKeychainItemRef it;
- CFStringRef str;
-
- *user = NULL;
- *passwd = NULL;
- *error = NULL;
-
- st = SecKeychainFindInternetPassword(
- NULL, // default keychain
- strlen(server), server,
- 0, NULL, // security domain
- strlen(user0), user0, // account name
- 0, NULL, // path
- 0, // port
- 0, // protocol type
- kSecAuthenticationTypeDefault,
- &len,
- &data,
- &it);
- if(st != 0) {
- str = SecCopyErrorMessageString(st, NULL);
- *error = mac2c(str);
- CFRelease(str);
- return;
- }
- *passwd = malloc(len+1);
- memmove(*passwd, data, len);
- (*passwd)[len] = '\0';
- SecKeychainItemFreeContent(NULL, data);
-
- SecKeychainAttribute attr = {kSecAccountItemAttr, 0, NULL};
- SecKeychainAttributeList attrl = {1, &attr};
- st = SecKeychainItemCopyContent(
- it,
- NULL,
- &attrl,
- 0, NULL);
- if(st != 0) {
- str = SecCopyErrorMessageString(st, NULL);
- *error = mac2c(str);
- CFRelease(str);
- return;
- }
- data = attr.data;
- len = attr.length;
- *user = malloc(len+1);
- memmove(*user, data, len);
- (*user)[len] = '\0';
- SecKeychainItemFreeContent(&attrl, NULL);
-}
-*/
-import "C"
-
-import (
- "errors"
- "unsafe"
-)
-
-func userPasswd(server, user string) (user1, passwd string, err error) {
- cServer := C.CString(server)
- cUser := C.CString(user)
- defer C.free(unsafe.Pointer(cServer))
- defer C.free(unsafe.Pointer(cUser))
-
- var cPasswd, cError *C.char
- C.keychain_getpasswd(cUser, cServer, &cUser, &cPasswd, &cError)
- defer C.free(unsafe.Pointer(cUser))
- defer C.free(unsafe.Pointer(cPasswd))
- defer C.free(unsafe.Pointer(cError))
-
- if cError != nil {
- return "", "", errors.New(C.GoString(cError))
- }
-
- return C.GoString(cUser), C.GoString(cPasswd), nil
-}
diff --git a/vendor/github.com/mattermost/rsc/mbta/Passages.pb b/vendor/github.com/mattermost/rsc/mbta/Passages.pb
deleted file mode 100644
index 5eb9e900e..000000000
--- a/vendor/github.com/mattermost/rsc/mbta/Passages.pb
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/mattermost/rsc/mbta/Vehicles.pb b/vendor/github.com/mattermost/rsc/mbta/Vehicles.pb
deleted file mode 100644
index 98d90c800..000000000
--- a/vendor/github.com/mattermost/rsc/mbta/Vehicles.pb
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/mattermost/rsc/mbta/mbta.go b/vendor/github.com/mattermost/rsc/mbta/mbta.go
deleted file mode 100644
index c8c68e6e2..000000000
--- a/vendor/github.com/mattermost/rsc/mbta/mbta.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package main
-
-import (
- "io/ioutil"
- "log"
- "os"
-
- "code.google.com/p/goprotobuf/proto"
- "github.com/mattermost/rsc/gtfs"
-)
-
-func main() {
- log.SetFlags(0)
- if len(os.Args) != 2 {
- log.Fatal("usage: mbta file.pb")
- }
- pb, err := ioutil.ReadFile(os.Args[1])
- if err != nil {
- log.Fatal(err)
- }
-
- var feed gtfs.FeedMessage
- if err := proto.Unmarshal(pb, &feed); err != nil {
- log.Fatal(err)
- }
-
- proto.MarshalText(os.Stdout, &feed)
-}
diff --git a/vendor/github.com/mattermost/rsc/mkapp b/vendor/github.com/mattermost/rsc/mkapp
deleted file mode 100755
index 1a52931f1..000000000
--- a/vendor/github.com/mattermost/rsc/mkapp
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-# Copyright 2012 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 file.
-
-# Run this script in your app root directory, the one containing
-# the app.yaml file. Then point appcfg.py or dev_appserver.py
-# at './tmp' instead of '.'.
-#
-# It creates a symlink forest in a subdirectory named 'tmp' that
-# includes all the files from packages under your app root as
-# well as any packages from your $GOPATH that are needed by
-# the app packages. This makes deployment to App Engine
-# bring in just the packages you need, without manual chasing
-# of dependencies. Perhaps some day appcfg.py and dev_appserver.py
-# will work this way by default.
-
-set -e
-rm -rf tmp
-dirs=$(find . -type d)
-mkdir tmp
-
-for i in *
-do
- case "$i" in
- tmp | *.go)
- ;;
- *)
- ln -s ../$i tmp/$i
- esac
-done
-
-# Like App Engine
-export GOOS=linux
-export GOARCH=amd64
-
-mkdir tmp/_go_top
-cp $(go list -f '{{range .GoFiles}}{{.}} {{end}}') tmp/_go_top
-
-dirs=$(go list -e -f '{{if not .Standard}}{{.ImportPath}} {{end}}' $(go list -f '{{range .Deps}}{{.}} {{end}}' $dirs))
-for import in $dirs
-do
- case "$import" in
- appengine | appengine/*)
- ;;
- *)
- mkdir -p tmp/$import
- files=$(go list -f '{{range .GoFiles}}{{$.Dir}}/{{.}} {{end}}' $import)
- ln -s $files tmp/$import 2>&1 | grep -v 'is a directory' || true # ignore subdirectory warnings
- esac
-done
diff --git a/vendor/github.com/mattermost/rsc/plist/plist.go b/vendor/github.com/mattermost/rsc/plist/plist.go
deleted file mode 100644
index 1c76bface..000000000
--- a/vendor/github.com/mattermost/rsc/plist/plist.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package plist implements parsing of Apple plist files.
-package plist
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strconv"
-)
-
-func next(data []byte) (skip, tag, rest []byte) {
- i := bytes.IndexByte(data, '<')
- if i < 0 {
- return data, nil, nil
- }
- j := bytes.IndexByte(data[i:], '>')
- if j < 0 {
- return data, nil, nil
- }
- j += i + 1
- return data[:i], data[i:j], data[j:]
-}
-
-func Unmarshal(data []byte, v interface{}) error {
- _, tag, data := next(data)
- if !bytes.HasPrefix(tag, []byte("<plist")) {
- return fmt.Errorf("not a plist")
- }
-
- data, err := unmarshalValue(data, reflect.ValueOf(v))
- if err != nil {
- return err
- }
- _, tag, data = next(data)
- if !bytes.Equal(tag, []byte("</plist>")) {
- return fmt.Errorf("junk on end of plist")
- }
- return nil
-}
-
-func unmarshalValue(data []byte, v reflect.Value) (rest []byte, err error) {
- _, tag, data := next(data)
- if tag == nil {
- return nil, fmt.Errorf("unexpected end of data")
- }
-
- if v.Kind() == reflect.Ptr {
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- v = v.Elem()
- }
-
- switch string(tag) {
- case "<dict>":
- t := v.Type()
- if v.Kind() != reflect.Struct {
- return nil, fmt.Errorf("cannot unmarshal <dict> into non-struct %s", v.Type())
- }
- Dict:
- for {
- _, tag, data = next(data)
- if len(tag) == 0 {
- return nil, fmt.Errorf("eof inside <dict>")
- }
- if string(tag) == "</dict>" {
- break
- }
- if string(tag) != "<key>" {
- return nil, fmt.Errorf("unexpected tag %s inside <dict>", tag)
- }
- var body []byte
- body, tag, data = next(data)
- if len(tag) == 0 {
- return nil, fmt.Errorf("eof inside <dict>")
- }
- if string(tag) != "</key>" {
- return nil, fmt.Errorf("unexpected tag %s inside <dict>", tag)
- }
- name := string(body)
- var i int
- for i = 0; i < t.NumField(); i++ {
- f := t.Field(i)
- if f.Name == name || f.Tag.Get("plist") == name {
- data, err = unmarshalValue(data, v.Field(i))
- continue Dict
- }
- }
- data, err = skipValue(data)
- if err != nil {
- return nil, err
- }
- }
- return data, nil
-
- case "<array>":
- t := v.Type()
- if v.Kind() != reflect.Slice {
- return nil, fmt.Errorf("cannot unmarshal <array> into non-slice %s", v.Type())
- }
- for {
- _, tag, rest := next(data)
- if len(tag) == 0 {
- return nil, fmt.Errorf("eof inside <array>")
- }
- if string(tag) == "</array>" {
- data = rest
- break
- }
- elem := reflect.New(t.Elem()).Elem()
- data, err = unmarshalValue(data, elem)
- if err != nil {
- return nil, err
- }
- v.Set(reflect.Append(v, elem))
- }
- return data, nil
-
- case "<string>":
- if v.Kind() != reflect.String {
- return nil, fmt.Errorf("cannot unmarshal <string> into non-string %s", v.Type())
- }
- body, etag, data := next(data)
- if len(etag) == 0 {
- return nil, fmt.Errorf("eof inside <string>")
- }
- if string(etag) != "</string>" {
- return nil, fmt.Errorf("expected </string> but got %s", etag)
- }
- v.SetString(string(body)) // TODO: unescape
- return data, nil
-
- case "<integer>":
- if v.Kind() != reflect.Int {
- return nil, fmt.Errorf("cannot unmarshal <integer> into non-int %s", v.Type())
- }
- body, etag, data := next(data)
- if len(etag) == 0 {
- return nil, fmt.Errorf("eof inside <integer>")
- }
- if string(etag) != "</integer>" {
- return nil, fmt.Errorf("expected </integer> but got %s", etag)
- }
- i, err := strconv.Atoi(string(body))
- if err != nil {
- return nil, fmt.Errorf("non-integer in <integer> tag: %s", body)
- }
- v.SetInt(int64(i))
- return data, nil
- }
- return nil, fmt.Errorf("unexpected tag %s", tag)
-}
-
-func skipValue(data []byte) (rest []byte, err error) {
- n := 0
- for {
- var tag []byte
- _, tag, data = next(data)
- if len(tag) == 0 {
- return nil, fmt.Errorf("unexpected eof")
- }
- if tag[1] == '/' {
- if n == 0 {
- return nil, fmt.Errorf("unexpected closing tag")
- }
- n--
- if n == 0 {
- break
- }
- } else {
- n++
- }
- }
- return data, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/plist/plist_test.go b/vendor/github.com/mattermost/rsc/plist/plist_test.go
deleted file mode 100644
index 42f496c67..000000000
--- a/vendor/github.com/mattermost/rsc/plist/plist_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2012 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 file.
-
-package plist
-
-import (
- "reflect"
- "testing"
-)
-
-var thePlist = `<plist version="1.0">
- <dict>
- <key>BucketUUID</key>
- <string>C218A47D-DAFB-4476-9C67-597E556D7D8A</string>
- <key>BucketName</key>
- <string>rsc</string>
- <key>ComputerUUID</key>
- <string>E7859547-BB9C-41C0-871E-858A0526BAE7</string>
- <key>LocalPath</key>
- <string>/Users/rsc</string>
- <key>LocalMountPoint</key>
- <string>/Users</string>
- <key>IgnoredRelativePaths</key>
- <array>
- <string>/.Trash</string>
- <string>/go/pkg</string>
- <string>/go1/pkg</string>
- <string>/Library/Caches</string>
- </array>
- <key>Excludes</key>
- <dict>
- <key>excludes</key>
- <array>
- <dict>
- <key>type</key>
- <integer>2</integer>
- <key>text</key>
- <string>.unison.</string>
- </dict>
- </array>
- </dict>
- </dict>
-</plist>
-`
-
-var plistTests = []struct {
- in string
- out interface{}
-}{
- {
- thePlist,
- &MyStruct{
- BucketUUID: "C218A47D-DAFB-4476-9C67-597E556D7D8A",
- BucketName: "rsc",
- ComputerUUID: "E7859547-BB9C-41C0-871E-858A0526BAE7",
- LocalPath: "/Users/rsc",
- LocalMountPoint: "/Users",
- IgnoredRelativePaths: []string{
- "/.Trash",
- "/go/pkg",
- "/go1/pkg",
- "/Library/Caches",
- },
- Excludes: Exclude1{
- Excludes: []Exclude2{
- {Type: 2,
- Text: ".unison.",
- },
- },
- },
- },
- },
- {
- thePlist,
- &struct{}{},
- },
-}
-
-type MyStruct struct {
- BucketUUID string
- BucketName string
- ComputerUUID string
- LocalPath string
- LocalMountPoint string
- IgnoredRelativePaths []string
- Excludes Exclude1
-}
-
-type Exclude1 struct {
- Excludes []Exclude2 `plist:"excludes"`
-}
-
-type Exclude2 struct {
- Type int `plist:"type"`
- Text string `plist:"text"`
-}
-
-func TestUnmarshal(t *testing.T) {
- for _, tt := range plistTests {
- v := reflect.New(reflect.ValueOf(tt.out).Type().Elem()).Interface()
- if err := Unmarshal([]byte(tt.in), v); err != nil {
- t.Errorf("%s", err)
- continue
- }
- if !reflect.DeepEqual(tt.out, v) {
- t.Errorf("unmarshal not equal")
- }
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/qr/coding/qr_test.go b/vendor/github.com/mattermost/rsc/qr/coding/qr_test.go
deleted file mode 100644
index b8199bb51..000000000
--- a/vendor/github.com/mattermost/rsc/qr/coding/qr_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2011 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 file.
-
-package coding
-
-import (
- "bytes"
- "testing"
-
- "github.com/mattermost/rsc/gf256"
- "github.com/mattermost/rsc/qr/libqrencode"
-)
-
-func test(t *testing.T, v Version, l Level, text ...Encoding) bool {
- s := ""
- ty := libqrencode.EightBit
- switch x := text[0].(type) {
- case String:
- s = string(x)
- case Alpha:
- s = string(x)
- ty = libqrencode.Alphanumeric
- case Num:
- s = string(x)
- ty = libqrencode.Numeric
- }
- key, err := libqrencode.Encode(libqrencode.Version(v), libqrencode.Level(l), ty, s)
- if err != nil {
- t.Errorf("libqrencode.Encode(%v, %v, %d, %#q): %v", v, l, ty, s, err)
- return false
- }
- mask := (^key.Pixel[8][2]&1)<<2 | (key.Pixel[8][3]&1)<<1 | (^key.Pixel[8][4] & 1)
- p, err := NewPlan(v, l, Mask(mask))
- if err != nil {
- t.Errorf("NewPlan(%v, L, %d): %v", v, err, mask)
- return false
- }
- if len(p.Pixel) != len(key.Pixel) {
- t.Errorf("%v: NewPlan uses %dx%d, libqrencode uses %dx%d", v, len(p.Pixel), len(p.Pixel), len(key.Pixel), len(key.Pixel))
- return false
- }
- c, err := p.Encode(text...)
- if err != nil {
- t.Errorf("Encode: %v", err)
- return false
- }
- badpix := 0
-Pixel:
- for y, prow := range p.Pixel {
- for x, pix := range prow {
- pix &^= Black
- if c.Black(x, y) {
- pix |= Black
- }
-
- keypix := key.Pixel[y][x]
- want := Pixel(0)
- switch {
- case keypix&libqrencode.Finder != 0:
- want = Position.Pixel()
- case keypix&libqrencode.Alignment != 0:
- want = Alignment.Pixel()
- case keypix&libqrencode.Timing != 0:
- want = Timing.Pixel()
- case keypix&libqrencode.Format != 0:
- want = Format.Pixel()
- want |= OffsetPixel(pix.Offset()) // sic
- want |= pix & Invert
- case keypix&libqrencode.PVersion != 0:
- want = PVersion.Pixel()
- case keypix&libqrencode.DataECC != 0:
- if pix.Role() == Check || pix.Role() == Extra {
- want = pix.Role().Pixel()
- } else {
- want = Data.Pixel()
- }
- want |= OffsetPixel(pix.Offset())
- want |= pix & Invert
- default:
- want = Unused.Pixel()
- }
- if keypix&libqrencode.Black != 0 {
- want |= Black
- }
- if pix != want {
- t.Errorf("%v/%v: Pixel[%d][%d] = %v, want %v %#x", v, mask, y, x, pix, want, keypix)
- if badpix++; badpix >= 100 {
- t.Errorf("stopping after %d bad pixels", badpix)
- break Pixel
- }
- }
- }
- }
- return badpix == 0
-}
-
-var input = []Encoding{
- String("hello"),
- Num("1"),
- Num("12"),
- Num("123"),
- Alpha("AB"),
- Alpha("ABC"),
-}
-
-func TestVersion(t *testing.T) {
- badvers := 0
-Version:
- for v := Version(1); v <= 40; v++ {
- for l := L; l <= H; l++ {
- for _, in := range input {
- if !test(t, v, l, in) {
- if badvers++; badvers >= 10 {
- t.Errorf("stopping after %d bad versions", badvers)
- break Version
- }
- }
- }
- }
- }
-}
-
-func TestEncode(t *testing.T) {
- data := []byte{0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11}
- check := []byte{0xa5, 0x24, 0xd4, 0xc1, 0xed, 0x36, 0xc7, 0x87, 0x2c, 0x55}
- rs := gf256.NewRSEncoder(Field, len(check))
- out := make([]byte, len(check))
- rs.ECC(data, out)
- if !bytes.Equal(out, check) {
- t.Errorf("have %x want %x", out, check)
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/qr/libqrencode/Makefile b/vendor/github.com/mattermost/rsc/qr/libqrencode/Makefile
deleted file mode 100644
index 4c9591462..000000000
--- a/vendor/github.com/mattermost/rsc/qr/libqrencode/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(GOROOT)/src/Make.inc
-TARG=rsc.googlecode.com/hg/qr/libqrencode
-CGOFILES=qrencode.go
-include $(GOROOT)/src/Make.pkg
diff --git a/vendor/github.com/mattermost/rsc/qr/libqrencode/qrencode.go b/vendor/github.com/mattermost/rsc/qr/libqrencode/qrencode.go
deleted file mode 100644
index f4ce3ffb6..000000000
--- a/vendor/github.com/mattermost/rsc/qr/libqrencode/qrencode.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package libqrencode wraps the C libqrencode library.
-// The qr package (in this package's parent directory)
-// does not use any C wrapping. This code is here only
-// for use during that package's tests.
-package libqrencode
-
-/*
-#cgo LDFLAGS: -lqrencode
-#include <qrencode.h>
-*/
-import "C"
-
-import (
- "fmt"
- "image"
- "image/color"
- "unsafe"
-)
-
-type Version int
-
-type Mode int
-
-const (
- Numeric Mode = C.QR_MODE_NUM
- Alphanumeric Mode = C.QR_MODE_AN
- EightBit Mode = C.QR_MODE_8
-)
-
-type Level int
-
-const (
- L Level = C.QR_ECLEVEL_L
- M Level = C.QR_ECLEVEL_M
- Q Level = C.QR_ECLEVEL_Q
- H Level = C.QR_ECLEVEL_H
-)
-
-type Pixel int
-
-const (
- Black Pixel = 1 << iota
- DataECC
- Format
- PVersion
- Timing
- Alignment
- Finder
- NonData
-)
-
-type Code struct {
- Version int
- Width int
- Pixel [][]Pixel
- Scale int
-}
-
-func (*Code) ColorModel() color.Model {
- return color.RGBAModel
-}
-
-func (c *Code) Bounds() image.Rectangle {
- d := (c.Width + 8) * c.Scale
- return image.Rect(0, 0, d, d)
-}
-
-var (
- white color.Color = color.RGBA{0xFF, 0xFF, 0xFF, 0xFF}
- black color.Color = color.RGBA{0x00, 0x00, 0x00, 0xFF}
- blue color.Color = color.RGBA{0x00, 0x00, 0x80, 0xFF}
- red color.Color = color.RGBA{0xFF, 0x40, 0x40, 0xFF}
- yellow color.Color = color.RGBA{0xFF, 0xFF, 0x00, 0xFF}
- gray color.Color = color.RGBA{0x80, 0x80, 0x80, 0xFF}
- green color.Color = color.RGBA{0x22, 0x8B, 0x22, 0xFF}
-)
-
-func (c *Code) At(x, y int) color.Color {
- x = x/c.Scale - 4
- y = y/c.Scale - 4
- if 0 <= x && x < c.Width && 0 <= y && y < c.Width {
- switch p := c.Pixel[y][x]; {
- case p&Black == 0:
- // nothing
- case p&DataECC != 0:
- return black
- case p&Format != 0:
- return blue
- case p&PVersion != 0:
- return red
- case p&Timing != 0:
- return yellow
- case p&Alignment != 0:
- return gray
- case p&Finder != 0:
- return green
- }
- }
- return white
-}
-
-type Chunk struct {
- Mode Mode
- Text string
-}
-
-func Encode(version Version, level Level, mode Mode, text string) (*Code, error) {
- return EncodeChunk(version, level, Chunk{mode, text})
-}
-
-func EncodeChunk(version Version, level Level, chunk ...Chunk) (*Code, error) {
- qi, err := C.QRinput_new2(C.int(version), C.QRecLevel(level))
- if qi == nil {
- return nil, fmt.Errorf("QRinput_new2: %v", err)
- }
- defer C.QRinput_free(qi)
- for _, ch := range chunk {
- data := []byte(ch.Text)
- n, err := C.QRinput_append(qi, C.QRencodeMode(ch.Mode), C.int(len(data)), (*C.uchar)(&data[0]))
- if n < 0 {
- return nil, fmt.Errorf("QRinput_append %q: %v", data, err)
- }
- }
-
- qc, err := C.QRcode_encodeInput(qi)
- if qc == nil {
- return nil, fmt.Errorf("QRinput_encodeInput: %v", err)
- }
-
- c := &Code{
- Version: int(qc.version),
- Width: int(qc.width),
- Scale: 16,
- }
- pix := make([]Pixel, c.Width*c.Width)
- cdat := (*[1000 * 1000]byte)(unsafe.Pointer(qc.data))[:len(pix)]
- for i := range pix {
- pix[i] = Pixel(cdat[i])
- }
- c.Pixel = make([][]Pixel, c.Width)
- for i := range c.Pixel {
- c.Pixel[i] = pix[i*c.Width : (i+1)*c.Width]
- }
- return c, nil
-}
diff --git a/vendor/github.com/mattermost/rsc/qr/png_test.go b/vendor/github.com/mattermost/rsc/qr/png_test.go
deleted file mode 100644
index 27a622924..000000000
--- a/vendor/github.com/mattermost/rsc/qr/png_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2011 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 file.
-
-package qr
-
-import (
- "bytes"
- "image"
- "image/color"
- "image/png"
- "io/ioutil"
- "testing"
-)
-
-func TestPNG(t *testing.T) {
- c, err := Encode("hello, world", L)
- if err != nil {
- t.Fatal(err)
- }
- pngdat := c.PNG()
- if true {
- ioutil.WriteFile("x.png", pngdat, 0666)
- }
- m, err := png.Decode(bytes.NewBuffer(pngdat))
- if err != nil {
- t.Fatal(err)
- }
- gm := m.(*image.Gray)
-
- scale := c.Scale
- siz := c.Size
- nbad := 0
- for y := 0; y < scale*(8+siz); y++ {
- for x := 0; x < scale*(8+siz); x++ {
- v := byte(255)
- if c.Black(x/scale-4, y/scale-4) {
- v = 0
- }
- if gv := gm.At(x, y).(color.Gray).Y; gv != v {
- t.Errorf("%d,%d = %d, want %d", x, y, gv, v)
- if nbad++; nbad >= 20 {
- t.Fatalf("too many bad pixels")
- }
- }
- }
- }
-}
-
-func BenchmarkPNG(b *testing.B) {
- c, err := Encode("0123456789012345678901234567890123456789", L)
- if err != nil {
- panic(err)
- }
- var bytes []byte
- for i := 0; i < b.N; i++ {
- bytes = c.PNG()
- }
- b.SetBytes(int64(len(bytes)))
-}
-
-func BenchmarkImagePNG(b *testing.B) {
- c, err := Encode("0123456789012345678901234567890123456789", L)
- if err != nil {
- panic(err)
- }
- var buf bytes.Buffer
- for i := 0; i < b.N; i++ {
- buf.Reset()
- png.Encode(&buf, c.Image())
- }
- b.SetBytes(int64(buf.Len()))
-}
diff --git a/vendor/github.com/mattermost/rsc/qr/web/pic.go b/vendor/github.com/mattermost/rsc/qr/web/pic.go
deleted file mode 100644
index 6baef94d2..000000000
--- a/vendor/github.com/mattermost/rsc/qr/web/pic.go
+++ /dev/null
@@ -1,506 +0,0 @@
-package web
-
-import (
- "bytes"
- "fmt"
- "image"
- "image/color"
- "image/draw"
- "image/png"
- "net/http"
- "strconv"
- "strings"
-
- "code.google.com/p/freetype-go/freetype"
- "github.com/mattermost/rsc/appfs/fs"
- "github.com/mattermost/rsc/qr"
- "github.com/mattermost/rsc/qr/coding"
-)
-
-func makeImage(req *http.Request, caption, font string, pt, size, border, scale int, f func(x, y int) uint32) *image.RGBA {
- d := (size + 2*border) * scale
- csize := 0
- if caption != "" {
- if pt == 0 {
- pt = 11
- }
- csize = pt * 2
- }
- c := image.NewRGBA(image.Rect(0, 0, d, d+csize))
-
- // white
- u := &image.Uniform{C: color.White}
- draw.Draw(c, c.Bounds(), u, image.ZP, draw.Src)
-
- for y := 0; y < size; y++ {
- for x := 0; x < size; x++ {
- r := image.Rect((x+border)*scale, (y+border)*scale, (x+border+1)*scale, (y+border+1)*scale)
- rgba := f(x, y)
- u.C = color.RGBA{byte(rgba >> 24), byte(rgba >> 16), byte(rgba >> 8), byte(rgba)}
- draw.Draw(c, r, u, image.ZP, draw.Src)
- }
- }
-
- if csize != 0 {
- if font == "" {
- font = "data/luxisr.ttf"
- }
- ctxt := fs.NewContext(req)
- dat, _, err := ctxt.Read(font)
- if err != nil {
- panic(err)
- }
- tfont, err := freetype.ParseFont(dat)
- if err != nil {
- panic(err)
- }
- ft := freetype.NewContext()
- ft.SetDst(c)
- ft.SetDPI(100)
- ft.SetFont(tfont)
- ft.SetFontSize(float64(pt))
- ft.SetSrc(image.NewUniform(color.Black))
- ft.SetClip(image.Rect(0, 0, 0, 0))
- wid, err := ft.DrawString(caption, freetype.Pt(0, 0))
- if err != nil {
- panic(err)
- }
- p := freetype.Pt(d, d+3*pt/2)
- p.X -= wid.X
- p.X /= 2
- ft.SetClip(c.Bounds())
- ft.DrawString(caption, p)
- }
-
- return c
-}
-
-func makeFrame(req *http.Request, font string, pt, vers, l, scale, dots int) image.Image {
- lev := coding.Level(l)
- p, err := coding.NewPlan(coding.Version(vers), lev, 0)
- if err != nil {
- panic(err)
- }
-
- nd := p.DataBytes / p.Blocks
- nc := p.CheckBytes / p.Blocks
- extra := p.DataBytes - nd*p.Blocks
-
- cap := fmt.Sprintf("QR v%d, %s", vers, lev)
- if dots > 0 {
- cap = fmt.Sprintf("QR v%d order, from bottom right", vers)
- }
- m := makeImage(req, cap, font, pt, len(p.Pixel), 0, scale, func(x, y int) uint32 {
- pix := p.Pixel[y][x]
- switch pix.Role() {
- case coding.Data:
- if dots > 0 {
- return 0xffffffff
- }
- off := int(pix.Offset() / 8)
- nd := nd
- var i int
- for i = 0; i < p.Blocks; i++ {
- if i == extra {
- nd++
- }
- if off < nd {
- break
- }
- off -= nd
- }
- return blockColors[i%len(blockColors)]
- case coding.Check:
- if dots > 0 {
- return 0xffffffff
- }
- i := (int(pix.Offset()/8) - p.DataBytes) / nc
- return dark(blockColors[i%len(blockColors)])
- }
- if pix&coding.Black != 0 {
- return 0x000000ff
- }
- return 0xffffffff
- })
-
- if dots > 0 {
- b := m.Bounds()
- for y := 0; y <= len(p.Pixel); y++ {
- for x := 0; x < b.Dx(); x++ {
- m.SetRGBA(x, y*scale-(y/len(p.Pixel)), color.RGBA{127, 127, 127, 255})
- }
- }
- for x := 0; x <= len(p.Pixel); x++ {
- for y := 0; y < b.Dx(); y++ {
- m.SetRGBA(x*scale-(x/len(p.Pixel)), y, color.RGBA{127, 127, 127, 255})
- }
- }
- order := make([]image.Point, (p.DataBytes+p.CheckBytes)*8+1)
- for y, row := range p.Pixel {
- for x, pix := range row {
- if r := pix.Role(); r != coding.Data && r != coding.Check {
- continue
- }
- // draw.Draw(m, m.Bounds().Add(image.Pt(x*scale, y*scale)), dot, image.ZP, draw.Over)
- order[pix.Offset()] = image.Point{x*scale + scale/2, y*scale + scale/2}
- }
- }
-
- for mode := 0; mode < 2; mode++ {
- for i, p := range order {
- q := order[i+1]
- if q.X == 0 {
- break
- }
- line(m, p, q, mode)
- }
- }
- }
- return m
-}
-
-func line(m *image.RGBA, p, q image.Point, mode int) {
- x := 0
- y := 0
- dx := q.X - p.X
- dy := q.Y - p.Y
- xsign := +1
- ysign := +1
- if dx < 0 {
- xsign = -1
- dx = -dx
- }
- if dy < 0 {
- ysign = -1
- dy = -dy
- }
- pt := func() {
- switch mode {
- case 0:
- for dx := -2; dx <= 2; dx++ {
- for dy := -2; dy <= 2; dy++ {
- if dy*dx <= -4 || dy*dx >= 4 {
- continue
- }
- m.SetRGBA(p.X+x*xsign+dx, p.Y+y*ysign+dy, color.RGBA{255, 192, 192, 255})
- }
- }
-
- case 1:
- m.SetRGBA(p.X+x*xsign, p.Y+y*ysign, color.RGBA{128, 0, 0, 255})
- }
- }
- if dx > dy {
- for x < dx || y < dy {
- pt()
- x++
- if float64(x)*float64(dy)/float64(dx)-float64(y) > 0.5 {
- y++
- }
- }
- } else {
- for x < dx || y < dy {
- pt()
- y++
- if float64(y)*float64(dx)/float64(dy)-float64(x) > 0.5 {
- x++
- }
- }
- }
- pt()
-}
-
-func pngEncode(c image.Image) []byte {
- var b bytes.Buffer
- png.Encode(&b, c)
- return b.Bytes()
-}
-
-// Frame handles a request for a single QR frame.
-func Frame(w http.ResponseWriter, req *http.Request) {
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- v := arg("v")
- scale := arg("scale")
- if scale == 0 {
- scale = 8
- }
-
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(pngEncode(makeFrame(req, req.FormValue("font"), arg("pt"), v, arg("l"), scale, arg("dots"))))
-}
-
-// Frames handles a request for multiple QR frames.
-func Frames(w http.ResponseWriter, req *http.Request) {
- vs := strings.Split(req.FormValue("v"), ",")
-
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- scale := arg("scale")
- if scale == 0 {
- scale = 8
- }
- font := req.FormValue("font")
- pt := arg("pt")
- dots := arg("dots")
-
- var images []image.Image
- l := arg("l")
- for _, v := range vs {
- l := l
- if i := strings.Index(v, "."); i >= 0 {
- l, _ = strconv.Atoi(v[i+1:])
- v = v[:i]
- }
- vv, _ := strconv.Atoi(v)
- images = append(images, makeFrame(req, font, pt, vv, l, scale, dots))
- }
-
- b := images[len(images)-1].Bounds()
-
- dx := arg("dx")
- if dx == 0 {
- dx = b.Dx()
- }
- x, y := 0, 0
- xmax := 0
- sep := arg("sep")
- if sep == 0 {
- sep = 10
- }
- var points []image.Point
- for i, m := range images {
- if x > 0 {
- x += sep
- }
- if x > 0 && x+m.Bounds().Dx() > dx {
- y += sep + images[i-1].Bounds().Dy()
- x = 0
- }
- points = append(points, image.Point{x, y})
- x += m.Bounds().Dx()
- if x > xmax {
- xmax = x
- }
-
- }
-
- c := image.NewRGBA(image.Rect(0, 0, xmax, y+b.Dy()))
- for i, m := range images {
- draw.Draw(c, c.Bounds().Add(points[i]), m, image.ZP, draw.Src)
- }
-
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(pngEncode(c))
-}
-
-// Mask handles a request for a single QR mask.
-func Mask(w http.ResponseWriter, req *http.Request) {
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- v := arg("v")
- m := arg("m")
- scale := arg("scale")
- if scale == 0 {
- scale = 8
- }
-
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(pngEncode(makeMask(req, req.FormValue("font"), arg("pt"), v, m, scale)))
-}
-
-// Masks handles a request for multiple QR masks.
-func Masks(w http.ResponseWriter, req *http.Request) {
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- v := arg("v")
- scale := arg("scale")
- if scale == 0 {
- scale = 8
- }
- font := req.FormValue("font")
- pt := arg("pt")
- var mm []image.Image
- for m := 0; m < 8; m++ {
- mm = append(mm, makeMask(req, font, pt, v, m, scale))
- }
- dx := mm[0].Bounds().Dx()
- dy := mm[0].Bounds().Dy()
-
- sep := arg("sep")
- if sep == 0 {
- sep = 10
- }
- c := image.NewRGBA(image.Rect(0, 0, (dx+sep)*4-sep, (dy+sep)*2-sep))
- for m := 0; m < 8; m++ {
- x := (m % 4) * (dx + sep)
- y := (m / 4) * (dy + sep)
- draw.Draw(c, c.Bounds().Add(image.Pt(x, y)), mm[m], image.ZP, draw.Src)
- }
-
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(pngEncode(c))
-}
-
-var maskName = []string{
- "(x+y) % 2",
- "y % 2",
- "x % 3",
- "(x+y) % 3",
- "(y/2 + x/3) % 2",
- "xy%2 + xy%3",
- "(xy%2 + xy%3) % 2",
- "(xy%3 + (x+y)%2) % 2",
-}
-
-func makeMask(req *http.Request, font string, pt int, vers, mask, scale int) image.Image {
- p, err := coding.NewPlan(coding.Version(vers), coding.L, coding.Mask(mask))
- if err != nil {
- panic(err)
- }
- m := makeImage(req, maskName[mask], font, pt, len(p.Pixel), 0, scale, func(x, y int) uint32 {
- pix := p.Pixel[y][x]
- switch pix.Role() {
- case coding.Data, coding.Check:
- if pix&coding.Invert != 0 {
- return 0x000000ff
- }
- }
- return 0xffffffff
- })
- return m
-}
-
-var blockColors = []uint32{
- 0x7777ffff,
- 0xffff77ff,
- 0xff7777ff,
- 0x77ffffff,
- 0x1e90ffff,
- 0xffffe0ff,
- 0x8b6969ff,
- 0x77ff77ff,
- 0x9b30ffff,
- 0x00bfffff,
- 0x90e890ff,
- 0xfff68fff,
- 0xffec8bff,
- 0xffa07aff,
- 0xffa54fff,
- 0xeee8aaff,
- 0x98fb98ff,
- 0xbfbfbfff,
- 0x54ff9fff,
- 0xffaeb9ff,
- 0xb23aeeff,
- 0xbbffffff,
- 0x7fffd4ff,
- 0xff7a7aff,
- 0x00007fff,
-}
-
-func dark(x uint32) uint32 {
- r, g, b, a := byte(x>>24), byte(x>>16), byte(x>>8), byte(x)
- r = r/2 + r/4
- g = g/2 + g/4
- b = b/2 + b/4
- return uint32(r)<<24 | uint32(g)<<16 | uint32(b)<<8 | uint32(a)
-}
-
-func clamp(x int) byte {
- if x < 0 {
- return 0
- }
- if x > 255 {
- return 255
- }
- return byte(x)
-}
-
-func max(x, y int) int {
- if x > y {
- return x
- }
- return y
-}
-
-// Arrow handles a request for an arrow pointing in a given direction.
-func Arrow(w http.ResponseWriter, req *http.Request) {
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- dir := arg("dir")
- size := arg("size")
- if size == 0 {
- size = 50
- }
- del := size / 10
-
- m := image.NewRGBA(image.Rect(0, 0, size, size))
-
- if dir == 4 {
- draw.Draw(m, m.Bounds(), image.Black, image.ZP, draw.Src)
- draw.Draw(m, image.Rect(5, 5, size-5, size-5), image.White, image.ZP, draw.Src)
- }
-
- pt := func(x, y int, c color.RGBA) {
- switch dir {
- case 0:
- m.SetRGBA(x, y, c)
- case 1:
- m.SetRGBA(y, size-1-x, c)
- case 2:
- m.SetRGBA(size-1-x, size-1-y, c)
- case 3:
- m.SetRGBA(size-1-y, x, c)
- }
- }
-
- for y := 0; y < size/2; y++ {
- for x := 0; x < del && x < y; x++ {
- pt(x, y, color.RGBA{0, 0, 0, 255})
- }
- for x := del; x < y-del; x++ {
- pt(x, y, color.RGBA{128, 128, 255, 255})
- }
- for x := max(y-del, 0); x <= y; x++ {
- pt(x, y, color.RGBA{0, 0, 0, 255})
- }
- }
- for y := size / 2; y < size; y++ {
- for x := 0; x < del && x < size-1-y; x++ {
- pt(x, y, color.RGBA{0, 0, 0, 255})
- }
- for x := del; x < size-1-y-del; x++ {
- pt(x, y, color.RGBA{128, 128, 192, 255})
- }
- for x := max(size-1-y-del, 0); x <= size-1-y; x++ {
- pt(x, y, color.RGBA{0, 0, 0, 255})
- }
- }
-
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(pngEncode(m))
-}
-
-// Encode encodes a string using the given version, level, and mask.
-func Encode(w http.ResponseWriter, req *http.Request) {
- val := func(s string) int {
- v, _ := strconv.Atoi(req.FormValue(s))
- return v
- }
-
- l := coding.Level(val("l"))
- v := coding.Version(val("v"))
- enc := coding.String(req.FormValue("t"))
- m := coding.Mask(val("m"))
-
- p, err := coding.NewPlan(v, l, m)
- if err != nil {
- panic(err)
- }
- cc, err := p.Encode(enc)
- if err != nil {
- panic(err)
- }
-
- c := &qr.Code{Bitmap: cc.Bitmap, Size: cc.Size, Stride: cc.Stride, Scale: 8}
- w.Header().Set("Content-Type", "image/png")
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(c.PNG())
-}
-
diff --git a/vendor/github.com/mattermost/rsc/qr/web/play.go b/vendor/github.com/mattermost/rsc/qr/web/play.go
deleted file mode 100644
index 120f50b81..000000000
--- a/vendor/github.com/mattermost/rsc/qr/web/play.go
+++ /dev/null
@@ -1,1118 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-QR data layout
-
-qr/
- upload/
- id.png
- id.fix
- flag/
- id
-
-*/
-// TODO: Random seed taken from GET for caching, repeatability.
-// TODO: Flag for abuse button + some kind of dashboard.
-// TODO: +1 button on web page? permalink?
-// TODO: Flag for abuse button on permalinks too?
-// TODO: Make the page prettier.
-// TODO: Cache headers.
-
-package web
-
-import (
- "bytes"
- "crypto/md5"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "html/template"
- "image"
- "image/color"
- _ "image/gif"
- _ "image/jpeg"
- "image/png"
- "io"
- "math/rand"
- "net/http"
- "net/url"
- "os"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/mattermost/rsc/appfs/fs"
- "github.com/mattermost/rsc/gf256"
- "github.com/mattermost/rsc/qr"
- "github.com/mattermost/rsc/qr/coding"
- "github.com/mattermost/rsc/qr/web/resize"
-)
-
-func runTemplate(c *fs.Context, w http.ResponseWriter, name string, data interface{}) {
- t := template.New("main")
-
- main, _, err := c.Read(name)
- if err != nil {
- panic(err)
- }
- style, _, _ := c.Read("style.html")
- main = append(main, style...)
- _, err = t.Parse(string(main))
- if err != nil {
- panic(err)
- }
-
- var buf bytes.Buffer
- if err := t.Execute(&buf, &data); err != nil {
- panic(err)
- }
- w.Write(buf.Bytes())
-}
-
-func isImgName(s string) bool {
- if len(s) != 32 {
- return false
- }
- for i := 0; i < len(s); i++ {
- if '0' <= s[i] && s[i] <= '9' || 'a' <= s[i] && s[i] <= 'f' {
- continue
- }
- return false
- }
- return true
-}
-
-func isTagName(s string) bool {
- if len(s) != 16 {
- return false
- }
- for i := 0; i < len(s); i++ {
- if '0' <= s[i] && s[i] <= '9' || 'a' <= s[i] && s[i] <= 'f' {
- continue
- }
- return false
- }
- return true
-}
-
-// Draw is the handler for drawing a QR code.
-func Draw(w http.ResponseWriter, req *http.Request) {
- ctxt := fs.NewContext(req)
-
- url := req.FormValue("url")
- if url == "" {
- url = "http://swtch.com/qr"
- }
- if req.FormValue("upload") == "1" {
- upload(w, req, url)
- return
- }
-
- t0 := time.Now()
- img := req.FormValue("i")
- if !isImgName(img) {
- img = "pjw"
- }
- if req.FormValue("show") == "png" {
- i := loadSize(ctxt, img, 48)
- var buf bytes.Buffer
- png.Encode(&buf, i)
- w.Write(buf.Bytes())
- return
- }
- if req.FormValue("flag") == "1" {
- flag(w, req, img, ctxt)
- return
- }
- if req.FormValue("x") == "" {
- var data = struct {
- Name string
- URL string
- }{
- Name: img,
- URL: url,
- }
- runTemplate(ctxt, w, "qr/main.html", &data)
- return
- }
-
- arg := func(s string) int { x, _ := strconv.Atoi(req.FormValue(s)); return x }
- targ := makeTarg(ctxt, img, 17+4*arg("v")+arg("z"))
-
- m := &Image{
- Name: img,
- Dx: arg("x"),
- Dy: arg("y"),
- URL: req.FormValue("u"),
- Version: arg("v"),
- Mask: arg("m"),
- RandControl: arg("r") > 0,
- Dither: arg("i") > 0,
- OnlyDataBits: arg("d") > 0,
- SaveControl: arg("c") > 0,
- Scale: arg("scale"),
- Target: targ,
- Seed: int64(arg("s")),
- Rotation: arg("o"),
- Size: arg("z"),
- }
- if m.Version > 8 {
- m.Version = 8
- }
-
- if m.Scale == 0 {
- if arg("l") > 1 {
- m.Scale = 8
- } else {
- m.Scale = 4
- }
- }
- if m.Version >= 12 && m.Scale >= 4 {
- m.Scale /= 2
- }
-
- if arg("l") == 1 {
- data, err := json.Marshal(m)
- if err != nil {
- panic(err)
- }
- h := md5.New()
- h.Write(data)
- tag := fmt.Sprintf("%x", h.Sum(nil))[:16]
- if err := ctxt.Write("qrsave/"+tag, data); err != nil {
- panic(err)
- }
- http.Redirect(w, req, "/qr/show/" + tag, http.StatusTemporaryRedirect)
- return
- }
-
- if err := m.Encode(req); err != nil {
- fmt.Fprintf(w, "%s\n", err)
- return
- }
-
- var dat []byte
- switch {
- case m.SaveControl:
- dat = m.Control
- default:
- dat = m.Code.PNG()
- }
-
- if arg("l") > 0 {
- w.Header().Set("Content-Type", "image/png")
- w.Write(dat)
- return
- }
-
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- fmt.Fprint(w, "<center><img src=\"data:image/png;base64,")
- io.WriteString(w, base64.StdEncoding.EncodeToString(dat))
- fmt.Fprint(w, "\" /><br>")
- fmt.Fprintf(w, "<form method=\"POST\" action=\"%s&l=1\"><input type=\"submit\" value=\"Save this QR code\"></form>\n", m.Link())
- fmt.Fprintf(w, "</center>\n")
- fmt.Fprintf(w, "<br><center><font size=-1>%v</font></center>\n", time.Now().Sub(t0))
-}
-
-func (m *Image) Small() bool {
- return 8*(17+4*int(m.Version)) < 512
-}
-
-func (m *Image) Link() string {
- s := fmt.Sprint
- b := func(v bool) string {
- if v {
- return "1"
- }
- return "0"
- }
- val := url.Values{
- "i": {m.Name},
- "x": {s(m.Dx)},
- "y": {s(m.Dy)},
- "z": {s(m.Size)},
- "u": {m.URL},
- "v": {s(m.Version)},
- "m": {s(m.Mask)},
- "r": {b(m.RandControl)},
- "t": {b(m.Dither)},
- "d": {b(m.OnlyDataBits)},
- "c": {b(m.SaveControl)},
- "s": {s(m.Seed)},
- }
- return "/qr/draw?" + val.Encode()
-}
-
-// Show is the handler for showing a stored QR code.
-func Show(w http.ResponseWriter, req *http.Request) {
- ctxt := fs.NewContext(req)
- tag := req.URL.Path[len("/qr/show/"):]
- png := strings.HasSuffix(tag, ".png")
- if png {
- tag = tag[:len(tag)-len(".png")]
- }
- if !isTagName(tag) {
- fmt.Fprintf(w, "Sorry, QR code not found\n")
- return
- }
- if req.FormValue("flag") == "1" {
- flag(w, req, tag, ctxt)
- return
- }
- data, _, err := ctxt.Read("qrsave/" + tag)
- if err != nil {
- fmt.Fprintf(w, "Sorry, QR code not found.\n")
- return
- }
-
- var m Image
- if err := json.Unmarshal(data, &m); err != nil {
- panic(err)
- }
- m.Tag = tag
-
- switch req.FormValue("size") {
- case "big":
- m.Scale *= 2
- case "small":
- m.Scale /= 2
- }
-
- if png {
- if err := m.Encode(req); err != nil {
- panic(err)
- return
- }
- w.Header().Set("Cache-Control", "public, max-age=3600")
- w.Write(m.Code.PNG())
- return
- }
-
- w.Header().Set("Cache-Control", "public, max-age=300")
- runTemplate(ctxt, w, "qr/permalink.html", &m)
-}
-
-func upload(w http.ResponseWriter, req *http.Request, link string) {
- // Upload of a new image.
- // Copied from Moustachio demo.
- f, _, err := req.FormFile("image")
- if err != nil {
- fmt.Fprintf(w, "You need to select an image to upload.\n")
- return
- }
- defer f.Close()
-
- i, _, err := image.Decode(f)
- if err != nil {
- panic(err)
- }
-
- // Convert image to 128x128 gray+alpha.
- b := i.Bounds()
- const max = 128
- // If it's gigantic, it's more efficient to downsample first
- // and then resize; resizing will smooth out the roughness.
- var i1 *image.RGBA
- if b.Dx() > 4*max || b.Dy() > 4*max {
- w, h := 2*max, 2*max
- if b.Dx() > b.Dy() {
- h = b.Dy() * h / b.Dx()
- } else {
- w = b.Dx() * w / b.Dy()
- }
- i1 = resize.Resample(i, b, w, h)
- } else {
- // "Resample" to same size, just to convert to RGBA.
- i1 = resize.Resample(i, b, b.Dx(), b.Dy())
- }
- b = i1.Bounds()
-
- // Encode to PNG.
- dx, dy := 128, 128
- if b.Dx() > b.Dy() {
- dy = b.Dy() * dx / b.Dx()
- } else {
- dx = b.Dx() * dy / b.Dy()
- }
- i128 := resize.ResizeRGBA(i1, i1.Bounds(), dx, dy)
-
- var buf bytes.Buffer
- if err := png.Encode(&buf, i128); err != nil {
- panic(err)
- }
-
- h := md5.New()
- h.Write(buf.Bytes())
- tag := fmt.Sprintf("%x", h.Sum(nil))[:32]
-
- ctxt := fs.NewContext(req)
- if err := ctxt.Write("qr/upload/"+tag+".png", buf.Bytes()); err != nil {
- panic(err)
- }
-
- // Redirect with new image tag.
- // Redirect to draw with new image tag.
- http.Redirect(w, req, req.URL.Path+"?"+url.Values{"i": {tag}, "url": {link}}.Encode(), 302)
-}
-
-func flag(w http.ResponseWriter, req *http.Request, img string, ctxt *fs.Context) {
- if !isImgName(img) && !isTagName(img) {
- fmt.Fprintf(w, "Invalid image.\n")
- return
- }
- data, _, _ := ctxt.Read("qr/flag/" + img)
- data = append(data, '!')
- ctxt.Write("qr/flag/" + img, data)
-
- fmt.Fprintf(w, "Thank you. The image has been reported.\n")
-}
-
-func loadSize(ctxt *fs.Context, name string, max int) *image.RGBA {
- data, _, err := ctxt.Read("qr/upload/" + name + ".png")
- if err != nil {
- panic(err)
- }
- i, _, err := image.Decode(bytes.NewBuffer(data))
- if err != nil {
- panic(err)
- }
- b := i.Bounds()
- dx, dy := max, max
- if b.Dx() > b.Dy() {
- dy = b.Dy() * dx / b.Dx()
- } else {
- dx = b.Dx() * dy / b.Dy()
- }
- var irgba *image.RGBA
- switch i := i.(type) {
- case *image.RGBA:
- irgba = resize.ResizeRGBA(i, i.Bounds(), dx, dy)
- case *image.NRGBA:
- irgba = resize.ResizeNRGBA(i, i.Bounds(), dx, dy)
- }
- return irgba
-}
-
-func makeTarg(ctxt *fs.Context, name string, max int) [][]int {
- i := loadSize(ctxt, name, max)
- b := i.Bounds()
- dx, dy := b.Dx(), b.Dy()
- targ := make([][]int, dy)
- arr := make([]int, dx*dy)
- for y := 0; y < dy; y++ {
- targ[y], arr = arr[:dx], arr[dx:]
- row := targ[y]
- for x := 0; x < dx; x++ {
- p := i.Pix[y*i.Stride+4*x:]
- r, g, b, a := p[0], p[1], p[2], p[3]
- if a == 0 {
- row[x] = -1
- } else {
- row[x] = int((299*uint32(r) + 587*uint32(g) + 114*uint32(b) + 500) / 1000)
- }
- }
- }
- return targ
-}
-
-type Image struct {
- Name string
- Target [][]int
- Dx int
- Dy int
- URL string
- Tag string
- Version int
- Mask int
- Scale int
- Rotation int
- Size int
-
- // RandControl says to pick the pixels randomly.
- RandControl bool
- Seed int64
-
- // Dither says to dither instead of using threshold pixel layout.
- Dither bool
-
- // OnlyDataBits says to use only data bits, not check bits.
- OnlyDataBits bool
-
- // Code is the final QR code.
- Code *qr.Code
-
- // Control is a PNG showing the pixels that we controlled.
- // Pixels we don't control are grayed out.
- SaveControl bool
- Control []byte
-}
-
-type Pixinfo struct {
- X int
- Y int
- Pix coding.Pixel
- Targ byte
- DTarg int
- Contrast int
- HardZero bool
- Block *BitBlock
- Bit uint
-}
-
-type Pixorder struct {
- Off int
- Priority int
-}
-
-type byPriority []Pixorder
-
-func (x byPriority) Len() int { return len(x) }
-func (x byPriority) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byPriority) Less(i, j int) bool { return x[i].Priority > x[j].Priority }
-
-func (m *Image) target(x, y int) (targ byte, contrast int) {
- tx := x + m.Dx
- ty := y + m.Dy
- if ty < 0 || ty >= len(m.Target) || tx < 0 || tx >= len(m.Target[ty]) {
- return 255, -1
- }
-
- v0 := m.Target[ty][tx]
- if v0 < 0 {
- return 255, -1
- }
- targ = byte(v0)
-
- n := 0
- sum := 0
- sumsq := 0
- const del = 5
- for dy := -del; dy <= del; dy++ {
- for dx := -del; dx <= del; dx++ {
- if 0 <= ty+dy && ty+dy < len(m.Target) && 0 <= tx+dx && tx+dx < len(m.Target[ty+dy]) {
- v := m.Target[ty+dy][tx+dx]
- sum += v
- sumsq += v * v
- n++
- }
- }
- }
-
- avg := sum / n
- contrast = sumsq/n - avg*avg
- return
-}
-
-func (m *Image) rotate(p *coding.Plan, rot int) {
- if rot == 0 {
- return
- }
-
- N := len(p.Pixel)
- pix := make([][]coding.Pixel, N)
- apix := make([]coding.Pixel, N*N)
- for i := range pix {
- pix[i], apix = apix[:N], apix[N:]
- }
-
- switch rot {
- case 0:
- // ok
- case 1:
- for y := 0; y < N; y++ {
- for x := 0; x < N; x++ {
- pix[y][x] = p.Pixel[x][N-1-y]
- }
- }
- case 2:
- for y := 0; y < N; y++ {
- for x := 0; x < N; x++ {
- pix[y][x] = p.Pixel[N-1-y][N-1-x]
- }
- }
- case 3:
- for y := 0; y < N; y++ {
- for x := 0; x < N; x++ {
- pix[y][x] = p.Pixel[N-1-x][y]
- }
- }
- }
-
- p.Pixel = pix
-}
-
-func (m *Image) Encode(req *http.Request) error {
- p, err := coding.NewPlan(coding.Version(m.Version), coding.L, coding.Mask(m.Mask))
- if err != nil {
- return err
- }
-
- m.rotate(p, m.Rotation)
-
- rand := rand.New(rand.NewSource(m.Seed))
-
- // QR parameters.
- nd := p.DataBytes / p.Blocks
- nc := p.CheckBytes / p.Blocks
- extra := p.DataBytes - nd*p.Blocks
- rs := gf256.NewRSEncoder(coding.Field, nc)
-
- // Build information about pixels, indexed by data/check bit number.
- pixByOff := make([]Pixinfo, (p.DataBytes+p.CheckBytes)*8)
- expect := make([][]bool, len(p.Pixel))
- for y, row := range p.Pixel {
- expect[y] = make([]bool, len(row))
- for x, pix := range row {
- targ, contrast := m.target(x, y)
- if m.RandControl && contrast >= 0 {
- contrast = rand.Intn(128) + 64*((x+y)%2) + 64*((x+y)%3%2)
- }
- expect[y][x] = pix&coding.Black != 0
- if r := pix.Role(); r == coding.Data || r == coding.Check {
- pixByOff[pix.Offset()] = Pixinfo{X: x, Y: y, Pix: pix, Targ: targ, Contrast: contrast}
- }
- }
- }
-
-Again:
- // Count fixed initial data bits, prepare template URL.
- url := m.URL + "#"
- var b coding.Bits
- coding.String(url).Encode(&b, p.Version)
- coding.Num("").Encode(&b, p.Version)
- bbit := b.Bits()
- dbit := p.DataBytes*8 - bbit
- if dbit < 0 {
- return fmt.Errorf("cannot encode URL into available bits")
- }
- num := make([]byte, dbit/10*3)
- for i := range num {
- num[i] = '0'
- }
- b.Pad(dbit)
- b.Reset()
- coding.String(url).Encode(&b, p.Version)
- coding.Num(num).Encode(&b, p.Version)
- b.AddCheckBytes(p.Version, p.Level)
- data := b.Bytes()
-
- doff := 0 // data offset
- coff := 0 // checksum offset
- mbit := bbit + dbit/10*10
-
- // Choose pixels.
- bitblocks := make([]*BitBlock, p.Blocks)
- for blocknum := 0; blocknum < p.Blocks; blocknum++ {
- if blocknum == p.Blocks-extra {
- nd++
- }
-
- bdata := data[doff/8 : doff/8+nd]
- cdata := data[p.DataBytes+coff/8 : p.DataBytes+coff/8+nc]
- bb := newBlock(nd, nc, rs, bdata, cdata)
- bitblocks[blocknum] = bb
-
- // Determine which bits in this block we can try to edit.
- lo, hi := 0, nd*8
- if lo < bbit-doff {
- lo = bbit - doff
- if lo > hi {
- lo = hi
- }
- }
- if hi > mbit-doff {
- hi = mbit - doff
- if hi < lo {
- hi = lo
- }
- }
-
- // Preserve [0, lo) and [hi, nd*8).
- for i := 0; i < lo; i++ {
- if !bb.canSet(uint(i), (bdata[i/8]>>uint(7-i&7))&1) {
- return fmt.Errorf("cannot preserve required bits")
- }
- }
- for i := hi; i < nd*8; i++ {
- if !bb.canSet(uint(i), (bdata[i/8]>>uint(7-i&7))&1) {
- return fmt.Errorf("cannot preserve required bits")
- }
- }
-
- // Can edit [lo, hi) and checksum bits to hit target.
- // Determine which ones to try first.
- order := make([]Pixorder, (hi-lo)+nc*8)
- for i := lo; i < hi; i++ {
- order[i-lo].Off = doff + i
- }
- for i := 0; i < nc*8; i++ {
- order[hi-lo+i].Off = p.DataBytes*8 + coff + i
- }
- if m.OnlyDataBits {
- order = order[:hi-lo]
- }
- for i := range order {
- po := &order[i]
- po.Priority = pixByOff[po.Off].Contrast<<8 | rand.Intn(256)
- }
- sort.Sort(byPriority(order))
-
- const mark = false
- for i := range order {
- po := &order[i]
- pinfo := &pixByOff[po.Off]
- bval := pinfo.Targ
- if bval < 128 {
- bval = 1
- } else {
- bval = 0
- }
- pix := pinfo.Pix
- if pix&coding.Invert != 0 {
- bval ^= 1
- }
- if pinfo.HardZero {
- bval = 0
- }
-
- var bi int
- if pix.Role() == coding.Data {
- bi = po.Off - doff
- } else {
- bi = po.Off - p.DataBytes*8 - coff + nd*8
- }
- if bb.canSet(uint(bi), bval) {
- pinfo.Block = bb
- pinfo.Bit = uint(bi)
- if mark {
- p.Pixel[pinfo.Y][pinfo.X] = coding.Black
- }
- } else {
- if pinfo.HardZero {
- panic("hard zero")
- }
- if mark {
- p.Pixel[pinfo.Y][pinfo.X] = 0
- }
- }
- }
- bb.copyOut()
-
- const cheat = false
- for i := 0; i < nd*8; i++ {
- pinfo := &pixByOff[doff+i]
- pix := p.Pixel[pinfo.Y][pinfo.X]
- if bb.B[i/8]&(1<<uint(7-i&7)) != 0 {
- pix ^= coding.Black
- }
- expect[pinfo.Y][pinfo.X] = pix&coding.Black != 0
- if cheat {
- p.Pixel[pinfo.Y][pinfo.X] = pix & coding.Black
- }
- }
- for i := 0; i < nc*8; i++ {
- pinfo := &pixByOff[p.DataBytes*8+coff+i]
- pix := p.Pixel[pinfo.Y][pinfo.X]
- if bb.B[nd+i/8]&(1<<uint(7-i&7)) != 0 {
- pix ^= coding.Black
- }
- expect[pinfo.Y][pinfo.X] = pix&coding.Black != 0
- if cheat {
- p.Pixel[pinfo.Y][pinfo.X] = pix & coding.Black
- }
- }
- doff += nd * 8
- coff += nc * 8
- }
-
- // Pass over all pixels again, dithering.
- if m.Dither {
- for i := range pixByOff {
- pinfo := &pixByOff[i]
- pinfo.DTarg = int(pinfo.Targ)
- }
- for y, row := range p.Pixel {
- for x, pix := range row {
- if pix.Role() != coding.Data && pix.Role() != coding.Check {
- continue
- }
- pinfo := &pixByOff[pix.Offset()]
- if pinfo.Block == nil {
- // did not choose this pixel
- continue
- }
-
- pix := pinfo.Pix
-
- pval := byte(1) // pixel value (black)
- v := 0 // gray value (black)
- targ := pinfo.DTarg
- if targ >= 128 {
- // want white
- pval = 0
- v = 255
- }
-
- bval := pval // bit value
- if pix&coding.Invert != 0 {
- bval ^= 1
- }
- if pinfo.HardZero && bval != 0 {
- bval ^= 1
- pval ^= 1
- v ^= 255
- }
-
- // Set pixel value as we want it.
- pinfo.Block.reset(pinfo.Bit, bval)
-
- _, _ = x, y
-
- err := targ - v
- if x+1 < len(row) {
- addDither(pixByOff, row[x+1], err*7/16)
- }
- if false && y+1 < len(p.Pixel) {
- if x > 0 {
- addDither(pixByOff, p.Pixel[y+1][x-1], err*3/16)
- }
- addDither(pixByOff, p.Pixel[y+1][x], err*5/16)
- if x+1 < len(row) {
- addDither(pixByOff, p.Pixel[y+1][x+1], err*1/16)
- }
- }
- }
- }
-
- for _, bb := range bitblocks {
- bb.copyOut()
- }
- }
-
- noops := 0
- // Copy numbers back out.
- for i := 0; i < dbit/10; i++ {
- // Pull out 10 bits.
- v := 0
- for j := 0; j < 10; j++ {
- bi := uint(bbit + 10*i + j)
- v <<= 1
- v |= int((data[bi/8] >> (7 - bi&7)) & 1)
- }
- // Turn into 3 digits.
- if v >= 1000 {
- // Oops - too many 1 bits.
- // We know the 512, 256, 128, 64, 32 bits are all set.
- // Pick one at random to clear. This will break some
- // checksum bits, but so be it.
- println("oops", i, v)
- pinfo := &pixByOff[bbit+10*i+3] // TODO random
- pinfo.Contrast = 1e9 >> 8
- pinfo.HardZero = true
- noops++
- }
- num[i*3+0] = byte(v/100 + '0')
- num[i*3+1] = byte(v/10%10 + '0')
- num[i*3+2] = byte(v%10 + '0')
- }
- if noops > 0 {
- goto Again
- }
-
- var b1 coding.Bits
- coding.String(url).Encode(&b1, p.Version)
- coding.Num(num).Encode(&b1, p.Version)
- b1.AddCheckBytes(p.Version, p.Level)
- if !bytes.Equal(b.Bytes(), b1.Bytes()) {
- fmt.Printf("mismatch\n%d %x\n%d %x\n", len(b.Bytes()), b.Bytes(), len(b1.Bytes()), b1.Bytes())
- panic("byte mismatch")
- }
-
- cc, err := p.Encode(coding.String(url), coding.Num(num))
- if err != nil {
- return err
- }
-
- if !m.Dither {
- for y, row := range expect {
- for x, pix := range row {
- if cc.Black(x, y) != pix {
- println("mismatch", x, y, p.Pixel[y][x].String())
- }
- }
- }
- }
-
- m.Code = &qr.Code{Bitmap: cc.Bitmap, Size: cc.Size, Stride: cc.Stride, Scale: m.Scale}
-
- if m.SaveControl {
- m.Control = pngEncode(makeImage(req, "", "", 0, cc.Size, 4, m.Scale, func(x, y int) (rgba uint32) {
- pix := p.Pixel[y][x]
- if pix.Role() == coding.Data || pix.Role() == coding.Check {
- pinfo := &pixByOff[pix.Offset()]
- if pinfo.Block != nil {
- if cc.Black(x, y) {
- return 0x000000ff
- }
- return 0xffffffff
- }
- }
- if cc.Black(x, y) {
- return 0x3f3f3fff
- }
- return 0xbfbfbfff
- }))
- }
-
- return nil
-}
-
-func addDither(pixByOff []Pixinfo, pix coding.Pixel, err int) {
- if pix.Role() != coding.Data && pix.Role() != coding.Check {
- return
- }
- pinfo := &pixByOff[pix.Offset()]
- println("add", pinfo.X, pinfo.Y, pinfo.DTarg, err)
- pinfo.DTarg += err
-}
-
-func readTarget(name string) ([][]int, error) {
- f, err := os.Open(name)
- if err != nil {
- return nil, err
- }
- m, err := png.Decode(f)
- if err != nil {
- return nil, fmt.Errorf("decode %s: %v", name, err)
- }
- rect := m.Bounds()
- target := make([][]int, rect.Dy())
- for i := range target {
- target[i] = make([]int, rect.Dx())
- }
- for y, row := range target {
- for x := range row {
- a := int(color.RGBAModel.Convert(m.At(x, y)).(color.RGBA).A)
- t := int(color.GrayModel.Convert(m.At(x, y)).(color.Gray).Y)
- if a == 0 {
- t = -1
- }
- row[x] = t
- }
- }
- return target, nil
-}
-
-type BitBlock struct {
- DataBytes int
- CheckBytes int
- B []byte
- M [][]byte
- Tmp []byte
- RS *gf256.RSEncoder
- bdata []byte
- cdata []byte
-}
-
-func newBlock(nd, nc int, rs *gf256.RSEncoder, dat, cdata []byte) *BitBlock {
- b := &BitBlock{
- DataBytes: nd,
- CheckBytes: nc,
- B: make([]byte, nd+nc),
- Tmp: make([]byte, nc),
- RS: rs,
- bdata: dat,
- cdata: cdata,
- }
- copy(b.B, dat)
- rs.ECC(b.B[:nd], b.B[nd:])
- b.check()
- if !bytes.Equal(b.Tmp, cdata) {
- panic("cdata")
- }
-
- b.M = make([][]byte, nd*8)
- for i := range b.M {
- row := make([]byte, nd+nc)
- b.M[i] = row
- for j := range row {
- row[j] = 0
- }
- row[i/8] = 1 << (7 - uint(i%8))
- rs.ECC(row[:nd], row[nd:])
- }
- return b
-}
-
-func (b *BitBlock) check() {
- b.RS.ECC(b.B[:b.DataBytes], b.Tmp)
- if !bytes.Equal(b.B[b.DataBytes:], b.Tmp) {
- fmt.Printf("ecc mismatch\n%x\n%x\n", b.B[b.DataBytes:], b.Tmp)
- panic("mismatch")
- }
-}
-
-func (b *BitBlock) reset(bi uint, bval byte) {
- if (b.B[bi/8]>>(7-bi&7))&1 == bval {
- // already has desired bit
- return
- }
- // rows that have already been set
- m := b.M[len(b.M):cap(b.M)]
- for _, row := range m {
- if row[bi/8]&(1<<(7-bi&7)) != 0 {
- // Found it.
- for j, v := range row {
- b.B[j] ^= v
- }
- return
- }
- }
- panic("reset of unset bit")
-}
-
-func (b *BitBlock) canSet(bi uint, bval byte) bool {
- found := false
- m := b.M
- for j, row := range m {
- if row[bi/8]&(1<<(7-bi&7)) == 0 {
- continue
- }
- if !found {
- found = true
- if j != 0 {
- m[0], m[j] = m[j], m[0]
- }
- continue
- }
- for k := range row {
- row[k] ^= m[0][k]
- }
- }
- if !found {
- return false
- }
-
- targ := m[0]
-
- // Subtract from saved-away rows too.
- for _, row := range m[len(m):cap(m)] {
- if row[bi/8]&(1<<(7-bi&7)) == 0 {
- continue
- }
- for k := range row {
- row[k] ^= targ[k]
- }
- }
-
- // Found a row with bit #bi == 1 and cut that bit from all the others.
- // Apply to data and remove from m.
- if (b.B[bi/8]>>(7-bi&7))&1 != bval {
- for j, v := range targ {
- b.B[j] ^= v
- }
- }
- b.check()
- n := len(m) - 1
- m[0], m[n] = m[n], m[0]
- b.M = m[:n]
-
- for _, row := range b.M {
- if row[bi/8]&(1<<(7-bi&7)) != 0 {
- panic("did not reduce")
- }
- }
-
- return true
-}
-
-func (b *BitBlock) copyOut() {
- b.check()
- copy(b.bdata, b.B[:b.DataBytes])
- copy(b.cdata, b.B[b.DataBytes:])
-}
-
-func showtable(w http.ResponseWriter, b *BitBlock, gray func(int) bool) {
- nd := b.DataBytes
- nc := b.CheckBytes
-
- fmt.Fprintf(w, "<table class='matrix' cellspacing=0 cellpadding=0 border=0>\n")
- line := func() {
- fmt.Fprintf(w, "<tr height=1 bgcolor='#bbbbbb'><td colspan=%d>\n", (nd+nc)*8)
- }
- line()
- dorow := func(row []byte) {
- fmt.Fprintf(w, "<tr>\n")
- for i := 0; i < (nd+nc)*8; i++ {
- fmt.Fprintf(w, "<td")
- v := row[i/8] >> uint(7-i&7) & 1
- if gray(i) {
- fmt.Fprintf(w, " class='gray'")
- }
- fmt.Fprintf(w, ">")
- if v == 1 {
- fmt.Fprintf(w, "1")
- }
- }
- line()
- }
-
- m := b.M[len(b.M):cap(b.M)]
- for i := len(m) - 1; i >= 0; i-- {
- dorow(m[i])
- }
- m = b.M
- for _, row := range b.M {
- dorow(row)
- }
-
- fmt.Fprintf(w, "</table>\n")
-}
-
-func BitsTable(w http.ResponseWriter, req *http.Request) {
- nd := 2
- nc := 2
- fmt.Fprintf(w, `<html>
- <style type='text/css'>
- .matrix {
- font-family: sans-serif;
- font-size: 0.8em;
- }
- table.matrix {
- padding-left: 1em;
- padding-right: 1em;
- padding-top: 1em;
- padding-bottom: 1em;
- }
- .matrix td {
- padding-left: 0.3em;
- padding-right: 0.3em;
- border-left: 2px solid white;
- border-right: 2px solid white;
- text-align: center;
- color: #aaa;
- }
- .matrix td.gray {
- color: black;
- background-color: #ddd;
- }
- </style>
- `)
- rs := gf256.NewRSEncoder(coding.Field, nc)
- dat := make([]byte, nd+nc)
- b := newBlock(nd, nc, rs, dat[:nd], dat[nd:])
- for i := 0; i < nd*8; i++ {
- b.canSet(uint(i), 0)
- }
- showtable(w, b, func(i int) bool { return i < nd*8 })
-
- b = newBlock(nd, nc, rs, dat[:nd], dat[nd:])
- for j := 0; j < (nd+nc)*8; j += 2 {
- b.canSet(uint(j), 0)
- }
- showtable(w, b, func(i int) bool { return i%2 == 0 })
-
-}
diff --git a/vendor/github.com/mattermost/rsc/qr/web/resize/resize.go b/vendor/github.com/mattermost/rsc/qr/web/resize/resize.go
deleted file mode 100644
index 02c8b0040..000000000
--- a/vendor/github.com/mattermost/rsc/qr/web/resize/resize.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2011 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 file.
-
-package resize
-
-import (
- "image"
- "image/color"
-)
-
-// average convert the sums to averages and returns the result.
-func average(sum []uint64, w, h int, n uint64) *image.RGBA {
- ret := image.NewRGBA(image.Rect(0, 0, w, h))
- for y := 0; y < h; y++ {
- for x := 0; x < w; x++ {
- index := 4 * (y*w + x)
- pix := ret.Pix[y*ret.Stride+x*4:]
- pix[0] = uint8(sum[index+0] / n)
- pix[1] = uint8(sum[index+1] / n)
- pix[2] = uint8(sum[index+2] / n)
- pix[3] = uint8(sum[index+3] / n)
- }
- }
- return ret
-}
-
-// ResizeRGBA returns a scaled copy of the RGBA image slice r of m.
-// The returned image has width w and height h.
-func ResizeRGBA(m *image.RGBA, r image.Rectangle, w, h int) *image.RGBA {
- ww, hh := uint64(w), uint64(h)
- dx, dy := uint64(r.Dx()), uint64(r.Dy())
- // See comment in Resize.
- n, sum := dx*dy, make([]uint64, 4*w*h)
- for y := r.Min.Y; y < r.Max.Y; y++ {
- pix := m.Pix[(y-r.Min.Y)*m.Stride:]
- for x := r.Min.X; x < r.Max.X; x++ {
- // Get the source pixel.
- p := pix[(x-r.Min.X)*4:]
- r64 := uint64(p[0])
- g64 := uint64(p[1])
- b64 := uint64(p[2])
- a64 := uint64(p[3])
- // Spread the source pixel over 1 or more destination rows.
- py := uint64(y) * hh
- for remy := hh; remy > 0; {
- qy := dy - (py % dy)
- if qy > remy {
- qy = remy
- }
- // Spread the source pixel over 1 or more destination columns.
- px := uint64(x) * ww
- index := 4 * ((py/dy)*ww + (px / dx))
- for remx := ww; remx > 0; {
- qx := dx - (px % dx)
- if qx > remx {
- qx = remx
- }
- qxy := qx * qy
- sum[index+0] += r64 * qxy
- sum[index+1] += g64 * qxy
- sum[index+2] += b64 * qxy
- sum[index+3] += a64 * qxy
- index += 4
- px += qx
- remx -= qx
- }
- py += qy
- remy -= qy
- }
- }
- }
- return average(sum, w, h, n)
-}
-
-// ResizeNRGBA returns a scaled copy of the RGBA image slice r of m.
-// The returned image has width w and height h.
-func ResizeNRGBA(m *image.NRGBA, r image.Rectangle, w, h int) *image.RGBA {
- ww, hh := uint64(w), uint64(h)
- dx, dy := uint64(r.Dx()), uint64(r.Dy())
- // See comment in Resize.
- n, sum := dx*dy, make([]uint64, 4*w*h)
- for y := r.Min.Y; y < r.Max.Y; y++ {
- pix := m.Pix[(y-r.Min.Y)*m.Stride:]
- for x := r.Min.X; x < r.Max.X; x++ {
- // Get the source pixel.
- p := pix[(x-r.Min.X)*4:]
- r64 := uint64(p[0])
- g64 := uint64(p[1])
- b64 := uint64(p[2])
- a64 := uint64(p[3])
- r64 = (r64 * a64) / 255
- g64 = (g64 * a64) / 255
- b64 = (b64 * a64) / 255
- // Spread the source pixel over 1 or more destination rows.
- py := uint64(y) * hh
- for remy := hh; remy > 0; {
- qy := dy - (py % dy)
- if qy > remy {
- qy = remy
- }
- // Spread the source pixel over 1 or more destination columns.
- px := uint64(x) * ww
- index := 4 * ((py/dy)*ww + (px / dx))
- for remx := ww; remx > 0; {
- qx := dx - (px % dx)
- if qx > remx {
- qx = remx
- }
- qxy := qx * qy
- sum[index+0] += r64 * qxy
- sum[index+1] += g64 * qxy
- sum[index+2] += b64 * qxy
- sum[index+3] += a64 * qxy
- index += 4
- px += qx
- remx -= qx
- }
- py += qy
- remy -= qy
- }
- }
- }
- return average(sum, w, h, n)
-}
-
-// Resample returns a resampled copy of the image slice r of m.
-// The returned image has width w and height h.
-func Resample(m image.Image, r image.Rectangle, w, h int) *image.RGBA {
- if w < 0 || h < 0 {
- return nil
- }
- if w == 0 || h == 0 || r.Dx() <= 0 || r.Dy() <= 0 {
- return image.NewRGBA(image.Rect(0, 0, w, h))
- }
- curw, curh := r.Dx(), r.Dy()
- img := image.NewRGBA(image.Rect(0, 0, w, h))
- for y := 0; y < h; y++ {
- for x := 0; x < w; x++ {
- // Get a source pixel.
- subx := x * curw / w
- suby := y * curh / h
- r32, g32, b32, a32 := m.At(subx, suby).RGBA()
- r := uint8(r32 >> 8)
- g := uint8(g32 >> 8)
- b := uint8(b32 >> 8)
- a := uint8(a32 >> 8)
- img.SetRGBA(x, y, color.RGBA{r, g, b, a})
- }
- }
- return img
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/copy.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/copy.go
deleted file mode 100644
index 4e723260b..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/copy.go
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright 2011 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 file.
-
-// Copied from code.google.com/p/codesearch/regexp/copy.go.
-
-// Copied from Go's regexp/syntax.
-// Formatters edited to handle instByteRange.
-
-package main
-
-import (
- "bytes"
- "fmt"
- "regexp/syntax"
- "sort"
- "strconv"
- "unicode"
-)
-
-// cleanClass sorts the ranges (pairs of elements of r),
-// merges them, and eliminates duplicates.
-func cleanClass(rp *[]rune) []rune {
-
- // Sort by lo increasing, hi decreasing to break ties.
- sort.Sort(ranges{rp})
-
- r := *rp
- if len(r) < 2 {
- return r
- }
-
- // Merge abutting, overlapping.
- w := 2 // write index
- for i := 2; i < len(r); i += 2 {
- lo, hi := r[i], r[i+1]
- if lo <= r[w-1]+1 {
- // merge with previous range
- if hi > r[w-1] {
- r[w-1] = hi
- }
- continue
- }
- // new disjoint range
- r[w] = lo
- r[w+1] = hi
- w += 2
- }
-
- return r[:w]
-}
-
-// appendRange returns the result of appending the range lo-hi to the class r.
-func appendRange(r []rune, lo, hi rune) []rune {
- // Expand last range or next to last range if it overlaps or abuts.
- // Checking two ranges helps when appending case-folded
- // alphabets, so that one range can be expanding A-Z and the
- // other expanding a-z.
- n := len(r)
- for i := 2; i <= 4; i += 2 { // twice, using i=2, i=4
- if n >= i {
- rlo, rhi := r[n-i], r[n-i+1]
- if lo <= rhi+1 && rlo <= hi+1 {
- if lo < rlo {
- r[n-i] = lo
- }
- if hi > rhi {
- r[n-i+1] = hi
- }
- return r
- }
- }
- }
-
- return append(r, lo, hi)
-}
-
-const (
- // minimum and maximum runes involved in folding.
- // checked during test.
- minFold = 0x0041
- maxFold = 0x1044f
-)
-
-// appendFoldedRange returns the result of appending the range lo-hi
-// and its case folding-equivalent runes to the class r.
-func appendFoldedRange(r []rune, lo, hi rune) []rune {
- // Optimizations.
- if lo <= minFold && hi >= maxFold {
- // Range is full: folding can't add more.
- return appendRange(r, lo, hi)
- }
- if hi < minFold || lo > maxFold {
- // Range is outside folding possibilities.
- return appendRange(r, lo, hi)
- }
- if lo < minFold {
- // [lo, minFold-1] needs no folding.
- r = appendRange(r, lo, minFold-1)
- lo = minFold
- }
- if hi > maxFold {
- // [maxFold+1, hi] needs no folding.
- r = appendRange(r, maxFold+1, hi)
- hi = maxFold
- }
-
- // Brute force. Depend on appendRange to coalesce ranges on the fly.
- for c := lo; c <= hi; c++ {
- r = appendRange(r, c, c)
- f := unicode.SimpleFold(c)
- for f != c {
- r = appendRange(r, f, f)
- f = unicode.SimpleFold(f)
- }
- }
- return r
-}
-
-// ranges implements sort.Interface on a []rune.
-// The choice of receiver type definition is strange
-// but avoids an allocation since we already have
-// a *[]rune.
-type ranges struct {
- p *[]rune
-}
-
-func (ra ranges) Less(i, j int) bool {
- p := *ra.p
- i *= 2
- j *= 2
- return p[i] < p[j] || p[i] == p[j] && p[i+1] > p[j+1]
-}
-
-func (ra ranges) Len() int {
- return len(*ra.p) / 2
-}
-
-func (ra ranges) Swap(i, j int) {
- p := *ra.p
- i *= 2
- j *= 2
- p[i], p[i+1], p[j], p[j+1] = p[j], p[j+1], p[i], p[i+1]
-}
-
-func progString(p *syntax.Prog) string {
- var b bytes.Buffer
- dumpProg(&b, p)
- return b.String()
-}
-
-func instString(i *syntax.Inst) string {
- var b bytes.Buffer
- dumpInst(&b, i)
- return b.String()
-}
-
-func bw(b *bytes.Buffer, args ...string) {
- for _, s := range args {
- b.WriteString(s)
- }
-}
-
-func dumpProg(b *bytes.Buffer, p *syntax.Prog) {
- for j := range p.Inst {
- i := &p.Inst[j]
- pc := strconv.Itoa(j)
- if len(pc) < 3 {
- b.WriteString(" "[len(pc):])
- }
- if j == p.Start {
- pc += "*"
- }
- bw(b, pc, "\t")
- dumpInst(b, i)
- bw(b, "\n")
- }
-}
-
-func u32(i uint32) string {
- return strconv.FormatUint(uint64(i), 10)
-}
-
-func dumpInst(b *bytes.Buffer, i *syntax.Inst) {
- switch i.Op {
- case syntax.InstAlt:
- bw(b, "alt -> ", u32(i.Out), ", ", u32(i.Arg))
- case syntax.InstAltMatch:
- bw(b, "altmatch -> ", u32(i.Out), ", ", u32(i.Arg))
- case syntax.InstCapture:
- bw(b, "cap ", u32(i.Arg), " -> ", u32(i.Out))
- case syntax.InstEmptyWidth:
- bw(b, "empty ", u32(i.Arg), " -> ", u32(i.Out))
- case syntax.InstMatch:
- bw(b, "match")
- case syntax.InstFail:
- bw(b, "fail")
- case syntax.InstNop:
- bw(b, "nop -> ", u32(i.Out))
- case instByteRange:
- fmt.Fprintf(b, "byte %02x-%02x", (i.Arg>>8)&0xFF, i.Arg&0xFF)
- if i.Arg&argFold != 0 {
- bw(b, "/i")
- }
- bw(b, " -> ", u32(i.Out))
-
- // Should not happen
- case syntax.InstRune:
- if i.Rune == nil {
- // shouldn't happen
- bw(b, "rune <nil>")
- }
- bw(b, "rune ", strconv.QuoteToASCII(string(i.Rune)))
- if syntax.Flags(i.Arg)&syntax.FoldCase != 0 {
- bw(b, "/i")
- }
- bw(b, " -> ", u32(i.Out))
- case syntax.InstRune1:
- bw(b, "rune1 ", strconv.QuoteToASCII(string(i.Rune)), " -> ", u32(i.Out))
- case syntax.InstRuneAny:
- bw(b, "any -> ", u32(i.Out))
- case syntax.InstRuneAnyNotNL:
- bw(b, "anynotnl -> ", u32(i.Out))
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/main.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/main.go
deleted file mode 100644
index 672337a04..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/main.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2012 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 file.
-
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "regexp/syntax"
- "runtime/pprof"
-)
-
-var maxState = flag.Int("m", 1e5, "maximum number of states to explore")
-var cpuprof = flag.String("cpuprofile", "", "cpu profile file")
-
-func main() {
- flag.Usage = func() {
- fmt.Fprintf(os.Stderr, "usage: regmerge [-m maxstate] regexp [regexp2 regexp3....]\n")
- os.Exit(2)
- }
- flag.Parse()
-
- if len(flag.Args()) < 1 {
- flag.Usage()
- }
-
- os.Exit(run(flag.Args()))
-}
-
-func run(args []string) int {
- if *cpuprof != "" {
- f, err := os.Create(*cpuprof)
- if err != nil {
- log.Fatal(err)
- }
- pprof.StartCPUProfile(f)
- defer pprof.StopCPUProfile()
- }
-
- m, err := compile(flag.Args()...)
- if err != nil {
- log.Fatal(err)
- }
- n := 100
- for ;; n *= 2 {
- if n >= *maxState {
- if n >= 2* *maxState {
- fmt.Printf("reached state limit\n")
- return 1
- }
- n = *maxState
- }
- log.Printf("try %d states...\n", n)
- s, err := m.findMatch(n)
- if err == nil {
- fmt.Printf("%q\n", s)
- return 0
- }
- if err != ErrMemory {
- fmt.Printf("failed: %s\n", err)
- return 3
- }
- }
- panic("unreachable")
-}
-
-func compile(exprs ...string) (*matcher, error) {
- var progs []*syntax.Prog
- for _, expr := range exprs {
- re, err := syntax.Parse(expr, syntax.Perl)
- if err != nil {
- return nil, err
- }
- sre := re.Simplify()
- prog, err := syntax.Compile(sre)
- if err != nil {
- return nil, err
- }
- if err := toByteProg(prog); err != nil {
- return nil, err
- }
- progs = append(progs, prog)
- }
- m := &matcher{}
- if err := m.init(joinProgs(progs), len(progs)); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func bug() {
- panic("regmerge: internal error")
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/match.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/match.go
deleted file mode 100644
index 6a4b1f967..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/match.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2011 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 file.
-
-// Copied from code.google.com/p/codesearch/regexp/copy.go
-// and adapted for the problem of finding a matching string, not
-// testing whether a particular string matches.
-
-package main
-
-import (
- "encoding/binary"
- "errors"
- "fmt"
- "hash/fnv"
- "hash"
- "log"
- "regexp/syntax"
-)
-
-// A matcher holds the state for running regular expression search.
-type matcher struct {
- buf []byte
- prog *syntax.Prog // compiled program
- dstate map[uint32]*dstate // dstate cache
- start *dstate // start state
- startLine *dstate // start state for beginning of line
- z1, z2, z3 nstate // three temporary nstates
- ids []int
- numState int
- maxState int
- numByte int
- numMatch int
- undo [256]byte
- all *dstate
- allTail **dstate
- h hash.Hash32
-}
-
-// An nstate corresponds to an NFA state.
-type nstate struct {
- q Set // queue of program instructions
- flag flags // flags (TODO)
- needFlag syntax.EmptyOp
-}
-
-// The flags record state about a position between bytes in the text.
-type flags uint32
-
-const (
- flagBOL flags = 1 << iota // beginning of line
- flagEOL // end of line
- flagBOT // beginning of text
- flagEOT // end of text
- flagWord // last byte was word byte
-)
-
-// A dstate corresponds to a DFA state.
-type dstate struct {
- enc string // encoded nstate
- nextAll *dstate
- nextHash *dstate
- prev *dstate
- prevByte int
- done bool
-}
-
-func (z *nstate) String() string {
- return fmt.Sprintf("%v/%#x+%#x", z.q.Dense(), z.flag, z.needFlag)
-}
-
-// enc encodes z as a string.
-func (m *matcher) enc(z *nstate) []byte {
- buf := m.buf[:0]
- buf = append(buf, byte(z.needFlag), byte(z.flag))
- ids := m.ids[:0]
- for _, id := range z.q.Dense() {
- ids = append(ids, int(id))
- }
- sortInts(ids)
- last := ^uint32(0)
- for _, id := range ids {
- x := uint32(id)-last
- last = uint32(id)
- for x >= 0x80 {
- buf = append(buf, byte(x)|0x80)
- x >>= 7
- }
- buf = append(buf, byte(x))
- }
- m.buf = buf
- return buf
-}
-
-// dec decodes the encoding s into z.
-func (m *matcher) dec(z *nstate, s string) {
- b := append(m.buf[:0], s...)
- m.buf = b
- z.needFlag = syntax.EmptyOp(b[0])
- b = b[1:]
- i, n := binary.Uvarint(b)
- if n <= 0 {
- bug()
- }
- b = b[n:]
- z.flag = flags(i)
- z.q.Reset()
- last := ^uint32(0)
- for len(b) > 0 {
- i, n = binary.Uvarint(b)
- if n <= 0 {
- bug()
- }
- b = b[n:]
- last += uint32(i)
- z.q.Add(last, 0, 0)
- }
-}
-
-// init initializes the matcher.
-func (m *matcher) init(prog *syntax.Prog, n int) error {
- m.prog = prog
- m.dstate = make(map[uint32]*dstate)
- m.numMatch = n
- m.maxState = 10
- m.allTail = &m.all
- m.numByte = 256
- for i := range m.undo {
- m.undo[i] = byte(i)
- }
- m.h = fnv.New32()
-
- m.z1.q.Init(uint32(len(prog.Inst)))
- m.z2.q.Init(uint32(len(prog.Inst)))
- m.z3.q.Init(uint32(len(prog.Inst)))
- m.ids = make([]int, 0, len(prog.Inst))
-
- m.addq(&m.z1.q, uint32(prog.Start), syntax.EmptyBeginLine|syntax.EmptyBeginText)
- m.z1.flag = flagBOL | flagBOT
- m.start = m.cache(&m.z1, nil, 0)
-
- m.z1.q.Reset()
- m.addq(&m.z1.q, uint32(prog.Start), syntax.EmptyBeginLine)
- m.z1.flag = flagBOL
- m.startLine = m.cache(&m.z1, nil, 0)
-
- m.crunchProg()
-
- return nil
-}
-
-// stepEmpty steps runq to nextq expanding according to flag.
-func (m *matcher) stepEmpty(runq, nextq *Set, flag syntax.EmptyOp) {
- nextq.Reset()
- for _, id := range runq.Dense() {
- m.addq(nextq, id, flag)
- }
-}
-
-// stepByte steps runq to nextq consuming c and then expanding according to flag.
-// It returns true if a match ends immediately before c.
-// c is either an input byte or endText.
-func (m *matcher) stepByte(runq, nextq *Set, c int, flag syntax.EmptyOp) (match bool) {
- nextq.Reset()
- m.addq(nextq, uint32(m.prog.Start), flag)
-
- nmatch := 0
- for _, id := range runq.Dense() {
- i := &m.prog.Inst[id]
- switch i.Op {
- default:
- continue
- case syntax.InstMatch:
- nmatch++
- continue
- case instByteRange:
- if c == endText {
- break
- }
- lo := int((i.Arg >> 8) & 0xFF)
- hi := int(i.Arg & 0xFF)
- if i.Arg&argFold != 0 && 'a' <= c && c <= 'z' {
- c += 'A' - 'a'
- }
- if lo <= c && c <= hi {
- m.addq(nextq, i.Out, flag)
- }
- }
- }
- return nmatch == m.numMatch
-}
-
-// addq adds id to the queue, expanding according to flag.
-func (m *matcher) addq(q *Set, id uint32, flag syntax.EmptyOp) {
- if q.Has(id, 0) {
- return
- }
- q.MustAdd(id)
- i := &m.prog.Inst[id]
- switch i.Op {
- case syntax.InstCapture, syntax.InstNop:
- m.addq(q, i.Out, flag)
- case syntax.InstAlt, syntax.InstAltMatch:
- m.addq(q, i.Out, flag)
- m.addq(q, i.Arg, flag)
- case syntax.InstEmptyWidth:
- if syntax.EmptyOp(i.Arg)&^flag == 0 {
- m.addq(q, i.Out, flag)
- }
- }
-}
-
-const endText = -1
-
-// computeNext computes the next DFA state if we're in d reading c (an input byte or endText).
-func (m *matcher) computeNext(this, next *nstate, d *dstate, c int) bool {
- // compute flags in effect before c
- flag := syntax.EmptyOp(0)
- if this.flag&flagBOL != 0 {
- flag |= syntax.EmptyBeginLine
- }
- if this.flag&flagBOT != 0 {
- flag |= syntax.EmptyBeginText
- }
- if this.flag&flagWord != 0 {
- if !isWordByte(c) {
- flag |= syntax.EmptyWordBoundary
- } else {
- flag |= syntax.EmptyNoWordBoundary
- }
- } else {
- if isWordByte(c) {
- flag |= syntax.EmptyWordBoundary
- } else {
- flag |= syntax.EmptyNoWordBoundary
- }
- }
- if c == '\n' {
- flag |= syntax.EmptyEndLine
- }
- if c == endText {
- flag |= syntax.EmptyEndLine | syntax.EmptyEndText
- }
-
- if flag &= this.needFlag; flag != 0 {
- // re-expand queue using new flags.
- // TODO: only do this when it matters
- // (something is gating on word boundaries).
- m.stepEmpty(&this.q, &next.q, flag)
- this, next = next, &m.z3
- }
-
- // now compute flags after c.
- flag = 0
- next.flag = 0
- if c == '\n' {
- flag |= syntax.EmptyBeginLine
- next.flag |= flagBOL
- }
- if isWordByte(c) {
- next.flag |= flagWord
- }
-
- // re-add start, process rune + expand according to flags.
- if m.stepByte(&this.q, &next.q, c, flag) {
- return true
- }
- next.needFlag = m.queueFlag(&next.q)
- if next.needFlag&syntax.EmptyBeginLine == 0 {
- next.flag &^= flagBOL
- }
- if next.needFlag&(syntax.EmptyWordBoundary|syntax.EmptyNoWordBoundary) == 0{
- next.flag &^= flagWord
- }
-
- m.cache(next, d, c)
- return false
-}
-
-func (m *matcher) queueFlag(runq *Set) syntax.EmptyOp {
- var e uint32
- for _, id := range runq.Dense() {
- i := &m.prog.Inst[id]
- if i.Op == syntax.InstEmptyWidth {
- e |= i.Arg
- }
- }
- return syntax.EmptyOp(e)
-}
-
-func (m *matcher) hash(enc []byte) uint32 {
- m.h.Reset()
- m.h.Write(enc)
- return m.h.Sum32()
-}
-
-func (m *matcher) find(h uint32, enc []byte) *dstate {
-Search:
- for d := m.dstate[h]; d!=nil; d=d.nextHash {
- s := d.enc
- if len(s) != len(enc) {
- continue Search
- }
- for i, b := range enc {
- if s[i] != b {
- continue Search
- }
- }
- return d
- }
- return nil
-}
-
-func (m *matcher) cache(z *nstate, prev *dstate, prevByte int) *dstate {
- enc := m.enc(z)
- h := m.hash(enc)
- d := m.find(h, enc)
- if d != nil {
- return d
- }
-
- if m.numState >= m.maxState {
- panic(ErrMemory)
- }
- m.numState++
- d = &dstate{
- enc: string(enc),
- prev: prev,
- prevByte: prevByte,
- nextHash: m.dstate[h],
- }
- m.dstate[h] = d
- *m.allTail = d
- m.allTail = &d.nextAll
-
- return d
-}
-
-// isWordByte reports whether the byte c is a word character: ASCII only.
-// This is used to implement \b and \B. This is not right for Unicode, but:
-// - it's hard to get right in a byte-at-a-time matching world
-// (the DFA has only one-byte lookahead)
-// - this crude approximation is the same one PCRE uses
-func isWordByte(c int) bool {
- return 'A' <= c && c <= 'Z' ||
- 'a' <= c && c <= 'z' ||
- '0' <= c && c <= '9' ||
- c == '_'
-}
-
-var ErrNoMatch = errors.New("no matching strings")
-var ErrMemory = errors.New("exhausted memory")
-
-func (m *matcher) findMatch(maxState int) (s string, err error) {
- defer func() {
- switch r := recover().(type) {
- case nil:
- return
- case error:
- err = r
- return
- default:
- panic(r)
- }
- }()
-
- m.maxState = maxState
- numState := 0
- var d *dstate
- var c int
- for d = m.all; d != nil; d = d.nextAll {
- numState++
- if d.done {
- continue
- }
- this, next := &m.z1, &m.z2
- m.dec(this, d.enc)
- if m.computeNext(this, next, d, endText) {
- c = endText
- goto Found
- }
- for _, cb := range m.undo[:m.numByte] {
- if m.computeNext(this, next, d, int(cb)) {
- c = int(cb)
- goto Found
- }
- }
- d.done = true
- }
- log.Printf("searched %d states; queued %d states", numState, m.numState)
- return "", ErrNoMatch
-
-Found:
- var buf []byte
- if c >= 0 {
- buf = append(buf, byte(c))
- }
- for d1 := d; d1.prev != nil; d1= d1.prev {
- buf = append(buf, byte(d1.prevByte))
- }
- for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 {
- buf[i], buf[j] = buf[j], buf[i]
- }
- log.Printf("searched %d states; queued %d states", numState, m.numState)
- return string(buf), nil
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/merge.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/merge.go
deleted file mode 100644
index 15f51cfa7..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/merge.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2011 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 file.
-
-// Code to merge (join) multiple regexp progs into a single prog.
-// New code; not copied from anywhere.
-
-package main
-
-import "regexp/syntax"
-
-func joinProgs(progs []*syntax.Prog) *syntax.Prog {
- all := &syntax.Prog{}
- for i, p := range progs {
- n := len(all.Inst)
- all.Inst = append(all.Inst, p.Inst...)
- match := shiftInst(all.Inst[n:], n)
- if match < 0 {
- // no match instruction; give up
- all.Inst = []syntax.Inst{{Op: syntax.InstFail}}
- all.Start = 0
- return all
- }
- match += n
- m := len(all.Inst)
- all.Inst = append(all.Inst,
- syntax.Inst{Op: syntax.InstAlt, Out: uint32(p.Start+n), Arg: uint32(m+1)},
- syntax.Inst{Op: instByteRange, Arg: 0x00FF, Out: uint32(m)},
- syntax.Inst{Op: instByteRange, Arg: 0x00FF, Out: uint32(match)},
- syntax.Inst{Op: syntax.InstMatch},
- )
- all.Inst[match] = syntax.Inst{Op: syntax.InstAlt, Out: uint32(m+2), Arg: uint32(m+3)}
-
- if i == 0 {
- all.Start = m
- } else {
- old := all.Start
- all.Start = len(all.Inst)
- all.Inst = append(all.Inst, syntax.Inst{Op: syntax.InstAlt, Out: uint32(old), Arg: uint32(m)})
- }
- }
-
- return all
-}
-
-func shiftInst(inst []syntax.Inst, n int) int {
- match := -1
- for i := range inst {
- ip := &inst[i]
- ip.Out += uint32(n)
- if ip.Op == syntax.InstMatch {
- if match >= 0 {
- panic("double match")
- }
- match = i
- }
- if ip.Op == syntax.InstAlt || ip.Op == syntax.InstAltMatch {
- ip.Arg += uint32(n)
- }
- }
- return match
-}
-
-func (m *matcher) crunchProg() {
- var rewrite [256]byte
-
- for i := range m.prog.Inst {
- ip := &m.prog.Inst[i]
- switch ip.Op {
- case instByteRange:
- lo, hi := byte(ip.Arg>>8), byte(ip.Arg)
- rewrite[lo] = 1
- if hi < 255 {
- rewrite[hi+1] = 1
- }
- case syntax.InstEmptyWidth:
- switch op := syntax.EmptyOp(ip.Arg); {
- case op&(syntax.EmptyBeginLine|syntax.EmptyEndLine) != 0:
- rewrite['\n'] = 1
- rewrite['\n'+1] = 1
- case op&(syntax.EmptyWordBoundary|syntax.EmptyNoWordBoundary) != 0:
- rewrite['A'] = 1
- rewrite['Z'+1] = 1
- rewrite['a'] = 1
- rewrite['z'+1] = 1
- rewrite['0'] = 1
- rewrite['9'+1] = 1
- rewrite['_'] = 1
- rewrite['_'+1] = 1
- }
- }
- }
-
- rewrite[0] = 0
- for i := 1; i < 256; i++ {
- rewrite[i] += rewrite[i-1]
- }
- m.numByte = int(rewrite[255]) + 1
-
- for i := 255; i >= 0; i-- {
- m.undo[rewrite[i]] = byte(i)
- }
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/sort.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/sort.go
deleted file mode 100644
index e40f87714..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/sort.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2012 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 file.
-
-// Copy of go/src/pkg/sort/sort.go, specialized for []int
-// and to remove some array indexing.
-
-package main
-
-func min(a, b int) int {
- if a < b {
- return a
- }
- return b
-}
-
-// Insertion sort
-func insertionSort(data []int, a, b int) {
- for i := a + 1; i < b; i++ {
- for j := i; j > a && data[j] < data[j-1]; j-- {
- data[j], data[j-1] = data[j-1], data[j]
- }
- }
-}
-
-// siftDown implements the heap property on data[lo, hi).
-// first is an offset into the array where the root of the heap lies.
-func siftDown(data []int, lo, hi, first int) {
- root := lo
- for {
- child := 2*root + 1
- if child >= hi {
- break
- }
- if child+1 < hi && data[first+child] < data[first+child+1] {
- child++
- }
- if !(data[first+root] < data[first+child]) {
- return
- }
- data[first+root], data[first+child] = data[first+child], data[first+root]
- root = child
- }
-}
-
-func heapSort(data []int, a, b int) {
- first := a
- lo := 0
- hi := b - a
-
- // Build heap with greatest element at top.
- for i := (hi - 1) / 2; i >= 0; i-- {
- siftDown(data, i, hi, first)
- }
-
- // Pop elements, largest first, into end of data.
- for i := hi - 1; i >= 0; i-- {
- data[first], data[first+i] = data[first+i], data[first]
- siftDown(data, lo, i, first)
- }
-}
-
-// Quicksort, following Bentley and McIlroy,
-// ``Engineering a Sort Function,'' SP&E November 1993.
-
-// medianOfThree moves the median of the three values data[a], data[b], data[c] into data[a].
-func medianOfThree(data []int, a, b, c int) {
- m0 := b
- m1 := a
- m2 := c
- // bubble sort on 3 elements
- if data[m1] < data[m0] {
- data[m1], data[m0] = data[m0], data[m1]
- }
- if data[m2] < data[m1] {
- data[m2], data[m1] = data[m1], data[m2]
- }
- if data[m1] < data[m0] {
- data[m1], data[m0] = data[m0], data[m1]
- }
- // now data[m0] <= data[m1] <= data[m2]
-}
-
-func swapRange(data []int, a, b, n int) {
- for i := 0; i < n; i++ {
- data[a+i], data[b+i] = data[b+i], data[a+i]
- }
-}
-
-func doPivot(data []int, lo, hi int) (midlo, midhi int) {
- m := lo + (hi-lo)/2 // Written like this to avoid integer overflow.
- if hi-lo > 40 {
- // Tukey's ``Ninther,'' median of three medians of three.
- s := (hi - lo) / 8
- medianOfThree(data, lo, lo+s, lo+2*s)
- medianOfThree(data, m, m-s, m+s)
- medianOfThree(data, hi-1, hi-1-s, hi-1-2*s)
- }
- medianOfThree(data, lo, m, hi-1)
-
- // Invariants are:
- // data[lo] = pivot (set up by ChoosePivot)
- // data[lo <= i < a] = pivot
- // data[a <= i < b] < pivot
- // data[b <= i < c] is unexamined
- // data[c <= i < d] > pivot
- // data[d <= i < hi] = pivot
- //
- // Once b meets c, can swap the "= pivot" sections
- // into the middle of the slice.
- pivot := lo
- a, b, c, d := lo+1, lo+1, hi, hi
- dpivot := data[pivot]
- db, dc1 := data[b], data[c-1]
- for b < c {
- if db < dpivot { // data[b] < pivot
- b++
- if b < c {
- db = data[b]
- }
- continue
- }
- if !(dpivot < db) { // data[b] = pivot
- data[a], data[b] = db, data[a]
- a++
- b++
- if b < c {
- db = data[b]
- }
- continue
- }
- if dpivot < dc1 { // data[c-1] > pivot
- c--
- if c > 0 {
- dc1 = data[c-1]
- }
- continue
- }
- if !(dc1 < dpivot) { // data[c-1] = pivot
- data[c-1], data[d-1] = data[d-1], dc1
- c--
- d--
- if c > 0 {
- dc1 = data[c-1]
- }
- continue
- }
- // data[b] > pivot; data[c-1] < pivot
- data[b], data[c-1] = dc1, db
- b++
- c--
- if b < c {
- db = data[b]
- dc1 = data[c-1]
- }
- }
-
- n := min(b-a, a-lo)
- swapRange(data, lo, b-n, n)
-
- n = min(hi-d, d-c)
- swapRange(data, c, hi-n, n)
-
- return lo + b - a, hi - (d - c)
-}
-
-func quickSort(data []int, a, b, maxDepth int) {
- for b-a > 7 {
- if maxDepth == 0 {
- heapSort(data, a, b)
- return
- }
- maxDepth--
- mlo, mhi := doPivot(data, a, b)
- // Avoiding recursion on the larger subproblem guarantees
- // a stack depth of at most lg(b-a).
- if mlo-a < b-mhi {
- quickSort(data, a, mlo, maxDepth)
- a = mhi // i.e., quickSort(data, mhi, b)
- } else {
- quickSort(data, mhi, b, maxDepth)
- b = mlo // i.e., quickSort(data, a, mlo)
- }
- }
- if b-a > 1 {
- insertionSort(data, a, b)
- }
-}
-
-func sortInts(data []int) {
- // Switch to heapsort if depth of 2*ceil(lg(n)) is reached.
- n := len(data)
- maxDepth := 0
- for 1<<uint(maxDepth) < n {
- maxDepth++
- }
- maxDepth *= 2
- quickSort(data, 0, n, maxDepth)
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/sparse.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/sparse.go
deleted file mode 100644
index 461027080..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/sparse.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2011 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 file.
-
-// Copied from code.google.com/p/codesearch/sparse/set.go,
-// tweaked for better inlinability.
-
-package main
-
-// For comparison: running cindex over the Linux 2.6 kernel with this
-// implementation of trigram sets takes 11 seconds. If I change it to
-// a bitmap (which must be cleared between files) it takes 25 seconds.
-
-// A Set is a sparse set of uint32 values.
-// http://research.swtch.com/2008/03/using-uninitialized-memory-for-fun-and.html
-type Set struct {
- dense []uint32
- sparse []uint32
-}
-
-// NewSet returns a new Set with a given maximum size.
-// The set can contain numbers in [0, max-1].
-func NewSet(max uint32) *Set {
- return &Set{
- sparse: make([]uint32, max),
- }
-}
-
-// Init initializes a Set to have a given maximum size.
-// The set can contain numbers in [0, max-1].
-func (s *Set) Init(max uint32) {
- s.sparse = make([]uint32, max)
-}
-
-// Reset clears (empties) the set.
-func (s *Set) Reset() {
- s.dense = s.dense[:0]
-}
-
-// Add adds x to the set if it is not already there.
-//
-// TODO: The ugly additional variables v and n make the
-// function inlinable. When the 6g inliner gets better
-// they will not be necessary.
-func (s *Set) Add(x uint32, v uint32, n int) {
- v = s.sparse[x]
- if v < uint32(len(s.dense)) && s.dense[v] == x {
- return
- }
- n = len(s.dense)
- s.sparse[x] = uint32(n)
- s.dense = append(s.dense, x)
-}
-
-func (s *Set) MustAdd(x uint32) {
- s.sparse[x] = uint32(len(s.dense))
- s.dense = append(s.dense, x)
-}
-
-// Has reports whether x is in the set.
-//
-// TODO: The ugly additional variables v makes
-// function inlinable. When the 6g inliner gets better
-// it will not be necessary.
-func (s *Set) Has(x uint32, v uint32) bool {
- v = s.sparse[x]
- return v < uint32(len(s.dense)) && s.dense[v] == x
-}
-
-// Dense returns the values in the set.
-// The values are listed in the order in which they
-// were inserted.
-func (s *Set) Dense() []uint32 {
- return s.dense
-}
-
-// Len returns the number of values in the set.
-func (s *Set) Len() int {
- return len(s.dense)
-}
diff --git a/vendor/github.com/mattermost/rsc/regexp/regmerge/utf.go b/vendor/github.com/mattermost/rsc/regexp/regmerge/utf.go
deleted file mode 100644
index 605e01c10..000000000
--- a/vendor/github.com/mattermost/rsc/regexp/regmerge/utf.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright 2011 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 file.
-
-// Copy of code.google.com/p/codesearch/regexp/utf.go.
-
-package main
-
-import (
- "regexp/syntax"
- "unicode"
- "unicode/utf8"
-)
-
-const (
- instFail = syntax.InstFail
- instAlt = syntax.InstAlt
- instByteRange = syntax.InstRune | 0x80 // local opcode
-
- argFold = 1 << 16
-)
-
-func toByteProg(prog *syntax.Prog) error {
- var b runeBuilder
- for pc := range prog.Inst {
- i := &prog.Inst[pc]
- switch i.Op {
- case syntax.InstRune, syntax.InstRune1:
- // General rune range. PIA.
- // TODO: Pick off single-byte case.
- if lo, hi, fold, ok := oneByteRange(i); ok {
- i.Op = instByteRange
- i.Arg = uint32(lo)<<8 | uint32(hi)
- if fold {
- i.Arg |= argFold
- }
- break
- }
-
- r := i.Rune
- if syntax.Flags(i.Arg)&syntax.FoldCase != 0 {
- // Build folded list.
- var rr []rune
- if len(r) == 1 {
- rr = appendFoldedRange(rr, r[0], r[0])
- } else {
- for j := 0; j < len(r); j += 2 {
- rr = appendFoldedRange(rr, r[j], r[j+1])
- }
- }
- r = rr
- }
-
- b.init(prog, uint32(pc), i.Out)
- if len(r) == 1 {
- b.addRange(r[0], r[0], false)
- } else {
- for j := 0; j < len(r); j += 2 {
- b.addRange(r[j], r[j+1], false)
- }
- }
-
- case syntax.InstRuneAny, syntax.InstRuneAnyNotNL:
- // All runes.
- // AnyNotNL should exclude \n but the line-at-a-time
- // execution takes care of that for us.
- b.init(prog, uint32(pc), i.Out)
- b.addRange(0, unicode.MaxRune, false)
- }
- }
- return nil
-}
-
-func oneByteRange(i *syntax.Inst) (lo, hi byte, fold, ok bool) {
- if i.Op == syntax.InstRune1 {
- r := i.Rune[0]
- if r < utf8.RuneSelf {
- return byte(r), byte(r), false, true
- }
- }
- if i.Op != syntax.InstRune {
- return
- }
- fold = syntax.Flags(i.Arg)&syntax.FoldCase != 0
- if len(i.Rune) == 1 || len(i.Rune) == 2 && i.Rune[0] == i.Rune[1] {
- r := i.Rune[0]
- if r >= utf8.RuneSelf {
- return
- }
- if fold && !asciiFold(r) {
- return
- }
- return byte(r), byte(r), fold, true
- }
- if len(i.Rune) == 2 && i.Rune[1] < utf8.RuneSelf {
- if fold {
- for r := i.Rune[0]; r <= i.Rune[1]; r++ {
- if asciiFold(r) {
- return
- }
- }
- }
- return byte(i.Rune[0]), byte(i.Rune[1]), fold, true
- }
- if len(i.Rune) == 4 && i.Rune[0] == i.Rune[1] && i.Rune[2] == i.Rune[3] && unicode.SimpleFold(i.Rune[0]) == i.Rune[2] && unicode.SimpleFold(i.Rune[2]) == i.Rune[0] {
- return byte(i.Rune[0]), byte(i.Rune[0]), true, true
- }
-
- return
-}
-
-func asciiFold(r rune) bool {
- if r >= utf8.RuneSelf {
- return false
- }
- r1 := unicode.SimpleFold(r)
- if r1 >= utf8.RuneSelf {
- return false
- }
- if r1 == r {
- return true
- }
- return unicode.SimpleFold(r1) == r
-}
-
-func maxRune(n int) rune {
- b := 0
- if n == 1 {
- b = 7
- } else {
- b = 8 - (n + 1) + 6*(n-1)
- }
- return 1<<uint(b) - 1
-}
-
-type cacheKey struct {
- lo, hi uint8
- fold bool
- next uint32
-}
-
-type runeBuilder struct {
- begin uint32
- out uint32
- cache map[cacheKey]uint32
- p *syntax.Prog
-}
-
-func (b *runeBuilder) init(p *syntax.Prog, begin, out uint32) {
- // We will rewrite p.Inst[begin] to hold the accumulated
- // machine. For now, there is no match.
- p.Inst[begin].Op = instFail
-
- b.begin = begin
- b.out = out
- if b.cache == nil {
- b.cache = make(map[cacheKey]uint32)
- }
- for k := range b.cache {
- delete(b.cache, k)
- }
- b.p = p
-}
-
-func (b *runeBuilder) uncachedSuffix(lo, hi byte, fold bool, next uint32) uint32 {
- if next == 0 {
- next = b.out
- }
- pc := len(b.p.Inst)
- i := syntax.Inst{Op: instByteRange, Arg: uint32(lo)<<8 | uint32(hi), Out: next}
- if fold {
- i.Arg |= argFold
- }
- b.p.Inst = append(b.p.Inst, i)
- return uint32(pc)
-}
-
-func (b *runeBuilder) suffix(lo, hi byte, fold bool, next uint32) uint32 {
- if lo < 0x80 || hi > 0xbf {
- // Not a continuation byte, no need to cache.
- return b.uncachedSuffix(lo, hi, fold, next)
- }
-
- key := cacheKey{lo, hi, fold, next}
- if pc, ok := b.cache[key]; ok {
- return pc
- }
-
- pc := b.uncachedSuffix(lo, hi, fold, next)
- b.cache[key] = pc
- return pc
-}
-
-func (b *runeBuilder) addBranch(pc uint32) {
- // Add pc to the branch at the beginning.
- i := &b.p.Inst[b.begin]
- switch i.Op {
- case syntax.InstFail:
- i.Op = syntax.InstNop
- i.Out = pc
- return
- case syntax.InstNop:
- i.Op = syntax.InstAlt
- i.Arg = pc
- return
- case syntax.InstAlt:
- apc := uint32(len(b.p.Inst))
- b.p.Inst = append(b.p.Inst, syntax.Inst{Op: instAlt, Out: i.Arg, Arg: pc})
- i = &b.p.Inst[b.begin]
- i.Arg = apc
- b.begin = apc
- }
-}
-
-func (b *runeBuilder) addRange(lo, hi rune, fold bool) {
- if lo > hi {
- return
- }
-
- // TODO: Pick off 80-10FFFF for special handling?
- if lo == 0x80 && hi == 0x10FFFF {
- }
-
- // Split range into same-length sized ranges.
- for i := 1; i < utf8.UTFMax; i++ {
- max := maxRune(i)
- if lo <= max && max < hi {
- b.addRange(lo, max, fold)
- b.addRange(max+1, hi, fold)
- return
- }
- }
-
- // ASCII range is special.
- if hi < utf8.RuneSelf {
- b.addBranch(b.suffix(byte(lo), byte(hi), fold, 0))
- return
- }
-
- // Split range into sections that agree on leading bytes.
- for i := 1; i < utf8.UTFMax; i++ {
- m := rune(1)<<uint(6*i) - 1 // last i bytes of UTF-8 sequence
- if lo&^m != hi&^m {
- if lo&m != 0 {
- b.addRange(lo, lo|m, fold)
- b.addRange((lo|m)+1, hi, fold)
- return
- }
- if hi&m != m {
- b.addRange(lo, hi&^m-1, fold)
- b.addRange(hi&^m, hi, fold)
- return
- }
- }
- }
-
- // Finally. Generate byte matching equivalent for lo-hi.
- var ulo, uhi [utf8.UTFMax]byte
- n := utf8.EncodeRune(ulo[:], lo)
- m := utf8.EncodeRune(uhi[:], hi)
- if n != m {
- panic("codesearch/regexp: bad utf-8 math")
- }
-
- pc := uint32(0)
- for i := n - 1; i >= 0; i-- {
- pc = b.suffix(ulo[i], uhi[i], false, pc)
- }
- b.addBranch(pc)
-}
diff --git a/vendor/github.com/mattermost/rsc/rosetta/graph/Makefile b/vendor/github.com/mattermost/rsc/rosetta/graph/Makefile
deleted file mode 100644
index 1cb49f788..000000000
--- a/vendor/github.com/mattermost/rsc/rosetta/graph/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(GOROOT)/src/Make.inc
-
-TARG=rsc.googlecode.com/hg/rosetta/graph
-GOFILES=\
- graph.go\
-
-include $(GOROOT)/src/Make.pkg
diff --git a/vendor/github.com/mattermost/rsc/rosetta/graph/graph.go b/vendor/github.com/mattermost/rsc/rosetta/graph/graph.go
deleted file mode 100644
index 359617d41..000000000
--- a/vendor/github.com/mattermost/rsc/rosetta/graph/graph.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2011 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 file.
-
-// Simple demonstration of a graph interface and
-// Dijkstra's algorithm built on top of that interface,
-// without using inheritance.
-
-package graph
-
-import "container/heap"
-
-// A Graph is the interface implemented by graphs that
-// this package can run algorithms on.
-type Graph interface {
- // NumVertex returns the number of vertices in the graph.
- NumVertex() int
-
- // VertexID returns a vertex ID, 0 <= ID < NumVertex(), for v.
- VertexID(v Vertex) int
-
- // Neighbors returns a slice of vertices that are adjacent
- // to v in the graph.
- Neighbors(v Vertex) []Vertex
-}
-
-type Vertex interface {
- String() string
-}
-
-// ShortestPath uses Dijkstra's algorithm to find the shortest
-// path from start to end in g. It returns the path as a slice of
-// vertices, with start first and end last. If there is no path,
-// ShortestPath returns nil.
-func ShortestPath(g Graph, start, end Vertex) []Vertex {
- d := newDijkstra(g)
-
- d.visit(start, 1, nil)
- for !d.empty() {
- p := d.next()
- if g.VertexID(p.v) == g.VertexID(end) {
- break
- }
- for _, v := range g.Neighbors(p.v) {
- d.visit(v, p.depth+1, p)
- }
- }
-
- p := d.pos(end)
- if p.depth == 0 {
- // unvisited - no path
- return nil
- }
- path := make([]Vertex, p.depth)
- for ; p != nil; p = p.parent {
- path[p.depth-1] = p.v
- }
- return path
-}
-
-// A dpos is a position in the Dijkstra traversal.
-type dpos struct {
- depth int
- heapIndex int
- v Vertex
- parent *dpos
-}
-
-// A dijkstra is the Dijkstra traversal's work state.
-// It contains the heap queue and per-vertex information.
-type dijkstra struct {
- g Graph
- q []*dpos
- byID []dpos
-}
-
-func newDijkstra(g Graph) *dijkstra {
- d := &dijkstra{g: g}
- d.byID = make([]dpos, g.NumVertex())
- return d
-}
-
-func (d *dijkstra) pos(v Vertex) *dpos {
- p := &d.byID[d.g.VertexID(v)]
- p.v = v // in case this is the first time we've seen it
- return p
-}
-
-func (d *dijkstra) visit(v Vertex, depth int, parent *dpos) {
- p := d.pos(v)
- if p.depth == 0 {
- p.parent = parent
- p.depth = depth
- heap.Push(d, p)
- }
-}
-
-func (d *dijkstra) empty() bool {
- return len(d.q) == 0
-}
-
-func (d *dijkstra) next() *dpos {
- return heap.Pop(d).(*dpos)
-}
-
-// Implementation of heap.Interface
-func (d *dijkstra) Len() int {
- return len(d.q)
-}
-
-func (d *dijkstra) Less(i, j int) bool {
- return d.q[i].depth < d.q[j].depth
-}
-
-func (d *dijkstra) Swap(i, j int) {
- d.q[i], d.q[j] = d.q[j], d.q[i]
- d.q[i].heapIndex = i
- d.q[j].heapIndex = j
-}
-
-func (d *dijkstra) Push(x interface{}) {
- p := x.(*dpos)
- p.heapIndex = len(d.q)
- d.q = append(d.q, p)
-}
-
-func (d *dijkstra) Pop() interface{} {
- n := len(d.q)
- x := d.q[n-1]
- d.q = d.q[:n-1]
- x.heapIndex = -1
- return x
-}
diff --git a/vendor/github.com/mattermost/rsc/rosetta/maze/Makefile b/vendor/github.com/mattermost/rsc/rosetta/maze/Makefile
deleted file mode 100644
index 8a83abd05..000000000
--- a/vendor/github.com/mattermost/rsc/rosetta/maze/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-include $(GOROOT)/src/Make.inc
-
-TARG=maze
-GOFILES=\
- maze.go\
-
-include $(GOROOT)/src/Make.cmd
-
diff --git a/vendor/github.com/mattermost/rsc/rosetta/maze/maze.go b/vendor/github.com/mattermost/rsc/rosetta/maze/maze.go
deleted file mode 100644
index 3cd15d04f..000000000
--- a/vendor/github.com/mattermost/rsc/rosetta/maze/maze.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2011 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 file.
-
-// Rosetta Code-inspired maze generator and solver.
-// Demonstrates use of interfaces to separate algorithm
-// implementations (graph.ShortestPath, heap.*) from data.
-// (In contrast, multiple inheritance approaches require
-// you to store their data in your data structures as part
-// of the inheritance.)
-
-package main
-
-import (
- "bytes"
- "fmt"
- "math/rand"
- "time"
-
- "github.com/mattermost/rsc/rosetta/graph"
-)
-
-type Maze struct {
- w, h int
- grid [][]walls
-}
-
-type Dir uint
-
-const (
- North Dir = iota
- East
- West
- South
-)
-
-type walls uint8
-
-const allWalls walls = 1<<North | 1<<East | 1<<South | 1<<West
-
-var dirs = []struct {
- δx, δy int
-}{
- {0, -1},
- {1, 0},
- {-1, 0},
- {0, 1},
-}
-
-// move returns the cell in the direction dir from position r, c.
-// It returns ok==false if there is no cell in that direction.
-func (m *Maze) move(x, y int, dir Dir) (nx, ny int, ok bool) {
- nx = x + dirs[dir].δx
- ny = y + dirs[dir].δy
- ok = 0 <= nx && nx < m.w && 0 <= ny && ny < m.h
- return
-}
-
-// Move returns the cell in the direction dir from position x, y
-// It returns ok==false if there is no cell in that direction
-// or if a wall blocks movement in that direction.
-func (m *Maze) Move(x, y int, dir Dir) (nx, ny int, ok bool) {
- nx, ny, ok = m.move(x, y, dir)
- ok = ok && m.grid[y][x]&(1<<dir) == 0
- return
-}
-
-// NewMaze returns a new, randomly generated maze
-// of width w and height h.
-func NewMaze(w, h int) *Maze {
- // Allocate one slice for the whole 2-d cell grid and break up into rows.
- all := make([]walls, w*h)
- for i := range all {
- all[i] = allWalls
- }
- m := &Maze{w: w, h: h, grid: make([][]walls, h)}
- for i := range m.grid {
- m.grid[i], all = all[:w], all[w:]
- }
-
- // All cells start with all walls.
- m.generate(rand.Intn(w), rand.Intn(h))
-
- return m
-}
-
-func (m *Maze) generate(x, y int) {
- i := rand.Intn(4)
- for j := 0; j < 4; j++ {
- dir := Dir(i+j) % 4
- if nx, ny, ok := m.move(x, y, dir); ok && m.grid[ny][nx] == allWalls {
- // break down wall
- m.grid[y][x] &^= 1 << dir
- m.grid[ny][nx] &^= 1 << (3 - dir)
- m.generate(nx, ny)
- }
- }
-}
-
-// String returns a multi-line string representation of the maze.
-func (m *Maze) String() string {
- return m.PathString(nil)
-}
-
-// PathString returns the multi-line string representation of the
-// maze with the path marked on it.
-func (m *Maze) PathString(path []graph.Vertex) string {
- var b bytes.Buffer
- wall := func(w, m walls, ch byte) {
- if w&m != 0 {
- b.WriteByte(ch)
- } else {
- b.WriteByte(' ')
- }
- }
- for _, row := range m.grid {
- b.WriteByte('+')
- for _, cell := range row {
- wall(cell, 1<<North, '-')
- b.WriteByte('+')
- }
- b.WriteString("\n")
- for _, cell := range row {
- wall(cell, 1<<West, '|')
- b.WriteByte(' ')
- }
- b.WriteString("|\n")
- }
- for i := 0; i < m.w; i++ {
- b.WriteString("++")
- }
- b.WriteString("+")
- grid := b.Bytes()
-
- // Overlay path.
- last := -1
- for _, v := range path {
- p := v.(pos)
- i := (2*m.w+2)*(2*p.y+1) + 2*p.x + 1
- grid[i] = '#'
- if last != -1 {
- grid[(i+last)/2] = '#'
- }
- last = i
- }
-
- return string(grid)
-}
-
-// Implement graph.Graph.
-
-type pos struct {
- x, y int
-}
-
-func (p pos) String() string {
- return fmt.Sprintf("%d,%d", p.x, p.y)
-}
-
-func (m *Maze) Neighbors(v graph.Vertex) []graph.Vertex {
- p := v.(pos)
- var neighbors []graph.Vertex
- for dir := North; dir <= South; dir++ {
- if nx, ny, ok := m.Move(p.x, p.y, dir); ok {
- neighbors = append(neighbors, pos{nx, ny})
- }
- }
- return neighbors
-}
-
-func (m *Maze) NumVertex() int {
- return m.w * m.h
-}
-
-func (m *Maze) VertexID(v graph.Vertex) int {
- p := v.(pos)
- return p.y*m.w + p.x
-}
-
-func (m *Maze) Vertex(x, y int) graph.Vertex {
- return pos{x, y}
-}
-
-func main() {
- const w, h = 30, 10
- rand.Seed(time.Now().UnixNano())
-
- m := NewMaze(w, h)
- path := graph.ShortestPath(m, m.Vertex(0, 0), m.Vertex(w-1, h-1))
- fmt.Println(m.PathString(path))
-}
diff --git a/vendor/github.com/mattermost/rsc/s3get/main.go b/vendor/github.com/mattermost/rsc/s3get/main.go
deleted file mode 100644
index 579e8bb5f..000000000
--- a/vendor/github.com/mattermost/rsc/s3get/main.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2012 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 file.
-
-// S3get fetches a single object from or lists the objects in an S3 bucket.
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
-
- "github.com/mattermost/rsc/keychain"
- "launchpad.net/goamz/aws"
- "launchpad.net/goamz/s3"
-)
-
-var list = flag.Bool("l", false, "list buckets")
-var delim = flag.String("d", "", "list delimiter")
-
-func usage() {
- fmt.Fprintf(os.Stderr, `usage: s3get [-l] bucket path
-
-s3get fetches a single object from or lists the objects
-in an S3 bucket.
-
-The -l flag causes s3get to list available paths.
-When using -l, path may be omitted.
-Otherwise the listing begins at path.
-
-s3get uses the user name and password in the local
-keychain for the server 's3.amazonaws.com' as the S3
-access key (user name) and secret key (password).
-`)
- os.Exit(2)
-}
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- var buck, obj string
- args := flag.Args()
- switch len(args) {
- case 1:
- buck = args[0]
- if !*list {
- fmt.Fprintf(os.Stderr, "must specify path when not using -l")
- os.Exit(2)
- }
- case 2:
- buck = args[0]
- obj = args[1]
- default:
- usage()
- }
-
- access, secret, err := keychain.UserPasswd("s3.amazonaws.com", "")
- if err != nil {
- log.Fatal(err)
- }
-
- auth := aws.Auth{AccessKey: access, SecretKey: secret}
-
- b := s3.New(auth, aws.USEast).Bucket(buck)
- if *list {
- objs, prefixes, err := b.List("", *delim, obj, 0)
- if err != nil {
- log.Fatal(err)
- }
- for _, p := range prefixes {
- fmt.Printf("%s\n", p)
- }
- for _, obj := range objs {
- fmt.Printf("%s\n", obj.Key)
- }
- return
- }
-
- data, err := b.Get(obj)
- if err != nil {
- log.Fatal(err)
- }
- os.Stdout.Write(data)
-}
diff --git a/vendor/github.com/mattermost/rsc/smugmug/smug.go b/vendor/github.com/mattermost/rsc/smugmug/smug.go
deleted file mode 100644
index 8cb662223..000000000
--- a/vendor/github.com/mattermost/rsc/smugmug/smug.go
+++ /dev/null
@@ -1,542 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package smugmug uses the SmugMug API to manipulate photo albums
-// stored on smugmug.com.
-package smugmug
-
-import (
- "bytes"
- "crypto/md5"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "strconv"
- "strings"
-)
-
-const smugUploadHost = "upload.smugmug.com"
-const smugAPI = "1.2.2"
-const smugURL = "https://secure.smugmug.com/services/api/json/" + smugAPI + "/"
-const smugURLUnencrypted = "http://api.smugmug.com/services/api/json/" + smugAPI + "/"
-
-// A Conn represents an authenticated connection to the SmugMug server.
-type Conn struct {
- sessid string
- apiKey string
-
- NickName string
-}
-
-// A Category represents a single album category.
-type Category struct {
- ID int `json:"id"`
- Name string
-}
-
-type smugResult struct {
- Stat string `json:"stat"`
- Message string `json:"message"`
-}
-
-type loginResult struct {
- Login struct {
- Session struct {
- ID string `json:"id"`
- }
- User struct {
- ID int `json:"id"`
- NickName string
- DisplayName string
- }
- }
-}
-
-// Login logs into the SmugMug server with the given email address and password.
-// The apikey argument is the API Key for your application.
-// To obtain an API Key, see http://www.smugmug.com/hack/apikeys.
-func Login(email, passwd, apikey string) (*Conn, error) {
- c := &Conn{}
- var out loginResult
- if err := c.do("smugmug.login.withPassword", &out, "APIKey", apikey, "EmailAddress", email, "Password", passwd); err != nil {
- return nil, err
- }
-
- c.sessid = out.Login.Session.ID
- if c.sessid == "" {
- return nil, fmt.Errorf("SmugMug login appeared to succeed but did not return session ID")
- }
-
- c.NickName = out.Login.User.NickName
- if c.NickName == "" {
- return nil, fmt.Errorf("SmugMug login appeared to succeed but did not return User NickName")
- }
-
- return c, nil
-}
-
-// Categories returns the album categories for the user identified by the nick name.
-func (c *Conn) Categories(nick string) ([]*Category, error) {
- var out struct {
- Categories []*Category
- }
- if err := c.do("smugmug.categories.get", &out, "NickName", nick); err != nil {
- return nil, err
- }
- return out.Categories, nil
-}
-
-// CreateCategory creates a category with the given name.
-func (c *Conn) CreateCategory(name string) (*Category, error) {
- var out struct {
- Category *Category
- }
- if err := c.do("smugmug.categories.create", &out, "Name", name); err != nil {
- return nil, err
- }
- return out.Category, nil
-}
-
-// DeleteCategory deletes the category.
-func (c *Conn) DeleteCategory(cat *Category) error {
- return c.do("smugmug.categories.delete", nil, "CategoryID", strconv.Itoa(cat.ID))
-}
-
-// An Album represents a single photo album.
-type Album struct {
- ID int `json:"id"`
- Key string
- Title string
- URL string
-}
-
-// Albums returns the albums for the user identified by the nick name.
-// Use c.NickName for the logged-in user.
-func (c *Conn) Albums(nick string) ([]*Album, error) {
- var out struct {
- Albums []*Album
- }
- if err := c.do("smugmug.albums.get", &out, "NickName", nick); err != nil {
- return nil, err
- }
- return out.Albums, nil
-}
-
-// CreateAlbum creates a new album.
-func (c *Conn) CreateAlbum(title string) (*Album, error) {
- var out struct {
- Album *Album
- }
- if err := c.do("smugmug.albums.create", &out,
- "Title", title,
- "Public", "0",
- "WorldSearchable", "0",
- "SmugSearchable", "0",
- ); err != nil {
- return nil, err
- }
-
- if out.Album == nil || out.Album.Key == "" {
- return nil, fmt.Errorf("unable to parse SmugMug result")
- }
- return out.Album, nil
-}
-
-// AlbumInfo returns detailed metadata about an album.
-func (c *Conn) AlbumInfo(album *Album) (*AlbumInfo, error) {
- var out struct {
- Album *AlbumInfo
- }
- if err := c.do("smugmug.albums.getInfo", &out,
- "AlbumID", strconv.Itoa(album.ID),
- "AlbumKey", album.Key,
- ); err != nil {
- return nil, err
- }
-
- if out.Album == nil || out.Album.ID == 0 {
- return nil, fmt.Errorf("unable to parse SmugMug result")
- }
- return out.Album, nil
-}
-
-// An AlbumInfo lists the metadata for an album.
-type AlbumInfo struct {
- ID int `json:"id"`
- Key string
- Title string
-
- Backprinting string
- BoutiquePackaging int
- CanRank bool
- Category *Category
- Clean bool
- ColorCorrection int
- Comments bool
- Community struct {
- ID int `json:"id"`
- Name string
- }
- Description string
- EXIF bool
- External bool
- FamilyEdit bool
- Filenames bool
- FriendEdit bool
- Geography bool
- Header bool
- HideOwner bool
- Highlight struct {
- ID int `json:"id"`
- Key string
- Type string
- }
- ImageCount int
- InterceptShipping int
- Keywords string
- Larges bool
- LastUpdated string
- NiceName string
- Originals bool
- PackagingBranding bool
- Password string
- PasswordHint string
- Passworded bool
- Position int
- Printable bool
- Printmark struct {
- ID int `json:"id"`
- Name string
- }
- ProofDays int
- Protected bool
- Public bool
- Share bool
- SmugSearchable bool
- SortDirection bool
- SortMethod string
- SquareThumbs bool
- SubCategory *Category
- Template struct {
- ID int `json:"id"`
- }
- Theme struct {
- ID int `json:"id"`
- Key string
- Type string
- }
- URL string
- UnsharpAmount float64
- UnsharpRadius float64
- UnsharpSigma float64
- Watermark struct {
- ID int `json:"id"`
- Name string
- }
- Watermarking bool
- WorldSearchable bool
- X2Larges bool
- X3Larges bool
- XLarges bool
-}
-
-// ChangeAlbum changes an album's settings.
-// The argument list is a sequence of key, value pairs.
-// The keys are the names of AlbumInfo struct fields,
-// and the values are string values. For a boolean field,
-// use "0" for false and "1" for true.
-//
-// Example:
-// c.ChangeAlbum(a, "Larges", "1", "Title", "My Album")
-//
-func (c *Conn) ChangeAlbum(album *Album, args ...string) error {
- callArgs := append([]string{"AlbumID", strconv.Itoa(album.ID)}, args...)
- return c.do("smugmug.albums.changeSettings", nil, callArgs...)
-}
-
-// DeleteAlbum deletes an album.
-func (c *Conn) DeleteAlbum(album *Album) error {
- return c.do("smugmug.albums.delete", nil, "AlbumID", strconv.Itoa(album.ID))
-}
-
-// An Image represents a single SmugMug image.
-type Image struct {
- ID int `json:"id"`
- Key string
- URL string
-}
-
-// Images returns a list of images for an album.
-func (c *Conn) Images(album *Album) ([]*Image, error) {
- var out struct {
- Album struct {
- Images []*Image
- }
- }
-
- if err := c.do("smugmug.images.get", &out,
- "AlbumID", strconv.Itoa(album.ID),
- "AlbumKey", album.Key,
- "Heavy", "1",
- ); err != nil {
- return nil, err
- }
-
- return out.Album.Images, nil
-}
-
-// An ImageInfo lists the metadata for an image.
-type ImageInfo struct {
- ID int `json:"id"`
- Key string
- Album *Album
- Altitude int
- Caption string
- Date string
- FileName string
- Duration int
- Format string
- Height int
- Hidden bool
- Keywords string
- LargeURL string
- LastUpdated string
- Latitude float64
- LightboxURL string
- Longitude float64
- MD5Sum string
- MediumURL string
- OriginalURL string
- Position int
- Serial int
- Size int
- SmallURL string
- ThumbURL string
- TinyURL string
- Video320URL string
- Video640URL string
- Video960URL string
- Video1280URL string
- Video1920URL string
- Width int
- X2LargeURL string
- X3LargeURL string
- XLargeURL string
-}
-
-// ImageInfo returns detailed metadata about an image.
-func (c *Conn) ImageInfo(image *Image) (*ImageInfo, error) {
- var out struct {
- Image *ImageInfo
- }
- if err := c.do("smugmug.images.getInfo", &out,
- "ImageID", strconv.Itoa(image.ID),
- "ImageKey", image.Key,
- ); err != nil {
- return nil, err
- }
-
- if out.Image == nil || out.Image.ID == 0 {
- return nil, fmt.Errorf("unable to parse SmugMug result")
- }
- return out.Image, nil
-}
-
-// ChangeImage changes an image's settings.
-// The argument list is a sequence of key, value pairs.
-// The keys are the names of ImageInfo struct fields,
-// and the values are string values. For a boolean field,
-// use "0" for false and "1" for true.
-//
-// Example:
-// c.ChangeImage(a, "Caption", "me!", "Hidden", "0")
-//
-func (c *Conn) ChangeImage(image *Image, args ...string) error {
- callArgs := append([]string{"ImageID", strconv.Itoa(image.ID)}, args...)
- return c.do("smugmug.images.changeSettings", nil, callArgs...)
-}
-
-// An ImageEXIF lists the EXIF data associated with an image.
-type ImageEXIF struct {
- ID int `json:"id"`
- Key string
- Aperture string
- Brightness string
- CCDWidth string
- ColorSpace int
- CompressedBitsPerPixel string
- Contrast int
- DateTime string
- DateTimeDigitized string
- DateTimeOriginal string
- DigitalZoomRatio string
- ExposureBiasValue string
- ExposureMode int
- ExposureProgram int
- ExposureTime string
- Flash int
- FocalLength string
- FocalLengthIn35mmFilm string
- ISO int
- LightSource int
- Make string
- Metering int
- Model string
- Saturation int
- SensingMethod int
- Sharpness int
- SubjectDistance string
- SubjectDistanceRange int
- WhiteBalance int
-}
-
-// ImageInfo returns the EXIF data for an image.
-func (c *Conn) ImageEXIF(image *Image) (*ImageEXIF, error) {
- var out struct {
- Image *ImageEXIF
- }
- if err := c.do("smugmug.images.getEXIF", &out,
- "ImageID", strconv.Itoa(image.ID),
- "ImageKey", image.Key,
- ); err != nil {
- return nil, err
- }
-
- if out.Image == nil || out.Image.ID == 0 {
- return nil, fmt.Errorf("unable to parse SmugMug result")
- }
- return out.Image, nil
-}
-
-// DeleteImage deletes an image.
-func (c *Conn) DeleteImage(image *Image) error {
- return c.do("smugmug.images.delete", nil, "ImageID", strconv.Itoa(image.ID))
-}
-
-// AddImage uploads a new image to an album.
-// The name is the file name that will be displayed on SmugMug.
-// The data is the raw image data.
-func (c *Conn) AddImage(name string, data []byte, a *Album) (*Image, error) {
- return c.upload(name, data, "AlbumID", a.ID)
-}
-
-// ReplaceImage replaces an image.
-// The name is the file name that will be displayed on SmugMug.
-// The data is the raw image data.
-func (c *Conn) ReplaceImage(name string, data []byte, image *Image) (*Image, error) {
- return c.upload(name, data, "ImageID", image.ID)
-}
-
-func (c *Conn) upload(name string, data []byte, idkind string, id int) (*Image, error) {
- h := md5.New()
- h.Write(data)
- digest := fmt.Sprintf("%x", h.Sum(nil))
-
- req := &http.Request{
- Method: "PUT",
- URL: &url.URL{
- Scheme: "http",
- Host: smugUploadHost,
- Path: "/" + name,
- },
- ContentLength: int64(len(data)),
- Header: http.Header{
- "Content-MD5": {digest},
- "X-Smug-SessionID": {c.sessid},
- "X-Smug-Version": {smugAPI},
- "X-Smug-ResponseType": {"JSON"},
- "X-Smug-" + idkind: {strconv.Itoa(id)},
- "X-Smug-FileName": {name},
- },
- Body: ioutil.NopCloser(bytes.NewBuffer(data)),
- }
-
- r, err := http.DefaultTransport.RoundTrip(req)
- if err != nil {
- return nil, fmt.Errorf("upload %s: %s", name, err)
- }
-
- var out struct {
- Image *Image
- }
- if err := c.parseResult("upload", r, &out); err != nil {
- return nil, fmt.Errorf("upload %s: %s", name, err)
- }
- return out.Image, nil
-}
-
-func (c *Conn) do(method string, dst interface{}, args ...string) (err error) {
- defer func() {
- if err != nil {
- err = fmt.Errorf("%s: %s", method, err)
- }
- }()
-
- form := url.Values{
- "method": {method},
- "APIKey": {c.apiKey},
- "Pretty": {"1"}, // nice-looking JSON
- }
- if c.sessid != "" {
- form["SessionID"] = []string{c.sessid}
- }
- for i := 0; i < len(args); i += 2 {
- key, val := args[i], args[i+1]
- form[key] = []string{val}
- }
-
- url := smugURL
- if !strings.Contains(method, "login") {
- // I'd really prefer to use HTTPS for everything,
- // but I get "invalid API key" if I do.
- url = smugURLUnencrypted
- }
- r, err := http.Post(url, "application/x-www-form-urlencoded", strings.NewReader(form.Encode()))
- if err != nil {
- return err
- }
-
- return c.parseResult(method, r, dst)
-}
-
-func (c *Conn) parseResult(method string, r *http.Response, dst interface{}) error {
- defer r.Body.Close()
- if r.StatusCode != 200 {
- return fmt.Errorf("HTTP %s", r.Status)
- }
- data, err := ioutil.ReadAll(r.Body)
- if err != nil {
- return fmt.Errorf("reading body: %s", err)
- }
-
- var res smugResult
- if err := json.Unmarshal(data, &res); err != nil {
- return fmt.Errorf("parsing JSON result: %s", err)
- }
-
- // If there are no images, that's not an error.
- // But SmugMug says it is.
- if res.Stat == "fail" && method == "smugmug.images.get" && res.Message == "empty set - no images found" {
- res.Stat = "ok"
- data = []byte(`{"Images": []}`)
- }
-
- if res.Stat != "ok" {
- msg := res.Stat
- if res.Message != "" {
- msg = res.Message
- }
- return fmt.Errorf("%s", msg)
- }
-
- if dst != nil {
- if err := json.Unmarshal(data, dst); err != nil {
- return fmt.Errorf("parsing JSON result: %s", err)
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/mattermost/rsc/smugmug/smugup/main.go b/vendor/github.com/mattermost/rsc/smugmug/smugup/main.go
deleted file mode 100644
index 0b40e9db6..000000000
--- a/vendor/github.com/mattermost/rsc/smugmug/smugup/main.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2012 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 file.
-
-// Smugup uploads a collection of photos to SmugMug.
-//
-// Run 'smugup -help' for details.
-package main
-
-import (
- "crypto/md5"
- "flag"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
-
- "github.com/mattermost/rsc/keychain"
- "github.com/mattermost/rsc/smugmug"
-)
-
-const apiKey = "8qH4UgiunBKpsYpvcBXftbCYNEreAZ0m"
-
-var usageMessage = `usage: smugup [options] 'album title' [photo.jpg ...]
-
-Smugup creates a new album with the given title if one does not already exist.
-Then uploads the list of images to the album. If a particular image
-already exists in the album, the JPG replaces the album image if the
-contents differ.
-
-Smugup fetches the SmugMug user name and password from the
-user's keychain.
-
-By default, new albums are created as private as possible: not public,
-not world searchable, and not SmugMug-searchable.
-
-Smugup prints the URL for the album when finished.
-
-The options are:
-
- -u user
- SmugMug user account name (email address).
- This is not typically needed, as the user name found in the keychain will be used.
-`
-
-var smugUser = flag.String("u", "", "SmugMug user name")
-
-func usage() {
- fmt.Fprint(os.Stderr, usageMessage)
- os.Exit(2)
-}
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- log.SetFlags(0)
-
- args := flag.Args()
- if len(args) < 1 {
- usage()
- }
- title, files := args[0], args[1:]
-
- user, passwd, err := keychain.UserPasswd("smugmug.com", *smugUser)
- if err != nil {
- log.Fatal(err)
- }
-
- smug, err := smugmug.Login(user, passwd, apiKey)
- if err != nil {
- log.Fatal(err)
- }
-
- albums, err := smug.Albums(smug.NickName)
- if err != nil {
- log.Fatal(err)
- }
-
- var a *smugmug.Album
- for _, a = range albums {
- if a.Title == title {
- goto HaveAlbum
- }
- }
-
- a, err = smug.CreateAlbum(title)
- if err != nil {
- log.Fatal(err)
- }
-
-HaveAlbum:
- imageFiles := map[string]*smugmug.ImageInfo{}
- if len(files) > 0 {
- images, err := smug.Images(a)
- if err != nil {
- log.Fatal(err)
- }
-
- n := 0
- c := make(chan *smugmug.ImageInfo)
- rate := make(chan bool, 4)
- for _, image := range images {
- go func(image *smugmug.Image) {
- rate <- true
- info, err := smug.ImageInfo(image)
- <-rate
- if err != nil {
- log.Print(err)
- c <- nil
- return
- }
- c <- info
- }(image)
- n++
- }
-
- for i := 0; i < n; i++ {
- info := <-c
- if info == nil {
- continue
- }
- imageFiles[info.FileName] = info
- }
- }
-
- for _, file := range files {
- data, err := ioutil.ReadFile(file)
- if err != nil {
- log.Print(err)
- continue
- }
- _, elem := filepath.Split(file)
- info := imageFiles[elem]
- if info != nil {
- h := md5.New()
- h.Write(data)
- digest := fmt.Sprintf("%x", h.Sum(nil))
- if digest == info.MD5Sum {
- // Already have that image.
- continue
- }
- _, err = smug.ReplaceImage(file, data, &smugmug.Image{ID: info.ID})
- } else {
- _, err = smug.AddImage(file, data, a)
- }
- if err != nil {
- log.Print(err)
- }
- }
-
- info, err := smug.AlbumInfo(a)
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Printf("%s\n", info.URL)
-}
diff --git a/vendor/github.com/mattermost/rsc/xmpp/xmpp.go b/vendor/github.com/mattermost/rsc/xmpp/xmpp.go
deleted file mode 100644
index 6fa7e43cb..000000000
--- a/vendor/github.com/mattermost/rsc/xmpp/xmpp.go
+++ /dev/null
@@ -1,572 +0,0 @@
-// Copyright 2011 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 file.
-
-// TODO(rsc):
-// More precise error handling.
-// Presence functionality.
-// TODO(mattn):
-// Add proxy authentication.
-
-// Package xmpp implements a simple Google Talk client
-// using the XMPP protocol described in RFC 3920 and RFC 3921.
-package xmpp
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "encoding/base64"
- "encoding/xml"
- "errors"
- "fmt"
- "io"
- "log"
- "net"
- "net/http"
- "net/url"
- "os"
- "strconv"
- "strings"
-)
-
-const (
- nsStream = "http://etherx.jabber.org/streams"
- nsTLS = "urn:ietf:params:xml:ns:xmpp-tls"
- nsSASL = "urn:ietf:params:xml:ns:xmpp-sasl"
- nsBind = "urn:ietf:params:xml:ns:xmpp-bind"
- nsClient = "jabber:client"
-)
-
-var DefaultConfig tls.Config
-
-type Client struct {
- tls *tls.Conn // connection to server
- jid string // Jabber ID for our connection
- p *xml.Decoder
-}
-
-// NewClient creates a new connection to a host given as "hostname" or "hostname:port".
-// If host is not specified, the DNS SRV should be used to find the host from the domainpart of the JID.
-// Default the port to 5222.
-func NewClient(host, user, passwd string) (*Client, error) {
- addr := host
-
- if strings.TrimSpace(host) == "" {
- a := strings.SplitN(user, "@", 2)
- if len(a) == 2 {
- host = a[1]
- }
- }
- a := strings.SplitN(host, ":", 2)
- if len(a) == 1 {
- host += ":5222"
- }
- proxy := os.Getenv("HTTP_PROXY")
- if proxy == "" {
- proxy = os.Getenv("http_proxy")
- }
- if proxy != "" {
- url, err := url.Parse(proxy)
- if err == nil {
- addr = url.Host
- }
- }
- c, err := net.Dial("tcp", addr)
- if err != nil {
- return nil, err
- }
-
- if proxy != "" {
- fmt.Fprintf(c, "CONNECT %s HTTP/1.1\r\n", host)
- fmt.Fprintf(c, "Host: %s\r\n", host)
- fmt.Fprintf(c, "\r\n")
- br := bufio.NewReader(c)
- req, _ := http.NewRequest("CONNECT", host, nil)
- resp, err := http.ReadResponse(br, req)
- if err != nil {
- return nil, err
- }
- if resp.StatusCode != 200 {
- f := strings.SplitN(resp.Status, " ", 2)
- return nil, errors.New(f[1])
- }
- }
-
- tlsconn := tls.Client(c, &DefaultConfig)
- if err = tlsconn.Handshake(); err != nil {
- return nil, err
- }
-
- if strings.LastIndex(host, ":") > 0 {
- host = host[:strings.LastIndex(host, ":")]
- }
- if err = tlsconn.VerifyHostname(host); err != nil {
- return nil, err
- }
-
- client := new(Client)
- client.tls = tlsconn
- if err := client.init(user, passwd); err != nil {
- client.Close()
- return nil, err
- }
- return client, nil
-}
-
-func (c *Client) Close() error {
- return c.tls.Close()
-}
-
-func (c *Client) init(user, passwd string) error {
- // For debugging: the following causes the plaintext of the connection to be duplicated to stdout.
- // c.p = xml.NewParser(tee{c.tls, os.Stdout});
- c.p = xml.NewDecoder(c.tls)
-
- a := strings.SplitN(user, "@", 2)
- if len(a) != 2 {
- return errors.New("xmpp: invalid username (want user@domain): " + user)
- }
- user = a[0]
- domain := a[1]
-
- // Declare intent to be a jabber client.
- fmt.Fprintf(c.tls, "<?xml version='1.0'?>\n"+
- "<stream:stream to='%s' xmlns='%s'\n"+
- " xmlns:stream='%s' version='1.0'>\n",
- xmlEscape(domain), nsClient, nsStream)
-
- // Server should respond with a stream opening.
- se, err := nextStart(c.p)
- if err != nil {
- return err
- }
- if se.Name.Space != nsStream || se.Name.Local != "stream" {
- return errors.New("xmpp: expected <stream> but got <" + se.Name.Local + "> in " + se.Name.Space)
- }
-
- // Now we're in the stream and can use Unmarshal.
- // Next message should be <features> to tell us authentication options.
- // See section 4.6 in RFC 3920.
- var f streamFeatures
- if err = c.p.Decode(&f); err != nil {
- return errors.New("unmarshal <features>: " + err.Error())
- }
- havePlain := false
- for _, m := range f.Mechanisms.Mechanism {
- if m == "PLAIN" {
- havePlain = true
- break
- }
- }
- if !havePlain {
- return errors.New(fmt.Sprintf("PLAIN authentication is not an option: %v", f.Mechanisms.Mechanism))
- }
-
- // Plain authentication: send base64-encoded \x00 user \x00 password.
- raw := "\x00" + user + "\x00" + passwd
- enc := make([]byte, base64.StdEncoding.EncodedLen(len(raw)))
- base64.StdEncoding.Encode(enc, []byte(raw))
- fmt.Fprintf(c.tls, "<auth xmlns='%s' mechanism='PLAIN'>%s</auth>\n",
- nsSASL, enc)
-
- // Next message should be either success or failure.
- name, val, err := next(c.p)
- switch v := val.(type) {
- case *saslSuccess:
- case *saslFailure:
- // v.Any is type of sub-element in failure,
- // which gives a description of what failed.
- return errors.New("auth failure: " + v.Any.Local)
- default:
- return errors.New("expected <success> or <failure>, got <" + name.Local + "> in " + name.Space)
- }
-
- // Now that we're authenticated, we're supposed to start the stream over again.
- // Declare intent to be a jabber client.
- fmt.Fprintf(c.tls, "<stream:stream to='%s' xmlns='%s'\n"+
- " xmlns:stream='%s' version='1.0'>\n",
- xmlEscape(domain), nsClient, nsStream)
-
- // Here comes another <stream> and <features>.
- se, err = nextStart(c.p)
- if err != nil {
- return err
- }
- if se.Name.Space != nsStream || se.Name.Local != "stream" {
- return errors.New("expected <stream>, got <" + se.Name.Local + "> in " + se.Name.Space)
- }
- if err = c.p.Decode(&f); err != nil {
- // TODO: often stream stop.
- //return os.NewError("unmarshal <features>: " + err.String())
- }
-
- // Send IQ message asking to bind to the local user name.
- fmt.Fprintf(c.tls, "<iq type='set' id='x'><bind xmlns='%s'/></iq>\n", nsBind)
- var iq clientIQ
- if err = c.p.Decode(&iq); err != nil {
- return errors.New("unmarshal <iq>: " + err.Error())
- }
- if &iq.Bind == nil {
- return errors.New("<iq> result missing <bind>")
- }
- c.jid = iq.Bind.Jid // our local id
-
- // We're connected and can now receive and send messages.
- c.Status(Away, "")
- return nil
-}
-
-type Chat struct {
- Remote string
- Type string
- Text string
- Roster Roster
- Presence *Presence
-}
-
-type Roster []Contact
-
-type Contact struct {
- Remote string
- Name string
- Group []string
-}
-
-type Presence struct {
- Remote string
- Status Status
- StatusMsg string
- Priority int
-}
-
-func atoi(s string) int {
- if s == "" {
- return 0
- }
- n, err := strconv.Atoi(s)
- if err != nil {
- n = -1
- }
- return n
-}
-
-func statusCode(s string) Status {
- for i, ss := range statusName {
- if s == ss {
- return Status(i)
- }
- }
- return Available
-}
-
-// Recv wait next token of chat.
-func (c *Client) Recv() (chat Chat, err error) {
- for {
- _, val, err := next(c.p)
- if err != nil {
- return Chat{}, err
- }
- switch val := val.(type) {
- case *clientMessage:
- return Chat{Remote: val.From, Type: val.Type, Text: val.Body}, nil
- case *clientQuery:
- var r Roster
- for _, item := range val.Item {
- r = append(r, Contact{item.Jid, item.Name, item.Group})
- }
- return Chat{Type: "roster", Roster: r}, nil
- case *clientPresence:
- pr := &Presence{Remote: val.From, Status: statusCode(val.Show), StatusMsg: val.Status, Priority: atoi(val.Priority)}
- if val.Type == "unavailable" {
- pr.Status = Unavailable
- }
- return Chat{Remote: val.From, Type: "presence", Presence: pr}, nil
- default:
- //log.Printf("ignoring %T", val)
- }
- }
- panic("unreachable")
-}
-
-// Send sends message text.
-func (c *Client) Send(chat Chat) error {
- fmt.Fprintf(c.tls, "<message to='%s' from='%s' type='chat' xml:lang='en'>"+
- "<body>%s</body></message>",
- xmlEscape(chat.Remote), xmlEscape(c.jid),
- xmlEscape(chat.Text))
- return nil
-}
-
-// Roster asks for the chat roster.
-func (c *Client) Roster() error {
- fmt.Fprintf(c.tls, "<iq from='%s' type='get' id='roster1'><query xmlns='jabber:iq:roster'/></iq>\n", xmlEscape(c.jid))
- return nil
-}
-
-type Status int
-
-const (
- Unavailable Status = iota
- DoNotDisturb
- ExtendedAway
- Away
- Available
-)
-
-var statusName = []string{
- Unavailable: "unavailable",
- DoNotDisturb: "dnd",
- ExtendedAway: "xa",
- Away: "away",
- Available: "chat",
-}
-
-func (s Status) String() string {
- return statusName[s]
-}
-
-func (c *Client) Status(status Status, msg string) error {
- fmt.Fprintf(c.tls, "<presence xml:lang='en'><show>%s</show><status>%s</status></presence>", status, xmlEscape(msg))
- return nil
-}
-
-// RFC 3920 C.1 Streams name space
-
-type streamFeatures struct {
- XMLName xml.Name `xml:"http://etherx.jabber.org/streams features"`
- StartTLS tlsStartTLS
- Mechanisms saslMechanisms
- Bind bindBind
- Session bool
-}
-
-type streamError struct {
- XMLName xml.Name `xml:"http://etherx.jabber.org/streams error"`
- Any xml.Name
- Text string
-}
-
-// RFC 3920 C.3 TLS name space
-
-type tlsStartTLS struct {
- XMLName xml.Name `xml:":ietf:params:xml:ns:xmpp-tls starttls"`
- Required bool
-}
-
-type tlsProceed struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-tls proceed"`
-}
-
-type tlsFailure struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-tls failure"`
-}
-
-// RFC 3920 C.4 SASL name space
-
-type saslMechanisms struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl mechanisms"`
- Mechanism []string
-}
-
-type saslAuth struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl auth"`
- Mechanism string `xml:"attr"`
-}
-
-type saslChallenge string
-
-type saslResponse string
-
-type saslAbort struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl abort"`
-}
-
-type saslSuccess struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl success"`
-}
-
-type saslFailure struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl failure"`
- Any xml.Name
-}
-
-// RFC 3920 C.5 Resource binding name space
-
-type bindBind struct {
- XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"`
- Resource string
- Jid string
-}
-
-// RFC 3921 B.1 jabber:client
-
-type clientMessage struct {
- XMLName xml.Name `xml:"jabber:client message"`
- From string `xml:"attr"`
- Id string `xml:"attr"`
- To string `xml:"attr"`
- Type string `xml:"attr"` // chat, error, groupchat, headline, or normal
-
- // These should technically be []clientText,
- // but string is much more convenient.
- Subject string
- Body string
- Thread string
-}
-
-type clientText struct {
- Lang string `xml:"attr"`
- Body string `xml:"chardata"`
-}
-
-type clientPresence struct {
- XMLName xml.Name `xml:"jabber:client presence"`
- From string `xml:"attr"`
- Id string `xml:"attr"`
- To string `xml:"attr"`
- Type string `xml:"attr"` // error, probe, subscribe, subscribed, unavailable, unsubscribe, unsubscribed
- Lang string `xml:"attr"`
-
- Show string // away, chat, dnd, xa
- Status string // sb []clientText
- Priority string
- Error *clientError
-}
-
-type clientIQ struct { // info/query
- XMLName xml.Name `xml:"jabber:client iq"`
- From string `xml:"attr"`
- Id string `xml:"attr"`
- To string `xml:"attr"`
- Type string `xml:"attr"` // error, get, result, set
- Error clientError
- Bind bindBind
- Query clientQuery
-}
-
-type clientError struct {
- XMLName xml.Name `xml:"jabber:client error"`
- Code string `xml:"attr"`
- Type string `xml:"attr"`
- Any xml.Name
- Text string
-}
-
-type clientQuery struct {
- Item []rosterItem
-}
-
-type rosterItem struct {
- XMLName xml.Name `xml:"jabber:iq:roster item"`
- Jid string `xml:"attr"`
- Name string `xml:"attr"`
- Subscription string `xml:"attr"`
- Group []string
-}
-
-// Scan XML token stream to find next StartElement.
-func nextStart(p *xml.Decoder) (xml.StartElement, error) {
- for {
- t, err := p.Token()
- if err != nil {
- log.Fatal("token", err)
- }
- switch t := t.(type) {
- case xml.StartElement:
- return t, nil
- }
- }
- panic("unreachable")
-}
-
-// Scan XML token stream for next element and save into val.
-// If val == nil, allocate new element based on proto map.
-// Either way, return val.
-func next(p *xml.Decoder) (xml.Name, interface{}, error) {
- // Read start element to find out what type we want.
- se, err := nextStart(p)
- if err != nil {
- return xml.Name{}, nil, err
- }
-
- // Put it in an interface and allocate one.
- var nv interface{}
- switch se.Name.Space + " " + se.Name.Local {
- case nsStream + " features":
- nv = &streamFeatures{}
- case nsStream + " error":
- nv = &streamError{}
- case nsTLS + " starttls":
- nv = &tlsStartTLS{}
- case nsTLS + " proceed":
- nv = &tlsProceed{}
- case nsTLS + " failure":
- nv = &tlsFailure{}
- case nsSASL + " mechanisms":
- nv = &saslMechanisms{}
- case nsSASL + " challenge":
- nv = ""
- case nsSASL + " response":
- nv = ""
- case nsSASL + " abort":
- nv = &saslAbort{}
- case nsSASL + " success":
- nv = &saslSuccess{}
- case nsSASL + " failure":
- nv = &saslFailure{}
- case nsBind + " bind":
- nv = &bindBind{}
- case nsClient + " message":
- nv = &clientMessage{}
- case nsClient + " presence":
- nv = &clientPresence{}
- case nsClient + " iq":
- nv = &clientIQ{}
- case nsClient + " error":
- nv = &clientError{}
- default:
- return xml.Name{}, nil, errors.New("unexpected XMPP message " +
- se.Name.Space + " <" + se.Name.Local + "/>")
- }
-
- // Unmarshal into that storage.
- if err = p.DecodeElement(nv, &se); err != nil {
- return xml.Name{}, nil, err
- }
- return se.Name, nv, err
-}
-
-var xmlSpecial = map[byte]string{
- '<': "&lt;",
- '>': "&gt;",
- '"': "&quot;",
- '\'': "&apos;",
- '&': "&amp;",
-}
-
-func xmlEscape(s string) string {
- var b bytes.Buffer
- for i := 0; i < len(s); i++ {
- c := s[i]
- if s, ok := xmlSpecial[c]; ok {
- b.WriteString(s)
- } else {
- b.WriteByte(c)
- }
- }
- return b.String()
-}
-
-type tee struct {
- r io.Reader
- w io.Writer
-}
-
-func (t tee) Read(p []byte) (n int, err error) {
- n, err = t.r.Read(p)
- if n > 0 {
- t.w.Write(p[0:n])
- }
- return
-}
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml b/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml
deleted file mode 100644
index 5db258039..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-
-go:
- - 1.5
- - 1.6
- - tip
-
-script: make -f Makefile.TRAVIS
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS b/vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS
deleted file mode 100644
index 24f9649e2..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS
+++ /dev/null
@@ -1,15 +0,0 @@
-all: build cover test vet
-
-build:
- go build -v ./...
-
-cover: test
- $(MAKE) -C pbutil cover
-
-test: build
- go test -v ./...
-
-vet: build
- go vet -v ./...
-
-.PHONY: build cover test vet
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/README.md b/vendor/github.com/matttproud/golang_protobuf_extensions/README.md
deleted file mode 100644
index 751ee6967..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Overview
-This repository provides various Protocol Buffer extensions for the Go
-language (golang), namely support for record length-delimited message
-streaming.
-
-| Java | Go |
-| ------------------------------ | --------------------- |
-| MessageLite#parseDelimitedFrom | pbutil.ReadDelimited |
-| MessageLite#writeDelimitedTo | pbutil.WriteDelimited |
-
-Because [Code Review 9102043](https://codereview.appspot.com/9102043/) is
-destined to never be merged into mainline (i.e., never be promoted to formal
-[goprotobuf features](https://github.com/golang/protobuf)), this repository
-will live here in the wild.
-
-# Documentation
-We have [generated Go Doc documentation](http://godoc.org/github.com/matttproud/golang_protobuf_extensions/pbutil) here.
-
-# Testing
-[![Build Status](https://travis-ci.org/matttproud/golang_protobuf_extensions.png?branch=master)](https://travis-ci.org/matttproud/golang_protobuf_extensions)
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/ext/moved.go b/vendor/github.com/matttproud/golang_protobuf_extensions/ext/moved.go
deleted file mode 100644
index f31a0f049..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/ext/moved.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package ext moved to a new location: github.com/matttproud/golang_protobuf_extensions/pbutil.
-package ext
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbtest/deleted.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbtest/deleted.go
deleted file mode 100644
index 73efcb181..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbtest/deleted.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package pbtest is deleted for the time being, because upstream Protocol Buffer 3 may have rendered quick.Value-based blackbox generation impossible.
-package pbtest
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore
deleted file mode 100644
index e16fb946b..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-cover.dat
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile
deleted file mode 100644
index 81be21437..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-all:
-
-cover:
- go test -cover -v -coverprofile=cover.dat ./...
- go tool cover -func cover.dat
-
-.PHONY: cover
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go
deleted file mode 100644
index a793c8856..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2013 Matt T. Proud
-//
-// 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.
-
-package pbutil
-
-import (
- "bytes"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- . "github.com/matttproud/golang_protobuf_extensions/testdata"
-)
-
-func TestWriteDelimited(t *testing.T) {
- t.Parallel()
- for _, test := range []struct {
- msg proto.Message
- buf []byte
- n int
- err error
- }{
- {
- msg: &Empty{},
- n: 1,
- buf: []byte{0},
- },
- {
- msg: &GoEnum{Foo: FOO_FOO1.Enum()},
- n: 3,
- buf: []byte{2, 8, 1},
- },
- {
- msg: &Strings{
- StringField: proto.String(`This is my gigantic, unhappy string. It exceeds
-the encoding size of a single byte varint. We are using it to fuzz test the
-correctness of the header decoding mechanisms, which may prove problematic.
-I expect it may. Let's hope you enjoy testing as much as we do.`),
- },
- n: 271,
- buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109,
- 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104,
- 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73,
- 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101,
- 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102,
- 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32,
- 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32,
- 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122,
- 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114,
- 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32,
- 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103,
- 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104,
- 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112,
- 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120,
- 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101,
- 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110,
- 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32,
- 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46},
- },
- } {
- var buf bytes.Buffer
- if n, err := WriteDelimited(&buf, test.msg); n != test.n || err != test.err {
- t.Fatalf("WriteDelimited(buf, %#v) = %v, %v; want %v, %v", test.msg, n, err, test.n, test.err)
- }
- if out := buf.Bytes(); !bytes.Equal(out, test.buf) {
- t.Fatalf("WriteDelimited(buf, %#v); buf = %v; want %v", test.msg, out, test.buf)
- }
- }
-}
-
-func TestReadDelimited(t *testing.T) {
- t.Parallel()
- for _, test := range []struct {
- buf []byte
- msg proto.Message
- n int
- err error
- }{
- {
- buf: []byte{0},
- msg: &Empty{},
- n: 1,
- },
- {
- n: 3,
- buf: []byte{2, 8, 1},
- msg: &GoEnum{Foo: FOO_FOO1.Enum()},
- },
- {
- buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109,
- 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104,
- 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73,
- 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101,
- 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102,
- 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32,
- 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32,
- 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122,
- 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114,
- 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32,
- 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103,
- 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104,
- 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112,
- 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120,
- 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101,
- 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110,
- 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32,
- 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46},
- msg: &Strings{
- StringField: proto.String(`This is my gigantic, unhappy string. It exceeds
-the encoding size of a single byte varint. We are using it to fuzz test the
-correctness of the header decoding mechanisms, which may prove problematic.
-I expect it may. Let's hope you enjoy testing as much as we do.`),
- },
- n: 271,
- },
- } {
- msg := proto.Clone(test.msg)
- msg.Reset()
- if n, err := ReadDelimited(bytes.NewBuffer(test.buf), msg); n != test.n || err != test.err {
- t.Fatalf("ReadDelimited(%v, msg) = %v, %v; want %v, %v", test.buf, n, err, test.n, test.err)
- }
- if !proto.Equal(msg, test.msg) {
- t.Fatalf("ReadDelimited(%v, msg); msg = %v; want %v", test.buf, msg, test.msg)
- }
- }
-}
-
-func TestEndToEndValid(t *testing.T) {
- t.Parallel()
- for _, test := range [][]proto.Message{
- {&Empty{}},
- {&GoEnum{Foo: FOO_FOO1.Enum()}, &Empty{}, &GoEnum{Foo: FOO_FOO1.Enum()}},
- {&GoEnum{Foo: FOO_FOO1.Enum()}},
- {&Strings{
- StringField: proto.String(`This is my gigantic, unhappy string. It exceeds
-the encoding size of a single byte varint. We are using it to fuzz test the
-correctness of the header decoding mechanisms, which may prove problematic.
-I expect it may. Let's hope you enjoy testing as much as we do.`),
- }},
- } {
- var buf bytes.Buffer
- var written int
- for i, msg := range test {
- n, err := WriteDelimited(&buf, msg)
- if err != nil {
- // Assumption: TestReadDelimited and TestWriteDelimited are sufficient
- // and inputs for this test are explicitly exercised there.
- t.Fatalf("WriteDelimited(buf, %v[%d]) = ?, %v; wanted ?, nil", test, i, err)
- }
- written += n
- }
- var read int
- for i, msg := range test {
- out := proto.Clone(msg)
- out.Reset()
- n, _ := ReadDelimited(&buf, out)
- // Decide to do EOF checking?
- read += n
- if !proto.Equal(out, msg) {
- t.Fatalf("out = %v; want %v[%d] = %#v", out, test, i, msg)
- }
- }
- if read != written {
- t.Fatalf("%v read = %d; want %d", test, read, written)
- }
- }
-}
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go
deleted file mode 100644
index 364a7b799..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2016 Matt T. Proud
-//
-// 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.
-
-package pbutil
-
-import (
- "bytes"
- "io"
- "testing"
- "testing/iotest"
-)
-
-func TestReadDelimitedIllegalVarint(t *testing.T) {
- t.Parallel()
- var tests = []struct {
- in []byte
- n int
- err error
- }{
- {
- in: []byte{255, 255, 255, 255, 255},
- n: 5,
- err: errInvalidVarint,
- },
- {
- in: []byte{255, 255, 255, 255, 255, 255},
- n: 5,
- err: errInvalidVarint,
- },
- }
- for _, test := range tests {
- n, err := ReadDelimited(bytes.NewReader(test.in), nil)
- if got, want := n, test.n; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", test.in, got, want)
- }
- if got, want := err, test.err; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", test.in, got, want)
- }
- }
-}
-
-func TestReadDelimitedPrematureHeader(t *testing.T) {
- t.Parallel()
- var data = []byte{128, 5} // 256 + 256 + 128
- n, err := ReadDelimited(bytes.NewReader(data[0:1]), nil)
- if got, want := n, 1; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want)
- }
- if got, want := err, io.EOF; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want)
- }
-}
-
-func TestReadDelimitedPrematureBody(t *testing.T) {
- t.Parallel()
- var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128
- n, err := ReadDelimited(bytes.NewReader(data[:]), nil)
- if got, want := n, 5; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want)
- }
- if got, want := err, io.ErrUnexpectedEOF; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want)
- }
-}
-
-func TestReadDelimitedPrematureHeaderIncremental(t *testing.T) {
- t.Parallel()
- var data = []byte{128, 5} // 256 + 256 + 128
- n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[0:1])), nil)
- if got, want := n, 1; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want)
- }
- if got, want := err, io.EOF; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want)
- }
-}
-
-func TestReadDelimitedPrematureBodyIncremental(t *testing.T) {
- t.Parallel()
- var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128
- n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[:])), nil)
- if got, want := n, 5; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want)
- }
- if got, want := err, io.ErrUnexpectedEOF; got != want {
- t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want)
- }
-}
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go
deleted file mode 100644
index f92632b0b..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2016 Matt T. Proud
-//
-// 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.
-
-package pbutil
-
-import (
- "bytes"
- "errors"
- "testing"
-
- "github.com/golang/protobuf/proto"
-)
-
-var errMarshal = errors.New("pbutil: can't marshal")
-
-type cantMarshal struct{ proto.Message }
-
-func (cantMarshal) Marshal() ([]byte, error) { return nil, errMarshal }
-
-var _ proto.Message = cantMarshal{}
-
-func TestWriteDelimitedMarshalErr(t *testing.T) {
- t.Parallel()
- var data cantMarshal
- var buf bytes.Buffer
- n, err := WriteDelimited(&buf, data)
- if got, want := n, 0; got != want {
- t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want)
- }
- if got, want := err, errMarshal; got != want {
- t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want)
- }
-}
-
-type canMarshal struct{ proto.Message }
-
-func (canMarshal) Marshal() ([]byte, error) { return []byte{0, 1, 2, 3, 4, 5}, nil }
-
-var errWrite = errors.New("pbutil: can't write")
-
-type cantWrite struct{}
-
-func (cantWrite) Write([]byte) (int, error) { return 0, errWrite }
-
-func TestWriteDelimitedWriteErr(t *testing.T) {
- t.Parallel()
- var data canMarshal
- var buf cantWrite
- n, err := WriteDelimited(buf, data)
- if got, want := n, 0; got != want {
- t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want)
- }
- if got, want := err, errWrite; got != want {
- t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want)
- }
-}
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/README.THIRD_PARTY b/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/README.THIRD_PARTY
deleted file mode 100644
index 0c1f84246..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/README.THIRD_PARTY
+++ /dev/null
@@ -1,4 +0,0 @@
-test.pb.go and test.proto are third-party data.
-
-SOURCE: https://github.com/golang/protobuf
-REVISION: bf531ff1a004f24ee53329dfd5ce0b41bfdc17df
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.pb.go b/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.pb.go
deleted file mode 100644
index 772adcb62..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.pb.go
+++ /dev/null
@@ -1,4029 +0,0 @@
-// Code generated by protoc-gen-go.
-// source: test.proto
-// DO NOT EDIT!
-
-/*
-Package testdata is a generated protocol buffer package.
-
-It is generated from these files:
- test.proto
-
-It has these top-level messages:
- GoEnum
- GoTestField
- GoTest
- GoSkipTest
- NonPackedTest
- PackedTest
- MaxTag
- OldMessage
- NewMessage
- InnerMessage
- OtherMessage
- RequiredInnerMessage
- MyMessage
- Ext
- ComplexExtension
- DefaultsMessage
- MyMessageSet
- Empty
- MessageList
- Strings
- Defaults
- SubDefaults
- RepeatedEnum
- MoreRepeated
- GroupOld
- GroupNew
- FloatingPoint
- MessageWithMap
- Oneof
- Communique
-*/
-package testdata
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-const _ = proto.ProtoPackageIsVersion1
-
-type FOO int32
-
-const (
- FOO_FOO1 FOO = 1
-)
-
-var FOO_name = map[int32]string{
- 1: "FOO1",
-}
-var FOO_value = map[string]int32{
- "FOO1": 1,
-}
-
-func (x FOO) Enum() *FOO {
- p := new(FOO)
- *p = x
- return p
-}
-func (x FOO) String() string {
- return proto.EnumName(FOO_name, int32(x))
-}
-func (x *FOO) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
- if err != nil {
- return err
- }
- *x = FOO(value)
- return nil
-}
-func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-// An enum, for completeness.
-type GoTest_KIND int32
-
-const (
- GoTest_VOID GoTest_KIND = 0
- // Basic types
- GoTest_BOOL GoTest_KIND = 1
- GoTest_BYTES GoTest_KIND = 2
- GoTest_FINGERPRINT GoTest_KIND = 3
- GoTest_FLOAT GoTest_KIND = 4
- GoTest_INT GoTest_KIND = 5
- GoTest_STRING GoTest_KIND = 6
- GoTest_TIME GoTest_KIND = 7
- // Groupings
- GoTest_TUPLE GoTest_KIND = 8
- GoTest_ARRAY GoTest_KIND = 9
- GoTest_MAP GoTest_KIND = 10
- // Table types
- GoTest_TABLE GoTest_KIND = 11
- // Functions
- GoTest_FUNCTION GoTest_KIND = 12
-)
-
-var GoTest_KIND_name = map[int32]string{
- 0: "VOID",
- 1: "BOOL",
- 2: "BYTES",
- 3: "FINGERPRINT",
- 4: "FLOAT",
- 5: "INT",
- 6: "STRING",
- 7: "TIME",
- 8: "TUPLE",
- 9: "ARRAY",
- 10: "MAP",
- 11: "TABLE",
- 12: "FUNCTION",
-}
-var GoTest_KIND_value = map[string]int32{
- "VOID": 0,
- "BOOL": 1,
- "BYTES": 2,
- "FINGERPRINT": 3,
- "FLOAT": 4,
- "INT": 5,
- "STRING": 6,
- "TIME": 7,
- "TUPLE": 8,
- "ARRAY": 9,
- "MAP": 10,
- "TABLE": 11,
- "FUNCTION": 12,
-}
-
-func (x GoTest_KIND) Enum() *GoTest_KIND {
- p := new(GoTest_KIND)
- *p = x
- return p
-}
-func (x GoTest_KIND) String() string {
- return proto.EnumName(GoTest_KIND_name, int32(x))
-}
-func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
- if err != nil {
- return err
- }
- *x = GoTest_KIND(value)
- return nil
-}
-func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-type MyMessage_Color int32
-
-const (
- MyMessage_RED MyMessage_Color = 0
- MyMessage_GREEN MyMessage_Color = 1
- MyMessage_BLUE MyMessage_Color = 2
-)
-
-var MyMessage_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var MyMessage_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x MyMessage_Color) Enum() *MyMessage_Color {
- p := new(MyMessage_Color)
- *p = x
- return p
-}
-func (x MyMessage_Color) String() string {
- return proto.EnumName(MyMessage_Color_name, int32(x))
-}
-func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
- if err != nil {
- return err
- }
- *x = MyMessage_Color(value)
- return nil
-}
-func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} }
-
-type DefaultsMessage_DefaultsEnum int32
-
-const (
- DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0
- DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1
- DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2
-)
-
-var DefaultsMessage_DefaultsEnum_name = map[int32]string{
- 0: "ZERO",
- 1: "ONE",
- 2: "TWO",
-}
-var DefaultsMessage_DefaultsEnum_value = map[string]int32{
- "ZERO": 0,
- "ONE": 1,
- "TWO": 2,
-}
-
-func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum {
- p := new(DefaultsMessage_DefaultsEnum)
- *p = x
- return p
-}
-func (x DefaultsMessage_DefaultsEnum) String() string {
- return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x))
-}
-func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum")
- if err != nil {
- return err
- }
- *x = DefaultsMessage_DefaultsEnum(value)
- return nil
-}
-func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{15, 0}
-}
-
-type Defaults_Color int32
-
-const (
- Defaults_RED Defaults_Color = 0
- Defaults_GREEN Defaults_Color = 1
- Defaults_BLUE Defaults_Color = 2
-)
-
-var Defaults_Color_name = map[int32]string{
- 0: "RED",
- 1: "GREEN",
- 2: "BLUE",
-}
-var Defaults_Color_value = map[string]int32{
- "RED": 0,
- "GREEN": 1,
- "BLUE": 2,
-}
-
-func (x Defaults_Color) Enum() *Defaults_Color {
- p := new(Defaults_Color)
- *p = x
- return p
-}
-func (x Defaults_Color) String() string {
- return proto.EnumName(Defaults_Color_name, int32(x))
-}
-func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
- if err != nil {
- return err
- }
- *x = Defaults_Color(value)
- return nil
-}
-func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{20, 0} }
-
-type RepeatedEnum_Color int32
-
-const (
- RepeatedEnum_RED RepeatedEnum_Color = 1
-)
-
-var RepeatedEnum_Color_name = map[int32]string{
- 1: "RED",
-}
-var RepeatedEnum_Color_value = map[string]int32{
- "RED": 1,
-}
-
-func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
- p := new(RepeatedEnum_Color)
- *p = x
- return p
-}
-func (x RepeatedEnum_Color) String() string {
- return proto.EnumName(RepeatedEnum_Color_name, int32(x))
-}
-func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
- if err != nil {
- return err
- }
- *x = RepeatedEnum_Color(value)
- return nil
-}
-func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{22, 0} }
-
-type GoEnum struct {
- Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoEnum) Reset() { *m = GoEnum{} }
-func (m *GoEnum) String() string { return proto.CompactTextString(m) }
-func (*GoEnum) ProtoMessage() {}
-func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *GoEnum) GetFoo() FOO {
- if m != nil && m.Foo != nil {
- return *m.Foo
- }
- return FOO_FOO1
-}
-
-type GoTestField struct {
- Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"`
- Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTestField) Reset() { *m = GoTestField{} }
-func (m *GoTestField) String() string { return proto.CompactTextString(m) }
-func (*GoTestField) ProtoMessage() {}
-func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *GoTestField) GetLabel() string {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return ""
-}
-
-func (m *GoTestField) GetType() string {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return ""
-}
-
-type GoTest struct {
- // Some typical parameters
- Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
- Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"`
- Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"`
- // Required, repeated and optional foreign fields.
- RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"`
- RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"`
- OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"`
- // Required fields of all basic types
- F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"`
- F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"`
- F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"`
- F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"`
- F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"`
- F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"`
- F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"`
- F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"`
- F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"`
- F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"`
- F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"`
- F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"`
- F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"`
- // Repeated fields of all basic types
- F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"`
- F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"`
- F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"`
- F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"`
- F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"`
- F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"`
- F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"`
- F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"`
- F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"`
- F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"`
- F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"`
- F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"`
- F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"`
- // Optional fields of all basic types
- F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"`
- F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"`
- F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"`
- F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"`
- F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"`
- F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"`
- F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"`
- F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"`
- F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"`
- F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"`
- F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"`
- F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"`
- F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"`
- // Default-valued fields of all basic types
- F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"`
- F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
- F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
- F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
- F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
- F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
- F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
- F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"`
- F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"`
- F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
- F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
- F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
- F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
- // Packed repeated fields (no string or bytes).
- F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"`
- F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"`
- F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"`
- F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"`
- F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"`
- F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"`
- F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"`
- F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"`
- F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"`
- F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"`
- F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"`
- Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"`
- Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"`
- Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest) Reset() { *m = GoTest{} }
-func (m *GoTest) String() string { return proto.CompactTextString(m) }
-func (*GoTest) ProtoMessage() {}
-func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-const Default_GoTest_F_BoolDefaulted bool = true
-const Default_GoTest_F_Int32Defaulted int32 = 32
-const Default_GoTest_F_Int64Defaulted int64 = 64
-const Default_GoTest_F_Fixed32Defaulted uint32 = 320
-const Default_GoTest_F_Fixed64Defaulted uint64 = 640
-const Default_GoTest_F_Uint32Defaulted uint32 = 3200
-const Default_GoTest_F_Uint64Defaulted uint64 = 6400
-const Default_GoTest_F_FloatDefaulted float32 = 314159
-const Default_GoTest_F_DoubleDefaulted float64 = 271828
-const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
-
-var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
-
-const Default_GoTest_F_Sint32Defaulted int32 = -32
-const Default_GoTest_F_Sint64Defaulted int64 = -64
-
-func (m *GoTest) GetKind() GoTest_KIND {
- if m != nil && m.Kind != nil {
- return *m.Kind
- }
- return GoTest_VOID
-}
-
-func (m *GoTest) GetTable() string {
- if m != nil && m.Table != nil {
- return *m.Table
- }
- return ""
-}
-
-func (m *GoTest) GetParam() int32 {
- if m != nil && m.Param != nil {
- return *m.Param
- }
- return 0
-}
-
-func (m *GoTest) GetRequiredField() *GoTestField {
- if m != nil {
- return m.RequiredField
- }
- return nil
-}
-
-func (m *GoTest) GetRepeatedField() []*GoTestField {
- if m != nil {
- return m.RepeatedField
- }
- return nil
-}
-
-func (m *GoTest) GetOptionalField() *GoTestField {
- if m != nil {
- return m.OptionalField
- }
- return nil
-}
-
-func (m *GoTest) GetF_BoolRequired() bool {
- if m != nil && m.F_BoolRequired != nil {
- return *m.F_BoolRequired
- }
- return false
-}
-
-func (m *GoTest) GetF_Int32Required() int32 {
- if m != nil && m.F_Int32Required != nil {
- return *m.F_Int32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Int64Required() int64 {
- if m != nil && m.F_Int64Required != nil {
- return *m.F_Int64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed32Required() uint32 {
- if m != nil && m.F_Fixed32Required != nil {
- return *m.F_Fixed32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed64Required() uint64 {
- if m != nil && m.F_Fixed64Required != nil {
- return *m.F_Fixed64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint32Required() uint32 {
- if m != nil && m.F_Uint32Required != nil {
- return *m.F_Uint32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint64Required() uint64 {
- if m != nil && m.F_Uint64Required != nil {
- return *m.F_Uint64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_FloatRequired() float32 {
- if m != nil && m.F_FloatRequired != nil {
- return *m.F_FloatRequired
- }
- return 0
-}
-
-func (m *GoTest) GetF_DoubleRequired() float64 {
- if m != nil && m.F_DoubleRequired != nil {
- return *m.F_DoubleRequired
- }
- return 0
-}
-
-func (m *GoTest) GetF_StringRequired() string {
- if m != nil && m.F_StringRequired != nil {
- return *m.F_StringRequired
- }
- return ""
-}
-
-func (m *GoTest) GetF_BytesRequired() []byte {
- if m != nil {
- return m.F_BytesRequired
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Required() int32 {
- if m != nil && m.F_Sint32Required != nil {
- return *m.F_Sint32Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_Sint64Required() int64 {
- if m != nil && m.F_Sint64Required != nil {
- return *m.F_Sint64Required
- }
- return 0
-}
-
-func (m *GoTest) GetF_BoolRepeated() []bool {
- if m != nil {
- return m.F_BoolRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int32Repeated() []int32 {
- if m != nil {
- return m.F_Int32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int64Repeated() []int64 {
- if m != nil {
- return m.F_Int64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed32Repeated() []uint32 {
- if m != nil {
- return m.F_Fixed32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed64Repeated() []uint64 {
- if m != nil {
- return m.F_Fixed64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint32Repeated() []uint32 {
- if m != nil {
- return m.F_Uint32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint64Repeated() []uint64 {
- if m != nil {
- return m.F_Uint64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_FloatRepeated() []float32 {
- if m != nil {
- return m.F_FloatRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_DoubleRepeated() []float64 {
- if m != nil {
- return m.F_DoubleRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_StringRepeated() []string {
- if m != nil {
- return m.F_StringRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_BytesRepeated() [][]byte {
- if m != nil {
- return m.F_BytesRepeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Repeated() []int32 {
- if m != nil {
- return m.F_Sint32Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint64Repeated() []int64 {
- if m != nil {
- return m.F_Sint64Repeated
- }
- return nil
-}
-
-func (m *GoTest) GetF_BoolOptional() bool {
- if m != nil && m.F_BoolOptional != nil {
- return *m.F_BoolOptional
- }
- return false
-}
-
-func (m *GoTest) GetF_Int32Optional() int32 {
- if m != nil && m.F_Int32Optional != nil {
- return *m.F_Int32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Int64Optional() int64 {
- if m != nil && m.F_Int64Optional != nil {
- return *m.F_Int64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed32Optional() uint32 {
- if m != nil && m.F_Fixed32Optional != nil {
- return *m.F_Fixed32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Fixed64Optional() uint64 {
- if m != nil && m.F_Fixed64Optional != nil {
- return *m.F_Fixed64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint32Optional() uint32 {
- if m != nil && m.F_Uint32Optional != nil {
- return *m.F_Uint32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Uint64Optional() uint64 {
- if m != nil && m.F_Uint64Optional != nil {
- return *m.F_Uint64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_FloatOptional() float32 {
- if m != nil && m.F_FloatOptional != nil {
- return *m.F_FloatOptional
- }
- return 0
-}
-
-func (m *GoTest) GetF_DoubleOptional() float64 {
- if m != nil && m.F_DoubleOptional != nil {
- return *m.F_DoubleOptional
- }
- return 0
-}
-
-func (m *GoTest) GetF_StringOptional() string {
- if m != nil && m.F_StringOptional != nil {
- return *m.F_StringOptional
- }
- return ""
-}
-
-func (m *GoTest) GetF_BytesOptional() []byte {
- if m != nil {
- return m.F_BytesOptional
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32Optional() int32 {
- if m != nil && m.F_Sint32Optional != nil {
- return *m.F_Sint32Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_Sint64Optional() int64 {
- if m != nil && m.F_Sint64Optional != nil {
- return *m.F_Sint64Optional
- }
- return 0
-}
-
-func (m *GoTest) GetF_BoolDefaulted() bool {
- if m != nil && m.F_BoolDefaulted != nil {
- return *m.F_BoolDefaulted
- }
- return Default_GoTest_F_BoolDefaulted
-}
-
-func (m *GoTest) GetF_Int32Defaulted() int32 {
- if m != nil && m.F_Int32Defaulted != nil {
- return *m.F_Int32Defaulted
- }
- return Default_GoTest_F_Int32Defaulted
-}
-
-func (m *GoTest) GetF_Int64Defaulted() int64 {
- if m != nil && m.F_Int64Defaulted != nil {
- return *m.F_Int64Defaulted
- }
- return Default_GoTest_F_Int64Defaulted
-}
-
-func (m *GoTest) GetF_Fixed32Defaulted() uint32 {
- if m != nil && m.F_Fixed32Defaulted != nil {
- return *m.F_Fixed32Defaulted
- }
- return Default_GoTest_F_Fixed32Defaulted
-}
-
-func (m *GoTest) GetF_Fixed64Defaulted() uint64 {
- if m != nil && m.F_Fixed64Defaulted != nil {
- return *m.F_Fixed64Defaulted
- }
- return Default_GoTest_F_Fixed64Defaulted
-}
-
-func (m *GoTest) GetF_Uint32Defaulted() uint32 {
- if m != nil && m.F_Uint32Defaulted != nil {
- return *m.F_Uint32Defaulted
- }
- return Default_GoTest_F_Uint32Defaulted
-}
-
-func (m *GoTest) GetF_Uint64Defaulted() uint64 {
- if m != nil && m.F_Uint64Defaulted != nil {
- return *m.F_Uint64Defaulted
- }
- return Default_GoTest_F_Uint64Defaulted
-}
-
-func (m *GoTest) GetF_FloatDefaulted() float32 {
- if m != nil && m.F_FloatDefaulted != nil {
- return *m.F_FloatDefaulted
- }
- return Default_GoTest_F_FloatDefaulted
-}
-
-func (m *GoTest) GetF_DoubleDefaulted() float64 {
- if m != nil && m.F_DoubleDefaulted != nil {
- return *m.F_DoubleDefaulted
- }
- return Default_GoTest_F_DoubleDefaulted
-}
-
-func (m *GoTest) GetF_StringDefaulted() string {
- if m != nil && m.F_StringDefaulted != nil {
- return *m.F_StringDefaulted
- }
- return Default_GoTest_F_StringDefaulted
-}
-
-func (m *GoTest) GetF_BytesDefaulted() []byte {
- if m != nil && m.F_BytesDefaulted != nil {
- return m.F_BytesDefaulted
- }
- return append([]byte(nil), Default_GoTest_F_BytesDefaulted...)
-}
-
-func (m *GoTest) GetF_Sint32Defaulted() int32 {
- if m != nil && m.F_Sint32Defaulted != nil {
- return *m.F_Sint32Defaulted
- }
- return Default_GoTest_F_Sint32Defaulted
-}
-
-func (m *GoTest) GetF_Sint64Defaulted() int64 {
- if m != nil && m.F_Sint64Defaulted != nil {
- return *m.F_Sint64Defaulted
- }
- return Default_GoTest_F_Sint64Defaulted
-}
-
-func (m *GoTest) GetF_BoolRepeatedPacked() []bool {
- if m != nil {
- return m.F_BoolRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int32RepeatedPacked() []int32 {
- if m != nil {
- return m.F_Int32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Int64RepeatedPacked() []int64 {
- if m != nil {
- return m.F_Int64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 {
- if m != nil {
- return m.F_Fixed32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 {
- if m != nil {
- return m.F_Fixed64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 {
- if m != nil {
- return m.F_Uint32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 {
- if m != nil {
- return m.F_Uint64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_FloatRepeatedPacked() []float32 {
- if m != nil {
- return m.F_FloatRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 {
- if m != nil {
- return m.F_DoubleRepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 {
- if m != nil {
- return m.F_Sint32RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 {
- if m != nil {
- return m.F_Sint64RepeatedPacked
- }
- return nil
-}
-
-func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup {
- if m != nil {
- return m.Requiredgroup
- }
- return nil
-}
-
-func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup {
- if m != nil {
- return m.Repeatedgroup
- }
- return nil
-}
-
-func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
- }
- return nil
-}
-
-// Required, repeated, and optional groups.
-type GoTest_RequiredGroup struct {
- RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} }
-func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_RequiredGroup) ProtoMessage() {}
-func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
-
-func (m *GoTest_RequiredGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-type GoTest_RepeatedGroup struct {
- RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} }
-func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_RepeatedGroup) ProtoMessage() {}
-func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} }
-
-func (m *GoTest_RepeatedGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-type GoTest_OptionalGroup struct {
- RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} }
-func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) }
-func (*GoTest_OptionalGroup) ProtoMessage() {}
-func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} }
-
-func (m *GoTest_OptionalGroup) GetRequiredField() string {
- if m != nil && m.RequiredField != nil {
- return *m.RequiredField
- }
- return ""
-}
-
-// For testing skipping of unrecognized fields.
-// Numbers are all big, larger than tag numbers in GoTestField,
-// the message used in the corresponding test.
-type GoSkipTest struct {
- SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"`
- SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"`
- SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"`
- SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"`
- Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoSkipTest) Reset() { *m = GoSkipTest{} }
-func (m *GoSkipTest) String() string { return proto.CompactTextString(m) }
-func (*GoSkipTest) ProtoMessage() {}
-func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-func (m *GoSkipTest) GetSkipInt32() int32 {
- if m != nil && m.SkipInt32 != nil {
- return *m.SkipInt32
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipFixed32() uint32 {
- if m != nil && m.SkipFixed32 != nil {
- return *m.SkipFixed32
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipFixed64() uint64 {
- if m != nil && m.SkipFixed64 != nil {
- return *m.SkipFixed64
- }
- return 0
-}
-
-func (m *GoSkipTest) GetSkipString() string {
- if m != nil && m.SkipString != nil {
- return *m.SkipString
- }
- return ""
-}
-
-func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup {
- if m != nil {
- return m.Skipgroup
- }
- return nil
-}
-
-type GoSkipTest_SkipGroup struct {
- GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"`
- GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} }
-func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) }
-func (*GoSkipTest_SkipGroup) ProtoMessage() {}
-func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
-
-func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 {
- if m != nil && m.GroupInt32 != nil {
- return *m.GroupInt32
- }
- return 0
-}
-
-func (m *GoSkipTest_SkipGroup) GetGroupString() string {
- if m != nil && m.GroupString != nil {
- return *m.GroupString
- }
- return ""
-}
-
-// For testing packed/non-packed decoder switching.
-// A serialized instance of one should be deserializable as the other.
-type NonPackedTest struct {
- A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NonPackedTest) Reset() { *m = NonPackedTest{} }
-func (m *NonPackedTest) String() string { return proto.CompactTextString(m) }
-func (*NonPackedTest) ProtoMessage() {}
-func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *NonPackedTest) GetA() []int32 {
- if m != nil {
- return m.A
- }
- return nil
-}
-
-type PackedTest struct {
- B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *PackedTest) Reset() { *m = PackedTest{} }
-func (m *PackedTest) String() string { return proto.CompactTextString(m) }
-func (*PackedTest) ProtoMessage() {}
-func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-
-func (m *PackedTest) GetB() []int32 {
- if m != nil {
- return m.B
- }
- return nil
-}
-
-type MaxTag struct {
- // Maximum possible tag number.
- LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MaxTag) Reset() { *m = MaxTag{} }
-func (m *MaxTag) String() string { return proto.CompactTextString(m) }
-func (*MaxTag) ProtoMessage() {}
-func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-
-func (m *MaxTag) GetLastField() string {
- if m != nil && m.LastField != nil {
- return *m.LastField
- }
- return ""
-}
-
-type OldMessage struct {
- Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
- Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldMessage) Reset() { *m = OldMessage{} }
-func (m *OldMessage) String() string { return proto.CompactTextString(m) }
-func (*OldMessage) ProtoMessage() {}
-func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-
-func (m *OldMessage) GetNested() *OldMessage_Nested {
- if m != nil {
- return m.Nested
- }
- return nil
-}
-
-func (m *OldMessage) GetNum() int32 {
- if m != nil && m.Num != nil {
- return *m.Num
- }
- return 0
-}
-
-type OldMessage_Nested struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} }
-func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) }
-func (*OldMessage_Nested) ProtoMessage() {}
-func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 0} }
-
-func (m *OldMessage_Nested) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-// NewMessage is wire compatible with OldMessage;
-// imagine it as a future version.
-type NewMessage struct {
- Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
- // This is an int32 in OldMessage.
- Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NewMessage) Reset() { *m = NewMessage{} }
-func (m *NewMessage) String() string { return proto.CompactTextString(m) }
-func (*NewMessage) ProtoMessage() {}
-func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-
-func (m *NewMessage) GetNested() *NewMessage_Nested {
- if m != nil {
- return m.Nested
- }
- return nil
-}
-
-func (m *NewMessage) GetNum() int64 {
- if m != nil && m.Num != nil {
- return *m.Num
- }
- return 0
-}
-
-type NewMessage_Nested struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} }
-func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) }
-func (*NewMessage_Nested) ProtoMessage() {}
-func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} }
-
-func (m *NewMessage_Nested) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *NewMessage_Nested) GetFoodGroup() string {
- if m != nil && m.FoodGroup != nil {
- return *m.FoodGroup
- }
- return ""
-}
-
-type InnerMessage struct {
- Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
- Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
- Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *InnerMessage) Reset() { *m = InnerMessage{} }
-func (m *InnerMessage) String() string { return proto.CompactTextString(m) }
-func (*InnerMessage) ProtoMessage() {}
-func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
-
-const Default_InnerMessage_Port int32 = 4000
-
-func (m *InnerMessage) GetHost() string {
- if m != nil && m.Host != nil {
- return *m.Host
- }
- return ""
-}
-
-func (m *InnerMessage) GetPort() int32 {
- if m != nil && m.Port != nil {
- return *m.Port
- }
- return Default_InnerMessage_Port
-}
-
-func (m *InnerMessage) GetConnected() bool {
- if m != nil && m.Connected != nil {
- return *m.Connected
- }
- return false
-}
-
-type OtherMessage struct {
- Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
- Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
- Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
- Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
- XXX_extensions map[int32]proto.Extension `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OtherMessage) Reset() { *m = OtherMessage{} }
-func (m *OtherMessage) String() string { return proto.CompactTextString(m) }
-func (*OtherMessage) ProtoMessage() {}
-func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
-
-var extRange_OtherMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OtherMessage
-}
-func (m *OtherMessage) ExtensionMap() map[int32]proto.Extension {
- if m.XXX_extensions == nil {
- m.XXX_extensions = make(map[int32]proto.Extension)
- }
- return m.XXX_extensions
-}
-
-func (m *OtherMessage) GetKey() int64 {
- if m != nil && m.Key != nil {
- return *m.Key
- }
- return 0
-}
-
-func (m *OtherMessage) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *OtherMessage) GetWeight() float32 {
- if m != nil && m.Weight != nil {
- return *m.Weight
- }
- return 0
-}
-
-func (m *OtherMessage) GetInner() *InnerMessage {
- if m != nil {
- return m.Inner
- }
- return nil
-}
-
-type RequiredInnerMessage struct {
- LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} }
-func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) }
-func (*RequiredInnerMessage) ProtoMessage() {}
-func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
-
-func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage {
- if m != nil {
- return m.LeoFinallyWonAnOscar
- }
- return nil
-}
-
-type MyMessage struct {
- Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
- Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
- Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
- Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
- Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
- Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
- WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"`
- RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"`
- Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
- Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"`
- // This field becomes [][]byte in the generated code.
- RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"`
- Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"`
- XXX_extensions map[int32]proto.Extension `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessage) Reset() { *m = MyMessage{} }
-func (m *MyMessage) String() string { return proto.CompactTextString(m) }
-func (*MyMessage) ProtoMessage() {}
-func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
-
-var extRange_MyMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MyMessage
-}
-func (m *MyMessage) ExtensionMap() map[int32]proto.Extension {
- if m.XXX_extensions == nil {
- m.XXX_extensions = make(map[int32]proto.Extension)
- }
- return m.XXX_extensions
-}
-
-func (m *MyMessage) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-func (m *MyMessage) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MyMessage) GetQuote() string {
- if m != nil && m.Quote != nil {
- return *m.Quote
- }
- return ""
-}
-
-func (m *MyMessage) GetPet() []string {
- if m != nil {
- return m.Pet
- }
- return nil
-}
-
-func (m *MyMessage) GetInner() *InnerMessage {
- if m != nil {
- return m.Inner
- }
- return nil
-}
-
-func (m *MyMessage) GetOthers() []*OtherMessage {
- if m != nil {
- return m.Others
- }
- return nil
-}
-
-func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage {
- if m != nil {
- return m.WeMustGoDeeper
- }
- return nil
-}
-
-func (m *MyMessage) GetRepInner() []*InnerMessage {
- if m != nil {
- return m.RepInner
- }
- return nil
-}
-
-func (m *MyMessage) GetBikeshed() MyMessage_Color {
- if m != nil && m.Bikeshed != nil {
- return *m.Bikeshed
- }
- return MyMessage_RED
-}
-
-func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup {
- if m != nil {
- return m.Somegroup
- }
- return nil
-}
-
-func (m *MyMessage) GetRepBytes() [][]byte {
- if m != nil {
- return m.RepBytes
- }
- return nil
-}
-
-func (m *MyMessage) GetBigfloat() float64 {
- if m != nil && m.Bigfloat != nil {
- return *m.Bigfloat
- }
- return 0
-}
-
-type MyMessage_SomeGroup struct {
- GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} }
-func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) }
-func (*MyMessage_SomeGroup) ProtoMessage() {}
-func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} }
-
-func (m *MyMessage_SomeGroup) GetGroupField() int32 {
- if m != nil && m.GroupField != nil {
- return *m.GroupField
- }
- return 0
-}
-
-type Ext struct {
- Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Ext) Reset() { *m = Ext{} }
-func (m *Ext) String() string { return proto.CompactTextString(m) }
-func (*Ext) ProtoMessage() {}
-func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
-
-func (m *Ext) GetData() string {
- if m != nil && m.Data != nil {
- return *m.Data
- }
- return ""
-}
-
-var E_Ext_More = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*Ext)(nil),
- Field: 103,
- Name: "testdata.Ext.more",
- Tag: "bytes,103,opt,name=more",
-}
-
-var E_Ext_Text = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 104,
- Name: "testdata.Ext.text",
- Tag: "bytes,104,opt,name=text",
-}
-
-var E_Ext_Number = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 105,
- Name: "testdata.Ext.number",
- Tag: "varint,105,opt,name=number",
-}
-
-type ComplexExtension struct {
- First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"`
- Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"`
- Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ComplexExtension) Reset() { *m = ComplexExtension{} }
-func (m *ComplexExtension) String() string { return proto.CompactTextString(m) }
-func (*ComplexExtension) ProtoMessage() {}
-func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
-
-func (m *ComplexExtension) GetFirst() int32 {
- if m != nil && m.First != nil {
- return *m.First
- }
- return 0
-}
-
-func (m *ComplexExtension) GetSecond() int32 {
- if m != nil && m.Second != nil {
- return *m.Second
- }
- return 0
-}
-
-func (m *ComplexExtension) GetThird() []int32 {
- if m != nil {
- return m.Third
- }
- return nil
-}
-
-type DefaultsMessage struct {
- XXX_extensions map[int32]proto.Extension `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} }
-func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) }
-func (*DefaultsMessage) ProtoMessage() {}
-func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
-
-var extRange_DefaultsMessage = []proto.ExtensionRange{
- {100, 536870911},
-}
-
-func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_DefaultsMessage
-}
-func (m *DefaultsMessage) ExtensionMap() map[int32]proto.Extension {
- if m.XXX_extensions == nil {
- m.XXX_extensions = make(map[int32]proto.Extension)
- }
- return m.XXX_extensions
-}
-
-type MyMessageSet struct {
- XXX_extensions map[int32]proto.Extension `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MyMessageSet) Reset() { *m = MyMessageSet{} }
-func (m *MyMessageSet) String() string { return proto.CompactTextString(m) }
-func (*MyMessageSet) ProtoMessage() {}
-func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
-
-func (m *MyMessageSet) Marshal() ([]byte, error) {
- return proto.MarshalMessageSet(m.ExtensionMap())
-}
-func (m *MyMessageSet) Unmarshal(buf []byte) error {
- return proto.UnmarshalMessageSet(buf, m.ExtensionMap())
-}
-func (m *MyMessageSet) MarshalJSON() ([]byte, error) {
- return proto.MarshalMessageSetJSON(m.XXX_extensions)
-}
-func (m *MyMessageSet) UnmarshalJSON(buf []byte) error {
- return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions)
-}
-
-// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler
-var _ proto.Marshaler = (*MyMessageSet)(nil)
-var _ proto.Unmarshaler = (*MyMessageSet)(nil)
-
-var extRange_MyMessageSet = []proto.ExtensionRange{
- {100, 2147483646},
-}
-
-func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MyMessageSet
-}
-func (m *MyMessageSet) ExtensionMap() map[int32]proto.Extension {
- if m.XXX_extensions == nil {
- m.XXX_extensions = make(map[int32]proto.Extension)
- }
- return m.XXX_extensions
-}
-
-type Empty struct {
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Empty) Reset() { *m = Empty{} }
-func (m *Empty) String() string { return proto.CompactTextString(m) }
-func (*Empty) ProtoMessage() {}
-func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
-
-type MessageList struct {
- Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageList) Reset() { *m = MessageList{} }
-func (m *MessageList) String() string { return proto.CompactTextString(m) }
-func (*MessageList) ProtoMessage() {}
-func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
-
-func (m *MessageList) GetMessage() []*MessageList_Message {
- if m != nil {
- return m.Message
- }
- return nil
-}
-
-type MessageList_Message struct {
- Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
- Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageList_Message) Reset() { *m = MessageList_Message{} }
-func (m *MessageList_Message) String() string { return proto.CompactTextString(m) }
-func (*MessageList_Message) ProtoMessage() {}
-func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18, 0} }
-
-func (m *MessageList_Message) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MessageList_Message) GetCount() int32 {
- if m != nil && m.Count != nil {
- return *m.Count
- }
- return 0
-}
-
-type Strings struct {
- StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
- BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Strings) Reset() { *m = Strings{} }
-func (m *Strings) String() string { return proto.CompactTextString(m) }
-func (*Strings) ProtoMessage() {}
-func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
-
-func (m *Strings) GetStringField() string {
- if m != nil && m.StringField != nil {
- return *m.StringField
- }
- return ""
-}
-
-func (m *Strings) GetBytesField() []byte {
- if m != nil {
- return m.BytesField
- }
- return nil
-}
-
-type Defaults struct {
- // Default-valued fields of all basic types.
- // Same as GoTest, but copied here to make testing easier.
- F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"`
- F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"`
- F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"`
- F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"`
- F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"`
- F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"`
- F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"`
- F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"`
- F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"`
- F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"`
- F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"`
- F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"`
- F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"`
- F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
- // More fields with crazy defaults.
- F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"`
- F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"`
- F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"`
- // Sub-message.
- Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
- // Redundant but explicit defaults.
- StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Defaults) Reset() { *m = Defaults{} }
-func (m *Defaults) String() string { return proto.CompactTextString(m) }
-func (*Defaults) ProtoMessage() {}
-func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
-
-const Default_Defaults_F_Bool bool = true
-const Default_Defaults_F_Int32 int32 = 32
-const Default_Defaults_F_Int64 int64 = 64
-const Default_Defaults_F_Fixed32 uint32 = 320
-const Default_Defaults_F_Fixed64 uint64 = 640
-const Default_Defaults_F_Uint32 uint32 = 3200
-const Default_Defaults_F_Uint64 uint64 = 6400
-const Default_Defaults_F_Float float32 = 314159
-const Default_Defaults_F_Double float64 = 271828
-const Default_Defaults_F_String string = "hello, \"world!\"\n"
-
-var Default_Defaults_F_Bytes []byte = []byte("Bignose")
-
-const Default_Defaults_F_Sint32 int32 = -32
-const Default_Defaults_F_Sint64 int64 = -64
-const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
-
-var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
-var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
-var Default_Defaults_F_Nan float32 = float32(math.NaN())
-
-func (m *Defaults) GetF_Bool() bool {
- if m != nil && m.F_Bool != nil {
- return *m.F_Bool
- }
- return Default_Defaults_F_Bool
-}
-
-func (m *Defaults) GetF_Int32() int32 {
- if m != nil && m.F_Int32 != nil {
- return *m.F_Int32
- }
- return Default_Defaults_F_Int32
-}
-
-func (m *Defaults) GetF_Int64() int64 {
- if m != nil && m.F_Int64 != nil {
- return *m.F_Int64
- }
- return Default_Defaults_F_Int64
-}
-
-func (m *Defaults) GetF_Fixed32() uint32 {
- if m != nil && m.F_Fixed32 != nil {
- return *m.F_Fixed32
- }
- return Default_Defaults_F_Fixed32
-}
-
-func (m *Defaults) GetF_Fixed64() uint64 {
- if m != nil && m.F_Fixed64 != nil {
- return *m.F_Fixed64
- }
- return Default_Defaults_F_Fixed64
-}
-
-func (m *Defaults) GetF_Uint32() uint32 {
- if m != nil && m.F_Uint32 != nil {
- return *m.F_Uint32
- }
- return Default_Defaults_F_Uint32
-}
-
-func (m *Defaults) GetF_Uint64() uint64 {
- if m != nil && m.F_Uint64 != nil {
- return *m.F_Uint64
- }
- return Default_Defaults_F_Uint64
-}
-
-func (m *Defaults) GetF_Float() float32 {
- if m != nil && m.F_Float != nil {
- return *m.F_Float
- }
- return Default_Defaults_F_Float
-}
-
-func (m *Defaults) GetF_Double() float64 {
- if m != nil && m.F_Double != nil {
- return *m.F_Double
- }
- return Default_Defaults_F_Double
-}
-
-func (m *Defaults) GetF_String() string {
- if m != nil && m.F_String != nil {
- return *m.F_String
- }
- return Default_Defaults_F_String
-}
-
-func (m *Defaults) GetF_Bytes() []byte {
- if m != nil && m.F_Bytes != nil {
- return m.F_Bytes
- }
- return append([]byte(nil), Default_Defaults_F_Bytes...)
-}
-
-func (m *Defaults) GetF_Sint32() int32 {
- if m != nil && m.F_Sint32 != nil {
- return *m.F_Sint32
- }
- return Default_Defaults_F_Sint32
-}
-
-func (m *Defaults) GetF_Sint64() int64 {
- if m != nil && m.F_Sint64 != nil {
- return *m.F_Sint64
- }
- return Default_Defaults_F_Sint64
-}
-
-func (m *Defaults) GetF_Enum() Defaults_Color {
- if m != nil && m.F_Enum != nil {
- return *m.F_Enum
- }
- return Default_Defaults_F_Enum
-}
-
-func (m *Defaults) GetF_Pinf() float32 {
- if m != nil && m.F_Pinf != nil {
- return *m.F_Pinf
- }
- return Default_Defaults_F_Pinf
-}
-
-func (m *Defaults) GetF_Ninf() float32 {
- if m != nil && m.F_Ninf != nil {
- return *m.F_Ninf
- }
- return Default_Defaults_F_Ninf
-}
-
-func (m *Defaults) GetF_Nan() float32 {
- if m != nil && m.F_Nan != nil {
- return *m.F_Nan
- }
- return Default_Defaults_F_Nan
-}
-
-func (m *Defaults) GetSub() *SubDefaults {
- if m != nil {
- return m.Sub
- }
- return nil
-}
-
-func (m *Defaults) GetStrZero() string {
- if m != nil && m.StrZero != nil {
- return *m.StrZero
- }
- return ""
-}
-
-type SubDefaults struct {
- N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SubDefaults) Reset() { *m = SubDefaults{} }
-func (m *SubDefaults) String() string { return proto.CompactTextString(m) }
-func (*SubDefaults) ProtoMessage() {}
-func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
-
-const Default_SubDefaults_N int64 = 7
-
-func (m *SubDefaults) GetN() int64 {
- if m != nil && m.N != nil {
- return *m.N
- }
- return Default_SubDefaults_N
-}
-
-type RepeatedEnum struct {
- Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} }
-func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) }
-func (*RepeatedEnum) ProtoMessage() {}
-func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
-
-func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color {
- if m != nil {
- return m.Color
- }
- return nil
-}
-
-type MoreRepeated struct {
- Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"`
- BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"`
- Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"`
- IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"`
- Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"`
- Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"`
- Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MoreRepeated) Reset() { *m = MoreRepeated{} }
-func (m *MoreRepeated) String() string { return proto.CompactTextString(m) }
-func (*MoreRepeated) ProtoMessage() {}
-func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
-
-func (m *MoreRepeated) GetBools() []bool {
- if m != nil {
- return m.Bools
- }
- return nil
-}
-
-func (m *MoreRepeated) GetBoolsPacked() []bool {
- if m != nil {
- return m.BoolsPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetInts() []int32 {
- if m != nil {
- return m.Ints
- }
- return nil
-}
-
-func (m *MoreRepeated) GetIntsPacked() []int32 {
- if m != nil {
- return m.IntsPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetInt64SPacked() []int64 {
- if m != nil {
- return m.Int64SPacked
- }
- return nil
-}
-
-func (m *MoreRepeated) GetStrings() []string {
- if m != nil {
- return m.Strings
- }
- return nil
-}
-
-func (m *MoreRepeated) GetFixeds() []uint32 {
- if m != nil {
- return m.Fixeds
- }
- return nil
-}
-
-type GroupOld struct {
- G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupOld) Reset() { *m = GroupOld{} }
-func (m *GroupOld) String() string { return proto.CompactTextString(m) }
-func (*GroupOld) ProtoMessage() {}
-func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
-
-func (m *GroupOld) GetG() *GroupOld_G {
- if m != nil {
- return m.G
- }
- return nil
-}
-
-type GroupOld_G struct {
- X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupOld_G) Reset() { *m = GroupOld_G{} }
-func (m *GroupOld_G) String() string { return proto.CompactTextString(m) }
-func (*GroupOld_G) ProtoMessage() {}
-func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24, 0} }
-
-func (m *GroupOld_G) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-type GroupNew struct {
- G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupNew) Reset() { *m = GroupNew{} }
-func (m *GroupNew) String() string { return proto.CompactTextString(m) }
-func (*GroupNew) ProtoMessage() {}
-func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
-
-func (m *GroupNew) GetG() *GroupNew_G {
- if m != nil {
- return m.G
- }
- return nil
-}
-
-type GroupNew_G struct {
- X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"`
- Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GroupNew_G) Reset() { *m = GroupNew_G{} }
-func (m *GroupNew_G) String() string { return proto.CompactTextString(m) }
-func (*GroupNew_G) ProtoMessage() {}
-func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} }
-
-func (m *GroupNew_G) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-func (m *GroupNew_G) GetY() int32 {
- if m != nil && m.Y != nil {
- return *m.Y
- }
- return 0
-}
-
-type FloatingPoint struct {
- F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FloatingPoint) Reset() { *m = FloatingPoint{} }
-func (m *FloatingPoint) String() string { return proto.CompactTextString(m) }
-func (*FloatingPoint) ProtoMessage() {}
-func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
-
-func (m *FloatingPoint) GetF() float64 {
- if m != nil && m.F != nil {
- return *m.F
- }
- return 0
-}
-
-type MessageWithMap struct {
- NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageWithMap) Reset() { *m = MessageWithMap{} }
-func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
-func (*MessageWithMap) ProtoMessage() {}
-func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
-
-func (m *MessageWithMap) GetNameMapping() map[int32]string {
- if m != nil {
- return m.NameMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint {
- if m != nil {
- return m.MsgMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetByteMapping() map[bool][]byte {
- if m != nil {
- return m.ByteMapping
- }
- return nil
-}
-
-func (m *MessageWithMap) GetStrToStr() map[string]string {
- if m != nil {
- return m.StrToStr
- }
- return nil
-}
-
-type Oneof struct {
- // Types that are valid to be assigned to Union:
- // *Oneof_F_Bool
- // *Oneof_F_Int32
- // *Oneof_F_Int64
- // *Oneof_F_Fixed32
- // *Oneof_F_Fixed64
- // *Oneof_F_Uint32
- // *Oneof_F_Uint64
- // *Oneof_F_Float
- // *Oneof_F_Double
- // *Oneof_F_String
- // *Oneof_F_Bytes
- // *Oneof_F_Sint32
- // *Oneof_F_Sint64
- // *Oneof_F_Enum
- // *Oneof_F_Message
- // *Oneof_FGroup
- // *Oneof_F_Largest_Tag
- Union isOneof_Union `protobuf_oneof:"union"`
- // Types that are valid to be assigned to Tormato:
- // *Oneof_Value
- Tormato isOneof_Tormato `protobuf_oneof:"tormato"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Oneof) Reset() { *m = Oneof{} }
-func (m *Oneof) String() string { return proto.CompactTextString(m) }
-func (*Oneof) ProtoMessage() {}
-func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
-
-type isOneof_Union interface {
- isOneof_Union()
-}
-type isOneof_Tormato interface {
- isOneof_Tormato()
-}
-
-type Oneof_F_Bool struct {
- F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"`
-}
-type Oneof_F_Int32 struct {
- F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"`
-}
-type Oneof_F_Int64 struct {
- F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"`
-}
-type Oneof_F_Fixed32 struct {
- F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"`
-}
-type Oneof_F_Fixed64 struct {
- F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"`
-}
-type Oneof_F_Uint32 struct {
- F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"`
-}
-type Oneof_F_Uint64 struct {
- F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"`
-}
-type Oneof_F_Float struct {
- F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"`
-}
-type Oneof_F_Double struct {
- F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"`
-}
-type Oneof_F_String struct {
- F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"`
-}
-type Oneof_F_Bytes struct {
- F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"`
-}
-type Oneof_F_Sint32 struct {
- F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"`
-}
-type Oneof_F_Sint64 struct {
- F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"`
-}
-type Oneof_F_Enum struct {
- F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"`
-}
-type Oneof_F_Message struct {
- F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"`
-}
-type Oneof_FGroup struct {
- FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"`
-}
-type Oneof_F_Largest_Tag struct {
- F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"`
-}
-type Oneof_Value struct {
- Value int32 `protobuf:"varint,100,opt,name=value,oneof"`
-}
-
-func (*Oneof_F_Bool) isOneof_Union() {}
-func (*Oneof_F_Int32) isOneof_Union() {}
-func (*Oneof_F_Int64) isOneof_Union() {}
-func (*Oneof_F_Fixed32) isOneof_Union() {}
-func (*Oneof_F_Fixed64) isOneof_Union() {}
-func (*Oneof_F_Uint32) isOneof_Union() {}
-func (*Oneof_F_Uint64) isOneof_Union() {}
-func (*Oneof_F_Float) isOneof_Union() {}
-func (*Oneof_F_Double) isOneof_Union() {}
-func (*Oneof_F_String) isOneof_Union() {}
-func (*Oneof_F_Bytes) isOneof_Union() {}
-func (*Oneof_F_Sint32) isOneof_Union() {}
-func (*Oneof_F_Sint64) isOneof_Union() {}
-func (*Oneof_F_Enum) isOneof_Union() {}
-func (*Oneof_F_Message) isOneof_Union() {}
-func (*Oneof_FGroup) isOneof_Union() {}
-func (*Oneof_F_Largest_Tag) isOneof_Union() {}
-func (*Oneof_Value) isOneof_Tormato() {}
-
-func (m *Oneof) GetUnion() isOneof_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-func (m *Oneof) GetTormato() isOneof_Tormato {
- if m != nil {
- return m.Tormato
- }
- return nil
-}
-
-func (m *Oneof) GetF_Bool() bool {
- if x, ok := m.GetUnion().(*Oneof_F_Bool); ok {
- return x.F_Bool
- }
- return false
-}
-
-func (m *Oneof) GetF_Int32() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Int32); ok {
- return x.F_Int32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Int64() int64 {
- if x, ok := m.GetUnion().(*Oneof_F_Int64); ok {
- return x.F_Int64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Fixed32() uint32 {
- if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok {
- return x.F_Fixed32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Fixed64() uint64 {
- if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok {
- return x.F_Fixed64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Uint32() uint32 {
- if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok {
- return x.F_Uint32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Uint64() uint64 {
- if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok {
- return x.F_Uint64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Float() float32 {
- if x, ok := m.GetUnion().(*Oneof_F_Float); ok {
- return x.F_Float
- }
- return 0
-}
-
-func (m *Oneof) GetF_Double() float64 {
- if x, ok := m.GetUnion().(*Oneof_F_Double); ok {
- return x.F_Double
- }
- return 0
-}
-
-func (m *Oneof) GetF_String() string {
- if x, ok := m.GetUnion().(*Oneof_F_String); ok {
- return x.F_String
- }
- return ""
-}
-
-func (m *Oneof) GetF_Bytes() []byte {
- if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok {
- return x.F_Bytes
- }
- return nil
-}
-
-func (m *Oneof) GetF_Sint32() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok {
- return x.F_Sint32
- }
- return 0
-}
-
-func (m *Oneof) GetF_Sint64() int64 {
- if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok {
- return x.F_Sint64
- }
- return 0
-}
-
-func (m *Oneof) GetF_Enum() MyMessage_Color {
- if x, ok := m.GetUnion().(*Oneof_F_Enum); ok {
- return x.F_Enum
- }
- return MyMessage_RED
-}
-
-func (m *Oneof) GetF_Message() *GoTestField {
- if x, ok := m.GetUnion().(*Oneof_F_Message); ok {
- return x.F_Message
- }
- return nil
-}
-
-func (m *Oneof) GetFGroup() *Oneof_F_Group {
- if x, ok := m.GetUnion().(*Oneof_FGroup); ok {
- return x.FGroup
- }
- return nil
-}
-
-func (m *Oneof) GetF_Largest_Tag() int32 {
- if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok {
- return x.F_Largest_Tag
- }
- return 0
-}
-
-func (m *Oneof) GetValue() int32 {
- if x, ok := m.GetTormato().(*Oneof_Value); ok {
- return x.Value
- }
- return 0
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{
- (*Oneof_F_Bool)(nil),
- (*Oneof_F_Int32)(nil),
- (*Oneof_F_Int64)(nil),
- (*Oneof_F_Fixed32)(nil),
- (*Oneof_F_Fixed64)(nil),
- (*Oneof_F_Uint32)(nil),
- (*Oneof_F_Uint64)(nil),
- (*Oneof_F_Float)(nil),
- (*Oneof_F_Double)(nil),
- (*Oneof_F_String)(nil),
- (*Oneof_F_Bytes)(nil),
- (*Oneof_F_Sint32)(nil),
- (*Oneof_F_Sint64)(nil),
- (*Oneof_F_Enum)(nil),
- (*Oneof_F_Message)(nil),
- (*Oneof_FGroup)(nil),
- (*Oneof_F_Largest_Tag)(nil),
- (*Oneof_Value)(nil),
- }
-}
-
-func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Oneof)
- // union
- switch x := m.Union.(type) {
- case *Oneof_F_Bool:
- t := uint64(0)
- if x.F_Bool {
- t = 1
- }
- b.EncodeVarint(1<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Oneof_F_Int32:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Int32))
- case *Oneof_F_Int64:
- b.EncodeVarint(3<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Int64))
- case *Oneof_F_Fixed32:
- b.EncodeVarint(4<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(x.F_Fixed32))
- case *Oneof_F_Fixed64:
- b.EncodeVarint(5<<3 | proto.WireFixed64)
- b.EncodeFixed64(uint64(x.F_Fixed64))
- case *Oneof_F_Uint32:
- b.EncodeVarint(6<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Uint32))
- case *Oneof_F_Uint64:
- b.EncodeVarint(7<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Uint64))
- case *Oneof_F_Float:
- b.EncodeVarint(8<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.F_Float)))
- case *Oneof_F_Double:
- b.EncodeVarint(9<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.F_Double))
- case *Oneof_F_String:
- b.EncodeVarint(10<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.F_String)
- case *Oneof_F_Bytes:
- b.EncodeVarint(11<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.F_Bytes)
- case *Oneof_F_Sint32:
- b.EncodeVarint(12<<3 | proto.WireVarint)
- b.EncodeZigzag32(uint64(x.F_Sint32))
- case *Oneof_F_Sint64:
- b.EncodeVarint(13<<3 | proto.WireVarint)
- b.EncodeZigzag64(uint64(x.F_Sint64))
- case *Oneof_F_Enum:
- b.EncodeVarint(14<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Enum))
- case *Oneof_F_Message:
- b.EncodeVarint(15<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.F_Message); err != nil {
- return err
- }
- case *Oneof_FGroup:
- b.EncodeVarint(16<<3 | proto.WireStartGroup)
- if err := b.Marshal(x.FGroup); err != nil {
- return err
- }
- b.EncodeVarint(16<<3 | proto.WireEndGroup)
- case *Oneof_F_Largest_Tag:
- b.EncodeVarint(536870911<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.F_Largest_Tag))
- case nil:
- default:
- return fmt.Errorf("Oneof.Union has unexpected type %T", x)
- }
- // tormato
- switch x := m.Tormato.(type) {
- case *Oneof_Value:
- b.EncodeVarint(100<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Value))
- case nil:
- default:
- return fmt.Errorf("Oneof.Tormato has unexpected type %T", x)
- }
- return nil
-}
-
-func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Oneof)
- switch tag {
- case 1: // union.F_Bool
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Bool{x != 0}
- return true, err
- case 2: // union.F_Int32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Int32{int32(x)}
- return true, err
- case 3: // union.F_Int64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Int64{int64(x)}
- return true, err
- case 4: // union.F_Fixed32
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Oneof_F_Fixed32{uint32(x)}
- return true, err
- case 5: // union.F_Fixed64
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Oneof_F_Fixed64{x}
- return true, err
- case 6: // union.F_Uint32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Uint32{uint32(x)}
- return true, err
- case 7: // union.F_Uint64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Uint64{x}
- return true, err
- case 8: // union.F_Float
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))}
- return true, err
- case 9: // union.F_Double
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Oneof_F_Double{math.Float64frombits(x)}
- return true, err
- case 10: // union.F_String
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Oneof_F_String{x}
- return true, err
- case 11: // union.F_Bytes
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Oneof_F_Bytes{x}
- return true, err
- case 12: // union.F_Sint32
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag32()
- m.Union = &Oneof_F_Sint32{int32(x)}
- return true, err
- case 13: // union.F_Sint64
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeZigzag64()
- m.Union = &Oneof_F_Sint64{int64(x)}
- return true, err
- case 14: // union.F_Enum
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Enum{MyMessage_Color(x)}
- return true, err
- case 15: // union.F_Message
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(GoTestField)
- err := b.DecodeMessage(msg)
- m.Union = &Oneof_F_Message{msg}
- return true, err
- case 16: // union.f_group
- if wire != proto.WireStartGroup {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Oneof_F_Group)
- err := b.DecodeGroup(msg)
- m.Union = &Oneof_FGroup{msg}
- return true, err
- case 536870911: // union.F_Largest_Tag
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Oneof_F_Largest_Tag{int32(x)}
- return true, err
- case 100: // tormato.value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Tormato = &Oneof_Value{int32(x)}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Oneof_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Oneof)
- // union
- switch x := m.Union.(type) {
- case *Oneof_F_Bool:
- n += proto.SizeVarint(1<<3 | proto.WireVarint)
- n += 1
- case *Oneof_F_Int32:
- n += proto.SizeVarint(2<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Int32))
- case *Oneof_F_Int64:
- n += proto.SizeVarint(3<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Int64))
- case *Oneof_F_Fixed32:
- n += proto.SizeVarint(4<<3 | proto.WireFixed32)
- n += 4
- case *Oneof_F_Fixed64:
- n += proto.SizeVarint(5<<3 | proto.WireFixed64)
- n += 8
- case *Oneof_F_Uint32:
- n += proto.SizeVarint(6<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Uint32))
- case *Oneof_F_Uint64:
- n += proto.SizeVarint(7<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Uint64))
- case *Oneof_F_Float:
- n += proto.SizeVarint(8<<3 | proto.WireFixed32)
- n += 4
- case *Oneof_F_Double:
- n += proto.SizeVarint(9<<3 | proto.WireFixed64)
- n += 8
- case *Oneof_F_String:
- n += proto.SizeVarint(10<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.F_String)))
- n += len(x.F_String)
- case *Oneof_F_Bytes:
- n += proto.SizeVarint(11<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.F_Bytes)))
- n += len(x.F_Bytes)
- case *Oneof_F_Sint32:
- n += proto.SizeVarint(12<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31))))
- case *Oneof_F_Sint64:
- n += proto.SizeVarint(13<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63))))
- case *Oneof_F_Enum:
- n += proto.SizeVarint(14<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Enum))
- case *Oneof_F_Message:
- s := proto.Size(x.F_Message)
- n += proto.SizeVarint(15<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Oneof_FGroup:
- n += proto.SizeVarint(16<<3 | proto.WireStartGroup)
- n += proto.Size(x.FGroup)
- n += proto.SizeVarint(16<<3 | proto.WireEndGroup)
- case *Oneof_F_Largest_Tag:
- n += proto.SizeVarint(536870911<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.F_Largest_Tag))
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- // tormato
- switch x := m.Tormato.(type) {
- case *Oneof_Value:
- n += proto.SizeVarint(100<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Value))
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-type Oneof_F_Group struct {
- X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} }
-func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) }
-func (*Oneof_F_Group) ProtoMessage() {}
-func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28, 0} }
-
-func (m *Oneof_F_Group) GetX() int32 {
- if m != nil && m.X != nil {
- return *m.X
- }
- return 0
-}
-
-type Communique struct {
- MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"`
- // This is a oneof, called "union".
- //
- // Types that are valid to be assigned to Union:
- // *Communique_Number
- // *Communique_Name
- // *Communique_Data
- // *Communique_TempC
- // *Communique_Col
- // *Communique_Msg
- Union isCommunique_Union `protobuf_oneof:"union"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Communique) Reset() { *m = Communique{} }
-func (m *Communique) String() string { return proto.CompactTextString(m) }
-func (*Communique) ProtoMessage() {}
-func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
-
-type isCommunique_Union interface {
- isCommunique_Union()
-}
-
-type Communique_Number struct {
- Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
-}
-type Communique_Name struct {
- Name string `protobuf:"bytes,6,opt,name=name,oneof"`
-}
-type Communique_Data struct {
- Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
-}
-type Communique_TempC struct {
- TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
-}
-type Communique_Col struct {
- Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"`
-}
-type Communique_Msg struct {
- Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"`
-}
-
-func (*Communique_Number) isCommunique_Union() {}
-func (*Communique_Name) isCommunique_Union() {}
-func (*Communique_Data) isCommunique_Union() {}
-func (*Communique_TempC) isCommunique_Union() {}
-func (*Communique_Col) isCommunique_Union() {}
-func (*Communique_Msg) isCommunique_Union() {}
-
-func (m *Communique) GetUnion() isCommunique_Union {
- if m != nil {
- return m.Union
- }
- return nil
-}
-
-func (m *Communique) GetMakeMeCry() bool {
- if m != nil && m.MakeMeCry != nil {
- return *m.MakeMeCry
- }
- return false
-}
-
-func (m *Communique) GetNumber() int32 {
- if x, ok := m.GetUnion().(*Communique_Number); ok {
- return x.Number
- }
- return 0
-}
-
-func (m *Communique) GetName() string {
- if x, ok := m.GetUnion().(*Communique_Name); ok {
- return x.Name
- }
- return ""
-}
-
-func (m *Communique) GetData() []byte {
- if x, ok := m.GetUnion().(*Communique_Data); ok {
- return x.Data
- }
- return nil
-}
-
-func (m *Communique) GetTempC() float64 {
- if x, ok := m.GetUnion().(*Communique_TempC); ok {
- return x.TempC
- }
- return 0
-}
-
-func (m *Communique) GetCol() MyMessage_Color {
- if x, ok := m.GetUnion().(*Communique_Col); ok {
- return x.Col
- }
- return MyMessage_RED
-}
-
-func (m *Communique) GetMsg() *Strings {
- if x, ok := m.GetUnion().(*Communique_Msg); ok {
- return x.Msg
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
- (*Communique_Number)(nil),
- (*Communique_Name)(nil),
- (*Communique_Data)(nil),
- (*Communique_TempC)(nil),
- (*Communique_Col)(nil),
- (*Communique_Msg)(nil),
- }
-}
-
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- b.EncodeVarint(5<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Number))
- case *Communique_Name:
- b.EncodeVarint(6<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Name)
- case *Communique_Data:
- b.EncodeVarint(7<<3 | proto.WireBytes)
- b.EncodeRawBytes(x.Data)
- case *Communique_TempC:
- b.EncodeVarint(8<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.TempC))
- case *Communique_Col:
- b.EncodeVarint(9<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Col))
- case *Communique_Msg:
- b.EncodeVarint(10<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Msg); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Communique.Union has unexpected type %T", x)
- }
- return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Communique)
- switch tag {
- case 5: // union.number
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Number{int32(x)}
- return true, err
- case 6: // union.name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Union = &Communique_Name{x}
- return true, err
- case 7: // union.data
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeRawBytes(true)
- m.Union = &Communique_Data{x}
- return true, err
- case 8: // union.temp_c
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Union = &Communique_TempC{math.Float64frombits(x)}
- return true, err
- case 9: // union.col
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Union = &Communique_Col{MyMessage_Color(x)}
- return true, err
- case 10: // union.msg
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Strings)
- err := b.DecodeMessage(msg)
- m.Union = &Communique_Msg{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Communique)
- // union
- switch x := m.Union.(type) {
- case *Communique_Number:
- n += proto.SizeVarint(5<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Number))
- case *Communique_Name:
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Name)))
- n += len(x.Name)
- case *Communique_Data:
- n += proto.SizeVarint(7<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Data)))
- n += len(x.Data)
- case *Communique_TempC:
- n += proto.SizeVarint(8<<3 | proto.WireFixed64)
- n += 8
- case *Communique_Col:
- n += proto.SizeVarint(9<<3 | proto.WireVarint)
- n += proto.SizeVarint(uint64(x.Col))
- case *Communique_Msg:
- s := proto.Size(x.Msg)
- n += proto.SizeVarint(10<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-var E_Greeting = &proto.ExtensionDesc{
- ExtendedType: (*MyMessage)(nil),
- ExtensionType: ([]string)(nil),
- Field: 106,
- Name: "testdata.greeting",
- Tag: "bytes,106,rep,name=greeting",
-}
-
-var E_Complex = &proto.ExtensionDesc{
- ExtendedType: (*OtherMessage)(nil),
- ExtensionType: (*ComplexExtension)(nil),
- Field: 200,
- Name: "testdata.complex",
- Tag: "bytes,200,opt,name=complex",
-}
-
-var E_RComplex = &proto.ExtensionDesc{
- ExtendedType: (*OtherMessage)(nil),
- ExtensionType: ([]*ComplexExtension)(nil),
- Field: 201,
- Name: "testdata.r_complex",
- Tag: "bytes,201,rep,name=r_complex,json=rComplex",
-}
-
-var E_NoDefaultDouble = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float64)(nil),
- Field: 101,
- Name: "testdata.no_default_double",
- Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble",
-}
-
-var E_NoDefaultFloat = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float32)(nil),
- Field: 102,
- Name: "testdata.no_default_float",
- Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat",
-}
-
-var E_NoDefaultInt32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 103,
- Name: "testdata.no_default_int32",
- Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32",
-}
-
-var E_NoDefaultInt64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 104,
- Name: "testdata.no_default_int64",
- Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64",
-}
-
-var E_NoDefaultUint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 105,
- Name: "testdata.no_default_uint32",
- Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32",
-}
-
-var E_NoDefaultUint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 106,
- Name: "testdata.no_default_uint64",
- Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64",
-}
-
-var E_NoDefaultSint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 107,
- Name: "testdata.no_default_sint32",
- Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32",
-}
-
-var E_NoDefaultSint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 108,
- Name: "testdata.no_default_sint64",
- Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64",
-}
-
-var E_NoDefaultFixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 109,
- Name: "testdata.no_default_fixed32",
- Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32",
-}
-
-var E_NoDefaultFixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 110,
- Name: "testdata.no_default_fixed64",
- Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64",
-}
-
-var E_NoDefaultSfixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 111,
- Name: "testdata.no_default_sfixed32",
- Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32",
-}
-
-var E_NoDefaultSfixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 112,
- Name: "testdata.no_default_sfixed64",
- Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64",
-}
-
-var E_NoDefaultBool = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 113,
- Name: "testdata.no_default_bool",
- Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool",
-}
-
-var E_NoDefaultString = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 114,
- Name: "testdata.no_default_string",
- Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString",
-}
-
-var E_NoDefaultBytes = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: ([]byte)(nil),
- Field: 115,
- Name: "testdata.no_default_bytes",
- Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes",
-}
-
-var E_NoDefaultEnum = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
- Field: 116,
- Name: "testdata.no_default_enum",
- Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum",
-}
-
-var E_DefaultDouble = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float64)(nil),
- Field: 201,
- Name: "testdata.default_double",
- Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415",
-}
-
-var E_DefaultFloat = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*float32)(nil),
- Field: 202,
- Name: "testdata.default_float",
- Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14",
-}
-
-var E_DefaultInt32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 203,
- Name: "testdata.default_int32",
- Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42",
-}
-
-var E_DefaultInt64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 204,
- Name: "testdata.default_int64",
- Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43",
-}
-
-var E_DefaultUint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 205,
- Name: "testdata.default_uint32",
- Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44",
-}
-
-var E_DefaultUint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 206,
- Name: "testdata.default_uint64",
- Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45",
-}
-
-var E_DefaultSint32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 207,
- Name: "testdata.default_sint32",
- Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46",
-}
-
-var E_DefaultSint64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 208,
- Name: "testdata.default_sint64",
- Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47",
-}
-
-var E_DefaultFixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint32)(nil),
- Field: 209,
- Name: "testdata.default_fixed32",
- Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48",
-}
-
-var E_DefaultFixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*uint64)(nil),
- Field: 210,
- Name: "testdata.default_fixed64",
- Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49",
-}
-
-var E_DefaultSfixed32 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int32)(nil),
- Field: 211,
- Name: "testdata.default_sfixed32",
- Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50",
-}
-
-var E_DefaultSfixed64 = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*int64)(nil),
- Field: 212,
- Name: "testdata.default_sfixed64",
- Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51",
-}
-
-var E_DefaultBool = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*bool)(nil),
- Field: 213,
- Name: "testdata.default_bool",
- Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1",
-}
-
-var E_DefaultString = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*string)(nil),
- Field: 214,
- Name: "testdata.default_string",
- Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string",
-}
-
-var E_DefaultBytes = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: ([]byte)(nil),
- Field: 215,
- Name: "testdata.default_bytes",
- Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes",
-}
-
-var E_DefaultEnum = &proto.ExtensionDesc{
- ExtendedType: (*DefaultsMessage)(nil),
- ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
- Field: 216,
- Name: "testdata.default_enum",
- Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1",
-}
-
-var E_X201 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 201,
- Name: "testdata.x201",
- Tag: "bytes,201,opt,name=x201",
-}
-
-var E_X202 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 202,
- Name: "testdata.x202",
- Tag: "bytes,202,opt,name=x202",
-}
-
-var E_X203 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 203,
- Name: "testdata.x203",
- Tag: "bytes,203,opt,name=x203",
-}
-
-var E_X204 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 204,
- Name: "testdata.x204",
- Tag: "bytes,204,opt,name=x204",
-}
-
-var E_X205 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 205,
- Name: "testdata.x205",
- Tag: "bytes,205,opt,name=x205",
-}
-
-var E_X206 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 206,
- Name: "testdata.x206",
- Tag: "bytes,206,opt,name=x206",
-}
-
-var E_X207 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 207,
- Name: "testdata.x207",
- Tag: "bytes,207,opt,name=x207",
-}
-
-var E_X208 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 208,
- Name: "testdata.x208",
- Tag: "bytes,208,opt,name=x208",
-}
-
-var E_X209 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 209,
- Name: "testdata.x209",
- Tag: "bytes,209,opt,name=x209",
-}
-
-var E_X210 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 210,
- Name: "testdata.x210",
- Tag: "bytes,210,opt,name=x210",
-}
-
-var E_X211 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 211,
- Name: "testdata.x211",
- Tag: "bytes,211,opt,name=x211",
-}
-
-var E_X212 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 212,
- Name: "testdata.x212",
- Tag: "bytes,212,opt,name=x212",
-}
-
-var E_X213 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 213,
- Name: "testdata.x213",
- Tag: "bytes,213,opt,name=x213",
-}
-
-var E_X214 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 214,
- Name: "testdata.x214",
- Tag: "bytes,214,opt,name=x214",
-}
-
-var E_X215 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 215,
- Name: "testdata.x215",
- Tag: "bytes,215,opt,name=x215",
-}
-
-var E_X216 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 216,
- Name: "testdata.x216",
- Tag: "bytes,216,opt,name=x216",
-}
-
-var E_X217 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 217,
- Name: "testdata.x217",
- Tag: "bytes,217,opt,name=x217",
-}
-
-var E_X218 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 218,
- Name: "testdata.x218",
- Tag: "bytes,218,opt,name=x218",
-}
-
-var E_X219 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 219,
- Name: "testdata.x219",
- Tag: "bytes,219,opt,name=x219",
-}
-
-var E_X220 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 220,
- Name: "testdata.x220",
- Tag: "bytes,220,opt,name=x220",
-}
-
-var E_X221 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 221,
- Name: "testdata.x221",
- Tag: "bytes,221,opt,name=x221",
-}
-
-var E_X222 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 222,
- Name: "testdata.x222",
- Tag: "bytes,222,opt,name=x222",
-}
-
-var E_X223 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 223,
- Name: "testdata.x223",
- Tag: "bytes,223,opt,name=x223",
-}
-
-var E_X224 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 224,
- Name: "testdata.x224",
- Tag: "bytes,224,opt,name=x224",
-}
-
-var E_X225 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 225,
- Name: "testdata.x225",
- Tag: "bytes,225,opt,name=x225",
-}
-
-var E_X226 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 226,
- Name: "testdata.x226",
- Tag: "bytes,226,opt,name=x226",
-}
-
-var E_X227 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 227,
- Name: "testdata.x227",
- Tag: "bytes,227,opt,name=x227",
-}
-
-var E_X228 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 228,
- Name: "testdata.x228",
- Tag: "bytes,228,opt,name=x228",
-}
-
-var E_X229 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 229,
- Name: "testdata.x229",
- Tag: "bytes,229,opt,name=x229",
-}
-
-var E_X230 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 230,
- Name: "testdata.x230",
- Tag: "bytes,230,opt,name=x230",
-}
-
-var E_X231 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 231,
- Name: "testdata.x231",
- Tag: "bytes,231,opt,name=x231",
-}
-
-var E_X232 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 232,
- Name: "testdata.x232",
- Tag: "bytes,232,opt,name=x232",
-}
-
-var E_X233 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 233,
- Name: "testdata.x233",
- Tag: "bytes,233,opt,name=x233",
-}
-
-var E_X234 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 234,
- Name: "testdata.x234",
- Tag: "bytes,234,opt,name=x234",
-}
-
-var E_X235 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 235,
- Name: "testdata.x235",
- Tag: "bytes,235,opt,name=x235",
-}
-
-var E_X236 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 236,
- Name: "testdata.x236",
- Tag: "bytes,236,opt,name=x236",
-}
-
-var E_X237 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 237,
- Name: "testdata.x237",
- Tag: "bytes,237,opt,name=x237",
-}
-
-var E_X238 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 238,
- Name: "testdata.x238",
- Tag: "bytes,238,opt,name=x238",
-}
-
-var E_X239 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 239,
- Name: "testdata.x239",
- Tag: "bytes,239,opt,name=x239",
-}
-
-var E_X240 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 240,
- Name: "testdata.x240",
- Tag: "bytes,240,opt,name=x240",
-}
-
-var E_X241 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 241,
- Name: "testdata.x241",
- Tag: "bytes,241,opt,name=x241",
-}
-
-var E_X242 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 242,
- Name: "testdata.x242",
- Tag: "bytes,242,opt,name=x242",
-}
-
-var E_X243 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 243,
- Name: "testdata.x243",
- Tag: "bytes,243,opt,name=x243",
-}
-
-var E_X244 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 244,
- Name: "testdata.x244",
- Tag: "bytes,244,opt,name=x244",
-}
-
-var E_X245 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 245,
- Name: "testdata.x245",
- Tag: "bytes,245,opt,name=x245",
-}
-
-var E_X246 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 246,
- Name: "testdata.x246",
- Tag: "bytes,246,opt,name=x246",
-}
-
-var E_X247 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 247,
- Name: "testdata.x247",
- Tag: "bytes,247,opt,name=x247",
-}
-
-var E_X248 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 248,
- Name: "testdata.x248",
- Tag: "bytes,248,opt,name=x248",
-}
-
-var E_X249 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 249,
- Name: "testdata.x249",
- Tag: "bytes,249,opt,name=x249",
-}
-
-var E_X250 = &proto.ExtensionDesc{
- ExtendedType: (*MyMessageSet)(nil),
- ExtensionType: (*Empty)(nil),
- Field: 250,
- Name: "testdata.x250",
- Tag: "bytes,250,opt,name=x250",
-}
-
-func init() {
- proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum")
- proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField")
- proto.RegisterType((*GoTest)(nil), "testdata.GoTest")
- proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup")
- proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup")
- proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup")
- proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest")
- proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup")
- proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest")
- proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest")
- proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag")
- proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage")
- proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested")
- proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage")
- proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested")
- proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage")
- proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage")
- proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage")
- proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage")
- proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup")
- proto.RegisterType((*Ext)(nil), "testdata.Ext")
- proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension")
- proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage")
- proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet")
- proto.RegisterType((*Empty)(nil), "testdata.Empty")
- proto.RegisterType((*MessageList)(nil), "testdata.MessageList")
- proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message")
- proto.RegisterType((*Strings)(nil), "testdata.Strings")
- proto.RegisterType((*Defaults)(nil), "testdata.Defaults")
- proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults")
- proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum")
- proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated")
- proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld")
- proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G")
- proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew")
- proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G")
- proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint")
- proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap")
- proto.RegisterType((*Oneof)(nil), "testdata.Oneof")
- proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group")
- proto.RegisterType((*Communique)(nil), "testdata.Communique")
- proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
- proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
- proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
- proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
- proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
- proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
- proto.RegisterExtension(E_Ext_More)
- proto.RegisterExtension(E_Ext_Text)
- proto.RegisterExtension(E_Ext_Number)
- proto.RegisterExtension(E_Greeting)
- proto.RegisterExtension(E_Complex)
- proto.RegisterExtension(E_RComplex)
- proto.RegisterExtension(E_NoDefaultDouble)
- proto.RegisterExtension(E_NoDefaultFloat)
- proto.RegisterExtension(E_NoDefaultInt32)
- proto.RegisterExtension(E_NoDefaultInt64)
- proto.RegisterExtension(E_NoDefaultUint32)
- proto.RegisterExtension(E_NoDefaultUint64)
- proto.RegisterExtension(E_NoDefaultSint32)
- proto.RegisterExtension(E_NoDefaultSint64)
- proto.RegisterExtension(E_NoDefaultFixed32)
- proto.RegisterExtension(E_NoDefaultFixed64)
- proto.RegisterExtension(E_NoDefaultSfixed32)
- proto.RegisterExtension(E_NoDefaultSfixed64)
- proto.RegisterExtension(E_NoDefaultBool)
- proto.RegisterExtension(E_NoDefaultString)
- proto.RegisterExtension(E_NoDefaultBytes)
- proto.RegisterExtension(E_NoDefaultEnum)
- proto.RegisterExtension(E_DefaultDouble)
- proto.RegisterExtension(E_DefaultFloat)
- proto.RegisterExtension(E_DefaultInt32)
- proto.RegisterExtension(E_DefaultInt64)
- proto.RegisterExtension(E_DefaultUint32)
- proto.RegisterExtension(E_DefaultUint64)
- proto.RegisterExtension(E_DefaultSint32)
- proto.RegisterExtension(E_DefaultSint64)
- proto.RegisterExtension(E_DefaultFixed32)
- proto.RegisterExtension(E_DefaultFixed64)
- proto.RegisterExtension(E_DefaultSfixed32)
- proto.RegisterExtension(E_DefaultSfixed64)
- proto.RegisterExtension(E_DefaultBool)
- proto.RegisterExtension(E_DefaultString)
- proto.RegisterExtension(E_DefaultBytes)
- proto.RegisterExtension(E_DefaultEnum)
- proto.RegisterExtension(E_X201)
- proto.RegisterExtension(E_X202)
- proto.RegisterExtension(E_X203)
- proto.RegisterExtension(E_X204)
- proto.RegisterExtension(E_X205)
- proto.RegisterExtension(E_X206)
- proto.RegisterExtension(E_X207)
- proto.RegisterExtension(E_X208)
- proto.RegisterExtension(E_X209)
- proto.RegisterExtension(E_X210)
- proto.RegisterExtension(E_X211)
- proto.RegisterExtension(E_X212)
- proto.RegisterExtension(E_X213)
- proto.RegisterExtension(E_X214)
- proto.RegisterExtension(E_X215)
- proto.RegisterExtension(E_X216)
- proto.RegisterExtension(E_X217)
- proto.RegisterExtension(E_X218)
- proto.RegisterExtension(E_X219)
- proto.RegisterExtension(E_X220)
- proto.RegisterExtension(E_X221)
- proto.RegisterExtension(E_X222)
- proto.RegisterExtension(E_X223)
- proto.RegisterExtension(E_X224)
- proto.RegisterExtension(E_X225)
- proto.RegisterExtension(E_X226)
- proto.RegisterExtension(E_X227)
- proto.RegisterExtension(E_X228)
- proto.RegisterExtension(E_X229)
- proto.RegisterExtension(E_X230)
- proto.RegisterExtension(E_X231)
- proto.RegisterExtension(E_X232)
- proto.RegisterExtension(E_X233)
- proto.RegisterExtension(E_X234)
- proto.RegisterExtension(E_X235)
- proto.RegisterExtension(E_X236)
- proto.RegisterExtension(E_X237)
- proto.RegisterExtension(E_X238)
- proto.RegisterExtension(E_X239)
- proto.RegisterExtension(E_X240)
- proto.RegisterExtension(E_X241)
- proto.RegisterExtension(E_X242)
- proto.RegisterExtension(E_X243)
- proto.RegisterExtension(E_X244)
- proto.RegisterExtension(E_X245)
- proto.RegisterExtension(E_X246)
- proto.RegisterExtension(E_X247)
- proto.RegisterExtension(E_X248)
- proto.RegisterExtension(E_X249)
- proto.RegisterExtension(E_X250)
-}
-
-var fileDescriptor0 = []byte{
- // 4407 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0x59, 0x77, 0xdb, 0x48,
- 0x76, 0x36, 0xc0, 0xfd, 0x92, 0x12, 0xa1, 0xb2, 0xda, 0x4d, 0x4b, 0x5e, 0x60, 0xce, 0x74, 0x37,
- 0xbd, 0x69, 0x24, 0x10, 0xa2, 0x6d, 0xba, 0xd3, 0xe7, 0x78, 0xa1, 0x64, 0x9d, 0xb1, 0x44, 0x05,
- 0x52, 0x77, 0x9f, 0xe9, 0x3c, 0xf0, 0x50, 0x22, 0x48, 0xb3, 0x4d, 0x02, 0x34, 0x09, 0xc5, 0x52,
- 0xf2, 0xd2, 0x2f, 0xc9, 0x6b, 0xb6, 0x97, 0xbc, 0xe6, 0x29, 0x4f, 0x49, 0xce, 0xc9, 0x9f, 0x48,
- 0xba, 0x7b, 0xd6, 0x9e, 0x35, 0xeb, 0x64, 0x5f, 0x26, 0xfb, 0x36, 0x93, 0xe4, 0xa5, 0xe7, 0xd4,
- 0xad, 0x02, 0x50, 0x00, 0x09, 0x48, 0x7e, 0x12, 0x51, 0xf5, 0x7d, 0xb7, 0x6e, 0x15, 0xbe, 0xba,
- 0xb7, 0x6e, 0x41, 0x00, 0x8e, 0x39, 0x71, 0x56, 0x46, 0x63, 0xdb, 0xb1, 0x49, 0x96, 0xfe, 0xee,
- 0xb4, 0x9d, 0x76, 0xf9, 0x3a, 0xa4, 0x37, 0xed, 0x86, 0x75, 0x34, 0x24, 0x57, 0x21, 0xd1, 0xb5,
- 0xed, 0x92, 0xa4, 0xca, 0x95, 0x79, 0x6d, 0x6e, 0xc5, 0x45, 0xac, 0x6c, 0x34, 0x9b, 0x06, 0xed,
- 0x29, 0xdf, 0x81, 0xfc, 0xa6, 0xbd, 0x6f, 0x4e, 0x9c, 0x8d, 0xbe, 0x39, 0xe8, 0x90, 0x45, 0x48,
- 0x3d, 0x6d, 0x1f, 0x98, 0x03, 0x64, 0xe4, 0x8c, 0xd4, 0x80, 0x3e, 0x10, 0x02, 0xc9, 0xfd, 0x93,
- 0x91, 0x59, 0x92, 0xb1, 0x31, 0xe9, 0x9c, 0x8c, 0xcc, 0xf2, 0xaf, 0x5c, 0xa1, 0x83, 0x50, 0x26,
- 0xb9, 0x0e, 0xc9, 0x2f, 0xf7, 0xad, 0x0e, 0x1f, 0xe5, 0x35, 0x7f, 0x14, 0xd6, 0xbf, 0xf2, 0xe5,
- 0xad, 0x9d, 0xc7, 0x46, 0xf2, 0x79, 0xdf, 0x42, 0xfb, 0xfb, 0xed, 0x83, 0x01, 0x35, 0x25, 0x51,
- 0xfb, 0x0e, 0x7d, 0xa0, 0xad, 0xbb, 0xed, 0x71, 0x7b, 0x58, 0x4a, 0xa8, 0x52, 0x25, 0x65, 0xa4,
- 0x46, 0xf4, 0x81, 0xdc, 0x87, 0x39, 0xc3, 0x7c, 0x71, 0xd4, 0x1f, 0x9b, 0x1d, 0x74, 0xae, 0x94,
- 0x54, 0xe5, 0x4a, 0x7e, 0xda, 0x3e, 0x76, 0x1a, 0x73, 0x63, 0x11, 0xcb, 0xc8, 0x23, 0xb3, 0xed,
- 0xb8, 0xe4, 0x94, 0x9a, 0x88, 0x25, 0x0b, 0x58, 0x4a, 0x6e, 0x8e, 0x9c, 0xbe, 0x6d, 0xb5, 0x07,
- 0x8c, 0x9c, 0x56, 0xa5, 0x18, 0xb2, 0x2d, 0x62, 0xc9, 0x9b, 0x50, 0xdc, 0x68, 0x3d, 0xb4, 0xed,
- 0x41, 0xcb, 0xf5, 0xa8, 0x04, 0xaa, 0x5c, 0xc9, 0x1a, 0x73, 0x5d, 0xda, 0xea, 0x4e, 0x89, 0x54,
- 0x40, 0xd9, 0x68, 0x6d, 0x59, 0x4e, 0x55, 0xf3, 0x81, 0x79, 0x55, 0xae, 0xa4, 0x8c, 0xf9, 0x2e,
- 0x36, 0x4f, 0x21, 0x6b, 0xba, 0x8f, 0x2c, 0xa8, 0x72, 0x25, 0xc1, 0x90, 0x35, 0xdd, 0x43, 0xde,
- 0x02, 0xb2, 0xd1, 0xda, 0xe8, 0x1f, 0x9b, 0x1d, 0xd1, 0xea, 0x9c, 0x2a, 0x57, 0x32, 0x86, 0xd2,
- 0xe5, 0x1d, 0x33, 0xd0, 0xa2, 0xe5, 0x79, 0x55, 0xae, 0xa4, 0x5d, 0xb4, 0x60, 0xfb, 0x06, 0x2c,
- 0x6c, 0xb4, 0xde, 0xed, 0x07, 0x1d, 0x2e, 0xaa, 0x72, 0x65, 0xce, 0x28, 0x76, 0x59, 0xfb, 0x34,
- 0x56, 0x34, 0xac, 0xa8, 0x72, 0x25, 0xc9, 0xb1, 0x82, 0x5d, 0x9c, 0xdd, 0xc6, 0xc0, 0x6e, 0x3b,
- 0x3e, 0x74, 0x41, 0x95, 0x2b, 0xb2, 0x31, 0xdf, 0xc5, 0xe6, 0xa0, 0xd5, 0xc7, 0xf6, 0xd1, 0xc1,
- 0xc0, 0xf4, 0xa1, 0x44, 0x95, 0x2b, 0x92, 0x51, 0xec, 0xb2, 0xf6, 0x20, 0x76, 0xcf, 0x19, 0xf7,
- 0xad, 0x9e, 0x8f, 0x3d, 0x8f, 0xfa, 0x2d, 0x76, 0x59, 0x7b, 0xd0, 0x83, 0x87, 0x27, 0x8e, 0x39,
- 0xf1, 0xa1, 0xa6, 0x2a, 0x57, 0x0a, 0xc6, 0x7c, 0x17, 0x9b, 0x43, 0x56, 0x43, 0x6b, 0xd0, 0x55,
- 0xe5, 0xca, 0x02, 0xb5, 0x3a, 0x63, 0x0d, 0xf6, 0x42, 0x6b, 0xd0, 0x53, 0xe5, 0x0a, 0xe1, 0x58,
- 0x61, 0x0d, 0x44, 0xcd, 0x30, 0x21, 0x96, 0x16, 0xd5, 0x84, 0xa0, 0x19, 0xd6, 0x18, 0xd4, 0x0c,
- 0x07, 0xbe, 0xa6, 0x26, 0x44, 0xcd, 0x84, 0x90, 0x38, 0x38, 0x47, 0x5e, 0x50, 0x13, 0xa2, 0x66,
- 0x38, 0x32, 0xa4, 0x19, 0x8e, 0x7d, 0x5d, 0x4d, 0x04, 0x35, 0x33, 0x85, 0x16, 0x2d, 0x97, 0xd4,
- 0x44, 0x50, 0x33, 0x1c, 0x1d, 0xd4, 0x0c, 0x07, 0x5f, 0x54, 0x13, 0x01, 0xcd, 0x84, 0xb1, 0xa2,
- 0xe1, 0x25, 0x35, 0x11, 0xd0, 0x8c, 0x38, 0x3b, 0x57, 0x33, 0x1c, 0xba, 0xac, 0x26, 0x44, 0xcd,
- 0x88, 0x56, 0x3d, 0xcd, 0x70, 0xe8, 0x25, 0x35, 0x11, 0xd0, 0x8c, 0x88, 0xf5, 0x34, 0xc3, 0xb1,
- 0x97, 0xd5, 0x44, 0x40, 0x33, 0x1c, 0x7b, 0x5d, 0xd4, 0x0c, 0x87, 0x7e, 0x2c, 0xa9, 0x09, 0x51,
- 0x34, 0x1c, 0x7a, 0x33, 0x20, 0x1a, 0x8e, 0xfd, 0x84, 0x62, 0x45, 0xd5, 0x84, 0xc1, 0xe2, 0x2a,
- 0x7c, 0x4a, 0xc1, 0xa2, 0x6c, 0x38, 0xd8, 0x97, 0x8d, 0x1b, 0x82, 0x4a, 0x57, 0x54, 0xc9, 0x93,
- 0x8d, 0x1b, 0xc3, 0x44, 0xd9, 0x78, 0xc0, 0xab, 0x18, 0x6a, 0xb9, 0x6c, 0xa6, 0x90, 0x35, 0xdd,
- 0x47, 0xaa, 0xaa, 0xe4, 0xcb, 0xc6, 0x43, 0x06, 0x64, 0xe3, 0x61, 0xaf, 0xa9, 0x92, 0x28, 0x9b,
- 0x19, 0x68, 0xd1, 0x72, 0x59, 0x95, 0x44, 0xd9, 0x78, 0x68, 0x51, 0x36, 0x1e, 0xf8, 0x0b, 0xaa,
- 0x24, 0xc8, 0x66, 0x1a, 0x2b, 0x1a, 0xfe, 0xa2, 0x2a, 0x09, 0xb2, 0x09, 0xce, 0x8e, 0xc9, 0xc6,
- 0x83, 0xbe, 0xa1, 0x4a, 0xbe, 0x6c, 0x82, 0x56, 0xb9, 0x6c, 0x3c, 0xe8, 0x9b, 0xaa, 0x24, 0xc8,
- 0x26, 0x88, 0xe5, 0xb2, 0xf1, 0xb0, 0x6f, 0x61, 0x7e, 0x73, 0x65, 0xe3, 0x61, 0x05, 0xd9, 0x78,
- 0xd0, 0xdf, 0xa1, 0xb9, 0xd0, 0x93, 0x8d, 0x07, 0x15, 0x65, 0xe3, 0x61, 0x7f, 0x97, 0x62, 0x7d,
- 0xd9, 0x4c, 0x83, 0xc5, 0x55, 0xf8, 0x3d, 0x0a, 0xf6, 0x65, 0xe3, 0x81, 0x57, 0xd0, 0x09, 0x2a,
- 0x9b, 0x8e, 0xd9, 0x6d, 0x1f, 0x0d, 0xa8, 0xc4, 0x2a, 0x54, 0x37, 0xf5, 0xa4, 0x33, 0x3e, 0x32,
- 0xa9, 0x27, 0xb6, 0x3d, 0x78, 0xec, 0xf6, 0x91, 0x15, 0x6a, 0x9c, 0xc9, 0xc7, 0x27, 0x5c, 0xa7,
- 0xfa, 0xa9, 0xcb, 0x55, 0xcd, 0x28, 0x32, 0x0d, 0x4d, 0xe3, 0x6b, 0xba, 0x80, 0xbf, 0x41, 0x55,
- 0x54, 0x97, 0x6b, 0x3a, 0xc3, 0xd7, 0x74, 0x1f, 0x5f, 0x85, 0xf3, 0xbe, 0x94, 0x7c, 0xc6, 0x4d,
- 0xaa, 0xa5, 0x7a, 0xa2, 0xaa, 0xad, 0x1a, 0x0b, 0xae, 0xa0, 0x66, 0x91, 0x02, 0xc3, 0xdc, 0xa2,
- 0x92, 0xaa, 0x27, 0x6a, 0xba, 0x47, 0x12, 0x47, 0xd2, 0xa8, 0x0c, 0xb9, 0xb0, 0x7c, 0xce, 0x6d,
- 0xaa, 0xac, 0x7a, 0xb2, 0xaa, 0xad, 0xae, 0x1a, 0x0a, 0xd7, 0xd7, 0x0c, 0x4e, 0x60, 0x9c, 0x15,
- 0xaa, 0xb0, 0x7a, 0xb2, 0xa6, 0x7b, 0x9c, 0xe0, 0x38, 0x0b, 0xae, 0xd0, 0x7c, 0xca, 0x97, 0xa8,
- 0xd2, 0xea, 0xe9, 0xea, 0x9a, 0xbe, 0xb6, 0x7e, 0xcf, 0x28, 0x32, 0xc5, 0xf9, 0x1c, 0x9d, 0x8e,
- 0xc3, 0x25, 0xe7, 0x93, 0x56, 0xa9, 0xe6, 0xea, 0x69, 0xed, 0xce, 0xda, 0x5d, 0xed, 0xae, 0xa1,
- 0x70, 0xed, 0xf9, 0xac, 0x77, 0x28, 0x8b, 0x8b, 0xcf, 0x67, 0xad, 0x51, 0xf5, 0xd5, 0x95, 0x67,
- 0xe6, 0x60, 0x60, 0xdf, 0x52, 0xcb, 0x2f, 0xed, 0xf1, 0xa0, 0x73, 0xad, 0x0c, 0x86, 0xc2, 0xf5,
- 0x28, 0x8e, 0xba, 0xe0, 0x0a, 0xd2, 0xa7, 0xff, 0x1a, 0x3d, 0x87, 0x15, 0xea, 0x99, 0x87, 0xfd,
- 0x9e, 0x65, 0x4f, 0x4c, 0xa3, 0xc8, 0xa4, 0x19, 0x5a, 0x93, 0xbd, 0xf0, 0x3a, 0xfe, 0x3a, 0xa5,
- 0x2d, 0xd4, 0x13, 0xb7, 0xab, 0x1a, 0x1d, 0x69, 0xd6, 0x3a, 0xee, 0x85, 0xd7, 0xf1, 0x37, 0x28,
- 0x87, 0xd4, 0x13, 0xb7, 0x6b, 0x3a, 0xe7, 0x88, 0xeb, 0x78, 0x07, 0x2e, 0x84, 0xf2, 0x62, 0x6b,
- 0xd4, 0x3e, 0x7c, 0x6e, 0x76, 0x4a, 0x1a, 0x4d, 0x8f, 0x0f, 0x65, 0x45, 0x32, 0xce, 0x07, 0x52,
- 0xe4, 0x2e, 0x76, 0x93, 0x7b, 0xf0, 0x7a, 0x38, 0x51, 0xba, 0xcc, 0x2a, 0xcd, 0x97, 0xc8, 0x5c,
- 0x0c, 0xe6, 0xcc, 0x10, 0x55, 0x08, 0xc0, 0x2e, 0x55, 0xa7, 0x09, 0xd4, 0xa7, 0xfa, 0x91, 0x98,
- 0x53, 0x7f, 0x06, 0x2e, 0x4e, 0xa7, 0x52, 0x97, 0xbc, 0x4e, 0x33, 0x2a, 0x92, 0x2f, 0x84, 0xb3,
- 0xea, 0x14, 0x7d, 0xc6, 0xd8, 0x35, 0x9a, 0x62, 0x45, 0xfa, 0xd4, 0xe8, 0xf7, 0xa1, 0x34, 0x95,
- 0x6c, 0x5d, 0xf6, 0x1d, 0x9a, 0x73, 0x91, 0xfd, 0x5a, 0x28, 0xef, 0x86, 0xc9, 0x33, 0x86, 0xbe,
- 0x4b, 0x93, 0xb0, 0x40, 0x9e, 0x1a, 0x19, 0x97, 0x2c, 0x98, 0x8e, 0x5d, 0xee, 0x3d, 0x9a, 0x95,
- 0xf9, 0x92, 0x05, 0x32, 0xb3, 0x38, 0x6e, 0x28, 0x3f, 0xbb, 0xdc, 0x3a, 0x4d, 0xd3, 0x7c, 0xdc,
- 0x60, 0xaa, 0xe6, 0xe4, 0xb7, 0x29, 0x79, 0x6f, 0xf6, 0x8c, 0x7f, 0x9c, 0xa0, 0x09, 0x96, 0xb3,
- 0xf7, 0x66, 0x4d, 0xd9, 0x63, 0xcf, 0x98, 0xf2, 0x4f, 0x28, 0x9b, 0x08, 0xec, 0xa9, 0x39, 0x3f,
- 0x06, 0xaf, 0xe2, 0xe8, 0x8d, 0xed, 0xa3, 0x51, 0x69, 0x43, 0x95, 0x2b, 0xa0, 0x5d, 0x99, 0xaa,
- 0x7e, 0xdc, 0x43, 0xde, 0x26, 0x45, 0x19, 0x41, 0x12, 0xb3, 0xc2, 0xec, 0x32, 0x2b, 0xbb, 0x6a,
- 0x22, 0xc2, 0x0a, 0x43, 0x79, 0x56, 0x04, 0x12, 0xb5, 0xe2, 0x06, 0x7d, 0x66, 0xe5, 0x03, 0x55,
- 0x9a, 0x69, 0xc5, 0x4d, 0x01, 0xdc, 0x4a, 0x80, 0xb4, 0xb4, 0xee, 0xd7, 0x5b, 0xd8, 0x4f, 0xbe,
- 0x18, 0x2e, 0xc0, 0x36, 0xf1, 0xfc, 0x1c, 0xac, 0xb4, 0x18, 0x4d, 0x70, 0x6e, 0x9a, 0xf6, 0xb3,
- 0x11, 0xb4, 0x80, 0x37, 0xd3, 0xb4, 0x9f, 0x9b, 0x41, 0x2b, 0xff, 0xa6, 0x04, 0x49, 0x5a, 0x4f,
- 0x92, 0x2c, 0x24, 0xdf, 0x6b, 0x6e, 0x3d, 0x56, 0xce, 0xd1, 0x5f, 0x0f, 0x9b, 0xcd, 0xa7, 0x8a,
- 0x44, 0x72, 0x90, 0x7a, 0xf8, 0x95, 0xfd, 0xc6, 0x9e, 0x22, 0x93, 0x22, 0xe4, 0x37, 0xb6, 0x76,
- 0x36, 0x1b, 0xc6, 0xae, 0xb1, 0xb5, 0xb3, 0xaf, 0x24, 0x68, 0xdf, 0xc6, 0xd3, 0xe6, 0x83, 0x7d,
- 0x25, 0x49, 0x32, 0x90, 0xa0, 0x6d, 0x29, 0x02, 0x90, 0xde, 0xdb, 0x37, 0xb6, 0x76, 0x36, 0x95,
- 0x34, 0xb5, 0xb2, 0xbf, 0xb5, 0xdd, 0x50, 0x32, 0x14, 0xb9, 0xff, 0xee, 0xee, 0xd3, 0x86, 0x92,
- 0xa5, 0x3f, 0x1f, 0x18, 0xc6, 0x83, 0xaf, 0x28, 0x39, 0x4a, 0xda, 0x7e, 0xb0, 0xab, 0x00, 0x76,
- 0x3f, 0x78, 0xf8, 0xb4, 0xa1, 0xe4, 0x49, 0x01, 0xb2, 0x1b, 0xef, 0xee, 0x3c, 0xda, 0xdf, 0x6a,
- 0xee, 0x28, 0x85, 0xf2, 0x6f, 0xc9, 0x00, 0x9b, 0xf6, 0xde, 0xf3, 0xfe, 0x08, 0xab, 0xe2, 0xcb,
- 0x00, 0x93, 0xe7, 0xfd, 0x51, 0x0b, 0xa5, 0xc7, 0x2b, 0xbb, 0x1c, 0x6d, 0xc1, 0xa0, 0x43, 0xae,
- 0x41, 0x01, 0xbb, 0xbb, 0x2c, 0x14, 0x60, 0x41, 0x97, 0x31, 0xf2, 0xb4, 0x8d, 0x47, 0x87, 0x20,
- 0xa4, 0xa6, 0x63, 0x1d, 0x97, 0x16, 0x20, 0x35, 0x9d, 0x5c, 0x05, 0x7c, 0x6c, 0x4d, 0x30, 0xac,
- 0x63, 0xed, 0x96, 0x33, 0x70, 0x5c, 0x16, 0xe8, 0xc9, 0xdb, 0x80, 0x63, 0x32, 0x59, 0x14, 0xa7,
- 0x25, 0xea, 0xba, 0xbb, 0x42, 0x7f, 0x30, 0x59, 0xf8, 0x84, 0xa5, 0x26, 0xe4, 0xbc, 0x76, 0x3a,
- 0x16, 0xb6, 0xf2, 0x19, 0x29, 0x38, 0x23, 0xc0, 0x26, 0x6f, 0x4a, 0x0c, 0xc0, 0xbd, 0x59, 0x40,
- 0x6f, 0x18, 0x89, 0xb9, 0x53, 0xbe, 0x0c, 0x73, 0x3b, 0xb6, 0xc5, 0xb6, 0x10, 0xae, 0x52, 0x01,
- 0xa4, 0x76, 0x49, 0xc2, 0x12, 0x46, 0x6a, 0x97, 0xaf, 0x00, 0x08, 0x7d, 0x0a, 0x48, 0x07, 0xac,
- 0x0f, 0x37, 0xa2, 0x74, 0x50, 0xbe, 0x09, 0xe9, 0xed, 0xf6, 0xf1, 0x7e, 0xbb, 0x47, 0xae, 0x01,
- 0x0c, 0xda, 0x13, 0xa7, 0xd5, 0x45, 0xa9, 0x7c, 0xfe, 0xf9, 0xe7, 0x9f, 0x4b, 0x78, 0xe2, 0xca,
- 0xd1, 0x56, 0x26, 0x95, 0x17, 0x00, 0xcd, 0x41, 0x67, 0xdb, 0x9c, 0x4c, 0xda, 0x3d, 0x93, 0x54,
- 0x21, 0x6d, 0x99, 0x13, 0x9a, 0x72, 0x24, 0x2c, 0xe6, 0x97, 0xfd, 0x55, 0xf0, 0x51, 0x2b, 0x3b,
- 0x08, 0x31, 0x38, 0x94, 0x28, 0x90, 0xb0, 0x8e, 0x86, 0x78, 0x59, 0x91, 0x32, 0xe8, 0xcf, 0xa5,
- 0x4b, 0x90, 0x66, 0x18, 0x42, 0x20, 0x69, 0xb5, 0x87, 0x66, 0x89, 0x8d, 0x8b, 0xbf, 0xcb, 0xbf,
- 0x2a, 0x01, 0xec, 0x98, 0x2f, 0xcf, 0x30, 0xa6, 0x8f, 0x8a, 0x19, 0x33, 0xc1, 0xc6, 0xbc, 0x1f,
- 0x37, 0x26, 0xd5, 0x59, 0xd7, 0xb6, 0x3b, 0x2d, 0xf6, 0x8a, 0xd9, 0xbd, 0x4a, 0x8e, 0xb6, 0xe0,
- 0x5b, 0x2b, 0x7f, 0x00, 0x85, 0x2d, 0xcb, 0x32, 0xc7, 0xae, 0x4f, 0x04, 0x92, 0xcf, 0xec, 0x89,
- 0xc3, 0x2f, 0x78, 0xf0, 0x37, 0x29, 0x41, 0x72, 0x64, 0x8f, 0x1d, 0x36, 0xcf, 0x7a, 0x52, 0x5f,
- 0x5d, 0x5d, 0x35, 0xb0, 0x85, 0x5c, 0x82, 0xdc, 0xa1, 0x6d, 0x59, 0xe6, 0x21, 0x9d, 0x44, 0x02,
- 0x6b, 0x0b, 0xbf, 0xa1, 0xfc, 0xcb, 0x12, 0x14, 0x9a, 0xce, 0x33, 0xdf, 0xb8, 0x02, 0x89, 0xe7,
- 0xe6, 0x09, 0xba, 0x97, 0x30, 0xe8, 0x4f, 0xb2, 0x08, 0xa9, 0x9f, 0x6f, 0x0f, 0x8e, 0xd8, 0x85,
- 0x4f, 0xc1, 0x60, 0x0f, 0xe4, 0x02, 0xa4, 0x5f, 0x9a, 0xfd, 0xde, 0x33, 0x07, 0x6d, 0xca, 0x06,
- 0x7f, 0x22, 0xb7, 0x20, 0xd5, 0xa7, 0xce, 0x96, 0x92, 0xb8, 0x5e, 0x17, 0xfc, 0xf5, 0x12, 0xe7,
- 0x60, 0x30, 0xd0, 0x8d, 0x6c, 0xb6, 0xa3, 0x7c, 0xf4, 0xd1, 0x47, 0x1f, 0xc9, 0xe5, 0x2e, 0x2c,
- 0xba, 0xb1, 0x23, 0x30, 0xd9, 0x1d, 0x28, 0x0d, 0x4c, 0xbb, 0xd5, 0xed, 0x5b, 0xed, 0xc1, 0xe0,
- 0xa4, 0xf5, 0xd2, 0xb6, 0x5a, 0x6d, 0xab, 0x65, 0x4f, 0x0e, 0xdb, 0x63, 0x5c, 0x80, 0xe8, 0x21,
- 0x16, 0x07, 0xa6, 0xbd, 0xc1, 0x68, 0xef, 0xdb, 0xd6, 0x03, 0xab, 0x49, 0x39, 0xe5, 0x3f, 0x48,
- 0x42, 0x6e, 0xfb, 0xc4, 0xb5, 0xbe, 0x08, 0xa9, 0x43, 0xfb, 0xc8, 0x62, 0x6b, 0x99, 0x32, 0xd8,
- 0x83, 0xf7, 0x8e, 0x64, 0xe1, 0x1d, 0x2d, 0x42, 0xea, 0xc5, 0x91, 0xed, 0x98, 0x38, 0xdd, 0x9c,
- 0xc1, 0x1e, 0xe8, 0x6a, 0x8d, 0x4c, 0xa7, 0x94, 0xc4, 0x0a, 0x93, 0xfe, 0xf4, 0xe7, 0x9f, 0x3a,
- 0xc3, 0xfc, 0xc9, 0x0a, 0xa4, 0x6d, 0xba, 0xfa, 0x93, 0x52, 0x1a, 0x2f, 0xb7, 0x04, 0xb8, 0xf8,
- 0x56, 0x0c, 0x8e, 0x22, 0x5b, 0xb0, 0xf0, 0xd2, 0x6c, 0x0d, 0x8f, 0x26, 0x4e, 0xab, 0x67, 0xb7,
- 0x3a, 0xa6, 0x39, 0x32, 0xc7, 0xa5, 0x39, 0x1c, 0x49, 0x88, 0x09, 0xb3, 0x16, 0xd2, 0x98, 0x7f,
- 0x69, 0x6e, 0x1f, 0x4d, 0x9c, 0x4d, 0xfb, 0x31, 0xb2, 0x48, 0x15, 0x72, 0x63, 0x93, 0x46, 0x02,
- 0xea, 0x6c, 0x21, 0x3c, 0x7a, 0x80, 0x9a, 0x1d, 0x9b, 0x23, 0x6c, 0x20, 0xeb, 0x90, 0x3d, 0xe8,
- 0x3f, 0x37, 0x27, 0xcf, 0xcc, 0x4e, 0x29, 0xa3, 0x4a, 0x95, 0x79, 0xed, 0xa2, 0xcf, 0xf1, 0x96,
- 0x75, 0xe5, 0x91, 0x3d, 0xb0, 0xc7, 0x86, 0x07, 0x25, 0xf7, 0x21, 0x37, 0xb1, 0x87, 0x26, 0xd3,
- 0x77, 0x16, 0x33, 0xdb, 0xe5, 0x59, 0xbc, 0x3d, 0x7b, 0x68, 0xba, 0x11, 0xcc, 0xc5, 0x93, 0x65,
- 0xe6, 0xe8, 0x01, 0x3d, 0xbf, 0x96, 0x00, 0xeb, 0x73, 0xea, 0x10, 0x9e, 0x67, 0xc9, 0x12, 0x75,
- 0xa8, 0xd7, 0xa5, 0xc7, 0x92, 0x52, 0x1e, 0x8b, 0x3b, 0xef, 0x79, 0xe9, 0x16, 0xe4, 0x3c, 0x83,
- 0x7e, 0xe8, 0x63, 0xe1, 0x26, 0x87, 0xf1, 0x80, 0x85, 0x3e, 0x16, 0x6b, 0xde, 0x80, 0x14, 0xba,
- 0x4d, 0xd3, 0x84, 0xd1, 0xa0, 0x59, 0x29, 0x07, 0xa9, 0x4d, 0xa3, 0xd1, 0xd8, 0x51, 0x24, 0x4c,
- 0x50, 0x4f, 0xdf, 0x6d, 0x28, 0xb2, 0xa0, 0xd8, 0xdf, 0x96, 0x20, 0xd1, 0x38, 0x46, 0xb5, 0xd0,
- 0x69, 0xb8, 0x3b, 0x9a, 0xfe, 0xd6, 0x6a, 0x90, 0x1c, 0xda, 0x63, 0x93, 0x9c, 0x9f, 0x31, 0xcb,
- 0x52, 0x0f, 0xdf, 0x97, 0x70, 0x95, 0xdb, 0x38, 0x76, 0x0c, 0xc4, 0x6b, 0x6f, 0x41, 0xd2, 0x31,
- 0x8f, 0x9d, 0xd9, 0xbc, 0x67, 0x6c, 0x00, 0x0a, 0xd0, 0x6e, 0x42, 0xda, 0x3a, 0x1a, 0x1e, 0x98,
- 0xe3, 0xd9, 0xd0, 0x3e, 0x4e, 0x8f, 0x43, 0xca, 0xef, 0x81, 0xf2, 0xc8, 0x1e, 0x8e, 0x06, 0xe6,
- 0x71, 0xe3, 0xd8, 0x31, 0xad, 0x49, 0xdf, 0xb6, 0xa8, 0x9e, 0xbb, 0xfd, 0x31, 0x46, 0x11, 0xbc,
- 0xb0, 0xc5, 0x07, 0xba, 0xab, 0x27, 0xe6, 0xa1, 0x6d, 0x75, 0x78, 0xc0, 0xe4, 0x4f, 0x14, 0xed,
- 0x3c, 0xeb, 0x8f, 0x69, 0x00, 0xa1, 0x71, 0x9e, 0x3d, 0x94, 0x37, 0xa1, 0xc8, 0x0f, 0xfa, 0x13,
- 0x3e, 0x70, 0xf9, 0x06, 0x14, 0xdc, 0x26, 0xbc, 0xbd, 0xce, 0x42, 0xf2, 0x83, 0x86, 0xd1, 0x54,
- 0xce, 0xd1, 0x65, 0x6d, 0xee, 0x34, 0x14, 0x89, 0xfe, 0xd8, 0x7f, 0xbf, 0x19, 0x58, 0xca, 0x4b,
- 0x50, 0xf0, 0x7c, 0xdf, 0x33, 0x1d, 0xec, 0xa1, 0x09, 0x21, 0x53, 0x97, 0xb3, 0x52, 0x39, 0x03,
- 0xa9, 0xc6, 0x70, 0xe4, 0x9c, 0x94, 0x7f, 0x11, 0xf2, 0x1c, 0xf4, 0xb4, 0x3f, 0x71, 0xc8, 0x1d,
- 0xc8, 0x0c, 0xf9, 0x7c, 0x25, 0x3c, 0x73, 0x89, 0x9a, 0xf2, 0x71, 0xee, 0x6f, 0xc3, 0x45, 0x2f,
- 0x55, 0x21, 0x23, 0xc4, 0x52, 0xbe, 0xd5, 0x65, 0x71, 0xab, 0xb3, 0xa0, 0x90, 0x10, 0x82, 0x42,
- 0x79, 0x1b, 0x32, 0x2c, 0x03, 0x4e, 0x30, 0xab, 0xb3, 0x7a, 0x8d, 0x89, 0x89, 0xbd, 0xf9, 0x3c,
- 0x6b, 0x63, 0x57, 0xc8, 0x57, 0x21, 0x8f, 0x82, 0xe5, 0x08, 0x16, 0x3a, 0x01, 0x9b, 0x98, 0xdc,
- 0x7e, 0x3f, 0x05, 0x59, 0x77, 0xa5, 0xc8, 0x32, 0xa4, 0x59, 0x91, 0x84, 0xa6, 0xdc, 0x22, 0x3e,
- 0x85, 0x65, 0x11, 0x59, 0x86, 0x0c, 0x2f, 0x84, 0x78, 0x74, 0xa7, 0x15, 0x7b, 0x9a, 0x15, 0x3e,
- 0x5e, 0x67, 0x4d, 0xc7, 0xc0, 0xc4, 0xca, 0xf3, 0x34, 0x2b, 0x6d, 0x88, 0x0a, 0x39, 0xaf, 0x98,
- 0xc1, 0x78, 0xcc, 0x6b, 0xf1, 0xac, 0x5b, 0xbd, 0x08, 0x88, 0x9a, 0x8e, 0x11, 0x8b, 0x17, 0xde,
- 0xd9, 0xae, 0x7f, 0x3c, 0xc9, 0xba, 0x25, 0x09, 0xde, 0xa1, 0xbb, 0x55, 0x76, 0x86, 0x17, 0x21,
- 0x3e, 0xa0, 0xa6, 0x63, 0x48, 0x70, 0x4b, 0xea, 0x0c, 0x2f, 0x34, 0xc8, 0x55, 0xea, 0x22, 0x16,
- 0x0e, 0xb8, 0xf5, 0xfd, 0xfa, 0x39, 0xcd, 0xca, 0x09, 0x72, 0x8d, 0x5a, 0x60, 0xd5, 0x01, 0xee,
- 0x4b, 0xbf, 0x58, 0xce, 0xf0, 0xa2, 0x81, 0xdc, 0xa4, 0x10, 0xb6, 0xfc, 0x25, 0x88, 0xa8, 0x8c,
- 0x33, 0xbc, 0x32, 0x26, 0x2a, 0x1d, 0x10, 0xc3, 0x03, 0x86, 0x04, 0xa1, 0x0a, 0x4e, 0xb3, 0x2a,
- 0x98, 0x5c, 0x41, 0x73, 0x6c, 0x52, 0x05, 0xbf, 0xe2, 0xcd, 0xf0, 0x2a, 0xc3, 0xef, 0xc7, 0x23,
- 0x9b, 0x57, 0xdd, 0x66, 0x78, 0x1d, 0x41, 0x6a, 0xf4, 0x7d, 0x51, 0x7d, 0x97, 0xe6, 0x31, 0x08,
- 0x96, 0x7c, 0xe1, 0xb9, 0xef, 0x94, 0xc5, 0xc0, 0x3a, 0x8b, 0x20, 0x46, 0xaa, 0x8b, 0xbb, 0x61,
- 0x89, 0xf2, 0x76, 0xfb, 0x56, 0xb7, 0x54, 0xc4, 0x95, 0x48, 0xf4, 0xad, 0xae, 0x91, 0xea, 0xd2,
- 0x16, 0xa6, 0x81, 0x1d, 0xda, 0xa7, 0x60, 0x5f, 0xf2, 0x36, 0xeb, 0xa4, 0x4d, 0xa4, 0x04, 0xa9,
- 0x8d, 0xd6, 0x4e, 0xdb, 0x2a, 0x2d, 0x30, 0x9e, 0xd5, 0xb6, 0x8c, 0x64, 0x77, 0xa7, 0x6d, 0x91,
- 0xb7, 0x20, 0x31, 0x39, 0x3a, 0x28, 0x91, 0xf0, 0xe7, 0x8d, 0xbd, 0xa3, 0x03, 0xd7, 0x15, 0x83,
- 0x22, 0xc8, 0x32, 0x64, 0x27, 0xce, 0xb8, 0xf5, 0x0b, 0xe6, 0xd8, 0x2e, 0x9d, 0xc7, 0x25, 0x3c,
- 0x67, 0x64, 0x26, 0xce, 0xf8, 0x03, 0x73, 0x6c, 0x9f, 0x31, 0xf8, 0x95, 0xaf, 0x40, 0x5e, 0xb0,
- 0x4b, 0x8a, 0x20, 0x59, 0xec, 0xa4, 0x50, 0x97, 0xee, 0x18, 0x92, 0x55, 0xde, 0x87, 0x82, 0x5b,
- 0x48, 0xe0, 0x7c, 0x35, 0xba, 0x93, 0x06, 0xf6, 0x18, 0xf7, 0xe7, 0xbc, 0x76, 0x49, 0x4c, 0x51,
- 0x3e, 0x8c, 0xa7, 0x0b, 0x06, 0x2d, 0x2b, 0x21, 0x57, 0xa4, 0xf2, 0x0f, 0x25, 0x28, 0x6c, 0xdb,
- 0x63, 0xff, 0x96, 0x77, 0x11, 0x52, 0x07, 0xb6, 0x3d, 0x98, 0xa0, 0xd9, 0xac, 0xc1, 0x1e, 0xc8,
- 0x1b, 0x50, 0xc0, 0x1f, 0x6e, 0x01, 0x28, 0x7b, 0xf7, 0x0b, 0x79, 0x6c, 0xe7, 0x55, 0x1f, 0x81,
- 0x64, 0xdf, 0x72, 0x26, 0x3c, 0x92, 0xe1, 0x6f, 0xf2, 0x05, 0xc8, 0xd3, 0xbf, 0x2e, 0x33, 0xe9,
- 0x1d, 0x58, 0x81, 0x36, 0x73, 0xe2, 0x5b, 0x30, 0x87, 0x6f, 0xdf, 0x83, 0x65, 0xbc, 0xbb, 0x84,
- 0x02, 0xeb, 0xe0, 0xc0, 0x12, 0x64, 0x58, 0x28, 0x98, 0xe0, 0x27, 0xab, 0x9c, 0xe1, 0x3e, 0xd2,
- 0xf0, 0x8a, 0x95, 0x00, 0x4b, 0xf7, 0x19, 0x83, 0x3f, 0x95, 0x1f, 0x40, 0x16, 0xb3, 0x54, 0x73,
- 0xd0, 0x21, 0x65, 0x90, 0x7a, 0x25, 0x13, 0x73, 0xe4, 0xa2, 0x70, 0xcc, 0xe7, 0xdd, 0x2b, 0x9b,
- 0x86, 0xd4, 0x5b, 0x5a, 0x00, 0x69, 0x93, 0x9e, 0xbb, 0x8f, 0x79, 0x98, 0x96, 0x8e, 0xcb, 0x4d,
- 0x6e, 0x62, 0xc7, 0x7c, 0x19, 0x67, 0x62, 0xc7, 0x7c, 0xc9, 0x4c, 0x5c, 0x9d, 0x32, 0x41, 0x9f,
- 0x4e, 0xf8, 0xf7, 0x3b, 0xe9, 0x84, 0x9e, 0xf3, 0x71, 0x7b, 0xf6, 0xad, 0xde, 0xae, 0xdd, 0xb7,
- 0xf0, 0x9c, 0xdf, 0xc5, 0x73, 0x92, 0x64, 0x48, 0xdd, 0xf2, 0x67, 0x49, 0x98, 0xe7, 0x41, 0xf4,
- 0xfd, 0xbe, 0xf3, 0x6c, 0xbb, 0x3d, 0x22, 0x4f, 0xa1, 0x40, 0xe3, 0x67, 0x6b, 0xd8, 0x1e, 0x8d,
- 0xe8, 0x46, 0x95, 0xf0, 0x50, 0x71, 0x7d, 0x2a, 0x28, 0x73, 0xfc, 0xca, 0x4e, 0x7b, 0x68, 0x6e,
- 0x33, 0x6c, 0xc3, 0x72, 0xc6, 0x27, 0x46, 0xde, 0xf2, 0x5b, 0xc8, 0x16, 0xe4, 0x87, 0x93, 0x9e,
- 0x67, 0x4c, 0x46, 0x63, 0x95, 0x48, 0x63, 0xdb, 0x93, 0x5e, 0xc0, 0x16, 0x0c, 0xbd, 0x06, 0xea,
- 0x18, 0x8d, 0xbc, 0x9e, 0xad, 0xc4, 0x29, 0x8e, 0xd1, 0x20, 0x11, 0x74, 0xec, 0xc0, 0x6f, 0x21,
- 0x8f, 0x01, 0xe8, 0x46, 0x72, 0x6c, 0x5a, 0x24, 0xa1, 0x56, 0xf2, 0xda, 0x9b, 0x91, 0xb6, 0xf6,
- 0x9c, 0xf1, 0xbe, 0xbd, 0xe7, 0x8c, 0x99, 0x21, 0xba, 0x05, 0xf1, 0x71, 0xe9, 0x1d, 0x50, 0xc2,
- 0xf3, 0x17, 0xcf, 0xde, 0xa9, 0x19, 0x67, 0xef, 0x1c, 0x3f, 0x7b, 0xd7, 0xe5, 0xbb, 0xd2, 0xd2,
- 0x7b, 0x50, 0x0c, 0x4d, 0x59, 0xa4, 0x13, 0x46, 0xbf, 0x2d, 0xd2, 0xf3, 0xda, 0xeb, 0xc2, 0xd7,
- 0x63, 0xf1, 0xd5, 0x8a, 0x76, 0xdf, 0x01, 0x25, 0x3c, 0x7d, 0xd1, 0x70, 0x36, 0xa6, 0x26, 0x40,
- 0xfe, 0x7d, 0x98, 0x0b, 0x4c, 0x59, 0x24, 0xe7, 0x4e, 0x99, 0x54, 0xf9, 0x97, 0x52, 0x90, 0x6a,
- 0x5a, 0xa6, 0xdd, 0x25, 0xaf, 0x07, 0x33, 0xe2, 0x93, 0x73, 0x6e, 0x36, 0xbc, 0x18, 0xca, 0x86,
- 0x4f, 0xce, 0x79, 0xb9, 0xf0, 0x62, 0x28, 0x17, 0xba, 0x5d, 0x35, 0x9d, 0x5c, 0x9e, 0xca, 0x84,
- 0x4f, 0xce, 0x09, 0x69, 0xf0, 0xf2, 0x54, 0x1a, 0xf4, 0xbb, 0x6b, 0x3a, 0x0d, 0x9d, 0xc1, 0x1c,
- 0xf8, 0xe4, 0x9c, 0x9f, 0xff, 0x96, 0xc3, 0xf9, 0xcf, 0xeb, 0xac, 0xe9, 0xcc, 0x25, 0x21, 0xf7,
- 0xa1, 0x4b, 0x2c, 0xeb, 0x2d, 0x87, 0xb3, 0x1e, 0xf2, 0x78, 0xbe, 0x5b, 0x0e, 0xe7, 0x3b, 0xec,
- 0xe4, 0xf9, 0xed, 0x62, 0x28, 0xbf, 0xa1, 0x51, 0x96, 0xd8, 0x96, 0xc3, 0x89, 0x8d, 0xf1, 0x04,
- 0x4f, 0xc5, 0xac, 0xe6, 0x75, 0xd6, 0x74, 0xa2, 0x85, 0x52, 0x5a, 0xf4, 0xb9, 0x1e, 0xdf, 0x05,
- 0x86, 0x77, 0x9d, 0x2e, 0x9b, 0x7b, 0xe4, 0x2c, 0xc6, 0x7c, 0x60, 0xc7, 0xd5, 0x74, 0x8f, 0x5c,
- 0x1a, 0x64, 0xba, 0xbc, 0xd4, 0x55, 0x30, 0x46, 0x09, 0xb2, 0xc4, 0x97, 0xbf, 0xb2, 0xd1, 0xc2,
- 0x58, 0x85, 0xf3, 0x62, 0xa7, 0xf7, 0x0a, 0xcc, 0x6d, 0xb4, 0x9e, 0xb6, 0xc7, 0x3d, 0x73, 0xe2,
- 0xb4, 0xf6, 0xdb, 0x3d, 0xef, 0xba, 0x80, 0xbe, 0xff, 0x7c, 0x97, 0xf7, 0xec, 0xb7, 0x7b, 0xe4,
- 0x82, 0x2b, 0xae, 0x0e, 0xf6, 0x4a, 0x5c, 0x5e, 0x4b, 0xaf, 0xd3, 0x45, 0x63, 0xc6, 0x30, 0xea,
- 0x2d, 0xf0, 0xa8, 0xf7, 0x30, 0x03, 0xa9, 0x23, 0xab, 0x6f, 0x5b, 0x0f, 0x73, 0x90, 0x71, 0xec,
- 0xf1, 0xb0, 0xed, 0xd8, 0xe5, 0x1f, 0x49, 0x00, 0x8f, 0xec, 0xe1, 0xf0, 0xc8, 0xea, 0xbf, 0x38,
- 0x32, 0xc9, 0x15, 0xc8, 0x0f, 0xdb, 0xcf, 0xcd, 0xd6, 0xd0, 0x6c, 0x1d, 0x8e, 0xdd, 0x7d, 0x90,
- 0xa3, 0x4d, 0xdb, 0xe6, 0xa3, 0xf1, 0x09, 0x29, 0xb9, 0x87, 0x71, 0xd4, 0x0e, 0x4a, 0x92, 0x1f,
- 0xce, 0x17, 0xf9, 0xf1, 0x32, 0xcd, 0xdf, 0xa1, 0x7b, 0xc0, 0x64, 0x15, 0x43, 0x86, 0xbf, 0x3d,
- 0x7c, 0xa2, 0x92, 0x77, 0xcc, 0xe1, 0xa8, 0x75, 0x88, 0x52, 0xa1, 0x72, 0x48, 0xd1, 0xe7, 0x47,
- 0xe4, 0x36, 0x24, 0x0e, 0xed, 0x01, 0x8a, 0xe4, 0x94, 0xf7, 0x42, 0x71, 0xe4, 0x0d, 0x48, 0x0c,
- 0x27, 0x4c, 0x36, 0x79, 0x6d, 0x41, 0x38, 0x11, 0xb0, 0x24, 0x44, 0x61, 0xc3, 0x49, 0xcf, 0x9b,
- 0xf7, 0x8d, 0x22, 0x24, 0x36, 0x9a, 0x4d, 0x9a, 0xe5, 0x37, 0x9a, 0xcd, 0x35, 0x45, 0xaa, 0x7f,
- 0x09, 0xb2, 0xbd, 0xb1, 0x69, 0xd2, 0xf0, 0x30, 0xbb, 0xba, 0xf8, 0x10, 0xb3, 0x9a, 0x07, 0xaa,
- 0x6f, 0x43, 0xe6, 0x90, 0xd5, 0x17, 0x24, 0xa2, 0x80, 0x2d, 0xfd, 0x21, 0xbb, 0x3e, 0x59, 0xf2,
- 0xbb, 0xc3, 0x15, 0x89, 0xe1, 0xda, 0xa8, 0xef, 0x42, 0x6e, 0xdc, 0x3a, 0xcd, 0xe0, 0xc7, 0x2c,
- 0xbb, 0xc4, 0x19, 0xcc, 0x8e, 0x79, 0x53, 0xbd, 0x01, 0x0b, 0x96, 0xed, 0x7e, 0xb2, 0x68, 0x75,
- 0xd8, 0x1e, 0xbb, 0x38, 0x7d, 0x68, 0x73, 0x8d, 0x9b, 0xec, 0x33, 0xa1, 0x65, 0xf3, 0x0e, 0xb6,
- 0x2b, 0xeb, 0x8f, 0x40, 0x11, 0xcc, 0x60, 0x91, 0x19, 0x67, 0xa5, 0xcb, 0xbe, 0x4b, 0x7a, 0x56,
- 0x70, 0xdf, 0x87, 0x8c, 0xb0, 0x9d, 0x19, 0x63, 0xa4, 0xc7, 0x3e, 0xf2, 0x7a, 0x46, 0x30, 0xd4,
- 0x4d, 0x1b, 0xa1, 0xb1, 0x26, 0xda, 0xc8, 0x33, 0xf6, 0xfd, 0x57, 0x34, 0x52, 0xd3, 0x43, 0xab,
- 0x72, 0x74, 0xaa, 0x2b, 0x7d, 0xf6, 0xf9, 0xd6, 0xb3, 0xc2, 0x02, 0xe0, 0x0c, 0x33, 0xf1, 0xce,
- 0x7c, 0xc8, 0xbe, 0xec, 0x06, 0xcc, 0x4c, 0x79, 0x33, 0x39, 0xd5, 0x9b, 0xe7, 0xec, 0x33, 0xaa,
- 0x67, 0x66, 0x6f, 0x96, 0x37, 0x93, 0x53, 0xbd, 0x19, 0xb0, 0x0f, 0xac, 0x01, 0x33, 0x35, 0xbd,
- 0xbe, 0x09, 0x44, 0x7c, 0xd5, 0x3c, 0x4f, 0xc4, 0xd8, 0x19, 0xb2, 0xcf, 0xe6, 0xfe, 0xcb, 0x66,
- 0x94, 0x59, 0x86, 0xe2, 0x1d, 0xb2, 0xd8, 0x17, 0xf5, 0xa0, 0xa1, 0x9a, 0x5e, 0xdf, 0x82, 0xf3,
- 0xe2, 0xc4, 0xce, 0xe0, 0x92, 0xad, 0x4a, 0x95, 0xa2, 0xb1, 0xe0, 0x4f, 0x8d, 0x73, 0x66, 0x9a,
- 0x8a, 0x77, 0x6a, 0xa4, 0x4a, 0x15, 0x65, 0xca, 0x54, 0x4d, 0xaf, 0x3f, 0x80, 0xa2, 0x60, 0xea,
- 0x00, 0x33, 0x74, 0xb4, 0x99, 0x17, 0xec, 0x5f, 0x1b, 0x3c, 0x33, 0x34, 0xa3, 0x87, 0xdf, 0x18,
- 0xcf, 0x71, 0xd1, 0x46, 0xc6, 0xec, 0xbb, 0xbc, 0xef, 0x0b, 0x32, 0x42, 0x5b, 0x02, 0x2b, 0xed,
- 0x38, 0x2b, 0x13, 0xf6, 0xc5, 0xde, 0x77, 0x85, 0x12, 0xea, 0xfd, 0xc0, 0x74, 0x4c, 0x9a, 0xe4,
- 0x62, 0x6c, 0x38, 0x18, 0x91, 0xdf, 0x8c, 0x04, 0xac, 0x88, 0x57, 0x21, 0xc2, 0xb4, 0xe9, 0x63,
- 0x7d, 0x0b, 0xe6, 0xcf, 0x1e, 0x90, 0x3e, 0x96, 0x58, 0x5d, 0x5c, 0x5d, 0xa1, 0xa5, 0xb3, 0x31,
- 0xd7, 0x09, 0xc4, 0xa5, 0x06, 0xcc, 0x9d, 0x39, 0x28, 0x7d, 0x22, 0xb1, 0xea, 0x92, 0x5a, 0x32,
- 0x0a, 0x9d, 0x60, 0x64, 0x9a, 0x3b, 0x73, 0x58, 0xfa, 0x54, 0x62, 0x57, 0x11, 0xba, 0xe6, 0x19,
- 0x71, 0x23, 0xd3, 0xdc, 0x99, 0xc3, 0xd2, 0x57, 0x59, 0xed, 0x28, 0xeb, 0x55, 0xd1, 0x08, 0xc6,
- 0x82, 0xf9, 0xb3, 0x87, 0xa5, 0xaf, 0x49, 0x78, 0x2d, 0x21, 0xeb, 0xba, 0xb7, 0x2e, 0x5e, 0x64,
- 0x9a, 0x3f, 0x7b, 0x58, 0xfa, 0xba, 0x84, 0x97, 0x17, 0xb2, 0xbe, 0x1e, 0x30, 0x13, 0xf4, 0xe6,
- 0xf4, 0xb0, 0xf4, 0x0d, 0x09, 0xef, 0x13, 0x64, 0xbd, 0xe6, 0x99, 0xd9, 0x9b, 0xf2, 0xe6, 0xf4,
- 0xb0, 0xf4, 0x4d, 0x3c, 0xc5, 0xd7, 0x65, 0xfd, 0x4e, 0xc0, 0x0c, 0x46, 0xa6, 0xe2, 0x2b, 0x84,
- 0xa5, 0x6f, 0x49, 0x78, 0xed, 0x23, 0xeb, 0x77, 0x0d, 0x77, 0x74, 0x3f, 0x32, 0x15, 0x5f, 0x21,
- 0x2c, 0x7d, 0x26, 0xe1, 0xed, 0x90, 0xac, 0xdf, 0x0b, 0x1a, 0xc2, 0xc8, 0xa4, 0xbc, 0x4a, 0x58,
- 0xfa, 0x36, 0xb5, 0x54, 0xac, 0xcb, 0xeb, 0xab, 0x86, 0xeb, 0x80, 0x10, 0x99, 0x94, 0x57, 0x09,
- 0x4b, 0xdf, 0xa1, 0xa6, 0x94, 0xba, 0xbc, 0xbe, 0x16, 0x32, 0x55, 0xd3, 0xeb, 0x8f, 0xa0, 0x70,
- 0xd6, 0xb0, 0xf4, 0x5d, 0xf1, 0xd6, 0x2d, 0xdf, 0x11, 0x62, 0xd3, 0xae, 0xf0, 0xce, 0x4e, 0x0d,
- 0x4c, 0xdf, 0xc3, 0x1a, 0xa7, 0x3e, 0xf7, 0x84, 0xdd, 0x4c, 0x31, 0x82, 0xff, 0xfa, 0x58, 0x98,
- 0xda, 0xf6, 0xf7, 0xc7, 0xa9, 0x31, 0xea, 0xfb, 0x12, 0x5e, 0x5f, 0x15, 0xb8, 0x41, 0xc4, 0x7b,
- 0x3b, 0x85, 0x05, 0xac, 0x0f, 0xfd, 0x59, 0x9e, 0x16, 0xad, 0x7e, 0x20, 0xbd, 0x4a, 0xb8, 0xaa,
- 0x27, 0x9a, 0x3b, 0x0d, 0x6f, 0x31, 0xb0, 0xe5, 0x6d, 0x48, 0x1e, 0x6b, 0xab, 0x6b, 0xe2, 0x91,
- 0x4c, 0xbc, 0xb5, 0x65, 0x41, 0x2a, 0xaf, 0x15, 0x85, 0x8b, 0xed, 0xe1, 0xc8, 0x39, 0x31, 0x90,
- 0xc5, 0xd9, 0x5a, 0x24, 0xfb, 0x93, 0x18, 0xb6, 0xc6, 0xd9, 0xd5, 0x48, 0xf6, 0xa7, 0x31, 0xec,
- 0x2a, 0x67, 0xeb, 0x91, 0xec, 0xaf, 0xc6, 0xb0, 0x75, 0xce, 0x5e, 0x8f, 0x64, 0x7f, 0x2d, 0x86,
- 0xbd, 0xce, 0xd9, 0xb5, 0x48, 0xf6, 0xd7, 0x63, 0xd8, 0x35, 0xce, 0xbe, 0x13, 0xc9, 0xfe, 0x46,
- 0x0c, 0xfb, 0x0e, 0x67, 0xdf, 0x8d, 0x64, 0x7f, 0x33, 0x86, 0x7d, 0x97, 0xb3, 0xef, 0x45, 0xb2,
- 0xbf, 0x15, 0xc3, 0xbe, 0xc7, 0xd8, 0x6b, 0xab, 0x91, 0xec, 0xcf, 0xa2, 0xd9, 0x6b, 0xab, 0x9c,
- 0x1d, 0xad, 0xb5, 0x6f, 0xc7, 0xb0, 0xb9, 0xd6, 0xd6, 0xa2, 0xb5, 0xf6, 0x9d, 0x18, 0x36, 0xd7,
- 0xda, 0x5a, 0xb4, 0xd6, 0xbe, 0x1b, 0xc3, 0xe6, 0x5a, 0x5b, 0x8b, 0xd6, 0xda, 0xf7, 0x62, 0xd8,
- 0x5c, 0x6b, 0x6b, 0xd1, 0x5a, 0xfb, 0x7e, 0x0c, 0x9b, 0x6b, 0x6d, 0x2d, 0x5a, 0x6b, 0x3f, 0x88,
- 0x61, 0x73, 0xad, 0xad, 0x45, 0x6b, 0xed, 0x8f, 0x62, 0xd8, 0x5c, 0x6b, 0x6b, 0xd1, 0x5a, 0xfb,
- 0xe3, 0x18, 0x36, 0xd7, 0xda, 0x5a, 0xb4, 0xd6, 0xfe, 0x24, 0x86, 0xcd, 0xb5, 0xa6, 0x45, 0x6b,
- 0xed, 0x4f, 0xa3, 0xd9, 0x1a, 0xd7, 0x9a, 0x16, 0xad, 0xb5, 0x3f, 0x8b, 0x61, 0x73, 0xad, 0x69,
- 0xd1, 0x5a, 0xfb, 0xf3, 0x18, 0x36, 0xd7, 0x9a, 0x16, 0xad, 0xb5, 0x1f, 0xc6, 0xb0, 0xb9, 0xd6,
- 0xb4, 0x68, 0xad, 0xfd, 0x45, 0x0c, 0x9b, 0x6b, 0x4d, 0x8b, 0xd6, 0xda, 0x5f, 0xc6, 0xb0, 0xb9,
- 0xd6, 0xb4, 0x68, 0xad, 0xfd, 0x55, 0x0c, 0x9b, 0x6b, 0x4d, 0x8b, 0xd6, 0xda, 0x5f, 0xc7, 0xb0,
- 0xb9, 0xd6, 0xb4, 0x68, 0xad, 0xfd, 0x4d, 0x0c, 0x9b, 0x6b, 0x4d, 0x8b, 0xd6, 0xda, 0xdf, 0xc6,
- 0xb0, 0xb9, 0xd6, 0xaa, 0xd1, 0x5a, 0xfb, 0xbb, 0x68, 0x76, 0x95, 0x6b, 0xad, 0x1a, 0xad, 0xb5,
- 0xbf, 0x8f, 0x61, 0x73, 0xad, 0x55, 0xa3, 0xb5, 0xf6, 0x0f, 0x31, 0x6c, 0xae, 0xb5, 0x6a, 0xb4,
- 0xd6, 0xfe, 0x31, 0x86, 0xcd, 0xb5, 0x56, 0x8d, 0xd6, 0xda, 0x8f, 0x62, 0xd8, 0x5c, 0x6b, 0xd5,
- 0x68, 0xad, 0xfd, 0x53, 0x0c, 0x9b, 0x6b, 0xad, 0x1a, 0xad, 0xb5, 0x7f, 0x8e, 0x61, 0x73, 0xad,
- 0x55, 0xa3, 0xb5, 0xf6, 0x2f, 0x31, 0x6c, 0xae, 0xb5, 0x6a, 0xb4, 0xd6, 0xfe, 0x35, 0x86, 0xcd,
- 0xb5, 0x56, 0x8d, 0xd6, 0xda, 0xbf, 0xc5, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x7b, 0x34,
- 0x5b, 0xe7, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x1f, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0xff,
- 0x19, 0xc3, 0xe6, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x5f, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b,
- 0xff, 0x1d, 0xc3, 0xe6, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x3f, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a,
- 0x6b, 0x3f, 0x8e, 0x61, 0x73, 0xad, 0xe9, 0xd1, 0x5a, 0xfb, 0x49, 0x0c, 0x9b, 0x6b, 0x4d, 0x8f,
- 0xd6, 0xda, 0xff, 0xc6, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x5f, 0x0c, 0x9b, 0x6b, 0x6d,
- 0x3d, 0x5a, 0x6b, 0xff, 0x1f, 0xcd, 0x5e, 0x5f, 0xfd, 0x69, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81,
- 0x23, 0xc6, 0xe6, 0xc6, 0x38, 0x00, 0x00,
-}
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.proto b/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.proto
deleted file mode 100644
index f60711369..000000000
--- a/vendor/github.com/matttproud/golang_protobuf_extensions/testdata/test.proto
+++ /dev/null
@@ -1,540 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// 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.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may 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
-// OWNER 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.
-
-// A feature-rich test file for the protocol compiler and libraries.
-
-syntax = "proto2";
-
-package testdata;
-
-enum FOO { FOO1 = 1; };
-
-message GoEnum {
- required FOO foo = 1;
-}
-
-message GoTestField {
- required string Label = 1;
- required string Type = 2;
-}
-
-message GoTest {
- // An enum, for completeness.
- enum KIND {
- VOID = 0;
-
- // Basic types
- BOOL = 1;
- BYTES = 2;
- FINGERPRINT = 3;
- FLOAT = 4;
- INT = 5;
- STRING = 6;
- TIME = 7;
-
- // Groupings
- TUPLE = 8;
- ARRAY = 9;
- MAP = 10;
-
- // Table types
- TABLE = 11;
-
- // Functions
- FUNCTION = 12; // last tag
- };
-
- // Some typical parameters
- required KIND Kind = 1;
- optional string Table = 2;
- optional int32 Param = 3;
-
- // Required, repeated and optional foreign fields.
- required GoTestField RequiredField = 4;
- repeated GoTestField RepeatedField = 5;
- optional GoTestField OptionalField = 6;
-
- // Required fields of all basic types
- required bool F_Bool_required = 10;
- required int32 F_Int32_required = 11;
- required int64 F_Int64_required = 12;
- required fixed32 F_Fixed32_required = 13;
- required fixed64 F_Fixed64_required = 14;
- required uint32 F_Uint32_required = 15;
- required uint64 F_Uint64_required = 16;
- required float F_Float_required = 17;
- required double F_Double_required = 18;
- required string F_String_required = 19;
- required bytes F_Bytes_required = 101;
- required sint32 F_Sint32_required = 102;
- required sint64 F_Sint64_required = 103;
-
- // Repeated fields of all basic types
- repeated bool F_Bool_repeated = 20;
- repeated int32 F_Int32_repeated = 21;
- repeated int64 F_Int64_repeated = 22;
- repeated fixed32 F_Fixed32_repeated = 23;
- repeated fixed64 F_Fixed64_repeated = 24;
- repeated uint32 F_Uint32_repeated = 25;
- repeated uint64 F_Uint64_repeated = 26;
- repeated float F_Float_repeated = 27;
- repeated double F_Double_repeated = 28;
- repeated string F_String_repeated = 29;
- repeated bytes F_Bytes_repeated = 201;
- repeated sint32 F_Sint32_repeated = 202;
- repeated sint64 F_Sint64_repeated = 203;
-
- // Optional fields of all basic types
- optional bool F_Bool_optional = 30;
- optional int32 F_Int32_optional = 31;
- optional int64 F_Int64_optional = 32;
- optional fixed32 F_Fixed32_optional = 33;
- optional fixed64 F_Fixed64_optional = 34;
- optional uint32 F_Uint32_optional = 35;
- optional uint64 F_Uint64_optional = 36;
- optional float F_Float_optional = 37;
- optional double F_Double_optional = 38;
- optional string F_String_optional = 39;
- optional bytes F_Bytes_optional = 301;
- optional sint32 F_Sint32_optional = 302;
- optional sint64 F_Sint64_optional = 303;
-
- // Default-valued fields of all basic types
- optional bool F_Bool_defaulted = 40 [default=true];
- optional int32 F_Int32_defaulted = 41 [default=32];
- optional int64 F_Int64_defaulted = 42 [default=64];
- optional fixed32 F_Fixed32_defaulted = 43 [default=320];
- optional fixed64 F_Fixed64_defaulted = 44 [default=640];
- optional uint32 F_Uint32_defaulted = 45 [default=3200];
- optional uint64 F_Uint64_defaulted = 46 [default=6400];
- optional float F_Float_defaulted = 47 [default=314159.];
- optional double F_Double_defaulted = 48 [default=271828.];
- optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"];
- optional bytes F_Bytes_defaulted = 401 [default="Bignose"];
- optional sint32 F_Sint32_defaulted = 402 [default = -32];
- optional sint64 F_Sint64_defaulted = 403 [default = -64];
-
- // Packed repeated fields (no string or bytes).
- repeated bool F_Bool_repeated_packed = 50 [packed=true];
- repeated int32 F_Int32_repeated_packed = 51 [packed=true];
- repeated int64 F_Int64_repeated_packed = 52 [packed=true];
- repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true];
- repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true];
- repeated uint32 F_Uint32_repeated_packed = 55 [packed=true];
- repeated uint64 F_Uint64_repeated_packed = 56 [packed=true];
- repeated float F_Float_repeated_packed = 57 [packed=true];
- repeated double F_Double_repeated_packed = 58 [packed=true];
- repeated sint32 F_Sint32_repeated_packed = 502 [packed=true];
- repeated sint64 F_Sint64_repeated_packed = 503 [packed=true];
-
- // Required, repeated, and optional groups.
- required group RequiredGroup = 70 {
- required string RequiredField = 71;
- };
-
- repeated group RepeatedGroup = 80 {
- required string RequiredField = 81;
- };
-
- optional group OptionalGroup = 90 {
- required string RequiredField = 91;
- };
-}
-
-// For testing skipping of unrecognized fields.
-// Numbers are all big, larger than tag numbers in GoTestField,
-// the message used in the corresponding test.
-message GoSkipTest {
- required int32 skip_int32 = 11;
- required fixed32 skip_fixed32 = 12;
- required fixed64 skip_fixed64 = 13;
- required string skip_string = 14;
- required group SkipGroup = 15 {
- required int32 group_int32 = 16;
- required string group_string = 17;
- }
-}
-
-// For testing packed/non-packed decoder switching.
-// A serialized instance of one should be deserializable as the other.
-message NonPackedTest {
- repeated int32 a = 1;
-}
-
-message PackedTest {
- repeated int32 b = 1 [packed=true];
-}
-
-message MaxTag {
- // Maximum possible tag number.
- optional string last_field = 536870911;
-}
-
-message OldMessage {
- message Nested {
- optional string name = 1;
- }
- optional Nested nested = 1;
-
- optional int32 num = 2;
-}
-
-// NewMessage is wire compatible with OldMessage;
-// imagine it as a future version.
-message NewMessage {
- message Nested {
- optional string name = 1;
- optional string food_group = 2;
- }
- optional Nested nested = 1;
-
- // This is an int32 in OldMessage.
- optional int64 num = 2;
-}
-
-// Smaller tests for ASCII formatting.
-
-message InnerMessage {
- required string host = 1;
- optional int32 port = 2 [default=4000];
- optional bool connected = 3;
-}
-
-message OtherMessage {
- optional int64 key = 1;
- optional bytes value = 2;
- optional float weight = 3;
- optional InnerMessage inner = 4;
-
- extensions 100 to max;
-}
-
-message RequiredInnerMessage {
- required InnerMessage leo_finally_won_an_oscar = 1;
-}
-
-message MyMessage {
- required int32 count = 1;
- optional string name = 2;
- optional string quote = 3;
- repeated string pet = 4;
- optional InnerMessage inner = 5;
- repeated OtherMessage others = 6;
- optional RequiredInnerMessage we_must_go_deeper = 13;
- repeated InnerMessage rep_inner = 12;
-
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- };
- optional Color bikeshed = 7;
-
- optional group SomeGroup = 8 {
- optional int32 group_field = 9;
- }
-
- // This field becomes [][]byte in the generated code.
- repeated bytes rep_bytes = 10;
-
- optional double bigfloat = 11;
-
- extensions 100 to max;
-}
-
-message Ext {
- extend MyMessage {
- optional Ext more = 103;
- optional string text = 104;
- optional int32 number = 105;
- }
-
- optional string data = 1;
-}
-
-extend MyMessage {
- repeated string greeting = 106;
-}
-
-message ComplexExtension {
- optional int32 first = 1;
- optional int32 second = 2;
- repeated int32 third = 3;
-}
-
-extend OtherMessage {
- optional ComplexExtension complex = 200;
- repeated ComplexExtension r_complex = 201;
-}
-
-message DefaultsMessage {
- enum DefaultsEnum {
- ZERO = 0;
- ONE = 1;
- TWO = 2;
- };
- extensions 100 to max;
-}
-
-extend DefaultsMessage {
- optional double no_default_double = 101;
- optional float no_default_float = 102;
- optional int32 no_default_int32 = 103;
- optional int64 no_default_int64 = 104;
- optional uint32 no_default_uint32 = 105;
- optional uint64 no_default_uint64 = 106;
- optional sint32 no_default_sint32 = 107;
- optional sint64 no_default_sint64 = 108;
- optional fixed32 no_default_fixed32 = 109;
- optional fixed64 no_default_fixed64 = 110;
- optional sfixed32 no_default_sfixed32 = 111;
- optional sfixed64 no_default_sfixed64 = 112;
- optional bool no_default_bool = 113;
- optional string no_default_string = 114;
- optional bytes no_default_bytes = 115;
- optional DefaultsMessage.DefaultsEnum no_default_enum = 116;
-
- optional double default_double = 201 [default = 3.1415];
- optional float default_float = 202 [default = 3.14];
- optional int32 default_int32 = 203 [default = 42];
- optional int64 default_int64 = 204 [default = 43];
- optional uint32 default_uint32 = 205 [default = 44];
- optional uint64 default_uint64 = 206 [default = 45];
- optional sint32 default_sint32 = 207 [default = 46];
- optional sint64 default_sint64 = 208 [default = 47];
- optional fixed32 default_fixed32 = 209 [default = 48];
- optional fixed64 default_fixed64 = 210 [default = 49];
- optional sfixed32 default_sfixed32 = 211 [default = 50];
- optional sfixed64 default_sfixed64 = 212 [default = 51];
- optional bool default_bool = 213 [default = true];
- optional string default_string = 214 [default = "Hello, string"];
- optional bytes default_bytes = 215 [default = "Hello, bytes"];
- optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE];
-}
-
-message MyMessageSet {
- option message_set_wire_format = true;
- extensions 100 to max;
-}
-
-message Empty {
-}
-
-extend MyMessageSet {
- optional Empty x201 = 201;
- optional Empty x202 = 202;
- optional Empty x203 = 203;
- optional Empty x204 = 204;
- optional Empty x205 = 205;
- optional Empty x206 = 206;
- optional Empty x207 = 207;
- optional Empty x208 = 208;
- optional Empty x209 = 209;
- optional Empty x210 = 210;
- optional Empty x211 = 211;
- optional Empty x212 = 212;
- optional Empty x213 = 213;
- optional Empty x214 = 214;
- optional Empty x215 = 215;
- optional Empty x216 = 216;
- optional Empty x217 = 217;
- optional Empty x218 = 218;
- optional Empty x219 = 219;
- optional Empty x220 = 220;
- optional Empty x221 = 221;
- optional Empty x222 = 222;
- optional Empty x223 = 223;
- optional Empty x224 = 224;
- optional Empty x225 = 225;
- optional Empty x226 = 226;
- optional Empty x227 = 227;
- optional Empty x228 = 228;
- optional Empty x229 = 229;
- optional Empty x230 = 230;
- optional Empty x231 = 231;
- optional Empty x232 = 232;
- optional Empty x233 = 233;
- optional Empty x234 = 234;
- optional Empty x235 = 235;
- optional Empty x236 = 236;
- optional Empty x237 = 237;
- optional Empty x238 = 238;
- optional Empty x239 = 239;
- optional Empty x240 = 240;
- optional Empty x241 = 241;
- optional Empty x242 = 242;
- optional Empty x243 = 243;
- optional Empty x244 = 244;
- optional Empty x245 = 245;
- optional Empty x246 = 246;
- optional Empty x247 = 247;
- optional Empty x248 = 248;
- optional Empty x249 = 249;
- optional Empty x250 = 250;
-}
-
-message MessageList {
- repeated group Message = 1 {
- required string name = 2;
- required int32 count = 3;
- }
-}
-
-message Strings {
- optional string string_field = 1;
- optional bytes bytes_field = 2;
-}
-
-message Defaults {
- enum Color {
- RED = 0;
- GREEN = 1;
- BLUE = 2;
- }
-
- // Default-valued fields of all basic types.
- // Same as GoTest, but copied here to make testing easier.
- optional bool F_Bool = 1 [default=true];
- optional int32 F_Int32 = 2 [default=32];
- optional int64 F_Int64 = 3 [default=64];
- optional fixed32 F_Fixed32 = 4 [default=320];
- optional fixed64 F_Fixed64 = 5 [default=640];
- optional uint32 F_Uint32 = 6 [default=3200];
- optional uint64 F_Uint64 = 7 [default=6400];
- optional float F_Float = 8 [default=314159.];
- optional double F_Double = 9 [default=271828.];
- optional string F_String = 10 [default="hello, \"world!\"\n"];
- optional bytes F_Bytes = 11 [default="Bignose"];
- optional sint32 F_Sint32 = 12 [default=-32];
- optional sint64 F_Sint64 = 13 [default=-64];
- optional Color F_Enum = 14 [default=GREEN];
-
- // More fields with crazy defaults.
- optional float F_Pinf = 15 [default=inf];
- optional float F_Ninf = 16 [default=-inf];
- optional float F_Nan = 17 [default=nan];
-
- // Sub-message.
- optional SubDefaults sub = 18;
-
- // Redundant but explicit defaults.
- optional string str_zero = 19 [default=""];
-}
-
-message SubDefaults {
- optional int64 n = 1 [default=7];
-}
-
-message RepeatedEnum {
- enum Color {
- RED = 1;
- }
- repeated Color color = 1;
-}
-
-message MoreRepeated {
- repeated bool bools = 1;
- repeated bool bools_packed = 2 [packed=true];
- repeated int32 ints = 3;
- repeated int32 ints_packed = 4 [packed=true];
- repeated int64 int64s_packed = 7 [packed=true];
- repeated string strings = 5;
- repeated fixed32 fixeds = 6;
-}
-
-// GroupOld and GroupNew have the same wire format.
-// GroupNew has a new field inside a group.
-
-message GroupOld {
- optional group G = 101 {
- optional int32 x = 2;
- }
-}
-
-message GroupNew {
- optional group G = 101 {
- optional int32 x = 2;
- optional int32 y = 3;
- }
-}
-
-message FloatingPoint {
- required double f = 1;
-}
-
-message MessageWithMap {
- map<int32, string> name_mapping = 1;
- map<sint64, FloatingPoint> msg_mapping = 2;
- map<bool, bytes> byte_mapping = 3;
- map<string, string> str_to_str = 4;
-}
-
-message Oneof {
- oneof union {
- bool F_Bool = 1;
- int32 F_Int32 = 2;
- int64 F_Int64 = 3;
- fixed32 F_Fixed32 = 4;
- fixed64 F_Fixed64 = 5;
- uint32 F_Uint32 = 6;
- uint64 F_Uint64 = 7;
- float F_Float = 8;
- double F_Double = 9;
- string F_String = 10;
- bytes F_Bytes = 11;
- sint32 F_Sint32 = 12;
- sint64 F_Sint64 = 13;
- MyMessage.Color F_Enum = 14;
- GoTestField F_Message = 15;
- group F_Group = 16 {
- optional int32 x = 17;
- }
- int32 F_Largest_Tag = 536870911;
- }
-
- oneof tormato {
- int32 value = 100;
- }
-}
-
-message Communique {
- optional bool make_me_cry = 1;
-
- // This is a oneof, called "union".
- oneof union {
- int32 number = 5;
- string name = 6;
- bytes data = 7;
- double temp_c = 8;
- MyMessage.Color col = 9;
- Strings msg = 10;
- }
-}
diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go
index 856b1698d..282565afd 100644
--- a/vendor/github.com/miekg/dns/client.go
+++ b/vendor/github.com/miekg/dns/client.go
@@ -21,8 +21,6 @@ type Conn struct {
net.Conn // a net.Conn holding the connection
UDPSize uint16 // minimum receive buffer for UDP messages
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
- rtt time.Duration
- t time.Time
tsigRequestMAC string
}
@@ -177,8 +175,9 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
}
co.TsigSecret = c.TsigSecret
+ t := time.Now()
// write with the appropriate write timeout
- co.SetWriteDeadline(time.Now().Add(c.getTimeoutForRequest(c.writeTimeout())))
+ co.SetWriteDeadline(t.Add(c.getTimeoutForRequest(c.writeTimeout())))
if err = co.WriteMsg(m); err != nil {
return nil, 0, err
}
@@ -188,7 +187,8 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
if err == nil && r.Id != m.Id {
err = ErrId
}
- return r, co.rtt, err
+ rtt = time.Since(t)
+ return r, rtt, err
}
// ReadMsg reads a message from the connection co.
@@ -240,7 +240,6 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) {
}
p = make([]byte, l)
n, err = tcpRead(r, p)
- co.rtt = time.Since(co.t)
default:
if co.UDPSize > MinMsgSize {
p = make([]byte, co.UDPSize)
@@ -248,7 +247,6 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) {
p = make([]byte, MinMsgSize)
}
n, err = co.Read(p)
- co.rtt = time.Since(co.t)
}
if err != nil {
@@ -361,7 +359,6 @@ func (co *Conn) WriteMsg(m *Msg) (err error) {
if err != nil {
return err
}
- co.t = time.Now()
if _, err = co.Write(out); err != nil {
return err
}
diff --git a/vendor/github.com/miekg/dns/client_test.go b/vendor/github.com/miekg/dns/client_test.go
deleted file mode 100644
index cc4198319..000000000
--- a/vendor/github.com/miekg/dns/client_test.go
+++ /dev/null
@@ -1,590 +0,0 @@
-package dns
-
-import (
- "context"
- "crypto/tls"
- "fmt"
- "net"
- "strconv"
- "strings"
- "sync"
- "testing"
- "time"
-)
-
-func TestDialUDP(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- c := new(Client)
- conn, err := c.Dial(addrstr)
- if err != nil {
- t.Fatalf("failed to dial: %v", err)
- }
- if conn == nil {
- t.Fatalf("conn is nil")
- }
-}
-
-func TestClientSync(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- c := new(Client)
- r, _, err := c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %v", err)
- }
- if r == nil {
- t.Fatal("response is nil")
- }
- if r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
- // And now with plain Exchange().
- r, err = Exchange(m, addrstr)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
- if r == nil || r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
-}
-
-func TestClientLocalAddress(t *testing.T) {
- HandleFunc("miek.nl.", HelloServerEchoAddrPort)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- c := new(Client)
- laddr := net.UDPAddr{IP: net.ParseIP("0.0.0.0"), Port: 12345, Zone: ""}
- c.Dialer = &net.Dialer{LocalAddr: &laddr}
- r, _, err := c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %v", err)
- }
- if r != nil && r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
- if len(r.Extra) != 1 {
- t.Errorf("failed to get additional answers\n%v", r)
- }
- txt := r.Extra[0].(*TXT)
- if txt == nil {
- t.Errorf("invalid TXT response\n%v", txt)
- }
- if len(txt.Txt) != 1 || !strings.Contains(txt.Txt[0], ":12345") {
- t.Errorf("invalid TXT response\n%v", txt.Txt)
- }
-}
-
-func TestClientTLSSyncV4(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
-
- cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
- if err != nil {
- t.Fatalf("unable to build certificate: %v", err)
- }
-
- config := tls.Config{
- Certificates: []tls.Certificate{cert},
- }
-
- s, addrstr, err := RunLocalTLSServer(":0", &config)
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- c := new(Client)
-
- // test tcp-tls
- c.Net = "tcp-tls"
- c.TLSConfig = &tls.Config{
- InsecureSkipVerify: true,
- }
-
- r, _, err := c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %v", err)
- }
- if r == nil {
- t.Fatal("response is nil")
- }
- if r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
-
- // test tcp4-tls
- c.Net = "tcp4-tls"
- c.TLSConfig = &tls.Config{
- InsecureSkipVerify: true,
- }
-
- r, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %v", err)
- }
- if r == nil {
- t.Fatal("response is nil")
- }
- if r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
-}
-
-func TestClientSyncBadID(t *testing.T) {
- HandleFunc("miek.nl.", HelloServerBadID)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- c := new(Client)
- if _, _, err := c.Exchange(m, addrstr); err != ErrId {
- t.Errorf("did not find a bad Id")
- }
- // And now with plain Exchange().
- if _, err := Exchange(m, addrstr); err != ErrId {
- t.Errorf("did not find a bad Id")
- }
-}
-
-func TestClientEDNS0(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeDNSKEY)
-
- m.SetEdns0(2048, true)
-
- c := new(Client)
- r, _, err := c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %v", err)
- }
-
- if r != nil && r.Rcode != RcodeSuccess {
- t.Errorf("failed to get a valid answer\n%v", r)
- }
-}
-
-// Validates the transmission and parsing of local EDNS0 options.
-func TestClientEDNS0Local(t *testing.T) {
- optStr1 := "1979:0x0707"
- optStr2 := strconv.Itoa(EDNS0LOCALSTART) + ":0x0601"
-
- handler := func(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
-
- m.Extra = make([]RR, 1, 2)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello local edns"}}
-
- // If the local options are what we expect, then reflect them back.
- ec1 := req.Extra[0].(*OPT).Option[0].(*EDNS0_LOCAL).String()
- ec2 := req.Extra[0].(*OPT).Option[1].(*EDNS0_LOCAL).String()
- if ec1 == optStr1 && ec2 == optStr2 {
- m.Extra = append(m.Extra, req.Extra[0])
- }
-
- w.WriteMsg(m)
- }
-
- HandleFunc("miek.nl.", handler)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %s", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
-
- // Add two local edns options to the query.
- ec1 := &EDNS0_LOCAL{Code: 1979, Data: []byte{7, 7}}
- ec2 := &EDNS0_LOCAL{Code: EDNS0LOCALSTART, Data: []byte{6, 1}}
- o := &OPT{Hdr: RR_Header{Name: ".", Rrtype: TypeOPT}, Option: []EDNS0{ec1, ec2}}
- m.Extra = append(m.Extra, o)
-
- c := new(Client)
- r, _, err := c.Exchange(m, addrstr)
- if err != nil {
- t.Fatalf("failed to exchange: %s", err)
- }
-
- if r == nil {
- t.Fatal("response is nil")
- }
- if r.Rcode != RcodeSuccess {
- t.Fatal("failed to get a valid answer")
- }
-
- txt := r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello local edns" {
- t.Error("Unexpected result for miek.nl", txt, "!= Hello local edns")
- }
-
- // Validate the local options in the reply.
- got := r.Extra[1].(*OPT).Option[0].(*EDNS0_LOCAL).String()
- if got != optStr1 {
- t.Errorf("failed to get local edns0 answer; got %s, expected %s", got, optStr1)
- }
-
- got = r.Extra[1].(*OPT).Option[1].(*EDNS0_LOCAL).String()
- if got != optStr2 {
- t.Errorf("failed to get local edns0 answer; got %s, expected %s", got, optStr2)
- }
-}
-
-func TestClientConn(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
-
- // This uses TCP just to make it slightly different than TestClientSync
- s, addrstr, err := RunLocalTCPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSOA)
-
- cn, err := Dial("tcp", addrstr)
- if err != nil {
- t.Errorf("failed to dial %s: %v", addrstr, err)
- }
-
- err = cn.WriteMsg(m)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
- r, err := cn.ReadMsg()
- if err != nil {
- t.Errorf("failed to get a valid answer: %v", err)
- }
- if r == nil || r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
-
- err = cn.WriteMsg(m)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
- h := new(Header)
- buf, err := cn.ReadMsgHeader(h)
- if buf == nil {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
- if err != nil {
- t.Errorf("failed to get a valid answer: %v", err)
- }
- if int(h.Bits&0xF) != RcodeSuccess {
- t.Errorf("failed to get an valid answer in ReadMsgHeader\n%v", r)
- }
- if h.Ancount != 0 || h.Qdcount != 1 || h.Nscount != 0 || h.Arcount != 1 {
- t.Errorf("expected to have question and additional in response; got something else: %+v", h)
- }
- if err = r.Unpack(buf); err != nil {
- t.Errorf("unable to unpack message fully: %v", err)
- }
-}
-
-func TestTruncatedMsg(t *testing.T) {
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSRV)
- cnt := 10
- for i := 0; i < cnt; i++ {
- r := &SRV{
- Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeSRV, Class: ClassINET, Ttl: 0},
- Port: uint16(i + 8000),
- Target: "target.miek.nl.",
- }
- m.Answer = append(m.Answer, r)
-
- re := &A{
- Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeA, Class: ClassINET, Ttl: 0},
- A: net.ParseIP(fmt.Sprintf("127.0.0.%d", i)).To4(),
- }
- m.Extra = append(m.Extra, re)
- }
- buf, err := m.Pack()
- if err != nil {
- t.Errorf("failed to pack: %v", err)
- }
-
- r := new(Msg)
- if err = r.Unpack(buf); err != nil {
- t.Errorf("unable to unpack message: %v", err)
- }
- if len(r.Answer) != cnt {
- t.Errorf("answer count after regular unpack doesn't match: %d", len(r.Answer))
- }
- if len(r.Extra) != cnt {
- t.Errorf("extra count after regular unpack doesn't match: %d", len(r.Extra))
- }
-
- m.Truncated = true
- buf, err = m.Pack()
- if err != nil {
- t.Errorf("failed to pack truncated: %v", err)
- }
-
- r = new(Msg)
- if err = r.Unpack(buf); err != nil && err != ErrTruncated {
- t.Errorf("unable to unpack truncated message: %v", err)
- }
- if !r.Truncated {
- t.Errorf("truncated message wasn't unpacked as truncated")
- }
- if len(r.Answer) != cnt {
- t.Errorf("answer count after truncated unpack doesn't match: %d", len(r.Answer))
- }
- if len(r.Extra) != cnt {
- t.Errorf("extra count after truncated unpack doesn't match: %d", len(r.Extra))
- }
-
- // Now we want to remove almost all of the extra records
- // We're going to loop over the extra to get the count of the size of all
- // of them
- off := 0
- buf1 := make([]byte, m.Len())
- for i := 0; i < len(m.Extra); i++ {
- off, err = PackRR(m.Extra[i], buf1, off, nil, m.Compress)
- if err != nil {
- t.Errorf("failed to pack extra: %v", err)
- }
- }
-
- // Remove all of the extra bytes but 10 bytes from the end of buf
- off -= 10
- buf1 = buf[:len(buf)-off]
-
- r = new(Msg)
- if err = r.Unpack(buf1); err != nil && err != ErrTruncated {
- t.Errorf("unable to unpack cutoff message: %v", err)
- }
- if !r.Truncated {
- t.Error("truncated cutoff message wasn't unpacked as truncated")
- }
- if len(r.Answer) != cnt {
- t.Errorf("answer count after cutoff unpack doesn't match: %d", len(r.Answer))
- }
- if len(r.Extra) != 0 {
- t.Errorf("extra count after cutoff unpack is not zero: %d", len(r.Extra))
- }
-
- // Now we want to remove almost all of the answer records too
- buf1 = make([]byte, m.Len())
- as := 0
- for i := 0; i < len(m.Extra); i++ {
- off1 := off
- off, err = PackRR(m.Extra[i], buf1, off, nil, m.Compress)
- as = off - off1
- if err != nil {
- t.Errorf("failed to pack extra: %v", err)
- }
- }
-
- // Keep exactly one answer left
- // This should still cause Answer to be nil
- off -= as
- buf1 = buf[:len(buf)-off]
-
- r = new(Msg)
- if err = r.Unpack(buf1); err != nil && err != ErrTruncated {
- t.Errorf("unable to unpack cutoff message: %v", err)
- }
- if !r.Truncated {
- t.Error("truncated cutoff message wasn't unpacked as truncated")
- }
- if len(r.Answer) != 0 {
- t.Errorf("answer count after second cutoff unpack is not zero: %d", len(r.Answer))
- }
-
- // Now leave only 1 byte of the question
- // Since the header is always 12 bytes, we just need to keep 13
- buf1 = buf[:13]
-
- r = new(Msg)
- err = r.Unpack(buf1)
- if err == nil || err == ErrTruncated {
- t.Errorf("error should not be ErrTruncated from question cutoff unpack: %v", err)
- }
-
- // Finally, if we only have the header, we don't return an error.
- buf1 = buf[:12]
-
- r = new(Msg)
- if err = r.Unpack(buf1); err != nil {
- t.Errorf("from header-only unpack should not return an error: %v", err)
- }
-}
-
-func TestTimeout(t *testing.T) {
- // Set up a dummy UDP server that won't respond
- addr, err := net.ResolveUDPAddr("udp", ":0")
- if err != nil {
- t.Fatalf("unable to resolve local udp address: %v", err)
- }
- conn, err := net.ListenUDP("udp", addr)
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer conn.Close()
- addrstr := conn.LocalAddr().String()
-
- // Message to send
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
-
- // Use a channel + timeout to ensure we don't get stuck if the
- // Client Timeout is not working properly
- done := make(chan struct{}, 2)
-
- timeout := time.Millisecond
- allowable := timeout + (10 * time.Millisecond)
- abortAfter := timeout + (100 * time.Millisecond)
-
- start := time.Now()
-
- go func() {
- c := &Client{Timeout: timeout}
- _, _, err := c.Exchange(m, addrstr)
- if err == nil {
- t.Error("no timeout using Client.Exchange")
- }
- done <- struct{}{}
- }()
-
- go func() {
- ctx, cancel := context.WithTimeout(context.Background(), timeout)
- defer cancel()
- c := &Client{}
- _, _, err := c.ExchangeContext(ctx, m, addrstr)
- if err == nil {
- t.Error("no timeout using Client.ExchangeContext")
- }
- done <- struct{}{}
- }()
-
- // Wait for both the Exchange and ExchangeContext tests to be done.
- for i := 0; i < 2; i++ {
- select {
- case <-done:
- case <-time.After(abortAfter):
- }
- }
-
- length := time.Since(start)
-
- if length > allowable {
- t.Errorf("exchange took longer %v than specified Timeout %v", length, allowable)
- }
-}
-
-// Check that responses from deduplicated requests aren't shared between callers
-func TestConcurrentExchanges(t *testing.T) {
- cases := make([]*Msg, 2)
- cases[0] = new(Msg)
- cases[1] = new(Msg)
- cases[1].Truncated = true
- for _, m := range cases {
- block := make(chan struct{})
- waiting := make(chan struct{})
-
- handler := func(w ResponseWriter, req *Msg) {
- r := m.Copy()
- r.SetReply(req)
-
- waiting <- struct{}{}
- <-block
- w.WriteMsg(r)
- }
-
- HandleFunc("miek.nl.", handler)
- defer HandleRemove("miek.nl.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %s", err)
- }
- defer s.Shutdown()
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeSRV)
- c := &Client{
- SingleInflight: true,
- }
- r := make([]*Msg, 2)
-
- var wg sync.WaitGroup
- wg.Add(len(r))
- for i := 0; i < len(r); i++ {
- go func(i int) {
- defer wg.Done()
- r[i], _, _ = c.Exchange(m.Copy(), addrstr)
- if r[i] == nil {
- t.Errorf("response %d is nil", i)
- }
- }(i)
- }
- select {
- case <-waiting:
- case <-time.After(time.Second):
- t.FailNow()
- }
- close(block)
- wg.Wait()
-
- if r[0] == r[1] {
- t.Errorf("got same response, expected non-shared responses")
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/clientconfig.go b/vendor/github.com/miekg/dns/clientconfig.go
index a606ef696..f13cfa30c 100644
--- a/vendor/github.com/miekg/dns/clientconfig.go
+++ b/vendor/github.com/miekg/dns/clientconfig.go
@@ -91,7 +91,7 @@ func ClientConfigFromReader(resolvconf io.Reader) (*ClientConfig, error) {
n = 1
}
c.Timeout = n
- case len(s) >= 8 && s[:9] == "attempts:":
+ case len(s) >= 9 && s[:9] == "attempts:":
n, _ := strconv.Atoi(s[9:])
if n < 1 {
n = 1
diff --git a/vendor/github.com/miekg/dns/clientconfig_test.go b/vendor/github.com/miekg/dns/clientconfig_test.go
deleted file mode 100644
index 5c10360d7..000000000
--- a/vendor/github.com/miekg/dns/clientconfig_test.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package dns
-
-import (
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "testing"
-)
-
-const normal string = `
-# Comment
-domain somedomain.com
-nameserver 10.28.10.2
-nameserver 11.28.10.1
-`
-
-const missingNewline string = `
-domain somedomain.com
-nameserver 10.28.10.2
-nameserver 11.28.10.1` // <- NOTE: NO newline.
-
-func testConfig(t *testing.T, data string) {
- cc, err := ClientConfigFromReader(strings.NewReader(data))
- if err != nil {
- t.Errorf("error parsing resolv.conf: %v", err)
- }
- if l := len(cc.Servers); l != 2 {
- t.Errorf("incorrect number of nameservers detected: %d", l)
- }
- if l := len(cc.Search); l != 1 {
- t.Errorf("domain directive not parsed correctly: %v", cc.Search)
- } else {
- if cc.Search[0] != "somedomain.com" {
- t.Errorf("domain is unexpected: %v", cc.Search[0])
- }
- }
-}
-
-func TestNameserver(t *testing.T) { testConfig(t, normal) }
-func TestMissingFinalNewLine(t *testing.T) { testConfig(t, missingNewline) }
-
-func TestNdots(t *testing.T) {
- ndotsVariants := map[string]int{
- "options ndots:0": 0,
- "options ndots:1": 1,
- "options ndots:15": 15,
- "options ndots:16": 15,
- "options ndots:-1": 0,
- "": 1,
- }
-
- for data := range ndotsVariants {
- cc, err := ClientConfigFromReader(strings.NewReader(data))
- if err != nil {
- t.Errorf("error parsing resolv.conf: %v", err)
- }
- if cc.Ndots != ndotsVariants[data] {
- t.Errorf("Ndots not properly parsed: (Expected: %d / Was: %d)", ndotsVariants[data], cc.Ndots)
- }
- }
-
-}
-
-func TestReadFromFile(t *testing.T) {
- tempDir, err := ioutil.TempDir("", "")
- if err != nil {
- t.Fatalf("tempDir: %v", err)
- }
- defer os.RemoveAll(tempDir)
-
- path := filepath.Join(tempDir, "resolv.conf")
- if err := ioutil.WriteFile(path, []byte(normal), 0644); err != nil {
- t.Fatalf("writeFile: %v", err)
- }
- cc, err := ClientConfigFromFile(path)
- if err != nil {
- t.Errorf("error parsing resolv.conf: %v", err)
- }
- if l := len(cc.Servers); l != 2 {
- t.Errorf("incorrect number of nameservers detected: %d", l)
- }
- if l := len(cc.Search); l != 1 {
- t.Errorf("domain directive not parsed correctly: %v", cc.Search)
- } else {
- if cc.Search[0] != "somedomain.com" {
- t.Errorf("domain is unexpected: %v", cc.Search[0])
- }
- }
-}
-
-func TestNameListNdots1(t *testing.T) {
- cfg := ClientConfig{
- Ndots: 1,
- }
- // fqdn should be only result returned
- names := cfg.NameList("miek.nl.")
- if len(names) != 1 {
- t.Errorf("NameList returned != 1 names: %v", names)
- } else if names[0] != "miek.nl." {
- t.Errorf("NameList didn't return sent fqdn domain: %v", names[0])
- }
-
- cfg.Search = []string{
- "test",
- }
- // Sent domain has NDots and search
- names = cfg.NameList("miek.nl")
- if len(names) != 2 {
- t.Errorf("NameList returned != 2 names: %v", names)
- } else if names[0] != "miek.nl." {
- t.Errorf("NameList didn't return sent domain first: %v", names[0])
- } else if names[1] != "miek.nl.test." {
- t.Errorf("NameList didn't return search last: %v", names[1])
- }
-}
-func TestNameListNdots2(t *testing.T) {
- cfg := ClientConfig{
- Ndots: 2,
- }
-
- // Sent domain has less than NDots and search
- cfg.Search = []string{
- "test",
- }
- names := cfg.NameList("miek.nl")
-
- if len(names) != 2 {
- t.Errorf("NameList returned != 2 names: %v", names)
- } else if names[0] != "miek.nl.test." {
- t.Errorf("NameList didn't return search first: %v", names[0])
- } else if names[1] != "miek.nl." {
- t.Errorf("NameList didn't return sent domain last: %v", names[1])
- }
-}
-
-func TestNameListNdots0(t *testing.T) {
- cfg := ClientConfig{
- Ndots: 0,
- }
- cfg.Search = []string{
- "test",
- }
- // Sent domain has less than NDots and search
- names := cfg.NameList("miek")
- if len(names) != 2 {
- t.Errorf("NameList returned != 2 names: %v", names)
- } else if names[0] != "miek." {
- t.Errorf("NameList didn't return search first: %v", names[0])
- } else if names[1] != "miek.test." {
- t.Errorf("NameList didn't return sent domain last: %v", names[1])
- }
-}
diff --git a/vendor/github.com/miekg/dns/dns_bench_test.go b/vendor/github.com/miekg/dns/dns_bench_test.go
deleted file mode 100644
index 7bf8bd211..000000000
--- a/vendor/github.com/miekg/dns/dns_bench_test.go
+++ /dev/null
@@ -1,230 +0,0 @@
-package dns
-
-import (
- "net"
- "testing"
-)
-
-func BenchmarkMsgLength(b *testing.B) {
- b.StopTimer()
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- msg.Compress = true
- return msg
- }
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- msg.Len()
- }
-}
-
-func BenchmarkMsgLengthNoCompression(b *testing.B) {
- b.StopTimer()
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- return msg
- }
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- msg.Len()
- }
-}
-
-func BenchmarkMsgLengthPack(b *testing.B) {
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- msg.Compress = true
- return msg
- }
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = msg.Pack()
- }
-}
-
-func BenchmarkPackDomainName(b *testing.B) {
- name1 := "12345678901234567890123456789012345.12345678.123."
- buf := make([]byte, len(name1)+1)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = PackDomainName(name1, buf, 0, nil, false)
- }
-}
-
-func BenchmarkUnpackDomainName(b *testing.B) {
- name1 := "12345678901234567890123456789012345.12345678.123."
- buf := make([]byte, len(name1)+1)
- _, _ = PackDomainName(name1, buf, 0, nil, false)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, _ = UnpackDomainName(buf, 0)
- }
-}
-
-func BenchmarkUnpackDomainNameUnprintable(b *testing.B) {
- name1 := "\x02\x02\x02\x025\x02\x02\x02\x02.12345678.123."
- buf := make([]byte, len(name1)+1)
- _, _ = PackDomainName(name1, buf, 0, nil, false)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, _ = UnpackDomainName(buf, 0)
- }
-}
-
-func BenchmarkCopy(b *testing.B) {
- b.ReportAllocs()
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeA)
- rr := testRR("miek.nl. 2311 IN A 127.0.0.1")
- m.Answer = []RR{rr}
- rr = testRR("miek.nl. 2311 IN NS 127.0.0.1")
- m.Ns = []RR{rr}
- rr = testRR("miek.nl. 2311 IN A 127.0.0.1")
- m.Extra = []RR{rr}
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.Copy()
- }
-}
-
-func BenchmarkPackA(b *testing.B) {
- a := &A{Hdr: RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY}, A: net.IPv4(127, 0, 0, 1)}
-
- buf := make([]byte, a.len())
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = PackRR(a, buf, 0, nil, false)
- }
-}
-
-func BenchmarkUnpackA(b *testing.B) {
- a := &A{Hdr: RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY}, A: net.IPv4(127, 0, 0, 1)}
-
- buf := make([]byte, a.len())
- PackRR(a, buf, 0, nil, false)
- a = nil
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, _ = UnpackRR(buf, 0)
- }
-}
-
-func BenchmarkPackMX(b *testing.B) {
- m := &MX{Hdr: RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY}, Mx: "mx.miek.nl."}
-
- buf := make([]byte, m.len())
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = PackRR(m, buf, 0, nil, false)
- }
-}
-
-func BenchmarkUnpackMX(b *testing.B) {
- m := &MX{Hdr: RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY}, Mx: "mx.miek.nl."}
-
- buf := make([]byte, m.len())
- PackRR(m, buf, 0, nil, false)
- m = nil
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, _ = UnpackRR(buf, 0)
- }
-}
-
-func BenchmarkPackAAAAA(b *testing.B) {
- aaaa := testRR(". IN A ::1")
-
- buf := make([]byte, aaaa.len())
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = PackRR(aaaa, buf, 0, nil, false)
- }
-}
-
-func BenchmarkUnpackAAAA(b *testing.B) {
- aaaa := testRR(". IN A ::1")
-
- buf := make([]byte, aaaa.len())
- PackRR(aaaa, buf, 0, nil, false)
- aaaa = nil
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, _ = UnpackRR(buf, 0)
- }
-}
-
-func BenchmarkPackMsg(b *testing.B) {
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- msg.Compress = true
- return msg
- }
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
- buf := make([]byte, 512)
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _ = msg.PackBuffer(buf)
- }
-}
-
-func BenchmarkUnpackMsg(b *testing.B) {
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- msg.Compress = true
- return msg
- }
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
- msgBuf, _ := msg.Pack()
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _ = msg.Unpack(msgBuf)
- }
-}
-
-func BenchmarkIdGeneration(b *testing.B) {
- for i := 0; i < b.N; i++ {
- _ = id()
- }
-}
diff --git a/vendor/github.com/miekg/dns/dns_test.go b/vendor/github.com/miekg/dns/dns_test.go
deleted file mode 100644
index feface4bf..000000000
--- a/vendor/github.com/miekg/dns/dns_test.go
+++ /dev/null
@@ -1,466 +0,0 @@
-package dns
-
-import (
- "bytes"
- "encoding/hex"
- "net"
- "testing"
-)
-
-func TestPackUnpack(t *testing.T) {
- out := new(Msg)
- out.Answer = make([]RR, 1)
- key := new(DNSKEY)
- key = &DNSKEY{Flags: 257, Protocol: 3, Algorithm: RSASHA1}
- key.Hdr = RR_Header{Name: "miek.nl.", Rrtype: TypeDNSKEY, Class: ClassINET, Ttl: 3600}
- key.PublicKey = "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"
-
- out.Answer[0] = key
- msg, err := out.Pack()
- if err != nil {
- t.Error("failed to pack msg with DNSKEY")
- }
- in := new(Msg)
- if in.Unpack(msg) != nil {
- t.Error("failed to unpack msg with DNSKEY")
- }
-
- sig := new(RRSIG)
- sig = &RRSIG{TypeCovered: TypeDNSKEY, Algorithm: RSASHA1, Labels: 2,
- OrigTtl: 3600, Expiration: 4000, Inception: 4000, KeyTag: 34641, SignerName: "miek.nl.",
- Signature: "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"}
- sig.Hdr = RR_Header{Name: "miek.nl.", Rrtype: TypeRRSIG, Class: ClassINET, Ttl: 3600}
-
- out.Answer[0] = sig
- msg, err = out.Pack()
- if err != nil {
- t.Error("failed to pack msg with RRSIG")
- }
-
- if in.Unpack(msg) != nil {
- t.Error("failed to unpack msg with RRSIG")
- }
-}
-
-func TestPackUnpack2(t *testing.T) {
- m := new(Msg)
- m.Extra = make([]RR, 1)
- m.Answer = make([]RR, 1)
- dom := "miek.nl."
- rr := new(A)
- rr.Hdr = RR_Header{Name: dom, Rrtype: TypeA, Class: ClassINET, Ttl: 0}
- rr.A = net.IPv4(127, 0, 0, 1)
-
- x := new(TXT)
- x.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
- x.Txt = []string{"heelalaollo"}
-
- m.Extra[0] = x
- m.Answer[0] = rr
- _, err := m.Pack()
- if err != nil {
- t.Error("Packing failed: ", err)
- return
- }
-}
-
-func TestPackUnpack3(t *testing.T) {
- m := new(Msg)
- m.Extra = make([]RR, 2)
- m.Answer = make([]RR, 1)
- dom := "miek.nl."
- rr := new(A)
- rr.Hdr = RR_Header{Name: dom, Rrtype: TypeA, Class: ClassINET, Ttl: 0}
- rr.A = net.IPv4(127, 0, 0, 1)
-
- x1 := new(TXT)
- x1.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
- x1.Txt = []string{}
-
- x2 := new(TXT)
- x2.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
- x2.Txt = []string{"heelalaollo"}
-
- m.Extra[0] = x1
- m.Extra[1] = x2
- m.Answer[0] = rr
- b, err := m.Pack()
- if err != nil {
- t.Error("packing failed: ", err)
- return
- }
-
- var unpackMsg Msg
- err = unpackMsg.Unpack(b)
- if err != nil {
- t.Error("unpacking failed")
- return
- }
-}
-
-func TestBailiwick(t *testing.T) {
- yes := map[string]string{
- "miek1.nl": "miek1.nl",
- "miek.nl": "ns.miek.nl",
- ".": "miek.nl",
- }
- for parent, child := range yes {
- if !IsSubDomain(parent, child) {
- t.Errorf("%s should be child of %s", child, parent)
- t.Errorf("comparelabels %d", CompareDomainName(parent, child))
- t.Errorf("lenlabels %d %d", CountLabel(parent), CountLabel(child))
- }
- }
- no := map[string]string{
- "www.miek.nl": "ns.miek.nl",
- "m\\.iek.nl": "ns.miek.nl",
- "w\\.iek.nl": "w.iek.nl",
- "p\\\\.iek.nl": "ns.p.iek.nl", // p\\.iek.nl , literal \ in domain name
- "miek.nl": ".",
- }
- for parent, child := range no {
- if IsSubDomain(parent, child) {
- t.Errorf("%s should not be child of %s", child, parent)
- t.Errorf("comparelabels %d", CompareDomainName(parent, child))
- t.Errorf("lenlabels %d %d", CountLabel(parent), CountLabel(child))
- }
- }
-}
-
-func TestPackNAPTR(t *testing.T) {
- for _, n := range []string{
- `apple.com. IN NAPTR 100 50 "se" "SIP+D2U" "" _sip._udp.apple.com.`,
- `apple.com. IN NAPTR 90 50 "se" "SIP+D2T" "" _sip._tcp.apple.com.`,
- `apple.com. IN NAPTR 50 50 "se" "SIPS+D2T" "" _sips._tcp.apple.com.`,
- } {
- rr := testRR(n)
- msg := make([]byte, rr.len())
- if off, err := PackRR(rr, msg, 0, nil, false); err != nil {
- t.Errorf("packing failed: %v", err)
- t.Errorf("length %d, need more than %d", rr.len(), off)
- }
- }
-}
-
-func TestCompressLength(t *testing.T) {
- m := new(Msg)
- m.SetQuestion("miek.nl", TypeMX)
- ul := m.Len()
- m.Compress = true
- if ul != m.Len() {
- t.Fatalf("should be equal")
- }
-}
-
-// Does the predicted length match final packed length?
-func TestMsgCompressLength(t *testing.T) {
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- msg.Compress = true
- return msg
- }
-
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrA := testRR(name1 + " 3600 IN A 192.0.2.1")
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- tests := []*Msg{
- makeMsg(name1, []RR{rrA}, nil, nil),
- makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)}
-
- for _, msg := range tests {
- predicted := msg.Len()
- buf, err := msg.Pack()
- if err != nil {
- t.Error(err)
- }
- if predicted < len(buf) {
- t.Errorf("predicted compressed length is wrong: predicted %s (len=%d) %d, actual %d",
- msg.Question[0].Name, len(msg.Answer), predicted, len(buf))
- }
- }
-}
-
-func TestMsgLength(t *testing.T) {
- makeMsg := func(question string, ans, ns, e []RR) *Msg {
- msg := new(Msg)
- msg.SetQuestion(Fqdn(question), TypeANY)
- msg.Answer = append(msg.Answer, ans...)
- msg.Ns = append(msg.Ns, ns...)
- msg.Extra = append(msg.Extra, e...)
- return msg
- }
-
- name1 := "12345678901234567890123456789012345.12345678.123."
- rrA := testRR(name1 + " 3600 IN A 192.0.2.1")
- rrMx := testRR(name1 + " 3600 IN MX 10 " + name1)
- tests := []*Msg{
- makeMsg(name1, []RR{rrA}, nil, nil),
- makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)}
-
- for _, msg := range tests {
- predicted := msg.Len()
- buf, err := msg.Pack()
- if err != nil {
- t.Error(err)
- }
- if predicted < len(buf) {
- t.Errorf("predicted length is wrong: predicted %s (len=%d), actual %d",
- msg.Question[0].Name, predicted, len(buf))
- }
- }
-}
-
-func TestMsgLength2(t *testing.T) {
- // Serialized replies
- var testMessages = []string{
- // google.com. IN A?
- "064e81800001000b0004000506676f6f676c6503636f6d0000010001c00c00010001000000050004adc22986c00c00010001000000050004adc22987c00c00010001000000050004adc22988c00c00010001000000050004adc22989c00c00010001000000050004adc2298ec00c00010001000000050004adc22980c00c00010001000000050004adc22981c00c00010001000000050004adc22982c00c00010001000000050004adc22983c00c00010001000000050004adc22984c00c00010001000000050004adc22985c00c00020001000000050006036e7331c00cc00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc0d800010001000000050004d8ef200ac0ea00010001000000050004d8ef220ac0fc00010001000000050004d8ef240ac10e00010001000000050004d8ef260a0000290500000000050000",
- // amazon.com. IN A? (reply has no EDNS0 record)
- // TODO(miek): this one is off-by-one, need to find out why
- //"6de1818000010004000a000806616d617a6f6e03636f6d0000010001c00c000100010000000500044815c2d4c00c000100010000000500044815d7e8c00c00010001000000050004b02062a6c00c00010001000000050004cdfbf236c00c000200010000000500140570646e733408756c747261646e73036f726700c00c000200010000000500150570646e733508756c747261646e7304696e666f00c00c000200010000000500160570646e733608756c747261646e7302636f02756b00c00c00020001000000050014036e7331037033310664796e656374036e657400c00c00020001000000050006036e7332c0cfc00c00020001000000050006036e7333c0cfc00c00020001000000050006036e7334c0cfc00c000200010000000500110570646e733108756c747261646e73c0dac00c000200010000000500080570646e7332c127c00c000200010000000500080570646e7333c06ec0cb00010001000000050004d04e461fc0eb00010001000000050004cc0dfa1fc0fd00010001000000050004d04e471fc10f00010001000000050004cc0dfb1fc12100010001000000050004cc4a6c01c121001c000100000005001020010502f3ff00000000000000000001c13e00010001000000050004cc4a6d01c13e001c0001000000050010261000a1101400000000000000000001",
- // yahoo.com. IN A?
- "fc2d81800001000300070008057961686f6f03636f6d0000010001c00c00010001000000050004628afd6dc00c00010001000000050004628bb718c00c00010001000000050004cebe242dc00c00020001000000050006036e7336c00cc00c00020001000000050006036e7338c00cc00c00020001000000050006036e7331c00cc00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc00c00020001000000050006036e7335c00cc07b0001000100000005000444b48310c08d00010001000000050004448eff10c09f00010001000000050004cb54dd35c0b100010001000000050004628a0b9dc0c30001000100000005000477a0f77cc05700010001000000050004ca2bdfaac06900010001000000050004caa568160000290500000000050000",
- // microsoft.com. IN A?
- "f4368180000100020005000b096d6963726f736f667403636f6d0000010001c00c0001000100000005000440040b25c00c0001000100000005000441373ac9c00c0002000100000005000e036e7331046d736674036e657400c00c00020001000000050006036e7332c04fc00c00020001000000050006036e7333c04fc00c00020001000000050006036e7334c04fc00c00020001000000050006036e7335c04fc04b000100010000000500044137253ec04b001c00010000000500102a010111200500000000000000010001c0650001000100000005000440043badc065001c00010000000500102a010111200600060000000000010001c07700010001000000050004d5c7b435c077001c00010000000500102a010111202000000000000000010001c08900010001000000050004cf2e4bfec089001c00010000000500102404f800200300000000000000010001c09b000100010000000500044137e28cc09b001c00010000000500102a010111200f000100000000000100010000290500000000050000",
- // google.com. IN MX?
- "724b8180000100050004000b06676f6f676c6503636f6d00000f0001c00c000f000100000005000c000a056173706d78016cc00cc00c000f0001000000050009001404616c7431c02ac00c000f0001000000050009001e04616c7432c02ac00c000f0001000000050009002804616c7433c02ac00c000f0001000000050009003204616c7434c02ac00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc00c00020001000000050006036e7331c00cc02a00010001000000050004adc2421bc02a001c00010000000500102a00145040080c01000000000000001bc04200010001000000050004adc2461bc05700010001000000050004adc2451bc06c000100010000000500044a7d8f1bc081000100010000000500044a7d191bc0ca00010001000000050004d8ef200ac09400010001000000050004d8ef220ac0a600010001000000050004d8ef240ac0b800010001000000050004d8ef260a0000290500000000050000",
- // reddit.com. IN A?
- "12b98180000100080000000c0672656464697403636f6d0000020001c00c0002000100000005000f046175733204616b616d036e657400c00c000200010000000500070475736534c02dc00c000200010000000500070475737733c02dc00c000200010000000500070475737735c02dc00c00020001000000050008056173696131c02dc00c00020001000000050008056173696139c02dc00c00020001000000050008056e73312d31c02dc00c0002000100000005000a076e73312d313935c02dc02800010001000000050004c30a242ec04300010001000000050004451f1d39c05600010001000000050004451f3bc7c0690001000100000005000460073240c07c000100010000000500046007fb81c090000100010000000500047c283484c090001c00010000000500102a0226f0006700000000000000000064c0a400010001000000050004c16c5b01c0a4001c000100000005001026001401000200000000000000000001c0b800010001000000050004c16c5bc3c0b8001c0001000000050010260014010002000000000000000000c30000290500000000050000",
- }
-
- for i, hexData := range testMessages {
- // we won't fail the decoding of the hex
- input, _ := hex.DecodeString(hexData)
-
- m := new(Msg)
- m.Unpack(input)
- m.Compress = true
- lenComp := m.Len()
- b, _ := m.Pack()
- pacComp := len(b)
- m.Compress = false
- lenUnComp := m.Len()
- b, _ = m.Pack()
- pacUnComp := len(b)
- if pacComp+1 != lenComp {
- t.Errorf("msg.Len(compressed)=%d actual=%d for test %d", lenComp, pacComp, i)
- }
- if pacUnComp+1 != lenUnComp {
- t.Errorf("msg.Len(uncompressed)=%d actual=%d for test %d", lenUnComp, pacUnComp, i)
- }
- }
-}
-
-func TestMsgLengthCompressionMalformed(t *testing.T) {
- // SOA with empty hostmaster, which is illegal
- soa := &SOA{Hdr: RR_Header{Name: ".", Rrtype: TypeSOA, Class: ClassINET, Ttl: 12345},
- Ns: ".",
- Mbox: "",
- Serial: 0,
- Refresh: 28800,
- Retry: 7200,
- Expire: 604800,
- Minttl: 60}
- m := new(Msg)
- m.Compress = true
- m.Ns = []RR{soa}
- m.Len() // Should not crash.
-}
-
-func TestMsgCompressLength2(t *testing.T) {
- msg := new(Msg)
- msg.Compress = true
- msg.SetQuestion(Fqdn("bliep."), TypeANY)
- msg.Answer = append(msg.Answer, &SRV{Hdr: RR_Header{Name: "blaat.", Rrtype: 0x21, Class: 0x1, Ttl: 0x3c}, Port: 0x4c57, Target: "foo.bar."})
- msg.Extra = append(msg.Extra, &A{Hdr: RR_Header{Name: "foo.bar.", Rrtype: 0x1, Class: 0x1, Ttl: 0x3c}, A: net.IP{0xac, 0x11, 0x0, 0x3}})
- predicted := msg.Len()
- buf, err := msg.Pack()
- if err != nil {
- t.Error(err)
- }
- if predicted != len(buf) {
- t.Errorf("predicted compressed length is wrong: predicted %s (len=%d) %d, actual %d",
- msg.Question[0].Name, len(msg.Answer), predicted, len(buf))
- }
-}
-
-func TestToRFC3597(t *testing.T) {
- a := testRR("miek.nl. IN A 10.0.1.1")
- x := new(RFC3597)
- x.ToRFC3597(a)
- if x.String() != `miek.nl. 3600 CLASS1 TYPE1 \# 4 0a000101` {
- t.Errorf("string mismatch, got: %s", x)
- }
-
- b := testRR("miek.nl. IN MX 10 mx.miek.nl.")
- x.ToRFC3597(b)
- if x.String() != `miek.nl. 3600 CLASS1 TYPE15 \# 14 000a026d78046d69656b026e6c00` {
- t.Errorf("string mismatch, got: %s", x)
- }
-}
-
-func TestNoRdataPack(t *testing.T) {
- data := make([]byte, 1024)
- for typ, fn := range TypeToRR {
- r := fn()
- *r.Header() = RR_Header{Name: "miek.nl.", Rrtype: typ, Class: ClassINET, Ttl: 16}
- _, err := PackRR(r, data, 0, nil, false)
- if err != nil {
- t.Errorf("failed to pack RR with zero rdata: %s: %v", TypeToString[typ], err)
- }
- }
-}
-
-func TestNoRdataUnpack(t *testing.T) {
- data := make([]byte, 1024)
- for typ, fn := range TypeToRR {
- if typ == TypeSOA || typ == TypeTSIG || typ == TypeTKEY {
- // SOA, TSIG will not be seen (like this) in dyn. updates?
- // TKEY requires length fields to be present for the Key and OtherData fields
- continue
- }
- r := fn()
- *r.Header() = RR_Header{Name: "miek.nl.", Rrtype: typ, Class: ClassINET, Ttl: 16}
- off, err := PackRR(r, data, 0, nil, false)
- if err != nil {
- // Should always works, TestNoDataPack should have caught this
- t.Errorf("failed to pack RR: %v", err)
- continue
- }
- if _, _, err := UnpackRR(data[:off], 0); err != nil {
- t.Errorf("failed to unpack RR with zero rdata: %s: %v", TypeToString[typ], err)
- }
- }
-}
-
-func TestRdataOverflow(t *testing.T) {
- rr := new(RFC3597)
- rr.Hdr.Name = "."
- rr.Hdr.Class = ClassINET
- rr.Hdr.Rrtype = 65280
- rr.Rdata = hex.EncodeToString(make([]byte, 0xFFFF))
- buf := make([]byte, 0xFFFF*2)
- if _, err := PackRR(rr, buf, 0, nil, false); err != nil {
- t.Fatalf("maximum size rrdata pack failed: %v", err)
- }
- rr.Rdata += "00"
- if _, err := PackRR(rr, buf, 0, nil, false); err != ErrRdata {
- t.Fatalf("oversize rrdata pack didn't return ErrRdata - instead: %v", err)
- }
-}
-
-func TestCopy(t *testing.T) {
- rr := testRR("miek.nl. 2311 IN A 127.0.0.1") // Weird TTL to avoid catching TTL
- rr1 := Copy(rr)
- if rr.String() != rr1.String() {
- t.Fatalf("Copy() failed %s != %s", rr.String(), rr1.String())
- }
-}
-
-func TestMsgCopy(t *testing.T) {
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeA)
- rr := testRR("miek.nl. 2311 IN A 127.0.0.1")
- m.Answer = []RR{rr}
- rr = testRR("miek.nl. 2311 IN NS 127.0.0.1")
- m.Ns = []RR{rr}
-
- m1 := m.Copy()
- if m.String() != m1.String() {
- t.Fatalf("Msg.Copy() failed %s != %s", m.String(), m1.String())
- }
-
- m1.Answer[0] = testRR("somethingelse.nl. 2311 IN A 127.0.0.1")
- if m.String() == m1.String() {
- t.Fatalf("Msg.Copy() failed; change to copy changed template %s", m.String())
- }
-
- rr = testRR("miek.nl. 2311 IN A 127.0.0.2")
- m1.Answer = append(m1.Answer, rr)
- if m1.Ns[0].String() == m1.Answer[1].String() {
- t.Fatalf("Msg.Copy() failed; append changed underlying array %s", m1.Ns[0].String())
- }
-}
-
-func TestMsgPackBuffer(t *testing.T) {
- var testMessages = []string{
- // news.ycombinator.com.in.escapemg.com. IN A, response
- "586285830001000000010000046e6577730b79636f6d62696e61746f7203636f6d02696e086573636170656d6703636f6d0000010001c0210006000100000e10002c036e7332c02103646e730b67726f6f7665736861726bc02d77ed50e600002a3000000e1000093a8000000e10",
-
- // news.ycombinator.com.in.escapemg.com. IN A, question
- "586201000001000000000000046e6577730b79636f6d62696e61746f7203636f6d02696e086573636170656d6703636f6d0000010001",
-
- "398781020001000000000000046e6577730b79636f6d62696e61746f7203636f6d0000010001",
- }
-
- for i, hexData := range testMessages {
- // we won't fail the decoding of the hex
- input, _ := hex.DecodeString(hexData)
- m := new(Msg)
- if err := m.Unpack(input); err != nil {
- t.Errorf("packet %d failed to unpack", i)
- continue
- }
- }
-}
-
-// Make sure we can decode a TKEY packet from the string, modify the RR, and then pack it again.
-func TestTKEY(t *testing.T) {
- // An example TKEY RR captured. There is no known accepted standard text format for a TKEY
- // record so we do this from a hex string instead of from a text readable string.
- tkeyStr := "0737362d6d732d370932322d3332633233332463303439663961662d633065612d313165372d363839362d6463333937396666656666640000f900ff0000000000d2086773732d747369670059fd01f359fe53730003000000b8a181b53081b2a0030a0100a10b06092a864882f712010202a2819d04819a60819706092a864886f71201020202006f8187308184a003020105a10302010fa2783076a003020112a26f046db29b1b1d2625da3b20b49dafef930dd1e9aad335e1c5f45dcd95e0005d67a1100f3e573d70506659dbed064553f1ab890f68f65ae10def0dad5b423b39f240ebe666f2886c5fe03819692d29182bbed87b83e1f9d16b7334ec16a3c4fc5ad4a990088e0be43f0c6957916f5fe60000"
- tkeyBytes, err := hex.DecodeString(tkeyStr)
- if err != nil {
- t.Fatal("unable to decode TKEY string ", err)
- }
- // Decode the RR
- rr, tkeyLen, unPackErr := UnpackRR(tkeyBytes, 0)
- if unPackErr != nil {
- t.Fatal("unable to decode TKEY RR", unPackErr)
- }
- // Make sure it's a TKEY record
- if rr.Header().Rrtype != TypeTKEY {
- t.Fatal("Unable to decode TKEY")
- }
- // Make sure we get back the same length
- if rr.len() != len(tkeyBytes) {
- t.Fatalf("Lengths don't match %d != %d", rr.len(), len(tkeyBytes))
- }
- // make space for it with some fudge room
- msg := make([]byte, tkeyLen+1000)
- offset, packErr := PackRR(rr, msg, 0, nil, false)
- if packErr != nil {
- t.Fatal("unable to pack TKEY RR", packErr)
- }
- if offset != len(tkeyBytes) {
- t.Fatalf("mismatched TKEY RR size %d != %d", len(tkeyBytes), offset)
- }
- if bytes.Compare(tkeyBytes, msg[0:offset]) != 0 {
- t.Fatal("mismatched TKEY data after rewriting bytes")
- }
- t.Logf("got TKEY of: " + rr.String())
- // Now add some bytes to this and make sure we can encode OtherData properly
- tkey := rr.(*TKEY)
- tkey.OtherData = "abcd"
- tkey.OtherLen = 2
- offset, packErr = PackRR(tkey, msg, 0, nil, false)
- if packErr != nil {
- t.Fatal("unable to pack TKEY RR after modification", packErr)
- }
- if offset != (len(tkeyBytes) + 2) {
- t.Fatalf("mismatched TKEY RR size %d != %d", offset, len(tkeyBytes)+2)
- }
- t.Logf("modified to TKEY of: " + rr.String())
-
- // Make sure we can parse our string output
- tkey.Hdr.Class = ClassINET // https://github.com/miekg/dns/issues/577
- newRR, newError := NewRR(tkey.String())
- if newError != nil {
- t.Fatalf("unable to parse TKEY string: %s", newError)
- }
- t.Log("got reparsed TKEY of newRR: " + newRR.String())
-}
diff --git a/vendor/github.com/miekg/dns/dnssec_test.go b/vendor/github.com/miekg/dns/dnssec_test.go
deleted file mode 100644
index 7cf7c417a..000000000
--- a/vendor/github.com/miekg/dns/dnssec_test.go
+++ /dev/null
@@ -1,841 +0,0 @@
-package dns
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/rsa"
- "reflect"
- "strings"
- "testing"
- "time"
-
- "golang.org/x/crypto/ed25519"
-)
-
-func getKey() *DNSKEY {
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
- return key
-}
-
-func getSoa() *SOA {
- soa := new(SOA)
- soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
- soa.Ns = "open.nlnetlabs.nl."
- soa.Mbox = "miekg.atoom.net."
- soa.Serial = 1293945905
- soa.Refresh = 14400
- soa.Retry = 3600
- soa.Expire = 604800
- soa.Minttl = 86400
- return soa
-}
-
-func TestSecure(t *testing.T) {
- soa := getSoa()
-
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = TypeSOA
- sig.Algorithm = RSASHA256
- sig.Labels = 2
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.OrigTtl = 14400
- sig.KeyTag = 12051
- sig.SignerName = "miek.nl."
- sig.Signature = "oMCbslaAVIp/8kVtLSms3tDABpcPRUgHLrOR48OOplkYo+8TeEGWwkSwaz/MRo2fB4FxW0qj/hTlIjUGuACSd+b1wKdH5GvzRJc2pFmxtCbm55ygAh4EUL0F6U5cKtGJGSXxxg6UFCQ0doJCmiGFa78LolaUOXImJrk6AFrGa0M="
-
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
- // It should validate. Period is checked separately, so this will keep on working
- if sig.Verify(key, []RR{soa}) != nil {
- t.Error("failure to validate")
- }
-}
-
-func TestSignature(t *testing.T) {
- sig := new(RRSIG)
- sig.Hdr.Name = "miek.nl."
- sig.Hdr.Class = ClassINET
- sig.Hdr.Ttl = 3600
- sig.TypeCovered = TypeDNSKEY
- sig.Algorithm = RSASHA1
- sig.Labels = 2
- sig.OrigTtl = 4000
- sig.Expiration = 1000 //Thu Jan 1 02:06:40 CET 1970
- sig.Inception = 800 //Thu Jan 1 01:13:20 CET 1970
- sig.KeyTag = 34641
- sig.SignerName = "miek.nl."
- sig.Signature = "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"
-
- // Should not be valid
- if sig.ValidityPeriod(time.Now()) {
- t.Error("should not be valid")
- }
-
- sig.Inception = 315565800 //Tue Jan 1 10:10:00 CET 1980
- sig.Expiration = 4102477800 //Fri Jan 1 10:10:00 CET 2100
- if !sig.ValidityPeriod(time.Now()) {
- t.Error("should be valid")
- }
-}
-
-func TestSignVerify(t *testing.T) {
- // The record we want to sign
- soa := new(SOA)
- soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
- soa.Ns = "open.nlnetlabs.nl."
- soa.Mbox = "miekg.atoom.net."
- soa.Serial = 1293945905
- soa.Refresh = 14400
- soa.Retry = 3600
- soa.Expire = 604800
- soa.Minttl = 86400
-
- soa1 := new(SOA)
- soa1.Hdr = RR_Header{"*.miek.nl.", TypeSOA, ClassINET, 14400, 0}
- soa1.Ns = "open.nlnetlabs.nl."
- soa1.Mbox = "miekg.atoom.net."
- soa1.Serial = 1293945905
- soa1.Refresh = 14400
- soa1.Retry = 3600
- soa1.Expire = 604800
- soa1.Minttl = 86400
-
- srv := new(SRV)
- srv.Hdr = RR_Header{"srv.miek.nl.", TypeSRV, ClassINET, 14400, 0}
- srv.Port = 1000
- srv.Weight = 800
- srv.Target = "web1.miek.nl."
-
- hinfo := &HINFO{
- Hdr: RR_Header{
- Name: "miek.nl.",
- Rrtype: TypeHINFO,
- Class: ClassINET,
- Ttl: 3789,
- },
- Cpu: "X",
- Os: "Y",
- }
-
- // With this key
- key := new(DNSKEY)
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- privkey, _ := key.Generate(512)
-
- // Fill in the values of the Sig, before signing
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = soa.Hdr.Rrtype
- sig.Labels = uint8(CountLabel(soa.Hdr.Name)) // works for all 3
- sig.OrigTtl = soa.Hdr.Ttl
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.KeyTag = key.KeyTag() // Get the keyfrom the Key
- sig.SignerName = key.Hdr.Name
- sig.Algorithm = RSASHA256
-
- for _, r := range []RR{soa, soa1, srv, hinfo} {
- if err := sig.Sign(privkey.(*rsa.PrivateKey), []RR{r}); err != nil {
- t.Error("failure to sign the record:", err)
- continue
- }
- if err := sig.Verify(key, []RR{r}); err != nil {
- t.Errorf("failure to validate: %s", r.Header().Name)
- continue
- }
- }
-}
-
-func Test65534(t *testing.T) {
- t6 := new(RFC3597)
- t6.Hdr = RR_Header{"miek.nl.", 65534, ClassINET, 14400, 0}
- t6.Rdata = "505D870001"
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- privkey, _ := key.Generate(1024)
-
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = t6.Hdr.Rrtype
- sig.Labels = uint8(CountLabel(t6.Hdr.Name))
- sig.OrigTtl = t6.Hdr.Ttl
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.KeyTag = key.KeyTag()
- sig.SignerName = key.Hdr.Name
- sig.Algorithm = RSASHA256
- if err := sig.Sign(privkey.(*rsa.PrivateKey), []RR{t6}); err != nil {
- t.Error(err)
- t.Error("failure to sign the TYPE65534 record")
- }
- if err := sig.Verify(key, []RR{t6}); err != nil {
- t.Error(err)
- t.Errorf("failure to validate %s", t6.Header().Name)
- }
-}
-
-func TestDnskey(t *testing.T) {
- pubkey, err := ReadRR(strings.NewReader(`
-miek.nl. IN DNSKEY 256 3 10 AwEAAZuMCu2FdugHkTrXYgl5qixvcDw1aDDlvL46/xJKbHBAHY16fNUb2b65cwko2Js/aJxUYJbZk5dwCDZxYfrfbZVtDPQuc3o8QaChVxC7/JYz2AHc9qHvqQ1j4VrH71RWINlQo6VYjzN/BGpMhOZoZOEwzp1HfsOE3lNYcoWU1smL ;{id = 5240 (zsk), size = 1024b}
-`), "Kmiek.nl.+010+05240.key")
- if err != nil {
- t.Fatal(err)
- }
- privStr := `Private-key-format: v1.3
-Algorithm: 10 (RSASHA512)
-Modulus: m4wK7YV26AeROtdiCXmqLG9wPDVoMOW8vjr/EkpscEAdjXp81RvZvrlzCSjYmz9onFRgltmTl3AINnFh+t9tlW0M9C5zejxBoKFXELv8ljPYAdz2oe+pDWPhWsfvVFYg2VCjpViPM38EakyE5mhk4TDOnUd+w4TeU1hyhZTWyYs=
-PublicExponent: AQAB
-PrivateExponent: UfCoIQ/Z38l8vB6SSqOI/feGjHEl/fxIPX4euKf0D/32k30fHbSaNFrFOuIFmWMB3LimWVEs6u3dpbB9CQeCVg7hwU5puG7OtuiZJgDAhNeOnxvo5btp4XzPZrJSxR4WNQnwIiYWbl0aFlL1VGgHC/3By89ENZyWaZcMLW4KGWE=
-Prime1: yxwC6ogAu8aVcDx2wg1V0b5M5P6jP8qkRFVMxWNTw60Vkn+ECvw6YAZZBHZPaMyRYZLzPgUlyYRd0cjupy4+fQ==
-Prime2: xA1bF8M0RTIQ6+A11AoVG6GIR/aPGg5sogRkIZ7ID/sF6g9HMVU/CM2TqVEBJLRPp73cv6ZeC3bcqOCqZhz+pw==
-Exponent1: xzkblyZ96bGYxTVZm2/vHMOXswod4KWIyMoOepK6B/ZPcZoIT6omLCgtypWtwHLfqyCz3MK51Nc0G2EGzg8rFQ==
-Exponent2: Pu5+mCEb7T5F+kFNZhQadHUklt0JUHbi3hsEvVoHpEGSw3BGDQrtIflDde0/rbWHgDPM4WQY+hscd8UuTXrvLw==
-Coefficient: UuRoNqe7YHnKmQzE6iDWKTMIWTuoqqrFAmXPmKQnC+Y+BQzOVEHUo9bXdDnoI9hzXP1gf8zENMYwYLeWpuYlFQ==
-`
- privkey, err := pubkey.(*DNSKEY).ReadPrivateKey(strings.NewReader(privStr),
- "Kmiek.nl.+010+05240.private")
- if err != nil {
- t.Fatal(err)
- }
- if pubkey.(*DNSKEY).PublicKey != "AwEAAZuMCu2FdugHkTrXYgl5qixvcDw1aDDlvL46/xJKbHBAHY16fNUb2b65cwko2Js/aJxUYJbZk5dwCDZxYfrfbZVtDPQuc3o8QaChVxC7/JYz2AHc9qHvqQ1j4VrH71RWINlQo6VYjzN/BGpMhOZoZOEwzp1HfsOE3lNYcoWU1smL" {
- t.Error("pubkey is not what we've read")
- }
- if pubkey.(*DNSKEY).PrivateKeyString(privkey) != privStr {
- t.Error("privkey is not what we've read")
- t.Errorf("%v", pubkey.(*DNSKEY).PrivateKeyString(privkey))
- }
-}
-
-func TestTag(t *testing.T) {
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 3600
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
- tag := key.KeyTag()
- if tag != 12051 {
- t.Errorf("wrong key tag: %d for key %v", tag, key)
- }
-}
-
-func TestKeyRSA(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping test in short mode.")
- }
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 3600
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- priv, _ := key.Generate(2048)
-
- soa := new(SOA)
- soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
- soa.Ns = "open.nlnetlabs.nl."
- soa.Mbox = "miekg.atoom.net."
- soa.Serial = 1293945905
- soa.Refresh = 14400
- soa.Retry = 3600
- soa.Expire = 604800
- soa.Minttl = 86400
-
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = TypeSOA
- sig.Algorithm = RSASHA256
- sig.Labels = 2
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.OrigTtl = soa.Hdr.Ttl
- sig.KeyTag = key.KeyTag()
- sig.SignerName = key.Hdr.Name
-
- if err := sig.Sign(priv.(*rsa.PrivateKey), []RR{soa}); err != nil {
- t.Error("failed to sign")
- return
- }
- if err := sig.Verify(key, []RR{soa}); err != nil {
- t.Error("failed to verify")
- }
-}
-
-func TestKeyToDS(t *testing.T) {
- key := new(DNSKEY)
- key.Hdr.Name = "miek.nl."
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 3600
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = RSASHA256
- key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
- ds := key.ToDS(SHA1)
- if strings.ToUpper(ds.Digest) != "B5121BDB5B8D86D0CC5FFAFBAAABE26C3E20BAC1" {
- t.Errorf("wrong DS digest for SHA1\n%v", ds)
- }
-}
-
-func TestSignRSA(t *testing.T) {
- pub := "miek.nl. IN DNSKEY 256 3 5 AwEAAb+8lGNCxJgLS8rYVer6EnHVuIkQDghdjdtewDzU3G5R7PbMbKVRvH2Ma7pQyYceoaqWZQirSj72euPWfPxQnMy9ucCylA+FuH9cSjIcPf4PqJfdupHk9X6EBYjxrCLY4p1/yBwgyBIRJtZtAqM3ceAH2WovEJD6rTtOuHo5AluJ"
-
- priv := `Private-key-format: v1.3
-Algorithm: 5 (RSASHA1)
-Modulus: v7yUY0LEmAtLythV6voScdW4iRAOCF2N217APNTcblHs9sxspVG8fYxrulDJhx6hqpZlCKtKPvZ649Z8/FCczL25wLKUD4W4f1xKMhw9/g+ol926keT1foQFiPGsItjinX/IHCDIEhEm1m0Cozdx4AfZai8QkPqtO064ejkCW4k=
-PublicExponent: AQAB
-PrivateExponent: YPwEmwjk5HuiROKU4xzHQ6l1hG8Iiha4cKRG3P5W2b66/EN/GUh07ZSf0UiYB67o257jUDVEgwCuPJz776zfApcCB4oGV+YDyEu7Hp/rL8KcSN0la0k2r9scKwxTp4BTJT23zyBFXsV/1wRDK1A5NxsHPDMYi2SoK63Enm/1ptk=
-Prime1: /wjOG+fD0ybNoSRn7nQ79udGeR1b0YhUA5mNjDx/x2fxtIXzygYk0Rhx9QFfDy6LOBvz92gbNQlzCLz3DJt5hw==
-Prime2: wHZsJ8OGhkp5p3mrJFZXMDc2mbYusDVTA+t+iRPdS797Tj0pjvU2HN4vTnTj8KBQp6hmnY7dLp9Y1qserySGbw==
-Exponent1: N0A7FsSRIg+IAN8YPQqlawoTtG1t1OkJ+nWrurPootScApX6iMvn8fyvw3p2k51rv84efnzpWAYiC8SUaQDNxQ==
-Exponent2: SvuYRaGyvo0zemE3oS+WRm2scxR8eiA8WJGeOc+obwOKCcBgeZblXzfdHGcEC1KaOcetOwNW/vwMA46lpLzJNw==
-Coefficient: 8+7ZN/JgByqv0NfULiFKTjtyegUcijRuyij7yNxYbCBneDvZGxJwKNi4YYXWx743pcAj4Oi4Oh86gcmxLs+hGw==
-Created: 20110302104537
-Publish: 20110302104537
-Activate: 20110302104537`
-
- xk := testRR(pub)
- k := xk.(*DNSKEY)
- p, err := k.NewPrivateKey(priv)
- if err != nil {
- t.Error(err)
- }
- switch priv := p.(type) {
- case *rsa.PrivateKey:
- if 65537 != priv.PublicKey.E {
- t.Error("exponenent should be 65537")
- }
- default:
- t.Errorf("we should have read an RSA key: %v", priv)
- }
- if k.KeyTag() != 37350 {
- t.Errorf("keytag should be 37350, got %d %v", k.KeyTag(), k)
- }
-
- soa := new(SOA)
- soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
- soa.Ns = "open.nlnetlabs.nl."
- soa.Mbox = "miekg.atoom.net."
- soa.Serial = 1293945905
- soa.Refresh = 14400
- soa.Retry = 3600
- soa.Expire = 604800
- soa.Minttl = 86400
-
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.KeyTag = k.KeyTag()
- sig.SignerName = k.Hdr.Name
- sig.Algorithm = k.Algorithm
-
- sig.Sign(p.(*rsa.PrivateKey), []RR{soa})
- if sig.Signature != "D5zsobpQcmMmYsUMLxCVEtgAdCvTu8V/IEeP4EyLBjqPJmjt96bwM9kqihsccofA5LIJ7DN91qkCORjWSTwNhzCv7bMyr2o5vBZElrlpnRzlvsFIoAZCD9xg6ZY7ZyzUJmU6IcTwG4v3xEYajcpbJJiyaw/RqR90MuRdKPiBzSo=" {
- t.Errorf("signature is not correct: %v", sig)
- }
-}
-
-func TestSignVerifyECDSA(t *testing.T) {
- pub := `example.net. 3600 IN DNSKEY 257 3 14 (
- xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1
- w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8
- /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )`
- priv := `Private-key-format: v1.2
-Algorithm: 14 (ECDSAP384SHA384)
-PrivateKey: WURgWHCcYIYUPWgeLmiPY2DJJk02vgrmTfitxgqcL4vwW7BOrbawVmVe0d9V94SR`
-
- eckey := testRR(pub)
- privkey, err := eckey.(*DNSKEY).NewPrivateKey(priv)
- if err != nil {
- t.Fatal(err)
- }
- // TODO: Create separate test for this
- ds := eckey.(*DNSKEY).ToDS(SHA384)
- if ds.KeyTag != 10771 {
- t.Fatal("wrong keytag on DS")
- }
- if ds.Digest != "72d7b62976ce06438e9c0bf319013cf801f09ecc84b8d7e9495f27e305c6a9b0563a9b5f4d288405c3008a946df983d6" {
- t.Fatal("wrong DS Digest")
- }
- a := testRR("www.example.net. 3600 IN A 192.0.2.1")
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"example.net.", TypeRRSIG, ClassINET, 14400, 0}
- sig.Expiration, _ = StringToTime("20100909102025")
- sig.Inception, _ = StringToTime("20100812102025")
- sig.KeyTag = eckey.(*DNSKEY).KeyTag()
- sig.SignerName = eckey.(*DNSKEY).Hdr.Name
- sig.Algorithm = eckey.(*DNSKEY).Algorithm
-
- if sig.Sign(privkey.(*ecdsa.PrivateKey), []RR{a}) != nil {
- t.Fatal("failure to sign the record")
- }
-
- if err := sig.Verify(eckey.(*DNSKEY), []RR{a}); err != nil {
- t.Fatalf("failure to validate:\n%s\n%s\n%s\n\n%s\n\n%v",
- eckey.(*DNSKEY).String(),
- a.String(),
- sig.String(),
- eckey.(*DNSKEY).PrivateKeyString(privkey),
- err,
- )
- }
-}
-
-func TestSignVerifyECDSA2(t *testing.T) {
- srv1 := testRR("srv.miek.nl. IN SRV 1000 800 0 web1.miek.nl.")
- srv := srv1.(*SRV)
-
- // With this key
- key := new(DNSKEY)
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = ECDSAP256SHA256
- privkey, err := key.Generate(256)
- if err != nil {
- t.Fatal("failure to generate key")
- }
-
- // Fill in the values of the Sig, before signing
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = srv.Hdr.Rrtype
- sig.Labels = uint8(CountLabel(srv.Hdr.Name)) // works for all 3
- sig.OrigTtl = srv.Hdr.Ttl
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.KeyTag = key.KeyTag() // Get the keyfrom the Key
- sig.SignerName = key.Hdr.Name
- sig.Algorithm = ECDSAP256SHA256
-
- if sig.Sign(privkey.(*ecdsa.PrivateKey), []RR{srv}) != nil {
- t.Fatal("failure to sign the record")
- }
-
- err = sig.Verify(key, []RR{srv})
- if err != nil {
- t.Errorf("failure to validate:\n%s\n%s\n%s\n\n%s\n\n%v",
- key.String(),
- srv.String(),
- sig.String(),
- key.PrivateKeyString(privkey),
- err,
- )
- }
-}
-
-func TestSignVerifyEd25519(t *testing.T) {
- srv1, err := NewRR("srv.miek.nl. IN SRV 1000 800 0 web1.miek.nl.")
- if err != nil {
- t.Fatal(err)
- }
- srv := srv1.(*SRV)
-
- // With this key
- key := new(DNSKEY)
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = ED25519
- privkey, err := key.Generate(256)
- if err != nil {
- t.Fatal("failure to generate key")
- }
-
- // Fill in the values of the Sig, before signing
- sig := new(RRSIG)
- sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
- sig.TypeCovered = srv.Hdr.Rrtype
- sig.Labels = uint8(CountLabel(srv.Hdr.Name)) // works for all 3
- sig.OrigTtl = srv.Hdr.Ttl
- sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
- sig.Inception = 1293942305 // date -u '+%s' -d"2011-01-02 04:25:05"
- sig.KeyTag = key.KeyTag() // Get the keyfrom the Key
- sig.SignerName = key.Hdr.Name
- sig.Algorithm = ED25519
-
- if sig.Sign(privkey.(ed25519.PrivateKey), []RR{srv}) != nil {
- t.Fatal("failure to sign the record")
- }
-
- err = sig.Verify(key, []RR{srv})
- if err != nil {
- t.Logf("failure to validate:\n%s\n%s\n%s\n\n%s\n\n%v",
- key.String(),
- srv.String(),
- sig.String(),
- key.PrivateKeyString(privkey),
- err,
- )
- }
-}
-
-// Here the test vectors from the relevant RFCs are checked.
-// rfc6605 6.1
-func TestRFC6605P256(t *testing.T) {
- exDNSKEY := `example.net. 3600 IN DNSKEY 257 3 13 (
- GojIhhXUN/u4v54ZQqGSnyhWJwaubCvTmeexv7bR6edb
- krSqQpF64cYbcB7wNcP+e+MAnLr+Wi9xMWyQLc8NAA== )`
- exPriv := `Private-key-format: v1.2
-Algorithm: 13 (ECDSAP256SHA256)
-PrivateKey: GU6SnQ/Ou+xC5RumuIUIuJZteXT2z0O/ok1s38Et6mQ=`
- rrDNSKEY := testRR(exDNSKEY)
- priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
- if err != nil {
- t.Fatal(err)
- }
-
- exDS := `example.net. 3600 IN DS 55648 13 2 (
- b4c8c1fe2e7477127b27115656ad6256f424625bf5c1
- e2770ce6d6e37df61d17 )`
- rrDS := testRR(exDS)
- ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA256)
- if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
- t.Errorf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
- }
-
- exA := `www.example.net. 3600 IN A 192.0.2.1`
- exRRSIG := `www.example.net. 3600 IN RRSIG A 13 3 3600 (
- 20100909100439 20100812100439 55648 example.net.
- qx6wLYqmh+l9oCKTN6qIc+bw6ya+KJ8oMz0YP107epXA
- yGmt+3SNruPFKG7tZoLBLlUzGGus7ZwmwWep666VCw== )`
- rrA := testRR(exA)
- rrRRSIG := testRR(exRRSIG)
- if err := rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
- t.Errorf("failure to validate the spec RRSIG: %v", err)
- }
-
- ourRRSIG := &RRSIG{
- Hdr: RR_Header{
- Ttl: rrA.Header().Ttl,
- },
- KeyTag: rrDNSKEY.(*DNSKEY).KeyTag(),
- SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
- Algorithm: rrDNSKEY.(*DNSKEY).Algorithm,
- }
- ourRRSIG.Expiration, _ = StringToTime("20100909100439")
- ourRRSIG.Inception, _ = StringToTime("20100812100439")
- err = ourRRSIG.Sign(priv.(*ecdsa.PrivateKey), []RR{rrA})
- if err != nil {
- t.Fatal(err)
- }
-
- if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
- t.Errorf("failure to validate our RRSIG: %v", err)
- }
-
- // Signatures are randomized
- rrRRSIG.(*RRSIG).Signature = ""
- ourRRSIG.Signature = ""
- if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
- t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
- }
-}
-
-// rfc6605 6.2
-func TestRFC6605P384(t *testing.T) {
- exDNSKEY := `example.net. 3600 IN DNSKEY 257 3 14 (
- xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1
- w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8
- /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )`
- exPriv := `Private-key-format: v1.2
-Algorithm: 14 (ECDSAP384SHA384)
-PrivateKey: WURgWHCcYIYUPWgeLmiPY2DJJk02vgrmTfitxgqcL4vwW7BOrbawVmVe0d9V94SR`
- rrDNSKEY := testRR(exDNSKEY)
- priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
- if err != nil {
- t.Fatal(err)
- }
-
- exDS := `example.net. 3600 IN DS 10771 14 4 (
- 72d7b62976ce06438e9c0bf319013cf801f09ecc84b8
- d7e9495f27e305c6a9b0563a9b5f4d288405c3008a94
- 6df983d6 )`
- rrDS := testRR(exDS)
- ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA384)
- if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
- t.Fatalf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
- }
-
- exA := `www.example.net. 3600 IN A 192.0.2.1`
- exRRSIG := `www.example.net. 3600 IN RRSIG A 14 3 3600 (
- 20100909102025 20100812102025 10771 example.net.
- /L5hDKIvGDyI1fcARX3z65qrmPsVz73QD1Mr5CEqOiLP
- 95hxQouuroGCeZOvzFaxsT8Glr74hbavRKayJNuydCuz
- WTSSPdz7wnqXL5bdcJzusdnI0RSMROxxwGipWcJm )`
- rrA := testRR(exA)
- rrRRSIG := testRR(exRRSIG)
- if err != nil {
- t.Fatal(err)
- }
- if err = rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
- t.Errorf("failure to validate the spec RRSIG: %v", err)
- }
-
- ourRRSIG := &RRSIG{
- Hdr: RR_Header{
- Ttl: rrA.Header().Ttl,
- },
- KeyTag: rrDNSKEY.(*DNSKEY).KeyTag(),
- SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
- Algorithm: rrDNSKEY.(*DNSKEY).Algorithm,
- }
- ourRRSIG.Expiration, _ = StringToTime("20100909102025")
- ourRRSIG.Inception, _ = StringToTime("20100812102025")
- err = ourRRSIG.Sign(priv.(*ecdsa.PrivateKey), []RR{rrA})
- if err != nil {
- t.Fatal(err)
- }
-
- if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
- t.Errorf("failure to validate our RRSIG: %v", err)
- }
-
- // Signatures are randomized
- rrRRSIG.(*RRSIG).Signature = ""
- ourRRSIG.Signature = ""
- if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
- t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
- }
-}
-
-// rfc8080 6.1
-func TestRFC8080Ed25519Example1(t *testing.T) {
- exDNSKEY := `example.com. 3600 IN DNSKEY 257 3 15 (
- l02Woi0iS8Aa25FQkUd9RMzZHJpBoRQwAQEX1SxZJA4= )`
- exPriv := `Private-key-format: v1.2
-Algorithm: 15 (ED25519)
-PrivateKey: ODIyNjAzODQ2MjgwODAxMjI2NDUxOTAyMDQxNDIyNjI=`
- rrDNSKEY, err := NewRR(exDNSKEY)
- if err != nil {
- t.Fatal(err)
- }
- priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
- if err != nil {
- t.Fatal(err)
- }
-
- exDS := `example.com. 3600 IN DS 3613 15 2 (
- 3aa5ab37efce57f737fc1627013fee07bdf241bd10f3b1964ab55c78e79
- a304b )`
- rrDS, err := NewRR(exDS)
- if err != nil {
- t.Fatal(err)
- }
- ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA256)
- if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
- t.Fatalf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
- }
-
- exMX := `example.com. 3600 IN MX 10 mail.example.com.`
- exRRSIG := `example.com. 3600 IN RRSIG MX 15 2 3600 (
- 1440021600 1438207200 3613 example.com. (
- oL9krJun7xfBOIWcGHi7mag5/hdZrKWw15jPGrHpjQeRAvTdszaPD+QLs3f
- x8A4M3e23mRZ9VrbpMngwcrqNAg== ) )`
- rrMX, err := NewRR(exMX)
- if err != nil {
- t.Fatal(err)
- }
- rrRRSIG, err := NewRR(exRRSIG)
- if err != nil {
- t.Fatal(err)
- }
- if err = rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrMX}); err != nil {
- t.Errorf("failure to validate the spec RRSIG: %v", err)
- }
-
- ourRRSIG := &RRSIG{
- Hdr: RR_Header{
- Ttl: rrMX.Header().Ttl,
- },
- KeyTag: rrDNSKEY.(*DNSKEY).KeyTag(),
- SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
- Algorithm: rrDNSKEY.(*DNSKEY).Algorithm,
- }
- ourRRSIG.Expiration, _ = StringToTime("20150819220000")
- ourRRSIG.Inception, _ = StringToTime("20150729220000")
- err = ourRRSIG.Sign(priv.(ed25519.PrivateKey), []RR{rrMX})
- if err != nil {
- t.Fatal(err)
- }
-
- if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrMX}); err != nil {
- t.Errorf("failure to validate our RRSIG: %v", err)
- }
-
- if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
- t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
- }
-}
-
-// rfc8080 6.1
-func TestRFC8080Ed25519Example2(t *testing.T) {
- exDNSKEY := `example.com. 3600 IN DNSKEY 257 3 15 (
- zPnZ/QwEe7S8C5SPz2OfS5RR40ATk2/rYnE9xHIEijs= )`
- exPriv := `Private-key-format: v1.2
-Algorithm: 15 (ED25519)
-PrivateKey: DSSF3o0s0f+ElWzj9E/Osxw8hLpk55chkmx0LYN5WiY=`
- rrDNSKEY, err := NewRR(exDNSKEY)
- if err != nil {
- t.Fatal(err)
- }
- priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
- if err != nil {
- t.Fatal(err)
- }
-
- exDS := `example.com. 3600 IN DS 35217 15 2 (
- 401781b934e392de492ec77ae2e15d70f6575a1c0bc59c5275c04ebe80c
- 6614c )`
- rrDS, err := NewRR(exDS)
- if err != nil {
- t.Fatal(err)
- }
- ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA256)
- if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
- t.Fatalf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
- }
-
- exMX := `example.com. 3600 IN MX 10 mail.example.com.`
- exRRSIG := `example.com. 3600 IN RRSIG MX 15 2 3600 (
- 1440021600 1438207200 35217 example.com. (
- zXQ0bkYgQTEFyfLyi9QoiY6D8ZdYo4wyUhVioYZXFdT410QPRITQSqJSnzQ
- oSm5poJ7gD7AQR0O7KuI5k2pcBg== ) )`
- rrMX, err := NewRR(exMX)
- if err != nil {
- t.Fatal(err)
- }
- rrRRSIG, err := NewRR(exRRSIG)
- if err != nil {
- t.Fatal(err)
- }
- if err = rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrMX}); err != nil {
- t.Errorf("failure to validate the spec RRSIG: %v", err)
- }
-
- ourRRSIG := &RRSIG{
- Hdr: RR_Header{
- Ttl: rrMX.Header().Ttl,
- },
- KeyTag: rrDNSKEY.(*DNSKEY).KeyTag(),
- SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
- Algorithm: rrDNSKEY.(*DNSKEY).Algorithm,
- }
- ourRRSIG.Expiration, _ = StringToTime("20150819220000")
- ourRRSIG.Inception, _ = StringToTime("20150729220000")
- err = ourRRSIG.Sign(priv.(ed25519.PrivateKey), []RR{rrMX})
- if err != nil {
- t.Fatal(err)
- }
-
- if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrMX}); err != nil {
- t.Errorf("failure to validate our RRSIG: %v", err)
- }
-
- if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
- t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
- }
-}
-
-func TestInvalidRRSet(t *testing.T) {
- goodRecords := make([]RR, 2)
- goodRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- goodRecords[1] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"_o/"}}
-
- // Generate key
- keyname := "cloudflare.com."
- key := &DNSKEY{
- Hdr: RR_Header{Name: keyname, Rrtype: TypeDNSKEY, Class: ClassINET, Ttl: 0},
- Algorithm: ECDSAP256SHA256,
- Flags: ZONE,
- Protocol: 3,
- }
- privatekey, err := key.Generate(256)
- if err != nil {
- t.Fatal(err.Error())
- }
-
- // Need to fill in: Inception, Expiration, KeyTag, SignerName and Algorithm
- curTime := time.Now()
- signature := &RRSIG{
- Inception: uint32(curTime.Unix()),
- Expiration: uint32(curTime.Add(time.Hour).Unix()),
- KeyTag: key.KeyTag(),
- SignerName: keyname,
- Algorithm: ECDSAP256SHA256,
- }
-
- // Inconsistent name between records
- badRecords := make([]RR, 2)
- badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- badRecords[1] = &TXT{Hdr: RR_Header{Name: "nama.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"_o/"}}
-
- if IsRRset(badRecords) {
- t.Fatal("Record set with inconsistent names considered valid")
- }
-
- badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- badRecords[1] = &A{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeA, Class: ClassINET, Ttl: 0}}
-
- if IsRRset(badRecords) {
- t.Fatal("Record set with inconsistent record types considered valid")
- }
-
- badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- badRecords[1] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassCHAOS, Ttl: 0}, Txt: []string{"_o/"}}
-
- if IsRRset(badRecords) {
- t.Fatal("Record set with inconsistent record class considered valid")
- }
-
- // Sign the good record set and then make sure verification fails on the bad record set
- if err := signature.Sign(privatekey.(crypto.Signer), goodRecords); err != nil {
- t.Fatal("Signing good records failed")
- }
-
- if err := signature.Verify(key, badRecords); err != ErrRRset {
- t.Fatal("Verification did not return ErrRRset with inconsistent records")
- }
-}
diff --git a/vendor/github.com/miekg/dns/dnsutil/util.go b/vendor/github.com/miekg/dns/dnsutil/util.go
deleted file mode 100644
index 76ac4de66..000000000
--- a/vendor/github.com/miekg/dns/dnsutil/util.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Package dnsutil contains higher-level methods useful with the dns
-// package. While package dns implements the DNS protocols itself,
-// these functions are related but not directly required for protocol
-// processing. They are often useful in preparing input/output of the
-// functions in package dns.
-package dnsutil
-
-import (
- "strings"
-
- "github.com/miekg/dns"
-)
-
-// AddOrigin adds origin to s if s is not already a FQDN.
-// Note that the result may not be a FQDN. If origin does not end
-// with a ".", the result won't either.
-// This implements the zonefile convention (specified in RFC 1035,
-// Section "5.1. Format") that "@" represents the
-// apex (bare) domain. i.e. AddOrigin("@", "foo.com.") returns "foo.com.".
-func AddOrigin(s, origin string) string {
- // ("foo.", "origin.") -> "foo." (already a FQDN)
- // ("foo", "origin.") -> "foo.origin."
- // ("foo", "origin") -> "foo.origin"
- // ("foo", ".") -> "foo." (Same as dns.Fqdn())
- // ("foo.", ".") -> "foo." (Same as dns.Fqdn())
- // ("@", "origin.") -> "origin." (@ represents the apex (bare) domain)
- // ("", "origin.") -> "origin." (not obvious)
- // ("foo", "") -> "foo" (not obvious)
-
- if dns.IsFqdn(s) {
- return s // s is already a FQDN, no need to mess with it.
- }
- if len(origin) == 0 {
- return s // Nothing to append.
- }
- if s == "@" || len(s) == 0 {
- return origin // Expand apex.
- }
- if origin == "." {
- return dns.Fqdn(s)
- }
-
- return s + "." + origin // The simple case.
-}
-
-// TrimDomainName trims origin from s if s is a subdomain.
-// This function will never return "", but returns "@" instead (@ represents the apex domain).
-func TrimDomainName(s, origin string) string {
- // An apex (bare) domain is always returned as "@".
- // If the return value ends in a ".", the domain was not the suffix.
- // origin can end in "." or not. Either way the results should be the same.
-
- if len(s) == 0 {
- return "@"
- }
- // Someone is using TrimDomainName(s, ".") to remove a dot if it exists.
- if origin == "." {
- return strings.TrimSuffix(s, origin)
- }
-
- original := s
- s = dns.Fqdn(s)
- origin = dns.Fqdn(origin)
-
- if !dns.IsSubDomain(origin, s) {
- return original
- }
-
- slabels := dns.Split(s)
- olabels := dns.Split(origin)
- m := dns.CompareDomainName(s, origin)
- if len(olabels) == m {
- if len(olabels) == len(slabels) {
- return "@" // origin == s
- }
- if (s[0] == '.') && (len(slabels) == (len(olabels) + 1)) {
- return "@" // TrimDomainName(".foo.", "foo.")
- }
- }
-
- // Return the first (len-m) labels:
- return s[:slabels[len(slabels)-m]-1]
-}
diff --git a/vendor/github.com/miekg/dns/dnsutil/util_test.go b/vendor/github.com/miekg/dns/dnsutil/util_test.go
deleted file mode 100644
index 6754789bc..000000000
--- a/vendor/github.com/miekg/dns/dnsutil/util_test.go
+++ /dev/null
@@ -1,130 +0,0 @@
-package dnsutil
-
-import "testing"
-
-func TestAddOrigin(t *testing.T) {
- var tests = []struct{ e1, e2, expected string }{
- {"@", "example.com", "example.com"},
- {"foo", "example.com", "foo.example.com"},
- {"foo.", "example.com", "foo."},
- {"@", "example.com.", "example.com."},
- {"foo", "example.com.", "foo.example.com."},
- {"foo.", "example.com.", "foo."},
- {"example.com", ".", "example.com."},
- {"example.com.", ".", "example.com."},
- // Oddball tests:
- // In general origin should not be "" or "." but at least
- // these tests verify we don't crash and will keep results
- // from changing unexpectedly.
- {"*.", "", "*."},
- {"@", "", "@"},
- {"foobar", "", "foobar"},
- {"foobar.", "", "foobar."},
- {"*.", ".", "*."},
- {"@", ".", "."},
- {"foobar", ".", "foobar."},
- {"foobar.", ".", "foobar."},
- }
- for _, test := range tests {
- actual := AddOrigin(test.e1, test.e2)
- if test.expected != actual {
- t.Errorf("AddOrigin(%#v, %#v) expected %#v, got %#v\n", test.e1, test.e2, test.expected, actual)
- }
- }
-}
-
-func TestTrimDomainName(t *testing.T) {
- // Basic tests.
- // Try trimming "example.com" and "example.com." from typical use cases.
- testsEx := []struct{ experiment, expected string }{
- {"foo.example.com", "foo"},
- {"foo.example.com.", "foo"},
- {".foo.example.com", ".foo"},
- {".foo.example.com.", ".foo"},
- {"*.example.com", "*"},
- {"example.com", "@"},
- {"example.com.", "@"},
- {"com.", "com."},
- {"foo.", "foo."},
- {"serverfault.com.", "serverfault.com."},
- {"serverfault.com", "serverfault.com"},
- {".foo.ronco.com", ".foo.ronco.com"},
- {".foo.ronco.com.", ".foo.ronco.com."},
- }
- for _, dom := range []string{"example.com", "example.com."} {
- for i, test := range testsEx {
- actual := TrimDomainName(test.experiment, dom)
- if test.expected != actual {
- t.Errorf("%d TrimDomainName(%#v, %#v): expected %v, got %v\n", i, test.experiment, dom, test.expected, actual)
- }
- }
- }
-
- // Paranoid tests.
- // These test shouldn't be needed but I was weary of off-by-one errors.
- // In theory, these can't happen because there are no single-letter TLDs,
- // but it is good to exercize the code this way.
- tests := []struct{ experiment, expected string }{
- {"", "@"},
- {".", "."},
- {"a.b.c.d.e.f.", "a.b.c.d.e"},
- {"b.c.d.e.f.", "b.c.d.e"},
- {"c.d.e.f.", "c.d.e"},
- {"d.e.f.", "d.e"},
- {"e.f.", "e"},
- {"f.", "@"},
- {".a.b.c.d.e.f.", ".a.b.c.d.e"},
- {".b.c.d.e.f.", ".b.c.d.e"},
- {".c.d.e.f.", ".c.d.e"},
- {".d.e.f.", ".d.e"},
- {".e.f.", ".e"},
- {".f.", "@"},
- {"a.b.c.d.e.f", "a.b.c.d.e"},
- {"a.b.c.d.e.", "a.b.c.d.e."},
- {"a.b.c.d.e", "a.b.c.d.e"},
- {"a.b.c.d.", "a.b.c.d."},
- {"a.b.c.d", "a.b.c.d"},
- {"a.b.c.", "a.b.c."},
- {"a.b.c", "a.b.c"},
- {"a.b.", "a.b."},
- {"a.b", "a.b"},
- {"a.", "a."},
- {"a", "a"},
- {".a.b.c.d.e.f", ".a.b.c.d.e"},
- {".a.b.c.d.e.", ".a.b.c.d.e."},
- {".a.b.c.d.e", ".a.b.c.d.e"},
- {".a.b.c.d.", ".a.b.c.d."},
- {".a.b.c.d", ".a.b.c.d"},
- {".a.b.c.", ".a.b.c."},
- {".a.b.c", ".a.b.c"},
- {".a.b.", ".a.b."},
- {".a.b", ".a.b"},
- {".a.", ".a."},
- {".a", ".a"},
- }
- for _, dom := range []string{"f", "f."} {
- for i, test := range tests {
- actual := TrimDomainName(test.experiment, dom)
- if test.expected != actual {
- t.Errorf("%d TrimDomainName(%#v, %#v): expected %v, got %v\n", i, test.experiment, dom, test.expected, actual)
- }
- }
- }
-
- // Test cases for bugs found in the wild.
- // These test cases provide both origin, s, and the expected result.
- // If you find a bug in the while, this is probably the easiest place
- // to add it as a test case.
- var testsWild = []struct{ e1, e2, expected string }{
- {"mathoverflow.net.", ".", "mathoverflow.net"},
- {"mathoverflow.net", ".", "mathoverflow.net"},
- {"", ".", "@"},
- {"@", ".", "@"},
- }
- for i, test := range testsWild {
- actual := TrimDomainName(test.e1, test.e2)
- if test.expected != actual {
- t.Errorf("%d TrimDomainName(%#v, %#v): expected %v, got %v\n", i, test.e1, test.e2, test.expected, actual)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/dyn_test.go b/vendor/github.com/miekg/dns/dyn_test.go
deleted file mode 100644
index 09986a5e4..000000000
--- a/vendor/github.com/miekg/dns/dyn_test.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package dns
-
-// Find better solution
diff --git a/vendor/github.com/miekg/dns/edns_test.go b/vendor/github.com/miekg/dns/edns_test.go
deleted file mode 100644
index f7cf15754..000000000
--- a/vendor/github.com/miekg/dns/edns_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package dns
-
-import "testing"
-
-func TestOPTTtl(t *testing.T) {
- e := &OPT{}
- e.Hdr.Name = "."
- e.Hdr.Rrtype = TypeOPT
-
- // verify the default setting of DO=0
- if e.Do() {
- t.Errorf("DO bit should be zero")
- }
-
- // There are 6 possible invocations of SetDo():
- //
- // 1. Starting with DO=0, using SetDo()
- // 2. Starting with DO=0, using SetDo(true)
- // 3. Starting with DO=0, using SetDo(false)
- // 4. Starting with DO=1, using SetDo()
- // 5. Starting with DO=1, using SetDo(true)
- // 6. Starting with DO=1, using SetDo(false)
-
- // verify that invoking SetDo() sets DO=1 (TEST #1)
- e.SetDo()
- if !e.Do() {
- t.Errorf("DO bit should be non-zero")
- }
- // verify that using SetDo(true) works when DO=1 (TEST #5)
- e.SetDo(true)
- if !e.Do() {
- t.Errorf("DO bit should still be non-zero")
- }
- // verify that we can use SetDo(false) to set DO=0 (TEST #6)
- e.SetDo(false)
- if e.Do() {
- t.Errorf("DO bit should be zero")
- }
- // verify that if we call SetDo(false) when DO=0 that it is unchanged (TEST #3)
- e.SetDo(false)
- if e.Do() {
- t.Errorf("DO bit should still be zero")
- }
- // verify that using SetDo(true) works for DO=0 (TEST #2)
- e.SetDo(true)
- if !e.Do() {
- t.Errorf("DO bit should be non-zero")
- }
- // verify that using SetDo() works for DO=1 (TEST #4)
- e.SetDo()
- if !e.Do() {
- t.Errorf("DO bit should be non-zero")
- }
-
- if e.Version() != 0 {
- t.Errorf("version should be non-zero")
- }
-
- e.SetVersion(42)
- if e.Version() != 42 {
- t.Errorf("set 42, expected %d, got %d", 42, e.Version())
- }
-
- e.SetExtendedRcode(42)
- if e.ExtendedRcode() != 42 {
- t.Errorf("set 42, expected %d, got %d", 42, e.ExtendedRcode())
- }
-}
diff --git a/vendor/github.com/miekg/dns/example_test.go b/vendor/github.com/miekg/dns/example_test.go
deleted file mode 100644
index 64c14962c..000000000
--- a/vendor/github.com/miekg/dns/example_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package dns_test
-
-import (
- "errors"
- "fmt"
- "log"
- "net"
-
- "github.com/miekg/dns"
-)
-
-// Retrieve the MX records for miek.nl.
-func ExampleMX() {
- config, _ := dns.ClientConfigFromFile("/etc/resolv.conf")
- c := new(dns.Client)
- m := new(dns.Msg)
- m.SetQuestion("miek.nl.", dns.TypeMX)
- m.RecursionDesired = true
- r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port)
- if err != nil {
- return
- }
- if r.Rcode != dns.RcodeSuccess {
- return
- }
- for _, a := range r.Answer {
- if mx, ok := a.(*dns.MX); ok {
- fmt.Printf("%s\n", mx.String())
- }
- }
-}
-
-// Retrieve the DNSKEY records of a zone and convert them
-// to DS records for SHA1, SHA256 and SHA384.
-func ExampleDS() {
- config, _ := dns.ClientConfigFromFile("/etc/resolv.conf")
- c := new(dns.Client)
- m := new(dns.Msg)
- zone := "miek.nl"
- m.SetQuestion(dns.Fqdn(zone), dns.TypeDNSKEY)
- m.SetEdns0(4096, true)
- r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port)
- if err != nil {
- return
- }
- if r.Rcode != dns.RcodeSuccess {
- return
- }
- for _, k := range r.Answer {
- if key, ok := k.(*dns.DNSKEY); ok {
- for _, alg := range []uint8{dns.SHA1, dns.SHA256, dns.SHA384} {
- fmt.Printf("%s; %d\n", key.ToDS(alg).String(), key.Flags)
- }
- }
- }
-}
-
-const TypeAPAIR = 0x0F99
-
-type APAIR struct {
- addr [2]net.IP
-}
-
-func NewAPAIR() dns.PrivateRdata { return new(APAIR) }
-
-func (rd *APAIR) String() string { return rd.addr[0].String() + " " + rd.addr[1].String() }
-func (rd *APAIR) Parse(txt []string) error {
- if len(txt) != 2 {
- return errors.New("two addresses required for APAIR")
- }
- for i, s := range txt {
- ip := net.ParseIP(s)
- if ip == nil {
- return errors.New("invalid IP in APAIR text representation")
- }
- rd.addr[i] = ip
- }
- return nil
-}
-
-func (rd *APAIR) Pack(buf []byte) (int, error) {
- b := append([]byte(rd.addr[0]), []byte(rd.addr[1])...)
- n := copy(buf, b)
- if n != len(b) {
- return n, dns.ErrBuf
- }
- return n, nil
-}
-
-func (rd *APAIR) Unpack(buf []byte) (int, error) {
- ln := net.IPv4len * 2
- if len(buf) != ln {
- return 0, errors.New("invalid length of APAIR rdata")
- }
- cp := make([]byte, ln)
- copy(cp, buf) // clone bytes to use them in IPs
-
- rd.addr[0] = net.IP(cp[:3])
- rd.addr[1] = net.IP(cp[4:])
-
- return len(buf), nil
-}
-
-func (rd *APAIR) Copy(dest dns.PrivateRdata) error {
- cp := make([]byte, rd.Len())
- _, err := rd.Pack(cp)
- if err != nil {
- return err
- }
-
- d := dest.(*APAIR)
- d.addr[0] = net.IP(cp[:3])
- d.addr[1] = net.IP(cp[4:])
- return nil
-}
-
-func (rd *APAIR) Len() int {
- return net.IPv4len * 2
-}
-
-func ExamplePrivateHandle() {
- dns.PrivateHandle("APAIR", TypeAPAIR, NewAPAIR)
- defer dns.PrivateHandleRemove(TypeAPAIR)
-
- rr, err := dns.NewRR("miek.nl. APAIR (1.2.3.4 1.2.3.5)")
- if err != nil {
- log.Fatal("could not parse APAIR record: ", err)
- }
- fmt.Println(rr)
- // Output: miek.nl. 3600 IN APAIR 1.2.3.4 1.2.3.5
-
- m := new(dns.Msg)
- m.Id = 12345
- m.SetQuestion("miek.nl.", TypeAPAIR)
- m.Answer = append(m.Answer, rr)
-
- fmt.Println(m)
- // ;; opcode: QUERY, status: NOERROR, id: 12345
- // ;; flags: rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
- //
- // ;; QUESTION SECTION:
- // ;miek.nl. IN APAIR
- //
- // ;; ANSWER SECTION:
- // miek.nl. 3600 IN APAIR 1.2.3.4 1.2.3.5
-}
diff --git a/vendor/github.com/miekg/dns/issue_test.go b/vendor/github.com/miekg/dns/issue_test.go
deleted file mode 100644
index 7299d3143..000000000
--- a/vendor/github.com/miekg/dns/issue_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package dns
-
-// Tests that solve that an specific issue.
-
-import (
- "strings"
- "testing"
-)
-
-func TestTCPRtt(t *testing.T) {
- m := new(Msg)
- m.RecursionDesired = true
- m.SetQuestion("example.org.", TypeA)
-
- c := &Client{}
- for _, proto := range []string{"udp", "tcp"} {
- c.Net = proto
- _, rtt, err := c.Exchange(m, "8.8.4.4:53")
- if err != nil {
- t.Fatal(err)
- }
- if rtt == 0 {
- t.Fatalf("expecting non zero rtt %s, got zero", c.Net)
- }
- }
-}
-
-func TestNSEC3MissingSalt(t *testing.T) {
- rr := testRR("ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. NSEC3 1 1 12 aabbccdd K8UDEMVP1J2F7EG6JEBPS17VP3N8I58H")
- m := new(Msg)
- m.Answer = []RR{rr}
- mb, err := m.Pack()
- if err != nil {
- t.Fatalf("expected to pack message. err: %s", err)
- }
- if err := m.Unpack(mb); err != nil {
- t.Fatalf("expected to unpack message. missing salt? err: %s", err)
- }
- in := rr.(*NSEC3).Salt
- out := m.Answer[0].(*NSEC3).Salt
- if in != out {
- t.Fatalf("expected salts to match. packed: `%s`. returned: `%s`", in, out)
- }
-}
-
-func TestNSEC3MixedNextDomain(t *testing.T) {
- rr := testRR("ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. NSEC3 1 1 12 - k8udemvp1j2f7eg6jebps17vp3n8i58h")
- m := new(Msg)
- m.Answer = []RR{rr}
- mb, err := m.Pack()
- if err != nil {
- t.Fatalf("expected to pack message. err: %s", err)
- }
- if err := m.Unpack(mb); err != nil {
- t.Fatalf("expected to unpack message. err: %s", err)
- }
- in := strings.ToUpper(rr.(*NSEC3).NextDomain)
- out := m.Answer[0].(*NSEC3).NextDomain
- if in != out {
- t.Fatalf("expected round trip to produce NextDomain `%s`, instead `%s`", in, out)
- }
-}
diff --git a/vendor/github.com/miekg/dns/labels_test.go b/vendor/github.com/miekg/dns/labels_test.go
deleted file mode 100644
index d9bb556df..000000000
--- a/vendor/github.com/miekg/dns/labels_test.go
+++ /dev/null
@@ -1,201 +0,0 @@
-package dns
-
-import "testing"
-
-func TestCompareDomainName(t *testing.T) {
- s1 := "www.miek.nl."
- s2 := "miek.nl."
- s3 := "www.bla.nl."
- s4 := "nl.www.bla."
- s5 := "nl."
- s6 := "miek.nl."
-
- if CompareDomainName(s1, s2) != 2 {
- t.Errorf("%s with %s should be %d", s1, s2, 2)
- }
- if CompareDomainName(s1, s3) != 1 {
- t.Errorf("%s with %s should be %d", s1, s3, 1)
- }
- if CompareDomainName(s3, s4) != 0 {
- t.Errorf("%s with %s should be %d", s3, s4, 0)
- }
- // Non qualified tests
- if CompareDomainName(s1, s5) != 1 {
- t.Errorf("%s with %s should be %d", s1, s5, 1)
- }
- if CompareDomainName(s1, s6) != 2 {
- t.Errorf("%s with %s should be %d", s1, s5, 2)
- }
-
- if CompareDomainName(s1, ".") != 0 {
- t.Errorf("%s with %s should be %d", s1, s5, 0)
- }
- if CompareDomainName(".", ".") != 0 {
- t.Errorf("%s with %s should be %d", ".", ".", 0)
- }
- if CompareDomainName("test.com.", "TEST.COM.") != 2 {
- t.Errorf("test.com. and TEST.COM. should be an exact match")
- }
-}
-
-func TestSplit(t *testing.T) {
- splitter := map[string]int{
- "www.miek.nl.": 3,
- "www.miek.nl": 3,
- "www..miek.nl": 4,
- `www\.miek.nl.`: 2,
- `www\\.miek.nl.`: 3,
- ".": 0,
- "nl.": 1,
- "nl": 1,
- "com.": 1,
- ".com.": 2,
- }
- for s, i := range splitter {
- if x := len(Split(s)); x != i {
- t.Errorf("labels should be %d, got %d: %s %v", i, x, s, Split(s))
- }
- }
-}
-
-func TestSplit2(t *testing.T) {
- splitter := map[string][]int{
- "www.miek.nl.": {0, 4, 9},
- "www.miek.nl": {0, 4, 9},
- "nl": {0},
- }
- for s, i := range splitter {
- x := Split(s)
- switch len(i) {
- case 1:
- if x[0] != i[0] {
- t.Errorf("labels should be %v, got %v: %s", i, x, s)
- }
- default:
- if x[0] != i[0] || x[1] != i[1] || x[2] != i[2] {
- t.Errorf("labels should be %v, got %v: %s", i, x, s)
- }
- }
- }
-}
-
-func TestPrevLabel(t *testing.T) {
- type prev struct {
- string
- int
- }
- prever := map[prev]int{
- {"www.miek.nl.", 0}: 12,
- {"www.miek.nl.", 1}: 9,
- {"www.miek.nl.", 2}: 4,
-
- {"www.miek.nl", 0}: 11,
- {"www.miek.nl", 1}: 9,
- {"www.miek.nl", 2}: 4,
-
- {"www.miek.nl.", 5}: 0,
- {"www.miek.nl", 5}: 0,
-
- {"www.miek.nl.", 3}: 0,
- {"www.miek.nl", 3}: 0,
- }
- for s, i := range prever {
- x, ok := PrevLabel(s.string, s.int)
- if i != x {
- t.Errorf("label should be %d, got %d, %t: preving %d, %s", i, x, ok, s.int, s.string)
- }
- }
-}
-
-func TestCountLabel(t *testing.T) {
- splitter := map[string]int{
- "www.miek.nl.": 3,
- "www.miek.nl": 3,
- "nl": 1,
- ".": 0,
- }
- for s, i := range splitter {
- x := CountLabel(s)
- if x != i {
- t.Errorf("CountLabel should have %d, got %d", i, x)
- }
- }
-}
-
-func TestSplitDomainName(t *testing.T) {
- labels := map[string][]string{
- "miek.nl": {"miek", "nl"},
- ".": nil,
- "www.miek.nl.": {"www", "miek", "nl"},
- "www.miek.nl": {"www", "miek", "nl"},
- "www..miek.nl": {"www", "", "miek", "nl"},
- `www\.miek.nl`: {`www\.miek`, "nl"},
- `www\\.miek.nl`: {`www\\`, "miek", "nl"},
- ".www.miek.nl.": {"", "www", "miek", "nl"},
- }
-domainLoop:
- for domain, splits := range labels {
- parts := SplitDomainName(domain)
- if len(parts) != len(splits) {
- t.Errorf("SplitDomainName returned %v for %s, expected %v", parts, domain, splits)
- continue domainLoop
- }
- for i := range parts {
- if parts[i] != splits[i] {
- t.Errorf("SplitDomainName returned %v for %s, expected %v", parts, domain, splits)
- continue domainLoop
- }
- }
- }
-}
-
-func TestIsDomainName(t *testing.T) {
- type ret struct {
- ok bool
- lab int
- }
- names := map[string]*ret{
- "..": {false, 1},
- "@.": {true, 1},
- "www.example.com": {true, 3},
- "www.e%ample.com": {true, 3},
- "www.example.com.": {true, 3},
- "mi\\k.nl.": {true, 2},
- "mi\\k.nl": {true, 2},
- }
- for d, ok := range names {
- l, k := IsDomainName(d)
- if ok.ok != k || ok.lab != l {
- t.Errorf(" got %v %d for %s ", k, l, d)
- t.Errorf("have %v %d for %s ", ok.ok, ok.lab, d)
- }
- }
-}
-
-func BenchmarkSplitLabels(b *testing.B) {
- for i := 0; i < b.N; i++ {
- Split("www.example.com.")
- }
-}
-
-func BenchmarkLenLabels(b *testing.B) {
- for i := 0; i < b.N; i++ {
- CountLabel("www.example.com.")
- }
-}
-
-func BenchmarkCompareDomainName(b *testing.B) {
- b.ReportAllocs()
- for i := 0; i < b.N; i++ {
- CompareDomainName("www.example.com.", "aa.example.com.")
- }
-}
-
-func BenchmarkIsSubDomain(b *testing.B) {
- b.ReportAllocs()
- for i := 0; i < b.N; i++ {
- IsSubDomain("www.example.com.", "aa.example.com.")
- IsSubDomain("example.com.", "aa.example.com.")
- IsSubDomain("miek.nl.", "aa.example.com.")
- }
-}
diff --git a/vendor/github.com/miekg/dns/leak_test.go b/vendor/github.com/miekg/dns/leak_test.go
deleted file mode 100644
index af37011d7..000000000
--- a/vendor/github.com/miekg/dns/leak_test.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package dns
-
-import (
- "fmt"
- "os"
- "runtime"
- "sort"
- "strings"
- "testing"
- "time"
-)
-
-// copied from net/http/main_test.go
-
-func interestingGoroutines() (gs []string) {
- buf := make([]byte, 2<<20)
- buf = buf[:runtime.Stack(buf, true)]
- for _, g := range strings.Split(string(buf), "\n\n") {
- sl := strings.SplitN(g, "\n", 2)
- if len(sl) != 2 {
- continue
- }
- stack := strings.TrimSpace(sl[1])
- if stack == "" ||
- strings.Contains(stack, "testing.(*M).before.func1") ||
- strings.Contains(stack, "os/signal.signal_recv") ||
- strings.Contains(stack, "created by net.startServer") ||
- strings.Contains(stack, "created by testing.RunTests") ||
- strings.Contains(stack, "closeWriteAndWait") ||
- strings.Contains(stack, "testing.Main(") ||
- strings.Contains(stack, "testing.(*T).Run(") ||
- // These only show up with GOTRACEBACK=2; Issue 5005 (comment 28)
- strings.Contains(stack, "runtime.goexit") ||
- strings.Contains(stack, "created by runtime.gc") ||
- strings.Contains(stack, "dns.interestingGoroutines") ||
- strings.Contains(stack, "runtime.MHeap_Scavenger") {
- continue
- }
- gs = append(gs, stack)
- }
- sort.Strings(gs)
- return
-}
-
-func goroutineLeaked() error {
- if testing.Short() {
- // Don't worry about goroutine leaks in -short mode or in
- // benchmark mode. Too distracting when there are false positives.
- return nil
- }
-
- var stackCount map[string]int
- for i := 0; i < 5; i++ {
- n := 0
- stackCount = make(map[string]int)
- gs := interestingGoroutines()
- for _, g := range gs {
- stackCount[g]++
- n++
- }
- if n == 0 {
- return nil
- }
- // Wait for goroutines to schedule and die off:
- time.Sleep(100 * time.Millisecond)
- }
- for stack, count := range stackCount {
- fmt.Fprintf(os.Stderr, "%d instances of:\n%s\n", count, stack)
- }
- return fmt.Errorf("too many goroutines running after dns test(s)")
-}
diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go
index 975dde781..276e6b027 100644
--- a/vendor/github.com/miekg/dns/msg.go
+++ b/vendor/github.com/miekg/dns/msg.go
@@ -595,6 +595,13 @@ func UnpackRR(msg []byte, off int) (rr RR, off1 int, err error) {
if err != nil {
return nil, len(msg), err
}
+
+ return UnpackRRWithHeader(h, msg, off)
+}
+
+// UnpackRRWithHeader unpacks the record type specific payload given an existing
+// RR_Header.
+func UnpackRRWithHeader(h RR_Header, msg []byte, off int) (rr RR, off1 int, err error) {
end := off + int(h.Rdlength)
if fn, known := typeToUnpack[h.Rrtype]; !known {
@@ -926,49 +933,65 @@ func compressedLen(dns *Msg, compress bool) int {
l += r.len()
compressionLenHelper(compression, r.Name)
}
- l += compressionLenSlice(compression, dns.Answer)
- l += compressionLenSlice(compression, dns.Ns)
- l += compressionLenSlice(compression, dns.Extra)
- } else {
- for _, r := range dns.Question {
+ l += compressionLenSlice(l, compression, dns.Answer)
+ l += compressionLenSlice(l, compression, dns.Ns)
+ l += compressionLenSlice(l, compression, dns.Extra)
+
+ return l
+ }
+
+ for _, r := range dns.Question {
+ l += r.len()
+ }
+ for _, r := range dns.Answer {
+ if r != nil {
l += r.len()
}
- for _, r := range dns.Answer {
- if r != nil {
- l += r.len()
- }
- }
- for _, r := range dns.Ns {
- if r != nil {
- l += r.len()
- }
+ }
+ for _, r := range dns.Ns {
+ if r != nil {
+ l += r.len()
}
- for _, r := range dns.Extra {
- if r != nil {
- l += r.len()
- }
+ }
+ for _, r := range dns.Extra {
+ if r != nil {
+ l += r.len()
}
}
+
return l
}
-func compressionLenSlice(c map[string]int, rs []RR) int {
+func compressionLenSlice(len int, c map[string]int, rs []RR) int {
var l int
for _, r := range rs {
if r == nil {
continue
}
- l += r.len()
+ // track this length, and the global length in len, while taking compression into account for both.
+ x := r.len()
+ l += x
+ len += x
+
k, ok := compressionLenSearch(c, r.Header().Name)
if ok {
l += 1 - k
+ len += 1 - k
+ }
+
+ if len < maxCompressionOffset {
+ compressionLenHelper(c, r.Header().Name)
}
- compressionLenHelper(c, r.Header().Name)
+
k, ok = compressionLenSearchType(c, r)
if ok {
l += 1 - k
+ len += 1 - k
+ }
+
+ if len < maxCompressionOffset {
+ compressionLenHelperType(c, r)
}
- compressionLenHelperType(c, r)
}
return l
}
diff --git a/vendor/github.com/miekg/dns/msg_test.go b/vendor/github.com/miekg/dns/msg_test.go
deleted file mode 100644
index 2dbef6260..000000000
--- a/vendor/github.com/miekg/dns/msg_test.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package dns
-
-import (
- "fmt"
- "regexp"
- "strconv"
- "strings"
- "testing"
-)
-
-const (
- maxPrintableLabel = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789x"
- tooLongLabel = maxPrintableLabel + "x"
-)
-
-var (
- longDomain = maxPrintableLabel[:53] + strings.TrimSuffix(
- strings.Join([]string{".", ".", ".", ".", "."}, maxPrintableLabel[:49]), ".")
- reChar = regexp.MustCompile(`.`)
- i = -1
- maxUnprintableLabel = reChar.ReplaceAllStringFunc(maxPrintableLabel, func(ch string) string {
- if i++; i >= 32 {
- i = 0
- }
- return fmt.Sprintf("\\%03d", i)
- })
-)
-
-func TestUnpackDomainName(t *testing.T) {
- var cases = []struct {
- label string
- input string
- expectedOutput string
- expectedError string
- }{
- {"empty domain",
- "\x00",
- ".",
- ""},
- {"long label",
- string(63) + maxPrintableLabel + "\x00",
- maxPrintableLabel + ".",
- ""},
- {"unprintable label",
- string(63) + regexp.MustCompile(`\\[0-9]+`).ReplaceAllStringFunc(maxUnprintableLabel,
- func(escape string) string {
- n, _ := strconv.ParseInt(escape[1:], 10, 8)
- return string(n)
- }) + "\x00",
- maxUnprintableLabel + ".",
- ""},
- {"long domain",
- string(53) + strings.Replace(longDomain, ".", string(49), -1) + "\x00",
- longDomain + ".",
- ""},
- {"compression pointer",
- // an unrealistic but functional test referencing an offset _inside_ a label
- "\x03foo" + "\x05\x03com\x00" + "\x07example" + "\xC0\x05",
- "foo.\\003com\\000.example.com.",
- ""},
-
- {"too long domain",
- string(54) + "x" + strings.Replace(longDomain, ".", string(49), -1) + "\x00",
- "x" + longDomain + ".",
- ErrLongDomain.Error()},
- {"too long by pointer",
- // a matryoshka doll name to get over 255 octets after expansion via internal pointers
- string([]byte{
- // 11 length values, first to last
- 40, 37, 34, 31, 28, 25, 22, 19, 16, 13, 0,
- // 12 filler values
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
- // 10 pointers, last to first
- 192, 10, 192, 9, 192, 8, 192, 7, 192, 6, 192, 5, 192, 4, 192, 3, 192, 2, 192, 1,
- }),
- "",
- ErrLongDomain.Error()},
- {"long by pointer",
- // a matryoshka doll name _not_ exceeding 255 octets after expansion
- string([]byte{
- // 11 length values, first to last
- 37, 34, 31, 28, 25, 22, 19, 16, 13, 10, 0,
- // 9 filler values
- 120, 120, 120, 120, 120, 120, 120, 120, 120,
- // 10 pointers, last to first
- 192, 10, 192, 9, 192, 8, 192, 7, 192, 6, 192, 5, 192, 4, 192, 3, 192, 2, 192, 1,
- }),
- "" +
- (`\"\031\028\025\022\019\016\013\010\000xxxxxxxxx` +
- `\192\010\192\009\192\008\192\007\192\006\192\005\192\004\192\003\192\002.`) +
- (`\031\028\025\022\019\016\013\010\000xxxxxxxxx` +
- `\192\010\192\009\192\008\192\007\192\006\192\005\192\004\192\003.`) +
- (`\028\025\022\019\016\013\010\000xxxxxxxxx` +
- `\192\010\192\009\192\008\192\007\192\006\192\005\192\004.`) +
- (`\025\022\019\016\013\010\000xxxxxxxxx` +
- `\192\010\192\009\192\008\192\007\192\006\192\005.`) +
- `\022\019\016\013\010\000xxxxxxxxx\192\010\192\009\192\008\192\007\192\006.` +
- `\019\016\013\010\000xxxxxxxxx\192\010\192\009\192\008\192\007.` +
- `\016\013\010\000xxxxxxxxx\192\010\192\009\192\008.` +
- `\013\010\000xxxxxxxxx\192\010\192\009.` +
- `\010\000xxxxxxxxx\192\010.` +
- `\000xxxxxxxxx.`,
- ""},
- {"truncated name", "\x07example\x03", "", "dns: buffer size too small"},
- {"non-absolute name", "\x07example\x03com", "", "dns: buffer size too small"},
- {"compression pointer cycle",
- "\x03foo" + "\x03bar" + "\x07example" + "\xC0\x04",
- "",
- "dns: too many compression pointers"},
- {"reserved compression pointer 0b10", "\x07example\x80", "", "dns: bad rdata"},
- {"reserved compression pointer 0b01", "\x07example\x40", "", "dns: bad rdata"},
- }
- for _, test := range cases {
- output, idx, err := UnpackDomainName([]byte(test.input), 0)
- if test.expectedOutput != "" && output != test.expectedOutput {
- t.Errorf("%s: expected %s, got %s", test.label, test.expectedOutput, output)
- }
- if test.expectedError == "" && err != nil {
- t.Errorf("%s: expected no error, got %d %v", test.label, idx, err)
- } else if test.expectedError != "" && (err == nil || err.Error() != test.expectedError) {
- t.Errorf("%s: expected error %s, got %d %v", test.label, test.expectedError, idx, err)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/nsecx_test.go b/vendor/github.com/miekg/dns/nsecx_test.go
deleted file mode 100644
index f8edd6db1..000000000
--- a/vendor/github.com/miekg/dns/nsecx_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-package dns
-
-import "testing"
-
-func TestPackNsec3(t *testing.T) {
- nsec3 := HashName("dnsex.nl.", SHA1, 0, "DEAD")
- if nsec3 != "ROCCJAE8BJJU7HN6T7NG3TNM8ACRS87J" {
- t.Error(nsec3)
- }
-
- nsec3 = HashName("a.b.c.example.org.", SHA1, 2, "DEAD")
- if nsec3 != "6LQ07OAHBTOOEU2R9ANI2AT70K5O0RCG" {
- t.Error(nsec3)
- }
-}
-
-func TestNsec3(t *testing.T) {
- nsec3 := testRR("sk4e8fj94u78smusb40o1n0oltbblu2r.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 SK4F38CQ0ATIEI8MH3RGD0P5I4II6QAN NS SOA TXT RRSIG DNSKEY NSEC3PARAM")
- if !nsec3.(*NSEC3).Match("nl.") { // name hash = sk4e8fj94u78smusb40o1n0oltbblu2r
- t.Fatal("sk4e8fj94u78smusb40o1n0oltbblu2r.nl. should match sk4e8fj94u78smusb40o1n0oltbblu2r.nl.")
- }
- if !nsec3.(*NSEC3).Match("NL.") { // name hash = sk4e8fj94u78smusb40o1n0oltbblu2r
- t.Fatal("sk4e8fj94u78smusb40o1n0oltbblu2r.NL. should match sk4e8fj94u78smusb40o1n0oltbblu2r.nl.")
- }
- if nsec3.(*NSEC3).Match("com.") { //
- t.Fatal("com. is not in the zone nl.")
- }
- if nsec3.(*NSEC3).Match("test.nl.") { // name hash = gd0ptr5bnfpimpu2d3v6gd4n0bai7s0q
- t.Fatal("gd0ptr5bnfpimpu2d3v6gd4n0bai7s0q.nl. should not match sk4e8fj94u78smusb40o1n0oltbblu2r.nl.")
- }
- nsec3 = testRR("nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 SK4F38CQ0ATIEI8MH3RGD0P5I4II6QAN NS SOA TXT RRSIG DNSKEY NSEC3PARAM")
- if nsec3.(*NSEC3).Match("nl.") {
- t.Fatal("sk4e8fj94u78smusb40o1n0oltbblu2r.nl. should not match a record without a owner hash")
- }
-
- for _, tc := range []struct {
- rr *NSEC3
- name string
- covers bool
- }{
- // positive tests
- { // name hash between owner hash and next hash
- rr: &NSEC3{
- Hdr: RR_Header{Name: "2N1TB3VAIRUOBL6RKDVII42N9TFMIALP.com."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "PT3RON8N7PM3A0OE989IB84OOSADP7O8",
- },
- name: "bsd.com.",
- covers: true,
- },
- { // end of zone, name hash is after owner hash
- rr: &NSEC3{
- Hdr: RR_Header{Name: "3v62ulr0nre83v0rja2vjgtlif9v6rab.com."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "2N1TB3VAIRUOBL6RKDVII42N9TFMIALP",
- },
- name: "csd.com.",
- covers: true,
- },
- { // end of zone, name hash is before beginning of zone
- rr: &NSEC3{
- Hdr: RR_Header{Name: "PT3RON8N7PM3A0OE989IB84OOSADP7O8.com."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "3V62ULR0NRE83V0RJA2VJGTLIF9V6RAB",
- },
- name: "asd.com.",
- covers: true,
- },
- // negative tests
- { // too short owner name
- rr: &NSEC3{
- Hdr: RR_Header{Name: "nl."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "39P99DCGG0MDLARTCRMCF6OFLLUL7PR6",
- },
- name: "asd.com.",
- covers: false,
- },
- { // outside of zone
- rr: &NSEC3{
- Hdr: RR_Header{Name: "39p91242oslggest5e6a7cci4iaeqvnk.nl."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "39P99DCGG0MDLARTCRMCF6OFLLUL7PR6",
- },
- name: "asd.com.",
- covers: false,
- },
- { // empty interval
- rr: &NSEC3{
- Hdr: RR_Header{Name: "2n1tb3vairuobl6rkdvii42n9tfmialp.com."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "2N1TB3VAIRUOBL6RKDVII42N9TFMIALP",
- },
- name: "asd.com.",
- covers: false,
- },
- { // name hash is before owner hash, not covered
- rr: &NSEC3{
- Hdr: RR_Header{Name: "3V62ULR0NRE83V0RJA2VJGTLIF9V6RAB.com."},
- Hash: 1,
- Flags: 1,
- Iterations: 5,
- Salt: "F10E9F7EA83FC8F3",
- NextDomain: "PT3RON8N7PM3A0OE989IB84OOSADP7O8",
- },
- name: "asd.com.",
- covers: false,
- },
- } {
- covers := tc.rr.Cover(tc.name)
- if tc.covers != covers {
- t.Fatalf("cover failed for %s: expected %t, got %t [record: %s]", tc.name, tc.covers, covers, tc.rr)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/parse_test.go b/vendor/github.com/miekg/dns/parse_test.go
deleted file mode 100644
index efdaf59af..000000000
--- a/vendor/github.com/miekg/dns/parse_test.go
+++ /dev/null
@@ -1,1465 +0,0 @@
-package dns
-
-import (
- "bytes"
- "crypto/rsa"
- "encoding/hex"
- "fmt"
- "math/rand"
- "net"
- "reflect"
- "regexp"
- "strconv"
- "strings"
- "testing"
- "testing/quick"
-)
-
-func TestDotInName(t *testing.T) {
- buf := make([]byte, 20)
- PackDomainName("aa\\.bb.nl.", buf, 0, nil, false)
- // index 3 must be a real dot
- if buf[3] != '.' {
- t.Error("dot should be a real dot")
- }
-
- if buf[6] != 2 {
- t.Error("this must have the value 2")
- }
- dom, _, _ := UnpackDomainName(buf, 0)
- // printing it should yield the backspace again
- if dom != "aa\\.bb.nl." {
- t.Error("dot should have been escaped: ", dom)
- }
-}
-
-func TestDotLastInLabel(t *testing.T) {
- sample := "aa\\..au."
- buf := make([]byte, 20)
- _, err := PackDomainName(sample, buf, 0, nil, false)
- if err != nil {
- t.Fatalf("unexpected error packing domain: %v", err)
- }
- dom, _, _ := UnpackDomainName(buf, 0)
- if dom != sample {
- t.Fatalf("unpacked domain `%s' doesn't match packed domain", dom)
- }
-}
-
-func TestTooLongDomainName(t *testing.T) {
- l := "aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrsssttt."
- dom := l + l + l + l + l + l + l
- _, err := NewRR(dom + " IN A 127.0.0.1")
- if err == nil {
- t.Error("should be too long")
- }
- _, err = NewRR("..com. IN A 127.0.0.1")
- if err == nil {
- t.Error("should fail")
- }
-}
-
-func TestDomainName(t *testing.T) {
- tests := []string{"r\\.gieben.miek.nl.", "www\\.www.miek.nl.",
- "www.*.miek.nl.", "www.*.miek.nl.",
- }
- dbuff := make([]byte, 40)
-
- for _, ts := range tests {
- if _, err := PackDomainName(ts, dbuff, 0, nil, false); err != nil {
- t.Error("not a valid domain name")
- continue
- }
- n, _, err := UnpackDomainName(dbuff, 0)
- if err != nil {
- t.Error("failed to unpack packed domain name")
- continue
- }
- if ts != n {
- t.Errorf("must be equal: in: %s, out: %s", ts, n)
- }
- }
-}
-
-func TestDomainNameAndTXTEscapes(t *testing.T) {
- tests := []byte{'.', '(', ')', ';', ' ', '@', '"', '\\', 9, 13, 10, 0, 255}
- for _, b := range tests {
- rrbytes := []byte{
- 1, b, 0, // owner
- byte(TypeTXT >> 8), byte(TypeTXT),
- byte(ClassINET >> 8), byte(ClassINET),
- 0, 0, 0, 1, // TTL
- 0, 2, 1, b, // Data
- }
- rr1, _, err := UnpackRR(rrbytes, 0)
- if err != nil {
- panic(err)
- }
- s := rr1.String()
- rr2, err := NewRR(s)
- if err != nil {
- t.Errorf("error parsing unpacked RR's string: %v", err)
- }
- repacked := make([]byte, len(rrbytes))
- if _, err := PackRR(rr2, repacked, 0, nil, false); err != nil {
- t.Errorf("error packing parsed RR: %v", err)
- }
- if !bytes.Equal(repacked, rrbytes) {
- t.Error("packed bytes don't match original bytes")
- }
- }
-}
-
-func TestTXTEscapeParsing(t *testing.T) {
- test := [][]string{
- {`";"`, `";"`},
- {`\;`, `";"`},
- {`"\t"`, `"t"`},
- {`"\r"`, `"r"`},
- {`"\ "`, `" "`},
- {`"\;"`, `";"`},
- {`"\;\""`, `";\""`},
- {`"\(a\)"`, `"(a)"`},
- {`"\(a)"`, `"(a)"`},
- {`"(a\)"`, `"(a)"`},
- {`"(a)"`, `"(a)"`},
- {`"\048"`, `"0"`},
- {`"\` + "\t" + `"`, `"\009"`},
- {`"\` + "\n" + `"`, `"\010"`},
- {`"\` + "\r" + `"`, `"\013"`},
- {`"\` + "\x11" + `"`, `"\017"`},
- {`"\'"`, `"'"`},
- }
- for _, s := range test {
- rr, err := NewRR(fmt.Sprintf("example.com. IN TXT %v", s[0]))
- if err != nil {
- t.Errorf("could not parse %v TXT: %s", s[0], err)
- continue
- }
-
- txt := sprintTxt(rr.(*TXT).Txt)
- if txt != s[1] {
- t.Errorf("mismatch after parsing `%v` TXT record: `%v` != `%v`", s[0], txt, s[1])
- }
- }
-}
-
-func GenerateDomain(r *rand.Rand, size int) []byte {
- dnLen := size % 70 // artificially limit size so there's less to interpret if a failure occurs
- var dn []byte
- done := false
- for i := 0; i < dnLen && !done; {
- max := dnLen - i
- if max > 63 {
- max = 63
- }
- lLen := max
- if lLen != 0 {
- lLen = int(r.Int31()) % max
- }
- done = lLen == 0
- if done {
- continue
- }
- l := make([]byte, lLen+1)
- l[0] = byte(lLen)
- for j := 0; j < lLen; j++ {
- l[j+1] = byte(rand.Int31())
- }
- dn = append(dn, l...)
- i += 1 + lLen
- }
- return append(dn, 0)
-}
-
-func TestDomainQuick(t *testing.T) {
- r := rand.New(rand.NewSource(0))
- f := func(l int) bool {
- db := GenerateDomain(r, l)
- ds, _, err := UnpackDomainName(db, 0)
- if err != nil {
- panic(err)
- }
- buf := make([]byte, 255)
- off, err := PackDomainName(ds, buf, 0, nil, false)
- if err != nil {
- t.Errorf("error packing domain: %v", err)
- t.Errorf(" bytes: %v", db)
- t.Errorf("string: %v", ds)
- return false
- }
- if !bytes.Equal(db, buf[:off]) {
- t.Errorf("repacked domain doesn't match original:")
- t.Errorf("src bytes: %v", db)
- t.Errorf(" string: %v", ds)
- t.Errorf("out bytes: %v", buf[:off])
- return false
- }
- return true
- }
- if err := quick.Check(f, nil); err != nil {
- t.Error(err)
- }
-}
-
-func GenerateTXT(r *rand.Rand, size int) []byte {
- rdLen := size % 300 // artificially limit size so there's less to interpret if a failure occurs
- var rd []byte
- for i := 0; i < rdLen; {
- max := rdLen - 1
- if max > 255 {
- max = 255
- }
- sLen := max
- if max != 0 {
- sLen = int(r.Int31()) % max
- }
- s := make([]byte, sLen+1)
- s[0] = byte(sLen)
- for j := 0; j < sLen; j++ {
- s[j+1] = byte(rand.Int31())
- }
- rd = append(rd, s...)
- i += 1 + sLen
- }
- return rd
-}
-
-// Ok, 2 things. 1) this test breaks with the new functionality of splitting up larger txt
-// chunks into 255 byte pieces. 2) I don't like the random nature of this thing, because I can't
-// place the quotes where they need to be.
-// So either add some code the places the quotes in just the right spots, make this non random
-// or do something else.
-// Disabled for now. (miek)
-func testTXTRRQuick(t *testing.T) {
- s := rand.NewSource(0)
- r := rand.New(s)
- typeAndClass := []byte{
- byte(TypeTXT >> 8), byte(TypeTXT),
- byte(ClassINET >> 8), byte(ClassINET),
- 0, 0, 0, 1, // TTL
- }
- f := func(l int) bool {
- owner := GenerateDomain(r, l)
- rdata := GenerateTXT(r, l)
- rrbytes := make([]byte, 0, len(owner)+2+2+4+2+len(rdata))
- rrbytes = append(rrbytes, owner...)
- rrbytes = append(rrbytes, typeAndClass...)
- rrbytes = append(rrbytes, byte(len(rdata)>>8))
- rrbytes = append(rrbytes, byte(len(rdata)))
- rrbytes = append(rrbytes, rdata...)
- rr, _, err := UnpackRR(rrbytes, 0)
- if err != nil {
- panic(err)
- }
- buf := make([]byte, len(rrbytes)*3)
- off, err := PackRR(rr, buf, 0, nil, false)
- if err != nil {
- t.Errorf("pack Error: %v\nRR: %v", err, rr)
- return false
- }
- buf = buf[:off]
- if !bytes.Equal(buf, rrbytes) {
- t.Errorf("packed bytes don't match original bytes")
- t.Errorf("src bytes: %v", rrbytes)
- t.Errorf(" struct: %v", rr)
- t.Errorf("out bytes: %v", buf)
- return false
- }
- if len(rdata) == 0 {
- // string'ing won't produce any data to parse
- return true
- }
- rrString := rr.String()
- rr2, err := NewRR(rrString)
- if err != nil {
- t.Errorf("error parsing own output: %v", err)
- t.Errorf("struct: %v", rr)
- t.Errorf("string: %v", rrString)
- return false
- }
- if rr2.String() != rrString {
- t.Errorf("parsed rr.String() doesn't match original string")
- t.Errorf("original: %v", rrString)
- t.Errorf(" parsed: %v", rr2.String())
- return false
- }
-
- buf = make([]byte, len(rrbytes)*3)
- off, err = PackRR(rr2, buf, 0, nil, false)
- if err != nil {
- t.Errorf("error packing parsed rr: %v", err)
- t.Errorf("unpacked Struct: %v", rr)
- t.Errorf(" string: %v", rrString)
- t.Errorf(" parsed Struct: %v", rr2)
- return false
- }
- buf = buf[:off]
- if !bytes.Equal(buf, rrbytes) {
- t.Errorf("parsed packed bytes don't match original bytes")
- t.Errorf(" source bytes: %v", rrbytes)
- t.Errorf("unpacked struct: %v", rr)
- t.Errorf(" string: %v", rrString)
- t.Errorf(" parsed struct: %v", rr2)
- t.Errorf(" repacked bytes: %v", buf)
- return false
- }
- return true
- }
- c := &quick.Config{MaxCountScale: 10}
- if err := quick.Check(f, c); err != nil {
- t.Error(err)
- }
-}
-
-func TestParseDirectiveMisc(t *testing.T) {
- tests := map[string]string{
- "$ORIGIN miek.nl.\na IN NS b": "a.miek.nl.\t3600\tIN\tNS\tb.miek.nl.",
- "$TTL 2H\nmiek.nl. IN NS b.": "miek.nl.\t7200\tIN\tNS\tb.",
- "miek.nl. 1D IN NS b.": "miek.nl.\t86400\tIN\tNS\tb.",
- `name. IN SOA a6.nstld.com. hostmaster.nic.name. (
- 203362132 ; serial
- 5m ; refresh (5 minutes)
- 5m ; retry (5 minutes)
- 2w ; expire (2 weeks)
- 300 ; minimum (5 minutes)
-)`: "name.\t3600\tIN\tSOA\ta6.nstld.com. hostmaster.nic.name. 203362132 300 300 1209600 300",
- ". 3600000 IN NS ONE.MY-ROOTS.NET.": ".\t3600000\tIN\tNS\tONE.MY-ROOTS.NET.",
- "ONE.MY-ROOTS.NET. 3600000 IN A 192.168.1.1": "ONE.MY-ROOTS.NET.\t3600000\tIN\tA\t192.168.1.1",
- }
- for i, o := range tests {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestNSEC(t *testing.T) {
- nsectests := map[string]string{
- "nl. IN NSEC3PARAM 1 0 5 30923C44C6CBBB8F": "nl.\t3600\tIN\tNSEC3PARAM\t1 0 5 30923C44C6CBBB8F",
- "p2209hipbpnm681knjnu0m1febshlv4e.nl. IN NSEC3 1 1 5 30923C44C6CBBB8F P90DG1KE8QEAN0B01613LHQDG0SOJ0TA NS SOA TXT RRSIG DNSKEY NSEC3PARAM": "p2209hipbpnm681knjnu0m1febshlv4e.nl.\t3600\tIN\tNSEC3\t1 1 5 30923C44C6CBBB8F P90DG1KE8QEAN0B01613LHQDG0SOJ0TA NS SOA TXT RRSIG DNSKEY NSEC3PARAM",
- "localhost.dnssex.nl. IN NSEC www.dnssex.nl. A RRSIG NSEC": "localhost.dnssex.nl.\t3600\tIN\tNSEC\twww.dnssex.nl. A RRSIG NSEC",
- "localhost.dnssex.nl. IN NSEC www.dnssex.nl. A RRSIG NSEC TYPE65534": "localhost.dnssex.nl.\t3600\tIN\tNSEC\twww.dnssex.nl. A RRSIG NSEC TYPE65534",
- "localhost.dnssex.nl. IN NSEC www.dnssex.nl. A RRSIG NSec Type65534": "localhost.dnssex.nl.\t3600\tIN\tNSEC\twww.dnssex.nl. A RRSIG NSEC TYPE65534",
- "44ohaq2njb0idnvolt9ggthvsk1e1uv8.skydns.test. NSEC3 1 0 0 - 44OHAQ2NJB0IDNVOLT9GGTHVSK1E1UVA": "44ohaq2njb0idnvolt9ggthvsk1e1uv8.skydns.test.\t3600\tIN\tNSEC3\t1 0 0 - 44OHAQ2NJB0IDNVOLT9GGTHVSK1E1UVA",
- }
- for i, o := range nsectests {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseLOC(t *testing.T) {
- lt := map[string]string{
- "SW1A2AA.find.me.uk. LOC 51 30 12.748 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m": "SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 30 12.748 N 00 07 39.611 W 0m 0.00m 0.00m 0.00m",
- "SW1A2AA.find.me.uk. LOC 51 0 0.0 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m": "SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 00 0.000 N 00 07 39.611 W 0m 0.00m 0.00m 0.00m",
- }
- for i, o := range lt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseDS(t *testing.T) {
- dt := map[string]string{
- "example.net. 3600 IN DS 40692 12 3 22261A8B0E0D799183E35E24E2AD6BB58533CBA7E3B14D659E9CA09B 2071398F": "example.net.\t3600\tIN\tDS\t40692 12 3 22261A8B0E0D799183E35E24E2AD6BB58533CBA7E3B14D659E9CA09B2071398F",
- }
- for i, o := range dt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestQuotes(t *testing.T) {
- tests := map[string]string{
- `t.example.com. IN TXT "a bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a bc\"",
- `t.example.com. IN TXT "a
- bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a\\010 bc\"",
- `t.example.com. IN TXT ""`: "t.example.com.\t3600\tIN\tTXT\t\"\"",
- `t.example.com. IN TXT "a"`: "t.example.com.\t3600\tIN\tTXT\t\"a\"",
- `t.example.com. IN TXT "aa"`: "t.example.com.\t3600\tIN\tTXT\t\"aa\"",
- `t.example.com. IN TXT "aaa" ;`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\"",
- `t.example.com. IN TXT "abc" "DEF"`: "t.example.com.\t3600\tIN\tTXT\t\"abc\" \"DEF\"",
- `t.example.com. IN TXT "abc" ( "DEF" )`: "t.example.com.\t3600\tIN\tTXT\t\"abc\" \"DEF\"",
- `t.example.com. IN TXT aaa ;`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\"",
- `t.example.com. IN TXT aaa aaa;`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\" \"aaa\"",
- `t.example.com. IN TXT aaa aaa`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\" \"aaa\"",
- `t.example.com. IN TXT aaa`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\"",
- "cid.urn.arpa. NAPTR 100 50 \"s\" \"z3950+I2L+I2C\" \"\" _z3950._tcp.gatech.edu.": "cid.urn.arpa.\t3600\tIN\tNAPTR\t100 50 \"s\" \"z3950+I2L+I2C\" \"\" _z3950._tcp.gatech.edu.",
- "cid.urn.arpa. NAPTR 100 50 \"s\" \"rcds+I2C\" \"\" _rcds._udp.gatech.edu.": "cid.urn.arpa.\t3600\tIN\tNAPTR\t100 50 \"s\" \"rcds+I2C\" \"\" _rcds._udp.gatech.edu.",
- "cid.urn.arpa. NAPTR 100 50 \"s\" \"http+I2L+I2C+I2R\" \"\" _http._tcp.gatech.edu.": "cid.urn.arpa.\t3600\tIN\tNAPTR\t100 50 \"s\" \"http+I2L+I2C+I2R\" \"\" _http._tcp.gatech.edu.",
- "cid.urn.arpa. NAPTR 100 10 \"\" \"\" \"/urn:cid:.+@([^\\.]+\\.)(.*)$/\\2/i\" .": "cid.urn.arpa.\t3600\tIN\tNAPTR\t100 10 \"\" \"\" \"/urn:cid:.+@([^\\.]+\\.)(.*)$/\\2/i\" .",
- }
- for i, o := range tests {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is\n`%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseClass(t *testing.T) {
- tests := map[string]string{
- "t.example.com. IN A 127.0.0.1": "t.example.com. 3600 IN A 127.0.0.1",
- "t.example.com. CS A 127.0.0.1": "t.example.com. 3600 CS A 127.0.0.1",
- "t.example.com. CH A 127.0.0.1": "t.example.com. 3600 CH A 127.0.0.1",
- // ClassANY can not occur in zone files
- // "t.example.com. ANY A 127.0.0.1": "t.example.com. 3600 ANY A 127.0.0.1",
- "t.example.com. NONE A 127.0.0.1": "t.example.com. 3600 NONE A 127.0.0.1",
- "t.example.com. CLASS255 A 127.0.0.1": "t.example.com. 3600 CLASS255 A 127.0.0.1",
- }
- for i, o := range tests {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is\n`%s'", i, o, rr.String())
- }
- }
-}
-
-func TestBrace(t *testing.T) {
- tests := map[string]string{
- "(miek.nl.) 3600 IN A 127.0.1.1": "miek.nl.\t3600\tIN\tA\t127.0.1.1",
- "miek.nl. (3600) IN MX (10) elektron.atoom.net.": "miek.nl.\t3600\tIN\tMX\t10 elektron.atoom.net.",
- `miek.nl. IN (
- 3600 A 127.0.0.1)`: "miek.nl.\t3600\tIN\tA\t127.0.0.1",
- "(miek.nl.) (A) (127.0.2.1)": "miek.nl.\t3600\tIN\tA\t127.0.2.1",
- "miek.nl A 127.0.3.1": "miek.nl.\t3600\tIN\tA\t127.0.3.1",
- "_ssh._tcp.local. 60 IN (PTR) stora._ssh._tcp.local.": "_ssh._tcp.local.\t60\tIN\tPTR\tstora._ssh._tcp.local.",
- "miek.nl. NS ns.miek.nl": "miek.nl.\t3600\tIN\tNS\tns.miek.nl.",
- `(miek.nl.) (
- (IN)
- (AAAA)
- (::1) )`: "miek.nl.\t3600\tIN\tAAAA\t::1",
- `(miek.nl.) (
- (IN)
- (AAAA)
- (::1))`: "miek.nl.\t3600\tIN\tAAAA\t::1",
- "miek.nl. IN AAAA ::2": "miek.nl.\t3600\tIN\tAAAA\t::2",
- `((m)(i)ek.(n)l.) (SOA) (soa.) (soa.) (
- 2009032802 ; serial
- 21600 ; refresh (6 hours)
- 7(2)00 ; retry (2 hours)
- 604()800 ; expire (1 week)
- 3600 ; minimum (1 hour)
- )`: "miek.nl.\t3600\tIN\tSOA\tsoa. soa. 2009032802 21600 7200 604800 3600",
- "miek\\.nl. IN A 127.0.0.10": "miek\\.nl.\t3600\tIN\tA\t127.0.0.10",
- "miek.nl. IN A 127.0.0.11": "miek.nl.\t3600\tIN\tA\t127.0.0.11",
- "miek.nl. A 127.0.0.12": "miek.nl.\t3600\tIN\tA\t127.0.0.12",
- `miek.nl. 86400 IN SOA elektron.atoom.net. miekg.atoom.net. (
- 2009032802 ; serial
- 21600 ; refresh (6 hours)
- 7200 ; retry (2 hours)
- 604800 ; expire (1 week)
- 3600 ; minimum (1 hour)
- )`: "miek.nl.\t86400\tIN\tSOA\telektron.atoom.net. miekg.atoom.net. 2009032802 21600 7200 604800 3600",
- }
- for i, o := range tests {
- rr, err := NewRR(i)
- if err != nil {
- t.Errorf("failed to parse RR: %v\n\t%s", err, i)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseFailure(t *testing.T) {
- tests := []string{"miek.nl. IN A 327.0.0.1",
- "miek.nl. IN AAAA ::x",
- "miek.nl. IN MX a0 miek.nl.",
- "miek.nl aap IN MX mx.miek.nl.",
- "miek.nl 200 IN mxx 10 mx.miek.nl.",
- "miek.nl. inn MX 10 mx.miek.nl.",
- // "miek.nl. IN CNAME ", // actually valid nowadays, zero size rdata
- "miek.nl. IN CNAME ..",
- "miek.nl. PA MX 10 miek.nl.",
- "miek.nl. ) IN MX 10 miek.nl.",
- }
-
- for _, s := range tests {
- _, err := NewRR(s)
- if err == nil {
- t.Errorf("should have triggered an error: \"%s\"", s)
- }
- }
-}
-
-func TestOmittedTTL(t *testing.T) {
- zone := `
-$ORIGIN example.com.
-example.com. 42 IN SOA ns1.example.com. hostmaster.example.com. 1 86400 60 86400 3600 ; TTL=42 SOA
-example.com. NS 2 ; TTL=42 absolute owner name
-@ MD 3 ; TTL=42 current-origin owner name
- MF 4 ; TTL=42 leading-space implied owner name
- 43 TYPE65280 \# 1 05 ; TTL=43 implied owner name explicit TTL
- MB 6 ; TTL=43 leading-tab implied owner name
-$TTL 1337
-example.com. 88 MG 7 ; TTL=88 explicit TTL
-example.com. MR 8 ; TTL=1337 after first $TTL
-$TTL 314
- 1 TXT 9 ; TTL=1 implied owner name explicit TTL
-example.com. DNAME 10 ; TTL=314 after second $TTL
-`
- reCaseFromComment := regexp.MustCompile(`TTL=(\d+)\s+(.*)`)
- records := ParseZone(strings.NewReader(zone), "", "")
- var i int
- for record := range records {
- i++
- if record.Error != nil {
- t.Error(record.Error)
- continue
- }
- expected := reCaseFromComment.FindStringSubmatch(record.Comment)
- expectedTTL, _ := strconv.ParseUint(expected[1], 10, 32)
- ttl := record.RR.Header().Ttl
- if ttl != uint32(expectedTTL) {
- t.Errorf("%s: expected TTL %d, got %d", expected[2], expectedTTL, ttl)
- }
- }
- if i != 10 {
- t.Errorf("expected %d records, got %d", 5, i)
- }
-}
-
-func TestRelativeNameErrors(t *testing.T) {
- var badZones = []struct {
- label string
- zoneContents string
- expectedErr string
- }{
- {
- "relative owner name without origin",
- "example.com 3600 IN SOA ns.example.com. hostmaster.example.com. 1 86400 60 86400 3600",
- "bad owner name",
- },
- {
- "relative owner name in RDATA",
- "example.com. 3600 IN SOA ns hostmaster 1 86400 60 86400 3600",
- "bad SOA Ns",
- },
- {
- "origin reference without origin",
- "@ 3600 IN SOA ns.example.com. hostmaster.example.com. 1 86400 60 86400 3600",
- "bad owner name",
- },
- {
- "relative owner name in $INCLUDE",
- "$INCLUDE file.db example.com",
- "bad origin name",
- },
- {
- "relative owner name in $ORIGIN",
- "$ORIGIN example.com",
- "bad origin name",
- },
- }
- for _, errorCase := range badZones {
- entries := ParseZone(strings.NewReader(errorCase.zoneContents), "", "")
- for entry := range entries {
- if entry.Error == nil {
- t.Errorf("%s: expected error, got nil", errorCase.label)
- continue
- }
- err := entry.Error.err
- if err != errorCase.expectedErr {
- t.Errorf("%s: expected error `%s`, got `%s`", errorCase.label, errorCase.expectedErr, err)
- }
- }
- }
-}
-
-func TestHIP(t *testing.T) {
- h := `www.example.com. IN HIP ( 2 200100107B1A74DF365639CC39F1D578
- AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p
-9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQ
-b1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
- rvs1.example.com.
- rvs2.example.com. )`
- rr, err := NewRR(h)
- if err != nil {
- t.Fatalf("failed to parse RR: %v", err)
- }
- msg := new(Msg)
- msg.Answer = []RR{rr, rr}
- bytes, err := msg.Pack()
- if err != nil {
- t.Fatalf("failed to pack msg: %v", err)
- }
- if err := msg.Unpack(bytes); err != nil {
- t.Fatalf("failed to unpack msg: %v", err)
- }
- if len(msg.Answer) != 2 {
- t.Fatalf("2 answers expected: %v", msg)
- }
- for i, rr := range msg.Answer {
- rr := rr.(*HIP)
- if l := len(rr.RendezvousServers); l != 2 {
- t.Fatalf("2 servers expected, only %d in record %d:\n%v", l, i, msg)
- }
- for j, s := range []string{"rvs1.example.com.", "rvs2.example.com."} {
- if rr.RendezvousServers[j] != s {
- t.Fatalf("expected server %d of record %d to be %s:\n%v", j, i, s, msg)
- }
- }
- }
-}
-
-// Test with no known RR on the line
-func TestLineNumberError2(t *testing.T) {
- tests := map[string]string{
- "example.com. 1000 SO master.example.com. admin.example.com. 1 4294967294 4294967293 4294967295 100": "dns: expecting RR type or class, not this...: \"SO\" at line: 1:21",
- "example.com 1000 IN TALINK a.example.com. b..example.com.": "dns: bad TALINK NextName: \"b..example.com.\" at line: 1:57",
- "example.com 1000 IN TALINK ( a.example.com. b..example.com. )": "dns: bad TALINK NextName: \"b..example.com.\" at line: 1:60",
- `example.com 1000 IN TALINK ( a.example.com.
- bb..example.com. )`: "dns: bad TALINK NextName: \"bb..example.com.\" at line: 2:18",
- // This is a bug, it should report an error on line 1, but the new is already processed.
- `example.com 1000 IN TALINK ( a.example.com. b...example.com.
- )`: "dns: bad TALINK NextName: \"b...example.com.\" at line: 2:1"}
-
- for in, errStr := range tests {
- _, err := NewRR(in)
- if err == nil {
- t.Error("err is nil")
- } else {
- if err.Error() != errStr {
- t.Errorf("%s: error should be %s is %v", in, errStr, err)
- }
- }
- }
-}
-
-// Test if the calculations are correct
-func TestRfc1982(t *testing.T) {
- // If the current time and the timestamp are more than 68 years apart
- // it means the date has wrapped. 0 is 1970
-
- // fall in the current 68 year span
- strtests := []string{"20120525134203", "19700101000000", "20380119031408"}
- for _, v := range strtests {
- if x, _ := StringToTime(v); v != TimeToString(x) {
- t.Errorf("1982 arithmetic string failure %s (%s:%d)", v, TimeToString(x), x)
- }
- }
-
- inttests := map[uint32]string{0: "19700101000000",
- 1 << 31: "20380119031408",
- 1<<32 - 1: "21060207062815",
- }
- for i, v := range inttests {
- if TimeToString(i) != v {
- t.Errorf("1982 arithmetic int failure %d:%s (%s)", i, v, TimeToString(i))
- }
- }
-
- // Future tests, these dates get parsed to a date within the current 136 year span
- future := map[string]string{"22680119031408": "20631123173144",
- "19010101121212": "20370206184028",
- "19210101121212": "20570206184028",
- "19500101121212": "20860206184028",
- "19700101000000": "19700101000000",
- "19690101000000": "21050207062816",
- "29210101121212": "21040522212236",
- }
- for from, to := range future {
- x, _ := StringToTime(from)
- y := TimeToString(x)
- if y != to {
- t.Errorf("1982 arithmetic future failure %s:%s (%s)", from, to, y)
- }
- }
-}
-
-func TestEmpty(t *testing.T) {
- for range ParseZone(strings.NewReader(""), "", "") {
- t.Errorf("should be empty")
- }
-}
-
-func TestLowercaseTokens(t *testing.T) {
- var testrecords = []string{
- "example.org. 300 IN a 1.2.3.4",
- "example.org. 300 in A 1.2.3.4",
- "example.org. 300 in a 1.2.3.4",
- "example.org. 300 a 1.2.3.4",
- "example.org. 300 A 1.2.3.4",
- "example.org. IN a 1.2.3.4",
- "example.org. in A 1.2.3.4",
- "example.org. in a 1.2.3.4",
- "example.org. a 1.2.3.4",
- "example.org. A 1.2.3.4",
- "example.org. a 1.2.3.4",
- "$ORIGIN example.org.\n a 1.2.3.4",
- "$Origin example.org.\n a 1.2.3.4",
- "$origin example.org.\n a 1.2.3.4",
- "example.org. Class1 Type1 1.2.3.4",
- }
- for _, testrr := range testrecords {
- _, err := NewRR(testrr)
- if err != nil {
- t.Errorf("failed to parse %#v, got %v", testrr, err)
- }
- }
-}
-
-func TestSRVPacking(t *testing.T) {
- msg := Msg{}
-
- things := []string{"1.2.3.4:8484",
- "45.45.45.45:8484",
- "84.84.84.84:8484",
- }
-
- for i, n := range things {
- h, p, err := net.SplitHostPort(n)
- if err != nil {
- continue
- }
- port, _ := strconv.ParseUint(p, 10, 16)
-
- rr := &SRV{
- Hdr: RR_Header{Name: "somename.",
- Rrtype: TypeSRV,
- Class: ClassINET,
- Ttl: 5},
- Priority: uint16(i),
- Weight: 5,
- Port: uint16(port),
- Target: h + ".",
- }
-
- msg.Answer = append(msg.Answer, rr)
- }
-
- _, err := msg.Pack()
- if err != nil {
- t.Fatalf("couldn't pack %v: %v", msg, err)
- }
-}
-
-func TestParseBackslash(t *testing.T) {
- if _, err := NewRR("nul\\000gap.test.globnix.net. 600 IN A 192.0.2.10"); err != nil {
- t.Errorf("could not create RR with \\000 in it")
- }
- if _, err := NewRR(`nul\000gap.test.globnix.net. 600 IN TXT "Hello\123"`); err != nil {
- t.Errorf("could not create RR with \\000 in it")
- }
- if _, err := NewRR(`m\ @\ iek.nl. IN 3600 A 127.0.0.1`); err != nil {
- t.Errorf("could not create RR with \\ and \\@ in it")
- }
-}
-
-func TestILNP(t *testing.T) {
- tests := []string{
- "host1.example.com.\t3600\tIN\tNID\t10 0014:4fff:ff20:ee64",
- "host1.example.com.\t3600\tIN\tNID\t20 0015:5fff:ff21:ee65",
- "host2.example.com.\t3600\tIN\tNID\t10 0016:6fff:ff22:ee66",
- "host1.example.com.\t3600\tIN\tL32\t10 10.1.2.0",
- "host1.example.com.\t3600\tIN\tL32\t20 10.1.4.0",
- "host2.example.com.\t3600\tIN\tL32\t10 10.1.8.0",
- "host1.example.com.\t3600\tIN\tL64\t10 2001:0DB8:1140:1000",
- "host1.example.com.\t3600\tIN\tL64\t20 2001:0DB8:2140:2000",
- "host2.example.com.\t3600\tIN\tL64\t10 2001:0DB8:4140:4000",
- "host1.example.com.\t3600\tIN\tLP\t10 l64-subnet1.example.com.",
- "host1.example.com.\t3600\tIN\tLP\t10 l64-subnet2.example.com.",
- "host1.example.com.\t3600\tIN\tLP\t20 l32-subnet1.example.com.",
- }
- for _, t1 := range tests {
- r, err := NewRR(t1)
- if err != nil {
- t.Fatalf("an error occurred: %v", err)
- } else {
- if t1 != r.String() {
- t.Fatalf("strings should be equal %s %s", t1, r.String())
- }
- }
- }
-}
-
-func TestGposEidNimloc(t *testing.T) {
- dt := map[string]string{
- "444433332222111199990123000000ff. NSAP-PTR foo.bar.com.": "444433332222111199990123000000ff.\t3600\tIN\tNSAP-PTR\tfoo.bar.com.",
- "lillee. IN GPOS -32.6882 116.8652 10.0": "lillee.\t3600\tIN\tGPOS\t-32.6882 116.8652 10.0",
- "hinault. IN GPOS -22.6882 116.8652 250.0": "hinault.\t3600\tIN\tGPOS\t-22.6882 116.8652 250.0",
- "VENERA. IN NIMLOC 75234159EAC457800920": "VENERA.\t3600\tIN\tNIMLOC\t75234159EAC457800920",
- "VAXA. IN EID 3141592653589793": "VAXA.\t3600\tIN\tEID\t3141592653589793",
- }
- for i, o := range dt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestPX(t *testing.T) {
- dt := map[string]string{
- "*.net2.it. IN PX 10 net2.it. PRMD-net2.ADMD-p400.C-it.": "*.net2.it.\t3600\tIN\tPX\t10 net2.it. PRMD-net2.ADMD-p400.C-it.",
- "ab.net2.it. IN PX 10 ab.net2.it. O-ab.PRMD-net2.ADMDb.C-it.": "ab.net2.it.\t3600\tIN\tPX\t10 ab.net2.it. O-ab.PRMD-net2.ADMDb.C-it.",
- }
- for i, o := range dt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestComment(t *testing.T) {
- // Comments we must see
- comments := map[string]bool{"; this is comment 1": true,
- "; this is comment 4": true, "; this is comment 6": true,
- "; this is comment 7": true, "; this is comment 8": true}
- zone := `
-foo. IN A 10.0.0.1 ; this is comment 1
-foo. IN A (
- 10.0.0.2 ; this is comment2
-)
-; this is comment3
-foo. IN A 10.0.0.3
-foo. IN A ( 10.0.0.4 ); this is comment 4
-
-foo. IN A 10.0.0.5
-; this is comment5
-
-foo. IN A 10.0.0.6
-
-foo. IN DNSKEY 256 3 5 AwEAAb+8l ; this is comment 6
-foo. IN NSEC miek.nl. TXT RRSIG NSEC; this is comment 7
-foo. IN TXT "THIS IS TEXT MAN"; this is comment 8
-`
- for x := range ParseZone(strings.NewReader(zone), ".", "") {
- if x.Error == nil {
- if x.Comment != "" {
- if _, ok := comments[x.Comment]; !ok {
- t.Errorf("wrong comment %s", x.Comment)
- }
- }
- }
- }
-}
-
-func TestEUIxx(t *testing.T) {
- tests := map[string]string{
- "host.example. IN EUI48 00-00-5e-90-01-2a": "host.example.\t3600\tIN\tEUI48\t00-00-5e-90-01-2a",
- "host.example. IN EUI64 00-00-5e-ef-00-00-00-2a": "host.example.\t3600\tIN\tEUI64\t00-00-5e-ef-00-00-00-2a",
- }
- for i, o := range tests {
- r, err := NewRR(i)
- if err != nil {
- t.Errorf("failed to parse %s: %v", i, err)
- }
- if r.String() != o {
- t.Errorf("want %s, got %s", o, r.String())
- }
- }
-}
-
-func TestUserRR(t *testing.T) {
- tests := map[string]string{
- "host.example. IN UID 1234": "host.example.\t3600\tIN\tUID\t1234",
- "host.example. IN GID 1234556": "host.example.\t3600\tIN\tGID\t1234556",
- "host.example. IN UINFO \"Miek Gieben\"": "host.example.\t3600\tIN\tUINFO\t\"Miek Gieben\"",
- }
- for i, o := range tests {
- r, err := NewRR(i)
- if err != nil {
- t.Errorf("failed to parse %s: %v", i, err)
- }
- if r.String() != o {
- t.Errorf("want %s, got %s", o, r.String())
- }
- }
-}
-
-func TestTXT(t *testing.T) {
- // Test single entry TXT record
- rr, err := NewRR(`_raop._tcp.local. 60 IN TXT "single value"`)
- if err != nil {
- t.Error("failed to parse single value TXT record", err)
- } else if rr, ok := rr.(*TXT); !ok {
- t.Error("wrong type, record should be of type TXT")
- } else {
- if len(rr.Txt) != 1 {
- t.Error("bad size of TXT value:", len(rr.Txt))
- } else if rr.Txt[0] != "single value" {
- t.Error("bad single value")
- }
- if rr.String() != `_raop._tcp.local. 60 IN TXT "single value"` {
- t.Error("bad representation of TXT record:", rr.String())
- }
- if rr.len() != 28+1+12 {
- t.Error("bad size of serialized record:", rr.len())
- }
- }
-
- // Test multi entries TXT record
- rr, err = NewRR(`_raop._tcp.local. 60 IN TXT "a=1" "b=2" "c=3" "d=4"`)
- if err != nil {
- t.Error("failed to parse multi-values TXT record", err)
- } else if rr, ok := rr.(*TXT); !ok {
- t.Error("wrong type, record should be of type TXT")
- } else {
- if len(rr.Txt) != 4 {
- t.Error("bad size of TXT multi-value:", len(rr.Txt))
- } else if rr.Txt[0] != "a=1" || rr.Txt[1] != "b=2" || rr.Txt[2] != "c=3" || rr.Txt[3] != "d=4" {
- t.Error("bad values in TXT records")
- }
- if rr.String() != `_raop._tcp.local. 60 IN TXT "a=1" "b=2" "c=3" "d=4"` {
- t.Error("bad representation of TXT multi value record:", rr.String())
- }
- if rr.len() != 28+1+3+1+3+1+3+1+3 {
- t.Error("bad size of serialized multi value record:", rr.len())
- }
- }
-
- // Test empty-string in TXT record
- rr, err = NewRR(`_raop._tcp.local. 60 IN TXT ""`)
- if err != nil {
- t.Error("failed to parse empty-string TXT record", err)
- } else if rr, ok := rr.(*TXT); !ok {
- t.Error("wrong type, record should be of type TXT")
- } else {
- if len(rr.Txt) != 1 {
- t.Error("bad size of TXT empty-string value:", len(rr.Txt))
- } else if rr.Txt[0] != "" {
- t.Error("bad value for empty-string TXT record")
- }
- if rr.String() != `_raop._tcp.local. 60 IN TXT ""` {
- t.Error("bad representation of empty-string TXT record:", rr.String())
- }
- if rr.len() != 28+1 {
- t.Error("bad size of serialized record:", rr.len())
- }
- }
-
- // Test TXT record with chunk larger than 255 bytes, they should be split up, by the parser
- s := ""
- for i := 0; i < 255; i++ {
- s += "a"
- }
- s += "b"
- rr, err = NewRR(`test.local. 60 IN TXT "` + s + `"`)
- if err != nil {
- t.Error("failed to parse empty-string TXT record", err)
- }
- if rr.(*TXT).Txt[1] != "b" {
- t.Errorf("Txt should have two chunk, last one my be 'b', but is %s", rr.(*TXT).Txt[1])
- }
-}
-
-func TestTypeXXXX(t *testing.T) {
- _, err := NewRR("example.com IN TYPE1234 \\# 4 aabbccdd")
- if err != nil {
- t.Errorf("failed to parse TYPE1234 RR: %v", err)
- }
- _, err = NewRR("example.com IN TYPE655341 \\# 8 aabbccddaabbccdd")
- if err == nil {
- t.Errorf("this should not work, for TYPE655341")
- }
- _, err = NewRR("example.com IN TYPE1 \\# 4 0a000001")
- if err == nil {
- t.Errorf("this should not work")
- }
-}
-
-func TestPTR(t *testing.T) {
- _, err := NewRR("144.2.0.192.in-addr.arpa. 900 IN PTR ilouse03146p0\\(.example.com.")
- if err != nil {
- t.Error("failed to parse ", err)
- }
-}
-
-func TestDigit(t *testing.T) {
- tests := map[string]byte{
- "miek\\000.nl. 100 IN TXT \"A\"": 0,
- "miek\\001.nl. 100 IN TXT \"A\"": 1,
- "miek\\254.nl. 100 IN TXT \"A\"": 254,
- "miek\\255.nl. 100 IN TXT \"A\"": 255,
- "miek\\256.nl. 100 IN TXT \"A\"": 0,
- "miek\\257.nl. 100 IN TXT \"A\"": 1,
- "miek\\004.nl. 100 IN TXT \"A\"": 4,
- }
- for s, i := range tests {
- r, err := NewRR(s)
- buf := make([]byte, 40)
- if err != nil {
- t.Fatalf("failed to parse %v", err)
- }
- PackRR(r, buf, 0, nil, false)
- if buf[5] != i {
- t.Fatalf("5 pos must be %d, is %d", i, buf[5])
- }
- r1, _, _ := UnpackRR(buf, 0)
- if r1.Header().Ttl != 100 {
- t.Fatalf("TTL should %d, is %d", 100, r1.Header().Ttl)
- }
- }
-}
-
-func TestParseRRSIGTimestamp(t *testing.T) {
- tests := map[string]bool{
- `miek.nl. IN RRSIG SOA 8 2 43200 20140210031301 20140111031301 12051 miek.nl. MVZUyrYwq0iZhMFDDnVXD2BvuNiUJjSYlJAgzyAE6CF875BMvvZa+Sb0 RlSCL7WODQSQHhCx/fegHhVVF+Iz8N8kOLrmXD1+jO3Bm6Prl5UhcsPx WTBsg/kmxbp8sR1kvH4oZJtVfakG3iDerrxNaf0sQwhZzyfJQAqpC7pcBoc=`: true,
- `miek.nl. IN RRSIG SOA 8 2 43200 315565800 4102477800 12051 miek.nl. MVZUyrYwq0iZhMFDDnVXD2BvuNiUJjSYlJAgzyAE6CF875BMvvZa+Sb0 RlSCL7WODQSQHhCx/fegHhVVF+Iz8N8kOLrmXD1+jO3Bm6Prl5UhcsPx WTBsg/kmxbp8sR1kvH4oZJtVfakG3iDerrxNaf0sQwhZzyfJQAqpC7pcBoc=`: true,
- }
- for r := range tests {
- _, err := NewRR(r)
- if err != nil {
- t.Error(err)
- }
- }
-}
-
-func TestTxtEqual(t *testing.T) {
- rr1 := new(TXT)
- rr1.Hdr = RR_Header{Name: ".", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
- rr1.Txt = []string{"a\"a", "\"", "b"}
- rr2, _ := NewRR(rr1.String())
- if rr1.String() != rr2.String() {
- // This is not an error, but keep this test.
- t.Errorf("these two TXT records should match:\n%s\n%s", rr1.String(), rr2.String())
- }
-}
-
-func TestTxtLong(t *testing.T) {
- rr1 := new(TXT)
- rr1.Hdr = RR_Header{Name: ".", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
- // Make a long txt record, this breaks when sending the packet,
- // but not earlier.
- rr1.Txt = []string{"start-"}
- for i := 0; i < 200; i++ {
- rr1.Txt[0] += "start-"
- }
- str := rr1.String()
- if len(str) < len(rr1.Txt[0]) {
- t.Error("string conversion should work")
- }
-}
-
-// Basically, don't crash.
-func TestMalformedPackets(t *testing.T) {
- var packets = []string{
- "0021641c0000000100000000000078787878787878787878787303636f6d0000100001",
- }
-
- // com = 63 6f 6d
- for _, packet := range packets {
- data, _ := hex.DecodeString(packet)
- var msg Msg
- msg.Unpack(data)
- }
-}
-
-type algorithm struct {
- name uint8
- bits int
-}
-
-func TestNewPrivateKey(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping test in short mode.")
- }
- algorithms := []algorithm{
- {ECDSAP256SHA256, 256},
- {ECDSAP384SHA384, 384},
- {RSASHA1, 1024},
- {RSASHA256, 2048},
- {DSA, 1024},
- {ED25519, 256},
- }
-
- for _, algo := range algorithms {
- key := new(DNSKEY)
- key.Hdr.Rrtype = TypeDNSKEY
- key.Hdr.Name = "miek.nl."
- key.Hdr.Class = ClassINET
- key.Hdr.Ttl = 14400
- key.Flags = 256
- key.Protocol = 3
- key.Algorithm = algo.name
- privkey, err := key.Generate(algo.bits)
- if err != nil {
- t.Fatal(err)
- }
-
- newPrivKey, err := key.NewPrivateKey(key.PrivateKeyString(privkey))
- if err != nil {
- t.Error(key.String())
- t.Error(key.PrivateKeyString(privkey))
- t.Fatal(err)
- }
-
- switch newPrivKey := newPrivKey.(type) {
- case *rsa.PrivateKey:
- newPrivKey.Precompute()
- }
-
- if !reflect.DeepEqual(privkey, newPrivKey) {
- t.Errorf("[%v] Private keys differ:\n%#v\n%#v", AlgorithmToString[algo.name], privkey, newPrivKey)
- }
- }
-}
-
-// special input test
-func TestNewRRSpecial(t *testing.T) {
- var (
- rr RR
- err error
- expect string
- )
-
- rr, err = NewRR("; comment")
- expect = ""
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr != nil {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-
- rr, err = NewRR("")
- expect = ""
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr != nil {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-
- rr, err = NewRR("$ORIGIN foo.")
- expect = ""
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr != nil {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-
- rr, err = NewRR(" ")
- expect = ""
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr != nil {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-
- rr, err = NewRR("\n")
- expect = ""
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr != nil {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-
- rr, err = NewRR("foo. A 1.1.1.1\nbar. A 2.2.2.2")
- expect = "foo.\t3600\tIN\tA\t1.1.1.1"
- if err != nil {
- t.Errorf("unexpected err: %v", err)
- }
- if rr == nil || rr.String() != expect {
- t.Errorf("unexpected result: [%s] != [%s]", rr, expect)
- }
-}
-
-func TestPrintfVerbsRdata(t *testing.T) {
- x, _ := NewRR("www.miek.nl. IN MX 20 mx.miek.nl.")
- if Field(x, 1) != "20" {
- t.Errorf("should be 20")
- }
- if Field(x, 2) != "mx.miek.nl." {
- t.Errorf("should be mx.miek.nl.")
- }
-
- x, _ = NewRR("www.miek.nl. IN A 127.0.0.1")
- if Field(x, 1) != "127.0.0.1" {
- t.Errorf("should be 127.0.0.1")
- }
-
- x, _ = NewRR("www.miek.nl. IN AAAA ::1")
- if Field(x, 1) != "::1" {
- t.Errorf("should be ::1")
- }
-
- x, _ = NewRR("www.miek.nl. IN NSEC a.miek.nl. A NS SOA MX AAAA")
- if Field(x, 1) != "a.miek.nl." {
- t.Errorf("should be a.miek.nl.")
- }
- if Field(x, 2) != "A NS SOA MX AAAA" {
- t.Errorf("should be A NS SOA MX AAAA")
- }
-
- x, _ = NewRR("www.miek.nl. IN TXT \"first\" \"second\"")
- if Field(x, 1) != "first second" {
- t.Errorf("should be first second")
- }
- if Field(x, 0) != "" {
- t.Errorf("should be empty")
- }
-}
-
-func TestParseTokenOverflow(t *testing.T) {
- _, err := NewRR("_443._tcp.example.org. IN TLSA 0 0 0 308205e8308204d0a00302010202100411de8f53b462f6a5a861b712ec6b59300d06092a864886f70d01010b05003070310b300906035504061302555331153013060355040a130c446967694365727420496e6331193017060355040b13107777772e64696769636572742e636f6d312f302d06035504031326446967694365727420534841322048696768204173737572616e636520536572766572204341301e170d3134313130363030303030305a170d3135313131333132303030305a3081a5310b3009060355040613025553311330110603550408130a43616c69666f726e6961311430120603550407130b4c6f7320416e67656c6573313c303a060355040a1333496e7465726e657420436f72706f726174696f6e20666f722041737369676e6564204e616d657320616e64204e756d6265727331133011060355040b130a546563686e6f6c6f6779311830160603550403130f7777772e6578616d706c652e6f726730820122300d06092a864886f70d01010105000382010f003082010a02820101009e663f52a3d18cb67cdfed547408a4e47e4036538988da2798da3b6655f7240d693ed1cb3fe6d6ad3a9e657ff6efa86b83b0cad24e5d31ff2bf70ec3b78b213f1b4bf61bdc669cbbc07d67154128ca92a9b3cbb4213a836fb823ddd4d7cc04918314d25f06086fa9970ba17e357cca9b458c27eb71760ab95e3f9bc898ae89050ae4d09ba2f7e4259d9ff1e072a6971b18355a8b9e53670c3d5dbdbd283f93a764e71b3a4140ca0746090c08510e2e21078d7d07844bf9c03865b531a0bf2ee766bc401f6451c5a1e6f6fb5d5c1d6a97a0abe91ae8b02e89241e07353909ccd5b41c46de207c06801e08f20713603827f2ae3e68cf15ef881d7e0608f70742e30203010001a382024630820242301f0603551d230418301680145168ff90af0207753cccd9656462a212b859723b301d0603551d0e04160414b000a7f422e9b1ce216117c4c46e7164c8e60c553081810603551d11047a3078820f7777772e6578616d706c652e6f7267820b6578616d706c652e636f6d820b6578616d706c652e656475820b6578616d706c652e6e6574820b6578616d706c652e6f7267820f7777772e6578616d706c652e636f6d820f7777772e6578616d706c652e656475820f7777772e6578616d706c652e6e6574300e0603551d0f0101ff0404030205a0301d0603551d250416301406082b0601050507030106082b0601050507030230750603551d1f046e306c3034a032a030862e687474703a2f2f63726c332e64696769636572742e636f6d2f736861322d68612d7365727665722d67332e63726c3034a032a030862e687474703a2f2f63726c342e64696769636572742e636f6d2f736861322d68612d7365727665722d67332e63726c30420603551d20043b3039303706096086480186fd6c0101302a302806082b06010505070201161c68747470733a2f2f7777772e64696769636572742e636f6d2f43505330818306082b0601050507010104773075302406082b060105050730018618687474703a2f2f6f6373702e64696769636572742e636f6d304d06082b060105050730028641687474703a2f2f636163657274732e64696769636572742e636f6d2f446967694365727453484132486967684173737572616e636553657276657243412e637274300c0603551d130101ff04023000300d06092a864886f70d01010b050003820101005eac2124dedb3978a86ff3608406acb542d3cb54cb83facd63aec88144d6a1bf15dbf1f215c4a73e241e582365cba9ea50dd306541653b3513af1a0756c1b2720e8d112b34fb67181efad9c4609bdc670fb025fa6e6d42188161b026cf3089a08369c2f3609fc84bcc3479140c1922ede430ca8dbac2b2a3cdacb305ba15dc7361c4c3a5e6daa99cb446cb221b28078a7a944efba70d96f31ac143d959bccd2fd50e30c325ea2624fb6b6dbe9344dbcf133bfbd5b4e892d635dbf31596451672c6b65ba5ac9b3cddea92b35dab1065cae3c8cb6bb450a62ea2f72ea7c6bdc7b65fa09b012392543734083c7687d243f8d0375304d99ccd2e148966a8637a6797")
- if err == nil {
- t.Fatalf("token overflow should return an error")
- }
-}
-
-func TestParseTLSA(t *testing.T) {
- lt := []string{
- "_443._tcp.example.org.\t3600\tIN\tTLSA\t1 1 1 c22be239f483c08957bc106219cc2d3ac1a308dfbbdd0a365f17b9351234cf00",
- "_443._tcp.example.org.\t3600\tIN\tTLSA\t2 1 2 4e85f45179e9cd6e0e68e2eb5be2e85ec9b92d91c609caf3ef0315213e3f92ece92c38397a607214de95c7fadc0ad0f1c604a469a0387959745032c0d51492f3",
- "_443._tcp.example.org.\t3600\tIN\tTLSA\t3 0 2 69ec8d2277360b215d0cd956b0e2747108dff34b27d461a41c800629e38ee6c2d1230cc9e8e36711330adc6766e6ff7c5fbb37f106f248337c1a20ad682888d2",
- }
- for _, o := range lt {
- rr, err := NewRR(o)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", o, o, rr.String())
- }
- }
-}
-
-func TestParseSMIMEA(t *testing.T) {
- lt := map[string]string{
- "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t1 1 2 bd80f334566928fc18f58df7e4928c1886f48f71ca3fd41cd9b1854aca7c2180aaacad2819612ed68e7bd3701cc39be7f2529b017c0bc6a53e8fb3f0c7d48070": "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t1 1 2 bd80f334566928fc18f58df7e4928c1886f48f71ca3fd41cd9b1854aca7c2180aaacad2819612ed68e7bd3701cc39be7f2529b017c0bc6a53e8fb3f0c7d48070",
- "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t0 0 1 cdcf0fc66b182928c5217ddd42c826983f5a4b94160ee6c1c9be62d38199f710": "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t0 0 1 cdcf0fc66b182928c5217ddd42c826983f5a4b94160ee6c1c9be62d38199f710",
- "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t3 0 2 499a1eda2af8828b552cdb9d80c3744a25872fddd73f3898d8e4afa3549595d2dd4340126e759566fe8c26b251fa0c887ba4869f011a65f7e79967c2eb729f5b": "2e85e1db3e62be6ea._smimecert.example.com.\t3600\tIN\tSMIMEA\t3 0 2 499a1eda2af8828b552cdb9d80c3744a25872fddd73f3898d8e4afa3549595d2dd4340126e759566fe8c26b251fa0c887ba4869f011a65f7e79967c2eb729f5b",
- "2e85e1db3e62be6eb._smimecert.example.com.\t3600\tIN\tSMIMEA\t3 0 2 499a1eda2af8828b552cdb9d80c3744a25872fddd73f3898d8e4afa3549595d2dd4340126e759566fe8 c26b251fa0c887ba4869f01 1a65f7e79967c2eb729f5b": "2e85e1db3e62be6eb._smimecert.example.com.\t3600\tIN\tSMIMEA\t3 0 2 499a1eda2af8828b552cdb9d80c3744a25872fddd73f3898d8e4afa3549595d2dd4340126e759566fe8c26b251fa0c887ba4869f011a65f7e79967c2eb729f5b",
- }
- for i, o := range lt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", o, o, rr.String())
- }
- }
-}
-
-func TestParseSSHFP(t *testing.T) {
- lt := []string{
- "test.example.org.\t300\tSSHFP\t1 2 (\n" +
- "\t\t\t\t\tBC6533CDC95A79078A39A56EA7635984ED655318ADA9\n" +
- "\t\t\t\t\tB6159E30723665DA95BB )",
- "test.example.org.\t300\tSSHFP\t1 2 ( BC6533CDC 95A79078A39A56EA7635984ED655318AD A9B6159E3072366 5DA95BB )",
- }
- result := "test.example.org.\t300\tIN\tSSHFP\t1 2 BC6533CDC95A79078A39A56EA7635984ED655318ADA9B6159E30723665DA95BB"
- for _, o := range lt {
- rr, err := NewRR(o)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != result {
- t.Errorf("`%s' should be equal to\n\n`%s', but is \n`%s'", o, result, rr.String())
- }
- }
-}
-
-func TestParseHINFO(t *testing.T) {
- dt := map[string]string{
- "example.net. HINFO A B": "example.net. 3600 IN HINFO \"A\" \"B\"",
- "example.net. HINFO \"A\" \"B\"": "example.net. 3600 IN HINFO \"A\" \"B\"",
- "example.net. HINFO A B C D E F": "example.net. 3600 IN HINFO \"A\" \"B C D E F\"",
- "example.net. HINFO AB": "example.net. 3600 IN HINFO \"AB\" \"\"",
- // "example.net. HINFO PC-Intel-700mhz \"Redhat Linux 7.1\"": "example.net. 3600 IN HINFO \"PC-Intel-700mhz\" \"Redhat Linux 7.1\"",
- // This one is recommended in Pro Bind book http://www.zytrax.com/books/dns/ch8/hinfo.html
- // but effectively, even Bind would replace it to correctly formed text when you AXFR
- // TODO: remove this set of comments or figure support for quoted/unquoted combinations in endingToTxtSlice function
- }
- for i, o := range dt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseCAA(t *testing.T) {
- lt := map[string]string{
- "example.net. CAA 0 issue \"symantec.com\"": "example.net.\t3600\tIN\tCAA\t0 issue \"symantec.com\"",
- "example.net. CAA 0 issuewild \"symantec.com; stuff\"": "example.net.\t3600\tIN\tCAA\t0 issuewild \"symantec.com; stuff\"",
- "example.net. CAA 128 tbs \"critical\"": "example.net.\t3600\tIN\tCAA\t128 tbs \"critical\"",
- "example.net. CAA 2 auth \"0>09\\006\\010+\\006\\001\\004\\001\\214y\\002\\003\\001\\006\\009`\\134H\\001e\\003\\004\\002\\001\\004 y\\209\\012\\221r\\220\\156Q\\218\\150\\150{\\166\\245:\\231\\182%\\157:\\133\\179}\\1923r\\238\\151\\255\\128q\\145\\002\\001\\000\"": "example.net.\t3600\tIN\tCAA\t2 auth \"0>09\\006\\010+\\006\\001\\004\\001\\214y\\002\\003\\001\\006\\009`\\134H\\001e\\003\\004\\002\\001\\004 y\\209\\012\\221r\\220\\156Q\\218\\150\\150{\\166\\245:\\231\\182%\\157:\\133\\179}\\1923r\\238\\151\\255\\128q\\145\\002\\001\\000\"",
- "example.net. TYPE257 0 issue \"symantec.com\"": "example.net.\t3600\tIN\tCAA\t0 issue \"symantec.com\"",
- }
- for i, o := range lt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestPackCAA(t *testing.T) {
- m := new(Msg)
- record := new(CAA)
- record.Hdr = RR_Header{Name: "example.com.", Rrtype: TypeCAA, Class: ClassINET, Ttl: 0}
- record.Tag = "issue"
- record.Value = "symantec.com"
- record.Flag = 1
-
- m.Answer = append(m.Answer, record)
- bytes, err := m.Pack()
- if err != nil {
- t.Fatalf("failed to pack msg: %v", err)
- }
- if err := m.Unpack(bytes); err != nil {
- t.Fatalf("failed to unpack msg: %v", err)
- }
- if len(m.Answer) != 1 {
- t.Fatalf("incorrect number of answers unpacked")
- }
- rr := m.Answer[0].(*CAA)
- if rr.Tag != "issue" {
- t.Fatalf("invalid tag for unpacked answer")
- } else if rr.Value != "symantec.com" {
- t.Fatalf("invalid value for unpacked answer")
- } else if rr.Flag != 1 {
- t.Fatalf("invalid flag for unpacked answer")
- }
-}
-
-func TestParseURI(t *testing.T) {
- lt := map[string]string{
- "_http._tcp. IN URI 10 1 \"http://www.example.com/path\"": "_http._tcp.\t3600\tIN\tURI\t10 1 \"http://www.example.com/path\"",
- "_http._tcp. IN URI 10 1 \"\"": "_http._tcp.\t3600\tIN\tURI\t10 1 \"\"",
- }
- for i, o := range lt {
- rr, err := NewRR(i)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", i, o, rr.String())
- }
- }
-}
-
-func TestParseAVC(t *testing.T) {
- avcs := map[string]string{
- `example.org. IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"`: `example.org. 3600 IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"`,
- }
- for avc, o := range avcs {
- rr, err := NewRR(avc)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", avc, o, rr.String())
- }
- }
-}
-
-func TestParseCSYNC(t *testing.T) {
- syncs := map[string]string{
- `example.com. 3600 IN CSYNC 66 3 A NS AAAA`: `example.com. 3600 IN CSYNC 66 3 A NS AAAA`,
- }
- for s, o := range syncs {
- rr, err := NewRR(s)
- if err != nil {
- t.Error("failed to parse RR: ", err)
- continue
- }
- if rr.String() != o {
- t.Errorf("`%s' should be equal to\n`%s', but is `%s'", s, o, rr.String())
- }
- }
-}
-
-func TestParseBadNAPTR(t *testing.T) {
- // Should look like: mplus.ims.vodafone.com. 3600 IN NAPTR 10 100 "S" "SIP+D2U" "" _sip._udp.mplus.ims.vodafone.com.
- naptr := `mplus.ims.vodafone.com. 3600 IN NAPTR 10 100 S SIP+D2U _sip._udp.mplus.ims.vodafone.com.`
- _, err := NewRR(naptr) // parse fails, we should not have leaked a goroutine.
- if err == nil {
- t.Fatalf("parsing NAPTR should have failed: %s", naptr)
- }
- if err := goroutineLeaked(); err != nil {
- t.Errorf("leaked goroutines: %s", err)
- }
-}
-
-func TestUnbalancedParens(t *testing.T) {
- sig := `example.com. 3600 IN RRSIG MX 15 2 3600 (
- 1440021600 1438207200 3613 example.com. (
- oL9krJun7xfBOIWcGHi7mag5/hdZrKWw15jPGrHpjQeRAvTdszaPD+QLs3f
- x8A4M3e23mRZ9VrbpMngwcrqNAg== )`
- _, err := NewRR(sig)
- if err == nil {
- t.Fatalf("failed to detect extra opening brace")
- }
-}
-
-func TestBad(t *testing.T) {
- tests := []string{
- `" TYPE257 9 1E12\x00\x105"`,
- `" TYPE256 9 5"`,
- `" TYPE257 0\"00000000000000400000000000000000000\x00\x10000000000000000000000000000000000 9 l\x16\x01\x005266"`,
- }
- for i := range tests {
- s, err := strconv.Unquote(tests[i])
- if err != nil {
- t.Fatalf("failed to unquote: %q: %s", tests[i], err)
- }
- if _, err = NewRR(s); err == nil {
- t.Errorf("correctly parsed %q", s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/privaterr_test.go b/vendor/github.com/miekg/dns/privaterr_test.go
deleted file mode 100644
index fa5ff48fa..000000000
--- a/vendor/github.com/miekg/dns/privaterr_test.go
+++ /dev/null
@@ -1,166 +0,0 @@
-package dns_test
-
-import (
- "strings"
- "testing"
-
- "github.com/miekg/dns"
-)
-
-const TypeISBN uint16 = 0xFF00
-
-// A crazy new RR type :)
-type ISBN struct {
- x string // rdata with 10 or 13 numbers, dashes or spaces allowed
-}
-
-func NewISBN() dns.PrivateRdata { return &ISBN{""} }
-
-func (rd *ISBN) Len() int { return len([]byte(rd.x)) }
-func (rd *ISBN) String() string { return rd.x }
-
-func (rd *ISBN) Parse(txt []string) error {
- rd.x = strings.TrimSpace(strings.Join(txt, " "))
- return nil
-}
-
-func (rd *ISBN) Pack(buf []byte) (int, error) {
- b := []byte(rd.x)
- n := copy(buf, b)
- if n != len(b) {
- return n, dns.ErrBuf
- }
- return n, nil
-}
-
-func (rd *ISBN) Unpack(buf []byte) (int, error) {
- rd.x = string(buf)
- return len(buf), nil
-}
-
-func (rd *ISBN) Copy(dest dns.PrivateRdata) error {
- isbn, ok := dest.(*ISBN)
- if !ok {
- return dns.ErrRdata
- }
- isbn.x = rd.x
- return nil
-}
-
-var testrecord = strings.Join([]string{"example.org.", "3600", "IN", "ISBN", "12-3 456789-0-123"}, "\t")
-
-func TestPrivateText(t *testing.T) {
- dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
- defer dns.PrivateHandleRemove(TypeISBN)
-
- rr, err := dns.NewRR(testrecord)
- if err != nil {
- t.Fatal(err)
- }
- if rr.String() != testrecord {
- t.Errorf("record string representation did not match original %#v != %#v", rr.String(), testrecord)
- }
-}
-
-func TestPrivateByteSlice(t *testing.T) {
- dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
- defer dns.PrivateHandleRemove(TypeISBN)
-
- rr, err := dns.NewRR(testrecord)
- if err != nil {
- t.Fatal(err)
- }
-
- buf := make([]byte, 100)
- off, err := dns.PackRR(rr, buf, 0, nil, false)
- if err != nil {
- t.Errorf("got error packing ISBN: %v", err)
- }
-
- custrr := rr.(*dns.PrivateRR)
- if ln := custrr.Data.Len() + len(custrr.Header().Name) + 11; ln != off {
- t.Errorf("offset is not matching to length of Private RR: %d!=%d", off, ln)
- }
-
- rr1, off1, err := dns.UnpackRR(buf[:off], 0)
- if err != nil {
- t.Errorf("got error unpacking ISBN: %v", err)
- return
- }
-
- if off1 != off {
- t.Errorf("offset after unpacking differs: %d != %d", off1, off)
- }
-
- if rr1.String() != testrecord {
- t.Errorf("record string representation did not match original %#v != %#v", rr1.String(), testrecord)
- }
-}
-
-const TypeVERSION uint16 = 0xFF01
-
-type VERSION struct {
- x string
-}
-
-func NewVersion() dns.PrivateRdata { return &VERSION{""} }
-
-func (rd *VERSION) String() string { return rd.x }
-func (rd *VERSION) Parse(txt []string) error {
- rd.x = strings.TrimSpace(strings.Join(txt, " "))
- return nil
-}
-
-func (rd *VERSION) Pack(buf []byte) (int, error) {
- b := []byte(rd.x)
- n := copy(buf, b)
- if n != len(b) {
- return n, dns.ErrBuf
- }
- return n, nil
-}
-
-func (rd *VERSION) Unpack(buf []byte) (int, error) {
- rd.x = string(buf)
- return len(buf), nil
-}
-
-func (rd *VERSION) Copy(dest dns.PrivateRdata) error {
- isbn, ok := dest.(*VERSION)
- if !ok {
- return dns.ErrRdata
- }
- isbn.x = rd.x
- return nil
-}
-
-func (rd *VERSION) Len() int {
- return len([]byte(rd.x))
-}
-
-var smallzone = `$ORIGIN example.org.
-@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. (
- 2014091518 7200 3600 1209600 3600
-)
- A 1.2.3.4
-ok ISBN 1231-92110-12
-go VERSION (
- 1.3.1 ; comment
-)
-www ISBN 1231-92110-16
-* CNAME @
-`
-
-func TestPrivateZoneParser(t *testing.T) {
- dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
- dns.PrivateHandle("VERSION", TypeVERSION, NewVersion)
- defer dns.PrivateHandleRemove(TypeISBN)
- defer dns.PrivateHandleRemove(TypeVERSION)
-
- r := strings.NewReader(smallzone)
- for x := range dns.ParseZone(r, ".", "") {
- if err := x.Error; err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/remote_test.go b/vendor/github.com/miekg/dns/remote_test.go
deleted file mode 100644
index 4cf701fe4..000000000
--- a/vendor/github.com/miekg/dns/remote_test.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package dns
-
-import "testing"
-
-const LinodeAddr = "176.58.119.54:53"
-
-func TestClientRemote(t *testing.T) {
- m := new(Msg)
- m.SetQuestion("go.dns.miek.nl.", TypeTXT)
-
- c := new(Client)
- r, _, err := c.Exchange(m, LinodeAddr)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
- if r != nil && r.Rcode != RcodeSuccess {
- t.Errorf("failed to get an valid answer\n%v", r)
- }
-}
diff --git a/vendor/github.com/miekg/dns/rr_test.go b/vendor/github.com/miekg/dns/rr_test.go
deleted file mode 100644
index 77a153b1e..000000000
--- a/vendor/github.com/miekg/dns/rr_test.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package dns
-
-// testRR returns the RR from string s. The error is thrown away.
-func testRR(s string) RR {
- r, _ := NewRR(s)
- return r
-}
diff --git a/vendor/github.com/miekg/dns/sanitize_test.go b/vendor/github.com/miekg/dns/sanitize_test.go
deleted file mode 100644
index b2c0e2081..000000000
--- a/vendor/github.com/miekg/dns/sanitize_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package dns
-
-import "testing"
-
-func TestDedup(t *testing.T) {
- testcases := map[[3]RR][]string{
- [...]RR{
- testRR("mIek.nl. IN A 127.0.0.1"),
- testRR("mieK.nl. IN A 127.0.0.1"),
- testRR("miek.Nl. IN A 127.0.0.1"),
- }: {"mIek.nl.\t3600\tIN\tA\t127.0.0.1"},
- [...]RR{
- testRR("miEk.nl. 2000 IN A 127.0.0.1"),
- testRR("mieK.Nl. 1000 IN A 127.0.0.1"),
- testRR("Miek.nL. 500 IN A 127.0.0.1"),
- }: {"miEk.nl.\t500\tIN\tA\t127.0.0.1"},
- [...]RR{
- testRR("miek.nl. IN A 127.0.0.1"),
- testRR("miek.nl. CH A 127.0.0.1"),
- testRR("miek.nl. IN A 127.0.0.1"),
- }: {"miek.nl.\t3600\tIN\tA\t127.0.0.1",
- "miek.nl.\t3600\tCH\tA\t127.0.0.1",
- },
- [...]RR{
- testRR("miek.nl. CH A 127.0.0.1"),
- testRR("miek.nl. IN A 127.0.0.1"),
- testRR("miek.de. IN A 127.0.0.1"),
- }: {"miek.nl.\t3600\tCH\tA\t127.0.0.1",
- "miek.nl.\t3600\tIN\tA\t127.0.0.1",
- "miek.de.\t3600\tIN\tA\t127.0.0.1",
- },
- [...]RR{
- testRR("miek.de. IN A 127.0.0.1"),
- testRR("miek.nl. 200 IN A 127.0.0.1"),
- testRR("miek.nl. 300 IN A 127.0.0.1"),
- }: {"miek.de.\t3600\tIN\tA\t127.0.0.1",
- "miek.nl.\t200\tIN\tA\t127.0.0.1",
- },
- }
-
- for rr, expected := range testcases {
- out := Dedup([]RR{rr[0], rr[1], rr[2]}, nil)
- for i, o := range out {
- if o.String() != expected[i] {
- t.Fatalf("expected %v, got %v", expected[i], o.String())
- }
- }
- }
-}
-
-func BenchmarkDedup(b *testing.B) {
- rrs := []RR{
- testRR("miEk.nl. 2000 IN A 127.0.0.1"),
- testRR("mieK.Nl. 1000 IN A 127.0.0.1"),
- testRR("Miek.nL. 500 IN A 127.0.0.1"),
- }
- m := make(map[string]RR)
- for i := 0; i < b.N; i++ {
- Dedup(rrs, m)
- }
-}
-
-func TestNormalizedString(t *testing.T) {
- tests := map[RR]string{
- testRR("mIEk.Nl. 3600 IN A 127.0.0.1"): "miek.nl.\tIN\tA\t127.0.0.1",
- testRR("m\\ iek.nL. 3600 IN A 127.0.0.1"): "m\\ iek.nl.\tIN\tA\t127.0.0.1",
- testRR("m\\\tIeK.nl. 3600 in A 127.0.0.1"): "m\\009iek.nl.\tIN\tA\t127.0.0.1",
- }
- for tc, expected := range tests {
- n := normalizedString(tc)
- if n != expected {
- t.Errorf("expected %s, got %s", expected, n)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/scan_test.go b/vendor/github.com/miekg/dns/scan_test.go
deleted file mode 100644
index e43ad4478..000000000
--- a/vendor/github.com/miekg/dns/scan_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package dns
-
-import (
- "io/ioutil"
- "os"
- "strings"
- "testing"
-)
-
-func TestParseZoneInclude(t *testing.T) {
-
- tmpfile, err := ioutil.TempFile("", "dns")
- if err != nil {
- t.Fatalf("could not create tmpfile for test: %s", err)
- }
-
- if _, err := tmpfile.WriteString("foo\tIN\tA\t127.0.0.1"); err != nil {
- t.Fatalf("unable to write content to tmpfile %q: %s", tmpfile.Name(), err)
- }
- if err := tmpfile.Close(); err != nil {
- t.Fatalf("could not close tmpfile %q: %s", tmpfile.Name(), err)
- }
-
- zone := "$ORIGIN example.org.\n$INCLUDE " + tmpfile.Name()
-
- tok := ParseZone(strings.NewReader(zone), "", "")
- for x := range tok {
- if x.Error != nil {
- t.Fatalf("expected no error, but got %s", x.Error)
- }
- if x.RR.Header().Name != "foo.example.org." {
- t.Fatalf("expected %s, but got %s", "foo.example.org.", x.RR.Header().Name)
- }
- }
-
- os.Remove(tmpfile.Name())
-
- tok = ParseZone(strings.NewReader(zone), "", "")
- for x := range tok {
- if x.Error == nil {
- t.Fatalf("expected first token to contain an error but it didn't")
- }
- if !strings.Contains(x.Error.Error(), "failed to open") ||
- !strings.Contains(x.Error.Error(), tmpfile.Name()) {
- t.Fatalf(`expected error to contain: "failed to open" and %q but got: %s`, tmpfile.Name(), x.Error)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/server_test.go b/vendor/github.com/miekg/dns/server_test.go
deleted file mode 100644
index 7693e761a..000000000
--- a/vendor/github.com/miekg/dns/server_test.go
+++ /dev/null
@@ -1,769 +0,0 @@
-package dns
-
-import (
- "crypto/tls"
- "fmt"
- "io"
- "net"
- "runtime"
- "sync"
- "testing"
- "time"
-)
-
-func HelloServer(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
-
- m.Extra = make([]RR, 1)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- w.WriteMsg(m)
-}
-
-func HelloServerBadID(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
- m.Id++
-
- m.Extra = make([]RR, 1)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- w.WriteMsg(m)
-}
-
-func HelloServerEchoAddrPort(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
-
- remoteAddr := w.RemoteAddr().String()
- m.Extra = make([]RR, 1)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{remoteAddr}}
- w.WriteMsg(m)
-}
-
-func AnotherHelloServer(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
-
- m.Extra = make([]RR, 1)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello example"}}
- w.WriteMsg(m)
-}
-
-func RunLocalUDPServer(laddr string) (*Server, string, error) {
- server, l, _, err := RunLocalUDPServerWithFinChan(laddr)
-
- return server, l, err
-}
-
-func RunLocalUDPServerWithFinChan(laddr string) (*Server, string, chan struct{}, error) {
- pc, err := net.ListenPacket("udp", laddr)
- if err != nil {
- return nil, "", nil, err
- }
- server := &Server{PacketConn: pc, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
- waitLock := sync.Mutex{}
- waitLock.Lock()
- server.NotifyStartedFunc = waitLock.Unlock
-
- fin := make(chan struct{}, 0)
-
- go func() {
- server.ActivateAndServe()
- close(fin)
- pc.Close()
- }()
-
- waitLock.Lock()
- return server, pc.LocalAddr().String(), fin, nil
-}
-
-func RunLocalUDPServerUnsafe(laddr string) (*Server, string, error) {
- pc, err := net.ListenPacket("udp", laddr)
- if err != nil {
- return nil, "", err
- }
- server := &Server{PacketConn: pc, Unsafe: true,
- ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
- waitLock := sync.Mutex{}
- waitLock.Lock()
- server.NotifyStartedFunc = waitLock.Unlock
-
- go func() {
- server.ActivateAndServe()
- pc.Close()
- }()
-
- waitLock.Lock()
- return server, pc.LocalAddr().String(), nil
-}
-
-func RunLocalTCPServer(laddr string) (*Server, string, error) {
- l, err := net.Listen("tcp", laddr)
- if err != nil {
- return nil, "", err
- }
-
- server := &Server{Listener: l, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
- waitLock := sync.Mutex{}
- waitLock.Lock()
- server.NotifyStartedFunc = waitLock.Unlock
-
- go func() {
- server.ActivateAndServe()
- l.Close()
- }()
-
- waitLock.Lock()
- return server, l.Addr().String(), nil
-}
-
-func RunLocalTLSServer(laddr string, config *tls.Config) (*Server, string, error) {
- l, err := tls.Listen("tcp", laddr, config)
- if err != nil {
- return nil, "", err
- }
-
- server := &Server{Listener: l, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
- waitLock := sync.Mutex{}
- waitLock.Lock()
- server.NotifyStartedFunc = waitLock.Unlock
-
- go func() {
- server.ActivateAndServe()
- l.Close()
- }()
-
- waitLock.Lock()
- return server, l.Addr().String(), nil
-}
-
-func TestServing(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- HandleFunc("example.com.", AnotherHelloServer)
- defer HandleRemove("miek.nl.")
- defer HandleRemove("example.com.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
- r, _, err := c.Exchange(m, addrstr)
- if err != nil || len(r.Extra) == 0 {
- t.Fatal("failed to exchange miek.nl", err)
- }
- txt := r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello world" {
- t.Error("unexpected result for miek.nl", txt, "!= Hello world")
- }
-
- m.SetQuestion("example.com.", TypeTXT)
- r, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Fatal("failed to exchange example.com", err)
- }
- txt = r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
-
- // Test Mixes cased as noticed by Ask.
- m.SetQuestion("eXaMplE.cOm.", TypeTXT)
- r, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Error("failed to exchange eXaMplE.cOm", err)
- }
- txt = r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
-}
-
-func TestServingTLS(t *testing.T) {
- HandleFunc("miek.nl.", HelloServer)
- HandleFunc("example.com.", AnotherHelloServer)
- defer HandleRemove("miek.nl.")
- defer HandleRemove("example.com.")
-
- cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
- if err != nil {
- t.Fatalf("unable to build certificate: %v", err)
- }
-
- config := tls.Config{
- Certificates: []tls.Certificate{cert},
- }
-
- s, addrstr, err := RunLocalTLSServer(":0", &config)
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- c := new(Client)
- c.Net = "tcp-tls"
- c.TLSConfig = &tls.Config{
- InsecureSkipVerify: true,
- }
-
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
- r, _, err := c.Exchange(m, addrstr)
- if err != nil || len(r.Extra) == 0 {
- t.Fatal("failed to exchange miek.nl", err)
- }
- txt := r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello world" {
- t.Error("unexpected result for miek.nl", txt, "!= Hello world")
- }
-
- m.SetQuestion("example.com.", TypeTXT)
- r, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Fatal("failed to exchange example.com", err)
- }
- txt = r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
-
- // Test Mixes cased as noticed by Ask.
- m.SetQuestion("eXaMplE.cOm.", TypeTXT)
- r, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Error("failed to exchange eXaMplE.cOm", err)
- }
- txt = r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
-}
-
-func TestServingListenAndServe(t *testing.T) {
- HandleFunc("example.com.", AnotherHelloServer)
- defer HandleRemove("example.com.")
-
- waitLock := sync.Mutex{}
- server := &Server{Addr: ":0", Net: "udp", ReadTimeout: time.Hour, WriteTimeout: time.Hour, NotifyStartedFunc: waitLock.Unlock}
- waitLock.Lock()
-
- go func() {
- server.ListenAndServe()
- }()
- waitLock.Lock()
-
- c, m := new(Client), new(Msg)
- m.SetQuestion("example.com.", TypeTXT)
- addr := server.PacketConn.LocalAddr().String() // Get address via the PacketConn that gets set.
- r, _, err := c.Exchange(m, addr)
- if err != nil {
- t.Fatal("failed to exchange example.com", err)
- }
- txt := r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
- server.Shutdown()
-}
-
-func TestServingListenAndServeTLS(t *testing.T) {
- HandleFunc("example.com.", AnotherHelloServer)
- defer HandleRemove("example.com.")
-
- cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
- if err != nil {
- t.Fatalf("unable to build certificate: %v", err)
- }
-
- config := &tls.Config{
- Certificates: []tls.Certificate{cert},
- }
-
- waitLock := sync.Mutex{}
- server := &Server{Addr: ":0", Net: "tcp", TLSConfig: config, ReadTimeout: time.Hour, WriteTimeout: time.Hour, NotifyStartedFunc: waitLock.Unlock}
- waitLock.Lock()
-
- go func() {
- server.ListenAndServe()
- }()
- waitLock.Lock()
-
- c, m := new(Client), new(Msg)
- c.Net = "tcp"
- m.SetQuestion("example.com.", TypeTXT)
- addr := server.Listener.Addr().String() // Get address via the Listener that gets set.
- r, _, err := c.Exchange(m, addr)
- if err != nil {
- t.Fatal(err)
- }
- txt := r.Extra[0].(*TXT).Txt[0]
- if txt != "Hello example" {
- t.Error("unexpected result for example.com", txt, "!= Hello example")
- }
- server.Shutdown()
-}
-
-func BenchmarkServe(b *testing.B) {
- b.StopTimer()
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
- a := runtime.GOMAXPROCS(4)
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- b.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl", TypeSOA)
-
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- c.Exchange(m, addrstr)
- }
- runtime.GOMAXPROCS(a)
-}
-
-func benchmarkServe6(b *testing.B) {
- b.StopTimer()
- HandleFunc("miek.nl.", HelloServer)
- defer HandleRemove("miek.nl.")
- a := runtime.GOMAXPROCS(4)
- s, addrstr, err := RunLocalUDPServer("[::1]:0")
- if err != nil {
- b.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl", TypeSOA)
-
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- c.Exchange(m, addrstr)
- }
- runtime.GOMAXPROCS(a)
-}
-
-func HelloServerCompress(w ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
- m.Extra = make([]RR, 1)
- m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
- m.Compress = true
- w.WriteMsg(m)
-}
-
-func BenchmarkServeCompress(b *testing.B) {
- b.StopTimer()
- HandleFunc("miek.nl.", HelloServerCompress)
- defer HandleRemove("miek.nl.")
- a := runtime.GOMAXPROCS(4)
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- b.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl", TypeSOA)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- c.Exchange(m, addrstr)
- }
- runtime.GOMAXPROCS(a)
-}
-
-func TestDotAsCatchAllWildcard(t *testing.T) {
- mux := NewServeMux()
- mux.Handle(".", HandlerFunc(HelloServer))
- mux.Handle("example.com.", HandlerFunc(AnotherHelloServer))
-
- handler := mux.match("www.miek.nl.", TypeTXT)
- if handler == nil {
- t.Error("wildcard match failed")
- }
-
- handler = mux.match("www.example.com.", TypeTXT)
- if handler == nil {
- t.Error("example.com match failed")
- }
-
- handler = mux.match("a.www.example.com.", TypeTXT)
- if handler == nil {
- t.Error("a.www.example.com match failed")
- }
-
- handler = mux.match("boe.", TypeTXT)
- if handler == nil {
- t.Error("boe. match failed")
- }
-}
-
-func TestCaseFolding(t *testing.T) {
- mux := NewServeMux()
- mux.Handle("_udp.example.com.", HandlerFunc(HelloServer))
-
- handler := mux.match("_dns._udp.example.com.", TypeSRV)
- if handler == nil {
- t.Error("case sensitive characters folded")
- }
-
- handler = mux.match("_DNS._UDP.EXAMPLE.COM.", TypeSRV)
- if handler == nil {
- t.Error("case insensitive characters not folded")
- }
-}
-
-func TestRootServer(t *testing.T) {
- mux := NewServeMux()
- mux.Handle(".", HandlerFunc(HelloServer))
-
- handler := mux.match(".", TypeNS)
- if handler == nil {
- t.Error("root match failed")
- }
-}
-
-type maxRec struct {
- max int
- sync.RWMutex
-}
-
-var M = new(maxRec)
-
-func HelloServerLargeResponse(resp ResponseWriter, req *Msg) {
- m := new(Msg)
- m.SetReply(req)
- m.Authoritative = true
- m1 := 0
- M.RLock()
- m1 = M.max
- M.RUnlock()
- for i := 0; i < m1; i++ {
- aRec := &A{
- Hdr: RR_Header{
- Name: req.Question[0].Name,
- Rrtype: TypeA,
- Class: ClassINET,
- Ttl: 0,
- },
- A: net.ParseIP(fmt.Sprintf("127.0.0.%d", i+1)).To4(),
- }
- m.Answer = append(m.Answer, aRec)
- }
- resp.WriteMsg(m)
-}
-
-func TestServingLargeResponses(t *testing.T) {
- HandleFunc("example.", HelloServerLargeResponse)
- defer HandleRemove("example.")
-
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- // Create request
- m := new(Msg)
- m.SetQuestion("web.service.example.", TypeANY)
-
- c := new(Client)
- c.Net = "udp"
- M.Lock()
- M.max = 2
- M.Unlock()
- _, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
- // This must fail
- M.Lock()
- M.max = 20
- M.Unlock()
- _, _, err = c.Exchange(m, addrstr)
- if err == nil {
- t.Error("failed to fail exchange, this should generate packet error")
- }
- // But this must work again
- c.UDPSize = 7000
- _, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Errorf("failed to exchange: %v", err)
- }
-}
-
-func TestServingResponse(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping test in short mode.")
- }
- HandleFunc("miek.nl.", HelloServer)
- s, addrstr, err := RunLocalUDPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
- m.Response = false
- _, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Fatal("failed to exchange", err)
- }
- m.Response = true
- _, _, err = c.Exchange(m, addrstr)
- if err == nil {
- t.Fatal("exchanged response message")
- }
-
- s.Shutdown()
- s, addrstr, err = RunLocalUDPServerUnsafe(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- defer s.Shutdown()
-
- m.Response = true
- _, _, err = c.Exchange(m, addrstr)
- if err != nil {
- t.Fatal("could exchanged response message in Unsafe mode")
- }
-}
-
-func TestShutdownTCP(t *testing.T) {
- s, _, err := RunLocalTCPServer(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- err = s.Shutdown()
- if err != nil {
- t.Errorf("could not shutdown test TCP server, %v", err)
- }
-}
-
-func TestShutdownTLS(t *testing.T) {
- cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
- if err != nil {
- t.Fatalf("unable to build certificate: %v", err)
- }
-
- config := tls.Config{
- Certificates: []tls.Certificate{cert},
- }
-
- s, _, err := RunLocalTLSServer(":0", &config)
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- err = s.Shutdown()
- if err != nil {
- t.Errorf("could not shutdown test TLS server, %v", err)
- }
-}
-
-type trigger struct {
- done bool
- sync.RWMutex
-}
-
-func (t *trigger) Set() {
- t.Lock()
- defer t.Unlock()
- t.done = true
-}
-func (t *trigger) Get() bool {
- t.RLock()
- defer t.RUnlock()
- return t.done
-}
-
-func TestHandlerCloseTCP(t *testing.T) {
-
- ln, err := net.Listen("tcp", ":0")
- if err != nil {
- panic(err)
- }
- addr := ln.Addr().String()
-
- server := &Server{Addr: addr, Net: "tcp", Listener: ln}
-
- hname := "testhandlerclosetcp."
- triggered := &trigger{}
- HandleFunc(hname, func(w ResponseWriter, r *Msg) {
- triggered.Set()
- w.Close()
- })
- defer HandleRemove(hname)
-
- go func() {
- defer server.Shutdown()
- c := &Client{Net: "tcp"}
- m := new(Msg).SetQuestion(hname, 1)
- tries := 0
- exchange:
- _, _, err := c.Exchange(m, addr)
- if err != nil && err != io.EOF {
- t.Errorf("exchange failed: %s\n", err)
- if tries == 3 {
- return
- }
- time.Sleep(time.Second / 10)
- tries++
- goto exchange
- }
- }()
- server.ActivateAndServe()
- if !triggered.Get() {
- t.Fatalf("handler never called")
- }
-}
-
-func TestShutdownUDP(t *testing.T) {
- s, _, fin, err := RunLocalUDPServerWithFinChan(":0")
- if err != nil {
- t.Fatalf("unable to run test server: %v", err)
- }
- err = s.Shutdown()
- if err != nil {
- t.Errorf("could not shutdown test UDP server, %v", err)
- }
- select {
- case <-fin:
- case <-time.After(2 * time.Second):
- t.Error("could not shutdown test UDP server. Gave up waiting")
- }
-}
-
-func TestServerStartStopRace(t *testing.T) {
- for i := 0; i < 10; i++ {
- var err error
- s := &Server{}
- s, _, _, err = RunLocalUDPServerWithFinChan(":0")
- if err != nil {
- t.Fatalf("could not start server: %s", err)
- }
- go func() {
- if err := s.Shutdown(); err != nil {
- t.Fatalf("could not stop server: %s", err)
- }
- }()
- }
-}
-
-type ExampleFrameLengthWriter struct {
- Writer
-}
-
-func (e *ExampleFrameLengthWriter) Write(m []byte) (int, error) {
- fmt.Println("writing raw DNS message of length", len(m))
- return e.Writer.Write(m)
-}
-
-func ExampleDecorateWriter() {
- // instrument raw DNS message writing
- wf := DecorateWriter(func(w Writer) Writer {
- return &ExampleFrameLengthWriter{w}
- })
-
- // simple UDP server
- pc, err := net.ListenPacket("udp", ":0")
- if err != nil {
- fmt.Println(err.Error())
- return
- }
- server := &Server{
- PacketConn: pc,
- DecorateWriter: wf,
- ReadTimeout: time.Hour, WriteTimeout: time.Hour,
- }
-
- waitLock := sync.Mutex{}
- waitLock.Lock()
- server.NotifyStartedFunc = waitLock.Unlock
- defer server.Shutdown()
-
- go func() {
- server.ActivateAndServe()
- pc.Close()
- }()
-
- waitLock.Lock()
-
- HandleFunc("miek.nl.", HelloServer)
-
- c := new(Client)
- m := new(Msg)
- m.SetQuestion("miek.nl.", TypeTXT)
- _, _, err = c.Exchange(m, pc.LocalAddr().String())
- if err != nil {
- fmt.Println("failed to exchange", err.Error())
- return
- }
- // Output: writing raw DNS message of length 56
-}
-
-var (
- // CertPEMBlock is a X509 data used to test TLS servers (used with tls.X509KeyPair)
- CertPEMBlock = []byte(`-----BEGIN CERTIFICATE-----
-MIIDAzCCAeugAwIBAgIRAJFYMkcn+b8dpU15wjf++GgwDQYJKoZIhvcNAQELBQAw
-EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xNjAxMDgxMjAzNTNaFw0xNzAxMDcxMjAz
-NTNaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQDXjqO6skvP03k58CNjQggd9G/mt+Wa+xRU+WXiKCCHttawM8x+slq5
-yfsHCwxlwsGn79HmJqecNqgHb2GWBXAvVVokFDTcC1hUP4+gp2gu9Ny27UHTjlLm
-O0l/xZ5MN8tfKyYlFw18tXu3fkaPyHj8v/D1RDkuo4ARdFvGSe8TqisbhLk2+9ow
-xfIGbEM9Fdiw8qByC2+d+FfvzIKz3GfQVwn0VoRom8L6NBIANq1IGrB5JefZB6nv
-DnfuxkBmY7F1513HKuEJ8KsLWWZWV9OPU4j4I4Rt+WJNlKjbD2srHxyrS2RDsr91
-8nCkNoWVNO3sZq0XkWKecdc921vL4ginAgMBAAGjVDBSMA4GA1UdDwEB/wQEAwIC
-pDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MBoGA1UdEQQT
-MBGCCWxvY2FsaG9zdIcEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEAGcU3iyLBIVZj
-aDzSvEDHUd1bnLBl1C58Xu/CyKlPqVU7mLfK0JcgEaYQTSX6fCJVNLbbCrcGLsPJ
-fbjlBbyeLjTV413fxPVuona62pBFjqdtbli2Qe8FRH2KBdm41JUJGdo+SdsFu7nc
-BFOcubdw6LLIXvsTvwndKcHWx1rMX709QU1Vn1GAIsbJV/DWI231Jyyb+lxAUx/C
-8vce5uVxiKcGS+g6OjsN3D3TtiEQGSXLh013W6Wsih8td8yMCMZ3w8LQ38br1GUe
-ahLIgUJ9l6HDguM17R7kGqxNvbElsMUHfTtXXP7UDQUiYXDakg8xDP6n9DCDhJ8Y
-bSt7OLB7NQ==
------END CERTIFICATE-----`)
-
- // KeyPEMBlock is a X509 data used to test TLS servers (used with tls.X509KeyPair)
- KeyPEMBlock = []byte(`-----BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEA146jurJLz9N5OfAjY0IIHfRv5rflmvsUVPll4iggh7bWsDPM
-frJaucn7BwsMZcLBp+/R5iannDaoB29hlgVwL1VaJBQ03AtYVD+PoKdoLvTctu1B
-045S5jtJf8WeTDfLXysmJRcNfLV7t35Gj8h4/L/w9UQ5LqOAEXRbxknvE6orG4S5
-NvvaMMXyBmxDPRXYsPKgcgtvnfhX78yCs9xn0FcJ9FaEaJvC+jQSADatSBqweSXn
-2Qep7w537sZAZmOxdeddxyrhCfCrC1lmVlfTj1OI+COEbfliTZSo2w9rKx8cq0tk
-Q7K/dfJwpDaFlTTt7GatF5FinnHXPdtby+IIpwIDAQABAoIBAAJK4RDmPooqTJrC
-JA41MJLo+5uvjwCT9QZmVKAQHzByUFw1YNJkITTiognUI0CdzqNzmH7jIFs39ZeG
-proKusO2G6xQjrNcZ4cV2fgyb5g4QHStl0qhs94A+WojduiGm2IaumAgm6Mc5wDv
-ld6HmknN3Mku/ZCyanVFEIjOVn2WB7ZQLTBs6ZYaebTJG2Xv6p9t2YJW7pPQ9Xce
-s9ohAWohyM4X/OvfnfnLtQp2YLw/BxwehBsCR5SXM3ibTKpFNtxJC8hIfTuWtxZu
-2ywrmXShYBRB1WgtZt5k04bY/HFncvvcHK3YfI1+w4URKtwdaQgPUQRbVwDwuyBn
-flfkCJECgYEA/eWt01iEyE/lXkGn6V9lCocUU7lCU6yk5UT8VXVUc5If4KZKPfCk
-p4zJDOqwn2eM673aWz/mG9mtvAvmnugaGjcaVCyXOp/D/GDmKSoYcvW5B/yjfkLy
-dK6Yaa5LDRVYlYgyzcdCT5/9Qc626NzFwKCZNI4ncIU8g7ViATRxWJ8CgYEA2Ver
-vZ0M606sfgC0H3NtwNBxmuJ+lIF5LNp/wDi07lDfxRR1rnZMX5dnxjcpDr/zvm8J
-WtJJX3xMgqjtHuWKL3yKKony9J5ZPjichSbSbhrzfovgYIRZLxLLDy4MP9L3+CX/
-yBXnqMWuSnFX+M5fVGxdDWiYF3V+wmeOv9JvavkCgYEAiXAPDFzaY+R78O3xiu7M
-r0o3wqqCMPE/wav6O/hrYrQy9VSO08C0IM6g9pEEUwWmzuXSkZqhYWoQFb8Lc/GI
-T7CMXAxXQLDDUpbRgG79FR3Wr3AewHZU8LyiXHKwxcBMV4WGmsXGK3wbh8fyU1NO
-6NsGk+BvkQVOoK1LBAPzZ1kCgYEAsBSmD8U33T9s4dxiEYTrqyV0lH3g/SFz8ZHH
-pAyNEPI2iC1ONhyjPWKlcWHpAokiyOqeUpVBWnmSZtzC1qAydsxYB6ShT+sl9BHb
-RMix/QAauzBJhQhUVJ3OIys0Q1UBDmqCsjCE8SfOT4NKOUnA093C+YT+iyrmmktZ
-zDCJkckCgYEAndqM5KXGk5xYo+MAA1paZcbTUXwaWwjLU+XSRSSoyBEi5xMtfvUb
-7+a1OMhLwWbuz+pl64wFKrbSUyimMOYQpjVE/1vk/kb99pxbgol27hdKyTH1d+ov
-kFsxKCqxAnBVGEWAvVZAiiTOxleQFjz5RnL0BQp9Lg2cQe+dvuUmIAA=
------END RSA PRIVATE KEY-----`)
-)
diff --git a/vendor/github.com/miekg/dns/sig0_test.go b/vendor/github.com/miekg/dns/sig0_test.go
deleted file mode 100644
index 122de6a8e..000000000
--- a/vendor/github.com/miekg/dns/sig0_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package dns
-
-import (
- "crypto"
- "testing"
- "time"
-)
-
-func TestSIG0(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping test in short mode.")
- }
- m := new(Msg)
- m.SetQuestion("example.org.", TypeSOA)
- for _, alg := range []uint8{ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256, RSASHA512} {
- algstr := AlgorithmToString[alg]
- keyrr := new(KEY)
- keyrr.Hdr.Name = algstr + "."
- keyrr.Hdr.Rrtype = TypeKEY
- keyrr.Hdr.Class = ClassINET
- keyrr.Algorithm = alg
- keysize := 1024
- switch alg {
- case ECDSAP256SHA256:
- keysize = 256
- case ECDSAP384SHA384:
- keysize = 384
- }
- pk, err := keyrr.Generate(keysize)
- if err != nil {
- t.Errorf("failed to generate key for “%sâ€: %v", algstr, err)
- continue
- }
- now := uint32(time.Now().Unix())
- sigrr := new(SIG)
- sigrr.Hdr.Name = "."
- sigrr.Hdr.Rrtype = TypeSIG
- sigrr.Hdr.Class = ClassANY
- sigrr.Algorithm = alg
- sigrr.Expiration = now + 300
- sigrr.Inception = now - 300
- sigrr.KeyTag = keyrr.KeyTag()
- sigrr.SignerName = keyrr.Hdr.Name
- mb, err := sigrr.Sign(pk.(crypto.Signer), m)
- if err != nil {
- t.Errorf("failed to sign message using “%sâ€: %v", algstr, err)
- continue
- }
- m := new(Msg)
- if err := m.Unpack(mb); err != nil {
- t.Errorf("failed to unpack message signed using “%sâ€: %v", algstr, err)
- continue
- }
- if len(m.Extra) != 1 {
- t.Errorf("missing SIG for message signed using “%sâ€", algstr)
- continue
- }
- var sigrrwire *SIG
- switch rr := m.Extra[0].(type) {
- case *SIG:
- sigrrwire = rr
- default:
- t.Errorf("expected SIG RR, instead: %v", rr)
- continue
- }
- for _, rr := range []*SIG{sigrr, sigrrwire} {
- id := "sigrr"
- if rr == sigrrwire {
- id = "sigrrwire"
- }
- if err := rr.Verify(keyrr, mb); err != nil {
- t.Errorf("failed to verify “%s†signed SIG(%s): %v", algstr, id, err)
- continue
- }
- }
- mb[13]++
- if err := sigrr.Verify(keyrr, mb); err == nil {
- t.Errorf("verify succeeded on an altered message using “%sâ€", algstr)
- continue
- }
- sigrr.Expiration = 2
- sigrr.Inception = 1
- mb, _ = sigrr.Sign(pk.(crypto.Signer), m)
- if err := sigrr.Verify(keyrr, mb); err == nil {
- t.Errorf("verify succeeded on an expired message using “%sâ€", algstr)
- continue
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/tsig_test.go b/vendor/github.com/miekg/dns/tsig_test.go
deleted file mode 100644
index 4bc52733c..000000000
--- a/vendor/github.com/miekg/dns/tsig_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package dns
-
-import (
- "encoding/binary"
- "testing"
- "time"
-)
-
-func newTsig(algo string) *Msg {
- m := new(Msg)
- m.SetQuestion("example.org.", TypeA)
- m.SetTsig("example.", algo, 300, time.Now().Unix())
- return m
-}
-
-func TestTsig(t *testing.T) {
- m := newTsig(HmacMD5)
- buf, _, err := TsigGenerate(m, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
- err = TsigVerify(buf, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
-
- // TSIG accounts for ID substitution. This means if the message ID is
- // changed by a forwarder, we should still be able to verify the TSIG.
- m = newTsig(HmacMD5)
- buf, _, err = TsigGenerate(m, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
-
- binary.BigEndian.PutUint16(buf[0:2], uint16(42))
- err = TsigVerify(buf, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestTsigCase(t *testing.T) {
- m := newTsig("HmAc-mD5.sig-ALg.rEg.int.") // HmacMD5
- buf, _, err := TsigGenerate(m, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
- err = TsigVerify(buf, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
- if err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/types_test.go b/vendor/github.com/miekg/dns/types_test.go
deleted file mode 100644
index 3dbddee1e..000000000
--- a/vendor/github.com/miekg/dns/types_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package dns
-
-import (
- "testing"
-)
-
-func TestCmToM(t *testing.T) {
- s := cmToM(0, 0)
- if s != "0.00" {
- t.Error("0, 0")
- }
-
- s = cmToM(1, 0)
- if s != "0.01" {
- t.Error("1, 0")
- }
-
- s = cmToM(3, 1)
- if s != "0.30" {
- t.Error("3, 1")
- }
-
- s = cmToM(4, 2)
- if s != "4" {
- t.Error("4, 2")
- }
-
- s = cmToM(5, 3)
- if s != "50" {
- t.Error("5, 3")
- }
-
- s = cmToM(7, 5)
- if s != "7000" {
- t.Error("7, 5")
- }
-
- s = cmToM(9, 9)
- if s != "90000000" {
- t.Error("9, 9")
- }
-}
-
-func TestSplitN(t *testing.T) {
- xs := splitN("abc", 5)
- if len(xs) != 1 && xs[0] != "abc" {
- t.Errorf("failure to split abc")
- }
-
- s := ""
- for i := 0; i < 255; i++ {
- s += "a"
- }
-
- xs = splitN(s, 255)
- if len(xs) != 1 && xs[0] != s {
- t.Errorf("failure to split 255 char long string")
- }
-
- s += "b"
- xs = splitN(s, 255)
- if len(xs) != 2 || xs[1] != "b" {
- t.Errorf("failure to split 256 char long string: %d", len(xs))
- }
-
- // Make s longer
- for i := 0; i < 255; i++ {
- s += "a"
- }
- xs = splitN(s, 255)
- if len(xs) != 3 || xs[2] != "a" {
- t.Errorf("failure to split 510 char long string: %d", len(xs))
- }
-}
diff --git a/vendor/github.com/miekg/dns/udp_test.go b/vendor/github.com/miekg/dns/udp_test.go
deleted file mode 100644
index 2c145dbf6..000000000
--- a/vendor/github.com/miekg/dns/udp_test.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// +build linux,!appengine
-
-package dns
-
-import (
- "bytes"
- "net"
- "strings"
- "testing"
- "time"
-
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-func TestSetUDPSocketOptions(t *testing.T) {
- // returns an error if we cannot resolve that address
- testFamily := func(n, addr string) error {
- a, err := net.ResolveUDPAddr(n, addr)
- if err != nil {
- return err
- }
- c, err := net.ListenUDP(n, a)
- if err != nil {
- return err
- }
- if err := setUDPSocketOptions(c); err != nil {
- t.Fatalf("failed to set socket options: %v", err)
- }
- ch := make(chan *SessionUDP)
- go func() {
- // Set some deadline so this goroutine doesn't hang forever
- c.SetReadDeadline(time.Now().Add(time.Minute))
- b := make([]byte, 1)
- _, sess, err := ReadFromSessionUDP(c, b)
- if err != nil {
- t.Fatalf("failed to read from conn: %v", err)
- }
- ch <- sess
- }()
-
- c2, err := net.Dial("udp", c.LocalAddr().String())
- if err != nil {
- t.Fatalf("failed to dial udp: %v", err)
- }
- if _, err := c2.Write([]byte{1}); err != nil {
- t.Fatalf("failed to write to conn: %v", err)
- }
- sess := <-ch
- if len(sess.context) == 0 {
- t.Fatalf("empty session context: %v", sess)
- }
- ip := parseDstFromOOB(sess.context)
- if ip == nil {
- t.Fatalf("failed to parse dst: %v", sess)
- }
- if !strings.Contains(c.LocalAddr().String(), ip.String()) {
- t.Fatalf("dst was different than listen addr: %v != %v", ip.String(), c.LocalAddr().String())
- }
- return nil
- }
-
- // we require that ipv4 be supported
- if err := testFamily("udp4", "127.0.0.1:0"); err != nil {
- t.Fatalf("failed to test socket options on IPv4: %v", err)
- }
- // IPv6 might not be supported so these will just log
- if err := testFamily("udp6", "[::1]:0"); err != nil {
- t.Logf("failed to test socket options on IPv6-only: %v", err)
- }
- if err := testFamily("udp", "[::1]:0"); err != nil {
- t.Logf("failed to test socket options on IPv6/IPv4: %v", err)
- }
-}
-
-func TestParseDstFromOOB(t *testing.T) {
- // dst is :ffff:100.100.100.100
- oob := []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 100, 100, 100, 100, 2, 0, 0, 0}
- dst := parseDstFromOOB(oob)
- dst4 := dst.To4()
- if dst4 == nil {
- t.Errorf("failed to parse IPv4 in IPv6: %v", dst)
- } else if dst4.String() != "100.100.100.100" {
- t.Errorf("unexpected IPv4: %v", dst4)
- }
-
- // dst is 2001:db8::1
- oob = []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 32, 1, 13, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}
- dst = parseDstFromOOB(oob)
- dst6 := dst.To16()
- if dst6 == nil {
- t.Errorf("failed to parse IPv6: %v", dst)
- } else if dst6.String() != "2001:db8::1" {
- t.Errorf("unexpected IPv6: %v", dst4)
- }
-
- // dst is 100.100.100.100 but was received on 10.10.10.10
- oob = []byte{28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 10, 10, 10, 10, 100, 100, 100, 100, 0, 0, 0, 0}
- dst = parseDstFromOOB(oob)
- dst4 = dst.To4()
- if dst4 == nil {
- t.Errorf("failed to parse IPv4: %v", dst)
- } else if dst4.String() != "100.100.100.100" {
- t.Errorf("unexpected IPv4: %v", dst4)
- }
-}
-
-func TestCorrectSource(t *testing.T) {
- // dst is :ffff:100.100.100.100 which should be counted as IPv4
- oob := []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 100, 100, 100, 100, 2, 0, 0, 0}
- soob := correctSource(oob)
- cm4 := new(ipv4.ControlMessage)
- cm4.Src = net.ParseIP("100.100.100.100")
- if !bytes.Equal(soob, cm4.Marshal()) {
- t.Errorf("unexpected oob for ipv4 address: %v", soob)
- }
-
- // dst is 2001:db8::1
- oob = []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 32, 1, 13, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}
- soob = correctSource(oob)
- cm6 := new(ipv6.ControlMessage)
- cm6.Src = net.ParseIP("2001:db8::1")
- if !bytes.Equal(soob, cm6.Marshal()) {
- t.Errorf("unexpected oob for IPv6 address: %v", soob)
- }
-}
diff --git a/vendor/github.com/miekg/dns/update_test.go b/vendor/github.com/miekg/dns/update_test.go
deleted file mode 100644
index 5dba413a4..000000000
--- a/vendor/github.com/miekg/dns/update_test.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package dns
-
-import (
- "bytes"
- "testing"
-)
-
-func TestDynamicUpdateParsing(t *testing.T) {
- prefix := "example.com. IN "
- for _, typ := range TypeToString {
- if typ == "OPT" || typ == "AXFR" || typ == "IXFR" || typ == "ANY" || typ == "TKEY" ||
- typ == "TSIG" || typ == "ISDN" || typ == "UNSPEC" || typ == "NULL" || typ == "ATMA" ||
- typ == "Reserved" || typ == "None" || typ == "NXT" || typ == "MAILB" || typ == "MAILA" {
- continue
- }
- if _, err := NewRR(prefix + typ); err != nil {
- t.Errorf("failure to parse: %s %s: %v", prefix, typ, err)
- }
- }
-}
-
-func TestDynamicUpdateUnpack(t *testing.T) {
- // From https://github.com/miekg/dns/issues/150#issuecomment-62296803
- // It should be an update message for the zone "example.",
- // deleting the A RRset "example." and then adding an A record at "example.".
- // class ANY, TYPE A
- buf := []byte{171, 68, 40, 0, 0, 1, 0, 0, 0, 2, 0, 0, 7, 101, 120, 97, 109, 112, 108, 101, 0, 0, 6, 0, 1, 192, 12, 0, 1, 0, 255, 0, 0, 0, 0, 0, 0, 192, 12, 0, 1, 0, 1, 0, 0, 0, 0, 0, 4, 127, 0, 0, 1}
- msg := new(Msg)
- err := msg.Unpack(buf)
- if err != nil {
- t.Errorf("failed to unpack: %v\n%s", err, msg.String())
- }
-}
-
-func TestDynamicUpdateZeroRdataUnpack(t *testing.T) {
- m := new(Msg)
- rr := &RR_Header{Name: ".", Rrtype: 0, Class: 1, Ttl: ^uint32(0), Rdlength: 0}
- m.Answer = []RR{rr, rr, rr, rr, rr}
- m.Ns = m.Answer
- for n, s := range TypeToString {
- rr.Rrtype = n
- bytes, err := m.Pack()
- if err != nil {
- t.Errorf("failed to pack %s: %v", s, err)
- continue
- }
- if err := new(Msg).Unpack(bytes); err != nil {
- t.Errorf("failed to unpack %s: %v", s, err)
- }
- }
-}
-
-func TestRemoveRRset(t *testing.T) {
- // Should add a zero data RR in Class ANY with a TTL of 0
- // for each set mentioned in the RRs provided to it.
- rr := testRR(". 100 IN A 127.0.0.1")
- m := new(Msg)
- m.Ns = []RR{&RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY, Ttl: 0, Rdlength: 0}}
- expectstr := m.String()
- expect, err := m.Pack()
- if err != nil {
- t.Fatalf("error packing expected msg: %v", err)
- }
-
- m.Ns = nil
- m.RemoveRRset([]RR{rr})
- actual, err := m.Pack()
- if err != nil {
- t.Fatalf("error packing actual msg: %v", err)
- }
- if !bytes.Equal(actual, expect) {
- tmp := new(Msg)
- if err := tmp.Unpack(actual); err != nil {
- t.Fatalf("error unpacking actual msg: %v\nexpected: %v\ngot: %v\n", err, expect, actual)
- }
- t.Errorf("expected msg:\n%s", expectstr)
- t.Errorf("actual msg:\n%v", tmp)
- }
-}
-
-func TestPreReqAndRemovals(t *testing.T) {
- // Build a list of multiple prereqs and then somes removes followed by an insert.
- // We should be able to add multiple prereqs and updates.
- m := new(Msg)
- m.SetUpdate("example.org.")
- m.Id = 1234
-
- // Use a full set of RRs each time, so we are sure the rdata is stripped.
- rrName1 := testRR("name_used. 3600 IN A 127.0.0.1")
- rrName2 := testRR("name_not_used. 3600 IN A 127.0.0.1")
- rrRemove1 := testRR("remove1. 3600 IN A 127.0.0.1")
- rrRemove2 := testRR("remove2. 3600 IN A 127.0.0.1")
- rrRemove3 := testRR("remove3. 3600 IN A 127.0.0.1")
- rrInsert := testRR("insert. 3600 IN A 127.0.0.1")
- rrRrset1 := testRR("rrset_used1. 3600 IN A 127.0.0.1")
- rrRrset2 := testRR("rrset_used2. 3600 IN A 127.0.0.1")
- rrRrset3 := testRR("rrset_not_used. 3600 IN A 127.0.0.1")
-
- // Handle the prereqs.
- m.NameUsed([]RR{rrName1})
- m.NameNotUsed([]RR{rrName2})
- m.RRsetUsed([]RR{rrRrset1})
- m.Used([]RR{rrRrset2})
- m.RRsetNotUsed([]RR{rrRrset3})
-
- // and now the updates.
- m.RemoveName([]RR{rrRemove1})
- m.RemoveRRset([]RR{rrRemove2})
- m.Remove([]RR{rrRemove3})
- m.Insert([]RR{rrInsert})
-
- // This test function isn't a Example function because we print these RR with tabs at the
- // end and the Example function trim these, thus they never match.
- // TODO(miek): don't print these tabs and make this into an Example function.
- expect := `;; opcode: UPDATE, status: NOERROR, id: 1234
-;; flags:; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 0
-
-;; QUESTION SECTION:
-;example.org. IN SOA
-
-;; ANSWER SECTION:
-name_used. 0 CLASS255 ANY
-name_not_used. 0 NONE ANY
-rrset_used1. 0 CLASS255 A
-rrset_used2. 3600 IN A 127.0.0.1
-rrset_not_used. 0 NONE A
-
-;; AUTHORITY SECTION:
-remove1. 0 CLASS255 ANY
-remove2. 0 CLASS255 A
-remove3. 0 NONE A 127.0.0.1
-insert. 3600 IN A 127.0.0.1
-`
-
- if m.String() != expect {
- t.Errorf("expected msg:\n%s", expect)
- t.Errorf("actual msg:\n%v", m.String())
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitattributes b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitattributes
deleted file mode 100644
index d2f212e5d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitattributes
+++ /dev/null
@@ -1,10 +0,0 @@
-# Treat all files in this repo as binary, with no git magic updating
-# line endings. Windows users contributing to Go will need to use a
-# modern version of git and editors capable of LF line endings.
-#
-# We'll prevent accidental CRLF line endings from entering the repo
-# via the git-review gofmt checks.
-#
-# See golang.org/issue/9281
-
-* -text
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitignore b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitignore
deleted file mode 100644
index 8339fd61d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Add no patterns to .hgignore except for files generated by the build.
-last-change
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/AUTHORS b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/AUTHORS
deleted file mode 100644
index 2b00ddba0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTING.md b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTING.md
deleted file mode 100644
index 88dff59bc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing to Go
-
-Go is an open source project.
-
-It is the work of hundreds of contributors. We appreciate your help!
-
-
-## Filing issues
-
-When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
-
-1. What version of Go are you using (`go version`)?
-2. What operating system and processor architecture are you using?
-3. What did you do?
-4. What did you expect to see?
-5. What did you see instead?
-
-General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
-The gophers there will answer or ask you to file an issue if you've tripped over a bug.
-
-## Contributing code
-
-Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
-before sending patches.
-
-**We do not accept GitHub pull requests**
-(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
-
-Unless otherwise noted, the Go source files are distributed under
-the BSD-style license found in the LICENSE file.
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTORS
deleted file mode 100644
index 1fbd3e976..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/LICENSE b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/LICENSE
deleted file mode 100644
index 6a66aea5e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. 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.
- * Neither the name of Google Inc. nor the names of its
-contributors may 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
-OWNER 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/miekg/dns/vendor/golang.org/x/crypto/PATENTS b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/PATENTS
deleted file mode 100644
index 733099041..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google 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,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/README.md b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/README.md
deleted file mode 100644
index c9d6fecd1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Go Cryptography
-
-This repository holds supplementary Go cryptography libraries.
-
-## Download/Install
-
-The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You
-can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`.
-
-## Report Issues / Send Patches
-
-This repository uses Gerrit for code changes. To learn how to submit changes to
-this repository, see https://golang.org/doc/contribute.html.
-
-The main issue tracker for the crypto repository is located at
-https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the
-subject line, so it is easy to find.
-
-Note that contributions to the cryptography package receive additional scrutiny
-due to their sensitive nature. Patches may take longer than normal to receive
-feedback.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme.go
deleted file mode 100644
index fa9c4b39e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme.go
+++ /dev/null
@@ -1,1058 +0,0 @@
-// Copyright 2015 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 file.
-
-// Package acme provides an implementation of the
-// Automatic Certificate Management Environment (ACME) spec.
-// See https://tools.ietf.org/html/draft-ietf-acme-acme-02 for details.
-//
-// Most common scenarios will want to use autocert subdirectory instead,
-// which provides automatic access to certificates from Let's Encrypt
-// and any other ACME-based CA.
-//
-// This package is a work in progress and makes no API stability promises.
-package acme
-
-import (
- "bytes"
- "context"
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/sha256"
- "crypto/tls"
- "crypto/x509"
- "encoding/base64"
- "encoding/hex"
- "encoding/json"
- "encoding/pem"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "math/big"
- "net/http"
- "strconv"
- "strings"
- "sync"
- "time"
-)
-
-// LetsEncryptURL is the Directory endpoint of Let's Encrypt CA.
-const LetsEncryptURL = "https://acme-v01.api.letsencrypt.org/directory"
-
-const (
- maxChainLen = 5 // max depth and breadth of a certificate chain
- maxCertSize = 1 << 20 // max size of a certificate, in bytes
-
- // Max number of collected nonces kept in memory.
- // Expect usual peak of 1 or 2.
- maxNonces = 100
-)
-
-// Client is an ACME client.
-// The only required field is Key. An example of creating a client with a new key
-// is as follows:
-//
-// key, err := rsa.GenerateKey(rand.Reader, 2048)
-// if err != nil {
-// log.Fatal(err)
-// }
-// client := &Client{Key: key}
-//
-type Client struct {
- // Key is the account key used to register with a CA and sign requests.
- // Key.Public() must return a *rsa.PublicKey or *ecdsa.PublicKey.
- Key crypto.Signer
-
- // HTTPClient optionally specifies an HTTP client to use
- // instead of http.DefaultClient.
- HTTPClient *http.Client
-
- // DirectoryURL points to the CA directory endpoint.
- // If empty, LetsEncryptURL is used.
- // Mutating this value after a successful call of Client's Discover method
- // will have no effect.
- DirectoryURL string
-
- dirMu sync.Mutex // guards writes to dir
- dir *Directory // cached result of Client's Discover method
-
- noncesMu sync.Mutex
- nonces map[string]struct{} // nonces collected from previous responses
-}
-
-// Discover performs ACME server discovery using c.DirectoryURL.
-//
-// It caches successful result. So, subsequent calls will not result in
-// a network round-trip. This also means mutating c.DirectoryURL after successful call
-// of this method will have no effect.
-func (c *Client) Discover(ctx context.Context) (Directory, error) {
- c.dirMu.Lock()
- defer c.dirMu.Unlock()
- if c.dir != nil {
- return *c.dir, nil
- }
-
- dirURL := c.DirectoryURL
- if dirURL == "" {
- dirURL = LetsEncryptURL
- }
- res, err := c.get(ctx, dirURL)
- if err != nil {
- return Directory{}, err
- }
- defer res.Body.Close()
- c.addNonce(res.Header)
- if res.StatusCode != http.StatusOK {
- return Directory{}, responseError(res)
- }
-
- var v struct {
- Reg string `json:"new-reg"`
- Authz string `json:"new-authz"`
- Cert string `json:"new-cert"`
- Revoke string `json:"revoke-cert"`
- Meta struct {
- Terms string `json:"terms-of-service"`
- Website string `json:"website"`
- CAA []string `json:"caa-identities"`
- }
- }
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return Directory{}, err
- }
- c.dir = &Directory{
- RegURL: v.Reg,
- AuthzURL: v.Authz,
- CertURL: v.Cert,
- RevokeURL: v.Revoke,
- Terms: v.Meta.Terms,
- Website: v.Meta.Website,
- CAA: v.Meta.CAA,
- }
- return *c.dir, nil
-}
-
-// CreateCert requests a new certificate using the Certificate Signing Request csr encoded in DER format.
-// The exp argument indicates the desired certificate validity duration. CA may issue a certificate
-// with a different duration.
-// If the bundle argument is true, the returned value will also contain the CA (issuer) certificate chain.
-//
-// In the case where CA server does not provide the issued certificate in the response,
-// CreateCert will poll certURL using c.FetchCert, which will result in additional round-trips.
-// In such a scenario, the caller can cancel the polling with ctx.
-//
-// CreateCert returns an error if the CA's response or chain was unreasonably large.
-// Callers are encouraged to parse the returned value to ensure the certificate is valid and has the expected features.
-func (c *Client) CreateCert(ctx context.Context, csr []byte, exp time.Duration, bundle bool) (der [][]byte, certURL string, err error) {
- if _, err := c.Discover(ctx); err != nil {
- return nil, "", err
- }
-
- req := struct {
- Resource string `json:"resource"`
- CSR string `json:"csr"`
- NotBefore string `json:"notBefore,omitempty"`
- NotAfter string `json:"notAfter,omitempty"`
- }{
- Resource: "new-cert",
- CSR: base64.RawURLEncoding.EncodeToString(csr),
- }
- now := timeNow()
- req.NotBefore = now.Format(time.RFC3339)
- if exp > 0 {
- req.NotAfter = now.Add(exp).Format(time.RFC3339)
- }
-
- res, err := c.retryPostJWS(ctx, c.Key, c.dir.CertURL, req)
- if err != nil {
- return nil, "", err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusCreated {
- return nil, "", responseError(res)
- }
-
- curl := res.Header.Get("Location") // cert permanent URL
- if res.ContentLength == 0 {
- // no cert in the body; poll until we get it
- cert, err := c.FetchCert(ctx, curl, bundle)
- return cert, curl, err
- }
- // slurp issued cert and CA chain, if requested
- cert, err := c.responseCert(ctx, res, bundle)
- return cert, curl, err
-}
-
-// FetchCert retrieves already issued certificate from the given url, in DER format.
-// It retries the request until the certificate is successfully retrieved,
-// context is cancelled by the caller or an error response is received.
-//
-// The returned value will also contain the CA (issuer) certificate if the bundle argument is true.
-//
-// FetchCert returns an error if the CA's response or chain was unreasonably large.
-// Callers are encouraged to parse the returned value to ensure the certificate is valid
-// and has expected features.
-func (c *Client) FetchCert(ctx context.Context, url string, bundle bool) ([][]byte, error) {
- for {
- res, err := c.get(ctx, url)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode == http.StatusOK {
- return c.responseCert(ctx, res, bundle)
- }
- if res.StatusCode > 299 {
- return nil, responseError(res)
- }
- d := retryAfter(res.Header.Get("Retry-After"), 3*time.Second)
- select {
- case <-time.After(d):
- // retry
- case <-ctx.Done():
- return nil, ctx.Err()
- }
- }
-}
-
-// RevokeCert revokes a previously issued certificate cert, provided in DER format.
-//
-// The key argument, used to sign the request, must be authorized
-// to revoke the certificate. It's up to the CA to decide which keys are authorized.
-// For instance, the key pair of the certificate may be authorized.
-// If the key is nil, c.Key is used instead.
-func (c *Client) RevokeCert(ctx context.Context, key crypto.Signer, cert []byte, reason CRLReasonCode) error {
- if _, err := c.Discover(ctx); err != nil {
- return err
- }
-
- body := &struct {
- Resource string `json:"resource"`
- Cert string `json:"certificate"`
- Reason int `json:"reason"`
- }{
- Resource: "revoke-cert",
- Cert: base64.RawURLEncoding.EncodeToString(cert),
- Reason: int(reason),
- }
- if key == nil {
- key = c.Key
- }
- res, err := c.retryPostJWS(ctx, key, c.dir.RevokeURL, body)
- if err != nil {
- return err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK {
- return responseError(res)
- }
- return nil
-}
-
-// AcceptTOS always returns true to indicate the acceptance of a CA's Terms of Service
-// during account registration. See Register method of Client for more details.
-func AcceptTOS(tosURL string) bool { return true }
-
-// Register creates a new account registration by following the "new-reg" flow.
-// It returns the registered account. The account is not modified.
-//
-// The registration may require the caller to agree to the CA's Terms of Service (TOS).
-// If so, and the account has not indicated the acceptance of the terms (see Account for details),
-// Register calls prompt with a TOS URL provided by the CA. Prompt should report
-// whether the caller agrees to the terms. To always accept the terms, the caller can use AcceptTOS.
-func (c *Client) Register(ctx context.Context, a *Account, prompt func(tosURL string) bool) (*Account, error) {
- if _, err := c.Discover(ctx); err != nil {
- return nil, err
- }
-
- var err error
- if a, err = c.doReg(ctx, c.dir.RegURL, "new-reg", a); err != nil {
- return nil, err
- }
- var accept bool
- if a.CurrentTerms != "" && a.CurrentTerms != a.AgreedTerms {
- accept = prompt(a.CurrentTerms)
- }
- if accept {
- a.AgreedTerms = a.CurrentTerms
- a, err = c.UpdateReg(ctx, a)
- }
- return a, err
-}
-
-// GetReg retrieves an existing registration.
-// The url argument is an Account URI.
-func (c *Client) GetReg(ctx context.Context, url string) (*Account, error) {
- a, err := c.doReg(ctx, url, "reg", nil)
- if err != nil {
- return nil, err
- }
- a.URI = url
- return a, nil
-}
-
-// UpdateReg updates an existing registration.
-// It returns an updated account copy. The provided account is not modified.
-func (c *Client) UpdateReg(ctx context.Context, a *Account) (*Account, error) {
- uri := a.URI
- a, err := c.doReg(ctx, uri, "reg", a)
- if err != nil {
- return nil, err
- }
- a.URI = uri
- return a, nil
-}
-
-// Authorize performs the initial step in an authorization flow.
-// The caller will then need to choose from and perform a set of returned
-// challenges using c.Accept in order to successfully complete authorization.
-//
-// If an authorization has been previously granted, the CA may return
-// a valid authorization (Authorization.Status is StatusValid). If so, the caller
-// need not fulfill any challenge and can proceed to requesting a certificate.
-func (c *Client) Authorize(ctx context.Context, domain string) (*Authorization, error) {
- if _, err := c.Discover(ctx); err != nil {
- return nil, err
- }
-
- type authzID struct {
- Type string `json:"type"`
- Value string `json:"value"`
- }
- req := struct {
- Resource string `json:"resource"`
- Identifier authzID `json:"identifier"`
- }{
- Resource: "new-authz",
- Identifier: authzID{Type: "dns", Value: domain},
- }
- res, err := c.retryPostJWS(ctx, c.Key, c.dir.AuthzURL, req)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusCreated {
- return nil, responseError(res)
- }
-
- var v wireAuthz
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return nil, fmt.Errorf("acme: invalid response: %v", err)
- }
- if v.Status != StatusPending && v.Status != StatusValid {
- return nil, fmt.Errorf("acme: unexpected status: %s", v.Status)
- }
- return v.authorization(res.Header.Get("Location")), nil
-}
-
-// GetAuthorization retrieves an authorization identified by the given URL.
-//
-// If a caller needs to poll an authorization until its status is final,
-// see the WaitAuthorization method.
-func (c *Client) GetAuthorization(ctx context.Context, url string) (*Authorization, error) {
- res, err := c.get(ctx, url)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusAccepted {
- return nil, responseError(res)
- }
- var v wireAuthz
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return nil, fmt.Errorf("acme: invalid response: %v", err)
- }
- return v.authorization(url), nil
-}
-
-// RevokeAuthorization relinquishes an existing authorization identified
-// by the given URL.
-// The url argument is an Authorization.URI value.
-//
-// If successful, the caller will be required to obtain a new authorization
-// using the Authorize method before being able to request a new certificate
-// for the domain associated with the authorization.
-//
-// It does not revoke existing certificates.
-func (c *Client) RevokeAuthorization(ctx context.Context, url string) error {
- req := struct {
- Resource string `json:"resource"`
- Status string `json:"status"`
- Delete bool `json:"delete"`
- }{
- Resource: "authz",
- Status: "deactivated",
- Delete: true,
- }
- res, err := c.retryPostJWS(ctx, c.Key, url, req)
- if err != nil {
- return err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK {
- return responseError(res)
- }
- return nil
-}
-
-// WaitAuthorization polls an authorization at the given URL
-// until it is in one of the final states, StatusValid or StatusInvalid,
-// or the context is done.
-//
-// It returns a non-nil Authorization only if its Status is StatusValid.
-// In all other cases WaitAuthorization returns an error.
-// If the Status is StatusInvalid, the returned error is of type *AuthorizationError.
-func (c *Client) WaitAuthorization(ctx context.Context, url string) (*Authorization, error) {
- sleep := sleeper(ctx)
- for {
- res, err := c.get(ctx, url)
- if err != nil {
- return nil, err
- }
- retry := res.Header.Get("Retry-After")
- if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusAccepted {
- res.Body.Close()
- if err := sleep(retry, 1); err != nil {
- return nil, err
- }
- continue
- }
- var raw wireAuthz
- err = json.NewDecoder(res.Body).Decode(&raw)
- res.Body.Close()
- if err != nil {
- if err := sleep(retry, 0); err != nil {
- return nil, err
- }
- continue
- }
- if raw.Status == StatusValid {
- return raw.authorization(url), nil
- }
- if raw.Status == StatusInvalid {
- return nil, raw.error(url)
- }
- if err := sleep(retry, 0); err != nil {
- return nil, err
- }
- }
-}
-
-// GetChallenge retrieves the current status of an challenge.
-//
-// A client typically polls a challenge status using this method.
-func (c *Client) GetChallenge(ctx context.Context, url string) (*Challenge, error) {
- res, err := c.get(ctx, url)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusAccepted {
- return nil, responseError(res)
- }
- v := wireChallenge{URI: url}
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return nil, fmt.Errorf("acme: invalid response: %v", err)
- }
- return v.challenge(), nil
-}
-
-// Accept informs the server that the client accepts one of its challenges
-// previously obtained with c.Authorize.
-//
-// The server will then perform the validation asynchronously.
-func (c *Client) Accept(ctx context.Context, chal *Challenge) (*Challenge, error) {
- auth, err := keyAuth(c.Key.Public(), chal.Token)
- if err != nil {
- return nil, err
- }
-
- req := struct {
- Resource string `json:"resource"`
- Type string `json:"type"`
- Auth string `json:"keyAuthorization"`
- }{
- Resource: "challenge",
- Type: chal.Type,
- Auth: auth,
- }
- res, err := c.retryPostJWS(ctx, c.Key, chal.URI, req)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- // Note: the protocol specifies 200 as the expected response code, but
- // letsencrypt seems to be returning 202.
- if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusAccepted {
- return nil, responseError(res)
- }
-
- var v wireChallenge
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return nil, fmt.Errorf("acme: invalid response: %v", err)
- }
- return v.challenge(), nil
-}
-
-// DNS01ChallengeRecord returns a DNS record value for a dns-01 challenge response.
-// A TXT record containing the returned value must be provisioned under
-// "_acme-challenge" name of the domain being validated.
-//
-// The token argument is a Challenge.Token value.
-func (c *Client) DNS01ChallengeRecord(token string) (string, error) {
- ka, err := keyAuth(c.Key.Public(), token)
- if err != nil {
- return "", err
- }
- b := sha256.Sum256([]byte(ka))
- return base64.RawURLEncoding.EncodeToString(b[:]), nil
-}
-
-// HTTP01ChallengeResponse returns the response for an http-01 challenge.
-// Servers should respond with the value to HTTP requests at the URL path
-// provided by HTTP01ChallengePath to validate the challenge and prove control
-// over a domain name.
-//
-// The token argument is a Challenge.Token value.
-func (c *Client) HTTP01ChallengeResponse(token string) (string, error) {
- return keyAuth(c.Key.Public(), token)
-}
-
-// HTTP01ChallengePath returns the URL path at which the response for an http-01 challenge
-// should be provided by the servers.
-// The response value can be obtained with HTTP01ChallengeResponse.
-//
-// The token argument is a Challenge.Token value.
-func (c *Client) HTTP01ChallengePath(token string) string {
- return "/.well-known/acme-challenge/" + token
-}
-
-// TLSSNI01ChallengeCert creates a certificate for TLS-SNI-01 challenge response.
-// Servers can present the certificate to validate the challenge and prove control
-// over a domain name.
-//
-// The implementation is incomplete in that the returned value is a single certificate,
-// computed only for Z0 of the key authorization. ACME CAs are expected to update
-// their implementations to use the newer version, TLS-SNI-02.
-// For more details on TLS-SNI-01 see https://tools.ietf.org/html/draft-ietf-acme-acme-01#section-7.3.
-//
-// The token argument is a Challenge.Token value.
-// If a WithKey option is provided, its private part signs the returned cert,
-// and the public part is used to specify the signee.
-// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve.
-//
-// The returned certificate is valid for the next 24 hours and must be presented only when
-// the server name of the client hello matches exactly the returned name value.
-func (c *Client) TLSSNI01ChallengeCert(token string, opt ...CertOption) (cert tls.Certificate, name string, err error) {
- ka, err := keyAuth(c.Key.Public(), token)
- if err != nil {
- return tls.Certificate{}, "", err
- }
- b := sha256.Sum256([]byte(ka))
- h := hex.EncodeToString(b[:])
- name = fmt.Sprintf("%s.%s.acme.invalid", h[:32], h[32:])
- cert, err = tlsChallengeCert([]string{name}, opt)
- if err != nil {
- return tls.Certificate{}, "", err
- }
- return cert, name, nil
-}
-
-// TLSSNI02ChallengeCert creates a certificate for TLS-SNI-02 challenge response.
-// Servers can present the certificate to validate the challenge and prove control
-// over a domain name. For more details on TLS-SNI-02 see
-// https://tools.ietf.org/html/draft-ietf-acme-acme-03#section-7.3.
-//
-// The token argument is a Challenge.Token value.
-// If a WithKey option is provided, its private part signs the returned cert,
-// and the public part is used to specify the signee.
-// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve.
-//
-// The returned certificate is valid for the next 24 hours and must be presented only when
-// the server name in the client hello matches exactly the returned name value.
-func (c *Client) TLSSNI02ChallengeCert(token string, opt ...CertOption) (cert tls.Certificate, name string, err error) {
- b := sha256.Sum256([]byte(token))
- h := hex.EncodeToString(b[:])
- sanA := fmt.Sprintf("%s.%s.token.acme.invalid", h[:32], h[32:])
-
- ka, err := keyAuth(c.Key.Public(), token)
- if err != nil {
- return tls.Certificate{}, "", err
- }
- b = sha256.Sum256([]byte(ka))
- h = hex.EncodeToString(b[:])
- sanB := fmt.Sprintf("%s.%s.ka.acme.invalid", h[:32], h[32:])
-
- cert, err = tlsChallengeCert([]string{sanA, sanB}, opt)
- if err != nil {
- return tls.Certificate{}, "", err
- }
- return cert, sanA, nil
-}
-
-// doReg sends all types of registration requests.
-// The type of request is identified by typ argument, which is a "resource"
-// in the ACME spec terms.
-//
-// A non-nil acct argument indicates whether the intention is to mutate data
-// of the Account. Only Contact and Agreement of its fields are used
-// in such cases.
-func (c *Client) doReg(ctx context.Context, url string, typ string, acct *Account) (*Account, error) {
- req := struct {
- Resource string `json:"resource"`
- Contact []string `json:"contact,omitempty"`
- Agreement string `json:"agreement,omitempty"`
- }{
- Resource: typ,
- }
- if acct != nil {
- req.Contact = acct.Contact
- req.Agreement = acct.AgreedTerms
- }
- res, err := c.retryPostJWS(ctx, c.Key, url, req)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode < 200 || res.StatusCode > 299 {
- return nil, responseError(res)
- }
-
- var v struct {
- Contact []string
- Agreement string
- Authorizations string
- Certificates string
- }
- if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
- return nil, fmt.Errorf("acme: invalid response: %v", err)
- }
- var tos string
- if v := linkHeader(res.Header, "terms-of-service"); len(v) > 0 {
- tos = v[0]
- }
- var authz string
- if v := linkHeader(res.Header, "next"); len(v) > 0 {
- authz = v[0]
- }
- return &Account{
- URI: res.Header.Get("Location"),
- Contact: v.Contact,
- AgreedTerms: v.Agreement,
- CurrentTerms: tos,
- Authz: authz,
- Authorizations: v.Authorizations,
- Certificates: v.Certificates,
- }, nil
-}
-
-// retryPostJWS will retry calls to postJWS if there is a badNonce error,
-// clearing the stored nonces after each error.
-// If the response was 4XX-5XX, then responseError is called on the body,
-// the body is closed, and the error returned.
-func (c *Client) retryPostJWS(ctx context.Context, key crypto.Signer, url string, body interface{}) (*http.Response, error) {
- sleep := sleeper(ctx)
- for {
- res, err := c.postJWS(ctx, key, url, body)
- if err != nil {
- return nil, err
- }
- // handle errors 4XX-5XX with responseError
- if res.StatusCode >= 400 && res.StatusCode <= 599 {
- err := responseError(res)
- res.Body.Close()
- // according to spec badNonce is urn:ietf:params:acme:error:badNonce
- // however, acme servers in the wild return their version of the error
- // https://tools.ietf.org/html/draft-ietf-acme-acme-02#section-5.4
- if ae, ok := err.(*Error); ok && strings.HasSuffix(strings.ToLower(ae.ProblemType), ":badnonce") {
- // clear any nonces that we might've stored that might now be
- // considered bad
- c.clearNonces()
- retry := res.Header.Get("Retry-After")
- if err := sleep(retry, 1); err != nil {
- return nil, err
- }
- continue
- }
- return nil, err
- }
- return res, nil
- }
-}
-
-// postJWS signs the body with the given key and POSTs it to the provided url.
-// The body argument must be JSON-serializable.
-func (c *Client) postJWS(ctx context.Context, key crypto.Signer, url string, body interface{}) (*http.Response, error) {
- nonce, err := c.popNonce(ctx, url)
- if err != nil {
- return nil, err
- }
- b, err := jwsEncodeJSON(body, key, nonce)
- if err != nil {
- return nil, err
- }
- res, err := c.post(ctx, url, "application/jose+json", bytes.NewReader(b))
- if err != nil {
- return nil, err
- }
- c.addNonce(res.Header)
- return res, nil
-}
-
-// popNonce returns a nonce value previously stored with c.addNonce
-// or fetches a fresh one from the given URL.
-func (c *Client) popNonce(ctx context.Context, url string) (string, error) {
- c.noncesMu.Lock()
- defer c.noncesMu.Unlock()
- if len(c.nonces) == 0 {
- return c.fetchNonce(ctx, url)
- }
- var nonce string
- for nonce = range c.nonces {
- delete(c.nonces, nonce)
- break
- }
- return nonce, nil
-}
-
-// clearNonces clears any stored nonces
-func (c *Client) clearNonces() {
- c.noncesMu.Lock()
- defer c.noncesMu.Unlock()
- c.nonces = make(map[string]struct{})
-}
-
-// addNonce stores a nonce value found in h (if any) for future use.
-func (c *Client) addNonce(h http.Header) {
- v := nonceFromHeader(h)
- if v == "" {
- return
- }
- c.noncesMu.Lock()
- defer c.noncesMu.Unlock()
- if len(c.nonces) >= maxNonces {
- return
- }
- if c.nonces == nil {
- c.nonces = make(map[string]struct{})
- }
- c.nonces[v] = struct{}{}
-}
-
-func (c *Client) httpClient() *http.Client {
- if c.HTTPClient != nil {
- return c.HTTPClient
- }
- return http.DefaultClient
-}
-
-func (c *Client) get(ctx context.Context, urlStr string) (*http.Response, error) {
- req, err := http.NewRequest("GET", urlStr, nil)
- if err != nil {
- return nil, err
- }
- return c.do(ctx, req)
-}
-
-func (c *Client) head(ctx context.Context, urlStr string) (*http.Response, error) {
- req, err := http.NewRequest("HEAD", urlStr, nil)
- if err != nil {
- return nil, err
- }
- return c.do(ctx, req)
-}
-
-func (c *Client) post(ctx context.Context, urlStr, contentType string, body io.Reader) (*http.Response, error) {
- req, err := http.NewRequest("POST", urlStr, body)
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", contentType)
- return c.do(ctx, req)
-}
-
-func (c *Client) do(ctx context.Context, req *http.Request) (*http.Response, error) {
- res, err := c.httpClient().Do(req.WithContext(ctx))
- if err != nil {
- select {
- case <-ctx.Done():
- // Prefer the unadorned context error.
- // (The acme package had tests assuming this, previously from ctxhttp's
- // behavior, predating net/http supporting contexts natively)
- // TODO(bradfitz): reconsider this in the future. But for now this
- // requires no test updates.
- return nil, ctx.Err()
- default:
- return nil, err
- }
- }
- return res, nil
-}
-
-func (c *Client) fetchNonce(ctx context.Context, url string) (string, error) {
- resp, err := c.head(ctx, url)
- if err != nil {
- return "", err
- }
- defer resp.Body.Close()
- nonce := nonceFromHeader(resp.Header)
- if nonce == "" {
- if resp.StatusCode > 299 {
- return "", responseError(resp)
- }
- return "", errors.New("acme: nonce not found")
- }
- return nonce, nil
-}
-
-func nonceFromHeader(h http.Header) string {
- return h.Get("Replay-Nonce")
-}
-
-func (c *Client) responseCert(ctx context.Context, res *http.Response, bundle bool) ([][]byte, error) {
- b, err := ioutil.ReadAll(io.LimitReader(res.Body, maxCertSize+1))
- if err != nil {
- return nil, fmt.Errorf("acme: response stream: %v", err)
- }
- if len(b) > maxCertSize {
- return nil, errors.New("acme: certificate is too big")
- }
- cert := [][]byte{b}
- if !bundle {
- return cert, nil
- }
-
- // Append CA chain cert(s).
- // At least one is required according to the spec:
- // https://tools.ietf.org/html/draft-ietf-acme-acme-03#section-6.3.1
- up := linkHeader(res.Header, "up")
- if len(up) == 0 {
- return nil, errors.New("acme: rel=up link not found")
- }
- if len(up) > maxChainLen {
- return nil, errors.New("acme: rel=up link is too large")
- }
- for _, url := range up {
- cc, err := c.chainCert(ctx, url, 0)
- if err != nil {
- return nil, err
- }
- cert = append(cert, cc...)
- }
- return cert, nil
-}
-
-// responseError creates an error of Error type from resp.
-func responseError(resp *http.Response) error {
- // don't care if ReadAll returns an error:
- // json.Unmarshal will fail in that case anyway
- b, _ := ioutil.ReadAll(resp.Body)
- e := &wireError{Status: resp.StatusCode}
- if err := json.Unmarshal(b, e); err != nil {
- // this is not a regular error response:
- // populate detail with anything we received,
- // e.Status will already contain HTTP response code value
- e.Detail = string(b)
- if e.Detail == "" {
- e.Detail = resp.Status
- }
- }
- return e.error(resp.Header)
-}
-
-// chainCert fetches CA certificate chain recursively by following "up" links.
-// Each recursive call increments the depth by 1, resulting in an error
-// if the recursion level reaches maxChainLen.
-//
-// First chainCert call starts with depth of 0.
-func (c *Client) chainCert(ctx context.Context, url string, depth int) ([][]byte, error) {
- if depth >= maxChainLen {
- return nil, errors.New("acme: certificate chain is too deep")
- }
-
- res, err := c.get(ctx, url)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK {
- return nil, responseError(res)
- }
- b, err := ioutil.ReadAll(io.LimitReader(res.Body, maxCertSize+1))
- if err != nil {
- return nil, err
- }
- if len(b) > maxCertSize {
- return nil, errors.New("acme: certificate is too big")
- }
- chain := [][]byte{b}
-
- uplink := linkHeader(res.Header, "up")
- if len(uplink) > maxChainLen {
- return nil, errors.New("acme: certificate chain is too large")
- }
- for _, up := range uplink {
- cc, err := c.chainCert(ctx, up, depth+1)
- if err != nil {
- return nil, err
- }
- chain = append(chain, cc...)
- }
-
- return chain, nil
-}
-
-// linkHeader returns URI-Reference values of all Link headers
-// with relation-type rel.
-// See https://tools.ietf.org/html/rfc5988#section-5 for details.
-func linkHeader(h http.Header, rel string) []string {
- var links []string
- for _, v := range h["Link"] {
- parts := strings.Split(v, ";")
- for _, p := range parts {
- p = strings.TrimSpace(p)
- if !strings.HasPrefix(p, "rel=") {
- continue
- }
- if v := strings.Trim(p[4:], `"`); v == rel {
- links = append(links, strings.Trim(parts[0], "<>"))
- }
- }
- }
- return links
-}
-
-// sleeper returns a function that accepts the Retry-After HTTP header value
-// and an increment that's used with backoff to increasingly sleep on
-// consecutive calls until the context is done. If the Retry-After header
-// cannot be parsed, then backoff is used with a maximum sleep time of 10
-// seconds.
-func sleeper(ctx context.Context) func(ra string, inc int) error {
- var count int
- return func(ra string, inc int) error {
- count += inc
- d := backoff(count, 10*time.Second)
- d = retryAfter(ra, d)
- wakeup := time.NewTimer(d)
- defer wakeup.Stop()
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-wakeup.C:
- return nil
- }
- }
-}
-
-// retryAfter parses a Retry-After HTTP header value,
-// trying to convert v into an int (seconds) or use http.ParseTime otherwise.
-// It returns d if v cannot be parsed.
-func retryAfter(v string, d time.Duration) time.Duration {
- if i, err := strconv.Atoi(v); err == nil {
- return time.Duration(i) * time.Second
- }
- t, err := http.ParseTime(v)
- if err != nil {
- return d
- }
- return t.Sub(timeNow())
-}
-
-// backoff computes a duration after which an n+1 retry iteration should occur
-// using truncated exponential backoff algorithm.
-//
-// The n argument is always bounded between 0 and 30.
-// The max argument defines upper bound for the returned value.
-func backoff(n int, max time.Duration) time.Duration {
- if n < 0 {
- n = 0
- }
- if n > 30 {
- n = 30
- }
- var d time.Duration
- if x, err := rand.Int(rand.Reader, big.NewInt(1000)); err == nil {
- d = time.Duration(x.Int64()) * time.Millisecond
- }
- d += time.Duration(1<<uint(n)) * time.Second
- if d > max {
- return max
- }
- return d
-}
-
-// keyAuth generates a key authorization string for a given token.
-func keyAuth(pub crypto.PublicKey, token string) (string, error) {
- th, err := JWKThumbprint(pub)
- if err != nil {
- return "", err
- }
- return fmt.Sprintf("%s.%s", token, th), nil
-}
-
-// tlsChallengeCert creates a temporary certificate for TLS-SNI challenges
-// with the given SANs and auto-generated public/private key pair.
-// The Subject Common Name is set to the first SAN to aid debugging.
-// To create a cert with a custom key pair, specify WithKey option.
-func tlsChallengeCert(san []string, opt []CertOption) (tls.Certificate, error) {
- var (
- key crypto.Signer
- tmpl *x509.Certificate
- )
- for _, o := range opt {
- switch o := o.(type) {
- case *certOptKey:
- if key != nil {
- return tls.Certificate{}, errors.New("acme: duplicate key option")
- }
- key = o.key
- case *certOptTemplate:
- var t = *(*x509.Certificate)(o) // shallow copy is ok
- tmpl = &t
- default:
- // package's fault, if we let this happen:
- panic(fmt.Sprintf("unsupported option type %T", o))
- }
- }
- if key == nil {
- var err error
- if key, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader); err != nil {
- return tls.Certificate{}, err
- }
- }
- if tmpl == nil {
- tmpl = &x509.Certificate{
- SerialNumber: big.NewInt(1),
- NotBefore: time.Now(),
- NotAfter: time.Now().Add(24 * time.Hour),
- BasicConstraintsValid: true,
- KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
- ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
- }
- }
- tmpl.DNSNames = san
- if len(san) > 0 {
- tmpl.Subject.CommonName = san[0]
- }
-
- der, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, key.Public(), key)
- if err != nil {
- return tls.Certificate{}, err
- }
- return tls.Certificate{
- Certificate: [][]byte{der},
- PrivateKey: key,
- }, nil
-}
-
-// encodePEM returns b encoded as PEM with block of type typ.
-func encodePEM(typ string, b []byte) []byte {
- pb := &pem.Block{Type: typ, Bytes: b}
- return pem.EncodeToMemory(pb)
-}
-
-// timeNow is useful for testing for fixed current time.
-var timeNow = time.Now
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme_test.go
deleted file mode 100644
index b44af5959..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/acme_test.go
+++ /dev/null
@@ -1,1352 +0,0 @@
-// Copyright 2015 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 file.
-
-package acme
-
-import (
- "bytes"
- "context"
- "crypto/rand"
- "crypto/rsa"
- "crypto/tls"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "math/big"
- "net/http"
- "net/http/httptest"
- "reflect"
- "sort"
- "strings"
- "testing"
- "time"
-)
-
-// Decodes a JWS-encoded request and unmarshals the decoded JSON into a provided
-// interface.
-func decodeJWSRequest(t *testing.T, v interface{}, r *http.Request) {
- // Decode request
- var req struct{ Payload string }
- if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
- t.Fatal(err)
- }
- payload, err := base64.RawURLEncoding.DecodeString(req.Payload)
- if err != nil {
- t.Fatal(err)
- }
- err = json.Unmarshal(payload, v)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-type jwsHead struct {
- Alg string
- Nonce string
- JWK map[string]string `json:"jwk"`
-}
-
-func decodeJWSHead(r *http.Request) (*jwsHead, error) {
- var req struct{ Protected string }
- if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
- return nil, err
- }
- b, err := base64.RawURLEncoding.DecodeString(req.Protected)
- if err != nil {
- return nil, err
- }
- var head jwsHead
- if err := json.Unmarshal(b, &head); err != nil {
- return nil, err
- }
- return &head, nil
-}
-
-func TestDiscover(t *testing.T) {
- const (
- reg = "https://example.com/acme/new-reg"
- authz = "https://example.com/acme/new-authz"
- cert = "https://example.com/acme/new-cert"
- revoke = "https://example.com/acme/revoke-cert"
- )
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json")
- fmt.Fprintf(w, `{
- "new-reg": %q,
- "new-authz": %q,
- "new-cert": %q,
- "revoke-cert": %q
- }`, reg, authz, cert, revoke)
- }))
- defer ts.Close()
- c := Client{DirectoryURL: ts.URL}
- dir, err := c.Discover(context.Background())
- if err != nil {
- t.Fatal(err)
- }
- if dir.RegURL != reg {
- t.Errorf("dir.RegURL = %q; want %q", dir.RegURL, reg)
- }
- if dir.AuthzURL != authz {
- t.Errorf("dir.AuthzURL = %q; want %q", dir.AuthzURL, authz)
- }
- if dir.CertURL != cert {
- t.Errorf("dir.CertURL = %q; want %q", dir.CertURL, cert)
- }
- if dir.RevokeURL != revoke {
- t.Errorf("dir.RevokeURL = %q; want %q", dir.RevokeURL, revoke)
- }
-}
-
-func TestRegister(t *testing.T) {
- contacts := []string{"mailto:admin@example.com"}
-
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string
- Contact []string
- Agreement string
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "new-reg" {
- t.Errorf("j.Resource = %q; want new-reg", j.Resource)
- }
- if !reflect.DeepEqual(j.Contact, contacts) {
- t.Errorf("j.Contact = %v; want %v", j.Contact, contacts)
- }
-
- w.Header().Set("Location", "https://ca.tld/acme/reg/1")
- w.Header().Set("Link", `<https://ca.tld/acme/new-authz>;rel="next"`)
- w.Header().Add("Link", `<https://ca.tld/acme/recover-reg>;rel="recover"`)
- w.Header().Add("Link", `<https://ca.tld/acme/terms>;rel="terms-of-service"`)
- w.WriteHeader(http.StatusCreated)
- b, _ := json.Marshal(contacts)
- fmt.Fprintf(w, `{"contact": %s}`, b)
- }))
- defer ts.Close()
-
- prompt := func(url string) bool {
- const terms = "https://ca.tld/acme/terms"
- if url != terms {
- t.Errorf("prompt url = %q; want %q", url, terms)
- }
- return false
- }
-
- c := Client{Key: testKeyEC, dir: &Directory{RegURL: ts.URL}}
- a := &Account{Contact: contacts}
- var err error
- if a, err = c.Register(context.Background(), a, prompt); err != nil {
- t.Fatal(err)
- }
- if a.URI != "https://ca.tld/acme/reg/1" {
- t.Errorf("a.URI = %q; want https://ca.tld/acme/reg/1", a.URI)
- }
- if a.Authz != "https://ca.tld/acme/new-authz" {
- t.Errorf("a.Authz = %q; want https://ca.tld/acme/new-authz", a.Authz)
- }
- if a.CurrentTerms != "https://ca.tld/acme/terms" {
- t.Errorf("a.CurrentTerms = %q; want https://ca.tld/acme/terms", a.CurrentTerms)
- }
- if !reflect.DeepEqual(a.Contact, contacts) {
- t.Errorf("a.Contact = %v; want %v", a.Contact, contacts)
- }
-}
-
-func TestUpdateReg(t *testing.T) {
- const terms = "https://ca.tld/acme/terms"
- contacts := []string{"mailto:admin@example.com"}
-
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string
- Contact []string
- Agreement string
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "reg" {
- t.Errorf("j.Resource = %q; want reg", j.Resource)
- }
- if j.Agreement != terms {
- t.Errorf("j.Agreement = %q; want %q", j.Agreement, terms)
- }
- if !reflect.DeepEqual(j.Contact, contacts) {
- t.Errorf("j.Contact = %v; want %v", j.Contact, contacts)
- }
-
- w.Header().Set("Link", `<https://ca.tld/acme/new-authz>;rel="next"`)
- w.Header().Add("Link", `<https://ca.tld/acme/recover-reg>;rel="recover"`)
- w.Header().Add("Link", fmt.Sprintf(`<%s>;rel="terms-of-service"`, terms))
- w.WriteHeader(http.StatusOK)
- b, _ := json.Marshal(contacts)
- fmt.Fprintf(w, `{"contact":%s, "agreement":%q}`, b, terms)
- }))
- defer ts.Close()
-
- c := Client{Key: testKeyEC}
- a := &Account{URI: ts.URL, Contact: contacts, AgreedTerms: terms}
- var err error
- if a, err = c.UpdateReg(context.Background(), a); err != nil {
- t.Fatal(err)
- }
- if a.Authz != "https://ca.tld/acme/new-authz" {
- t.Errorf("a.Authz = %q; want https://ca.tld/acme/new-authz", a.Authz)
- }
- if a.AgreedTerms != terms {
- t.Errorf("a.AgreedTerms = %q; want %q", a.AgreedTerms, terms)
- }
- if a.CurrentTerms != terms {
- t.Errorf("a.CurrentTerms = %q; want %q", a.CurrentTerms, terms)
- }
- if a.URI != ts.URL {
- t.Errorf("a.URI = %q; want %q", a.URI, ts.URL)
- }
-}
-
-func TestGetReg(t *testing.T) {
- const terms = "https://ca.tld/acme/terms"
- const newTerms = "https://ca.tld/acme/new-terms"
- contacts := []string{"mailto:admin@example.com"}
-
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string
- Contact []string
- Agreement string
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "reg" {
- t.Errorf("j.Resource = %q; want reg", j.Resource)
- }
- if len(j.Contact) != 0 {
- t.Errorf("j.Contact = %v", j.Contact)
- }
- if j.Agreement != "" {
- t.Errorf("j.Agreement = %q", j.Agreement)
- }
-
- w.Header().Set("Link", `<https://ca.tld/acme/new-authz>;rel="next"`)
- w.Header().Add("Link", `<https://ca.tld/acme/recover-reg>;rel="recover"`)
- w.Header().Add("Link", fmt.Sprintf(`<%s>;rel="terms-of-service"`, newTerms))
- w.WriteHeader(http.StatusOK)
- b, _ := json.Marshal(contacts)
- fmt.Fprintf(w, `{"contact":%s, "agreement":%q}`, b, terms)
- }))
- defer ts.Close()
-
- c := Client{Key: testKeyEC}
- a, err := c.GetReg(context.Background(), ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- if a.Authz != "https://ca.tld/acme/new-authz" {
- t.Errorf("a.AuthzURL = %q; want https://ca.tld/acme/new-authz", a.Authz)
- }
- if a.AgreedTerms != terms {
- t.Errorf("a.AgreedTerms = %q; want %q", a.AgreedTerms, terms)
- }
- if a.CurrentTerms != newTerms {
- t.Errorf("a.CurrentTerms = %q; want %q", a.CurrentTerms, newTerms)
- }
- if a.URI != ts.URL {
- t.Errorf("a.URI = %q; want %q", a.URI, ts.URL)
- }
-}
-
-func TestAuthorize(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string
- Identifier struct {
- Type string
- Value string
- }
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "new-authz" {
- t.Errorf("j.Resource = %q; want new-authz", j.Resource)
- }
- if j.Identifier.Type != "dns" {
- t.Errorf("j.Identifier.Type = %q; want dns", j.Identifier.Type)
- }
- if j.Identifier.Value != "example.com" {
- t.Errorf("j.Identifier.Value = %q; want example.com", j.Identifier.Value)
- }
-
- w.Header().Set("Location", "https://ca.tld/acme/auth/1")
- w.WriteHeader(http.StatusCreated)
- fmt.Fprintf(w, `{
- "identifier": {"type":"dns","value":"example.com"},
- "status":"pending",
- "challenges":[
- {
- "type":"http-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id1",
- "token":"token1"
- },
- {
- "type":"tls-sni-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id2",
- "token":"token2"
- }
- ],
- "combinations":[[0],[1]]}`)
- }))
- defer ts.Close()
-
- cl := Client{Key: testKeyEC, dir: &Directory{AuthzURL: ts.URL}}
- auth, err := cl.Authorize(context.Background(), "example.com")
- if err != nil {
- t.Fatal(err)
- }
-
- if auth.URI != "https://ca.tld/acme/auth/1" {
- t.Errorf("URI = %q; want https://ca.tld/acme/auth/1", auth.URI)
- }
- if auth.Status != "pending" {
- t.Errorf("Status = %q; want pending", auth.Status)
- }
- if auth.Identifier.Type != "dns" {
- t.Errorf("Identifier.Type = %q; want dns", auth.Identifier.Type)
- }
- if auth.Identifier.Value != "example.com" {
- t.Errorf("Identifier.Value = %q; want example.com", auth.Identifier.Value)
- }
-
- if n := len(auth.Challenges); n != 2 {
- t.Fatalf("len(auth.Challenges) = %d; want 2", n)
- }
-
- c := auth.Challenges[0]
- if c.Type != "http-01" {
- t.Errorf("c.Type = %q; want http-01", c.Type)
- }
- if c.URI != "https://ca.tld/acme/challenge/publickey/id1" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI)
- }
- if c.Token != "token1" {
- t.Errorf("c.Token = %q; want token1", c.Token)
- }
-
- c = auth.Challenges[1]
- if c.Type != "tls-sni-01" {
- t.Errorf("c.Type = %q; want tls-sni-01", c.Type)
- }
- if c.URI != "https://ca.tld/acme/challenge/publickey/id2" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id2", c.URI)
- }
- if c.Token != "token2" {
- t.Errorf("c.Token = %q; want token2", c.Token)
- }
-
- combs := [][]int{{0}, {1}}
- if !reflect.DeepEqual(auth.Combinations, combs) {
- t.Errorf("auth.Combinations: %+v\nwant: %+v\n", auth.Combinations, combs)
- }
-}
-
-func TestAuthorizeValid(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "nonce")
- return
- }
- w.WriteHeader(http.StatusCreated)
- w.Write([]byte(`{"status":"valid"}`))
- }))
- defer ts.Close()
- client := Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}}
- _, err := client.Authorize(context.Background(), "example.com")
- if err != nil {
- t.Errorf("err = %v", err)
- }
-}
-
-func TestGetAuthorization(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("r.Method = %q; want GET", r.Method)
- }
-
- w.WriteHeader(http.StatusOK)
- fmt.Fprintf(w, `{
- "identifier": {"type":"dns","value":"example.com"},
- "status":"pending",
- "challenges":[
- {
- "type":"http-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id1",
- "token":"token1"
- },
- {
- "type":"tls-sni-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id2",
- "token":"token2"
- }
- ],
- "combinations":[[0],[1]]}`)
- }))
- defer ts.Close()
-
- cl := Client{Key: testKeyEC}
- auth, err := cl.GetAuthorization(context.Background(), ts.URL)
- if err != nil {
- t.Fatal(err)
- }
-
- if auth.Status != "pending" {
- t.Errorf("Status = %q; want pending", auth.Status)
- }
- if auth.Identifier.Type != "dns" {
- t.Errorf("Identifier.Type = %q; want dns", auth.Identifier.Type)
- }
- if auth.Identifier.Value != "example.com" {
- t.Errorf("Identifier.Value = %q; want example.com", auth.Identifier.Value)
- }
-
- if n := len(auth.Challenges); n != 2 {
- t.Fatalf("len(set.Challenges) = %d; want 2", n)
- }
-
- c := auth.Challenges[0]
- if c.Type != "http-01" {
- t.Errorf("c.Type = %q; want http-01", c.Type)
- }
- if c.URI != "https://ca.tld/acme/challenge/publickey/id1" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI)
- }
- if c.Token != "token1" {
- t.Errorf("c.Token = %q; want token1", c.Token)
- }
-
- c = auth.Challenges[1]
- if c.Type != "tls-sni-01" {
- t.Errorf("c.Type = %q; want tls-sni-01", c.Type)
- }
- if c.URI != "https://ca.tld/acme/challenge/publickey/id2" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id2", c.URI)
- }
- if c.Token != "token2" {
- t.Errorf("c.Token = %q; want token2", c.Token)
- }
-
- combs := [][]int{{0}, {1}}
- if !reflect.DeepEqual(auth.Combinations, combs) {
- t.Errorf("auth.Combinations: %+v\nwant: %+v\n", auth.Combinations, combs)
- }
-}
-
-func TestWaitAuthorization(t *testing.T) {
- var count int
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- count++
- w.Header().Set("Retry-After", "0")
- if count > 1 {
- fmt.Fprintf(w, `{"status":"valid"}`)
- return
- }
- fmt.Fprintf(w, `{"status":"pending"}`)
- }))
- defer ts.Close()
-
- type res struct {
- authz *Authorization
- err error
- }
- done := make(chan res)
- defer close(done)
- go func() {
- var client Client
- a, err := client.WaitAuthorization(context.Background(), ts.URL)
- done <- res{a, err}
- }()
-
- select {
- case <-time.After(5 * time.Second):
- t.Fatal("WaitAuthz took too long to return")
- case res := <-done:
- if res.err != nil {
- t.Fatalf("res.err = %v", res.err)
- }
- if res.authz == nil {
- t.Fatal("res.authz is nil")
- }
- }
-}
-
-func TestWaitAuthorizationInvalid(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, `{"status":"invalid"}`)
- }))
- defer ts.Close()
-
- res := make(chan error)
- defer close(res)
- go func() {
- var client Client
- _, err := client.WaitAuthorization(context.Background(), ts.URL)
- res <- err
- }()
-
- select {
- case <-time.After(3 * time.Second):
- t.Fatal("WaitAuthz took too long to return")
- case err := <-res:
- if err == nil {
- t.Error("err is nil")
- }
- if _, ok := err.(*AuthorizationError); !ok {
- t.Errorf("err is %T; want *AuthorizationError", err)
- }
- }
-}
-
-func TestWaitAuthorizationCancel(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Retry-After", "60")
- fmt.Fprintf(w, `{"status":"pending"}`)
- }))
- defer ts.Close()
-
- res := make(chan error)
- defer close(res)
- go func() {
- var client Client
- ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond)
- defer cancel()
- _, err := client.WaitAuthorization(ctx, ts.URL)
- res <- err
- }()
-
- select {
- case <-time.After(time.Second):
- t.Fatal("WaitAuthz took too long to return")
- case err := <-res:
- if err == nil {
- t.Error("err is nil")
- }
- }
-}
-
-func TestRevokeAuthorization(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "nonce")
- return
- }
- switch r.URL.Path {
- case "/1":
- var req struct {
- Resource string
- Status string
- Delete bool
- }
- decodeJWSRequest(t, &req, r)
- if req.Resource != "authz" {
- t.Errorf("req.Resource = %q; want authz", req.Resource)
- }
- if req.Status != "deactivated" {
- t.Errorf("req.Status = %q; want deactivated", req.Status)
- }
- if !req.Delete {
- t.Errorf("req.Delete is false")
- }
- case "/2":
- w.WriteHeader(http.StatusInternalServerError)
- }
- }))
- defer ts.Close()
- client := &Client{Key: testKey}
- ctx := context.Background()
- if err := client.RevokeAuthorization(ctx, ts.URL+"/1"); err != nil {
- t.Errorf("err = %v", err)
- }
- if client.RevokeAuthorization(ctx, ts.URL+"/2") == nil {
- t.Error("nil error")
- }
-}
-
-func TestPollChallenge(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("r.Method = %q; want GET", r.Method)
- }
-
- w.WriteHeader(http.StatusOK)
- fmt.Fprintf(w, `{
- "type":"http-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id1",
- "token":"token1"}`)
- }))
- defer ts.Close()
-
- cl := Client{Key: testKeyEC}
- chall, err := cl.GetChallenge(context.Background(), ts.URL)
- if err != nil {
- t.Fatal(err)
- }
-
- if chall.Status != "pending" {
- t.Errorf("Status = %q; want pending", chall.Status)
- }
- if chall.Type != "http-01" {
- t.Errorf("c.Type = %q; want http-01", chall.Type)
- }
- if chall.URI != "https://ca.tld/acme/challenge/publickey/id1" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", chall.URI)
- }
- if chall.Token != "token1" {
- t.Errorf("c.Token = %q; want token1", chall.Token)
- }
-}
-
-func TestAcceptChallenge(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string
- Type string
- Auth string `json:"keyAuthorization"`
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "challenge" {
- t.Errorf(`resource = %q; want "challenge"`, j.Resource)
- }
- if j.Type != "http-01" {
- t.Errorf(`type = %q; want "http-01"`, j.Type)
- }
- keyAuth := "token1." + testKeyECThumbprint
- if j.Auth != keyAuth {
- t.Errorf(`keyAuthorization = %q; want %q`, j.Auth, keyAuth)
- }
-
- // Respond to request
- w.WriteHeader(http.StatusAccepted)
- fmt.Fprintf(w, `{
- "type":"http-01",
- "status":"pending",
- "uri":"https://ca.tld/acme/challenge/publickey/id1",
- "token":"token1",
- "keyAuthorization":%q
- }`, keyAuth)
- }))
- defer ts.Close()
-
- cl := Client{Key: testKeyEC}
- c, err := cl.Accept(context.Background(), &Challenge{
- URI: ts.URL,
- Token: "token1",
- Type: "http-01",
- })
- if err != nil {
- t.Fatal(err)
- }
-
- if c.Type != "http-01" {
- t.Errorf("c.Type = %q; want http-01", c.Type)
- }
- if c.URI != "https://ca.tld/acme/challenge/publickey/id1" {
- t.Errorf("c.URI = %q; want https://ca.tld/acme/challenge/publickey/id1", c.URI)
- }
- if c.Token != "token1" {
- t.Errorf("c.Token = %q; want token1", c.Token)
- }
-}
-
-func TestNewCert(t *testing.T) {
- notBefore := time.Now()
- notAfter := notBefore.AddDate(0, 2, 0)
- timeNow = func() time.Time { return notBefore }
-
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "test-nonce")
- return
- }
- if r.Method != "POST" {
- t.Errorf("r.Method = %q; want POST", r.Method)
- }
-
- var j struct {
- Resource string `json:"resource"`
- CSR string `json:"csr"`
- NotBefore string `json:"notBefore,omitempty"`
- NotAfter string `json:"notAfter,omitempty"`
- }
- decodeJWSRequest(t, &j, r)
-
- // Test request
- if j.Resource != "new-cert" {
- t.Errorf(`resource = %q; want "new-cert"`, j.Resource)
- }
- if j.NotBefore != notBefore.Format(time.RFC3339) {
- t.Errorf(`notBefore = %q; wanted %q`, j.NotBefore, notBefore.Format(time.RFC3339))
- }
- if j.NotAfter != notAfter.Format(time.RFC3339) {
- t.Errorf(`notAfter = %q; wanted %q`, j.NotAfter, notAfter.Format(time.RFC3339))
- }
-
- // Respond to request
- template := x509.Certificate{
- SerialNumber: big.NewInt(int64(1)),
- Subject: pkix.Name{
- Organization: []string{"goacme"},
- },
- NotBefore: notBefore,
- NotAfter: notAfter,
-
- KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
- ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
- BasicConstraintsValid: true,
- }
-
- sampleCert, err := x509.CreateCertificate(rand.Reader, &template, &template, &testKeyEC.PublicKey, testKeyEC)
- if err != nil {
- t.Fatalf("Error creating certificate: %v", err)
- }
-
- w.Header().Set("Location", "https://ca.tld/acme/cert/1")
- w.WriteHeader(http.StatusCreated)
- w.Write(sampleCert)
- }))
- defer ts.Close()
-
- csr := x509.CertificateRequest{
- Version: 0,
- Subject: pkix.Name{
- CommonName: "example.com",
- Organization: []string{"goacme"},
- },
- }
- csrb, err := x509.CreateCertificateRequest(rand.Reader, &csr, testKeyEC)
- if err != nil {
- t.Fatal(err)
- }
-
- c := Client{Key: testKeyEC, dir: &Directory{CertURL: ts.URL}}
- cert, certURL, err := c.CreateCert(context.Background(), csrb, notAfter.Sub(notBefore), false)
- if err != nil {
- t.Fatal(err)
- }
- if cert == nil {
- t.Errorf("cert is nil")
- }
- if certURL != "https://ca.tld/acme/cert/1" {
- t.Errorf("certURL = %q; want https://ca.tld/acme/cert/1", certURL)
- }
-}
-
-func TestFetchCert(t *testing.T) {
- var count byte
- var ts *httptest.Server
- ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- count++
- if count < 3 {
- up := fmt.Sprintf("<%s>;rel=up", ts.URL)
- w.Header().Set("Link", up)
- }
- w.Write([]byte{count})
- }))
- defer ts.Close()
- res, err := (&Client{}).FetchCert(context.Background(), ts.URL, true)
- if err != nil {
- t.Fatalf("FetchCert: %v", err)
- }
- cert := [][]byte{{1}, {2}, {3}}
- if !reflect.DeepEqual(res, cert) {
- t.Errorf("res = %v; want %v", res, cert)
- }
-}
-
-func TestFetchCertRetry(t *testing.T) {
- var count int
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if count < 1 {
- w.Header().Set("Retry-After", "0")
- w.WriteHeader(http.StatusAccepted)
- count++
- return
- }
- w.Write([]byte{1})
- }))
- defer ts.Close()
- res, err := (&Client{}).FetchCert(context.Background(), ts.URL, false)
- if err != nil {
- t.Fatalf("FetchCert: %v", err)
- }
- cert := [][]byte{{1}}
- if !reflect.DeepEqual(res, cert) {
- t.Errorf("res = %v; want %v", res, cert)
- }
-}
-
-func TestFetchCertCancel(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Retry-After", "0")
- w.WriteHeader(http.StatusAccepted)
- }))
- defer ts.Close()
- ctx, cancel := context.WithCancel(context.Background())
- done := make(chan struct{})
- var err error
- go func() {
- _, err = (&Client{}).FetchCert(ctx, ts.URL, false)
- close(done)
- }()
- cancel()
- <-done
- if err != context.Canceled {
- t.Errorf("err = %v; want %v", err, context.Canceled)
- }
-}
-
-func TestFetchCertDepth(t *testing.T) {
- var count byte
- var ts *httptest.Server
- ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- count++
- if count > maxChainLen+1 {
- t.Errorf("count = %d; want at most %d", count, maxChainLen+1)
- w.WriteHeader(http.StatusInternalServerError)
- }
- w.Header().Set("Link", fmt.Sprintf("<%s>;rel=up", ts.URL))
- w.Write([]byte{count})
- }))
- defer ts.Close()
- _, err := (&Client{}).FetchCert(context.Background(), ts.URL, true)
- if err == nil {
- t.Errorf("err is nil")
- }
-}
-
-func TestFetchCertBreadth(t *testing.T) {
- var ts *httptest.Server
- ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- for i := 0; i < maxChainLen+1; i++ {
- w.Header().Add("Link", fmt.Sprintf("<%s>;rel=up", ts.URL))
- }
- w.Write([]byte{1})
- }))
- defer ts.Close()
- _, err := (&Client{}).FetchCert(context.Background(), ts.URL, true)
- if err == nil {
- t.Errorf("err is nil")
- }
-}
-
-func TestFetchCertSize(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- b := bytes.Repeat([]byte{1}, maxCertSize+1)
- w.Write(b)
- }))
- defer ts.Close()
- _, err := (&Client{}).FetchCert(context.Background(), ts.URL, false)
- if err == nil {
- t.Errorf("err is nil")
- }
-}
-
-func TestRevokeCert(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- w.Header().Set("Replay-Nonce", "nonce")
- return
- }
-
- var req struct {
- Resource string
- Certificate string
- Reason int
- }
- decodeJWSRequest(t, &req, r)
- if req.Resource != "revoke-cert" {
- t.Errorf("req.Resource = %q; want revoke-cert", req.Resource)
- }
- if req.Reason != 1 {
- t.Errorf("req.Reason = %d; want 1", req.Reason)
- }
- // echo -n cert | base64 | tr -d '=' | tr '/+' '_-'
- cert := "Y2VydA"
- if req.Certificate != cert {
- t.Errorf("req.Certificate = %q; want %q", req.Certificate, cert)
- }
- }))
- defer ts.Close()
- client := &Client{
- Key: testKeyEC,
- dir: &Directory{RevokeURL: ts.URL},
- }
- ctx := context.Background()
- if err := client.RevokeCert(ctx, nil, []byte("cert"), CRLReasonKeyCompromise); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestNonce_add(t *testing.T) {
- var c Client
- c.addNonce(http.Header{"Replay-Nonce": {"nonce"}})
- c.addNonce(http.Header{"Replay-Nonce": {}})
- c.addNonce(http.Header{"Replay-Nonce": {"nonce"}})
-
- nonces := map[string]struct{}{"nonce": struct{}{}}
- if !reflect.DeepEqual(c.nonces, nonces) {
- t.Errorf("c.nonces = %q; want %q", c.nonces, nonces)
- }
-}
-
-func TestNonce_addMax(t *testing.T) {
- c := &Client{nonces: make(map[string]struct{})}
- for i := 0; i < maxNonces; i++ {
- c.nonces[fmt.Sprintf("%d", i)] = struct{}{}
- }
- c.addNonce(http.Header{"Replay-Nonce": {"nonce"}})
- if n := len(c.nonces); n != maxNonces {
- t.Errorf("len(c.nonces) = %d; want %d", n, maxNonces)
- }
-}
-
-func TestNonce_fetch(t *testing.T) {
- tests := []struct {
- code int
- nonce string
- }{
- {http.StatusOK, "nonce1"},
- {http.StatusBadRequest, "nonce2"},
- {http.StatusOK, ""},
- }
- var i int
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "HEAD" {
- t.Errorf("%d: r.Method = %q; want HEAD", i, r.Method)
- }
- w.Header().Set("Replay-Nonce", tests[i].nonce)
- w.WriteHeader(tests[i].code)
- }))
- defer ts.Close()
- for ; i < len(tests); i++ {
- test := tests[i]
- c := &Client{}
- n, err := c.fetchNonce(context.Background(), ts.URL)
- if n != test.nonce {
- t.Errorf("%d: n=%q; want %q", i, n, test.nonce)
- }
- switch {
- case err == nil && test.nonce == "":
- t.Errorf("%d: n=%q, err=%v; want non-nil error", i, n, err)
- case err != nil && test.nonce != "":
- t.Errorf("%d: n=%q, err=%v; want %q", i, n, err, test.nonce)
- }
- }
-}
-
-func TestNonce_fetchError(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusTooManyRequests)
- }))
- defer ts.Close()
- c := &Client{}
- _, err := c.fetchNonce(context.Background(), ts.URL)
- e, ok := err.(*Error)
- if !ok {
- t.Fatalf("err is %T; want *Error", err)
- }
- if e.StatusCode != http.StatusTooManyRequests {
- t.Errorf("e.StatusCode = %d; want %d", e.StatusCode, http.StatusTooManyRequests)
- }
-}
-
-func TestNonce_postJWS(t *testing.T) {
- var count int
- seen := make(map[string]bool)
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- count++
- w.Header().Set("Replay-Nonce", fmt.Sprintf("nonce%d", count))
- if r.Method == "HEAD" {
- // We expect the client do a HEAD request
- // but only to fetch the first nonce.
- return
- }
- // Make client.Authorize happy; we're not testing its result.
- defer func() {
- w.WriteHeader(http.StatusCreated)
- w.Write([]byte(`{"status":"valid"}`))
- }()
-
- head, err := decodeJWSHead(r)
- if err != nil {
- t.Errorf("decodeJWSHead: %v", err)
- return
- }
- if head.Nonce == "" {
- t.Error("head.Nonce is empty")
- return
- }
- if seen[head.Nonce] {
- t.Errorf("nonce is already used: %q", head.Nonce)
- }
- seen[head.Nonce] = true
- }))
- defer ts.Close()
-
- client := Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}}
- if _, err := client.Authorize(context.Background(), "example.com"); err != nil {
- t.Errorf("client.Authorize 1: %v", err)
- }
- // The second call should not generate another extra HEAD request.
- if _, err := client.Authorize(context.Background(), "example.com"); err != nil {
- t.Errorf("client.Authorize 2: %v", err)
- }
-
- if count != 3 {
- t.Errorf("total requests count: %d; want 3", count)
- }
- if n := len(client.nonces); n != 1 {
- t.Errorf("len(client.nonces) = %d; want 1", n)
- }
- for k := range seen {
- if _, exist := client.nonces[k]; exist {
- t.Errorf("used nonce %q in client.nonces", k)
- }
- }
-}
-
-func TestRetryPostJWS(t *testing.T) {
- var count int
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- count++
- w.Header().Set("Replay-Nonce", fmt.Sprintf("nonce%d", count))
- if r.Method == "HEAD" {
- // We expect the client to do 2 head requests to fetch
- // nonces, one to start and another after getting badNonce
- return
- }
-
- head, err := decodeJWSHead(r)
- if err != nil {
- t.Errorf("decodeJWSHead: %v", err)
- } else if head.Nonce == "" {
- t.Error("head.Nonce is empty")
- } else if head.Nonce == "nonce1" {
- // return a badNonce error to force the call to retry
- w.WriteHeader(http.StatusBadRequest)
- w.Write([]byte(`{"type":"urn:ietf:params:acme:error:badNonce"}`))
- return
- }
- // Make client.Authorize happy; we're not testing its result.
- w.WriteHeader(http.StatusCreated)
- w.Write([]byte(`{"status":"valid"}`))
- }))
- defer ts.Close()
-
- client := Client{Key: testKey, dir: &Directory{AuthzURL: ts.URL}}
- // This call will fail with badNonce, causing a retry
- if _, err := client.Authorize(context.Background(), "example.com"); err != nil {
- t.Errorf("client.Authorize 1: %v", err)
- }
- if count != 4 {
- t.Errorf("total requests count: %d; want 4", count)
- }
-}
-
-func TestLinkHeader(t *testing.T) {
- h := http.Header{"Link": {
- `<https://example.com/acme/new-authz>;rel="next"`,
- `<https://example.com/acme/recover-reg>; rel=recover`,
- `<https://example.com/acme/terms>; foo=bar; rel="terms-of-service"`,
- `<dup>;rel="next"`,
- }}
- tests := []struct {
- rel string
- out []string
- }{
- {"next", []string{"https://example.com/acme/new-authz", "dup"}},
- {"recover", []string{"https://example.com/acme/recover-reg"}},
- {"terms-of-service", []string{"https://example.com/acme/terms"}},
- {"empty", nil},
- }
- for i, test := range tests {
- if v := linkHeader(h, test.rel); !reflect.DeepEqual(v, test.out) {
- t.Errorf("%d: linkHeader(%q): %v; want %v", i, test.rel, v, test.out)
- }
- }
-}
-
-func TestErrorResponse(t *testing.T) {
- s := `{
- "status": 400,
- "type": "urn:acme:error:xxx",
- "detail": "text"
- }`
- res := &http.Response{
- StatusCode: 400,
- Status: "400 Bad Request",
- Body: ioutil.NopCloser(strings.NewReader(s)),
- Header: http.Header{"X-Foo": {"bar"}},
- }
- err := responseError(res)
- v, ok := err.(*Error)
- if !ok {
- t.Fatalf("err = %+v (%T); want *Error type", err, err)
- }
- if v.StatusCode != 400 {
- t.Errorf("v.StatusCode = %v; want 400", v.StatusCode)
- }
- if v.ProblemType != "urn:acme:error:xxx" {
- t.Errorf("v.ProblemType = %q; want urn:acme:error:xxx", v.ProblemType)
- }
- if v.Detail != "text" {
- t.Errorf("v.Detail = %q; want text", v.Detail)
- }
- if !reflect.DeepEqual(v.Header, res.Header) {
- t.Errorf("v.Header = %+v; want %+v", v.Header, res.Header)
- }
-}
-
-func TestTLSSNI01ChallengeCert(t *testing.T) {
- const (
- token = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
- // echo -n <token.testKeyECThumbprint> | shasum -a 256
- san = "dbbd5eefe7b4d06eb9d1d9f5acb4c7cd.a27d320e4b30332f0b6cb441734ad7b0.acme.invalid"
- )
-
- client := &Client{Key: testKeyEC}
- tlscert, name, err := client.TLSSNI01ChallengeCert(token)
- if err != nil {
- t.Fatal(err)
- }
-
- if n := len(tlscert.Certificate); n != 1 {
- t.Fatalf("len(tlscert.Certificate) = %d; want 1", n)
- }
- cert, err := x509.ParseCertificate(tlscert.Certificate[0])
- if err != nil {
- t.Fatal(err)
- }
- if len(cert.DNSNames) != 1 || cert.DNSNames[0] != san {
- t.Fatalf("cert.DNSNames = %v; want %q", cert.DNSNames, san)
- }
- if cert.DNSNames[0] != name {
- t.Errorf("cert.DNSNames[0] != name: %q vs %q", cert.DNSNames[0], name)
- }
- if cn := cert.Subject.CommonName; cn != san {
- t.Errorf("cert.Subject.CommonName = %q; want %q", cn, san)
- }
-}
-
-func TestTLSSNI02ChallengeCert(t *testing.T) {
- const (
- token = "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
- // echo -n evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA | shasum -a 256
- sanA = "7ea0aaa69214e71e02cebb18bb867736.09b730209baabf60e43d4999979ff139.token.acme.invalid"
- // echo -n <token.testKeyECThumbprint> | shasum -a 256
- sanB = "dbbd5eefe7b4d06eb9d1d9f5acb4c7cd.a27d320e4b30332f0b6cb441734ad7b0.ka.acme.invalid"
- )
-
- client := &Client{Key: testKeyEC}
- tlscert, name, err := client.TLSSNI02ChallengeCert(token)
- if err != nil {
- t.Fatal(err)
- }
-
- if n := len(tlscert.Certificate); n != 1 {
- t.Fatalf("len(tlscert.Certificate) = %d; want 1", n)
- }
- cert, err := x509.ParseCertificate(tlscert.Certificate[0])
- if err != nil {
- t.Fatal(err)
- }
- names := []string{sanA, sanB}
- if !reflect.DeepEqual(cert.DNSNames, names) {
- t.Fatalf("cert.DNSNames = %v;\nwant %v", cert.DNSNames, names)
- }
- sort.Strings(cert.DNSNames)
- i := sort.SearchStrings(cert.DNSNames, name)
- if i >= len(cert.DNSNames) || cert.DNSNames[i] != name {
- t.Errorf("%v doesn't have %q", cert.DNSNames, name)
- }
- if cn := cert.Subject.CommonName; cn != sanA {
- t.Errorf("CommonName = %q; want %q", cn, sanA)
- }
-}
-
-func TestTLSChallengeCertOpt(t *testing.T) {
- key, err := rsa.GenerateKey(rand.Reader, 512)
- if err != nil {
- t.Fatal(err)
- }
- tmpl := &x509.Certificate{
- SerialNumber: big.NewInt(2),
- Subject: pkix.Name{Organization: []string{"Test"}},
- DNSNames: []string{"should-be-overwritten"},
- }
- opts := []CertOption{WithKey(key), WithTemplate(tmpl)}
-
- client := &Client{Key: testKeyEC}
- cert1, _, err := client.TLSSNI01ChallengeCert("token", opts...)
- if err != nil {
- t.Fatal(err)
- }
- cert2, _, err := client.TLSSNI02ChallengeCert("token", opts...)
- if err != nil {
- t.Fatal(err)
- }
-
- for i, tlscert := range []tls.Certificate{cert1, cert2} {
- // verify generated cert private key
- tlskey, ok := tlscert.PrivateKey.(*rsa.PrivateKey)
- if !ok {
- t.Errorf("%d: tlscert.PrivateKey is %T; want *rsa.PrivateKey", i, tlscert.PrivateKey)
- continue
- }
- if tlskey.D.Cmp(key.D) != 0 {
- t.Errorf("%d: tlskey.D = %v; want %v", i, tlskey.D, key.D)
- }
- // verify generated cert public key
- x509Cert, err := x509.ParseCertificate(tlscert.Certificate[0])
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- tlspub, ok := x509Cert.PublicKey.(*rsa.PublicKey)
- if !ok {
- t.Errorf("%d: x509Cert.PublicKey is %T; want *rsa.PublicKey", i, x509Cert.PublicKey)
- continue
- }
- if tlspub.N.Cmp(key.N) != 0 {
- t.Errorf("%d: tlspub.N = %v; want %v", i, tlspub.N, key.N)
- }
- // verify template option
- sn := big.NewInt(2)
- if x509Cert.SerialNumber.Cmp(sn) != 0 {
- t.Errorf("%d: SerialNumber = %v; want %v", i, x509Cert.SerialNumber, sn)
- }
- org := []string{"Test"}
- if !reflect.DeepEqual(x509Cert.Subject.Organization, org) {
- t.Errorf("%d: Subject.Organization = %+v; want %+v", i, x509Cert.Subject.Organization, org)
- }
- for _, v := range x509Cert.DNSNames {
- if !strings.HasSuffix(v, ".acme.invalid") {
- t.Errorf("%d: invalid DNSNames element: %q", i, v)
- }
- }
- }
-}
-
-func TestHTTP01Challenge(t *testing.T) {
- const (
- token = "xxx"
- // thumbprint is precomputed for testKeyEC in jws_test.go
- value = token + "." + testKeyECThumbprint
- urlpath = "/.well-known/acme-challenge/" + token
- )
- client := &Client{Key: testKeyEC}
- val, err := client.HTTP01ChallengeResponse(token)
- if err != nil {
- t.Fatal(err)
- }
- if val != value {
- t.Errorf("val = %q; want %q", val, value)
- }
- if path := client.HTTP01ChallengePath(token); path != urlpath {
- t.Errorf("path = %q; want %q", path, urlpath)
- }
-}
-
-func TestDNS01ChallengeRecord(t *testing.T) {
- // echo -n xxx.<testKeyECThumbprint> | \
- // openssl dgst -binary -sha256 | \
- // base64 | tr -d '=' | tr '/+' '_-'
- const value = "8DERMexQ5VcdJ_prpPiA0mVdp7imgbCgjsG4SqqNMIo"
-
- client := &Client{Key: testKeyEC}
- val, err := client.DNS01ChallengeRecord("xxx")
- if err != nil {
- t.Fatal(err)
- }
- if val != value {
- t.Errorf("val = %q; want %q", val, value)
- }
-}
-
-func TestBackoff(t *testing.T) {
- tt := []struct{ min, max time.Duration }{
- {time.Second, 2 * time.Second},
- {2 * time.Second, 3 * time.Second},
- {4 * time.Second, 5 * time.Second},
- {8 * time.Second, 9 * time.Second},
- }
- for i, test := range tt {
- d := backoff(i, time.Minute)
- if d < test.min || test.max < d {
- t.Errorf("%d: d = %v; want between %v and %v", i, d, test.min, test.max)
- }
- }
-
- min, max := time.Second, 2*time.Second
- if d := backoff(-1, time.Minute); d < min || max < d {
- t.Errorf("d = %v; want between %v and %v", d, min, max)
- }
-
- bound := 10 * time.Second
- if d := backoff(100, bound); d != bound {
- t.Errorf("d = %v; want %v", d, bound)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert.go
deleted file mode 100644
index 94edba986..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert.go
+++ /dev/null
@@ -1,821 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package autocert provides automatic access to certificates from Let's Encrypt
-// and any other ACME-based CA.
-//
-// This package is a work in progress and makes no API stability promises.
-package autocert
-
-import (
- "bytes"
- "context"
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/rsa"
- "crypto/tls"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/pem"
- "errors"
- "fmt"
- "io"
- mathrand "math/rand"
- "net/http"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/crypto/acme"
-)
-
-// createCertRetryAfter is how much time to wait before removing a failed state
-// entry due to an unsuccessful createCert call.
-// This is a variable instead of a const for testing.
-// TODO: Consider making it configurable or an exp backoff?
-var createCertRetryAfter = time.Minute
-
-// pseudoRand is safe for concurrent use.
-var pseudoRand *lockedMathRand
-
-func init() {
- src := mathrand.NewSource(timeNow().UnixNano())
- pseudoRand = &lockedMathRand{rnd: mathrand.New(src)}
-}
-
-// AcceptTOS is a Manager.Prompt function that always returns true to
-// indicate acceptance of the CA's Terms of Service during account
-// registration.
-func AcceptTOS(tosURL string) bool { return true }
-
-// HostPolicy specifies which host names the Manager is allowed to respond to.
-// It returns a non-nil error if the host should be rejected.
-// The returned error is accessible via tls.Conn.Handshake and its callers.
-// See Manager's HostPolicy field and GetCertificate method docs for more details.
-type HostPolicy func(ctx context.Context, host string) error
-
-// HostWhitelist returns a policy where only the specified host names are allowed.
-// Only exact matches are currently supported. Subdomains, regexp or wildcard
-// will not match.
-func HostWhitelist(hosts ...string) HostPolicy {
- whitelist := make(map[string]bool, len(hosts))
- for _, h := range hosts {
- whitelist[h] = true
- }
- return func(_ context.Context, host string) error {
- if !whitelist[host] {
- return errors.New("acme/autocert: host not configured")
- }
- return nil
- }
-}
-
-// defaultHostPolicy is used when Manager.HostPolicy is not set.
-func defaultHostPolicy(context.Context, string) error {
- return nil
-}
-
-// Manager is a stateful certificate manager built on top of acme.Client.
-// It obtains and refreshes certificates automatically,
-// as well as providing them to a TLS server via tls.Config.
-//
-// You must specify a cache implementation, such as DirCache,
-// to reuse obtained certificates across program restarts.
-// Otherwise your server is very likely to exceed the certificate
-// issuer's request rate limits.
-type Manager struct {
- // Prompt specifies a callback function to conditionally accept a CA's Terms of Service (TOS).
- // The registration may require the caller to agree to the CA's TOS.
- // If so, Manager calls Prompt with a TOS URL provided by the CA. Prompt should report
- // whether the caller agrees to the terms.
- //
- // To always accept the terms, the callers can use AcceptTOS.
- Prompt func(tosURL string) bool
-
- // Cache optionally stores and retrieves previously-obtained certificates.
- // If nil, certs will only be cached for the lifetime of the Manager.
- //
- // Manager passes the Cache certificates data encoded in PEM, with private/public
- // parts combined in a single Cache.Put call, private key first.
- Cache Cache
-
- // HostPolicy controls which domains the Manager will attempt
- // to retrieve new certificates for. It does not affect cached certs.
- //
- // If non-nil, HostPolicy is called before requesting a new cert.
- // If nil, all hosts are currently allowed. This is not recommended,
- // as it opens a potential attack where clients connect to a server
- // by IP address and pretend to be asking for an incorrect host name.
- // Manager will attempt to obtain a certificate for that host, incorrectly,
- // eventually reaching the CA's rate limit for certificate requests
- // and making it impossible to obtain actual certificates.
- //
- // See GetCertificate for more details.
- HostPolicy HostPolicy
-
- // RenewBefore optionally specifies how early certificates should
- // be renewed before they expire.
- //
- // If zero, they're renewed 30 days before expiration.
- RenewBefore time.Duration
-
- // Client is used to perform low-level operations, such as account registration
- // and requesting new certificates.
- // If Client is nil, a zero-value acme.Client is used with acme.LetsEncryptURL
- // directory endpoint and a newly-generated ECDSA P-256 key.
- //
- // Mutating the field after the first call of GetCertificate method will have no effect.
- Client *acme.Client
-
- // Email optionally specifies a contact email address.
- // This is used by CAs, such as Let's Encrypt, to notify about problems
- // with issued certificates.
- //
- // If the Client's account key is already registered, Email is not used.
- Email string
-
- // ForceRSA makes the Manager generate certificates with 2048-bit RSA keys.
- //
- // If false, a default is used. Currently the default
- // is EC-based keys using the P-256 curve.
- ForceRSA bool
-
- clientMu sync.Mutex
- client *acme.Client // initialized by acmeClient method
-
- stateMu sync.Mutex
- state map[string]*certState // keyed by domain name
-
- // tokenCert is keyed by token domain name, which matches server name
- // of ClientHello. Keys always have ".acme.invalid" suffix.
- tokenCertMu sync.RWMutex
- tokenCert map[string]*tls.Certificate
-
- // renewal tracks the set of domains currently running renewal timers.
- // It is keyed by domain name.
- renewalMu sync.Mutex
- renewal map[string]*domainRenewal
-}
-
-// GetCertificate implements the tls.Config.GetCertificate hook.
-// It provides a TLS certificate for hello.ServerName host, including answering
-// *.acme.invalid (TLS-SNI) challenges. All other fields of hello are ignored.
-//
-// If m.HostPolicy is non-nil, GetCertificate calls the policy before requesting
-// a new cert. A non-nil error returned from m.HostPolicy halts TLS negotiation.
-// The error is propagated back to the caller of GetCertificate and is user-visible.
-// This does not affect cached certs. See HostPolicy field description for more details.
-func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
- if m.Prompt == nil {
- return nil, errors.New("acme/autocert: Manager.Prompt not set")
- }
-
- name := hello.ServerName
- if name == "" {
- return nil, errors.New("acme/autocert: missing server name")
- }
- if !strings.Contains(strings.Trim(name, "."), ".") {
- return nil, errors.New("acme/autocert: server name component count invalid")
- }
- if strings.ContainsAny(name, `/\`) {
- return nil, errors.New("acme/autocert: server name contains invalid character")
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
- defer cancel()
-
- // check whether this is a token cert requested for TLS-SNI challenge
- if strings.HasSuffix(name, ".acme.invalid") {
- m.tokenCertMu.RLock()
- defer m.tokenCertMu.RUnlock()
- if cert := m.tokenCert[name]; cert != nil {
- return cert, nil
- }
- if cert, err := m.cacheGet(ctx, name); err == nil {
- return cert, nil
- }
- // TODO: cache error results?
- return nil, fmt.Errorf("acme/autocert: no token cert for %q", name)
- }
-
- // regular domain
- name = strings.TrimSuffix(name, ".") // golang.org/issue/18114
- cert, err := m.cert(ctx, name)
- if err == nil {
- return cert, nil
- }
- if err != ErrCacheMiss {
- return nil, err
- }
-
- // first-time
- if err := m.hostPolicy()(ctx, name); err != nil {
- return nil, err
- }
- cert, err = m.createCert(ctx, name)
- if err != nil {
- return nil, err
- }
- m.cachePut(ctx, name, cert)
- return cert, nil
-}
-
-// cert returns an existing certificate either from m.state or cache.
-// If a certificate is found in cache but not in m.state, the latter will be filled
-// with the cached value.
-func (m *Manager) cert(ctx context.Context, name string) (*tls.Certificate, error) {
- m.stateMu.Lock()
- if s, ok := m.state[name]; ok {
- m.stateMu.Unlock()
- s.RLock()
- defer s.RUnlock()
- return s.tlscert()
- }
- defer m.stateMu.Unlock()
- cert, err := m.cacheGet(ctx, name)
- if err != nil {
- return nil, err
- }
- signer, ok := cert.PrivateKey.(crypto.Signer)
- if !ok {
- return nil, errors.New("acme/autocert: private key cannot sign")
- }
- if m.state == nil {
- m.state = make(map[string]*certState)
- }
- s := &certState{
- key: signer,
- cert: cert.Certificate,
- leaf: cert.Leaf,
- }
- m.state[name] = s
- go m.renew(name, s.key, s.leaf.NotAfter)
- return cert, nil
-}
-
-// cacheGet always returns a valid certificate, or an error otherwise.
-// If a cached certficate exists but is not valid, ErrCacheMiss is returned.
-func (m *Manager) cacheGet(ctx context.Context, domain string) (*tls.Certificate, error) {
- if m.Cache == nil {
- return nil, ErrCacheMiss
- }
- data, err := m.Cache.Get(ctx, domain)
- if err != nil {
- return nil, err
- }
-
- // private
- priv, pub := pem.Decode(data)
- if priv == nil || !strings.Contains(priv.Type, "PRIVATE") {
- return nil, ErrCacheMiss
- }
- privKey, err := parsePrivateKey(priv.Bytes)
- if err != nil {
- return nil, err
- }
-
- // public
- var pubDER [][]byte
- for len(pub) > 0 {
- var b *pem.Block
- b, pub = pem.Decode(pub)
- if b == nil {
- break
- }
- pubDER = append(pubDER, b.Bytes)
- }
- if len(pub) > 0 {
- // Leftover content not consumed by pem.Decode. Corrupt. Ignore.
- return nil, ErrCacheMiss
- }
-
- // verify and create TLS cert
- leaf, err := validCert(domain, pubDER, privKey)
- if err != nil {
- return nil, ErrCacheMiss
- }
- tlscert := &tls.Certificate{
- Certificate: pubDER,
- PrivateKey: privKey,
- Leaf: leaf,
- }
- return tlscert, nil
-}
-
-func (m *Manager) cachePut(ctx context.Context, domain string, tlscert *tls.Certificate) error {
- if m.Cache == nil {
- return nil
- }
-
- // contains PEM-encoded data
- var buf bytes.Buffer
-
- // private
- switch key := tlscert.PrivateKey.(type) {
- case *ecdsa.PrivateKey:
- if err := encodeECDSAKey(&buf, key); err != nil {
- return err
- }
- case *rsa.PrivateKey:
- b := x509.MarshalPKCS1PrivateKey(key)
- pb := &pem.Block{Type: "RSA PRIVATE KEY", Bytes: b}
- if err := pem.Encode(&buf, pb); err != nil {
- return err
- }
- default:
- return errors.New("acme/autocert: unknown private key type")
- }
-
- // public
- for _, b := range tlscert.Certificate {
- pb := &pem.Block{Type: "CERTIFICATE", Bytes: b}
- if err := pem.Encode(&buf, pb); err != nil {
- return err
- }
- }
-
- return m.Cache.Put(ctx, domain, buf.Bytes())
-}
-
-func encodeECDSAKey(w io.Writer, key *ecdsa.PrivateKey) error {
- b, err := x509.MarshalECPrivateKey(key)
- if err != nil {
- return err
- }
- pb := &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
- return pem.Encode(w, pb)
-}
-
-// createCert starts the domain ownership verification and returns a certificate
-// for that domain upon success.
-//
-// If the domain is already being verified, it waits for the existing verification to complete.
-// Either way, createCert blocks for the duration of the whole process.
-func (m *Manager) createCert(ctx context.Context, domain string) (*tls.Certificate, error) {
- // TODO: maybe rewrite this whole piece using sync.Once
- state, err := m.certState(domain)
- if err != nil {
- return nil, err
- }
- // state may exist if another goroutine is already working on it
- // in which case just wait for it to finish
- if !state.locked {
- state.RLock()
- defer state.RUnlock()
- return state.tlscert()
- }
-
- // We are the first; state is locked.
- // Unblock the readers when domain ownership is verified
- // and we got the cert or the process failed.
- defer state.Unlock()
- state.locked = false
-
- der, leaf, err := m.authorizedCert(ctx, state.key, domain)
- if err != nil {
- // Remove the failed state after some time,
- // making the manager call createCert again on the following TLS hello.
- time.AfterFunc(createCertRetryAfter, func() {
- defer testDidRemoveState(domain)
- m.stateMu.Lock()
- defer m.stateMu.Unlock()
- // Verify the state hasn't changed and it's still invalid
- // before deleting.
- s, ok := m.state[domain]
- if !ok {
- return
- }
- if _, err := validCert(domain, s.cert, s.key); err == nil {
- return
- }
- delete(m.state, domain)
- })
- return nil, err
- }
- state.cert = der
- state.leaf = leaf
- go m.renew(domain, state.key, state.leaf.NotAfter)
- return state.tlscert()
-}
-
-// certState returns a new or existing certState.
-// If a new certState is returned, state.exist is false and the state is locked.
-// The returned error is non-nil only in the case where a new state could not be created.
-func (m *Manager) certState(domain string) (*certState, error) {
- m.stateMu.Lock()
- defer m.stateMu.Unlock()
- if m.state == nil {
- m.state = make(map[string]*certState)
- }
- // existing state
- if state, ok := m.state[domain]; ok {
- return state, nil
- }
-
- // new locked state
- var (
- err error
- key crypto.Signer
- )
- if m.ForceRSA {
- key, err = rsa.GenerateKey(rand.Reader, 2048)
- } else {
- key, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- }
- if err != nil {
- return nil, err
- }
-
- state := &certState{
- key: key,
- locked: true,
- }
- state.Lock() // will be unlocked by m.certState caller
- m.state[domain] = state
- return state, nil
-}
-
-// authorizedCert starts the domain ownership verification process and requests a new cert upon success.
-// The key argument is the certificate private key.
-func (m *Manager) authorizedCert(ctx context.Context, key crypto.Signer, domain string) (der [][]byte, leaf *x509.Certificate, err error) {
- if err := m.verify(ctx, domain); err != nil {
- return nil, nil, err
- }
- client, err := m.acmeClient(ctx)
- if err != nil {
- return nil, nil, err
- }
- csr, err := certRequest(key, domain)
- if err != nil {
- return nil, nil, err
- }
- der, _, err = client.CreateCert(ctx, csr, 0, true)
- if err != nil {
- return nil, nil, err
- }
- leaf, err = validCert(domain, der, key)
- if err != nil {
- return nil, nil, err
- }
- return der, leaf, nil
-}
-
-// verify starts a new identifier (domain) authorization flow.
-// It prepares a challenge response and then blocks until the authorization
-// is marked as "completed" by the CA (either succeeded or failed).
-//
-// verify returns nil iff the verification was successful.
-func (m *Manager) verify(ctx context.Context, domain string) error {
- client, err := m.acmeClient(ctx)
- if err != nil {
- return err
- }
-
- // start domain authorization and get the challenge
- authz, err := client.Authorize(ctx, domain)
- if err != nil {
- return err
- }
- // maybe don't need to at all
- if authz.Status == acme.StatusValid {
- return nil
- }
-
- // pick a challenge: prefer tls-sni-02 over tls-sni-01
- // TODO: consider authz.Combinations
- var chal *acme.Challenge
- for _, c := range authz.Challenges {
- if c.Type == "tls-sni-02" {
- chal = c
- break
- }
- if c.Type == "tls-sni-01" {
- chal = c
- }
- }
- if chal == nil {
- return errors.New("acme/autocert: no supported challenge type found")
- }
-
- // create a token cert for the challenge response
- var (
- cert tls.Certificate
- name string
- )
- switch chal.Type {
- case "tls-sni-01":
- cert, name, err = client.TLSSNI01ChallengeCert(chal.Token)
- case "tls-sni-02":
- cert, name, err = client.TLSSNI02ChallengeCert(chal.Token)
- default:
- err = fmt.Errorf("acme/autocert: unknown challenge type %q", chal.Type)
- }
- if err != nil {
- return err
- }
- m.putTokenCert(ctx, name, &cert)
- defer func() {
- // verification has ended at this point
- // don't need token cert anymore
- go m.deleteTokenCert(name)
- }()
-
- // ready to fulfill the challenge
- if _, err := client.Accept(ctx, chal); err != nil {
- return err
- }
- // wait for the CA to validate
- _, err = client.WaitAuthorization(ctx, authz.URI)
- return err
-}
-
-// putTokenCert stores the cert under the named key in both m.tokenCert map
-// and m.Cache.
-func (m *Manager) putTokenCert(ctx context.Context, name string, cert *tls.Certificate) {
- m.tokenCertMu.Lock()
- defer m.tokenCertMu.Unlock()
- if m.tokenCert == nil {
- m.tokenCert = make(map[string]*tls.Certificate)
- }
- m.tokenCert[name] = cert
- m.cachePut(ctx, name, cert)
-}
-
-// deleteTokenCert removes the token certificate for the specified domain name
-// from both m.tokenCert map and m.Cache.
-func (m *Manager) deleteTokenCert(name string) {
- m.tokenCertMu.Lock()
- defer m.tokenCertMu.Unlock()
- delete(m.tokenCert, name)
- if m.Cache != nil {
- m.Cache.Delete(context.Background(), name)
- }
-}
-
-// renew starts a cert renewal timer loop, one per domain.
-//
-// The loop is scheduled in two cases:
-// - a cert was fetched from cache for the first time (wasn't in m.state)
-// - a new cert was created by m.createCert
-//
-// The key argument is a certificate private key.
-// The exp argument is the cert expiration time (NotAfter).
-func (m *Manager) renew(domain string, key crypto.Signer, exp time.Time) {
- m.renewalMu.Lock()
- defer m.renewalMu.Unlock()
- if m.renewal[domain] != nil {
- // another goroutine is already on it
- return
- }
- if m.renewal == nil {
- m.renewal = make(map[string]*domainRenewal)
- }
- dr := &domainRenewal{m: m, domain: domain, key: key}
- m.renewal[domain] = dr
- dr.start(exp)
-}
-
-// stopRenew stops all currently running cert renewal timers.
-// The timers are not restarted during the lifetime of the Manager.
-func (m *Manager) stopRenew() {
- m.renewalMu.Lock()
- defer m.renewalMu.Unlock()
- for name, dr := range m.renewal {
- delete(m.renewal, name)
- dr.stop()
- }
-}
-
-func (m *Manager) accountKey(ctx context.Context) (crypto.Signer, error) {
- const keyName = "acme_account.key"
-
- genKey := func() (*ecdsa.PrivateKey, error) {
- return ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- }
-
- if m.Cache == nil {
- return genKey()
- }
-
- data, err := m.Cache.Get(ctx, keyName)
- if err == ErrCacheMiss {
- key, err := genKey()
- if err != nil {
- return nil, err
- }
- var buf bytes.Buffer
- if err := encodeECDSAKey(&buf, key); err != nil {
- return nil, err
- }
- if err := m.Cache.Put(ctx, keyName, buf.Bytes()); err != nil {
- return nil, err
- }
- return key, nil
- }
- if err != nil {
- return nil, err
- }
-
- priv, _ := pem.Decode(data)
- if priv == nil || !strings.Contains(priv.Type, "PRIVATE") {
- return nil, errors.New("acme/autocert: invalid account key found in cache")
- }
- return parsePrivateKey(priv.Bytes)
-}
-
-func (m *Manager) acmeClient(ctx context.Context) (*acme.Client, error) {
- m.clientMu.Lock()
- defer m.clientMu.Unlock()
- if m.client != nil {
- return m.client, nil
- }
-
- client := m.Client
- if client == nil {
- client = &acme.Client{DirectoryURL: acme.LetsEncryptURL}
- }
- if client.Key == nil {
- var err error
- client.Key, err = m.accountKey(ctx)
- if err != nil {
- return nil, err
- }
- }
- var contact []string
- if m.Email != "" {
- contact = []string{"mailto:" + m.Email}
- }
- a := &acme.Account{Contact: contact}
- _, err := client.Register(ctx, a, m.Prompt)
- if ae, ok := err.(*acme.Error); err == nil || ok && ae.StatusCode == http.StatusConflict {
- // conflict indicates the key is already registered
- m.client = client
- err = nil
- }
- return m.client, err
-}
-
-func (m *Manager) hostPolicy() HostPolicy {
- if m.HostPolicy != nil {
- return m.HostPolicy
- }
- return defaultHostPolicy
-}
-
-func (m *Manager) renewBefore() time.Duration {
- if m.RenewBefore > renewJitter {
- return m.RenewBefore
- }
- return 720 * time.Hour // 30 days
-}
-
-// certState is ready when its mutex is unlocked for reading.
-type certState struct {
- sync.RWMutex
- locked bool // locked for read/write
- key crypto.Signer // private key for cert
- cert [][]byte // DER encoding
- leaf *x509.Certificate // parsed cert[0]; always non-nil if cert != nil
-}
-
-// tlscert creates a tls.Certificate from s.key and s.cert.
-// Callers should wrap it in s.RLock() and s.RUnlock().
-func (s *certState) tlscert() (*tls.Certificate, error) {
- if s.key == nil {
- return nil, errors.New("acme/autocert: missing signer")
- }
- if len(s.cert) == 0 {
- return nil, errors.New("acme/autocert: missing certificate")
- }
- return &tls.Certificate{
- PrivateKey: s.key,
- Certificate: s.cert,
- Leaf: s.leaf,
- }, nil
-}
-
-// certRequest creates a certificate request for the given common name cn
-// and optional SANs.
-func certRequest(key crypto.Signer, cn string, san ...string) ([]byte, error) {
- req := &x509.CertificateRequest{
- Subject: pkix.Name{CommonName: cn},
- DNSNames: san,
- }
- return x509.CreateCertificateRequest(rand.Reader, req, key)
-}
-
-// Attempt to parse the given private key DER block. OpenSSL 0.9.8 generates
-// PKCS#1 private keys by default, while OpenSSL 1.0.0 generates PKCS#8 keys.
-// OpenSSL ecparam generates SEC1 EC private keys for ECDSA. We try all three.
-//
-// Inspired by parsePrivateKey in crypto/tls/tls.go.
-func parsePrivateKey(der []byte) (crypto.Signer, error) {
- if key, err := x509.ParsePKCS1PrivateKey(der); err == nil {
- return key, nil
- }
- if key, err := x509.ParsePKCS8PrivateKey(der); err == nil {
- switch key := key.(type) {
- case *rsa.PrivateKey:
- return key, nil
- case *ecdsa.PrivateKey:
- return key, nil
- default:
- return nil, errors.New("acme/autocert: unknown private key type in PKCS#8 wrapping")
- }
- }
- if key, err := x509.ParseECPrivateKey(der); err == nil {
- return key, nil
- }
-
- return nil, errors.New("acme/autocert: failed to parse private key")
-}
-
-// validCert parses a cert chain provided as der argument and verifies the leaf, der[0],
-// corresponds to the private key, as well as the domain match and expiration dates.
-// It doesn't do any revocation checking.
-//
-// The returned value is the verified leaf cert.
-func validCert(domain string, der [][]byte, key crypto.Signer) (leaf *x509.Certificate, err error) {
- // parse public part(s)
- var n int
- for _, b := range der {
- n += len(b)
- }
- pub := make([]byte, n)
- n = 0
- for _, b := range der {
- n += copy(pub[n:], b)
- }
- x509Cert, err := x509.ParseCertificates(pub)
- if len(x509Cert) == 0 {
- return nil, errors.New("acme/autocert: no public key found")
- }
- // verify the leaf is not expired and matches the domain name
- leaf = x509Cert[0]
- now := timeNow()
- if now.Before(leaf.NotBefore) {
- return nil, errors.New("acme/autocert: certificate is not valid yet")
- }
- if now.After(leaf.NotAfter) {
- return nil, errors.New("acme/autocert: expired certificate")
- }
- if err := leaf.VerifyHostname(domain); err != nil {
- return nil, err
- }
- // ensure the leaf corresponds to the private key
- switch pub := leaf.PublicKey.(type) {
- case *rsa.PublicKey:
- prv, ok := key.(*rsa.PrivateKey)
- if !ok {
- return nil, errors.New("acme/autocert: private key type does not match public key type")
- }
- if pub.N.Cmp(prv.N) != 0 {
- return nil, errors.New("acme/autocert: private key does not match public key")
- }
- case *ecdsa.PublicKey:
- prv, ok := key.(*ecdsa.PrivateKey)
- if !ok {
- return nil, errors.New("acme/autocert: private key type does not match public key type")
- }
- if pub.X.Cmp(prv.X) != 0 || pub.Y.Cmp(prv.Y) != 0 {
- return nil, errors.New("acme/autocert: private key does not match public key")
- }
- default:
- return nil, errors.New("acme/autocert: unknown public key algorithm")
- }
- return leaf, nil
-}
-
-func retryAfter(v string) time.Duration {
- if i, err := strconv.Atoi(v); err == nil {
- return time.Duration(i) * time.Second
- }
- if t, err := http.ParseTime(v); err == nil {
- return t.Sub(timeNow())
- }
- return time.Second
-}
-
-type lockedMathRand struct {
- sync.Mutex
- rnd *mathrand.Rand
-}
-
-func (r *lockedMathRand) int63n(max int64) int64 {
- r.Lock()
- n := r.rnd.Int63n(max)
- r.Unlock()
- return n
-}
-
-// For easier testing.
-var (
- timeNow = time.Now
-
- // Called when a state is removed.
- testDidRemoveState = func(domain string) {}
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go
deleted file mode 100644
index 43a62011a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go
+++ /dev/null
@@ -1,606 +0,0 @@
-// Copyright 2016 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 file.
-
-package autocert
-
-import (
- "context"
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/rsa"
- "crypto/tls"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "html/template"
- "io"
- "math/big"
- "net/http"
- "net/http/httptest"
- "reflect"
- "sync"
- "testing"
- "time"
-
- "golang.org/x/crypto/acme"
-)
-
-var discoTmpl = template.Must(template.New("disco").Parse(`{
- "new-reg": "{{.}}/new-reg",
- "new-authz": "{{.}}/new-authz",
- "new-cert": "{{.}}/new-cert"
-}`))
-
-var authzTmpl = template.Must(template.New("authz").Parse(`{
- "status": "pending",
- "challenges": [
- {
- "uri": "{{.}}/challenge/1",
- "type": "tls-sni-01",
- "token": "token-01"
- },
- {
- "uri": "{{.}}/challenge/2",
- "type": "tls-sni-02",
- "token": "token-02"
- }
- ]
-}`))
-
-type memCache struct {
- mu sync.Mutex
- keyData map[string][]byte
-}
-
-func (m *memCache) Get(ctx context.Context, key string) ([]byte, error) {
- m.mu.Lock()
- defer m.mu.Unlock()
-
- v, ok := m.keyData[key]
- if !ok {
- return nil, ErrCacheMiss
- }
- return v, nil
-}
-
-func (m *memCache) Put(ctx context.Context, key string, data []byte) error {
- m.mu.Lock()
- defer m.mu.Unlock()
-
- m.keyData[key] = data
- return nil
-}
-
-func (m *memCache) Delete(ctx context.Context, key string) error {
- m.mu.Lock()
- defer m.mu.Unlock()
-
- delete(m.keyData, key)
- return nil
-}
-
-func newMemCache() *memCache {
- return &memCache{
- keyData: make(map[string][]byte),
- }
-}
-
-func dummyCert(pub interface{}, san ...string) ([]byte, error) {
- return dateDummyCert(pub, time.Now(), time.Now().Add(90*24*time.Hour), san...)
-}
-
-func dateDummyCert(pub interface{}, start, end time.Time, san ...string) ([]byte, error) {
- // use EC key to run faster on 386
- key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- return nil, err
- }
- t := &x509.Certificate{
- SerialNumber: big.NewInt(1),
- NotBefore: start,
- NotAfter: end,
- BasicConstraintsValid: true,
- KeyUsage: x509.KeyUsageKeyEncipherment,
- DNSNames: san,
- }
- if pub == nil {
- pub = &key.PublicKey
- }
- return x509.CreateCertificate(rand.Reader, t, t, pub, key)
-}
-
-func decodePayload(v interface{}, r io.Reader) error {
- var req struct{ Payload string }
- if err := json.NewDecoder(r).Decode(&req); err != nil {
- return err
- }
- payload, err := base64.RawURLEncoding.DecodeString(req.Payload)
- if err != nil {
- return err
- }
- return json.Unmarshal(payload, v)
-}
-
-func TestGetCertificate(t *testing.T) {
- man := &Manager{Prompt: AcceptTOS}
- defer man.stopRenew()
- hello := &tls.ClientHelloInfo{ServerName: "example.org"}
- testGetCertificate(t, man, "example.org", hello)
-}
-
-func TestGetCertificate_trailingDot(t *testing.T) {
- man := &Manager{Prompt: AcceptTOS}
- defer man.stopRenew()
- hello := &tls.ClientHelloInfo{ServerName: "example.org."}
- testGetCertificate(t, man, "example.org", hello)
-}
-
-func TestGetCertificate_ForceRSA(t *testing.T) {
- man := &Manager{
- Prompt: AcceptTOS,
- Cache: newMemCache(),
- ForceRSA: true,
- }
- defer man.stopRenew()
- hello := &tls.ClientHelloInfo{ServerName: "example.org"}
- testGetCertificate(t, man, "example.org", hello)
-
- cert, err := man.cacheGet(context.Background(), "example.org")
- if err != nil {
- t.Fatalf("man.cacheGet: %v", err)
- }
- if _, ok := cert.PrivateKey.(*rsa.PrivateKey); !ok {
- t.Errorf("cert.PrivateKey is %T; want *rsa.PrivateKey", cert.PrivateKey)
- }
-}
-
-func TestGetCertificate_nilPrompt(t *testing.T) {
- man := &Manager{}
- defer man.stopRenew()
- url, finish := startACMEServerStub(t, man, "example.org")
- defer finish()
- key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- man.Client = &acme.Client{
- Key: key,
- DirectoryURL: url,
- }
- hello := &tls.ClientHelloInfo{ServerName: "example.org"}
- if _, err := man.GetCertificate(hello); err == nil {
- t.Error("got certificate for example.org; wanted error")
- }
-}
-
-func TestGetCertificate_expiredCache(t *testing.T) {
- // Make an expired cert and cache it.
- pk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- tmpl := &x509.Certificate{
- SerialNumber: big.NewInt(1),
- Subject: pkix.Name{CommonName: "example.org"},
- NotAfter: time.Now(),
- }
- pub, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &pk.PublicKey, pk)
- if err != nil {
- t.Fatal(err)
- }
- tlscert := &tls.Certificate{
- Certificate: [][]byte{pub},
- PrivateKey: pk,
- }
-
- man := &Manager{Prompt: AcceptTOS, Cache: newMemCache()}
- defer man.stopRenew()
- if err := man.cachePut(context.Background(), "example.org", tlscert); err != nil {
- t.Fatalf("man.cachePut: %v", err)
- }
-
- // The expired cached cert should trigger a new cert issuance
- // and return without an error.
- hello := &tls.ClientHelloInfo{ServerName: "example.org"}
- testGetCertificate(t, man, "example.org", hello)
-}
-
-func TestGetCertificate_failedAttempt(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusBadRequest)
- }))
- defer ts.Close()
-
- const example = "example.org"
- d := createCertRetryAfter
- f := testDidRemoveState
- defer func() {
- createCertRetryAfter = d
- testDidRemoveState = f
- }()
- createCertRetryAfter = 0
- done := make(chan struct{})
- testDidRemoveState = func(domain string) {
- if domain != example {
- t.Errorf("testDidRemoveState: domain = %q; want %q", domain, example)
- }
- close(done)
- }
-
- key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- man := &Manager{
- Prompt: AcceptTOS,
- Client: &acme.Client{
- Key: key,
- DirectoryURL: ts.URL,
- },
- }
- defer man.stopRenew()
- hello := &tls.ClientHelloInfo{ServerName: example}
- if _, err := man.GetCertificate(hello); err == nil {
- t.Error("GetCertificate: err is nil")
- }
- select {
- case <-time.After(5 * time.Second):
- t.Errorf("took too long to remove the %q state", example)
- case <-done:
- man.stateMu.Lock()
- defer man.stateMu.Unlock()
- if v, exist := man.state[example]; exist {
- t.Errorf("state exists for %q: %+v", example, v)
- }
- }
-}
-
-// startACMEServerStub runs an ACME server
-// The domain argument is the expected domain name of a certificate request.
-func startACMEServerStub(t *testing.T, man *Manager, domain string) (url string, finish func()) {
- // echo token-02 | shasum -a 256
- // then divide result in 2 parts separated by dot
- tokenCertName := "4e8eb87631187e9ff2153b56b13a4dec.13a35d002e485d60ff37354b32f665d9.token.acme.invalid"
- verifyTokenCert := func() {
- hello := &tls.ClientHelloInfo{ServerName: tokenCertName}
- _, err := man.GetCertificate(hello)
- if err != nil {
- t.Errorf("verifyTokenCert: GetCertificate(%q): %v", tokenCertName, err)
- return
- }
- }
-
- // ACME CA server stub
- var ca *httptest.Server
- ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Replay-Nonce", "nonce")
- if r.Method == "HEAD" {
- // a nonce request
- return
- }
-
- switch r.URL.Path {
- // discovery
- case "/":
- if err := discoTmpl.Execute(w, ca.URL); err != nil {
- t.Errorf("discoTmpl: %v", err)
- }
- // client key registration
- case "/new-reg":
- w.Write([]byte("{}"))
- // domain authorization
- case "/new-authz":
- w.Header().Set("Location", ca.URL+"/authz/1")
- w.WriteHeader(http.StatusCreated)
- if err := authzTmpl.Execute(w, ca.URL); err != nil {
- t.Errorf("authzTmpl: %v", err)
- }
- // accept tls-sni-02 challenge
- case "/challenge/2":
- verifyTokenCert()
- w.Write([]byte("{}"))
- // authorization status
- case "/authz/1":
- w.Write([]byte(`{"status": "valid"}`))
- // cert request
- case "/new-cert":
- var req struct {
- CSR string `json:"csr"`
- }
- decodePayload(&req, r.Body)
- b, _ := base64.RawURLEncoding.DecodeString(req.CSR)
- csr, err := x509.ParseCertificateRequest(b)
- if err != nil {
- t.Errorf("new-cert: CSR: %v", err)
- }
- if csr.Subject.CommonName != domain {
- t.Errorf("CommonName in CSR = %q; want %q", csr.Subject.CommonName, domain)
- }
- der, err := dummyCert(csr.PublicKey, domain)
- if err != nil {
- t.Errorf("new-cert: dummyCert: %v", err)
- }
- chainUp := fmt.Sprintf("<%s/ca-cert>; rel=up", ca.URL)
- w.Header().Set("Link", chainUp)
- w.WriteHeader(http.StatusCreated)
- w.Write(der)
- // CA chain cert
- case "/ca-cert":
- der, err := dummyCert(nil, "ca")
- if err != nil {
- t.Errorf("ca-cert: dummyCert: %v", err)
- }
- w.Write(der)
- default:
- t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path)
- }
- }))
- finish = func() {
- ca.Close()
-
- // make sure token cert was removed
- cancel := make(chan struct{})
- done := make(chan struct{})
- go func() {
- defer close(done)
- tick := time.NewTicker(100 * time.Millisecond)
- defer tick.Stop()
- for {
- hello := &tls.ClientHelloInfo{ServerName: tokenCertName}
- if _, err := man.GetCertificate(hello); err != nil {
- return
- }
- select {
- case <-tick.C:
- case <-cancel:
- return
- }
- }
- }()
- select {
- case <-done:
- case <-time.After(5 * time.Second):
- close(cancel)
- t.Error("token cert was not removed")
- <-done
- }
- }
- return ca.URL, finish
-}
-
-// tests man.GetCertificate flow using the provided hello argument.
-// The domain argument is the expected domain name of a certificate request.
-func testGetCertificate(t *testing.T, man *Manager, domain string, hello *tls.ClientHelloInfo) {
- url, finish := startACMEServerStub(t, man, domain)
- defer finish()
-
- // use EC key to run faster on 386
- key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- man.Client = &acme.Client{
- Key: key,
- DirectoryURL: url,
- }
-
- // simulate tls.Config.GetCertificate
- var tlscert *tls.Certificate
- done := make(chan struct{})
- go func() {
- tlscert, err = man.GetCertificate(hello)
- close(done)
- }()
- select {
- case <-time.After(time.Minute):
- t.Fatal("man.GetCertificate took too long to return")
- case <-done:
- }
- if err != nil {
- t.Fatalf("man.GetCertificate: %v", err)
- }
-
- // verify the tlscert is the same we responded with from the CA stub
- if len(tlscert.Certificate) == 0 {
- t.Fatal("len(tlscert.Certificate) is 0")
- }
- cert, err := x509.ParseCertificate(tlscert.Certificate[0])
- if err != nil {
- t.Fatalf("x509.ParseCertificate: %v", err)
- }
- if len(cert.DNSNames) == 0 || cert.DNSNames[0] != domain {
- t.Errorf("cert.DNSNames = %v; want %q", cert.DNSNames, domain)
- }
-
-}
-
-func TestAccountKeyCache(t *testing.T) {
- m := Manager{Cache: newMemCache()}
- ctx := context.Background()
- k1, err := m.accountKey(ctx)
- if err != nil {
- t.Fatal(err)
- }
- k2, err := m.accountKey(ctx)
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(k1, k2) {
- t.Errorf("account keys don't match: k1 = %#v; k2 = %#v", k1, k2)
- }
-}
-
-func TestCache(t *testing.T) {
- privKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- tmpl := &x509.Certificate{
- SerialNumber: big.NewInt(1),
- Subject: pkix.Name{CommonName: "example.org"},
- NotAfter: time.Now().Add(time.Hour),
- }
- pub, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &privKey.PublicKey, privKey)
- if err != nil {
- t.Fatal(err)
- }
- tlscert := &tls.Certificate{
- Certificate: [][]byte{pub},
- PrivateKey: privKey,
- }
-
- man := &Manager{Cache: newMemCache()}
- defer man.stopRenew()
- ctx := context.Background()
- if err := man.cachePut(ctx, "example.org", tlscert); err != nil {
- t.Fatalf("man.cachePut: %v", err)
- }
- res, err := man.cacheGet(ctx, "example.org")
- if err != nil {
- t.Fatalf("man.cacheGet: %v", err)
- }
- if res == nil {
- t.Fatal("res is nil")
- }
-}
-
-func TestHostWhitelist(t *testing.T) {
- policy := HostWhitelist("example.com", "example.org", "*.example.net")
- tt := []struct {
- host string
- allow bool
- }{
- {"example.com", true},
- {"example.org", true},
- {"one.example.com", false},
- {"two.example.org", false},
- {"three.example.net", false},
- {"dummy", false},
- }
- for i, test := range tt {
- err := policy(nil, test.host)
- if err != nil && test.allow {
- t.Errorf("%d: policy(%q): %v; want nil", i, test.host, err)
- }
- if err == nil && !test.allow {
- t.Errorf("%d: policy(%q): nil; want an error", i, test.host)
- }
- }
-}
-
-func TestValidCert(t *testing.T) {
- key1, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- key2, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- key3, err := rsa.GenerateKey(rand.Reader, 512)
- if err != nil {
- t.Fatal(err)
- }
- cert1, err := dummyCert(key1.Public(), "example.org")
- if err != nil {
- t.Fatal(err)
- }
- cert2, err := dummyCert(key2.Public(), "example.org")
- if err != nil {
- t.Fatal(err)
- }
- cert3, err := dummyCert(key3.Public(), "example.org")
- if err != nil {
- t.Fatal(err)
- }
- now := time.Now()
- early, err := dateDummyCert(key1.Public(), now.Add(time.Hour), now.Add(2*time.Hour), "example.org")
- if err != nil {
- t.Fatal(err)
- }
- expired, err := dateDummyCert(key1.Public(), now.Add(-2*time.Hour), now.Add(-time.Hour), "example.org")
- if err != nil {
- t.Fatal(err)
- }
-
- tt := []struct {
- domain string
- key crypto.Signer
- cert [][]byte
- ok bool
- }{
- {"example.org", key1, [][]byte{cert1}, true},
- {"example.org", key3, [][]byte{cert3}, true},
- {"example.org", key1, [][]byte{cert1, cert2, cert3}, true},
- {"example.org", key1, [][]byte{cert1, {1}}, false},
- {"example.org", key1, [][]byte{{1}}, false},
- {"example.org", key1, [][]byte{cert2}, false},
- {"example.org", key2, [][]byte{cert1}, false},
- {"example.org", key1, [][]byte{cert3}, false},
- {"example.org", key3, [][]byte{cert1}, false},
- {"example.net", key1, [][]byte{cert1}, false},
- {"example.org", key1, [][]byte{early}, false},
- {"example.org", key1, [][]byte{expired}, false},
- }
- for i, test := range tt {
- leaf, err := validCert(test.domain, test.cert, test.key)
- if err != nil && test.ok {
- t.Errorf("%d: err = %v", i, err)
- }
- if err == nil && !test.ok {
- t.Errorf("%d: err is nil", i)
- }
- if err == nil && test.ok && leaf == nil {
- t.Errorf("%d: leaf is nil", i)
- }
- }
-}
-
-type cacheGetFunc func(ctx context.Context, key string) ([]byte, error)
-
-func (f cacheGetFunc) Get(ctx context.Context, key string) ([]byte, error) {
- return f(ctx, key)
-}
-
-func (f cacheGetFunc) Put(ctx context.Context, key string, data []byte) error {
- return fmt.Errorf("unsupported Put of %q = %q", key, data)
-}
-
-func (f cacheGetFunc) Delete(ctx context.Context, key string) error {
- return fmt.Errorf("unsupported Delete of %q", key)
-}
-
-func TestManagerGetCertificateBogusSNI(t *testing.T) {
- m := Manager{
- Prompt: AcceptTOS,
- Cache: cacheGetFunc(func(ctx context.Context, key string) ([]byte, error) {
- return nil, fmt.Errorf("cache.Get of %s", key)
- }),
- }
- tests := []struct {
- name string
- wantErr string
- }{
- {"foo.com", "cache.Get of foo.com"},
- {"foo.com.", "cache.Get of foo.com"},
- {`a\b.com`, "acme/autocert: server name contains invalid character"},
- {`a/b.com`, "acme/autocert: server name contains invalid character"},
- {"", "acme/autocert: missing server name"},
- {"foo", "acme/autocert: server name component count invalid"},
- {".foo", "acme/autocert: server name component count invalid"},
- {"foo.", "acme/autocert: server name component count invalid"},
- {"fo.o", "cache.Get of fo.o"},
- }
- for _, tt := range tests {
- _, err := m.GetCertificate(&tls.ClientHelloInfo{ServerName: tt.name})
- got := fmt.Sprint(err)
- if got != tt.wantErr {
- t.Errorf("GetCertificate(SNI = %q) = %q; want %q", tt.name, got, tt.wantErr)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache.go
deleted file mode 100644
index 61a5fd239..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2016 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 file.
-
-package autocert
-
-import (
- "context"
- "errors"
- "io/ioutil"
- "os"
- "path/filepath"
-)
-
-// ErrCacheMiss is returned when a certificate is not found in cache.
-var ErrCacheMiss = errors.New("acme/autocert: certificate cache miss")
-
-// Cache is used by Manager to store and retrieve previously obtained certificates
-// as opaque data.
-//
-// The key argument of the methods refers to a domain name but need not be an FQDN.
-// Cache implementations should not rely on the key naming pattern.
-type Cache interface {
- // Get returns a certificate data for the specified key.
- // If there's no such key, Get returns ErrCacheMiss.
- Get(ctx context.Context, key string) ([]byte, error)
-
- // Put stores the data in the cache under the specified key.
- // Underlying implementations may use any data storage format,
- // as long as the reverse operation, Get, results in the original data.
- Put(ctx context.Context, key string, data []byte) error
-
- // Delete removes a certificate data from the cache under the specified key.
- // If there's no such key in the cache, Delete returns nil.
- Delete(ctx context.Context, key string) error
-}
-
-// DirCache implements Cache using a directory on the local filesystem.
-// If the directory does not exist, it will be created with 0700 permissions.
-type DirCache string
-
-// Get reads a certificate data from the specified file name.
-func (d DirCache) Get(ctx context.Context, name string) ([]byte, error) {
- name = filepath.Join(string(d), name)
- var (
- data []byte
- err error
- done = make(chan struct{})
- )
- go func() {
- data, err = ioutil.ReadFile(name)
- close(done)
- }()
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case <-done:
- }
- if os.IsNotExist(err) {
- return nil, ErrCacheMiss
- }
- return data, err
-}
-
-// Put writes the certificate data to the specified file name.
-// The file will be created with 0600 permissions.
-func (d DirCache) Put(ctx context.Context, name string, data []byte) error {
- if err := os.MkdirAll(string(d), 0700); err != nil {
- return err
- }
-
- done := make(chan struct{})
- var err error
- go func() {
- defer close(done)
- var tmp string
- if tmp, err = d.writeTempFile(name, data); err != nil {
- return
- }
- select {
- case <-ctx.Done():
- // Don't overwrite the file if the context was canceled.
- default:
- newName := filepath.Join(string(d), name)
- err = os.Rename(tmp, newName)
- }
- }()
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-done:
- }
- return err
-}
-
-// Delete removes the specified file name.
-func (d DirCache) Delete(ctx context.Context, name string) error {
- name = filepath.Join(string(d), name)
- var (
- err error
- done = make(chan struct{})
- )
- go func() {
- err = os.Remove(name)
- close(done)
- }()
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-done:
- }
- if err != nil && !os.IsNotExist(err) {
- return err
- }
- return nil
-}
-
-// writeTempFile writes b to a temporary file, closes the file and returns its path.
-func (d DirCache) writeTempFile(prefix string, b []byte) (string, error) {
- // TempFile uses 0600 permissions
- f, err := ioutil.TempFile(string(d), prefix)
- if err != nil {
- return "", err
- }
- if _, err := f.Write(b); err != nil {
- f.Close()
- return "", err
- }
- return f.Name(), f.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache_test.go
deleted file mode 100644
index 653b05bed..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/cache_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2016 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 file.
-
-package autocert
-
-import (
- "context"
- "io/ioutil"
- "os"
- "path/filepath"
- "reflect"
- "testing"
-)
-
-// make sure DirCache satisfies Cache interface
-var _ Cache = DirCache("/")
-
-func TestDirCache(t *testing.T) {
- dir, err := ioutil.TempDir("", "autocert")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dir)
- dir = filepath.Join(dir, "certs") // a nonexistent dir
- cache := DirCache(dir)
- ctx := context.Background()
-
- // test cache miss
- if _, err := cache.Get(ctx, "nonexistent"); err != ErrCacheMiss {
- t.Errorf("get: %v; want ErrCacheMiss", err)
- }
-
- // test put/get
- b1 := []byte{1}
- if err := cache.Put(ctx, "dummy", b1); err != nil {
- t.Fatalf("put: %v", err)
- }
- b2, err := cache.Get(ctx, "dummy")
- if err != nil {
- t.Fatalf("get: %v", err)
- }
- if !reflect.DeepEqual(b1, b2) {
- t.Errorf("b1 = %v; want %v", b1, b2)
- }
- name := filepath.Join(dir, "dummy")
- if _, err := os.Stat(name); err != nil {
- t.Error(err)
- }
-
- // test delete
- if err := cache.Delete(ctx, "dummy"); err != nil {
- t.Fatalf("delete: %v", err)
- }
- if _, err := cache.Get(ctx, "dummy"); err != ErrCacheMiss {
- t.Errorf("get: %v; want ErrCacheMiss", err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/example_test.go
deleted file mode 100644
index 71d61eb1c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/example_test.go
+++ /dev/null
@@ -1,35 +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 file.
-
-package autocert_test
-
-import (
- "crypto/tls"
- "fmt"
- "log"
- "net/http"
-
- "golang.org/x/crypto/acme/autocert"
-)
-
-func ExampleNewListener() {
- mux := http.NewServeMux()
- mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS)
- })
- log.Fatal(http.Serve(autocert.NewListener("example.com"), mux))
-}
-
-func ExampleManager() {
- m := autocert.Manager{
- Cache: autocert.DirCache("secret-dir"),
- Prompt: autocert.AcceptTOS,
- HostPolicy: autocert.HostWhitelist("example.org"),
- }
- s := &http.Server{
- Addr: ":https",
- TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
- }
- s.ListenAndServeTLS("", "")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/listener.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/listener.go
deleted file mode 100644
index d744df0ed..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/listener.go
+++ /dev/null
@@ -1,160 +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 file.
-
-package autocert
-
-import (
- "crypto/tls"
- "log"
- "net"
- "os"
- "path/filepath"
- "runtime"
- "time"
-)
-
-// NewListener returns a net.Listener that listens on the standard TLS
-// port (443) on all interfaces and returns *tls.Conn connections with
-// LetsEncrypt certificates for the provided domain or domains.
-//
-// It enables one-line HTTPS servers:
-//
-// log.Fatal(http.Serve(autocert.NewListener("example.com"), handler))
-//
-// NewListener is a convenience function for a common configuration.
-// More complex or custom configurations can use the autocert.Manager
-// type instead.
-//
-// Use of this function implies acceptance of the LetsEncrypt Terms of
-// Service. If domains is not empty, the provided domains are passed
-// to HostWhitelist. If domains is empty, the listener will do
-// LetsEncrypt challenges for any requested domain, which is not
-// recommended.
-//
-// Certificates are cached in a "golang-autocert" directory under an
-// operating system-specific cache or temp directory. This may not
-// be suitable for servers spanning multiple machines.
-//
-// The returned listener uses a *tls.Config that enables HTTP/2, and
-// should only be used with servers that support HTTP/2.
-//
-// The returned Listener also enables TCP keep-alives on the accepted
-// connections. The returned *tls.Conn are returned before their TLS
-// handshake has completed.
-func NewListener(domains ...string) net.Listener {
- m := &Manager{
- Prompt: AcceptTOS,
- }
- if len(domains) > 0 {
- m.HostPolicy = HostWhitelist(domains...)
- }
- dir := cacheDir()
- if err := os.MkdirAll(dir, 0700); err != nil {
- log.Printf("warning: autocert.NewListener not using a cache: %v", err)
- } else {
- m.Cache = DirCache(dir)
- }
- return m.Listener()
-}
-
-// Listener listens on the standard TLS port (443) on all interfaces
-// and returns a net.Listener returning *tls.Conn connections.
-//
-// The returned listener uses a *tls.Config that enables HTTP/2, and
-// should only be used with servers that support HTTP/2.
-//
-// The returned Listener also enables TCP keep-alives on the accepted
-// connections. The returned *tls.Conn are returned before their TLS
-// handshake has completed.
-//
-// Unlike NewListener, it is the caller's responsibility to initialize
-// the Manager m's Prompt, Cache, HostPolicy, and other desired options.
-func (m *Manager) Listener() net.Listener {
- ln := &listener{
- m: m,
- conf: &tls.Config{
- GetCertificate: m.GetCertificate, // bonus: panic on nil m
- NextProtos: []string{"h2", "http/1.1"}, // Enable HTTP/2
- },
- }
- ln.tcpListener, ln.tcpListenErr = net.Listen("tcp", ":443")
- return ln
-}
-
-type listener struct {
- m *Manager
- conf *tls.Config
-
- tcpListener net.Listener
- tcpListenErr error
-}
-
-func (ln *listener) Accept() (net.Conn, error) {
- if ln.tcpListenErr != nil {
- return nil, ln.tcpListenErr
- }
- conn, err := ln.tcpListener.Accept()
- if err != nil {
- return nil, err
- }
- tcpConn := conn.(*net.TCPConn)
-
- // Because Listener is a convenience function, help out with
- // this too. This is not possible for the caller to set once
- // we return a *tcp.Conn wrapping an inaccessible net.Conn.
- // If callers don't want this, they can do things the manual
- // way and tweak as needed. But this is what net/http does
- // itself, so copy that. If net/http changes, we can change
- // here too.
- tcpConn.SetKeepAlive(true)
- tcpConn.SetKeepAlivePeriod(3 * time.Minute)
-
- return tls.Server(tcpConn, ln.conf), nil
-}
-
-func (ln *listener) Addr() net.Addr {
- if ln.tcpListener != nil {
- return ln.tcpListener.Addr()
- }
- // net.Listen failed. Return something non-nil in case callers
- // call Addr before Accept:
- return &net.TCPAddr{IP: net.IP{0, 0, 0, 0}, Port: 443}
-}
-
-func (ln *listener) Close() error {
- if ln.tcpListenErr != nil {
- return ln.tcpListenErr
- }
- return ln.tcpListener.Close()
-}
-
-func homeDir() string {
- if runtime.GOOS == "windows" {
- return os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
- }
- if h := os.Getenv("HOME"); h != "" {
- return h
- }
- return "/"
-}
-
-func cacheDir() string {
- const base = "golang-autocert"
- switch runtime.GOOS {
- case "darwin":
- return filepath.Join(homeDir(), "Library", "Caches", base)
- case "windows":
- for _, ev := range []string{"APPDATA", "CSIDL_APPDATA", "TEMP", "TMP"} {
- if v := os.Getenv(ev); v != "" {
- return filepath.Join(v, base)
- }
- }
- // Worst case:
- return filepath.Join(homeDir(), base)
- }
- if xdg := os.Getenv("XDG_CACHE_HOME"); xdg != "" {
- return filepath.Join(xdg, base)
- }
- return filepath.Join(homeDir(), ".cache", base)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal.go
deleted file mode 100644
index 6c5da2bc8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2016 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 file.
-
-package autocert
-
-import (
- "context"
- "crypto"
- "sync"
- "time"
-)
-
-// renewJitter is the maximum deviation from Manager.RenewBefore.
-const renewJitter = time.Hour
-
-// domainRenewal tracks the state used by the periodic timers
-// renewing a single domain's cert.
-type domainRenewal struct {
- m *Manager
- domain string
- key crypto.Signer
-
- timerMu sync.Mutex
- timer *time.Timer
-}
-
-// start starts a cert renewal timer at the time
-// defined by the certificate expiration time exp.
-//
-// If the timer is already started, calling start is a noop.
-func (dr *domainRenewal) start(exp time.Time) {
- dr.timerMu.Lock()
- defer dr.timerMu.Unlock()
- if dr.timer != nil {
- return
- }
- dr.timer = time.AfterFunc(dr.next(exp), dr.renew)
-}
-
-// stop stops the cert renewal timer.
-// If the timer is already stopped, calling stop is a noop.
-func (dr *domainRenewal) stop() {
- dr.timerMu.Lock()
- defer dr.timerMu.Unlock()
- if dr.timer == nil {
- return
- }
- dr.timer.Stop()
- dr.timer = nil
-}
-
-// renew is called periodically by a timer.
-// The first renew call is kicked off by dr.start.
-func (dr *domainRenewal) renew() {
- dr.timerMu.Lock()
- defer dr.timerMu.Unlock()
- if dr.timer == nil {
- return
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
- defer cancel()
- // TODO: rotate dr.key at some point?
- next, err := dr.do(ctx)
- if err != nil {
- next = renewJitter / 2
- next += time.Duration(pseudoRand.int63n(int64(next)))
- }
- dr.timer = time.AfterFunc(next, dr.renew)
- testDidRenewLoop(next, err)
-}
-
-// do is similar to Manager.createCert but it doesn't lock a Manager.state item.
-// Instead, it requests a new certificate independently and, upon success,
-// replaces dr.m.state item with a new one and updates cache for the given domain.
-//
-// It may return immediately if the expiration date of the currently cached cert
-// is far enough in the future.
-//
-// The returned value is a time interval after which the renewal should occur again.
-func (dr *domainRenewal) do(ctx context.Context) (time.Duration, error) {
- // a race is likely unavoidable in a distributed environment
- // but we try nonetheless
- if tlscert, err := dr.m.cacheGet(ctx, dr.domain); err == nil {
- next := dr.next(tlscert.Leaf.NotAfter)
- if next > dr.m.renewBefore()+renewJitter {
- return next, nil
- }
- }
-
- der, leaf, err := dr.m.authorizedCert(ctx, dr.key, dr.domain)
- if err != nil {
- return 0, err
- }
- state := &certState{
- key: dr.key,
- cert: der,
- leaf: leaf,
- }
- tlscert, err := state.tlscert()
- if err != nil {
- return 0, err
- }
- dr.m.cachePut(ctx, dr.domain, tlscert)
- dr.m.stateMu.Lock()
- defer dr.m.stateMu.Unlock()
- // m.state is guaranteed to be non-nil at this point
- dr.m.state[dr.domain] = state
- return dr.next(leaf.NotAfter), nil
-}
-
-func (dr *domainRenewal) next(expiry time.Time) time.Duration {
- d := expiry.Sub(timeNow()) - dr.m.renewBefore()
- // add a bit of randomness to renew deadline
- n := pseudoRand.int63n(int64(renewJitter))
- d -= time.Duration(n)
- if d < 0 {
- return 0
- }
- return d
-}
-
-var testDidRenewLoop = func(next time.Duration, err error) {}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal_test.go
deleted file mode 100644
index 11d40ff5d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/autocert/renewal_test.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2016 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 file.
-
-package autocert
-
-import (
- "context"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/tls"
- "crypto/x509"
- "encoding/base64"
- "fmt"
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-
- "golang.org/x/crypto/acme"
-)
-
-func TestRenewalNext(t *testing.T) {
- now := time.Now()
- timeNow = func() time.Time { return now }
- defer func() { timeNow = time.Now }()
-
- man := &Manager{RenewBefore: 7 * 24 * time.Hour}
- defer man.stopRenew()
- tt := []struct {
- expiry time.Time
- min, max time.Duration
- }{
- {now.Add(90 * 24 * time.Hour), 83*24*time.Hour - renewJitter, 83 * 24 * time.Hour},
- {now.Add(time.Hour), 0, 1},
- {now, 0, 1},
- {now.Add(-time.Hour), 0, 1},
- }
-
- dr := &domainRenewal{m: man}
- for i, test := range tt {
- next := dr.next(test.expiry)
- if next < test.min || test.max < next {
- t.Errorf("%d: next = %v; want between %v and %v", i, next, test.min, test.max)
- }
- }
-}
-
-func TestRenewFromCache(t *testing.T) {
- const domain = "example.org"
-
- // ACME CA server stub
- var ca *httptest.Server
- ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Replay-Nonce", "nonce")
- if r.Method == "HEAD" {
- // a nonce request
- return
- }
-
- switch r.URL.Path {
- // discovery
- case "/":
- if err := discoTmpl.Execute(w, ca.URL); err != nil {
- t.Fatalf("discoTmpl: %v", err)
- }
- // client key registration
- case "/new-reg":
- w.Write([]byte("{}"))
- // domain authorization
- case "/new-authz":
- w.Header().Set("Location", ca.URL+"/authz/1")
- w.WriteHeader(http.StatusCreated)
- w.Write([]byte(`{"status": "valid"}`))
- // cert request
- case "/new-cert":
- var req struct {
- CSR string `json:"csr"`
- }
- decodePayload(&req, r.Body)
- b, _ := base64.RawURLEncoding.DecodeString(req.CSR)
- csr, err := x509.ParseCertificateRequest(b)
- if err != nil {
- t.Fatalf("new-cert: CSR: %v", err)
- }
- der, err := dummyCert(csr.PublicKey, domain)
- if err != nil {
- t.Fatalf("new-cert: dummyCert: %v", err)
- }
- chainUp := fmt.Sprintf("<%s/ca-cert>; rel=up", ca.URL)
- w.Header().Set("Link", chainUp)
- w.WriteHeader(http.StatusCreated)
- w.Write(der)
- // CA chain cert
- case "/ca-cert":
- der, err := dummyCert(nil, "ca")
- if err != nil {
- t.Fatalf("ca-cert: dummyCert: %v", err)
- }
- w.Write(der)
- default:
- t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path)
- }
- }))
- defer ca.Close()
-
- // use EC key to run faster on 386
- key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
- man := &Manager{
- Prompt: AcceptTOS,
- Cache: newMemCache(),
- RenewBefore: 24 * time.Hour,
- Client: &acme.Client{
- Key: key,
- DirectoryURL: ca.URL,
- },
- }
- defer man.stopRenew()
-
- // cache an almost expired cert
- now := time.Now()
- cert, err := dateDummyCert(key.Public(), now.Add(-2*time.Hour), now.Add(time.Minute), domain)
- if err != nil {
- t.Fatal(err)
- }
- tlscert := &tls.Certificate{PrivateKey: key, Certificate: [][]byte{cert}}
- if err := man.cachePut(context.Background(), domain, tlscert); err != nil {
- t.Fatal(err)
- }
-
- // veriy the renewal happened
- defer func() {
- testDidRenewLoop = func(next time.Duration, err error) {}
- }()
- done := make(chan struct{})
- testDidRenewLoop = func(next time.Duration, err error) {
- defer close(done)
- if err != nil {
- t.Errorf("testDidRenewLoop: %v", err)
- }
- // Next should be about 90 days:
- // dummyCert creates 90days expiry + account for man.RenewBefore.
- // Previous expiration was within 1 min.
- future := 88 * 24 * time.Hour
- if next < future {
- t.Errorf("testDidRenewLoop: next = %v; want >= %v", next, future)
- }
-
- // ensure the new cert is cached
- after := time.Now().Add(future)
- tlscert, err := man.cacheGet(context.Background(), domain)
- if err != nil {
- t.Fatalf("man.cacheGet: %v", err)
- }
- if !tlscert.Leaf.NotAfter.After(after) {
- t.Errorf("cache leaf.NotAfter = %v; want > %v", tlscert.Leaf.NotAfter, after)
- }
-
- // verify the old cert is also replaced in memory
- man.stateMu.Lock()
- defer man.stateMu.Unlock()
- s := man.state[domain]
- if s == nil {
- t.Fatalf("m.state[%q] is nil", domain)
- }
- tlscert, err = s.tlscert()
- if err != nil {
- t.Fatalf("s.tlscert: %v", err)
- }
- if !tlscert.Leaf.NotAfter.After(after) {
- t.Errorf("state leaf.NotAfter = %v; want > %v", tlscert.Leaf.NotAfter, after)
- }
- }
-
- // trigger renew
- hello := &tls.ClientHelloInfo{ServerName: domain}
- if _, err := man.GetCertificate(hello); err != nil {
- t.Fatal(err)
- }
-
- // wait for renew loop
- select {
- case <-time.After(10 * time.Second):
- t.Fatal("renew took too long to occur")
- case <-done:
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws.go
deleted file mode 100644
index 6cbca25de..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws.go
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2015 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 file.
-
-package acme
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/rand"
- "crypto/rsa"
- "crypto/sha256"
- _ "crypto/sha512" // need for EC keys
- "encoding/base64"
- "encoding/json"
- "fmt"
- "math/big"
-)
-
-// jwsEncodeJSON signs claimset using provided key and a nonce.
-// The result is serialized in JSON format.
-// See https://tools.ietf.org/html/rfc7515#section-7.
-func jwsEncodeJSON(claimset interface{}, key crypto.Signer, nonce string) ([]byte, error) {
- jwk, err := jwkEncode(key.Public())
- if err != nil {
- return nil, err
- }
- alg, sha := jwsHasher(key)
- if alg == "" || !sha.Available() {
- return nil, ErrUnsupportedKey
- }
- phead := fmt.Sprintf(`{"alg":%q,"jwk":%s,"nonce":%q}`, alg, jwk, nonce)
- phead = base64.RawURLEncoding.EncodeToString([]byte(phead))
- cs, err := json.Marshal(claimset)
- if err != nil {
- return nil, err
- }
- payload := base64.RawURLEncoding.EncodeToString(cs)
- hash := sha.New()
- hash.Write([]byte(phead + "." + payload))
- sig, err := jwsSign(key, sha, hash.Sum(nil))
- if err != nil {
- return nil, err
- }
-
- enc := struct {
- Protected string `json:"protected"`
- Payload string `json:"payload"`
- Sig string `json:"signature"`
- }{
- Protected: phead,
- Payload: payload,
- Sig: base64.RawURLEncoding.EncodeToString(sig),
- }
- return json.Marshal(&enc)
-}
-
-// jwkEncode encodes public part of an RSA or ECDSA key into a JWK.
-// The result is also suitable for creating a JWK thumbprint.
-// https://tools.ietf.org/html/rfc7517
-func jwkEncode(pub crypto.PublicKey) (string, error) {
- switch pub := pub.(type) {
- case *rsa.PublicKey:
- // https://tools.ietf.org/html/rfc7518#section-6.3.1
- n := pub.N
- e := big.NewInt(int64(pub.E))
- // Field order is important.
- // See https://tools.ietf.org/html/rfc7638#section-3.3 for details.
- return fmt.Sprintf(`{"e":"%s","kty":"RSA","n":"%s"}`,
- base64.RawURLEncoding.EncodeToString(e.Bytes()),
- base64.RawURLEncoding.EncodeToString(n.Bytes()),
- ), nil
- case *ecdsa.PublicKey:
- // https://tools.ietf.org/html/rfc7518#section-6.2.1
- p := pub.Curve.Params()
- n := p.BitSize / 8
- if p.BitSize%8 != 0 {
- n++
- }
- x := pub.X.Bytes()
- if n > len(x) {
- x = append(make([]byte, n-len(x)), x...)
- }
- y := pub.Y.Bytes()
- if n > len(y) {
- y = append(make([]byte, n-len(y)), y...)
- }
- // Field order is important.
- // See https://tools.ietf.org/html/rfc7638#section-3.3 for details.
- return fmt.Sprintf(`{"crv":"%s","kty":"EC","x":"%s","y":"%s"}`,
- p.Name,
- base64.RawURLEncoding.EncodeToString(x),
- base64.RawURLEncoding.EncodeToString(y),
- ), nil
- }
- return "", ErrUnsupportedKey
-}
-
-// jwsSign signs the digest using the given key.
-// It returns ErrUnsupportedKey if the key type is unknown.
-// The hash is used only for RSA keys.
-func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error) {
- switch key := key.(type) {
- case *rsa.PrivateKey:
- return key.Sign(rand.Reader, digest, hash)
- case *ecdsa.PrivateKey:
- r, s, err := ecdsa.Sign(rand.Reader, key, digest)
- if err != nil {
- return nil, err
- }
- rb, sb := r.Bytes(), s.Bytes()
- size := key.Params().BitSize / 8
- if size%8 > 0 {
- size++
- }
- sig := make([]byte, size*2)
- copy(sig[size-len(rb):], rb)
- copy(sig[size*2-len(sb):], sb)
- return sig, nil
- }
- return nil, ErrUnsupportedKey
-}
-
-// jwsHasher indicates suitable JWS algorithm name and a hash function
-// to use for signing a digest with the provided key.
-// It returns ("", 0) if the key is not supported.
-func jwsHasher(key crypto.Signer) (string, crypto.Hash) {
- switch key := key.(type) {
- case *rsa.PrivateKey:
- return "RS256", crypto.SHA256
- case *ecdsa.PrivateKey:
- switch key.Params().Name {
- case "P-256":
- return "ES256", crypto.SHA256
- case "P-384":
- return "ES384", crypto.SHA384
- case "P-521":
- return "ES512", crypto.SHA512
- }
- }
- return "", 0
-}
-
-// JWKThumbprint creates a JWK thumbprint out of pub
-// as specified in https://tools.ietf.org/html/rfc7638.
-func JWKThumbprint(pub crypto.PublicKey) (string, error) {
- jwk, err := jwkEncode(pub)
- if err != nil {
- return "", err
- }
- b := sha256.Sum256([]byte(jwk))
- return base64.RawURLEncoding.EncodeToString(b[:]), nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws_test.go
deleted file mode 100644
index 0ff0fb5a3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/jws_test.go
+++ /dev/null
@@ -1,319 +0,0 @@
-// Copyright 2015 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 file.
-
-package acme
-
-import (
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rsa"
- "crypto/x509"
- "encoding/base64"
- "encoding/json"
- "encoding/pem"
- "fmt"
- "math/big"
- "testing"
-)
-
-const (
- testKeyPEM = `
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEA4xgZ3eRPkwoRvy7qeRUbmMDe0V+xH9eWLdu0iheeLlrmD2mq
-WXfP9IeSKApbn34g8TuAS9g5zhq8ELQ3kmjr+KV86GAMgI6VAcGlq3QrzpTCf/30
-Ab7+zawrfRaFONa1HwEzPY1KHnGVkxJc85gNkwYI9SY2RHXtvln3zs5wITNrdosq
-EXeaIkVYBEhbhNu54pp3kxo6TuWLi9e6pXeWetEwmlBwtWZlPoib2j3TxLBksKZf
-oyFyek380mHgJAumQ/I2fjj98/97mk3ihOY4AgVdCDj1z/GCoZkG5Rq7nbCGyosy
-KWyDX00Zs+nNqVhoLeIvXC4nnWdJMZ6rogxyQQIDAQABAoIBACIEZTOI1Kao9nmV
-9IeIsuaR1Y61b9neOF/MLmIVIZu+AAJFCMB4Iw11FV6sFodwpEyeZhx2WkpWVN+H
-r19eGiLX3zsL0DOdqBJoSIHDWCCMxgnYJ6nvS0nRxX3qVrBp8R2g12Ub+gNPbmFm
-ecf/eeERIVxfifd9VsyRu34eDEvcmKFuLYbElFcPh62xE3x12UZvV/sN7gXbawpP
-G+w255vbE5MoaKdnnO83cTFlcHvhn24M/78qP7Te5OAeelr1R89kYxQLpuGe4fbS
-zc6E3ym5Td6urDetGGrSY1Eu10/8sMusX+KNWkm+RsBRbkyKq72ks/qKpOxOa+c6
-9gm+Y8ECgYEA/iNUyg1ubRdH11p82l8KHtFC1DPE0V1gSZsX29TpM5jS4qv46K+s
-8Ym1zmrORM8x+cynfPx1VQZQ34EYeCMIX212ryJ+zDATl4NE0I4muMvSiH9vx6Xc
-7FmhNnaYzPsBL5Tm9nmtQuP09YEn8poiOJFiDs/4olnD5ogA5O4THGkCgYEA5MIL
-qWYBUuqbEWLRtMruUtpASclrBqNNsJEsMGbeqBJmoMxdHeSZckbLOrqm7GlMyNRJ
-Ne/5uWRGSzaMYuGmwsPpERzqEvYFnSrpjW5YtXZ+JtxFXNVfm9Z1gLLgvGpOUCIU
-RbpoDckDe1vgUuk3y5+DjZihs+rqIJ45XzXTzBkCgYBWuf3segruJZy5rEKhTv+o
-JqeUvRn0jNYYKFpLBeyTVBrbie6GkbUGNIWbrK05pC+c3K9nosvzuRUOQQL1tJbd
-4gA3oiD9U4bMFNr+BRTHyZ7OQBcIXdz3t1qhuHVKtnngIAN1p25uPlbRFUNpshnt
-jgeVoHlsBhApcs5DUc+pyQKBgDzeHPg/+g4z+nrPznjKnktRY1W+0El93kgi+J0Q
-YiJacxBKEGTJ1MKBb8X6sDurcRDm22wMpGfd9I5Cv2v4GsUsF7HD/cx5xdih+G73
-c4clNj/k0Ff5Nm1izPUno4C+0IOl7br39IPmfpSuR6wH/h6iHQDqIeybjxyKvT1G
-N0rRAoGBAKGD+4ZI/E1MoJ5CXB8cDDMHagbE3cq/DtmYzE2v1DFpQYu5I4PCm5c7
-EQeIP6dZtv8IMgtGIb91QX9pXvP0aznzQKwYIA8nZgoENCPfiMTPiEDT9e/0lObO
-9XWsXpbSTsRPj0sv1rB+UzBJ0PgjK4q2zOF0sNo7b1+6nlM3BWPx
------END RSA PRIVATE KEY-----
-`
-
- // This thumbprint is for the testKey defined above.
- testKeyThumbprint = "6nicxzh6WETQlrvdchkz-U3e3DOQZ4heJKU63rfqMqQ"
-
- // openssl ecparam -name secp256k1 -genkey -noout
- testKeyECPEM = `
------BEGIN EC PRIVATE KEY-----
-MHcCAQEEIK07hGLr0RwyUdYJ8wbIiBS55CjnkMD23DWr+ccnypWLoAoGCCqGSM49
-AwEHoUQDQgAE5lhEug5xK4xBDZ2nAbaxLtaLiv85bxJ7ePd1dkO23HThqIrvawF5
-QAaS/RNouybCiRhRjI3EaxLkQwgrCw0gqQ==
------END EC PRIVATE KEY-----
-`
- // openssl ecparam -name secp384r1 -genkey -noout
- testKeyEC384PEM = `
------BEGIN EC PRIVATE KEY-----
-MIGkAgEBBDAQ4lNtXRORWr1bgKR1CGysr9AJ9SyEk4jiVnlUWWUChmSNL+i9SLSD
-Oe/naPqXJ6CgBwYFK4EEACKhZANiAAQzKtj+Ms0vHoTX5dzv3/L5YMXOWuI5UKRj
-JigpahYCqXD2BA1j0E/2xt5vlPf+gm0PL+UHSQsCokGnIGuaHCsJAp3ry0gHQEke
-WYXapUUFdvaK1R2/2hn5O+eiQM8YzCg=
------END EC PRIVATE KEY-----
-`
- // openssl ecparam -name secp521r1 -genkey -noout
- testKeyEC512PEM = `
------BEGIN EC PRIVATE KEY-----
-MIHcAgEBBEIBSNZKFcWzXzB/aJClAb305ibalKgtDA7+70eEkdPt28/3LZMM935Z
-KqYHh/COcxuu3Kt8azRAUz3gyr4zZKhlKUSgBwYFK4EEACOhgYkDgYYABAHUNKbx
-7JwC7H6pa2sV0tERWhHhB3JmW+OP6SUgMWryvIKajlx73eS24dy4QPGrWO9/ABsD
-FqcRSkNVTXnIv6+0mAF25knqIBIg5Q8M9BnOu9GGAchcwt3O7RDHmqewnJJDrbjd
-GGnm6rb+NnWR9DIopM0nKNkToWoF/hzopxu4Ae/GsQ==
------END EC PRIVATE KEY-----
-`
- // 1. openssl ec -in key.pem -noout -text
- // 2. remove first byte, 04 (the header); the rest is X and Y
- // 3. convert each with: echo <val> | xxd -r -p | base64 -w 100 | tr -d '=' | tr '/+' '_-'
- testKeyECPubX = "5lhEug5xK4xBDZ2nAbaxLtaLiv85bxJ7ePd1dkO23HQ"
- testKeyECPubY = "4aiK72sBeUAGkv0TaLsmwokYUYyNxGsS5EMIKwsNIKk"
- testKeyEC384PubX = "MyrY_jLNLx6E1-Xc79_y-WDFzlriOVCkYyYoKWoWAqlw9gQNY9BP9sbeb5T3_oJt"
- testKeyEC384PubY = "Dy_lB0kLAqJBpyBrmhwrCQKd68tIB0BJHlmF2qVFBXb2itUdv9oZ-TvnokDPGMwo"
- testKeyEC512PubX = "AdQ0pvHsnALsfqlraxXS0RFaEeEHcmZb44_pJSAxavK8gpqOXHvd5Lbh3LhA8atY738AGwMWpxFKQ1VNeci_r7SY"
- testKeyEC512PubY = "AXbmSeogEiDlDwz0Gc670YYByFzC3c7tEMeap7CckkOtuN0Yaebqtv42dZH0MiikzSco2ROhagX-HOinG7gB78ax"
-
- // echo -n '{"crv":"P-256","kty":"EC","x":"<testKeyECPubX>","y":"<testKeyECPubY>"}' | \
- // openssl dgst -binary -sha256 | base64 | tr -d '=' | tr '/+' '_-'
- testKeyECThumbprint = "zedj-Bd1Zshp8KLePv2MB-lJ_Hagp7wAwdkA0NUTniU"
-)
-
-var (
- testKey *rsa.PrivateKey
- testKeyEC *ecdsa.PrivateKey
- testKeyEC384 *ecdsa.PrivateKey
- testKeyEC512 *ecdsa.PrivateKey
-)
-
-func init() {
- testKey = parseRSA(testKeyPEM, "testKeyPEM")
- testKeyEC = parseEC(testKeyECPEM, "testKeyECPEM")
- testKeyEC384 = parseEC(testKeyEC384PEM, "testKeyEC384PEM")
- testKeyEC512 = parseEC(testKeyEC512PEM, "testKeyEC512PEM")
-}
-
-func decodePEM(s, name string) []byte {
- d, _ := pem.Decode([]byte(s))
- if d == nil {
- panic("no block found in " + name)
- }
- return d.Bytes
-}
-
-func parseRSA(s, name string) *rsa.PrivateKey {
- b := decodePEM(s, name)
- k, err := x509.ParsePKCS1PrivateKey(b)
- if err != nil {
- panic(fmt.Sprintf("%s: %v", name, err))
- }
- return k
-}
-
-func parseEC(s, name string) *ecdsa.PrivateKey {
- b := decodePEM(s, name)
- k, err := x509.ParseECPrivateKey(b)
- if err != nil {
- panic(fmt.Sprintf("%s: %v", name, err))
- }
- return k
-}
-
-func TestJWSEncodeJSON(t *testing.T) {
- claims := struct{ Msg string }{"Hello JWS"}
- // JWS signed with testKey and "nonce" as the nonce value
- // JSON-serialized JWS fields are split for easier testing
- const (
- // {"alg":"RS256","jwk":{"e":"AQAB","kty":"RSA","n":"..."},"nonce":"nonce"}
- protected = "eyJhbGciOiJSUzI1NiIsImp3ayI6eyJlIjoiQVFBQiIsImt0eSI6" +
- "IlJTQSIsIm4iOiI0eGdaM2VSUGt3b1J2eTdxZVJVYm1NRGUwVi14" +
- "SDllV0xkdTBpaGVlTGxybUQybXFXWGZQOUllU0tBcGJuMzRnOFR1" +
- "QVM5ZzV6aHE4RUxRM2ttanItS1Y4NkdBTWdJNlZBY0dscTNRcnpw" +
- "VENmXzMwQWI3LXphd3JmUmFGT05hMUh3RXpQWTFLSG5HVmt4SmM4" +
- "NWdOa3dZSTlTWTJSSFh0dmxuM3pzNXdJVE5yZG9zcUVYZWFJa1ZZ" +
- "QkVoYmhOdTU0cHAza3hvNlR1V0xpOWU2cFhlV2V0RXdtbEJ3dFda" +
- "bFBvaWIyajNUeExCa3NLWmZveUZ5ZWszODBtSGdKQXVtUV9JMmZq" +
- "ajk4Xzk3bWszaWhPWTRBZ1ZkQ0RqMXpfR0NvWmtHNVJxN25iQ0d5" +
- "b3N5S1d5RFgwMFpzLW5OcVZob0xlSXZYQzRubldkSk1aNnJvZ3h5" +
- "UVEifSwibm9uY2UiOiJub25jZSJ9"
- // {"Msg":"Hello JWS"}
- payload = "eyJNc2ciOiJIZWxsbyBKV1MifQ"
- signature = "eAGUikStX_UxyiFhxSLMyuyBcIB80GeBkFROCpap2sW3EmkU_ggF" +
- "knaQzxrTfItICSAXsCLIquZ5BbrSWA_4vdEYrwWtdUj7NqFKjHRa" +
- "zpLHcoR7r1rEHvkoP1xj49lS5fc3Wjjq8JUhffkhGbWZ8ZVkgPdC" +
- "4tMBWiQDoth-x8jELP_3LYOB_ScUXi2mETBawLgOT2K8rA0Vbbmx" +
- "hWNlOWuUf-8hL5YX4IOEwsS8JK_TrTq5Zc9My0zHJmaieqDV0UlP" +
- "k0onFjPFkGm7MrPSgd0MqRG-4vSAg2O4hDo7rKv4n8POjjXlNQvM" +
- "9IPLr8qZ7usYBKhEGwX3yq_eicAwBw"
- )
-
- b, err := jwsEncodeJSON(claims, testKey, "nonce")
- if err != nil {
- t.Fatal(err)
- }
- var jws struct{ Protected, Payload, Signature string }
- if err := json.Unmarshal(b, &jws); err != nil {
- t.Fatal(err)
- }
- if jws.Protected != protected {
- t.Errorf("protected:\n%s\nwant:\n%s", jws.Protected, protected)
- }
- if jws.Payload != payload {
- t.Errorf("payload:\n%s\nwant:\n%s", jws.Payload, payload)
- }
- if jws.Signature != signature {
- t.Errorf("signature:\n%s\nwant:\n%s", jws.Signature, signature)
- }
-}
-
-func TestJWSEncodeJSONEC(t *testing.T) {
- tt := []struct {
- key *ecdsa.PrivateKey
- x, y string
- alg, crv string
- }{
- {testKeyEC, testKeyECPubX, testKeyECPubY, "ES256", "P-256"},
- {testKeyEC384, testKeyEC384PubX, testKeyEC384PubY, "ES384", "P-384"},
- {testKeyEC512, testKeyEC512PubX, testKeyEC512PubY, "ES512", "P-521"},
- }
- for i, test := range tt {
- claims := struct{ Msg string }{"Hello JWS"}
- b, err := jwsEncodeJSON(claims, test.key, "nonce")
- if err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
- var jws struct{ Protected, Payload, Signature string }
- if err := json.Unmarshal(b, &jws); err != nil {
- t.Errorf("%d: %v", i, err)
- continue
- }
-
- b, err = base64.RawURLEncoding.DecodeString(jws.Protected)
- if err != nil {
- t.Errorf("%d: jws.Protected: %v", i, err)
- }
- var head struct {
- Alg string
- Nonce string
- JWK struct {
- Crv string
- Kty string
- X string
- Y string
- } `json:"jwk"`
- }
- if err := json.Unmarshal(b, &head); err != nil {
- t.Errorf("%d: jws.Protected: %v", i, err)
- }
- if head.Alg != test.alg {
- t.Errorf("%d: head.Alg = %q; want %q", i, head.Alg, test.alg)
- }
- if head.Nonce != "nonce" {
- t.Errorf("%d: head.Nonce = %q; want nonce", i, head.Nonce)
- }
- if head.JWK.Crv != test.crv {
- t.Errorf("%d: head.JWK.Crv = %q; want %q", i, head.JWK.Crv, test.crv)
- }
- if head.JWK.Kty != "EC" {
- t.Errorf("%d: head.JWK.Kty = %q; want EC", i, head.JWK.Kty)
- }
- if head.JWK.X != test.x {
- t.Errorf("%d: head.JWK.X = %q; want %q", i, head.JWK.X, test.x)
- }
- if head.JWK.Y != test.y {
- t.Errorf("%d: head.JWK.Y = %q; want %q", i, head.JWK.Y, test.y)
- }
- }
-}
-
-func TestJWKThumbprintRSA(t *testing.T) {
- // Key example from RFC 7638
- const base64N = "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAt" +
- "VT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn6" +
- "4tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FD" +
- "W2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n9" +
- "1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINH" +
- "aQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw"
- const base64E = "AQAB"
- const expected = "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs"
-
- b, err := base64.RawURLEncoding.DecodeString(base64N)
- if err != nil {
- t.Fatalf("Error parsing example key N: %v", err)
- }
- n := new(big.Int).SetBytes(b)
-
- b, err = base64.RawURLEncoding.DecodeString(base64E)
- if err != nil {
- t.Fatalf("Error parsing example key E: %v", err)
- }
- e := new(big.Int).SetBytes(b)
-
- pub := &rsa.PublicKey{N: n, E: int(e.Uint64())}
- th, err := JWKThumbprint(pub)
- if err != nil {
- t.Error(err)
- }
- if th != expected {
- t.Errorf("thumbprint = %q; want %q", th, expected)
- }
-}
-
-func TestJWKThumbprintEC(t *testing.T) {
- // Key example from RFC 7520
- // expected was computed with
- // echo -n '{"crv":"P-521","kty":"EC","x":"<base64X>","y":"<base64Y>"}' | \
- // openssl dgst -binary -sha256 | \
- // base64 | \
- // tr -d '=' | tr '/+' '_-'
- const (
- base64X = "AHKZLLOsCOzz5cY97ewNUajB957y-C-U88c3v13nmGZx6sYl_oJXu9A5RkT" +
- "KqjqvjyekWF-7ytDyRXYgCF5cj0Kt"
- base64Y = "AdymlHvOiLxXkEhayXQnNCvDX4h9htZaCJN34kfmC6pV5OhQHiraVySsUda" +
- "QkAgDPrwQrJmbnX9cwlGfP-HqHZR1"
- expected = "dHri3SADZkrush5HU_50AoRhcKFryN-PI6jPBtPL55M"
- )
-
- b, err := base64.RawURLEncoding.DecodeString(base64X)
- if err != nil {
- t.Fatalf("Error parsing example key X: %v", err)
- }
- x := new(big.Int).SetBytes(b)
-
- b, err = base64.RawURLEncoding.DecodeString(base64Y)
- if err != nil {
- t.Fatalf("Error parsing example key Y: %v", err)
- }
- y := new(big.Int).SetBytes(b)
-
- pub := &ecdsa.PublicKey{Curve: elliptic.P521(), X: x, Y: y}
- th, err := JWKThumbprint(pub)
- if err != nil {
- t.Error(err)
- }
- if th != expected {
- t.Errorf("thumbprint = %q; want %q", th, expected)
- }
-}
-
-func TestJWKThumbprintErrUnsupportedKey(t *testing.T) {
- _, err := JWKThumbprint(struct{}{})
- if err != ErrUnsupportedKey {
- t.Errorf("err = %q; want %q", err, ErrUnsupportedKey)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types.go
deleted file mode 100644
index 3e199749e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types.go
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright 2016 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 file.
-
-package acme
-
-import (
- "crypto"
- "crypto/x509"
- "errors"
- "fmt"
- "net/http"
- "strings"
- "time"
-)
-
-// ACME server response statuses used to describe Authorization and Challenge states.
-const (
- StatusUnknown = "unknown"
- StatusPending = "pending"
- StatusProcessing = "processing"
- StatusValid = "valid"
- StatusInvalid = "invalid"
- StatusRevoked = "revoked"
-)
-
-// CRLReasonCode identifies the reason for a certificate revocation.
-type CRLReasonCode int
-
-// CRL reason codes as defined in RFC 5280.
-const (
- CRLReasonUnspecified CRLReasonCode = 0
- CRLReasonKeyCompromise CRLReasonCode = 1
- CRLReasonCACompromise CRLReasonCode = 2
- CRLReasonAffiliationChanged CRLReasonCode = 3
- CRLReasonSuperseded CRLReasonCode = 4
- CRLReasonCessationOfOperation CRLReasonCode = 5
- CRLReasonCertificateHold CRLReasonCode = 6
- CRLReasonRemoveFromCRL CRLReasonCode = 8
- CRLReasonPrivilegeWithdrawn CRLReasonCode = 9
- CRLReasonAACompromise CRLReasonCode = 10
-)
-
-// ErrUnsupportedKey is returned when an unsupported key type is encountered.
-var ErrUnsupportedKey = errors.New("acme: unknown key type; only RSA and ECDSA are supported")
-
-// Error is an ACME error, defined in Problem Details for HTTP APIs doc
-// http://tools.ietf.org/html/draft-ietf-appsawg-http-problem.
-type Error struct {
- // StatusCode is The HTTP status code generated by the origin server.
- StatusCode int
- // ProblemType is a URI reference that identifies the problem type,
- // typically in a "urn:acme:error:xxx" form.
- ProblemType string
- // Detail is a human-readable explanation specific to this occurrence of the problem.
- Detail string
- // Header is the original server error response headers.
- // It may be nil.
- Header http.Header
-}
-
-func (e *Error) Error() string {
- return fmt.Sprintf("%d %s: %s", e.StatusCode, e.ProblemType, e.Detail)
-}
-
-// AuthorizationError indicates that an authorization for an identifier
-// did not succeed.
-// It contains all errors from Challenge items of the failed Authorization.
-type AuthorizationError struct {
- // URI uniquely identifies the failed Authorization.
- URI string
-
- // Identifier is an AuthzID.Value of the failed Authorization.
- Identifier string
-
- // Errors is a collection of non-nil error values of Challenge items
- // of the failed Authorization.
- Errors []error
-}
-
-func (a *AuthorizationError) Error() string {
- e := make([]string, len(a.Errors))
- for i, err := range a.Errors {
- e[i] = err.Error()
- }
- return fmt.Sprintf("acme: authorization error for %s: %s", a.Identifier, strings.Join(e, "; "))
-}
-
-// RateLimit reports whether err represents a rate limit error and
-// any Retry-After duration returned by the server.
-//
-// See the following for more details on rate limiting:
-// https://tools.ietf.org/html/draft-ietf-acme-acme-05#section-5.6
-func RateLimit(err error) (time.Duration, bool) {
- e, ok := err.(*Error)
- if !ok {
- return 0, false
- }
- // Some CA implementations may return incorrect values.
- // Use case-insensitive comparison.
- if !strings.HasSuffix(strings.ToLower(e.ProblemType), ":ratelimited") {
- return 0, false
- }
- if e.Header == nil {
- return 0, true
- }
- return retryAfter(e.Header.Get("Retry-After"), 0), true
-}
-
-// Account is a user account. It is associated with a private key.
-type Account struct {
- // URI is the account unique ID, which is also a URL used to retrieve
- // account data from the CA.
- URI string
-
- // Contact is a slice of contact info used during registration.
- Contact []string
-
- // The terms user has agreed to.
- // A value not matching CurrentTerms indicates that the user hasn't agreed
- // to the actual Terms of Service of the CA.
- AgreedTerms string
-
- // Actual terms of a CA.
- CurrentTerms string
-
- // Authz is the authorization URL used to initiate a new authz flow.
- Authz string
-
- // Authorizations is a URI from which a list of authorizations
- // granted to this account can be fetched via a GET request.
- Authorizations string
-
- // Certificates is a URI from which a list of certificates
- // issued for this account can be fetched via a GET request.
- Certificates string
-}
-
-// Directory is ACME server discovery data.
-type Directory struct {
- // RegURL is an account endpoint URL, allowing for creating new
- // and modifying existing accounts.
- RegURL string
-
- // AuthzURL is used to initiate Identifier Authorization flow.
- AuthzURL string
-
- // CertURL is a new certificate issuance endpoint URL.
- CertURL string
-
- // RevokeURL is used to initiate a certificate revocation flow.
- RevokeURL string
-
- // Term is a URI identifying the current terms of service.
- Terms string
-
- // Website is an HTTP or HTTPS URL locating a website
- // providing more information about the ACME server.
- Website string
-
- // CAA consists of lowercase hostname elements, which the ACME server
- // recognises as referring to itself for the purposes of CAA record validation
- // as defined in RFC6844.
- CAA []string
-}
-
-// Challenge encodes a returned CA challenge.
-// Its Error field may be non-nil if the challenge is part of an Authorization
-// with StatusInvalid.
-type Challenge struct {
- // Type is the challenge type, e.g. "http-01", "tls-sni-02", "dns-01".
- Type string
-
- // URI is where a challenge response can be posted to.
- URI string
-
- // Token is a random value that uniquely identifies the challenge.
- Token string
-
- // Status identifies the status of this challenge.
- Status string
-
- // Error indicates the reason for an authorization failure
- // when this challenge was used.
- // The type of a non-nil value is *Error.
- Error error
-}
-
-// Authorization encodes an authorization response.
-type Authorization struct {
- // URI uniquely identifies a authorization.
- URI string
-
- // Status identifies the status of an authorization.
- Status string
-
- // Identifier is what the account is authorized to represent.
- Identifier AuthzID
-
- // Challenges that the client needs to fulfill in order to prove possession
- // of the identifier (for pending authorizations).
- // For final authorizations, the challenges that were used.
- Challenges []*Challenge
-
- // A collection of sets of challenges, each of which would be sufficient
- // to prove possession of the identifier.
- // Clients must complete a set of challenges that covers at least one set.
- // Challenges are identified by their indices in the challenges array.
- // If this field is empty, the client needs to complete all challenges.
- Combinations [][]int
-}
-
-// AuthzID is an identifier that an account is authorized to represent.
-type AuthzID struct {
- Type string // The type of identifier, e.g. "dns".
- Value string // The identifier itself, e.g. "example.org".
-}
-
-// wireAuthz is ACME JSON representation of Authorization objects.
-type wireAuthz struct {
- Status string
- Challenges []wireChallenge
- Combinations [][]int
- Identifier struct {
- Type string
- Value string
- }
-}
-
-func (z *wireAuthz) authorization(uri string) *Authorization {
- a := &Authorization{
- URI: uri,
- Status: z.Status,
- Identifier: AuthzID{Type: z.Identifier.Type, Value: z.Identifier.Value},
- Combinations: z.Combinations, // shallow copy
- Challenges: make([]*Challenge, len(z.Challenges)),
- }
- for i, v := range z.Challenges {
- a.Challenges[i] = v.challenge()
- }
- return a
-}
-
-func (z *wireAuthz) error(uri string) *AuthorizationError {
- err := &AuthorizationError{
- URI: uri,
- Identifier: z.Identifier.Value,
- }
- for _, raw := range z.Challenges {
- if raw.Error != nil {
- err.Errors = append(err.Errors, raw.Error.error(nil))
- }
- }
- return err
-}
-
-// wireChallenge is ACME JSON challenge representation.
-type wireChallenge struct {
- URI string `json:"uri"`
- Type string
- Token string
- Status string
- Error *wireError
-}
-
-func (c *wireChallenge) challenge() *Challenge {
- v := &Challenge{
- URI: c.URI,
- Type: c.Type,
- Token: c.Token,
- Status: c.Status,
- }
- if v.Status == "" {
- v.Status = StatusPending
- }
- if c.Error != nil {
- v.Error = c.Error.error(nil)
- }
- return v
-}
-
-// wireError is a subset of fields of the Problem Details object
-// as described in https://tools.ietf.org/html/rfc7807#section-3.1.
-type wireError struct {
- Status int
- Type string
- Detail string
-}
-
-func (e *wireError) error(h http.Header) *Error {
- return &Error{
- StatusCode: e.Status,
- ProblemType: e.Type,
- Detail: e.Detail,
- Header: h,
- }
-}
-
-// CertOption is an optional argument type for the TLSSNIxChallengeCert methods for
-// customizing a temporary certificate for TLS-SNI challenges.
-type CertOption interface {
- privateCertOpt()
-}
-
-// WithKey creates an option holding a private/public key pair.
-// The private part signs a certificate, and the public part represents the signee.
-func WithKey(key crypto.Signer) CertOption {
- return &certOptKey{key}
-}
-
-type certOptKey struct {
- key crypto.Signer
-}
-
-func (*certOptKey) privateCertOpt() {}
-
-// WithTemplate creates an option for specifying a certificate template.
-// See x509.CreateCertificate for template usage details.
-//
-// In TLSSNIxChallengeCert methods, the template is also used as parent,
-// resulting in a self-signed certificate.
-// The DNSNames field of t is always overwritten for tls-sni challenge certs.
-func WithTemplate(t *x509.Certificate) CertOption {
- return (*certOptTemplate)(t)
-}
-
-type certOptTemplate x509.Certificate
-
-func (*certOptTemplate) privateCertOpt() {}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types_test.go
deleted file mode 100644
index a7553e6b7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/acme/types_test.go
+++ /dev/null
@@ -1,63 +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 file.
-
-package acme
-
-import (
- "errors"
- "net/http"
- "testing"
- "time"
-)
-
-func TestRateLimit(t *testing.T) {
- now := time.Date(2017, 04, 27, 10, 0, 0, 0, time.UTC)
- f := timeNow
- defer func() { timeNow = f }()
- timeNow = func() time.Time { return now }
-
- h120, hTime := http.Header{}, http.Header{}
- h120.Set("Retry-After", "120")
- hTime.Set("Retry-After", "Tue Apr 27 11:00:00 2017")
-
- err1 := &Error{
- ProblemType: "urn:ietf:params:acme:error:nolimit",
- Header: h120,
- }
- err2 := &Error{
- ProblemType: "urn:ietf:params:acme:error:rateLimited",
- Header: h120,
- }
- err3 := &Error{
- ProblemType: "urn:ietf:params:acme:error:rateLimited",
- Header: nil,
- }
- err4 := &Error{
- ProblemType: "urn:ietf:params:acme:error:rateLimited",
- Header: hTime,
- }
-
- tt := []struct {
- err error
- res time.Duration
- ok bool
- }{
- {nil, 0, false},
- {errors.New("dummy"), 0, false},
- {err1, 0, false},
- {err2, 2 * time.Minute, true},
- {err3, 0, true},
- {err4, time.Hour, true},
- }
- for i, test := range tt {
- res, ok := RateLimit(test.err)
- if ok != test.ok {
- t.Errorf("%d: RateLimit(%+v): ok = %v; want %v", i, test.err, ok, test.ok)
- continue
- }
- if res != test.res {
- t.Errorf("%d: RateLimit(%+v) = %v; want %v", i, test.err, res, test.res)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/base64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/base64.go
deleted file mode 100644
index fc3116090..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/base64.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2011 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 file.
-
-package bcrypt
-
-import "encoding/base64"
-
-const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-
-var bcEncoding = base64.NewEncoding(alphabet)
-
-func base64Encode(src []byte) []byte {
- n := bcEncoding.EncodedLen(len(src))
- dst := make([]byte, n)
- bcEncoding.Encode(dst, src)
- for dst[n-1] == '=' {
- n--
- }
- return dst[:n]
-}
-
-func base64Decode(src []byte) ([]byte, error) {
- numOfEquals := 4 - (len(src) % 4)
- for i := 0; i < numOfEquals; i++ {
- src = append(src, '=')
- }
-
- dst := make([]byte, bcEncoding.DecodedLen(len(src)))
- n, err := bcEncoding.Decode(dst, src)
- if err != nil {
- return nil, err
- }
- return dst[:n], nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt.go
deleted file mode 100644
index 202fa8aff..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt.go
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing
-// algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf
-package bcrypt // import "golang.org/x/crypto/bcrypt"
-
-// The code is a port of Provos and Mazières's C implementation.
-import (
- "crypto/rand"
- "crypto/subtle"
- "errors"
- "fmt"
- "io"
- "strconv"
-
- "golang.org/x/crypto/blowfish"
-)
-
-const (
- MinCost int = 4 // the minimum allowable cost as passed in to GenerateFromPassword
- MaxCost int = 31 // the maximum allowable cost as passed in to GenerateFromPassword
- DefaultCost int = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword
-)
-
-// The error returned from CompareHashAndPassword when a password and hash do
-// not match.
-var ErrMismatchedHashAndPassword = errors.New("crypto/bcrypt: hashedPassword is not the hash of the given password")
-
-// The error returned from CompareHashAndPassword when a hash is too short to
-// be a bcrypt hash.
-var ErrHashTooShort = errors.New("crypto/bcrypt: hashedSecret too short to be a bcrypted password")
-
-// The error returned from CompareHashAndPassword when a hash was created with
-// a bcrypt algorithm newer than this implementation.
-type HashVersionTooNewError byte
-
-func (hv HashVersionTooNewError) Error() string {
- return fmt.Sprintf("crypto/bcrypt: bcrypt algorithm version '%c' requested is newer than current version '%c'", byte(hv), majorVersion)
-}
-
-// The error returned from CompareHashAndPassword when a hash starts with something other than '$'
-type InvalidHashPrefixError byte
-
-func (ih InvalidHashPrefixError) Error() string {
- return fmt.Sprintf("crypto/bcrypt: bcrypt hashes must start with '$', but hashedSecret started with '%c'", byte(ih))
-}
-
-type InvalidCostError int
-
-func (ic InvalidCostError) Error() string {
- return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), int(MinCost), int(MaxCost))
-}
-
-const (
- majorVersion = '2'
- minorVersion = 'a'
- maxSaltSize = 16
- maxCryptedHashSize = 23
- encodedSaltSize = 22
- encodedHashSize = 31
- minHashSize = 59
-)
-
-// magicCipherData is an IV for the 64 Blowfish encryption calls in
-// bcrypt(). It's the string "OrpheanBeholderScryDoubt" in big-endian bytes.
-var magicCipherData = []byte{
- 0x4f, 0x72, 0x70, 0x68,
- 0x65, 0x61, 0x6e, 0x42,
- 0x65, 0x68, 0x6f, 0x6c,
- 0x64, 0x65, 0x72, 0x53,
- 0x63, 0x72, 0x79, 0x44,
- 0x6f, 0x75, 0x62, 0x74,
-}
-
-type hashed struct {
- hash []byte
- salt []byte
- cost int // allowed range is MinCost to MaxCost
- major byte
- minor byte
-}
-
-// GenerateFromPassword returns the bcrypt hash of the password at the given
-// cost. If the cost given is less than MinCost, the cost will be set to
-// DefaultCost, instead. Use CompareHashAndPassword, as defined in this package,
-// to compare the returned hashed password with its cleartext version.
-func GenerateFromPassword(password []byte, cost int) ([]byte, error) {
- p, err := newFromPassword(password, cost)
- if err != nil {
- return nil, err
- }
- return p.Hash(), nil
-}
-
-// CompareHashAndPassword compares a bcrypt hashed password with its possible
-// plaintext equivalent. Returns nil on success, or an error on failure.
-func CompareHashAndPassword(hashedPassword, password []byte) error {
- p, err := newFromHash(hashedPassword)
- if err != nil {
- return err
- }
-
- otherHash, err := bcrypt(password, p.cost, p.salt)
- if err != nil {
- return err
- }
-
- otherP := &hashed{otherHash, p.salt, p.cost, p.major, p.minor}
- if subtle.ConstantTimeCompare(p.Hash(), otherP.Hash()) == 1 {
- return nil
- }
-
- return ErrMismatchedHashAndPassword
-}
-
-// Cost returns the hashing cost used to create the given hashed
-// password. When, in the future, the hashing cost of a password system needs
-// to be increased in order to adjust for greater computational power, this
-// function allows one to establish which passwords need to be updated.
-func Cost(hashedPassword []byte) (int, error) {
- p, err := newFromHash(hashedPassword)
- if err != nil {
- return 0, err
- }
- return p.cost, nil
-}
-
-func newFromPassword(password []byte, cost int) (*hashed, error) {
- if cost < MinCost {
- cost = DefaultCost
- }
- p := new(hashed)
- p.major = majorVersion
- p.minor = minorVersion
-
- err := checkCost(cost)
- if err != nil {
- return nil, err
- }
- p.cost = cost
-
- unencodedSalt := make([]byte, maxSaltSize)
- _, err = io.ReadFull(rand.Reader, unencodedSalt)
- if err != nil {
- return nil, err
- }
-
- p.salt = base64Encode(unencodedSalt)
- hash, err := bcrypt(password, p.cost, p.salt)
- if err != nil {
- return nil, err
- }
- p.hash = hash
- return p, err
-}
-
-func newFromHash(hashedSecret []byte) (*hashed, error) {
- if len(hashedSecret) < minHashSize {
- return nil, ErrHashTooShort
- }
- p := new(hashed)
- n, err := p.decodeVersion(hashedSecret)
- if err != nil {
- return nil, err
- }
- hashedSecret = hashedSecret[n:]
- n, err = p.decodeCost(hashedSecret)
- if err != nil {
- return nil, err
- }
- hashedSecret = hashedSecret[n:]
-
- // The "+2" is here because we'll have to append at most 2 '=' to the salt
- // when base64 decoding it in expensiveBlowfishSetup().
- p.salt = make([]byte, encodedSaltSize, encodedSaltSize+2)
- copy(p.salt, hashedSecret[:encodedSaltSize])
-
- hashedSecret = hashedSecret[encodedSaltSize:]
- p.hash = make([]byte, len(hashedSecret))
- copy(p.hash, hashedSecret)
-
- return p, nil
-}
-
-func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) {
- cipherData := make([]byte, len(magicCipherData))
- copy(cipherData, magicCipherData)
-
- c, err := expensiveBlowfishSetup(password, uint32(cost), salt)
- if err != nil {
- return nil, err
- }
-
- for i := 0; i < 24; i += 8 {
- for j := 0; j < 64; j++ {
- c.Encrypt(cipherData[i:i+8], cipherData[i:i+8])
- }
- }
-
- // Bug compatibility with C bcrypt implementations. We only encode 23 of
- // the 24 bytes encrypted.
- hsh := base64Encode(cipherData[:maxCryptedHashSize])
- return hsh, nil
-}
-
-func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) {
- csalt, err := base64Decode(salt)
- if err != nil {
- return nil, err
- }
-
- // Bug compatibility with C bcrypt implementations. They use the trailing
- // NULL in the key string during expansion.
- // We copy the key to prevent changing the underlying array.
- ckey := append(key[:len(key):len(key)], 0)
-
- c, err := blowfish.NewSaltedCipher(ckey, csalt)
- if err != nil {
- return nil, err
- }
-
- var i, rounds uint64
- rounds = 1 << cost
- for i = 0; i < rounds; i++ {
- blowfish.ExpandKey(ckey, c)
- blowfish.ExpandKey(csalt, c)
- }
-
- return c, nil
-}
-
-func (p *hashed) Hash() []byte {
- arr := make([]byte, 60)
- arr[0] = '$'
- arr[1] = p.major
- n := 2
- if p.minor != 0 {
- arr[2] = p.minor
- n = 3
- }
- arr[n] = '$'
- n += 1
- copy(arr[n:], []byte(fmt.Sprintf("%02d", p.cost)))
- n += 2
- arr[n] = '$'
- n += 1
- copy(arr[n:], p.salt)
- n += encodedSaltSize
- copy(arr[n:], p.hash)
- n += encodedHashSize
- return arr[:n]
-}
-
-func (p *hashed) decodeVersion(sbytes []byte) (int, error) {
- if sbytes[0] != '$' {
- return -1, InvalidHashPrefixError(sbytes[0])
- }
- if sbytes[1] > majorVersion {
- return -1, HashVersionTooNewError(sbytes[1])
- }
- p.major = sbytes[1]
- n := 3
- if sbytes[2] != '$' {
- p.minor = sbytes[2]
- n++
- }
- return n, nil
-}
-
-// sbytes should begin where decodeVersion left off.
-func (p *hashed) decodeCost(sbytes []byte) (int, error) {
- cost, err := strconv.Atoi(string(sbytes[0:2]))
- if err != nil {
- return -1, err
- }
- err = checkCost(cost)
- if err != nil {
- return -1, err
- }
- p.cost = cost
- return 3, nil
-}
-
-func (p *hashed) String() string {
- return fmt.Sprintf("&{hash: %#v, salt: %#v, cost: %d, major: %c, minor: %c}", string(p.hash), p.salt, p.cost, p.major, p.minor)
-}
-
-func checkCost(cost int) error {
- if cost < MinCost || cost > MaxCost {
- return InvalidCostError(cost)
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go
deleted file mode 100644
index aecf759eb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright 2011 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 file.
-
-package bcrypt
-
-import (
- "bytes"
- "fmt"
- "testing"
-)
-
-func TestBcryptingIsEasy(t *testing.T) {
- pass := []byte("mypassword")
- hp, err := GenerateFromPassword(pass, 0)
- if err != nil {
- t.Fatalf("GenerateFromPassword error: %s", err)
- }
-
- if CompareHashAndPassword(hp, pass) != nil {
- t.Errorf("%v should hash %s correctly", hp, pass)
- }
-
- notPass := "notthepass"
- err = CompareHashAndPassword(hp, []byte(notPass))
- if err != ErrMismatchedHashAndPassword {
- t.Errorf("%v and %s should be mismatched", hp, notPass)
- }
-}
-
-func TestBcryptingIsCorrect(t *testing.T) {
- pass := []byte("allmine")
- salt := []byte("XajjQvNhvvRt5GSeFk1xFe")
- expectedHash := []byte("$2a$10$XajjQvNhvvRt5GSeFk1xFeyqRrsxkhBkUiQeg0dt.wU1qD4aFDcga")
-
- hash, err := bcrypt(pass, 10, salt)
- if err != nil {
- t.Fatalf("bcrypt blew up: %v", err)
- }
- if !bytes.HasSuffix(expectedHash, hash) {
- t.Errorf("%v should be the suffix of %v", hash, expectedHash)
- }
-
- h, err := newFromHash(expectedHash)
- if err != nil {
- t.Errorf("Unable to parse %s: %v", string(expectedHash), err)
- }
-
- // This is not the safe way to compare these hashes. We do this only for
- // testing clarity. Use bcrypt.CompareHashAndPassword()
- if err == nil && !bytes.Equal(expectedHash, h.Hash()) {
- t.Errorf("Parsed hash %v should equal %v", h.Hash(), expectedHash)
- }
-}
-
-func TestVeryShortPasswords(t *testing.T) {
- key := []byte("k")
- salt := []byte("XajjQvNhvvRt5GSeFk1xFe")
- _, err := bcrypt(key, 10, salt)
- if err != nil {
- t.Errorf("One byte key resulted in error: %s", err)
- }
-}
-
-func TestTooLongPasswordsWork(t *testing.T) {
- salt := []byte("XajjQvNhvvRt5GSeFk1xFe")
- // One byte over the usual 56 byte limit that blowfish has
- tooLongPass := []byte("012345678901234567890123456789012345678901234567890123456")
- tooLongExpected := []byte("$2a$10$XajjQvNhvvRt5GSeFk1xFe5l47dONXg781AmZtd869sO8zfsHuw7C")
- hash, err := bcrypt(tooLongPass, 10, salt)
- if err != nil {
- t.Fatalf("bcrypt blew up on long password: %v", err)
- }
- if !bytes.HasSuffix(tooLongExpected, hash) {
- t.Errorf("%v should be the suffix of %v", hash, tooLongExpected)
- }
-}
-
-type InvalidHashTest struct {
- err error
- hash []byte
-}
-
-var invalidTests = []InvalidHashTest{
- {ErrHashTooShort, []byte("$2a$10$fooo")},
- {ErrHashTooShort, []byte("$2a")},
- {HashVersionTooNewError('3'), []byte("$3a$10$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")},
- {InvalidHashPrefixError('%'), []byte("%2a$10$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")},
- {InvalidCostError(32), []byte("$2a$32$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")},
-}
-
-func TestInvalidHashErrors(t *testing.T) {
- check := func(name string, expected, err error) {
- if err == nil {
- t.Errorf("%s: Should have returned an error", name)
- }
- if err != nil && err != expected {
- t.Errorf("%s gave err %v but should have given %v", name, err, expected)
- }
- }
- for _, iht := range invalidTests {
- _, err := newFromHash(iht.hash)
- check("newFromHash", iht.err, err)
- err = CompareHashAndPassword(iht.hash, []byte("anything"))
- check("CompareHashAndPassword", iht.err, err)
- }
-}
-
-func TestUnpaddedBase64Encoding(t *testing.T) {
- original := []byte{101, 201, 101, 75, 19, 227, 199, 20, 239, 236, 133, 32, 30, 109, 243, 30}
- encodedOriginal := []byte("XajjQvNhvvRt5GSeFk1xFe")
-
- encoded := base64Encode(original)
-
- if !bytes.Equal(encodedOriginal, encoded) {
- t.Errorf("Encoded %v should have equaled %v", encoded, encodedOriginal)
- }
-
- decoded, err := base64Decode(encodedOriginal)
- if err != nil {
- t.Fatalf("base64Decode blew up: %s", err)
- }
-
- if !bytes.Equal(decoded, original) {
- t.Errorf("Decoded %v should have equaled %v", decoded, original)
- }
-}
-
-func TestCost(t *testing.T) {
- suffix := "XajjQvNhvvRt5GSeFk1xFe5l47dONXg781AmZtd869sO8zfsHuw7C"
- for _, vers := range []string{"2a", "2"} {
- for _, cost := range []int{4, 10} {
- s := fmt.Sprintf("$%s$%02d$%s", vers, cost, suffix)
- h := []byte(s)
- actual, err := Cost(h)
- if err != nil {
- t.Errorf("Cost, error: %s", err)
- continue
- }
- if actual != cost {
- t.Errorf("Cost, expected: %d, actual: %d", cost, actual)
- }
- }
- }
- _, err := Cost([]byte("$a$a$" + suffix))
- if err == nil {
- t.Errorf("Cost, malformed but no error returned")
- }
-}
-
-func TestCostValidationInHash(t *testing.T) {
- if testing.Short() {
- return
- }
-
- pass := []byte("mypassword")
-
- for c := 0; c < MinCost; c++ {
- p, _ := newFromPassword(pass, c)
- if p.cost != DefaultCost {
- t.Errorf("newFromPassword should default costs below %d to %d, but was %d", MinCost, DefaultCost, p.cost)
- }
- }
-
- p, _ := newFromPassword(pass, 14)
- if p.cost != 14 {
- t.Errorf("newFromPassword should default cost to 14, but was %d", p.cost)
- }
-
- hp, _ := newFromHash(p.Hash())
- if p.cost != hp.cost {
- t.Errorf("newFromHash should maintain the cost at %d, but was %d", p.cost, hp.cost)
- }
-
- _, err := newFromPassword(pass, 32)
- if err == nil {
- t.Fatalf("newFromPassword: should return a cost error")
- }
- if err != InvalidCostError(32) {
- t.Errorf("newFromPassword: should return cost error, got %#v", err)
- }
-}
-
-func TestCostReturnsWithLeadingZeroes(t *testing.T) {
- hp, _ := newFromPassword([]byte("abcdefgh"), 7)
- cost := hp.Hash()[4:7]
- expected := []byte("07$")
-
- if !bytes.Equal(expected, cost) {
- t.Errorf("single digit costs in hash should have leading zeros: was %v instead of %v", cost, expected)
- }
-}
-
-func TestMinorNotRequired(t *testing.T) {
- noMinorHash := []byte("$2$10$XajjQvNhvvRt5GSeFk1xFeyqRrsxkhBkUiQeg0dt.wU1qD4aFDcga")
- h, err := newFromHash(noMinorHash)
- if err != nil {
- t.Fatalf("No minor hash blew up: %s", err)
- }
- if h.minor != 0 {
- t.Errorf("Should leave minor version at 0, but was %d", h.minor)
- }
-
- if !bytes.Equal(noMinorHash, h.Hash()) {
- t.Errorf("Should generate hash %v, but created %v", noMinorHash, h.Hash())
- }
-}
-
-func BenchmarkEqual(b *testing.B) {
- b.StopTimer()
- passwd := []byte("somepasswordyoulike")
- hash, _ := GenerateFromPassword(passwd, 10)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- CompareHashAndPassword(hash, passwd)
- }
-}
-
-func BenchmarkGeneration(b *testing.B) {
- b.StopTimer()
- passwd := []byte("mylongpassword1234")
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- GenerateFromPassword(passwd, 10)
- }
-}
-
-// See Issue https://github.com/golang/go/issues/20425.
-func TestNoSideEffectsFromCompare(t *testing.T) {
- source := []byte("passw0rd123456")
- password := source[:len(source)-6]
- token := source[len(source)-6:]
- want := make([]byte, len(source))
- copy(want, source)
-
- wantHash := []byte("$2a$10$LK9XRuhNxHHCvjX3tdkRKei1QiCDUKrJRhZv7WWZPuQGRUM92rOUa")
- _ = CompareHashAndPassword(wantHash, password)
-
- got := bytes.Join([][]byte{password, token}, []byte(""))
- if !bytes.Equal(got, want) {
- t.Errorf("got=%q want=%q", got, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b.go
deleted file mode 100644
index 7f0a86e44..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693
-// and the extendable output function (XOF) BLAKE2Xb.
-//
-// For a detailed specification of BLAKE2b see https://blake2.net/blake2.pdf
-// and for BLAKE2Xb see https://blake2.net/blake2x.pdf
-//
-// If you aren't sure which function you need, use BLAKE2b (Sum512 or New512).
-// If you need a secret-key MAC (message authentication code), use the New512
-// function with a non-nil key.
-//
-// BLAKE2X is a construction to compute hash values larger than 64 bytes. It
-// can produce hash values between 0 and 4 GiB.
-package blake2b
-
-import (
- "encoding/binary"
- "errors"
- "hash"
-)
-
-const (
- // The blocksize of BLAKE2b in bytes.
- BlockSize = 128
- // The hash size of BLAKE2b-512 in bytes.
- Size = 64
- // The hash size of BLAKE2b-384 in bytes.
- Size384 = 48
- // The hash size of BLAKE2b-256 in bytes.
- Size256 = 32
-)
-
-var (
- useAVX2 bool
- useAVX bool
- useSSE4 bool
-)
-
-var errKeySize = errors.New("blake2b: invalid key size")
-
-var iv = [8]uint64{
- 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
- 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179,
-}
-
-// Sum512 returns the BLAKE2b-512 checksum of the data.
-func Sum512(data []byte) [Size]byte {
- var sum [Size]byte
- checkSum(&sum, Size, data)
- return sum
-}
-
-// Sum384 returns the BLAKE2b-384 checksum of the data.
-func Sum384(data []byte) [Size384]byte {
- var sum [Size]byte
- var sum384 [Size384]byte
- checkSum(&sum, Size384, data)
- copy(sum384[:], sum[:Size384])
- return sum384
-}
-
-// Sum256 returns the BLAKE2b-256 checksum of the data.
-func Sum256(data []byte) [Size256]byte {
- var sum [Size]byte
- var sum256 [Size256]byte
- checkSum(&sum, Size256, data)
- copy(sum256[:], sum[:Size256])
- return sum256
-}
-
-// New512 returns a new hash.Hash computing the BLAKE2b-512 checksum. A non-nil
-// key turns the hash into a MAC. The key must between zero and 64 bytes long.
-func New512(key []byte) (hash.Hash, error) { return newDigest(Size, key) }
-
-// New384 returns a new hash.Hash computing the BLAKE2b-384 checksum. A non-nil
-// key turns the hash into a MAC. The key must between zero and 64 bytes long.
-func New384(key []byte) (hash.Hash, error) { return newDigest(Size384, key) }
-
-// New256 returns a new hash.Hash computing the BLAKE2b-256 checksum. A non-nil
-// key turns the hash into a MAC. The key must between zero and 64 bytes long.
-func New256(key []byte) (hash.Hash, error) { return newDigest(Size256, key) }
-
-func newDigest(hashSize int, key []byte) (*digest, error) {
- if len(key) > Size {
- return nil, errKeySize
- }
- d := &digest{
- size: hashSize,
- keyLen: len(key),
- }
- copy(d.key[:], key)
- d.Reset()
- return d, nil
-}
-
-func checkSum(sum *[Size]byte, hashSize int, data []byte) {
- h := iv
- h[0] ^= uint64(hashSize) | (1 << 16) | (1 << 24)
- var c [2]uint64
-
- if length := len(data); length > BlockSize {
- n := length &^ (BlockSize - 1)
- if length == n {
- n -= BlockSize
- }
- hashBlocks(&h, &c, 0, data[:n])
- data = data[n:]
- }
-
- var block [BlockSize]byte
- offset := copy(block[:], data)
- remaining := uint64(BlockSize - offset)
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:])
-
- for i, v := range h[:(hashSize+7)/8] {
- binary.LittleEndian.PutUint64(sum[8*i:], v)
- }
-}
-
-type digest struct {
- h [8]uint64
- c [2]uint64
- size int
- block [BlockSize]byte
- offset int
-
- key [BlockSize]byte
- keyLen int
-}
-
-func (d *digest) BlockSize() int { return BlockSize }
-
-func (d *digest) Size() int { return d.size }
-
-func (d *digest) Reset() {
- d.h = iv
- d.h[0] ^= uint64(d.size) | (uint64(d.keyLen) << 8) | (1 << 16) | (1 << 24)
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- if d.keyLen > 0 {
- d.block = d.key
- d.offset = BlockSize
- }
-}
-
-func (d *digest) Write(p []byte) (n int, err error) {
- n = len(p)
-
- if d.offset > 0 {
- remaining := BlockSize - d.offset
- if n <= remaining {
- d.offset += copy(d.block[d.offset:], p)
- return
- }
- copy(d.block[d.offset:], p[:remaining])
- hashBlocks(&d.h, &d.c, 0, d.block[:])
- d.offset = 0
- p = p[remaining:]
- }
-
- if length := len(p); length > BlockSize {
- nn := length &^ (BlockSize - 1)
- if length == nn {
- nn -= BlockSize
- }
- hashBlocks(&d.h, &d.c, 0, p[:nn])
- p = p[nn:]
- }
-
- if len(p) > 0 {
- d.offset += copy(d.block[:], p)
- }
-
- return
-}
-
-func (d *digest) Sum(sum []byte) []byte {
- var hash [Size]byte
- d.finalize(&hash)
- return append(sum, hash[:d.size]...)
-}
-
-func (d *digest) finalize(hash *[Size]byte) {
- var block [BlockSize]byte
- copy(block[:], d.block[:d.offset])
- remaining := uint64(BlockSize - d.offset)
-
- c := d.c
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- h := d.h
- hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:])
-
- for i, v := range h {
- binary.LittleEndian.PutUint64(hash[8*i:], v)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go
deleted file mode 100644
index 8c41cf6c7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7,amd64,!gccgo,!appengine
-
-package blake2b
-
-func init() {
- useAVX2 = supportsAVX2()
- useAVX = supportsAVX()
- useSSE4 = supportsSSE4()
-}
-
-//go:noescape
-func supportsSSE4() bool
-
-//go:noescape
-func supportsAVX() bool
-
-//go:noescape
-func supportsAVX2() bool
-
-//go:noescape
-func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-//go:noescape
-func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-//go:noescape
-func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- if useAVX2 {
- hashBlocksAVX2(h, c, flag, blocks)
- } else if useAVX {
- hashBlocksAVX(h, c, flag, blocks)
- } else if useSSE4 {
- hashBlocksSSE4(h, c, flag, blocks)
- } else {
- hashBlocksGeneric(h, c, flag, blocks)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
deleted file mode 100644
index 784bce6a9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
+++ /dev/null
@@ -1,762 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7,amd64,!gccgo,!appengine
-
-#include "textflag.h"
-
-DATA ·AVX2_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908
-DATA ·AVX2_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b
-DATA ·AVX2_iv0<>+0x10(SB)/8, $0x3c6ef372fe94f82b
-DATA ·AVX2_iv0<>+0x18(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·AVX2_iv0<>(SB), (NOPTR+RODATA), $32
-
-DATA ·AVX2_iv1<>+0x00(SB)/8, $0x510e527fade682d1
-DATA ·AVX2_iv1<>+0x08(SB)/8, $0x9b05688c2b3e6c1f
-DATA ·AVX2_iv1<>+0x10(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·AVX2_iv1<>+0x18(SB)/8, $0x5be0cd19137e2179
-GLOBL ·AVX2_iv1<>(SB), (NOPTR+RODATA), $32
-
-DATA ·AVX2_c40<>+0x00(SB)/8, $0x0201000706050403
-DATA ·AVX2_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b
-DATA ·AVX2_c40<>+0x10(SB)/8, $0x0201000706050403
-DATA ·AVX2_c40<>+0x18(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·AVX2_c40<>(SB), (NOPTR+RODATA), $32
-
-DATA ·AVX2_c48<>+0x00(SB)/8, $0x0100070605040302
-DATA ·AVX2_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a
-DATA ·AVX2_c48<>+0x10(SB)/8, $0x0100070605040302
-DATA ·AVX2_c48<>+0x18(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·AVX2_c48<>(SB), (NOPTR+RODATA), $32
-
-DATA ·AVX_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908
-DATA ·AVX_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b
-GLOBL ·AVX_iv0<>(SB), (NOPTR+RODATA), $16
-
-DATA ·AVX_iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b
-DATA ·AVX_iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·AVX_iv1<>(SB), (NOPTR+RODATA), $16
-
-DATA ·AVX_iv2<>+0x00(SB)/8, $0x510e527fade682d1
-DATA ·AVX_iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f
-GLOBL ·AVX_iv2<>(SB), (NOPTR+RODATA), $16
-
-DATA ·AVX_iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·AVX_iv3<>+0x08(SB)/8, $0x5be0cd19137e2179
-GLOBL ·AVX_iv3<>(SB), (NOPTR+RODATA), $16
-
-DATA ·AVX_c40<>+0x00(SB)/8, $0x0201000706050403
-DATA ·AVX_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·AVX_c40<>(SB), (NOPTR+RODATA), $16
-
-DATA ·AVX_c48<>+0x00(SB)/8, $0x0100070605040302
-DATA ·AVX_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·AVX_c48<>(SB), (NOPTR+RODATA), $16
-
-#define VPERMQ_0x39_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x39
-#define VPERMQ_0x93_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x93
-#define VPERMQ_0x4E_Y2_Y2 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xd2; BYTE $0x4e
-#define VPERMQ_0x93_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x93
-#define VPERMQ_0x39_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x39
-
-#define ROUND_AVX2(m0, m1, m2, m3, t, c40, c48) \
- VPADDQ m0, Y0, Y0; \
- VPADDQ Y1, Y0, Y0; \
- VPXOR Y0, Y3, Y3; \
- VPSHUFD $-79, Y3, Y3; \
- VPADDQ Y3, Y2, Y2; \
- VPXOR Y2, Y1, Y1; \
- VPSHUFB c40, Y1, Y1; \
- VPADDQ m1, Y0, Y0; \
- VPADDQ Y1, Y0, Y0; \
- VPXOR Y0, Y3, Y3; \
- VPSHUFB c48, Y3, Y3; \
- VPADDQ Y3, Y2, Y2; \
- VPXOR Y2, Y1, Y1; \
- VPADDQ Y1, Y1, t; \
- VPSRLQ $63, Y1, Y1; \
- VPXOR t, Y1, Y1; \
- VPERMQ_0x39_Y1_Y1; \
- VPERMQ_0x4E_Y2_Y2; \
- VPERMQ_0x93_Y3_Y3; \
- VPADDQ m2, Y0, Y0; \
- VPADDQ Y1, Y0, Y0; \
- VPXOR Y0, Y3, Y3; \
- VPSHUFD $-79, Y3, Y3; \
- VPADDQ Y3, Y2, Y2; \
- VPXOR Y2, Y1, Y1; \
- VPSHUFB c40, Y1, Y1; \
- VPADDQ m3, Y0, Y0; \
- VPADDQ Y1, Y0, Y0; \
- VPXOR Y0, Y3, Y3; \
- VPSHUFB c48, Y3, Y3; \
- VPADDQ Y3, Y2, Y2; \
- VPXOR Y2, Y1, Y1; \
- VPADDQ Y1, Y1, t; \
- VPSRLQ $63, Y1, Y1; \
- VPXOR t, Y1, Y1; \
- VPERMQ_0x39_Y3_Y3; \
- VPERMQ_0x4E_Y2_Y2; \
- VPERMQ_0x93_Y1_Y1
-
-#define VMOVQ_SI_X11_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x1E
-#define VMOVQ_SI_X12_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x26
-#define VMOVQ_SI_X13_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x2E
-#define VMOVQ_SI_X14_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x36
-#define VMOVQ_SI_X15_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x3E
-
-#define VMOVQ_SI_X11(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x5E; BYTE $n
-#define VMOVQ_SI_X12(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x66; BYTE $n
-#define VMOVQ_SI_X13(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x6E; BYTE $n
-#define VMOVQ_SI_X14(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x76; BYTE $n
-#define VMOVQ_SI_X15(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x7E; BYTE $n
-
-#define VPINSRQ_1_SI_X11_0 BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x1E; BYTE $0x01
-#define VPINSRQ_1_SI_X12_0 BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x26; BYTE $0x01
-#define VPINSRQ_1_SI_X13_0 BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x2E; BYTE $0x01
-#define VPINSRQ_1_SI_X14_0 BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x36; BYTE $0x01
-#define VPINSRQ_1_SI_X15_0 BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x3E; BYTE $0x01
-
-#define VPINSRQ_1_SI_X11(n) BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x5E; BYTE $n; BYTE $0x01
-#define VPINSRQ_1_SI_X12(n) BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x66; BYTE $n; BYTE $0x01
-#define VPINSRQ_1_SI_X13(n) BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x6E; BYTE $n; BYTE $0x01
-#define VPINSRQ_1_SI_X14(n) BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x76; BYTE $n; BYTE $0x01
-#define VPINSRQ_1_SI_X15(n) BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x7E; BYTE $n; BYTE $0x01
-
-#define VMOVQ_R8_X15 BYTE $0xC4; BYTE $0x41; BYTE $0xF9; BYTE $0x6E; BYTE $0xF8
-#define VPINSRQ_1_R9_X15 BYTE $0xC4; BYTE $0x43; BYTE $0x81; BYTE $0x22; BYTE $0xF9; BYTE $0x01
-
-// load msg: Y12 = (i0, i1, i2, i3)
-// i0, i1, i2, i3 must not be 0
-#define LOAD_MSG_AVX2_Y12(i0, i1, i2, i3) \
- VMOVQ_SI_X12(i0*8); \
- VMOVQ_SI_X11(i2*8); \
- VPINSRQ_1_SI_X12(i1*8); \
- VPINSRQ_1_SI_X11(i3*8); \
- VINSERTI128 $1, X11, Y12, Y12
-
-// load msg: Y13 = (i0, i1, i2, i3)
-// i0, i1, i2, i3 must not be 0
-#define LOAD_MSG_AVX2_Y13(i0, i1, i2, i3) \
- VMOVQ_SI_X13(i0*8); \
- VMOVQ_SI_X11(i2*8); \
- VPINSRQ_1_SI_X13(i1*8); \
- VPINSRQ_1_SI_X11(i3*8); \
- VINSERTI128 $1, X11, Y13, Y13
-
-// load msg: Y14 = (i0, i1, i2, i3)
-// i0, i1, i2, i3 must not be 0
-#define LOAD_MSG_AVX2_Y14(i0, i1, i2, i3) \
- VMOVQ_SI_X14(i0*8); \
- VMOVQ_SI_X11(i2*8); \
- VPINSRQ_1_SI_X14(i1*8); \
- VPINSRQ_1_SI_X11(i3*8); \
- VINSERTI128 $1, X11, Y14, Y14
-
-// load msg: Y15 = (i0, i1, i2, i3)
-// i0, i1, i2, i3 must not be 0
-#define LOAD_MSG_AVX2_Y15(i0, i1, i2, i3) \
- VMOVQ_SI_X15(i0*8); \
- VMOVQ_SI_X11(i2*8); \
- VPINSRQ_1_SI_X15(i1*8); \
- VPINSRQ_1_SI_X11(i3*8); \
- VINSERTI128 $1, X11, Y15, Y15
-
-#define LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() \
- VMOVQ_SI_X12_0; \
- VMOVQ_SI_X11(4*8); \
- VPINSRQ_1_SI_X12(2*8); \
- VPINSRQ_1_SI_X11(6*8); \
- VINSERTI128 $1, X11, Y12, Y12; \
- LOAD_MSG_AVX2_Y13(1, 3, 5, 7); \
- LOAD_MSG_AVX2_Y14(8, 10, 12, 14); \
- LOAD_MSG_AVX2_Y15(9, 11, 13, 15)
-
-#define LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() \
- LOAD_MSG_AVX2_Y12(14, 4, 9, 13); \
- LOAD_MSG_AVX2_Y13(10, 8, 15, 6); \
- VMOVQ_SI_X11(11*8); \
- VPSHUFD $0x4E, 0*8(SI), X14; \
- VPINSRQ_1_SI_X11(5*8); \
- VINSERTI128 $1, X11, Y14, Y14; \
- LOAD_MSG_AVX2_Y15(12, 2, 7, 3)
-
-#define LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() \
- VMOVQ_SI_X11(5*8); \
- VMOVDQU 11*8(SI), X12; \
- VPINSRQ_1_SI_X11(15*8); \
- VINSERTI128 $1, X11, Y12, Y12; \
- VMOVQ_SI_X13(8*8); \
- VMOVQ_SI_X11(2*8); \
- VPINSRQ_1_SI_X13_0; \
- VPINSRQ_1_SI_X11(13*8); \
- VINSERTI128 $1, X11, Y13, Y13; \
- LOAD_MSG_AVX2_Y14(10, 3, 7, 9); \
- LOAD_MSG_AVX2_Y15(14, 6, 1, 4)
-
-#define LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() \
- LOAD_MSG_AVX2_Y12(7, 3, 13, 11); \
- LOAD_MSG_AVX2_Y13(9, 1, 12, 14); \
- LOAD_MSG_AVX2_Y14(2, 5, 4, 15); \
- VMOVQ_SI_X15(6*8); \
- VMOVQ_SI_X11_0; \
- VPINSRQ_1_SI_X15(10*8); \
- VPINSRQ_1_SI_X11(8*8); \
- VINSERTI128 $1, X11, Y15, Y15
-
-#define LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() \
- LOAD_MSG_AVX2_Y12(9, 5, 2, 10); \
- VMOVQ_SI_X13_0; \
- VMOVQ_SI_X11(4*8); \
- VPINSRQ_1_SI_X13(7*8); \
- VPINSRQ_1_SI_X11(15*8); \
- VINSERTI128 $1, X11, Y13, Y13; \
- LOAD_MSG_AVX2_Y14(14, 11, 6, 3); \
- LOAD_MSG_AVX2_Y15(1, 12, 8, 13)
-
-#define LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() \
- VMOVQ_SI_X12(2*8); \
- VMOVQ_SI_X11_0; \
- VPINSRQ_1_SI_X12(6*8); \
- VPINSRQ_1_SI_X11(8*8); \
- VINSERTI128 $1, X11, Y12, Y12; \
- LOAD_MSG_AVX2_Y13(12, 10, 11, 3); \
- LOAD_MSG_AVX2_Y14(4, 7, 15, 1); \
- LOAD_MSG_AVX2_Y15(13, 5, 14, 9)
-
-#define LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() \
- LOAD_MSG_AVX2_Y12(12, 1, 14, 4); \
- LOAD_MSG_AVX2_Y13(5, 15, 13, 10); \
- VMOVQ_SI_X14_0; \
- VPSHUFD $0x4E, 8*8(SI), X11; \
- VPINSRQ_1_SI_X14(6*8); \
- VINSERTI128 $1, X11, Y14, Y14; \
- LOAD_MSG_AVX2_Y15(7, 3, 2, 11)
-
-#define LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() \
- LOAD_MSG_AVX2_Y12(13, 7, 12, 3); \
- LOAD_MSG_AVX2_Y13(11, 14, 1, 9); \
- LOAD_MSG_AVX2_Y14(5, 15, 8, 2); \
- VMOVQ_SI_X15_0; \
- VMOVQ_SI_X11(6*8); \
- VPINSRQ_1_SI_X15(4*8); \
- VPINSRQ_1_SI_X11(10*8); \
- VINSERTI128 $1, X11, Y15, Y15
-
-#define LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() \
- VMOVQ_SI_X12(6*8); \
- VMOVQ_SI_X11(11*8); \
- VPINSRQ_1_SI_X12(14*8); \
- VPINSRQ_1_SI_X11_0; \
- VINSERTI128 $1, X11, Y12, Y12; \
- LOAD_MSG_AVX2_Y13(15, 9, 3, 8); \
- VMOVQ_SI_X11(1*8); \
- VMOVDQU 12*8(SI), X14; \
- VPINSRQ_1_SI_X11(10*8); \
- VINSERTI128 $1, X11, Y14, Y14; \
- VMOVQ_SI_X15(2*8); \
- VMOVDQU 4*8(SI), X11; \
- VPINSRQ_1_SI_X15(7*8); \
- VINSERTI128 $1, X11, Y15, Y15
-
-#define LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() \
- LOAD_MSG_AVX2_Y12(10, 8, 7, 1); \
- VMOVQ_SI_X13(2*8); \
- VPSHUFD $0x4E, 5*8(SI), X11; \
- VPINSRQ_1_SI_X13(4*8); \
- VINSERTI128 $1, X11, Y13, Y13; \
- LOAD_MSG_AVX2_Y14(15, 9, 3, 13); \
- VMOVQ_SI_X15(11*8); \
- VMOVQ_SI_X11(12*8); \
- VPINSRQ_1_SI_X15(14*8); \
- VPINSRQ_1_SI_X11_0; \
- VINSERTI128 $1, X11, Y15, Y15
-
-// func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-TEXT ·hashBlocksAVX2(SB), 4, $320-48 // frame size = 288 + 32 byte alignment
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
-
- MOVQ SP, DX
- MOVQ SP, R9
- ADDQ $31, R9
- ANDQ $~31, R9
- MOVQ R9, SP
-
- MOVQ CX, 16(SP)
- XORQ CX, CX
- MOVQ CX, 24(SP)
-
- VMOVDQU ·AVX2_c40<>(SB), Y4
- VMOVDQU ·AVX2_c48<>(SB), Y5
-
- VMOVDQU 0(AX), Y8
- VMOVDQU 32(AX), Y9
- VMOVDQU ·AVX2_iv0<>(SB), Y6
- VMOVDQU ·AVX2_iv1<>(SB), Y7
-
- MOVQ 0(BX), R8
- MOVQ 8(BX), R9
- MOVQ R9, 8(SP)
-
-loop:
- ADDQ $128, R8
- MOVQ R8, 0(SP)
- CMPQ R8, $128
- JGE noinc
- INCQ R9
- MOVQ R9, 8(SP)
-
-noinc:
- VMOVDQA Y8, Y0
- VMOVDQA Y9, Y1
- VMOVDQA Y6, Y2
- VPXOR 0(SP), Y7, Y3
-
- LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15()
- VMOVDQA Y12, 32(SP)
- VMOVDQA Y13, 64(SP)
- VMOVDQA Y14, 96(SP)
- VMOVDQA Y15, 128(SP)
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3()
- VMOVDQA Y12, 160(SP)
- VMOVDQA Y13, 192(SP)
- VMOVDQA Y14, 224(SP)
- VMOVDQA Y15, 256(SP)
-
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
- LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0()
- ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5)
-
- ROUND_AVX2(32(SP), 64(SP), 96(SP), 128(SP), Y10, Y4, Y5)
- ROUND_AVX2(160(SP), 192(SP), 224(SP), 256(SP), Y10, Y4, Y5)
-
- VPXOR Y0, Y8, Y8
- VPXOR Y1, Y9, Y9
- VPXOR Y2, Y8, Y8
- VPXOR Y3, Y9, Y9
-
- LEAQ 128(SI), SI
- SUBQ $128, DI
- JNE loop
-
- MOVQ R8, 0(BX)
- MOVQ R9, 8(BX)
-
- VMOVDQU Y8, 0(AX)
- VMOVDQU Y9, 32(AX)
- VZEROUPPER
-
- MOVQ DX, SP
- RET
-
-#define VPUNPCKLQDQ_X2_X2_X15 BYTE $0xC5; BYTE $0x69; BYTE $0x6C; BYTE $0xFA
-#define VPUNPCKLQDQ_X3_X3_X15 BYTE $0xC5; BYTE $0x61; BYTE $0x6C; BYTE $0xFB
-#define VPUNPCKLQDQ_X7_X7_X15 BYTE $0xC5; BYTE $0x41; BYTE $0x6C; BYTE $0xFF
-#define VPUNPCKLQDQ_X13_X13_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x11; BYTE $0x6C; BYTE $0xFD
-#define VPUNPCKLQDQ_X14_X14_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x09; BYTE $0x6C; BYTE $0xFE
-
-#define VPUNPCKHQDQ_X15_X2_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x69; BYTE $0x6D; BYTE $0xD7
-#define VPUNPCKHQDQ_X15_X3_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xDF
-#define VPUNPCKHQDQ_X15_X6_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x49; BYTE $0x6D; BYTE $0xF7
-#define VPUNPCKHQDQ_X15_X7_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xFF
-#define VPUNPCKHQDQ_X15_X3_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xD7
-#define VPUNPCKHQDQ_X15_X7_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xF7
-#define VPUNPCKHQDQ_X15_X13_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xDF
-#define VPUNPCKHQDQ_X15_X13_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xFF
-
-#define SHUFFLE_AVX() \
- VMOVDQA X6, X13; \
- VMOVDQA X2, X14; \
- VMOVDQA X4, X6; \
- VPUNPCKLQDQ_X13_X13_X15; \
- VMOVDQA X5, X4; \
- VMOVDQA X6, X5; \
- VPUNPCKHQDQ_X15_X7_X6; \
- VPUNPCKLQDQ_X7_X7_X15; \
- VPUNPCKHQDQ_X15_X13_X7; \
- VPUNPCKLQDQ_X3_X3_X15; \
- VPUNPCKHQDQ_X15_X2_X2; \
- VPUNPCKLQDQ_X14_X14_X15; \
- VPUNPCKHQDQ_X15_X3_X3; \
-
-#define SHUFFLE_AVX_INV() \
- VMOVDQA X2, X13; \
- VMOVDQA X4, X14; \
- VPUNPCKLQDQ_X2_X2_X15; \
- VMOVDQA X5, X4; \
- VPUNPCKHQDQ_X15_X3_X2; \
- VMOVDQA X14, X5; \
- VPUNPCKLQDQ_X3_X3_X15; \
- VMOVDQA X6, X14; \
- VPUNPCKHQDQ_X15_X13_X3; \
- VPUNPCKLQDQ_X7_X7_X15; \
- VPUNPCKHQDQ_X15_X6_X6; \
- VPUNPCKLQDQ_X14_X14_X15; \
- VPUNPCKHQDQ_X15_X7_X7; \
-
-#define HALF_ROUND_AVX(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \
- VPADDQ m0, v0, v0; \
- VPADDQ v2, v0, v0; \
- VPADDQ m1, v1, v1; \
- VPADDQ v3, v1, v1; \
- VPXOR v0, v6, v6; \
- VPXOR v1, v7, v7; \
- VPSHUFD $-79, v6, v6; \
- VPSHUFD $-79, v7, v7; \
- VPADDQ v6, v4, v4; \
- VPADDQ v7, v5, v5; \
- VPXOR v4, v2, v2; \
- VPXOR v5, v3, v3; \
- VPSHUFB c40, v2, v2; \
- VPSHUFB c40, v3, v3; \
- VPADDQ m2, v0, v0; \
- VPADDQ v2, v0, v0; \
- VPADDQ m3, v1, v1; \
- VPADDQ v3, v1, v1; \
- VPXOR v0, v6, v6; \
- VPXOR v1, v7, v7; \
- VPSHUFB c48, v6, v6; \
- VPSHUFB c48, v7, v7; \
- VPADDQ v6, v4, v4; \
- VPADDQ v7, v5, v5; \
- VPXOR v4, v2, v2; \
- VPXOR v5, v3, v3; \
- VPADDQ v2, v2, t0; \
- VPSRLQ $63, v2, v2; \
- VPXOR t0, v2, v2; \
- VPADDQ v3, v3, t0; \
- VPSRLQ $63, v3, v3; \
- VPXOR t0, v3, v3
-
-// load msg: X12 = (i0, i1), X13 = (i2, i3), X14 = (i4, i5), X15 = (i6, i7)
-// i0, i1, i2, i3, i4, i5, i6, i7 must not be 0
-#define LOAD_MSG_AVX(i0, i1, i2, i3, i4, i5, i6, i7) \
- VMOVQ_SI_X12(i0*8); \
- VMOVQ_SI_X13(i2*8); \
- VMOVQ_SI_X14(i4*8); \
- VMOVQ_SI_X15(i6*8); \
- VPINSRQ_1_SI_X12(i1*8); \
- VPINSRQ_1_SI_X13(i3*8); \
- VPINSRQ_1_SI_X14(i5*8); \
- VPINSRQ_1_SI_X15(i7*8)
-
-// load msg: X12 = (0, 2), X13 = (4, 6), X14 = (1, 3), X15 = (5, 7)
-#define LOAD_MSG_AVX_0_2_4_6_1_3_5_7() \
- VMOVQ_SI_X12_0; \
- VMOVQ_SI_X13(4*8); \
- VMOVQ_SI_X14(1*8); \
- VMOVQ_SI_X15(5*8); \
- VPINSRQ_1_SI_X12(2*8); \
- VPINSRQ_1_SI_X13(6*8); \
- VPINSRQ_1_SI_X14(3*8); \
- VPINSRQ_1_SI_X15(7*8)
-
-// load msg: X12 = (1, 0), X13 = (11, 5), X14 = (12, 2), X15 = (7, 3)
-#define LOAD_MSG_AVX_1_0_11_5_12_2_7_3() \
- VPSHUFD $0x4E, 0*8(SI), X12; \
- VMOVQ_SI_X13(11*8); \
- VMOVQ_SI_X14(12*8); \
- VMOVQ_SI_X15(7*8); \
- VPINSRQ_1_SI_X13(5*8); \
- VPINSRQ_1_SI_X14(2*8); \
- VPINSRQ_1_SI_X15(3*8)
-
-// load msg: X12 = (11, 12), X13 = (5, 15), X14 = (8, 0), X15 = (2, 13)
-#define LOAD_MSG_AVX_11_12_5_15_8_0_2_13() \
- VMOVDQU 11*8(SI), X12; \
- VMOVQ_SI_X13(5*8); \
- VMOVQ_SI_X14(8*8); \
- VMOVQ_SI_X15(2*8); \
- VPINSRQ_1_SI_X13(15*8); \
- VPINSRQ_1_SI_X14_0; \
- VPINSRQ_1_SI_X15(13*8)
-
-// load msg: X12 = (2, 5), X13 = (4, 15), X14 = (6, 10), X15 = (0, 8)
-#define LOAD_MSG_AVX_2_5_4_15_6_10_0_8() \
- VMOVQ_SI_X12(2*8); \
- VMOVQ_SI_X13(4*8); \
- VMOVQ_SI_X14(6*8); \
- VMOVQ_SI_X15_0; \
- VPINSRQ_1_SI_X12(5*8); \
- VPINSRQ_1_SI_X13(15*8); \
- VPINSRQ_1_SI_X14(10*8); \
- VPINSRQ_1_SI_X15(8*8)
-
-// load msg: X12 = (9, 5), X13 = (2, 10), X14 = (0, 7), X15 = (4, 15)
-#define LOAD_MSG_AVX_9_5_2_10_0_7_4_15() \
- VMOVQ_SI_X12(9*8); \
- VMOVQ_SI_X13(2*8); \
- VMOVQ_SI_X14_0; \
- VMOVQ_SI_X15(4*8); \
- VPINSRQ_1_SI_X12(5*8); \
- VPINSRQ_1_SI_X13(10*8); \
- VPINSRQ_1_SI_X14(7*8); \
- VPINSRQ_1_SI_X15(15*8)
-
-// load msg: X12 = (2, 6), X13 = (0, 8), X14 = (12, 10), X15 = (11, 3)
-#define LOAD_MSG_AVX_2_6_0_8_12_10_11_3() \
- VMOVQ_SI_X12(2*8); \
- VMOVQ_SI_X13_0; \
- VMOVQ_SI_X14(12*8); \
- VMOVQ_SI_X15(11*8); \
- VPINSRQ_1_SI_X12(6*8); \
- VPINSRQ_1_SI_X13(8*8); \
- VPINSRQ_1_SI_X14(10*8); \
- VPINSRQ_1_SI_X15(3*8)
-
-// load msg: X12 = (0, 6), X13 = (9, 8), X14 = (7, 3), X15 = (2, 11)
-#define LOAD_MSG_AVX_0_6_9_8_7_3_2_11() \
- MOVQ 0*8(SI), X12; \
- VPSHUFD $0x4E, 8*8(SI), X13; \
- MOVQ 7*8(SI), X14; \
- MOVQ 2*8(SI), X15; \
- VPINSRQ_1_SI_X12(6*8); \
- VPINSRQ_1_SI_X14(3*8); \
- VPINSRQ_1_SI_X15(11*8)
-
-// load msg: X12 = (6, 14), X13 = (11, 0), X14 = (15, 9), X15 = (3, 8)
-#define LOAD_MSG_AVX_6_14_11_0_15_9_3_8() \
- MOVQ 6*8(SI), X12; \
- MOVQ 11*8(SI), X13; \
- MOVQ 15*8(SI), X14; \
- MOVQ 3*8(SI), X15; \
- VPINSRQ_1_SI_X12(14*8); \
- VPINSRQ_1_SI_X13_0; \
- VPINSRQ_1_SI_X14(9*8); \
- VPINSRQ_1_SI_X15(8*8)
-
-// load msg: X12 = (5, 15), X13 = (8, 2), X14 = (0, 4), X15 = (6, 10)
-#define LOAD_MSG_AVX_5_15_8_2_0_4_6_10() \
- MOVQ 5*8(SI), X12; \
- MOVQ 8*8(SI), X13; \
- MOVQ 0*8(SI), X14; \
- MOVQ 6*8(SI), X15; \
- VPINSRQ_1_SI_X12(15*8); \
- VPINSRQ_1_SI_X13(2*8); \
- VPINSRQ_1_SI_X14(4*8); \
- VPINSRQ_1_SI_X15(10*8)
-
-// load msg: X12 = (12, 13), X13 = (1, 10), X14 = (2, 7), X15 = (4, 5)
-#define LOAD_MSG_AVX_12_13_1_10_2_7_4_5() \
- VMOVDQU 12*8(SI), X12; \
- MOVQ 1*8(SI), X13; \
- MOVQ 2*8(SI), X14; \
- VPINSRQ_1_SI_X13(10*8); \
- VPINSRQ_1_SI_X14(7*8); \
- VMOVDQU 4*8(SI), X15
-
-// load msg: X12 = (15, 9), X13 = (3, 13), X14 = (11, 14), X15 = (12, 0)
-#define LOAD_MSG_AVX_15_9_3_13_11_14_12_0() \
- MOVQ 15*8(SI), X12; \
- MOVQ 3*8(SI), X13; \
- MOVQ 11*8(SI), X14; \
- MOVQ 12*8(SI), X15; \
- VPINSRQ_1_SI_X12(9*8); \
- VPINSRQ_1_SI_X13(13*8); \
- VPINSRQ_1_SI_X14(14*8); \
- VPINSRQ_1_SI_X15_0
-
-// func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-TEXT ·hashBlocksAVX(SB), 4, $288-48 // frame size = 272 + 16 byte alignment
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
-
- MOVQ SP, BP
- MOVQ SP, R9
- ADDQ $15, R9
- ANDQ $~15, R9
- MOVQ R9, SP
-
- VMOVDQU ·AVX_c40<>(SB), X0
- VMOVDQU ·AVX_c48<>(SB), X1
- VMOVDQA X0, X8
- VMOVDQA X1, X9
-
- VMOVDQU ·AVX_iv3<>(SB), X0
- VMOVDQA X0, 0(SP)
- XORQ CX, 0(SP) // 0(SP) = ·AVX_iv3 ^ (CX || 0)
-
- VMOVDQU 0(AX), X10
- VMOVDQU 16(AX), X11
- VMOVDQU 32(AX), X2
- VMOVDQU 48(AX), X3
-
- MOVQ 0(BX), R8
- MOVQ 8(BX), R9
-
-loop:
- ADDQ $128, R8
- CMPQ R8, $128
- JGE noinc
- INCQ R9
-
-noinc:
- VMOVQ_R8_X15
- VPINSRQ_1_R9_X15
-
- VMOVDQA X10, X0
- VMOVDQA X11, X1
- VMOVDQU ·AVX_iv0<>(SB), X4
- VMOVDQU ·AVX_iv1<>(SB), X5
- VMOVDQU ·AVX_iv2<>(SB), X6
-
- VPXOR X15, X6, X6
- VMOVDQA 0(SP), X7
-
- LOAD_MSG_AVX_0_2_4_6_1_3_5_7()
- VMOVDQA X12, 16(SP)
- VMOVDQA X13, 32(SP)
- VMOVDQA X14, 48(SP)
- VMOVDQA X15, 64(SP)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX(8, 10, 12, 14, 9, 11, 13, 15)
- VMOVDQA X12, 80(SP)
- VMOVDQA X13, 96(SP)
- VMOVDQA X14, 112(SP)
- VMOVDQA X15, 128(SP)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX(14, 4, 9, 13, 10, 8, 15, 6)
- VMOVDQA X12, 144(SP)
- VMOVDQA X13, 160(SP)
- VMOVDQA X14, 176(SP)
- VMOVDQA X15, 192(SP)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_1_0_11_5_12_2_7_3()
- VMOVDQA X12, 208(SP)
- VMOVDQA X13, 224(SP)
- VMOVDQA X14, 240(SP)
- VMOVDQA X15, 256(SP)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX_11_12_5_15_8_0_2_13()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX(10, 3, 7, 9, 14, 6, 1, 4)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX(7, 3, 13, 11, 9, 1, 12, 14)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_2_5_4_15_6_10_0_8()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX_9_5_2_10_0_7_4_15()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX(14, 11, 6, 3, 1, 12, 8, 13)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX_2_6_0_8_12_10_11_3()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX(4, 7, 15, 1, 13, 5, 14, 9)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX(12, 1, 14, 4, 5, 15, 13, 10)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_0_6_9_8_7_3_2_11()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX(13, 7, 12, 3, 11, 14, 1, 9)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_5_15_8_2_0_4_6_10()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX_6_14_11_0_15_9_3_8()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_12_13_1_10_2_7_4_5()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- LOAD_MSG_AVX(10, 8, 7, 1, 2, 4, 6, 5)
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX()
- LOAD_MSG_AVX_15_9_3_13_11_14_12_0()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X15, X8, X9)
- SHUFFLE_AVX()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 80(SP), 96(SP), 112(SP), 128(SP), X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 144(SP), 160(SP), 176(SP), 192(SP), X15, X8, X9)
- SHUFFLE_AVX()
- HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 208(SP), 224(SP), 240(SP), 256(SP), X15, X8, X9)
- SHUFFLE_AVX_INV()
-
- VMOVDQU 32(AX), X14
- VMOVDQU 48(AX), X15
- VPXOR X0, X10, X10
- VPXOR X1, X11, X11
- VPXOR X2, X14, X14
- VPXOR X3, X15, X15
- VPXOR X4, X10, X10
- VPXOR X5, X11, X11
- VPXOR X6, X14, X2
- VPXOR X7, X15, X3
- VMOVDQU X2, 32(AX)
- VMOVDQU X3, 48(AX)
-
- LEAQ 128(SI), SI
- SUBQ $128, DI
- JNE loop
-
- VMOVDQU X10, 0(AX)
- VMOVDQU X11, 16(AX)
-
- MOVQ R8, 0(BX)
- MOVQ R9, 8(BX)
- VZEROUPPER
-
- MOVQ BP, SP
- RET
-
-// func supportsAVX2() bool
-TEXT ·supportsAVX2(SB), 4, $0-1
- MOVQ runtime·support_avx2(SB), AX
- MOVB AX, ret+0(FP)
- RET
-
-// func supportsAVX() bool
-TEXT ·supportsAVX(SB), 4, $0-1
- MOVQ runtime·support_avx(SB), AX
- MOVB AX, ret+0(FP)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go
deleted file mode 100644
index 2ab7c30fc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.7,amd64,!gccgo,!appengine
-
-package blake2b
-
-func init() {
- useSSE4 = supportsSSE4()
-}
-
-//go:noescape
-func supportsSSE4() bool
-
-//go:noescape
-func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- if useSSE4 {
- hashBlocksSSE4(h, c, flag, blocks)
- } else {
- hashBlocksGeneric(h, c, flag, blocks)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
deleted file mode 100644
index 64530740b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-#include "textflag.h"
-
-DATA ·iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908
-DATA ·iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b
-GLOBL ·iv0<>(SB), (NOPTR+RODATA), $16
-
-DATA ·iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b
-DATA ·iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·iv1<>(SB), (NOPTR+RODATA), $16
-
-DATA ·iv2<>+0x00(SB)/8, $0x510e527fade682d1
-DATA ·iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f
-GLOBL ·iv2<>(SB), (NOPTR+RODATA), $16
-
-DATA ·iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·iv3<>+0x08(SB)/8, $0x5be0cd19137e2179
-GLOBL ·iv3<>(SB), (NOPTR+RODATA), $16
-
-DATA ·c40<>+0x00(SB)/8, $0x0201000706050403
-DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·c40<>(SB), (NOPTR+RODATA), $16
-
-DATA ·c48<>+0x00(SB)/8, $0x0100070605040302
-DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·c48<>(SB), (NOPTR+RODATA), $16
-
-#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \
- MOVO v4, t1; \
- MOVO v5, v4; \
- MOVO t1, v5; \
- MOVO v6, t1; \
- PUNPCKLQDQ v6, t2; \
- PUNPCKHQDQ v7, v6; \
- PUNPCKHQDQ t2, v6; \
- PUNPCKLQDQ v7, t2; \
- MOVO t1, v7; \
- MOVO v2, t1; \
- PUNPCKHQDQ t2, v7; \
- PUNPCKLQDQ v3, t2; \
- PUNPCKHQDQ t2, v2; \
- PUNPCKLQDQ t1, t2; \
- PUNPCKHQDQ t2, v3
-
-#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \
- MOVO v4, t1; \
- MOVO v5, v4; \
- MOVO t1, v5; \
- MOVO v2, t1; \
- PUNPCKLQDQ v2, t2; \
- PUNPCKHQDQ v3, v2; \
- PUNPCKHQDQ t2, v2; \
- PUNPCKLQDQ v3, t2; \
- MOVO t1, v3; \
- MOVO v6, t1; \
- PUNPCKHQDQ t2, v3; \
- PUNPCKLQDQ v7, t2; \
- PUNPCKHQDQ t2, v6; \
- PUNPCKLQDQ t1, t2; \
- PUNPCKHQDQ t2, v7
-
-#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \
- PADDQ m0, v0; \
- PADDQ m1, v1; \
- PADDQ v2, v0; \
- PADDQ v3, v1; \
- PXOR v0, v6; \
- PXOR v1, v7; \
- PSHUFD $0xB1, v6, v6; \
- PSHUFD $0xB1, v7, v7; \
- PADDQ v6, v4; \
- PADDQ v7, v5; \
- PXOR v4, v2; \
- PXOR v5, v3; \
- PSHUFB c40, v2; \
- PSHUFB c40, v3; \
- PADDQ m2, v0; \
- PADDQ m3, v1; \
- PADDQ v2, v0; \
- PADDQ v3, v1; \
- PXOR v0, v6; \
- PXOR v1, v7; \
- PSHUFB c48, v6; \
- PSHUFB c48, v7; \
- PADDQ v6, v4; \
- PADDQ v7, v5; \
- PXOR v4, v2; \
- PXOR v5, v3; \
- MOVOU v2, t0; \
- PADDQ v2, t0; \
- PSRLQ $63, v2; \
- PXOR t0, v2; \
- MOVOU v3, t0; \
- PADDQ v3, t0; \
- PSRLQ $63, v3; \
- PXOR t0, v3
-
-#define LOAD_MSG(m0, m1, m2, m3, src, i0, i1, i2, i3, i4, i5, i6, i7) \
- MOVQ i0*8(src), m0; \
- PINSRQ $1, i1*8(src), m0; \
- MOVQ i2*8(src), m1; \
- PINSRQ $1, i3*8(src), m1; \
- MOVQ i4*8(src), m2; \
- PINSRQ $1, i5*8(src), m2; \
- MOVQ i6*8(src), m3; \
- PINSRQ $1, i7*8(src), m3
-
-// func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-TEXT ·hashBlocksSSE4(SB), 4, $288-48 // frame size = 272 + 16 byte alignment
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
-
- MOVQ SP, BP
- MOVQ SP, R9
- ADDQ $15, R9
- ANDQ $~15, R9
- MOVQ R9, SP
-
- MOVOU ·iv3<>(SB), X0
- MOVO X0, 0(SP)
- XORQ CX, 0(SP) // 0(SP) = ·iv3 ^ (CX || 0)
-
- MOVOU ·c40<>(SB), X13
- MOVOU ·c48<>(SB), X14
-
- MOVOU 0(AX), X12
- MOVOU 16(AX), X15
-
- MOVQ 0(BX), R8
- MOVQ 8(BX), R9
-
-loop:
- ADDQ $128, R8
- CMPQ R8, $128
- JGE noinc
- INCQ R9
-
-noinc:
- MOVQ R8, X8
- PINSRQ $1, R9, X8
-
- MOVO X12, X0
- MOVO X15, X1
- MOVOU 32(AX), X2
- MOVOU 48(AX), X3
- MOVOU ·iv0<>(SB), X4
- MOVOU ·iv1<>(SB), X5
- MOVOU ·iv2<>(SB), X6
-
- PXOR X8, X6
- MOVO 0(SP), X7
-
- LOAD_MSG(X8, X9, X10, X11, SI, 0, 2, 4, 6, 1, 3, 5, 7)
- MOVO X8, 16(SP)
- MOVO X9, 32(SP)
- MOVO X10, 48(SP)
- MOVO X11, 64(SP)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 8, 10, 12, 14, 9, 11, 13, 15)
- MOVO X8, 80(SP)
- MOVO X9, 96(SP)
- MOVO X10, 112(SP)
- MOVO X11, 128(SP)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 14, 4, 9, 13, 10, 8, 15, 6)
- MOVO X8, 144(SP)
- MOVO X9, 160(SP)
- MOVO X10, 176(SP)
- MOVO X11, 192(SP)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 1, 0, 11, 5, 12, 2, 7, 3)
- MOVO X8, 208(SP)
- MOVO X9, 224(SP)
- MOVO X10, 240(SP)
- MOVO X11, 256(SP)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 11, 12, 5, 15, 8, 0, 2, 13)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 10, 3, 7, 9, 14, 6, 1, 4)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 7, 3, 13, 11, 9, 1, 12, 14)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 2, 5, 4, 15, 6, 10, 0, 8)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 9, 5, 2, 10, 0, 7, 4, 15)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 14, 11, 6, 3, 1, 12, 8, 13)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 2, 6, 0, 8, 12, 10, 11, 3)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 4, 7, 15, 1, 13, 5, 14, 9)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 12, 1, 14, 4, 5, 15, 13, 10)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 0, 6, 9, 8, 7, 3, 2, 11)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 13, 7, 12, 3, 11, 14, 1, 9)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 5, 15, 8, 2, 0, 4, 6, 10)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 6, 14, 11, 0, 15, 9, 3, 8)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 12, 13, 1, 10, 2, 7, 4, 5)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- LOAD_MSG(X8, X9, X10, X11, SI, 10, 8, 7, 1, 2, 4, 6, 5)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- LOAD_MSG(X8, X9, X10, X11, SI, 15, 9, 3, 13, 11, 14, 12, 0)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 80(SP), 96(SP), 112(SP), 128(SP), X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 144(SP), 160(SP), 176(SP), 192(SP), X11, X13, X14)
- SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9)
- HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 208(SP), 224(SP), 240(SP), 256(SP), X11, X13, X14)
- SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9)
-
- MOVOU 32(AX), X10
- MOVOU 48(AX), X11
- PXOR X0, X12
- PXOR X1, X15
- PXOR X2, X10
- PXOR X3, X11
- PXOR X4, X12
- PXOR X5, X15
- PXOR X6, X10
- PXOR X7, X11
- MOVOU X10, 32(AX)
- MOVOU X11, 48(AX)
-
- LEAQ 128(SI), SI
- SUBQ $128, DI
- JNE loop
-
- MOVOU X12, 0(AX)
- MOVOU X15, 16(AX)
-
- MOVQ R8, 0(BX)
- MOVQ R9, 8(BX)
-
- MOVQ BP, SP
- RET
-
-// func supportsSSE4() bool
-TEXT ·supportsSSE4(SB), 4, $0-1
- MOVL $1, AX
- CPUID
- SHRL $19, CX // Bit 19 indicates SSE4 support
- ANDL $1, CX // CX != 0 if support SSE4
- MOVB CX, ret+0(FP)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go
deleted file mode 100644
index 4bd2abc91..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2016 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 file.
-
-package blake2b
-
-import "encoding/binary"
-
-// the precomputed values for BLAKE2b
-// there are 12 16-byte arrays - one for each round
-// the entries are calculated from the sigma constants.
-var precomputed = [12][16]byte{
- {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15},
- {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3},
- {11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4},
- {7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8},
- {9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13},
- {2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9},
- {12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11},
- {13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10},
- {6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5},
- {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0},
- {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15}, // equal to the first
- {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3}, // equal to the second
-}
-
-func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- var m [16]uint64
- c0, c1 := c[0], c[1]
-
- for i := 0; i < len(blocks); {
- c0 += BlockSize
- if c0 < BlockSize {
- c1++
- }
-
- v0, v1, v2, v3, v4, v5, v6, v7 := h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
- v8, v9, v10, v11, v12, v13, v14, v15 := iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7]
- v12 ^= c0
- v13 ^= c1
- v14 ^= flag
-
- for j := range m {
- m[j] = binary.LittleEndian.Uint64(blocks[i:])
- i += 8
- }
-
- for j := range precomputed {
- s := &(precomputed[j])
-
- v0 += m[s[0]]
- v0 += v4
- v12 ^= v0
- v12 = v12<<(64-32) | v12>>32
- v8 += v12
- v4 ^= v8
- v4 = v4<<(64-24) | v4>>24
- v1 += m[s[1]]
- v1 += v5
- v13 ^= v1
- v13 = v13<<(64-32) | v13>>32
- v9 += v13
- v5 ^= v9
- v5 = v5<<(64-24) | v5>>24
- v2 += m[s[2]]
- v2 += v6
- v14 ^= v2
- v14 = v14<<(64-32) | v14>>32
- v10 += v14
- v6 ^= v10
- v6 = v6<<(64-24) | v6>>24
- v3 += m[s[3]]
- v3 += v7
- v15 ^= v3
- v15 = v15<<(64-32) | v15>>32
- v11 += v15
- v7 ^= v11
- v7 = v7<<(64-24) | v7>>24
-
- v0 += m[s[4]]
- v0 += v4
- v12 ^= v0
- v12 = v12<<(64-16) | v12>>16
- v8 += v12
- v4 ^= v8
- v4 = v4<<(64-63) | v4>>63
- v1 += m[s[5]]
- v1 += v5
- v13 ^= v1
- v13 = v13<<(64-16) | v13>>16
- v9 += v13
- v5 ^= v9
- v5 = v5<<(64-63) | v5>>63
- v2 += m[s[6]]
- v2 += v6
- v14 ^= v2
- v14 = v14<<(64-16) | v14>>16
- v10 += v14
- v6 ^= v10
- v6 = v6<<(64-63) | v6>>63
- v3 += m[s[7]]
- v3 += v7
- v15 ^= v3
- v15 = v15<<(64-16) | v15>>16
- v11 += v15
- v7 ^= v11
- v7 = v7<<(64-63) | v7>>63
-
- v0 += m[s[8]]
- v0 += v5
- v15 ^= v0
- v15 = v15<<(64-32) | v15>>32
- v10 += v15
- v5 ^= v10
- v5 = v5<<(64-24) | v5>>24
- v1 += m[s[9]]
- v1 += v6
- v12 ^= v1
- v12 = v12<<(64-32) | v12>>32
- v11 += v12
- v6 ^= v11
- v6 = v6<<(64-24) | v6>>24
- v2 += m[s[10]]
- v2 += v7
- v13 ^= v2
- v13 = v13<<(64-32) | v13>>32
- v8 += v13
- v7 ^= v8
- v7 = v7<<(64-24) | v7>>24
- v3 += m[s[11]]
- v3 += v4
- v14 ^= v3
- v14 = v14<<(64-32) | v14>>32
- v9 += v14
- v4 ^= v9
- v4 = v4<<(64-24) | v4>>24
-
- v0 += m[s[12]]
- v0 += v5
- v15 ^= v0
- v15 = v15<<(64-16) | v15>>16
- v10 += v15
- v5 ^= v10
- v5 = v5<<(64-63) | v5>>63
- v1 += m[s[13]]
- v1 += v6
- v12 ^= v1
- v12 = v12<<(64-16) | v12>>16
- v11 += v12
- v6 ^= v11
- v6 = v6<<(64-63) | v6>>63
- v2 += m[s[14]]
- v2 += v7
- v13 ^= v2
- v13 = v13<<(64-16) | v13>>16
- v8 += v13
- v7 ^= v8
- v7 = v7<<(64-63) | v7>>63
- v3 += m[s[15]]
- v3 += v4
- v14 ^= v3
- v14 = v14<<(64-16) | v14>>16
- v9 += v14
- v4 ^= v9
- v4 = v4<<(64-63) | v4>>63
-
- }
-
- h[0] ^= v0 ^ v8
- h[1] ^= v1 ^ v9
- h[2] ^= v2 ^ v10
- h[3] ^= v3 ^ v11
- h[4] ^= v4 ^ v12
- h[5] ^= v5 ^ v13
- h[6] ^= v6 ^ v14
- h[7] ^= v7 ^ v15
- }
- c[0], c[1] = c0, c1
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go
deleted file mode 100644
index da156a1ba..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !amd64 appengine gccgo
-
-package blake2b
-
-func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- hashBlocksGeneric(h, c, flag, blocks)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_test.go
deleted file mode 100644
index 5d68bbf60..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2b_test.go
+++ /dev/null
@@ -1,798 +0,0 @@
-// Copyright 2016 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 file.
-
-package blake2b
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "hash"
- "io"
- "testing"
-)
-
-func fromHex(s string) []byte {
- b, err := hex.DecodeString(s)
- if err != nil {
- panic(err)
- }
- return b
-}
-
-func TestHashes(t *testing.T) {
- defer func(sse4, avx, avx2 bool) {
- useSSE4, useAVX, useAVX2 = sse4, avx, avx2
- }(useSSE4, useAVX, useAVX2)
-
- if useAVX2 {
- t.Log("AVX2 version")
- testHashes(t)
- useAVX2 = false
- }
- if useAVX {
- t.Log("AVX version")
- testHashes(t)
- useAVX = false
- }
- if useSSE4 {
- t.Log("SSE4 version")
- testHashes(t)
- useSSE4 = false
- }
- t.Log("generic version")
- testHashes(t)
-}
-
-func TestHashes2X(t *testing.T) {
- defer func(sse4, avx, avx2 bool) {
- useSSE4, useAVX, useAVX2 = sse4, avx, avx2
- }(useSSE4, useAVX, useAVX2)
-
- if useAVX2 {
- t.Log("AVX2 version")
- testHashes2X(t)
- useAVX2 = false
- }
- if useAVX {
- t.Log("AVX version")
- testHashes2X(t)
- useAVX = false
- }
- if useSSE4 {
- t.Log("SSE4 version")
- testHashes2X(t)
- useSSE4 = false
- }
- t.Log("generic version")
- testHashes2X(t)
-}
-
-func testHashes(t *testing.T) {
- key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f")
-
- input := make([]byte, 255)
- for i := range input {
- input[i] = byte(i)
- }
-
- for i, expectedHex := range hashes {
- h, err := New512(key)
- if err != nil {
- t.Fatalf("#%d: error from New512: %v", i, err)
- }
-
- h.Write(input[:i])
- sum := h.Sum(nil)
-
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex)
- }
-
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(input[j : j+1])
- }
-
- sum = h.Sum(sum[:0])
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex)
- }
- }
-}
-
-func testHashes2X(t *testing.T) {
- key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f")
-
- input := make([]byte, 256)
- for i := range input {
- input[i] = byte(i)
- }
-
- for i, expectedHex := range hashes2X {
- length := uint32(len(expectedHex) / 2)
- sum := make([]byte, int(length))
-
- h, err := NewXOF(length, key)
- if err != nil {
- t.Fatalf("#%d: error from NewXOF: %v", i, err)
- }
-
- if _, err := h.Write(input); err != nil {
- t.Fatalf("#%d (single write): error from Write: %v", i, err)
- }
- if _, err := h.Read(sum); err != nil {
- t.Fatalf("#%d (single write): error from Read: %v", i, err)
- }
- if n, err := h.Read(sum); n != 0 || err != io.EOF {
- t.Fatalf("#%d (single write): Read did not return (0, io.EOF) after exhaustion, got (%v, %v)", i, n, err)
- }
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex)
- }
-
- h.Reset()
- for j := 0; j < len(input); j++ {
- h.Write(input[j : j+1])
- }
- for j := 0; j < len(sum); j++ {
- h = h.Clone()
- if _, err := h.Read(sum[j : j+1]); err != nil {
- t.Fatalf("#%d (byte-by-byte) - Read %d: error from Read: %v", i, j, err)
- }
- }
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex)
- }
- }
-
- h, err := NewXOF(OutputLengthUnknown, key)
- if err != nil {
- t.Fatalf("#unknown length: error from NewXOF: %v", err)
- }
- if _, err := h.Write(input); err != nil {
- t.Fatalf("#unknown length: error from Write: %v", err)
- }
-
- var result [64]byte
- if n, err := h.Read(result[:]); err != nil {
- t.Fatalf("#unknown length: error from Read: %v", err)
- } else if n != len(result) {
- t.Fatalf("#unknown length: Read returned %d bytes, want %d", n, len(result))
- }
-
- const expected = "3dbba8516da76bf7330055c66ea36cf1005e92714262b24d9710f51d9e126406e1bcd6497059f9331f1091c3634b695428d475ed432f987040575520a1c29f5e"
- if fmt.Sprintf("%x", result) != expected {
- t.Fatalf("#unknown length: bad result %x, wanted %s", result, expected)
- }
-}
-
-func generateSequence(out []byte, seed uint32) {
- a := 0xDEAD4BAD * seed // prime
- b := uint32(1)
-
- for i := range out { // fill the buf
- a, b = b, a+b
- out[i] = byte(b >> 24)
- }
-}
-
-func computeMAC(msg []byte, hashSize int, key []byte) (sum []byte) {
- var h hash.Hash
- switch hashSize {
- case Size:
- h, _ = New512(key)
- case Size384:
- h, _ = New384(key)
- case Size256:
- h, _ = New256(key)
- case 20:
- h, _ = newDigest(20, key)
- default:
- panic("unexpected hashSize")
- }
-
- h.Write(msg)
- return h.Sum(sum)
-}
-
-func computeHash(msg []byte, hashSize int) (sum []byte) {
- switch hashSize {
- case Size:
- hash := Sum512(msg)
- return hash[:]
- case Size384:
- hash := Sum384(msg)
- return hash[:]
- case Size256:
- hash := Sum256(msg)
- return hash[:]
- case 20:
- var hash [64]byte
- checkSum(&hash, 20, msg)
- return hash[:20]
- default:
- panic("unexpected hashSize")
- }
-}
-
-// Test function from RFC 7693.
-func TestSelfTest(t *testing.T) {
- hashLens := [4]int{20, 32, 48, 64}
- msgLens := [6]int{0, 3, 128, 129, 255, 1024}
-
- msg := make([]byte, 1024)
- key := make([]byte, 64)
-
- h, _ := New256(nil)
- for _, hashSize := range hashLens {
- for _, msgLength := range msgLens {
- generateSequence(msg[:msgLength], uint32(msgLength)) // unkeyed hash
-
- md := computeHash(msg[:msgLength], hashSize)
- h.Write(md)
-
- generateSequence(key[:], uint32(hashSize)) // keyed hash
- md = computeMAC(msg[:msgLength], hashSize, key[:hashSize])
- h.Write(md)
- }
- }
-
- sum := h.Sum(nil)
- expected := [32]byte{
- 0xc2, 0x3a, 0x78, 0x00, 0xd9, 0x81, 0x23, 0xbd,
- 0x10, 0xf5, 0x06, 0xc6, 0x1e, 0x29, 0xda, 0x56,
- 0x03, 0xd7, 0x63, 0xb8, 0xbb, 0xad, 0x2e, 0x73,
- 0x7f, 0x5e, 0x76, 0x5a, 0x7b, 0xcc, 0xd4, 0x75,
- }
- if !bytes.Equal(sum, expected[:]) {
- t.Fatalf("got %x, wanted %x", sum, expected)
- }
-}
-
-// Benchmarks
-
-func benchmarkSum(b *testing.B, size int) {
- data := make([]byte, size)
- b.SetBytes(int64(size))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Sum512(data)
- }
-}
-
-func benchmarkWrite(b *testing.B, size int) {
- data := make([]byte, size)
- h, _ := New512(nil)
- b.SetBytes(int64(size))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- h.Write(data)
- }
-}
-
-func BenchmarkWrite128(b *testing.B) { benchmarkWrite(b, 128) }
-func BenchmarkWrite1K(b *testing.B) { benchmarkWrite(b, 1024) }
-
-func BenchmarkSum128(b *testing.B) { benchmarkSum(b, 128) }
-func BenchmarkSum1K(b *testing.B) { benchmarkSum(b, 1024) }
-
-// These values were taken from https://blake2.net/blake2b-test.txt.
-var hashes = []string{
- "10ebb67700b1868efb4417987acf4690ae9d972fb7a590c2f02871799aaa4786b5e996e8f0f4eb981fc214b005f42d2ff4233499391653df7aefcbc13fc51568",
- "961f6dd1e4dd30f63901690c512e78e4b45e4742ed197c3c5e45c549fd25f2e4187b0bc9fe30492b16b0d0bc4ef9b0f34c7003fac09a5ef1532e69430234cebd",
- "da2cfbe2d8409a0f38026113884f84b50156371ae304c4430173d08a99d9fb1b983164a3770706d537f49e0c916d9f32b95cc37a95b99d857436f0232c88a965",
- "33d0825dddf7ada99b0e7e307104ad07ca9cfd9692214f1561356315e784f3e5a17e364ae9dbb14cb2036df932b77f4b292761365fb328de7afdc6d8998f5fc1",
- "beaa5a3d08f3807143cf621d95cd690514d0b49efff9c91d24b59241ec0eefa5f60196d407048bba8d2146828ebcb0488d8842fd56bb4f6df8e19c4b4daab8ac",
- "098084b51fd13deae5f4320de94a688ee07baea2800486689a8636117b46c1f4c1f6af7f74ae7c857600456a58a3af251dc4723a64cc7c0a5ab6d9cac91c20bb",
- "6044540d560853eb1c57df0077dd381094781cdb9073e5b1b3d3f6c7829e12066bbaca96d989a690de72ca3133a83652ba284a6d62942b271ffa2620c9e75b1f",
- "7a8cfe9b90f75f7ecb3acc053aaed6193112b6f6a4aeeb3f65d3de541942deb9e2228152a3c4bbbe72fc3b12629528cfbb09fe630f0474339f54abf453e2ed52",
- "380beaf6ea7cc9365e270ef0e6f3a64fb902acae51dd5512f84259ad2c91f4bc4108db73192a5bbfb0cbcf71e46c3e21aee1c5e860dc96e8eb0b7b8426e6abe9",
- "60fe3c4535e1b59d9a61ea8500bfac41a69dffb1ceadd9aca323e9a625b64da5763bad7226da02b9c8c4f1a5de140ac5a6c1124e4f718ce0b28ea47393aa6637",
- "4fe181f54ad63a2983feaaf77d1e7235c2beb17fa328b6d9505bda327df19fc37f02c4b6f0368ce23147313a8e5738b5fa2a95b29de1c7f8264eb77b69f585cd",
- "f228773ce3f3a42b5f144d63237a72d99693adb8837d0e112a8a0f8ffff2c362857ac49c11ec740d1500749dac9b1f4548108bf3155794dcc9e4082849e2b85b",
- "962452a8455cc56c8511317e3b1f3b2c37df75f588e94325fdd77070359cf63a9ae6e930936fdf8e1e08ffca440cfb72c28f06d89a2151d1c46cd5b268ef8563",
- "43d44bfa18768c59896bf7ed1765cb2d14af8c260266039099b25a603e4ddc5039d6ef3a91847d1088d401c0c7e847781a8a590d33a3c6cb4df0fab1c2f22355",
- "dcffa9d58c2a4ca2cdbb0c7aa4c4c1d45165190089f4e983bb1c2cab4aaeff1fa2b5ee516fecd780540240bf37e56c8bcca7fab980e1e61c9400d8a9a5b14ac6",
- "6fbf31b45ab0c0b8dad1c0f5f4061379912dde5aa922099a030b725c73346c524291adef89d2f6fd8dfcda6d07dad811a9314536c2915ed45da34947e83de34e",
- "a0c65bddde8adef57282b04b11e7bc8aab105b99231b750c021f4a735cb1bcfab87553bba3abb0c3e64a0b6955285185a0bd35fb8cfde557329bebb1f629ee93",
- "f99d815550558e81eca2f96718aed10d86f3f1cfb675cce06b0eff02f617c5a42c5aa760270f2679da2677c5aeb94f1142277f21c7f79f3c4f0cce4ed8ee62b1",
- "95391da8fc7b917a2044b3d6f5374e1ca072b41454d572c7356c05fd4bc1e0f40b8bb8b4a9f6bce9be2c4623c399b0dca0dab05cb7281b71a21b0ebcd9e55670",
- "04b9cd3d20d221c09ac86913d3dc63041989a9a1e694f1e639a3ba7e451840f750c2fc191d56ad61f2e7936bc0ac8e094b60caeed878c18799045402d61ceaf9",
- "ec0e0ef707e4ed6c0c66f9e089e4954b058030d2dd86398fe84059631f9ee591d9d77375355149178c0cf8f8e7c49ed2a5e4f95488a2247067c208510fadc44c",
- "9a37cce273b79c09913677510eaf7688e89b3314d3532fd2764c39de022a2945b5710d13517af8ddc0316624e73bec1ce67df15228302036f330ab0cb4d218dd",
- "4cf9bb8fb3d4de8b38b2f262d3c40f46dfe747e8fc0a414c193d9fcf753106ce47a18f172f12e8a2f1c26726545358e5ee28c9e2213a8787aafbc516d2343152",
- "64e0c63af9c808fd893137129867fd91939d53f2af04be4fa268006100069b2d69daa5c5d8ed7fddcb2a70eeecdf2b105dd46a1e3b7311728f639ab489326bc9",
- "5e9c93158d659b2def06b0c3c7565045542662d6eee8a96a89b78ade09fe8b3dcc096d4fe48815d88d8f82620156602af541955e1f6ca30dce14e254c326b88f",
- "7775dff889458dd11aef417276853e21335eb88e4dec9cfb4e9edb49820088551a2ca60339f12066101169f0dfe84b098fddb148d9da6b3d613df263889ad64b",
- "f0d2805afbb91f743951351a6d024f9353a23c7ce1fc2b051b3a8b968c233f46f50f806ecb1568ffaa0b60661e334b21dde04f8fa155ac740eeb42e20b60d764",
- "86a2af316e7d7754201b942e275364ac12ea8962ab5bd8d7fb276dc5fbffc8f9a28cae4e4867df6780d9b72524160927c855da5b6078e0b554aa91e31cb9ca1d",
- "10bdf0caa0802705e706369baf8a3f79d72c0a03a80675a7bbb00be3a45e516424d1ee88efb56f6d5777545ae6e27765c3a8f5e493fc308915638933a1dfee55",
- "b01781092b1748459e2e4ec178696627bf4ebafebba774ecf018b79a68aeb84917bf0b84bb79d17b743151144cd66b7b33a4b9e52c76c4e112050ff5385b7f0b",
- "c6dbc61dec6eaeac81e3d5f755203c8e220551534a0b2fd105a91889945a638550204f44093dd998c076205dffad703a0e5cd3c7f438a7e634cd59fededb539e",
- "eba51acffb4cea31db4b8d87e9bf7dd48fe97b0253ae67aa580f9ac4a9d941f2bea518ee286818cc9f633f2a3b9fb68e594b48cdd6d515bf1d52ba6c85a203a7",
- "86221f3ada52037b72224f105d7999231c5e5534d03da9d9c0a12acb68460cd375daf8e24386286f9668f72326dbf99ba094392437d398e95bb8161d717f8991",
- "5595e05c13a7ec4dc8f41fb70cb50a71bce17c024ff6de7af618d0cc4e9c32d9570d6d3ea45b86525491030c0d8f2b1836d5778c1ce735c17707df364d054347",
- "ce0f4f6aca89590a37fe034dd74dd5fa65eb1cbd0a41508aaddc09351a3cea6d18cb2189c54b700c009f4cbf0521c7ea01be61c5ae09cb54f27bc1b44d658c82",
- "7ee80b06a215a3bca970c77cda8761822bc103d44fa4b33f4d07dcb997e36d55298bceae12241b3fa07fa63be5576068da387b8d5859aeab701369848b176d42",
- "940a84b6a84d109aab208c024c6ce9647676ba0aaa11f86dbb7018f9fd2220a6d901a9027f9abcf935372727cbf09ebd61a2a2eeb87653e8ecad1bab85dc8327",
- "2020b78264a82d9f4151141adba8d44bf20c5ec062eee9b595a11f9e84901bf148f298e0c9f8777dcdbc7cc4670aac356cc2ad8ccb1629f16f6a76bcefbee760",
- "d1b897b0e075ba68ab572adf9d9c436663e43eb3d8e62d92fc49c9be214e6f27873fe215a65170e6bea902408a25b49506f47babd07cecf7113ec10c5dd31252",
- "b14d0c62abfa469a357177e594c10c194243ed2025ab8aa5ad2fa41ad318e0ff48cd5e60bec07b13634a711d2326e488a985f31e31153399e73088efc86a5c55",
- "4169c5cc808d2697dc2a82430dc23e3cd356dc70a94566810502b8d655b39abf9e7f902fe717e0389219859e1945df1af6ada42e4ccda55a197b7100a30c30a1",
- "258a4edb113d66c839c8b1c91f15f35ade609f11cd7f8681a4045b9fef7b0b24c82cda06a5f2067b368825e3914e53d6948ede92efd6e8387fa2e537239b5bee",
- "79d2d8696d30f30fb34657761171a11e6c3f1e64cbe7bebee159cb95bfaf812b4f411e2f26d9c421dc2c284a3342d823ec293849e42d1e46b0a4ac1e3c86abaa",
- "8b9436010dc5dee992ae38aea97f2cd63b946d94fedd2ec9671dcde3bd4ce9564d555c66c15bb2b900df72edb6b891ebcadfeff63c9ea4036a998be7973981e7",
- "c8f68e696ed28242bf997f5b3b34959508e42d613810f1e2a435c96ed2ff560c7022f361a9234b9837feee90bf47922ee0fd5f8ddf823718d86d1e16c6090071",
- "b02d3eee4860d5868b2c39ce39bfe81011290564dd678c85e8783f29302dfc1399ba95b6b53cd9ebbf400cca1db0ab67e19a325f2d115812d25d00978ad1bca4",
- "7693ea73af3ac4dad21ca0d8da85b3118a7d1c6024cfaf557699868217bc0c2f44a199bc6c0edd519798ba05bd5b1b4484346a47c2cadf6bf30b785cc88b2baf",
- "a0e5c1c0031c02e48b7f09a5e896ee9aef2f17fc9e18e997d7f6cac7ae316422c2b1e77984e5f3a73cb45deed5d3f84600105e6ee38f2d090c7d0442ea34c46d",
- "41daa6adcfdb69f1440c37b596440165c15ada596813e2e22f060fcd551f24dee8e04ba6890387886ceec4a7a0d7fc6b44506392ec3822c0d8c1acfc7d5aebe8",
- "14d4d40d5984d84c5cf7523b7798b254e275a3a8cc0a1bd06ebc0bee726856acc3cbf516ff667cda2058ad5c3412254460a82c92187041363cc77a4dc215e487",
- "d0e7a1e2b9a447fee83e2277e9ff8010c2f375ae12fa7aaa8ca5a6317868a26a367a0b69fbc1cf32a55d34eb370663016f3d2110230eba754028a56f54acf57c",
- "e771aa8db5a3e043e8178f39a0857ba04a3f18e4aa05743cf8d222b0b095825350ba422f63382a23d92e4149074e816a36c1cd28284d146267940b31f8818ea2",
- "feb4fd6f9e87a56bef398b3284d2bda5b5b0e166583a66b61e538457ff0584872c21a32962b9928ffab58de4af2edd4e15d8b35570523207ff4e2a5aa7754caa",
- "462f17bf005fb1c1b9e671779f665209ec2873e3e411f98dabf240a1d5ec3f95ce6796b6fc23fe171903b502023467dec7273ff74879b92967a2a43a5a183d33",
- "d3338193b64553dbd38d144bea71c5915bb110e2d88180dbc5db364fd6171df317fc7268831b5aef75e4342b2fad8797ba39eddcef80e6ec08159350b1ad696d",
- "e1590d585a3d39f7cb599abd479070966409a6846d4377acf4471d065d5db94129cc9be92573b05ed226be1e9b7cb0cabe87918589f80dadd4ef5ef25a93d28e",
- "f8f3726ac5a26cc80132493a6fedcb0e60760c09cfc84cad178175986819665e76842d7b9fedf76dddebf5d3f56faaad4477587af21606d396ae570d8e719af2",
- "30186055c07949948183c850e9a756cc09937e247d9d928e869e20bafc3cd9721719d34e04a0899b92c736084550186886efba2e790d8be6ebf040b209c439a4",
- "f3c4276cb863637712c241c444c5cc1e3554e0fddb174d035819dd83eb700b4ce88df3ab3841ba02085e1a99b4e17310c5341075c0458ba376c95a6818fbb3e2",
- "0aa007c4dd9d5832393040a1583c930bca7dc5e77ea53add7e2b3f7c8e231368043520d4a3ef53c969b6bbfd025946f632bd7f765d53c21003b8f983f75e2a6a",
- "08e9464720533b23a04ec24f7ae8c103145f765387d738777d3d343477fd1c58db052142cab754ea674378e18766c53542f71970171cc4f81694246b717d7564",
- "d37ff7ad297993e7ec21e0f1b4b5ae719cdc83c5db687527f27516cbffa822888a6810ee5c1ca7bfe3321119be1ab7bfa0a502671c8329494df7ad6f522d440f",
- "dd9042f6e464dcf86b1262f6accfafbd8cfd902ed3ed89abf78ffa482dbdeeb6969842394c9a1168ae3d481a017842f660002d42447c6b22f7b72f21aae021c9",
- "bd965bf31e87d70327536f2a341cebc4768eca275fa05ef98f7f1b71a0351298de006fba73fe6733ed01d75801b4a928e54231b38e38c562b2e33ea1284992fa",
- "65676d800617972fbd87e4b9514e1c67402b7a331096d3bfac22f1abb95374abc942f16e9ab0ead33b87c91968a6e509e119ff07787b3ef483e1dcdccf6e3022",
- "939fa189699c5d2c81ddd1ffc1fa207c970b6a3685bb29ce1d3e99d42f2f7442da53e95a72907314f4588399a3ff5b0a92beb3f6be2694f9f86ecf2952d5b41c",
- "c516541701863f91005f314108ceece3c643e04fc8c42fd2ff556220e616aaa6a48aeb97a84bad74782e8dff96a1a2fa949339d722edcaa32b57067041df88cc",
- "987fd6e0d6857c553eaebb3d34970a2c2f6e89a3548f492521722b80a1c21a153892346d2cba6444212d56da9a26e324dccbc0dcde85d4d2ee4399eec5a64e8f",
- "ae56deb1c2328d9c4017706bce6e99d41349053ba9d336d677c4c27d9fd50ae6aee17e853154e1f4fe7672346da2eaa31eea53fcf24a22804f11d03da6abfc2b",
- "49d6a608c9bde4491870498572ac31aac3fa40938b38a7818f72383eb040ad39532bc06571e13d767e6945ab77c0bdc3b0284253343f9f6c1244ebf2ff0df866",
- "da582ad8c5370b4469af862aa6467a2293b2b28bd80ae0e91f425ad3d47249fdf98825cc86f14028c3308c9804c78bfeeeee461444ce243687e1a50522456a1d",
- "d5266aa3331194aef852eed86d7b5b2633a0af1c735906f2e13279f14931a9fc3b0eac5ce9245273bd1aa92905abe16278ef7efd47694789a7283b77da3c70f8",
- "2962734c28252186a9a1111c732ad4de4506d4b4480916303eb7991d659ccda07a9911914bc75c418ab7a4541757ad054796e26797feaf36e9f6ad43f14b35a4",
- "e8b79ec5d06e111bdfafd71e9f5760f00ac8ac5d8bf768f9ff6f08b8f026096b1cc3a4c973333019f1e3553e77da3f98cb9f542e0a90e5f8a940cc58e59844b3",
- "dfb320c44f9d41d1efdcc015f08dd5539e526e39c87d509ae6812a969e5431bf4fa7d91ffd03b981e0d544cf72d7b1c0374f8801482e6dea2ef903877eba675e",
- "d88675118fdb55a5fb365ac2af1d217bf526ce1ee9c94b2f0090b2c58a06ca58187d7fe57c7bed9d26fca067b4110eefcd9a0a345de872abe20de368001b0745",
- "b893f2fc41f7b0dd6e2f6aa2e0370c0cff7df09e3acfcc0e920b6e6fad0ef747c40668417d342b80d2351e8c175f20897a062e9765e6c67b539b6ba8b9170545",
- "6c67ec5697accd235c59b486d7b70baeedcbd4aa64ebd4eef3c7eac189561a726250aec4d48cadcafbbe2ce3c16ce2d691a8cce06e8879556d4483ed7165c063",
- "f1aa2b044f8f0c638a3f362e677b5d891d6fd2ab0765f6ee1e4987de057ead357883d9b405b9d609eea1b869d97fb16d9b51017c553f3b93c0a1e0f1296fedcd",
- "cbaa259572d4aebfc1917acddc582b9f8dfaa928a198ca7acd0f2aa76a134a90252e6298a65b08186a350d5b7626699f8cb721a3ea5921b753ae3a2dce24ba3a",
- "fa1549c9796cd4d303dcf452c1fbd5744fd9b9b47003d920b92de34839d07ef2a29ded68f6fc9e6c45e071a2e48bd50c5084e96b657dd0404045a1ddefe282ed",
- "5cf2ac897ab444dcb5c8d87c495dbdb34e1838b6b629427caa51702ad0f9688525f13bec503a3c3a2c80a65e0b5715e8afab00ffa56ec455a49a1ad30aa24fcd",
- "9aaf80207bace17bb7ab145757d5696bde32406ef22b44292ef65d4519c3bb2ad41a59b62cc3e94b6fa96d32a7faadae28af7d35097219aa3fd8cda31e40c275",
- "af88b163402c86745cb650c2988fb95211b94b03ef290eed9662034241fd51cf398f8073e369354c43eae1052f9b63b08191caa138aa54fea889cc7024236897",
- "48fa7d64e1ceee27b9864db5ada4b53d00c9bc7626555813d3cd6730ab3cc06ff342d727905e33171bde6e8476e77fb1720861e94b73a2c538d254746285f430",
- "0e6fd97a85e904f87bfe85bbeb34f69e1f18105cf4ed4f87aec36c6e8b5f68bd2a6f3dc8a9ecb2b61db4eedb6b2ea10bf9cb0251fb0f8b344abf7f366b6de5ab",
- "06622da5787176287fdc8fed440bad187d830099c94e6d04c8e9c954cda70c8bb9e1fc4a6d0baa831b9b78ef6648681a4867a11da93ee36e5e6a37d87fc63f6f",
- "1da6772b58fabf9c61f68d412c82f182c0236d7d575ef0b58dd22458d643cd1dfc93b03871c316d8430d312995d4197f0874c99172ba004a01ee295abac24e46",
- "3cd2d9320b7b1d5fb9aab951a76023fa667be14a9124e394513918a3f44096ae4904ba0ffc150b63bc7ab1eeb9a6e257e5c8f000a70394a5afd842715de15f29",
- "04cdc14f7434e0b4be70cb41db4c779a88eaef6accebcb41f2d42fffe7f32a8e281b5c103a27021d0d08362250753cdf70292195a53a48728ceb5844c2d98bab",
- "9071b7a8a075d0095b8fb3ae5113785735ab98e2b52faf91d5b89e44aac5b5d4ebbf91223b0ff4c71905da55342e64655d6ef8c89a4768c3f93a6dc0366b5bc8",
- "ebb30240dd96c7bc8d0abe49aa4edcbb4afdc51ff9aaf720d3f9e7fbb0f9c6d6571350501769fc4ebd0b2141247ff400d4fd4be414edf37757bb90a32ac5c65a",
- "8532c58bf3c8015d9d1cbe00eef1f5082f8f3632fbe9f1ed4f9dfb1fa79e8283066d77c44c4af943d76b300364aecbd0648c8a8939bd204123f4b56260422dec",
- "fe9846d64f7c7708696f840e2d76cb4408b6595c2f81ec6a28a7f2f20cb88cfe6ac0b9e9b8244f08bd7095c350c1d0842f64fb01bb7f532dfcd47371b0aeeb79",
- "28f17ea6fb6c42092dc264257e29746321fb5bdaea9873c2a7fa9d8f53818e899e161bc77dfe8090afd82bf2266c5c1bc930a8d1547624439e662ef695f26f24",
- "ec6b7d7f030d4850acae3cb615c21dd25206d63e84d1db8d957370737ba0e98467ea0ce274c66199901eaec18a08525715f53bfdb0aacb613d342ebdceeddc3b",
- "b403d3691c03b0d3418df327d5860d34bbfcc4519bfbce36bf33b208385fadb9186bc78a76c489d89fd57e7dc75412d23bcd1dae8470ce9274754bb8585b13c5",
- "31fc79738b8772b3f55cd8178813b3b52d0db5a419d30ba9495c4b9da0219fac6df8e7c23a811551a62b827f256ecdb8124ac8a6792ccfecc3b3012722e94463",
- "bb2039ec287091bcc9642fc90049e73732e02e577e2862b32216ae9bedcd730c4c284ef3968c368b7d37584f97bd4b4dc6ef6127acfe2e6ae2509124e66c8af4",
- "f53d68d13f45edfcb9bd415e2831e938350d5380d3432278fc1c0c381fcb7c65c82dafe051d8c8b0d44e0974a0e59ec7bf7ed0459f86e96f329fc79752510fd3",
- "8d568c7984f0ecdf7640fbc483b5d8c9f86634f6f43291841b309a350ab9c1137d24066b09da9944bac54d5bb6580d836047aac74ab724b887ebf93d4b32eca9",
- "c0b65ce5a96ff774c456cac3b5f2c4cd359b4ff53ef93a3da0778be4900d1e8da1601e769e8f1b02d2a2f8c5b9fa10b44f1c186985468feeb008730283a6657d",
- "4900bba6f5fb103ece8ec96ada13a5c3c85488e05551da6b6b33d988e611ec0fe2e3c2aa48ea6ae8986a3a231b223c5d27cec2eadde91ce07981ee652862d1e4",
- "c7f5c37c7285f927f76443414d4357ff789647d7a005a5a787e03c346b57f49f21b64fa9cf4b7e45573e23049017567121a9c3d4b2b73ec5e9413577525db45a",
- "ec7096330736fdb2d64b5653e7475da746c23a4613a82687a28062d3236364284ac01720ffb406cfe265c0df626a188c9e5963ace5d3d5bb363e32c38c2190a6",
- "82e744c75f4649ec52b80771a77d475a3bc091989556960e276a5f9ead92a03f718742cdcfeaee5cb85c44af198adc43a4a428f5f0c2ddb0be36059f06d7df73",
- "2834b7a7170f1f5b68559ab78c1050ec21c919740b784a9072f6e5d69f828d70c919c5039fb148e39e2c8a52118378b064ca8d5001cd10a5478387b966715ed6",
- "16b4ada883f72f853bb7ef253efcab0c3e2161687ad61543a0d2824f91c1f81347d86be709b16996e17f2dd486927b0288ad38d13063c4a9672c39397d3789b6",
- "78d048f3a69d8b54ae0ed63a573ae350d89f7c6cf1f3688930de899afa037697629b314e5cd303aa62feea72a25bf42b304b6c6bcb27fae21c16d925e1fbdac3",
- "0f746a48749287ada77a82961f05a4da4abdb7d77b1220f836d09ec814359c0ec0239b8c7b9ff9e02f569d1b301ef67c4612d1de4f730f81c12c40cc063c5caa",
- "f0fc859d3bd195fbdc2d591e4cdac15179ec0f1dc821c11df1f0c1d26e6260aaa65b79fafacafd7d3ad61e600f250905f5878c87452897647a35b995bcadc3a3",
- "2620f687e8625f6a412460b42e2cef67634208ce10a0cbd4dff7044a41b7880077e9f8dc3b8d1216d3376a21e015b58fb279b521d83f9388c7382c8505590b9b",
- "227e3aed8d2cb10b918fcb04f9de3e6d0a57e08476d93759cd7b2ed54a1cbf0239c528fb04bbf288253e601d3bc38b21794afef90b17094a182cac557745e75f",
- "1a929901b09c25f27d6b35be7b2f1c4745131fdebca7f3e2451926720434e0db6e74fd693ad29b777dc3355c592a361c4873b01133a57c2e3b7075cbdb86f4fc",
- "5fd7968bc2fe34f220b5e3dc5af9571742d73b7d60819f2888b629072b96a9d8ab2d91b82d0a9aaba61bbd39958132fcc4257023d1eca591b3054e2dc81c8200",
- "dfcce8cf32870cc6a503eadafc87fd6f78918b9b4d0737db6810be996b5497e7e5cc80e312f61e71ff3e9624436073156403f735f56b0b01845c18f6caf772e6",
- "02f7ef3a9ce0fff960f67032b296efca3061f4934d690749f2d01c35c81c14f39a67fa350bc8a0359bf1724bffc3bca6d7c7bba4791fd522a3ad353c02ec5aa8",
- "64be5c6aba65d594844ae78bb022e5bebe127fd6b6ffa5a13703855ab63b624dcd1a363f99203f632ec386f3ea767fc992e8ed9686586aa27555a8599d5b808f",
- "f78585505c4eaa54a8b5be70a61e735e0ff97af944ddb3001e35d86c4e2199d976104b6ae31750a36a726ed285064f5981b503889fef822fcdc2898dddb7889a",
- "e4b5566033869572edfd87479a5bb73c80e8759b91232879d96b1dda36c012076ee5a2ed7ae2de63ef8406a06aea82c188031b560beafb583fb3de9e57952a7e",
- "e1b3e7ed867f6c9484a2a97f7715f25e25294e992e41f6a7c161ffc2adc6daaeb7113102d5e6090287fe6ad94ce5d6b739c6ca240b05c76fb73f25dd024bf935",
- "85fd085fdc12a080983df07bd7012b0d402a0f4043fcb2775adf0bad174f9b08d1676e476985785c0a5dcc41dbff6d95ef4d66a3fbdc4a74b82ba52da0512b74",
- "aed8fa764b0fbff821e05233d2f7b0900ec44d826f95e93c343c1bc3ba5a24374b1d616e7e7aba453a0ada5e4fab5382409e0d42ce9c2bc7fb39a99c340c20f0",
- "7ba3b2e297233522eeb343bd3ebcfd835a04007735e87f0ca300cbee6d416565162171581e4020ff4cf176450f1291ea2285cb9ebffe4c56660627685145051c",
- "de748bcf89ec88084721e16b85f30adb1a6134d664b5843569babc5bbd1a15ca9b61803c901a4fef32965a1749c9f3a4e243e173939dc5a8dc495c671ab52145",
- "aaf4d2bdf200a919706d9842dce16c98140d34bc433df320aba9bd429e549aa7a3397652a4d768277786cf993cde2338673ed2e6b66c961fefb82cd20c93338f",
- "c408218968b788bf864f0997e6bc4c3dba68b276e2125a4843296052ff93bf5767b8cdce7131f0876430c1165fec6c4f47adaa4fd8bcfacef463b5d3d0fa61a0",
- "76d2d819c92bce55fa8e092ab1bf9b9eab237a25267986cacf2b8ee14d214d730dc9a5aa2d7b596e86a1fd8fa0804c77402d2fcd45083688b218b1cdfa0dcbcb",
- "72065ee4dd91c2d8509fa1fc28a37c7fc9fa7d5b3f8ad3d0d7a25626b57b1b44788d4caf806290425f9890a3a2a35a905ab4b37acfd0da6e4517b2525c9651e4",
- "64475dfe7600d7171bea0b394e27c9b00d8e74dd1e416a79473682ad3dfdbb706631558055cfc8a40e07bd015a4540dcdea15883cbbf31412df1de1cd4152b91",
- "12cd1674a4488a5d7c2b3160d2e2c4b58371bedad793418d6f19c6ee385d70b3e06739369d4df910edb0b0a54cbff43d54544cd37ab3a06cfa0a3ddac8b66c89",
- "60756966479dedc6dd4bcff8ea7d1d4ce4d4af2e7b097e32e3763518441147cc12b3c0ee6d2ecabf1198cec92e86a3616fba4f4e872f5825330adbb4c1dee444",
- "a7803bcb71bc1d0f4383dde1e0612e04f872b715ad30815c2249cf34abb8b024915cb2fc9f4e7cc4c8cfd45be2d5a91eab0941c7d270e2da4ca4a9f7ac68663a",
- "b84ef6a7229a34a750d9a98ee2529871816b87fbe3bc45b45fa5ae82d5141540211165c3c5d7a7476ba5a4aa06d66476f0d9dc49a3f1ee72c3acabd498967414",
- "fae4b6d8efc3f8c8e64d001dabec3a21f544e82714745251b2b4b393f2f43e0da3d403c64db95a2cb6e23ebb7b9e94cdd5ddac54f07c4a61bd3cb10aa6f93b49",
- "34f7286605a122369540141ded79b8957255da2d4155abbf5a8dbb89c8eb7ede8eeef1daa46dc29d751d045dc3b1d658bb64b80ff8589eddb3824b13da235a6b",
- "3b3b48434be27b9eababba43bf6b35f14b30f6a88dc2e750c358470d6b3aa3c18e47db4017fa55106d8252f016371a00f5f8b070b74ba5f23cffc5511c9f09f0",
- "ba289ebd6562c48c3e10a8ad6ce02e73433d1e93d7c9279d4d60a7e879ee11f441a000f48ed9f7c4ed87a45136d7dccdca482109c78a51062b3ba4044ada2469",
- "022939e2386c5a37049856c850a2bb10a13dfea4212b4c732a8840a9ffa5faf54875c5448816b2785a007da8a8d2bc7d71a54e4e6571f10b600cbdb25d13ede3",
- "e6fec19d89ce8717b1a087024670fe026f6c7cbda11caef959bb2d351bf856f8055d1c0ebdaaa9d1b17886fc2c562b5e99642fc064710c0d3488a02b5ed7f6fd",
- "94c96f02a8f576aca32ba61c2b206f907285d9299b83ac175c209a8d43d53bfe683dd1d83e7549cb906c28f59ab7c46f8751366a28c39dd5fe2693c9019666c8",
- "31a0cd215ebd2cb61de5b9edc91e6195e31c59a5648d5c9f737e125b2605708f2e325ab3381c8dce1a3e958886f1ecdc60318f882cfe20a24191352e617b0f21",
- "91ab504a522dce78779f4c6c6ba2e6b6db5565c76d3e7e7c920caf7f757ef9db7c8fcf10e57f03379ea9bf75eb59895d96e149800b6aae01db778bb90afbc989",
- "d85cabc6bd5b1a01a5afd8c6734740da9fd1c1acc6db29bfc8a2e5b668b028b6b3154bfb8703fa3180251d589ad38040ceb707c4bad1b5343cb426b61eaa49c1",
- "d62efbec2ca9c1f8bd66ce8b3f6a898cb3f7566ba6568c618ad1feb2b65b76c3ce1dd20f7395372faf28427f61c9278049cf0140df434f5633048c86b81e0399",
- "7c8fdc6175439e2c3db15bafa7fb06143a6a23bc90f449e79deef73c3d492a671715c193b6fea9f036050b946069856b897e08c00768f5ee5ddcf70b7cd6d0e0",
- "58602ee7468e6bc9df21bd51b23c005f72d6cb013f0a1b48cbec5eca299299f97f09f54a9a01483eaeb315a6478bad37ba47ca1347c7c8fc9e6695592c91d723",
- "27f5b79ed256b050993d793496edf4807c1d85a7b0a67c9c4fa99860750b0ae66989670a8ffd7856d7ce411599e58c4d77b232a62bef64d15275be46a68235ff",
- "3957a976b9f1887bf004a8dca942c92d2b37ea52600f25e0c9bc5707d0279c00c6e85a839b0d2d8eb59c51d94788ebe62474a791cadf52cccf20f5070b6573fc",
- "eaa2376d55380bf772ecca9cb0aa4668c95c707162fa86d518c8ce0ca9bf7362b9f2a0adc3ff59922df921b94567e81e452f6c1a07fc817cebe99604b3505d38",
- "c1e2c78b6b2734e2480ec550434cb5d613111adcc21d475545c3b1b7e6ff12444476e5c055132e2229dc0f807044bb919b1a5662dd38a9ee65e243a3911aed1a",
- "8ab48713389dd0fcf9f965d3ce66b1e559a1f8c58741d67683cd971354f452e62d0207a65e436c5d5d8f8ee71c6abfe50e669004c302b31a7ea8311d4a916051",
- "24ce0addaa4c65038bd1b1c0f1452a0b128777aabc94a29df2fd6c7e2f85f8ab9ac7eff516b0e0a825c84a24cfe492eaad0a6308e46dd42fe8333ab971bb30ca",
- "5154f929ee03045b6b0c0004fa778edee1d139893267cc84825ad7b36c63de32798e4a166d24686561354f63b00709a1364b3c241de3febf0754045897467cd4",
- "e74e907920fd87bd5ad636dd11085e50ee70459c443e1ce5809af2bc2eba39f9e6d7128e0e3712c316da06f4705d78a4838e28121d4344a2c79c5e0db307a677",
- "bf91a22334bac20f3fd80663b3cd06c4e8802f30e6b59f90d3035cc9798a217ed5a31abbda7fa6842827bdf2a7a1c21f6fcfccbb54c6c52926f32da816269be1",
- "d9d5c74be5121b0bd742f26bffb8c89f89171f3f934913492b0903c271bbe2b3395ef259669bef43b57f7fcc3027db01823f6baee66e4f9fead4d6726c741fce",
- "50c8b8cf34cd879f80e2faab3230b0c0e1cc3e9dcadeb1b9d97ab923415dd9a1fe38addd5c11756c67990b256e95ad6d8f9fedce10bf1c90679cde0ecf1be347",
- "0a386e7cd5dd9b77a035e09fe6fee2c8ce61b5383c87ea43205059c5e4cd4f4408319bb0a82360f6a58e6c9ce3f487c446063bf813bc6ba535e17fc1826cfc91",
- "1f1459cb6b61cbac5f0efe8fc487538f42548987fcd56221cfa7beb22504769e792c45adfb1d6b3d60d7b749c8a75b0bdf14e8ea721b95dca538ca6e25711209",
- "e58b3836b7d8fedbb50ca5725c6571e74c0785e97821dab8b6298c10e4c079d4a6cdf22f0fedb55032925c16748115f01a105e77e00cee3d07924dc0d8f90659",
- "b929cc6505f020158672deda56d0db081a2ee34c00c1100029bdf8ea98034fa4bf3e8655ec697fe36f40553c5bb46801644a627d3342f4fc92b61f03290fb381",
- "72d353994b49d3e03153929a1e4d4f188ee58ab9e72ee8e512f29bc773913819ce057ddd7002c0433ee0a16114e3d156dd2c4a7e80ee53378b8670f23e33ef56",
- "c70ef9bfd775d408176737a0736d68517ce1aaad7e81a93c8c1ed967ea214f56c8a377b1763e676615b60f3988241eae6eab9685a5124929d28188f29eab06f7",
- "c230f0802679cb33822ef8b3b21bf7a9a28942092901d7dac3760300831026cf354c9232df3e084d9903130c601f63c1f4a4a4b8106e468cd443bbe5a734f45f",
- "6f43094cafb5ebf1f7a4937ec50f56a4c9da303cbb55ac1f27f1f1976cd96beda9464f0e7b9c54620b8a9fba983164b8be3578425a024f5fe199c36356b88972",
- "3745273f4c38225db2337381871a0c6aafd3af9b018c88aa02025850a5dc3a42a1a3e03e56cbf1b0876d63a441f1d2856a39b8801eb5af325201c415d65e97fe",
- "c50c44cca3ec3edaae779a7e179450ebdda2f97067c690aa6c5a4ac7c30139bb27c0df4db3220e63cb110d64f37ffe078db72653e2daacf93ae3f0a2d1a7eb2e",
- "8aef263e385cbc61e19b28914243262af5afe8726af3ce39a79c27028cf3ecd3f8d2dfd9cfc9ad91b58f6f20778fd5f02894a3d91c7d57d1e4b866a7f364b6be",
- "28696141de6e2d9bcb3235578a66166c1448d3e905a1b482d423be4bc5369bc8c74dae0acc9cc123e1d8ddce9f97917e8c019c552da32d39d2219b9abf0fa8c8",
- "2fb9eb2085830181903a9dafe3db428ee15be7662224efd643371fb25646aee716e531eca69b2bdc8233f1a8081fa43da1500302975a77f42fa592136710e9dc",
- "66f9a7143f7a3314a669bf2e24bbb35014261d639f495b6c9c1f104fe8e320aca60d4550d69d52edbd5a3cdeb4014ae65b1d87aa770b69ae5c15f4330b0b0ad8",
- "f4c4dd1d594c3565e3e25ca43dad82f62abea4835ed4cd811bcd975e46279828d44d4c62c3679f1b7f7b9dd4571d7b49557347b8c5460cbdc1bef690fb2a08c0",
- "8f1dc9649c3a84551f8f6e91cac68242a43b1f8f328ee92280257387fa7559aa6db12e4aeadc2d26099178749c6864b357f3f83b2fb3efa8d2a8db056bed6bcc",
- "3139c1a7f97afd1675d460ebbc07f2728aa150df849624511ee04b743ba0a833092f18c12dc91b4dd243f333402f59fe28abdbbbae301e7b659c7a26d5c0f979",
- "06f94a2996158a819fe34c40de3cf0379fd9fb85b3e363ba3926a0e7d960e3f4c2e0c70c7ce0ccb2a64fc29869f6e7ab12bd4d3f14fce943279027e785fb5c29",
- "c29c399ef3eee8961e87565c1ce263925fc3d0ce267d13e48dd9e732ee67b0f69fad56401b0f10fcaac119201046cca28c5b14abdea3212ae65562f7f138db3d",
- "4cec4c9df52eef05c3f6faaa9791bc7445937183224ecc37a1e58d0132d35617531d7e795f52af7b1eb9d147de1292d345fe341823f8e6bc1e5badca5c656108",
- "898bfbae93b3e18d00697eab7d9704fa36ec339d076131cefdf30edbe8d9cc81c3a80b129659b163a323bab9793d4feed92d54dae966c77529764a09be88db45",
- "ee9bd0469d3aaf4f14035be48a2c3b84d9b4b1fff1d945e1f1c1d38980a951be197b25fe22c731f20aeacc930ba9c4a1f4762227617ad350fdabb4e80273a0f4",
- "3d4d3113300581cd96acbf091c3d0f3c310138cd6979e6026cde623e2dd1b24d4a8638bed1073344783ad0649cc6305ccec04beb49f31c633088a99b65130267",
- "95c0591ad91f921ac7be6d9ce37e0663ed8011c1cfd6d0162a5572e94368bac02024485e6a39854aa46fe38e97d6c6b1947cd272d86b06bb5b2f78b9b68d559d",
- "227b79ded368153bf46c0a3ca978bfdbef31f3024a5665842468490b0ff748ae04e7832ed4c9f49de9b1706709d623e5c8c15e3caecae8d5e433430ff72f20eb",
- "5d34f3952f0105eef88ae8b64c6ce95ebfade0e02c69b08762a8712d2e4911ad3f941fc4034dc9b2e479fdbcd279b902faf5d838bb2e0c6495d372b5b7029813",
- "7f939bf8353abce49e77f14f3750af20b7b03902e1a1e7fb6aaf76d0259cd401a83190f15640e74f3e6c5a90e839c7821f6474757f75c7bf9002084ddc7a62dc",
- "062b61a2f9a33a71d7d0a06119644c70b0716a504de7e5e1be49bd7b86e7ed6817714f9f0fc313d06129597e9a2235ec8521de36f7290a90ccfc1ffa6d0aee29",
- "f29e01eeae64311eb7f1c6422f946bf7bea36379523e7b2bbaba7d1d34a22d5ea5f1c5a09d5ce1fe682cced9a4798d1a05b46cd72dff5c1b355440b2a2d476bc",
- "ec38cd3bbab3ef35d7cb6d5c914298351d8a9dc97fcee051a8a02f58e3ed6184d0b7810a5615411ab1b95209c3c810114fdeb22452084e77f3f847c6dbaafe16",
- "c2aef5e0ca43e82641565b8cb943aa8ba53550caef793b6532fafad94b816082f0113a3ea2f63608ab40437ecc0f0229cb8fa224dcf1c478a67d9b64162b92d1",
- "15f534efff7105cd1c254d074e27d5898b89313b7d366dc2d7d87113fa7d53aae13f6dba487ad8103d5e854c91fdb6e1e74b2ef6d1431769c30767dde067a35c",
- "89acbca0b169897a0a2714c2df8c95b5b79cb69390142b7d6018bb3e3076b099b79a964152a9d912b1b86412b7e372e9cecad7f25d4cbab8a317be36492a67d7",
- "e3c0739190ed849c9c962fd9dbb55e207e624fcac1eb417691515499eea8d8267b7e8f1287a63633af5011fde8c4ddf55bfdf722edf88831414f2cfaed59cb9a",
- "8d6cf87c08380d2d1506eee46fd4222d21d8c04e585fbfd08269c98f702833a156326a0724656400ee09351d57b440175e2a5de93cc5f80db6daf83576cf75fa",
- "da24bede383666d563eeed37f6319baf20d5c75d1635a6ba5ef4cfa1ac95487e96f8c08af600aab87c986ebad49fc70a58b4890b9c876e091016daf49e1d322e",
- "f9d1d1b1e87ea7ae753a029750cc1cf3d0157d41805e245c5617bb934e732f0ae3180b78e05bfe76c7c3051e3e3ac78b9b50c05142657e1e03215d6ec7bfd0fc",
- "11b7bc1668032048aa43343de476395e814bbbc223678db951a1b03a021efac948cfbe215f97fe9a72a2f6bc039e3956bfa417c1a9f10d6d7ba5d3d32ff323e5",
- "b8d9000e4fc2b066edb91afee8e7eb0f24e3a201db8b6793c0608581e628ed0bcc4e5aa6787992a4bcc44e288093e63ee83abd0bc3ec6d0934a674a4da13838a",
- "ce325e294f9b6719d6b61278276ae06a2564c03bb0b783fafe785bdf89c7d5acd83e78756d301b445699024eaeb77b54d477336ec2a4f332f2b3f88765ddb0c3",
- "29acc30e9603ae2fccf90bf97e6cc463ebe28c1b2f9b4b765e70537c25c702a29dcbfbf14c99c54345ba2b51f17b77b5f15db92bbad8fa95c471f5d070a137cc",
- "3379cbaae562a87b4c0425550ffdd6bfe1203f0d666cc7ea095be407a5dfe61ee91441cd5154b3e53b4f5fb31ad4c7a9ad5c7af4ae679aa51a54003a54ca6b2d",
- "3095a349d245708c7cf550118703d7302c27b60af5d4e67fc978f8a4e60953c7a04f92fcf41aee64321ccb707a895851552b1e37b00bc5e6b72fa5bcef9e3fff",
- "07262d738b09321f4dbccec4bb26f48cb0f0ed246ce0b31b9a6e7bc683049f1f3e5545f28ce932dd985c5ab0f43bd6de0770560af329065ed2e49d34624c2cbb",
- "b6405eca8ee3316c87061cc6ec18dba53e6c250c63ba1f3bae9e55dd3498036af08cd272aa24d713c6020d77ab2f3919af1a32f307420618ab97e73953994fb4",
- "7ee682f63148ee45f6e5315da81e5c6e557c2c34641fc509c7a5701088c38a74756168e2cd8d351e88fd1a451f360a01f5b2580f9b5a2e8cfc138f3dd59a3ffc",
- "1d263c179d6b268f6fa016f3a4f29e943891125ed8593c81256059f5a7b44af2dcb2030d175c00e62ecaf7ee96682aa07ab20a611024a28532b1c25b86657902",
- "106d132cbdb4cd2597812846e2bc1bf732fec5f0a5f65dbb39ec4e6dc64ab2ce6d24630d0f15a805c3540025d84afa98e36703c3dbee713e72dde8465bc1be7e",
- "0e79968226650667a8d862ea8da4891af56a4e3a8b6d1750e394f0dea76d640d85077bcec2cc86886e506751b4f6a5838f7f0b5fef765d9dc90dcdcbaf079f08",
- "521156a82ab0c4e566e5844d5e31ad9aaf144bbd5a464fdca34dbd5717e8ff711d3ffebbfa085d67fe996a34f6d3e4e60b1396bf4b1610c263bdbb834d560816",
- "1aba88befc55bc25efbce02db8b9933e46f57661baeabeb21cc2574d2a518a3cba5dc5a38e49713440b25f9c744e75f6b85c9d8f4681f676160f6105357b8406",
- "5a9949fcb2c473cda968ac1b5d08566dc2d816d960f57e63b898fa701cf8ebd3f59b124d95bfbbedc5f1cf0e17d5eaed0c02c50b69d8a402cabcca4433b51fd4",
- "b0cead09807c672af2eb2b0f06dde46cf5370e15a4096b1a7d7cbb36ec31c205fbefca00b7a4162fa89fb4fb3eb78d79770c23f44e7206664ce3cd931c291e5d",
- "bb6664931ec97044e45b2ae420ae1c551a8874bc937d08e969399c3964ebdba8346cdd5d09caafe4c28ba7ec788191ceca65ddd6f95f18583e040d0f30d0364d",
- "65bc770a5faa3792369803683e844b0be7ee96f29f6d6a35568006bd5590f9a4ef639b7a8061c7b0424b66b60ac34af3119905f33a9d8c3ae18382ca9b689900",
- "ea9b4dca333336aaf839a45c6eaa48b8cb4c7ddabffea4f643d6357ea6628a480a5b45f2b052c1b07d1fedca918b6f1139d80f74c24510dcbaa4be70eacc1b06",
- "e6342fb4a780ad975d0e24bce149989b91d360557e87994f6b457b895575cc02d0c15bad3ce7577f4c63927ff13f3e381ff7e72bdbe745324844a9d27e3f1c01",
- "3e209c9b33e8e461178ab46b1c64b49a07fb745f1c8bc95fbfb94c6b87c69516651b264ef980937fad41238b91ddc011a5dd777c7efd4494b4b6ecd3a9c22ac0",
- "fd6a3d5b1875d80486d6e69694a56dbb04a99a4d051f15db2689776ba1c4882e6d462a603b7015dc9f4b7450f05394303b8652cfb404a266962c41bae6e18a94",
- "951e27517e6bad9e4195fc8671dee3e7e9be69cee1422cb9fecfce0dba875f7b310b93ee3a3d558f941f635f668ff832d2c1d033c5e2f0997e4c66f147344e02",
- "8eba2f874f1ae84041903c7c4253c82292530fc8509550bfdc34c95c7e2889d5650b0ad8cb988e5c4894cb87fbfbb19612ea93ccc4c5cad17158b9763464b492",
- "16f712eaa1b7c6354719a8e7dbdfaf55e4063a4d277d947550019b38dfb564830911057d50506136e2394c3b28945cc964967d54e3000c2181626cfb9b73efd2",
- "c39639e7d5c7fb8cdd0fd3e6a52096039437122f21c78f1679cea9d78a734c56ecbeb28654b4f18e342c331f6f7229ec4b4bc281b2d80a6eb50043f31796c88c",
- "72d081af99f8a173dcc9a0ac4eb3557405639a29084b54a40172912a2f8a395129d5536f0918e902f9e8fa6000995f4168ddc5f893011be6a0dbc9b8a1a3f5bb",
- "c11aa81e5efd24d5fc27ee586cfd8847fbb0e27601ccece5ecca0198e3c7765393bb74457c7e7a27eb9170350e1fb53857177506be3e762cc0f14d8c3afe9077",
- "c28f2150b452e6c0c424bcde6f8d72007f9310fed7f2f87de0dbb64f4479d6c1441ba66f44b2accee61609177ed340128b407ecec7c64bbe50d63d22d8627727",
- "f63d88122877ec30b8c8b00d22e89000a966426112bd44166e2f525b769ccbe9b286d437a0129130dde1a86c43e04bedb594e671d98283afe64ce331de9828fd",
- "348b0532880b88a6614a8d7408c3f913357fbb60e995c60205be9139e74998aede7f4581e42f6b52698f7fa1219708c14498067fd1e09502de83a77dd281150c",
- "5133dc8bef725359dff59792d85eaf75b7e1dcd1978b01c35b1b85fcebc63388ad99a17b6346a217dc1a9622ebd122ecf6913c4d31a6b52a695b86af00d741a0",
- "2753c4c0e98ecad806e88780ec27fccd0f5c1ab547f9e4bf1659d192c23aa2cc971b58b6802580baef8adc3b776ef7086b2545c2987f348ee3719cdef258c403",
- "b1663573ce4b9d8caefc865012f3e39714b9898a5da6ce17c25a6a47931a9ddb9bbe98adaa553beed436e89578455416c2a52a525cf2862b8d1d49a2531b7391",
- "64f58bd6bfc856f5e873b2a2956ea0eda0d6db0da39c8c7fc67c9f9feefcff3072cdf9e6ea37f69a44f0c61aa0da3693c2db5b54960c0281a088151db42b11e8",
- "0764c7be28125d9065c4b98a69d60aede703547c66a12e17e1c618994132f5ef82482c1e3fe3146cc65376cc109f0138ed9a80e49f1f3c7d610d2f2432f20605",
- "f748784398a2ff03ebeb07e155e66116a839741a336e32da71ec696001f0ad1b25cd48c69cfca7265eca1dd71904a0ce748ac4124f3571076dfa7116a9cf00e9",
- "3f0dbc0186bceb6b785ba78d2a2a013c910be157bdaffae81bb6663b1a73722f7f1228795f3ecada87cf6ef0078474af73f31eca0cc200ed975b6893f761cb6d",
- "d4762cd4599876ca75b2b8fe249944dbd27ace741fdab93616cbc6e425460feb51d4e7adcc38180e7fc47c89024a7f56191adb878dfde4ead62223f5a2610efe",
- "cd36b3d5b4c91b90fcbba79513cfee1907d8645a162afd0cd4cf4192d4a5f4c892183a8eacdb2b6b6a9d9aa8c11ac1b261b380dbee24ca468f1bfd043c58eefe",
- "98593452281661a53c48a9d8cd790826c1a1ce567738053d0bee4a91a3d5bd92eefdbabebe3204f2031ca5f781bda99ef5d8ae56e5b04a9e1ecd21b0eb05d3e1",
- "771f57dd2775ccdab55921d3e8e30ccf484d61fe1c1b9c2ae819d0fb2a12fab9be70c4a7a138da84e8280435daade5bbe66af0836a154f817fb17f3397e725a3",
- "c60897c6f828e21f16fbb5f15b323f87b6c8955eabf1d38061f707f608abdd993fac3070633e286cf8339ce295dd352df4b4b40b2f29da1dd50b3a05d079e6bb",
- "8210cd2c2d3b135c2cf07fa0d1433cd771f325d075c6469d9c7f1ba0943cd4ab09808cabf4acb9ce5bb88b498929b4b847f681ad2c490d042db2aec94214b06b",
- "1d4edfffd8fd80f7e4107840fa3aa31e32598491e4af7013c197a65b7f36dd3ac4b478456111cd4309d9243510782fa31b7c4c95fa951520d020eb7e5c36e4ef",
- "af8e6e91fab46ce4873e1a50a8ef448cc29121f7f74deef34a71ef89cc00d9274bc6c2454bbb3230d8b2ec94c62b1dec85f3593bfa30ea6f7a44d7c09465a253",
- "29fd384ed4906f2d13aa9fe7af905990938bed807f1832454a372ab412eea1f5625a1fcc9ac8343b7c67c5aba6e0b1cc4644654913692c6b39eb9187ceacd3ec",
- "a268c7885d9874a51c44dffed8ea53e94f78456e0b2ed99ff5a3924760813826d960a15edbedbb5de5226ba4b074e71b05c55b9756bb79e55c02754c2c7b6c8a",
- "0cf8545488d56a86817cd7ecb10f7116b7ea530a45b6ea497b6c72c997e09e3d0da8698f46bb006fc977c2cd3d1177463ac9057fdd1662c85d0c126443c10473",
- "b39614268fdd8781515e2cfebf89b4d5402bab10c226e6344e6b9ae000fb0d6c79cb2f3ec80e80eaeb1980d2f8698916bd2e9f747236655116649cd3ca23a837",
- "74bef092fc6f1e5dba3663a3fb003b2a5ba257496536d99f62b9d73f8f9eb3ce9ff3eec709eb883655ec9eb896b9128f2afc89cf7d1ab58a72f4a3bf034d2b4a",
- "3a988d38d75611f3ef38b8774980b33e573b6c57bee0469ba5eed9b44f29945e7347967fba2c162e1c3be7f310f2f75ee2381e7bfd6b3f0baea8d95dfb1dafb1",
- "58aedfce6f67ddc85a28c992f1c0bd0969f041e66f1ee88020a125cbfcfebcd61709c9c4eba192c15e69f020d462486019fa8dea0cd7a42921a19d2fe546d43d",
- "9347bd291473e6b4e368437b8e561e065f649a6d8ada479ad09b1999a8f26b91cf6120fd3bfe014e83f23acfa4c0ad7b3712b2c3c0733270663112ccd9285cd9",
- "b32163e7c5dbb5f51fdc11d2eac875efbbcb7e7699090a7e7ff8a8d50795af5d74d9ff98543ef8cdf89ac13d0485278756e0ef00c817745661e1d59fe38e7537",
- "1085d78307b1c4b008c57a2e7e5b234658a0a82e4ff1e4aaac72b312fda0fe27d233bc5b10e9cc17fdc7697b540c7d95eb215a19a1a0e20e1abfa126efd568c7",
- "4e5c734c7dde011d83eac2b7347b373594f92d7091b9ca34cb9c6f39bdf5a8d2f134379e16d822f6522170ccf2ddd55c84b9e6c64fc927ac4cf8dfb2a17701f2",
- "695d83bd990a1117b3d0ce06cc888027d12a054c2677fd82f0d4fbfc93575523e7991a5e35a3752e9b70ce62992e268a877744cdd435f5f130869c9a2074b338",
- "a6213743568e3b3158b9184301f3690847554c68457cb40fc9a4b8cfd8d4a118c301a07737aeda0f929c68913c5f51c80394f53bff1c3e83b2e40ca97eba9e15",
- "d444bfa2362a96df213d070e33fa841f51334e4e76866b8139e8af3bb3398be2dfaddcbc56b9146de9f68118dc5829e74b0c28d7711907b121f9161cb92b69a9",
- "142709d62e28fcccd0af97fad0f8465b971e82201dc51070faa0372aa43e92484be1c1e73ba10906d5d1853db6a4106e0a7bf9800d373d6dee2d46d62ef2a461",
-}
-
-var hashes2X = []string{
- "64",
- "f457",
- "e8c045",
- "a74c6d0d",
- "eb02ae482a",
- "be65b981275e",
- "8540ccd083a455",
- "074a02fa58d7c7c0",
- "da6da05e10db3022b6",
- "542a5aae2f28f2c3b68c",
- "ca3af2afc4afe891da78b1",
- "e0f66b8dcebf4edc85f12c85",
- "744224d383733b3fa2c53bfcf5",
- "b09b653e85b72ef5cdf8fcfa95f3",
- "dd51877f31f1cf7b9f68bbb09064a3",
- "f5ebf68e7ebed6ad445ffc0c47e82650",
- "ebdcfe03bcb7e21a9091202c5938c0a1bb",
- "860fa5a72ff92efafc48a89df1632a4e2809",
- "0d6d49daa26ae2818041108df3ce0a4db48c8d",
- "e5d7e1bc5715f5ae991e4043e39533af5d53e47f",
- "5232028a43b9d4dfa7f37439b49495926481ab8a29",
- "c118803c922f9ae2397fb676a2ab7603dd9c29c21fe4",
- "2af924f48b9bd7076bfd68794bba6402e2a7ae048de3ea",
- "61255ac38231087c79ea1a0fa14538c26be1c851b6f318c0",
- "f9712b8e42f0532162822f142cb946c40369f2f0e77b6b186e",
- "76da0b89558df66f9b1e66a61d1e795b178ce77a359087793ff2",
- "9036fd1eb32061bdecebc4a32aa524b343b8098a16768ee774d93c",
- "f4ce5a05934e125d159678bea521f585574bcf9572629f155f63efcc",
- "5e1c0d9fae56393445d3024d6b82692d1339f7b5936f68b062c691d3bf",
- "538e35f3e11111d7c4bab69f83b30ade4f67addf1f45cdd2ac74bf299509",
- "17572c4dcbb17faf8785f3bba9f6903895394352eae79b01ebd758377694cc",
- "29f6bb55de7f8868e053176c878c9fe6c2055c4c5413b51ab0386c277fdbac75",
- "bad026c8b2bd3d294907f2280a7145253ec2117d76e3800357be6d431b16366e41",
- "386b7cb6e0fd4b27783125cbe80065af8eb9981fafc3ed18d8120863d972fa7427d9",
- "06e8e6e26e756fff0b83b226dce974c21f970e44fb5b3e5bbada6e4b12f81cca666f48",
- "2f9bd300244f5bc093ba6dcdb4a89fa29da22b1de9d2c9762af919b5fedf6998fbda305b",
- "cf6bdcc46d788074511f9e8f0a4b86704365b2d3f98340b8db53920c385b959a38c8869ae7",
- "1171e603e5cdeb4cda8fd7890222dd8390ede87b6f3284cac0f0d832d8250c9200715af7913d",
- "bda7b2ad5d02bd35ffb009bdd72b7d7bc9c28b3a32f32b0ba31d6cbd3ee87c60b7b98c03404621",
- "2001455324e748503aa08eff2fb2e52ae0170e81a6e9368ada054a36ca340fb779393fb045ac72b3",
- "45f0761aefafbf87a68f9f1f801148d9bba52616ad5ee8e8ac9207e9846a782f487d5cca8b20355a18",
- "3a7e05708be62f087f17b41ac9f20e4ef8115c5ab6d08e84d46af8c273fb46d3ce1aabebae5eea14e018",
- "ea318da9d042ca337ccdfb2bee3e96ecb8f907876c8d143e8e44569178353c2e593e4a82c265931ba1dd79",
- "e0f7c08f5bd712f87094b04528fadb283d83c9ceb82a3e39ec31c19a42a1a1c3bee5613b5640abe069b0d690",
- "d35e63fb1f3f52ab8f7c6cd7c8247e9799042e53922fbaea808ab979fa0c096588cfea3009181d2f93002dfc11",
- "b8b0ab69e3ae55a8699eb481dd665b6a2424c89bc6b7cca02d15fdf1b9854139cab49d34de498b50b2c7e8b910cf",
- "fb65e3222a2950eae1701d4cdd4736266f65bf2c0d2e77968996eadb60ef74fb786f6234973a2524bdfe32d100aa0e",
- "f28b4bb3a2e2c4d5c01a23ff134558559a2d3d704b75402983ee4e0f71d273ae056842c4153b18ee5c47e2bfa54313d4",
- "7bb78794e58a53c3e4b1aeb161e756af051583d14e0a5a3205e094b7c9a8cf62d098fa9ea1db12f330a51ab9852c17f983",
- "a879a8ebae4d0987789bcc58ec3448e35ba1fa1ee58c668d8295aba4eaeaf2762b053a677e25404f635a53037996974d418a",
- "695865b353ec701ecc1cb38f3154489eed0d39829fc192bb68db286d20fa0a64235cde5639137819f7e99f86bd89afcef84a0f",
- "a6ec25f369f71176952fb9b33305dc768589a6070463ee4c35996e1ced4964a865a5c3dc8f0d809eab71366450de702318e4834d",
- "604749f7bfadb069a036409ffac5ba291fa05be8cba2f141554132f56d9bcb88d1ce12f2004cd3ade1aa66a26e6ef64e327514096d",
- "daf9fa7dc2464a899533594e7916fc9bc585bd29dd60c930f3bfa78bc47f6c8439448043a45119fc9228c15bce5fd24f46baf9de736b",
- "943ea5647a8666763084da6a6f15dcf0e8dc24f27fd0d9194805d25180fe3a6d98f4b2b5e0d6a04e9b41869817030f16ae975dd41fc35c",
- "af4f73cbfc093760dfeb52d57ef45207bbd1a515f5523404e5d95a73c237d97ae65bd195b472de6d514c2c448b12fafc282166da132258e9",
- "605f4ed72ed7f5046a342fe4cf6808100d4632e610d59f7ebb016e367d0ff0a95cf45b02c727ba71f147e95212f52046804d376c918cadd260",
- "3750d8ab0a6b13f78e51d321dfd1aa801680e958de45b7b977d05732ee39f856b27cb2bcce8fbf3db6666d35e21244c2881fdcc27fbfea6b1672",
- "8f1b929e80ab752b58abe9731b7b34eb61369536995abef1c0980d93903c1880da3637d367456895f0cb4769d6de3a979e38ed6f5f6ac4d48e9b32",
- "d8469b7aa538b36cdc711a591d60dafecca22bd421973a70e2deef72f69d8014a6f0064eabfbebf5383cbb90f452c6e113d2110e4b1092c54a38b857",
- "7d1f1ad2029f4880e1898af8289c23bc933a40863cc4ab697fead79c58b6b8e25b68cf5324579b0fe879fe7a12e6d03907f0140dfe7b29d33d6109ecf1",
- "87a77aca6d551642288a0dff66078225ae39d288801607429d6725ca949eed7a6f199dd8a65523b4ee7cfa4187400e96597bfffc3e38ade0ae0ab88536a9",
- "e101f43179d8e8546e5ce6a96d7556b7e6b9d4a7d00e7aade5579d085d527ce34a9329551ebcaf6ba946949bbe38e30a62ae344c1950b4bde55306b3bac432",
- "4324561d76c370ef35ac36a4adf8f3773a50d86504bd284f71f7ce9e2bc4c1f1d34a7fb2d67561d101955d448b67577eb30dfee96a95c7f921ef53e20be8bc44",
- "78f0ed6e220b3da3cc9381563b2f72c8dc830cb0f39a48c6ae479a6a78dcfa94002631dec467e9e9b47cc8f0887eb680e340aec3ec009d4a33d241533c76c8ca8c",
- "9f6589c31a472e0a736f4eb22b6c70a9d332cc15304ccb66a6b97cd051b6ed82f8990e1d9bee2e4bb1c3c45e550ae0e7b96e93ae23f2fb8f63b309131e72b36cba6a",
- "c138077ee4ed3d7ffa85ba851dfdf6e9843fc1dc00889d117237bfaad9aa757192f73556b959f98e6d24886ce48869f2a01a48c371785f12b6484eb2078f08c22066e1",
- "f83e7c9e0954a500576ea1fc90a3db2cbd7994eaef647dab5b34e88ab9dc0b47addbc807b21c8e6dd3d0bd357f008471d4f3e0abb18450e1d4919e03a34545b9643f870e",
- "3277a11f2628544fc66f50428f1ad56bcba6ee36ba2ca6ecdf7e255effc0c30235c039d13e01f04cf1efe95b5c2033ab72adda30994b62f2851d17c9920eadca9a251752dc",
- "c2a834281a06fe7b730d3a03f90761daf02714c066e33fc07e1f59ac801ec2f4433486b5a2da8faa51a0cf3c34e29b2960cd0013378938dbd47c3a3d12d70db01d7d06c3e91e",
- "47680182924a51cabe142a6175c9253e8ba7ea579ece8d9bcb78b1e9ca00db844fa08abcf41702bd758ee2c608d9612fed50e85854469cb4ef3038acf1e35b6ba4390561d8ae82",
- "cec45830cd71869e83b109a99a3cd7d935f83a95de7c582f3adbd34e4938fa2f3f922f52f14f169c38cc6618d3f306a8a4d607b345b8a9c48017136fbf825aecf7b620e85f837fae",
- "46fb53c70ab105079d5d78dc60eaa30d938f26e4d0b9df122e21ec85deda94744c1daf8038b8a6652d1ff3e7e15376f5abd30e564784a999f665078340d66b0e939e0c2ef03f9c08bb",
- "7b0dcb52791a170cc52f2e8b95d8956f325c3751d3ef3b2b83b41d82d4496b46228a750d02b71a96012e56b0720949ca77dc68be9b1ef1ad6d6a5ceb86bf565cb972279039e209dddcdc",
- "7153fd43e6b05f5e1a4401e0fef954a737ed142ec2f60bc4daeef9ce73ea1b40a0fcaf1a1e03a3513f930dd5335723632f59f7297fe3a98b68e125eadf478eb045ed9fc4ee566d13f537f5",
- "c7f569c79c801dab50e9d9ca6542f25774b3841e49c83efe0b89109f569509ce7887bc0d2b57b50320eb81fab9017f16c4c870e59edb6c26620d93748500231d70a36f48a7c60747ca2d5986",
- "0a81e0c547648595adca65623ce783411aac7f7d30c3ad269efafab288e7186f6895261972f5137877669c550f34f5128850ebb50e1884814ea1055ee29a866afd04b2087abed02d9592573428",
- "6a7b6769e1f1c95314b0c7fe77013567891bd23416374f23e4f43e27bc4c55cfada13b53b1581948e07fb96a50676baa2756db0988077b0f27d36ac088e0ff0fe72eda1e8eb4b8facff3218d9af0",
- "a399474595cb1ccab6107f18e80f03b1707745c7bf769fc9f260094dc9f8bc6fe09271cb0b131ebb2acd073de4a6521c8368e664278be86be216d1622393f23435fae4fbc6a2e7c961282a777c2d75",
- "4f0fc590b2755a515ae6b46e9628092369d9c8e589e3239320639aa8f7aa44f8111c7c4b3fdbe6e55e036fbf5ebc9c0aa87a4e66851c11e86f6cbf0bd9eb1c98a378c7a7d3af900f55ee108b59bc9e5c",
- "ed96a046f08dd675107331d267379c6fce3c352a9f8d7b243008a74cb4e9410836afaabe871dab6038ca94ce5f6d41fa922ce08aba58169f94cfc86d9f688f396abd24c11a6a9b0830572105a477c33e92",
- "379955f539abf0eb2972ee99ed9546c4bbee363403991833005dc27904c271ef22a799bc32cb39f08d2e4ba6717d55153feb692d7c5efae70890bf29d96df02333c7b05ccc314e4835b018fec9141a82c745",
- "e16cc8d41b96547ede0d0cf4d908c5fa393399daa4a9696e76a4c1f6a2a9fef70f17fb53551a8145ed88f18db8fe780a079d94732437023f7c1d1849ef69ad536a76204239e8ba5d97e507c36c7d042f87fe0e",
- "a81de50750ece3f84536728f227208bf01ec5b7721579d007de72c88ee20663318332efe5bc7c09ad1fa8342be51f0609046ccf760a7957a7d8dc88941adb93666a4521ebe76618e5ddc2dd3261493d400b50073",
- "b72c5fb7c7f60d243928fa41a2d711157b96aef290185c64b4de3dcfa3d644da67a8f37c2ac55caad79ec695a473e8b481f658c497edb8a191526592b11a412282d2a4010c90ef4647bd6ce745ebc9244a71d4876b",
- "9550703877079c90e200e830f277b605624954c549e729c359ee01ee2b07741ecc4255cb37f96682dafcdbaade1063e2c5ccbd1918fb669926a67744101fb6de3ac016be4c74165a1e5a696b704ba2ebf4a953d44b95",
- "a17eb44d4de502dc04a80d5a5e9507d17f27c96467f24c79b06bc98a4c410741d4ac2db98ec02c2a976d788531f1a4451b6c6204cef6dae1b6ebbcd0bde23e6fffb02754043c8fd3c783d90a670b16879ce68b5554fe1c",
- "41d3ea1eaba5be4a206732dbb5b70b79b66a6e5908795ad4fb7cf9e67efb13f06fef8f90acb080ce082aadec6a1b543af759ab63fa6f1d3941186482b0c2b312f1151ea8386253a13ed3708093279b8eb04185636488b226",
- "5e7cdd8373dc42a243c96013cd29df9283b5f28bb50453a903c85e2ce57f35861bf93f03029072b70dac0804e7d51fd0c578c8d9fa619f1e9ce3d8044f65d55634dba611280c1d5cfb59c836a595c803124f696b07ddfac718",
- "26a14c4aa168907cb5de0d12a82e1373a128fb21f2ed11feba108b1bebce934ad63ed89f4ed7ea5e0bc8846e4fc10142f82de0bebd39d68f7874f615c3a9c896bab34190e85df05aaa316e14820b5e478d838fa89dfc94a7fc1e",
- "0211dfc3c35881adc170e4ba6daab1b702dff88933db9a6829a76b8f4a7c2a6d658117132a974f0a0b3a38ceea1efc2488da21905345909e1d859921dc2b5054f09bce8eeb91fa2fc6d048ce00b9cd655e6aafbdaa3a2f19270a16",
- "ddf015b01b68c4f5f72c3145d54049867d99ee6bef24282abf0eecdb506e295bacf8f23ffa65a4cd891f76a046b9dd82cae43a8d01e18a8dff3b50aeb92672be69d7c087ec1fa2d3b2a39196ea5b49b7baede37a586fea71aded587f",
- "6ee721f71ca4dd5c9ce7873c5c04c6ce76a2c824b984251c15535afc96adc9a4d48ca314bfeb6b8ee65092f14cf2a7ca9614e1dcf24c2a7f0f0c11207d3d8aed4af92873b56e8b9ba2fbd659c3f4ca90fa24f113f74a37181bf0fdf758",
- "689bd150e65ac123612524f720f54def78c095eaab8a87b8bcc72b443408e3227f5c8e2bd5af9bcac684d497bc3e41b7a022c28fb5458b95e8dfa2e8caccde0492936ff1902476bb7b4ef2125b19aca2cd3384d922d9f36dddbcd96ae0d6",
- "3a3c0ef066fa4390ec76ad6be1dc9c31ddf45fef43fbfa1f49b439caa2eb9f3042253a9853e96a9cf86b4f873785a5d2c5d3b05f6501bc876e09031188e05f48937bf3c9b667d14800db62437590b84ce96aa70bb5141ee2ea41b55a6fd944",
- "741ce384e5e0edaebb136701ce38b3d33215415197758ae81235307a4115777d4dab23891db530c6d28f63a957428391421f742789a0e04c99c828373d9903b64dd57f26b3a38b67df829ae243feef731ead0abfca049924667fdec49d40f665",
- "a513f450d66cd5a48a115aee862c65b26e836f35a5eb6894a80519e2cd96cc4cad8ed7eb922b4fc9bbc55c973089d627b1da9c3a95f6c019ef1d47143cc545b15e4244424be28199c51a5efc7234dcd94e72d229897c392af85f523c2633427825",
- "71f1554d2d49bb7bd9e62e71fa049fb54a2c097032f61ebda669b3e1d4593962e47fc62a0ab5d85706aebd6a2f9a192c88aa1ee2f6a46710cf4af6d3c25b7e68ad5c3db23ac009c8f13625ff85dc8e50a9a1b2682d3329330b973ec8cbb7bb73b2bd",
- "167cc1067bc08a8d2c1a0c10041ebe1fc327b37043f6bd8f1c63569e9d36ded58519e66b162f34b6d8f1107ef1e3de199d97b36b44141a1fc4f49b883f40507ff11f909a017869dc8a2357fc7336ae68703d25f75710b0ff5f9765321c0fa53a51675c",
- "cb859b35dc70e264efaad2a809fea1e71cd4a3f924be3b5a13f8687a1166b538c40b2ad51d5c3e47b0de482497382673140f547068ff0b3b0fb7501209e1bf36082509ae85f60bb98fd02ac50d883a1a8daa704952d83c1f6da60c9624bc7c99912930bf",
- "afb1f0c6b7125b04fa2578dd40f60cb411b35ebc7026c702e25b3f0ae3d4695d44cfdf37cb755691dd9c365edadf21ee44245620e6a24d4c2497135b37cd7ac67e3bd0aaee9f63f107746f9b88859ea902bc7d6895406aa2161f480cad56327d0a5bba2836",
- "13e9c0522587460d90c7cb354604de8f1bf850e75b4b176bda92862d35ec810861f7d5e7ff6ba9302f2c2c8642ff8b7776a2f53665790f570fcef3cac069a90d50db42227331c4affb33d6c040d75b9aeafc9086eb83ced38bb02c759e95ba08c92b17031288",
- "0549812d62d3ed497307673a4806a21060987a4dbbf43d352b9b170a29240954cf04bc3e1e250476e6800b79e843a8bd8253b7d743de01ab336e978d4bea384eaff700ce020691647411b10a60acacb6f8837fb08ad666b8dcc9eaa87ccb42aef6914a3f3bc30a",
- "3a263efbe1f2d463f20526e1d0fd735035fd3f808925f058b32c4d8788aeeab9b8ce233b3c34894731cd73361f465bd350395aebcabd2fb63010298ca025d849c1fa3cd573309b74d7f824bbfe383f09db24bcc565f636b877333206a6ad70815c3bef5574c5fc1c",
- "3c6a7d8a84ef7e3eaa812fc1eb8e85105467230d2c9e4562edbfd808f4d1ac15d16b786cc6a02959c2bc17149c2ce74c6f85ee5ef22a8a96b9be1f197cffd214c1ab02a06a9227f37cd432579f8c28ff2b5ac91cca8ffe6240932739d56788c354e92c591e1dd76499",
- "b571859294b02af17541a0b5e899a5f67d6f5e36d38255bc417486e69240db56b09cf2607fbf4f95d085a779358a8a8b41f36503438c1860c8f361ce0f2783a08b21bd7232b50ca6d35428335272a5c05b436b2631d8d5c84d60e8040083768ce56a250727fb0579dd5c",
- "98ee1b7269d2a0dd490ca38d447279870ea55326571a1b430adbb2cf65c492131136f504145df3ab113a13abfb72c33663266b8bc9c458db4bf5d7ef03e1d3b8a99d5de0c024be8fabc8dc4f5dac82a0342d8ed65c329e7018d6997e69e29a01350516c86beaf153da65ac",
- "41c5c95f088df320d35269e5bf86d10248f17aec6776f0fe653f1c356aae409788c938befeb67c86d1c8870e8099ca0ce61a80fbb5a6654c44529368f70fc9b9c2f912f5092047d0ffc339577d24142300e34948e086f62e23ecaca410d24f8a36b5c8c5a80e0926bc8aa16a",
- "9f93c41f533b2a82a4df893c78faaaa793c1506974ba2a604cd33101713ca4adfd30819ffd8403402b8d40aff78106f3357f3e2c24312c0d3603a17184d7b999fc9908d14d50192aebabd90d05073da7af4be37dd3d81c90acc80e8333df546f17ab6874f1ec204392d1c0571e",
- "3da5207245ac270a915fc91cdb314e5a2577c4f8e269c4e701f0d7493ba716de79935918b917a2bd5db98050dbd1eb3894b65fac5abf13e075abebc011e651c03cafb6127147771a5c8418223e1548137a89206635c26ca9c235ccc108dc25cf846e4732444bd0c2782b197b262b",
- "96011af3965bb941dc8f749932ea484eccb9ba94e34b39f24c1e80410f96ce1d4f6e0aa5be606def4f54301e930493d4b55d484d93ab9dd4dc2c9cfb79345363af31ad42f4bd1aa6c77b8afc9f0d551bef7570b13b927afe3e7ac4de7603a0876d5edb1ad9be05e9ee8b53941e8f59",
- "51dbbf2a7ca224e524e3454fe82ddc901fafd2120fa8603bc343f129484e9600f688586e040566de0351d1693829045232d04ff31aa6b80125c763faab2a9b233313d931903dcfaba490538b06e4688a35886dc24cdd32a13875e6acf45454a8eb8a315ab95e608ad8b6a49aef0e299a",
- "5a6a422529e22104681e8b18d64bc0463a45df19ae2633751c7aae412c250f8fb2cd5e1270d3d0cf009c8aa69688ccd4e2b6536f5747a5bc479b20c135bf4e89d33a26118705a614c6be7ecfe766932471ad4ba01c4f045b1abb5070f90ec78439a27a1788db9327d1c32f939e5fb1d5ba",
- "5d26c983642093cb12ff0afabd87b7c56e211d01844ad6da3f623b9f20a0c968034299f2a65e6673530c5980a532beb831c7d0697d12760445986681076dfb6fae5f3a4d8f17a0db5008ce8619f566d2cfe4cf2a6d6f9c3664e3a48564a351c0b3c945c5ee24587521e4112c57e318be1b6a",
- "52641dbc6e36be4d905d8d60311e303e8e859cc47901ce30d6f67f152343e3c4030e3a33463793c19effd81fb7c4d631a9479a7505a983a052b1e948ce093b30efa595fab3a00f4cef9a2f664ceeb07ec61719212d58966bca9f00a7d7a8cb4024cf6476bab7fbccee5fd4e7c3f5e2b2975aa2",
- "a34ce135b37bf3db1c4aaa4878b4499bd2ee17b85578fcaf605d41e1826b45fdaa1b083d8235dc642787f11469a5493e36806504fe2a2063905e821475e2d5ee217057950370492f5024995e77b82aa51b4f5bd8ea24dc71e0a8a640b0592c0d80c24a726169cf0a10b40944747113d03b52708c",
- "46b3cdf4946e15a5334fc3244d6680f5fc132afa67bf43bfade23d0c9e0ec64e7dab76faaeca1870c05f96b7d019411d8b0873d9fed04fa5057c039d5949a4d592827f619471359d6171691cfa8a5d7cb07ef2804f6ccad4821c56d4988bea7765f660f09ef87405f0a80bcf8559efa111f2a0b419",
- "8b9fc21691477f11252fca050b121c5334eb4280aa11659e267297de1fec2b2294c7ccee9b59a149b9930b08bd320d3943130930a7d931b71d2f10234f4480c67f1de883d9894ada5ed5071660e221d78ae402f1f05af47761e13fec979f2671e3c63fb0ae7aa1327cf9b8313adab90794a52686bbc4",
- "cd6598924ce847de7ff45b20ac940aa6292a8a99b56a74eddc24f2cfb45797188614a21d4e8867e23ff75afd7cd324248d58fcf1ddc73fbd115dfa8c09e62022fab540a59f87c989c12a86ded05130939f00cd2f3b512963dfe0289f0e54acad881c1027d2a0292138fdee902d67d9669c0ca1034a9456",
- "594e1cd7337248704e691854af0fdb021067ddf7832b049ba7b684438c32b029eded2df2c89a6ff5f2f2c311522ae2dc6db5a815afc60637b15ec24ef9541f1550409db2a006da3affffe548a1eaee7bd114e9b805d0756c8e90c4dc33cb05226bc2b393b18d953f8730d4c7ae693159cdba758ad28964e2",
- "1f0d292453f04406ada8be4c161b82e3cdd69099a8637659e0ee40b8f6da46005cfc6085db9804852decfbe9f7b4dda019a7112612895a144ed430a960c8b2f5458d3d56b7f427cee6358915aee7146278aed2a0296cdd929e4d21ef95a3adf8b7a6beba673cdccdbdcfb2474711732d972ad054b2dc64f38d",
- "b65a72d4e1f9f9f75911cc46ad0806b9b18c87d105332a3fe183f45f063a746c892dc6c4b9181b1485b3e3a2cc3b453eba2d4c39d6905a774ed3fb755468beb190925ecd8e57ecb0d985125741650c6b6a1b2a3a50e93e3892c21d47ed5884eed83aa94e1602288f2f49fe286624de9d01fcb54433a0dc4ad70b",
- "705ce0ffa469250782aff725248fc88fe98eb76659e8407edc1c4842c9867d61fe64fb86f74e980598b92bc213d06f337bd5654fc28643c7ba769a4c31563427543c00808b627a19c90d86c322f33566ce020121cc322229c3337943d46f68ef939d613dcef0077269f88151d6398b6b009abb763410b154ad76a3",
- "7fa881ce87498440ab6af13854f0d851a7e0404de33896999a9b3292a5d2f5b3ad033530c558168fe5d2fdb9b89a2354c46cf32a0e612afc6c6485d789511bfef26800c74bf1a4cfbe30bda310d5f6029c3dccdedb6149e4971274e276dccfabd63bc4b9955e8303feb57f8a688db55ecb4b33d1f9fe1b3a8ba7ac32",
- "23a98f71c01c0408ae16843dc03be7db0aeaf055f951709d4e0dfdf64fffbffaf900ee592ee10929648e56f6c1e9f5be5793f7df66453eb56502c7c56c0f0c88da77abc8fa371e434104627ef7c663c49f40998dbad63fa6c7aa4fac17ae138d8bbe081f9bd168cd33c1fbc92fa35ed687679f48a64b87db1fe5bae675",
- "7b8970b6a33237e5a7bcb39272703edb92285c55842b30b9a48834b1b507cc02a6764739f2f7ee6ae02a7b715a1c455e59e8c77a1ae98abb10161853f1234d20da99016588cd8602d6b7ec7e177d4011edfa61e6b3766a3c6f8d6e9eac893c568903eb6e6aba9c4725774f6b4343b7acaa6c031593a36eef6c72806ff309",
- "f7f4d328ba108b7b1de4443e889a985ed52f485f3ca4e0c246aa5526590cbed344e9f4fe53e4eea0e761c82324649206ca8c2b45152157d4115e68c818644b03b65bb47ad79f94d37cb03c1d953b74c2b8adfa0e1c418bda9c518ddcd7050e0f149044740a2b16479413b63fc13c36144f80c73687513dca761ba8642a8ae0",
- "2d7dc80c19a1d12d5fe3963569547a5d1d3e821e6f06c5d5e2c09401f946c9f7e13cd019f2f9a878b62dd850453b6294b99ccaa068e542993524b0f63832d48e865be31e8ec1ee103c718340c904b32efb69170b67f038d50a3252794b1b4076c0620621ab3d91215d55ffea99f23d54e161a90d8d4902fda5931d9f6a27146a",
- "77dff4c7ad30c954338c4b23639dae4b275086cbe654d401a2343528065e4c9f1f2eca22aa025d49ca823e76fdbb35df78b1e5075ff2c82b680bca385c6d57f7ea7d1030bb392527b25dd73e9eeff97bea397cf3b9dda0c817a9c870ed12c006cc054968c64000e0da874e9b7d7d621b0679866912243ea096c7b38a1344e98f74",
- "83bed0d556798f2b419f7056e6d3ffada06e939b95a688d0ec8c6ac5ea45ab73a4cf01043e0a170766e21395f27ab4b78c435f5f0dfe6e93ab80df38610e41158429ddf20296f53a06a017723359fe22dc08b5da33f0800a4fe50118e8d7eab2f83a85cd764bf8a166903bd0e9dcfeeceba44ff4ca4439846458d31ea2bb564645d1",
- "ea12cf5a113543e39504123036f15a5bafa9c555562469f99cd29996a4dfaaab2a34b00557ccf15f37fc0cc1b3be427e725f2cd952e50af7970dda9200cd5ce252b1f29c40067fea3027ed686190803b59d834179d1b8f5b55abe55ad174b2a1188f7753ec0ae2fc01316e7d498b68ee3598a0e9baaaa664a60f7fb4f90edbed494ad7",
- "55266358332d8d9e68bd13432088beadf95833aab67a0eb3b10650414255f299e2670c3e1a5b2976159a46c72a7ce57d59b7be14c15798e09ed50fa312a431b0264d7a1396aa6168bde897e208ece53d2cfc83786113b1e6eac5e9bb98984abb6c8d64eebb991903254abc650c999bb9958a5d7937434b869bc940e21b9dc1cc8982f2ba",
- "4d6104ded730aefe02873f4c741232c8234a6d66d85393aff57fbf56ba6347666988dfc4d58f3cc895a0da598822edeee4533d24ec0ee292fd5e1ad04898ffbc1ff4bef14dec220babcb0f28fffe32a6e2c28aaaac16442bf4feb02917d18bb3a415d84fa9358d5a9852688d846c92271911f934181c30f82434d915f93f155a1ffbf0b125",
- "eb5f579a4c476af554aac11e5719d378549497e613b35a929d6f36bb8831d7a466aa76de9be24ebb55543f1c13924f64cfd648a5b3fa90387315c16174dbf1e9a183c196d9bb8f84af65f1f8212429aadc11ef2426d07d4716062b85c8d5d2dff8e21b9e62b7fa7dbd57d72633054b464fb28583a56ca13ccc5ddc74dae942492f31731e7046",
- "ebddec3dcaf18063e45a76ebeac39af85a1adc2818881ccce48c106288f5988365cca2b4b1d7f037322da46840f42bebdcbc7193838d426e101087d8cea03aaff743d573eb4f4e9a71a2c884390769a6503874125d194bee8d46a3a0d5e4fcf28ff8465887d8e9df771d70157e75df3642b331d2778ceb32ceba868640171ab7a5d22eede1ee44",
- "26d87ec70b57691e3bb359633d3ddba17f029d62cdfe977f5fd42274d79b444a32494d1c01e9f72d03cce78c806df96e93ea78da3a054209924ed765edc4d570f66168dc25ee3114e4017e387440349c8f0a94804761c3055f88e4fda2a49b860b1486a9609095f6250f268b6a4d1aecc03a505632ebf0b9dc22d0755a736faf7ad7000858b5864b",
- "3880f5cc2d08fa70ef44b1f263fcf534d062a298c1bd5ee2eee8c3265806c4ce50b004f3a1fc1fa5b024aaac7f528c023c8181f67c6e1c357425dc4d573bd46b93a542afa3a19bdb140a2ce666e1a01f5c4d2dcd681fa9f5839b797813c394738d5ee4971386c12c7c117d17c7bec324b760aa30cda9ab2aa850284ba6fa97946f710f02449d1883c6",
- "3317d2f452105dd3f4a96f9257af8285a80be58066b50f6f54bd633749b49f6ab9d57d45652d2ae852a2f6940cd5ec3159dd7f333358b12f502325df38843508faf7e246352d201280babd90b14fbf7722641c3601d0e458474439973c611bb5502fd0eb3078f87124ca7e1a016fcb6cfeff65f6a565985aca7122cfa8c5a11da0cb47797c5132333179",
- "f2c5c955d0224e784a46b9125f8fef8a5e1271e145eb08bbbd07ca8e1cfc848cef14fa3b36221ac62006403dbb7f7d77958ccc54a8566c837858b809f3e310ace8ca682515bc655d2a397cab238a663b464d511f02dc5d033dad4cb5e0e519e94a54b62a3896e460ec70e5716b5921bf8396aa86a60123e6287e34570bb01bdc602e113670bf498af2ff10",
- "180e275205691a83630cf4b0c7b80e6df8fad6ef1c23ba8013d2f09aef7abade1827f23af230de90676240b4b3b0673f8afdea0327330055041741f65560d90348de696d34ca80dfe8afae582fe4879d4594b80e9408fb53e800e01ca58552b905c365e7f1416e51c080f517d6bbd30e64ae1535d59decdc76c6624d737868f49f2f719da39ba1344d59eab9",
- "c517a84e4631a7f65ace170d1e5c2fdb259841535d88da323e68c0883e6af7b041cfe05908815a5a9d1b14fa712c2c16fadcf1ca54d3aa954d411240df331b2aebdfb65aced84d0b8aace56ec0aa7c13ec7d75ca883b6bcf6db74c9e98463c484a8262684f29910373430651f90ecffe18b072170e61ee58de20e2a6ff67b3ab00fccbb80af943f20b56b98107",
- "d1a56a5ee990e02b84b5862fde62f69ec07567be2d7ccb769a461c4989d11fdda6c945d942fb8b2da795ed97e43a5b7dbdde7f8fd2ff7154544336d5c50fb7380341e660d4898c7fbc39b2b782f28defac6873523c7c1de8e52c65e4395c686ba483c35a220b0416d46357a063fa4c33fa9c52d5c207a1304ae141c791e62ba6a7374ed922b8dd94079b72b69302",
- "4720b88d6bfb1ab43958e26827730d852d9ec30173ebd0fe0d273edcece2e788558984cd9306fe5978086a5cb6d37975755d2a3daeb16f99a8a11544b8247a8b7ed5587afc5bea1daf85dcea5703c5905cf56ae7cc76408ccabb8fcc25cacc5ff456db3f62fa559c45b9c71505eb5073df1f10fc4c9060843f0cd68bbb4e8edfb48d0fd81d9c21e53b28a2aae4f7ba",
- "f4639b511db9e092823d47d2947efacbaae0e5b912dec3b284d2350b9262f3a51796a0cd9f8bc5a65879d6578ec24a060e293100c2e12ad82d5b2a0e9d22965858030e7cdf2ab3562bfa8ac084c6e8237aa22f54b94c4e92d69f22169ced6c85a293f5e16bfc326153bf629cdd6393675c6627cd949cd367eef02e0f54779f4d5210197698e4754a5fe490a3a7521c1c",
- "3d9e7a860a718565e3670c29079ce80e381969fea91017cfd5952e0d8a4a79bb08e2cd1e26161f30ee03a24891d1bfa8c212861b51618d07429fb48000ff87ef09c6fca526567777e9c076d58a642d5c521b1caa5fb0fb3a4b8982dc14a444732b72b239b8f01fc8ba8ee86b3013b5d3e98a92b2aeaecd4879fca5d5e9e0bd880dbfffa6f96f94f3998812aac6a714f331",
- "4d9bf551d7fd531e7482e2ec875c0651b0bcc6caa738f7497befd11e67ae0e036c9d7ae4301cc3c7906f0d0e1ed4738753f414f9b3cd9b8a71176e325c4c74ce020680ecbfb146889597f5b40487e93f974cd866817fb9fb24c7c7c16177e6e120bfe349e83aa82ba40e59e917565788658a2b254f25cf99bc65070b3794cea2259eb10e42bb54852cba3110baa773dcd70c",
- "b91f65ab5bc059bfa5b43b6ebae243b1c46826f3da061338b5af02b2da76bb5ebad2b426de3c3134a633499c7c36a120369727cb48a0c6cbab0acecdda137057159aa117a5d687c4286868f561a272e0c18966b2fec3e55d75abea818ce2d339e26adc005c2658493fe06271ad0cc33fcb25065e6a2a286af45a518aee5e2532f81ec9256f93ff2d0d41c9b9a2efdb1a2af899",
- "736f6e387acb9acbee026a6080f8a9eb8dbb5d7c54ac7053ce75dd184b2cb7b942e22a3497419ddb3a04cf9e4eb9340a1a6f9474c06ee1dcfc8513979fee1fc4768087617fd424f4d65f54782c787a1d2de6efc81534343e855f20b3f3589027a5436201eee747d45b9b8375e4294d72ab6a52e04dfbb2914db92ee58f134b026527ed52d4f794459e02a43a17b0d51ea69bd7f3",
- "9242d3eb31d26d923b99d66954cfade94f25a18912e6356810b63b971ae74bb53bc58b3c01424208ea1e0b1499936daea27e63d904f9ed65fdf69de40780a3027b2e89d94bdf214f585472613ce328f628f4f0d56217dfb53db5f7a07f54c8d71db16e27de7cdb8d23988837b49b65c12f1771d979e8b192c9f4a16b8d9fba917bcf74ce5a82aac2075608ba6c2d485fa59864b9de",
- "5da68704f4b592d41f08aca08f62d85e2e2466e5f3be010315d11d113db674c4b98764a509a2f5aacc7ae72c9deff2bcc42810b47f64d429b35745b9efff0b18c58653461e968aaa3c2c7fc455bc5771a8f10cd184be831040df767201ab8d32cb9a58c89afbebecb524502c9b940c1b838f8361bbcde90d272715017f67609ea39b20fac985332d82daaa023999e3f8bfa5f3758bb8",
- "71ea2af9c8ac2e5ae44a176662882e01027ca3cdb41ec2c6785606a07d7231cd4a2bded7155c2feef3d44d8fd42afa73265cef826f6e03aa761c5c51d5b1f129ddc27503ff50d9c2d748322df4b13dd5cdc7d46381528ab22b79b0049011e4d2e57fe2735e0d58d8d56e92c75dbeac8c76c4239d7f3f24fb56697593b3e4afa6671d5bbc96c079a1c154fe20212ade67b05d49ceaa7a84",
- "1d133170582fa4bff59a21953ebbc01bc202d43cd79c083d1f5c02fa15a43a0f519e36acb710bdabac880f04bc003800641c2487930de9c03c0e0deb347fa815efca0a38c6c5de694db698743bc955581f6a945deec4ae988ef7cdf40498b77796ddea3fae0ea844891ab751c7ee20917c5a4af53cd4ebd82170078f41ada2795e6eea17593fa90cbf5290a1095e299fc7f507f360f187cd",
- "5ec4ac45d48fc15c72471d795066bdf8e99a483d5fdd599511b9cdc408de7c0616491b73924d0266da34a495331a935c4b8884f57d7ad8cce4cbe586875aa52482215ed39d7626cce55d50349c7767981c8bd6890f132a196184247343566fc972b86fe3c5369d6a6519e9f07942f0522b77ad01c751dcf7defe31e471a0ec00963765dd8518144a3b8c3c978ad108056516a25dbe3092e73c",
- "0d5e74b78290c689f2b3cfea45fc9b6a84c822639cd438a7f05c07c374adced42cdc12d2a9233a4ffe80307efc1ac13cb04300e165f8d90dd01c0ea955e7657332c6e86ad6b43e78ba4c13c675aed83192d8427866fb6484e6a3071b2369a46fba9005f31232da7ffec7952f831aaaddf63e225263531c2cf387f8cc14fa856c8795137142c3a52ffa69b8e30ebc88ce3bbc227597bcc8dddd89",
- "a0fe36f983259921dc2fa7d89002b3066241d63bfc2448caf7e10522a35562be0bfedc3dce49cfce2e614a04d4c64cfc0ab898873a7fc26928dc1927c009d12f6f9b7a278205d3d0057604f4ac746f8b9287c3bc6b929832bf253b6586192ac43fdd29ba585dbd9059aab9c6ff6000a7867c67fec1457b733f6b620881166b8fed92bc8d84f0426002e7be7fcd6ee0abf3755e2babfe5636ca0b37",
- "1d29b6d8eca793bb801becf90b7d7de215b17618ec32340da4bac707cdbb58b951d5036ec02e105d83b5960e2a72002d19b7fa8e1128cc7c5049ed1f76b82a59eac6ed09e56eb73d9ade38a6739f0e07155afa6ec0d9f5cf13c4b30f5f9a465b162a9c3ba04b5a0b3363c2a63f13f2a3b57c590ec6aa7f64f4dcf7f1582d0ca157eb3b3e53b20e306b1f24e9bda87397d413f01b453ceffeca1fb1e7",
- "6a2860c110cd0fc5a19bcaafcd30762ee10242d34739638e716bd89fd537ea4dc630e6f85d1bd88a25ad3892ca554c232c9830bd56980c9f08d378d28f7fa6fa7df4fcbf6ad98b1adfff3ec1f63310e50f920c99a5200b8e64c2c2ca249399a149942261f737d5d72da949e914c024d57c4b639cb89990fed2b38a37e5bcd24d17ca12dfcd36ce04691fd03c32f6ed5de2a2191ed7c826375ba81f78d0",
- "7132aa291ddc9210c60dbe7eb3c19f9053f2dd74742cf57fdc5df98312adbf4710a73245de4a0c3b24e21ab8b466a77ae29d15500d5142555ef3088cbccbe685ed9119a10755148f0b9f0dbcf02b2b9bcadc8517c88346ea4e78285e9cbab122f824cc18faf53b742a87c008bb6aa47eed8e1c8709b8c2b9adb4cc4f07fb423e5830a8e503ab4f7945a2a02ab0a019b65d4fd71dc364d07bdc6e637990e3",
- "3e664da330f2c6007bff0d5101d88288aaacd3c07913c09e871cce16e55a39fde1ce4db6b8379977c46cce08983ca686778afe0a77a41baf447854b9aa286c398c2b83c95a127b053101b6799c1638e5efd67273b2618df6ec0b96d8d040e8c1ee01a99b9b5c8fe63fea2f749e6c90d31f6fae4e1469ac09884c4fe1a8539acb313f42c941224a0e79c059e18affc2bcb6724975c436f7bf949ebdd8aef51c",
- "7a6ea63a271eb49470f5ce77519ed61ae9b2f1be07a96855726bc3df1d0723af3a703fdfc2e739c9d31d25814daf661a23558b50982e66ee37ad880f5c8f11c8130fac8a5d0250583700d5a324894fae6d61993f6bf9327214f8674649f355b23fd634940b2c467973a839e659169c773119919f5b81ee171edb2e5f6940d7551f9e5a70625d9ea88711ad0ed8ab2da720ad358bef954456cb2d5636425717c2",
- "c5106bbda114168c449172e49590c7eeb827fa4e1a2a7a87a3c1f721a9047d0c0a50fbf244731be1b7eb1a2ef30f5ae846a9f38f0df44f32af61b68dbdcd0226e741dfb6ef81a2503691af5e4b3171f48c59ba4ef91eba344b5b697f261df7bbbb734ca6e6daebaa4a179feb17002823281b8534d55a6531c59305f6e3fd3fa63b747bcf0deb654c392a02fe687a269effb1238f38bcaea6b208b221c45fe7fbe7",
- "597716a5ebeebc4bf524c15518816f0b5dcda39cc833c3d66b6368ce39f3fd02ceba8d12072bfe6137c68d3acd50c849873150928b320b4fbc31c1456679ea1d0acaeeabf666d1f1bad3e6b9312c5cbdecf9b799d3e30b0316bed5f41245107b693366accc8b2bcef2a6be54209ffabc0bb6f93377abdcd57d1b25a89e046f16d8fd00f99d1c0cd247aafa72234386ae484510c084ee609f08aad32a005a0a5710cb",
- "0771ffe789f4135704b6970b617bae41666bc9a6939d47bd04282e140d5a861c44cf05e0aa57190f5b02e298f1431265a365d29e3127d6fccd86ec0df600e26bcdda2d8f487d2e4b38fbb20f1667591f9b5730930788f2691b9ee1564829d1ada15fffc53e785e0c5e5dd11705a5a71e390ca66f4a592785be188fefe89b4bd085b2024b22a210cb7f4a71c2ad215f082ec63746c7367c22aedb5601f513d9f1ffc1f3",
- "be6556c94313739c115895a7bad2b620c0708e24f0390daa55521c31d2c6782acf41156271238885c367a57c72b4fe999c160e804ad58d8e565edbce14a2dd90e443eb80626b3eab9d7ab75d6f8a062d7ca89b7af8eb292c98eaf87ad1dfd0db103d1bb6188bd7e7a63502153cf3ce23d43b60c5782602bac8ad92fb2324f5a79453898c5de18415639ecc5c7974d3077f76fc1df5b956723bb19a624d7ea3ec13ba3d86",
- "4bc33729f14cd2f1dc2ff459abee8f6860dda1062845e4adab78b53c835d106bdfa35dd9e77219eaef403d4e80488ca6bd1c93dd76ef9d543fbb7c8904dccc5f71509a6214f73d0f4e467c3e038ea639b29e7fc442ee29f57117740576188ada15a739827c647a46b0271817ab235c023c30c90f2115e5c90cd8501e7b286962fc66ffc3fe7e8978746168314908a41998bd83a1eeffda9d714b864f4d490fdeb9c7a6edfa",
- "ab12faea205b3d3a803cf6cb32b9698c32301a1e7f7c6c23a20174c95e98b7c3cfe93fffb3c970face8f5751312a261741141b948d777b8a2ea286fe69fc8ac84d34116a4674bb09a1a0b6af90a748e511749de4697908f4acb22be08e96ebc58ab1690acf73914286c198a2b57f1dd70ea8a52325d3045b8bdfe9a09792521526b7564a2a5fcd01e291f1f8894017ce7d3e8a5dba15332fb410fcfc8d62195a48a9e7c86fc4",
- "7d421e59a567af70594757a49809a9c22e07fe14061090b9a041875bb77933deae36c823a9b47044fa0599187c75426b6b5ed94982ab1af7882d9e952eca399ee80a8903c4bc8ebe7a0fb035b6b26a2a013536e57fa9c94b16f8c2753c9dd79fb568f638966b06da81ce87cd77ac0793b7a36c45b8687c995bf4414d28289dbee977e77bf05d931b4feaa359a397ca41be529910077c8d498e0e8fb06e8e660cc6ebf07b77a02f",
- "0c18ab727725d62fd3a2714b7185c09faca130438eff1675b38beca7f93a6962d7b98cb300ea33067a2035cdd694348784aa2eda2f16c731eca119a050d3b3ce7d5c0fd6c234354a1da98c0642451922f670984d035f8c6f35031d6188bbeb31a95e99e21b26f6eb5e2af3c7f8eea426357b3b5f83e0029f4c4732bca366c9aa625748297f039327c276cd8d9c9bf692a47af098aa50ca97b99961bef8bc2a7a802e0b8cfdb84319",
- "92d5909d18a8b2b9971cd1627b461e98a74ba377186a6a9df5bd133635250b300abccb2254cacb775df6d99f7c7d0952653c28e6909b9f9a45adce691f7adc1afffcd9b06e49f775364cc2c62825b9c1a86089080e26b57e732aac98d80d009bfe50df01b95205aa07ed8ec5c873da3b92d00d53af825aa64b3c634c5ece40bff152c331222d3453fd92e0ca17cef19ecb96a6eed4961b627aca48b12fecd091754f770d52ba861546",
- "802f22e4a388e874927fef24c797408254e03910bab5bf372320207f8067f2b1ea543917d4a27df89f5bf936ba12e04302bde23119533d0976beca9e20cc16b4dbf17a2ddc44b66aba76c61ad59d5e90de02a88327ead0a8b75463a1a68e307a6e2e53ecc1986274b9ee80bc9f3140671d5285bc5fb57b281042a8978a1175900c6073fd7bd740122956602c1aa773dd2896674d0a6beab24454b107f7c847acb31a0d332b4dfc5e3f2f",
- "3844fe65db11c92fb90bf15e2e0cd216b5b5be91604baf3b84a0ca480e41ecfaca3709b32f8c6e8761406a635b88eec91e075c48799a16ca08f295d9766d74475c47f3f2a274eae8a6ee1d191a7f37ee413a4bf42cad52acd5564a651715ae42ac2cddd52f819c692ecdef52ecb763270322cdca7bd5aef71428fa73e844568b96b43c89bf1ed42a0abf209ffad0eeec286c6f141e8af073ba4adfbbdeda253752ae36c9957dfc905b4c49",
- "329377f7bf3c8d74991a7d61b0cf39baff5d485d79751b0d5ad017d23bec570fb19810105bab79ab5acb102ab972165224d4ec888ec7de5148077fa9c1bb6820e0d91ae4e2591a21fec2f820606ce4bafc1e377f8dc3a5bd1a9e2772a57abccd0b757164d768872c91d02789545ab5b203f688d71dd08522a3fd2f5bcd7df507aebf1ca27ddff0a82afb7aa9c180008f49d1325adf97d047e77238fc75f56356de4e87d8c961575c9f6362c9",
- "f7f269929b0d71ea8eef7120e55ccba691c582dd534692abef35c0fe9dec7dae973cd9702e5ad420d278fe0e653fdcb22fdcb63148109ec7e94f2d0750b28157dd1764376ae10fdb0a4aef3b304bd82793e0595f941226a2d72abbc929f53134dc495b0d65ced409914f94c2523f3dfbbdeeac84ae247ab5d1b9ea33dce1a808885a55be1f3683b46f4be73d9b62eec2585f690056858dfc427aabf591cd276724885bcd4c00b93bb51fb7484d",
- "ac022309aa2c4d7fb628255b8b7fb4c3e3ae64b1cb65e0de711a6def1653d95d8088871cb8905fe8ae76423604988a8f77589f3f776dc1e4b30dbe9dd262b2187db02518a132d219bd1a06ebac13132b5164b6c420b37dd2ccee7d69b3b7fa12e54f0a53b853d490a68379ea1fa2d79762830ffb71bf86aab506b51f85c4b6a41b69325c7d0c7aa85b93b7144489d213e8f33dbb879fce22849865337b620b155cb2d2d36a68832889e30194d36d",
- "d009c2b78a8f02e5e5dbb586ef71fc324b375092e15913ca1a5bfd22d516baadb96867bee3562e77c4a4852344a1a76c30728be5e22400b4cc41711f66754c246a520498d8c24f0205b9c873748dbeb67fe1ad099ad04cf89f4b517f0aa481136d9f6de2d727df01c6aa4099da59d4382b51e25fd47c33d9842c32b62331e50794bfe8b61b3ba9de1b8b704779c6d65edff3af00f121ab4a7ea384edabe47c6d0098a48991f387ca4444135ec59d46",
- "c00bab36cce69899817d1425016d222d7303197ed3e3fdcac744705e7f178a1ac745968900f69299163e19b3161f3e0a4cc55aa2e4e71e0ee6ac427d1f4d14e063f68d303ddfbb18118335cfa7a6a90d99c38319ee76f7a884846a9e0b68030bf28e78bfbd56359b9368842814da42b04cb0e307d5d846dc22f049147bae31b9a956d17676a8cc348dafa3cabc2007a30e730e3894dddf9999fb8819086311f0703e141613ed6dcd7af8510e2dc435b0",
- "c9789152a9fc29698d49ed95f09bd11b75f18a8c5615a73dbe54ae5e550027fd0ae6a8b60667040c1b12de3d1ee3f6bf061c78c951a3210effc912e19f482dd4de152063c588c44903bc11761706fd935afa040df085b08144d83d0dde32b46ab52f4fae98ac116c7ff11d7f553450c2e37b9c5f0b1dd9e0b8640a24cba6f2a5246c41f197f46e3dc8a29131c79bef3351c6e277a0a34442274d546ccd058891277473d668420f121750d19cd684267405",
- "06a15a0731ce52557e368bcbaa11ef3399299e36fb9f2eda6e5726907c1d29c5c6fc581405ba48c7e2e522206a8f128d7c1c939d1132a00bd7d6366aa82724e968964eb2e373563f607dfa649590dcf5589114df69da5547fef8d1604cc4c6de1ed5783c8746918a4dd31168d6bc8784cd0c769206bd803d6ca8557b66748770402b075ef44b38157d4c0da7c6281725a2065d087b1f7b23455fa673bdeeba45b983311c44eabe9ef4b7bde3420ae9881863",
- "d08aacef2d7a41aec09473bd8a44f628e15addb7b9e5b77a1e09c8ab4942f379a0bfcb324d580b774666f18ae78dd36710824ff12393f059068fe4b559c53662c2b0e6c69e23785c8f32554e837ec1714bee902e60737b639dd933af4f68cb9d7de77e1f3b28e5b122891afce62b79acd5b1ab4ba411662cc77d806449e69c5a45a143b742d98ac84a0826d68433b9b700ace6cd472ba2d58a90847f42ce9c43f38ffc017db4bf40450b2eee1f4594dc740c0f",
- "6a6058b0a498b7ea76a93c646eb9b8629f0cba4a0c726420c5f67ba9b0412cade356abdf0a4fb94384bad32ce0d5dd9e23dcaae1d6f28ff8683616b30f1392890c67b3a2c04b360893b801f127e527e4da82e239f4c878da13f4a4f1c76db07190e77ec123995168102fb274434a2d1e12913b9b5cbab4aacaad2bd89d88b3ca2b8e60dacf7c22c9379097ff60880f552e320ca3b571994f52534470feee2b39e0dadb5cd88257a3e459a4cc6f12f17b8d54e1bb",
- "adeced01fc5671531cbb45679f5ddd42b3a95151677b6125aaf6f5e8f82fbabaa5ecf7c3552c2458587224f0042870f178f5fca5465250e75d71352e652eeed23cdb7f915f5ebb44099b6db116ca1be45530ac8ed32b7f161d60ed4397ad3d7d649ae6bf75ca5bec891d8e595605be9764f3a03965e1fe0eaffbf212e3df4f0fa35e08ff9d0091e6d4ac4748edfe43b611085a6ffec163014655fdd839fd9e81b63b1fa8cae4ec335ec343289758e389a79ceedfae",
- "d014592f3a83ba40af366f137c674724916c3cdd3f6cf9d4c5c7c8d6d51ebf26e315e2c12b3546be56fb52382904046ecbd2f5b883aa4ff473de6f0c26ab862c3fa34bf3d880cc1911ce39a4088c6617c179dc5faf68a2c488bbde12d67b50f73abcfab0e3b062e68c95363e11f5f1de8ec36ed01ea21442518089045df67d346135283ad5b3fff80cf57f20876849f6db9fa139728358415a90610f69ec720fc92d8234e3e122551e9df2c644c4a2c4e3734d07de8e",
- "c0d0c37838873ba8757d6e41b409605043bc1635edcd731219587676d94217e9f0ab44b71de25000661ce7303b7015f45e6eaa7b7ebef92b8f4a34c902c908d2172185505fa33aca5a41be83079316cdfdd430fc2c45f505f85d867e6d516f7e1bf19c001d9f43018968aab65ec031b3801399231c83ec9e622dab5629922a6b424cab938c135ff7310501c2c02971bfd2f577e25904d1a618baf0859f77f4e8b1d0cde9544e95ec52ff710c0672fdb3d891feeea2b017",
- "7022e7f00902219ba97baa0e940e8ac7727f58955aa068c29680fac4a16bcd812c03eeb5adbcfe867a7f7c6b5d89f4641adb9173b76a1a8438866f9b4f640ce2aedf5f1080c890bcf515b4be4e3e512352f1e5323c62ec46cb73f3d71be8235fee55a154763f7c3f9aeb61ffd28f4cd93d3310f608e2133586bf1ab3f102de96f64c68a4668de8acb2a76a7ce0cddddc8fa3df5e9d230823da16ed9ebb402d36e38e6e018795e5a71517ecab5f9ca472b9ced8ff69d2d195",
- "acaf4baf3681ab865ab9abfae41697141ead9d5e98523c2e0e1eeb6373dd15405242a3393611e19b693cabaa4e45ac866cc66663a6e898dc73095a4132d43fb78ff7166724f06562fc6c546c78f2d5087467fcfb780478ec871ac38d9516c2f62bdb66c00218747e959b24f1f1795fafe39ee4109a1f84e3f82e96436a3f8e2c74ef1a665b0daaa459c7a80757b52c905e2fb4e30c4a3f882e87bce35d70e2925a1671205c28c89886a49e045e31434abaab4a7aed077ff22c",
- "84cb6ec8a2da4f6c3b15edf77f9af9e44e13d67acc17b24bd4c7a33980f37050c0301ba3aa15ad92efe842cd3ebd3636cf945bb1f199fe0682037b9dacf86f162dadabfa625239c37f8b8db9901df0e618ff56fa62a57499f7ba83baebc085eaf3dda850835520344a67e09419368d81012168e5de5ea45158397af9a5c6a1657b26f319b66f816cd2c28996547d697e8df2bb163ccb9dda4d6691dffd102a13667ab9cde60ffbfb872187d9c425a7f67c1d9fffff9276ed0aeb",
- "6a52c9bbbba454c14540b2be58230d78ecbeb391646a0c6fcce2f789086a78364b81ae85d5396d7cfa8b46bda41e3083ec5cf7b4c47dc601c8a697df52f557defca248506dbebab25657f5a561d09625b7f4b2f0119a12beeac087efc9d350a735c35d2431c1da7dda99befb17f41a3dc4da0f00bb95366be128538ce27763d81f832fe3c1d4efc07b5b08ad8dc9e65fb5e48546664e18cb2d3bb3fe1f56fa7aae718c5e3bbdeaf70e15023f6a25b72a2d177fcfd04211d40664fe",
- "c3c4d3b31f1f5f9538923df3478c84fffaef411520a542da9a220ee4132eabb9d718b5076fb2f985485e8ba058330aed27ddfd3afa3db34aa60301088caec3d0053828c0c2bc87e2e61db5ea5a29f62fdad9c8b5fc5063ec4ee865e5b2e35fac0c7a835d5f57a1b1079833c25fc38fcb14311c54f8a3bd251bca19342d69e5785f9c2e43cf189d421c76c8e8db925d70fa0fae5ee3a28c4047c23a2b8a167ce53f35ced33bec822b88b06f41558c47d4fed1bfa3e21eb060df4d8ba1",
- "8d55e92136992ba23856c1aea109766fc44772477efc932b3194af2265e433ed77d63b44d2a1cff2e8680eff120a430fe012f0f09c6201d546e13ad46fc4ce910eab27bb1569879abed2d9c37fae9f1267c2216ec5debcb20d4de58461a621e6ce8946899de81c0add44d35e27b7982a97f2a5e6314901caebe41dbba35f48bc9244ca6dca2bdde7306435892f287036df088633a070c2e385815ab3e2bfc1a47c05a5b9fe0e80dd6e38e4713a70c8f82bd32475eea8400c7bc67f59cf",
- "5016284e20362610fa05ca9d789cad25f6d43263787e7e085476764ce4a8908ce99b262b375e9d106170b1bec1f473d5e777e0c1896533040e39c8c1465e07907ef5860e14e4d8310013e35f12090e0bfc687474b1f15f3dd2033a0edac5246102da4deec7e188c3517d84d9c2a0a4497a4c5f82a30f1ba009e45ee6eb3ab4368c720ea6feee428ffd2c4cc52debb8d634a64176572c72368f94a66689f23f8a01218f532117af5a8060d140e7ca435a92882fcb5630ebe14a4805f1dc83",
- "05456ec59b8d41bbd736727976b96b38c43827f9e16169be673ff37870c2ecd5f0d1ea1a136be4cc7b047a02a4421d484fd2a12ece418e42ee391a13a0b1df5a0162b29ab70d3fe3e04ba6ab26b37d62b7cf05a5e2f033611bf970b8e1f30e198e483e740fa9618c1e8677e07b61296b94a9787a68fba622d7653b5568f4a8628025939b0f74389ea8fced6098c065bf2a869fd8e07d705eadb53006be2abb716a3114ceb0236d7e916f037cb954cf977720855d12be76d900ca124a2a66bb",
- "eb6f60b83fcee77060ff346aaf6ec34d82a8af469947d3b5074cde8eb26566eb1fa039bcc707738df1e95869bd827c246e88436f0614d9834ead5392ef376105c4a9f370071cdeaaff6ca0f18b74c3a48d19a717253c49bd9009ccbfdd5728a08b7d112a2ed8dbafbbb46d7a75dc9a05e09bfde1a0a92d74a51887f9d123d7896e9f9d0057b660ed7d55454c069d3c5260411db4cdc67e7b74f680d7ac4b9dcc2f8baf72e15e6b3cafebcdf449a6436ed2c398b675f79c644747c57553bf7ea2",
- "187a88e88514f6c4157c1ba40b442baae1ae563a6c989277443b12a219aa484cb9fa8adbb9a29d429f50155321b15664926317477079c7060dfdaa84c1d74bba78892c34e6f21ad35208d2ae622012401696bff5cd57b6485944b3db7b9071fa5f57fbfb1085d91bb9cff5808d662cdc6c8157249478262c44b7fbc397ed42a4977b202e817717bfccc9f0467294062313f7705251ed09573f16d23429361fada259dfb300369c4198f07341b38e84d02cdb74af5de6aab1fc2026208ea7c418c0",
- "be31bc96606d0fab007e5caeded2f1c9f747c759777e9b6eef962bed49e45a1d4fc993e279d024915e600865ecb087b960584be18c41114d3c43f92169b9e0e1f85a0ebcd4e196376ccdc920e66103cd3b1c58407d0aafd0e003c4e341a1daddb9f4faba974362a32f35db83384b05ae8e3322d728893861afd8b1c940de5a17f691e763ce4969b6d94f67fb4a0235d100225bd8602f291388f0ca4a568748ad0d6040f1262eac2aede6cd27419bb78a394c1ffad72c262be8c3f9d9619d633e51d0",
- "4d83d85ca838b4518588f2a90228a4dd18f14dd5b4c012d26298a97d848abbd825d221d02cceb6e8c701b4ad00e1dee4889b5c533e4bb60f1f41a4a61ee5478be2c1b1016c30345afd7a5253668260515e70751f22c8b4022d7fe4877d7bbce90b46531507dd3e89549e7fd58ea28f4cb23d33662bd003c1345ba94cc4b06867f778957901a8c441bee0f3b12e16463a51f7e50690356971dd73a686a49fda1eae46c9d54fba262811d698025d0ee053f1c58591c3bb3cbde69de0b31549ef5b69cf10",
- "cdeb07d36dc5f9a1cd717a9e9cca37a2ce93caa298eee63571f7d6c5fde2a11c666cf53cf2dcb41ca2ea2319e7230ca68e38c647905928713a13982bf47fe33d7095ebd50b2df976208920a43eb2e29b942f32467403c45cea18bf44e0f6aeb155b48a8e5c471fec972a9d62f7ae093d2758f0aaec7ca50cb4725bfa219f1a3a46ad6bde7361f445f86b94d66b8ece080e56c510250693a5d0ea0ae87b4421860b853bcf0381eae4f1bf7c5c0472a93ad18407bc88475ab8560d344a921d3e86a02da397",
- "a598fad52852c5d51ae3b10528fc1f722e21d44fbd42ae5acdf20e85a28532e646a223d27fd907bfd38eb8bb75175636892f8242877aab89e8c0824d368f3339ce7a82aa4e5af6db1f3b588a4d667a00f67bee37cfd2724dde06d2909fb9e58d892f4cfd2c4ca85acdf8256f5458b030a6bda151154ff2e6d7a8da90b54a2884c8a99fab5a4ac211ff23dc0975f4f592fd1b6b9dc7783bdcd2d4ca4e68d2902f2013e122cb62e2bff6b0a98ec55ba25837e21f1cfe67739b568d43e6413dab2bd1dc471e5a",
- "17b68c74c9fe4926e8102070916a4e381b9fe25f5973c9bd4b04ce25749fc18931f37a65a356d3f5e5a1ef125d546f4f0ea797c15fb2efea6fbfcc5739c564693d47adeb12dcb3d98a2830719b13247792cb2491dca159a28138c6cff925aca42f4fdb02e73fbd508ec49b25c60703a7595a3e8f44b155b371d525e48e7e5dc84ac7b17c52bf5e526a67e7187234a2f19f57c548c70fc0b27183df73ffa53fa58b658034c896fa791ae9a7fd2620f5e46ce84c842a6e60e9324ae4db224ffc87d9617cb85ca2",
- "b9e4267ea39e1de1fed0579f93bb351007c9f8fcdd811053fae33f09e2753d7428f04e1a9efcd45ea701a5d87a35b3afb2e6b65365dee6ead0bbb611b7797b212ac688653f542e604a39df277f12514ddfee3b4e27b98395c2cd97a203f1f1153c50327965770802ec2c9783edc428271762b275471e7ac65ac36523df28b0d7e6e6ccc7674268a132a63411fc82c0738dbb68af003b769a0bf9e6587b36476cb465350fee13f88ea355d47ffac7b0f964f4139db11b7642cb8d75fe1bc74d859b6d9e884f75ac",
- "8ca704fe7208fe5f9c23110c0b3b4eee0ef632cae82bda68d8db2436ad409aa05cf159223586e1e6d8bdae9f316ea786809fbe7fe81ec61c61552d3a83cd6beaf652d1263862664df6aae321d0323440430f400f291c3efbe5d5c690b0cc6b0bf871b3933befb40bc870e2ee1ebb68025a2dcc11b68daadef6be29b5f21e440374301bde1e80dcfade4c9d681480e65ec494a6af48df232c3d51447b9d06be714949249c44c43cf73ed13ef0d533e770284e51369d94ae241a5fb2f163893071b2b4c118aeaf9eae",
- "4fd8dd01012bb4df82bf42e0683f998e6f52dd9c5617bae33f867d6c0b69798cead8179346d70acc941abbbdd26e3229d5651361d2252c72ff22db2938d06ff6fc29a42fdf800ae967d06479bc7bbb8e71f40b1190a4b7189ffc9a7096cdb76d40aec424e1388e1eb7ef4ac3b34f3f089da8fda7d1927f5d775c0b2801d22dd1265c973158f640cec93edfed06dc80b20ef8c496b98289d54d46ccd205951cbb0f4e7daeb866b60bacb483411e4382b6f04d472843186bd0e31fbaa93e5c901ec028efafeb45fc551a",
- "e9ee1b22b04b321a5fdd8301627011f583887d77560fb0f35552e207561f81e38ac58a0d0aeaf832d1ee72d913720d01f75574e9a321864fe95f4d0d8f0b8db97649a53e71e940aede5c40b4b9105daa42a6fb2811b61209247534cbaf830b07abe338d75d2f5f4eb1c3cf151e9edabe2c8d5f6fff08fac1495ef48160b100d30dcb0676700bcceb28723a29980ab0766a93abb8cb3d1963007db8458ed99b689d2a7c28c788743c80e8c1239b20982c81dadd0eed6740c65fbc4ef15c7b5569cb9fc997c6550a34b3b2",
- "ec01e3a60964360f7f23ab0b22e021815765ad706f242265ebc19a2bb9e4eac94393952dcf61aae47682671a10f9165f0b20adf83a6706bfbdcf04c6faba6114653a35584267267873291c6fe7ff5f7695243143421509502c8875aafa9e9afe5be5ef2c851c7f35d69be5d3896000ccdbbfab5c238bb34d607cfe2d55d748880545b4aa7ca61137992925189025c62654b1f20d49c3ccd75aa73ce99cd7258dabedd6480a9f5185531fc0118beb68cc0a9cd182f6973287cf9252e12be5b619f15c25b65c71b7a316ebfd",
- "db51a2f84704b78414093aa93708ec5e78573595c6e3a16c9e15744fa0f98ec78a1b3ed1e16f9717c01f6cab1bff0d56367ffc516c2e33261074935e0735ccf0d018744b4d28450f9a4db0dcf7ff504d3183aa967f76a507357948da9018fc38f150db53e2df6cea14466f03792f8bc11bdb5266dd6d508cde9e12ff04305c0295de29de19d491ad86e766774bb517e7e65befb1c5e2c267f013e235d8483e177214f89978b4cdc81aa7eff8b39f2825ad3a1b6ac1424e30edd49b067d770f16e74dd7a9c3af2ad74289a676",
- "00e40f30ae3746edad0f5dd03d0e640933cf3d1694804c1e1ed6399ac36611d405196ee48f129344a8512feda16a354517871322bd5d9c6a1b592933eab531923efb393ffb23d9109cbe1075cebfa5fb917b40df028a621460ff6783c798792cb1d9635b5a6f84ec13918fa302924649b5c7fcb1f7007f0d2f06e9cfd7c27491e565a96c68a0c3644f92cd8f38857258c33801c5d537a83dfe583cba59d7eec7e394199c0a2660a62fabe3ed2099d57f315a6cd8de1a4ade29d977f15d65759cff433e5ac0c182aef3761163e1",
- "3c5ea24d0d9b618294a263f062b2414a722be4eb10dfc346a6ec3b821d7396eba61cd6ef33618b04cd087a811f299d4606820227f16000d7c839062b96d3e3f59cd1a082448d13fc8f56b3fa7fb5f66d0350aa3b72dd7c165d590282f7da2e12cfe9e60e1796122bb8c2d40fdc2997af634b9c6b127a893dfb3467909378300db3da911be1d7b616bb8e0572433e65527e15d936500a2c60e9f9909dcf22ab5e4b6700f0238c205b4a813626fac3d945bab2637fb08203044a73d20c9a3fcf7c3fc4eb7807c3276dd5f73ce89597",
- "9271aeeebfac46f4de85df78f1bfd36136aa8905e15835c9e1941176f71e3aa5b1b131843d40479735e23e182a2bd71f66f6149dccb7ed8c16469079dc8590bbf165374951785f4531f7e7361de62f936cfb23a2b5bdf186632e7042a0dd451fdc9b7208f923f3a5f250ae590ec348c63a16c3aacaf7379f53b5dd4152dcd40d23e683e2156e64c592ffc07e2cd6bbeebef4dd590b2f6b2bcbf08fcd111c079f5c4033adb6c17574f8756ecd87be27eff1d7c8e8d0324438d59ae171d5a17128fbcb5533d921bd044a2038a5046b33",
- "4e3e533d5bcb15793d1b9d0468aaee801f32fdb486b11027183553a09ddbee8213924296f2815dc61577297459e834bf1c7a53f87d43782209e589b8295219ba7073a8fff18ad647fdb474fa39e1faa69911bf83438d5f64fe52f38ce6a991f25812c8f548de7bf2fdea7e9b4782beb4011d3567184c817521a2ba0ebad75b892f7f8e35d68b099827a1b08a84ec5e8125651d6f260295684d0ab1011a9209d2bdeb75128bf5364774d7df91e0746b7b08bda9185035f4f226e7d0a1946fcaa9c607a66b185d8546aac2800e85b74e67",
- "b5d89fa2d94531093365d1259cc6fe8827fea48e6374c8b9a8c4d2209c280fa5c44958a1847222a692a59e6aa2696e6cdc8a543dd89b0ce03bc293b4e78d6ef48e1839694ccd5c65661143095c705b07e3ced84a0f5959114dd89deb956ab3fac8130eb4a878278205b801ae41a29e34146192308c4e759b374757b0c3b00319bce92a1b95a4d2ee179fd6714ff96155d26f693a5bc973f84ac8b3b91e3926276297532d98b46992a3f104c08100bf1671c43134bac280c617da711e90a0100137525375ebb12802a428885ae7fce6514a",
- "40e3d8048fc10650cb8a7fc2e7113e26dec34f9ca2d5129cd10a8e8e44d113d61ee48c7d003e19fd307fc6debd70feb30243f298c510ccc4418355ce143066f067ad7c6de7288c3080e7ad46a23c8d34deb55a43e652fe90444ad3c57d3ec1e1c489d63ef915a24bc74a7925a0a7b1e1523f21ca8fee78df24e3d0a68d0013423db97c280799a0618229c0f2c167289a891e5c8d6661ab21285951c31710e3b5fe55f6347fe16d9b40507948a59252efeb616df83e5c098b07d0a7247cd371daff0e50491c582503fd89f79ba94d6af9ed76",
- "1fa444de01dd3901e2b4684e3d7a799ffa02d85afd35fb30fe4c9d672837bee6dd8a3b8608b4bb5e589220ad5a854f46b46e41c6d57ad124a46beab4169ff69fee7e3838a6165e19dad8eb5d7bf53d4edd3cd2769daf219510a02fdd2afe0c0e1da3cd30fcd1aa88b68965586f07a25a1720fbd90a096ea30fc8e945e3637d7857c8a9c0ab4154ffb2000e57b5f9adfa4e4eaf8065bc3c2b2e75f495963325588785a6ce417dcddffd299873b15dcccca128d63cd4eeeadb64cda28099a9ad7c80d34844901f26b88b00b9aafeb2f90286d29d",
- "fde0a0d9d813983bd1f55cf778a003a2023b34a555322ab280584537bc6bdd844d22a7d6066c18da83ec09f3d8d5a1aab4be0d5ce19b436052f6e259a4b49017a1f47f1fe2bf115d5bc8599fb216351c60dd6b1bedb2e6f4dcadf424b833501b6f099cbfad9e2290680fb69c25032b42a6274f7cb9b5c5950401354838a45f7cb77b95bf54718e2f3d3d9fb91eb2311903980277396398d9736d8e92fd838594ac8a537c6c529db5a8a4f89290e6ba6f20ac0e5ed6fef40901d0e0e8e3e502990811f9acaae555dd54eb1bcd96b513e2fe751bec",
- "9f8e0caec87858599f5ab29bff86da78a841a918a023a111098687ecdf2747612d3f3809d9ca400b878bd4f92c43a1004f1c17c7f19a3cd1ce449bd2b23aff551623c37dd8c0be56bf3fd857b500c2b9f9ccea62481944090a3cf3b6ee81d9af8eeb60f65ef150f9fa4d3ed6ce4762d3d4f174ee8ccd460c25cafac0ea5ec8a6a4b2f9e8c0520cb7061155e532cb65f188b01e4b9086db951f504b060c296b326b3fc1c590498ecce594f828f4a10ea416675720ae505295d38a791bd0e93f428448a8f4c1fc0af53604a9e8255384d29ae5c334e2",
- "33d1e683a4c97ee6bbaa5f9df1a88cb53b7f3c157b6045d70a56fda0ccbd3a1fa1f049cd564da072b53f415bf5fb843771c1d2551fd075d33377362b2f7c0645f9723123d11975991db8a2b518f02e2c7c30342a044754290bae2c77496d755e5981f12e6b0a0174280b958bf11ed628a9062775993ced04bf752ea8d165e3ac2177d7cd1b9371c44efa98f0b3e68602a839d384eec007979f46429dafb138cbc231ad928a9f65f7d66fac77416395e8f1debaaf76ec2e4e03e8674102cd26f614739f3ec9f949033df1fb97e87c2326d65aef94ed5f",
- "180048f09d0b480887af7fd548a85abf605440c1ddde6afe4c30c30670233f7bf928f43b4681f59279ebbda5e8f8f2a1abefdee129e18ac60f9224e90b38b0aabd01308e0a27f41b6fb2ee07ee176ec9048c5fe33c3f7c791469c81f30e28170585b9f3e7e3c8c2e9d74370cb4518f13bf2dee048cbd98ffa32d85e43bcc64a626b40efb51ce712925fdd6fee006dc68b88004a81549d2121986dd1966084cd654a7c6686b3bae32afbd9625e09344e85cf9611ea08dfce835a2e5b3726e69ae8a76a97db60fcc539944ba4b1e8449e4d9802ae99fae86",
- "13c0bc2f5eb887cd90eae426143764cf82b3545998c386007cca871890912217aa143ac4ed4ddb5a7495b704aa4de18419b8664b15bc26cfc6596a4d2ae408f98b47a566476d5802d594ba84c2f538def9d016661f6404bb2337a3932a24f6e30073a6c9c274b940c62c727242e24466084a3ea336365d71ea8fa6499c0ea8d59eea505f1126b99c795023c4963aa0d99323d0391e8701110edf551b2d3799e1063ca443f1add162156e445502ca1a052fe70c289838593b58839fc63de128a03e2bbf389e22ae0cf957fd03315ee407b096cc1cfd92dee6",
- "6f1eb607d679efef065df08987a1174aab41bdac8aece7726dfa65805d6fff5b3d17a672d96b770dc32165f144f0f7324822a5c87563b7cd9e37a742ae83ef245d09006d91576f435a03476f509ea2936636232f66aa7f6cdf1ac187bbd1fcb8e20f8791866e60ed96c73374c12ac16795e999b891c64507d2dbd97e5fc29fac750ad27f2937cbcd29fdafccf27ab22453834d475f6186eaf975a36fad5c8bd61c21da554e1ded46c4c39765dcf5c8f5ccfb49b6a4dc562c919d0c7d8940ec536ab2448ec3c9a9c8b0e8fd4870cad9de2577c7b0c38563f355",
- "dcdd993c94d3acbc555f464871a32c5da6f13b3d5bbc3e34429705e8ad2e76393fdd96a69a94acb652f5dc3c120d41187e9aa919669f727c4868013b0cb6acc165c1b7706c52248e15c3bf81eb6c147619467945c7c48fa14a73e7c3d5bec91706c567145342a026c9d97eff97ec672c5debb9df1a998083b0b0081d65c517b3e5634c95e347e781aa30ca1c8af815e2e494d844e847fdcb41622894a518dc36571123a40bfdbe8c4f4cff44d83c61dd9dcd24c464c53b395edb31efee9f3aa080e87cdc3d22d613ae84a53c9249c32c96f9a3bc4629bb126a70",
- "49971f9823e63c3a72574d977953329e813b22a8387cd13f56d8ea77a5d1a8a20012632d1d8732bbcb9f756b9675aab5db927beacab7ca263e5718b8dfa7b2eed9a91bf5ed163b16139d45f7b8cc7e3f7bdda6202106f67dfb23b7c315ee3e17a09d466b1e6b13e7c7428184a979f5358667b4fa8bd40bcc8ea46058db44587a85377ac46bf155136c09ac58cb6c27f28e17028c91e7e8f74d5b500e56293b316974f02b9d9ea205d9b6ac4cfb74eb8eb0c944577fd2f41316368307beab3e327bf7dbaa0a4428836ec4e895dea635234abeaf113ceeadac33c7a3",
- "c57a9cc958cee983599b04fe694f15fb470fcbc53e4bfcc00a27351b12d5d2434444253ad4184e87b81b738922ffd7ff1dc1e54f39c5518b49fb8fe50d63e3935f99e4bd125e8dc0ba8a17fd62de709339a43fabe15cf86d96a54010112170c340cfac4132182eed7301402bc7c8276089dec38488af145cb6222525894658f03501204b7a66aba0be1b557b28a2f652d66f7313ed825ecc4d8596c1be7420d4425b86a1a90a5b7f30d0f24e0d1aae0eb619ca457a71699e44be612a4011c597ee80b94d5507e429d7fc6af22579cd6ad642723b05ef169fade526fb",
- "0568a672cd1ecbaa947045b712e2ac27995392fbef8f9488f79803cbee561c212287f080eca95adb5ba42739d78e3ba667f06045d87850d3a0499358649caa257ad29f1a9c511e7054db20554d15cbb55ff854afa45cae475c729cea72ede953522031865bc02b95589ed4d9841c552a8cc94904a93ed09ed77222f6c178195056be59bc4e96a815adf534e6b466fb47e262ff79c803c157a21b6e2269c2e0abeb494113cd868d8466e82d4b2f6a28b73645853d96bc9242515d803e33294848d3fe42fdff68da53c03491636beede47ff1399dd3d54a5e914d55d7adf",
- "3f19f61a4cd085796731ac9f85a75a8bce77031932c31762d87d8b8d07b8bd19ff78d6b7d1bd1e87f3a4f41aad03b6c4d17a6cbc86be55f7c8b88ada047bb04f8d49f1c34bcf81cc0f3389ad01a758fc7eeb0072aa9ad1481992bfdde82e438e75590a4423832dfbe3756e2229ea873bc3606e6d72174cb2163bf40b5d49c81009dab85ecc03e311351bbf96e32c030a2b276a7698cb25bc2c967acb3213161a1fdde7d912cd6a804490f8056c47da1333f6e35c41e749c2c23919cb9af5eec5652e6e072b034fb1682e9aaa194a9c0bd456ea0b008d14dbce37967a7a8e",
- "705f98f632d99d3651793825c38dc4deda56c59eac539da6a0159c83131cf8ab6f2ee0c3b74111fde351f7aa1a8c500a0cecab17c212d2c58ca09eae608c8eefc922b9902ef8d6832f799ba48c3c28aa702b3242107edeba01daafe424406a3822965056cfe8783455a671e93b1e2eae2321364f1871471c82124df33bc09e1b52882bd7e1c4c7d0b2f3dd4a28c2a002a43246768af0700f9659de99d62167be93177aabf19d678e79e9c726ac510d94e74873eda99620a3961930cd91937c88a06d8153d64fd60da7ca38cf26d1d4f04a0df273f52127c53fdc593f0f8df9",
- "ea6f8e977c954657b45f25480ff42c36c7a10c77caa26eb1c907062e24fbca5aebc65cacca0de10abea8c78322f08672e13d8ac16996eca1aa17402eaea4c1cc6c800b22dc18cb8d620192d74bac02c07b5cfa61e513c7f28b7e29b9700e0e442720bf4c669d4995da19d19f841d9eb68cc74153592591e3bf059ef616b95305aa453b32fe99a91afb35bd482cf2b7aa42702837a53be3c38883d2963020e347556f841254ec6b85854485fe8c520b05f2ea67a9bf3981555c20991e2bacd4db5b418228b6002d8d41c025cb472bf5443aaa885974a408ea7f2e3f932c600deb",
- "408190134ed06556811b1af808ab2d986aff152a28de2c41a2207c0ccc18125ac20f48384de89ea7c80cda1da14e60cc1599943646b4c0082bbcda2d9fa55a13e9df2934edf15eb4fd41f25fa3dd706ab6de522ed351b106321e494e7a27d5f7caf44ec6fadf1122d227eefc0f57aefc140d2c63d07dcbfd65790b1099745ed042cfd1548242076b98e616b76ff0d53db5179df8dd62c06a36a8b9e95a671e2a9b9dd3fb187a31ae5828d218ec5851913e0b52e2532bd4bf9e7b349f32de2b6d5d3cdf9f372d49617b6220c93c05962327e99a0480488443349f0fd54c1860f7c8",
- "5f9e5c6f38573a85010a9d84d33f29c057003b2645e3ea6f72cbc7af95d197ce6a06b13fea81722853e6991791b8b15091cd066f5ed913592ed3d3af5370d39ba22beeb2a582a414b16824b77e194a094c2afdcc09aa73ce36f4943cca5ae32c5017dc398801dd92a47382d9327c9f6cffd38ca4167cd836f7855fc5ff048d8efba378cdde224905a0425e6b1de061fc951c5e624a5153b008ad41160a710b3ff2081748d5e02deb9f841f4fc6cf4a15153dd4fe874fd447482696283e79ee0e6bc8c1c0409baa5ab02c5209c319e3169b2476149c0c6e541c6197ca46e004eef533",
- "218c6b3508aec69574f2b5039b30b942b72a8349d05f48ff945bbbe5c8957d5a6199492a6bf54bab821c9377e2edfa4c908384664d2c80112d5e805d66e0a551b941021be17dd20bd825bea9a3b6afb1b8c605805b3bda58750f03ea5c953a698494b425d8980c69f34d1c3f6b5866e8717031152a127215c256e08873c21b0f5cc85875d0f7c94601659150c04cd5fe5d381ba29983a2d94fcd3a65a94c53c7279cd000dddd4253d8cff8d7f6ace10247fe3bc30d63ba4bb54f557b3d22a3924369430d71ab37b701e9500bda70b5a643704858beed4726a889b6c9c91584194c68f1",
- "dac26aa7273fc25d6e044c79fc2bfa46e59892a42bbca59a86826c91e76ab03e4bd9f7c0b5f08d1931d88b36ea77d94f7ba67cd4f1d3086e529427201119096ae066ae6f170940830ed7900de7bb9d66e09788287403a4ecc93c6da975d2fb08e918840a236c15f5d3a8f7375c2eeebbf6f01a6e7f29ca2b8d42df158414c320777433663c59fdcd1f39ca68e3473db721be7ce8c6dba5fddc024f94fedb286b0477581d451313ca8c737484daf60d67f9b2d56d4bcc271f7e9ae958c7f258efbc74d25753e0516f28282461941bf2dcc7dd8c7df6173b89760cefcac07190243ff863fb",
- "c46e6512e6797cc7a54254a1b26b2de29aa83d6c4b1ea5a2786fbcec388270625b12635eae39e1fba013f8a65219421bca8b52a8ddfd431cda60299bdf160734d5a7450ec79620058522702174ae451b9bfa7c4a455fbbee3e1d048c7d4bac5131018228f137c8e130440c7059b4f15eaa34ce872a851a16ce86f982df78a00be4d564da2003a450ddee9ab43ea876b8b4b65c84f0b39265fd5456417afb5bc54997c986e66fc222f2123ba5e719c4d6b9a177b188277df384f1125821cf19d5248cef0be183ccdc84ac194506f740ed2188b2689ea4c9236a9e9e3a2fff85b6af4e9b49a3",
- "1ccd4d278d67b65cf2564ecd4de1b55fe07adc80e1f735fe2f08ea53fd3977323689122c29c798957abaff6aba09bdcbf661d77f4dc8913ab1fe2bef38846166e3834785e7105d746484eff8c656af5d8c7854abc1c62b7fadb65521dc6f793d978bda9838eb3800417d32e8a24d8c8cb1d18a5de6ca79d9e1b0ff9aa25e6218fe944cf18666fecc1e31334b390260dbe0997539e1b02f6366b2aea4f4a21efe04f4b97568fcb39e59919d5ebac6543d5d0f48fc66b923c34aac377dc95c20329b837b6ed5e8d9a3d2089cd0d8f025658006ff41cbdaccca618822ca590ab155253f8bc1c7f5",
- "9875209588395ee3c9fdd793fd48717cc84c8c3ea622b2ccc4a1be4448e6034b7810569855255031f10be5ffd714b05f9ce01972d712d40abf03d4d0ce175813a7a668f761324996093fc2aa5912f7fc2abdadd8775d2b4d9ad492216293381460ed8f6db3d641d1525f4242c348bbfe504c704f215dc461de51b5c75c1aae967936963848f16c673eca5e78dfd47eb19001d52d1bcf96c98956dad5ddf594a5da757e7ca35f2f69803b784e66ac5a58b75c228b8266ec592505e5d1ca87d81225738855f15bc0914677e81593fd409e77d159f8a908f67788de9eb06c5561547aada96c47c535",
- "40c90e375e366f3756d89091eb3eed9fe0fbfc5638700af4617d358812bac53124a2205dd6756456787d49cd6a35e302479a0992288f47532e4ea7ab62fc5ad5adc690a5d9a446f7e035ad4641bd8dae83946aee3338ec984ccb5cc633e1409f2531eeffe05532a8b0062ba99454c9aeabf8ecb94db195af7032bfebc22912f49d39330add47ff8fa5720612d697f0b602738930e060a1bb214efc5e292224cf34e29deaea6b1b1ff847e94ecc997325ac38df61db45d82bf0e74a664d2fe085c20b04c39e90d6a170b68d2f1d373f00c731c524456ada73d659aaac9df3191a7a3865083343fc13",
- "e8800d82e072210ca6d7fa2472028974780b76aad4bcb9ad362422dd05ae3232668251d164daa375a43b26a38cce28dbeb3dee1a4a579f70d0fe7febb29b5ece8aa836e050fb3d188c63aa9c3c0da6c717d86458a6096b5effceb964efdec7035960c09ccd10dea3c5f1c7f9f478d5887ebbe2e15c5ff85dbacbc444bb951c4eec7abecb89ed80187e409e2972ffe1a5f01562af109f2cf09471cf72cf83a3bb8f4e2ef38ed0e326b698296394e5b2718a5000c01425708e8ad0461e62462d8819c2377f13ab1be2c7c9f33dc06fe23cad27b87569f2ce2e56e4b2c60c7b1b3d370841d89ebdc1f192",
- "796d6d1447d5b7e8c55cd8b2f8b7010db39f27565f907e3fc0e464ea2d4bb52b37f10e7c6dcfc59231b9cdee12c32aeb4adbc42b86e86eb6defb5b69e6ca75e1f4d0dae3e124e5a1b8b6697f7e10b0403f1f0a5ff848eef3752837a9ba17780f16a9a709188a8d5b89a2fa74adb2e651163b1c2b3d261e225c9158dcd9eb7ac3d6704cee290cdff6bcb3cb90cee030aa0d19d4693655c3c30ac6fc06d2ae37787c47126d57ed9a6bef5f8a6c56859aefc08755739a95aac57a4dd916a92ba9f3afbf969df8085949615033365c751a9a3e1a18cee98a69d22e64009bebf8307169b6c61de0617ecfafdf",
- "4f9057183566153cf337b07c3f5556006de54c56b2a1e5326c07aaeabd1886ec6f1641358925db232b2f0dbf75229c796a7395b2f934c1f99090bec1123f3c841b1cb3c5b1ec42ed5408f2940f0c48a9470b852c46d6557853d459cecd2c32bbcd8ee21fa11e385eef0857cba4d8545a61b52a484cdd779db4739fbc7aa9860dcabe0488b98fa0b60c3f7d6153db279000a52ffb573dab37d2ab1896a90e5deb7ac6bbe56239085c325d83a917dc6e8a448425b718c2356b9f3066163555ec444f372e184e02c8c4c69b1c1c2ae2b51e45b98f73d933d18750968945ca85d6bbb22014b4c4015262e3c40d",
- "79dcca7d8b81a61359e4aece21f3df7b99518ce70bd2f57a18bab5e7114af2add0a0cea7f319d69f231f060e0a539d9a23fb3e95451ce8c6340cfb09edf931df84203a39226dd9eb278f11b691ef612585b973daab373e65d11325898badf6732100371fd759960fa8fec373268421d28bffdb9b12a430b92fe4b07566ca0c89e616e49f8fc75ccd9cdc66db820d7c02e109aa5ed86b89770262918a518f90a2292f6b68d68ae03992e4259a17a23c84ec2a417f082b5abf3a26e44d2278ecb8ba9456965303a75f25394d1aaf5544590e74b14d8a4cc4050be2b0ebcfe4d2db6b12a02c68a3bcdda70301f3",
- "848755dc31e25e9a42f9ec12d847d19f292c14c162c9aba49e972cb123b58b8e57bb263a923929833373858594ff52dbc298dbbc078599194e4c07b0e5fc1e10808bbacdb6e93c72b333685cf961f28eb0d5a395c63266b01f130d25db384b356e5da6d01042fc2359581b89c63b3bb2d1ce897fbc9e83fe85d9666cb60e6a8c657f70caad5387b8a045bf91095606802c8424ea8ac52ef29386dc46183378a5fcb2cb927428b8c070f1c42aafd3bc70ca25437807696a46873cfeb7b80ba2ebc3c4272443d445e46343a1465253a9eebd532a0d1d2c18264b91ff45159f245404ae9335f2af55c802772426b4",
- "ecaa6e999ef355a0768730edb835db411829a3764f79d764bb5682af6d00f51b313e017b83fffe2e332cd4a3de0a81d6a52084d5748346a1f81eb9b183ff6d93d05edc00e938d001c90872dfe234e8dd085f639af168af4a07e18f1c56ca6c7c1addffc4a70eb4660666dda0321636c3f83479ad3b64e23d749620413a2ecdcc52ad4e6e63f2b817ce99c15b5d2da3792721d7158297cce65e0c04fe810d7e2434b969e4c7892b3840623e153576356e9a696fd9e7a801c25de621a7849da3f99158d3d09bf039f43c510c8ffb00fa3e9a3c12d2c8062dd25b8dabe53d8581e30427e81c3dfc2d455352487e1255",
- "23a3fe80e3636313fdf922a1359514d9f31775e1adf24285e8001c04dbce866df055edf25b506e18953492a173ba5aa0c1ec758123406a97025ba9b6b7a97eb14734424d1a7841ec0eaeba0051d6e9734263bea1af9895a3b8c83d8c854da2ae7832bdd7c285b73f8113c3821cced38b3656b4e6369a9f8327cd368f04128f1d78b6b4260f55995277feffa15e34532cd0306c1f47354667c17018ee012a791af2dbbc7afc92c388008c601740cccbbe66f1eb06ea657e9d478066c2bd2093ab62cd94abadc002722f50968e8acf361658fc64f50685a5b1b004888b3b4f64a4ddb67bec7e4ac64c9ee8deeda896b9",
- "758f3567cd992228386a1c01930f7c52a9dcce28fdc1aaa54b0fed97d9a54f1df805f31bac12d559e90a2063cd7df8311a148f6904f78c5440f75e49877c0c0855d59c7f7ee52837e6ef3e54a568a7b38a0d5b896e298c8e46a56d24d8cabda8aeff85a622a3e7c87483ba921f34156defd185f608e2241224286e38121a162c2ba7604f68484717196f6628861a948180e8f06c6cc1ec66d032cf8d16da039cd74277cde31e535bc1692a44046e16881c954af3cd91dc49b443a3680e4bc42a954a46ebd1368b1398edd7580f935514b15c7fbfa9b40048a35122283af731f5e460aa85b66e65f49a9d158699bd2870",
- "fe511e86971cea2b6af91b2afa898d9b067fa71780790bb409189f5debe719f405e16acf7c4306a6e6ac5cd535290efe088943b9e6c5d25bfc508023c1b105d20d57252fee8cdbddb4d34a6ec2f72e8d55be55afcafd2e922ab8c31888bec4e816d04f0b2cd23df6e04720969c5152b3563c6da37e4608554cc7b8715bc10aba6a2e3b6fbcd35408df0dd73a9076bfad32b741fcdb0edfb563b3f753508b9b26f0a91673255f9bcda2b9a120f6bfa0632b6551ca517d846a747b66ebda1b2170891ece94c19ce8bf682cc94afdf0053fba4e4f0530935c07cdd6f879c999a8c4328ef6d3e0a37974a230ada83910604337",
- "a6024f5b959698c0de45f4f29e1803f99dc8112989c536e5a1337e281bc856ff721e986de183d7b0ea9eb61166830ae5d6d6bc857dc833ff189b52889b8e2bd3f35b4937624d9b36dc5f19db44f0772508029784c7dac9568d28609058bc437e2f79f95b12307d8a8fb042d7fd6ee910a9e8df609ede3283f958ba918a9925a0b1d0f9f9f232062315f28a52cbd60e71c09d83e0f6600f508f0ae8ad7642c080ffc618fcd2314e26f67f1529342569f6df37017f7e3b2dac32ad88d56d175ab22205ee7e3ee94720d76933a21132e110fefbb0689a3adbaa4c685f43652136d09b3a359b5c671e38f11915cb5612db2ae294",
- "af6de0e227bd78494acb559ddf34d8a7d55a03912384831be21c38376f39cda8a864aff7a48aed758f6bdf777779a669068a75ce82a06f6b3325c855ed83daf5513a078a61f7dc6c1622a633367e5f3a33e765c8ec5d8d54f48494006fdbf8922063e5340013e312871b7f8f8e5ea439c0d4cb78e2f19dd11f010729b692c65dd0d347f0ce53de9d849224666ea2f6487f1c6f953e8f9dbfd3d6de291c3e9d045e633cfd83c89d2f2327d0b2f31f72ac1604a3db1febc5f22cad08153278047210cc2894582c251a014c652e3951593e70e52a5d7451be8924b64f85c8247dab6268d24710b39fc1c07b4ac829fbda34ed79b5",
- "d7314e8b1ff82100b8f5870da62b61c31ab37ace9e6a7b6f7d294571523783c1fdedcbc00dd487dd6f848c34aab493507d07071b5eb59d1a2346068c7f356755fbde3d2cab67514f8c3a12d6ff9f96a977a9ac9263491bd33122a904da5386b943d35a6ba383932df07f259b6b45f69e9b27b4ca124fb3ae143d709853eed86690bc2754d5f8865c355a44b5279d8eb31cdc00f7407fb5f5b34edc57fc7ace943565da2222dc80632ccf42f2f125ceb19714ea964c2e50603c9f8960c3f27c2ed0e18a559931c4352bd7422109a28c5e145003f55c9b7c664fdc985168868950396eaf6fefc7b73d815c1aca721d7c67da632925",
- "2928b55c0e4d0f5cb4b60af59e9a702e3d616a8cf427c8bb03981fb8c29026d8f7d89161f36c11654f9a5e8ccb703595a58d671ecdc22c6a784abe363158682be4643002a7da5c9d268a30ea9a8d4cc24f562ab59f55c2b43af7dbcecc7e5ebe7494e82d74145a1e7d442125eb0431c5ea0939b27afa47f8ca97849f341f707660c7fbe49b7a0712fbcb6f7562ae2961425f27c7779c7534ecdeb8047ff3cb89a25159f3e1cefe42f9ef16426241f2c4d62c11d7ac43c4500dfcd184436bb4ef33260366f875230f26d81613c334dbda4736ba9d1d2966502914ec01bbe72d885606ec11da7a2cb01b29d35eebedbb0ecc73ed6c35",
- "fd993f50e8a68c7b2c7f87511ce65b93c0aa94dcbdf2c9cca93816f0f3b2ab34c62c586fc507b4900a34cf9d0517e0fe10a89d154c5419c1f5e38de00e8834fe3dc1032abdeb10729a81655a69a12856a78ca6e12110580de879b086fd6608726541cfa9616326bdd36064bc0d1e5f9c93b41278bff6a13b2494b81e238c0c45aea1b07d855e8f3fe1478e373bd9d3957cf8a5e5b9003386793d994c7c575cff2322e2428cbbaa4f47560316ae3354a7478842ff7cc5dcbacb6e871e72b36f06d63a9aaeb9044cfb7974afdc238a5816f537dcf33ee40b4e1a5eb3cff2402b46d548264e133008d284f11b7e4e450bc3c5ff9f79b9c4",
- "8df21892f5fc303b0de4adef1970186db6fe71bb3ea3094922e13afcfabf1d0be009f36d6f6310c5f9fda51f1a946507a055b645c296370440e5e83d8e906a2fb51f2b42de8856a81a4f28a73a8825c68ea08e5e366730bce8047011cb7d6d9be8c6f4211308fad21856284d5bc47d199988e0abf5badf8693ceeed0a2d98e8ae94b7775a42925edb1f697ffbd8e806af23145054a85e071819cca4cd48875290ca65e5ee72a9a54ff9f19c10ef4adaf8d04c9a9afcc73853fc128bbebc61f78702787c966ca6e1b1a0e4dab646acdfcd3c6bf3e5cfbec5ebe3e06c8abaa1de56e48421d87c46b5c78030afcafd91f27e7d7c85eb4872b",
- "48ec6ec520f8e593d7b3f653eb15553de246723b81a6d0c3221aaa42a37420fba98a23796338dff5f845dce6d5a449be5ecc1887356619270461087e08d05fb60433a83d7bd00c002b09ea210b428965124b9b27d9105a71c826c1a2491cfd60e4cfa86c2da0c7100a8dc1c3f2f94b280d54e01e043acf0e966200d9fa8a41daf3b9382820786c75cadbb8841a1b2be5b6cbeb64878e4a231ae063a99b4e2308960ef0c8e2a16bb3545cc43bdf171493fb89a84f47e7973dc60cf75aeeca71e0a7ebe17d161d4fb9fe009941cc438f16a5bae6c99fcad08cac486eb2a48060b023d8730bf1d82fe60a2f036e6f52a5bff95f43bbe088933f",
- "f4d84ed3e564c102600a795eaa9b1eaf4ad12f1a4deca1d042a0a2750ddf6201db03073d8bf553cb9dde48a1b0083827a609f7242b86584cc180964ae794b12ce55661e00e36a6ba4dbc389e6a5a85f1b45df9af7ead1b0a54db56e68639b9d438a91504e82c35d40c7bc7e048a53ac0b04accd0dadf4ac9884b0ca0e3cb5ba4336e3581be4c4760a553823ffa283a1120d4e145af56a59f2533903650f0b9e9ad9fe2e8a3c3c3dd03a1fcb709032c8835324839c735b0c051d0cbd8b5d867617c11023432e4bd275d3d0eb98a0b6cf58071a5b712922f2bc751ac7c2588c447444cde2f37a8ea5ec126425bf517e0d17c9e2999f52fee14b3",
- "2ccea21bac9c2b70d3923309cbf2d7cb7abd1fcc8b8b002688870a80029c62397350c3c898194e5deea360bb963d26d485cb7963f8167586976ec0556950b2e86135f4a2800991ce8473bfd44a3c5e937a48b5e355ba5141bccf2131a83988d9d2a9e8e7635a956105b3512c05ef708139ced51d7a4e204c12d8a49a21e8dc6de2629a2fd092326885d9f218745fe09f6d91fb6afce250a30a63689534b6be1f26899ffa3767d835cf586aa47776700f94241bc999b1e3deefe188f37ff734f5f16ee6a00914323dc7b8a143c9137cdcc5cd08ae9566f04bb2941532674c97dff6ffa5ce3405ef8e5d27ec403114253dd6394c0167d72a0044c5",
- "2b681c6398aee63bf862770341648bbcd31d7de7903c5903fe3d9469311320bb24d914f2af0cdca199c97214c7c679dc32a2800ba484a03c010ea6be3bb9f2c87e30a98b606050b8a3f297f12b8f92caaeceb3e844652115934874e0a1ab093a73d759b53f6a6c3096940dd22c2bb96ce6820a7b9c6d71a208de9892aa6a7209b0fff56a0cafea52b952cdd6f5752cff3309d448800b4e4c878aa595595b56b12b83fcd6ca89520c7da664e449d7b4438fc455888aad5de0fad9a06eed14afd3513b5ebbffe01775549b701181bd26370764f56eba52fdb24286ad1ac0f5418a7c429f7dfc7f3168437fa8eed7a2ed7c723a485e4c3ed14dea2e07",
- "aadfd505a89f4aade2c3018258a7e039401b1fc6a7f3d87910dddbb880d372ec8a13c70d92245de5b8e5f9a285c33b99dc82fa2b22decee72b93a72211656ad7a52696c8e570f78be28c0e427a371dafde856e8d5ed24f83b0660b51e7fac05d93a8666dfde6def59af863f80f3e5f6801182c87422203df390dcb736b8f830052a8832eeeb0b4e27e732aaf793d166b5a3ec7745aeef3766937c2b75a276bddd145f6010c29d035e343e267cb2d828436876ec3a7ebe3b6347d4172f7a99d6821ce152e039e53deb33340b324c7f068ffb94b3cde35a8eaa12d15c3806a7ad0acec3e8c7078c1d32a28fd3eec9f32cb86e4c22166ff69e83785e851",
- "1605b8cce529a9d6262fd4390d9e4ae5e14e0adc0ec89b028ef68dd0f373ea259aaa96f2967091dd0874c0105385e9e6da9ca68297c31afa44ef834535fb302ce5b4e49edacbbdf359fe1228a8172495b3e57014c27edd58b685110980056c50c398a64f4923f2d720b4df16d75cb36b4233660694182099c35028a972519c24764fc94e18e582b24deb3491535fc06b83837c7958522800e822201d694af0bd0aa3834e17d4b1ba36f470905ae5f8bbeeb6c4c8604d8af02baa347b07086d6989867ddd5e8e8ed7740c3469bfa2810519c55c6add1332c4c54ee9097961d6741cb12a09713a0d07645f784f42f5ad94b48b836b34263130b0483f15e3",
- "ff9c6125b2f60bfd6c2427b279df070e430075096647599bdc68c531152c58e13858b82385d78c856092d6c74106e87ccf51ac7e673936332d9b223444eaa0e762ee258d8a733d3a515ec68ed73285e5ca183ae3278b4820b0ab2797feb1e7d8cc864df585dfb5ebe02a993325a9ad5e2d7d49d3132cf66013898351d044e0fe908ccdfeeebf651983601e3673a1f92d36510c0cc19b2e75856db8e4a41f92a51efa66d6cc22e414944c2c34a5a89ccde0be76f51410824e330d8e7c613194338c93732e8aea651fca18bcf1ac1824340c5553aff1e58d4ab8d7c8842b4712021e517cd6c140f6743c69c7bee05b10a8f24050a8caa4f96d1664909c5a06",
- "6e85c2f8e1fdc3aaeb969da1258cb504bbf0070cd03d23b3fb5ee08feea5ee2e0ee1c71a5d0f4f701b351f4e4b4d74cb1e2ae6184814f77b62d2f08134b7236ebf6b67d8a6c9f01b4248b30667c555f5d8646dbfe291151b23c9c9857e33a4d5c847be29a5ee7b402e03bac02d1a4319acc0dd8f25e9c7a266f5e5c896cc11b5b238df96a0963ae806cb277abc515c298a3e61a3036b177acf87a56ca4478c4c6d0d468913de602ec891318bbaf52c97a77c35c5b7d164816cf24e4c4b0b5f45853882f716d61eb947a45ce2efa78f1c70a918512af1ad536cbe6148083385b34e207f5f690d7a954021e4b5f4258a385fd8a87809a481f34202af4caccb82",
- "1e9b2c454e9de3a2d723d850331037dbf54133dbe27488ff757dd255833a27d8eb8a128ad12d0978b6884e25737086a704fb289aaaccf930d5b582ab4df1f55f0c429b6875edec3fe45464fa74164be056a55e243c4222c586bec5b18f39036aa903d98180f24f83d09a454dfa1e03a60e6a3ba4613e99c35f874d790174ee48a557f4f021ade4d1b278d7997ef094569b37b3db0505951e9ee8400adaea275c6db51b325ee730c69df97745b556ae41cd98741e28aa3a49544541eeb3da1b1e8fa4e8e9100d66dd0c7f5e2c271b1ecc077de79c462b9fe4c273543ecd82a5bea63c5acc01eca5fb780c7d7c8c9fe208ae8bd50cad1769693d92c6c8649d20d8",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2x.go
deleted file mode 100644
index c814496a7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/blake2x.go
+++ /dev/null
@@ -1,177 +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 file.
-
-package blake2b
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-// XOF defines the interface to hash functions that
-// support arbitrary-length output.
-type XOF interface {
- // Write absorbs more data into the hash's state. It panics if called
- // after Read.
- io.Writer
-
- // Read reads more output from the hash. It returns io.EOF if the limit
- // has been reached.
- io.Reader
-
- // Clone returns a copy of the XOF in its current state.
- Clone() XOF
-
- // Reset resets the XOF to its initial state.
- Reset()
-}
-
-// OutputLengthUnknown can be used as the size argument to NewXOF to indicate
-// the the length of the output is not known in advance.
-const OutputLengthUnknown = 0
-
-// magicUnknownOutputLength is a magic value for the output size that indicates
-// an unknown number of output bytes.
-const magicUnknownOutputLength = (1 << 32) - 1
-
-// maxOutputLength is the absolute maximum number of bytes to produce when the
-// number of output bytes is unknown.
-const maxOutputLength = (1 << 32) * 64
-
-// NewXOF creates a new variable-output-length hash. The hash either produce a
-// known number of bytes (1 <= size < 2**32-1), or an unknown number of bytes
-// (size == OutputLengthUnknown). In the latter case, an absolute limit of
-// 256GiB applies.
-//
-// A non-nil key turns the hash into a MAC. The key must between
-// zero and 32 bytes long.
-func NewXOF(size uint32, key []byte) (XOF, error) {
- if len(key) > Size {
- return nil, errKeySize
- }
- if size == magicUnknownOutputLength {
- // 2^32-1 indicates an unknown number of bytes and thus isn't a
- // valid length.
- return nil, errors.New("blake2b: XOF length too large")
- }
- if size == OutputLengthUnknown {
- size = magicUnknownOutputLength
- }
- x := &xof{
- d: digest{
- size: Size,
- keyLen: len(key),
- },
- length: size,
- }
- copy(x.d.key[:], key)
- x.Reset()
- return x, nil
-}
-
-type xof struct {
- d digest
- length uint32
- remaining uint64
- cfg, root, block [Size]byte
- offset int
- nodeOffset uint32
- readMode bool
-}
-
-func (x *xof) Write(p []byte) (n int, err error) {
- if x.readMode {
- panic("blake2b: write to XOF after read")
- }
- return x.d.Write(p)
-}
-
-func (x *xof) Clone() XOF {
- clone := *x
- return &clone
-}
-
-func (x *xof) Reset() {
- x.cfg[0] = byte(Size)
- binary.LittleEndian.PutUint32(x.cfg[4:], uint32(Size)) // leaf length
- binary.LittleEndian.PutUint32(x.cfg[12:], x.length) // XOF length
- x.cfg[17] = byte(Size) // inner hash size
-
- x.d.Reset()
- x.d.h[1] ^= uint64(x.length) << 32
-
- x.remaining = uint64(x.length)
- if x.remaining == magicUnknownOutputLength {
- x.remaining = maxOutputLength
- }
- x.offset, x.nodeOffset = 0, 0
- x.readMode = false
-}
-
-func (x *xof) Read(p []byte) (n int, err error) {
- if !x.readMode {
- x.d.finalize(&x.root)
- x.readMode = true
- }
-
- if x.remaining == 0 {
- return 0, io.EOF
- }
-
- n = len(p)
- if uint64(n) > x.remaining {
- n = int(x.remaining)
- p = p[:n]
- }
-
- if x.offset > 0 {
- blockRemaining := Size - x.offset
- if n < blockRemaining {
- x.offset += copy(p, x.block[x.offset:])
- x.remaining -= uint64(n)
- return
- }
- copy(p, x.block[x.offset:])
- p = p[blockRemaining:]
- x.offset = 0
- x.remaining -= uint64(blockRemaining)
- }
-
- for len(p) >= Size {
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- copy(p, x.block[:])
- p = p[Size:]
- x.remaining -= uint64(Size)
- }
-
- if todo := len(p); todo > 0 {
- if x.remaining < uint64(Size) {
- x.cfg[0] = byte(x.remaining)
- }
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- x.offset = copy(p, x.block[:todo])
- x.remaining -= uint64(todo)
- }
- return
-}
-
-func (d *digest) initConfig(cfg *[Size]byte) {
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- for i := range d.h {
- d.h[i] = iv[i] ^ binary.LittleEndian.Uint64(cfg[i*8:])
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/register.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/register.go
deleted file mode 100644
index efd689af4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2b/register.go
+++ /dev/null
@@ -1,32 +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 file.
-
-// +build go1.9
-
-package blake2b
-
-import (
- "crypto"
- "hash"
-)
-
-func init() {
- newHash256 := func() hash.Hash {
- h, _ := New256(nil)
- return h
- }
- newHash384 := func() hash.Hash {
- h, _ := New384(nil)
- return h
- }
-
- newHash512 := func() hash.Hash {
- h, _ := New512(nil)
- return h
- }
-
- crypto.RegisterHash(crypto.BLAKE2b_256, newHash256)
- crypto.RegisterHash(crypto.BLAKE2b_384, newHash384)
- crypto.RegisterHash(crypto.BLAKE2b_512, newHash512)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s.go
deleted file mode 100644
index ae0dc922b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693
-// and the extendable output function (XOF) BLAKE2Xs.
-//
-// For a detailed specification of BLAKE2s see https://blake2.net/blake2.pdf
-// and for BLAKE2Xs see https://blake2.net/blake2x.pdf
-//
-// If you aren't sure which function you need, use BLAKE2s (Sum256 or New256).
-// If you need a secret-key MAC (message authentication code), use the New256
-// function with a non-nil key.
-//
-// BLAKE2X is a construction to compute hash values larger than 32 bytes. It
-// can produce hash values between 0 and 65535 bytes.
-package blake2s // import "golang.org/x/crypto/blake2s"
-
-import (
- "encoding/binary"
- "errors"
- "hash"
-)
-
-const (
- // The blocksize of BLAKE2s in bytes.
- BlockSize = 64
-
- // The hash size of BLAKE2s-256 in bytes.
- Size = 32
-
- // The hash size of BLAKE2s-128 in bytes.
- Size128 = 16
-)
-
-var errKeySize = errors.New("blake2s: invalid key size")
-
-var iv = [8]uint32{
- 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
- 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,
-}
-
-// Sum256 returns the BLAKE2s-256 checksum of the data.
-func Sum256(data []byte) [Size]byte {
- var sum [Size]byte
- checkSum(&sum, Size, data)
- return sum
-}
-
-// New256 returns a new hash.Hash computing the BLAKE2s-256 checksum. A non-nil
-// key turns the hash into a MAC. The key must between zero and 32 bytes long.
-func New256(key []byte) (hash.Hash, error) { return newDigest(Size, key) }
-
-// New128 returns a new hash.Hash computing the BLAKE2s-128 checksum given a
-// non-empty key. Note that a 128-bit digest is too small to be secure as a
-// cryptographic hash and should only be used as a MAC, thus the key argument
-// is not optional.
-func New128(key []byte) (hash.Hash, error) {
- if len(key) == 0 {
- return nil, errors.New("blake2s: a key is required for a 128-bit hash")
- }
- return newDigest(Size128, key)
-}
-
-func newDigest(hashSize int, key []byte) (*digest, error) {
- if len(key) > Size {
- return nil, errKeySize
- }
- d := &digest{
- size: hashSize,
- keyLen: len(key),
- }
- copy(d.key[:], key)
- d.Reset()
- return d, nil
-}
-
-func checkSum(sum *[Size]byte, hashSize int, data []byte) {
- var (
- h [8]uint32
- c [2]uint32
- )
-
- h = iv
- h[0] ^= uint32(hashSize) | (1 << 16) | (1 << 24)
-
- if length := len(data); length > BlockSize {
- n := length &^ (BlockSize - 1)
- if length == n {
- n -= BlockSize
- }
- hashBlocks(&h, &c, 0, data[:n])
- data = data[n:]
- }
-
- var block [BlockSize]byte
- offset := copy(block[:], data)
- remaining := uint32(BlockSize - offset)
-
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- hashBlocks(&h, &c, 0xFFFFFFFF, block[:])
-
- for i, v := range h {
- binary.LittleEndian.PutUint32(sum[4*i:], v)
- }
-}
-
-type digest struct {
- h [8]uint32
- c [2]uint32
- size int
- block [BlockSize]byte
- offset int
-
- key [BlockSize]byte
- keyLen int
-}
-
-func (d *digest) BlockSize() int { return BlockSize }
-
-func (d *digest) Size() int { return d.size }
-
-func (d *digest) Reset() {
- d.h = iv
- d.h[0] ^= uint32(d.size) | (uint32(d.keyLen) << 8) | (1 << 16) | (1 << 24)
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- if d.keyLen > 0 {
- d.block = d.key
- d.offset = BlockSize
- }
-}
-
-func (d *digest) Write(p []byte) (n int, err error) {
- n = len(p)
-
- if d.offset > 0 {
- remaining := BlockSize - d.offset
- if n <= remaining {
- d.offset += copy(d.block[d.offset:], p)
- return
- }
- copy(d.block[d.offset:], p[:remaining])
- hashBlocks(&d.h, &d.c, 0, d.block[:])
- d.offset = 0
- p = p[remaining:]
- }
-
- if length := len(p); length > BlockSize {
- nn := length &^ (BlockSize - 1)
- if length == nn {
- nn -= BlockSize
- }
- hashBlocks(&d.h, &d.c, 0, p[:nn])
- p = p[nn:]
- }
-
- d.offset += copy(d.block[:], p)
- return
-}
-
-func (d *digest) Sum(sum []byte) []byte {
- var hash [Size]byte
- d.finalize(&hash)
- return append(sum, hash[:d.size]...)
-}
-
-func (d *digest) finalize(hash *[Size]byte) {
- var block [BlockSize]byte
- h := d.h
- c := d.c
-
- copy(block[:], d.block[:d.offset])
- remaining := uint32(BlockSize - d.offset)
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- hashBlocks(&h, &c, 0xFFFFFFFF, block[:])
- for i, v := range h {
- binary.LittleEndian.PutUint32(hash[4*i:], v)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.go
deleted file mode 100644
index 45ae54614..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build 386,!gccgo,!appengine
-
-package blake2s
-
-var (
- useSSE4 = false
- useSSSE3 = supportSSSE3()
- useSSE2 = supportSSE2()
-)
-
-//go:noescape
-func supportSSE2() bool
-
-//go:noescape
-func supportSSSE3() bool
-
-//go:noescape
-func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-
-//go:noescape
-func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-
-func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) {
- if useSSSE3 {
- hashBlocksSSSE3(h, c, flag, blocks)
- } else if useSSE2 {
- hashBlocksSSE2(h, c, flag, blocks)
- } else {
- hashBlocksGeneric(h, c, flag, blocks)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.s
deleted file mode 100644
index 0bb65c70f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_386.s
+++ /dev/null
@@ -1,460 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build 386,!gccgo,!appengine
-
-#include "textflag.h"
-
-DATA iv0<>+0x00(SB)/4, $0x6a09e667
-DATA iv0<>+0x04(SB)/4, $0xbb67ae85
-DATA iv0<>+0x08(SB)/4, $0x3c6ef372
-DATA iv0<>+0x0c(SB)/4, $0xa54ff53a
-GLOBL iv0<>(SB), (NOPTR+RODATA), $16
-
-DATA iv1<>+0x00(SB)/4, $0x510e527f
-DATA iv1<>+0x04(SB)/4, $0x9b05688c
-DATA iv1<>+0x08(SB)/4, $0x1f83d9ab
-DATA iv1<>+0x0c(SB)/4, $0x5be0cd19
-GLOBL iv1<>(SB), (NOPTR+RODATA), $16
-
-DATA rol16<>+0x00(SB)/8, $0x0504070601000302
-DATA rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A
-GLOBL rol16<>(SB), (NOPTR+RODATA), $16
-
-DATA rol8<>+0x00(SB)/8, $0x0407060500030201
-DATA rol8<>+0x08(SB)/8, $0x0C0F0E0D080B0A09
-GLOBL rol8<>(SB), (NOPTR+RODATA), $16
-
-DATA counter<>+0x00(SB)/8, $0x40
-DATA counter<>+0x08(SB)/8, $0x0
-GLOBL counter<>(SB), (NOPTR+RODATA), $16
-
-#define ROTL_SSE2(n, t, v) \
- MOVO v, t; \
- PSLLL $n, t; \
- PSRLL $(32-n), v; \
- PXOR t, v
-
-#define ROTL_SSSE3(c, v) \
- PSHUFB c, v
-
-#define ROUND_SSE2(v0, v1, v2, v3, m0, m1, m2, m3, t) \
- PADDL m0, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(16, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m1, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(24, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v1, v1; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v3, v3; \
- PADDL m2, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(16, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m3, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(24, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v3, v3; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v1, v1
-
-#define ROUND_SSSE3(v0, v1, v2, v3, m0, m1, m2, m3, t, c16, c8) \
- PADDL m0, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c16, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m1, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c8, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v1, v1; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v3, v3; \
- PADDL m2, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c16, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m3, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c8, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v3, v3; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v1, v1
-
-#define PRECOMPUTE(dst, off, src, t) \
- MOVL 0*4(src), t; \
- MOVL t, 0*4+off+0(dst); \
- MOVL t, 9*4+off+64(dst); \
- MOVL t, 5*4+off+128(dst); \
- MOVL t, 14*4+off+192(dst); \
- MOVL t, 4*4+off+256(dst); \
- MOVL t, 2*4+off+320(dst); \
- MOVL t, 8*4+off+384(dst); \
- MOVL t, 12*4+off+448(dst); \
- MOVL t, 3*4+off+512(dst); \
- MOVL t, 15*4+off+576(dst); \
- MOVL 1*4(src), t; \
- MOVL t, 4*4+off+0(dst); \
- MOVL t, 8*4+off+64(dst); \
- MOVL t, 14*4+off+128(dst); \
- MOVL t, 5*4+off+192(dst); \
- MOVL t, 12*4+off+256(dst); \
- MOVL t, 11*4+off+320(dst); \
- MOVL t, 1*4+off+384(dst); \
- MOVL t, 6*4+off+448(dst); \
- MOVL t, 10*4+off+512(dst); \
- MOVL t, 3*4+off+576(dst); \
- MOVL 2*4(src), t; \
- MOVL t, 1*4+off+0(dst); \
- MOVL t, 13*4+off+64(dst); \
- MOVL t, 6*4+off+128(dst); \
- MOVL t, 8*4+off+192(dst); \
- MOVL t, 2*4+off+256(dst); \
- MOVL t, 0*4+off+320(dst); \
- MOVL t, 14*4+off+384(dst); \
- MOVL t, 11*4+off+448(dst); \
- MOVL t, 12*4+off+512(dst); \
- MOVL t, 4*4+off+576(dst); \
- MOVL 3*4(src), t; \
- MOVL t, 5*4+off+0(dst); \
- MOVL t, 15*4+off+64(dst); \
- MOVL t, 9*4+off+128(dst); \
- MOVL t, 1*4+off+192(dst); \
- MOVL t, 11*4+off+256(dst); \
- MOVL t, 7*4+off+320(dst); \
- MOVL t, 13*4+off+384(dst); \
- MOVL t, 3*4+off+448(dst); \
- MOVL t, 6*4+off+512(dst); \
- MOVL t, 10*4+off+576(dst); \
- MOVL 4*4(src), t; \
- MOVL t, 2*4+off+0(dst); \
- MOVL t, 1*4+off+64(dst); \
- MOVL t, 15*4+off+128(dst); \
- MOVL t, 10*4+off+192(dst); \
- MOVL t, 6*4+off+256(dst); \
- MOVL t, 8*4+off+320(dst); \
- MOVL t, 3*4+off+384(dst); \
- MOVL t, 13*4+off+448(dst); \
- MOVL t, 14*4+off+512(dst); \
- MOVL t, 5*4+off+576(dst); \
- MOVL 5*4(src), t; \
- MOVL t, 6*4+off+0(dst); \
- MOVL t, 11*4+off+64(dst); \
- MOVL t, 2*4+off+128(dst); \
- MOVL t, 9*4+off+192(dst); \
- MOVL t, 1*4+off+256(dst); \
- MOVL t, 13*4+off+320(dst); \
- MOVL t, 4*4+off+384(dst); \
- MOVL t, 8*4+off+448(dst); \
- MOVL t, 15*4+off+512(dst); \
- MOVL t, 7*4+off+576(dst); \
- MOVL 6*4(src), t; \
- MOVL t, 3*4+off+0(dst); \
- MOVL t, 7*4+off+64(dst); \
- MOVL t, 13*4+off+128(dst); \
- MOVL t, 12*4+off+192(dst); \
- MOVL t, 10*4+off+256(dst); \
- MOVL t, 1*4+off+320(dst); \
- MOVL t, 9*4+off+384(dst); \
- MOVL t, 14*4+off+448(dst); \
- MOVL t, 0*4+off+512(dst); \
- MOVL t, 6*4+off+576(dst); \
- MOVL 7*4(src), t; \
- MOVL t, 7*4+off+0(dst); \
- MOVL t, 14*4+off+64(dst); \
- MOVL t, 10*4+off+128(dst); \
- MOVL t, 0*4+off+192(dst); \
- MOVL t, 5*4+off+256(dst); \
- MOVL t, 9*4+off+320(dst); \
- MOVL t, 12*4+off+384(dst); \
- MOVL t, 1*4+off+448(dst); \
- MOVL t, 13*4+off+512(dst); \
- MOVL t, 2*4+off+576(dst); \
- MOVL 8*4(src), t; \
- MOVL t, 8*4+off+0(dst); \
- MOVL t, 5*4+off+64(dst); \
- MOVL t, 4*4+off+128(dst); \
- MOVL t, 15*4+off+192(dst); \
- MOVL t, 14*4+off+256(dst); \
- MOVL t, 3*4+off+320(dst); \
- MOVL t, 11*4+off+384(dst); \
- MOVL t, 10*4+off+448(dst); \
- MOVL t, 7*4+off+512(dst); \
- MOVL t, 1*4+off+576(dst); \
- MOVL 9*4(src), t; \
- MOVL t, 12*4+off+0(dst); \
- MOVL t, 2*4+off+64(dst); \
- MOVL t, 11*4+off+128(dst); \
- MOVL t, 4*4+off+192(dst); \
- MOVL t, 0*4+off+256(dst); \
- MOVL t, 15*4+off+320(dst); \
- MOVL t, 10*4+off+384(dst); \
- MOVL t, 7*4+off+448(dst); \
- MOVL t, 5*4+off+512(dst); \
- MOVL t, 9*4+off+576(dst); \
- MOVL 10*4(src), t; \
- MOVL t, 9*4+off+0(dst); \
- MOVL t, 4*4+off+64(dst); \
- MOVL t, 8*4+off+128(dst); \
- MOVL t, 13*4+off+192(dst); \
- MOVL t, 3*4+off+256(dst); \
- MOVL t, 5*4+off+320(dst); \
- MOVL t, 7*4+off+384(dst); \
- MOVL t, 15*4+off+448(dst); \
- MOVL t, 11*4+off+512(dst); \
- MOVL t, 0*4+off+576(dst); \
- MOVL 11*4(src), t; \
- MOVL t, 13*4+off+0(dst); \
- MOVL t, 10*4+off+64(dst); \
- MOVL t, 0*4+off+128(dst); \
- MOVL t, 3*4+off+192(dst); \
- MOVL t, 9*4+off+256(dst); \
- MOVL t, 6*4+off+320(dst); \
- MOVL t, 15*4+off+384(dst); \
- MOVL t, 4*4+off+448(dst); \
- MOVL t, 2*4+off+512(dst); \
- MOVL t, 12*4+off+576(dst); \
- MOVL 12*4(src), t; \
- MOVL t, 10*4+off+0(dst); \
- MOVL t, 12*4+off+64(dst); \
- MOVL t, 1*4+off+128(dst); \
- MOVL t, 6*4+off+192(dst); \
- MOVL t, 13*4+off+256(dst); \
- MOVL t, 4*4+off+320(dst); \
- MOVL t, 0*4+off+384(dst); \
- MOVL t, 2*4+off+448(dst); \
- MOVL t, 8*4+off+512(dst); \
- MOVL t, 14*4+off+576(dst); \
- MOVL 13*4(src), t; \
- MOVL t, 14*4+off+0(dst); \
- MOVL t, 3*4+off+64(dst); \
- MOVL t, 7*4+off+128(dst); \
- MOVL t, 2*4+off+192(dst); \
- MOVL t, 15*4+off+256(dst); \
- MOVL t, 12*4+off+320(dst); \
- MOVL t, 6*4+off+384(dst); \
- MOVL t, 0*4+off+448(dst); \
- MOVL t, 9*4+off+512(dst); \
- MOVL t, 11*4+off+576(dst); \
- MOVL 14*4(src), t; \
- MOVL t, 11*4+off+0(dst); \
- MOVL t, 0*4+off+64(dst); \
- MOVL t, 12*4+off+128(dst); \
- MOVL t, 7*4+off+192(dst); \
- MOVL t, 8*4+off+256(dst); \
- MOVL t, 14*4+off+320(dst); \
- MOVL t, 2*4+off+384(dst); \
- MOVL t, 5*4+off+448(dst); \
- MOVL t, 1*4+off+512(dst); \
- MOVL t, 13*4+off+576(dst); \
- MOVL 15*4(src), t; \
- MOVL t, 15*4+off+0(dst); \
- MOVL t, 6*4+off+64(dst); \
- MOVL t, 3*4+off+128(dst); \
- MOVL t, 11*4+off+192(dst); \
- MOVL t, 7*4+off+256(dst); \
- MOVL t, 10*4+off+320(dst); \
- MOVL t, 5*4+off+384(dst); \
- MOVL t, 9*4+off+448(dst); \
- MOVL t, 4*4+off+512(dst); \
- MOVL t, 8*4+off+576(dst)
-
-// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-TEXT ·hashBlocksSSE2(SB), 0, $672-24 // frame = 656 + 16 byte alignment
- MOVL h+0(FP), AX
- MOVL c+4(FP), BX
- MOVL flag+8(FP), CX
- MOVL blocks_base+12(FP), SI
- MOVL blocks_len+16(FP), DX
-
- MOVL SP, BP
- MOVL SP, DI
- ADDL $15, DI
- ANDL $~15, DI
- MOVL DI, SP
-
- MOVL CX, 8(SP)
- MOVL 0(BX), CX
- MOVL CX, 0(SP)
- MOVL 4(BX), CX
- MOVL CX, 4(SP)
- XORL CX, CX
- MOVL CX, 12(SP)
-
- MOVOU 0(AX), X0
- MOVOU 16(AX), X1
- MOVOU counter<>(SB), X2
-
-loop:
- MOVO X0, X4
- MOVO X1, X5
- MOVOU iv0<>(SB), X6
- MOVOU iv1<>(SB), X7
-
- MOVO 0(SP), X3
- PADDQ X2, X3
- PXOR X3, X7
- MOVO X3, 0(SP)
-
- PRECOMPUTE(SP, 16, SI, CX)
- ROUND_SSE2(X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+64(SP), 32+64(SP), 48+64(SP), 64+64(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+128(SP), 32+128(SP), 48+128(SP), 64+128(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+192(SP), 32+192(SP), 48+192(SP), 64+192(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+256(SP), 32+256(SP), 48+256(SP), 64+256(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+320(SP), 32+320(SP), 48+320(SP), 64+320(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+384(SP), 32+384(SP), 48+384(SP), 64+384(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+448(SP), 32+448(SP), 48+448(SP), 64+448(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+512(SP), 32+512(SP), 48+512(SP), 64+512(SP), X3)
- ROUND_SSE2(X4, X5, X6, X7, 16+576(SP), 32+576(SP), 48+576(SP), 64+576(SP), X3)
-
- PXOR X4, X0
- PXOR X5, X1
- PXOR X6, X0
- PXOR X7, X1
-
- LEAL 64(SI), SI
- SUBL $64, DX
- JNE loop
-
- MOVL 0(SP), CX
- MOVL CX, 0(BX)
- MOVL 4(SP), CX
- MOVL CX, 4(BX)
-
- MOVOU X0, 0(AX)
- MOVOU X1, 16(AX)
-
- MOVL BP, SP
- RET
-
-// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-TEXT ·hashBlocksSSSE3(SB), 0, $704-24 // frame = 688 + 16 byte alignment
- MOVL h+0(FP), AX
- MOVL c+4(FP), BX
- MOVL flag+8(FP), CX
- MOVL blocks_base+12(FP), SI
- MOVL blocks_len+16(FP), DX
-
- MOVL SP, BP
- MOVL SP, DI
- ADDL $15, DI
- ANDL $~15, DI
- MOVL DI, SP
-
- MOVL CX, 8(SP)
- MOVL 0(BX), CX
- MOVL CX, 0(SP)
- MOVL 4(BX), CX
- MOVL CX, 4(SP)
- XORL CX, CX
- MOVL CX, 12(SP)
-
- MOVOU 0(AX), X0
- MOVOU 16(AX), X1
- MOVOU counter<>(SB), X2
-
-loop:
- MOVO X0, 656(SP)
- MOVO X1, 672(SP)
- MOVO X0, X4
- MOVO X1, X5
- MOVOU iv0<>(SB), X6
- MOVOU iv1<>(SB), X7
-
- MOVO 0(SP), X3
- PADDQ X2, X3
- PXOR X3, X7
- MOVO X3, 0(SP)
-
- MOVOU rol16<>(SB), X0
- MOVOU rol8<>(SB), X1
-
- PRECOMPUTE(SP, 16, SI, CX)
- ROUND_SSSE3(X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+64(SP), 32+64(SP), 48+64(SP), 64+64(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+128(SP), 32+128(SP), 48+128(SP), 64+128(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+192(SP), 32+192(SP), 48+192(SP), 64+192(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+256(SP), 32+256(SP), 48+256(SP), 64+256(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+320(SP), 32+320(SP), 48+320(SP), 64+320(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+384(SP), 32+384(SP), 48+384(SP), 64+384(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+448(SP), 32+448(SP), 48+448(SP), 64+448(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+512(SP), 32+512(SP), 48+512(SP), 64+512(SP), X3, X0, X1)
- ROUND_SSSE3(X4, X5, X6, X7, 16+576(SP), 32+576(SP), 48+576(SP), 64+576(SP), X3, X0, X1)
-
- MOVO 656(SP), X0
- MOVO 672(SP), X1
- PXOR X4, X0
- PXOR X5, X1
- PXOR X6, X0
- PXOR X7, X1
-
- LEAL 64(SI), SI
- SUBL $64, DX
- JNE loop
-
- MOVL 0(SP), CX
- MOVL CX, 0(BX)
- MOVL 4(SP), CX
- MOVL CX, 4(BX)
-
- MOVOU X0, 0(AX)
- MOVOU X1, 16(AX)
-
- MOVL BP, SP
- RET
-
-// func supportSSSE3() bool
-TEXT ·supportSSSE3(SB), 4, $0-1
- MOVL $1, AX
- CPUID
- MOVL CX, BX
- ANDL $0x1, BX // supports SSE3
- JZ FALSE
- ANDL $0x200, CX // supports SSSE3
- JZ FALSE
- MOVB $1, ret+0(FP)
- RET
-
-FALSE:
- MOVB $0, ret+0(FP)
- RET
-
-// func supportSSE2() bool
-TEXT ·supportSSE2(SB), 4, $0-1
- MOVL $1, AX
- CPUID
- SHRL $26, DX
- ANDL $1, DX // DX != 0 if support SSE2
- MOVB DX, ret+0(FP)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go
deleted file mode 100644
index a925e6b20..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-package blake2s
-
-var (
- useSSE4 = supportSSE4()
- useSSSE3 = supportSSSE3()
- useSSE2 = true // Always available on amd64
-)
-
-//go:noescape
-func supportSSSE3() bool
-
-//go:noescape
-func supportSSE4() bool
-
-//go:noescape
-func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-
-//go:noescape
-func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-
-//go:noescape
-func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-
-func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) {
- if useSSE4 {
- hashBlocksSSE4(h, c, flag, blocks)
- } else if useSSSE3 {
- hashBlocksSSSE3(h, c, flag, blocks)
- } else if useSSE2 {
- hashBlocksSSE2(h, c, flag, blocks)
- } else {
- hashBlocksGeneric(h, c, flag, blocks)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s
deleted file mode 100644
index 6cdf5a94c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s
+++ /dev/null
@@ -1,463 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-#include "textflag.h"
-
-DATA iv0<>+0x00(SB)/4, $0x6a09e667
-DATA iv0<>+0x04(SB)/4, $0xbb67ae85
-DATA iv0<>+0x08(SB)/4, $0x3c6ef372
-DATA iv0<>+0x0c(SB)/4, $0xa54ff53a
-GLOBL iv0<>(SB), (NOPTR+RODATA), $16
-
-DATA iv1<>+0x00(SB)/4, $0x510e527f
-DATA iv1<>+0x04(SB)/4, $0x9b05688c
-DATA iv1<>+0x08(SB)/4, $0x1f83d9ab
-DATA iv1<>+0x0c(SB)/4, $0x5be0cd19
-GLOBL iv1<>(SB), (NOPTR+RODATA), $16
-
-DATA rol16<>+0x00(SB)/8, $0x0504070601000302
-DATA rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A
-GLOBL rol16<>(SB), (NOPTR+RODATA), $16
-
-DATA rol8<>+0x00(SB)/8, $0x0407060500030201
-DATA rol8<>+0x08(SB)/8, $0x0C0F0E0D080B0A09
-GLOBL rol8<>(SB), (NOPTR+RODATA), $16
-
-DATA counter<>+0x00(SB)/8, $0x40
-DATA counter<>+0x08(SB)/8, $0x0
-GLOBL counter<>(SB), (NOPTR+RODATA), $16
-
-#define ROTL_SSE2(n, t, v) \
- MOVO v, t; \
- PSLLL $n, t; \
- PSRLL $(32-n), v; \
- PXOR t, v
-
-#define ROTL_SSSE3(c, v) \
- PSHUFB c, v
-
-#define ROUND_SSE2(v0, v1, v2, v3, m0, m1, m2, m3, t) \
- PADDL m0, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(16, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m1, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(24, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v1, v1; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v3, v3; \
- PADDL m2, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(16, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m3, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSE2(24, t, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v3, v3; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v1, v1
-
-#define ROUND_SSSE3(v0, v1, v2, v3, m0, m1, m2, m3, t, c16, c8) \
- PADDL m0, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c16, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m1, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c8, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v1, v1; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v3, v3; \
- PADDL m2, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c16, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(20, t, v1); \
- PADDL m3, v0; \
- PADDL v1, v0; \
- PXOR v0, v3; \
- ROTL_SSSE3(c8, v3); \
- PADDL v3, v2; \
- PXOR v2, v1; \
- ROTL_SSE2(25, t, v1); \
- PSHUFL $0x39, v3, v3; \
- PSHUFL $0x4E, v2, v2; \
- PSHUFL $0x93, v1, v1
-
-
-#define LOAD_MSG_SSE4(m0, m1, m2, m3, src, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15) \
- MOVL i0*4(src), m0; \
- PINSRD $1, i1*4(src), m0; \
- PINSRD $2, i2*4(src), m0; \
- PINSRD $3, i3*4(src), m0; \
- MOVL i4*4(src), m1; \
- PINSRD $1, i5*4(src), m1; \
- PINSRD $2, i6*4(src), m1; \
- PINSRD $3, i7*4(src), m1; \
- MOVL i8*4(src), m2; \
- PINSRD $1, i9*4(src), m2; \
- PINSRD $2, i10*4(src), m2; \
- PINSRD $3, i11*4(src), m2; \
- MOVL i12*4(src), m3; \
- PINSRD $1, i13*4(src), m3; \
- PINSRD $2, i14*4(src), m3; \
- PINSRD $3, i15*4(src), m3
-
-#define PRECOMPUTE_MSG(dst, off, src, R8, R9, R10, R11, R12, R13, R14, R15) \
- MOVQ 0*4(src), R8; \
- MOVQ 2*4(src), R9; \
- MOVQ 4*4(src), R10; \
- MOVQ 6*4(src), R11; \
- MOVQ 8*4(src), R12; \
- MOVQ 10*4(src), R13; \
- MOVQ 12*4(src), R14; \
- MOVQ 14*4(src), R15; \
- \
- MOVL R8, 0*4+off+0(dst); \
- MOVL R8, 9*4+off+64(dst); \
- MOVL R8, 5*4+off+128(dst); \
- MOVL R8, 14*4+off+192(dst); \
- MOVL R8, 4*4+off+256(dst); \
- MOVL R8, 2*4+off+320(dst); \
- MOVL R8, 8*4+off+384(dst); \
- MOVL R8, 12*4+off+448(dst); \
- MOVL R8, 3*4+off+512(dst); \
- MOVL R8, 15*4+off+576(dst); \
- SHRQ $32, R8; \
- MOVL R8, 4*4+off+0(dst); \
- MOVL R8, 8*4+off+64(dst); \
- MOVL R8, 14*4+off+128(dst); \
- MOVL R8, 5*4+off+192(dst); \
- MOVL R8, 12*4+off+256(dst); \
- MOVL R8, 11*4+off+320(dst); \
- MOVL R8, 1*4+off+384(dst); \
- MOVL R8, 6*4+off+448(dst); \
- MOVL R8, 10*4+off+512(dst); \
- MOVL R8, 3*4+off+576(dst); \
- \
- MOVL R9, 1*4+off+0(dst); \
- MOVL R9, 13*4+off+64(dst); \
- MOVL R9, 6*4+off+128(dst); \
- MOVL R9, 8*4+off+192(dst); \
- MOVL R9, 2*4+off+256(dst); \
- MOVL R9, 0*4+off+320(dst); \
- MOVL R9, 14*4+off+384(dst); \
- MOVL R9, 11*4+off+448(dst); \
- MOVL R9, 12*4+off+512(dst); \
- MOVL R9, 4*4+off+576(dst); \
- SHRQ $32, R9; \
- MOVL R9, 5*4+off+0(dst); \
- MOVL R9, 15*4+off+64(dst); \
- MOVL R9, 9*4+off+128(dst); \
- MOVL R9, 1*4+off+192(dst); \
- MOVL R9, 11*4+off+256(dst); \
- MOVL R9, 7*4+off+320(dst); \
- MOVL R9, 13*4+off+384(dst); \
- MOVL R9, 3*4+off+448(dst); \
- MOVL R9, 6*4+off+512(dst); \
- MOVL R9, 10*4+off+576(dst); \
- \
- MOVL R10, 2*4+off+0(dst); \
- MOVL R10, 1*4+off+64(dst); \
- MOVL R10, 15*4+off+128(dst); \
- MOVL R10, 10*4+off+192(dst); \
- MOVL R10, 6*4+off+256(dst); \
- MOVL R10, 8*4+off+320(dst); \
- MOVL R10, 3*4+off+384(dst); \
- MOVL R10, 13*4+off+448(dst); \
- MOVL R10, 14*4+off+512(dst); \
- MOVL R10, 5*4+off+576(dst); \
- SHRQ $32, R10; \
- MOVL R10, 6*4+off+0(dst); \
- MOVL R10, 11*4+off+64(dst); \
- MOVL R10, 2*4+off+128(dst); \
- MOVL R10, 9*4+off+192(dst); \
- MOVL R10, 1*4+off+256(dst); \
- MOVL R10, 13*4+off+320(dst); \
- MOVL R10, 4*4+off+384(dst); \
- MOVL R10, 8*4+off+448(dst); \
- MOVL R10, 15*4+off+512(dst); \
- MOVL R10, 7*4+off+576(dst); \
- \
- MOVL R11, 3*4+off+0(dst); \
- MOVL R11, 7*4+off+64(dst); \
- MOVL R11, 13*4+off+128(dst); \
- MOVL R11, 12*4+off+192(dst); \
- MOVL R11, 10*4+off+256(dst); \
- MOVL R11, 1*4+off+320(dst); \
- MOVL R11, 9*4+off+384(dst); \
- MOVL R11, 14*4+off+448(dst); \
- MOVL R11, 0*4+off+512(dst); \
- MOVL R11, 6*4+off+576(dst); \
- SHRQ $32, R11; \
- MOVL R11, 7*4+off+0(dst); \
- MOVL R11, 14*4+off+64(dst); \
- MOVL R11, 10*4+off+128(dst); \
- MOVL R11, 0*4+off+192(dst); \
- MOVL R11, 5*4+off+256(dst); \
- MOVL R11, 9*4+off+320(dst); \
- MOVL R11, 12*4+off+384(dst); \
- MOVL R11, 1*4+off+448(dst); \
- MOVL R11, 13*4+off+512(dst); \
- MOVL R11, 2*4+off+576(dst); \
- \
- MOVL R12, 8*4+off+0(dst); \
- MOVL R12, 5*4+off+64(dst); \
- MOVL R12, 4*4+off+128(dst); \
- MOVL R12, 15*4+off+192(dst); \
- MOVL R12, 14*4+off+256(dst); \
- MOVL R12, 3*4+off+320(dst); \
- MOVL R12, 11*4+off+384(dst); \
- MOVL R12, 10*4+off+448(dst); \
- MOVL R12, 7*4+off+512(dst); \
- MOVL R12, 1*4+off+576(dst); \
- SHRQ $32, R12; \
- MOVL R12, 12*4+off+0(dst); \
- MOVL R12, 2*4+off+64(dst); \
- MOVL R12, 11*4+off+128(dst); \
- MOVL R12, 4*4+off+192(dst); \
- MOVL R12, 0*4+off+256(dst); \
- MOVL R12, 15*4+off+320(dst); \
- MOVL R12, 10*4+off+384(dst); \
- MOVL R12, 7*4+off+448(dst); \
- MOVL R12, 5*4+off+512(dst); \
- MOVL R12, 9*4+off+576(dst); \
- \
- MOVL R13, 9*4+off+0(dst); \
- MOVL R13, 4*4+off+64(dst); \
- MOVL R13, 8*4+off+128(dst); \
- MOVL R13, 13*4+off+192(dst); \
- MOVL R13, 3*4+off+256(dst); \
- MOVL R13, 5*4+off+320(dst); \
- MOVL R13, 7*4+off+384(dst); \
- MOVL R13, 15*4+off+448(dst); \
- MOVL R13, 11*4+off+512(dst); \
- MOVL R13, 0*4+off+576(dst); \
- SHRQ $32, R13; \
- MOVL R13, 13*4+off+0(dst); \
- MOVL R13, 10*4+off+64(dst); \
- MOVL R13, 0*4+off+128(dst); \
- MOVL R13, 3*4+off+192(dst); \
- MOVL R13, 9*4+off+256(dst); \
- MOVL R13, 6*4+off+320(dst); \
- MOVL R13, 15*4+off+384(dst); \
- MOVL R13, 4*4+off+448(dst); \
- MOVL R13, 2*4+off+512(dst); \
- MOVL R13, 12*4+off+576(dst); \
- \
- MOVL R14, 10*4+off+0(dst); \
- MOVL R14, 12*4+off+64(dst); \
- MOVL R14, 1*4+off+128(dst); \
- MOVL R14, 6*4+off+192(dst); \
- MOVL R14, 13*4+off+256(dst); \
- MOVL R14, 4*4+off+320(dst); \
- MOVL R14, 0*4+off+384(dst); \
- MOVL R14, 2*4+off+448(dst); \
- MOVL R14, 8*4+off+512(dst); \
- MOVL R14, 14*4+off+576(dst); \
- SHRQ $32, R14; \
- MOVL R14, 14*4+off+0(dst); \
- MOVL R14, 3*4+off+64(dst); \
- MOVL R14, 7*4+off+128(dst); \
- MOVL R14, 2*4+off+192(dst); \
- MOVL R14, 15*4+off+256(dst); \
- MOVL R14, 12*4+off+320(dst); \
- MOVL R14, 6*4+off+384(dst); \
- MOVL R14, 0*4+off+448(dst); \
- MOVL R14, 9*4+off+512(dst); \
- MOVL R14, 11*4+off+576(dst); \
- \
- MOVL R15, 11*4+off+0(dst); \
- MOVL R15, 0*4+off+64(dst); \
- MOVL R15, 12*4+off+128(dst); \
- MOVL R15, 7*4+off+192(dst); \
- MOVL R15, 8*4+off+256(dst); \
- MOVL R15, 14*4+off+320(dst); \
- MOVL R15, 2*4+off+384(dst); \
- MOVL R15, 5*4+off+448(dst); \
- MOVL R15, 1*4+off+512(dst); \
- MOVL R15, 13*4+off+576(dst); \
- SHRQ $32, R15; \
- MOVL R15, 15*4+off+0(dst); \
- MOVL R15, 6*4+off+64(dst); \
- MOVL R15, 3*4+off+128(dst); \
- MOVL R15, 11*4+off+192(dst); \
- MOVL R15, 7*4+off+256(dst); \
- MOVL R15, 10*4+off+320(dst); \
- MOVL R15, 5*4+off+384(dst); \
- MOVL R15, 9*4+off+448(dst); \
- MOVL R15, 4*4+off+512(dst); \
- MOVL R15, 8*4+off+576(dst)
-
-#define BLAKE2s_SSE2() \
- PRECOMPUTE_MSG(SP, 16, SI, R8, R9, R10, R11, R12, R13, R14, R15); \
- ROUND_SSE2(X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+64(SP), 32+64(SP), 48+64(SP), 64+64(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+128(SP), 32+128(SP), 48+128(SP), 64+128(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+192(SP), 32+192(SP), 48+192(SP), 64+192(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+256(SP), 32+256(SP), 48+256(SP), 64+256(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+320(SP), 32+320(SP), 48+320(SP), 64+320(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+384(SP), 32+384(SP), 48+384(SP), 64+384(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+448(SP), 32+448(SP), 48+448(SP), 64+448(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+512(SP), 32+512(SP), 48+512(SP), 64+512(SP), X8); \
- ROUND_SSE2(X4, X5, X6, X7, 16+576(SP), 32+576(SP), 48+576(SP), 64+576(SP), X8)
-
-#define BLAKE2s_SSSE3() \
- PRECOMPUTE_MSG(SP, 16, SI, R8, R9, R10, R11, R12, R13, R14, R15); \
- ROUND_SSSE3(X4, X5, X6, X7, 16(SP), 32(SP), 48(SP), 64(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+64(SP), 32+64(SP), 48+64(SP), 64+64(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+128(SP), 32+128(SP), 48+128(SP), 64+128(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+192(SP), 32+192(SP), 48+192(SP), 64+192(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+256(SP), 32+256(SP), 48+256(SP), 64+256(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+320(SP), 32+320(SP), 48+320(SP), 64+320(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+384(SP), 32+384(SP), 48+384(SP), 64+384(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+448(SP), 32+448(SP), 48+448(SP), 64+448(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+512(SP), 32+512(SP), 48+512(SP), 64+512(SP), X8, X13, X14); \
- ROUND_SSSE3(X4, X5, X6, X7, 16+576(SP), 32+576(SP), 48+576(SP), 64+576(SP), X8, X13, X14)
-
-#define BLAKE2s_SSE4() \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14); \
- LOAD_MSG_SSE4(X8, X9, X10, X11, SI, 10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0); \
- ROUND_SSSE3(X4, X5, X6, X7, X8, X9, X10, X11, X8, X13, X14)
-
-#define HASH_BLOCKS(h, c, flag, blocks_base, blocks_len, BLAKE2s_FUNC) \
- MOVQ h, AX; \
- MOVQ c, BX; \
- MOVL flag, CX; \
- MOVQ blocks_base, SI; \
- MOVQ blocks_len, DX; \
- \
- MOVQ SP, BP; \
- MOVQ SP, R9; \
- ADDQ $15, R9; \
- ANDQ $~15, R9; \
- MOVQ R9, SP; \
- \
- MOVQ 0(BX), R9; \
- MOVQ R9, 0(SP); \
- XORQ R9, R9; \
- MOVQ R9, 8(SP); \
- MOVL CX, 8(SP); \
- \
- MOVOU 0(AX), X0; \
- MOVOU 16(AX), X1; \
- MOVOU iv0<>(SB), X2; \
- MOVOU iv1<>(SB), X3 \
- \
- MOVOU counter<>(SB), X12; \
- MOVOU rol16<>(SB), X13; \
- MOVOU rol8<>(SB), X14; \
- MOVO 0(SP), X15; \
- \
- loop: \
- MOVO X0, X4; \
- MOVO X1, X5; \
- MOVO X2, X6; \
- MOVO X3, X7; \
- \
- PADDQ X12, X15; \
- PXOR X15, X7; \
- \
- BLAKE2s_FUNC(); \
- \
- PXOR X4, X0; \
- PXOR X5, X1; \
- PXOR X6, X0; \
- PXOR X7, X1; \
- \
- LEAQ 64(SI), SI; \
- SUBQ $64, DX; \
- JNE loop; \
- \
- MOVO X15, 0(SP); \
- MOVQ 0(SP), R9; \
- MOVQ R9, 0(BX); \
- \
- MOVOU X0, 0(AX); \
- MOVOU X1, 16(AX); \
- \
- MOVQ BP, SP
-
-// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-TEXT ·hashBlocksSSE2(SB), 0, $672-48 // frame = 656 + 16 byte alignment
- HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE2)
- RET
-
-// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-TEXT ·hashBlocksSSSE3(SB), 0, $672-48 // frame = 656 + 16 byte alignment
- HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSSE3)
- RET
-
-// func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
-TEXT ·hashBlocksSSE4(SB), 0, $32-48 // frame = 16 + 16 byte alignment
- HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE4)
- RET
-
-// func supportSSE4() bool
-TEXT ·supportSSE4(SB), 4, $0-1
- MOVL $1, AX
- CPUID
- SHRL $19, CX // Bit 19 indicates SSE4.1.
- ANDL $1, CX
- MOVB CX, ret+0(FP)
- RET
-
-// func supportSSSE3() bool
-TEXT ·supportSSSE3(SB), 4, $0-1
- MOVL $1, AX
- CPUID
- MOVL CX, BX
- ANDL $0x1, BX // Bit zero indicates SSE3 support.
- JZ FALSE
- ANDL $0x200, CX // Bit nine indicates SSSE3 support.
- JZ FALSE
- MOVB $1, ret+0(FP)
- RET
-
-FALSE:
- MOVB $0, ret+0(FP)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go
deleted file mode 100644
index f7e065378..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2016 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 file.
-
-package blake2s
-
-// the precomputed values for BLAKE2s
-// there are 10 16-byte arrays - one for each round
-// the entries are calculated from the sigma constants.
-var precomputed = [10][16]byte{
- {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15},
- {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3},
- {11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4},
- {7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8},
- {9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13},
- {2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9},
- {12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11},
- {13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10},
- {6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5},
- {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0},
-}
-
-func hashBlocksGeneric(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) {
- var m [16]uint32
- c0, c1 := c[0], c[1]
-
- for i := 0; i < len(blocks); {
- c0 += BlockSize
- if c0 < BlockSize {
- c1++
- }
-
- v0, v1, v2, v3, v4, v5, v6, v7 := h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
- v8, v9, v10, v11, v12, v13, v14, v15 := iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7]
- v12 ^= c0
- v13 ^= c1
- v14 ^= flag
-
- for j := range m {
- m[j] = uint32(blocks[i]) | uint32(blocks[i+1])<<8 | uint32(blocks[i+2])<<16 | uint32(blocks[i+3])<<24
- i += 4
- }
-
- for k := range precomputed {
- s := &(precomputed[k])
-
- v0 += m[s[0]]
- v0 += v4
- v12 ^= v0
- v12 = v12<<(32-16) | v12>>16
- v8 += v12
- v4 ^= v8
- v4 = v4<<(32-12) | v4>>12
- v1 += m[s[1]]
- v1 += v5
- v13 ^= v1
- v13 = v13<<(32-16) | v13>>16
- v9 += v13
- v5 ^= v9
- v5 = v5<<(32-12) | v5>>12
- v2 += m[s[2]]
- v2 += v6
- v14 ^= v2
- v14 = v14<<(32-16) | v14>>16
- v10 += v14
- v6 ^= v10
- v6 = v6<<(32-12) | v6>>12
- v3 += m[s[3]]
- v3 += v7
- v15 ^= v3
- v15 = v15<<(32-16) | v15>>16
- v11 += v15
- v7 ^= v11
- v7 = v7<<(32-12) | v7>>12
-
- v0 += m[s[4]]
- v0 += v4
- v12 ^= v0
- v12 = v12<<(32-8) | v12>>8
- v8 += v12
- v4 ^= v8
- v4 = v4<<(32-7) | v4>>7
- v1 += m[s[5]]
- v1 += v5
- v13 ^= v1
- v13 = v13<<(32-8) | v13>>8
- v9 += v13
- v5 ^= v9
- v5 = v5<<(32-7) | v5>>7
- v2 += m[s[6]]
- v2 += v6
- v14 ^= v2
- v14 = v14<<(32-8) | v14>>8
- v10 += v14
- v6 ^= v10
- v6 = v6<<(32-7) | v6>>7
- v3 += m[s[7]]
- v3 += v7
- v15 ^= v3
- v15 = v15<<(32-8) | v15>>8
- v11 += v15
- v7 ^= v11
- v7 = v7<<(32-7) | v7>>7
-
- v0 += m[s[8]]
- v0 += v5
- v15 ^= v0
- v15 = v15<<(32-16) | v15>>16
- v10 += v15
- v5 ^= v10
- v5 = v5<<(32-12) | v5>>12
- v1 += m[s[9]]
- v1 += v6
- v12 ^= v1
- v12 = v12<<(32-16) | v12>>16
- v11 += v12
- v6 ^= v11
- v6 = v6<<(32-12) | v6>>12
- v2 += m[s[10]]
- v2 += v7
- v13 ^= v2
- v13 = v13<<(32-16) | v13>>16
- v8 += v13
- v7 ^= v8
- v7 = v7<<(32-12) | v7>>12
- v3 += m[s[11]]
- v3 += v4
- v14 ^= v3
- v14 = v14<<(32-16) | v14>>16
- v9 += v14
- v4 ^= v9
- v4 = v4<<(32-12) | v4>>12
-
- v0 += m[s[12]]
- v0 += v5
- v15 ^= v0
- v15 = v15<<(32-8) | v15>>8
- v10 += v15
- v5 ^= v10
- v5 = v5<<(32-7) | v5>>7
- v1 += m[s[13]]
- v1 += v6
- v12 ^= v1
- v12 = v12<<(32-8) | v12>>8
- v11 += v12
- v6 ^= v11
- v6 = v6<<(32-7) | v6>>7
- v2 += m[s[14]]
- v2 += v7
- v13 ^= v2
- v13 = v13<<(32-8) | v13>>8
- v8 += v13
- v7 ^= v8
- v7 = v7<<(32-7) | v7>>7
- v3 += m[s[15]]
- v3 += v4
- v14 ^= v3
- v14 = v14<<(32-8) | v14>>8
- v9 += v14
- v4 ^= v9
- v4 = v4<<(32-7) | v4>>7
- }
-
- h[0] ^= v0 ^ v8
- h[1] ^= v1 ^ v9
- h[2] ^= v2 ^ v10
- h[3] ^= v3 ^ v11
- h[4] ^= v4 ^ v12
- h[5] ^= v5 ^ v13
- h[6] ^= v6 ^ v14
- h[7] ^= v7 ^ v15
- }
- c[0], c[1] = c0, c1
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go
deleted file mode 100644
index a31127345..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !amd64,!386 gccgo appengine
-
-package blake2s
-
-var (
- useSSE4 = false
- useSSSE3 = false
- useSSE2 = false
-)
-
-func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) {
- hashBlocksGeneric(h, c, flag, blocks)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_test.go
deleted file mode 100644
index cfeb18bb4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2s_test.go
+++ /dev/null
@@ -1,1002 +0,0 @@
-// Copyright 2016 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 file.
-
-package blake2s
-
-import (
- "encoding/hex"
- "fmt"
- "testing"
-)
-
-func TestHashes(t *testing.T) {
- defer func(sse2, ssse3, sse4 bool) {
- useSSE2, useSSSE3, useSSE4 = sse2, ssse3, sse4
- }(useSSE2, useSSSE3, useSSE4)
-
- if useSSE4 {
- t.Log("SSE4 version")
- testHashes(t)
- testHashes128(t)
- useSSE4 = false
- }
- if useSSSE3 {
- t.Log("SSSE3 version")
- testHashes(t)
- testHashes128(t)
- useSSSE3 = false
- }
- if useSSE2 {
- t.Log("SSE2 version")
- testHashes(t)
- testHashes128(t)
- useSSE2 = false
- }
-
- t.Log("generic version")
- testHashes(t)
- testHashes128(t)
-}
-
-func TestHashes2X(t *testing.T) {
- defer func(sse2, ssse3, sse4 bool) {
- useSSE2, useSSSE3, useSSE4 = sse2, ssse3, sse4
- }(useSSE2, useSSSE3, useSSE4)
-
- if useSSE4 {
- t.Log("SSE4 version")
- testHashes2X(t)
- useSSE4 = false
- }
- if useSSSE3 {
- t.Log("SSSE3 version")
- testHashes2X(t)
- useSSSE3 = false
- }
- if useSSE2 {
- t.Log("SSE2 version")
- testHashes2X(t)
- useSSE2 = false
- }
-
- t.Log("generic version")
- testHashes2X(t)
-}
-
-func testHashes(t *testing.T) {
- key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
-
- input := make([]byte, 255)
- for i := range input {
- input[i] = byte(i)
- }
-
- for i, expectedHex := range hashes {
- h, err := New256(key)
- if err != nil {
- t.Fatalf("#%d: error from New256: %v", i, err)
- }
-
- h.Write(input[:i])
- sum := h.Sum(nil)
-
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex)
- }
-
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(input[j : j+1])
- }
-
- sum = h.Sum(sum[:0])
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex)
- }
- }
-}
-
-func testHashes128(t *testing.T) {
- key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
-
- input := make([]byte, 255)
- for i := range input {
- input[i] = byte(i)
- }
-
- for i, expectedHex := range hashes128 {
- h, err := New128(key)
- if err != nil {
- t.Fatalf("#%d: error from New128: %v", i, err)
- }
-
- h.Write(input[:i])
- sum := h.Sum(nil)
-
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex)
- }
-
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(input[j : j+1])
- }
-
- sum = h.Sum(sum[:0])
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex)
- }
- }
-}
-
-func testHashes2X(t *testing.T) {
- key, _ := hex.DecodeString("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
-
- input := make([]byte, 256)
- for i := range input {
- input[i] = byte(i)
- }
-
- for i, expectedHex := range hashes2X {
- length := uint16(len(expectedHex) / 2)
- sum := make([]byte, int(length))
-
- h, err := NewXOF(length, key)
- if err != nil {
- t.Fatalf("#%d: error from NewXOF: %v", i, err)
- }
-
- if _, err := h.Write(input); err != nil {
- t.Fatalf("#%d (single write): error from Write: %v", i, err)
- }
- if _, err := h.Read(sum); err != nil {
- t.Fatalf("#%d (single write): error from Read: %v", i, err)
- }
-
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex)
- }
-
- h.Reset()
- for j := 0; j < len(input); j++ {
- h.Write(input[j : j+1])
- }
- for j := 0; j < len(sum); j++ {
- h = h.Clone()
- if _, err := h.Read(sum[j : j+1]); err != nil {
- t.Fatalf("#%d (byte-by-byte) - Read %d: error from Read: %v", i, j, err)
- }
- }
- if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex {
- t.Fatalf("#%d (byte-by-byte): got %s, wanted %s", i, gotHex, expectedHex)
- }
- }
-
- h, err := NewXOF(OutputLengthUnknown, key)
- if err != nil {
- t.Fatalf("#unknown length: error from NewXOF: %v", err)
- }
- if _, err := h.Write(input); err != nil {
- t.Fatalf("#unknown length: error from Write: %v", err)
- }
-
- var result [64]byte
- if n, err := h.Read(result[:]); err != nil {
- t.Fatalf("#unknown length: error from Read: %v", err)
- } else if n != len(result) {
- t.Fatalf("#unknown length: Read returned %d bytes, want %d", n, len(result))
- }
-
- const expected = "2a9a6977d915a2c4dd07dbcafe1918bf1682e56d9c8e567ecd19bfd7cd93528833c764d12b34a5e2a219c9fd463dab45e972c5574d73f45de5b2e23af72530d8"
- if fmt.Sprintf("%x", result) != expected {
- t.Fatalf("#unknown length: bad result %x, wanted %s", result, expected)
- }
-}
-
-// Benchmarks
-
-func benchmarkSum(b *testing.B, size int) {
- data := make([]byte, size)
- b.SetBytes(int64(size))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Sum256(data)
- }
-}
-
-func benchmarkWrite(b *testing.B, size int) {
- data := make([]byte, size)
- h, _ := New256(nil)
- b.SetBytes(int64(size))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- h.Write(data)
- }
-}
-
-func BenchmarkWrite64(b *testing.B) { benchmarkWrite(b, 64) }
-func BenchmarkWrite1K(b *testing.B) { benchmarkWrite(b, 1024) }
-
-func BenchmarkSum64(b *testing.B) { benchmarkSum(b, 64) }
-func BenchmarkSum1K(b *testing.B) { benchmarkSum(b, 1024) }
-
-// hashes is taken from https://blake2.net/blake2s-test.txt
-var hashes = []string{
- "48a8997da407876b3d79c0d92325ad3b89cbb754d86ab71aee047ad345fd2c49",
- "40d15fee7c328830166ac3f918650f807e7e01e177258cdc0a39b11f598066f1",
- "6bb71300644cd3991b26ccd4d274acd1adeab8b1d7914546c1198bbe9fc9d803",
- "1d220dbe2ee134661fdf6d9e74b41704710556f2f6e5a091b227697445dbea6b",
- "f6c3fbadb4cc687a0064a5be6e791bec63b868ad62fba61b3757ef9ca52e05b2",
- "49c1f21188dfd769aea0e911dd6b41f14dab109d2b85977aa3088b5c707e8598",
- "fdd8993dcd43f696d44f3cea0ff35345234ec8ee083eb3cada017c7f78c17143",
- "e6c8125637438d0905b749f46560ac89fd471cf8692e28fab982f73f019b83a9",
- "19fc8ca6979d60e6edd3b4541e2f967ced740df6ec1eaebbfe813832e96b2974",
- "a6ad777ce881b52bb5a4421ab6cdd2dfba13e963652d4d6d122aee46548c14a7",
- "f5c4b2ba1a00781b13aba0425242c69cb1552f3f71a9a3bb22b4a6b4277b46dd",
- "e33c4c9bd0cc7e45c80e65c77fa5997fec7002738541509e68a9423891e822a3",
- "fba16169b2c3ee105be6e1e650e5cbf40746b6753d036ab55179014ad7ef6651",
- "f5c4bec6d62fc608bf41cc115f16d61c7efd3ff6c65692bbe0afffb1fede7475",
- "a4862e76db847f05ba17ede5da4e7f91b5925cf1ad4ba12732c3995742a5cd6e",
- "65f4b860cd15b38ef814a1a804314a55be953caa65fd758ad989ff34a41c1eea",
- "19ba234f0a4f38637d1839f9d9f76ad91c8522307143c97d5f93f69274cec9a7",
- "1a67186ca4a5cb8e65fca0e2ecbc5ddc14ae381bb8bffeb9e0a103449e3ef03c",
- "afbea317b5a2e89c0bd90ccf5d7fd0ed57fe585e4be3271b0a6bf0f5786b0f26",
- "f1b01558ce541262f5ec34299d6fb4090009e3434be2f49105cf46af4d2d4124",
- "13a0a0c86335635eaa74ca2d5d488c797bbb4f47dc07105015ed6a1f3309efce",
- "1580afeebebb346f94d59fe62da0b79237ead7b1491f5667a90e45edf6ca8b03",
- "20be1a875b38c573dd7faaa0de489d655c11efb6a552698e07a2d331b5f655c3",
- "be1fe3c4c04018c54c4a0f6b9a2ed3c53abe3a9f76b4d26de56fc9ae95059a99",
- "e3e3ace537eb3edd8463d9ad3582e13cf86533ffde43d668dd2e93bbdbd7195a",
- "110c50c0bf2c6e7aeb7e435d92d132ab6655168e78a2decdec3330777684d9c1",
- "e9ba8f505c9c80c08666a701f3367e6cc665f34b22e73c3c0417eb1c2206082f",
- "26cd66fca02379c76df12317052bcafd6cd8c3a7b890d805f36c49989782433a",
- "213f3596d6e3a5d0e9932cd2159146015e2abc949f4729ee2632fe1edb78d337",
- "1015d70108e03be1c702fe97253607d14aee591f2413ea6787427b6459ff219a",
- "3ca989de10cfe609909472c8d35610805b2f977734cf652cc64b3bfc882d5d89",
- "b6156f72d380ee9ea6acd190464f2307a5c179ef01fd71f99f2d0f7a57360aea",
- "c03bc642b20959cbe133a0303e0c1abff3e31ec8e1a328ec8565c36decff5265",
- "2c3e08176f760c6264c3a2cd66fec6c3d78de43fc192457b2a4a660a1e0eb22b",
- "f738c02f3c1b190c512b1a32deabf353728e0e9ab034490e3c3409946a97aeec",
- "8b1880df301cc963418811088964839287ff7fe31c49ea6ebd9e48bdeee497c5",
- "1e75cb21c60989020375f1a7a242839f0b0b68973a4c2a05cf7555ed5aaec4c1",
- "62bf8a9c32a5bccf290b6c474d75b2a2a4093f1a9e27139433a8f2b3bce7b8d7",
- "166c8350d3173b5e702b783dfd33c66ee0432742e9b92b997fd23c60dc6756ca",
- "044a14d822a90cacf2f5a101428adc8f4109386ccb158bf905c8618b8ee24ec3",
- "387d397ea43a994be84d2d544afbe481a2000f55252696bba2c50c8ebd101347",
- "56f8ccf1f86409b46ce36166ae9165138441577589db08cbc5f66ca29743b9fd",
- "9706c092b04d91f53dff91fa37b7493d28b576b5d710469df79401662236fc03",
- "877968686c068ce2f7e2adcff68bf8748edf3cf862cfb4d3947a3106958054e3",
- "8817e5719879acf7024787eccdb271035566cfa333e049407c0178ccc57a5b9f",
- "8938249e4b50cadaccdf5b18621326cbb15253e33a20f5636e995d72478de472",
- "f164abba4963a44d107257e3232d90aca5e66a1408248c51741e991db5227756",
- "d05563e2b1cba0c4a2a1e8bde3a1a0d9f5b40c85a070d6f5fb21066ead5d0601",
- "03fbb16384f0a3866f4c3117877666efbf124597564b293d4aab0d269fabddfa",
- "5fa8486ac0e52964d1881bbe338eb54be2f719549224892057b4da04ba8b3475",
- "cdfabcee46911111236a31708b2539d71fc211d9b09c0d8530a11e1dbf6eed01",
- "4f82de03b9504793b82a07a0bdcdff314d759e7b62d26b784946b0d36f916f52",
- "259ec7f173bcc76a0994c967b4f5f024c56057fb79c965c4fae41875f06a0e4c",
- "193cc8e7c3e08bb30f5437aa27ade1f142369b246a675b2383e6da9b49a9809e",
- "5c10896f0e2856b2a2eee0fe4a2c1633565d18f0e93e1fab26c373e8f829654d",
- "f16012d93f28851a1eb989f5d0b43f3f39ca73c9a62d5181bff237536bd348c3",
- "2966b3cfae1e44ea996dc5d686cf25fa053fb6f67201b9e46eade85d0ad6b806",
- "ddb8782485e900bc60bcf4c33a6fd585680cc683d516efa03eb9985fad8715fb",
- "4c4d6e71aea05786413148fc7a786b0ecaf582cff1209f5a809fba8504ce662c",
- "fb4c5e86d7b2229b99b8ba6d94c247ef964aa3a2bae8edc77569f28dbbff2d4e",
- "e94f526de9019633ecd54ac6120f23958d7718f1e7717bf329211a4faeed4e6d",
- "cbd6660a10db3f23f7a03d4b9d4044c7932b2801ac89d60bc9eb92d65a46c2a0",
- "8818bbd3db4dc123b25cbba5f54c2bc4b3fcf9bf7d7a7709f4ae588b267c4ece",
- "c65382513f07460da39833cb666c5ed82e61b9e998f4b0c4287cee56c3cc9bcd",
- "8975b0577fd35566d750b362b0897a26c399136df07bababbde6203ff2954ed4",
- "21fe0ceb0052be7fb0f004187cacd7de67fa6eb0938d927677f2398c132317a8",
- "2ef73f3c26f12d93889f3c78b6a66c1d52b649dc9e856e2c172ea7c58ac2b5e3",
- "388a3cd56d73867abb5f8401492b6e2681eb69851e767fd84210a56076fb3dd3",
- "af533e022fc9439e4e3cb838ecd18692232adf6fe9839526d3c3dd1b71910b1a",
- "751c09d41a9343882a81cd13ee40818d12eb44c6c7f40df16e4aea8fab91972a",
- "5b73ddb68d9d2b0aa265a07988d6b88ae9aac582af83032f8a9b21a2e1b7bf18",
- "3da29126c7c5d7f43e64242a79feaa4ef3459cdeccc898ed59a97f6ec93b9dab",
- "566dc920293da5cb4fe0aa8abda8bbf56f552313bff19046641e3615c1e3ed3f",
- "4115bea02f73f97f629e5c5590720c01e7e449ae2a6697d4d2783321303692f9",
- "4ce08f4762468a7670012164878d68340c52a35e66c1884d5c864889abc96677",
- "81ea0b7804124e0c22ea5fc71104a2afcb52a1fa816f3ecb7dcb5d9dea1786d0",
- "fe362733b05f6bedaf9379d7f7936ede209b1f8323c3922549d9e73681b5db7b",
- "eff37d30dfd20359be4e73fdf40d27734b3df90a97a55ed745297294ca85d09f",
- "172ffc67153d12e0ca76a8b6cd5d4731885b39ce0cac93a8972a18006c8b8baf",
- "c47957f1cc88e83ef9445839709a480a036bed5f88ac0fcc8e1e703ffaac132c",
- "30f3548370cfdceda5c37b569b6175e799eef1a62aaa943245ae7669c227a7b5",
- "c95dcb3cf1f27d0eef2f25d2413870904a877c4a56c2de1e83e2bc2ae2e46821",
- "d5d0b5d705434cd46b185749f66bfb5836dcdf6ee549a2b7a4aee7f58007caaf",
- "bbc124a712f15d07c300e05b668389a439c91777f721f8320c1c9078066d2c7e",
- "a451b48c35a6c7854cfaae60262e76990816382ac0667e5a5c9e1b46c4342ddf",
- "b0d150fb55e778d01147f0b5d89d99ecb20ff07e5e6760d6b645eb5b654c622b",
- "34f737c0ab219951eee89a9f8dac299c9d4c38f33fa494c5c6eefc92b6db08bc",
- "1a62cc3a00800dcbd99891080c1e098458193a8cc9f970ea99fbeff00318c289",
- "cfce55ebafc840d7ae48281c7fd57ec8b482d4b704437495495ac414cf4a374b",
- "6746facf71146d999dabd05d093ae586648d1ee28e72617b99d0f0086e1e45bf",
- "571ced283b3f23b4e750bf12a2caf1781847bd890e43603cdc5976102b7bb11b",
- "cfcb765b048e35022c5d089d26e85a36b005a2b80493d03a144e09f409b6afd1",
- "4050c7a27705bb27f42089b299f3cbe5054ead68727e8ef9318ce6f25cd6f31d",
- "184070bd5d265fbdc142cd1c5cd0d7e414e70369a266d627c8fba84fa5e84c34",
- "9edda9a4443902a9588c0d0ccc62b930218479a6841e6fe7d43003f04b1fd643",
- "e412feef7908324a6da1841629f35d3d358642019310ec57c614836b63d30763",
- "1a2b8edff3f9acc1554fcbae3cf1d6298c6462e22e5eb0259684f835012bd13f",
- "288c4ad9b9409762ea07c24a41f04f69a7d74bee2d95435374bde946d7241c7b",
- "805691bb286748cfb591d3aebe7e6f4e4dc6e2808c65143cc004e4eb6fd09d43",
- "d4ac8d3a0afc6cfa7b460ae3001baeb36dadb37da07d2e8ac91822df348aed3d",
- "c376617014d20158bced3d3ba552b6eccf84e62aa3eb650e90029c84d13eea69",
- "c41f09f43cecae7293d6007ca0a357087d5ae59be500c1cd5b289ee810c7b082",
- "03d1ced1fba5c39155c44b7765cb760c78708dcfc80b0bd8ade3a56da8830b29",
- "09bde6f152218dc92c41d7f45387e63e5869d807ec70b821405dbd884b7fcf4b",
- "71c9036e18179b90b37d39e9f05eb89cc5fc341fd7c477d0d7493285faca08a4",
- "5916833ebb05cd919ca7fe83b692d3205bef72392b2cf6bb0a6d43f994f95f11",
- "f63aab3ec641b3b024964c2b437c04f6043c4c7e0279239995401958f86bbe54",
- "f172b180bfb09740493120b6326cbdc561e477def9bbcfd28cc8c1c5e3379a31",
- "cb9b89cc18381dd9141ade588654d4e6a231d5bf49d4d59ac27d869cbe100cf3",
- "7bd8815046fdd810a923e1984aaebdcdf84d87c8992d68b5eeb460f93eb3c8d7",
- "607be66862fd08ee5b19facac09dfdbcd40c312101d66e6ebd2b841f1b9a9325",
- "9fe03bbe69ab1834f5219b0da88a08b30a66c5913f0151963c360560db0387b3",
- "90a83585717b75f0e9b725e055eeeeb9e7a028ea7e6cbc07b20917ec0363e38c",
- "336ea0530f4a7469126e0218587ebbde3358a0b31c29d200f7dc7eb15c6aadd8",
- "a79e76dc0abca4396f0747cd7b748df913007626b1d659da0c1f78b9303d01a3",
- "44e78a773756e0951519504d7038d28d0213a37e0ce375371757bc996311e3b8",
- "77ac012a3f754dcfeab5eb996be9cd2d1f96111b6e49f3994df181f28569d825",
- "ce5a10db6fccdaf140aaa4ded6250a9c06e9222bc9f9f3658a4aff935f2b9f3a",
- "ecc203a7fe2be4abd55bb53e6e673572e0078da8cd375ef430cc97f9f80083af",
- "14a5186de9d7a18b0412b8563e51cc5433840b4a129a8ff963b33a3c4afe8ebb",
- "13f8ef95cb86e6a638931c8e107673eb76ba10d7c2cd70b9d9920bbeed929409",
- "0b338f4ee12f2dfcb78713377941e0b0632152581d1332516e4a2cab1942cca4",
- "eaab0ec37b3b8ab796e9f57238de14a264a076f3887d86e29bb5906db5a00e02",
- "23cb68b8c0e6dc26dc27766ddc0a13a99438fd55617aa4095d8f969720c872df",
- "091d8ee30d6f2968d46b687dd65292665742de0bb83dcc0004c72ce10007a549",
- "7f507abc6d19ba00c065a876ec5657868882d18a221bc46c7a6912541f5bc7ba",
- "a0607c24e14e8c223db0d70b4d30ee88014d603f437e9e02aa7dafa3cdfbad94",
- "ddbfea75cc467882eb3483ce5e2e756a4f4701b76b445519e89f22d60fa86e06",
- "0c311f38c35a4fb90d651c289d486856cd1413df9b0677f53ece2cd9e477c60a",
- "46a73a8dd3e70f59d3942c01df599def783c9da82fd83222cd662b53dce7dbdf",
- "ad038ff9b14de84a801e4e621ce5df029dd93520d0c2fa38bff176a8b1d1698c",
- "ab70c5dfbd1ea817fed0cd067293abf319e5d7901c2141d5d99b23f03a38e748",
- "1fffda67932b73c8ecaf009a3491a026953babfe1f663b0697c3c4ae8b2e7dcb",
- "b0d2cc19472dd57f2b17efc03c8d58c2283dbb19da572f7755855aa9794317a0",
- "a0d19a6ee33979c325510e276622df41f71583d07501b87071129a0ad94732a5",
- "724642a7032d1062b89e52bea34b75df7d8fe772d9fe3c93ddf3c4545ab5a99b",
- "ade5eaa7e61f672d587ea03dae7d7b55229c01d06bc0a5701436cbd18366a626",
- "013b31ebd228fcdda51fabb03bb02d60ac20ca215aafa83bdd855e3755a35f0b",
- "332ed40bb10dde3c954a75d7b8999d4b26a1c063c1dc6e32c1d91bab7bbb7d16",
- "c7a197b3a05b566bcc9facd20e441d6f6c2860ac9651cd51d6b9d2cdeeea0390",
- "bd9cf64ea8953c037108e6f654914f3958b68e29c16700dc184d94a21708ff60",
- "8835b0ac021151df716474ce27ce4d3c15f0b2dab48003cf3f3efd0945106b9a",
- "3bfefa3301aa55c080190cffda8eae51d9af488b4c1f24c3d9a75242fd8ea01d",
- "08284d14993cd47d53ebaecf0df0478cc182c89c00e1859c84851686ddf2c1b7",
- "1ed7ef9f04c2ac8db6a864db131087f27065098e69c3fe78718d9b947f4a39d0",
- "c161f2dcd57e9c1439b31a9dd43d8f3d7dd8f0eb7cfac6fb25a0f28e306f0661",
- "c01969ad34c52caf3dc4d80d19735c29731ac6e7a92085ab9250c48dea48a3fc",
- "1720b3655619d2a52b3521ae0e49e345cb3389ebd6208acaf9f13fdacca8be49",
- "756288361c83e24c617cf95c905b22d017cdc86f0bf1d658f4756c7379873b7f",
- "e7d0eda3452693b752abcda1b55e276f82698f5f1605403eff830bea0071a394",
- "2c82ecaa6b84803e044af63118afe544687cb6e6c7df49ed762dfd7c8693a1bc",
- "6136cbf4b441056fa1e2722498125d6ded45e17b52143959c7f4d4e395218ac2",
- "721d3245aafef27f6a624f47954b6c255079526ffa25e9ff77e5dcff473b1597",
- "9dd2fbd8cef16c353c0ac21191d509eb28dd9e3e0d8cea5d26ca839393851c3a",
- "b2394ceacdebf21bf9df2ced98e58f1c3a4bbbff660dd900f62202d6785cc46e",
- "57089f222749ad7871765f062b114f43ba20ec56422a8b1e3f87192c0ea718c6",
- "e49a9459961cd33cdf4aae1b1078a5dea7c040e0fea340c93a724872fc4af806",
- "ede67f720effd2ca9c88994152d0201dee6b0a2d2c077aca6dae29f73f8b6309",
- "e0f434bf22e3088039c21f719ffc67f0f2cb5e98a7a0194c76e96bf4e8e17e61",
- "277c04e2853484a4eba910ad336d01b477b67cc200c59f3c8d77eef8494f29cd",
- "156d5747d0c99c7f27097d7b7e002b2e185cb72d8dd7eb424a0321528161219f",
- "20ddd1ed9b1ca803946d64a83ae4659da67fba7a1a3eddb1e103c0f5e03e3a2c",
- "f0af604d3dabbf9a0f2a7d3dda6bd38bba72c6d09be494fcef713ff10189b6e6",
- "9802bb87def4cc10c4a5fd49aa58dfe2f3fddb46b4708814ead81d23ba95139b",
- "4f8ce1e51d2fe7f24043a904d898ebfc91975418753413aa099b795ecb35cedb",
- "bddc6514d7ee6ace0a4ac1d0e068112288cbcf560454642705630177cba608bd",
- "d635994f6291517b0281ffdd496afa862712e5b3c4e52e4cd5fdae8c0e72fb08",
- "878d9ca600cf87e769cc305c1b35255186615a73a0da613b5f1c98dbf81283ea",
- "a64ebe5dc185de9fdde7607b6998702eb23456184957307d2fa72e87a47702d6",
- "ce50eab7b5eb52bdc9ad8e5a480ab780ca9320e44360b1fe37e03f2f7ad7de01",
- "eeddb7c0db6e30abe66d79e327511e61fcebbc29f159b40a86b046ecf0513823",
- "787fc93440c1ec96b5ad01c16cf77916a1405f9426356ec921d8dff3ea63b7e0",
- "7f0d5eab47eefda696c0bf0fbf86ab216fce461e9303aba6ac374120e890e8df",
- "b68004b42f14ad029f4c2e03b1d5eb76d57160e26476d21131bef20ada7d27f4",
- "b0c4eb18ae250b51a41382ead92d0dc7455f9379fc9884428e4770608db0faec",
- "f92b7a870c059f4d46464c824ec96355140bdce681322cc3a992ff103e3fea52",
- "5364312614813398cc525d4c4e146edeb371265fba19133a2c3d2159298a1742",
- "f6620e68d37fb2af5000fc28e23b832297ecd8bce99e8be4d04e85309e3d3374",
- "5316a27969d7fe04ff27b283961bffc3bf5dfb32fb6a89d101c6c3b1937c2871",
- "81d1664fdf3cb33c24eebac0bd64244b77c4abea90bbe8b5ee0b2aafcf2d6a53",
- "345782f295b0880352e924a0467b5fbc3e8f3bfbc3c7e48b67091fb5e80a9442",
- "794111ea6cd65e311f74ee41d476cb632ce1e4b051dc1d9e9d061a19e1d0bb49",
- "2a85daf6138816b99bf8d08ba2114b7ab07975a78420c1a3b06a777c22dd8bcb",
- "89b0d5f289ec16401a069a960d0b093e625da3cf41ee29b59b930c5820145455",
- "d0fdcb543943fc27d20864f52181471b942cc77ca675bcb30df31d358ef7b1eb",
- "b17ea8d77063c709d4dc6b879413c343e3790e9e62ca85b7900b086f6b75c672",
- "e71a3e2c274db842d92114f217e2c0eac8b45093fdfd9df4ca7162394862d501",
- "c0476759ab7aa333234f6b44f5fd858390ec23694c622cb986e769c78edd733e",
- "9ab8eabb1416434d85391341d56993c55458167d4418b19a0f2ad8b79a83a75b",
- "7992d0bbb15e23826f443e00505d68d3ed7372995a5c3e498654102fbcd0964e",
- "c021b30085151435df33b007ccecc69df1269f39ba25092bed59d932ac0fdc28",
- "91a25ec0ec0d9a567f89c4bfe1a65a0e432d07064b4190e27dfb81901fd3139b",
- "5950d39a23e1545f301270aa1a12f2e6c453776e4d6355de425cc153f9818867",
- "d79f14720c610af179a3765d4b7c0968f977962dbf655b521272b6f1e194488e",
- "e9531bfc8b02995aeaa75ba27031fadbcbf4a0dab8961d9296cd7e84d25d6006",
- "34e9c26a01d7f16181b454a9d1623c233cb99d31c694656e9413aca3e918692f",
- "d9d7422f437bd439ddd4d883dae2a08350173414be78155133fff1964c3d7972",
- "4aee0c7aaf075414ff1793ead7eaca601775c615dbd60b640b0a9f0ce505d435",
- "6bfdd15459c83b99f096bfb49ee87b063d69c1974c6928acfcfb4099f8c4ef67",
- "9fd1c408fd75c336193a2a14d94f6af5adf050b80387b4b010fb29f4cc72707c",
- "13c88480a5d00d6c8c7ad2110d76a82d9b70f4fa6696d4e5dd42a066dcaf9920",
- "820e725ee25fe8fd3a8d5abe4c46c3ba889de6fa9191aa22ba67d5705421542b",
- "32d93a0eb02f42fbbcaf2bad0085b282e46046a4df7ad10657c9d6476375b93e",
- "adc5187905b1669cd8ec9c721e1953786b9d89a9bae30780f1e1eab24a00523c",
- "e90756ff7f9ad810b239a10ced2cf9b2284354c1f8c7e0accc2461dc796d6e89",
- "1251f76e56978481875359801db589a0b22f86d8d634dc04506f322ed78f17e8",
- "3afa899fd980e73ecb7f4d8b8f291dc9af796bc65d27f974c6f193c9191a09fd",
- "aa305be26e5deddc3c1010cbc213f95f051c785c5b431e6a7cd048f161787528",
- "8ea1884ff32e9d10f039b407d0d44e7e670abd884aeee0fb757ae94eaa97373d",
- "d482b2155d4dec6b4736a1f1617b53aaa37310277d3fef0c37ad41768fc235b4",
- "4d413971387e7a8898a8dc2a27500778539ea214a2dfe9b3d7e8ebdce5cf3db3",
- "696e5d46e6c57e8796e4735d08916e0b7929b3cf298c296d22e9d3019653371c",
- "1f5647c1d3b088228885865c8940908bf40d1a8272821973b160008e7a3ce2eb",
- "b6e76c330f021a5bda65875010b0edf09126c0f510ea849048192003aef4c61c",
- "3cd952a0beada41abb424ce47f94b42be64e1ffb0fd0782276807946d0d0bc55",
- "98d92677439b41b7bb513312afb92bcc8ee968b2e3b238cecb9b0f34c9bb63d0",
- "ecbca2cf08ae57d517ad16158a32bfa7dc0382eaeda128e91886734c24a0b29d",
- "942cc7c0b52e2b16a4b89fa4fc7e0bf609e29a08c1a8543452b77c7bfd11bb28",
- "8a065d8b61a0dffb170d5627735a76b0e9506037808cba16c345007c9f79cf8f",
- "1b9fa19714659c78ff413871849215361029ac802b1cbcd54e408bd87287f81f",
- "8dab071bcd6c7292a9ef727b4ae0d86713301da8618d9a48adce55f303a869a1",
- "8253e3e7c7b684b9cb2beb014ce330ff3d99d17abbdbabe4f4d674ded53ffc6b",
- "f195f321e9e3d6bd7d074504dd2ab0e6241f92e784b1aa271ff648b1cab6d7f6",
- "27e4cc72090f241266476a7c09495f2db153d5bcbd761903ef79275ec56b2ed8",
- "899c2405788e25b99a1846355e646d77cf400083415f7dc5afe69d6e17c00023",
- "a59b78c4905744076bfee894de707d4f120b5c6893ea0400297d0bb834727632",
- "59dc78b105649707a2bb4419c48f005400d3973de3736610230435b10424b24f",
- "c0149d1d7e7a6353a6d906efe728f2f329fe14a4149a3ea77609bc42b975ddfa",
- "a32f241474a6c16932e9243be0cf09bcdc7e0ca0e7a6a1b9b1a0f01e41502377",
- "b239b2e4f81841361c1339f68e2c359f929af9ad9f34e01aab4631ad6d5500b0",
- "85fb419c7002a3e0b4b6ea093b4c1ac6936645b65dac5ac15a8528b7b94c1754",
- "9619720625f190b93a3fad186ab314189633c0d3a01e6f9bc8c4a8f82f383dbf",
- "7d620d90fe69fa469a6538388970a1aa09bb48a2d59b347b97e8ce71f48c7f46",
- "294383568596fb37c75bbacd979c5ff6f20a556bf8879cc72924855df9b8240e",
- "16b18ab314359c2b833c1c6986d48c55a9fc97cde9a3c1f10a3177140f73f738",
- "8cbbdd14bc33f04cf45813e4a153a273d36adad5ce71f499eeb87fb8ac63b729",
- "69c9a498db174ecaefcc5a3ac9fdedf0f813a5bec727f1e775babdec7718816e",
- "b462c3be40448f1d4f80626254e535b08bc9cdcff599a768578d4b2881a8e3f0",
- "553e9d9c5f360ac0b74a7d44e5a391dad4ced03e0c24183b7e8ecabdf1715a64",
- "7a7c55a56fa9ae51e655e01975d8a6ff4ae9e4b486fcbe4eac044588f245ebea",
- "2afdf3c82abc4867f5de111286c2b3be7d6e48657ba923cfbf101a6dfcf9db9a",
- "41037d2edcdce0c49b7fb4a6aa0999ca66976c7483afe631d4eda283144f6dfc",
- "c4466f8497ca2eeb4583a0b08e9d9ac74395709fda109d24f2e4462196779c5d",
- "75f609338aa67d969a2ae2a2362b2da9d77c695dfd1df7224a6901db932c3364",
- "68606ceb989d5488fc7cf649f3d7c272ef055da1a93faecd55fe06f6967098ca",
- "44346bdeb7e052f6255048f0d9b42c425bab9c3dd24168212c3ecf1ebf34e6ae",
- "8e9cf6e1f366471f2ac7d2ee9b5e6266fda71f8f2e4109f2237ed5f8813fc718",
- "84bbeb8406d250951f8c1b3e86a7c010082921833dfd9555a2f909b1086eb4b8",
- "ee666f3eef0f7e2a9c222958c97eaf35f51ced393d714485ab09a069340fdf88",
- "c153d34a65c47b4a62c5cacf24010975d0356b2f32c8f5da530d338816ad5de6",
- "9fc5450109e1b779f6c7ae79d56c27635c8dd426c5a9d54e2578db989b8c3b4e",
- "d12bf3732ef4af5c22fa90356af8fc50fcb40f8f2ea5c8594737a3b3d5abdbd7",
- "11030b9289bba5af65260672ab6fee88b87420acef4a1789a2073b7ec2f2a09e",
- "69cb192b8444005c8c0ceb12c846860768188cda0aec27a9c8a55cdee2123632",
- "db444c15597b5f1a03d1f9edd16e4a9f43a667cc275175dfa2b704e3bb1a9b83",
- "3fb735061abc519dfe979e54c1ee5bfad0a9d858b3315bad34bde999efd724dd",
-}
-
-var hashes128 = []string{
- "9536f9b267655743dee97b8a670f9f53",
- "13bacfb85b48a1223c595f8c1e7e82cb",
- "d47a9b1645e2feae501cd5fe44ce6333",
- "1e2a79436a7796a3e9826bfedf07659f",
- "7640360ed3c4f3054dba79a21dda66b7",
- "d1207ac2bf5ac84fc9ef016da5a46a86",
- "3123987871e59305ece3125abfc0099a",
- "cf9e072ad522f2cda2d825218086731c",
- "95d22870392efe2846b12b6e8e84efbb",
- "7d63c30e2d51333f245601b038c0b93b",
- "ed608b98e13976bdf4bedc63fa35e443",
- "ed704b5cd1abf8e0dd67a6ac667a3fa5",
- "77dc70109827dc74c70fd26cba379ae5",
- "d2bf34508b07825ee934f33958f4560e",
- "a340baa7b8a93a6e658adef42e78eeb7",
- "b85c5ceaecbe9a251eac76f6932ba395",
- "246519722001f6e8e97a2183f5985e53",
- "5bce5aa0b7c6cac2ecf6406183cd779a",
- "13408f1647c02f6efd0047ad8344f695",
- "a63970f196760aa36cb965ab62f0e0fa",
- "bc26f48421dd99fd45e15e736d3e7dac",
- "4c6f70f9e3237cde918afb52d26f1823",
- "45ed610cfbc37db80c4bf0eef14ae8d6",
- "87c4c150705ea5078209ec008200539c",
- "54de21f5e0e6f2afe04daeb822b6931e",
- "9732a04e505064e19de3d542e7e71631",
- "d2bd27e95531d6957eef511c4ba64ad4",
- "7a36c9f70dcc7c3063b547101a5f6c35",
- "322007d1a44c4257bc7903b183305529",
- "dbcc9a09f412290ca2e0d53dfd142ddb",
- "df12ed43b8e53a56db20e0f83764002c",
- "d114cc11e7d5b33a360c45f18d4c7c6e",
- "c43b5e836af88620a8a71b1652cb8640",
- "9491c653e8867ed73c1b4ac6b5a9bb4d",
- "06d0e988df94ada6c6f9f36f588ab7c5",
- "561efad2480e93262c8eeaa3677615c4",
- "ba8ffc702e5adc93503045eca8702312",
- "5782be6ccdc78c8425285e85de8ccdc6",
- "aa1c4393e4c07b53ea6e2b5b1e970771",
- "42a229dc50e52271c51e8666023ebc1e",
- "53706110e919f84de7f8d6c7f0e7b831",
- "fc5ac8ee39cc1dd1424391323e2901bd",
- "bed27b62ff66cac2fbb68193c727106a",
- "cd5e689b96d0b9ea7e08dac36f7b211e",
- "0b4c7f604eba058d18e322c6e1baf173",
- "eb838227fdfad09a27f0f8413120675d",
- "3149cf9d19a7fd529e6154a8b4c3b3ad",
- "ca1e20126df930fd5fb7afe4422191e5",
- "b23398f910599f3c09b6549fa81bcb46",
- "27fb17c11b34fa5d8b5afe5ee3321ead",
- "0f665f5f04cf2d46b7fead1a1f328158",
- "8f068be73b3681f99f3b282e3c02bba5",
- "ba189bbd13808dcf4e002a4dd21660d5",
- "2732dcd1b16668ae6ab6a61595d0d62a",
- "d410ccdd059f0e02b472ec9ec54bdd3c",
- "b2eaa07b055b3a03a399971327f7e8c2",
- "2e8a225655e9f99b69c60dc8b4d8e566",
- "4eb55416c853f2152e67f8a224133cec",
- "49552403790d8de0505a8e317a443687",
- "7f2747cd41f56942752e868212c7d5ac",
- "02a28f10e193b430df7112d2d98cf759",
- "d4213404a9f1cf759017747cf5958270",
- "faa34884344f9c65e944882db8476d34",
- "ece382a8bd5018f1de5da44b72cea75b",
- "f1efa90d2547036841ecd3627fafbc36",
- "811ff8686d23a435ecbd0bdafcd27b1b",
- "b21beea9c7385f657a76558530438721",
- "9cb969da4f1b4fc5b13bf78fe366f0c4",
- "8850d16d7b614d3268ccfa009d33c7fc",
- "aa98a2b6176ea86415b9aff3268c6f6d",
- "ec3e1efa5ed195eff667e16b1af1e39e",
- "e40787dca57411d2630db2de699beb08",
- "554835890735babd06318de23d31e78a",
- "493957feecddc302ee2bb2086b6ebfd3",
- "f6069709ad5b0139163717e9ce1114ab",
- "ba5ed386098da284484b211555505a01",
- "9244c8dfad8cbb68c118fa51465b3ae4",
- "51e309a5008eb1f5185e5cc007cfb36f",
- "6ce9ff712121b4f6087955f4911eafd4",
- "59b51d8dcda031218ccdd7c760828155",
- "0012878767a3d4f1c8194458cf1f8832",
- "82900708afd5b6582dc16f008c655edd",
- "21302c7e39b5a4cdf1d6f86b4f00c9b4",
- "e894c7431591eab8d1ce0fe2aa1f01df",
- "b67e1c40ee9d988226d605621854d955",
- "6237bdafa34137cbbec6be43ea9bd22c",
- "4172a8e19b0dcb09b978bb9eff7af52b",
- "5714abb55bd4448a5a6ad09fbd872fdf",
- "7ce1700bef423e1f958a94a77a94d44a",
- "3742ec50cded528527775833453e0b26",
- "5d41b135724c7c9c689495324b162f18",
- "85c523333c6442c202e9e6e0f1185f93",
- "5c71f5222d40ff5d90e7570e71ab2d30",
- "6e18912e83d012efb4c66250ced6f0d9",
- "4add4448c2e35e0b138a0bac7b4b1775",
- "c0376c6bc5e7b8b9d2108ec25d2aab53",
- "f72261d5ed156765c977751c8a13fcc1",
- "cff4156c48614b6ceed3dd6b9058f17e",
- "36bfb513f76c15f514bcb593419835aa",
- "166bf48c6bffaf8291e6fdf63854bef4",
- "0b67d33f8b859c3157fbabd9e6e47ed0",
- "e4da659ca76c88e73a9f9f10f3d51789",
- "33c1ae2a86b3f51c0642e6ed5b5aa1f1",
- "27469b56aca2334449c1cf4970dcd969",
- "b7117b2e363378aa0901b0d6a9f6ddc0",
- "a9578233b09e5cd5231943fdb12cd90d",
- "486d7d75253598b716a068243c1c3e89",
- "66f6b02d682b78ffdc85e9ec86852489",
- "38a07b9a4b228fbcc305476e4d2e05d2",
- "aedb61c7970e7d05bf9002dae3c6858c",
- "c03ef441f7dd30fdb61ad2d4d8e4c7da",
- "7f45cc1eea9a00cb6aeb2dd748361190",
- "a59538b358459132e55160899e47bd65",
- "137010fef72364411820c3fbed15c8df",
- "d8362b93fc504500dbd33ac74e1b4d70",
- "a7e49f12c8f47e3b29cf8c0889b0a9c8",
- "072e94ffbfc684bd8ab2a1b9dade2fd5",
- "5ab438584bd2229e452052e002631a5f",
- "f233d14221097baef57d3ec205c9e086",
- "3a95db000c4a8ff98dc5c89631a7f162",
- "0544f18c2994ab4ddf1728f66041ff16",
- "0bc02116c60a3cc331928d6c9d3ba37e",
- "b189dca6cb5b813c74200834fba97f29",
- "ac8aaab075b4a5bc24419da239212650",
- "1e9f19323dc71c29ae99c479dc7e8df9",
- "12d944c3fa7caa1b3d62adfc492274dd",
- "b4c68f1fffe8f0030e9b18aad8c9dc96",
- "25887fab1422700d7fa3edc0b20206e2",
- "8c09f698d03eaf88abf69f8147865ef6",
- "5c363ae42a5bec26fbc5e996428d9bd7",
- "7fdfc2e854fbb3928150d5e3abcf56d6",
- "f0c944023f714df115f9e4f25bcdb89b",
- "6d19534b4c332741c8ddd79a9644de2d",
- "32595eb23764fbfc2ee7822649f74a12",
- "5a51391aab33c8d575019b6e76ae052a",
- "98b861ce2c620f10f913af5d704a5afd",
- "b7fe2fc8b77fb1ce434f8465c7ddf793",
- "0e8406e0cf8e9cc840668ece2a0fc64e",
- "b89922db99c58f6a128ccffe19b6ce60",
- "e1be9af665f0932b77d7f5631a511db7",
- "74b96f20f58de8dc9ff5e31f91828523",
- "36a4cfef5a2a7d8548db6710e50b3009",
- "007e95e8d3b91948a1dedb91f75de76b",
- "a87a702ce08f5745edf765bfcd5fbe0d",
- "847e69a388a749a9c507354d0dddfe09",
- "07176eefbc107a78f058f3d424ca6a54",
- "ad7e80682333b68296f6cb2b4a8e446d",
- "53c4aba43896ae422e5de5b9edbd46bf",
- "33bd6c20ca2a7ab916d6e98003c6c5f8",
- "060d088ea94aa093f9981a79df1dfcc8",
- "5617b214b9df08d4f11e58f5e76d9a56",
- "ca3a60ee85bd971e1daf9f7db059d909",
- "cd2b7754505d8c884eddf736f1ec613e",
- "f496163b252f1439e7e113ba2ecabd8e",
- "5719c7dcf9d9f756d6213354acb7d5cf",
- "6f7dd40b245c54411e7a9be83ae5701c",
- "c8994dd9fdeb077a45ea04a30358b637",
- "4b1184f1e35458c1c747817d527a252f",
- "fc7df674afeac7a3fd994183f4c67a74",
- "4f68e05ce4dcc533acf9c7c01d95711e",
- "d4ebc59e918400720035dfc88e0c486a",
- "d3105dd6fa123e543b0b3a6e0eeaea9e",
- "874196128ed443f5bdb2800ca048fcad",
- "01645f134978dc8f9cf0abc93b53780e",
- "5b8b64caa257873a0ffd47c981ef6c3f",
- "4ee208fc50ba0a6e65c5b58cec44c923",
- "53f409a52427b3b7ffabb057ca088428",
- "c1d6cd616f5341a93d921e356e5887a9",
- "e85c20fea67fa7320dc23379181183c8",
- "7912b6409489df001b7372bc94aebde7",
- "e559f761ec866a87f1f331767fafc60f",
- "20a6f5a36bc37043d977ed7708465ef8",
- "6a72f526965ab120826640dd784c6cc4",
- "bf486d92ad68e87c613689dd370d001b",
- "d339fd0eb35edf3abd6419c8d857acaf",
- "9521cd7f32306d969ddabc4e6a617f52",
- "a1cd9f3e81520842f3cf6cc301cb0021",
- "18e879b6f154492d593edd3f4554e237",
- "66e2329c1f5137589e051592587e521e",
- "e899566dd6c3e82cbc83958e69feb590",
- "8a4b41d7c47e4e80659d77b4e4bfc9ae",
- "f1944f6fcfc17803405a1101998c57dd",
- "f6bcec07567b4f72851b307139656b18",
- "22e7bb256918fe9924dce9093e2d8a27",
- "dd25b925815fe7b50b7079f5f65a3970",
- "0457f10f299acf0c230dd4007612e58f",
- "ecb420c19efd93814fae2964d69b54af",
- "14eb47b06dff685d88751c6e32789db4",
- "e8f072dbb50d1ab6654aa162604a892d",
- "69cff9c62092332f03a166c7b0034469",
- "d3619f98970b798ca32c6c14cd25af91",
- "2246d423774ee9d51a551e89c0539d9e",
- "75e5d1a1e374a04a699247dad827b6cf",
- "6d087dd1d4cd15bf47db07c7a96b1db8",
- "967e4c055ac51b4b2a3e506cebd5826f",
- "7417aa79247e473401bfa92a25b62e2a",
- "24f3f4956da34b5c533d9a551ccd7b16",
- "0c40382de693a5304e2331eb951cc962",
- "9436f949d51b347db5c8e6258dafaaac",
- "d2084297fe84c4ba6e04e4fb73d734fe",
- "42a6f8ff590af21b512e9e088257aa34",
- "c484ad06b1cdb3a54f3f6464a7a2a6fd",
- "1b8ac860f5ceb4365400a201ed2917aa",
- "c43eadabbe7b7473f3f837fc52650f54",
- "0e5d3205406126b1f838875deb150d6a",
- "6bf4946f8ec8a9c417f50cd1e67565be",
- "42f09a2522314799c95b3fc121a0e3e8",
- "06b8f1487f691a3f7c3f74e133d55870",
- "1a70a65fb4f314dcf6a31451a9d2704f",
- "7d4acdd0823279fd28a1e48b49a04669",
- "09545cc8822a5dfc93bbab708fd69174",
- "efc063db625013a83c9a426d39a9bddb",
- "213bbf89b3f5be0ffdb14854bbcb2588",
- "b69624d89fe2774df9a6f43695d755d4",
- "c0f9ff9ded82bd73c512e365a894774d",
- "d1b68507ed89c17ead6f69012982db71",
- "14cf16db04648978e35c44850855d1b0",
- "9f254d4eccab74cd91d694df863650a8",
- "8f8946e2967baa4a814d36ff01d20813",
- "6b9dc4d24ecba166cb2915d7a6cba43b",
- "eb35a80418a0042b850e294db7898d4d",
- "f55f925d280c637d54055c9df088ef5f",
- "f48427a04f67e33f3ba0a17f7c9704a7",
- "4a9f5bfcc0321aea2eced896cee65894",
- "8723a67d1a1df90f1cef96e6fe81e702",
- "c166c343ee25998f80bad4067960d3fd",
- "dab67288d16702e676a040fd42344d73",
- "c8e9e0d80841eb2c116dd14c180e006c",
- "92294f546bacf0dea9042c93ecba8b34",
- "013705b1502b37369ad22fe8237d444e",
- "9b97f8837d5f2ebab0768fc9a6446b93",
- "7e7e5236b05ec35f89edf8bf655498e7",
- "7be8f2362c174c776fb9432fe93bf259",
- "2422e80420276d2df5702c6470879b01",
- "df645795db778bcce23bbe819a76ba48",
- "3f97a4ac87dfc58761cda1782d749074",
- "50e3f45df21ebfa1b706b9c0a1c245a8",
- "7879541c7ff612c7ddf17cb8f7260183",
- "67f6542b903b7ba1945eba1a85ee6b1c",
- "b34b73d36ab6234b8d3f5494d251138e",
- "0aea139641fdba59ab1103479a96e05f",
- "02776815a87b8ba878453666d42afe3c",
- "5929ab0a90459ebac5a16e2fb37c847e",
- "c244def5b20ce0468f2b5012d04ac7fd",
- "12116add6fefce36ed8a0aeccce9b6d3",
- "3cd743841e9d8b878f34d91b793b4fad",
- "45e87510cf5705262185f46905fae35f",
- "276047016b0bfb501b2d4fc748165793",
- "ddd245df5a799417d350bd7f4e0b0b7e",
- "d34d917a54a2983f3fdbc4b14caae382",
- "7730fbc09d0c1fb1939a8fc436f6b995",
- "eb4899ef257a1711cc9270a19702e5b5",
- "8a30932014bce35bba620895d374df7a",
- "1924aabf9c50aa00bee5e1f95b5d9e12",
- "1758d6f8b982aec9fbe50f20e3082b46",
- "cd075928ab7e6883e697fe7fd3ac43ee",
-}
-
-// hashes2X is taken from
-// https://github.com/BLAKE2/BLAKE2/blob/master/testvectors/blake2-kat.json
-var hashes2X = []string{
- "0e",
- "5196",
- "ad6bad",
- "d8e4b32f",
- "8eb89056f3",
- "410497c2ed72",
- "f0de771b375c90",
- "8662db8685033611",
- "9ef9f1eed88a3f52ca",
- "08225082df0d2b0a815e",
- "0f6e84a17439f1bc97c299",
- "895ec39c78d3556cefdbfabc",
- "2b396b3fa90ab556079a79b44d",
- "abae26501c4c1d6123c0f2289111",
- "bca098df9099b3f785a37ba40fce5f",
- "19b827f054b67a120f11efb0d690be70",
- "b88d32a338fd60b58570fda228a121113b",
- "3f30143af1cad33f9b794576e078cc79062e",
- "ffddb58d9aa8d38086fcdae07e6653e8f31dfc",
- "abb99c2e74a74556919040ca0cd857c95ec985e9",
- "71f13f89af55ba936f8a7188ee93d2e8fb0cf2a720",
- "99734fdf0eef4838a7515426f4c59b800854e2fcdc1c",
- "579b1652aa1f5779d2b0e61868af856855020bdd44d7a7",
- "1383d4ab4a6d8672b4075d421a159f69380ff47e4bb518d5",
- "d3fa1412712dbbab71d4c6265dc1585c8dcc73380cf807f76a",
- "1d57868a71e7245667780455d9aaa9e0683baf08fbaf946091c2",
- "ef80418fe7049c6251ed7960a6b0e9def0da2749781994b24593a0",
- "ef91cb81e4bfb50231e89475e251e2ef2fde59357551cd227588b63f",
- "d7f398a5d21c3139cff0562a84f154b6953c7bc18a5f4b60491c196b6d",
- "0a2abc6d38f30aef253579a4088c5b9aec64391f37d576eb06a300c193a5",
- "02dd758fa23113a14fd94830e50e0f6b86faec4e551e808b0ca8d00fef2a15",
- "a4fe2bd0f96a215fa7164ae1a405f4030a586c12b0c29806a099d7d7fdd8dd72",
- "7dce710a20f42ab687ec6ea83b53faaa418229ce0d5a2ff2a5e66defb0b65c03c9",
- "0320c40b5eea641d0bc25420b7545ac1d796b61563728a4dc451207f1addeedcf860",
- "460539415f2baeb626fad748dee0eb3e9f27221661160e13edf39d1b5d476ee0672400",
- "02de8ffa5b9c748164f99ed9d678b02e53f4ae88fb26c6d94a8cefc328725a692eae78c2",
- "348a61a0136436136910262ad67ef20644b32c15456d5fad6b1679386d0bea87cc1a2e2b5e",
- "24c32966c803434d48d2283482ee8f404f598cf7a17961748125d2ed1da987039b1ce00f2ba7",
- "bd07cb16121d3b47adf03b96c41c947beadc01e40548e0d0773e61780d48d33a0e2a675ca681a6",
- "a35844e34c20b4b9371b6c52fac412afe5d80a4c1e40aa3a0e5a729dc3d41c2c3719d096f616f0ba",
- "6df1efbb4567747fe98d218935612f8835852dde2ce3dec767792d7f1d876cdae0056fef085245449d",
- "48d6094af78bd38d8f4b39c54279b80ef617bc6ad21def0b2c62113b656c5d6a55aea2e3fde94a254b92",
- "cd6e684759d2f19083164712c2aca0038442efb5b646594396b1fccdbd21203290f44cfdecca0373b3801b",
- "155dfbf26103c8354362663677fa27d0e1ce3487a821a2a7171014c1bd5dd071f4974df272b1374765b8f2e1",
- "15b11067f311efa4ee813dbca48d690dc92780656bc4d4c56510523190a240180867c829a8b8b9844175a8aa23",
- "9bc27953a17fb84d5eabe95b4ea6bc03ea450274abccfb6f3938ded8560fb59662459a11a86b0e0f32fbea6bb1f8",
- "03b78fb0b34fb8662accdf350a6be75ace9789653ee4375d351e871f6a98ac5e782ca4b4a717665d25e49a5ae25d81",
- "687e9a6fda6e2ce0e40e4d30fef38c31e3513d2892bbe85c991fc3715947e42bc49bcd079a40ed061c2c3665efe555ab",
- "f3886027d2049a8909e26545bd202d6a6fa2a6f815d31c7d520f705a81fa606dd695369c37aee4fa77dc645e9b05813ceb",
- "e4a412ccd20b97797d91ccc286904fcd17c5afe8bed0618f1af333c052c473cd327637d951c32e4af047106036a3bc8c1c45",
- "92f4b8c240a28b6238bc2eabadaf2ff3c4bfe0e6c61268ace6aebdeb0691450caea4287db8b329bde96af8cdb8a0fe2f57ef2d",
- "e506834b3445e1a9a9b7bae844e91e0834512a06c0dc75fa4604e3b903c4e23616f2e0c78b5cc496660b4a13064bb1138edef4ff",
- "27031955a40d8dbd1591f26e3c26e367a3c68f8204a396c6a4ba34b89672896d11276966a42bd516716f35ed63e442e116dbcf35da",
- "646b1635c68d2328dddd5ac26eb9877c24c28390a45753a65044c3136ae2fe4fb40d09bf555271646d3dceb1ab1b7c8d8e421f553f94",
- "f6171f8d833743bdee7cc8f8b29c38614e1d2d8d6a5fff68bec2c0f4dd463d7941ff5c368e2683d8f1dc97119bde2b73ca412718bc8cb1",
- "45db1c478b040aa2e23fb4427017079810775c62abe737e82ec0ef8dcd0fc51f521f29fe6412fff7eac9beb7bcf75f483f3f8b971e42454b",
- "500dab14687db3ca3dde9304af5f54194b37bdf475628af46b07bfbf6bc2b64ecef284b17f9d1d9be41794699bc0e76c2878b3a55730f7142d",
- "31bba2efc7b3f415c3f031d4c06bb590ae40085ad157370af30238e03e25a359c9e133212ed34b7a006f839173b577e7015a87fdff2270fafddb",
- "0600b3fb4b5e1ed0c8b2698ac1d9905e67e027390764821f963ad8d2b33cbc378b9c25c3ee422992d22b760222ed5697be0576d73938ae9d634ed7",
- "4c0ca4f177d132594a4c613bad68da24c564efa3b4da0d0a903f26534a2e09f8d799d10e78f48ccdb0203954a36c5cf1bf24c076632c2b022b041200",
- "97aacf2e1b013677b2e14084f097cb1e64d7b3fa36f097e189d86dc4a263bcc46817cd1ee6ff0c7ccd9acef63201cdc0e36254e19204a7388643bb571f",
- "71fd6846ce7adb0843d6063546a16b79b54ad6c0f018a479a45817624fa221f63525084860559d1a0679c8d89a80701c62743ec2da8419d503f8f0cd7946",
- "f73dfb046def3362d6de36077dae2cee2587fe95fe0800548bb7d99737897096ba59052e0dadcc1fb0ccb5535391875328637a0376a43a4d89366758dfe3e2",
- "ec470d0aa932c78c5bcf86203ec0014314114765fa679c3daef214f883a17e1b4ca12f44433772a6e4ef685c904b2fc35586c6bd88f325b965968b06d808d73f",
- "cf601753ffa09fe48a8a84c37769991e96290e200bbaf1910c57760f989bd0c72e6128e294528ee861ad7eee70d589de3cf4a0c35f7197e1925a64d0133628d87d",
- "f15413f7d6fc54bb55829f698da92ee42fcf58dde1aa1bd07d438ecdc32ad6bf2bcdbecc99f18ed43e81b33065af5a4ca29960ae50553e610c0bbf4153d580e73dbb",
- "84b1738adb9757fb9402ef7113581291136184d7ae35fe0b6a738da6acb0889d4d5bac7a957024e3709fa80c77d3859871ed1aa25cf488e438a2d24cfadce6008761dd",
- "e02814bb81f250c1835a05108396b74c7878e737654bb83155e241774d04e639bbc571b413cd9349092f926c8a149a53cd33e9b63f370b6d460e504199d2e7d849db6cbe",
- "aeee4a789956ec0913592c30ce4f9c544894da77ba447c84df3be2c869100e4df8f7e316445d844b31c3209abcc912f647735fd4a7136c2f35c6fda5b2e6708f5ca951b2b0",
- "8cfd11ca385de3c843de84c830d59278fe79b70fb5ddbfbfc1ddefeb22c329ef2f607d1d1abbd1cd0d0cc7c5d3ed922add76aadca0d2f57b66cb16c582b6f18f60aee2f7509b",
- "852e5ce2047d8d8b42b4c7e4987b95d23e8026a202d4567951bbbd23111e389fe33a736318546a914d2bddedfbf53846036ad9e35f29318b1f96e33eba08f071d6dc665149feb6",
- "f225c23164979d0d13874a90ee291627e4f61a672a5578506fd3d65a12cb48a182f78350dc24c637b2f3950dc4882a5c1d5d5bad551c6f3e0093aa87e962bea51566af3791d52d65",
- "5f33864d882455f8ef046aed64e2d1691e5c1555e333b0852750592e6f00d3b5ec941d0c00e99629612795d5870cf93c984b45e4464ba072a34903b400a42824ac13da28c7c1cb1959",
- "7baaee7c3eb68c18c5ae1d45ba381803de34e36a52e2d7ccc9d48a297273c4d8644b473195bc23005f7a4f5ca790b1fa11f6a96e585e635513f11745dd97a69c1222204ab28d3c7735df",
- "d0a2a3fc450ef9af7ae982041feb2842901026467d87839c33b4a9e081ea63d5be60ae99ca6e42393ded45255b8f42886f87ba0310572d9f0d8b5a07ff4b6bae1f30559a844983cc568560",
- "3aa4164462b3e7044c35b08b047b924790f6d5c520b1df4305b5d41f4717e81f0cd4bccb9a5a6594773832b8707443adde4047caaed2293f92234df257df54ed275a9658fab483d0576d33a9",
- "c8b4239fd7f1b893d978268f77f6505b5775d89090374322d40083b0f4c437423f670ca213f7fe05c61069725da2561646eefaea597ac48e293fbad44c2872046857e56d04a426a84008cefd71",
- "f94839a7024c0a16971271b6727c081770110c957b1f2e03be03d2200b565cf8240f2873b0426042aaea996a1784fadb2b27f23bc1a521b4f7320dfbed86cd38d75141365ba9b443defc0a3b4078",
- "8af934fdc8b3376ca09bdd89f9057ed38b656bff96a8f8a3038d456a265689ca32036670cb01469cc6e958cc4a46f1e80d700ae56659828a65c0456b8e55f28f255bc86ce48e44377bf1f9970b617d",
- "ada572989e42f0e38c1f7c22b46bb52a84df8f7b3b773c9f17a5823e59a9725248d703efb4cb011abc9474e8e711666ed3cfa60db48480a8160615dfabad761bc0eb843d2e46299c59b61a15b4422fdf",
- "b11f1ea52a7e4bd2a5cf1e234b7c9eb909fb45860080f0a6bdb5517a37b5b7cd90f3a9e2297f995e96c293189b807a7bf6e7633bebbc36674544db5f18dd33020aeaf50ee832efe4d3d053873fd31ce3b9",
- "e54b006cd96c43d19787c1ab1e08ea0f8922bdb7142e748212e7912a1f2c0a4fad1b9f5209c30960b8b83ef4960e929b155a8a48c8fb7ce4326915950cede6b98a96b6f1ecb12715b713985dacd1c1180413",
- "ee2c2f31a414ccd8f6a790f55e09155fd50aac2a878f9014f6c6035cae9186f90cdef0b7adf3e207c3d24ddfba8cd321b2e9228b02a1182b6973da6698071fce8cc0a23a7bf0d5aefd21ab1b8dc7818549bba3",
- "6d6810793bad6c7efe8fd56cac04a0fb8717a44c09cbfaebce196a80ac318c79ca5c2db54fee8191ee2d305b690a92bd9e2c947a3c29342a93ac05796484638787a184e4525e82aeb9afa2f9480caebb91014c51",
- "91e4694366cff84854872667fd168d2d42eca9070cdc92fca9936e8361e7266931f418450d098a42686241d08024dd72f0024d22ba644bd414245e78608942321ff61860ba1245f83c88592dc7995c49c0c53aa8a9",
- "608aa620a5cf145f4477694407ccd8faa3182465b29ae98d96a42f7409434c21e4671bcae079f6871a09d8f2965e4926a9b08277d32f9dd6a474e3a9fb232f27fc4235df9c02abf67f7e540ca9ddc270ee91b23a5b57",
- "c14f75e92f75f4356ab01c8792af13383e7fef2ffb3064de55e8da0a50511fea364ccd8140134872adccad197228319260a7b77b67a39677a0dcdcadfb750333ac8e032121e278bdcdbed5e452dae0416011186d9ebf29",
- "03fcb9f6e1f058091b11351e775184ff2cd1f31ee846c6ea8efd49dd344f4af473f92eb44eba8a019776f77bb24e294aa9f962b39feecf7c59d46f1a606f89b1e81c2715ac9aa252e9ce941d091ffb99bb52404961794cf8",
- "11e189b1d90fcfe8111c79c5351d826f5ec15a602af3b71d50bc7ed813f36c9a682520984ae911669d3c3036223a53176794c7e17929efab2b1c5b500f24f8c83d3db5d1029c5714c6fd34eb800a913985c218071677b9885c",
- "69f8f5db3ab0321a708ab2f4234645dade6bfda495851dbe7257f2b72e3e8378b9fa8120bc836b737a675271e519b4712d2b56b359e0f2234ba7552dd4828b939e0542e729878ac1f81b6ce14cb573e76af3a6aa227f95b2350e",
- "be734d78fae92cacb009cc400e023086bc3a3a10e8ca7cb4d553ea85314f51383660b8508e8477af60baf7e07c04cc9e094690ae12c73e5f089763201b4b48d664b94b4f5820bd1540f4a84100fdf8fce7f6466aa5d5c34fcbab45",
- "d61b77032403f9b6ea5ad2b760eb0157545e37f1712ec44d7926ccf130e8fc0fe8e9b15570a6214c3899a074811486182b250dc97ebdd3b61403614d935cd0a61c0899f31b0e49b81c8a9a4fe8409822c470aacfde229d965dd62f51",
- "c31bd548e36d5fae95ed8fa6e807642711c897f0fcc3b0d00bd317ed2bca73412064618c6a84a61c71bce3e963333b0266a5656571dcc4ba8a8c9d84af4bdb445c34a7aef445b15d77698e0b13c436c928cc7fa7acd5f68867e8132993",
- "9903b8adab803d085b634bfae2e109dd247a7d6249f203403216d9f7410c36142df8fa56fb4d6f78136eef5817bad5ea3608439bb19336628c37d42db16ab2df8018b773baedafb77278a50926370b48bd81710203c7abc7b4043f9a1751",
- "4dadaf0d6a96022c8ce40d48f460526d9956da33260e1770315ead420da75b122c762762aa3ddc1aef9070ff2298b2304cf90443318b17183b60778f3859b141053e5827decfff27ff106a48cfdb0371d0ef614fc7400e860b676df3176d1a",
- "314dda800f2f494ca9c9678f178940d2284cb29c51cb01ca2019a9bede0cdc50f8ecf2a77e238b884867e78e691461a66100b38f374c4ccac80309641533a3217eca7e6b9a9af01c026201f0afaec5a61629a59eb530c3cb81934b0cb5b45eae",
- "4658b7500951f75c84e4509d74047ca621009835c0152f03c9f96ca73beb29608c44390ba4473323e621284be872bdb72175628780113e470036265d11dfcb284ac04604e667f1e4c1d357a411d3100d4d9f84a14a6fabd1e3f4de0ac81af50179",
- "491f877592837e7912f16b73ee1fb06f4633d854a5723e156978f48ec48fbd8b5e863c24d838ff95fa865155d07e5513df42c8bb7706f8e3806b705866475c0ac04bbe5aa4b91b7dc373e82153483b1b03304a1a791b058926c1becd069509cbf46e",
- "231034720c719ab31f7c146a702a971f5943b70086b80a2a3eb928fa9380b7a1ad8773bfd0739142d2ad6e19819765ca54f92db5f16c1df5fa4b445c266215a92527bd4ef50ed277b9a21aee3fb7a8128c14ce084f53eac878a7a660b7c011eb1a33c5",
- "3366860c77804fe0b4f368b02bb5b0d150821d957e3ba37842da9fc8d336e9d702c8446ecafbd19d79b868702f32405853bc17695873a7306e0ce4573cd9ac0b7fc7dd35534d7635198d152a1802f7d8d6a4bb07600fcdaacfaa1c3f40a09bc02e974c99",
- "ccbbbe621f910a95835f5f8d74b21e13f8a4b03f72f91f37b5c7e995aa3cd5539508d5e234e77a4668a42c239b2d13ef0e55ecf85142055e3f8a7e46320e21324a6b88e6c823ac04b485125c2aa59b61476481208f92ea4dd330cb18777c1cf0df7cd07893",
- "87faf0e49e7e5ab66ee3147921f8817867fe637d4ab694c33ee8009c759e7d707f44c69c1b9754e2b4f8f47b25f51cd01de7273f548f4952e8efc4d9044c6ea72d1d5857e0ffeb3f44b0c88cb67683401cfb2f1d17f0ca5696641bef28d7579f68d9d066d968",
- "38c876a007ec727c92e2503990c4d9407cea2271026aee88cd7b16c4396f00cc4b760576adf2d683713a3f6063cc13ecd7e4f3b6148ad914ca89f34d1375aa4c8e2033f1315153189507bfd116b07fc4bc14f751bbbb0e752f621153ae8df4d68491a22430b309",
- "87d636a33dbd9ad81ecd6f3569e418bf8a972f97c5644787b99c361195231a72455a121dd7b3254d6ff80101a0a1e2b1eb1ca4866bd23063fe007310c88c4a2ab3b49f14755cd0ee0e5ffa2fd0d2c0ea41d89e67a27a8f6c94b134ba8d361491b3c20bacac3d226b",
- "b021af793badbb857f9a353e320450c44c1030fce3885e6b271bcc02e6af65fdc5be4dc483ff44bd5d539ed1e7eb7efe3001252e92a87df8227ace601047e101c871d29302b3cb6c6f4639078afc81c4c0f4c2e04688612ecf3f7be1d58ea92894a5dab49b949f2089",
- "c5c1f2fbf2c8504a686b615278fc6221858d401b7fe790b75fb6bca6885cdd128e9142bf925471ee126f9e62d984de1c30c9c677eff5fdbd5eb0fa4ef3bff6a831056cea20fd61cf44d56ffc5bda0e8472ecdc67946d63c40db4ba882bc4dfa16d8ddac600570b9b6bf3",
- "88f8cc0daeaeaea7ab0520a311dff91b1fd9a7a3ec778c333422c9f3eb0bc183acc80dfefb17a5ac5f95c490693c45666ec69234919b83244003191bad837aa2a237daeb427e07b9e7aa6ca94b1db03d54ee8f4fe8d0802cb14a6599005eb6326eefe5008d9098d40aa851",
- "2eb6b1a58e7fe39ff915ac84c2f21a22432c4f0d260380a3f993310af048b11647f95d23adf8a746500833ee4e467fb52ea9f1039519fa58bcb0f1d0151558147b3c92b83730aba0e20eeeea2b75f3ff3ad79f2f8a46cbbadb114a52e32f018342aeeaf827e03ad6d583bbce",
- "3ba7dcd16a98be1df6b904457709b906cbf8d39516ef107006c0bf363db79f91aaae033466624d30858e61c2c368599963e49f22446e4473aa0df06e9c734e183a941510d540536377072334910e9cef56bc66c12df310ecd4b9dc14207439c1da0ac08bdd9be9f2c840df207e",
- "a34a7926324ea96867dac6f0dba51d753268e497b1c4f272918c7eb0e34120be65b7b5ba044d583141ec3ea16fcedae6197116b16562fb0706a89dc8efd3ba173ccd0fd7d84d480e0a3dda3b580c326aa1caca623879b0fb91e7d173998889da704eda6495023b5ad4c9ad406298",
- "5ef97d80b90d5c716322d9ba645a0e1b7a403968258a7d43d310320f60f96235f50e9f22cac0ad239636521fa0607d2f471051b505b371d88778c46fe6787d47a91a5bec4e3900fe6ed22918226fc9fbb3f70ee733c369420612b76b5f55988d757c891d7005d17ee55783fe506202",
- "140d2c08dae0553f6a49585fd5c217796279152b2e100ebde6812d6e5f6b862b2a3a484aed4d6226197e511be2d7f05f55a916e32534ddcb81bdcf499c3f44f526eb515cc3b6fa4c4039ad251253241f541558bba7413ca29318a414179048a054104e433c674ca2d4b3a4c181878727",
- "29fdfc1e859b001ee104d107216b5299a792d26b2418e823e0381fa390380d654e4a0a0720ba5ff59b2ff22d8c4e013284f980911dcfec7f0dca2f89867f311ced1ac8a14d669ef1114504a5b7626f67b22ecd86469800f1575543b72ab1d4c5c10ee08f06159a4a3e1ae09937f12aa173",
- "52dfb643832a598a10786a430fc484d6370a05356ee61c80a101dbbcfac75847fba78e27e537cc4eb918eb5ab40b968d0fb23506fee2ad37e12fb7534fb55a9e50902b69ceb78d51db449cbe2d1fc0a8c0022d8a82e2182b0a059035e5f6c4f4cc90278518e178becfbea814f317f9e7c051",
- "d32f69c6a8ee00ca83b82eaf82e312fbb00d9b2f6202412a1ffc6890b4509bbbeda4c4a90e8f7bca37e7fd82bd23307e2342d27aa10039a83da55e84ce273822740510e4ec239d73c52b0cbc245ad523af961994f19db225212bf4cc160f68a84760233952a8e09f2c963be9bb1d71ca4bb265",
- "d1e603a46aa49ee1a9ded63918f80feca5fc22fb45f659fd837ff79be5ad7faf0bbd9c4ba91628ee293b478a7e6a7bd433fa265c20e5941b9ea7edc906055ce9799cbb06d0b33ae7ed7f4b918cc082c3d4a1ac317a4acec175a73cc3eeb7cb97d96d24133a29c19375c57f3a4105519846dd14d4",
- "b45ac88fac2e8d8f5a4a90930cd7523730733369af9e39bf1ffb833c01108952198301f4619f04b9c399fef04c214bad3358999967c474b67a7c06457a1d61f9466489ed5c0c64c6cdc83027386d6263491d18e81ae8d68ca4e396a71207adaaa60997d0dca867065e68852e6dba9669b62dc7672b",
- "d5f2893edd67f8a4b5245a616039ffe459d50e3d103ad4675102028f2c497ea69bf52fa62cd9e84f30ae2ea40449302932bbb0a5e426a054f166fdbe92c744314cc0a0aa58bbc3a8739f7e099961219ec208a8d01c1ae8a2a2b06534bf822aaa00ca96218e430f0389c69c7f3fd195e128c38d484ff6",
- "37279a76e79f33f8b52f29358841db9ec2e03cc86d09a335f5a35c0a31a1db3e9c4eb7b1d1b978332f47f8c3e5409d4e443e1d15342a316f442e3bfa151f6a0d216df2443d80cbcf12c101c51f2946d81161583218584640f4f9c10de3bb3f4772bd3a0f4a365f444777456b913592719818afb26472b6",
- "a46d252a0addf504ad2541e7d992cbed58a22ea5679980fb0df072d37540a77dd0a1448bdb7f172da7da19d6e4180a29356ecb2a8b5199b59a24e7028bb4521f3281313d2c00da9e1d284972ab6527066e9d508d68094c6aa03537226ef19c28d47f91dddebfcc796ec4221642ddf9de5b80b3b90c22d9e7",
- "060c18d8b57b5e6572dee194c69e265c2743a48d4185a802eaa8d4dbd4c66c9ff725c93667f1fb816418f18c5f9be55e38b7718a9250bc06284bd834c7bd6dfcd11a97c14779ac539629bcd6e15b5fca3466d14fe60d8671af0fb8b080218703bc1c21563b8f640fde0304a3f4aeb9ec0482f880b5be0daa74",
- "8f2f42bc01acca20d36054ec81272da60580a9a5414697e0bdb4e44a4ab18b8e690c8056d32f6eaaf9ee08f3448f1f23b9844cf33fb4a93cba5e8157b00b2179d18b6aa7215ae4e9dc9ad52484ad4bfb3688fc80565ddb246dd6db8f0937e01b0d2f2e2a64ad87e03c2a4ad74af5ab97976379445b96404f1d71",
- "ccb9e524051cca0578aa1cb437116a01c400338f371f9e57525214ad5143b9c3416897eae8e584ce79347297071f67041f921cbc381c2be0b310b8004d039c7cc08cb8ff30ef83c3db413f3fb9c799e31cd930f64da1592ec980cc19830b2a448594cb12a61fc7a229e9c59fe1d66179772865894afd068f0942e5",
- "3eb5dc42172022ab7d0bc465a3c725b2d82ee8d9844b396913ceb8a885323dbbbf9ef4ed549724cc96d451ea1d1d44a8175a75f2a7d44bb8bfc2c2dffed00db0328cfde52bf9171f4025770abbe59b3aefd8151c480bafa09f613955fd571e5d8c0d4936c670d182cf119c068d420ded12af694d63cd5aef2f4f6f71",
- "20ea77e58e41337ad63f149ed962a8210b6efa3747fe9bea317c4b48f9641f7145b7906ed020a7ae7d2ee59435392edc32aee7eff978a661375af723fbd440dd84e4a152f2e6ef66f4ab1046b22c77ac52717de721dfe39aa8ba8cd5da27baca00cc1fffe12c52382f0ee83ad1418f4c6a122effaf7471e1e125d7e7ba",
- "95c662b835171fa23f948c3c3ed27bab9b3c367bbfe267fe65f8037a35b50cd7fc6030bfce4000425ef646c34793f0762635ae70487a0216ef7428da622be895d1b6040423246511c2370d6876a5c5d2df8bbd48fb14f787b632ad2c1f5a927fdf36bc493c1c8606accfa52de33258669f7d2d73c9c81119591c8ea2b0ef",
- "f708a230675d83299cc43167a771602d52fa37cbc068ef9128ef60d186e5d98efb8c98798da619d2011bf4673214f4a4c82e4b11156f6292f6e676d5b84dc1b81e7cc811b0d37310ac58da1bfcb339f6ba689d80dd876b82d131e03f450c6c9f15c3a3b3d4db43c273c94ed1d1bd6d369c4d30256ff80ea626bda56a6b94ea",
- "f8417766ce86b275f2b7fec49da832ab9bf9cb6fdfe1b916979ae5b69176d7e0293f8d34cb55cf2b4264a8d671370cb595c419c1a3ce5b8afa642208481333522005fbe48cdc700e47b29254b79f685e1e91e7e34121784f53bd6a7d9fb6369571bba992c54316a54e309bbc2d488e9f4233d51d72a0dd8845772377f2c0feb9",
- "3479e04efa2318afc441931a7d0134abc2f04227239fa5a6ae40f25189da1f1f313732026631969d3761aea0c478528b129808955be429136eeff003779dd0b8757e3b802bdff0f5f957e19278eabad72764aa74d469231e935f4c80040462ab56094e4a69a82346b3aeb075e73a8e30318e46fdaec0a42f17ccf5b592fb800613",
- "03df0e061fa2ae63b42f94a1ba387661760deaab3ec8ffabcaff20eeed8d0717d8d09a0eafd9bde04e97b9501ac0c6f4255331f787d16054873f0673a3b42ce23b75a3b38c1ebcc04306d086c57a79d6095d8ce78e082a66c9efca7c2650c1046c6e0bbce0b2cba27c3824333e50e046e2a7703d3328ab3b82c9d6a51bc99b9516ff",
- "76b488b801932932beefffdd8c19cf5b4632306e69e37e6a837e9a20c8e073bcadd5640549faa4972ebd7ee55cb2425b74cb041a52dd401b1a531beb6dfb23c4cfe74bc84f034156c8f55050ca93236eb73c4e2595d9fbf93dc49e1ec9a31705359732dda73f737ec4274e5c82626dc4ec929e5e2c7a2f5f5fb666181922bd8be575e3",
- "ff17f6ef13abc0426b03d309dc6e8eeb822300f7b87eff4f9c44140a424098fd2aef860e5646066d22f5e8ed1e82a459c9b9ad7b9d5978c29718e17bff4eeefd1a80ba48108b551e62cd8be919e29edea8fbd5a96dfc97d01058d226105cfcdec0fba5d70769039c77be10bd182bd67f431e4b48b3345f534f08a4beb49628515d3e0b67",
- "95b9d7b5b88431445ec80df511d4d106db2da75a2ba201484f90699157e5954d31a19f34d8f11524c1dabd88b9c3adcdba0520b2bdc8485def670409d1cd3707ff5f3e9dffe1bca56a23f254bf24770e2e636755f215814c8e897a062fd84c9f3f3fd62d16c6672a2578db26f65851b2c9f50e0f42685733a12dd9828cee198eb7c835b066",
- "010e2192db21f3d49f96ba542b9977588025d823fc941c1c02d982eae87fb58c200b70b88d41bbe8ab0b0e8d6e0f14f7da03fde25e10148887d698289d2f686fa1408501422e1250af6b63e8bb30aac23dcdec4bba9c517361dff6dff5e6c6d9adcf42e1606e451b0004de10d90f0aed30dd853a7143e9e3f9256a1e638793713013ebee79d5",
- "02aaf6b569e8e5b703ff5f28ccb6b89bf879b7311ea7f1a25edd372db62de8e000219afc1ad67e7909cc2f7c714c6fc63ba341062cebf24780980899950afc35cef38086ee88991e3002ae17c07fd8a16a49a8a90fc5540be0956dff95390c3d37629949de99920d93096eb35cf0427f75a6561cf68326e129dbeffb8772bfdce245d320f922ae",
- "70752b3f18713e2f533246a2a46e38a83cc36dfccec07c1030b5204cba4432700735a8cee538b078d281a2d0262110381c5815a112bb84404f55af91652bd17502dd75e4910e062943d8a736ae3eecdfdd8e3f83e0a5e2ddeeff0ccbdadaddc95391310fc657a59724f7e6560c37dc1d5bb5db40170190f04a274c864ade9687c0f6a2a48283177a",
- "01f3c1333b44077c518cc594d0fb90c37651fb7b2442e71fc0a5611097f1cf7bcfaf11c8e0ac1b1cab54afba15bb9332df6bc64d8032368e3f686c8324b0114e0979dad78a5ccd3fff88bbe89eef89c4be586ca092addef552ed33224e85d8c2f4fba85ac7735f34b6aa5ae5299154f861a9fb83046b0e8fca4db32c1343e02676f283975f43c086cf",
- "509283ebc99ff8d87902fa00e2d2a6fa239e335fb840dbd0fdbab6ed2d95e8275402523f7ce9a2fabd4b6c9b533288fbe914bde84365a204711d0977a7d698f4614385984dd4c137e4820035dd6737da364edff1bb62283e87a8c7ae8637314fe9b5777ec4ec21276dafedb2ad5ee1aa0ac99e34a6c01c055c8a239fd28681607f65143082cd4553c529",
- "c17e417e876db4e123c631f7136b8a85bfd6ce66a69180d0cd5ecfd6f037bb1c7bd7908d51f2c485bf9e92c0e1799ee5f6ab834ee481f5eb1a8020205adb4d0f90126d4e7c2c859c5a5f644bdfa9c649ff4f168e834de6f9769429732099d46d0af506ab86c6fd92175159bbc05c75db8e1fa867e6030d64250008d64c857c47caec3dc8b2ffb384d0193e",
- "950988fbe9d62a66f5f2c492bc8dc944a78eb3796ec37ba94b6a81a9d402ccad03cd8497fff74c5f4a03081c5fecec48574fecb21c1de261332c23108195d3f6a96ff8e433a1a30eda53dd5bb414973334f8cde5510ff759f7c17046cbb5acd8e8c4a6eecf2a9121ec3fc4b22c4daa72678194ce809024cd45c4ebb9ccdb6f854205cdb624f0787480d8034d",
- "552a212c403b473741da8e9c7b916d5e5e9bcc9949021ae1ca1ed46b7d4a98addbb604d9fff56175b7e0367db26c9635fa7813653dc8d610befdd09ec41e99b192a716106f4299eec8b940863e5a59cf26cdc2cd0c3017f9b4f215812bed15f69e77edf672178e13c55580982f01fcc2fa131ec3d736a55d56504c545f4be50fee83f1263e4d3f3c877cc6242c",
- "b00c4283dd3d9cd26e44bd97cede6c771cb14f2571b51cfdaae4309560ffd165da025a1bbd31096c3aa8286e2d6dcc3e681b8d01f2c5064ea26dfd0b5156b7a7f5d1e046c5bd1628f8fdae24b03bdf7cf7366900cc013a8cbed9d7f5937c914b08f8c27683b956e1279812d04288515333fc6aba3684dde2292951f0610649d90fe61606630fc6a4cd383649252c",
- "f6e79457bb6d0884dd223be2cf5ae412a1ed425f1e4012f75951b096aea3b9f3581f9013bcae1aff2d3fc1e5c7e06f24af6d53c2c5c238b71c71cc670b05a7ee5204400026a5c4e5ddec3ad96771e49fae4b0f75ec58049ad9d972e5749a32d90f847f1ed2a1bab83db181e541cf5c8adb6b29ecc64dc25add491d408d3eb3ddcb013de7f5ffb6de9dd7ff300a5fc6",
- "fe1d71e1d5efa3f712d23216ee8ee9139e66bd648b83efc02cdb4d45a28cf36759ff190a84d14d9471477abefb5aea4111110336143dd80cf81e02f268120cc07d746538f968e9876bff8358d390f5b8e7eafa61ecd236cedaf276bd61865fdd3424988201dcdeda2e3e0c33c9e3b3670125dd1049106cc6df5695fb2dca443233ff440f265bbff055483bac1e859b83",
- "4c80163562872a965dedd8725652906156ada6e9d999027d96f49289edb92f9ef043e9d7c3377e091b27f85275499454af32317535997fb4aaeaf93565ad481ff7d45d2abddd4df4b60f71a6923ec30496c6ae534dc5427107ab4c5e656a322c7ab058d4c13ec0ebafa76576560697ac98f84aa4a554f98ec87134c0d7dca9184cf70412a324aac91823c0aca02537d197",
- "fdd58c5ffe88665beb7073c8f4c22472f4bc9390cdd27a42622ca55978b000ab7579f795d4de0dfcaf521b8268980ef1d20277b07567985c0fd5030784ad6c32541ac24e99ab706105a2255fc32935c0fce6fdad9bb224d94ae4eae2a3ff08836618a3adf193630647bce1952b69da4de360f59da303519278bfd39b733cf66820a5e9e971b702f45998b69a0889f4bec8ec",
- "ff38b15aba3794e2c81d88003e045ac6cbfc9f4833cdf896cefd8ac0c88674727ad9a9fcb9ef36574deea480e6f6e8691c8390ad73b8ea0eb3665c914b0d886546948e67d7987eea248b5feb52346ffdd965d5c835144c3bc63daf325e74b11267e32e58a914ae4521a668839d9445fececa49c5fba41f9e171698bbc7c6c97fa163a377a96456958d6e1d74f91ada56a30df8",
- "f048c19328d60b4e59ed76940415b2c84c23883198bba5699efb0a1774ad5da6d15390c7b55d77d66f37448fe08107f42a5336408d5322f4b630e3275865fc66dccab39f6e13fabc133e5a441fe352d81c7cd9a25f145a6e2e2417d3b0bbc79eafcd7ad688c02011fd268dd44ac3f4f87b37a84a46fd9e9975962fba92c9a3486deb0c45f6a2e044df4bb79f0feeea432c5008b0",
- "1b3e5fe6f113cce28a6f8d6f7809d3cec398cabffe9ff2ff10a7fec29a4ee4b54186063fd5307a2be393c9ecd75a37620bdb94c9c18da69b658579676ec90351d10dc33a7cb3b75798b1234f9f684d4a73a0fab2df3d5d6fdb1c1b1514d0935c1f2dd21486f91c2595b2f8f8a500ff443b9305270fb6f3da7961d9316d4ed6a135a31c4a3611d40e6585bbb34f498cd5b9a5d92676",
- "740db337baa12b16897f17a85fa5685acc85e48338867f8ac9c0198dd650f5dfa7c17725c1262c72207e365c8aa45ffaab6470a0e5afefbfc3bb702a9766064f28cc8b796878dfdd3ca9d0216c14941438fc541fb5be0a13d29a996c5c985db4f630df067a5626db5dcd8df3a2bff17dc446e46e4079b8815da4318cb228c7722684e2a795a0ca56f500ea51951a6a385385d886f678",
- "1465f2d578d167faa017fe8f763ce3cc8dc1e8371d774ed2a8803f12585296ee71a1f2253dd16b717a81f91f0f3641018a0111182b4e65d884b0a3d0292631ad807cdccc88bdeecb476e76f72b5246a630aff6e2401fa9570f85acb73ccb4e19ef04a932a03d7b7985dbe1e5bb410df517fe362321469e6f8b0e0cef6c31d7aa8ec06aa220620d66cc0e133fdee963589b12320fc9678e",
- "80c051952fa6f3ef6af0f1759ec3e83c8eb91abee1de360bfa09e74b05af2475a0dbf8f9135aa25892919bbe0515898cfb6f88abc9e1891f2b2180bb97370f578973d55c13c35edb22ed80647c2a7e2884d1ccb2dc2f92d7b6ec5843ade13a608a31190ce965bde97161c4d4af1d91ca9962053f9aa51865bdf04fc23fa35a6fc3c8e888941263a26ed66c2dd0b29b2325dfbd1227c5091c",
- "9c1e2a1aed6406052eed12b4495365f2f80e9c9645473f3549b607f20910bcd16dc3a4b173ac8d128129cdb7c76ebbc8e9a2a1ba0d822c66b367e790a69ac71f0a60ed4bff0e979148e3f3ee6607c76dbc572ee5ff17c27e4b52adebb4bedddff517f591a1977299c7cb01106f1453b098d29848ba3751c816215bb0d090c50f9e445b41b2c49d4eec83b92ce6c269ce835fd279e7cbbb5e47",
- "466abda8944d0329d2975c0f2e2afc901f117887af301881f63b714f49a2f692fa63a8871fc0b301fe8573dc9b2689880cd8969e5072c57671e0633b041481dab25e65c9de404af033a11a8070c8ab70ca6d465318501afdd9940c7efbe1bb6d49581c222fad251dba4ee0a98efe22a3c4f74da05844523b30bbad6b080ac8df70a02da80bc9d477dfb869adb211e209a316d5dd1fd89a6b8f8e",
- "0e89a873e07799ba9372fc95d483193bd91a1ee6cc186374b51c8e4d1f40dd3d30e08f7feecfffbea5395d480ee588a294b96304b04f1ee7bbf6200cc8876395d1db3ac813e1019bb68d27204e514fe4a61ad2cbd1782dca0e38b5538c5390bca626c5895b745cfca5dac636fd4f37fed9014ab46ae1156c7789bbcbb956ff7ee5ce9effa560731d26783dc6ae8bddd53a5d28133614d0ddeddd9c",
- "fdde2b80bc7a577ef0a6c03e59512bd5b62c265d860b75416ef0ce374d544cbb4e3a5dbd31e3b43e82975090c28bc77d1bdec907aeceb5d1c8b71375b6d631b84a46153f5f1d195bfcb2af6f597a9cdc83782c5bbbb58c5188a87ebf375eee5212fa52523820a83106e8ecd52bedd60d95cd646159774389c07e1adcaa6b6f649408f33399ec6e507d61659696b3dd249996892d5986b654d94ff337",
- "f5d7d66929afcdff04de30e83f248e69e89604daea782e1d82d8032e91a95c1d6fb2f5578f79b51be4397e4cd7cbc608ce143fdddbc6fb6c43ffdd394a7df0124353b919aeeac025f3eb11ff246c3b9657c1a947fc534ce48e18feffada8797037c6bc7e2d9a9e2e019fe65627b3feb28e446473e3bd413047a2587f0be6a103403cb3c33fdc212dca14d8e386aa511c22308e632f5f9528dbabaf2deb",
- "332990a8dba55f977bc814436cf386ebbf10cb487a5f6ce83e13741bac670c6810284fbbe4e303547ef411e964fae82854e8c13cf56979b89ecfedd337aad78260060122d13dfbbf8497acb2066ed89e30a1d5c11008bd4d145b5ec353956310536304d8b8bba0793baec6d8f3ff49718a56e6694f8122078265cf5731d9ba61292c1219a1affb3679576d4998290aba3684a205c3469d40761a5c4e96b2",
- "efbdff285027610f03182009c89b953f19721cfcdb8accd74bab6ec4bdf3f555ab902cb0dd91284269d140638aaabd211748aa4da3b18cddc653b57e461b9ad8491807c535c08fe97d89eb587c6af19ca152e72479626ab764e8b62da89fefc8354c75a44851f985746d78715a5a92798dac1a4222be27897b3f0aa63d596aa7378545f49b259aa8518c3def8a2ec8f7aa956c43668c8717052035a7c36b47",
- "0eea9bb83bdc324fd21b03669aa922fbebc448e7d25e210294c07862cfa6e061731dfb67b4810633f4dbe2130d90fa1c65843af436e74219d213c4458dcac1c48ec4541fc6e3b7918ab2bc621aedda53658050900c3865ca57cd5dfa1d28576827401956d2dd8b861fa90ab11bb0b544ded9bd3d62e3278ed484e17db8f2d5dc5ea4d19a0e15134ba6986714c2b22c59c2f0e517b74eb92ce40d2f5b89e6d79f",
- "25da9f90d2d3f81b420ea5b03be69df8ccf05f91cc46d9ace62c7f56ead9de4af576fbeee747b906aad69e59104523fe03e1a0a4d5d902352df18d18dc8225855c46fefeec9bd09c508c916995ed4161ee633f6e6291cb16e8cac7edcce213417d34a2c1edea84a0e613278b1e853e25fb4d66ff4c7ee4584e7f9b681c319c874d43502534e8c16a57b1ae7cc0723783807738a55b661e617ee285bdb8b845607f",
- "a76b6f81372df09322098868d469fb3fb9beafc5edb32c674974ca7032966aaca5b5c9bffef87bfe626bd8e33d1c5f054f7d5acd3b91ff95324d1ae39eb905b9f2694fe5cb03486cee86d2f661a751b0e6c716a61d1d405494c2d4e32bf803803dc02dba2c06eecf6f97fb1f6c5fd10cfc4215c06d627c46b6a16da0854e4c7c873d50aa1bd396b35961b5fa31ac962575230c07c369f8fbc1ff2256b47383a3df2a",
- "f9db613812f2259972d91b1598ffb166031b339913925ee385f03b3b35dc4b2f1ae78a3c3d99c6ff6a07be129ce1f4b8d994d24988d7fbd31f20535d36ab6bd0592cfb4f8c1ed9244c7fa8a3c46e91272a1a40c6cfcf261c5658476c59793bf1a3775086e41a0492f88a31e2d9d1ce75cf1c6b4b928b3545d838d1de6b61b735d921bcf72e4e0615e9ff969ef76b4b947026cb016e2660ba39b0c4c953369a52c210de",
- "e601c7e75f80b10a2d15b06c521618ddc1836fe9b024458385c53cbfcedd79f3b4239598cd7b9f72c42dec0b29dda9d4fa842173558ed16c2c0969f7117157317b57266990855b9acbf510e76310ebe4b96c0de47d7f6b00bb88d06fad2c2f01610b9a686079f3ed84613ba477922502bc2305681cd8dd465e70e357534503b7cbc68070ad16d9c51de96ccf0aae1599299331c5655b801fd1dd48dddf6902d0e9579f0c",
- "ee5ff4ca16d1bde59ffaf2d064eac9141c1d8f120ea2bda942b7956ba3effc5f1e725a3b40b0b9223a14d7a50df1681d14ca0e0eda7bb09c428fa3b2701f83a7a3e139485a118f6287d266dbc7fe68c87b35becabc7782537c79cb8165bdc40cc103d7b6d4b627fafa0e4113f92341ab90ceab594bfae20dadbfafd401684584598941f1ffb8e23dc8a04ecd15376cda6d849fe0dfd177538c62413622d172d9d46e05c450",
- "1daca80db6ed9cb162ae24aae07c02f4126f07cd09ecee8e798fa1bc25c26c644333b63731b4ebc3f287f2318a820c32a3a55fc976576bc936f7384e2553d2891e3771ff24dd4c7f0256906460a8f12d30ed2b23583a0259cb00a9065a757d654d6e4603e7c7eb4a8426b527ae8a849d9350e9094b890367df3e8b23ad2df4d7dcce416bd8ea3badd037f53f7b07c02e5926515f196d62aeb9b8b14c863f067fc12c5dfc90db",
- "27ff4e58a34ff1fcd66855d014ea17889a3cf0021a9fea3fabfd5b270ae770f40b5439e00c0d26bd9766f6fb0b4f23c5fcc195edf6d04bf708e5b0bced4f5c256e5ae47cc5651e51cd9fe9dc5d101439b9bc5cc24f76a8e8847c72686e2af1ce7098ad7bc104dad00c096a6d48b6453322e9cd6773fb91fb1eabd05dc5185a9aea07a2f64c6fea9897681b4428aaffe1fe5fd3e8ceb890b12169ec9d51eaabf0ca3d5ba415770d",
- "75e2fb56327983b04f640717be8cba6fef3655b4d8e5539587d6478356ec397efaed818b8425d052778eb30ef0dee656c52c2aeab079ed496ae4441a365f2130432c87ba757e25b4511656ad15e2eff84d342331fd2814d1f1d11af65d98a424c115ba183437c0d0aa55f5c44b8685028a47d89d0d36a0f20aed510c366ab338f074a941b404fb349caaec821e0850a627777cc8f5abce6b509290027a2a28ff1db62a5ed2f95fc6",
- "c6ae8b6a060917cd498aa7874ad44baff73efc89a023d9f3e9d12c03d0b7f5bcb5e24e1bc2ab2f2c67b9a9d36ff8beb51b5affd4a3510361001c80642955b22ea4bf28b81a5affe5ecdbabd8d17960a6af3825a4522fe76b3d720b5d06e66bff5379d7a8de1f5cc3e7bb75163a854d77d9b3949bf904b6c4e568682f0dab7f217f80da7303cfdc9a53c17b6b51d8ddff0ce49541e0c7d7b2eed82a9d6be4aec73274c30895f5f0f5fa",
- "606c9a15a89cd66a00f26122e33ab0a08c4f73f073d843e0f6a4c1618271cfd64e52a055327deaaea8841bdd5b778ebbbd46fbc5f43362326208fdb0d0f93153c57072e2e84cecfe3b45accae7cf9dd1b3eaf9d8250d8174b3dade2256ecc8c3acc77f79d1bf9795a53c46c0f04196d8b492608a9f2a0f0b80294e2abe012dc01e60af94323c467f44c536bf375cddbb068c78432843703dd00544f4fff3eaa1a5a1467afaae7815f80d",
- "88b383cb266937c4259fc65b9005a8c190ee6cc4b7d3575900e6f3f091d0a2cefa26e601259ffb3fd03083270eb63db1ffb8b4515ec454d12f0944f8f9f6869eedc2c5f1689766a748d74e79ad83ff6a1639aefdec6109342dead31e9cead50bcc00c5b2206e8aaa47fdd01397b141880490174141a1e6e19268378c1b54a84aba60ca711fd72f7df88e120dfea2caa140085a0cf73342f3c588b7edfb5b5e5ccabd68a32364746d92d536",
- "dc0b293f1ba02a326743509f41efdfeeac1efc45137ac03e397a3273a1f586a0190cfb4ea96d6c13ca692a4de6de905c8338c3e29a04cbae76272f568b9d795cea5d758106b9d9cff6f80ef650d6b7c428ea3946c3acc594907fe4227ed68faf31f2f6775f1be5139dc0b4d73ed6308fa226b9077561c9e4c7a4df68cc6b819b0f463a11b9a09682ba99752c4db7aea9beac1d9279f2c2675d42b551d27aa2c1c34125e32f2f6f45c35bca45",
- "5d801a7413311e1d1b19b3c321542b22e2a4ccbe340545d272abede9223741d9835a0fc80cc9da97a13f8bb4110eb4ad71093efba165b1edad0da01da89d86726e0d8e42ae003b4b50297d233c87da08406f0e7fc58ba6da5ee5ba3d2d7142cbe6632734eb2e7b7863c15cc82198ee8f9a0ae0b7f93bdbda1ed269b3824d5d3c8e78513815b17a4c0cc8c9706b9c77423a309ae3fd98e1e05cdbe9e2577834fd71f964301b10b66c316a2d8f2c",
- "2fd32a2bc15a9e96a100624404fd0a4e54ba9f8c0543d8ccf7c5c2e35f5e8c3c11dfd497320aa903900a4ca55a2b323b3ac4a7cfcd01bf0b448db8829072bee6b77c3d7bec2e1d8b414d907288d4a804d2379546ef2e2dc628269589164b13fceb32dba6fd5d48a956ce0b5c3eb28d894a95af58bf52f0d6d6cbe51317152744b4ccfc918ed17fa6856478d580b389016b772e1d02e57d2217a204e25361d91d4845a3fa20fefe2c5004f1f89ff7",
- "f537b437662759bef8bd64368536b9c64fffbddc5e2cbdad465c3966b7f2c4bc5b96767ef40a1c144a4f1cd49edc4cc5b57e7eb30d9b90108f6fd3c0dc8a8808b9e0bd13aa3d661c4863637c5e4ba286553694a60bef18801299ae349df53a355051dcc46a7d003c4aa613808f430e9db8ca7dfe0b3f0a4c5ab6eb306aeb53e11a01f910064fbe6ca78b2a94fac34a2602f73de3f275953e13ff5c6bb5c39b82321ead17ec0f8ecc479e6afbc926e1",
- "1dd9fb7d5b5d5074971e69300720014deba6fbdb942bd29704cdfcd40fa5281d2a1b9f5b776183e03ff99c29587f10e8d325cb49c5c93e94f5132741b92c4086eec1374dea5c1e772cbb230c7b31f3e962eb572be810076bdb926b63732522cdf815c3ab99bbc164a1036aab103cac7b823dd21a911aec9bc794028f07b7f839bae0e68211286441f1c8d3a35b281fd321312577bbda04f643ecb2a74ec4527bb5148dbccbeba749f5ea19b6072366ba",
- "5bd63737449de2d20ca63943953338ecf4cdd6cd0a726241adb04376385a809cc6ba0f3482a310746fbc2cd5eb214f03a14cdc548777fb0d048d659cd75a962e490c4fe47affc2430a34b10275e4c76752a115aae3a24d4fb4fad89ce4d79d65de10292f3490bfdaeabfae08ed51bda6ec8230e66cb07ddbeec26e3ef68dd71c852900659fcf0c963f4574ffe4626a33db9abf0873dde68b21138498b81e8cc44d354be4073615889a7ddff633b5447d38",
- "a683ec8250506571f9c640fb1837e1ebb06f123e745f95e521e4ea7a0b2b08a514bbe5bdfd316903d1d6a05f5a143d94dab61d8a3a146ab40b2d6b72df2f0e945875a8aa7051ed115975f6f1567cfcbf04c5e11e3a7027b8e179ba00739181ba10b028e3df7259d0712f4a6cef96469ff737865b85fee2c2db02a6423e32505381e18a1e0b4ce3c7998b8d6b1b5e09c3a280b85486d0984c9e193b0ad2043c2bc4ad04f5b00a73956715937eebf6b3e27afc",
- "4df9d160b8e81c42930c48956fcb46b20b6656ee30e5a51dd6317876dc33e0160d31280fc185e58479f994991d575a917073b4439919c9ac49b6a7c3f985211d084c82c9d5c5b9a2d29c5699a22e79de3958d7b0e856b9aa97493cd4563aaa04fa3977a9bb89e0bc06a82296bdc76d20c8d393770176d648712454305fdfcf4e117d05acb5a5b006a9f8d0dc66dca708c4e4103ca825d2331750685c44ce3d9b3e753455580f4d6ac4533edeeb02cebec7cc84",
- "67bb59c3ef5ee8bc79b89a673e331e581215076cc36b68f517ca0a74f74efafe9dcc240e6d8ca4b21019c27d6c9289f4419b4f218eeb39eb741c5ebebfe0ed2f6faeec5e8c477acf71907990e8e288f4d4049111779b0635c7bbec16b76493f1c22f645745fdac2b383679fee573e4f47af45ee08d84f63a5ace4ee1c06fa41e2e6e14b7bc392e38426813087a3a461efc62ed1941dc8f1728a2bdc04fde72a0b786558783c84abd4bd100e4926979a0a5e707b1",
- "d341147169d2937ff2373bd0a9aefa77968ec8f0d993c6f9881eb174a1911e05cdc45993cb86d149a754bbe321ae38363f9518c50dd3faf087ffeeeb6a058b226ccab7858c00ba6de0e8f4d034b1d27508da5cc473f3a413189ee6fd912d7750486912944d4dc34405ce5ccc3885fb0aabcb922bcfa9081d0ab84c288022bd501235a835eb2e1124ed1d48fd4f8682da8e7919321031326502273375625c4e3a7282b9f53452195e53c6b4b57cd5c66f621bed1814",
- "27e7872a54dfff359ea7f0fca256983f7600236e716e111be15a1fe72eb66923ea60038ca2953b0286447dfe4fe853ca13c4d1ddc7a578f1fc5fc8598b05809ad0c64a4363c0228f8d15e28280837a16a5c4dadab681e28968ae17934639fbc124bc59212138e494eecad48f6546c38366f1b7b2a0f56f579f41fb3aef75dc5a0958b25deaa50cb7fd1c69816aa9a51874a98e57911a33daf773c6e6166cecfeec7a0cf54df01ab4b931984f54424e92e08cd92d5e43",
- "13dcc9c2783b3fbf6711d02505b924e72ec6736131159017b966dda90986b97522bf52fd15fc0560ecb91e2175322334aaaa0097e1f3777c0be6d5d3de18ed6fa3444133486068a777443a8d0fa212ca46994944555c87ad1fb3a367db711c7ebd8f7a7a6dbb3a0207de85851d1b0ad2f4149bdd5a5ba0e1a81ff742df95edee850c0de20e90dd01753137cb8f2c64e5e4638ceb893a3879ae2c049aa5bce44d56bf3f325b6c5029b2b8e1b2da8de7d4e48ca7d8f6fbdc",
- "9ca875115b109eab538d4ec7023600ad953cacdb49b5abe263e68b48eafac89a15e803e838d048d9625972f271cc8f36344bed7bab69abf0bf05979a4cfff273b82f9961626509765fcb4b4e7fa48212bcb3ab2b1f2dd5e2af768cba6300a813514dd13e4d269e3d36548af0cacdb18bb2439ec9459f6d847d39f5598304ec46a26d75de1f9f0c2a88db915bd26e45e1f1e68c5b5b50d1890e97a3803c36755f026863d14176b8b57f42e91d3ff37787f9b38e333e9f0433",
- "ec006ac11e6d62b6d9b32ebe2e18c002353a9ffd5dfbc5161ab887770ddd9b8c0e19e5321e5bc105add22e473050b71f0399327c7eba1ef809f8667c1f4e2c7172e10e753705e9a083f5bce88d77521225ecd9e89f1e1caed367fb0275dc28f620fbd67e6b176c9ae5d2659e6ec662116c9f2bbca3a93043233a4861e0688db6dc1800f752c5d58aa5033c250c891d9126e534ed921a9026eb333333fa8292059b8b446f336ca6a0cb4c7946b6aea3831653122f154a4ea1d7",
- "23deadc94481ce28188f3a0ca3e85431964cb31b60fabf381e6bd45ef0332bd4dde774b0281d317dc2e7d0c298fcf8625fa734126968df8b68ef8a35c325d84ba4fc53936ff3ffdd8838d2a8cabf8a9cac54aa444ed9875944e55994a22f7fa8538b1e983b57d9215fac5c0052029644044e790ce2f5044655608c1d7ad3bb862203ba3aba3b526606f273d342ed5721648e3f600942d3f7546f679161436389d879dd8094e1bd1b1e12cde15cd3cda4c30a40835665e4e5cf94",
- "94701e06340114f9cf715a1fb659988d33db59e87bc4844b1500448960af757b5282f6d52967a6ae11aa4ecfc6818c962b084c811a57724f5d401191567f24ce917e4f8c3963474fdc9d2c8613c16f62446448b6da6eeae54d672825ed7606a90e4611d0e318ff00566862c955b636b5e81fec3362e8672ad2a6d222a515cf410482836deba092a51a4d464dfbbab35c50a33437ac16a88256e9e23ddd3c827cc58d3e5000ee90b12e4c5175c5733662d4848ae0d406c2f0a4f498",
- "735b0758d5a331b2304f01081172eb95ae4115de651b1a6693c5b9543de33df25d9f421dbaeca033fc8bff57313b482778005aa9fdcbca65c643da2f3320e34197868eec3848ff3c70d7ac7d910fc332e9a359f892ae01641be253013b554a0d3f249b3586b1857e5a0f9482ebd91432a852b221f4287a6e81ed24e8064645d5b28ab9a13b26cc1420ce73dbc47b31acf8a871601022ce23bc443b1222ce9a037a2fe5226295feb4efd4fd671338f459ae146032697cf82fc55c8fbf",
- "c48d94f14549352790079fee69e3e72ebaa380510e3581a0824066413e7044a36ad08affbf9b52b21963d2f8e092ff0ac1c973c423ade3ece5d3bca852b894675e8173290529226939c24109f50b8b0d5c9f762ff10388833d99bea99c5ef3ebb2a9d19d2231e67ca6c9056d8834730605897426cd069cbeb6a46b9f5332be73ab45c03fcc35c2d91f22bf3861b2b2549f9ec8798aeff83ceaf707325c77e7389b388de8dab7c7c63a4110ec156c5145e42203c4a8e3d071a7cb83b4cd",
- "553e9e0de274167ecdd7b5fc85f9c0e665be7c22c93ddc6ec840ce171cf5d1d1a476743eb7ea0c9492eac5a4c9837c62a91dd1a6ea9e6fff1f1470b22cc62359474a6ba0b0334b2739528454470f4e14b9c4eeb6fd2cdd7e7c6f97668eebd1000bef4388015630a8332de7b17c2004060ecb11e58029b3f9575040a5dd4e294e7c78e4fc99e4390c56534a4e933d9a45460f62ffaaba25da293f7765cd7a4ce78c28a85013b893a0099c1c128b01ee66a76f051dc1409bf4176e5afec90e",
- "dea8f97c66a3e375d0a3412105ed4f0784f3973ec8c57b4f553d3da40fd4cfd39761de563ec96a9178804641f7ebbee48caf9dec17a14bc8246618b22e683c0090259e3db19dc5b6175710df80cdc735a92a990a3cfb166461ae713adda7d9fa3c4cf9f409b1467f3cf85d2141ef3f119d1c53f23c0380b1ebd728d7e932c535965bca41a414b6ea5bf0f9a381e098d282a554a25ce41980d7c7be75ff5ce4b1e54cc61e683f1dd817b8e2c1a430d7f895e5e7af13912cc110f0bbb95372fb",
- "9dfda2e2f732867e60ed2b5fa99ab88eb82dc7a54334d02031258beef75fa4bd6962a1083b9c29e4eeb3e5ab8065f3e2fc732675b8d7705c16cfb4ef7305eb58120f1af5ddc55872a2cbde3a48661a0598f48f63e2e9aadc603545e2b6001748e3af9e86e1830af7b84ffd3e8f16679213d37cac91f07af0af02b37f5ed946ef5c955b60d488acc6ae736b10459ca7dabeacd7dabcfd656511ac913174f6d99327be59befe3e463a49afbb5235f0ce2840588c6edfbaaba00a4211c0764dd638",
- "ddcd23e8b9dc8889b8599c721e7f8ecc2cbdca03e5a8fd5105f7f2941daec4e2906c654210bdd478374ddee43ee749a920ee91872e057a1157d384dcd111266221b3c79774476b4862fe450704ff2c5353e9a936cac87c96515c28ed4c830335a55d084cb5873c5fd2dd907f3266d8eb7bf13b6dd7cd4966982a0949efd8e428dae13daee549e01cc3c226211d6307823f742c5ef2155601a4644c46eddd603d4abd959c6d242e427768df3b1e22d87971df58a1564b38311a897c85b497a72556",
- "39016647acfbc63fe55a74598bc1956eaf4e0cb49d532c5d8323fc6a3f15a0231597f06eafd74ad245e672bf6b21e4da503cb5bf9d15e9038ef354b38807564d91f38b4258378ccd9b9420a1562d7136196822a1291c913d83c4cd99fd8d420990c72cdc47607124de21da8d9c7f472fdcc780379f186a04da93cd87628abf323c8dadcd7fb8fbade37d7d2b5c9f9fc524ff77494c98f42f2158a6f68c906105ca9e8bb2df463863cfc1e9008d8344f55c4e3203dde6699b59812d49ce1279fa1c86",
- "02cff7567067cbca5911664c6bd7daaf484181edd2a771d0b64566c3ab08d382e83932cdd7b4dbf86c9cdd1a4c353a511e68afb6746a507a9cd385c198246f4543d606c6149a5384e4ff54c1b90d663dc7a4b91aeac3cf716db7ca6f9a1914e3a33efe82e7ccc4215999c0b012782402db4726db1d7d1c73571d45739aa6fcb5a20eeb54a84d5f99902a8d356cbf95f34c9c28c8f2badfbc08c69233514493c0c04963268c88bc54039ab2999c7b06cba405936dfc43b48cb53f62e18e7ff8ff3f6eb9",
- "5764812ae6ab9491d8d295a0299228ec7146148ff373241a510faee7db7080706a8dada87938bf726c754e416c8c63c0ac617266a0a4863c2582412bf0f53b827e9a3465949a03dc2db3cb10b8c75e45cb9bf65410a0f6e6410b7f71f3a7e229e647cbbd5a54904bb96f8358adea1aaa0e845ac2838f6dd16936baa15a7c755af8029ef50aed3066d375d3265eaaa38822d11b173f4a1de39461d17d1629c8df7334d8da1b6401daaf7f34b2b48d6556ae99cd29ed1073926bcda867421832a4c36c7095",
- "4df3043cf0f90462b37d9106e67366d112e4938c4f06abae97869531af89e9feebce0812dffe71a226de5dc36be652e26ef6a4be47d9b2db5cdd43809a565e4fc0988bfe82037c505dd276b757b785203249fd083fb474a25acccc9f38dc5164ff9097e05989aa6e280739a755231f93670e7226e22046914c155bf33d135b3f736ccca84cc47ae643215a054b54b7e13ffcd7ad73cced9279dc3210b80700fcc757acfb64c68e0bc4da05aac2b6a99d5582e79b303c88a7ac4dd8ed4289516bba0e243527",
- "bf041a11622715426c3a755c637d5f478dd7da949e50f05377bf333f1c62c671ebdbf9467d37b780c25f7af9d453fc67fafb2f065a3f9f15d4c3561eeaa73fa6c813bf96dcf02430a2e6b65da8d174d2558110dc1208bdcb7898e2670894c0b9e2c894da3b130f57a90ec8ea1bffd27a37b4da4645c546b2b141db4e2c919154dac00e78dd3eb6e4445974e3bb07905982da35e4069ee8f8c5acd0efcfa5c981b4fd5d42da83c633e3e35ebdc959bd14c8bacb52212b4334f94aa64d2ee183861db35d2d8a94",
- "a170ceda0613adc9c3a1e427f07beacf3b16ed69fb42b6bc09a38d803f632ad2929dba215b85683b74e2feb1d18fe17d0ea0db84d1be4e2e73476917a2a4cff51d6eca7c5e82232afde00dd2286a4c20eb09800b4d5d80e7ea35b6965b9792d99e399abda8cf32174ae2b7414b9bdb9d63e148f7357635a7310b130c939593cd3479164724011966c4232142df9966f09422f34f20b30af4b640a2c6d3dd985fe0ba3dfa9083cbb9b8dfe540ff9f6c608d18481213040768ef33300d773f9890c724ead320a1e7",
- "929477e9c2d0bbad3429a0e0de776695255013108261dc6404cb09828770e274d8bb650a50e490dfe917fc2047b0f8ee72e105927d9fa70523c727778cbf6ae876d641ad562938c870d12f2e047bb78920739dba0c3f8ce1fb77589623a5f1625f5d6ab81940c7dfc3dc3a641d82b2813629bab8282999317d6b93842334f123fb4693a9c2c9d8ba9bfc746642dfbd045cd2021b272eab7358aa954d453da53fc5392dfa7eb881f6f53809b692d27f3366595ff403289efcc691e118b4744a1147071d8909bef1e8",
- "3e98bb14fff5bdf7db38a3960dc55ca7d02333daed8712cca13dd5bffd114636559279db72554cc0a0ee1f7e15557d77cab0f2f1131f94fe698db81be38300a856a5eca85e5cf915fb7b6f38ccd2f27350e62cc30ce10ffe835118be3d435d2342ed3d06199b7e20c8e34d68902f0ab8745bd8b7d5b863d525c1f5906d2dca598db8a0f1e67736182cac15677579c58b8c670cae1be3e3c882153b2aa2988933e579ec2d6dbb00c671da64443dfc027dee6dfc3233c99758304570a982bf9b2eb59ccd70d0b54c4b54",
- "aa12c7fa50ffdc2811c1872e4bee15f43e6909212385c872eb489f7e06dc1787043f56126f8373bdfa4b3f61405c73dd4dfd3f40aa5cd207e8520849c26f67716a46c0989a99efff42f24e0736e327af8e607c401a1bac77341e9a78c91e35d55b2457bdd5317a405a1fcf7a2a23de68ef92b65819e8aa3807c545361dfc9fe89125123492da958dc313cb5d03cb4b192c54ac6b27fcbc498652f5ed36b587bb74942b3ad453a8d79e5ddc06ebf806dad5046b73251064582ef5777dc530f8701701761884783fdf197f",
- "83e615cf6e17a29e63945710b548a6d9935850eec69830841e26cb6071e908bf72c87cf079ffb34c5eb1a390def72d004a9488224a18e189aa1092a0f1135712834d257a53dc1d0e2c6417d8f472ff13b181910f4c93a307420d44beec8875d5219a3160b8e921434ddf3f71d68db1c1d5c39d68edb7a604792f8b4e31ecda7895c99fc7031a5b98a22009c1da005ac8fd2da0b5d742743f5712d12fd76d11a18e487776ce21ca0d6e5ab9ca6d8c394c321b91c14e291399a642721361811a73b7392e8603a3004e7060bf",
- "ae1a8f7bfe4b1a0fa94708921dadb2c20b938239d7b9a2c7c598528f20f49764d322ebe85a5b2ea15563cf2f2304baf55d6607c52e2e1160859dcb7af6d7856899eada0e9128a180d3de6fed9334ba52b80c5c362d5591a0ec30f86d37a399927eb1c53076a12d26775522c511c83eb5b7abc2a00bd2dfd5627a8febba53d85f9b74c4b7f0c862ddb0d9298899b646b774d6cc23e4e23ab47174fccd34499253996d5e0917210e2f6daa1685f89f2f1fdfd5509ebc38191d539ecfb54ff0f5bbe6ef36ea35d425af6462f518",
- "1d033e06be253ab800c8176d3a9650ab2a5bcaa03e11ea95fb9ab3834b41eb0d1b2bcecfe219364c3104ef65a8d692bd77c798548b7d9a8faf7f5172db24ec7c93006d6e9839368291b8277a82c034a3731f1b2e298d6e0282ec8a7902e4f844d132f1d261d171375c646065e201849f2df73e3748d853a3122c2206aac92fea448500c5418ecfb3d80e0e6c0d51f85831ce74f6c659cc291f5348a1ef8b949f1b2a753633e382f40c1bd1b2f44748ea61127b6f568255ae25e1da9f52c8c53cd62cd482788ae430388a92694c",
- "104bc838b16a641749dcf73c57b207ea3bcc84381170e4ca362065a3d492e892b426a1f4fd82f69461d1ce1f3aaf8fc291ea30d6667e7e1aea4c44f7d52a5fa6d34709e6658483260ff5da76bfb74e7d194ad40dcac00daf0e45e74db4bc2248100a8b256b257278c3c98f1f2e3a80cdb812352aaf4155b3a4033999fb9fe7f506994fcf3a8db31e9e5ca8ef8c2e9c6326ca5b0803724ba641950eca877fe6ed6afc2e014651c56d0e6a61eaff7c5ed0b861d4bebe42904c0a568c26aa8abb2e97da2bfb40f14eafb6bf16cd208f",
- "5b92e4a175437d0a53eb10de2c56401720b11715a034459ebf506c3fd6534b5e817a0f09deac4bcfd353301d8d031b1331582ac09189b48e6ccea444655866c4bbd123d45ebabb774f877cf12d33b84cfca4a6a94f3f98869fcf2bbb6cc1b964c2438c2f348bcdf9001dce60a4706d20c169a040baa61cbeb0b8e58d505e6e3739ab03e110ae7efdf91347474033defbd1e86af322ec6456d3394699ca7ca6a29a70d9b10a38fe666eab2858bfe12dacb31568549c826c15af5b6fddf779954351be1872f04e53db7b3b5fbf61fd18",
- "401cc7bd9f8227efaed70dad83fc8db3bd38efc166f0f11ab142c565c68ba9db680423a3d698b6f3476ef440051fd20b93f6a2ed045825567df5a65e3f62e4442ec396ad260a16a13a1dee46c7e8d88bdd7edf223ab76a9a787c1f4fe9925c051a4ca0e77a0e78baa29f36d193c862fd3a60653f544ea9e3f75f2f553891be8c1fb882f6a6aad118f576f3c2793efc67221b37a45ab6137434f6228cb002fc137b91fb8572c757f00736879453d64a8a868c131810ffdad9e9d028d132157ecb1da675d54047d19b27d3258c9b1bca0a",
- "c20cf0354982ca6a19d9a4dbf78f810934db2373941a12c263adefa61a5f385c859bc47028829c531dc25ccc0004c7510e707175a102ec3c4b4c933e3f52033e67476ff5f864c446c042a21e6037f7798363d20267891b965879fde80af6b59d77862e3a229af01b7ac78b578e94bd9f9b073c38a627c1864df0083aabb17024bdab6c3c0f0f73d31d59480523a2f23b78baa0385c15f290114305d7f98786b7dbc17a8c2aad97448e8ea389e68ef71091a6a9735ac12ca5497b9171da11a93c28d3273f58b74e2e46279d3ce9d0b20d19",
- "e2365c2754073b511f16a1881ff8a537541ca7362ae7b84223d3c7d1d49d03a37d6d05dd2b819af9705c015dacc9dda83474eb14b7d5fce6e8a8f8c58e870149338d320e5ae476da6749af45e65ffed550d225a39dc74ffd93ba7da476985d6f44e90fc8e82454496260458431804d802fe804d825f611772f9710667377adfb1a11e4275bcecb42175c515f6a9439a359824f82cc9d480954364e6693099a821ace362e6c7ecbe68be8823bb5b49b4f23ad81b64139e3b63d9d4d298a842f013ef0d91ce7915ee8f816c70ba2aa3994216f",
- "9c43944676fe859327096f82049cf69e48b98715878400fdf2805e0d5ee642e6cc9c43739f418b701348a033c5cb96bf8702fcd2fac9be58262a843c1e4155ed8a1724b6ebf7cce659d88a95a0c54deb2d7d9574a45219b6419ee173d1d8fad3ace47c962b349abe1048565df85bbd0eb9b11698258c23598023a00fdd26573e41951452027125c6e894a97736ecd63fd15b29a55d8dd9dab7e2e18f541a2e341890a61b7c896e7dc67aa82f3479dacd4a8ec7558d40c34d9ae4060e13718d676c2450258d83de8a86e012813693098c165b4e",
- "1c707c29582d98a0e99639211102f3f041660ca03ad0939fe3855b8c1b22d6a9b8673c93e3eabc0ab231509b2b0d73c76a290a363943d12d2ff0ea30c6dd54eda753767effe04cabb4c3966388fa4c83a1906a0f48519a5fba9aeb585e0f8c45d6123a75ebe98fd1d0272f733a3925119481a321fe7509346c05128302851ba17a137f956f184e057a305e79a148727a5926de6854eb0314d5492fd735fa773d99ea34c95ca7546bd3a3aa8e66bcc6d860cec3d35d0e2165d5fbe8be99b6e7967df6693e5a6243e94c9c4a2528ae6305cbeca209",
- "8f1e88103ffa378f062cade0ec509bec99a5c73fb273e79dbef24abf718ac26ac23dfd2b8932038ed3cb9637b71643c161142019f45b25b4fa4c52356737a27027e805ec635154327a66bfe64efc6285cca98c34edc7fb6c0766970a545342cf840aec0a5ba1dd3c6949be4fe97b0f8c8186de07536fd9074db34d09b2f08af9dcf9424d6edbf9cd044102c0e5dc35aff78c36d079dbd2c500e19c8c985ae2abaf6b2a20716bb719754a8840ce97632116c4d0b0e3c83ccca27f11c4204b76b5d6cfe6348a9615d8e4af53500dc4c2cabf12ec8c76",
- "b9a0c28f1a6156992c103a84655fc6e654fa6e45e45819513afa797024717c00cc195994512fd53ecd1e12dac4d2448e0c40308382312084d2111f7db147b2e6589ce6d977f6115f629508167df8f45bac98abd49f6b272bcc4fd874dd5e29fb6daceb2d727a2a892194cfb9269eda00626ac89b4e74bd29b21e9f6ef18cb69889a02d4f0a06a2e5718899c1dc3b051c2cfa29653e782f87fefa478e6465bf5ff27f8b6abdb500077aac97100bd955ec535a587d66f23354be51cd8170289344bac9451f74e8aee3639f7c09981f4885e018912324d7",
- "456844a34ae1074246f8f71eeef2010ec8733265bed7c1cc60043d770edfa320cbd4284a94be2574337e16d27f125074ebd7e99031f7abb4547b9540a7b0b5148ef501b550dd929f3dfe39ac65519f563e9254424aaafa05b1d37c16c771882e9e25d4906ac58603da749adf686932cd73d81e2658134fe69294c7a521d257eaf2110c667fc9d6f09b52d24b93910e532184eeb96eae9d9c9750ac3c39e79367431ac1af7011172d0a8be46a31010219a0310a733068c589bfc4748f3626aa4ff8d355cc893d05111c287c9992e95ad47481a6c42d6eca",
- "c5c4b9900b9727bdc24baa544cad5faf8340be6b3759361f53889f71f5f4b224aa0090d875a00ea7116772117dbefc3a81c6950ca7ceeae71e4ba975c50d61fec82e6d9448d3a0dfd10bb087bdf0673e3e19fa2aaa7e97eebf71f11b86034fcf5a61240c71444ac3da15ef09b27b3523d37d309e8722380f835c1aee4a767bb027ec0674040853e5b53d6a31657f51acff6d2487860becd5ce695696cfe5937f4a0217b69e01cc6facc24dfe5f5230b8692a0b718e3b3c789d682db36101795a9a5f8bbb838c3679be72f7941a1db180135347d0a884ab7c",
- "1781df2fedd2c39137854737d054cd3ed16b0ade411e41d97888ac900fdb46d9ae26b3d2dd07e118fd57eabd0dfd03a55793c76420666444865371adffc9b2f35068a0d70f9cfda1ac27ccb4beff4ffa5b8bb8bddac843386675c38a181fd0d935d6d51b25d78e7ff4ecef27a9853c0f0d2879c395ed1c4883987d123890d04f851c3e042e1164c68c0d503de16816f4b0e554236e5f4c339ea11d01ce652f6208f78f457a2417a97c0a6a240f443262def4b6763abf53e597bf1a28f907dc7cbdc751a234ea7d75710ad5ab0c37e8e9805102a375abd44011",
- "8963552ad1e729ead07750df599d734157aaa4bcdcac17e8eb19b4f99cdb162686ff433137aa4e8a0cc8df0053999196262115aec326cf37567d9ba4760e0ad21d5763977f1ab9b35c0fc667890fa87fc946ceb776a811b5adc69446bfb8f5d9908029dc5aa38db816e4a4e8f98e5a48cf0a01627031c5bd1ced8bc1940dcafe4ae2f1199b186468eafc07e96a89d95dc18ef0fed3eda5b58ce58f221a47ba5311313cc680367eeb058fafc7bcadce5f520b6371489d9e529278ae6ee2650a85aed82896879038bbd9aa8d685fc9528943ccf2235cdf69a86464",
- "23ceae3008085134433f5de4b47bafe0f443d443491e6cd47b216dd2dcc3da65239515a6e6b9beb9a939ae9f1f1f5e11f88326475e0962f319d9bf75ddfb4a46e7cc3f799d7547f3c0b2e089018b75787b82ea1a7295e7411f4852f94c94170e98bb0647923b8eb7d184038e56560da46085540cbfef82b6b577c445d038f6c93fbfdfc96ab3a0191d20a57b8610efb4cc45cd95198198e6f80ac46b0601511885f650eb00992605be903bcb46cd53c360c6f86e476c4c9ca4ad052eb572bbf26eb81dd9c73bcbec137aea6ee27aa97dadf7bef733fa1555019dab",
- "c0fd31e82c996d7edef095cccfcf669accb85a483ea9c59f368cc980f73da7202a95c5156c34192ae4ebf773c1a683c079b17ac9d08b4265b4054fcddaf6666ca50f38f1a2ef2497459a68c06837363a526e850ecfbd223f55dba67db017eadb7a9139abb5bf3854834478b838aafa16c5ee90ea52fb2f7b8db2bcefb85b06fc455c2b6c27d0af9a49dbf2f313bf2599370637393e7972b31d8bf6759f3e6115c618e672831f84d76ba1879c754144e1df4d56b1e264b1797dcb8ab165040c8d20b931071081d7f74fbff590bdc8e888e71acc6a720270da8db7c821",
- "936fdab91fba396e4a8754a97a04ba333daadc29885c9d0c8fea3387165278f4974e468fea57f2bfd8428c4d0f010833283db73735d39de0c0cb5898d0c06c0ecd05f61098935cb6130a8da60d1a6c2ecfe420f972263fff5a631b09e81c837183c5528bb1c740b36fc39cb082f3383c2b4afb25d04ad1d1f4af63dcf26a0bf5a647cd2e35a51cc119c4dc5031f5715b3bfa1f2b92de06bdac0d670fdd30980f32c51f3936b51e5db6b95a8d36279da5faa4c4e454f2b7e54e9f488071011c7f6f9b63da260a2e46d796d36c9a9dcae88085806a10a77bbb670d475778",
- "a55fe162b287bd6eebd6cf7e7aeea8672322d924ae42c7404ff89aedb98943f3755d2889bca488cc7000e6e9b8e7a0ef289273cd29c44cc600e330d1775e3cb767f12150e1615dca8c3f67466463a3ca993a1b788cf67a7a35b95dfff954206eb5ea1e1bf7fb06482a551625b5c9fd9a86e8414c8cf79d3a14104a153cbe04aac5172aa4c4a89349f5856c4262dd1d7317a7544c9afbbed449e7dcc2b58d9df6c9c9ed3883e42e80f5c2433550f30e73c7bce0fccdd880adc19282a392dae26a0108e7faf168cfc15937aeb046d60712603286b8ddfb27916b79242d56f1",
- "2bd6976592408cdbc4e41dcd3ecfbb786775ddedef914d9058e6753f839fdfe15b17d549dbc084aa6cdf3befa0158aa84c5d58c5876144fd7e6c41ab7d42419d0dd353732e0e6d3fafc4f5626c07433390a4fd467197e85b5de7e2cf1c26cc575356adedcc0740008523b503df12ff571387726c5ccb280376d19cbacb1d7ce7aab8b13292c6a8b8881e949cbf6d4610d16ebba1d46cdb8d0459596e0aa683d0307bd926e14de19b9bfeaefa29d91b82248604673a455520cbb64eef3f38cfad8e126a3b1cfa1aaba53a784c8ae0c50279c0ecdab54095d36f67ace9b8ebbb",
- "71913ae2b1c8729ed6da003c24a1d4f96e28d7faf55ca14ee0b2865282b9b61103ce6ee0b00b00aacf2081adedea5616f9dfd22c6d6d4f5907bcc02eb33edf92de0bd479794f51246d9b612b4543f6ff633c4fc83bfa6144c9d26721cdc690a3d5a8db54d8bc7873bfd32924eeb502810732b5ac2f1852bb021c401d26c39aa3b7eb09083093a9e89bf889b53383b5af61110aca1b9fdf38908c7d5a184fc5f46b3423a66a2749feb8de2c541c563987278dbd0513d99b732411012b5b75e385510de5f6839c3797dc094c9501d5f0504b06b43efb6e746f2129ca189c1da424",
- "9d048a83294de08d3063d2ee4b4f3106641d9b340a3785c076233686dd3382d9064a349c9eaa78028d35652078b583e3f708e036eb2ced3f7f0e936c0fd98f5d0f8aa91b8d9badef298bd0c06843831279e7c0c67ca7e572f552cfdd984c12e924c08c13aeec6f7e13d161785546ebfd794b5d6a92a4744e52c4cab1d0df93b9468be6e264e8cfcc488f9c3c1817cbe501f4b9cc5999483b7433aea777226b25273a6ef2331b5f3b6db8091591e8e276015da3ef78bb2ee0526ffe23def2d8d193cbe594e8ced1f3d216fcedae2a1eb288da82e34cf98aebc28def658ee0849ae7",
- "3251c96cbf82ee2e5264528c0b6cdfc23d20e1eb2d6441b5d62f0fd24c692a0d45a8bc8aac32884b7141ac0f4f113ec9fc7f6b4db3d696374177f9a42d602ca471275b928f639105a55b846da9ac7274cc37de8c38541f6895f94d72a81e117844b46601c201f7189b935a96e42505f2098ac985d92dfe86349a706ef6325b3c2e4060ced3c453e68ed09e043bcc75846b80118dc53530248da250fb57922d0afa53a7b2c89161aa4fa372a46b2a8e1307741cecedf585d2f998a9d496763800b6965c38a5d8aa566c709f13699c8185ab4fd8fdc8b824f4dd6d1c255b4788f50574",
- "2de31dbc8a012254586f3229d3524fc529554e98850d30acdfc11406bba6a142029126ac165ee90b2de7509fc3571a8ee12e16b05054eb8baea879d135b39627f0d8331be3e66bc720c2096ce74e437daebf3bc53d8f2ccc228c3256d3edb6e9ae7c354a0c9350e6d663a9a30630bf9da3d96b96608a2a171ae28105714058b6c4b38a36c56561c4612c32aad25c65b7fb6faa4e4ecd44ebf9b2fad42ff9a807cda2581614fd30d41a7436069399b8d4f062a37a5bd4066a93d541fa5797a7d3e7dc9c4c40f0bbf5256f71613240f9ef128b3423eacaf428ada06b6a531f835281e4f3",
- "07dadee629a08223dcd7ec441287b4c5e26347451d9c003e3a8496b4ea313b51126283a6720d7851e24423d9c9c818b4601247178f38a61f45fd4c8596d79529d416834226666a2c8552bbc901cc5cc3406a18fc88077fea52e1b620748553052ab7788c0d025b095b736fbe714cb3a968ec16b5917652eba2d7cf32ef3140d6c27b25d053e9786d24cd09a5306a0ef55e46201faa6196a91084267d7a7b5ca57c2efdeb2cb97d682d2a191b915553c8933f1d1b7faf0b4a1d83ef611f1e44438bc1c3d860fbfd12b5f26e5a6889a31ce26ae6a55c7a563b5816d113423ef3f25fa9befc",
- "1d94166bb387526d519c4ce150221954da8930f66765fe6a5504e30a69962d595cfdd07a82c003843598864261f053bdb6f5086d516c261e089caa89990f0967605768ae9200bdfe4dcd7b77a93265cb33d9851a2a1036113c732bf3f37534530641300f0620de5c16101e16f4baf39d9fcbfcb01c52afce0992c329d8dbb438c314eee995c5020611d6f889e06b8a032785cba9a415580dbf752b5e510523c89f478cc6f047bd926f51e4a965c9749d1e76379c0e7e5b56803893bafaa4d2892b4c52f143b2fa777cd1035ea418684b8019df084f9a3f1f768753096621f342895c510d01",
- "fc0073f199ed8a1d6edc8e7bdf182670003108d82b283aba82326e856f8de378987a03d0fe8d2041440fd29d51c63796aab44090d2b14ee00859b3a08cbe88f724badcd3c401226c5db8b307b8deea5be305412b080e9f99cf79d6d08d3646f347a7afebb62912e3e246e2e726f9aec5c101d916e47f984507b1d65d313697256c77da7eca3bc5811c87bee02a2826cefff0d92bae989609aaf95d70561b40d98474c37277c884aed887a1606d206b11e8a8a71d1f1d19319557b57351228ff0404be700a6cc56c0a30f3d4b7a0a046463fdaf19e7d5f59e155f378e35baa33db1e881f2207f",
- "f42a6a91278d6a076feba985b1cf4ce0af1fa9d6d039c136e8971e665ff088a10b6b9a379a6f5526fc5957773a0ccb8972a4a19be0745ac13937030a54b18dee4f4c5df47a58a33a7516b90e646e5da999166ab0e52f457f7c9b7e391836a687eaae37b377e59a4c995ab0c57162c307ab951a9ba6590f429cd27250e7010eb794ec1b1ec35f8aad189b2fd3e8aff24d93601d91a4884e6f84b02757ce7620a02901519fccfda52f68ad6df709d112a9c25d66bcbb9622806427ca8b8d346b6db05874bde800cde9cf17df4b05baab0f133febd1ebbb053b49c109a7f5b1f864a304d10288e2f0",
- "bbcefaf4a0739509f8a2f831c954071aac52e60cfa882a867b8b910dcf7edf92e1c0692bb027bc378c460a01cb6ecc8f2a012dd84ee5a678cd497b1457b6d393421fbee98ff544fc7eba24cbc3aae506254d9a2d74dde74437ce4c8a69010718506bf4c5943342a942e5e2d3406a3016280b6e37954c5d5e763346251afb0b746cad68cac757f9df765e092518729cfb9a5e76300c124e708ca33591a369767ffb63933cb72fba67beb2223d98984d0b75eb5d1a38615913747b520b3d613c715c0c77d2987bb88f3c419bcc5d38573cf4a8a4f550b2d876f05ca252d88c70a561d869a5018b32f7",
- "dc2437010cb05d9cab2af5c275e1d2acd627ce19fb86355df91fb8d059e60d591663c8eb077d48388c9a321057a98136f49f0098348d9f29d808936f98bb1787c7ac75fb14f6076dfd2de5b59b1fa4848cabaa9a99a091dc24b561911c392ecdbe53f4adae82b852d830adea3a10490c908e337ce0a6d12354ce05a37ad3a06696b66820af8a1f67e6287533fd6f38a5f6ad1c6b078c08baf2c37d2683af01e6a5b33796c8ae48935a888f9bd265f4f11a4e27c433b8b1c9afd140bcd21a07e24378ad6badde8e47c57e3340f49e2406e8d49afadd65eaaa4c3d078c27d7e42118cb86cd248100a356",
- "6c290db326dd3152e6fa9b9c0cd7d49e50a0221b96e32f5f34a8cb7d0c2edd3e937a7d025d6999b7b468add4d6894d8f7aceaabc18f4d9c171f1fe95ea1ae8570382a8450fbc595d95b1f51d24e1abc2970b0e1d20ca40aa21bdfb3656adf2f19882eda606f5ef1c03174e1d94c8d12f0fee8dce6852f42a364eeafa27a7971d4379405db8e46baac4d685b969238e5df06292a6c790bf1994a051b038e1d8db91e1bc4804f32443781c34a552ed2e8100cea374e77af56ba0e11c45990d3ba68df9087b1f4968cbcbb1c42f99b7267c76af926ff3134e093df28fab039cad420c6b70f2d9b5e678c155",
- "ac724a22ebabaedbbb052953e3c264a4b6440f313bad501cdc1484b64f33402a2230898776db5c818c28035ffae6ea24abd04b7159e42159833903a0c23a7c564f7645e49ddedb748fd9e51bd6cbf2eced98caaa35226970f003ce1fd260ac5795e096f1c04aebf8fd36e5e2adeea929b5e963a3cb71d6b55c85bb7d3a2b03a7e74b4416de8fa68950168d7c3ae8ed2e29bad1e8a182a7c5418e5d564373163778cd3c34e9d320eb1a60480a8f98b12e0026cbd7752e6079812e3767d9f55f3f10b8c214a6eceb2a58954091a06b33862af171a9b60bf2c6a44e8766e6c56e98092c56f2a8510f6d05c103",
- "8c70114f7cffb375c2b9a06e27297a5c32418b2daf68af5bbedcc7106edbc070e764bf40c1f8eb15079e2ab77f898afff3490108ed9afb7ea9cb05df41d263be0e42d2321d3d2656622d7bd232bf68d37375fe7314b09cba66f19c8b59424198ee69e7a9f3de0ecce0685127807ce336fa479ccaf7aa1ebc4e406271ce6c4923ec36093516498cc227f9218869346c80ba5ae83e023aca0ae2bc86b5bf5d115a4616b6587cb869d92f8c780ab70d5766de07a204af5e1c8dbba622516d2e911b36c82e4687e4d258ea616c07f76ff0baa376c8d5975cffac0b25817f779ae3ce88b72eb47e378484ce999bf0",
- "0733d59f041036398233fd47a84b93f6778ae5259ef5d62aa3b9faedec34c7edb570c18b2a5d2c4c55cf656d98a1ae396d45a3b746b7ad6f07312c3d05d1a50ffa90bcdcdba105e25b7b0c52664223f8c2476925d46dc6ea2406ded7d0b0b292f6656cebcc7616cfa4b82aec68b35d1da67f6ed2bf0171849d6bb65128d8a140ea5cf97f1003f8d7093bee077be78def4f7bd2caccbf0644f26b26285225142c40038484c3bb9ba9597744f4389e76dca3eb695c33ccc621cab1fb603cb3535a0ad318d220385d5e94f8674f3d55e97e097f8d5c049e911946afbfce783819951d65d6bff4567dc951390d1aaa",
- "398ddbba3dcb5642c102efa841c1fcdaf067062e7eef8e2ee0cd73d7f77e57372d6ee1a9b7b6f86ad12d575001ae71f593449cb5a476c6bfeddaa2af0f9239c1d7effdedf66ceaf413707b5ab9661a7cc0ef8cfe4d1651579c4f0f64e2d12a52653c54f2dd60864e769eab8a627c89c56ee93365d031f0d2523cb95664b1575d51b122f33c9e94de75432a690658c977b68aa5b721a393f9b9b3b612c10e920a7d510c6d8460b35f8614c42f5d2c241a01b28105aa7c1b521ac63ebbedafac6d5a38c898e8590f918a1927bc53aecc2b1c8b18d7df9107c6997d9b3fa4b0bdb1c603da619d9e75670b97a5b40f06",
- "ef07bbc7c4150dd47f8c69a7989948fe831dc798b0424dcd6551bfa8e88216095a7e5d720909bf3d23526b9ba464b66ff6b63a7337c31451ab9a15f04ead809a62bb52206237de77597a730106d02d227dd6099ea9ee2a92cdc446ac3b9d024e32255adb3e9b56b561c431e0b5a721f0336f19568a5335d0ebc6c73ed8ff2c15e219477d9e4b67f2928e251f8a61a2848857e037d010806c718ab062967fd8e85f3722252957923f5f9005aae47b4b1b3fa464e3ba9df573a56055f17e903126fbbcb6cb96de92fe617c97f84ef3ba0d8f2651dc4aa80c157f372ae1bc02e5067ad076f3fe48bb72c0f3c99273f82b",
- "c7076986d2333f3a6752adf11f1a9e5c6bc4755f341073cc86a9c7519c8db029d5ae833fdf3fee826ff4692c57880c5074620ea97c00f1dde1e8a0f18501627984ded4d1b5c4af35be5cc1bcc868060a49a968dc0547acde490b4c68d79924a93a986aa0ad060c7de706e8a99ce8f84a4f8707b52a8ee122b763ba580d6b1f35f6af25094c69f49247da96c836991851ad36f60bf577863d7471608a012afa7a56656abeee7cd9b4f1f4d9d13a8526c0f33cd251caf7486639e787250390e7e488e9ec311fc3d847a7266cc59bcc2bc34192554aa57cf25db10ce04bdabef3fde6db85f55195ecc2ff892b2e268ebea6",
- "01789f40d42d8d3e4a416fd9ae7de78c3a30507809eda200e1afaaf8d7020cd1fad18eba62d821946f220506cf105ff0e2069a771a2c233714afa6b2f695497e4b95c9693dbb93ec4c9a14720676aa87ee31dd34e4e081756477032b4a57b328285f2cdec1b269754c474936927e93acc26012aff1bb36f30c2402aca0a9b9ce9568f5000e2c934263933b436c94f8d6589c89db7edabc5d03a8fe795fe50c5166beab64ed7c22662b984ae2c66dbe4c090b0df603b27c759278f8d66859afea3f6a8f02c2c2a2202b9fc29132256f164b5050a803b43688dc4c9ba86374a3522afba5d1a19bb3820b883aebc267627095",
- "2c61944bd6a50da00ebb951d2b67d79fc6b6fb5aca83b1de3dbd7690ab756bb1e1a21051ccf1e24136ac8ccb42a2ee10be94d2cb9289d5f52b6f90e9d07a3478f36a1eb7d08c3dec52ca154fd1427ba92a4ecbe73a71bceafbd26e9a39d50821e2876d3a0c0e6e373b9795dbf72ea29cc439ff42706be798c90d4617b39c90ec84bf9fb699dc8a9a34e25d81759d6c57df45efb1d0d68aa51278564b99633ed5dc464bb7d53c5c21f798f33bcd868657ecfe75a1ed8149d394b398969ef624831b30f1458465bfd2fdf3f284f2ffc54bf2817b5fab2e02056e864f78bb6fd870c64f3609dab218f25da8060f756e45121e79",
- "942fa0c68cc72f69518a3a7aac0cde45bab0e928b5cb2bd24d049fc313f74b6afa87c4e34150484f3b5200163f8a6472d04777928ecc49319539fc17d71a38090f55a74f757fe45781a3c09f08dcd3dd4c73c8533a5e00cf8a86ebe77fe45be2848574f7c5d25e9a0632a60d2dd41febdbf987d2a0487e4a4ce6ed5f49f2d741a88ecac232b1498253fa4ee8147bbd0f600abdf295e81f7570015aac5fe6ca7bb4a99bb3fc54287106d7fc1132a574af49db82a7b9a5f33e193cde527ca2176c52cdab672165e0fe5720f71ada57ee90060aa069ae2a0bfe67c1b71b17c601c3c2224bf9891bc11ba216e3ebcb51fd95b8d7cb",
- "0d68cfe9c087ec116fe7572042385159cc705960f842aabad1ed1387ec1697f4413a23c6090041328fedd4b626c6eeaac5b5a71acc1fd1bb8fbd228857ac5bd045c364be7a5a26338ff04c99c4c473cf445a891db6422d1bdef4533442df171643fc36a092fabb464298e4194c9e2950884de13d113ee24160a416404c16ddc5d2476cb3fb80da543e6ed9105f6003977acb34e1fdd2cbdf7a00d5ff84350b74ac231418c0d88269d02d824802791ff42a51cc835deb9869a6023f867f82ef6dc0bfb03e6dfa835646bb18a4074773486e308aa39e532aaea4e6fb35dcada7e060f8282c371ed26d22302323d4fd142a85534671",
- "45e24b167a0bbef1bd8f79dd047763d0754f36a7b623f298059d177e8ac994945c37d2c4af06f01318960301595941124592f2995af1459d854339998d3ae17534df2d9793d6e203857d02c98a0cd88991e641b3e640090ba303f87b907dca8ca462fac19ad079b2c82ea5b521ab891b10138b083b3d9fa214a8fe60d1cb3599c5d199c61a2cfb7ee2f39e5a5abad5ac4998b707545f73e92128d21803420526d2598a53bb314adf29a0ef56b94bd2221601eb53ecb8540e8fffd38fba7bd827ef255e4ef55491475c0f383a241f81c72af4e1dbf2a65cd4d18a497615aa0de2791a3511a7977a8d4d41492bfa4085f2fd4e8f751d",
- "1c1bb695ae90e6e33fc1e8b2a62ab98bf835ac7193440f2351c8cdd830472b637d2fd9c9013cb83caef506abc1c4f7567706db6046b1d184579c7a9223ab1b35e32898c70a3c27628123ffcfa518612f080a2c4a9f8e0a927a47dc98307d2b48de9d5dddcb5c82f0b0e4e610d44f1baa9bbbf7f5a727134680bb7d1327b73b52d8e5e36dbb53971e99e699d79f75a3fc01316bd7012947d119d6aeb7f75b8fbf0479c03002148553fa0da450fd59d4f1bebc252caa11ed9bec5b6ef54279b5f8382b61cffc67ec03f4baa7ea476c31364b86aa8ccad9fd0818717f0ced2dd49477874b4341c602d7a1beab860eb476c7e3ce597e6926",
- "7a3cd9bb2277e2c7f1134fe7233f0f7883c2db9fba80aa5742b03041de0fe589d9e5ea84470dabf41bb66816f3e33ebf19a0ca5aba1004cf971249b258ff26a98dbd0c37ec6cd574854109433357720040bafed4531e0079186b1e853e0ced35d08d27f6d732ed6e2c6651b51cc15c420a24f2dc36c16ef4b3896df1bb03b3963f9aaeb02a48eac5772abd5948c2fd0db2bb74e3351e5eabd681c4f413655bd94dec96b1544c1d5d2d1df4bdc26020d25fe81d5238de824687a5505e1fbe08d11b3924b3ccc070fd225bf01eb79e3d21f7b62a836cd3bcc11c931669c37613470e356143df87c48848a829f5e018973a5db88eb6c60203",
- "3f158afd0733fcc5dfe1efc2dd4eada732f942af734ee664955bb1ba613eafd0f349e7554a14d68200c62d8f2dca2ec8b81c8350735eaf437041f78b452598825b6899560963ade66a0fc74ad01f8343d1d19c7bb327a8dc14ffdb1c42fa72b2970d9155e2da6a2e6419d4117842d826ff38ffab9617307a0283d3ea28c8104ad9a6e087bb750ed1d10fd8f7100b1663682e979d80e43968c33d9eff66f4d1344e583ee521e78d0a2193c0577516b978339c143bfc689bc744bbc4a9163063de82c9706384b6b385e54666c86b34f23c1e25be293af06092ca31d857e11e5b2caf0d19dd3afbe85380878eda76d718b4bb869c67e044e242",
- "a177af4387b9bfa3d59e97ee7b0ff5f4ae4a326fd9204c8d28831a67fcc385ee6c4828247b16d11aea9bb8cd9e6c4d2876c6b2fa6d5041ad39e1b04039071e29c4d86417e7eac4fc7d3823958a021823e2c880a757dfbcd0c8196371db5bbfac15e4d1a0596508b6d26f8c4a664924c95082d173f817995b44c4285d625d9b2f56c86632fe1295c5a8a7a3760028072bcb07bc245a705e7174d06b9d5c0c8ca495b9ac218f1921fa63f2db3fd148f07545366d008fb5aead7497d902b91fbaa39669929d4ae9d07df8557f1f0aed7b51252f10c6606e5ff3ede1327530ca356b4896ecf14bf7322d77fddfbe28d52f6de7f66eeb81704c87e2",
- "01a15b9018e35cc342c926b01d03ad9db4993a6bf92e0555969fee90033f28f3ec234c1268b11b040dfa0770d4ceb39edfeb8ee6a589f4eebcc08d2d1b0a1a52953aa26eb44fdf4a2743c3dacb212a0c0f325572f645f53027b6f3c0c55abaeb1b0918c89bedcb5028f094d743ea354f8ff553c45f111a8fd5a14a4e5c835164747d302472e19a67da04b4c8e39756a9d248ce14d1ed43de75aca86850f2455eccd4639b2af035bb3f504cc9065d091c1c47e036083cb3fc50bf39292b11737c7ce0b49673ba93981de304dc65a671775b6ff927e3ff93850b214fffb5792105a4bdc81354d5b09e84afbdd1792b8fb4e9d0ae3dad2492b03282",
- "24f07ae31279ceed18ec6d35990f21200934ad6b132c6c62e82fe92a40a0e60a5bed10720eff5a1f728971888682772b2d9060d4fee88f37d0824e7384dddcc549475f0e1a44eda4804778b62febe46e04657a20577ee70acb3425e334881eebd8ddf714ae8c527ea747e3367de384e595a43b299b6bb3f6b0a4716cf90038e0f75a47d5057d7fcc3c8a8f9224992c67f8ae0d3251ea09a24aed9ce57ab637f6b3cbb7083df62b6287f64d0877984c4249d113bdb2b07865082aa24cd7ec07061b17de320f51f29f25b82d7073d369cf2dbf96310c0c311997911b2cc02f606f9cd99663c57e78499192a2a78f9c9fa67013e0f9817287faa69b22",
- "4aeb32bf9d050f10bea18d9f71b4afea7bd08550e574e7d50df234c7413668b297b6721d7a0f0bdcdcceb2f55adddea28cd59bd44be0c5ec067039e428706caae11f565d961ad6e7f4c51b0aed6d05cc5b8d826c4b9c39daefb6c7da46dce619a359dc9ce215a215218fa8d54ee0b4f301b6c201c7c2c5f7cb1c6e0cb76ba6c6e8f63ef7a5213d550b0d0857fa0ff9e3e38e497161617413ac066e2fa539520233193a5cb7baa0c2cb20b45e56bfed2c40a9544d1f230dd0cd6d4976e7cf51da8a13200c3957c0154c8237b2931ce19b824963ac576ea49b548cc6aa85c47796b470fb2c6308d88f390bb13607e294c84a838b2713b14ca6a5e8bcee",
- "77e607478be5502432230c913d9ec82f967d87c0ee169a74076f989648853eca693277287f8a5b306bc94dfdbf64ca5cb5dfc0bc498589d51a691b8d57d4b0a9ee247d038fe1b5571183be3e75c37045bf1235863ff1b84b208c10e7f1a5ba54ff36af5b2870129867164d013e0a6d2cc067a3509bba2f46390302c80b651cf590ef69aad8effd94cab28a9b44be6a38b58cfc47c9c725d6fa467894163383b6873d10d263b1cbbad932ded59ab503920267ac026726f794a335a88f6ef564f8968c6fa6f5d3ea161eb6062ca349b9a0e4038273399cfa297a6b07ceda1ebaa99c9de2d935ee230a08c5a488ad46f3393243371d40916b8063cac9da63",
- "50957c407519951bd32e45d21129d6b83436e520b0801ec8292d79a828106a41583a0d607f853dc4410e0a1427f7e873455a75df065cfc6eef970f7e49d123b346976460aadd91cf513c140c356442a84656904a8b1d708dc6089db371c36f4fe059c62302eaab3c06c0cb3b429961f899dcf99798464b8571a440cac7a52b495f32417af6bc8f58adc63647531f804b4e96273b29b42434c1236bde80ba3744fef7b1d11c2f9db332b35bc25123338ac9a0796aac213c9709b3c514ea7ecd80e22d3d8a74f28c8194418a6e1ff30714d0f5a61c068b73b2ba6cad14e05569b4a5a100da3f91429d6e3ffee10ceea057845ec6fc47a6c5125b22e598b2dc",
- "f2273ec31e03cf42d9ca953f8b87e78c291cb538098e0f2436194b308ce30583f553fccb21ae6c2d58f3a5a2ca6037c1b8b7afb291009e4310a0c518e75314c5bb1e813bf521f56d0a4891d0772ad84f09a00634815029a3f9ad4e41eafb4a745e409ef3d4f0b1cf6232b70a5ce262b9432f096e834201a0992db5d09ffa5cbc5471460519a4bc7cdc33ae6dfe6ffc1e80ea5d29813136406499c3514186ced71854a340701519ef33b6c82ca67049ab58578ff49c4c4fbf7d97bfec2ecd8fbefec1b6d6467503fea9d26e134e8c35739a422647aaf4db29c9a32e3df36e5845791fdd75a70903e0ce808313a3327431b7772567f779bbaee2e134c109a387",
- "5784e614d538f7f26c803191deb464a884817002988c36448dcbecfad1997fe51ab0b3853c51ed49ce9f4e477522fb3f32cc50515b753c18fb89a8d965afcf1ed5e099b22c4225732baeb986f5c5bc88e4582d27915e2a19126d3d4555fab4f6516a6a156dbfeed9e982fc589e33ce2b9e1ba2b416e11852ddeab93025974267ac82c84f071c3d07f215f47e3565fd1d962c76e0d635892ea71488273765887d31f250a26c4ddc377ed89b17326e259f6cc1de0e63158e83aebb7f5a7c08c63c767876c8203639958a407acca096d1f606c04b4f4b3fd771781a5901b1c3cee7c04c3b6870226eee309b74f51edbf70a3817cc8da87875301e04d0416a65dc5d",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2x.go
deleted file mode 100644
index eaff2a7f8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/blake2x.go
+++ /dev/null
@@ -1,178 +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 file.
-
-package blake2s
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-// XOF defines the interface to hash functions that
-// support arbitrary-length output.
-type XOF interface {
- // Write absorbs more data into the hash's state. It panics if called
- // after Read.
- io.Writer
-
- // Read reads more output from the hash. It returns io.EOF if the limit
- // has been reached.
- io.Reader
-
- // Clone returns a copy of the XOF in its current state.
- Clone() XOF
-
- // Reset resets the XOF to its initial state.
- Reset()
-}
-
-// OutputLengthUnknown can be used as the size argument to NewXOF to indicate
-// the the length of the output is not known in advance.
-const OutputLengthUnknown = 0
-
-// magicUnknownOutputLength is a magic value for the output size that indicates
-// an unknown number of output bytes.
-const magicUnknownOutputLength = 65535
-
-// maxOutputLength is the absolute maximum number of bytes to produce when the
-// number of output bytes is unknown.
-const maxOutputLength = (1 << 32) * 32
-
-// NewXOF creates a new variable-output-length hash. The hash either produce a
-// known number of bytes (1 <= size < 65535), or an unknown number of bytes
-// (size == OutputLengthUnknown). In the latter case, an absolute limit of
-// 128GiB applies.
-//
-// A non-nil key turns the hash into a MAC. The key must between
-// zero and 32 bytes long.
-func NewXOF(size uint16, key []byte) (XOF, error) {
- if len(key) > Size {
- return nil, errKeySize
- }
- if size == magicUnknownOutputLength {
- // 2^16-1 indicates an unknown number of bytes and thus isn't a
- // valid length.
- return nil, errors.New("blake2s: XOF length too large")
- }
- if size == OutputLengthUnknown {
- size = magicUnknownOutputLength
- }
- x := &xof{
- d: digest{
- size: Size,
- keyLen: len(key),
- },
- length: size,
- }
- copy(x.d.key[:], key)
- x.Reset()
- return x, nil
-}
-
-type xof struct {
- d digest
- length uint16
- remaining uint64
- cfg, root, block [Size]byte
- offset int
- nodeOffset uint32
- readMode bool
-}
-
-func (x *xof) Write(p []byte) (n int, err error) {
- if x.readMode {
- panic("blake2s: write to XOF after read")
- }
- return x.d.Write(p)
-}
-
-func (x *xof) Clone() XOF {
- clone := *x
- return &clone
-}
-
-func (x *xof) Reset() {
- x.cfg[0] = byte(Size)
- binary.LittleEndian.PutUint32(x.cfg[4:], uint32(Size)) // leaf length
- binary.LittleEndian.PutUint16(x.cfg[12:], x.length) // XOF length
- x.cfg[15] = byte(Size) // inner hash size
-
- x.d.Reset()
- x.d.h[3] ^= uint32(x.length)
-
- x.remaining = uint64(x.length)
- if x.remaining == magicUnknownOutputLength {
- x.remaining = maxOutputLength
- }
- x.offset, x.nodeOffset = 0, 0
- x.readMode = false
-}
-
-func (x *xof) Read(p []byte) (n int, err error) {
- if !x.readMode {
- x.d.finalize(&x.root)
- x.readMode = true
- }
-
- if x.remaining == 0 {
- return 0, io.EOF
- }
-
- n = len(p)
- if uint64(n) > x.remaining {
- n = int(x.remaining)
- p = p[:n]
- }
-
- if x.offset > 0 {
- blockRemaining := Size - x.offset
- if n < blockRemaining {
- x.offset += copy(p, x.block[x.offset:])
- x.remaining -= uint64(n)
- return
- }
- copy(p, x.block[x.offset:])
- p = p[blockRemaining:]
- x.offset = 0
- x.remaining -= uint64(blockRemaining)
- }
-
- for len(p) >= Size {
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- copy(p, x.block[:])
- p = p[Size:]
- x.remaining -= uint64(Size)
- }
-
- if todo := len(p); todo > 0 {
- if x.remaining < uint64(Size) {
- x.cfg[0] = byte(x.remaining)
- }
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- x.offset = copy(p, x.block[:todo])
- x.remaining -= uint64(todo)
- }
-
- return
-}
-
-func (d *digest) initConfig(cfg *[Size]byte) {
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- for i := range d.h {
- d.h[i] = iv[i] ^ binary.LittleEndian.Uint32(cfg[i*4:])
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/register.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/register.go
deleted file mode 100644
index d277459a1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blake2s/register.go
+++ /dev/null
@@ -1,21 +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 file.
-
-// +build go1.9
-
-package blake2s
-
-import (
- "crypto"
- "hash"
-)
-
-func init() {
- newHash256 := func() hash.Hash {
- h, _ := New256(nil)
- return h
- }
-
- crypto.RegisterHash(crypto.BLAKE2s_256, newHash256)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/block.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/block.go
deleted file mode 100644
index 9d80f1952..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/block.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2010 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 file.
-
-package blowfish
-
-// getNextWord returns the next big-endian uint32 value from the byte slice
-// at the given position in a circular manner, updating the position.
-func getNextWord(b []byte, pos *int) uint32 {
- var w uint32
- j := *pos
- for i := 0; i < 4; i++ {
- w = w<<8 | uint32(b[j])
- j++
- if j >= len(b) {
- j = 0
- }
- }
- *pos = j
- return w
-}
-
-// ExpandKey performs a key expansion on the given *Cipher. Specifically, it
-// performs the Blowfish algorithm's key schedule which sets up the *Cipher's
-// pi and substitution tables for calls to Encrypt. This is used, primarily,
-// by the bcrypt package to reuse the Blowfish key schedule during its
-// set up. It's unlikely that you need to use this directly.
-func ExpandKey(key []byte, c *Cipher) {
- j := 0
- for i := 0; i < 18; i++ {
- // Using inlined getNextWord for performance.
- var d uint32
- for k := 0; k < 4; k++ {
- d = d<<8 | uint32(key[j])
- j++
- if j >= len(key) {
- j = 0
- }
- }
- c.p[i] ^= d
- }
-
- var l, r uint32
- for i := 0; i < 18; i += 2 {
- l, r = encryptBlock(l, r, c)
- c.p[i], c.p[i+1] = l, r
- }
-
- for i := 0; i < 256; i += 2 {
- l, r = encryptBlock(l, r, c)
- c.s0[i], c.s0[i+1] = l, r
- }
- for i := 0; i < 256; i += 2 {
- l, r = encryptBlock(l, r, c)
- c.s1[i], c.s1[i+1] = l, r
- }
- for i := 0; i < 256; i += 2 {
- l, r = encryptBlock(l, r, c)
- c.s2[i], c.s2[i+1] = l, r
- }
- for i := 0; i < 256; i += 2 {
- l, r = encryptBlock(l, r, c)
- c.s3[i], c.s3[i+1] = l, r
- }
-}
-
-// This is similar to ExpandKey, but folds the salt during the key
-// schedule. While ExpandKey is essentially expandKeyWithSalt with an all-zero
-// salt passed in, reusing ExpandKey turns out to be a place of inefficiency
-// and specializing it here is useful.
-func expandKeyWithSalt(key []byte, salt []byte, c *Cipher) {
- j := 0
- for i := 0; i < 18; i++ {
- c.p[i] ^= getNextWord(key, &j)
- }
-
- j = 0
- var l, r uint32
- for i := 0; i < 18; i += 2 {
- l ^= getNextWord(salt, &j)
- r ^= getNextWord(salt, &j)
- l, r = encryptBlock(l, r, c)
- c.p[i], c.p[i+1] = l, r
- }
-
- for i := 0; i < 256; i += 2 {
- l ^= getNextWord(salt, &j)
- r ^= getNextWord(salt, &j)
- l, r = encryptBlock(l, r, c)
- c.s0[i], c.s0[i+1] = l, r
- }
-
- for i := 0; i < 256; i += 2 {
- l ^= getNextWord(salt, &j)
- r ^= getNextWord(salt, &j)
- l, r = encryptBlock(l, r, c)
- c.s1[i], c.s1[i+1] = l, r
- }
-
- for i := 0; i < 256; i += 2 {
- l ^= getNextWord(salt, &j)
- r ^= getNextWord(salt, &j)
- l, r = encryptBlock(l, r, c)
- c.s2[i], c.s2[i+1] = l, r
- }
-
- for i := 0; i < 256; i += 2 {
- l ^= getNextWord(salt, &j)
- r ^= getNextWord(salt, &j)
- l, r = encryptBlock(l, r, c)
- c.s3[i], c.s3[i+1] = l, r
- }
-}
-
-func encryptBlock(l, r uint32, c *Cipher) (uint32, uint32) {
- xl, xr := l, r
- xl ^= c.p[0]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[1]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[2]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[3]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[4]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[5]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[6]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[7]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[8]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[9]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[10]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[11]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[12]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[13]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[14]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[15]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[16]
- xr ^= c.p[17]
- return xr, xl
-}
-
-func decryptBlock(l, r uint32, c *Cipher) (uint32, uint32) {
- xl, xr := l, r
- xl ^= c.p[17]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[16]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[15]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[14]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[13]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[12]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[11]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[10]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[9]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[8]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[7]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[6]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[5]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[4]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[3]
- xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[2]
- xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[1]
- xr ^= c.p[0]
- return xr, xl
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/blowfish_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/blowfish_test.go
deleted file mode 100644
index 368ba872b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/blowfish_test.go
+++ /dev/null
@@ -1,274 +0,0 @@
-// Copyright 2010 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 file.
-
-package blowfish
-
-import "testing"
-
-type CryptTest struct {
- key []byte
- in []byte
- out []byte
-}
-
-// Test vector values are from https://www.schneier.com/code/vectors.txt.
-var encryptTests = []CryptTest{
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}},
- {
- []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- []byte{0x51, 0x86, 0x6F, 0xD5, 0xB8, 0x5E, 0xCB, 0x8A}},
- {
- []byte{0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
- []byte{0x7D, 0x85, 0x6F, 0x9A, 0x61, 0x30, 0x63, 0xF2}},
- {
- []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
- []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
- []byte{0x24, 0x66, 0xDD, 0x87, 0x8B, 0x96, 0x3C, 0x9D}},
-
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
- []byte{0x61, 0xF9, 0xC3, 0x80, 0x22, 0x81, 0xB0, 0x96}},
- {
- []byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0x7D, 0x0C, 0xC6, 0x30, 0xAF, 0xDA, 0x1E, 0xC7}},
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}},
- {
- []byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0x0A, 0xCE, 0xAB, 0x0F, 0xC6, 0xA0, 0xA2, 0x8D}},
- {
- []byte{0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57},
- []byte{0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42},
- []byte{0x59, 0xC6, 0x82, 0x45, 0xEB, 0x05, 0x28, 0x2B}},
- {
- []byte{0x01, 0x31, 0xD9, 0x61, 0x9D, 0xC1, 0x37, 0x6E},
- []byte{0x5C, 0xD5, 0x4C, 0xA8, 0x3D, 0xEF, 0x57, 0xDA},
- []byte{0xB1, 0xB8, 0xCC, 0x0B, 0x25, 0x0F, 0x09, 0xA0}},
- {
- []byte{0x07, 0xA1, 0x13, 0x3E, 0x4A, 0x0B, 0x26, 0x86},
- []byte{0x02, 0x48, 0xD4, 0x38, 0x06, 0xF6, 0x71, 0x72},
- []byte{0x17, 0x30, 0xE5, 0x77, 0x8B, 0xEA, 0x1D, 0xA4}},
- {
- []byte{0x38, 0x49, 0x67, 0x4C, 0x26, 0x02, 0x31, 0x9E},
- []byte{0x51, 0x45, 0x4B, 0x58, 0x2D, 0xDF, 0x44, 0x0A},
- []byte{0xA2, 0x5E, 0x78, 0x56, 0xCF, 0x26, 0x51, 0xEB}},
- {
- []byte{0x04, 0xB9, 0x15, 0xBA, 0x43, 0xFE, 0xB5, 0xB6},
- []byte{0x42, 0xFD, 0x44, 0x30, 0x59, 0x57, 0x7F, 0xA2},
- []byte{0x35, 0x38, 0x82, 0xB1, 0x09, 0xCE, 0x8F, 0x1A}},
- {
- []byte{0x01, 0x13, 0xB9, 0x70, 0xFD, 0x34, 0xF2, 0xCE},
- []byte{0x05, 0x9B, 0x5E, 0x08, 0x51, 0xCF, 0x14, 0x3A},
- []byte{0x48, 0xF4, 0xD0, 0x88, 0x4C, 0x37, 0x99, 0x18}},
- {
- []byte{0x01, 0x70, 0xF1, 0x75, 0x46, 0x8F, 0xB5, 0xE6},
- []byte{0x07, 0x56, 0xD8, 0xE0, 0x77, 0x47, 0x61, 0xD2},
- []byte{0x43, 0x21, 0x93, 0xB7, 0x89, 0x51, 0xFC, 0x98}},
- {
- []byte{0x43, 0x29, 0x7F, 0xAD, 0x38, 0xE3, 0x73, 0xFE},
- []byte{0x76, 0x25, 0x14, 0xB8, 0x29, 0xBF, 0x48, 0x6A},
- []byte{0x13, 0xF0, 0x41, 0x54, 0xD6, 0x9D, 0x1A, 0xE5}},
- {
- []byte{0x07, 0xA7, 0x13, 0x70, 0x45, 0xDA, 0x2A, 0x16},
- []byte{0x3B, 0xDD, 0x11, 0x90, 0x49, 0x37, 0x28, 0x02},
- []byte{0x2E, 0xED, 0xDA, 0x93, 0xFF, 0xD3, 0x9C, 0x79}},
- {
- []byte{0x04, 0x68, 0x91, 0x04, 0xC2, 0xFD, 0x3B, 0x2F},
- []byte{0x26, 0x95, 0x5F, 0x68, 0x35, 0xAF, 0x60, 0x9A},
- []byte{0xD8, 0x87, 0xE0, 0x39, 0x3C, 0x2D, 0xA6, 0xE3}},
- {
- []byte{0x37, 0xD0, 0x6B, 0xB5, 0x16, 0xCB, 0x75, 0x46},
- []byte{0x16, 0x4D, 0x5E, 0x40, 0x4F, 0x27, 0x52, 0x32},
- []byte{0x5F, 0x99, 0xD0, 0x4F, 0x5B, 0x16, 0x39, 0x69}},
- {
- []byte{0x1F, 0x08, 0x26, 0x0D, 0x1A, 0xC2, 0x46, 0x5E},
- []byte{0x6B, 0x05, 0x6E, 0x18, 0x75, 0x9F, 0x5C, 0xCA},
- []byte{0x4A, 0x05, 0x7A, 0x3B, 0x24, 0xD3, 0x97, 0x7B}},
- {
- []byte{0x58, 0x40, 0x23, 0x64, 0x1A, 0xBA, 0x61, 0x76},
- []byte{0x00, 0x4B, 0xD6, 0xEF, 0x09, 0x17, 0x60, 0x62},
- []byte{0x45, 0x20, 0x31, 0xC1, 0xE4, 0xFA, 0xDA, 0x8E}},
- {
- []byte{0x02, 0x58, 0x16, 0x16, 0x46, 0x29, 0xB0, 0x07},
- []byte{0x48, 0x0D, 0x39, 0x00, 0x6E, 0xE7, 0x62, 0xF2},
- []byte{0x75, 0x55, 0xAE, 0x39, 0xF5, 0x9B, 0x87, 0xBD}},
- {
- []byte{0x49, 0x79, 0x3E, 0xBC, 0x79, 0xB3, 0x25, 0x8F},
- []byte{0x43, 0x75, 0x40, 0xC8, 0x69, 0x8F, 0x3C, 0xFA},
- []byte{0x53, 0xC5, 0x5F, 0x9C, 0xB4, 0x9F, 0xC0, 0x19}},
- {
- []byte{0x4F, 0xB0, 0x5E, 0x15, 0x15, 0xAB, 0x73, 0xA7},
- []byte{0x07, 0x2D, 0x43, 0xA0, 0x77, 0x07, 0x52, 0x92},
- []byte{0x7A, 0x8E, 0x7B, 0xFA, 0x93, 0x7E, 0x89, 0xA3}},
- {
- []byte{0x49, 0xE9, 0x5D, 0x6D, 0x4C, 0xA2, 0x29, 0xBF},
- []byte{0x02, 0xFE, 0x55, 0x77, 0x81, 0x17, 0xF1, 0x2A},
- []byte{0xCF, 0x9C, 0x5D, 0x7A, 0x49, 0x86, 0xAD, 0xB5}},
- {
- []byte{0x01, 0x83, 0x10, 0xDC, 0x40, 0x9B, 0x26, 0xD6},
- []byte{0x1D, 0x9D, 0x5C, 0x50, 0x18, 0xF7, 0x28, 0xC2},
- []byte{0xD1, 0xAB, 0xB2, 0x90, 0x65, 0x8B, 0xC7, 0x78}},
- {
- []byte{0x1C, 0x58, 0x7F, 0x1C, 0x13, 0x92, 0x4F, 0xEF},
- []byte{0x30, 0x55, 0x32, 0x28, 0x6D, 0x6F, 0x29, 0x5A},
- []byte{0x55, 0xCB, 0x37, 0x74, 0xD1, 0x3E, 0xF2, 0x01}},
- {
- []byte{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01},
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0xFA, 0x34, 0xEC, 0x48, 0x47, 0xB2, 0x68, 0xB2}},
- {
- []byte{0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E},
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0xA7, 0x90, 0x79, 0x51, 0x08, 0xEA, 0x3C, 0xAE}},
- {
- []byte{0xE0, 0xFE, 0xE0, 0xFE, 0xF1, 0xFE, 0xF1, 0xFE},
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0xC3, 0x9E, 0x07, 0x2D, 0x9F, 0xAC, 0x63, 0x1D}},
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- []byte{0x01, 0x49, 0x33, 0xE0, 0xCD, 0xAF, 0xF6, 0xE4}},
- {
- []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0xF2, 0x1E, 0x9A, 0x77, 0xB7, 0x1C, 0x49, 0xBC}},
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x24, 0x59, 0x46, 0x88, 0x57, 0x54, 0x36, 0x9A}},
- {
- []byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
- []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- []byte{0x6B, 0x5C, 0x5A, 0x9C, 0x5D, 0x9E, 0x0A, 0x5A}},
-}
-
-func TestCipherEncrypt(t *testing.T) {
- for i, tt := range encryptTests {
- c, err := NewCipher(tt.key)
- if err != nil {
- t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err)
- continue
- }
- ct := make([]byte, len(tt.out))
- c.Encrypt(ct, tt.in)
- for j, v := range ct {
- if v != tt.out[j] {
- t.Errorf("Cipher.Encrypt, test vector #%d: cipher-text[%d] = %#x, expected %#x", i, j, v, tt.out[j])
- break
- }
- }
- }
-}
-
-func TestCipherDecrypt(t *testing.T) {
- for i, tt := range encryptTests {
- c, err := NewCipher(tt.key)
- if err != nil {
- t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err)
- continue
- }
- pt := make([]byte, len(tt.in))
- c.Decrypt(pt, tt.out)
- for j, v := range pt {
- if v != tt.in[j] {
- t.Errorf("Cipher.Decrypt, test vector #%d: plain-text[%d] = %#x, expected %#x", i, j, v, tt.in[j])
- break
- }
- }
- }
-}
-
-func TestSaltedCipherKeyLength(t *testing.T) {
- if _, err := NewSaltedCipher(nil, []byte{'a'}); err != KeySizeError(0) {
- t.Errorf("NewSaltedCipher with short key, gave error %#v, expected %#v", err, KeySizeError(0))
- }
-
- // A 57-byte key. One over the typical blowfish restriction.
- key := []byte("012345678901234567890123456789012345678901234567890123456")
- if _, err := NewSaltedCipher(key, []byte{'a'}); err != nil {
- t.Errorf("NewSaltedCipher with long key, gave error %#v", err)
- }
-}
-
-// Test vectors generated with Blowfish from OpenSSH.
-var saltedVectors = [][8]byte{
- {0x0c, 0x82, 0x3b, 0x7b, 0x8d, 0x01, 0x4b, 0x7e},
- {0xd1, 0xe1, 0x93, 0xf0, 0x70, 0xa6, 0xdb, 0x12},
- {0xfc, 0x5e, 0xba, 0xde, 0xcb, 0xf8, 0x59, 0xad},
- {0x8a, 0x0c, 0x76, 0xe7, 0xdd, 0x2c, 0xd3, 0xa8},
- {0x2c, 0xcb, 0x7b, 0xee, 0xac, 0x7b, 0x7f, 0xf8},
- {0xbb, 0xf6, 0x30, 0x6f, 0xe1, 0x5d, 0x62, 0xbf},
- {0x97, 0x1e, 0xc1, 0x3d, 0x3d, 0xe0, 0x11, 0xe9},
- {0x06, 0xd7, 0x4d, 0xb1, 0x80, 0xa3, 0xb1, 0x38},
- {0x67, 0xa1, 0xa9, 0x75, 0x0e, 0x5b, 0xc6, 0xb4},
- {0x51, 0x0f, 0x33, 0x0e, 0x4f, 0x67, 0xd2, 0x0c},
- {0xf1, 0x73, 0x7e, 0xd8, 0x44, 0xea, 0xdb, 0xe5},
- {0x14, 0x0e, 0x16, 0xce, 0x7f, 0x4a, 0x9c, 0x7b},
- {0x4b, 0xfe, 0x43, 0xfd, 0xbf, 0x36, 0x04, 0x47},
- {0xb1, 0xeb, 0x3e, 0x15, 0x36, 0xa7, 0xbb, 0xe2},
- {0x6d, 0x0b, 0x41, 0xdd, 0x00, 0x98, 0x0b, 0x19},
- {0xd3, 0xce, 0x45, 0xce, 0x1d, 0x56, 0xb7, 0xfc},
- {0xd9, 0xf0, 0xfd, 0xda, 0xc0, 0x23, 0xb7, 0x93},
- {0x4c, 0x6f, 0xa1, 0xe4, 0x0c, 0xa8, 0xca, 0x57},
- {0xe6, 0x2f, 0x28, 0xa7, 0x0c, 0x94, 0x0d, 0x08},
- {0x8f, 0xe3, 0xf0, 0xb6, 0x29, 0xe3, 0x44, 0x03},
- {0xff, 0x98, 0xdd, 0x04, 0x45, 0xb4, 0x6d, 0x1f},
- {0x9e, 0x45, 0x4d, 0x18, 0x40, 0x53, 0xdb, 0xef},
- {0xb7, 0x3b, 0xef, 0x29, 0xbe, 0xa8, 0x13, 0x71},
- {0x02, 0x54, 0x55, 0x41, 0x8e, 0x04, 0xfc, 0xad},
- {0x6a, 0x0a, 0xee, 0x7c, 0x10, 0xd9, 0x19, 0xfe},
- {0x0a, 0x22, 0xd9, 0x41, 0xcc, 0x23, 0x87, 0x13},
- {0x6e, 0xff, 0x1f, 0xff, 0x36, 0x17, 0x9c, 0xbe},
- {0x79, 0xad, 0xb7, 0x40, 0xf4, 0x9f, 0x51, 0xa6},
- {0x97, 0x81, 0x99, 0xa4, 0xde, 0x9e, 0x9f, 0xb6},
- {0x12, 0x19, 0x7a, 0x28, 0xd0, 0xdc, 0xcc, 0x92},
- {0x81, 0xda, 0x60, 0x1e, 0x0e, 0xdd, 0x65, 0x56},
- {0x7d, 0x76, 0x20, 0xb2, 0x73, 0xc9, 0x9e, 0xee},
-}
-
-func TestSaltedCipher(t *testing.T) {
- var key, salt [32]byte
- for i := range key {
- key[i] = byte(i)
- salt[i] = byte(i + 32)
- }
- for i, v := range saltedVectors {
- c, err := NewSaltedCipher(key[:], salt[:i])
- if err != nil {
- t.Fatal(err)
- }
- var buf [8]byte
- c.Encrypt(buf[:], buf[:])
- if v != buf {
- t.Errorf("%d: expected %x, got %x", i, v, buf)
- }
- }
-}
-
-func BenchmarkExpandKeyWithSalt(b *testing.B) {
- key := make([]byte, 32)
- salt := make([]byte, 16)
- c, _ := NewCipher(key)
- for i := 0; i < b.N; i++ {
- expandKeyWithSalt(key, salt, c)
- }
-}
-
-func BenchmarkExpandKey(b *testing.B) {
- key := make([]byte, 32)
- c, _ := NewCipher(key)
- for i := 0; i < b.N; i++ {
- ExpandKey(key, c)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/cipher.go
deleted file mode 100644
index 2641dadd6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/cipher.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
-package blowfish // import "golang.org/x/crypto/blowfish"
-
-// The code is a port of Bruce Schneier's C implementation.
-// See https://www.schneier.com/blowfish.html.
-
-import "strconv"
-
-// The Blowfish block size in bytes.
-const BlockSize = 8
-
-// A Cipher is an instance of Blowfish encryption using a particular key.
-type Cipher struct {
- p [18]uint32
- s0, s1, s2, s3 [256]uint32
-}
-
-type KeySizeError int
-
-func (k KeySizeError) Error() string {
- return "crypto/blowfish: invalid key size " + strconv.Itoa(int(k))
-}
-
-// NewCipher creates and returns a Cipher.
-// The key argument should be the Blowfish key, from 1 to 56 bytes.
-func NewCipher(key []byte) (*Cipher, error) {
- var result Cipher
- if k := len(key); k < 1 || k > 56 {
- return nil, KeySizeError(k)
- }
- initCipher(&result)
- ExpandKey(key, &result)
- return &result, nil
-}
-
-// NewSaltedCipher creates a returns a Cipher that folds a salt into its key
-// schedule. For most purposes, NewCipher, instead of NewSaltedCipher, is
-// sufficient and desirable. For bcrypt compatibility, the key can be over 56
-// bytes.
-func NewSaltedCipher(key, salt []byte) (*Cipher, error) {
- if len(salt) == 0 {
- return NewCipher(key)
- }
- var result Cipher
- if k := len(key); k < 1 {
- return nil, KeySizeError(k)
- }
- initCipher(&result)
- expandKeyWithSalt(key, salt, &result)
- return &result, nil
-}
-
-// BlockSize returns the Blowfish block size, 8 bytes.
-// It is necessary to satisfy the Block interface in the
-// package "crypto/cipher".
-func (c *Cipher) BlockSize() int { return BlockSize }
-
-// Encrypt encrypts the 8-byte buffer src using the key k
-// and stores the result in dst.
-// Note that for amounts of data larger than a block,
-// it is not safe to just call Encrypt on successive blocks;
-// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
-func (c *Cipher) Encrypt(dst, src []byte) {
- l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
- r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
- l, r = encryptBlock(l, r, c)
- dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
- dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
-}
-
-// Decrypt decrypts the 8-byte buffer src using the key k
-// and stores the result in dst.
-func (c *Cipher) Decrypt(dst, src []byte) {
- l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
- r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
- l, r = decryptBlock(l, r, c)
- dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
- dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
-}
-
-func initCipher(c *Cipher) {
- copy(c.p[0:], p[0:])
- copy(c.s0[0:], s0[0:])
- copy(c.s1[0:], s1[0:])
- copy(c.s2[0:], s2[0:])
- copy(c.s3[0:], s3[0:])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/const.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/const.go
deleted file mode 100644
index d04077595..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/blowfish/const.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2010 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 file.
-
-// The startup permutation array and substitution boxes.
-// They are the hexadecimal digits of PI; see:
-// https://www.schneier.com/code/constants.txt.
-
-package blowfish
-
-var s0 = [256]uint32{
- 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,
- 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
- 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,
- 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
- 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,
- 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
- 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,
- 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
- 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,
- 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
- 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,
- 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
- 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,
- 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
- 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
- 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
- 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,
- 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
- 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,
- 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
- 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,
- 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
- 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,
- 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
- 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,
- 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
- 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,
- 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
- 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,
- 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
- 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,
- 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
- 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,
- 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
- 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,
- 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
- 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,
- 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
- 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,
- 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
- 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,
- 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
- 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a,
-}
-
-var s1 = [256]uint32{
- 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d,
- 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
- 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65,
- 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
- 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9,
- 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
- 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d,
- 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
- 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc,
- 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
- 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908,
- 0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
- 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124,
- 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
- 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908,
- 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
- 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b,
- 0x3c11183b, 0x5924a509, 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
- 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa,
- 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
- 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d,
- 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
- 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5,
- 0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
- 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96,
- 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
- 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca,
- 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
- 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77,
- 0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
- 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054,
- 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
- 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea,
- 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
- 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646,
- 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
- 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea,
- 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
- 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e,
- 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
- 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd,
- 0x675fda79, 0xe3674340, 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
- 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7,
-}
-
-var s2 = [256]uint32{
- 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7,
- 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
- 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af,
- 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
- 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4,
- 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
- 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec,
- 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
- 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332,
- 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
- 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, 0x55a867bc, 0xa1159a58,
- 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
- 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22,
- 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
- 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60,
- 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
- 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99,
- 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
- 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74,
- 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
- 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3,
- 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
- 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979,
- 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
- 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa,
- 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
- 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086,
- 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
- 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24,
- 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
- 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84,
- 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
- 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09,
- 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
- 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, 0xdcb7da83, 0x573906fe,
- 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
- 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0,
- 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
- 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188,
- 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
- 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8,
- 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
- 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,
-}
-
-var s3 = [256]uint32{
- 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,
- 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
- 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,
- 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
- 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,
- 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
- 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
- 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
- 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,
- 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
- 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,
- 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
- 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,
- 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
- 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,
- 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
- 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,
- 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
- 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,
- 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
- 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,
- 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
- 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,
- 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
- 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,
- 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
- 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,
- 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
- 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,
- 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
- 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,
- 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
- 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,
- 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
- 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,
- 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
- 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
- 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
- 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,
- 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
- 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,
- 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
- 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,
-}
-
-var p = [18]uint32{
- 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,
- 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
- 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256.go
deleted file mode 100644
index 014f8b355..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256.go
+++ /dev/null
@@ -1,404 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package bn256 implements a particular bilinear group at the 128-bit security level.
-//
-// Bilinear groups are the basis of many of the new cryptographic protocols
-// that have been proposed over the past decade. They consist of a triplet of
-// groups (Gâ‚, Gâ‚‚ and GT) such that there exists a function e(gâ‚Ë£,g₂ʸ)=gTˣʸ
-// (where gâ‚“ is a generator of the respective group). That function is called
-// a pairing function.
-//
-// This package specifically implements the Optimal Ate pairing over a 256-bit
-// Barreto-Naehrig curve as described in
-// http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible
-// with the implementation described in that paper.
-package bn256 // import "golang.org/x/crypto/bn256"
-
-import (
- "crypto/rand"
- "io"
- "math/big"
-)
-
-// BUG(agl): this implementation is not constant time.
-// TODO(agl): keep GF(p²) elements in Mongomery form.
-
-// G1 is an abstract cyclic group. The zero value is suitable for use as the
-// output of an operation, but cannot be used as an input.
-type G1 struct {
- p *curvePoint
-}
-
-// RandomG1 returns x and gâ‚Ë£ where x is a random, non-zero number read from r.
-func RandomG1(r io.Reader) (*big.Int, *G1, error) {
- var k *big.Int
- var err error
-
- for {
- k, err = rand.Int(r, Order)
- if err != nil {
- return nil, nil, err
- }
- if k.Sign() > 0 {
- break
- }
- }
-
- return k, new(G1).ScalarBaseMult(k), nil
-}
-
-func (g *G1) String() string {
- return "bn256.G1" + g.p.String()
-}
-
-// ScalarBaseMult sets e to g*k where g is the generator of the group and
-// then returns e.
-func (e *G1) ScalarBaseMult(k *big.Int) *G1 {
- if e.p == nil {
- e.p = newCurvePoint(nil)
- }
- e.p.Mul(curveGen, k, new(bnPool))
- return e
-}
-
-// ScalarMult sets e to a*k and then returns e.
-func (e *G1) ScalarMult(a *G1, k *big.Int) *G1 {
- if e.p == nil {
- e.p = newCurvePoint(nil)
- }
- e.p.Mul(a.p, k, new(bnPool))
- return e
-}
-
-// Add sets e to a+b and then returns e.
-// BUG(agl): this function is not complete: a==b fails.
-func (e *G1) Add(a, b *G1) *G1 {
- if e.p == nil {
- e.p = newCurvePoint(nil)
- }
- e.p.Add(a.p, b.p, new(bnPool))
- return e
-}
-
-// Neg sets e to -a and then returns e.
-func (e *G1) Neg(a *G1) *G1 {
- if e.p == nil {
- e.p = newCurvePoint(nil)
- }
- e.p.Negative(a.p)
- return e
-}
-
-// Marshal converts n to a byte slice.
-func (n *G1) Marshal() []byte {
- n.p.MakeAffine(nil)
-
- xBytes := new(big.Int).Mod(n.p.x, p).Bytes()
- yBytes := new(big.Int).Mod(n.p.y, p).Bytes()
-
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- ret := make([]byte, numBytes*2)
- copy(ret[1*numBytes-len(xBytes):], xBytes)
- copy(ret[2*numBytes-len(yBytes):], yBytes)
-
- return ret
-}
-
-// Unmarshal sets e to the result of converting the output of Marshal back into
-// a group element and then returns e.
-func (e *G1) Unmarshal(m []byte) (*G1, bool) {
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- if len(m) != 2*numBytes {
- return nil, false
- }
-
- if e.p == nil {
- e.p = newCurvePoint(nil)
- }
-
- e.p.x.SetBytes(m[0*numBytes : 1*numBytes])
- e.p.y.SetBytes(m[1*numBytes : 2*numBytes])
-
- if e.p.x.Sign() == 0 && e.p.y.Sign() == 0 {
- // This is the point at infinity.
- e.p.y.SetInt64(1)
- e.p.z.SetInt64(0)
- e.p.t.SetInt64(0)
- } else {
- e.p.z.SetInt64(1)
- e.p.t.SetInt64(1)
-
- if !e.p.IsOnCurve() {
- return nil, false
- }
- }
-
- return e, true
-}
-
-// G2 is an abstract cyclic group. The zero value is suitable for use as the
-// output of an operation, but cannot be used as an input.
-type G2 struct {
- p *twistPoint
-}
-
-// RandomG1 returns x and gâ‚‚Ë£ where x is a random, non-zero number read from r.
-func RandomG2(r io.Reader) (*big.Int, *G2, error) {
- var k *big.Int
- var err error
-
- for {
- k, err = rand.Int(r, Order)
- if err != nil {
- return nil, nil, err
- }
- if k.Sign() > 0 {
- break
- }
- }
-
- return k, new(G2).ScalarBaseMult(k), nil
-}
-
-func (g *G2) String() string {
- return "bn256.G2" + g.p.String()
-}
-
-// ScalarBaseMult sets e to g*k where g is the generator of the group and
-// then returns out.
-func (e *G2) ScalarBaseMult(k *big.Int) *G2 {
- if e.p == nil {
- e.p = newTwistPoint(nil)
- }
- e.p.Mul(twistGen, k, new(bnPool))
- return e
-}
-
-// ScalarMult sets e to a*k and then returns e.
-func (e *G2) ScalarMult(a *G2, k *big.Int) *G2 {
- if e.p == nil {
- e.p = newTwistPoint(nil)
- }
- e.p.Mul(a.p, k, new(bnPool))
- return e
-}
-
-// Add sets e to a+b and then returns e.
-// BUG(agl): this function is not complete: a==b fails.
-func (e *G2) Add(a, b *G2) *G2 {
- if e.p == nil {
- e.p = newTwistPoint(nil)
- }
- e.p.Add(a.p, b.p, new(bnPool))
- return e
-}
-
-// Marshal converts n into a byte slice.
-func (n *G2) Marshal() []byte {
- n.p.MakeAffine(nil)
-
- xxBytes := new(big.Int).Mod(n.p.x.x, p).Bytes()
- xyBytes := new(big.Int).Mod(n.p.x.y, p).Bytes()
- yxBytes := new(big.Int).Mod(n.p.y.x, p).Bytes()
- yyBytes := new(big.Int).Mod(n.p.y.y, p).Bytes()
-
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- ret := make([]byte, numBytes*4)
- copy(ret[1*numBytes-len(xxBytes):], xxBytes)
- copy(ret[2*numBytes-len(xyBytes):], xyBytes)
- copy(ret[3*numBytes-len(yxBytes):], yxBytes)
- copy(ret[4*numBytes-len(yyBytes):], yyBytes)
-
- return ret
-}
-
-// Unmarshal sets e to the result of converting the output of Marshal back into
-// a group element and then returns e.
-func (e *G2) Unmarshal(m []byte) (*G2, bool) {
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- if len(m) != 4*numBytes {
- return nil, false
- }
-
- if e.p == nil {
- e.p = newTwistPoint(nil)
- }
-
- e.p.x.x.SetBytes(m[0*numBytes : 1*numBytes])
- e.p.x.y.SetBytes(m[1*numBytes : 2*numBytes])
- e.p.y.x.SetBytes(m[2*numBytes : 3*numBytes])
- e.p.y.y.SetBytes(m[3*numBytes : 4*numBytes])
-
- if e.p.x.x.Sign() == 0 &&
- e.p.x.y.Sign() == 0 &&
- e.p.y.x.Sign() == 0 &&
- e.p.y.y.Sign() == 0 {
- // This is the point at infinity.
- e.p.y.SetOne()
- e.p.z.SetZero()
- e.p.t.SetZero()
- } else {
- e.p.z.SetOne()
- e.p.t.SetOne()
-
- if !e.p.IsOnCurve() {
- return nil, false
- }
- }
-
- return e, true
-}
-
-// GT is an abstract cyclic group. The zero value is suitable for use as the
-// output of an operation, but cannot be used as an input.
-type GT struct {
- p *gfP12
-}
-
-func (g *GT) String() string {
- return "bn256.GT" + g.p.String()
-}
-
-// ScalarMult sets e to a*k and then returns e.
-func (e *GT) ScalarMult(a *GT, k *big.Int) *GT {
- if e.p == nil {
- e.p = newGFp12(nil)
- }
- e.p.Exp(a.p, k, new(bnPool))
- return e
-}
-
-// Add sets e to a+b and then returns e.
-func (e *GT) Add(a, b *GT) *GT {
- if e.p == nil {
- e.p = newGFp12(nil)
- }
- e.p.Mul(a.p, b.p, new(bnPool))
- return e
-}
-
-// Neg sets e to -a and then returns e.
-func (e *GT) Neg(a *GT) *GT {
- if e.p == nil {
- e.p = newGFp12(nil)
- }
- e.p.Invert(a.p, new(bnPool))
- return e
-}
-
-// Marshal converts n into a byte slice.
-func (n *GT) Marshal() []byte {
- n.p.Minimal()
-
- xxxBytes := n.p.x.x.x.Bytes()
- xxyBytes := n.p.x.x.y.Bytes()
- xyxBytes := n.p.x.y.x.Bytes()
- xyyBytes := n.p.x.y.y.Bytes()
- xzxBytes := n.p.x.z.x.Bytes()
- xzyBytes := n.p.x.z.y.Bytes()
- yxxBytes := n.p.y.x.x.Bytes()
- yxyBytes := n.p.y.x.y.Bytes()
- yyxBytes := n.p.y.y.x.Bytes()
- yyyBytes := n.p.y.y.y.Bytes()
- yzxBytes := n.p.y.z.x.Bytes()
- yzyBytes := n.p.y.z.y.Bytes()
-
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- ret := make([]byte, numBytes*12)
- copy(ret[1*numBytes-len(xxxBytes):], xxxBytes)
- copy(ret[2*numBytes-len(xxyBytes):], xxyBytes)
- copy(ret[3*numBytes-len(xyxBytes):], xyxBytes)
- copy(ret[4*numBytes-len(xyyBytes):], xyyBytes)
- copy(ret[5*numBytes-len(xzxBytes):], xzxBytes)
- copy(ret[6*numBytes-len(xzyBytes):], xzyBytes)
- copy(ret[7*numBytes-len(yxxBytes):], yxxBytes)
- copy(ret[8*numBytes-len(yxyBytes):], yxyBytes)
- copy(ret[9*numBytes-len(yyxBytes):], yyxBytes)
- copy(ret[10*numBytes-len(yyyBytes):], yyyBytes)
- copy(ret[11*numBytes-len(yzxBytes):], yzxBytes)
- copy(ret[12*numBytes-len(yzyBytes):], yzyBytes)
-
- return ret
-}
-
-// Unmarshal sets e to the result of converting the output of Marshal back into
-// a group element and then returns e.
-func (e *GT) Unmarshal(m []byte) (*GT, bool) {
- // Each value is a 256-bit number.
- const numBytes = 256 / 8
-
- if len(m) != 12*numBytes {
- return nil, false
- }
-
- if e.p == nil {
- e.p = newGFp12(nil)
- }
-
- e.p.x.x.x.SetBytes(m[0*numBytes : 1*numBytes])
- e.p.x.x.y.SetBytes(m[1*numBytes : 2*numBytes])
- e.p.x.y.x.SetBytes(m[2*numBytes : 3*numBytes])
- e.p.x.y.y.SetBytes(m[3*numBytes : 4*numBytes])
- e.p.x.z.x.SetBytes(m[4*numBytes : 5*numBytes])
- e.p.x.z.y.SetBytes(m[5*numBytes : 6*numBytes])
- e.p.y.x.x.SetBytes(m[6*numBytes : 7*numBytes])
- e.p.y.x.y.SetBytes(m[7*numBytes : 8*numBytes])
- e.p.y.y.x.SetBytes(m[8*numBytes : 9*numBytes])
- e.p.y.y.y.SetBytes(m[9*numBytes : 10*numBytes])
- e.p.y.z.x.SetBytes(m[10*numBytes : 11*numBytes])
- e.p.y.z.y.SetBytes(m[11*numBytes : 12*numBytes])
-
- return e, true
-}
-
-// Pair calculates an Optimal Ate pairing.
-func Pair(g1 *G1, g2 *G2) *GT {
- return &GT{optimalAte(g2.p, g1.p, new(bnPool))}
-}
-
-// bnPool implements a tiny cache of *big.Int objects that's used to reduce the
-// number of allocations made during processing.
-type bnPool struct {
- bns []*big.Int
- count int
-}
-
-func (pool *bnPool) Get() *big.Int {
- if pool == nil {
- return new(big.Int)
- }
-
- pool.count++
- l := len(pool.bns)
- if l == 0 {
- return new(big.Int)
- }
-
- bn := pool.bns[l-1]
- pool.bns = pool.bns[:l-1]
- return bn
-}
-
-func (pool *bnPool) Put(bn *big.Int) {
- if pool == nil {
- return
- }
- pool.bns = append(pool.bns, bn)
- pool.count--
-}
-
-func (pool *bnPool) Count() int {
- return pool.count
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256_test.go
deleted file mode 100644
index 1cec3884e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/bn256_test.go
+++ /dev/null
@@ -1,304 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-import (
- "bytes"
- "crypto/rand"
- "math/big"
- "testing"
-)
-
-func TestGFp2Invert(t *testing.T) {
- pool := new(bnPool)
-
- a := newGFp2(pool)
- a.x.SetString("23423492374", 10)
- a.y.SetString("12934872398472394827398470", 10)
-
- inv := newGFp2(pool)
- inv.Invert(a, pool)
-
- b := newGFp2(pool).Mul(inv, a, pool)
- if b.x.Int64() != 0 || b.y.Int64() != 1 {
- t.Fatalf("bad result for a^-1*a: %s %s", b.x, b.y)
- }
-
- a.Put(pool)
- b.Put(pool)
- inv.Put(pool)
-
- if c := pool.Count(); c > 0 {
- t.Errorf("Pool count non-zero: %d\n", c)
- }
-}
-
-func isZero(n *big.Int) bool {
- return new(big.Int).Mod(n, p).Int64() == 0
-}
-
-func isOne(n *big.Int) bool {
- return new(big.Int).Mod(n, p).Int64() == 1
-}
-
-func TestGFp6Invert(t *testing.T) {
- pool := new(bnPool)
-
- a := newGFp6(pool)
- a.x.x.SetString("239487238491", 10)
- a.x.y.SetString("2356249827341", 10)
- a.y.x.SetString("082659782", 10)
- a.y.y.SetString("182703523765", 10)
- a.z.x.SetString("978236549263", 10)
- a.z.y.SetString("64893242", 10)
-
- inv := newGFp6(pool)
- inv.Invert(a, pool)
-
- b := newGFp6(pool).Mul(inv, a, pool)
- if !isZero(b.x.x) ||
- !isZero(b.x.y) ||
- !isZero(b.y.x) ||
- !isZero(b.y.y) ||
- !isZero(b.z.x) ||
- !isOne(b.z.y) {
- t.Fatalf("bad result for a^-1*a: %s", b)
- }
-
- a.Put(pool)
- b.Put(pool)
- inv.Put(pool)
-
- if c := pool.Count(); c > 0 {
- t.Errorf("Pool count non-zero: %d\n", c)
- }
-}
-
-func TestGFp12Invert(t *testing.T) {
- pool := new(bnPool)
-
- a := newGFp12(pool)
- a.x.x.x.SetString("239846234862342323958623", 10)
- a.x.x.y.SetString("2359862352529835623", 10)
- a.x.y.x.SetString("928836523", 10)
- a.x.y.y.SetString("9856234", 10)
- a.x.z.x.SetString("235635286", 10)
- a.x.z.y.SetString("5628392833", 10)
- a.y.x.x.SetString("252936598265329856238956532167968", 10)
- a.y.x.y.SetString("23596239865236954178968", 10)
- a.y.y.x.SetString("95421692834", 10)
- a.y.y.y.SetString("236548", 10)
- a.y.z.x.SetString("924523", 10)
- a.y.z.y.SetString("12954623", 10)
-
- inv := newGFp12(pool)
- inv.Invert(a, pool)
-
- b := newGFp12(pool).Mul(inv, a, pool)
- if !isZero(b.x.x.x) ||
- !isZero(b.x.x.y) ||
- !isZero(b.x.y.x) ||
- !isZero(b.x.y.y) ||
- !isZero(b.x.z.x) ||
- !isZero(b.x.z.y) ||
- !isZero(b.y.x.x) ||
- !isZero(b.y.x.y) ||
- !isZero(b.y.y.x) ||
- !isZero(b.y.y.y) ||
- !isZero(b.y.z.x) ||
- !isOne(b.y.z.y) {
- t.Fatalf("bad result for a^-1*a: %s", b)
- }
-
- a.Put(pool)
- b.Put(pool)
- inv.Put(pool)
-
- if c := pool.Count(); c > 0 {
- t.Errorf("Pool count non-zero: %d\n", c)
- }
-}
-
-func TestCurveImpl(t *testing.T) {
- pool := new(bnPool)
-
- g := &curvePoint{
- pool.Get().SetInt64(1),
- pool.Get().SetInt64(-2),
- pool.Get().SetInt64(1),
- pool.Get().SetInt64(0),
- }
-
- x := pool.Get().SetInt64(32498273234)
- X := newCurvePoint(pool).Mul(g, x, pool)
-
- y := pool.Get().SetInt64(98732423523)
- Y := newCurvePoint(pool).Mul(g, y, pool)
-
- s1 := newCurvePoint(pool).Mul(X, y, pool).MakeAffine(pool)
- s2 := newCurvePoint(pool).Mul(Y, x, pool).MakeAffine(pool)
-
- if s1.x.Cmp(s2.x) != 0 ||
- s2.x.Cmp(s1.x) != 0 {
- t.Errorf("DH points don't match: (%s, %s) (%s, %s)", s1.x, s1.y, s2.x, s2.y)
- }
-
- pool.Put(x)
- X.Put(pool)
- pool.Put(y)
- Y.Put(pool)
- s1.Put(pool)
- s2.Put(pool)
- g.Put(pool)
-
- if c := pool.Count(); c > 0 {
- t.Errorf("Pool count non-zero: %d\n", c)
- }
-}
-
-func TestOrderG1(t *testing.T) {
- g := new(G1).ScalarBaseMult(Order)
- if !g.p.IsInfinity() {
- t.Error("G1 has incorrect order")
- }
-
- one := new(G1).ScalarBaseMult(new(big.Int).SetInt64(1))
- g.Add(g, one)
- g.p.MakeAffine(nil)
- if g.p.x.Cmp(one.p.x) != 0 || g.p.y.Cmp(one.p.y) != 0 {
- t.Errorf("1+0 != 1 in G1")
- }
-}
-
-func TestOrderG2(t *testing.T) {
- g := new(G2).ScalarBaseMult(Order)
- if !g.p.IsInfinity() {
- t.Error("G2 has incorrect order")
- }
-
- one := new(G2).ScalarBaseMult(new(big.Int).SetInt64(1))
- g.Add(g, one)
- g.p.MakeAffine(nil)
- if g.p.x.x.Cmp(one.p.x.x) != 0 ||
- g.p.x.y.Cmp(one.p.x.y) != 0 ||
- g.p.y.x.Cmp(one.p.y.x) != 0 ||
- g.p.y.y.Cmp(one.p.y.y) != 0 {
- t.Errorf("1+0 != 1 in G2")
- }
-}
-
-func TestOrderGT(t *testing.T) {
- gt := Pair(&G1{curveGen}, &G2{twistGen})
- g := new(GT).ScalarMult(gt, Order)
- if !g.p.IsOne() {
- t.Error("GT has incorrect order")
- }
-}
-
-func TestBilinearity(t *testing.T) {
- for i := 0; i < 2; i++ {
- a, p1, _ := RandomG1(rand.Reader)
- b, p2, _ := RandomG2(rand.Reader)
- e1 := Pair(p1, p2)
-
- e2 := Pair(&G1{curveGen}, &G2{twistGen})
- e2.ScalarMult(e2, a)
- e2.ScalarMult(e2, b)
-
- minusE2 := new(GT).Neg(e2)
- e1.Add(e1, minusE2)
-
- if !e1.p.IsOne() {
- t.Fatalf("bad pairing result: %s", e1)
- }
- }
-}
-
-func TestG1Marshal(t *testing.T) {
- g := new(G1).ScalarBaseMult(new(big.Int).SetInt64(1))
- form := g.Marshal()
- _, ok := new(G1).Unmarshal(form)
- if !ok {
- t.Fatalf("failed to unmarshal")
- }
-
- g.ScalarBaseMult(Order)
- form = g.Marshal()
- g2, ok := new(G1).Unmarshal(form)
- if !ok {
- t.Fatalf("failed to unmarshal ∞")
- }
- if !g2.p.IsInfinity() {
- t.Fatalf("∞ unmarshaled incorrectly")
- }
-}
-
-func TestG2Marshal(t *testing.T) {
- g := new(G2).ScalarBaseMult(new(big.Int).SetInt64(1))
- form := g.Marshal()
- _, ok := new(G2).Unmarshal(form)
- if !ok {
- t.Fatalf("failed to unmarshal")
- }
-
- g.ScalarBaseMult(Order)
- form = g.Marshal()
- g2, ok := new(G2).Unmarshal(form)
- if !ok {
- t.Fatalf("failed to unmarshal ∞")
- }
- if !g2.p.IsInfinity() {
- t.Fatalf("∞ unmarshaled incorrectly")
- }
-}
-
-func TestG1Identity(t *testing.T) {
- g := new(G1).ScalarBaseMult(new(big.Int).SetInt64(0))
- if !g.p.IsInfinity() {
- t.Error("failure")
- }
-}
-
-func TestG2Identity(t *testing.T) {
- g := new(G2).ScalarBaseMult(new(big.Int).SetInt64(0))
- if !g.p.IsInfinity() {
- t.Error("failure")
- }
-}
-
-func TestTripartiteDiffieHellman(t *testing.T) {
- a, _ := rand.Int(rand.Reader, Order)
- b, _ := rand.Int(rand.Reader, Order)
- c, _ := rand.Int(rand.Reader, Order)
-
- pa, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(a).Marshal())
- qa, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(a).Marshal())
- pb, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(b).Marshal())
- qb, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(b).Marshal())
- pc, _ := new(G1).Unmarshal(new(G1).ScalarBaseMult(c).Marshal())
- qc, _ := new(G2).Unmarshal(new(G2).ScalarBaseMult(c).Marshal())
-
- k1 := Pair(pb, qc)
- k1.ScalarMult(k1, a)
- k1Bytes := k1.Marshal()
-
- k2 := Pair(pc, qa)
- k2.ScalarMult(k2, b)
- k2Bytes := k2.Marshal()
-
- k3 := Pair(pa, qb)
- k3.ScalarMult(k3, c)
- k3Bytes := k3.Marshal()
-
- if !bytes.Equal(k1Bytes, k2Bytes) || !bytes.Equal(k2Bytes, k3Bytes) {
- t.Errorf("keys didn't agree")
- }
-}
-
-func BenchmarkPairing(b *testing.B) {
- for i := 0; i < b.N; i++ {
- Pair(&G1{curveGen}, &G2{twistGen})
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/constants.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/constants.go
deleted file mode 100644
index 1ccefc498..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/constants.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-import (
- "math/big"
-)
-
-func bigFromBase10(s string) *big.Int {
- n, _ := new(big.Int).SetString(s, 10)
- return n
-}
-
-// u is the BN parameter that determines the prime: 1868033³.
-var u = bigFromBase10("6518589491078791937")
-
-// p is a prime over which we form a basic field: 36uâ´+36u³+24u²+6u+1.
-var p = bigFromBase10("65000549695646603732796438742359905742825358107623003571877145026864184071783")
-
-// Order is the number of elements in both Gâ‚ and Gâ‚‚: 36uâ´+36u³+18u²+6u+1.
-var Order = bigFromBase10("65000549695646603732796438742359905742570406053903786389881062969044166799969")
-
-// xiToPMinus1Over6 is ξ^((p-1)/6) where ξ = i+3.
-var xiToPMinus1Over6 = &gfP2{bigFromBase10("8669379979083712429711189836753509758585994370025260553045152614783263110636"), bigFromBase10("19998038925833620163537568958541907098007303196759855091367510456613536016040")}
-
-// xiToPMinus1Over3 is ξ^((p-1)/3) where ξ = i+3.
-var xiToPMinus1Over3 = &gfP2{bigFromBase10("26098034838977895781559542626833399156321265654106457577426020397262786167059"), bigFromBase10("15931493369629630809226283458085260090334794394361662678240713231519278691715")}
-
-// xiToPMinus1Over2 is ξ^((p-1)/2) where ξ = i+3.
-var xiToPMinus1Over2 = &gfP2{bigFromBase10("50997318142241922852281555961173165965672272825141804376761836765206060036244"), bigFromBase10("38665955945962842195025998234511023902832543644254935982879660597356748036009")}
-
-// xiToPSquaredMinus1Over3 is ξ^((p²-1)/3) where ξ = i+3.
-var xiToPSquaredMinus1Over3 = bigFromBase10("65000549695646603727810655408050771481677621702948236658134783353303381437752")
-
-// xiTo2PSquaredMinus2Over3 is ξ^((2p²-2)/3) where ξ = i+3 (a cubic root of unity, mod p).
-var xiTo2PSquaredMinus2Over3 = bigFromBase10("4985783334309134261147736404674766913742361673560802634030")
-
-// xiToPSquaredMinus1Over6 is ξ^((1p²-1)/6) where ξ = i+3 (a cubic root of -1, mod p).
-var xiToPSquaredMinus1Over6 = bigFromBase10("65000549695646603727810655408050771481677621702948236658134783353303381437753")
-
-// xiTo2PMinus2Over3 is ξ^((2p-2)/3) where ξ = i+3.
-var xiTo2PMinus2Over3 = &gfP2{bigFromBase10("19885131339612776214803633203834694332692106372356013117629940868870585019582"), bigFromBase10("21645619881471562101905880913352894726728173167203616652430647841922248593627")}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/curve.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/curve.go
deleted file mode 100644
index 55b7063f1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/curve.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-import (
- "math/big"
-)
-
-// curvePoint implements the elliptic curve y²=x³+3. Points are kept in
-// Jacobian form and t=z² when valid. G₠is the set of points of this curve on
-// GF(p).
-type curvePoint struct {
- x, y, z, t *big.Int
-}
-
-var curveB = new(big.Int).SetInt64(3)
-
-// curveGen is the generator of Gâ‚.
-var curveGen = &curvePoint{
- new(big.Int).SetInt64(1),
- new(big.Int).SetInt64(-2),
- new(big.Int).SetInt64(1),
- new(big.Int).SetInt64(1),
-}
-
-func newCurvePoint(pool *bnPool) *curvePoint {
- return &curvePoint{
- pool.Get(),
- pool.Get(),
- pool.Get(),
- pool.Get(),
- }
-}
-
-func (c *curvePoint) String() string {
- c.MakeAffine(new(bnPool))
- return "(" + c.x.String() + ", " + c.y.String() + ")"
-}
-
-func (c *curvePoint) Put(pool *bnPool) {
- pool.Put(c.x)
- pool.Put(c.y)
- pool.Put(c.z)
- pool.Put(c.t)
-}
-
-func (c *curvePoint) Set(a *curvePoint) {
- c.x.Set(a.x)
- c.y.Set(a.y)
- c.z.Set(a.z)
- c.t.Set(a.t)
-}
-
-// IsOnCurve returns true iff c is on the curve where c must be in affine form.
-func (c *curvePoint) IsOnCurve() bool {
- yy := new(big.Int).Mul(c.y, c.y)
- xxx := new(big.Int).Mul(c.x, c.x)
- xxx.Mul(xxx, c.x)
- yy.Sub(yy, xxx)
- yy.Sub(yy, curveB)
- if yy.Sign() < 0 || yy.Cmp(p) >= 0 {
- yy.Mod(yy, p)
- }
- return yy.Sign() == 0
-}
-
-func (c *curvePoint) SetInfinity() {
- c.z.SetInt64(0)
-}
-
-func (c *curvePoint) IsInfinity() bool {
- return c.z.Sign() == 0
-}
-
-func (c *curvePoint) Add(a, b *curvePoint, pool *bnPool) {
- if a.IsInfinity() {
- c.Set(b)
- return
- }
- if b.IsInfinity() {
- c.Set(a)
- return
- }
-
- // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/addition/add-2007-bl.op3
-
- // Normalize the points by replacing a = [x1:y1:z1] and b = [x2:y2:z2]
- // by [u1:s1:z1·z2] and [u2:s2:z1·z2]
- // where u1 = x1·z2², s1 = y1·z2³ and u1 = x2·z1², s2 = y2·z1³
- z1z1 := pool.Get().Mul(a.z, a.z)
- z1z1.Mod(z1z1, p)
- z2z2 := pool.Get().Mul(b.z, b.z)
- z2z2.Mod(z2z2, p)
- u1 := pool.Get().Mul(a.x, z2z2)
- u1.Mod(u1, p)
- u2 := pool.Get().Mul(b.x, z1z1)
- u2.Mod(u2, p)
-
- t := pool.Get().Mul(b.z, z2z2)
- t.Mod(t, p)
- s1 := pool.Get().Mul(a.y, t)
- s1.Mod(s1, p)
-
- t.Mul(a.z, z1z1)
- t.Mod(t, p)
- s2 := pool.Get().Mul(b.y, t)
- s2.Mod(s2, p)
-
- // Compute x = (2h)²(s²-u1-u2)
- // where s = (s2-s1)/(u2-u1) is the slope of the line through
- // (u1,s1) and (u2,s2). The extra factor 2h = 2(u2-u1) comes from the value of z below.
- // This is also:
- // 4(s2-s1)² - 4h²(u1+u2) = 4(s2-s1)² - 4h³ - 4h²(2u1)
- // = r² - j - 2v
- // with the notations below.
- h := pool.Get().Sub(u2, u1)
- xEqual := h.Sign() == 0
-
- t.Add(h, h)
- // i = 4h²
- i := pool.Get().Mul(t, t)
- i.Mod(i, p)
- // j = 4h³
- j := pool.Get().Mul(h, i)
- j.Mod(j, p)
-
- t.Sub(s2, s1)
- yEqual := t.Sign() == 0
- if xEqual && yEqual {
- c.Double(a, pool)
- return
- }
- r := pool.Get().Add(t, t)
-
- v := pool.Get().Mul(u1, i)
- v.Mod(v, p)
-
- // t4 = 4(s2-s1)²
- t4 := pool.Get().Mul(r, r)
- t4.Mod(t4, p)
- t.Add(v, v)
- t6 := pool.Get().Sub(t4, j)
- c.x.Sub(t6, t)
-
- // Set y = -(2h)³(s1 + s*(x/4h²-u1))
- // This is also
- // y = - 2·s1·j - (s2-s1)(2x - 2i·u1) = r(v-x) - 2·s1·j
- t.Sub(v, c.x) // t7
- t4.Mul(s1, j) // t8
- t4.Mod(t4, p)
- t6.Add(t4, t4) // t9
- t4.Mul(r, t) // t10
- t4.Mod(t4, p)
- c.y.Sub(t4, t6)
-
- // Set z = 2(u2-u1)·z1·z2 = 2h·z1·z2
- t.Add(a.z, b.z) // t11
- t4.Mul(t, t) // t12
- t4.Mod(t4, p)
- t.Sub(t4, z1z1) // t13
- t4.Sub(t, z2z2) // t14
- c.z.Mul(t4, h)
- c.z.Mod(c.z, p)
-
- pool.Put(z1z1)
- pool.Put(z2z2)
- pool.Put(u1)
- pool.Put(u2)
- pool.Put(t)
- pool.Put(s1)
- pool.Put(s2)
- pool.Put(h)
- pool.Put(i)
- pool.Put(j)
- pool.Put(r)
- pool.Put(v)
- pool.Put(t4)
- pool.Put(t6)
-}
-
-func (c *curvePoint) Double(a *curvePoint, pool *bnPool) {
- // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3
- A := pool.Get().Mul(a.x, a.x)
- A.Mod(A, p)
- B := pool.Get().Mul(a.y, a.y)
- B.Mod(B, p)
- C := pool.Get().Mul(B, B)
- C.Mod(C, p)
-
- t := pool.Get().Add(a.x, B)
- t2 := pool.Get().Mul(t, t)
- t2.Mod(t2, p)
- t.Sub(t2, A)
- t2.Sub(t, C)
- d := pool.Get().Add(t2, t2)
- t.Add(A, A)
- e := pool.Get().Add(t, A)
- f := pool.Get().Mul(e, e)
- f.Mod(f, p)
-
- t.Add(d, d)
- c.x.Sub(f, t)
-
- t.Add(C, C)
- t2.Add(t, t)
- t.Add(t2, t2)
- c.y.Sub(d, c.x)
- t2.Mul(e, c.y)
- t2.Mod(t2, p)
- c.y.Sub(t2, t)
-
- t.Mul(a.y, a.z)
- t.Mod(t, p)
- c.z.Add(t, t)
-
- pool.Put(A)
- pool.Put(B)
- pool.Put(C)
- pool.Put(t)
- pool.Put(t2)
- pool.Put(d)
- pool.Put(e)
- pool.Put(f)
-}
-
-func (c *curvePoint) Mul(a *curvePoint, scalar *big.Int, pool *bnPool) *curvePoint {
- sum := newCurvePoint(pool)
- sum.SetInfinity()
- t := newCurvePoint(pool)
-
- for i := scalar.BitLen(); i >= 0; i-- {
- t.Double(sum, pool)
- if scalar.Bit(i) != 0 {
- sum.Add(t, a, pool)
- } else {
- sum.Set(t)
- }
- }
-
- c.Set(sum)
- sum.Put(pool)
- t.Put(pool)
- return c
-}
-
-func (c *curvePoint) MakeAffine(pool *bnPool) *curvePoint {
- if words := c.z.Bits(); len(words) == 1 && words[0] == 1 {
- return c
- }
-
- zInv := pool.Get().ModInverse(c.z, p)
- t := pool.Get().Mul(c.y, zInv)
- t.Mod(t, p)
- zInv2 := pool.Get().Mul(zInv, zInv)
- zInv2.Mod(zInv2, p)
- c.y.Mul(t, zInv2)
- c.y.Mod(c.y, p)
- t.Mul(c.x, zInv2)
- t.Mod(t, p)
- c.x.Set(t)
- c.z.SetInt64(1)
- c.t.SetInt64(1)
-
- pool.Put(zInv)
- pool.Put(t)
- pool.Put(zInv2)
-
- return c
-}
-
-func (c *curvePoint) Negative(a *curvePoint) {
- c.x.Set(a.x)
- c.y.Neg(a.y)
- c.z.Set(a.z)
- c.t.SetInt64(0)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/example_test.go
deleted file mode 100644
index b2d19807a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/example_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-import (
- "crypto/rand"
-)
-
-func ExamplePair() {
- // This implements the tripartite Diffie-Hellman algorithm from "A One
- // Round Protocol for Tripartite Diffie-Hellman", A. Joux.
- // http://www.springerlink.com/content/cddc57yyva0hburb/fulltext.pdf
-
- // Each of three parties, a, b and c, generate a private value.
- a, _ := rand.Int(rand.Reader, Order)
- b, _ := rand.Int(rand.Reader, Order)
- c, _ := rand.Int(rand.Reader, Order)
-
- // Then each party calculates gâ‚ and gâ‚‚ times their private value.
- pa := new(G1).ScalarBaseMult(a)
- qa := new(G2).ScalarBaseMult(a)
-
- pb := new(G1).ScalarBaseMult(b)
- qb := new(G2).ScalarBaseMult(b)
-
- pc := new(G1).ScalarBaseMult(c)
- qc := new(G2).ScalarBaseMult(c)
-
- // Now each party exchanges its public values with the other two and
- // all parties can calculate the shared key.
- k1 := Pair(pb, qc)
- k1.ScalarMult(k1, a)
-
- k2 := Pair(pc, qa)
- k2.ScalarMult(k2, b)
-
- k3 := Pair(pa, qb)
- k3.ScalarMult(k3, c)
-
- // k1, k2 and k3 will all be equal.
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp12.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp12.go
deleted file mode 100644
index f084eddf2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp12.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-// For details of the algorithms used, see "Multiplication and Squaring on
-// Pairing-Friendly Fields, Devegili et al.
-// http://eprint.iacr.org/2006/471.pdf.
-
-import (
- "math/big"
-)
-
-// gfP12 implements the field of size p¹² as a quadratic extension of gfP6
-// where ω²=τ.
-type gfP12 struct {
- x, y *gfP6 // value is xω + y
-}
-
-func newGFp12(pool *bnPool) *gfP12 {
- return &gfP12{newGFp6(pool), newGFp6(pool)}
-}
-
-func (e *gfP12) String() string {
- return "(" + e.x.String() + "," + e.y.String() + ")"
-}
-
-func (e *gfP12) Put(pool *bnPool) {
- e.x.Put(pool)
- e.y.Put(pool)
-}
-
-func (e *gfP12) Set(a *gfP12) *gfP12 {
- e.x.Set(a.x)
- e.y.Set(a.y)
- return e
-}
-
-func (e *gfP12) SetZero() *gfP12 {
- e.x.SetZero()
- e.y.SetZero()
- return e
-}
-
-func (e *gfP12) SetOne() *gfP12 {
- e.x.SetZero()
- e.y.SetOne()
- return e
-}
-
-func (e *gfP12) Minimal() {
- e.x.Minimal()
- e.y.Minimal()
-}
-
-func (e *gfP12) IsZero() bool {
- e.Minimal()
- return e.x.IsZero() && e.y.IsZero()
-}
-
-func (e *gfP12) IsOne() bool {
- e.Minimal()
- return e.x.IsZero() && e.y.IsOne()
-}
-
-func (e *gfP12) Conjugate(a *gfP12) *gfP12 {
- e.x.Negative(a.x)
- e.y.Set(a.y)
- return a
-}
-
-func (e *gfP12) Negative(a *gfP12) *gfP12 {
- e.x.Negative(a.x)
- e.y.Negative(a.y)
- return e
-}
-
-// Frobenius computes (xω+y)^p = x^p ω·ξ^((p-1)/6) + y^p
-func (e *gfP12) Frobenius(a *gfP12, pool *bnPool) *gfP12 {
- e.x.Frobenius(a.x, pool)
- e.y.Frobenius(a.y, pool)
- e.x.MulScalar(e.x, xiToPMinus1Over6, pool)
- return e
-}
-
-// FrobeniusP2 computes (xω+y)^p² = x^p² ω·ξ^((p²-1)/6) + y^p²
-func (e *gfP12) FrobeniusP2(a *gfP12, pool *bnPool) *gfP12 {
- e.x.FrobeniusP2(a.x)
- e.x.MulGFP(e.x, xiToPSquaredMinus1Over6)
- e.y.FrobeniusP2(a.y)
- return e
-}
-
-func (e *gfP12) Add(a, b *gfP12) *gfP12 {
- e.x.Add(a.x, b.x)
- e.y.Add(a.y, b.y)
- return e
-}
-
-func (e *gfP12) Sub(a, b *gfP12) *gfP12 {
- e.x.Sub(a.x, b.x)
- e.y.Sub(a.y, b.y)
- return e
-}
-
-func (e *gfP12) Mul(a, b *gfP12, pool *bnPool) *gfP12 {
- tx := newGFp6(pool)
- tx.Mul(a.x, b.y, pool)
- t := newGFp6(pool)
- t.Mul(b.x, a.y, pool)
- tx.Add(tx, t)
-
- ty := newGFp6(pool)
- ty.Mul(a.y, b.y, pool)
- t.Mul(a.x, b.x, pool)
- t.MulTau(t, pool)
- e.y.Add(ty, t)
- e.x.Set(tx)
-
- tx.Put(pool)
- ty.Put(pool)
- t.Put(pool)
- return e
-}
-
-func (e *gfP12) MulScalar(a *gfP12, b *gfP6, pool *bnPool) *gfP12 {
- e.x.Mul(e.x, b, pool)
- e.y.Mul(e.y, b, pool)
- return e
-}
-
-func (c *gfP12) Exp(a *gfP12, power *big.Int, pool *bnPool) *gfP12 {
- sum := newGFp12(pool)
- sum.SetOne()
- t := newGFp12(pool)
-
- for i := power.BitLen() - 1; i >= 0; i-- {
- t.Square(sum, pool)
- if power.Bit(i) != 0 {
- sum.Mul(t, a, pool)
- } else {
- sum.Set(t)
- }
- }
-
- c.Set(sum)
-
- sum.Put(pool)
- t.Put(pool)
-
- return c
-}
-
-func (e *gfP12) Square(a *gfP12, pool *bnPool) *gfP12 {
- // Complex squaring algorithm
- v0 := newGFp6(pool)
- v0.Mul(a.x, a.y, pool)
-
- t := newGFp6(pool)
- t.MulTau(a.x, pool)
- t.Add(a.y, t)
- ty := newGFp6(pool)
- ty.Add(a.x, a.y)
- ty.Mul(ty, t, pool)
- ty.Sub(ty, v0)
- t.MulTau(v0, pool)
- ty.Sub(ty, t)
-
- e.y.Set(ty)
- e.x.Double(v0)
-
- v0.Put(pool)
- t.Put(pool)
- ty.Put(pool)
-
- return e
-}
-
-func (e *gfP12) Invert(a *gfP12, pool *bnPool) *gfP12 {
- // See "Implementing cryptographic pairings", M. Scott, section 3.2.
- // ftp://136.206.11.249/pub/crypto/pairings.pdf
- t1 := newGFp6(pool)
- t2 := newGFp6(pool)
-
- t1.Square(a.x, pool)
- t2.Square(a.y, pool)
- t1.MulTau(t1, pool)
- t1.Sub(t2, t1)
- t2.Invert(t1, pool)
-
- e.x.Negative(a.x)
- e.y.Set(a.y)
- e.MulScalar(e, t2, pool)
-
- t1.Put(pool)
- t2.Put(pool)
-
- return e
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp2.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp2.go
deleted file mode 100644
index 97f3f1f3f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp2.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-// For details of the algorithms used, see "Multiplication and Squaring on
-// Pairing-Friendly Fields, Devegili et al.
-// http://eprint.iacr.org/2006/471.pdf.
-
-import (
- "math/big"
-)
-
-// gfP2 implements a field of size p² as a quadratic extension of the base
-// field where i²=-1.
-type gfP2 struct {
- x, y *big.Int // value is xi+y.
-}
-
-func newGFp2(pool *bnPool) *gfP2 {
- return &gfP2{pool.Get(), pool.Get()}
-}
-
-func (e *gfP2) String() string {
- x := new(big.Int).Mod(e.x, p)
- y := new(big.Int).Mod(e.y, p)
- return "(" + x.String() + "," + y.String() + ")"
-}
-
-func (e *gfP2) Put(pool *bnPool) {
- pool.Put(e.x)
- pool.Put(e.y)
-}
-
-func (e *gfP2) Set(a *gfP2) *gfP2 {
- e.x.Set(a.x)
- e.y.Set(a.y)
- return e
-}
-
-func (e *gfP2) SetZero() *gfP2 {
- e.x.SetInt64(0)
- e.y.SetInt64(0)
- return e
-}
-
-func (e *gfP2) SetOne() *gfP2 {
- e.x.SetInt64(0)
- e.y.SetInt64(1)
- return e
-}
-
-func (e *gfP2) Minimal() {
- if e.x.Sign() < 0 || e.x.Cmp(p) >= 0 {
- e.x.Mod(e.x, p)
- }
- if e.y.Sign() < 0 || e.y.Cmp(p) >= 0 {
- e.y.Mod(e.y, p)
- }
-}
-
-func (e *gfP2) IsZero() bool {
- return e.x.Sign() == 0 && e.y.Sign() == 0
-}
-
-func (e *gfP2) IsOne() bool {
- if e.x.Sign() != 0 {
- return false
- }
- words := e.y.Bits()
- return len(words) == 1 && words[0] == 1
-}
-
-func (e *gfP2) Conjugate(a *gfP2) *gfP2 {
- e.y.Set(a.y)
- e.x.Neg(a.x)
- return e
-}
-
-func (e *gfP2) Negative(a *gfP2) *gfP2 {
- e.x.Neg(a.x)
- e.y.Neg(a.y)
- return e
-}
-
-func (e *gfP2) Add(a, b *gfP2) *gfP2 {
- e.x.Add(a.x, b.x)
- e.y.Add(a.y, b.y)
- return e
-}
-
-func (e *gfP2) Sub(a, b *gfP2) *gfP2 {
- e.x.Sub(a.x, b.x)
- e.y.Sub(a.y, b.y)
- return e
-}
-
-func (e *gfP2) Double(a *gfP2) *gfP2 {
- e.x.Lsh(a.x, 1)
- e.y.Lsh(a.y, 1)
- return e
-}
-
-func (c *gfP2) Exp(a *gfP2, power *big.Int, pool *bnPool) *gfP2 {
- sum := newGFp2(pool)
- sum.SetOne()
- t := newGFp2(pool)
-
- for i := power.BitLen() - 1; i >= 0; i-- {
- t.Square(sum, pool)
- if power.Bit(i) != 0 {
- sum.Mul(t, a, pool)
- } else {
- sum.Set(t)
- }
- }
-
- c.Set(sum)
-
- sum.Put(pool)
- t.Put(pool)
-
- return c
-}
-
-// See "Multiplication and Squaring in Pairing-Friendly Fields",
-// http://eprint.iacr.org/2006/471.pdf
-func (e *gfP2) Mul(a, b *gfP2, pool *bnPool) *gfP2 {
- tx := pool.Get().Mul(a.x, b.y)
- t := pool.Get().Mul(b.x, a.y)
- tx.Add(tx, t)
- tx.Mod(tx, p)
-
- ty := pool.Get().Mul(a.y, b.y)
- t.Mul(a.x, b.x)
- ty.Sub(ty, t)
- e.y.Mod(ty, p)
- e.x.Set(tx)
-
- pool.Put(tx)
- pool.Put(ty)
- pool.Put(t)
-
- return e
-}
-
-func (e *gfP2) MulScalar(a *gfP2, b *big.Int) *gfP2 {
- e.x.Mul(a.x, b)
- e.y.Mul(a.y, b)
- return e
-}
-
-// MulXi sets e=ξa where ξ=i+3 and then returns e.
-func (e *gfP2) MulXi(a *gfP2, pool *bnPool) *gfP2 {
- // (xi+y)(i+3) = (3x+y)i+(3y-x)
- tx := pool.Get().Lsh(a.x, 1)
- tx.Add(tx, a.x)
- tx.Add(tx, a.y)
-
- ty := pool.Get().Lsh(a.y, 1)
- ty.Add(ty, a.y)
- ty.Sub(ty, a.x)
-
- e.x.Set(tx)
- e.y.Set(ty)
-
- pool.Put(tx)
- pool.Put(ty)
-
- return e
-}
-
-func (e *gfP2) Square(a *gfP2, pool *bnPool) *gfP2 {
- // Complex squaring algorithm:
- // (xi+b)² = (x+y)(y-x) + 2*i*x*y
- t1 := pool.Get().Sub(a.y, a.x)
- t2 := pool.Get().Add(a.x, a.y)
- ty := pool.Get().Mul(t1, t2)
- ty.Mod(ty, p)
-
- t1.Mul(a.x, a.y)
- t1.Lsh(t1, 1)
-
- e.x.Mod(t1, p)
- e.y.Set(ty)
-
- pool.Put(t1)
- pool.Put(t2)
- pool.Put(ty)
-
- return e
-}
-
-func (e *gfP2) Invert(a *gfP2, pool *bnPool) *gfP2 {
- // See "Implementing cryptographic pairings", M. Scott, section 3.2.
- // ftp://136.206.11.249/pub/crypto/pairings.pdf
- t := pool.Get()
- t.Mul(a.y, a.y)
- t2 := pool.Get()
- t2.Mul(a.x, a.x)
- t.Add(t, t2)
-
- inv := pool.Get()
- inv.ModInverse(t, p)
-
- e.x.Neg(a.x)
- e.x.Mul(e.x, inv)
- e.x.Mod(e.x, p)
-
- e.y.Mul(a.y, inv)
- e.y.Mod(e.y, p)
-
- pool.Put(t)
- pool.Put(t2)
- pool.Put(inv)
-
- return e
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp6.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp6.go
deleted file mode 100644
index f98ae782c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/gfp6.go
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-// For details of the algorithms used, see "Multiplication and Squaring on
-// Pairing-Friendly Fields, Devegili et al.
-// http://eprint.iacr.org/2006/471.pdf.
-
-import (
- "math/big"
-)
-
-// gfP6 implements the field of size pⶠas a cubic extension of gfP2 where τ³=ξ
-// and ξ=i+3.
-type gfP6 struct {
- x, y, z *gfP2 // value is xτ² + yτ + z
-}
-
-func newGFp6(pool *bnPool) *gfP6 {
- return &gfP6{newGFp2(pool), newGFp2(pool), newGFp2(pool)}
-}
-
-func (e *gfP6) String() string {
- return "(" + e.x.String() + "," + e.y.String() + "," + e.z.String() + ")"
-}
-
-func (e *gfP6) Put(pool *bnPool) {
- e.x.Put(pool)
- e.y.Put(pool)
- e.z.Put(pool)
-}
-
-func (e *gfP6) Set(a *gfP6) *gfP6 {
- e.x.Set(a.x)
- e.y.Set(a.y)
- e.z.Set(a.z)
- return e
-}
-
-func (e *gfP6) SetZero() *gfP6 {
- e.x.SetZero()
- e.y.SetZero()
- e.z.SetZero()
- return e
-}
-
-func (e *gfP6) SetOne() *gfP6 {
- e.x.SetZero()
- e.y.SetZero()
- e.z.SetOne()
- return e
-}
-
-func (e *gfP6) Minimal() {
- e.x.Minimal()
- e.y.Minimal()
- e.z.Minimal()
-}
-
-func (e *gfP6) IsZero() bool {
- return e.x.IsZero() && e.y.IsZero() && e.z.IsZero()
-}
-
-func (e *gfP6) IsOne() bool {
- return e.x.IsZero() && e.y.IsZero() && e.z.IsOne()
-}
-
-func (e *gfP6) Negative(a *gfP6) *gfP6 {
- e.x.Negative(a.x)
- e.y.Negative(a.y)
- e.z.Negative(a.z)
- return e
-}
-
-func (e *gfP6) Frobenius(a *gfP6, pool *bnPool) *gfP6 {
- e.x.Conjugate(a.x)
- e.y.Conjugate(a.y)
- e.z.Conjugate(a.z)
-
- e.x.Mul(e.x, xiTo2PMinus2Over3, pool)
- e.y.Mul(e.y, xiToPMinus1Over3, pool)
- return e
-}
-
-// FrobeniusP2 computes (xτ²+yτ+z)^(p²) = xτ^(2p²) + yτ^(p²) + z
-func (e *gfP6) FrobeniusP2(a *gfP6) *gfP6 {
- // τ^(2p²) = τ²τ^(2p²-2) = τ²ξ^((2p²-2)/3)
- e.x.MulScalar(a.x, xiTo2PSquaredMinus2Over3)
- // τ^(p²) = ττ^(p²-1) = τξ^((p²-1)/3)
- e.y.MulScalar(a.y, xiToPSquaredMinus1Over3)
- e.z.Set(a.z)
- return e
-}
-
-func (e *gfP6) Add(a, b *gfP6) *gfP6 {
- e.x.Add(a.x, b.x)
- e.y.Add(a.y, b.y)
- e.z.Add(a.z, b.z)
- return e
-}
-
-func (e *gfP6) Sub(a, b *gfP6) *gfP6 {
- e.x.Sub(a.x, b.x)
- e.y.Sub(a.y, b.y)
- e.z.Sub(a.z, b.z)
- return e
-}
-
-func (e *gfP6) Double(a *gfP6) *gfP6 {
- e.x.Double(a.x)
- e.y.Double(a.y)
- e.z.Double(a.z)
- return e
-}
-
-func (e *gfP6) Mul(a, b *gfP6, pool *bnPool) *gfP6 {
- // "Multiplication and Squaring on Pairing-Friendly Fields"
- // Section 4, Karatsuba method.
- // http://eprint.iacr.org/2006/471.pdf
-
- v0 := newGFp2(pool)
- v0.Mul(a.z, b.z, pool)
- v1 := newGFp2(pool)
- v1.Mul(a.y, b.y, pool)
- v2 := newGFp2(pool)
- v2.Mul(a.x, b.x, pool)
-
- t0 := newGFp2(pool)
- t0.Add(a.x, a.y)
- t1 := newGFp2(pool)
- t1.Add(b.x, b.y)
- tz := newGFp2(pool)
- tz.Mul(t0, t1, pool)
-
- tz.Sub(tz, v1)
- tz.Sub(tz, v2)
- tz.MulXi(tz, pool)
- tz.Add(tz, v0)
-
- t0.Add(a.y, a.z)
- t1.Add(b.y, b.z)
- ty := newGFp2(pool)
- ty.Mul(t0, t1, pool)
- ty.Sub(ty, v0)
- ty.Sub(ty, v1)
- t0.MulXi(v2, pool)
- ty.Add(ty, t0)
-
- t0.Add(a.x, a.z)
- t1.Add(b.x, b.z)
- tx := newGFp2(pool)
- tx.Mul(t0, t1, pool)
- tx.Sub(tx, v0)
- tx.Add(tx, v1)
- tx.Sub(tx, v2)
-
- e.x.Set(tx)
- e.y.Set(ty)
- e.z.Set(tz)
-
- t0.Put(pool)
- t1.Put(pool)
- tx.Put(pool)
- ty.Put(pool)
- tz.Put(pool)
- v0.Put(pool)
- v1.Put(pool)
- v2.Put(pool)
- return e
-}
-
-func (e *gfP6) MulScalar(a *gfP6, b *gfP2, pool *bnPool) *gfP6 {
- e.x.Mul(a.x, b, pool)
- e.y.Mul(a.y, b, pool)
- e.z.Mul(a.z, b, pool)
- return e
-}
-
-func (e *gfP6) MulGFP(a *gfP6, b *big.Int) *gfP6 {
- e.x.MulScalar(a.x, b)
- e.y.MulScalar(a.y, b)
- e.z.MulScalar(a.z, b)
- return e
-}
-
-// MulTau computes τ·(aτ²+bτ+c) = bτ²+cτ+aξ
-func (e *gfP6) MulTau(a *gfP6, pool *bnPool) {
- tz := newGFp2(pool)
- tz.MulXi(a.x, pool)
- ty := newGFp2(pool)
- ty.Set(a.y)
- e.y.Set(a.z)
- e.x.Set(ty)
- e.z.Set(tz)
- tz.Put(pool)
- ty.Put(pool)
-}
-
-func (e *gfP6) Square(a *gfP6, pool *bnPool) *gfP6 {
- v0 := newGFp2(pool).Square(a.z, pool)
- v1 := newGFp2(pool).Square(a.y, pool)
- v2 := newGFp2(pool).Square(a.x, pool)
-
- c0 := newGFp2(pool).Add(a.x, a.y)
- c0.Square(c0, pool)
- c0.Sub(c0, v1)
- c0.Sub(c0, v2)
- c0.MulXi(c0, pool)
- c0.Add(c0, v0)
-
- c1 := newGFp2(pool).Add(a.y, a.z)
- c1.Square(c1, pool)
- c1.Sub(c1, v0)
- c1.Sub(c1, v1)
- xiV2 := newGFp2(pool).MulXi(v2, pool)
- c1.Add(c1, xiV2)
-
- c2 := newGFp2(pool).Add(a.x, a.z)
- c2.Square(c2, pool)
- c2.Sub(c2, v0)
- c2.Add(c2, v1)
- c2.Sub(c2, v2)
-
- e.x.Set(c2)
- e.y.Set(c1)
- e.z.Set(c0)
-
- v0.Put(pool)
- v1.Put(pool)
- v2.Put(pool)
- c0.Put(pool)
- c1.Put(pool)
- c2.Put(pool)
- xiV2.Put(pool)
-
- return e
-}
-
-func (e *gfP6) Invert(a *gfP6, pool *bnPool) *gfP6 {
- // See "Implementing cryptographic pairings", M. Scott, section 3.2.
- // ftp://136.206.11.249/pub/crypto/pairings.pdf
-
- // Here we can give a short explanation of how it works: let j be a cubic root of
- // unity in GF(p²) so that 1+j+j²=0.
- // Then (xτ² + yτ + z)(xj²τ² + yjτ + z)(xjτ² + yj²τ + z)
- // = (xτ² + yτ + z)(Cτ²+Bτ+A)
- // = (x³ξ²+y³ξ+z³-3ξxyz) = F is an element of the base field (the norm).
- //
- // On the other hand (xj²τ² + yjτ + z)(xjτ² + yj²τ + z)
- // = τ²(y²-ξxz) + τ(ξx²-yz) + (z²-ξxy)
- //
- // So that's why A = (z²-ξxy), B = (ξx²-yz), C = (y²-ξxz)
- t1 := newGFp2(pool)
-
- A := newGFp2(pool)
- A.Square(a.z, pool)
- t1.Mul(a.x, a.y, pool)
- t1.MulXi(t1, pool)
- A.Sub(A, t1)
-
- B := newGFp2(pool)
- B.Square(a.x, pool)
- B.MulXi(B, pool)
- t1.Mul(a.y, a.z, pool)
- B.Sub(B, t1)
-
- C := newGFp2(pool)
- C.Square(a.y, pool)
- t1.Mul(a.x, a.z, pool)
- C.Sub(C, t1)
-
- F := newGFp2(pool)
- F.Mul(C, a.y, pool)
- F.MulXi(F, pool)
- t1.Mul(A, a.z, pool)
- F.Add(F, t1)
- t1.Mul(B, a.x, pool)
- t1.MulXi(t1, pool)
- F.Add(F, t1)
-
- F.Invert(F, pool)
-
- e.x.Mul(C, F, pool)
- e.y.Mul(B, F, pool)
- e.z.Mul(A, F, pool)
-
- t1.Put(pool)
- A.Put(pool)
- B.Put(pool)
- C.Put(pool)
- F.Put(pool)
-
- return e
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/optate.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/optate.go
deleted file mode 100644
index 7ae0746eb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/optate.go
+++ /dev/null
@@ -1,395 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-func lineFunctionAdd(r, p *twistPoint, q *curvePoint, r2 *gfP2, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) {
- // See the mixed addition algorithm from "Faster Computation of the
- // Tate Pairing", http://arxiv.org/pdf/0904.0854v3.pdf
-
- B := newGFp2(pool).Mul(p.x, r.t, pool)
-
- D := newGFp2(pool).Add(p.y, r.z)
- D.Square(D, pool)
- D.Sub(D, r2)
- D.Sub(D, r.t)
- D.Mul(D, r.t, pool)
-
- H := newGFp2(pool).Sub(B, r.x)
- I := newGFp2(pool).Square(H, pool)
-
- E := newGFp2(pool).Add(I, I)
- E.Add(E, E)
-
- J := newGFp2(pool).Mul(H, E, pool)
-
- L1 := newGFp2(pool).Sub(D, r.y)
- L1.Sub(L1, r.y)
-
- V := newGFp2(pool).Mul(r.x, E, pool)
-
- rOut = newTwistPoint(pool)
- rOut.x.Square(L1, pool)
- rOut.x.Sub(rOut.x, J)
- rOut.x.Sub(rOut.x, V)
- rOut.x.Sub(rOut.x, V)
-
- rOut.z.Add(r.z, H)
- rOut.z.Square(rOut.z, pool)
- rOut.z.Sub(rOut.z, r.t)
- rOut.z.Sub(rOut.z, I)
-
- t := newGFp2(pool).Sub(V, rOut.x)
- t.Mul(t, L1, pool)
- t2 := newGFp2(pool).Mul(r.y, J, pool)
- t2.Add(t2, t2)
- rOut.y.Sub(t, t2)
-
- rOut.t.Square(rOut.z, pool)
-
- t.Add(p.y, rOut.z)
- t.Square(t, pool)
- t.Sub(t, r2)
- t.Sub(t, rOut.t)
-
- t2.Mul(L1, p.x, pool)
- t2.Add(t2, t2)
- a = newGFp2(pool)
- a.Sub(t2, t)
-
- c = newGFp2(pool)
- c.MulScalar(rOut.z, q.y)
- c.Add(c, c)
-
- b = newGFp2(pool)
- b.SetZero()
- b.Sub(b, L1)
- b.MulScalar(b, q.x)
- b.Add(b, b)
-
- B.Put(pool)
- D.Put(pool)
- H.Put(pool)
- I.Put(pool)
- E.Put(pool)
- J.Put(pool)
- L1.Put(pool)
- V.Put(pool)
- t.Put(pool)
- t2.Put(pool)
-
- return
-}
-
-func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) {
- // See the doubling algorithm for a=0 from "Faster Computation of the
- // Tate Pairing", http://arxiv.org/pdf/0904.0854v3.pdf
-
- A := newGFp2(pool).Square(r.x, pool)
- B := newGFp2(pool).Square(r.y, pool)
- C := newGFp2(pool).Square(B, pool)
-
- D := newGFp2(pool).Add(r.x, B)
- D.Square(D, pool)
- D.Sub(D, A)
- D.Sub(D, C)
- D.Add(D, D)
-
- E := newGFp2(pool).Add(A, A)
- E.Add(E, A)
-
- G := newGFp2(pool).Square(E, pool)
-
- rOut = newTwistPoint(pool)
- rOut.x.Sub(G, D)
- rOut.x.Sub(rOut.x, D)
-
- rOut.z.Add(r.y, r.z)
- rOut.z.Square(rOut.z, pool)
- rOut.z.Sub(rOut.z, B)
- rOut.z.Sub(rOut.z, r.t)
-
- rOut.y.Sub(D, rOut.x)
- rOut.y.Mul(rOut.y, E, pool)
- t := newGFp2(pool).Add(C, C)
- t.Add(t, t)
- t.Add(t, t)
- rOut.y.Sub(rOut.y, t)
-
- rOut.t.Square(rOut.z, pool)
-
- t.Mul(E, r.t, pool)
- t.Add(t, t)
- b = newGFp2(pool)
- b.SetZero()
- b.Sub(b, t)
- b.MulScalar(b, q.x)
-
- a = newGFp2(pool)
- a.Add(r.x, E)
- a.Square(a, pool)
- a.Sub(a, A)
- a.Sub(a, G)
- t.Add(B, B)
- t.Add(t, t)
- a.Sub(a, t)
-
- c = newGFp2(pool)
- c.Mul(rOut.z, r.t, pool)
- c.Add(c, c)
- c.MulScalar(c, q.y)
-
- A.Put(pool)
- B.Put(pool)
- C.Put(pool)
- D.Put(pool)
- E.Put(pool)
- G.Put(pool)
- t.Put(pool)
-
- return
-}
-
-func mulLine(ret *gfP12, a, b, c *gfP2, pool *bnPool) {
- a2 := newGFp6(pool)
- a2.x.SetZero()
- a2.y.Set(a)
- a2.z.Set(b)
- a2.Mul(a2, ret.x, pool)
- t3 := newGFp6(pool).MulScalar(ret.y, c, pool)
-
- t := newGFp2(pool)
- t.Add(b, c)
- t2 := newGFp6(pool)
- t2.x.SetZero()
- t2.y.Set(a)
- t2.z.Set(t)
- ret.x.Add(ret.x, ret.y)
-
- ret.y.Set(t3)
-
- ret.x.Mul(ret.x, t2, pool)
- ret.x.Sub(ret.x, a2)
- ret.x.Sub(ret.x, ret.y)
- a2.MulTau(a2, pool)
- ret.y.Add(ret.y, a2)
-
- a2.Put(pool)
- t3.Put(pool)
- t2.Put(pool)
- t.Put(pool)
-}
-
-// sixuPlus2NAF is 6u+2 in non-adjacent form.
-var sixuPlus2NAF = []int8{0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 1}
-
-// miller implements the Miller loop for calculating the Optimal Ate pairing.
-// See algorithm 1 from http://cryptojedi.org/papers/dclxvi-20100714.pdf
-func miller(q *twistPoint, p *curvePoint, pool *bnPool) *gfP12 {
- ret := newGFp12(pool)
- ret.SetOne()
-
- aAffine := newTwistPoint(pool)
- aAffine.Set(q)
- aAffine.MakeAffine(pool)
-
- bAffine := newCurvePoint(pool)
- bAffine.Set(p)
- bAffine.MakeAffine(pool)
-
- minusA := newTwistPoint(pool)
- minusA.Negative(aAffine, pool)
-
- r := newTwistPoint(pool)
- r.Set(aAffine)
-
- r2 := newGFp2(pool)
- r2.Square(aAffine.y, pool)
-
- for i := len(sixuPlus2NAF) - 1; i > 0; i-- {
- a, b, c, newR := lineFunctionDouble(r, bAffine, pool)
- if i != len(sixuPlus2NAF)-1 {
- ret.Square(ret, pool)
- }
-
- mulLine(ret, a, b, c, pool)
- a.Put(pool)
- b.Put(pool)
- c.Put(pool)
- r.Put(pool)
- r = newR
-
- switch sixuPlus2NAF[i-1] {
- case 1:
- a, b, c, newR = lineFunctionAdd(r, aAffine, bAffine, r2, pool)
- case -1:
- a, b, c, newR = lineFunctionAdd(r, minusA, bAffine, r2, pool)
- default:
- continue
- }
-
- mulLine(ret, a, b, c, pool)
- a.Put(pool)
- b.Put(pool)
- c.Put(pool)
- r.Put(pool)
- r = newR
- }
-
- // In order to calculate Q1 we have to convert q from the sextic twist
- // to the full GF(p^12) group, apply the Frobenius there, and convert
- // back.
- //
- // The twist isomorphism is (x', y') -> (xω², yω³). If we consider just
- // x for a moment, then after applying the Frobenius, we have x̄ω^(2p)
- // where x̄ is the conjugate of x. If we are going to apply the inverse
- // isomorphism we need a value with a single coefficient of ω² so we
- // rewrite this as x̄ω^(2p-2)ω². ξⶠ= ω and, due to the construction of
- // p, 2p-2 is a multiple of six. Therefore we can rewrite as
- // x̄ξ^((p-1)/3)ω² and applying the inverse isomorphism eliminates the
- // ω².
- //
- // A similar argument can be made for the y value.
-
- q1 := newTwistPoint(pool)
- q1.x.Conjugate(aAffine.x)
- q1.x.Mul(q1.x, xiToPMinus1Over3, pool)
- q1.y.Conjugate(aAffine.y)
- q1.y.Mul(q1.y, xiToPMinus1Over2, pool)
- q1.z.SetOne()
- q1.t.SetOne()
-
- // For Q2 we are applying the p² Frobenius. The two conjugations cancel
- // out and we are left only with the factors from the isomorphism. In
- // the case of x, we end up with a pure number which is why
- // xiToPSquaredMinus1Over3 is ∈ GF(p). With y we get a factor of -1. We
- // ignore this to end up with -Q2.
-
- minusQ2 := newTwistPoint(pool)
- minusQ2.x.MulScalar(aAffine.x, xiToPSquaredMinus1Over3)
- minusQ2.y.Set(aAffine.y)
- minusQ2.z.SetOne()
- minusQ2.t.SetOne()
-
- r2.Square(q1.y, pool)
- a, b, c, newR := lineFunctionAdd(r, q1, bAffine, r2, pool)
- mulLine(ret, a, b, c, pool)
- a.Put(pool)
- b.Put(pool)
- c.Put(pool)
- r.Put(pool)
- r = newR
-
- r2.Square(minusQ2.y, pool)
- a, b, c, newR = lineFunctionAdd(r, minusQ2, bAffine, r2, pool)
- mulLine(ret, a, b, c, pool)
- a.Put(pool)
- b.Put(pool)
- c.Put(pool)
- r.Put(pool)
- r = newR
-
- aAffine.Put(pool)
- bAffine.Put(pool)
- minusA.Put(pool)
- r.Put(pool)
- r2.Put(pool)
-
- return ret
-}
-
-// finalExponentiation computes the (p¹²-1)/Order-th power of an element of
-// GF(p¹²) to obtain an element of GT (steps 13-15 of algorithm 1 from
-// http://cryptojedi.org/papers/dclxvi-20100714.pdf)
-func finalExponentiation(in *gfP12, pool *bnPool) *gfP12 {
- t1 := newGFp12(pool)
-
- // This is the p^6-Frobenius
- t1.x.Negative(in.x)
- t1.y.Set(in.y)
-
- inv := newGFp12(pool)
- inv.Invert(in, pool)
- t1.Mul(t1, inv, pool)
-
- t2 := newGFp12(pool).FrobeniusP2(t1, pool)
- t1.Mul(t1, t2, pool)
-
- fp := newGFp12(pool).Frobenius(t1, pool)
- fp2 := newGFp12(pool).FrobeniusP2(t1, pool)
- fp3 := newGFp12(pool).Frobenius(fp2, pool)
-
- fu, fu2, fu3 := newGFp12(pool), newGFp12(pool), newGFp12(pool)
- fu.Exp(t1, u, pool)
- fu2.Exp(fu, u, pool)
- fu3.Exp(fu2, u, pool)
-
- y3 := newGFp12(pool).Frobenius(fu, pool)
- fu2p := newGFp12(pool).Frobenius(fu2, pool)
- fu3p := newGFp12(pool).Frobenius(fu3, pool)
- y2 := newGFp12(pool).FrobeniusP2(fu2, pool)
-
- y0 := newGFp12(pool)
- y0.Mul(fp, fp2, pool)
- y0.Mul(y0, fp3, pool)
-
- y1, y4, y5 := newGFp12(pool), newGFp12(pool), newGFp12(pool)
- y1.Conjugate(t1)
- y5.Conjugate(fu2)
- y3.Conjugate(y3)
- y4.Mul(fu, fu2p, pool)
- y4.Conjugate(y4)
-
- y6 := newGFp12(pool)
- y6.Mul(fu3, fu3p, pool)
- y6.Conjugate(y6)
-
- t0 := newGFp12(pool)
- t0.Square(y6, pool)
- t0.Mul(t0, y4, pool)
- t0.Mul(t0, y5, pool)
- t1.Mul(y3, y5, pool)
- t1.Mul(t1, t0, pool)
- t0.Mul(t0, y2, pool)
- t1.Square(t1, pool)
- t1.Mul(t1, t0, pool)
- t1.Square(t1, pool)
- t0.Mul(t1, y1, pool)
- t1.Mul(t1, y0, pool)
- t0.Square(t0, pool)
- t0.Mul(t0, t1, pool)
-
- inv.Put(pool)
- t1.Put(pool)
- t2.Put(pool)
- fp.Put(pool)
- fp2.Put(pool)
- fp3.Put(pool)
- fu.Put(pool)
- fu2.Put(pool)
- fu3.Put(pool)
- fu2p.Put(pool)
- fu3p.Put(pool)
- y0.Put(pool)
- y1.Put(pool)
- y2.Put(pool)
- y3.Put(pool)
- y4.Put(pool)
- y5.Put(pool)
- y6.Put(pool)
-
- return t0
-}
-
-func optimalAte(a *twistPoint, b *curvePoint, pool *bnPool) *gfP12 {
- e := miller(a, b, pool)
- ret := finalExponentiation(e, pool)
- e.Put(pool)
-
- if a.IsInfinity() || b.IsInfinity() {
- ret.SetOne()
- }
-
- return ret
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/twist.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/twist.go
deleted file mode 100644
index 4f8b3fede..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/bn256/twist.go
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright 2012 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 file.
-
-package bn256
-
-import (
- "math/big"
-)
-
-// twistPoint implements the elliptic curve y²=x³+3/ξ over GF(p²). Points are
-// kept in Jacobian form and t=z² when valid. The group G₂ is the set of
-// n-torsion points of this curve over GF(p²) (where n = Order)
-type twistPoint struct {
- x, y, z, t *gfP2
-}
-
-var twistB = &gfP2{
- bigFromBase10("6500054969564660373279643874235990574282535810762300357187714502686418407178"),
- bigFromBase10("45500384786952622612957507119651934019977750675336102500314001518804928850249"),
-}
-
-// twistGen is the generator of group Gâ‚‚.
-var twistGen = &twistPoint{
- &gfP2{
- bigFromBase10("21167961636542580255011770066570541300993051739349375019639421053990175267184"),
- bigFromBase10("64746500191241794695844075326670126197795977525365406531717464316923369116492"),
- },
- &gfP2{
- bigFromBase10("20666913350058776956210519119118544732556678129809273996262322366050359951122"),
- bigFromBase10("17778617556404439934652658462602675281523610326338642107814333856843981424549"),
- },
- &gfP2{
- bigFromBase10("0"),
- bigFromBase10("1"),
- },
- &gfP2{
- bigFromBase10("0"),
- bigFromBase10("1"),
- },
-}
-
-func newTwistPoint(pool *bnPool) *twistPoint {
- return &twistPoint{
- newGFp2(pool),
- newGFp2(pool),
- newGFp2(pool),
- newGFp2(pool),
- }
-}
-
-func (c *twistPoint) String() string {
- return "(" + c.x.String() + ", " + c.y.String() + ", " + c.z.String() + ")"
-}
-
-func (c *twistPoint) Put(pool *bnPool) {
- c.x.Put(pool)
- c.y.Put(pool)
- c.z.Put(pool)
- c.t.Put(pool)
-}
-
-func (c *twistPoint) Set(a *twistPoint) {
- c.x.Set(a.x)
- c.y.Set(a.y)
- c.z.Set(a.z)
- c.t.Set(a.t)
-}
-
-// IsOnCurve returns true iff c is on the curve where c must be in affine form.
-func (c *twistPoint) IsOnCurve() bool {
- pool := new(bnPool)
- yy := newGFp2(pool).Square(c.y, pool)
- xxx := newGFp2(pool).Square(c.x, pool)
- xxx.Mul(xxx, c.x, pool)
- yy.Sub(yy, xxx)
- yy.Sub(yy, twistB)
- yy.Minimal()
- return yy.x.Sign() == 0 && yy.y.Sign() == 0
-}
-
-func (c *twistPoint) SetInfinity() {
- c.z.SetZero()
-}
-
-func (c *twistPoint) IsInfinity() bool {
- return c.z.IsZero()
-}
-
-func (c *twistPoint) Add(a, b *twistPoint, pool *bnPool) {
- // For additional comments, see the same function in curve.go.
-
- if a.IsInfinity() {
- c.Set(b)
- return
- }
- if b.IsInfinity() {
- c.Set(a)
- return
- }
-
- // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/addition/add-2007-bl.op3
- z1z1 := newGFp2(pool).Square(a.z, pool)
- z2z2 := newGFp2(pool).Square(b.z, pool)
- u1 := newGFp2(pool).Mul(a.x, z2z2, pool)
- u2 := newGFp2(pool).Mul(b.x, z1z1, pool)
-
- t := newGFp2(pool).Mul(b.z, z2z2, pool)
- s1 := newGFp2(pool).Mul(a.y, t, pool)
-
- t.Mul(a.z, z1z1, pool)
- s2 := newGFp2(pool).Mul(b.y, t, pool)
-
- h := newGFp2(pool).Sub(u2, u1)
- xEqual := h.IsZero()
-
- t.Add(h, h)
- i := newGFp2(pool).Square(t, pool)
- j := newGFp2(pool).Mul(h, i, pool)
-
- t.Sub(s2, s1)
- yEqual := t.IsZero()
- if xEqual && yEqual {
- c.Double(a, pool)
- return
- }
- r := newGFp2(pool).Add(t, t)
-
- v := newGFp2(pool).Mul(u1, i, pool)
-
- t4 := newGFp2(pool).Square(r, pool)
- t.Add(v, v)
- t6 := newGFp2(pool).Sub(t4, j)
- c.x.Sub(t6, t)
-
- t.Sub(v, c.x) // t7
- t4.Mul(s1, j, pool) // t8
- t6.Add(t4, t4) // t9
- t4.Mul(r, t, pool) // t10
- c.y.Sub(t4, t6)
-
- t.Add(a.z, b.z) // t11
- t4.Square(t, pool) // t12
- t.Sub(t4, z1z1) // t13
- t4.Sub(t, z2z2) // t14
- c.z.Mul(t4, h, pool)
-
- z1z1.Put(pool)
- z2z2.Put(pool)
- u1.Put(pool)
- u2.Put(pool)
- t.Put(pool)
- s1.Put(pool)
- s2.Put(pool)
- h.Put(pool)
- i.Put(pool)
- j.Put(pool)
- r.Put(pool)
- v.Put(pool)
- t4.Put(pool)
- t6.Put(pool)
-}
-
-func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
- // See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3
- A := newGFp2(pool).Square(a.x, pool)
- B := newGFp2(pool).Square(a.y, pool)
- C := newGFp2(pool).Square(B, pool)
-
- t := newGFp2(pool).Add(a.x, B)
- t2 := newGFp2(pool).Square(t, pool)
- t.Sub(t2, A)
- t2.Sub(t, C)
- d := newGFp2(pool).Add(t2, t2)
- t.Add(A, A)
- e := newGFp2(pool).Add(t, A)
- f := newGFp2(pool).Square(e, pool)
-
- t.Add(d, d)
- c.x.Sub(f, t)
-
- t.Add(C, C)
- t2.Add(t, t)
- t.Add(t2, t2)
- c.y.Sub(d, c.x)
- t2.Mul(e, c.y, pool)
- c.y.Sub(t2, t)
-
- t.Mul(a.y, a.z, pool)
- c.z.Add(t, t)
-
- A.Put(pool)
- B.Put(pool)
- C.Put(pool)
- t.Put(pool)
- t2.Put(pool)
- d.Put(pool)
- e.Put(pool)
- f.Put(pool)
-}
-
-func (c *twistPoint) Mul(a *twistPoint, scalar *big.Int, pool *bnPool) *twistPoint {
- sum := newTwistPoint(pool)
- sum.SetInfinity()
- t := newTwistPoint(pool)
-
- for i := scalar.BitLen(); i >= 0; i-- {
- t.Double(sum, pool)
- if scalar.Bit(i) != 0 {
- sum.Add(t, a, pool)
- } else {
- sum.Set(t)
- }
- }
-
- c.Set(sum)
- sum.Put(pool)
- t.Put(pool)
- return c
-}
-
-func (c *twistPoint) MakeAffine(pool *bnPool) *twistPoint {
- if c.z.IsOne() {
- return c
- }
-
- zInv := newGFp2(pool).Invert(c.z, pool)
- t := newGFp2(pool).Mul(c.y, zInv, pool)
- zInv2 := newGFp2(pool).Square(zInv, pool)
- c.y.Mul(t, zInv2, pool)
- t.Mul(c.x, zInv2, pool)
- c.x.Set(t)
- c.z.SetOne()
- c.t.SetOne()
-
- zInv.Put(pool)
- t.Put(pool)
- zInv2.Put(pool)
-
- return c
-}
-
-func (c *twistPoint) Negative(a *twistPoint, pool *bnPool) {
- c.x.Set(a.x)
- c.y.SetZero()
- c.y.Sub(c.y, a.y)
- c.z.Set(a.z)
- c.t.SetZero()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5.go
deleted file mode 100644
index 0b4af37bd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5.go
+++ /dev/null
@@ -1,526 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package cast5 implements CAST5, as defined in RFC 2144. CAST5 is a common
-// OpenPGP cipher.
-package cast5 // import "golang.org/x/crypto/cast5"
-
-import "errors"
-
-const BlockSize = 8
-const KeySize = 16
-
-type Cipher struct {
- masking [16]uint32
- rotate [16]uint8
-}
-
-func NewCipher(key []byte) (c *Cipher, err error) {
- if len(key) != KeySize {
- return nil, errors.New("CAST5: keys must be 16 bytes")
- }
-
- c = new(Cipher)
- c.keySchedule(key)
- return
-}
-
-func (c *Cipher) BlockSize() int {
- return BlockSize
-}
-
-func (c *Cipher) Encrypt(dst, src []byte) {
- l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
- r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
-
- l, r = r, l^f1(r, c.masking[0], c.rotate[0])
- l, r = r, l^f2(r, c.masking[1], c.rotate[1])
- l, r = r, l^f3(r, c.masking[2], c.rotate[2])
- l, r = r, l^f1(r, c.masking[3], c.rotate[3])
-
- l, r = r, l^f2(r, c.masking[4], c.rotate[4])
- l, r = r, l^f3(r, c.masking[5], c.rotate[5])
- l, r = r, l^f1(r, c.masking[6], c.rotate[6])
- l, r = r, l^f2(r, c.masking[7], c.rotate[7])
-
- l, r = r, l^f3(r, c.masking[8], c.rotate[8])
- l, r = r, l^f1(r, c.masking[9], c.rotate[9])
- l, r = r, l^f2(r, c.masking[10], c.rotate[10])
- l, r = r, l^f3(r, c.masking[11], c.rotate[11])
-
- l, r = r, l^f1(r, c.masking[12], c.rotate[12])
- l, r = r, l^f2(r, c.masking[13], c.rotate[13])
- l, r = r, l^f3(r, c.masking[14], c.rotate[14])
- l, r = r, l^f1(r, c.masking[15], c.rotate[15])
-
- dst[0] = uint8(r >> 24)
- dst[1] = uint8(r >> 16)
- dst[2] = uint8(r >> 8)
- dst[3] = uint8(r)
- dst[4] = uint8(l >> 24)
- dst[5] = uint8(l >> 16)
- dst[6] = uint8(l >> 8)
- dst[7] = uint8(l)
-}
-
-func (c *Cipher) Decrypt(dst, src []byte) {
- l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
- r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
-
- l, r = r, l^f1(r, c.masking[15], c.rotate[15])
- l, r = r, l^f3(r, c.masking[14], c.rotate[14])
- l, r = r, l^f2(r, c.masking[13], c.rotate[13])
- l, r = r, l^f1(r, c.masking[12], c.rotate[12])
-
- l, r = r, l^f3(r, c.masking[11], c.rotate[11])
- l, r = r, l^f2(r, c.masking[10], c.rotate[10])
- l, r = r, l^f1(r, c.masking[9], c.rotate[9])
- l, r = r, l^f3(r, c.masking[8], c.rotate[8])
-
- l, r = r, l^f2(r, c.masking[7], c.rotate[7])
- l, r = r, l^f1(r, c.masking[6], c.rotate[6])
- l, r = r, l^f3(r, c.masking[5], c.rotate[5])
- l, r = r, l^f2(r, c.masking[4], c.rotate[4])
-
- l, r = r, l^f1(r, c.masking[3], c.rotate[3])
- l, r = r, l^f3(r, c.masking[2], c.rotate[2])
- l, r = r, l^f2(r, c.masking[1], c.rotate[1])
- l, r = r, l^f1(r, c.masking[0], c.rotate[0])
-
- dst[0] = uint8(r >> 24)
- dst[1] = uint8(r >> 16)
- dst[2] = uint8(r >> 8)
- dst[3] = uint8(r)
- dst[4] = uint8(l >> 24)
- dst[5] = uint8(l >> 16)
- dst[6] = uint8(l >> 8)
- dst[7] = uint8(l)
-}
-
-type keyScheduleA [4][7]uint8
-type keyScheduleB [4][5]uint8
-
-// keyScheduleRound contains the magic values for a round of the key schedule.
-// The keyScheduleA deals with the lines like:
-// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8]
-// Conceptually, both x and z are in the same array, x first. The first
-// element describes which word of this array gets written to and the
-// second, which word gets read. So, for the line above, it's "4, 0", because
-// it's writing to the first word of z, which, being after x, is word 4, and
-// reading from the first word of x: word 0.
-//
-// Next are the indexes into the S-boxes. Now the array is treated as bytes. So
-// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear
-// that it's z that we're indexing.
-//
-// keyScheduleB deals with lines like:
-// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2]
-// "K1" is ignored because key words are always written in order. So the five
-// elements are the S-box indexes. They use the same form as in keyScheduleA,
-// above.
-
-type keyScheduleRound struct{}
-type keySchedule []keyScheduleRound
-
-var schedule = []struct {
- a keyScheduleA
- b keyScheduleB
-}{
- {
- keyScheduleA{
- {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8},
- {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},
- {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},
- {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},
- },
- keyScheduleB{
- {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2},
- {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6},
- {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9},
- {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc},
- },
- },
- {
- keyScheduleA{
- {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},
- {1, 4, 0, 2, 1, 3, 16 + 2},
- {2, 5, 7, 6, 5, 4, 16 + 1},
- {3, 7, 0xa, 9, 0xb, 8, 16 + 3},
- },
- keyScheduleB{
- {3, 2, 0xc, 0xd, 8},
- {1, 0, 0xe, 0xf, 0xd},
- {7, 6, 8, 9, 3},
- {5, 4, 0xa, 0xb, 7},
- },
- },
- {
- keyScheduleA{
- {4, 0, 0xd, 0xf, 0xc, 0xe, 8},
- {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},
- {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},
- {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},
- },
- keyScheduleB{
- {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9},
- {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc},
- {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2},
- {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6},
- },
- },
- {
- keyScheduleA{
- {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},
- {1, 4, 0, 2, 1, 3, 16 + 2},
- {2, 5, 7, 6, 5, 4, 16 + 1},
- {3, 7, 0xa, 9, 0xb, 8, 16 + 3},
- },
- keyScheduleB{
- {8, 9, 7, 6, 3},
- {0xa, 0xb, 5, 4, 7},
- {0xc, 0xd, 3, 2, 8},
- {0xe, 0xf, 1, 0, 0xd},
- },
- },
-}
-
-func (c *Cipher) keySchedule(in []byte) {
- var t [8]uint32
- var k [32]uint32
-
- for i := 0; i < 4; i++ {
- j := i * 4
- t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3])
- }
-
- x := []byte{6, 7, 4, 5}
- ki := 0
-
- for half := 0; half < 2; half++ {
- for _, round := range schedule {
- for j := 0; j < 4; j++ {
- var a [7]uint8
- copy(a[:], round.a[j][:])
- w := t[a[1]]
- w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff]
- w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff]
- w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff]
- w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff]
- w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff]
- t[a[0]] = w
- }
-
- for j := 0; j < 4; j++ {
- var b [5]uint8
- copy(b[:], round.b[j][:])
- w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff]
- w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff]
- w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff]
- w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff]
- w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff]
- k[ki] = w
- ki++
- }
- }
- }
-
- for i := 0; i < 16; i++ {
- c.masking[i] = k[i]
- c.rotate[i] = uint8(k[16+i] & 0x1f)
- }
-}
-
-// These are the three 'f' functions. See RFC 2144, section 2.2.
-func f1(d, m uint32, r uint8) uint32 {
- t := m + d
- I := (t << r) | (t >> (32 - r))
- return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff]
-}
-
-func f2(d, m uint32, r uint8) uint32 {
- t := m ^ d
- I := (t << r) | (t >> (32 - r))
- return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff]
-}
-
-func f3(d, m uint32, r uint8) uint32 {
- t := m - d
- I := (t << r) | (t >> (32 - r))
- return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff]
-}
-
-var sBox = [8][256]uint32{
- {
- 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,
- 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,
- 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,
- 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,
- 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,
- 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,
- 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,
- 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,
- 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,
- 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,
- 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,
- 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,
- 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,
- 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,
- 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,
- 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,
- 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,
- 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,
- 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,
- 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,
- 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,
- 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,
- 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,
- 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,
- 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,
- 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,
- 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,
- 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,
- 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,
- 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,
- 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,
- 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf,
- },
- {
- 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,
- 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,
- 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,
- 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,
- 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,
- 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,
- 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,
- 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,
- 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,
- 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,
- 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,
- 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,
- 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,
- 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,
- 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,
- 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,
- 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,
- 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,
- 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,
- 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,
- 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,
- 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,
- 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,
- 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,
- 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,
- 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,
- 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,
- 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,
- 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,
- 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,
- 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,
- 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1,
- },
- {
- 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,
- 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,
- 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,
- 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,
- 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,
- 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,
- 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,
- 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,
- 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,
- 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,
- 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,
- 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,
- 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,
- 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,
- 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,
- 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,
- 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,
- 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,
- 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,
- 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,
- 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,
- 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,
- 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,
- 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,
- 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,
- 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,
- 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,
- 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,
- 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,
- 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,
- 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,
- 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783,
- },
- {
- 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,
- 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,
- 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,
- 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,
- 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,
- 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,
- 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,
- 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,
- 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,
- 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,
- 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,
- 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,
- 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,
- 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,
- 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,
- 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,
- 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,
- 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,
- 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,
- 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,
- 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,
- 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,
- 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,
- 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,
- 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,
- 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,
- 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,
- 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,
- 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,
- 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,
- 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,
- 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2,
- },
- {
- 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,
- 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,
- 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,
- 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,
- 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,
- 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,
- 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,
- 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,
- 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,
- 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,
- 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,
- 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,
- 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,
- 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,
- 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,
- 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,
- 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,
- 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,
- 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,
- 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,
- 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,
- 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,
- 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,
- 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,
- 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,
- 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,
- 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,
- 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,
- 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,
- 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,
- 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,
- 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4,
- },
- {
- 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,
- 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,
- 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,
- 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,
- 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,
- 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,
- 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,
- 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,
- 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,
- 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,
- 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,
- 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,
- 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,
- 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,
- 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,
- 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,
- 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,
- 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,
- 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,
- 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,
- 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,
- 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,
- 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,
- 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,
- 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,
- 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,
- 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,
- 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,
- 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,
- 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,
- 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,
- 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f,
- },
- {
- 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,
- 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,
- 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,
- 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,
- 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,
- 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,
- 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,
- 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,
- 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,
- 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,
- 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,
- 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,
- 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,
- 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,
- 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,
- 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,
- 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,
- 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,
- 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,
- 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,
- 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,
- 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,
- 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,
- 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,
- 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,
- 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,
- 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,
- 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,
- 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,
- 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,
- 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,
- 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3,
- },
- {
- 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,
- 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,
- 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,
- 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,
- 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,
- 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,
- 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,
- 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,
- 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,
- 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,
- 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,
- 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,
- 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,
- 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,
- 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,
- 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,
- 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,
- 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,
- 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,
- 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,
- 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,
- 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,
- 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,
- 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,
- 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,
- 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,
- 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,
- 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,
- 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,
- 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,
- 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
- 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e,
- },
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5_test.go
deleted file mode 100644
index 778b272a6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cast5/cast5_test.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2010 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 file.
-
-package cast5
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
-)
-
-// This test vector is taken from RFC 2144, App B.1.
-// Since the other two test vectors are for reduced-round variants, we can't
-// use them.
-var basicTests = []struct {
- key, plainText, cipherText string
-}{
- {
- "0123456712345678234567893456789a",
- "0123456789abcdef",
- "238b4fe5847e44b2",
- },
-}
-
-func TestBasic(t *testing.T) {
- for i, test := range basicTests {
- key, _ := hex.DecodeString(test.key)
- plainText, _ := hex.DecodeString(test.plainText)
- expected, _ := hex.DecodeString(test.cipherText)
-
- c, err := NewCipher(key)
- if err != nil {
- t.Errorf("#%d: failed to create Cipher: %s", i, err)
- continue
- }
- var cipherText [BlockSize]byte
- c.Encrypt(cipherText[:], plainText)
- if !bytes.Equal(cipherText[:], expected) {
- t.Errorf("#%d: got:%x want:%x", i, cipherText, expected)
- }
-
- var plainTextAgain [BlockSize]byte
- c.Decrypt(plainTextAgain[:], cipherText[:])
- if !bytes.Equal(plainTextAgain[:], plainText) {
- t.Errorf("#%d: got:%x want:%x", i, plainTextAgain, plainText)
- }
- }
-}
-
-// TestFull performs the test specified in RFC 2144, App B.2.
-// However, due to the length of time taken, it's disabled here and a more
-// limited version is included, below.
-func TestFull(t *testing.T) {
- if testing.Short() {
- // This is too slow for normal testing
- return
- }
-
- a, b := iterate(1000000)
-
- const expectedA = "eea9d0a249fd3ba6b3436fb89d6dca92"
- const expectedB = "b2c95eb00c31ad7180ac05b8e83d696e"
-
- if hex.EncodeToString(a) != expectedA {
- t.Errorf("a: got:%x want:%s", a, expectedA)
- }
- if hex.EncodeToString(b) != expectedB {
- t.Errorf("b: got:%x want:%s", b, expectedB)
- }
-}
-
-func iterate(iterations int) ([]byte, []byte) {
- const initValueHex = "0123456712345678234567893456789a"
-
- initValue, _ := hex.DecodeString(initValueHex)
-
- var a, b [16]byte
- copy(a[:], initValue)
- copy(b[:], initValue)
-
- for i := 0; i < iterations; i++ {
- c, _ := NewCipher(b[:])
- c.Encrypt(a[:8], a[:8])
- c.Encrypt(a[8:], a[8:])
- c, _ = NewCipher(a[:])
- c.Encrypt(b[:8], b[:8])
- c.Encrypt(b[8:], b[8:])
- }
-
- return a[:], b[:]
-}
-
-func TestLimited(t *testing.T) {
- a, b := iterate(1000)
-
- const expectedA = "23f73b14b02a2ad7dfb9f2c35644798d"
- const expectedB = "e5bf37eff14c456a40b21ce369370a9f"
-
- if hex.EncodeToString(a) != expectedA {
- t.Errorf("a: got:%x want:%s", a, expectedA)
- }
- if hex.EncodeToString(b) != expectedB {
- t.Errorf("b: got:%x want:%s", b, expectedB)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go
deleted file mode 100644
index 3f0dcb9d8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
-package chacha20poly1305 // import "golang.org/x/crypto/chacha20poly1305"
-
-import (
- "crypto/cipher"
- "errors"
-)
-
-const (
- // KeySize is the size of the key used by this AEAD, in bytes.
- KeySize = 32
- // NonceSize is the size of the nonce used with this AEAD, in bytes.
- NonceSize = 12
-)
-
-type chacha20poly1305 struct {
- key [32]byte
-}
-
-// New returns a ChaCha20-Poly1305 AEAD that uses the given, 256-bit key.
-func New(key []byte) (cipher.AEAD, error) {
- if len(key) != KeySize {
- return nil, errors.New("chacha20poly1305: bad key length")
- }
- ret := new(chacha20poly1305)
- copy(ret.key[:], key)
- return ret, nil
-}
-
-func (c *chacha20poly1305) NonceSize() int {
- return NonceSize
-}
-
-func (c *chacha20poly1305) Overhead() int {
- return 16
-}
-
-func (c *chacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
- if len(nonce) != NonceSize {
- panic("chacha20poly1305: bad nonce length passed to Seal")
- }
-
- if uint64(len(plaintext)) > (1<<38)-64 {
- panic("chacha20poly1305: plaintext too large")
- }
-
- return c.seal(dst, nonce, plaintext, additionalData)
-}
-
-var errOpen = errors.New("chacha20poly1305: message authentication failed")
-
-func (c *chacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
- if len(nonce) != NonceSize {
- panic("chacha20poly1305: bad nonce length passed to Open")
- }
- if len(ciphertext) < 16 {
- return nil, errOpen
- }
- if uint64(len(ciphertext)) > (1<<38)-48 {
- panic("chacha20poly1305: ciphertext too large")
- }
-
- return c.open(dst, nonce, ciphertext, additionalData)
-}
-
-// sliceForAppend takes a slice and a requested number of bytes. It returns a
-// slice with the contents of the given slice followed by that many bytes and a
-// second slice that aliases into it and contains only the extra bytes. If the
-// original slice has sufficient capacity then no allocation is performed.
-func sliceForAppend(in []byte, n int) (head, tail []byte) {
- if total := len(in) + n; cap(in) >= total {
- head = in[:total]
- } else {
- head = make([]byte, total)
- copy(head, in)
- }
- tail = head[len(in):]
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
deleted file mode 100644
index 7cd7ad834..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7,amd64,!gccgo,!appengine
-
-package chacha20poly1305
-
-import "encoding/binary"
-
-//go:noescape
-func chacha20Poly1305Open(dst []byte, key []uint32, src, ad []byte) bool
-
-//go:noescape
-func chacha20Poly1305Seal(dst []byte, key []uint32, src, ad []byte)
-
-// cpuid is implemented in chacha20poly1305_amd64.s.
-func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
-
-// xgetbv with ecx = 0 is implemented in chacha20poly1305_amd64.s.
-func xgetbv() (eax, edx uint32)
-
-var (
- useASM bool
- useAVX2 bool
-)
-
-func init() {
- detectCPUFeatures()
-}
-
-// detectCPUFeatures is used to detect if cpu instructions
-// used by the functions implemented in assembler in
-// chacha20poly1305_amd64.s are supported.
-func detectCPUFeatures() {
- maxID, _, _, _ := cpuid(0, 0)
- if maxID < 1 {
- return
- }
-
- _, _, ecx1, _ := cpuid(1, 0)
-
- haveSSSE3 := isSet(9, ecx1)
- useASM = haveSSSE3
-
- haveOSXSAVE := isSet(27, ecx1)
-
- osSupportsAVX := false
- // For XGETBV, OSXSAVE bit is required and sufficient.
- if haveOSXSAVE {
- eax, _ := xgetbv()
- // Check if XMM and YMM registers have OS support.
- osSupportsAVX = isSet(1, eax) && isSet(2, eax)
- }
- haveAVX := isSet(28, ecx1) && osSupportsAVX
-
- if maxID < 7 {
- return
- }
-
- _, ebx7, _, _ := cpuid(7, 0)
- haveAVX2 := isSet(5, ebx7) && haveAVX
- haveBMI2 := isSet(8, ebx7)
-
- useAVX2 = haveAVX2 && haveBMI2
-}
-
-// isSet checks if bit at bitpos is set in value.
-func isSet(bitpos uint, value uint32) bool {
- return value&(1<<bitpos) != 0
-}
-
-// setupState writes a ChaCha20 input matrix to state. See
-// https://tools.ietf.org/html/rfc7539#section-2.3.
-func setupState(state *[16]uint32, key *[32]byte, nonce []byte) {
- state[0] = 0x61707865
- state[1] = 0x3320646e
- state[2] = 0x79622d32
- state[3] = 0x6b206574
-
- state[4] = binary.LittleEndian.Uint32(key[:4])
- state[5] = binary.LittleEndian.Uint32(key[4:8])
- state[6] = binary.LittleEndian.Uint32(key[8:12])
- state[7] = binary.LittleEndian.Uint32(key[12:16])
- state[8] = binary.LittleEndian.Uint32(key[16:20])
- state[9] = binary.LittleEndian.Uint32(key[20:24])
- state[10] = binary.LittleEndian.Uint32(key[24:28])
- state[11] = binary.LittleEndian.Uint32(key[28:32])
-
- state[12] = 0
- state[13] = binary.LittleEndian.Uint32(nonce[:4])
- state[14] = binary.LittleEndian.Uint32(nonce[4:8])
- state[15] = binary.LittleEndian.Uint32(nonce[8:12])
-}
-
-func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte {
- if !useASM {
- return c.sealGeneric(dst, nonce, plaintext, additionalData)
- }
-
- var state [16]uint32
- setupState(&state, &c.key, nonce)
-
- ret, out := sliceForAppend(dst, len(plaintext)+16)
- chacha20Poly1305Seal(out[:], state[:], plaintext, additionalData)
- return ret
-}
-
-func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
- if !useASM {
- return c.openGeneric(dst, nonce, ciphertext, additionalData)
- }
-
- var state [16]uint32
- setupState(&state, &c.key, nonce)
-
- ciphertext = ciphertext[:len(ciphertext)-16]
- ret, out := sliceForAppend(dst, len(ciphertext))
- if !chacha20Poly1305Open(out, state[:], ciphertext, additionalData) {
- for i := range out {
- out[i] = 0
- }
- return nil, errOpen
- }
-
- return ret, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
deleted file mode 100644
index 1c57e3894..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
+++ /dev/null
@@ -1,2714 +0,0 @@
-// Copyright 2016 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 file.
-
-// This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare.
-
-// +build go1.7,amd64,!gccgo,!appengine
-
-#include "textflag.h"
-// General register allocation
-#define oup DI
-#define inp SI
-#define inl BX
-#define adp CX // free to reuse, after we hash the additional data
-#define keyp R8 // free to reuse, when we copy the key to stack
-#define itr2 R9 // general iterator
-#define itr1 CX // general iterator
-#define acc0 R10
-#define acc1 R11
-#define acc2 R12
-#define t0 R13
-#define t1 R14
-#define t2 R15
-#define t3 R8
-// Register and stack allocation for the SSE code
-#define rStore (0*16)(BP)
-#define sStore (1*16)(BP)
-#define state1Store (2*16)(BP)
-#define state2Store (3*16)(BP)
-#define tmpStore (4*16)(BP)
-#define ctr0Store (5*16)(BP)
-#define ctr1Store (6*16)(BP)
-#define ctr2Store (7*16)(BP)
-#define ctr3Store (8*16)(BP)
-#define A0 X0
-#define A1 X1
-#define A2 X2
-#define B0 X3
-#define B1 X4
-#define B2 X5
-#define C0 X6
-#define C1 X7
-#define C2 X8
-#define D0 X9
-#define D1 X10
-#define D2 X11
-#define T0 X12
-#define T1 X13
-#define T2 X14
-#define T3 X15
-#define A3 T0
-#define B3 T1
-#define C3 T2
-#define D3 T3
-// Register and stack allocation for the AVX2 code
-#define rsStoreAVX2 (0*32)(BP)
-#define state1StoreAVX2 (1*32)(BP)
-#define state2StoreAVX2 (2*32)(BP)
-#define ctr0StoreAVX2 (3*32)(BP)
-#define ctr1StoreAVX2 (4*32)(BP)
-#define ctr2StoreAVX2 (5*32)(BP)
-#define ctr3StoreAVX2 (6*32)(BP)
-#define tmpStoreAVX2 (7*32)(BP) // 256 bytes on stack
-#define AA0 Y0
-#define AA1 Y5
-#define AA2 Y6
-#define AA3 Y7
-#define BB0 Y14
-#define BB1 Y9
-#define BB2 Y10
-#define BB3 Y11
-#define CC0 Y12
-#define CC1 Y13
-#define CC2 Y8
-#define CC3 Y15
-#define DD0 Y4
-#define DD1 Y1
-#define DD2 Y2
-#define DD3 Y3
-#define TT0 DD3
-#define TT1 AA3
-#define TT2 BB3
-#define TT3 CC3
-// ChaCha20 constants
-DATA ·chacha20Constants<>+0x00(SB)/4, $0x61707865
-DATA ·chacha20Constants<>+0x04(SB)/4, $0x3320646e
-DATA ·chacha20Constants<>+0x08(SB)/4, $0x79622d32
-DATA ·chacha20Constants<>+0x0c(SB)/4, $0x6b206574
-DATA ·chacha20Constants<>+0x10(SB)/4, $0x61707865
-DATA ·chacha20Constants<>+0x14(SB)/4, $0x3320646e
-DATA ·chacha20Constants<>+0x18(SB)/4, $0x79622d32
-DATA ·chacha20Constants<>+0x1c(SB)/4, $0x6b206574
-// <<< 16 with PSHUFB
-DATA ·rol16<>+0x00(SB)/8, $0x0504070601000302
-DATA ·rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A
-DATA ·rol16<>+0x10(SB)/8, $0x0504070601000302
-DATA ·rol16<>+0x18(SB)/8, $0x0D0C0F0E09080B0A
-// <<< 8 with PSHUFB
-DATA ·rol8<>+0x00(SB)/8, $0x0605040702010003
-DATA ·rol8<>+0x08(SB)/8, $0x0E0D0C0F0A09080B
-DATA ·rol8<>+0x10(SB)/8, $0x0605040702010003
-DATA ·rol8<>+0x18(SB)/8, $0x0E0D0C0F0A09080B
-
-DATA ·avx2InitMask<>+0x00(SB)/8, $0x0
-DATA ·avx2InitMask<>+0x08(SB)/8, $0x0
-DATA ·avx2InitMask<>+0x10(SB)/8, $0x1
-DATA ·avx2InitMask<>+0x18(SB)/8, $0x0
-
-DATA ·avx2IncMask<>+0x00(SB)/8, $0x2
-DATA ·avx2IncMask<>+0x08(SB)/8, $0x0
-DATA ·avx2IncMask<>+0x10(SB)/8, $0x2
-DATA ·avx2IncMask<>+0x18(SB)/8, $0x0
-// Poly1305 key clamp
-DATA ·polyClampMask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
-DATA ·polyClampMask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
-DATA ·polyClampMask<>+0x10(SB)/8, $0xFFFFFFFFFFFFFFFF
-DATA ·polyClampMask<>+0x18(SB)/8, $0xFFFFFFFFFFFFFFFF
-
-DATA ·sseIncMask<>+0x00(SB)/8, $0x1
-DATA ·sseIncMask<>+0x08(SB)/8, $0x0
-// To load/store the last < 16 bytes in a buffer
-DATA ·andMask<>+0x00(SB)/8, $0x00000000000000ff
-DATA ·andMask<>+0x08(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x10(SB)/8, $0x000000000000ffff
-DATA ·andMask<>+0x18(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x20(SB)/8, $0x0000000000ffffff
-DATA ·andMask<>+0x28(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x30(SB)/8, $0x00000000ffffffff
-DATA ·andMask<>+0x38(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x40(SB)/8, $0x000000ffffffffff
-DATA ·andMask<>+0x48(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x50(SB)/8, $0x0000ffffffffffff
-DATA ·andMask<>+0x58(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x60(SB)/8, $0x00ffffffffffffff
-DATA ·andMask<>+0x68(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x70(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0x78(SB)/8, $0x0000000000000000
-DATA ·andMask<>+0x80(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0x88(SB)/8, $0x00000000000000ff
-DATA ·andMask<>+0x90(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0x98(SB)/8, $0x000000000000ffff
-DATA ·andMask<>+0xa0(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0xa8(SB)/8, $0x0000000000ffffff
-DATA ·andMask<>+0xb0(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0xb8(SB)/8, $0x00000000ffffffff
-DATA ·andMask<>+0xc0(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0xc8(SB)/8, $0x000000ffffffffff
-DATA ·andMask<>+0xd0(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0xd8(SB)/8, $0x0000ffffffffffff
-DATA ·andMask<>+0xe0(SB)/8, $0xffffffffffffffff
-DATA ·andMask<>+0xe8(SB)/8, $0x00ffffffffffffff
-
-GLOBL ·chacha20Constants<>(SB), (NOPTR+RODATA), $32
-GLOBL ·rol16<>(SB), (NOPTR+RODATA), $32
-GLOBL ·rol8<>(SB), (NOPTR+RODATA), $32
-GLOBL ·sseIncMask<>(SB), (NOPTR+RODATA), $16
-GLOBL ·avx2IncMask<>(SB), (NOPTR+RODATA), $32
-GLOBL ·avx2InitMask<>(SB), (NOPTR+RODATA), $32
-GLOBL ·polyClampMask<>(SB), (NOPTR+RODATA), $32
-GLOBL ·andMask<>(SB), (NOPTR+RODATA), $240
-// No PALIGNR in Go ASM yet (but VPALIGNR is present).
-#define shiftB0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X3, X3
-#define shiftB1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x04 // PALIGNR $4, X4, X4
-#define shiftB2Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X5, X5
-#define shiftB3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X13, X13
-#define shiftC0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X6, X6
-#define shiftC1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x08 // PALIGNR $8, X7, X7
-#define shiftC2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc0; BYTE $0x08 // PALIGNR $8, X8, X8
-#define shiftC3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X14, X14
-#define shiftD0Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x0c // PALIGNR $12, X9, X9
-#define shiftD1Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x0c // PALIGNR $12, X10, X10
-#define shiftD2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X11, X11
-#define shiftD3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x0c // PALIGNR $12, X15, X15
-#define shiftB0Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X3, X3
-#define shiftB1Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x0c // PALIGNR $12, X4, X4
-#define shiftB2Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X5, X5
-#define shiftB3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X13, X13
-#define shiftC0Right shiftC0Left
-#define shiftC1Right shiftC1Left
-#define shiftC2Right shiftC2Left
-#define shiftC3Right shiftC3Left
-#define shiftD0Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x04 // PALIGNR $4, X9, X9
-#define shiftD1Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x04 // PALIGNR $4, X10, X10
-#define shiftD2Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X11, X11
-#define shiftD3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x04 // PALIGNR $4, X15, X15
-// Some macros
-#define chachaQR(A, B, C, D, T) \
- PADDD B, A; PXOR A, D; PSHUFB ·rol16<>(SB), D \
- PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $12, T; PSRLL $20, B; PXOR T, B \
- PADDD B, A; PXOR A, D; PSHUFB ·rol8<>(SB), D \
- PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $7, T; PSRLL $25, B; PXOR T, B
-
-#define chachaQR_AVX2(A, B, C, D, T) \
- VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol16<>(SB), D, D \
- VPADDD D, C, C; VPXOR C, B, B; VPSLLD $12, B, T; VPSRLD $20, B, B; VPXOR T, B, B \
- VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol8<>(SB), D, D \
- VPADDD D, C, C; VPXOR C, B, B; VPSLLD $7, B, T; VPSRLD $25, B, B; VPXOR T, B, B
-
-#define polyAdd(S) ADDQ S, acc0; ADCQ 8+S, acc1; ADCQ $1, acc2
-#define polyMulStage1 MOVQ (0*8)(BP), AX; MOVQ AX, t2; MULQ acc0; MOVQ AX, t0; MOVQ DX, t1; MOVQ (0*8)(BP), AX; MULQ acc1; IMULQ acc2, t2; ADDQ AX, t1; ADCQ DX, t2
-#define polyMulStage2 MOVQ (1*8)(BP), AX; MOVQ AX, t3; MULQ acc0; ADDQ AX, t1; ADCQ $0, DX; MOVQ DX, acc0; MOVQ (1*8)(BP), AX; MULQ acc1; ADDQ AX, t2; ADCQ $0, DX
-#define polyMulStage3 IMULQ acc2, t3; ADDQ acc0, t2; ADCQ DX, t3
-#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t2:t3; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2
-
-#define polyMulStage1_AVX2 MOVQ (0*8)(BP), DX; MOVQ DX, t2; MULXQ acc0, t0, t1; IMULQ acc2, t2; MULXQ acc1, AX, DX; ADDQ AX, t1; ADCQ DX, t2
-#define polyMulStage2_AVX2 MOVQ (1*8)(BP), DX; MULXQ acc0, acc0, AX; ADDQ acc0, t1; MULXQ acc1, acc1, t3; ADCQ acc1, t2; ADCQ $0, t3
-#define polyMulStage3_AVX2 IMULQ acc2, DX; ADDQ AX, t2; ADCQ DX, t3
-
-#define polyMul polyMulStage1; polyMulStage2; polyMulStage3; polyMulReduceStage
-#define polyMulAVX2 polyMulStage1_AVX2; polyMulStage2_AVX2; polyMulStage3_AVX2; polyMulReduceStage
-// ----------------------------------------------------------------------------
-TEXT polyHashADInternal<>(SB), NOSPLIT, $0
- // adp points to beginning of additional data
- // itr2 holds ad length
- XORQ acc0, acc0
- XORQ acc1, acc1
- XORQ acc2, acc2
- CMPQ itr2, $13
- JNE hashADLoop
-
-openFastTLSAD:
- // Special treatment for the TLS case of 13 bytes
- MOVQ (adp), acc0
- MOVQ 5(adp), acc1
- SHRQ $24, acc1
- MOVQ $1, acc2
- polyMul
- RET
-
-hashADLoop:
- // Hash in 16 byte chunks
- CMPQ itr2, $16
- JB hashADTail
- polyAdd(0(adp))
- LEAQ (1*16)(adp), adp
- SUBQ $16, itr2
- polyMul
- JMP hashADLoop
-
-hashADTail:
- CMPQ itr2, $0
- JE hashADDone
-
- // Hash last < 16 byte tail
- XORQ t0, t0
- XORQ t1, t1
- XORQ t2, t2
- ADDQ itr2, adp
-
-hashADTailLoop:
- SHLQ $8, t1:t0
- SHLQ $8, t0
- MOVB -1(adp), t2
- XORQ t2, t0
- DECQ adp
- DECQ itr2
- JNE hashADTailLoop
-
-hashADTailFinish:
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
-
- // Finished AD
-hashADDone:
- RET
-
-// ----------------------------------------------------------------------------
-// func chacha20Poly1305Open(dst, key, src, ad []byte) bool
-TEXT ·chacha20Poly1305Open(SB), 0, $288-97
- // For aligned stack access
- MOVQ SP, BP
- ADDQ $32, BP
- ANDQ $-32, BP
- MOVQ dst+0(FP), oup
- MOVQ key+24(FP), keyp
- MOVQ src+48(FP), inp
- MOVQ src_len+56(FP), inl
- MOVQ ad+72(FP), adp
-
- // Check for AVX2 support
- CMPB ·useAVX2(SB), $1
- JE chacha20Poly1305Open_AVX2
-
- // Special optimization, for very short buffers
- CMPQ inl, $128
- JBE openSSE128 // About 16% faster
-
- // For long buffers, prepare the poly key first
- MOVOU ·chacha20Constants<>(SB), A0
- MOVOU (1*16)(keyp), B0
- MOVOU (2*16)(keyp), C0
- MOVOU (3*16)(keyp), D0
- MOVO D0, T1
-
- // Store state on stack for future use
- MOVO B0, state1Store
- MOVO C0, state2Store
- MOVO D0, ctr3Store
- MOVQ $10, itr2
-
-openSSEPreparePolyKey:
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- DECQ itr2
- JNE openSSEPreparePolyKey
-
- // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0
-
- // Clamp and store the key
- PAND ·polyClampMask<>(SB), A0
- MOVO A0, rStore; MOVO B0, sStore
-
- // Hash AAD
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
-openSSEMainLoop:
- CMPQ inl, $256
- JB openSSEMainLoopDone
-
- // Load state, increment counter blocks
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3
-
- // Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
-
- // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash 2 blocks, and for the remaining 4 only 1 block - for a total of 16
- MOVQ $4, itr1
- MOVQ inp, itr2
-
-openSSEInternalLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyAdd(0(itr2))
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- LEAQ (2*8)(itr2), itr2
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- polyMulStage3
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr1
- JGE openSSEInternalLoop
-
- polyAdd(0(itr2))
- polyMul
- LEAQ (2*8)(itr2), itr2
-
- CMPQ itr1, $-6
- JG openSSEInternalLoop
-
- // Add in the state
- PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
-
- // Load - xor - store
- MOVO D3, tmpStore
- MOVOU (0*16)(inp), D3; PXOR D3, A0; MOVOU A0, (0*16)(oup)
- MOVOU (1*16)(inp), D3; PXOR D3, B0; MOVOU B0, (1*16)(oup)
- MOVOU (2*16)(inp), D3; PXOR D3, C0; MOVOU C0, (2*16)(oup)
- MOVOU (3*16)(inp), D3; PXOR D3, D0; MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), D0; PXOR D0, A1; MOVOU A1, (4*16)(oup)
- MOVOU (5*16)(inp), D0; PXOR D0, B1; MOVOU B1, (5*16)(oup)
- MOVOU (6*16)(inp), D0; PXOR D0, C1; MOVOU C1, (6*16)(oup)
- MOVOU (7*16)(inp), D0; PXOR D0, D1; MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), D0; PXOR D0, A2; MOVOU A2, (8*16)(oup)
- MOVOU (9*16)(inp), D0; PXOR D0, B2; MOVOU B2, (9*16)(oup)
- MOVOU (10*16)(inp), D0; PXOR D0, C2; MOVOU C2, (10*16)(oup)
- MOVOU (11*16)(inp), D0; PXOR D0, D2; MOVOU D2, (11*16)(oup)
- MOVOU (12*16)(inp), D0; PXOR D0, A3; MOVOU A3, (12*16)(oup)
- MOVOU (13*16)(inp), D0; PXOR D0, B3; MOVOU B3, (13*16)(oup)
- MOVOU (14*16)(inp), D0; PXOR D0, C3; MOVOU C3, (14*16)(oup)
- MOVOU (15*16)(inp), D0; PXOR tmpStore, D0; MOVOU D0, (15*16)(oup)
- LEAQ 256(inp), inp
- LEAQ 256(oup), oup
- SUBQ $256, inl
- JMP openSSEMainLoop
-
-openSSEMainLoopDone:
- // Handle the various tail sizes efficiently
- TESTQ inl, inl
- JE openSSEFinalize
- CMPQ inl, $64
- JBE openSSETail64
- CMPQ inl, $128
- JBE openSSETail128
- CMPQ inl, $192
- JBE openSSETail192
- JMP openSSETail256
-
-openSSEFinalize:
- // Hash in the PT, AAD lengths
- ADDQ ad_len+80(FP), acc0; ADCQ src_len+56(FP), acc1; ADCQ $1, acc2
- polyMul
-
- // Final reduce
- MOVQ acc0, t0
- MOVQ acc1, t1
- MOVQ acc2, t2
- SUBQ $-5, acc0
- SBBQ $-1, acc1
- SBBQ $3, acc2
- CMOVQCS t0, acc0
- CMOVQCS t1, acc1
- CMOVQCS t2, acc2
-
- // Add in the "s" part of the key
- ADDQ 0+sStore, acc0
- ADCQ 8+sStore, acc1
-
- // Finally, constant time compare to the tag at the end of the message
- XORQ AX, AX
- MOVQ $1, DX
- XORQ (0*8)(inp), acc0
- XORQ (1*8)(inp), acc1
- ORQ acc1, acc0
- CMOVQEQ DX, AX
-
- // Return true iff tags are equal
- MOVB AX, ret+96(FP)
- RET
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 129 bytes
-openSSE128:
- // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks
- MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO B0, T1; MOVO C0, T2; MOVO D1, T3
- MOVQ $10, itr2
-
-openSSE128InnerCipherLoop:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftB1Left; shiftB2Left
- shiftC0Left; shiftC1Left; shiftC2Left
- shiftD0Left; shiftD1Left; shiftD2Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftB1Right; shiftB2Right
- shiftC0Right; shiftC1Right; shiftC2Right
- shiftD0Right; shiftD1Right; shiftD2Right
- DECQ itr2
- JNE openSSE128InnerCipherLoop
-
- // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2
- PADDL T1, B0; PADDL T1, B1; PADDL T1, B2
- PADDL T2, C1; PADDL T2, C2
- PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2
-
- // Clamp and store the key
- PAND ·polyClampMask<>(SB), A0
- MOVOU A0, rStore; MOVOU B0, sStore
-
- // Hash
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
-openSSE128Open:
- CMPQ inl, $16
- JB openSSETail16
- SUBQ $16, inl
-
- // Load for hashing
- polyAdd(0(inp))
-
- // Load for decryption
- MOVOU (inp), T0; PXOR T0, A1; MOVOU A1, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- polyMul
-
- // Shift the stream "left"
- MOVO B1, A1
- MOVO C1, B1
- MOVO D1, C1
- MOVO A2, D1
- MOVO B2, A2
- MOVO C2, B2
- MOVO D2, C2
- JMP openSSE128Open
-
-openSSETail16:
- TESTQ inl, inl
- JE openSSEFinalize
-
- // We can safely load the CT from the end, because it is padded with the MAC
- MOVQ inl, itr2
- SHLQ $4, itr2
- LEAQ ·andMask<>(SB), t0
- MOVOU (inp), T0
- ADDQ inl, inp
- PAND -16(t0)(itr2*1), T0
- MOVO T0, 0+tmpStore
- MOVQ T0, t0
- MOVQ 8+tmpStore, t1
- PXOR A1, T0
-
- // We can only store one byte at a time, since plaintext can be shorter than 16 bytes
-openSSETail16Store:
- MOVQ T0, t3
- MOVB t3, (oup)
- PSRLDQ $1, T0
- INCQ oup
- DECQ inl
- JNE openSSETail16Store
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
- JMP openSSEFinalize
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 64 bytes of ciphertext
-openSSETail64:
- // Need to decrypt up to 64 bytes - prepare single block
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- XORQ itr2, itr2
- MOVQ inl, itr1
- CMPQ itr1, $16
- JB openSSETail64LoopB
-
-openSSETail64LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
- SUBQ $16, itr1
-
-openSSETail64LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- chachaQR(A0, B0, C0, D0, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
-
- CMPQ itr1, $16
- JAE openSSETail64LoopA
-
- CMPQ itr2, $160
- JNE openSSETail64LoopB
-
- PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0; PADDL state2Store, C0; PADDL ctr0Store, D0
-
-openSSETail64DecLoop:
- CMPQ inl, $16
- JB openSSETail64DecLoopDone
- SUBQ $16, inl
- MOVOU (inp), T0
- PXOR T0, A0
- MOVOU A0, (oup)
- LEAQ 16(inp), inp
- LEAQ 16(oup), oup
- MOVO B0, A0
- MOVO C0, B0
- MOVO D0, C0
- JMP openSSETail64DecLoop
-
-openSSETail64DecLoopDone:
- MOVO A0, A1
- JMP openSSETail16
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
-openSSETail128:
- // Need to decrypt up to 128 bytes - prepare two blocks
- MOVO ·chacha20Constants<>(SB), A1; MOVO state1Store, B1; MOVO state2Store, C1; MOVO ctr3Store, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr0Store
- MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr1Store
- XORQ itr2, itr2
- MOVQ inl, itr1
- ANDQ $-16, itr1
-
-openSSETail128LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
-
-openSSETail128LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
-
- CMPQ itr2, itr1
- JB openSSETail128LoopA
-
- CMPQ itr2, $160
- JNE openSSETail128LoopB
-
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1
- PADDL state1Store, B0; PADDL state1Store, B1
- PADDL state2Store, C0; PADDL state2Store, C1
- PADDL ctr1Store, D0; PADDL ctr0Store, D1
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup)
-
- SUBQ $64, inl
- LEAQ 64(inp), inp
- LEAQ 64(oup), oup
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 192 bytes of ciphertext
-openSSETail192:
- // Need to decrypt up to 192 bytes - prepare three blocks
- MOVO ·chacha20Constants<>(SB), A2; MOVO state1Store, B2; MOVO state2Store, C2; MOVO ctr3Store, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr0Store
- MOVO A2, A1; MOVO B2, B1; MOVO C2, C1; MOVO D2, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
- MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr2Store
-
- MOVQ inl, itr1
- MOVQ $160, itr2
- CMPQ itr1, $160
- CMOVQGT itr2, itr1
- ANDQ $-16, itr1
- XORQ itr2, itr2
-
-openSSLTail192LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMul
-
-openSSLTail192LoopB:
- ADDQ $16, itr2
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- shiftB2Left; shiftC2Left; shiftD2Left
-
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
- shiftB2Right; shiftC2Right; shiftD2Right
-
- CMPQ itr2, itr1
- JB openSSLTail192LoopA
-
- CMPQ itr2, $160
- JNE openSSLTail192LoopB
-
- CMPQ inl, $176
- JB openSSLTail192Store
-
- polyAdd(160(inp))
- polyMul
-
- CMPQ inl, $192
- JB openSSLTail192Store
-
- polyAdd(176(inp))
- polyMul
-
-openSSLTail192Store:
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2
- PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2
- PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2
- PADDL ctr2Store, D0; PADDL ctr1Store, D1; PADDL ctr0Store, D2
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A2; PXOR T1, B2; PXOR T2, C2; PXOR T3, D2
- MOVOU A2, (0*16)(oup); MOVOU B2, (1*16)(oup); MOVOU C2, (2*16)(oup); MOVOU D2, (3*16)(oup)
-
- MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
-
- SUBQ $128, inl
- LEAQ 128(inp), inp
- LEAQ 128(oup), oup
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
-openSSETail256:
- // Need to decrypt up to 256 bytes - prepare four blocks
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3
-
- // Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
- XORQ itr2, itr2
-
-openSSETail256Loop:
- // This loop inteleaves 8 ChaCha quarter rounds with 1 poly multiplication
- polyAdd(0(inp)(itr2*1))
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulStage3
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- ADDQ $2*8, itr2
- CMPQ itr2, $160
- JB openSSETail256Loop
- MOVQ inl, itr1
- ANDQ $-16, itr1
-
-openSSETail256HashLoop:
- polyAdd(0(inp)(itr2*1))
- polyMul
- ADDQ $2*8, itr2
- CMPQ itr2, itr1
- JB openSSETail256HashLoop
-
- // Add in the state
- PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
- MOVO D3, tmpStore
-
- // Load - xor - store
- MOVOU (0*16)(inp), D3; PXOR D3, A0
- MOVOU (1*16)(inp), D3; PXOR D3, B0
- MOVOU (2*16)(inp), D3; PXOR D3, C0
- MOVOU (3*16)(inp), D3; PXOR D3, D0
- MOVOU A0, (0*16)(oup)
- MOVOU B0, (1*16)(oup)
- MOVOU C0, (2*16)(oup)
- MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup)
- LEAQ 192(inp), inp
- LEAQ 192(oup), oup
- SUBQ $192, inl
- MOVO A3, A0
- MOVO B3, B0
- MOVO C3, C0
- MOVO tmpStore, D0
-
- JMP openSSETail64DecLoop
-
-// ----------------------------------------------------------------------------
-// ------------------------- AVX2 Code ----------------------------------------
-chacha20Poly1305Open_AVX2:
- VZEROUPPER
- VMOVDQU ·chacha20Constants<>(SB), AA0
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12
- BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4
- VPADDD ·avx2InitMask<>(SB), DD0, DD0
-
- // Special optimization, for very short buffers
- CMPQ inl, $192
- JBE openAVX2192
- CMPQ inl, $320
- JBE openAVX2320
-
- // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream
- VMOVDQA BB0, state1StoreAVX2
- VMOVDQA CC0, state2StoreAVX2
- VMOVDQA DD0, ctr3StoreAVX2
- MOVQ $10, itr2
-
-openAVX2PreparePolyKey:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- DECQ itr2
- JNE openAVX2PreparePolyKey
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0
- VPADDD state1StoreAVX2, BB0, BB0
- VPADDD state2StoreAVX2, CC0, CC0
- VPADDD ctr3StoreAVX2, DD0, DD0
-
- VPERM2I128 $0x02, AA0, BB0, TT0
-
- // Clamp and store poly key
- VPAND ·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
-
- // Stream for the first 64 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
-
- // Hash AD + first 64 bytes
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
-
-openAVX2InitialHash64:
- polyAdd(0(inp)(itr1*1))
- polyMulAVX2
- ADDQ $16, itr1
- CMPQ itr1, $64
- JNE openAVX2InitialHash64
-
- // Decrypt the first 64 bytes
- VPXOR (0*32)(inp), AA0, AA0
- VPXOR (1*32)(inp), BB0, BB0
- VMOVDQU AA0, (0*32)(oup)
- VMOVDQU BB0, (1*32)(oup)
- LEAQ (2*32)(inp), inp
- LEAQ (2*32)(oup), oup
- SUBQ $64, inl
-
-openAVX2MainLoop:
- CMPQ inl, $512
- JB openAVX2MainLoopDone
-
- // Load state, increment counter blocks, store the incremented counters
- VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- XORQ itr1, itr1
-
-openAVX2InternalLoop:
- // Lets just say this spaghetti loop interleaves 2 quarter rounds with 3 poly multiplications
- // Effectively per 512 bytes of stream we hash 480 bytes of ciphertext
- polyAdd(0*8(inp)(itr1*1))
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage1_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- polyMulStage2_AVX2
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyMulStage3_AVX2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- polyAdd(2*8(inp)(itr1*1))
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage1_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage2_AVX2
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage3_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- polyMulReduceStage
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(4*8(inp)(itr1*1))
- LEAQ (6*8)(itr1), itr1
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage1_AVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- polyMulStage2_AVX2
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage3_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- CMPQ itr1, $480
- JNE openAVX2InternalLoop
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
-
- // We only hashed 480 of the 512 bytes available - hash the remaining 32 here
- polyAdd(480(inp))
- polyMulAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
-
- // and here
- polyAdd(496(inp))
- polyMulAVX2
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
- VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0
- VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup)
- LEAQ (32*16)(inp), inp
- LEAQ (32*16)(oup), oup
- SUBQ $(32*16), inl
- JMP openAVX2MainLoop
-
-openAVX2MainLoopDone:
- // Handle the various tail sizes efficiently
- TESTQ inl, inl
- JE openSSEFinalize
- CMPQ inl, $128
- JBE openAVX2Tail128
- CMPQ inl, $256
- JBE openAVX2Tail256
- CMPQ inl, $384
- JBE openAVX2Tail384
- JMP openAVX2Tail512
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 193 bytes
-openAVX2192:
- // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks
- VMOVDQA AA0, AA1
- VMOVDQA BB0, BB1
- VMOVDQA CC0, CC1
- VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2
- VMOVDQA BB0, BB2
- VMOVDQA CC0, CC2
- VMOVDQA DD0, DD2
- VMOVDQA DD1, TT3
- MOVQ $10, itr2
-
-openAVX2192InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr2
- JNE openAVX2192InnerCipherLoop
- VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1
- VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1
- VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1
- VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
-
- // Clamp and store poly key
- VPAND ·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
-
- // Stream for up to 192 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
-
-openAVX2ShortOpen:
- // Hash
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
-openAVX2ShortOpenLoop:
- CMPQ inl, $32
- JB openAVX2ShortTail32
- SUBQ $32, inl
-
- // Load for hashing
- polyAdd(0*8(inp))
- polyMulAVX2
- polyAdd(2*8(inp))
- polyMulAVX2
-
- // Load for decryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
- LEAQ (1*32)(oup), oup
-
- // Shift stream left
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
- VMOVDQA AA1, DD0
- VMOVDQA BB1, AA1
- VMOVDQA CC1, BB1
- VMOVDQA DD1, CC1
- VMOVDQA AA2, DD1
- VMOVDQA BB2, AA2
- JMP openAVX2ShortOpenLoop
-
-openAVX2ShortTail32:
- CMPQ inl, $16
- VMOVDQA A0, A1
- JB openAVX2ShortDone
-
- SUBQ $16, inl
-
- // Load for hashing
- polyAdd(0*8(inp))
- polyMulAVX2
-
- // Load for decryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
-
-openAVX2ShortDone:
- VZEROUPPER
- JMP openSSETail16
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 321 bytes
-openAVX2320:
- // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks
- VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3
- MOVQ $10, itr2
-
-openAVX2320InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr2
- JNE openAVX2320InnerCipherLoop
-
- VMOVDQA ·chacha20Constants<>(SB), TT0
- VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2
- VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2
- VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2
- VMOVDQA ·avx2IncMask<>(SB), TT0
- VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD2, DD2
-
- // Clamp and store poly key
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPAND ·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
-
- // Stream for up to 320 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
- VPERM2I128 $0x02, AA2, BB2, CC1
- VPERM2I128 $0x02, CC2, DD2, DD1
- VPERM2I128 $0x13, AA2, BB2, AA2
- VPERM2I128 $0x13, CC2, DD2, BB2
- JMP openAVX2ShortOpen
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
-openAVX2Tail128:
- // Need to decrypt up to 128 bytes - prepare two blocks
- VMOVDQA ·chacha20Constants<>(SB), AA1
- VMOVDQA state1StoreAVX2, BB1
- VMOVDQA state2StoreAVX2, CC1
- VMOVDQA ctr3StoreAVX2, DD1
- VPADDD ·avx2IncMask<>(SB), DD1, DD1
- VMOVDQA DD1, DD0
-
- XORQ itr2, itr2
- MOVQ inl, itr1
- ANDQ $-16, itr1
- TESTQ itr1, itr1
- JE openAVX2Tail128LoopB
-
-openAVX2Tail128LoopA:
- // Perform ChaCha rounds, while hashing the remaining input
- polyAdd(0(inp)(itr2*1))
- polyMulAVX2
-
-openAVX2Tail128LoopB:
- ADDQ $16, itr2
- chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD1, DD1, DD1
- CMPQ itr2, itr1
- JB openAVX2Tail128LoopA
- CMPQ itr2, $160
- JNE openAVX2Tail128LoopB
-
- VPADDD ·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC1, CC1
- VPADDD DD0, DD1, DD1
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
-
-openAVX2TailLoop:
- CMPQ inl, $32
- JB openAVX2Tail
- SUBQ $32, inl
-
- // Load for decryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
- LEAQ (1*32)(oup), oup
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
- JMP openAVX2TailLoop
-
-openAVX2Tail:
- CMPQ inl, $16
- VMOVDQA A0, A1
- JB openAVX2TailDone
- SUBQ $16, inl
-
- // Load for decryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
-
-openAVX2TailDone:
- VZEROUPPER
- JMP openSSETail16
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
-openAVX2Tail256:
- // Need to decrypt up to 256 bytes - prepare four blocks
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA DD0, TT1
- VMOVDQA DD1, TT2
-
- // Compute the number of iterations that will hash data
- MOVQ inl, tmpStoreAVX2
- MOVQ inl, itr1
- SUBQ $128, itr1
- SHRQ $4, itr1
- MOVQ $10, itr2
- CMPQ itr1, $10
- CMOVQGT itr2, itr1
- MOVQ inp, inl
- XORQ itr2, itr2
-
-openAVX2Tail256LoopA:
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
-
- // Perform ChaCha rounds, while hashing the remaining input
-openAVX2Tail256LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- INCQ itr2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- CMPQ itr2, itr1
- JB openAVX2Tail256LoopA
-
- CMPQ itr2, $10
- JNE openAVX2Tail256LoopB
-
- MOVQ inl, itr2
- SUBQ inp, inl
- MOVQ inl, itr1
- MOVQ tmpStoreAVX2, inl
-
- // Hash the remainder of data (if any)
-openAVX2Tail256Hash:
- ADDQ $16, itr1
- CMPQ itr1, inl
- JGT openAVX2Tail256HashEnd
- polyAdd (0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- JMP openAVX2Tail256Hash
-
-// Store 128 bytes safely, then go to store loop
-openAVX2Tail256HashEnd:
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, AA2; VPERM2I128 $0x02, CC0, DD0, BB2; VPERM2I128 $0x13, AA0, BB0, CC2; VPERM2I128 $0x13, CC0, DD0, DD2
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
-
- VPXOR (0*32)(inp), AA2, AA2; VPXOR (1*32)(inp), BB2, BB2; VPXOR (2*32)(inp), CC2, CC2; VPXOR (3*32)(inp), DD2, DD2
- VMOVDQU AA2, (0*32)(oup); VMOVDQU BB2, (1*32)(oup); VMOVDQU CC2, (2*32)(oup); VMOVDQU DD2, (3*32)(oup)
- LEAQ (4*32)(inp), inp
- LEAQ (4*32)(oup), oup
- SUBQ $4*32, inl
-
- JMP openAVX2TailLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 384 bytes of ciphertext
-openAVX2Tail384:
- // Need to decrypt up to 384 bytes - prepare six blocks
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VPADDD ·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA DD0, ctr0StoreAVX2
- VMOVDQA DD1, ctr1StoreAVX2
- VMOVDQA DD2, ctr2StoreAVX2
-
- // Compute the number of iterations that will hash two blocks of data
- MOVQ inl, tmpStoreAVX2
- MOVQ inl, itr1
- SUBQ $256, itr1
- SHRQ $4, itr1
- ADDQ $6, itr1
- MOVQ $10, itr2
- CMPQ itr1, $10
- CMOVQGT itr2, itr1
- MOVQ inp, inl
- XORQ itr2, itr2
-
- // Perform ChaCha rounds, while hashing the remaining input
-openAVX2Tail384LoopB:
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
-
-openAVX2Tail384LoopA:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- polyAdd(0(inl))
- polyMulAVX2
- LEAQ 16(inl), inl
- INCQ itr2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
-
- CMPQ itr2, itr1
- JB openAVX2Tail384LoopB
-
- CMPQ itr2, $10
- JNE openAVX2Tail384LoopA
-
- MOVQ inl, itr2
- SUBQ inp, inl
- MOVQ inl, itr1
- MOVQ tmpStoreAVX2, inl
-
-openAVX2Tail384Hash:
- ADDQ $16, itr1
- CMPQ itr1, inl
- JGT openAVX2Tail384HashEnd
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- JMP openAVX2Tail384Hash
-
-// Store 256 bytes safely, then go to store loop
-openAVX2Tail384HashEnd:
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2
- VPERM2I128 $0x02, AA0, BB0, TT0; VPERM2I128 $0x02, CC0, DD0, TT1; VPERM2I128 $0x13, AA0, BB0, TT2; VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, TT0; VPERM2I128 $0x02, CC1, DD1, TT1; VPERM2I128 $0x13, AA1, BB1, TT2; VPERM2I128 $0x13, CC1, DD1, TT3
- VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3
- VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- LEAQ (8*32)(inp), inp
- LEAQ (8*32)(oup), oup
- SUBQ $8*32, inl
- JMP openAVX2TailLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 512 bytes of ciphertext
-openAVX2Tail512:
- VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- XORQ itr1, itr1
- MOVQ inp, itr2
-
-openAVX2Tail512LoopB:
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ (2*8)(itr2), itr2
-
-openAVX2Tail512LoopA:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyAdd(0*8(itr2))
- polyMulAVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(2*8(itr2))
- polyMulAVX2
- LEAQ (4*8)(itr2), itr2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- INCQ itr1
- CMPQ itr1, $4
- JLT openAVX2Tail512LoopB
-
- CMPQ itr1, $10
- JNE openAVX2Tail512LoopA
-
- MOVQ inl, itr1
- SUBQ $384, itr1
- ANDQ $-16, itr1
-
-openAVX2Tail512HashLoop:
- TESTQ itr1, itr1
- JE openAVX2Tail512HashEnd
- polyAdd(0(itr2))
- polyMulAVX2
- LEAQ 16(itr2), itr2
- SUBQ $16, itr1
- JMP openAVX2Tail512HashLoop
-
-openAVX2Tail512HashEnd:
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
-
- LEAQ (12*32)(inp), inp
- LEAQ (12*32)(oup), oup
- SUBQ $12*32, inl
-
- JMP openAVX2TailLoop
-
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-// func chacha20Poly1305Seal(dst, key, src, ad []byte)
-TEXT ·chacha20Poly1305Seal(SB), 0, $288-96
- // For aligned stack access
- MOVQ SP, BP
- ADDQ $32, BP
- ANDQ $-32, BP
- MOVQ dst+0(FP), oup
- MOVQ key+24(FP), keyp
- MOVQ src+48(FP), inp
- MOVQ src_len+56(FP), inl
- MOVQ ad+72(FP), adp
-
- CMPB ·useAVX2(SB), $1
- JE chacha20Poly1305Seal_AVX2
-
- // Special optimization, for very short buffers
- CMPQ inl, $128
- JBE sealSSE128 // About 15% faster
-
- // In the seal case - prepare the poly key + 3 blocks of stream in the first iteration
- MOVOU ·chacha20Constants<>(SB), A0
- MOVOU (1*16)(keyp), B0
- MOVOU (2*16)(keyp), C0
- MOVOU (3*16)(keyp), D0
-
- // Store state on stack for future use
- MOVO B0, state1Store
- MOVO C0, state2Store
-
- // Load state, increment counter blocks
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3
-
- // Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
- MOVQ $10, itr2
-
-sealSSEIntroLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
-
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr2
- JNE sealSSEIntroLoop
-
- // Add in the state
- PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
-
- // Clamp and store the key
- PAND ·polyClampMask<>(SB), A0
- MOVO A0, rStore
- MOVO B0, sStore
-
- // Hash AAD
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup)
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (4*16)(oup); MOVOU B2, (5*16)(oup); MOVOU C2, (6*16)(oup); MOVOU D2, (7*16)(oup)
-
- MOVQ $128, itr1
- SUBQ $128, inl
- LEAQ 128(inp), inp
-
- MOVO A3, A1; MOVO B3, B1; MOVO C3, C1; MOVO D3, D1
-
- CMPQ inl, $64
- JBE sealSSE128SealHash
-
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3
- MOVOU A3, (8*16)(oup); MOVOU B3, (9*16)(oup); MOVOU C3, (10*16)(oup); MOVOU D3, (11*16)(oup)
-
- ADDQ $64, itr1
- SUBQ $64, inl
- LEAQ 64(inp), inp
-
- MOVQ $2, itr1
- MOVQ $8, itr2
-
- CMPQ inl, $64
- JBE sealSSETail64
- CMPQ inl, $128
- JBE sealSSETail128
- CMPQ inl, $192
- JBE sealSSETail192
-
-sealSSEMainLoop:
- // Load state, increment counter blocks
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3
-
- // Store counters
- MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store
-
-sealSSEInnerLoop:
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyAdd(0(oup))
- shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left
- shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left
- shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left
- polyMulStage1
- polyMulStage2
- LEAQ (2*8)(oup), oup
- MOVO C3, tmpStore
- chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3)
- MOVO tmpStore, C3
- MOVO C1, tmpStore
- polyMulStage3
- chachaQR(A3, B3, C3, D3, C1)
- MOVO tmpStore, C1
- polyMulReduceStage
- shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right
- shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right
- shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right
- DECQ itr2
- JGE sealSSEInnerLoop
- polyAdd(0(oup))
- polyMul
- LEAQ (2*8)(oup), oup
- DECQ itr1
- JG sealSSEInnerLoop
-
- // Add in the state
- PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3
- PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3
- PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3
- PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3
- MOVO D3, tmpStore
-
- // Load - xor - store
- MOVOU (0*16)(inp), D3; PXOR D3, A0
- MOVOU (1*16)(inp), D3; PXOR D3, B0
- MOVOU (2*16)(inp), D3; PXOR D3, C0
- MOVOU (3*16)(inp), D3; PXOR D3, D0
- MOVOU A0, (0*16)(oup)
- MOVOU B0, (1*16)(oup)
- MOVOU C0, (2*16)(oup)
- MOVOU D0, (3*16)(oup)
- MOVO tmpStore, D3
-
- MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0
- PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
- MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0
- PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2
- MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup)
- ADDQ $192, inp
- MOVQ $192, itr1
- SUBQ $192, inl
- MOVO A3, A1
- MOVO B3, B1
- MOVO C3, C1
- MOVO D3, D1
- CMPQ inl, $64
- JBE sealSSE128SealHash
- MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0
- PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3
- MOVOU A3, (12*16)(oup); MOVOU B3, (13*16)(oup); MOVOU C3, (14*16)(oup); MOVOU D3, (15*16)(oup)
- LEAQ 64(inp), inp
- SUBQ $64, inl
- MOVQ $6, itr1
- MOVQ $4, itr2
- CMPQ inl, $192
- JG sealSSEMainLoop
-
- MOVQ inl, itr1
- TESTQ inl, inl
- JE sealSSE128SealHash
- MOVQ $6, itr1
- CMPQ inl, $64
- JBE sealSSETail64
- CMPQ inl, $128
- JBE sealSSETail128
- JMP sealSSETail192
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 64 bytes of plaintext
-sealSSETail64:
- // Need to encrypt up to 64 bytes - prepare single block, hash 192 or 256 bytes
- MOVO ·chacha20Constants<>(SB), A1
- MOVO state1Store, B1
- MOVO state2Store, C1
- MOVO ctr3Store, D1
- PADDL ·sseIncMask<>(SB), D1
- MOVO D1, ctr0Store
-
-sealSSETail64LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealSSETail64LoopB:
- chachaQR(A1, B1, C1, D1, T1)
- shiftB1Left; shiftC1Left; shiftD1Left
- chachaQR(A1, B1, C1, D1, T1)
- shiftB1Right; shiftC1Right; shiftD1Right
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
- DECQ itr1
- JG sealSSETail64LoopA
-
- DECQ itr2
- JGE sealSSETail64LoopB
- PADDL ·chacha20Constants<>(SB), A1
- PADDL state1Store, B1
- PADDL state2Store, C1
- PADDL ctr0Store, D1
-
- JMP sealSSE128Seal
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of plaintext
-sealSSETail128:
- // Need to encrypt up to 128 bytes - prepare two blocks, hash 192 or 256 bytes
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
-
-sealSSETail128LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealSSETail128LoopB:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
-
- DECQ itr1
- JG sealSSETail128LoopA
-
- DECQ itr2
- JGE sealSSETail128LoopB
-
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1
- PADDL state1Store, B0; PADDL state1Store, B1
- PADDL state2Store, C0; PADDL state2Store, C1
- PADDL ctr0Store, D0; PADDL ctr1Store, D1
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0
- MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup)
-
- MOVQ $64, itr1
- LEAQ 64(inp), inp
- SUBQ $64, inl
-
- JMP sealSSE128SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 192 bytes of plaintext
-sealSSETail192:
- // Need to encrypt up to 192 bytes - prepare three blocks, hash 192 or 256 bytes
- MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr2Store
-
-sealSSETail192LoopA:
- // Perform ChaCha rounds, while hashing the previously encrypted ciphertext
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealSSETail192LoopB:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftC0Left; shiftD0Left
- shiftB1Left; shiftC1Left; shiftD1Left
- shiftB2Left; shiftC2Left; shiftD2Left
-
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftC0Right; shiftD0Right
- shiftB1Right; shiftC1Right; shiftD1Right
- shiftB2Right; shiftC2Right; shiftD2Right
-
- DECQ itr1
- JG sealSSETail192LoopA
-
- DECQ itr2
- JGE sealSSETail192LoopB
-
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2
- PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2
- PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2
- PADDL ctr0Store, D0; PADDL ctr1Store, D1; PADDL ctr2Store, D2
-
- MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3
- PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0
- MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup)
- MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3
- PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1
- MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup)
-
- MOVO A2, A1
- MOVO B2, B1
- MOVO C2, C1
- MOVO D2, D1
- MOVQ $128, itr1
- LEAQ 128(inp), inp
- SUBQ $128, inl
-
- JMP sealSSE128SealHash
-
-// ----------------------------------------------------------------------------
-// Special seal optimization for buffers smaller than 129 bytes
-sealSSE128:
- // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks
- MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0
- MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1
- MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2
- MOVO B0, T1; MOVO C0, T2; MOVO D1, T3
- MOVQ $10, itr2
-
-sealSSE128InnerCipherLoop:
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Left; shiftB1Left; shiftB2Left
- shiftC0Left; shiftC1Left; shiftC2Left
- shiftD0Left; shiftD1Left; shiftD2Left
- chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0)
- shiftB0Right; shiftB1Right; shiftB2Right
- shiftC0Right; shiftC1Right; shiftC2Right
- shiftD0Right; shiftD1Right; shiftD2Right
- DECQ itr2
- JNE sealSSE128InnerCipherLoop
-
- // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded
- PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2
- PADDL T1, B0; PADDL T1, B1; PADDL T1, B2
- PADDL T2, C1; PADDL T2, C2
- PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2
- PAND ·polyClampMask<>(SB), A0
- MOVOU A0, rStore
- MOVOU B0, sStore
-
- // Hash
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
-
-sealSSE128SealHash:
- // itr1 holds the number of bytes encrypted but not yet hashed
- CMPQ itr1, $16
- JB sealSSE128Seal
- polyAdd(0(oup))
- polyMul
-
- SUBQ $16, itr1
- ADDQ $16, oup
-
- JMP sealSSE128SealHash
-
-sealSSE128Seal:
- CMPQ inl, $16
- JB sealSSETail
- SUBQ $16, inl
-
- // Load for decryption
- MOVOU (inp), T0
- PXOR T0, A1
- MOVOU A1, (oup)
- LEAQ (1*16)(inp), inp
- LEAQ (1*16)(oup), oup
-
- // Extract for hashing
- MOVQ A1, t0
- PSRLDQ $8, A1
- MOVQ A1, t1
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
-
- // Shift the stream "left"
- MOVO B1, A1
- MOVO C1, B1
- MOVO D1, C1
- MOVO A2, D1
- MOVO B2, A2
- MOVO C2, B2
- MOVO D2, C2
- JMP sealSSE128Seal
-
-sealSSETail:
- TESTQ inl, inl
- JE sealSSEFinalize
-
- // We can only load the PT one byte at a time to avoid read after end of buffer
- MOVQ inl, itr2
- SHLQ $4, itr2
- LEAQ ·andMask<>(SB), t0
- MOVQ inl, itr1
- LEAQ -1(inp)(inl*1), inp
- XORQ t2, t2
- XORQ t3, t3
- XORQ AX, AX
-
-sealSSETailLoadLoop:
- SHLQ $8, t2, t3
- SHLQ $8, t2
- MOVB (inp), AX
- XORQ AX, t2
- LEAQ -1(inp), inp
- DECQ itr1
- JNE sealSSETailLoadLoop
- MOVQ t2, 0+tmpStore
- MOVQ t3, 8+tmpStore
- PXOR 0+tmpStore, A1
- MOVOU A1, (oup)
- MOVOU -16(t0)(itr2*1), T0
- PAND T0, A1
- MOVQ A1, t0
- PSRLDQ $8, A1
- MOVQ A1, t1
- ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2
- polyMul
-
- ADDQ inl, oup
-
-sealSSEFinalize:
- // Hash in the buffer lengths
- ADDQ ad_len+80(FP), acc0
- ADCQ src_len+56(FP), acc1
- ADCQ $1, acc2
- polyMul
-
- // Final reduce
- MOVQ acc0, t0
- MOVQ acc1, t1
- MOVQ acc2, t2
- SUBQ $-5, acc0
- SBBQ $-1, acc1
- SBBQ $3, acc2
- CMOVQCS t0, acc0
- CMOVQCS t1, acc1
- CMOVQCS t2, acc2
-
- // Add in the "s" part of the key
- ADDQ 0+sStore, acc0
- ADCQ 8+sStore, acc1
-
- // Finally store the tag at the end of the message
- MOVQ acc0, (0*8)(oup)
- MOVQ acc1, (1*8)(oup)
- RET
-
-// ----------------------------------------------------------------------------
-// ------------------------- AVX2 Code ----------------------------------------
-chacha20Poly1305Seal_AVX2:
- VZEROUPPER
- VMOVDQU ·chacha20Constants<>(SB), AA0
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14
- BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12
- BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4
- VPADDD ·avx2InitMask<>(SB), DD0, DD0
-
- // Special optimizations, for very short buffers
- CMPQ inl, $192
- JBE seal192AVX2 // 33% faster
- CMPQ inl, $320
- JBE seal320AVX2 // 17% faster
-
- // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream
- VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3; VMOVDQA BB0, state1StoreAVX2
- VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3; VMOVDQA CC0, state2StoreAVX2
- VPADDD ·avx2IncMask<>(SB), DD0, DD1; VMOVDQA DD0, ctr0StoreAVX2
- VPADDD ·avx2IncMask<>(SB), DD1, DD2; VMOVDQA DD1, ctr1StoreAVX2
- VPADDD ·avx2IncMask<>(SB), DD2, DD3; VMOVDQA DD2, ctr2StoreAVX2
- VMOVDQA DD3, ctr3StoreAVX2
- MOVQ $10, itr2
-
-sealAVX2IntroLoop:
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1
- VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2
- VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1
- VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2
- VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3
- DECQ itr2
- JNE sealAVX2IntroLoop
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
-
- VPERM2I128 $0x13, CC0, DD0, CC0 // Stream bytes 96 - 127
- VPERM2I128 $0x02, AA0, BB0, DD0 // The Poly1305 key
- VPERM2I128 $0x13, AA0, BB0, AA0 // Stream bytes 64 - 95
-
- // Clamp and store poly key
- VPAND ·polyClampMask<>(SB), DD0, DD0
- VMOVDQA DD0, rsStoreAVX2
-
- // Hash AD
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
-
- // Can store at least 320 bytes
- VPXOR (0*32)(inp), AA0, AA0
- VPXOR (1*32)(inp), CC0, CC0
- VMOVDQU AA0, (0*32)(oup)
- VMOVDQU CC0, (1*32)(oup)
-
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (2*32)(inp), AA0, AA0; VPXOR (3*32)(inp), BB0, BB0; VPXOR (4*32)(inp), CC0, CC0; VPXOR (5*32)(inp), DD0, DD0
- VMOVDQU AA0, (2*32)(oup); VMOVDQU BB0, (3*32)(oup); VMOVDQU CC0, (4*32)(oup); VMOVDQU DD0, (5*32)(oup)
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (6*32)(inp), AA0, AA0; VPXOR (7*32)(inp), BB0, BB0; VPXOR (8*32)(inp), CC0, CC0; VPXOR (9*32)(inp), DD0, DD0
- VMOVDQU AA0, (6*32)(oup); VMOVDQU BB0, (7*32)(oup); VMOVDQU CC0, (8*32)(oup); VMOVDQU DD0, (9*32)(oup)
-
- MOVQ $320, itr1
- SUBQ $320, inl
- LEAQ 320(inp), inp
-
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, CC3, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, CC3, DD3, DD0
- CMPQ inl, $128
- JBE sealAVX2SealHash
-
- VPXOR (0*32)(inp), AA0, AA0; VPXOR (1*32)(inp), BB0, BB0; VPXOR (2*32)(inp), CC0, CC0; VPXOR (3*32)(inp), DD0, DD0
- VMOVDQU AA0, (10*32)(oup); VMOVDQU BB0, (11*32)(oup); VMOVDQU CC0, (12*32)(oup); VMOVDQU DD0, (13*32)(oup)
- SUBQ $128, inl
- LEAQ 128(inp), inp
-
- MOVQ $8, itr1
- MOVQ $2, itr2
-
- CMPQ inl, $128
- JBE sealAVX2Tail128
- CMPQ inl, $256
- JBE sealAVX2Tail256
- CMPQ inl, $384
- JBE sealAVX2Tail384
- CMPQ inl, $512
- JBE sealAVX2Tail512
-
- // We have 448 bytes to hash, but main loop hashes 512 bytes at a time - perform some rounds, before the main loop
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0
- VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1
- VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2
- VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3
-
- VMOVDQA CC3, tmpStoreAVX2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3)
- VMOVDQA tmpStoreAVX2, CC3
- VMOVDQA CC1, tmpStoreAVX2
- chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1)
- VMOVDQA tmpStoreAVX2, CC1
-
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0
- VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1
- VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2
- VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
-
- SUBQ $16, oup // Adjust the pointer
- MOVQ $9, itr1
- JMP sealAVX2InternalLoopStart
-
-sealAVX2MainLoop:
- // Load state, increment counter blocks, store the incremented counters
- VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
- MOVQ $10, itr1
-
-sealAVX2InternalLoop:
- polyAdd(0*8(oup))
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage1_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- polyMulStage2_AVX2
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyMulStage3_AVX2
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
-
-sealAVX2InternalLoopStart:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- polyAdd(2*8(oup))
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage1_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage2_AVX2
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- polyMulStage3_AVX2
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- polyMulReduceStage
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(4*8(oup))
- LEAQ (6*8)(oup), oup
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulStage1_AVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- polyMulStage2_AVX2
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- polyMulStage3_AVX2
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyMulReduceStage
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
- DECQ itr1
- JNE sealAVX2InternalLoop
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
-
- // We only hashed 480 of the 512 bytes available - hash the remaining 32 here
- polyAdd(0*8(oup))
- polyMulAVX2
- LEAQ (4*8)(oup), oup
- VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0
- VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0
- VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
-
- // and here
- polyAdd(-2*8(oup))
- polyMulAVX2
- VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
- VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
- VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0
- VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup)
- LEAQ (32*16)(inp), inp
- SUBQ $(32*16), inl
- CMPQ inl, $512
- JG sealAVX2MainLoop
-
- // Tail can only hash 480 bytes
- polyAdd(0*8(oup))
- polyMulAVX2
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ 32(oup), oup
-
- MOVQ $10, itr1
- MOVQ $0, itr2
- CMPQ inl, $128
- JBE sealAVX2Tail128
- CMPQ inl, $256
- JBE sealAVX2Tail256
- CMPQ inl, $384
- JBE sealAVX2Tail384
- JMP sealAVX2Tail512
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 193 bytes
-seal192AVX2:
- // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks
- VMOVDQA AA0, AA1
- VMOVDQA BB0, BB1
- VMOVDQA CC0, CC1
- VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2
- VMOVDQA BB0, BB2
- VMOVDQA CC0, CC2
- VMOVDQA DD0, DD2
- VMOVDQA DD1, TT3
- MOVQ $10, itr2
-
-sealAVX2192InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr2
- JNE sealAVX2192InnerCipherLoop
- VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1
- VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1
- VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1
- VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
-
- // Clamp and store poly key
- VPAND ·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
-
- // Stream for up to 192 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
-
-sealAVX2ShortSeal:
- // Hash aad
- MOVQ ad_len+80(FP), itr2
- CALL polyHashADInternal<>(SB)
- XORQ itr1, itr1
-
-sealAVX2SealHash:
- // itr1 holds the number of bytes encrypted but not yet hashed
- CMPQ itr1, $16
- JB sealAVX2ShortSealLoop
- polyAdd(0(oup))
- polyMul
- SUBQ $16, itr1
- ADDQ $16, oup
- JMP sealAVX2SealHash
-
-sealAVX2ShortSealLoop:
- CMPQ inl, $32
- JB sealAVX2ShortTail32
- SUBQ $32, inl
-
- // Load for encryption
- VPXOR (inp), AA0, AA0
- VMOVDQU AA0, (oup)
- LEAQ (1*32)(inp), inp
-
- // Now can hash
- polyAdd(0*8(oup))
- polyMulAVX2
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ (1*32)(oup), oup
-
- // Shift stream left
- VMOVDQA BB0, AA0
- VMOVDQA CC0, BB0
- VMOVDQA DD0, CC0
- VMOVDQA AA1, DD0
- VMOVDQA BB1, AA1
- VMOVDQA CC1, BB1
- VMOVDQA DD1, CC1
- VMOVDQA AA2, DD1
- VMOVDQA BB2, AA2
- JMP sealAVX2ShortSealLoop
-
-sealAVX2ShortTail32:
- CMPQ inl, $16
- VMOVDQA A0, A1
- JB sealAVX2ShortDone
-
- SUBQ $16, inl
-
- // Load for encryption
- VPXOR (inp), A0, T0
- VMOVDQU T0, (oup)
- LEAQ (1*16)(inp), inp
-
- // Hash
- polyAdd(0*8(oup))
- polyMulAVX2
- LEAQ (1*16)(oup), oup
- VPERM2I128 $0x11, AA0, AA0, AA0
- VMOVDQA A0, A1
-
-sealAVX2ShortDone:
- VZEROUPPER
- JMP sealSSETail
-
-// ----------------------------------------------------------------------------
-// Special optimization for buffers smaller than 321 bytes
-seal320AVX2:
- // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks
- VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3
- MOVQ $10, itr2
-
-sealAVX2320InnerCipherLoop:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr2
- JNE sealAVX2320InnerCipherLoop
-
- VMOVDQA ·chacha20Constants<>(SB), TT0
- VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2
- VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2
- VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2
- VMOVDQA ·avx2IncMask<>(SB), TT0
- VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3
- VPADDD TT3, DD2, DD2
-
- // Clamp and store poly key
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPAND ·polyClampMask<>(SB), TT0, TT0
- VMOVDQA TT0, rsStoreAVX2
-
- // Stream for up to 320 bytes
- VPERM2I128 $0x13, AA0, BB0, AA0
- VPERM2I128 $0x13, CC0, DD0, BB0
- VPERM2I128 $0x02, AA1, BB1, CC0
- VPERM2I128 $0x02, CC1, DD1, DD0
- VPERM2I128 $0x13, AA1, BB1, AA1
- VPERM2I128 $0x13, CC1, DD1, BB1
- VPERM2I128 $0x02, AA2, BB2, CC1
- VPERM2I128 $0x02, CC2, DD2, DD1
- VPERM2I128 $0x13, AA2, BB2, AA2
- VPERM2I128 $0x13, CC2, DD2, BB2
- JMP sealAVX2ShortSeal
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 128 bytes of ciphertext
-sealAVX2Tail128:
- // Need to decrypt up to 128 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA ·chacha20Constants<>(SB), AA0
- VMOVDQA state1StoreAVX2, BB0
- VMOVDQA state2StoreAVX2, CC0
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0
- VMOVDQA DD0, DD1
-
-sealAVX2Tail128LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealAVX2Tail128LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0
- VPALIGNR $8, CC0, CC0, CC0
- VPALIGNR $12, DD0, DD0, DD0
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0
- VPALIGNR $8, CC0, CC0, CC0
- VPALIGNR $4, DD0, DD0, DD0
- DECQ itr1
- JG sealAVX2Tail128LoopA
- DECQ itr2
- JGE sealAVX2Tail128LoopB
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA1
- VPADDD state1StoreAVX2, BB0, BB1
- VPADDD state2StoreAVX2, CC0, CC1
- VPADDD DD1, DD0, DD1
-
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
- JMP sealAVX2ShortSealLoop
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 256 bytes of ciphertext
-sealAVX2Tail256:
- // Need to decrypt up to 256 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA ·chacha20Constants<>(SB), AA1
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA state1StoreAVX2, BB1
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA state2StoreAVX2, CC1
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD1
- VMOVDQA DD0, TT1
- VMOVDQA DD1, TT2
-
-sealAVX2Tail256LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealAVX2Tail256LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1
- DECQ itr1
- JG sealAVX2Tail256LoopA
- DECQ itr2
- JGE sealAVX2Tail256LoopB
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPERM2I128 $0x02, CC0, DD0, TT1
- VPERM2I128 $0x13, AA0, BB0, TT2
- VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- MOVQ $128, itr1
- LEAQ 128(inp), inp
- SUBQ $128, inl
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
-
- JMP sealAVX2SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 384 bytes of ciphertext
-sealAVX2Tail384:
- // Need to decrypt up to 384 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2
- VMOVDQA DD0, TT1; VMOVDQA DD1, TT2; VMOVDQA DD2, TT3
-
-sealAVX2Tail384LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealAVX2Tail384LoopB:
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- polyAdd(0(oup))
- polyMul
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2
- chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0)
- polyAdd(16(oup))
- polyMul
- LEAQ 32(oup), oup
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2
- DECQ itr1
- JG sealAVX2Tail384LoopA
- DECQ itr2
- JGE sealAVX2Tail384LoopB
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2
- VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1; VPADDD TT3, DD2, DD2
- VPERM2I128 $0x02, AA0, BB0, TT0
- VPERM2I128 $0x02, CC0, DD0, TT1
- VPERM2I128 $0x13, AA0, BB0, TT2
- VPERM2I128 $0x13, CC0, DD0, TT3
- VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3
- VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup)
- VPERM2I128 $0x02, AA1, BB1, TT0
- VPERM2I128 $0x02, CC1, DD1, TT1
- VPERM2I128 $0x13, AA1, BB1, TT2
- VPERM2I128 $0x13, CC1, DD1, TT3
- VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3
- VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup)
- MOVQ $256, itr1
- LEAQ 256(inp), inp
- SUBQ $256, inl
- VPERM2I128 $0x02, AA2, BB2, AA0
- VPERM2I128 $0x02, CC2, DD2, BB0
- VPERM2I128 $0x13, AA2, BB2, CC0
- VPERM2I128 $0x13, CC2, DD2, DD0
-
- JMP sealAVX2SealHash
-
-// ----------------------------------------------------------------------------
-// Special optimization for the last 512 bytes of ciphertext
-sealAVX2Tail512:
- // Need to decrypt up to 512 bytes - prepare two blocks
- // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed
- // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed
- VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3
- VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3
- VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3
- VMOVDQA ctr3StoreAVX2, DD0
- VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3
- VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2
-
-sealAVX2Tail512LoopA:
- polyAdd(0(oup))
- polyMul
- LEAQ 16(oup), oup
-
-sealAVX2Tail512LoopB:
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- polyAdd(0*8(oup))
- polyMulAVX2
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- polyAdd(2*8(oup))
- polyMulAVX2
- LEAQ (4*8)(oup), oup
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3
- VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3
- VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3
- VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3
- VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3
- VMOVDQA CC3, tmpStoreAVX2
- VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0
- VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1
- VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2
- VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3
- VMOVDQA tmpStoreAVX2, CC3
- VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3
- VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3
- VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3
-
- DECQ itr1
- JG sealAVX2Tail512LoopA
- DECQ itr2
- JGE sealAVX2Tail512LoopB
-
- VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3
- VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3
- VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3
- VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3
- VMOVDQA CC3, tmpStoreAVX2
- VPERM2I128 $0x02, AA0, BB0, CC3
- VPXOR (0*32)(inp), CC3, CC3
- VMOVDQU CC3, (0*32)(oup)
- VPERM2I128 $0x02, CC0, DD0, CC3
- VPXOR (1*32)(inp), CC3, CC3
- VMOVDQU CC3, (1*32)(oup)
- VPERM2I128 $0x13, AA0, BB0, CC3
- VPXOR (2*32)(inp), CC3, CC3
- VMOVDQU CC3, (2*32)(oup)
- VPERM2I128 $0x13, CC0, DD0, CC3
- VPXOR (3*32)(inp), CC3, CC3
- VMOVDQU CC3, (3*32)(oup)
-
- VPERM2I128 $0x02, AA1, BB1, AA0
- VPERM2I128 $0x02, CC1, DD1, BB0
- VPERM2I128 $0x13, AA1, BB1, CC0
- VPERM2I128 $0x13, CC1, DD1, DD0
- VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0
- VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup)
-
- VPERM2I128 $0x02, AA2, BB2, AA0
- VPERM2I128 $0x02, CC2, DD2, BB0
- VPERM2I128 $0x13, AA2, BB2, CC0
- VPERM2I128 $0x13, CC2, DD2, DD0
- VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0
- VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup)
-
- MOVQ $384, itr1
- LEAQ 384(inp), inp
- SUBQ $384, inl
- VPERM2I128 $0x02, AA3, BB3, AA0
- VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0
- VPERM2I128 $0x13, AA3, BB3, CC0
- VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0
-
- JMP sealAVX2SealHash
-
-// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·cpuid(SB), NOSPLIT, $0-24
- MOVL eaxArg+0(FP), AX
- MOVL ecxArg+4(FP), CX
- CPUID
- MOVL AX, eax+8(FP)
- MOVL BX, ebx+12(FP)
- MOVL CX, ecx+16(FP)
- MOVL DX, edx+20(FP)
- RET
-
-// func xgetbv() (eax, edx uint32)
-TEXT ·xgetbv(SB),NOSPLIT,$0-8
- MOVL $0, CX
- XGETBV
- MOVL AX, eax+0(FP)
- MOVL DX, edx+4(FP)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
deleted file mode 100644
index f7e4bfb1c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2016 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 file.
-
-package chacha20poly1305
-
-import (
- "encoding/binary"
-
- "golang.org/x/crypto/chacha20poly1305/internal/chacha20"
- "golang.org/x/crypto/poly1305"
-)
-
-func roundTo16(n int) int {
- return 16 * ((n + 15) / 16)
-}
-
-func (c *chacha20poly1305) sealGeneric(dst, nonce, plaintext, additionalData []byte) []byte {
- var counter [16]byte
- copy(counter[4:], nonce)
-
- var polyKey [32]byte
- chacha20.XORKeyStream(polyKey[:], polyKey[:], &counter, &c.key)
-
- ret, out := sliceForAppend(dst, len(plaintext)+poly1305.TagSize)
- counter[0] = 1
- chacha20.XORKeyStream(out, plaintext, &counter, &c.key)
-
- polyInput := make([]byte, roundTo16(len(additionalData))+roundTo16(len(plaintext))+8+8)
- copy(polyInput, additionalData)
- copy(polyInput[roundTo16(len(additionalData)):], out[:len(plaintext)])
- binary.LittleEndian.PutUint64(polyInput[len(polyInput)-16:], uint64(len(additionalData)))
- binary.LittleEndian.PutUint64(polyInput[len(polyInput)-8:], uint64(len(plaintext)))
-
- var tag [poly1305.TagSize]byte
- poly1305.Sum(&tag, polyInput, &polyKey)
- copy(out[len(plaintext):], tag[:])
-
- return ret
-}
-
-func (c *chacha20poly1305) openGeneric(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
- var tag [poly1305.TagSize]byte
- copy(tag[:], ciphertext[len(ciphertext)-16:])
- ciphertext = ciphertext[:len(ciphertext)-16]
-
- var counter [16]byte
- copy(counter[4:], nonce)
-
- var polyKey [32]byte
- chacha20.XORKeyStream(polyKey[:], polyKey[:], &counter, &c.key)
-
- polyInput := make([]byte, roundTo16(len(additionalData))+roundTo16(len(ciphertext))+8+8)
- copy(polyInput, additionalData)
- copy(polyInput[roundTo16(len(additionalData)):], ciphertext)
- binary.LittleEndian.PutUint64(polyInput[len(polyInput)-16:], uint64(len(additionalData)))
- binary.LittleEndian.PutUint64(polyInput[len(polyInput)-8:], uint64(len(ciphertext)))
-
- ret, out := sliceForAppend(dst, len(ciphertext))
- if !poly1305.Verify(&tag, polyInput, &polyKey) {
- for i := range out {
- out[i] = 0
- }
- return nil, errOpen
- }
-
- counter[0] = 1
- chacha20.XORKeyStream(out, ciphertext, &counter, &c.key)
- return ret, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go
deleted file mode 100644
index 4c2eb703c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !amd64 !go1.7 gccgo appengine
-
-package chacha20poly1305
-
-func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte {
- return c.sealGeneric(dst, nonce, plaintext, additionalData)
-}
-
-func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
- return c.openGeneric(dst, nonce, ciphertext, additionalData)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_test.go
deleted file mode 100644
index 78f981a74..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_test.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2016 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 file.
-
-package chacha20poly1305
-
-import (
- "bytes"
- cr "crypto/rand"
- "encoding/hex"
- mr "math/rand"
- "testing"
-)
-
-func TestVectors(t *testing.T) {
- for i, test := range chacha20Poly1305Tests {
- key, _ := hex.DecodeString(test.key)
- nonce, _ := hex.DecodeString(test.nonce)
- ad, _ := hex.DecodeString(test.aad)
- plaintext, _ := hex.DecodeString(test.plaintext)
-
- aead, err := New(key)
- if err != nil {
- t.Fatal(err)
- }
-
- ct := aead.Seal(nil, nonce, plaintext, ad)
- if ctHex := hex.EncodeToString(ct); ctHex != test.out {
- t.Errorf("#%d: got %s, want %s", i, ctHex, test.out)
- continue
- }
-
- plaintext2, err := aead.Open(nil, nonce, ct, ad)
- if err != nil {
- t.Errorf("#%d: Open failed", i)
- continue
- }
-
- if !bytes.Equal(plaintext, plaintext2) {
- t.Errorf("#%d: plaintext's don't match: got %x vs %x", i, plaintext2, plaintext)
- continue
- }
-
- if len(ad) > 0 {
- alterAdIdx := mr.Intn(len(ad))
- ad[alterAdIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce, ct, ad); err == nil {
- t.Errorf("#%d: Open was successful after altering additional data", i)
- }
- ad[alterAdIdx] ^= 0x80
- }
-
- alterNonceIdx := mr.Intn(aead.NonceSize())
- nonce[alterNonceIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce, ct, ad); err == nil {
- t.Errorf("#%d: Open was successful after altering nonce", i)
- }
- nonce[alterNonceIdx] ^= 0x80
-
- alterCtIdx := mr.Intn(len(ct))
- ct[alterCtIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce, ct, ad); err == nil {
- t.Errorf("#%d: Open was successful after altering ciphertext", i)
- }
- ct[alterCtIdx] ^= 0x80
- }
-}
-
-func TestRandom(t *testing.T) {
- // Some random tests to verify Open(Seal) == Plaintext
- for i := 0; i < 256; i++ {
- var nonce [12]byte
- var key [32]byte
-
- al := mr.Intn(128)
- pl := mr.Intn(16384)
- ad := make([]byte, al)
- plaintext := make([]byte, pl)
- cr.Read(key[:])
- cr.Read(nonce[:])
- cr.Read(ad)
- cr.Read(plaintext)
-
- aead, err := New(key[:])
- if err != nil {
- t.Fatal(err)
- }
-
- ct := aead.Seal(nil, nonce[:], plaintext, ad)
-
- plaintext2, err := aead.Open(nil, nonce[:], ct, ad)
- if err != nil {
- t.Errorf("Random #%d: Open failed", i)
- continue
- }
-
- if !bytes.Equal(plaintext, plaintext2) {
- t.Errorf("Random #%d: plaintext's don't match: got %x vs %x", i, plaintext2, plaintext)
- continue
- }
-
- if len(ad) > 0 {
- alterAdIdx := mr.Intn(len(ad))
- ad[alterAdIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil {
- t.Errorf("Random #%d: Open was successful after altering additional data", i)
- }
- ad[alterAdIdx] ^= 0x80
- }
-
- alterNonceIdx := mr.Intn(aead.NonceSize())
- nonce[alterNonceIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil {
- t.Errorf("Random #%d: Open was successful after altering nonce", i)
- }
- nonce[alterNonceIdx] ^= 0x80
-
- alterCtIdx := mr.Intn(len(ct))
- ct[alterCtIdx] ^= 0x80
- if _, err := aead.Open(nil, nonce[:], ct, ad); err == nil {
- t.Errorf("Random #%d: Open was successful after altering ciphertext", i)
- }
- ct[alterCtIdx] ^= 0x80
- }
-}
-
-func benchamarkChaCha20Poly1305Seal(b *testing.B, buf []byte) {
- b.SetBytes(int64(len(buf)))
-
- var key [32]byte
- var nonce [12]byte
- var ad [13]byte
- var out []byte
-
- aead, _ := New(key[:])
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- out = aead.Seal(out[:0], nonce[:], buf[:], ad[:])
- }
-}
-
-func benchamarkChaCha20Poly1305Open(b *testing.B, buf []byte) {
- b.SetBytes(int64(len(buf)))
-
- var key [32]byte
- var nonce [12]byte
- var ad [13]byte
- var ct []byte
- var out []byte
-
- aead, _ := New(key[:])
- ct = aead.Seal(ct[:0], nonce[:], buf[:], ad[:])
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- out, _ = aead.Open(out[:0], nonce[:], ct[:], ad[:])
- }
-}
-
-func BenchmarkChacha20Poly1305Open_64(b *testing.B) {
- benchamarkChaCha20Poly1305Open(b, make([]byte, 64))
-}
-
-func BenchmarkChacha20Poly1305Seal_64(b *testing.B) {
- benchamarkChaCha20Poly1305Seal(b, make([]byte, 64))
-}
-
-func BenchmarkChacha20Poly1305Open_1350(b *testing.B) {
- benchamarkChaCha20Poly1305Open(b, make([]byte, 1350))
-}
-
-func BenchmarkChacha20Poly1305Seal_1350(b *testing.B) {
- benchamarkChaCha20Poly1305Seal(b, make([]byte, 1350))
-}
-
-func BenchmarkChacha20Poly1305Open_8K(b *testing.B) {
- benchamarkChaCha20Poly1305Open(b, make([]byte, 8*1024))
-}
-
-func BenchmarkChacha20Poly1305Seal_8K(b *testing.B) {
- benchamarkChaCha20Poly1305Seal(b, make([]byte, 8*1024))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_vectors_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_vectors_test.go
deleted file mode 100644
index 49f0da6b7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_vectors_test.go
+++ /dev/null
@@ -1,332 +0,0 @@
-// Copyright 2016 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 file.
-
-package chacha20poly1305
-
-var chacha20Poly1305Tests = []struct {
- plaintext, aad, key, nonce, out string
-}{
- {
- "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e",
- "50515253c0c1c2c3c4c5c6c7",
- "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f",
- "070000004041424344454647",
- "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b61161ae10b594f09e26a7e902ecbd0600691",
- },
- {
- "1400000cebccee3bf561b292340fec60",
- "00000000000000001603030010",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "2b487a2941bc07f3cc76d1a531662588ee7c2598e59778c24d5b27559a80d163",
- },
- {
- "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "00000000000000000000000000",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "3f487a25aa70e9c8391763370569c9e83b7650dd1921c8b78869f241f25d2096c910b180930c5b8747fd90959fe8ca2dcadb4fa50fa1439f916b2301e1cc0810d6725775d3ab86721700f96e22709b0a7a8bef32627dd929b2dd3ba15772b669062bb558bc92e6c241a1d60d9f0035e80c335f854815fe1138ab8af653eab3e122135feeec7dfaba1cc24af82a2b7acccdd824899a7e03cc29c25be8a4f56a66673845b93bae1556f09dafc89a0d22af207718e2a6bb022e9d917597295992ea3b750cc0e7a7c3d33b23c5a8aeab45f5bb542f6c9e6c1747ae5a344aff483ba38577ad534b33b3abc7d284776ea33ed488c2a2475648a4fcda561745ea7787ed60f2368deb27c75adce6ff9b6cc6de1f5e72a741e2d59f64751b3ae482d714e0c90e83c671ff98ed611823afb39e6e5019a6ba548a2a72e829c7b7b4a101ac9deb90a25d3e0c50d22e1fc26c7c02296fa13c6d9c14767f68aaf46450a8d0fd5feb60d9d73c6e68623425b4984a79d619dd6bf896459aa77a681ec9c1a97f645e121f47779b051f8948a817f84d1f55da170d5bbbaf2f64e18b97ed3fd822db2819f523314f1e5ac72e8f69bbe6c87c22daddb0e1ac6790f8534071de2f258064b99789bfb165b065b8fe96f9127cd7dca9f7cb0368420f1e802faa3ca23792f2a5b93773dd405e71c320b211b54f7a26626b03c060e1ab87f32ac588abfa056ce090bd7c69913a700c80f325bfe824fa",
- },
- {
- "0967de57eefe1aaa999b9b746d88a1a248000d8734e0e938c6aa87",
- "e4f0a3a4f90a8250f8806aa319053e8d73c62f150e2f239563037e9cc92823ad18c65111d0d462c954cc6c6ed2aafb45702a5a7e597d13bd8091594ab97cf7d1",
- "f2db28620582e05f00f31c808475ca3df1c20e340bf14828352499466d79295f",
- "4349e2131d44dc711148dfe3",
- "bd06cc144fdc0d8b735fa4452eabbf78fd4ad2966ea41a84f68da40ca2da439777bc2ba6c4ec2de0d003eb",
- },
- {
- "c4c920fb52a56fe66eaa8aa3fa187c543e3db8e5c8094c4313dc4ed35dfc5821c5791d171e8cfe8d37883031a0ad",
- "85deea3dc4",
- "05ff881d1e151bab4ca3db7d44880222733fe62686f71ce1e4610f2ea19599a7",
- "b34710f65aed442e4a40866b",
- "b154452fb7e85d175dd0b0db08591565c5587a725cf22386922f5d27a01015aba778975510b38754b2182e24352f019b7ad493e1ed255906715644aec6e0",
- },
- {
- "c4b337df5e83823900c6c202e93541cf5bc8c677a9aad8b8d87a4d7221e294e595cbc4f34e462d4e0def50f62491c57f598cf60236cfba0f4908816aea154f80e013732e59a07c668fcc5cb35d2232b7ae29b9e4f874f3417c74ab6689fae6690d5a9766fa13cd8adf293d3d4b70f4f999adde9121d1d29d467d04cf77ea398444d0ea3fe4b7c9c3e106002c76f4260fa204a0c3d5",
- "72611bef65eb664f24ea94f4d5d3d88c9c9c6da29c9a1991c02833c4c9f6993b57b5",
- "dd0f2d4bb1c9e5ca5aa5f38d69bc8402f7dbb7229857b4a41b3044d481b7655e",
- "2bbca0910cc47ca0b8517391",
- "83aa28d6d98901e2981d21d3758ae4db8cce07fe08d82ca6f036a68daa88a7dda56eeb38040c942bdda0fd2d369eec44bd070e2c9314992f68dc16989a6ac0c3912c378cf3254f4bae74a66b075e828df6f855c0d8a827ffed3c03582c12a9112eeb7be43dfe8bd78beb2d1e56678b99a0372531727cb7f2b98d2f917ec10de93fe86267100c20356e80528c5066688c8b7acba76e591449952343f663993d5b642e59eb0f",
- },
- {
- "a9775b8e42b63335439cf1c79fe8a3560b3baebfdfc9ef239d70da02cea0947817f00659a63a8ee9d67fb1756854cc738f7a326e432191e1916be35f0b78d72268de7c0e180af7ee8aa864f2fc30658baa97f9edb88ace49f5b2a8002a8023925e9fa076a997643340c8253cf88ac8a221c190d94c5e224110cb423a4b65cca9046c1fad0483e1444c0680449148e7b20a778c56d5ae97e679d920c43eed6d42598cf05d10d1a15cd722a0686a871b74fea7cad45562bacf3bda937ac701bc218dac7e9d7d20f955429abdac21d821207febf4d54daea4898837035038bf71c66cef63e90f5d3e51f7fcfe18d41f38540a2c2958dacde16304e4b33da324030f1366f923c337",
- "74ba3372d308910b5c9c3885f41252d57556",
- "9cf77bd06a4ed8fb59349791b98ba40b6019611942f5768e8be2ee88477149e3",
- "b928935c4c966c60fd6583c0",
- "ec7fd64fd75b254961a2b7fc942470d8620f439258b871d0d00f58028b5e0bee5e139e8108ac439391465d6658f559b1df57aa21cf826ede1a28bc11af885e13eebfc009870928fae8abfdd943a60c54fca93f0502dc23d29c2fd5340f9bc0e6ef2a18b66ef627af95f796d5bbca50de22c8ec802da9397089b25c6ba5262468e3977b45dc112e51896c70731b0a52d7efec7c93b41995823436bf4b0c477ae79684407c9831b487928b2b8303caca752b3edf1f0598e15831155462706f94ef3fa3a9e5f937f37085afa9b4bbf939d275796a61b78f70597acfd25cd87f967021cd99328fc371b5eb5739869520657b30e4a5b0db7c8715cbe275dee78e719b357d3a9731f9eaba95986479bb2004a77822fc115a3d",
- },
- {
- "b3d3128bce6bbf66fd78f1a18352bae56bfcdae18b65c379ee0aeb37ee54fba1270d2df578ec5b75654d16e89fd1cd0acda7ec580dafd2fbbabd32a8112d49383a762db2638928c8d63eb0750f7e7fdd256b35321b072dd5c45f7dd58cc60dc63d3b79a0c4a1689adf180fef968eccbcfa01ee15091ceacd7b67a3082db0ce6aeb470aafe87249c88b58b721e783dde184ccf68de8e05b6347fe6b74ae3adf9a81e9496a5c9332e7ebe908d26ce6b3f0b2a97e9a89d9fdd0d7694585a3241f240d698e69fcc050e7a959ba153f6d06f117848ba05d887134f1b6b994dad9b9e74247513e08a125b1fadfc7394dcd2a6451b504ae3e75e22f2b9bc405747dedb6c43ef4ccdf1a7edaf9451346123eaa63f3af113124f361508e255503a242b96680ae3360c8b13ac1f64d08088bb26b7f617cb0866f11d6fd362b00d86eba3fee68724e302388f119d6f92161ac8ce00d08919377a26974d99575b1032ff0f1976240c785c8b89e9eb2bf005e4be06b5371ffca14683fedfdb49e00e38ff27af1324177faf91599abd5990920797574eb743effdc7decda318ada1419cc8e0bfecf82f9c99792746c2b",
- "7e8da4f3018f673f8e43bd7a1dee05f8031ec49129c361abbc2a434e9eaf791c3c1d0f3dad767d3bba3ab6d728bbcf2bd994bd03571eae1348f161e6a1da03ddf7121ba4",
- "7ee32dd501dce849cd492f6e23324c1a4567bfceff9f11d1352bcb8615f1b093",
- "8998e043d2961afa51ea262a",
- "ba85e72af18cb5ba85a4a0d6c28b4ac1e5509a3a2fdb0e3255cbc559df5e6a661fc560c756a0264dd99b72c61c51a4b7ad56ca4c8ccb7e8edfc48ff3cceac5d1e8ac5fc87096adc4d0e9a27492857b17604c3a694cfe0e70b22df106c8f3c61f840bcd634964cdb571840e125e381e7dd3a0d97972e965f16f775fa4ce555124318290bf508beb7bd77e633042deb0e863631478fc3dc9122862b3c31264471bcce54e0b74040c8bafd481cf798f332e8940f1134d3027d6f28e771d15e154fc89c6c25fe18a5d312807cc2e623bb1bbb4f0b6ec71d009407eb54bb0759f03682f65d0da8812f84d8e97483f6a8d76a8417efcd9526444abba24288647609791578887ef49780b0b89f51b072cae81c5b5014463da3633dda105b82add0f9c2f065dca46eedd2928be2570493c79a996fa78ea6aec0996497fe2dc444432ade4eaa662ee2255f0f4b92d593288a8e3ffe7a15a10e9d33b0203af23f4c9fd2cfcb6160db63b52810869ff1e65423dbe2c4415884b9f8dec3c968e14cd74f323c89053a96111bc9ce59ec483832c49c53a648e5f0f797f53642ac60170c94b473f1f2e7d8a38e46460b81219b52081263027f74cbf63a75af3a7",
- },
- {
- "68d5ba501e87994ef6bc8042d7c5a99693a835a4796ad044f0e536a0790a7ee1e03832fec0cb4cb688cdf85f92a1f526492acac2949a0684803c24f947a3da27db0c259bd87251603f49bfd1eab4f733dec2f5725cfcf6dc381ad57fbdb0a699bccc34943e86f47dcfb34eba6746ed4508e3b764dfad4117c8169785c63d1e8309531747d90cc4a8bf13622759506c613324c512d10629991dc01fe3fe3d6607907e4f698a1312492674707fc4dde0f701a609d2ac336cc9f38badf1c813f9599148c21b5bd4658249d5010db2e205b3880e863441f2fe357dab2645be1f9e5067616bc335d0457ea6468c5828910cb09f92e5e184e316018e3c464c5ce59cc34608867bd8cbfa7e1286d73a17e3ebb675d097f9b3adfa41ea408d46252a096b3290e70a5be1896d6760a87e439334b863ccb11679ab5763ebe4a9110eb37c4043634b9e44d40cab34b42977475e2faa2ae0c0a38b170776fbb0870a63044aa6679545ac6951579d0581144cdf43f60923b6acaecdb325c864acd2c7b01d6e18b2b3c41c041bb9099cce557b114b84350131e3cee4089648b5691065867e7d38314154355d0e3ef9dc9375eddef922df2a06ad0f0e4357c3ac672932e5a66b16e8bf4b45cd893ea91cb397faadb9d9d7bf86e6ceca3e9176a5baa98b6114a149d3ed8ea176cc4a9380e18d2d9b67045aedeb28b729ba2ece74d759d5ebfb1ebee8ac5f5e79aaf1f98b7f2626e62a81d315a98b3e",
- "63b90dd89066ad7b61cc39497899a8f14399eace1810f5fe3b76d2501f5d8f83169c5ba602082164d45aad4df3553e36ef29050739fa067470d8c58f3554124bf06df1f27612564a6c04976059d69648ff9b50389556ad052e729563c6a7",
- "7d5c4314a542aff57a454b274a7999dfdc5f878a159c29be27dabdfcf7c06975",
- "aeb6159fa88bb1ffd51d036d",
- "7597f7f44191e815a409754db7fea688e0105c987fa065e621823ea6dea617aed613092ad566c487cfa1a93f556615d2a575fb30ac34b11e19cd908d74545906f929dc9e59f6f1e1e6eaaabe182748ef87057ef7820ffcf254c40237d3ea9ff004472db783ed54b5a294a46cf90519bf89367b04fc01ce544c5bcdd3197eb1237923ce2c0c99921ca959c53b54176d292e97f6d9696ded6054711721aebda543e3e077c90e6f216cdc275b86d45603521c5aab24f08fd06833b0743c388382f941e19e0283ac7c4ef22383e1b9b08572882769c1382bab9ad127e7f3e09b5330b82d3e0c7d6f0df46edc93265999eef8e7afa0cb1db77df7accf5bff8631a320d146a5c751a637a80f627b0c9a41b44f09212f38c154226de02f4906ef34139bbeacc3f06739c8540e37334392d38ba1cbf4bc7debe77c09b35d2200216db15ed4389f43bfd8ae9bf76fd8243c3d869546e16b8e44a6cd1edbd2c58ef890b5a84cda889131e5cd9402ca4d8271052c6b4fe3f2dff54fb77bcb575c315b9109f90b14bc8e109919808a581c1809e2a188d29fd34ce639088a6683f641925f5b4b3529baa34e080bb47fb7ad9b43d0d67c9e6ae7cacb50527fa74e56d0c8b20149f5d332d686d48ebbe634c2b5d35fc84c69a5bcc93b93dedcf9fdf19a1fb9b75f6df9692d16f6c3490377a06294499e4b8ebeaa0cfd840bfa05fde21c0b5e94d13063b3f5da7b537caefe89069cfa9de9eb8f06e4d30125de64716f821bcc8279c0c7ea2e",
- },
- {
- "89c1ee38b6697d0190c87a2aa756892ee09fca095df1e31aeedbda5750f604d9b8f2116e5b8f70ec57ea16fe419f2d213ef72b9be90eb5d7e98f2e398632123e2524ac80b31c6c0a07820848223569602d94fc16a3b1ed8c411bc6c74ed80573fcb1f3afce60b9d5e2c21d04f78665241b613abe12274a5343101a91e91f04e5d1f7959f574e743a10913e0817a32c320467f0178e3b6ad14b856234a4661a755eaf14b5fd88ef0e192e1631d14263d6a954ed388f5709dadc6c0f81d229f630d80be6d593d5e3ad03f9ded53c41abe595981d24ef27ffcc930e4d653743960f4e7ce4e251c88f55c16d2afdaed5e3446d00685c276728ba757520acb9b6bb0732a0e9836878d829e5022794d70ad8440a40a132a8c9ec1d3f0ccaf8c285fff425e9788d6150b74753dedb2ae8b36ff2f310249bd911b9181d8310e00810d42ef94cbb5a9d72a1f0507c1a382f892b23994fbe7360778b7efa9c5e03ac3231a57fecff1c5fa10caf1d26e84db0137049622ebcc3a64841a0e49fa390d1d43550c1346c20d578cff39fb7404fcab0982dde55f0849d312581d0c811a19d46f25e7a5e7e50d74d43760583c5cf335dfc11b2ec964f1dbbd0ed83e18f2027817ea2dffcf2b64a352c4fb8f11eeb4f1bfc01079251254d2112d103a1f12a2270cc026cbeb8b6f3e505abd62496253f93274625786b73997e449c1f35c742a593441252fcc845e1cef1b8f287dd311a0477407ce3b31661f7b2802c79c2d20d06e45f03aca4e47a959c6c1d7a9d377e1577fbf82a115921c3d94e3d9c204aa204a9a5b04d8a2be3269700a035371f4aaf1a42d92b9bfbee74492b106975b36d1e581d6ce2484f09e04fa91586c85f35e2a10f0d3c0afcb05327c1bc9d7429bbcc4627af8f76b86fc561844c2ae3810c84901ac09a1670ed3d31a9daa5d296",
- "7219bd21a834d917f93a9b45647ec77102578bc2f2a132dfde6489b9095b4f7b740c9c1c4075333ab0ce7f14",
- "a7f849b054982cc8a4c8e5e53e181feee79e0233e58882839892134ad582da7c",
- "4c46854e9e101090b1436f90",
- "ab2e189baf60886bed88eb751bf3560a8bd3cdb6ee621d8c18b5fb3aa418f350048ecf359a7d542daf7090ec8688c3b0fe85914aa49d83be4ae3396f7bdc48051afae6a97fca7b42c0bf612a42d3c79ef6aadceb57f5cfe8d67f89d49add0ea1ffd423da058297239e72a85fa6cd1d82e243a503b1b0e12d7510a9ee98d7921dae2754d7581e52acb8ab9e7f9df3c73410789115cef6ce7c937a5441ad4edf2b7a8c0c6d152d5a5909c4ce839d59594a6163364038c4c71a1507389717f61e2bda1ea66a83ef477762e7834ebcfaa8f2ee61ced1605ba1380108236e1763bf40af5259da07dd3e3d0fb2801868c2e7c839e318678687cbe33384e2ef5750a0a0e2d2e19e869a4277e32a315ed4de79357f6a12a8a25d5b18291316d9bf40dad2d05d1b523ade76650669c700a1c2965f4e51337aa5d45ec7b4981072779401d6d30ed69034053334bccb18425ac68460becf2aeccc75aacd3d6709f07ee10366ed848c8a54904af4ea71fc2117de133f01e1cc031f2a4d0779b997b82682433ee615202d5dfffba6c916f11a00551d56ffde8c36b303263e14adaf45b6eab0bedf344e5214ce52f071d2f40154d788c6870020791a03d2fd4ec5879d9026241954ed45cfddef4937ea3d0d45647f252be31411237983a1be340fc65ebab9a5620abb0e8d475af4e89e842e895eda0cbd283bb5d0bf20236c62d956de733d60ebceb42fc0c9adbf9b69f8d66551b0aca0e260625ad41cad75d752a234af7caf7902c2c5b62f04b6a8e019a6179d44feeb2ad5859ef1c45371e66f1af1fe0de63997266c290e27f0dd62185c53f81e0a50c296a51ace7c90d9cf0dda8b2d7e72a347f64c44262e2a544d1acc7bb05734dc1783bbc1903279092fe7fe434610aa95fc2ce5fc5ee45858f5e8337d8fcb0a468464becb1cef6b7e5ea48ba383ad8a406df9c581f1cac057d8711fcb",
- },
- {
- "2dcfbb59975f217c445f95634d7c0250afe7d8316a70c47dba99ff94167ab74349729ce1d2bd5d161df27a6a6e7cba1e63924fcd03134abdad4952c3c409060d7ca2ee4e5f4c647c3edee7ad5aa1cbbd341a8a372ed4f4db1e469ee250a4efcc46de1aa52a7e22685d0915b7aae075defbff1529d40a04f250a2d4a046c36c8ca18631cb055334625c4919072a8ee5258efb4e6205525455f428f63aeb62c68de9f758ee4b8c50a7d669ae00f89425868f73e894c53ce9b964dff34f42b9dc2bb03519fbc169a397d25197cae5bc50742f3808f474f2add8d1a0281359043e0a395705fbc0a89293fa2a5ddfe6ae5416e65c0a5b4eb83320585b33b26072bc99c9c1948a6a271d64517a433728974d0ff4586a42109d6268f9961a5908d6f2d198875b02ae7866fff3a9361b41842a35dc9477ec32da542b706f8478457649ddfda5dfab1d45aa10efe12c3065566541ebdc2d1db6814826f0cc9e3642e813408df3ebaa3896bb2777e757dc3dbc1d28994a454fcb8d76bc5914f29cfc05dc89f8c734315def58d4d6b0b0136ccd3c05178155e30fcb9f68df9104dc96e0658fa899c0058818da5ec88a723558ae3a6f2f8f523e5af1a73a82ab16198c7ba8341568399d8013fc499e6e7ef61cb8654b48b88aa2a931dc2cdcf245686eed9c8355d620d5e91c1e878a9c7da655e3f29d9b7c3f44ad1c70890eb5f27ca28efff76420cd4e3cebd5c788536ddd365f7ad1dbb91588d58612e43b0460de9260d5f780a245bc8e1a83166df1f3a3506d742c268ab4fc10c6e04bca40295da0ff5420a199dd2fb36045215138c4a2a539ceccc382c8d349a81e13e848708947c4a9e85d861811e75d323896f6da3b2fa807f22bcfc57477e487602cf8e973bc925b1a19732b00d15d38675313a283bbaa75e6793b5af11fe2514bda3abe96cc19b0e58ddbe55e381ec58c31670fec1184d38bbf2d7cde0fcd29e907e780d30130b98e0c9eec44bcb1d0ed18dfda2a64adb523da3102eafe2bd3051353d8148491a290308ed4ec3fa5da5784b481e861360c3b670e256539f96a4c4c4360d0d40260049035f1cfdacb275e7fa847e0df531b466141ac9a3a16e7865947572e4ab732daec23aac6eed1256d796c4d58bf699f20aa4bbae461a16abbe9c1e9",
- "33791b0d653fb72c2d88519b02bde85a7c51f99cfb4456dfa6f84a61e10b4a14846521",
- "a0a7b73ca2fc9282a28acc036bd74d7f5cb2a146577a5c29dbc3963fe7ebfd87",
- "eaa4d916d261676d632455be",
- "c9a631de470fd04dcbf8ea9f4d8ac37c3988878b6381707ac2c91d3720edbb31576ba90731f433a5e13582aca2b3c76ae75ca8881a463ecfa789910d3a776a9ad4800521c6baa120b2f1afd10f32ef8da63f5b69f5e5fd88ee84bf66b0666b15d05c4050f5358a050b9d5cf1503719f56cd48ceba78f29efe2ae8092e37f5134df526831532f86ccb9339637e2c9e9b9036f83cc058fda23e826a188456e7fd3f4ee20f4e4a3221883fe3232b49db607b90a8956133ab95051c9ec33a908ea7e81a1bfa7bd06c09f0143d07bb23a3feeac7f0d7720269c93e2df19d03605828c8713b84d183c9a50954c12fe3b047511ad15ef03a63355520cbd224d06a34de67a671368e6a8f9feeefe48fc273764a8c69c00314e5d693f159cb5270544f3c4e1760b0529e3303ab308e9a6d03835a3a42aef2df5f7643696f707a574d1dcc676aeecdd9947ebe8c13bcf15d30b2d10d2cd95445a307c1d22d39450615ad38f9302c6eb9dc05764b0503d6a7eaff9feb94834853b47bc25660207be3e7c0e27cb3127b5402cb016396e5ff07ddc3df29861dd68a17f53bf660b23352b739d6da72381b8d19a9fc95da7efb79330a2b360dce4309860af429e3fd10cab235c4acc1d80d9e20d67019375bd161ab65648400f308815afe63cfc717f7d0eea150e687caac25b6603287d44dca4a7cc2f67c3bdd54450bd3170340253b03ba054ec003070eddf9c14fb9dc595e228e4968524900cb5d85af6d1e658a42d744e0e7eb6995023823a8dc33528c6715b2e1aa607782c8e1ddddad72026d657bf122ece8685f6e92236e809139325e4a3c069facf94c10b7896995bba01eb22c7b3a87ea2114a7649d7ed3e83d223e5e785c66a75119beab0968d3eaf0cbcc2d7ede95d024041e6db39a880ce3e19efea32fb89a40a2aae22f407e5fd615e51e48dbd50a8b4ec27ce95e2ba1928bf699d0418705482ed0ed7acc858dfbd690403c74667a88dd5221bb79940c6c4a268379c10343aaefb635982c14f33ad83d47ced9682961540bd4f75804d3d48ba8aa67fb2e3a1db83fbcbe57fec9e4ffb1b575e947f8bd8263c680357960e3a39382974774b5a013f2f8514b3c63c21dbfd314fd5d927d82ba616d76629ac018879f54ff84b5808e94af4fcfe1cf8845b65208ca5510b5b593ce6c109611652cd",
- },
- {
- "c335b055b752e083554b5aa2cbb6556cfcace658d5c11b6b000256fd89e9b24c1e62a2d5b582580acdb2ad9869020465aeeabe83acd9eeacdc44aa652d5cb24bbe542073d6787ea32b2b3c942d40f9db2bb75ed7914c836d902dd2be89840948d82abbaea23952cd648e6191ce5b6cf912cad0a3165410a781e3650b676e5340980eee3b484008acce6a3e9dc5aa96d775677b8bbb8b323c6e9747d6069a169ea904d9f145e29d134cdbb0118647e8fbae638669efb9a55d50ed33568749f5304ece2193b0bfa6fc9a570d209ef61b4c59a2b5485b5aa6ab47d902cf23f7ff71c5210476e0aa727a01809b9f76b6ebcf58a018b3fbbe5f42976111ba58112b1d322f9312da068cdb86277bfcde66cb3607e3ea02a1494439aa56f302671f1f994eb3ab28b937043f5f7f3b3de50673ecea5dee8ba633c45089b852f0d772892525344ede6b521dcad15807b65e7ba348d891d47fc498cf4d50223d2794c64db9fa9b9766edb430be0c38746ab317b38ba9870a6d1fdabb70fcf89790bfe449b97fe01f6c94502aa0889f0a3bb6bdc65f44d1cd64ab88d4a7806b373f5080f9cf60183cf4686694f0059e2bbc5cf21ba0c3e8046e70d815f1444c3094cc29632c429f20aa06b49b0b52c6c7aeb8e34f7bcb53e93c2cfe2d704a5d0416876742c90762730d160e1869d5e0178dc366098ebaf2cae6f1f7563b555a52dcc194a5c8f718d50d27ee76fcce8e8991f4921fae85ea9476e1eab1364403120698b7ce8fd0a49cf79213f360a17cf1950f104494fad80adcc3bb1207bf250d57dcdce6ac8082a312959672361363cc227310b66ee8c04aab7b5cb33a81c0915e9c770a1cfaae2e8f44a0c65703927977a22fe58aef2f366b8be9a50da9376b46ae7562a82391386831febf359039ac326891bc58c0f2c34bdb6858859fc3cb4e392df65cbe2ec4f02c8425bcbdd1ee2562ab7d229d406d79a9c6fe4889c996c2f68d1fb5bbe3a5e867caa4249b934afd3ec71fdb088c54b15252f9dc1b909e121dbdc7d8a16cc00836652dd1f877ce363eed11467966f7ccb8f1a8d48146e69e04ad76a51937ad4f9cda209451eeca90dbdbd65441ce20fabfc8ce400fb4de136154b87a8b65c92740e9bb91d78521b261f806a2c6279c85ef6ac5fe1ea3117ff7c9f9832fc2aa6fab660082eb22344c1a3befe0628b6551f62a5014cd6194c42b8d475a50f2c9fb58c97e43ebb29005ed7fe54f0a4aa10074f1154152a9067d364dd7863fa082976a00db55b26b5ba0ea40eff48b90",
- "f5ff810a41d4b34751e9942970d4c9f26b33f24689a4b1e4449b243490afc485af468ff01a42376b2bcb949b9f5e8d0b917f511a",
- "a74271c184a82cb074c14b131fd91eb05870cb7c73c9e511ec8140bfe2f34089",
- "2403fe689e239c2ed261b381",
- "af9be893d5fd23aab42e6a2e59a8e7cb13d4f543db02af87cb0802bc1af7c717cd0093cc8244994cf21189146922b69927ffd5745e57118bea07a6afe7c21d952c13ab636b3c2e461dc9ffb3ae701175360156338be94b1fa7115799831019455cfaf5114010fe45f8fb9c77ec50fe06f2c5a32423edccb3b2210ee1200a78e1a3130c567542377827586ca8cf0c14c19fa1449a2cce9c039bb441b04e9c0a3f9a743b31c828032174fcdb7c894349aa68f5adf97dfe9294d24e6b5fed95eb994397883f58487bf5c57b0aea5268be7cee9efeab370f89805ebe5373ab2e93658fc078955ccf68b554dd5605005751ee8531c35ca5336a5d0ce273370c0dc9307779b86e96d2d1daf2620d67d43e1fb7800ccf250ca3c02eb74047c1d2a2bc7f29fff8320301694b80d0fd975f834337d00d5f0e4215044d52aa4ca21e6a9d7e03f186d7cdd5c48e3765dc926fb0a46bb0f05c50d9f69c9c507527a60366b7dc251aae1d6bb0d9c73735dcfab959f6fd4382fe2a1f6ad07affb0601bb9040f81b55a48f6a6c5f8ac4a2acc2b0c9a6c439198f7926460695fa11e0b0b017e39de5cf0d5d5f84d972b5eee7b5d1e0343b5485cd84b92ad892e5b23f3e803f5b363f2398c11c15be9f13e59922b0d49902dc8483fb142850b4226da2fb84e9b434a34f6bb67f575a9e57fde3354bc3077a876e260311bb2481bb139aa9af55df5074749fe532d7b8a554218a90cc7e7ac69db280bae5d55a174dfc8d325b9909a8da1016d4e162fe5ba70cf8726cdf291f5e47083d9929cd5e32021cbfd982fd0975f6f9baf4322b553cb3174b11c007559879f308419ff9e4e18eee8d3640cec8aea082b90f69cf3c7676c28af0265c24c91cd58a06513198892ce6ce1ab3ee9ac0a2e937b973a9cac06a039a54f8d994c13d42c59187f677352e5feb32a417aebec4d852b2595e7e67450e06dbd183279e3b63022a3813b37257b085bf8454d6890875a2950d20210a8df4f9da746722f62687e92f0e9efc3e5d526d65ccfbcc042fcac7964dbe147932c73924bdcdf62f9eae58d29e8567ffed90048bcf0566b952e986efeae4c477944af18bd243c3eccf8d88c06d07279adad037450cb8547a8aa0a74223f4851747c803cb21a2dd027e7080aed75038cdcecbc4639d87763cdd41829a1b72cedf0d722b180d0d492a5740ea7607b95f3201df352fb1ab28149124d2df5d5ec106867897b537302c3431402348f94d28eebc701ae1b49d10adedea38f1654fbc48885e59e6e6dfd413c6b5a97d8c35dfb07a6cdefe317bf61cf91",
- },
- {
- "4aba5a776ace38b6e2578f0007e770d264e39c49f588ca3547ad2888365e3a811994f8836330394587c8458eb0b6611499fd5d8e8527c3cdd4ec550b4a8f8c632384e786b420cb3be911c999c72aad60270aefad31b27a069ecf11e95e9d4c81213308d554d3103de4d9d6ab04830c2b8dfbd8bead52c44c21d5357f72810193b5096809dc7846c1521c6c569f78812c735aea21acaf6dce84a24df7234e8ad857f3e1346b27f5bd436113e2da950e4deff96e9ba8db692c7db723a105ae795da15b910c8286cac6e7dda8c172b70f61b07dfd58596684d61da8772356f180f74c1103ce97cd947eab3d401df44f7fa4cc7cfc25e280fc002873237e64a375b0b4797f4b4613c9f150090f44588ee8250ae44aec6546ec8dba0f0c1eb281cf66fa4eb141617b32b28441f6ddcfdf02d9c34cc62893b2b64dc2c26b74433adb3e888c7fea07b19c8cf39269c2716b9c35b7625d4a141397d6d5034b193d2657c6b2d6b0ba874c467adeaf3d501ad985d13be21c4ff6b326cbb671e4f4973bba49116a0399b6491394f850e4122969e4644c00b442b3da0d6a4bf25ee22d182b3f822fd83878ebcc713cb183651a67ca66677ea81b58b685a3a8e385d5fbb0147ddfecb558d881c914324c794db443b31bc15c361912bbbcba9e418f99f2a416d190cb29684df27c7f3ff6ccf339800efbdc4514ee00d1a89f12373804db4fd66c1affd467f251e73147b3248033327b0f7790fd7861a51773dd4f78b89e4e24b94df9203f4a077091bb9411eec78dfe3e1dfbb67ea1cdf17e1d6936bbb75b74055495449e9cb52f5749404610cd444fea3f0568e0d35a5ef0c395ab7bf0208044b5c4e2517911a9c351efd31f33220972287253fbccb1eb8f46960a36b68a7a6b4f5cbdc86d668bbf555fde8881e7faa9594da425ff8fb54526bf7cdc4af64899530561c06bed7fc04c5d48cd4542779e901bc48fab79d4d13850ad8247f51b9afa7d5a656ada25b6376d837cb0fa1b4016dfcfc158a39290f43f133b352ed52fab2f951509bacb41284fbdd849d8185fb7e7200f8ab2a07ef2b3b927e18e568dbeeba2c7a66e08cebdc6a6069ebe6656a586652f3905ae2bb867529af6a827b494c97b3a378408f44aaefbe86c613e11e7a44020a9ee4b62569dfc4c462300daec7b1424ff1c1849ca1332367470475c14877cbe76c820cc651c18ab3f18852b93994f93b568dc7f7b0eb5f07ffc4c9384c851fa9071c6f68ddea1ccf627f889c0471c76aff9f52b07ab1b86a7671a2b2f6b25c0ddebb66ac95737bf7e2f493f7665b5265eaa5166556cecfdd3062802724ec24f3978b903d0f0c24e1f0b8d967142bccfed0d354279223f4c28684e9ab611e9ef89a3f25993b5a8b3c0354931780501651236a78b58e7d7814f251b053605f4c0a8e7193b9cc1ee5cf7378e6f3c8fd44ec57bd91e62b09fb1d6bab60cbfabcc6792e6a32ea7918a9ec9180d05a7e1546d5d2d8bbfde2a71b4e427c0a4d28d0b6473ae",
- "921a401db90935c60edda8624a0590d5c46eff3522e35de2872f6f9394e24126fd8143b68a797c995624fba0298b75eef974",
- "6a4d35ae03bf277f587da4541dcddf92bbd906dff45d5ff23c0f60ae53b062be",
- "231b5780fedfb06d724450b3",
- "ba40968282d98849b19d867f8b564ea5a81d657516099362926bca4cb6e9ae02719d10c8061f53008c727a0eeea5e1e36c9e55c117e9434e213316c96840231a1e356b254a9981d4a6ca3c66cfc61018bcaade1a4486506559e6aa3a86bac980d391d835fd5ded98d10f1394d84bf1bbf2cd3397890d704154802f7864ecc753db782fd3d19213ae65ace4770e1bacf32d61c6730aa5adcab4d7e2e437888c11c29abba4890a17a00f67a53b660becd94092df0598df5ac57326f6860593a519e28bd4a39f6481e1a4748881fd5f0456a3cd9f28d1d1e78dc64030cbd8fdb2c5abdab3f13d6ccccd187e71e989f8c486929efcdbf2a763effa95af62db5cef95e9081b818275c69267022fda4b7fdb8c650b491a785b03d4d0186625962b6326ec3f4e176373da4dc1f83a14815adf82c6bffa7c6967d77528d0249754bb4d17656bc4a89449b16152a4a1aea7eb0054a8892f271138971507d2f3b237ba5b620f444544e4a8c2b1ab4f9168762c27478c9f776c47ee2e9ff05bfa35ed127f0cabe7cc053640bb8aa01f8359b74bf89ef43ca94c48fcd201eae39d1835957eeccd6b3a852f4e1bbfef9a469f42c764481ff8408fe5871afeeae7676b58f4202199aad50a596626dff97c8e60d750cc59da9f595ce12ce9afdce14481cb1e39994de8fe4cce07845110d6703dc59d34734e93e9e57e1c52d61f44143a2d290220a4bad5098d098ee65ea4b6757d8a9bf5485aa3d697a7826d4a285186f5da10eff707566c23c6a15033365bcb498c44487c72d96402d1834753fdbf86770239761f03e0dc8963766441da99c0813e4f1df5a1d018c8799861a396562eb24ce305ca15f4022d83ea3c56b68d9a7ceac4742ec0ce50f4d36273df26005ec2b051fa071b319be2d8a5ed26eb75bc1ea83761b8454db234d15d84d6706cd178981c1f156e6d28f774aee3e9a4fade022e71b52b50aa532b8bc7fe464f22d6eb169c69671875d614e987658820c2f584a4fea3008afdcbb646dba3d69020fbf503f121be3480344db23efdda0d255aa058c3ff66abd3a5fe35db977521608bba7eddae72ae801f4fbb12a1de4133039e046ceb8db87e465e5ede1d79a08c857d59076d7ff858942c31e15cbbdae6fc15c3f9545a0825d6ff8583c0aba8a7d143d27b93f6caefb98c0d83bd8715abcab2a49087f55a9daf9090eacdf45be08ad80b5df5070e1719f68c4cc8f8711083f0f7823a09ec092f22df95fe9e95114fdf82a3f6eed0bfc9c0aa65222609442776154a474dbc9e662cd5dce66846572e52417ee5d7eb59287d07ef60a9537fe1f85c7fa74fe84dea0da235ac7574335e6649b54a6bd33397df4bf4a7976c4ab868aa702766d2bc8d2c82c2d1c2653fc8428b8d1e61852ac185a3a0b416dbcf8eb54c44967ff43c44f2b32c6d4a9dbf2c2f3a587b430aef50f0375cdb4c1b319ac9aca486d9bb321141b065f52f7b6decaf1985531ca7bbc3772a561eb1efb8a6297075920bc432131a5b211bf25e35fa31e12833bc77a9de14c7",
- },
- {
- "6c0056937faf1023032df1e2bfacbbc58bb022eba25ffa020d4eb26f0caf0678af5d0b2f0c1b520f4843f107f0adcc7b5dee66ff4d61025bafb4cabb64d133132e3e423a599549a1d83aa8c8e774444462aa44b00b460bbafad5755ea6a872d4e6b40e3f4957e0229288ea79fc2ebe5fd9020fe4481a9f42ef14a196bd136aa3c779e311d0c333624c1ddc484c9aa7259cb609e4d0a826c0bdc7567adac01da23900b30ac4e66c100348584fe200747eb67e6287268947e3509d5d2b5d7bcd977b80a13f660d4f6956a8b938a82db75eab19e5d2a22cb5f3c9131e278eebbe096b5f49d16c983ac240f3fbe821b247cccb2c9e6e59546122677f49f56a07fed56647a6d3e0e09520d49009f54250c10e7c607cd5b4ddf81b5c4110c6490e9baf56418236211856f5a85feaebafacf92c0c7501c052f9dbae3beb7484f90f334f50b68571cedc67763b5161ebfd5a1709cf18c92112a4cf4d8f43d1895204d8a2ba5e14883a7bff75cc6060cabb77d38a909daca2417befd1bfc05a11c432b47f90c807ca4306400f67a0d92218adaca84a584a8bd4395c93f9b6a4bde9583c79204444634a8473b1244cd33cf980e443d82ecfac672b3f60e2e41ecb3c5a445d9e88c0e90c339a31806e6d79ee52bdc6808c73e8b7b24899966664d3c1a9305f31f0483e24e36fa451dc1d3f2eda05af6678971e2bdfb7c1461c9407c5c466f6b5af34d992a37de3809a22ae75275ddba0f4f9cbd4b18c1acd212192e587889a36bd73c860f0abe08bcd8f00f5ecdb95e1d560b586eccf530df0e5f3776d8dae2a01768bf1226b7ceffa7ce4e75879c82dd97db3c64c06d33cebc6b35854618355d80e46fa79c3e9743fce5b974723c421a077e7ec7dba286881dbc1d53d442a1552700fcb33f83f73c69a0a0ebdcf2f5d461649c4d0712c514ded268a31509f83c1ae4ff4a68e676d29727be641aa4487c08d4b90ff78e24c6508d69759751a1a23690ec9f8763621e8b107295b4bb01bd9fcacd8748e24d996fa70ef6f8b0992f4185bec8e920d7643159f9f604fba394b6611bff435998b2f097a9e948430899c8c752a1e83a061983f00f88ebb32da214399167932a1a83c1b47d09f77593b03cf6521520583ea4483e2d33e14ad60584676d1791779b532c085d238df0d3bae735d0078e0eabd63cc90a2e13d023983780afc8f83b1c14437937c16a1b7c41414c48cf4ae49587ad9fa5b16fc949a749e96032248c4667f58e295f999590dae1d99a2cbe3fa45bcf4a1d3f0356d64d40367f64b2c5cca843e5f7dd7b88a85d52328a00622e6c317879607bc036c9006d38652ffe21c83207c00f8348a7d0aaea5aab4c89077df170de6d41052641726eb6925cd85a9ee01a9e636346340e209ea96d17b0eb0921b96662ce9cb430fb6ac348331dd7133875769bbbba99dc49333950e4145a15ddb0789c4d2ccd38878080ca9e57ddc6cd5452790eec45482f8e990392e319609391fce0beba19463a9a00d8f1de9fbf22f23821de7d69fdfbf3019ed61aff79acfc5a6ba663a1e10da2b9ff7149aea43bd6c61a543008402309df0924de72c1cacd2d6120cf422e61fc1de345cc8771934d8be77d9437a09e06a9b2d51c849fd9a200fa714328d34f36b684f33df6968b827df916a599a4bc3367814fec21198e2213ff653cd2a463892966c72ffd42a26b3bb91",
- "0d55dcd08b54e58916f622f81761ef6a2e19b167ac47d3",
- "e42e1d6d44138f3d2bf12c951f454686f18d590fd30057405b5a3dc2b317fa97",
- "1e46a7486c5a03fd6758d938",
- "fd3c1fac10cc82e49235fd57f5aea0ee7a7bd6d539b138d4b3fb623aee591615c1a61228ef9673113a3a90a3687a12d4c6367d5f7bc67d422fdc4106455084d79c2c42c5e86368dd164bcbce7925bfffe7d96c13a2f49aac8e9d1ada3554e3fdc21aab00455a0f33b0c1fdea91b3588e7ad301bfccf9940027332fbdf966463491f7a33c093e0a13831ea9d2183294f89f414cf7b5876af04fa68d594430194429df74fa5915394427259e832bc545c13400aef6cf16620d48280798a6e49773c9316d79fa1dc758e54cde2e2cdb856092d83f4e9b698385cb976fd6cc2538abe055273a5b34a784182ea5e7d3ac9019a05de5e5afe4308a7ed2d363cd50ed6a52df1c616e4a82f607ced768445d13ae4884f2ae1f9fd8313924e8a1a8a23905c92eb231f638dfa6f4cb27bbb9844e05afbbe2ca4d1a3b3a5b371bf33c9ab6f82a7387d61cf8bf662097624145a983839b0cb9f4bd07556800b4054fb3d0bac94f44bcc9b4ac49c39f5571fac4e02ff09f08b3ed5add4bf8bba934e9feb773c0590b45c45fa036382f3fe9782ad19107d4630321e414b7b442b64f18fdd5219039e5740f34b3ce8925d1afe8a39e35ce8db086060bab63b9720700499f82db19a62897c6d845389461260303f9cf2bc7235a898b4620c2191ef05604a5c8c783d58009533a86b27c12b0772635d34ac53993ccf174c9087073e5e69b26c0c3d9f768507ac4d4e2af847b65e3a6e1b7a6dafb0aefc190871cdae6c60f0b1d6137c351d4cb211870791cf4cb8af2ea446f6401eb9ec8a5bcebccce898d1dfb13454df6b35b81ed6d7637e6e261e004080c60944f3a08e8e5fc7e2e4939e7c2607c8cf07d1d10883ba3ad43e2611826f245df571857ae0a7a867df9659f2082c19f94ce400132e48c7f8de2b102c7f83ba5cd1e785597a0ba0d73bb81bba0c00300d4bcd6ec25fb73105a46122873bfa729c0979d8d314ab7ea52391aabab513dbfd1cf01c2990c0a3612f4511c2bcf0f5a07e659a881a7f99c3f1fc4a46e66904427fe26a4a80a904c047d090c861a075c0ae4e29bfbc18b9620aaa42237f4c6fa76ee7491ee638ab5f1cf0b440759828e1ec519679efc776eb1468999a00f667e87199ad6891e98b95fb682e02517b024a6bb803ed23c944010cb7bad0733eccc12d6ab6030c6e88d510ce92e2f98fdcfaa1e37e41fbfb4e99589c0e8efbefd40473db42b3a73b57b22a2f8c9bdaab16831f1b117dd83a77dd01ee8d0c2e92203adb670f4fd65e618823ad196220d70e014c1aafd8863797c61c16382c2600062683ed3a180c70891717c52da15191b02f25d1715ebf33a5e6037092421989c942082f4b836423cc3e976c9bcda185de36f06265dfc250a27d2de0bc48c73b3bff704f3b386f962522f572108458bdb283c6ab3fd33b3ac13a406268fd5d97e17db9c0f780b4b2a8f761d15a4d8b3a0cd73357ecf4d26a6492ee069f19325823ef50bcb2f73326719a57b67eeef506fe8915a1b1ba1a637592268257b91e9c7c5d33cdd947967efc1952005d82ccef9a3ad7ef8ffbb6b658983d64c51242ba53f8f8963245b87a25aa9324c527e53f8c11d55f30aab598401589acd13f090541b3b057b162190f27910718b02a6b8ddbb8ca6cf40bf0d2848f4b76341bd5e78f476862bcdbe2d1bac84c0566fb45b21388221ecd8483d99fe603646b1a9f38a49230cf4dbe5d7883d73eece01bf",
- },
- {
- "04892b94c65685f2eba438322b29bf8439938590d3e0eb10a29e279d356cb439f6dfcdbc3552af21f7e753221012a649a52bda780bc589ae63b04b981dffd113df9fcf14f17e35e865880a769bb1bf40dc99b9e85e4296c1f2e1590fe02b22bfcaf2d4bb7009a4d692ae4c2d5f0b6d3ca526240368bac55b9b1e6a7b498d3b137f0fcfef1873c5aa2111d7811d45bdc26be1c5d49b8a2f36a999b1f226ec06a5fbd59514485abe696c96ea89dba74b4688101a239b495944e30b3609f73caff3114407599ec5c30a5bad933655de7dddef97018ae15acec46504cd5d417c5052c057ac5f1c6f69781cfdae71db2b4fcac35054a4aa22681027356d68b2bdba721466d130d53ba8f23857631382b2de450232e9ad5551bd7c872ae439e79eabfb057d2bdab8d4ccf02b3003ade2e1f3e514dc92692e4fe5b579c9ee6067995b6c168647ce5a13be8543c23326a3260bb7029d2030ec05e565ced3c5366d20a283a6e95201fd108640d2b96676df712de20e4e12fa53f85f22cb24583844fabcebe40eece11e7221f12c88670bf994ed08e2000236f86258c386b0fccbaab8b68ec6a26fe41491d540193c4c12d1391ab3391de9317f41f505f1f1d09ca9862a6f289a533d2b297d4465c956360371ea3c8ed36e0d1563120654e3a2fd69cd6c9267bfcf92e84cd64e162c84199d6e552b42c33857264b5d7a2e007797cde32934a3f8c68b459cd95bc85e7466ccc9910e8dca65b315c32e43c3a5da908904c42cfc8ab74126919ceeef1054bbdae6ca67b02f1ac5f24808b5eee24577e609a3e3935a24b9ebc1a8dad1fc96abe26012928f2d5782755f3763427dda28867d0b1ad830d3c3f17b9ec278346e5a9480ed23ad44a523a4dd86e65a610ee0de1afab64ace7a3b4918fdc14c6b1ce0ec0903994da9bcf18643d7e0a4e6c08200bb394a89b385d2cb829417eeb0f7dab9fa7306a330f82973cf0917b5ca99b585d2ff0e8584e050077467f5245ecfdd5942e4fc72dc26e5ab2ffc61f996167e68168cee9a6d3ea1e1a696060465e35da8c75a1aa380004faffcb0a992c627fbdcb4e97721271802cdaf08d214ec2fbcb389d75709d7a6b9d35662661c8961f93d4a705e7188613f3769114c55400809cadf60d3b6068c8a5ceef078785171b59be1140c6a754ba1de5ced349df63d67d59d3a8ca3c716ffb506772d57e9e3f2caf7fe346c4ad64aa6c37e43b9bbaa8f58e51bfbac31fa6137728f8e5b728025697e5ad5c8301f6ff39eb2ad595d3cb24257adee88a84fbf1ade4d7550cd9ab94bf48e1424ae83184c35c5a5920157d45805c2e0ad129fc7f0ec3c41b9d6fa04cb8918ef379b0783d1cc2863cd80382585fa05320ca4f9fd90353e490b384ed6c166c6f802cd7bd39aa43667246e8da96992db7537d472c709b01114e95febaac5b1a3c77e1e9a18c2d180e63f0d8fa89f6a1ed63e909e4741af5c2a0e47d4d3f8779b7696358f58060f3f461cceeebb390c92779d30bfdedf1b08ed62dcc05a545bd0ea915f42976e81dd8a50cc4689d8d8007508bf53e7da5bd43c3894968cf0677681c6b818353af6bf8ac205139add1310e5d363ccadbfa0eaf735808325e7f9a6aeb1bee3ebb4a27576a88811859c216b6f84371c43d8063a0d87bd326eb6d81c6896ff534ba2c9c14a51d2cfedf33a5c787279bb4a7ff65706b389756a6191d2f791254233ee047d40d64c2dca878a42f903fd4382f39a89a723fe11848fe37b2008be53f7c2d037981d6462a4eea49df1a2e074957afd3c9dfb4d218a309cab395afe301ccf",
- "67b5eccb1790babc2dab5e0d1ff3871c3024177d45a2ae",
- "259603e1c3af3fd0ce3257eb627b02e0c0a48ea2f175de3d8c36570a445e5369",
- "e14de73c4b17581a7e0d0649",
- "33522e67ef932da5fa8abe628b51f3abd5049951dbc982ea95b7769652d4830c588fa45e3fcff094c8602b9008d7b2f9bf6c1c4a8cfb515401c7c44a7ec42ccb967722a710199e121a41160b1ec581507e9bd2e2e506b10c4b5a8d6977435aa08e27504957cd49e756e1574c4ccbbdde937de35128b7ee3455d2e665c596c2e97c253c94e405f85eb5de84874c099b4a97eb8f492d28f2e4bc64b228dd5984e76ca08376d7f1355ba8e0fa60fca96635075417d8b436278e0fb91e3bfc7d61ca8c7407086933c061b2d318f46f352099e1d317d6c44098539d1d2c1b7894db668e7a82ff991864fae236570cc420a4229883f1e2242d05aa07e175bc6abe11cc643cf1786a4456a2de8c066fb1a70fe387f149ffbe8cca7b110e256fd0c09b1d3bd7381cfa82fa700c8db1e79809ccf75ea52d0b349264557046e8703a191ddaace00ccfc513db5e78810eaac0a99d7bb1a5725e722d4e595216a0e12f3a7aab2e623ea9e1dad06169914bcd51b643016fea7dc3f2743b1e65877f1fd5581bee5ef206d86494a587ec8462a170746fcedb2c9f99090674ee687382711b4610ddac599732453dc063518aa36f5b4129098fb9fddc02eb8f8cfc2fdf0d904ef4d6d06014f977b29d0e9aab4044ce9c662a18b1a8db1ceea97854e90704430fe9b1046b221b27ac79054fcc68c3abd6fab7da66e255ff0cbd0506c852e961e619615c944cd9a05c25abb63742f5da7bd9939feb0f2f2208c8ce82f551a9d4d70e935dad018e3e4e6998e39670221601c3e34716ba75eb4e2fdf53c4d471c444330514986de45cf44d77f793c17e36a271fc65e6bf08943aef4c66547dc310c7a430e3fe7a54898de48f69f282f52bbdc4daabdb325cec7ab66fce1aea4e2fd932dc1a316c821f5220ea437447feae2fa478adade7cd515a27d8c132d0299b3ca1bc8516c9d9e7c65c38c238c69f03e104eb42a29cacc8d79b808ea6fb233a5056201e3697f81a2d49ccd8b8efd1ab0fd407c16a210767d1d3ca798ee53a4bbf1ce5090d321b1a64fc2c5f013c23829f5b0d2737936ca71595a1d02711c8a7b0e74654e5d76376ae26977dd49c68e3c0a7b36e047d44be42d732c31f681bd7b1b4b339f004ecd847960377acd005debfab13d0fb88355025877630aff753a7cfddf6851e8bcc8ec37b8f9149830f47e6b601098b2ba19a4c0808e31e8927b2525cb82bfddc9b4bcba2b46bbe768ee278fb89010243d16f9679f5ba4f13cfe76b5beb16c7b28daf99b0873098115c2233ee3402ac0f6c899a2cfcc83b2ccc06676999ad48017c4ace507080a26501993327ebdcbd1e2eaaaa99f4998b716cd9e36eb26b4573a03fd1d18047198fdf675ef4f979864ac85d230a011c69d8b6c45e9efbdc2a03f195c9731b4cefa60208ba845c0978e73d082bf6d6a513b93dc805a4f5973f4158f60a200167ca88704a15ac5ab1f38ed455a426f7c6a96b6bfea2ebc1ae1247cfe5ff29ee81bdbcb53b03b89568bae9a6f311d2b20e31c2d91bd18fd93a37be266d0de8015d52e325f78356dea0b77cc76f28e0f06e4ec705d1328340013a77b0b6196f44b7712fff4ae0ac7f6afab9456a95012b7c6d387285487476d189977e28f6c9d1a3f736320d61302c2d627d5a7ac8cde4988056b55eeba27efe7e640f94c115762ad5849423ae138c76f15b47bd2a2bde2c492489b7980aaf1c4e32a155f858d7be4fcd0f8a18e7b5d97c5a08d7885d6d56222ef49542c7f80498a14a8eed1c092543aac3439966d5b5d0cb9e602f4fd795c09d652b64f9ab67e38f48c88d18e30a9774f37e9c77b7a94cc7310d",
- },
- {
- "4ab8068988d4bbe0bf1e5bc2fe1c668cbe58019c958dd2ec97164aea7f3f41c9f747527f1c0e5fdb2cbb9d2ad704b6955cb731f14403dddb1a28c5996707635e4eb5dd6ac33d46eff8e319cfe7cf6443869534ca9812a5b23a6b4ca172afffc064dc2b28197117115431e03c00447f87d9b45172c6f724006270a1d41fa094847cbfac9630c3a785f488c1f5cc407ca6f4cd18bac43cba26ad5bfaccfb8f50784efc0e7fc0b504b43dc5a90a0525b0faf3c8b4b7046fdeb1cad87ec667ce3eb6cb4c358b01393f3ffee949030ef9fd01c1b2b9c5219777eb6ff5b1d7c3ef8d8e3bc2193dfb597cf942c5fc50befa527fac0b44cda2bbb811b06ae87459750295371cd232754e2bb7132807d1225950ce64949b0650531800bd0074177677acad937ee008cc0bbfdf33c6b0552000238494be8be412a3e5cfa359e619d092c76310a76bdcb22abbe6f16b3b116b5f95001d20e42fc3c9ff6723e580f378475788eec265a1ed2087de8cc2eff72184f73fa5dc6e68a56dcfc85350bccb97135386d5b827c2d9aea065708f5c921454d1b9303f21d5adf19e00415acbd86d1e5e42d78505b033a515a435713649c50702f54623cbf31469f355c3be2e30dd8c72b4127764451d79e952ea1f9bb0269da56dc07060d5d9542a9c1258ccefe53fa3f7b6073cd38026256b45c01b6c5dc0d91e3139f30a8d1da7a076738f5bb23352693a8e3cbbb46226fa22416680013f9e3278913d06aee4a62457357f0a68d173a360af5e1411840e34c574b4c6b352f92ce33632911ad8b6710d357b7607ee19679e777baffb8ae3c0fe9786b2e97fdeccb5105ecfe81441f549bc6b50ab84b749fb33f8f6bddcb6bb733d6d5dbc4b29725b8741439b8239e53fa435ea29ed3324202b1bdd07d1987b0e06d8cb51013dad897ef02401290940ce3f2af72c5d1b4c8836299008c10b16c7e3e119e41ec66d9db6929ee09bdeaeda08a50665c052edf77b7dff3d8815046bf71d5015e3bdb29a4f507aeb2e28c536cdcc9b8d1e89849a0683d78f99dbfa90f94aa5dc08587657a8f042d718080de5d4a973f232f78c387b63c7143fc2a4380c491414a18b6c4a7bae2194b62e798ad7ec7d09e409425f6d0973accb17e4d860f8ec0283584cff076d93bd9b0c4873f9c57cddcebe3c3bc8afe793c6cb6b26c4582847b07446b7e1d9757de6bdf0df826cbc502bf88cf3a773866d3ff293034abc4afa3091b2126a278f50e47f2f66ebebb616e342098ab690f7f5828bf8cc4742c677d378893e9f188e8397bee983a9a0998de2a31798330f8db59a8581e1c847589bc0e2d95ffa68e39226cc15cf6cae5c4f5174e7848375391dfabafec202565ec2383721339f04c5c5d1da953d88f18cda65745ee8e99805e35203a6545a0416923b38c5db3c8aa00d64354bed27d7c78c4b257534bd7a18107ebe64d8c27b6afdb330d8efba79fd1fae480cd51fd3626bf8d79fb651b7c6cf752aa737a5123558420d48fc86451b358d270aacfa6c17f343b7a9956e6f64e4990c1b3f1e5097605edf5ce4247819b19f245e9a90758dd42c36699ba5cd7f3ed99a7df7eb155749f4b42d192c47cacb6b2865fb9ef2cfca283865cd06e40cdf7f89d76a9e2eb393e2e0ac0e2776da929f3f8e3d325d075a966d289c51347bd0bd523a5c81edef63ce9b72f5114c88b08b16edbd73f518096240a5b37421843173be8df4ac7c587a17ca6f2916f7d9a10dc75f81bc778a1eb730d12b51555cc414eab9c066113a7edba9a7f1a18092ae47f12f0368ba211feaf34a3b48a7ff5c91b81cf7c95675a4001c95a19d284fe4197fe8823909a123fcec5e45935da12416be1bdf14918414ad19b54a41052f5b8417ddbd207ee01d6a3e62fd9b0321b1c13d91d6ce15ea7b2ea0c670a5f5cb290ca8e62c26c6499104ab8e9fafb05170ede246bbf7313625d1fc9576f1609ffd08852a2f4b73c04f1f4eeecefe3f3eeb2185a618b6dd3e87d9d3fdcb349cc83c21f26b6c662bbb857aa95378e991640a160a23cce76153c134508c68ec54a5",
- "0d471079ad3c3432b6de852ec71692d12d9df4f984554d458a9dd1f28a2697976da8111ae4454c9a23d1c8eae75bbc14f8b00e7c065bc290f8938282b91a1a26c22b40a6708c40945d087e45633a595beb67d8f1c29a81",
- "f3dac58738ce057d3140d68d2b3e651c00ff9dbb2ca0f913be50219dd36f23c6",
- "bb2d033de71d570ddf824e85",
- "238c4e6be84bfb151557327095c88f6dc2889bce2d6f0329e0c42a5cd7554ab16c8b5a4db26eab30f519c24766b1085e11d40823053ca77adfe2af387b4dcde12bc38502229510606ff086265f45b1087375dc4a022eb0b641101c74ad566ab6f230133b7aa61861aa8202b67beddc30dda506691a42032357010d45adc7ee633b536a2fefb3b2143837bb46db04f66a6e2bc628d6041b3d306ff78e96205ab66847036efa1fb6e6a387cf8d5a105738be7163df9da0db48e3d8fd6a786f0f887968e180ad6888e110fb3d7919c42a7f8c92491d795c813f30ea645fafcddf877f5035f133f864fd0ba1415b3d698f2349ebe03d9e76610355e7fc23221c5c72b1b2628a40b14badf93288fc4abeaff5306d274f21938650ab236a39496d3f8a6e9086eac058e365d4335b51eafac813f9175bb7bebb75605909ec3fde6515694e119f7b6e96aa1d6d6454c3a7dddeacc83bf0c1f5f6c2a9dd2f460f3e5b074a33b8d7904e6988ae43a22a87f0933f812e45c4c518bf83e606bad4c3c55422ab2207e9d3cfcbc5819049f55e35b9663273d9d3a6f8a897fa38b0dca77eb6c344290cc007b68d913187f2cd480a40262623a4e95d90d5701ac2b9d858d70a27f0672f919c2ded1fb89134ac9a8ba6ac62931c832372abb70e811dc50cce264ece65e87338231f18ac007c5f68f3b1c5904ffbb2e1dc361d53914917770d66afe28c547d8cd5896d892cbdadc34cd6af348c93bdb8b072f38b085361e62ded7a38b4368824c759ec7d2cf4caddb9191e5deedc8b8388bc4ba2c0672321bcda3a7343c9ea71ef03750912f35624d81da5fa8a6ee676c4efd99d0c7258b844ded7b35d8c8233a316b508d79c7c0b3edabad5db9543615179b1c111bfd78b79327ac5b4155336d670baa592d441c810cb1b7c07f3d35473a45b57e780b7d997782aeecfc0363976fb608d6967844ed00b63ba75996054d090aeb605c195b1ff86f9d9ab5892d27632cbb59c06b3ccd69d33ed5dea9398f00b7c6404fcfe2fcb5924e4cb75cbcae0a1b084ea8b15eaa5847431e9ab70e4afe15b4c82239f6165e243e3b76d6c91d23b16edecad8bcb16898641f8e323671452034a8ec9b42b29cec0db210bad0444f1c5bf3505cc41d514d5a270d556f0a34333bd06cd6509ba253a6ba7a6db8f1a60c99f0c3d566a038a72f1271a178cc3ff890b0df1e7438c0c1a12d9873643e2d7bfeb92379545de50834abe2a345faf7ca49beeab87ee516dd8598b71196b8cdb15e7200cb5bd814338babd74c565faaf33d9a8ed4209b417345a1ae611880ea22ab2e894d5d14a28fe3835d3b2718125f0e6daabd85327455646290ceab89e579ed5e1d72a0172e4a6d8da70290b5022c941f3866f96cc4218de5d2622d13af6dab15760a1ec5d10918267f9585284058aba611ba07b1d5711cef505869831699bedc2b190fe1d578814065c91d87a8c8dc9b0d4dae0c80cd241f0bda3a6d5e714c894b7a48b1e5eed4555f103eb03c9db30efcb855df422d7451a6d70f28174c7ebff536dd2cd2891f6c3f264d632ca924c4e0d84b37cf8e06e6f2e29efac6cf008cc27f062441278dbc9f09cf44987e0e9ca088a48437b0b89efb9cf00d3d0c5fb449fd4b64e21dc48cf300c2d80a502cb583219f1881e78e647783d91dd2f3b389a1594eefd8ea07d4786f983d13e33cf7a34e4c9a0ec4b791f1666a4eef4e63bde7a241f49b5cf615888bd8130743bc8a6d502bfc73ab64d1184ead9a611832b7e24483a1a0fc475d9ff6166b86a18a3dc96910ff182cf326456c4461ce8acb3467f801890eaf1ce0b24791da9c650876e718c0bf43c475174f9712dd4a228695e8f8b2b23fc4a06358b4a6a8e1afa87a0280c3e098f218f7a6d6bd716f8c105a7eb799ba0220837fa5a96c8a22a826a6f7ea9d7216a24acbc7b0133210cc17c8190507badb421bc54997ff9340cdc1ee415126ac46a4fec9fee12d40f06300f7e397b228250f36d6f0d2ddad5fe1898ea690e4c7cc3a116a70bfaf6d2dc996753fffae40ba5280b8356b7ab4ffbc914ec74eaa070581fdd1d9e5aa2",
- },
- {
- "4d81b652fee892d575bd13dad913d976cf0517c819d5183a72eba995b1f27efe743451721ce34791a15a6b7a6e44f13d4a080563dd1d9d4f0946e5ba3863b9ac970a1fb4ed66458ec1b1092ff5fa6c3f0271a2df8e3f2e97851352be760b6a0e1589c202f00791b1b89ae0ae944ced96bd90754bcfa3e355b735132d407d3b5507fd57f705e8a8bd82886b16d459ac91e921dcb8c5bf0d7cf420a9349ee589a5e2e19ce7c944a54ccc1062a0690f3152300d0bf5cd1871c1391bf6d7007f7ce26018ca2a5c6f76287fd8c8e9e7f93b1806460dd35f7f95989a8b6f9a0aeb7c6b0346955fb50b8735e34f1ecb4859e34ea0f022ff6fb797094206a34cf120b7f4664c531c57da513b296f0671c8e9bf68d9e1674998fe52da04f627f516dee97c2b3c988216e9bd3f58c3b021ac70898651f1cfeaef21c4f417ebe92dcad3aaf50f4277262c356584f816a5a5862f2bd720fac10f1b86033371ed603bc00a30cf4da8f579dd5bfdd571a37af7d2a5cef29f9001bb1605ee87f24ec3b259f381a69b771f78d21c4e43bfc83a916e08830d9885c8ae8ab6367c05f92e5eecaf0488262300f83f4e3bff177590857e149216995bc52311fb9f16f4cd74e07c7868a39b699bdbb7d7dace4c6a53ca7ee6e11741a63a52a1d96995a6dd752356dec6f14761ccfe38a6cd8511204f8f0630a747d6e19a77bb030c61e0828436604a28a7acf4a5e49b7269ac93b93b99e9e2e1c0c47b377f7e44e05ec6659526afbdcd5bb172404ce5a9f8786234114c16f20cda6d4359eb873a4a4d9fdf734e9c40aa4db3ea9a98939210f6c62142dd144eb78191116d194bb766ea96da38321ae27fcdcc196560ac75567297984fabe6072c771899906350f74de6d18518eb6898b934b11e945d94ead02b821fd6682602e03e9c70a1ec67eed33874eb24dc83dd1035fba5928f8f62ba1282907aa8935ae72fcb881b3277ee6bebda8fc75d6cd792677c25f70c87b11e094298b2d5f39904be211ff0980e5b83e8ea4a455622d8be9efdb5aa8466c88ea861407d54d98112faa10293af5e16974861dc9f83b45d21b112cc367894c421f5049e49dd205bd7c15e6a70bc810704e2e3a3659800864912527f8be743acdc474a26246a81fc2bdf669b9be7a2a0c986432e1e44b5675607e7e1ee2a8dcb72d8f1964272926e52f909ede0ac8daa32d1d850158db76b959e4d83c9da4e3bb23fd1f5b26463045d6cf13d187fe74a50c09a654d52d0e2f01d66b9f8b4f4aaf4c69fa62a02aa876f9bc4871aacd26a6c6ccfb9bea09cafbd0268b5b65d60aa23ff504d02fad4719698f8b044ca1bb037ea6af58a06a448080dfdbe6a5d698d5db9da5fb4aed04a46c8fa8b93153bca00a5bf8aab64d2b371d072db2ddb688a9442e948f0b99236828dc115a2fddfa2a29e2d4e02ff0173cf734efd4eb687e3f8712be82abe1fac4be0c1eddda090803fbdce41bccfb58c43038991ba1074b281a09bac5eba58a99a1a9678ba26f8f9e3c63ba095f02cd8f3b56aadc5de60477efbf3dcb54b854f651cc72042bf19268554c61b44f2f338a75de56c3c45b3ba40a697f5f21c4557380c777bcc91a151e5676c2a59606200bd476cf98d20b4cdc64bc3b8670810a014871be018bc32fe239e287cfe8a7cbcd1e8b55e08692ccfb4ef871cf797bc0b1fd7ec37931e35b6bc5d32bbe7ae77b9962c179f96436e4a32f566298d2235acf921e38c3f1942fb7674b65e222d17b95a2e58f072c63aa4bba1ce48c303f4bd24d84963f18c5e670015c52342dcdc9c0b348c7dfac721b568effe2bf2f2e816ca3279bbbed823beede8e12fc5bdccd0f1584deb1f6ea1875e9fb350919b675ccde0178bb83a4aa5232bd5e8e9a1b8daf905c6197367a0d106532297ef89f3bc690b48224592c768bd9c50a63d0881370d475081aef052b444744b33fd3fef674a37898fc950f887ed482d2a51ae615ef5b1dfa3a23257e6a6a319a4e2080b2c4094bb09e4b390d1fcbefc4d6c5dab620f8b05b1bd5d976300b007e2b8120ef8a6c9028b7d925c795058c6bdb6711fc5fc2476b9810d1d81bd24637537716edd3b7068b802c531531df710d3682f9865530e1ed51b3b56d860ba4e972bbc74662cdd1e2ea24f81bf469193afc02b14143a32e9556e3f2ecef97c65",
- "2538d98b64b6aa9258f9141840a5abef66d6037a10356366a3a294719c10d6c148b04cac66f63ebff052d730f8821f5e5822d869573bcffbdd636c7973433abbf38767597da5186df8ef9df071bc4ecade2633366102313e659db8d8e0f293d379fa2df79f456497",
- "a5049b0aa153e282457555bf6f82b60fc81aa6fd1c2ea3db031478ffb74b5b5d",
- "350287a6bed5709dfba3d35c",
- "849670914f5fe318eb01e8849e536374ec11e813acdbbe6a5e82a506f6aef4f916a3a7fb2e41db3adf990175e21f2386d1805af9bbc32a6ac156b13b1a9505958f68599019c4b7297314229c467114754277b10e9f49a4d12837ef24184629c8902ebe2a23f740dc826b01f8963d47100bf617b314835e436104eb207fa9a1079b8feba06d9369b9aa8222d38d87096b73678bc5db9a1add59394530e678b6ec93a80efc6e8320f2909e3e891306d69b016ade0d30cde64c2c903b401f9d01a29b5cb8619dc68ad6c21900b365a6b657f7d9ca4c145fe598a94eeea741e20a9329996b17aba5d7115c93623f2f5d6927068d0f190b49eb885429d771bbbb3980e9293e4d664a71c3cb629d869dc97e58fc3d328331b11df19a38d61e1705ec4c3d779168abe049e9d675337ff658e00d2d610c8f227d1341d1c41f1c01d8b5d83c4b1b30ae4318da9822f46402ee8cd5cfe9f3f22d90a5ec2d0aaa0baa85e10f5295cc6005c5a0887287b0c867a23da1a4c2196f91fe0bd4f0db1ab324c26fe6088d7583f3cd052b7f6fca38e8b21f98fd07fe78b7657da1f586f1fbd3d2b4079e20f21dccc0d269d53a29deb7c7fb63cc291d1d2c50ff163e08ce612310d3bd622f2416e193078ce4e1463f8a3490578af96ca98e665468281f1af9117a2ed23367df19b570885de9d6594f09aaba4090bdd1079720b08d54311793c97bbe14433b031c865b059cb4f75db74779b82c4f83eb4bd829c62eab995027b548063d7cab7d1a6f9642da6cf7181c0ac71594b97fc2c84b1768f81eb287091f63c76623c61e7ba90c922c74d46b9ae5d8094d9752bc1e8020a82601c356a201e0473d540053c707a88f4baad37826152dd245c4cee6b0019583c61e4327fdf6bdcae53584cdba8a503b835bfb5df9d649705fcc1f09376eec96c3da1e105accc1cbc21d90f527041a9beb85f8cbb1ee8db798838bb45374b741618f83b5d0801a3af2f640abdbe74ec3dc15d6711b4c1480aa8d6084defba82ed221ba359c9744705c4feee0955c27ef468cbb816694516f73fb541e0ad4ccf99ec8b67ef090505d1f7c4c3a8ed7e291c820261f12d92bbc6609da6c275349819848c9112826674f243acb9a29ab73f17c8f8af12c7437c11972c824f00db7ad284e51b9b508a925f0664bb259b4443d56463bffc9e5d845c9b9f79b24c1f457088fadd281f48238866e0b92d6253638eb188bbaa8bf6a81d2b1087904974752697cffb00b4ba05e5b7b842a3d2c0a743e4bd691625788fbe9df14600643b1d161bb2916176b6ee40aee38dbb594ec2735d41369ed3a0c6dd9073f1eb51d1b77eb9a967b53670a8ed755f3b2b73a6cb50a9e1ea7549346646dbe4b801c8aa642779d8761b6c2d2e1a9995e758ab92f07c4eb4a23c042171a4b354f434ced5f6d9ccd26cd6c2506e5023dc076ced15566fdabc7364f4a8594cd6ec404e1a9470f52a83052390e4f7789ade9179b069d9f84ca2c7ac9eea51035db817845aded7405bee90cbe92364c8c7cf8a366cbebd7a972438f2a9881395a8610a2cd0c06c46b60cdae5b1f473f4fd6ec48479cf35101656f05485198a470cd36af22838e7ba3e28863cd8ba7bbba7e3c2625c1106a6be44c9e3d9b9938679b26f0713c62c3757a2dc8b2d9eed5e652220a7711cd220bc91a9afd7c940dd8be71616ebb8b2cb0686dfa161c6ef56994a3cafaec5e79bd0a2531fd1c1a42771acb101a38988bcba51ad85bffcd8c67aebec5b37d526b29f7b9d31388e1e7ad7154f8e65516f0d80a30b88c2b868be2541d19ea1d2bcbadd30e2fbb1b4678bfef7f200e0f8309ac0701000c52ebbcd6fa00cb85c8d3ea9c5aceeb3adcf3773cfb3bfc9ac764d031d7c63ab888e9b03eb9fa74554dab4719d426d0875a508c8c86b22cabfeeb70b0f1461db4e5f639d2a2d28a089dbcc48e3f34394ff1acb887b89f75d3236c8143bb9b06273c3878744340ea1858a9f383f8bbdc259250e23a3c3992bf8b7ca7e1a66913547710402bb538a8866772d11cf4214060ed091d403e1c9ca3af75859259f88656a1cfecfdb49d57c193e60a2223627c681a2fbc7390140aeddc19df035a5207adde4f5736bc542bfdc943ae8b094f4a8701618688fadc2284fb423f602c41ad8ee11e5d9fdfa67fb7dc7d4dce7847d4875b3af667168ebb6082f6911c95",
- },
- {
- "67f0494a728fbfc84e2f4a043e121ee40f3b12b31616c78e157ed970db28674318b08d8b3f4c538d7b9d91b9b0b09ebfebb07201c6398fdbb8684c9390b3d6a8636333a3b086302b24c2e5d47283935d33065efa3fedd5f755218be5d4618d38c5c1db75470ba06bcd853f3f08d39c3cd9fa3618e70b103c2d9b2101fcaf39c1701436b720d723ed5c622d6535c9a10ec4d727abe237e80fd20911ceb84a90285fc6e07f9d036cfa65995f9b6300a927d7d0d2b907bac9d9c4daa87c2438a583fe85029c886f96ed08f5886bf53292cc0265850a1f4ee3e3288b604dc305d0c28ad35e1242f4ff4ae988b6deba48aabcad2fc6cd7eaab0a63510f3f915c4bb9f9719b1d90db123f639d9d4f3227eafcfad769c2b204dd2555dc54e738909122022c4f92f751d25aef6f9a1187750e825c68450e6d1223c2fe88aa27194b492b6788be6eda80b9b9f053cb77c8d9fa15324f23af5147624fc00c66e947b004bf38b31e1343c7cd341b98abe462a5f994e51d343664968624a2ed0dea9d0299d5c5a7e9097fa63d8b3ed96f917f693654766a9adb01110fa3fe0d8e9b102860d5c049df3fe00ccb2ed62ab05583e6aa0a5134d55245d4f643e274def29d3fc86d79979d599458786a8338b0071f6a01609ee6b2e4bba9289e2df780bb27491890d0b5ea650e62df819b8f98aae99a1b8870ce6d3c7785ca957d5b4094946925751f0fda1d62a9aefe3937a912c1b49b4272f87eea7e397feb84c0702929959e38a568460811e5064b1caf5dee53f920c6e19fb16fc9214b5de1cb770b510533f66d8a0e7f6f04ba8ba41869f8018abee31a6042d3919e217359988eaa9db2a10b3caf7aaba43527484d81304f0bef22165f74e9e1031b545ca3d2f74195984cc237b76ddbec85142a06446902339b1883000264031db85fb19b46f320ef3fe316f750f2d3d6070dec5b66ee8ef20701f20965f5171e44c8a99bcbca7afbbd81e30e74c6d48bc4b0d72baf562da6581fafbe14b6cc597f75e53b305036ede219ec56d0c0d29571a9c110ffeeb747fe56f6030dc26c8d3841b868a1ef56840932dad9f3bd7f75573086571f4d9f0d949510a2577d2f8fbed7e850c73ed4c071bf9a656d09dab43a610b49aeaa57333f67d586d4f50683dceee4942db9549f68eef4c5f8df8a2330857cdf2fc4025f2be7d5f0dcdc74a9cb593de91282787b716d416a3ccb8d6d40fa3c70be4ecfda26a5caf3724fad3d98db16ab6d8f26defc68392923b69664b0c2d56f01a549284b042bbd43c8faec940187f190aec08d06f9a62ab03c9f610f64c0010a0939451d5502511dfd3da1fec5a38f64640c7b6db2961def257eee9a3eff944828e9557deba68bd8e42dc7a9c1570e35537993061fa0f5351fd3cf4ec36386ec4cdc5a2882d5f16703b900c5000efa63888d69982e5ecd3e329c8cf5f003e23ce03c55631246ca15ffcadb0fc9d5634252ccda812ba7bf5e343c44244026512062a68374ed4d8add0855dcc22b30148e0cef0f2886be76bafabadf3ae1205b43c6deb8a41c338114895dd6b49deb329ada31b350e02a1bdad4eb05b61b50f9d22fa2863bd607406f552713e302467ddc78213d584b4933202438d63f99d011b97297f5589f35b7e45ccbd76f02453b7a7668c2b1a1f5d1d63eb805c8881771faaf67433eacfb22f9b6fa58b93f9423a5fcf667aeec39751ae17ad36992556431bca77059a29353598dac12bd3036633d2ccadc18f44123e5bc074f4e5ca380095af062fd83b647015259be929011cfbcdc9bc5d0dcf9b688f0f5d74da95746f447a9e1cb5028ccb2827b45129d04cf6990953a6d8ee0e67fe6bdbd8004f4744cae5607fe7ec4a0f14fe603dcead3367b6870d8e751cf57387d04b881f92cce9772d695f19b36e2db2cf6a807c9ee83225f5c09a11b50e99855921a4eced8e631af7c234aa31615c00ccdd7c6ac5ae8fba6e29cc233765a891864c7d73dae08ed1a3c27cd423d8d4efb550597afee8356c12018f496637daec83575f5e38ed2fdbafabafd38483c239d31cb4d104e93d16eacc6050033a3c86929be4ca8914a538bf540b43d7ce7daaea317bee1ab80504846554879f900d312bf2fbb406a0edc5f4f809cbc68675b0b7f09fd1a8a4d52c0929b3a8b9c1dae4b3d599b976867e6a7e8736450dabf5c49c949544386a71419324ea4ce5c4319899ca510f50d07ace57b013655b0929f79dbf3cd629ad17bdd10109b7c53a4f5f04a16e5471e823c898362df43f57ebdd1627b33fd4cafca6cc065d9140acf0454d5f99be47bc87e0f3b4d4320bbf0f21e7c261bb8d5d615963beeaa46bdbe9b83a8277813ffe6132b23564bef5",
- "74dfdc364097c39ef91c01b707a522e28edb1c11529d5050ff820234e6c0295aa00591e09d547e9671804d7825705ab44b76c59d1315ed1297ef477db070d85076693013bdafa92e2ff6a654660008b176cd4e8ae23b9c792be3f7db54cf2bca385bddf50a8624397cca8ee3cb96944164e3cb461e68",
- "b3b5ccd7ef49a27d2c6d13c0ae77a37abec2e27e0b2d3530cdbb7f36792a7d2c",
- "c0494bb7249f864f69beab46",
- "ed8d6e964bcde1df68e7f362243073941fd68ac77929c8e480c89f519f748b3dc337b1af6231632c975167a8425b174b42c2c60dfc0ec85a0a212bf5c9aada818a83f9664c8712d96de1036b5e5d8c8298786b753638de3a8da958549f16eb9c723355cdf7b999aac464ec39df7d6c1607e81b88b63043d1c847dab618f1b19336911b4b0145c2a694e61db71e021282006d48e37f10f3b6314dd012a07618228532c28ca84a936e0eff83723d117b2f2db857d14af5bbd5948a0e53018b31e57cc2a81f36aa013a844990753ccb347fe98fab294cbd252a8b8f7246276275d2780511fd3cb7baa2fd1548184f968c422230f7ad73ae9dde91295f79f6b799e7d234dfd6573fee6d6ae748b0a8cd7ed4862ebd957390826f276c2afb01fbb4b64b61a1bfc138508efd630e77580867bdc1e96a48a694cf0db6c2a11f05dd0bc8769e7200bb0749f5798b6f3559de55d0c281eb5df22b731fbbc109da9c68f209b888e61240c4c0ca006d105c0a7f43144021547d3316e5a99f6c429f9ea2f17d77dc68bc9d5125b6260f79bc8b3b8061972e6757d87b6544f21645c0b4debe5224f7c48142c09f35b8e144c0c1e6521f04c170519ff744d61abd59a56d25a26c5ed5972191b25e78e2140f3ce68fe17be9e59a79f6c69619a79b83614c670c7736d19c27fd22515fb5b896a6418cc0b4850e85c07b38b995cffafd9f69763cbbcfa9d1bbea6868244a66a5cc82e815fae09f5775d28437634926d571c2b0d200855e09cbdc67d10f85bd4cc334ded4c83aeea57f8e373a950f135997666b653e8de47a3bc0059525720045996bff500a47baeec97808fe971d7693dfde339e8beca3598fbc053121536c30d0af10f8f5d8e5eeaaaa9586d7abb563fd69e88351f93bcc46520f6d97c1a49ba9f8f6a25cdcfc11b2a722910aabe7435ac8f0dcda9f824fdde80850f21a2d4bcbfd2e9fcbd14dec05c117a9796db49e2f0dc55e74c7f0f615bd049fa7d0bfcf197dcda3ef3de90762e6f6f9f8a8936bd04fcf2a97cf18ecc8f2f118ffbf02b67f252097e4289d02f264161f6f90f79e1e1ef8414b01a9e1a77b88c039ad6eda6df1e28fcfe9370f0d574aa9e857dcebb19eb7ce8af9b19b4481c9fb3e1f0db3b02af483f737ce3ea824b2165e7c0fca8585383d4b0a16eab2c7e3ee5c038f939a97bc8e1c093cc5372ee45d81836c988f3ab3e6ee0e5f9549e4b7bc381a2afac2074cf75ed56b0e757e7966cb253d549fb0902da98294c6dd4de3c2e166b7e45098d2729b1393deb68471d4d3218dea3dfd0183b654ae4092a79357945eea4b28cfd06b40d30d1b4b8f19827895f6f908f0fe511f74ec84cbab2483ca4bdfc6ef50178eabad79b18b58529c9328c13c52c2869858cc20ec36ef7717e1c743d13f9607bbdb0b701d9df6aca7366814e883d23e51ee5b0f20ef70e2c4134ab037d213315fddc89009260981329a1872e541767adbd5ee9501e7df4ef0cdfae9769961f8716ee7dfbab0ec89b3f62e987387d5842e124a69b07245d359052ada50cfd67472d27ce2c4eacb5421b62dd7331da54ebf0989803797f4c8c781d0e2e6477b421c7d5cefc8146aacc0012af3f1f7cd71ce2b1045d86bf48c9a13fe469a1865294e160b4975023d0eb24ed26837afefc250a914f86f8b1f5d67d65e9737e841519148d4dd5dbf2b5a8b073861288ec9793d4b113d71c01727f67d791852fc3946dc912d60fc66bffccf4c45d859eed9f0bfc7f89086df5d5cd830ac919aa7cdb4504018052d67f6a3ca012ed69187cd5fbe91875cfade381bff1e804ba59cd59f0f75cb46dcfba234ab9832c3fb9aa8dde19fc1fb30677ac1793a38d94aefd9ffcd4e777e9e4f6d49e0cdac6c16a36bc2f3ed8e23b80350e3be6d866aaafbc8cbf7c69fe44c2aa80651164803150c23ebe262aa669c77ca94d215895d2ee9c3e325a0bf2c61e419a41e0f7b1ba8ee0508307d49301abccd5b74c054b6c7bd1aa67cffeafee033761d8226d9dbd7214b130a867764062cf4da685deefa23693b8549d5ef5e53df85c19bfb3c43c6bd073e7a836f849587a4747e1a9a3c7194f6d5472d2e3e4c81784a3061fc9bd3b94862c4784974d859134369486f2651f1db94f511c6f59f41da0d75307191602730b88e4e6101fc8d392c87687f3be454dd92fb8ec380715bcd88aadb63717cbce4db91a36821a572c363759d8d0a2ab007e5981b78731dfdea20d900b14f0c5ee6a4a9b532ed2134e6edb4dc267f001cb88dbe43aac4aad453b839d035697df7de98ca7a9ee7601228a79004b89796e9ab971aeb8e62c789bb21f38b77b492c57db402bf6a42ad0cee169e9251d865ea3e5f79b1801ef1e53797aa6c7060d6f9486081",
- },
- {
- "04cf92a64cbe135f7fc1d7223b95e41d13f04b482018039f4e7ccacba8aa15ac79a752c5666524e527fb076290ec80a3dccbebfce3ee9b316a65fd130f12bf88b9124d1f7772049e6d0c01fef881a1d44c8dd02f7b6b60e6d15df9e06fb86929cab64842284de09659e19451623525aec2f5dd3e603e24319b1d120bd57b34a0317ce25ac9c2f022a4847306b998b57c8d92baeed0de1f6cfb3177d0acab70de275238f1152813b9ac87bf651f74e1ad079b9bd779ba4374ecba459865b5768d08ae7e1dd691d6821895e8380ac9e5116580e8de3a2c5326e698bf4c4d35d955e45772bae8483d01de2539e8ee1ef9539ee132d80d85fff41dbe406af319c0d7703292587bcf5959f49241e2b03a364e1b682729ed261d0ae45d74d77634afe667413ee210983b042a7ce6dbb61c29d18450fa7176177b5a74f032ea24e1d08b220f6d32a7a836d1241cacda39d6acbd26a62f9dbeaaf7329a291dbf0aed4a2cfcb85ea360947585b1215feaf70ba71eb2d6bb7081b2a21bdcbfdae6ad2513a9dd714d3d06c2c2b7e322a1db2d48f9df1fb44fa066f2bb42b196295ebb3c0898ad55d5b317986afaba0bd5e754cec773821613e908ce2bba6454181f9020b73e758df18c255c87df675cc6bb2b8d2eada44196ac10c26674167f94a79f4be515d8d6a1fd3228dc9a85a355b030845dd4c5f481d5b6e74acc66de730629581b022fbcff61e5dcfb6a7f511aafd577849a6b057021ecbaee53986159c1ba74c3e930c34a159f467f1e9799cd6c1151067c56769e43308c96c8edef8aa7634d909310dba9af2128cdb8c29b24d3ec2a4f43a1ed86d1791c9a670b240e6e719f01827aaa319bd3ff53959a776886a1b7c942a54f141e6bae8576d294e44333e6c5ad90f74863f69bf890126016b318e0f6bd2f0adb9bb861118af5f6cd28dc93d56c8a1dd080b8c810ca29267d410673fe367dd9d1353ae2bf2fd88d57b4202c21aa49f12a01b93acbe260492367bc219d3afb6e6f35502f6529bcbcdddce9fe8632efb034a9eaff8b4a48afb105d04e3fcbbcae010ddd6636992213750b12fb3e01ab72aa957136e0bae591bfb5e0fe819cac82a98ae8df230af399160594540640c6b1d537e7b5f1cc47b08127ae02c35b846de56c4c08773fa18d4436e14b76a7fc4bdee301d0af4880306f2f33328ab79f6f24ec779b2b1928704f09bbc5b0b7108e9a115e4959df79c80eacfb98649a0788867e23b2974b22e654ddab0494bc922ecdf17727d0f0efde9dea7601857d890bfbacbd93f7df794bbc254f50e1e17eaed2f5d5a2e6c58083aff68434730d406fb9fd02b0dd7bfb99a04aea812b6830fe5e05a044ca21c77a174bae8b58eefa11ecfcc1c977bc6218064c9931b5c92f13cfd05799f11e130869c293c1b08dd29c899365014fc8195514b286c97cb6dc4b8633e47751f87fbaba137b6aa04d072ae06c2b2f34448449f60b1272c1efbd4722a2be749a3d2e5450aabef1f7c51bd8324607668a8caf8097c2f358b1b09fd3525d47ec9a7640eb20ffdc17c4f7eff63df75dc7830c471ace3a727feb11533d6e9a2a08106af33069cf482ec63724032e81cab18e12cb5c4c3ddc374e2f75bcc99fc5da09b80a738852a14e8ac552b8471c6ad52e35317b730db2c13c277e06c643e0d0fbea43833de4d2c7a9247ff040e9c56f1ff7ea92049c5341c4d1478a14275a10119d934e8165152b89951bca7ee1399dd8232fdcbf831d8354640e698b68799d060ceb877201b2fb96cec514affeb28721e163e1648164b9e5722271db9b0ee1a7f96819fa1b1590e9daa598d9571ffa3882db9d034056e9b2785a8d13686eba61d7d45cf2e9ecdbc391739ce89297211472be18b21401658c5bf29fc3615924382d802a166d05dafe7876e70a0d081e80c63632da379766928a0555eb5e7a238cfa4da267527c66caf34dd40055f2801b29b3f5604a5bf3d46048bfbec2e24abd2fed2481698a4b5cd71f5d2c12dd473b903c9bdb978eaff7d76fb69951005681ed7b0257054eb3dd6d10097fee51ba7e8d565925e4091cbb78d255c9d3ab4ac0264d172c9bcb0908db1288c9634248f198a1167daa323822058decd83936985f83b08b1e7b942756a7af200af168fb8a091107b4443fd649cdc22106f9b9657c69f19be485c23b2c715b3762c332eccc44f380883357d10019f20612ab6b8f155c2af9e2ec340e5d8f45bf5278ac1fbc9f9f44d2f615d21007d822b244b1c7a0dbc182c7f5912485d6e4d74e90f60a2f964e028c63d49c6aadbf1df170e4914ca514139ba538207b1cf7caaceed4db8423dd1086b2adf15f6c0e50dcf2e12898f53c339a745316904ae03c38b417bcd7f5cd5ea77a4f06e65d56c24f37ebe72d271ac79b6ddd2bb8bd67f0727ead49737aa71af4f620da53769ca3ae878adbaea5a249128074ca3ddbbbaf5a68f9cde2a0e8d69708b0ea7f4c8d2dd4180882bdaacccf2a409a681c551776bd10439fb12b7548342532b371c0e045d8e8c895929464bdd4fe25f0533c66104daaaffed52446094978bcbb389c",
- "001084c8a5175c0ad43108f9215c35886c82321c800740c6118a3fcd45776a4588ee0e2d056a37d99b40d2bd9c0845088a77240b7e65d18fef105d3488c77910b5873dbbf275948db5",
- "d614d2e671066e387f7eee07bca9f9313d86e6a4d1371360900d670e11ecf1e7",
- "674a516f8f59f9067e0485e3",
- "1ee376e9e3c89b2147bcf75480ff0dec1d0e8cd45ba812f34c84124871d484b4ca87bfc8cf99f85ad452c482933801426e2737a97468809fa36caebebe8eed07a626b3bc3614ef1ceb54f9221ecb16f413f0bd9ed4b3010c40632f05223484af7bf5948c2fb8a3d2ce04c53e3f2682494f3969a0f8eb738cf93c0141799c9e6b68924433f0326991e19626bb19e6fbb5dd46baf39f92e830f9b1ff465a007f031891fb1f1799cc122d3ae7a55624356b5297bd5d948d9ff2e414cd8adf00a53524df43f398938d33c93b2c06bcde2679566c0a7b0177b4a873f35874739d550712d5cfe3d25c19292ba97c01d84224738bb25546e5c252fe5e5f260ca881aaf176a271a6fca2edbb2cf23ae6d4c56c20daadadb8205c2e33881867cd67ae6e59132edccc3601f014b744ff8eb6aef5e09b358607695d3af42ab8fa30e9fdf99ce54427ba9da3699de19f7a8f9be368df47ff0607601a91e7a5fa6e72be50bb32b825427cdeda3972a18a23af290986cde14f5fb9cbddad336f5efcd2d7a0cf3d5b23e54b702352fd5ee52d7e3479441497d56e17d5868574c56cfc421ee47bb00e9c75b84262a1b9e2cbfcccfed9c4c386ef0d2c1be9a7b7556909b5d72a38b7258acdd624de2396c75386e077c34f005f92a2203c82d1072c8998f03b1df22de832ac733977705453b1d72336b8d371cf1ed3923f462ecd22075de5df68c83ab1e6648ede7fd5ee5794a744abcb32af73bcb182cf97d36f37c15535c4107b7c8f2321f9fe0e2b6ccbe74204df3d748c05bc1e0e2c55ae1aee2d4aa4a52e98ca7229d6d06576196ac8e4b14a9ce807075cdc876aaf904c9962741efa8c6caf41e6b87b2ecd6636e2e58f3ecf576e5d8b895162545e618960ff6e336ff17eacd5a1eb335001633fa78c41ed05466d904ef9b81b643a043298c0e291a085e4e67da72e329adfccc407f800709865147db49cbdf4232073b7bc7ad89b3dd901d927ee08ae6497e0f2f9d052ca8d7444d2e2ae2197f930a7b1c8af38d8739ad298464169823684612cb628c484f710cf9c552551b6837b575a43275100bf800b7a3d777adc44d07f67cee5000422b9049dcfbedfccded0f2aa4d189621579b01e3fdaedc4d772dcc593316ca85e7aa248d219dac21c561d318a4936ac0d3bd5c75311486c174e0e2182affdf69bdd6a086534e4a602efba2b9363beeb5346539b45336cbaf479da6b15b226a9ac026482216dedb84ae3443b306820d9f05f78dca7090d727c7481d82c6e5df80e189e24e46f5758e453e542bd91a58eb51a89e07c50afb543c6b998704432e863dc4c0d0236e0672835a7b0b64e14f5ced2904e54da4287597f920bb4d542c35d3b0271cf0eec055656d523d7d2cbd667445d3e8634854f8616b7d7a7f3e14fd32651e9df40e1daedfdff1371f16d5549ed5646adf2d417e4b3a4d145bbe0974ab388c2716861a08296b862e4fd035163281457877eff89dadb160eb2b780414435784804bf4fd36602699d8c2f6a8cbcb509198c38e2df2edaae7bd7c93313ca98a9c2d24419a12ce35b0b3d68c18840e3ff8739d70969927c7db9a6569787bdedf5c99948a9e79b2302a83a71159f4c789b3b3f05f1e574f8a24c899ae3457f8e73f9bd86976fbddd83b1af337eb8da4c0dbac3792921597e18a2fd3a0ac89a270794529d370d36bb6dc7452e754e903781cbf57c8646b92d5d02842e7df229b3d721f9b981f9d61a48f00e53948a5dbc4f739849609d94aba3e3f5f8163d40321576cb8eb8e89953b608a01184d41aafc13f40c47b12240e3ad49413473c26b6843f4514be221c2af632d1a54cba230457f23f00b2608485c381ae03b389ad0a1671fb416de4659cc7f7a9c4b6d9807789c307d061fcf613b96a2d79e5e3e20b863c8b1b75f35c982b40ac8dcb7d2712ef7df94901facef783e8015a9a48574aa6f0cfb0bf6c1a3409028f8d62137c347f5a35ad6a3cd60d71aeb29bae56bb4590f69226fb4e08fab7a9f41e58f4d5784540a70e7a97720c549c8440b089eabd0eb3e4d37a2e54b1160572ce568f4256dd244decec31fec555017ebf488e878945383750eff26a8a1cca73e7d6f52d8cb229d5603360a3bffec23029ee34145c4aade82d486758e0aea9e1b7bf0b4bfbd4fcc96aab66a27fb463b48c6a6c5c5a60253e2fbc5716ef55629277a5f3b89c300e21bf1226241ce0d587fe3f5b11e47f35614169dcfaa375ee1aa589be33a4363765368f5666d155cf72e851d426fa67b982aac4dbbc29356d71deb0715b34e00b9fd8876bbb09ca0701b15615f05cc45e128b3864b26003e6ffe801c4e27402f37b8997e0c29ebc273dc03358cd22fdb68d9cd3b56ff8248a727c2d4ac65acda4d0e0f511bc07ab06cefcf444f1002c151b953d7f7b19695668a86683497c2a2d2e69f19a4997148d2e8d158da859c8f44437d9ce9db92f84a88e89cbffc74c0ef4295088e2543a4f7c6ae9c908bd987bcfd7a074f83ffaf3888bd7f430dc5a5bb70d223c21b1bcd8bff2103408460df864dcc168486f6a66d67ded366c6e10f50bcddada93627cda711764a57ec36035ebc",
- },
- {
- "ce72c93caa49bb9850774149a87fcf8e23a0c53701554468645554553d54190bc6e247712b02097b794bc421ca94afed34742435ca689d2ebef183fb469c060c7f4d7daa508726c9d2eaeb9c7e9a89b30faee8d9168607d4778acfbd27d5caa623475073ce763ca061273cdfc2c692d1747baa8a01b15f783b2e36620400082747599a16cfd6b630fef310c0b9a2912d1d3bb71eec16972745cd8a49cd927014eb0a2abbe0e1ebded4fb9e8d9e2fbabb6a71da5688717ecd3e08160b9a861f86904a41702b2c4fff28ed8cc61d468187b75bde3fcc5c0c0a642215fea83584387fc5a9aaf2f8a91ae535e0027b618a32bd687289c47e9428a1a92649deab825d702b076223b07c08e55c0b60be95937bfd0504c18398e924420f6e20baf07e2b1b858d3e360a461b66517c24e60f9fe314a4a4973c8dbc7e9d2a9f571a1d8235a21073d81ab9f4800b70a5f17f44d593e8792a2507e6a3a41042fb2a5f7e5f028ed2daa88cce28973ecd88bd125d50fad77b1fde61c38272057d9c65fbfc6789ce41315a105af14e277a0c39d75c34aed7538c39160eab1c8c47818743e8111229426c399c5e88c4d894fdaff0315ec885ea019bf9acb785f3380c37201d494a60b583fc130bc0eb9fbe9b90eff95874e35910dc05c761f8006e2f208b786aeb2eeee841f9a82d9966c82956c181caa4dada81dfa2e2d7a25007c2dc7f2dc7ad1bafef14581cadbee4d614a557df4931b9ca105bade8fdfdefc0d96eeda11c08500b1ca827ca670ba07bb0f85af92914c43a6f71226d6e112d487f1ae99b2239a63ee2cd0849d8a9c488a11f82ca334604a2b7260f25373c6db75656527890f9b772c6bfbb9f687f27099ea9d4d1efd874a6ff83cc36c039ed1690408f20394692ff054d9e6eccc6776b6f4b3c5f24b0052334d159f40b470a9b8799bbc0df4dbfe59a5e536624cad193160ef23abef85df2c9b6e6d4fdf16f848a2a446a77044f1162a278866c491982570cbc16041908cdd0efa2cde011526a3c96d4b39a23c5fcc53d8232869cb4dea871f4ac8afc795aeb1b28cb2d7a3669100a1cab2ee1a7f31e2a25a5c6da836e4b771ad57393305faf582adcd26045e26b618d9943358c615fb206258c8993d700adac7440dcd3ef34fdcb065e10e9c9727662b5abee160aa01d2f2ca6c203a76fb01bb08cee9fc1eb6bc7497bb012ed2774a2d263b9dd03d60c307ccf33233ee33eee702c8e3118f9f86174a97462d0e804a24bbd7f4f938c7f105bb23399967288069e1637b60f2f1883d88ce5a874ea4bc0a7ca0f3b568e4bb1407e4bd6f0d3dc8fe91345f8435d7b1be961c45e4b0f1ef2d92d2d30bb78e1fbf72cd2e7ffae76e8c2bce005195c2003bde46108f37ffacdac28fd67a0de62970b347f0ae3f5f3a5b1d3aacb2fcaceecaf2ff4a2aeef6f5a176cc1b74b234f5658ce603bc353e075278a4056540e43033d37a6eb2615453d8206f5cd294423811283bcd5d79c4afe268a547b98977ed5cf24c0f53a0533bc0b2889356cacb67e2f7353060f9e04362859b1c1f02f96bf5457b58e5ce84a6810d39d7c7f53faaec64db5d6ebb90c1412bdd503ec6bc240c277ce1f5f18876feb24eb6a77e5193e33ce141e8720329add079dc9735f0a35d7d85436f1dba6dcff9147777760b5aa2ec9c8b5e9fb4fc602ec8f754c99ab2372ff5963dbff3fda91865108e606b214cf7acab875197e78060eed52a798751998ce7c73cebc4d5f429f6729a5193d7593072d0921ac8127ba6e796107ee7b9fbcf7128ab35fe9f6fe501fa4695c19fd64460685f287acacf5250efc13899bcf80ad5a340d432a0b9449affda5c8fa090f008e01873aae7d5fbc7972451542c5c29cf9cfdf23db736c8a7112536b1b626caa63f3e4117044cdeab612fff8d8c194d19174f56ce761f6587349c48fab30390f231d209461ee7e18007d10d83ea5aacf199f3b00003259747b1d03274d3c3670595604bb4482d345ffe31d3e88c70da16649a2677bfbdbf618de1d651a53d573aada2eee5c01335ce5519a6d18a70f7ff0b1e66bacc162c49f7f29b9d3fe2c7dd85b6b355c9f9141f02baf08d2be87c36f6d2e1b2e90dfcd100886e306b360df0ecb146a6aa5ac5ad05b63a219ea65885894a386248254348ada17908d776f9b438306ad28b208f80d6b9b265500aead945134b9d388ed5d6205edf07c5d8bbfe0916d0943750150e09c76359d24e3317517ea489fd8a501dd93f159f07d19d00e86d952fbdba2db771910143df346b30a30fba908a1abe5349c3f241958f428dece7ad9a91cb42035c43573b87b26c2ab216cb4c21799f6b3d81acd300ff50edd6fe7868b9ba6c160db3418565ada027b46b63e5d4f3411284fde585ed3673b424ec1cdea678e4a43c262991c3c9b988351d6e0a10af1c959cf21b7a288f2e4d7b3b2c11b400b5e036df71fa993b72ce48d0d8598fe4ef1ce70a970f89b55cf4f07906a479bc84a08bf6ab25221de37afebbc47ea0b38b87be128737d7d43cc84d336cc6ffe1677bd802910a2084751f30398dd0ed09589b2befd2f3b40fbc013318c822fa2faec2323fcc52b43161f47aefc557e92df3050dc5f8b1c5a4b2f8bd7b2ba7aaca79dcfa362fbe7781a2e261683a4a862d5f83e34845a8fcf8a1aa73cd521e87cbeb71f20b20698cc34bee3b8628b1a3784596c",
- "08b3fbd73d157e79ea9f61665d19867dcb8c1598c1d37b793606936d8aecd992a0d46addeae857d488b83be5d1c1639d4d78350e4cb08782b61bef4107c9d3a79d3d85",
- "a56f38b4bbe83b3d9e562cdf5ef5b30593f08a1a166676c4fb0d5861654e640b",
- "8726dc5cae9497936658f603",
- "88420357d1ad70e7c7bfd55b3cfd4bf06cd4e9b4ed5cba681045199a06985956d35fe86b28b9a4599964930d05d230a23c55a6a152f67082a453fc31f68489df05c553f9ae5cdb3f611445db384d79af865e52440a876fc4153d896b7a2318dbc2a4495ecdbb2e9dc68022326d35289e82aa55197aedc266dd91ba3018c7b474ba22b4e773773f3e9890ea84bc16a6b235e4bb69e785c40c1adc15b0e0ef03aa147b0d14e62341e27398b84a53f72c9199cc1c94cbcad2bd31aa69c96b06d01775b8c0f80278a43f526664bdd430164863c9c9140ad87798a5b8f38dfe90d37f54d1137709d5311136b728e6c799da244294daa4c8b44bfb0acc603a16c088a081129a0d2cff55ce1c4ccb486fa0ecc3098ef2196f47c49f9d253112bd5746fd99df5d2be577617dc2519c0ad04ee49ee1d7be3d50492017108fffc9a414ea227af39fe49fb2c895fcf00d927bf4a2d78c466fd44df4768e6775d39fa5c834b60979ca27ee9f00faf37a090838f56275a894ddadd265a8d2de74265e4d8d286639ce8f01eccd4f551cf6b4429eae3f08902b6ce6ef422cf91ce8946d9403fe8064784895b62a7f5df76ea294132c59da6b9f53d4195c1e9000bec499c14cf8bad460aebb024a76ac50616f0dcda71c0f56dd3239b11764f3ed6ed06c049b2ad673e4beea391dbb854fde1f01b1900858b9809259f3906b34f95a1c6ce8d24fdf0cf7c2ab7bde2202a7f1482baa6e51caaccef9f541c377da620bfbc63955cae0e6644ec8ed6878f704f1dea30d6b50d4291892bad19b0234582d50c6cc0b4165322cff24a9dc2ce1be35be0fdb3bb7abb777ff0b2f4cf16277388af5a89220d59f1f45ee9cc2a0fd7af9aa8e9e8d548fd65be4e47e7f8ef58f7701f93a42e7ff78f70e807fb63513157fcba96ad9731b2e8f80da85ef407d5c368ad16f0657620bfc122ba1b10d7ac2bf46d8133a9c6fec1fe04882f3d5765da8f825e1984a4313f72b67d806ed45c000dd3ddedd524d474b9b5788547d0712e8edb4c6c586d0cdf8f2384f1e093a7f6dffea6e79df9cb9398f5d0b9a7cbd63d489430fbfa397a0d03ef916b7702f33a54ebab84a7055b7ec6179b0ab7722f03e126ed343b1cdf2af3763df7e3a070162535514b01ad86c6cb051859aba1cc4766b12c8cd57b73fdd3c65af6961c45395aa7b885dd59e115db885f644e1c94bfa26b3804f767601c86e2c7dcecd4daa59955e6a40991a4b4701e63fc82b46dc0ccf59af40a8583171375551c868436ede535705f2e6380c5899cddfcaf9e94314794bab98846cd5ba9e9afbdbe1ea7fec5e22e7b2aae59fa598f4d6c0cc6f936a616e11bf01a2acc891cbfa2bc53c511a8a3a3da2e3aa5907d123ab2a4a3c0009fdb5235a3c33718fe4c504e1539abac6370e06150c402b5fc2f8c32608db4ce2eca9d1e4b96371ee195f6cd632f5b972385f9d5d357b87c78cb4e2c27aa9851534de14de923543f5fd9d55e34d6e8b7e1f3f2735df80046de01f79d0321066f9bbd76299c7386d285f7bf4ac15e033e89a040710c90f87aacc09fb8159f93c8b4860247eef079e32d05707e88aac734a2eadaa853f528d9986e0af3435b5c5f44ddfdab9b0c9ab3eea97676e920f80d1794740067f9b229fb018c804e595aa997533a5e967cb79ee58eea18995a90ac08333f1c69600b17ef4f454f540dbfa8b502457761bc4daa876d9053ae1f55001b6916ce559dc6268d01841255990e56614e6f4ee4ce04472dff0657360d75da4e83a71c852a2585110e53137e91bd89d64d99b5614ab2a5691c876f15d9931b092fc6729c0732db5cc40f966fe440ff99d7d05b24a872f552c27fb0cf2af443340b153214b407fb9ca3750d9c157aa75763b0b7600959663889d00f392d6ebc12835bd2f03ad802a21d0228f1d2e9731d0f0051eb2d5369ab790d1134c38e28d2bc2d5d57d6d897244742c176559961a1e40c84ee5c8225c8d72b92352a011e3785c262aac115cafccc2fe1b5e81a677a0220f207ebadd786b93f58e40eb6ade68ddda5b66c5f0f6b4b95cdb8241156110ba3303beb79acbd54423315768bb43b4fe8c4a465e50c4e63bce272c4d731ea4c797e14b2de31ce4264e2479179b906f67af4a23c56e817abafedc2c7a65aa45f0c89fcd0baba60561a8d013e2d5e0bdf9fbcc1346d3edb20e6e9f9c410982e1ac43039ad8fd0ebd453a6788376951fc20374b59946a6803498929d9fdf2e0f5e58c441329a79d1232e957b3a9ed17231c663b4819dcb6b4e33d205edaeb7d7ec466930bd84a064b40aa67fd76f6ca005408062b45b5aed6f8161836c7160a8c8313dc9aa1c6d42c2c16972a1065e41aea9c58db7916e1670cb42a8b54d85498561b4401761506860b19b446655f8988101fb4c45067e30edc3f00df8d88ee34111dd6626d605d993ff207be09704fd8dc242ce514bae77cecd20f10d4a38435a3f5e545882fdc224586a04ca6a162e118d23716240fa67892b78faf98a17916471f7f121fb9f85497a0b34bf5aaa4ee1ed8a4681bec55d1b4973d4368600115bea70f20a37c9e942b87f6cd1e2ab70fd401e703e3c8334c75fc338508e06d6370779578fbe737a75954b4701bfd92028ec32d3d7ae606caaf9f049d9774f70efa707c1c1174d9fcb5b0a0ae2a961c6f58e48ba82c2db14ebbbdc24288e42879f547b855c86dea9a3b9877e4b105515bd78cc43465",
- },
- {
- "bf7884fab52251e202afd7b5b46aa53f85bca5fb80a009d8016e276579e401385d853312a884f4aa33cc5fe7360426bbc0ccb7416cc0196e2e40d3a825d5e0825a1394029789acca550bb28b10d847d0a4fe1111be2b7fec6b5294902775128288a784203031ea853c9c104c75571d19552e2a1359a900c5fc9455230968a5920f2ab23f5b9cc49739d4e4ae2c01c7812ff295899b954e9729a3bb330b60c51a8a7759e5131d7d4cf261fa1e62c29f91b4341a4fc968e7f30ca2261702eb328d628b7275a9efc29b50bcb9b27e5844328d5e8256c76949d30b6fea0d5a1c9abca80d3251fcf4ec4db0a5ff2ffd43618aa2e3e1694c2a3c579a2665f443ffb1eb0ce33c09d7285687cd55b6ca9918553bfb36a44860e09ffa0604ef4904a034108370195a986fe165c598305eb08599abbb3df31b1d93162397056d9ba5a1ac2812c582aa356310fafb4058abc5f157802e4a9b4bddb16e75b6db105b7dbc838f820539b76949b1648909104efa67ce28b16a738f1be104d2bd142d3ad1b1c953b6020a1f4cbb84d5c49424befbf2e6ac5c593b783a3f4af75477312528fa78dffd82fe493d821e011642bf1135a5be91fef909383953308dcb61b2f35c2ad259acd1a2e953c0ea6a03a97b384e39c94c33d3846c26b4f9f116abe572d5b7cb81886d6adc2d544630fdc1684bfb32972e051b9a2bd0931de63e025813b923944290fe1ebd5264ee4f25569a2088314e8d4ce8b91c7bd602b9d85acc917d60d30d5ef1cbb055b9ff7b0f999b98caea2517d2de334eb436078c90d41e0e34f11b93e3e643389f43b3afdc4f47a7396cbe0b4bf159ff27618cb835aac6699be1fc7ec840b767836a165fb95d06f2cac4fe15b65714ddb8a095ed4a5b57e63d536405931b6c168683763fe07c32aa4130bff787d4d440746a2dbfc584a502d809076b257482abf7f8ead7741c82b54c41acd41581148aeb4149b0c6eeb39ef7ba091c2e8bc72583b2fdf8ce7fad1bc05aefd6db0360c644a9760a9729a88ee4b2ab123d7238c12435b9f3b4660e74c0fd4a9b00aa614453d84fea01f779e5a924f8e79630a8bb6561ae19c7bc8d88b9d823b98285fdd65d4cc05e443944ed5d3cd4f46c7cafd1dd5deaa519772dd24f508bd2d588a832d5689119a2d506ff11dbf37d57a24e35ff38da18af07eaff5775d12dfe795fd3e1f0ec83c5f283d6cd76532519a15a18d93431893b1b88929159bf8fd21f62b30f4e37d540baab0e30ff3349a08d627ac19303fcae8b8e3fe44eceb66d30697c7ea051bf5afdcd8bfc00d49c8d36164ec9194a78a4d8b78826863e93b6a810354861f4a35ec12e5ac102f74e390d9c0227e67acbbe3254e5b892786e3a88a383ea9726485854a319569a678fa70392cee90c9aa83eee8df6800565bb8e083e78a064c0f8b863120efd799ea57d3073663c0d0e7bfb9b717ca1d6372fdf75a77fd9677791cb899fc8033d6d806de1e6aaeef525ea909666316d9d604c1207cbeb6f427c3acc1b02cf59704fc65135703f2a9529bb2c8fec992c4de53e54b029c3f2a5fdbec1008d1a70dce0c11251003ce62af712b9e4abe631902485404e4933f346f1b4467fceb65baf776d0078aae6a2a1f95b85a441b635663c75b485a8a7cb9a5c12192ac874d940e2d9b88cc05a2db9b5b35df769925da508112ab0b8f64a1408633fd0d81810baf2c846b222736bd826c8cf905b2c35633d6013f5565e0a5ec1492e99613f53530799052a0d70023339d1c394fdf9f73a590a2faf68390d2a823bc3e47a173782b03dacbdadaef1e67fb47a7cad71b6067ce5b5e41fc20ea1fed28578e9bdfa99faa657a754488ed3fc084faa7a05b0f6eb66da0a28e9ab26bb319fa4ee993de840948f94dc1d68d926b783a0bd3396a89970b2c2595de8148e87b87c21f664618af4f567115d403715c3d7d2f66d7a90de2c5237893a4c18c20494e3faf94485ed39ecfe972c36acef0d7ee57bf8755924c790ad02dcc5c4e15aa7db53eb6040244c3ebb7874676782e54dfdddc256018ae6af8cc37450a4cef77f21e2e061062ca0c2a514290c960f5993ec1ce9eea6d09d3293118237e079b6015b966361c3032368174d74ae5cce4148ea2b3690fbd3c28ee544c5c5bd7bc618122979d52c9d3d44eab1f2467f338e695ec5f95998bbe77dffac42bc2809d43a324e0f5feb4ca3d5fd951b7dc8a9e6276ee080079b68849b14c7573cd02c76027a856165d1043acf99554c62fe32896d120974ae71f84986bfa0c28fcc399246bef3ab90f8e55f913aabf339dd7ca6f0861a9ef712e77dd28740615479f39a37e746c7df2b267066d1649fafe0459f665f3d5e7124db43ab1ba5ff94989acc7fe0935e0bbacf718b33103a1355d97ab416d8263ab369e6cf0ee563a77f2f265fc3856b7d54dc0887ed439a421c14f733ec1d6da086536f9539d23cb8026218c5e783423b5f4ac24c8d5d8faa7186dd5ea34afe299e6dbed73ffa8f415da706442a48808a9342d6209f65ca11eba76f8ef26db890da76671971f65bce9e6112c8aa92523dd5295d748e28857acff408c161c0513b37b855a8afb0764d118815bb1b68f8f09156641f7eea994ddea20f4062607b9919d041c880b71592402a4d5b92464b239caf431a99dc67787e76b8e1d7337af004bcb88473cd16b3f7640e8aaa59ad4609f060a2cdc71a4b3ed22c1506a7050a63bd8ed68aa58a8109980bb3f2b9f9fba9599d7620b8c25e8aee739095789af83529cfbfce5941d7f14c8ae30583deafdc7c25fc34e75bbed6ce4f6b47e9647c12333ce08c7db77dc94161cfc43f7ea0bba39def8bf8ae61c6fdcc0de6308af963c6d9ef43916d0cd2cedb970d5937c9fdd4b888cc66e99363b5a04ae62a4349f01c3933ada64080741b1781754e4a722303faef69e382cd9823177e4d5ac83e76017124a7b1a41bcdbb9c4209e7b42c",
- "eaae1c53919e2029c137a80f91704d0871be2c1870d0333d8bcf7f94",
- "4c434cddb399e52457113cc7e16f046c3f8301f5b6c296979f8a091a9ea557ea",
- "b633c1a0e1ddf4727b149b3d",
- "f1de487001a580cee6edadb1ef6b700c861a70c6ef16274447b8c61bb10d2d1efbf104d5f7d7172c6a5cf9c06d886165a2919ee9418e2e8f803d47832dae5ef232ee300d1f973a6298c22d777a1b16264353cc731a7a683cfe31e0abc704460788c555c0c24f281b81d7761235a955c736f17f213a896b40a034609ca8456ec3cf5906d01121b7580ce19d89347b6a59c81add318df487b2442a7a8b5e30df78467abbf46bcd5ee5b994a39ca5bd8846caba6f02f4f1335b73d4e20be0b6ad85966f86d1bb857713ebf947ae936782f1f4929498bbd66bdd5ad6fa252364a5a6b46180e93b54cc321b3cf63cf23d55392475c6b8c8c9dc707924b55544151c7c55ae0bf391f793e52bed70829fcd32b2926600f65be0943d6a9a96547675426b0dca9cc7b0f5dbc9d5439d0281014c6c159d055d6bd89d67828ba7fd2a0570ba82996037f7dcce297fe6518331270f6fd5ee63d406cc5081472bc5f2298a9208dba9398ccf807ce9af982885897715b3c5742456f756d79c70434a9baf7b4b6664c9d9f5696c5256b74099e593f97a2d4a469cb3430d0c3eb06083398cabd58af598945a85c9235a3fdd9ba7686e54d0de9afb594b1bb030be8e6bb839f6b45699dbcd2f771db64b0c62bbf6c8672fb412d60c00b3d87f82ffff6512e8308877573323c5a2d6a216ce3e2ce07c9763835ae59d44d7958fd873e3995b62b1b347e489ce86e023ae27a6cb03ddec27a38fb233499a714acd89232a91d38abce30299f38f437f7a46df647f2be862c1e7bcc1e4263c2147b13ee5b345b7fcb973f3ac71db8bc12309f67ddb62659bd73fbd20664eadcd23a79233386aeec1a6fcc8c592053954ee53826cb9b6bba22400648887311cdfa5414c96d5956fe193a3729be1434d923a3f9849f6c419f77ea05fb72f3c4f75ccec03b7f7aef8c8e55c8c5480ee505ae1a7594e6a911dfbc39dbb0ae8656f5972eb644c64203a920fe0078f3d050cc5666ed9747c23df7853d6913005d0156e741a5ead3bb1b22e5bd802c303a73a961f0b60d0fa698041c22577b44eba5d6071de4b545d9f5de24944c151de6a189bfdc223e0507c74ff929f06a2e7497e8c63073294b4aba110a006a6e9510a9617405d9ee711831e085940006761822672549d1d1c70e50002c2227f6f304b9a7f11dc05751be2dfd297087044d2e20ecfa0c091478d62c1bf5f0aacd25bb0384853762a51144b77d30418b633c4c10a6eda7b2eac46905641da0b685f85349749a91cdbaa4027fc50eb97a7dea9e8cbb5b5f386ace0363803ba579cd16ef80dc40ba1044b4ecd0e81e382635d7855e2341b18e0ca705ff46990282fe25093a248ca04a1fff64ebee25065350ea4b9e5990da4dd2e28688ab08b6d6fcb54d70f6d74fd7e5e05d21c12f5b140839aa966aea9ee094a923ee5ec704b5b709ff009c20ed89a75468c48b505d07c7a5ba1ad54ed610886c9d84468eaa598c71b017578404c909dbca431703e0cb1cfb975a696a1677bc015a75db007eccdcb21b9e5e119c48f148c2cffcf29e245e52156ba5ba0a8b0031570e4cbe7b3ac4646353594f0c4a9424c9d97845c5e1a4b4016df9be8df3013e5269484cf32258849afbdd733189ea11783f0f64d3aba9b4f48818011e868cc03ecaa44ff0ab83ed12981a6df445294ff672f3a16d6e0d19b90007d4646e967e0fb1763b3c879f548e1103a75c94f3a7f72be78555eafc086c1c58d1761aac60b843704f234c55b951a1303a12705f2120f784c2bc1494432a94c835d908f0edd5cbb169afd2d38087ca5bc5e5df9c3bd970dd2da4fb2a00933538148ebf669a20b5beef0402e53dbfc3a0f289b33b41ca27eb2f036a22f0d02e0617bd01e8c74be264515c9b46b9ab6fc67403a35837844580794088a9d3c14ad9309435daa0396f48017be524856ab6c191350529962ead64bab33171a01bb3c144b23bed406cb05102c693ce5df36eb541c47e871acf56f2b47de687eb9b3511ae83d06b1f69fbcef3225c3469c304741437fcd0ff4ae3484c117f51d24b6ae1363beb7d85d9b61e01e3dee901b90f2d3272eedb384ddb4d3b9594b9c0926595e500f8ce2e5cd407bd7a4e2c8e6f4315bf693e8c961ba5b8a6c7f5030c68a6b995e9d3f9eaee9eebc9d679eaf72a5f1cb6b2fc66edc7dffa2370dd778ea7ff446121999afba7bb35ceabf626c6269bc466d65f7f812c663bcb2fd87d3e09ab7d71e727f66d20ec48a5d2bf0aaf0aca05d1546d6e974f90df85c1393e3d45731f71ec7b5cb6cfb4e5c29976ead6944a99df2045056e198b19905362d4e9b765adb65eb089233a8b3777352665489c9456cceed593c6590d9f3cc4024d0bb92e1a0dc619bf8ae65be77456c18f8171e4d2d846073cf5c57ba93adbc0db9799e3d98934aa6899372acfa4d7d2ea32e20164b79c71d7bd33c94f9a781a25cbcafe563462eeacaec0e8d9d6c0199de85558a3a05d1ee3483351915d8a4e65ca0ab129a2386a9e26aff9b912c588babbcf25f8c467145061b9b8fbbff19d8c6ded8527d457be7c926c8f490bbcd627b3002044b7729a52e94147f95772591616f6074047e758597f410b3100f9efafaa4137dedfd0edfa85b0927804f0b4fcea1a174622116222004d42b36c2c73d04781f2f49d080f351e57154a3980005bcfb0ea34288e2fafec5bfd01e1f7901b3efc71ae58bf8df4cd7c045856103b77bd78073f0174aaaef4a3c0e8b5b46dc92db55478f012dc1b7d513e215e735573257f105d2390b5366f49b61809033c13ed4e1ebe19ab89313c947f2585f0788a0c5de90b41ad0dbbfc604a0d414d0e5390a0f3c9616cfce4097e38e05888b8bc6e55e40368bacdba7e5b76f4bd8fe619746155c30b38807a1ad325b00ecc3dbcf23014e79f1c39af7cdd0dc7ea58ce733e6611b7eae069deb047aeadfc21960e614db19d2e7e0905a9873268b9a24f856c28059321a742cd6cb3d1527",
- },
- {
- "c89c3cadc094bffd5ba06c600dabe30ea19ad037316fc13b895fe0e14ac8841264c1bf25557e22b01f8e102c3af43adb8e0a12bf79d3fa0232dae37ca3688e07294e2c7ecc4e2eebdd3f17173351f2c15b0480d4d77bd70955ba86f82214004b622cc92f7bf81a5837326f6a83612bdf65abb33c268a457c45cb7467e074b342a17c711c748c74abbee31541444020a9ecd4e5125e2a8ea3f6030bd677be18183a8a34af16a85ad48b7015cfb036789c0a5daf68883d0c7e401754b8d56cd00ff605be0cad19e03989f608392c81d636de859e66c2aae403c138bb96a58ba69b9064a83e7d8877067e7f40aa0016e0df9b7f455d292a60eb621b8107a727a3378c4b7509d3ec10526c50fc6c66dd4b015c915e85bbbf701ddaf2258119c8b9a5132eafe61bbf38870f35f375123f766ed0d4f38b9364a86e56cdef6f95a815a8d7c48ff283c77992fc6c070eab7d7c7b517006e5d4af532a7c429912ebaebac27249b4f5112d870d998e1c450b98c05d08c742dc769506f2d7a004c24ebf84c10838b619653e27ffcc4344d8db0435e4cb77c0410cc734e36738a6b5f72a7600632d19c86b40c737830b0f5f104443dbbb031dc7ca51ab318951e7817b5d81de8a9aa7f5db6e2d5e7a3cbd8a8100653c048204ced3af005d00e7de7b445f5acff901c4d46ff133e92ef073aff1d9ebf55befc32f9ec38c9eaa6a1aefc974bec2758297e474cacea2ba4151ab1a3ca0762c64a5ca273169d29b83c164f77f266c01bd5075871e17426068ed7aa58ef0d1f2959b19c604eb6187acc57e2becea2da93ba23159ba73b9226034c7ee2498e0ba34fa8038e5e2c092a73ebd9329ea3d648d6ebd47e1776941ab3130cfc91089fd0a0a36f0ecf68293343f275d2a64c1b7d27ffeb3f667f4a19824706235fa5f3f04952ff08bb183c0f1aa1d1b0edfd2e05ed093543788f5d0ac6532e15f912163275053b202d772f381900e906fe070cdb00421e78c16b7387be91adb7b3b3ea28b92548d69c780ea578e7ac66eeb931eefb4067bcabdb345a7cd2022085fc494f118215adfa2443630bffc9faa8fbd9943c3140d81c7532895734a9dd20e31c326531d06f5623c252139c4cbc882640c457819c63f6ceed4e03872b246a3766df69373ebf5af1116e8d5e1b15745bd9dbdd663fd4352d1238a43d5d1e74b3edddfb1c9d460daeb49afccfa0712b7a4cf8d07ccd0599ef3e4e1c9b5c814f3a6f3a46fc80449b34df87f47ff91fea3618cab2d5c04cb50e8ad199d752d901b21348ae939d39c86cc1bcecbadcc6f0e581a3bb51e070507b41ea4294b35456c69cf55a2a3f1296f0df73abac3a9c81cc303d1e20ad6e9bef48de83fc22dac2cfc01ce9ff3f70e00ee49bab2f282ceb6859f989075814e690e36a8d16354fd6056cbff49c30e49b1570363498531ff0ad0979a4518e9ae271f57f883abf5e301c0e24a83f09335479698911bca90269a28c0e040a98e67c9e55f4c91542f921511dd980270cd490766da22306b48ca9309aad3b2393b7b1e9ac7afeff64204081f9c0a8f6a5396d02eb9009901ca2c0a75ffbdae3a38ccd5007cc4f6bec8fedd64086cce5c039e8abc9e23bd694fc8de4e858c89bd585ebdd422b492eab26f4ebbdc1d17dfbba19b5ac458c31320a161a52dea638548205a6ad4ec54875ca34238c059177bfab2d5be0a98d12b3932d0661d33ec655446d0283224af8ec7f1c6874add03448fd8029a71d3c5aa06951123c9fd881d435845757df50444e6cacc31a8cf7537a778d1184b96c3512cd474f5d1fd1214555789d24c8d173358e36400b2d937595109729d9f35eecb0963c0da60d2eeb52a778876059fa95d820d5d34e7948d389dffd53d34c4083d27c917879b053cc57dc43c8263e5dfe5f33c19dad0a7126ea6e8abdbacb318d37c305a183596ddb25b1934beff13a4f24fbdcc2064de8e0bc639e672ecfe45692e9f8164365e1691784b4f775ef369aeb135ce15135c20da95064c810592ea33316b9767caaef842f948b9573b2205ec57d3026a2f2244c42991462e233061549cf9bc66a7b4a8a0fc61f73883fd24dad02644004989c4721a0aa03d3b0191d7fa4d3da102e541fe463936c9365ba30681e706ca70cb3c8ad5dcc710de59e7d8a6247aa809bba74ff4dd182a38bb31baa337841302c19ed89d65e87bbed05465f4ce0dfe89b44d7e9266a8ca21d984c41109d813ca76eb67dbd4e39aa437ff98050c968ec1e40c534ab51d6b8ea2309fab08b3757e9edc5972bff316f6f2affbff458ac0299613734b30dfdad20f797d172cf295cbcfee3d8ee25485d40380d3480a9372a1a6e5ecd7c4c6a9d34027ea6c197f37e86e757750c9fc24cc7cf814878b8628326c140930dbb2041bd9ee87f36ebfdbdc34522cfd4e50c9cb48dd52d4647a06d08e0f0069c104849bf30c8e61cb693dffbc69fc0ab9c5d502a227d606a1dcd630ebd799acdb1e47ce2ad52ff53f6cf4fbd5f0058fb5db915702675ea44334d42e0b6ddae78b22b5b5f7e5aa36519e31278e37b64312479b14aef9b8f12d8c1f39faf920851bd53b13bae5490c847b3312b2e956c430f1d8deea91cf171dee5017e7709d0346d81600bd5f0c41da3f548c28aa50589b293685ba059cd7f3edefdb5d8cdea364f4a42153b0632ef0b7ba18610b71fc34a781eead1dc5a00ab47b6840590ba44dafc6a16029cf50e089684194d93dc881beb62edb7ccee6304a4e71a35915f109db92690461b9e4ea21257ffb62477c20feaafc7a78e2aac2301b66893157920ce9fb114ab4f534d61bb3d17dfb4d9ef9f79a736f7c1d32ac3998356aefc876d8c38722787d564e980a1f15056cb3fe634d71d2c98e0475c79cab318b73a863362f85aeacdcfc44e61b5aeb870de9ea5b5abd24e8c19ab05e45e1e9b8894deeb9d29d65ae99aa94b5047f3c1168276cc2e491aba52b5b03703ced28c63a167f0cb3e4bb4d8e4f0292cf3ea4376510fa49a1a5efcc00f23c3cdf6402197b81262e66e17bf4307d87ffbc2b37213b316bddd65aa9d64ce6122c4a1545c5966bf4fc4c6ff17ded787ca9a3b3cadee435bbba8f6590dc4ba30895b84d5b4eb94f4b05be3c",
- "82abb4ff5457b21f359754f151e456e2c0a185c8363d15918bcee0d6d49f12564ac655",
- "b63b577e719494032062e3f63682098dcdcfe26cedea2a40893c847a331e4ce9",
- "9f1d08be539f1244f0f69ad2",
- "88dcdb0309f8c4a96ad5560f8210eda1f5afb31b85b7a8b15525777748967d4ed77c063f65d64ef19b31044f2adc690f5e457faa1abe2e127b38c626eaa94053c9ae1b6b4d0db1f02c8404b50f58210cc9fcc6fa4ecc615631da631031cd6253b4a13a3e88295ffdc775fd4bdf29655d9780dbe02b0a82aad4c4088e90b51f170909c0f98ff93ca3926067ec94be05841603db4f913b7025a9ee34b8d8bc629ed827a2a9857e0814d36b83cba21e670f8f94ceb4be5757e0b8782895b5d8605868e4f584b5bb6a5f3a94edd9b23fc2b6fa06914aec970c260fc370aa245ca68888c90c43eecb68474c9e45c53a7da055f5bfe39b56769fa56264dc8bf4c1616e30262bd501ff9fc5cd78f73ad89e093feba0393a11c6b2cbca765ba025c40dd0417dfa644fce96db5a0362235ad37a317145e7b5f3c7213c7fb3c393be57a1cb55035f06da1f0bf665653c5fe8a0f3ca67dbcbfc59852694d34819d0978cd09b508d103017168f6848258493be737cc24c2112f2afeabf41038bea1f74bc8656d9910b77d33cc691a0d9b12f7c518ecef93423cb4871949a518d2f06e5427823324275b97110f8f88b0d14788741e617f4b194e679a1627da50376a08d4f23b005c0446b46d4f534ed85e4692e7946ec818437089425ee30e47de995e8774b61003801de67939d9fed7bf0cdaf625798d0d0d04a61a2482217b890168e36f20cf1d6b81f9daf1a49a781567c4363ac2f3ebf0252d5adfbed17f98cc264ed2765aa279b7437410ee8b4cf42932e5055f4884deefd2a979ab1328f97cb750b3b7e4615b9c1c61659c90a5ff6d1c736e785587ec85040fb2c6decf789c2707974bfcbd0c7f699627b31e0762321d55bcc6acf1aabbd44abd7766d397bfbb68c424b311611d9eeb6598ca3126f569f688455da8d5ab86eb01f9c96186858c4b5e447aa2b9ca11aa5453f731beed4e09f95bb7376e200212e2f03551b8b09a19d6910f25898d692bc20bf6ed3ac9a0276db560de5c9e264f4db8fec6577042fbbd4510bb7070086508ac451a1fda26582c259412fbf1bd60cd5e921160c2604fde559b5ed4df52b805010b225f999450adadc6e108b70f169a3d8da6efbe1cce1c4908b004e928e3cdfdd0b4c5f742fd72a11c9585aa3517486201b6d9a98739b77970a88072750d29d005a291546f13b576b4249d71f04a9abf8f653ca206d98f738af2a1203bf0975f0a40138df054ee834ab73a3b1d7036567369a7ae15f808904e08adfc84b34a0e1356009d8a82e51c3e8f2170908179bfe47be8ad819cb12e85b6b76bba7c9b9398dfc00f550e32c171b4d5f2d9676063efee0b0b49660c10260ce052dd00addc3359e35c25dc33066d4b05bec7d93f71e0ad7d5ab83d844c7f33137894327f464260688ea4ce9847046e7dd0bfa48d4e15277a9586b4742daf0c5ecc59aceea6867068b03c20aad38d04a814472287d809a9285cd4dcdbf68f3f4ffb794701f4c265b2dff4aee55c9815938689162e08309df150538e60dccc03d495adcc560fb831444b922a6375845cef5dec56eff2910b5bde5f25f0e550ab5a13205de91d20896fe04a8ecc2c83d1371cf381424f8c43d2a5ced374878405f52bb92f4fa3c15d29ec151508488f9b4e42527921e245a8ee4b5d6ee95797f6ec4374d79acd7b467454a1d7eda05a8ae104534b23c46b27581abed6afc3ca555202dda94fc2b93501fe78867730a84f6f726dfd7364bc240b65d6c3022a04e09c89e36a809fbf244cc5522315110e9e33c8a4e1f1396e3e51fcdd53d9ae94fe7bf6c6ccef0ce02048a11441de3c25aa9787c577501977e486f8dfaa4c81e3183e648311148ce5cf3de56878847a9d14c0645777022c158670377dd9553eb63eb17e19ebb06202be8fd9bc2b24878cc86f9938e5996751ad9ca04b636497199f7f27dfa0f5ba2a01c3a491bec6dc5113d127f6aae38fa07ce7539a0c1817f7f0de0da538f4d85ffa394784a42eb50994e28530e3997e3345db28bafbb836fa463d34146d9f46d8d2b28b3954b9bc7f84046828e9b55e2fd663e562aa95caa97873f48f0a003d2251fb3ddbce0b6072fc17e0d3f99b655b8f41e8e6986ef7526544222e2d402489eabed4c219540605b9f5dd321ad902708601e85bc874c11efedd072aab7e10272c87b08b9457223de9fbc3abc2d1346656a524e9c67d79d4053c4257e886d6b430f5b7f57b2e5e92ae69273c1705a3074d5066def69fadea1af8fa9b3bf4890f9cda4b1833e5ed27f22bc4fe4cf452880c7b53320bc7cb748c0af6e7550ffa84e4714ec18d208131ae9e3edc6cd6fa2c60ab8ebc1ee56eafc01fbfba061e55014b9711eb58fdd01f8936d29dd081565de0b175b02989c5ff374e6f58c3383e9bc00d8a93903e6a221c7475e15aaef77594849af877f3807a76e03bdd54ff0b192bf34385d24d858d6f454810ee48141d73e3acf1aa3d19cd4c723a634cd8e25b4fb604c744e408dfd82961e46e8444f001d0991af24b3b6ec57ba41fb45122afc73ec6b25f501f1abd46181247945729337bf5083e5821968502a5a696043ee696c290095feac000957f968ac61ccb572ab2f37008830ab9a81d02456190af99873450b52df1888c3d8b6b13df65a9bb36a4b6d0538a0f179daebca2bed6f94b4670560fc5471c3770f2d004b6a138b8243068d754fd246e9881242638c6675f1611f237146f6e0f72ff2fba96f479fe0a662a81f40928f5400a0bbfb5ed07a87f457d5febdbdd6f323e2a59f749e6fc8a51d08b023734c762a91cc517401be57ffdf6a52b9174ea153abf2190ae2642955c3c02b4a15d72456c9d2f323de6fabbf56dfa3b566f1aa688c86b662bd34cf2511cc4a30621b6f1f1ac382bc1c4fa4c0d4d5a30ae90a5e54a9fb4afc1475e7c612eeb7f0e09e894c2004cd04126df9359d525d7f090e4b531916207c38c3512341c84218c86fc50061043ba1b89ddfb21cd756b391cb53e8c1cd55352be05efe562669e3986c022e30c79a97bdf087889a392e6da0d72cc7ea208aaf23408df23f3a9ea9bf9a935e49c9994a37a5dd0faf1267d5f7db47cf64ae1d3ec166466b2f882eb21698aa375cb50146c0e660e9bbb38d7bbc1c1c6d8333f7031d6a",
- },
- {
- "68ca38fccd585eb14f953358220027046c14ef965478d3d8f206f63fef4fe3571a1b53e774b298c347cc1b69cc426d39575ccfabd5a284c7a87a0698cae9efe40543cb79f5643c3c3057a5fc991235f06f059c44a7200b509a12e864fbd748001a14790f78b54ba80cf0a4a603da9672df32b68652c1d6edd3be51cf969acfb0ae49c026fe0bce0bfc72b1ff4c47712b7a27b2cce888b9bc470b8bdda55a8d53a34d79a25947ad55b95e5406a5c5311fece3ecd46ca590b3b01b9055761da8196b21bbc468681922c66d286c32598b1e3d77f2a91d835ccd9eec231409cb2e74ede9385552517718be9f84f0f9100e368701dfa4843b7222279537306065a54d4edda3a02f1ab9edba3ddeb34dece9d5edc8797103eb942a80cb5ae130ff2e7eddd11f0cecd8f9a615d75963c44238b10ab1230d9db7371d8291feb2912d306efe4f7aea2773903d4be9a00f2bd8c03589e342269a79441c0b42ce9c6fff0a6e4e845876f7e9b342d25351fe2b1233b4f576db90ef1facfa617b96d17aa03fc824973e1c80f15e5344b0516fc28424b7faff47ea1ef4e47f6f7b50e91b8fb14027f05ca7e1bafa266a4b952cd0b9e4cab82bb4d61f99568e14a6772f36296f5d19cb04fa86ff20f04ab61d1a6f01e5282c99fe4c3254da46fb5276317be58e94b1928e3791af27dc6544f6d445dbfc7275fbbea74f98ee4aea647b654909f9fa9c88312d3759099c9d0070e3db6d55506813f8b7abe602964a7dfb9387f58e237dbf50b4185a50b65ac099352dee8695017e4dac644f42aecc3e415333cf76b08fc764a721b45d7b74f6b0a2e43637e5b4849218d3d4c6a01208f345d76af56631590e520d6bcd82627d2446b45b2c68e0be81b3924753a54f47ea27b1e08de2399b34470701c9697eedaf3248db9b28991cdc2c632fd1b376bbda279b6709d5033d1c0a3ee573bdd222ef1afe8a4397a61fc30a4e94bdc55097ecebfef6c00133dc0b72c17e2f93a11eae9fa9f1364f10fa595e8e1623dead10caac068aad3967b9ab2837dabcd8f96a77a25baef16ba84bc93661ed150ffddfbb0369683cd021e8f959c2b531bb1fa95d7a574fe5ff9aae35fb9b4a0a9829c59b932ed8634fc05ca88211da3e30839baadaea8fd9843e0e80d9598a7282500d157ee579cda5d57628e7506617d301c2adec5186708f94f069ed7bdb70cbe88549cefe1673d48c9bbbdc01d2af03945cefe6e25f757750de64cbb9d496a25adf7058f5e32c827fe75e80ba0e834e6a72344dd2aac4228828ed42fd83e4576254af5737dcd9b6c338377d46baccb02d00fdffaac12133ea0e75e791593ef3aded4ae4c9249b8d5cd20aa28cd652b9d750b88111d9b4fbe729e27882206b2f0eb614d7daaf6436816fd80d452ac71c7a7f9e8c595287407c6ab9fe8a242e98da4270b4f1d4ea7243c27f89ed46a567c643f31f967b5f12e518106f3d3e08178078cc714cb6e39079631966a9becd6f02c18e983ceeaa2106ba9043f9985b791027eb5dddceed563106bcdbc48a4ac64bd95e87c708a8cdc33811bcd16c35e193203e70ef2bc7203183fbf60d46bc581f1bdfe62387b3e6c0c4a29130d872c3f8b134e7dcfb080e7e03048c49c0e468dbc44eff4b02e50bc6889cf7600fba58c0ee409ce948aa684baef4956fd8fd4a9c4c49e84e2ff314b7900b179fc66f5fb4affb9ef7a6064354fad8c3d2d50e6f2157576f864a843dda8f547955c4d80a73d4a86b7aaeaecea886927a5ba0e97df740ec7e8b70bb650010df55d4b75f478b07b205b560d45de666d84206c1bffd02ab7b8d1c37f21c47d1711b89d16214d8151a8e75eeeb5c54c39e5a855d578708d314240a064051d8b26c6183ce755be38fe9597dd5b5d198532b1db083a4b856b8dd60bf1db197cf1df852eb6daecffd97287a6cdd4c05307722e0fac798507f75b03e9361d5627ecdb56a3b633938fa61b2673efe6c6e768e4e7055e6c1d55c7113efd3e95151b606bbf169f4296455dccb93da370150c54fc11b3682f092f30381c6ecd218a3d9d39442c8bea61d9a71b174a8b2c56e028689380879cafb7c4bc2691dda0cf6ada039755edf93f851446df9f63267f8b8f030c069fabbe6457d4f63575b5905fb927a5a720d52c351bfbc48f12440a91471697e6b2564b1a2b314fa0e6dff090079637287b635d875f120671561102ad27aa83d9f0cee41bf023bcd703ad670b43ae23bf01713650834cc1e95dd486757f0a4f6fc9337bb95738805ad5e756198579c886eb0ee77e4ba957997dde0eecd84e4c9171c84ad8f0cb23c6a289e037f3a8beeea7965ce34fa47cbd727baa4ac9e6dc3baf17049fd2386674b246aca5ef6b8496f1d17a3175f6fee86299232c7fff682f066cbed895155d475bf9fd4b5571d257534c88c93377b1a600d4c280d42aafda975eb32c740073cffa610b5fd2dda7262a2fff5da7a0f3a875c62949e0c9247827d7a49bd8185bc27967124c34b9725ee961bc8102a029786652c2571be6cf33be63cf867c2b48e5826b31b714a415fe05c27f0862a870d8fb33200719ef4ac8530a4ecf2597b4a7f2e66f078a7505803774889a1cf963083c831f46725a1ec5545d8489e53921d81f80ef99f5e51a2d5992c7769c2a7ec8bd8e0f2fd81de53c7b69b650a2d838b269185c5efd668c470943bd956e3c5e1bba5d3b927b10cee68a75372d4d6fdfa6782c05659281bc9bc56a2123967f4f50cc7ae3379ba21e1617553354b5030b3d3f0092c1824f5d47b97e6b4fedaa90aa2573e1b115ffc72d44fa8209fd8d372c8dc9ee00193b47c2a9a302875da331731713243d02eb5a57d5dc51c35988ffd742ddd75c191f1eb2c2214a1fc47b82db8ea708818262d9583f2b1b98a40b6ff6e94742f25661a51882ef28475aab12d9422b6ac48e341cbd6f38460333b5fa1cfd4d0f43aeb46c21938468fe3f7bc771972246156652d2c58b18c8cecec2dbbc0feb0fae9f6bc022e029111f94e8913c0ad741612a1426b53cff73fbb24fb7b22ab750ba1310ecf339fe12ced6a3fae17b4c429550794a8d68be891b0e30cd28e81de2fb2ecfee58bdf11794951276005eb8a5af21e03c8aaeb595ace652c5ce60a8b98f6897d82698ffbb2e02213e50d9d3f00bb42c8652d22bffb87ec576ef6e206ed6c846fd5136a87f38c9ad899371799f35a6258878418830b04da79fabd80e7290456fe17c0850a4c20e2e657f97f4a53e1a3db65bb5e71bf38eab9f56aa11e6ef71c85b8a28f04c271",
- "ea196b6a64be4b0799b1c2f72281300c3a2577db44e5d3606b8b02fa8fc46c7aded7e442",
- "7c86a2c06b7520d60023d18fe73d09c514ed07a91d50d8fd5bff00e7550faed1",
- "952f492fe00b26028c560fc6",
- "b3f3294815ce461c8843172efe93f73a8254e58a0e71953e35c15aa89a7bd9dfee967853dcbfba73d3b87fa60449cbcabf13b1206d0cb27d2c3fedcfa695b6d41efda37bb6db35449bd470a23787619ee48f981d3f0b1c8e121725b2289b6d67858a4f9ab41683bdaec8a913ca2cc292a9640efe50fb85a1d1f7b286f45d4448f85b3242f45ab44e3281d759db24dfabbae4259f127d6546ecb914d7e93e2c19230c67fba8a6cba6069023ff7ea3d8a170289c2b4391bb97a7b899228d032b36186dfbb29ae8f0e6c06d753f4c6b21982d49ee682bef50a5c2c8434510c5fa2b9c0349592f33f8d7ad6f7243d42b292aee6d210c61e3f898875b91a17a89148275031b74cb34e628d7b701775dbfcf87c79ab279a73dad14d8eed365eb9f29a007b7d2ccc07ceb8cdcdaece67fa0166e135c9a4b939426882eeca98ab887ed2e4888bbebd5afc9f2da3e9162527262b0fa85903246bc8b80df3060c890ebaa516781a2b2a138b98001287e12a9c68471912dd297bc0beadccdc31a27b7c726baf31510cd355a28e4ef786b30084af66ef135909795aa73814cbbc6552270d5e11d46e9497ba30d6d8cecf343d16e7e3357bc9bbfbc7c1dcaa5fafd8a9b07056129da02e6228886463474c5af1d670bc14cf2868b816cc71578ad807a37477341c8192bfc2e8b1f7bfd58827e041f70384f92bb4c6acc415dde5099a1c2b27b709f9e53d1dab07c87a042ca4af7a2a6ee57b37bf2bb42259d372ecfeaf1dc55ac3a9f211f16fef3b2d5f11dc19fd1f425c14779580b2501ec6e0a84220e7e12baf9e0fee3e8cf499a7fba6721a746f598f04ee8ab4df31fb8fa5ce2d2419d5551155c009f2780cdd225ec2c19f94fb9c8b785ad4574b4da766eabfa696a1994e64a2518d1bcade6390cc683a6e80cf8b163c3e58cfa1134ee743079347f08a89c81478668df32ce9cdd7b853db5cf7af13436f3bbb11bcfa8f6b6d727a1df84f99fb3a5c248b8fd5baf669b68fd9af45298030f3251bf0351fa9b58b0b9fba53ecfd838300790ebd689744c1b7b333fbed76c8fb96fc669ecc6695ff5bf8379dd2a3c270af858cc60894be8922d69fb9707bd2a7825f2eec4a5056e5e91714f4dcfa86974259fcbfd5f20d55923a0a9936fb20e5ae9670e2019336e15f530c0be449fe355a7a02c0938d60720d5b8f4f59d2e4213ad5251c6058312b43d47c44ffc8946a98797f5ace279d3e126da63633c0eff1c412febdd47817aaee466c639e43637c1e179f606780ab490d3f0b3c2d79709f1262305fc87c02f68da2dc32f8c544e7b358c3a5d2c27986a19d13fe736c60a3524e94caa55e853eedeece985d16bfa6c487bed6583436cf82077fcdcf90a05f49db50588f46550f7a0c3a1cfca902d66d25dba8d2c53bb5557cc1d87c8a407898b3c30c4f0852df92d839859c191228d0a47324ea9ec2e0ae84513cbe4ff4aff85e77b8587f1044bcb9775099ebc2f28fbcd1cad58a8ce1f072f2228f559fbfdd8405d86f8262c27c3d95e01016b343c6a4e59dec81b59bb6e3c6109a4cffffa85e9752ed2149b5624417c0dfd1a27bd2630bf59814f15820c43bfa317be59ef6f433c95e8be154a8ae94765bcedadebb717f0d8c24e01e1952bd104ba9620f067554ae0faeb78f13c622c45d97b2b5774a3e30cb07f2cf0e8b19d1266d8a8861f3772305e24ec5c9cb714806c7d705a3bed6385f8be4e12562e17ec3df01afb4ef6f7427c48a1bc0e64fc65eb1c3d3ff2d6687e4c275a019f5ab5c63bbe47e3680fb1802d5835c4d494f0f394de1ae47f81eef005127d0971c4589c456ae6a69855f35635c28b590c1b93f155fabcab59b6c7cd8ea1c4ed1f67093aa782c54329cdcf9bf84a40400de707b894587d6e08cf7fd72fa45b6709a26e97ff5ec1269b8042358f872a79e8c2db1c7ebffac014d6b6f71b0c1c1945ddedaf5b6911668059b61b55eea4737aa307c829309c9ea548fba2bede023849bd61b5a467cd1ab1c61205ce64301e2531e5d58d03c74ecdafe1f5b74627be8716cad0d0a0be60984c9f9dfeae24a6c4949170ce2f589326e0a76c447a578ea3a5e4bd9f18884f18843eb1a78aa2fae06a7569a97551b227c34d429c8e1c8c5417ced93c30dcc607cb32a365d87328aaecb4ce57ab8e74f0d9099e267cfb747a3bca9f76b5f6dfb543bc4b5c06c3646062ec14f511058eb2939601913f8a0f1785249cb72b0bb1c12a9508b23caf490537eec53f614f3e06592eb61f75c1cecfa514cf7b500b0375095d5db74556220131390b77d0db72711c0c7229a5769b1d2b3f5105f3a4370beb1cacbd93ce32f89f1fc833c7949211dd204616c013a3399a22f5325f1a00008f4c8ee7dc5bd7476848721fef843123a6213cb0c0b6ae84233ed01a77a115d06e08990b8e60cfa4f41dbc9505cfae76463278b6c6b5ac7c3b83284caaba4a6a1d739c392528ff5b06bc3b82e98060e3001279a44aabaacc661fb14e7581d1235940cbe067c6b386da09454e0467c785ed0b65d41ff4cf36ba5f63d3ff2b45c11c6c22d3ea8ebbf1d52d770e0ebf2ba0c67c7d3641c145cab474a88119335990137fa82a340c2cc8c453752a3aa801127a47aeefe66d1af1a26ee1cd0e6d935bd548f6ce33a9c204be02ba08f9fa03c685665375db7c0c656ddf3e441ddd96b0d2018beff5086cc63339f26bc8332a5e6a1422bfedb69187a3443c23b630a28b02f8075faf3ff2fbeef6cdf02ba4af47a765003de2254b69f487bb5d038759a33ce6885611198b81b0b6fc5d7a531a7a90dbc3556aa758db1657698cb3698b8207b1c1b589efe5d52790667ac483dde9543953c6392d5eb8afdafa205d325e314f810e9c7722cbf5bb76fd6502733149bf21c60717ff5bc366b85ee9f206bb1f330ea72f61a9766090eabde747b1eb9c046cc8713d5a4f8d4b7dcd7c61f2496c5b467608cd9260382b8f11b04c318a5ebb6411a4c7fa060e08c295c6062ac644bd3d10bcbfcfe2e3748eba66f65d904ff21147faa8475f508f21238d42f62b697249b9fceb905127f7684c8130cb8663f09cd25ea038078e1980237389337d1446c3a77bce41b37b50b9c3a020526e7b7b3bef370cd7af71b225700627060eb65693899d277ed130ec5ed9eee75d4886f31aa93bbf302e0c69c9c4499396b43dceb67c02fafaff8b56698308393a03f60babde883f00de2c66831f024fafaf98b2fcf37a9ce01d4f34e95c9408395716dcf83fe86c7a0f5e3e6741c3b63b6ebe9964f1d5005eeb732ce66402007beb3e6a087053",
- },
- {
- "9100c5b2d7c5d5a854bce55e82f94b89a268da7b66357a661dcf75cba10a1b320ae0e4e1a5b989f9766e57f867a3810a0b5b857191ffd7aece4c796f5694a2617486421940cc12b63a6aaea20d2fac188b318a1c3061cafeae436e04d710654b96a864d674768caee03a50ed6afc06f52d90115df1db5c9f1ecaa4f5da094070b1a447251ad3d4fb0e24e87821ee6d4e7e7eac7059080f77d2b36cacbdac1c6e5063946a376865458c4ebdad3c2afcbba8a82b01b03a7882eee42eab904a19e0aead4ae515b02aa2fee74f3a114bf5b9f320baa35b3225491653f4a69e0d864cbbd031d0805b727e42c2b9530dae0c01cfc6a42af8ca730e1d67b4bb743a072f0a38008b937209d534c2284271344340fae76af2b1dd00cf44b48ab8ee92e8f9cae8845e5a8d338f505cd1c19014018bfb6b7dad487e7c8c32064421982c1a63149ec16f2bf4fe7b50cf3ce1e33d6cdea8e98bf067077c9a0ec1bba6edd5090273ca719ebf6f1a0f3e56f021945cff3c468b2dad92a947a06a024758d7505a4a1bcbe9da3a03e97859da99ed36982a7c23572ab60071566b749dc34bee1d9609e87fe32282cc9adba633c9ddcbf359ef4a83a54af5fbb5699978b487954a907dc9739f4b3f3927e66cf0c338e31c272da0cc7795c72dfe60a5b2e73bfd77b8c6ea58122a913910fe29d3360cef5d398f29b024f0dd225183d538bed2b076989aceaac460e3d45e0ca7941897f151261a024b0adf6d5b62429420144497adde6557a3c53b7723471fb760b6a8b1dcc2b327cd939528f5d7bc16ec00ad99df12f082d82bf9fb7318b3d3ce5b84ab1e38d2ebcb6713c03fd0d62bd083c4af96b4316ee02b6953431c261278aabd96e28f81adf7946e3664446135c825e45ed916ccb941350c84523296cadd5360bfe3e16dda75db10da1f710fe796f3456f0911294a4735cf9968656345b9c3049ca47176194c86f36cf702538df699fcffaa254af15b198ac37eed0837b00cd3547e496ecacf6136c6648a535a235059cd75a3bfd0bc49933b379b72e7a8463c268faaf05f0b27256fb179c9d4c923a13ec6600f83aaa2bee13e30c8e676040c06aefc65ba238a29d403f3a8cc164a0bdcaa1a5f54bc1d35fa4efee0c402eccab1e92f6b0cba94e1bd87898a9dd3957a7eafd9d26bf70866450646090833d4b91c032428bdb9097b409305de669a58e44931b7b428bf1a6dc56177cd944b87b04eabd80c64e287a5758c83db26dbc06f0c772335363ea2fb9f19c833644fe3b3fbbbbf5f9d460412d287eef862ae676f258aa45bc8465667601e9ac46e7d77693936c8d67ccde94e54d746b785ad26aa38ca0500105b6870790235e780ac50b9e3198f5fe678ae3a4ff4f1d4a2177edae183daf2de42625845973fc544907e27a90d868f8634c9d529bbaacbd228a5b4ac7fa68ac208e207a022cce4b24a0b5b5791eaddc6b3b3ef6e5dba41855ff531de9bbca0a39ea743c0732772bd32cd15c4b7f28a6ba579d902331a88920fb970aa75114e14b891d42cb947e9eb14feafccf1393796b21099e52b21773adae8e550f93364b1c438dd7d7fc76994c51860b652974d04a7e6ead207610de149f231422595f4e9ced1674d98d0e15ee841143ad8613f804729524e8a5f30d451611676f70a60c5dcc7127497f4d27f35e7ba0e48f98e9022e0deac400e809170970867a1682c7d2f3ef2c632c44568abff76f4f804841ae462c7247147b6e1debe48802674fd55b2ef1be5b4604d5f60c35358c7d773ab3a3ad0ab81868c6044d4e06a48ddbffacddadf813a2ce09aef34f3b60b666245a032f021b87c81fc506166983f25930cff728d399f6dd48ea1c745ad2da7f2cdd9e3ee915f708db0d1f3481018db1c174ea950ed17247bb8ebc065186758e5403bd4d19a445e4a15519326696e4280bcecd1a903f525bbe1e521f94d79df8db4b35f4ef7bd990c0f2c32789a75f95761ca0064bf251fa00b409a58b979e56d2c44bc2302552f118162891bd78272384c739c0c98bbaca3fc46fbb5bfe123eb25df0e27343e38b5a0c2d0774443af91b64b9d4e0649f20290edb84fcedb3bf4ba491bee8754a32716739e5ab64deb6c9888bb9fd2ada1629a59b16934ec5dee3678dcbdcc7fe5e2f3833da9d1281669b1d108837eaae5180396813883de26b957037623825b0675df431fb06b35191c06229f84cc849ccf1b1e079efc2e575331cd77b3297d2908c048b82b7dd14883f3e707bf6ca38f87c19625bec47c11f54988a97205d27ac51a32f19704391af72021b78cc4461386dc3844a1b45596fede3f70e311eba92b1d9ac221d3dc19f3fdd080c2169348f2cc8c9380e12a7ebf69efa37bda4ca6f7e66919b94532ac43022c0518c04d0a8cd99e0cbac88b7a317a1dac5469534b4fbc64080196b44498e149b0a196bb2d6f59392a21c4a4523ec1ff922a52de790e42810fd9355471169d22b734dde4a3361ecd57e271a92132a8b35cfa91d508d45618ad8c6c1ea209405a3d1d3ee1535caeaa3f20546052fc13aff7a584ff79db1726678344098d8563caa2a2abf6fe5aa03d7af49dccf1b17be85600e7cfdbfff54282394b0fbeafda615185574fdff78d59ec2a26dddba1c531a1ac007cabf5be2e2f0a3dedb9174e0a9da5597c9de6d68911fc66ec9d2b1e3fd71ebb83147ab14384ee303d067f47a324a01fc187f54a98f1b0848fdba2ceb3c18936d503e71887d548c4dbc70b7eecac9ead3393f8cb85a84f1484f2e237b36b6d886f54a0f629e8bb05b0c6839c722149a5b541703aeac04e6eb230a5659b12ed0a668d018f75bc94258218c1f5390b9aee4c0b2836cb76a47da649e2425bcf4cc15c4d51d109e5f78cfdb88137c31b2510264e46f1c4eb6e6b3450ad901ff9517b47a24d508844dc85fc5dbcc079e2d09f301691f401ff5f36500cc66f0617eb4dba389d427c7ac778d78438506608f0961f818a2080ea56d0f61c40fc342b49ee63e730df61f757387b9089e1987977b7fa02d87aec2e4be24b8bdf7fb6286d190f9df870944fa910df32f178ab692fa56b071f57366a3981f51800ab416dc4500abcc19e0c6aaeeb9ca063470993ec749a0bcbd07604516b1d51175ebedbaec8986f67a4d9158f75b5f3bcbe86a83220b4fdf12a0242951f94ac7d52882b1b209b82c4749753ea4d46a60bcc4f3eed033bde2d3d20c25cb46fd907f7052217a0a4db143b2efe8875a59441f4d22ef70d0c244b2de6a7e15581e84c860a6326ae3e3aea6d3972e2de0623d2d852c9e65eed318bd3d86d29595575df60d9050e1740f884796b6657718a294adcf2303adf61c6b23933db93885172e82a78f741b8efc6315a2c88ccb6b11692a346cd82a79334e0c610734e61e6378b5e2ecc161d924778bfcf4475805a0823a0d5a54768d9272ee99b7c4a81b3d5dfe1a2f5ff34",
- "3c77f30bbb698b1571aeb54653fcae2c23dc16be58603f0c361eedd813ec0c4f63005a1e69e533da93e820e6e4ce1308aa29c60289060ebf24fc9738e8a4874ca4e26a0dc79ee75b8607416bd554737f",
- "0223c0a6052bb3cdc99a284fa169ba76be2df53b677642a606090a9267a60769",
- "7d3981073f90c6648c5e9c74",
- "61ec5230306b70113f67b340575b77ef76d521ff75b754d551e4177591a02351ad382b2a4067f2b3af7e8e15431c7133e98be9d8293d17ef40161dbad9a4f1a4f30cdd557bb9a8b03b5f1b277c850e23ecfa0fc2ab1102e4b1d5e836a606883c3d43527fc3aa26955964b144a9a56cafa7b174d72a0635b80e7b4f871ead3838a955a14c4b8c5c3c66fd86a5e4ff10dfaa92105378bbc5f76ad29727e5bc4779ba3e6dc19bf45020f6ce4dfb3400df05cac51577d58eec21b22839b8f055226b204e641783bb3305b4461172f1c1d48eec56fe6f82aae564ac6688d7b0994747d9b23a24418e69f8a4fc548f854f86baacbdec78b7597b138c453349034c8cad2ff272781e0e6799ef2f8addaf18528736aef21ef8c2d213161e36b2c7815fcfc40747626e0165684e46a9a2275c533d548e52a9952a556168195d602ead86f6bd699e97ca59f4cb2050ff148f5bdfec358dc4542ff2f700db9861dfe5ba377ec7fdc0fcb2501e72fe6873c7cc76b95b4f300857f76e6e6e370119f403b556115b19fee7009f4f6675ad2d174f44002e35ddc360f309f20a3a1dbf39d90d7e5fa2106c53afb0bf445e4cede59cb50b8a7a2c0961d00b2c251f2d815309f74a46a424838ee87f1229273ff3b66dfb79e3b1ce11bd60e061e60e3f37bd7ac896b618cd78388590f44b1a276b965a4b95f2e3a7a175b30fb45dc7a71d4b3a1a33e98af30dbb46a217c50046ac21b8bbe9537c02f05a5780c8a5d796bd6424fd9e9f3ed5932069bc050bf4a1898a0ef0ca756aa2e2269b709cc92e0c5192ab49d692143388ede2bde4923c85eae8f59db5c7711dabeb33743c692be6dfebd815456958b5e1384a109f891f433e7b4a1031d4f30478b05766dd97eb964a28f2f7b55aa6c27c7f4ebf4d47ee8709bf99915426b3896412a855798e392e111789213af537cff7a976b4509e0eb6ffbb8e886a3596a242d16d95109b0ff562c624e06636a3611f804f9b2e252afe8a4e5e868b48e9e734f688f2da2012d7fdfe2d3aca75fd74730a85aae90353417fd52b92d28a5098b6af358a096b859859916bcd5a8f779676c6e04ea461fe62872050af92d08cdf1124bde1e889ace3c923457ecfe0a635ec757907a131ad7c2ca3f60e1317880f843c5e63f4ba59ab2882a492dd1e070b070af6f60e18cca29541206a7b267c3f75a5327fd9b8ffc9b36b57b73b36e586541d15c85253e17a2581e8f8a1518f275cc79afcf2b5c88a16e9bf553e757df089b5db90a9dcdc1867b788fe75abb5161dd7ee1cf37d3f0faa793ddb1bbf1eca13f4220ea63af8ef7c0e7144d999ba1c5a983e74d48cef708c1d28d3c0a168ab87d0ef70f381693f0d438ce013ffa2cba65a8cf6b498a7120209564535b7372690329cdbd74eaa76765962720f06aae58338a10064ad80f5a67395db2c31d36b1f5eb777306395f192599d2f737327afdcd9f14b3f24155a3f974915d3302427494fad756703b13afcd1764ef9735e7dbff920f1253cb668e9f40632aea1e0b4620db162138e4a97e6f0729b14be4a7c3256250d5e7423ba1238c704503c51cfc9cb68db7001b2f597a15e77138beea02e11e0bb98a72f2a77b7260e9172fe7e60483114ddd836addd966b69570db5eb26a0cfc4f8a8b80d26357ed51a70165bc0dd11ad7467688025bdb532e7222ea12f23c44d08d111b0ad4acb2f5b3d6b45c387d541ffc84466ed57acacefb1436ef00bcb5b6211dfd0650113ac369b9f3e4891acb2693c377467b1e9c949cc0ea6c4a72ef9292964275ed397cd2b1ed25fe1aa8f47e90cde362392da5e53893eef6e4f61decae1a75e3b726f0596f09c3cba62aa08bea89984b484d5768296a5afa8b0759dceba530a169d22b81979212b3343db35ce4e4766dd251ea6a47f5033cc090d6577efbed441bb4f8944937e812f12ef17ede76df621bd4cfa31567ade18b74583a2b783279150d584ca13c0d4784b70156afdf9be8ae96666b82def888465cd3df349de427d5f5b3572e4f963d33f968e6780e381ca196bc04a6664fe93fdc8558b21b84130dfa2a646950eb2e927885925af46d7a28d1507bcc3c02ba98318bfebe5b9eea1bd47935ad869eb701cbc35a9aef5efad88ff54eb350a34ccef2e159de8e16135b81105bf799fbd86aa11653b5ef93a1ab1c367231d61b42b8bdb4f04d8d05396d53247d51890be9b56c51cb19eec0fd1e6b8cdc98376b6c6b30963ac7ab02656ff94dec0e3a0eb3f3ffb8bebd99d5889df98e6c77093c370373dd5f17871fb334c7eb12c6ca22deb75bdac9eaf24281c965dffe03da9c940e13fb382fb6be332797813710a7cd2e7720f5b9e53fc0d98fcceeea4a8e9f787e670d60bfc4a849f34571e5d09b9e9c28cdf2b2d888eca9bb31ea8b9239bd19dca86880ad3e12b1583acc3a6d1f0a438ce3b5a337487279dc4ead1b214272d455e6a2c8cce4ae3bb29abfdbe77a67ababeaff5dd9c96b17f589cd4615c0209eba5e4b1c7167b4b739ca4b9957185961529d1082226f85068890c94aa1f1c244259ef7b120e40114926a49c4412b67b4caef1ff3ce6f3aea3c6107b830cd34df9f4d73d7d978b6b9d5c481e9d76e83d649e742b098334838fe50d80975fb567642d3b72c461ef3072ebb1d03c0099e97575bae6a12cd2352d9d296351df6965d736d7568c2911394a73d199743526ba54dd62c56c598f4e78495c0172739274c0b8c96755e489765723a24a8704093a94544f6c8764dcd1ce6b4bf2917cfad27d85e4442b4e5bd577ea1a88c2b79d61cc1be01ee9028235b36444483b4e45da1087bf6d45ca540620de5aacc644a0d5c4b807b582c7b058e140eebca539947502bf73c9abc81a0e3a618b39d3a38c4ff7f94767fd7e6b9eb61e629806bc3d183bdade7e369d180dd2f57fef677e22ce41be7224f11723a85a3f1d14d7b72dc98ccb2816b77e625ce3db3e2c5753af8b079e0d63939079a01910ee4699cb405d4d9c60e4ac86a7fda3a4c9c290662afbdb7678c3a84c87ff83470fa8a416511a06d3216a1445699d7ad7e6980491fd596d39762d576b08fcbf0825243c1fc01ec8300780857c429c607113160a8354f6699b368a87983464472a5754fd58943fca6f6779764fbe6cbb510d5280292df02c4a7ed9acec8c95ad67ebcda71d0f519ac18db9b43b28244cd34fe02c5d694df57410eb54c5e1ca0f8501e7776a811d7ee81eb9d8c80b2ca50a012b5eecd5428af965b217e7fdac80be88a01f76d473105b027eb557a523f13c55e1670ff34627667649573e0f19dda41c525a8c96c2866a88bd73e66c786767e1657960f6676d8a22be1c6024158a0f0e4ec761148b5a3d8ea481d8fed94855be82479ba23213190054f937838f0e35e00aa74c89b294c29ea25ad7e96b4b6fa952ea8f1cbe5397b7c86d0b74ccc25e22c88736b045fe86110bffa0679f28a1f27162b51410498cb7",
- },
- {
- "0fcff2c29cbb5cc40bfd2ec573ecf368275ade6a00e5730b77dab17e437b46524b3814e7f470acff6ddac4e0c6b748ed112657120bca1d83a4ce01e74a473995804d7c74bd28732a02370ac8ef52b600790d1284d82f077cfe096448509dddd0eb5944a882b7d384efdd4dde3003dea910f12de82035651e3ec9668e66435f519da3fa1f5bcda34aaaf028daf3068304f7b1ec18e65136241a9db281e011d27db5cc9c1099405a4430821e2488a228805314983966ce5d806b0f014c21d4c9d6a066e63aa6407ed6c29cfa4a3e22ca913762ca9d31271d9c371fe858f3b22e931814cdbe544b9416e88f6026b12bb8e88d8285beaaa35be1c24339b5f567480d7b16cbcf6160e549ef4570a0702889feaa0ebc54b11735735b6e2850d5715e5087291fe8890432784aa219bacaa2b874b075c9628cfed5e76dfe38426f9693f6bfb2de49b710c101b2dabb7c7c74f12de9ba8f75b8645d25629568d12bfbc7eaada63364b6f56569cf21e54c95d6797e9008f3496c506ecfe5d6a010d168fb7f0e2ee3c423492df36a133fffe9b87d7ac070c32cc131fba6089cb7d904b25812e03cd6048504f7ef1736ee00ee6b7aaedb3dda9c6fd6437772fa5076aca9888ce55e906a62875979bd477aabb2f4598d32342aa10a6d187c6768f213117a9ff6d830603bb7b9b475002e20b2237a4055ae6af6b8d70e343e76265188a0f07e7820dfb3d898684d99966d4bb9e78b0e95f5044dcc12810a89a75b11474c8fc06c6e734407db91a072ffeb2be6773a7c6c3ec939514b43daf29feb3aeb7afa57e96d9cf0492d90bb2c7be613f2208f5f5f5898b0a3db8a967a75d065efcabdd83759c88086583bb3d422c6c6425525a1adbd515199dbe71350b77940813618b88fe139153974c80d968ed4d9e3f97a91b7cce250a7c963f880dc38011250b9a131f2b76b677f78fd0e4cd6f1465182fd1d644dc42db0bcad8df4ae9f456841765af8e1c1775abf85a69577ece6f9e9035e36c88be784397479e713be4f5434aa4c166bc4702a4916c0c003a6baecaa182372a30af6dc7e6fc4912d13e662bd327829f6e85340fe130001babaee64d211d6761bcc52993c162a692a10cbe7434310392b64792a777a2b31341995072a6b7d4538cfde74e609dd1019a9f75cec0896186c0f42e3896d15be87aac5b11642f74e11d5c2f7de9f07f848ff543507ea4d73fa8f5683fc6b41831606352c482c7a5a013c51e0db59d824582c595f17a6d2113528943194d6b5aadcead62516507f178cd0f76729cf8b81fce4e0138ab224bfdbb8f16f8ea6196b90ef90a63f0fbdcbdfb5320984be8a80a26b932d1db7ecf870dd67fe838069136ff9b9ae087779e82cacf1b06a7b310ce6c439047c26fcec0364ea87e4549a544d540256cb7c3ef7282fa792aad89e919dd89519fe910501f5ef88da43232e917730e742ac2539d454e066feb9058f56dd246fdbb674dcab636585a788b338ffe41f4190447a65985acb9613d02669ad4ad888004c65acb0ca315752e58f51c9ae9259f20cbe8a668a207a5a46e30891bc909108f53db8bf6f0f11549e621d4cf4763e0035c867bfe9e1192fc421c080b25289a78f4167fe517852efdb6f3ccfe67ad01b4337da2c18f35bdc151c5dc76ee66efd27d5fc784e4e6829bea4f8a41ec8bf61ff998d178ce9f4a10551687337d7705eac6cd7fabb3f2379e31c1d01e4dc63e475f0fb01d9efa3de400b5177e2c2d68f2ead89e9ecad62cfc97fd0ad5b3391d0248dd2fd7c75dcbd802d3463ef0af21eb77b07a3286a72f1e9439f457630159abde7983a5c74f7dda12b40913632afedadb691d62003c70a46664fbd976457544cef8ea863858505b1c596e7f745d4a5fb657b1c694226afa9756c40d9c49425b323ce17a8531c5919b24010f715b5f27a300ee37334931ca9ff5c83c3f0a87713768ebccaaa15e35c56f3536ba945e5d954c94c885c68325bc4b51fb55d96c8d424849ece9a812af0747d5b1dc240f71609439f65acd1c17086e025e376eeb79a7255680cd692fc4b0f5768d1985fe8a1a387074f58c8bfdea8e5c11ed379b845ce2052a5b24ef0c1a658923eb87adf5b01e6aa59ae6937564ef97421722c67404cb9e5fe07d5bfad2e52ebe6cccb41ceb1eb2760545fb6a3582bc4ca572b0aa4e4f0a2ecc56299f3b485d980501a4e010576615ad518fd2d43c1f79aed013ed1f1e1bdb74357aaf7dc84772c9ec62da43c8ffe11a7fb3eeabc3584a936c37b28a438dfe78f89de6b0d5597ac1bc55057544e68fb49a6e505db69af122c2a3ad06219b7f2a2955db0ebf55c06baac5e0efac609436dee484857f75a8421945484ad0c7650a1d3008cc85c938208f19002b7994524878d6ddf85c763a65cb72a09c3a059657459f13cb584bfbd754fbf2de904517092be4f1786b2bde26ae8eb2d884592fc9e84395408f8117e47d1ab30d5fca167bbf07e41a33c230d240e3aac53cda9f251e24659da57d721288252fe7ff3653ae3e47b86209e9344accef0009b99f2ec7b3845558f1d77b89fc9b61ebc1b589fffd3261f71b9631e87541e22ed100e694854bed771358f10fe452fba61875a605b8080cc39e3eac13708e32518f28e60464c38b782c7c7800df63b6e7e95ced9154ea54e32900f6998f38eb1e51c112b6949e2eb11a96b1ea0a68c1e3b5af750a99c9fdb2cae44c5a1d37686ef87b158d19343e23daf00dd558cfb91e6f2e18f8e806abb2faf80d082f657717d08ca4e9c0d30d9bc30b612bcb1a3a3a3843231059dec344c6c04ce625b3fe064092e00175fd9d38f8fe54c4088efe30d211412be01460a6d4ad8d0a618b00a21de0a383de30ccd72f119b27a08958729a999e8aadff21829cbe8cfe398d90476e33db4c64981383a9aeab4a27f3bcb29d4b3d3b3a6ebdd71d3ac546b8658e269959630de176819b153cd53d2091efbddd2cf9178ba6ee98e1a3df9a095db0a2b713a0988a22239f5f08cc8f9abc3d67d9267f54dd5dedbf01bd490b0b09adb21d4e5aa7707e36cf77034f01bf8c7988a2e8dd7046bb2f486878436371f1258f3f7026afee6d7f6560be67103ad098edc9665e00118d4879f58bdd677cf2e6bc631d5c517acbb6db8a1debb4fe7492b7daf0b7ec7df056637c23caf926a1a589bef1db29cd81f547afd0fc9e459f46108ffdfcfdee43515a771c439dbde9177ceaf296a8749be0146cdca2b26be8c2ebd6cfd9b5032b1f7a375307f54c2f622711f8cf8684afaaf17c4da3e83666c40d26adc239c8d1a40024bbf560db5787ed404763d4e70ec6635c6a4b82c10f8ff7ad42217613c57648716ba94cb33129f3789dc86f9c8ec2e8e90e6bba0dfba1bb3dc3215188979a09f33346a6647099ed0e624c9ae10f83da0def840bdb25b718e8d86a616ff46b5327b1f99c22937920f5b5bbd6b53fa0b32f24befa4a7603234e6d94be51f00189a20b15c49e8ee58434a15ae9d10b9cf0204bfa7ab1fd9e006b22bebd22b036c4bb4c9949cb7ecdf01028d9f12466e144b2dbbf64d95d65347013e192d428678f64f0d9306f97208fb00a70d4615229143dd8890725ee3ba6021d38d6359055aa812edaf",
- "0c5fb7075f5e15a6733737b614bf46871e29417e4b140bae6e10081623f5c52f557c36b4da4b5a4e82920497514b1e6f745fedbf73f86ee10976f82c6cbd5bc13a917514ddd062",
- "e70954c812cac03e367e99f7b82a6dcc073d2f679f965d524872756ee58654cc",
- "5f6267f6b3b21423267310e6",
- "c53868c0fdc14e891ae1bc257fbb13be210a5d9cdbd9d18fe1b474f9a1929dbba3f25222d8fe8c1be3eef22352100064b922fd9642ad128a202b6382ae0a67c8affb0c5bfa1a80e55c1084cc372485243df872d677a80a3ef1ca3589908bca621f6f50133eb762cb9c05775d13db7dd3eb65ffd3eef96e8dd42928facc68390f6bbc50b17e1ef5ea6310d8756dd177be2cceb63a97bcceaa046794915589ca022d90756b02c22e8634c0ed44192abc3b8b1e2814c855ab27aaae3bdd801a73e6209fdd559ceb59a94fd98a66d12a31a643ca2f4b07ed910bc390f77ab89395d5cd1d783d8940dad4447f0452991b209cfcd998b0c814cebd08f9ff15052818bab0bf51c3b72ac1020d3b0974fbdf4ff941b1ab9c01f284fe82f2fd89c0aeb4b9fbb0a74ece08b3debc7b65e7263e2922fd4aba15ae3cba7885d04127c8e06a67f244e7aa4556f8694a5db6653f6e48d6de54f9e4024d25d3236d4f933205b6a358aa1506f832ef7d556c6a1bfe4aabfce51f3b5ac64bf6ab1e665bddb12fe13db9f07a55db3da3886df36ddb89f3a4939b1e9e5b701301570e3d01c0b947f498dcc6af438cc15e6038cb78a78986da0316cab67bca3e28c95e6b7e6b36cae9202cf4a77a0e15d3c3291d267aeee172dd587a944719b9fbe077603b4d39d4302b9a6415aa07af309a5e1cf7a9379552becdb4bc6a0b5c85d2e63bb141c405afc58a8b2b4188b3883a24eedf98dd50fc54725c440ccdb03514a6f37cab49296b6826b6bc7d7ad8cac0a3425eeb6866d94119acdad468cefe162a29e8831c77aa83321e8ae3e20e968cfe51dbf2b63f4e26c61536e6be4f63d61bbd06af38023b15f4fccb8ae0356d924dbf646bff69d1ac0d6e1c7f40b12d6d16e52d1c15958add5708bd38c514e47fe623a67c9ec211cd625b398fa7fd67a23e6e9f65d42dda2bae94524372fbc1a7e0ab3f1c451c126135536e73c573749aa60177dfb68843752b010e2cb9c1afaf51c94a48cf8ac7aab3fb200aaebcedefc6cccb581848da0121af92d9f4be002f0c2beffdfa65c36bec80e7f62d7009b1eb719d24b96e97059e6b50a52662c2c833738849f342391514349305228b29bfa9c7cf2a931558ca8e704c600148a28bd871465b23af499c11784aa45acd051f276d82789c58b14f12619372be4bc3a285f6cee21d65648d18e61752d6e7957736d3385f8ad36702c451c61ed475997d6d9f11c8be5257d8febce329aa701028aa2b5644b8515a95b5e866780e32754ac2e6f2e31b2c04a4ad35cbcbc25b23e9bf49cb1a5d877ca30880741757c29303af8676546760016f1538991b37cf0cd24ad3b1d877e5e1bd083e4b990af6ff5c0b28e530db3f463d21e76c928c8e1ffaa6c045937ea171a9071827a173e231f50e95430ae4895932c88ce048058ce6d0a50ca5c1842506158e98bb2912a61c7991a2256c97cb9050a4bb3ca32594622756291340561e9e584dd2e096263b6ff8eb898ae86f5f24500320d2d0ebb30d84cb4ef876a877dad23a611b39bf0cba5e22f2850e11c298fa23fed40691b83acc87136f8fa540b1dc40d1b0d0bd489ee9dad785c121955a094a2c6bd3353e142c04f7b88b2eb3305fd00d5eddb391b73fa2b16a6357aaa2abf2059ec979bd3ce06d5fff1c325bbe5c833a101615750613047d8155ac0c3a0734cc6aaeae7cb65d7501cb95f9d6d1161d09c961c0681547faf7983ed2efaf4e0fbb87a06169ecff1d0ee540a9223a73f75584441d4669cac09c2dbdb8aa2aed74eb9a2870f2021eb16e5f5c3e79a24d7110af4bece22a1086d27642550cadfa4f0e03f2c032a2745e1c9277a4f67fa4dc74ba056110fed3a63f643567d079c9430b8d5b3bf57a9b3f02d486d870229fee5462043b6bda8d265c745ddc1b8952bf91828d6db2edcfca7051e74df9dd456dca5e04ba469b9ff6a8130aab3903c05659b8f31cf4ba4c22511493a36541ff9d88c708dfb714d52a3c0356543e6efad37530b598bb63c3724772907abe4cad39c896c62daf5b30cd7d37eb36a7be2494353028c76e8d148b018c7bb755c45d2a33f61944071bae8316881e9aa37e4ec2374aac4f8436ed3c7db2092326538f07fc6644e0239899e3335f73c1e3c4602b12d19d7b639d4968974b6b2703ec1add8cd930cbafff4158f68f06aaac83bb4a2e31466e2ddc247ad71c5f4c49af7defd1394e21819cc24c78380caefb2ce87c0d1050680313037def12ca21cf67bb6692d6e4a9e90a9c9a0b7118ac300c6c6f636337aa25bc59cf1d9749dc183803cc0ccd1ff53210352795c6edb49ff1e5e8ebaee7b3eda6e3c0c340fa60594115e37fab60133b8a3b39d2e63db0bc6a03973e236fca801553912f93feafd8b96766049dd2066f3c5ac9222121ee9d36cbcd8f713adc8779949941f8a8dcc92ade62e46e9f1b292d5f7eced14c3bff50a811cb762ced1f103652773ef946e18569eb5892626627e085d4ffb3102c1586ddf88acbaeed903b22d3e7ccd8b8ddcdfddb872403240bc8e0e46a068f55bbddaf90fffb9a914187aac2ceedf21fefa1fe32fc7bdbb9fd76dcda1fca7b39107d308d11a118e47499dc4092ef0cd28d0d9af84440f095b4feb7adcba198894cd89a324c60ed0b996c520d4b33391bbbef1997256af7ba7ec1069244359066af81543ca23105742fee3480f890373d3205236bed566cd22a62bf69f8c0f27b714f84a203bca1605865e2cc2f9211389e0df7a4b3aab9d10826639357efe1f5fe64a1bd6d06d0b5605658c4d2d12e1bec77e70ea393b0a09043dd7d6684bd53f4c883f2f6928d99ba91873d063d43600f9105d503b11d8dc2b05e34b4fcf18e78b2b6c97d3b2c9249a2f6566ddab2a8a67fed6c9f8af2f4ef98dd579f2d4fb572e178489c503df5d5f03bee9920db347a6e734ed72ec7233387f1579c13725599a33a90915ddf03725dce20fd3806abc1029a20732380596057830ed63b6edcaa4d4418871bbfd58de1d1f2800588ed207f2016e11abd1baf1895f6096e2c75cc5916836a9ddc09cab4c28e53fadbd7d3080088131cc270095315b61011b0cea5b4d64b647bbcea54d20be1eec0992c72fc9c9771cae19191cf6a6f1840acec1deff605626d0a0d79ea8fe0af63ea75e80f8141fa8d7ca6f4c99dc7e78aeacc67762ed0134f1a0b053debfb9ccb145800b9818c2deb46f7124e8655f37c3291af107ed75384afcedb44518ca14cdea341c9657ec638531011cb957ed6b3434b736ae8c8199684cc58862638c5f6c07e1cbe8ae68c5582b1697ca9dbdd01e97023138a9173d6b1294cd99514a28102e6912b1c87ef22cdc611133bcc111e95c355a26b20a3d6f0ead66e932c5e1229b0fc17a7d6f78134c69beb362ca75017b1bf1105ac8970fad48acb8313cb3ff10e9d72c4ff11f95c2dab59575525c98653a9c7d31585a3742267c062d6ffc7a4303a3e81a45bf39e1ce2097623bba70f216aa612c64ba06ed6d596ad6abbdde69d56ab45e25ebcd4e485824449550232be26f987c14008f67c9db9d0f709f567fa44502b9e0839457e5f0aadec0395bf5c38ed8de7529708e58c0a895198fc8b2570fb6e68547630ca7f313526d392ac4776be973205f971854c300454d5",
- },
- {
- "95a17355dfa9d378a18ba20e58aa4b8711ea1d6e3c65e0b2d3c6382892c7d02768437d47ed50bf8edc619c340be7bb1cd1d88b0d3d6bbf1031f738c4be09eb264c686d39b92cc7958e63c9994a84b61b5c412999ace8a9dee0e2a29eeb8dc537f63271af5f3844ed9c0d86e6913c02ed7d2b862a132f08f311aa92fc3757342d89a5dce8dd20d5792d5c60be9862ab168d3140a061489472f2266f297da357064833ef2554c49f8120ff40b961ebcfee1d0f8e7e5722f049485f72c502c9cc4afdbb70517f0fd2a00e12596ffe285d1b37eb998e0e89d756e9491ceb13e83610a3a66122b533c2c3461b3244438f5f7a7af8088881dfdf6a29fb563ce38c4c8632ada8e7e06baa2686dc6aca6bc944e5c14d6e432c4dad554803912b8fddb1c18a59a86bc452914b2efc1599c5597f87a6edcad33a7728827bbaad0a975ecc22b7748d7cc71ec7f51adc8fe0350e67dcfb31af35a8d7b72391642e29c2fa4b796ed8f535f6bc2b1198baf1cec858aac38959f83130af55c21383ebd57d364eeb0e442104004c1599060667ce5e1191e76a89199a386e5c4bf147206e7d6e598bb27a90b3c6a54cccacb39a0ac42bf22eb40bc8ec7925376a6c57d8eac6317578ac052b72ab773f572ad961ee05531cb95ee5a6d70add4176351960fb4bd673f7db9f698616a8dd41823f2f87924c40f131e6c83bc40ab1f92312f46ee86765c306cf4a1d77275ef9668d80f9d9c1ea0aa7b2456bbcf764e009584ef1c0b4b4c683fee3fa2641f48ccf7485a8356fb3dd22f848deefadbef8050de9c5c19e8c449c6f3ec2b1324f80a7d428dc44dbb966d40244c3af03bcb410a57ad1430615e07553a22686f1a62dc6cf090aaac3707ec5b44274b7fe28c7a3a298e7a8adc71e016944875bebb421babd2b64809be3454f25b90723e2cec68467ad2d14744b15de8f9c397a505a340e85998e207cd46fa18d76c46f458af4ac3821c0ac6cd68afb72c376c31daad1a2435fc2bf333260c1a82430edaf2499e7455a93b1301eada2e12365ffcd36a1119664d0c996318a3e55bb2c04dfc5eb251f7fd64f9d83f27ea6577d748e1f85248355ed19867857dc3383e01249cc37684b0eb8e891aa663801e4ac8f0331b38686a19f0d19f6e94c7ac95ec395962be0a4e3c8358d2f6d8f13191e164ad29cd1733bde8c31c7d8ab90366e26cc9a06707dcfa60bfe139a112db827778ac348fdfe26892fed61db7e9849a464e3aad561797b6c778e0688bbbeaf3349727b4670a2d0a08f317b0dc9c4b12ea85c0309d57e754d0c7bd5c83985fb82f776c968189908a8ca83b5944767c2efc3c5f898436de54fe8bb17224012a437896d9fa106a749d12aff657266276129ec5ac12fc7a77eb06296d2a2a876d931e479d3ea201cbb4b1b20bd81471eaa33786c624013e1f07577c2171f38f0511c6924078a40c2d55ce392dd2ab0885e29f4c06907a1597c181b933853838970edad7777ed394c491cde27478eafa5b7a36520aa0779261f94b957e83ce058298dcfa07b08ecc425caeb6c599a11103d7631e77daa0d9d3fc6f42703d57f2c624ecddd56b9a27b848de7dd28f8ed656f1e4decc95a8908217e2f2453ae50b5fc1d9352d735ce5bc2b538eaae25501d449d090df793151811443c64f28d19eeaaac4081e10edca4c4148e723ade8f7e7b988b732ba08b3ce4c8a0d655bac4ff66048148135decd7727a49ac59d82ad470b5479c55d3d8399b790ff033d3ef99d770e1eacecdc140480aeca1e2167553cbbdef2090c7592b40681b733b0a0d127beefd49bcbe8904c975a5ab8b1afe56d7ed7667b5cf92f537ad6972b876843364817c20400524097ac9b405e4b35bbba0d12355a0b54bd763b4491b2acd4e8e4fcaaf8fcfd398499d4c4e81ffa93ca07a5ff51a1540f178f43a931e07e1ad56ab5ce57a2f7dc3ccca114dc9ba8a6934e95f4efe9f3f76947909b280ea5fd795bbbc0feb3ad2b704e305cd9d8f37d178961f77355eedc9d7f77c58e1db2f7797eb8682255939293c3ef7dacd2eab46c4cbbdf929aac301a13f59831a88fab173803399d96dc216abb9f079e79bbfab667ca590266891c8a7ea4bc1724573e5c5a67e9f1341b5bffaa538e240f78da7733237999ac86141b2ac0324f17609b71c885630c90befc3b027a5f01e33979165ce2a00968c414838446c2aba76e1d7fe3707c742f68af21d30e23b637accc848f6c8df820a27bb4e94e5090ac6e008fde7cf3fdd5931fa891335ec8d01b5d6f77db57a87dc35d6701adf7ae0bf82dda6511c83ab4d7d3460b221eeb3d6c4aa537924db5559b1c6739040534fc330f5144c78bf99f5f4faa715e85aebac043e2529197a82ca40f65a8149a9447a9e58c61618600b0c5ab221420c0cee114a133a648dbc2eceb2894ffc329376d1eb3ce7039cf30ff6a53038b23c26c38739fdebc7b919956ca2e468d577dea6621a8d66b78075ad26a6e6d8e20c9b694698540d516ea2bd108625e5fd038b5f1e19c5d5993b82bfe16897c375322dbbca81c81cef6ad900f0ffe5ed02714c208a12f5234d78e32ee07af155ad1e1077a0d8938f426d8f326c751f6ee66c8f707e8493cbfc76f9ddf1ea329e094315a91ba9385e16c890823db0f0231c7f939a042665009d5edd8e48102c515341fa6eea33cc00fb5d82380d735b29f2eec3f61428f7b186d43fcee46b2037ad1aa6974d729848cf1a80dc8ddb0580c9c876def06d8f7642cf45263a655ee77f047fcd76171546319622bf71283f3bf0b519e123a85765779c8bb201e99981ed184e642f63aa61f9cc206bf45fa6e514bfc637671d9cdfba2891bb112a3cff438a6372ee0dd3e7d9f352ce52f8b367b7799e1f963bfe50638f0c74b94873fcd3d66fc1e342a8bd36fb8b88f33eefabb78eca4dc9c89e2c57aaa010f2140dc5ea7c86cebe2f8bf42a167d1d546cc80bfa9258c35af6efb1a090c293a4cf588e4bdf5c090ee7fe38fd7b5551e71e5ce2b0b5a50bab95bc4c257edfc94d37579816b4a2249ba05c991bb2ea02d047e480fc8a8ba71f48f344c6d20d140a64ac20184e45b4eea14d0953370c237ef0a47a7a2f22997715dd3ee8ea52f24ffe12674d571b3bf968454ca051701e411499bc43bb55bbd033f9b81d4baa6c49bdd49614efd20d58175af868ca16a9deaf65216abbdc3beed5f30b209e786a5b4c006f3bd27d93e9d78b51a1a2fb7f5160a0bc1b7df70952ea1573888ddde3d9dd5314b0d0a899a733eb48d5e6c7274667e362e4da6b37c480aa4d0d8730e66483fb1453a3aefad69942ac7f09d3c571b6275590938c541336a121bdd20722550236a9a5e4a37c7de628fceffbc260b1e9b6417c4295907937b13609b8585ebb8f076073abdcf19104ed80ffafe1b09997f115d987a552be5689c70fe125ca702d2ae4d807d5690bc2e90b72cabb0b61ad203b34c68df21c16b92bf8def5680b204ce327214c32e4363d5600f96162a6819dda472acc6441858f396385a16fa5ee52cc0f9ffef3d53c49d535aa37db2cd4b573ff81d74006677969ec1ad891082b5d18ca5b0b9f975574ccffaca72b805c9f7fdd76bfe3dd384dc953255a5b50b7731a137fb9aad42e77d3da1eff5a7b9eda5814993cf2d289bb25ae1680ffcdf419e073d38b4701021adb2019359bb70ff4cca930be7bb979a0678f20665d14803d8753c8ce54cae92feb026486ba747a861daa449863bd38cb4d5831aa6db1e7f404b0c3587aac8765aeecec686066ee7d11321574f04d3f3da571e71222ce07277eca7ff97607",
- "5e24f34a8d53b17bd0c2aee5369e3276dbd7e7c2ea0990f1300fbbb00831b76655aab1e2fd625ecd",
- "c1d796f1e651a1ee825855d80206baff6818cc8c247ee6ce62b7531e6e9ac32f",
- "240cb25aaae4d085bbb747a5",
- "319e968ad291ea5d4a057c38f7afa4ddb9c9565962fa1a7b231e397a268ad8e0c5030a2df09dc4f99402ddf2e0d06e753bf55e1b318b3e5ff0108de2328d3b8d53e23e08bf7d84d59fededd60d47bbb52736b0491f82c616eb5f779c496abd6499555035e4513c8613e7204e6bff8d06dfecd9ce38c6b83efd8d0e41f84f7cfc9ae07113237987a4b2eaa87f7e0a310155e282e57858244e9071712fa026cb781e5a4bfe6fa1bc480e534096394459a3d1354e2d9a54aac6926a60b388410fd0b53f7a3a9116292f37406369c22ea674418c4deeead171e00f74f5cabae5d24a0686a4bcd8ba99aea613a23edd0a019a319daa3779c212fbdca9d772fc3fe612cf178c2aca2aeaf6bce2433494027a474eff699bba95fc7dcf79ca1d77b1e097439a9050a5cc78e0b78bf2e7f50f959ea2986a59be3880519cd84d0a673acb0432feb1945c603e70748445c74600ccfec60efcf9e4d02a7df5f967de4b473f63b0b0499ff4ba350ec1182f3a0ac17ef9ae28945fc9bc714c49909a7c1e2f311aa6ad7652e22e1f48bb51cf53814a2125152813752d86c7f9468a991d0ac84b1a2f3969b8081c228b7f5760718036e26a10e211ff04ea323acdaaddf9b06a08c92ed663d0fdf13fa601cda45c416c2d3803dd9b5ca29cba57e59cf4ad93176c65c64507b1995d638541c90b381ff758833a2ad67b0de44c280fdfd82b3c6d4353ae30b33768863cd3169a2032f26e37ddd57e7da1673cfc7375bf6e6792495a2b434155d684f2a6f2b919f944469d47be5aa7da74eed69d871e6f65c3ae08904a9ad042ba39905188f0b9158fd14094bd6a408fba6ef57566d69eccda86bb54cd3ca7381f51bffeaf8bcc1ae8df91d22c359888e21b70f640d6f3726a34e6100ee269124747f0ca05110f63deee07e3628bd6aacf926036ccec02c0b6bd7259db52ea8b7a686b36ba1d0296c85e43e25d72ce46c66a1e646301dafd2f4c502281e6f949011cea69459c026c65bd130d6ef06be17b23a9c9a84746e39d017b144135025ac527c1e653f233770cd68e9f232c3b623ceda836843b3e9ea313cc6a57d28ce71ccfb7265ce73b06bce1447220645e6f66caeb06b55129b97c8dd8db54c94d771504d24cedc86a8ec706a9f7dcbbcd7fc7cf38005b2913b1cfb77370bd23183ac7b5ca5135a2738cc91d05b2b22640469e3daeb6a7b0f14fc6652563663520f7754aba624a35e5d24529a6ee9f5ef0d019d83c04f5a93a38b68cbce0cecd42a11aae305475806326aebb4f673791f50c9f90894add51a0fd7c02807efd8c1bd21fa717a860e224bc9fa3f40975fd8d558e4844a09f8920256528450d77e546604e2ce2d38efadaf39a0ea3ea12156174aa8a20481e6c1190e448564675f9ca60bcef37cacec5aa218122e7bd25b571ff10f54979d62018b779a2a3d5d7d6cd56ae31efef2c844ba50ff9da88eba7a8e0d9fc5388a805ba4ad35eaa4798e395d2fe112083cce2f11cc850d25ca5c6e60a9996cee4789ca99d519daedb62f4fb1e535b742a35d71d7390117e93821ff18948a78c1fcdcb90a5f1211327d7ee0663ef16ff446e0e22d8cb7b2d3d05469b1c02864f4a87e2d9715f60c9e7be841e308d0a5f6c50161a4a0464aebafb88e0d2df8cefcead93c9623106d5518a9852f320235594be10c45bc0cf06c9daa007100ff97959357f9be8e49c870d0a11c884213e266c35e9131439fb3654fd5f1abd1e778ccb02b8c262753a22653a09272a0c33b6b2683c9045e8f967af756b98dc1797ff605c64ac5bda8252e9ebfe0e4d8d7ca754fcca5e3de3c4b63678da095281d76d60fa12ff4ca818825f346b9c4e426cee16db5818d78a527a901cd088bc2983f9b83430b50683018996996717a1738439680b68e3f61cbdcd0f0e1a6b436af8fa05d3ce2228054e319bad1dc6ac970c75313c552fc1136fabc302fcd1d09ef1b9138d18133a772cbd9cb197ff58c6e898f9e83e4e27206f3b15b6bf2778aaf9fb38e0d50152f8dbf5763816132a04b4b2e9639584b3dc8ea6d95ade024f9497944200ab0aeab206ef099859b9240aaa15f737c1e0fe6d015d04f47261ade4928e3c2ca21d1f5ab4a3f571f2ed92ebeeebf2493e6e39f0063ba931e165384ee1b5081f5f8d26ec24716757037f5158d35effbe67009080ad7b0381292a513f312eb28328cf5ff47a6599e36c14277c3eb5053c5aca530ff5954c21c03fb3fd5fc0facdac36dd819b0495fde421411e0440991da0cc4a20d294446115c0b79045037fbfacfeac574da3bf192fec4bf38c27cef71d03787430223b6069ba6d9273ec8679736a832277c657862ca791b559a5054ee8c7c07618083f75480c8aa01cb086c7317315911802e6cefb15bbe20494b14d97e3a885806db775c216dc15949e3b724f7cbb30bd2c46bd5a2fd6132352c2b21cc2b47891dd9794975f70a6fa7a0791ee761ccf4c263f27f64790826c1aa656c39483e029baef0855935e7e6c133a4035a3699925fbde131ca62948879373346af35bd7fa52b8d6c3338f213bbd9c79977c0d710028d1d386df614c5faf4a1f8fe5506a9af7059370893ff6d07d91383baba67a617b5d829e0e2eb20e541ed5c34be7ef0eaf6c6f6f52d7ca01933a2a4e8de46e422dc95161ba8ad354f6bc7c8e4cf8ab5e08607530147fcd7c9481afc621c5a3230a05e2c4db79db9e1e73f43556a8e8f0dff7ffe420282212f23d4c5f6f8d2febe129b9fe5ba7ddf27f72ae898a4eba270b5d2bb3b6b06e38c546ba80a9b2bc46097d0b47db5ae72485ef2c6419e856c33c2d66a861b9d474699e730eb8a8992e3ea9c1ed74316687d5d9fc611189eba2aa31af5ba8e81179866dc016bda977c59c595e40001c8ab3a4a44cec00ff84c6dbd9ad4be30bcc080e69b9398089d6ea464a70f536ace3b447693301c94850606d0de1299770b5f45e6d28f8ab83e3ffe52178522eb91fdaa9e4a696674ba0f52ee18e960b04415782f018d67479081b1bf9b4c9b90de026cbb66bf7d9d12cddccdd9b2c8ee2f010892571c6f0c0feac9555c71bf61f9cd69553cf7fc2be8d058e0c3430e134adb1ba28985fdc4f0cf71bd3cd09f5f82f303cded0de62f98404477bdd0a846c6c51e3e82ebf72f475afc8e6388aec57206018ba2528ede194345cc1ee95cb2023793f692f708aac3c9e8a682af36b078f5d6c7a3ed07475e9fe73b95d1eee048ab898edfee3fac4beda45f03eeb64b2128f6df9453ed77c6010e13c0270c068f704f49e62fb7410be90ffee47584ca2efc5287dae1f63bcc1819e7548eb9f0d8a3182f9ed00da3817255a2ff735876b75cd21cb25e86aa4b2893f9e5089dfac76194563f9a14335dd37ef06a501c89623caaf6feb4afb792092dfed515ba7518e278c341834a9dd17b50a0fc860b62ec621b69408cb3fbf7d4ab88a3e367fda84c82357376fa9b1161b739361c313b99dcbf4122f3870c8175093298cf432174217398928983ab6cea4759f18e7a21d71fe1b0f3cda05d241e12db0818b8763bd23d958d6e52981ce8d84cd6d82640d2000874a53c0bd14949ec99e48ce6c954ef0d08e6e319de5ebf7e142f25c0f50ff13f6acecde6a270c8d8de05ef4c310ce9e92f40f6f2b77d6e7aa3f056d4a20f7faa7cd0b93d82e3972343a50a26ff462caada10621bc953b73913944246d2a4da25fa52cc6ee1293c436ab9031ee2dc79cce39f139f44d473c236731257c6f65ca4d383e39cf8d33923afea3c80244021d36e0ed43230c44e7d1a1297d35464861f9149d869f26cc51879027169803e43c898d1b4a2a2480197500",
- },
- {
- "2158abc2472e1b9c061da2c01d0ad9e996fd687cccca331fe8a2baacd12c06f284b1b5cbdfd067e5ed09a60a137ff4a97c5c26482659680ffb22bbcd4ec1bfd272749e52440537320fdd3c225c30ccd98cf221b34b89c247ab7d14f93ed3ccb0486a028c6f3abe7e17fba1742b6d4db85f6e6baaf82df1a3aa059de8d9699821d39bad42d56cc1ec67626092cfad4a2e1cb5d814e2cab78ccf5474a8bd0dc990a877d37de394694af6cadcc57727f393dccba7bf955f4b65b3c00d71cdd701754ed4f231685b7b5e2557239d7e16305be2d81a773765dcea25ea5bf2c15d670f3159409ab5bbf8da121c779132a8ec1480068cb76b68a19152fd83135aeb228b446225f91d1ed4303a4bc16cf3ad8173b30d2a1e75ccafc8c933db231efeae6260d45c7ef230ae2c7b6f986f1c19e2cf260ded9cd99d64a2d03fc5ee3d73509e47ac1c39dcca655839fec75517a9243eb611da8fae3e317e7df66cbb6abd59b16975eb463f509e784e65cd660ef1a4c5027e54b1bc862f397c9cf4e6594d98c2c2830801d3a679220b46881a372cdf3aaa33eb66b91a9f36b6941c0fe1b4d2a437daa50b811f2d8c65b5a69de185d78bb9c2f172dc90a89324c5a2067974aab14f4fbcd06ee95cd49e03717f88480a410afbb4e68b5c79b0211cb69b90604cdfaf08af1ef10cf28f0f630e97ab18d9b5138d9b9ee9154e0b3104a6c164f2a114fa5032eb5c247a6b87880332a0dce7b36982515297a05dc8a4038a09f52b1def7b4fdad8735443fadc462c7c22132f8b9581de2d213bf5c53f7fce34aaeb24263afefead5341a72f88d3acaae6db367c5c14a97d4f9e438e1e11c3c8fde7ee37e5ece5382e8c68b660146046ef96c24caa6bc9fa0a0c88281e4bf01b32df5218cb3750f9c4b8af24cc106abca62d085198d14ba2ded3cafc1fbb17519a696965a1ba5f65720e893f1ef3fbc5200316b9d4615bb23426ae53e1c5a57b2f0ee0d0c83f353b4ebe7a6cb17531d278478b4ca8e6ffdd0cad30ed73d568a2e44972ac88a7e7d665614316d674e84ebc739b645a9a4166477254ba47bc5c2b05ced88e75bf64da21a7f1f71cd946d84de13ca77b7e0dc2f0617d371ed96323a83bb11dfa16f81bbde913d9c259b10f3aeeb6b56cc4775c25f49343cef667763118932c2e8b47ec745ac537b37746ed65fda2d1c11a2de60ec02adcb79152e8a9e614d8715cc4e6b6891d6a0063576560fa3621146308222432ffdbc351c36c37d844a934088fea92ac54920facf870a62e91ba9299dcb6cbdb918e2d54fb642c3f0d60489c4bda489f6c584b64c8f19359ab25f388dbbe636c4d90c048f5ed87024dcf9f98a9e738163f837a07750d61203254a80d120c795f9c3aa791272f9474fe330da81a45be5ac838613d46c25e781606862912ff88af393040605fd4d55d07e2052227c37ceffcdd2d42a08bbab69140dfa4406853799893daf768af546f915a91b81d0da719ebd45b8b5f1641f15621959689e810217bea18e3996c532ac6e4e2e4f289fddd5e5968bd6fa9aec5ca435c532b6c74a7568c8aeff9dd19bfc2fba3b484a191e2faf9a069a24e2e6d928ac0bdf635644cc1ef3bbacc547a8e4f1d42d4bed3b6b8cc56216fa550dc37da9cf4d1d1591d9348594d14adc7a3fde5e5d1a3b9875c85de7df483cdd0baa86dae793e0796d14fef1f649de6079acbec6b6fa5f2cb2bd0481f5316f00dbe5dbc379bc3cd6d13bd8c775a727ef43e6a5fad1051783b22c05a75d64a8394a73fcb430299b015563c8cb0ae0aa4ec750399855411c076d21aeca8656f3d0cae084fb0a1ffc6f73b52a7ea5d4bd6d24e7057a3811719533105fc967439a32241f2d3e3f299da2deb821748cdee1a1c5e71bfdf88d833bade2f505268f375a9e6488cd8e16705cce91d15b60b2fd269a19148296a7be348aa349a12270fbc0d5748e538afeb0598081a4f1349217ceab3c4141d40f765ea2bfffd530fb9606601469fb131a44939be984c07bac8f26d8c068accfdefb729eeb47cfd6ddc646e22031f53a7698c6501d86cbba05e282d64b2f962a1b08b9064078dd1e3f14006f45f599bc8e600cabe6d855fcbae8c3060859202361d929a241f6c0711ac0d050b67a1d44da19e0b0e236adad1f60a327c9c34b2b9c64cdde5b8e4f664f2fc70599d44a63ee2b14d051c27d71231098ecd3d4086038d63e84547dfaa39db1a92785e38b640ea0345062a1c185b25a72862e7ae6574114eba592d6492087e2580dc5d361c473a614d647e66c0a30de806f4976b69a8b92301e68794ee05b96ee116a5fd5edf5eab43dc1103801eec861383f17c2bab9f2d9126c1802b7aee0c909309ee72679ab644abb9c4caa54add283b5954e6f881781e42f849bce6554c7a5e3becc5d5a209805ccd4a0117272a53807e3978ffb19641a9dffd9034490a9284f658599961daf52f24f6464c2099cc9ed3459d84dbde2ebbdbbeef25c882a9beda03573bdd4c6a0143b14d634a1a021d5f9fa23a7ed0f5598ee57e56672814412b6c7c08b8e709fb98575fe2716100d000a20a7e7200d800e556564c7e6a8da9d609b18ff0bb8a8812e96b834a6b534b0d5dc97f5da17f42f8d58e763f1b201625d1a5158c2f9e9e190921637474ae81d278002f197f7211540088931ca8a941794e56067ef4a497fdc6fa713aa9f20c21f23c3a71ae4cc5aed459ca7c020bf55162fbcf56a066546660c5a009b8ad2aaae9651c97b1e145853a10013d1bf68e7df25dd492c328f823ed982da54557502ebc6cc56d4d0bf2881bf3c536ea53b4dcb0886e73b066969dfec343441b9372d7ff38454c4337d45e2b999415ec48f19cd05f0f80c5a61ec369610784f47a5cf3b2a13ff5d8145303ade7189a300936006846812dec9ff15500f8daf47236e724d72619af3a6cb3e854cb8284d5b8843dfe056beaa45c40a4541a98c7507feb27a605d6e07189c8c5554a492a03ce6701d3d2ec782e2c1c8346b54a963435bdda3a93bbac1d837172cebb9cd18903d25cd6bed404eaf18730a6d1c6da0783b5411770ed34f35fa6c11a4292a34565ff1b23d4200ec5a73e6b7905458088fac19f6aafd35e0e791f28bbb2cb0117ca1c3a9e3c4863e487ce5d8c14dd140e9eb4794d87d75b01f683bca84ebdbf19dafab716421bfac9e95755fd346a0cd31e8520a55c7ca652ff63fb4e20ba67fab41e11f7390bc02363162097802c6a9eb18b430d07ea60064d5b546d15bb68cada79c113848136e797577f1783e9b53574f9427be3a28230fdd69d139205dd6c7e9e7f031fb6eab70d69ce905384c5c77d084360aac590a89b2dbb2d339899b13619b455cf9f0cdc08db6c5b5f3223dc3a663ce42bcc8cc6f947f42cdf8dde15a6926b753177513a52be95b1f0b88d2a1ec90e49959b108fe204bbc29199d7382c42ad5dbaff970cbd2dbeade54bd70415e54daa805d396361f525f38efc2bba3fd818f9d7af0594dcc341c20f18c624fe13ce7e7108e1d2fd06c58b03f04642c95e3ba00d4035ea0476ac138f72378d85050bf60dedc90af38e96f67fdc38483a73e847b41d31b894ddcb234f02b0d507bbcb15a8941f9c23b592a291cbeacb3ed213f2f044aa842275a7717757467f121294bba6b357c969e96bfab455c6f328d9e5181d909c3f0543b17d9af7fcac099067b043be79aca8e5a75c3a6d4f6246357a63c516a3ca595447f34b43a055d3070517c67ec36e636aca9ed71a001d4f7b81149124deeb7826dec3697e183d861d544c9c17baff82849d599e9e77ed19f801aa1ce095940674576ff270ac788d00c429187e299a03c6f3a1646a8f7d6290287e70bd1276316ae624da929c67936191abdfba45e2803884e5a3136205a38a841448968a7900709dda033a42969bd3417a8d865d0dbee1f261f4556797dfebab278136a182a63e5ca9789e3f1371808efe06eb0cc5ccfe26c0538d573378035afa39fb7cdf3ad889b277c8c6e84954e74f3ff3140bf13bcb45c822784125d23b5eceb73e",
- "088fc7ba068f80efd8d4d62813c93c1eba77e9ff400c7781314abc901873ce200295da09245bf8fd2fce254397616151d94b511957c89a881256182ac9e64acb7b25d4a080cc9daf9ac2f231235483fc9fd415f69caf7eaf0597",
- "78d5f86b071bbf8a185e5e2d54faddd2a9e26983b1e7a74be0f0b979b9f4af31",
- "d9ce7d249af9496e99c93b36",
- "ad542824b49fc520f0b7ff8ce2bff8b3d47baacb4a1c95ed56a306483aac551fffba48e8a8f5e4cc536e9266182f6811d070fb9282f5c542cefb4993ccc7044b42cfd6fc71793dc8dd2de23c630f9ceaeddba45efed9d7fca25fcb07d193c000822478b19c2ee9fb31760cfe01475ba8a003db469d1130318a79345a29d054a9f9412dca1edf6d8f1498af5bb6fdbbd3d5f9a244ff176f62742c53779291ef6294df6540d841f4ee8c7c58fc8497ba74d9cf7947add5373427d81ae928305b93dd26cfc65e63b0ed0812ce759511bfbb10aca98f2abdbc9055c4e5ab82637f6a965bb74f592bdf11118b8eb79d50331e76cb4d10c6b4428cd4ec2ef4cb727bdba2b5375f5184d77772d0f9fd3a3c579a4a548b9c2dadc22c805ae959617af49a514b43f47af834313ed2e4d1fcec2c4b9ea87f328fa3d23129a36e6c54bcd08f7e30645de86e98ebb11bcaf99543503eb1e024bc9fd51fe6bd5e6d749033f2452cdf28b3d0f8a304111bdd26dbde641c02fcb15dc21b1a9baac5e86d35b4126ed1cc8a2c3c2a5b94c99fb9b2008daf1a0c090633bf9e31326428c75a50e821b1e72a6504c9d7bcfcaabecd929163d365832e8971f5efebff99ee3f5b95f957e8904d05b410936d8a81c60b4947f8605c58e5b727d491995c76fbe06e556c8ab5cc661a0c09ebc98d61010050f68b31fbe1f9de8f6481b2704204b0164d8433ba4dc1076908c782826e9b555e8d608463581099a466f92bfd6ac9796eacc0ab771a3f11d03806b0f33ec04c69cef6b87d58c11acb5d1374450ce61ba159456b915043c5c17cb03f0ba66d027105bb6fff41e6422f13e2a466f073358bf68149a3b577cfba7ea08b42f83fbc5a2aff17c5ee7dbdac3ff97389f5b8d1f3750e5c9be651209eeb9574127ea81bd7619da16d1cfab85754883543f6474c8c0cc9d5b80e34bf8262d2b4798f9917bcab4b880339397907a5bafe7d149247fd735523df3cbb17ae5e298846ad3bfb7d4f902aa549b7667d3ea945b002e7b209bc83842a7b120d6d27ce80631404371f31d1f61efc5423e1822032a1cbf4fa1a6b6fe79934a202d5add8c6e3595e49be3dd9553a569521c50e9653bc684ef2b73c3526ff7a0843fcac9cc9ecf46e63df5b9328a54c576bd299a366bbdc0f83a9de67b03f1da16244bd6d52e7e4b52c4ed693827735554b05b3a260cd01a41d7c944d0b7b58ae4b0eb052da34bc22b779d7ad46f90f3d4049c097e0adeaf71bbb30ed24b32ff5c7a65177db77492c2571e9cd99f15e613797e319ea7377038d53b28a4cd66a697e5e8f84cf16bd0f0430b34826114b4e1d1ebaaf2939dff7f9f4ce7c0861e51701c42d9cc9e871018b447ccaf4e402e3d63be164dcdf6799314a389ada8bf5e51a35148acf627e51481b9b0e4bec09c9e6d59229721b151fa9adf8323001fcf33afbc9a949643172f39b0d10ef57b37973683fdd9b9eb46e63054fd05ffbef889ff8fc8f251b0ab41fb00757ec1964ef373fceb8f6d148a7f7c89944b3cfc240d091601b23046188ba70a7cdf7b6f96eb93dcd3d24d4aebdc4a29a749bfe3cf5f6e1a025b62982ce188e6b57245d829c9fc1dcaaa5309a8b9557b8824a78eceef6e977721de4065b474ae008642b974001a5565ef5fe4250194e8b861cc45a8691c461817f10b646fb526bf0fe7790bb0db29d1356e8c7a197ec78df8310431d632a032b5490c2a458eb8d4327a9679d7e8ef8739797b0e820e2c567ce3562592e862a1dfcecd50bf77fcfcd00518db65ee0effb9eb3655d5d401a4a47808faa596d17b316f828cbbc14a7e018a0593da9320140a752f3824b5fcb66aa4c3cb94366ee8b821b09e7bea2c04ece15e8a7be1f58463b525e8cfcfc3fdd395ec5b0575094313557e632d0a65e3099e3c653111a5fb4f0eb2aa710229fc055a2bfd8a7147cbecc10823f1244fbb6894af1408ff9047d6483ef83573b5421b9798ee387dc38f166b11de6c33e9785e9b3d9d28bc24c37890e4f8f8ff24cca298b44d6fb1c6aad28cc634a67dd427205285521a172c2a4884ac5b038e261e38faf0086a02aa29195713cea335c47d03d67fa0dec7a8cb21db741519f5f0ba0143f14d71e33d82c75d6a19b3f7a42e6c16d762354daa2670ffa55bd400637de9cddf9e7964a03b4c8956f36bf54d89cf16de23e8c52957b52eb4572a11d1398be72bdb129e2c1abb58c65cc291bb7b0d2dc326c6125a441863a6c92de0f47a355222d58bf10af0d297a86a98b4e933a8f844fc7f1bbc8ba77919dfc50c41219e3db309b92ba056349faa758daf360b8ac05e43fc2069cd46e63fec399cd7764b111467fc65407ac06f5f84a3179930f6215ac5ec906146c19e0d3e162e77a2bca3582128284282b251cdcac03ecc204266ac3a9cfe8d8854008baf89c0ea0096a400d6a0d2f7c681c99462cf0105f7a3dde690ece0438fbb820b9c73c6cdf6208c336831101b904526cf8ac331d879d71615d8b1f750ac7f0ec692d97a5e21e17e194a98c10172b5c4bc1049a8743188ae7c4d70384a7e68c1353aab7882bb91aa383821046ed0ebabb4b2dd126ccb935f48646b299095cdb71ecd5cc402e4635a3f7a3c8a6f54f4076ba028dedb402bcc92f5668dec3d91dda7319f58382017e306237e42480ee2c1f5930564cf16fdf37a3434585336b8e4535bba87311cd47722b9da727250560624a5dde48a2090ee44592d2fc06edda634b600fad9f843c6b2eaa0697b42858afee8191dd2a31e5685bd104188e2ccb057dd0a8d4d1205d7c846f5b8ec0f06bff61c7f47ac4da30e1bc80a4e95af79b14a83e9af2e0f195cb92d14f752a5f12ff90a05765be453075d799694848fcddb07859336ec101c8052bdc273d4abc313cfb351b543fa340dcd01bf32fea59881ddb8f33c6023ccea70532814ce4a2d0c66c846347b86c29dfc34f6fa4db298911d4367c59939020a3d078194e6a3a3c5126c24ed182398468e77fd61a5b1271f5cb2a97868876954c3f7179d6a045f4bd770f681cd82216cd2b1ceeb4e724b3fddeb74481e662fbd7f5dd45bed6d4f89d21b8dd9c1009ad2b0b16954e97993ab8f3fdd9d61f8db102a945591b4552f419971a9e46a792dd8392c8d9502767c82d9b4f69e66071eb579859e9ca070cad5fe3b7fcb77b8474926ea991ce7ad201421f8a79c051b762a066027ab2b9595a1c97ad57f3149f5872ed4d8e99195d47bd3c03bbee590a50a99d8048e912aaeed797977b52f0240a6cf2c865b108456881adbfda60cf701454da17bae879cf098df808f34e50bccaada2d3edeb1aa73cfe3c512d814eb33897b6ff9d67d3d682517cc333c3c2552adc99860b1f0d1076390de9f84fcc9e802581f77e14f5254da01831c70cb8581630dadb44209377d90447a1a21cc8a2d6d897db62d8420afbcc6ed85ce42f3281255bd43e0afd3e86b27d3b957104ef54959282b0e1b381a26f16057246704c7888126055af5a1f494540f01897e8781e1a5c0193b7bef4b5588d0e9b9c8de74dcdb63f03f7b15cf48fbb71c7c3bbe9329e3d326988bad7d0cb85537c1e0b3cd88f37a3c7765f548f99e495ddc29daed8c7f15dadf2e5b79def91dbbea277c51a5da250e66c305604bcce4789ca2df9a10614d72824ba8e4f179f35ccae7119fd962cce13b282f0f970ca6c4776374c4bc438f0de98aa04fb3cf23d2c6800a4a666c15bd20c486e88e688ff9e5fce906b4ae96ec7c3388d7567ce6c8bc61f6d2373b93f9ddbb02b384084b3f28f54c9ddda232d3084daa5fac5ca356ac0059f2fd3fde5d6a9516d0954653b699aa986f70733538e19721daa41329abb95058450e602eb5726ad5a8b81aa474650659c6f7f6f53f8a6e635bf35f4b1191e0dbefad3be756c6141c7d55f007f4fd131e5d5eaa120ba31cc32b8d4c69d4fa784fe0af7dc272898789c774e7995cb252eb6c8e8053c9e7adb59c27f675952d161dba78bdfb15859fdfe4fe4a44c01efd394bf51d43c600aa9a527d9c490971e188e28b980e77a9c6ea0a4ef6bd38d11b47f5745ecdb",
- },
- {
- "9cd1c25b5bdab9b9080db3e5e05dc749e0783087c310777d89307138613bdffe0ca259677c13208420d4690031314a11a97a986d8b0fea143f5b4da0972c9ea3cef80b4b0b2bcf2bff392c306a764113f0d9807be86a9027c6ddc85d096600d85e0b236937f295362bc1679537a8a9278229a36a9433925a105ab719c0b7f11fc31488fa071d3032de97c81540713dc29ae02c2e13be8823183f3cd9f72ef8ba4280b4499ee47c7c7c4492bcb5cf7e4fafaa7ec26906e58146215a3d4f52f792d3abdb718f57ed0b9b7fc7504e45a0fdf01ebf5924a4da6ac635a715879ea75a4983cbd9dab9e47638acc687f16684e184443aa9e81513ae4abbc4d1596b2ca3eef77cc9b0603fe90c0570fe6cf4dff0381a99212fadcf7968934ac1ff7664ed6ee0b61e41f5074dfb774b676c2b57a445f1c5749e95ed062837c727ae2c151c0ccb3a4dc1429bbcb9e62325117aca566b8fca0924b70f4defd7749d0389b90f55f35d1635f8d2efdef514f06fde46db6e11e492c8f4dfb7cb5454cedd0ddd32013a4836321a25110f3a017f18475a86583e192132f8d8fd4c2dcb2a3aa95c3be3a57216bf9727cfd1284eea6fa870c8e689e91982c116ceeee2f8298b55646efad684b96eab883fd3d629437e9a0b6523f47ea5b59474a4766ccd01c13170bb08f47576a0fdb573d4dfb65279c1b79cb535426bcab60f4022dc42e40db29f15a6148b461241bae62070389932f035e7257752ef2d6130503d72344b24d360cae8ec11fa2dcbe04d3b18e66d081b552e93a71dc0094d1046bf4491e318f2ae00debffa0b8ada58c5f23e33fb598829ec2f46ad3894bd7f530210371a02e51ae0a414eb2eee43f3e08126dbdbae04c7de4b7416df32953234a6694ea84e6889f27c74206ab8144a393a2614e92adcc77550dd54827387b619f004c13f6c4a31e8bf525277669db0a0c3c589eda15063f12eb774a13e2aba2f2f7b6e9bc69f8485f1d6fc5773acf83671812412d28704003e78a17da25bacd1d61a6d9cb9f121abc71d023bcafa713b7c954e4e1c524e5bcaefd86c4a843e209eabbd579cde0263fc059ec6ff10017ba54fc9c2a1171d6b06f5d85079167117c12e6e5d0c71c008765fce756fd0f1141fbad6c1d2f32cd8e80429611a9a78dbc8e738d458f9ddce58ab43c77b34db9befb25cc1a588998e8dc2efa75c6883244fbbf9a7b4d6750c81b8d3fdedaf98dc61f49d067c369409f984b155ec347a3bef73e2a44957b0ca0f84c7fc335fd89453759ad0ac2fd9a5b38afa9fbe74daaee7bc52301302fb2286c21fb922f74d756de84519171fbecaa9b869682d431614ff6845126a4034f10253aa244bf89ab8e0dfd1f7fe8fc1a8472a10746d26896c8ece7ef80eb2e910069435518ccf096caeda63ad692455b04e6525bb8bae27197ca5118a57fb9a5d8fcfae1b9eb7874d91eafafa0e4fab5cb4d0173f7e3e58fae369843a641e98f3ee460e8cfe95d98f7fd38a8d2235e9d6050015833e6d7d21d7015c3b1ff42f0d3a3d9a38d373c8524752e06987c9408cca550f08c38c2a9a8d86d5ac7a04bab44254ed15c7b5670e0747788e11b81adb0d29e3d0b50d6a429340ee0d44a8c286fcaf9bc46403d26b4a4af95b021336103c1ae0f1274b33bb8b21c8cfca8a56c639f18a9df45d083fa7019aaa14d1ba50eb9a4112e574cd70969640602096265a87b1f77c0e00bbb501555f1626196611b4a824991cf10ab2874a12a8e0390267eaf9e3f8f99eadfbf40d111a26772cda1f50743c417eeec9c80171a83a730f246cf31c6691c96185d672a0fde9ccd7091c4b455dc93326913497396e0a4992773caeddcd783e534eb0f34b99bf23a2db6ee738381b5fc94ff603be014c507888ff55557793a8c5439b11dc5a347f35a2666eda81cda4d1c3a78fc4f3df3c7bde91d05524791b67142c446f60c3a4022912ddabdf817ca3280b671beaa496c935661e5adf39c1f4650563c5c807c8f21aa59df926199c4e2404690ea8ffd7dd65f637452ff93995fe9c5ac7a322b9bdc756b7ed6f533b9357a4a1ffa379dd096f144e9e0d87330c238ed3c6b08c8478e23b65518ea1e4e64585e5e9fec2f26dd7400ce4c73ff0eacdc3b07e4f34f6316f5b82fefc66e442ecc92bea8c1d58635d644724a3380e71fbbeef4bf3e57c6240ff603d65447f510eaa3c9ac794fd24f844489b7c560c7814fbc307e03f6a213eca5ea40fddf51d8731b74ec5b472bdf8ba59751065ed2461b02c41ef96622e60c0d26f9dc78c24f94372bef7e47cf09ed565ae3a52d39b02ffddf1953f1ff500f1659db9f1c2b23534702c19ec1cb7c18166fcd33997d53874c7cdb4e6c2b4d82751911913434e48b37a61a0971861187e5decb7f5c1ef6988bc1d6f7fd147a623d8bf361b0d7ece88df6e1ff8d037762d232e22e51d8c6ddaa9dc597b23ff9efbbfd416cc53e5543253732a23aba151cecf73b3ecff21c6a9fd1f24211fc21cde9633aae918ff1c6b72468f1de7e0ecb6539fa353c069fcbe8920dfa8e2fb86782e3062462f7eb2a2c441bfac21ab62744b05c70b6fc3c9f8e3a8a0c5a4263ed256a019861ecb28e20ce78e2d93f1a1def669e9652cb35d105bfdd5ff2313d27ab3eb00d1b628b4c20f42efa23390802af96a8f261ded3678ea0b780e1f4a88d23588a4ebb058adbf9a9c62ce2ce2f8264c874c697482e25f8d5a6daca4f57fd97d23c42d7b71ec150d4ee33931db5f7d63abe7d72dc936bb23a367c798e6a01509644284d52f9ae27d7d1bae597b2cbc26139354dcca0fff6d76c6065d661b66ca5eeb9f8d85810a029cb95b17e5173ef8ab92d475a1d3e21799e874ff04dbc962c668ef4be9f94d85b2a99d97c0db8f6b6d63e00e36c325cfab9aceaf7597113bff0086e8fad36eac7c0b443de6d3a8533789616d4c863df7200ba795a3b8d0a2b9568bb32af95fa604a3e3ea778c3dae159e1b612458584564ffda07b8aba9710134242b2d83d23127b51b9e41584c56f667b71bc01060240f3a2bc7e5d438e7095c1236e0e468079a83a5dbdcf132d258e9ed18f94d3c098867d06d3c09544565677b454be34ce567f1c143e2f3153bdc0353d65090dfd8f7af4633b89a781e01f4634dd7b0323ea1f38184e697bfc39a1299eaa278c39a2709cde0a346fea53a61f211112450b318d137fe68f6c102085aedabd2b045fab912da5c58d8019239f3a44b18f4fe30c5352e2e2bf030334a1dde1dcd23178636f1e38ec9e42102d8c54df0b94b207e804eacab3edddf89fabda6c8e1bd4e17ae31a57716c679ee8bc7de4412fec3934c6f3e8b4c1d1447dbba0fbc775dd3258f789ca53f1593cadc710fef6fd282bb41c0468ede5ad5b914e4758b4148b0d0c04c75ff6208ca3e79d92de8abafa4ec70ea7a4e454f0759337ce575c4954584e2bb8444c34e823d27b025d25fc9becfb4391df9882452bca0373164cd76e9af316df3f5bb7532e22557b485217254d5ab72ce349620f03758219b259784d4c9f1c7beac3cf08e624742e768b53b3d60ad0b94442c847b84a516a93d9b7d068c44c43980b4c7e2fb0ac964bf05a11fb2adb4f6d938715dde88061b238321afc7e5e84799b02a94baf3f879f89a98ab474ca12085137d639b837ebe069f6dcd8456141d063eb1c032aa392a44d1d58b1e77aba38a280625ab84e3b123507ea7a692c4acd1756c031fa52d637703ee957a993804c13e296cc20c1de55c9b8c032e50afffc51c02e5c12f48383237cdacd005b09243d9fe05e51cea42b77645e5c6f4e48c10e671d216b90a48f0d8f5c1dda553217f5126646d11a62587eb0a4ee0efdaf0d54bc2eb04cd34f5a529b682ce09a34d5acab2c8db58ed6244f7b024e68a14bcd5d7a7daa4dbcf490485cbd38e6f20e839d2b0142b9d766f9527937bb1a737877edf6122ba306bbfb5379243a6b22bdf85dcf3b079691f0e90b28a4259c1c9d8a02afa5b5a661a0f9dac52435e7d22e3591593d37eb2e10f646b51be2d1a96cd4490289ef642ad93eeffd64d7cf830d60dc4a98c768a9bdbf6ec9923062ff04abf19e8b65b95494a9420971018c7e6268b8fb2021a4ddd103976333fa52389643c711a980664e29a8479aa9c4091c2cc2074ce3ac1ab4afa217d39c6a1",
- "c22add33457539a957d32dd07ec9110f8cdd2f00ab6ac256b4bc7732f63dd3b867b0ecac262555",
- "e71f9a3dd457b4064df1d9055889f105af175a2d10dd7b8729da0d0116c2d9fd",
- "7df9824e774c5f86d83cb5d8",
- "689683c9e7aa9c48b9fda0cfffea0458ea0c3dedccd21efeb06126f1194780917c9f4f2f44b1daceec3f6b1f75506f4169bdacf12c1f65958784851056fe0b4b42a22aeb043ab35ca73747346ac58c550324c4b849a404c94b8860967b6fc58aff25dad0556f1952c045b91f56ec8eebf6f552c18b2a0641c037e6c6538b289601e1fd5a7bbe7b6e0b224124fec341bf77615183abafb52b3e30082a0abfc2cf224324338c132426011d9f800b382e6b834896ea48a8247f149d92ded7e69c7800096076cd2a729a1fe41c70dafb1f855ffa2ffc27b93e2f5f6827ade7118af60730033675d84de9cde6c260d3d615a945dfe0ed25f33b6cbd2c0e204ee919219d85c7536f4700f06fa61937f8dbbe9bda88db1f4ba8a8d195cd385eec62edd9ce673880800be9aa4430e5c10a5908f6dd349af70f32b32d8db38a7d73821af47b993b622bf168565082d07e88fc48231a440469adeca59263302438ece96d89de11cf8057454d1bfe8e4e36965a4d82618834a0847af39dd8776866d9558a5cff79a1cc9d1e3c22e050677e54ead68b3cf0094daa01330d41bb66708a8bbb8a196fae5c77dc6774629d38905e81d97c5b16d755182f687a8046e55d148419cf9c12139fee50c0533b0f04a805723ce1ea5595fca5b668e58f6b3b396f438308372489b640317cfa3a79392cf6d1afdd8c3359557a83790021a4eb418fa189ad15ba9be0f74182ac76076f102ec171117a3d16ca20b4d200e03e54f1f0ee6308e463a148c0c85aac3ccbe5781cf45b53a313f7c9975a45d1853ed9104a860c08634a8211b87500b5ffa3d8d9d56f22256d485b9b45b24d3873159adb8ae25966cc40f164f342519e88d1ead1e711e1b2bbd4be64c7e83f056f797c2d3a5cf7c5025f92be5637fa7738a1bbba55f761dcd1451ce4b1e85a6628b629a2f7917a86363b01516472c0f8614abe2ad1c9d5501b2a44a68e3eeeb34a64541125bf49138bcd15b7c82dfd40708414b85107d8b982c4f99783a03c707a37787a91a7198063f0e8a2d52dca61755105faaa09c063c7a0849570cba1aa7ddb3600eeba602c7e7c9b90ed00ec731d4d1d8e4bb42f9e9db21616c4aca48dc27b939428834404331288f03c2b5e887103c51748d0257519c3988f6492eb70cabbc2dd8a8a910d737a678d0970ec48bef3b81673bd10b687b37e11d49e7cf90c03c54826ecd833bfd9dbb8174274dd45b139d08371d5d248ee33298193194734c5863adf4bca92bc282bae2f47da5201fc240dd0710a22a8d922faf92c2071a7eede7ee17232d3b6ee5f3ebb1a8b230600b243c860968ab427a5f540912e5e7bfa0271201f288727f2bd5173539d5318e5c1c0a71cba4d9501b91c3bffa7bb61b3713f1751efe94a66e17d2b42da51d13c3df40f4db988dace42a6a1b9d138c4f590b7227990711afbf8f56fa63f2800cc019bbd4a7b3a0983c9b9e5f77562dcad6de96e3b2eb85cd99d28a021a10d6734400a91369236b48ed68528afc68f247d45c79318fc5d634ecb0f3ef8536d8ec2e877adc3308be906c5b96777d0e05970023e5c5dffed12310cc97249e4b95e32451c9acca8394fde699deda57e938bed7167e62e2cb62357f82fbe821ee73b4e09c6e2f512515412c2f27805762a8493e74a3d30bb409e499002a97354381318af28311ce484bdf7c39db53f08f73ca5793945e13fc8c66d503fa95506b37ce134ce2945d75b424ca6367ef4ed47b9cb8ba7de80e773279bf23ac888eb105385ea958b1b49b27c8db6b1e14a5c8ed5d28808a7d0b6bff1a58f24f9c57fd8b8f477a9d1365f89c698b8ba923896181299d474b93e05d3c915b10a69e61910761a6d8644933c593661b0828afeca590ca18e702322d9140d98fcf836c2f7a4f72b59eb529823a52ab05d919c3eee4db2cae1067213c5070450a160fd52fa44bc9bacc5c136701cd7adb1faf484da376477da08f6a4dcaa37af47c7b026c2da9d5fd0b30741357104cb2bc0d3cebd132b5fc7c873ebeceec5492aecab95ab393f35b93b923d2ca071e6bd8522c3ad8598a05e96646504f1620c045aa5734d665acbdda0ef73612be4ca4d95ba069041e042497f7b10445869989ce30f55206a1feb4e64890b7d1f7e9df2e88a352674a52ae4267c06592d425ed1d88101cf94588135892218ac11f3976ab2b47a27f02eb887696c94b13d48b4370eb11222274b5513a0fef905c66d0c1893832ffdb9b333178b65338fd8b81094d8f86f2e4e96a47e72032cd6fd47af87eec295c6e980f595b57f79abeb4654c4039fa03ade732b1e579551898b801ecd6e0fb1c5fd198335834b51673d074a8222640d2a969998f5b878bf897fdcf3426c4e24a7c599e5567643fa79ea5d20e7de581a873ee0181e3632a4e304f9dae09a81f882d4061ec17e588793b160c93a926874d5a8b78727f88de9bc125589a9562db5bb1c01012bbea1b2eeab68877871ce83455db43cc48455effbc71c436aebe362af22c6a319d134f65681c4d0d51f9aa42fb20f48ae3f7065664aeff5d8349624a5d79eb0bef3cbb2a1244ee445f560a6bf7a796b2c950a37dfb85ed5be11e8e305e835c9e077e676aa5ce23edb1f74806278548e3fa35059abc2f032289f9bd76043c8dd1352b6131cf34f66bcd0e7f1d13081f5b08ed0c69136f3b7ad8e05e9fe99a9b73624095f96740c1f40074e5d92ffeccdc0f15502082fdfcfc97a800be511c22b875f2832b2b891cb1aad2a17c7bd0be4427a4549404172f7c14d5e425e14498237c26a7813cd8612d048703cb180f1a6194f688b4644304950b078692faec7a2a5c5bbc482f3a7e8ef2825c4c19032a7a79a2908ca9774c6403e6b15625c485f2dd078902aff769dfee2dca9373704bf63ad981b51f61253910fd48c49ef10e3938f35ca8dd491a8e569baef675df30367b093f1088ebe8f876191dc32055481d074e5e47a4bd728efaea9fee3e83d8556255ffb2fa08194bdc66897d97d1557186d5f873169461494a83368ed8065b9a033fa4c2f07f7c60f945b60479e3c89233d58f674c0c6fa5918150bae0c6de2b65a09ccd490e2ad8571745bc37e70982411af667f3e8e9b9f7f75d863e5fef05c1f0d2acc7c86585a83ee32e0a64a9e67e75b80def5bfeb7cffe6e6822efa7a9cf049689b58336b081c039696e0fd3b2a2a6b0d177c9b3f8fe5cbb1c69ea93c1235b2c5b6934f603127eeafc4ed0728161612acdb2ba894a5ac376c4ef1fa8d49b4722379e5cb39752837395c413dd29a2a88c03849b6fb2221fd85ba6d5a50ba7ee9c09ecc5e6dc66afdaa1b021282cadc68f19529eadab809341187d57cfdfe01d0798ab8a94277b9b868612e575bd98f70de80ebe5f57637c511800373262eb5ac3836b03808ca5d5f732f286a5f18a7b7fb8cd8f60e4debe54731c9c524b84694c5469975443964ed28ccff2f4e8e0cf4c60c1c8a092e986cf12fa90a994e4f26ac89fabe8a0d1e27fdc00f1d3d3fdb73bb76809f93ea113e336cb0a5438147e454e262fbb7d656aa1be1288839bc342b48ba7d0e72c85a2e24be1a97dfb2db85b5d850481e62f3b11a28c6407686e73d550b9f1d0f010602e82af26813d2484a8db2da0814782c8404b2865abfbe3c98a07ffb37eea6de7992cad73a9b81ae96a9acb13ba213eb4111d868cc73b0432d2b6c2d7e0e0ca7ccbdce86d01576e1136871a07c76498eae53fb7ebf2e85fb8561d10dfba740400ef4495ece7eb33ce3bce26344eddd88cf1ed8028ec5fe8e71edda54dbdae08f50f8df6295f6d7ef1163f62262a200456a7777d0565d7f5832fcc7ac144b5c3e0ce3e5c9b7f880a54ed5e80662e96b356ff58f2e372b1dc0d73cb8b96c72caa9e5dd312841a8be23f838bc706d893e1a8a48b2c069874c293c41d00226f73f987aec8686046ac4c0c972c991c38b98cabce30e7255dbf16039b95dc7d103fde630b03441b15bd2c214763fece9d6778d1c6354d2c9478c226175c02cb006006715fffc879a6a2b4111f6234ee330d6c84d453c9ffac08efda1f380110a8ef8c2fe44e2ed644cc3e0146b4d02f76586fbb6d69b827be38b9add444e2bac4d7165007cdbf2ea8c4b967fc1bb70c68b229f19bc3f79cb13ee6265264885f04c09a96583f331ed46de3e5dcaf08313ba6053f3d0c1916a0f",
- },
- {
- "3ab6cbeebc18df951d371e0f3cce2697fb367476bd9d50ca9e668c77636eeb9d24b68be0ce6a75eca194fbde6221755d57e9d3148623de24896a9becd98789fd3d14de0c7e53f81fe7f3fd491472a66b5b797fe19c5d0525c7a111a0289a9e65ae7c712ccf694cb75c490070bca7db17205af9bdb7fee27f9ff41fc78ebd2d3d399e690908b5c064ffc0d5bb67b0d2880bcb45c2ca2741691b6131aa1e5ee758fc50610406216905e13ec049ee92d1f95e16bc283dfd91595ec2037d20ead51d3a362140578a4538c80581b79852b0f6686c1ea66aafffc872024592ec1aaf2650d167a75bace024b261db4ab48b401cf85ec2620dc12a7fc37012af8ac1d6db923d82eee962129bc4ede578782594708357d29118fd10dc6d228bf7e461d2769e556488b776237b6309f3dc2e884cb2df1f43f71c53d389765f805ac053d05fa835e75fab0adb0f13ceeb425637f43556372d728a00fb005f7c5a20cf2b7f776066d60b70b11a848005c6d63dba0c93f139067b39017c997dd6b94c0138c3619e9a6d0e4b8792cb8d58a2ca12ae5d03e7637f2065fbb9e2d1722fd3aaf234488ca157d829e9a3b642458054f3dd58da41d7fba6d2b488a327b776d1aaab1a364c710e755ab22b9cf7abf1eb8949c5ca20c070f275f8959cb00c6d5ab7879003f89f795351a4ef4850e033d929f9a349b9133b2e0bd1cabbdd381594bfa697b845100b96b5fade05db12de040b814ec49489f39f5abd5b37f570cbb516636d5b7378f12872d02d4de20b52ed8ca0b12029a4c084621bbb578b870ca2ea79fd5df1ef8664bfb3b1a1bf038e4ba33f6ccde42c5146470c9dd293aa747d2372db1561617920142ac1d32e4f1fd18e8b9e72b7efb8fefc56d08f00450d23b7e8381849b1385ddcf9310a4850dbd6db7a4992690190655760f557a5027b5ceab3743365ac9041a5c14bed1126c4eca00d7e0a0e0e6f666f64bd1466387150ece5835192149237d5dd25e703e9d3a4f652ae04601d6acf8228e4e86055394c3abc9dccd02f04a60c298d101260b408b2620c137f77e2019fc6eaff1b234c56dfe922b0192656254fe3356143e969f64b7609cbedebcc8cb2b68bcdd9d723b9c14669da6cbfffbca2351de51e87db6afde435ead0017682b8014f91d9734a9ab9b374257273e114a8fffac786d53183ba666d8a67e30c1fe45bb1bdcefb5787afcbad213f8e36e78d30ae1305df96bf450349ade655cccbb17d887f79e00728abb449ea427fd2d0af80e3b5607a74a57dbe5264131f2fc49cb74415974b3d43ff872d4106ff11b680f56be06fdf85ec9dd850b1f77f759337b9a9ce04e611036d3f45743e562abe4b959eba7424a712fcf7c3f3773886aef22f7cf6168efa83cd3ff70b9521cae1b6689b2b8c423d883a007bb138025f2a31db2147691bcb365ac242efe40cd09a746cc501ae0289e80205993b07f86538d486803da14b74fb0db6ebf1c2bb8c36275137d654c1be56c65891cd50f705247d85621fd0d61ade8c05cf4ec15b84e8adbcbe017d7d5743d5e91025e0154a5d9bac7c6b8297490e9c195c5d74e046219c042219817a5c56636c7c4382c6a01d721d88f4b4d20250eb5eae5f3ef481dbf8a3f47a1d51d080bd4cc33f12645c8481e57835b77a85a2d83301172782f22026e69a43376ac4f5b78734c9eb914e6c76c6a12d4127cf195ad030825322a279093cbc40a680355d086a27f3fb7560713b019e7c286d96833dc60590e9a709f2e3c632894668e74ed20e42cd83a23ebea3dc3bcc49d14f8697541780fb2072dee6a5672d0d4e7bdf5cbdacdf5fea9e03c6d9cf0faa1e954172acc26dcd344bb3d9b2e0e6015cc55d19713d795bdb7c21b44b305e69c69fdb7261483f9693f36f45d356462f1ba4498de1c2e8bc3e0a70893acef2006dcd73cf15b265a8a5d4ed792a34a846d8f1d3b9b3bb75f1c5e57a00b36c00203973ef4e2654f6cb29e4445318ed99f0de6ca992281e83ed03feedb66aeed6a461c6f2871ae95343cd9797e58430d5639d7ef5c59c78b29f76a055e18e2b85eff177770c60ca4f2d61e612e617e749b4653e7901b62ba02dcbf50e59219349120ac01e6b8a6e98eb54abd16b921a1ff85898f90fc49a3c8f8f4ae9b0dd32c3e7f2e1527c4feb67a496390f28532f20acc71abb8bb4f71b434104f41e36b705289858a4e8430b8cd9449b0198ca2244923cff1df0f63833373c275572de5a9a77b23e5ff54aebce8e86d02651f26ae32e69001e5f3951967579ebe8574682cef8c12dee0b18bc999f8cc0f07e2ad3ac94d3caf30c1c8a8295756aecbbecbbb4ade8a2b8015e52a0eb1290693c6316d036e0c443fc4ec591c32f7e7f1b3933c921d5812233d3c21ee5528822b59ef2ec7eb62f7b04f40cc8238a473ec37a07e54f8907825ccaa1421c2964d2c756be450dedc011e1cdd9045720421b9a4a00e9d3076c2fd10d71ee36d5c0fd2c7e42396b034a4cd0245027449242dfdc42c8af4a34df1b4150097726c9745247b78bb2bad5fe8af94eb13ee1f41dbd36e56d801a4c9c5b9ca5d3c26f4714b6fe9f69b87567426eb6f4ac97e8c9541eafc19fc90d3b24aae0f76c4f3f81063d206ff695d638048c2cb023147a78332939d2f2470d16f1ed0e5d3d4dde438affb2809488b99815e54938fac3b02deceaffde310cf422f9027f364f5e79da5d2b5af1b4138ac9f9d301f396b220829c1f60cd2b54ef24576e5ba6ccd4802900db1bb4eea57de7787eda0e30fa90cc19f099444488699bf7c442c398c2ed989d084c8cadc97325484e337848c34562b3dea6f7670f935ed3d5216c970e04351651c1c31a34e862821bdbcbde202d91fed38965e31cc3b6f1e52288f327bd0a787ecd92b3b6f535d1d000b0f02d41ee01ca54e4e6179ad7fcbd60f0e41dfa5c9cc7ee4f7de3844fb385ffa3b24092b30be697f1fd32c9faef29ead346e42fe2ab1d312901b678b43b7758edb7eaa1c2d038b4cd6a7dc759a6b12cec955bcf4179006a7ab6e22ef15986df107080d340b8870e2304d57caa87a9961c04655d7d66c7f71ca9260e02aced131d6de65d256d6b487141c51bc86eb1e4721742f07d09e799b30da7b5ba94c8d701ae34271ba06f8ce134a7a9a2598d1570cf05edd9ec868cfa2e41b4c20a8bc4b8bfebd45f5a60408f08e931617746d1464bbe1f3844ab3272ede635f771f9af30e483903ee4d0cdecbaff4d31451e7791dc97c92042fb932fe1c82652c1d682a55912e33de3b1299db076cef594458670dc4f911f4a244e2bec757dad4b0052a41235e2f5e60b929682608c16a61287826218a1ac3cf0d8286555d5b0552754685c365d4342f0d9c45065daf6786179da791a86b50a5edd6fb4b21f09d9747136aacf79ecbf52b00fb88b0630ec7f0a6699901ba4eff913a3ab33ac85a71ebb51ed343eac86eebb3e79c16e664078ccda09e77ef8e0919b8cc447116b65ccbd5200fbfe86e9bac5637b33c9bcac9596b57c14ad5da548e96a8ffad5f5c69247c68d464c770011da7b45a337f138cda6b4e15311879bfaf12af4c61fba596780e6adcd5dadde372823da6014122dbac70f0dd896a8d387d3c74df282a659028d06cfeab3ae22dcd1fc3ce60f69a0d678aeae0e5681952949e31ccb8975cd167c9d012f4b230b1c1f47022eb1a3042951b338a734cdd17db0ed483a621650deb3510efe74191a94611dc212c0c73b117a73b8ae41892cf176742bd98a7cb73dcdc53b42df56d640739852335f8d44d901fc884286b433fc285fd5b3db8df0a8522cea3182c071f559c328b8516c9252681a94eecec7ebf626c0a9014d9aaaa0c694d14855433dae06656657d1f8a939123d28e00513d72bd3802d211ad7c1e06b9228c0d5656edccad5339bcdddd5e01afdc01f10974be3187804324fc513ba583b7b2da1e9096bbe3d078c1adc6c34d92c54e9c49fccdc17d10e66962120ee5d9b1cfe852569436270cf7c4c3bb12568050e2ca4db08bbac16214238413195dd4d936272fca5d56d7551b9b002df1807ed44abc84c66746387b79bc9e830a635c308a7bfad7c2c22cee6d3d0c5ebd8b230837b7ceaefdf71a67a3a8eaae0c36de86b2d96e759b8b53f8b8604775eb7a7e13223cb21033dc87d775628581a954085c2d66c1c8f225b1aa86091061738e7495cb36a5ff032dc678904bfa39a00285cd6947865b6d4805e3411644b4a4c94a6fffe05ef31e156bae6165d801685dcec195552d029d22e5de393a82ddf3cd3de3ad8cd6bba2325a03982204f07fc3c21518ef17a601fd743b27f7191bb446ff61d3c61d7608777990997e911932532e5b3235f13423756f5b6c786720cf6682932c90092",
- "50772c5a0e156ba13a9d86edc0e600021d56f7d31e7e452a74ad53a6775339c7ca6521d87a8c79b42900a1e9e6a1ec03f7e3d615611c3fd5c9927c40e5b508af1a298794b60148df01e9c9e78ab5ea8198c097fadcd6cfa6694be64e00eefe1a1885aece86f6ad87df766e692b58ebc41982bef5",
- "93a2561a9904a1787a10e2a668cd6a814f2877a7b512698e94796805875c8d1a",
- "588d9bc1d98210d9700ef488",
- "165d8c9eabcd5e93e6eff7be122c8c242e1a7f284790c93324f924efabcec4a4ce48262011b7360c2833143d645ff295453853c92f0c48c6dfc2af7ec58d9bec0d13239c7e5593cdb39d49376c6341263df80c0ed2ed79fe9899d0c07de93f6ea95a5dfd307e49bdb5672b158a4df623ee86d54cd1a0fa9a60ce39d1f5f4b6b0ce9daf2a61a907cff3bdd3f29156ac439638e0910d728843ae17ea7368814ad7734732e7c023d4954e1cd5fd19fc9b76e9bb84b61dd4371478917757b14b366b4bfab4eab0d9de746088ad43d8742e2b9e58faff15c2eff084df5f4316111d5dd7d23cc0b1ee1000253f26cd260aa636f03f64a8342e531ca1515b3beecc3ee07a29184988325322d5c09754c278231f92c0d980adc919d4fccf4a1da1d37f1ddb58ca997d6d700946199fa007c43853b6caf5f8049233584087fb23c3952414ac487e452f0c3898486d04e5b008b843122501f9c8a294da9159a04119ad5c8e9f5c211411e34559d3a7bcf2ac10e0174f94f3f2968c80ebdf4498de172884dbdad0acc3a887f9bfe896a6004d54cc424567d53f1198ba33c56aa460edc6af0e437b34322c1144854bafb2434f00703c1992dbad0ceaa0616aec60a380676ca11558cece57a936959d6c2ffe0647eeffd37524fbafa9691f31499701b202d9dc9980e79ea517089eced779aa45b522c9ad193e63ea8b64e8a942f630d44370f23b7e9acfedac51dd9f139f8806b09a8fbbabc76fec3c3721fad5087a6d41f93973af8d787d8bc74a3122d99ea14e2f30a3c90be4b695c8b269784eefafa52d6a79e785eb47a23d72f037ca572b7029d2f37baabce57658119fb02c5b659e3aadfe0052f1cc3c0afc6fe4624533d9700388713945c20c1d175da53738fc73f48fe57fef8305e796b474b6f8d3fc5040042373a13384237d95bb045ce0c20934a964a8372acedfd6e559aa84180a86311a3996cc17bf7f73e5d85d4db2529989e5836edad490aaa5f56d17326825aa20608fd209903335de4b36b79f68b6a52194f6ea8ce42570533df650e65b50c367f69b9f08c32b3ce3e75318106b8b2c6b6d09369c781fbf2aaa35053af215b621f833814ec4778ac683de0dc22c418b077a917a6e405ccbde9f72ed523aa696be1a6f247b096b9235217bcf19b88d43178cce5a7d82335fccb4c079e00280bfd272b9f16ffefa7fea38d09dfb2e4874553b135052595812aed3fa15096abf1eebf9abd598289e0d156974de4c2654c60825d42b662ca7439816d9d3a0255f40a4965504f643f029da535d4b109e8658ec570e99859382ca0ede0b0495d508c63c7f1eff3f648c60e9b773590cc663a751178ba7603a11985ff519056661b9460c1aabc30e83bb0073a927682a06d1b8050c345f7920c1a37546d79587fae2a92c803a986248f90547f0b6c0ad0552d8260d2a0dc3cc76d092ab76b8c12f05dcf141167a6ea300bc23227933396ef6fe9d51a1ba5a754485950f06cfa6964db2d0fd1d4393cc36f0592fca25ac1a6aacda2a32f548ed20287e3d291661848a62d41504e4fcb1cd1785617fa5786712b3005f1a1041733df6cf838ea3ea0b93685889bc6b2857d80a9bc0e7a66f7fb3d805770402f049889311fc112dccc72a25bd127777fd87bf5ab56d39bfe6be2b45a8301c2f324dcc50b27540200d522c24941701f7293b8877ac84cf35638507c7d912a3a94e4384b68c507412df65d0c4ca8ec2da704bd4483eb2e0d13b68c0c2b68c106a55b9710ad0a1436d655a3cf3c419d5e6f027ddf5dcfc896a5b316a7dae9290a7bf81aed539a647c8c98e24e7ed6a4f7f00a11134ca715e5826625c250500f8f16b40de048b095b5dd08268407f58a91c86c36ca5a2bf4f8fc682adf1bf601da24414c74956e1a8fd2888b5260e980c32f6678a4dc4ff73220c22593d23144b84c2ff56920342248876d15ea54fc100c09a81b802dd15f030bda9aa08727ea49e34f0ca8693e0a06d0af06ea7ceddbf0584adfdebeb20510bbac683451d9f84cf0f4e85c34d979e550e07e7f414d6f1011cb3dc28d0df6d4aac113f2d5b04e4486ee2cdcd4157dafcbbd55e8330a7176d1b231d9f47a63da9ee30fec6cc2c5aba3a8c6154f79997af89d972743255355647235ee939f4f305ec655271e0cd562ff6f401b86dd5826c769298445108ad0d9e13c504551f74c507436911331db60ef0ea99dc259b13cfcb0596fa9b3c95cd7fc3b1611e3b012b6719afbcee7548939676dffc372276aecd08e6a14251407cf995266545427d49ae5ab245cd5d534c52542fc71b3973f0b766f3d234c8baaec8b74eaa8ba90abe160b4504769d02e08d7af4e7ecc167780c619cefa58865169b674b2b1e10d82f6560ba0be41a781f4afa46bd722566d941a8e6f87e4a5c03d89685a22a3470354f2922e2915f9d46288a5e8896ed13617dce694a595e379f25fe621dde8ba73d865976950954e5bd07db147a0fb74f87cb06aba49b073942b82fab33a878651df73df2721ef800b658bdc6c359d396f684598e93f38e79639b8736b02dfcc124fb9fc199c35f2fa1d0dc39939c57286e58a7deed7b6c76e02b99a14d9bbf11f65d8eb7fa096fe4baf0f78cb34736499a0ca550f10d7edc8909dc34b039e3abdf1aa67a51d37a2eaf4c07022897d4d8355d3325bcf392d91d02d462488ead90b366e9645b956c3802e4249d34b5b2b2484a1dec15a9477821df6bef5e1626ec5ee9832fc3bd0b63a3c4100d32fac3e9085f0b5ba43123f54beaa7ccbe6ba68231649f35a28acfcbbf97dea2d6cfd96025032b3950ec8437108d0f07baf1bc89e3afbc2cdbb5031d3cd9e20b19018adda466382059229e4c8c54b455eda4280bde43b36afa96e146e408c7104523d5f565d22ef86d4c7cbf9c6e0d0b30e37b37feb9332939c642eacfe19d0dae1259d3267635051ea5f9b518dd74786e45fb8bdf72cbe3753bd50bea2a961b49cc0e2d589e77fd25ebd962463fc728b1d288c38a79a182b124d345872afbcfe792d259e7e5334311244edc75d05f9a12eadb61fd3ff79fe8c097eb01a4ac1f0c339d3be74be3d96b0b6a15e8868d043a0f2007ee8aa51756d78b7a78ad90fd9a26afbcb51fdc20ed7a3947f715c833e363bb87504d8efc9f8b93a993e2e26430f79f3cce203b09093c9b456b1967212eb0db4f7688d4dccd4a523866f75c9d9e7ce07825ae34399c5607a60b771866a647b6d5e1e20795ca906e451f367d8c40ffe79a2cecfe7aa47a402f8d49be9084661c96ebb11f1b48e7e8abd2978ee626f962e98f99db4eb3c6a52aa2bb2e62194120ce1e773b9db784e8c9b5adcfb70e3bd5717293eebf014e9872c5c1bdf3fb296cb88eab5e97a5ac320092033b49f37d840dac23021c19ab2a89190f3c8dde927f6e6b41874bf71ba7747a616682bd5b3f17a1dad40f4993a1b186ce4f44afb4e36af7715450bac62cb1527eb8db1d87bbc4d9c99415d16660e48efd911e02f5777a77e72733af3c3f5315dd0c785d5212b79c46c3bccd74582c57cfac0d50fc0c85370476913f9d8e8e10d0f6602f2271994972de49ab1a91728713c3cfcedb0e61c270b5fb331a980965bcfe10b41251a0f7915d5943f49fb139626f1c424524f2fba3a407e77dd7513669894fd09fff4185fbb997b4e4677f6ea0b52892f013f1691bdb38eee9307a565e396bab484d91cea9268f49aed29e319b0add900b6a75f7461db5486aaf5366f98df05674361308931de753c70777de73337a996f6d4b0e06d63a69849ba7533bb0e446f062edbd6250e61a49f4120f84efc1cf74c1bd30cc61a2d719fa76991dab119fc814a7c56f48bd584c7935679c53bb0ac78905b5d961fcd89a4b567d17a5182651cb07146aa9a94972ce613e8ff9c878a8433c0244052f09980a52d800e97ba65e8ac186862def58c72b9feec91266e26aa5075b3337c7bb8716b3acafe666ffe2df32b78f9995661d3ba28f8a8780436aae1da2a3e6a0a16dc562b8d5df6f68391aab73a10508e0f55208f974a0505f0fc0d8a55049a7b631fc94fab91459ae1f199527362695b41972e50faee34c5cca9e35e8682099f5e9652f88cfe9fa990ff2154c89c1c2a4ed6bb8a889fecfdf048ee0aae7798c55d6cdfd062cbca97ca289578c832d658ceaf26faba54c9c3ee9eb5bac80698c1441b9cba287f749a5e30d5cc715a01c89353ceab0974ae77fecc1d2dfb31a5101783cbc002c73cd155dfd14685c2f9acc170dc437c649b6b4720b676848a7f9b56cc4787eabe72f6e3f2aed776f9bb1432fba93a63bfa44fbcfcb6eaa9ef4b79b32bdbd68cddbb9897cf5a02c6f99fc765790092edf0d5bca7c55cf232a03fbb6f3eae09b12e09a9b49a538e0589394700d16ebd3",
- },
- {
- "3497e8d61062e6f2084ebf72d00e9a47b550591edeee9746f31ea28039a1646d384c4348af293ab778f92a4807c48fbd14e8dbf3d67339c991dc4aca7dae38b5fb7bfeaaa538611d328b653950f4f664dcd257b345917cd66dc6a1ea75d99f70549d1af9d67b1608077b41576f38bb4c0a13ff4fa47b251142c6fbb79f9a27f43841ed0ebc0416c37f571aef8fd63b99e93ae88db50e9ef7d499ae7433d5686b165579d3598f96d9e7b1c876870310703df8fdf2069beadb34984f676eb7d3840c4c5766dcee3fc39f0739260a499647429339482e232362bc72c92a299cae36e9069cc5f4db8893e2c1b9ec0b4f334de26c951090b9724c2b3b7655d8248bc12a27861e020eb1e4cf6ad0dab903279b6fbdabff761d4ba159c1f631e681f210a8782faa86e08e554b5e30046157a0d1144bd08a691c2cc2dd22f3c3a4e5d44c5d03f7e3e385382ee4683345c0d316d41ee75f87038b49e0ad3ca45121789e7e7b95615e1a9a8dfe02c044c2935a97b141f639448182252ebfc980e0411e5fbcb3c01acd5aa7cc5d67101ffa6ab6acacace5f02d67155c26dedc071ffa66dbad26f67a819d46de0556fdffc1b4ab6d60905d8ef873ea1e51c62571c08b4c6db242e733e02e11e5840ee445c290b2232010b118839b37d4615c4521e8928e9ad475cdb4a3de9928ec7e6daf0e20d22e308347b31e7e877fdacda0c25f2e5c33a329e84707816ff4ffdca30dfc753c2cf883df16016795db34359e9363fac60624ae4d2b30bc1f2f99c23d953779c22ffca145fd08dad83c0f76cf727196799544c6c07483e0a41ca2e1b1da5a730956154f531d292b5a39a229ab13bf24a804eb68786e481c8aebfd3bc557afceadc41d00e1472c3b80ce652be1245089283bf1a1a93abd3325bb6eea121db8c0e1d6c0c31decfe9dba63c89b881824b0531651fc500f2f75ca9e5fdcbb179c9ded5d600a495ea704c2709f4a88c4fadcda4cd82a5b089f25a6fe0161159efe03fb5e0d44bdb5487f25e8c9adacc389860f62b06a6a4f8f104d9171622f70652ace736e8b28b70a4d9fd3fa4b9784d1a6e6811150d0a0601d31d17f6041e58a1058f99b80b0a6cd4f79c79a104b6bb731ecc881bc68e1d99ab358faf43d8504957ea0152e46e27dbfaa17d0f58287276e4fa82ab78a03513d5b4c3199d1362e4fd6447d1c26fadbd011abc69332ed0181952b391f2e8a5c89d68e22a7c451f69a9573b6bb6d918c7e3d52116f3f12f1d43d2af46bb450f58bde1732a268293cfd9cf2b90a844588c1979a30d6ac21aaea4b9e5500ef4a8bcd62bd70cae6acc8839f818d23c615e45daf14335c36dd46817c9b816be60c3848caa812b055da33f45bc01721d6fb7e850fb1e1458f27c70bc34876a955aef11f5703cfacde03a039c3b75b99b2d91fc18b00071a28ce25eb169b946b49858aa0885a4c665deca020a3fbba55d4d9175fd91e7901ec9eec0239806e8305f8238e5270f4af5c94d0008f8a5564636cc33c8a3d3e76db2a7915abe798b0dfbb3e322b33e188c7b188573bddbb9e4a7edbd4bb194b9743c4aceeab449f8affddbc2b109eb3d84f3b2f8b18ea2962680437241d82bb6146674ff1abee7baacc38d5dcd688b425c3e3b0dccdda3e36de755afcf7155d3d7cac2e279baad167e2a743b82ff8ddf3db8ecfa9680ddf468339427a4e9fb8ca4ce6f1e790c24e7269912a9989088c65965b0efe68ed44eb26876674261e3e72042f5995f1a7075b3932f4c23a8027d0db35ce4322122f489995bcc0b3fa32b7298c4c1b3354766c866a2fc0ea5690c58c5e08ae7037f70accb3ca7faefc37d78883f2bcd768285dd2571dbcaead813a0b8ae87cc1df868e93500d414c4418d5c80b919f73b9fd46111a02bfc884f9d30ee14fcfc1d55d54256b9572afad4777b8d8172c911472a22e7461f6f85aca063c19d6fdef3351149ee6864e93cdc54ca5dc7837f0ead91f5e3b155795df5dd1f933cee8671ffc05058353995019e5f6f55d2de6470605a5411afcd7fa5aa8f38d77dbf496d7fa9c5a4d35ab661aa15c77ce42bed44763166160ed5bba954e470c293ca301363f5b837406ea8ea746057588c34acf266030864d8c40e2da88ef04c49205fad1607d456767d30eadd884359bce04c12e35487bc1885d9b104c9fd4dea4ceaf054cf46cb3c77a619ffe963acc9bfcfad0447591ccd32cdd1fccb1fe7080ad75cca2e17f695ce0095a774327123f21e2839773506a9f2d896bde87dc5e35512ad733aa408f8a49e9018d1013cc32f550c968a03308cdbc73ab444f0a79a13450d4de906369da4c6a675d7e338f738358dc238be4f047579c8ba7a60448da541cb9e57f22bfcb8c26280a59b77edd0f5a009a3ef1e2958d6d3c3372840dc6a0c6ab1fe86aeb7590137feacbfdc7da57c77595b8572b45c4677836ec86fd8c4ca8ac351397aaa3aa298d752754507e1cc514d41c3f1ae0a692179218141f65bccb9acf6244730c6d00829455d21371972745b3665f930cf2aa9f0abebe6f7b89094aeb4dbdf7bbbe794f134b6284e289c995ef2929fc1bd39b259259950de29e57cdec15c4a7d33ef6e689596a6ce23301d25c2ace77fe699d90c2329da4d0f471bc093563dc735ac2fdb32c6995606a67bc953534939ed1236003c004d3b47590beabf39a1e4d5d1b00898496e9effda68433da17d1ab3a32aefa3681aeac116c5705077552649153ed15e9d704e67d8819579feb02d91db0d3533182ff43ee5648f5cc9a595ded4772d61e77bd9bffd6f29fc1f478dea44c32d5ce3118bc8860b254fb0bb1e85223bf709a7c0b9a52fd3914f1b1f295fd246bcb568388dee43a32df45e3c798068608a102143b5511746903255b98238003eed68776b46bb0e64af6c9118ecf9896709aaaabefbc1f58bf45b45768345b560ae2cdbe4d7da497736da8013c4098addb4258cafe7823bdbdd715250b707b155248d39fc6773639e4de3b201fd3cdfa1526c4149ee7d15bbee680c956fbdea844b1470a287d430c5c7e2d7b51fa756720397bbe214c19df3399a989958732d93979e361f7266e53a59bcef695435db67cd8749d258e7d582726e1bcad1395e68d7848849fb6d74451a53ae6e8989c64701102959f7fedc6a5cf8352e218396f9181f33037ca74886fae6e57460bbcb71cbe4cbb3d3a81e2090434eb1d6d5baeee4ede251952ad88001ce047279cfe435a4afe97847f798d84ad79a11bd44f09222d2f3b7fdcc47ff8a4c61f40c4629a0f603193e0aa2164579a05726e547c9081abcc0087907f8034469f740a020e19623fad42e9cea64068abb3d6ff2f6680da328061c200e1f646816a5083786ae5b71728a0e5cee14d7a942379c389fa9dbc7afe7e7ae075c061df11e4587bc90f92f1b077c091c43a25e7b3e870ad852c2883aba2632063c4ff74a857ef7267816317f823a8bc5dcda311b513be3a40e6bdeb89210bece50a608e624f00c9d063e0c8878884e45527f50a3ab4447a9a01652322700f087b6f96ddbe96a68ef98656800eda6563015a6d3c0eb1b6a9b21cccd58cdcdd074b73e40a098a980210ef831ec9e881cb42ee07519fbdfa52d9c62766a2046dee7752f880dc9082ed7f050b49ed8d14307b1b811bd87b6db2419418e49885d20fd7ca8fb45a11a1da17ac2304393734b552b5d02a303ddc72d1f456697a287851f207054c18a6262f5349348c806841d21e11fd4e4ed9c01fce1688483e009930079f7d2045a34f98ed83256dec66400a783d58c61619e6e42f6e2c6e6fc69e76651b96aabfe643ac69681955ce595f4696b80dadd1f3910061be6ed0840d47e928dd93e7c3d6932d3ead820d06e2539d9a604a6b53db6bb599da851de7cc060faa9af76d708a9aaf371dbc3eff0fdb99702504c3006f789a49feb730cabe40745837e2c8c17c77f999333798431231b337357637a5efd1eeed891fb7475f2c9f960e67578adf50241287bc5599ee08d0237f08c86ed9b75b62d612a9353e48cb4cb022d78f73fba1fab7f794a5ff64c97e6c91ec464847a81e5a5253989a1ee54a41bcd9b4b77bae6e72421471a7ddf0136edc59b72402d57e542916ee47fb3988b7123c6e8debddff2df171d4ce61e83c3d41f36143c9df97f2f68639f1bfc2a9d1fe175fe9f45e17e5cfebb330d3f06e15e3cf58acaff09ea576d896359a3f06985765824bc499319384e4c458d4326db801c564b0b503552bdbec60752b670d82cc8fce9028ff24ade3e805b81a72701b37d4ccedd72118b20d792739e035bbacc4893ded88619a6c499f246311947e48684a35406c4ef279c71ab2a74f6e5313f7900080f19aec3a39109d4aa41c930c66c84cd2163f4cdd59fe84a86cd8bb6468bce45a56d09490e032da844e6d90b436dd874c1cd32a75d1ae1d3e86d8a2ef948649eb56dd7b360f55ba5dc34a12f9279945436c6fb83d1ed57ba4ae1d9342a3dc2df9baa82fc9fee927c13439ba5bd2ff9f3e6f577b8d2df731db14c51db8a14bb15bf3e125f1ca4cb2fe856c5a576cf995db5010687d0799581c5e76d400c1855bb46680a631cc582f51c589a831",
- "823d0cd34e7450550da9716c1f456ce0cbc79431483a6214939266581b0e899e4c95719a09c1ef166a618289a6ee6971b6fea3fe380512cb977823b387ac51d341c26d4a835c61eebde37764d2e1d588df7886177e98e3151106c898b3196bf4dbd83f5f",
- "a4639c22fc7f370d8500a53819102df5e86c541c0ca10e8f6564e50b90c28f34",
- "34a04df283c45655a52bdd84",
- "cd8d1b2e5f65ddb3c0da8f12096134da22ad4d541444964077610aafc1f77f8da5ffc75bee807541cb6eb0526e78d57fd88fa9d9608914cf391ae7ccb8eedb0aa711889f9b6192601163b271c90df5d69fef487b6c05a24fc667469cf16cbd5afd58fc830119fc9f61b26dd50a96ed84c96825a615a3aee84ea4c950152323b20884346b25c9e2a6be3a93505ba059fbb114c224bed8f05f54eab76b2c9c23a0fd942eef9696ff67484b542c8347f1b1fd7df7242872b3528c9e45030447b2bc85eaf191963291e4223b75778335e5f1256618ff87bbd68b5a9e5cbd2ca1dc8aff4625c834edf8fb0d879b1f75ba9b85895a6bb4d7569a41bb3be6cdd020065bcc69b44a8fa335d9418ea2d090d8061e042e8e1a6ac03a6d5525079f14274079734ed42c5c9ab9986f0fee6bc9ee6c485e233e9b4d6de70664902529a135a5675ae129353eb2c00b73f226e84fe8c594272d6eceaca28b6da30492c92074250ec80beddb7208f9b5418944305b0864009b3bbb3dfbfb4cc2bba3313f8f7c6c19860f1dc0f5d7aa06e3b551adfc63dddac980a79d72bd2225d54a87a93717291c7b78bdfc5521f7f3239d5564fe9c9559dfefe76b77efc2e75991f31a0134529a6611ab9ef076491f2d2d81ffc5774ba8f8009dd7e5881e09ddf5116fcb5a44e576aef6cea91ebf52c56c742049639392cfb8b280dc2229252e04d8d394ffafa539290acdd8118656e7e1a4f7bfc0bb689448379e8cedff7590a09a3f5a29bf819fd87297b96ca07431a29a07ae126eb9d65e21824c16707db89868e127f17614a536de6ed268b1600a8b02aac2bca54a09b7cccf8e184448df334f95b9f0221187d56da7bd422f09b4d94228098b563df53414a5a86728962a2ea63023d8c3f03847b36db7cd189ccfef3e623b14842b8cccb18b4f80f01b32a4cec48f3009b98ffa25dbad76089c8700e90848da74aeca81d01f4dab2b7e844a3e48bef21f33c92734b821ab382bdf6d0b1048a9866e676b78ac9398678ff626d5c173a15a0a7514b2544405dd54eccaa2791605c87d7117bc9f8c0ad84623a9d3a2b1733304b492d4dec38f7981db9361b03a2837a95fe937976c7f4341a802dbf583366fbe368a3af3f92618046bb55696cf7af1f465a5a57ec5908621f431ffc762f35abe892f772a60a3f75ad8401321f67981e90083fdd1cce40903ce56a629120d6e13c8871523c4d848664331966298c8b31a5bc8174a8c14f61cbe98ae7ee3e90bc832b04318864d19a9b8b6d49a260f42bb120cef9afbe704faecf0f428d917ead9f020f5e9d772bc8f29600f8a7623d8971c1e3c5f1a3b094191e497bd70f85de124137cc4b9fe0617cb73cd44b89aada072625e25976e7aaa5a8fe9d9e3f32db47d1565aaef0e84d256bfce6aedfa1a2dce5a94976a2bb9a0da95941fb7ed444990b0e0e87627e35f3235a998019650a5e5cae804ecab8cf729a5c712f1e7d17486082dd50cbeb2ee1b0be6a7bf08a66ab3cf1fe9f49c7083f5b8ad183f32fb35fb8a41230e4041bcf0e5ef54bc3d21ecc1fceb08d95d745a997e8f2fc3c0f6b1b6c1c02e03ff02ae0d879d13eedd42d9f9949ca7ebb785764162ceb6c6f9944dcb3927b2f4eab23ab566b2b2bcc0c7d77b82579e88203602264064ce98b5b1ed992c1bb13edce579ae7f5e11697b493749f308b33e47512533350df5c07c3dadff656197884f359cdfcb736d29231aea1524b56e06c92f5a98ea663543f67e44003f5b41907a951dd792468c84c5e0e1b46149a5c9751295e153990b78c0cc712889a21b299b0315150dc50aa3b4f7fb0079ddd39d263a754b1dcc595c76ea9fea6c120384afb38d4bd40491c4689b1afc9dd096dd0327c84802bda6bb6b7a8830bc6c06b308ae9665a8666a5551ec954eb72adb827ef38f036c51698a28c92dc1c9e25c267532da2c04c1bf27f5b683ac750c3ef53a8460dc186331549bf82868f9327422c09afe1cd15e161bc41a70cab2f973efcfc8f01a380b86a432e1ae540e09d404d93d22a20dd5f685a52f0acb863dadea236288b1714700f23d1c19e40e219e8ed21f6a393e541abba850ffbbd4030e5f6567b7202fb66d86cc2a0beabd495814f6a50690e8d74cb8b093e4d43261fff80e7a67ca06dfe808899cbef84c09ece01414baac740cbe4c656b17991868e2a136f4785a0de311aeb18cc95ed33fbece22aaed8cc1e47f58cf6c09a6f92c96f37d2d2485b369093506f5e9f8534f8569655277d0399ddd3d33861bd40c71ac53a44d1981cd744d79202322d47a0228356c0e27efa2ff1009cf2a416fb6e8844eb76b8077a4a3961ff193e1c95b222e72688ba48be82ec5da498e58861ea613782ed1ab50a95b5cc236834af98e61528ab18453c20ff978551b81e1bcc0ff4b7092bdd9ab0b946b7324b7361ef05e1f7d7f6a336281b4bb2c671a95a6ab84be6bef1b9c8c3d2536edb8d79b40637e16d7281ec5243016232d7c9fc07ed9dfcf555055d8ae65f12ad150da81f62f2e1e82b3adacf6d623ee4759ad61a09038905bcf1dbbab671dd28fc1d10a0b7eaaef73a5862ab449bd84c8698d061e79fbe52a86739ba945a01353e0f3916667bd7b4356cc65451c7003927f2aa738d98245760550156dda529be741ce3ae1afdea0de35ada26ac241fcb5d518e6ee7f9930baf88bacf8bdaccbecfdb920f3b26285439912a8902ae029b07f28c1dbcfde780cd2bee6c6e5f4520c5c7ff3ab5448ec86cfb270c39586f80041f3764b5dc77dc5ced0695c89671cf90ed34c4067b4bd938b1493c7902dd94be824810a00bbde4915d138fcc7584790bb0b6682fc0799cd415441ac90c1caa008c7fde3ab4a3aae478c64991ebe07e6c4587d3046c9ebb8e125e795f0be9266bcee5a4e4355a2830c5b34e583b0355b34b89c08011db6f6b8371de003074704e8cdda37ce42c7e395b6a37bae3dfbe67bcfd1f125c9a262d56883ddc028773988270aa30c6dd326cbffee589f38286533e1d5c9486011170be591beab5e0ce98837cf91f0a58d69d872e364aa88daf9cfa71bad167129420282d99ed5884a1276dfffb2c4100c74a8b863b063c07937f2e9c12523deac4ea16178863d975e3a5be5efb5ffbea994d07f7ddc5326bed1f5c9415c1d4ee1667e3a581499bb573595158636ad94d84f7c6e4b8efc2b141f2bfab7932a050fd88a8c7b21877cddd488543db5b11138cc808e1248b6e2ef492faa8a32f9d93e3c060b5cec10f03794248f9662ed8c283a8e0eb493824e2750ec75b3b1292d80ce002083a3c64cc487afc31b20f84a778f386b012ef7bef46e638d0f1cd75487ea46e05621d608482637b3e642a9a2c5371bead4386eff968b3e007fc263086d8a930dc76a8431a4e6907ae35c7b3291075d1c723f02e4895714803c0e97d65b04c0f27d01d5d68001bdb3bbd44dfee1eff1754fe8c182cd9bc6ee273beb2a444ca1766f747d86f36cd8cef6eb1dafe0c38b9327a8cac6e83e076099188f02721cc4de3d940c3ef19d9b067be07b890c798a79ee8c44d96c5e05ee5d5202d941a674378386233a83bc85134dc8c46a7531b2b952fb277d8089cfb13e882bcf7545f0605271fe38bf4754f98dfa13fe6b635a62bcf962553882a8f28a9a5fc0b3f85509b702d4a7555d40c4f7d10fbe80d48b4826995fda7d15f14aa9b95fc6526101cf09c97fd74baca6bd26b4fce8a57b0726e0f68118969ec067e9ca39b2ba59fb0d78eb5cec5b872613b1b76763b3217d859bd6d991bbb5448bd4e49dd6597ddec9e46afb3f71d254aba828c91de51904139ab19138e36e6996a207da80323d96077c97a3e8994296376d4dcb602f1e77371efe8b020b7b6f6f7bd2bd733ad9c06c45b77a2893d73b4a8a57707969af74ba06b2fe7d4079bcad1cfeb3689ab95c8b1215fe0a855eb431f67df4ea589dadbf055086924e42cb142c9031e25b81e8e1167a54008ba1ad7fec6794f203b27f3092dd72bb766c9653a72b2e25c965f53487cf3baf74eb7742702380303af8c0a61cca3eec78d4b709e35e2cc5bd586263d9f56fc12454547bc6165e3f070ce7b2bcace5c8cbf52f987568dd90237cf190dabd4ee7a80494692a5379b013611f4eebeef8e1ab9a9c5ba61926095545e19c3dd61b7b404230729aff7d82b6bbbed6b4a926f6e49189e3bccb578fcb3537951fe9c78ac842350ddd80133275ac0bce3a669183776fee8288f874d29190b452d65bb7d8edfedc6fa0ae147102b92041af6dd8a566932e016763b60a5b9b1e3667f228cab075f966d1c525ac19d12046c6409345799adfd7154b6d8b51eeb1eab3a132ac6a2e08acd1a34bbbbdd019195af9f8a93c6ed5463765173e669cb0d42b6cffee1a4b45987853d43c02f920819f45a4fe0905d8c65aca182b4bf56fa0dc51cb53c642fef003d92c13ef4bc1bac571cbe2ba3673a49694f6311b7dfc17a4069759177930b179748d4403c7259e10a5d221cd0a6b745966e598f894e607b779dd5289fbdae0b4348141ad373a62c76aa454b35b39a7be875598bb30007fc300606ee2537cfcd7c22b6149880fb3cd8eb53054d698a0d20f26a5c3ce468255737a68706784",
- },
- {
- "5622aa8d2f308dd468a7e4959ccc01f0e80d91f79df65b8201eb44911f6abc758c6703bb97908fff377395d33f96c328a4541f414b7ac34c6607dd85729afbfe01feba988e4997c6bd2c99fcc35d2467b143a8fcbe6b49247226a9e4c0a4e3c1a29d5931e6f1f7a31d90a0e0edc4479f08ef9bc65ae4eacd0b93b1cb38948dda31e60b18d702bbf5935bd580201d1f280cbbee679fd834aa6be576a37a037eabe989c3c18c7fb61fda8b9ffaa8bf22b57a101c19e850c454353af7af3d755b26ff1ee78b9d9daa78294972d108958682a5a29c8ef260e2289ad9d7d74f32fd4e51e5d9ee828366abccd97dd56e035713a6f3a1985383c0ed5d98c4accac2fa1ba7d30a295670d5224952f7b7554fcbfb426c9496f054834dec48f9b70af3d2b1c6dcda1c4daf3e9601364e57851952c785e65d753be1c22729bbde33aeb1e4748dbe90da6ecf716f05bfc68ad819515dffafd33a909562b95140ecfff1d0747f8e0459fcd3ca6cd8893262614bb4bf4b639285f327e7ac782898781968ec98f6f0f2f3c4bc5f9c4691ffa7ddb3662816f8ad092095b598bd4d10d6b5fc6fabed619eb11dfd4d638f4c0b6cff7194156a411e8ad6d3229320336ad52fd9811c3a1fcd571d1bbbac67c6186737ac7ca1ed9b2bc46e4e578f81c164b09ae5cdd4059a2c22b5e7ce1dade684e49200867f9bb1430aff9b99805cfd31f7e3fecbe898f70a4eded86b8bbeef7050eff6cf8ba71395a7ae2e270a2b58010e56cdf6efc4003da3d8a82e96979ee68694b6113cc9a6e377d40a810063830eb95005a81405e5b7de8de67424845bab1911bc55da6338513742d237a555465fa54b07ba50ed712e7a57a39fdcfe4af50f064ae969823aa1c40cd86a621ec90769d0c1babd33e8388a8bd76689215b9827a5819127bb32ecc80a562a291f3192eff34cad2635e5b0c0bc174add72e2041864953f1fc72be7d28111fba0438d9036da3d5c0f220ccfde2319bb96fcbfae6055ed7f1c1967ee9a78e93bbb77cbf151084d602a5a2f087d49c3134582c1a5d7af24f4c88be26204cc9dbf4368b19470fef49a5823a2d66c65e9b1e8ab56bf5a7bb3220696840a6222caa58a7b39fb792d95d25038a8bd9d916e853cc5459640f8b8468e3d51f05f1b95e996cee40ffb7ae14cb289094f1b77d5573c1aee7c12a6c3a1e31491422f272cc5f510d4f18ab63d3c3f468c5abd61b2fa7ba0768d46392e2a4dc06c7ce79841dca916cd33cc0a700b50fc660e5d1808d8b87e65feb89428055495823b2dc317d6d9e50aa5ef7ab14076174ed32f56abe7d410e58ca40e92f8a31433d0d74ba7b130b1561f2b075fa11ead744d031f34d82f1a64d428f6cccb0a009be24b42937bf3e99a1ef1fabf0fa7335dab52918382abe756d3de229ee8223aca6d7c5de87047838e387d4e472481a4cfd4365256e13aacb518ce5300f18dcb5e0a28477a6fca08a74756ef6bd8933bacc98d02abc7ae60df7cb3e06d41abcc4bd313c543ddcdea2424d98ffc6dcaa83658aae11f5841ffd4f5df42368a0e815d2146a0fe138b223764b133d17cdb08d485e9f3dd2bf2b220d1f4565b02d7b9231d592130e4436849f49b1a70772244fc0c38da372a8c57fc80ad57828410a5a16ac6d14e093997fdd5b26e4cd4b248e0ea221715ae6e112e1b68b09f795540e31b1231244bc922207b906c4f42b5302dd7474286b653b4d1bb657134bab117d6c349fa0f121c2f8dac9cdcef510c1c28545eae0ab163db6cc84ca182feb858c10153d0136f00a01c9c7d0bed892715dd85c4e73627c3a2ef0f43710dfccacffd1d9f118c9fb1a83b2eb328b8da3e955f027d95294038184f7b895d77532c7570cb86fd6b37a5a66659cf1e330db3930f302838706050c0dcd91d532d49c89d144e9a7f864026ec99f50acc02bd5f11ee88495ee8991ec4723b189f84e03d992fd718b5173ea1b033ab7d3568dc4656648fb54d28d3119b0f293a930a772c394f45ee66838f17b73a94eca27033f9d5c2ae22eb813386905dc024673850a087958eed191d04d05798bcf909eff2deb2a0009d223323b290e3d6f71b2797a2bc2590d54294a5992d629336518514032614a04847c3fad8a7d1cfc2f86765b48cf58acf892f68b691fbece38100e6a71487ef5c4ae934f1ba03b4b26a1967f70ef1c697202e4eb22a3a95ab3b7b524f0241ab4d2adf3ee5e3f2974d0bfe4419ef0ab11039ffc26339570e74d260c4d5a16f22cb4f60b03253487f5e46c47836ce29460728086a615f78d631d89a06790928455889f58adc3d0a3a84ceb2ba9cdb00a403080e6567873b985fd59fd9dec71e375013c12c51cb67d599198f36f58fdaf897e85dfe6f9896cf6d35a84cfdc6834dd9447a2a10e1ffa9fa8edfef1db9e8b4a245b211de49e04b7e88977b4e1ac9285f43526f2452181ee0f80efeb1f6b2533b656519ae45652ccefca81c17714476b497e5d8e9fdf6c9f504c7a7fa7afa36df5f4f8da5b4b973b1618fc8d2d43e866b235e5420551d1659e5bd545fb78a3e17d9cbbc8e842f3fe6be07b892453ffd689d5188f26f9e4c545ba0b3132af12a03bce6914015d026d3d7df661c1e6384bbb50dae24abfa78079a2b1ac41c44c7d82a59183f293f12011e781d3cdca2f791afa5b55a9f2d6139587bfd74bfc54ce91e642847a33b48c1b366fd8f08f520b79ad5113a0273735aee71ceae361a97547fc09b22fbe4e4ae4ae13e52d65e0971341aab368d1e917c8f5f2ac57ac119f981b51b7c99ff2be3e16935b7c73e28fb58d332e6f2c36281228c479c4d6095cf15b14baeb0769191dfc649a70471a25d45d4433797a5b8ba31ff567e60ec4d759d99244d0fb5dfef7c2896809938ddde0d2015a4c5ce5ef6cdb5752da1c2a33e5bc78b6b7c6a5af892f0792c28560a357720da3cee3833bbeda8e98e6a8cccc6535831cfc28bc8557b4181a3978bd90eabb34b99eb7e55d9263e6790ca34561d8c87ec4e12b4a38df524318db00a9b5bbde6f5a8644a818a88e91b521d716fa9f95bf70b109b9905bfca926fd42ecb9114c039790abb0392a41ee4c190536a89ae6194befc2dc4bcf7562bcb84f65c99b69612c0511552f53436b6c489204d3881e1f67e0fba3a061165d2955c2e2e12c440d31556250a8a5cc04ee5e09b1d627c14e08bce1a92df7f6475db92a3ee57e4c16c3ae677c44237122818ad457a29595ab528744707f3ab7ccf3d20bd94047e013e647802a7af14cfc7c11441ea6e9b9f960fe69d03911ad2cf3a8f633e0d647c71dc7e188c92e75353fc953d6a30dd0040c39d4355b71524f1a4872fb1ecab22c8293b54bb22a80e1e3d4c886d2988adec26f041dd0565cfa9edfe5ad9aa7da1d3b8f68fda9e9df9dbe98148120af6ff30e6400deca6dc9593dbf06c856d0d582503e7ffa185f87c6e7ac58184bb80b4a1c0c18d669e23f9791365fe807356a5763ea418c39d94311759b29b14324fb6f3104359ae66532779b825f92b7c9ea2ba43ba7de04eaef7a86192bc93e17286f1b6e0a01c33c796ebed8f17692eb9237173a051c14e4869afda2643bb98c9ac4ea94c6bdc1401c80190df6abe988d2f0b2d80cc7bc8362ba25c6e5df4370a43e156aebd6aaf856b3f64d5fefc622d078faed40b760a361966a4765adb809dbcd74b7a41faffad3a64823860e5656874133c7f8a46b5a3ac591906359aa4f171ef6bb2ea6b5f24cfe25c2fc7c1973bd5d3bb5f197002c5ca1bccffb570f0265f5cd949c7386d961ac9c5e18b5d1d6030d8bf4a48c10f12dcdb11924b02b8ab5e91f425ca62bbe42b80c6b6dde3160ebbd55803966716734327058e29bd39874f2eac199067fdbbe8c372c5a688d3615e2b65f4937b67d6a26c64cc2a9e5379cc00925c678f174f538915f912e85b7014c064a73bcc7ddd38e1a9627ffddb4bfd6da764fdbfb45048c9495ab1a4cac5642f6c9ffbe97d33cb26964a23719620df3d85dcfc392c4502759fb31a6a797e99e51e94cf9bc79ac15de4e5cf7a05aeb88a8ab4c3b6f9c52b99794503f2c49cd7e230a67df7403e552523249f29d257b35c0c7712053c3d9eb583a1a7473d7f296d25a66566e4ba8b08de2a31b082e40c8e5b1e93985b324dded3f52511744e7e99f4e3ffd99d8ae17bb5122b37f637c5525558eab18a378f5e2cb56fa003ed3af8d139d16ec4b2ea79c415b0ba4d750ca2cdf653582ee3b65a9825fb9b123593e36e645232163cabda515b959ed0a1419e9894f6c677ac200fd11babe3503ec7bfa319f1b9559d94a6f82945c9ca8667621a5d28920949a1da644cbdb58b84742e9d65e7f2027b99fba4dec46f642bd17e88fa109143b26ba7fe285c89add0b74a369f3d381ad633bfb4f72e1822ff96aaf9a73b3c59a6e457cf40e17c1198c64737037f52d9b3118daa3fa5cd3e3c7738e3b3743c595893289974a4aa0d6bf1446e70964823a7d5cee67b9b25b7125d9ac5d1d61f2a6947c3deec6deb575e2fc5cec60df26de3c0545e5b79156dd6af33a78552d1ee9994cc8501b7dc5fe7a22eadaf201a92e06ef03be705a8bdb4db65392d3628c7cbf44cccac292c93cb5a407a7a5a0d5ac9fd95b0033d6eb719d3f14609190dd40d5aa1b983cd4c4e278cc8a1e7d5fbb0d39060d6cdce8de6a17e2dab973a7fa594205e17edab6514372eb51e03b0ced6402fac0efd3af49fb8214a505cc9f5f0ea5308d7fe6dec369ba154",
- "9f522375925222a04f5c95ee14b6386412025903ecad0bc3ab78afe1145136b3a3592835ab4ad6faa66be9",
- "d1ba82b3ced3e9817642aaacedf482e79bedd0560ef2754215ee792514bbf8e6",
- "bb21211f342379370f2642d3",
- "1a6683805d3f478ca1c1512b9846468378f83be27393db63956e151ec408368b47334afe610249182f54c4d0a01b704db2aa90a9755b8feb67ef9301f0715d7d6bdfa5cc4497cef1142a43eeb42f7c413e8f489af30d742a706d05a40a0c4a5991f9e2cc5d9fbca6ad3767682e20c146ac35aef38dfb2a77388b738fa022158d5c802e5f0761096bb45b50815ebf09172759521b5c5d459703ebe9ff669ee4d14a86e5d0650b597f4a082ba0aef366a924ea378b91c3262d99f48189eea19c76c0f644079f8415c11033cf24d30d6c149ab13ca5c29deafdc816e457257361c1af4b915da312d2e6c7fc712faa27be3e67c893f9005a0e2c28369991c1dab22d38961d1abd6d94c4d549cf491aa1f8d522be3ffa6d214825a5fde3c94c4e35c29b8d05b2627eb12c9d94f450a85eec6bc963a279a37c2344ca36eb604c4bd11c2bf2ecc0dc16c2c365bbbcad3541bd54f8d0bdbb3ca4a087b62fc19fcc1c13984eab807d2a6a1386643d90d412d027bcd0a638765498cdbb1f4cc1b91b69bd241eab3645f225ece85a56e5008d6094041f8cca6b9a0ae3b15585de6fe0695d79d348f8619431ece40e736957a7627224fe92bbe30df5124f476d97e36b5b08b3787e8e00f0c10013068eb156f82f3494a35d6edd5f7048d1e91954f1013ede22eca8b4ba41699ee08decedde87139180a567c6d169b672af0f12aa09ce20e9cac4e78b8067d31ba4f63606c00d1d787b868cf7643fbb170f8074667c9f7584d36af80b4e6557724013618c28d0dd40bfe9d4b25761b3c99558af528c2d290d04b09821bd7f992c044dd61dde9395bd0c9ddec6d0bf6e044ddf0b4b2d6753f5acf2e9c904caa4e9f310578527b85e6738803758da646919989f735b09c9a5744e63fed2c3982e59fd29d2baeb9771316bf8d29213a4956b66c78d5654436ffdd82d0d572530fd09507b988d13fd743f35333237681f8abbb301a8ea870159f802a57760659094d0e4902036c5a62c563f1fc86c4238e1ce89f5176ecaea194ca112fbdeefbef4fa7c203678cafd34486fe58b2af04f84a1cb620c6e123bfd96301e0a5e5e5abcc95d28b852d0cee2f51faa73e42f22fc335f50de4c3812ee14038633a195083f3944284c1086c34995832c3cceb7d385b4ce86af10685c16005495121105272d1d739c584a07ec7801c3667bb280987a8aa41f9537e9d1812a5dba5b385a0b71d2e9573c6f3e9ebf0bf7267528946a6aa6f43efce908d32525cdc3b825bb11c7239f1de412704d24c17455b9382fd6a873180f0d5d44dc449320973d5cd0d4e67e83946b6ef47e5fc3dabadd80751f1421404e56b1bce748b7bde63c6975ca81f3eaf52586a55242c9745dee3f7c796d4508e818eaa4fa50490c1a79624561b98d2e1139a328806414c905372356a22393ea0da51c83957029edd8c2dfcf46d9564264d74c1c0497034ec018b1dd4c14acebc34b6d2c1a616937c37b8b4a0ee5dcdf787a0de1173798ab929b72e0fa83a6c9b9a99d8024328d9c236a8f57550a4f83e8071eac76adb55939f85f5b5f514174b670a3e8dc2b54656f6201940a81fe4953d2680ae4ec58635ba74d15efab3e06dca6ac269711ef2d4dd49f731e24a92a3b935ebbb3fe8d001cd4062669ae4baa62c2947033afcfaca227d88a11769f87456d5cd1bb6606891e71d63aff9cd5a7d23263a78768ac2ac54ece1441fd37d096cd27e916e68891137fc3cca427febd1947cfb4d7ccfad75b2ec5e809c132111eadf25a73043d68333139bd2435de9941bbc61c5c509897cfc19a21645019eaaccb6d06371e3d0570c09c7556e41a727e44d9bd672fccd1f89cc7d58761c16df8fb75fb8a1dde2caaf088f02dad91b6489114398740e6798f3ea8c7b0cfd974e160a0106d703d9589ab09aae79108e3212f19cb950ea9c0798a1532bc2a065d5900a12054395c0545b0878ac0b1d461f553dccfc2a22bf254ced88dcb538e3889549960b77ba6237ab1458e158f4f46606372e797ec9d9ecc6534acaa1218e7540eef11030bb9c3e5a7816f3b33a590d970619bdd2dc04d5c6f4ec38b7cb4d525234b836eab57f65dd045e02367eede9049e219b8712b8d6fe178080c5f77b821f1a475259ae571a5578eb3b48863162d45486f71a28ecbcedb35b320e5b6401f9e7870aa5418449bf47502626e1f42abf481b48d5a6819c640bfdb64f873d583fc4e40187940a6c3373ea7b47195270a8657898f55568985018abcea9bce1c155d95b426f91a734b2a14ec2c7ca2011a4d30019fd9b3ef63a804e9c30c3de2651c4213e90285a4ba100b31ee402e8a7f23cf9d4dba003bbf982526bc63be5af102dca34e7d362d6fbf6f56046160d7af33b364f2a86074d1c0fdd54aae89b19480efde2a9caef9de7c0f9491e1cf43a48752cef405a0ff16b0fc67bbe433a3c1b9661406c3726092efdc076febd60c436476f24dab1b0b8f8893986d951ed72282990e8b1526f4dcf539b22c01c6a7eb5577cd540a16a81296ebeeb7ddda72e60fcf2840c5b42c5cba30eaea5402f267d1d04bc80da5ef0dd2bf3c7a2be986507617c9bdbc96c6273a0c9e586a0c48c98b4552113149c6f79557fc8ace0b1a512fec3aa09ef191f95c2163113ac5cdd940f0c2120509bc53c3ea493c54703effb902ef752c830c61e85636ca95429bf16937bf6786b3eae1b277bf08dcd69f521a0078d633beb33c9aa0cb33b238e1021ca67df122a403a3698452740bdcac81d22ccfe4ab5f835d1961708d1faf6d40f115f16c6094ea37a7ff15e0534f62c19a6f4ded0967be337cdbdd2a7c58ba16ba2e4c3686e9d075c6fa7d29b2a0335ab4940d2a95c4500295f4db84ae65e46c54b7300909cc5411c725a31fd962d239aa0e2007c285586b4c778e2ac7afec42cd8409a63d7cd9c677031f43f4aaf04258dcf1270c02a4764177aa66db2d8f860eeb1fd06d0b27587537410bcb641f90aaa7bfc6f12bd143f66e7c933a0f3ce6b5048913e1b2d79eaa6c19e7255d5eabd24d5f12426339541a22d600cdfd1781a1a3894740887840aa82e5a461fc324285b0223ac9b95c3eb88160353f168b3d4ae8a2e87b7715b5fd2671f66e6eaaf9365b3d9e3acd9a749faefba6009783771177aa4dc91f72fed7a5bf6b1b7738b84ac0a07b4a5a3f0a9134a39e1e7e3e2f9a92d5644295f31c5a356092bf07c709b4c34305ebf50e857a4f593dd1cce0439d3fd125c1ede1a48f583bbbe0eec7058345129ef78868a96f8a76ba7fbfd1c5eebf75f3e0eeeb9db87474b96f321b87fffc02433513fb467fb74e2fc8feb498d51530c753e9a173e95e0edc5ba9802641a45db281b2e2d87d409057b4fb1925e834e90fa5619ae3a9237d5b104e7ac67c2bdc31001eedb4ec7064b2f72e0379bf8780f67ec4b195db014a2d130e77b1778efe3dc703f1310a566a6d3b5c9b12b1d4e25815493ed1510a516a31ced3b64ca49a783ad63ea71a57290727fa31386d2fbfe41f12d36a618c6c28d8f10405eb3e0a33e8ac2e4133ba75c688c8c9a2bb33c8fa032eaf3ea0d2c27bf89269c4aec55f8232b292e7fa9fc24527184f19187d9d8a3f52335e2feb5dc6d997b9b773a79a31db832b752e5738963ee5d61a1b426414975693f986e165e52d46cb059fdd4f48f008e96d4c1a48306b7c002fd0c861721656074cf11173ca65cbdb694c79f58a3f3365e872b24670b691682c10261eb1ffb2b65da031d070e31542f49704b77970a78bcfb4c4ca517b4c966a4e8e27664704f633e90cb7d7917dc1d3a8b8b7fcf59ea3a8a81305761923cb182cebdd59255803a14ca8a75fd007670d79a25eacda1138d67a0fd1da981529dbf182fc4d7a700ba498e4476a1d415381c9e2ffa3bd46201cf2e454c4aaedbbe3893bb4121a6de02cbecc1f319155eb8c99d1030103bb6194bee51e74fa01f28dbe16092955b9599d5c1f1c3f356e26d48fcad7c4cdf0eef25c25273dd62171785c9d2c5a01b1f3da9b4786b1b399d890e2049b73c12de2fb7177f2bc3d9c645398111ebcfd83b73119897bb994f998f4a6fae1b3d6361e171059dba0bf9de9af7a5a1b21641790baf82a36278945d649cf5d310f3792fdefe8c58986a48118fd94647b786e47733ae703701e18992bc1b143b1da6110a98030bb9895c14d7b8eae1a155a550e219a5b6301b6d26d7956ecfe4c7023eec1ff62538b3606ebc7906a1243bf8357f593b6cfff32e3fc6b51f6a0ffaecb658d526f7a5e9faa6294e4808b779f4832318cc184e49e8957b72bea0d67366e040cf76a85889fc6b04e84afab0d02947d0d83e0de19f12966fa8372f6e82ff402bd7a69195eb1a7864a3375aa9e23736fa4d4b0224647e416474c01f72b7d4af240d7f43395b5b04c8fdef1165ce1d56ee8ba0e350e6ada893e0594facbfb5f0d8829ae203929525951584c21371b86deb0f76ef5daad5e847135a6488b35ea33e3a165fea502975d6421d4567a229bf3ce94605885453610eb9c82f9ea743bee9e14776bc3076a29af268cc72d9092a492d9ff08c345dc2eb2f8003b561d9912ae1198c58107f8b37a08b35075af9863110e6770425e9d59c2dfff9d9942c8bc3bf7904c2a952bcd573706caf1ee14420564ffc433c0f5871c4bda916f2530ac75819ade49fa1de21edacbbf6b7075dba21a84989411c566b7c356b81803c7215ab0f326a6b8910dbc62c1bee3af51f105fcdebc0dbc56a50b22cf81eda563bf8c2eff98b476e8",
- },
- {
- "99444e82c6c4c47070b164f298ffdf6955ee5bcb3070b9aa95ce658db4db084d2056cfe61a93568b44ba7ddcba5d450f4ba0da7b119425a6628b3416663c638692326cacc5c237097db5e537122b465dcb21d8dcb5fe831789b72deff3907685c2e23187a56990221e755930a09f8d6cc065487563cb8cec82b9dc754952fa0b342c92d99522fbb39854e338f470a4b4d5ed2a39b8b6253b7001b0b953abc588d757616c7a5d1f12b1024aa572ef5a47dc8480943aa6cfaaa78064fb2b29830280e46efa418d0cf38f57980146f2482276c9b6b16f865b1606bf1131e894336979a163ba2e70adbdc746be0d38062fafcfe5603e6bbb55717b66a263fbd5cc7476302ea4a0dc6167221f745a26a309f5886934f4258965a0ef0803eaddd05e54008df8a0695a078b797be59f1eef95a658c99a7d52001d4108212ce5f18a39f1173291808c980b0513f1a531e03ad7380372b65572d3967af4c25fe54d99d664cb67e557fff05c12e10143c13b1bfa3e8db093ff832a7978ecd85d3971349e3c9b83939b73f0ad55f1f1162d0c106b99c0ff98442911bc15e9194f5b4ded97e9702b84e31b31380c224f392e5fa5c720a45f64cd7020e25a3931b5871e4c708e77f4729225aa9f48f9d876597d3e79219dddee0efdd16836021dbd21692dafe121217347cc128fc5eb051e6843978ae17478ef714957a84c74656ddd931cbeb43e32fb0a448acf2f90ee98d38522b4fa9aa36be4fa13306e799d4c0cb90ac0f73cbc018146d1b0d6bf48aa446a5e3e0502aae9fcbd196b36b6b7426fc10367febf687f05392fdcf878863de2e47be7e625d0e3e3e94e199f055c0fc65f76c41ede43231873ff10eb854dcd6ac9b550ee8533d16f81eb0e86471d4da69311c47255e78ac8e79ab36ce880d6b135279fbb5a712adc5c3862a356af49e9c10d5b16f4e5dedb80914868111e194745b802a0292c7c8564de28ba8e71a44f7eff6573e5434e65d496cde5b5e62cfa9e2e9ac85a164dbff5767983e71dd2661d37d9027a27674ebe3433731a606db88e0880e91ecea8134421962b3f68915c9f6a5e1992c56750f99bc313fb30cb89384c72571a1a6a5e3c01897b691bd70985352217fa8a67f3252a06205bd1a9931d1cea3736559572561fedbf3ac4c8bff9ebd7f3753ee69a69ecbac4be6357db7f4213b697a828edc716ac01da75c1d46098c7d5d6ae6f3f9a2903588c5b340c9d47c234efea21b700cdb8db4279afa2117677e824e627bf0f2b179c864ba823926a57825478395545f130886bdf2a7c55a2647a888c3998b750343d9cdc602e46b7b09a2fe9ef74db1ffc46fe27c254c927ce51b307e96a571da7f3f907223fbed2daedbcc96197e95edde7859f3b4ec6099f791089e368a68a5ba0917ddf4f50b93c0c839ea36cfc8053811f8fcfe6986e5fa9f743119ecd6c3e5fea1dae3ad7eb465a89e9c68569190688a8d56e4143ceea3b11fbd9de67173d5134ec8b0bd7d16560ba2be52345ebacedc01a2e03e8183ef91317d87b2e15cc6301586ed829d438e4ff1d074408b332c8ce60ccb6790ab08c228807509dd4b39f2c227755f6b039f5cd413ad6f46c9ec2cc6a79457529d297b1d9e74ead9bedd9bd652fb31568a8e2a9e2b89e4e57601bc1d960360232cdb30cb502b950ef930d54c2c0692a684cd44b0472995bd2b41dac1553ae47216253d6640d2653a033a862f3118c5b5d60a662d240bda5f4da51092eff514f61a425c5b14b19517ec1b371d240cc30a0739273b34f18a72a69b1586802a7caa6cc8f5817a8a995695d063c9dd26c3d45feb0f84dc8a0773151cf9a537664f942f351599cfbee0558f441f5c7ad320cabe305f9aba570ddf6407749b6db42f9ce94526a8f4170e735b1dcfc5f0e090af10e039db3747aa9b4f1f26acc34639ac8b60557f7753e2c261a29852932901a4093b7f307319cbb228e26eec289898b3f8ee236032163293b8caf64be3f7ffed236f1da688d958a1bbb79dd45026884904bbb936c1ebca7aa6b0c68aa8b667dc1575729e4ecb4ffa82ddced2f4571bf902c52fc4a0ea3f47aaf5c243ac2a1fc19f825fde5d9fc8d06d97a351eebf4ae1846aa62554d57cffdb3f3377695338f8d598d723289ff3962796e8065632e7da9d8dffe2636cd23eac15a60568eefe3e77c561906555268cfc1e9342417b1cdf090cc16c79939b15a9311b0210094087dea22833f74eb0e35d44259ecf327dc84f3f24b8c2bfce7be0d97e00d2be88a150a0d557ff963b4cda60eb99935951d288768b4b2649b717133517f5e3909744417c9c3102c77ddd285976cba2c89e2b4f297665632d7c8652847c4625038a6670169772de0550066ec6c2018f503cce79a333ecc0a0632334df6959d2e3b052fa47c5c84d15ceabdc80bd6be0ea2a5a8d5e374e0e9a613369ca8d4cae3d9f98755560b27b2f6e47b01ba390f5ddeb732c22b12abd225e26ecdb639b08f3237e488430b3b39f0b63aaaef4907cd003a8f2b4c3bfd721d6c3fd3a5f062d72746606a529ba34251ddec4026f40d262e9d527ad84fecf5bb2cc8601c2a38437098aec2335104842ff1c455e5d17c136ece8d461d7a3bd9a60339c22d71059e09b3603c0565c0345684893b56054ec4d3db0bf15546cafb4a03bd7775c3157e7676bb7bdb7baf3100396c563eba1a12952503eb6ccde6b6d0a42d456743c4ddb97f5994fa08c5fa41315080eb6b928090956bfc6252b232f6e0785d233c3adcbb9370b59c35b0dd66005d516befd1fc843df8e68fab19858b91e2aecd1c8a88b0fa3d4c2fed2995ee87e65976b755fbf44ee183f9fa08848bea325807bce0b7b61e03e50b2c7af9b360532a17a8250cf6068fef0198738c82a5e58961c54017e343fcef7076e823d63b4deee472fada7989ca7a213d06a4e3eb2d44b16e5c94b1588321cf6c45a5a792938b058d667e1730f8386dfedc50ea0a959b78f12f2949b34b181f90bec622515227dfb8a5f6e89d2e559c0ba686153b218d2c50b67503018e22914ce9b49d3bdb7cf38172db1ea130baacd640c111614e3db204b3b50641d8978dc14b2afc27a7efa819cac6bafa8166d1c127e2237520d57ad38a80146217a12363cb1f8a720e328cd8f846d379ada43bd4865e4aa633c479bd448d205b2e43befa63486c717af84a733f1dececc127c047850aeeb8ce677612f5966e23d92c1d3c758aaeef82f862c1154fadd6766e1dfc780bb447732a5968c0c78b9af4a9d669338458b57cbb77910a24678092857c0b903152035bab6b1c73f7b667a08cd0d31128888de3ff1fed24866eb60beac19c1b139f77bf0b9332024999a2d56975e691fd7475fd93622119d0d725bb99c1d6ac604d6b6be09d6d29360fff9f84e5318259a67fec08a006d9772b9410ec6abd4cb828b898c625c2fc35c19cb9a6cd3b0073baec7b5af254d21de8e209539f560bc80ea38e33658a68262622cdf35dcd6618b9e272ac3644c91f27d372c6297d8e37201c6a86a7d3accdf579c15246276a0009ddac4021755f4848d10f714e9da86eba13f461e6a12edb1aef2d6117986120750d609682bfdfcb90ee3cde8be54d45f841a6dee2d5b9fdc4e65edb7ebffcf3cc5c8a4e1c6919ac57568be23bd8283319ce11fca3caf968b057432f163f22e29cac30b8154a646ca0ef4fdbc7770ee1451fdde9e9d651992d94c843d4eb2570975528ad9f8c193f7c681a43df28242547010e30d75fca04f39247c77d6c3715c25fc261ecdba16844bbab23e4d0482bd1565ca9b526ada9b8f5703661a84b23070d85f3e8265b2ce10750c5d798f1a8ef4d51a473ff4d2bf4be615566ac796db9fe61a224bcce05c31ecb9ab7bc43a609944a7c9398a7875609ddbcb556296f548a117847df7d0afe48a5b504e85b0d7ca589103d3197933a744fefca795e1e036f964a4f14554d5cfa0261e25d6e5e02f86e402906d3637a2352459cb1639f20faea6f0e3fbc6a39becb1b1b3a791e32e85e5bee31be685410adf0c11190e20b7a5119b90e83f2cc4f0de8898606bb6e64165c95d4c5eae472daa6836a888ee4d9a79de72b8fb47a9c9c0323a2be9106d4ee9ba8b3858c256032a9caba37af94df4c7b0adc2f8478cb879b6d452d73191b0fc1ce944df3f4809cbf3ad46eceb3ba4abd9679410f45c8aab20dd72626f235e7c0c934b4beb4507def24ebbdd7a507943c81d54bc69df578aacd9ed0bfd3b7809dec345ba084d88fa9c34d80685415a4d5eaef9b88e51432b2b2037186baf123a6257e47aa56d6531923d38178e8264dd315e95bfafd8dacaf901e354b0f58f135d638df2c0f32453205c7aaeeedf8c102e11cfddea9a98d3ac7c385d71b760cf2afeb1ebe1d64f0222b9b101893d11a74ed175297c1dfd188a2565fbecc6bb07b56ce3973322a965dc5a675587890cc65a71efc68fdcdf1a023505ef0bc0e6b12dca5860fcf1c6c94c2e2ec3a72b8a019d69c82d36a73738dc3d17d7fdfe992bc8e18cb5d3437f1f619dd318b95d1a56b6d273ed79ab2655d83e2dd63cb6f1f5987eab6bb21a7b13b84e2c619b36b842192c3f82c755d8af840675b0bd67a655d641b1886c3c9c147ac87615ff3e58085a879b21dd63c1616a3712279ec87d650a2eed665b797ad631f0ec312f343979cbc49b99385cfa92841cba12d52777df565545a1deb07800a15431c0987b4a543fd5ed6832e80ab6f4b4d9c9ec419932a6ded4759f5c7630a0b80139234b8d53117acb4452c60b477ad50157169a89bd796e2308baa9395b513a94747611c7978c82dbdf48d716c3ac181ac2b2a4702c02a324bd4c5e089d989d020ebec9963b5c721a95492158f54973b7fc1828181acb3cc8078ac095136d97221c60b847bd2a52427383ab68cd1f10b92738c13203fdfa0b78baa09c1837be2498667c459",
- "0ce980442336d0f427db869a6799baa6785b5e030567c588e2a7d2680e96c11b7f415fa27730969e0b1c3973b5f3192d4e773153def6dcc09dae29ac44eac7c42c2666a356fd4262197bd5cf6eeefcbd662d104423ec05c19a2e6ddf1834a3445a09e8b1062a1320a5e8ef13d6ebd03c19e1813ccd86fd68b46a",
- "1ac8a509db7bf4acb80d8d394a5abf47c273b2093f50f35049e749f3e16cb0fb",
- "47cc9eea11f9f3f9aafa23bd",
- "088888333340b3a057b05491fb2402301c8654948aa6d5ee1ec75eb045858c22056fef0873d6675f897126052923a47a30675b266ffb6181cbd29ce2da3720e36a227e4c6e53328d789913c0d9cd149a6e49293996b1be7d6c513b24d876445a950e723ade3efc36907c840b9b8cfdb1503811b4044d931a0009b381fd60a5bf1e73d16348cb57eea672709875fb9d56908dbc729d5d7d322a17a41d0f62c9af9a013ab1e19fb7b6c6e7fa0c0b18bec5e3d3e92546c77e3753193389e5fcdb6a6a1896cba461343e71ef7a156b136b27ae6f45be9368301cfade203e9b53824d70f07de9abfea1968b8ff8489b9804422ba05ac3c3adf23ba0848817fa51febab5e9b5500100310479e710b663f064c1ef101c9a5320367cd8bc6e52081a32f070e7d3fd6f4210cdffdb9fcab1de4af5b06a7c6d191dcc12b25b3053e58952bfd1f723afbf570796946c1df9579ad14ea9c8c30389c1de4d1e845c764fec5eb8faaf4c558c5eb5113018c6a21ef653ac7d7f5b6c7e1a8fd48c6f423e9913436202da176a86731287db7331db055508acc94168888040ee37b3c119c8a0d88360241d68745825fe480324a944d56e7cd0375d4d33a5fe7a3863c2aaa899b2d24f65b70bd804039116fe959c32442c9f0b5470463523eb4336985b71125fe5235cbca0c88a6f92416d038e144de5ff8ef6ca749a9e239f02db505bff8e16fad1cba8b1500445f067a674142b6413e9dc0f432242d8301879bfc11fa86d1ac9992ab12319fea8b703e10a13bfd4b017496222be26b56af3ef67610f904f0ca8a3e7cc249ca8122735a542b289f13922904ff23dd197f8883c7ac77150d7331316ef94e0cf13b6ad95070420513599100b0a6d117640b781c622ed7ef7ead29476b3c835bd9dbda2203930bcee7ac01c3b9c89da405ee436ee652ddcc3e96c7f1a94e200eec9a4a226f3cf7ae5725068916e73b61149497d11dd85157f895669f51978d1bea8fd2afabb18d082365daba2682ef623109988b7d0e27ae57bc14d86603f93b5ac040ae52d8db404ee27e6c34cd4246f40eccf9d3f8637a4615a4006918b01d34709bcbebd02ea72958d54db3e87d69e6d783de2f1841029d6975eb11f9b076c247108797d5368c656f888092b82aa81aa26e164e038b359bd68801c22fc107e4083a9d85fc254b002ece9d4545310b0cb22ec1af04a7ee31d210ede4b605dbdbcb70e4301989422ef46edf63f9c96de9cb3f70638b51df5c0abe79b7af8cd97148f2b7bf394bea0f7bbbf6925f83b901b87a6079f2c3b38a98fe1a86dc7f48bf97553701834f557451df4b41e7db984a34432823585380b45c1b84813d6aa21107cae252923fb4673cf660a541e65610ac0127d238285f53bf329b62169f3e42d5efe268dea62578e97da59a58a1314a1bd46cf7a7cae772814130b51411082e30062fdbda1c9e14d6b2bfff89d0379d32461f3b8e833b105f6a89532ae748b5fb43f283fc86450404e8befb8442b65e338aa0408303a70e9c27a1d923d9f2a06e7c6159c50bf2e3ba5b035420ecbd9d0b5fae478eb1ab72fa714f99d00188bb10e60380fa3a3a318c2d359ea3805c2fa0dde17ee52a504f70d6b466bd38d1dd4196be336a9ab4a9e573d1bc6404018a119f688c1dc2a8ed1433e8a8ebf455ce3808c245f0220f0c12d28c771757763bd111ab829294e2429a6f7a59858dfa1fe0b806e986d40aaff934589fefd75ab91097a979f26bc9352267efb2d82c4738e4e6c451b0d5adc398f546c646b9e6b8fc84e91651a1252d5b805a857c7798d102d1e6f90749252bc53588348ecec0897c79f514442fe3b27608c95d0cba999a7e0fbd7f601689b4dc63ecb9ff553ff12eca3e9b26e3eccbde28770bb6aff7c864ad6be77fc09f81f90df6efd0c4025d0916ab5197ab846dfe6121c462761d9cc87112ebbca197b0a222fd34a15b824b7eda06a56a6ffda760fae5f0b527e2798f01e205a3f47947a4bd190f6abfb1dab2e3a53131af95d593bb57e4f4af506440cf20636d9fccc449d9565bf43dec8b6877337ca5a43900c1dc600c877b290342914e909aad8c5f0755bc25652781535c057ed5ab2ff8ad4322a8edf3fc1b5311dae6361a7395919725f4cd87ce0ccba37c64eb3618f9c5a53644ada569b90cd07184fc048f1b589eb29852909e75e7116ef96a268ea85c2bd257cefdde9222d7eda875a2a3abcd3a02a1fb470ba967b20beb54914b8b0c6ed464ba978088d7f8b30d098966b0bde82a8f1210f5d0c3405c9bc73f703134d0b6ee13326f65fa0b8154f4e30808997d4afbd060285942ca1dededc3410a099881492b5730ab7bdc2a4cfd0068f67766d60b5d4945f121459d2083334ac878d067bef644b9ee427bbbd6c9351d7b019bfc051c05ac301ff3792a1c687546dbf6a07a0cf56717374bfa1191c22b7753f6ae02392f8aac9207d1ad0fcd57c5c8b35817574b7dd90a00cab75f508f8a234eabce6618305f94746cb6a8573389d336bb67e1b0d2b6e9bd3959ef344e1eb245b522c35222813b8c6e82df48987436b5592025e9786ca63b6d1a064223bfacf59ada713c2a3116611393aa8446ea79b3cb21e96d13b659ada2d6524686fd46ec66c1b4d8f5ae7831840c9e3db64d528f83a1cef1e0a586a783f8306cb261ed9c2905493e74d35883fcb39cfc5745c282104cc3ce804999231d13e1bc6f2c022f05999fb57575bbdaf00d7a990e17dd2f8b9dfe66a637b42f58ee49ba60f2dd9718d09d7025b6061b2087bc35f0a8c884f5b67a5e18c2b4e857d3b48b79dc7cab6b72f572d22987566238a7153ed6264578424f1ce091fd05b7f14563fe12c76104d3373367af3ed3aca694a21127b5912c0b7eb1ddf9d4a9f03f660d49f7a7f0fb42797fd112414c3eba2b75a04282dcb9645191fd3dbe376e7f60ab40bb7ca1e991053a1912854a68d7dcf854201d1f2c26c6cfaea32e29d80847e6288274713d2ca973b91dab97884326b280c6f06c65b8fd25d314be29139961051a1d8699467d02b67991baabc9b05629660c243ca3b0477362d5e6bf9eaa33beeb52cf399846c77fcae11a89cbfdb2058e443ddd44fe202a3ba5c2efce937d78b9639781b8b2b99077b433189cf3b0733ed73b59bb194c9a98c5aa0cba6e71d1c5522f193defb9e31fd2cd60f22bedaf7008c2fb0b55a8dd52731dfa2bc69b40f835ae95db040cda6a4a1588a5ba4769edfeb7369c1e9a3b1cda293255b4942881d94d771b7b82460004875e71be64c582f2830c5e80dd6de421a311c5852f4912bea1451b0328d01c7029867cf9af99284cdfc1e1f0aa0d8c19ba9bc035dc270b45724247137da5d3fc4daa09e7014fe1439889968eb23fe124f067825d5f7b304f17a983580e009e0e51630ea0006dbc74a30b512cd9eb4d0b315a0ffdbfb581609ea9661b0007cd234ce43c17c92269a7519bfe99c2ca94b5cd3e7654946e67b37d4270a369266db6804336a446022677a024d44cc02cb04108292dc12f790578a0d61cb6fada738902eed3afdf1850bafcb279f18b5798d7466752c6368a594533baff5dbd17974638ecc41753b184845206c79bbab84dfef148eb7f1390f8cb7346a14c88caf540c241cad11ce8869be3bec85d029ef490fc5edacf94fa962be39a33c8efefcbb6b43960d5bc35f8fb72038af3801466aed141b50e9ac7dcf1921f7a6abaf320ff02ac34bbfac265e05e27495e6e027e673a48a874e6f0c33827a050fa21c2efa789c1e3df2ecda95fc52ca7be35dbf17ff6c73f37cb236e5131542e002913d177ffb21ac450e2542e24b894650007c36c52d90f83731009a7c3239ccf11829cf0fb6510d9924e927f14d6a06f8dc772fc9b028a8bbd2d3388985f3e2609abbd08434c46642b97240c9380a831bbafdc5db77be63a1400cc9a4f7362a689b07a77162022c6ba7a1bb9f0446a0b6b460ebdd9111132694fa5f1b29da39be66c5179849ae9720b2da0a012d4bdfd1b18b8fbef0d5c32b92c351dcf2c599f069c3b53f622fc8e904f27584b2d97d43f779abcde6dc1413c0a677dd187b28cfbcf7fa6316f0967b53977432d45944ce8ebd2e265c0bf6b2870c75ae808fed52aa35421ef55667ecd6f9d279c9b91c9314bd9411bce267d6ad52b1d910b3e65147c3eb6021a0af98707408e66bb11ca5abf5e34b2bc85b144fd06ea56f5d7f8939fe0cfa4862e7f306de069cf85f4aa7aa97c6848594f5a6dbcc718d2af77497f4b9d5ffa217fc301127071e9bc9c2c9222ba90e286506e384f321e622f05d81c114953d0f7e9626b74f4a6bea8cfb86ceb4575e5cf4fb84e9efac8291d1f4153ad3cd9a34ce0ffcfbe30b6829c0f986a4f85d63b602ab99ff3934b1e0c46e55d56eb479b79ca0729beb59aed783e9a3ccd55db8d884733dbd93f9fd7a7209fb92fcc49826b2d4356ca676f01b0981637897b3d2f90f37bfd73b214a398a8e4e2f9e5abec01d8192ca690191255dd8304a2d95a69331288bce00385f462e942f4d694dc3560a263c8ac2b5cd1d2c63b90ec67c32eaf5bd947bd8ac730da9c09ebc6888b0b4f3bead157aa9d31c2802df8ff0e4d69b7abfed6f184bf35a16ffb5677ddfc4682322128932d57fe4c32f21e190e1147d8e673ae407b1dbbca31331310b299e9f3db08ebfd2dad3158562c2e47addcbcc831cef0194ac8ba9778d0103c2955c886d439967bf788eae688f2a7459b0ef3bd16808e8d768b8962a24588d918ceb2cd1cd611b504019f65216beca212f44600cb7fac77216b7645c49f18064a3acdc01399315084dc9ea151ee28534fb31628d190bc540ac6b6aba572ba51aee89544015e6fbca2b3c2330f2ac1f68849e99e1a1f7f523599eaee22720392ea52259e26f1101614d4edae481b3783af4e99082d75dcca549049290731bbadd1ec0a93789ad5c9afe8bae44e35b3e59e562362964",
- },
- {
- "0410d1f8bc890649c250a3819766f4496f339a6384e34acdd72b3a87266edd2a7eae223a372883f978277a108d6e59fca1f35f25d7a9f3aed42d35fa9b12241ac04754f76fd8f0e8ff6af88cd851887a45e89f1c9192ca66bfff605b128575d2ccc9ca3ba1ba23a0251b2cfd6db577b29d17ce2ea998946997f5c4a97a397c46024681a400a54425c071232d269adfc3b1adf15b4586c4dd7b8886f5c1023bc348bc674961ac6e221d914f432c2f06dddcf738227dfcfff88485ed45882809d0e57019461c88683919b87c45e78223c37a5be5f758e4f0dc6add22f2062bc2eb9bdc31b8649af17d526ec339f0e6fc6a41e26299c65276302f982235c3e5205ec1521625ec08a23e766577664b73d18d5533261c859c4cb4346feaf7540a56155c6c3a4874dc86ea42fd518d71221ac65541e2dadd2f8e129e7809f2835f07dfcc4128401dae2b5fac7ced1d9e07e3f348c6cd26f55b3893d4418557a18c366dcd5eadea0dd84ab95437d6f23eb9e5877fb2ad740ee507e2268c39c7186f34e5cee2d0dbba1a940f516a018f23e716a399c317a7a81f89cfabc296c432cba900ad79db67936f76e4d97874fc5f8a9ff84eb7a0f6d629c581ec5c451e27ef1ed468f93bfc68b2e0412a543d89dfdd812d9421236a4be9eb374531556c207340886c7b84d42d651557b952e0982f62c5c383e92dced21905174a5a836acdc3f2393e770d6cdc22c39575a42ea406f36889dc9558aeae5dc5f8b84862850b55bf4accccb6a8ef793d641d6b08235f70ad3b0605eab462afad1af80fa003645f4d302b03d81a7d167e9a8187bee0f76b1cfd7006b2d2b55fedad6e8db1d3ecfe031702dc327ff2b0197337d7542f42702cb276de852b3d72d9acff8a7feb8882028a5e340950e523c41cfa184b3d8878effe56742994e60240e58cbfd01541d39fa007a9f0ecccb409c6cc540354ccf35223677cb74e7ef7330bb60420f7d7bf97de6888cb343cd4fb0928fe5df5f1b018592ccfa7aac6dab57cded573b5950b94fd935f32cf332dd85b2b36501de6687612371dbcfdf77279d647ed8bdcf81fda8b7e0c5ab139330d64695d814fc6f761fd141dfb0c8f74e2d7616db3598d8de40b993fbdd272ca37db27b82aedb08bebc4a8e6d0385ab20fbc20c215ad50fab8e93975bcab3ff38667abb0545b3b3f20e325f01b80a32a3cc3ed51703d4b2826849ee22fddd5b544816599dca0d8fc84feed9f7e90caba53b70bc3f457eb1adb89fd0b67d2c0ab53264430c61d2c4a1b19ea99a9b453fc6b5ebf5fb5ab799134769c9b495c479c828bcc49a8f993c3127d5cbc31afb89c0e78fbc323755457ebf0f3344d3ad1cfc59d186e96ac31a9298e655b3d1df74b95f30fb868631053540388a13d597002f689708d35a2365e309bb96db8b1b94ea4c8060c2b165f7f19e72056409159371ac9c44f6bfaad9b9567094d18c29bbc8aa2c8b5b82735d20f55284fe68186004b4a4fb644fd52d9645b277c1dc238a764005c1d2791ef36e71786cd990ccee4571d9a9b1aec757e479cfa645e320bc33268e05af9cf90e0e616ae7f237c637a99fe15b4ea8a3232262d96855fa248920a28ec03f77ce4dd93925db60ec030a7be455ba9d08edbf6bb717b1a13c3ac1deb9821e21505c0a8971d5ea5dd8e4c9cd3a845a336209af191150ba5d9b8c2c450e3a765e8670d7f846b2461f971fdcd1942704f620a40f4204b99f9035bbd543f64b927cbc7a74f32cbb12c3caef955f169a45374e4479430e08d333c4a877baf41a27a0849ca3a157b6651295fa71ac94b6e3d30b5d160965e93d2a81b4d575cefd264399c9e4e17059f4064465b2d92c96ac27e3b221499b5e642d033992c236b905c072faa1e34495f9890bac6228330e4016c061605bbfc478c30e1b8534c49af54785972aca2d144328b0a540e3b3810a73e26acfa22f48652d53ea521875475ffade8ab50b9f08245fad753350f63dc4e898948ac7dcefe520ca47394f8e993a6d13ff68a2f78cf294f235f5f863bad10c4f5bc41c3ba93cf5e076357f0f7fdc136f34b656b1b8ebb3eed1ac429c7d4edbc902f7f4bc24ea9c9b200b9a9fd7adff0c6445ce1d2171fc031e3e9f8b8d6b448053393c8813d91333d4bdc3bc5bb2b8bff876cd29e8b92cf6f7bc727517b6f57ae031f3040b0637dfb40b8c1fbe44cfb6bb9cd0a445fd9b3daa1da2b1c4a82cb4da1fb8d525e0a4d9ec30e9aa75b951214621c58c1f60c9b97e6c6b330497e7dea790a3cd8158a76d898107ff3a5910707ae60c8a46c633b522aee83736d005de60b9abe202435f8bc4577b0eb08b7f2b617bb5a831e95d6488459bbf15919d764b39684d7cb7c9310f343fbfcfbeeb212a90d96c7a26c1026c5cb171ee4ef839785076e5084026077455c73404a2653f333e9bad555cafc1a9613387a02bb1287c380d7478238bec8943208de585bd18b448b6099565cb3ec70ec6672a778fa6af9d1b17b0970439da24c7bfaa74c85ecd8e5852e42391ab2258024ccf91e37f2f0e86df958b197fafd12f4a45f7990375f1665a14f7f5374ff7740f89677ea8660587fb80916b30629a7aa88213bbf80512421a0a37414a2eb549b81cc85072cdd87e4e69d97ecc63f974e60d20de0233101c3d475d777602b12e2f797e9237570085b0e9f48d4dedf233eb1301ed4621f9736946eadf599bfd79157c0b4cc31bc273f5c6f133a4e3679ff6797d3c9b76aff4bd8ad40726c1703c3d8b78f0974b748d0265b0a75928374f91b48c2d2b2c11d8b6e5efddb75009e4db72e562be59efb0bfa06808c89f585a43d4776ef08947a77f277526777f0b52f1e0b5a03aa560fa45c8f30e584b58ac1fc00b104942b7b86a3cdee1abea349dcaea4e058faeffc567e2c3b03e1c5c4ddc675e25aa15de1442bcf5ee972a8c5204ca5794694759c13a2d716839dda61635043bdf1a09e35cb6d93b4df3b7a00871f79cdb4ee69c79041dd14deb7754107b8fef8589d2d240ac1d8eafc52ea847263512651bbede2fccaf6da816b1b892319817bb6af9fc17078ab6cca95f03cf8426249fd4f2bf91921d39b8cee24af07a52bbe54ca7fc4422a310dbf2149b763ac0060fb2c59154d2cb0da1ad4892279b4e0ce7f5f92c189c3ce48e518ff48c4ffa9bf2b02d4792f84534958dc6bd2914ba010aa32d133f6a07bdbb87a237c7acc3ba5cf101efe947147ed4eb3bfdffe5fefa991c0dc8760586218d286944c52d0f221e0101f74826761d01a20af187f9ec1115e9e98bff6fbd7c8816c15d33c07f51c171490997bf269951218ae92b66fa3150d3bd40336abccb717e18b53e8806fff94009910f202a5041b5396d1c339e6d075bad4ab66a0637d81eed1696e4068024001123204b8371f0bcdf0ce07d79f7c917327f7138a75947846fde68665e9c767fbf96bb3308abffe7a8d05512c81e39fa8dab2334f46ab9543921ca97be31076dc7b2a0d05e90b7f7610d1a391b442398ef56cde3b18737faa8f282572389b4fb3c55cb8ae6737257708c808bc0a414bffae293bc69cba702ce2959e1a30edcdf64985a4b0bcc927c5912f819c71cc9b1ff5d6e5929055be72ea5c8c1a4a591093deb5449b7e6b60109be1ac0cae472ba31e1035ae65f3214f50ad699a077a2de52f7180addde0bd78c2698470b1af13cfbf497d243c9e738c4cdc265356543885c5b933a299f01a5b5a9ecb0b4ddfda0c28573064f6a3f142801795d66bcd5c31868fd3207fee7bd98c47e4da26bee64e1617b20cbaa34e3abbe31126b06d5737fc2b577b19d255a519397f3ff8668d0e7d401a37e368729e4b83c5fbf01c32ec478967605cbc0675f685b5eeeb42fc688216a0667e1204c995c9c485e6f7712d80d88edc9594528b1907790549756dcc8b0d32091f36d2b4009639e68daa130e83a1ea18353ca34f431c548d91c1591ccf8b25eec1f7a3c18ddca71b87bb290a5c13229250c5e193e1352072f6798ec504b3b4c6aa578737332f52baea7bc4468fe6d8dfabb9728cee93fee50c8caa113f5ed7e9b55e21e98d73a377ef68be7e4e965dfa50cf863e6285236f11ce80512c573ae2b55bcb43cf6ebabed6783c250f991f5f68a59dcb2ac13a3c8fba8dbb11c79dc6236809f2d7c4b0ad3cecd24b85f1aaed9748b8c109f2fd98ac8a53bd52f18475598d67305117de8e03b0d988a2847539cc2efad520f86dcd82c08ad4b10e490b9cb03bedc7197bcaca55526cd9c8a5a5f69f7a1697e7e31aa76eee597c386418e89f06b0b9817a83d6cdefaf9594548b33cea1cbb585e55df3d3b66f0b1a88f4b98ea4720f1ef5e6ebe4958078ea0bacb8ad776e325ccb252f81943b9b1c2f54aad3c7baf1bca0dda1355d191f69c5d8163c464898116dc89201032d1e3281c8054882f60522d3a65831bf779a854fb0c195f85aa66522386625658457e74d5c2fcf5234f226da4a579ac1f11f11a1e0a6993a4dfe5c856481ebe9d8d2363401058736f7ad104104aa03f5c91496aaba2fe4072d418d91c2787a9b4ab0cf4bb65681ad0392ef073cf2fc060692b0c0c194c8eed5558098cdfa3317ab02626159e40e5c76fd64b2ef60b8f5f368b6b4fd7ea3d2d3236aa01d9db7c8a01929f9fd38557335b926251ade1a0d47d0c1444e6416218781c1a51e786dbe9297b78fcf0d0304c62929e00744ed4e14af926313a9849b2a464048bead075044bee013cbe318920c4172138560629a0ff4fd229d81bdc7c7fd1086ab17d6efd5b603a1991b33a55ca5b9e2051b7c140f7937adfaf474c2f284489d9b1e8c71d58f126eaa451407eacde9f0e86504f7de3ba4d830199a229de2bf39014baad6dbbc448501588ceb2575db0ddae005b81ba9914bc22b6d600e2c990f7843e553ff29d8008265eba7dac7b5b5a7ba6dc263fe0e262a7b8638a81f4720622c7361554b61d7b04c7f8b133440baeead7d51ac8b77d606fd0eae1c55ce7e8141dfd68d40ae3d8d2dc8a061085b4fb6d8a06263183869154618329be6b01c2890f2b5d0a0f25dcdbbfe2ec3597d79311edb943613fd4b59157df4fc2e1024be03d98ea3cbec7186ea9f4a431dc3743b9f0871b205bc0c1b3a001768",
- "113b261414b4b7dfa028668ac8b0cde5734120124991c54f4dd16a87d181efe2bc15f6d0caaeaf6ad615f59ec5c2833904a34b4d34109c82e10609b387f995430e8c13d83ac34310d838af9efa32d7fed6224c0a33",
- "cd762390b93369f1e207eb15deeaeb0036f5331e82480d180f84a76c3e44550b",
- "e88c14ef96c7768f5dba9de9",
- "8d6aaa27892a76fb05a2e96cef9a9b4b7ae0670a12cff95f7b076372456889fbd3b9b4fb5fd98b3bd85b247f15009be2f4e7a0329dd118b6872199b314e159618ede0381dd97db28743461ace1a694c0383d8458150a501d6c45f4b50d5b1bd47e61a51f9ed4929bf2e564f201ed0e6825170027d93e482c1ce268459d2f81cab41f0e7ff281430c16b34a29b5c76630dba72ab9e751bae41122b26121d91f2af271a23e818263f46e05fdd52f319d58330bcabf66637a368c0a8aeeb20cad1916d966e5e0b0de74cc67ebe57e3d1fe01e9743d42a931cb4b98bb762ea43ab937d1e5c42eb08fd56e70e911bdcc1ca4ca0604a329c5364b262ce2de282b4732ea657b89300cc7b7127ba4a2d08c13f581f024fd093ac09c2bc245be60c80e102405597fa8082f4d28cc954a93217edffaba3d2a397bb59ee89c8cc0f33eded78f21183bd1acdce64a923dd609a0620d2911f61e81fb2c8ccad8ad9d81157223253a121ea2bc60d6a3670c563fe06bd75688572b3be83cd31dfeac6b17cf8455267b481219c42034b2252977f32b8e6588fb05166498fa37d17c2b002a655b5711bbc21175348225fdcca041b1f97fae48fb1e222c5bb46b5202191c00666b7e1b2d84aca3edbee7a97dc0f6d1330e929226f8a76c155e973c1ab62c867e1f87be37788754e51825ba31af9f4722b5782ef782fbb70c391a664f252d14e49a805e94790135ff6bd881a687f98b42da96fd34bf240eae4914488af739ec15f13f048a7eb5fa94af14e8b6ac5fae714cbef6268b114813ca2a3920a7a9d5eb506a2ca211758de292047eefdb5a97e18530dcd8410495fc42abed91b1204d9b8ba9d6aed11d2d0fa0d931d46f93f2c1a560ef9f5f7cee1497be770d3cb07c534215cec12c1458bb57aab4d95cf4a15a5e3a3bf8e650206d5cac4af3193d169f1a57638d9a50f6b7c6985d42f7138b9226451670d7359351c2affbca65680557693d03458341198b8e13d0ea6abb7496edea3cd4dee2eb93695e668c7c0901c6809b8ef434e88b85a8b22cab6508b9560fae62900056b7c5c29a8c899bed45a2b5159a1d4929476ef350101317f77f02d48a039cf4cf01c56319cbba16fe908c49ed6f3face88867c0ad3703452baa7b86fe58a00ab8f740b4e8055164b0385dd3fa44502ffbb99cdd843bc3287ea468aafe4cc298a3fc180f284dbf78aa09e0a2f7d8593356eab016ad8dc505420edd376b66598a3d0aaa848fd68c4e07419b8b50e40febe2b6b17ad07726fae1f87e86abd01490a0ce24fb57b533c765504ee0a9ca154187bcf5e6828e3addc7597532643cfd992558d63b1acd00e7aa41b9765094217480c08c43f4f0b3f0127120699b7f2a5ac07c655b6143e467777cdad4bc21d4b57da4d8f9b9a7e4523d8c6fba3614b7f7281e80ff0f9004577adcff1b79fe443c80ca9655ecc102d5df6aab2ff6c3401f344b77666c59ac7d5b92bf4f1e2322f74b75e6ef2bf43ad9e018f164ae76a91451e5221bdf5b65a4fbbaa8dc31e6063b451edbbf4965307f8e65bfae87b15f2453083bea8484017228a9cdc6edab1a28834eed8ce07430f776b916b3bdd2340798955ce9ffcf114c3f6a88bcc4c7b6f2e3842426488c340d00f2c4d2d6fd3b6263dcf7a57f5cea6c77efba7013297bd3320accf033acc0833aaa8e8f95cecba469704214f54a1ed581349878a591f9993371f1daf92e55b2a4faf8f952cf785c687a59b3c258daef1b6d7bf9f904123c7384a859933c3ac31e33edf648a1be4d6264ffade860915bd118f0b9aaec2eb8e16b2015fc25e68caac77a3accea53b9b178f6cf48d15029fac12963b4277df037b7a494cb29b1d9e6d2148531a1f7360519cba5657c080254f130a1cc3ccaadb4298d7ea0223897e63d798b4f4909577cf9b491a82de0275a246bb1211bc4144574c8ef176b382262c0e087975cbef33cc616d32e0131a9efdbe8ad3d9cb5f935d3f4f409852acca22ae2a6e7450e9a426ec3b9183f93b4b7f89d850e1c7053c661936e0cde23e831a261b319b430da45772f0fc0113679d06f025983bbf37ecfba35eeca28de5ff4815a490570491266e92faaf8d0ad4ac8df106faff8fe3c8d050ae9dfc03a01ad177c21d7b653509a80369a668a97eaa532dc9867c32aebaf89ed36586e1ebbe1045347766a354a86ec1e8b2f30c8fdfbb6c5d549e7a84db81b73fb828499c5c4be0d4b2b7ffb197133a0ee18abb5a4e371be0ec0a6535507029316f8decde30833ca47493ffcab781d028edfb91c138609baf1054ad52a5d8ccb98b3ca5b138f253d99bd556afd80f71b39f36e0d96fba4e0cbdb18926894968aa825392f12d98b6497ff85a0e4a91c97f37ba1dcad30fe688b54008b925805104a61dc22b712685202ecdb073fad9b10b5b9ee2ff781f23fd41ecdec87f85b369a304b85bd2af126d08f79d8a9e2bff0b18607a95c4efe35941c5493c94e3f2f3902e79f4cfe84c138b83c7f32d7c5a125b28c6107921e8ac92f1af7da015b46a2f9169369cede770292eee8a5f40d080ea1c267c33cb7d4187093d486dc3911bb2d6cae036cb508e81ca783ab5e95cec751e39f3038003081a252eefa7cd913baf136d4e27076251da9cbf0c7d2586fe02b62ec786790ef08fb3ff3d79bd06868eb1abd9875920e14fccf6dc144e898f578b7295fb5f4e84cbf683722ce3597aafe3195e194736fc317ed03ebbb00d956ce89f7a41a334020e1a88da355d3b47d5bd3965a290f6fbf5dfdc8c8e6347b4eb85151e53a960311582235f3b546ca80a670dcb628fef572dfae0c101bc08c80f78d5630a793bdfe402592c316227f2333b386839a67e6ee8d9396fabc9648ea656a407670efaf80966034958f4a70fe7b920c79dea3d5a0ff05f3ed0516537d51a686efcb258520936fdd415345251c9ac1143a41be295cf12da5d4319e78e1c57ce20507490e5213ca7be92afca8ec8b6a07b33571afe6940daa2afb0dd4dcc1c329474ff8e13d740488e5ced552074fff695a04fc1b70755245895a1e9c387fd9514261dbb0f600ae03f4896e795d1e72f421d8572543243d662f6811eb9402b6a3b8dbb0f32de95bb1ac01b1287663d3b6a3f52339a4f6b27789e15519b2b59f2f4fc8fd33ad1a6e4d02cf0ddf8499f45746da424ee78e72847e3cd3833551b6e6fd6b1aa98c688252b57a1d97660ff006ea1b970a0b8fc7d2e313ffd0b0b85299ded47b60cd2fe9bdd7ebace4b0c1072cdf67231a475045990b35ec761e1dc1dfbd0c402296566eb4b9462979d33c9d652a9295ae70943f38adb212b48bd8ebe82722b1712ab6a3be6060297e2aa54e7d0158e4aba6975237e7c7a1e22b29560b8d262125ff2a6e5c1332acd0f6b5ba15b4a82d3631891a01530321830aa8f2e8ab6b41bc5b5356957a4d0c3bc3eab04df7700305a95d0f9cd18d486c675c963876b25b1a0f78e245deb40dedd14dafdaa9d614fb06eb2538c5411e13be116c76fbd3377ff212eb07c5c035612e4cd7a1de2ceafe95832eff88a9bdb3595cc19287fa40b8d244afe9bd24dca40db49893602a59640d7a1b8e7475825b09cb0cee111864deba9d3d1beac03664279910accb9fac534ef099e398d7f6e3235cef7685fd1ae46e47da093135741894273c0c3486197c26057044b10faa57244721328b47e611633d16d3e4776d90309d68ce4a60d3ecda26c9f39c1c6da67ff79fde4977efc5653d79ad86c3b53090003bb72e78aeedcf4c8107185d9aa65221df4e2104640a1a083845c01000370371fea2a6bc8ae43fbe290949da4e559d3867c16df16b143fdc807616f51ebce8d05bb03c2b0bd587b95e3f6a15d907aa9a5b11622ddf4c81ff9fda4bb49d3e9577551bae649cf64ac0cfd646b02f6f16cdefde09a55e77afd16c74e8a3d777d80b7cc42c51f618a3c467968631119f11ca4385f0f5713e37ab1133b692de475db1d44fbfe9d274b9a09e673dac88aea74ba88cde8db3c831e9b5a0f1e40261281e5aea9d4dfd48c5d9e173f4d9cd56fe7fd610909c838bcbe1d6c729e151ecb4caef511a36a14b03cca7ec5d0feacb4647ea5212a11d18cbcbedf78443127680ac0b1bb65120b4197570288226830e2a92b380e32387bbcd3be2c77d6c7722054d849be9de459cc1832ec3ac8e7f60fba9c81cf5fbad37d228eba137a23227d56cd24970340f2b7599aada9d2424cdba8b50c2b97244dc83f7391e2ceba5bc0a11ba547c142126c791265b33a3db6238321a5f3273ffb01e42adee17b898153e41818b91413ec4f6386ab3dd48db875afe659db9eac94d16f850ac179d087d93784d607349e8711f5f96fd514e8d096de8b4a74122ba914520e93a11fa4adf006700e122e2531e1f39340cccbab4862708d69c117d3efbebabc14a0231916ae1ee8285727c9fc980051360346d53dfc76aa5a11fb1fc8f36f95f741e913bd2cd1031e508b320abd2d3a62baa400dc439969eb44e6abf8223b29d4025c3d1ca08d2dbdbbf9927c625270543e8c0cb5ac5bb5d504d224e66a1895719e4f975d819a95e54cecfa59ec8e385aaacbb023772fdddbe093afaf5a75e63a62d51926254e5b47da1e9b05851196644b9180734d05810dcf3502747c4ece652b67674c02aae74f20d07de2ad5993b3a68d10207eab6be5be34e52ada655aa96c1d82df9b24c2acec35e8f0bec9131c20d0ad8936880af87215611b80d07d7a741a12d8145bd05066c6ac171afd8684b92f72237bb0e4ca4aec1ec280e39f36928852d5d8d02fe463acbad8ecefc103083fd4298f399bb254e7bfa166638460b760ccf2b0f5fec0e3875206bdc8ce096274643824acfad71ba06441c74788356caebdd2208f6f077b056fa9d85aa4357e93bf064a776f5f3b0f288d0afdc51558c8f25cbee17247364c2bb24637dd69017f92bbb43024d9c773439626a02bd0cd44136a642c9c5ae593f32eada790c31a6704030f2e07f1173cbc0dabc410bf9864214c298a6283b3631acbf94b8371681ba81eed1aa81ccf258252d7f90fe733ac770b9744d0170cb554b39e6c72e05919cc237f8f4d7f3545f4d2732f4c9473c77401dcba04c0fd33efc73219f31c08dfab26abee9a7cd4ad3584730768fae899fc",
- },
- {
- "9c73ac05648e0c50a3ea3a8eea70841e8e06669c1e7520c5e25e093769c4b005375c0a9cea16ec8e00261ceb96a00924a66fc0c4e4e089c63e93fea857aead8e0ab82af4ce1682cf3c9fbad23fc3f7e632b7aa169834ddd6c7db7e1e892cac93e4d787b2ed0a812aa93bfce8fef3ce30ab794743ad241974ff989288c43e1ba815a25a03acdc2d5517293e161d0c46c8858d0b32b124a6b0bc3838807753288cf6838fa25fbcf876e6368c0342d3cbc860d6fa12faa1c2b7d9fb37504e60dd44e36ce74229dfb80f1545125718dd1f78b31a8aadbb4d6494489ce596fcc2dbdf2ec22157a1d966b61e780d36552daf084739b602861a96ceb67b65b23d40916c02b2c3a38c2a59aaa266e1f8939000dac9b6dc50d1731e87ee833a2cc3cb98c57e5b680a85c1b428289520bb252096efd7723fa8e55d2fd4e16900a435986ab3f3d2bd799471a1bc07c1772ce10d1bb8805a6065b8903999f9393d2ed1a7e1c57a9e3e0e10dfca17a04143814f5f3acfb99a34712a6e0a24a7485279ef343e69d27c77e25b41f9fb833d7cd29cb6a15551d5c77b43d19feb19f2640926a272f81eeadb792bd474ae11f080ada72103f8f7ca733a9b1325b50589be2b2b3023491afec246d336f4e4277592ce9695c68d5f39c8fa4cedaf51776d7ca29ea0ecb89eaefe71e5f3560c68e8dafe7da08cdcd954d626418677b8f3f45b9194474a32f548a4da3bfae6a3e2c0a25f602e3b3a821160c397d77c8bcbd71c5f1e669213af36eeea30d48e12953071f55eac2fe0bd8fa355671fe032f6fc9214632428125a16fc8aea8a9c7fba0d7518b9a4f876349ccb9bbbabcdb2a85fc60b83ee1ddd041967efa4036e5e10e377c9886f40bc0b0b57c7b724795f843f6a072e87e532a04c21445090a360731a2afb896ab795750e5c2c33d58bb714f5be427ca3751df09661402604a09a1eca95a8344d3daa5b99d68e6e6245825704c5d4a73af197d052d7f75778917542261d77735a21cff3f75d6159a3e4b1a7a9854ee376e6b3c8bdaa1f353b957862b2efd50d10a40007026261a546124cef979ad20d8085d53e30f5736b8aebcd3cdaa349ea474af249ac53eef2653ae1fcd5b3095538de9368d307d45df2a19acd44e3b78c2da9d5d9fcc4cb61feac5dd35f66299845bc0018c3d476b6761083baf33a4621e41cfae0e0c642de729fb2d206db6a4b976a635b3fd911b5e9946fddceb6feb2d2f893b2bed590317442037a1d6dc5b5d72910160221cbecb53bc983f1c736c3bfc9757e9e05af1248b28d651f521af67b2a0d7e4bd86a0013338404fabac7b9833c372142e6338a98c0efb7130aae8e34bb0c80937680a7a904aba3be735d41af9462f17b967b13566bcb697579f8a9340429c77baa6e24ae1ac86d8d25ae3cb9112e34a7a948fd141367898c5f33c0635c87de06f603b510cb229df0d0d9a9e107de88b12686c539ed4fc54c8285afde0c8ee502919a125cbcaf4c8c89f56e90d3f641f97c07326956f7b5d87c65b689f39b8b84359ee0f14d2c7ed621ec67f5e2a8ee5faf21c805187edd95e3941ed62fa95a65473a569566d46b87c0d27ca37b6b022a8cca30a4480d392ba15701d1015b3648958cddfb614983211bffc4966ac6c1f691f19bd9fed405a02c06712d62a775f73353f3949c76b6b7757a4ee0410fd6d20071abfe46b09e72b70f9f19b61410ea67037e037934bbefaf09cff018a5c218176d165d1eb5cfd5c46eee7b82fe65ea02e3ed7b18a86ac7b139b7c9df79e1f6e6f85304ad22d97190c7ec12c651fcc835ea434d92ae1444e7cb0dc644efbc2ae70f2f94310805c1d0f2d49643d05e78baa1c54d4fd99137a49efde88dba1374c94208fb4a0ebc1a0090b043610ebc1bb08168ff5bf936ff9834e825eefb9ab73da2b287b06fa2b0ff52f46061b07c1131e4108cde478c767b749b696f3520acd8d3338842d53941282da289dd1e9a0e02aa9be0f127566c9bf2d50a27f6b6ffc9e9880bbfc14ce7eeee70cb0c0ad90fb474efa69b46123638e8405fdef65fa7e0e7b29fa8fe8696edf661f9003a08b4aff85a4a3e6d817655c1d533b834da981b8c37c38abd5977b3ba71b3f57967a471c2eeaf2f6f258431fbb7e92f91814b1db80ea775681f282290db170942bb7b04aa2a331950b74a4b6e337affb4c51c6cd4c4e13ce3095e73e4767c2731f72bdb225ff572163fbd8573378427fda194d165750d487f6bbb63e1378a132fb6ee5115e3c32b2380b096b735bdb4d651853bc7928346fe3ea9df7534f2a4eae1f5ffc4b82ae738db7df0103ba4e68c2a2153bca499bae2439a57778cfc616df16032aa8a19e26597d275d2775b5ea17cb25d204b18028eb25a053e5666ac47c6def151f7d4b68ea62c601d87bfbe04711c24bc34274be6815024d7b7d01e7dae10cea6e485348ab195a83854663cc5826181b688cc9c091dc1e0d491fe51400e20e6f2a51a7d56af258e038bcbc80e2c4ac4b41661bd33229d07b39b59f3aa79d99c1ef41974a33e02a7cacd6fd8f9b99cadd0fd6a031f070bd3a364c64ddda0e9fb94036f374171de0b3f4ee3380780e6d77d50db9d58e670fb4a364827d631226a3491a27602808141ce657ad6e560ad62b088ff086e6f03b8a64bdf7c7d01e7b19289279509a9d6d80e50aef3b05b5561e4556952c46d0b6ab8eae735eccee77e570e1360b7ea38c53ae6b8eb420e4c2663b57827228392db6e79105a47f7d89e06ecfebdd63783101d3bfb5f494785acfdfed41f8166faefdf0b49260222c4080ec2c6e4f949f41784f076ce37fc7a34fa4e547bb44e6b9359b4b95cd67d64e4402ac83973bd50f8adc7c6e4c34019bd8f6d3843bba3d7155890712e0ed5134e00db877398d86b459f312a6272431f01b057446bfb1b8053acf181bac79408c7708f3a0867a64e06d7786849bb874a6bdf8fd6daaa572d5648ae100f4318d6b3a811bb0fb709168e817ed83c0622a7e5b17ebf5cd5ecb21d9ac32ddddb039083144c93cb55a95ad72732132d54bb120639d1620ebd142b58d75835b35cc6367012c93c6772963e9ac852c71c0dda2246ab845469997fc170d8f62334bc5aa4ce23e036967674303ec6f75bd3d17d197d026de69beda70bc59d2ff95a899d28ac7e5e42f4d37233996a8e6d3b0b86b80df49ea8e145b4a6e3e39f3d6c3c6518bac45baf97cde23037709d737b242b8918ca31f90fe59ff2c83e2f347a954d3559a8e4f075c620ad36be20b1e24b3afa156cf3255192171ad0474e4adc9b7f35436325b92945665f038611e5d14bdfe7b7d20c09642323346a717f460dfe7b5062a0098be66febe9f5fccfc747aeaeff81ba08e5dd2b1a489c998ea9970afaf9aa03859073707a686c492fb3f7ddb27897ba5e75e578bd82114b2ba85525a2002927909c970a04035334b64b1169c3a923211e0999db8baa26b6537cdcf57c051c0ca1b317a5b66ad96cb5ebd57994f99ab202348d8ddeb343312f1f26ab2442b8c5f5cf6bab394418ef2fed68c3e60275e836027515b6b946e5d86d91fdaf49c2a5182d5051726840a156a8653cabda25e1dd9af693533d782caa09295952ebfe6a194fbc8bb7fc2c0da5914a506c6f31490928dc5d6554890f5eb268b09d671bb6b6d7416dd36e7b78ffc5c86b34fab43d22909a87e5239643d5fef373650e291be56b89b9d90431d8c9fa44fdf4f83a1689d59d6ef833b1ce31a44197b36ab298d53b51ae3f8387087dcb0571c340874c1524ba0d576bdb88101c1fc387d25b5c0dad0b4d309255ad5d5b1e209ba56db0c927bd209399a8a3b5c8663c9ac199a76ea4f49e364a4b93a569b3400e20f0d748adf7db46a07efc68e43802a5d1a914759eb2abe8fe3e8d67f2cd7612bd4d5a6a4535b1e5b3ad4d97e54f3db7f8512c9603d87e01160b6908d8df1b952c750071abb1565e5ea3f643f233faeb84278187ff0089150bf21ee4d13979fdae796f592ac5b88869aecc5be1c64665edc8ececc87502d36720b73859313607aaa561d56a195dd3c7292fa8f0750ddd3df9ca056fccd9d6ec900f45c1454c6ceaad4154c69e288dc85735b8cc42950a3c5f0fab2be8811779905c3ad5a9a6bf56e7141d863caa4e93e0065f229b695efb790926618b3eda1b9a15f143bbb09aa3c4b72900617793417df364185cc213d5cc3a375778117212266356e214f085d8a7aed908256c4aa25faebabc70ce913c08c89380da06920069e8e27dd867567f152f883a9bd2dcfb8097b7f065482d6d11c0edebc67feb3068cead403503c04b324885ce1a62c99af9808a5ec8b7cbd978b8c43e37b06e9f7e1ce0b31fa0fe52e8842002e6e99cdf69263d31de080b56c0cf94f77f0397fd1f77b13e17af90ff33b00119999df802c33534a13d3ff7fd0e8cf58e8f8c8bae033cec1aec7d191f2d1a39c7b731c97a67fd1ca43c13a24b9f97d92e2364dc26a1c9408d4659ac7373e53a2a1704a47e01c0223ed4c489735b62a27ec67ea46747e4f48d3da101b0863bda9d3f7f1b413f3e7f130208875e6a29dc30a78198ef658c7ca32d7d53b4b92e51f8ad6d39ecabb800adc0870b2ab0e85b5769f346ce7fc371ad40c561f9f3b2f2a01f2b8ccae48c78a41383cfc36b2a1bd41d61a39c24144965d9aa5ecc5d506c7c7cf9476085bf049942d35caefd77821ad925b7fd3a006213abc1e008114c848d45cbedcb8af264cdc5c07bc338fddd1123940e5d95717040325048439dccd1e298bead22b011ef76d26a390a68161b8bab29e8409a5880cca9c8104694e1282c9fd64f50e73ec6b9a9ffc31115de9cc0088400a2dc806f85487fcbdd60f409ffca584fb197156b40142e512a0dedea1571ebb74d6b26d3b4a59e9105929a055cf3540e8a6a79ca7ea71ba8b40893c9797e81c6e9a7999d4d382e52cac95727bcac354616ae1094552b3d0a33d0d3ac4e547237fc0cd54944039b0eccf335889f6aceb518de496e0986783c564be8a4a05bdc9c67b1e5abb480b98173ef091259d8c772b611e0c09758fceea3e59243406edfa71fc452d4450b55b8fa5ecb543692c6eda3a6ad3bfea929a18ebbe5ce2ac4754989c71dced37286cdd1512107e4e7f4878da1c28b4beb2dd9a712a8d1d61d1a5fe5382db8aab4857b05a783e98e77711c1933a7641fd43dc6e6e597bd03b11ce8e94aa094fe250f03cc92ed5b0a5e7723911e87b0f3c476d9aa0d96adbfb395a8fd353cfb5a4cfe27deeb82e849f90bdb17928b0a5702e4010f7aaece2d43772a78b325d2ff24f9de0f7bc65974d2348c64",
- "bf96bbc17abcd1f56a9f22ad164d25ca72f8c996f1a7a66d6effe140336da4f20460b47e1c8573872496343be35a055552ceec437692b0e4919224c4ffc8b603286a8245eff5cc148b004f6e5a54c4ac22b0f09842a07cd332a09732694d3591b8b7d6a7ada2bb38a30aa7fd5e6baa811b9a195d3a96306d",
- "aa2f714d3a184a9883f4199e8e33fbc9c92b36fff2d59f07a9d0d335d7476e81",
- "36c79f9f14d431cc8c077439",
- "873d0617c986dc9d83e9cdfc50b1f916626a9d9e1c595dc7ccd99d1e993d25d89b04a893c89e205952eef8f1733054bbb55fa5e1b07135787d4fcfae226737b50cafa2c11276e8708451be9b4d7f662e98ef6b705c5c4fc64588728eab1dfee22a0a92bae61828a7394977b0ae8a3b6d0126a23583fec025becf0a72a28891391ac1495732a7a4a1d43a63ed8eb37b280b6d886096fbc4f77aadbc5e441e996334d0e10cd7f3dbba9bb7efb147297986509a07735385c681e0543186dc166291edc3b4664f5c8ffb0965c85bc30ff5e7769a69609c69ebb68f35d104bafe3dbd3e2a40e13865f19bca3612e48592aa930eaee29440b4ebc1c0a59f1c54519857c929709b086bfddd6d4a30940b592be48e0067976099efe71f45f956182dbb300e8076e1207baa32d59c1afef7f34171bd66099d2d7f07b39d16d0f8b085185bf2554c6ad66bcd656f07979e8f19575a116f5c4fb9700ec3b46a3254f28afa1ed51348c1af6dba26fd398098a76d7bfa2ff195eebab41330ef290bf75205a2ee570a2fa46bbaa74aa6ba68a0e63e2731dc1974eb44794f3c89ba58cf96f7a070fcca678185711d97cd9d7d8202351ed589e0b05a7a190e60ae4aa109254a7bcf7013f8addd07a64145e21226795ff7c7b1c225f40ed7c3552da8eb18b9bc9bc70c2e7ecb10c8b20c54f04b6e27b5044a7a67b558407eb330f2083444375c022565c45fe817dc00c7d24c23db320d15949b0b64fbbaedd310e73e423fcebe6e1e98a5cd232d97e6466642e5e3b23f06525ac1cdf8688650cd366b1b7ba2a9033e62d836b14bb73717757b76b9673671bd3d3b2a56628f5a309f3b86ad32abac0590c50f7c5a22e0a920d88dc9fbcb3add08b900a2a2fae4178aa100a0e645ab428e0e79bd90baf4af2755e48262b64838a6fbc21226e323c0a1ba5703e30738fc7b5a7df9eabec6199df5ff6ad58f9df5a734ccd6509e53ecb3de1c881732e26e52ab848a0335b04b25f2254aaf8c130c78b0c9a40b60d402673ac7ec7311d0b00c45bd176bc73ad81c2478611804f59e3c145110aacce922e473ef346f8acaabdbb9f313dd3f8d0a937d0c048e5af789e2e09a816146f9ea28170909caf2572a2f6e2d0d511242909de2815e9ec586b2d12183ddbeb7dd70f32424097e2ec28b4ba62cf78f547e2057a4c050cccdf6b582172343742ec8c85e2847efb1595bccf89ece3b3ebba824d2f097b1987ec26c6e5710544739d54a714060fa91b7995cff0161415eaf55758078772c0271d9d282354e47a25b673eb11497a6ed8db82267d65ad47412300ed525af96f943c5336b1de88676dc346e7339230032463d305b0442f934018bdf0242768511d20474c6ecc82fd752c0c0ca5cee1f3e06e679fa5835540f97870d47ccc6bab233290be7a3bbd4a73f1dc7682049bf7b3cbfb6687479c18d246e3c07161df5c889ee95d39cccd989625a8c9e80f951f8b1832f6378e05daa8566477d7fe547e49ae6e822a68de4df9fc4d6500d5219c3d3bd8887bd7f695151ba378da17c2e750399f7482973510a386721c59683a86003edb9f0ce1ea89bd7bb8a25c222df7ebedcc1b56c8ce18f367b2cae720e0591b477f6ffb498c3d7ce59cabb1b01d7cba84d7180b4b2a165d4b889a6ac361720e768f2913aa50b0b5c88e55c35bb4df4fbc4460338809605f1fd445a2bcd97ec1d2f269b5e779a18c8f215bbc5555c745424484ee5436119eb8754f5e9e91f51fe715353596baa1fbb0a690e99691636e6027cbd4b7be752bc278661e2677070ddc12dccc262d3dd47160345de51359ee8dcf2f61044f95dfdaf323881b2bbff68af6572348f786f6e52d1309cff871ad58148307d7eaedc93ef037922b6092ac62171433adc4934884efdee3052ebd60ee115f76f9dbd0eab7c4c0a77b4ce8078209d23d81d957335f331965b556ebd54732327b5aacc899f9ed0edacad9eb98cb845867f249efb0e1a5fa2483227f78decbf7f1f32d060ab0c01eb985d83920b2cc24b5f9a0d5d869e980129d3b78277fb87e5cda61e340a729d86b6617b8828dffc7c37d4c38080ef3515c2784935973dd184e0a8160f84bb78bcd8a5e691760be4a4d41ed6512ee436ce24650c0e17e7d74b5e01cc39b21e21514a84db262d673f24a82cfd5dfe2a162976171c538b24af16429bf8ed5fa8e37f89ec6e7d63ea1d83ac1087cf89e8f43161f225108889e922493d973e36b510074533cb1cb22174d21c4076959e4191a5df880a8b868b95a9cb5151a7ad47375fcd87725660cc0b59c88ceb86984941268493c49b8aa2baa8c531ecf497853ffc3d26b926a379e72188e246d42073041fbca453bd558f328881c8f8d9e099e898a912530c4be499f2b32229c359ea10e0befe6d94cba5ddafe51d164898166e890b22fd1eebd5724451511dce1f8f7431d712a3f1e50fa5f609da686253311af255b84b2106b09b803e94b51729cfa0826869945d46b9606547e7e33fd9961cf15b400d0f5e01d8fd4d92a83ae526934059d4514b9e0005317a70466aa0b6086d5fcfed201d958a0de55fd23f0919ea29b8aa02440031a9fc206b9feef362a73430a4204869354ec81b6fff92eca97e7f1bb12d25228eae466b8137b4806895ce34b57dc14bdcd107fe160776b0e5daab150ba06976eb884eaa574da393af4de355381c7caa4f611a2ee70a0c78df93a4276f55e6281997b4aeb36888a6d9638cc95444047e5202f41f8bdd787f1ff44a648cc7d39f05e49e5d6989fedb194c526780709763da81a780db0d1534a466cce57e11dd3a4c0e273d9873af1040d52a90e20101e1f80ef296d45769d204cd5417a84e022b6b336675d36d9cbdb16b0cbb08f5e240012967c8067c92f97f981cd19d449084400d76adfb7c610abb73bf21e161db04debe6665fca79d71c8cc50adc3ecf0e52d07773478ca97b8e9821a5704dc58acc647a5bc618d2b681f17942c46c266c73ec211ca403a7d47e42e12c775b370cd500d70a4aac7124f5f6d2d4ca78e1c17a96426c326bb60379ceb0c84a86200f3b450e5e9aaa11f45440f5260eee7675a8b9c47fbc58cf18a651a1dc7b39a911442504f12c103054bb50f15381e512dc6e3af7b414b3db26fe767d83a2a53d7181fec8f6b196c7874befd6628b31797ee3c9260c7b7853b137893e36696e2a47277add98462ea9a0edeb7d2d3c0f2805fd7db64c2c7eff353ff2b36f4de862a42779ffd4dbe77b6a79bc9f4ea3e909474ead915fa3fa990bc82b83a670b163e79300b627fb91c4502e96bb9dde00f716ae6ad14dac647c9f7c2e5b2e505708b5fee996b8e9113a8f4f2caaf414061ee72e76b8bf47ec4f781bd7c589adebc2c267448247e30d659998d8037783494a1fdadcc819d7ad7ea2674f75e10639c3d3055046a00814ddda0e463185454a4455d60b9780250183d591c3db6f27373cd2ce4f02f206ae10a8c32d71226e7cb8d5b05909445977164983c0073434d6c0f2bb62bda66a16792d6e53a49ccb5ac3e285a6baba935f30e9d1ddb812a018ce04f29e2009ad678ba72b6a7112d6e7cfcd3ee7b058ec954a6fd7fd01018a6eba6209687c3130de58147b07bcfa02ec1caf30b59daf87db4618b4a5fad34cbc8014a7529b9458e05eccb9a77ef1621aa95513c6fa4003b0877ffa6d48805e7867dcf53447caf348228ce926233f65d553146584d6ff3dc3ed3296db9bfe69dec6a07add13037b3aade118b2ac3c52350b9691a6cb32356ad93377059fb8ceab68de38d96876d6d383db01f3cf620e47cbfd471bf6dd1f601210482f7c3bdd4c3bd37dd0a7507e1f0fe515151634813dd4ecefe97b52eda28e7a7129993b0af311abd3a07bc463f3cbbcb4fb0eb265a5835663fdbab0d8b8b5a73837ac98ced6582348fdeb41ac8ea9e36f9818ab9c0a41bac1389a6b518ea17df043dd50550f32471645791bf59855ed695b84919aa5cb688e569122786660f06e3a919ef9cf18c355bb397b86710c367362cddb0239aa1d32d489328e4bf92b3abdc3d0dacd76ef1a1efa28fdb848e708aed6780e2d8efb19a2e26fea56b4440dc3eafd796896d73fd150bbd967871f5e6ee5db58995f2f85cc2a15077d7d472bec2e30430af6891193ef03dfc7761e2b3b3b54a72d4f1084a8fc541526fdeb0633dcba14e9485b43065aee8750397ea88d9ff13417149e0fa145be666e6f4afdabe7ad8e4864e777c20ee7a2842db44dedee22f3ce2f97d72919b9ff6059352083be816a7515c48c5140a99af8e81b9e18b10074dc73dab55fae66261421629c8e323d8134f08beefbda555660a51e4b55a9ba4573bdf0396cc413145a941c4175aa672586f7676027f9fe211db87fe07a23962f5b1ad8f566f0d5b13c5146457276f307a02e1e13d00c5032a06d225248215e4bc4be1b672f1eaff16ca95da42513fc4315c7a6663f9101aba80224acbf0c87fd3a2ee9dedd1808c1247c5bebf3cb8d77377a508ddb484ed91203a438ef5ed3ca14e087102bc5f3828d8c3437ecf5c92eeec0331ed93ae33520740abae9b7bfc45f097da70adbb9b9b879e46a7d655dbf75d89773f737b66fd8a8c13506cff7b44bd85dee279ea7053f3ed8447fe79c400cf23726fae800449d27af5e342ecf776378e2eb449a3af27a40fe4a9806487b81c942bfe1a4b0fc146c971a13f83669e0189e337cc9fa2024864436189a9165ade6b864698ecb797ea05fed0d60f0ab4b92cbae36c72ccb5aa45337cc02dd086afed9e5522ecdb75ccf389fcd63c5a4abbf60908e39cb3268c76a08687588be67a856a841eeaaee8ed016f6640ef0f5acce12ab8bb58dda380696e3fb22d0bae0788c4fb79d00cfa5ae3e479dcf7d08b45f4592c2d2a7f8081d5a9398659613ba4932ebfd7382d516b2648ec4ff4477648069b9b2e4decc89547c16ab82a0ad9cf293fee5adb17cea4c95ab7b8e386dcae6acac63ad0d1d13656dfd97d5623dbe45230de597751321bbe5a03c879c303fd7a0d837d48141decb6df4f0865717628c85dbfda29df9a8a69b2c956c75fc66e45c08960c23bbbc706e48395057f989dfe675305067b3ed8d046db339e504d5b2bc978ab4dc261d8afb325c5e794ec79d63d8db53f9dd24b623fbcc202679fae8f7d39f7f7e0667b142c714b6a723996e5254ad2ebafd63c3577f8909981ce6b3eb1a6ad67a4e93c45ac3b34587d153ec5ab67a2697a9741610d5a176cb9b5856bdccb98f69421061c84811dd6660495d9f30548efaa69e36ead246d997c95bad0ca3fdc1a08b4be31b12daf211d3e29d585cdac48af8f2268ec304bb35d",
- },
- {
- "ceb1f819497c0d631a9c9616655f419b5e3470fd3b19cd0e4fa556bd26cd9df57e960ec7121b2a2cb7c0421c1f84b77eb8277bf341490190ee574d1424eb09a281176a933394bfea5502077486bef23ee66e3127b732b7a58a04b9aeefc35170dabb030d4fc3f8a4c5ff194bbd0b89a379baca30ec81d576868f25755276e62c31e93a80ac322571313ebcee494592c3ff5cf3ecdec962645887d9aafdbfd62ea910af5542d4c7731283625bc9f41ec85012b42edb1792339e6cdd9c2bb3cad4c4792a064df17a5f74dcbb3dd0d90620ebba4fc6d1e1f9704dd60c798ad64d4e5077549d68cefdddaab81a7a91209b7ddbea43accb3d1c191328929dffdfeb4f5740ecbf0ee99cb9a1b73333d7ceb0b2b8f35f84307b9d44a42fe1a30ecdf2650dde251bc8c1d46978089c50d64c028f40611370ddb0b481df9624ed63165370f4788bbc396026b268c2023e0f04cd4f66e0bf439074c46f0ae85d6dfeb0ddf22868af61c8d5133097156fa61a3cf5801db5c3ad29871d336f7aa06d2a7d5f52e50eb3aee3c7de7bdc4d21f68a1776a7cc3954f5c071282febc89c1545fc672a0a1bd8eee2b769be048ab58ea12b356d658a6225fb8a55e752f1fc97ed64c2f87f9ae661514f1f56d9d4e47b001ae865a44b8a9fd5df8628d183bfbee781b6661c9cc76debe6c3c5bba840bbc228206673aa05498a8c715b0f3019f6b2d05cce6c233b5809ff1dc4a75d7f69859fcff94ad442d460b32f6fe348659518c16385e49fddee9efab2455732aedcd17dd51b5117efb2ca1e21ae6787437f48a7042d46e11be4dbcd2932ffd70fd154e4eca5fcdc57c6fa79746100b8e1485fe575a5c79089a25eb2d55d89e42eddc81b82c4f7da8bf153ff5353b7349b161911bbe0a14483fff6585d7f3c8b5c04a6dfc99db9548f0c53e25f0b16fa212f0bdd10ad2193ac18eb09972795f42b3bd3f4d98c4868989c4af7a760f1c88ffda59faac73256df1d607644f56a70303d6409c9ad716149bb58f01b4ab8ab475e4af1257d47049aa77adf9ce54fcd22b3d6ec60484da903a6991ff052ca37b01428d5916fd92c17530bb3385a805b0d57476e9f9417a23ab1c12a038b61b3a0898831f9615d10b468c3edc24448d09b8f3e3a2355dc5e069e880929eabcc97344fb6ca5587c5ac1404783848f531f1e915941e7359fedd328f7fd12b3c685f8c1f29d1a6ef7dbae3e5e32cdb251eb43aa2d2ae0cc18b3f40fb006c2778cba387e5852ec4f2d9b8e8ccd5b3e1f4781c974aca940c45d35d30d3b9584c750bd45a80f32f73dcd85c99ae107b92888839c342cdcf88911cb974d611b14b1d85a59e88c502559d6eef3b7f5addf7d307bb25c57aae669767db6d798ca887124e159b0317e09076cfdbe61aa9ddeda189036703b1cd9b1998f88325910a37ef1fc2e227a382ae635e847df8625b99eb6ef0ef10ce7a2a5762ad7d03a7a4e2b767c4df0b477d6e9601dc8e6438184f97193ea7d7a8c22f1b6fac1f0740f1beb8b68db40e0b22940cff2261273aa0be43df561b88184a9377e6a27f27942dd04abb9448b6b6ecb3a60f14dd39b58b8d94e1991cf9d3a071ba42e0e1d71eb211ca466a70fd4724a34639707feefbfd73dd9680d76a214924642a063b38b85cf30eb763fbfe889f34b20fa4a10ba214d938a5a092c6e9b73b13bd664c75b34f746aa360593c0f8dee0f328f0ad4a3e40d498490007e573b8204a1ce7a550deecfb15f18ed5ea6cb5dd95a68adfe4cab37c13b383f8273b1971580016a8df02a3f4f431c9de9e7ebb33244512080fc5852278081b9f4434109c3427441329e8071d19d0fbb74fb6ea73fbfc7c0ac1012d3a0948d94d7ceae9b0112ec43a16cb582f9c53e7eb0ad15e05ceda108fdb3dc9e585a332018d1cb19e4a75d86041308fdd8476c88e4826931601a3a5dce06fc16512f4669f10183d5a8d15bace4649abcac07358089aeb1e9b8fc3776f3239d5442d3be33d532097e13651af7c9a5b465ace9e626889800318447b8876b45dbbe1989e1eecbfb5cdf5067c71a0d7b7fba6555d0edede12f7228d7f9841dc532274f24060b1f52da6fbaa179b81ce962723f43601d248f8f4d5778c1653e038c8d27828836d562968004003810e9aa9318edf3260272b54fca2e012f6c04abe92c2e6152f3c3e973c7e9abe8c3467bdc246f0226d1b7669bd577bb317c571aa8758bfb694fe4dd17ce78f091cf6c6de3cb601a9d177128fce8d42e652b490d90c4f8fa04ddc71cac300d3dff699be3250bfdb2136edb0057af3ebcca77ba5b3ca34531810c5e2d4c5b5b3bc4e71ee9e30cac067b7706c326357fe0ad2a4bd9cd811b4e9d696bd9b4b70579ae246381210f879c769e5f9cc3cf8d70e9c94ab74a55f5d7bf61a17418b6edb6db4147fc40cf98c75de85421b7d192919add48e5334ebce2a06e56b915447fe085b7dcd677659dd55de1f705c389975e56e0338a2ef07ccf5ec3786407e8449d9011641786f1ecd4d3d3da975d61f5a442293e6119ab20686ea8cc7681010421226838a95a157e2de948c536aabadafcd4095dfda48e5613272289a8238dc945e5f1ef30075d5de096131740cdf23da1fb8b9fa009e5b321083cd93bba9271909460c09bbe1e8c54319394ff85c291814e21215816d4791f01424abbe4cc4c792d0d04db1b812f4d24b44caa76de2bc50f4d1d1611862512d87fcebd3c0b2659082b2423bc5360d107ad7b8e8ba7438ae4509105d6b618af25e75c51e272aafaaddf1e5a227f2b2a2c96a8a83dec23223cb428136a30b290181ee20a819cf52f6c03798e7294a89f3b5137693d5a8b7a0ea38d78e43008fc4eeaf6d077ebffd3ef7952620e0af1395c38a289832df391d1710ab5b103a1ffeea8c06684c03a74399cd63797c770e3f0136d8331611502d21fb883136a82f2034358880392fc3d2fc274b799e59b89f8f90d2a5a123d3c21e5bf3540323743858fdb8912c7c6329a3aea241075ae097ebb23c8cd50f4ff46b42486e65bda6beba5f4fe6dbb30f7e61b1bf690c9f00f7513c83274cd21bb71563257a20cc38da2b88c1063bd0849c8243058ee205853342085a8edb7545f0d96a6af936a3d4612b95676665eb02e72e0875100dfa444f039eddde1422ceed8d38e6c3dbba25064f8c6cb5786f9ca67712b7840cfbd40f99b1edadd4bb9a61f48124cf3b49d68bd642404eb1dcf428eeabadfba6810a4032f8ed06b38867a7098c7744d54dcfab8f0ff941ecee69da9916d54097e080cad86dd08bf53833fec4aa4399f7124586223ec70e2c31e8c647be06df9e86a976f37901e9b134e775de2a0fd53d545c5f92236dbf5455859c138b7bb1112427049d29ed4f5dd5c43cffd3113c276d9bba910879e55efe817189fc239a204a9ebe738c0dd161d10d60a51e9dcc8c38861d41ff029ffd841086803320a17ebf5ff14b6cc2ac3dcf0ce2eea9af7ae23597233599c2321dd2b99e06d93f84989e75e30a388f47079c2af545d96f270e064a43a00c76bddf2f5be5089a69a138de844216148a1eb0b413f58d831d9b8967df297455e7538442388cdda12d157fb25896c6e2b47696c76b234a88bed4f09dfd64f2e4b77627ef03049030190fe271a5a853591ee9218a0c6b12cb3f02683d665b211dd1480cd44c9c0566ace7d751902babae14cc3821374bec774d54b4b4afd5d1811ede556a7a5ad02642a878d2d32380e7efb9082604f49d51495105f827d77945b5cfaf2f2980566b28ce3dfbf1bee2e077eb067bdfa4cc28f5d2211ca99a615e69118d9391e3feb9b13cb4a2fa9682718189ec612db889228aaa3f3345a091aeb11f41420240fbb47caf567646d9e7c762d3288f8bb2b1165cf049a191db5042fa9185fcd180b04d3007c376e0aa3d427d66d10918821f74736816044366463df7cb3ac94cea167cf1daf2d1842f130295e40bad672a22da9238ded69e241395f04d5e3c3875b8294faafbd3d90ed56ff3e01c5a0a3e349d761273143686aa26d408620c7d1a35ccc430a09e3f750d3256298c6068c0fdded270f308f79d2fcba591d723ac0cef703d8f0e7c051bae5b453abbadfab98bcc297ed4201b03ebc195c2e441cfd3b10c63c08868db36c320707ecd6a37593661d70a81f30e6db4a32f98e4fe6b950ace55923631c8f95138781fa2af78d8104fe39242f1fff6942e8e782dfa0d37c863caff9492f8e5cb70046d207c4630cc29c20e1ac105aef093261d8d335456961e552ab14d107cbe14e9de912f0e5d58d16b729270208204469f917af4e710123c3bc38a4b3f485f2926f058344db105b9239829441a2d8ababf04aea615c0e350846d9bc3b5faecdbeb450f38f615f119ad1b5dc748e88107ec2fae01f0915174feec37b3e7248ed2699d0a5fb2fc785f17d6275fbea867aad815acc8a6fd3ca4ea7357d197e5a30082ad5f35a9d894c0aebb206c6487163c9cc20442c040e6aab33d7b4b221e4ba4cbabd975836e353129559d8ddcb3c97876cdba360da0e0c1dd5b0cff7957a444027db985ebefb6154453a221076c997d3954b347f49308d2ee14d1676b75ab6ef365f3de54aaf398fd96b9040253813ba734829bc78a6db59e3f1c0ab4c878a72d6b8681157919130fd3171126994dcdcdcf68955ad64af8156702c92f7a715ce6f7ddfb70f60e80c92691efbfdebc8cae252108fb6c0010d303d9027d4a5e63413b5fb2316d32fb93c3ea52a2a7df50cc0058c76c58d73f5bb041d9fb9f3c3cda9bee0c0920079ce4f1ef8698ced664ce2e2b3b86027ae2b3bcbbae5bf7ea3693d9429cf94938dd3a2763d3f53937c46763ffee6579d018358bc69182b1c7158a09b18352ea618c11c45f07fe97cb65faca535f43237879ae3e0a31efd14679daf8fd2ce25eb8f32218fa20afc586a98fd908d3fd804cabbf56dcae272328011b252dfd83e5f0a5fdebc6acb04c5540255e1322de5fce9db5aa4cdccd74dde8990ae51cefd6c1edc1879971d3efb1f94dc41b2b23e9c9d89415b46189914a229b2f3e8b05ff78c68711385a00e9534dae6f79d15842aaec575e4ee0f098028bc74016cd3f8e93c6a0cb21a0b574ee63e367343ca9de28003d76e02d0ee2b8d622cfa3615d3628fd02499eb7bd8c1aa1f34edd9c2d059c6a7c7c978a5e4f60801e03e17c3a09793c5217f310a30db1965b8e328893cef20f4a899aa8d9fa28f7fe0a733813ed7466046776a874273ecfb57158483f4a588ad4f232adec5ba4ea651822780596de09fd54b1717bf04130619979a0e3d12ab7c35d64afb8099a1d21bc952653742f50c8e1c244d10374329cedd27fbefd37815a9b3112a4cb2fc587c4ebda381b2b01fced45cdf0b9ff8ca7d10b65ce42e728de183a82e369486a2e3345664e70674a5dac174d6616d90de8e472b62759df057119875483cfbfb103041751747f9cd12bb31e91caf79eb2db1168026a4707dc618f30",
- "e45eef9561f3acb3672b4f38570256e8cc4d877e2998e72b022e33de8fc20f7320fe0882f2b53559e084923786e8205336a7d15f3fb88a41e7bd20767f2feaa02df2221fa7577988db0bbf61f3dfb429868688c53e130725d0279c505686f083",
- "475a44cde0cc931edf9a44b0c1e0001766f09ade023dfe6b59a6af800e549b55",
- "7812a320691ca8442767a51a",
- "eaa577bd67fe79ce4586f43355c94528e306c1678946e4f7a907d2a8ee7f4281270502522119a8b09b6f05d864921cb515fddf6a1000fc2f67b52d0627998591e2acf5b6faf71c278e5754b2703662ce670dd049da8d6e280c2b84d6a9b29ce28980563c40e03381a49c54608b72faec9b272ef05cfa41957d9eaf3e944b22610c725d8efea90aaac6e782848d368ffc08784d7fe37ea1effbbbb34952def29fc511fb10a1282bb0b6334328e4d00529a44de3259b522553a07d524dc75f431cc9670127c15670c0df419826617cfb5ebdd8788d5f528a9eb1e61324eac5c1746f339aae2e2e2fae598642a389da671482128acf2d69814258d83de98f186468136868b729aa5f0874fef2ff2575a1f87439d64e049e4d0637e9c99ecb7275417af654541306615f30b75a6caaa563e4790dfb28fe9f0e7881ea2d885eefdba99efa7f878925ce7d33e86d888154a1b03189429fe20af8fa3a68d65ced9b690a709031121425cfcd7e1890ed9614f9dc3ecbd0e38c6c84e453e3204978ddc1ef8d7fc6cae28c61a472d8e089e23209f0c36e80c994af771e6505e72ba90e5543f6bad6dcd31fdd468b13533a0254e44797825764ac1f63747d8d6ca019ff16fa732068ee94be382c46b168050ba725379df31a98ab81ec8eb266a3c3f2e1cd95e5f12b3bc79b8b435e4d94098c6184631cec57e9d8913458889223a2a4541f34d2f9df380f34c3e541fc587f0a6cf08c82e99476060eb84709a292f4c7a8551bda3a9eb6735787dbb9d7f1e83937c2e0e49f2cf6e0ab0ad84c40fbafc3c7e61886a8629bea816972fa0afd0f617b6340b1af19e341875e97565c8eb0b25fcf68696ee674d2abdc29396bfd0f282543d2b72a239c6470f76d3b5bff6d1d064e6e2d06f9deef2aae8a259c034373efc820f9a2fdbce36cc27f35dd6386de3b49509d0c305757257f8674d958c580a09e768c0f6ef237416fd53c31511badb2e7cdfee636508482f01899e72052b46b5d844799cf94708520178cfec2b61c8980fa7dfaad8915b0b75ce6eb57ed4a01edcb4a35c1dfcdf8d60f3191bbcdfd522a0e321ea41c2cd87a303522d0f98b82dcbe53232ecbf0e2528de7e1be75569584bf2ec574687fde67ffe9827ebbe78f2e5bc4fb368f3c9b0f588c97f7a139bd82fe86eb605b8e29cee75d07b510da1b24fd62cd2fb366f1621e7dbf268b15937f7f7ea4acf6e615775a32c90733769996dd2c5aebe08ecba73e0bc4781d33971992b2764c1b08aa972859cb61b003406479423254a01ea85a348ef249d408157cc0962d1e24cd9c426e6e6a3784dec6fe935be1f6730b01e8683d97e21d8774b2e2655f85db7149e930a44524d4f86004cd687d8a528b6ceadd890707458cab62809110ee28f61a7277ed79dc41e573fd4a59fabf15393ed4c21bf4d5138ac843e80bbf5e1c39ac2d7f2147f35996eb51a9e835db63faaa196b8aef1823ad72523fbfcb35b5560582a48a25ab770e7528e4b3ef291e6f62f5fac916e2162b3b56304287e46839858daf322b0de083d1691d6bda44d66d085ef0d0ad364eebacdd0a43a4456035e58910d0b2dacce45b1c0beabc784f3620a3e4390c345df6117b86d4fc386523b7ceeaecc21233a2865ec6b63bffba6689fb3323402119db8f0665a4730b2e26ca6411db04f1bcc78ce6272159ed2665a286f1ad7758d6d90090a6fd320e697dafbdfef575077e282b825bd64a4dbcf92d1fc0c6f795154e8466ee4b318f2d44b6f81c52523ab68ff8367e01090c2623e00b4008e784049df873a35c29e0abcfae7acbf27236adba0b913d19a15b4af4996669aba4c656c317084347ca962ac8df15cd2f849f522016eb92de4de62944b917d88200ef9aa2def0d13e5f4ae09d2eb4a2d0800af1d704cb01975f6d59768a2b50e39e78116147fd6dcdfbc08354c1b4033bf6772fa127856a4072556a9f07bd7516d01ef41bcb519005c0a3b2a04400427ec033f1b52fe5fdc1aed8e2521fd0fff663e203defc39d7546281a98a502b8a470af16cc62a6581c9985d7ca516864b799fcc55a803ce80711484f6b81591d2402bb1499c95dfb1dee9846679c22853be87c84b4547138dc4fd46b4e79ad12773a5392540a595954112f0cb1d9be4d4eb3aaa4286b6c01520558d58587d9d7f0df3a0282011ce01c9c17111d10ad61b3675b1826c1ad37fc562bdde951b43f890555d6f74ac4fbdb9abbe8bc1e80bb6d52c13de8960a3ff8f65201265e82981dbe39e0d65cf3f1fb6c56e11f9786210383d0150a5e0cbbdb52ca8b2bc45c12fb572657380df369082685b3de9847d5014beaeef815d63e203cc911061eb53d89a312d187f9f02760bfa71083fb643f5d8c324c410070b7ebde250a185e7359837899bb1568a43fa3418f39c12feb03b148b924bfb98b99352b1fbad3f07ac8e4302f85d1fe9ee4bf7507972670ff8beca105cdeb037f1cc4f944d6ca869d0281653de5ee93a7362420fdba8b01a375ff08fe27873655953ec1c00f53613c6ab8b244e2fc1b6babdca5311428d06f57aa4882dc870165deff75ba877dd2a04d1799f26ebfac97a1be53a83ab77dbc2cd4aa45bd779f61b1283eae1a1866ec8a9c150dd0a4deceb2ddea1bc0f4206cd435600a8f190b999b952337d9eb2bdeb3aba2cb2e7000319056629dc1f00901f0880278509417223a3ea0919fcdcf12bff0771c7cc725bdca292068478ccb2e1f35ae8964e0601789a73e7e7c1769ba53f865910fc3d0085c922d7f7849d27b6e7503d521371351f9d7dfd5afc5df0effdf6ac49617fa228501ad72154a73e07781dc4b07765dbfa721d95cf1dc41e161cbd34fc7883a25e3ba6b03e504b2c3b98c8b12ff629b965c2aefc26d74faff7f784baf09c3fc38c487a9d1f5818261162f97e9dff70cf42eb5dbcd7bebb66d68f26d917ddf2a3efc0db1e3372b170b4cd18da507e44c467943f73648dba74db1053b53f989e481c3054bac22c6342fca2c26d30a859a1312e9c353bf921f68136de2b1589747bc765153927c31ebe749dcdff98b5da84c4b66085451b4c87fe1ba2142f98636bcb268c33f7b8c2b96a6525298814578377aa189dd73d5bb27ec5cd2110d8751c18a3110273df2595d4c3a00809bdeda70d86c4a8169b7010c9cdeabfbc3dd3266518226d0ade9bcc4825f18198c854de329fb8fe456dd3bf35d89bd9d2384f3f3282f6872351a18a2f852bf173ea4426de6d01b3ef4b4685aa82df7dc45b99617a8b8c8a0c65a2237b3eaae8267e1f6c453f485432529d973924a080f6a1cc2cc18f804f53209383ce3601ad9361afc331707be1c88b4370404cb7fe0bc538df04adc5c8d9ced94b4c474b19619a53dca3fddb434cac09ce10c0293fea04e8e1b19fd3ff3d174baa988d91cb604fadc59ac0b61f4f87bfd07eee20f7f3ffd96766dd6f3555cd48da7ecd71d2fef34ab082678bfc4dd007669b3fc7a937a5a46269baa7e4e4e43eff1b2b847ea70b6c6c23905d6fb2fbccd944251087ac00c35c2eedba30641797d36ef9d3cb1afc0e3e8930f5b605a847ee77106995bd44047294d04350194369c5a7bf246d1108e1d18d9a638be0c051f695ce86579db613cd8922e86c683c91800b9a34fe6339e0dd79472daa662f78f04f0151a3acd18f11faa4e1216222843b521fb998c8490ab8bab27fde36395b456501307d07b484b453b189fa339282a634af30fea99c9af8f877e61871fe743238b2cee6cb69dbd17d574b5106ebe4b0fde4ef42fab469a5ba7d62c23b67d857f1af6ac981c320db70cdbb6be41bbca60bb7a159ee1c85cb82e0a220064359c06c660b75de6b49839eea68c80283b75d9d627aa4500c0c0f21edafe4a2cf7ee079d5310479da06ba58b142614fe69cb236c51447d63db31cdff91485b46325c26d40dc6d608d46a5e2fb01df06064a022ddf6d5cce0147d5b2a5aba5f9fadc5e778010a924e00a13e21daeea2cd330f45536ef4f42c2e77be00bb53b3f9a93d3eb327dbf30baccee5d26849cfad654ff3ef2b035b78dd3ef42de3302e5514551a968a205b823dffb040ac9452ae3efb43219b02436d0761ca11470405510e534d56caeaacc40eaf9c47a39475adad266f5ddc813e71223800dd46fa7c02b078353f870049806ed7ba57b40b7c3c6272296667500c4b97dd2d7026698b6bc4985bc01be99e0097013a2632c71740888ffaf902a02bf644b38cf9a42528880d9dd142de967cc2ad3e1f1737f0cb8dc5c59c252496e8cfe4e53c82f4a28d9ba2bfa62b6415ba3e5e09040d7f3e3abfeba53e46575e8817ac5eca806ec8a84c7cf77c9fa86c9dd2940f5b96b25a92d4a8f894d4717c8f80a62a35a51d8511f1e822fd79e6fc27cc3f3097d9e3272447de6f223971657ded9e660ee4f8836359742ce7616fd0ca2de6656c71b212b34b8edc71ff36bc84ac4af58eb1adcba4b2c0cb31468dbd2c2b7ee6752981ee1d152c4e4a9b25b2ce87796820def34b662381806d2e4fc77f0b69d7a87de43d94d62a6a6526a7f8c588392890e96f9c51bb58b4f438eb5d197477ce9b160d1c898c89ab408b3c1d648be93b531a5bb4988592c5a8999ae3acbe586d947fe6dd507cddb92dff4974ae17ab99aad5aec9d07b96bd29489876f51afa67570e86b69321d9e565d86001514638403f86666dbf93f18e0a62bf65db333bb85a3ae12d8411aa3c2a423a29bacbbfeebb8a5bafd90436bfded16f992232360211086a3084d9fd1980dd96631820a2cf25c3ac5c19d164cf5ab9a852399491962100ca4fd640146b7ea5460b4fb9e46bf8d23d508a4eeb8a3e9fad8249ece3648c2ec7705a7414eb8e8d602549204cb437f589161fe40de1447d14efa4d738b775d0333526c845cef5ffcbaf5c957df1d8022176b56eeb198e7ad2dfc3d7ea46b125ed432cd04c77efc011a2dad8573345080d7c3cdf5cc160fbc86c4ee1959ee1b8258056b0f3d9343c22dbb2f7858c5f162f08cffdca1acc866aa68e5f1c00b74f66544e8a61e429335adf6f73e32fa87e48e1adf15bb6c7aeacc93713dbc31cdccc9b0e52f922842679494039c395cc1d95eb97ae4df3bb8aba9a2584d97a236f87cb22f00c0a078b045044a5c456e22b2b94a76a559de2672c880660f9785b76bcc2aaed780e05212415c6e73880ca110654ed155a1004af45d5f15ae8e5bfd4817440c5d3d5589eea2c6c344ca0d85d91460638b37f877ea4cbbed35ea75678ef2335a5922cc8541987cc256c8f58045028d33a1c4899cc32265c619ac782ff998a478996be6a0c5b102a664831b395a884f18e77885d860d6b236c52a8066d2ced25432bce79a31b23117f405ef4ebdf3517de98d288f8c3baf04b63b6817c46c14b646308e9f97170b7dbbf9d1a36480338d8eb7466df56feb6baef42cba75512954fd7e33961d247b7393726e46c6e94e156d5776a89ad3e288554470ca0bc4cf4d2d2b0c01ae4fcafcb65ccd6ead03df1d4d6577bb",
- },
- {
- "228eabb5ad8b4ff13b10d13b27372bc2152dff149859ba47d9c89b741d4a5340d8fff5858a4576c55547007d7e2b3f94583ea8f0976237712bd2e5481c3988f5387e7ac2c3f18718388795b7b2d44b0a13f3faaa55311b800301c9203a511572cf8f349280bbabb9424070f415bbfe28aef8d20329ee842cef4d4c299e619b6ef1cf00718aab2accec9ac00155be2903b6fb07dfe98b0bd8d8580176b99ce4aa6be51cf59046c17ce1817d363fa63af5a241d48bcce064a438651af102ff9c6de4b86374fe24f1dfa66e16e51550dbb791af425d8fa601c70c1bb90e1a557bfe0dde730b0364eba9d2018ee751699ee219e13fa8874070935b29a1767e1d748bfbe796fe4b81a71e823605d39fa4b5b885f4610c34d1a090fa4106785e7a035a629958ad1b00cb9d36d171d575268efa1bef064fc0a6dfbae8e532466035a0c2cef96fe9f93b872f0cf804811e927b39818189412868fb104e2d56ae62f77031f0df1ae91aa11826991ca7b8af22f130a47a72cce36ddc319b32dffd294f2e192e490249ea1a6f8437173ce6392d16dda888a98bf685bc91b89b8ee1eabdfb1806fd61f018d1744fe8b03521de4bff86d4a811ca2ecd5be668e9c752a6c26aacc0cc9dd89d112785c25ca6a0a7a5267b4e37457c04a0626c8a29be30ec28ddacf47a84918bab164d07bdedae62132ab04a6f2c4e108eba9ab878caa4a1a7509521d427ad7f3dfa86fae8345dfb5e0d46ce3a94dec84f7880c7422468ea74fe0b4825b8c762b34d5d9b82ba96e0c7dcae01718ccac0044a87476ff031e3ee3c2c13f5f375a841d243c38cd9a354b6525527de1fe7e36a6e2ad95e5bbc4c97e85f8cdcd5341da777e03451838807d5dd2eb4fd15976783c140e21cfc2eb3e58e40c16374de0aecbe3e3d41c64417a472cba18762080a2348ec3f441bf229a932ea0ca7c816938655d0c81b14dfbf86aa600d0c68172fb0046ef51f601ec89309d43ad1eacd583f9d205bb1ff1a37a97b44b5e35be4945f52897eb2a74645b01a7f82054cda44e9fa9f9af9bad1a235155718713bacd08d354f3fdd95858db0040fb551e9f93ae399d5dc53a67e88bcd5a02d104dfd9d824cdd5fe262ed9266fc47b7e640f2c9d9c7a62c6d24b429fa55560aa254a824a0858482e771144d6d5b05539cf71d75bec3a22be75655e1ababec4dff9472a019f6220067374dd49252282e4945a407084633ef9c88d14833bd95335107d36afdf56a642cb739bf0a61ed53a6915baed78e9d74166ebc492b517c7c594fe6564550bb7108f43012551e65fbafc0a9874e46fb64b5b7aee0082a5d617a43b8bf9473309c6761aebc7f13b72ed460b522a6b0875b67353c705f99d1d9dc899870fcc90c632aba1fa9ced6d7a2368dc4dd3d4b38a5807415e00de6b9ea70525a6c1b67d04521efeeefc6c591fc5256d990a1123522864a029430bb7ea00dd80d283fdd6d61cc5b509221e28f73386803d97a38fb0182fd95b3b91353c6eb60ef2b3d5c8c0ab8dc9cd9be2b4cf69450d00e88cb0f0bc9a4be82b71148a37237ceaf945ab94c365625f58171eb15c1bb244a87335550d813d28f241a3296520046e65aff3291555786d7c871ec8a2d10d4b44429041c3cd6ab60f0def742de3d28393c5aca92b150697ac15504ee66d8a2aa01a6c63d7c719d6d4f94af2ed1d8670e3231a0e481095e425e6231c43ad36e3b7a3478f6a61563f5aa13237beb8a891dbb29013c325f7f91c1b055fb83c436fdf8aef49ec457946e6ab7e955427373fd9c743acfd4b9609569b591ec79c7ea7276de103a35a4a8a05c91f59e04689ba1ddd570b18ed046f785d7e4ff9fce7115ac814fe126f781828877208ddfbb2ebc919e6d1f6eb417f38bfbf22ac9633f75e58e560b85d88d0e4fad9b2e68c9ebf9675819d50c30c8982bbbc2f41e02690390bf0e16979b24e648bf15b18800aaef58c3c465f38cfd1e47bf1266c17b69523b7868d2138cb95c4bce0dd3ceb7c2267b868b6e12888d5a489fc0091b295b56a1c328b54fe1119aaf1e6d7dd52fa450b52fbfc8b84c2200ebe209060b655cad288562786673121691809366af37b76567762d1fc24f1fad3128b43c8d10e9b6954b2efcbe40124fc0a5b670dd6dd544e30263a551825282aa06be3817a8eeacf31ca8b25cba011d60b78d3d2462810764e4acb566ff371005f5481c9d36c991527143af2c44cc8cfc59c920bb4a281f2ed4d494d30ba4d900edf59e23be2f763072255cb6f1e8b24ab1d305fbfb2429cff8bda303617c034e71a17230d0e860420dbcf9fea4ab48557e4d50797179496936ec6c97686fe6d9115809e14069244d251d4bc9c8931e47e06ec051e709ba1df526b55d959b37a6f3408833aaac80cfc9cb99915eb7d83e26998f0da2492b986fe0f5047b2cab6e6d33a117df21e6a8ec7f394a3712885dab176a4d6095e5cf75dbd3f0077e5e74b1ff8b902072380cf172562884de852ff5f07c55856224fb3df8eb44764ab9284944b86ab6f176a863cdd0e7ab5616a14692f6cbf41bc63113b27689fc2fb145736aaf2a5b26d2bef3a2a59ef8bb3f3e4d360a4251d0736482e9ed7e189fc48c0973b6649988228c2ac72b23826a61cfa06b11f13c8555be6e433d87e20113eb74c94f0e51719a7b38c59eba300089d06b9bc2a72017668e5aa3153ca4282718f1762642e7c1be1f865cd9b65c6387c8fe496f1e60d5acbb78c2f71cea1f35dc955b1e7d1cdc9ca339765995d9e05dd729cdf58aa2a1451b633c374e5b6c2af1c8486ee4250a875e80e1f359c15130eb1e2575c0c7badb2af61378527fa24347ebb12c10bbb36e3c94619556b2c641d0ebb691b2706cdd667f55b8fff8fb46e3ac72f3682661a4bac2391075ff5145eb07d69d77437adec2d096c1c89208ab3e7a9ea6a0ff4a5bc1846b3683bd7c6ec4520c3c95861a5856b0191e4221c9819c67273c66729728f6035e79c0dae8842df4c0c27ada1ad18b34efcd55b94ef120762e87e8c5afdec80d5788e83f0d1533cdd7aea8f27f33266e007b274f6d48c59bcfad607e8b298be2b17322be88558c60033452826778f167f318b660607bfb2f285cadb385399636acb8f5350d819511b5e7931c5f8483529d3ab3fdb5ae2dde0ada918f1327c6c0dfbbf5ed3c8afef171910dd0169022b3cad5b08084dd5e8eb8ef1ecb17e48bf69f80e3db0ae1cc7b73d94b89696e3c3443ecb4c7ca12568201744d1858d90ff759f2d264d49edf47772bd0e0990c14dcf8c8a4c2dafa44dc6e92f4c66b03bdc4f68f28ca2d0811a433e184cced99a8e5614ca83c46ec18b47e0c7ae91037ae06c6d6d0f3dee19711c21cddafb5869416d23c5219296acda7774891877f3f8d46155d39f43ed10500ede3afa26943b83b800b54a9752250ec6ae173e920002f365d692a9b3a2f9b27124ac97b8e81b70e8c0bb7022d07ee97e962810962b03fc019695b5399f77aab414327cfc5dedd51e99453179c42ae85a42f8e06e0cec6f937224dd019c77c5a0ba32ad08107216a9c758138b730bd5b5f4b613f192839514a8621634d9dbd5840e728c1ef4a2c8bbfadc376dd80d13dcb327ce55ab536a43b570789f5c5e135ac0af79b54232613d0e989ae695aeb358c671ae71d508b58a793e19c58c3d204cdc9a021ecc634bcb0bd6a1917554ea3bd688adab8163260a914fc01d7ce05a497a5c5836cf9401cb6aa35cd008470bdecfb97a511c905badd01bbb4d0c05867661debd2162beeccd52399d5a70a929405293916f33ed0d03f8b850f4bdd77b1fb6283118d71de629577383c81cad086f4099ce7476cb787f73c96431a0df4156f7826fce9045f7e7c97bbfd618b845595203cdc8df4638430fac74a07bc5f773486731d8ad29c06695704cbe2882077a85d543551b7ba81b181ccb93d2b3071b1a38f3c762b42df8246aa64cecbdc772830ac79e766fa99e8c65225f28297a32526df9b51227bd368253737f013ae18435a912bc18cc4a95216ce449865e8bd8bc759dce9d4af52f9e789eafa37023e91946952202dfb7243cab7db2f9f98bb66f19750c547a2bf2e2ba92862ab66f33fcf465ffc41d23f0b891a3b28b3f68ea48dde6ad4802902abd22b0d7d9101bd61471c5d88ee9d9477b7cf9f6ac52e0f520c79278da22938745446f1e647ae478ecba416b941aa31f979d0633efe72910bebb8988de1d0013616f31c5da163eb6c07022649ac57422627a5642618f53103adc9918f9992c5b085e10d2744f9934bfbb994a710d6cd387c325e94278f97d5582864f1bb29a1400aaf674ea8fb99a3b42e4ac50418fd804a5b1471eaac4642d4aa338fd3d5d0dd84372b2c32c5cfe7f319acf731a9787b048cedee3833300dde639cb1386c8fbca4bae8d67fb7bd72d1696a0212e27e166e6b04a79e34b47c98502ed0bdbd8d61777537f72df569fe5ed30071b57e8724e98ccb88c07f0458cf32298cefb6ed672b255e581ac756789b57e950d57174bffd3f47bdbe4b168e7e3f1a6df508d4202d327947facfbf9526a9e5fc1a5abb179902d4584deae6cb2900391e080d3f3540b87c3a873ccfaee5b4aaff0e6516a867ea00b4d5e680fee6b91defc65c240614a1409bdd0f49c2c4f3c1d258d77abfc17a749660f49547adb236730e5a7a22fbbabdd8ca079a8efa5b605332db12f455868ab67a1ffd27d1339bdf8d150189cfbf6199c6fc27c05788138a63267eb8ac086e27286b4ef99ee9d92cfedab5ce9916675f128f206a1733f47a597232067aa12da20c7b9cab6575d7634f8c31e9a29948b528681f3f9c13b9f585ebfbff8c28a299a43e4409b31b6c02a79eeb493734fe5f9c1d9e3830572eb54229b5cf525768f695acff48c76b4a6e0936b7406ab69f06d33d3f04946db9d7966ea6e8c50ede5abadda28149edef5223a6938d5c32933070d234043feddbd65c81be218f9d7c497a1ecac30bb9162e60a9bbbcdb4fec4b212050610e2b376aadf58b3c9207860d2650d0310ae6606a8f1b266b6a13b68c3306ed413224abdf19371bac3ea1b964f28996fc70f666ff118c6a7c9f2108d327f5145919c03832f754de35f5979ae72130e39126499037d6fbb3751cbb4843b05d9dc91dd5fc1429da491f72e3069313ea243933b47109af247fcbe0c70f9024ac5a41815655ab309fcaa282d03596ba59cfee0e40f7bd657689453e98d562442fa4c585f970b6983a581b0b8eb1c5e780b3f5c1abb326213c6b5fd440c2187066ddf55f4eabf88804139392c45979440c6f05b7222bd95e963832d7fa4a4760273cc075e8b8feeccb917e8feaf7d3f766d9ae880487e69bc01872ba62b91b8af5dbffdd93fdc95e8f47ed793fc070a5991f2e9ea61439662dab218f643c1959171937aa160008a548f51f87b58f2c4fae5aed556f26bb9cd1dc2b3518458e2f5ec5d974c6e11a0ed639958cc8c1db771cc8cc8bee8727bf6452f47c9782acf548856a0e67841c3dbdb1c98572a4fc8e6cc8195a504019b4930d302a90dc20d8628ae6c90e0206cbb3d05025744db4e115cd3b650e5519a1624acbf226ebca8875b05183b2584e65289f8b9cec3f7d010cb9671a0e80bb70ca8763f1722d79e8decb6b9023baf64b5981e745c06546cc1e",
- "ade72c2ea29cf829ffe99c2d63840b2eef9b51a9919c02128347d2e88e9f063b86326928cf6252ce4beefbae7206dc61a22d0b33c90d464d551835e3b73c1e3d6e88663deab80c35a607e4180ec079b0ee84e3b7922904e7423acaf976e837",
- "43348cf32211d7daa300de8a4218543c8e3c7373ad10950765c39760f80b733c",
- "e4709d225a552e90fb357413",
- "562050bfb40451f27b1181c389508550a0f46b53d14ca73143da9dae3d3d2b466e9618db39e3219675d2b6eadded7dd9c741d7c9bf3c5619a521189607acbcf6b3964d469d966fa134444aa06d80749c873f0f976e0c5efc5be8d00a2729f03eda6a7b8630575df8b3a19388ff88daf0d00bb3e7c35a525ded90a4511ce815fe6c8904406cf72d7bfa14ca533566f7b54268835285c5402e22a63f98b5d90c86dae0a76d65eacc1ba85b3f5a1499d5f3432dd5455fab9e8bfbd266e99283c2bddf9b556410956b2f061603d1fc91194766f90da841699ba7da3d53ed5abdd8e98034f8fe734446d92b458a731aa4c578552ec1ac5d1baaccc4153a67b48a290602d5f955d61a08436b27cfb0786a80afef76e1266310a42d90feeb3bcc40ae5c4506432dcc92f7e5758ceaf277255401f5c5f4b10df93a249e38edd9effe7bacdf7fecc451d3b2cea77c9bab0403450c41929775b8c0ace46f6928f4d9cf3adf86832d298ea32b236d3201464e2ff506ef01da0e1e389e26e2b3ddc553b369b48d1aa5dd43edd5cab065e276aeff72a4c43206063fc7eea3bcc783ba2221f5b615a7a43a75cecda6bca5aa159e9208bf66af61e2e465c2daee630c4c62077ea6ef0e8b4b4e272d4e93a5f5284f9da463e1a60f815a8a31698ecdc09dff2b62f00e37aea5fd4b07a110cef27e12466c1814d3b10017cb9b8e12f2f38f10cbe31296de2570d5662b16639fcdc05db81e0d48178d055ef873501148d00903ec771400fa4873c5579dc3265028f531538f6dab1e5607a15c8b90cbfa4835107cba6f453bbdc71d08c7e423f58b44be38a9c8a610469f2551ee6177edf639cde35fe8e02f76b7ed106d691a876a4fda3b42d8ace3e0d3d4e026206c5d7d4d56fdda9dcd30fd7b74217fab3c617903f1aeffb8363443ed128af94c391810e327704d6f655e57dece97658d41e074029823850ddf7c5937af41c64465046d8544bba65c691ac69121bd272107f7eef8cfdb6a25da5da16d1033cede09129d51f6abfe63905a6fba9a64d7832fa35825447150595a60163af848eea878fb31a5fb97b1859efbfcc8586eebce8cfe64386461a9b88aa5efc1db43c64dfd5d4a45aa74803fd178f9e16a3f59acfb6e13a564d645cedd73890d0a82fb6dffeef527694a7cf2a89aed9750c3675a67505bff77de8d046087bd39a85c90aedb085e99baf04c7e3bf92e350b332da1b8af85550a00d68904ca426da61add864496d6ff442bb0b848e9aa463bb0c2085cff1a83a47d6f702bd184cfb5c139752754c8978d27b58d364bd88722b9097ee3a6ae28eabb14ca7c31e40461101e92448dbbc63b55cfe56efd078d0058c5e6146c73bcd949c4b3ec9f881b9a5f7b41ca83301261e0c674f2d35d96761baa00ce0675c082bf73dc52dc726a3e605067569a372d2bb47fc8fe1e74f00078ce6f352a6d9d97fd2834670ba3a45aa6751eafc7ed6694e1e07542860c8ea516f296ee901a3ee16b00b40419c74bf6db12c7230325e85a918f412bc2f6469c1a13a5aa77f028e327749efd05b91053f49d9f1edf49aa552c58c68257233a168db60ac55b4086ddaea275b078869cda7b69493c4b371b4e9c8361357a7ac7d3d3bbb464c960addfa8df2b208b21b090d540c440241598212d33273203d484e0930e22469c2a8e866579a4a2b3db8f8344dbf8baa1b97be0c4d976f6aaf14cc09ec52630139b894b2b6f4dad3a205a7b286253f1522b1d6e43bfa37beaf06f831c6f0945cefb2593b9b298da13b0d910582086c5d7e256ed4067bfb476dbe01bcddb437d46ba716d6ace2ff9912c8e460ad33ab3d8f97b7b08dd4ba9e01968d1949ff85b4b9d5b8da291fc0f90ab1eab1d246f67d76092b7a37528ceb388dd76f8a8f0aabb7490f02a2c8bc6498cb26350d859c466dd611bf0ceb81a8b7899c67742c22697ccee21c4963acb003d15c1a2078112bab05595917584e417db3872a0ff0a29138bbca7314449b19827525340370d7e48fdf9f7c6b4a280e78d00775a291081a5e78e7a00ff915015dd5af5f0a45690baba8b1b503bf85f326c23136f4424be4a559aed03fbc81400ac27a33dadb2155d1704950d98043dcd86df1eee78f3f266c4d14deb8126708f74b59aa15e8b497c6a52924a473f999aaf0abd3d148fee8503a1568efec7bfb0bd463402f563e4019cc9c9e1eb498aa54dcb659f43b86df0a34de4e51ec558bbbade3d69511d3fea2baf44f67e85ada7398d7f72ecadcd9e981f82b0743ed74bd33088ba4cbc85b0c99dc5382c599706dd2d51aa9f470c25a98e7e8248dec216a155495630662bf6ba0b7a4baa2cdad30e9ce3e1a65e3c23d69d5f946606ee8504dd70830aa5a8ddd84f10e064695469727d2efeb46186c9d3b7a170057636f05b9ec4c2de7d935fba504a1e7eddf7a5a95226b253b0b9eccec976ca3c57599850db40c27a51ae755c1f30d392467cb74e5c8235861d11d0f8461b0e1d84f5718d64ea92da62f4de184a6499dba473e82b3d197305de0e494f118a263237c7b4c0652327977edb427ccded35552c00a5804b9557ccf2bca2484d9da2c33f6c1bbf2c666ea10b4644a21e3905e5c4eb417ac3572e783428d23dd7222e75c356b99e8183d033034e29e618c90e66ec2f1e9fca47d82c1cffda8ad14c96045159d9437e91ecef41d24cff89009ff57e18c1a422860aa9cd31dd2a85b07422c72a5decc614a9742e62a4988f394421b6918e51c2412d749bb53b1e8fed7b2ef0873ffe14fa77bc366bbd5fa1432be465f5e25266c6c12b55df1f19b1a491acfc5c9019f122c422243d751d8eaa8ff721397915171556e999b34425f7d3ad6f6c3323b8133b4618c65ac16cb5941edc979472734bdccafc73c08939c0b1e306ae3015faa9cfa09ed6560269a1dc54c2c046a12a178144f4381f7b6fd3fd2d28f778d444d9f7a0dae00ea96c6969b78ef326a962d23275f1518f0e6a2469440612f3710b53538fe99a6179471be8c5b2d682ab3e9a5126e41ed6de000cd9e92fec3974e0f4cb2d2245d03d6ee80d6a793b16efa829d75c796f34d4e918250f457703559bb48ff78f0896be1bda403b7f1fd6a319d68478ff70d88238f2b8afc7d20e51757bb9db3bffb35a8040fc0db913c4f03d48619af7fd24cb8986b3e139058be3cc253b3de9b3bb3f8dab7b8818638279b2e6a0c29cfe16fa7250d3c74362ffa07e2977cf562140fe28afba8f61d81f7c73bdd4a2faddb00752bb049d0a57d05c6475c7387e6716ee31974169930c9fd830cef138659cf56f2212de185186c3d683fc6b7fd36e7821f69d0de041a569765066dc4a1934870a7b80f174e8f9e484942e62404a42b21658467873865ef94fc262c231527f39e82dfec91215947b99567daf75c6a28073ee4e67d4307e4b35b46f85433abd9812f35438b34598ff3b6dbd60b60747ad64565391df45ac80b272d0141702ab807fa27c6a6ba2f42c3facfae0c773940cb2943bb1353b41298258bc0d07542b69483e17ab9ce709e4160b80a0968dae9af8fc7c0324c753ca4a11a6df32dfa79a87b445c988154bb3c503e6884cf6d8f5e062a16b4ff230fbda109a6127d35e3bf2b29bfd3b18ba275af773b1981d603300035e046ef023d51874aa105d136bfcc9c7323bd0513a6b2b397ffea71afb7a8d4695411d86164917099eef504f6cff3c5cefb88f23f56c4ae3e2b09a3f353fa55630f45f06c29e8912e8c3c4f493f25eda781680585580595bba43dca9cfd400d9eaf5081d2c6697da59e012dfd0b875336b88fe16609c2e9876737b9afb868ed52417ed0c6b359d582d585ff82d98edd4e63c6b65cf43d4f69eee2af4819157b8a433966953862d1ff2c6d0cba382644a1b0033ddb7be3d1fa9a204042d7b821b293bd659dca980c108ad1db740800b9bd2fc1a163f9b4066f7604f160a7910bd947cb48ce6c81e680fc6571ff0cd12a3ded9c8cd560970ca5cb480a70a8322d5072edcd257604eba8dcf55f9ec97ea2b14fdcc72fbf615131836fb14e42b8d7171d0a06d2fb3caec2e0759e86b0d8f21e312d9211ed7fe0b48669934ffb892baf1db9aa457c07820723e5446420334bf6479f2099e01ef8adf273adfdd9ed0b741931284515d69c211cc2efead8339e450b13be71b35c36c1f00c2b8ed0cfa9792e422912e14b5b1455ef6abdbbec0035480c6cb69d21321d12ee19d528dd48f43b142cf0502eae5304ce52b7fb827552db9ab885b93e83d56a33346135aef11b7e48efca7cd52e2499a7edab0bd0562862187ff4599b2446bff11c37181092fbb05d0e05220ca6bc37f529d6599e8c29acb9f25616c27df291d4fb07430188e6470df7002f73cfe5fe6907dab0b4f90bb58130fe90241c29c6063a22c9f45d032b282eb92c93736692bd5cbde2a17552e942b595b08e6ba0c91a03b9079e9117fbba8f26ce6c5d0500c69bb6e22e3562a50baece49109c2d42b6714250665afd0f0a7e951182012f21aef4b917cd434d9ca22661437608e32666497516be34652500def6c28ef8f56f2273de5416142ce9606faf7df92ab779ed6aa74cb99bb1bfe758ffd344e1d31f479807326d1a7b98f6811e275545d69198707b0fbf027dc6a5e4815d62ef191535569a452c27c4e25ecf139df949d70dd5935bddc04f33b2f0bcf5073c51fc51c15067963a20569b5659f0e7413b347d6d5ee38a92b7e6e656c199149f07ebafe5281db6b1b2ecd9e0384b6f5a8e27ecea9a0249c61b16564964054f5f9621471a98de132e102f518c1419829e2ae2c8c5fffd1270f0a0b33a383437b0034783d50bce8bd7420c059d16364eecbd55b6ac8df8a70382734d8127f4f5895cc9e508b13c000ea053ab59b87ee639745418ffc566ceebad37a17b842d24d3423ac3f086142c622eceaadc4106f8c90c5dae1f52f407fa0bf1e6bf9385cbcbf3b61006ea3b1e66b693ce704577ca9598587f41e05d36d1de424e0e51290a5f2e2f99f1960c0253a046a49b19eef249ca2dda2af1e8dd78411088eff1e9c23c31bd20abd4fc9e7eab19500827d202f76270fe9f90e95309516343e0fca48e5a12182e91c78ebf2cdd4644629afdc90bbccb77546cd765135910ba1cd8a3e3c00fa77e585865e898bfecd06c01a0a4d7be483801099c61941c4967154af5620b171b426cf229df59d2944ba50754140c3f305c16956953be376fe6e7cf31a2e9c276bb09cc24c4b86b2b26f039b0d8511853adcb7feb8502e7641a34e3242bf2c538006bb1983345ec3cacbf219ef10efc1681d52e6e1b1c60bb556b6b8a63d1d1f6869077841d1b816f3165a35833e33d39a8c6e62a2f7c482c395768fc6a0e3cbfc7a1a6d64da53adad66c8016f76eaa73df1b8ef83012ecbe75c92a8e39b48169433f951a539b28a034d5fdd00639a5e3e17ef14dafe869064d130c90c68be4d5ceddabed1bc94e97e2cdf7313f780cd6e175a9e3eba3eaed896fe464073fcf07ae7b5bd41d58c3160f66ac95a76fdaa7a8cbaebb304fe3c8f03cef927a1182ac2281c3b32378813b24bb99e42cb0774331ad78b74d46b8ce48bbf4ef8431a82d4240edfd61b910c38570ba0bfbd4a41665117e6d5f5a97908462e62d0b76160d06aa56cc6e17aaf4607ba8263648f2a0077e306c25486f5f39a75",
- },
- {
- "2f6210063cb3071b3d49339185c2cef8357b08ca826d8d1acd852540c16540f1c850f70404fe1f414853d3cd15a1c64a1cce149e3ca1b80926de4ae8438ad90bdad010decf2f201782f3e49794aae1b079f54eb59607bebde508a528927e346d4e444b1d736b34f65e198df2c36fa23c64f1f1fbf8b0b8ddb85d054bdb39b8297d0347f16f7be7cd9474c058e36294485386434b36fb28ee582e393367f15ce5f5a3d6641fbd31b331f10b1554a05da726a0f35c9b1b4af3498426b17582966a266cce452900f85af1046f45a4ccedca6ce02607fb70fa45f420f66aa38cd4c9f8a30e21a3067b940aebdaaeb7c77824a79e2ba20f26e70346dd6de96942b261e5c08288c7fe1cd1e9f680a0bdf8c46497f007a616eea95ccc17463559f8973eb919c68017e25100d9d1a196ca65fb615502076bf0b0c8bcc70ef22006895ebfa2243fba0791bae0625b762cc1718d1673948264454a200c58122d5e9b8b1e3eb05df8b7eeb297510e0d7dcf7f0be5f29f6756e4b177f109891e6825a9866359e35b10d20da7231bb5a0ea34abd0264b377d2fe9f420f27d3e5aa2e8e00541c46052966ef9b989ae5974e2054409507b867f647aa057f7deb19ac6929f0856005aec6e53a5f702fe6be403afed532b73d38fed73e6e551987f182a1e20801e7a6c8ccd1184cf0fefb4139fa166ca15395902ac40e7fed8661602853682a3b0ee307dffb44d0ea3012142a2880cb7c166ba6ea6a16c7e0882808db8023068f060e5ef1432fdb8331ffad6a7078d686d47d613e94291f1c4117e7c13aee4030fcaf223fcefdb300ed606b5dd931e4adbf45dc437eeb5fbff337812e15c15f026071423f6ef5305c559baa2ecd8ecc7cd498b043740ff3673774855d45d45fa64591d5b4970600ec91ab1b6f39d7dc0e709c41e49c355bd3b9d120ffb57095fb127bafa971a086135b917285794e83e9dac5ce76fb1a4aa4fb6b94a0dc3a9beea64b8817ec1e2b37af9dbd18ec30f2b6f6c12df1db6896c6c43b67a066038f0c4f17142b254f62c4dd1fedb950d07047919e397d06d033cb0bab6b61aefa6dee01720926b16beb9e8bc947dca9b8143b565da85d2dec182987838b267de9047f5b0d961c7971aaf54ae2c1e4aad61ff123c84e41a4566b2bd9e64247cf46b72a444d36bdced1a309b464ee5f4afe406eb68eb05ae51b76bf01b906c0ffbdeb440b11f1c9e3a4c3a809a1f7449047b356c663a1ab7f286a70d16141d11f2d151a4f06d422ab97cab539c1f9da09ad20c000c27b8fead5f0cc37329d466fa260aea934c154dc9c0a065df3d057a0f117a1c38321ae59226a8054f7d6b49a3753436c249838b0924f0e861f5627106dd8d3f0fa724a1cecda71d4a1267ed889b234ae4a7d5edcbc5d52cba389dc0152aff24d224c6a0f16dbd3b7f242807bf4b51a3f22690bdeb66eaa59e8766b3b265d784899d247a0ae1b58a06dd91c529e3691b09f9d9f55fc39afd4a00b0fc668880ef25a46a30861fba8cfd4b51262eba4138b41a2d13ddc71128c8c1242e49a51d6f49879fcfa7595ba4a4adcad3670b0b1b26382f03ff402bc70150f54bf513ba3e9a590e41b269e55616af297ebb3499e16cc8e46c0810330a602955553c0f93d668a1181a0bfd7021ad9a9f68ce39493b012da70a3dda149d0369f23f788616e0272efa322b6a54d804f340d32c890e2eb7b538f48f4c9293b584d22d0ae80d321607644271b81a76ac5b49d8e457069b0c3e909b8a222e3fa6016cb1e979e300804742f2005c68acb7b1849c088b3714c9c7af54e9de9390df0041c87924c8fa6b0aec6b6754171e059cba0d27f221f0b9d044a3aed8338dd8745651981e4b0329376f908b86ae9022699d495bbe3a148f7eb73d56eacb2e5e2180f63fcbfa680369f88eefa71f1210bc5b6b7b957f0a1437476a2112998033197673e470dbe7d9d476c97b95db8b5136f6cccc75d6e0ac1e4ace30e34e64fcc4d7e135b2c80e863ed701d3b28c25e982f1b5f8c895a4e6df7216c3c07abf8551a0ba0469c88aa7a08c7b5218a03b9b91f0935985373f65aa56286ad0e7ef2288a926f172b098123c136455b3a0f04590839e16bade7b6434a3cf048abe2612684c03dafd9cec39af508e63f07ea881014697bc24122058b5ef5d3fae835216d055f0cdf1dc06a12c95041d13ac9e15f235d11747f16ffce1cc3b8f508da520e395edd471f3759d8879ba9c2558b1188d822fd4739ed0546b0ce3bb9988db7c1dc8518ebbc62c4440e6e0653f917dcc13aca1864b71dbb67dbe7117474c936414e4f3cfab1f13eb05f3504484ce11977ab21ec523f97ba1b7ecb8fe384b634c30561cdb752fc67a2316bfa7e4d03f5f825d24a556a0460d8cfe0cc54a6f117ac52d553a5d1bb48031732716436675c5c3996b1939b127c6b0338bfaa29c7467cac9a127e455a715c9ce2b0c35a0d2f83a3d1273ee39399e6cc4980e610c752bd51652b96bf9cf34c7fa41fc9b13f5d55007483e4082ddac4675baa7822fd257452411b01de0e5e5da26e17539d64a89dd93c71d15a4c95b1a83039cb2d5f3f7fa04a817e48dfcbfb3de34ecb47f7592123caf27e17982fbfc8597af5b8aa6558f4e6c73db69328e47677afbe6ef8df82c3d1f0db6a108b2279f61822908d7b856432c32ac5ec0f3c53befab2a7ca356b9c2636f646b228b0a830d348be4ece2271814d477d4c73c0fb6e83a338b90ec4ef45cb25f7e3d6a014a9e8d2e8a6f55a383291a57f15667a73ea1daca31c7182523ca85a107efa2518d2f7f179ed4ba21fed479ef2be09669817133b2384bd85b155dfc1c4c9e6dd9ceecf06cc1ab8ebf7f07aeaae7441468b5471aed93f248a84f44c59be33274b11f651de010ab9f8fb24d3a99914e0147951c34280e7dd15ec196f9a4c86e55e7d373c7e31e6672d1b3ac6a45fa6c8c9088c0b8963d89f4ff1feea3e85cf9cf2f6c97128afd845bb131c6f62b3282bbba42745080fd457f1d3322058f1bd4be876bd01269546d1a853310b165926c1fd4e07054deb5d3fbe8f6007711d435994005aba95918c3df4cd390b165fcd139dd418ebbf661b6de57b655698a8a02ca8fad73e8c536c7110957c36e5494a831d536eccb97a2a9ef58fe58e2885aad170720ffcc57c7de601ea1cf723577a30aad8fd544317e33897c8b6c04e5191bec391ab990e197f10038c0726d371677e4a54c28d7ca5c6046e7cc4acde565b91f7f72af6109a0614160d3ae97e9257b8f71a4663b00c681e793cbb478306e97b0e04711eae7722b4845dadf2fff5bbe71ff24acffea2ee67df99bf62a098ddae9d4ebd3bc5dff04a2d9e3d1d83e8f493db3f63c9e24231b1dbe1147c79f21b0730c842f6983330c5c17dd34556d7e932074cfbe98f2dab5b0ebfd778a1e28fe2bac2d942f61a08b787ebfcdeb3d600bb130ca4922a4ffd38ffc4a1a1a7218451e45da4da67ad81ef898ece3d54cef877cb9d09f5dcf72eccbbc06e62f1e2b4d64059b0a807329780b155ce1614b68de04387d6108ef4dd3ab54b9da72e528d6eac3e16a360ae3421f3f23808a8b5e8ec3dbefcbca3c9f76905850033d78d9283bba9272c475b4e3b4d7643e62c2cc259ebbf168f890de88e82f8b26a7654ee31fe055e45609c70ae02b4942ee15678cd158f4c9e8d351d102ddf7a942458c6125e1457bea0d86ca38cf0c26e474b2b5cca77eb57ad0867cad7d25efc2b250e79396637ea3e948dbb855029cc9b452955bd04ad5a0d0514d4d773c0f298df7bc235a3ac64383a1fbd8a397a158e936b3ba81895a51daa89f51e4ae7a71a53794ff715a42f4fc3dcc9fd56df7bea4ab782534d3760e7b15605fc4dad16911656983c0ab77bce9445bbeb1537c55fef57a32c8f1404306a0a2ca7b73348cd99d0f9948875531cbb0ef7c036cd201614c33293d746c44140e0e8f82421c5bdf2bf428b249597df949fafdb5ccfe1618323f56a6ab9abab9a84a3beb6696ca918af244d34cc1cd95bbca4a87c860a0fa9ff6a04a905b0338a53f230bd5ee9c60e0e0332ca200c15dca0be5936b858d0a7b2e540b8958432e9767396c55d5cc35b60062580023b5cb2f9a5e9a1feba59a19f9a5a251e9d0e8500955a5df21da95213ced2260a2ed8f3d4b295c36cef750c89cf21985c302d5cc577aab7855409a912dbcf1d0a9800df4aa692a78607a40fd6d5a82305c58fcb3d2a82b27e8c5b91681aae62a2bf31ed55c494dbdc38eba30e83c6044945df76705228eede8470369f2e9941ddcb2f239fb3ff6bfcdb0efb5ec50f981adf0e8b213769ffbbea364b08cf8cd69abbfa2a6fe9865cc48558134a57bb5526b9d047e14a379d246de82d3d64f3c810ede280c768dd8bee25af287d5a8d94045ddbf5981382bc716ad9aedfcd66e0ab496172a24efe80649db8e1e83675fc8451e22c6564d8d6dfb285af7fec802b35f19dd8308c68952a11770247fcfecc4ed0e8a445c17b1573f0b4e3ed350f13269ceb572943fc435563459d5044699f1542335b03be6077af156b8c5a6a9f71078ad820cec4642427a9b187ee1b17036d5a5e6108cee8a7d444342eaec3afa64e77c71d3c2b3153d4e2dbb30df2b66b4d14cc45d3a4eda7e911d697e5763e23ee05311a20626df55549b8533c6ebe79737abf472f9cff08bec590943bdeb819d3f923f45b81f9a0cba1f3f800a261842d10cb4cbdba456c7fe5f0abb4a8b58891d97cfd6b669e2708922f1934809d51a1589e5f12e3bb82c9ac3e7e44e3f6e6cd63d428da624fd2f46eec38ff798a90d228efe50c9b67c63796347c8a2b53478f27605999a03c8e1f18b70e92419f646a7f49670aa12d324751aec17d0208fc296955b3098241189af8172d39a6819415cafb107c1842b369f174d6f37dd31cd728dfd0ab10f93609006342b6e4d6ccbfd1ed2bea2fdf5411442b04b1fe218916f159b20242f80b535b4e0a3024c6eff6a40bd0d3db24e51f5ff9c14e1b4a650ca4170ee70f0a3a5a58349a7d0b7a63af86347351696870b95231f76d8c5c6a20736907726341dcbb76672871d18c2157c094b929fd29d34f5bcaacd82706f89a60000cd341d98eb830b73a12335b69f3e0131ded3ce12c98bbd960d2d0696d40696a13ab43925374498d868cd8f070c9039ea6407fc2d92b9c39fe7c935bbcfcc5c0980952fb7dac79042951f49a1af828b138a87401c4104bc28cdf1e39dbd3fa63dd4d5f5ae9d85f032a43ad353bc5e6746e5a76326ab1f4e79103116ce70bc0b459200f32f85e461291e347dda92e421778b849e37a3ecb0b31ec6818e828dd3148dc74313aba43cc9d8b9a36a9dc4e229488060eb6c109f8ad6201958adec6d3bb3b04e5e558a272d44cb98e18f7a0ad8fa6ac3667a62f150830aa930f6166baac6b9081b44304988fbe1698a5b746255de26bb5988aca90bb6523cad68a7572f615f4aa58f932d8a749615cf0a7724e99de042268ceb31433e6df0a61547d576a6201b36b348c028ded5f7e94d1cd2eafc141088ff42cb3dafbbe4c402b93aa9d955df8d9d9fb57c75ac65c2c837acc44bbd4d4aff1888aed46c73d625ad7fff035e8ca0fe411c73ed8135b6b8e17a039ec74e9de0d64cb442bf8a676c0a666f68f21066332cd921ae0ed766f0516a8e19b82cf98e78add0373737a3419e13aa902310c44feae5fdf8bc64e80dce772686a31f141bcce452041bf545b908ef4a2b000e7beaf378e2afdccbbcaa42e330e5024400cf2852d3444718",
- "fd5008477b0855f6f2486fd4f74b9fb4f6e19726c6996bc66893183bd76054d5b05c1c2b64722256ba912ab2dcca66d2abfdf972966438fff7513acfb18ea461eac08c4e32aea4ed3fcf9f1c9905ee4402e7b6984bef974340d212f160b6524b76de99a98d3e96cc0d35e8a63ad7ea3cbea1d40a906c4dd03e5fc19e1513e9",
- "390a5e75c9ff4ad38fb6205ff47f209294337c1f25ff54a3c01eee8e1e220257",
- "8bf183347ec1ca4bceff3374",
- "19fa2641519e21293094e9d767ee1237f9e0715dc57172794867c3bbe2cb647f9b28a8d3f85c0ff557b91bad66f5ea16e0107757b0277fdd3ca05bf47c19bcb92a958a57e8c142a51af29bddb20af84377b6db65f77494e0dc4d2634a776b3a5d777319873bc0dacbbd4b9ebccfae849fa7e9769cdf54660ecca0d5cf4fa5190713726d54d02b3a3f21857125b8a808c0ca2f99d11dc430ed5113ee49ff8f00bcc08f0370dd510e8100e1285659a7b2c7457a6049f2af7786c4db1471ce5bd164e11c7a2165e83e03a135ae2b3429f82f677de044a067e99e0bda2d65a7270d629c00e1d528212d3aeb2896e58ee5145a93ed06a9c00705ad5c5988d3a192304c1d17661d45257c5d16799ef70771964435b12e3b2ee9d5b467c3b1992f45b7a59871b40d8daa1c280747ecb3d170257b91df1f549ce6d66455b5b6f60b7c6e95c92a67e20cffe8599ceb183de53f1dedfe19bae836447af8e053ba419660e0912cad064d6125b9e978e8d0d5f28f8a4e43ca3cdf2d4c0e9a11221d8184e9eb6c90761b0beac82d0d22793279aedb1c7db3632adbee323bc3bbde4801152694831abf5676979af26af7dcbadfba1cad1306b635840cbca76c558b37db0803b4c12befa27d16f21506b07ade4a838d6beba1816eb29ed5e3c4f132a752fc747bd9ba879156e87e6c1584e911da9f796e1fa4a055e427272559e4bd6d0f54b8257100f8a55d84c27b702bb1fe2f995425c85fd48b0a0610db5b39f7a5031407a12dae9f508b21b1378f14952d1beb2dea81d016b2d9b7f1a67b814569b69c0e619adea02a8683242d63a11d3317d060e5b4d85df5ad73127541ba5314715d187990735aa81f438f8b94070ec506ba536274d98b766c1694e54367891a602b99e370425b47a70b819277a249fa429c5bbd0530267f987e6022f25030c30f3baeedc0d13c95f3d5e4b2b87465d179a3a23b9f9e76a42ceea55226ce072f9488392f40621289124d786109d2498e74fb37e2ef466fe8bf3016d96e34204c32978775765aa80461cac48518157f86d59f6187bad4ee62fba1ddbe166b29452f4a59af1e057300c353440644a8e40ae8171ea028be2fa315804abf518847c7945e8228b7766cfdb08d3a3116b59aab8e94b6d8c8c9ef442c2dc7f923bc2cd3e5c663baca7dded976bf191fe36da16948c89c385fe71434f4aa5dd15fe0e925d2459e3b068b9d82a9cc8b8f9786bd9f5fef9baaaf2d67027d9bfd58bb2c58ec7c746b747ab62f9242e4b53ed14d6fc75f5280eca0de23717c97a2293826e19cc8eb47f946421516c349dc4ba49225b91e4e868874bdebd373700df1f3792aaa140597e58b88f90e163397dbad3941705b53d754e3e0c9003df836a7fb8d23f40362fcb5f3947a4281b24240be4ee89aa8e917b194f94345eeca224df0adc15f22a617b6427f29410bc48ea3f92216163785723efc36301d23ed52780c6fd7924bcfaa03269b13582b7c7ea9c0e4a451f38a469fbdb585dcb7c81452da77945ebe27eb26ff6e8c7b2decea289aac5af74746dc257c9bea44a0847f02c4f586e1d76f39d5bf952355a0875f177a666d1d354ad86ce5ec0aba2c2b20cab050eaffd31095395132f5af80a2d2d53b77bda49f948bbb37bdf31c8a690476488e14e542ff6841e7fbfc2eb84795696562d079dc1612274b6dff362567084f793f0bc2dd8de23392d05aeeeeac6991c9f74387153a4b7da94790375e336a00c8293bad0fcef2dd1880e7094e2e53f738247c860780ebe308410ca02ae409ae720e841f48c9677acc6e7d4ccd18c219c400f8b7e1257f692e09eaef96802b17a1cb7d93eb81d3bfcbc7af4cdf05b98e22556b3d1a8b56d6d83bb5f5724696f8f329839dbe477483ec3c09fa2e0628faeba1bf285c224bea3f6cdc7bbd768133c6ef1da14f248cc3b819b196588811b073a7291817bd1e89c65760435d8d17cbf9423744a92143e0f956e2977b39c54fdead5a57f3a04a0facca01bbf44d3b1fb9c4fa83ae1046985e3f26aa0a437999004dd8adc04c5111759849f919b93558dbc559173a23b069b59f800096d9fcf077c7640f59170bb9a6fffe64778bac272365d27ea62aa956559e90edd3f6393cc8775597bcf7d91990ab9511973d948324a27261059e93f4b5dd2f70caf12e1a08e0493cb05588618764391f355379578cf94dd33e616136eea997ec11c0d4ff064ff51a767e5558433a2e3a9a74c232d8e187f47b8cca010709eb9fea0dac8f1ea53bf18822e154ecd929c83b0eac366e30fffbd5ba6a46d734f58d26e7f5df538e18b3d827884aa857a680823131bcf30a76f1a555bcabb17b02b53aefad96fe76f7312da69719434c580d3ff1bcdcd594e6375935003d5d732cc577e11ea2abb1d04259f50aed4c3af9866e8c4a52a09809046ee330f05c4403acbc297a9416c5208fadb31ed4eb7a3b01b87bf08c75cf44c2b0df84df30872d021d6567ea649859268e5e1b5b6405e1b41e350a32c1af13722959c17c01b52c42241313b26b25995a1c89a53e248488724d280647226195746901929501df36d1e94815d7fe6c4ca2731f3181293217f71b9d7f59c2474856972013924ae4796db4cbd22d8905a6043c959941ca6b556c53d1688c439036c715d33a47a7dfc2fe40e53424c5093020d2e85e4b04aa4c704ea5bfe5a2384878da38319c59d41d66b6add2a443d9ea11edd8d18fa41004251653857733b388b453943eb33df93dcd5d549757fa2967ef0f9a5105836c48826c47fcccb2d9bc349032b286962136b848632bdcf186a08cbeaa52d195efcfc3a440bac154971d11ff4994f293b14fb8c3214ebe7ab8b3d0f2fe0b03ed7b145fafd7730a173e3cc1847f0cdf2cf629f5ea81a07bef716b1a67dd9e3b7a52fea1aaa7a393f53b5bdb5988df78a57a9dad19a8253316835acab8a6b9a9fb42d97bf29b2443322f46de386fd82bd3453ed68e2370c6eac4497b1bde7b42d569c452f377bd38bd50fa5a6792ef5c9ec6c647001149b86fedb3e2f18d4271e9cc4801aa16ecddb31b6a795fecabc613bfbc8e4f5636d71e74595c841fd11b6a6bc7f169317c1added56b82a71fc36d774bb4d661685363e9da5fd2e1f357006dc5b5bbf8b42ee3f869e75a541586fba558a8f490d641b78c27368b9b4c2db046354e9358ae9140e91cd95ebeffc6c0d2676a3ff4ab10d463bf32bed97023a80a79df191ab9858c43537a03072a17c30b1bd99efbd361590ed6b7d5b0ec4e2326fa35904ab9a48596f44491cbbc0112890f9386ed04dec30126be359a05e99b2b77fa2c8f6b7460a6cd590d71c73b2a1b23312ff89306b6e41c76ddc0a099bfa79498e36ae5cf0c560b8854dff32d2b690ce0ac4aabfa723ac6f2e97ad1083235196b464ad67fdd649aec01695d55c8b4bb198f30630ca635aa5a1915f3718341bcfd8b522f764015fa5479004d28eceea7fe67df7ee24a97a9708d528b89589f1899f13242a0d00f7464c3cdfce213699340e754533b934f4a8410224e111f31cf8e54d7b5e90cd8c68bf96edbc8d183894deefdf4fcc1a83162a3f6341dcd9a9aecf171c0df28257a68b1af1b67c54c43c3cff27fed89cc64bc46e23a49ec74a9efbab7981d9f0a018247441e4f0f5b5f68ba9325582f92de4cca4a5f878a0c5c387581e64324e3246d8f3205c838a29f1abeea24446e496421f0e742d411adb55f70272ae4a992e825a3d327e44b8b3762b25aa451d07eb4eac0322b431fa676462632daba2aba7bdeee1b438f051d21d4b1897e2ac2f95ee7c23f9996a805de8fffb3b30b855cd6c5b84c011accf4bf94d304d944079f04b5cadf8fcd6751c22a0f9165ab98998b2d89e6514641f1f3b91b8c0bf057d69c3d893fc4e041e06a2229e2ee58082ffb58cb920972ede58483287d0ace94c1becef26a410b93e4ff402e61dcc574b790d49679f18f4e2004f8b7cc357faba34a80e56821bb5b883d1a8b49c6605002152f270bbc36bc79095644e29ab08cc988deda765d67e4fff12b726d5de135ff9d0cbd9d5f9d440e548836633b93a38330d638468b59a32642da3375cdf70b062d14b46a78569c24a706e179baa2058dcae5c61fb6cadd9e015b017f26e9dbe3e6366cf5f1ec839aa3bbb21dd6c9b8e910245fa95b09b7d6cbf08a4c6c84bef257a70389be962dad14d97a893c128b73bf6580689e540d004f21edf8403f36b1ad7c9a2e83ffceb141af59700c316c8c1e3347187f24819c2ff0c9f9a2360dce354f3374374eab1643d2d8831310a8e3ca6768200ea7759822b82f7027cd450479fcc7f6d04802b15735a137ad489f1e1ee78434a253a9dd16684ad58fc91960cde6754f82e8b38edd5e798fdbbbf8fc2e2380a4e21dd94f8c1c063b18f29d8cd8d89f65deac5640799d4ca2caa29c1e72ad8bc417490d11e4051d94956fbc74289857e5f8e9e87b9a2d83074a994de0b10bc7782f6650cfbdb8c835c81cd88bdce5f04ca939b3c5cd010d4dc5d51224fcacbca9851694b8bf55b22dead859d023eee5a7ad3436a912c3fc0284456d5d72ea5f1afa8545c856676ac2dd9a057028bd3ca0f50e7070fa74152f13997c95c1834c3e67504f1a4165d2b49a96919b88f72caed60f56ca7ab5a3204fb12ad3592c725fdebb048732fc189c7dfed185c6c184a626e07d7356860d00389862d5b9701eaa4e5f7889e6db0f54633369b8d26805c08471de8fc3f8fa1fb0b0711d9e015add5373f7f8b64abaddbac3399c756244b1b07c579d33e4967e5e0cf16de29cb8a7efad07ff9039ca305772a6e45c76bd9b77e24949556766a8b8425c5e595efb431bde4ee222f9eb3fc2d002a1e2d14db2b23135266c942eea33bffd30eb0218405373240e0cd3040436ca895093bf056fd001c00ba59d90502042e6e6c0167105051628895c8164c9ab959400898309cabafdef12be53604fa57df44e0a90a81bd63c331291a93bffefe809e80db0679568f6e94e0d8e2edec0087c35bcb3c4f4725e6013bcf197156cd9d90612423348123383e45c14d27d8833f56ddb04083c069fd6e282fe69c940840f5f747dfb72ad72fd8cf9f3ded15c9e2f4727fd60b4f40e95dbe77a89b47dde7d5326942600554905d9dade9d145ab6da802643f2081678392609c2fdd1b79dd8caec137cbed315374c6f05c0758070f3bb17e23d81ccc39c6aa89913897e487fde889c5aacd422278f8571641cc4f0a93d9768aef9e45d6bd187d1ba637ce0fbd3c573d6778cf7bf5188c00dcdf13be3fd599143952b376220283e34e014e83b214bd5f64eb0ecb098ae8bef883949907cc36e22ece60b893b963cfa73d120513e285aaf70ce5add34edbdac60b3aa7b385b90e339058fb9b3cf984b06f79788016035c5ce490f2de7995b98a8c1c9c80f29603ae2b7fc41886663163e604275cb085f8453b27f4d795b9bad19ade2f98a1c99b43a7581bd991e5d0e5e1a6e713acc522ba9fe8302658a9782558e35436e714ac6bc85ad1d3cd008f24106901fa954f5fefb61210d6f8dc9ff35c480f1d14e59c0e501917a31ee9d00c6bdb06a00af5a8b08c3928cc5f37476248223627cb77eaf0e96213cb0a13e97d3fe9b9814d462690e8d68d02655a32fc271ee73db4f88a33386ea88a5857e15a28d9b3e3a96f00c7cd85aa53f9282ab8c8ca6d6a8afed43aa87fe7fc1ad59b0f0db2dd25c20af96e8c282c19fc883ef01a4060398926a1c82f07bcd3bc314580d7636b623b7bad8ddba05850291a6344df0f346fa4a321a85ee3e9c",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b",
- "0942e506c433afcda3847f2dad",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff4b4086fbbd1b6cec23e45481eac5a25d",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314",
- "d3d934f75ea0f210a8f6059401",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f685eb7731024bbf6794c3f4c7c5a1cf925",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314",
- "d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525cf08f5e9e25e5360aad2b2d085fa54d835e8d466826498d9a8877565705a8a3f62802944de7ca5894e5759d351adac869580ec17e485f18c0c66f17cc07cbb",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68a12d0f1cc99e132db9014100d9668c91",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9b",
- "bc",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32d4d00a24b826b6efb16013ef54cbe170",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525cf08f5e9e25e5360aad2b2d085fa54d835e8d466826498d9a8877565705a8a3f62802944de7ca5894e5759d351adac869580ec17e485f18c0c66f17cc0",
- "7cbb22fce466da610b63af62bc83b4692f3affaf271693ac071fb86d11342d",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32c38dbb37d04f8272e741da2802c54a9d9aaf8ecf38b36fc9ad0079523f6a4abd5281a22697a3180bc02662a7c13ee23599d18e5c48300dbb831509df4c172f53e524b3c15124a87ac73e5028cde6c94d8d",
- },
- {
- "67c6697351ff4aec29cdbaabf2fbe3467cc254f81be8e78d765a2e63339fc99a66320db73158a35a255d051758e95ed4abb2cdc69bb454110e827441213ddc8770e93ea141e1fc673e017e97eadc6b968f385c2aecb03bfb32af3c54ec18db5c021afe43fbfaaa3afb29d1e6053c7c9475d8be6189f95cbba8990f95b1ebf1b305eff700e9a13ae5ca0bcbd0484764bd1f231ea81c7b64c514735ac55e4b79633b706424119e09dcaad4acf21b10af3b33cde3504847155cbb6f2219ba9b7df50be11a1c7f23f829f8a41b13b5ca4ee8983238e0794d3d34bc5f4e77facb6c05ac86212baa1a55a2be70b5733b045cd33694b3afe2f0e49e4f321549fd824ea90870d4b28a2954489a0abcd50e18a844ac5bf38e4cd72d9b0942e506c433afcda3847f2dadd47647de321cec4ac430f62023856cfbb20704f4ec0bb920ba86c33e05f1ecd96733b79950a3e314d3d934f75ea0f210a8f6059401beb4bc4478fa4969e623d01ada696a7e4c7e5125b34884533a94fb319990325744ee9bbce9e525",
- "",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "588e1356fb8fa32410dad99cf7922aae47b4042502c92f3afe33dc22c1c2e90caf22bc37a254f8dd62a09582c70194f9616982639415178e9fe95740c0f1d497a69b69d4924a7a15290187f9c8acf09cf5b3b3188ecde2d2807207f5bb6a6d3504314b1b47684cf8ba8807eb9a3c497c79ebe1e4c1eca2aa90328563e201425227fca8ee05dcc05fd6c98128626c1e71d2fb3a21860567093db1012dfabe13055c48219d2a301c8a5a49033a811d8d9413bafbb2eefc177226fe578e93c2ef1f309416dc98843bfac387debb1b610b1d2366178ce7212a7312057a3d058357a629f18c78e129e60979a2310455a76207be5611e8b4b840629564020c17f5c9446882e23f610e931246ec434e62de765bf22954cfae02b2ff7c59dfe246e4bb2d6a8afcebdc2beeaabf2a3f43f95a5ea639853f38719875ecdd2bbc0d81bb2a5ed59553b1e76b6365b74f618f68d1f05b5662cd6e04de896d3ef5dae4149485a5a2093ff4ec74b20b5e5bf8e61b5c65515938c202beab3eea5a498d2f32c38dbb370a9bbc3187cc260ddac991f94ce4f0d5",
- },
- {
- "0fb826ddb2eb5e708de203d0438be12cf708d635ebdbae56278be09077009586b9bc646ba7c2db35a5de05e86ae71461efea96dac64430edcf117d461113cccacf303576f310ab98efb180599894ba877e50614494923163a3afa9b4c2757f91a6b40799c5b331b464b10dfc45c783c317e408ab76390e19e8b7ceaa2c4d3bd201436bc6f69c7a5a4d8756924ed95665bd5e1034971e4d80d51b2a",
- "026866d46aa940309fdcabf92a324fbc",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "30f05cf8189bb7b8b4f560e746e228c4cc7e86e8f2fa66e1afe212d1855db51070acd5eb34ce80b2e223957df50fde4c2531d97fc9e573725e7a5e47f0dfc4da1942620320bb2deaf8b17937bae4218d04db8e76f6efe84a117292159507c9f8a09fb2c17921d7762510dbf1dac7b62b1bd7572e3e2cf008d01c445c7fa78833235034281ae180e051451c6a64f22ca9708634bd0d604e4cfcd971b13742efa5b6363e662a875daccb2b00",
- },
- {
- "c7d4f8790e4c47d4daecbddf5939973521ddbf3b832e564afc66f03b5583c41c58bd956609dc3ae3c8f7c2213059575236168dba44e3044049f47c9e7840bbd0fd5036062d70e9f567ac1797056ee93c8476f6c959fa09a3ee854166c6fc36c34d6cca7adcb36f435f86db65f4c4a1793b974294914b377fd179e697751c5ac289243c65d8aca93732849c27483da083d4e218652d4fe5fec8cb953ee7f00070143dd6ece97f241b03c0424bfee2cfd2c4e738f2361df0ffe8863dcf763d408a7a167763959b7f985bc1e359a4b22c6899645ad0814bcf69d10c38474978d1c48e482723e3a6bb3f689f980c51c474eb28cfbba91a8a12eb964b32dfc303a3524ccb752f71316ed9d007e521cb5a0cf429c79d4351b02ee7fb60c7be636a10af3586dfa7b74d80875466a820c0b514e97cb12cce615ab55cba7c1b1de72bcd1cb1acc368f944ef4eaa986e6a4d8253c9337f9795d94df193c90cb0b0387dcde929905223d441717ed9dfe826613bf094ba872993d41b269e27d74e5f541b497eac9ba180dc12ffb6f1e7dc5223cce6dd541071282b97c6526e15b2c330fb41dc96e25d72f45c28e543053766d11d44252db54e584c14abbb295d7e5a58bf36eea1936095ef897a338eb1995fcedd85fc92d354dfe7ff9a115c186bb4d7a1a27835030d248c87571a38f17906cefe0261d15740b9",
- "56",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "f89c825ca43cae1ce3fbdee85c505edd1aabefe69a0f9efd740f027aa7dee48a91ad24e69ad061648f0a52b4afb19d7ffccdc21f4b4247dfd89f5f9f998cb3c02b226173fedb6f8770aceef9271e7236fefd19fb3b87d08a5c587ac7918e80aa4b477f22602189811e270d686bc4949137a41d11d95ec96ee9d26c6126f6e923ab37638b34d1538d2e46d6df6216da4f193a3cecb731e632e109ced643056a1673059355d2d1314df35ded8364efed7de490201090a6f2d1751748585f64d26041637ba3723cbc4b60e226f10a19699d223075bc1f27d82e7f560c0db630ea670b3f8a70a8950894af4d1c7b3f674a3fa00d19ee4cc2b6174c1d259a297424bf2c3943a29a16a9830ce11abaa79cd2eb77b53a02b365b1838e7bfd5ae1bd044ffc885c61c6b2186a357e8b8f732b7ab96517969aeb70c7b493bbaca9462a61815a3c6135c748bf9c8487ac0631807aa69243fa09cd3b8efb63f8d4e090ad30b6c2f08bf4e82f191cedfa5cbe2b42268d67ecd105918181e44fc9879efd642d20be84e6f74717e03fb94fcbaa6ed3b307431d2a9384b8a2b3e5825ffce8d99af48f177e43bb4272226d8a5edd37d53807f768feb9e0733b437a1d0f84779ab68a1804e92a5eecca56364f0fa6dca152203b249fdc8fbd950fdc37c1887596308a90ba3a5751c7096bfbd1cb177bb17847b33c4379b43938a67674459cd9a06e3017ccac5b",
- },
- {
- "135a28170fe89066da7bcff3a9ccc1b27dfe942a6f47b23835ef746aaea63dc10066d90f4e697528e5451b8e11dd408fdbd4b94a1c6c82515bf7bc099df9cb9d5fa4acad0d22d5f267f18078cec107a995c1f3b12d7603886dbf910ab85ca7180053c50e759b00dc8c81555a425c03d71df6894a6c8cd2d94b64e303c08a1bc1dee1cf537ccf300850856292e1656aff5bf349c87f1ca1ca8085cd400fe901edcad04146a0714ef0f6b083d715edd670e020385f3cda29bc5ff6fc6edffe5ca9ce9def6e0e3d5f04ede2db02cfb2",
- "73afd2ab0e0e8537cae42dc6530dc4afb6934ca6",
- "a5117e70953568bf750862df9e6f92af81677c3a188e847917a4a915bda7792e",
- "129039b5572e8a7a8131f76a",
- "2c125232a59879aee36cacc4aca5085a4688c4f776667a8fbd86862b5cfb1d57c976688fdd652eafa2b88b1b8e358aa2110ff6ef13cdc1ceca9c9f087c35c38d89d6fbd8de89538070f17916ecb19ca3ef4a1c834f0bdaa1df62aaabef2e117106787056c909e61ecd208357dd5c363f11c5d6cf24992cc873cf69f59360a820fcf290bd90b2cab24c47286acb4e1033962b6d41e562a206a94796a8ab1c6b8bade804ff9bdf5ba6062d2c1f8fe0f4dfc05720bd9a612b92c26789f9f6a7ce43f5e8e3aee99a9cd7d6c11eaa611983c36935b0dda57d898a60a0ab7c4b54",
- },
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go
deleted file mode 100644
index 0f8efdbaa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
-package chacha20
-
-import "encoding/binary"
-
-const rounds = 20
-
-// core applies the ChaCha20 core function to 16-byte input in, 32-byte key k,
-// and 16-byte constant c, and puts the result into 64-byte array out.
-func core(out *[64]byte, in *[16]byte, k *[32]byte) {
- j0 := uint32(0x61707865)
- j1 := uint32(0x3320646e)
- j2 := uint32(0x79622d32)
- j3 := uint32(0x6b206574)
- j4 := binary.LittleEndian.Uint32(k[0:4])
- j5 := binary.LittleEndian.Uint32(k[4:8])
- j6 := binary.LittleEndian.Uint32(k[8:12])
- j7 := binary.LittleEndian.Uint32(k[12:16])
- j8 := binary.LittleEndian.Uint32(k[16:20])
- j9 := binary.LittleEndian.Uint32(k[20:24])
- j10 := binary.LittleEndian.Uint32(k[24:28])
- j11 := binary.LittleEndian.Uint32(k[28:32])
- j12 := binary.LittleEndian.Uint32(in[0:4])
- j13 := binary.LittleEndian.Uint32(in[4:8])
- j14 := binary.LittleEndian.Uint32(in[8:12])
- j15 := binary.LittleEndian.Uint32(in[12:16])
-
- x0, x1, x2, x3, x4, x5, x6, x7 := j0, j1, j2, j3, j4, j5, j6, j7
- x8, x9, x10, x11, x12, x13, x14, x15 := j8, j9, j10, j11, j12, j13, j14, j15
-
- for i := 0; i < rounds; i += 2 {
- x0 += x4
- x12 ^= x0
- x12 = (x12 << 16) | (x12 >> (16))
- x8 += x12
- x4 ^= x8
- x4 = (x4 << 12) | (x4 >> (20))
- x0 += x4
- x12 ^= x0
- x12 = (x12 << 8) | (x12 >> (24))
- x8 += x12
- x4 ^= x8
- x4 = (x4 << 7) | (x4 >> (25))
- x1 += x5
- x13 ^= x1
- x13 = (x13 << 16) | (x13 >> 16)
- x9 += x13
- x5 ^= x9
- x5 = (x5 << 12) | (x5 >> 20)
- x1 += x5
- x13 ^= x1
- x13 = (x13 << 8) | (x13 >> 24)
- x9 += x13
- x5 ^= x9
- x5 = (x5 << 7) | (x5 >> 25)
- x2 += x6
- x14 ^= x2
- x14 = (x14 << 16) | (x14 >> 16)
- x10 += x14
- x6 ^= x10
- x6 = (x6 << 12) | (x6 >> 20)
- x2 += x6
- x14 ^= x2
- x14 = (x14 << 8) | (x14 >> 24)
- x10 += x14
- x6 ^= x10
- x6 = (x6 << 7) | (x6 >> 25)
- x3 += x7
- x15 ^= x3
- x15 = (x15 << 16) | (x15 >> 16)
- x11 += x15
- x7 ^= x11
- x7 = (x7 << 12) | (x7 >> 20)
- x3 += x7
- x15 ^= x3
- x15 = (x15 << 8) | (x15 >> 24)
- x11 += x15
- x7 ^= x11
- x7 = (x7 << 7) | (x7 >> 25)
- x0 += x5
- x15 ^= x0
- x15 = (x15 << 16) | (x15 >> 16)
- x10 += x15
- x5 ^= x10
- x5 = (x5 << 12) | (x5 >> 20)
- x0 += x5
- x15 ^= x0
- x15 = (x15 << 8) | (x15 >> 24)
- x10 += x15
- x5 ^= x10
- x5 = (x5 << 7) | (x5 >> 25)
- x1 += x6
- x12 ^= x1
- x12 = (x12 << 16) | (x12 >> 16)
- x11 += x12
- x6 ^= x11
- x6 = (x6 << 12) | (x6 >> 20)
- x1 += x6
- x12 ^= x1
- x12 = (x12 << 8) | (x12 >> 24)
- x11 += x12
- x6 ^= x11
- x6 = (x6 << 7) | (x6 >> 25)
- x2 += x7
- x13 ^= x2
- x13 = (x13 << 16) | (x13 >> 16)
- x8 += x13
- x7 ^= x8
- x7 = (x7 << 12) | (x7 >> 20)
- x2 += x7
- x13 ^= x2
- x13 = (x13 << 8) | (x13 >> 24)
- x8 += x13
- x7 ^= x8
- x7 = (x7 << 7) | (x7 >> 25)
- x3 += x4
- x14 ^= x3
- x14 = (x14 << 16) | (x14 >> 16)
- x9 += x14
- x4 ^= x9
- x4 = (x4 << 12) | (x4 >> 20)
- x3 += x4
- x14 ^= x3
- x14 = (x14 << 8) | (x14 >> 24)
- x9 += x14
- x4 ^= x9
- x4 = (x4 << 7) | (x4 >> 25)
- }
-
- x0 += j0
- x1 += j1
- x2 += j2
- x3 += j3
- x4 += j4
- x5 += j5
- x6 += j6
- x7 += j7
- x8 += j8
- x9 += j9
- x10 += j10
- x11 += j11
- x12 += j12
- x13 += j13
- x14 += j14
- x15 += j15
-
- binary.LittleEndian.PutUint32(out[0:4], x0)
- binary.LittleEndian.PutUint32(out[4:8], x1)
- binary.LittleEndian.PutUint32(out[8:12], x2)
- binary.LittleEndian.PutUint32(out[12:16], x3)
- binary.LittleEndian.PutUint32(out[16:20], x4)
- binary.LittleEndian.PutUint32(out[20:24], x5)
- binary.LittleEndian.PutUint32(out[24:28], x6)
- binary.LittleEndian.PutUint32(out[28:32], x7)
- binary.LittleEndian.PutUint32(out[32:36], x8)
- binary.LittleEndian.PutUint32(out[36:40], x9)
- binary.LittleEndian.PutUint32(out[40:44], x10)
- binary.LittleEndian.PutUint32(out[44:48], x11)
- binary.LittleEndian.PutUint32(out[48:52], x12)
- binary.LittleEndian.PutUint32(out[52:56], x13)
- binary.LittleEndian.PutUint32(out[56:60], x14)
- binary.LittleEndian.PutUint32(out[60:64], x15)
-}
-
-// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out must overlap entirely or not at all. Counter contains the raw
-// ChaCha20 counter bytes (i.e. block counter followed by nonce).
-func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
- var block [64]byte
- var counterCopy [16]byte
- copy(counterCopy[:], counter[:])
-
- for len(in) >= 64 {
- core(&block, &counterCopy, key)
- for i, x := range block {
- out[i] = in[i] ^ x
- }
- u := uint32(1)
- for i := 0; i < 4; i++ {
- u += uint32(counterCopy[i])
- counterCopy[i] = byte(u)
- u >>= 8
- }
- in = in[64:]
- out = out[64:]
- }
-
- if len(in) > 0 {
- core(&block, &counterCopy, key)
- for i, v := range in {
- out[i] = v ^ block[i]
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go
deleted file mode 100644
index b80d34cdd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2016 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 file.
-
-package chacha20
-
-import (
- "encoding/hex"
- "testing"
-)
-
-func TestCore(t *testing.T) {
- // This is just a smoke test that checks the example from
- // https://tools.ietf.org/html/rfc7539#section-2.3.2. The
- // chacha20poly1305 package contains much more extensive tests of this
- // code.
- var key [32]byte
- for i := range key {
- key[i] = byte(i)
- }
-
- var input [16]byte
- input[0] = 1
- input[7] = 9
- input[11] = 0x4a
-
- var out [64]byte
- XORKeyStream(out[:], out[:], &input, &key)
- const expected = "10f1e7e4d13b5915500fdd1fa32071c4c7d1f4c733c068030422aa9ac3d46c4ed2826446079faa0914c2d705d98b02a2b5129cd1de164eb9cbd083e8a2503c4e"
- if result := hex.EncodeToString(out[:]); result != expected {
- t.Errorf("wanted %x but got %x", expected, result)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/codereview.cfg b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/codereview.cfg
deleted file mode 100644
index 3f8b14b64..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/codereview.cfg
+++ /dev/null
@@ -1 +0,0 @@
-issuerepo: golang/go
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1.go
deleted file mode 100644
index 88ec8b4fb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1.go
+++ /dev/null
@@ -1,732 +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 file.
-
-package cryptobyte
-
-import (
- encoding_asn1 "encoding/asn1"
- "fmt"
- "math/big"
- "reflect"
- "time"
-
- "golang.org/x/crypto/cryptobyte/asn1"
-)
-
-// This file contains ASN.1-related methods for String and Builder.
-
-// Builder
-
-// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER.
-func (b *Builder) AddASN1Int64(v int64) {
- b.addASN1Signed(asn1.INTEGER, v)
-}
-
-// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.
-func (b *Builder) AddASN1Enum(v int64) {
- b.addASN1Signed(asn1.ENUM, v)
-}
-
-func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) {
- b.AddASN1(tag, func(c *Builder) {
- length := 1
- for i := v; i >= 0x80 || i < -0x80; i >>= 8 {
- length++
- }
-
- for ; length > 0; length-- {
- i := v >> uint((length-1)*8) & 0xff
- c.AddUint8(uint8(i))
- }
- })
-}
-
-// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER.
-func (b *Builder) AddASN1Uint64(v uint64) {
- b.AddASN1(asn1.INTEGER, func(c *Builder) {
- length := 1
- for i := v; i >= 0x80; i >>= 8 {
- length++
- }
-
- for ; length > 0; length-- {
- i := v >> uint((length-1)*8) & 0xff
- c.AddUint8(uint8(i))
- }
- })
-}
-
-// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER.
-func (b *Builder) AddASN1BigInt(n *big.Int) {
- if b.err != nil {
- return
- }
-
- b.AddASN1(asn1.INTEGER, func(c *Builder) {
- if n.Sign() < 0 {
- // A negative number has to be converted to two's-complement form. So we
- // invert and subtract 1. If the most-significant-bit isn't set then
- // we'll need to pad the beginning with 0xff in order to keep the number
- // negative.
- nMinus1 := new(big.Int).Neg(n)
- nMinus1.Sub(nMinus1, bigOne)
- bytes := nMinus1.Bytes()
- for i := range bytes {
- bytes[i] ^= 0xff
- }
- if bytes[0]&0x80 == 0 {
- c.add(0xff)
- }
- c.add(bytes...)
- } else if n.Sign() == 0 {
- c.add(0)
- } else {
- bytes := n.Bytes()
- if bytes[0]&0x80 != 0 {
- c.add(0)
- }
- c.add(bytes...)
- }
- })
-}
-
-// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING.
-func (b *Builder) AddASN1OctetString(bytes []byte) {
- b.AddASN1(asn1.OCTET_STRING, func(c *Builder) {
- c.AddBytes(bytes)
- })
-}
-
-const generalizedTimeFormatStr = "20060102150405Z0700"
-
-// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME.
-func (b *Builder) AddASN1GeneralizedTime(t time.Time) {
- if t.Year() < 0 || t.Year() > 9999 {
- b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t)
- return
- }
- b.AddASN1(asn1.GeneralizedTime, func(c *Builder) {
- c.AddBytes([]byte(t.Format(generalizedTimeFormatStr)))
- })
-}
-
-// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not
-// support BIT STRINGs that are not a whole number of bytes.
-func (b *Builder) AddASN1BitString(data []byte) {
- b.AddASN1(asn1.BIT_STRING, func(b *Builder) {
- b.AddUint8(0)
- b.AddBytes(data)
- })
-}
-
-func (b *Builder) addBase128Int(n int64) {
- var length int
- if n == 0 {
- length = 1
- } else {
- for i := n; i > 0; i >>= 7 {
- length++
- }
- }
-
- for i := length - 1; i >= 0; i-- {
- o := byte(n >> uint(i*7))
- o &= 0x7f
- if i != 0 {
- o |= 0x80
- }
-
- b.add(o)
- }
-}
-
-func isValidOID(oid encoding_asn1.ObjectIdentifier) bool {
- if len(oid) < 2 {
- return false
- }
-
- if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) {
- return false
- }
-
- for _, v := range oid {
- if v < 0 {
- return false
- }
- }
-
- return true
-}
-
-func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) {
- b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) {
- if !isValidOID(oid) {
- b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid)
- return
- }
-
- b.addBase128Int(int64(oid[0])*40 + int64(oid[1]))
- for _, v := range oid[2:] {
- b.addBase128Int(int64(v))
- }
- })
-}
-
-func (b *Builder) AddASN1Boolean(v bool) {
- b.AddASN1(asn1.BOOLEAN, func(b *Builder) {
- if v {
- b.AddUint8(0xff)
- } else {
- b.AddUint8(0)
- }
- })
-}
-
-func (b *Builder) AddASN1NULL() {
- b.add(uint8(asn1.NULL), 0)
-}
-
-// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if
-// successful or records an error if one occurred.
-func (b *Builder) MarshalASN1(v interface{}) {
- // NOTE(martinkr): This is somewhat of a hack to allow propagation of
- // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a
- // value embedded into a struct, its tag information is lost.
- if b.err != nil {
- return
- }
- bytes, err := encoding_asn1.Marshal(v)
- if err != nil {
- b.err = err
- return
- }
- b.AddBytes(bytes)
-}
-
-// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag.
-// Tags greater than 30 are not supported and result in an error (i.e.
-// low-tag-number form only). The child builder passed to the
-// BuilderContinuation can be used to build the content of the ASN.1 object.
-func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) {
- if b.err != nil {
- return
- }
- // Identifiers with the low five bits set indicate high-tag-number format
- // (two or more octets), which we don't support.
- if tag&0x1f == 0x1f {
- b.err = fmt.Errorf("cryptobyte: high-tag number identifier octects not supported: 0x%x", tag)
- return
- }
- b.AddUint8(uint8(tag))
- b.addLengthPrefixed(1, true, f)
-}
-
-// String
-
-func (s *String) ReadASN1Boolean(out *bool) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.INTEGER) || len(bytes) != 1 {
- return false
- }
-
- switch bytes[0] {
- case 0:
- *out = false
- case 0xff:
- *out = true
- default:
- return false
- }
-
- return true
-}
-
-var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem()
-
-// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does
-// not point to an integer or to a big.Int, it panics. It returns true on
-// success and false on error.
-func (s *String) ReadASN1Integer(out interface{}) bool {
- if reflect.TypeOf(out).Kind() != reflect.Ptr {
- panic("out is not a pointer")
- }
- switch reflect.ValueOf(out).Elem().Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- var i int64
- if !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) {
- return false
- }
- reflect.ValueOf(out).Elem().SetInt(i)
- return true
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- var u uint64
- if !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) {
- return false
- }
- reflect.ValueOf(out).Elem().SetUint(u)
- return true
- case reflect.Struct:
- if reflect.TypeOf(out).Elem() == bigIntType {
- return s.readASN1BigInt(out.(*big.Int))
- }
- }
- panic("out does not point to an integer type")
-}
-
-func checkASN1Integer(bytes []byte) bool {
- if len(bytes) == 0 {
- // An INTEGER is encoded with at least one octet.
- return false
- }
- if len(bytes) == 1 {
- return true
- }
- if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 {
- // Value is not minimally encoded.
- return false
- }
- return true
-}
-
-var bigOne = big.NewInt(1)
-
-func (s *String) readASN1BigInt(out *big.Int) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {
- return false
- }
- if bytes[0]&0x80 == 0x80 {
- // Negative number.
- neg := make([]byte, len(bytes))
- for i, b := range bytes {
- neg[i] = ^b
- }
- out.SetBytes(neg)
- out.Add(out, bigOne)
- out.Neg(out)
- } else {
- out.SetBytes(bytes)
- }
- return true
-}
-
-func (s *String) readASN1Int64(out *int64) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {
- return false
- }
- return true
-}
-
-func asn1Signed(out *int64, n []byte) bool {
- length := len(n)
- if length > 8 {
- return false
- }
- for i := 0; i < length; i++ {
- *out <<= 8
- *out |= int64(n[i])
- }
- // Shift up and down in order to sign extend the result.
- *out <<= 64 - uint8(length)*8
- *out >>= 64 - uint8(length)*8
- return true
-}
-
-func (s *String) readASN1Uint64(out *uint64) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {
- return false
- }
- return true
-}
-
-func asn1Unsigned(out *uint64, n []byte) bool {
- length := len(n)
- if length > 9 || length == 9 && n[0] != 0 {
- // Too large for uint64.
- return false
- }
- if n[0]&0x80 != 0 {
- // Negative number.
- return false
- }
- for i := 0; i < length; i++ {
- *out <<= 8
- *out |= uint64(n[i])
- }
- return true
-}
-
-// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It returns
-// true on success and false on error.
-func (s *String) ReadASN1Enum(out *int) bool {
- var bytes String
- var i int64
- if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {
- return false
- }
- if int64(int(i)) != i {
- return false
- }
- *out = int(i)
- return true
-}
-
-func (s *String) readBase128Int(out *int) bool {
- ret := 0
- for i := 0; len(*s) > 0; i++ {
- if i == 4 {
- return false
- }
- ret <<= 7
- b := s.read(1)[0]
- ret |= int(b & 0x7f)
- if b&0x80 == 0 {
- *out = ret
- return true
- }
- }
- return false // truncated
-}
-
-// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and
-// advances. It returns true on success and false on error.
-func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 {
- return false
- }
-
- // In the worst case, we get two elements from the first byte (which is
- // encoded differently) and then every varint is a single byte long.
- components := make([]int, len(bytes)+1)
-
- // The first varint is 40*value1 + value2:
- // According to this packing, value1 can take the values 0, 1 and 2 only.
- // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2,
- // then there are no restrictions on value2.
- var v int
- if !bytes.readBase128Int(&v) {
- return false
- }
- if v < 80 {
- components[0] = v / 40
- components[1] = v % 40
- } else {
- components[0] = 2
- components[1] = v - 80
- }
-
- i := 2
- for ; len(bytes) > 0; i++ {
- if !bytes.readBase128Int(&v) {
- return false
- }
- components[i] = v
- }
- *out = components[:i]
- return true
-}
-
-// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and
-// advances. It returns true on success and false on error.
-func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.GeneralizedTime) {
- return false
- }
- t := string(bytes)
- res, err := time.Parse(generalizedTimeFormatStr, t)
- if err != nil {
- return false
- }
- if serialized := res.Format(generalizedTimeFormatStr); serialized != t {
- return false
- }
- *out = res
- return true
-}
-
-// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It
-// returns true on success and false on error.
-func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {
- return false
- }
-
- paddingBits := uint8(bytes[0])
- bytes = bytes[1:]
- if paddingBits > 7 ||
- len(bytes) == 0 && paddingBits != 0 ||
- len(bytes) > 0 && bytes[len(bytes)-1]&(1<<paddingBits-1) != 0 {
- return false
- }
-
- out.BitLength = len(bytes)*8 - int(paddingBits)
- out.Bytes = bytes
- return true
-}
-
-// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It is
-// an error if the BIT STRING is not a whole number of bytes. This function
-// returns true on success and false on error.
-func (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool {
- var bytes String
- if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {
- return false
- }
-
- paddingBits := uint8(bytes[0])
- if paddingBits != 0 {
- return false
- }
- *out = bytes[1:]
- return true
-}
-
-// ReadASN1Bytes reads the contents of a DER-encoded ASN.1 element (not including
-// tag and length bytes) into out, and advances. The element must match the
-// given tag. It returns true on success and false on error.
-func (s *String) ReadASN1Bytes(out *[]byte, tag asn1.Tag) bool {
- return s.ReadASN1((*String)(out), tag)
-}
-
-// ReadASN1 reads the contents of a DER-encoded ASN.1 element (not including
-// tag and length bytes) into out, and advances. The element must match the
-// given tag. It returns true on success and false on error.
-//
-// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadASN1(out *String, tag asn1.Tag) bool {
- var t asn1.Tag
- if !s.ReadAnyASN1(out, &t) || t != tag {
- return false
- }
- return true
-}
-
-// ReadASN1Element reads the contents of a DER-encoded ASN.1 element (including
-// tag and length bytes) into out, and advances. The element must match the
-// given tag. It returns true on success and false on error.
-//
-// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadASN1Element(out *String, tag asn1.Tag) bool {
- var t asn1.Tag
- if !s.ReadAnyASN1Element(out, &t) || t != tag {
- return false
- }
- return true
-}
-
-// ReadAnyASN1 reads the contents of a DER-encoded ASN.1 element (not including
-// tag and length bytes) into out, sets outTag to its tag, and advances. It
-// returns true on success and false on error.
-//
-// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadAnyASN1(out *String, outTag *asn1.Tag) bool {
- return s.readASN1(out, outTag, true /* skip header */)
-}
-
-// ReadAnyASN1Element reads the contents of a DER-encoded ASN.1 element
-// (including tag and length bytes) into out, sets outTag to is tag, and
-// advances. It returns true on success and false on error.
-//
-// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadAnyASN1Element(out *String, outTag *asn1.Tag) bool {
- return s.readASN1(out, outTag, false /* include header */)
-}
-
-// PeekASN1Tag returns true if the next ASN.1 value on the string starts with
-// the given tag.
-func (s String) PeekASN1Tag(tag asn1.Tag) bool {
- if len(s) == 0 {
- return false
- }
- return asn1.Tag(s[0]) == tag
-}
-
-// SkipASN1 reads and discards an ASN.1 element with the given tag.
-func (s *String) SkipASN1(tag asn1.Tag) bool {
- var unused String
- return s.ReadASN1(&unused, tag)
-}
-
-// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.1
-// element (not including tag and length bytes) tagged with the given tag into
-// out. It stores whether an element with the tag was found in outPresent,
-// unless outPresent is nil. It returns true on success and false on error.
-func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) bool {
- present := s.PeekASN1Tag(tag)
- if outPresent != nil {
- *outPresent = present
- }
- if present && !s.ReadASN1(out, tag) {
- return false
- }
- return true
-}
-
-// SkipOptionalASN1 advances s over an ASN.1 element with the given tag, or
-// else leaves s unchanged.
-func (s *String) SkipOptionalASN1(tag asn1.Tag) bool {
- if !s.PeekASN1Tag(tag) {
- return true
- }
- var unused String
- return s.ReadASN1(&unused, tag)
-}
-
-// ReadOptionalASN1Integer attempts to read an optional ASN.1 INTEGER
-// explicitly tagged with tag into out and advances. If no element with a
-// matching tag is present, it writes defaultValue into out instead. If out
-// does not point to an integer or to a big.Int, it panics. It returns true on
-// success and false on error.
-func (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultValue interface{}) bool {
- if reflect.TypeOf(out).Kind() != reflect.Ptr {
- panic("out is not a pointer")
- }
- var present bool
- var i String
- if !s.ReadOptionalASN1(&i, &present, tag) {
- return false
- }
- if !present {
- switch reflect.ValueOf(out).Elem().Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- reflect.ValueOf(out).Elem().Set(reflect.ValueOf(defaultValue))
- case reflect.Struct:
- if reflect.TypeOf(out).Elem() != bigIntType {
- panic("invalid integer type")
- }
- if reflect.TypeOf(defaultValue).Kind() != reflect.Ptr ||
- reflect.TypeOf(defaultValue).Elem() != bigIntType {
- panic("out points to big.Int, but defaultValue does not")
- }
- out.(*big.Int).Set(defaultValue.(*big.Int))
- default:
- panic("invalid integer type")
- }
- return true
- }
- if !i.ReadASN1Integer(out) || !i.Empty() {
- return false
- }
- return true
-}
-
-// ReadOptionalASN1OctetString attempts to read an optional ASN.1 OCTET STRING
-// explicitly tagged with tag into out and advances. If no element with a
-// matching tag is present, it writes defaultValue into out instead. It returns
-// true on success and false on error.
-func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool {
- var present bool
- var child String
- if !s.ReadOptionalASN1(&child, &present, tag) {
- return false
- }
- if outPresent != nil {
- *outPresent = present
- }
- if present {
- var oct String
- if !child.ReadASN1(&oct, asn1.OCTET_STRING) || !child.Empty() {
- return false
- }
- *out = oct
- } else {
- *out = nil
- }
- return true
-}
-
-// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or,
-// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue.
-func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool {
- var present bool
- var child String
- if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) {
- return false
- }
-
- if !present {
- *out = defaultValue
- return true
- }
-
- return s.ReadASN1Boolean(out)
-}
-
-func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {
- if len(*s) < 2 {
- return false
- }
- tag, lenByte := (*s)[0], (*s)[1]
-
- if tag&0x1f == 0x1f {
- // ITU-T X.690 section 8.1.2
- //
- // An identifier octet with a tag part of 0x1f indicates a high-tag-number
- // form identifier with two or more octets. We only support tags less than
- // 31 (i.e. low-tag-number form, single octet identifier).
- return false
- }
-
- if outTag != nil {
- *outTag = asn1.Tag(tag)
- }
-
- // ITU-T X.690 section 8.1.3
- //
- // Bit 8 of the first length byte indicates whether the length is short- or
- // long-form.
- var length, headerLen uint32 // length includes headerLen
- if lenByte&0x80 == 0 {
- // Short-form length (section 8.1.3.4), encoded in bits 1-7.
- length = uint32(lenByte) + 2
- headerLen = 2
- } else {
- // Long-form length (section 8.1.3.5). Bits 1-7 encode the number of octets
- // used to encode the length.
- lenLen := lenByte & 0x7f
- var len32 uint32
-
- if lenLen == 0 || lenLen > 4 || len(*s) < int(2+lenLen) {
- return false
- }
-
- lenBytes := String((*s)[2 : 2+lenLen])
- if !lenBytes.readUnsigned(&len32, int(lenLen)) {
- return false
- }
-
- // ITU-T X.690 section 10.1 (DER length forms) requires encoding the length
- // with the minimum number of octets.
- if len32 < 128 {
- // Length should have used short-form encoding.
- return false
- }
- if len32>>((lenLen-1)*8) == 0 {
- // Leading octet is 0. Length should have been at least one byte shorter.
- return false
- }
-
- headerLen = 2 + uint32(lenLen)
- if headerLen+len32 < len32 {
- // Overflow.
- return false
- }
- length = headerLen + len32
- }
-
- if uint32(int(length)) != length || !s.ReadBytes((*[]byte)(out), int(length)) {
- return false
- }
- if skipHeader && !out.Skip(int(headerLen)) {
- panic("cryptobyte: internal error")
- }
-
- return true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
deleted file mode 100644
index cda8e3edf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
+++ /dev/null
@@ -1,46 +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 file.
-
-// Package asn1 contains supporting types for parsing and building ASN.1
-// messages with the cryptobyte package.
-package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
-
-// Tag represents an ASN.1 identifier octet, consisting of a tag number
-// (indicating a type) and class (such as context-specific or constructed).
-//
-// Methods in the cryptobyte package only support the low-tag-number form, i.e.
-// a single identifier octet with bits 7-8 encoding the class and bits 1-6
-// encoding the tag number.
-type Tag uint8
-
-const (
- classConstructed = 0x20
- classContextSpecific = 0x80
-)
-
-// Constructed returns t with the constructed class bit set.
-func (t Tag) Constructed() Tag { return t | classConstructed }
-
-// ContextSpecific returns t with the context-specific class bit set.
-func (t Tag) ContextSpecific() Tag { return t | classContextSpecific }
-
-// The following is a list of standard tag and class combinations.
-const (
- BOOLEAN = Tag(1)
- INTEGER = Tag(2)
- BIT_STRING = Tag(3)
- OCTET_STRING = Tag(4)
- NULL = Tag(5)
- OBJECT_IDENTIFIER = Tag(6)
- ENUM = Tag(10)
- UTF8String = Tag(12)
- SEQUENCE = Tag(16 | classConstructed)
- SET = Tag(17 | classConstructed)
- PrintableString = Tag(19)
- T61String = Tag(20)
- IA5String = Tag(22)
- UTCTime = Tag(23)
- GeneralizedTime = Tag(24)
- GeneralString = Tag(27)
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go
deleted file mode 100644
index ee6674a2f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go
+++ /dev/null
@@ -1,300 +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 file.
-
-package cryptobyte
-
-import (
- "bytes"
- encoding_asn1 "encoding/asn1"
- "math/big"
- "reflect"
- "testing"
- "time"
-
- "golang.org/x/crypto/cryptobyte/asn1"
-)
-
-type readASN1Test struct {
- name string
- in []byte
- tag asn1.Tag
- ok bool
- out interface{}
-}
-
-var readASN1TestData = []readASN1Test{
- {"valid", []byte{0x30, 2, 1, 2}, 0x30, true, []byte{1, 2}},
- {"truncated", []byte{0x30, 3, 1, 2}, 0x30, false, nil},
- {"zero length of length", []byte{0x30, 0x80}, 0x30, false, nil},
- {"invalid long form length", []byte{0x30, 0x81, 1, 1}, 0x30, false, nil},
- {"non-minimal length", append([]byte{0x30, 0x82, 0, 0x80}, make([]byte, 0x80)...), 0x30, false, nil},
- {"invalid tag", []byte{0xa1, 3, 0x4, 1, 1}, 31, false, nil},
- {"high tag", []byte{0x1f, 0x81, 0x80, 0x01, 2, 1, 2}, 0xff /* actually 0x4001, but tag is uint8 */, false, nil},
-}
-
-func TestReadASN1(t *testing.T) {
- for _, test := range readASN1TestData {
- t.Run(test.name, func(t *testing.T) {
- var in, out String = test.in, nil
- ok := in.ReadASN1(&out, test.tag)
- if ok != test.ok || ok && !bytes.Equal(out, test.out.([]byte)) {
- t.Errorf("in.ReadASN1() = %v, want %v; out = %v, want %v", ok, test.ok, out, test.out)
- }
- })
- }
-}
-
-func TestReadASN1Optional(t *testing.T) {
- var empty String
- var present bool
- ok := empty.ReadOptionalASN1(nil, &present, 0xa0)
- if !ok || present {
- t.Errorf("empty.ReadOptionalASN1() = %v, want true; present = %v want false", ok, present)
- }
-
- var in, out String = []byte{0xa1, 3, 0x4, 1, 1}, nil
- ok = in.ReadOptionalASN1(&out, &present, 0xa0)
- if !ok || present {
- t.Errorf("in.ReadOptionalASN1() = %v, want true, present = %v, want false", ok, present)
- }
- ok = in.ReadOptionalASN1(&out, &present, 0xa1)
- wantBytes := []byte{4, 1, 1}
- if !ok || !present || !bytes.Equal(out, wantBytes) {
- t.Errorf("in.ReadOptionalASN1() = %v, want true; present = %v, want true; out = %v, want = %v", ok, present, out, wantBytes)
- }
-}
-
-var optionalOctetStringTestData = []struct {
- readASN1Test
- present bool
-}{
- {readASN1Test{"empty", []byte{}, 0xa0, true, []byte{}}, false},
- {readASN1Test{"invalid", []byte{0xa1, 3, 0x4, 2, 1}, 0xa1, false, []byte{}}, true},
- {readASN1Test{"missing", []byte{0xa1, 3, 0x4, 1, 1}, 0xa0, true, []byte{}}, false},
- {readASN1Test{"present", []byte{0xa1, 3, 0x4, 1, 1}, 0xa1, true, []byte{1}}, true},
-}
-
-func TestReadASN1OptionalOctetString(t *testing.T) {
- for _, test := range optionalOctetStringTestData {
- t.Run(test.name, func(t *testing.T) {
- in := String(test.in)
- var out []byte
- var present bool
- ok := in.ReadOptionalASN1OctetString(&out, &present, test.tag)
- if ok != test.ok || present != test.present || !bytes.Equal(out, test.out.([]byte)) {
- t.Errorf("in.ReadOptionalASN1OctetString() = %v, want %v; present = %v want %v; out = %v, want %v", ok, test.ok, present, test.present, out, test.out)
- }
- })
- }
-}
-
-const defaultInt = -1
-
-var optionalIntTestData = []readASN1Test{
- {"empty", []byte{}, 0xa0, true, defaultInt},
- {"invalid", []byte{0xa1, 3, 0x2, 2, 127}, 0xa1, false, 0},
- {"missing", []byte{0xa1, 3, 0x2, 1, 127}, 0xa0, true, defaultInt},
- {"present", []byte{0xa1, 3, 0x2, 1, 42}, 0xa1, true, 42},
-}
-
-func TestReadASN1OptionalInteger(t *testing.T) {
- for _, test := range optionalIntTestData {
- t.Run(test.name, func(t *testing.T) {
- in := String(test.in)
- var out int
- ok := in.ReadOptionalASN1Integer(&out, test.tag, defaultInt)
- if ok != test.ok || ok && out != test.out.(int) {
- t.Errorf("in.ReadOptionalASN1Integer() = %v, want %v; out = %v, want %v", ok, test.ok, out, test.out)
- }
- })
- }
-}
-
-func TestReadASN1IntegerSigned(t *testing.T) {
- testData64 := []struct {
- in []byte
- out int64
- }{
- {[]byte{2, 3, 128, 0, 0}, -0x800000},
- {[]byte{2, 2, 255, 0}, -256},
- {[]byte{2, 2, 255, 127}, -129},
- {[]byte{2, 1, 128}, -128},
- {[]byte{2, 1, 255}, -1},
- {[]byte{2, 1, 0}, 0},
- {[]byte{2, 1, 1}, 1},
- {[]byte{2, 1, 2}, 2},
- {[]byte{2, 1, 127}, 127},
- {[]byte{2, 2, 0, 128}, 128},
- {[]byte{2, 2, 1, 0}, 256},
- {[]byte{2, 4, 0, 128, 0, 0}, 0x800000},
- }
- for i, test := range testData64 {
- in := String(test.in)
- var out int64
- ok := in.ReadASN1Integer(&out)
- if !ok || out != test.out {
- t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out, test.out)
- }
- }
-
- // Repeat the same cases, reading into a big.Int.
- t.Run("big.Int", func(t *testing.T) {
- for i, test := range testData64 {
- in := String(test.in)
- var out big.Int
- ok := in.ReadASN1Integer(&out)
- if !ok || out.Int64() != test.out {
- t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out.Int64(), test.out)
- }
- }
- })
-}
-
-func TestReadASN1IntegerUnsigned(t *testing.T) {
- testData := []struct {
- in []byte
- out uint64
- }{
- {[]byte{2, 1, 0}, 0},
- {[]byte{2, 1, 1}, 1},
- {[]byte{2, 1, 2}, 2},
- {[]byte{2, 1, 127}, 127},
- {[]byte{2, 2, 0, 128}, 128},
- {[]byte{2, 2, 1, 0}, 256},
- {[]byte{2, 4, 0, 128, 0, 0}, 0x800000},
- {[]byte{2, 8, 127, 255, 255, 255, 255, 255, 255, 255}, 0x7fffffffffffffff},
- {[]byte{2, 9, 0, 128, 0, 0, 0, 0, 0, 0, 0}, 0x8000000000000000},
- {[]byte{2, 9, 0, 255, 255, 255, 255, 255, 255, 255, 255}, 0xffffffffffffffff},
- }
- for i, test := range testData {
- in := String(test.in)
- var out uint64
- ok := in.ReadASN1Integer(&out)
- if !ok || out != test.out {
- t.Errorf("#%d: in.ReadASN1Integer() = %v, want true; out = %d, want %d", i, ok, out, test.out)
- }
- }
-}
-
-func TestReadASN1IntegerInvalid(t *testing.T) {
- testData := []String{
- []byte{3, 1, 0}, // invalid tag
- // truncated
- []byte{2, 1},
- []byte{2, 2, 0},
- // not minimally encoded
- []byte{2, 2, 0, 1},
- []byte{2, 2, 0xff, 0xff},
- }
-
- for i, test := range testData {
- var out int64
- if test.ReadASN1Integer(&out) {
- t.Errorf("#%d: in.ReadASN1Integer() = true, want false (out = %d)", i, out)
- }
- }
-}
-
-func TestASN1ObjectIdentifier(t *testing.T) {
- testData := []struct {
- in []byte
- ok bool
- out []int
- }{
- {[]byte{}, false, []int{}},
- {[]byte{6, 0}, false, []int{}},
- {[]byte{5, 1, 85}, false, []int{2, 5}},
- {[]byte{6, 1, 85}, true, []int{2, 5}},
- {[]byte{6, 2, 85, 0x02}, true, []int{2, 5, 2}},
- {[]byte{6, 4, 85, 0x02, 0xc0, 0x00}, true, []int{2, 5, 2, 0x2000}},
- {[]byte{6, 3, 0x81, 0x34, 0x03}, true, []int{2, 100, 3}},
- {[]byte{6, 7, 85, 0x02, 0xc0, 0x80, 0x80, 0x80, 0x80}, false, []int{}},
- }
-
- for i, test := range testData {
- in := String(test.in)
- var out encoding_asn1.ObjectIdentifier
- ok := in.ReadASN1ObjectIdentifier(&out)
- if ok != test.ok || ok && !out.Equal(test.out) {
- t.Errorf("#%d: in.ReadASN1ObjectIdentifier() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out)
- continue
- }
-
- var b Builder
- b.AddASN1ObjectIdentifier(out)
- result, err := b.Bytes()
- if builderOk := err == nil; test.ok != builderOk {
- t.Errorf("#%d: error from Builder.Bytes: %s", i, err)
- continue
- }
- if test.ok && !bytes.Equal(result, test.in) {
- t.Errorf("#%d: reserialisation didn't match, got %x, want %x", i, result, test.in)
- continue
- }
- }
-}
-
-func TestReadASN1GeneralizedTime(t *testing.T) {
- testData := []struct {
- in string
- ok bool
- out time.Time
- }{
- {"20100102030405Z", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.UTC)},
- {"20100102030405", false, time.Time{}},
- {"20100102030405+0607", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.FixedZone("", 6*60*60+7*60))},
- {"20100102030405-0607", true, time.Date(2010, 01, 02, 03, 04, 05, 0, time.FixedZone("", -6*60*60-7*60))},
- /* These are invalid times. However, the time package normalises times
- * and they were accepted in some versions. See #11134. */
- {"00000100000000Z", false, time.Time{}},
- {"20101302030405Z", false, time.Time{}},
- {"20100002030405Z", false, time.Time{}},
- {"20100100030405Z", false, time.Time{}},
- {"20100132030405Z", false, time.Time{}},
- {"20100231030405Z", false, time.Time{}},
- {"20100102240405Z", false, time.Time{}},
- {"20100102036005Z", false, time.Time{}},
- {"20100102030460Z", false, time.Time{}},
- {"-20100102030410Z", false, time.Time{}},
- {"2010-0102030410Z", false, time.Time{}},
- {"2010-0002030410Z", false, time.Time{}},
- {"201001-02030410Z", false, time.Time{}},
- {"20100102-030410Z", false, time.Time{}},
- {"2010010203-0410Z", false, time.Time{}},
- {"201001020304-10Z", false, time.Time{}},
- }
- for i, test := range testData {
- in := String(append([]byte{byte(asn1.GeneralizedTime), byte(len(test.in))}, test.in...))
- var out time.Time
- ok := in.ReadASN1GeneralizedTime(&out)
- if ok != test.ok || ok && !reflect.DeepEqual(out, test.out) {
- t.Errorf("#%d: in.ReadASN1GeneralizedTime() = %v, want %v; out = %q, want %q", i, ok, test.ok, out, test.out)
- }
- }
-}
-
-func TestReadASN1BitString(t *testing.T) {
- testData := []struct {
- in []byte
- ok bool
- out encoding_asn1.BitString
- }{
- {[]byte{}, false, encoding_asn1.BitString{}},
- {[]byte{0x00}, true, encoding_asn1.BitString{}},
- {[]byte{0x07, 0x00}, true, encoding_asn1.BitString{Bytes: []byte{0}, BitLength: 1}},
- {[]byte{0x07, 0x01}, false, encoding_asn1.BitString{}},
- {[]byte{0x07, 0x40}, false, encoding_asn1.BitString{}},
- {[]byte{0x08, 0x00}, false, encoding_asn1.BitString{}},
- {[]byte{0xff}, false, encoding_asn1.BitString{}},
- {[]byte{0xfe, 0x00}, false, encoding_asn1.BitString{}},
- }
- for i, test := range testData {
- in := String(append([]byte{3, byte(len(test.in))}, test.in...))
- var out encoding_asn1.BitString
- ok := in.ReadASN1BitString(&out)
- if ok != test.ok || ok && (!bytes.Equal(out.Bytes, test.out.Bytes) || out.BitLength != test.out.BitLength) {
- t.Errorf("#%d: in.ReadASN1BitString() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/builder.go
deleted file mode 100644
index 29b4c7641..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/builder.go
+++ /dev/null
@@ -1,309 +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 file.
-
-package cryptobyte
-
-import (
- "errors"
- "fmt"
-)
-
-// A Builder builds byte strings from fixed-length and length-prefixed values.
-// Builders either allocate space as needed, or are ‘fixed’, which means that
-// they write into a given buffer and produce an error if it's exhausted.
-//
-// The zero value is a usable Builder that allocates space as needed.
-//
-// Simple values are marshaled and appended to a Builder using methods on the
-// Builder. Length-prefixed values are marshaled by providing a
-// BuilderContinuation, which is a function that writes the inner contents of
-// the value to a given Builder. See the documentation for BuilderContinuation
-// for details.
-type Builder struct {
- err error
- result []byte
- fixedSize bool
- child *Builder
- offset int
- pendingLenLen int
- pendingIsASN1 bool
- inContinuation *bool
-}
-
-// NewBuilder creates a Builder that appends its output to the given buffer.
-// Like append(), the slice will be reallocated if its capacity is exceeded.
-// Use Bytes to get the final buffer.
-func NewBuilder(buffer []byte) *Builder {
- return &Builder{
- result: buffer,
- }
-}
-
-// NewFixedBuilder creates a Builder that appends its output into the given
-// buffer. This builder does not reallocate the output buffer. Writes that
-// would exceed the buffer's capacity are treated as an error.
-func NewFixedBuilder(buffer []byte) *Builder {
- return &Builder{
- result: buffer,
- fixedSize: true,
- }
-}
-
-// Bytes returns the bytes written by the builder or an error if one has
-// occurred during during building.
-func (b *Builder) Bytes() ([]byte, error) {
- if b.err != nil {
- return nil, b.err
- }
- return b.result[b.offset:], nil
-}
-
-// BytesOrPanic returns the bytes written by the builder or panics if an error
-// has occurred during building.
-func (b *Builder) BytesOrPanic() []byte {
- if b.err != nil {
- panic(b.err)
- }
- return b.result[b.offset:]
-}
-
-// AddUint8 appends an 8-bit value to the byte string.
-func (b *Builder) AddUint8(v uint8) {
- b.add(byte(v))
-}
-
-// AddUint16 appends a big-endian, 16-bit value to the byte string.
-func (b *Builder) AddUint16(v uint16) {
- b.add(byte(v>>8), byte(v))
-}
-
-// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest
-// byte of the 32-bit input value is silently truncated.
-func (b *Builder) AddUint24(v uint32) {
- b.add(byte(v>>16), byte(v>>8), byte(v))
-}
-
-// AddUint32 appends a big-endian, 32-bit value to the byte string.
-func (b *Builder) AddUint32(v uint32) {
- b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
-}
-
-// AddBytes appends a sequence of bytes to the byte string.
-func (b *Builder) AddBytes(v []byte) {
- b.add(v...)
-}
-
-// BuilderContinuation is continuation-passing interface for building
-// length-prefixed byte sequences. Builder methods for length-prefixed
-// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation
-// supplied to them. The child builder passed to the continuation can be used
-// to build the content of the length-prefixed sequence. For example:
-//
-// parent := cryptobyte.NewBuilder()
-// parent.AddUint8LengthPrefixed(func (child *Builder) {
-// child.AddUint8(42)
-// child.AddUint8LengthPrefixed(func (grandchild *Builder) {
-// grandchild.AddUint8(5)
-// })
-// })
-//
-// It is an error to write more bytes to the child than allowed by the reserved
-// length prefix. After the continuation returns, the child must be considered
-// invalid, i.e. users must not store any copies or references of the child
-// that outlive the continuation.
-//
-// If the continuation panics with a value of type BuildError then the inner
-// error will be returned as the error from Bytes. If the child panics
-// otherwise then Bytes will repanic with the same value.
-type BuilderContinuation func(child *Builder)
-
-// BuildError wraps an error. If a BuilderContinuation panics with this value,
-// the panic will be recovered and the inner error will be returned from
-// Builder.Bytes.
-type BuildError struct {
- Err error
-}
-
-// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence.
-func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) {
- b.addLengthPrefixed(1, false, f)
-}
-
-// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence.
-func (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) {
- b.addLengthPrefixed(2, false, f)
-}
-
-// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence.
-func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) {
- b.addLengthPrefixed(3, false, f)
-}
-
-// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence.
-func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) {
- b.addLengthPrefixed(4, false, f)
-}
-
-func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) {
- if !*b.inContinuation {
- *b.inContinuation = true
-
- defer func() {
- *b.inContinuation = false
-
- r := recover()
- if r == nil {
- return
- }
-
- if buildError, ok := r.(BuildError); ok {
- b.err = buildError.Err
- } else {
- panic(r)
- }
- }()
- }
-
- f(arg)
-}
-
-func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) {
- // Subsequent writes can be ignored if the builder has encountered an error.
- if b.err != nil {
- return
- }
-
- offset := len(b.result)
- b.add(make([]byte, lenLen)...)
-
- if b.inContinuation == nil {
- b.inContinuation = new(bool)
- }
-
- b.child = &Builder{
- result: b.result,
- fixedSize: b.fixedSize,
- offset: offset,
- pendingLenLen: lenLen,
- pendingIsASN1: isASN1,
- inContinuation: b.inContinuation,
- }
-
- b.callContinuation(f, b.child)
- b.flushChild()
- if b.child != nil {
- panic("cryptobyte: internal error")
- }
-}
-
-func (b *Builder) flushChild() {
- if b.child == nil {
- return
- }
- b.child.flushChild()
- child := b.child
- b.child = nil
-
- if child.err != nil {
- b.err = child.err
- return
- }
-
- length := len(child.result) - child.pendingLenLen - child.offset
-
- if length < 0 {
- panic("cryptobyte: internal error") // result unexpectedly shrunk
- }
-
- if child.pendingIsASN1 {
- // For ASN.1, we reserved a single byte for the length. If that turned out
- // to be incorrect, we have to move the contents along in order to make
- // space.
- if child.pendingLenLen != 1 {
- panic("cryptobyte: internal error")
- }
- var lenLen, lenByte uint8
- if int64(length) > 0xfffffffe {
- b.err = errors.New("pending ASN.1 child too long")
- return
- } else if length > 0xffffff {
- lenLen = 5
- lenByte = 0x80 | 4
- } else if length > 0xffff {
- lenLen = 4
- lenByte = 0x80 | 3
- } else if length > 0xff {
- lenLen = 3
- lenByte = 0x80 | 2
- } else if length > 0x7f {
- lenLen = 2
- lenByte = 0x80 | 1
- } else {
- lenLen = 1
- lenByte = uint8(length)
- length = 0
- }
-
- // Insert the initial length byte, make space for successive length bytes,
- // and adjust the offset.
- child.result[child.offset] = lenByte
- extraBytes := int(lenLen - 1)
- if extraBytes != 0 {
- child.add(make([]byte, extraBytes)...)
- childStart := child.offset + child.pendingLenLen
- copy(child.result[childStart+extraBytes:], child.result[childStart:])
- }
- child.offset++
- child.pendingLenLen = extraBytes
- }
-
- l := length
- for i := child.pendingLenLen - 1; i >= 0; i-- {
- child.result[child.offset+i] = uint8(l)
- l >>= 8
- }
- if l != 0 {
- b.err = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", length, child.pendingLenLen)
- return
- }
-
- if !b.fixedSize {
- b.result = child.result // In case child reallocated result.
- }
-}
-
-func (b *Builder) add(bytes ...byte) {
- if b.err != nil {
- return
- }
- if b.child != nil {
- panic("attempted write while child is pending")
- }
- if len(b.result)+len(bytes) < len(bytes) {
- b.err = errors.New("cryptobyte: length overflow")
- }
- if b.fixedSize && len(b.result)+len(bytes) > cap(b.result) {
- b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer")
- return
- }
- b.result = append(b.result, bytes...)
-}
-
-// A MarshalingValue marshals itself into a Builder.
-type MarshalingValue interface {
- // Marshal is called by Builder.AddValue. It receives a pointer to a builder
- // to marshal itself into. It may return an error that occurred during
- // marshaling, such as unset or invalid values.
- Marshal(b *Builder) error
-}
-
-// AddValue calls Marshal on v, passing a pointer to the builder to append to.
-// If Marshal returns an error, it is set on the Builder so that subsequent
-// appends don't have an effect.
-func (b *Builder) AddValue(v MarshalingValue) {
- err := v.Marshal(b)
- if err != nil {
- b.err = err
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go
deleted file mode 100644
index f294dd552..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go
+++ /dev/null
@@ -1,428 +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 file.
-
-package cryptobyte
-
-import (
- "bytes"
- "errors"
- "fmt"
- "testing"
-)
-
-func builderBytesEq(b *Builder, want ...byte) error {
- got := b.BytesOrPanic()
- if !bytes.Equal(got, want) {
- return fmt.Errorf("Bytes() = %v, want %v", got, want)
- }
- return nil
-}
-
-func TestContinuationError(t *testing.T) {
- const errorStr = "TestContinuationError"
- var b Builder
- b.AddUint8LengthPrefixed(func(b *Builder) {
- b.AddUint8(1)
- panic(BuildError{Err: errors.New(errorStr)})
- })
-
- ret, err := b.Bytes()
- if ret != nil {
- t.Error("expected nil result")
- }
- if err == nil {
- t.Fatal("unexpected nil error")
- }
- if s := err.Error(); s != errorStr {
- t.Errorf("expected error %q, got %v", errorStr, s)
- }
-}
-
-func TestContinuationNonError(t *testing.T) {
- defer func() {
- recover()
- }()
-
- var b Builder
- b.AddUint8LengthPrefixed(func(b *Builder) {
- b.AddUint8(1)
- panic(1)
- })
-
- t.Error("Builder did not panic")
-}
-
-func TestGeneratedPanic(t *testing.T) {
- defer func() {
- recover()
- }()
-
- var b Builder
- b.AddUint8LengthPrefixed(func(b *Builder) {
- var p *byte
- *p = 0
- })
-
- t.Error("Builder did not panic")
-}
-
-func TestBytes(t *testing.T) {
- var b Builder
- v := []byte("foobarbaz")
- b.AddBytes(v[0:3])
- b.AddBytes(v[3:4])
- b.AddBytes(v[4:9])
- if err := builderBytesEq(&b, v...); err != nil {
- t.Error(err)
- }
- s := String(b.BytesOrPanic())
- for _, w := range []string{"foo", "bar", "baz"} {
- var got []byte
- if !s.ReadBytes(&got, 3) {
- t.Errorf("ReadBytes() = false, want true (w = %v)", w)
- }
- want := []byte(w)
- if !bytes.Equal(got, want) {
- t.Errorf("ReadBytes(): got = %v, want %v", got, want)
- }
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUint8(t *testing.T) {
- var b Builder
- b.AddUint8(42)
- if err := builderBytesEq(&b, 42); err != nil {
- t.Error(err)
- }
-
- var s String = b.BytesOrPanic()
- var v uint8
- if !s.ReadUint8(&v) {
- t.Error("ReadUint8() = false, want true")
- }
- if v != 42 {
- t.Errorf("v = %d, want 42", v)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUint16(t *testing.T) {
- var b Builder
- b.AddUint16(65534)
- if err := builderBytesEq(&b, 255, 254); err != nil {
- t.Error(err)
- }
- var s String = b.BytesOrPanic()
- var v uint16
- if !s.ReadUint16(&v) {
- t.Error("ReadUint16() == false, want true")
- }
- if v != 65534 {
- t.Errorf("v = %d, want 65534", v)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUint24(t *testing.T) {
- var b Builder
- b.AddUint24(0xfffefd)
- if err := builderBytesEq(&b, 255, 254, 253); err != nil {
- t.Error(err)
- }
-
- var s String = b.BytesOrPanic()
- var v uint32
- if !s.ReadUint24(&v) {
- t.Error("ReadUint8() = false, want true")
- }
- if v != 0xfffefd {
- t.Errorf("v = %d, want fffefd", v)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUint24Truncation(t *testing.T) {
- var b Builder
- b.AddUint24(0x10111213)
- if err := builderBytesEq(&b, 0x11, 0x12, 0x13); err != nil {
- t.Error(err)
- }
-}
-
-func TestUint32(t *testing.T) {
- var b Builder
- b.AddUint32(0xfffefdfc)
- if err := builderBytesEq(&b, 255, 254, 253, 252); err != nil {
- t.Error(err)
- }
-
- var s String = b.BytesOrPanic()
- var v uint32
- if !s.ReadUint32(&v) {
- t.Error("ReadUint8() = false, want true")
- }
- if v != 0xfffefdfc {
- t.Errorf("v = %x, want fffefdfc", v)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUMultiple(t *testing.T) {
- var b Builder
- b.AddUint8(23)
- b.AddUint32(0xfffefdfc)
- b.AddUint16(42)
- if err := builderBytesEq(&b, 23, 255, 254, 253, 252, 0, 42); err != nil {
- t.Error(err)
- }
-
- var s String = b.BytesOrPanic()
- var (
- x uint8
- y uint32
- z uint16
- )
- if !s.ReadUint8(&x) || !s.ReadUint32(&y) || !s.ReadUint16(&z) {
- t.Error("ReadUint8() = false, want true")
- }
- if x != 23 || y != 0xfffefdfc || z != 42 {
- t.Errorf("x, y, z = %d, %d, %d; want 23, 4294901244, 5", x, y, z)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
-}
-
-func TestUint8LengthPrefixedSimple(t *testing.T) {
- var b Builder
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8(23)
- c.AddUint8(42)
- })
- if err := builderBytesEq(&b, 2, 23, 42); err != nil {
- t.Error(err)
- }
-
- var base, child String = b.BytesOrPanic(), nil
- var x, y uint8
- if !base.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&x) ||
- !child.ReadUint8(&y) {
- t.Error("parsing failed")
- }
- if x != 23 || y != 42 {
- t.Errorf("want x, y == 23, 42; got %d, %d", x, y)
- }
- if len(base) != 0 {
- t.Errorf("len(base) = %d, want 0", len(base))
- }
- if len(child) != 0 {
- t.Errorf("len(child) = %d, want 0", len(child))
- }
-}
-
-func TestUint8LengthPrefixedMulti(t *testing.T) {
- var b Builder
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8(23)
- c.AddUint8(42)
- })
- b.AddUint8(5)
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8(123)
- c.AddUint8(234)
- })
- if err := builderBytesEq(&b, 2, 23, 42, 5, 2, 123, 234); err != nil {
- t.Error(err)
- }
-
- var s, child String = b.BytesOrPanic(), nil
- var u, v, w, x, y uint8
- if !s.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&u) || !child.ReadUint8(&v) ||
- !s.ReadUint8(&w) || !s.ReadUint8LengthPrefixed(&child) || !child.ReadUint8(&x) || !child.ReadUint8(&y) {
- t.Error("parsing failed")
- }
- if u != 23 || v != 42 || w != 5 || x != 123 || y != 234 {
- t.Errorf("u, v, w, x, y = %d, %d, %d, %d, %d; want 23, 42, 5, 123, 234",
- u, v, w, x, y)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
- if len(child) != 0 {
- t.Errorf("len(child) = %d, want 0", len(child))
- }
-}
-
-func TestUint8LengthPrefixedNested(t *testing.T) {
- var b Builder
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8(5)
- c.AddUint8LengthPrefixed(func(d *Builder) {
- d.AddUint8(23)
- d.AddUint8(42)
- })
- c.AddUint8(123)
- })
- if err := builderBytesEq(&b, 5, 5, 2, 23, 42, 123); err != nil {
- t.Error(err)
- }
-
- var base, child1, child2 String = b.BytesOrPanic(), nil, nil
- var u, v, w, x uint8
- if !base.ReadUint8LengthPrefixed(&child1) {
- t.Error("parsing base failed")
- }
- if !child1.ReadUint8(&u) || !child1.ReadUint8LengthPrefixed(&child2) || !child1.ReadUint8(&x) {
- t.Error("parsing child1 failed")
- }
- if !child2.ReadUint8(&v) || !child2.ReadUint8(&w) {
- t.Error("parsing child2 failed")
- }
- if u != 5 || v != 23 || w != 42 || x != 123 {
- t.Errorf("u, v, w, x = %d, %d, %d, %d, want 5, 23, 42, 123",
- u, v, w, x)
- }
- if len(base) != 0 {
- t.Errorf("len(base) = %d, want 0", len(base))
- }
- if len(child1) != 0 {
- t.Errorf("len(child1) = %d, want 0", len(child1))
- }
- if len(base) != 0 {
- t.Errorf("len(child2) = %d, want 0", len(child2))
- }
-}
-
-func TestPreallocatedBuffer(t *testing.T) {
- var buf [5]byte
- b := NewBuilder(buf[0:0])
- b.AddUint8(1)
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8(3)
- c.AddUint8(4)
- })
- b.AddUint16(1286) // Outgrow buf by one byte.
- want := []byte{1, 2, 3, 4, 0}
- if !bytes.Equal(buf[:], want) {
- t.Errorf("buf = %v want %v", buf, want)
- }
- if err := builderBytesEq(b, 1, 2, 3, 4, 5, 6); err != nil {
- t.Error(err)
- }
-}
-
-func TestWriteWithPendingChild(t *testing.T) {
- var b Builder
- b.AddUint8LengthPrefixed(func(c *Builder) {
- c.AddUint8LengthPrefixed(func(d *Builder) {
- defer func() {
- if recover() == nil {
- t.Errorf("recover() = nil, want error; c.AddUint8() did not panic")
- }
- }()
- c.AddUint8(2) // panics
-
- defer func() {
- if recover() == nil {
- t.Errorf("recover() = nil, want error; b.AddUint8() did not panic")
- }
- }()
- b.AddUint8(2) // panics
- })
-
- defer func() {
- if recover() == nil {
- t.Errorf("recover() = nil, want error; b.AddUint8() did not panic")
- }
- }()
- b.AddUint8(2) // panics
- })
-}
-
-// ASN.1
-
-func TestASN1Int64(t *testing.T) {
- tests := []struct {
- in int64
- want []byte
- }{
- {-0x800000, []byte{2, 3, 128, 0, 0}},
- {-256, []byte{2, 2, 255, 0}},
- {-129, []byte{2, 2, 255, 127}},
- {-128, []byte{2, 1, 128}},
- {-1, []byte{2, 1, 255}},
- {0, []byte{2, 1, 0}},
- {1, []byte{2, 1, 1}},
- {2, []byte{2, 1, 2}},
- {127, []byte{2, 1, 127}},
- {128, []byte{2, 2, 0, 128}},
- {256, []byte{2, 2, 1, 0}},
- {0x800000, []byte{2, 4, 0, 128, 0, 0}},
- }
- for i, tt := range tests {
- var b Builder
- b.AddASN1Int64(tt.in)
- if err := builderBytesEq(&b, tt.want...); err != nil {
- t.Errorf("%v, (i = %d; in = %v)", err, i, tt.in)
- }
-
- var n int64
- s := String(b.BytesOrPanic())
- ok := s.ReadASN1Integer(&n)
- if !ok || n != tt.in {
- t.Errorf("s.ReadASN1Integer(&n) = %v, n = %d; want true, n = %d (i = %d)",
- ok, n, tt.in, i)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
- }
-}
-
-func TestASN1Uint64(t *testing.T) {
- tests := []struct {
- in uint64
- want []byte
- }{
- {0, []byte{2, 1, 0}},
- {1, []byte{2, 1, 1}},
- {2, []byte{2, 1, 2}},
- {127, []byte{2, 1, 127}},
- {128, []byte{2, 2, 0, 128}},
- {256, []byte{2, 2, 1, 0}},
- {0x800000, []byte{2, 4, 0, 128, 0, 0}},
- {0x7fffffffffffffff, []byte{2, 8, 127, 255, 255, 255, 255, 255, 255, 255}},
- {0x8000000000000000, []byte{2, 9, 0, 128, 0, 0, 0, 0, 0, 0, 0}},
- {0xffffffffffffffff, []byte{2, 9, 0, 255, 255, 255, 255, 255, 255, 255, 255}},
- }
- for i, tt := range tests {
- var b Builder
- b.AddASN1Uint64(tt.in)
- if err := builderBytesEq(&b, tt.want...); err != nil {
- t.Errorf("%v, (i = %d; in = %v)", err, i, tt.in)
- }
-
- var n uint64
- s := String(b.BytesOrPanic())
- ok := s.ReadASN1Integer(&n)
- if !ok || n != tt.in {
- t.Errorf("s.ReadASN1Integer(&n) = %v, n = %d; want true, n = %d (i = %d)",
- ok, n, tt.in, i)
- }
- if len(s) != 0 {
- t.Errorf("len(s) = %d, want 0", len(s))
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/example_test.go
deleted file mode 100644
index 86c098adf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/example_test.go
+++ /dev/null
@@ -1,154 +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 file.
-
-package cryptobyte_test
-
-import (
- "errors"
- "fmt"
-
- "golang.org/x/crypto/cryptobyte"
- "golang.org/x/crypto/cryptobyte/asn1"
-)
-
-func ExampleString_lengthPrefixed() {
- // This is an example of parsing length-prefixed data (as found in, for
- // example, TLS). Imagine a 16-bit prefixed series of 8-bit prefixed
- // strings.
-
- input := cryptobyte.String([]byte{0, 12, 5, 'h', 'e', 'l', 'l', 'o', 5, 'w', 'o', 'r', 'l', 'd'})
- var result []string
-
- var values cryptobyte.String
- if !input.ReadUint16LengthPrefixed(&values) ||
- !input.Empty() {
- panic("bad format")
- }
-
- for !values.Empty() {
- var value cryptobyte.String
- if !values.ReadUint8LengthPrefixed(&value) {
- panic("bad format")
- }
-
- result = append(result, string(value))
- }
-
- // Output: []string{"hello", "world"}
- fmt.Printf("%#v\n", result)
-}
-
-func ExampleString_aSN1() {
- // This is an example of parsing ASN.1 data that looks like:
- // Foo ::= SEQUENCE {
- // version [6] INTEGER DEFAULT 0
- // data OCTET STRING
- // }
-
- input := cryptobyte.String([]byte{0x30, 12, 0xa6, 3, 2, 1, 2, 4, 5, 'h', 'e', 'l', 'l', 'o'})
-
- var (
- version int64
- data, inner, versionBytes cryptobyte.String
- haveVersion bool
- )
- if !input.ReadASN1(&inner, asn1.SEQUENCE) ||
- !input.Empty() ||
- !inner.ReadOptionalASN1(&versionBytes, &haveVersion, asn1.Tag(6).Constructed().ContextSpecific()) ||
- (haveVersion && !versionBytes.ReadASN1Integer(&version)) ||
- (haveVersion && !versionBytes.Empty()) ||
- !inner.ReadASN1(&data, asn1.OCTET_STRING) ||
- !inner.Empty() {
- panic("bad format")
- }
-
- // Output: haveVersion: true, version: 2, data: hello
- fmt.Printf("haveVersion: %t, version: %d, data: %s\n", haveVersion, version, string(data))
-}
-
-func ExampleBuilder_aSN1() {
- // This is an example of building ASN.1 data that looks like:
- // Foo ::= SEQUENCE {
- // version [6] INTEGER DEFAULT 0
- // data OCTET STRING
- // }
-
- version := int64(2)
- data := []byte("hello")
- const defaultVersion = 0
-
- var b cryptobyte.Builder
- b.AddASN1(asn1.SEQUENCE, func(b *cryptobyte.Builder) {
- if version != defaultVersion {
- b.AddASN1(asn1.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) {
- b.AddASN1Int64(version)
- })
- }
- b.AddASN1OctetString(data)
- })
-
- result, err := b.Bytes()
- if err != nil {
- panic(err)
- }
-
- // Output: 300ca603020102040568656c6c6f
- fmt.Printf("%x\n", result)
-}
-
-func ExampleBuilder_lengthPrefixed() {
- // This is an example of building length-prefixed data (as found in,
- // for example, TLS). Imagine a 16-bit prefixed series of 8-bit
- // prefixed strings.
- input := []string{"hello", "world"}
-
- var b cryptobyte.Builder
- b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
- for _, value := range input {
- b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) {
- b.AddBytes([]byte(value))
- })
- }
- })
-
- result, err := b.Bytes()
- if err != nil {
- panic(err)
- }
-
- // Output: 000c0568656c6c6f05776f726c64
- fmt.Printf("%x\n", result)
-}
-
-func ExampleBuilder_lengthPrefixOverflow() {
- // Writing more data that can be expressed by the length prefix results
- // in an error from Bytes().
-
- tooLarge := make([]byte, 256)
-
- var b cryptobyte.Builder
- b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) {
- b.AddBytes(tooLarge)
- })
-
- result, err := b.Bytes()
- fmt.Printf("len=%d err=%s\n", len(result), err)
-
- // Output: len=0 err=cryptobyte: pending child length 256 exceeds 1-byte length prefix
-}
-
-func ExampleBuilderContinuation_errorHandling() {
- var b cryptobyte.Builder
- // Continuations that panic with a BuildError will cause Bytes to
- // return the inner error.
- b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
- b.AddUint32(0)
- panic(cryptobyte.BuildError{Err: errors.New("example error")})
- })
-
- result, err := b.Bytes()
- fmt.Printf("len=%d err=%s\n", len(result), err)
-
- // Output: len=0 err=example error
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/string.go
deleted file mode 100644
index 7636fb9c8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/cryptobyte/string.go
+++ /dev/null
@@ -1,167 +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 file.
-
-// Package cryptobyte contains types that help with parsing and constructing
-// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage
-// contains useful ASN.1 constants.)
-//
-// The String type is for parsing. It wraps a []byte slice and provides helper
-// functions for consuming structures, value by value.
-//
-// The Builder type is for constructing messages. It providers helper functions
-// for appending values and also for appending length-prefixed submessages –
-// without having to worry about calculating the length prefix ahead of time.
-//
-// See the documentation and examples for the Builder and String types to get
-// started.
-package cryptobyte // import "golang.org/x/crypto/cryptobyte"
-
-// String represents a string of bytes. It provides methods for parsing
-// fixed-length and length-prefixed values from it.
-type String []byte
-
-// read advances a String by n bytes and returns them. If less than n bytes
-// remain, it returns nil.
-func (s *String) read(n int) []byte {
- if len(*s) < n {
- return nil
- }
- v := (*s)[:n]
- *s = (*s)[n:]
- return v
-}
-
-// Skip advances the String by n byte and reports whether it was successful.
-func (s *String) Skip(n int) bool {
- return s.read(n) != nil
-}
-
-// ReadUint8 decodes an 8-bit value into out and advances over it. It
-// returns true on success and false on error.
-func (s *String) ReadUint8(out *uint8) bool {
- v := s.read(1)
- if v == nil {
- return false
- }
- *out = uint8(v[0])
- return true
-}
-
-// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it.
-// It returns true on success and false on error.
-func (s *String) ReadUint16(out *uint16) bool {
- v := s.read(2)
- if v == nil {
- return false
- }
- *out = uint16(v[0])<<8 | uint16(v[1])
- return true
-}
-
-// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it.
-// It returns true on success and false on error.
-func (s *String) ReadUint24(out *uint32) bool {
- v := s.read(3)
- if v == nil {
- return false
- }
- *out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2])
- return true
-}
-
-// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it.
-// It returns true on success and false on error.
-func (s *String) ReadUint32(out *uint32) bool {
- v := s.read(4)
- if v == nil {
- return false
- }
- *out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3])
- return true
-}
-
-func (s *String) readUnsigned(out *uint32, length int) bool {
- v := s.read(length)
- if v == nil {
- return false
- }
- var result uint32
- for i := 0; i < length; i++ {
- result <<= 8
- result |= uint32(v[i])
- }
- *out = result
- return true
-}
-
-func (s *String) readLengthPrefixed(lenLen int, outChild *String) bool {
- lenBytes := s.read(lenLen)
- if lenBytes == nil {
- return false
- }
- var length uint32
- for _, b := range lenBytes {
- length = length << 8
- length = length | uint32(b)
- }
- if int(length) < 0 {
- // This currently cannot overflow because we read uint24 at most, but check
- // anyway in case that changes in the future.
- return false
- }
- v := s.read(int(length))
- if v == nil {
- return false
- }
- *outChild = v
- return true
-}
-
-// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value
-// into out and advances over it. It returns true on success and false on
-// error.
-func (s *String) ReadUint8LengthPrefixed(out *String) bool {
- return s.readLengthPrefixed(1, out)
-}
-
-// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit
-// length-prefixed value into out and advances over it. It returns true on
-// success and false on error.
-func (s *String) ReadUint16LengthPrefixed(out *String) bool {
- return s.readLengthPrefixed(2, out)
-}
-
-// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit
-// length-prefixed value into out and advances over it. It returns true on
-// success and false on error.
-func (s *String) ReadUint24LengthPrefixed(out *String) bool {
- return s.readLengthPrefixed(3, out)
-}
-
-// ReadBytes reads n bytes into out and advances over them. It returns true on
-// success and false and error.
-func (s *String) ReadBytes(out *[]byte, n int) bool {
- v := s.read(n)
- if v == nil {
- return false
- }
- *out = v
- return true
-}
-
-// CopyBytes copies len(out) bytes into out and advances over them. It returns
-// true on success and false on error.
-func (s *String) CopyBytes(out []byte) bool {
- n := len(out)
- v := s.read(n)
- if v == nil {
- return false
- }
- return copy(out, v) == n
-}
-
-// Empty reports whether the string does not contain any bytes.
-func (s String) Empty() bool {
- return len(s) == 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.h b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.h
deleted file mode 100644
index b3f74162f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-#define REDMASK51 0x0007FFFFFFFFFFFF
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.s
deleted file mode 100644
index ee7b4bd5f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/const_amd64.s
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-// These constants cannot be encoded in non-MOVQ immediates.
-// We access them directly from memory instead.
-
-DATA ·_121666_213(SB)/8, $996687872
-GLOBL ·_121666_213(SB), 8, $8
-
-DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA
-GLOBL ·_2P0(SB), 8, $8
-
-DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE
-GLOBL ·_2P1234(SB), 8, $8
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
deleted file mode 100644
index cd793a5b5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-// func cswap(inout *[4][5]uint64, v uint64)
-TEXT ·cswap(SB),7,$0
- MOVQ inout+0(FP),DI
- MOVQ v+8(FP),SI
-
- SUBQ $1, SI
- NOTQ SI
- MOVQ SI, X15
- PSHUFD $0x44, X15, X15
-
- MOVOU 0(DI), X0
- MOVOU 16(DI), X2
- MOVOU 32(DI), X4
- MOVOU 48(DI), X6
- MOVOU 64(DI), X8
- MOVOU 80(DI), X1
- MOVOU 96(DI), X3
- MOVOU 112(DI), X5
- MOVOU 128(DI), X7
- MOVOU 144(DI), X9
-
- MOVO X1, X10
- MOVO X3, X11
- MOVO X5, X12
- MOVO X7, X13
- MOVO X9, X14
-
- PXOR X0, X10
- PXOR X2, X11
- PXOR X4, X12
- PXOR X6, X13
- PXOR X8, X14
- PAND X15, X10
- PAND X15, X11
- PAND X15, X12
- PAND X15, X13
- PAND X15, X14
- PXOR X10, X0
- PXOR X10, X1
- PXOR X11, X2
- PXOR X11, X3
- PXOR X12, X4
- PXOR X12, X5
- PXOR X13, X6
- PXOR X13, X7
- PXOR X14, X8
- PXOR X14, X9
-
- MOVOU X0, 0(DI)
- MOVOU X2, 16(DI)
- MOVOU X4, 32(DI)
- MOVOU X6, 48(DI)
- MOVOU X8, 64(DI)
- MOVOU X1, 80(DI)
- MOVOU X3, 96(DI)
- MOVOU X5, 112(DI)
- MOVOU X7, 128(DI)
- MOVOU X9, 144(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519.go
deleted file mode 100644
index cb8fbc57b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519.go
+++ /dev/null
@@ -1,834 +0,0 @@
-// Copyright 2013 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 file.
-
-// We have an implementation in amd64 assembly so this code is only run on
-// non-amd64 platforms. The amd64 assembly does not support gccgo.
-// +build !amd64 gccgo appengine
-
-package curve25519
-
-import (
- "encoding/binary"
-)
-
-// This code is a port of the public domain, "ref10" implementation of
-// curve25519 from SUPERCOP 20130419 by D. J. Bernstein.
-
-// fieldElement represents an element of the field GF(2^255 - 19). An element
-// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
-// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
-// context.
-type fieldElement [10]int32
-
-func feZero(fe *fieldElement) {
- for i := range fe {
- fe[i] = 0
- }
-}
-
-func feOne(fe *fieldElement) {
- feZero(fe)
- fe[0] = 1
-}
-
-func feAdd(dst, a, b *fieldElement) {
- for i := range dst {
- dst[i] = a[i] + b[i]
- }
-}
-
-func feSub(dst, a, b *fieldElement) {
- for i := range dst {
- dst[i] = a[i] - b[i]
- }
-}
-
-func feCopy(dst, src *fieldElement) {
- for i := range dst {
- dst[i] = src[i]
- }
-}
-
-// feCSwap replaces (f,g) with (g,f) if b == 1; replaces (f,g) with (f,g) if b == 0.
-//
-// Preconditions: b in {0,1}.
-func feCSwap(f, g *fieldElement, b int32) {
- b = -b
- for i := range f {
- t := b & (f[i] ^ g[i])
- f[i] ^= t
- g[i] ^= t
- }
-}
-
-// load3 reads a 24-bit, little-endian value from in.
-func load3(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- return r
-}
-
-// load4 reads a 32-bit, little-endian value from in.
-func load4(in []byte) int64 {
- return int64(binary.LittleEndian.Uint32(in))
-}
-
-func feFromBytes(dst *fieldElement, src *[32]byte) {
- h0 := load4(src[:])
- h1 := load3(src[4:]) << 6
- h2 := load3(src[7:]) << 5
- h3 := load3(src[10:]) << 3
- h4 := load3(src[13:]) << 2
- h5 := load4(src[16:])
- h6 := load3(src[20:]) << 7
- h7 := load3(src[23:]) << 5
- h8 := load3(src[26:]) << 4
- h9 := load3(src[29:]) << 2
-
- var carry [10]int64
- carry[9] = (h9 + 1<<24) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- carry[1] = (h1 + 1<<24) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[3] = (h3 + 1<<24) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[5] = (h5 + 1<<24) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- carry[7] = (h7 + 1<<24) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
-
- carry[0] = (h0 + 1<<25) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[2] = (h2 + 1<<25) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[4] = (h4 + 1<<25) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[6] = (h6 + 1<<25) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- carry[8] = (h8 + 1<<25) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
-
- dst[0] = int32(h0)
- dst[1] = int32(h1)
- dst[2] = int32(h2)
- dst[3] = int32(h3)
- dst[4] = int32(h4)
- dst[5] = int32(h5)
- dst[6] = int32(h6)
- dst[7] = int32(h7)
- dst[8] = int32(h8)
- dst[9] = int32(h9)
-}
-
-// feToBytes marshals h to s.
-// Preconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Write p=2^255-19; q=floor(h/p).
-// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
-//
-// Proof:
-// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
-// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
-//
-// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
-// Then 0<y<1.
-//
-// Write r=h-pq.
-// Have 0<=r<=p-1=2^255-20.
-// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
-//
-// Write x=r+19(2^-255)r+y.
-// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
-//
-// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
-// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
-func feToBytes(s *[32]byte, h *fieldElement) {
- var carry [10]int32
-
- q := (19*h[9] + (1 << 24)) >> 25
- q = (h[0] + q) >> 26
- q = (h[1] + q) >> 25
- q = (h[2] + q) >> 26
- q = (h[3] + q) >> 25
- q = (h[4] + q) >> 26
- q = (h[5] + q) >> 25
- q = (h[6] + q) >> 26
- q = (h[7] + q) >> 25
- q = (h[8] + q) >> 26
- q = (h[9] + q) >> 25
-
- // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
- h[0] += 19 * q
- // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
-
- carry[0] = h[0] >> 26
- h[1] += carry[0]
- h[0] -= carry[0] << 26
- carry[1] = h[1] >> 25
- h[2] += carry[1]
- h[1] -= carry[1] << 25
- carry[2] = h[2] >> 26
- h[3] += carry[2]
- h[2] -= carry[2] << 26
- carry[3] = h[3] >> 25
- h[4] += carry[3]
- h[3] -= carry[3] << 25
- carry[4] = h[4] >> 26
- h[5] += carry[4]
- h[4] -= carry[4] << 26
- carry[5] = h[5] >> 25
- h[6] += carry[5]
- h[5] -= carry[5] << 25
- carry[6] = h[6] >> 26
- h[7] += carry[6]
- h[6] -= carry[6] << 26
- carry[7] = h[7] >> 25
- h[8] += carry[7]
- h[7] -= carry[7] << 25
- carry[8] = h[8] >> 26
- h[9] += carry[8]
- h[8] -= carry[8] << 26
- carry[9] = h[9] >> 25
- h[9] -= carry[9] << 25
- // h10 = carry9
-
- // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
- // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
- // evidently 2^255 h10-2^255 q = 0.
- // Goal: Output h[0]+...+2^230 h[9].
-
- s[0] = byte(h[0] >> 0)
- s[1] = byte(h[0] >> 8)
- s[2] = byte(h[0] >> 16)
- s[3] = byte((h[0] >> 24) | (h[1] << 2))
- s[4] = byte(h[1] >> 6)
- s[5] = byte(h[1] >> 14)
- s[6] = byte((h[1] >> 22) | (h[2] << 3))
- s[7] = byte(h[2] >> 5)
- s[8] = byte(h[2] >> 13)
- s[9] = byte((h[2] >> 21) | (h[3] << 5))
- s[10] = byte(h[3] >> 3)
- s[11] = byte(h[3] >> 11)
- s[12] = byte((h[3] >> 19) | (h[4] << 6))
- s[13] = byte(h[4] >> 2)
- s[14] = byte(h[4] >> 10)
- s[15] = byte(h[4] >> 18)
- s[16] = byte(h[5] >> 0)
- s[17] = byte(h[5] >> 8)
- s[18] = byte(h[5] >> 16)
- s[19] = byte((h[5] >> 24) | (h[6] << 1))
- s[20] = byte(h[6] >> 7)
- s[21] = byte(h[6] >> 15)
- s[22] = byte((h[6] >> 23) | (h[7] << 3))
- s[23] = byte(h[7] >> 5)
- s[24] = byte(h[7] >> 13)
- s[25] = byte((h[7] >> 21) | (h[8] << 4))
- s[26] = byte(h[8] >> 4)
- s[27] = byte(h[8] >> 12)
- s[28] = byte((h[8] >> 20) | (h[9] << 6))
- s[29] = byte(h[9] >> 2)
- s[30] = byte(h[9] >> 10)
- s[31] = byte(h[9] >> 18)
-}
-
-// feMul calculates h = f * g
-// Can overlap h with f or g.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Notes on implementation strategy:
-//
-// Using schoolbook multiplication.
-// Karatsuba would save a little in some cost models.
-//
-// Most multiplications by 2 and 19 are 32-bit precomputations;
-// cheaper than 64-bit postcomputations.
-//
-// There is one remaining multiplication by 19 in the carry chain;
-// one *19 precomputation can be merged into this,
-// but the resulting data flow is considerably less clean.
-//
-// There are 12 carries below.
-// 10 of them are 2-way parallelizable and vectorizable.
-// Can get away with 11 carries, but then data flow is much deeper.
-//
-// With tighter constraints on inputs can squeeze carries into int32.
-func feMul(h, f, g *fieldElement) {
- f0 := f[0]
- f1 := f[1]
- f2 := f[2]
- f3 := f[3]
- f4 := f[4]
- f5 := f[5]
- f6 := f[6]
- f7 := f[7]
- f8 := f[8]
- f9 := f[9]
- g0 := g[0]
- g1 := g[1]
- g2 := g[2]
- g3 := g[3]
- g4 := g[4]
- g5 := g[5]
- g6 := g[6]
- g7 := g[7]
- g8 := g[8]
- g9 := g[9]
- g1_19 := 19 * g1 // 1.4*2^29
- g2_19 := 19 * g2 // 1.4*2^30; still ok
- g3_19 := 19 * g3
- g4_19 := 19 * g4
- g5_19 := 19 * g5
- g6_19 := 19 * g6
- g7_19 := 19 * g7
- g8_19 := 19 * g8
- g9_19 := 19 * g9
- f1_2 := 2 * f1
- f3_2 := 2 * f3
- f5_2 := 2 * f5
- f7_2 := 2 * f7
- f9_2 := 2 * f9
- f0g0 := int64(f0) * int64(g0)
- f0g1 := int64(f0) * int64(g1)
- f0g2 := int64(f0) * int64(g2)
- f0g3 := int64(f0) * int64(g3)
- f0g4 := int64(f0) * int64(g4)
- f0g5 := int64(f0) * int64(g5)
- f0g6 := int64(f0) * int64(g6)
- f0g7 := int64(f0) * int64(g7)
- f0g8 := int64(f0) * int64(g8)
- f0g9 := int64(f0) * int64(g9)
- f1g0 := int64(f1) * int64(g0)
- f1g1_2 := int64(f1_2) * int64(g1)
- f1g2 := int64(f1) * int64(g2)
- f1g3_2 := int64(f1_2) * int64(g3)
- f1g4 := int64(f1) * int64(g4)
- f1g5_2 := int64(f1_2) * int64(g5)
- f1g6 := int64(f1) * int64(g6)
- f1g7_2 := int64(f1_2) * int64(g7)
- f1g8 := int64(f1) * int64(g8)
- f1g9_38 := int64(f1_2) * int64(g9_19)
- f2g0 := int64(f2) * int64(g0)
- f2g1 := int64(f2) * int64(g1)
- f2g2 := int64(f2) * int64(g2)
- f2g3 := int64(f2) * int64(g3)
- f2g4 := int64(f2) * int64(g4)
- f2g5 := int64(f2) * int64(g5)
- f2g6 := int64(f2) * int64(g6)
- f2g7 := int64(f2) * int64(g7)
- f2g8_19 := int64(f2) * int64(g8_19)
- f2g9_19 := int64(f2) * int64(g9_19)
- f3g0 := int64(f3) * int64(g0)
- f3g1_2 := int64(f3_2) * int64(g1)
- f3g2 := int64(f3) * int64(g2)
- f3g3_2 := int64(f3_2) * int64(g3)
- f3g4 := int64(f3) * int64(g4)
- f3g5_2 := int64(f3_2) * int64(g5)
- f3g6 := int64(f3) * int64(g6)
- f3g7_38 := int64(f3_2) * int64(g7_19)
- f3g8_19 := int64(f3) * int64(g8_19)
- f3g9_38 := int64(f3_2) * int64(g9_19)
- f4g0 := int64(f4) * int64(g0)
- f4g1 := int64(f4) * int64(g1)
- f4g2 := int64(f4) * int64(g2)
- f4g3 := int64(f4) * int64(g3)
- f4g4 := int64(f4) * int64(g4)
- f4g5 := int64(f4) * int64(g5)
- f4g6_19 := int64(f4) * int64(g6_19)
- f4g7_19 := int64(f4) * int64(g7_19)
- f4g8_19 := int64(f4) * int64(g8_19)
- f4g9_19 := int64(f4) * int64(g9_19)
- f5g0 := int64(f5) * int64(g0)
- f5g1_2 := int64(f5_2) * int64(g1)
- f5g2 := int64(f5) * int64(g2)
- f5g3_2 := int64(f5_2) * int64(g3)
- f5g4 := int64(f5) * int64(g4)
- f5g5_38 := int64(f5_2) * int64(g5_19)
- f5g6_19 := int64(f5) * int64(g6_19)
- f5g7_38 := int64(f5_2) * int64(g7_19)
- f5g8_19 := int64(f5) * int64(g8_19)
- f5g9_38 := int64(f5_2) * int64(g9_19)
- f6g0 := int64(f6) * int64(g0)
- f6g1 := int64(f6) * int64(g1)
- f6g2 := int64(f6) * int64(g2)
- f6g3 := int64(f6) * int64(g3)
- f6g4_19 := int64(f6) * int64(g4_19)
- f6g5_19 := int64(f6) * int64(g5_19)
- f6g6_19 := int64(f6) * int64(g6_19)
- f6g7_19 := int64(f6) * int64(g7_19)
- f6g8_19 := int64(f6) * int64(g8_19)
- f6g9_19 := int64(f6) * int64(g9_19)
- f7g0 := int64(f7) * int64(g0)
- f7g1_2 := int64(f7_2) * int64(g1)
- f7g2 := int64(f7) * int64(g2)
- f7g3_38 := int64(f7_2) * int64(g3_19)
- f7g4_19 := int64(f7) * int64(g4_19)
- f7g5_38 := int64(f7_2) * int64(g5_19)
- f7g6_19 := int64(f7) * int64(g6_19)
- f7g7_38 := int64(f7_2) * int64(g7_19)
- f7g8_19 := int64(f7) * int64(g8_19)
- f7g9_38 := int64(f7_2) * int64(g9_19)
- f8g0 := int64(f8) * int64(g0)
- f8g1 := int64(f8) * int64(g1)
- f8g2_19 := int64(f8) * int64(g2_19)
- f8g3_19 := int64(f8) * int64(g3_19)
- f8g4_19 := int64(f8) * int64(g4_19)
- f8g5_19 := int64(f8) * int64(g5_19)
- f8g6_19 := int64(f8) * int64(g6_19)
- f8g7_19 := int64(f8) * int64(g7_19)
- f8g8_19 := int64(f8) * int64(g8_19)
- f8g9_19 := int64(f8) * int64(g9_19)
- f9g0 := int64(f9) * int64(g0)
- f9g1_38 := int64(f9_2) * int64(g1_19)
- f9g2_19 := int64(f9) * int64(g2_19)
- f9g3_38 := int64(f9_2) * int64(g3_19)
- f9g4_19 := int64(f9) * int64(g4_19)
- f9g5_38 := int64(f9_2) * int64(g5_19)
- f9g6_19 := int64(f9) * int64(g6_19)
- f9g7_38 := int64(f9_2) * int64(g7_19)
- f9g8_19 := int64(f9) * int64(g8_19)
- f9g9_38 := int64(f9_2) * int64(g9_19)
- h0 := f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38
- h1 := f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19
- h2 := f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38
- h3 := f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19
- h4 := f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38
- h5 := f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19
- h6 := f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38
- h7 := f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19
- h8 := f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38
- h9 := f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0
- var carry [10]int64
-
- // |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
- // i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
- // |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
- // i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- // |h0| <= 2^25
- // |h4| <= 2^25
- // |h1| <= 1.51*2^58
- // |h5| <= 1.51*2^58
-
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- // |h1| <= 2^24; from now on fits into int32
- // |h5| <= 2^24; from now on fits into int32
- // |h2| <= 1.21*2^59
- // |h6| <= 1.21*2^59
-
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- // |h2| <= 2^25; from now on fits into int32 unchanged
- // |h6| <= 2^25; from now on fits into int32 unchanged
- // |h3| <= 1.51*2^58
- // |h7| <= 1.51*2^58
-
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
- // |h3| <= 2^24; from now on fits into int32 unchanged
- // |h7| <= 2^24; from now on fits into int32 unchanged
- // |h4| <= 1.52*2^33
- // |h8| <= 1.52*2^33
-
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
- // |h4| <= 2^25; from now on fits into int32 unchanged
- // |h8| <= 2^25; from now on fits into int32 unchanged
- // |h5| <= 1.01*2^24
- // |h9| <= 1.51*2^58
-
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- // |h9| <= 2^24; from now on fits into int32 unchanged
- // |h0| <= 1.8*2^37
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- // |h0| <= 2^25; from now on fits into int32 unchanged
- // |h1| <= 1.01*2^24
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// feSquare calculates h = f*f. Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func feSquare(h, f *fieldElement) {
- f0 := f[0]
- f1 := f[1]
- f2 := f[2]
- f3 := f[3]
- f4 := f[4]
- f5 := f[5]
- f6 := f[6]
- f7 := f[7]
- f8 := f[8]
- f9 := f[9]
- f0_2 := 2 * f0
- f1_2 := 2 * f1
- f2_2 := 2 * f2
- f3_2 := 2 * f3
- f4_2 := 2 * f4
- f5_2 := 2 * f5
- f6_2 := 2 * f6
- f7_2 := 2 * f7
- f5_38 := 38 * f5 // 1.31*2^30
- f6_19 := 19 * f6 // 1.31*2^30
- f7_38 := 38 * f7 // 1.31*2^30
- f8_19 := 19 * f8 // 1.31*2^30
- f9_38 := 38 * f9 // 1.31*2^30
- f0f0 := int64(f0) * int64(f0)
- f0f1_2 := int64(f0_2) * int64(f1)
- f0f2_2 := int64(f0_2) * int64(f2)
- f0f3_2 := int64(f0_2) * int64(f3)
- f0f4_2 := int64(f0_2) * int64(f4)
- f0f5_2 := int64(f0_2) * int64(f5)
- f0f6_2 := int64(f0_2) * int64(f6)
- f0f7_2 := int64(f0_2) * int64(f7)
- f0f8_2 := int64(f0_2) * int64(f8)
- f0f9_2 := int64(f0_2) * int64(f9)
- f1f1_2 := int64(f1_2) * int64(f1)
- f1f2_2 := int64(f1_2) * int64(f2)
- f1f3_4 := int64(f1_2) * int64(f3_2)
- f1f4_2 := int64(f1_2) * int64(f4)
- f1f5_4 := int64(f1_2) * int64(f5_2)
- f1f6_2 := int64(f1_2) * int64(f6)
- f1f7_4 := int64(f1_2) * int64(f7_2)
- f1f8_2 := int64(f1_2) * int64(f8)
- f1f9_76 := int64(f1_2) * int64(f9_38)
- f2f2 := int64(f2) * int64(f2)
- f2f3_2 := int64(f2_2) * int64(f3)
- f2f4_2 := int64(f2_2) * int64(f4)
- f2f5_2 := int64(f2_2) * int64(f5)
- f2f6_2 := int64(f2_2) * int64(f6)
- f2f7_2 := int64(f2_2) * int64(f7)
- f2f8_38 := int64(f2_2) * int64(f8_19)
- f2f9_38 := int64(f2) * int64(f9_38)
- f3f3_2 := int64(f3_2) * int64(f3)
- f3f4_2 := int64(f3_2) * int64(f4)
- f3f5_4 := int64(f3_2) * int64(f5_2)
- f3f6_2 := int64(f3_2) * int64(f6)
- f3f7_76 := int64(f3_2) * int64(f7_38)
- f3f8_38 := int64(f3_2) * int64(f8_19)
- f3f9_76 := int64(f3_2) * int64(f9_38)
- f4f4 := int64(f4) * int64(f4)
- f4f5_2 := int64(f4_2) * int64(f5)
- f4f6_38 := int64(f4_2) * int64(f6_19)
- f4f7_38 := int64(f4) * int64(f7_38)
- f4f8_38 := int64(f4_2) * int64(f8_19)
- f4f9_38 := int64(f4) * int64(f9_38)
- f5f5_38 := int64(f5) * int64(f5_38)
- f5f6_38 := int64(f5_2) * int64(f6_19)
- f5f7_76 := int64(f5_2) * int64(f7_38)
- f5f8_38 := int64(f5_2) * int64(f8_19)
- f5f9_76 := int64(f5_2) * int64(f9_38)
- f6f6_19 := int64(f6) * int64(f6_19)
- f6f7_38 := int64(f6) * int64(f7_38)
- f6f8_38 := int64(f6_2) * int64(f8_19)
- f6f9_38 := int64(f6) * int64(f9_38)
- f7f7_38 := int64(f7) * int64(f7_38)
- f7f8_38 := int64(f7_2) * int64(f8_19)
- f7f9_76 := int64(f7_2) * int64(f9_38)
- f8f8_19 := int64(f8) * int64(f8_19)
- f8f9_38 := int64(f8) * int64(f9_38)
- f9f9_38 := int64(f9) * int64(f9_38)
- h0 := f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38
- h1 := f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38
- h2 := f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19
- h3 := f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38
- h4 := f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38
- h5 := f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38
- h6 := f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19
- h7 := f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38
- h8 := f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38
- h9 := f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2
- var carry [10]int64
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
-
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
-
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
-
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
-
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
-
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// feMul121666 calculates h = f * 121666. Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func feMul121666(h, f *fieldElement) {
- h0 := int64(f[0]) * 121666
- h1 := int64(f[1]) * 121666
- h2 := int64(f[2]) * 121666
- h3 := int64(f[3]) * 121666
- h4 := int64(f[4]) * 121666
- h5 := int64(f[5]) * 121666
- h6 := int64(f[6]) * 121666
- h7 := int64(f[7]) * 121666
- h8 := int64(f[8]) * 121666
- h9 := int64(f[9]) * 121666
- var carry [10]int64
-
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// feInvert sets out = z^-1.
-func feInvert(out, z *fieldElement) {
- var t0, t1, t2, t3 fieldElement
- var i int
-
- feSquare(&t0, z)
- for i = 1; i < 1; i++ {
- feSquare(&t0, &t0)
- }
- feSquare(&t1, &t0)
- for i = 1; i < 2; i++ {
- feSquare(&t1, &t1)
- }
- feMul(&t1, z, &t1)
- feMul(&t0, &t0, &t1)
- feSquare(&t2, &t0)
- for i = 1; i < 1; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t1, &t2)
- feSquare(&t2, &t1)
- for i = 1; i < 5; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t2, &t1)
- for i = 1; i < 10; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t2, &t2, &t1)
- feSquare(&t3, &t2)
- for i = 1; i < 20; i++ {
- feSquare(&t3, &t3)
- }
- feMul(&t2, &t3, &t2)
- feSquare(&t2, &t2)
- for i = 1; i < 10; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t2, &t1)
- for i = 1; i < 50; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t2, &t2, &t1)
- feSquare(&t3, &t2)
- for i = 1; i < 100; i++ {
- feSquare(&t3, &t3)
- }
- feMul(&t2, &t3, &t2)
- feSquare(&t2, &t2)
- for i = 1; i < 50; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t1, &t1)
- for i = 1; i < 5; i++ {
- feSquare(&t1, &t1)
- }
- feMul(out, &t1, &t0)
-}
-
-func scalarMult(out, in, base *[32]byte) {
- var e [32]byte
-
- copy(e[:], in[:])
- e[0] &= 248
- e[31] &= 127
- e[31] |= 64
-
- var x1, x2, z2, x3, z3, tmp0, tmp1 fieldElement
- feFromBytes(&x1, base)
- feOne(&x2)
- feCopy(&x3, &x1)
- feOne(&z3)
-
- swap := int32(0)
- for pos := 254; pos >= 0; pos-- {
- b := e[pos/8] >> uint(pos&7)
- b &= 1
- swap ^= int32(b)
- feCSwap(&x2, &x3, swap)
- feCSwap(&z2, &z3, swap)
- swap = int32(b)
-
- feSub(&tmp0, &x3, &z3)
- feSub(&tmp1, &x2, &z2)
- feAdd(&x2, &x2, &z2)
- feAdd(&z2, &x3, &z3)
- feMul(&z3, &tmp0, &x2)
- feMul(&z2, &z2, &tmp1)
- feSquare(&tmp0, &tmp1)
- feSquare(&tmp1, &x2)
- feAdd(&x3, &z3, &z2)
- feSub(&z2, &z3, &z2)
- feMul(&x2, &tmp1, &tmp0)
- feSub(&tmp1, &tmp1, &tmp0)
- feSquare(&z2, &z2)
- feMul121666(&z3, &tmp1)
- feSquare(&x3, &x3)
- feAdd(&tmp0, &tmp0, &z3)
- feMul(&z3, &x1, &z2)
- feMul(&z2, &tmp1, &tmp0)
- }
-
- feCSwap(&x2, &x3, swap)
- feCSwap(&z2, &z3, swap)
-
- feInvert(&z2, &z2)
- feMul(&x2, &x2, &z2)
- feToBytes(out, &x2)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519_test.go
deleted file mode 100644
index 051a8301f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/curve25519_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 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 file.
-
-package curve25519
-
-import (
- "fmt"
- "testing"
-)
-
-const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a"
-
-func TestBaseScalarMult(t *testing.T) {
- var a, b [32]byte
- in := &a
- out := &b
- a[0] = 1
-
- for i := 0; i < 200; i++ {
- ScalarBaseMult(out, in)
- in, out = out, in
- }
-
- result := fmt.Sprintf("%x", in[:])
- if result != expectedHex {
- t.Errorf("incorrect result: got %s, want %s", result, expectedHex)
- }
-}
-
-func BenchmarkScalarBaseMult(b *testing.B) {
- var in, out [32]byte
- in[0] = 1
-
- b.SetBytes(32)
- for i := 0; i < b.N; i++ {
- ScalarBaseMult(&out, &in)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/doc.go
deleted file mode 100644
index da9b10d9c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/doc.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package curve25519 provides an implementation of scalar multiplication on
-// the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
-package curve25519 // import "golang.org/x/crypto/curve25519"
-
-// basePoint is the x coordinate of the generator of the curve.
-var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
-
-// ScalarMult sets dst to the product in*base where dst and base are the x
-// coordinates of group points and all values are in little-endian form.
-func ScalarMult(dst, in, base *[32]byte) {
- scalarMult(dst, in, base)
-}
-
-// ScalarBaseMult sets dst to the product in*base where dst and base are the x
-// coordinates of group points, base is the standard generator and all values
-// are in little-endian form.
-func ScalarBaseMult(dst, in *[32]byte) {
- ScalarMult(dst, in, &basePoint)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
deleted file mode 100644
index 390816106..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func freeze(inout *[5]uint64)
-TEXT ·freeze(SB),7,$0-8
- MOVQ inout+0(FP), DI
-
- MOVQ 0(DI),SI
- MOVQ 8(DI),DX
- MOVQ 16(DI),CX
- MOVQ 24(DI),R8
- MOVQ 32(DI),R9
- MOVQ $REDMASK51,AX
- MOVQ AX,R10
- SUBQ $18,R10
- MOVQ $3,R11
-REDUCELOOP:
- MOVQ SI,R12
- SHRQ $51,R12
- ANDQ AX,SI
- ADDQ R12,DX
- MOVQ DX,R12
- SHRQ $51,R12
- ANDQ AX,DX
- ADDQ R12,CX
- MOVQ CX,R12
- SHRQ $51,R12
- ANDQ AX,CX
- ADDQ R12,R8
- MOVQ R8,R12
- SHRQ $51,R12
- ANDQ AX,R8
- ADDQ R12,R9
- MOVQ R9,R12
- SHRQ $51,R12
- ANDQ AX,R9
- IMUL3Q $19,R12,R12
- ADDQ R12,SI
- SUBQ $1,R11
- JA REDUCELOOP
- MOVQ $1,R12
- CMPQ R10,SI
- CMOVQLT R11,R12
- CMPQ AX,DX
- CMOVQNE R11,R12
- CMPQ AX,CX
- CMOVQNE R11,R12
- CMPQ AX,R8
- CMOVQNE R11,R12
- CMPQ AX,R9
- CMOVQNE R11,R12
- NEGQ R12
- ANDQ R12,AX
- ANDQ R12,R10
- SUBQ R10,SI
- SUBQ AX,DX
- SUBQ AX,CX
- SUBQ AX,R8
- SUBQ AX,R9
- MOVQ SI,0(DI)
- MOVQ DX,8(DI)
- MOVQ CX,16(DI)
- MOVQ R8,24(DI)
- MOVQ R9,32(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
deleted file mode 100644
index 9e9040b25..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
+++ /dev/null
@@ -1,1377 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func ladderstep(inout *[5][5]uint64)
-TEXT ·ladderstep(SB),0,$296-8
- MOVQ inout+0(FP),DI
-
- MOVQ 40(DI),SI
- MOVQ 48(DI),DX
- MOVQ 56(DI),CX
- MOVQ 64(DI),R8
- MOVQ 72(DI),R9
- MOVQ SI,AX
- MOVQ DX,R10
- MOVQ CX,R11
- MOVQ R8,R12
- MOVQ R9,R13
- ADDQ ·_2P0(SB),AX
- ADDQ ·_2P1234(SB),R10
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 80(DI),SI
- ADDQ 88(DI),DX
- ADDQ 96(DI),CX
- ADDQ 104(DI),R8
- ADDQ 112(DI),R9
- SUBQ 80(DI),AX
- SUBQ 88(DI),R10
- SUBQ 96(DI),R11
- SUBQ 104(DI),R12
- SUBQ 112(DI),R13
- MOVQ SI,0(SP)
- MOVQ DX,8(SP)
- MOVQ CX,16(SP)
- MOVQ R8,24(SP)
- MOVQ R9,32(SP)
- MOVQ AX,40(SP)
- MOVQ R10,48(SP)
- MOVQ R11,56(SP)
- MOVQ R12,64(SP)
- MOVQ R13,72(SP)
- MOVQ 40(SP),AX
- MULQ 40(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 48(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 56(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 64(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 72(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 48(SP),AX
- MULQ 48(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 48(SP),AX
- SHLQ $1,AX
- MULQ 56(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 48(SP),AX
- SHLQ $1,AX
- MULQ 64(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 48(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 56(SP),AX
- MULQ 56(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 56(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 64(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 56(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 64(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 64(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 64(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 72(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,80(SP)
- MOVQ R8,88(SP)
- MOVQ R9,96(SP)
- MOVQ AX,104(SP)
- MOVQ R10,112(SP)
- MOVQ 0(SP),AX
- MULQ 0(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 8(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 16(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 24(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 32(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 8(SP),AX
- MULQ 8(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- SHLQ $1,AX
- MULQ 16(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SP),AX
- SHLQ $1,AX
- MULQ 24(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 16(SP),AX
- MULQ 16(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 16(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 24(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 16(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 24(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 24(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 32(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,120(SP)
- MOVQ R8,128(SP)
- MOVQ R9,136(SP)
- MOVQ AX,144(SP)
- MOVQ R10,152(SP)
- MOVQ SI,SI
- MOVQ R8,DX
- MOVQ R9,CX
- MOVQ AX,R8
- MOVQ R10,R9
- ADDQ ·_2P0(SB),SI
- ADDQ ·_2P1234(SB),DX
- ADDQ ·_2P1234(SB),CX
- ADDQ ·_2P1234(SB),R8
- ADDQ ·_2P1234(SB),R9
- SUBQ 80(SP),SI
- SUBQ 88(SP),DX
- SUBQ 96(SP),CX
- SUBQ 104(SP),R8
- SUBQ 112(SP),R9
- MOVQ SI,160(SP)
- MOVQ DX,168(SP)
- MOVQ CX,176(SP)
- MOVQ R8,184(SP)
- MOVQ R9,192(SP)
- MOVQ 120(DI),SI
- MOVQ 128(DI),DX
- MOVQ 136(DI),CX
- MOVQ 144(DI),R8
- MOVQ 152(DI),R9
- MOVQ SI,AX
- MOVQ DX,R10
- MOVQ CX,R11
- MOVQ R8,R12
- MOVQ R9,R13
- ADDQ ·_2P0(SB),AX
- ADDQ ·_2P1234(SB),R10
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 160(DI),SI
- ADDQ 168(DI),DX
- ADDQ 176(DI),CX
- ADDQ 184(DI),R8
- ADDQ 192(DI),R9
- SUBQ 160(DI),AX
- SUBQ 168(DI),R10
- SUBQ 176(DI),R11
- SUBQ 184(DI),R12
- SUBQ 192(DI),R13
- MOVQ SI,200(SP)
- MOVQ DX,208(SP)
- MOVQ CX,216(SP)
- MOVQ R8,224(SP)
- MOVQ R9,232(SP)
- MOVQ AX,240(SP)
- MOVQ R10,248(SP)
- MOVQ R11,256(SP)
- MOVQ R12,264(SP)
- MOVQ R13,272(SP)
- MOVQ 224(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,280(SP)
- MULQ 56(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 232(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,288(SP)
- MULQ 48(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 200(SP),AX
- MULQ 40(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 200(SP),AX
- MULQ 48(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 200(SP),AX
- MULQ 56(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 200(SP),AX
- MULQ 64(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 200(SP),AX
- MULQ 72(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 208(SP),AX
- MULQ 40(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 208(SP),AX
- MULQ 48(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 208(SP),AX
- MULQ 56(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 208(SP),AX
- MULQ 64(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 208(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 216(SP),AX
- MULQ 40(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 216(SP),AX
- MULQ 48(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 216(SP),AX
- MULQ 56(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 216(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 64(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 216(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 224(SP),AX
- MULQ 40(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 224(SP),AX
- MULQ 48(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 280(SP),AX
- MULQ 64(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 280(SP),AX
- MULQ 72(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 232(SP),AX
- MULQ 40(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 288(SP),AX
- MULQ 56(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 288(SP),AX
- MULQ 64(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 288(SP),AX
- MULQ 72(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,40(SP)
- MOVQ R8,48(SP)
- MOVQ R9,56(SP)
- MOVQ AX,64(SP)
- MOVQ R10,72(SP)
- MOVQ 264(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,200(SP)
- MULQ 16(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 272(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,208(SP)
- MULQ 8(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 240(SP),AX
- MULQ 0(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 240(SP),AX
- MULQ 8(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 240(SP),AX
- MULQ 16(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 240(SP),AX
- MULQ 24(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 240(SP),AX
- MULQ 32(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 248(SP),AX
- MULQ 0(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 248(SP),AX
- MULQ 8(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 248(SP),AX
- MULQ 16(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 248(SP),AX
- MULQ 24(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 248(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 256(SP),AX
- MULQ 0(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 256(SP),AX
- MULQ 8(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 256(SP),AX
- MULQ 16(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 256(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 256(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 264(SP),AX
- MULQ 0(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 264(SP),AX
- MULQ 8(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 200(SP),AX
- MULQ 24(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 200(SP),AX
- MULQ 32(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 272(SP),AX
- MULQ 0(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 208(SP),AX
- MULQ 16(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 208(SP),AX
- MULQ 24(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 208(SP),AX
- MULQ 32(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,DX
- MOVQ R8,CX
- MOVQ R9,R11
- MOVQ AX,R12
- MOVQ R10,R13
- ADDQ ·_2P0(SB),DX
- ADDQ ·_2P1234(SB),CX
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 40(SP),SI
- ADDQ 48(SP),R8
- ADDQ 56(SP),R9
- ADDQ 64(SP),AX
- ADDQ 72(SP),R10
- SUBQ 40(SP),DX
- SUBQ 48(SP),CX
- SUBQ 56(SP),R11
- SUBQ 64(SP),R12
- SUBQ 72(SP),R13
- MOVQ SI,120(DI)
- MOVQ R8,128(DI)
- MOVQ R9,136(DI)
- MOVQ AX,144(DI)
- MOVQ R10,152(DI)
- MOVQ DX,160(DI)
- MOVQ CX,168(DI)
- MOVQ R11,176(DI)
- MOVQ R12,184(DI)
- MOVQ R13,192(DI)
- MOVQ 120(DI),AX
- MULQ 120(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 128(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 136(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 144(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 152(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 128(DI),AX
- MULQ 128(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 128(DI),AX
- SHLQ $1,AX
- MULQ 136(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 128(DI),AX
- SHLQ $1,AX
- MULQ 144(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 128(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(DI),AX
- MULQ 136(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 136(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 144(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 144(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 152(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 152(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,120(DI)
- MOVQ R8,128(DI)
- MOVQ R9,136(DI)
- MOVQ AX,144(DI)
- MOVQ R10,152(DI)
- MOVQ 160(DI),AX
- MULQ 160(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 168(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 176(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 184(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 192(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 168(DI),AX
- MULQ 168(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 168(DI),AX
- SHLQ $1,AX
- MULQ 176(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 168(DI),AX
- SHLQ $1,AX
- MULQ 184(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 168(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),AX
- MULQ 176(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 176(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 184(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 184(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 192(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,160(DI)
- MOVQ R8,168(DI)
- MOVQ R9,176(DI)
- MOVQ AX,184(DI)
- MOVQ R10,192(DI)
- MOVQ 184(DI),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 16(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 192(DI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 8(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 160(DI),AX
- MULQ 0(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 160(DI),AX
- MULQ 8(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 160(DI),AX
- MULQ 16(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 160(DI),AX
- MULQ 24(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 160(DI),AX
- MULQ 32(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 168(DI),AX
- MULQ 0(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 168(DI),AX
- MULQ 8(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 168(DI),AX
- MULQ 16(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 168(DI),AX
- MULQ 24(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 168(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),AX
- MULQ 0(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 176(DI),AX
- MULQ 8(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 176(DI),AX
- MULQ 16(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 176(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),AX
- MULQ 0(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 184(DI),AX
- MULQ 8(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 24(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 32(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 192(DI),AX
- MULQ 0(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 16(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 24(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 32(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,160(DI)
- MOVQ R8,168(DI)
- MOVQ R9,176(DI)
- MOVQ AX,184(DI)
- MOVQ R10,192(DI)
- MOVQ 144(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 96(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 152(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 88(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 120(SP),AX
- MULQ 80(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 120(SP),AX
- MULQ 88(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 120(SP),AX
- MULQ 96(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 120(SP),AX
- MULQ 104(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 120(SP),AX
- MULQ 112(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 128(SP),AX
- MULQ 80(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 128(SP),AX
- MULQ 88(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 128(SP),AX
- MULQ 96(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 128(SP),AX
- MULQ 104(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 128(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 112(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(SP),AX
- MULQ 80(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 136(SP),AX
- MULQ 88(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 136(SP),AX
- MULQ 96(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 136(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 104(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 112(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(SP),AX
- MULQ 80(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 144(SP),AX
- MULQ 88(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 104(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 112(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 152(SP),AX
- MULQ 80(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 96(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 104(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 112(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,40(DI)
- MOVQ R8,48(DI)
- MOVQ R9,56(DI)
- MOVQ AX,64(DI)
- MOVQ R10,72(DI)
- MOVQ 160(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 168(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,CX
- MOVQ DX,R8
- MOVQ 176(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R8
- MOVQ DX,R9
- MOVQ 184(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R9
- MOVQ DX,R10
- MOVQ 192(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R10
- IMUL3Q $19,DX,DX
- ADDQ DX,SI
- ADDQ 80(SP),SI
- ADDQ 88(SP),CX
- ADDQ 96(SP),R8
- ADDQ 104(SP),R9
- ADDQ 112(SP),R10
- MOVQ SI,80(DI)
- MOVQ CX,88(DI)
- MOVQ R8,96(DI)
- MOVQ R9,104(DI)
- MOVQ R10,112(DI)
- MOVQ 104(DI),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 176(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 112(DI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 168(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 80(DI),AX
- MULQ 160(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 80(DI),AX
- MULQ 168(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 80(DI),AX
- MULQ 176(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 80(DI),AX
- MULQ 184(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 80(DI),AX
- MULQ 192(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 88(DI),AX
- MULQ 160(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 88(DI),AX
- MULQ 168(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 88(DI),AX
- MULQ 176(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 88(DI),AX
- MULQ 184(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 88(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 96(DI),AX
- MULQ 160(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 96(DI),AX
- MULQ 168(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 96(DI),AX
- MULQ 176(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 96(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 184(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 96(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 104(DI),AX
- MULQ 160(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 104(DI),AX
- MULQ 168(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 184(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 192(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 112(DI),AX
- MULQ 160(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 176(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 184(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 192(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,CX:SI
- ANDQ DX,SI
- SHLQ $13,R9:R8
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R11:R10
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,80(DI)
- MOVQ R8,88(DI)
- MOVQ R9,96(DI)
- MOVQ AX,104(DI)
- MOVQ R10,112(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
deleted file mode 100644
index 5822bd533..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-package curve25519
-
-// These functions are implemented in the .s files. The names of the functions
-// in the rest of the file are also taken from the SUPERCOP sources to help
-// people following along.
-
-//go:noescape
-
-func cswap(inout *[5]uint64, v uint64)
-
-//go:noescape
-
-func ladderstep(inout *[5][5]uint64)
-
-//go:noescape
-
-func freeze(inout *[5]uint64)
-
-//go:noescape
-
-func mul(dest, a, b *[5]uint64)
-
-//go:noescape
-
-func square(out, in *[5]uint64)
-
-// mladder uses a Montgomery ladder to calculate (xr/zr) *= s.
-func mladder(xr, zr *[5]uint64, s *[32]byte) {
- var work [5][5]uint64
-
- work[0] = *xr
- setint(&work[1], 1)
- setint(&work[2], 0)
- work[3] = *xr
- setint(&work[4], 1)
-
- j := uint(6)
- var prevbit byte
-
- for i := 31; i >= 0; i-- {
- for j < 8 {
- bit := ((*s)[i] >> j) & 1
- swap := bit ^ prevbit
- prevbit = bit
- cswap(&work[1], uint64(swap))
- ladderstep(&work)
- j--
- }
- j = 7
- }
-
- *xr = work[1]
- *zr = work[2]
-}
-
-func scalarMult(out, in, base *[32]byte) {
- var e [32]byte
- copy(e[:], (*in)[:])
- e[0] &= 248
- e[31] &= 127
- e[31] |= 64
-
- var t, z [5]uint64
- unpack(&t, base)
- mladder(&t, &z, &e)
- invert(&z, &z)
- mul(&t, &t, &z)
- pack(out, &t)
-}
-
-func setint(r *[5]uint64, v uint64) {
- r[0] = v
- r[1] = 0
- r[2] = 0
- r[3] = 0
- r[4] = 0
-}
-
-// unpack sets r = x where r consists of 5, 51-bit limbs in little-endian
-// order.
-func unpack(r *[5]uint64, x *[32]byte) {
- r[0] = uint64(x[0]) |
- uint64(x[1])<<8 |
- uint64(x[2])<<16 |
- uint64(x[3])<<24 |
- uint64(x[4])<<32 |
- uint64(x[5])<<40 |
- uint64(x[6]&7)<<48
-
- r[1] = uint64(x[6])>>3 |
- uint64(x[7])<<5 |
- uint64(x[8])<<13 |
- uint64(x[9])<<21 |
- uint64(x[10])<<29 |
- uint64(x[11])<<37 |
- uint64(x[12]&63)<<45
-
- r[2] = uint64(x[12])>>6 |
- uint64(x[13])<<2 |
- uint64(x[14])<<10 |
- uint64(x[15])<<18 |
- uint64(x[16])<<26 |
- uint64(x[17])<<34 |
- uint64(x[18])<<42 |
- uint64(x[19]&1)<<50
-
- r[3] = uint64(x[19])>>1 |
- uint64(x[20])<<7 |
- uint64(x[21])<<15 |
- uint64(x[22])<<23 |
- uint64(x[23])<<31 |
- uint64(x[24])<<39 |
- uint64(x[25]&15)<<47
-
- r[4] = uint64(x[25])>>4 |
- uint64(x[26])<<4 |
- uint64(x[27])<<12 |
- uint64(x[28])<<20 |
- uint64(x[29])<<28 |
- uint64(x[30])<<36 |
- uint64(x[31]&127)<<44
-}
-
-// pack sets out = x where out is the usual, little-endian form of the 5,
-// 51-bit limbs in x.
-func pack(out *[32]byte, x *[5]uint64) {
- t := *x
- freeze(&t)
-
- out[0] = byte(t[0])
- out[1] = byte(t[0] >> 8)
- out[2] = byte(t[0] >> 16)
- out[3] = byte(t[0] >> 24)
- out[4] = byte(t[0] >> 32)
- out[5] = byte(t[0] >> 40)
- out[6] = byte(t[0] >> 48)
-
- out[6] ^= byte(t[1]<<3) & 0xf8
- out[7] = byte(t[1] >> 5)
- out[8] = byte(t[1] >> 13)
- out[9] = byte(t[1] >> 21)
- out[10] = byte(t[1] >> 29)
- out[11] = byte(t[1] >> 37)
- out[12] = byte(t[1] >> 45)
-
- out[12] ^= byte(t[2]<<6) & 0xc0
- out[13] = byte(t[2] >> 2)
- out[14] = byte(t[2] >> 10)
- out[15] = byte(t[2] >> 18)
- out[16] = byte(t[2] >> 26)
- out[17] = byte(t[2] >> 34)
- out[18] = byte(t[2] >> 42)
- out[19] = byte(t[2] >> 50)
-
- out[19] ^= byte(t[3]<<1) & 0xfe
- out[20] = byte(t[3] >> 7)
- out[21] = byte(t[3] >> 15)
- out[22] = byte(t[3] >> 23)
- out[23] = byte(t[3] >> 31)
- out[24] = byte(t[3] >> 39)
- out[25] = byte(t[3] >> 47)
-
- out[25] ^= byte(t[4]<<4) & 0xf0
- out[26] = byte(t[4] >> 4)
- out[27] = byte(t[4] >> 12)
- out[28] = byte(t[4] >> 20)
- out[29] = byte(t[4] >> 28)
- out[30] = byte(t[4] >> 36)
- out[31] = byte(t[4] >> 44)
-}
-
-// invert calculates r = x^-1 mod p using Fermat's little theorem.
-func invert(r *[5]uint64, x *[5]uint64) {
- var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t [5]uint64
-
- square(&z2, x) /* 2 */
- square(&t, &z2) /* 4 */
- square(&t, &t) /* 8 */
- mul(&z9, &t, x) /* 9 */
- mul(&z11, &z9, &z2) /* 11 */
- square(&t, &z11) /* 22 */
- mul(&z2_5_0, &t, &z9) /* 2^5 - 2^0 = 31 */
-
- square(&t, &z2_5_0) /* 2^6 - 2^1 */
- for i := 1; i < 5; i++ { /* 2^20 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_10_0, &t, &z2_5_0) /* 2^10 - 2^0 */
-
- square(&t, &z2_10_0) /* 2^11 - 2^1 */
- for i := 1; i < 10; i++ { /* 2^20 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_20_0, &t, &z2_10_0) /* 2^20 - 2^0 */
-
- square(&t, &z2_20_0) /* 2^21 - 2^1 */
- for i := 1; i < 20; i++ { /* 2^40 - 2^20 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_20_0) /* 2^40 - 2^0 */
-
- square(&t, &t) /* 2^41 - 2^1 */
- for i := 1; i < 10; i++ { /* 2^50 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_50_0, &t, &z2_10_0) /* 2^50 - 2^0 */
-
- square(&t, &z2_50_0) /* 2^51 - 2^1 */
- for i := 1; i < 50; i++ { /* 2^100 - 2^50 */
- square(&t, &t)
- }
- mul(&z2_100_0, &t, &z2_50_0) /* 2^100 - 2^0 */
-
- square(&t, &z2_100_0) /* 2^101 - 2^1 */
- for i := 1; i < 100; i++ { /* 2^200 - 2^100 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_100_0) /* 2^200 - 2^0 */
-
- square(&t, &t) /* 2^201 - 2^1 */
- for i := 1; i < 50; i++ { /* 2^250 - 2^50 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_50_0) /* 2^250 - 2^0 */
-
- square(&t, &t) /* 2^251 - 2^1 */
- square(&t, &t) /* 2^252 - 2^2 */
- square(&t, &t) /* 2^253 - 2^3 */
-
- square(&t, &t) /* 2^254 - 2^4 */
-
- square(&t, &t) /* 2^255 - 2^5 */
- mul(r, &t, &z11) /* 2^255 - 21 */
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mul_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mul_amd64.s
deleted file mode 100644
index 5ce80a2e5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/mul_amd64.s
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func mul(dest, a, b *[5]uint64)
-TEXT ·mul(SB),0,$16-24
- MOVQ dest+0(FP), DI
- MOVQ a+8(FP), SI
- MOVQ b+16(FP), DX
-
- MOVQ DX,CX
- MOVQ 24(SI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,0(SP)
- MULQ 16(CX)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 32(SI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 8(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SI),AX
- MULQ 0(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SI),AX
- MULQ 8(CX)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 0(SI),AX
- MULQ 16(CX)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 0(SI),AX
- MULQ 24(CX)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 0(SI),AX
- MULQ 32(CX)
- MOVQ AX,BX
- MOVQ DX,BP
- MOVQ 8(SI),AX
- MULQ 0(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SI),AX
- MULQ 8(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SI),AX
- MULQ 16(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SI),AX
- MULQ 24(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 8(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 16(SI),AX
- MULQ 0(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 16(SI),AX
- MULQ 8(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 16(SI),AX
- MULQ 16(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 16(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 16(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 24(SI),AX
- MULQ 0(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 24(SI),AX
- MULQ 8(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 0(SP),AX
- MULQ 24(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 0(SP),AX
- MULQ 32(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 32(SI),AX
- MULQ 0(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 8(SP),AX
- MULQ 16(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 24(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SP),AX
- MULQ 32(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ $REDMASK51,SI
- SHLQ $13,R9:R8
- ANDQ SI,R8
- SHLQ $13,R11:R10
- ANDQ SI,R10
- ADDQ R9,R10
- SHLQ $13,R13:R12
- ANDQ SI,R12
- ADDQ R11,R12
- SHLQ $13,R15:R14
- ANDQ SI,R14
- ADDQ R13,R14
- SHLQ $13,BP:BX
- ANDQ SI,BX
- ADDQ R15,BX
- IMUL3Q $19,BP,DX
- ADDQ DX,R8
- MOVQ R8,DX
- SHRQ $51,DX
- ADDQ R10,DX
- MOVQ DX,CX
- SHRQ $51,DX
- ANDQ SI,R8
- ADDQ R12,DX
- MOVQ DX,R9
- SHRQ $51,DX
- ANDQ SI,CX
- ADDQ R14,DX
- MOVQ DX,AX
- SHRQ $51,DX
- ANDQ SI,R9
- ADDQ BX,DX
- MOVQ DX,R10
- SHRQ $51,DX
- ANDQ SI,AX
- IMUL3Q $19,DX,DX
- ADDQ DX,R8
- ANDQ SI,R10
- MOVQ R8,0(DI)
- MOVQ CX,8(DI)
- MOVQ R9,16(DI)
- MOVQ AX,24(DI)
- MOVQ R10,32(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/square_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/square_amd64.s
deleted file mode 100644
index 12f73734f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/curve25519/square_amd64.s
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func square(out, in *[5]uint64)
-TEXT ·square(SB),7,$0-16
- MOVQ out+0(FP), DI
- MOVQ in+8(FP), SI
-
- MOVQ 0(SI),AX
- MULQ 0(SI)
- MOVQ AX,CX
- MOVQ DX,R8
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 8(SI)
- MOVQ AX,R9
- MOVQ DX,R10
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 16(SI)
- MOVQ AX,R11
- MOVQ DX,R12
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 24(SI)
- MOVQ AX,R13
- MOVQ DX,R14
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 32(SI)
- MOVQ AX,R15
- MOVQ DX,BX
- MOVQ 8(SI),AX
- MULQ 8(SI)
- ADDQ AX,R11
- ADCQ DX,R12
- MOVQ 8(SI),AX
- SHLQ $1,AX
- MULQ 16(SI)
- ADDQ AX,R13
- ADCQ DX,R14
- MOVQ 8(SI),AX
- SHLQ $1,AX
- MULQ 24(SI)
- ADDQ AX,R15
- ADCQ DX,BX
- MOVQ 8(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,CX
- ADCQ DX,R8
- MOVQ 16(SI),AX
- MULQ 16(SI)
- ADDQ AX,R15
- ADCQ DX,BX
- MOVQ 16(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 24(SI)
- ADDQ AX,CX
- ADCQ DX,R8
- MOVQ 16(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,R9
- ADCQ DX,R10
- MOVQ 24(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SI)
- ADDQ AX,R9
- ADCQ DX,R10
- MOVQ 24(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,R11
- ADCQ DX,R12
- MOVQ 32(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SI)
- ADDQ AX,R13
- ADCQ DX,R14
- MOVQ $REDMASK51,SI
- SHLQ $13,R8:CX
- ANDQ SI,CX
- SHLQ $13,R10:R9
- ANDQ SI,R9
- ADDQ R8,R9
- SHLQ $13,R12:R11
- ANDQ SI,R11
- ADDQ R10,R11
- SHLQ $13,R14:R13
- ANDQ SI,R13
- ADDQ R12,R13
- SHLQ $13,BX:R15
- ANDQ SI,R15
- ADDQ R14,R15
- IMUL3Q $19,BX,DX
- ADDQ DX,CX
- MOVQ CX,DX
- SHRQ $51,DX
- ADDQ R9,DX
- ANDQ SI,CX
- MOVQ DX,R8
- SHRQ $51,DX
- ADDQ R11,DX
- ANDQ SI,R8
- MOVQ DX,R9
- SHRQ $51,DX
- ADDQ R13,DX
- ANDQ SI,R9
- MOVQ DX,AX
- SHRQ $51,DX
- ADDQ R15,DX
- ANDQ SI,AX
- MOVQ DX,R10
- SHRQ $51,DX
- IMUL3Q $19,DX,DX
- ADDQ DX,CX
- ANDQ SI,R10
- MOVQ CX,0(DI)
- MOVQ R8,8(DI)
- MOVQ R9,16(DI)
- MOVQ AX,24(DI)
- MOVQ R10,32(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519.go
deleted file mode 100644
index 4f26b49b6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package ed25519 implements the Ed25519 signature algorithm. See
-// https://ed25519.cr.yp.to/.
-//
-// These functions are also compatible with the “Ed25519†function defined in
-// RFC 8032.
-package ed25519
-
-// This code is a port of the public domain, “ref10†implementation of ed25519
-// from SUPERCOP.
-
-import (
- "bytes"
- "crypto"
- cryptorand "crypto/rand"
- "crypto/sha512"
- "errors"
- "io"
- "strconv"
-
- "golang.org/x/crypto/ed25519/internal/edwards25519"
-)
-
-const (
- // PublicKeySize is the size, in bytes, of public keys as used in this package.
- PublicKeySize = 32
- // PrivateKeySize is the size, in bytes, of private keys as used in this package.
- PrivateKeySize = 64
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = 64
-)
-
-// PublicKey is the type of Ed25519 public keys.
-type PublicKey []byte
-
-// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
-type PrivateKey []byte
-
-// Public returns the PublicKey corresponding to priv.
-func (priv PrivateKey) Public() crypto.PublicKey {
- publicKey := make([]byte, PublicKeySize)
- copy(publicKey, priv[32:])
- return PublicKey(publicKey)
-}
-
-// Sign signs the given message with priv.
-// Ed25519 performs two passes over messages to be signed and therefore cannot
-// handle pre-hashed messages. Thus opts.HashFunc() must return zero to
-// indicate the message hasn't been hashed. This can be achieved by passing
-// crypto.Hash(0) as the value for opts.
-func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {
- if opts.HashFunc() != crypto.Hash(0) {
- return nil, errors.New("ed25519: cannot sign hashed message")
- }
-
- return Sign(priv, message), nil
-}
-
-// GenerateKey generates a public/private key pair using entropy from rand.
-// If rand is nil, crypto/rand.Reader will be used.
-func GenerateKey(rand io.Reader) (publicKey PublicKey, privateKey PrivateKey, err error) {
- if rand == nil {
- rand = cryptorand.Reader
- }
-
- privateKey = make([]byte, PrivateKeySize)
- publicKey = make([]byte, PublicKeySize)
- _, err = io.ReadFull(rand, privateKey[:32])
- if err != nil {
- return nil, nil, err
- }
-
- digest := sha512.Sum512(privateKey[:32])
- digest[0] &= 248
- digest[31] &= 127
- digest[31] |= 64
-
- var A edwards25519.ExtendedGroupElement
- var hBytes [32]byte
- copy(hBytes[:], digest[:])
- edwards25519.GeScalarMultBase(&A, &hBytes)
- var publicKeyBytes [32]byte
- A.ToBytes(&publicKeyBytes)
-
- copy(privateKey[32:], publicKeyBytes[:])
- copy(publicKey, publicKeyBytes[:])
-
- return publicKey, privateKey, nil
-}
-
-// Sign signs the message with privateKey and returns a signature. It will
-// panic if len(privateKey) is not PrivateKeySize.
-func Sign(privateKey PrivateKey, message []byte) []byte {
- if l := len(privateKey); l != PrivateKeySize {
- panic("ed25519: bad private key length: " + strconv.Itoa(l))
- }
-
- h := sha512.New()
- h.Write(privateKey[:32])
-
- var digest1, messageDigest, hramDigest [64]byte
- var expandedSecretKey [32]byte
- h.Sum(digest1[:0])
- copy(expandedSecretKey[:], digest1[:])
- expandedSecretKey[0] &= 248
- expandedSecretKey[31] &= 63
- expandedSecretKey[31] |= 64
-
- h.Reset()
- h.Write(digest1[32:])
- h.Write(message)
- h.Sum(messageDigest[:0])
-
- var messageDigestReduced [32]byte
- edwards25519.ScReduce(&messageDigestReduced, &messageDigest)
- var R edwards25519.ExtendedGroupElement
- edwards25519.GeScalarMultBase(&R, &messageDigestReduced)
-
- var encodedR [32]byte
- R.ToBytes(&encodedR)
-
- h.Reset()
- h.Write(encodedR[:])
- h.Write(privateKey[32:])
- h.Write(message)
- h.Sum(hramDigest[:0])
- var hramDigestReduced [32]byte
- edwards25519.ScReduce(&hramDigestReduced, &hramDigest)
-
- var s [32]byte
- edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced)
-
- signature := make([]byte, SignatureSize)
- copy(signature[:], encodedR[:])
- copy(signature[32:], s[:])
-
- return signature
-}
-
-// Verify reports whether sig is a valid signature of message by publicKey. It
-// will panic if len(publicKey) is not PublicKeySize.
-func Verify(publicKey PublicKey, message, sig []byte) bool {
- if l := len(publicKey); l != PublicKeySize {
- panic("ed25519: bad public key length: " + strconv.Itoa(l))
- }
-
- if len(sig) != SignatureSize || sig[63]&224 != 0 {
- return false
- }
-
- var A edwards25519.ExtendedGroupElement
- var publicKeyBytes [32]byte
- copy(publicKeyBytes[:], publicKey)
- if !A.FromBytes(&publicKeyBytes) {
- return false
- }
- edwards25519.FeNeg(&A.X, &A.X)
- edwards25519.FeNeg(&A.T, &A.T)
-
- h := sha512.New()
- h.Write(sig[:32])
- h.Write(publicKey[:])
- h.Write(message)
- var digest [64]byte
- h.Sum(digest[:0])
-
- var hReduced [32]byte
- edwards25519.ScReduce(&hReduced, &digest)
-
- var R edwards25519.ProjectiveGroupElement
- var b [32]byte
- copy(b[:], sig[32:])
- edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b)
-
- var checkR [32]byte
- R.ToBytes(&checkR)
- return bytes.Equal(sig[:32], checkR[:])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519_test.go
deleted file mode 100644
index e272f8a55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/ed25519_test.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2016 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 file.
-
-package ed25519
-
-import (
- "bufio"
- "bytes"
- "compress/gzip"
- "crypto"
- "crypto/rand"
- "encoding/hex"
- "os"
- "strings"
- "testing"
-
- "golang.org/x/crypto/ed25519/internal/edwards25519"
-)
-
-type zeroReader struct{}
-
-func (zeroReader) Read(buf []byte) (int, error) {
- for i := range buf {
- buf[i] = 0
- }
- return len(buf), nil
-}
-
-func TestUnmarshalMarshal(t *testing.T) {
- pub, _, _ := GenerateKey(rand.Reader)
-
- var A edwards25519.ExtendedGroupElement
- var pubBytes [32]byte
- copy(pubBytes[:], pub)
- if !A.FromBytes(&pubBytes) {
- t.Fatalf("ExtendedGroupElement.FromBytes failed")
- }
-
- var pub2 [32]byte
- A.ToBytes(&pub2)
-
- if pubBytes != pub2 {
- t.Errorf("FromBytes(%v)->ToBytes does not round-trip, got %x\n", pubBytes, pub2)
- }
-}
-
-func TestSignVerify(t *testing.T) {
- var zero zeroReader
- public, private, _ := GenerateKey(zero)
-
- message := []byte("test message")
- sig := Sign(private, message)
- if !Verify(public, message, sig) {
- t.Errorf("valid signature rejected")
- }
-
- wrongMessage := []byte("wrong message")
- if Verify(public, wrongMessage, sig) {
- t.Errorf("signature of different message accepted")
- }
-}
-
-func TestCryptoSigner(t *testing.T) {
- var zero zeroReader
- public, private, _ := GenerateKey(zero)
-
- signer := crypto.Signer(private)
-
- publicInterface := signer.Public()
- public2, ok := publicInterface.(PublicKey)
- if !ok {
- t.Fatalf("expected PublicKey from Public() but got %T", publicInterface)
- }
-
- if !bytes.Equal(public, public2) {
- t.Errorf("public keys do not match: original:%x vs Public():%x", public, public2)
- }
-
- message := []byte("message")
- var noHash crypto.Hash
- signature, err := signer.Sign(zero, message, noHash)
- if err != nil {
- t.Fatalf("error from Sign(): %s", err)
- }
-
- if !Verify(public, message, signature) {
- t.Errorf("Verify failed on signature from Sign()")
- }
-}
-
-func TestGolden(t *testing.T) {
- // sign.input.gz is a selection of test cases from
- // https://ed25519.cr.yp.to/python/sign.input
- testDataZ, err := os.Open("testdata/sign.input.gz")
- if err != nil {
- t.Fatal(err)
- }
- defer testDataZ.Close()
- testData, err := gzip.NewReader(testDataZ)
- if err != nil {
- t.Fatal(err)
- }
- defer testData.Close()
-
- scanner := bufio.NewScanner(testData)
- lineNo := 0
-
- for scanner.Scan() {
- lineNo++
-
- line := scanner.Text()
- parts := strings.Split(line, ":")
- if len(parts) != 5 {
- t.Fatalf("bad number of parts on line %d", lineNo)
- }
-
- privBytes, _ := hex.DecodeString(parts[0])
- pubKey, _ := hex.DecodeString(parts[1])
- msg, _ := hex.DecodeString(parts[2])
- sig, _ := hex.DecodeString(parts[3])
- // The signatures in the test vectors also include the message
- // at the end, but we just want R and S.
- sig = sig[:SignatureSize]
-
- if l := len(pubKey); l != PublicKeySize {
- t.Fatalf("bad public key length on line %d: got %d bytes", lineNo, l)
- }
-
- var priv [PrivateKeySize]byte
- copy(priv[:], privBytes)
- copy(priv[32:], pubKey)
-
- sig2 := Sign(priv[:], msg)
- if !bytes.Equal(sig, sig2[:]) {
- t.Errorf("different signature result on line %d: %x vs %x", lineNo, sig, sig2)
- }
-
- if !Verify(pubKey, msg, sig2) {
- t.Errorf("signature failed to verify on line %d", lineNo)
- }
- }
-
- if err := scanner.Err(); err != nil {
- t.Fatalf("error reading test data: %s", err)
- }
-}
-
-func BenchmarkKeyGeneration(b *testing.B) {
- var zero zeroReader
- for i := 0; i < b.N; i++ {
- if _, _, err := GenerateKey(zero); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkSigning(b *testing.B) {
- var zero zeroReader
- _, priv, err := GenerateKey(zero)
- if err != nil {
- b.Fatal(err)
- }
- message := []byte("Hello, world!")
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Sign(priv, message)
- }
-}
-
-func BenchmarkVerification(b *testing.B) {
- var zero zeroReader
- pub, priv, err := GenerateKey(zero)
- if err != nil {
- b.Fatal(err)
- }
- message := []byte("Hello, world!")
- signature := Sign(priv, message)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Verify(pub, message, signature)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
deleted file mode 100644
index e39f086c1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
+++ /dev/null
@@ -1,1422 +0,0 @@
-// Copyright 2016 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 file.
-
-package edwards25519
-
-// These values are from the public domain, “ref10†implementation of ed25519
-// from SUPERCOP.
-
-// d is a constant in the Edwards curve equation.
-var d = FieldElement{
- -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116,
-}
-
-// d2 is 2*d.
-var d2 = FieldElement{
- -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199,
-}
-
-// SqrtM1 is the square-root of -1 in the field.
-var SqrtM1 = FieldElement{
- -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482,
-}
-
-// A is a constant in the Montgomery-form of curve25519.
-var A = FieldElement{
- 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-}
-
-// bi contains precomputed multiples of the base-point. See the Ed25519 paper
-// for a discussion about how these values are used.
-var bi = [8]PreComputedGroupElement{
- {
- FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
- FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
- FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
- },
- {
- FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
- FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
- FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
- },
- {
- FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
- FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
- FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
- },
- {
- FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
- FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
- FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
- },
- {
- FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877},
- FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951},
- FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784},
- },
- {
- FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436},
- FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918},
- FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877},
- },
- {
- FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800},
- FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305},
- FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300},
- },
- {
- FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876},
- FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619},
- FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683},
- },
-}
-
-// base contains precomputed multiples of the base-point. See the Ed25519 paper
-// for a discussion about how these values are used.
-var base = [32][8]PreComputedGroupElement{
- {
- {
- FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
- FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
- FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
- },
- {
- FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303},
- FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081},
- FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697},
- },
- {
- FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
- FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
- FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
- },
- {
- FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540},
- FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397},
- FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325},
- },
- {
- FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
- FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
- FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
- },
- {
- FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777},
- FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737},
- FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652},
- },
- {
- FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
- FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
- FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
- },
- {
- FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726},
- FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955},
- FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425},
- },
- },
- {
- {
- FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171},
- FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510},
- FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660},
- },
- {
- FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639},
- FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963},
- FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950},
- },
- {
- FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568},
- FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335},
- FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628},
- },
- {
- FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007},
- FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772},
- FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653},
- },
- {
- FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567},
- FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686},
- FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372},
- },
- {
- FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887},
- FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954},
- FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953},
- },
- {
- FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833},
- FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532},
- FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876},
- },
- {
- FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268},
- FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214},
- FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038},
- },
- },
- {
- {
- FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800},
- FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645},
- FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664},
- },
- {
- FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933},
- FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182},
- FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222},
- },
- {
- FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991},
- FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880},
- FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092},
- },
- {
- FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295},
- FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788},
- FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553},
- },
- {
- FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026},
- FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347},
- FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033},
- },
- {
- FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395},
- FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278},
- FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890},
- },
- {
- FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995},
- FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596},
- FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891},
- },
- {
- FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060},
- FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608},
- FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606},
- },
- },
- {
- {
- FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389},
- FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016},
- FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341},
- },
- {
- FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505},
- FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553},
- FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655},
- },
- {
- FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220},
- FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631},
- FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099},
- },
- {
- FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556},
- FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749},
- FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930},
- },
- {
- FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391},
- FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253},
- FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066},
- },
- {
- FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958},
- FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082},
- FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383},
- },
- {
- FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521},
- FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807},
- FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948},
- },
- {
- FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134},
- FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455},
- FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629},
- },
- },
- {
- {
- FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069},
- FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746},
- FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919},
- },
- {
- FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837},
- FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906},
- FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771},
- },
- {
- FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817},
- FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098},
- FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409},
- },
- {
- FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504},
- FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727},
- FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420},
- },
- {
- FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003},
- FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605},
- FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384},
- },
- {
- FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701},
- FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683},
- FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708},
- },
- {
- FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563},
- FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260},
- FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387},
- },
- {
- FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672},
- FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686},
- FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665},
- },
- },
- {
- {
- FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182},
- FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277},
- FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628},
- },
- {
- FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474},
- FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539},
- FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822},
- },
- {
- FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970},
- FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756},
- FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508},
- },
- {
- FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683},
- FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655},
- FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158},
- },
- {
- FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125},
- FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839},
- FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664},
- },
- {
- FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294},
- FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899},
- FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070},
- },
- {
- FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294},
- FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949},
- FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083},
- },
- {
- FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420},
- FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940},
- FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396},
- },
- },
- {
- {
- FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567},
- FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127},
- FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294},
- },
- {
- FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887},
- FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964},
- FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195},
- },
- {
- FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244},
- FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999},
- FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762},
- },
- {
- FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274},
- FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236},
- FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605},
- },
- {
- FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761},
- FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884},
- FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482},
- },
- {
- FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638},
- FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490},
- FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170},
- },
- {
- FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736},
- FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124},
- FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392},
- },
- {
- FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029},
- FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048},
- FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958},
- },
- },
- {
- {
- FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593},
- FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071},
- FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692},
- },
- {
- FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687},
- FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441},
- FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001},
- },
- {
- FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460},
- FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007},
- FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762},
- },
- {
- FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005},
- FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674},
- FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035},
- },
- {
- FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590},
- FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957},
- FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812},
- },
- {
- FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740},
- FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122},
- FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158},
- },
- {
- FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885},
- FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140},
- FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857},
- },
- {
- FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155},
- FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260},
- FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483},
- },
- },
- {
- {
- FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677},
- FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815},
- FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751},
- },
- {
- FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203},
- FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208},
- FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230},
- },
- {
- FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850},
- FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389},
- FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968},
- },
- {
- FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689},
- FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880},
- FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304},
- },
- {
- FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632},
- FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412},
- FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566},
- },
- {
- FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038},
- FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232},
- FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943},
- },
- {
- FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856},
- FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738},
- FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971},
- },
- {
- FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718},
- FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697},
- FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883},
- },
- },
- {
- {
- FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912},
- FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358},
- FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849},
- },
- {
- FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307},
- FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977},
- FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335},
- },
- {
- FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644},
- FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616},
- FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735},
- },
- {
- FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099},
- FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341},
- FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336},
- },
- {
- FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646},
- FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425},
- FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388},
- },
- {
- FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743},
- FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822},
- FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462},
- },
- {
- FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985},
- FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702},
- FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797},
- },
- {
- FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293},
- FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100},
- FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688},
- },
- },
- {
- {
- FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186},
- FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610},
- FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707},
- },
- {
- FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220},
- FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025},
- FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044},
- },
- {
- FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992},
- FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027},
- FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197},
- },
- {
- FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901},
- FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952},
- FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878},
- },
- {
- FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390},
- FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730},
- FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730},
- },
- {
- FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180},
- FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272},
- FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715},
- },
- {
- FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970},
- FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772},
- FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865},
- },
- {
- FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750},
- FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373},
- FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348},
- },
- },
- {
- {
- FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144},
- FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195},
- FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086},
- },
- {
- FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684},
- FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518},
- FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233},
- },
- {
- FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793},
- FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794},
- FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435},
- },
- {
- FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921},
- FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518},
- FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563},
- },
- {
- FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278},
- FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024},
- FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030},
- },
- {
- FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783},
- FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717},
- FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844},
- },
- {
- FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333},
- FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048},
- FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760},
- },
- {
- FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760},
- FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757},
- FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112},
- },
- },
- {
- {
- FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468},
- FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184},
- FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289},
- },
- {
- FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066},
- FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882},
- FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226},
- },
- {
- FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101},
- FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279},
- FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811},
- },
- {
- FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709},
- FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714},
- FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121},
- },
- {
- FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464},
- FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847},
- FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400},
- },
- {
- FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414},
- FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158},
- FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045},
- },
- {
- FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415},
- FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459},
- FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079},
- },
- {
- FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412},
- FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743},
- FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836},
- },
- },
- {
- {
- FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022},
- FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429},
- FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065},
- },
- {
- FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861},
- FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000},
- FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101},
- },
- {
- FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815},
- FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642},
- FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966},
- },
- {
- FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574},
- FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742},
- FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689},
- },
- {
- FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020},
- FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772},
- FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982},
- },
- {
- FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953},
- FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218},
- FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265},
- },
- {
- FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073},
- FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325},
- FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798},
- },
- {
- FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870},
- FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863},
- FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927},
- },
- },
- {
- {
- FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267},
- FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663},
- FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862},
- },
- {
- FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673},
- FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943},
- FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020},
- },
- {
- FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238},
- FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064},
- FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795},
- },
- {
- FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052},
- FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904},
- FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531},
- },
- {
- FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979},
- FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841},
- FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431},
- },
- {
- FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324},
- FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940},
- FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320},
- },
- {
- FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184},
- FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114},
- FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878},
- },
- {
- FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784},
- FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091},
- FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585},
- },
- },
- {
- {
- FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208},
- FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864},
- FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661},
- },
- {
- FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233},
- FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212},
- FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525},
- },
- {
- FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068},
- FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397},
- FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988},
- },
- {
- FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889},
- FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038},
- FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697},
- },
- {
- FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875},
- FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905},
- FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656},
- },
- {
- FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818},
- FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714},
- FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203},
- },
- {
- FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931},
- FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024},
- FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084},
- },
- {
- FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204},
- FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817},
- FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667},
- },
- },
- {
- {
- FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504},
- FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768},
- FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255},
- },
- {
- FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790},
- FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438},
- FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333},
- },
- {
- FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971},
- FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905},
- FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409},
- },
- {
- FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409},
- FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499},
- FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363},
- },
- {
- FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664},
- FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324},
- FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940},
- },
- {
- FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990},
- FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914},
- FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290},
- },
- {
- FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257},
- FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433},
- FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236},
- },
- {
- FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045},
- FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093},
- FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347},
- },
- },
- {
- {
- FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191},
- FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507},
- FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906},
- },
- {
- FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018},
- FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109},
- FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926},
- },
- {
- FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528},
- FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625},
- FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286},
- },
- {
- FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033},
- FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866},
- FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896},
- },
- {
- FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075},
- FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347},
- FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437},
- },
- {
- FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165},
- FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588},
- FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193},
- },
- {
- FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017},
- FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883},
- FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961},
- },
- {
- FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043},
- FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663},
- FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362},
- },
- },
- {
- {
- FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860},
- FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466},
- FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063},
- },
- {
- FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997},
- FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295},
- FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369},
- },
- {
- FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385},
- FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109},
- FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906},
- },
- {
- FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424},
- FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185},
- FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962},
- },
- {
- FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325},
- FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593},
- FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404},
- },
- {
- FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644},
- FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801},
- FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804},
- },
- {
- FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884},
- FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577},
- FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849},
- },
- {
- FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473},
- FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644},
- FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319},
- },
- },
- {
- {
- FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599},
- FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768},
- FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084},
- },
- {
- FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328},
- FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369},
- FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920},
- },
- {
- FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815},
- FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025},
- FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397},
- },
- {
- FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448},
- FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981},
- FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165},
- },
- {
- FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501},
- FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073},
- FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861},
- },
- {
- FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845},
- FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211},
- FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870},
- },
- {
- FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096},
- FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803},
- FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168},
- },
- {
- FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965},
- FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505},
- FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598},
- },
- },
- {
- {
- FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782},
- FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900},
- FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479},
- },
- {
- FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208},
- FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232},
- FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719},
- },
- {
- FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271},
- FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326},
- FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132},
- },
- {
- FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300},
- FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570},
- FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670},
- },
- {
- FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994},
- FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913},
- FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317},
- },
- {
- FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730},
- FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096},
- FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078},
- },
- {
- FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411},
- FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905},
- FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654},
- },
- {
- FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870},
- FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498},
- FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579},
- },
- },
- {
- {
- FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677},
- FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647},
- FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743},
- },
- {
- FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468},
- FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375},
- FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155},
- },
- {
- FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725},
- FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612},
- FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943},
- },
- {
- FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944},
- FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928},
- FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406},
- },
- {
- FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139},
- FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963},
- FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693},
- },
- {
- FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734},
- FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680},
- FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410},
- },
- {
- FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931},
- FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654},
- FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710},
- },
- {
- FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180},
- FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684},
- FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895},
- },
- },
- {
- {
- FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501},
- FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413},
- FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880},
- },
- {
- FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874},
- FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962},
- FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899},
- },
- {
- FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152},
- FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063},
- FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080},
- },
- {
- FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146},
- FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183},
- FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133},
- },
- {
- FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421},
- FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622},
- FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197},
- },
- {
- FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663},
- FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753},
- FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755},
- },
- {
- FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862},
- FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118},
- FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171},
- },
- {
- FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380},
- FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824},
- FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270},
- },
- },
- {
- {
- FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438},
- FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584},
- FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562},
- },
- {
- FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471},
- FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610},
- FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269},
- },
- {
- FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650},
- FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369},
- FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461},
- },
- {
- FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462},
- FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793},
- FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218},
- },
- {
- FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226},
- FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019},
- FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037},
- },
- {
- FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171},
- FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132},
- FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841},
- },
- {
- FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181},
- FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210},
- FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040},
- },
- {
- FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935},
- FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105},
- FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814},
- },
- },
- {
- {
- FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852},
- FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581},
- FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646},
- },
- {
- FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844},
- FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025},
- FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453},
- },
- {
- FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068},
- FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192},
- FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921},
- },
- {
- FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259},
- FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426},
- FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072},
- },
- {
- FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305},
- FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832},
- FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943},
- },
- {
- FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011},
- FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447},
- FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494},
- },
- {
- FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245},
- FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859},
- FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915},
- },
- {
- FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707},
- FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848},
- FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224},
- },
- },
- {
- {
- FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391},
- FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215},
- FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101},
- },
- {
- FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713},
- FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849},
- FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930},
- },
- {
- FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940},
- FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031},
- FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404},
- },
- {
- FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243},
- FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116},
- FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525},
- },
- {
- FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509},
- FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883},
- FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865},
- },
- {
- FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660},
- FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273},
- FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138},
- },
- {
- FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560},
- FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135},
- FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941},
- },
- {
- FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739},
- FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756},
- FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819},
- },
- },
- {
- {
- FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347},
- FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028},
- FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075},
- },
- {
- FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799},
- FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609},
- FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817},
- },
- {
- FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989},
- FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523},
- FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278},
- },
- {
- FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045},
- FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377},
- FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480},
- },
- {
- FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016},
- FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426},
- FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525},
- },
- {
- FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396},
- FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080},
- FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892},
- },
- {
- FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275},
- FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074},
- FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140},
- },
- {
- FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717},
- FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101},
- FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127},
- },
- },
- {
- {
- FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632},
- FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415},
- FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160},
- },
- {
- FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876},
- FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625},
- FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478},
- },
- {
- FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164},
- FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595},
- FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248},
- },
- {
- FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858},
- FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193},
- FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184},
- },
- {
- FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942},
- FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635},
- FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948},
- },
- {
- FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935},
- FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415},
- FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416},
- },
- {
- FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018},
- FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778},
- FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659},
- },
- {
- FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385},
- FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503},
- FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329},
- },
- },
- {
- {
- FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056},
- FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838},
- FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948},
- },
- {
- FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691},
- FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118},
- FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517},
- },
- {
- FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269},
- FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904},
- FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589},
- },
- {
- FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193},
- FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910},
- FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930},
- },
- {
- FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667},
- FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481},
- FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876},
- },
- {
- FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640},
- FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278},
- FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112},
- },
- {
- FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272},
- FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012},
- FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221},
- },
- {
- FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046},
- FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345},
- FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310},
- },
- },
- {
- {
- FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937},
- FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636},
- FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008},
- },
- {
- FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429},
- FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576},
- FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066},
- },
- {
- FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490},
- FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104},
- FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053},
- },
- {
- FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275},
- FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511},
- FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095},
- },
- {
- FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439},
- FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939},
- FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424},
- },
- {
- FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310},
- FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608},
- FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079},
- },
- {
- FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101},
- FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418},
- FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576},
- },
- {
- FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356},
- FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996},
- FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099},
- },
- },
- {
- {
- FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728},
- FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658},
- FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242},
- },
- {
- FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001},
- FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766},
- FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373},
- },
- {
- FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458},
- FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628},
- FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657},
- },
- {
- FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062},
- FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616},
- FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014},
- },
- {
- FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383},
- FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814},
- FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718},
- },
- {
- FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417},
- FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222},
- FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444},
- },
- {
- FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597},
- FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970},
- FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799},
- },
- {
- FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647},
- FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511},
- FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032},
- },
- },
- {
- {
- FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834},
- FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461},
- FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062},
- },
- {
- FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516},
- FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547},
- FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240},
- },
- {
- FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038},
- FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741},
- FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103},
- },
- {
- FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747},
- FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323},
- FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016},
- },
- {
- FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373},
- FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228},
- FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141},
- },
- {
- FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399},
- FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831},
- FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376},
- },
- {
- FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313},
- FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958},
- FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577},
- },
- {
- FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743},
- FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684},
- FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476},
- },
- },
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
deleted file mode 100644
index 5f8b99478..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
+++ /dev/null
@@ -1,1771 +0,0 @@
-// Copyright 2016 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 file.
-
-package edwards25519
-
-// This code is a port of the public domain, “ref10†implementation of ed25519
-// from SUPERCOP.
-
-// FieldElement represents an element of the field GF(2^255 - 19). An element
-// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
-// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
-// context.
-type FieldElement [10]int32
-
-var zero FieldElement
-
-func FeZero(fe *FieldElement) {
- copy(fe[:], zero[:])
-}
-
-func FeOne(fe *FieldElement) {
- FeZero(fe)
- fe[0] = 1
-}
-
-func FeAdd(dst, a, b *FieldElement) {
- dst[0] = a[0] + b[0]
- dst[1] = a[1] + b[1]
- dst[2] = a[2] + b[2]
- dst[3] = a[3] + b[3]
- dst[4] = a[4] + b[4]
- dst[5] = a[5] + b[5]
- dst[6] = a[6] + b[6]
- dst[7] = a[7] + b[7]
- dst[8] = a[8] + b[8]
- dst[9] = a[9] + b[9]
-}
-
-func FeSub(dst, a, b *FieldElement) {
- dst[0] = a[0] - b[0]
- dst[1] = a[1] - b[1]
- dst[2] = a[2] - b[2]
- dst[3] = a[3] - b[3]
- dst[4] = a[4] - b[4]
- dst[5] = a[5] - b[5]
- dst[6] = a[6] - b[6]
- dst[7] = a[7] - b[7]
- dst[8] = a[8] - b[8]
- dst[9] = a[9] - b[9]
-}
-
-func FeCopy(dst, src *FieldElement) {
- copy(dst[:], src[:])
-}
-
-// Replace (f,g) with (g,g) if b == 1;
-// replace (f,g) with (f,g) if b == 0.
-//
-// Preconditions: b in {0,1}.
-func FeCMove(f, g *FieldElement, b int32) {
- b = -b
- f[0] ^= b & (f[0] ^ g[0])
- f[1] ^= b & (f[1] ^ g[1])
- f[2] ^= b & (f[2] ^ g[2])
- f[3] ^= b & (f[3] ^ g[3])
- f[4] ^= b & (f[4] ^ g[4])
- f[5] ^= b & (f[5] ^ g[5])
- f[6] ^= b & (f[6] ^ g[6])
- f[7] ^= b & (f[7] ^ g[7])
- f[8] ^= b & (f[8] ^ g[8])
- f[9] ^= b & (f[9] ^ g[9])
-}
-
-func load3(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- return r
-}
-
-func load4(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- r |= int64(in[3]) << 24
- return r
-}
-
-func FeFromBytes(dst *FieldElement, src *[32]byte) {
- h0 := load4(src[:])
- h1 := load3(src[4:]) << 6
- h2 := load3(src[7:]) << 5
- h3 := load3(src[10:]) << 3
- h4 := load3(src[13:]) << 2
- h5 := load4(src[16:])
- h6 := load3(src[20:]) << 7
- h7 := load3(src[23:]) << 5
- h8 := load3(src[26:]) << 4
- h9 := (load3(src[29:]) & 8388607) << 2
-
- FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-// FeToBytes marshals h to s.
-// Preconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Write p=2^255-19; q=floor(h/p).
-// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
-//
-// Proof:
-// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
-// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
-//
-// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
-// Then 0<y<1.
-//
-// Write r=h-pq.
-// Have 0<=r<=p-1=2^255-20.
-// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
-//
-// Write x=r+19(2^-255)r+y.
-// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
-//
-// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
-// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
-func FeToBytes(s *[32]byte, h *FieldElement) {
- var carry [10]int32
-
- q := (19*h[9] + (1 << 24)) >> 25
- q = (h[0] + q) >> 26
- q = (h[1] + q) >> 25
- q = (h[2] + q) >> 26
- q = (h[3] + q) >> 25
- q = (h[4] + q) >> 26
- q = (h[5] + q) >> 25
- q = (h[6] + q) >> 26
- q = (h[7] + q) >> 25
- q = (h[8] + q) >> 26
- q = (h[9] + q) >> 25
-
- // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
- h[0] += 19 * q
- // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
-
- carry[0] = h[0] >> 26
- h[1] += carry[0]
- h[0] -= carry[0] << 26
- carry[1] = h[1] >> 25
- h[2] += carry[1]
- h[1] -= carry[1] << 25
- carry[2] = h[2] >> 26
- h[3] += carry[2]
- h[2] -= carry[2] << 26
- carry[3] = h[3] >> 25
- h[4] += carry[3]
- h[3] -= carry[3] << 25
- carry[4] = h[4] >> 26
- h[5] += carry[4]
- h[4] -= carry[4] << 26
- carry[5] = h[5] >> 25
- h[6] += carry[5]
- h[5] -= carry[5] << 25
- carry[6] = h[6] >> 26
- h[7] += carry[6]
- h[6] -= carry[6] << 26
- carry[7] = h[7] >> 25
- h[8] += carry[7]
- h[7] -= carry[7] << 25
- carry[8] = h[8] >> 26
- h[9] += carry[8]
- h[8] -= carry[8] << 26
- carry[9] = h[9] >> 25
- h[9] -= carry[9] << 25
- // h10 = carry9
-
- // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
- // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
- // evidently 2^255 h10-2^255 q = 0.
- // Goal: Output h[0]+...+2^230 h[9].
-
- s[0] = byte(h[0] >> 0)
- s[1] = byte(h[0] >> 8)
- s[2] = byte(h[0] >> 16)
- s[3] = byte((h[0] >> 24) | (h[1] << 2))
- s[4] = byte(h[1] >> 6)
- s[5] = byte(h[1] >> 14)
- s[6] = byte((h[1] >> 22) | (h[2] << 3))
- s[7] = byte(h[2] >> 5)
- s[8] = byte(h[2] >> 13)
- s[9] = byte((h[2] >> 21) | (h[3] << 5))
- s[10] = byte(h[3] >> 3)
- s[11] = byte(h[3] >> 11)
- s[12] = byte((h[3] >> 19) | (h[4] << 6))
- s[13] = byte(h[4] >> 2)
- s[14] = byte(h[4] >> 10)
- s[15] = byte(h[4] >> 18)
- s[16] = byte(h[5] >> 0)
- s[17] = byte(h[5] >> 8)
- s[18] = byte(h[5] >> 16)
- s[19] = byte((h[5] >> 24) | (h[6] << 1))
- s[20] = byte(h[6] >> 7)
- s[21] = byte(h[6] >> 15)
- s[22] = byte((h[6] >> 23) | (h[7] << 3))
- s[23] = byte(h[7] >> 5)
- s[24] = byte(h[7] >> 13)
- s[25] = byte((h[7] >> 21) | (h[8] << 4))
- s[26] = byte(h[8] >> 4)
- s[27] = byte(h[8] >> 12)
- s[28] = byte((h[8] >> 20) | (h[9] << 6))
- s[29] = byte(h[9] >> 2)
- s[30] = byte(h[9] >> 10)
- s[31] = byte(h[9] >> 18)
-}
-
-func FeIsNegative(f *FieldElement) byte {
- var s [32]byte
- FeToBytes(&s, f)
- return s[0] & 1
-}
-
-func FeIsNonZero(f *FieldElement) int32 {
- var s [32]byte
- FeToBytes(&s, f)
- var x uint8
- for _, b := range s {
- x |= b
- }
- x |= x >> 4
- x |= x >> 2
- x |= x >> 1
- return int32(x & 1)
-}
-
-// FeNeg sets h = -f
-//
-// Preconditions:
-// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func FeNeg(h, f *FieldElement) {
- h[0] = -f[0]
- h[1] = -f[1]
- h[2] = -f[2]
- h[3] = -f[3]
- h[4] = -f[4]
- h[5] = -f[5]
- h[6] = -f[6]
- h[7] = -f[7]
- h[8] = -f[8]
- h[9] = -f[9]
-}
-
-func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
- var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64
-
- /*
- |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
- i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
- |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
- i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
- */
-
- c0 = (h0 + (1 << 25)) >> 26
- h1 += c0
- h0 -= c0 << 26
- c4 = (h4 + (1 << 25)) >> 26
- h5 += c4
- h4 -= c4 << 26
- /* |h0| <= 2^25 */
- /* |h4| <= 2^25 */
- /* |h1| <= 1.51*2^58 */
- /* |h5| <= 1.51*2^58 */
-
- c1 = (h1 + (1 << 24)) >> 25
- h2 += c1
- h1 -= c1 << 25
- c5 = (h5 + (1 << 24)) >> 25
- h6 += c5
- h5 -= c5 << 25
- /* |h1| <= 2^24; from now on fits into int32 */
- /* |h5| <= 2^24; from now on fits into int32 */
- /* |h2| <= 1.21*2^59 */
- /* |h6| <= 1.21*2^59 */
-
- c2 = (h2 + (1 << 25)) >> 26
- h3 += c2
- h2 -= c2 << 26
- c6 = (h6 + (1 << 25)) >> 26
- h7 += c6
- h6 -= c6 << 26
- /* |h2| <= 2^25; from now on fits into int32 unchanged */
- /* |h6| <= 2^25; from now on fits into int32 unchanged */
- /* |h3| <= 1.51*2^58 */
- /* |h7| <= 1.51*2^58 */
-
- c3 = (h3 + (1 << 24)) >> 25
- h4 += c3
- h3 -= c3 << 25
- c7 = (h7 + (1 << 24)) >> 25
- h8 += c7
- h7 -= c7 << 25
- /* |h3| <= 2^24; from now on fits into int32 unchanged */
- /* |h7| <= 2^24; from now on fits into int32 unchanged */
- /* |h4| <= 1.52*2^33 */
- /* |h8| <= 1.52*2^33 */
-
- c4 = (h4 + (1 << 25)) >> 26
- h5 += c4
- h4 -= c4 << 26
- c8 = (h8 + (1 << 25)) >> 26
- h9 += c8
- h8 -= c8 << 26
- /* |h4| <= 2^25; from now on fits into int32 unchanged */
- /* |h8| <= 2^25; from now on fits into int32 unchanged */
- /* |h5| <= 1.01*2^24 */
- /* |h9| <= 1.51*2^58 */
-
- c9 = (h9 + (1 << 24)) >> 25
- h0 += c9 * 19
- h9 -= c9 << 25
- /* |h9| <= 2^24; from now on fits into int32 unchanged */
- /* |h0| <= 1.8*2^37 */
-
- c0 = (h0 + (1 << 25)) >> 26
- h1 += c0
- h0 -= c0 << 26
- /* |h0| <= 2^25; from now on fits into int32 unchanged */
- /* |h1| <= 1.01*2^24 */
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// FeMul calculates h = f * g
-// Can overlap h with f or g.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Notes on implementation strategy:
-//
-// Using schoolbook multiplication.
-// Karatsuba would save a little in some cost models.
-//
-// Most multiplications by 2 and 19 are 32-bit precomputations;
-// cheaper than 64-bit postcomputations.
-//
-// There is one remaining multiplication by 19 in the carry chain;
-// one *19 precomputation can be merged into this,
-// but the resulting data flow is considerably less clean.
-//
-// There are 12 carries below.
-// 10 of them are 2-way parallelizable and vectorizable.
-// Can get away with 11 carries, but then data flow is much deeper.
-//
-// With tighter constraints on inputs, can squeeze carries into int32.
-func FeMul(h, f, g *FieldElement) {
- f0 := int64(f[0])
- f1 := int64(f[1])
- f2 := int64(f[2])
- f3 := int64(f[3])
- f4 := int64(f[4])
- f5 := int64(f[5])
- f6 := int64(f[6])
- f7 := int64(f[7])
- f8 := int64(f[8])
- f9 := int64(f[9])
-
- f1_2 := int64(2 * f[1])
- f3_2 := int64(2 * f[3])
- f5_2 := int64(2 * f[5])
- f7_2 := int64(2 * f[7])
- f9_2 := int64(2 * f[9])
-
- g0 := int64(g[0])
- g1 := int64(g[1])
- g2 := int64(g[2])
- g3 := int64(g[3])
- g4 := int64(g[4])
- g5 := int64(g[5])
- g6 := int64(g[6])
- g7 := int64(g[7])
- g8 := int64(g[8])
- g9 := int64(g[9])
-
- g1_19 := int64(19 * g[1]) /* 1.4*2^29 */
- g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */
- g3_19 := int64(19 * g[3])
- g4_19 := int64(19 * g[4])
- g5_19 := int64(19 * g[5])
- g6_19 := int64(19 * g[6])
- g7_19 := int64(19 * g[7])
- g8_19 := int64(19 * g[8])
- g9_19 := int64(19 * g[9])
-
- h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19
- h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19
- h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19
- h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19
- h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19
- h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19
- h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19
- h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19
- h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19
- h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0
-
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
- f0 := int64(f[0])
- f1 := int64(f[1])
- f2 := int64(f[2])
- f3 := int64(f[3])
- f4 := int64(f[4])
- f5 := int64(f[5])
- f6 := int64(f[6])
- f7 := int64(f[7])
- f8 := int64(f[8])
- f9 := int64(f[9])
- f0_2 := int64(2 * f[0])
- f1_2 := int64(2 * f[1])
- f2_2 := int64(2 * f[2])
- f3_2 := int64(2 * f[3])
- f4_2 := int64(2 * f[4])
- f5_2 := int64(2 * f[5])
- f6_2 := int64(2 * f[6])
- f7_2 := int64(2 * f[7])
- f5_38 := 38 * f5 // 1.31*2^30
- f6_19 := 19 * f6 // 1.31*2^30
- f7_38 := 38 * f7 // 1.31*2^30
- f8_19 := 19 * f8 // 1.31*2^30
- f9_38 := 38 * f9 // 1.31*2^30
-
- h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38
- h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19
- h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19
- h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38
- h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38
- h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19
- h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19
- h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38
- h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38
- h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5
-
- return
-}
-
-// FeSquare calculates h = f*f. Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func FeSquare(h, f *FieldElement) {
- h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-// FeSquare2 sets h = 2 * f * f
-//
-// Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
-// See fe_mul.c for discussion of implementation strategy.
-func FeSquare2(h, f *FieldElement) {
- h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
-
- h0 += h0
- h1 += h1
- h2 += h2
- h3 += h3
- h4 += h4
- h5 += h5
- h6 += h6
- h7 += h7
- h8 += h8
- h9 += h9
-
- FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
-}
-
-func FeInvert(out, z *FieldElement) {
- var t0, t1, t2, t3 FieldElement
- var i int
-
- FeSquare(&t0, z) // 2^1
- FeSquare(&t1, &t0) // 2^2
- for i = 1; i < 2; i++ { // 2^3
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, z, &t1) // 2^3 + 2^0
- FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0
- FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1
- FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0
- FeSquare(&t2, &t1) // 5,4,3,2,1
- for i = 1; i < 5; i++ { // 9,8,7,6,5
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0
- FeSquare(&t2, &t1) // 10..1
- for i = 1; i < 10; i++ { // 19..10
- FeSquare(&t2, &t2)
- }
- FeMul(&t2, &t2, &t1) // 19..0
- FeSquare(&t3, &t2) // 20..1
- for i = 1; i < 20; i++ { // 39..20
- FeSquare(&t3, &t3)
- }
- FeMul(&t2, &t3, &t2) // 39..0
- FeSquare(&t2, &t2) // 40..1
- for i = 1; i < 10; i++ { // 49..10
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 49..0
- FeSquare(&t2, &t1) // 50..1
- for i = 1; i < 50; i++ { // 99..50
- FeSquare(&t2, &t2)
- }
- FeMul(&t2, &t2, &t1) // 99..0
- FeSquare(&t3, &t2) // 100..1
- for i = 1; i < 100; i++ { // 199..100
- FeSquare(&t3, &t3)
- }
- FeMul(&t2, &t3, &t2) // 199..0
- FeSquare(&t2, &t2) // 200..1
- for i = 1; i < 50; i++ { // 249..50
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1) // 249..0
- FeSquare(&t1, &t1) // 250..1
- for i = 1; i < 5; i++ { // 254..5
- FeSquare(&t1, &t1)
- }
- FeMul(out, &t1, &t0) // 254..5,3,1,0
-}
-
-func fePow22523(out, z *FieldElement) {
- var t0, t1, t2 FieldElement
- var i int
-
- FeSquare(&t0, z)
- for i = 1; i < 1; i++ {
- FeSquare(&t0, &t0)
- }
- FeSquare(&t1, &t0)
- for i = 1; i < 2; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, z, &t1)
- FeMul(&t0, &t0, &t1)
- FeSquare(&t0, &t0)
- for i = 1; i < 1; i++ {
- FeSquare(&t0, &t0)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 5; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 10; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, &t1, &t0)
- FeSquare(&t2, &t1)
- for i = 1; i < 20; i++ {
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1)
- FeSquare(&t1, &t1)
- for i = 1; i < 10; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t1, &t0)
- for i = 1; i < 50; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t1, &t1, &t0)
- FeSquare(&t2, &t1)
- for i = 1; i < 100; i++ {
- FeSquare(&t2, &t2)
- }
- FeMul(&t1, &t2, &t1)
- FeSquare(&t1, &t1)
- for i = 1; i < 50; i++ {
- FeSquare(&t1, &t1)
- }
- FeMul(&t0, &t1, &t0)
- FeSquare(&t0, &t0)
- for i = 1; i < 2; i++ {
- FeSquare(&t0, &t0)
- }
- FeMul(out, &t0, z)
-}
-
-// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 *
-// y^2 where d = -121665/121666.
-//
-// Several representations are used:
-// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z
-// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT
-// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T
-// PreComputedGroupElement: (y+x,y-x,2dxy)
-
-type ProjectiveGroupElement struct {
- X, Y, Z FieldElement
-}
-
-type ExtendedGroupElement struct {
- X, Y, Z, T FieldElement
-}
-
-type CompletedGroupElement struct {
- X, Y, Z, T FieldElement
-}
-
-type PreComputedGroupElement struct {
- yPlusX, yMinusX, xy2d FieldElement
-}
-
-type CachedGroupElement struct {
- yPlusX, yMinusX, Z, T2d FieldElement
-}
-
-func (p *ProjectiveGroupElement) Zero() {
- FeZero(&p.X)
- FeOne(&p.Y)
- FeOne(&p.Z)
-}
-
-func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) {
- var t0 FieldElement
-
- FeSquare(&r.X, &p.X)
- FeSquare(&r.Z, &p.Y)
- FeSquare2(&r.T, &p.Z)
- FeAdd(&r.Y, &p.X, &p.Y)
- FeSquare(&t0, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.X)
- FeSub(&r.Z, &r.Z, &r.X)
- FeSub(&r.X, &t0, &r.Y)
- FeSub(&r.T, &r.T, &r.Z)
-}
-
-func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) {
- var recip, x, y FieldElement
-
- FeInvert(&recip, &p.Z)
- FeMul(&x, &p.X, &recip)
- FeMul(&y, &p.Y, &recip)
- FeToBytes(s, &y)
- s[31] ^= FeIsNegative(&x) << 7
-}
-
-func (p *ExtendedGroupElement) Zero() {
- FeZero(&p.X)
- FeOne(&p.Y)
- FeOne(&p.Z)
- FeZero(&p.T)
-}
-
-func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) {
- var q ProjectiveGroupElement
- p.ToProjective(&q)
- q.Double(r)
-}
-
-func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) {
- FeAdd(&r.yPlusX, &p.Y, &p.X)
- FeSub(&r.yMinusX, &p.Y, &p.X)
- FeCopy(&r.Z, &p.Z)
- FeMul(&r.T2d, &p.T, &d2)
-}
-
-func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) {
- FeCopy(&r.X, &p.X)
- FeCopy(&r.Y, &p.Y)
- FeCopy(&r.Z, &p.Z)
-}
-
-func (p *ExtendedGroupElement) ToBytes(s *[32]byte) {
- var recip, x, y FieldElement
-
- FeInvert(&recip, &p.Z)
- FeMul(&x, &p.X, &recip)
- FeMul(&y, &p.Y, &recip)
- FeToBytes(s, &y)
- s[31] ^= FeIsNegative(&x) << 7
-}
-
-func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool {
- var u, v, v3, vxx, check FieldElement
-
- FeFromBytes(&p.Y, s)
- FeOne(&p.Z)
- FeSquare(&u, &p.Y)
- FeMul(&v, &u, &d)
- FeSub(&u, &u, &p.Z) // y = y^2-1
- FeAdd(&v, &v, &p.Z) // v = dy^2+1
-
- FeSquare(&v3, &v)
- FeMul(&v3, &v3, &v) // v3 = v^3
- FeSquare(&p.X, &v3)
- FeMul(&p.X, &p.X, &v)
- FeMul(&p.X, &p.X, &u) // x = uv^7
-
- fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8)
- FeMul(&p.X, &p.X, &v3)
- FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8)
-
- var tmpX, tmp2 [32]byte
-
- FeSquare(&vxx, &p.X)
- FeMul(&vxx, &vxx, &v)
- FeSub(&check, &vxx, &u) // vx^2-u
- if FeIsNonZero(&check) == 1 {
- FeAdd(&check, &vxx, &u) // vx^2+u
- if FeIsNonZero(&check) == 1 {
- return false
- }
- FeMul(&p.X, &p.X, &SqrtM1)
-
- FeToBytes(&tmpX, &p.X)
- for i, v := range tmpX {
- tmp2[31-i] = v
- }
- }
-
- if FeIsNegative(&p.X) != (s[31] >> 7) {
- FeNeg(&p.X, &p.X)
- }
-
- FeMul(&p.T, &p.X, &p.Y)
- return true
-}
-
-func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) {
- FeMul(&r.X, &p.X, &p.T)
- FeMul(&r.Y, &p.Y, &p.Z)
- FeMul(&r.Z, &p.Z, &p.T)
-}
-
-func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) {
- FeMul(&r.X, &p.X, &p.T)
- FeMul(&r.Y, &p.Y, &p.Z)
- FeMul(&r.Z, &p.Z, &p.T)
- FeMul(&r.T, &p.X, &p.Y)
-}
-
-func (p *PreComputedGroupElement) Zero() {
- FeOne(&p.yPlusX)
- FeOne(&p.yMinusX)
- FeZero(&p.xy2d)
-}
-
-func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yPlusX)
- FeMul(&r.Y, &r.Y, &q.yMinusX)
- FeMul(&r.T, &q.T2d, &p.T)
- FeMul(&r.X, &p.Z, &q.Z)
- FeAdd(&t0, &r.X, &r.X)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeAdd(&r.Z, &t0, &r.T)
- FeSub(&r.T, &t0, &r.T)
-}
-
-func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yMinusX)
- FeMul(&r.Y, &r.Y, &q.yPlusX)
- FeMul(&r.T, &q.T2d, &p.T)
- FeMul(&r.X, &p.Z, &q.Z)
- FeAdd(&t0, &r.X, &r.X)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeSub(&r.Z, &t0, &r.T)
- FeAdd(&r.T, &t0, &r.T)
-}
-
-func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yPlusX)
- FeMul(&r.Y, &r.Y, &q.yMinusX)
- FeMul(&r.T, &q.xy2d, &p.T)
- FeAdd(&t0, &p.Z, &p.Z)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeAdd(&r.Z, &t0, &r.T)
- FeSub(&r.T, &t0, &r.T)
-}
-
-func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
- var t0 FieldElement
-
- FeAdd(&r.X, &p.Y, &p.X)
- FeSub(&r.Y, &p.Y, &p.X)
- FeMul(&r.Z, &r.X, &q.yMinusX)
- FeMul(&r.Y, &r.Y, &q.yPlusX)
- FeMul(&r.T, &q.xy2d, &p.T)
- FeAdd(&t0, &p.Z, &p.Z)
- FeSub(&r.X, &r.Z, &r.Y)
- FeAdd(&r.Y, &r.Z, &r.Y)
- FeSub(&r.Z, &t0, &r.T)
- FeAdd(&r.T, &t0, &r.T)
-}
-
-func slide(r *[256]int8, a *[32]byte) {
- for i := range r {
- r[i] = int8(1 & (a[i>>3] >> uint(i&7)))
- }
-
- for i := range r {
- if r[i] != 0 {
- for b := 1; b <= 6 && i+b < 256; b++ {
- if r[i+b] != 0 {
- if r[i]+(r[i+b]<<uint(b)) <= 15 {
- r[i] += r[i+b] << uint(b)
- r[i+b] = 0
- } else if r[i]-(r[i+b]<<uint(b)) >= -15 {
- r[i] -= r[i+b] << uint(b)
- for k := i + b; k < 256; k++ {
- if r[k] == 0 {
- r[k] = 1
- break
- }
- r[k] = 0
- }
- } else {
- break
- }
- }
- }
- }
- }
-}
-
-// GeDoubleScalarMultVartime sets r = a*A + b*B
-// where a = a[0]+256*a[1]+...+256^31 a[31].
-// and b = b[0]+256*b[1]+...+256^31 b[31].
-// B is the Ed25519 base point (x,4/5) with x positive.
-func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) {
- var aSlide, bSlide [256]int8
- var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A
- var t CompletedGroupElement
- var u, A2 ExtendedGroupElement
- var i int
-
- slide(&aSlide, a)
- slide(&bSlide, b)
-
- A.ToCached(&Ai[0])
- A.Double(&t)
- t.ToExtended(&A2)
-
- for i := 0; i < 7; i++ {
- geAdd(&t, &A2, &Ai[i])
- t.ToExtended(&u)
- u.ToCached(&Ai[i+1])
- }
-
- r.Zero()
-
- for i = 255; i >= 0; i-- {
- if aSlide[i] != 0 || bSlide[i] != 0 {
- break
- }
- }
-
- for ; i >= 0; i-- {
- r.Double(&t)
-
- if aSlide[i] > 0 {
- t.ToExtended(&u)
- geAdd(&t, &u, &Ai[aSlide[i]/2])
- } else if aSlide[i] < 0 {
- t.ToExtended(&u)
- geSub(&t, &u, &Ai[(-aSlide[i])/2])
- }
-
- if bSlide[i] > 0 {
- t.ToExtended(&u)
- geMixedAdd(&t, &u, &bi[bSlide[i]/2])
- } else if bSlide[i] < 0 {
- t.ToExtended(&u)
- geMixedSub(&t, &u, &bi[(-bSlide[i])/2])
- }
-
- t.ToProjective(r)
- }
-}
-
-// equal returns 1 if b == c and 0 otherwise, assuming that b and c are
-// non-negative.
-func equal(b, c int32) int32 {
- x := uint32(b ^ c)
- x--
- return int32(x >> 31)
-}
-
-// negative returns 1 if b < 0 and 0 otherwise.
-func negative(b int32) int32 {
- return (b >> 31) & 1
-}
-
-func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) {
- FeCMove(&t.yPlusX, &u.yPlusX, b)
- FeCMove(&t.yMinusX, &u.yMinusX, b)
- FeCMove(&t.xy2d, &u.xy2d, b)
-}
-
-func selectPoint(t *PreComputedGroupElement, pos int32, b int32) {
- var minusT PreComputedGroupElement
- bNegative := negative(b)
- bAbs := b - (((-bNegative) & b) << 1)
-
- t.Zero()
- for i := int32(0); i < 8; i++ {
- PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1))
- }
- FeCopy(&minusT.yPlusX, &t.yMinusX)
- FeCopy(&minusT.yMinusX, &t.yPlusX)
- FeNeg(&minusT.xy2d, &t.xy2d)
- PreComputedGroupElementCMove(t, &minusT, bNegative)
-}
-
-// GeScalarMultBase computes h = a*B, where
-// a = a[0]+256*a[1]+...+256^31 a[31]
-// B is the Ed25519 base point (x,4/5) with x positive.
-//
-// Preconditions:
-// a[31] <= 127
-func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) {
- var e [64]int8
-
- for i, v := range a {
- e[2*i] = int8(v & 15)
- e[2*i+1] = int8((v >> 4) & 15)
- }
-
- // each e[i] is between 0 and 15 and e[63] is between 0 and 7.
-
- carry := int8(0)
- for i := 0; i < 63; i++ {
- e[i] += carry
- carry = (e[i] + 8) >> 4
- e[i] -= carry << 4
- }
- e[63] += carry
- // each e[i] is between -8 and 8.
-
- h.Zero()
- var t PreComputedGroupElement
- var r CompletedGroupElement
- for i := int32(1); i < 64; i += 2 {
- selectPoint(&t, i/2, int32(e[i]))
- geMixedAdd(&r, h, &t)
- r.ToExtended(h)
- }
-
- var s ProjectiveGroupElement
-
- h.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToProjective(&s)
- s.Double(&r)
- r.ToExtended(h)
-
- for i := int32(0); i < 64; i += 2 {
- selectPoint(&t, i/2, int32(e[i]))
- geMixedAdd(&r, h, &t)
- r.ToExtended(h)
- }
-}
-
-// The scalars are GF(2^252 + 27742317777372353535851937790883648493).
-
-// Input:
-// a[0]+256*a[1]+...+256^31*a[31] = a
-// b[0]+256*b[1]+...+256^31*b[31] = b
-// c[0]+256*c[1]+...+256^31*c[31] = c
-//
-// Output:
-// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l
-// where l = 2^252 + 27742317777372353535851937790883648493.
-func ScMulAdd(s, a, b, c *[32]byte) {
- a0 := 2097151 & load3(a[:])
- a1 := 2097151 & (load4(a[2:]) >> 5)
- a2 := 2097151 & (load3(a[5:]) >> 2)
- a3 := 2097151 & (load4(a[7:]) >> 7)
- a4 := 2097151 & (load4(a[10:]) >> 4)
- a5 := 2097151 & (load3(a[13:]) >> 1)
- a6 := 2097151 & (load4(a[15:]) >> 6)
- a7 := 2097151 & (load3(a[18:]) >> 3)
- a8 := 2097151 & load3(a[21:])
- a9 := 2097151 & (load4(a[23:]) >> 5)
- a10 := 2097151 & (load3(a[26:]) >> 2)
- a11 := (load4(a[28:]) >> 7)
- b0 := 2097151 & load3(b[:])
- b1 := 2097151 & (load4(b[2:]) >> 5)
- b2 := 2097151 & (load3(b[5:]) >> 2)
- b3 := 2097151 & (load4(b[7:]) >> 7)
- b4 := 2097151 & (load4(b[10:]) >> 4)
- b5 := 2097151 & (load3(b[13:]) >> 1)
- b6 := 2097151 & (load4(b[15:]) >> 6)
- b7 := 2097151 & (load3(b[18:]) >> 3)
- b8 := 2097151 & load3(b[21:])
- b9 := 2097151 & (load4(b[23:]) >> 5)
- b10 := 2097151 & (load3(b[26:]) >> 2)
- b11 := (load4(b[28:]) >> 7)
- c0 := 2097151 & load3(c[:])
- c1 := 2097151 & (load4(c[2:]) >> 5)
- c2 := 2097151 & (load3(c[5:]) >> 2)
- c3 := 2097151 & (load4(c[7:]) >> 7)
- c4 := 2097151 & (load4(c[10:]) >> 4)
- c5 := 2097151 & (load3(c[13:]) >> 1)
- c6 := 2097151 & (load4(c[15:]) >> 6)
- c7 := 2097151 & (load3(c[18:]) >> 3)
- c8 := 2097151 & load3(c[21:])
- c9 := 2097151 & (load4(c[23:]) >> 5)
- c10 := 2097151 & (load3(c[26:]) >> 2)
- c11 := (load4(c[28:]) >> 7)
- var carry [23]int64
-
- s0 := c0 + a0*b0
- s1 := c1 + a0*b1 + a1*b0
- s2 := c2 + a0*b2 + a1*b1 + a2*b0
- s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0
- s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0
- s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0
- s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0
- s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0
- s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0
- s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0
- s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0
- s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0
- s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1
- s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2
- s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3
- s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4
- s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5
- s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6
- s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7
- s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8
- s20 := a9*b11 + a10*b10 + a11*b9
- s21 := a10*b11 + a11*b10
- s22 := a11 * b11
- s23 := int64(0)
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
- carry[18] = (s18 + (1 << 20)) >> 21
- s19 += carry[18]
- s18 -= carry[18] << 21
- carry[20] = (s20 + (1 << 20)) >> 21
- s21 += carry[20]
- s20 -= carry[20] << 21
- carry[22] = (s22 + (1 << 20)) >> 21
- s23 += carry[22]
- s22 -= carry[22] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
- carry[17] = (s17 + (1 << 20)) >> 21
- s18 += carry[17]
- s17 -= carry[17] << 21
- carry[19] = (s19 + (1 << 20)) >> 21
- s20 += carry[19]
- s19 -= carry[19] << 21
- carry[21] = (s21 + (1 << 20)) >> 21
- s22 += carry[21]
- s21 -= carry[21] << 21
-
- s11 += s23 * 666643
- s12 += s23 * 470296
- s13 += s23 * 654183
- s14 -= s23 * 997805
- s15 += s23 * 136657
- s16 -= s23 * 683901
- s23 = 0
-
- s10 += s22 * 666643
- s11 += s22 * 470296
- s12 += s22 * 654183
- s13 -= s22 * 997805
- s14 += s22 * 136657
- s15 -= s22 * 683901
- s22 = 0
-
- s9 += s21 * 666643
- s10 += s21 * 470296
- s11 += s21 * 654183
- s12 -= s21 * 997805
- s13 += s21 * 136657
- s14 -= s21 * 683901
- s21 = 0
-
- s8 += s20 * 666643
- s9 += s20 * 470296
- s10 += s20 * 654183
- s11 -= s20 * 997805
- s12 += s20 * 136657
- s13 -= s20 * 683901
- s20 = 0
-
- s7 += s19 * 666643
- s8 += s19 * 470296
- s9 += s19 * 654183
- s10 -= s19 * 997805
- s11 += s19 * 136657
- s12 -= s19 * 683901
- s19 = 0
-
- s6 += s18 * 666643
- s7 += s18 * 470296
- s8 += s18 * 654183
- s9 -= s18 * 997805
- s10 += s18 * 136657
- s11 -= s18 * 683901
- s18 = 0
-
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
-
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
-
- s5 += s17 * 666643
- s6 += s17 * 470296
- s7 += s17 * 654183
- s8 -= s17 * 997805
- s9 += s17 * 136657
- s10 -= s17 * 683901
- s17 = 0
-
- s4 += s16 * 666643
- s5 += s16 * 470296
- s6 += s16 * 654183
- s7 -= s16 * 997805
- s8 += s16 * 136657
- s9 -= s16 * 683901
- s16 = 0
-
- s3 += s15 * 666643
- s4 += s15 * 470296
- s5 += s15 * 654183
- s6 -= s15 * 997805
- s7 += s15 * 136657
- s8 -= s15 * 683901
- s15 = 0
-
- s2 += s14 * 666643
- s3 += s14 * 470296
- s4 += s14 * 654183
- s5 -= s14 * 997805
- s6 += s14 * 136657
- s7 -= s14 * 683901
- s14 = 0
-
- s1 += s13 * 666643
- s2 += s13 * 470296
- s3 += s13 * 654183
- s4 -= s13 * 997805
- s5 += s13 * 136657
- s6 -= s13 * 683901
- s13 = 0
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[11] = s11 >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- s[0] = byte(s0 >> 0)
- s[1] = byte(s0 >> 8)
- s[2] = byte((s0 >> 16) | (s1 << 5))
- s[3] = byte(s1 >> 3)
- s[4] = byte(s1 >> 11)
- s[5] = byte((s1 >> 19) | (s2 << 2))
- s[6] = byte(s2 >> 6)
- s[7] = byte((s2 >> 14) | (s3 << 7))
- s[8] = byte(s3 >> 1)
- s[9] = byte(s3 >> 9)
- s[10] = byte((s3 >> 17) | (s4 << 4))
- s[11] = byte(s4 >> 4)
- s[12] = byte(s4 >> 12)
- s[13] = byte((s4 >> 20) | (s5 << 1))
- s[14] = byte(s5 >> 7)
- s[15] = byte((s5 >> 15) | (s6 << 6))
- s[16] = byte(s6 >> 2)
- s[17] = byte(s6 >> 10)
- s[18] = byte((s6 >> 18) | (s7 << 3))
- s[19] = byte(s7 >> 5)
- s[20] = byte(s7 >> 13)
- s[21] = byte(s8 >> 0)
- s[22] = byte(s8 >> 8)
- s[23] = byte((s8 >> 16) | (s9 << 5))
- s[24] = byte(s9 >> 3)
- s[25] = byte(s9 >> 11)
- s[26] = byte((s9 >> 19) | (s10 << 2))
- s[27] = byte(s10 >> 6)
- s[28] = byte((s10 >> 14) | (s11 << 7))
- s[29] = byte(s11 >> 1)
- s[30] = byte(s11 >> 9)
- s[31] = byte(s11 >> 17)
-}
-
-// Input:
-// s[0]+256*s[1]+...+256^63*s[63] = s
-//
-// Output:
-// s[0]+256*s[1]+...+256^31*s[31] = s mod l
-// where l = 2^252 + 27742317777372353535851937790883648493.
-func ScReduce(out *[32]byte, s *[64]byte) {
- s0 := 2097151 & load3(s[:])
- s1 := 2097151 & (load4(s[2:]) >> 5)
- s2 := 2097151 & (load3(s[5:]) >> 2)
- s3 := 2097151 & (load4(s[7:]) >> 7)
- s4 := 2097151 & (load4(s[10:]) >> 4)
- s5 := 2097151 & (load3(s[13:]) >> 1)
- s6 := 2097151 & (load4(s[15:]) >> 6)
- s7 := 2097151 & (load3(s[18:]) >> 3)
- s8 := 2097151 & load3(s[21:])
- s9 := 2097151 & (load4(s[23:]) >> 5)
- s10 := 2097151 & (load3(s[26:]) >> 2)
- s11 := 2097151 & (load4(s[28:]) >> 7)
- s12 := 2097151 & (load4(s[31:]) >> 4)
- s13 := 2097151 & (load3(s[34:]) >> 1)
- s14 := 2097151 & (load4(s[36:]) >> 6)
- s15 := 2097151 & (load3(s[39:]) >> 3)
- s16 := 2097151 & load3(s[42:])
- s17 := 2097151 & (load4(s[44:]) >> 5)
- s18 := 2097151 & (load3(s[47:]) >> 2)
- s19 := 2097151 & (load4(s[49:]) >> 7)
- s20 := 2097151 & (load4(s[52:]) >> 4)
- s21 := 2097151 & (load3(s[55:]) >> 1)
- s22 := 2097151 & (load4(s[57:]) >> 6)
- s23 := (load4(s[60:]) >> 3)
-
- s11 += s23 * 666643
- s12 += s23 * 470296
- s13 += s23 * 654183
- s14 -= s23 * 997805
- s15 += s23 * 136657
- s16 -= s23 * 683901
- s23 = 0
-
- s10 += s22 * 666643
- s11 += s22 * 470296
- s12 += s22 * 654183
- s13 -= s22 * 997805
- s14 += s22 * 136657
- s15 -= s22 * 683901
- s22 = 0
-
- s9 += s21 * 666643
- s10 += s21 * 470296
- s11 += s21 * 654183
- s12 -= s21 * 997805
- s13 += s21 * 136657
- s14 -= s21 * 683901
- s21 = 0
-
- s8 += s20 * 666643
- s9 += s20 * 470296
- s10 += s20 * 654183
- s11 -= s20 * 997805
- s12 += s20 * 136657
- s13 -= s20 * 683901
- s20 = 0
-
- s7 += s19 * 666643
- s8 += s19 * 470296
- s9 += s19 * 654183
- s10 -= s19 * 997805
- s11 += s19 * 136657
- s12 -= s19 * 683901
- s19 = 0
-
- s6 += s18 * 666643
- s7 += s18 * 470296
- s8 += s18 * 654183
- s9 -= s18 * 997805
- s10 += s18 * 136657
- s11 -= s18 * 683901
- s18 = 0
-
- var carry [17]int64
-
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[12] = (s12 + (1 << 20)) >> 21
- s13 += carry[12]
- s12 -= carry[12] << 21
- carry[14] = (s14 + (1 << 20)) >> 21
- s15 += carry[14]
- s14 -= carry[14] << 21
- carry[16] = (s16 + (1 << 20)) >> 21
- s17 += carry[16]
- s16 -= carry[16] << 21
-
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
- carry[13] = (s13 + (1 << 20)) >> 21
- s14 += carry[13]
- s13 -= carry[13] << 21
- carry[15] = (s15 + (1 << 20)) >> 21
- s16 += carry[15]
- s15 -= carry[15] << 21
-
- s5 += s17 * 666643
- s6 += s17 * 470296
- s7 += s17 * 654183
- s8 -= s17 * 997805
- s9 += s17 * 136657
- s10 -= s17 * 683901
- s17 = 0
-
- s4 += s16 * 666643
- s5 += s16 * 470296
- s6 += s16 * 654183
- s7 -= s16 * 997805
- s8 += s16 * 136657
- s9 -= s16 * 683901
- s16 = 0
-
- s3 += s15 * 666643
- s4 += s15 * 470296
- s5 += s15 * 654183
- s6 -= s15 * 997805
- s7 += s15 * 136657
- s8 -= s15 * 683901
- s15 = 0
-
- s2 += s14 * 666643
- s3 += s14 * 470296
- s4 += s14 * 654183
- s5 -= s14 * 997805
- s6 += s14 * 136657
- s7 -= s14 * 683901
- s14 = 0
-
- s1 += s13 * 666643
- s2 += s13 * 470296
- s3 += s13 * 654183
- s4 -= s13 * 997805
- s5 += s13 * 136657
- s6 -= s13 * 683901
- s13 = 0
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = (s0 + (1 << 20)) >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[2] = (s2 + (1 << 20)) >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[4] = (s4 + (1 << 20)) >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[6] = (s6 + (1 << 20)) >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[8] = (s8 + (1 << 20)) >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[10] = (s10 + (1 << 20)) >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- carry[1] = (s1 + (1 << 20)) >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[3] = (s3 + (1 << 20)) >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[5] = (s5 + (1 << 20)) >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[7] = (s7 + (1 << 20)) >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[9] = (s9 + (1 << 20)) >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[11] = (s11 + (1 << 20)) >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
- carry[11] = s11 >> 21
- s12 += carry[11]
- s11 -= carry[11] << 21
-
- s0 += s12 * 666643
- s1 += s12 * 470296
- s2 += s12 * 654183
- s3 -= s12 * 997805
- s4 += s12 * 136657
- s5 -= s12 * 683901
- s12 = 0
-
- carry[0] = s0 >> 21
- s1 += carry[0]
- s0 -= carry[0] << 21
- carry[1] = s1 >> 21
- s2 += carry[1]
- s1 -= carry[1] << 21
- carry[2] = s2 >> 21
- s3 += carry[2]
- s2 -= carry[2] << 21
- carry[3] = s3 >> 21
- s4 += carry[3]
- s3 -= carry[3] << 21
- carry[4] = s4 >> 21
- s5 += carry[4]
- s4 -= carry[4] << 21
- carry[5] = s5 >> 21
- s6 += carry[5]
- s5 -= carry[5] << 21
- carry[6] = s6 >> 21
- s7 += carry[6]
- s6 -= carry[6] << 21
- carry[7] = s7 >> 21
- s8 += carry[7]
- s7 -= carry[7] << 21
- carry[8] = s8 >> 21
- s9 += carry[8]
- s8 -= carry[8] << 21
- carry[9] = s9 >> 21
- s10 += carry[9]
- s9 -= carry[9] << 21
- carry[10] = s10 >> 21
- s11 += carry[10]
- s10 -= carry[10] << 21
-
- out[0] = byte(s0 >> 0)
- out[1] = byte(s0 >> 8)
- out[2] = byte((s0 >> 16) | (s1 << 5))
- out[3] = byte(s1 >> 3)
- out[4] = byte(s1 >> 11)
- out[5] = byte((s1 >> 19) | (s2 << 2))
- out[6] = byte(s2 >> 6)
- out[7] = byte((s2 >> 14) | (s3 << 7))
- out[8] = byte(s3 >> 1)
- out[9] = byte(s3 >> 9)
- out[10] = byte((s3 >> 17) | (s4 << 4))
- out[11] = byte(s4 >> 4)
- out[12] = byte(s4 >> 12)
- out[13] = byte((s4 >> 20) | (s5 << 1))
- out[14] = byte(s5 >> 7)
- out[15] = byte((s5 >> 15) | (s6 << 6))
- out[16] = byte(s6 >> 2)
- out[17] = byte(s6 >> 10)
- out[18] = byte((s6 >> 18) | (s7 << 3))
- out[19] = byte(s7 >> 5)
- out[20] = byte(s7 >> 13)
- out[21] = byte(s8 >> 0)
- out[22] = byte(s8 >> 8)
- out[23] = byte((s8 >> 16) | (s9 << 5))
- out[24] = byte(s9 >> 3)
- out[25] = byte(s9 >> 11)
- out[26] = byte((s9 >> 19) | (s10 << 2))
- out[27] = byte(s10 >> 6)
- out[28] = byte((s10 >> 14) | (s11 << 7))
- out[29] = byte(s11 >> 1)
- out[30] = byte(s11 >> 9)
- out[31] = byte(s11 >> 17)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz
deleted file mode 100644
index 41030690c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/example_test.go
deleted file mode 100644
index df8439512..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/example_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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 file.
-
-package hkdf_test
-
-import (
- "bytes"
- "crypto/rand"
- "crypto/sha256"
- "fmt"
- "golang.org/x/crypto/hkdf"
- "io"
-)
-
-// Usage example that expands one master key into three other cryptographically
-// secure keys.
-func Example_usage() {
- // Underlying hash function to use
- hash := sha256.New
-
- // Cryptographically secure master key.
- master := []byte{0x00, 0x01, 0x02, 0x03} // i.e. NOT this.
-
- // Non secret salt, optional (can be nil)
- // Recommended: hash-length sized random
- salt := make([]byte, hash().Size())
- n, err := io.ReadFull(rand.Reader, salt)
- if n != len(salt) || err != nil {
- fmt.Println("error:", err)
- return
- }
-
- // Non secret context specific info, optional (can be nil).
- // Note, independent from the master key.
- info := []byte{0x03, 0x14, 0x15, 0x92, 0x65}
-
- // Create the key derivation function
- hkdf := hkdf.New(hash, master, salt, info)
-
- // Generate the required keys
- keys := make([][]byte, 3)
- for i := 0; i < len(keys); i++ {
- keys[i] = make([]byte, 24)
- n, err := io.ReadFull(hkdf, keys[i])
- if n != len(keys[i]) || err != nil {
- fmt.Println("error:", err)
- return
- }
- }
-
- // Keys should contain 192 bit random keys
- for i := 1; i <= len(keys); i++ {
- fmt.Printf("Key #%d: %v\n", i, !bytes.Equal(keys[i-1], make([]byte, 24)))
- }
-
- // Output:
- // Key #1: true
- // Key #2: true
- // Key #3: true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf.go
deleted file mode 100644
index 5bc246355..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package hkdf implements the HMAC-based Extract-and-Expand Key Derivation
-// Function (HKDF) as defined in RFC 5869.
-//
-// HKDF is a cryptographic key derivation function (KDF) with the goal of
-// expanding limited input keying material into one or more cryptographically
-// strong secret keys.
-//
-// RFC 5869: https://tools.ietf.org/html/rfc5869
-package hkdf // import "golang.org/x/crypto/hkdf"
-
-import (
- "crypto/hmac"
- "errors"
- "hash"
- "io"
-)
-
-type hkdf struct {
- expander hash.Hash
- size int
-
- info []byte
- counter byte
-
- prev []byte
- cache []byte
-}
-
-func (f *hkdf) Read(p []byte) (int, error) {
- // Check whether enough data can be generated
- need := len(p)
- remains := len(f.cache) + int(255-f.counter+1)*f.size
- if remains < need {
- return 0, errors.New("hkdf: entropy limit reached")
- }
- // Read from the cache, if enough data is present
- n := copy(p, f.cache)
- p = p[n:]
-
- // Fill the buffer
- for len(p) > 0 {
- f.expander.Reset()
- f.expander.Write(f.prev)
- f.expander.Write(f.info)
- f.expander.Write([]byte{f.counter})
- f.prev = f.expander.Sum(f.prev[:0])
- f.counter++
-
- // Copy the new batch into p
- f.cache = f.prev
- n = copy(p, f.cache)
- p = p[n:]
- }
- // Save leftovers for next run
- f.cache = f.cache[n:]
-
- return need, nil
-}
-
-// New returns a new HKDF using the given hash, the secret keying material to expand
-// and optional salt and info fields.
-func New(hash func() hash.Hash, secret, salt, info []byte) io.Reader {
- if salt == nil {
- salt = make([]byte, hash().Size())
- }
- extractor := hmac.New(hash, salt)
- extractor.Write(secret)
- prk := extractor.Sum(nil)
-
- return &hkdf{hmac.New(hash, prk), extractor.Size(), info, 1, nil, nil}
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf_test.go
deleted file mode 100644
index cee659bcd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/hkdf/hkdf_test.go
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright 2014 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 file.
-package hkdf
-
-import (
- "bytes"
- "crypto/md5"
- "crypto/sha1"
- "crypto/sha256"
- "crypto/sha512"
- "hash"
- "io"
- "testing"
-)
-
-type hkdfTest struct {
- hash func() hash.Hash
- master []byte
- salt []byte
- info []byte
- out []byte
-}
-
-var hkdfTests = []hkdfTest{
- // Tests from RFC 5869
- {
- sha256.New,
- []byte{
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- },
- []byte{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c,
- },
- []byte{
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9,
- },
- []byte{
- 0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a,
- 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a,
- 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c,
- 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf,
- 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18,
- 0x58, 0x65,
- },
- },
- {
- sha256.New,
- []byte{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- },
- []byte{
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
- 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
- 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- },
- []byte{
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
- 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
- 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
- },
- []byte{
- 0xb1, 0x1e, 0x39, 0x8d, 0xc8, 0x03, 0x27, 0xa1,
- 0xc8, 0xe7, 0xf7, 0x8c, 0x59, 0x6a, 0x49, 0x34,
- 0x4f, 0x01, 0x2e, 0xda, 0x2d, 0x4e, 0xfa, 0xd8,
- 0xa0, 0x50, 0xcc, 0x4c, 0x19, 0xaf, 0xa9, 0x7c,
- 0x59, 0x04, 0x5a, 0x99, 0xca, 0xc7, 0x82, 0x72,
- 0x71, 0xcb, 0x41, 0xc6, 0x5e, 0x59, 0x0e, 0x09,
- 0xda, 0x32, 0x75, 0x60, 0x0c, 0x2f, 0x09, 0xb8,
- 0x36, 0x77, 0x93, 0xa9, 0xac, 0xa3, 0xdb, 0x71,
- 0xcc, 0x30, 0xc5, 0x81, 0x79, 0xec, 0x3e, 0x87,
- 0xc1, 0x4c, 0x01, 0xd5, 0xc1, 0xf3, 0x43, 0x4f,
- 0x1d, 0x87,
- },
- },
- {
- sha256.New,
- []byte{
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- },
- []byte{},
- []byte{},
- []byte{
- 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f,
- 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31,
- 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e,
- 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d,
- 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a,
- 0x96, 0xc8,
- },
- },
- {
- sha1.New,
- []byte{
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b,
- },
- []byte{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c,
- },
- []byte{
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9,
- },
- []byte{
- 0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69,
- 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81,
- 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15,
- 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2,
- 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3,
- 0xf8, 0x96,
- },
- },
- {
- sha1.New,
- []byte{
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- },
- []byte{
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
- 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
- 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- },
- []byte{
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
- 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
- 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
- },
- []byte{
- 0x0b, 0xd7, 0x70, 0xa7, 0x4d, 0x11, 0x60, 0xf7,
- 0xc9, 0xf1, 0x2c, 0xd5, 0x91, 0x2a, 0x06, 0xeb,
- 0xff, 0x6a, 0xdc, 0xae, 0x89, 0x9d, 0x92, 0x19,
- 0x1f, 0xe4, 0x30, 0x56, 0x73, 0xba, 0x2f, 0xfe,
- 0x8f, 0xa3, 0xf1, 0xa4, 0xe5, 0xad, 0x79, 0xf3,
- 0xf3, 0x34, 0xb3, 0xb2, 0x02, 0xb2, 0x17, 0x3c,
- 0x48, 0x6e, 0xa3, 0x7c, 0xe3, 0xd3, 0x97, 0xed,
- 0x03, 0x4c, 0x7f, 0x9d, 0xfe, 0xb1, 0x5c, 0x5e,
- 0x92, 0x73, 0x36, 0xd0, 0x44, 0x1f, 0x4c, 0x43,
- 0x00, 0xe2, 0xcf, 0xf0, 0xd0, 0x90, 0x0b, 0x52,
- 0xd3, 0xb4,
- },
- },
- {
- sha1.New,
- []byte{
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- },
- []byte{},
- []byte{},
- []byte{
- 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61,
- 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06,
- 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06,
- 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0,
- 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3,
- 0x49, 0x18,
- },
- },
- {
- sha1.New,
- []byte{
- 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
- 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
- 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
- },
- nil,
- []byte{},
- []byte{
- 0x2c, 0x91, 0x11, 0x72, 0x04, 0xd7, 0x45, 0xf3,
- 0x50, 0x0d, 0x63, 0x6a, 0x62, 0xf6, 0x4f, 0x0a,
- 0xb3, 0xba, 0xe5, 0x48, 0xaa, 0x53, 0xd4, 0x23,
- 0xb0, 0xd1, 0xf2, 0x7e, 0xbb, 0xa6, 0xf5, 0xe5,
- 0x67, 0x3a, 0x08, 0x1d, 0x70, 0xcc, 0xe7, 0xac,
- 0xfc, 0x48,
- },
- },
-}
-
-func TestHKDF(t *testing.T) {
- for i, tt := range hkdfTests {
- hkdf := New(tt.hash, tt.master, tt.salt, tt.info)
- out := make([]byte, len(tt.out))
-
- n, err := io.ReadFull(hkdf, out)
- if n != len(tt.out) || err != nil {
- t.Errorf("test %d: not enough output bytes: %d.", i, n)
- }
-
- if !bytes.Equal(out, tt.out) {
- t.Errorf("test %d: incorrect output: have %v, need %v.", i, out, tt.out)
- }
- }
-}
-
-func TestHKDFMultiRead(t *testing.T) {
- for i, tt := range hkdfTests {
- hkdf := New(tt.hash, tt.master, tt.salt, tt.info)
- out := make([]byte, len(tt.out))
-
- for b := 0; b < len(tt.out); b++ {
- n, err := io.ReadFull(hkdf, out[b:b+1])
- if n != 1 || err != nil {
- t.Errorf("test %d.%d: not enough output bytes: have %d, need %d .", i, b, n, len(tt.out))
- }
- }
-
- if !bytes.Equal(out, tt.out) {
- t.Errorf("test %d: incorrect output: have %v, need %v.", i, out, tt.out)
- }
- }
-}
-
-func TestHKDFLimit(t *testing.T) {
- hash := sha1.New
- master := []byte{0x00, 0x01, 0x02, 0x03}
- info := []byte{}
-
- hkdf := New(hash, master, nil, info)
- limit := hash().Size() * 255
- out := make([]byte, limit)
-
- // The maximum output bytes should be extractable
- n, err := io.ReadFull(hkdf, out)
- if n != limit || err != nil {
- t.Errorf("not enough output bytes: %d, %v.", n, err)
- }
-
- // Reading one more should fail
- n, err = io.ReadFull(hkdf, make([]byte, 1))
- if n > 0 || err == nil {
- t.Errorf("key expansion overflowed: n = %d, err = %v", n, err)
- }
-}
-
-func Benchmark16ByteMD5Single(b *testing.B) {
- benchmarkHKDFSingle(md5.New, 16, b)
-}
-
-func Benchmark20ByteSHA1Single(b *testing.B) {
- benchmarkHKDFSingle(sha1.New, 20, b)
-}
-
-func Benchmark32ByteSHA256Single(b *testing.B) {
- benchmarkHKDFSingle(sha256.New, 32, b)
-}
-
-func Benchmark64ByteSHA512Single(b *testing.B) {
- benchmarkHKDFSingle(sha512.New, 64, b)
-}
-
-func Benchmark8ByteMD5Stream(b *testing.B) {
- benchmarkHKDFStream(md5.New, 8, b)
-}
-
-func Benchmark16ByteMD5Stream(b *testing.B) {
- benchmarkHKDFStream(md5.New, 16, b)
-}
-
-func Benchmark8ByteSHA1Stream(b *testing.B) {
- benchmarkHKDFStream(sha1.New, 8, b)
-}
-
-func Benchmark20ByteSHA1Stream(b *testing.B) {
- benchmarkHKDFStream(sha1.New, 20, b)
-}
-
-func Benchmark8ByteSHA256Stream(b *testing.B) {
- benchmarkHKDFStream(sha256.New, 8, b)
-}
-
-func Benchmark32ByteSHA256Stream(b *testing.B) {
- benchmarkHKDFStream(sha256.New, 32, b)
-}
-
-func Benchmark8ByteSHA512Stream(b *testing.B) {
- benchmarkHKDFStream(sha512.New, 8, b)
-}
-
-func Benchmark64ByteSHA512Stream(b *testing.B) {
- benchmarkHKDFStream(sha512.New, 64, b)
-}
-
-func benchmarkHKDFSingle(hasher func() hash.Hash, block int, b *testing.B) {
- master := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}
- salt := []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17}
- info := []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}
- out := make([]byte, block)
-
- b.SetBytes(int64(block))
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- hkdf := New(hasher, master, salt, info)
- io.ReadFull(hkdf, out)
- }
-}
-
-func benchmarkHKDFStream(hasher func() hash.Hash, block int, b *testing.B) {
- master := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}
- salt := []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17}
- info := []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}
- out := make([]byte, block)
-
- b.SetBytes(int64(block))
- b.ResetTimer()
-
- hkdf := New(hasher, master, salt, info)
- for i := 0; i < b.N; i++ {
- _, err := io.ReadFull(hkdf, out)
- if err != nil {
- hkdf = New(hasher, master, salt, info)
- i--
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/example_test.go
deleted file mode 100644
index db3f59b19..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/example_test.go
+++ /dev/null
@@ -1,20 +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 file.
-
-package md4_test
-
-import (
- "fmt"
- "io"
-
- "golang.org/x/crypto/md4"
-)
-
-func ExampleNew() {
- h := md4.New()
- data := "These pretzels are making me thirsty."
- io.WriteString(h, data)
- fmt.Printf("%x", h.Sum(nil))
- // Output: 48c4e365090b30a32f084c4888deceaa
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4.go
deleted file mode 100644
index 6d9ba9e5f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2009 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 file.
-
-// Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
-package md4 // import "golang.org/x/crypto/md4"
-
-import (
- "crypto"
- "hash"
-)
-
-func init() {
- crypto.RegisterHash(crypto.MD4, New)
-}
-
-// The size of an MD4 checksum in bytes.
-const Size = 16
-
-// The blocksize of MD4 in bytes.
-const BlockSize = 64
-
-const (
- _Chunk = 64
- _Init0 = 0x67452301
- _Init1 = 0xEFCDAB89
- _Init2 = 0x98BADCFE
- _Init3 = 0x10325476
-)
-
-// digest represents the partial evaluation of a checksum.
-type digest struct {
- s [4]uint32
- x [_Chunk]byte
- nx int
- len uint64
-}
-
-func (d *digest) Reset() {
- d.s[0] = _Init0
- d.s[1] = _Init1
- d.s[2] = _Init2
- d.s[3] = _Init3
- d.nx = 0
- d.len = 0
-}
-
-// New returns a new hash.Hash computing the MD4 checksum.
-func New() hash.Hash {
- d := new(digest)
- d.Reset()
- return d
-}
-
-func (d *digest) Size() int { return Size }
-
-func (d *digest) BlockSize() int { return BlockSize }
-
-func (d *digest) Write(p []byte) (nn int, err error) {
- nn = len(p)
- d.len += uint64(nn)
- if d.nx > 0 {
- n := len(p)
- if n > _Chunk-d.nx {
- n = _Chunk - d.nx
- }
- for i := 0; i < n; i++ {
- d.x[d.nx+i] = p[i]
- }
- d.nx += n
- if d.nx == _Chunk {
- _Block(d, d.x[0:])
- d.nx = 0
- }
- p = p[n:]
- }
- n := _Block(d, p)
- p = p[n:]
- if len(p) > 0 {
- d.nx = copy(d.x[:], p)
- }
- return
-}
-
-func (d0 *digest) Sum(in []byte) []byte {
- // Make a copy of d0, so that caller can keep writing and summing.
- d := new(digest)
- *d = *d0
-
- // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
- len := d.len
- var tmp [64]byte
- tmp[0] = 0x80
- if len%64 < 56 {
- d.Write(tmp[0 : 56-len%64])
- } else {
- d.Write(tmp[0 : 64+56-len%64])
- }
-
- // Length in bits.
- len <<= 3
- for i := uint(0); i < 8; i++ {
- tmp[i] = byte(len >> (8 * i))
- }
- d.Write(tmp[0:8])
-
- if d.nx != 0 {
- panic("d.nx != 0")
- }
-
- for _, s := range d.s {
- in = append(in, byte(s>>0))
- in = append(in, byte(s>>8))
- in = append(in, byte(s>>16))
- in = append(in, byte(s>>24))
- }
- return in
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4_test.go
deleted file mode 100644
index b56edd787..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4_test.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2009 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 file.
-
-package md4
-
-import (
- "fmt"
- "io"
- "testing"
-)
-
-type md4Test struct {
- out string
- in string
-}
-
-var golden = []md4Test{
- {"31d6cfe0d16ae931b73c59d7e0c089c0", ""},
- {"bde52cb31de33e46245e05fbdbd6fb24", "a"},
- {"ec388dd78999dfc7cf4632465693b6bf", "ab"},
- {"a448017aaf21d8525fc10ae87aa6729d", "abc"},
- {"41decd8f579255c5200f86a4bb3ba740", "abcd"},
- {"9803f4a34e8eb14f96adba49064a0c41", "abcde"},
- {"804e7f1c2586e50b49ac65db5b645131", "abcdef"},
- {"752f4adfe53d1da0241b5bc216d098fc", "abcdefg"},
- {"ad9daf8d49d81988590a6f0e745d15dd", "abcdefgh"},
- {"1e4e28b05464316b56402b3815ed2dfd", "abcdefghi"},
- {"dc959c6f5d6f9e04e4380777cc964b3d", "abcdefghij"},
- {"1b5701e265778898ef7de5623bbe7cc0", "Discard medicine more than two years old."},
- {"d7f087e090fe7ad4a01cb59dacc9a572", "He who has a shady past knows that nice guys finish last."},
- {"a6f8fd6df617c72837592fc3570595c9", "I wouldn't marry him with a ten foot pole."},
- {"c92a84a9526da8abc240c05d6b1a1ce0", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- {"f6013160c4dcb00847069fee3bb09803", "The days of the digital watch are numbered. -Tom Stoppard"},
- {"2c3bb64f50b9107ed57640fe94bec09f", "Nepal premier won't resign."},
- {"45b7d8a32c7806f2f7f897332774d6e4", "For every action there is an equal and opposite government program."},
- {"b5b4f9026b175c62d7654bdc3a1cd438", "His money is twice tainted: 'taint yours and 'taint mine."},
- {"caf44e80f2c20ce19b5ba1cab766e7bd", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- {"191fae6707f496aa54a6bce9f2ecf74d", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- {"9ddc753e7a4ccee6081cd1b45b23a834", "size: a.out: bad magic"},
- {"8d050f55b1cadb9323474564be08a521", "The major problem is with sendmail. -Mark Horton"},
- {"ad6e2587f74c3e3cc19146f6127fa2e3", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- {"1d616d60a5fabe85589c3f1566ca7fca", "If the enemy is within range, then so are you."},
- {"aec3326a4f496a2ced65a1963f84577f", "It's well we cannot hear the screams/That we create in others' dreams."},
- {"77b4fd762d6b9245e61c50bf6ebf118b", "You remind me of a TV show, but that's all right: I watch it anyway."},
- {"e8f48c726bae5e516f6ddb1a4fe62438", "C is as portable as Stonehedge!!"},
- {"a3a84366e7219e887423b01f9be7166e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- {"a6b7aa35157e984ef5d9b7f32e5fbb52", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- {"75661f0545955f8f9abeeb17845f3fd6", "How can you write a big system without C++? -Paul Glick"},
-}
-
-func TestGolden(t *testing.T) {
- for i := 0; i < len(golden); i++ {
- g := golden[i]
- c := New()
- for j := 0; j < 3; j++ {
- if j < 2 {
- io.WriteString(c, g.in)
- } else {
- io.WriteString(c, g.in[0:len(g.in)/2])
- c.Sum(nil)
- io.WriteString(c, g.in[len(g.in)/2:])
- }
- s := fmt.Sprintf("%x", c.Sum(nil))
- if s != g.out {
- t.Fatalf("md4[%d](%s) = %s want %s", j, g.in, s, g.out)
- }
- c.Reset()
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4block.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4block.go
deleted file mode 100644
index 3fed475f3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/md4/md4block.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2009 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 file.
-
-// MD4 block step.
-// In its own file so that a faster assembly or C version
-// can be substituted easily.
-
-package md4
-
-var shift1 = []uint{3, 7, 11, 19}
-var shift2 = []uint{3, 5, 9, 13}
-var shift3 = []uint{3, 9, 11, 15}
-
-var xIndex2 = []uint{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15}
-var xIndex3 = []uint{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}
-
-func _Block(dig *digest, p []byte) int {
- a := dig.s[0]
- b := dig.s[1]
- c := dig.s[2]
- d := dig.s[3]
- n := 0
- var X [16]uint32
- for len(p) >= _Chunk {
- aa, bb, cc, dd := a, b, c, d
-
- j := 0
- for i := 0; i < 16; i++ {
- X[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24
- j += 4
- }
-
- // If this needs to be made faster in the future,
- // the usual trick is to unroll each of these
- // loops by a factor of 4; that lets you replace
- // the shift[] lookups with constants and,
- // with suitable variable renaming in each
- // unrolled body, delete the a, b, c, d = d, a, b, c
- // (or you can let the optimizer do the renaming).
- //
- // The index variables are uint so that % by a power
- // of two can be optimized easily by a compiler.
-
- // Round 1.
- for i := uint(0); i < 16; i++ {
- x := i
- s := shift1[i%4]
- f := ((c ^ d) & b) ^ d
- a += f + X[x]
- a = a<<s | a>>(32-s)
- a, b, c, d = d, a, b, c
- }
-
- // Round 2.
- for i := uint(0); i < 16; i++ {
- x := xIndex2[i]
- s := shift2[i%4]
- g := (b & c) | (b & d) | (c & d)
- a += g + X[x] + 0x5a827999
- a = a<<s | a>>(32-s)
- a, b, c, d = d, a, b, c
- }
-
- // Round 3.
- for i := uint(0); i < 16; i++ {
- x := xIndex3[i]
- s := shift3[i%4]
- h := b ^ c ^ d
- a += h + X[x] + 0x6ed9eba1
- a = a<<s | a>>(32-s)
- a, b, c, d = d, a, b, c
- }
-
- a += aa
- b += bb
- c += cc
- d += dd
-
- p = p[_Chunk:]
- n += _Chunk
- }
-
- dig.s[0] = a
- dig.s[1] = b
- dig.s[2] = c
- dig.s[3] = d
- return n
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth.go
deleted file mode 100644
index 0835d3bf9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth.go
+++ /dev/null
@@ -1,58 +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 file.
-
-/*
-Package auth authenticates a message using a secret key.
-
-The Sum function, viewed as a function of the message for a uniform random
-key, is designed to meet the standard notion of unforgeability. This means
-that an attacker cannot find authenticators for any messages not authenticated
-by the sender, even if the attacker has adaptively influenced the messages
-authenticated by the sender. For a formal definition see, e.g., Section 2.4
-of Bellare, Kilian, and Rogaway, "The security of the cipher block chaining
-message authentication code," Journal of Computer and System Sciences 61 (2000),
-362–399; http://www-cse.ucsd.edu/~mihir/papers/cbc.html.
-
-auth does not make any promises regarding "strong" unforgeability; perhaps
-one valid authenticator can be converted into another valid authenticator for
-the same message. NaCl also does not make any promises regarding "truncated
-unforgeability."
-
-This package is interoperable with NaCl: https://nacl.cr.yp.to/auth.html.
-*/
-package auth
-
-import (
- "crypto/hmac"
- "crypto/sha512"
-)
-
-const (
- // Size is the size, in bytes, of an authenticated digest.
- Size = 32
- // KeySize is the size, in bytes, of an authentication key.
- KeySize = 32
-)
-
-// Sum generates an authenticator for m using a secret key and returns the
-// 32-byte digest.
-func Sum(m []byte, key *[KeySize]byte) *[Size]byte {
- mac := hmac.New(sha512.New, key[:])
- mac.Write(m)
- out := new([KeySize]byte)
- copy(out[:], mac.Sum(nil)[:Size])
- return out
-}
-
-// Verify checks that digest is a valid authenticator of message m under the
-// given secret key. Verify does not leak timing information.
-func Verify(digest []byte, m []byte, key *[32]byte) bool {
- if len(digest) != Size {
- return false
- }
- mac := hmac.New(sha512.New, key[:])
- mac.Write(m)
- expectedMAC := mac.Sum(nil) // first 256 bits of 512-bit sum
- return hmac.Equal(digest, expectedMAC[:Size])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth_test.go
deleted file mode 100644
index 92074b50b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/auth_test.go
+++ /dev/null
@@ -1,172 +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 file.
-
-package auth
-
-import (
- "bytes"
- rand "crypto/rand"
- mrand "math/rand"
- "testing"
-)
-
-// Test cases are from RFC 4231, and match those present in the tests directory
-// of the download here: https://nacl.cr.yp.to/install.html
-var testCases = []struct {
- key [32]byte
- msg []byte
- out [32]byte
-}{
- {
- key: [32]byte{
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
- 0x0b, 0x0b, 0x0b, 0x0b,
- },
- msg: []byte("Hi There"),
- out: [32]byte{
- 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
- 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
- 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
- 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde,
- },
- },
- {
- key: [32]byte{'J', 'e', 'f', 'e'},
- msg: []byte("what do ya want for nothing?"),
- out: [32]byte{
- 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2,
- 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3,
- 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6,
- 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54,
- },
- },
- {
- key: [32]byte{
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa,
- },
- msg: []byte{ // 50 bytes of 0xdd
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd,
- },
- out: [32]byte{
- 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
- 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
- 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
- 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39,
- },
- },
- {
- key: [32]byte{
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
- 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
- 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
- 0x19,
- },
- msg: []byte{
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
- 0xcd, 0xcd,
- },
- out: [32]byte{
- 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69,
- 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7,
- 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d,
- 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb,
- },
- },
-}
-
-func TestSum(t *testing.T) {
- for i, test := range testCases {
- tag := Sum(test.msg, &test.key)
- if !bytes.Equal(tag[:], test.out[:]) {
- t.Errorf("#%d: Sum: got\n%x\nwant\n%x", i, tag, test.out)
- }
- }
-}
-
-func TestVerify(t *testing.T) {
- wrongMsg := []byte("unknown msg")
-
- for i, test := range testCases {
- if !Verify(test.out[:], test.msg, &test.key) {
- t.Errorf("#%d: Verify(%x, %q, %x) failed", i, test.out, test.msg, test.key)
- }
- if Verify(test.out[:], wrongMsg, &test.key) {
- t.Errorf("#%d: Verify(%x, %q, %x) unexpectedly passed", i, test.out, wrongMsg, test.key)
- }
- }
-}
-
-func TestStress(t *testing.T) {
- if testing.Short() {
- t.Skip("exhaustiveness test")
- }
-
- var key [32]byte
- msg := make([]byte, 10000)
- prng := mrand.New(mrand.NewSource(0))
-
- // copied from tests/auth5.c in nacl
- for i := 0; i < 10000; i++ {
- if _, err := rand.Read(key[:]); err != nil {
- t.Fatal(err)
- }
- if _, err := rand.Read(msg[:i]); err != nil {
- t.Fatal(err)
- }
- tag := Sum(msg[:i], &key)
- if !Verify(tag[:], msg[:i], &key) {
- t.Errorf("#%d: unexpected failure from Verify", i)
- }
- if i > 0 {
- msgIndex := prng.Intn(i)
- oldMsgByte := msg[msgIndex]
- msg[msgIndex] += byte(1 + prng.Intn(255))
- if Verify(tag[:], msg[:i], &key) {
- t.Errorf("#%d: unexpected success from Verify after corrupting message", i)
- }
- msg[msgIndex] = oldMsgByte
-
- tag[prng.Intn(len(tag))] += byte(1 + prng.Intn(255))
- if Verify(tag[:], msg[:i], &key) {
- t.Errorf("#%d: unexpected success from Verify after corrupting authenticator", i)
- }
- }
- }
-}
-
-func BenchmarkAuth(b *testing.B) {
- var key [32]byte
- if _, err := rand.Read(key[:]); err != nil {
- b.Fatal(err)
- }
- buf := make([]byte, 1024)
- if _, err := rand.Read(buf[:]); err != nil {
- b.Fatal(err)
- }
-
- b.SetBytes(int64(len(buf)))
- b.ReportAllocs()
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- tag := Sum(buf, &key)
- if Verify(tag[:], buf, &key) == false {
- b.Fatal("unexpected failure from Verify")
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/example_test.go
deleted file mode 100644
index 02a2cd6c4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/auth/example_test.go
+++ /dev/null
@@ -1,36 +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 file.
-
-package auth_test
-
-import (
- "encoding/hex"
- "fmt"
-
- "golang.org/x/crypto/nacl/auth"
-)
-
-func Example() {
- // Load your secret key from a safe place and reuse it across multiple
- // Sum calls. (Obviously don't use this example key for anything
- // real.) If you want to convert a passphrase to a key, use a suitable
- // package like bcrypt or scrypt.
- secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574")
- if err != nil {
- panic(err)
- }
-
- var secretKey [32]byte
- copy(secretKey[:], secretKeyBytes)
-
- mac := auth.Sum([]byte("hello world"), &secretKey)
- fmt.Printf("%x\n", *mac)
- result := auth.Verify(mac[:], []byte("hello world"), &secretKey)
- fmt.Println(result)
- badResult := auth.Verify(mac[:], []byte("different message"), &secretKey)
- fmt.Println(badResult)
- // Output: eca5a521f3d77b63f567fb0cb6f5f2d200641bc8dada42f60c5f881260c30317
- // true
- // false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box.go
deleted file mode 100644
index 31b697be4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Package box authenticates and encrypts small messages using public-key cryptography.
-
-Box uses Curve25519, XSalsa20 and Poly1305 to encrypt and authenticate
-messages. The length of messages is not hidden.
-
-It is the caller's responsibility to ensure the uniqueness of nonces—for
-example, by using nonce 1 for the first message, nonce 2 for the second
-message, etc. Nonces are long enough that randomly generated nonces have
-negligible risk of collision.
-
-Messages should be small because:
-
-1. The whole message needs to be held in memory to be processed.
-
-2. Using large messages pressures implementations on small machines to decrypt
-and process plaintext before authenticating it. This is very dangerous, and
-this API does not allow it, but a protocol that uses excessive message sizes
-might present some implementations with no other choice.
-
-3. Fixed overheads will be sufficiently amortised by messages as small as 8KB.
-
-4. Performance may be improved by working with messages that fit into data caches.
-
-Thus large amounts of data should be chunked so that each message is small.
-(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable
-chunk size.
-
-This package is interoperable with NaCl: https://nacl.cr.yp.to/box.html.
-*/
-package box // import "golang.org/x/crypto/nacl/box"
-
-import (
- "io"
-
- "golang.org/x/crypto/curve25519"
- "golang.org/x/crypto/nacl/secretbox"
- "golang.org/x/crypto/salsa20/salsa"
-)
-
-// Overhead is the number of bytes of overhead when boxing a message.
-const Overhead = secretbox.Overhead
-
-// GenerateKey generates a new public/private key pair suitable for use with
-// Seal and Open.
-func GenerateKey(rand io.Reader) (publicKey, privateKey *[32]byte, err error) {
- publicKey = new([32]byte)
- privateKey = new([32]byte)
- _, err = io.ReadFull(rand, privateKey[:])
- if err != nil {
- publicKey = nil
- privateKey = nil
- return
- }
-
- curve25519.ScalarBaseMult(publicKey, privateKey)
- return
-}
-
-var zeros [16]byte
-
-// Precompute calculates the shared key between peersPublicKey and privateKey
-// and writes it to sharedKey. The shared key can be used with
-// OpenAfterPrecomputation and SealAfterPrecomputation to speed up processing
-// when using the same pair of keys repeatedly.
-func Precompute(sharedKey, peersPublicKey, privateKey *[32]byte) {
- curve25519.ScalarMult(sharedKey, privateKey, peersPublicKey)
- salsa.HSalsa20(sharedKey, &zeros, sharedKey, &salsa.Sigma)
-}
-
-// Seal appends an encrypted and authenticated copy of message to out, which
-// will be Overhead bytes longer than the original and must not overlap it. The
-// nonce must be unique for each distinct message for a given pair of keys.
-func Seal(out, message []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) []byte {
- var sharedKey [32]byte
- Precompute(&sharedKey, peersPublicKey, privateKey)
- return secretbox.Seal(out, message, nonce, &sharedKey)
-}
-
-// SealAfterPrecomputation performs the same actions as Seal, but takes a
-// shared key as generated by Precompute.
-func SealAfterPrecomputation(out, message []byte, nonce *[24]byte, sharedKey *[32]byte) []byte {
- return secretbox.Seal(out, message, nonce, sharedKey)
-}
-
-// Open authenticates and decrypts a box produced by Seal and appends the
-// message to out, which must not overlap box. The output will be Overhead
-// bytes smaller than box.
-func Open(out, box []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) ([]byte, bool) {
- var sharedKey [32]byte
- Precompute(&sharedKey, peersPublicKey, privateKey)
- return secretbox.Open(out, box, nonce, &sharedKey)
-}
-
-// OpenAfterPrecomputation performs the same actions as Open, but takes a
-// shared key as generated by Precompute.
-func OpenAfterPrecomputation(out, box []byte, nonce *[24]byte, sharedKey *[32]byte) ([]byte, bool) {
- return secretbox.Open(out, box, nonce, sharedKey)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box_test.go
deleted file mode 100644
index 481ade28a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/box_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012 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 file.
-
-package box
-
-import (
- "bytes"
- "crypto/rand"
- "encoding/hex"
- "testing"
-
- "golang.org/x/crypto/curve25519"
-)
-
-func TestSealOpen(t *testing.T) {
- publicKey1, privateKey1, _ := GenerateKey(rand.Reader)
- publicKey2, privateKey2, _ := GenerateKey(rand.Reader)
-
- if *privateKey1 == *privateKey2 {
- t.Fatalf("private keys are equal!")
- }
- if *publicKey1 == *publicKey2 {
- t.Fatalf("public keys are equal!")
- }
- message := []byte("test message")
- var nonce [24]byte
-
- box := Seal(nil, message, &nonce, publicKey1, privateKey2)
- opened, ok := Open(nil, box, &nonce, publicKey2, privateKey1)
- if !ok {
- t.Fatalf("failed to open box")
- }
-
- if !bytes.Equal(opened, message) {
- t.Fatalf("got %x, want %x", opened, message)
- }
-
- for i := range box {
- box[i] ^= 0x40
- _, ok := Open(nil, box, &nonce, publicKey2, privateKey1)
- if ok {
- t.Fatalf("opened box with byte %d corrupted", i)
- }
- box[i] ^= 0x40
- }
-}
-
-func TestBox(t *testing.T) {
- var privateKey1, privateKey2 [32]byte
- for i := range privateKey1[:] {
- privateKey1[i] = 1
- }
- for i := range privateKey2[:] {
- privateKey2[i] = 2
- }
-
- var publicKey1 [32]byte
- curve25519.ScalarBaseMult(&publicKey1, &privateKey1)
- var message [64]byte
- for i := range message[:] {
- message[i] = 3
- }
-
- var nonce [24]byte
- for i := range nonce[:] {
- nonce[i] = 4
- }
-
- box := Seal(nil, message[:], &nonce, &publicKey1, &privateKey2)
-
- // expected was generated using the C implementation of NaCl.
- expected, _ := hex.DecodeString("78ea30b19d2341ebbdba54180f821eec265cf86312549bea8a37652a8bb94f07b78a73ed1708085e6ddd0e943bbdeb8755079a37eb31d86163ce241164a47629c0539f330b4914cd135b3855bc2a2dfc")
-
- if !bytes.Equal(box, expected) {
- t.Fatalf("box didn't match, got\n%x\n, expected\n%x", box, expected)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/example_test.go
deleted file mode 100644
index 25e42d2be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/box/example_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package box_test
-
-import (
- crypto_rand "crypto/rand" // Custom so it's clear which rand we're using.
- "fmt"
- "io"
-
- "golang.org/x/crypto/nacl/box"
-)
-
-func Example() {
- senderPublicKey, senderPrivateKey, err := box.GenerateKey(crypto_rand.Reader)
- if err != nil {
- panic(err)
- }
-
- recipientPublicKey, recipientPrivateKey, err := box.GenerateKey(crypto_rand.Reader)
- if err != nil {
- panic(err)
- }
-
- // You must use a different nonce for each message you encrypt with the
- // same key. Since the nonce here is 192 bits long, a random value
- // provides a sufficiently small probability of repeats.
- var nonce [24]byte
- if _, err := io.ReadFull(crypto_rand.Reader, nonce[:]); err != nil {
- panic(err)
- }
-
- msg := []byte("Alas, poor Yorick! I knew him, Horatio")
- // This encrypts msg and appends the result to the nonce.
- encrypted := box.Seal(nonce[:], msg, &nonce, recipientPublicKey, senderPrivateKey)
-
- // The recipient can decrypt the message using their private key and the
- // sender's public key. When you decrypt, you must use the same nonce you
- // used to encrypt the message. One way to achieve this is to store the
- // nonce alongside the encrypted message. Above, we stored the nonce in the
- // first 24 bytes of the encrypted text.
- var decryptNonce [24]byte
- copy(decryptNonce[:], encrypted[:24])
- decrypted, ok := box.Open(nil, encrypted[24:], &decryptNonce, senderPublicKey, recipientPrivateKey)
- if !ok {
- panic("decryption error")
- }
- fmt.Println(string(decrypted))
- // Output: Alas, poor Yorick! I knew him, Horatio
-}
-
-func Example_precompute() {
- senderPublicKey, senderPrivateKey, err := box.GenerateKey(crypto_rand.Reader)
- if err != nil {
- panic(err)
- }
-
- recipientPublicKey, recipientPrivateKey, err := box.GenerateKey(crypto_rand.Reader)
- if err != nil {
- panic(err)
- }
-
- // The shared key can be used to speed up processing when using the same
- // pair of keys repeatedly.
- sharedEncryptKey := new([32]byte)
- box.Precompute(sharedEncryptKey, recipientPublicKey, senderPrivateKey)
-
- // You must use a different nonce for each message you encrypt with the
- // same key. Since the nonce here is 192 bits long, a random value
- // provides a sufficiently small probability of repeats.
- var nonce [24]byte
- if _, err := io.ReadFull(crypto_rand.Reader, nonce[:]); err != nil {
- panic(err)
- }
-
- msg := []byte("A fellow of infinite jest, of most excellent fancy")
- // This encrypts msg and appends the result to the nonce.
- encrypted := box.SealAfterPrecomputation(nonce[:], msg, &nonce, sharedEncryptKey)
-
- // The shared key can be used to speed up processing when using the same
- // pair of keys repeatedly.
- var sharedDecryptKey [32]byte
- box.Precompute(&sharedDecryptKey, senderPublicKey, recipientPrivateKey)
-
- // The recipient can decrypt the message using the shared key. When you
- // decrypt, you must use the same nonce you used to encrypt the message.
- // One way to achieve this is to store the nonce alongside the encrypted
- // message. Above, we stored the nonce in the first 24 bytes of the
- // encrypted text.
- var decryptNonce [24]byte
- copy(decryptNonce[:], encrypted[:24])
- decrypted, ok := box.OpenAfterPrecomputation(nil, encrypted[24:], &decryptNonce, &sharedDecryptKey)
- if !ok {
- panic("decryption error")
- }
- fmt.Println(string(decrypted))
- // Output: A fellow of infinite jest, of most excellent fancy
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/example_test.go
deleted file mode 100644
index 789f4ff03..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/example_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 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 file.
-
-package secretbox_test
-
-import (
- "crypto/rand"
- "encoding/hex"
- "fmt"
- "io"
-
- "golang.org/x/crypto/nacl/secretbox"
-)
-
-func Example() {
- // Load your secret key from a safe place and reuse it across multiple
- // Seal calls. (Obviously don't use this example key for anything
- // real.) If you want to convert a passphrase to a key, use a suitable
- // package like bcrypt or scrypt.
- secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574")
- if err != nil {
- panic(err)
- }
-
- var secretKey [32]byte
- copy(secretKey[:], secretKeyBytes)
-
- // You must use a different nonce for each message you encrypt with the
- // same key. Since the nonce here is 192 bits long, a random value
- // provides a sufficiently small probability of repeats.
- var nonce [24]byte
- if _, err := io.ReadFull(rand.Reader, nonce[:]); err != nil {
- panic(err)
- }
-
- // This encrypts "hello world" and appends the result to the nonce.
- encrypted := secretbox.Seal(nonce[:], []byte("hello world"), &nonce, &secretKey)
-
- // When you decrypt, you must use the same nonce and key you used to
- // encrypt the message. One way to achieve this is to store the nonce
- // alongside the encrypted message. Above, we stored the nonce in the first
- // 24 bytes of the encrypted text.
- var decryptNonce [24]byte
- copy(decryptNonce[:], encrypted[:24])
- decrypted, ok := secretbox.Open(nil, encrypted[24:], &decryptNonce, &secretKey)
- if !ok {
- panic("decryption error")
- }
-
- fmt.Println(string(decrypted))
- // Output: hello world
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
deleted file mode 100644
index 53ee83cfb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Package secretbox encrypts and authenticates small messages.
-
-Secretbox uses XSalsa20 and Poly1305 to encrypt and authenticate messages with
-secret-key cryptography. The length of messages is not hidden.
-
-It is the caller's responsibility to ensure the uniqueness of nonces—for
-example, by using nonce 1 for the first message, nonce 2 for the second
-message, etc. Nonces are long enough that randomly generated nonces have
-negligible risk of collision.
-
-Messages should be small because:
-
-1. The whole message needs to be held in memory to be processed.
-
-2. Using large messages pressures implementations on small machines to decrypt
-and process plaintext before authenticating it. This is very dangerous, and
-this API does not allow it, but a protocol that uses excessive message sizes
-might present some implementations with no other choice.
-
-3. Fixed overheads will be sufficiently amortised by messages as small as 8KB.
-
-4. Performance may be improved by working with messages that fit into data caches.
-
-Thus large amounts of data should be chunked so that each message is small.
-(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable
-chunk size.
-
-This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
-*/
-package secretbox // import "golang.org/x/crypto/nacl/secretbox"
-
-import (
- "golang.org/x/crypto/poly1305"
- "golang.org/x/crypto/salsa20/salsa"
-)
-
-// Overhead is the number of bytes of overhead when boxing a message.
-const Overhead = poly1305.TagSize
-
-// setup produces a sub-key and Salsa20 counter given a nonce and key.
-func setup(subKey *[32]byte, counter *[16]byte, nonce *[24]byte, key *[32]byte) {
- // We use XSalsa20 for encryption so first we need to generate a
- // key and nonce with HSalsa20.
- var hNonce [16]byte
- copy(hNonce[:], nonce[:])
- salsa.HSalsa20(subKey, &hNonce, key, &salsa.Sigma)
-
- // The final 8 bytes of the original nonce form the new nonce.
- copy(counter[:], nonce[16:])
-}
-
-// sliceForAppend takes a slice and a requested number of bytes. It returns a
-// slice with the contents of the given slice followed by that many bytes and a
-// second slice that aliases into it and contains only the extra bytes. If the
-// original slice has sufficient capacity then no allocation is performed.
-func sliceForAppend(in []byte, n int) (head, tail []byte) {
- if total := len(in) + n; cap(in) >= total {
- head = in[:total]
- } else {
- head = make([]byte, total)
- copy(head, in)
- }
- tail = head[len(in):]
- return
-}
-
-// Seal appends an encrypted and authenticated copy of message to out, which
-// must not overlap message. The key and nonce pair must be unique for each
-// distinct message and the output will be Overhead bytes longer than message.
-func Seal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte {
- var subKey [32]byte
- var counter [16]byte
- setup(&subKey, &counter, nonce, key)
-
- // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since
- // Salsa20 works with 64-byte blocks, we also generate 32 bytes of
- // keystream as a side effect.
- var firstBlock [64]byte
- salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey)
-
- var poly1305Key [32]byte
- copy(poly1305Key[:], firstBlock[:])
-
- ret, out := sliceForAppend(out, len(message)+poly1305.TagSize)
-
- // We XOR up to 32 bytes of message with the keystream generated from
- // the first block.
- firstMessageBlock := message
- if len(firstMessageBlock) > 32 {
- firstMessageBlock = firstMessageBlock[:32]
- }
-
- tagOut := out
- out = out[poly1305.TagSize:]
- for i, x := range firstMessageBlock {
- out[i] = firstBlock[32+i] ^ x
- }
- message = message[len(firstMessageBlock):]
- ciphertext := out
- out = out[len(firstMessageBlock):]
-
- // Now encrypt the rest.
- counter[8] = 1
- salsa.XORKeyStream(out, message, &counter, &subKey)
-
- var tag [poly1305.TagSize]byte
- poly1305.Sum(&tag, ciphertext, &poly1305Key)
- copy(tagOut, tag[:])
-
- return ret
-}
-
-// Open authenticates and decrypts a box produced by Seal and appends the
-// message to out, which must not overlap box. The output will be Overhead
-// bytes smaller than box.
-func Open(out []byte, box []byte, nonce *[24]byte, key *[32]byte) ([]byte, bool) {
- if len(box) < Overhead {
- return nil, false
- }
-
- var subKey [32]byte
- var counter [16]byte
- setup(&subKey, &counter, nonce, key)
-
- // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since
- // Salsa20 works with 64-byte blocks, we also generate 32 bytes of
- // keystream as a side effect.
- var firstBlock [64]byte
- salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey)
-
- var poly1305Key [32]byte
- copy(poly1305Key[:], firstBlock[:])
- var tag [poly1305.TagSize]byte
- copy(tag[:], box)
-
- if !poly1305.Verify(&tag, box[poly1305.TagSize:], &poly1305Key) {
- return nil, false
- }
-
- ret, out := sliceForAppend(out, len(box)-Overhead)
-
- // We XOR up to 32 bytes of box with the keystream generated from
- // the first block.
- box = box[Overhead:]
- firstMessageBlock := box
- if len(firstMessageBlock) > 32 {
- firstMessageBlock = firstMessageBlock[:32]
- }
- for i, x := range firstMessageBlock {
- out[i] = firstBlock[32+i] ^ x
- }
-
- box = box[len(firstMessageBlock):]
- out = out[len(firstMessageBlock):]
-
- // Now decrypt the rest.
- counter[8] = 1
- salsa.XORKeyStream(out, box, &counter, &subKey)
-
- return ret, true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox_test.go
deleted file mode 100644
index 3c70b0f4b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/nacl/secretbox/secretbox_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2012 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 file.
-
-package secretbox
-
-import (
- "bytes"
- "crypto/rand"
- "encoding/hex"
- "testing"
-)
-
-func TestSealOpen(t *testing.T) {
- var key [32]byte
- var nonce [24]byte
-
- rand.Reader.Read(key[:])
- rand.Reader.Read(nonce[:])
-
- var box, opened []byte
-
- for msgLen := 0; msgLen < 128; msgLen += 17 {
- message := make([]byte, msgLen)
- rand.Reader.Read(message)
-
- box = Seal(box[:0], message, &nonce, &key)
- var ok bool
- opened, ok = Open(opened[:0], box, &nonce, &key)
- if !ok {
- t.Errorf("%d: failed to open box", msgLen)
- continue
- }
-
- if !bytes.Equal(opened, message) {
- t.Errorf("%d: got %x, expected %x", msgLen, opened, message)
- continue
- }
- }
-
- for i := range box {
- box[i] ^= 0x20
- _, ok := Open(opened[:0], box, &nonce, &key)
- if ok {
- t.Errorf("box was opened after corrupting byte %d", i)
- }
- box[i] ^= 0x20
- }
-}
-
-func TestSecretBox(t *testing.T) {
- var key [32]byte
- var nonce [24]byte
- var message [64]byte
-
- for i := range key[:] {
- key[i] = 1
- }
- for i := range nonce[:] {
- nonce[i] = 2
- }
- for i := range message[:] {
- message[i] = 3
- }
-
- box := Seal(nil, message[:], &nonce, &key)
- // expected was generated using the C implementation of NaCl.
- expected, _ := hex.DecodeString("8442bc313f4626f1359e3b50122b6ce6fe66ddfe7d39d14e637eb4fd5b45beadab55198df6ab5368439792a23c87db70acb6156dc5ef957ac04f6276cf6093b84be77ff0849cc33e34b7254d5a8f65ad")
-
- if !bytes.Equal(box, expected) {
- t.Fatalf("box didn't match, got\n%x\n, expected\n%x", box, expected)
- }
-}
-
-func TestAppend(t *testing.T) {
- var key [32]byte
- var nonce [24]byte
- var message [8]byte
-
- out := make([]byte, 4)
- box := Seal(out, message[:], &nonce, &key)
- if !bytes.Equal(box[:4], out[:4]) {
- t.Fatalf("Seal didn't correctly append")
- }
-
- out = make([]byte, 4, 100)
- box = Seal(out, message[:], &nonce, &key)
- if !bytes.Equal(box[:4], out[:4]) {
- t.Fatalf("Seal didn't correctly append with sufficient capacity.")
- }
-}
-
-func benchmarkSealSize(b *testing.B, size int) {
- message := make([]byte, size)
- out := make([]byte, size+Overhead)
- var nonce [24]byte
- var key [32]byte
-
- b.SetBytes(int64(size))
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- out = Seal(out[:0], message, &nonce, &key)
- }
-}
-
-func BenchmarkSeal8Bytes(b *testing.B) {
- benchmarkSealSize(b, 8)
-}
-
-func BenchmarkSeal100Bytes(b *testing.B) {
- benchmarkSealSize(b, 100)
-}
-
-func BenchmarkSeal1K(b *testing.B) {
- benchmarkSealSize(b, 1024)
-}
-
-func BenchmarkSeal8K(b *testing.B) {
- benchmarkSealSize(b, 8192)
-}
-
-func benchmarkOpenSize(b *testing.B, size int) {
- msg := make([]byte, size)
- result := make([]byte, size)
- var nonce [24]byte
- var key [32]byte
- box := Seal(nil, msg, &nonce, &key)
-
- b.SetBytes(int64(size))
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- if _, ok := Open(result[:0], box, &nonce, &key); !ok {
- panic("Open failed")
- }
- }
-}
-
-func BenchmarkOpen8Bytes(b *testing.B) {
- benchmarkOpenSize(b, 8)
-}
-
-func BenchmarkOpen100Bytes(b *testing.B) {
- benchmarkOpenSize(b, 100)
-}
-
-func BenchmarkOpen1K(b *testing.B) {
- benchmarkOpenSize(b, 1024)
-}
-
-func BenchmarkOpen8K(b *testing.B) {
- benchmarkOpenSize(b, 8192)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp.go
deleted file mode 100644
index 5e73146d7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp.go
+++ /dev/null
@@ -1,778 +0,0 @@
-// Copyright 2013 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 file.
-
-// Package ocsp parses OCSP responses as specified in RFC 2560. OCSP responses
-// are signed messages attesting to the validity of a certificate for a small
-// period of time. This is used to manage revocation for X.509 certificates.
-package ocsp // import "golang.org/x/crypto/ocsp"
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/rsa"
- _ "crypto/sha1"
- _ "crypto/sha256"
- _ "crypto/sha512"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/asn1"
- "errors"
- "fmt"
- "math/big"
- "strconv"
- "time"
-)
-
-var idPKIXOCSPBasic = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 5, 5, 7, 48, 1, 1})
-
-// ResponseStatus contains the result of an OCSP request. See
-// https://tools.ietf.org/html/rfc6960#section-2.3
-type ResponseStatus int
-
-const (
- Success ResponseStatus = 0
- Malformed ResponseStatus = 1
- InternalError ResponseStatus = 2
- TryLater ResponseStatus = 3
- // Status code four is unused in OCSP. See
- // https://tools.ietf.org/html/rfc6960#section-4.2.1
- SignatureRequired ResponseStatus = 5
- Unauthorized ResponseStatus = 6
-)
-
-func (r ResponseStatus) String() string {
- switch r {
- case Success:
- return "success"
- case Malformed:
- return "malformed"
- case InternalError:
- return "internal error"
- case TryLater:
- return "try later"
- case SignatureRequired:
- return "signature required"
- case Unauthorized:
- return "unauthorized"
- default:
- return "unknown OCSP status: " + strconv.Itoa(int(r))
- }
-}
-
-// ResponseError is an error that may be returned by ParseResponse to indicate
-// that the response itself is an error, not just that its indicating that a
-// certificate is revoked, unknown, etc.
-type ResponseError struct {
- Status ResponseStatus
-}
-
-func (r ResponseError) Error() string {
- return "ocsp: error from server: " + r.Status.String()
-}
-
-// These are internal structures that reflect the ASN.1 structure of an OCSP
-// response. See RFC 2560, section 4.2.
-
-type certID struct {
- HashAlgorithm pkix.AlgorithmIdentifier
- NameHash []byte
- IssuerKeyHash []byte
- SerialNumber *big.Int
-}
-
-// https://tools.ietf.org/html/rfc2560#section-4.1.1
-type ocspRequest struct {
- TBSRequest tbsRequest
-}
-
-type tbsRequest struct {
- Version int `asn1:"explicit,tag:0,default:0,optional"`
- RequestorName pkix.RDNSequence `asn1:"explicit,tag:1,optional"`
- RequestList []request
-}
-
-type request struct {
- Cert certID
-}
-
-type responseASN1 struct {
- Status asn1.Enumerated
- Response responseBytes `asn1:"explicit,tag:0,optional"`
-}
-
-type responseBytes struct {
- ResponseType asn1.ObjectIdentifier
- Response []byte
-}
-
-type basicResponse struct {
- TBSResponseData responseData
- SignatureAlgorithm pkix.AlgorithmIdentifier
- Signature asn1.BitString
- Certificates []asn1.RawValue `asn1:"explicit,tag:0,optional"`
-}
-
-type responseData struct {
- Raw asn1.RawContent
- Version int `asn1:"optional,default:0,explicit,tag:0"`
- RawResponderID asn1.RawValue
- ProducedAt time.Time `asn1:"generalized"`
- Responses []singleResponse
-}
-
-type singleResponse struct {
- CertID certID
- Good asn1.Flag `asn1:"tag:0,optional"`
- Revoked revokedInfo `asn1:"tag:1,optional"`
- Unknown asn1.Flag `asn1:"tag:2,optional"`
- ThisUpdate time.Time `asn1:"generalized"`
- NextUpdate time.Time `asn1:"generalized,explicit,tag:0,optional"`
- SingleExtensions []pkix.Extension `asn1:"explicit,tag:1,optional"`
-}
-
-type revokedInfo struct {
- RevocationTime time.Time `asn1:"generalized"`
- Reason asn1.Enumerated `asn1:"explicit,tag:0,optional"`
-}
-
-var (
- oidSignatureMD2WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 2}
- oidSignatureMD5WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4}
- oidSignatureSHA1WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5}
- oidSignatureSHA256WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11}
- oidSignatureSHA384WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12}
- oidSignatureSHA512WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 13}
- oidSignatureDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 3}
- oidSignatureDSAWithSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 3, 2}
- oidSignatureECDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 1}
- oidSignatureECDSAWithSHA256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 2}
- oidSignatureECDSAWithSHA384 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 3}
- oidSignatureECDSAWithSHA512 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 4}
-)
-
-var hashOIDs = map[crypto.Hash]asn1.ObjectIdentifier{
- crypto.SHA1: asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}),
- crypto.SHA256: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 1}),
- crypto.SHA384: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 2}),
- crypto.SHA512: asn1.ObjectIdentifier([]int{2, 16, 840, 1, 101, 3, 4, 2, 3}),
-}
-
-// TODO(rlb): This is also from crypto/x509, so same comment as AGL's below
-var signatureAlgorithmDetails = []struct {
- algo x509.SignatureAlgorithm
- oid asn1.ObjectIdentifier
- pubKeyAlgo x509.PublicKeyAlgorithm
- hash crypto.Hash
-}{
- {x509.MD2WithRSA, oidSignatureMD2WithRSA, x509.RSA, crypto.Hash(0) /* no value for MD2 */},
- {x509.MD5WithRSA, oidSignatureMD5WithRSA, x509.RSA, crypto.MD5},
- {x509.SHA1WithRSA, oidSignatureSHA1WithRSA, x509.RSA, crypto.SHA1},
- {x509.SHA256WithRSA, oidSignatureSHA256WithRSA, x509.RSA, crypto.SHA256},
- {x509.SHA384WithRSA, oidSignatureSHA384WithRSA, x509.RSA, crypto.SHA384},
- {x509.SHA512WithRSA, oidSignatureSHA512WithRSA, x509.RSA, crypto.SHA512},
- {x509.DSAWithSHA1, oidSignatureDSAWithSHA1, x509.DSA, crypto.SHA1},
- {x509.DSAWithSHA256, oidSignatureDSAWithSHA256, x509.DSA, crypto.SHA256},
- {x509.ECDSAWithSHA1, oidSignatureECDSAWithSHA1, x509.ECDSA, crypto.SHA1},
- {x509.ECDSAWithSHA256, oidSignatureECDSAWithSHA256, x509.ECDSA, crypto.SHA256},
- {x509.ECDSAWithSHA384, oidSignatureECDSAWithSHA384, x509.ECDSA, crypto.SHA384},
- {x509.ECDSAWithSHA512, oidSignatureECDSAWithSHA512, x509.ECDSA, crypto.SHA512},
-}
-
-// TODO(rlb): This is also from crypto/x509, so same comment as AGL's below
-func signingParamsForPublicKey(pub interface{}, requestedSigAlgo x509.SignatureAlgorithm) (hashFunc crypto.Hash, sigAlgo pkix.AlgorithmIdentifier, err error) {
- var pubType x509.PublicKeyAlgorithm
-
- switch pub := pub.(type) {
- case *rsa.PublicKey:
- pubType = x509.RSA
- hashFunc = crypto.SHA256
- sigAlgo.Algorithm = oidSignatureSHA256WithRSA
- sigAlgo.Parameters = asn1.RawValue{
- Tag: 5,
- }
-
- case *ecdsa.PublicKey:
- pubType = x509.ECDSA
-
- switch pub.Curve {
- case elliptic.P224(), elliptic.P256():
- hashFunc = crypto.SHA256
- sigAlgo.Algorithm = oidSignatureECDSAWithSHA256
- case elliptic.P384():
- hashFunc = crypto.SHA384
- sigAlgo.Algorithm = oidSignatureECDSAWithSHA384
- case elliptic.P521():
- hashFunc = crypto.SHA512
- sigAlgo.Algorithm = oidSignatureECDSAWithSHA512
- default:
- err = errors.New("x509: unknown elliptic curve")
- }
-
- default:
- err = errors.New("x509: only RSA and ECDSA keys supported")
- }
-
- if err != nil {
- return
- }
-
- if requestedSigAlgo == 0 {
- return
- }
-
- found := false
- for _, details := range signatureAlgorithmDetails {
- if details.algo == requestedSigAlgo {
- if details.pubKeyAlgo != pubType {
- err = errors.New("x509: requested SignatureAlgorithm does not match private key type")
- return
- }
- sigAlgo.Algorithm, hashFunc = details.oid, details.hash
- if hashFunc == 0 {
- err = errors.New("x509: cannot sign with hash function requested")
- return
- }
- found = true
- break
- }
- }
-
- if !found {
- err = errors.New("x509: unknown SignatureAlgorithm")
- }
-
- return
-}
-
-// TODO(agl): this is taken from crypto/x509 and so should probably be exported
-// from crypto/x509 or crypto/x509/pkix.
-func getSignatureAlgorithmFromOID(oid asn1.ObjectIdentifier) x509.SignatureAlgorithm {
- for _, details := range signatureAlgorithmDetails {
- if oid.Equal(details.oid) {
- return details.algo
- }
- }
- return x509.UnknownSignatureAlgorithm
-}
-
-// TODO(rlb): This is not taken from crypto/x509, but it's of the same general form.
-func getHashAlgorithmFromOID(target asn1.ObjectIdentifier) crypto.Hash {
- for hash, oid := range hashOIDs {
- if oid.Equal(target) {
- return hash
- }
- }
- return crypto.Hash(0)
-}
-
-func getOIDFromHashAlgorithm(target crypto.Hash) asn1.ObjectIdentifier {
- for hash, oid := range hashOIDs {
- if hash == target {
- return oid
- }
- }
- return nil
-}
-
-// This is the exposed reflection of the internal OCSP structures.
-
-// The status values that can be expressed in OCSP. See RFC 6960.
-const (
- // Good means that the certificate is valid.
- Good = iota
- // Revoked means that the certificate has been deliberately revoked.
- Revoked
- // Unknown means that the OCSP responder doesn't know about the certificate.
- Unknown
- // ServerFailed is unused and was never used (see
- // https://go-review.googlesource.com/#/c/18944). ParseResponse will
- // return a ResponseError when an error response is parsed.
- ServerFailed
-)
-
-// The enumerated reasons for revoking a certificate. See RFC 5280.
-const (
- Unspecified = 0
- KeyCompromise = 1
- CACompromise = 2
- AffiliationChanged = 3
- Superseded = 4
- CessationOfOperation = 5
- CertificateHold = 6
-
- RemoveFromCRL = 8
- PrivilegeWithdrawn = 9
- AACompromise = 10
-)
-
-// Request represents an OCSP request. See RFC 6960.
-type Request struct {
- HashAlgorithm crypto.Hash
- IssuerNameHash []byte
- IssuerKeyHash []byte
- SerialNumber *big.Int
-}
-
-// Marshal marshals the OCSP request to ASN.1 DER encoded form.
-func (req *Request) Marshal() ([]byte, error) {
- hashAlg := getOIDFromHashAlgorithm(req.HashAlgorithm)
- if hashAlg == nil {
- return nil, errors.New("Unknown hash algorithm")
- }
- return asn1.Marshal(ocspRequest{
- tbsRequest{
- Version: 0,
- RequestList: []request{
- {
- Cert: certID{
- pkix.AlgorithmIdentifier{
- Algorithm: hashAlg,
- Parameters: asn1.RawValue{Tag: 5 /* ASN.1 NULL */},
- },
- req.IssuerNameHash,
- req.IssuerKeyHash,
- req.SerialNumber,
- },
- },
- },
- },
- })
-}
-
-// Response represents an OCSP response containing a single SingleResponse. See
-// RFC 6960.
-type Response struct {
- // Status is one of {Good, Revoked, Unknown}
- Status int
- SerialNumber *big.Int
- ProducedAt, ThisUpdate, NextUpdate, RevokedAt time.Time
- RevocationReason int
- Certificate *x509.Certificate
- // TBSResponseData contains the raw bytes of the signed response. If
- // Certificate is nil then this can be used to verify Signature.
- TBSResponseData []byte
- Signature []byte
- SignatureAlgorithm x509.SignatureAlgorithm
-
- // IssuerHash is the hash used to compute the IssuerNameHash and IssuerKeyHash.
- // Valid values are crypto.SHA1, crypto.SHA256, crypto.SHA384, and crypto.SHA512.
- // If zero, the default is crypto.SHA1.
- IssuerHash crypto.Hash
-
- // RawResponderName optionally contains the DER-encoded subject of the
- // responder certificate. Exactly one of RawResponderName and
- // ResponderKeyHash is set.
- RawResponderName []byte
- // ResponderKeyHash optionally contains the SHA-1 hash of the
- // responder's public key. Exactly one of RawResponderName and
- // ResponderKeyHash is set.
- ResponderKeyHash []byte
-
- // Extensions contains raw X.509 extensions from the singleExtensions field
- // of the OCSP response. When parsing certificates, this can be used to
- // extract non-critical extensions that are not parsed by this package. When
- // marshaling OCSP responses, the Extensions field is ignored, see
- // ExtraExtensions.
- Extensions []pkix.Extension
-
- // ExtraExtensions contains extensions to be copied, raw, into any marshaled
- // OCSP response (in the singleExtensions field). Values override any
- // extensions that would otherwise be produced based on the other fields. The
- // ExtraExtensions field is not populated when parsing certificates, see
- // Extensions.
- ExtraExtensions []pkix.Extension
-}
-
-// These are pre-serialized error responses for the various non-success codes
-// defined by OCSP. The Unauthorized code in particular can be used by an OCSP
-// responder that supports only pre-signed responses as a response to requests
-// for certificates with unknown status. See RFC 5019.
-var (
- MalformedRequestErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x01}
- InternalErrorErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x02}
- TryLaterErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x03}
- SigRequredErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x05}
- UnauthorizedErrorResponse = []byte{0x30, 0x03, 0x0A, 0x01, 0x06}
-)
-
-// CheckSignatureFrom checks that the signature in resp is a valid signature
-// from issuer. This should only be used if resp.Certificate is nil. Otherwise,
-// the OCSP response contained an intermediate certificate that created the
-// signature. That signature is checked by ParseResponse and only
-// resp.Certificate remains to be validated.
-func (resp *Response) CheckSignatureFrom(issuer *x509.Certificate) error {
- return issuer.CheckSignature(resp.SignatureAlgorithm, resp.TBSResponseData, resp.Signature)
-}
-
-// ParseError results from an invalid OCSP response.
-type ParseError string
-
-func (p ParseError) Error() string {
- return string(p)
-}
-
-// ParseRequest parses an OCSP request in DER form. It only supports
-// requests for a single certificate. Signed requests are not supported.
-// If a request includes a signature, it will result in a ParseError.
-func ParseRequest(bytes []byte) (*Request, error) {
- var req ocspRequest
- rest, err := asn1.Unmarshal(bytes, &req)
- if err != nil {
- return nil, err
- }
- if len(rest) > 0 {
- return nil, ParseError("trailing data in OCSP request")
- }
-
- if len(req.TBSRequest.RequestList) == 0 {
- return nil, ParseError("OCSP request contains no request body")
- }
- innerRequest := req.TBSRequest.RequestList[0]
-
- hashFunc := getHashAlgorithmFromOID(innerRequest.Cert.HashAlgorithm.Algorithm)
- if hashFunc == crypto.Hash(0) {
- return nil, ParseError("OCSP request uses unknown hash function")
- }
-
- return &Request{
- HashAlgorithm: hashFunc,
- IssuerNameHash: innerRequest.Cert.NameHash,
- IssuerKeyHash: innerRequest.Cert.IssuerKeyHash,
- SerialNumber: innerRequest.Cert.SerialNumber,
- }, nil
-}
-
-// ParseResponse parses an OCSP response in DER form. It only supports
-// responses for a single certificate. If the response contains a certificate
-// then the signature over the response is checked. If issuer is not nil then
-// it will be used to validate the signature or embedded certificate.
-//
-// Invalid responses and parse failures will result in a ParseError.
-// Error responses will result in a ResponseError.
-func ParseResponse(bytes []byte, issuer *x509.Certificate) (*Response, error) {
- return ParseResponseForCert(bytes, nil, issuer)
-}
-
-// ParseResponseForCert parses an OCSP response in DER form and searches for a
-// Response relating to cert. If such a Response is found and the OCSP response
-// contains a certificate then the signature over the response is checked. If
-// issuer is not nil then it will be used to validate the signature or embedded
-// certificate.
-//
-// Invalid responses and parse failures will result in a ParseError.
-// Error responses will result in a ResponseError.
-func ParseResponseForCert(bytes []byte, cert, issuer *x509.Certificate) (*Response, error) {
- var resp responseASN1
- rest, err := asn1.Unmarshal(bytes, &resp)
- if err != nil {
- return nil, err
- }
- if len(rest) > 0 {
- return nil, ParseError("trailing data in OCSP response")
- }
-
- if status := ResponseStatus(resp.Status); status != Success {
- return nil, ResponseError{status}
- }
-
- if !resp.Response.ResponseType.Equal(idPKIXOCSPBasic) {
- return nil, ParseError("bad OCSP response type")
- }
-
- var basicResp basicResponse
- rest, err = asn1.Unmarshal(resp.Response.Response, &basicResp)
- if err != nil {
- return nil, err
- }
-
- if len(basicResp.Certificates) > 1 {
- return nil, ParseError("OCSP response contains bad number of certificates")
- }
-
- if n := len(basicResp.TBSResponseData.Responses); n == 0 || cert == nil && n > 1 {
- return nil, ParseError("OCSP response contains bad number of responses")
- }
-
- var singleResp singleResponse
- if cert == nil {
- singleResp = basicResp.TBSResponseData.Responses[0]
- } else {
- match := false
- for _, resp := range basicResp.TBSResponseData.Responses {
- if cert.SerialNumber.Cmp(resp.CertID.SerialNumber) == 0 {
- singleResp = resp
- match = true
- break
- }
- }
- if !match {
- return nil, ParseError("no response matching the supplied certificate")
- }
- }
-
- ret := &Response{
- TBSResponseData: basicResp.TBSResponseData.Raw,
- Signature: basicResp.Signature.RightAlign(),
- SignatureAlgorithm: getSignatureAlgorithmFromOID(basicResp.SignatureAlgorithm.Algorithm),
- Extensions: singleResp.SingleExtensions,
- SerialNumber: singleResp.CertID.SerialNumber,
- ProducedAt: basicResp.TBSResponseData.ProducedAt,
- ThisUpdate: singleResp.ThisUpdate,
- NextUpdate: singleResp.NextUpdate,
- }
-
- // Handle the ResponderID CHOICE tag. ResponderID can be flattened into
- // TBSResponseData once https://go-review.googlesource.com/34503 has been
- // released.
- rawResponderID := basicResp.TBSResponseData.RawResponderID
- switch rawResponderID.Tag {
- case 1: // Name
- var rdn pkix.RDNSequence
- if rest, err := asn1.Unmarshal(rawResponderID.Bytes, &rdn); err != nil || len(rest) != 0 {
- return nil, ParseError("invalid responder name")
- }
- ret.RawResponderName = rawResponderID.Bytes
- case 2: // KeyHash
- if rest, err := asn1.Unmarshal(rawResponderID.Bytes, &ret.ResponderKeyHash); err != nil || len(rest) != 0 {
- return nil, ParseError("invalid responder key hash")
- }
- default:
- return nil, ParseError("invalid responder id tag")
- }
-
- if len(basicResp.Certificates) > 0 {
- ret.Certificate, err = x509.ParseCertificate(basicResp.Certificates[0].FullBytes)
- if err != nil {
- return nil, err
- }
-
- if err := ret.CheckSignatureFrom(ret.Certificate); err != nil {
- return nil, ParseError("bad signature on embedded certificate: " + err.Error())
- }
-
- if issuer != nil {
- if err := issuer.CheckSignature(ret.Certificate.SignatureAlgorithm, ret.Certificate.RawTBSCertificate, ret.Certificate.Signature); err != nil {
- return nil, ParseError("bad OCSP signature: " + err.Error())
- }
- }
- } else if issuer != nil {
- if err := ret.CheckSignatureFrom(issuer); err != nil {
- return nil, ParseError("bad OCSP signature: " + err.Error())
- }
- }
-
- for _, ext := range singleResp.SingleExtensions {
- if ext.Critical {
- return nil, ParseError("unsupported critical extension")
- }
- }
-
- for h, oid := range hashOIDs {
- if singleResp.CertID.HashAlgorithm.Algorithm.Equal(oid) {
- ret.IssuerHash = h
- break
- }
- }
- if ret.IssuerHash == 0 {
- return nil, ParseError("unsupported issuer hash algorithm")
- }
-
- switch {
- case bool(singleResp.Good):
- ret.Status = Good
- case bool(singleResp.Unknown):
- ret.Status = Unknown
- default:
- ret.Status = Revoked
- ret.RevokedAt = singleResp.Revoked.RevocationTime
- ret.RevocationReason = int(singleResp.Revoked.Reason)
- }
-
- return ret, nil
-}
-
-// RequestOptions contains options for constructing OCSP requests.
-type RequestOptions struct {
- // Hash contains the hash function that should be used when
- // constructing the OCSP request. If zero, SHA-1 will be used.
- Hash crypto.Hash
-}
-
-func (opts *RequestOptions) hash() crypto.Hash {
- if opts == nil || opts.Hash == 0 {
- // SHA-1 is nearly universally used in OCSP.
- return crypto.SHA1
- }
- return opts.Hash
-}
-
-// CreateRequest returns a DER-encoded, OCSP request for the status of cert. If
-// opts is nil then sensible defaults are used.
-func CreateRequest(cert, issuer *x509.Certificate, opts *RequestOptions) ([]byte, error) {
- hashFunc := opts.hash()
-
- // OCSP seems to be the only place where these raw hash identifiers are
- // used. I took the following from
- // http://msdn.microsoft.com/en-us/library/ff635603.aspx
- _, ok := hashOIDs[hashFunc]
- if !ok {
- return nil, x509.ErrUnsupportedAlgorithm
- }
-
- if !hashFunc.Available() {
- return nil, x509.ErrUnsupportedAlgorithm
- }
- h := opts.hash().New()
-
- var publicKeyInfo struct {
- Algorithm pkix.AlgorithmIdentifier
- PublicKey asn1.BitString
- }
- if _, err := asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo); err != nil {
- return nil, err
- }
-
- h.Write(publicKeyInfo.PublicKey.RightAlign())
- issuerKeyHash := h.Sum(nil)
-
- h.Reset()
- h.Write(issuer.RawSubject)
- issuerNameHash := h.Sum(nil)
-
- req := &Request{
- HashAlgorithm: hashFunc,
- IssuerNameHash: issuerNameHash,
- IssuerKeyHash: issuerKeyHash,
- SerialNumber: cert.SerialNumber,
- }
- return req.Marshal()
-}
-
-// CreateResponse returns a DER-encoded OCSP response with the specified contents.
-// The fields in the response are populated as follows:
-//
-// The responder cert is used to populate the responder's name field, and the
-// certificate itself is provided alongside the OCSP response signature.
-//
-// The issuer cert is used to puplate the IssuerNameHash and IssuerKeyHash fields.
-//
-// The template is used to populate the SerialNumber, Status, RevokedAt,
-// RevocationReason, ThisUpdate, and NextUpdate fields.
-//
-// If template.IssuerHash is not set, SHA1 will be used.
-//
-// The ProducedAt date is automatically set to the current date, to the nearest minute.
-func CreateResponse(issuer, responderCert *x509.Certificate, template Response, priv crypto.Signer) ([]byte, error) {
- var publicKeyInfo struct {
- Algorithm pkix.AlgorithmIdentifier
- PublicKey asn1.BitString
- }
- if _, err := asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo); err != nil {
- return nil, err
- }
-
- if template.IssuerHash == 0 {
- template.IssuerHash = crypto.SHA1
- }
- hashOID := getOIDFromHashAlgorithm(template.IssuerHash)
- if hashOID == nil {
- return nil, errors.New("unsupported issuer hash algorithm")
- }
-
- if !template.IssuerHash.Available() {
- return nil, fmt.Errorf("issuer hash algorithm %v not linked into binary", template.IssuerHash)
- }
- h := template.IssuerHash.New()
- h.Write(publicKeyInfo.PublicKey.RightAlign())
- issuerKeyHash := h.Sum(nil)
-
- h.Reset()
- h.Write(issuer.RawSubject)
- issuerNameHash := h.Sum(nil)
-
- innerResponse := singleResponse{
- CertID: certID{
- HashAlgorithm: pkix.AlgorithmIdentifier{
- Algorithm: hashOID,
- Parameters: asn1.RawValue{Tag: 5 /* ASN.1 NULL */},
- },
- NameHash: issuerNameHash,
- IssuerKeyHash: issuerKeyHash,
- SerialNumber: template.SerialNumber,
- },
- ThisUpdate: template.ThisUpdate.UTC(),
- NextUpdate: template.NextUpdate.UTC(),
- SingleExtensions: template.ExtraExtensions,
- }
-
- switch template.Status {
- case Good:
- innerResponse.Good = true
- case Unknown:
- innerResponse.Unknown = true
- case Revoked:
- innerResponse.Revoked = revokedInfo{
- RevocationTime: template.RevokedAt.UTC(),
- Reason: asn1.Enumerated(template.RevocationReason),
- }
- }
-
- rawResponderID := asn1.RawValue{
- Class: 2, // context-specific
- Tag: 1, // Name (explicit tag)
- IsCompound: true,
- Bytes: responderCert.RawSubject,
- }
- tbsResponseData := responseData{
- Version: 0,
- RawResponderID: rawResponderID,
- ProducedAt: time.Now().Truncate(time.Minute).UTC(),
- Responses: []singleResponse{innerResponse},
- }
-
- tbsResponseDataDER, err := asn1.Marshal(tbsResponseData)
- if err != nil {
- return nil, err
- }
-
- hashFunc, signatureAlgorithm, err := signingParamsForPublicKey(priv.Public(), template.SignatureAlgorithm)
- if err != nil {
- return nil, err
- }
-
- responseHash := hashFunc.New()
- responseHash.Write(tbsResponseDataDER)
- signature, err := priv.Sign(rand.Reader, responseHash.Sum(nil), hashFunc)
- if err != nil {
- return nil, err
- }
-
- response := basicResponse{
- TBSResponseData: tbsResponseData,
- SignatureAlgorithm: signatureAlgorithm,
- Signature: asn1.BitString{
- Bytes: signature,
- BitLength: 8 * len(signature),
- },
- }
- if template.Certificate != nil {
- response.Certificates = []asn1.RawValue{
- asn1.RawValue{FullBytes: template.Certificate.Raw},
- }
- }
- responseDER, err := asn1.Marshal(response)
- if err != nil {
- return nil, err
- }
-
- return asn1.Marshal(responseASN1{
- Status: asn1.Enumerated(Success),
- Response: responseBytes{
- ResponseType: idPKIXOCSPBasic,
- Response: responseDER,
- },
- })
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp_test.go
deleted file mode 100644
index 1fadfec4c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ocsp/ocsp_test.go
+++ /dev/null
@@ -1,875 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build go1.7
-
-package ocsp
-
-import (
- "bytes"
- "crypto"
- "crypto/sha1"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/asn1"
- "encoding/hex"
- "math/big"
- "reflect"
- "testing"
- "time"
-)
-
-func TestOCSPDecode(t *testing.T) {
- responseBytes, _ := hex.DecodeString(ocspResponseHex)
- resp, err := ParseResponse(responseBytes, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- responderCert, _ := hex.DecodeString(startComResponderCertHex)
- responder, err := x509.ParseCertificate(responderCert)
- if err != nil {
- t.Fatal(err)
- }
-
- expected := Response{
- Status: Good,
- SerialNumber: big.NewInt(0x1d0fa),
- RevocationReason: Unspecified,
- ThisUpdate: time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC),
- NextUpdate: time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC),
- RawResponderName: responder.RawSubject,
- }
-
- if !reflect.DeepEqual(resp.ThisUpdate, expected.ThisUpdate) {
- t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, expected.ThisUpdate)
- }
-
- if !reflect.DeepEqual(resp.NextUpdate, expected.NextUpdate) {
- t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, expected.NextUpdate)
- }
-
- if resp.Status != expected.Status {
- t.Errorf("resp.Status: got %d, want %d", resp.Status, expected.Status)
- }
-
- if resp.SerialNumber.Cmp(expected.SerialNumber) != 0 {
- t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, expected.SerialNumber)
- }
-
- if resp.RevocationReason != expected.RevocationReason {
- t.Errorf("resp.RevocationReason: got %d, want %d", resp.RevocationReason, expected.RevocationReason)
- }
-
- if !bytes.Equal(resp.RawResponderName, expected.RawResponderName) {
- t.Errorf("resp.RawResponderName: got %x, want %x", resp.RawResponderName, expected.RawResponderName)
- }
-
- if !bytes.Equal(resp.ResponderKeyHash, expected.ResponderKeyHash) {
- t.Errorf("resp.ResponderKeyHash: got %x, want %x", resp.ResponderKeyHash, expected.ResponderKeyHash)
- }
-}
-
-func TestOCSPDecodeWithoutCert(t *testing.T) {
- responseBytes, _ := hex.DecodeString(ocspResponseWithoutCertHex)
- _, err := ParseResponse(responseBytes, nil)
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestOCSPDecodeWithExtensions(t *testing.T) {
- responseBytes, _ := hex.DecodeString(ocspResponseWithCriticalExtensionHex)
- _, err := ParseResponse(responseBytes, nil)
- if err == nil {
- t.Error(err)
- }
-
- responseBytes, _ = hex.DecodeString(ocspResponseWithExtensionHex)
- response, err := ParseResponse(responseBytes, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- if len(response.Extensions) != 1 {
- t.Errorf("len(response.Extensions): got %v, want %v", len(response.Extensions), 1)
- }
-
- extensionBytes := response.Extensions[0].Value
- expectedBytes, _ := hex.DecodeString(ocspExtensionValueHex)
- if !bytes.Equal(extensionBytes, expectedBytes) {
- t.Errorf("response.Extensions[0]: got %x, want %x", extensionBytes, expectedBytes)
- }
-}
-
-func TestOCSPSignature(t *testing.T) {
- issuerCert, _ := hex.DecodeString(startComHex)
- issuer, err := x509.ParseCertificate(issuerCert)
- if err != nil {
- t.Fatal(err)
- }
-
- response, _ := hex.DecodeString(ocspResponseHex)
- if _, err := ParseResponse(response, issuer); err != nil {
- t.Error(err)
- }
-}
-
-func TestOCSPRequest(t *testing.T) {
- leafCert, _ := hex.DecodeString(leafCertHex)
- cert, err := x509.ParseCertificate(leafCert)
- if err != nil {
- t.Fatal(err)
- }
-
- issuerCert, _ := hex.DecodeString(issuerCertHex)
- issuer, err := x509.ParseCertificate(issuerCert)
- if err != nil {
- t.Fatal(err)
- }
-
- request, err := CreateRequest(cert, issuer, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- expectedBytes, _ := hex.DecodeString(ocspRequestHex)
- if !bytes.Equal(request, expectedBytes) {
- t.Errorf("request: got %x, wanted %x", request, expectedBytes)
- }
-
- decodedRequest, err := ParseRequest(expectedBytes)
- if err != nil {
- t.Fatal(err)
- }
-
- if decodedRequest.HashAlgorithm != crypto.SHA1 {
- t.Errorf("request.HashAlgorithm: got %v, want %v", decodedRequest.HashAlgorithm, crypto.SHA1)
- }
-
- var publicKeyInfo struct {
- Algorithm pkix.AlgorithmIdentifier
- PublicKey asn1.BitString
- }
- _, err = asn1.Unmarshal(issuer.RawSubjectPublicKeyInfo, &publicKeyInfo)
- if err != nil {
- t.Fatal(err)
- }
-
- h := sha1.New()
- h.Write(publicKeyInfo.PublicKey.RightAlign())
- issuerKeyHash := h.Sum(nil)
-
- h.Reset()
- h.Write(issuer.RawSubject)
- issuerNameHash := h.Sum(nil)
-
- if got := decodedRequest.IssuerKeyHash; !bytes.Equal(got, issuerKeyHash) {
- t.Errorf("request.IssuerKeyHash: got %x, want %x", got, issuerKeyHash)
- }
-
- if got := decodedRequest.IssuerNameHash; !bytes.Equal(got, issuerNameHash) {
- t.Errorf("request.IssuerKeyHash: got %x, want %x", got, issuerNameHash)
- }
-
- if got := decodedRequest.SerialNumber; got.Cmp(cert.SerialNumber) != 0 {
- t.Errorf("request.SerialNumber: got %x, want %x", got, cert.SerialNumber)
- }
-
- marshaledRequest, err := decodedRequest.Marshal()
- if err != nil {
- t.Fatal(err)
- }
-
- if bytes.Compare(expectedBytes, marshaledRequest) != 0 {
- t.Errorf(
- "Marshaled request doesn't match expected: wanted %x, got %x",
- expectedBytes,
- marshaledRequest,
- )
- }
-}
-
-func TestOCSPResponse(t *testing.T) {
- leafCert, _ := hex.DecodeString(leafCertHex)
- leaf, err := x509.ParseCertificate(leafCert)
- if err != nil {
- t.Fatal(err)
- }
-
- issuerCert, _ := hex.DecodeString(issuerCertHex)
- issuer, err := x509.ParseCertificate(issuerCert)
- if err != nil {
- t.Fatal(err)
- }
-
- responderCert, _ := hex.DecodeString(responderCertHex)
- responder, err := x509.ParseCertificate(responderCert)
- if err != nil {
- t.Fatal(err)
- }
-
- responderPrivateKeyDER, _ := hex.DecodeString(responderPrivateKeyHex)
- responderPrivateKey, err := x509.ParsePKCS1PrivateKey(responderPrivateKeyDER)
- if err != nil {
- t.Fatal(err)
- }
-
- extensionBytes, _ := hex.DecodeString(ocspExtensionValueHex)
- extensions := []pkix.Extension{
- pkix.Extension{
- Id: ocspExtensionOID,
- Critical: false,
- Value: extensionBytes,
- },
- }
-
- thisUpdate := time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC)
- nextUpdate := time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC)
- template := Response{
- Status: Revoked,
- SerialNumber: leaf.SerialNumber,
- ThisUpdate: thisUpdate,
- NextUpdate: nextUpdate,
- RevokedAt: thisUpdate,
- RevocationReason: KeyCompromise,
- Certificate: responder,
- ExtraExtensions: extensions,
- }
-
- template.IssuerHash = crypto.MD5
- _, err = CreateResponse(issuer, responder, template, responderPrivateKey)
- if err == nil {
- t.Fatal("CreateResponse didn't fail with non-valid template.IssuerHash value crypto.MD5")
- }
-
- testCases := []struct {
- name string
- issuerHash crypto.Hash
- }{
- {"Zero value", 0},
- {"crypto.SHA1", crypto.SHA1},
- {"crypto.SHA256", crypto.SHA256},
- {"crypto.SHA384", crypto.SHA384},
- {"crypto.SHA512", crypto.SHA512},
- }
- for _, tc := range testCases {
- t.Run(tc.name, func(t *testing.T) {
- template.IssuerHash = tc.issuerHash
- responseBytes, err := CreateResponse(issuer, responder, template, responderPrivateKey)
- if err != nil {
- t.Fatalf("CreateResponse failed: %s", err)
- }
-
- resp, err := ParseResponse(responseBytes, nil)
- if err != nil {
- t.Fatalf("ParseResponse failed: %s", err)
- }
-
- if !reflect.DeepEqual(resp.ThisUpdate, template.ThisUpdate) {
- t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, template.ThisUpdate)
- }
-
- if !reflect.DeepEqual(resp.NextUpdate, template.NextUpdate) {
- t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, template.NextUpdate)
- }
-
- if !reflect.DeepEqual(resp.RevokedAt, template.RevokedAt) {
- t.Errorf("resp.RevokedAt: got %v, want %v", resp.RevokedAt, template.RevokedAt)
- }
-
- if !reflect.DeepEqual(resp.Extensions, template.ExtraExtensions) {
- t.Errorf("resp.Extensions: got %v, want %v", resp.Extensions, template.ExtraExtensions)
- }
-
- delay := time.Since(resp.ProducedAt)
- if delay < -time.Hour || delay > time.Hour {
- t.Errorf("resp.ProducedAt: got %s, want close to current time (%s)", resp.ProducedAt, time.Now())
- }
-
- if resp.Status != template.Status {
- t.Errorf("resp.Status: got %d, want %d", resp.Status, template.Status)
- }
-
- if resp.SerialNumber.Cmp(template.SerialNumber) != 0 {
- t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, template.SerialNumber)
- }
-
- if resp.RevocationReason != template.RevocationReason {
- t.Errorf("resp.RevocationReason: got %d, want %d", resp.RevocationReason, template.RevocationReason)
- }
-
- expectedHash := tc.issuerHash
- if tc.issuerHash == 0 {
- expectedHash = crypto.SHA1
- }
-
- if resp.IssuerHash != expectedHash {
- t.Errorf("resp.IssuerHash: got %d, want %d", resp.IssuerHash, expectedHash)
- }
- })
- }
-}
-
-func TestErrorResponse(t *testing.T) {
- responseBytes, _ := hex.DecodeString(errorResponseHex)
- _, err := ParseResponse(responseBytes, nil)
-
- respErr, ok := err.(ResponseError)
- if !ok {
- t.Fatalf("expected ResponseError from ParseResponse but got %#v", err)
- }
- if respErr.Status != Malformed {
- t.Fatalf("expected Malformed status from ParseResponse but got %d", respErr.Status)
- }
-}
-
-func TestOCSPDecodeMultiResponse(t *testing.T) {
- inclCert, _ := hex.DecodeString(ocspMultiResponseCertHex)
- cert, err := x509.ParseCertificate(inclCert)
- if err != nil {
- t.Fatal(err)
- }
-
- responseBytes, _ := hex.DecodeString(ocspMultiResponseHex)
- resp, err := ParseResponseForCert(responseBytes, cert, nil)
- if err != nil {
- t.Fatal(err)
- }
-
- if resp.SerialNumber.Cmp(cert.SerialNumber) != 0 {
- t.Errorf("resp.SerialNumber: got %x, want %x", resp.SerialNumber, cert.SerialNumber)
- }
-}
-
-func TestOCSPDecodeMultiResponseWithoutMatchingCert(t *testing.T) {
- wrongCert, _ := hex.DecodeString(startComHex)
- cert, err := x509.ParseCertificate(wrongCert)
- if err != nil {
- t.Fatal(err)
- }
-
- responseBytes, _ := hex.DecodeString(ocspMultiResponseHex)
- _, err = ParseResponseForCert(responseBytes, cert, nil)
- want := ParseError("no response matching the supplied certificate")
- if err != want {
- t.Errorf("err: got %q, want %q", err, want)
- }
-}
-
-// This OCSP response was taken from Thawte's public OCSP responder.
-// To recreate:
-// $ openssl s_client -tls1 -showcerts -servername www.google.com -connect www.google.com:443
-// Copy and paste the first certificate into /tmp/cert.crt and the second into
-// /tmp/intermediate.crt
-// $ openssl ocsp -issuer /tmp/intermediate.crt -cert /tmp/cert.crt -url http://ocsp.thawte.com -resp_text -respout /tmp/ocsp.der
-// Then hex encode the result:
-// $ python -c 'print file("/tmp/ocsp.der", "r").read().encode("hex")'
-
-const ocspResponseHex = "308206bc0a0100a08206b5308206b106092b0601050507300101048206a23082069e3081" +
- "c9a14e304c310b300906035504061302494c31163014060355040a130d5374617274436f" +
- "6d204c74642e312530230603550403131c5374617274436f6d20436c6173732031204f43" +
- "5350205369676e6572180f32303130303730373137333531375a30663064303c30090605" +
- "2b0e03021a050004146568874f40750f016a3475625e1f5c93e5a26d580414eb4234d098" +
- "b0ab9ff41b6b08f7cc642eef0e2c45020301d0fa8000180f323031303037303731353031" +
- "30355aa011180f32303130303730373138333531375a300d06092a864886f70d01010505" +
- "000382010100ab557ff070d1d7cebbb5f0ec91a15c3fed22eb2e1b8244f1b84545f013a4" +
- "fb46214c5e3fbfbebb8a56acc2b9db19f68fd3c3201046b3824d5ba689f99864328710cb" +
- "467195eb37d84f539e49f859316b32964dc3e47e36814ce94d6c56dd02733b1d0802f7ff" +
- "4eebdbbd2927dcf580f16cbc290f91e81b53cb365e7223f1d6e20a88ea064104875e0145" +
- "672b20fc14829d51ca122f5f5d77d3ad6c83889c55c7dc43680ba2fe3cef8b05dbcabdc0" +
- "d3e09aaf9725597f8c858c2fa38c0d6aed2e6318194420dd1a1137445d13e1c97ab47896" +
- "17a4e08925f46f867b72e3a4dc1f08cb870b2b0717f7207faa0ac512e628a029aba7457a" +
- "e63dcf3281e2162d9349a08204ba308204b6308204b23082039aa003020102020101300d" +
- "06092a864886f70d010105050030818c310b300906035504061302494c31163014060355" +
- "040a130d5374617274436f6d204c74642e312b3029060355040b13225365637572652044" +
- "69676974616c204365727469666963617465205369676e696e6731383036060355040313" +
- "2f5374617274436f6d20436c6173732031205072696d61727920496e7465726d65646961" +
- "746520536572766572204341301e170d3037313032353030323330365a170d3132313032" +
- "333030323330365a304c310b300906035504061302494c31163014060355040a130d5374" +
- "617274436f6d204c74642e312530230603550403131c5374617274436f6d20436c617373" +
- "2031204f435350205369676e657230820122300d06092a864886f70d0101010500038201" +
- "0f003082010a0282010100b9561b4c45318717178084e96e178df2255e18ed8d8ecc7c2b" +
- "7b51a6c1c2e6bf0aa3603066f132fe10ae97b50e99fa24b83fc53dd2777496387d14e1c3" +
- "a9b6a4933e2ac12413d085570a95b8147414a0bc007c7bcf222446ef7f1a156d7ea1c577" +
- "fc5f0facdfd42eb0f5974990cb2f5cefebceef4d1bdc7ae5c1075c5a99a93171f2b0845b" +
- "4ff0864e973fcfe32f9d7511ff87a3e943410c90a4493a306b6944359340a9ca96f02b66" +
- "ce67f028df2980a6aaee8d5d5d452b8b0eb93f923cc1e23fcccbdbe7ffcb114d08fa7a6a" +
- "3c404f825d1a0e715935cf623a8c7b59670014ed0622f6089a9447a7a19010f7fe58f841" +
- "29a2765ea367824d1c3bb2fda308530203010001a382015c30820158300c0603551d1301" +
- "01ff04023000300b0603551d0f0404030203a8301e0603551d250417301506082b060105" +
- "0507030906092b0601050507300105301d0603551d0e0416041445e0a36695414c5dd449" +
- "bc00e33cdcdbd2343e173081a80603551d230481a030819d8014eb4234d098b0ab9ff41b" +
- "6b08f7cc642eef0e2c45a18181a47f307d310b300906035504061302494c311630140603" +
- "55040a130d5374617274436f6d204c74642e312b3029060355040b132253656375726520" +
- "4469676974616c204365727469666963617465205369676e696e67312930270603550403" +
- "13205374617274436f6d2043657274696669636174696f6e20417574686f726974798201" +
- "0a30230603551d12041c301a8618687474703a2f2f7777772e737461727473736c2e636f" +
- "6d2f302c06096086480186f842010d041f161d5374617274436f6d205265766f63617469" +
- "6f6e20417574686f72697479300d06092a864886f70d01010505000382010100182d2215" +
- "8f0fc0291324fa8574c49bb8ff2835085adcbf7b7fc4191c397ab6951328253fffe1e5ec" +
- "2a7da0d50fca1a404e6968481366939e666c0a6209073eca57973e2fefa9ed1718e8176f" +
- "1d85527ff522c08db702e3b2b180f1cbff05d98128252cf0f450f7dd2772f4188047f19d" +
- "c85317366f94bc52d60f453a550af58e308aaab00ced33040b62bf37f5b1ab2a4f7f0f80" +
- "f763bf4d707bc8841d7ad9385ee2a4244469260b6f2bf085977af9074796048ecc2f9d48" +
- "a1d24ce16e41a9941568fec5b42771e118f16c106a54ccc339a4b02166445a167902e75e" +
- "6d8620b0825dcd18a069b90fd851d10fa8effd409deec02860d26d8d833f304b10669b42"
-
-const startComResponderCertHex = "308204b23082039aa003020102020101300d06092a864886f70d010105050030818c310b" +
- "300906035504061302494c31163014060355040a130d5374617274436f6d204c74642e31" +
- "2b3029060355040b1322536563757265204469676974616c204365727469666963617465" +
- "205369676e696e67313830360603550403132f5374617274436f6d20436c617373203120" +
- "5072696d61727920496e7465726d65646961746520536572766572204341301e170d3037" +
- "313032353030323330365a170d3132313032333030323330365a304c310b300906035504" +
- "061302494c31163014060355040a130d5374617274436f6d204c74642e31253023060355" +
- "0403131c5374617274436f6d20436c6173732031204f435350205369676e657230820122" +
- "300d06092a864886f70d01010105000382010f003082010a0282010100b9561b4c453187" +
- "17178084e96e178df2255e18ed8d8ecc7c2b7b51a6c1c2e6bf0aa3603066f132fe10ae97" +
- "b50e99fa24b83fc53dd2777496387d14e1c3a9b6a4933e2ac12413d085570a95b8147414" +
- "a0bc007c7bcf222446ef7f1a156d7ea1c577fc5f0facdfd42eb0f5974990cb2f5cefebce" +
- "ef4d1bdc7ae5c1075c5a99a93171f2b0845b4ff0864e973fcfe32f9d7511ff87a3e94341" +
- "0c90a4493a306b6944359340a9ca96f02b66ce67f028df2980a6aaee8d5d5d452b8b0eb9" +
- "3f923cc1e23fcccbdbe7ffcb114d08fa7a6a3c404f825d1a0e715935cf623a8c7b596700" +
- "14ed0622f6089a9447a7a19010f7fe58f84129a2765ea367824d1c3bb2fda30853020301" +
- "0001a382015c30820158300c0603551d130101ff04023000300b0603551d0f0404030203" +
- "a8301e0603551d250417301506082b0601050507030906092b0601050507300105301d06" +
- "03551d0e0416041445e0a36695414c5dd449bc00e33cdcdbd2343e173081a80603551d23" +
- "0481a030819d8014eb4234d098b0ab9ff41b6b08f7cc642eef0e2c45a18181a47f307d31" +
- "0b300906035504061302494c31163014060355040a130d5374617274436f6d204c74642e" +
- "312b3029060355040b1322536563757265204469676974616c2043657274696669636174" +
- "65205369676e696e6731293027060355040313205374617274436f6d2043657274696669" +
- "636174696f6e20417574686f7269747982010a30230603551d12041c301a861868747470" +
- "3a2f2f7777772e737461727473736c2e636f6d2f302c06096086480186f842010d041f16" +
- "1d5374617274436f6d205265766f636174696f6e20417574686f72697479300d06092a86" +
- "4886f70d01010505000382010100182d22158f0fc0291324fa8574c49bb8ff2835085adc" +
- "bf7b7fc4191c397ab6951328253fffe1e5ec2a7da0d50fca1a404e6968481366939e666c" +
- "0a6209073eca57973e2fefa9ed1718e8176f1d85527ff522c08db702e3b2b180f1cbff05" +
- "d98128252cf0f450f7dd2772f4188047f19dc85317366f94bc52d60f453a550af58e308a" +
- "aab00ced33040b62bf37f5b1ab2a4f7f0f80f763bf4d707bc8841d7ad9385ee2a4244469" +
- "260b6f2bf085977af9074796048ecc2f9d48a1d24ce16e41a9941568fec5b42771e118f1" +
- "6c106a54ccc339a4b02166445a167902e75e6d8620b0825dcd18a069b90fd851d10fa8ef" +
- "fd409deec02860d26d8d833f304b10669b42"
-
-const startComHex = "308206343082041ca003020102020118300d06092a864886f70d0101050500307d310b30" +
- "0906035504061302494c31163014060355040a130d5374617274436f6d204c74642e312b" +
- "3029060355040b1322536563757265204469676974616c20436572746966696361746520" +
- "5369676e696e6731293027060355040313205374617274436f6d20436572746966696361" +
- "74696f6e20417574686f72697479301e170d3037313032343230353431375a170d313731" +
- "3032343230353431375a30818c310b300906035504061302494c31163014060355040a13" +
- "0d5374617274436f6d204c74642e312b3029060355040b13225365637572652044696769" +
- "74616c204365727469666963617465205369676e696e67313830360603550403132f5374" +
- "617274436f6d20436c6173732031205072696d61727920496e7465726d65646961746520" +
- "53657276657220434130820122300d06092a864886f70d01010105000382010f00308201" +
- "0a0282010100b689c6acef09527807ac9263d0f44418188480561f91aee187fa3250b4d3" +
- "4706f0e6075f700e10f71dc0ce103634855a0f92ac83c6ac58523fba38e8fce7a724e240" +
- "a60876c0926e9e2a6d4d3f6e61200adb59ded27d63b33e46fefa215118d7cd30a6ed076e" +
- "3b7087b4f9faebee823c056f92f7a4dc0a301e9373fe07cad75f809d225852ae06da8b87" +
- "2369b0e42ad8ea83d2bdf371db705a280faf5a387045123f304dcd3baf17e50fcba0a95d" +
- "48aab16150cb34cd3c5cc30be810c08c9bf0030362feb26c3e720eee1c432ac9480e5739" +
- "c43121c810c12c87fe5495521f523c31129b7fe7c0a0a559d5e28f3ef0d5a8e1d77031a9" +
- "c4b3cfaf6d532f06f4a70203010001a38201ad308201a9300f0603551d130101ff040530" +
- "030101ff300e0603551d0f0101ff040403020106301d0603551d0e04160414eb4234d098" +
- "b0ab9ff41b6b08f7cc642eef0e2c45301f0603551d230418301680144e0bef1aa4405ba5" +
- "17698730ca346843d041aef2306606082b06010505070101045a3058302706082b060105" +
- "05073001861b687474703a2f2f6f6373702e737461727473736c2e636f6d2f6361302d06" +
- "082b060105050730028621687474703a2f2f7777772e737461727473736c2e636f6d2f73" +
- "667363612e637274305b0603551d1f045430523027a025a0238621687474703a2f2f7777" +
- "772e737461727473736c2e636f6d2f73667363612e63726c3027a025a023862168747470" +
- "3a2f2f63726c2e737461727473736c2e636f6d2f73667363612e63726c3081800603551d" +
- "20047930773075060b2b0601040181b5370102013066302e06082b060105050702011622" +
- "687474703a2f2f7777772e737461727473736c2e636f6d2f706f6c6963792e7064663034" +
- "06082b060105050702011628687474703a2f2f7777772e737461727473736c2e636f6d2f" +
- "696e7465726d6564696174652e706466300d06092a864886f70d01010505000382020100" +
- "2109493ea5886ee00b8b48da314d8ff75657a2e1d36257e9b556f38545753be5501f048b" +
- "e6a05a3ee700ae85d0fbff200364cbad02e1c69172f8a34dd6dee8cc3fa18aa2e37c37a7" +
- "c64f8f35d6f4d66e067bdd21d9cf56ffcb302249fe8904f385e5aaf1e71fe875904dddf9" +
- "46f74234f745580c110d84b0c6da5d3ef9019ee7e1da5595be741c7bfc4d144fac7e5547" +
- "7d7bf4a50d491e95e8f712c1ccff76a62547d0f37535be97b75816ebaa5c786fec5330af" +
- "ea044dcca902e3f0b60412f630b1113d904e5664d7dc3c435f7339ef4baf87ebf6fe6888" +
- "4472ead207c669b0c1a18bef1749d761b145485f3b2021e95bb2ccf4d7e931f50b15613b" +
- "7a94e3ebd9bc7f94ae6ae3626296a8647cb887f399327e92a252bebbf865cfc9f230fc8b" +
- "c1c2a696d75f89e15c3480f58f47072fb491bfb1a27e5f4b5ad05b9f248605515a690365" +
- "434971c5e06f94346bf61bd8a9b04c7e53eb8f48dfca33b548fa364a1a53a6330cd089cd" +
- "4915cd89313c90c072d7654b52358a461144b93d8e2865a63e799e5c084429adb035112e" +
- "214eb8d2e7103e5d8483b3c3c2e4d2c6fd094b7409ddf1b3d3193e800da20b19f038e7c5" +
- "c2afe223db61e29d5c6e2089492e236ab262c145b49faf8ba7f1223bf87de290d07a19fb" +
- "4a4ce3d27d5f4a8303ed27d6239e6b8db459a2d9ef6c8229dd75193c3f4c108defbb7527" +
- "d2ae83a7a8ce5ba7"
-
-const ocspResponseWithoutCertHex = "308201d40a0100a08201cd308201c906092b0601050507300101048201ba3082" +
- "01b630819fa2160414884451ff502a695e2d88f421bad90cf2cecbea7c180f3230313330" +
- "3631383037323434335a30743072304a300906052b0e03021a0500041448b60d38238df8" +
- "456e4ee5843ea394111802979f0414884451ff502a695e2d88f421bad90cf2cecbea7c02" +
- "1100f78b13b946fc9635d8ab49de9d2148218000180f3230313330363138303732343433" +
- "5aa011180f32303133303632323037323434335a300d06092a864886f70d010105050003" +
- "82010100103e18b3d297a5e7a6c07a4fc52ac46a15c0eba96f3be17f0ffe84de5b8c8e05" +
- "5a8f577586a849dc4abd6440eb6fedde4622451e2823c1cbf3558b4e8184959c9fe96eff" +
- "8bc5f95866c58c6d087519faabfdae37e11d9874f1bc0db292208f645dd848185e4dd38b" +
- "6a8547dfa7b74d514a8470015719064d35476b95bebb03d4d2845c5ca15202d2784878f2" +
- "0f904c24f09736f044609e9c271381713400e563023d212db422236440c6f377bbf24b2b" +
- "9e7dec8698e36a8df68b7592ad3489fb2937afb90eb85d2aa96b81c94c25057dbd4759d9" +
- "20a1a65c7f0b6427a224b3c98edd96b9b61f706099951188b0289555ad30a216fb774651" +
- "5a35fca2e054dfa8"
-
-// PKIX nonce extension
-var ocspExtensionOID = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 48, 1, 2}
-var ocspExtensionValueHex = "0403000000"
-
-const ocspResponseWithCriticalExtensionHex = "308204fe0a0100a08204f7308204f306092b0601050507300101048204e4308204e03081" +
- "dba003020100a11b3019311730150603550403130e4f43535020526573706f6e64657218" +
- "0f32303136303130343137303130305a3081a53081a23049300906052b0e03021a050004" +
- "14c0fe0278fc99188891b3f212e9c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b21317" +
- "7e6f8d157cd4f60210017f77deb3bcbb235d44ccc7dba62e72a116180f32303130303730" +
- "373135303130355aa0030a0101180f32303130303730373135303130355aa011180f3230" +
- "3130303730373138333531375aa1193017301506092b06010505073001020101ff040504" +
- "03000000300d06092a864886f70d01010b0500038201010031c730ca60a7a0d92d8e4010" +
- "911b469de95b4d27e89de6537552436237967694f76f701cf6b45c932bd308bca4a8d092" +
- "5c604ba94796903091d9e6c000178e72c1f0a24a277dd262835af5d17d3f9d7869606c9f" +
- "e7c8e708a41645699895beee38bfa63bb46296683761c5d1d65439b8ab868dc3017c9eeb" +
- "b70b82dbf3a31c55b457d48bb9e82b335ed49f445042eaf606b06a3e0639824924c89c63" +
- "eccddfe85e6694314138b2536f5e15e07085d0f6e26d4b2f8244bab0d70de07283ac6384" +
- "a0501fc3dea7cf0adfd4c7f34871080900e252ddc403e3f0265f2a704af905d3727504ed" +
- "28f3214a219d898a022463c78439799ca81c8cbafdbcec34ea937cd6a08202ea308202e6" +
- "308202e2308201caa003020102020101300d06092a864886f70d01010b05003019311730" +
- "150603550403130e4f43535020526573706f6e646572301e170d31353031333031353530" +
- "33335a170d3136303133303135353033335a3019311730150603550403130e4f43535020" +
- "526573706f6e64657230820122300d06092a864886f70d01010105000382010f00308201" +
- "0a0282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616e" +
- "c5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbc" +
- "bec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b72" +
- "3350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b898" +
- "9ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d" +
- "285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e6" +
- "55b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31" +
- "a77dcf920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030" +
- "130603551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d" +
- "06092a864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab8612" +
- "31c15fd5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d2288" +
- "9064f4aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f3267" +
- "09dce52c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156" +
- "d67156e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff5" +
- "9e2005d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf9" +
- "66705de17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d9" +
- "3a25439a94299a65a709756c7a3e568be049d5c38839"
-
-const ocspResponseWithExtensionHex = "308204fb0a0100a08204f4308204f006092b0601050507300101048204e1308204dd3081" +
- "d8a003020100a11b3019311730150603550403130e4f43535020526573706f6e64657218" +
- "0f32303136303130343136353930305a3081a230819f3049300906052b0e03021a050004" +
- "14c0fe0278fc99188891b3f212e9c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b21317" +
- "7e6f8d157cd4f60210017f77deb3bcbb235d44ccc7dba62e72a116180f32303130303730" +
- "373135303130355aa0030a0101180f32303130303730373135303130355aa011180f3230" +
- "3130303730373138333531375aa1163014301206092b0601050507300102040504030000" +
- "00300d06092a864886f70d01010b05000382010100c09a33e0b2324c852421bb83f85ac9" +
- "9113f5426012bd2d2279a8166e9241d18a33c870894250622ffc7ed0c4601b16d624f90b" +
- "779265442cdb6868cf40ab304ab4b66e7315ed02cf663b1601d1d4751772b31bc299db23" +
- "9aebac78ed6797c06ed815a7a8d18d63cfbb609cafb47ec2e89e37db255216eb09307848" +
- "d01be0a3e943653c78212b96ff524b74c9ec456b17cdfb950cc97645c577b2e09ff41dde" +
- "b03afb3adaa381cc0f7c1d95663ef22a0f72f2c45613ae8e2b2d1efc96e8463c7d1d8a1d" +
- "7e3b35df8fe73a301fc3f804b942b2b3afa337ff105fc1462b7b1c1d75eb4566c8665e59" +
- "f80393b0adbf8004ff6c3327ed34f007cb4a3348a7d55e06e3a08202ea308202e6308202" +
- "e2308201caa003020102020101300d06092a864886f70d01010b05003019311730150603" +
- "550403130e4f43535020526573706f6e646572301e170d3135303133303135353033335a" +
- "170d3136303133303135353033335a3019311730150603550403130e4f43535020526573" +
- "706f6e64657230820122300d06092a864886f70d01010105000382010f003082010a0282" +
- "010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616ec5265b" +
- "56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbcbec75a" +
- "70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b723350f0" +
- "a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b8989ad0f6" +
- "3aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d285b6a" +
- "04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e655b104" +
- "9a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31a77dcf" +
- "920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030130603" +
- "551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d06092a" +
- "864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab861231c15f" +
- "d5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d22889064f4" +
- "aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f326709dce5" +
- "2c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156d67156" +
- "e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff59e2005" +
- "d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf966705d" +
- "e17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d93a2543" +
- "9a94299a65a709756c7a3e568be049d5c38839"
-
-const ocspMultiResponseHex = "30820ee60a0100a0820edf30820edb06092b060105050730010104820ecc30820ec83082" +
- "0839a216041445ac2ecd75f53f1cf6e4c51d3de0047ad0aa7465180f3230313530363032" +
- "3130303033305a3082080c3065303d300906052b0e03021a05000414f7452a0080601527" +
- "72e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204" +
- "5456656a8000180f32303135303630323039303230375aa011180f323031353036303331" +
- "30303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e7" +
- "6e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456656b80" +
- "00180f32303135303630323039303230375aa011180f3230313530363033313030303330" +
- "5a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0" +
- "f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456656c8000180f3230" +
- "3135303630323039303230375aa011180f32303135303630333130303033305a3065303d" +
- "300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414ed" +
- "d8f2ee977252853a330b297a18f5c993853b3f02045456656d8000180f32303135303630" +
- "323039303230375aa011180f32303135303630333130303033305a3065303d300906052b" +
- "0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee9772" +
- "52853a330b297a18f5c993853b3f02045456656e8000180f323031353036303230393032" +
- "30375aa011180f32303135303630333130303033305a3065303d300906052b0e03021a05" +
- "000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b" +
- "297a18f5c993853b3f02045456656f8000180f32303135303630323039303230375aa011" +
- "180f32303135303630333130303033305a3065303d300906052b0e03021a05000414f745" +
- "2a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c9" +
- "93853b3f0204545665708000180f32303135303630323039303230375aa011180f323031" +
- "35303630333130303033305a3065303d300906052b0e03021a05000414f7452a00806015" +
- "2772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02" +
- "04545665718000180f32303135303630323039303230375aa011180f3230313530363033" +
- "3130303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135" +
- "e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f020454566572" +
- "8000180f32303135303630323039303230375aa011180f32303135303630333130303033" +
- "305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fd" +
- "e0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204545665738000180f32" +
- "303135303630323039303230375aa011180f32303135303630333130303033305a306530" +
- "3d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414" +
- "edd8f2ee977252853a330b297a18f5c993853b3f0204545665748000180f323031353036" +
- "30323039303230375aa011180f32303135303630333130303033305a3065303d30090605" +
- "2b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee97" +
- "7252853a330b297a18f5c993853b3f0204545665758000180f3230313530363032303930" +
- "3230375aa011180f32303135303630333130303033305a3065303d300906052b0e03021a" +
- "05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a33" +
- "0b297a18f5c993853b3f0204545665768000180f32303135303630323039303230375aa0" +
- "11180f32303135303630333130303033305a3065303d300906052b0e03021a05000414f7" +
- "452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5" +
- "c993853b3f0204545665778000180f32303135303630323039303230375aa011180f3230" +
- "3135303630333130303033305a3065303d300906052b0e03021a05000414f7452a008060" +
- "152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f" +
- "0204545665788000180f32303135303630323039303230375aa011180f32303135303630" +
- "333130303033305a3065303d300906052b0e03021a05000414f7452a008060152772e4a1" +
- "35e76e9e52fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f0204545665" +
- "798000180f32303135303630323039303230375aa011180f323031353036303331303030" +
- "33305a3065303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52" +
- "fde0f1580414edd8f2ee977252853a330b297a18f5c993853b3f02045456657a8000180f" +
- "32303135303630323039303230375aa011180f32303135303630333130303033305a3065" +
- "303d300906052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f15804" +
- "14edd8f2ee977252853a330b297a18f5c993853b3f02045456657b8000180f3230313530" +
- "3630323039303230375aa011180f32303135303630333130303033305a3065303d300906" +
- "052b0e03021a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee" +
- "977252853a330b297a18f5c993853b3f02045456657c8000180f32303135303630323039" +
- "303230375aa011180f32303135303630333130303033305a3065303d300906052b0e0302" +
- "1a05000414f7452a008060152772e4a135e76e9e52fde0f1580414edd8f2ee977252853a" +
- "330b297a18f5c993853b3f02045456657d8000180f32303135303630323039303230375a" +
- "a011180f32303135303630333130303033305a300d06092a864886f70d01010505000382" +
- "01010016b73b92859979f27d15eb018cf069eed39c3d280213565f3026de11ba15bdb94d" +
- "764cf2d0fdd204ef926c588d7b183483c8a2b1995079c7ed04dcefcc650c1965be4b6832" +
- "a8839e832f7f60f638425eccdf9bc3a81fbe700fda426ddf4f06c29bee431bbbe81effda" +
- "a60b7da5b378f199af2f3c8380be7ba6c21c8e27124f8a4d8989926aea19055700848d33" +
- "799e833512945fd75364edbd2dd18b783c1e96e332266b17979a0b88c35b43f47c87c493" +
- "19155056ad8dbbae5ff2afad3c0e1c69ed111206ffda49875e8e4efc0926264823bc4423" +
- "c8a002f34288c4bc22516f98f54fc609943721f590ddd8d24f989457526b599b0eb75cb5" +
- "a80da1ad93a621a08205733082056f3082056b30820453a0030201020204545638c4300d" +
- "06092a864886f70d01010b0500308182310b300906035504061302555331183016060355" +
- "040a130f552e532e20476f7665726e6d656e7431233021060355040b131a446570617274" +
- "6d656e74206f662074686520547265617375727931223020060355040b13194365727469" +
- "6669636174696f6e20417574686f7269746965733110300e060355040b13074f43494f20" +
- "4341301e170d3135303332303131353531335a170d3135303633303034303030305a3081" +
- "98310b300906035504061302555331183016060355040a130f552e532e20476f7665726e" +
- "6d656e7431233021060355040b131a4465706172746d656e74206f662074686520547265" +
- "617375727931223020060355040b131943657274696669636174696f6e20417574686f72" +
- "69746965733110300e060355040b13074f43494f204341311430120603550403130b4f43" +
- "5350205369676e657230820122300d06092a864886f70d01010105000382010f00308201" +
- "0a0282010100c1b6fe1ba1ad50bb98c855811acbd67fe68057f48b8e08d3800e7f2c51b7" +
- "9e20551934971fd92b9c9e6c49453097927cba83a94c0b2fea7124ba5ac442b38e37dba6" +
- "7303d4962dd7d92b22a04b0e0e182e9ea67620b1c6ce09ee607c19e0e6e3adae81151db1" +
- "2bb7f706149349a292e21c1eb28565b6839df055e1a838a772ff34b5a1452618e2c26042" +
- "705d53f0af4b57aae6163f58216af12f3887813fe44b0321827b3a0c52b0e47d0aab94a2" +
- "f768ab0ba3901d22f8bb263823090b0e37a7f8856db4b0d165c42f3aa7e94f5f6ce1855e" +
- "98dc57adea0ae98ad39f67ecdec00b88685566e9e8d69f6cefb6ddced53015d0d3b862bc" +
- "be21f3d72251eefcec730203010001a38201cf308201cb300e0603551d0f0101ff040403" +
- "020780306b0603551d2004643062300c060a60864801650302010502300c060a60864801" +
- "650302010503300c060a60864801650302010504300c060a60864801650302010507300c" +
- "060a60864801650302010508300c060a6086480165030201030d300c060a608648016503" +
- "020103113081e506082b060105050701010481d83081d5303006082b0601050507300286" +
- "24687474703a2f2f706b692e74726561732e676f762f746f63615f65655f6169612e7037" +
- "633081a006082b060105050730028681936c6461703a2f2f6c6461702e74726561732e67" +
- "6f762f6f753d4f43494f25323043412c6f753d43657274696669636174696f6e25323041" +
- "7574686f7269746965732c6f753d4465706172746d656e742532306f6625323074686525" +
- "323054726561737572792c6f3d552e532e253230476f7665726e6d656e742c633d55533f" +
- "634143657274696669636174653b62696e61727930130603551d25040c300a06082b0601" +
- "0505070309300f06092b060105050730010504020500301f0603551d23041830168014a2" +
- "13a8e5c607546c243d4eb72b27a2a7711ab5af301d0603551d0e0416041451f98046818a" +
- "e46d953ac90c210ccfaa1a06980c300d06092a864886f70d01010b050003820101003a37" +
- "0b301d14ffdeb370883639bec5ae6f572dcbddadd672af16ee2a8303316b14e1fbdca8c2" +
- "8f4bad9c7b1410250e149c14e9830ca6f17370a8d13151205d956e28c141cc0500379596" +
- "c5b9239fcfa3d2de8f1d4f1a2b1bf2d1851bed1c86012ee8135bdc395cd4496ce69fadd0" +
- "3b682b90350ca7b4f458190b7a0ab5c33a04cf1347a77d541877a380a4c94988c5658908" +
- "44fdc22637a72b9fa410333e2caf969477f9fe07f50e3681c204fb3bf073b9da01cd8d91" +
- "8044c40b1159955af12a3263ab1d34119d7f59bfa6cae88ed058addc4e08250263f8f836" +
- "2f5bdffd45636fea7474c60a55c535954477b2f286e1b2535f0dd12c162f1b353c370e08" +
- "be67"
-
-const ocspMultiResponseCertHex = "308207943082067ca003020102020454566573300d06092a864886f70d01010b05003081" +
- "82310b300906035504061302555331183016060355040a130f552e532e20476f7665726e" +
- "6d656e7431233021060355040b131a4465706172746d656e74206f662074686520547265" +
- "617375727931223020060355040b131943657274696669636174696f6e20417574686f72" +
- "69746965733110300e060355040b13074f43494f204341301e170d313530343130313535" +
- "3733385a170d3138303431303136323733385a30819d310b300906035504061302555331" +
- "183016060355040a130f552e532e20476f7665726e6d656e7431233021060355040b131a" +
- "4465706172746d656e74206f662074686520547265617375727931253023060355040b13" +
- "1c427572656175206f66207468652046697363616c20536572766963653110300e060355" +
- "040b130744657669636573311630140603550403130d706b692e74726561732e676f7630" +
- "820122300d06092a864886f70d01010105000382010f003082010a0282010100c7273623" +
- "8c49c48bf501515a2490ef6e5ae0c06e0ad2aa9a6bb77f3d0370d846b2571581ebf38fd3" +
- "1948daad3dec7a4da095f1dcbe9654e65bcf7acdfd4ee802421dad9b90536c721d2bca58" +
- "8413e6bfd739a72470560bb7d64f9a09284f90ff8af1d5a3c5c84d0f95a00f9c6d988dd0" +
- "d87f1d0d3344580901c955139f54d09de0acdbd3322b758cb0c58881bf04913243401f44" +
- "013fd9f6d8348044cc8bb0a71978ad93366b2a4687a5274b2ee07d0fb40225453eb244ed" +
- "b20152251ac77c59455260ff07eeceb3cb3c60fb8121cf92afd3daa2a4650e1942ccb555" +
- "de10b3d481feb299838ef05d0fd1810b146753472ae80da65dd34da25ca1f89971f10039" +
- "0203010001a38203f3308203ef300e0603551d0f0101ff0404030205a030170603551d20" +
- "0410300e300c060a60864801650302010503301106096086480186f84201010404030206" +
- "4030130603551d25040c300a06082b060105050703013082010806082b06010505070101" +
- "0481fb3081f8303006082b060105050730028624687474703a2f2f706b692e7472656173" +
- "2e676f762f746f63615f65655f6169612e7037633081a006082b06010505073002868193" +
- "6c6461703a2f2f6c6461702e74726561732e676f762f6f753d4f43494f25323043412c6f" +
- "753d43657274696669636174696f6e253230417574686f7269746965732c6f753d446570" +
- "6172746d656e742532306f6625323074686525323054726561737572792c6f3d552e532e" +
- "253230476f7665726e6d656e742c633d55533f634143657274696669636174653b62696e" +
- "617279302106082b060105050730018615687474703a2f2f6f6373702e74726561732e67" +
- "6f76307b0603551d1104743072811c6373612d7465616d4066697363616c2e7472656173" +
- "7572792e676f768210706b692e74726561737572792e676f768210706b692e64696d632e" +
- "6468732e676f76820d706b692e74726561732e676f76811f6563622d686f7374696e6740" +
- "66697363616c2e74726561737572792e676f76308201890603551d1f048201803082017c" +
- "3027a025a0238621687474703a2f2f706b692e74726561732e676f762f4f43494f5f4341" +
- "332e63726c3082014fa082014ba0820147a48197308194310b3009060355040613025553" +
- "31183016060355040a130f552e532e20476f7665726e6d656e7431233021060355040b13" +
- "1a4465706172746d656e74206f662074686520547265617375727931223020060355040b" +
- "131943657274696669636174696f6e20417574686f7269746965733110300e060355040b" +
- "13074f43494f2043413110300e0603550403130743524c313430398681aa6c6461703a2f" +
- "2f6c6461702e74726561732e676f762f636e3d43524c313430392c6f753d4f43494f2532" +
- "3043412c6f753d43657274696669636174696f6e253230417574686f7269746965732c6f" +
- "753d4465706172746d656e742532306f6625323074686525323054726561737572792c6f" +
- "3d552e532e253230476f7665726e6d656e742c633d55533f636572746966696361746552" +
- "65766f636174696f6e4c6973743b62696e617279302b0603551d1004243022800f323031" +
- "35303431303135353733385a810f32303138303431303136323733385a301f0603551d23" +
- "041830168014a213a8e5c607546c243d4eb72b27a2a7711ab5af301d0603551d0e041604" +
- "14b0869c12c293914cd460e33ed43e6c5a26e0d68f301906092a864886f67d074100040c" +
- "300a1b0456382e31030203a8300d06092a864886f70d01010b050003820101004968d182" +
- "8f9efdc147e747bb5dda15536a42a079b32d3d7f87e619b483aeee70b7e26bda393c6028" +
- "7c733ecb468fe8b8b11bf809ff76add6b90eb25ad8d3a1052e43ee281e48a3a1ebe7efb5" +
- "9e2c4a48765dedeb23f5346242145786cc988c762d230d28dd33bf4c2405d80cbb2cb1d6" +
- "4c8f10ba130d50cb174f6ffb9cfc12808297a2cefba385f4fad170f39b51ebd87c12abf9" +
- "3c51fc000af90d8aaba78f48923908804a5eb35f617ccf71d201e3708a559e6d16f9f13e" +
- "074361eb9007e28d86bb4e0bfa13aad0e9ddd9124e84519de60e2fc6040b18d9fd602b02" +
- "684b4c071c3019fc842197d00c120c41654bcbfbc4a096a1c637b79112b81ce1fa3899f9"
-
-const ocspRequestHex = "3051304f304d304b3049300906052b0e03021a05000414c0fe0278fc99188891b3f212e9" +
- "c7e1b21ab7bfc004140dfc1df0a9e0f01ce7f2b213177e6f8d157cd4f60210017f77deb3" +
- "bcbb235d44ccc7dba62e72"
-
-const leafCertHex = "308203c830820331a0030201020210017f77deb3bcbb235d44ccc7dba62e72300d06092a" +
- "864886f70d01010505003081ba311f301d060355040a1316566572695369676e20547275" +
- "7374204e6574776f726b31173015060355040b130e566572695369676e2c20496e632e31" +
- "333031060355040b132a566572695369676e20496e7465726e6174696f6e616c20536572" +
- "766572204341202d20436c617373203331493047060355040b13407777772e7665726973" +
- "69676e2e636f6d2f43505320496e636f72702e6279205265662e204c494142494c495459" +
- "204c54442e286329393720566572695369676e301e170d3132303632313030303030305a" +
- "170d3133313233313233353935395a3068310b3009060355040613025553311330110603" +
- "550408130a43616c69666f726e6961311230100603550407130950616c6f20416c746f31" +
- "173015060355040a130e46616365626f6f6b2c20496e632e311730150603550403140e2a" +
- "2e66616365626f6f6b2e636f6d30819f300d06092a864886f70d010101050003818d0030" +
- "818902818100ae94b171e2deccc1693e051063240102e0689ae83c39b6b3e74b97d48d7b" +
- "23689100b0b496ee62f0e6d356bcf4aa0f50643402f5d1766aa972835a7564723f39bbef" +
- "5290ded9bcdbf9d3d55dfad23aa03dc604c54d29cf1d4b3bdbd1a809cfae47b44c7eae17" +
- "c5109bee24a9cf4a8d911bb0fd0415ae4c3f430aa12a557e2ae10203010001a382011e30" +
- "82011a30090603551d130402300030440603551d20043d303b3039060b6086480186f845" +
- "01071703302a302806082b06010505070201161c68747470733a2f2f7777772e76657269" +
- "7369676e2e636f6d2f727061303c0603551d1f043530333031a02fa02d862b687474703a" +
- "2f2f535652496e746c2d63726c2e766572697369676e2e636f6d2f535652496e746c2e63" +
- "726c301d0603551d250416301406082b0601050507030106082b06010505070302300b06" +
- "03551d0f0404030205a0303406082b0601050507010104283026302406082b0601050507" +
- "30018618687474703a2f2f6f6373702e766572697369676e2e636f6d30270603551d1104" +
- "20301e820e2a2e66616365626f6f6b2e636f6d820c66616365626f6f6b2e636f6d300d06" +
- "092a864886f70d0101050500038181005b6c2b75f8ed30aa51aad36aba595e555141951f" +
- "81a53b447910ac1f76ff78fc2781616b58f3122afc1c87010425e9ed43df1a7ba6498060" +
- "67e2688af03db58c7df4ee03309a6afc247ccb134dc33e54c6bc1d5133a532a73273b1d7" +
- "9cadc08e7e1a83116d34523340b0305427a21742827c98916698ee7eaf8c3bdd71700817"
-
-const issuerCertHex = "30820383308202eca003020102021046fcebbab4d02f0f926098233f93078f300d06092a" +
- "864886f70d0101050500305f310b300906035504061302555331173015060355040a130e" +
- "566572695369676e2c20496e632e31373035060355040b132e436c617373203320507562" +
- "6c6963205072696d6172792043657274696669636174696f6e20417574686f7269747930" +
- "1e170d3937303431373030303030305a170d3136313032343233353935395a3081ba311f" +
- "301d060355040a1316566572695369676e205472757374204e6574776f726b3117301506" +
- "0355040b130e566572695369676e2c20496e632e31333031060355040b132a5665726953" +
- "69676e20496e7465726e6174696f6e616c20536572766572204341202d20436c61737320" +
- "3331493047060355040b13407777772e766572697369676e2e636f6d2f43505320496e63" +
- "6f72702e6279205265662e204c494142494c495459204c54442e28632939372056657269" +
- "5369676e30819f300d06092a864886f70d010101050003818d0030818902818100d88280" +
- "e8d619027d1f85183925a2652be1bfd405d3bce6363baaf04c6c5bb6e7aa3c734555b2f1" +
- "bdea9742ed9a340a15d4a95cf54025ddd907c132b2756cc4cabba3fe56277143aa63f530" +
- "3e9328e5faf1093bf3b74d4e39f75c495ab8c11dd3b28afe70309542cbfe2b518b5a3c3a" +
- "f9224f90b202a7539c4f34e7ab04b27b6f0203010001a381e33081e0300f0603551d1304" +
- "0830060101ff02010030440603551d20043d303b3039060b6086480186f8450107010130" +
- "2a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e" +
- "636f6d2f43505330340603551d25042d302b06082b0601050507030106082b0601050507" +
- "030206096086480186f8420401060a6086480186f845010801300b0603551d0f04040302" +
- "0106301106096086480186f842010104040302010630310603551d1f042a30283026a024" +
- "a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726c" +
- "300d06092a864886f70d010105050003818100408e4997968a73dd8e4def3e61b7caa062" +
- "adf40e0abb753de26ed82cc7bff4b98c369bcaa2d09c724639f6a682036511c4bcbf2da6" +
- "f5d93b0ab598fab378b91ef22b4c62d5fdb27a1ddf33fd73f9a5d82d8c2aead1fcb028b6" +
- "e94948134b838a1b487b24f738de6f4154b8ab576b06dfc7a2d4a9f6f136628088f28b75" +
- "d68071"
-
-// Key and certificate for the OCSP responder were not taken from the Thawte
-// responder, since CreateResponse requires that we have the private key.
-// Instead, they were generated randomly.
-const responderPrivateKeyHex = "308204a40201000282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef" +
- "1099f0f6616ec5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df" +
- "1701dc6ccfbcbec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074f" +
- "fde8a99d5b723350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14" +
- "c9fc0f27b8989ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa7" +
- "7e7332971c7d285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f" +
- "1290bafd97e655b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb9" +
- "6222b12ace31a77dcf920334dc94581b02030100010282010100bcf0b93d7238bda329a8" +
- "72e7149f61bcb37c154330ccb3f42a85c9002c2e2bdea039d77d8581cd19bed94078794e" +
- "56293d601547fc4bf6a2f9002fe5772b92b21b254403b403585e3130cc99ccf08f0ef81a" +
- "575b38f597ba4660448b54f44bfbb97072b5a2bf043bfeca828cf7741d13698e3f38162b" +
- "679faa646b82abd9a72c5c7d722c5fc577a76d2c2daac588accad18516d1bbad10b0dfa2" +
- "05cfe246b59e28608a43942e1b71b0c80498075121de5b900d727c31c42c78cf1db5c0aa" +
- "5b491e10ea4ed5c0962aaf2ae025dd81fa4ce490d9d6b4a4465411d8e542fc88617e5695" +
- "1aa4fc8ea166f2b4d0eb89ef17f2b206bd5f1014bf8fe0e71fe62f2cccf102818100f2dc" +
- "ddf878d553286daad68bac4070a82ffec3dc4666a2750f47879eec913f91836f1d976b60" +
- "daf9356e078446dafab5bd2e489e5d64f8572ba24a4ba4f3729b5e106c4dd831cc2497a7" +
- "e6c7507df05cb64aeb1bbc81c1e340d58b5964cf39cff84ea30c29ec5d3f005ee1362698" +
- "07395037955955655292c3e85f6187fa1f9502818100f4a33c102630840705f8c778a47b" +
- "87e8da31e68809af981ac5e5999cf1551685d761cdf0d6520361b99aebd5777a940fa64d" +
- "327c09fa63746fbb3247ec73a86edf115f1fe5c83598db803881ade71c33c6e956118345" +
- "497b98b5e07bb5be75971465ec78f2f9467e1b74956ca9d4c7c3e314e742a72d8b33889c" +
- "6c093a466cef0281801d3df0d02124766dd0be98349b19eb36a508c4e679e793ba0a8bef" +
- "4d786888c1e9947078b1ea28938716677b4ad8c5052af12eb73ac194915264a913709a0b" +
- "7b9f98d4a18edd781a13d49899f91c20dbd8eb2e61d991ba19b5cdc08893f5cb9d39e5a6" +
- "0629ea16d426244673b1b3ee72bd30e41fac8395acac40077403de5efd028180050731dd" +
- "d71b1a2b96c8d538ba90bb6b62c8b1c74c03aae9a9f59d21a7a82b0d572ef06fa9c807bf" +
- "c373d6b30d809c7871df96510c577421d9860c7383fda0919ece19996b3ca13562159193" +
- "c0c246471e287f975e8e57034e5136aaf44254e2650def3d51292474c515b1588969112e" +
- "0a85cc77073e9d64d2c2fc497844284b02818100d71d63eabf416cf677401ebf965f8314" +
- "120b568a57dd3bd9116c629c40dc0c6948bab3a13cc544c31c7da40e76132ef5dd3f7534" +
- "45a635930c74326ae3df0edd1bfb1523e3aa259873ac7cf1ac31151ec8f37b528c275622" +
- "48f99b8bed59fd4da2576aa6ee20d93a684900bf907e80c66d6e2261ae15e55284b4ed9d" +
- "6bdaa059"
-
-const responderCertHex = "308202e2308201caa003020102020101300d06092a864886f70d01010b05003019311730" +
- "150603550403130e4f43535020526573706f6e646572301e170d31353031333031353530" +
- "33335a170d3136303133303135353033335a3019311730150603550403130e4f43535020" +
- "526573706f6e64657230820122300d06092a864886f70d01010105000382010f00308201" +
- "0a0282010100e8155f2d3e6f2e8d14c62a788bd462f9f844e7a6977c83ef1099f0f6616e" +
- "c5265b56f356e62c5400f0b06a2e7945a82752c636df32a895152d6074df1701dc6ccfbc" +
- "bec75a70bd2b55ae2be7e6cad3b5fd4cd5b7790ab401a436d3f5f346074ffde8a99d5b72" +
- "3350f0a112076614b12ef79c78991b119453445acf2416ab0046b540db14c9fc0f27b898" +
- "9ad0f63aa4b8aefc91aa8a72160c36307c60fec78a93d3fddf4259902aa77e7332971c7d" +
- "285b6a04f648993c6922a3e9da9adf5f81508c3228791843e5d49f24db2f1290bafd97e6" +
- "55b1049a199f652cd603c4fafa330c390b0da78fbbc67e8fa021cbd74eb96222b12ace31" +
- "a77dcf920334dc94581b0203010001a3353033300e0603551d0f0101ff04040302078030" +
- "130603551d25040c300a06082b06010505070309300c0603551d130101ff04023000300d" +
- "06092a864886f70d01010b05000382010100718012761b5063e18f0dc44644d8e6ab8612" +
- "31c15fd5357805425d82aec1de85bf6d3e30fce205e3e3b8b795bbe52e40a439286d2288" +
- "9064f4aeeb150359b9425f1da51b3a5c939018555d13ac42c565a0603786a919328f3267" +
- "09dce52c22ad958ecb7873b9771d1148b1c4be2efe80ba868919fc9f68b6090c2f33c156" +
- "d67156e42766a50b5d51e79637b7e58af74c2a951b1e642fa7741fec982cc937de37eff5" +
- "9e2005d5939bfc031589ca143e6e8ab83f40ee08cc20a6b4a95a318352c28d18528dcaf9" +
- "66705de17afa19d6e8ae91ddf33179d16ebb6ac2c69cae8373d408ebf8c55308be6c04d9" +
- "3a25439a94299a65a709756c7a3e568be049d5c38839"
-
-const errorResponseHex = "30030a0101"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor.go
deleted file mode 100644
index 592d18643..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is
-// very similar to PEM except that it has an additional CRC checksum.
-package armor // import "golang.org/x/crypto/openpgp/armor"
-
-import (
- "bufio"
- "bytes"
- "encoding/base64"
- "golang.org/x/crypto/openpgp/errors"
- "io"
-)
-
-// A Block represents an OpenPGP armored structure.
-//
-// The encoded form is:
-// -----BEGIN Type-----
-// Headers
-//
-// base64-encoded Bytes
-// '=' base64 encoded checksum
-// -----END Type-----
-// where Headers is a possibly empty sequence of Key: Value lines.
-//
-// Since the armored data can be very large, this package presents a streaming
-// interface.
-type Block struct {
- Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE").
- Header map[string]string // Optional headers.
- Body io.Reader // A Reader from which the contents can be read
- lReader lineReader
- oReader openpgpReader
-}
-
-var ArmorCorrupt error = errors.StructuralError("armor invalid")
-
-const crc24Init = 0xb704ce
-const crc24Poly = 0x1864cfb
-const crc24Mask = 0xffffff
-
-// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1
-func crc24(crc uint32, d []byte) uint32 {
- for _, b := range d {
- crc ^= uint32(b) << 16
- for i := 0; i < 8; i++ {
- crc <<= 1
- if crc&0x1000000 != 0 {
- crc ^= crc24Poly
- }
- }
- }
- return crc
-}
-
-var armorStart = []byte("-----BEGIN ")
-var armorEnd = []byte("-----END ")
-var armorEndOfLine = []byte("-----")
-
-// lineReader wraps a line based reader. It watches for the end of an armor
-// block and records the expected CRC value.
-type lineReader struct {
- in *bufio.Reader
- buf []byte
- eof bool
- crc uint32
-}
-
-func (l *lineReader) Read(p []byte) (n int, err error) {
- if l.eof {
- return 0, io.EOF
- }
-
- if len(l.buf) > 0 {
- n = copy(p, l.buf)
- l.buf = l.buf[n:]
- return
- }
-
- line, isPrefix, err := l.in.ReadLine()
- if err != nil {
- return
- }
- if isPrefix {
- return 0, ArmorCorrupt
- }
-
- if len(line) == 5 && line[0] == '=' {
- // This is the checksum line
- var expectedBytes [3]byte
- var m int
- m, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:])
- if m != 3 || err != nil {
- return
- }
- l.crc = uint32(expectedBytes[0])<<16 |
- uint32(expectedBytes[1])<<8 |
- uint32(expectedBytes[2])
-
- line, _, err = l.in.ReadLine()
- if err != nil && err != io.EOF {
- return
- }
- if !bytes.HasPrefix(line, armorEnd) {
- return 0, ArmorCorrupt
- }
-
- l.eof = true
- return 0, io.EOF
- }
-
- if len(line) > 96 {
- return 0, ArmorCorrupt
- }
-
- n = copy(p, line)
- bytesToSave := len(line) - n
- if bytesToSave > 0 {
- if cap(l.buf) < bytesToSave {
- l.buf = make([]byte, 0, bytesToSave)
- }
- l.buf = l.buf[0:bytesToSave]
- copy(l.buf, line[n:])
- }
-
- return
-}
-
-// openpgpReader passes Read calls to the underlying base64 decoder, but keeps
-// a running CRC of the resulting data and checks the CRC against the value
-// found by the lineReader at EOF.
-type openpgpReader struct {
- lReader *lineReader
- b64Reader io.Reader
- currentCRC uint32
-}
-
-func (r *openpgpReader) Read(p []byte) (n int, err error) {
- n, err = r.b64Reader.Read(p)
- r.currentCRC = crc24(r.currentCRC, p[:n])
-
- if err == io.EOF {
- if r.lReader.crc != uint32(r.currentCRC&crc24Mask) {
- return 0, ArmorCorrupt
- }
- }
-
- return
-}
-
-// Decode reads a PGP armored block from the given Reader. It will ignore
-// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The
-// given Reader is not usable after calling this function: an arbitrary amount
-// of data may have been read past the end of the block.
-func Decode(in io.Reader) (p *Block, err error) {
- r := bufio.NewReaderSize(in, 100)
- var line []byte
- ignoreNext := false
-
-TryNextBlock:
- p = nil
-
- // Skip leading garbage
- for {
- ignoreThis := ignoreNext
- line, ignoreNext, err = r.ReadLine()
- if err != nil {
- return
- }
- if ignoreNext || ignoreThis {
- continue
- }
- line = bytes.TrimSpace(line)
- if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) {
- break
- }
- }
-
- p = new(Block)
- p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)])
- p.Header = make(map[string]string)
- nextIsContinuation := false
- var lastKey string
-
- // Read headers
- for {
- isContinuation := nextIsContinuation
- line, nextIsContinuation, err = r.ReadLine()
- if err != nil {
- p = nil
- return
- }
- if isContinuation {
- p.Header[lastKey] += string(line)
- continue
- }
- line = bytes.TrimSpace(line)
- if len(line) == 0 {
- break
- }
-
- i := bytes.Index(line, []byte(": "))
- if i == -1 {
- goto TryNextBlock
- }
- lastKey = string(line[:i])
- p.Header[lastKey] = string(line[i+2:])
- }
-
- p.lReader.in = r
- p.oReader.currentCRC = crc24Init
- p.oReader.lReader = &p.lReader
- p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader)
- p.Body = &p.oReader
-
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor_test.go
deleted file mode 100644
index 9334e94e9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/armor_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2010 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 file.
-
-package armor
-
-import (
- "bytes"
- "hash/adler32"
- "io/ioutil"
- "testing"
-)
-
-func TestDecodeEncode(t *testing.T) {
- buf := bytes.NewBuffer([]byte(armorExample1))
- result, err := Decode(buf)
- if err != nil {
- t.Error(err)
- }
- expectedType := "PGP SIGNATURE"
- if result.Type != expectedType {
- t.Errorf("result.Type: got:%s want:%s", result.Type, expectedType)
- }
- if len(result.Header) != 1 {
- t.Errorf("len(result.Header): got:%d want:1", len(result.Header))
- }
- v, ok := result.Header["Version"]
- if !ok || v != "GnuPG v1.4.10 (GNU/Linux)" {
- t.Errorf("result.Header: got:%#v", result.Header)
- }
-
- contents, err := ioutil.ReadAll(result.Body)
- if err != nil {
- t.Error(err)
- }
-
- if adler32.Checksum(contents) != 0x27b144be {
- t.Errorf("contents: got: %x", contents)
- }
-
- buf = bytes.NewBuffer(nil)
- w, err := Encode(buf, result.Type, result.Header)
- if err != nil {
- t.Error(err)
- }
- _, err = w.Write(contents)
- if err != nil {
- t.Error(err)
- }
- w.Close()
-
- if !bytes.Equal(buf.Bytes(), []byte(armorExample1)) {
- t.Errorf("got: %s\nwant: %s", string(buf.Bytes()), armorExample1)
- }
-}
-
-func TestLongHeader(t *testing.T) {
- buf := bytes.NewBuffer([]byte(armorLongLine))
- result, err := Decode(buf)
- if err != nil {
- t.Error(err)
- return
- }
- value, ok := result.Header["Version"]
- if !ok {
- t.Errorf("missing Version header")
- }
- if value != longValueExpected {
- t.Errorf("got: %s want: %s", value, longValueExpected)
- }
-}
-
-const armorExample1 = `-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-iJwEAAECAAYFAk1Fv/0ACgkQo01+GMIMMbsYTwQAiAw+QAaNfY6WBdplZ/uMAccm
-4g+81QPmTSGHnetSb6WBiY13kVzK4HQiZH8JSkmmroMLuGeJwsRTEL4wbjRyUKEt
-p1xwUZDECs234F1xiG5enc5SGlRtP7foLBz9lOsjx+LEcA4sTl5/2eZR9zyFZqWW
-TxRjs+fJCIFuo71xb1g=
-=/teI
------END PGP SIGNATURE-----`
-
-const armorLongLine = `-----BEGIN PGP SIGNATURE-----
-Version: 0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz
-
-iQEcBAABAgAGBQJMtFESAAoJEKsQXJGvOPsVj40H/1WW6jaMXv4BW+1ueDSMDwM8
-kx1fLOXbVM5/Kn5LStZNt1jWWnpxdz7eq3uiqeCQjmqUoRde3YbB2EMnnwRbAhpp
-cacnAvy9ZQ78OTxUdNW1mhX5bS6q1MTEJnl+DcyigD70HG/yNNQD7sOPMdYQw0TA
-byQBwmLwmTsuZsrYqB68QyLHI+DUugn+kX6Hd2WDB62DKa2suoIUIHQQCd/ofwB3
-WfCYInXQKKOSxu2YOg2Eb4kLNhSMc1i9uKUWAH+sdgJh7NBgdoE4MaNtBFkHXRvv
-okWuf3+xA9ksp1npSY/mDvgHijmjvtpRDe6iUeqfCn8N9u9CBg8geANgaG8+QA4=
-=wfQG
------END PGP SIGNATURE-----`
-
-const longValueExpected = "0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/encode.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/encode.go
deleted file mode 100644
index 6f07582c3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/armor/encode.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2010 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 file.
-
-package armor
-
-import (
- "encoding/base64"
- "io"
-)
-
-var armorHeaderSep = []byte(": ")
-var blockEnd = []byte("\n=")
-var newline = []byte("\n")
-var armorEndOfLineOut = []byte("-----\n")
-
-// writeSlices writes its arguments to the given Writer.
-func writeSlices(out io.Writer, slices ...[]byte) (err error) {
- for _, s := range slices {
- _, err = out.Write(s)
- if err != nil {
- return err
- }
- }
- return
-}
-
-// lineBreaker breaks data across several lines, all of the same byte length
-// (except possibly the last). Lines are broken with a single '\n'.
-type lineBreaker struct {
- lineLength int
- line []byte
- used int
- out io.Writer
- haveWritten bool
-}
-
-func newLineBreaker(out io.Writer, lineLength int) *lineBreaker {
- return &lineBreaker{
- lineLength: lineLength,
- line: make([]byte, lineLength),
- used: 0,
- out: out,
- }
-}
-
-func (l *lineBreaker) Write(b []byte) (n int, err error) {
- n = len(b)
-
- if n == 0 {
- return
- }
-
- if l.used == 0 && l.haveWritten {
- _, err = l.out.Write([]byte{'\n'})
- if err != nil {
- return
- }
- }
-
- if l.used+len(b) < l.lineLength {
- l.used += copy(l.line[l.used:], b)
- return
- }
-
- l.haveWritten = true
- _, err = l.out.Write(l.line[0:l.used])
- if err != nil {
- return
- }
- excess := l.lineLength - l.used
- l.used = 0
-
- _, err = l.out.Write(b[0:excess])
- if err != nil {
- return
- }
-
- _, err = l.Write(b[excess:])
- return
-}
-
-func (l *lineBreaker) Close() (err error) {
- if l.used > 0 {
- _, err = l.out.Write(l.line[0:l.used])
- if err != nil {
- return
- }
- }
-
- return
-}
-
-// encoding keeps track of a running CRC24 over the data which has been written
-// to it and outputs a OpenPGP checksum when closed, followed by an armor
-// trailer.
-//
-// It's built into a stack of io.Writers:
-// encoding -> base64 encoder -> lineBreaker -> out
-type encoding struct {
- out io.Writer
- breaker *lineBreaker
- b64 io.WriteCloser
- crc uint32
- blockType []byte
-}
-
-func (e *encoding) Write(data []byte) (n int, err error) {
- e.crc = crc24(e.crc, data)
- return e.b64.Write(data)
-}
-
-func (e *encoding) Close() (err error) {
- err = e.b64.Close()
- if err != nil {
- return
- }
- e.breaker.Close()
-
- var checksumBytes [3]byte
- checksumBytes[0] = byte(e.crc >> 16)
- checksumBytes[1] = byte(e.crc >> 8)
- checksumBytes[2] = byte(e.crc)
-
- var b64ChecksumBytes [4]byte
- base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:])
-
- return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine)
-}
-
-// Encode returns a WriteCloser which will encode the data written to it in
-// OpenPGP armor.
-func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) {
- bType := []byte(blockType)
- err = writeSlices(out, armorStart, bType, armorEndOfLineOut)
- if err != nil {
- return
- }
-
- for k, v := range headers {
- err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline)
- if err != nil {
- return
- }
- }
-
- _, err = out.Write(newline)
- if err != nil {
- return
- }
-
- e := &encoding{
- out: out,
- breaker: newLineBreaker(out, 64),
- crc: crc24Init,
- blockType: bType,
- }
- e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker)
- return e, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text.go
deleted file mode 100644
index e601e389f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import "hash"
-
-// NewCanonicalTextHash reformats text written to it into the canonical
-// form and then applies the hash h. See RFC 4880, section 5.2.1.
-func NewCanonicalTextHash(h hash.Hash) hash.Hash {
- return &canonicalTextHash{h, 0}
-}
-
-type canonicalTextHash struct {
- h hash.Hash
- s int
-}
-
-var newline = []byte{'\r', '\n'}
-
-func (cth *canonicalTextHash) Write(buf []byte) (int, error) {
- start := 0
-
- for i, c := range buf {
- switch cth.s {
- case 0:
- if c == '\r' {
- cth.s = 1
- } else if c == '\n' {
- cth.h.Write(buf[start:i])
- cth.h.Write(newline)
- start = i + 1
- }
- case 1:
- cth.s = 0
- }
- }
-
- cth.h.Write(buf[start:])
- return len(buf), nil
-}
-
-func (cth *canonicalTextHash) Sum(in []byte) []byte {
- return cth.h.Sum(in)
-}
-
-func (cth *canonicalTextHash) Reset() {
- cth.h.Reset()
- cth.s = 0
-}
-
-func (cth *canonicalTextHash) Size() int {
- return cth.h.Size()
-}
-
-func (cth *canonicalTextHash) BlockSize() int {
- return cth.h.BlockSize()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text_test.go
deleted file mode 100644
index 8f3ba2a88..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/canonical_text_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import (
- "bytes"
- "testing"
-)
-
-type recordingHash struct {
- buf *bytes.Buffer
-}
-
-func (r recordingHash) Write(b []byte) (n int, err error) {
- return r.buf.Write(b)
-}
-
-func (r recordingHash) Sum(in []byte) []byte {
- return append(in, r.buf.Bytes()...)
-}
-
-func (r recordingHash) Reset() {
- panic("shouldn't be called")
-}
-
-func (r recordingHash) Size() int {
- panic("shouldn't be called")
-}
-
-func (r recordingHash) BlockSize() int {
- panic("shouldn't be called")
-}
-
-func testCanonicalText(t *testing.T, input, expected string) {
- r := recordingHash{bytes.NewBuffer(nil)}
- c := NewCanonicalTextHash(r)
- c.Write([]byte(input))
- result := c.Sum(nil)
- if expected != string(result) {
- t.Errorf("input: %x got: %x want: %x", input, result, expected)
- }
-}
-
-func TestCanonicalText(t *testing.T) {
- testCanonicalText(t, "foo\n", "foo\r\n")
- testCanonicalText(t, "foo", "foo")
- testCanonicalText(t, "foo\r\n", "foo\r\n")
- testCanonicalText(t, "foo\r\nbar", "foo\r\nbar")
- testCanonicalText(t, "foo\r\nbar\n\n", "foo\r\nbar\r\n\r\n")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go
deleted file mode 100644
index def4cabaf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go
+++ /dev/null
@@ -1,376 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package clearsign generates and processes OpenPGP, clear-signed data. See
-// RFC 4880, section 7.
-//
-// Clearsigned messages are cryptographically signed, but the contents of the
-// message are kept in plaintext so that it can be read without special tools.
-package clearsign // import "golang.org/x/crypto/openpgp/clearsign"
-
-import (
- "bufio"
- "bytes"
- "crypto"
- "hash"
- "io"
- "net/textproto"
- "strconv"
-
- "golang.org/x/crypto/openpgp/armor"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/packet"
-)
-
-// A Block represents a clearsigned message. A signature on a Block can
-// be checked by passing Bytes into openpgp.CheckDetachedSignature.
-type Block struct {
- Headers textproto.MIMEHeader // Optional message headers
- Plaintext []byte // The original message text
- Bytes []byte // The signed message
- ArmoredSignature *armor.Block // The signature block
-}
-
-// start is the marker which denotes the beginning of a clearsigned message.
-var start = []byte("\n-----BEGIN PGP SIGNED MESSAGE-----")
-
-// dashEscape is prefixed to any lines that begin with a hyphen so that they
-// can't be confused with endText.
-var dashEscape = []byte("- ")
-
-// endText is a marker which denotes the end of the message and the start of
-// an armored signature.
-var endText = []byte("-----BEGIN PGP SIGNATURE-----")
-
-// end is a marker which denotes the end of the armored signature.
-var end = []byte("\n-----END PGP SIGNATURE-----")
-
-var crlf = []byte("\r\n")
-var lf = byte('\n')
-
-// getLine returns the first \r\n or \n delineated line from the given byte
-// array. The line does not include the \r\n or \n. The remainder of the byte
-// array (also not including the new line bytes) is also returned and this will
-// always be smaller than the original argument.
-func getLine(data []byte) (line, rest []byte) {
- i := bytes.Index(data, []byte{'\n'})
- var j int
- if i < 0 {
- i = len(data)
- j = i
- } else {
- j = i + 1
- if i > 0 && data[i-1] == '\r' {
- i--
- }
- }
- return data[0:i], data[j:]
-}
-
-// Decode finds the first clearsigned message in data and returns it, as well
-// as the suffix of data which remains after the message.
-func Decode(data []byte) (b *Block, rest []byte) {
- // start begins with a newline. However, at the very beginning of
- // the byte array, we'll accept the start string without it.
- rest = data
- if bytes.HasPrefix(data, start[1:]) {
- rest = rest[len(start)-1:]
- } else if i := bytes.Index(data, start); i >= 0 {
- rest = rest[i+len(start):]
- } else {
- return nil, data
- }
-
- // Consume the start line.
- _, rest = getLine(rest)
-
- var line []byte
- b = &Block{
- Headers: make(textproto.MIMEHeader),
- }
-
- // Next come a series of header lines.
- for {
- // This loop terminates because getLine's second result is
- // always smaller than its argument.
- if len(rest) == 0 {
- return nil, data
- }
- // An empty line marks the end of the headers.
- if line, rest = getLine(rest); len(line) == 0 {
- break
- }
-
- i := bytes.Index(line, []byte{':'})
- if i == -1 {
- return nil, data
- }
-
- key, val := line[0:i], line[i+1:]
- key = bytes.TrimSpace(key)
- val = bytes.TrimSpace(val)
- b.Headers.Add(string(key), string(val))
- }
-
- firstLine := true
- for {
- start := rest
-
- line, rest = getLine(rest)
- if len(line) == 0 && len(rest) == 0 {
- // No armored data was found, so this isn't a complete message.
- return nil, data
- }
- if bytes.Equal(line, endText) {
- // Back up to the start of the line because armor expects to see the
- // header line.
- rest = start
- break
- }
-
- // The final CRLF isn't included in the hash so we don't write it until
- // we've seen the next line.
- if firstLine {
- firstLine = false
- } else {
- b.Bytes = append(b.Bytes, crlf...)
- }
-
- if bytes.HasPrefix(line, dashEscape) {
- line = line[2:]
- }
- line = bytes.TrimRight(line, " \t")
- b.Bytes = append(b.Bytes, line...)
-
- b.Plaintext = append(b.Plaintext, line...)
- b.Plaintext = append(b.Plaintext, lf)
- }
-
- // We want to find the extent of the armored data (including any newlines at
- // the end).
- i := bytes.Index(rest, end)
- if i == -1 {
- return nil, data
- }
- i += len(end)
- for i < len(rest) && (rest[i] == '\r' || rest[i] == '\n') {
- i++
- }
- armored := rest[:i]
- rest = rest[i:]
-
- var err error
- b.ArmoredSignature, err = armor.Decode(bytes.NewBuffer(armored))
- if err != nil {
- return nil, data
- }
-
- return b, rest
-}
-
-// A dashEscaper is an io.WriteCloser which processes the body of a clear-signed
-// message. The clear-signed message is written to buffered and a hash, suitable
-// for signing, is maintained in h.
-//
-// When closed, an armored signature is created and written to complete the
-// message.
-type dashEscaper struct {
- buffered *bufio.Writer
- h hash.Hash
- hashType crypto.Hash
-
- atBeginningOfLine bool
- isFirstLine bool
-
- whitespace []byte
- byteBuf []byte // a one byte buffer to save allocations
-
- privateKey *packet.PrivateKey
- config *packet.Config
-}
-
-func (d *dashEscaper) Write(data []byte) (n int, err error) {
- for _, b := range data {
- d.byteBuf[0] = b
-
- if d.atBeginningOfLine {
- // The final CRLF isn't included in the hash so we have to wait
- // until this point (the start of the next line) before writing it.
- if !d.isFirstLine {
- d.h.Write(crlf)
- }
- d.isFirstLine = false
- }
-
- // Any whitespace at the end of the line has to be removed so we
- // buffer it until we find out whether there's more on this line.
- if b == ' ' || b == '\t' || b == '\r' {
- d.whitespace = append(d.whitespace, b)
- d.atBeginningOfLine = false
- continue
- }
-
- if d.atBeginningOfLine {
- // At the beginning of a line, hyphens have to be escaped.
- if b == '-' {
- // The signature isn't calculated over the dash-escaped text so
- // the escape is only written to buffered.
- if _, err = d.buffered.Write(dashEscape); err != nil {
- return
- }
- d.h.Write(d.byteBuf)
- d.atBeginningOfLine = false
- } else if b == '\n' {
- // Nothing to do because we delay writing CRLF to the hash.
- } else {
- d.h.Write(d.byteBuf)
- d.atBeginningOfLine = false
- }
- if err = d.buffered.WriteByte(b); err != nil {
- return
- }
- } else {
- if b == '\n' {
- // We got a raw \n. Drop any trailing whitespace and write a
- // CRLF.
- d.whitespace = d.whitespace[:0]
- // We delay writing CRLF to the hash until the start of the
- // next line.
- if err = d.buffered.WriteByte(b); err != nil {
- return
- }
- d.atBeginningOfLine = true
- } else {
- // Any buffered whitespace wasn't at the end of the line so
- // we need to write it out.
- if len(d.whitespace) > 0 {
- d.h.Write(d.whitespace)
- if _, err = d.buffered.Write(d.whitespace); err != nil {
- return
- }
- d.whitespace = d.whitespace[:0]
- }
- d.h.Write(d.byteBuf)
- if err = d.buffered.WriteByte(b); err != nil {
- return
- }
- }
- }
- }
-
- n = len(data)
- return
-}
-
-func (d *dashEscaper) Close() (err error) {
- if !d.atBeginningOfLine {
- if err = d.buffered.WriteByte(lf); err != nil {
- return
- }
- }
- sig := new(packet.Signature)
- sig.SigType = packet.SigTypeText
- sig.PubKeyAlgo = d.privateKey.PubKeyAlgo
- sig.Hash = d.hashType
- sig.CreationTime = d.config.Now()
- sig.IssuerKeyId = &d.privateKey.KeyId
-
- if err = sig.Sign(d.h, d.privateKey, d.config); err != nil {
- return
- }
-
- out, err := armor.Encode(d.buffered, "PGP SIGNATURE", nil)
- if err != nil {
- return
- }
-
- if err = sig.Serialize(out); err != nil {
- return
- }
- if err = out.Close(); err != nil {
- return
- }
- if err = d.buffered.Flush(); err != nil {
- return
- }
- return
-}
-
-// Encode returns a WriteCloser which will clear-sign a message with privateKey
-// and write it to w. If config is nil, sensible defaults are used.
-func Encode(w io.Writer, privateKey *packet.PrivateKey, config *packet.Config) (plaintext io.WriteCloser, err error) {
- if privateKey.Encrypted {
- return nil, errors.InvalidArgumentError("signing key is encrypted")
- }
-
- hashType := config.Hash()
- name := nameOfHash(hashType)
- if len(name) == 0 {
- return nil, errors.UnsupportedError("unknown hash type: " + strconv.Itoa(int(hashType)))
- }
-
- if !hashType.Available() {
- return nil, errors.UnsupportedError("unsupported hash type: " + strconv.Itoa(int(hashType)))
- }
- h := hashType.New()
-
- buffered := bufio.NewWriter(w)
- // start has a \n at the beginning that we don't want here.
- if _, err = buffered.Write(start[1:]); err != nil {
- return
- }
- if err = buffered.WriteByte(lf); err != nil {
- return
- }
- if _, err = buffered.WriteString("Hash: "); err != nil {
- return
- }
- if _, err = buffered.WriteString(name); err != nil {
- return
- }
- if err = buffered.WriteByte(lf); err != nil {
- return
- }
- if err = buffered.WriteByte(lf); err != nil {
- return
- }
-
- plaintext = &dashEscaper{
- buffered: buffered,
- h: h,
- hashType: hashType,
-
- atBeginningOfLine: true,
- isFirstLine: true,
-
- byteBuf: make([]byte, 1),
-
- privateKey: privateKey,
- config: config,
- }
-
- return
-}
-
-// nameOfHash returns the OpenPGP name for the given hash, or the empty string
-// if the name isn't known. See RFC 4880, section 9.4.
-func nameOfHash(h crypto.Hash) string {
- switch h {
- case crypto.MD5:
- return "MD5"
- case crypto.SHA1:
- return "SHA1"
- case crypto.RIPEMD160:
- return "RIPEMD160"
- case crypto.SHA224:
- return "SHA224"
- case crypto.SHA256:
- return "SHA256"
- case crypto.SHA384:
- return "SHA384"
- case crypto.SHA512:
- return "SHA512"
- }
- return ""
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go
deleted file mode 100644
index 2c0948078..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2012 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 file.
-
-package clearsign
-
-import (
- "bytes"
- "golang.org/x/crypto/openpgp"
- "testing"
-)
-
-func testParse(t *testing.T, input []byte, expected, expectedPlaintext string) {
- b, rest := Decode(input)
- if b == nil {
- t.Fatal("failed to decode clearsign message")
- }
- if !bytes.Equal(rest, []byte("trailing")) {
- t.Errorf("unexpected remaining bytes returned: %s", string(rest))
- }
- if b.ArmoredSignature.Type != "PGP SIGNATURE" {
- t.Errorf("bad armor type, got:%s, want:PGP SIGNATURE", b.ArmoredSignature.Type)
- }
- if !bytes.Equal(b.Bytes, []byte(expected)) {
- t.Errorf("bad body, got:%x want:%x", b.Bytes, expected)
- }
-
- if !bytes.Equal(b.Plaintext, []byte(expectedPlaintext)) {
- t.Errorf("bad plaintext, got:%x want:%x", b.Plaintext, expectedPlaintext)
- }
-
- keyring, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(signingKey))
- if err != nil {
- t.Errorf("failed to parse public key: %s", err)
- }
-
- if _, err := openpgp.CheckDetachedSignature(keyring, bytes.NewBuffer(b.Bytes), b.ArmoredSignature.Body); err != nil {
- t.Errorf("failed to check signature: %s", err)
- }
-}
-
-func TestParse(t *testing.T) {
- testParse(t, clearsignInput, "Hello world\r\nline 2", "Hello world\nline 2\n")
- testParse(t, clearsignInput2, "\r\n\r\n(This message has a couple of blank lines at the start and end.)\r\n\r\n", "\n\n(This message has a couple of blank lines at the start and end.)\n\n\n")
-}
-
-func TestParseInvalid(t *testing.T) {
- if b, _ := Decode(clearsignInput3); b != nil {
- t.Fatal("decoded a bad clearsigned message without any error")
- }
-}
-
-func TestParseWithNoNewlineAtEnd(t *testing.T) {
- input := clearsignInput
- input = input[:len(input)-len("trailing")-1]
- b, rest := Decode(input)
- if b == nil {
- t.Fatal("failed to decode clearsign message")
- }
- if len(rest) > 0 {
- t.Errorf("unexpected remaining bytes returned: %s", string(rest))
- }
-}
-
-var signingTests = []struct {
- in, signed, plaintext string
-}{
- {"", "", ""},
- {"a", "a", "a\n"},
- {"a\n", "a", "a\n"},
- {"-a\n", "-a", "-a\n"},
- {"--a\nb", "--a\r\nb", "--a\nb\n"},
- // leading whitespace
- {" a\n", " a", " a\n"},
- {" a\n", " a", " a\n"},
- // trailing whitespace (should be stripped)
- {"a \n", "a", "a\n"},
- {"a ", "a", "a\n"},
- // whitespace-only lines (should be stripped)
- {" \n", "", "\n"},
- {" ", "", "\n"},
- {"a\n \n \nb\n", "a\r\n\r\n\r\nb", "a\n\n\nb\n"},
-}
-
-func TestSigning(t *testing.T) {
- keyring, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(signingKey))
- if err != nil {
- t.Errorf("failed to parse public key: %s", err)
- }
-
- for i, test := range signingTests {
- var buf bytes.Buffer
-
- plaintext, err := Encode(&buf, keyring[0].PrivateKey, nil)
- if err != nil {
- t.Errorf("#%d: error from Encode: %s", i, err)
- continue
- }
- if _, err := plaintext.Write([]byte(test.in)); err != nil {
- t.Errorf("#%d: error from Write: %s", i, err)
- continue
- }
- if err := plaintext.Close(); err != nil {
- t.Fatalf("#%d: error from Close: %s", i, err)
- continue
- }
-
- b, _ := Decode(buf.Bytes())
- if b == nil {
- t.Errorf("#%d: failed to decode clearsign message", i)
- continue
- }
- if !bytes.Equal(b.Bytes, []byte(test.signed)) {
- t.Errorf("#%d: bad result, got:%x, want:%x", i, b.Bytes, test.signed)
- continue
- }
- if !bytes.Equal(b.Plaintext, []byte(test.plaintext)) {
- t.Errorf("#%d: bad result, got:%x, want:%x", i, b.Plaintext, test.plaintext)
- continue
- }
-
- if _, err := openpgp.CheckDetachedSignature(keyring, bytes.NewBuffer(b.Bytes), b.ArmoredSignature.Body); err != nil {
- t.Errorf("#%d: failed to check signature: %s", i, err)
- }
- }
-}
-
-var clearsignInput = []byte(`
-;lasjlkfdsa
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-Hello world
-line 2
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-iJwEAQECAAYFAk8kMuEACgkQO9o98PRieSpMsAQAhmY/vwmNpflrPgmfWsYhk5O8
-pjnBUzZwqTDoDeINjZEoPDSpQAHGhjFjgaDx/Gj4fAl0dM4D0wuUEBb6QOrwflog
-2A2k9kfSOMOtk0IH/H5VuFN1Mie9L/erYXjTQIptv9t9J7NoRBMU0QOOaFU0JaO9
-MyTpno24AjIAGb+mH1U=
-=hIJ6
------END PGP SIGNATURE-----
-trailing`)
-
-var clearsignInput2 = []byte(`
-asdlfkjasdlkfjsadf
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
-
-
-(This message has a couple of blank lines at the start and end.)
-
-
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.11 (GNU/Linux)
-
-iJwEAQEIAAYFAlPpSREACgkQO9o98PRieSpZTAP+M8QUoCt/7Rf3YbXPcdzIL32v
-pt1I+cMNeopzfLy0u4ioEFi8s5VkwpL1AFmirvgViCwlf82inoRxzZRiW05JQ5LI
-ESEzeCoy2LIdRCQ2hcrG8pIUPzUO4TqO5D/dMbdHwNH4h5nNmGJUAEG6FpURlPm+
-qZg6BaTvOxepqOxnhVU=
-=e+C6
------END PGP SIGNATURE-----
-
-trailing`)
-
-var clearsignInput3 = []byte(`
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
-(This message was truncated.)
-`)
-
-var signingKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp
-idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn
-vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB
-AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X
-0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL
-IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk
-VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn
-gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9
-TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx
-q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz
-dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA
-CgkQO9o98PRieSoLhgQAkLEZex02Qt7vGhZzMwuN0R22w3VwyYyjBx+fM3JFETy1
-ut4xcLJoJfIaF5ZS38UplgakHG0FQ+b49i8dMij0aZmDqGxrew1m4kBfjXw9B/v+
-eIqpODryb6cOSwyQFH0lQkXC040pjq9YqDsO5w0WYNXYKDnzRV0p4H1pweo2VDid
-AdgETasU2gEEAN46UPeWRqKHvA99arOxee38fBt2CI08iiWyI8T3J6ivtFGixSqV
-bRcPxYO/qLpVe5l84Nb3X71GfVXlc9hyv7CD6tcowL59hg1E/DC5ydI8K8iEpUmK
-/UnHdIY5h8/kqgGxkY/T/hgp5fRQgW1ZoZxLajVlMRZ8W4tFtT0DeA+JABEBAAEA
-A/0bE1jaaZKj6ndqcw86jd+QtD1SF+Cf21CWRNeLKnUds4FRRvclzTyUMuWPkUeX
-TaNNsUOFqBsf6QQ2oHUBBK4VCHffHCW4ZEX2cd6umz7mpHW6XzN4DECEzOVksXtc
-lUC1j4UB91DC/RNQqwX1IV2QLSwssVotPMPqhOi0ZLNY7wIA3n7DWKInxYZZ4K+6
-rQ+POsz6brEoRHwr8x6XlHenq1Oki855pSa1yXIARoTrSJkBtn5oI+f8AzrnN0BN
-oyeQAwIA/7E++3HDi5aweWrViiul9cd3rcsS0dEnksPhvS0ozCJiHsq/6GFmy7J8
-QSHZPteedBnZyNp5jR+H7cIfVN3KgwH/Skq4PsuPhDq5TKK6i8Pc1WW8MA6DXTdU
-nLkX7RGmMwjC0DBf7KWAlPjFaONAX3a8ndnz//fy1q7u2l9AZwrj1qa1iJ8EGAEC
-AAkFAk2rFNoCGwwACgkQO9o98PRieSo2/QP/WTzr4ioINVsvN1akKuekmEMI3LAp
-BfHwatufxxP1U+3Si/6YIk7kuPB9Hs+pRqCXzbvPRrI8NHZBmc8qIGthishdCYad
-AHcVnXjtxrULkQFGbGvhKURLvS9WnzD/m1K2zzwxzkPTzT9/Yf06O6Mal5AdugPL
-VrM0m72/jnpKo04=
-=zNCn
------END PGP PRIVATE KEY BLOCK-----
-`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go
deleted file mode 100644
index 73f4fe378..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package elgamal implements ElGamal encryption, suitable for OpenPGP,
-// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on
-// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31,
-// n. 4, 1985, pp. 469-472.
-//
-// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it
-// unsuitable for other protocols. RSA should be used in preference in any
-// case.
-package elgamal // import "golang.org/x/crypto/openpgp/elgamal"
-
-import (
- "crypto/rand"
- "crypto/subtle"
- "errors"
- "io"
- "math/big"
-)
-
-// PublicKey represents an ElGamal public key.
-type PublicKey struct {
- G, P, Y *big.Int
-}
-
-// PrivateKey represents an ElGamal private key.
-type PrivateKey struct {
- PublicKey
- X *big.Int
-}
-
-// Encrypt encrypts the given message to the given public key. The result is a
-// pair of integers. Errors can result from reading random, or because msg is
-// too large to be encrypted to the public key.
-func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) {
- pLen := (pub.P.BitLen() + 7) / 8
- if len(msg) > pLen-11 {
- err = errors.New("elgamal: message too long")
- return
- }
-
- // EM = 0x02 || PS || 0x00 || M
- em := make([]byte, pLen-1)
- em[0] = 2
- ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):]
- err = nonZeroRandomBytes(ps, random)
- if err != nil {
- return
- }
- em[len(em)-len(msg)-1] = 0
- copy(mm, msg)
-
- m := new(big.Int).SetBytes(em)
-
- k, err := rand.Int(random, pub.P)
- if err != nil {
- return
- }
-
- c1 = new(big.Int).Exp(pub.G, k, pub.P)
- s := new(big.Int).Exp(pub.Y, k, pub.P)
- c2 = s.Mul(s, m)
- c2.Mod(c2, pub.P)
-
- return
-}
-
-// Decrypt takes two integers, resulting from an ElGamal encryption, and
-// returns the plaintext of the message. An error can result only if the
-// ciphertext is invalid. Users should keep in mind that this is a padding
-// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can
-// be used to break the cryptosystem. See ``Chosen Ciphertext Attacks
-// Against Protocols Based on the RSA Encryption Standard PKCS #1'', Daniel
-// Bleichenbacher, Advances in Cryptology (Crypto '98),
-func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) {
- s := new(big.Int).Exp(c1, priv.X, priv.P)
- s.ModInverse(s, priv.P)
- s.Mul(s, c2)
- s.Mod(s, priv.P)
- em := s.Bytes()
-
- firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2)
-
- // The remainder of the plaintext must be a string of non-zero random
- // octets, followed by a 0, followed by the message.
- // lookingForIndex: 1 iff we are still looking for the zero.
- // index: the offset of the first zero byte.
- var lookingForIndex, index int
- lookingForIndex = 1
-
- for i := 1; i < len(em); i++ {
- equals0 := subtle.ConstantTimeByteEq(em[i], 0)
- index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index)
- lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex)
- }
-
- if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 {
- return nil, errors.New("elgamal: decryption error")
- }
- return em[index+1:], nil
-}
-
-// nonZeroRandomBytes fills the given slice with non-zero random octets.
-func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) {
- _, err = io.ReadFull(rand, s)
- if err != nil {
- return
- }
-
- for i := 0; i < len(s); i++ {
- for s[i] == 0 {
- _, err = io.ReadFull(rand, s[i:i+1])
- if err != nil {
- return
- }
- }
- }
-
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal_test.go
deleted file mode 100644
index c4f99f5c4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2011 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 file.
-
-package elgamal
-
-import (
- "bytes"
- "crypto/rand"
- "math/big"
- "testing"
-)
-
-// This is the 1024-bit MODP group from RFC 5114, section 2.1:
-const primeHex = "B10B8F96A080E01DDE92DE5EAE5D54EC52C99FBCFB06A3C69A6A9DCA52D23B616073E28675A23D189838EF1E2EE652C013ECB4AEA906112324975C3CD49B83BFACCBDD7D90C4BD7098488E9C219A73724EFFD6FAE5644738FAA31A4FF55BCCC0A151AF5F0DC8B4BD45BF37DF365C1A65E68CFDA76D4DA708DF1FB2BC2E4A4371"
-
-const generatorHex = "A4D1CBD5C3FD34126765A442EFB99905F8104DD258AC507FD6406CFF14266D31266FEA1E5C41564B777E690F5504F213160217B4B01B886A5E91547F9E2749F4D7FBD7D3B9A92EE1909D0D2263F80A76A6A24C087A091F531DBF0A0169B6A28AD662A4D18E73AFA32D779D5918D08BC8858F4DCEF97C2A24855E6EEB22B3B2E5"
-
-func fromHex(hex string) *big.Int {
- n, ok := new(big.Int).SetString(hex, 16)
- if !ok {
- panic("failed to parse hex number")
- }
- return n
-}
-
-func TestEncryptDecrypt(t *testing.T) {
- priv := &PrivateKey{
- PublicKey: PublicKey{
- G: fromHex(generatorHex),
- P: fromHex(primeHex),
- },
- X: fromHex("42"),
- }
- priv.Y = new(big.Int).Exp(priv.G, priv.X, priv.P)
-
- message := []byte("hello world")
- c1, c2, err := Encrypt(rand.Reader, &priv.PublicKey, message)
- if err != nil {
- t.Errorf("error encrypting: %s", err)
- }
- message2, err := Decrypt(priv, c1, c2)
- if err != nil {
- t.Errorf("error decrypting: %s", err)
- }
- if !bytes.Equal(message2, message) {
- t.Errorf("decryption failed, got: %x, want: %x", message2, message)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/errors/errors.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/errors/errors.go
deleted file mode 100644
index eb0550b2d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/errors/errors.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package errors contains common error types for the OpenPGP packages.
-package errors // import "golang.org/x/crypto/openpgp/errors"
-
-import (
- "strconv"
-)
-
-// A StructuralError is returned when OpenPGP data is found to be syntactically
-// invalid.
-type StructuralError string
-
-func (s StructuralError) Error() string {
- return "openpgp: invalid data: " + string(s)
-}
-
-// UnsupportedError indicates that, although the OpenPGP data is valid, it
-// makes use of currently unimplemented features.
-type UnsupportedError string
-
-func (s UnsupportedError) Error() string {
- return "openpgp: unsupported feature: " + string(s)
-}
-
-// InvalidArgumentError indicates that the caller is in error and passed an
-// incorrect value.
-type InvalidArgumentError string
-
-func (i InvalidArgumentError) Error() string {
- return "openpgp: invalid argument: " + string(i)
-}
-
-// SignatureError indicates that a syntactically valid signature failed to
-// validate.
-type SignatureError string
-
-func (b SignatureError) Error() string {
- return "openpgp: invalid signature: " + string(b)
-}
-
-type keyIncorrectError int
-
-func (ki keyIncorrectError) Error() string {
- return "openpgp: incorrect key"
-}
-
-var ErrKeyIncorrect error = keyIncorrectError(0)
-
-type unknownIssuerError int
-
-func (unknownIssuerError) Error() string {
- return "openpgp: signature made by unknown entity"
-}
-
-var ErrUnknownIssuer error = unknownIssuerError(0)
-
-type keyRevokedError int
-
-func (keyRevokedError) Error() string {
- return "openpgp: signature made by revoked key"
-}
-
-var ErrKeyRevoked error = keyRevokedError(0)
-
-type UnknownPacketTypeError uint8
-
-func (upte UnknownPacketTypeError) Error() string {
- return "openpgp: unknown packet type: " + strconv.Itoa(int(upte))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys.go
deleted file mode 100644
index 68b14c6ae..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys.go
+++ /dev/null
@@ -1,637 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import (
- "crypto/rsa"
- "io"
- "time"
-
- "golang.org/x/crypto/openpgp/armor"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/packet"
-)
-
-// PublicKeyType is the armor type for a PGP public key.
-var PublicKeyType = "PGP PUBLIC KEY BLOCK"
-
-// PrivateKeyType is the armor type for a PGP private key.
-var PrivateKeyType = "PGP PRIVATE KEY BLOCK"
-
-// An Entity represents the components of an OpenPGP key: a primary public key
-// (which must be a signing key), one or more identities claimed by that key,
-// and zero or more subkeys, which may be encryption keys.
-type Entity struct {
- PrimaryKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- Identities map[string]*Identity // indexed by Identity.Name
- Revocations []*packet.Signature
- Subkeys []Subkey
-}
-
-// An Identity represents an identity claimed by an Entity and zero or more
-// assertions by other entities about that claim.
-type Identity struct {
- Name string // by convention, has the form "Full Name (comment) <email@example.com>"
- UserId *packet.UserId
- SelfSignature *packet.Signature
- Signatures []*packet.Signature
-}
-
-// A Subkey is an additional public key in an Entity. Subkeys can be used for
-// encryption.
-type Subkey struct {
- PublicKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- Sig *packet.Signature
-}
-
-// A Key identifies a specific public key in an Entity. This is either the
-// Entity's primary key or a subkey.
-type Key struct {
- Entity *Entity
- PublicKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- SelfSignature *packet.Signature
-}
-
-// A KeyRing provides access to public and private keys.
-type KeyRing interface {
- // KeysById returns the set of keys that have the given key id.
- KeysById(id uint64) []Key
- // KeysByIdAndUsage returns the set of keys with the given id
- // that also meet the key usage given by requiredUsage.
- // The requiredUsage is expressed as the bitwise-OR of
- // packet.KeyFlag* values.
- KeysByIdUsage(id uint64, requiredUsage byte) []Key
- // DecryptionKeys returns all private keys that are valid for
- // decryption.
- DecryptionKeys() []Key
-}
-
-// primaryIdentity returns the Identity marked as primary or the first identity
-// if none are so marked.
-func (e *Entity) primaryIdentity() *Identity {
- var firstIdentity *Identity
- for _, ident := range e.Identities {
- if firstIdentity == nil {
- firstIdentity = ident
- }
- if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId {
- return ident
- }
- }
- return firstIdentity
-}
-
-// encryptionKey returns the best candidate Key for encrypting a message to the
-// given Entity.
-func (e *Entity) encryptionKey(now time.Time) (Key, bool) {
- candidateSubkey := -1
-
- // Iterate the keys to find the newest key
- var maxTime time.Time
- for i, subkey := range e.Subkeys {
- if subkey.Sig.FlagsValid &&
- subkey.Sig.FlagEncryptCommunications &&
- subkey.PublicKey.PubKeyAlgo.CanEncrypt() &&
- !subkey.Sig.KeyExpired(now) &&
- (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) {
- candidateSubkey = i
- maxTime = subkey.Sig.CreationTime
- }
- }
-
- if candidateSubkey != -1 {
- subkey := e.Subkeys[candidateSubkey]
- return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true
- }
-
- // If we don't have any candidate subkeys for encryption and
- // the primary key doesn't have any usage metadata then we
- // assume that the primary key is ok. Or, if the primary key is
- // marked as ok to encrypt to, then we can obviously use it.
- i := e.primaryIdentity()
- if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications &&
- e.PrimaryKey.PubKeyAlgo.CanEncrypt() &&
- !i.SelfSignature.KeyExpired(now) {
- return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true
- }
-
- // This Entity appears to be signing only.
- return Key{}, false
-}
-
-// signingKey return the best candidate Key for signing a message with this
-// Entity.
-func (e *Entity) signingKey(now time.Time) (Key, bool) {
- candidateSubkey := -1
-
- for i, subkey := range e.Subkeys {
- if subkey.Sig.FlagsValid &&
- subkey.Sig.FlagSign &&
- subkey.PublicKey.PubKeyAlgo.CanSign() &&
- !subkey.Sig.KeyExpired(now) {
- candidateSubkey = i
- break
- }
- }
-
- if candidateSubkey != -1 {
- subkey := e.Subkeys[candidateSubkey]
- return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true
- }
-
- // If we have no candidate subkey then we assume that it's ok to sign
- // with the primary key.
- i := e.primaryIdentity()
- if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign &&
- !i.SelfSignature.KeyExpired(now) {
- return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true
- }
-
- return Key{}, false
-}
-
-// An EntityList contains one or more Entities.
-type EntityList []*Entity
-
-// KeysById returns the set of keys that have the given key id.
-func (el EntityList) KeysById(id uint64) (keys []Key) {
- for _, e := range el {
- if e.PrimaryKey.KeyId == id {
- var selfSig *packet.Signature
- for _, ident := range e.Identities {
- if selfSig == nil {
- selfSig = ident.SelfSignature
- } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId {
- selfSig = ident.SelfSignature
- break
- }
- }
- keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig})
- }
-
- for _, subKey := range e.Subkeys {
- if subKey.PublicKey.KeyId == id {
- keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig})
- }
- }
- }
- return
-}
-
-// KeysByIdAndUsage returns the set of keys with the given id that also meet
-// the key usage given by requiredUsage. The requiredUsage is expressed as
-// the bitwise-OR of packet.KeyFlag* values.
-func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) {
- for _, key := range el.KeysById(id) {
- if len(key.Entity.Revocations) > 0 {
- continue
- }
-
- if key.SelfSignature.RevocationReason != nil {
- continue
- }
-
- if key.SelfSignature.FlagsValid && requiredUsage != 0 {
- var usage byte
- if key.SelfSignature.FlagCertify {
- usage |= packet.KeyFlagCertify
- }
- if key.SelfSignature.FlagSign {
- usage |= packet.KeyFlagSign
- }
- if key.SelfSignature.FlagEncryptCommunications {
- usage |= packet.KeyFlagEncryptCommunications
- }
- if key.SelfSignature.FlagEncryptStorage {
- usage |= packet.KeyFlagEncryptStorage
- }
- if usage&requiredUsage != requiredUsage {
- continue
- }
- }
-
- keys = append(keys, key)
- }
- return
-}
-
-// DecryptionKeys returns all private keys that are valid for decryption.
-func (el EntityList) DecryptionKeys() (keys []Key) {
- for _, e := range el {
- for _, subKey := range e.Subkeys {
- if subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) {
- keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig})
- }
- }
- }
- return
-}
-
-// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file.
-func ReadArmoredKeyRing(r io.Reader) (EntityList, error) {
- block, err := armor.Decode(r)
- if err == io.EOF {
- return nil, errors.InvalidArgumentError("no armored data found")
- }
- if err != nil {
- return nil, err
- }
- if block.Type != PublicKeyType && block.Type != PrivateKeyType {
- return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type)
- }
-
- return ReadKeyRing(block.Body)
-}
-
-// ReadKeyRing reads one or more public/private keys. Unsupported keys are
-// ignored as long as at least a single valid key is found.
-func ReadKeyRing(r io.Reader) (el EntityList, err error) {
- packets := packet.NewReader(r)
- var lastUnsupportedError error
-
- for {
- var e *Entity
- e, err = ReadEntity(packets)
- if err != nil {
- // TODO: warn about skipped unsupported/unreadable keys
- if _, ok := err.(errors.UnsupportedError); ok {
- lastUnsupportedError = err
- err = readToNextPublicKey(packets)
- } else if _, ok := err.(errors.StructuralError); ok {
- // Skip unreadable, badly-formatted keys
- lastUnsupportedError = err
- err = readToNextPublicKey(packets)
- }
- if err == io.EOF {
- err = nil
- break
- }
- if err != nil {
- el = nil
- break
- }
- } else {
- el = append(el, e)
- }
- }
-
- if len(el) == 0 && err == nil {
- err = lastUnsupportedError
- }
- return
-}
-
-// readToNextPublicKey reads packets until the start of the entity and leaves
-// the first packet of the new entity in the Reader.
-func readToNextPublicKey(packets *packet.Reader) (err error) {
- var p packet.Packet
- for {
- p, err = packets.Next()
- if err == io.EOF {
- return
- } else if err != nil {
- if _, ok := err.(errors.UnsupportedError); ok {
- err = nil
- continue
- }
- return
- }
-
- if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {
- packets.Unread(p)
- return
- }
- }
-}
-
-// ReadEntity reads an entity (public key, identities, subkeys etc) from the
-// given Reader.
-func ReadEntity(packets *packet.Reader) (*Entity, error) {
- e := new(Entity)
- e.Identities = make(map[string]*Identity)
-
- p, err := packets.Next()
- if err != nil {
- return nil, err
- }
-
- var ok bool
- if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok {
- if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok {
- packets.Unread(p)
- return nil, errors.StructuralError("first packet was not a public/private key")
- } else {
- e.PrimaryKey = &e.PrivateKey.PublicKey
- }
- }
-
- if !e.PrimaryKey.PubKeyAlgo.CanSign() {
- return nil, errors.StructuralError("primary key cannot be used for signatures")
- }
-
- var current *Identity
- var revocations []*packet.Signature
-EachPacket:
- for {
- p, err := packets.Next()
- if err == io.EOF {
- break
- } else if err != nil {
- return nil, err
- }
-
- switch pkt := p.(type) {
- case *packet.UserId:
- current = new(Identity)
- current.Name = pkt.Id
- current.UserId = pkt
- e.Identities[pkt.Id] = current
-
- for {
- p, err = packets.Next()
- if err == io.EOF {
- return nil, io.ErrUnexpectedEOF
- } else if err != nil {
- return nil, err
- }
-
- sig, ok := p.(*packet.Signature)
- if !ok {
- return nil, errors.StructuralError("user ID packet not followed by self-signature")
- }
-
- if (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId {
- if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil {
- return nil, errors.StructuralError("user ID self-signature invalid: " + err.Error())
- }
- current.SelfSignature = sig
- break
- }
- current.Signatures = append(current.Signatures, sig)
- }
- case *packet.Signature:
- if pkt.SigType == packet.SigTypeKeyRevocation {
- revocations = append(revocations, pkt)
- } else if pkt.SigType == packet.SigTypeDirectSignature {
- // TODO: RFC4880 5.2.1 permits signatures
- // directly on keys (eg. to bind additional
- // revocation keys).
- } else if current == nil {
- return nil, errors.StructuralError("signature packet found before user id packet")
- } else {
- current.Signatures = append(current.Signatures, pkt)
- }
- case *packet.PrivateKey:
- if pkt.IsSubkey == false {
- packets.Unread(p)
- break EachPacket
- }
- err = addSubkey(e, packets, &pkt.PublicKey, pkt)
- if err != nil {
- return nil, err
- }
- case *packet.PublicKey:
- if pkt.IsSubkey == false {
- packets.Unread(p)
- break EachPacket
- }
- err = addSubkey(e, packets, pkt, nil)
- if err != nil {
- return nil, err
- }
- default:
- // we ignore unknown packets
- }
- }
-
- if len(e.Identities) == 0 {
- return nil, errors.StructuralError("entity without any identities")
- }
-
- for _, revocation := range revocations {
- err = e.PrimaryKey.VerifyRevocationSignature(revocation)
- if err == nil {
- e.Revocations = append(e.Revocations, revocation)
- } else {
- // TODO: RFC 4880 5.2.3.15 defines revocation keys.
- return nil, errors.StructuralError("revocation signature signed by alternate key")
- }
- }
-
- return e, nil
-}
-
-func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error {
- var subKey Subkey
- subKey.PublicKey = pub
- subKey.PrivateKey = priv
- p, err := packets.Next()
- if err == io.EOF {
- return io.ErrUnexpectedEOF
- }
- if err != nil {
- return errors.StructuralError("subkey signature invalid: " + err.Error())
- }
- var ok bool
- subKey.Sig, ok = p.(*packet.Signature)
- if !ok {
- return errors.StructuralError("subkey packet not followed by signature")
- }
- if subKey.Sig.SigType != packet.SigTypeSubkeyBinding && subKey.Sig.SigType != packet.SigTypeSubkeyRevocation {
- return errors.StructuralError("subkey signature with wrong type")
- }
- err = e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, subKey.Sig)
- if err != nil {
- return errors.StructuralError("subkey signature invalid: " + err.Error())
- }
- e.Subkeys = append(e.Subkeys, subKey)
- return nil
-}
-
-const defaultRSAKeyBits = 2048
-
-// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a
-// single identity composed of the given full name, comment and email, any of
-// which may be empty but must not contain any of "()<>\x00".
-// If config is nil, sensible defaults will be used.
-func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) {
- currentTime := config.Now()
-
- bits := defaultRSAKeyBits
- if config != nil && config.RSABits != 0 {
- bits = config.RSABits
- }
-
- uid := packet.NewUserId(name, comment, email)
- if uid == nil {
- return nil, errors.InvalidArgumentError("user id field contained invalid characters")
- }
- signingPriv, err := rsa.GenerateKey(config.Random(), bits)
- if err != nil {
- return nil, err
- }
- encryptingPriv, err := rsa.GenerateKey(config.Random(), bits)
- if err != nil {
- return nil, err
- }
-
- e := &Entity{
- PrimaryKey: packet.NewRSAPublicKey(currentTime, &signingPriv.PublicKey),
- PrivateKey: packet.NewRSAPrivateKey(currentTime, signingPriv),
- Identities: make(map[string]*Identity),
- }
- isPrimaryId := true
- e.Identities[uid.Id] = &Identity{
- Name: uid.Name,
- UserId: uid,
- SelfSignature: &packet.Signature{
- CreationTime: currentTime,
- SigType: packet.SigTypePositiveCert,
- PubKeyAlgo: packet.PubKeyAlgoRSA,
- Hash: config.Hash(),
- IsPrimaryId: &isPrimaryId,
- FlagsValid: true,
- FlagSign: true,
- FlagCertify: true,
- IssuerKeyId: &e.PrimaryKey.KeyId,
- },
- }
-
- // If the user passes in a DefaultHash via packet.Config,
- // set the PreferredHash for the SelfSignature.
- if config != nil && config.DefaultHash != 0 {
- e.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)}
- }
-
- e.Subkeys = make([]Subkey, 1)
- e.Subkeys[0] = Subkey{
- PublicKey: packet.NewRSAPublicKey(currentTime, &encryptingPriv.PublicKey),
- PrivateKey: packet.NewRSAPrivateKey(currentTime, encryptingPriv),
- Sig: &packet.Signature{
- CreationTime: currentTime,
- SigType: packet.SigTypeSubkeyBinding,
- PubKeyAlgo: packet.PubKeyAlgoRSA,
- Hash: config.Hash(),
- FlagsValid: true,
- FlagEncryptStorage: true,
- FlagEncryptCommunications: true,
- IssuerKeyId: &e.PrimaryKey.KeyId,
- },
- }
- e.Subkeys[0].PublicKey.IsSubkey = true
- e.Subkeys[0].PrivateKey.IsSubkey = true
-
- return e, nil
-}
-
-// SerializePrivate serializes an Entity, including private key material, to
-// the given Writer. For now, it must only be used on an Entity returned from
-// NewEntity.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) {
- err = e.PrivateKey.Serialize(w)
- if err != nil {
- return
- }
- for _, ident := range e.Identities {
- err = ident.UserId.Serialize(w)
- if err != nil {
- return
- }
- err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config)
- if err != nil {
- return
- }
- err = ident.SelfSignature.Serialize(w)
- if err != nil {
- return
- }
- }
- for _, subkey := range e.Subkeys {
- err = subkey.PrivateKey.Serialize(w)
- if err != nil {
- return
- }
- err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
- if err != nil {
- return
- }
- err = subkey.Sig.Serialize(w)
- if err != nil {
- return
- }
- }
- return nil
-}
-
-// Serialize writes the public part of the given Entity to w. (No private
-// key material will be output).
-func (e *Entity) Serialize(w io.Writer) error {
- err := e.PrimaryKey.Serialize(w)
- if err != nil {
- return err
- }
- for _, ident := range e.Identities {
- err = ident.UserId.Serialize(w)
- if err != nil {
- return err
- }
- err = ident.SelfSignature.Serialize(w)
- if err != nil {
- return err
- }
- for _, sig := range ident.Signatures {
- err = sig.Serialize(w)
- if err != nil {
- return err
- }
- }
- }
- for _, subkey := range e.Subkeys {
- err = subkey.PublicKey.Serialize(w)
- if err != nil {
- return err
- }
- err = subkey.Sig.Serialize(w)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-// SignIdentity adds a signature to e, from signer, attesting that identity is
-// associated with e. The provided identity must already be an element of
-// e.Identities and the private key of signer must have been decrypted if
-// necessary.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error {
- if signer.PrivateKey == nil {
- return errors.InvalidArgumentError("signing Entity must have a private key")
- }
- if signer.PrivateKey.Encrypted {
- return errors.InvalidArgumentError("signing Entity's private key must be decrypted")
- }
- ident, ok := e.Identities[identity]
- if !ok {
- return errors.InvalidArgumentError("given identity string not found in Entity")
- }
-
- sig := &packet.Signature{
- SigType: packet.SigTypeGenericCert,
- PubKeyAlgo: signer.PrivateKey.PubKeyAlgo,
- Hash: config.Hash(),
- CreationTime: config.Now(),
- IssuerKeyId: &signer.PrivateKey.KeyId,
- }
- if err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil {
- return err
- }
- ident.Signatures = append(ident.Signatures, sig)
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys_test.go
deleted file mode 100644
index 76ba13ed1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/keys_test.go
+++ /dev/null
@@ -1,419 +0,0 @@
-package openpgp
-
-import (
- "bytes"
- "crypto"
- "strings"
- "testing"
- "time"
-
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/packet"
-)
-
-func TestKeyExpiry(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(expiringKeyHex))
- if err != nil {
- t.Fatal(err)
- }
- entity := kring[0]
-
- const timeFormat = "2006-01-02"
- time1, _ := time.Parse(timeFormat, "2013-07-01")
-
- // The expiringKeyHex key is structured as:
- //
- // pub 1024R/5E237D8C created: 2013-07-01 expires: 2013-07-31 usage: SC
- // sub 1024R/1ABB25A0 created: 2013-07-01 23:11:07 +0200 CEST expires: 2013-07-08 usage: E
- // sub 1024R/96A672F5 created: 2013-07-01 23:11:23 +0200 CEST expires: 2013-07-31 usage: E
- //
- // So this should select the newest, non-expired encryption key.
- key, _ := entity.encryptionKey(time1)
- if id := key.PublicKey.KeyIdShortString(); id != "96A672F5" {
- t.Errorf("Expected key 1ABB25A0 at time %s, but got key %s", time1.Format(timeFormat), id)
- }
-
- // Once the first encryption subkey has expired, the second should be
- // selected.
- time2, _ := time.Parse(timeFormat, "2013-07-09")
- key, _ = entity.encryptionKey(time2)
- if id := key.PublicKey.KeyIdShortString(); id != "96A672F5" {
- t.Errorf("Expected key 96A672F5 at time %s, but got key %s", time2.Format(timeFormat), id)
- }
-
- // Once all the keys have expired, nothing should be returned.
- time3, _ := time.Parse(timeFormat, "2013-08-01")
- if key, ok := entity.encryptionKey(time3); ok {
- t.Errorf("Expected no key at time %s, but got key %s", time3.Format(timeFormat), key.PublicKey.KeyIdShortString())
- }
-}
-
-func TestMissingCrossSignature(t *testing.T) {
- // This public key has a signing subkey, but the subkey does not
- // contain a cross-signature.
- keys, err := ReadArmoredKeyRing(bytes.NewBufferString(missingCrossSignatureKey))
- if len(keys) != 0 {
- t.Errorf("Accepted key with missing cross signature")
- }
- if err == nil {
- t.Fatal("Failed to detect error in keyring with missing cross signature")
- }
- structural, ok := err.(errors.StructuralError)
- if !ok {
- t.Fatalf("Unexpected class of error: %T. Wanted StructuralError", err)
- }
- const expectedMsg = "signing subkey is missing cross-signature"
- if !strings.Contains(string(structural), expectedMsg) {
- t.Fatalf("Unexpected error: %q. Expected it to contain %q", err, expectedMsg)
- }
-}
-
-func TestInvalidCrossSignature(t *testing.T) {
- // This public key has a signing subkey, and the subkey has an
- // embedded cross-signature. However, the cross-signature does
- // not correctly validate over the primary and subkey.
- keys, err := ReadArmoredKeyRing(bytes.NewBufferString(invalidCrossSignatureKey))
- if len(keys) != 0 {
- t.Errorf("Accepted key with invalid cross signature")
- }
- if err == nil {
- t.Fatal("Failed to detect error in keyring with an invalid cross signature")
- }
- structural, ok := err.(errors.StructuralError)
- if !ok {
- t.Fatalf("Unexpected class of error: %T. Wanted StructuralError", err)
- }
- const expectedMsg = "subkey signature invalid"
- if !strings.Contains(string(structural), expectedMsg) {
- t.Fatalf("Unexpected error: %q. Expected it to contain %q", err, expectedMsg)
- }
-}
-
-func TestGoodCrossSignature(t *testing.T) {
- // This public key has a signing subkey, and the subkey has an
- // embedded cross-signature which correctly validates over the
- // primary and subkey.
- keys, err := ReadArmoredKeyRing(bytes.NewBufferString(goodCrossSignatureKey))
- if err != nil {
- t.Fatal(err)
- }
- if len(keys) != 1 {
- t.Errorf("Failed to accept key with good cross signature, %d", len(keys))
- }
- if len(keys[0].Subkeys) != 1 {
- t.Errorf("Failed to accept good subkey, %d", len(keys[0].Subkeys))
- }
-}
-
-// TestExternallyRevokableKey attempts to load and parse a key with a third party revocation permission.
-func TestExternallyRevocableKey(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex))
- if err != nil {
- t.Fatal(err)
- }
-
- // The 0xA42704B92866382A key can be revoked by 0xBE3893CB843D0FE70C
- // according to this signature that appears within the key:
- // :signature packet: algo 1, keyid A42704B92866382A
- // version 4, created 1396409682, md5len 0, sigclass 0x1f
- // digest algo 2, begin of digest a9 84
- // hashed subpkt 2 len 4 (sig created 2014-04-02)
- // hashed subpkt 12 len 22 (revocation key: c=80 a=1 f=CE094AA433F7040BB2DDF0BE3893CB843D0FE70C)
- // hashed subpkt 7 len 1 (not revocable)
- // subpkt 16 len 8 (issuer key ID A42704B92866382A)
- // data: [1024 bits]
-
- id := uint64(0xA42704B92866382A)
- keys := kring.KeysById(id)
- if len(keys) != 1 {
- t.Errorf("Expected to find key id %X, but got %d matches", id, len(keys))
- }
-}
-
-func TestKeyRevocation(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(revokedKeyHex))
- if err != nil {
- t.Fatal(err)
- }
-
- // revokedKeyHex contains these keys:
- // pub 1024R/9A34F7C0 2014-03-25 [revoked: 2014-03-25]
- // sub 1024R/1BA3CD60 2014-03-25 [revoked: 2014-03-25]
- ids := []uint64{0xA401D9F09A34F7C0, 0x5CD3BE0A1BA3CD60}
-
- for _, id := range ids {
- keys := kring.KeysById(id)
- if len(keys) != 1 {
- t.Errorf("Expected KeysById to find revoked key %X, but got %d matches", id, len(keys))
- }
- keys = kring.KeysByIdUsage(id, 0)
- if len(keys) != 0 {
- t.Errorf("Expected KeysByIdUsage to filter out revoked key %X, but got %d matches", id, len(keys))
- }
- }
-}
-
-func TestSubkeyRevocation(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(revokedSubkeyHex))
- if err != nil {
- t.Fatal(err)
- }
-
- // revokedSubkeyHex contains these keys:
- // pub 1024R/4EF7E4BECCDE97F0 2014-03-25
- // sub 1024R/D63636E2B96AE423 2014-03-25
- // sub 1024D/DBCE4EE19529437F 2014-03-25
- // sub 1024R/677815E371C2FD23 2014-03-25 [revoked: 2014-03-25]
- validKeys := []uint64{0x4EF7E4BECCDE97F0, 0xD63636E2B96AE423, 0xDBCE4EE19529437F}
- revokedKey := uint64(0x677815E371C2FD23)
-
- for _, id := range validKeys {
- keys := kring.KeysById(id)
- if len(keys) != 1 {
- t.Errorf("Expected KeysById to find key %X, but got %d matches", id, len(keys))
- }
- keys = kring.KeysByIdUsage(id, 0)
- if len(keys) != 1 {
- t.Errorf("Expected KeysByIdUsage to find key %X, but got %d matches", id, len(keys))
- }
- }
-
- keys := kring.KeysById(revokedKey)
- if len(keys) != 1 {
- t.Errorf("Expected KeysById to find key %X, but got %d matches", revokedKey, len(keys))
- }
-
- keys = kring.KeysByIdUsage(revokedKey, 0)
- if len(keys) != 0 {
- t.Errorf("Expected KeysByIdUsage to filter out revoked key %X, but got %d matches", revokedKey, len(keys))
- }
-}
-
-func TestKeyUsage(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex))
- if err != nil {
- t.Fatal(err)
- }
-
- // subkeyUsageHex contains these keys:
- // pub 1024R/2866382A created: 2014-04-01 expires: never usage: SC
- // sub 1024R/936C9153 created: 2014-04-01 expires: never usage: E
- // sub 1024R/64D5F5BB created: 2014-04-02 expires: never usage: E
- // sub 1024D/BC0BA992 created: 2014-04-02 expires: never usage: S
- certifiers := []uint64{0xA42704B92866382A}
- signers := []uint64{0xA42704B92866382A, 0x42CE2C64BC0BA992}
- encrypters := []uint64{0x09C0C7D9936C9153, 0xC104E98664D5F5BB}
-
- for _, id := range certifiers {
- keys := kring.KeysByIdUsage(id, packet.KeyFlagCertify)
- if len(keys) == 1 {
- if keys[0].PublicKey.KeyId != id {
- t.Errorf("Expected to find certifier key id %X, but got %X", id, keys[0].PublicKey.KeyId)
- }
- } else {
- t.Errorf("Expected one match for certifier key id %X, but got %d matches", id, len(keys))
- }
- }
-
- for _, id := range signers {
- keys := kring.KeysByIdUsage(id, packet.KeyFlagSign)
- if len(keys) == 1 {
- if keys[0].PublicKey.KeyId != id {
- t.Errorf("Expected to find signing key id %X, but got %X", id, keys[0].PublicKey.KeyId)
- }
- } else {
- t.Errorf("Expected one match for signing key id %X, but got %d matches", id, len(keys))
- }
-
- // This keyring contains no encryption keys that are also good for signing.
- keys = kring.KeysByIdUsage(id, packet.KeyFlagEncryptStorage|packet.KeyFlagEncryptCommunications)
- if len(keys) != 0 {
- t.Errorf("Unexpected match for encryption key id %X", id)
- }
- }
-
- for _, id := range encrypters {
- keys := kring.KeysByIdUsage(id, packet.KeyFlagEncryptStorage|packet.KeyFlagEncryptCommunications)
- if len(keys) == 1 {
- if keys[0].PublicKey.KeyId != id {
- t.Errorf("Expected to find encryption key id %X, but got %X", id, keys[0].PublicKey.KeyId)
- }
- } else {
- t.Errorf("Expected one match for encryption key id %X, but got %d matches", id, len(keys))
- }
-
- // This keyring contains no encryption keys that are also good for signing.
- keys = kring.KeysByIdUsage(id, packet.KeyFlagSign)
- if len(keys) != 0 {
- t.Errorf("Unexpected match for signing key id %X", id)
- }
- }
-}
-
-func TestIdVerification(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
- if err != nil {
- t.Fatal(err)
- }
- if err := kring[1].PrivateKey.Decrypt([]byte("passphrase")); err != nil {
- t.Fatal(err)
- }
-
- const identity = "Test Key 1 (RSA)"
- if err := kring[0].SignIdentity(identity, kring[1], nil); err != nil {
- t.Fatal(err)
- }
-
- ident, ok := kring[0].Identities[identity]
- if !ok {
- t.Fatal("identity missing from key after signing")
- }
-
- checked := false
- for _, sig := range ident.Signatures {
- if sig.IssuerKeyId == nil || *sig.IssuerKeyId != kring[1].PrimaryKey.KeyId {
- continue
- }
-
- if err := kring[1].PrimaryKey.VerifyUserIdSignature(identity, kring[0].PrimaryKey, sig); err != nil {
- t.Fatalf("error verifying new identity signature: %s", err)
- }
- checked = true
- break
- }
-
- if !checked {
- t.Fatal("didn't find identity signature in Entity")
- }
-}
-
-func TestNewEntityWithPreferredHash(t *testing.T) {
- c := &packet.Config{
- DefaultHash: crypto.SHA256,
- }
- entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", c)
- if err != nil {
- t.Fatal(err)
- }
-
- for _, identity := range entity.Identities {
- if len(identity.SelfSignature.PreferredHash) == 0 {
- t.Fatal("didn't find a preferred hash in self signature")
- }
- ph := hashToHashId(c.DefaultHash)
- if identity.SelfSignature.PreferredHash[0] != ph {
- t.Fatalf("Expected preferred hash to be %d, got %d", ph, identity.SelfSignature.PreferredHash[0])
- }
- }
-}
-
-func TestNewEntityWithoutPreferredHash(t *testing.T) {
- entity, err := NewEntity("Golang Gopher", "Test Key", "no-reply@golang.com", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- for _, identity := range entity.Identities {
- if len(identity.SelfSignature.PreferredHash) != 0 {
- t.Fatalf("Expected preferred hash to be empty but got length %d", len(identity.SelfSignature.PreferredHash))
- }
- }
-}
-
-const expiringKeyHex = "988d0451d1ec5d010400ba3385721f2dc3f4ab096b2ee867ab77213f0a27a8538441c35d2fa225b08798a1439a66a5150e6bdc3f40f5d28d588c712394c632b6299f77db8c0d48d37903fb72ebd794d61be6aa774688839e5fdecfe06b2684cc115d240c98c66cb1ef22ae84e3aa0c2b0c28665c1e7d4d044e7f270706193f5223c8d44e0d70b7b8da830011010001b40f4578706972792074657374206b657988be041301020028050251d1ec5d021b03050900278d00060b090807030206150802090a0b0416020301021e01021780000a091072589ad75e237d8c033503fd10506d72837834eb7f994117740723adc39227104b0d326a1161871c0b415d25b4aedef946ca77ea4c05af9c22b32cf98be86ab890111fced1ee3f75e87b7cc3c00dc63bbc85dfab91c0dc2ad9de2c4d13a34659333a85c6acc1a669c5e1d6cecb0cf1e56c10e72d855ae177ddc9e766f9b2dda57ccbb75f57156438bbdb4e42b88d0451d1ec5d0104009c64906559866c5cb61578f5846a94fcee142a489c9b41e67b12bb54cfe86eb9bc8566460f9a720cb00d6526fbccfd4f552071a8e3f7744b1882d01036d811ee5a3fb91a1c568055758f43ba5d2c6a9676b012f3a1a89e47bbf624f1ad571b208f3cc6224eb378f1645dd3d47584463f9eadeacfd1ce6f813064fbfdcc4b5a53001101000188a504180102000f021b0c050251d1f06b050900093e89000a091072589ad75e237d8c20e00400ab8310a41461425b37889c4da28129b5fae6084fafbc0a47dd1adc74a264c6e9c9cc125f40462ee1433072a58384daef88c961c390ed06426a81b464a53194c4e291ddd7e2e2ba3efced01537d713bd111f48437bde2363446200995e8e0d4e528dda377fd1e8f8ede9c8e2198b393bd86852ce7457a7e3daf74d510461a5b77b88d0451d1ece8010400b3a519f83ab0010307e83bca895170acce8964a044190a2b368892f7a244758d9fc193482648acb1fb9780d28cc22d171931f38bb40279389fc9bf2110876d4f3db4fcfb13f22f7083877fe56592b3b65251312c36f83ffcb6d313c6a17f197dd471f0712aad15a8537b435a92471ba2e5b0c72a6c72536c3b567c558d7b6051001101000188a504180102000f021b0c050251d1f07b050900279091000a091072589ad75e237d8ce69e03fe286026afacf7c97ee20673864d4459a2240b5655219950643c7dba0ac384b1d4359c67805b21d98211f7b09c2a0ccf6410c8c04d4ff4a51293725d8d6570d9d8bb0e10c07d22357caeb49626df99c180be02d77d1fe8ed25e7a54481237646083a9f89a11566cd20b9e995b1487c5f9e02aeb434f3a1897cd416dd0a87861838da3e9e"
-const subkeyUsageHex = "988d04533a52bc010400d26af43085558f65b9e7dbc90cb9238015259aed5e954637adcfa2181548b2d0b60c65f1f42ec5081cbf1bc0a8aa4900acfb77070837c58f26012fbce297d70afe96e759ad63531f0037538e70dbf8e384569b9720d99d8eb39d8d0a2947233ed242436cb6ac7dfe74123354b3d0119b5c235d3dd9c9d6c004f8ffaf67ad8583001101000188b7041f010200210502533b8552170c8001ce094aa433f7040bb2ddf0be3893cb843d0fe70c020700000a0910a42704b92866382aa98404009d63d916a27543da4221c60087c33f1c44bec9998c5438018ed370cca4962876c748e94b73eb39c58eb698063f3fd6346d58dd2a11c0247934c4a9d71f24754f7468f96fb24c3e791dd2392b62f626148ad724189498cbf993db2df7c0cdc2d677c35da0f16cb16c9ce7c33b4de65a4a91b1d21a130ae9cc26067718910ef8e2b417556d627261203c756d627261407379642e65642e61753e88b80413010200220502533a52bc021b03060b090807030206150802090a0b0416020301021e01021780000a0910a42704b92866382a47840400c0c2bd04f5fca586de408b395b3c280a278259c93eaaa8b79a53b97003f8ed502a8a00446dd9947fb462677e4fcac0dac2f0701847d15130aadb6cd9e0705ea0cf5f92f129136c7be21a718d46c8e641eb7f044f2adae573e11ae423a0a9ca51324f03a8a2f34b91fa40c3cc764bee4dccadedb54c768ba0469b683ea53f1c29b88d04533a52bc01040099c92a5d6f8b744224da27bc2369127c35269b58bec179de6bbc038f749344222f85a31933224f26b70243c4e4b2d242f0c4777eaef7b5502f9dad6d8bf3aaeb471210674b74de2d7078af497d55f5cdad97c7bedfbc1b41e8065a97c9c3d344b21fc81d27723af8e374bc595da26ea242dccb6ae497be26eea57e563ed517e90011010001889f0418010200090502533a52bc021b0c000a0910a42704b92866382afa1403ff70284c2de8a043ff51d8d29772602fa98009b7861c540535f874f2c230af8caf5638151a636b21f8255003997ccd29747fdd06777bb24f9593bd7d98a3e887689bf902f999915fcc94625ae487e5d13e6616f89090ebc4fdc7eb5cad8943e4056995bb61c6af37f8043016876a958ec7ebf39c43d20d53b7f546cfa83e8d2604b88d04533b8283010400c0b529316dbdf58b4c54461e7e669dc11c09eb7f73819f178ccd4177b9182b91d138605fcf1e463262fabefa73f94a52b5e15d1904635541c7ea540f07050ce0fb51b73e6f88644cec86e91107c957a114f69554548a85295d2b70bd0b203992f76eb5d493d86d9eabcaa7ef3fc7db7e458438db3fcdb0ca1cc97c638439a9170011010001889f0418010200090502533b8283021b0c000a0910a42704b92866382adc6d0400cfff6258485a21675adb7a811c3e19ebca18851533f75a7ba317950b9997fda8d1a4c8c76505c08c04b6c2cc31dc704d33da36a21273f2b388a1a706f7c3378b66d887197a525936ed9a69acb57fe7f718133da85ec742001c5d1864e9c6c8ea1b94f1c3759cebfd93b18606066c063a63be86085b7e37bdbc65f9a915bf084bb901a204533b85cd110400aed3d2c52af2b38b5b67904b0ef73d6dd7aef86adb770e2b153cd22489654dcc91730892087bb9856ae2d9f7ed1eb48f214243fe86bfe87b349ebd7c30e630e49c07b21fdabf78b7a95c8b7f969e97e3d33f2e074c63552ba64a2ded7badc05ce0ea2be6d53485f6900c7860c7aa76560376ce963d7271b9b54638a4028b573f00a0d8854bfcdb04986141568046202192263b9b67350400aaa1049dbc7943141ef590a70dcb028d730371d92ea4863de715f7f0f16d168bd3dc266c2450457d46dcbbf0b071547e5fbee7700a820c3750b236335d8d5848adb3c0da010e998908dfd93d961480084f3aea20b247034f8988eccb5546efaa35a92d0451df3aaf1aee5aa36a4c4d462c760ecd9cebcabfbe1412b1f21450f203fd126687cd486496e971a87fd9e1a8a765fe654baa219a6871ab97768596ab05c26c1aeea8f1a2c72395a58dbc12ef9640d2b95784e974a4d2d5a9b17c25fedacfe551bda52602de8f6d2e48443f5dd1a2a2a8e6a5e70ecdb88cd6e766ad9745c7ee91d78cc55c3d06536b49c3fee6c3d0b6ff0fb2bf13a314f57c953b8f4d93bf88e70418010200090502533b85cd021b0200520910a42704b92866382a47200419110200060502533b85cd000a091042ce2c64bc0ba99214b2009e26b26852c8b13b10c35768e40e78fbbb48bd084100a0c79d9ea0844fa5853dd3c85ff3ecae6f2c9dd6c557aa04008bbbc964cd65b9b8299d4ebf31f41cc7264b8cf33a00e82c5af022331fac79efc9563a822497ba012953cefe2629f1242fcdcb911dbb2315985bab060bfd58261ace3c654bdbbe2e8ed27a46e836490145c86dc7bae15c011f7e1ffc33730109b9338cd9f483e7cef3d2f396aab5bd80efb6646d7e778270ee99d934d187dd98"
-const revokedKeyHex = "988d045331ce82010400c4fdf7b40a5477f206e6ee278eaef888ca73bf9128a9eef9f2f1ddb8b7b71a4c07cfa241f028a04edb405e4d916c61d6beabc333813dc7b484d2b3c52ee233c6a79b1eea4e9cc51596ba9cd5ac5aeb9df62d86ea051055b79d03f8a4fa9f38386f5bd17529138f3325d46801514ea9047977e0829ed728e68636802796801be10011010001889f04200102000905025331d0e3021d03000a0910a401d9f09a34f7c042aa040086631196405b7e6af71026b88e98012eab44aa9849f6ef3fa930c7c9f23deaedba9db1538830f8652fb7648ec3fcade8dbcbf9eaf428e83c6cbcc272201bfe2fbb90d41963397a7c0637a1a9d9448ce695d9790db2dc95433ad7be19eb3de72dacf1d6db82c3644c13eae2a3d072b99bb341debba012c5ce4006a7d34a1f4b94b444526567205265766f6b657220283c52656727732022424d204261726973746122204b657920262530305c303e5c29203c72656740626d626172697374612e636f2e61753e88b704130102002205025331ce82021b03060b090807030206150802090a0b0416020301021e01021780000a0910a401d9f09a34f7c0019c03f75edfbeb6a73e7225ad3cc52724e2872e04260d7daf0d693c170d8c4b243b8767bc7785763533febc62ec2600c30603c433c095453ede59ff2fcabeb84ce32e0ed9d5cf15ffcbc816202b64370d4d77c1e9077d74e94a16fb4fa2e5bec23a56d7a73cf275f91691ae1801a976fcde09e981a2f6327ac27ea1fecf3185df0d56889c04100102000605025331cfb5000a0910fe9645554e8266b64b4303fc084075396674fb6f778d302ac07cef6bc0b5d07b66b2004c44aef711cbac79617ef06d836b4957522d8772dd94bf41a2f4ac8b1ee6d70c57503f837445a74765a076d07b829b8111fc2a918423ddb817ead7ca2a613ef0bfb9c6b3562aec6c3cf3c75ef3031d81d95f6563e4cdcc9960bcb386c5d757b104fcca5fe11fc709df884604101102000605025331cfe7000a09107b15a67f0b3ddc0317f6009e360beea58f29c1d963a22b962b80788c3fa6c84e009d148cfde6b351469b8eae91187eff07ad9d08fcaab88d045331ce820104009f25e20a42b904f3fa555530fe5c46737cf7bd076c35a2a0d22b11f7e0b61a69320b768f4a80fe13980ce380d1cfc4a0cd8fbe2d2e2ef85416668b77208baa65bf973fe8e500e78cc310d7c8705cdb34328bf80e24f0385fce5845c33bc7943cf6b11b02348a23da0bf6428e57c05135f2dc6bd7c1ce325d666d5a5fd2fd5e410011010001889f04180102000905025331ce82021b0c000a0910a401d9f09a34f7c0418003fe34feafcbeaef348a800a0d908a7a6809cc7304017d820f70f0474d5e23cb17e38b67dc6dca282c6ca00961f4ec9edf2738d0f087b1d81e4871ef08e1798010863afb4eac4c44a376cb343be929c5be66a78cfd4456ae9ec6a99d97f4e1c3ff3583351db2147a65c0acef5c003fb544ab3a2e2dc4d43646f58b811a6c3a369d1f"
-const revokedSubkeyHex = "988d04533121f6010400aefc803a3e4bb1a61c86e8a86d2726c6a43e0079e9f2713f1fa017e9854c83877f4aced8e331d675c67ea83ddab80aacbfa0b9040bb12d96f5a3d6be09455e2a76546cbd21677537db941cab710216b6d24ec277ee0bd65b910f416737ed120f6b93a9d3b306245c8cfd8394606fdb462e5cf43c551438d2864506c63367fc890011010001b41d416c696365203c616c69636540626d626172697374612e636f2e61753e88bb041301020025021b03060b090807030206150802090a0b0416020301021e01021780050253312798021901000a09104ef7e4beccde97f015a803ff5448437780f63263b0df8442a995e7f76c221351a51edd06f2063d8166cf3157aada4923dfc44aa0f2a6a4da5cf83b7fe722ba8ab416c976e77c6b5682e7f1069026673bd0de56ba06fd5d7a9f177607f277d9b55ff940a638c3e68525c67517e2b3d976899b93ca267f705b3e5efad7d61220e96b618a4497eab8d04403d23f8846041011020006050253312910000a09107b15a67f0b3ddc03d96e009f50b6365d86c4be5d5e9d0ea42d5e56f5794c617700a0ab274e19c2827780016d23417ce89e0a2c0d987d889c04100102000605025331cf7a000a0910a401d9f09a34f7c0ee970400aca292f213041c9f3b3fc49148cbda9d84afee6183c8dd6c5ff2600b29482db5fecd4303797be1ee6d544a20a858080fec43412061c9a71fae4039fd58013b4ae341273e6c66ad4c7cdd9e68245bedb260562e7b166f2461a1032f2b38c0e0e5715fb3d1656979e052b55ca827a76f872b78a9fdae64bc298170bfcebedc1271b41a416c696365203c616c696365407379646973702e6f722e61753e88b804130102002205025331278b021b03060b090807030206150802090a0b0416020301021e01021780000a09104ef7e4beccde97f06a7003fa03c3af68d272ebc1fa08aa72a03b02189c26496a2833d90450801c4e42c5b5f51ad96ce2d2c9cef4b7c02a6a2fcf1412d6a2d486098eb762f5010a201819c17fd2888aec8eda20c65a3b75744de7ee5cc8ac7bfc470cbe3cb982720405a27a3c6a8c229cfe36905f881b02ed5680f6a8f05866efb9d6c5844897e631deb949ca8846041011020006050253312910000a09107b15a67f0b3ddc0347bc009f7fa35db59147469eb6f2c5aaf6428accb138b22800a0caa2f5f0874bacc5909c652a57a31beda65eddd5889c04100102000605025331cf7a000a0910a401d9f09a34f7c0316403ff46f2a5c101256627f16384d34a38fb47a6c88ba60506843e532d91614339fccae5f884a5741e7582ffaf292ba38ee10a270a05f139bde3814b6a077e8cd2db0f105ebea2a83af70d385f13b507fac2ad93ff79d84950328bb86f3074745a8b7f9b64990fb142e2a12976e27e8d09a28dc5621f957ac49091116da410ac3cbde1b88d04533121f6010400cbd785b56905e4192e2fb62a720727d43c4fa487821203cf72138b884b78b701093243e1d8c92a0248a6c0203a5a88693da34af357499abacaf4b3309c640797d03093870a323b4b6f37865f6eaa2838148a67df4735d43a90ca87942554cdf1c4a751b1e75f9fd4ce4e97e278d6c1c7ed59d33441df7d084f3f02beb68896c70011010001889f0418010200090502533121f6021b0c000a09104ef7e4beccde97f0b98b03fc0a5ccf6a372995835a2f5da33b282a7d612c0ab2a97f59cf9fff73e9110981aac2858c41399afa29624a7fd8a0add11654e3d882c0fd199e161bdad65e5e2548f7b68a437ea64293db1246e3011cbb94dc1bcdeaf0f2539bd88ff16d95547144d97cead6a8c5927660a91e6db0d16eb36b7b49a3525b54d1644e65599b032b7eb901a204533127a0110400bd3edaa09eff9809c4edc2c2a0ebe52e53c50a19c1e49ab78e6167bf61473bb08f2050d78a5cbbc6ed66aff7b42cd503f16b4a0b99fa1609681fca9b7ce2bbb1a5b3864d6cdda4d7ef7849d156d534dea30fb0efb9e4cf8959a2b2ce623905882d5430b995a15c3b9fe92906086788b891002924f94abe139b42cbbfaaabe42f00a0b65dc1a1ad27d798adbcb5b5ad02d2688c89477b03ff4eebb6f7b15a73b96a96bed201c0e5e4ea27e4c6e2dd1005b94d4b90137a5b1cf5e01c6226c070c4cc999938101578877ee76d296b9aab8246d57049caacf489e80a3f40589cade790a020b1ac146d6f7a6241184b8c7fcde680eae3188f5dcbe846d7f7bdad34f6fcfca08413e19c1d5df83fc7c7c627d493492e009c2f52a80400a2fe82de87136fd2e8845888c4431b032ba29d9a29a804277e31002a8201fb8591a3e55c7a0d0881496caf8b9fb07544a5a4879291d0dc026a0ea9e5bd88eb4aa4947bbd694b25012e208a250d65ddc6f1eea59d3aed3b4ec15fcab85e2afaa23a40ab1ef9ce3e11e1bc1c34a0e758e7aa64deb8739276df0af7d4121f834a9b88e70418010200090502533127a0021b02005209104ef7e4beccde97f047200419110200060502533127a0000a0910dbce4ee19529437fe045009c0b32f5ead48ee8a7e98fac0dea3d3e6c0e2c552500a0ad71fadc5007cfaf842d9b7db3335a8cdad15d3d1a6404009b08e2c68fe8f3b45c1bb72a4b3278cdf3012aa0f229883ad74aa1f6000bb90b18301b2f85372ca5d6b9bf478d235b733b1b197d19ccca48e9daf8e890cb64546b4ce1b178faccfff07003c172a2d4f5ebaba9f57153955f3f61a9b80a4f5cb959908f8b211b03b7026a8a82fc612bfedd3794969bcf458c4ce92be215a1176ab88d045331d144010400a5063000c5aaf34953c1aa3bfc95045b3aab9882b9a8027fecfe2142dc6b47ba8aca667399990244d513dd0504716908c17d92c65e74219e004f7b83fc125e575dd58efec3ab6dd22e3580106998523dea42ec75bf9aa111734c82df54630bebdff20fe981cfc36c76f865eb1c2fb62c9e85bc3a6e5015a361a2eb1c8431578d0011010001889f04280102000905025331d433021d03000a09104ef7e4beccde97f02e5503ff5e0630d1b65291f4882b6d40a29da4616bb5088717d469fbcc3648b8276de04a04988b1f1b9f3e18f52265c1f8b6c85861691c1a6b8a3a25a1809a0b32ad330aec5667cb4262f4450649184e8113849b05e5ad06a316ea80c001e8e71838190339a6e48bbde30647bcf245134b9a97fa875c1d83a9862cae87ffd7e2c4ce3a1b89013d04180102000905025331d144021b0200a809104ef7e4beccde97f09d2004190102000605025331d144000a0910677815e371c2fd23522203fe22ab62b8e7a151383cea3edd3a12995693911426f8ccf125e1f6426388c0010f88d9ca7da2224aee8d1c12135998640c5e1813d55a93df472faae75bef858457248db41b4505827590aeccf6f9eb646da7f980655dd3050c6897feddddaca90676dee856d66db8923477d251712bb9b3186b4d0114daf7d6b59272b53218dd1da94a03ff64006fcbe71211e5daecd9961fba66cdb6de3f914882c58ba5beddeba7dcb950c1156d7fba18c19ea880dccc800eae335deec34e3b84ac75ffa24864f782f87815cda1c0f634b3dd2fa67cea30811d21723d21d9551fa12ccbcfa62b6d3a15d01307b99925707992556d50065505b090aadb8579083a20fe65bd2a270da9b011"
-const missingCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Charset: UTF-8
-
-mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY
-ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG
-zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54
-QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ
-QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo
-9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu
-Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/
-dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R
-JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL
-ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew
-RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW
-/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu
-yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAJcXQeP+NmuciE99YcJoffxv
-2gVLU4ZXBNHEaP0mgaJ1+tmMD089vUQAcyGRvw8jfsNsVZQIOAuRxY94aHQhIRHR
-bUzBN28ofo/AJJtfx62C15xt6fDKRV6HXYqAiygrHIpEoRLyiN69iScUsjIJeyFL
-C8wa72e8pSL6dkHoaV1N9ZH/xmrJ+k0vsgkQaAh9CzYufncDxcwkoP+aOlGtX1gP
-WwWoIbz0JwLEMPHBWvDDXQcQPQTYQyj+LGC9U6f9VZHN25E94subM1MjuT9OhN9Y
-MLfWaaIc5WyhLFyQKW2Upofn9wSFi8ubyBnv640Dfd0rVmaWv7LNTZpoZ/GbJAMA
-EQEAAYkBHwQYAQIACQUCU5ygeQIbAgAKCRDt1A0FCB6SP0zCB/sEzaVR38vpx+OQ
-MMynCBJrakiqDmUZv9xtplY7zsHSQjpd6xGflbU2n+iX99Q+nav0ETQZifNUEd4N
-1ljDGQejcTyKD6Pkg6wBL3x9/RJye7Zszazm4+toJXZ8xJ3800+BtaPoI39akYJm
-+ijzbskvN0v/j5GOFJwQO0pPRAFtdHqRs9Kf4YanxhedB4dIUblzlIJuKsxFit6N
-lgGRblagG3Vv2eBszbxzPbJjHCgVLR3RmrVezKOsZjr/2i7X+xLWIR0uD3IN1qOW
-CXQxLBizEEmSNVNxsp7KPGTLnqO3bPtqFirxS9PJLIMPTPLNBY7ZYuPNTMqVIUWF
-4artDmrG
-=7FfJ
------END PGP PUBLIC KEY BLOCK-----`
-
-const invalidCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY
-ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG
-zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54
-QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ
-QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo
-9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu
-Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/
-dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R
-JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL
-ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew
-RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW
-/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu
-yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAIINDqlj7X6jYKc6DjwrOkjQ
-UIRWbQQar0LwmNilehmt70g5DCL1SYm9q4LcgJJ2Nhxj0/5qqsYib50OSWMcKeEe
-iRXpXzv1ObpcQtI5ithp0gR53YPXBib80t3bUzomQ5UyZqAAHzMp3BKC54/vUrSK
-FeRaxDzNLrCeyI00+LHNUtwghAqHvdNcsIf8VRumK8oTm3RmDh0TyjASWYbrt9c8
-R1Um3zuoACOVy+mEIgIzsfHq0u7dwYwJB5+KeM7ZLx+HGIYdUYzHuUE1sLwVoELh
-+SHIGHI1HDicOjzqgajShuIjj5hZTyQySVprrsLKiXS6NEwHAP20+XjayJ/R3tEA
-EQEAAYkCPgQYAQIBKAUCU5ygeQIbAsBdIAQZAQIABgUCU5ygeQAKCRCpVlnFZmhO
-52RJB/9uD1MSa0wjY6tHOIgquZcP3bHBvHmrHNMw9HR2wRCMO91ZkhrpdS3ZHtgb
-u3/55etj0FdvDo1tb8P8FGSVtO5Vcwf5APM8sbbqoi8L951Q3i7qt847lfhu6sMl
-w0LWFvPTOLHrliZHItPRjOltS1WAWfr2jUYhsU9ytaDAJmvf9DujxEOsN5G1YJep
-54JCKVCkM/y585Zcnn+yxk/XwqoNQ0/iJUT9qRrZWvoeasxhl1PQcwihCwss44A+
-YXaAt3hbk+6LEQuZoYS73yR3WHj+42tfm7YxRGeubXfgCEz/brETEWXMh4pe0vCL
-bfWrmfSPq2rDegYcAybxRQz0lF8PAAoJEO3UDQUIHpI/exkH/0vQfdHA8g/N4T6E
-i6b1CUVBAkvtdJpCATZjWPhXmShOw62gkDw306vHPilL4SCvEEi4KzG72zkp6VsB
-DSRcpxCwT4mHue+duiy53/aRMtSJ+vDfiV1Vhq+3sWAck/yUtfDU9/u4eFaiNok1
-8/Gd7reyuZt5CiJnpdPpjCwelK21l2w7sHAnJF55ITXdOxI8oG3BRKufz0z5lyDY
-s2tXYmhhQIggdgelN8LbcMhWs/PBbtUr6uZlNJG2lW1yscD4aI529VjwJlCeo745
-U7pO4eF05VViUJ2mmfoivL3tkhoTUWhx8xs8xCUcCg8DoEoSIhxtOmoTPR22Z9BL
-6LCg2mg=
-=Dhm4
------END PGP PUBLIC KEY BLOCK-----`
-
-const goodCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1
-
-mI0EVUqeVwEEAMufHRrMPWK3gyvi0O0tABCs/oON9zV9KDZlr1a1M91ShCSFwCPo
-7r80PxdWVWcj0V5h50/CJYtpN3eE/mUIgW2z1uDYQF1OzrQ8ubrksfsJvpAhENom
-lTQEppv9mV8qhcM278teb7TX0pgrUHLYF5CfPdp1L957JLLXoQR/lwLVABEBAAG0
-E2dvb2Qtc2lnbmluZy1zdWJrZXmIuAQTAQIAIgUCVUqeVwIbAwYLCQgHAwIGFQgC
-CQoLBBYCAwECHgECF4AACgkQNRjL95IRWP69XQQAlH6+eyXJN4DZTLX78KGjHrsw
-6FCvxxClEPtPUjcJy/1KCRQmtLAt9PbbA78dvgzjDeZMZqRAwdjyJhjyg/fkU2OH
-7wq4ktjUu+dLcOBb+BFMEY+YjKZhf6EJuVfxoTVr5f82XNPbYHfTho9/OABKH6kv
-X70PaKZhbwnwij8Nts65AaIEVUqftREEAJ3WxZfqAX0bTDbQPf2CMT2IVMGDfhK7
-GyubOZgDFFjwUJQvHNvsrbeGLZ0xOBumLINyPO1amIfTgJNm1iiWFWfmnHReGcDl
-y5mpYG60Mb79Whdcer7CMm3AqYh/dW4g6IB02NwZMKoUHo3PXmFLxMKXnWyJ0clw
-R0LI/Qn509yXAKDh1SO20rqrBM+EAP2c5bfI98kyNwQAi3buu94qo3RR1ZbvfxgW
-CKXDVm6N99jdZGNK7FbRifXqzJJDLcXZKLnstnC4Sd3uyfyf1uFhmDLIQRryn5m+
-LBYHfDBPN3kdm7bsZDDq9GbTHiFZUfm/tChVKXWxkhpAmHhU/tH6GGzNSMXuIWSO
-aOz3Rqq0ED4NXyNKjdF9MiwD/i83S0ZBc0LmJYt4Z10jtH2B6tYdqnAK29uQaadx
-yZCX2scE09UIm32/w7pV77CKr1Cp/4OzAXS1tmFzQ+bX7DR+Gl8t4wxr57VeEMvl
-BGw4Vjh3X8//m3xynxycQU18Q1zJ6PkiMyPw2owZ/nss3hpSRKFJsxMLhW3fKmKr
-Ey2KiOcEGAECAAkFAlVKn7UCGwIAUgkQNRjL95IRWP5HIAQZEQIABgUCVUqftQAK
-CRD98VjDN10SqkWrAKDTpEY8D8HC02E/KVC5YUI01B30wgCgurpILm20kXEDCeHp
-C5pygfXw1DJrhAP+NyPJ4um/bU1I+rXaHHJYroYJs8YSweiNcwiHDQn0Engh/mVZ
-SqLHvbKh2dL/RXymC3+rjPvQf5cup9bPxNMa6WagdYBNAfzWGtkVISeaQW+cTEp/
-MtgVijRGXR/lGLGETPg2X3Afwn9N9bLMBkBprKgbBqU7lpaoPupxT61bL70=
-=vtbN
------END PGP PUBLIC KEY BLOCK-----`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed.go
deleted file mode 100644
index e8f0b5caa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "compress/bzip2"
- "compress/flate"
- "compress/zlib"
- "golang.org/x/crypto/openpgp/errors"
- "io"
- "strconv"
-)
-
-// Compressed represents a compressed OpenPGP packet. The decompressed contents
-// will contain more OpenPGP packets. See RFC 4880, section 5.6.
-type Compressed struct {
- Body io.Reader
-}
-
-const (
- NoCompression = flate.NoCompression
- BestSpeed = flate.BestSpeed
- BestCompression = flate.BestCompression
- DefaultCompression = flate.DefaultCompression
-)
-
-// CompressionConfig contains compressor configuration settings.
-type CompressionConfig struct {
- // Level is the compression level to use. It must be set to
- // between -1 and 9, with -1 causing the compressor to use the
- // default compression level, 0 causing the compressor to use
- // no compression and 1 to 9 representing increasing (better,
- // slower) compression levels. If Level is less than -1 or
- // more then 9, a non-nil error will be returned during
- // encryption. See the constants above for convenient common
- // settings for Level.
- Level int
-}
-
-func (c *Compressed) parse(r io.Reader) error {
- var buf [1]byte
- _, err := readFull(r, buf[:])
- if err != nil {
- return err
- }
-
- switch buf[0] {
- case 1:
- c.Body = flate.NewReader(r)
- case 2:
- c.Body, err = zlib.NewReader(r)
- case 3:
- c.Body = bzip2.NewReader(r)
- default:
- err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0])))
- }
-
- return err
-}
-
-// compressedWriterCloser represents the serialized compression stream
-// header and the compressor. Its Close() method ensures that both the
-// compressor and serialized stream header are closed. Its Write()
-// method writes to the compressor.
-type compressedWriteCloser struct {
- sh io.Closer // Stream Header
- c io.WriteCloser // Compressor
-}
-
-func (cwc compressedWriteCloser) Write(p []byte) (int, error) {
- return cwc.c.Write(p)
-}
-
-func (cwc compressedWriteCloser) Close() (err error) {
- err = cwc.c.Close()
- if err != nil {
- return err
- }
-
- return cwc.sh.Close()
-}
-
-// SerializeCompressed serializes a compressed data packet to w and
-// returns a WriteCloser to which the literal data packets themselves
-// can be written and which MUST be closed on completion. If cc is
-// nil, sensible defaults will be used to configure the compression
-// algorithm.
-func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) {
- compressed, err := serializeStreamHeader(w, packetTypeCompressed)
- if err != nil {
- return
- }
-
- _, err = compressed.Write([]byte{uint8(algo)})
- if err != nil {
- return
- }
-
- level := DefaultCompression
- if cc != nil {
- level = cc.Level
- }
-
- var compressor io.WriteCloser
- switch algo {
- case CompressionZIP:
- compressor, err = flate.NewWriter(compressed, level)
- case CompressionZLIB:
- compressor, err = zlib.NewWriterLevel(compressed, level)
- default:
- s := strconv.Itoa(int(algo))
- err = errors.UnsupportedError("Unsupported compression algorithm: " + s)
- }
- if err != nil {
- return
- }
-
- literaldata = compressedWriteCloser{compressed, compressor}
-
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed_test.go
deleted file mode 100644
index cb2d70bd4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/compressed_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "io"
- "io/ioutil"
- "testing"
-)
-
-func TestCompressed(t *testing.T) {
- packet, err := Read(readerFromHex(compressedHex))
- if err != nil {
- t.Errorf("failed to read Compressed: %s", err)
- return
- }
-
- c, ok := packet.(*Compressed)
- if !ok {
- t.Error("didn't find Compressed packet")
- return
- }
-
- contents, err := ioutil.ReadAll(c.Body)
- if err != nil && err != io.EOF {
- t.Error(err)
- return
- }
-
- expected, _ := hex.DecodeString(compressedExpectedHex)
- if !bytes.Equal(expected, contents) {
- t.Errorf("got:%x want:%x", contents, expected)
- }
-}
-
-const compressedHex = "a3013b2d90c4e02b72e25f727e5e496a5e49b11e1700"
-const compressedExpectedHex = "cb1062004d14c8fe636f6e74656e74732e0a"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/config.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/config.go
deleted file mode 100644
index c76eecc96..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/config.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2012 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 file.
-
-package packet
-
-import (
- "crypto"
- "crypto/rand"
- "io"
- "time"
-)
-
-// Config collects a number of parameters along with sensible defaults.
-// A nil *Config is valid and results in all default values.
-type Config struct {
- // Rand provides the source of entropy.
- // If nil, the crypto/rand Reader is used.
- Rand io.Reader
- // DefaultHash is the default hash function to be used.
- // If zero, SHA-256 is used.
- DefaultHash crypto.Hash
- // DefaultCipher is the cipher to be used.
- // If zero, AES-128 is used.
- DefaultCipher CipherFunction
- // Time returns the current time as the number of seconds since the
- // epoch. If Time is nil, time.Now is used.
- Time func() time.Time
- // DefaultCompressionAlgo is the compression algorithm to be
- // applied to the plaintext before encryption. If zero, no
- // compression is done.
- DefaultCompressionAlgo CompressionAlgo
- // CompressionConfig configures the compression settings.
- CompressionConfig *CompressionConfig
- // S2KCount is only used for symmetric encryption. It
- // determines the strength of the passphrase stretching when
- // the said passphrase is hashed to produce a key. S2KCount
- // should be between 1024 and 65011712, inclusive. If Config
- // is nil or S2KCount is 0, the value 65536 used. Not all
- // values in the above range can be represented. S2KCount will
- // be rounded up to the next representable value if it cannot
- // be encoded exactly. When set, it is strongly encrouraged to
- // use a value that is at least 65536. See RFC 4880 Section
- // 3.7.1.3.
- S2KCount int
- // RSABits is the number of bits in new RSA keys made with NewEntity.
- // If zero, then 2048 bit keys are created.
- RSABits int
-}
-
-func (c *Config) Random() io.Reader {
- if c == nil || c.Rand == nil {
- return rand.Reader
- }
- return c.Rand
-}
-
-func (c *Config) Hash() crypto.Hash {
- if c == nil || uint(c.DefaultHash) == 0 {
- return crypto.SHA256
- }
- return c.DefaultHash
-}
-
-func (c *Config) Cipher() CipherFunction {
- if c == nil || uint8(c.DefaultCipher) == 0 {
- return CipherAES128
- }
- return c.DefaultCipher
-}
-
-func (c *Config) Now() time.Time {
- if c == nil || c.Time == nil {
- return time.Now()
- }
- return c.Time()
-}
-
-func (c *Config) Compression() CompressionAlgo {
- if c == nil {
- return CompressionNone
- }
- return c.DefaultCompressionAlgo
-}
-
-func (c *Config) PasswordHashIterations() int {
- if c == nil || c.S2KCount == 0 {
- return 0
- }
- return c.S2KCount
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go
deleted file mode 100644
index 266840d05..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "crypto/rsa"
- "encoding/binary"
- "io"
- "math/big"
- "strconv"
-
- "golang.org/x/crypto/openpgp/elgamal"
- "golang.org/x/crypto/openpgp/errors"
-)
-
-const encryptedKeyVersion = 3
-
-// EncryptedKey represents a public-key encrypted session key. See RFC 4880,
-// section 5.1.
-type EncryptedKey struct {
- KeyId uint64
- Algo PublicKeyAlgorithm
- CipherFunc CipherFunction // only valid after a successful Decrypt
- Key []byte // only valid after a successful Decrypt
-
- encryptedMPI1, encryptedMPI2 parsedMPI
-}
-
-func (e *EncryptedKey) parse(r io.Reader) (err error) {
- var buf [10]byte
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- if buf[0] != encryptedKeyVersion {
- return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0])))
- }
- e.KeyId = binary.BigEndian.Uint64(buf[1:9])
- e.Algo = PublicKeyAlgorithm(buf[9])
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r)
- case PubKeyAlgoElGamal:
- e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- e.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r)
- }
- _, err = consumeAll(r)
- return
-}
-
-func checksumKeyMaterial(key []byte) uint16 {
- var checksum uint16
- for _, v := range key {
- checksum += uint16(v)
- }
- return checksum
-}
-
-// Decrypt decrypts an encrypted session key with the given private key. The
-// private key must have been decrypted first.
-// If config is nil, sensible defaults will be used.
-func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error {
- var err error
- var b []byte
-
- // TODO(agl): use session key decryption routines here to avoid
- // padding oracle attacks.
- switch priv.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- b, err = rsa.DecryptPKCS1v15(config.Random(), priv.PrivateKey.(*rsa.PrivateKey), e.encryptedMPI1.bytes)
- case PubKeyAlgoElGamal:
- c1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes)
- c2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes)
- b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2)
- default:
- err = errors.InvalidArgumentError("cannot decrypted encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo)))
- }
-
- if err != nil {
- return err
- }
-
- e.CipherFunc = CipherFunction(b[0])
- e.Key = b[1 : len(b)-2]
- expectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1])
- checksum := checksumKeyMaterial(e.Key)
- if checksum != expectedChecksum {
- return errors.StructuralError("EncryptedKey checksum incorrect")
- }
-
- return nil
-}
-
-// Serialize writes the encrypted key packet, e, to w.
-func (e *EncryptedKey) Serialize(w io.Writer) error {
- var mpiLen int
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- mpiLen = 2 + len(e.encryptedMPI1.bytes)
- case PubKeyAlgoElGamal:
- mpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes)
- default:
- return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo)))
- }
-
- serializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen)
-
- w.Write([]byte{encryptedKeyVersion})
- binary.Write(w, binary.BigEndian, e.KeyId)
- w.Write([]byte{byte(e.Algo)})
-
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- writeMPIs(w, e.encryptedMPI1)
- case PubKeyAlgoElGamal:
- writeMPIs(w, e.encryptedMPI1, e.encryptedMPI2)
- default:
- panic("internal error")
- }
-
- return nil
-}
-
-// SerializeEncryptedKey serializes an encrypted key packet to w that contains
-// key, encrypted to pub.
-// If config is nil, sensible defaults will be used.
-func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error {
- var buf [10]byte
- buf[0] = encryptedKeyVersion
- binary.BigEndian.PutUint64(buf[1:9], pub.KeyId)
- buf[9] = byte(pub.PubKeyAlgo)
-
- keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */)
- keyBlock[0] = byte(cipherFunc)
- copy(keyBlock[1:], key)
- checksum := checksumKeyMaterial(key)
- keyBlock[1+len(key)] = byte(checksum >> 8)
- keyBlock[1+len(key)+1] = byte(checksum)
-
- switch pub.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- return serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock)
- case PubKeyAlgoElGamal:
- return serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock)
- case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly:
- return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
- }
-
- return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
-}
-
-func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error {
- cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("RSA encryption failed: " + err.Error())
- }
-
- packetLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText)
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- return writeMPI(w, 8*uint16(len(cipherText)), cipherText)
-}
-
-func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error {
- c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error())
- }
-
- packetLen := 10 /* header length */
- packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8
- packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- err = writeBig(w, c1)
- if err != nil {
- return err
- }
- return writeBig(w, c2)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key_test.go
deleted file mode 100644
index fee14cf3c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto/rsa"
- "encoding/hex"
- "fmt"
- "math/big"
- "testing"
-)
-
-func bigFromBase10(s string) *big.Int {
- b, ok := new(big.Int).SetString(s, 10)
- if !ok {
- panic("bigFromBase10 failed")
- }
- return b
-}
-
-var encryptedKeyPub = rsa.PublicKey{
- E: 65537,
- N: bigFromBase10("115804063926007623305902631768113868327816898845124614648849934718568541074358183759250136204762053879858102352159854352727097033322663029387610959884180306668628526686121021235757016368038585212410610742029286439607686208110250133174279811431933746643015923132833417396844716207301518956640020862630546868823"),
-}
-
-var encryptedKeyRSAPriv = &rsa.PrivateKey{
- PublicKey: encryptedKeyPub,
- D: bigFromBase10("32355588668219869544751561565313228297765464314098552250409557267371233892496951383426602439009993875125222579159850054973310859166139474359774543943714622292329487391199285040721944491839695981199720170366763547754915493640685849961780092241140181198779299712578774460837139360803883139311171713302987058393"),
-}
-
-var encryptedKeyPriv = &PrivateKey{
- PublicKey: PublicKey{
- PubKeyAlgo: PubKeyAlgoRSA,
- },
- PrivateKey: encryptedKeyRSAPriv,
-}
-
-func TestDecryptingEncryptedKey(t *testing.T) {
- const encryptedKeyHex = "c18c032a67d68660df41c70104005789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8"
- const expectedKeyHex = "d930363f7e0308c333b9618617ea728963d8df993665ae7be1092d4926fd864b"
-
- p, err := Read(readerFromHex(encryptedKeyHex))
- if err != nil {
- t.Errorf("error from Read: %s", err)
- return
- }
- ek, ok := p.(*EncryptedKey)
- if !ok {
- t.Errorf("didn't parse an EncryptedKey, got %#v", p)
- return
- }
-
- if ek.KeyId != 0x2a67d68660df41c7 || ek.Algo != PubKeyAlgoRSA {
- t.Errorf("unexpected EncryptedKey contents: %#v", ek)
- return
- }
-
- err = ek.Decrypt(encryptedKeyPriv, nil)
- if err != nil {
- t.Errorf("error from Decrypt: %s", err)
- return
- }
-
- if ek.CipherFunc != CipherAES256 {
- t.Errorf("unexpected EncryptedKey contents: %#v", ek)
- return
- }
-
- keyHex := fmt.Sprintf("%x", ek.Key)
- if keyHex != expectedKeyHex {
- t.Errorf("bad key, got %s want %x", keyHex, expectedKeyHex)
- }
-}
-
-func TestEncryptingEncryptedKey(t *testing.T) {
- key := []byte{1, 2, 3, 4}
- const expectedKeyHex = "01020304"
- const keyId = 42
-
- pub := &PublicKey{
- PublicKey: &encryptedKeyPub,
- KeyId: keyId,
- PubKeyAlgo: PubKeyAlgoRSAEncryptOnly,
- }
-
- buf := new(bytes.Buffer)
- err := SerializeEncryptedKey(buf, pub, CipherAES128, key, nil)
- if err != nil {
- t.Errorf("error writing encrypted key packet: %s", err)
- }
-
- p, err := Read(buf)
- if err != nil {
- t.Errorf("error from Read: %s", err)
- return
- }
- ek, ok := p.(*EncryptedKey)
- if !ok {
- t.Errorf("didn't parse an EncryptedKey, got %#v", p)
- return
- }
-
- if ek.KeyId != keyId || ek.Algo != PubKeyAlgoRSAEncryptOnly {
- t.Errorf("unexpected EncryptedKey contents: %#v", ek)
- return
- }
-
- err = ek.Decrypt(encryptedKeyPriv, nil)
- if err != nil {
- t.Errorf("error from Decrypt: %s", err)
- return
- }
-
- if ek.CipherFunc != CipherAES128 {
- t.Errorf("unexpected EncryptedKey contents: %#v", ek)
- return
- }
-
- keyHex := fmt.Sprintf("%x", ek.Key)
- if keyHex != expectedKeyHex {
- t.Errorf("bad key, got %s want %x", keyHex, expectedKeyHex)
- }
-}
-
-func TestSerializingEncryptedKey(t *testing.T) {
- const encryptedKeyHex = "c18c032a67d68660df41c70104005789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8"
-
- p, err := Read(readerFromHex(encryptedKeyHex))
- if err != nil {
- t.Fatalf("error from Read: %s", err)
- }
- ek, ok := p.(*EncryptedKey)
- if !ok {
- t.Fatalf("didn't parse an EncryptedKey, got %#v", p)
- }
-
- var buf bytes.Buffer
- ek.Serialize(&buf)
-
- if bufHex := hex.EncodeToString(buf.Bytes()); bufHex != encryptedKeyHex {
- t.Fatalf("serialization of encrypted key differed from original. Original was %s, but reserialized as %s", encryptedKeyHex, bufHex)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/literal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/literal.go
deleted file mode 100644
index 1a9ec6e51..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/literal.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "encoding/binary"
- "io"
-)
-
-// LiteralData represents an encrypted file. See RFC 4880, section 5.9.
-type LiteralData struct {
- IsBinary bool
- FileName string
- Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined.
- Body io.Reader
-}
-
-// ForEyesOnly returns whether the contents of the LiteralData have been marked
-// as especially sensitive.
-func (l *LiteralData) ForEyesOnly() bool {
- return l.FileName == "_CONSOLE"
-}
-
-func (l *LiteralData) parse(r io.Reader) (err error) {
- var buf [256]byte
-
- _, err = readFull(r, buf[:2])
- if err != nil {
- return
- }
-
- l.IsBinary = buf[0] == 'b'
- fileNameLen := int(buf[1])
-
- _, err = readFull(r, buf[:fileNameLen])
- if err != nil {
- return
- }
-
- l.FileName = string(buf[:fileNameLen])
-
- _, err = readFull(r, buf[:4])
- if err != nil {
- return
- }
-
- l.Time = binary.BigEndian.Uint32(buf[:4])
- l.Body = r
- return
-}
-
-// SerializeLiteral serializes a literal data packet to w and returns a
-// WriteCloser to which the data itself can be written and which MUST be closed
-// on completion. The fileName is truncated to 255 bytes.
-func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) {
- var buf [4]byte
- buf[0] = 't'
- if isBinary {
- buf[0] = 'b'
- }
- if len(fileName) > 255 {
- fileName = fileName[:255]
- }
- buf[1] = byte(len(fileName))
-
- inner, err := serializeStreamHeader(w, packetTypeLiteralData)
- if err != nil {
- return
- }
-
- _, err = inner.Write(buf[:2])
- if err != nil {
- return
- }
- _, err = inner.Write([]byte(fileName))
- if err != nil {
- return
- }
- binary.BigEndian.PutUint32(buf[:], time)
- _, err = inner.Write(buf[:])
- if err != nil {
- return
- }
-
- plaintext = inner
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go
deleted file mode 100644
index ce2a33a54..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2010 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 file.
-
-// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9
-
-package packet
-
-import (
- "crypto/cipher"
-)
-
-type ocfbEncrypter struct {
- b cipher.Block
- fre []byte
- outUsed int
-}
-
-// An OCFBResyncOption determines if the "resynchronization step" of OCFB is
-// performed.
-type OCFBResyncOption bool
-
-const (
- OCFBResync OCFBResyncOption = true
- OCFBNoResync OCFBResyncOption = false
-)
-
-// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's
-// cipher feedback mode using the given cipher.Block, and an initial amount of
-// ciphertext. randData must be random bytes and be the same length as the
-// cipher.Block's block size. Resync determines if the "resynchronization step"
-// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on
-// this point.
-func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) {
- blockSize := block.BlockSize()
- if len(randData) != blockSize {
- return nil, nil
- }
-
- x := &ocfbEncrypter{
- b: block,
- fre: make([]byte, blockSize),
- outUsed: 0,
- }
- prefix := make([]byte, blockSize+2)
-
- block.Encrypt(x.fre, x.fre)
- for i := 0; i < blockSize; i++ {
- prefix[i] = randData[i] ^ x.fre[i]
- }
-
- block.Encrypt(x.fre, prefix[:blockSize])
- prefix[blockSize] = x.fre[0] ^ randData[blockSize-2]
- prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1]
-
- if resync {
- block.Encrypt(x.fre, prefix[2:])
- } else {
- x.fre[0] = prefix[blockSize]
- x.fre[1] = prefix[blockSize+1]
- x.outUsed = 2
- }
- return x, prefix
-}
-
-func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) {
- for i := 0; i < len(src); i++ {
- if x.outUsed == len(x.fre) {
- x.b.Encrypt(x.fre, x.fre)
- x.outUsed = 0
- }
-
- x.fre[x.outUsed] ^= src[i]
- dst[i] = x.fre[x.outUsed]
- x.outUsed++
- }
-}
-
-type ocfbDecrypter struct {
- b cipher.Block
- fre []byte
- outUsed int
-}
-
-// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's
-// cipher feedback mode using the given cipher.Block. Prefix must be the first
-// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's
-// block size. If an incorrect key is detected then nil is returned. On
-// successful exit, blockSize+2 bytes of decrypted data are written into
-// prefix. Resync determines if the "resynchronization step" from RFC 4880,
-// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.
-func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream {
- blockSize := block.BlockSize()
- if len(prefix) != blockSize+2 {
- return nil
- }
-
- x := &ocfbDecrypter{
- b: block,
- fre: make([]byte, blockSize),
- outUsed: 0,
- }
- prefixCopy := make([]byte, len(prefix))
- copy(prefixCopy, prefix)
-
- block.Encrypt(x.fre, x.fre)
- for i := 0; i < blockSize; i++ {
- prefixCopy[i] ^= x.fre[i]
- }
-
- block.Encrypt(x.fre, prefix[:blockSize])
- prefixCopy[blockSize] ^= x.fre[0]
- prefixCopy[blockSize+1] ^= x.fre[1]
-
- if prefixCopy[blockSize-2] != prefixCopy[blockSize] ||
- prefixCopy[blockSize-1] != prefixCopy[blockSize+1] {
- return nil
- }
-
- if resync {
- block.Encrypt(x.fre, prefix[2:])
- } else {
- x.fre[0] = prefix[blockSize]
- x.fre[1] = prefix[blockSize+1]
- x.outUsed = 2
- }
- copy(prefix, prefixCopy)
- return x
-}
-
-func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) {
- for i := 0; i < len(src); i++ {
- if x.outUsed == len(x.fre) {
- x.b.Encrypt(x.fre, x.fre)
- x.outUsed = 0
- }
-
- c := src[i]
- dst[i] = x.fre[x.outUsed] ^ src[i]
- x.fre[x.outUsed] = c
- x.outUsed++
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb_test.go
deleted file mode 100644
index 91022c042..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/ocfb_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2010 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto/aes"
- "crypto/rand"
- "testing"
-)
-
-var commonKey128 = []byte{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c}
-
-func testOCFB(t *testing.T, resync OCFBResyncOption) {
- block, err := aes.NewCipher(commonKey128)
- if err != nil {
- t.Error(err)
- return
- }
-
- plaintext := []byte("this is the plaintext, which is long enough to span several blocks.")
- randData := make([]byte, block.BlockSize())
- rand.Reader.Read(randData)
- ocfb, prefix := NewOCFBEncrypter(block, randData, resync)
- ciphertext := make([]byte, len(plaintext))
- ocfb.XORKeyStream(ciphertext, plaintext)
-
- ocfbdec := NewOCFBDecrypter(block, prefix, resync)
- if ocfbdec == nil {
- t.Errorf("NewOCFBDecrypter failed (resync: %t)", resync)
- return
- }
- plaintextCopy := make([]byte, len(plaintext))
- ocfbdec.XORKeyStream(plaintextCopy, ciphertext)
-
- if !bytes.Equal(plaintextCopy, plaintext) {
- t.Errorf("got: %x, want: %x (resync: %t)", plaintextCopy, plaintext, resync)
- }
-}
-
-func TestOCFB(t *testing.T) {
- testOCFB(t, OCFBNoResync)
- testOCFB(t, OCFBResync)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go
deleted file mode 100644
index 171350339..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "crypto"
- "encoding/binary"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/s2k"
- "io"
- "strconv"
-)
-
-// OnePassSignature represents a one-pass signature packet. See RFC 4880,
-// section 5.4.
-type OnePassSignature struct {
- SigType SignatureType
- Hash crypto.Hash
- PubKeyAlgo PublicKeyAlgorithm
- KeyId uint64
- IsLast bool
-}
-
-const onePassSignatureVersion = 3
-
-func (ops *OnePassSignature) parse(r io.Reader) (err error) {
- var buf [13]byte
-
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- if buf[0] != onePassSignatureVersion {
- err = errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0])))
- }
-
- var ok bool
- ops.Hash, ok = s2k.HashIdToHash(buf[2])
- if !ok {
- return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2])))
- }
-
- ops.SigType = SignatureType(buf[1])
- ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3])
- ops.KeyId = binary.BigEndian.Uint64(buf[4:12])
- ops.IsLast = buf[12] != 0
- return
-}
-
-// Serialize marshals the given OnePassSignature to w.
-func (ops *OnePassSignature) Serialize(w io.Writer) error {
- var buf [13]byte
- buf[0] = onePassSignatureVersion
- buf[1] = uint8(ops.SigType)
- var ok bool
- buf[2], ok = s2k.HashToHashId(ops.Hash)
- if !ok {
- return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash)))
- }
- buf[3] = uint8(ops.PubKeyAlgo)
- binary.BigEndian.PutUint64(buf[4:12], ops.KeyId)
- if ops.IsLast {
- buf[12] = 1
- }
-
- if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil {
- return err
- }
- _, err := w.Write(buf[:])
- return err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque.go
deleted file mode 100644
index 456d807f2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright 2012 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 file.
-
-package packet
-
-import (
- "bytes"
- "io"
- "io/ioutil"
-
- "golang.org/x/crypto/openpgp/errors"
-)
-
-// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is
-// useful for splitting and storing the original packet contents separately,
-// handling unsupported packet types or accessing parts of the packet not yet
-// implemented by this package.
-type OpaquePacket struct {
- // Packet type
- Tag uint8
- // Reason why the packet was parsed opaquely
- Reason error
- // Binary contents of the packet data
- Contents []byte
-}
-
-func (op *OpaquePacket) parse(r io.Reader) (err error) {
- op.Contents, err = ioutil.ReadAll(r)
- return
-}
-
-// Serialize marshals the packet to a writer in its original form, including
-// the packet header.
-func (op *OpaquePacket) Serialize(w io.Writer) (err error) {
- err = serializeHeader(w, packetType(op.Tag), len(op.Contents))
- if err == nil {
- _, err = w.Write(op.Contents)
- }
- return
-}
-
-// Parse attempts to parse the opaque contents into a structure supported by
-// this package. If the packet is not known then the result will be another
-// OpaquePacket.
-func (op *OpaquePacket) Parse() (p Packet, err error) {
- hdr := bytes.NewBuffer(nil)
- err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents))
- if err != nil {
- op.Reason = err
- return op, err
- }
- p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents)))
- if err != nil {
- op.Reason = err
- p = op
- }
- return
-}
-
-// OpaqueReader reads OpaquePackets from an io.Reader.
-type OpaqueReader struct {
- r io.Reader
-}
-
-func NewOpaqueReader(r io.Reader) *OpaqueReader {
- return &OpaqueReader{r: r}
-}
-
-// Read the next OpaquePacket.
-func (or *OpaqueReader) Next() (op *OpaquePacket, err error) {
- tag, _, contents, err := readHeader(or.r)
- if err != nil {
- return
- }
- op = &OpaquePacket{Tag: uint8(tag), Reason: err}
- err = op.parse(contents)
- if err != nil {
- consumeAll(contents)
- }
- return
-}
-
-// OpaqueSubpacket represents an unparsed OpenPGP subpacket,
-// as found in signature and user attribute packets.
-type OpaqueSubpacket struct {
- SubType uint8
- Contents []byte
-}
-
-// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from
-// their byte representation.
-func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) {
- var (
- subHeaderLen int
- subPacket *OpaqueSubpacket
- )
- for len(contents) > 0 {
- subHeaderLen, subPacket, err = nextSubpacket(contents)
- if err != nil {
- break
- }
- result = append(result, subPacket)
- contents = contents[subHeaderLen+len(subPacket.Contents):]
- }
- return
-}
-
-func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) {
- // RFC 4880, section 5.2.3.1
- var subLen uint32
- if len(contents) < 1 {
- goto Truncated
- }
- subPacket = &OpaqueSubpacket{}
- switch {
- case contents[0] < 192:
- subHeaderLen = 2 // 1 length byte, 1 subtype byte
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- subLen = uint32(contents[0])
- contents = contents[1:]
- case contents[0] < 255:
- subHeaderLen = 3 // 2 length bytes, 1 subtype
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192
- contents = contents[2:]
- default:
- subHeaderLen = 6 // 5 length bytes, 1 subtype
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- subLen = uint32(contents[1])<<24 |
- uint32(contents[2])<<16 |
- uint32(contents[3])<<8 |
- uint32(contents[4])
- contents = contents[5:]
- }
- if subLen > uint32(len(contents)) || subLen == 0 {
- goto Truncated
- }
- subPacket.SubType = contents[0]
- subPacket.Contents = contents[1:subLen]
- return
-Truncated:
- err = errors.StructuralError("subpacket truncated")
- return
-}
-
-func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) {
- buf := make([]byte, 6)
- n := serializeSubpacketLength(buf, len(osp.Contents)+1)
- buf[n] = osp.SubType
- if _, err = w.Write(buf[:n+1]); err != nil {
- return
- }
- _, err = w.Write(osp.Contents)
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque_test.go
deleted file mode 100644
index f27bbfe09..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/opaque_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "io"
- "testing"
-)
-
-// Test packet.Read error handling in OpaquePacket.Parse,
-// which attempts to re-read an OpaquePacket as a supported
-// Packet type.
-func TestOpaqueParseReason(t *testing.T) {
- buf, err := hex.DecodeString(UnsupportedKeyHex)
- if err != nil {
- t.Fatal(err)
- }
- or := NewOpaqueReader(bytes.NewBuffer(buf))
- count := 0
- badPackets := 0
- var uid *UserId
- for {
- op, err := or.Next()
- if err == io.EOF {
- break
- } else if err != nil {
- t.Errorf("#%d: opaque read error: %v", count, err)
- break
- }
- // try to parse opaque packet
- p, err := op.Parse()
- switch pkt := p.(type) {
- case *UserId:
- uid = pkt
- case *OpaquePacket:
- // If an OpaquePacket can't re-parse, packet.Read
- // certainly had its reasons.
- if pkt.Reason == nil {
- t.Errorf("#%d: opaque packet, no reason", count)
- } else {
- badPackets++
- }
- }
- count++
- }
-
- const expectedBad = 3
- // Test post-conditions, make sure we actually parsed packets as expected.
- if badPackets != expectedBad {
- t.Errorf("unexpected # unparseable packets: %d (want %d)", badPackets, expectedBad)
- }
- if uid == nil {
- t.Errorf("failed to find expected UID in unsupported keyring")
- } else if uid.Id != "Armin M. Warda <warda@nephilim.ruhr.de>" {
- t.Errorf("unexpected UID: %v", uid.Id)
- }
-}
-
-// This key material has public key and signature packet versions modified to
-// an unsupported value (1), so that trying to parse the OpaquePacket to
-// a typed packet will get an error. It also contains a GnuPG trust packet.
-// (Created with: od -An -t x1 pubring.gpg | xargs | sed 's/ //g')
-const UnsupportedKeyHex = `988d012e7a18a20000010400d6ac00d92b89c1f4396c243abb9b76d2e9673ad63483291fed88e22b82e255e441c078c6abbbf7d2d195e50b62eeaa915b85b0ec20c225ce2c64c167cacb6e711daf2e45da4a8356a059b8160e3b3628ac0dd8437b31f06d53d6e8ea4214d4a26406a6b63e1001406ef23e0bb3069fac9a99a91f77dfafd5de0f188a5da5e3c9000511b42741726d696e204d2e205761726461203c7761726461406e657068696c696d2e727568722e64653e8900950105102e8936c705d1eb399e58489901013f0e03ff5a0c4f421e34fcfa388129166420c08cd76987bcdec6f01bd0271459a85cc22048820dd4e44ac2c7d23908d540f54facf1b36b0d9c20488781ce9dca856531e76e2e846826e9951338020a03a09b57aa5faa82e9267458bd76105399885ac35af7dc1cbb6aaed7c39e1039f3b5beda2c0e916bd38560509bab81235d1a0ead83b0020000`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet.go
deleted file mode 100644
index 3eded93f0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet.go
+++ /dev/null
@@ -1,537 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package packet implements parsing and serialization of OpenPGP packets, as
-// specified in RFC 4880.
-package packet // import "golang.org/x/crypto/openpgp/packet"
-
-import (
- "bufio"
- "crypto/aes"
- "crypto/cipher"
- "crypto/des"
- "golang.org/x/crypto/cast5"
- "golang.org/x/crypto/openpgp/errors"
- "io"
- "math/big"
-)
-
-// readFull is the same as io.ReadFull except that reading zero bytes returns
-// ErrUnexpectedEOF rather than EOF.
-func readFull(r io.Reader, buf []byte) (n int, err error) {
- n, err = io.ReadFull(r, buf)
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2.
-func readLength(r io.Reader) (length int64, isPartial bool, err error) {
- var buf [4]byte
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- switch {
- case buf[0] < 192:
- length = int64(buf[0])
- case buf[0] < 224:
- length = int64(buf[0]-192) << 8
- _, err = readFull(r, buf[0:1])
- if err != nil {
- return
- }
- length += int64(buf[0]) + 192
- case buf[0] < 255:
- length = int64(1) << (buf[0] & 0x1f)
- isPartial = true
- default:
- _, err = readFull(r, buf[0:4])
- if err != nil {
- return
- }
- length = int64(buf[0])<<24 |
- int64(buf[1])<<16 |
- int64(buf[2])<<8 |
- int64(buf[3])
- }
- return
-}
-
-// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths.
-// The continuation lengths are parsed and removed from the stream and EOF is
-// returned at the end of the packet. See RFC 4880, section 4.2.2.4.
-type partialLengthReader struct {
- r io.Reader
- remaining int64
- isPartial bool
-}
-
-func (r *partialLengthReader) Read(p []byte) (n int, err error) {
- for r.remaining == 0 {
- if !r.isPartial {
- return 0, io.EOF
- }
- r.remaining, r.isPartial, err = readLength(r.r)
- if err != nil {
- return 0, err
- }
- }
-
- toRead := int64(len(p))
- if toRead > r.remaining {
- toRead = r.remaining
- }
-
- n, err = r.r.Read(p[:int(toRead)])
- r.remaining -= int64(n)
- if n < int(toRead) && err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// partialLengthWriter writes a stream of data using OpenPGP partial lengths.
-// See RFC 4880, section 4.2.2.4.
-type partialLengthWriter struct {
- w io.WriteCloser
- lengthByte [1]byte
-}
-
-func (w *partialLengthWriter) Write(p []byte) (n int, err error) {
- for len(p) > 0 {
- for power := uint(14); power < 32; power-- {
- l := 1 << power
- if len(p) >= l {
- w.lengthByte[0] = 224 + uint8(power)
- _, err = w.w.Write(w.lengthByte[:])
- if err != nil {
- return
- }
- var m int
- m, err = w.w.Write(p[:l])
- n += m
- if err != nil {
- return
- }
- p = p[l:]
- break
- }
- }
- }
- return
-}
-
-func (w *partialLengthWriter) Close() error {
- w.lengthByte[0] = 0
- _, err := w.w.Write(w.lengthByte[:])
- if err != nil {
- return err
- }
- return w.w.Close()
-}
-
-// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the
-// underlying Reader returns EOF before the limit has been reached.
-type spanReader struct {
- r io.Reader
- n int64
-}
-
-func (l *spanReader) Read(p []byte) (n int, err error) {
- if l.n <= 0 {
- return 0, io.EOF
- }
- if int64(len(p)) > l.n {
- p = p[0:l.n]
- }
- n, err = l.r.Read(p)
- l.n -= int64(n)
- if l.n > 0 && err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// readHeader parses a packet header and returns an io.Reader which will return
-// the contents of the packet. See RFC 4880, section 4.2.
-func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) {
- var buf [4]byte
- _, err = io.ReadFull(r, buf[:1])
- if err != nil {
- return
- }
- if buf[0]&0x80 == 0 {
- err = errors.StructuralError("tag byte does not have MSB set")
- return
- }
- if buf[0]&0x40 == 0 {
- // Old format packet
- tag = packetType((buf[0] & 0x3f) >> 2)
- lengthType := buf[0] & 3
- if lengthType == 3 {
- length = -1
- contents = r
- return
- }
- lengthBytes := 1 << lengthType
- _, err = readFull(r, buf[0:lengthBytes])
- if err != nil {
- return
- }
- for i := 0; i < lengthBytes; i++ {
- length <<= 8
- length |= int64(buf[i])
- }
- contents = &spanReader{r, length}
- return
- }
-
- // New format packet
- tag = packetType(buf[0] & 0x3f)
- length, isPartial, err := readLength(r)
- if err != nil {
- return
- }
- if isPartial {
- contents = &partialLengthReader{
- remaining: length,
- isPartial: true,
- r: r,
- }
- length = -1
- } else {
- contents = &spanReader{r, length}
- }
- return
-}
-
-// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section
-// 4.2.
-func serializeHeader(w io.Writer, ptype packetType, length int) (err error) {
- var buf [6]byte
- var n int
-
- buf[0] = 0x80 | 0x40 | byte(ptype)
- if length < 192 {
- buf[1] = byte(length)
- n = 2
- } else if length < 8384 {
- length -= 192
- buf[1] = 192 + byte(length>>8)
- buf[2] = byte(length)
- n = 3
- } else {
- buf[1] = 255
- buf[2] = byte(length >> 24)
- buf[3] = byte(length >> 16)
- buf[4] = byte(length >> 8)
- buf[5] = byte(length)
- n = 6
- }
-
- _, err = w.Write(buf[:n])
- return
-}
-
-// serializeStreamHeader writes an OpenPGP packet header to w where the
-// length of the packet is unknown. It returns a io.WriteCloser which can be
-// used to write the contents of the packet. See RFC 4880, section 4.2.
-func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) {
- var buf [1]byte
- buf[0] = 0x80 | 0x40 | byte(ptype)
- _, err = w.Write(buf[:])
- if err != nil {
- return
- }
- out = &partialLengthWriter{w: w}
- return
-}
-
-// Packet represents an OpenPGP packet. Users are expected to try casting
-// instances of this interface to specific packet types.
-type Packet interface {
- parse(io.Reader) error
-}
-
-// consumeAll reads from the given Reader until error, returning the number of
-// bytes read.
-func consumeAll(r io.Reader) (n int64, err error) {
- var m int
- var buf [1024]byte
-
- for {
- m, err = r.Read(buf[:])
- n += int64(m)
- if err == io.EOF {
- err = nil
- return
- }
- if err != nil {
- return
- }
- }
-}
-
-// packetType represents the numeric ids of the different OpenPGP packet types. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2
-type packetType uint8
-
-const (
- packetTypeEncryptedKey packetType = 1
- packetTypeSignature packetType = 2
- packetTypeSymmetricKeyEncrypted packetType = 3
- packetTypeOnePassSignature packetType = 4
- packetTypePrivateKey packetType = 5
- packetTypePublicKey packetType = 6
- packetTypePrivateSubkey packetType = 7
- packetTypeCompressed packetType = 8
- packetTypeSymmetricallyEncrypted packetType = 9
- packetTypeLiteralData packetType = 11
- packetTypeUserId packetType = 13
- packetTypePublicSubkey packetType = 14
- packetTypeUserAttribute packetType = 17
- packetTypeSymmetricallyEncryptedMDC packetType = 18
-)
-
-// peekVersion detects the version of a public key packet about to
-// be read. A bufio.Reader at the original position of the io.Reader
-// is returned.
-func peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) {
- bufr = bufio.NewReader(r)
- var verBuf []byte
- if verBuf, err = bufr.Peek(1); err != nil {
- return
- }
- ver = verBuf[0]
- return
-}
-
-// Read reads a single OpenPGP packet from the given io.Reader. If there is an
-// error parsing a packet, the whole packet is consumed from the input.
-func Read(r io.Reader) (p Packet, err error) {
- tag, _, contents, err := readHeader(r)
- if err != nil {
- return
- }
-
- switch tag {
- case packetTypeEncryptedKey:
- p = new(EncryptedKey)
- case packetTypeSignature:
- var version byte
- // Detect signature version
- if contents, version, err = peekVersion(contents); err != nil {
- return
- }
- if version < 4 {
- p = new(SignatureV3)
- } else {
- p = new(Signature)
- }
- case packetTypeSymmetricKeyEncrypted:
- p = new(SymmetricKeyEncrypted)
- case packetTypeOnePassSignature:
- p = new(OnePassSignature)
- case packetTypePrivateKey, packetTypePrivateSubkey:
- pk := new(PrivateKey)
- if tag == packetTypePrivateSubkey {
- pk.IsSubkey = true
- }
- p = pk
- case packetTypePublicKey, packetTypePublicSubkey:
- var version byte
- if contents, version, err = peekVersion(contents); err != nil {
- return
- }
- isSubkey := tag == packetTypePublicSubkey
- if version < 4 {
- p = &PublicKeyV3{IsSubkey: isSubkey}
- } else {
- p = &PublicKey{IsSubkey: isSubkey}
- }
- case packetTypeCompressed:
- p = new(Compressed)
- case packetTypeSymmetricallyEncrypted:
- p = new(SymmetricallyEncrypted)
- case packetTypeLiteralData:
- p = new(LiteralData)
- case packetTypeUserId:
- p = new(UserId)
- case packetTypeUserAttribute:
- p = new(UserAttribute)
- case packetTypeSymmetricallyEncryptedMDC:
- se := new(SymmetricallyEncrypted)
- se.MDC = true
- p = se
- default:
- err = errors.UnknownPacketTypeError(tag)
- }
- if p != nil {
- err = p.parse(contents)
- }
- if err != nil {
- consumeAll(contents)
- }
- return
-}
-
-// SignatureType represents the different semantic meanings of an OpenPGP
-// signature. See RFC 4880, section 5.2.1.
-type SignatureType uint8
-
-const (
- SigTypeBinary SignatureType = 0
- SigTypeText = 1
- SigTypeGenericCert = 0x10
- SigTypePersonaCert = 0x11
- SigTypeCasualCert = 0x12
- SigTypePositiveCert = 0x13
- SigTypeSubkeyBinding = 0x18
- SigTypePrimaryKeyBinding = 0x19
- SigTypeDirectSignature = 0x1F
- SigTypeKeyRevocation = 0x20
- SigTypeSubkeyRevocation = 0x28
-)
-
-// PublicKeyAlgorithm represents the different public key system specified for
-// OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12
-type PublicKeyAlgorithm uint8
-
-const (
- PubKeyAlgoRSA PublicKeyAlgorithm = 1
- PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2
- PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3
- PubKeyAlgoElGamal PublicKeyAlgorithm = 16
- PubKeyAlgoDSA PublicKeyAlgorithm = 17
- // RFC 6637, Section 5.
- PubKeyAlgoECDH PublicKeyAlgorithm = 18
- PubKeyAlgoECDSA PublicKeyAlgorithm = 19
-)
-
-// CanEncrypt returns true if it's possible to encrypt a message to a public
-// key of the given type.
-func (pka PublicKeyAlgorithm) CanEncrypt() bool {
- switch pka {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal:
- return true
- }
- return false
-}
-
-// CanSign returns true if it's possible for a public key of the given type to
-// sign a message.
-func (pka PublicKeyAlgorithm) CanSign() bool {
- switch pka {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA:
- return true
- }
- return false
-}
-
-// CipherFunction represents the different block ciphers specified for OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13
-type CipherFunction uint8
-
-const (
- Cipher3DES CipherFunction = 2
- CipherCAST5 CipherFunction = 3
- CipherAES128 CipherFunction = 7
- CipherAES192 CipherFunction = 8
- CipherAES256 CipherFunction = 9
-)
-
-// KeySize returns the key size, in bytes, of cipher.
-func (cipher CipherFunction) KeySize() int {
- switch cipher {
- case Cipher3DES:
- return 24
- case CipherCAST5:
- return cast5.KeySize
- case CipherAES128:
- return 16
- case CipherAES192:
- return 24
- case CipherAES256:
- return 32
- }
- return 0
-}
-
-// blockSize returns the block size, in bytes, of cipher.
-func (cipher CipherFunction) blockSize() int {
- switch cipher {
- case Cipher3DES:
- return des.BlockSize
- case CipherCAST5:
- return 8
- case CipherAES128, CipherAES192, CipherAES256:
- return 16
- }
- return 0
-}
-
-// new returns a fresh instance of the given cipher.
-func (cipher CipherFunction) new(key []byte) (block cipher.Block) {
- switch cipher {
- case Cipher3DES:
- block, _ = des.NewTripleDESCipher(key)
- case CipherCAST5:
- block, _ = cast5.NewCipher(key)
- case CipherAES128, CipherAES192, CipherAES256:
- block, _ = aes.NewCipher(key)
- }
- return
-}
-
-// readMPI reads a big integer from r. The bit length returned is the bit
-// length that was specified in r. This is preserved so that the integer can be
-// reserialized exactly.
-func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) {
- var buf [2]byte
- _, err = readFull(r, buf[0:])
- if err != nil {
- return
- }
- bitLength = uint16(buf[0])<<8 | uint16(buf[1])
- numBytes := (int(bitLength) + 7) / 8
- mpi = make([]byte, numBytes)
- _, err = readFull(r, mpi)
- return
-}
-
-// mpiLength returns the length of the given *big.Int when serialized as an
-// MPI.
-func mpiLength(n *big.Int) (mpiLengthInBytes int) {
- mpiLengthInBytes = 2 /* MPI length */
- mpiLengthInBytes += (n.BitLen() + 7) / 8
- return
-}
-
-// writeMPI serializes a big integer to w.
-func writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) {
- _, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)})
- if err == nil {
- _, err = w.Write(mpiBytes)
- }
- return
-}
-
-// writeBig serializes a *big.Int to w.
-func writeBig(w io.Writer, i *big.Int) error {
- return writeMPI(w, uint16(i.BitLen()), i.Bytes())
-}
-
-// CompressionAlgo Represents the different compression algorithms
-// supported by OpenPGP (except for BZIP2, which is not currently
-// supported). See Section 9.3 of RFC 4880.
-type CompressionAlgo uint8
-
-const (
- CompressionNone CompressionAlgo = 0
- CompressionZIP CompressionAlgo = 1
- CompressionZLIB CompressionAlgo = 2
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet_test.go
deleted file mode 100644
index 1dab5c3d5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/packet_test.go
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "golang.org/x/crypto/openpgp/errors"
- "io"
- "io/ioutil"
- "testing"
-)
-
-func TestReadFull(t *testing.T) {
- var out [4]byte
-
- b := bytes.NewBufferString("foo")
- n, err := readFull(b, out[:3])
- if n != 3 || err != nil {
- t.Errorf("full read failed n:%d err:%s", n, err)
- }
-
- b = bytes.NewBufferString("foo")
- n, err = readFull(b, out[:4])
- if n != 3 || err != io.ErrUnexpectedEOF {
- t.Errorf("partial read failed n:%d err:%s", n, err)
- }
-
- b = bytes.NewBuffer(nil)
- n, err = readFull(b, out[:3])
- if n != 0 || err != io.ErrUnexpectedEOF {
- t.Errorf("empty read failed n:%d err:%s", n, err)
- }
-}
-
-func readerFromHex(s string) io.Reader {
- data, err := hex.DecodeString(s)
- if err != nil {
- panic("readerFromHex: bad input")
- }
- return bytes.NewBuffer(data)
-}
-
-var readLengthTests = []struct {
- hexInput string
- length int64
- isPartial bool
- err error
-}{
- {"", 0, false, io.ErrUnexpectedEOF},
- {"1f", 31, false, nil},
- {"c0", 0, false, io.ErrUnexpectedEOF},
- {"c101", 256 + 1 + 192, false, nil},
- {"e0", 1, true, nil},
- {"e1", 2, true, nil},
- {"e2", 4, true, nil},
- {"ff", 0, false, io.ErrUnexpectedEOF},
- {"ff00", 0, false, io.ErrUnexpectedEOF},
- {"ff0000", 0, false, io.ErrUnexpectedEOF},
- {"ff000000", 0, false, io.ErrUnexpectedEOF},
- {"ff00000000", 0, false, nil},
- {"ff01020304", 16909060, false, nil},
-}
-
-func TestReadLength(t *testing.T) {
- for i, test := range readLengthTests {
- length, isPartial, err := readLength(readerFromHex(test.hexInput))
- if test.err != nil {
- if err != test.err {
- t.Errorf("%d: expected different error got:%s want:%s", i, err, test.err)
- }
- continue
- }
- if err != nil {
- t.Errorf("%d: unexpected error: %s", i, err)
- continue
- }
- if length != test.length || isPartial != test.isPartial {
- t.Errorf("%d: bad result got:(%d,%t) want:(%d,%t)", i, length, isPartial, test.length, test.isPartial)
- }
- }
-}
-
-var partialLengthReaderTests = []struct {
- hexInput string
- err error
- hexOutput string
-}{
- {"e0", io.ErrUnexpectedEOF, ""},
- {"e001", io.ErrUnexpectedEOF, ""},
- {"e0010102", nil, "0102"},
- {"ff00000000", nil, ""},
- {"e10102e1030400", nil, "01020304"},
- {"e101", io.ErrUnexpectedEOF, ""},
-}
-
-func TestPartialLengthReader(t *testing.T) {
- for i, test := range partialLengthReaderTests {
- r := &partialLengthReader{readerFromHex(test.hexInput), 0, true}
- out, err := ioutil.ReadAll(r)
- if test.err != nil {
- if err != test.err {
- t.Errorf("%d: expected different error got:%s want:%s", i, err, test.err)
- }
- continue
- }
- if err != nil {
- t.Errorf("%d: unexpected error: %s", i, err)
- continue
- }
-
- got := fmt.Sprintf("%x", out)
- if got != test.hexOutput {
- t.Errorf("%d: got:%s want:%s", i, test.hexOutput, got)
- }
- }
-}
-
-var readHeaderTests = []struct {
- hexInput string
- structuralError bool
- unexpectedEOF bool
- tag int
- length int64
- hexOutput string
-}{
- {"", false, false, 0, 0, ""},
- {"7f", true, false, 0, 0, ""},
-
- // Old format headers
- {"80", false, true, 0, 0, ""},
- {"8001", false, true, 0, 1, ""},
- {"800102", false, false, 0, 1, "02"},
- {"81000102", false, false, 0, 1, "02"},
- {"820000000102", false, false, 0, 1, "02"},
- {"860000000102", false, false, 1, 1, "02"},
- {"83010203", false, false, 0, -1, "010203"},
-
- // New format headers
- {"c0", false, true, 0, 0, ""},
- {"c000", false, false, 0, 0, ""},
- {"c00102", false, false, 0, 1, "02"},
- {"c0020203", false, false, 0, 2, "0203"},
- {"c00202", false, true, 0, 2, ""},
- {"c3020203", false, false, 3, 2, "0203"},
-}
-
-func TestReadHeader(t *testing.T) {
- for i, test := range readHeaderTests {
- tag, length, contents, err := readHeader(readerFromHex(test.hexInput))
- if test.structuralError {
- if _, ok := err.(errors.StructuralError); ok {
- continue
- }
- t.Errorf("%d: expected StructuralError, got:%s", i, err)
- continue
- }
- if err != nil {
- if len(test.hexInput) == 0 && err == io.EOF {
- continue
- }
- if !test.unexpectedEOF || err != io.ErrUnexpectedEOF {
- t.Errorf("%d: unexpected error from readHeader: %s", i, err)
- }
- continue
- }
- if int(tag) != test.tag || length != test.length {
- t.Errorf("%d: got:(%d,%d) want:(%d,%d)", i, int(tag), length, test.tag, test.length)
- continue
- }
-
- body, err := ioutil.ReadAll(contents)
- if err != nil {
- if !test.unexpectedEOF || err != io.ErrUnexpectedEOF {
- t.Errorf("%d: unexpected error from contents: %s", i, err)
- }
- continue
- }
- if test.unexpectedEOF {
- t.Errorf("%d: expected ErrUnexpectedEOF from contents but got no error", i)
- continue
- }
- got := fmt.Sprintf("%x", body)
- if got != test.hexOutput {
- t.Errorf("%d: got:%s want:%s", i, got, test.hexOutput)
- }
- }
-}
-
-func TestSerializeHeader(t *testing.T) {
- tag := packetTypePublicKey
- lengths := []int{0, 1, 2, 64, 192, 193, 8000, 8384, 8385, 10000}
-
- for _, length := range lengths {
- buf := bytes.NewBuffer(nil)
- serializeHeader(buf, tag, length)
- tag2, length2, _, err := readHeader(buf)
- if err != nil {
- t.Errorf("length %d, err: %s", length, err)
- }
- if tag2 != tag {
- t.Errorf("length %d, tag incorrect (got %d, want %d)", length, tag2, tag)
- }
- if int(length2) != length {
- t.Errorf("length %d, length incorrect (got %d)", length, length2)
- }
- }
-}
-
-func TestPartialLengths(t *testing.T) {
- buf := bytes.NewBuffer(nil)
- w := new(partialLengthWriter)
- w.w = noOpCloser{buf}
-
- const maxChunkSize = 64
-
- var b [maxChunkSize]byte
- var n uint8
- for l := 1; l <= maxChunkSize; l++ {
- for i := 0; i < l; i++ {
- b[i] = n
- n++
- }
- m, err := w.Write(b[:l])
- if m != l {
- t.Errorf("short write got: %d want: %d", m, l)
- }
- if err != nil {
- t.Errorf("error from write: %s", err)
- }
- }
- w.Close()
-
- want := (maxChunkSize * (maxChunkSize + 1)) / 2
- copyBuf := bytes.NewBuffer(nil)
- r := &partialLengthReader{buf, 0, true}
- m, err := io.Copy(copyBuf, r)
- if m != int64(want) {
- t.Errorf("short copy got: %d want: %d", m, want)
- }
- if err != nil {
- t.Errorf("error from copy: %s", err)
- }
-
- copyBytes := copyBuf.Bytes()
- for i := 0; i < want; i++ {
- if copyBytes[i] != uint8(i) {
- t.Errorf("bad pattern in copy at %d", i)
- break
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key.go
deleted file mode 100644
index 34734cc63..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key.go
+++ /dev/null
@@ -1,380 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/cipher"
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/rsa"
- "crypto/sha1"
- "io"
- "io/ioutil"
- "math/big"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/elgamal"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/s2k"
-)
-
-// PrivateKey represents a possibly encrypted private key. See RFC 4880,
-// section 5.5.3.
-type PrivateKey struct {
- PublicKey
- Encrypted bool // if true then the private key is unavailable until Decrypt has been called.
- encryptedData []byte
- cipher CipherFunction
- s2k func(out, in []byte)
- PrivateKey interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or a crypto.Signer.
- sha1Checksum bool
- iv []byte
-}
-
-func NewRSAPrivateKey(currentTime time.Time, priv *rsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewRSAPublicKey(currentTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewDSAPrivateKey(currentTime time.Time, priv *dsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewDSAPublicKey(currentTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewElGamalPrivateKey(currentTime time.Time, priv *elgamal.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewElGamalPublicKey(currentTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewECDSAPrivateKey(currentTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewECDSAPublicKey(currentTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-// NewSignerPrivateKey creates a sign-only PrivateKey from a crypto.Signer that
-// implements RSA or ECDSA.
-func NewSignerPrivateKey(currentTime time.Time, signer crypto.Signer) *PrivateKey {
- pk := new(PrivateKey)
- switch pubkey := signer.Public().(type) {
- case rsa.PublicKey:
- pk.PublicKey = *NewRSAPublicKey(currentTime, &pubkey)
- pk.PubKeyAlgo = PubKeyAlgoRSASignOnly
- case ecdsa.PublicKey:
- pk.PublicKey = *NewECDSAPublicKey(currentTime, &pubkey)
- default:
- panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey")
- }
- pk.PrivateKey = signer
- return pk
-}
-
-func (pk *PrivateKey) parse(r io.Reader) (err error) {
- err = (&pk.PublicKey).parse(r)
- if err != nil {
- return
- }
- var buf [1]byte
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
-
- s2kType := buf[0]
-
- switch s2kType {
- case 0:
- pk.s2k = nil
- pk.Encrypted = false
- case 254, 255:
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- pk.cipher = CipherFunction(buf[0])
- pk.Encrypted = true
- pk.s2k, err = s2k.Parse(r)
- if err != nil {
- return
- }
- if s2kType == 254 {
- pk.sha1Checksum = true
- }
- default:
- return errors.UnsupportedError("deprecated s2k function in private key")
- }
-
- if pk.Encrypted {
- blockSize := pk.cipher.blockSize()
- if blockSize == 0 {
- return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher)))
- }
- pk.iv = make([]byte, blockSize)
- _, err = readFull(r, pk.iv)
- if err != nil {
- return
- }
- }
-
- pk.encryptedData, err = ioutil.ReadAll(r)
- if err != nil {
- return
- }
-
- if !pk.Encrypted {
- return pk.parsePrivateKey(pk.encryptedData)
- }
-
- return
-}
-
-func mod64kHash(d []byte) uint16 {
- var h uint16
- for _, b := range d {
- h += uint16(b)
- }
- return h
-}
-
-func (pk *PrivateKey) Serialize(w io.Writer) (err error) {
- // TODO(agl): support encrypted private keys
- buf := bytes.NewBuffer(nil)
- err = pk.PublicKey.serializeWithoutHeaders(buf)
- if err != nil {
- return
- }
- buf.WriteByte(0 /* no encryption */)
-
- privateKeyBuf := bytes.NewBuffer(nil)
-
- switch priv := pk.PrivateKey.(type) {
- case *rsa.PrivateKey:
- err = serializeRSAPrivateKey(privateKeyBuf, priv)
- case *dsa.PrivateKey:
- err = serializeDSAPrivateKey(privateKeyBuf, priv)
- case *elgamal.PrivateKey:
- err = serializeElGamalPrivateKey(privateKeyBuf, priv)
- case *ecdsa.PrivateKey:
- err = serializeECDSAPrivateKey(privateKeyBuf, priv)
- default:
- err = errors.InvalidArgumentError("unknown private key type")
- }
- if err != nil {
- return
- }
-
- ptype := packetTypePrivateKey
- contents := buf.Bytes()
- privateKeyBytes := privateKeyBuf.Bytes()
- if pk.IsSubkey {
- ptype = packetTypePrivateSubkey
- }
- err = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2)
- if err != nil {
- return
- }
- _, err = w.Write(contents)
- if err != nil {
- return
- }
- _, err = w.Write(privateKeyBytes)
- if err != nil {
- return
- }
-
- checksum := mod64kHash(privateKeyBytes)
- var checksumBytes [2]byte
- checksumBytes[0] = byte(checksum >> 8)
- checksumBytes[1] = byte(checksum)
- _, err = w.Write(checksumBytes[:])
-
- return
-}
-
-func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error {
- err := writeBig(w, priv.D)
- if err != nil {
- return err
- }
- err = writeBig(w, priv.Primes[1])
- if err != nil {
- return err
- }
- err = writeBig(w, priv.Primes[0])
- if err != nil {
- return err
- }
- return writeBig(w, priv.Precomputed.Qinv)
-}
-
-func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error {
- return writeBig(w, priv.X)
-}
-
-func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error {
- return writeBig(w, priv.X)
-}
-
-func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error {
- return writeBig(w, priv.D)
-}
-
-// Decrypt decrypts an encrypted private key using a passphrase.
-func (pk *PrivateKey) Decrypt(passphrase []byte) error {
- if !pk.Encrypted {
- return nil
- }
-
- key := make([]byte, pk.cipher.KeySize())
- pk.s2k(key, passphrase)
- block := pk.cipher.new(key)
- cfb := cipher.NewCFBDecrypter(block, pk.iv)
-
- data := make([]byte, len(pk.encryptedData))
- cfb.XORKeyStream(data, pk.encryptedData)
-
- if pk.sha1Checksum {
- if len(data) < sha1.Size {
- return errors.StructuralError("truncated private key data")
- }
- h := sha1.New()
- h.Write(data[:len(data)-sha1.Size])
- sum := h.Sum(nil)
- if !bytes.Equal(sum, data[len(data)-sha1.Size:]) {
- return errors.StructuralError("private key checksum failure")
- }
- data = data[:len(data)-sha1.Size]
- } else {
- if len(data) < 2 {
- return errors.StructuralError("truncated private key data")
- }
- var sum uint16
- for i := 0; i < len(data)-2; i++ {
- sum += uint16(data[i])
- }
- if data[len(data)-2] != uint8(sum>>8) ||
- data[len(data)-1] != uint8(sum) {
- return errors.StructuralError("private key checksum failure")
- }
- data = data[:len(data)-2]
- }
-
- return pk.parsePrivateKey(data)
-}
-
-func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) {
- switch pk.PublicKey.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly:
- return pk.parseRSAPrivateKey(data)
- case PubKeyAlgoDSA:
- return pk.parseDSAPrivateKey(data)
- case PubKeyAlgoElGamal:
- return pk.parseElGamalPrivateKey(data)
- case PubKeyAlgoECDSA:
- return pk.parseECDSAPrivateKey(data)
- }
- panic("impossible")
-}
-
-func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) {
- rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey)
- rsaPriv := new(rsa.PrivateKey)
- rsaPriv.PublicKey = *rsaPub
-
- buf := bytes.NewBuffer(data)
- d, _, err := readMPI(buf)
- if err != nil {
- return
- }
- p, _, err := readMPI(buf)
- if err != nil {
- return
- }
- q, _, err := readMPI(buf)
- if err != nil {
- return
- }
-
- rsaPriv.D = new(big.Int).SetBytes(d)
- rsaPriv.Primes = make([]*big.Int, 2)
- rsaPriv.Primes[0] = new(big.Int).SetBytes(p)
- rsaPriv.Primes[1] = new(big.Int).SetBytes(q)
- if err := rsaPriv.Validate(); err != nil {
- return err
- }
- rsaPriv.Precompute()
- pk.PrivateKey = rsaPriv
- pk.Encrypted = false
- pk.encryptedData = nil
-
- return nil
-}
-
-func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) {
- dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey)
- dsaPriv := new(dsa.PrivateKey)
- dsaPriv.PublicKey = *dsaPub
-
- buf := bytes.NewBuffer(data)
- x, _, err := readMPI(buf)
- if err != nil {
- return
- }
-
- dsaPriv.X = new(big.Int).SetBytes(x)
- pk.PrivateKey = dsaPriv
- pk.Encrypted = false
- pk.encryptedData = nil
-
- return nil
-}
-
-func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) {
- pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey)
- priv := new(elgamal.PrivateKey)
- priv.PublicKey = *pub
-
- buf := bytes.NewBuffer(data)
- x, _, err := readMPI(buf)
- if err != nil {
- return
- }
-
- priv.X = new(big.Int).SetBytes(x)
- pk.PrivateKey = priv
- pk.Encrypted = false
- pk.encryptedData = nil
-
- return nil
-}
-
-func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) {
- ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey)
-
- buf := bytes.NewBuffer(data)
- d, _, err := readMPI(buf)
- if err != nil {
- return
- }
-
- pk.PrivateKey = &ecdsa.PrivateKey{
- PublicKey: *ecdsaPub,
- D: new(big.Int).SetBytes(d),
- }
- pk.Encrypted = false
- pk.encryptedData = nil
-
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go
deleted file mode 100644
index ac651d917..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/rsa"
- "crypto/x509"
- "encoding/hex"
- "hash"
- "io"
- "testing"
- "time"
-)
-
-var privateKeyTests = []struct {
- privateKeyHex string
- creationTime time.Time
-}{
- {
- privKeyRSAHex,
- time.Unix(0x4cc349a8, 0),
- },
- {
- privKeyElGamalHex,
- time.Unix(0x4df9ee1a, 0),
- },
-}
-
-func TestPrivateKeyRead(t *testing.T) {
- for i, test := range privateKeyTests {
- packet, err := Read(readerFromHex(test.privateKeyHex))
- if err != nil {
- t.Errorf("#%d: failed to parse: %s", i, err)
- continue
- }
-
- privKey := packet.(*PrivateKey)
-
- if !privKey.Encrypted {
- t.Errorf("#%d: private key isn't encrypted", i)
- continue
- }
-
- err = privKey.Decrypt([]byte("wrong password"))
- if err == nil {
- t.Errorf("#%d: decrypted with incorrect key", i)
- continue
- }
-
- err = privKey.Decrypt([]byte("testing"))
- if err != nil {
- t.Errorf("#%d: failed to decrypt: %s", i, err)
- continue
- }
-
- if !privKey.CreationTime.Equal(test.creationTime) || privKey.Encrypted {
- t.Errorf("#%d: bad result, got: %#v", i, privKey)
- }
- }
-}
-
-func populateHash(hashFunc crypto.Hash, msg []byte) (hash.Hash, error) {
- h := hashFunc.New()
- if _, err := h.Write(msg); err != nil {
- return nil, err
- }
- return h, nil
-}
-
-func TestRSAPrivateKey(t *testing.T) {
- privKeyDER, _ := hex.DecodeString(pkcs1PrivKeyHex)
- rsaPriv, err := x509.ParsePKCS1PrivateKey(privKeyDER)
- if err != nil {
- t.Fatal(err)
- }
-
- var buf bytes.Buffer
- if err := NewRSAPrivateKey(time.Now(), rsaPriv).Serialize(&buf); err != nil {
- t.Fatal(err)
- }
-
- p, err := Read(&buf)
- if err != nil {
- t.Fatal(err)
- }
-
- priv, ok := p.(*PrivateKey)
- if !ok {
- t.Fatal("didn't parse private key")
- }
-
- sig := &Signature{
- PubKeyAlgo: PubKeyAlgoRSA,
- Hash: crypto.SHA256,
- }
- msg := []byte("Hello World!")
-
- h, err := populateHash(sig.Hash, msg)
- if err != nil {
- t.Fatal(err)
- }
- if err := sig.Sign(h, priv, nil); err != nil {
- t.Fatal(err)
- }
-
- if h, err = populateHash(sig.Hash, msg); err != nil {
- t.Fatal(err)
- }
- if err := priv.VerifySignature(h, sig); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestECDSAPrivateKey(t *testing.T) {
- ecdsaPriv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
-
- var buf bytes.Buffer
- if err := NewECDSAPrivateKey(time.Now(), ecdsaPriv).Serialize(&buf); err != nil {
- t.Fatal(err)
- }
-
- p, err := Read(&buf)
- if err != nil {
- t.Fatal(err)
- }
-
- priv, ok := p.(*PrivateKey)
- if !ok {
- t.Fatal("didn't parse private key")
- }
-
- sig := &Signature{
- PubKeyAlgo: PubKeyAlgoECDSA,
- Hash: crypto.SHA256,
- }
- msg := []byte("Hello World!")
-
- h, err := populateHash(sig.Hash, msg)
- if err != nil {
- t.Fatal(err)
- }
- if err := sig.Sign(h, priv, nil); err != nil {
- t.Fatal(err)
- }
-
- if h, err = populateHash(sig.Hash, msg); err != nil {
- t.Fatal(err)
- }
- if err := priv.VerifySignature(h, sig); err != nil {
- t.Fatal(err)
- }
-}
-
-type rsaSigner struct {
- priv *rsa.PrivateKey
-}
-
-func (s *rsaSigner) Public() crypto.PublicKey {
- return s.priv.PublicKey
-}
-
-func (s *rsaSigner) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error) {
- return s.priv.Sign(rand, msg, opts)
-}
-
-func TestRSASignerPrivateKey(t *testing.T) {
- rsaPriv, err := rsa.GenerateKey(rand.Reader, 1024)
- if err != nil {
- t.Fatal(err)
- }
-
- priv := NewSignerPrivateKey(time.Now(), &rsaSigner{rsaPriv})
-
- if priv.PubKeyAlgo != PubKeyAlgoRSASignOnly {
- t.Fatal("NewSignerPrivateKey should have made a sign-only RSA private key")
- }
-
- sig := &Signature{
- PubKeyAlgo: PubKeyAlgoRSASignOnly,
- Hash: crypto.SHA256,
- }
- msg := []byte("Hello World!")
-
- h, err := populateHash(sig.Hash, msg)
- if err != nil {
- t.Fatal(err)
- }
- if err := sig.Sign(h, priv, nil); err != nil {
- t.Fatal(err)
- }
-
- if h, err = populateHash(sig.Hash, msg); err != nil {
- t.Fatal(err)
- }
- if err := priv.VerifySignature(h, sig); err != nil {
- t.Fatal(err)
- }
-}
-
-type ecdsaSigner struct {
- priv *ecdsa.PrivateKey
-}
-
-func (s *ecdsaSigner) Public() crypto.PublicKey {
- return s.priv.PublicKey
-}
-
-func (s *ecdsaSigner) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error) {
- return s.priv.Sign(rand, msg, opts)
-}
-
-func TestECDSASignerPrivateKey(t *testing.T) {
- ecdsaPriv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- t.Fatal(err)
- }
-
- priv := NewSignerPrivateKey(time.Now(), &ecdsaSigner{ecdsaPriv})
-
- if priv.PubKeyAlgo != PubKeyAlgoECDSA {
- t.Fatal("NewSignerPrivateKey should have made an ECSDA private key")
- }
-
- sig := &Signature{
- PubKeyAlgo: PubKeyAlgoECDSA,
- Hash: crypto.SHA256,
- }
- msg := []byte("Hello World!")
-
- h, err := populateHash(sig.Hash, msg)
- if err != nil {
- t.Fatal(err)
- }
- if err := sig.Sign(h, priv, nil); err != nil {
- t.Fatal(err)
- }
-
- if h, err = populateHash(sig.Hash, msg); err != nil {
- t.Fatal(err)
- }
- if err := priv.VerifySignature(h, sig); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestIssue11505(t *testing.T) {
- // parsing a rsa private key with p or q == 1 used to panic due to a divide by zero
- _, _ = Read(readerFromHex("9c3004303030300100000011303030000000000000010130303030303030303030303030303030303030303030303030303030303030303030303030303030303030"))
-}
-
-// Generated with `gpg --export-secret-keys "Test Key 2"`
-const privKeyRSAHex = "9501fe044cc349a8010400b70ca0010e98c090008d45d1ee8f9113bd5861fd57b88bacb7c68658747663f1e1a3b5a98f32fda6472373c024b97359cd2efc88ff60f77751adfbf6af5e615e6a1408cfad8bf0cea30b0d5f53aa27ad59089ba9b15b7ebc2777a25d7b436144027e3bcd203909f147d0e332b240cf63d3395f5dfe0df0a6c04e8655af7eacdf0011010001fe0303024a252e7d475fd445607de39a265472aa74a9320ba2dac395faa687e9e0336aeb7e9a7397e511b5afd9dc84557c80ac0f3d4d7bfec5ae16f20d41c8c84a04552a33870b930420e230e179564f6d19bb153145e76c33ae993886c388832b0fa042ddda7f133924f3854481533e0ede31d51278c0519b29abc3bf53da673e13e3e1214b52413d179d7f66deee35cac8eacb060f78379d70ef4af8607e68131ff529439668fc39c9ce6dfef8a5ac234d234802cbfb749a26107db26406213ae5c06d4673253a3cbee1fcbae58d6ab77e38d6e2c0e7c6317c48e054edadb5a40d0d48acb44643d998139a8a66bb820be1f3f80185bc777d14b5954b60effe2448a036d565c6bc0b915fcea518acdd20ab07bc1529f561c58cd044f723109b93f6fd99f876ff891d64306b5d08f48bab59f38695e9109c4dec34013ba3153488ce070268381ba923ee1eb77125b36afcb4347ec3478c8f2735b06ef17351d872e577fa95d0c397c88c71b59629a36aec"
-
-// Generated by `gpg --export-secret-keys` followed by a manual extraction of
-// the ElGamal subkey from the packets.
-const privKeyElGamalHex = "9d0157044df9ee1a100400eb8e136a58ec39b582629cdadf830bc64e0a94ed8103ca8bb247b27b11b46d1d25297ef4bcc3071785ba0c0bedfe89eabc5287fcc0edf81ab5896c1c8e4b20d27d79813c7aede75320b33eaeeaa586edc00fd1036c10133e6ba0ff277245d0d59d04b2b3421b7244aca5f4a8d870c6f1c1fbff9e1c26699a860b9504f35ca1d700030503fd1ededd3b840795be6d9ccbe3c51ee42e2f39233c432b831ddd9c4e72b7025a819317e47bf94f9ee316d7273b05d5fcf2999c3a681f519b1234bbfa6d359b4752bd9c3f77d6b6456cde152464763414ca130f4e91d91041432f90620fec0e6d6b5116076c2985d5aeaae13be492b9b329efcaf7ee25120159a0a30cd976b42d7afe030302dae7eb80db744d4960c4df930d57e87fe81412eaace9f900e6c839817a614ddb75ba6603b9417c33ea7b6c93967dfa2bcff3fa3c74a5ce2c962db65b03aece14c96cbd0038fc"
-
-// pkcs1PrivKeyHex is a PKCS#1, RSA private key.
-// Generated by `openssl genrsa 1024 | openssl rsa -outform DER | xxd -p`
-const pkcs1PrivKeyHex = "3082025d02010002818100e98edfa1c3b35884a54d0b36a6a603b0290fa85e49e30fa23fc94fef9c6790bc4849928607aa48d809da326fb42a969d06ad756b98b9c1a90f5d4a2b6d0ac05953c97f4da3120164a21a679793ce181c906dc01d235cc085ddcdf6ea06c389b6ab8885dfd685959e693138856a68a7e5db263337ff82a088d583a897cf2d59e9020301000102818100b6d5c9eb70b02d5369b3ee5b520a14490b5bde8a317d36f7e4c74b7460141311d1e5067735f8f01d6f5908b2b96fbd881f7a1ab9a84d82753e39e19e2d36856be960d05ac9ef8e8782ea1b6d65aee28fdfe1d61451e8cff0adfe84322f12cf455028b581cf60eb9e0e140ba5d21aeba6c2634d7c65318b9a665fc01c3191ca21024100fa5e818da3705b0fa33278bb28d4b6f6050388af2d4b75ec9375dd91ccf2e7d7068086a8b82a8f6282e4fbbdb8a7f2622eb97295249d87acea7f5f816f54d347024100eecf9406d7dc49cdfb95ab1eff4064de84c7a30f64b2798936a0d2018ba9eb52e4b636f82e96c49cc63b80b675e91e40d1b2e4017d4b9adaf33ab3d9cf1c214f024100c173704ace742c082323066226a4655226819a85304c542b9dacbeacbf5d1881ee863485fcf6f59f3a604f9b42289282067447f2b13dfeed3eab7851fc81e0550240741fc41f3fc002b382eed8730e33c5d8de40256e4accee846667f536832f711ab1d4590e7db91a8a116ac5bff3be13d3f9243ff2e976662aa9b395d907f8e9c9024046a5696c9ef882363e06c9fa4e2f5b580906452befba03f4a99d0f873697ef1f851d2226ca7934b30b7c3e80cb634a67172bbbf4781735fe3e09263e2dd723e7"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key.go
deleted file mode 100644
index ead26233d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key.go
+++ /dev/null
@@ -1,748 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rsa"
- "crypto/sha1"
- _ "crypto/sha256"
- _ "crypto/sha512"
- "encoding/binary"
- "fmt"
- "hash"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/elgamal"
- "golang.org/x/crypto/openpgp/errors"
-)
-
-var (
- // NIST curve P-256
- oidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07}
- // NIST curve P-384
- oidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22}
- // NIST curve P-521
- oidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23}
-)
-
-const maxOIDLength = 8
-
-// ecdsaKey stores the algorithm-specific fields for ECDSA keys.
-// as defined in RFC 6637, Section 9.
-type ecdsaKey struct {
- // oid contains the OID byte sequence identifying the elliptic curve used
- oid []byte
- // p contains the elliptic curve point that represents the public key
- p parsedMPI
-}
-
-// parseOID reads the OID for the curve as defined in RFC 6637, Section 9.
-func parseOID(r io.Reader) (oid []byte, err error) {
- buf := make([]byte, maxOIDLength)
- if _, err = readFull(r, buf[:1]); err != nil {
- return
- }
- oidLen := buf[0]
- if int(oidLen) > len(buf) {
- err = errors.UnsupportedError("invalid oid length: " + strconv.Itoa(int(oidLen)))
- return
- }
- oid = buf[:oidLen]
- _, err = readFull(r, oid)
- return
-}
-
-func (f *ecdsaKey) parse(r io.Reader) (err error) {
- if f.oid, err = parseOID(r); err != nil {
- return err
- }
- f.p.bytes, f.p.bitLength, err = readMPI(r)
- return
-}
-
-func (f *ecdsaKey) serialize(w io.Writer) (err error) {
- buf := make([]byte, maxOIDLength+1)
- buf[0] = byte(len(f.oid))
- copy(buf[1:], f.oid)
- if _, err = w.Write(buf[:len(f.oid)+1]); err != nil {
- return
- }
- return writeMPIs(w, f.p)
-}
-
-func (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) {
- var c elliptic.Curve
- if bytes.Equal(f.oid, oidCurveP256) {
- c = elliptic.P256()
- } else if bytes.Equal(f.oid, oidCurveP384) {
- c = elliptic.P384()
- } else if bytes.Equal(f.oid, oidCurveP521) {
- c = elliptic.P521()
- } else {
- return nil, errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", f.oid))
- }
- x, y := elliptic.Unmarshal(c, f.p.bytes)
- if x == nil {
- return nil, errors.UnsupportedError("failed to parse EC point")
- }
- return &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil
-}
-
-func (f *ecdsaKey) byteLen() int {
- return 1 + len(f.oid) + 2 + len(f.p.bytes)
-}
-
-type kdfHashFunction byte
-type kdfAlgorithm byte
-
-// ecdhKdf stores key derivation function parameters
-// used for ECDH encryption. See RFC 6637, Section 9.
-type ecdhKdf struct {
- KdfHash kdfHashFunction
- KdfAlgo kdfAlgorithm
-}
-
-func (f *ecdhKdf) parse(r io.Reader) (err error) {
- buf := make([]byte, 1)
- if _, err = readFull(r, buf); err != nil {
- return
- }
- kdfLen := int(buf[0])
- if kdfLen < 3 {
- return errors.UnsupportedError("Unsupported ECDH KDF length: " + strconv.Itoa(kdfLen))
- }
- buf = make([]byte, kdfLen)
- if _, err = readFull(r, buf); err != nil {
- return
- }
- reserved := int(buf[0])
- f.KdfHash = kdfHashFunction(buf[1])
- f.KdfAlgo = kdfAlgorithm(buf[2])
- if reserved != 0x01 {
- return errors.UnsupportedError("Unsupported KDF reserved field: " + strconv.Itoa(reserved))
- }
- return
-}
-
-func (f *ecdhKdf) serialize(w io.Writer) (err error) {
- buf := make([]byte, 4)
- // See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys.
- buf[0] = byte(0x03) // Length of the following fields
- buf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now
- buf[2] = byte(f.KdfHash)
- buf[3] = byte(f.KdfAlgo)
- _, err = w.Write(buf[:])
- return
-}
-
-func (f *ecdhKdf) byteLen() int {
- return 4
-}
-
-// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2.
-type PublicKey struct {
- CreationTime time.Time
- PubKeyAlgo PublicKeyAlgorithm
- PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey
- Fingerprint [20]byte
- KeyId uint64
- IsSubkey bool
-
- n, e, p, q, g, y parsedMPI
-
- // RFC 6637 fields
- ec *ecdsaKey
- ecdh *ecdhKdf
-}
-
-// signingKey provides a convenient abstraction over signature verification
-// for v3 and v4 public keys.
-type signingKey interface {
- SerializeSignaturePrefix(io.Writer)
- serializeWithoutHeaders(io.Writer) error
-}
-
-func fromBig(n *big.Int) parsedMPI {
- return parsedMPI{
- bytes: n.Bytes(),
- bitLength: uint16(n.BitLen()),
- }
-}
-
-// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey.
-func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoRSA,
- PublicKey: pub,
- n: fromBig(pub.N),
- e: fromBig(big.NewInt(int64(pub.E))),
- }
-
- pk.setFingerPrintAndKeyId()
- return pk
-}
-
-// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey.
-func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoDSA,
- PublicKey: pub,
- p: fromBig(pub.P),
- q: fromBig(pub.Q),
- g: fromBig(pub.G),
- y: fromBig(pub.Y),
- }
-
- pk.setFingerPrintAndKeyId()
- return pk
-}
-
-// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey.
-func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey {
- pk := &PublicKey{
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoElGamal,
- PublicKey: pub,
- p: fromBig(pub.P),
- g: fromBig(pub.G),
- y: fromBig(pub.Y),
- }
-
- pk.setFingerPrintAndKeyId()
- return pk
-}
-
-func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoECDSA,
- PublicKey: pub,
- ec: new(ecdsaKey),
- }
-
- switch pub.Curve {
- case elliptic.P256():
- pk.ec.oid = oidCurveP256
- case elliptic.P384():
- pk.ec.oid = oidCurveP384
- case elliptic.P521():
- pk.ec.oid = oidCurveP521
- default:
- panic("unknown elliptic curve")
- }
-
- pk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y)
- pk.ec.p.bitLength = uint16(8 * len(pk.ec.p.bytes))
-
- pk.setFingerPrintAndKeyId()
- return pk
-}
-
-func (pk *PublicKey) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.5.2
- var buf [6]byte
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- if buf[0] != 4 {
- return errors.UnsupportedError("public key version")
- }
- pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)
- pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5])
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- err = pk.parseRSA(r)
- case PubKeyAlgoDSA:
- err = pk.parseDSA(r)
- case PubKeyAlgoElGamal:
- err = pk.parseElGamal(r)
- case PubKeyAlgoECDSA:
- pk.ec = new(ecdsaKey)
- if err = pk.ec.parse(r); err != nil {
- return err
- }
- pk.PublicKey, err = pk.ec.newECDSA()
- case PubKeyAlgoECDH:
- pk.ec = new(ecdsaKey)
- if err = pk.ec.parse(r); err != nil {
- return
- }
- pk.ecdh = new(ecdhKdf)
- if err = pk.ecdh.parse(r); err != nil {
- return
- }
- // The ECDH key is stored in an ecdsa.PublicKey for convenience.
- pk.PublicKey, err = pk.ec.newECDSA()
- default:
- err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo)))
- }
- if err != nil {
- return
- }
-
- pk.setFingerPrintAndKeyId()
- return
-}
-
-func (pk *PublicKey) setFingerPrintAndKeyId() {
- // RFC 4880, section 12.2
- fingerPrint := sha1.New()
- pk.SerializeSignaturePrefix(fingerPrint)
- pk.serializeWithoutHeaders(fingerPrint)
- copy(pk.Fingerprint[:], fingerPrint.Sum(nil))
- pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20])
-}
-
-// parseRSA parses RSA public key material from the given Reader. See RFC 4880,
-// section 5.5.2.
-func (pk *PublicKey) parseRSA(r io.Reader) (err error) {
- pk.n.bytes, pk.n.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.e.bytes, pk.e.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
-
- if len(pk.e.bytes) > 3 {
- err = errors.UnsupportedError("large public exponent")
- return
- }
- rsa := &rsa.PublicKey{
- N: new(big.Int).SetBytes(pk.n.bytes),
- E: 0,
- }
- for i := 0; i < len(pk.e.bytes); i++ {
- rsa.E <<= 8
- rsa.E |= int(pk.e.bytes[i])
- }
- pk.PublicKey = rsa
- return
-}
-
-// parseDSA parses DSA public key material from the given Reader. See RFC 4880,
-// section 5.5.2.
-func (pk *PublicKey) parseDSA(r io.Reader) (err error) {
- pk.p.bytes, pk.p.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.q.bytes, pk.q.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.g.bytes, pk.g.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.y.bytes, pk.y.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
-
- dsa := new(dsa.PublicKey)
- dsa.P = new(big.Int).SetBytes(pk.p.bytes)
- dsa.Q = new(big.Int).SetBytes(pk.q.bytes)
- dsa.G = new(big.Int).SetBytes(pk.g.bytes)
- dsa.Y = new(big.Int).SetBytes(pk.y.bytes)
- pk.PublicKey = dsa
- return
-}
-
-// parseElGamal parses ElGamal public key material from the given Reader. See
-// RFC 4880, section 5.5.2.
-func (pk *PublicKey) parseElGamal(r io.Reader) (err error) {
- pk.p.bytes, pk.p.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.g.bytes, pk.g.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
- pk.y.bytes, pk.y.bitLength, err = readMPI(r)
- if err != nil {
- return
- }
-
- elgamal := new(elgamal.PublicKey)
- elgamal.P = new(big.Int).SetBytes(pk.p.bytes)
- elgamal.G = new(big.Int).SetBytes(pk.g.bytes)
- elgamal.Y = new(big.Int).SetBytes(pk.y.bytes)
- pk.PublicKey = elgamal
- return
-}
-
-// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.
-// The prefix is used when calculating a signature over this public key. See
-// RFC 4880, section 5.2.4.
-func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) {
- var pLength uint16
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- pLength += 2 + uint16(len(pk.n.bytes))
- pLength += 2 + uint16(len(pk.e.bytes))
- case PubKeyAlgoDSA:
- pLength += 2 + uint16(len(pk.p.bytes))
- pLength += 2 + uint16(len(pk.q.bytes))
- pLength += 2 + uint16(len(pk.g.bytes))
- pLength += 2 + uint16(len(pk.y.bytes))
- case PubKeyAlgoElGamal:
- pLength += 2 + uint16(len(pk.p.bytes))
- pLength += 2 + uint16(len(pk.g.bytes))
- pLength += 2 + uint16(len(pk.y.bytes))
- case PubKeyAlgoECDSA:
- pLength += uint16(pk.ec.byteLen())
- case PubKeyAlgoECDH:
- pLength += uint16(pk.ec.byteLen())
- pLength += uint16(pk.ecdh.byteLen())
- default:
- panic("unknown public key algorithm")
- }
- pLength += 6
- h.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)})
- return
-}
-
-func (pk *PublicKey) Serialize(w io.Writer) (err error) {
- length := 6 // 6 byte header
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- length += 2 + len(pk.n.bytes)
- length += 2 + len(pk.e.bytes)
- case PubKeyAlgoDSA:
- length += 2 + len(pk.p.bytes)
- length += 2 + len(pk.q.bytes)
- length += 2 + len(pk.g.bytes)
- length += 2 + len(pk.y.bytes)
- case PubKeyAlgoElGamal:
- length += 2 + len(pk.p.bytes)
- length += 2 + len(pk.g.bytes)
- length += 2 + len(pk.y.bytes)
- case PubKeyAlgoECDSA:
- length += pk.ec.byteLen()
- case PubKeyAlgoECDH:
- length += pk.ec.byteLen()
- length += pk.ecdh.byteLen()
- default:
- panic("unknown public key algorithm")
- }
-
- packetType := packetTypePublicKey
- if pk.IsSubkey {
- packetType = packetTypePublicSubkey
- }
- err = serializeHeader(w, packetType, length)
- if err != nil {
- return
- }
- return pk.serializeWithoutHeaders(w)
-}
-
-// serializeWithoutHeaders marshals the PublicKey to w in the form of an
-// OpenPGP public key packet, not including the packet header.
-func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) {
- var buf [6]byte
- buf[0] = 4
- t := uint32(pk.CreationTime.Unix())
- buf[1] = byte(t >> 24)
- buf[2] = byte(t >> 16)
- buf[3] = byte(t >> 8)
- buf[4] = byte(t)
- buf[5] = byte(pk.PubKeyAlgo)
-
- _, err = w.Write(buf[:])
- if err != nil {
- return
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- return writeMPIs(w, pk.n, pk.e)
- case PubKeyAlgoDSA:
- return writeMPIs(w, pk.p, pk.q, pk.g, pk.y)
- case PubKeyAlgoElGamal:
- return writeMPIs(w, pk.p, pk.g, pk.y)
- case PubKeyAlgoECDSA:
- return pk.ec.serialize(w)
- case PubKeyAlgoECDH:
- if err = pk.ec.serialize(w); err != nil {
- return
- }
- return pk.ecdh.serialize(w)
- }
- return errors.InvalidArgumentError("bad public-key algorithm")
-}
-
-// CanSign returns true iff this public key can generate signatures
-func (pk *PublicKey) CanSign() bool {
- return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal
-}
-
-// VerifySignature returns nil iff sig is a valid signature, made by this
-// public key, of the data hashed into signed. signed is mutated by this call.
-func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {
- if !pk.CanSign() {
- return errors.InvalidArgumentError("public key cannot generate signatures")
- }
-
- signed.Write(sig.HashSuffix)
- hashBytes := signed.Sum(nil)
-
- if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
- return errors.SignatureError("hash tag doesn't match")
- }
-
- if pk.PubKeyAlgo != sig.PubKeyAlgo {
- return errors.InvalidArgumentError("public key and signature use different algorithms")
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey)
- err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes)
- if err != nil {
- return errors.SignatureError("RSA verification failure")
- }
- return nil
- case PubKeyAlgoDSA:
- dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey)
- // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
- subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8
- if len(hashBytes) > subgroupSize {
- hashBytes = hashBytes[:subgroupSize]
- }
- if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) {
- return errors.SignatureError("DSA verification failure")
- }
- return nil
- case PubKeyAlgoECDSA:
- ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey)
- if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) {
- return errors.SignatureError("ECDSA verification failure")
- }
- return nil
- default:
- return errors.SignatureError("Unsupported public key algorithm used in signature")
- }
-}
-
-// VerifySignatureV3 returns nil iff sig is a valid signature, made by this
-// public key, of the data hashed into signed. signed is mutated by this call.
-func (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) {
- if !pk.CanSign() {
- return errors.InvalidArgumentError("public key cannot generate signatures")
- }
-
- suffix := make([]byte, 5)
- suffix[0] = byte(sig.SigType)
- binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))
- signed.Write(suffix)
- hashBytes := signed.Sum(nil)
-
- if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
- return errors.SignatureError("hash tag doesn't match")
- }
-
- if pk.PubKeyAlgo != sig.PubKeyAlgo {
- return errors.InvalidArgumentError("public key and signature use different algorithms")
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- rsaPublicKey := pk.PublicKey.(*rsa.PublicKey)
- if err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil {
- return errors.SignatureError("RSA verification failure")
- }
- return
- case PubKeyAlgoDSA:
- dsaPublicKey := pk.PublicKey.(*dsa.PublicKey)
- // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
- subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8
- if len(hashBytes) > subgroupSize {
- hashBytes = hashBytes[:subgroupSize]
- }
- if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) {
- return errors.SignatureError("DSA verification failure")
- }
- return nil
- default:
- panic("shouldn't happen")
- }
-}
-
-// keySignatureHash returns a Hash of the message that needs to be signed for
-// pk to assert a subkey relationship to signed.
-func keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) {
- if !hashFunc.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- h = hashFunc.New()
-
- // RFC 4880, section 5.2.4
- pk.SerializeSignaturePrefix(h)
- pk.serializeWithoutHeaders(h)
- signed.SerializeSignaturePrefix(h)
- signed.serializeWithoutHeaders(h)
- return
-}
-
-// VerifyKeySignature returns nil iff sig is a valid signature, made by this
-// public key, of signed.
-func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error {
- h, err := keySignatureHash(pk, signed, sig.Hash)
- if err != nil {
- return err
- }
- if err = pk.VerifySignature(h, sig); err != nil {
- return err
- }
-
- if sig.FlagSign {
- // Signing subkeys must be cross-signed. See
- // https://www.gnupg.org/faq/subkey-cross-certify.html.
- if sig.EmbeddedSignature == nil {
- return errors.StructuralError("signing subkey is missing cross-signature")
- }
- // Verify the cross-signature. This is calculated over the same
- // data as the main signature, so we cannot just recursively
- // call signed.VerifyKeySignature(...)
- if h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil {
- return errors.StructuralError("error while hashing for cross-signature: " + err.Error())
- }
- if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil {
- return errors.StructuralError("error while verifying cross-signature: " + err.Error())
- }
- }
-
- return nil
-}
-
-func keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) {
- if !hashFunc.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- h = hashFunc.New()
-
- // RFC 4880, section 5.2.4
- pk.SerializeSignaturePrefix(h)
- pk.serializeWithoutHeaders(h)
-
- return
-}
-
-// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this
-// public key.
-func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {
- h, err := keyRevocationHash(pk, sig.Hash)
- if err != nil {
- return err
- }
- return pk.VerifySignature(h, sig)
-}
-
-// userIdSignatureHash returns a Hash of the message that needs to be signed
-// to assert that pk is a valid key for id.
-func userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) {
- if !hashFunc.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- h = hashFunc.New()
-
- // RFC 4880, section 5.2.4
- pk.SerializeSignaturePrefix(h)
- pk.serializeWithoutHeaders(h)
-
- var buf [5]byte
- buf[0] = 0xb4
- buf[1] = byte(len(id) >> 24)
- buf[2] = byte(len(id) >> 16)
- buf[3] = byte(len(id) >> 8)
- buf[4] = byte(len(id))
- h.Write(buf[:])
- h.Write([]byte(id))
-
- return
-}
-
-// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this
-// public key, that id is the identity of pub.
-func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) {
- h, err := userIdSignatureHash(id, pub, sig.Hash)
- if err != nil {
- return err
- }
- return pk.VerifySignature(h, sig)
-}
-
-// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this
-// public key, that id is the identity of pub.
-func (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) {
- h, err := userIdSignatureV3Hash(id, pub, sig.Hash)
- if err != nil {
- return err
- }
- return pk.VerifySignatureV3(h, sig)
-}
-
-// KeyIdString returns the public key's fingerprint in capital hex
-// (e.g. "6C7EE1B8621CC013").
-func (pk *PublicKey) KeyIdString() string {
- return fmt.Sprintf("%X", pk.Fingerprint[12:20])
-}
-
-// KeyIdShortString returns the short form of public key's fingerprint
-// in capital hex, as shown by gpg --list-keys (e.g. "621CC013").
-func (pk *PublicKey) KeyIdShortString() string {
- return fmt.Sprintf("%X", pk.Fingerprint[16:20])
-}
-
-// A parsedMPI is used to store the contents of a big integer, along with the
-// bit length that was specified in the original input. This allows the MPI to
-// be reserialized exactly.
-type parsedMPI struct {
- bytes []byte
- bitLength uint16
-}
-
-// writeMPIs is a utility function for serializing several big integers to the
-// given Writer.
-func writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) {
- for _, mpi := range mpis {
- err = writeMPI(w, mpi.bitLength, mpi.bytes)
- if err != nil {
- return
- }
- }
- return
-}
-
-// BitLength returns the bit length for the given public key.
-func (pk *PublicKey) BitLength() (bitLength uint16, err error) {
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- bitLength = pk.n.bitLength
- case PubKeyAlgoDSA:
- bitLength = pk.p.bitLength
- case PubKeyAlgoElGamal:
- bitLength = pk.p.bitLength
- default:
- err = errors.InvalidArgumentError("bad public-key algorithm")
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_test.go
deleted file mode 100644
index 7ad7d9185..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
- "time"
-)
-
-var pubKeyTests = []struct {
- hexData string
- hexFingerprint string
- creationTime time.Time
- pubKeyAlgo PublicKeyAlgorithm
- keyId uint64
- keyIdString string
- keyIdShort string
-}{
- {rsaPkDataHex, rsaFingerprintHex, time.Unix(0x4d3c5c10, 0), PubKeyAlgoRSA, 0xa34d7e18c20c31bb, "A34D7E18C20C31BB", "C20C31BB"},
- {dsaPkDataHex, dsaFingerprintHex, time.Unix(0x4d432f89, 0), PubKeyAlgoDSA, 0x8e8fbe54062f19ed, "8E8FBE54062F19ED", "062F19ED"},
- {ecdsaPkDataHex, ecdsaFingerprintHex, time.Unix(0x5071c294, 0), PubKeyAlgoECDSA, 0x43fe956c542ca00b, "43FE956C542CA00B", "542CA00B"},
-}
-
-func TestPublicKeyRead(t *testing.T) {
- for i, test := range pubKeyTests {
- packet, err := Read(readerFromHex(test.hexData))
- if err != nil {
- t.Errorf("#%d: Read error: %s", i, err)
- continue
- }
- pk, ok := packet.(*PublicKey)
- if !ok {
- t.Errorf("#%d: failed to parse, got: %#v", i, packet)
- continue
- }
- if pk.PubKeyAlgo != test.pubKeyAlgo {
- t.Errorf("#%d: bad public key algorithm got:%x want:%x", i, pk.PubKeyAlgo, test.pubKeyAlgo)
- }
- if !pk.CreationTime.Equal(test.creationTime) {
- t.Errorf("#%d: bad creation time got:%v want:%v", i, pk.CreationTime, test.creationTime)
- }
- expectedFingerprint, _ := hex.DecodeString(test.hexFingerprint)
- if !bytes.Equal(expectedFingerprint, pk.Fingerprint[:]) {
- t.Errorf("#%d: bad fingerprint got:%x want:%x", i, pk.Fingerprint[:], expectedFingerprint)
- }
- if pk.KeyId != test.keyId {
- t.Errorf("#%d: bad keyid got:%x want:%x", i, pk.KeyId, test.keyId)
- }
- if g, e := pk.KeyIdString(), test.keyIdString; g != e {
- t.Errorf("#%d: bad KeyIdString got:%q want:%q", i, g, e)
- }
- if g, e := pk.KeyIdShortString(), test.keyIdShort; g != e {
- t.Errorf("#%d: bad KeyIdShortString got:%q want:%q", i, g, e)
- }
- }
-}
-
-func TestPublicKeySerialize(t *testing.T) {
- for i, test := range pubKeyTests {
- packet, err := Read(readerFromHex(test.hexData))
- if err != nil {
- t.Errorf("#%d: Read error: %s", i, err)
- continue
- }
- pk, ok := packet.(*PublicKey)
- if !ok {
- t.Errorf("#%d: failed to parse, got: %#v", i, packet)
- continue
- }
- serializeBuf := bytes.NewBuffer(nil)
- err = pk.Serialize(serializeBuf)
- if err != nil {
- t.Errorf("#%d: failed to serialize: %s", i, err)
- continue
- }
-
- packet, err = Read(serializeBuf)
- if err != nil {
- t.Errorf("#%d: Read error (from serialized data): %s", i, err)
- continue
- }
- pk, ok = packet.(*PublicKey)
- if !ok {
- t.Errorf("#%d: failed to parse serialized data, got: %#v", i, packet)
- continue
- }
- }
-}
-
-func TestEcc384Serialize(t *testing.T) {
- r := readerFromHex(ecc384PubHex)
- var w bytes.Buffer
- for i := 0; i < 2; i++ {
- // Public key
- p, err := Read(r)
- if err != nil {
- t.Error(err)
- }
- pubkey := p.(*PublicKey)
- if !bytes.Equal(pubkey.ec.oid, []byte{0x2b, 0x81, 0x04, 0x00, 0x22}) {
- t.Errorf("Unexpected pubkey OID: %x", pubkey.ec.oid)
- }
- if !bytes.Equal(pubkey.ec.p.bytes[:5], []byte{0x04, 0xf6, 0xb8, 0xc5, 0xac}) {
- t.Errorf("Unexpected pubkey P[:5]: %x", pubkey.ec.p.bytes)
- }
- if pubkey.KeyId != 0x098033880F54719F {
- t.Errorf("Unexpected pubkey ID: %x", pubkey.KeyId)
- }
- err = pubkey.Serialize(&w)
- if err != nil {
- t.Error(err)
- }
- // User ID
- p, err = Read(r)
- if err != nil {
- t.Error(err)
- }
- uid := p.(*UserId)
- if uid.Id != "ec_dsa_dh_384 <openpgp@brainhub.org>" {
- t.Error("Unexpected UID:", uid.Id)
- }
- err = uid.Serialize(&w)
- if err != nil {
- t.Error(err)
- }
- // User ID Sig
- p, err = Read(r)
- if err != nil {
- t.Error(err)
- }
- uidSig := p.(*Signature)
- err = pubkey.VerifyUserIdSignature(uid.Id, pubkey, uidSig)
- if err != nil {
- t.Error(err, ": UID")
- }
- err = uidSig.Serialize(&w)
- if err != nil {
- t.Error(err)
- }
- // Subkey
- p, err = Read(r)
- if err != nil {
- t.Error(err)
- }
- subkey := p.(*PublicKey)
- if !bytes.Equal(subkey.ec.oid, []byte{0x2b, 0x81, 0x04, 0x00, 0x22}) {
- t.Errorf("Unexpected subkey OID: %x", subkey.ec.oid)
- }
- if !bytes.Equal(subkey.ec.p.bytes[:5], []byte{0x04, 0x2f, 0xaa, 0x84, 0x02}) {
- t.Errorf("Unexpected subkey P[:5]: %x", subkey.ec.p.bytes)
- }
- if subkey.ecdh.KdfHash != 0x09 {
- t.Error("Expected KDF hash function SHA384 (0x09), got", subkey.ecdh.KdfHash)
- }
- if subkey.ecdh.KdfAlgo != 0x09 {
- t.Error("Expected KDF symmetric alg AES256 (0x09), got", subkey.ecdh.KdfAlgo)
- }
- if subkey.KeyId != 0xAA8B938F9A201946 {
- t.Errorf("Unexpected subkey ID: %x", subkey.KeyId)
- }
- err = subkey.Serialize(&w)
- if err != nil {
- t.Error(err)
- }
- // Subkey Sig
- p, err = Read(r)
- if err != nil {
- t.Error(err)
- }
- subkeySig := p.(*Signature)
- err = pubkey.VerifyKeySignature(subkey, subkeySig)
- if err != nil {
- t.Error(err)
- }
- err = subkeySig.Serialize(&w)
- if err != nil {
- t.Error(err)
- }
- // Now read back what we've written again
- r = bytes.NewBuffer(w.Bytes())
- w.Reset()
- }
-}
-
-const rsaFingerprintHex = "5fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb"
-
-const rsaPkDataHex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001"
-
-const dsaFingerprintHex = "eece4c094db002103714c63c8e8fbe54062f19ed"
-
-const dsaPkDataHex = "9901a2044d432f89110400cd581334f0d7a1e1bdc8b9d6d8c0baf68793632735d2bb0903224cbaa1dfbf35a60ee7a13b92643421e1eb41aa8d79bea19a115a677f6b8ba3c7818ce53a6c2a24a1608bd8b8d6e55c5090cbde09dd26e356267465ae25e69ec8bdd57c7bbb2623e4d73336f73a0a9098f7f16da2e25252130fd694c0e8070c55a812a423ae7f00a0ebf50e70c2f19c3520a551bd4b08d30f23530d3d03ff7d0bf4a53a64a09dc5e6e6e35854b7d70c882b0c60293401958b1bd9e40abec3ea05ba87cf64899299d4bd6aa7f459c201d3fbbd6c82004bdc5e8a9eb8082d12054cc90fa9d4ec251a843236a588bf49552441817436c4f43326966fe85447d4e6d0acf8fa1ef0f014730770603ad7634c3088dc52501c237328417c31c89ed70400b2f1a98b0bf42f11fefc430704bebbaa41d9f355600c3facee1e490f64208e0e094ea55e3a598a219a58500bf78ac677b670a14f4e47e9cf8eab4f368cc1ddcaa18cc59309d4cc62dd4f680e73e6cc3e1ce87a84d0925efbcb26c575c093fc42eecf45135fabf6403a25c2016e1774c0484e440a18319072c617cc97ac0a3bb0"
-
-const ecdsaFingerprintHex = "9892270b38b8980b05c8d56d43fe956c542ca00b"
-
-const ecdsaPkDataHex = "9893045071c29413052b8104002304230401f4867769cedfa52c325018896245443968e52e51d0c2df8d939949cb5b330f2921711fbee1c9b9dddb95d15cb0255e99badeddda7cc23d9ddcaacbc290969b9f24019375d61c2e4e3b36953a28d8b2bc95f78c3f1d592fb24499be348656a7b17e3963187b4361afe497bc5f9f81213f04069f8e1fb9e6a6290ae295ca1a92b894396cb4"
-
-// Source: https://sites.google.com/site/brainhub/pgpecckeys#TOC-ECC-NIST-P-384-key
-const ecc384PubHex = `99006f044d53059213052b81040022030304f6b8c5aced5b84ef9f4a209db2e4a9dfb70d28cb8c10ecd57674a9fa5a67389942b62d5e51367df4c7bfd3f8e500feecf07ed265a621a8ebbbe53e947ec78c677eba143bd1533c2b350e1c29f82313e1e1108eba063be1e64b10e6950e799c2db42465635f6473615f64685f333834203c6f70656e70677040627261696e6875622e6f72673e8900cb04101309005305024d530592301480000000002000077072656665727265642d656d61696c2d656e636f64696e67407067702e636f6d7067706d696d65040b090807021901051b03000000021602051e010000000415090a08000a0910098033880f54719fca2b0180aa37350968bd5f115afd8ce7bc7b103822152dbff06d0afcda835329510905b98cb469ba208faab87c7412b799e7b633017f58364ea480e8a1a3f253a0c5f22c446e8be9a9fce6210136ee30811abbd49139de28b5bdf8dc36d06ae748579e9ff503b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec9180301090989008404181309000c05024d530592051b0c000000000a0910098033880f54719f80970180eee7a6d8fcee41ee4f9289df17f9bcf9d955dca25c583b94336f3a2b2d4986dc5cf417b8d2dc86f741a9e1a6d236c0e3017d1c76575458a0cfb93ae8a2b274fcc65ceecd7a91eec83656ba13219969f06945b48c56bd04152c3a0553c5f2f4bd1267`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go
deleted file mode 100644
index 5daf7b6cf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2013 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 file.
-
-package packet
-
-import (
- "crypto"
- "crypto/md5"
- "crypto/rsa"
- "encoding/binary"
- "fmt"
- "hash"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/errors"
-)
-
-// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and
-// should not be used for signing or encrypting. They are supported here only for
-// parsing version 3 key material and validating signatures.
-// See RFC 4880, section 5.5.2.
-type PublicKeyV3 struct {
- CreationTime time.Time
- DaysToExpire uint16
- PubKeyAlgo PublicKeyAlgorithm
- PublicKey *rsa.PublicKey
- Fingerprint [16]byte
- KeyId uint64
- IsSubkey bool
-
- n, e parsedMPI
-}
-
-// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey.
-// Included here for testing purposes only. RFC 4880, section 5.5.2:
-// "an implementation MUST NOT generate a V3 key, but MAY accept it."
-func newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 {
- pk := &PublicKeyV3{
- CreationTime: creationTime,
- PublicKey: pub,
- n: fromBig(pub.N),
- e: fromBig(big.NewInt(int64(pub.E))),
- }
-
- pk.setFingerPrintAndKeyId()
- return pk
-}
-
-func (pk *PublicKeyV3) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.5.2
- var buf [8]byte
- if _, err = readFull(r, buf[:]); err != nil {
- return
- }
- if buf[0] < 2 || buf[0] > 3 {
- return errors.UnsupportedError("public key version")
- }
- pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)
- pk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7])
- pk.PubKeyAlgo = PublicKeyAlgorithm(buf[7])
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- err = pk.parseRSA(r)
- default:
- err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo)))
- }
- if err != nil {
- return
- }
-
- pk.setFingerPrintAndKeyId()
- return
-}
-
-func (pk *PublicKeyV3) setFingerPrintAndKeyId() {
- // RFC 4880, section 12.2
- fingerPrint := md5.New()
- fingerPrint.Write(pk.n.bytes)
- fingerPrint.Write(pk.e.bytes)
- fingerPrint.Sum(pk.Fingerprint[:0])
- pk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:])
-}
-
-// parseRSA parses RSA public key material from the given Reader. See RFC 4880,
-// section 5.5.2.
-func (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) {
- if pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil {
- return
- }
- if pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil {
- return
- }
-
- // RFC 4880 Section 12.2 requires the low 8 bytes of the
- // modulus to form the key id.
- if len(pk.n.bytes) < 8 {
- return errors.StructuralError("v3 public key modulus is too short")
- }
- if len(pk.e.bytes) > 3 {
- err = errors.UnsupportedError("large public exponent")
- return
- }
- rsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)}
- for i := 0; i < len(pk.e.bytes); i++ {
- rsa.E <<= 8
- rsa.E |= int(pk.e.bytes[i])
- }
- pk.PublicKey = rsa
- return
-}
-
-// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.
-// The prefix is used when calculating a signature over this public key. See
-// RFC 4880, section 5.2.4.
-func (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) {
- var pLength uint16
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- pLength += 2 + uint16(len(pk.n.bytes))
- pLength += 2 + uint16(len(pk.e.bytes))
- default:
- panic("unknown public key algorithm")
- }
- pLength += 6
- w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)})
- return
-}
-
-func (pk *PublicKeyV3) Serialize(w io.Writer) (err error) {
- length := 8 // 8 byte header
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- length += 2 + len(pk.n.bytes)
- length += 2 + len(pk.e.bytes)
- default:
- panic("unknown public key algorithm")
- }
-
- packetType := packetTypePublicKey
- if pk.IsSubkey {
- packetType = packetTypePublicSubkey
- }
- if err = serializeHeader(w, packetType, length); err != nil {
- return
- }
- return pk.serializeWithoutHeaders(w)
-}
-
-// serializeWithoutHeaders marshals the PublicKey to w in the form of an
-// OpenPGP public key packet, not including the packet header.
-func (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) {
- var buf [8]byte
- // Version 3
- buf[0] = 3
- // Creation time
- t := uint32(pk.CreationTime.Unix())
- buf[1] = byte(t >> 24)
- buf[2] = byte(t >> 16)
- buf[3] = byte(t >> 8)
- buf[4] = byte(t)
- // Days to expire
- buf[5] = byte(pk.DaysToExpire >> 8)
- buf[6] = byte(pk.DaysToExpire)
- // Public key algorithm
- buf[7] = byte(pk.PubKeyAlgo)
-
- if _, err = w.Write(buf[:]); err != nil {
- return
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- return writeMPIs(w, pk.n, pk.e)
- }
- return errors.InvalidArgumentError("bad public-key algorithm")
-}
-
-// CanSign returns true iff this public key can generate signatures
-func (pk *PublicKeyV3) CanSign() bool {
- return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly
-}
-
-// VerifySignatureV3 returns nil iff sig is a valid signature, made by this
-// public key, of the data hashed into signed. signed is mutated by this call.
-func (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) {
- if !pk.CanSign() {
- return errors.InvalidArgumentError("public key cannot generate signatures")
- }
-
- suffix := make([]byte, 5)
- suffix[0] = byte(sig.SigType)
- binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))
- signed.Write(suffix)
- hashBytes := signed.Sum(nil)
-
- if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
- return errors.SignatureError("hash tag doesn't match")
- }
-
- if pk.PubKeyAlgo != sig.PubKeyAlgo {
- return errors.InvalidArgumentError("public key and signature use different algorithms")
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- if err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil {
- return errors.SignatureError("RSA verification failure")
- }
- return
- default:
- // V3 public keys only support RSA.
- panic("shouldn't happen")
- }
-}
-
-// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this
-// public key, that id is the identity of pub.
-func (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) {
- h, err := userIdSignatureV3Hash(id, pk, sig.Hash)
- if err != nil {
- return err
- }
- return pk.VerifySignatureV3(h, sig)
-}
-
-// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this
-// public key, of signed.
-func (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) {
- h, err := keySignatureHash(pk, signed, sig.Hash)
- if err != nil {
- return err
- }
- return pk.VerifySignatureV3(h, sig)
-}
-
-// userIdSignatureV3Hash returns a Hash of the message that needs to be signed
-// to assert that pk is a valid key for id.
-func userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) {
- if !hfn.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- h = hfn.New()
-
- // RFC 4880, section 5.2.4
- pk.SerializeSignaturePrefix(h)
- pk.serializeWithoutHeaders(h)
-
- h.Write([]byte(id))
-
- return
-}
-
-// KeyIdString returns the public key's fingerprint in capital hex
-// (e.g. "6C7EE1B8621CC013").
-func (pk *PublicKeyV3) KeyIdString() string {
- return fmt.Sprintf("%X", pk.KeyId)
-}
-
-// KeyIdShortString returns the short form of public key's fingerprint
-// in capital hex, as shown by gpg --list-keys (e.g. "621CC013").
-func (pk *PublicKeyV3) KeyIdShortString() string {
- return fmt.Sprintf("%X", pk.KeyId&0xFFFFFFFF)
-}
-
-// BitLength returns the bit length for the given public key.
-func (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) {
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- bitLength = pk.n.bitLength
- default:
- err = errors.InvalidArgumentError("bad public-key algorithm")
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3_test.go
deleted file mode 100644
index e06405904..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3_test.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2013 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
- "time"
-)
-
-var pubKeyV3Test = struct {
- hexFingerprint string
- creationTime time.Time
- pubKeyAlgo PublicKeyAlgorithm
- keyId uint64
- keyIdString string
- keyIdShort string
-}{
- "103BECF5BD1E837C89D19E98487767F7",
- time.Unix(779753634, 0),
- PubKeyAlgoRSA,
- 0xDE0F188A5DA5E3C9,
- "DE0F188A5DA5E3C9",
- "5DA5E3C9"}
-
-func TestPublicKeyV3Read(t *testing.T) {
- i, test := 0, pubKeyV3Test
- packet, err := Read(v3KeyReader(t))
- if err != nil {
- t.Fatalf("#%d: Read error: %s", i, err)
- }
- pk, ok := packet.(*PublicKeyV3)
- if !ok {
- t.Fatalf("#%d: failed to parse, got: %#v", i, packet)
- }
- if pk.PubKeyAlgo != test.pubKeyAlgo {
- t.Errorf("#%d: bad public key algorithm got:%x want:%x", i, pk.PubKeyAlgo, test.pubKeyAlgo)
- }
- if !pk.CreationTime.Equal(test.creationTime) {
- t.Errorf("#%d: bad creation time got:%v want:%v", i, pk.CreationTime, test.creationTime)
- }
- expectedFingerprint, _ := hex.DecodeString(test.hexFingerprint)
- if !bytes.Equal(expectedFingerprint, pk.Fingerprint[:]) {
- t.Errorf("#%d: bad fingerprint got:%x want:%x", i, pk.Fingerprint[:], expectedFingerprint)
- }
- if pk.KeyId != test.keyId {
- t.Errorf("#%d: bad keyid got:%x want:%x", i, pk.KeyId, test.keyId)
- }
- if g, e := pk.KeyIdString(), test.keyIdString; g != e {
- t.Errorf("#%d: bad KeyIdString got:%q want:%q", i, g, e)
- }
- if g, e := pk.KeyIdShortString(), test.keyIdShort; g != e {
- t.Errorf("#%d: bad KeyIdShortString got:%q want:%q", i, g, e)
- }
-}
-
-func TestPublicKeyV3Serialize(t *testing.T) {
- //for i, test := range pubKeyV3Tests {
- i := 0
- packet, err := Read(v3KeyReader(t))
- if err != nil {
- t.Fatalf("#%d: Read error: %s", i, err)
- }
- pk, ok := packet.(*PublicKeyV3)
- if !ok {
- t.Fatalf("#%d: failed to parse, got: %#v", i, packet)
- }
- var serializeBuf bytes.Buffer
- if err = pk.Serialize(&serializeBuf); err != nil {
- t.Fatalf("#%d: failed to serialize: %s", i, err)
- }
-
- if packet, err = Read(bytes.NewBuffer(serializeBuf.Bytes())); err != nil {
- t.Fatalf("#%d: Read error (from serialized data): %s", i, err)
- }
- if pk, ok = packet.(*PublicKeyV3); !ok {
- t.Fatalf("#%d: failed to parse serialized data, got: %#v", i, packet)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/reader.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/reader.go
deleted file mode 100644
index 34bc7c613..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/reader.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "golang.org/x/crypto/openpgp/errors"
- "io"
-)
-
-// Reader reads packets from an io.Reader and allows packets to be 'unread' so
-// that they result from the next call to Next.
-type Reader struct {
- q []Packet
- readers []io.Reader
-}
-
-// New io.Readers are pushed when a compressed or encrypted packet is processed
-// and recursively treated as a new source of packets. However, a carefully
-// crafted packet can trigger an infinite recursive sequence of packets. See
-// http://mumble.net/~campbell/misc/pgp-quine
-// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402
-// This constant limits the number of recursive packets that may be pushed.
-const maxReaders = 32
-
-// Next returns the most recently unread Packet, or reads another packet from
-// the top-most io.Reader. Unknown packet types are skipped.
-func (r *Reader) Next() (p Packet, err error) {
- if len(r.q) > 0 {
- p = r.q[len(r.q)-1]
- r.q = r.q[:len(r.q)-1]
- return
- }
-
- for len(r.readers) > 0 {
- p, err = Read(r.readers[len(r.readers)-1])
- if err == nil {
- return
- }
- if err == io.EOF {
- r.readers = r.readers[:len(r.readers)-1]
- continue
- }
- if _, ok := err.(errors.UnknownPacketTypeError); !ok {
- return nil, err
- }
- }
-
- return nil, io.EOF
-}
-
-// Push causes the Reader to start reading from a new io.Reader. When an EOF
-// error is seen from the new io.Reader, it is popped and the Reader continues
-// to read from the next most recent io.Reader. Push returns a StructuralError
-// if pushing the reader would exceed the maximum recursion level, otherwise it
-// returns nil.
-func (r *Reader) Push(reader io.Reader) (err error) {
- if len(r.readers) >= maxReaders {
- return errors.StructuralError("too many layers of packets")
- }
- r.readers = append(r.readers, reader)
- return nil
-}
-
-// Unread causes the given Packet to be returned from the next call to Next.
-func (r *Reader) Unread(p Packet) {
- r.q = append(r.q, p)
-}
-
-func NewReader(r io.Reader) *Reader {
- return &Reader{
- q: nil,
- readers: []io.Reader{r},
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature.go
deleted file mode 100644
index 6ce0cbedb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature.go
+++ /dev/null
@@ -1,731 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/dsa"
- "crypto/ecdsa"
- "encoding/asn1"
- "encoding/binary"
- "hash"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/s2k"
-)
-
-const (
- // See RFC 4880, section 5.2.3.21 for details.
- KeyFlagCertify = 1 << iota
- KeyFlagSign
- KeyFlagEncryptCommunications
- KeyFlagEncryptStorage
-)
-
-// Signature represents a signature. See RFC 4880, section 5.2.
-type Signature struct {
- SigType SignatureType
- PubKeyAlgo PublicKeyAlgorithm
- Hash crypto.Hash
-
- // HashSuffix is extra data that is hashed in after the signed data.
- HashSuffix []byte
- // HashTag contains the first two bytes of the hash for fast rejection
- // of bad signed data.
- HashTag [2]byte
- CreationTime time.Time
-
- RSASignature parsedMPI
- DSASigR, DSASigS parsedMPI
- ECDSASigR, ECDSASigS parsedMPI
-
- // rawSubpackets contains the unparsed subpackets, in order.
- rawSubpackets []outputSubpacket
-
- // The following are optional so are nil when not included in the
- // signature.
-
- SigLifetimeSecs, KeyLifetimeSecs *uint32
- PreferredSymmetric, PreferredHash, PreferredCompression []uint8
- IssuerKeyId *uint64
- IsPrimaryId *bool
-
- // FlagsValid is set if any flags were given. See RFC 4880, section
- // 5.2.3.21 for details.
- FlagsValid bool
- FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool
-
- // RevocationReason is set if this signature has been revoked.
- // See RFC 4880, section 5.2.3.23 for details.
- RevocationReason *uint8
- RevocationReasonText string
-
- // MDC is set if this signature has a feature packet that indicates
- // support for MDC subpackets.
- MDC bool
-
- // EmbeddedSignature, if non-nil, is a signature of the parent key, by
- // this key. This prevents an attacker from claiming another's signing
- // subkey as their own.
- EmbeddedSignature *Signature
-
- outSubpackets []outputSubpacket
-}
-
-func (sig *Signature) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.2.3
- var buf [5]byte
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- if buf[0] != 4 {
- err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0])))
- return
- }
-
- _, err = readFull(r, buf[:5])
- if err != nil {
- return
- }
- sig.SigType = SignatureType(buf[0])
- sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1])
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA:
- default:
- err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo)))
- return
- }
-
- var ok bool
- sig.Hash, ok = s2k.HashIdToHash(buf[2])
- if !ok {
- return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2])))
- }
-
- hashedSubpacketsLength := int(buf[3])<<8 | int(buf[4])
- l := 6 + hashedSubpacketsLength
- sig.HashSuffix = make([]byte, l+6)
- sig.HashSuffix[0] = 4
- copy(sig.HashSuffix[1:], buf[:5])
- hashedSubpackets := sig.HashSuffix[6:l]
- _, err = readFull(r, hashedSubpackets)
- if err != nil {
- return
- }
- // See RFC 4880, section 5.2.4
- trailer := sig.HashSuffix[l:]
- trailer[0] = 4
- trailer[1] = 0xff
- trailer[2] = uint8(l >> 24)
- trailer[3] = uint8(l >> 16)
- trailer[4] = uint8(l >> 8)
- trailer[5] = uint8(l)
-
- err = parseSignatureSubpackets(sig, hashedSubpackets, true)
- if err != nil {
- return
- }
-
- _, err = readFull(r, buf[:2])
- if err != nil {
- return
- }
- unhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1])
- unhashedSubpackets := make([]byte, unhashedSubpacketsLength)
- _, err = readFull(r, unhashedSubpackets)
- if err != nil {
- return
- }
- err = parseSignatureSubpackets(sig, unhashedSubpackets, false)
- if err != nil {
- return
- }
-
- _, err = readFull(r, sig.HashTag[:2])
- if err != nil {
- return
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r)
- case PubKeyAlgoDSA:
- sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r)
- if err == nil {
- sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r)
- }
- case PubKeyAlgoECDSA:
- sig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r)
- if err == nil {
- sig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r)
- }
- default:
- panic("unreachable")
- }
- return
-}
-
-// parseSignatureSubpackets parses subpackets of the main signature packet. See
-// RFC 4880, section 5.2.3.1.
-func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) {
- for len(subpackets) > 0 {
- subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed)
- if err != nil {
- return
- }
- }
-
- if sig.CreationTime.IsZero() {
- err = errors.StructuralError("no creation time in signature")
- }
-
- return
-}
-
-type signatureSubpacketType uint8
-
-const (
- creationTimeSubpacket signatureSubpacketType = 2
- signatureExpirationSubpacket signatureSubpacketType = 3
- keyExpirationSubpacket signatureSubpacketType = 9
- prefSymmetricAlgosSubpacket signatureSubpacketType = 11
- issuerSubpacket signatureSubpacketType = 16
- prefHashAlgosSubpacket signatureSubpacketType = 21
- prefCompressionSubpacket signatureSubpacketType = 22
- primaryUserIdSubpacket signatureSubpacketType = 25
- keyFlagsSubpacket signatureSubpacketType = 27
- reasonForRevocationSubpacket signatureSubpacketType = 29
- featuresSubpacket signatureSubpacketType = 30
- embeddedSignatureSubpacket signatureSubpacketType = 32
-)
-
-// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1.
-func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) {
- // RFC 4880, section 5.2.3.1
- var (
- length uint32
- packetType signatureSubpacketType
- isCritical bool
- )
- switch {
- case subpacket[0] < 192:
- length = uint32(subpacket[0])
- subpacket = subpacket[1:]
- case subpacket[0] < 255:
- if len(subpacket) < 2 {
- goto Truncated
- }
- length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192
- subpacket = subpacket[2:]
- default:
- if len(subpacket) < 5 {
- goto Truncated
- }
- length = uint32(subpacket[1])<<24 |
- uint32(subpacket[2])<<16 |
- uint32(subpacket[3])<<8 |
- uint32(subpacket[4])
- subpacket = subpacket[5:]
- }
- if length > uint32(len(subpacket)) {
- goto Truncated
- }
- rest = subpacket[length:]
- subpacket = subpacket[:length]
- if len(subpacket) == 0 {
- err = errors.StructuralError("zero length signature subpacket")
- return
- }
- packetType = signatureSubpacketType(subpacket[0] & 0x7f)
- isCritical = subpacket[0]&0x80 == 0x80
- subpacket = subpacket[1:]
- sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket})
- switch packetType {
- case creationTimeSubpacket:
- if !isHashed {
- err = errors.StructuralError("signature creation time in non-hashed area")
- return
- }
- if len(subpacket) != 4 {
- err = errors.StructuralError("signature creation time not four bytes")
- return
- }
- t := binary.BigEndian.Uint32(subpacket)
- sig.CreationTime = time.Unix(int64(t), 0)
- case signatureExpirationSubpacket:
- // Signature expiration time, section 5.2.3.10
- if !isHashed {
- return
- }
- if len(subpacket) != 4 {
- err = errors.StructuralError("expiration subpacket with bad length")
- return
- }
- sig.SigLifetimeSecs = new(uint32)
- *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket)
- case keyExpirationSubpacket:
- // Key expiration time, section 5.2.3.6
- if !isHashed {
- return
- }
- if len(subpacket) != 4 {
- err = errors.StructuralError("key expiration subpacket with bad length")
- return
- }
- sig.KeyLifetimeSecs = new(uint32)
- *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket)
- case prefSymmetricAlgosSubpacket:
- // Preferred symmetric algorithms, section 5.2.3.7
- if !isHashed {
- return
- }
- sig.PreferredSymmetric = make([]byte, len(subpacket))
- copy(sig.PreferredSymmetric, subpacket)
- case issuerSubpacket:
- // Issuer, section 5.2.3.5
- if len(subpacket) != 8 {
- err = errors.StructuralError("issuer subpacket with bad length")
- return
- }
- sig.IssuerKeyId = new(uint64)
- *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket)
- case prefHashAlgosSubpacket:
- // Preferred hash algorithms, section 5.2.3.8
- if !isHashed {
- return
- }
- sig.PreferredHash = make([]byte, len(subpacket))
- copy(sig.PreferredHash, subpacket)
- case prefCompressionSubpacket:
- // Preferred compression algorithms, section 5.2.3.9
- if !isHashed {
- return
- }
- sig.PreferredCompression = make([]byte, len(subpacket))
- copy(sig.PreferredCompression, subpacket)
- case primaryUserIdSubpacket:
- // Primary User ID, section 5.2.3.19
- if !isHashed {
- return
- }
- if len(subpacket) != 1 {
- err = errors.StructuralError("primary user id subpacket with bad length")
- return
- }
- sig.IsPrimaryId = new(bool)
- if subpacket[0] > 0 {
- *sig.IsPrimaryId = true
- }
- case keyFlagsSubpacket:
- // Key flags, section 5.2.3.21
- if !isHashed {
- return
- }
- if len(subpacket) == 0 {
- err = errors.StructuralError("empty key flags subpacket")
- return
- }
- sig.FlagsValid = true
- if subpacket[0]&KeyFlagCertify != 0 {
- sig.FlagCertify = true
- }
- if subpacket[0]&KeyFlagSign != 0 {
- sig.FlagSign = true
- }
- if subpacket[0]&KeyFlagEncryptCommunications != 0 {
- sig.FlagEncryptCommunications = true
- }
- if subpacket[0]&KeyFlagEncryptStorage != 0 {
- sig.FlagEncryptStorage = true
- }
- case reasonForRevocationSubpacket:
- // Reason For Revocation, section 5.2.3.23
- if !isHashed {
- return
- }
- if len(subpacket) == 0 {
- err = errors.StructuralError("empty revocation reason subpacket")
- return
- }
- sig.RevocationReason = new(uint8)
- *sig.RevocationReason = subpacket[0]
- sig.RevocationReasonText = string(subpacket[1:])
- case featuresSubpacket:
- // Features subpacket, section 5.2.3.24 specifies a very general
- // mechanism for OpenPGP implementations to signal support for new
- // features. In practice, the subpacket is used exclusively to
- // indicate support for MDC-protected encryption.
- sig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1
- case embeddedSignatureSubpacket:
- // Only usage is in signatures that cross-certify
- // signing subkeys. section 5.2.3.26 describes the
- // format, with its usage described in section 11.1
- if sig.EmbeddedSignature != nil {
- err = errors.StructuralError("Cannot have multiple embedded signatures")
- return
- }
- sig.EmbeddedSignature = new(Signature)
- // Embedded signatures are required to be v4 signatures see
- // section 12.1. However, we only parse v4 signatures in this
- // file anyway.
- if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil {
- return nil, err
- }
- if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding {
- return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType)))
- }
- default:
- if isCritical {
- err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType)))
- return
- }
- }
- return
-
-Truncated:
- err = errors.StructuralError("signature subpacket truncated")
- return
-}
-
-// subpacketLengthLength returns the length, in bytes, of an encoded length value.
-func subpacketLengthLength(length int) int {
- if length < 192 {
- return 1
- }
- if length < 16320 {
- return 2
- }
- return 5
-}
-
-// serializeSubpacketLength marshals the given length into to.
-func serializeSubpacketLength(to []byte, length int) int {
- // RFC 4880, Section 4.2.2.
- if length < 192 {
- to[0] = byte(length)
- return 1
- }
- if length < 16320 {
- length -= 192
- to[0] = byte((length >> 8) + 192)
- to[1] = byte(length)
- return 2
- }
- to[0] = 255
- to[1] = byte(length >> 24)
- to[2] = byte(length >> 16)
- to[3] = byte(length >> 8)
- to[4] = byte(length)
- return 5
-}
-
-// subpacketsLength returns the serialized length, in bytes, of the given
-// subpackets.
-func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) {
- for _, subpacket := range subpackets {
- if subpacket.hashed == hashed {
- length += subpacketLengthLength(len(subpacket.contents) + 1)
- length += 1 // type byte
- length += len(subpacket.contents)
- }
- }
- return
-}
-
-// serializeSubpackets marshals the given subpackets into to.
-func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) {
- for _, subpacket := range subpackets {
- if subpacket.hashed == hashed {
- n := serializeSubpacketLength(to, len(subpacket.contents)+1)
- to[n] = byte(subpacket.subpacketType)
- to = to[1+n:]
- n = copy(to, subpacket.contents)
- to = to[n:]
- }
- }
- return
-}
-
-// KeyExpired returns whether sig is a self-signature of a key that has
-// expired.
-func (sig *Signature) KeyExpired(currentTime time.Time) bool {
- if sig.KeyLifetimeSecs == nil {
- return false
- }
- expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second)
- return currentTime.After(expiry)
-}
-
-// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing.
-func (sig *Signature) buildHashSuffix() (err error) {
- hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)
-
- var ok bool
- l := 6 + hashedSubpacketsLen
- sig.HashSuffix = make([]byte, l+6)
- sig.HashSuffix[0] = 4
- sig.HashSuffix[1] = uint8(sig.SigType)
- sig.HashSuffix[2] = uint8(sig.PubKeyAlgo)
- sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash)
- if !ok {
- sig.HashSuffix = nil
- return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash)))
- }
- sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8)
- sig.HashSuffix[5] = byte(hashedSubpacketsLen)
- serializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true)
- trailer := sig.HashSuffix[l:]
- trailer[0] = 4
- trailer[1] = 0xff
- trailer[2] = byte(l >> 24)
- trailer[3] = byte(l >> 16)
- trailer[4] = byte(l >> 8)
- trailer[5] = byte(l)
- return
-}
-
-func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) {
- err = sig.buildHashSuffix()
- if err != nil {
- return
- }
-
- h.Write(sig.HashSuffix)
- digest = h.Sum(nil)
- copy(sig.HashTag[:], digest)
- return
-}
-
-// Sign signs a message with a private key. The hash, h, must contain
-// the hash of the message to be signed and will be mutated by this function.
-// On success, the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) {
- sig.outSubpackets = sig.buildSubpackets()
- digest, err := sig.signPrepareHash(h)
- if err != nil {
- return
- }
-
- switch priv.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- // supports both *rsa.PrivateKey and crypto.Signer
- sig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
- sig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes))
- case PubKeyAlgoDSA:
- dsaPriv := priv.PrivateKey.(*dsa.PrivateKey)
-
- // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
- subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8
- if len(digest) > subgroupSize {
- digest = digest[:subgroupSize]
- }
- r, s, err := dsa.Sign(config.Random(), dsaPriv, digest)
- if err == nil {
- sig.DSASigR.bytes = r.Bytes()
- sig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes))
- sig.DSASigS.bytes = s.Bytes()
- sig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes))
- }
- case PubKeyAlgoECDSA:
- var r, s *big.Int
- if pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok {
- // direct support, avoid asn1 wrapping/unwrapping
- r, s, err = ecdsa.Sign(config.Random(), pk, digest)
- } else {
- var b []byte
- b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, nil)
- if err == nil {
- r, s, err = unwrapECDSASig(b)
- }
- }
- if err == nil {
- sig.ECDSASigR = fromBig(r)
- sig.ECDSASigS = fromBig(s)
- }
- default:
- err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo)))
- }
-
- return
-}
-
-// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA
-// signature.
-func unwrapECDSASig(b []byte) (r, s *big.Int, err error) {
- var ecsdaSig struct {
- R, S *big.Int
- }
- _, err = asn1.Unmarshal(b, &ecsdaSig)
- if err != nil {
- return
- }
- return ecsdaSig.R, ecsdaSig.S, nil
-}
-
-// SignUserId computes a signature from priv, asserting that pub is a valid
-// key for the identity id. On success, the signature is stored in sig. Call
-// Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error {
- h, err := userIdSignatureHash(id, pub, sig.Hash)
- if err != nil {
- return err
- }
- return sig.Sign(h, priv, config)
-}
-
-// SignKey computes a signature from priv, asserting that pub is a subkey. On
-// success, the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error {
- h, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash)
- if err != nil {
- return err
- }
- return sig.Sign(h, priv, config)
-}
-
-// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been
-// called first.
-func (sig *Signature) Serialize(w io.Writer) (err error) {
- if len(sig.outSubpackets) == 0 {
- sig.outSubpackets = sig.rawSubpackets
- }
- if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil {
- return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize")
- }
-
- sigLength := 0
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- sigLength = 2 + len(sig.RSASignature.bytes)
- case PubKeyAlgoDSA:
- sigLength = 2 + len(sig.DSASigR.bytes)
- sigLength += 2 + len(sig.DSASigS.bytes)
- case PubKeyAlgoECDSA:
- sigLength = 2 + len(sig.ECDSASigR.bytes)
- sigLength += 2 + len(sig.ECDSASigS.bytes)
- default:
- panic("impossible")
- }
-
- unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)
- length := len(sig.HashSuffix) - 6 /* trailer not included */ +
- 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen +
- 2 /* hash tag */ + sigLength
- err = serializeHeader(w, packetTypeSignature, length)
- if err != nil {
- return
- }
-
- _, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6])
- if err != nil {
- return
- }
-
- unhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen)
- unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8)
- unhashedSubpackets[1] = byte(unhashedSubpacketsLen)
- serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false)
-
- _, err = w.Write(unhashedSubpackets)
- if err != nil {
- return
- }
- _, err = w.Write(sig.HashTag[:])
- if err != nil {
- return
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- err = writeMPIs(w, sig.RSASignature)
- case PubKeyAlgoDSA:
- err = writeMPIs(w, sig.DSASigR, sig.DSASigS)
- case PubKeyAlgoECDSA:
- err = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS)
- default:
- panic("impossible")
- }
- return
-}
-
-// outputSubpacket represents a subpacket to be marshaled.
-type outputSubpacket struct {
- hashed bool // true if this subpacket is in the hashed area.
- subpacketType signatureSubpacketType
- isCritical bool
- contents []byte
-}
-
-func (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) {
- creationTime := make([]byte, 4)
- binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
- subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime})
-
- if sig.IssuerKeyId != nil {
- keyId := make([]byte, 8)
- binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId)
- subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId})
- }
-
- if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
- sigLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
- }
-
- // Key flags may only appear in self-signatures or certification signatures.
-
- if sig.FlagsValid {
- var flags byte
- if sig.FlagCertify {
- flags |= KeyFlagCertify
- }
- if sig.FlagSign {
- flags |= KeyFlagSign
- }
- if sig.FlagEncryptCommunications {
- flags |= KeyFlagEncryptCommunications
- }
- if sig.FlagEncryptStorage {
- flags |= KeyFlagEncryptStorage
- }
- subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}})
- }
-
- // The following subpackets may only appear in self-signatures
-
- if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
- keyLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
- }
-
- if sig.IsPrimaryId != nil && *sig.IsPrimaryId {
- subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})
- }
-
- if len(sig.PreferredSymmetric) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})
- }
-
- if len(sig.PreferredHash) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})
- }
-
- if len(sig.PreferredCompression) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})
- }
-
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_test.go
deleted file mode 100644
index 56e761179..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "encoding/hex"
- "testing"
-)
-
-func TestSignatureRead(t *testing.T) {
- packet, err := Read(readerFromHex(signatureDataHex))
- if err != nil {
- t.Error(err)
- return
- }
- sig, ok := packet.(*Signature)
- if !ok || sig.SigType != SigTypeBinary || sig.PubKeyAlgo != PubKeyAlgoRSA || sig.Hash != crypto.SHA1 {
- t.Errorf("failed to parse, got: %#v", packet)
- }
-}
-
-func TestSignatureReserialize(t *testing.T) {
- packet, _ := Read(readerFromHex(signatureDataHex))
- sig := packet.(*Signature)
- out := new(bytes.Buffer)
- err := sig.Serialize(out)
- if err != nil {
- t.Errorf("error reserializing: %s", err)
- return
- }
-
- expected, _ := hex.DecodeString(signatureDataHex)
- if !bytes.Equal(expected, out.Bytes()) {
- t.Errorf("output doesn't match input (got vs expected):\n%s\n%s", hex.Dump(out.Bytes()), hex.Dump(expected))
- }
-}
-
-func TestSignUserId(t *testing.T) {
- sig := &Signature{
- SigType: SigTypeGenericCert,
- PubKeyAlgo: PubKeyAlgoRSA,
- Hash: 0, // invalid hash function
- }
-
- packet, err := Read(readerFromHex(rsaPkDataHex))
- if err != nil {
- t.Fatalf("failed to deserialize public key: %v", err)
- }
- pubKey := packet.(*PublicKey)
-
- packet, err = Read(readerFromHex(privKeyRSAHex))
- if err != nil {
- t.Fatalf("failed to deserialize private key: %v", err)
- }
- privKey := packet.(*PrivateKey)
-
- err = sig.SignUserId("", pubKey, privKey, nil)
- if err == nil {
- t.Errorf("did not receive an error when expected")
- }
-
- sig.Hash = crypto.SHA256
- err = privKey.Decrypt([]byte("testing"))
- if err != nil {
- t.Fatalf("failed to decrypt private key: %v", err)
- }
-
- err = sig.SignUserId("", pubKey, privKey, nil)
- if err != nil {
- t.Errorf("failed to sign user id: %v", err)
- }
-}
-
-const signatureDataHex = "c2c05c04000102000605024cb45112000a0910ab105c91af38fb158f8d07ff5596ea368c5efe015bed6e78348c0f033c931d5f2ce5db54ce7f2a7e4b4ad64db758d65a7a71773edeab7ba2a9e0908e6a94a1175edd86c1d843279f045b021a6971a72702fcbd650efc393c5474d5b59a15f96d2eaad4c4c426797e0dcca2803ef41c6ff234d403eec38f31d610c344c06f2401c262f0993b2e66cad8a81ebc4322c723e0d4ba09fe917e8777658307ad8329adacba821420741009dfe87f007759f0982275d028a392c6ed983a0d846f890b36148c7358bdb8a516007fac760261ecd06076813831a36d0459075d1befa245ae7f7fb103d92ca759e9498fe60ef8078a39a3beda510deea251ea9f0a7f0df6ef42060f20780360686f3e400e"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go
deleted file mode 100644
index 6edff8893..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2013 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 file.
-
-package packet
-
-import (
- "crypto"
- "encoding/binary"
- "fmt"
- "io"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/s2k"
-)
-
-// SignatureV3 represents older version 3 signatures. These signatures are less secure
-// than version 4 and should not be used to create new signatures. They are included
-// here for backwards compatibility to read and validate with older key material.
-// See RFC 4880, section 5.2.2.
-type SignatureV3 struct {
- SigType SignatureType
- CreationTime time.Time
- IssuerKeyId uint64
- PubKeyAlgo PublicKeyAlgorithm
- Hash crypto.Hash
- HashTag [2]byte
-
- RSASignature parsedMPI
- DSASigR, DSASigS parsedMPI
-}
-
-func (sig *SignatureV3) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.2.2
- var buf [8]byte
- if _, err = readFull(r, buf[:1]); err != nil {
- return
- }
- if buf[0] < 2 || buf[0] > 3 {
- err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0])))
- return
- }
- if _, err = readFull(r, buf[:1]); err != nil {
- return
- }
- if buf[0] != 5 {
- err = errors.UnsupportedError(
- "invalid hashed material length " + strconv.Itoa(int(buf[0])))
- return
- }
-
- // Read hashed material: signature type + creation time
- if _, err = readFull(r, buf[:5]); err != nil {
- return
- }
- sig.SigType = SignatureType(buf[0])
- t := binary.BigEndian.Uint32(buf[1:5])
- sig.CreationTime = time.Unix(int64(t), 0)
-
- // Eight-octet Key ID of signer.
- if _, err = readFull(r, buf[:8]); err != nil {
- return
- }
- sig.IssuerKeyId = binary.BigEndian.Uint64(buf[:])
-
- // Public-key and hash algorithm
- if _, err = readFull(r, buf[:2]); err != nil {
- return
- }
- sig.PubKeyAlgo = PublicKeyAlgorithm(buf[0])
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA:
- default:
- err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo)))
- return
- }
- var ok bool
- if sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok {
- return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2])))
- }
-
- // Two-octet field holding left 16 bits of signed hash value.
- if _, err = readFull(r, sig.HashTag[:2]); err != nil {
- return
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r)
- case PubKeyAlgoDSA:
- if sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil {
- return
- }
- sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r)
- default:
- panic("unreachable")
- }
- return
-}
-
-// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been
-// called first.
-func (sig *SignatureV3) Serialize(w io.Writer) (err error) {
- buf := make([]byte, 8)
-
- // Write the sig type and creation time
- buf[0] = byte(sig.SigType)
- binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix()))
- if _, err = w.Write(buf[:5]); err != nil {
- return
- }
-
- // Write the issuer long key ID
- binary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId)
- if _, err = w.Write(buf[:8]); err != nil {
- return
- }
-
- // Write public key algorithm, hash ID, and hash value
- buf[0] = byte(sig.PubKeyAlgo)
- hashId, ok := s2k.HashToHashId(sig.Hash)
- if !ok {
- return errors.UnsupportedError(fmt.Sprintf("hash function %v", sig.Hash))
- }
- buf[1] = hashId
- copy(buf[2:4], sig.HashTag[:])
- if _, err = w.Write(buf[:4]); err != nil {
- return
- }
-
- if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil {
- return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize")
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- err = writeMPIs(w, sig.RSASignature)
- case PubKeyAlgoDSA:
- err = writeMPIs(w, sig.DSASigR, sig.DSASigS)
- default:
- panic("impossible")
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3_test.go
deleted file mode 100644
index ad7b62ac1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/signature_v3_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2013 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "encoding/hex"
- "io"
- "io/ioutil"
- "testing"
-
- "golang.org/x/crypto/openpgp/armor"
-)
-
-func TestSignatureV3Read(t *testing.T) {
- r := v3KeyReader(t)
- Read(r) // Skip public key
- Read(r) // Skip uid
- packet, err := Read(r) // Signature
- if err != nil {
- t.Error(err)
- return
- }
- sig, ok := packet.(*SignatureV3)
- if !ok || sig.SigType != SigTypeGenericCert || sig.PubKeyAlgo != PubKeyAlgoRSA || sig.Hash != crypto.MD5 {
- t.Errorf("failed to parse, got: %#v", packet)
- }
-}
-
-func TestSignatureV3Reserialize(t *testing.T) {
- r := v3KeyReader(t)
- Read(r) // Skip public key
- Read(r) // Skip uid
- packet, err := Read(r)
- if err != nil {
- t.Error(err)
- return
- }
- sig := packet.(*SignatureV3)
- out := new(bytes.Buffer)
- if err = sig.Serialize(out); err != nil {
- t.Errorf("error reserializing: %s", err)
- return
- }
- expected, err := ioutil.ReadAll(v3KeyReader(t))
- if err != nil {
- t.Error(err)
- return
- }
- expected = expected[4+141+4+39:] // See pgpdump offsets below, this is where the sig starts
- if !bytes.Equal(expected, out.Bytes()) {
- t.Errorf("output doesn't match input (got vs expected):\n%s\n%s", hex.Dump(out.Bytes()), hex.Dump(expected))
- }
-}
-
-func v3KeyReader(t *testing.T) io.Reader {
- armorBlock, err := armor.Decode(bytes.NewBufferString(keySigV3Armor))
- if err != nil {
- t.Fatalf("armor Decode failed: %v", err)
- }
- return armorBlock.Body
-}
-
-// keySigV3Armor is some V3 public key I found in an SKS dump.
-// Old: Public Key Packet(tag 6)(141 bytes)
-// Ver 4 - new
-// Public key creation time - Fri Sep 16 17:13:54 CDT 1994
-// Pub alg - unknown(pub 0)
-// Unknown public key(pub 0)
-// Old: User ID Packet(tag 13)(39 bytes)
-// User ID - Armin M. Warda <warda@nephilim.ruhr.de>
-// Old: Signature Packet(tag 2)(149 bytes)
-// Ver 4 - new
-// Sig type - unknown(05)
-// Pub alg - ElGamal Encrypt-Only(pub 16)
-// Hash alg - unknown(hash 46)
-// Hashed Sub: unknown(sub 81, critical)(1988 bytes)
-const keySigV3Armor = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: SKS 1.0.10
-
-mI0CLnoYogAAAQQA1qwA2SuJwfQ5bCQ6u5t20ulnOtY0gykf7YjiK4LiVeRBwHjGq7v30tGV
-5Qti7qqRW4Ww7CDCJc4sZMFnystucR2vLkXaSoNWoFm4Fg47NiisDdhDezHwbVPW6OpCFNSi
-ZAamtj4QAUBu8j4LswafrJqZqR9336/V3g8Yil2l48kABRG0J0FybWluIE0uIFdhcmRhIDx3
-YXJkYUBuZXBoaWxpbS5ydWhyLmRlPoiVAgUQLok2xwXR6zmeWEiZAQE/DgP/WgxPQh40/Po4
-gSkWZCDAjNdph7zexvAb0CcUWahcwiBIgg3U5ErCx9I5CNVA9U+s8bNrDZwgSIeBzp3KhWUx
-524uhGgm6ZUTOAIKA6CbV6pfqoLpJnRYvXYQU5mIWsNa99wcu2qu18OeEDnztb7aLA6Ra9OF
-YFCbq4EjXRoOrYM=
-=LPjs
------END PGP PUBLIC KEY BLOCK-----`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go
deleted file mode 100644
index 744c2d2c4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto/cipher"
- "io"
- "strconv"
-
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/s2k"
-)
-
-// This is the largest session key that we'll support. Since no 512-bit cipher
-// has even been seriously used, this is comfortably large.
-const maxSessionKeySizeInBytes = 64
-
-// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC
-// 4880, section 5.3.
-type SymmetricKeyEncrypted struct {
- CipherFunc CipherFunction
- s2k func(out, in []byte)
- encryptedKey []byte
-}
-
-const symmetricKeyEncryptedVersion = 4
-
-func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error {
- // RFC 4880, section 5.3.
- var buf [2]byte
- if _, err := readFull(r, buf[:]); err != nil {
- return err
- }
- if buf[0] != symmetricKeyEncryptedVersion {
- return errors.UnsupportedError("SymmetricKeyEncrypted version")
- }
- ske.CipherFunc = CipherFunction(buf[1])
-
- if ske.CipherFunc.KeySize() == 0 {
- return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[1])))
- }
-
- var err error
- ske.s2k, err = s2k.Parse(r)
- if err != nil {
- return err
- }
-
- encryptedKey := make([]byte, maxSessionKeySizeInBytes)
- // The session key may follow. We just have to try and read to find
- // out. If it exists then we limit it to maxSessionKeySizeInBytes.
- n, err := readFull(r, encryptedKey)
- if err != nil && err != io.ErrUnexpectedEOF {
- return err
- }
-
- if n != 0 {
- if n == maxSessionKeySizeInBytes {
- return errors.UnsupportedError("oversized encrypted session key")
- }
- ske.encryptedKey = encryptedKey[:n]
- }
-
- return nil
-}
-
-// Decrypt attempts to decrypt an encrypted session key and returns the key and
-// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data
-// packet.
-func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) {
- key := make([]byte, ske.CipherFunc.KeySize())
- ske.s2k(key, passphrase)
-
- if len(ske.encryptedKey) == 0 {
- return key, ske.CipherFunc, nil
- }
-
- // the IV is all zeros
- iv := make([]byte, ske.CipherFunc.blockSize())
- c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv)
- plaintextKey := make([]byte, len(ske.encryptedKey))
- c.XORKeyStream(plaintextKey, ske.encryptedKey)
- cipherFunc := CipherFunction(plaintextKey[0])
- if cipherFunc.blockSize() == 0 {
- return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc)))
- }
- plaintextKey = plaintextKey[1:]
- if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() {
- return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " +
- "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")")
- }
- return plaintextKey, cipherFunc, nil
-}
-
-// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The
-// packet contains a random session key, encrypted by a key derived from the
-// given passphrase. The session key is returned and must be passed to
-// SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) {
- cipherFunc := config.Cipher()
- keySize := cipherFunc.KeySize()
- if keySize == 0 {
- return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc)))
- }
-
- s2kBuf := new(bytes.Buffer)
- keyEncryptingKey := make([]byte, keySize)
- // s2k.Serialize salts and stretches the passphrase, and writes the
- // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf.
- err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()})
- if err != nil {
- return
- }
- s2kBytes := s2kBuf.Bytes()
-
- packetLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize
- err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength)
- if err != nil {
- return
- }
-
- var buf [2]byte
- buf[0] = symmetricKeyEncryptedVersion
- buf[1] = byte(cipherFunc)
- _, err = w.Write(buf[:])
- if err != nil {
- return
- }
- _, err = w.Write(s2kBytes)
- if err != nil {
- return
- }
-
- sessionKey := make([]byte, keySize)
- _, err = io.ReadFull(config.Random(), sessionKey)
- if err != nil {
- return
- }
- iv := make([]byte, cipherFunc.blockSize())
- c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)
- encryptedCipherAndKey := make([]byte, keySize+1)
- c.XORKeyStream(encryptedCipherAndKey, buf[1:])
- c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey)
- _, err = w.Write(encryptedCipherAndKey)
- if err != nil {
- return
- }
-
- key = sessionKey
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go
deleted file mode 100644
index e1d52c122..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/hex"
- "io"
- "io/ioutil"
- "testing"
-)
-
-func TestSymmetricKeyEncrypted(t *testing.T) {
- buf := readerFromHex(symmetricallyEncryptedHex)
- packet, err := Read(buf)
- if err != nil {
- t.Errorf("failed to read SymmetricKeyEncrypted: %s", err)
- return
- }
- ske, ok := packet.(*SymmetricKeyEncrypted)
- if !ok {
- t.Error("didn't find SymmetricKeyEncrypted packet")
- return
- }
- key, cipherFunc, err := ske.Decrypt([]byte("password"))
- if err != nil {
- t.Error(err)
- return
- }
-
- packet, err = Read(buf)
- if err != nil {
- t.Errorf("failed to read SymmetricallyEncrypted: %s", err)
- return
- }
- se, ok := packet.(*SymmetricallyEncrypted)
- if !ok {
- t.Error("didn't find SymmetricallyEncrypted packet")
- return
- }
- r, err := se.Decrypt(cipherFunc, key)
- if err != nil {
- t.Error(err)
- return
- }
-
- contents, err := ioutil.ReadAll(r)
- if err != nil && err != io.EOF {
- t.Error(err)
- return
- }
-
- expectedContents, _ := hex.DecodeString(symmetricallyEncryptedContentsHex)
- if !bytes.Equal(expectedContents, contents) {
- t.Errorf("bad contents got:%x want:%x", contents, expectedContents)
- }
-}
-
-const symmetricallyEncryptedHex = "8c0d04030302371a0b38d884f02060c91cf97c9973b8e58e028e9501708ccfe618fb92afef7fa2d80ddadd93cf"
-const symmetricallyEncryptedContentsHex = "cb1062004d14c4df636f6e74656e74732e0a"
-
-func TestSerializeSymmetricKeyEncryptedCiphers(t *testing.T) {
- tests := [...]struct {
- cipherFunc CipherFunction
- name string
- }{
- {Cipher3DES, "Cipher3DES"},
- {CipherCAST5, "CipherCAST5"},
- {CipherAES128, "CipherAES128"},
- {CipherAES192, "CipherAES192"},
- {CipherAES256, "CipherAES256"},
- }
-
- for _, test := range tests {
- var buf bytes.Buffer
- passphrase := []byte("testing")
- config := &Config{
- DefaultCipher: test.cipherFunc,
- }
-
- key, err := SerializeSymmetricKeyEncrypted(&buf, passphrase, config)
- if err != nil {
- t.Errorf("cipher(%s) failed to serialize: %s", test.name, err)
- continue
- }
-
- p, err := Read(&buf)
- if err != nil {
- t.Errorf("cipher(%s) failed to reparse: %s", test.name, err)
- continue
- }
-
- ske, ok := p.(*SymmetricKeyEncrypted)
- if !ok {
- t.Errorf("cipher(%s) parsed a different packet type: %#v", test.name, p)
- continue
- }
-
- if ske.CipherFunc != config.DefaultCipher {
- t.Errorf("cipher(%s) SKE cipher function is %d (expected %d)", test.name, ske.CipherFunc, config.DefaultCipher)
- }
- parsedKey, parsedCipherFunc, err := ske.Decrypt(passphrase)
- if err != nil {
- t.Errorf("cipher(%s) failed to decrypt reparsed SKE: %s", test.name, err)
- continue
- }
- if !bytes.Equal(key, parsedKey) {
- t.Errorf("cipher(%s) keys don't match after Decrypt: %x (original) vs %x (parsed)", test.name, key, parsedKey)
- }
- if parsedCipherFunc != test.cipherFunc {
- t.Errorf("cipher(%s) cipher function doesn't match after Decrypt: %d (original) vs %d (parsed)",
- test.name, test.cipherFunc, parsedCipherFunc)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go
deleted file mode 100644
index 6126030eb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "crypto/cipher"
- "crypto/sha1"
- "crypto/subtle"
- "golang.org/x/crypto/openpgp/errors"
- "hash"
- "io"
- "strconv"
-)
-
-// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The
-// encrypted contents will consist of more OpenPGP packets. See RFC 4880,
-// sections 5.7 and 5.13.
-type SymmetricallyEncrypted struct {
- MDC bool // true iff this is a type 18 packet and thus has an embedded MAC.
- contents io.Reader
- prefix []byte
-}
-
-const symmetricallyEncryptedVersion = 1
-
-func (se *SymmetricallyEncrypted) parse(r io.Reader) error {
- if se.MDC {
- // See RFC 4880, section 5.13.
- var buf [1]byte
- _, err := readFull(r, buf[:])
- if err != nil {
- return err
- }
- if buf[0] != symmetricallyEncryptedVersion {
- return errors.UnsupportedError("unknown SymmetricallyEncrypted version")
- }
- }
- se.contents = r
- return nil
-}
-
-// Decrypt returns a ReadCloser, from which the decrypted contents of the
-// packet can be read. An incorrect key can, with high probability, be detected
-// immediately and this will result in a KeyIncorrect error being returned.
-func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) {
- keySize := c.KeySize()
- if keySize == 0 {
- return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c)))
- }
- if len(key) != keySize {
- return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length")
- }
-
- if se.prefix == nil {
- se.prefix = make([]byte, c.blockSize()+2)
- _, err := readFull(se.contents, se.prefix)
- if err != nil {
- return nil, err
- }
- } else if len(se.prefix) != c.blockSize()+2 {
- return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths")
- }
-
- ocfbResync := OCFBResync
- if se.MDC {
- // MDC packets use a different form of OCFB mode.
- ocfbResync = OCFBNoResync
- }
-
- s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync)
- if s == nil {
- return nil, errors.ErrKeyIncorrect
- }
-
- plaintext := cipher.StreamReader{S: s, R: se.contents}
-
- if se.MDC {
- // MDC packets have an embedded hash that we need to check.
- h := sha1.New()
- h.Write(se.prefix)
- return &seMDCReader{in: plaintext, h: h}, nil
- }
-
- // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser.
- return seReader{plaintext}, nil
-}
-
-// seReader wraps an io.Reader with a no-op Close method.
-type seReader struct {
- in io.Reader
-}
-
-func (ser seReader) Read(buf []byte) (int, error) {
- return ser.in.Read(buf)
-}
-
-func (ser seReader) Close() error {
- return nil
-}
-
-const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size
-
-// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold
-// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an
-// MDC packet containing a hash of the previous contents which is checked
-// against the running hash. See RFC 4880, section 5.13.
-type seMDCReader struct {
- in io.Reader
- h hash.Hash
- trailer [mdcTrailerSize]byte
- scratch [mdcTrailerSize]byte
- trailerUsed int
- error bool
- eof bool
-}
-
-func (ser *seMDCReader) Read(buf []byte) (n int, err error) {
- if ser.error {
- err = io.ErrUnexpectedEOF
- return
- }
- if ser.eof {
- err = io.EOF
- return
- }
-
- // If we haven't yet filled the trailer buffer then we must do that
- // first.
- for ser.trailerUsed < mdcTrailerSize {
- n, err = ser.in.Read(ser.trailer[ser.trailerUsed:])
- ser.trailerUsed += n
- if err == io.EOF {
- if ser.trailerUsed != mdcTrailerSize {
- n = 0
- err = io.ErrUnexpectedEOF
- ser.error = true
- return
- }
- ser.eof = true
- n = 0
- return
- }
-
- if err != nil {
- n = 0
- return
- }
- }
-
- // If it's a short read then we read into a temporary buffer and shift
- // the data into the caller's buffer.
- if len(buf) <= mdcTrailerSize {
- n, err = readFull(ser.in, ser.scratch[:len(buf)])
- copy(buf, ser.trailer[:n])
- ser.h.Write(buf[:n])
- copy(ser.trailer[:], ser.trailer[n:])
- copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:])
- if n < len(buf) {
- ser.eof = true
- err = io.EOF
- }
- return
- }
-
- n, err = ser.in.Read(buf[mdcTrailerSize:])
- copy(buf, ser.trailer[:])
- ser.h.Write(buf[:n])
- copy(ser.trailer[:], buf[n:])
-
- if err == io.EOF {
- ser.eof = true
- }
- return
-}
-
-// This is a new-format packet tag byte for a type 19 (MDC) packet.
-const mdcPacketTagByte = byte(0x80) | 0x40 | 19
-
-func (ser *seMDCReader) Close() error {
- if ser.error {
- return errors.SignatureError("error during reading")
- }
-
- for !ser.eof {
- // We haven't seen EOF so we need to read to the end
- var buf [1024]byte
- _, err := ser.Read(buf[:])
- if err == io.EOF {
- break
- }
- if err != nil {
- return errors.SignatureError("error during reading")
- }
- }
-
- if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size {
- return errors.SignatureError("MDC packet not found")
- }
- ser.h.Write(ser.trailer[:2])
-
- final := ser.h.Sum(nil)
- if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 {
- return errors.SignatureError("hash mismatch")
- }
- return nil
-}
-
-// An seMDCWriter writes through to an io.WriteCloser while maintains a running
-// hash of the data written. On close, it emits an MDC packet containing the
-// running hash.
-type seMDCWriter struct {
- w io.WriteCloser
- h hash.Hash
-}
-
-func (w *seMDCWriter) Write(buf []byte) (n int, err error) {
- w.h.Write(buf)
- return w.w.Write(buf)
-}
-
-func (w *seMDCWriter) Close() (err error) {
- var buf [mdcTrailerSize]byte
-
- buf[0] = mdcPacketTagByte
- buf[1] = sha1.Size
- w.h.Write(buf[:2])
- digest := w.h.Sum(nil)
- copy(buf[2:], digest)
-
- _, err = w.w.Write(buf[:])
- if err != nil {
- return
- }
- return w.w.Close()
-}
-
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
-type noOpCloser struct {
- w io.Writer
-}
-
-func (c noOpCloser) Write(data []byte) (n int, err error) {
- return c.w.Write(data)
-}
-
-func (c noOpCloser) Close() error {
- return nil
-}
-
-// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet
-// to w and returns a WriteCloser to which the to-be-encrypted packets can be
-// written.
-// If config is nil, sensible defaults will be used.
-func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) {
- if c.KeySize() != len(key) {
- return nil, errors.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length")
- }
- writeCloser := noOpCloser{w}
- ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC)
- if err != nil {
- return
- }
-
- _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion})
- if err != nil {
- return
- }
-
- block := c.new(key)
- blockSize := block.BlockSize()
- iv := make([]byte, blockSize)
- _, err = config.Random().Read(iv)
- if err != nil {
- return
- }
- s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync)
- _, err = ciphertext.Write(prefix)
- if err != nil {
- return
- }
- plaintext := cipher.StreamWriter{S: s, W: ciphertext}
-
- h := sha1.New()
- h.Write(iv)
- h.Write(iv[blockSize-2:])
- contents = &seMDCWriter{w: plaintext, h: h}
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted_test.go
deleted file mode 100644
index c5c00f7b9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted_test.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "crypto/sha1"
- "encoding/hex"
- "golang.org/x/crypto/openpgp/errors"
- "io"
- "io/ioutil"
- "testing"
-)
-
-// TestReader wraps a []byte and returns reads of a specific length.
-type testReader struct {
- data []byte
- stride int
-}
-
-func (t *testReader) Read(buf []byte) (n int, err error) {
- n = t.stride
- if n > len(t.data) {
- n = len(t.data)
- }
- if n > len(buf) {
- n = len(buf)
- }
- copy(buf, t.data)
- t.data = t.data[n:]
- if len(t.data) == 0 {
- err = io.EOF
- }
- return
-}
-
-func testMDCReader(t *testing.T) {
- mdcPlaintext, _ := hex.DecodeString(mdcPlaintextHex)
-
- for stride := 1; stride < len(mdcPlaintext)/2; stride++ {
- r := &testReader{data: mdcPlaintext, stride: stride}
- mdcReader := &seMDCReader{in: r, h: sha1.New()}
- body, err := ioutil.ReadAll(mdcReader)
- if err != nil {
- t.Errorf("stride: %d, error: %s", stride, err)
- continue
- }
- if !bytes.Equal(body, mdcPlaintext[:len(mdcPlaintext)-22]) {
- t.Errorf("stride: %d: bad contents %x", stride, body)
- continue
- }
-
- err = mdcReader.Close()
- if err != nil {
- t.Errorf("stride: %d, error on Close: %s", stride, err)
- }
- }
-
- mdcPlaintext[15] ^= 80
-
- r := &testReader{data: mdcPlaintext, stride: 2}
- mdcReader := &seMDCReader{in: r, h: sha1.New()}
- _, err := ioutil.ReadAll(mdcReader)
- if err != nil {
- t.Errorf("corruption test, error: %s", err)
- return
- }
- err = mdcReader.Close()
- if err == nil {
- t.Error("corruption: no error")
- } else if _, ok := err.(*errors.SignatureError); !ok {
- t.Errorf("corruption: expected SignatureError, got: %s", err)
- }
-}
-
-const mdcPlaintextHex = "a302789c3b2d93c4e0eb9aba22283539b3203335af44a134afb800c849cb4c4de10200aff40b45d31432c80cb384299a0655966d6939dfdeed1dddf980"
-
-func TestSerialize(t *testing.T) {
- buf := bytes.NewBuffer(nil)
- c := CipherAES128
- key := make([]byte, c.KeySize())
-
- w, err := SerializeSymmetricallyEncrypted(buf, c, key, nil)
- if err != nil {
- t.Errorf("error from SerializeSymmetricallyEncrypted: %s", err)
- return
- }
-
- contents := []byte("hello world\n")
-
- w.Write(contents)
- w.Close()
-
- p, err := Read(buf)
- if err != nil {
- t.Errorf("error from Read: %s", err)
- return
- }
-
- se, ok := p.(*SymmetricallyEncrypted)
- if !ok {
- t.Errorf("didn't read a *SymmetricallyEncrypted")
- return
- }
-
- r, err := se.Decrypt(c, key)
- if err != nil {
- t.Errorf("error from Decrypt: %s", err)
- return
- }
-
- contentsCopy := bytes.NewBuffer(nil)
- _, err = io.Copy(contentsCopy, r)
- if err != nil {
- t.Errorf("error from io.Copy: %s", err)
- return
- }
- if !bytes.Equal(contentsCopy.Bytes(), contents) {
- t.Errorf("contents not equal got: %x want: %x", contentsCopy.Bytes(), contents)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
deleted file mode 100644
index 96a2b382a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2013 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 file.
-
-package packet
-
-import (
- "bytes"
- "image"
- "image/jpeg"
- "io"
- "io/ioutil"
-)
-
-const UserAttrImageSubpacket = 1
-
-// UserAttribute is capable of storing other types of data about a user
-// beyond name, email and a text comment. In practice, user attributes are typically used
-// to store a signed thumbnail photo JPEG image of the user.
-// See RFC 4880, section 5.12.
-type UserAttribute struct {
- Contents []*OpaqueSubpacket
-}
-
-// NewUserAttributePhoto creates a user attribute packet
-// containing the given images.
-func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) {
- uat = new(UserAttribute)
- for _, photo := range photos {
- var buf bytes.Buffer
- // RFC 4880, Section 5.12.1.
- data := []byte{
- 0x10, 0x00, // Little-endian image header length (16 bytes)
- 0x01, // Image header version 1
- 0x01, // JPEG
- 0, 0, 0, 0, // 12 reserved octets, must be all zero.
- 0, 0, 0, 0,
- 0, 0, 0, 0}
- if _, err = buf.Write(data); err != nil {
- return
- }
- if err = jpeg.Encode(&buf, photo, nil); err != nil {
- return
- }
- uat.Contents = append(uat.Contents, &OpaqueSubpacket{
- SubType: UserAttrImageSubpacket,
- Contents: buf.Bytes()})
- }
- return
-}
-
-// NewUserAttribute creates a new user attribute packet containing the given subpackets.
-func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute {
- return &UserAttribute{Contents: contents}
-}
-
-func (uat *UserAttribute) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.13
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return
- }
- uat.Contents, err = OpaqueSubpackets(b)
- return
-}
-
-// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including
-// header.
-func (uat *UserAttribute) Serialize(w io.Writer) (err error) {
- var buf bytes.Buffer
- for _, sp := range uat.Contents {
- sp.Serialize(&buf)
- }
- if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil {
- return err
- }
- _, err = w.Write(buf.Bytes())
- return
-}
-
-// ImageData returns zero or more byte slices, each containing
-// JPEG File Interchange Format (JFIF), for each photo in the
-// the user attribute packet.
-func (uat *UserAttribute) ImageData() (imageData [][]byte) {
- for _, sp := range uat.Contents {
- if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 {
- imageData = append(imageData, sp.Contents[16:])
- }
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute_test.go
deleted file mode 100644
index 13ca5143c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userattribute_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "bytes"
- "encoding/base64"
- "image/color"
- "image/jpeg"
- "testing"
-)
-
-func TestParseUserAttribute(t *testing.T) {
- r := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(userAttributePacket))
- for i := 0; i < 2; i++ {
- p, err := Read(r)
- if err != nil {
- t.Fatal(err)
- }
- uat := p.(*UserAttribute)
- imgs := uat.ImageData()
- if len(imgs) != 1 {
- t.Errorf("Unexpected number of images in user attribute packet: %d", len(imgs))
- }
- if len(imgs[0]) != 3395 {
- t.Errorf("Unexpected JPEG image size: %d", len(imgs[0]))
- }
- img, err := jpeg.Decode(bytes.NewBuffer(imgs[0]))
- if err != nil {
- t.Errorf("Error decoding JPEG image: %v", err)
- }
- // A pixel in my right eye.
- pixel := color.NRGBAModel.Convert(img.At(56, 36))
- ref := color.NRGBA{R: 157, G: 128, B: 124, A: 255}
- if pixel != ref {
- t.Errorf("Unexpected pixel color: %v", pixel)
- }
- w := bytes.NewBuffer(nil)
- err = uat.Serialize(w)
- if err != nil {
- t.Errorf("Error writing user attribute: %v", err)
- }
- r = bytes.NewBuffer(w.Bytes())
- }
-}
-
-const userAttributePacket = `
-0cyWzJQBEAABAQAAAAAAAAAAAAAAAP/Y/+AAEEpGSUYAAQIAAAEAAQAA/9sAQwAFAwQEBAMFBAQE
-BQUFBgcMCAcHBwcPCgsJDBEPEhIRDxEQExYcFxMUGhUQERghGBocHR8fHxMXIiQiHiQcHh8e/9sA
-QwEFBQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
-Hh4eHh4eHh4e/8AAEQgAZABkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYH
-CAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHw
-JDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6
-g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk
-5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIB
-AgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEX
-GBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKT
-lJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX2
-9/j5+v/aAAwDAQACEQMRAD8A5uGP06VehQ4pIox04q5EnHSvAep+hIIl4zVuMHGPWmRrUWtalaaN
-pU2oXsgSGJSxPr6ClvoitErs0Itqjc7BQOpPAFYmrfEnwjojtHNqaXEynBjtx5hH4jj9a8B8d+Od
-W8UXZjWR4LJT+7t0Jwfc+prnIdO1CWZEW2mZ3HyDactXXDB3V5s8evm1namj6r0H4weCLtxG+ova
-ueP30RA/MV6not1bX0Ed1ZzxzwyDKvGwZSPqK+Ff+ES8R8t/ZV2oHUmM10Hgbxp4m8BatEfNnWBH
-/eWshOxx9Kmpg4te49RUM1kn+8Wh9zQ4P1FaMC7l465rjPh14y0fxnoseoaXOpfaPOgJ+eI98j09
-67W19M15bi4uzPSqTU480WXkjZkAyAR61DPE6OCSOalWRRgZxjvTb598sfU4FBwx5uY4T4feIm8P
-TeJbAgc65NIM+8cX+FFeLfF3Vr3SfiNrMFrMypJMJcDPUqP8KK+kpVFyLU+ar037SXqX4hxVpMY7
-1UhPpVlT2rybKx9smWYz3NeH/EDVLzxt40j8O6bITaQybPlbKkjq39K9O8fasdH8IahfKxWQRFIy
-Ou9uB/OuE/Z/0y3j1d9TuyoZCMs5xjuea1pLli5nn46q240l13PcfhN8EvDNtpcEl/CklyVBLuMk
-mvU/Dfwo0BL/AO13FjEDD/qyV7Vn+CvGPg8zRpJrVm8ikLtEg6+1ew2dxZ3EQaJgysuQPasH7eXW
-1zzsbVhT92kk/PsYieEND+zlPs6c/wCyAPyryH4wfCPRtW0u6j+xRLOxLxSoADkDpXY+MPjJ4c0S
-9k082d3O8ZKkxw5XI96ytK+IGk+IpFjRpod+Qq3C7QT6A1E6NenaXbqRg6rlLlqS0fRnxjpd1r/w
-w8afa7GWRPKbZLGeBKmeVNfZngLxNaeKfDdprVjxHcLlkJ5Vh1H5185/tDad9h8XOsqAw3Cb0cjq
-CfX61P8AsveKf7L8T3fhe5nxa3g324YniQdh9R/KuivTdSmp9TXB1/Z1nRlsfU249QBx1pWfcwI7
-Cq6u2Ovamb9rYz16V5x7Psz5q/aJhZfibcupIElvE3H+7j+lFbXx9szP45jlUfeso8/99OKK9elL
-3EeNVopzZVharCtxVRGGMk02S5JyFOB69zWTieypnL/GksfB+0cr9oQt69awPhPpD69Y3Ky3DWth
-CWluGU4LAdq3vibGs/g68BJygVxjrwRW5+ztoRv/AAs8EeCZnO/J/hzz/Kumi4wp3kePjlOdZKPY
-ml8Mvo6WM9ppi7J0EkQYMzkb1X0wW+bJHGACa+ivg14huZPCkjXUO6SImIYOQAP6UQ2sGneHmiWF
-CYoSAAuM8etXfhBpMr+EZ3SSNRcMx6ZxWdes6ytBGSwkMNFuo7pnP614Ut9Zn1C4uLySKcwObGFA
-Qnm4+XcR71h+CfDHiKCQWuv2YWFtw+bBZQD8rcE8n2Ney+GbGGQSM6I7xvtI681rXdp8hKRRp6t3
-FYPE1VDlsY1nQjWdl+J8w/tOeDZZ/AMd/EGefTHyxxyYjwfyODXg3waRh8UtEcFh+8Jb8FNfZPxh
-Ak8J6nbPIsiyW7LnseK+Ofh99ptPHFnf2lu0y2twGcKuSEPB/Q1WHk50miq1o14TXU+xop+On61H
-NMC6Nis1LgsAcUTSt1APFcXJZn0EqmhyvxA037friTYziBV6f7Tf40Vr3k4aXLx5OMZIzRXZB2ik
-efJXbPHJJcnaD9aN2R1qoGO8/WkuLlIV+YjdjpXSonQ5lTxfiTwzqCnkeQxx9BWx+zPrQsrBFYja
-zEfrXL6lfie3khcjY6lSPUGud+G3iA6FrY0uQ/KJsA9gCa0jSvFpnBi6tpKSPu++nsIfDFxeXciR
-qIicscY4rxTwB8RUkn1axsPEf2LTYx85kTGzqCUP8VcJ47+JOs+I0Hhq1njjt/ufIeSvq1VtE+Gs
-eoaUbSHUrkHdu3WtuX5Ix81XRh7OL5jirVpV5Whdn0F8C/iX4auVn0i612T7bASoe8wjTAd89K9g
-vtSt5NMa4t5lkRhgOh3Dn6V8aaz8KZrIR3OlQ6r56LySmSxxz06Vo/CHx34h0rxBP4XvJ5AjK2RP
-nEbAEj6ZxjPrWM6fMmoswqJxqJ1VZnqHxn1NLPwveqWHmNC2BnnNcD8DfDkGi+CH1m+ijN1qMzNA
-4GSIiAMf+hVxPxU8Tapc3c0F9MGCn5GU5BX0Pau3+HmrT3XgXSIJCBHDGdgAx1NYSpezha52Yauq
-1dya2Wh2onAIwTj1p0lxxWWLkhRyCKWa5O3ORXOos9KVQluZm83j0oqi84JyWH50Vdmc7ep43d3I
-t1Z2Iz2FYdxeSTsxyRnvTdVuDNcNluM9KrKcg817NOnZGNbEXdkNckjrXGeIIprPxFFdRHAlIwem
-COtdmxrG8Q2cd/ZNExw45RvQ1bVjim+dWNzw7eaTD4mN3dndCQCo6hmI5zXpj/Ea/wBHjkh0kwRW
-xXEfl4yTxXzXZalJDL9nuWKMmRnHcV2Hh3WreCyYXW2SWQhd5P3F6n+lS43d2cTm6d7Ox9EWPxH1
-ODQxPqWpCaSU/ukUc4z3/WvKW8UhviAdaMewYZG98gj9c1ymoa8LyWOJHwkTDaVPb0qpr+q2m6Nb
-cfvNo349az9mou9iZVXNWbub3jm98/Vza2ReV7lsJg/e3dsV654UR9N0K0sZP9ZDGFbHr3rzL4P+
-H7rXfEEWr3I3W1qf3IYdW9fwqDxf4k8UeH/G95p08kscHmk25dPlZT0we9YTj7SXKjpw1aNG8mj3
-FLv5ccU959ycnmvKPDnxB82YQarGsZPAlTp+IrvIr1ZIgySKwIyCOhFYTpyg9T0qWIhVV4svzPvf
-IdhgY4orPachj81FRdmtzxqdiZmJ9aQEgdqZcPtmbJ71DJcAZ5r20kkeXJtsfPIQDwPzrG1a+S3i
-LyHAHvmp7y7HOD1rlNdm+1T7Acovf3o+J2RMpezjzMvrob67pX9o2ShZlYgg/wAWKxZLLWLZ/Ke3
-mVh14yK9M+BMC3dre2ko3LHKCB7EV7EngeGQJdQ7HyBkMKS0djgq1W3c+XtK03U522RwzsTwNiEk
-ntXoHgf4calql9El/G8UZbLfLyfr7V9FeGvh+s+0Lbxxcglu2K1NW1nwN4Gk/wBLuI57tV5jjwzE
-/QVNS+0dWYRqNvXRFv4eeCodKsY1ggVIY1G3K4z714h+1Jqul3GpwaXYeXJLbzgyyrg4b+6D+HNb
-vjz436zq9m+naHF/ZdkeGfOZXH17V4Vqt2b29K+ZuOc5bnce5zWdPBShL2lTfojSeJhy+zp/NjVz
-1Bwa6DSfFGq6fbJFDKrov8DjPFcu97ZxsUe4jVhwVJ5Bpp1mwQiLewJPXacVq6fNpYyjOUXdHoKf
-EG8VQHsInbuVcgflRXnt5fIs2FYHgcgUVi8LG+xusdW/mN7U2KgEVkTzPt60UVfQ9eHxGHrV1MGi
-iD4V25x1qvdgLAMd6KK0pbHm4x++dp8FtUubLxJ5EIjMc+A4Za+qfD8pe1JZVOBmiinW3RyRPMfi
-R8QPE638+k2l6LK0Hylbddhb6nOa80mlkcmWR2kcnlnOSaKK7qCXKcNdu5narcSrAoBxvODWJIga
-VckjDdqKKwq/EaQ0gUdbjQ6mr7QGBUcd6tPBC6gtGpOOuKKKie5qn7qIpEXd0HSiiimSf//Z`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid.go
deleted file mode 100644
index d6bea7d4a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "io"
- "io/ioutil"
- "strings"
-)
-
-// UserId contains text that is intended to represent the name and email
-// address of the key holder. See RFC 4880, section 5.11. By convention, this
-// takes the form "Full Name (Comment) <email@example.com>"
-type UserId struct {
- Id string // By convention, this takes the form "Full Name (Comment) <email@example.com>" which is split out in the fields below.
-
- Name, Comment, Email string
-}
-
-func hasInvalidCharacters(s string) bool {
- for _, c := range s {
- switch c {
- case '(', ')', '<', '>', 0:
- return true
- }
- }
- return false
-}
-
-// NewUserId returns a UserId or nil if any of the arguments contain invalid
-// characters. The invalid characters are '\x00', '(', ')', '<' and '>'
-func NewUserId(name, comment, email string) *UserId {
- // RFC 4880 doesn't deal with the structure of userid strings; the
- // name, comment and email form is just a convention. However, there's
- // no convention about escaping the metacharacters and GPG just refuses
- // to create user ids where, say, the name contains a '('. We mirror
- // this behaviour.
-
- if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) {
- return nil
- }
-
- uid := new(UserId)
- uid.Name, uid.Comment, uid.Email = name, comment, email
- uid.Id = name
- if len(comment) > 0 {
- if len(uid.Id) > 0 {
- uid.Id += " "
- }
- uid.Id += "("
- uid.Id += comment
- uid.Id += ")"
- }
- if len(email) > 0 {
- if len(uid.Id) > 0 {
- uid.Id += " "
- }
- uid.Id += "<"
- uid.Id += email
- uid.Id += ">"
- }
- return uid
-}
-
-func (uid *UserId) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.11
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return
- }
- uid.Id = string(b)
- uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id)
- return
-}
-
-// Serialize marshals uid to w in the form of an OpenPGP packet, including
-// header.
-func (uid *UserId) Serialize(w io.Writer) error {
- err := serializeHeader(w, packetTypeUserId, len(uid.Id))
- if err != nil {
- return err
- }
- _, err = w.Write([]byte(uid.Id))
- return err
-}
-
-// parseUserId extracts the name, comment and email from a user id string that
-// is formatted as "Full Name (Comment) <email@example.com>".
-func parseUserId(id string) (name, comment, email string) {
- var n, c, e struct {
- start, end int
- }
- var state int
-
- for offset, rune := range id {
- switch state {
- case 0:
- // Entering name
- n.start = offset
- state = 1
- fallthrough
- case 1:
- // In name
- if rune == '(' {
- state = 2
- n.end = offset
- } else if rune == '<' {
- state = 5
- n.end = offset
- }
- case 2:
- // Entering comment
- c.start = offset
- state = 3
- fallthrough
- case 3:
- // In comment
- if rune == ')' {
- state = 4
- c.end = offset
- }
- case 4:
- // Between comment and email
- if rune == '<' {
- state = 5
- }
- case 5:
- // Entering email
- e.start = offset
- state = 6
- fallthrough
- case 6:
- // In email
- if rune == '>' {
- state = 7
- e.end = offset
- }
- default:
- // After email
- }
- }
- switch state {
- case 1:
- // ended in the name
- n.end = len(id)
- case 3:
- // ended in comment
- c.end = len(id)
- case 6:
- // ended in email
- e.end = len(id)
- }
-
- name = strings.TrimSpace(id[n.start:n.end])
- comment = strings.TrimSpace(id[c.start:c.end])
- email = strings.TrimSpace(id[e.start:e.end])
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid_test.go
deleted file mode 100644
index 296819389..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/packet/userid_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2011 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 file.
-
-package packet
-
-import (
- "testing"
-)
-
-var userIdTests = []struct {
- id string
- name, comment, email string
-}{
- {"", "", "", ""},
- {"John Smith", "John Smith", "", ""},
- {"John Smith ()", "John Smith", "", ""},
- {"John Smith () <>", "John Smith", "", ""},
- {"(comment", "", "comment", ""},
- {"(comment)", "", "comment", ""},
- {"<email", "", "", "email"},
- {"<email> sdfk", "", "", "email"},
- {" John Smith ( Comment ) asdkflj < email > lksdfj", "John Smith", "Comment", "email"},
- {" John Smith < email > lksdfj", "John Smith", "", "email"},
- {"(<foo", "", "<foo", ""},
- {"René Descartes (العربي)", "René Descartes", "العربي", ""},
-}
-
-func TestParseUserId(t *testing.T) {
- for i, test := range userIdTests {
- name, comment, email := parseUserId(test.id)
- if name != test.name {
- t.Errorf("%d: name mismatch got:%s want:%s", i, name, test.name)
- }
- if comment != test.comment {
- t.Errorf("%d: comment mismatch got:%s want:%s", i, comment, test.comment)
- }
- if email != test.email {
- t.Errorf("%d: email mismatch got:%s want:%s", i, email, test.email)
- }
- }
-}
-
-var newUserIdTests = []struct {
- name, comment, email, id string
-}{
- {"foo", "", "", "foo"},
- {"", "bar", "", "(bar)"},
- {"", "", "baz", "<baz>"},
- {"foo", "bar", "", "foo (bar)"},
- {"foo", "", "baz", "foo <baz>"},
- {"", "bar", "baz", "(bar) <baz>"},
- {"foo", "bar", "baz", "foo (bar) <baz>"},
-}
-
-func TestNewUserId(t *testing.T) {
- for i, test := range newUserIdTests {
- uid := NewUserId(test.name, test.comment, test.email)
- if uid == nil {
- t.Errorf("#%d: returned nil", i)
- continue
- }
- if uid.Id != test.id {
- t.Errorf("#%d: got '%s', want '%s'", i, uid.Id, test.id)
- }
- }
-}
-
-var invalidNewUserIdTests = []struct {
- name, comment, email string
-}{
- {"foo(", "", ""},
- {"foo<", "", ""},
- {"", "bar)", ""},
- {"", "bar<", ""},
- {"", "", "baz>"},
- {"", "", "baz)"},
- {"", "", "baz\x00"},
-}
-
-func TestNewUserIdWithInvalidInput(t *testing.T) {
- for i, test := range invalidNewUserIdTests {
- if uid := NewUserId(test.name, test.comment, test.email); uid != nil {
- t.Errorf("#%d: returned non-nil value: %#v", i, uid)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read.go
deleted file mode 100644
index 6ec664f44..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read.go
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package openpgp implements high level operations on OpenPGP messages.
-package openpgp // import "golang.org/x/crypto/openpgp"
-
-import (
- "crypto"
- _ "crypto/sha256"
- "hash"
- "io"
- "strconv"
-
- "golang.org/x/crypto/openpgp/armor"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/packet"
-)
-
-// SignatureType is the armor type for a PGP signature.
-var SignatureType = "PGP SIGNATURE"
-
-// readArmored reads an armored block with the given type.
-func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) {
- block, err := armor.Decode(r)
- if err != nil {
- return
- }
-
- if block.Type != expectedType {
- return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type)
- }
-
- return block.Body, nil
-}
-
-// MessageDetails contains the result of parsing an OpenPGP encrypted and/or
-// signed message.
-type MessageDetails struct {
- IsEncrypted bool // true if the message was encrypted.
- EncryptedToKeyIds []uint64 // the list of recipient key ids.
- IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message.
- DecryptedWith Key // the private key used to decrypt the message, if any.
- IsSigned bool // true if the message is signed.
- SignedByKeyId uint64 // the key id of the signer, if any.
- SignedBy *Key // the key of the signer, if available.
- LiteralData *packet.LiteralData // the metadata of the contents
- UnverifiedBody io.Reader // the contents of the message.
-
- // If IsSigned is true and SignedBy is non-zero then the signature will
- // be verified as UnverifiedBody is read. The signature cannot be
- // checked until the whole of UnverifiedBody is read so UnverifiedBody
- // must be consumed until EOF before the data can be trusted. Even if a
- // message isn't signed (or the signer is unknown) the data may contain
- // an authentication code that is only checked once UnverifiedBody has
- // been consumed. Once EOF has been seen, the following fields are
- // valid. (An authentication code failure is reported as a
- // SignatureError error when reading from UnverifiedBody.)
- SignatureError error // nil if the signature is good.
- Signature *packet.Signature // the signature packet itself, if v4 (default)
- SignatureV3 *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature
-
- decrypted io.ReadCloser
-}
-
-// A PromptFunction is used as a callback by functions that may need to decrypt
-// a private key, or prompt for a passphrase. It is called with a list of
-// acceptable, encrypted private keys and a boolean that indicates whether a
-// passphrase is usable. It should either decrypt a private key or return a
-// passphrase to try. If the decrypted private key or given passphrase isn't
-// correct, the function will be called again, forever. Any error returned will
-// be passed up.
-type PromptFunction func(keys []Key, symmetric bool) ([]byte, error)
-
-// A keyEnvelopePair is used to store a private key with the envelope that
-// contains a symmetric key, encrypted with that key.
-type keyEnvelopePair struct {
- key Key
- encryptedKey *packet.EncryptedKey
-}
-
-// ReadMessage parses an OpenPGP message that may be signed and/or encrypted.
-// The given KeyRing should contain both public keys (for signature
-// verification) and, possibly encrypted, private keys for decrypting.
-// If config is nil, sensible defaults will be used.
-func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) {
- var p packet.Packet
-
- var symKeys []*packet.SymmetricKeyEncrypted
- var pubKeys []keyEnvelopePair
- var se *packet.SymmetricallyEncrypted
-
- packets := packet.NewReader(r)
- md = new(MessageDetails)
- md.IsEncrypted = true
-
- // The message, if encrypted, starts with a number of packets
- // containing an encrypted decryption key. The decryption key is either
- // encrypted to a public key, or with a passphrase. This loop
- // collects these packets.
-ParsePackets:
- for {
- p, err = packets.Next()
- if err != nil {
- return nil, err
- }
- switch p := p.(type) {
- case *packet.SymmetricKeyEncrypted:
- // This packet contains the decryption key encrypted with a passphrase.
- md.IsSymmetricallyEncrypted = true
- symKeys = append(symKeys, p)
- case *packet.EncryptedKey:
- // This packet contains the decryption key encrypted to a public key.
- md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId)
- switch p.Algo {
- case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal:
- break
- default:
- continue
- }
- var keys []Key
- if p.KeyId == 0 {
- keys = keyring.DecryptionKeys()
- } else {
- keys = keyring.KeysById(p.KeyId)
- }
- for _, k := range keys {
- pubKeys = append(pubKeys, keyEnvelopePair{k, p})
- }
- case *packet.SymmetricallyEncrypted:
- se = p
- break ParsePackets
- case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature:
- // This message isn't encrypted.
- if len(symKeys) != 0 || len(pubKeys) != 0 {
- return nil, errors.StructuralError("key material not followed by encrypted message")
- }
- packets.Unread(p)
- return readSignedMessage(packets, nil, keyring)
- }
- }
-
- var candidates []Key
- var decrypted io.ReadCloser
-
- // Now that we have the list of encrypted keys we need to decrypt at
- // least one of them or, if we cannot, we need to call the prompt
- // function so that it can decrypt a key or give us a passphrase.
-FindKey:
- for {
- // See if any of the keys already have a private key available
- candidates = candidates[:0]
- candidateFingerprints := make(map[string]bool)
-
- for _, pk := range pubKeys {
- if pk.key.PrivateKey == nil {
- continue
- }
- if !pk.key.PrivateKey.Encrypted {
- if len(pk.encryptedKey.Key) == 0 {
- pk.encryptedKey.Decrypt(pk.key.PrivateKey, config)
- }
- if len(pk.encryptedKey.Key) == 0 {
- continue
- }
- decrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key)
- if err != nil && err != errors.ErrKeyIncorrect {
- return nil, err
- }
- if decrypted != nil {
- md.DecryptedWith = pk.key
- break FindKey
- }
- } else {
- fpr := string(pk.key.PublicKey.Fingerprint[:])
- if v := candidateFingerprints[fpr]; v {
- continue
- }
- candidates = append(candidates, pk.key)
- candidateFingerprints[fpr] = true
- }
- }
-
- if len(candidates) == 0 && len(symKeys) == 0 {
- return nil, errors.ErrKeyIncorrect
- }
-
- if prompt == nil {
- return nil, errors.ErrKeyIncorrect
- }
-
- passphrase, err := prompt(candidates, len(symKeys) != 0)
- if err != nil {
- return nil, err
- }
-
- // Try the symmetric passphrase first
- if len(symKeys) != 0 && passphrase != nil {
- for _, s := range symKeys {
- key, cipherFunc, err := s.Decrypt(passphrase)
- if err == nil {
- decrypted, err = se.Decrypt(cipherFunc, key)
- if err != nil && err != errors.ErrKeyIncorrect {
- return nil, err
- }
- if decrypted != nil {
- break FindKey
- }
- }
-
- }
- }
- }
-
- md.decrypted = decrypted
- if err := packets.Push(decrypted); err != nil {
- return nil, err
- }
- return readSignedMessage(packets, md, keyring)
-}
-
-// readSignedMessage reads a possibly signed message if mdin is non-zero then
-// that structure is updated and returned. Otherwise a fresh MessageDetails is
-// used.
-func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) {
- if mdin == nil {
- mdin = new(MessageDetails)
- }
- md = mdin
-
- var p packet.Packet
- var h hash.Hash
- var wrappedHash hash.Hash
-FindLiteralData:
- for {
- p, err = packets.Next()
- if err != nil {
- return nil, err
- }
- switch p := p.(type) {
- case *packet.Compressed:
- if err := packets.Push(p.Body); err != nil {
- return nil, err
- }
- case *packet.OnePassSignature:
- if !p.IsLast {
- return nil, errors.UnsupportedError("nested signatures")
- }
-
- h, wrappedHash, err = hashForSignature(p.Hash, p.SigType)
- if err != nil {
- md = nil
- return
- }
-
- md.IsSigned = true
- md.SignedByKeyId = p.KeyId
- keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign)
- if len(keys) > 0 {
- md.SignedBy = &keys[0]
- }
- case *packet.LiteralData:
- md.LiteralData = p
- break FindLiteralData
- }
- }
-
- if md.SignedBy != nil {
- md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md}
- } else if md.decrypted != nil {
- md.UnverifiedBody = checkReader{md}
- } else {
- md.UnverifiedBody = md.LiteralData.Body
- }
-
- return md, nil
-}
-
-// hashForSignature returns a pair of hashes that can be used to verify a
-// signature. The signature may specify that the contents of the signed message
-// should be preprocessed (i.e. to normalize line endings). Thus this function
-// returns two hashes. The second should be used to hash the message itself and
-// performs any needed preprocessing.
-func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) {
- if !hashId.Available() {
- return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId)))
- }
- h := hashId.New()
-
- switch sigType {
- case packet.SigTypeBinary:
- return h, h, nil
- case packet.SigTypeText:
- return h, NewCanonicalTextHash(h), nil
- }
-
- return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType)))
-}
-
-// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF
-// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger
-// MDC checks.
-type checkReader struct {
- md *MessageDetails
-}
-
-func (cr checkReader) Read(buf []byte) (n int, err error) {
- n, err = cr.md.LiteralData.Body.Read(buf)
- if err == io.EOF {
- mdcErr := cr.md.decrypted.Close()
- if mdcErr != nil {
- err = mdcErr
- }
- }
- return
-}
-
-// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes
-// the data as it is read. When it sees an EOF from the underlying io.Reader
-// it parses and checks a trailing Signature packet and triggers any MDC checks.
-type signatureCheckReader struct {
- packets *packet.Reader
- h, wrappedHash hash.Hash
- md *MessageDetails
-}
-
-func (scr *signatureCheckReader) Read(buf []byte) (n int, err error) {
- n, err = scr.md.LiteralData.Body.Read(buf)
- scr.wrappedHash.Write(buf[:n])
- if err == io.EOF {
- var p packet.Packet
- p, scr.md.SignatureError = scr.packets.Next()
- if scr.md.SignatureError != nil {
- return
- }
-
- var ok bool
- if scr.md.Signature, ok = p.(*packet.Signature); ok {
- scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature)
- } else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok {
- scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3)
- } else {
- scr.md.SignatureError = errors.StructuralError("LiteralData not followed by Signature")
- return
- }
-
- // The SymmetricallyEncrypted packet, if any, might have an
- // unsigned hash of its own. In order to check this we need to
- // close that Reader.
- if scr.md.decrypted != nil {
- mdcErr := scr.md.decrypted.Close()
- if mdcErr != nil {
- err = mdcErr
- }
- }
- }
- return
-}
-
-// CheckDetachedSignature takes a signed file and a detached signature and
-// returns the signer if the signature is valid. If the signer isn't known,
-// ErrUnknownIssuer is returned.
-func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) {
- var issuerKeyId uint64
- var hashFunc crypto.Hash
- var sigType packet.SignatureType
- var keys []Key
- var p packet.Packet
-
- packets := packet.NewReader(signature)
- for {
- p, err = packets.Next()
- if err == io.EOF {
- return nil, errors.ErrUnknownIssuer
- }
- if err != nil {
- return nil, err
- }
-
- switch sig := p.(type) {
- case *packet.Signature:
- if sig.IssuerKeyId == nil {
- return nil, errors.StructuralError("signature doesn't have an issuer")
- }
- issuerKeyId = *sig.IssuerKeyId
- hashFunc = sig.Hash
- sigType = sig.SigType
- case *packet.SignatureV3:
- issuerKeyId = sig.IssuerKeyId
- hashFunc = sig.Hash
- sigType = sig.SigType
- default:
- return nil, errors.StructuralError("non signature packet found")
- }
-
- keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign)
- if len(keys) > 0 {
- break
- }
- }
-
- if len(keys) == 0 {
- panic("unreachable")
- }
-
- h, wrappedHash, err := hashForSignature(hashFunc, sigType)
- if err != nil {
- return nil, err
- }
-
- if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF {
- return nil, err
- }
-
- for _, key := range keys {
- switch sig := p.(type) {
- case *packet.Signature:
- err = key.PublicKey.VerifySignature(h, sig)
- case *packet.SignatureV3:
- err = key.PublicKey.VerifySignatureV3(h, sig)
- default:
- panic("unreachable")
- }
-
- if err == nil {
- return key.Entity, nil
- }
- }
-
- return nil, err
-}
-
-// CheckArmoredDetachedSignature performs the same actions as
-// CheckDetachedSignature but expects the signature to be armored.
-func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) {
- body, err := readArmored(signature, SignatureType)
- if err != nil {
- return
- }
-
- return CheckDetachedSignature(keyring, signed, body)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read_test.go
deleted file mode 100644
index 1fbfbac4c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/read_test.go
+++ /dev/null
@@ -1,613 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import (
- "bytes"
- _ "crypto/sha512"
- "encoding/hex"
- "io"
- "io/ioutil"
- "strings"
- "testing"
-
- "golang.org/x/crypto/openpgp/armor"
- "golang.org/x/crypto/openpgp/errors"
-)
-
-func readerFromHex(s string) io.Reader {
- data, err := hex.DecodeString(s)
- if err != nil {
- panic("readerFromHex: bad input")
- }
- return bytes.NewBuffer(data)
-}
-
-func TestReadKeyRing(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(testKeys1And2Hex))
- if err != nil {
- t.Error(err)
- return
- }
- if len(kring) != 2 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB || uint32(kring[1].PrimaryKey.KeyId) != 0x1E35246B {
- t.Errorf("bad keyring: %#v", kring)
- }
-}
-
-func TestRereadKeyRing(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(testKeys1And2Hex))
- if err != nil {
- t.Errorf("error in initial parse: %s", err)
- return
- }
- out := new(bytes.Buffer)
- err = kring[0].Serialize(out)
- if err != nil {
- t.Errorf("error in serialization: %s", err)
- return
- }
- kring, err = ReadKeyRing(out)
- if err != nil {
- t.Errorf("error in second parse: %s", err)
- return
- }
-
- if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB {
- t.Errorf("bad keyring: %#v", kring)
- }
-}
-
-func TestReadPrivateKeyRing(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
- if err != nil {
- t.Error(err)
- return
- }
- if len(kring) != 2 || uint32(kring[0].PrimaryKey.KeyId) != 0xC20C31BB || uint32(kring[1].PrimaryKey.KeyId) != 0x1E35246B || kring[0].PrimaryKey == nil {
- t.Errorf("bad keyring: %#v", kring)
- }
-}
-
-func TestReadDSAKey(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(dsaTestKeyHex))
- if err != nil {
- t.Error(err)
- return
- }
- if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0x0CCC0360 {
- t.Errorf("bad parse: %#v", kring)
- }
-}
-
-func TestReadP256Key(t *testing.T) {
- kring, err := ReadKeyRing(readerFromHex(p256TestKeyHex))
- if err != nil {
- t.Error(err)
- return
- }
- if len(kring) != 1 || uint32(kring[0].PrimaryKey.KeyId) != 0x5918513E {
- t.Errorf("bad parse: %#v", kring)
- }
-}
-
-func TestDSAHashTruncatation(t *testing.T) {
- // dsaKeyWithSHA512 was generated with GnuPG and --cert-digest-algo
- // SHA512 in order to require DSA hash truncation to verify correctly.
- _, err := ReadKeyRing(readerFromHex(dsaKeyWithSHA512))
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestGetKeyById(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
-
- keys := kring.KeysById(0xa34d7e18c20c31bb)
- if len(keys) != 1 || keys[0].Entity != kring[0] {
- t.Errorf("bad result for 0xa34d7e18c20c31bb: %#v", keys)
- }
-
- keys = kring.KeysById(0xfd94408d4543314f)
- if len(keys) != 1 || keys[0].Entity != kring[0] {
- t.Errorf("bad result for 0xa34d7e18c20c31bb: %#v", keys)
- }
-}
-
-func checkSignedMessage(t *testing.T, signedHex, expected string) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
-
- md, err := ReadMessage(readerFromHex(signedHex), kring, nil, nil)
- if err != nil {
- t.Error(err)
- return
- }
-
- if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.IsSymmetricallyEncrypted {
- t.Errorf("bad MessageDetails: %#v", md)
- }
-
- contents, err := ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Errorf("error reading UnverifiedBody: %s", err)
- }
- if string(contents) != expected {
- t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected)
- }
- if md.SignatureError != nil || md.Signature == nil {
- t.Errorf("failed to validate: %s", md.SignatureError)
- }
-}
-
-func TestSignedMessage(t *testing.T) {
- checkSignedMessage(t, signedMessageHex, signedInput)
-}
-
-func TestTextSignedMessage(t *testing.T) {
- checkSignedMessage(t, signedTextMessageHex, signedTextInput)
-}
-
-// The reader should detect "compressed quines", which are compressed
-// packets that expand into themselves and cause an infinite recursive
-// parsing loop.
-// The packet in this test case comes from Taylor R. Campbell at
-// http://mumble.net/~campbell/misc/pgp-quine/
-func TestCampbellQuine(t *testing.T) {
- md, err := ReadMessage(readerFromHex(campbellQuine), nil, nil, nil)
- if md != nil {
- t.Errorf("Reading a compressed quine should not return any data: %#v", md)
- }
- structural, ok := err.(errors.StructuralError)
- if !ok {
- t.Fatalf("Unexpected class of error: %T", err)
- }
- if !strings.Contains(string(structural), "too many layers of packets") {
- t.Fatalf("Unexpected error: %s", err)
- }
-}
-
-var signedEncryptedMessageTests = []struct {
- keyRingHex string
- messageHex string
- signedByKeyId uint64
- encryptedToKeyId uint64
-}{
- {
- testKeys1And2PrivateHex,
- signedEncryptedMessageHex,
- 0xa34d7e18c20c31bb,
- 0x2a67d68660df41c7,
- },
- {
- dsaElGamalTestKeysHex,
- signedEncryptedMessage2Hex,
- 0x33af447ccd759b09,
- 0xcf6a7abcd43e3673,
- },
-}
-
-func TestSignedEncryptedMessage(t *testing.T) {
- for i, test := range signedEncryptedMessageTests {
- expected := "Signed and encrypted message\n"
- kring, _ := ReadKeyRing(readerFromHex(test.keyRingHex))
- prompt := func(keys []Key, symmetric bool) ([]byte, error) {
- if symmetric {
- t.Errorf("prompt: message was marked as symmetrically encrypted")
- return nil, errors.ErrKeyIncorrect
- }
-
- if len(keys) == 0 {
- t.Error("prompt: no keys requested")
- return nil, errors.ErrKeyIncorrect
- }
-
- err := keys[0].PrivateKey.Decrypt([]byte("passphrase"))
- if err != nil {
- t.Errorf("prompt: error decrypting key: %s", err)
- return nil, errors.ErrKeyIncorrect
- }
-
- return nil, nil
- }
-
- md, err := ReadMessage(readerFromHex(test.messageHex), kring, prompt, nil)
- if err != nil {
- t.Errorf("#%d: error reading message: %s", i, err)
- return
- }
-
- if !md.IsSigned || md.SignedByKeyId != test.signedByKeyId || md.SignedBy == nil || !md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) == 0 || md.EncryptedToKeyIds[0] != test.encryptedToKeyId {
- t.Errorf("#%d: bad MessageDetails: %#v", i, md)
- }
-
- contents, err := ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Errorf("#%d: error reading UnverifiedBody: %s", i, err)
- }
- if string(contents) != expected {
- t.Errorf("#%d: bad UnverifiedBody got:%s want:%s", i, string(contents), expected)
- }
-
- if md.SignatureError != nil || md.Signature == nil {
- t.Errorf("#%d: failed to validate: %s", i, md.SignatureError)
- }
- }
-}
-
-func TestUnspecifiedRecipient(t *testing.T) {
- expected := "Recipient unspecified\n"
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
-
- md, err := ReadMessage(readerFromHex(recipientUnspecifiedHex), kring, nil, nil)
- if err != nil {
- t.Errorf("error reading message: %s", err)
- return
- }
-
- contents, err := ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Errorf("error reading UnverifiedBody: %s", err)
- }
- if string(contents) != expected {
- t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected)
- }
-}
-
-func TestSymmetricallyEncrypted(t *testing.T) {
- firstTimeCalled := true
-
- prompt := func(keys []Key, symmetric bool) ([]byte, error) {
- if len(keys) != 0 {
- t.Errorf("prompt: len(keys) = %d (want 0)", len(keys))
- }
-
- if !symmetric {
- t.Errorf("symmetric is not set")
- }
-
- if firstTimeCalled {
- firstTimeCalled = false
- return []byte("wrongpassword"), nil
- }
-
- return []byte("password"), nil
- }
-
- md, err := ReadMessage(readerFromHex(symmetricallyEncryptedCompressedHex), nil, prompt, nil)
- if err != nil {
- t.Errorf("ReadMessage: %s", err)
- return
- }
-
- contents, err := ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Errorf("ReadAll: %s", err)
- }
-
- expectedCreationTime := uint32(1295992998)
- if md.LiteralData.Time != expectedCreationTime {
- t.Errorf("LiteralData.Time is %d, want %d", md.LiteralData.Time, expectedCreationTime)
- }
-
- const expected = "Symmetrically encrypted.\n"
- if string(contents) != expected {
- t.Errorf("contents got: %s want: %s", string(contents), expected)
- }
-}
-
-func testDetachedSignature(t *testing.T, kring KeyRing, signature io.Reader, sigInput, tag string, expectedSignerKeyId uint64) {
- signed := bytes.NewBufferString(sigInput)
- signer, err := CheckDetachedSignature(kring, signed, signature)
- if err != nil {
- t.Errorf("%s: signature error: %s", tag, err)
- return
- }
- if signer == nil {
- t.Errorf("%s: signer is nil", tag)
- return
- }
- if signer.PrimaryKey.KeyId != expectedSignerKeyId {
- t.Errorf("%s: wrong signer got:%x want:%x", tag, signer.PrimaryKey.KeyId, expectedSignerKeyId)
- }
-}
-
-func TestDetachedSignature(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
- testDetachedSignature(t, kring, readerFromHex(detachedSignatureHex), signedInput, "binary", testKey1KeyId)
- testDetachedSignature(t, kring, readerFromHex(detachedSignatureTextHex), signedInput, "text", testKey1KeyId)
- testDetachedSignature(t, kring, readerFromHex(detachedSignatureV3TextHex), signedInput, "v3", testKey1KeyId)
-
- incorrectSignedInput := signedInput + "X"
- _, err := CheckDetachedSignature(kring, bytes.NewBufferString(incorrectSignedInput), readerFromHex(detachedSignatureHex))
- if err == nil {
- t.Fatal("CheckDetachedSignature returned without error for bad signature")
- }
- if err == errors.ErrUnknownIssuer {
- t.Fatal("CheckDetachedSignature returned ErrUnknownIssuer when the signer was known, but the signature invalid")
- }
-}
-
-func TestDetachedSignatureDSA(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyHex))
- testDetachedSignature(t, kring, readerFromHex(detachedSignatureDSAHex), signedInput, "binary", testKey3KeyId)
-}
-
-func TestMultipleSignaturePacketsDSA(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyHex))
- testDetachedSignature(t, kring, readerFromHex(missingHashFunctionHex+detachedSignatureDSAHex), signedInput, "binary", testKey3KeyId)
-}
-
-func TestDetachedSignatureP256(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(p256TestKeyHex))
- testDetachedSignature(t, kring, readerFromHex(detachedSignatureP256Hex), signedInput, "binary", testKeyP256KeyId)
-}
-
-func testHashFunctionError(t *testing.T, signatureHex string) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
- _, err := CheckDetachedSignature(kring, nil, readerFromHex(signatureHex))
- if err == nil {
- t.Fatal("Packet with bad hash type was correctly parsed")
- }
- unsupported, ok := err.(errors.UnsupportedError)
- if !ok {
- t.Fatalf("Unexpected class of error: %s", err)
- }
- if !strings.Contains(string(unsupported), "hash ") {
- t.Fatalf("Unexpected error: %s", err)
- }
-}
-
-func TestUnknownHashFunction(t *testing.T) {
- // unknownHashFunctionHex contains a signature packet with hash
- // function type 153 (which isn't a real hash function id).
- testHashFunctionError(t, unknownHashFunctionHex)
-}
-
-func TestMissingHashFunction(t *testing.T) {
- // missingHashFunctionHex contains a signature packet that uses
- // RIPEMD160, which isn't compiled in. Since that's the only signature
- // packet we don't find any suitable packets and end up with ErrUnknownIssuer
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
- _, err := CheckDetachedSignature(kring, nil, readerFromHex(missingHashFunctionHex))
- if err == nil {
- t.Fatal("Packet with missing hash type was correctly parsed")
- }
- if err != errors.ErrUnknownIssuer {
- t.Fatalf("Unexpected class of error: %s", err)
- }
-}
-
-func TestReadingArmoredPrivateKey(t *testing.T) {
- el, err := ReadArmoredKeyRing(bytes.NewBufferString(armoredPrivateKeyBlock))
- if err != nil {
- t.Error(err)
- }
- if len(el) != 1 {
- t.Errorf("got %d entities, wanted 1\n", len(el))
- }
-}
-
-func TestReadingArmoredPublicKey(t *testing.T) {
- el, err := ReadArmoredKeyRing(bytes.NewBufferString(e2ePublicKey))
- if err != nil {
- t.Error(err)
- }
- if len(el) != 1 {
- t.Errorf("didn't get a valid entity")
- }
-}
-
-func TestNoArmoredData(t *testing.T) {
- _, err := ReadArmoredKeyRing(bytes.NewBufferString("foo"))
- if _, ok := err.(errors.InvalidArgumentError); !ok {
- t.Errorf("error was not an InvalidArgumentError: %s", err)
- }
-}
-
-func testReadMessageError(t *testing.T, messageHex string) {
- buf, err := hex.DecodeString(messageHex)
- if err != nil {
- t.Errorf("hex.DecodeString(): %v", err)
- }
-
- kr, err := ReadKeyRing(new(bytes.Buffer))
- if err != nil {
- t.Errorf("ReadKeyring(): %v", err)
- }
-
- _, err = ReadMessage(bytes.NewBuffer(buf), kr,
- func([]Key, bool) ([]byte, error) {
- return []byte("insecure"), nil
- }, nil)
-
- if err == nil {
- t.Errorf("ReadMessage(): Unexpected nil error")
- }
-}
-
-func TestIssue11503(t *testing.T) {
- testReadMessageError(t, "8c040402000aa430aa8228b9248b01fc899a91197130303030")
-}
-
-func TestIssue11504(t *testing.T) {
- testReadMessageError(t, "9303000130303030303030303030983002303030303030030000000130")
-}
-
-// TestSignatureV3Message tests the verification of V3 signature, generated
-// with a modern V4-style key. Some people have their clients set to generate
-// V3 signatures, so it's useful to be able to verify them.
-func TestSignatureV3Message(t *testing.T) {
- sig, err := armor.Decode(strings.NewReader(signedMessageV3))
- if err != nil {
- t.Error(err)
- return
- }
- key, err := ReadArmoredKeyRing(strings.NewReader(keyV4forVerifyingSignedMessageV3))
- if err != nil {
- t.Error(err)
- return
- }
- md, err := ReadMessage(sig.Body, key, nil, nil)
- if err != nil {
- t.Error(err)
- return
- }
-
- _, err = ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Error(err)
- return
- }
-
- // We'll see a sig error here after reading in the UnverifiedBody above,
- // if there was one to see.
- if err = md.SignatureError; err != nil {
- t.Error(err)
- return
- }
-
- if md.SignatureV3 == nil {
- t.Errorf("No available signature after checking signature")
- return
- }
- if md.Signature != nil {
- t.Errorf("Did not expect a signature V4 back")
- return
- }
- return
-}
-
-const testKey1KeyId = 0xA34D7E18C20C31BB
-const testKey3KeyId = 0x338934250CCC0360
-const testKeyP256KeyId = 0xd44a2c495918513e
-
-const signedInput = "Signed message\nline 2\nline 3\n"
-const signedTextInput = "Signed message\r\nline 2\r\nline 3\r\n"
-
-const recipientUnspecifiedHex = "848c0300000000000000000103ff62d4d578d03cf40c3da998dfe216c074fa6ddec5e31c197c9666ba292830d91d18716a80f699f9d897389a90e6d62d0238f5f07a5248073c0f24920e4bc4a30c2d17ee4e0cae7c3d4aaa4e8dced50e3010a80ee692175fa0385f62ecca4b56ee6e9980aa3ec51b61b077096ac9e800edaf161268593eedb6cc7027ff5cb32745d250010d407a6221ae22ef18469b444f2822478c4d190b24d36371a95cb40087cdd42d9399c3d06a53c0673349bfb607927f20d1e122bde1e2bf3aa6cae6edf489629bcaa0689539ae3b718914d88ededc3b"
-
-const detachedSignatureHex = "889c04000102000605024d449cd1000a0910a34d7e18c20c31bb167603ff57718d09f28a519fdc7b5a68b6a3336da04df85e38c5cd5d5bd2092fa4629848a33d85b1729402a2aab39c3ac19f9d573f773cc62c264dc924c067a79dfd8a863ae06c7c8686120760749f5fd9b1e03a64d20a7df3446ddc8f0aeadeaeba7cbaee5c1e366d65b6a0c6cc749bcb912d2f15013f812795c2e29eb7f7b77f39ce77"
-
-const detachedSignatureTextHex = "889c04010102000605024d449d21000a0910a34d7e18c20c31bbc8c60400a24fbef7342603a41cb1165767bd18985d015fb72fe05db42db36cfb2f1d455967f1e491194fbf6cf88146222b23bf6ffbd50d17598d976a0417d3192ff9cc0034fd00f287b02e90418bbefe609484b09231e4e7a5f3562e199bf39909ab5276c4d37382fe088f6b5c3426fc1052865da8b3ab158672d58b6264b10823dc4b39"
-
-const detachedSignatureV3TextHex = "8900950305005255c25ca34d7e18c20c31bb0102bb3f04009f6589ef8a028d6e54f6eaf25432e590d31c3a41f4710897585e10c31e5e332c7f9f409af8512adceaff24d0da1474ab07aa7bce4f674610b010fccc5b579ae5eb00a127f272fb799f988ab8e4574c141da6dbfecfef7e6b2c478d9a3d2551ba741f260ee22bec762812f0053e05380bfdd55ad0f22d8cdf71b233fe51ae8a24"
-
-const detachedSignatureDSAHex = "884604001102000605024d6c4eac000a0910338934250ccc0360f18d00a087d743d6405ed7b87755476629600b8b694a39e900a0abff8126f46faf1547c1743c37b21b4ea15b8f83"
-
-const detachedSignatureP256Hex = "885e0400130a0006050256e5bb00000a0910d44a2c495918513edef001009841a4f792beb0befccb35c8838a6a87d9b936beaa86db6745ddc7b045eee0cf00fd1ac1f78306b17e965935dd3f8bae4587a76587e4af231efe19cc4011a8434817"
-
-const testKeys1And2Hex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b0020003b88d044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f0011010001889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab0020003988d044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b0020003b88d044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020003"
-
-const testKeys1And2PrivateHex = "9501d8044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd00110100010003ff4d91393b9a8e3430b14d6209df42f98dc927425b881f1209f319220841273a802a97c7bdb8b3a7740b3ab5866c4d1d308ad0d3a79bd1e883aacf1ac92dfe720285d10d08752a7efe3c609b1d00f17f2805b217be53999a7da7e493bfc3e9618fd17018991b8128aea70a05dbce30e4fbe626aa45775fa255dd9177aabf4df7cf0200c1ded12566e4bc2bb590455e5becfb2e2c9796482270a943343a7835de41080582c2be3caf5981aa838140e97afa40ad652a0b544f83eb1833b0957dce26e47b0200eacd6046741e9ce2ec5beb6fb5e6335457844fb09477f83b050a96be7da043e17f3a9523567ed40e7a521f818813a8b8a72209f1442844843ccc7eb9805442570200bdafe0438d97ac36e773c7162028d65844c4d463e2420aa2228c6e50dc2743c3d6c72d0d782a5173fe7be2169c8a9f4ef8a7cf3e37165e8c61b89c346cdc6c1799d2b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b00200009d01d8044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f00110100010003fd17a7490c22a79c59281fb7b20f5e6553ec0c1637ae382e8adaea295f50241037f8997cf42c1ce26417e015091451b15424b2c59eb8d4161b0975630408e394d3b00f88d4b4e18e2cc85e8251d4753a27c639c83f5ad4a571c4f19d7cd460b9b73c25ade730c99df09637bd173d8e3e981ac64432078263bb6dc30d3e974150dd0200d0ee05be3d4604d2146fb0457f31ba17c057560785aa804e8ca5530a7cd81d3440d0f4ba6851efcfd3954b7e68908fc0ba47f7ac37bf559c6c168b70d3a7c8cd0200da1c677c4bce06a068070f2b3733b0a714e88d62aa3f9a26c6f5216d48d5c2b5624144f3807c0df30be66b3268eeeca4df1fbded58faf49fc95dc3c35f134f8b01fd1396b6c0fc1b6c4f0eb8f5e44b8eace1e6073e20d0b8bc5385f86f1cf3f050f66af789f3ef1fc107b7f4421e19e0349c730c68f0a226981f4e889054fdb4dc149e8e889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab00200009501fe044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001fe030302e9030f3c783e14856063f16938530e148bc57a7aa3f3e4f90df9dceccdc779bc0835e1ad3d006e4a8d7b36d08b8e0de5a0d947254ecfbd22037e6572b426bcfdc517796b224b0036ff90bc574b5509bede85512f2eefb520fb4b02aa523ba739bff424a6fe81c5041f253f8d757e69a503d3563a104d0d49e9e890b9d0c26f96b55b743883b472caa7050c4acfd4a21f875bdf1258d88bd61224d303dc9df77f743137d51e6d5246b88c406780528fd9a3e15bab5452e5b93970d9dcc79f48b38651b9f15bfbcf6da452837e9cc70683d1bdca94507870f743e4ad902005812488dd342f836e72869afd00ce1850eea4cfa53ce10e3608e13d3c149394ee3cbd0e23d018fcbcb6e2ec5a1a22972d1d462ca05355d0d290dd2751e550d5efb38c6c89686344df64852bf4ff86638708f644e8ec6bd4af9b50d8541cb91891a431326ab2e332faa7ae86cfb6e0540aa63160c1e5cdd5a4add518b303fff0a20117c6bc77f7cfbaf36b04c865c6c2b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b00200009d01fe044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001fe030302e9030f3c783e148560f936097339ae381d63116efcf802ff8b1c9360767db5219cc987375702a4123fd8657d3e22700f23f95020d1b261eda5257e9a72f9a918e8ef22dd5b3323ae03bbc1923dd224db988cadc16acc04b120a9f8b7e84da9716c53e0334d7b66586ddb9014df604b41be1e960dcfcbc96f4ed150a1a0dd070b9eb14276b9b6be413a769a75b519a53d3ecc0c220e85cd91ca354d57e7344517e64b43b6e29823cbd87eae26e2b2e78e6dedfbb76e3e9f77bcb844f9a8932eb3db2c3f9e44316e6f5d60e9e2a56e46b72abe6b06dc9a31cc63f10023d1f5e12d2a3ee93b675c96f504af0001220991c88db759e231b3320dcedf814dcf723fd9857e3d72d66a0f2af26950b915abdf56c1596f46a325bf17ad4810d3535fb02a259b247ac3dbd4cc3ecf9c51b6c07cebb009c1506fba0a89321ec8683e3fd009a6e551d50243e2d5092fefb3321083a4bad91320dc624bd6b5dddf93553e3d53924c05bfebec1fb4bd47e89a1a889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020000"
-
-const dsaElGamalTestKeysHex = "9501e1044dfcb16a110400aa3e5c1a1f43dd28c2ffae8abf5cfce555ee874134d8ba0a0f7b868ce2214beddc74e5e1e21ded354a95d18acdaf69e5e342371a71fbb9093162e0c5f3427de413a7f2c157d83f5cd2f9d791256dc4f6f0e13f13c3302af27f2384075ab3021dff7a050e14854bbde0a1094174855fc02f0bae8e00a340d94a1f22b32e48485700a0cec672ac21258fb95f61de2ce1af74b2c4fa3e6703ff698edc9be22c02ae4d916e4fa223f819d46582c0516235848a77b577ea49018dcd5e9e15cff9dbb4663a1ae6dd7580fa40946d40c05f72814b0f88481207e6c0832c3bded4853ebba0a7e3bd8e8c66df33d5a537cd4acf946d1080e7a3dcea679cb2b11a72a33a2b6a9dc85f466ad2ddf4c3db6283fa645343286971e3dd700703fc0c4e290d45767f370831a90187e74e9972aae5bff488eeff7d620af0362bfb95c1a6c3413ab5d15a2e4139e5d07a54d72583914661ed6a87cce810be28a0aa8879a2dd39e52fb6fe800f4f181ac7e328f740cde3d09a05cecf9483e4cca4253e60d4429ffd679d9996a520012aad119878c941e3cf151459873bdfc2a9563472fe0303027a728f9feb3b864260a1babe83925ce794710cfd642ee4ae0e5b9d74cee49e9c67b6cd0ea5dfbb582132195a121356a1513e1bca73e5b80c58c7ccb4164453412f456c47616d616c2054657374204b65792031886204131102002205024dfcb16a021b03060b090807030206150802090a0b0416020301021e01021780000a091033af447ccd759b09fadd00a0b8fd6f5a790bad7e9f2dbb7632046dc4493588db009c087c6a9ba9f7f49fab221587a74788c00db4889ab00200009d0157044dfcb16a1004008dec3f9291205255ccff8c532318133a6840739dd68b03ba942676f9038612071447bf07d00d559c5c0875724ea16a4c774f80d8338b55fca691a0522e530e604215b467bbc9ccfd483a1da99d7bc2648b4318fdbd27766fc8bfad3fddb37c62b8ae7ccfe9577e9b8d1e77c1d417ed2c2ef02d52f4da11600d85d3229607943700030503ff506c94c87c8cab778e963b76cf63770f0a79bf48fb49d3b4e52234620fc9f7657f9f8d56c96a2b7c7826ae6b57ebb2221a3fe154b03b6637cea7e6d98e3e45d87cf8dc432f723d3d71f89c5192ac8d7290684d2c25ce55846a80c9a7823f6acd9bb29fa6cd71f20bc90eccfca20451d0c976e460e672b000df49466408d527affe0303027a728f9feb3b864260abd761730327bca2aaa4ea0525c175e92bf240682a0e83b226f97ecb2e935b62c9a133858ce31b271fa8eb41f6a1b3cd72a63025ce1a75ee4180dcc284884904181102000905024dfcb16a021b0c000a091033af447ccd759b09dd0b009e3c3e7296092c81bee5a19929462caaf2fff3ae26009e218c437a2340e7ea628149af1ec98ec091a43992b00200009501e1044dfcb1be1104009f61faa61aa43df75d128cbe53de528c4aec49ce9360c992e70c77072ad5623de0a3a6212771b66b39a30dad6781799e92608316900518ec01184a85d872365b7d2ba4bacfb5882ea3c2473d3750dc6178cc1cf82147fb58caa28b28e9f12f6d1efcb0534abed644156c91cca4ab78834268495160b2400bc422beb37d237c2300a0cac94911b6d493bda1e1fbc6feeca7cb7421d34b03fe22cec6ccb39675bb7b94a335c2b7be888fd3906a1125f33301d8aa6ec6ee6878f46f73961c8d57a3e9544d8ef2a2cbfd4d52da665b1266928cfe4cb347a58c412815f3b2d2369dec04b41ac9a71cc9547426d5ab941cccf3b18575637ccfb42df1a802df3cfe0a999f9e7109331170e3a221991bf868543960f8c816c28097e503fe319db10fb98049f3a57d7c80c420da66d56f3644371631fad3f0ff4040a19a4fedc2d07727a1b27576f75a4d28c47d8246f27071e12d7a8de62aad216ddbae6aa02efd6b8a3e2818cda48526549791ab277e447b3a36c57cefe9b592f5eab73959743fcc8e83cbefec03a329b55018b53eec196765ae40ef9e20521a603c551efe0303020950d53a146bf9c66034d00c23130cce95576a2ff78016ca471276e8227fb30b1ffbd92e61804fb0c3eff9e30b1a826ee8f3e4730b4d86273ca977b4164453412f456c47616d616c2054657374204b65792032886204131102002205024dfcb1be021b03060b090807030206150802090a0b0416020301021e01021780000a0910a86bf526325b21b22bd9009e34511620415c974750a20df5cb56b182f3b48e6600a0a9466cb1a1305a84953445f77d461593f1d42bc1b00200009d0157044dfcb1be1004009565a951da1ee87119d600c077198f1c1bceb0f7aa54552489298e41ff788fa8f0d43a69871f0f6f77ebdfb14a4260cf9fbeb65d5844b4272a1904dd95136d06c3da745dc46327dd44a0f16f60135914368c8039a34033862261806bb2c5ce1152e2840254697872c85441ccb7321431d75a747a4bfb1d2c66362b51ce76311700030503fc0ea76601c196768070b7365a200e6ddb09307f262d5f39eec467b5f5784e22abdf1aa49226f59ab37cb49969d8f5230ea65caf56015abda62604544ed526c5c522bf92bed178a078789f6c807b6d34885688024a5bed9e9f8c58d11d4b82487b44c5f470c5606806a0443b79cadb45e0f897a561a53f724e5349b9267c75ca17fe0303020950d53a146bf9c660bc5f4ce8f072465e2d2466434320c1e712272fafc20e342fe7608101580fa1a1a367e60486a7cd1246b7ef5586cf5e10b32762b710a30144f12dd17dd4884904181102000905024dfcb1be021b0c000a0910a86bf526325b21b2904c00a0b2b66b4b39ccffda1d10f3ea8d58f827e30a8b8e009f4255b2d8112a184e40cde43a34e8655ca7809370b0020000"
-
-const signedMessageHex = "a3019bc0cbccc0c4b8d8b74ee2108fe16ec6d3ca490cbe362d3f8333d3f352531472538b8b13d353b97232f352158c20943157c71c16064626063656269052062e4e01987e9b6fccff4b7df3a34c534b23e679cbec3bc0f8f6e64dfb4b55fe3f8efa9ce110ddb5cd79faf1d753c51aecfa669f7e7aa043436596cccc3359cb7dd6bbe9ecaa69e5989d9e57209571edc0b2fa7f57b9b79a64ee6e99ce1371395fee92fec2796f7b15a77c386ff668ee27f6d38f0baa6c438b561657377bf6acff3c5947befd7bf4c196252f1d6e5c524d0300"
-
-const signedTextMessageHex = "a3019bc0cbccc8c4b8d8b74ee2108fe16ec6d36a250cbece0c178233d3f352531472538b8b13d35379b97232f352158ca0b4312f57c71c1646462606365626906a062e4e019811591798ff99bf8afee860b0d8a8c2a85c3387e3bcf0bb3b17987f2bbcfab2aa526d930cbfd3d98757184df3995c9f3e7790e36e3e9779f06089d4c64e9e47dd6202cb6e9bc73c5d11bb59fbaf89d22d8dc7cf199ddf17af96e77c5f65f9bbed56f427bd8db7af37f6c9984bf9385efaf5f184f986fb3e6adb0ecfe35bbf92d16a7aa2a344fb0bc52fb7624f0200"
-
-const signedEncryptedMessageHex = "848c032a67d68660df41c70103ff5789d0de26b6a50c985a02a13131ca829c413a35d0e6fa8d6842599252162808ac7439c72151c8c6183e76923fe3299301414d0c25a2f06a2257db3839e7df0ec964773f6e4c4ac7ff3b48c444237166dd46ba8ff443a5410dc670cb486672fdbe7c9dfafb75b4fea83af3a204fe2a7dfa86bd20122b4f3d2646cbeecb8f7be8d2c03b018bd210b1d3791e1aba74b0f1034e122ab72e760492c192383cf5e20b5628bd043272d63df9b923f147eb6091cd897553204832aba48fec54aa447547bb16305a1024713b90e77fd0065f1918271947549205af3c74891af22ee0b56cd29bfec6d6e351901cd4ab3ece7c486f1e32a792d4e474aed98ee84b3f591c7dff37b64e0ecd68fd036d517e412dcadf85840ce184ad7921ad446c4ee28db80447aea1ca8d4f574db4d4e37688158ddd19e14ee2eab4873d46947d65d14a23e788d912cf9a19624ca7352469b72a83866b7c23cb5ace3deab3c7018061b0ba0f39ed2befe27163e5083cf9b8271e3e3d52cc7ad6e2a3bd81d4c3d7022f8d"
-
-const signedEncryptedMessage2Hex = "85010e03cf6a7abcd43e36731003fb057f5495b79db367e277cdbe4ab90d924ddee0c0381494112ff8c1238fb0184af35d1731573b01bc4c55ecacd2aafbe2003d36310487d1ecc9ac994f3fada7f9f7f5c3a64248ab7782906c82c6ff1303b69a84d9a9529c31ecafbcdb9ba87e05439897d87e8a2a3dec55e14df19bba7f7bd316291c002ae2efd24f83f9e3441203fc081c0c23dc3092a454ca8a082b27f631abf73aca341686982e8fbda7e0e7d863941d68f3de4a755c2964407f4b5e0477b3196b8c93d551dd23c8beef7d0f03fbb1b6066f78907faf4bf1677d8fcec72651124080e0b7feae6b476e72ab207d38d90b958759fdedfc3c6c35717c9dbfc979b3cfbbff0a76d24a5e57056bb88acbd2a901ef64bc6e4db02adc05b6250ff378de81dca18c1910ab257dff1b9771b85bb9bbe0a69f5989e6d1710a35e6dfcceb7d8fb5ccea8db3932b3d9ff3fe0d327597c68b3622aec8e3716c83a6c93f497543b459b58ba504ed6bcaa747d37d2ca746fe49ae0a6ce4a8b694234e941b5159ff8bd34b9023da2814076163b86f40eed7c9472f81b551452d5ab87004a373c0172ec87ea6ce42ccfa7dbdad66b745496c4873d8019e8c28d6b3"
-
-const symmetricallyEncryptedCompressedHex = "8c0d04030302eb4a03808145d0d260c92f714339e13de5a79881216431925bf67ee2898ea61815f07894cd0703c50d0a76ef64d482196f47a8bc729af9b80bb6"
-
-const dsaTestKeyHex = "9901a2044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
-
-const dsaTestKeyPrivateHex = "9501bb044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4d00009f592e0619d823953577d4503061706843317e4fee083db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
-
-const p256TestKeyHex = "98520456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b7754b8560456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b6030108078861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
-
-const p256TestKeyPrivateHex = "94a50456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253fe070302f0c2bfb0b6c30f87ee1599472b8636477eab23ced13b271886a4b50ed34c9d8436af5af5b8f88921f0efba6ef8c37c459bbb88bc1c6a13bbd25c4ce9b1e97679569ee77645d469bf4b43de637f5561b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b77549ca90456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b603010807fe0703027510012471a603cfee2968dce19f732721ddf03e966fd133b4e3c7a685b788705cbc46fb026dc94724b830c9edbaecd2fb2c662f23169516cacd1fe423f0475c364ecc10abcabcfd4bbbda1a36a1bd8861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
-
-const armoredPrivateKeyBlock = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp
-idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn
-vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB
-AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X
-0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL
-IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk
-VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn
-gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9
-TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx
-q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz
-dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA
-CgkQO9o98PRieSoLhgQAkLEZex02Qt7vGhZzMwuN0R22w3VwyYyjBx+fM3JFETy1
-ut4xcLJoJfIaF5ZS38UplgakHG0FQ+b49i8dMij0aZmDqGxrew1m4kBfjXw9B/v+
-eIqpODryb6cOSwyQFH0lQkXC040pjq9YqDsO5w0WYNXYKDnzRV0p4H1pweo2VDid
-AdgETasU2gEEAN46UPeWRqKHvA99arOxee38fBt2CI08iiWyI8T3J6ivtFGixSqV
-bRcPxYO/qLpVe5l84Nb3X71GfVXlc9hyv7CD6tcowL59hg1E/DC5ydI8K8iEpUmK
-/UnHdIY5h8/kqgGxkY/T/hgp5fRQgW1ZoZxLajVlMRZ8W4tFtT0DeA+JABEBAAEA
-A/0bE1jaaZKj6ndqcw86jd+QtD1SF+Cf21CWRNeLKnUds4FRRvclzTyUMuWPkUeX
-TaNNsUOFqBsf6QQ2oHUBBK4VCHffHCW4ZEX2cd6umz7mpHW6XzN4DECEzOVksXtc
-lUC1j4UB91DC/RNQqwX1IV2QLSwssVotPMPqhOi0ZLNY7wIA3n7DWKInxYZZ4K+6
-rQ+POsz6brEoRHwr8x6XlHenq1Oki855pSa1yXIARoTrSJkBtn5oI+f8AzrnN0BN
-oyeQAwIA/7E++3HDi5aweWrViiul9cd3rcsS0dEnksPhvS0ozCJiHsq/6GFmy7J8
-QSHZPteedBnZyNp5jR+H7cIfVN3KgwH/Skq4PsuPhDq5TKK6i8Pc1WW8MA6DXTdU
-nLkX7RGmMwjC0DBf7KWAlPjFaONAX3a8ndnz//fy1q7u2l9AZwrj1qa1iJ8EGAEC
-AAkFAk2rFNoCGwwACgkQO9o98PRieSo2/QP/WTzr4ioINVsvN1akKuekmEMI3LAp
-BfHwatufxxP1U+3Si/6YIk7kuPB9Hs+pRqCXzbvPRrI8NHZBmc8qIGthishdCYad
-AHcVnXjtxrULkQFGbGvhKURLvS9WnzD/m1K2zzwxzkPTzT9/Yf06O6Mal5AdugPL
-VrM0m72/jnpKo04=
-=zNCn
------END PGP PRIVATE KEY BLOCK-----`
-
-const e2ePublicKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Charset: UTF-8
-
-xv8AAABSBAAAAAATCCqGSM49AwEHAgME1LRoXSpOxtHXDUdmuvzchyg6005qIBJ4
-sfaSxX7QgH9RV2ONUhC+WiayCNADq+UMzuR/vunSr4aQffXvuGnR383/AAAAFDxk
-Z2lsQHlhaG9vLWluYy5jb20+wv8AAACGBBATCAA4/wAAAAWCVGvAG/8AAAACiwn/
-AAAACZC2VkQCOjdvYf8AAAAFlQgJCgv/AAAAA5YBAv8AAAACngEAAE1BAP0X8veD
-24IjmI5/C6ZAfVNXxgZZFhTAACFX75jUA3oD6AEAzoSwKf1aqH6oq62qhCN/pekX
-+WAsVMBhNwzLpqtCRjLO/wAAAFYEAAAAABIIKoZIzj0DAQcCAwT50ain7vXiIRv8
-B1DO3x3cE/aattZ5sHNixJzRCXi2vQIA5QmOxZ6b5jjUekNbdHG3SZi1a2Ak5mfX
-fRxC/5VGAwEIB8L/AAAAZQQYEwgAGP8AAAAFglRrwBz/AAAACZC2VkQCOjdvYQAA
-FJAA9isX3xtGyMLYwp2F3nXm7QEdY5bq5VUcD/RJlj792VwA/1wH0pCzVLl4Q9F9
-ex7En5r7rHR5xwX82Msc+Rq9dSyO
-=7MrZ
------END PGP PUBLIC KEY BLOCK-----`
-
-const dsaKeyWithSHA512 = `9901a2044f04b07f110400db244efecc7316553ee08d179972aab87bb1214de7692593fcf5b6feb1c80fba268722dd464748539b85b81d574cd2d7ad0ca2444de4d849b8756bad7768c486c83a824f9bba4af773d11742bdfb4ac3b89ef8cc9452d4aad31a37e4b630d33927bff68e879284a1672659b8b298222fc68f370f3e24dccacc4a862442b9438b00a0ea444a24088dc23e26df7daf8f43cba3bffc4fe703fe3d6cd7fdca199d54ed8ae501c30e3ec7871ea9cdd4cf63cfe6fc82281d70a5b8bb493f922cd99fba5f088935596af087c8d818d5ec4d0b9afa7f070b3d7c1dd32a84fca08d8280b4890c8da1dde334de8e3cad8450eed2a4a4fcc2db7b8e5528b869a74a7f0189e11ef097ef1253582348de072bb07a9fa8ab838e993cef0ee203ff49298723e2d1f549b00559f886cd417a41692ce58d0ac1307dc71d85a8af21b0cf6eaa14baf2922d3a70389bedf17cc514ba0febbd107675a372fe84b90162a9e88b14d4b1c6be855b96b33fb198c46f058568817780435b6936167ebb3724b680f32bf27382ada2e37a879b3d9de2abe0c3f399350afd1ad438883f4791e2e3b4184453412068617368207472756e636174696f6e207465737488620413110a002205024f04b07f021b03060b090807030206150802090a0b0416020301021e01021780000a0910ef20e0cefca131581318009e2bf3bf047a44d75a9bacd00161ee04d435522397009a03a60d51bd8a568c6c021c8d7cf1be8d990d6417b0020003`
-
-const unknownHashFunctionHex = `8a00000040040001990006050253863c24000a09103b4fe6acc0b21f32ffff01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101`
-
-const missingHashFunctionHex = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
-
-const campbellQuine = `a0b001000300fcffa0b001000d00f2ff000300fcffa0b001000d00f2ff8270a01c00000500faff8270a01c00000500faff000500faff001400ebff8270a01c00000500faff000500faff001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400000000ffff000000ffff000b00f4ff428821c400000000ffff000000ffff000b00f4ff0233214c40000100feff000233214c40000100feff0000`
-
-const keyV4forVerifyingSignedMessageV3 = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Comment: GPGTools - https://gpgtools.org
-
-mI0EVfxoFQEEAMBIqmbDfYygcvP6Phr1wr1XI41IF7Qixqybs/foBF8qqblD9gIY
-BKpXjnBOtbkcVOJ0nljd3/sQIfH4E0vQwK5/4YRQSI59eKOqd6Fx+fWQOLG+uu6z
-tewpeCj9LLHvibx/Sc7VWRnrznia6ftrXxJ/wHMezSab3tnGC0YPVdGNABEBAAG0
-JEdvY3J5cHRvIFRlc3QgS2V5IDx0aGVtYXhAZ21haWwuY29tPoi5BBMBCgAjBQJV
-/GgVAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQeXnQmhdGW9PFVAP+
-K7TU0qX5ArvIONIxh/WAweyOk884c5cE8f+3NOPOOCRGyVy0FId5A7MmD5GOQh4H
-JseOZVEVCqlmngEvtHZb3U1VYtVGE5WZ+6rQhGsMcWP5qaT4soYwMBlSYxgYwQcx
-YhN9qOr292f9j2Y//TTIJmZT4Oa+lMxhWdqTfX+qMgG4jQRV/GgVAQQArhFSiij1
-b+hT3dnapbEU+23Z1yTu1DfF6zsxQ4XQWEV3eR8v+8mEDDNcz8oyyF56k6UQ3rXi
-UMTIwRDg4V6SbZmaFbZYCOwp/EmXJ3rfhm7z7yzXj2OFN22luuqbyVhuL7LRdB0M
-pxgmjXb4tTvfgKd26x34S+QqUJ7W6uprY4sAEQEAAYifBBgBCgAJBQJV/GgVAhsM
-AAoJEHl50JoXRlvT7y8D/02ckx4OMkKBZo7viyrBw0MLG92i+DC2bs35PooHR6zz
-786mitjOp5z2QWNLBvxC70S0qVfCIz8jKupO1J6rq6Z8CcbLF3qjm6h1omUBf8Nd
-EfXKD2/2HV6zMKVknnKzIEzauh+eCKS2CeJUSSSryap/QLVAjRnckaES/OsEWhNB
-=RZia
------END PGP PUBLIC KEY BLOCK-----
-`
-
-const signedMessageV3 = `-----BEGIN PGP MESSAGE-----
-Comment: GPGTools - https://gpgtools.org
-
-owGbwMvMwMVYWXlhlrhb9GXG03JJDKF/MtxDMjKLFYAoUaEktbhEITe1uDgxPVWP
-q5NhKjMrWAVcC9evD8z/bF/uWNjqtk/X3y5/38XGRQHm/57rrDRYuGnTw597Xqka
-uM3137/hH3Os+Jf2dc0fXOITKwJvXJvecPVs0ta+Vg7ZO1MLn8w58Xx+6L58mbka
-DGHyU9yTueZE8D+QF/Tz28Y78dqtF56R1VPn9Xw4uJqrWYdd7b3vIZ1V6R4Nh05d
-iT57d/OhWwA=
-=hG7R
------END PGP MESSAGE-----
-`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go
deleted file mode 100644
index 4b9a44ca2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package s2k implements the various OpenPGP string-to-key transforms as
-// specified in RFC 4800 section 3.7.1.
-package s2k // import "golang.org/x/crypto/openpgp/s2k"
-
-import (
- "crypto"
- "hash"
- "io"
- "strconv"
-
- "golang.org/x/crypto/openpgp/errors"
-)
-
-// Config collects configuration parameters for s2k key-stretching
-// transformatioms. A nil *Config is valid and results in all default
-// values. Currently, Config is used only by the Serialize function in
-// this package.
-type Config struct {
- // Hash is the default hash function to be used. If
- // nil, SHA1 is used.
- Hash crypto.Hash
- // S2KCount is only used for symmetric encryption. It
- // determines the strength of the passphrase stretching when
- // the said passphrase is hashed to produce a key. S2KCount
- // should be between 1024 and 65011712, inclusive. If Config
- // is nil or S2KCount is 0, the value 65536 used. Not all
- // values in the above range can be represented. S2KCount will
- // be rounded up to the next representable value if it cannot
- // be encoded exactly. When set, it is strongly encrouraged to
- // use a value that is at least 65536. See RFC 4880 Section
- // 3.7.1.3.
- S2KCount int
-}
-
-func (c *Config) hash() crypto.Hash {
- if c == nil || uint(c.Hash) == 0 {
- // SHA1 is the historical default in this package.
- return crypto.SHA1
- }
-
- return c.Hash
-}
-
-func (c *Config) encodedCount() uint8 {
- if c == nil || c.S2KCount == 0 {
- return 96 // The common case. Correspoding to 65536
- }
-
- i := c.S2KCount
- switch {
- // Behave like GPG. Should we make 65536 the lowest value used?
- case i < 1024:
- i = 1024
- case i > 65011712:
- i = 65011712
- }
-
- return encodeCount(i)
-}
-
-// encodeCount converts an iterative "count" in the range 1024 to
-// 65011712, inclusive, to an encoded count. The return value is the
-// octet that is actually stored in the GPG file. encodeCount panics
-// if i is not in the above range (encodedCount above takes care to
-// pass i in the correct range). See RFC 4880 Section 3.7.7.1.
-func encodeCount(i int) uint8 {
- if i < 1024 || i > 65011712 {
- panic("count arg i outside the required range")
- }
-
- for encoded := 0; encoded < 256; encoded++ {
- count := decodeCount(uint8(encoded))
- if count >= i {
- return uint8(encoded)
- }
- }
-
- return 255
-}
-
-// decodeCount returns the s2k mode 3 iterative "count" corresponding to
-// the encoded octet c.
-func decodeCount(c uint8) int {
- return (16 + int(c&15)) << (uint32(c>>4) + 6)
-}
-
-// Simple writes to out the result of computing the Simple S2K function (RFC
-// 4880, section 3.7.1.1) using the given hash and input passphrase.
-func Simple(out []byte, h hash.Hash, in []byte) {
- Salted(out, h, in, nil)
-}
-
-var zero [1]byte
-
-// Salted writes to out the result of computing the Salted S2K function (RFC
-// 4880, section 3.7.1.2) using the given hash, input passphrase and salt.
-func Salted(out []byte, h hash.Hash, in []byte, salt []byte) {
- done := 0
- var digest []byte
-
- for i := 0; done < len(out); i++ {
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(zero[:])
- }
- h.Write(salt)
- h.Write(in)
- digest = h.Sum(digest[:0])
- n := copy(out[done:], digest)
- done += n
- }
-}
-
-// Iterated writes to out the result of computing the Iterated and Salted S2K
-// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase,
-// salt and iteration count.
-func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) {
- combined := make([]byte, len(in)+len(salt))
- copy(combined, salt)
- copy(combined[len(salt):], in)
-
- if count < len(combined) {
- count = len(combined)
- }
-
- done := 0
- var digest []byte
- for i := 0; done < len(out); i++ {
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(zero[:])
- }
- written := 0
- for written < count {
- if written+len(combined) > count {
- todo := count - written
- h.Write(combined[:todo])
- written = count
- } else {
- h.Write(combined)
- written += len(combined)
- }
- }
- digest = h.Sum(digest[:0])
- n := copy(out[done:], digest)
- done += n
- }
-}
-
-// Parse reads a binary specification for a string-to-key transformation from r
-// and returns a function which performs that transform.
-func Parse(r io.Reader) (f func(out, in []byte), err error) {
- var buf [9]byte
-
- _, err = io.ReadFull(r, buf[:2])
- if err != nil {
- return
- }
-
- hash, ok := HashIdToHash(buf[1])
- if !ok {
- return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(buf[1])))
- }
- if !hash.Available() {
- return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hash)))
- }
- h := hash.New()
-
- switch buf[0] {
- case 0:
- f := func(out, in []byte) {
- Simple(out, h, in)
- }
- return f, nil
- case 1:
- _, err = io.ReadFull(r, buf[:8])
- if err != nil {
- return
- }
- f := func(out, in []byte) {
- Salted(out, h, in, buf[:8])
- }
- return f, nil
- case 3:
- _, err = io.ReadFull(r, buf[:9])
- if err != nil {
- return
- }
- count := decodeCount(buf[8])
- f := func(out, in []byte) {
- Iterated(out, h, in, buf[:8], count)
- }
- return f, nil
- }
-
- return nil, errors.UnsupportedError("S2K function")
-}
-
-// Serialize salts and stretches the given passphrase and writes the
-// resulting key into key. It also serializes an S2K descriptor to
-// w. The key stretching can be configured with c, which may be
-// nil. In that case, sensible defaults will be used.
-func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error {
- var buf [11]byte
- buf[0] = 3 /* iterated and salted */
- buf[1], _ = HashToHashId(c.hash())
- salt := buf[2:10]
- if _, err := io.ReadFull(rand, salt); err != nil {
- return err
- }
- encodedCount := c.encodedCount()
- count := decodeCount(encodedCount)
- buf[10] = encodedCount
- if _, err := w.Write(buf[:]); err != nil {
- return err
- }
-
- Iterated(key, c.hash().New(), passphrase, salt, count)
- return nil
-}
-
-// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with
-// Go's crypto.Hash type. See RFC 4880, section 9.4.
-var hashToHashIdMapping = []struct {
- id byte
- hash crypto.Hash
- name string
-}{
- {1, crypto.MD5, "MD5"},
- {2, crypto.SHA1, "SHA1"},
- {3, crypto.RIPEMD160, "RIPEMD160"},
- {8, crypto.SHA256, "SHA256"},
- {9, crypto.SHA384, "SHA384"},
- {10, crypto.SHA512, "SHA512"},
- {11, crypto.SHA224, "SHA224"},
-}
-
-// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP
-// hash id.
-func HashIdToHash(id byte) (h crypto.Hash, ok bool) {
- for _, m := range hashToHashIdMapping {
- if m.id == id {
- return m.hash, true
- }
- }
- return 0, false
-}
-
-// HashIdToString returns the name of the hash function corresponding to the
-// given OpenPGP hash id.
-func HashIdToString(id byte) (name string, ok bool) {
- for _, m := range hashToHashIdMapping {
- if m.id == id {
- return m.name, true
- }
- }
-
- return "", false
-}
-
-// HashIdToHash returns an OpenPGP hash id which corresponds the given Hash.
-func HashToHashId(h crypto.Hash) (id byte, ok bool) {
- for _, m := range hashToHashIdMapping {
- if m.hash == h {
- return m.id, true
- }
- }
- return 0, false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k_test.go
deleted file mode 100644
index 183d26056..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/s2k/s2k_test.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2011 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 file.
-
-package s2k
-
-import (
- "bytes"
- "crypto"
- _ "crypto/md5"
- "crypto/rand"
- "crypto/sha1"
- _ "crypto/sha256"
- _ "crypto/sha512"
- "encoding/hex"
- "testing"
-
- _ "golang.org/x/crypto/ripemd160"
-)
-
-var saltedTests = []struct {
- in, out string
-}{
- {"hello", "10295ac1"},
- {"world", "ac587a5e"},
- {"foo", "4dda8077"},
- {"bar", "bd8aac6b9ea9cae04eae6a91c6133b58b5d9a61c14f355516ed9370456"},
- {"x", "f1d3f289"},
- {"xxxxxxxxxxxxxxxxxxxxxxx", "e00d7b45"},
-}
-
-func TestSalted(t *testing.T) {
- h := sha1.New()
- salt := [4]byte{1, 2, 3, 4}
-
- for i, test := range saltedTests {
- expected, _ := hex.DecodeString(test.out)
- out := make([]byte, len(expected))
- Salted(out, h, []byte(test.in), salt[:])
- if !bytes.Equal(expected, out) {
- t.Errorf("#%d, got: %x want: %x", i, out, expected)
- }
- }
-}
-
-var iteratedTests = []struct {
- in, out string
-}{
- {"hello", "83126105"},
- {"world", "6fa317f9"},
- {"foo", "8fbc35b9"},
- {"bar", "2af5a99b54f093789fd657f19bd245af7604d0f6ae06f66602a46a08ae"},
- {"x", "5a684dfe"},
- {"xxxxxxxxxxxxxxxxxxxxxxx", "18955174"},
-}
-
-func TestIterated(t *testing.T) {
- h := sha1.New()
- salt := [4]byte{4, 3, 2, 1}
-
- for i, test := range iteratedTests {
- expected, _ := hex.DecodeString(test.out)
- out := make([]byte, len(expected))
- Iterated(out, h, []byte(test.in), salt[:], 31)
- if !bytes.Equal(expected, out) {
- t.Errorf("#%d, got: %x want: %x", i, out, expected)
- }
- }
-}
-
-var parseTests = []struct {
- spec, in, out string
-}{
- /* Simple with SHA1 */
- {"0002", "hello", "aaf4c61d"},
- /* Salted with SHA1 */
- {"01020102030405060708", "hello", "f4f7d67e"},
- /* Iterated with SHA1 */
- {"03020102030405060708f1", "hello", "f2a57b7c"},
-}
-
-func TestParse(t *testing.T) {
- for i, test := range parseTests {
- spec, _ := hex.DecodeString(test.spec)
- buf := bytes.NewBuffer(spec)
- f, err := Parse(buf)
- if err != nil {
- t.Errorf("%d: Parse returned error: %s", i, err)
- continue
- }
-
- expected, _ := hex.DecodeString(test.out)
- out := make([]byte, len(expected))
- f(out, []byte(test.in))
- if !bytes.Equal(out, expected) {
- t.Errorf("%d: output got: %x want: %x", i, out, expected)
- }
- if testing.Short() {
- break
- }
- }
-}
-
-func TestSerialize(t *testing.T) {
- hashes := []crypto.Hash{crypto.MD5, crypto.SHA1, crypto.RIPEMD160,
- crypto.SHA256, crypto.SHA384, crypto.SHA512, crypto.SHA224}
- testCounts := []int{-1, 0, 1024, 65536, 4063232, 65011712}
- for _, h := range hashes {
- for _, c := range testCounts {
- testSerializeConfig(t, &Config{Hash: h, S2KCount: c})
- }
- }
-}
-
-func testSerializeConfig(t *testing.T, c *Config) {
- t.Logf("Running testSerializeConfig() with config: %+v", c)
-
- buf := bytes.NewBuffer(nil)
- key := make([]byte, 16)
- passphrase := []byte("testing")
- err := Serialize(buf, key, rand.Reader, passphrase, c)
- if err != nil {
- t.Errorf("failed to serialize: %s", err)
- return
- }
-
- f, err := Parse(buf)
- if err != nil {
- t.Errorf("failed to reparse: %s", err)
- return
- }
- key2 := make([]byte, len(key))
- f(key2, passphrase)
- if !bytes.Equal(key2, key) {
- t.Errorf("keys don't match: %x (serialied) vs %x (parsed)", key, key2)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write.go
deleted file mode 100644
index 65a304cc8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write.go
+++ /dev/null
@@ -1,378 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import (
- "crypto"
- "hash"
- "io"
- "strconv"
- "time"
-
- "golang.org/x/crypto/openpgp/armor"
- "golang.org/x/crypto/openpgp/errors"
- "golang.org/x/crypto/openpgp/packet"
- "golang.org/x/crypto/openpgp/s2k"
-)
-
-// DetachSign signs message with the private key from signer (which must
-// already have been decrypted) and writes the signature to w.
-// If config is nil, sensible defaults will be used.
-func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return detachSign(w, signer, message, packet.SigTypeBinary, config)
-}
-
-// ArmoredDetachSign signs message with the private key from signer (which
-// must already have been decrypted) and writes an armored signature to w.
-// If config is nil, sensible defaults will be used.
-func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) {
- return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config)
-}
-
-// DetachSignText signs message (after canonicalising the line endings) with
-// the private key from signer (which must already have been decrypted) and
-// writes the signature to w.
-// If config is nil, sensible defaults will be used.
-func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return detachSign(w, signer, message, packet.SigTypeText, config)
-}
-
-// ArmoredDetachSignText signs message (after canonicalising the line endings)
-// with the private key from signer (which must already have been decrypted)
-// and writes an armored signature to w.
-// If config is nil, sensible defaults will be used.
-func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return armoredDetachSign(w, signer, message, packet.SigTypeText, config)
-}
-
-func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
- out, err := armor.Encode(w, SignatureType, nil)
- if err != nil {
- return
- }
- err = detachSign(out, signer, message, sigType, config)
- if err != nil {
- return
- }
- return out.Close()
-}
-
-func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
- if signer.PrivateKey == nil {
- return errors.InvalidArgumentError("signing key doesn't have a private key")
- }
- if signer.PrivateKey.Encrypted {
- return errors.InvalidArgumentError("signing key is encrypted")
- }
-
- sig := new(packet.Signature)
- sig.SigType = sigType
- sig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo
- sig.Hash = config.Hash()
- sig.CreationTime = config.Now()
- sig.IssuerKeyId = &signer.PrivateKey.KeyId
-
- h, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType)
- if err != nil {
- return
- }
- io.Copy(wrappedHash, message)
-
- err = sig.Sign(h, signer.PrivateKey, config)
- if err != nil {
- return
- }
-
- return sig.Serialize(w)
-}
-
-// FileHints contains metadata about encrypted files. This metadata is, itself,
-// encrypted.
-type FileHints struct {
- // IsBinary can be set to hint that the contents are binary data.
- IsBinary bool
- // FileName hints at the name of the file that should be written. It's
- // truncated to 255 bytes if longer. It may be empty to suggest that the
- // file should not be written to disk. It may be equal to "_CONSOLE" to
- // suggest the data should not be written to disk.
- FileName string
- // ModTime contains the modification time of the file, or the zero time if not applicable.
- ModTime time.Time
-}
-
-// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.
-// The resulting WriteCloser must be closed after the contents of the file have
-// been written.
-// If config is nil, sensible defaults will be used.
-func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- if hints == nil {
- hints = &FileHints{}
- }
-
- key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config)
- if err != nil {
- return
- }
- w, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config)
- if err != nil {
- return
- }
-
- literaldata := w
- if algo := config.Compression(); algo != packet.CompressionNone {
- var compConfig *packet.CompressionConfig
- if config != nil {
- compConfig = config.CompressionConfig
- }
- literaldata, err = packet.SerializeCompressed(w, algo, compConfig)
- if err != nil {
- return
- }
- }
-
- var epochSeconds uint32
- if !hints.ModTime.IsZero() {
- epochSeconds = uint32(hints.ModTime.Unix())
- }
- return packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds)
-}
-
-// intersectPreferences mutates and returns a prefix of a that contains only
-// the values in the intersection of a and b. The order of a is preserved.
-func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) {
- var j int
- for _, v := range a {
- for _, v2 := range b {
- if v == v2 {
- a[j] = v
- j++
- break
- }
- }
- }
-
- return a[:j]
-}
-
-func hashToHashId(h crypto.Hash) uint8 {
- v, ok := s2k.HashToHashId(h)
- if !ok {
- panic("tried to convert unknown hash")
- }
- return v
-}
-
-// Encrypt encrypts a message to a number of recipients and, optionally, signs
-// it. hints contains optional information, that is also encrypted, that aids
-// the recipients in processing the message. The resulting WriteCloser must
-// be closed after the contents of the file have been written.
-// If config is nil, sensible defaults will be used.
-func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- var signer *packet.PrivateKey
- if signed != nil {
- signKey, ok := signed.signingKey(config.Now())
- if !ok {
- return nil, errors.InvalidArgumentError("no valid signing keys")
- }
- signer = signKey.PrivateKey
- if signer == nil {
- return nil, errors.InvalidArgumentError("no private key in signing key")
- }
- if signer.Encrypted {
- return nil, errors.InvalidArgumentError("signing key must be decrypted")
- }
- }
-
- // These are the possible ciphers that we'll use for the message.
- candidateCiphers := []uint8{
- uint8(packet.CipherAES128),
- uint8(packet.CipherAES256),
- uint8(packet.CipherCAST5),
- }
- // These are the possible hash functions that we'll use for the signature.
- candidateHashes := []uint8{
- hashToHashId(crypto.SHA256),
- hashToHashId(crypto.SHA512),
- hashToHashId(crypto.SHA1),
- hashToHashId(crypto.RIPEMD160),
- }
- // In the event that a recipient doesn't specify any supported ciphers
- // or hash functions, these are the ones that we assume that every
- // implementation supports.
- defaultCiphers := candidateCiphers[len(candidateCiphers)-1:]
- defaultHashes := candidateHashes[len(candidateHashes)-1:]
-
- encryptKeys := make([]Key, len(to))
- for i := range to {
- var ok bool
- encryptKeys[i], ok = to[i].encryptionKey(config.Now())
- if !ok {
- return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no encryption keys")
- }
-
- sig := to[i].primaryIdentity().SelfSignature
-
- preferredSymmetric := sig.PreferredSymmetric
- if len(preferredSymmetric) == 0 {
- preferredSymmetric = defaultCiphers
- }
- preferredHashes := sig.PreferredHash
- if len(preferredHashes) == 0 {
- preferredHashes = defaultHashes
- }
- candidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric)
- candidateHashes = intersectPreferences(candidateHashes, preferredHashes)
- }
-
- if len(candidateCiphers) == 0 || len(candidateHashes) == 0 {
- return nil, errors.InvalidArgumentError("cannot encrypt because recipient set shares no common algorithms")
- }
-
- cipher := packet.CipherFunction(candidateCiphers[0])
- // If the cipher specified by config is a candidate, we'll use that.
- configuredCipher := config.Cipher()
- for _, c := range candidateCiphers {
- cipherFunc := packet.CipherFunction(c)
- if cipherFunc == configuredCipher {
- cipher = cipherFunc
- break
- }
- }
-
- var hash crypto.Hash
- for _, hashId := range candidateHashes {
- if h, ok := s2k.HashIdToHash(hashId); ok && h.Available() {
- hash = h
- break
- }
- }
-
- // If the hash specified by config is a candidate, we'll use that.
- if configuredHash := config.Hash(); configuredHash.Available() {
- for _, hashId := range candidateHashes {
- if h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash {
- hash = h
- break
- }
- }
- }
-
- if hash == 0 {
- hashId := candidateHashes[0]
- name, ok := s2k.HashIdToString(hashId)
- if !ok {
- name = "#" + strconv.Itoa(int(hashId))
- }
- return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)")
- }
-
- symKey := make([]byte, cipher.KeySize())
- if _, err := io.ReadFull(config.Random(), symKey); err != nil {
- return nil, err
- }
-
- for _, key := range encryptKeys {
- if err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil {
- return nil, err
- }
- }
-
- encryptedData, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config)
- if err != nil {
- return
- }
-
- if signer != nil {
- ops := &packet.OnePassSignature{
- SigType: packet.SigTypeBinary,
- Hash: hash,
- PubKeyAlgo: signer.PubKeyAlgo,
- KeyId: signer.KeyId,
- IsLast: true,
- }
- if err := ops.Serialize(encryptedData); err != nil {
- return nil, err
- }
- }
-
- if hints == nil {
- hints = &FileHints{}
- }
-
- w := encryptedData
- if signer != nil {
- // If we need to write a signature packet after the literal
- // data then we need to stop literalData from closing
- // encryptedData.
- w = noOpCloser{encryptedData}
-
- }
- var epochSeconds uint32
- if !hints.ModTime.IsZero() {
- epochSeconds = uint32(hints.ModTime.Unix())
- }
- literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds)
- if err != nil {
- return nil, err
- }
-
- if signer != nil {
- return signatureWriter{encryptedData, literalData, hash, hash.New(), signer, config}, nil
- }
- return literalData, nil
-}
-
-// signatureWriter hashes the contents of a message while passing it along to
-// literalData. When closed, it closes literalData, writes a signature packet
-// to encryptedData and then also closes encryptedData.
-type signatureWriter struct {
- encryptedData io.WriteCloser
- literalData io.WriteCloser
- hashType crypto.Hash
- h hash.Hash
- signer *packet.PrivateKey
- config *packet.Config
-}
-
-func (s signatureWriter) Write(data []byte) (int, error) {
- s.h.Write(data)
- return s.literalData.Write(data)
-}
-
-func (s signatureWriter) Close() error {
- sig := &packet.Signature{
- SigType: packet.SigTypeBinary,
- PubKeyAlgo: s.signer.PubKeyAlgo,
- Hash: s.hashType,
- CreationTime: s.config.Now(),
- IssuerKeyId: &s.signer.KeyId,
- }
-
- if err := sig.Sign(s.h, s.signer, s.config); err != nil {
- return err
- }
- if err := s.literalData.Close(); err != nil {
- return err
- }
- if err := sig.Serialize(s.encryptedData); err != nil {
- return err
- }
- return s.encryptedData.Close()
-}
-
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
-// TODO: we have two of these in OpenPGP packages alone. This probably needs
-// to be promoted somewhere more common.
-type noOpCloser struct {
- w io.Writer
-}
-
-func (c noOpCloser) Write(data []byte) (n int, err error) {
- return c.w.Write(data)
-}
-
-func (c noOpCloser) Close() error {
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write_test.go
deleted file mode 100644
index f2d50a0cf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/openpgp/write_test.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Copyright 2011 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 file.
-
-package openpgp
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "testing"
- "time"
-
- "golang.org/x/crypto/openpgp/packet"
-)
-
-func TestSignDetached(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
- out := bytes.NewBuffer(nil)
- message := bytes.NewBufferString(signedInput)
- err := DetachSign(out, kring[0], message, nil)
- if err != nil {
- t.Error(err)
- }
-
- testDetachedSignature(t, kring, out, signedInput, "check", testKey1KeyId)
-}
-
-func TestSignTextDetached(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
- out := bytes.NewBuffer(nil)
- message := bytes.NewBufferString(signedInput)
- err := DetachSignText(out, kring[0], message, nil)
- if err != nil {
- t.Error(err)
- }
-
- testDetachedSignature(t, kring, out, signedInput, "check", testKey1KeyId)
-}
-
-func TestSignDetachedDSA(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(dsaTestKeyPrivateHex))
- out := bytes.NewBuffer(nil)
- message := bytes.NewBufferString(signedInput)
- err := DetachSign(out, kring[0], message, nil)
- if err != nil {
- t.Error(err)
- }
-
- testDetachedSignature(t, kring, out, signedInput, "check", testKey3KeyId)
-}
-
-func TestSignDetachedP256(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(p256TestKeyPrivateHex))
- kring[0].PrivateKey.Decrypt([]byte("passphrase"))
-
- out := bytes.NewBuffer(nil)
- message := bytes.NewBufferString(signedInput)
- err := DetachSign(out, kring[0], message, nil)
- if err != nil {
- t.Error(err)
- }
-
- testDetachedSignature(t, kring, out, signedInput, "check", testKeyP256KeyId)
-}
-
-func TestNewEntity(t *testing.T) {
- if testing.Short() {
- return
- }
-
- // Check bit-length with no config.
- e, err := NewEntity("Test User", "test", "test@example.com", nil)
- if err != nil {
- t.Errorf("failed to create entity: %s", err)
- return
- }
- bl, err := e.PrimaryKey.BitLength()
- if err != nil {
- t.Errorf("failed to find bit length: %s", err)
- }
- if int(bl) != defaultRSAKeyBits {
- t.Errorf("BitLength %v, expected %v", int(bl), defaultRSAKeyBits)
- }
-
- // Check bit-length with a config.
- cfg := &packet.Config{RSABits: 1024}
- e, err = NewEntity("Test User", "test", "test@example.com", cfg)
- if err != nil {
- t.Errorf("failed to create entity: %s", err)
- return
- }
- bl, err = e.PrimaryKey.BitLength()
- if err != nil {
- t.Errorf("failed to find bit length: %s", err)
- }
- if int(bl) != cfg.RSABits {
- t.Errorf("BitLength %v, expected %v", bl, cfg.RSABits)
- }
-
- w := bytes.NewBuffer(nil)
- if err := e.SerializePrivate(w, nil); err != nil {
- t.Errorf("failed to serialize entity: %s", err)
- return
- }
- serialized := w.Bytes()
-
- el, err := ReadKeyRing(w)
- if err != nil {
- t.Errorf("failed to reparse entity: %s", err)
- return
- }
-
- if len(el) != 1 {
- t.Errorf("wrong number of entities found, got %d, want 1", len(el))
- }
-
- w = bytes.NewBuffer(nil)
- if err := e.SerializePrivate(w, nil); err != nil {
- t.Errorf("failed to serialize entity second time: %s", err)
- return
- }
-
- if !bytes.Equal(w.Bytes(), serialized) {
- t.Errorf("results differed")
- }
-}
-
-func TestSymmetricEncryption(t *testing.T) {
- buf := new(bytes.Buffer)
- plaintext, err := SymmetricallyEncrypt(buf, []byte("testing"), nil, nil)
- if err != nil {
- t.Errorf("error writing headers: %s", err)
- return
- }
- message := []byte("hello world\n")
- _, err = plaintext.Write(message)
- if err != nil {
- t.Errorf("error writing to plaintext writer: %s", err)
- }
- err = plaintext.Close()
- if err != nil {
- t.Errorf("error closing plaintext writer: %s", err)
- }
-
- md, err := ReadMessage(buf, nil, func(keys []Key, symmetric bool) ([]byte, error) {
- return []byte("testing"), nil
- }, nil)
- if err != nil {
- t.Errorf("error rereading message: %s", err)
- }
- messageBuf := bytes.NewBuffer(nil)
- _, err = io.Copy(messageBuf, md.UnverifiedBody)
- if err != nil {
- t.Errorf("error rereading message: %s", err)
- }
- if !bytes.Equal(message, messageBuf.Bytes()) {
- t.Errorf("recovered message incorrect got '%s', want '%s'", messageBuf.Bytes(), message)
- }
-}
-
-var testEncryptionTests = []struct {
- keyRingHex string
- isSigned bool
-}{
- {
- testKeys1And2PrivateHex,
- false,
- },
- {
- testKeys1And2PrivateHex,
- true,
- },
- {
- dsaElGamalTestKeysHex,
- false,
- },
- {
- dsaElGamalTestKeysHex,
- true,
- },
-}
-
-func TestEncryption(t *testing.T) {
- for i, test := range testEncryptionTests {
- kring, _ := ReadKeyRing(readerFromHex(test.keyRingHex))
-
- passphrase := []byte("passphrase")
- for _, entity := range kring {
- if entity.PrivateKey != nil && entity.PrivateKey.Encrypted {
- err := entity.PrivateKey.Decrypt(passphrase)
- if err != nil {
- t.Errorf("#%d: failed to decrypt key", i)
- }
- }
- for _, subkey := range entity.Subkeys {
- if subkey.PrivateKey != nil && subkey.PrivateKey.Encrypted {
- err := subkey.PrivateKey.Decrypt(passphrase)
- if err != nil {
- t.Errorf("#%d: failed to decrypt subkey", i)
- }
- }
- }
- }
-
- var signed *Entity
- if test.isSigned {
- signed = kring[0]
- }
-
- buf := new(bytes.Buffer)
- w, err := Encrypt(buf, kring[:1], signed, nil /* no hints */, nil)
- if err != nil {
- t.Errorf("#%d: error in Encrypt: %s", i, err)
- continue
- }
-
- const message = "testing"
- _, err = w.Write([]byte(message))
- if err != nil {
- t.Errorf("#%d: error writing plaintext: %s", i, err)
- continue
- }
- err = w.Close()
- if err != nil {
- t.Errorf("#%d: error closing WriteCloser: %s", i, err)
- continue
- }
-
- md, err := ReadMessage(buf, kring, nil /* no prompt */, nil)
- if err != nil {
- t.Errorf("#%d: error reading message: %s", i, err)
- continue
- }
-
- testTime, _ := time.Parse("2006-01-02", "2013-07-01")
- if test.isSigned {
- signKey, _ := kring[0].signingKey(testTime)
- expectedKeyId := signKey.PublicKey.KeyId
- if md.SignedByKeyId != expectedKeyId {
- t.Errorf("#%d: message signed by wrong key id, got: %v, want: %v", i, *md.SignedBy, expectedKeyId)
- }
- if md.SignedBy == nil {
- t.Errorf("#%d: failed to find the signing Entity", i)
- }
- }
-
- plaintext, err := ioutil.ReadAll(md.UnverifiedBody)
- if err != nil {
- t.Errorf("#%d: error reading encrypted contents: %s", i, err)
- continue
- }
-
- encryptKey, _ := kring[0].encryptionKey(testTime)
- expectedKeyId := encryptKey.PublicKey.KeyId
- if len(md.EncryptedToKeyIds) != 1 || md.EncryptedToKeyIds[0] != expectedKeyId {
- t.Errorf("#%d: expected message to be encrypted to %v, but got %#v", i, expectedKeyId, md.EncryptedToKeyIds)
- }
-
- if string(plaintext) != message {
- t.Errorf("#%d: got: %s, want: %s", i, string(plaintext), message)
- }
-
- if test.isSigned {
- if md.SignatureError != nil {
- t.Errorf("#%d: signature error: %s", i, md.SignatureError)
- }
- if md.Signature == nil {
- t.Error("signature missing")
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/libotr_test_helper.c b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/libotr_test_helper.c
deleted file mode 100644
index b3ca072d4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/libotr_test_helper.c
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright 2012 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 file.
-
-// This code can be compiled and used to test the otr package against libotr.
-// See otr_test.go.
-
-// +build ignore
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <proto.h>
-#include <message.h>
-#include <privkey.h>
-
-static int g_session_established = 0;
-
-OtrlPolicy policy(void *opdata, ConnContext *context) {
- return OTRL_POLICY_ALWAYS;
-}
-
-int is_logged_in(void *opdata, const char *accountname, const char *protocol,
- const char *recipient) {
- return 1;
-}
-
-void inject_message(void *opdata, const char *accountname, const char *protocol,
- const char *recipient, const char *message) {
- printf("%s\n", message);
- fflush(stdout);
- fprintf(stderr, "libotr helper sent: %s\n", message);
-}
-
-void update_context_list(void *opdata) {}
-
-void new_fingerprint(void *opdata, OtrlUserState us, const char *accountname,
- const char *protocol, const char *username,
- unsigned char fingerprint[20]) {
- fprintf(stderr, "NEW FINGERPRINT\n");
- g_session_established = 1;
-}
-
-void write_fingerprints(void *opdata) {}
-
-void gone_secure(void *opdata, ConnContext *context) {}
-
-void gone_insecure(void *opdata, ConnContext *context) {}
-
-void still_secure(void *opdata, ConnContext *context, int is_reply) {}
-
-int max_message_size(void *opdata, ConnContext *context) { return 99999; }
-
-const char *account_name(void *opdata, const char *account,
- const char *protocol) {
- return "ACCOUNT";
-}
-
-void account_name_free(void *opdata, const char *account_name) {}
-
-const char *error_message(void *opdata, ConnContext *context,
- OtrlErrorCode err_code) {
- return "ERR";
-}
-
-void error_message_free(void *opdata, const char *msg) {}
-
-void resent_msg_prefix_free(void *opdata, const char *prefix) {}
-
-void handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
- ConnContext *context, unsigned short progress_event,
- char *question) {}
-
-void handle_msg_event(void *opdata, OtrlMessageEvent msg_event,
- ConnContext *context, const char *message,
- gcry_error_t err) {
- fprintf(stderr, "msg event: %d %s\n", msg_event, message);
-}
-
-OtrlMessageAppOps uiops = {
- policy,
- NULL,
- is_logged_in,
- inject_message,
- update_context_list,
- new_fingerprint,
- write_fingerprints,
- gone_secure,
- gone_insecure,
- still_secure,
- max_message_size,
- account_name,
- account_name_free,
- NULL, /* received_symkey */
- error_message,
- error_message_free,
- NULL, /* resent_msg_prefix */
- resent_msg_prefix_free,
- handle_smp_event,
- handle_msg_event,
- NULL /* create_instag */,
- NULL /* convert_msg */,
- NULL /* convert_free */,
- NULL /* timer_control */,
-};
-
-static const char kPrivateKeyData[] =
- "(privkeys (account (name \"account\") (protocol proto) (private-key (dsa "
- "(p "
- "#00FC07ABCF0DC916AFF6E9AE47BEF60C7AB9B4D6B2469E436630E36F8A489BE812486A09F"
- "30B71224508654940A835301ACC525A4FF133FC152CC53DCC59D65C30A54F1993FE13FE63E"
- "5823D4C746DB21B90F9B9C00B49EC7404AB1D929BA7FBA12F2E45C6E0A651689750E8528AB"
- "8C031D3561FECEE72EBB4A090D450A9B7A857#) (q "
- "#00997BD266EF7B1F60A5C23F3A741F2AEFD07A2081#) (g "
- "#535E360E8A95EBA46A4F7DE50AD6E9B2A6DB785A66B64EB9F20338D2A3E8FB0E94725848F"
- "1AA6CC567CB83A1CC517EC806F2E92EAE71457E80B2210A189B91250779434B41FC8A8873F"
- "6DB94BEA7D177F5D59E7E114EE10A49CFD9CEF88AE43387023B672927BA74B04EB6BBB5E57"
- "597766A2F9CE3857D7ACE3E1E3BC1FC6F26#) (y "
- "#0AC8670AD767D7A8D9D14CC1AC6744CD7D76F993B77FFD9E39DF01E5A6536EF65E775FCEF"
- "2A983E2A19BD6415500F6979715D9FD1257E1FE2B6F5E1E74B333079E7C880D39868462A93"
- "454B41877BE62E5EF0A041C2EE9C9E76BD1E12AE25D9628DECB097025DD625EF49C3258A1A"
- "3C0FF501E3DC673B76D7BABF349009B6ECF#) (x "
- "#14D0345A3562C480A039E3C72764F72D79043216#)))))\n";
-
-int main() {
- OTRL_INIT;
-
- // We have to write the private key information to a file because the libotr
- // API demands a filename to read from.
- const char *tmpdir = "/tmp";
- if (getenv("TMP")) {
- tmpdir = getenv("TMP");
- }
-
- char private_key_file[256];
- snprintf(private_key_file, sizeof(private_key_file),
- "%s/libotr_test_helper_privatekeys-XXXXXX", tmpdir);
- int fd = mkstemp(private_key_file);
- if (fd == -1) {
- perror("creating temp file");
- }
- write(fd, kPrivateKeyData, sizeof(kPrivateKeyData) - 1);
- close(fd);
-
- OtrlUserState userstate = otrl_userstate_create();
- otrl_privkey_read(userstate, private_key_file);
- unlink(private_key_file);
-
- fprintf(stderr, "libotr helper started\n");
-
- char buf[4096];
-
- for (;;) {
- char *message = fgets(buf, sizeof(buf), stdin);
- if (strlen(message) == 0) {
- break;
- }
- message[strlen(message) - 1] = 0;
- fprintf(stderr, "libotr helper got: %s\n", message);
-
- char *newmessage = NULL;
- OtrlTLV *tlvs;
- int ignore_message = otrl_message_receiving(
- userstate, &uiops, NULL, "account", "proto", "peer", message,
- &newmessage, &tlvs, NULL, NULL, NULL);
- if (tlvs) {
- otrl_tlv_free(tlvs);
- }
-
- if (newmessage != NULL) {
- fprintf(stderr, "libotr got: %s\n", newmessage);
- otrl_message_free(newmessage);
-
- gcry_error_t err;
- char *newmessage = NULL;
-
- err = otrl_message_sending(userstate, &uiops, NULL, "account", "proto",
- "peer", 0, "test message", NULL, &newmessage,
- OTRL_FRAGMENT_SEND_SKIP, NULL, NULL, NULL);
- if (newmessage == NULL) {
- fprintf(stderr, "libotr didn't encrypt message\n");
- return 1;
- }
- write(1, newmessage, strlen(newmessage));
- write(1, "\n", 1);
- fprintf(stderr, "libotr sent: %s\n", newmessage);
- otrl_message_free(newmessage);
-
- g_session_established = 0;
- write(1, "?OTRv2?\n", 8);
- fprintf(stderr, "libotr sent: ?OTRv2\n");
- }
- }
-
- return 0;
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr.go
deleted file mode 100644
index 173b753db..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr.go
+++ /dev/null
@@ -1,1415 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package otr implements the Off The Record protocol as specified in
-// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
-package otr // import "golang.org/x/crypto/otr"
-
-import (
- "bytes"
- "crypto/aes"
- "crypto/cipher"
- "crypto/dsa"
- "crypto/hmac"
- "crypto/rand"
- "crypto/sha1"
- "crypto/sha256"
- "crypto/subtle"
- "encoding/base64"
- "encoding/hex"
- "errors"
- "hash"
- "io"
- "math/big"
- "strconv"
-)
-
-// SecurityChange describes a change in the security state of a Conversation.
-type SecurityChange int
-
-const (
- NoChange SecurityChange = iota
- // NewKeys indicates that a key exchange has completed. This occurs
- // when a conversation first becomes encrypted, and when the keys are
- // renegotiated within an encrypted conversation.
- NewKeys
- // SMPSecretNeeded indicates that the peer has started an
- // authentication and that we need to supply a secret. Call SMPQuestion
- // to get the optional, human readable challenge and then Authenticate
- // to supply the matching secret.
- SMPSecretNeeded
- // SMPComplete indicates that an authentication completed. The identity
- // of the peer has now been confirmed.
- SMPComplete
- // SMPFailed indicates that an authentication failed.
- SMPFailed
- // ConversationEnded indicates that the peer ended the secure
- // conversation.
- ConversationEnded
-)
-
-// QueryMessage can be sent to a peer to start an OTR conversation.
-var QueryMessage = "?OTRv2?"
-
-// ErrorPrefix can be used to make an OTR error by appending an error message
-// to it.
-var ErrorPrefix = "?OTR Error:"
-
-var (
- fragmentPartSeparator = []byte(",")
- fragmentPrefix = []byte("?OTR,")
- msgPrefix = []byte("?OTR:")
- queryMarker = []byte("?OTR")
-)
-
-// isQuery attempts to parse an OTR query from msg and returns the greatest
-// common version, or 0 if msg is not an OTR query.
-func isQuery(msg []byte) (greatestCommonVersion int) {
- pos := bytes.Index(msg, queryMarker)
- if pos == -1 {
- return 0
- }
- for i, c := range msg[pos+len(queryMarker):] {
- if i == 0 {
- if c == '?' {
- // Indicates support for version 1, but we don't
- // implement that.
- continue
- }
-
- if c != 'v' {
- // Invalid message
- return 0
- }
-
- continue
- }
-
- if c == '?' {
- // End of message
- return
- }
-
- if c == ' ' || c == '\t' {
- // Probably an invalid message
- return 0
- }
-
- if c == '2' {
- greatestCommonVersion = 2
- }
- }
-
- return 0
-}
-
-const (
- statePlaintext = iota
- stateEncrypted
- stateFinished
-)
-
-const (
- authStateNone = iota
- authStateAwaitingDHKey
- authStateAwaitingRevealSig
- authStateAwaitingSig
-)
-
-const (
- msgTypeDHCommit = 2
- msgTypeData = 3
- msgTypeDHKey = 10
- msgTypeRevealSig = 17
- msgTypeSig = 18
-)
-
-const (
- // If the requested fragment size is less than this, it will be ignored.
- minFragmentSize = 18
- // Messages are padded to a multiple of this number of bytes.
- paddingGranularity = 256
- // The number of bytes in a Diffie-Hellman private value (320-bits).
- dhPrivateBytes = 40
- // The number of bytes needed to represent an element of the DSA
- // subgroup (160-bits).
- dsaSubgroupBytes = 20
- // The number of bytes of the MAC that are sent on the wire (160-bits).
- macPrefixBytes = 20
-)
-
-// These are the global, common group parameters for OTR.
-var (
- p *big.Int // group prime
- g *big.Int // group generator
- q *big.Int // group order
- pMinus2 *big.Int
-)
-
-func init() {
- p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF", 16)
- q, _ = new(big.Int).SetString("7FFFFFFFFFFFFFFFE487ED5110B4611A62633145C06E0E68948127044533E63A0105DF531D89CD9128A5043CC71A026EF7CA8CD9E69D218D98158536F92F8A1BA7F09AB6B6A8E122F242DABB312F3F637A262174D31BF6B585FFAE5B7A035BF6F71C35FDAD44CFD2D74F9208BE258FF324943328F6722D9EE1003E5C50B1DF82CC6D241B0E2AE9CD348B1FD47E9267AFC1B2AE91EE51D6CB0E3179AB1042A95DCF6A9483B84B4B36B3861AA7255E4C0278BA36046511B993FFFFFFFFFFFFFFFF", 16)
- g = new(big.Int).SetInt64(2)
- pMinus2 = new(big.Int).Sub(p, g)
-}
-
-// Conversation represents a relation with a peer. The zero value is a valid
-// Conversation, although PrivateKey must be set.
-//
-// When communicating with a peer, all inbound messages should be passed to
-// Conversation.Receive and all outbound messages to Conversation.Send. The
-// Conversation will take care of maintaining the encryption state and
-// negotiating encryption as needed.
-type Conversation struct {
- // PrivateKey contains the private key to use to sign key exchanges.
- PrivateKey *PrivateKey
-
- // Rand can be set to override the entropy source. Otherwise,
- // crypto/rand will be used.
- Rand io.Reader
- // If FragmentSize is set, all messages produced by Receive and Send
- // will be fragmented into messages of, at most, this number of bytes.
- FragmentSize int
-
- // Once Receive has returned NewKeys once, the following fields are
- // valid.
- SSID [8]byte
- TheirPublicKey PublicKey
-
- state, authState int
-
- r [16]byte
- x, y *big.Int
- gx, gy *big.Int
- gxBytes []byte
- digest [sha256.Size]byte
-
- revealKeys, sigKeys akeKeys
-
- myKeyId uint32
- myCurrentDHPub *big.Int
- myCurrentDHPriv *big.Int
- myLastDHPub *big.Int
- myLastDHPriv *big.Int
-
- theirKeyId uint32
- theirCurrentDHPub *big.Int
- theirLastDHPub *big.Int
-
- keySlots [4]keySlot
-
- myCounter [8]byte
- theirLastCtr [8]byte
- oldMACs []byte
-
- k, n int // fragment state
- frag []byte
-
- smp smpState
-}
-
-// A keySlot contains key material for a specific (their keyid, my keyid) pair.
-type keySlot struct {
- // used is true if this slot is valid. If false, it's free for reuse.
- used bool
- theirKeyId uint32
- myKeyId uint32
- sendAESKey, recvAESKey []byte
- sendMACKey, recvMACKey []byte
- theirLastCtr [8]byte
-}
-
-// akeKeys are generated during key exchange. There's one set for the reveal
-// signature message and another for the signature message. In the protocol
-// spec the latter are indicated with a prime mark.
-type akeKeys struct {
- c [16]byte
- m1, m2 [32]byte
-}
-
-func (c *Conversation) rand() io.Reader {
- if c.Rand != nil {
- return c.Rand
- }
- return rand.Reader
-}
-
-func (c *Conversation) randMPI(buf []byte) *big.Int {
- _, err := io.ReadFull(c.rand(), buf)
- if err != nil {
- panic("otr: short read from random source")
- }
-
- return new(big.Int).SetBytes(buf)
-}
-
-// tlv represents the type-length value from the protocol.
-type tlv struct {
- typ, length uint16
- data []byte
-}
-
-const (
- tlvTypePadding = 0
- tlvTypeDisconnected = 1
- tlvTypeSMP1 = 2
- tlvTypeSMP2 = 3
- tlvTypeSMP3 = 4
- tlvTypeSMP4 = 5
- tlvTypeSMPAbort = 6
- tlvTypeSMP1WithQuestion = 7
-)
-
-// Receive handles a message from a peer. It returns a human readable message,
-// an indicator of whether that message was encrypted, a hint about the
-// encryption state and zero or more messages to send back to the peer.
-// These messages do not need to be passed to Send before transmission.
-func (c *Conversation) Receive(in []byte) (out []byte, encrypted bool, change SecurityChange, toSend [][]byte, err error) {
- if bytes.HasPrefix(in, fragmentPrefix) {
- in, err = c.processFragment(in)
- if in == nil || err != nil {
- return
- }
- }
-
- if bytes.HasPrefix(in, msgPrefix) && in[len(in)-1] == '.' {
- in = in[len(msgPrefix) : len(in)-1]
- } else if version := isQuery(in); version > 0 {
- c.authState = authStateAwaitingDHKey
- c.reset()
- toSend = c.encode(c.generateDHCommit())
- return
- } else {
- // plaintext message
- out = in
- return
- }
-
- msg := make([]byte, base64.StdEncoding.DecodedLen(len(in)))
- msgLen, err := base64.StdEncoding.Decode(msg, in)
- if err != nil {
- err = errors.New("otr: invalid base64 encoding in message")
- return
- }
- msg = msg[:msgLen]
-
- // The first two bytes are the protocol version (2)
- if len(msg) < 3 || msg[0] != 0 || msg[1] != 2 {
- err = errors.New("otr: invalid OTR message")
- return
- }
-
- msgType := int(msg[2])
- msg = msg[3:]
-
- switch msgType {
- case msgTypeDHCommit:
- switch c.authState {
- case authStateNone:
- c.authState = authStateAwaitingRevealSig
- if err = c.processDHCommit(msg); err != nil {
- return
- }
- c.reset()
- toSend = c.encode(c.generateDHKey())
- return
- case authStateAwaitingDHKey:
- // This is a 'SYN-crossing'. The greater digest wins.
- var cmp int
- if cmp, err = c.compareToDHCommit(msg); err != nil {
- return
- }
- if cmp > 0 {
- // We win. Retransmit DH commit.
- toSend = c.encode(c.serializeDHCommit())
- return
- } else {
- // They win. We forget about our DH commit.
- c.authState = authStateAwaitingRevealSig
- if err = c.processDHCommit(msg); err != nil {
- return
- }
- c.reset()
- toSend = c.encode(c.generateDHKey())
- return
- }
- case authStateAwaitingRevealSig:
- if err = c.processDHCommit(msg); err != nil {
- return
- }
- toSend = c.encode(c.serializeDHKey())
- case authStateAwaitingSig:
- if err = c.processDHCommit(msg); err != nil {
- return
- }
- c.reset()
- toSend = c.encode(c.generateDHKey())
- c.authState = authStateAwaitingRevealSig
- default:
- panic("bad state")
- }
- case msgTypeDHKey:
- switch c.authState {
- case authStateAwaitingDHKey:
- var isSame bool
- if isSame, err = c.processDHKey(msg); err != nil {
- return
- }
- if isSame {
- err = errors.New("otr: unexpected duplicate DH key")
- return
- }
- toSend = c.encode(c.generateRevealSig())
- c.authState = authStateAwaitingSig
- case authStateAwaitingSig:
- var isSame bool
- if isSame, err = c.processDHKey(msg); err != nil {
- return
- }
- if isSame {
- toSend = c.encode(c.serializeDHKey())
- }
- }
- case msgTypeRevealSig:
- if c.authState != authStateAwaitingRevealSig {
- return
- }
- if err = c.processRevealSig(msg); err != nil {
- return
- }
- toSend = c.encode(c.generateSig())
- c.authState = authStateNone
- c.state = stateEncrypted
- change = NewKeys
- case msgTypeSig:
- if c.authState != authStateAwaitingSig {
- return
- }
- if err = c.processSig(msg); err != nil {
- return
- }
- c.authState = authStateNone
- c.state = stateEncrypted
- change = NewKeys
- case msgTypeData:
- if c.state != stateEncrypted {
- err = errors.New("otr: encrypted message received without encrypted session established")
- return
- }
- var tlvs []tlv
- out, tlvs, err = c.processData(msg)
- encrypted = true
-
- EachTLV:
- for _, inTLV := range tlvs {
- switch inTLV.typ {
- case tlvTypeDisconnected:
- change = ConversationEnded
- c.state = stateFinished
- break EachTLV
- case tlvTypeSMP1, tlvTypeSMP2, tlvTypeSMP3, tlvTypeSMP4, tlvTypeSMPAbort, tlvTypeSMP1WithQuestion:
- var reply tlv
- var complete bool
- reply, complete, err = c.processSMP(inTLV)
- if err == smpSecretMissingError {
- err = nil
- change = SMPSecretNeeded
- c.smp.saved = &inTLV
- return
- }
- if err == smpFailureError {
- err = nil
- change = SMPFailed
- } else if complete {
- change = SMPComplete
- }
- if reply.typ != 0 {
- toSend = c.encode(c.generateData(nil, &reply))
- }
- break EachTLV
- default:
- // skip unknown TLVs
- }
- }
- default:
- err = errors.New("otr: unknown message type " + strconv.Itoa(msgType))
- }
-
- return
-}
-
-// Send takes a human readable message from the local user, possibly encrypts
-// it and returns zero one or more messages to send to the peer.
-func (c *Conversation) Send(msg []byte) ([][]byte, error) {
- switch c.state {
- case statePlaintext:
- return [][]byte{msg}, nil
- case stateEncrypted:
- return c.encode(c.generateData(msg, nil)), nil
- case stateFinished:
- return nil, errors.New("otr: cannot send message because secure conversation has finished")
- }
-
- return nil, errors.New("otr: cannot send message in current state")
-}
-
-// SMPQuestion returns the human readable challenge question from the peer.
-// It's only valid after Receive has returned SMPSecretNeeded.
-func (c *Conversation) SMPQuestion() string {
- return c.smp.question
-}
-
-// Authenticate begins an authentication with the peer. Authentication involves
-// an optional challenge message and a shared secret. The authentication
-// proceeds until either Receive returns SMPComplete, SMPSecretNeeded (which
-// indicates that a new authentication is happening and thus this one was
-// aborted) or SMPFailed.
-func (c *Conversation) Authenticate(question string, mutualSecret []byte) (toSend [][]byte, err error) {
- if c.state != stateEncrypted {
- err = errors.New("otr: can't authenticate a peer without a secure conversation established")
- return
- }
-
- if c.smp.saved != nil {
- c.calcSMPSecret(mutualSecret, false /* they started it */)
-
- var out tlv
- var complete bool
- out, complete, err = c.processSMP(*c.smp.saved)
- if complete {
- panic("SMP completed on the first message")
- }
- c.smp.saved = nil
- if out.typ != 0 {
- toSend = c.encode(c.generateData(nil, &out))
- }
- return
- }
-
- c.calcSMPSecret(mutualSecret, true /* we started it */)
- outs := c.startSMP(question)
- for _, out := range outs {
- toSend = append(toSend, c.encode(c.generateData(nil, &out))...)
- }
- return
-}
-
-// End ends a secure conversation by generating a termination message for
-// the peer and switches to unencrypted communication.
-func (c *Conversation) End() (toSend [][]byte) {
- switch c.state {
- case statePlaintext:
- return nil
- case stateEncrypted:
- c.state = statePlaintext
- return c.encode(c.generateData(nil, &tlv{typ: tlvTypeDisconnected}))
- case stateFinished:
- c.state = statePlaintext
- return nil
- }
- panic("unreachable")
-}
-
-// IsEncrypted returns true if a message passed to Send would be encrypted
-// before transmission. This result remains valid until the next call to
-// Receive or End, which may change the state of the Conversation.
-func (c *Conversation) IsEncrypted() bool {
- return c.state == stateEncrypted
-}
-
-var fragmentError = errors.New("otr: invalid OTR fragment")
-
-// processFragment processes a fragmented OTR message and possibly returns a
-// complete message. Fragmented messages look like "?OTR,k,n,msg," where k is
-// the fragment number (starting from 1), n is the number of fragments in this
-// message and msg is a substring of the base64 encoded message.
-func (c *Conversation) processFragment(in []byte) (out []byte, err error) {
- in = in[len(fragmentPrefix):] // remove "?OTR,"
- parts := bytes.Split(in, fragmentPartSeparator)
- if len(parts) != 4 || len(parts[3]) != 0 {
- return nil, fragmentError
- }
-
- k, err := strconv.Atoi(string(parts[0]))
- if err != nil {
- return nil, fragmentError
- }
-
- n, err := strconv.Atoi(string(parts[1]))
- if err != nil {
- return nil, fragmentError
- }
-
- if k < 1 || n < 1 || k > n {
- return nil, fragmentError
- }
-
- if k == 1 {
- c.frag = append(c.frag[:0], parts[2]...)
- c.k, c.n = k, n
- } else if n == c.n && k == c.k+1 {
- c.frag = append(c.frag, parts[2]...)
- c.k++
- } else {
- c.frag = c.frag[:0]
- c.n, c.k = 0, 0
- }
-
- if c.n > 0 && c.k == c.n {
- c.n, c.k = 0, 0
- return c.frag, nil
- }
-
- return nil, nil
-}
-
-func (c *Conversation) generateDHCommit() []byte {
- _, err := io.ReadFull(c.rand(), c.r[:])
- if err != nil {
- panic("otr: short read from random source")
- }
-
- var xBytes [dhPrivateBytes]byte
- c.x = c.randMPI(xBytes[:])
- c.gx = new(big.Int).Exp(g, c.x, p)
- c.gy = nil
- c.gxBytes = appendMPI(nil, c.gx)
-
- h := sha256.New()
- h.Write(c.gxBytes)
- h.Sum(c.digest[:0])
-
- aesCipher, err := aes.NewCipher(c.r[:])
- if err != nil {
- panic(err.Error())
- }
-
- var iv [aes.BlockSize]byte
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(c.gxBytes, c.gxBytes)
-
- return c.serializeDHCommit()
-}
-
-func (c *Conversation) serializeDHCommit() []byte {
- var ret []byte
- ret = appendU16(ret, 2) // protocol version
- ret = append(ret, msgTypeDHCommit)
- ret = appendData(ret, c.gxBytes)
- ret = appendData(ret, c.digest[:])
- return ret
-}
-
-func (c *Conversation) processDHCommit(in []byte) error {
- var ok1, ok2 bool
- c.gxBytes, in, ok1 = getData(in)
- digest, in, ok2 := getData(in)
- if !ok1 || !ok2 || len(in) > 0 {
- return errors.New("otr: corrupt DH commit message")
- }
- copy(c.digest[:], digest)
- return nil
-}
-
-func (c *Conversation) compareToDHCommit(in []byte) (int, error) {
- _, in, ok1 := getData(in)
- digest, in, ok2 := getData(in)
- if !ok1 || !ok2 || len(in) > 0 {
- return 0, errors.New("otr: corrupt DH commit message")
- }
- return bytes.Compare(c.digest[:], digest), nil
-}
-
-func (c *Conversation) generateDHKey() []byte {
- var yBytes [dhPrivateBytes]byte
- c.y = c.randMPI(yBytes[:])
- c.gy = new(big.Int).Exp(g, c.y, p)
- return c.serializeDHKey()
-}
-
-func (c *Conversation) serializeDHKey() []byte {
- var ret []byte
- ret = appendU16(ret, 2) // protocol version
- ret = append(ret, msgTypeDHKey)
- ret = appendMPI(ret, c.gy)
- return ret
-}
-
-func (c *Conversation) processDHKey(in []byte) (isSame bool, err error) {
- gy, in, ok := getMPI(in)
- if !ok {
- err = errors.New("otr: corrupt DH key message")
- return
- }
- if gy.Cmp(g) < 0 || gy.Cmp(pMinus2) > 0 {
- err = errors.New("otr: DH value out of range")
- return
- }
- if c.gy != nil {
- isSame = c.gy.Cmp(gy) == 0
- return
- }
- c.gy = gy
- return
-}
-
-func (c *Conversation) generateEncryptedSignature(keys *akeKeys, xFirst bool) ([]byte, []byte) {
- var xb []byte
- xb = c.PrivateKey.PublicKey.Serialize(xb)
-
- var verifyData []byte
- if xFirst {
- verifyData = appendMPI(verifyData, c.gx)
- verifyData = appendMPI(verifyData, c.gy)
- } else {
- verifyData = appendMPI(verifyData, c.gy)
- verifyData = appendMPI(verifyData, c.gx)
- }
- verifyData = append(verifyData, xb...)
- verifyData = appendU32(verifyData, c.myKeyId)
-
- mac := hmac.New(sha256.New, keys.m1[:])
- mac.Write(verifyData)
- mb := mac.Sum(nil)
-
- xb = appendU32(xb, c.myKeyId)
- xb = append(xb, c.PrivateKey.Sign(c.rand(), mb)...)
-
- aesCipher, err := aes.NewCipher(keys.c[:])
- if err != nil {
- panic(err.Error())
- }
- var iv [aes.BlockSize]byte
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(xb, xb)
-
- mac = hmac.New(sha256.New, keys.m2[:])
- encryptedSig := appendData(nil, xb)
- mac.Write(encryptedSig)
-
- return encryptedSig, mac.Sum(nil)
-}
-
-func (c *Conversation) generateRevealSig() []byte {
- s := new(big.Int).Exp(c.gy, c.x, p)
- c.calcAKEKeys(s)
- c.myKeyId++
-
- encryptedSig, mac := c.generateEncryptedSignature(&c.revealKeys, true /* gx comes first */)
-
- c.myCurrentDHPub = c.gx
- c.myCurrentDHPriv = c.x
- c.rotateDHKeys()
- incCounter(&c.myCounter)
-
- var ret []byte
- ret = appendU16(ret, 2)
- ret = append(ret, msgTypeRevealSig)
- ret = appendData(ret, c.r[:])
- ret = append(ret, encryptedSig...)
- ret = append(ret, mac[:20]...)
- return ret
-}
-
-func (c *Conversation) processEncryptedSig(encryptedSig, theirMAC []byte, keys *akeKeys, xFirst bool) error {
- mac := hmac.New(sha256.New, keys.m2[:])
- mac.Write(appendData(nil, encryptedSig))
- myMAC := mac.Sum(nil)[:20]
-
- if len(myMAC) != len(theirMAC) || subtle.ConstantTimeCompare(myMAC, theirMAC) == 0 {
- return errors.New("bad signature MAC in encrypted signature")
- }
-
- aesCipher, err := aes.NewCipher(keys.c[:])
- if err != nil {
- panic(err.Error())
- }
- var iv [aes.BlockSize]byte
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(encryptedSig, encryptedSig)
-
- sig := encryptedSig
- sig, ok1 := c.TheirPublicKey.Parse(sig)
- keyId, sig, ok2 := getU32(sig)
- if !ok1 || !ok2 {
- return errors.New("otr: corrupt encrypted signature")
- }
-
- var verifyData []byte
- if xFirst {
- verifyData = appendMPI(verifyData, c.gx)
- verifyData = appendMPI(verifyData, c.gy)
- } else {
- verifyData = appendMPI(verifyData, c.gy)
- verifyData = appendMPI(verifyData, c.gx)
- }
- verifyData = c.TheirPublicKey.Serialize(verifyData)
- verifyData = appendU32(verifyData, keyId)
-
- mac = hmac.New(sha256.New, keys.m1[:])
- mac.Write(verifyData)
- mb := mac.Sum(nil)
-
- sig, ok1 = c.TheirPublicKey.Verify(mb, sig)
- if !ok1 {
- return errors.New("bad signature in encrypted signature")
- }
- if len(sig) > 0 {
- return errors.New("corrupt encrypted signature")
- }
-
- c.theirKeyId = keyId
- zero(c.theirLastCtr[:])
- return nil
-}
-
-func (c *Conversation) processRevealSig(in []byte) error {
- r, in, ok1 := getData(in)
- encryptedSig, in, ok2 := getData(in)
- theirMAC := in
- if !ok1 || !ok2 || len(theirMAC) != 20 {
- return errors.New("otr: corrupt reveal signature message")
- }
-
- aesCipher, err := aes.NewCipher(r)
- if err != nil {
- return errors.New("otr: cannot create AES cipher from reveal signature message: " + err.Error())
- }
- var iv [aes.BlockSize]byte
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(c.gxBytes, c.gxBytes)
- h := sha256.New()
- h.Write(c.gxBytes)
- digest := h.Sum(nil)
- if len(digest) != len(c.digest) || subtle.ConstantTimeCompare(digest, c.digest[:]) == 0 {
- return errors.New("otr: bad commit MAC in reveal signature message")
- }
- var rest []byte
- c.gx, rest, ok1 = getMPI(c.gxBytes)
- if !ok1 || len(rest) > 0 {
- return errors.New("otr: gx corrupt after decryption")
- }
- if c.gx.Cmp(g) < 0 || c.gx.Cmp(pMinus2) > 0 {
- return errors.New("otr: DH value out of range")
- }
- s := new(big.Int).Exp(c.gx, c.y, p)
- c.calcAKEKeys(s)
-
- if err := c.processEncryptedSig(encryptedSig, theirMAC, &c.revealKeys, true /* gx comes first */); err != nil {
- return errors.New("otr: in reveal signature message: " + err.Error())
- }
-
- c.theirCurrentDHPub = c.gx
- c.theirLastDHPub = nil
-
- return nil
-}
-
-func (c *Conversation) generateSig() []byte {
- c.myKeyId++
-
- encryptedSig, mac := c.generateEncryptedSignature(&c.sigKeys, false /* gy comes first */)
-
- c.myCurrentDHPub = c.gy
- c.myCurrentDHPriv = c.y
- c.rotateDHKeys()
- incCounter(&c.myCounter)
-
- var ret []byte
- ret = appendU16(ret, 2)
- ret = append(ret, msgTypeSig)
- ret = append(ret, encryptedSig...)
- ret = append(ret, mac[:macPrefixBytes]...)
- return ret
-}
-
-func (c *Conversation) processSig(in []byte) error {
- encryptedSig, in, ok1 := getData(in)
- theirMAC := in
- if !ok1 || len(theirMAC) != macPrefixBytes {
- return errors.New("otr: corrupt signature message")
- }
-
- if err := c.processEncryptedSig(encryptedSig, theirMAC, &c.sigKeys, false /* gy comes first */); err != nil {
- return errors.New("otr: in signature message: " + err.Error())
- }
-
- c.theirCurrentDHPub = c.gy
- c.theirLastDHPub = nil
-
- return nil
-}
-
-func (c *Conversation) rotateDHKeys() {
- // evict slots using our retired key id
- for i := range c.keySlots {
- slot := &c.keySlots[i]
- if slot.used && slot.myKeyId == c.myKeyId-1 {
- slot.used = false
- c.oldMACs = append(c.oldMACs, slot.recvMACKey...)
- }
- }
-
- c.myLastDHPriv = c.myCurrentDHPriv
- c.myLastDHPub = c.myCurrentDHPub
-
- var xBytes [dhPrivateBytes]byte
- c.myCurrentDHPriv = c.randMPI(xBytes[:])
- c.myCurrentDHPub = new(big.Int).Exp(g, c.myCurrentDHPriv, p)
- c.myKeyId++
-}
-
-func (c *Conversation) processData(in []byte) (out []byte, tlvs []tlv, err error) {
- origIn := in
- flags, in, ok1 := getU8(in)
- theirKeyId, in, ok2 := getU32(in)
- myKeyId, in, ok3 := getU32(in)
- y, in, ok4 := getMPI(in)
- counter, in, ok5 := getNBytes(in, 8)
- encrypted, in, ok6 := getData(in)
- macedData := origIn[:len(origIn)-len(in)]
- theirMAC, in, ok7 := getNBytes(in, macPrefixBytes)
- _, in, ok8 := getData(in)
- if !ok1 || !ok2 || !ok3 || !ok4 || !ok5 || !ok6 || !ok7 || !ok8 || len(in) > 0 {
- err = errors.New("otr: corrupt data message")
- return
- }
-
- ignoreErrors := flags&1 != 0
-
- slot, err := c.calcDataKeys(myKeyId, theirKeyId)
- if err != nil {
- if ignoreErrors {
- err = nil
- }
- return
- }
-
- mac := hmac.New(sha1.New, slot.recvMACKey)
- mac.Write([]byte{0, 2, 3})
- mac.Write(macedData)
- myMAC := mac.Sum(nil)
- if len(myMAC) != len(theirMAC) || subtle.ConstantTimeCompare(myMAC, theirMAC) == 0 {
- if !ignoreErrors {
- err = errors.New("otr: bad MAC on data message")
- }
- return
- }
-
- if bytes.Compare(counter, slot.theirLastCtr[:]) <= 0 {
- err = errors.New("otr: counter regressed")
- return
- }
- copy(slot.theirLastCtr[:], counter)
-
- var iv [aes.BlockSize]byte
- copy(iv[:], counter)
- aesCipher, err := aes.NewCipher(slot.recvAESKey)
- if err != nil {
- panic(err.Error())
- }
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(encrypted, encrypted)
- decrypted := encrypted
-
- if myKeyId == c.myKeyId {
- c.rotateDHKeys()
- }
- if theirKeyId == c.theirKeyId {
- // evict slots using their retired key id
- for i := range c.keySlots {
- slot := &c.keySlots[i]
- if slot.used && slot.theirKeyId == theirKeyId-1 {
- slot.used = false
- c.oldMACs = append(c.oldMACs, slot.recvMACKey...)
- }
- }
-
- c.theirLastDHPub = c.theirCurrentDHPub
- c.theirKeyId++
- c.theirCurrentDHPub = y
- }
-
- if nulPos := bytes.IndexByte(decrypted, 0); nulPos >= 0 {
- out = decrypted[:nulPos]
- tlvData := decrypted[nulPos+1:]
- for len(tlvData) > 0 {
- var t tlv
- var ok1, ok2, ok3 bool
-
- t.typ, tlvData, ok1 = getU16(tlvData)
- t.length, tlvData, ok2 = getU16(tlvData)
- t.data, tlvData, ok3 = getNBytes(tlvData, int(t.length))
- if !ok1 || !ok2 || !ok3 {
- err = errors.New("otr: corrupt tlv data")
- return
- }
- tlvs = append(tlvs, t)
- }
- } else {
- out = decrypted
- }
-
- return
-}
-
-func (c *Conversation) generateData(msg []byte, extra *tlv) []byte {
- slot, err := c.calcDataKeys(c.myKeyId-1, c.theirKeyId)
- if err != nil {
- panic("otr: failed to generate sending keys: " + err.Error())
- }
-
- var plaintext []byte
- plaintext = append(plaintext, msg...)
- plaintext = append(plaintext, 0)
-
- padding := paddingGranularity - ((len(plaintext) + 4) % paddingGranularity)
- plaintext = appendU16(plaintext, tlvTypePadding)
- plaintext = appendU16(plaintext, uint16(padding))
- for i := 0; i < padding; i++ {
- plaintext = append(plaintext, 0)
- }
-
- if extra != nil {
- plaintext = appendU16(plaintext, extra.typ)
- plaintext = appendU16(plaintext, uint16(len(extra.data)))
- plaintext = append(plaintext, extra.data...)
- }
-
- encrypted := make([]byte, len(plaintext))
-
- var iv [aes.BlockSize]byte
- copy(iv[:], c.myCounter[:])
- aesCipher, err := aes.NewCipher(slot.sendAESKey)
- if err != nil {
- panic(err.Error())
- }
- ctr := cipher.NewCTR(aesCipher, iv[:])
- ctr.XORKeyStream(encrypted, plaintext)
-
- var ret []byte
- ret = appendU16(ret, 2)
- ret = append(ret, msgTypeData)
- ret = append(ret, 0 /* flags */)
- ret = appendU32(ret, c.myKeyId-1)
- ret = appendU32(ret, c.theirKeyId)
- ret = appendMPI(ret, c.myCurrentDHPub)
- ret = append(ret, c.myCounter[:]...)
- ret = appendData(ret, encrypted)
-
- mac := hmac.New(sha1.New, slot.sendMACKey)
- mac.Write(ret)
- ret = append(ret, mac.Sum(nil)[:macPrefixBytes]...)
- ret = appendData(ret, c.oldMACs)
- c.oldMACs = nil
- incCounter(&c.myCounter)
-
- return ret
-}
-
-func incCounter(counter *[8]byte) {
- for i := 7; i >= 0; i-- {
- counter[i]++
- if counter[i] > 0 {
- break
- }
- }
-}
-
-// calcDataKeys computes the keys used to encrypt a data message given the key
-// IDs.
-func (c *Conversation) calcDataKeys(myKeyId, theirKeyId uint32) (slot *keySlot, err error) {
- // Check for a cache hit.
- for i := range c.keySlots {
- slot = &c.keySlots[i]
- if slot.used && slot.theirKeyId == theirKeyId && slot.myKeyId == myKeyId {
- return
- }
- }
-
- // Find an empty slot to write into.
- slot = nil
- for i := range c.keySlots {
- if !c.keySlots[i].used {
- slot = &c.keySlots[i]
- break
- }
- }
- if slot == nil {
- return nil, errors.New("otr: internal error: no more key slots")
- }
-
- var myPriv, myPub, theirPub *big.Int
-
- if myKeyId == c.myKeyId {
- myPriv = c.myCurrentDHPriv
- myPub = c.myCurrentDHPub
- } else if myKeyId == c.myKeyId-1 {
- myPriv = c.myLastDHPriv
- myPub = c.myLastDHPub
- } else {
- err = errors.New("otr: peer requested keyid " + strconv.FormatUint(uint64(myKeyId), 10) + " when I'm on " + strconv.FormatUint(uint64(c.myKeyId), 10))
- return
- }
-
- if theirKeyId == c.theirKeyId {
- theirPub = c.theirCurrentDHPub
- } else if theirKeyId == c.theirKeyId-1 && c.theirLastDHPub != nil {
- theirPub = c.theirLastDHPub
- } else {
- err = errors.New("otr: peer requested keyid " + strconv.FormatUint(uint64(myKeyId), 10) + " when they're on " + strconv.FormatUint(uint64(c.myKeyId), 10))
- return
- }
-
- var sendPrefixByte, recvPrefixByte [1]byte
-
- if myPub.Cmp(theirPub) > 0 {
- // we're the high end
- sendPrefixByte[0], recvPrefixByte[0] = 1, 2
- } else {
- // we're the low end
- sendPrefixByte[0], recvPrefixByte[0] = 2, 1
- }
-
- s := new(big.Int).Exp(theirPub, myPriv, p)
- sBytes := appendMPI(nil, s)
-
- h := sha1.New()
- h.Write(sendPrefixByte[:])
- h.Write(sBytes)
- slot.sendAESKey = h.Sum(slot.sendAESKey[:0])[:16]
-
- h.Reset()
- h.Write(slot.sendAESKey)
- slot.sendMACKey = h.Sum(slot.sendMACKey[:0])
-
- h.Reset()
- h.Write(recvPrefixByte[:])
- h.Write(sBytes)
- slot.recvAESKey = h.Sum(slot.recvAESKey[:0])[:16]
-
- h.Reset()
- h.Write(slot.recvAESKey)
- slot.recvMACKey = h.Sum(slot.recvMACKey[:0])
-
- slot.theirKeyId = theirKeyId
- slot.myKeyId = myKeyId
- slot.used = true
-
- zero(slot.theirLastCtr[:])
- return
-}
-
-func (c *Conversation) calcAKEKeys(s *big.Int) {
- mpi := appendMPI(nil, s)
- h := sha256.New()
-
- var cBytes [32]byte
- hashWithPrefix(c.SSID[:], 0, mpi, h)
-
- hashWithPrefix(cBytes[:], 1, mpi, h)
- copy(c.revealKeys.c[:], cBytes[:16])
- copy(c.sigKeys.c[:], cBytes[16:])
-
- hashWithPrefix(c.revealKeys.m1[:], 2, mpi, h)
- hashWithPrefix(c.revealKeys.m2[:], 3, mpi, h)
- hashWithPrefix(c.sigKeys.m1[:], 4, mpi, h)
- hashWithPrefix(c.sigKeys.m2[:], 5, mpi, h)
-}
-
-func hashWithPrefix(out []byte, prefix byte, in []byte, h hash.Hash) {
- h.Reset()
- var p [1]byte
- p[0] = prefix
- h.Write(p[:])
- h.Write(in)
- if len(out) == h.Size() {
- h.Sum(out[:0])
- } else {
- digest := h.Sum(nil)
- copy(out, digest)
- }
-}
-
-func (c *Conversation) encode(msg []byte) [][]byte {
- b64 := make([]byte, base64.StdEncoding.EncodedLen(len(msg))+len(msgPrefix)+1)
- base64.StdEncoding.Encode(b64[len(msgPrefix):], msg)
- copy(b64, msgPrefix)
- b64[len(b64)-1] = '.'
-
- if c.FragmentSize < minFragmentSize || len(b64) <= c.FragmentSize {
- // We can encode this in a single fragment.
- return [][]byte{b64}
- }
-
- // We have to fragment this message.
- var ret [][]byte
- bytesPerFragment := c.FragmentSize - minFragmentSize
- numFragments := (len(b64) + bytesPerFragment) / bytesPerFragment
-
- for i := 0; i < numFragments; i++ {
- frag := []byte("?OTR," + strconv.Itoa(i+1) + "," + strconv.Itoa(numFragments) + ",")
- todo := bytesPerFragment
- if todo > len(b64) {
- todo = len(b64)
- }
- frag = append(frag, b64[:todo]...)
- b64 = b64[todo:]
- frag = append(frag, ',')
- ret = append(ret, frag)
- }
-
- return ret
-}
-
-func (c *Conversation) reset() {
- c.myKeyId = 0
-
- for i := range c.keySlots {
- c.keySlots[i].used = false
- }
-}
-
-type PublicKey struct {
- dsa.PublicKey
-}
-
-func (pk *PublicKey) Parse(in []byte) ([]byte, bool) {
- var ok bool
- var pubKeyType uint16
-
- if pubKeyType, in, ok = getU16(in); !ok || pubKeyType != 0 {
- return nil, false
- }
- if pk.P, in, ok = getMPI(in); !ok {
- return nil, false
- }
- if pk.Q, in, ok = getMPI(in); !ok {
- return nil, false
- }
- if pk.G, in, ok = getMPI(in); !ok {
- return nil, false
- }
- if pk.Y, in, ok = getMPI(in); !ok {
- return nil, false
- }
-
- return in, true
-}
-
-func (pk *PublicKey) Serialize(in []byte) []byte {
- in = appendU16(in, 0)
- in = appendMPI(in, pk.P)
- in = appendMPI(in, pk.Q)
- in = appendMPI(in, pk.G)
- in = appendMPI(in, pk.Y)
- return in
-}
-
-// Fingerprint returns the 20-byte, binary fingerprint of the PublicKey.
-func (pk *PublicKey) Fingerprint() []byte {
- b := pk.Serialize(nil)
- h := sha1.New()
- h.Write(b[2:])
- return h.Sum(nil)
-}
-
-func (pk *PublicKey) Verify(hashed, sig []byte) ([]byte, bool) {
- if len(sig) != 2*dsaSubgroupBytes {
- return nil, false
- }
- r := new(big.Int).SetBytes(sig[:dsaSubgroupBytes])
- s := new(big.Int).SetBytes(sig[dsaSubgroupBytes:])
- ok := dsa.Verify(&pk.PublicKey, hashed, r, s)
- return sig[dsaSubgroupBytes*2:], ok
-}
-
-type PrivateKey struct {
- PublicKey
- dsa.PrivateKey
-}
-
-func (priv *PrivateKey) Sign(rand io.Reader, hashed []byte) []byte {
- r, s, err := dsa.Sign(rand, &priv.PrivateKey, hashed)
- if err != nil {
- panic(err.Error())
- }
- rBytes := r.Bytes()
- sBytes := s.Bytes()
- if len(rBytes) > dsaSubgroupBytes || len(sBytes) > dsaSubgroupBytes {
- panic("DSA signature too large")
- }
-
- out := make([]byte, 2*dsaSubgroupBytes)
- copy(out[dsaSubgroupBytes-len(rBytes):], rBytes)
- copy(out[len(out)-len(sBytes):], sBytes)
- return out
-}
-
-func (priv *PrivateKey) Serialize(in []byte) []byte {
- in = priv.PublicKey.Serialize(in)
- in = appendMPI(in, priv.PrivateKey.X)
- return in
-}
-
-func (priv *PrivateKey) Parse(in []byte) ([]byte, bool) {
- in, ok := priv.PublicKey.Parse(in)
- if !ok {
- return in, ok
- }
- priv.PrivateKey.PublicKey = priv.PublicKey.PublicKey
- priv.PrivateKey.X, in, ok = getMPI(in)
- return in, ok
-}
-
-func (priv *PrivateKey) Generate(rand io.Reader) {
- if err := dsa.GenerateParameters(&priv.PrivateKey.PublicKey.Parameters, rand, dsa.L1024N160); err != nil {
- panic(err.Error())
- }
- if err := dsa.GenerateKey(&priv.PrivateKey, rand); err != nil {
- panic(err.Error())
- }
- priv.PublicKey.PublicKey = priv.PrivateKey.PublicKey
-}
-
-func notHex(r rune) bool {
- if r >= '0' && r <= '9' ||
- r >= 'a' && r <= 'f' ||
- r >= 'A' && r <= 'F' {
- return false
- }
-
- return true
-}
-
-// Import parses the contents of a libotr private key file.
-func (priv *PrivateKey) Import(in []byte) bool {
- mpiStart := []byte(" #")
-
- mpis := make([]*big.Int, 5)
-
- for i := 0; i < len(mpis); i++ {
- start := bytes.Index(in, mpiStart)
- if start == -1 {
- return false
- }
- in = in[start+len(mpiStart):]
- end := bytes.IndexFunc(in, notHex)
- if end == -1 {
- return false
- }
- hexBytes := in[:end]
- in = in[end:]
-
- if len(hexBytes)&1 != 0 {
- return false
- }
-
- mpiBytes := make([]byte, len(hexBytes)/2)
- if _, err := hex.Decode(mpiBytes, hexBytes); err != nil {
- return false
- }
-
- mpis[i] = new(big.Int).SetBytes(mpiBytes)
- }
-
- for _, mpi := range mpis {
- if mpi.Sign() <= 0 {
- return false
- }
- }
-
- priv.PrivateKey.P = mpis[0]
- priv.PrivateKey.Q = mpis[1]
- priv.PrivateKey.G = mpis[2]
- priv.PrivateKey.Y = mpis[3]
- priv.PrivateKey.X = mpis[4]
- priv.PublicKey.PublicKey = priv.PrivateKey.PublicKey
-
- a := new(big.Int).Exp(priv.PrivateKey.G, priv.PrivateKey.X, priv.PrivateKey.P)
- return a.Cmp(priv.PrivateKey.Y) == 0
-}
-
-func getU8(in []byte) (uint8, []byte, bool) {
- if len(in) < 1 {
- return 0, in, false
- }
- return in[0], in[1:], true
-}
-
-func getU16(in []byte) (uint16, []byte, bool) {
- if len(in) < 2 {
- return 0, in, false
- }
- r := uint16(in[0])<<8 | uint16(in[1])
- return r, in[2:], true
-}
-
-func getU32(in []byte) (uint32, []byte, bool) {
- if len(in) < 4 {
- return 0, in, false
- }
- r := uint32(in[0])<<24 | uint32(in[1])<<16 | uint32(in[2])<<8 | uint32(in[3])
- return r, in[4:], true
-}
-
-func getMPI(in []byte) (*big.Int, []byte, bool) {
- l, in, ok := getU32(in)
- if !ok || uint32(len(in)) < l {
- return nil, in, false
- }
- r := new(big.Int).SetBytes(in[:l])
- return r, in[l:], true
-}
-
-func getData(in []byte) ([]byte, []byte, bool) {
- l, in, ok := getU32(in)
- if !ok || uint32(len(in)) < l {
- return nil, in, false
- }
- return in[:l], in[l:], true
-}
-
-func getNBytes(in []byte, n int) ([]byte, []byte, bool) {
- if len(in) < n {
- return nil, in, false
- }
- return in[:n], in[n:], true
-}
-
-func appendU16(out []byte, v uint16) []byte {
- out = append(out, byte(v>>8), byte(v))
- return out
-}
-
-func appendU32(out []byte, v uint32) []byte {
- out = append(out, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
- return out
-}
-
-func appendData(out, v []byte) []byte {
- out = appendU32(out, uint32(len(v)))
- out = append(out, v...)
- return out
-}
-
-func appendMPI(out []byte, v *big.Int) []byte {
- vBytes := v.Bytes()
- out = appendU32(out, uint32(len(vBytes)))
- out = append(out, vBytes...)
- return out
-}
-
-func appendMPIs(out []byte, mpis ...*big.Int) []byte {
- for _, mpi := range mpis {
- out = appendMPI(out, mpi)
- }
- return out
-}
-
-func zero(b []byte) {
- for i := range b {
- b[i] = 0
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr_test.go
deleted file mode 100644
index cfcd062b2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/otr_test.go
+++ /dev/null
@@ -1,470 +0,0 @@
-// Copyright 2012 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 file.
-
-package otr
-
-import (
- "bufio"
- "bytes"
- "crypto/rand"
- "encoding/hex"
- "math/big"
- "os"
- "os/exec"
- "testing"
-)
-
-var isQueryTests = []struct {
- msg string
- expectedVersion int
-}{
- {"foo", 0},
- {"?OtR", 0},
- {"?OtR?", 0},
- {"?OTR?", 0},
- {"?OTRv?", 0},
- {"?OTRv1?", 0},
- {"?OTR?v1?", 0},
- {"?OTR?v?", 0},
- {"?OTR?v2?", 2},
- {"?OTRv2?", 2},
- {"?OTRv23?", 2},
- {"?OTRv23 ?", 0},
-}
-
-func TestIsQuery(t *testing.T) {
- for i, test := range isQueryTests {
- version := isQuery([]byte(test.msg))
- if version != test.expectedVersion {
- t.Errorf("#%d: got %d, want %d", i, version, test.expectedVersion)
- }
- }
-}
-
-var alicePrivateKeyHex = "000000000080c81c2cb2eb729b7e6fd48e975a932c638b3a9055478583afa46755683e30102447f6da2d8bec9f386bbb5da6403b0040fee8650b6ab2d7f32c55ab017ae9b6aec8c324ab5844784e9a80e194830d548fb7f09a0410df2c4d5c8bc2b3e9ad484e65412be689cf0834694e0839fb2954021521ffdffb8f5c32c14dbf2020b3ce7500000014da4591d58def96de61aea7b04a8405fe1609308d000000808ddd5cb0b9d66956e3dea5a915d9aba9d8a6e7053b74dadb2fc52f9fe4e5bcc487d2305485ed95fed026ad93f06ebb8c9e8baf693b7887132c7ffdd3b0f72f4002ff4ed56583ca7c54458f8c068ca3e8a4dfa309d1dd5d34e2a4b68e6f4338835e5e0fb4317c9e4c7e4806dafda3ef459cd563775a586dd91b1319f72621bf3f00000080b8147e74d8c45e6318c37731b8b33b984a795b3653c2cd1d65cc99efe097cb7eb2fa49569bab5aab6e8a1c261a27d0f7840a5e80b317e6683042b59b6dceca2879c6ffc877a465be690c15e4a42f9a7588e79b10faac11b1ce3741fcef7aba8ce05327a2c16d279ee1b3d77eb783fb10e3356caa25635331e26dd42b8396c4d00000001420bec691fea37ecea58a5c717142f0b804452f57"
-
-var aliceFingerprintHex = "0bb01c360424522e94ee9c346ce877a1a4288b2f"
-
-var bobPrivateKeyHex = "000000000080a5138eb3d3eb9c1d85716faecadb718f87d31aaed1157671d7fee7e488f95e8e0ba60ad449ec732710a7dec5190f7182af2e2f98312d98497221dff160fd68033dd4f3a33b7c078d0d9f66e26847e76ca7447d4bab35486045090572863d9e4454777f24d6706f63e02548dfec2d0a620af37bbc1d24f884708a212c343b480d00000014e9c58f0ea21a5e4dfd9f44b6a9f7f6a9961a8fa9000000803c4d111aebd62d3c50c2889d420a32cdf1e98b70affcc1fcf44d59cca2eb019f6b774ef88153fb9b9615441a5fe25ea2d11b74ce922ca0232bd81b3c0fcac2a95b20cb6e6c0c5c1ace2e26f65dc43c751af0edbb10d669890e8ab6beea91410b8b2187af1a8347627a06ecea7e0f772c28aae9461301e83884860c9b656c722f0000008065af8625a555ea0e008cd04743671a3cda21162e83af045725db2eb2bb52712708dc0cc1a84c08b3649b88a966974bde27d8612c2861792ec9f08786a246fcadd6d8d3a81a32287745f309238f47618c2bd7612cb8b02d940571e0f30b96420bcd462ff542901b46109b1e5ad6423744448d20a57818a8cbb1647d0fea3b664e0000001440f9f2eb554cb00d45a5826b54bfa419b6980e48"
-
-func TestKeySerialization(t *testing.T) {
- var priv PrivateKey
- alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex)
- rest, ok := priv.Parse(alicePrivateKey)
- if !ok {
- t.Error("failed to parse private key")
- }
- if len(rest) > 0 {
- t.Error("data remaining after parsing private key")
- }
-
- out := priv.Serialize(nil)
- if !bytes.Equal(alicePrivateKey, out) {
- t.Errorf("serialization (%x) is not equal to original (%x)", out, alicePrivateKey)
- }
-
- aliceFingerprint, _ := hex.DecodeString(aliceFingerprintHex)
- fingerprint := priv.PublicKey.Fingerprint()
- if !bytes.Equal(aliceFingerprint, fingerprint) {
- t.Errorf("fingerprint (%x) is not equal to expected value (%x)", fingerprint, aliceFingerprint)
- }
-}
-
-const libOTRPrivateKey = `(privkeys
- (account
-(name "foo@example.com")
-(protocol prpl-jabber)
-(private-key
- (dsa
- (p #00FC07ABCF0DC916AFF6E9AE47BEF60C7AB9B4D6B2469E436630E36F8A489BE812486A09F30B71224508654940A835301ACC525A4FF133FC152CC53DCC59D65C30A54F1993FE13FE63E5823D4C746DB21B90F9B9C00B49EC7404AB1D929BA7FBA12F2E45C6E0A651689750E8528AB8C031D3561FECEE72EBB4A090D450A9B7A857#)
- (q #00997BD266EF7B1F60A5C23F3A741F2AEFD07A2081#)
- (g #535E360E8A95EBA46A4F7DE50AD6E9B2A6DB785A66B64EB9F20338D2A3E8FB0E94725848F1AA6CC567CB83A1CC517EC806F2E92EAE71457E80B2210A189B91250779434B41FC8A8873F6DB94BEA7D177F5D59E7E114EE10A49CFD9CEF88AE43387023B672927BA74B04EB6BBB5E57597766A2F9CE3857D7ACE3E1E3BC1FC6F26#)
- (y #0AC8670AD767D7A8D9D14CC1AC6744CD7D76F993B77FFD9E39DF01E5A6536EF65E775FCEF2A983E2A19BD6415500F6979715D9FD1257E1FE2B6F5E1E74B333079E7C880D39868462A93454B41877BE62E5EF0A041C2EE9C9E76BD1E12AE25D9628DECB097025DD625EF49C3258A1A3C0FF501E3DC673B76D7BABF349009B6ECF#)
- (x #14D0345A3562C480A039E3C72764F72D79043216#)
- )
- )
- )
-)`
-
-func TestParseLibOTRPrivateKey(t *testing.T) {
- var priv PrivateKey
-
- if !priv.Import([]byte(libOTRPrivateKey)) {
- t.Fatalf("Failed to import sample private key")
- }
-}
-
-func TestSignVerify(t *testing.T) {
- var priv PrivateKey
- alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex)
- _, ok := priv.Parse(alicePrivateKey)
- if !ok {
- t.Error("failed to parse private key")
- }
-
- var msg [32]byte
- rand.Reader.Read(msg[:])
-
- sig := priv.Sign(rand.Reader, msg[:])
- rest, ok := priv.PublicKey.Verify(msg[:], sig)
- if !ok {
- t.Errorf("signature (%x) of %x failed to verify", sig, msg[:])
- } else if len(rest) > 0 {
- t.Error("signature data remains after verification")
- }
-
- sig[10] ^= 80
- _, ok = priv.PublicKey.Verify(msg[:], sig)
- if ok {
- t.Errorf("corrupted signature (%x) of %x verified", sig, msg[:])
- }
-}
-
-func setupConversation(t *testing.T) (alice, bob *Conversation) {
- alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex)
- bobPrivateKey, _ := hex.DecodeString(bobPrivateKeyHex)
-
- alice, bob = new(Conversation), new(Conversation)
-
- alice.PrivateKey = new(PrivateKey)
- bob.PrivateKey = new(PrivateKey)
- alice.PrivateKey.Parse(alicePrivateKey)
- bob.PrivateKey.Parse(bobPrivateKey)
- alice.FragmentSize = 100
- bob.FragmentSize = 100
-
- if alice.IsEncrypted() {
- t.Error("Alice believes that the conversation is secure before we've started")
- }
- if bob.IsEncrypted() {
- t.Error("Bob believes that the conversation is secure before we've started")
- }
-
- performHandshake(t, alice, bob)
- return alice, bob
-}
-
-func performHandshake(t *testing.T, alice, bob *Conversation) {
- var alicesMessage, bobsMessage [][]byte
- var out []byte
- var aliceChange, bobChange SecurityChange
- var err error
- alicesMessage = append(alicesMessage, []byte(QueryMessage))
-
- for round := 0; len(alicesMessage) > 0 || len(bobsMessage) > 0; round++ {
- bobsMessage = nil
- for i, msg := range alicesMessage {
- out, _, bobChange, bobsMessage, err = bob.Receive(msg)
- if len(out) > 0 {
- t.Errorf("Bob generated output during key exchange, round %d, message %d", round, i)
- }
- if err != nil {
- t.Fatalf("Bob returned an error, round %d, message %d (%x): %s", round, i, msg, err)
- }
- if len(bobsMessage) > 0 && i != len(alicesMessage)-1 {
- t.Errorf("Bob produced output while processing a fragment, round %d, message %d", round, i)
- }
- }
-
- alicesMessage = nil
- for i, msg := range bobsMessage {
- out, _, aliceChange, alicesMessage, err = alice.Receive(msg)
- if len(out) > 0 {
- t.Errorf("Alice generated output during key exchange, round %d, message %d", round, i)
- }
- if err != nil {
- t.Fatalf("Alice returned an error, round %d, message %d (%x): %s", round, i, msg, err)
- }
- if len(alicesMessage) > 0 && i != len(bobsMessage)-1 {
- t.Errorf("Alice produced output while processing a fragment, round %d, message %d", round, i)
- }
- }
- }
-
- if aliceChange != NewKeys {
- t.Errorf("Alice terminated without signaling new keys")
- }
- if bobChange != NewKeys {
- t.Errorf("Bob terminated without signaling new keys")
- }
-
- if !bytes.Equal(alice.SSID[:], bob.SSID[:]) {
- t.Errorf("Session identifiers don't match. Alice has %x, Bob has %x", alice.SSID[:], bob.SSID[:])
- }
-
- if !alice.IsEncrypted() {
- t.Error("Alice doesn't believe that the conversation is secure")
- }
- if !bob.IsEncrypted() {
- t.Error("Bob doesn't believe that the conversation is secure")
- }
-}
-
-const (
- firstRoundTrip = iota
- subsequentRoundTrip
- noMACKeyCheck
-)
-
-func roundTrip(t *testing.T, alice, bob *Conversation, message []byte, macKeyCheck int) {
- alicesMessage, err := alice.Send(message)
- if err != nil {
- t.Errorf("Error from Alice sending message: %s", err)
- }
-
- if len(alice.oldMACs) != 0 {
- t.Errorf("Alice has not revealed all MAC keys")
- }
-
- for i, msg := range alicesMessage {
- out, encrypted, _, _, err := bob.Receive(msg)
-
- if err != nil {
- t.Errorf("Error generated while processing test message: %s", err.Error())
- }
- if len(out) > 0 {
- if i != len(alicesMessage)-1 {
- t.Fatal("Bob produced a message while processing a fragment of Alice's")
- }
- if !encrypted {
- t.Errorf("Message was not marked as encrypted")
- }
- if !bytes.Equal(out, message) {
- t.Errorf("Message corrupted: got %x, want %x", out, message)
- }
- }
- }
-
- switch macKeyCheck {
- case firstRoundTrip:
- if len(bob.oldMACs) != 0 {
- t.Errorf("Bob should not have MAC keys to reveal")
- }
- case subsequentRoundTrip:
- if len(bob.oldMACs) != 40 {
- t.Errorf("Bob has %d bytes of MAC keys to reveal, but should have 40", len(bob.oldMACs))
- }
- }
-
- bobsMessage, err := bob.Send(message)
- if err != nil {
- t.Errorf("Error from Bob sending message: %s", err)
- }
-
- if len(bob.oldMACs) != 0 {
- t.Errorf("Bob has not revealed all MAC keys")
- }
-
- for i, msg := range bobsMessage {
- out, encrypted, _, _, err := alice.Receive(msg)
-
- if err != nil {
- t.Errorf("Error generated while processing test message: %s", err.Error())
- }
- if len(out) > 0 {
- if i != len(bobsMessage)-1 {
- t.Fatal("Alice produced a message while processing a fragment of Bob's")
- }
- if !encrypted {
- t.Errorf("Message was not marked as encrypted")
- }
- if !bytes.Equal(out, message) {
- t.Errorf("Message corrupted: got %x, want %x", out, message)
- }
- }
- }
-
- switch macKeyCheck {
- case firstRoundTrip:
- if len(alice.oldMACs) != 20 {
- t.Errorf("Alice has %d bytes of MAC keys to reveal, but should have 20", len(alice.oldMACs))
- }
- case subsequentRoundTrip:
- if len(alice.oldMACs) != 40 {
- t.Errorf("Alice has %d bytes of MAC keys to reveal, but should have 40", len(alice.oldMACs))
- }
- }
-}
-
-func TestConversation(t *testing.T) {
- alice, bob := setupConversation(t)
-
- var testMessages = [][]byte{
- []byte("hello"), []byte("bye"),
- }
-
- roundTripType := firstRoundTrip
-
- for _, testMessage := range testMessages {
- roundTrip(t, alice, bob, testMessage, roundTripType)
- roundTripType = subsequentRoundTrip
- }
-}
-
-func TestGoodSMP(t *testing.T) {
- var alice, bob Conversation
-
- alice.smp.secret = new(big.Int).SetInt64(42)
- bob.smp.secret = alice.smp.secret
-
- var alicesMessages, bobsMessages []tlv
- var aliceComplete, bobComplete bool
- var err error
- var out tlv
-
- alicesMessages = alice.startSMP("")
- for round := 0; len(alicesMessages) > 0 || len(bobsMessages) > 0; round++ {
- bobsMessages = bobsMessages[:0]
- for i, msg := range alicesMessages {
- out, bobComplete, err = bob.processSMP(msg)
- if err != nil {
- t.Errorf("Error from Bob in round %d: %s", round, err)
- }
- if bobComplete && i != len(alicesMessages)-1 {
- t.Errorf("Bob returned a completed signal before processing all of Alice's messages in round %d", round)
- }
- if out.typ != 0 {
- bobsMessages = append(bobsMessages, out)
- }
- }
-
- alicesMessages = alicesMessages[:0]
- for i, msg := range bobsMessages {
- out, aliceComplete, err = alice.processSMP(msg)
- if err != nil {
- t.Errorf("Error from Alice in round %d: %s", round, err)
- }
- if aliceComplete && i != len(bobsMessages)-1 {
- t.Errorf("Alice returned a completed signal before processing all of Bob's messages in round %d", round)
- }
- if out.typ != 0 {
- alicesMessages = append(alicesMessages, out)
- }
- }
- }
-
- if !aliceComplete || !bobComplete {
- t.Errorf("SMP completed without both sides reporting success: alice: %v, bob: %v\n", aliceComplete, bobComplete)
- }
-}
-
-func TestBadSMP(t *testing.T) {
- var alice, bob Conversation
-
- alice.smp.secret = new(big.Int).SetInt64(42)
- bob.smp.secret = new(big.Int).SetInt64(43)
-
- var alicesMessages, bobsMessages []tlv
-
- alicesMessages = alice.startSMP("")
- for round := 0; len(alicesMessages) > 0 || len(bobsMessages) > 0; round++ {
- bobsMessages = bobsMessages[:0]
- for _, msg := range alicesMessages {
- out, complete, _ := bob.processSMP(msg)
- if complete {
- t.Errorf("Bob signaled completion in round %d", round)
- }
- if out.typ != 0 {
- bobsMessages = append(bobsMessages, out)
- }
- }
-
- alicesMessages = alicesMessages[:0]
- for _, msg := range bobsMessages {
- out, complete, _ := alice.processSMP(msg)
- if complete {
- t.Errorf("Alice signaled completion in round %d", round)
- }
- if out.typ != 0 {
- alicesMessages = append(alicesMessages, out)
- }
- }
- }
-}
-
-func TestRehandshaking(t *testing.T) {
- alice, bob := setupConversation(t)
- roundTrip(t, alice, bob, []byte("test"), firstRoundTrip)
- roundTrip(t, alice, bob, []byte("test 2"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 3"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 4"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 5"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 6"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 7"), subsequentRoundTrip)
- roundTrip(t, alice, bob, []byte("test 8"), subsequentRoundTrip)
- performHandshake(t, alice, bob)
- roundTrip(t, alice, bob, []byte("test"), noMACKeyCheck)
- roundTrip(t, alice, bob, []byte("test 2"), noMACKeyCheck)
-}
-
-func TestAgainstLibOTR(t *testing.T) {
- // This test requires otr.c.test to be built as /tmp/a.out.
- // If enabled, this tests runs forever performing OTR handshakes in a
- // loop.
- return
-
- alicePrivateKey, _ := hex.DecodeString(alicePrivateKeyHex)
- var alice Conversation
- alice.PrivateKey = new(PrivateKey)
- alice.PrivateKey.Parse(alicePrivateKey)
-
- cmd := exec.Command("/tmp/a.out")
- cmd.Stderr = os.Stderr
-
- out, err := cmd.StdinPipe()
- if err != nil {
- t.Fatal(err)
- }
- defer out.Close()
- stdout, err := cmd.StdoutPipe()
- if err != nil {
- t.Fatal(err)
- }
- in := bufio.NewReader(stdout)
-
- if err := cmd.Start(); err != nil {
- t.Fatal(err)
- }
-
- out.Write([]byte(QueryMessage))
- out.Write([]byte("\n"))
- var expectedText = []byte("test message")
-
- for {
- line, isPrefix, err := in.ReadLine()
- if isPrefix {
- t.Fatal("line from subprocess too long")
- }
- if err != nil {
- t.Fatal(err)
- }
- text, encrypted, change, alicesMessage, err := alice.Receive(line)
- if err != nil {
- t.Fatal(err)
- }
- for _, msg := range alicesMessage {
- out.Write(msg)
- out.Write([]byte("\n"))
- }
- if change == NewKeys {
- alicesMessage, err := alice.Send([]byte("Go -> libotr test message"))
- if err != nil {
- t.Fatalf("error sending message: %s", err.Error())
- } else {
- for _, msg := range alicesMessage {
- out.Write(msg)
- out.Write([]byte("\n"))
- }
- }
- }
- if len(text) > 0 {
- if !bytes.Equal(text, expectedText) {
- t.Fatalf("expected %x, but got %x", expectedText, text)
- }
- if !encrypted {
- t.Fatal("message wasn't encrypted")
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/smp.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/smp.go
deleted file mode 100644
index dc6de4ee0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/otr/smp.go
+++ /dev/null
@@ -1,572 +0,0 @@
-// Copyright 2012 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 file.
-
-// This file implements the Socialist Millionaires Protocol as described in
-// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html. The protocol
-// specification is required in order to understand this code and, where
-// possible, the variable names in the code match up with the spec.
-
-package otr
-
-import (
- "bytes"
- "crypto/sha256"
- "errors"
- "hash"
- "math/big"
-)
-
-type smpFailure string
-
-func (s smpFailure) Error() string {
- return string(s)
-}
-
-var smpFailureError = smpFailure("otr: SMP protocol failed")
-var smpSecretMissingError = smpFailure("otr: mutual secret needed")
-
-const smpVersion = 1
-
-const (
- smpState1 = iota
- smpState2
- smpState3
- smpState4
-)
-
-type smpState struct {
- state int
- a2, a3, b2, b3, pb, qb *big.Int
- g2a, g3a *big.Int
- g2, g3 *big.Int
- g3b, papb, qaqb, ra *big.Int
- saved *tlv
- secret *big.Int
- question string
-}
-
-func (c *Conversation) startSMP(question string) (tlvs []tlv) {
- if c.smp.state != smpState1 {
- tlvs = append(tlvs, c.generateSMPAbort())
- }
- tlvs = append(tlvs, c.generateSMP1(question))
- c.smp.question = ""
- c.smp.state = smpState2
- return
-}
-
-func (c *Conversation) resetSMP() {
- c.smp.state = smpState1
- c.smp.secret = nil
- c.smp.question = ""
-}
-
-func (c *Conversation) processSMP(in tlv) (out tlv, complete bool, err error) {
- data := in.data
-
- switch in.typ {
- case tlvTypeSMPAbort:
- if c.smp.state != smpState1 {
- err = smpFailureError
- }
- c.resetSMP()
- return
- case tlvTypeSMP1WithQuestion:
- // We preprocess this into a SMP1 message.
- nulPos := bytes.IndexByte(data, 0)
- if nulPos == -1 {
- err = errors.New("otr: SMP message with question didn't contain a NUL byte")
- return
- }
- c.smp.question = string(data[:nulPos])
- data = data[nulPos+1:]
- }
-
- numMPIs, data, ok := getU32(data)
- if !ok || numMPIs > 20 {
- err = errors.New("otr: corrupt SMP message")
- return
- }
-
- mpis := make([]*big.Int, numMPIs)
- for i := range mpis {
- var ok bool
- mpis[i], data, ok = getMPI(data)
- if !ok {
- err = errors.New("otr: corrupt SMP message")
- return
- }
- }
-
- switch in.typ {
- case tlvTypeSMP1, tlvTypeSMP1WithQuestion:
- if c.smp.state != smpState1 {
- c.resetSMP()
- out = c.generateSMPAbort()
- return
- }
- if c.smp.secret == nil {
- err = smpSecretMissingError
- return
- }
- if err = c.processSMP1(mpis); err != nil {
- return
- }
- c.smp.state = smpState3
- out = c.generateSMP2()
- case tlvTypeSMP2:
- if c.smp.state != smpState2 {
- c.resetSMP()
- out = c.generateSMPAbort()
- return
- }
- if out, err = c.processSMP2(mpis); err != nil {
- out = c.generateSMPAbort()
- return
- }
- c.smp.state = smpState4
- case tlvTypeSMP3:
- if c.smp.state != smpState3 {
- c.resetSMP()
- out = c.generateSMPAbort()
- return
- }
- if out, err = c.processSMP3(mpis); err != nil {
- return
- }
- c.smp.state = smpState1
- c.smp.secret = nil
- complete = true
- case tlvTypeSMP4:
- if c.smp.state != smpState4 {
- c.resetSMP()
- out = c.generateSMPAbort()
- return
- }
- if err = c.processSMP4(mpis); err != nil {
- out = c.generateSMPAbort()
- return
- }
- c.smp.state = smpState1
- c.smp.secret = nil
- complete = true
- default:
- panic("unknown SMP message")
- }
-
- return
-}
-
-func (c *Conversation) calcSMPSecret(mutualSecret []byte, weStarted bool) {
- h := sha256.New()
- h.Write([]byte{smpVersion})
- if weStarted {
- h.Write(c.PrivateKey.PublicKey.Fingerprint())
- h.Write(c.TheirPublicKey.Fingerprint())
- } else {
- h.Write(c.TheirPublicKey.Fingerprint())
- h.Write(c.PrivateKey.PublicKey.Fingerprint())
- }
- h.Write(c.SSID[:])
- h.Write(mutualSecret)
- c.smp.secret = new(big.Int).SetBytes(h.Sum(nil))
-}
-
-func (c *Conversation) generateSMP1(question string) tlv {
- var randBuf [16]byte
- c.smp.a2 = c.randMPI(randBuf[:])
- c.smp.a3 = c.randMPI(randBuf[:])
- g2a := new(big.Int).Exp(g, c.smp.a2, p)
- g3a := new(big.Int).Exp(g, c.smp.a3, p)
- h := sha256.New()
-
- r2 := c.randMPI(randBuf[:])
- r := new(big.Int).Exp(g, r2, p)
- c2 := new(big.Int).SetBytes(hashMPIs(h, 1, r))
- d2 := new(big.Int).Mul(c.smp.a2, c2)
- d2.Sub(r2, d2)
- d2.Mod(d2, q)
- if d2.Sign() < 0 {
- d2.Add(d2, q)
- }
-
- r3 := c.randMPI(randBuf[:])
- r.Exp(g, r3, p)
- c3 := new(big.Int).SetBytes(hashMPIs(h, 2, r))
- d3 := new(big.Int).Mul(c.smp.a3, c3)
- d3.Sub(r3, d3)
- d3.Mod(d3, q)
- if d3.Sign() < 0 {
- d3.Add(d3, q)
- }
-
- var ret tlv
- if len(question) > 0 {
- ret.typ = tlvTypeSMP1WithQuestion
- ret.data = append(ret.data, question...)
- ret.data = append(ret.data, 0)
- } else {
- ret.typ = tlvTypeSMP1
- }
- ret.data = appendU32(ret.data, 6)
- ret.data = appendMPIs(ret.data, g2a, c2, d2, g3a, c3, d3)
- return ret
-}
-
-func (c *Conversation) processSMP1(mpis []*big.Int) error {
- if len(mpis) != 6 {
- return errors.New("otr: incorrect number of arguments in SMP1 message")
- }
- g2a := mpis[0]
- c2 := mpis[1]
- d2 := mpis[2]
- g3a := mpis[3]
- c3 := mpis[4]
- d3 := mpis[5]
- h := sha256.New()
-
- r := new(big.Int).Exp(g, d2, p)
- s := new(big.Int).Exp(g2a, c2, p)
- r.Mul(r, s)
- r.Mod(r, p)
- t := new(big.Int).SetBytes(hashMPIs(h, 1, r))
- if c2.Cmp(t) != 0 {
- return errors.New("otr: ZKP c2 incorrect in SMP1 message")
- }
- r.Exp(g, d3, p)
- s.Exp(g3a, c3, p)
- r.Mul(r, s)
- r.Mod(r, p)
- t.SetBytes(hashMPIs(h, 2, r))
- if c3.Cmp(t) != 0 {
- return errors.New("otr: ZKP c3 incorrect in SMP1 message")
- }
-
- c.smp.g2a = g2a
- c.smp.g3a = g3a
- return nil
-}
-
-func (c *Conversation) generateSMP2() tlv {
- var randBuf [16]byte
- b2 := c.randMPI(randBuf[:])
- c.smp.b3 = c.randMPI(randBuf[:])
- r2 := c.randMPI(randBuf[:])
- r3 := c.randMPI(randBuf[:])
- r4 := c.randMPI(randBuf[:])
- r5 := c.randMPI(randBuf[:])
- r6 := c.randMPI(randBuf[:])
-
- g2b := new(big.Int).Exp(g, b2, p)
- g3b := new(big.Int).Exp(g, c.smp.b3, p)
-
- r := new(big.Int).Exp(g, r2, p)
- h := sha256.New()
- c2 := new(big.Int).SetBytes(hashMPIs(h, 3, r))
- d2 := new(big.Int).Mul(b2, c2)
- d2.Sub(r2, d2)
- d2.Mod(d2, q)
- if d2.Sign() < 0 {
- d2.Add(d2, q)
- }
-
- r.Exp(g, r3, p)
- c3 := new(big.Int).SetBytes(hashMPIs(h, 4, r))
- d3 := new(big.Int).Mul(c.smp.b3, c3)
- d3.Sub(r3, d3)
- d3.Mod(d3, q)
- if d3.Sign() < 0 {
- d3.Add(d3, q)
- }
-
- c.smp.g2 = new(big.Int).Exp(c.smp.g2a, b2, p)
- c.smp.g3 = new(big.Int).Exp(c.smp.g3a, c.smp.b3, p)
- c.smp.pb = new(big.Int).Exp(c.smp.g3, r4, p)
- c.smp.qb = new(big.Int).Exp(g, r4, p)
- r.Exp(c.smp.g2, c.smp.secret, p)
- c.smp.qb.Mul(c.smp.qb, r)
- c.smp.qb.Mod(c.smp.qb, p)
-
- s := new(big.Int)
- s.Exp(c.smp.g2, r6, p)
- r.Exp(g, r5, p)
- s.Mul(r, s)
- s.Mod(s, p)
- r.Exp(c.smp.g3, r5, p)
- cp := new(big.Int).SetBytes(hashMPIs(h, 5, r, s))
-
- // D5 = r5 - r4 cP mod q and D6 = r6 - y cP mod q
-
- s.Mul(r4, cp)
- r.Sub(r5, s)
- d5 := new(big.Int).Mod(r, q)
- if d5.Sign() < 0 {
- d5.Add(d5, q)
- }
-
- s.Mul(c.smp.secret, cp)
- r.Sub(r6, s)
- d6 := new(big.Int).Mod(r, q)
- if d6.Sign() < 0 {
- d6.Add(d6, q)
- }
-
- var ret tlv
- ret.typ = tlvTypeSMP2
- ret.data = appendU32(ret.data, 11)
- ret.data = appendMPIs(ret.data, g2b, c2, d2, g3b, c3, d3, c.smp.pb, c.smp.qb, cp, d5, d6)
- return ret
-}
-
-func (c *Conversation) processSMP2(mpis []*big.Int) (out tlv, err error) {
- if len(mpis) != 11 {
- err = errors.New("otr: incorrect number of arguments in SMP2 message")
- return
- }
- g2b := mpis[0]
- c2 := mpis[1]
- d2 := mpis[2]
- g3b := mpis[3]
- c3 := mpis[4]
- d3 := mpis[5]
- pb := mpis[6]
- qb := mpis[7]
- cp := mpis[8]
- d5 := mpis[9]
- d6 := mpis[10]
- h := sha256.New()
-
- r := new(big.Int).Exp(g, d2, p)
- s := new(big.Int).Exp(g2b, c2, p)
- r.Mul(r, s)
- r.Mod(r, p)
- s.SetBytes(hashMPIs(h, 3, r))
- if c2.Cmp(s) != 0 {
- err = errors.New("otr: ZKP c2 failed in SMP2 message")
- return
- }
-
- r.Exp(g, d3, p)
- s.Exp(g3b, c3, p)
- r.Mul(r, s)
- r.Mod(r, p)
- s.SetBytes(hashMPIs(h, 4, r))
- if c3.Cmp(s) != 0 {
- err = errors.New("otr: ZKP c3 failed in SMP2 message")
- return
- }
-
- c.smp.g2 = new(big.Int).Exp(g2b, c.smp.a2, p)
- c.smp.g3 = new(big.Int).Exp(g3b, c.smp.a3, p)
-
- r.Exp(g, d5, p)
- s.Exp(c.smp.g2, d6, p)
- r.Mul(r, s)
- s.Exp(qb, cp, p)
- r.Mul(r, s)
- r.Mod(r, p)
-
- s.Exp(c.smp.g3, d5, p)
- t := new(big.Int).Exp(pb, cp, p)
- s.Mul(s, t)
- s.Mod(s, p)
- t.SetBytes(hashMPIs(h, 5, s, r))
- if cp.Cmp(t) != 0 {
- err = errors.New("otr: ZKP cP failed in SMP2 message")
- return
- }
-
- var randBuf [16]byte
- r4 := c.randMPI(randBuf[:])
- r5 := c.randMPI(randBuf[:])
- r6 := c.randMPI(randBuf[:])
- r7 := c.randMPI(randBuf[:])
-
- pa := new(big.Int).Exp(c.smp.g3, r4, p)
- r.Exp(c.smp.g2, c.smp.secret, p)
- qa := new(big.Int).Exp(g, r4, p)
- qa.Mul(qa, r)
- qa.Mod(qa, p)
-
- r.Exp(g, r5, p)
- s.Exp(c.smp.g2, r6, p)
- r.Mul(r, s)
- r.Mod(r, p)
-
- s.Exp(c.smp.g3, r5, p)
- cp.SetBytes(hashMPIs(h, 6, s, r))
-
- r.Mul(r4, cp)
- d5 = new(big.Int).Sub(r5, r)
- d5.Mod(d5, q)
- if d5.Sign() < 0 {
- d5.Add(d5, q)
- }
-
- r.Mul(c.smp.secret, cp)
- d6 = new(big.Int).Sub(r6, r)
- d6.Mod(d6, q)
- if d6.Sign() < 0 {
- d6.Add(d6, q)
- }
-
- r.ModInverse(qb, p)
- qaqb := new(big.Int).Mul(qa, r)
- qaqb.Mod(qaqb, p)
-
- ra := new(big.Int).Exp(qaqb, c.smp.a3, p)
- r.Exp(qaqb, r7, p)
- s.Exp(g, r7, p)
- cr := new(big.Int).SetBytes(hashMPIs(h, 7, s, r))
-
- r.Mul(c.smp.a3, cr)
- d7 := new(big.Int).Sub(r7, r)
- d7.Mod(d7, q)
- if d7.Sign() < 0 {
- d7.Add(d7, q)
- }
-
- c.smp.g3b = g3b
- c.smp.qaqb = qaqb
-
- r.ModInverse(pb, p)
- c.smp.papb = new(big.Int).Mul(pa, r)
- c.smp.papb.Mod(c.smp.papb, p)
- c.smp.ra = ra
-
- out.typ = tlvTypeSMP3
- out.data = appendU32(out.data, 8)
- out.data = appendMPIs(out.data, pa, qa, cp, d5, d6, ra, cr, d7)
- return
-}
-
-func (c *Conversation) processSMP3(mpis []*big.Int) (out tlv, err error) {
- if len(mpis) != 8 {
- err = errors.New("otr: incorrect number of arguments in SMP3 message")
- return
- }
- pa := mpis[0]
- qa := mpis[1]
- cp := mpis[2]
- d5 := mpis[3]
- d6 := mpis[4]
- ra := mpis[5]
- cr := mpis[6]
- d7 := mpis[7]
- h := sha256.New()
-
- r := new(big.Int).Exp(g, d5, p)
- s := new(big.Int).Exp(c.smp.g2, d6, p)
- r.Mul(r, s)
- s.Exp(qa, cp, p)
- r.Mul(r, s)
- r.Mod(r, p)
-
- s.Exp(c.smp.g3, d5, p)
- t := new(big.Int).Exp(pa, cp, p)
- s.Mul(s, t)
- s.Mod(s, p)
- t.SetBytes(hashMPIs(h, 6, s, r))
- if t.Cmp(cp) != 0 {
- err = errors.New("otr: ZKP cP failed in SMP3 message")
- return
- }
-
- r.ModInverse(c.smp.qb, p)
- qaqb := new(big.Int).Mul(qa, r)
- qaqb.Mod(qaqb, p)
-
- r.Exp(qaqb, d7, p)
- s.Exp(ra, cr, p)
- r.Mul(r, s)
- r.Mod(r, p)
-
- s.Exp(g, d7, p)
- t.Exp(c.smp.g3a, cr, p)
- s.Mul(s, t)
- s.Mod(s, p)
- t.SetBytes(hashMPIs(h, 7, s, r))
- if t.Cmp(cr) != 0 {
- err = errors.New("otr: ZKP cR failed in SMP3 message")
- return
- }
-
- var randBuf [16]byte
- r7 := c.randMPI(randBuf[:])
- rb := new(big.Int).Exp(qaqb, c.smp.b3, p)
-
- r.Exp(qaqb, r7, p)
- s.Exp(g, r7, p)
- cr = new(big.Int).SetBytes(hashMPIs(h, 8, s, r))
-
- r.Mul(c.smp.b3, cr)
- d7 = new(big.Int).Sub(r7, r)
- d7.Mod(d7, q)
- if d7.Sign() < 0 {
- d7.Add(d7, q)
- }
-
- out.typ = tlvTypeSMP4
- out.data = appendU32(out.data, 3)
- out.data = appendMPIs(out.data, rb, cr, d7)
-
- r.ModInverse(c.smp.pb, p)
- r.Mul(pa, r)
- r.Mod(r, p)
- s.Exp(ra, c.smp.b3, p)
- if r.Cmp(s) != 0 {
- err = smpFailureError
- }
-
- return
-}
-
-func (c *Conversation) processSMP4(mpis []*big.Int) error {
- if len(mpis) != 3 {
- return errors.New("otr: incorrect number of arguments in SMP4 message")
- }
- rb := mpis[0]
- cr := mpis[1]
- d7 := mpis[2]
- h := sha256.New()
-
- r := new(big.Int).Exp(c.smp.qaqb, d7, p)
- s := new(big.Int).Exp(rb, cr, p)
- r.Mul(r, s)
- r.Mod(r, p)
-
- s.Exp(g, d7, p)
- t := new(big.Int).Exp(c.smp.g3b, cr, p)
- s.Mul(s, t)
- s.Mod(s, p)
- t.SetBytes(hashMPIs(h, 8, s, r))
- if t.Cmp(cr) != 0 {
- return errors.New("otr: ZKP cR failed in SMP4 message")
- }
-
- r.Exp(rb, c.smp.a3, p)
- if r.Cmp(c.smp.papb) != 0 {
- return smpFailureError
- }
-
- return nil
-}
-
-func (c *Conversation) generateSMPAbort() tlv {
- return tlv{typ: tlvTypeSMPAbort}
-}
-
-func hashMPIs(h hash.Hash, magic byte, mpis ...*big.Int) []byte {
- if h != nil {
- h.Reset()
- } else {
- h = sha256.New()
- }
-
- h.Write([]byte{magic})
- for _, mpi := range mpis {
- h.Write(appendMPI(nil, mpi))
- }
- return h.Sum(nil)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
deleted file mode 100644
index 593f65300..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC
-2898 / PKCS #5 v2.0.
-
-A key derivation function is useful when encrypting data based on a password
-or any other not-fully-random data. It uses a pseudorandom function to derive
-a secure encryption key based on the password.
-
-While v2.0 of the standard defines only one pseudorandom function to use,
-HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved
-Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
-choose, you can pass the `New` functions from the different SHA packages to
-pbkdf2.Key.
-*/
-package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
-
-import (
- "crypto/hmac"
- "hash"
-)
-
-// Key derives a key from the password, salt and iteration count, returning a
-// []byte of length keylen that can be used as cryptographic key. The key is
-// derived based on the method described as PBKDF2 with the HMAC variant using
-// the supplied hash function.
-//
-// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you
-// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by
-// doing:
-//
-// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New)
-//
-// Remember to get a good random salt. At least 8 bytes is recommended by the
-// RFC.
-//
-// Using a higher iteration count will increase the cost of an exhaustive
-// search but will also make derivation proportionally slower.
-func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte {
- prf := hmac.New(h, password)
- hashLen := prf.Size()
- numBlocks := (keyLen + hashLen - 1) / hashLen
-
- var buf [4]byte
- dk := make([]byte, 0, numBlocks*hashLen)
- U := make([]byte, hashLen)
- for block := 1; block <= numBlocks; block++ {
- // N.B.: || means concatenation, ^ means XOR
- // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter
- // U_1 = PRF(password, salt || uint(i))
- prf.Reset()
- prf.Write(salt)
- buf[0] = byte(block >> 24)
- buf[1] = byte(block >> 16)
- buf[2] = byte(block >> 8)
- buf[3] = byte(block)
- prf.Write(buf[:4])
- dk = prf.Sum(dk)
- T := dk[len(dk)-hashLen:]
- copy(U, T)
-
- // U_n = PRF(password, U_(n-1))
- for n := 2; n <= iter; n++ {
- prf.Reset()
- prf.Write(U)
- U = U[:0]
- U = prf.Sum(U)
- for x := range U {
- T[x] ^= U[x]
- }
- }
- }
- return dk[:keyLen]
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go
deleted file mode 100644
index 137924061..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2012 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 file.
-
-package pbkdf2
-
-import (
- "bytes"
- "crypto/sha1"
- "crypto/sha256"
- "hash"
- "testing"
-)
-
-type testVector struct {
- password string
- salt string
- iter int
- output []byte
-}
-
-// Test vectors from RFC 6070, http://tools.ietf.org/html/rfc6070
-var sha1TestVectors = []testVector{
- {
- "password",
- "salt",
- 1,
- []byte{
- 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71,
- 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06,
- 0x2f, 0xe0, 0x37, 0xa6,
- },
- },
- {
- "password",
- "salt",
- 2,
- []byte{
- 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c,
- 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0,
- 0xd8, 0xde, 0x89, 0x57,
- },
- },
- {
- "password",
- "salt",
- 4096,
- []byte{
- 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a,
- 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0,
- 0x65, 0xa4, 0x29, 0xc1,
- },
- },
- // // This one takes too long
- // {
- // "password",
- // "salt",
- // 16777216,
- // []byte{
- // 0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4,
- // 0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c,
- // 0x26, 0x34, 0xe9, 0x84,
- // },
- // },
- {
- "passwordPASSWORDpassword",
- "saltSALTsaltSALTsaltSALTsaltSALTsalt",
- 4096,
- []byte{
- 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b,
- 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a,
- 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70,
- 0x38,
- },
- },
- {
- "pass\000word",
- "sa\000lt",
- 4096,
- []byte{
- 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d,
- 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3,
- },
- },
-}
-
-// Test vectors from
-// http://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors
-var sha256TestVectors = []testVector{
- {
- "password",
- "salt",
- 1,
- []byte{
- 0x12, 0x0f, 0xb6, 0xcf, 0xfc, 0xf8, 0xb3, 0x2c,
- 0x43, 0xe7, 0x22, 0x52, 0x56, 0xc4, 0xf8, 0x37,
- 0xa8, 0x65, 0x48, 0xc9,
- },
- },
- {
- "password",
- "salt",
- 2,
- []byte{
- 0xae, 0x4d, 0x0c, 0x95, 0xaf, 0x6b, 0x46, 0xd3,
- 0x2d, 0x0a, 0xdf, 0xf9, 0x28, 0xf0, 0x6d, 0xd0,
- 0x2a, 0x30, 0x3f, 0x8e,
- },
- },
- {
- "password",
- "salt",
- 4096,
- []byte{
- 0xc5, 0xe4, 0x78, 0xd5, 0x92, 0x88, 0xc8, 0x41,
- 0xaa, 0x53, 0x0d, 0xb6, 0x84, 0x5c, 0x4c, 0x8d,
- 0x96, 0x28, 0x93, 0xa0,
- },
- },
- {
- "passwordPASSWORDpassword",
- "saltSALTsaltSALTsaltSALTsaltSALTsalt",
- 4096,
- []byte{
- 0x34, 0x8c, 0x89, 0xdb, 0xcb, 0xd3, 0x2b, 0x2f,
- 0x32, 0xd8, 0x14, 0xb8, 0x11, 0x6e, 0x84, 0xcf,
- 0x2b, 0x17, 0x34, 0x7e, 0xbc, 0x18, 0x00, 0x18,
- 0x1c,
- },
- },
- {
- "pass\000word",
- "sa\000lt",
- 4096,
- []byte{
- 0x89, 0xb6, 0x9d, 0x05, 0x16, 0xf8, 0x29, 0x89,
- 0x3c, 0x69, 0x62, 0x26, 0x65, 0x0a, 0x86, 0x87,
- },
- },
-}
-
-func testHash(t *testing.T, h func() hash.Hash, hashName string, vectors []testVector) {
- for i, v := range vectors {
- o := Key([]byte(v.password), []byte(v.salt), v.iter, len(v.output), h)
- if !bytes.Equal(o, v.output) {
- t.Errorf("%s %d: expected %x, got %x", hashName, i, v.output, o)
- }
- }
-}
-
-func TestWithHMACSHA1(t *testing.T) {
- testHash(t, sha1.New, "SHA1", sha1TestVectors)
-}
-
-func TestWithHMACSHA256(t *testing.T) {
- testHash(t, sha256.New, "SHA256", sha256TestVectors)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string.go
deleted file mode 100644
index 233b8b62c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "errors"
- "unicode/utf16"
-)
-
-// bmpString returns s encoded in UCS-2 with a zero terminator.
-func bmpString(s string) ([]byte, error) {
- // References:
- // https://tools.ietf.org/html/rfc7292#appendix-B.1
- // https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
- // - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes
- // EncodeRune returns 0xfffd if the rune does not need special encoding
- // - the above RFC provides the info that BMPStrings are NULL terminated.
-
- ret := make([]byte, 0, 2*len(s)+2)
-
- for _, r := range s {
- if t, _ := utf16.EncodeRune(r); t != 0xfffd {
- return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2")
- }
- ret = append(ret, byte(r/256), byte(r%256))
- }
-
- return append(ret, 0, 0), nil
-}
-
-func decodeBMPString(bmpString []byte) (string, error) {
- if len(bmpString)%2 != 0 {
- return "", errors.New("pkcs12: odd-length BMP string")
- }
-
- // strip terminator if present
- if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 {
- bmpString = bmpString[:l-2]
- }
-
- s := make([]uint16, 0, len(bmpString)/2)
- for len(bmpString) > 0 {
- s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1]))
- bmpString = bmpString[2:]
- }
-
- return string(utf16.Decode(s)), nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string_test.go
deleted file mode 100644
index 7fca55f4e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/bmp-string_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
-)
-
-var bmpStringTests = []struct {
- in string
- expectedHex string
- shouldFail bool
-}{
- {"", "0000", false},
- // Example from https://tools.ietf.org/html/rfc7292#appendix-B.
- {"Beavis", "0042006500610076006900730000", false},
- // Some characters from the "Letterlike Symbols Unicode block".
- {"\u2115 - Double-struck N", "21150020002d00200044006f00750062006c0065002d00730074007200750063006b0020004e0000", false},
- // any character outside the BMP should trigger an error.
- {"\U0001f000 East wind (Mahjong)", "", true},
-}
-
-func TestBMPString(t *testing.T) {
- for i, test := range bmpStringTests {
- expected, err := hex.DecodeString(test.expectedHex)
- if err != nil {
- t.Fatalf("#%d: failed to decode expectation", i)
- }
-
- out, err := bmpString(test.in)
- if err == nil && test.shouldFail {
- t.Errorf("#%d: expected to fail, but produced %x", i, out)
- continue
- }
-
- if err != nil && !test.shouldFail {
- t.Errorf("#%d: failed unexpectedly: %s", i, err)
- continue
- }
-
- if !test.shouldFail {
- if !bytes.Equal(out, expected) {
- t.Errorf("#%d: expected %s, got %x", i, test.expectedHex, out)
- continue
- }
-
- roundTrip, err := decodeBMPString(out)
- if err != nil {
- t.Errorf("#%d: decoding output gave an error: %s", i, err)
- continue
- }
-
- if roundTrip != test.in {
- t.Errorf("#%d: decoding output resulted in %q, but it should have been %q", i, roundTrip, test.in)
- continue
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto.go
deleted file mode 100644
index 484ca51b7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/des"
- "crypto/x509/pkix"
- "encoding/asn1"
- "errors"
-
- "golang.org/x/crypto/pkcs12/internal/rc2"
-)
-
-var (
- oidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3})
- oidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 6})
-)
-
-// pbeCipher is an abstraction of a PKCS#12 cipher.
-type pbeCipher interface {
- // create returns a cipher.Block given a key.
- create(key []byte) (cipher.Block, error)
- // deriveKey returns a key derived from the given password and salt.
- deriveKey(salt, password []byte, iterations int) []byte
- // deriveKey returns an IV derived from the given password and salt.
- deriveIV(salt, password []byte, iterations int) []byte
-}
-
-type shaWithTripleDESCBC struct{}
-
-func (shaWithTripleDESCBC) create(key []byte) (cipher.Block, error) {
- return des.NewTripleDESCipher(key)
-}
-
-func (shaWithTripleDESCBC) deriveKey(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24)
-}
-
-func (shaWithTripleDESCBC) deriveIV(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
-}
-
-type shaWith40BitRC2CBC struct{}
-
-func (shaWith40BitRC2CBC) create(key []byte) (cipher.Block, error) {
- return rc2.New(key, len(key)*8)
-}
-
-func (shaWith40BitRC2CBC) deriveKey(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5)
-}
-
-func (shaWith40BitRC2CBC) deriveIV(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
-}
-
-type pbeParams struct {
- Salt []byte
- Iterations int
-}
-
-func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, int, error) {
- var cipherType pbeCipher
-
- switch {
- case algorithm.Algorithm.Equal(oidPBEWithSHAAnd3KeyTripleDESCBC):
- cipherType = shaWithTripleDESCBC{}
- case algorithm.Algorithm.Equal(oidPBEWithSHAAnd40BitRC2CBC):
- cipherType = shaWith40BitRC2CBC{}
- default:
- return nil, 0, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported")
- }
-
- var params pbeParams
- if err := unmarshal(algorithm.Parameters.FullBytes, &params); err != nil {
- return nil, 0, err
- }
-
- key := cipherType.deriveKey(params.Salt, password, params.Iterations)
- iv := cipherType.deriveIV(params.Salt, password, params.Iterations)
-
- block, err := cipherType.create(key)
- if err != nil {
- return nil, 0, err
- }
-
- return cipher.NewCBCDecrypter(block, iv), block.BlockSize(), nil
-}
-
-func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) {
- cbc, blockSize, err := pbDecrypterFor(info.Algorithm(), password)
- if err != nil {
- return nil, err
- }
-
- encrypted := info.Data()
- if len(encrypted) == 0 {
- return nil, errors.New("pkcs12: empty encrypted data")
- }
- if len(encrypted)%blockSize != 0 {
- return nil, errors.New("pkcs12: input is not a multiple of the block size")
- }
- decrypted = make([]byte, len(encrypted))
- cbc.CryptBlocks(decrypted, encrypted)
-
- psLen := int(decrypted[len(decrypted)-1])
- if psLen == 0 || psLen > blockSize {
- return nil, ErrDecryption
- }
-
- if len(decrypted) < psLen {
- return nil, ErrDecryption
- }
- ps := decrypted[len(decrypted)-psLen:]
- decrypted = decrypted[:len(decrypted)-psLen]
- if bytes.Compare(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) != 0 {
- return nil, ErrDecryption
- }
-
- return
-}
-
-// decryptable abstracts an object that contains ciphertext.
-type decryptable interface {
- Algorithm() pkix.AlgorithmIdentifier
- Data() []byte
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto_test.go
deleted file mode 100644
index eb4dae8fc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/crypto_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "bytes"
- "crypto/x509/pkix"
- "encoding/asn1"
- "testing"
-)
-
-var sha1WithTripleDES = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3})
-
-func TestPbDecrypterFor(t *testing.T) {
- params, _ := asn1.Marshal(pbeParams{
- Salt: []byte{1, 2, 3, 4, 5, 6, 7, 8},
- Iterations: 2048,
- })
- alg := pkix.AlgorithmIdentifier{
- Algorithm: asn1.ObjectIdentifier([]int{1, 2, 3}),
- Parameters: asn1.RawValue{
- FullBytes: params,
- },
- }
-
- pass, _ := bmpString("Sesame open")
-
- _, _, err := pbDecrypterFor(alg, pass)
- if _, ok := err.(NotImplementedError); !ok {
- t.Errorf("expected not implemented error, got: %T %s", err, err)
- }
-
- alg.Algorithm = sha1WithTripleDES
- cbc, blockSize, err := pbDecrypterFor(alg, pass)
- if err != nil {
- t.Errorf("unexpected error from pbDecrypterFor %v", err)
- }
- if blockSize != 8 {
- t.Errorf("unexpected block size %d, wanted 8", blockSize)
- }
-
- plaintext := []byte{1, 2, 3, 4, 5, 6, 7, 8}
- expectedCiphertext := []byte{185, 73, 135, 249, 137, 1, 122, 247}
- ciphertext := make([]byte, len(plaintext))
- cbc.CryptBlocks(ciphertext, plaintext)
-
- if bytes.Compare(ciphertext, expectedCiphertext) != 0 {
- t.Errorf("bad ciphertext, got %x but wanted %x", ciphertext, expectedCiphertext)
- }
-}
-
-var pbDecryptTests = []struct {
- in []byte
- expected []byte
- expectedError error
-}{
- {
- []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\xa0\x9a\xdf\x5a\x58\xa0\xea\x46"), // 7 padding bytes
- []byte("A secret!"),
- nil,
- },
- {
- []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\x96\x24\x2f\x71\x7e\x32\x3f\xe7"), // 8 padding bytes
- []byte("A secret"),
- nil,
- },
- {
- []byte("\x35\x0c\xc0\x8d\xab\xa9\x5d\x30\x7f\x9a\xec\x6a\xd8\x9b\x9c\xd9"), // 9 padding bytes, incorrect
- nil,
- ErrDecryption,
- },
- {
- []byte("\xb2\xf9\x6e\x06\x60\xae\x20\xcf\x08\xa0\x7b\xd9\x6b\x20\xef\x41"), // incorrect padding bytes: [ ... 0x04 0x02 ]
- nil,
- ErrDecryption,
- },
-}
-
-func TestPbDecrypt(t *testing.T) {
- for i, test := range pbDecryptTests {
- decryptable := testDecryptable{
- data: test.in,
- algorithm: pkix.AlgorithmIdentifier{
- Algorithm: sha1WithTripleDES,
- Parameters: pbeParams{
- Salt: []byte("\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8"),
- Iterations: 4096,
- }.RawASN1(),
- },
- }
- password, _ := bmpString("sesame")
-
- plaintext, err := pbDecrypt(decryptable, password)
- if err != test.expectedError {
- t.Errorf("#%d: got error %q, but wanted %q", i, err, test.expectedError)
- continue
- }
-
- if !bytes.Equal(plaintext, test.expected) {
- t.Errorf("#%d: got %x, but wanted %x", i, plaintext, test.expected)
- }
- }
-}
-
-type testDecryptable struct {
- data []byte
- algorithm pkix.AlgorithmIdentifier
-}
-
-func (d testDecryptable) Algorithm() pkix.AlgorithmIdentifier { return d.algorithm }
-func (d testDecryptable) Data() []byte { return d.data }
-
-func (params pbeParams) RawASN1() (raw asn1.RawValue) {
- asn1Bytes, err := asn1.Marshal(params)
- if err != nil {
- panic(err)
- }
- _, err = asn1.Unmarshal(asn1Bytes, &raw)
- if err != nil {
- panic(err)
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/errors.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/errors.go
deleted file mode 100644
index 7377ce6fb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/errors.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import "errors"
-
-var (
- // ErrDecryption represents a failure to decrypt the input.
- ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding")
-
- // ErrIncorrectPassword is returned when an incorrect password is detected.
- // Usually, P12/PFX data is signed to be able to verify the password.
- ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect")
-)
-
-// NotImplementedError indicates that the input is not currently supported.
-type NotImplementedError string
-
-func (e NotImplementedError) Error() string {
- return "pkcs12: " + string(e)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go
deleted file mode 100644
index 3347f338c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2015 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 file.
-
-package rc2
-
-import (
- "testing"
-)
-
-func BenchmarkEncrypt(b *testing.B) {
- r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
- b.ResetTimer()
- var src [8]byte
- for i := 0; i < b.N; i++ {
- r.Encrypt(src[:], src[:])
- }
-}
-
-func BenchmarkDecrypt(b *testing.B) {
- r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
- b.ResetTimer()
- var src [8]byte
- for i := 0; i < b.N; i++ {
- r.Decrypt(src[:], src[:])
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go
deleted file mode 100644
index 8c7090258..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go
+++ /dev/null
@@ -1,274 +0,0 @@
-// Copyright 2015 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 file.
-
-// Package rc2 implements the RC2 cipher
-/*
-https://www.ietf.org/rfc/rfc2268.txt
-http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf
-
-This code is licensed under the MIT license.
-*/
-package rc2
-
-import (
- "crypto/cipher"
- "encoding/binary"
-)
-
-// The rc2 block size in bytes
-const BlockSize = 8
-
-type rc2Cipher struct {
- k [64]uint16
-}
-
-// New returns a new rc2 cipher with the given key and effective key length t1
-func New(key []byte, t1 int) (cipher.Block, error) {
- // TODO(dgryski): error checking for key length
- return &rc2Cipher{
- k: expandKey(key, t1),
- }, nil
-}
-
-func (*rc2Cipher) BlockSize() int { return BlockSize }
-
-var piTable = [256]byte{
- 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d,
- 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2,
- 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32,
- 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82,
- 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc,
- 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26,
- 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03,
- 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7,
- 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a,
- 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec,
- 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39,
- 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31,
- 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9,
- 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9,
- 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e,
- 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad,
-}
-
-func expandKey(key []byte, t1 int) [64]uint16 {
-
- l := make([]byte, 128)
- copy(l, key)
-
- var t = len(key)
- var t8 = (t1 + 7) / 8
- var tm = byte(255 % uint(1<<(8+uint(t1)-8*uint(t8))))
-
- for i := len(key); i < 128; i++ {
- l[i] = piTable[l[i-1]+l[uint8(i-t)]]
- }
-
- l[128-t8] = piTable[l[128-t8]&tm]
-
- for i := 127 - t8; i >= 0; i-- {
- l[i] = piTable[l[i+1]^l[i+t8]]
- }
-
- var k [64]uint16
-
- for i := range k {
- k[i] = uint16(l[2*i]) + uint16(l[2*i+1])*256
- }
-
- return k
-}
-
-func rotl16(x uint16, b uint) uint16 {
- return (x >> (16 - b)) | (x << b)
-}
-
-func (c *rc2Cipher) Encrypt(dst, src []byte) {
-
- r0 := binary.LittleEndian.Uint16(src[0:])
- r1 := binary.LittleEndian.Uint16(src[2:])
- r2 := binary.LittleEndian.Uint16(src[4:])
- r3 := binary.LittleEndian.Uint16(src[6:])
-
- var j int
-
- for j <= 16 {
- // mix r0
- r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
- r0 = rotl16(r0, 1)
- j++
-
- // mix r1
- r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2)
- r1 = rotl16(r1, 2)
- j++
-
- // mix r2
- r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3)
- r2 = rotl16(r2, 3)
- j++
-
- // mix r3
- r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0)
- r3 = rotl16(r3, 5)
- j++
-
- }
-
- r0 = r0 + c.k[r3&63]
- r1 = r1 + c.k[r0&63]
- r2 = r2 + c.k[r1&63]
- r3 = r3 + c.k[r2&63]
-
- for j <= 40 {
-
- // mix r0
- r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
- r0 = rotl16(r0, 1)
- j++
-
- // mix r1
- r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2)
- r1 = rotl16(r1, 2)
- j++
-
- // mix r2
- r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3)
- r2 = rotl16(r2, 3)
- j++
-
- // mix r3
- r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0)
- r3 = rotl16(r3, 5)
- j++
-
- }
-
- r0 = r0 + c.k[r3&63]
- r1 = r1 + c.k[r0&63]
- r2 = r2 + c.k[r1&63]
- r3 = r3 + c.k[r2&63]
-
- for j <= 60 {
-
- // mix r0
- r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
- r0 = rotl16(r0, 1)
- j++
-
- // mix r1
- r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2)
- r1 = rotl16(r1, 2)
- j++
-
- // mix r2
- r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3)
- r2 = rotl16(r2, 3)
- j++
-
- // mix r3
- r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0)
- r3 = rotl16(r3, 5)
- j++
- }
-
- binary.LittleEndian.PutUint16(dst[0:], r0)
- binary.LittleEndian.PutUint16(dst[2:], r1)
- binary.LittleEndian.PutUint16(dst[4:], r2)
- binary.LittleEndian.PutUint16(dst[6:], r3)
-}
-
-func (c *rc2Cipher) Decrypt(dst, src []byte) {
-
- r0 := binary.LittleEndian.Uint16(src[0:])
- r1 := binary.LittleEndian.Uint16(src[2:])
- r2 := binary.LittleEndian.Uint16(src[4:])
- r3 := binary.LittleEndian.Uint16(src[6:])
-
- j := 63
-
- for j >= 44 {
- // unmix r3
- r3 = rotl16(r3, 16-5)
- r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0)
- j--
-
- // unmix r2
- r2 = rotl16(r2, 16-3)
- r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3)
- j--
-
- // unmix r1
- r1 = rotl16(r1, 16-2)
- r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2)
- j--
-
- // unmix r0
- r0 = rotl16(r0, 16-1)
- r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1)
- j--
- }
-
- r3 = r3 - c.k[r2&63]
- r2 = r2 - c.k[r1&63]
- r1 = r1 - c.k[r0&63]
- r0 = r0 - c.k[r3&63]
-
- for j >= 20 {
- // unmix r3
- r3 = rotl16(r3, 16-5)
- r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0)
- j--
-
- // unmix r2
- r2 = rotl16(r2, 16-3)
- r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3)
- j--
-
- // unmix r1
- r1 = rotl16(r1, 16-2)
- r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2)
- j--
-
- // unmix r0
- r0 = rotl16(r0, 16-1)
- r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1)
- j--
-
- }
-
- r3 = r3 - c.k[r2&63]
- r2 = r2 - c.k[r1&63]
- r1 = r1 - c.k[r0&63]
- r0 = r0 - c.k[r3&63]
-
- for j >= 0 {
-
- // unmix r3
- r3 = rotl16(r3, 16-5)
- r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0)
- j--
-
- // unmix r2
- r2 = rotl16(r2, 16-3)
- r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3)
- j--
-
- // unmix r1
- r1 = rotl16(r1, 16-2)
- r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2)
- j--
-
- // unmix r0
- r0 = rotl16(r0, 16-1)
- r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1)
- j--
-
- }
-
- binary.LittleEndian.PutUint16(dst[0:], r0)
- binary.LittleEndian.PutUint16(dst[2:], r1)
- binary.LittleEndian.PutUint16(dst[4:], r2)
- binary.LittleEndian.PutUint16(dst[6:], r3)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go
deleted file mode 100644
index 8a49dfaf3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2015 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 file.
-
-package rc2
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
-)
-
-func TestEncryptDecrypt(t *testing.T) {
-
- // TODO(dgryski): add the rest of the test vectors from the RFC
- var tests = []struct {
- key string
- plain string
- cipher string
- t1 int
- }{
- {
- "0000000000000000",
- "0000000000000000",
- "ebb773f993278eff",
- 63,
- },
- {
- "ffffffffffffffff",
- "ffffffffffffffff",
- "278b27e42e2f0d49",
- 64,
- },
- {
- "3000000000000000",
- "1000000000000001",
- "30649edf9be7d2c2",
- 64,
- },
- {
- "88",
- "0000000000000000",
- "61a8a244adacccf0",
- 64,
- },
- {
- "88bca90e90875a",
- "0000000000000000",
- "6ccf4308974c267f",
- 64,
- },
- {
- "88bca90e90875a7f0f79c384627bafb2",
- "0000000000000000",
- "1a807d272bbe5db1",
- 64,
- },
- {
- "88bca90e90875a7f0f79c384627bafb2",
- "0000000000000000",
- "2269552ab0f85ca6",
- 128,
- },
- {
- "88bca90e90875a7f0f79c384627bafb216f80a6f85920584c42fceb0be255daf1e",
- "0000000000000000",
- "5b78d3a43dfff1f1",
- 129,
- },
- }
-
- for _, tt := range tests {
- k, _ := hex.DecodeString(tt.key)
- p, _ := hex.DecodeString(tt.plain)
- c, _ := hex.DecodeString(tt.cipher)
-
- b, _ := New(k, tt.t1)
-
- var dst [8]byte
-
- b.Encrypt(dst[:], p)
-
- if !bytes.Equal(dst[:], c) {
- t.Errorf("encrypt failed: got % 2x wanted % 2x\n", dst, c)
- }
-
- b.Decrypt(dst[:], c)
-
- if !bytes.Equal(dst[:], p) {
- t.Errorf("decrypt failed: got % 2x wanted % 2x\n", dst, p)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac.go
deleted file mode 100644
index 5f38aa7de..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "crypto/hmac"
- "crypto/sha1"
- "crypto/x509/pkix"
- "encoding/asn1"
-)
-
-type macData struct {
- Mac digestInfo
- MacSalt []byte
- Iterations int `asn1:"optional,default:1"`
-}
-
-// from PKCS#7:
-type digestInfo struct {
- Algorithm pkix.AlgorithmIdentifier
- Digest []byte
-}
-
-var (
- oidSHA1 = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26})
-)
-
-func verifyMac(macData *macData, message, password []byte) error {
- if !macData.Mac.Algorithm.Algorithm.Equal(oidSHA1) {
- return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String())
- }
-
- key := pbkdf(sha1Sum, 20, 64, macData.MacSalt, password, macData.Iterations, 3, 20)
-
- mac := hmac.New(sha1.New, key)
- mac.Write(message)
- expectedMAC := mac.Sum(nil)
-
- if !hmac.Equal(macData.Mac.Digest, expectedMAC) {
- return ErrIncorrectPassword
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac_test.go
deleted file mode 100644
index 1ed4ff21e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/mac_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "encoding/asn1"
- "testing"
-)
-
-func TestVerifyMac(t *testing.T) {
- td := macData{
- Mac: digestInfo{
- Digest: []byte{0x18, 0x20, 0x3d, 0xff, 0x1e, 0x16, 0xf4, 0x92, 0xf2, 0xaf, 0xc8, 0x91, 0xa9, 0xba, 0xd6, 0xca, 0x9d, 0xee, 0x51, 0x93},
- },
- MacSalt: []byte{1, 2, 3, 4, 5, 6, 7, 8},
- Iterations: 2048,
- }
-
- message := []byte{11, 12, 13, 14, 15}
- password, _ := bmpString("")
-
- td.Mac.Algorithm.Algorithm = asn1.ObjectIdentifier([]int{1, 2, 3})
- err := verifyMac(&td, message, password)
- if _, ok := err.(NotImplementedError); !ok {
- t.Errorf("err: %v", err)
- }
-
- td.Mac.Algorithm.Algorithm = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26})
- err = verifyMac(&td, message, password)
- if err != ErrIncorrectPassword {
- t.Errorf("Expected incorrect password, got err: %v", err)
- }
-
- password, _ = bmpString("Sesame open")
- err = verifyMac(&td, message, password)
- if err != nil {
- t.Errorf("err: %v", err)
- }
-
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf.go
deleted file mode 100644
index 5c419d41e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "bytes"
- "crypto/sha1"
- "math/big"
-)
-
-var (
- one = big.NewInt(1)
-)
-
-// sha1Sum returns the SHA-1 hash of in.
-func sha1Sum(in []byte) []byte {
- sum := sha1.Sum(in)
- return sum[:]
-}
-
-// fillWithRepeats returns v*ceiling(len(pattern) / v) bytes consisting of
-// repeats of pattern.
-func fillWithRepeats(pattern []byte, v int) []byte {
- if len(pattern) == 0 {
- return nil
- }
- outputLen := v * ((len(pattern) + v - 1) / v)
- return bytes.Repeat(pattern, (outputLen+len(pattern)-1)/len(pattern))[:outputLen]
-}
-
-func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID byte, size int) (key []byte) {
- // implementation of https://tools.ietf.org/html/rfc7292#appendix-B.2 , RFC text verbatim in comments
-
- // Let H be a hash function built around a compression function f:
-
- // Z_2^u x Z_2^v -> Z_2^u
-
- // (that is, H has a chaining variable and output of length u bits, and
- // the message input to the compression function of H is v bits). The
- // values for u and v are as follows:
-
- // HASH FUNCTION VALUE u VALUE v
- // MD2, MD5 128 512
- // SHA-1 160 512
- // SHA-224 224 512
- // SHA-256 256 512
- // SHA-384 384 1024
- // SHA-512 512 1024
- // SHA-512/224 224 1024
- // SHA-512/256 256 1024
-
- // Furthermore, let r be the iteration count.
-
- // We assume here that u and v are both multiples of 8, as are the
- // lengths of the password and salt strings (which we denote by p and s,
- // respectively) and the number n of pseudorandom bits required. In
- // addition, u and v are of course non-zero.
-
- // For information on security considerations for MD5 [19], see [25] and
- // [1], and on those for MD2, see [18].
-
- // The following procedure can be used to produce pseudorandom bits for
- // a particular "purpose" that is identified by a byte called "ID".
- // This standard specifies 3 different values for the ID byte:
-
- // 1. If ID=1, then the pseudorandom bits being produced are to be used
- // as key material for performing encryption or decryption.
-
- // 2. If ID=2, then the pseudorandom bits being produced are to be used
- // as an IV (Initial Value) for encryption or decryption.
-
- // 3. If ID=3, then the pseudorandom bits being produced are to be used
- // as an integrity key for MACing.
-
- // 1. Construct a string, D (the "diversifier"), by concatenating v/8
- // copies of ID.
- var D []byte
- for i := 0; i < v; i++ {
- D = append(D, ID)
- }
-
- // 2. Concatenate copies of the salt together to create a string S of
- // length v(ceiling(s/v)) bits (the final copy of the salt may be
- // truncated to create S). Note that if the salt is the empty
- // string, then so is S.
-
- S := fillWithRepeats(salt, v)
-
- // 3. Concatenate copies of the password together to create a string P
- // of length v(ceiling(p/v)) bits (the final copy of the password
- // may be truncated to create P). Note that if the password is the
- // empty string, then so is P.
-
- P := fillWithRepeats(password, v)
-
- // 4. Set I=S||P to be the concatenation of S and P.
- I := append(S, P...)
-
- // 5. Set c=ceiling(n/u).
- c := (size + u - 1) / u
-
- // 6. For i=1, 2, ..., c, do the following:
- A := make([]byte, c*20)
- var IjBuf []byte
- for i := 0; i < c; i++ {
- // A. Set A2=H^r(D||I). (i.e., the r-th hash of D||1,
- // H(H(H(... H(D||I))))
- Ai := hash(append(D, I...))
- for j := 1; j < r; j++ {
- Ai = hash(Ai)
- }
- copy(A[i*20:], Ai[:])
-
- if i < c-1 { // skip on last iteration
- // B. Concatenate copies of Ai to create a string B of length v
- // bits (the final copy of Ai may be truncated to create B).
- var B []byte
- for len(B) < v {
- B = append(B, Ai[:]...)
- }
- B = B[:v]
-
- // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit
- // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by
- // setting I_j=(I_j+B+1) mod 2^v for each j.
- {
- Bbi := new(big.Int).SetBytes(B)
- Ij := new(big.Int)
-
- for j := 0; j < len(I)/v; j++ {
- Ij.SetBytes(I[j*v : (j+1)*v])
- Ij.Add(Ij, Bbi)
- Ij.Add(Ij, one)
- Ijb := Ij.Bytes()
- // We expect Ijb to be exactly v bytes,
- // if it is longer or shorter we must
- // adjust it accordingly.
- if len(Ijb) > v {
- Ijb = Ijb[len(Ijb)-v:]
- }
- if len(Ijb) < v {
- if IjBuf == nil {
- IjBuf = make([]byte, v)
- }
- bytesShort := v - len(Ijb)
- for i := 0; i < bytesShort; i++ {
- IjBuf[i] = 0
- }
- copy(IjBuf[bytesShort:], Ijb)
- Ijb = IjBuf
- }
- copy(I[j*v:(j+1)*v], Ijb)
- }
- }
- }
- }
- // 7. Concatenate A_1, A_2, ..., A_c together to form a pseudorandom
- // bit string, A.
-
- // 8. Use the first n bits of A as the output of this entire process.
- return A[:size]
-
- // If the above process is being used to generate a DES key, the process
- // should be used to create 64 random bits, and the key's parity bits
- // should be set after the 64 bits have been produced. Similar concerns
- // hold for 2-key and 3-key triple-DES keys, for CDMF keys, and for any
- // similar keys with parity bits "built into them".
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf_test.go
deleted file mode 100644
index 262037d7e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pbkdf_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "bytes"
- "testing"
-)
-
-func TestThatPBKDFWorksCorrectlyForLongKeys(t *testing.T) {
- cipherInfo := shaWithTripleDESCBC{}
-
- salt := []byte("\xff\xff\xff\xff\xff\xff\xff\xff")
- password, _ := bmpString("sesame")
- key := cipherInfo.deriveKey(salt, password, 2048)
-
- if expected := []byte("\x7c\xd9\xfd\x3e\x2b\x3b\xe7\x69\x1a\x44\xe3\xbe\xf0\xf9\xea\x0f\xb9\xb8\x97\xd4\xe3\x25\xd9\xd1"); bytes.Compare(key, expected) != 0 {
- t.Fatalf("expected key '%x', but found '%x'", expected, key)
- }
-}
-
-func TestThatPBKDFHandlesLeadingZeros(t *testing.T) {
- // This test triggers a case where I_j (in step 6C) ends up with leading zero
- // byte, meaning that len(Ijb) < v (leading zeros get stripped by big.Int).
- // This was previously causing bug whereby certain inputs would break the
- // derivation and produce the wrong output.
- key := pbkdf(sha1Sum, 20, 64, []byte("\xf3\x7e\x05\xb5\x18\x32\x4b\x4b"), []byte("\x00\x00"), 2048, 1, 24)
- expected := []byte("\x00\xf7\x59\xff\x47\xd1\x4d\xd0\x36\x65\xd5\x94\x3c\xb3\xc4\xa3\x9a\x25\x55\xc0\x2a\xed\x66\xe1")
- if bytes.Compare(key, expected) != 0 {
- t.Fatalf("expected key '%x', but found '%x'", expected, key)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12.go
deleted file mode 100644
index eff9ad3a9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12.go
+++ /dev/null
@@ -1,346 +0,0 @@
-// Copyright 2015 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 file.
-
-// Package pkcs12 implements some of PKCS#12.
-//
-// This implementation is distilled from https://tools.ietf.org/html/rfc7292
-// and referenced documents. It is intended for decoding P12/PFX-stored
-// certificates and keys for use with the crypto/tls package.
-package pkcs12
-
-import (
- "crypto/ecdsa"
- "crypto/rsa"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/asn1"
- "encoding/hex"
- "encoding/pem"
- "errors"
-)
-
-var (
- oidDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 1})
- oidEncryptedDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 6})
-
- oidFriendlyName = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 20})
- oidLocalKeyID = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 21})
- oidMicrosoftCSPName = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 17, 1})
-)
-
-type pfxPdu struct {
- Version int
- AuthSafe contentInfo
- MacData macData `asn1:"optional"`
-}
-
-type contentInfo struct {
- ContentType asn1.ObjectIdentifier
- Content asn1.RawValue `asn1:"tag:0,explicit,optional"`
-}
-
-type encryptedData struct {
- Version int
- EncryptedContentInfo encryptedContentInfo
-}
-
-type encryptedContentInfo struct {
- ContentType asn1.ObjectIdentifier
- ContentEncryptionAlgorithm pkix.AlgorithmIdentifier
- EncryptedContent []byte `asn1:"tag:0,optional"`
-}
-
-func (i encryptedContentInfo) Algorithm() pkix.AlgorithmIdentifier {
- return i.ContentEncryptionAlgorithm
-}
-
-func (i encryptedContentInfo) Data() []byte { return i.EncryptedContent }
-
-type safeBag struct {
- Id asn1.ObjectIdentifier
- Value asn1.RawValue `asn1:"tag:0,explicit"`
- Attributes []pkcs12Attribute `asn1:"set,optional"`
-}
-
-type pkcs12Attribute struct {
- Id asn1.ObjectIdentifier
- Value asn1.RawValue `asn1:"set"`
-}
-
-type encryptedPrivateKeyInfo struct {
- AlgorithmIdentifier pkix.AlgorithmIdentifier
- EncryptedData []byte
-}
-
-func (i encryptedPrivateKeyInfo) Algorithm() pkix.AlgorithmIdentifier {
- return i.AlgorithmIdentifier
-}
-
-func (i encryptedPrivateKeyInfo) Data() []byte {
- return i.EncryptedData
-}
-
-// PEM block types
-const (
- certificateType = "CERTIFICATE"
- privateKeyType = "PRIVATE KEY"
-)
-
-// unmarshal calls asn1.Unmarshal, but also returns an error if there is any
-// trailing data after unmarshaling.
-func unmarshal(in []byte, out interface{}) error {
- trailing, err := asn1.Unmarshal(in, out)
- if err != nil {
- return err
- }
- if len(trailing) != 0 {
- return errors.New("pkcs12: trailing data found")
- }
- return nil
-}
-
-// ConvertToPEM converts all "safe bags" contained in pfxData to PEM blocks.
-func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) {
- encodedPassword, err := bmpString(password)
- if err != nil {
- return nil, ErrIncorrectPassword
- }
-
- bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword)
-
- if err != nil {
- return nil, err
- }
-
- blocks := make([]*pem.Block, 0, len(bags))
- for _, bag := range bags {
- block, err := convertBag(&bag, encodedPassword)
- if err != nil {
- return nil, err
- }
- blocks = append(blocks, block)
- }
-
- return blocks, nil
-}
-
-func convertBag(bag *safeBag, password []byte) (*pem.Block, error) {
- block := &pem.Block{
- Headers: make(map[string]string),
- }
-
- for _, attribute := range bag.Attributes {
- k, v, err := convertAttribute(&attribute)
- if err != nil {
- return nil, err
- }
- block.Headers[k] = v
- }
-
- switch {
- case bag.Id.Equal(oidCertBag):
- block.Type = certificateType
- certsData, err := decodeCertBag(bag.Value.Bytes)
- if err != nil {
- return nil, err
- }
- block.Bytes = certsData
- case bag.Id.Equal(oidPKCS8ShroundedKeyBag):
- block.Type = privateKeyType
-
- key, err := decodePkcs8ShroudedKeyBag(bag.Value.Bytes, password)
- if err != nil {
- return nil, err
- }
-
- switch key := key.(type) {
- case *rsa.PrivateKey:
- block.Bytes = x509.MarshalPKCS1PrivateKey(key)
- case *ecdsa.PrivateKey:
- block.Bytes, err = x509.MarshalECPrivateKey(key)
- if err != nil {
- return nil, err
- }
- default:
- return nil, errors.New("found unknown private key type in PKCS#8 wrapping")
- }
- default:
- return nil, errors.New("don't know how to convert a safe bag of type " + bag.Id.String())
- }
- return block, nil
-}
-
-func convertAttribute(attribute *pkcs12Attribute) (key, value string, err error) {
- isString := false
-
- switch {
- case attribute.Id.Equal(oidFriendlyName):
- key = "friendlyName"
- isString = true
- case attribute.Id.Equal(oidLocalKeyID):
- key = "localKeyId"
- case attribute.Id.Equal(oidMicrosoftCSPName):
- // This key is chosen to match OpenSSL.
- key = "Microsoft CSP Name"
- isString = true
- default:
- return "", "", errors.New("pkcs12: unknown attribute with OID " + attribute.Id.String())
- }
-
- if isString {
- if err := unmarshal(attribute.Value.Bytes, &attribute.Value); err != nil {
- return "", "", err
- }
- if value, err = decodeBMPString(attribute.Value.Bytes); err != nil {
- return "", "", err
- }
- } else {
- var id []byte
- if err := unmarshal(attribute.Value.Bytes, &id); err != nil {
- return "", "", err
- }
- value = hex.EncodeToString(id)
- }
-
- return key, value, nil
-}
-
-// Decode extracts a certificate and private key from pfxData. This function
-// assumes that there is only one certificate and only one private key in the
-// pfxData.
-func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) {
- encodedPassword, err := bmpString(password)
- if err != nil {
- return nil, nil, err
- }
-
- bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword)
- if err != nil {
- return nil, nil, err
- }
-
- if len(bags) != 2 {
- err = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU")
- return
- }
-
- for _, bag := range bags {
- switch {
- case bag.Id.Equal(oidCertBag):
- if certificate != nil {
- err = errors.New("pkcs12: expected exactly one certificate bag")
- }
-
- certsData, err := decodeCertBag(bag.Value.Bytes)
- if err != nil {
- return nil, nil, err
- }
- certs, err := x509.ParseCertificates(certsData)
- if err != nil {
- return nil, nil, err
- }
- if len(certs) != 1 {
- err = errors.New("pkcs12: expected exactly one certificate in the certBag")
- return nil, nil, err
- }
- certificate = certs[0]
-
- case bag.Id.Equal(oidPKCS8ShroundedKeyBag):
- if privateKey != nil {
- err = errors.New("pkcs12: expected exactly one key bag")
- }
-
- if privateKey, err = decodePkcs8ShroudedKeyBag(bag.Value.Bytes, encodedPassword); err != nil {
- return nil, nil, err
- }
- }
- }
-
- if certificate == nil {
- return nil, nil, errors.New("pkcs12: certificate missing")
- }
- if privateKey == nil {
- return nil, nil, errors.New("pkcs12: private key missing")
- }
-
- return
-}
-
-func getSafeContents(p12Data, password []byte) (bags []safeBag, updatedPassword []byte, err error) {
- pfx := new(pfxPdu)
- if err := unmarshal(p12Data, pfx); err != nil {
- return nil, nil, errors.New("pkcs12: error reading P12 data: " + err.Error())
- }
-
- if pfx.Version != 3 {
- return nil, nil, NotImplementedError("can only decode v3 PFX PDU's")
- }
-
- if !pfx.AuthSafe.ContentType.Equal(oidDataContentType) {
- return nil, nil, NotImplementedError("only password-protected PFX is implemented")
- }
-
- // unmarshal the explicit bytes in the content for type 'data'
- if err := unmarshal(pfx.AuthSafe.Content.Bytes, &pfx.AuthSafe.Content); err != nil {
- return nil, nil, err
- }
-
- if len(pfx.MacData.Mac.Algorithm.Algorithm) == 0 {
- return nil, nil, errors.New("pkcs12: no MAC in data")
- }
-
- if err := verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password); err != nil {
- if err == ErrIncorrectPassword && len(password) == 2 && password[0] == 0 && password[1] == 0 {
- // some implementations use an empty byte array
- // for the empty string password try one more
- // time with empty-empty password
- password = nil
- err = verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password)
- }
- if err != nil {
- return nil, nil, err
- }
- }
-
- var authenticatedSafe []contentInfo
- if err := unmarshal(pfx.AuthSafe.Content.Bytes, &authenticatedSafe); err != nil {
- return nil, nil, err
- }
-
- if len(authenticatedSafe) != 2 {
- return nil, nil, NotImplementedError("expected exactly two items in the authenticated safe")
- }
-
- for _, ci := range authenticatedSafe {
- var data []byte
-
- switch {
- case ci.ContentType.Equal(oidDataContentType):
- if err := unmarshal(ci.Content.Bytes, &data); err != nil {
- return nil, nil, err
- }
- case ci.ContentType.Equal(oidEncryptedDataContentType):
- var encryptedData encryptedData
- if err := unmarshal(ci.Content.Bytes, &encryptedData); err != nil {
- return nil, nil, err
- }
- if encryptedData.Version != 0 {
- return nil, nil, NotImplementedError("only version 0 of EncryptedData is supported")
- }
- if data, err = pbDecrypt(encryptedData.EncryptedContentInfo, password); err != nil {
- return nil, nil, err
- }
- default:
- return nil, nil, NotImplementedError("only data and encryptedData content types are supported in authenticated safe")
- }
-
- var safeContents []safeBag
- if err := unmarshal(data, &safeContents); err != nil {
- return nil, nil, err
- }
- bags = append(bags, safeContents...)
- }
-
- return bags, password, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12_test.go
deleted file mode 100644
index 14dd2a6c5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/pkcs12_test.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "crypto/rsa"
- "crypto/tls"
- "encoding/base64"
- "encoding/pem"
- "testing"
-)
-
-func TestPfx(t *testing.T) {
- for commonName, base64P12 := range testdata {
- p12, _ := base64.StdEncoding.DecodeString(base64P12)
-
- priv, cert, err := Decode(p12, "")
- if err != nil {
- t.Fatal(err)
- }
-
- if err := priv.(*rsa.PrivateKey).Validate(); err != nil {
- t.Errorf("error while validating private key: %v", err)
- }
-
- if cert.Subject.CommonName != commonName {
- t.Errorf("expected common name to be %q, but found %q", commonName, cert.Subject.CommonName)
- }
- }
-}
-
-func TestPEM(t *testing.T) {
- for commonName, base64P12 := range testdata {
- p12, _ := base64.StdEncoding.DecodeString(base64P12)
-
- blocks, err := ToPEM(p12, "")
- if err != nil {
- t.Fatalf("error while converting to PEM: %s", err)
- }
-
- var pemData []byte
- for _, b := range blocks {
- pemData = append(pemData, pem.EncodeToMemory(b)...)
- }
-
- cert, err := tls.X509KeyPair(pemData, pemData)
- if err != nil {
- t.Errorf("err while converting to key pair: %v", err)
- }
- config := tls.Config{
- Certificates: []tls.Certificate{cert},
- }
- config.BuildNameToCertificate()
-
- if _, exists := config.NameToCertificate[commonName]; !exists {
- t.Errorf("did not find our cert in PEM?: %v", config.NameToCertificate)
- }
- }
-}
-
-func ExampleToPEM() {
- p12, _ := base64.StdEncoding.DecodeString(`MIIJzgIBAzCCCZQGCS ... CA+gwggPk==`)
-
- blocks, err := ToPEM(p12, "password")
- if err != nil {
- panic(err)
- }
-
- var pemData []byte
- for _, b := range blocks {
- pemData = append(pemData, pem.EncodeToMemory(b)...)
- }
-
- // then use PEM data for tls to construct tls certificate:
- cert, err := tls.X509KeyPair(pemData, pemData)
- if err != nil {
- panic(err)
- }
-
- config := &tls.Config{
- Certificates: []tls.Certificate{cert},
- }
-
- _ = config
-}
-
-var testdata = map[string]string{
- // 'null' password test case
- "Windows Azure Tools": `MIIKDAIBAzCCCcwGCSqGSIb3DQEHAaCCCb0Eggm5MIIJtTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAhStUNnlTGV+gICB9AEggTIJ81JIossF6boFWpPtkiQRPtI6DW6e9QD4/WvHAVrM2bKdpMzSMsCML5NyuddANTKHBVq00Jc9keqGNAqJPKkjhSUebzQFyhe0E1oI9T4zY5UKr/I8JclOeccH4QQnsySzYUG2SnniXnQ+JrG3juetli7EKth9h6jLc6xbubPadY5HMB3wL/eG/kJymiXwU2KQ9Mgd4X6jbcV+NNCE/8jbZHvSTCPeYTJIjxfeX61Sj5kFKUCzERbsnpyevhY3X0eYtEDezZQarvGmXtMMdzf8HJHkWRdk9VLDLgjk8uiJif/+X4FohZ37ig0CpgC2+dP4DGugaZZ51hb8tN9GeCKIsrmWogMXDIVd0OACBp/EjJVmFB6y0kUCXxUE0TZt0XA1tjAGJcjDUpBvTntZjPsnH/4ZySy+s2d9OOhJ6pzRQBRm360TzkFdSwk9DLiLdGfv4pwMMu/vNGBlqjP/1sQtj+jprJiD1sDbCl4AdQZVoMBQHadF2uSD4/o17XG/Ci0r2h6Htc2yvZMAbEY4zMjjIn2a+vqIxD6onexaek1R3zbkS9j19D6EN9EWn8xgz80YRCyW65znZk8xaIhhvlU/mg7sTxeyuqroBZNcq6uDaQTehDpyH7bY2l4zWRpoj10a6JfH2q5shYz8Y6UZC/kOTfuGqbZDNZWro/9pYquvNNW0M847E5t9bsf9VkAAMHRGBbWoVoU9VpI0UnoXSfvpOo+aXa2DSq5sHHUTVY7A9eov3z5IqT+pligx11xcs+YhDWcU8di3BTJisohKvv5Y8WSkm/rloiZd4ig269k0jTRk1olP/vCksPli4wKG2wdsd5o42nX1yL7mFfXocOANZbB+5qMkiwdyoQSk+Vq+C8nAZx2bbKhUq2MbrORGMzOe0Hh0x2a0PeObycN1Bpyv7Mp3ZI9h5hBnONKCnqMhtyQHUj/nNvbJUnDVYNfoOEqDiEqqEwB7YqWzAKz8KW0OIqdlM8uiQ4JqZZlFllnWJUfaiDrdFM3lYSnFQBkzeVlts6GpDOOBjCYd7dcCNS6kq6pZC6p6HN60Twu0JnurZD6RT7rrPkIGE8vAenFt4iGe/yF52fahCSY8Ws4K0UTwN7bAS+4xRHVCWvE8sMRZsRCHizb5laYsVrPZJhE6+hux6OBb6w8kwPYXc+ud5v6UxawUWgt6uPwl8mlAtU9Z7Miw4Nn/wtBkiLL/ke1UI1gqJtcQXgHxx6mzsjh41+nAgTvdbsSEyU6vfOmxGj3Rwc1eOrIhJUqn5YjOWfzzsz/D5DzWKmwXIwdspt1p+u+kol1N3f2wT9fKPnd/RGCb4g/1hc3Aju4DQYgGY782l89CEEdalpQ/35bQczMFk6Fje12HykakWEXd/bGm9Unh82gH84USiRpeOfQvBDYoqEyrY3zkFZzBjhDqa+jEcAj41tcGx47oSfDq3iVYCdL7HSIjtnyEktVXd7mISZLoMt20JACFcMw+mrbjlug+eU7o2GR7T+LwtOp/p4LZqyLa7oQJDwde1BNZtm3TCK2P1mW94QDL0nDUps5KLtr1DaZXEkRbjSJub2ZE9WqDHyU3KA8G84Tq/rN1IoNu/if45jacyPje1Npj9IftUZSP22nV7HMwZtwQ4P4MYHRMBMGCSqGSIb3DQEJFTEGBAQBAAAAMFsGCSqGSIb3DQEJFDFOHkwAewBCADQAQQA0AEYARQBCADAALQBBADEAOABBAC0ANAA0AEIAQgAtAEIANQBGADIALQA0ADkAMQBFAEYAMQA1ADIAQgBBADEANgB9MF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAG8AZgB0AHcAYQByAGUAIABLAGUAeQAgAFMAdABvAHIAYQBnAGUAIABQAHIAbwB2AGkAZABlAHIwggO/BgkqhkiG9w0BBwagggOwMIIDrAIBADCCA6UGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECEBk5ZAYpu0WAgIH0ICCA3hik4mQFGpw9Ha8TQPtk+j2jwWdxfF0+sTk6S8PTsEfIhB7wPltjiCK92Uv2tCBQnodBUmatIfkpnRDEySmgmdglmOCzj204lWAMRs94PoALGn3JVBXbO1vIDCbAPOZ7Z0Hd0/1t2hmk8v3//QJGUg+qr59/4y/MuVfIg4qfkPcC2QSvYWcK3oTf6SFi5rv9B1IOWFgN5D0+C+x/9Lb/myPYX+rbOHrwtJ4W1fWKoz9g7wwmGFA9IJ2DYGuH8ifVFbDFT1Vcgsvs8arSX7oBsJVW0qrP7XkuDRe3EqCmKW7rBEwYrFznhxZcRDEpMwbFoSvgSIZ4XhFY9VKYglT+JpNH5iDceYEBOQL4vBLpxNUk3l5jKaBNxVa14AIBxq18bVHJ+STInhLhad4u10v/Xbx7wIL3f9DX1yLAkPrpBYbNHS2/ew6H/ySDJnoIDxkw2zZ4qJ+qUJZ1S0lbZVG+VT0OP5uF6tyOSpbMlcGkdl3z254n6MlCrTifcwkzscysDsgKXaYQw06rzrPW6RDub+t+hXzGny799fS9jhQMLDmOggaQ7+LA4oEZsfT89HLMWxJYDqjo3gIfjciV2mV54R684qLDS+AO09U49e6yEbwGlq8lpmO/pbXCbpGbB1b3EomcQbxdWxW2WEkkEd/VBn81K4M3obmywwXJkw+tPXDXfBmzzaqqCR+onMQ5ME1nMkY8ybnfoCc1bDIupjVWsEL2Wvq752RgI6KqzVNr1ew1IdqV5AWN2fOfek+0vi3Jd9FHF3hx8JMwjJL9dZsETV5kHtYJtE7wJ23J68BnCt2eI0GEuwXcCf5EdSKN/xXCTlIokc4Qk/gzRdIZsvcEJ6B1lGovKG54X4IohikqTjiepjbsMWj38yxDmK3mtENZ9ci8FPfbbvIEcOCZIinuY3qFUlRSbx7VUerEoV1IP3clUwexVQo4lHFee2jd7ocWsdSqSapW7OWUupBtDzRkqVhE7tGria+i1W2d6YLlJ21QTjyapWJehAMO637OdbJCCzDs1cXbodRRE7bsP492ocJy8OX66rKdhYbg8srSFNKdb3pF3UDNbN9jhI/t8iagRhNBhlQtTr1me2E/c86Q18qcRXl4bcXTt6acgCeffK6Y26LcVlrgjlD33AEYRRUeyC+rpxbT0aMjdFderlndKRIyG23mSp0HaUwNzAfMAcGBSsOAwIaBBRlviCbIyRrhIysg2dc/KbLFTc2vQQUg4rfwHMM4IKYRD/fsd1x6dda+wQ=`,
- // empty string password test case
- "testing@example.com": `MIIJzgIBAzCCCZQGCSqGSIb3DQEHAaCCCYUEggmBMIIJfTCCA/cGCSqGSIb3DQEHBqCCA+gwggPk
-AgEAMIID3QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIIszfRGqcmPcCAggAgIIDsOZ9Eg1L
-s5Wx8JhYoV3HAL4aRnkAWvTYB5NISZOgSgIQTssmt/3A7134dibTmaT/93LikkL3cTKLnQzJ4wDf
-YZ1bprpVJvUqz+HFT79m27bP9zYXFrvxWBJbxjYKTSjQMgz+h8LAEpXXGajCmxMJ1oCOtdXkhhzc
-LdZN6SAYgtmtyFnCdMEDskSggGuLb3fw84QEJ/Sj6FAULXunW/CPaS7Ce0TMsKmNU/jfFWj3yXXw
-ro0kwjKiVLpVFlnBlHo2OoVU7hmkm59YpGhLgS7nxLD3n7nBroQ0ID1+8R01NnV9XLGoGzxMm1te
-6UyTCkr5mj+kEQ8EP1Ys7g/TC411uhVWySMt/rcpkx7Vz1r9kYEAzJpONAfr6cuEVkPKrxpq4Fh0
-2fzlKBky0i/hrfIEUmngh+ERHUb/Mtv/fkv1j5w9suESbhsMLLiCXAlsP1UWMX+3bNizi3WVMEts
-FM2k9byn+p8IUD/A8ULlE4kEaWeoc+2idkCNQkLGuIdGUXUFVm58se0auUkVRoRJx8x4CkMesT8j
-b1H831W66YRWoEwwDQp2kK1lA2vQXxdVHWlFevMNxJeromLzj3ayiaFrfByeUXhR2S+Hpm+c0yNR
-4UVU9WED2kacsZcpRm9nlEa5sr28mri5JdBrNa/K02OOhvKCxr5ZGmbOVzUQKla2z4w+Ku9k8POm
-dfDNU/fGx1b5hcFWtghXe3msWVsSJrQihnN6q1ughzNiYZlJUGcHdZDRtiWwCFI0bR8h/Dmg9uO9
-4rawQQrjIRT7B8yF3UbkZyAqs8Ppb1TsMeNPHh1rxEfGVQknh/48ouJYsmtbnzugTUt3mJCXXiL+
-XcPMV6bBVAUu4aaVKSmg9+yJtY4/VKv10iw88ktv29fViIdBe3t6l/oPuvQgbQ8dqf4T8w0l/uKZ
-9lS1Na9jfT1vCoS7F5TRi+tmyj1vL5kr/amEIW6xKEP6oeAMvCMtbPAzVEj38zdJ1R22FfuIBxkh
-f0Zl7pdVbmzRxl/SBx9iIBJSqAvcXItiT0FIj8HxQ+0iZKqMQMiBuNWJf5pYOLWGrIyntCWwHuaQ
-wrx0sTGuEL9YXLEAsBDrsvzLkx/56E4INGZFrH8G7HBdW6iGqb22IMI4GHltYSyBRKbB0gadYTyv
-abPEoqww8o7/85aPSzOTJ/53ozD438Q+d0u9SyDuOb60SzCD/zPuCEd78YgtXJwBYTuUNRT27FaM
-3LGMX8Hz+6yPNRnmnA2XKPn7dx/IlaqAjIs8MIIFfgYJKoZIhvcNAQcBoIIFbwSCBWswggVnMIIF
-YwYLKoZIhvcNAQwKAQKgggTuMIIE6jAcBgoqhkiG9w0BDAEDMA4ECJr0cClYqOlcAgIIAASCBMhe
-OQSiP2s0/46ONXcNeVAkz2ksW3u/+qorhSiskGZ0b3dFa1hhgBU2Q7JVIkc4Hf7OXaT1eVQ8oqND
-uhqsNz83/kqYo70+LS8Hocj49jFgWAKrf/yQkdyP1daHa2yzlEw4mkpqOfnIORQHvYCa8nEApspZ
-wVu8y6WVuLHKU67mel7db2xwstQp7PRuSAYqGjTfAylElog8ASdaqqYbYIrCXucF8iF9oVgmb/Qo
-xrXshJ9aSLO4MuXlTPELmWgj07AXKSb90FKNihE+y0bWb9LPVFY1Sly3AX9PfrtkSXIZwqW3phpv
-MxGxQl/R6mr1z+hlTfY9Wdpb5vlKXPKA0L0Rt8d2pOesylFi6esJoS01QgP1kJILjbrV731kvDc0
-Jsd+Oxv4BMwA7ClG8w1EAOInc/GrV1MWFGw/HeEqj3CZ/l/0jv9bwkbVeVCiIhoL6P6lVx9pXq4t
-KZ0uKg/tk5TVJmG2vLcMLvezD0Yk3G2ZOMrywtmskrwoF7oAUpO9e87szoH6fEvUZlkDkPVW1NV4
-cZk3DBSQiuA3VOOg8qbo/tx/EE3H59P0axZWno2GSB0wFPWd1aj+b//tJEJHaaNR6qPRj4IWj9ru
-Qbc8eRAcVWleHg8uAehSvUXlFpyMQREyrnpvMGddpiTC8N4UMrrBRhV7+UbCOWhxPCbItnInBqgl
-1JpSZIP7iUtsIMdu3fEC2cdbXMTRul+4rdzUR7F9OaezV3jjvcAbDvgbK1CpyC+MJ1Mxm/iTgk9V
-iUArydhlR8OniN84GyGYoYCW9O/KUwb6ASmeFOu/msx8x6kAsSQHIkKqMKv0TUR3kZnkxUvdpBGP
-KTl4YCTvNGX4dYALBqrAETRDhua2KVBD/kEttDHwBNVbN2xi81+Mc7ml461aADfk0c66R/m2sjHB
-2tN9+wG12OIWFQjL6wF/UfJMYamxx2zOOExiId29Opt57uYiNVLOO4ourPewHPeH0u8Gz35aero7
-lkt7cZAe1Q0038JUuE/QGlnK4lESK9UkSIQAjSaAlTsrcfwtQxB2EjoOoLhwH5mvxUEmcNGNnXUc
-9xj3M5BD3zBz3Ft7G3YMMDwB1+zC2l+0UG0MGVjMVaeoy32VVNvxgX7jk22OXG1iaOB+PY9kdk+O
-X+52BGSf/rD6X0EnqY7XuRPkMGgjtpZeAYxRQnFtCZgDY4wYheuxqSSpdF49yNczSPLkgB3CeCfS
-+9NTKN7aC6hBbmW/8yYh6OvSiCEwY0lFS/T+7iaVxr1loE4zI1y/FFp4Pe1qfLlLttVlkygga2UU
-SCunTQ8UB/M5IXWKkhMOO11dP4niWwb39Y7pCWpau7mwbXOKfRPX96cgHnQJK5uG+BesDD1oYnX0
-6frN7FOnTSHKruRIwuI8KnOQ/I+owmyz71wiv5LMQt+yM47UrEjB/EZa5X8dpEwOZvkdqL7utcyo
-l0XH5kWMXdW856LL/FYftAqJIDAmtX1TXF/rbP6mPyN/IlDC0gjP84Uzd/a2UyTIWr+wk49Ek3vQ
-/uDamq6QrwAxVmNh5Tset5Vhpc1e1kb7mRMZIzxSP8JcTuYd45oFKi98I8YjvueHVZce1g7OudQP
-SbFQoJvdT46iBg1TTatlltpOiH2mFaxWVS0xYjAjBgkqhkiG9w0BCRUxFgQUdA9eVqvETX4an/c8
-p8SsTugkit8wOwYJKoZIhvcNAQkUMS4eLABGAHIAaQBlAG4AZABsAHkAIABuAGEAbQBlACAAZgBv
-AHIAIABjAGUAcgB0MDEwITAJBgUrDgMCGgUABBRFsNz3Zd1O1GI8GTuFwCWuDOjEEwQIuBEfIcAy
-HQ8CAggA`,
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/safebags.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/safebags.go
deleted file mode 100644
index def1f7b98..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/pkcs12/safebags.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 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 file.
-
-package pkcs12
-
-import (
- "crypto/x509"
- "encoding/asn1"
- "errors"
-)
-
-var (
- // see https://tools.ietf.org/html/rfc7292#appendix-D
- oidCertTypeX509Certificate = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 22, 1})
- oidPKCS8ShroundedKeyBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 2})
- oidCertBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 3})
-)
-
-type certBag struct {
- Id asn1.ObjectIdentifier
- Data []byte `asn1:"tag:0,explicit"`
-}
-
-func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) {
- pkinfo := new(encryptedPrivateKeyInfo)
- if err = unmarshal(asn1Data, pkinfo); err != nil {
- return nil, errors.New("pkcs12: error decoding PKCS#8 shrouded key bag: " + err.Error())
- }
-
- pkData, err := pbDecrypt(pkinfo, password)
- if err != nil {
- return nil, errors.New("pkcs12: error decrypting PKCS#8 shrouded key bag: " + err.Error())
- }
-
- ret := new(asn1.RawValue)
- if err = unmarshal(pkData, ret); err != nil {
- return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error())
- }
-
- if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil {
- return nil, errors.New("pkcs12: error parsing PKCS#8 private key: " + err.Error())
- }
-
- return privateKey, nil
-}
-
-func decodeCertBag(asn1Data []byte) (x509Certificates []byte, err error) {
- bag := new(certBag)
- if err := unmarshal(asn1Data, bag); err != nil {
- return nil, errors.New("pkcs12: error decoding cert bag: " + err.Error())
- }
- if !bag.Id.Equal(oidCertTypeX509Certificate) {
- return nil, NotImplementedError("only X509 certificates are supported")
- }
- return bag.Data, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305.go
deleted file mode 100644
index f562fa571..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Package poly1305 implements Poly1305 one-time message authentication code as
-specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
-
-Poly1305 is a fast, one-time authentication function. It is infeasible for an
-attacker to generate an authenticator for a message without the key. However, a
-key must only be used for a single message. Authenticating two different
-messages with the same key allows an attacker to forge authenticators for other
-messages with the same key.
-
-Poly1305 was originally coupled with AES in order to make Poly1305-AES. AES was
-used with a fixed key in order to generate one-time keys from an nonce.
-However, in this package AES isn't used and the one-time key is specified
-directly.
-*/
-package poly1305 // import "golang.org/x/crypto/poly1305"
-
-import "crypto/subtle"
-
-// TagSize is the size, in bytes, of a poly1305 authenticator.
-const TagSize = 16
-
-// Verify returns true if mac is a valid authenticator for m with the given
-// key.
-func Verify(mac *[16]byte, m []byte, key *[32]byte) bool {
- var tmp [16]byte
- Sum(&tmp, m, key)
- return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305_test.go
deleted file mode 100644
index 017027fe6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/poly1305_test.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2012 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 file.
-
-package poly1305
-
-import (
- "bytes"
- "encoding/hex"
- "flag"
- "testing"
- "unsafe"
-)
-
-var stressFlag = flag.Bool("stress", false, "run slow stress tests")
-
-var testData = []struct {
- in, k, correct []byte
-}{
- {
- []byte("Hello world!"),
- []byte("this is 32-byte key for Poly1305"),
- []byte{0xa6, 0xf7, 0x45, 0x00, 0x8f, 0x81, 0xc9, 0x16, 0xa2, 0x0d, 0xcc, 0x74, 0xee, 0xf2, 0xb2, 0xf0},
- },
- {
- make([]byte, 32),
- []byte("this is 32-byte key for Poly1305"),
- []byte{0x49, 0xec, 0x78, 0x09, 0x0e, 0x48, 0x1e, 0xc6, 0xc2, 0x6b, 0x33, 0xb9, 0x1c, 0xcc, 0x03, 0x07},
- },
- {
- make([]byte, 2007),
- []byte("this is 32-byte key for Poly1305"),
- []byte{0xda, 0x84, 0xbc, 0xab, 0x02, 0x67, 0x6c, 0x38, 0xcd, 0xb0, 0x15, 0x60, 0x42, 0x74, 0xc2, 0xaa},
- },
- {
- make([]byte, 2007),
- make([]byte, 32),
- make([]byte, 16),
- },
- {
- // This test triggers an edge-case. See https://go-review.googlesource.com/#/c/30101/.
- []byte{0x81, 0xd8, 0xb2, 0xe4, 0x6a, 0x25, 0x21, 0x3b, 0x58, 0xfe, 0xe4, 0x21, 0x3a, 0x2a, 0x28, 0xe9, 0x21, 0xc1, 0x2a, 0x96, 0x32, 0x51, 0x6d, 0x3b, 0x73, 0x27, 0x27, 0x27, 0xbe, 0xcf, 0x21, 0x29},
- []byte{0x3b, 0x3a, 0x29, 0xe9, 0x3b, 0x21, 0x3a, 0x5c, 0x5c, 0x3b, 0x3b, 0x05, 0x3a, 0x3a, 0x8c, 0x0d},
- []byte{0x6d, 0xc1, 0x8b, 0x8c, 0x34, 0x4c, 0xd7, 0x99, 0x27, 0x11, 0x8b, 0xbe, 0x84, 0xb7, 0xf3, 0x14},
- },
- {
- // This test generates a result of (2^130-1) % (2^130-5).
- []byte{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- []byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- []byte{4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- },
- {
- // This test generates a result of (2^130-6) % (2^130-5).
- []byte{
- 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- []byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- []byte{0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- },
- {
- // This test generates a result of (2^130-5) % (2^130-5).
- []byte{
- 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- []byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- },
-}
-
-func testSum(t *testing.T, unaligned bool) {
- var out [16]byte
- var key [32]byte
-
- for i, v := range testData {
- in := v.in
- if unaligned {
- in = unalignBytes(in)
- }
- copy(key[:], v.k)
- Sum(&out, in, &key)
- if !bytes.Equal(out[:], v.correct) {
- t.Errorf("%d: expected %x, got %x", i, v.correct, out[:])
- }
- }
-}
-
-func TestBurnin(t *testing.T) {
- // This test can be used to sanity-check significant changes. It can
- // take about many minutes to run, even on fast machines. It's disabled
- // by default.
- if !*stressFlag {
- t.Skip("skipping without -stress")
- }
-
- var key [32]byte
- var input [25]byte
- var output [16]byte
-
- for i := range key {
- key[i] = 1
- }
- for i := range input {
- input[i] = 2
- }
-
- for i := uint64(0); i < 1e10; i++ {
- Sum(&output, input[:], &key)
- copy(key[0:], output[:])
- copy(key[16:], output[:])
- copy(input[:], output[:])
- copy(input[16:], output[:])
- }
-
- const expected = "5e3b866aea0b636d240c83c428f84bfa"
- if got := hex.EncodeToString(output[:]); got != expected {
- t.Errorf("expected %s, got %s", expected, got)
- }
-}
-
-func TestSum(t *testing.T) { testSum(t, false) }
-func TestSumUnaligned(t *testing.T) { testSum(t, true) }
-
-func benchmark(b *testing.B, size int, unaligned bool) {
- var out [16]byte
- var key [32]byte
- in := make([]byte, size)
- if unaligned {
- in = unalignBytes(in)
- }
- b.SetBytes(int64(len(in)))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Sum(&out, in, &key)
- }
-}
-
-func Benchmark64(b *testing.B) { benchmark(b, 64, false) }
-func Benchmark1K(b *testing.B) { benchmark(b, 1024, false) }
-func Benchmark64Unaligned(b *testing.B) { benchmark(b, 64, true) }
-func Benchmark1KUnaligned(b *testing.B) { benchmark(b, 1024, true) }
-
-func unalignBytes(in []byte) []byte {
- out := make([]byte, len(in)+1)
- if uintptr(unsafe.Pointer(&out[0]))&(unsafe.Alignof(uint32(0))-1) == 0 {
- out = out[1:]
- } else {
- out = out[:len(in)]
- }
- copy(out, in)
- return out
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
deleted file mode 100644
index 4dd72fe79..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-package poly1305
-
-// This function is implemented in sum_amd64.s
-//go:noescape
-func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- var mPtr *byte
- if len(m) > 0 {
- mPtr = &m[0]
- }
- poly1305(out, mPtr, uint64(len(m)), key)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
deleted file mode 100644
index 2edae6382..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!gccgo,!appengine
-
-#include "textflag.h"
-
-#define POLY1305_ADD(msg, h0, h1, h2) \
- ADDQ 0(msg), h0; \
- ADCQ 8(msg), h1; \
- ADCQ $1, h2; \
- LEAQ 16(msg), msg
-
-#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \
- MOVQ r0, AX; \
- MULQ h0; \
- MOVQ AX, t0; \
- MOVQ DX, t1; \
- MOVQ r0, AX; \
- MULQ h1; \
- ADDQ AX, t1; \
- ADCQ $0, DX; \
- MOVQ r0, t2; \
- IMULQ h2, t2; \
- ADDQ DX, t2; \
- \
- MOVQ r1, AX; \
- MULQ h0; \
- ADDQ AX, t1; \
- ADCQ $0, DX; \
- MOVQ DX, h0; \
- MOVQ r1, t3; \
- IMULQ h2, t3; \
- MOVQ r1, AX; \
- MULQ h1; \
- ADDQ AX, t2; \
- ADCQ DX, t3; \
- ADDQ h0, t2; \
- ADCQ $0, t3; \
- \
- MOVQ t0, h0; \
- MOVQ t1, h1; \
- MOVQ t2, h2; \
- ANDQ $3, h2; \
- MOVQ t2, t0; \
- ANDQ $0xFFFFFFFFFFFFFFFC, t0; \
- ADDQ t0, h0; \
- ADCQ t3, h1; \
- ADCQ $0, h2; \
- SHRQ $2, t3, t2; \
- SHRQ $2, t3; \
- ADDQ t2, h0; \
- ADCQ t3, h1; \
- ADCQ $0, h2
-
-DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
-DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
-GLOBL ·poly1305Mask<>(SB), RODATA, $16
-
-// func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key)
-TEXT ·poly1305(SB), $0-32
- MOVQ out+0(FP), DI
- MOVQ m+8(FP), SI
- MOVQ mlen+16(FP), R15
- MOVQ key+24(FP), AX
-
- MOVQ 0(AX), R11
- MOVQ 8(AX), R12
- ANDQ ·poly1305Mask<>(SB), R11 // r0
- ANDQ ·poly1305Mask<>+8(SB), R12 // r1
- XORQ R8, R8 // h0
- XORQ R9, R9 // h1
- XORQ R10, R10 // h2
-
- CMPQ R15, $16
- JB bytes_between_0_and_15
-
-loop:
- POLY1305_ADD(SI, R8, R9, R10)
-
-multiply:
- POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14)
- SUBQ $16, R15
- CMPQ R15, $16
- JAE loop
-
-bytes_between_0_and_15:
- TESTQ R15, R15
- JZ done
- MOVQ $1, BX
- XORQ CX, CX
- XORQ R13, R13
- ADDQ R15, SI
-
-flush_buffer:
- SHLQ $8, BX, CX
- SHLQ $8, BX
- MOVB -1(SI), R13
- XORQ R13, BX
- DECQ SI
- DECQ R15
- JNZ flush_buffer
-
- ADDQ BX, R8
- ADCQ CX, R9
- ADCQ $0, R10
- MOVQ $16, R15
- JMP multiply
-
-done:
- MOVQ R8, AX
- MOVQ R9, BX
- SUBQ $0xFFFFFFFFFFFFFFFB, AX
- SBBQ $0xFFFFFFFFFFFFFFFF, BX
- SBBQ $3, R10
- CMOVQCS R8, AX
- CMOVQCS R9, BX
- MOVQ key+24(FP), R8
- ADDQ 16(R8), AX
- ADCQ 24(R8), BX
-
- MOVQ AX, 0(DI)
- MOVQ BX, 8(DI)
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.go
deleted file mode 100644
index 5dc321c2f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build arm,!gccgo,!appengine,!nacl
-
-package poly1305
-
-// This function is implemented in sum_arm.s
-//go:noescape
-func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- var mPtr *byte
- if len(m) > 0 {
- mPtr = &m[0]
- }
- poly1305_auth_armv6(out, mPtr, uint32(len(m)), key)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.s
deleted file mode 100644
index f70b4ac48..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_arm.s
+++ /dev/null
@@ -1,427 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build arm,!gccgo,!appengine,!nacl
-
-#include "textflag.h"
-
-// This code was translated into a form compatible with 5a from the public
-// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305.
-
-DATA ·poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff
-DATA ·poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03
-DATA ·poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff
-DATA ·poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff
-DATA ·poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff
-GLOBL ·poly1305_init_constants_armv6<>(SB), 8, $20
-
-// Warning: the linker may use R11 to synthesize certain instructions. Please
-// take care and verify that no synthetic instructions use it.
-
-TEXT poly1305_init_ext_armv6<>(SB), NOSPLIT, $0
- // Needs 16 bytes of stack and 64 bytes of space pointed to by R0. (It
- // might look like it's only 60 bytes of space but the final four bytes
- // will be written by another function.) We need to skip over four
- // bytes of stack because that's saving the value of 'g'.
- ADD $4, R13, R8
- MOVM.IB [R4-R7], (R8)
- MOVM.IA.W (R1), [R2-R5]
- MOVW $·poly1305_init_constants_armv6<>(SB), R7
- MOVW R2, R8
- MOVW R2>>26, R9
- MOVW R3>>20, g
- MOVW R4>>14, R11
- MOVW R5>>8, R12
- ORR R3<<6, R9, R9
- ORR R4<<12, g, g
- ORR R5<<18, R11, R11
- MOVM.IA (R7), [R2-R6]
- AND R8, R2, R2
- AND R9, R3, R3
- AND g, R4, R4
- AND R11, R5, R5
- AND R12, R6, R6
- MOVM.IA.W [R2-R6], (R0)
- EOR R2, R2, R2
- EOR R3, R3, R3
- EOR R4, R4, R4
- EOR R5, R5, R5
- EOR R6, R6, R6
- MOVM.IA.W [R2-R6], (R0)
- MOVM.IA.W (R1), [R2-R5]
- MOVM.IA [R2-R6], (R0)
- ADD $20, R13, R0
- MOVM.DA (R0), [R4-R7]
- RET
-
-#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \
- MOVBU (offset+0)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+0)(Rdst); \
- MOVBU (offset+1)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+1)(Rdst); \
- MOVBU (offset+2)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+2)(Rdst); \
- MOVBU (offset+3)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+3)(Rdst)
-
-TEXT poly1305_blocks_armv6<>(SB), NOSPLIT, $0
- // Needs 24 bytes of stack for saved registers and then 88 bytes of
- // scratch space after that. We assume that 24 bytes at (R13) have
- // already been used: four bytes for the link register saved in the
- // prelude of poly1305_auth_armv6, four bytes for saving the value of g
- // in that function and 16 bytes of scratch space used around
- // poly1305_finish_ext_armv6_skip1.
- ADD $24, R13, R12
- MOVM.IB [R4-R8, R14], (R12)
- MOVW R0, 88(R13)
- MOVW R1, 92(R13)
- MOVW R2, 96(R13)
- MOVW R1, R14
- MOVW R2, R12
- MOVW 56(R0), R8
- WORD $0xe1180008 // TST R8, R8 not working see issue 5921
- EOR R6, R6, R6
- MOVW.EQ $(1<<24), R6
- MOVW R6, 84(R13)
- ADD $116, R13, g
- MOVM.IA (R0), [R0-R9]
- MOVM.IA [R0-R4], (g)
- CMP $16, R12
- BLO poly1305_blocks_armv6_done
-
-poly1305_blocks_armv6_mainloop:
- WORD $0xe31e0003 // TST R14, #3 not working see issue 5921
- BEQ poly1305_blocks_armv6_mainloop_aligned
- ADD $100, R13, g
- MOVW_UNALIGNED(R14, g, R0, 0)
- MOVW_UNALIGNED(R14, g, R0, 4)
- MOVW_UNALIGNED(R14, g, R0, 8)
- MOVW_UNALIGNED(R14, g, R0, 12)
- MOVM.IA (g), [R0-R3]
- ADD $16, R14
- B poly1305_blocks_armv6_mainloop_loaded
-
-poly1305_blocks_armv6_mainloop_aligned:
- MOVM.IA.W (R14), [R0-R3]
-
-poly1305_blocks_armv6_mainloop_loaded:
- MOVW R0>>26, g
- MOVW R1>>20, R11
- MOVW R2>>14, R12
- MOVW R14, 92(R13)
- MOVW R3>>8, R4
- ORR R1<<6, g, g
- ORR R2<<12, R11, R11
- ORR R3<<18, R12, R12
- BIC $0xfc000000, R0, R0
- BIC $0xfc000000, g, g
- MOVW 84(R13), R3
- BIC $0xfc000000, R11, R11
- BIC $0xfc000000, R12, R12
- ADD R0, R5, R5
- ADD g, R6, R6
- ORR R3, R4, R4
- ADD R11, R7, R7
- ADD $116, R13, R14
- ADD R12, R8, R8
- ADD R4, R9, R9
- MOVM.IA (R14), [R0-R4]
- MULLU R4, R5, (R11, g)
- MULLU R3, R5, (R14, R12)
- MULALU R3, R6, (R11, g)
- MULALU R2, R6, (R14, R12)
- MULALU R2, R7, (R11, g)
- MULALU R1, R7, (R14, R12)
- ADD R4<<2, R4, R4
- ADD R3<<2, R3, R3
- MULALU R1, R8, (R11, g)
- MULALU R0, R8, (R14, R12)
- MULALU R0, R9, (R11, g)
- MULALU R4, R9, (R14, R12)
- MOVW g, 76(R13)
- MOVW R11, 80(R13)
- MOVW R12, 68(R13)
- MOVW R14, 72(R13)
- MULLU R2, R5, (R11, g)
- MULLU R1, R5, (R14, R12)
- MULALU R1, R6, (R11, g)
- MULALU R0, R6, (R14, R12)
- MULALU R0, R7, (R11, g)
- MULALU R4, R7, (R14, R12)
- ADD R2<<2, R2, R2
- ADD R1<<2, R1, R1
- MULALU R4, R8, (R11, g)
- MULALU R3, R8, (R14, R12)
- MULALU R3, R9, (R11, g)
- MULALU R2, R9, (R14, R12)
- MOVW g, 60(R13)
- MOVW R11, 64(R13)
- MOVW R12, 52(R13)
- MOVW R14, 56(R13)
- MULLU R0, R5, (R11, g)
- MULALU R4, R6, (R11, g)
- MULALU R3, R7, (R11, g)
- MULALU R2, R8, (R11, g)
- MULALU R1, R9, (R11, g)
- ADD $52, R13, R0
- MOVM.IA (R0), [R0-R7]
- MOVW g>>26, R12
- MOVW R4>>26, R14
- ORR R11<<6, R12, R12
- ORR R5<<6, R14, R14
- BIC $0xfc000000, g, g
- BIC $0xfc000000, R4, R4
- ADD.S R12, R0, R0
- ADC $0, R1, R1
- ADD.S R14, R6, R6
- ADC $0, R7, R7
- MOVW R0>>26, R12
- MOVW R6>>26, R14
- ORR R1<<6, R12, R12
- ORR R7<<6, R14, R14
- BIC $0xfc000000, R0, R0
- BIC $0xfc000000, R6, R6
- ADD R14<<2, R14, R14
- ADD.S R12, R2, R2
- ADC $0, R3, R3
- ADD R14, g, g
- MOVW R2>>26, R12
- MOVW g>>26, R14
- ORR R3<<6, R12, R12
- BIC $0xfc000000, g, R5
- BIC $0xfc000000, R2, R7
- ADD R12, R4, R4
- ADD R14, R0, R0
- MOVW R4>>26, R12
- BIC $0xfc000000, R4, R8
- ADD R12, R6, R9
- MOVW 96(R13), R12
- MOVW 92(R13), R14
- MOVW R0, R6
- CMP $32, R12
- SUB $16, R12, R12
- MOVW R12, 96(R13)
- BHS poly1305_blocks_armv6_mainloop
-
-poly1305_blocks_armv6_done:
- MOVW 88(R13), R12
- MOVW R5, 20(R12)
- MOVW R6, 24(R12)
- MOVW R7, 28(R12)
- MOVW R8, 32(R12)
- MOVW R9, 36(R12)
- ADD $48, R13, R0
- MOVM.DA (R0), [R4-R8, R14]
- RET
-
-#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \
- MOVBU.P 1(Rsrc), Rtmp; \
- MOVBU.P Rtmp, 1(Rdst); \
- MOVBU.P 1(Rsrc), Rtmp; \
- MOVBU.P Rtmp, 1(Rdst)
-
-#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \
- MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \
- MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp)
-
-// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key)
-TEXT ·poly1305_auth_armv6(SB), $196-16
- // The value 196, just above, is the sum of 64 (the size of the context
- // structure) and 132 (the amount of stack needed).
- //
- // At this point, the stack pointer (R13) has been moved down. It
- // points to the saved link register and there's 196 bytes of free
- // space above it.
- //
- // The stack for this function looks like:
- //
- // +---------------------
- // |
- // | 64 bytes of context structure
- // |
- // +---------------------
- // |
- // | 112 bytes for poly1305_blocks_armv6
- // |
- // +---------------------
- // | 16 bytes of final block, constructed at
- // | poly1305_finish_ext_armv6_skip8
- // +---------------------
- // | four bytes of saved 'g'
- // +---------------------
- // | lr, saved by prelude <- R13 points here
- // +---------------------
- MOVW g, 4(R13)
-
- MOVW out+0(FP), R4
- MOVW m+4(FP), R5
- MOVW mlen+8(FP), R6
- MOVW key+12(FP), R7
-
- ADD $136, R13, R0 // 136 = 4 + 4 + 16 + 112
- MOVW R7, R1
-
- // poly1305_init_ext_armv6 will write to the stack from R13+4, but
- // that's ok because none of the other values have been written yet.
- BL poly1305_init_ext_armv6<>(SB)
- BIC.S $15, R6, R2
- BEQ poly1305_auth_armv6_noblocks
- ADD $136, R13, R0
- MOVW R5, R1
- ADD R2, R5, R5
- SUB R2, R6, R6
- BL poly1305_blocks_armv6<>(SB)
-
-poly1305_auth_armv6_noblocks:
- ADD $136, R13, R0
- MOVW R5, R1
- MOVW R6, R2
- MOVW R4, R3
-
- MOVW R0, R5
- MOVW R1, R6
- MOVW R2, R7
- MOVW R3, R8
- AND.S R2, R2, R2
- BEQ poly1305_finish_ext_armv6_noremaining
- EOR R0, R0
- ADD $8, R13, R9 // 8 = offset to 16 byte scratch space
- MOVW R0, (R9)
- MOVW R0, 4(R9)
- MOVW R0, 8(R9)
- MOVW R0, 12(R9)
- WORD $0xe3110003 // TST R1, #3 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_aligned
- WORD $0xe3120008 // TST R2, #8 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip8
- MOVWP_UNALIGNED(R1, R9, g)
- MOVWP_UNALIGNED(R1, R9, g)
-
-poly1305_finish_ext_armv6_skip8:
- WORD $0xe3120004 // TST $4, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip4
- MOVWP_UNALIGNED(R1, R9, g)
-
-poly1305_finish_ext_armv6_skip4:
- WORD $0xe3120002 // TST $2, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip2
- MOVHUP_UNALIGNED(R1, R9, g)
- B poly1305_finish_ext_armv6_skip2
-
-poly1305_finish_ext_armv6_aligned:
- WORD $0xe3120008 // TST R2, #8 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip8_aligned
- MOVM.IA.W (R1), [g-R11]
- MOVM.IA.W [g-R11], (R9)
-
-poly1305_finish_ext_armv6_skip8_aligned:
- WORD $0xe3120004 // TST $4, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip4_aligned
- MOVW.P 4(R1), g
- MOVW.P g, 4(R9)
-
-poly1305_finish_ext_armv6_skip4_aligned:
- WORD $0xe3120002 // TST $2, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip2
- MOVHU.P 2(R1), g
- MOVH.P g, 2(R9)
-
-poly1305_finish_ext_armv6_skip2:
- WORD $0xe3120001 // TST $1, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip1
- MOVBU.P 1(R1), g
- MOVBU.P g, 1(R9)
-
-poly1305_finish_ext_armv6_skip1:
- MOVW $1, R11
- MOVBU R11, 0(R9)
- MOVW R11, 56(R5)
- MOVW R5, R0
- ADD $8, R13, R1
- MOVW $16, R2
- BL poly1305_blocks_armv6<>(SB)
-
-poly1305_finish_ext_armv6_noremaining:
- MOVW 20(R5), R0
- MOVW 24(R5), R1
- MOVW 28(R5), R2
- MOVW 32(R5), R3
- MOVW 36(R5), R4
- MOVW R4>>26, R12
- BIC $0xfc000000, R4, R4
- ADD R12<<2, R12, R12
- ADD R12, R0, R0
- MOVW R0>>26, R12
- BIC $0xfc000000, R0, R0
- ADD R12, R1, R1
- MOVW R1>>26, R12
- BIC $0xfc000000, R1, R1
- ADD R12, R2, R2
- MOVW R2>>26, R12
- BIC $0xfc000000, R2, R2
- ADD R12, R3, R3
- MOVW R3>>26, R12
- BIC $0xfc000000, R3, R3
- ADD R12, R4, R4
- ADD $5, R0, R6
- MOVW R6>>26, R12
- BIC $0xfc000000, R6, R6
- ADD R12, R1, R7
- MOVW R7>>26, R12
- BIC $0xfc000000, R7, R7
- ADD R12, R2, g
- MOVW g>>26, R12
- BIC $0xfc000000, g, g
- ADD R12, R3, R11
- MOVW $-(1<<26), R12
- ADD R11>>26, R12, R12
- BIC $0xfc000000, R11, R11
- ADD R12, R4, R9
- MOVW R9>>31, R12
- SUB $1, R12
- AND R12, R6, R6
- AND R12, R7, R7
- AND R12, g, g
- AND R12, R11, R11
- AND R12, R9, R9
- MVN R12, R12
- AND R12, R0, R0
- AND R12, R1, R1
- AND R12, R2, R2
- AND R12, R3, R3
- AND R12, R4, R4
- ORR R6, R0, R0
- ORR R7, R1, R1
- ORR g, R2, R2
- ORR R11, R3, R3
- ORR R9, R4, R4
- ORR R1<<26, R0, R0
- MOVW R1>>6, R1
- ORR R2<<20, R1, R1
- MOVW R2>>12, R2
- ORR R3<<14, R2, R2
- MOVW R3>>18, R3
- ORR R4<<8, R3, R3
- MOVW 40(R5), R6
- MOVW 44(R5), R7
- MOVW 48(R5), g
- MOVW 52(R5), R11
- ADD.S R6, R0, R0
- ADC.S R7, R1, R1
- ADC.S g, R2, R2
- ADC.S R11, R3, R3
- MOVM.IA [R0-R3], (R8)
- MOVW R5, R12
- EOR R0, R0, R0
- EOR R1, R1, R1
- EOR R2, R2, R2
- EOR R3, R3, R3
- EOR R4, R4, R4
- EOR R5, R5, R5
- EOR R6, R6, R6
- EOR R7, R7, R7
- MOVM.IA.W [R0-R7], (R12)
- MOVM.IA [R0-R7], (R12)
- MOVW 4(R13), g
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_ref.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_ref.go
deleted file mode 100644
index b2805a5ca..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/poly1305/sum_ref.go
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !amd64,!arm gccgo appengine nacl
-
-package poly1305
-
-import "encoding/binary"
-
-// Sum generates an authenticator for msg using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) {
- var (
- h0, h1, h2, h3, h4 uint32 // the hash accumulators
- r0, r1, r2, r3, r4 uint64 // the r part of the key
- )
-
- r0 = uint64(binary.LittleEndian.Uint32(key[0:]) & 0x3ffffff)
- r1 = uint64((binary.LittleEndian.Uint32(key[3:]) >> 2) & 0x3ffff03)
- r2 = uint64((binary.LittleEndian.Uint32(key[6:]) >> 4) & 0x3ffc0ff)
- r3 = uint64((binary.LittleEndian.Uint32(key[9:]) >> 6) & 0x3f03fff)
- r4 = uint64((binary.LittleEndian.Uint32(key[12:]) >> 8) & 0x00fffff)
-
- R1, R2, R3, R4 := r1*5, r2*5, r3*5, r4*5
-
- for len(msg) >= TagSize {
- // h += msg
- h0 += binary.LittleEndian.Uint32(msg[0:]) & 0x3ffffff
- h1 += (binary.LittleEndian.Uint32(msg[3:]) >> 2) & 0x3ffffff
- h2 += (binary.LittleEndian.Uint32(msg[6:]) >> 4) & 0x3ffffff
- h3 += (binary.LittleEndian.Uint32(msg[9:]) >> 6) & 0x3ffffff
- h4 += (binary.LittleEndian.Uint32(msg[12:]) >> 8) | (1 << 24)
-
- // h *= r
- d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1)
- d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2)
- d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3)
- d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4)
- d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0)
-
- // h %= p
- h0 = uint32(d0) & 0x3ffffff
- h1 = uint32(d1) & 0x3ffffff
- h2 = uint32(d2) & 0x3ffffff
- h3 = uint32(d3) & 0x3ffffff
- h4 = uint32(d4) & 0x3ffffff
-
- h0 += uint32(d4>>26) * 5
- h1 += h0 >> 26
- h0 = h0 & 0x3ffffff
-
- msg = msg[TagSize:]
- }
-
- if len(msg) > 0 {
- var block [TagSize]byte
- off := copy(block[:], msg)
- block[off] = 0x01
-
- // h += msg
- h0 += binary.LittleEndian.Uint32(block[0:]) & 0x3ffffff
- h1 += (binary.LittleEndian.Uint32(block[3:]) >> 2) & 0x3ffffff
- h2 += (binary.LittleEndian.Uint32(block[6:]) >> 4) & 0x3ffffff
- h3 += (binary.LittleEndian.Uint32(block[9:]) >> 6) & 0x3ffffff
- h4 += (binary.LittleEndian.Uint32(block[12:]) >> 8)
-
- // h *= r
- d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1)
- d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2)
- d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3)
- d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4)
- d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0)
-
- // h %= p
- h0 = uint32(d0) & 0x3ffffff
- h1 = uint32(d1) & 0x3ffffff
- h2 = uint32(d2) & 0x3ffffff
- h3 = uint32(d3) & 0x3ffffff
- h4 = uint32(d4) & 0x3ffffff
-
- h0 += uint32(d4>>26) * 5
- h1 += h0 >> 26
- h0 = h0 & 0x3ffffff
- }
-
- // h %= p reduction
- h2 += h1 >> 26
- h1 &= 0x3ffffff
- h3 += h2 >> 26
- h2 &= 0x3ffffff
- h4 += h3 >> 26
- h3 &= 0x3ffffff
- h0 += 5 * (h4 >> 26)
- h4 &= 0x3ffffff
- h1 += h0 >> 26
- h0 &= 0x3ffffff
-
- // h - p
- t0 := h0 + 5
- t1 := h1 + (t0 >> 26)
- t2 := h2 + (t1 >> 26)
- t3 := h3 + (t2 >> 26)
- t4 := h4 + (t3 >> 26) - (1 << 26)
- t0 &= 0x3ffffff
- t1 &= 0x3ffffff
- t2 &= 0x3ffffff
- t3 &= 0x3ffffff
-
- // select h if h < p else h - p
- t_mask := (t4 >> 31) - 1
- h_mask := ^t_mask
- h0 = (h0 & h_mask) | (t0 & t_mask)
- h1 = (h1 & h_mask) | (t1 & t_mask)
- h2 = (h2 & h_mask) | (t2 & t_mask)
- h3 = (h3 & h_mask) | (t3 & t_mask)
- h4 = (h4 & h_mask) | (t4 & t_mask)
-
- // h %= 2^128
- h0 |= h1 << 26
- h1 = ((h1 >> 6) | (h2 << 20))
- h2 = ((h2 >> 12) | (h3 << 14))
- h3 = ((h3 >> 18) | (h4 << 8))
-
- // s: the s part of the key
- // tag = (h + s) % (2^128)
- t := uint64(h0) + uint64(binary.LittleEndian.Uint32(key[16:]))
- h0 = uint32(t)
- t = uint64(h1) + uint64(binary.LittleEndian.Uint32(key[20:])) + (t >> 32)
- h1 = uint32(t)
- t = uint64(h2) + uint64(binary.LittleEndian.Uint32(key[24:])) + (t >> 32)
- h2 = uint32(t)
- t = uint64(h3) + uint64(binary.LittleEndian.Uint32(key[28:])) + (t >> 32)
- h3 = uint32(t)
-
- binary.LittleEndian.PutUint32(out[0:], h0)
- binary.LittleEndian.PutUint32(out[4:], h1)
- binary.LittleEndian.PutUint32(out[8:], h2)
- binary.LittleEndian.PutUint32(out[12:], h3)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160.go
deleted file mode 100644
index 6c6e84236..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package ripemd160 implements the RIPEMD-160 hash algorithm.
-package ripemd160 // import "golang.org/x/crypto/ripemd160"
-
-// RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart
-// Preneel with specifications available at:
-// http://homes.esat.kuleuven.be/~cosicart/pdf/AB-9601/AB-9601.pdf.
-
-import (
- "crypto"
- "hash"
-)
-
-func init() {
- crypto.RegisterHash(crypto.RIPEMD160, New)
-}
-
-// The size of the checksum in bytes.
-const Size = 20
-
-// The block size of the hash algorithm in bytes.
-const BlockSize = 64
-
-const (
- _s0 = 0x67452301
- _s1 = 0xefcdab89
- _s2 = 0x98badcfe
- _s3 = 0x10325476
- _s4 = 0xc3d2e1f0
-)
-
-// digest represents the partial evaluation of a checksum.
-type digest struct {
- s [5]uint32 // running context
- x [BlockSize]byte // temporary buffer
- nx int // index into x
- tc uint64 // total count of bytes processed
-}
-
-func (d *digest) Reset() {
- d.s[0], d.s[1], d.s[2], d.s[3], d.s[4] = _s0, _s1, _s2, _s3, _s4
- d.nx = 0
- d.tc = 0
-}
-
-// New returns a new hash.Hash computing the checksum.
-func New() hash.Hash {
- result := new(digest)
- result.Reset()
- return result
-}
-
-func (d *digest) Size() int { return Size }
-
-func (d *digest) BlockSize() int { return BlockSize }
-
-func (d *digest) Write(p []byte) (nn int, err error) {
- nn = len(p)
- d.tc += uint64(nn)
- if d.nx > 0 {
- n := len(p)
- if n > BlockSize-d.nx {
- n = BlockSize - d.nx
- }
- for i := 0; i < n; i++ {
- d.x[d.nx+i] = p[i]
- }
- d.nx += n
- if d.nx == BlockSize {
- _Block(d, d.x[0:])
- d.nx = 0
- }
- p = p[n:]
- }
- n := _Block(d, p)
- p = p[n:]
- if len(p) > 0 {
- d.nx = copy(d.x[:], p)
- }
- return
-}
-
-func (d0 *digest) Sum(in []byte) []byte {
- // Make a copy of d0 so that caller can keep writing and summing.
- d := *d0
-
- // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
- tc := d.tc
- var tmp [64]byte
- tmp[0] = 0x80
- if tc%64 < 56 {
- d.Write(tmp[0 : 56-tc%64])
- } else {
- d.Write(tmp[0 : 64+56-tc%64])
- }
-
- // Length in bits.
- tc <<= 3
- for i := uint(0); i < 8; i++ {
- tmp[i] = byte(tc >> (8 * i))
- }
- d.Write(tmp[0:8])
-
- if d.nx != 0 {
- panic("d.nx != 0")
- }
-
- var digest [Size]byte
- for i, s := range d.s {
- digest[i*4] = byte(s)
- digest[i*4+1] = byte(s >> 8)
- digest[i*4+2] = byte(s >> 16)
- digest[i*4+3] = byte(s >> 24)
- }
-
- return append(in, digest[:]...)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160_test.go
deleted file mode 100644
index 5df1b2593..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2010 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 file.
-
-package ripemd160
-
-// Test vectors are from:
-// http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
-
-import (
- "fmt"
- "io"
- "testing"
-)
-
-type mdTest struct {
- out string
- in string
-}
-
-var vectors = [...]mdTest{
- {"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
- {"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
- {"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
- {"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
- {"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
- {"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- {"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- {"9b752e45573d4b39f4dbd3323cab82bf63326bfb", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
-}
-
-func TestVectors(t *testing.T) {
- for i := 0; i < len(vectors); i++ {
- tv := vectors[i]
- md := New()
- for j := 0; j < 3; j++ {
- if j < 2 {
- io.WriteString(md, tv.in)
- } else {
- io.WriteString(md, tv.in[0:len(tv.in)/2])
- md.Sum(nil)
- io.WriteString(md, tv.in[len(tv.in)/2:])
- }
- s := fmt.Sprintf("%x", md.Sum(nil))
- if s != tv.out {
- t.Fatalf("RIPEMD-160[%d](%s) = %s, expected %s", j, tv.in, s, tv.out)
- }
- md.Reset()
- }
- }
-}
-
-func TestMillionA(t *testing.T) {
- md := New()
- for i := 0; i < 100000; i++ {
- io.WriteString(md, "aaaaaaaaaa")
- }
- out := "52783243c1697bdbe16d37f97f68f08325dc1528"
- s := fmt.Sprintf("%x", md.Sum(nil))
- if s != out {
- t.Fatalf("RIPEMD-160 (1 million 'a') = %s, expected %s", s, out)
- }
- md.Reset()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go
deleted file mode 100644
index 7bc8e6c48..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2010 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 file.
-
-// RIPEMD-160 block step.
-// In its own file so that a faster assembly or C version
-// can be substituted easily.
-
-package ripemd160
-
-// work buffer indices and roll amounts for one line
-var _n = [80]uint{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
- 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
- 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
- 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13,
-}
-
-var _r = [80]uint{
- 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
- 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
- 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
- 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
- 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6,
-}
-
-// same for the other parallel one
-var n_ = [80]uint{
- 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
- 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
- 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
- 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
- 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11,
-}
-
-var r_ = [80]uint{
- 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
- 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
- 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
- 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
- 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11,
-}
-
-func _Block(md *digest, p []byte) int {
- n := 0
- var x [16]uint32
- var alpha, beta uint32
- for len(p) >= BlockSize {
- a, b, c, d, e := md.s[0], md.s[1], md.s[2], md.s[3], md.s[4]
- aa, bb, cc, dd, ee := a, b, c, d, e
- j := 0
- for i := 0; i < 16; i++ {
- x[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24
- j += 4
- }
-
- // round 1
- i := 0
- for i < 16 {
- alpha = a + (b ^ c ^ d) + x[_n[i]]
- s := _r[i]
- alpha = (alpha<<s | alpha>>(32-s)) + e
- beta = c<<10 | c>>22
- a, b, c, d, e = e, alpha, b, beta, d
-
- // parallel line
- alpha = aa + (bb ^ (cc | ^dd)) + x[n_[i]] + 0x50a28be6
- s = r_[i]
- alpha = (alpha<<s | alpha>>(32-s)) + ee
- beta = cc<<10 | cc>>22
- aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
-
- i++
- }
-
- // round 2
- for i < 32 {
- alpha = a + (b&c | ^b&d) + x[_n[i]] + 0x5a827999
- s := _r[i]
- alpha = (alpha<<s | alpha>>(32-s)) + e
- beta = c<<10 | c>>22
- a, b, c, d, e = e, alpha, b, beta, d
-
- // parallel line
- alpha = aa + (bb&dd | cc&^dd) + x[n_[i]] + 0x5c4dd124
- s = r_[i]
- alpha = (alpha<<s | alpha>>(32-s)) + ee
- beta = cc<<10 | cc>>22
- aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
-
- i++
- }
-
- // round 3
- for i < 48 {
- alpha = a + (b | ^c ^ d) + x[_n[i]] + 0x6ed9eba1
- s := _r[i]
- alpha = (alpha<<s | alpha>>(32-s)) + e
- beta = c<<10 | c>>22
- a, b, c, d, e = e, alpha, b, beta, d
-
- // parallel line
- alpha = aa + (bb | ^cc ^ dd) + x[n_[i]] + 0x6d703ef3
- s = r_[i]
- alpha = (alpha<<s | alpha>>(32-s)) + ee
- beta = cc<<10 | cc>>22
- aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
-
- i++
- }
-
- // round 4
- for i < 64 {
- alpha = a + (b&d | c&^d) + x[_n[i]] + 0x8f1bbcdc
- s := _r[i]
- alpha = (alpha<<s | alpha>>(32-s)) + e
- beta = c<<10 | c>>22
- a, b, c, d, e = e, alpha, b, beta, d
-
- // parallel line
- alpha = aa + (bb&cc | ^bb&dd) + x[n_[i]] + 0x7a6d76e9
- s = r_[i]
- alpha = (alpha<<s | alpha>>(32-s)) + ee
- beta = cc<<10 | cc>>22
- aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
-
- i++
- }
-
- // round 5
- for i < 80 {
- alpha = a + (b ^ (c | ^d)) + x[_n[i]] + 0xa953fd4e
- s := _r[i]
- alpha = (alpha<<s | alpha>>(32-s)) + e
- beta = c<<10 | c>>22
- a, b, c, d, e = e, alpha, b, beta, d
-
- // parallel line
- alpha = aa + (bb ^ cc ^ dd) + x[n_[i]]
- s = r_[i]
- alpha = (alpha<<s | alpha>>(32-s)) + ee
- beta = cc<<10 | cc>>22
- aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
-
- i++
- }
-
- // combine results
- dd += c + md.s[1]
- md.s[1] = md.s[2] + d + ee
- md.s[2] = md.s[3] + e + aa
- md.s[3] = md.s[4] + a + bb
- md.s[4] = md.s[0] + b + cc
- md.s[0] = dd
-
- p = p[BlockSize:]
- n += BlockSize
- }
- return n
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go
deleted file mode 100644
index 4c96147c8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package salsa provides low-level access to functions in the Salsa family.
-package salsa // import "golang.org/x/crypto/salsa20/salsa"
-
-// Sigma is the Salsa20 constant for 256-bit keys.
-var Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'}
-
-// HSalsa20 applies the HSalsa20 core function to a 16-byte input in, 32-byte
-// key k, and 16-byte constant c, and puts the result into the 32-byte array
-// out.
-func HSalsa20(out *[32]byte, in *[16]byte, k *[32]byte, c *[16]byte) {
- x0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24
- x1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24
- x2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24
- x3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24
- x4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24
- x5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24
- x6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24
- x7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24
- x8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24
- x9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24
- x10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24
- x11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24
- x12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24
- x13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24
- x14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24
- x15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24
-
- for i := 0; i < 20; i += 2 {
- u := x0 + x12
- x4 ^= u<<7 | u>>(32-7)
- u = x4 + x0
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x4
- x12 ^= u<<13 | u>>(32-13)
- u = x12 + x8
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x1
- x9 ^= u<<7 | u>>(32-7)
- u = x9 + x5
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x9
- x1 ^= u<<13 | u>>(32-13)
- u = x1 + x13
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x6
- x14 ^= u<<7 | u>>(32-7)
- u = x14 + x10
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x14
- x6 ^= u<<13 | u>>(32-13)
- u = x6 + x2
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x11
- x3 ^= u<<7 | u>>(32-7)
- u = x3 + x15
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x3
- x11 ^= u<<13 | u>>(32-13)
- u = x11 + x7
- x15 ^= u<<18 | u>>(32-18)
-
- u = x0 + x3
- x1 ^= u<<7 | u>>(32-7)
- u = x1 + x0
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x1
- x3 ^= u<<13 | u>>(32-13)
- u = x3 + x2
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x4
- x6 ^= u<<7 | u>>(32-7)
- u = x6 + x5
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x6
- x4 ^= u<<13 | u>>(32-13)
- u = x4 + x7
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x9
- x11 ^= u<<7 | u>>(32-7)
- u = x11 + x10
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x11
- x9 ^= u<<13 | u>>(32-13)
- u = x9 + x8
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x14
- x12 ^= u<<7 | u>>(32-7)
- u = x12 + x15
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x12
- x14 ^= u<<13 | u>>(32-13)
- u = x14 + x13
- x15 ^= u<<18 | u>>(32-18)
- }
- out[0] = byte(x0)
- out[1] = byte(x0 >> 8)
- out[2] = byte(x0 >> 16)
- out[3] = byte(x0 >> 24)
-
- out[4] = byte(x5)
- out[5] = byte(x5 >> 8)
- out[6] = byte(x5 >> 16)
- out[7] = byte(x5 >> 24)
-
- out[8] = byte(x10)
- out[9] = byte(x10 >> 8)
- out[10] = byte(x10 >> 16)
- out[11] = byte(x10 >> 24)
-
- out[12] = byte(x15)
- out[13] = byte(x15 >> 8)
- out[14] = byte(x15 >> 16)
- out[15] = byte(x15 >> 24)
-
- out[16] = byte(x6)
- out[17] = byte(x6 >> 8)
- out[18] = byte(x6 >> 16)
- out[19] = byte(x6 >> 24)
-
- out[20] = byte(x7)
- out[21] = byte(x7 >> 8)
- out[22] = byte(x7 >> 16)
- out[23] = byte(x7 >> 24)
-
- out[24] = byte(x8)
- out[25] = byte(x8 >> 8)
- out[26] = byte(x8 >> 16)
- out[27] = byte(x8 >> 24)
-
- out[28] = byte(x9)
- out[29] = byte(x9 >> 8)
- out[30] = byte(x9 >> 16)
- out[31] = byte(x9 >> 24)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s
deleted file mode 100644
index 22afbdcad..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s
+++ /dev/null
@@ -1,889 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!appengine,!gccgo
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
-// This needs up to 64 bytes at 360(SP); hence the non-obvious frame size.
-TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
- MOVQ out+0(FP),DI
- MOVQ in+8(FP),SI
- MOVQ n+16(FP),DX
- MOVQ nonce+24(FP),CX
- MOVQ key+32(FP),R8
-
- MOVQ SP,R12
- MOVQ SP,R9
- ADDQ $31, R9
- ANDQ $~31, R9
- MOVQ R9, SP
-
- MOVQ DX,R9
- MOVQ CX,DX
- MOVQ R8,R10
- CMPQ R9,$0
- JBE DONE
- START:
- MOVL 20(R10),CX
- MOVL 0(R10),R8
- MOVL 0(DX),AX
- MOVL 16(R10),R11
- MOVL CX,0(SP)
- MOVL R8, 4 (SP)
- MOVL AX, 8 (SP)
- MOVL R11, 12 (SP)
- MOVL 8(DX),CX
- MOVL 24(R10),R8
- MOVL 4(R10),AX
- MOVL 4(DX),R11
- MOVL CX,16(SP)
- MOVL R8, 20 (SP)
- MOVL AX, 24 (SP)
- MOVL R11, 28 (SP)
- MOVL 12(DX),CX
- MOVL 12(R10),DX
- MOVL 28(R10),R8
- MOVL 8(R10),AX
- MOVL DX,32(SP)
- MOVL CX, 36 (SP)
- MOVL R8, 40 (SP)
- MOVL AX, 44 (SP)
- MOVQ $1634760805,DX
- MOVQ $857760878,CX
- MOVQ $2036477234,R8
- MOVQ $1797285236,AX
- MOVL DX,48(SP)
- MOVL CX, 52 (SP)
- MOVL R8, 56 (SP)
- MOVL AX, 60 (SP)
- CMPQ R9,$256
- JB BYTESBETWEEN1AND255
- MOVOA 48(SP),X0
- PSHUFL $0X55,X0,X1
- PSHUFL $0XAA,X0,X2
- PSHUFL $0XFF,X0,X3
- PSHUFL $0X00,X0,X0
- MOVOA X1,64(SP)
- MOVOA X2,80(SP)
- MOVOA X3,96(SP)
- MOVOA X0,112(SP)
- MOVOA 0(SP),X0
- PSHUFL $0XAA,X0,X1
- PSHUFL $0XFF,X0,X2
- PSHUFL $0X00,X0,X3
- PSHUFL $0X55,X0,X0
- MOVOA X1,128(SP)
- MOVOA X2,144(SP)
- MOVOA X3,160(SP)
- MOVOA X0,176(SP)
- MOVOA 16(SP),X0
- PSHUFL $0XFF,X0,X1
- PSHUFL $0X55,X0,X2
- PSHUFL $0XAA,X0,X0
- MOVOA X1,192(SP)
- MOVOA X2,208(SP)
- MOVOA X0,224(SP)
- MOVOA 32(SP),X0
- PSHUFL $0X00,X0,X1
- PSHUFL $0XAA,X0,X2
- PSHUFL $0XFF,X0,X0
- MOVOA X1,240(SP)
- MOVOA X2,256(SP)
- MOVOA X0,272(SP)
- BYTESATLEAST256:
- MOVL 16(SP),DX
- MOVL 36 (SP),CX
- MOVL DX,288(SP)
- MOVL CX,304(SP)
- ADDQ $1,DX
- SHLQ $32,CX
- ADDQ CX,DX
- MOVQ DX,CX
- SHRQ $32,CX
- MOVL DX, 292 (SP)
- MOVL CX, 308 (SP)
- ADDQ $1,DX
- SHLQ $32,CX
- ADDQ CX,DX
- MOVQ DX,CX
- SHRQ $32,CX
- MOVL DX, 296 (SP)
- MOVL CX, 312 (SP)
- ADDQ $1,DX
- SHLQ $32,CX
- ADDQ CX,DX
- MOVQ DX,CX
- SHRQ $32,CX
- MOVL DX, 300 (SP)
- MOVL CX, 316 (SP)
- ADDQ $1,DX
- SHLQ $32,CX
- ADDQ CX,DX
- MOVQ DX,CX
- SHRQ $32,CX
- MOVL DX,16(SP)
- MOVL CX, 36 (SP)
- MOVQ R9,352(SP)
- MOVQ $20,DX
- MOVOA 64(SP),X0
- MOVOA 80(SP),X1
- MOVOA 96(SP),X2
- MOVOA 256(SP),X3
- MOVOA 272(SP),X4
- MOVOA 128(SP),X5
- MOVOA 144(SP),X6
- MOVOA 176(SP),X7
- MOVOA 192(SP),X8
- MOVOA 208(SP),X9
- MOVOA 224(SP),X10
- MOVOA 304(SP),X11
- MOVOA 112(SP),X12
- MOVOA 160(SP),X13
- MOVOA 240(SP),X14
- MOVOA 288(SP),X15
- MAINLOOP1:
- MOVOA X1,320(SP)
- MOVOA X2,336(SP)
- MOVOA X13,X1
- PADDL X12,X1
- MOVOA X1,X2
- PSLLL $7,X1
- PXOR X1,X14
- PSRLL $25,X2
- PXOR X2,X14
- MOVOA X7,X1
- PADDL X0,X1
- MOVOA X1,X2
- PSLLL $7,X1
- PXOR X1,X11
- PSRLL $25,X2
- PXOR X2,X11
- MOVOA X12,X1
- PADDL X14,X1
- MOVOA X1,X2
- PSLLL $9,X1
- PXOR X1,X15
- PSRLL $23,X2
- PXOR X2,X15
- MOVOA X0,X1
- PADDL X11,X1
- MOVOA X1,X2
- PSLLL $9,X1
- PXOR X1,X9
- PSRLL $23,X2
- PXOR X2,X9
- MOVOA X14,X1
- PADDL X15,X1
- MOVOA X1,X2
- PSLLL $13,X1
- PXOR X1,X13
- PSRLL $19,X2
- PXOR X2,X13
- MOVOA X11,X1
- PADDL X9,X1
- MOVOA X1,X2
- PSLLL $13,X1
- PXOR X1,X7
- PSRLL $19,X2
- PXOR X2,X7
- MOVOA X15,X1
- PADDL X13,X1
- MOVOA X1,X2
- PSLLL $18,X1
- PXOR X1,X12
- PSRLL $14,X2
- PXOR X2,X12
- MOVOA 320(SP),X1
- MOVOA X12,320(SP)
- MOVOA X9,X2
- PADDL X7,X2
- MOVOA X2,X12
- PSLLL $18,X2
- PXOR X2,X0
- PSRLL $14,X12
- PXOR X12,X0
- MOVOA X5,X2
- PADDL X1,X2
- MOVOA X2,X12
- PSLLL $7,X2
- PXOR X2,X3
- PSRLL $25,X12
- PXOR X12,X3
- MOVOA 336(SP),X2
- MOVOA X0,336(SP)
- MOVOA X6,X0
- PADDL X2,X0
- MOVOA X0,X12
- PSLLL $7,X0
- PXOR X0,X4
- PSRLL $25,X12
- PXOR X12,X4
- MOVOA X1,X0
- PADDL X3,X0
- MOVOA X0,X12
- PSLLL $9,X0
- PXOR X0,X10
- PSRLL $23,X12
- PXOR X12,X10
- MOVOA X2,X0
- PADDL X4,X0
- MOVOA X0,X12
- PSLLL $9,X0
- PXOR X0,X8
- PSRLL $23,X12
- PXOR X12,X8
- MOVOA X3,X0
- PADDL X10,X0
- MOVOA X0,X12
- PSLLL $13,X0
- PXOR X0,X5
- PSRLL $19,X12
- PXOR X12,X5
- MOVOA X4,X0
- PADDL X8,X0
- MOVOA X0,X12
- PSLLL $13,X0
- PXOR X0,X6
- PSRLL $19,X12
- PXOR X12,X6
- MOVOA X10,X0
- PADDL X5,X0
- MOVOA X0,X12
- PSLLL $18,X0
- PXOR X0,X1
- PSRLL $14,X12
- PXOR X12,X1
- MOVOA 320(SP),X0
- MOVOA X1,320(SP)
- MOVOA X4,X1
- PADDL X0,X1
- MOVOA X1,X12
- PSLLL $7,X1
- PXOR X1,X7
- PSRLL $25,X12
- PXOR X12,X7
- MOVOA X8,X1
- PADDL X6,X1
- MOVOA X1,X12
- PSLLL $18,X1
- PXOR X1,X2
- PSRLL $14,X12
- PXOR X12,X2
- MOVOA 336(SP),X12
- MOVOA X2,336(SP)
- MOVOA X14,X1
- PADDL X12,X1
- MOVOA X1,X2
- PSLLL $7,X1
- PXOR X1,X5
- PSRLL $25,X2
- PXOR X2,X5
- MOVOA X0,X1
- PADDL X7,X1
- MOVOA X1,X2
- PSLLL $9,X1
- PXOR X1,X10
- PSRLL $23,X2
- PXOR X2,X10
- MOVOA X12,X1
- PADDL X5,X1
- MOVOA X1,X2
- PSLLL $9,X1
- PXOR X1,X8
- PSRLL $23,X2
- PXOR X2,X8
- MOVOA X7,X1
- PADDL X10,X1
- MOVOA X1,X2
- PSLLL $13,X1
- PXOR X1,X4
- PSRLL $19,X2
- PXOR X2,X4
- MOVOA X5,X1
- PADDL X8,X1
- MOVOA X1,X2
- PSLLL $13,X1
- PXOR X1,X14
- PSRLL $19,X2
- PXOR X2,X14
- MOVOA X10,X1
- PADDL X4,X1
- MOVOA X1,X2
- PSLLL $18,X1
- PXOR X1,X0
- PSRLL $14,X2
- PXOR X2,X0
- MOVOA 320(SP),X1
- MOVOA X0,320(SP)
- MOVOA X8,X0
- PADDL X14,X0
- MOVOA X0,X2
- PSLLL $18,X0
- PXOR X0,X12
- PSRLL $14,X2
- PXOR X2,X12
- MOVOA X11,X0
- PADDL X1,X0
- MOVOA X0,X2
- PSLLL $7,X0
- PXOR X0,X6
- PSRLL $25,X2
- PXOR X2,X6
- MOVOA 336(SP),X2
- MOVOA X12,336(SP)
- MOVOA X3,X0
- PADDL X2,X0
- MOVOA X0,X12
- PSLLL $7,X0
- PXOR X0,X13
- PSRLL $25,X12
- PXOR X12,X13
- MOVOA X1,X0
- PADDL X6,X0
- MOVOA X0,X12
- PSLLL $9,X0
- PXOR X0,X15
- PSRLL $23,X12
- PXOR X12,X15
- MOVOA X2,X0
- PADDL X13,X0
- MOVOA X0,X12
- PSLLL $9,X0
- PXOR X0,X9
- PSRLL $23,X12
- PXOR X12,X9
- MOVOA X6,X0
- PADDL X15,X0
- MOVOA X0,X12
- PSLLL $13,X0
- PXOR X0,X11
- PSRLL $19,X12
- PXOR X12,X11
- MOVOA X13,X0
- PADDL X9,X0
- MOVOA X0,X12
- PSLLL $13,X0
- PXOR X0,X3
- PSRLL $19,X12
- PXOR X12,X3
- MOVOA X15,X0
- PADDL X11,X0
- MOVOA X0,X12
- PSLLL $18,X0
- PXOR X0,X1
- PSRLL $14,X12
- PXOR X12,X1
- MOVOA X9,X0
- PADDL X3,X0
- MOVOA X0,X12
- PSLLL $18,X0
- PXOR X0,X2
- PSRLL $14,X12
- PXOR X12,X2
- MOVOA 320(SP),X12
- MOVOA 336(SP),X0
- SUBQ $2,DX
- JA MAINLOOP1
- PADDL 112(SP),X12
- PADDL 176(SP),X7
- PADDL 224(SP),X10
- PADDL 272(SP),X4
- MOVD X12,DX
- MOVD X7,CX
- MOVD X10,R8
- MOVD X4,R9
- PSHUFL $0X39,X12,X12
- PSHUFL $0X39,X7,X7
- PSHUFL $0X39,X10,X10
- PSHUFL $0X39,X4,X4
- XORL 0(SI),DX
- XORL 4(SI),CX
- XORL 8(SI),R8
- XORL 12(SI),R9
- MOVL DX,0(DI)
- MOVL CX,4(DI)
- MOVL R8,8(DI)
- MOVL R9,12(DI)
- MOVD X12,DX
- MOVD X7,CX
- MOVD X10,R8
- MOVD X4,R9
- PSHUFL $0X39,X12,X12
- PSHUFL $0X39,X7,X7
- PSHUFL $0X39,X10,X10
- PSHUFL $0X39,X4,X4
- XORL 64(SI),DX
- XORL 68(SI),CX
- XORL 72(SI),R8
- XORL 76(SI),R9
- MOVL DX,64(DI)
- MOVL CX,68(DI)
- MOVL R8,72(DI)
- MOVL R9,76(DI)
- MOVD X12,DX
- MOVD X7,CX
- MOVD X10,R8
- MOVD X4,R9
- PSHUFL $0X39,X12,X12
- PSHUFL $0X39,X7,X7
- PSHUFL $0X39,X10,X10
- PSHUFL $0X39,X4,X4
- XORL 128(SI),DX
- XORL 132(SI),CX
- XORL 136(SI),R8
- XORL 140(SI),R9
- MOVL DX,128(DI)
- MOVL CX,132(DI)
- MOVL R8,136(DI)
- MOVL R9,140(DI)
- MOVD X12,DX
- MOVD X7,CX
- MOVD X10,R8
- MOVD X4,R9
- XORL 192(SI),DX
- XORL 196(SI),CX
- XORL 200(SI),R8
- XORL 204(SI),R9
- MOVL DX,192(DI)
- MOVL CX,196(DI)
- MOVL R8,200(DI)
- MOVL R9,204(DI)
- PADDL 240(SP),X14
- PADDL 64(SP),X0
- PADDL 128(SP),X5
- PADDL 192(SP),X8
- MOVD X14,DX
- MOVD X0,CX
- MOVD X5,R8
- MOVD X8,R9
- PSHUFL $0X39,X14,X14
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X5,X5
- PSHUFL $0X39,X8,X8
- XORL 16(SI),DX
- XORL 20(SI),CX
- XORL 24(SI),R8
- XORL 28(SI),R9
- MOVL DX,16(DI)
- MOVL CX,20(DI)
- MOVL R8,24(DI)
- MOVL R9,28(DI)
- MOVD X14,DX
- MOVD X0,CX
- MOVD X5,R8
- MOVD X8,R9
- PSHUFL $0X39,X14,X14
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X5,X5
- PSHUFL $0X39,X8,X8
- XORL 80(SI),DX
- XORL 84(SI),CX
- XORL 88(SI),R8
- XORL 92(SI),R9
- MOVL DX,80(DI)
- MOVL CX,84(DI)
- MOVL R8,88(DI)
- MOVL R9,92(DI)
- MOVD X14,DX
- MOVD X0,CX
- MOVD X5,R8
- MOVD X8,R9
- PSHUFL $0X39,X14,X14
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X5,X5
- PSHUFL $0X39,X8,X8
- XORL 144(SI),DX
- XORL 148(SI),CX
- XORL 152(SI),R8
- XORL 156(SI),R9
- MOVL DX,144(DI)
- MOVL CX,148(DI)
- MOVL R8,152(DI)
- MOVL R9,156(DI)
- MOVD X14,DX
- MOVD X0,CX
- MOVD X5,R8
- MOVD X8,R9
- XORL 208(SI),DX
- XORL 212(SI),CX
- XORL 216(SI),R8
- XORL 220(SI),R9
- MOVL DX,208(DI)
- MOVL CX,212(DI)
- MOVL R8,216(DI)
- MOVL R9,220(DI)
- PADDL 288(SP),X15
- PADDL 304(SP),X11
- PADDL 80(SP),X1
- PADDL 144(SP),X6
- MOVD X15,DX
- MOVD X11,CX
- MOVD X1,R8
- MOVD X6,R9
- PSHUFL $0X39,X15,X15
- PSHUFL $0X39,X11,X11
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X6,X6
- XORL 32(SI),DX
- XORL 36(SI),CX
- XORL 40(SI),R8
- XORL 44(SI),R9
- MOVL DX,32(DI)
- MOVL CX,36(DI)
- MOVL R8,40(DI)
- MOVL R9,44(DI)
- MOVD X15,DX
- MOVD X11,CX
- MOVD X1,R8
- MOVD X6,R9
- PSHUFL $0X39,X15,X15
- PSHUFL $0X39,X11,X11
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X6,X6
- XORL 96(SI),DX
- XORL 100(SI),CX
- XORL 104(SI),R8
- XORL 108(SI),R9
- MOVL DX,96(DI)
- MOVL CX,100(DI)
- MOVL R8,104(DI)
- MOVL R9,108(DI)
- MOVD X15,DX
- MOVD X11,CX
- MOVD X1,R8
- MOVD X6,R9
- PSHUFL $0X39,X15,X15
- PSHUFL $0X39,X11,X11
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X6,X6
- XORL 160(SI),DX
- XORL 164(SI),CX
- XORL 168(SI),R8
- XORL 172(SI),R9
- MOVL DX,160(DI)
- MOVL CX,164(DI)
- MOVL R8,168(DI)
- MOVL R9,172(DI)
- MOVD X15,DX
- MOVD X11,CX
- MOVD X1,R8
- MOVD X6,R9
- XORL 224(SI),DX
- XORL 228(SI),CX
- XORL 232(SI),R8
- XORL 236(SI),R9
- MOVL DX,224(DI)
- MOVL CX,228(DI)
- MOVL R8,232(DI)
- MOVL R9,236(DI)
- PADDL 160(SP),X13
- PADDL 208(SP),X9
- PADDL 256(SP),X3
- PADDL 96(SP),X2
- MOVD X13,DX
- MOVD X9,CX
- MOVD X3,R8
- MOVD X2,R9
- PSHUFL $0X39,X13,X13
- PSHUFL $0X39,X9,X9
- PSHUFL $0X39,X3,X3
- PSHUFL $0X39,X2,X2
- XORL 48(SI),DX
- XORL 52(SI),CX
- XORL 56(SI),R8
- XORL 60(SI),R9
- MOVL DX,48(DI)
- MOVL CX,52(DI)
- MOVL R8,56(DI)
- MOVL R9,60(DI)
- MOVD X13,DX
- MOVD X9,CX
- MOVD X3,R8
- MOVD X2,R9
- PSHUFL $0X39,X13,X13
- PSHUFL $0X39,X9,X9
- PSHUFL $0X39,X3,X3
- PSHUFL $0X39,X2,X2
- XORL 112(SI),DX
- XORL 116(SI),CX
- XORL 120(SI),R8
- XORL 124(SI),R9
- MOVL DX,112(DI)
- MOVL CX,116(DI)
- MOVL R8,120(DI)
- MOVL R9,124(DI)
- MOVD X13,DX
- MOVD X9,CX
- MOVD X3,R8
- MOVD X2,R9
- PSHUFL $0X39,X13,X13
- PSHUFL $0X39,X9,X9
- PSHUFL $0X39,X3,X3
- PSHUFL $0X39,X2,X2
- XORL 176(SI),DX
- XORL 180(SI),CX
- XORL 184(SI),R8
- XORL 188(SI),R9
- MOVL DX,176(DI)
- MOVL CX,180(DI)
- MOVL R8,184(DI)
- MOVL R9,188(DI)
- MOVD X13,DX
- MOVD X9,CX
- MOVD X3,R8
- MOVD X2,R9
- XORL 240(SI),DX
- XORL 244(SI),CX
- XORL 248(SI),R8
- XORL 252(SI),R9
- MOVL DX,240(DI)
- MOVL CX,244(DI)
- MOVL R8,248(DI)
- MOVL R9,252(DI)
- MOVQ 352(SP),R9
- SUBQ $256,R9
- ADDQ $256,SI
- ADDQ $256,DI
- CMPQ R9,$256
- JAE BYTESATLEAST256
- CMPQ R9,$0
- JBE DONE
- BYTESBETWEEN1AND255:
- CMPQ R9,$64
- JAE NOCOPY
- MOVQ DI,DX
- LEAQ 360(SP),DI
- MOVQ R9,CX
- REP; MOVSB
- LEAQ 360(SP),DI
- LEAQ 360(SP),SI
- NOCOPY:
- MOVQ R9,352(SP)
- MOVOA 48(SP),X0
- MOVOA 0(SP),X1
- MOVOA 16(SP),X2
- MOVOA 32(SP),X3
- MOVOA X1,X4
- MOVQ $20,CX
- MAINLOOP2:
- PADDL X0,X4
- MOVOA X0,X5
- MOVOA X4,X6
- PSLLL $7,X4
- PSRLL $25,X6
- PXOR X4,X3
- PXOR X6,X3
- PADDL X3,X5
- MOVOA X3,X4
- MOVOA X5,X6
- PSLLL $9,X5
- PSRLL $23,X6
- PXOR X5,X2
- PSHUFL $0X93,X3,X3
- PXOR X6,X2
- PADDL X2,X4
- MOVOA X2,X5
- MOVOA X4,X6
- PSLLL $13,X4
- PSRLL $19,X6
- PXOR X4,X1
- PSHUFL $0X4E,X2,X2
- PXOR X6,X1
- PADDL X1,X5
- MOVOA X3,X4
- MOVOA X5,X6
- PSLLL $18,X5
- PSRLL $14,X6
- PXOR X5,X0
- PSHUFL $0X39,X1,X1
- PXOR X6,X0
- PADDL X0,X4
- MOVOA X0,X5
- MOVOA X4,X6
- PSLLL $7,X4
- PSRLL $25,X6
- PXOR X4,X1
- PXOR X6,X1
- PADDL X1,X5
- MOVOA X1,X4
- MOVOA X5,X6
- PSLLL $9,X5
- PSRLL $23,X6
- PXOR X5,X2
- PSHUFL $0X93,X1,X1
- PXOR X6,X2
- PADDL X2,X4
- MOVOA X2,X5
- MOVOA X4,X6
- PSLLL $13,X4
- PSRLL $19,X6
- PXOR X4,X3
- PSHUFL $0X4E,X2,X2
- PXOR X6,X3
- PADDL X3,X5
- MOVOA X1,X4
- MOVOA X5,X6
- PSLLL $18,X5
- PSRLL $14,X6
- PXOR X5,X0
- PSHUFL $0X39,X3,X3
- PXOR X6,X0
- PADDL X0,X4
- MOVOA X0,X5
- MOVOA X4,X6
- PSLLL $7,X4
- PSRLL $25,X6
- PXOR X4,X3
- PXOR X6,X3
- PADDL X3,X5
- MOVOA X3,X4
- MOVOA X5,X6
- PSLLL $9,X5
- PSRLL $23,X6
- PXOR X5,X2
- PSHUFL $0X93,X3,X3
- PXOR X6,X2
- PADDL X2,X4
- MOVOA X2,X5
- MOVOA X4,X6
- PSLLL $13,X4
- PSRLL $19,X6
- PXOR X4,X1
- PSHUFL $0X4E,X2,X2
- PXOR X6,X1
- PADDL X1,X5
- MOVOA X3,X4
- MOVOA X5,X6
- PSLLL $18,X5
- PSRLL $14,X6
- PXOR X5,X0
- PSHUFL $0X39,X1,X1
- PXOR X6,X0
- PADDL X0,X4
- MOVOA X0,X5
- MOVOA X4,X6
- PSLLL $7,X4
- PSRLL $25,X6
- PXOR X4,X1
- PXOR X6,X1
- PADDL X1,X5
- MOVOA X1,X4
- MOVOA X5,X6
- PSLLL $9,X5
- PSRLL $23,X6
- PXOR X5,X2
- PSHUFL $0X93,X1,X1
- PXOR X6,X2
- PADDL X2,X4
- MOVOA X2,X5
- MOVOA X4,X6
- PSLLL $13,X4
- PSRLL $19,X6
- PXOR X4,X3
- PSHUFL $0X4E,X2,X2
- PXOR X6,X3
- SUBQ $4,CX
- PADDL X3,X5
- MOVOA X1,X4
- MOVOA X5,X6
- PSLLL $18,X5
- PXOR X7,X7
- PSRLL $14,X6
- PXOR X5,X0
- PSHUFL $0X39,X3,X3
- PXOR X6,X0
- JA MAINLOOP2
- PADDL 48(SP),X0
- PADDL 0(SP),X1
- PADDL 16(SP),X2
- PADDL 32(SP),X3
- MOVD X0,CX
- MOVD X1,R8
- MOVD X2,R9
- MOVD X3,AX
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X2,X2
- PSHUFL $0X39,X3,X3
- XORL 0(SI),CX
- XORL 48(SI),R8
- XORL 32(SI),R9
- XORL 16(SI),AX
- MOVL CX,0(DI)
- MOVL R8,48(DI)
- MOVL R9,32(DI)
- MOVL AX,16(DI)
- MOVD X0,CX
- MOVD X1,R8
- MOVD X2,R9
- MOVD X3,AX
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X2,X2
- PSHUFL $0X39,X3,X3
- XORL 20(SI),CX
- XORL 4(SI),R8
- XORL 52(SI),R9
- XORL 36(SI),AX
- MOVL CX,20(DI)
- MOVL R8,4(DI)
- MOVL R9,52(DI)
- MOVL AX,36(DI)
- MOVD X0,CX
- MOVD X1,R8
- MOVD X2,R9
- MOVD X3,AX
- PSHUFL $0X39,X0,X0
- PSHUFL $0X39,X1,X1
- PSHUFL $0X39,X2,X2
- PSHUFL $0X39,X3,X3
- XORL 40(SI),CX
- XORL 24(SI),R8
- XORL 8(SI),R9
- XORL 56(SI),AX
- MOVL CX,40(DI)
- MOVL R8,24(DI)
- MOVL R9,8(DI)
- MOVL AX,56(DI)
- MOVD X0,CX
- MOVD X1,R8
- MOVD X2,R9
- MOVD X3,AX
- XORL 60(SI),CX
- XORL 44(SI),R8
- XORL 28(SI),R9
- XORL 12(SI),AX
- MOVL CX,60(DI)
- MOVL R8,44(DI)
- MOVL R9,28(DI)
- MOVL AX,12(DI)
- MOVQ 352(SP),R9
- MOVL 16(SP),CX
- MOVL 36 (SP),R8
- ADDQ $1,CX
- SHLQ $32,R8
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $32,R8
- MOVL CX,16(SP)
- MOVL R8, 36 (SP)
- CMPQ R9,$64
- JA BYTESATLEAST65
- JAE BYTESATLEAST64
- MOVQ DI,SI
- MOVQ DX,DI
- MOVQ R9,CX
- REP; MOVSB
- BYTESATLEAST64:
- DONE:
- MOVQ R12,SP
- RET
- BYTESATLEAST65:
- SUBQ $64,R9
- ADDQ $64,DI
- ADDQ $64,SI
- JMP BYTESBETWEEN1AND255
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go
deleted file mode 100644
index 9bfc0927c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2012 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 file.
-
-package salsa
-
-// Core208 applies the Salsa20/8 core function to the 64-byte array in and puts
-// the result into the 64-byte array out. The input and output may be the same array.
-func Core208(out *[64]byte, in *[64]byte) {
- j0 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24
- j1 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24
- j2 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24
- j3 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24
- j4 := uint32(in[16]) | uint32(in[17])<<8 | uint32(in[18])<<16 | uint32(in[19])<<24
- j5 := uint32(in[20]) | uint32(in[21])<<8 | uint32(in[22])<<16 | uint32(in[23])<<24
- j6 := uint32(in[24]) | uint32(in[25])<<8 | uint32(in[26])<<16 | uint32(in[27])<<24
- j7 := uint32(in[28]) | uint32(in[29])<<8 | uint32(in[30])<<16 | uint32(in[31])<<24
- j8 := uint32(in[32]) | uint32(in[33])<<8 | uint32(in[34])<<16 | uint32(in[35])<<24
- j9 := uint32(in[36]) | uint32(in[37])<<8 | uint32(in[38])<<16 | uint32(in[39])<<24
- j10 := uint32(in[40]) | uint32(in[41])<<8 | uint32(in[42])<<16 | uint32(in[43])<<24
- j11 := uint32(in[44]) | uint32(in[45])<<8 | uint32(in[46])<<16 | uint32(in[47])<<24
- j12 := uint32(in[48]) | uint32(in[49])<<8 | uint32(in[50])<<16 | uint32(in[51])<<24
- j13 := uint32(in[52]) | uint32(in[53])<<8 | uint32(in[54])<<16 | uint32(in[55])<<24
- j14 := uint32(in[56]) | uint32(in[57])<<8 | uint32(in[58])<<16 | uint32(in[59])<<24
- j15 := uint32(in[60]) | uint32(in[61])<<8 | uint32(in[62])<<16 | uint32(in[63])<<24
-
- x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8
- x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15
-
- for i := 0; i < 8; i += 2 {
- u := x0 + x12
- x4 ^= u<<7 | u>>(32-7)
- u = x4 + x0
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x4
- x12 ^= u<<13 | u>>(32-13)
- u = x12 + x8
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x1
- x9 ^= u<<7 | u>>(32-7)
- u = x9 + x5
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x9
- x1 ^= u<<13 | u>>(32-13)
- u = x1 + x13
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x6
- x14 ^= u<<7 | u>>(32-7)
- u = x14 + x10
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x14
- x6 ^= u<<13 | u>>(32-13)
- u = x6 + x2
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x11
- x3 ^= u<<7 | u>>(32-7)
- u = x3 + x15
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x3
- x11 ^= u<<13 | u>>(32-13)
- u = x11 + x7
- x15 ^= u<<18 | u>>(32-18)
-
- u = x0 + x3
- x1 ^= u<<7 | u>>(32-7)
- u = x1 + x0
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x1
- x3 ^= u<<13 | u>>(32-13)
- u = x3 + x2
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x4
- x6 ^= u<<7 | u>>(32-7)
- u = x6 + x5
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x6
- x4 ^= u<<13 | u>>(32-13)
- u = x4 + x7
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x9
- x11 ^= u<<7 | u>>(32-7)
- u = x11 + x10
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x11
- x9 ^= u<<13 | u>>(32-13)
- u = x9 + x8
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x14
- x12 ^= u<<7 | u>>(32-7)
- u = x12 + x15
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x12
- x14 ^= u<<13 | u>>(32-13)
- u = x14 + x13
- x15 ^= u<<18 | u>>(32-18)
- }
- x0 += j0
- x1 += j1
- x2 += j2
- x3 += j3
- x4 += j4
- x5 += j5
- x6 += j6
- x7 += j7
- x8 += j8
- x9 += j9
- x10 += j10
- x11 += j11
- x12 += j12
- x13 += j13
- x14 += j14
- x15 += j15
-
- out[0] = byte(x0)
- out[1] = byte(x0 >> 8)
- out[2] = byte(x0 >> 16)
- out[3] = byte(x0 >> 24)
-
- out[4] = byte(x1)
- out[5] = byte(x1 >> 8)
- out[6] = byte(x1 >> 16)
- out[7] = byte(x1 >> 24)
-
- out[8] = byte(x2)
- out[9] = byte(x2 >> 8)
- out[10] = byte(x2 >> 16)
- out[11] = byte(x2 >> 24)
-
- out[12] = byte(x3)
- out[13] = byte(x3 >> 8)
- out[14] = byte(x3 >> 16)
- out[15] = byte(x3 >> 24)
-
- out[16] = byte(x4)
- out[17] = byte(x4 >> 8)
- out[18] = byte(x4 >> 16)
- out[19] = byte(x4 >> 24)
-
- out[20] = byte(x5)
- out[21] = byte(x5 >> 8)
- out[22] = byte(x5 >> 16)
- out[23] = byte(x5 >> 24)
-
- out[24] = byte(x6)
- out[25] = byte(x6 >> 8)
- out[26] = byte(x6 >> 16)
- out[27] = byte(x6 >> 24)
-
- out[28] = byte(x7)
- out[29] = byte(x7 >> 8)
- out[30] = byte(x7 >> 16)
- out[31] = byte(x7 >> 24)
-
- out[32] = byte(x8)
- out[33] = byte(x8 >> 8)
- out[34] = byte(x8 >> 16)
- out[35] = byte(x8 >> 24)
-
- out[36] = byte(x9)
- out[37] = byte(x9 >> 8)
- out[38] = byte(x9 >> 16)
- out[39] = byte(x9 >> 24)
-
- out[40] = byte(x10)
- out[41] = byte(x10 >> 8)
- out[42] = byte(x10 >> 16)
- out[43] = byte(x10 >> 24)
-
- out[44] = byte(x11)
- out[45] = byte(x11 >> 8)
- out[46] = byte(x11 >> 16)
- out[47] = byte(x11 >> 24)
-
- out[48] = byte(x12)
- out[49] = byte(x12 >> 8)
- out[50] = byte(x12 >> 16)
- out[51] = byte(x12 >> 24)
-
- out[52] = byte(x13)
- out[53] = byte(x13 >> 8)
- out[54] = byte(x13 >> 16)
- out[55] = byte(x13 >> 24)
-
- out[56] = byte(x14)
- out[57] = byte(x14 >> 8)
- out[58] = byte(x14 >> 16)
- out[59] = byte(x14 >> 24)
-
- out[60] = byte(x15)
- out[61] = byte(x15 >> 8)
- out[62] = byte(x15 >> 16)
- out[63] = byte(x15 >> 24)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
deleted file mode 100644
index f9269c384..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build amd64,!appengine,!gccgo
-
-package salsa
-
-// This function is implemented in salsa2020_amd64.s.
-
-//go:noescape
-
-func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
-
-// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out must overlap entirely or not at all. Counter
-// contains the raw salsa20 counter bytes (both nonce and block counter).
-func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
- if len(in) == 0 {
- return
- }
- _ = out[len(in)-1]
- salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go
deleted file mode 100644
index 22126d17c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !amd64 appengine gccgo
-
-package salsa
-
-const rounds = 20
-
-// core applies the Salsa20 core function to 16-byte input in, 32-byte key k,
-// and 16-byte constant c, and puts the result into 64-byte array out.
-func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) {
- j0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24
- j1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24
- j2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24
- j3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24
- j4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24
- j5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24
- j6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24
- j7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24
- j8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24
- j9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24
- j10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24
- j11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24
- j12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24
- j13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24
- j14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24
- j15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24
-
- x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8
- x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15
-
- for i := 0; i < rounds; i += 2 {
- u := x0 + x12
- x4 ^= u<<7 | u>>(32-7)
- u = x4 + x0
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x4
- x12 ^= u<<13 | u>>(32-13)
- u = x12 + x8
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x1
- x9 ^= u<<7 | u>>(32-7)
- u = x9 + x5
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x9
- x1 ^= u<<13 | u>>(32-13)
- u = x1 + x13
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x6
- x14 ^= u<<7 | u>>(32-7)
- u = x14 + x10
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x14
- x6 ^= u<<13 | u>>(32-13)
- u = x6 + x2
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x11
- x3 ^= u<<7 | u>>(32-7)
- u = x3 + x15
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x3
- x11 ^= u<<13 | u>>(32-13)
- u = x11 + x7
- x15 ^= u<<18 | u>>(32-18)
-
- u = x0 + x3
- x1 ^= u<<7 | u>>(32-7)
- u = x1 + x0
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x1
- x3 ^= u<<13 | u>>(32-13)
- u = x3 + x2
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x4
- x6 ^= u<<7 | u>>(32-7)
- u = x6 + x5
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x6
- x4 ^= u<<13 | u>>(32-13)
- u = x4 + x7
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x9
- x11 ^= u<<7 | u>>(32-7)
- u = x11 + x10
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x11
- x9 ^= u<<13 | u>>(32-13)
- u = x9 + x8
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x14
- x12 ^= u<<7 | u>>(32-7)
- u = x12 + x15
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x12
- x14 ^= u<<13 | u>>(32-13)
- u = x14 + x13
- x15 ^= u<<18 | u>>(32-18)
- }
- x0 += j0
- x1 += j1
- x2 += j2
- x3 += j3
- x4 += j4
- x5 += j5
- x6 += j6
- x7 += j7
- x8 += j8
- x9 += j9
- x10 += j10
- x11 += j11
- x12 += j12
- x13 += j13
- x14 += j14
- x15 += j15
-
- out[0] = byte(x0)
- out[1] = byte(x0 >> 8)
- out[2] = byte(x0 >> 16)
- out[3] = byte(x0 >> 24)
-
- out[4] = byte(x1)
- out[5] = byte(x1 >> 8)
- out[6] = byte(x1 >> 16)
- out[7] = byte(x1 >> 24)
-
- out[8] = byte(x2)
- out[9] = byte(x2 >> 8)
- out[10] = byte(x2 >> 16)
- out[11] = byte(x2 >> 24)
-
- out[12] = byte(x3)
- out[13] = byte(x3 >> 8)
- out[14] = byte(x3 >> 16)
- out[15] = byte(x3 >> 24)
-
- out[16] = byte(x4)
- out[17] = byte(x4 >> 8)
- out[18] = byte(x4 >> 16)
- out[19] = byte(x4 >> 24)
-
- out[20] = byte(x5)
- out[21] = byte(x5 >> 8)
- out[22] = byte(x5 >> 16)
- out[23] = byte(x5 >> 24)
-
- out[24] = byte(x6)
- out[25] = byte(x6 >> 8)
- out[26] = byte(x6 >> 16)
- out[27] = byte(x6 >> 24)
-
- out[28] = byte(x7)
- out[29] = byte(x7 >> 8)
- out[30] = byte(x7 >> 16)
- out[31] = byte(x7 >> 24)
-
- out[32] = byte(x8)
- out[33] = byte(x8 >> 8)
- out[34] = byte(x8 >> 16)
- out[35] = byte(x8 >> 24)
-
- out[36] = byte(x9)
- out[37] = byte(x9 >> 8)
- out[38] = byte(x9 >> 16)
- out[39] = byte(x9 >> 24)
-
- out[40] = byte(x10)
- out[41] = byte(x10 >> 8)
- out[42] = byte(x10 >> 16)
- out[43] = byte(x10 >> 24)
-
- out[44] = byte(x11)
- out[45] = byte(x11 >> 8)
- out[46] = byte(x11 >> 16)
- out[47] = byte(x11 >> 24)
-
- out[48] = byte(x12)
- out[49] = byte(x12 >> 8)
- out[50] = byte(x12 >> 16)
- out[51] = byte(x12 >> 24)
-
- out[52] = byte(x13)
- out[53] = byte(x13 >> 8)
- out[54] = byte(x13 >> 16)
- out[55] = byte(x13 >> 24)
-
- out[56] = byte(x14)
- out[57] = byte(x14 >> 8)
- out[58] = byte(x14 >> 16)
- out[59] = byte(x14 >> 24)
-
- out[60] = byte(x15)
- out[61] = byte(x15 >> 8)
- out[62] = byte(x15 >> 16)
- out[63] = byte(x15 >> 24)
-}
-
-// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out must overlap entirely or not at all. Counter
-// contains the raw salsa20 counter bytes (both nonce and block counter).
-func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
- var block [64]byte
- var counterCopy [16]byte
- copy(counterCopy[:], counter[:])
-
- for len(in) >= 64 {
- core(&block, &counterCopy, key, &Sigma)
- for i, x := range block {
- out[i] = in[i] ^ x
- }
- u := uint32(1)
- for i := 8; i < 16; i++ {
- u += uint32(counterCopy[i])
- counterCopy[i] = byte(u)
- u >>= 8
- }
- in = in[64:]
- out = out[64:]
- }
-
- if len(in) > 0 {
- core(&block, &counterCopy, key, &Sigma)
- for i, v := range in {
- out[i] = v ^ block[i]
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go
deleted file mode 100644
index f67e94eba..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2012 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 file.
-
-package salsa
-
-import "testing"
-
-func TestCore208(t *testing.T) {
- in := [64]byte{
- 0x7e, 0x87, 0x9a, 0x21, 0x4f, 0x3e, 0xc9, 0x86,
- 0x7c, 0xa9, 0x40, 0xe6, 0x41, 0x71, 0x8f, 0x26,
- 0xba, 0xee, 0x55, 0x5b, 0x8c, 0x61, 0xc1, 0xb5,
- 0x0d, 0xf8, 0x46, 0x11, 0x6d, 0xcd, 0x3b, 0x1d,
- 0xee, 0x24, 0xf3, 0x19, 0xdf, 0x9b, 0x3d, 0x85,
- 0x14, 0x12, 0x1e, 0x4b, 0x5a, 0xc5, 0xaa, 0x32,
- 0x76, 0x02, 0x1d, 0x29, 0x09, 0xc7, 0x48, 0x29,
- 0xed, 0xeb, 0xc6, 0x8d, 0xb8, 0xb8, 0xc2, 0x5e}
-
- out := [64]byte{
- 0xa4, 0x1f, 0x85, 0x9c, 0x66, 0x08, 0xcc, 0x99,
- 0x3b, 0x81, 0xca, 0xcb, 0x02, 0x0c, 0xef, 0x05,
- 0x04, 0x4b, 0x21, 0x81, 0xa2, 0xfd, 0x33, 0x7d,
- 0xfd, 0x7b, 0x1c, 0x63, 0x96, 0x68, 0x2f, 0x29,
- 0xb4, 0x39, 0x31, 0x68, 0xe3, 0xc9, 0xe6, 0xbc,
- 0xfe, 0x6b, 0xc5, 0xb7, 0xa0, 0x6d, 0x96, 0xba,
- 0xe4, 0x24, 0xcc, 0x10, 0x2c, 0x91, 0x74, 0x5c,
- 0x24, 0xad, 0x67, 0x3d, 0xc7, 0x61, 0x8f, 0x81,
- }
-
- Core208(&in, &in)
- if in != out {
- t.Errorf("expected %x, got %x", out, in)
- }
-}
-
-func TestOutOfBoundsWrite(t *testing.T) {
- // encrypted "0123456789"
- cipherText := []byte{170, 166, 196, 104, 175, 121, 68, 44, 174, 51}
- var counter [16]byte
- var key [32]byte
- want := "abcdefghij"
- plainText := []byte(want)
- defer func() {
- err := recover()
- if err == nil {
- t.Error("XORKeyStream expected to panic on len(dst) < len(src), but didn't")
- }
- if plainText[3] == '3' {
- t.Errorf("XORKeyStream did out of bounds write, want %v, got %v", want, string(plainText))
- }
- }()
- XORKeyStream(plainText[:3], cipherText, &counter, &key)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20.go
deleted file mode 100644
index 0ee62485a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2012 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 file.
-
-/*
-Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
-
-Salsa20 differs from many other stream ciphers in that it is message orientated
-rather than byte orientated. Keystream blocks are not preserved between calls,
-therefore each side must encrypt/decrypt data with the same segmentation.
-
-Another aspect of this difference is that part of the counter is exposed as
-a nonce in each call. Encrypting two different messages with the same (key,
-nonce) pair leads to trivial plaintext recovery. This is analogous to
-encrypting two different messages with the same key with a traditional stream
-cipher.
-
-This package also implements XSalsa20: a version of Salsa20 with a 24-byte
-nonce as specified in https://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply
-passing a 24-byte slice as the nonce triggers XSalsa20.
-*/
-package salsa20 // import "golang.org/x/crypto/salsa20"
-
-// TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20.
-
-import (
- "golang.org/x/crypto/salsa20/salsa"
-)
-
-// XORKeyStream crypts bytes from in to out using the given key and nonce.
-// In and out must overlap entirely or not at all. Nonce must
-// be either 8 or 24 bytes long.
-func XORKeyStream(out, in []byte, nonce []byte, key *[32]byte) {
- if len(out) < len(in) {
- in = in[:len(out)]
- }
-
- var subNonce [16]byte
-
- if len(nonce) == 24 {
- var subKey [32]byte
- var hNonce [16]byte
- copy(hNonce[:], nonce[:16])
- salsa.HSalsa20(&subKey, &hNonce, key, &salsa.Sigma)
- copy(subNonce[:], nonce[16:])
- key = &subKey
- } else if len(nonce) == 8 {
- copy(subNonce[:], nonce[:])
- } else {
- panic("salsa20: nonce must be 8 or 24 bytes")
- }
-
- salsa.XORKeyStream(out, in, &subNonce, key)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20_test.go
deleted file mode 100644
index 0ef3328eb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/salsa20/salsa20_test.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2012 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 file.
-
-package salsa20
-
-import (
- "bytes"
- "encoding/hex"
- "testing"
-)
-
-func fromHex(s string) []byte {
- ret, err := hex.DecodeString(s)
- if err != nil {
- panic(err)
- }
- return ret
-}
-
-// testVectors was taken from set 6 of the ECRYPT test vectors:
-// http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/verified.test-vectors?logsort=rev&rev=210&view=markup
-var testVectors = []struct {
- key []byte
- iv []byte
- numBytes int
- xor []byte
-}{
- {
- fromHex("0053A6F94C9FF24598EB3E91E4378ADD3083D6297CCF2275C81B6EC11467BA0D"),
- fromHex("0D74DB42A91077DE"),
- 131072,
- fromHex("C349B6A51A3EC9B712EAED3F90D8BCEE69B7628645F251A996F55260C62EF31FD6C6B0AEA94E136C9D984AD2DF3578F78E457527B03A0450580DD874F63B1AB9"),
- },
- {
- fromHex("0558ABFE51A4F74A9DF04396E93C8FE23588DB2E81D4277ACD2073C6196CBF12"),
- fromHex("167DE44BB21980E7"),
- 131072,
- fromHex("C3EAAF32836BACE32D04E1124231EF47E101367D6305413A0EEB07C60698A2876E4D031870A739D6FFDDD208597AFF0A47AC17EDB0167DD67EBA84F1883D4DFD"),
- },
- {
- fromHex("0A5DB00356A9FC4FA2F5489BEE4194E73A8DE03386D92C7FD22578CB1E71C417"),
- fromHex("1F86ED54BB2289F0"),
- 131072,
- fromHex("3CD23C3DC90201ACC0CF49B440B6C417F0DC8D8410A716D5314C059E14B1A8D9A9FB8EA3D9C8DAE12B21402F674AA95C67B1FC514E994C9D3F3A6E41DFF5BBA6"),
- },
- {
- fromHex("0F62B5085BAE0154A7FA4DA0F34699EC3F92E5388BDE3184D72A7DD02376C91C"),
- fromHex("288FF65DC42B92F9"),
- 131072,
- fromHex("E00EBCCD70D69152725F9987982178A2E2E139C7BCBE04CA8A0E99E318D9AB76F988C8549F75ADD790BA4F81C176DA653C1A043F11A958E169B6D2319F4EEC1A"),
- },
-}
-
-func TestSalsa20(t *testing.T) {
- var inBuf, outBuf []byte
- var key [32]byte
-
- for i, test := range testVectors {
- if test.numBytes%64 != 0 {
- t.Errorf("#%d: numBytes is not a multiple of 64", i)
- continue
- }
-
- if test.numBytes > len(inBuf) {
- inBuf = make([]byte, test.numBytes)
- outBuf = make([]byte, test.numBytes)
- }
- in := inBuf[:test.numBytes]
- out := outBuf[:test.numBytes]
- copy(key[:], test.key)
- XORKeyStream(out, in, test.iv, &key)
-
- var xor [64]byte
- for len(out) > 0 {
- for i := 0; i < 64; i++ {
- xor[i] ^= out[i]
- }
- out = out[64:]
- }
-
- if !bytes.Equal(xor[:], test.xor) {
- t.Errorf("#%d: bad result", i)
- }
- }
-}
-
-var xSalsa20TestData = []struct {
- in, nonce, key, out []byte
-}{
- {
- []byte("Hello world!"),
- []byte("24-byte nonce for xsalsa"),
- []byte("this is 32-byte key for xsalsa20"),
- []byte{0x00, 0x2d, 0x45, 0x13, 0x84, 0x3f, 0xc2, 0x40, 0xc4, 0x01, 0xe5, 0x41},
- },
- {
- make([]byte, 64),
- []byte("24-byte nonce for xsalsa"),
- []byte("this is 32-byte key for xsalsa20"),
- []byte{0x48, 0x48, 0x29, 0x7f, 0xeb, 0x1f, 0xb5, 0x2f, 0xb6,
- 0x6d, 0x81, 0x60, 0x9b, 0xd5, 0x47, 0xfa, 0xbc, 0xbe, 0x70,
- 0x26, 0xed, 0xc8, 0xb5, 0xe5, 0xe4, 0x49, 0xd0, 0x88, 0xbf,
- 0xa6, 0x9c, 0x08, 0x8f, 0x5d, 0x8d, 0xa1, 0xd7, 0x91, 0x26,
- 0x7c, 0x2c, 0x19, 0x5a, 0x7f, 0x8c, 0xae, 0x9c, 0x4b, 0x40,
- 0x50, 0xd0, 0x8c, 0xe6, 0xd3, 0xa1, 0x51, 0xec, 0x26, 0x5f,
- 0x3a, 0x58, 0xe4, 0x76, 0x48},
- },
-}
-
-func TestXSalsa20(t *testing.T) {
- var key [32]byte
-
- for i, test := range xSalsa20TestData {
- out := make([]byte, len(test.in))
- copy(key[:], test.key)
- XORKeyStream(out, test.in, test.nonce, &key)
- if !bytes.Equal(out, test.out) {
- t.Errorf("%d: expected %x, got %x", i, test.out, out)
- }
- }
-}
-
-var (
- keyArray [32]byte
- key = &keyArray
- nonce [8]byte
- msg = make([]byte, 1<<10)
-)
-
-func BenchmarkXOR1K(b *testing.B) {
- b.StopTimer()
- out := make([]byte, 1024)
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- XORKeyStream(out, msg[:1024], nonce[:], key)
- }
- b.SetBytes(1024)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/example_test.go
deleted file mode 100644
index 6736479b1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/example_test.go
+++ /dev/null
@@ -1,26 +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 file.
-
-package scrypt_test
-
-import (
- "encoding/base64"
- "fmt"
- "log"
-
- "golang.org/x/crypto/scrypt"
-)
-
-func Example() {
- // DO NOT use this salt value; generate your own random salt. 8 bytes is
- // a good length.
- salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b}
-
- dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32)
- if err != nil {
- log.Fatal(err)
- }
- fmt.Println(base64.StdEncoding.EncodeToString(dk))
- // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M=
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt.go
deleted file mode 100644
index ff28aaef6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package scrypt implements the scrypt key derivation function as defined in
-// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
-// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
-package scrypt // import "golang.org/x/crypto/scrypt"
-
-import (
- "crypto/sha256"
- "errors"
-
- "golang.org/x/crypto/pbkdf2"
-)
-
-const maxInt = int(^uint(0) >> 1)
-
-// blockCopy copies n numbers from src into dst.
-func blockCopy(dst, src []uint32, n int) {
- copy(dst, src[:n])
-}
-
-// blockXOR XORs numbers from dst with n numbers from src.
-func blockXOR(dst, src []uint32, n int) {
- for i, v := range src[:n] {
- dst[i] ^= v
- }
-}
-
-// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in,
-// and puts the result into both both tmp and out.
-func salsaXOR(tmp *[16]uint32, in, out []uint32) {
- w0 := tmp[0] ^ in[0]
- w1 := tmp[1] ^ in[1]
- w2 := tmp[2] ^ in[2]
- w3 := tmp[3] ^ in[3]
- w4 := tmp[4] ^ in[4]
- w5 := tmp[5] ^ in[5]
- w6 := tmp[6] ^ in[6]
- w7 := tmp[7] ^ in[7]
- w8 := tmp[8] ^ in[8]
- w9 := tmp[9] ^ in[9]
- w10 := tmp[10] ^ in[10]
- w11 := tmp[11] ^ in[11]
- w12 := tmp[12] ^ in[12]
- w13 := tmp[13] ^ in[13]
- w14 := tmp[14] ^ in[14]
- w15 := tmp[15] ^ in[15]
-
- x0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8
- x9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15
-
- for i := 0; i < 8; i += 2 {
- u := x0 + x12
- x4 ^= u<<7 | u>>(32-7)
- u = x4 + x0
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x4
- x12 ^= u<<13 | u>>(32-13)
- u = x12 + x8
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x1
- x9 ^= u<<7 | u>>(32-7)
- u = x9 + x5
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x9
- x1 ^= u<<13 | u>>(32-13)
- u = x1 + x13
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x6
- x14 ^= u<<7 | u>>(32-7)
- u = x14 + x10
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x14
- x6 ^= u<<13 | u>>(32-13)
- u = x6 + x2
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x11
- x3 ^= u<<7 | u>>(32-7)
- u = x3 + x15
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x3
- x11 ^= u<<13 | u>>(32-13)
- u = x11 + x7
- x15 ^= u<<18 | u>>(32-18)
-
- u = x0 + x3
- x1 ^= u<<7 | u>>(32-7)
- u = x1 + x0
- x2 ^= u<<9 | u>>(32-9)
- u = x2 + x1
- x3 ^= u<<13 | u>>(32-13)
- u = x3 + x2
- x0 ^= u<<18 | u>>(32-18)
-
- u = x5 + x4
- x6 ^= u<<7 | u>>(32-7)
- u = x6 + x5
- x7 ^= u<<9 | u>>(32-9)
- u = x7 + x6
- x4 ^= u<<13 | u>>(32-13)
- u = x4 + x7
- x5 ^= u<<18 | u>>(32-18)
-
- u = x10 + x9
- x11 ^= u<<7 | u>>(32-7)
- u = x11 + x10
- x8 ^= u<<9 | u>>(32-9)
- u = x8 + x11
- x9 ^= u<<13 | u>>(32-13)
- u = x9 + x8
- x10 ^= u<<18 | u>>(32-18)
-
- u = x15 + x14
- x12 ^= u<<7 | u>>(32-7)
- u = x12 + x15
- x13 ^= u<<9 | u>>(32-9)
- u = x13 + x12
- x14 ^= u<<13 | u>>(32-13)
- u = x14 + x13
- x15 ^= u<<18 | u>>(32-18)
- }
- x0 += w0
- x1 += w1
- x2 += w2
- x3 += w3
- x4 += w4
- x5 += w5
- x6 += w6
- x7 += w7
- x8 += w8
- x9 += w9
- x10 += w10
- x11 += w11
- x12 += w12
- x13 += w13
- x14 += w14
- x15 += w15
-
- out[0], tmp[0] = x0, x0
- out[1], tmp[1] = x1, x1
- out[2], tmp[2] = x2, x2
- out[3], tmp[3] = x3, x3
- out[4], tmp[4] = x4, x4
- out[5], tmp[5] = x5, x5
- out[6], tmp[6] = x6, x6
- out[7], tmp[7] = x7, x7
- out[8], tmp[8] = x8, x8
- out[9], tmp[9] = x9, x9
- out[10], tmp[10] = x10, x10
- out[11], tmp[11] = x11, x11
- out[12], tmp[12] = x12, x12
- out[13], tmp[13] = x13, x13
- out[14], tmp[14] = x14, x14
- out[15], tmp[15] = x15, x15
-}
-
-func blockMix(tmp *[16]uint32, in, out []uint32, r int) {
- blockCopy(tmp[:], in[(2*r-1)*16:], 16)
- for i := 0; i < 2*r; i += 2 {
- salsaXOR(tmp, in[i*16:], out[i*8:])
- salsaXOR(tmp, in[i*16+16:], out[i*8+r*16:])
- }
-}
-
-func integer(b []uint32, r int) uint64 {
- j := (2*r - 1) * 16
- return uint64(b[j]) | uint64(b[j+1])<<32
-}
-
-func smix(b []byte, r, N int, v, xy []uint32) {
- var tmp [16]uint32
- x := xy
- y := xy[32*r:]
-
- j := 0
- for i := 0; i < 32*r; i++ {
- x[i] = uint32(b[j]) | uint32(b[j+1])<<8 | uint32(b[j+2])<<16 | uint32(b[j+3])<<24
- j += 4
- }
- for i := 0; i < N; i += 2 {
- blockCopy(v[i*(32*r):], x, 32*r)
- blockMix(&tmp, x, y, r)
-
- blockCopy(v[(i+1)*(32*r):], y, 32*r)
- blockMix(&tmp, y, x, r)
- }
- for i := 0; i < N; i += 2 {
- j := int(integer(x, r) & uint64(N-1))
- blockXOR(x, v[j*(32*r):], 32*r)
- blockMix(&tmp, x, y, r)
-
- j = int(integer(y, r) & uint64(N-1))
- blockXOR(y, v[j*(32*r):], 32*r)
- blockMix(&tmp, y, x, r)
- }
- j = 0
- for _, v := range x[:32*r] {
- b[j+0] = byte(v >> 0)
- b[j+1] = byte(v >> 8)
- b[j+2] = byte(v >> 16)
- b[j+3] = byte(v >> 24)
- j += 4
- }
-}
-
-// Key derives a key from the password, salt, and cost parameters, returning
-// a byte slice of length keyLen that can be used as cryptographic key.
-//
-// N is a CPU/memory cost parameter, which must be a power of two greater than 1.
-// r and p must satisfy r * p < 2³â°. If the parameters do not satisfy the
-// limits, the function returns a nil byte slice and an error.
-//
-// For example, you can get a derived key for e.g. AES-256 (which needs a
-// 32-byte key) by doing:
-//
-// dk, err := scrypt.Key([]byte("some password"), salt, 16384, 8, 1, 32)
-//
-// The recommended parameters for interactive logins as of 2017 are N=32768, r=8
-// and p=1. The parameters N, r, and p should be increased as memory latency and
-// CPU parallelism increases; consider setting N to the highest power of 2 you
-// can derive within 100 milliseconds. Remember to get a good random salt.
-func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) {
- if N <= 1 || N&(N-1) != 0 {
- return nil, errors.New("scrypt: N must be > 1 and a power of 2")
- }
- if uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r {
- return nil, errors.New("scrypt: parameters are too large")
- }
-
- xy := make([]uint32, 64*r)
- v := make([]uint32, 32*N*r)
- b := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New)
-
- for i := 0; i < p; i++ {
- smix(b[i*128*r:], r, N, v, xy)
- }
-
- return pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt_test.go
deleted file mode 100644
index 766ed8d90..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/scrypt/scrypt_test.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright 2012 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 file.
-
-package scrypt
-
-import (
- "bytes"
- "testing"
-)
-
-type testVector struct {
- password string
- salt string
- N, r, p int
- output []byte
-}
-
-var good = []testVector{
- {
- "password",
- "salt",
- 2, 10, 10,
- []byte{
- 0x48, 0x2c, 0x85, 0x8e, 0x22, 0x90, 0x55, 0xe6, 0x2f,
- 0x41, 0xe0, 0xec, 0x81, 0x9a, 0x5e, 0xe1, 0x8b, 0xdb,
- 0x87, 0x25, 0x1a, 0x53, 0x4f, 0x75, 0xac, 0xd9, 0x5a,
- 0xc5, 0xe5, 0xa, 0xa1, 0x5f,
- },
- },
- {
- "password",
- "salt",
- 16, 100, 100,
- []byte{
- 0x88, 0xbd, 0x5e, 0xdb, 0x52, 0xd1, 0xdd, 0x0, 0x18,
- 0x87, 0x72, 0xad, 0x36, 0x17, 0x12, 0x90, 0x22, 0x4e,
- 0x74, 0x82, 0x95, 0x25, 0xb1, 0x8d, 0x73, 0x23, 0xa5,
- 0x7f, 0x91, 0x96, 0x3c, 0x37,
- },
- },
- {
- "this is a long \000 password",
- "and this is a long \000 salt",
- 16384, 8, 1,
- []byte{
- 0xc3, 0xf1, 0x82, 0xee, 0x2d, 0xec, 0x84, 0x6e, 0x70,
- 0xa6, 0x94, 0x2f, 0xb5, 0x29, 0x98, 0x5a, 0x3a, 0x09,
- 0x76, 0x5e, 0xf0, 0x4c, 0x61, 0x29, 0x23, 0xb1, 0x7f,
- 0x18, 0x55, 0x5a, 0x37, 0x07, 0x6d, 0xeb, 0x2b, 0x98,
- 0x30, 0xd6, 0x9d, 0xe5, 0x49, 0x26, 0x51, 0xe4, 0x50,
- 0x6a, 0xe5, 0x77, 0x6d, 0x96, 0xd4, 0x0f, 0x67, 0xaa,
- 0xee, 0x37, 0xe1, 0x77, 0x7b, 0x8a, 0xd5, 0xc3, 0x11,
- 0x14, 0x32, 0xbb, 0x3b, 0x6f, 0x7e, 0x12, 0x64, 0x40,
- 0x18, 0x79, 0xe6, 0x41, 0xae,
- },
- },
- {
- "p",
- "s",
- 2, 1, 1,
- []byte{
- 0x48, 0xb0, 0xd2, 0xa8, 0xa3, 0x27, 0x26, 0x11, 0x98,
- 0x4c, 0x50, 0xeb, 0xd6, 0x30, 0xaf, 0x52,
- },
- },
-
- {
- "",
- "",
- 16, 1, 1,
- []byte{
- 0x77, 0xd6, 0x57, 0x62, 0x38, 0x65, 0x7b, 0x20, 0x3b,
- 0x19, 0xca, 0x42, 0xc1, 0x8a, 0x04, 0x97, 0xf1, 0x6b,
- 0x48, 0x44, 0xe3, 0x07, 0x4a, 0xe8, 0xdf, 0xdf, 0xfa,
- 0x3f, 0xed, 0xe2, 0x14, 0x42, 0xfc, 0xd0, 0x06, 0x9d,
- 0xed, 0x09, 0x48, 0xf8, 0x32, 0x6a, 0x75, 0x3a, 0x0f,
- 0xc8, 0x1f, 0x17, 0xe8, 0xd3, 0xe0, 0xfb, 0x2e, 0x0d,
- 0x36, 0x28, 0xcf, 0x35, 0xe2, 0x0c, 0x38, 0xd1, 0x89,
- 0x06,
- },
- },
- {
- "password",
- "NaCl",
- 1024, 8, 16,
- []byte{
- 0xfd, 0xba, 0xbe, 0x1c, 0x9d, 0x34, 0x72, 0x00, 0x78,
- 0x56, 0xe7, 0x19, 0x0d, 0x01, 0xe9, 0xfe, 0x7c, 0x6a,
- 0xd7, 0xcb, 0xc8, 0x23, 0x78, 0x30, 0xe7, 0x73, 0x76,
- 0x63, 0x4b, 0x37, 0x31, 0x62, 0x2e, 0xaf, 0x30, 0xd9,
- 0x2e, 0x22, 0xa3, 0x88, 0x6f, 0xf1, 0x09, 0x27, 0x9d,
- 0x98, 0x30, 0xda, 0xc7, 0x27, 0xaf, 0xb9, 0x4a, 0x83,
- 0xee, 0x6d, 0x83, 0x60, 0xcb, 0xdf, 0xa2, 0xcc, 0x06,
- 0x40,
- },
- },
- {
- "pleaseletmein", "SodiumChloride",
- 16384, 8, 1,
- []byte{
- 0x70, 0x23, 0xbd, 0xcb, 0x3a, 0xfd, 0x73, 0x48, 0x46,
- 0x1c, 0x06, 0xcd, 0x81, 0xfd, 0x38, 0xeb, 0xfd, 0xa8,
- 0xfb, 0xba, 0x90, 0x4f, 0x8e, 0x3e, 0xa9, 0xb5, 0x43,
- 0xf6, 0x54, 0x5d, 0xa1, 0xf2, 0xd5, 0x43, 0x29, 0x55,
- 0x61, 0x3f, 0x0f, 0xcf, 0x62, 0xd4, 0x97, 0x05, 0x24,
- 0x2a, 0x9a, 0xf9, 0xe6, 0x1e, 0x85, 0xdc, 0x0d, 0x65,
- 0x1e, 0x40, 0xdf, 0xcf, 0x01, 0x7b, 0x45, 0x57, 0x58,
- 0x87,
- },
- },
- /*
- // Disabled: needs 1 GiB RAM and takes too long for a simple test.
- {
- "pleaseletmein", "SodiumChloride",
- 1048576, 8, 1,
- []byte{
- 0x21, 0x01, 0xcb, 0x9b, 0x6a, 0x51, 0x1a, 0xae, 0xad,
- 0xdb, 0xbe, 0x09, 0xcf, 0x70, 0xf8, 0x81, 0xec, 0x56,
- 0x8d, 0x57, 0x4a, 0x2f, 0xfd, 0x4d, 0xab, 0xe5, 0xee,
- 0x98, 0x20, 0xad, 0xaa, 0x47, 0x8e, 0x56, 0xfd, 0x8f,
- 0x4b, 0xa5, 0xd0, 0x9f, 0xfa, 0x1c, 0x6d, 0x92, 0x7c,
- 0x40, 0xf4, 0xc3, 0x37, 0x30, 0x40, 0x49, 0xe8, 0xa9,
- 0x52, 0xfb, 0xcb, 0xf4, 0x5c, 0x6f, 0xa7, 0x7a, 0x41,
- 0xa4,
- },
- },
- */
-}
-
-var bad = []testVector{
- {"p", "s", 0, 1, 1, nil}, // N == 0
- {"p", "s", 1, 1, 1, nil}, // N == 1
- {"p", "s", 7, 8, 1, nil}, // N is not power of 2
- {"p", "s", 16, maxInt / 2, maxInt / 2, nil}, // p * r too large
-}
-
-func TestKey(t *testing.T) {
- for i, v := range good {
- k, err := Key([]byte(v.password), []byte(v.salt), v.N, v.r, v.p, len(v.output))
- if err != nil {
- t.Errorf("%d: got unexpected error: %s", i, err)
- }
- if !bytes.Equal(k, v.output) {
- t.Errorf("%d: expected %x, got %x", i, v.output, k)
- }
- }
- for i, v := range bad {
- _, err := Key([]byte(v.password), []byte(v.salt), v.N, v.r, v.p, 32)
- if err == nil {
- t.Errorf("%d: expected error, got nil", i)
- }
- }
-}
-
-var sink []byte
-
-func BenchmarkKey(b *testing.B) {
- for i := 0; i < b.N; i++ {
- sink, _ = Key([]byte("password"), []byte("salt"), 1<<15, 8, 1, 64)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/doc.go
deleted file mode 100644
index a0ee3ae72..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/doc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package sha3 implements the SHA-3 fixed-output-length hash functions and
-// the SHAKE variable-output-length hash functions defined by FIPS-202.
-//
-// Both types of hash function use the "sponge" construction and the Keccak
-// permutation. For a detailed specification see http://keccak.noekeon.org/
-//
-//
-// Guidance
-//
-// If you aren't sure what function you need, use SHAKE256 with at least 64
-// bytes of output. The SHAKE instances are faster than the SHA3 instances;
-// the latter have to allocate memory to conform to the hash.Hash interface.
-//
-// If you need a secret-key MAC (message authentication code), prepend the
-// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
-// output.
-//
-//
-// Security strengths
-//
-// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
-// strength against preimage attacks of x bits. Since they only produce "x"
-// bits of output, their collision-resistance is only "x/2" bits.
-//
-// The SHAKE-256 and -128 functions have a generic security strength of 256 and
-// 128 bits against all attacks, provided that at least 2x bits of their output
-// is used. Requesting more than 64 or 32 bytes of output, respectively, does
-// not increase the collision-resistance of the SHAKE functions.
-//
-//
-// The sponge construction
-//
-// A sponge builds a pseudo-random function from a public pseudo-random
-// permutation, by applying the permutation to a state of "rate + capacity"
-// bytes, but hiding "capacity" of the bytes.
-//
-// A sponge starts out with a zero state. To hash an input using a sponge, up
-// to "rate" bytes of the input are XORed into the sponge's state. The sponge
-// is then "full" and the permutation is applied to "empty" it. This process is
-// repeated until all the input has been "absorbed". The input is then padded.
-// The digest is "squeezed" from the sponge in the same way, except that output
-// output is copied out instead of input being XORed in.
-//
-// A sponge is parameterized by its generic security strength, which is equal
-// to half its capacity; capacity + rate is equal to the permutation's width.
-// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
-// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
-//
-//
-// Recommendations
-//
-// The SHAKE functions are recommended for most new uses. They can produce
-// output of arbitrary length. SHAKE256, with an output length of at least
-// 64 bytes, provides 256-bit security against all attacks. The Keccak team
-// recommends it for most applications upgrading from SHA2-512. (NIST chose a
-// much stronger, but much slower, sponge instance for SHA3-512.)
-//
-// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
-// They produce output of the same length, with the same security strengths
-// against all attacks. This means, in particular, that SHA3-256 only has
-// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3 // import "golang.org/x/crypto/sha3"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/hashes.go
deleted file mode 100644
index 2b51cf4e9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/hashes.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 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 file.
-
-package sha3
-
-// This file provides functions for creating instances of the SHA-3
-// and SHAKE hash functions, as well as utility functions for hashing
-// bytes.
-
-import (
- "hash"
-)
-
-// New224 creates a new SHA3-224 hash.
-// Its generic security strength is 224 bits against preimage attacks,
-// and 112 bits against collision attacks.
-func New224() hash.Hash { return &state{rate: 144, outputLen: 28, dsbyte: 0x06} }
-
-// New256 creates a new SHA3-256 hash.
-// Its generic security strength is 256 bits against preimage attacks,
-// and 128 bits against collision attacks.
-func New256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x06} }
-
-// New384 creates a new SHA3-384 hash.
-// Its generic security strength is 384 bits against preimage attacks,
-// and 192 bits against collision attacks.
-func New384() hash.Hash { return &state{rate: 104, outputLen: 48, dsbyte: 0x06} }
-
-// New512 creates a new SHA3-512 hash.
-// Its generic security strength is 512 bits against preimage attacks,
-// and 256 bits against collision attacks.
-func New512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x06} }
-
-// Sum224 returns the SHA3-224 digest of the data.
-func Sum224(data []byte) (digest [28]byte) {
- h := New224()
- h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum256 returns the SHA3-256 digest of the data.
-func Sum256(data []byte) (digest [32]byte) {
- h := New256()
- h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum384 returns the SHA3-384 digest of the data.
-func Sum384(data []byte) (digest [48]byte) {
- h := New384()
- h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum512 returns the SHA3-512 digest of the data.
-func Sum512(data []byte) (digest [64]byte) {
- h := New512()
- h.Write(data)
- h.Sum(digest[:0])
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf.go
deleted file mode 100644
index 46d03ed38..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !amd64 appengine gccgo
-
-package sha3
-
-// rc stores the round constants for use in the ι step.
-var rc = [24]uint64{
- 0x0000000000000001,
- 0x0000000000008082,
- 0x800000000000808A,
- 0x8000000080008000,
- 0x000000000000808B,
- 0x0000000080000001,
- 0x8000000080008081,
- 0x8000000000008009,
- 0x000000000000008A,
- 0x0000000000000088,
- 0x0000000080008009,
- 0x000000008000000A,
- 0x000000008000808B,
- 0x800000000000008B,
- 0x8000000000008089,
- 0x8000000000008003,
- 0x8000000000008002,
- 0x8000000000000080,
- 0x000000000000800A,
- 0x800000008000000A,
- 0x8000000080008081,
- 0x8000000000008080,
- 0x0000000080000001,
- 0x8000000080008008,
-}
-
-// keccakF1600 applies the Keccak permutation to a 1600b-wide
-// state represented as a slice of 25 uint64s.
-func keccakF1600(a *[25]uint64) {
- // Implementation translated from Keccak-inplace.c
- // in the keccak reference code.
- var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
-
- for i := 0; i < 24; i += 4 {
- // Combines the 5 steps in each round into 2 steps.
- // Unrolls 4 rounds per loop and spreads some steps across rounds.
-
- // Round 1
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[6] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[12] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[18] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[24] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i]
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[16] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[22] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[3] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[1] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[7] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[19] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[11] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[23] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[4] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[2] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[8] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[14] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- // Round 2
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[16] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[7] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[23] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[14] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1]
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[11] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[2] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[18] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[6] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[22] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[4] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[1] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[8] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[24] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[12] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[3] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[19] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- // Round 3
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[11] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[22] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[8] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[19] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2]
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[1] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[12] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[23] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[16] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[2] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[24] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[6] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[3] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[14] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[7] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[18] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[4] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- // Round 4
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[1] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[2] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[3] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[4] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3]
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[6] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[7] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[8] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[11] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[12] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[14] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[16] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[18] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[19] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[22] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[23] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[24] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
deleted file mode 100644
index 788679585..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build amd64,!appengine,!gccgo
-
-package sha3
-
-// This function is implemented in keccakf_amd64.s.
-
-//go:noescape
-
-func keccakF1600(a *[25]uint64)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
deleted file mode 100644
index f88533acc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build amd64,!appengine,!gccgo
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources at https://github.com/gvanas/KeccakCodePackage
-
-// Offsets in state
-#define _ba (0*8)
-#define _be (1*8)
-#define _bi (2*8)
-#define _bo (3*8)
-#define _bu (4*8)
-#define _ga (5*8)
-#define _ge (6*8)
-#define _gi (7*8)
-#define _go (8*8)
-#define _gu (9*8)
-#define _ka (10*8)
-#define _ke (11*8)
-#define _ki (12*8)
-#define _ko (13*8)
-#define _ku (14*8)
-#define _ma (15*8)
-#define _me (16*8)
-#define _mi (17*8)
-#define _mo (18*8)
-#define _mu (19*8)
-#define _sa (20*8)
-#define _se (21*8)
-#define _si (22*8)
-#define _so (23*8)
-#define _su (24*8)
-
-// Temporary registers
-#define rT1 AX
-
-// Round vars
-#define rpState DI
-#define rpStack SP
-
-#define rDa BX
-#define rDe CX
-#define rDi DX
-#define rDo R8
-#define rDu R9
-
-#define rBa R10
-#define rBe R11
-#define rBi R12
-#define rBo R13
-#define rBu R14
-
-#define rCa SI
-#define rCe BP
-#define rCi rBi
-#define rCo rBo
-#define rCu R15
-
-#define MOVQ_RBI_RCE MOVQ rBi, rCe
-#define XORQ_RT1_RCA XORQ rT1, rCa
-#define XORQ_RT1_RCE XORQ rT1, rCe
-#define XORQ_RBA_RCU XORQ rBa, rCu
-#define XORQ_RBE_RCU XORQ rBe, rCu
-#define XORQ_RDU_RCU XORQ rDu, rCu
-#define XORQ_RDA_RCA XORQ rDa, rCa
-#define XORQ_RDE_RCE XORQ rDe, rCe
-
-#define mKeccakRound(iState, oState, rc, B_RBI_RCE, G_RT1_RCA, G_RT1_RCE, G_RBA_RCU, K_RT1_RCA, K_RT1_RCE, K_RBA_RCU, M_RT1_RCA, M_RT1_RCE, M_RBE_RCU, S_RDU_RCU, S_RDA_RCA, S_RDE_RCE) \
- /* Prepare round */ \
- MOVQ rCe, rDa; \
- ROLQ $1, rDa; \
- \
- MOVQ _bi(iState), rCi; \
- XORQ _gi(iState), rDi; \
- XORQ rCu, rDa; \
- XORQ _ki(iState), rCi; \
- XORQ _mi(iState), rDi; \
- XORQ rDi, rCi; \
- \
- MOVQ rCi, rDe; \
- ROLQ $1, rDe; \
- \
- MOVQ _bo(iState), rCo; \
- XORQ _go(iState), rDo; \
- XORQ rCa, rDe; \
- XORQ _ko(iState), rCo; \
- XORQ _mo(iState), rDo; \
- XORQ rDo, rCo; \
- \
- MOVQ rCo, rDi; \
- ROLQ $1, rDi; \
- \
- MOVQ rCu, rDo; \
- XORQ rCe, rDi; \
- ROLQ $1, rDo; \
- \
- MOVQ rCa, rDu; \
- XORQ rCi, rDo; \
- ROLQ $1, rDu; \
- \
- /* Result b */ \
- MOVQ _ba(iState), rBa; \
- MOVQ _ge(iState), rBe; \
- XORQ rCo, rDu; \
- MOVQ _ki(iState), rBi; \
- MOVQ _mo(iState), rBo; \
- MOVQ _su(iState), rBu; \
- XORQ rDe, rBe; \
- ROLQ $44, rBe; \
- XORQ rDi, rBi; \
- XORQ rDa, rBa; \
- ROLQ $43, rBi; \
- \
- MOVQ rBe, rCa; \
- MOVQ rc, rT1; \
- ORQ rBi, rCa; \
- XORQ rBa, rT1; \
- XORQ rT1, rCa; \
- MOVQ rCa, _ba(oState); \
- \
- XORQ rDu, rBu; \
- ROLQ $14, rBu; \
- MOVQ rBa, rCu; \
- ANDQ rBe, rCu; \
- XORQ rBu, rCu; \
- MOVQ rCu, _bu(oState); \
- \
- XORQ rDo, rBo; \
- ROLQ $21, rBo; \
- MOVQ rBo, rT1; \
- ANDQ rBu, rT1; \
- XORQ rBi, rT1; \
- MOVQ rT1, _bi(oState); \
- \
- NOTQ rBi; \
- ORQ rBa, rBu; \
- ORQ rBo, rBi; \
- XORQ rBo, rBu; \
- XORQ rBe, rBi; \
- MOVQ rBu, _bo(oState); \
- MOVQ rBi, _be(oState); \
- B_RBI_RCE; \
- \
- /* Result g */ \
- MOVQ _gu(iState), rBe; \
- XORQ rDu, rBe; \
- MOVQ _ka(iState), rBi; \
- ROLQ $20, rBe; \
- XORQ rDa, rBi; \
- ROLQ $3, rBi; \
- MOVQ _bo(iState), rBa; \
- MOVQ rBe, rT1; \
- ORQ rBi, rT1; \
- XORQ rDo, rBa; \
- MOVQ _me(iState), rBo; \
- MOVQ _si(iState), rBu; \
- ROLQ $28, rBa; \
- XORQ rBa, rT1; \
- MOVQ rT1, _ga(oState); \
- G_RT1_RCA; \
- \
- XORQ rDe, rBo; \
- ROLQ $45, rBo; \
- MOVQ rBi, rT1; \
- ANDQ rBo, rT1; \
- XORQ rBe, rT1; \
- MOVQ rT1, _ge(oState); \
- G_RT1_RCE; \
- \
- XORQ rDi, rBu; \
- ROLQ $61, rBu; \
- MOVQ rBu, rT1; \
- ORQ rBa, rT1; \
- XORQ rBo, rT1; \
- MOVQ rT1, _go(oState); \
- \
- ANDQ rBe, rBa; \
- XORQ rBu, rBa; \
- MOVQ rBa, _gu(oState); \
- NOTQ rBu; \
- G_RBA_RCU; \
- \
- ORQ rBu, rBo; \
- XORQ rBi, rBo; \
- MOVQ rBo, _gi(oState); \
- \
- /* Result k */ \
- MOVQ _be(iState), rBa; \
- MOVQ _gi(iState), rBe; \
- MOVQ _ko(iState), rBi; \
- MOVQ _mu(iState), rBo; \
- MOVQ _sa(iState), rBu; \
- XORQ rDi, rBe; \
- ROLQ $6, rBe; \
- XORQ rDo, rBi; \
- ROLQ $25, rBi; \
- MOVQ rBe, rT1; \
- ORQ rBi, rT1; \
- XORQ rDe, rBa; \
- ROLQ $1, rBa; \
- XORQ rBa, rT1; \
- MOVQ rT1, _ka(oState); \
- K_RT1_RCA; \
- \
- XORQ rDu, rBo; \
- ROLQ $8, rBo; \
- MOVQ rBi, rT1; \
- ANDQ rBo, rT1; \
- XORQ rBe, rT1; \
- MOVQ rT1, _ke(oState); \
- K_RT1_RCE; \
- \
- XORQ rDa, rBu; \
- ROLQ $18, rBu; \
- NOTQ rBo; \
- MOVQ rBo, rT1; \
- ANDQ rBu, rT1; \
- XORQ rBi, rT1; \
- MOVQ rT1, _ki(oState); \
- \
- MOVQ rBu, rT1; \
- ORQ rBa, rT1; \
- XORQ rBo, rT1; \
- MOVQ rT1, _ko(oState); \
- \
- ANDQ rBe, rBa; \
- XORQ rBu, rBa; \
- MOVQ rBa, _ku(oState); \
- K_RBA_RCU; \
- \
- /* Result m */ \
- MOVQ _ga(iState), rBe; \
- XORQ rDa, rBe; \
- MOVQ _ke(iState), rBi; \
- ROLQ $36, rBe; \
- XORQ rDe, rBi; \
- MOVQ _bu(iState), rBa; \
- ROLQ $10, rBi; \
- MOVQ rBe, rT1; \
- MOVQ _mi(iState), rBo; \
- ANDQ rBi, rT1; \
- XORQ rDu, rBa; \
- MOVQ _so(iState), rBu; \
- ROLQ $27, rBa; \
- XORQ rBa, rT1; \
- MOVQ rT1, _ma(oState); \
- M_RT1_RCA; \
- \
- XORQ rDi, rBo; \
- ROLQ $15, rBo; \
- MOVQ rBi, rT1; \
- ORQ rBo, rT1; \
- XORQ rBe, rT1; \
- MOVQ rT1, _me(oState); \
- M_RT1_RCE; \
- \
- XORQ rDo, rBu; \
- ROLQ $56, rBu; \
- NOTQ rBo; \
- MOVQ rBo, rT1; \
- ORQ rBu, rT1; \
- XORQ rBi, rT1; \
- MOVQ rT1, _mi(oState); \
- \
- ORQ rBa, rBe; \
- XORQ rBu, rBe; \
- MOVQ rBe, _mu(oState); \
- \
- ANDQ rBa, rBu; \
- XORQ rBo, rBu; \
- MOVQ rBu, _mo(oState); \
- M_RBE_RCU; \
- \
- /* Result s */ \
- MOVQ _bi(iState), rBa; \
- MOVQ _go(iState), rBe; \
- MOVQ _ku(iState), rBi; \
- XORQ rDi, rBa; \
- MOVQ _ma(iState), rBo; \
- ROLQ $62, rBa; \
- XORQ rDo, rBe; \
- MOVQ _se(iState), rBu; \
- ROLQ $55, rBe; \
- \
- XORQ rDu, rBi; \
- MOVQ rBa, rDu; \
- XORQ rDe, rBu; \
- ROLQ $2, rBu; \
- ANDQ rBe, rDu; \
- XORQ rBu, rDu; \
- MOVQ rDu, _su(oState); \
- \
- ROLQ $39, rBi; \
- S_RDU_RCU; \
- NOTQ rBe; \
- XORQ rDa, rBo; \
- MOVQ rBe, rDa; \
- ANDQ rBi, rDa; \
- XORQ rBa, rDa; \
- MOVQ rDa, _sa(oState); \
- S_RDA_RCA; \
- \
- ROLQ $41, rBo; \
- MOVQ rBi, rDe; \
- ORQ rBo, rDe; \
- XORQ rBe, rDe; \
- MOVQ rDe, _se(oState); \
- S_RDE_RCE; \
- \
- MOVQ rBo, rDi; \
- MOVQ rBu, rDo; \
- ANDQ rBu, rDi; \
- ORQ rBa, rDo; \
- XORQ rBi, rDi; \
- XORQ rBo, rDo; \
- MOVQ rDi, _si(oState); \
- MOVQ rDo, _so(oState) \
-
-// func keccakF1600(state *[25]uint64)
-TEXT ·keccakF1600(SB), 0, $200-8
- MOVQ state+0(FP), rpState
-
- // Convert the user state into an internal state
- NOTQ _be(rpState)
- NOTQ _bi(rpState)
- NOTQ _go(rpState)
- NOTQ _ki(rpState)
- NOTQ _mi(rpState)
- NOTQ _sa(rpState)
-
- // Execute the KeccakF permutation
- MOVQ _ba(rpState), rCa
- MOVQ _be(rpState), rCe
- MOVQ _bu(rpState), rCu
-
- XORQ _ga(rpState), rCa
- XORQ _ge(rpState), rCe
- XORQ _gu(rpState), rCu
-
- XORQ _ka(rpState), rCa
- XORQ _ke(rpState), rCe
- XORQ _ku(rpState), rCu
-
- XORQ _ma(rpState), rCa
- XORQ _me(rpState), rCe
- XORQ _mu(rpState), rCu
-
- XORQ _sa(rpState), rCa
- XORQ _se(rpState), rCe
- MOVQ _si(rpState), rDi
- MOVQ _so(rpState), rDo
- XORQ _su(rpState), rCu
-
- mKeccakRound(rpState, rpStack, $0x0000000000000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x0000000000008082, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x800000000000808a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000080008000, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x000000000000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000000008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x000000000000008a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x0000000000000088, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x0000000080008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x000000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x000000008000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x800000000000008b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x8000000000008089, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000000008003, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x8000000000008002, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000000000080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x000000000000800a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x800000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000000008080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpState, rpStack, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
- mKeccakRound(rpStack, rpState, $0x8000000080008008, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP)
-
- // Revert the internal state to the user state
- NOTQ _be(rpState)
- NOTQ _bi(rpState)
- NOTQ _go(rpState)
- NOTQ _ki(rpState)
- NOTQ _mi(rpState)
- NOTQ _sa(rpState)
-
- RET
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/register.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/register.go
deleted file mode 100644
index 3cf6a22e0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/register.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build go1.4
-
-package sha3
-
-import (
- "crypto"
-)
-
-func init() {
- crypto.RegisterHash(crypto.SHA3_224, New224)
- crypto.RegisterHash(crypto.SHA3_256, New256)
- crypto.RegisterHash(crypto.SHA3_384, New384)
- crypto.RegisterHash(crypto.SHA3_512, New512)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3.go
deleted file mode 100644
index b12a35c87..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright 2014 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 file.
-
-package sha3
-
-// spongeDirection indicates the direction bytes are flowing through the sponge.
-type spongeDirection int
-
-const (
- // spongeAbsorbing indicates that the sponge is absorbing input.
- spongeAbsorbing spongeDirection = iota
- // spongeSqueezing indicates that the sponge is being squeezed.
- spongeSqueezing
-)
-
-const (
- // maxRate is the maximum size of the internal buffer. SHAKE-256
- // currently needs the largest buffer.
- maxRate = 168
-)
-
-type state struct {
- // Generic sponge components.
- a [25]uint64 // main state of the hash
- buf []byte // points into storage
- rate int // the number of bytes of state to use
-
- // dsbyte contains the "domain separation" bits and the first bit of
- // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
- // SHA-3 and SHAKE functions by appending bitstrings to the message.
- // Using a little-endian bit-ordering convention, these are "01" for SHA-3
- // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
- // padding rule from section 5.1 is applied to pad the message to a multiple
- // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
- // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
- // giving 00000110b (0x06) and 00011111b (0x1f).
- // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
- // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
- // Extendable-Output Functions (May 2014)"
- dsbyte byte
- storage [maxRate]byte
-
- // Specific to SHA-3 and SHAKE.
- outputLen int // the default output size in bytes
- state spongeDirection // whether the sponge is absorbing or squeezing
-}
-
-// BlockSize returns the rate of sponge underlying this hash function.
-func (d *state) BlockSize() int { return d.rate }
-
-// Size returns the output size of the hash function in bytes.
-func (d *state) Size() int { return d.outputLen }
-
-// Reset clears the internal state by zeroing the sponge state and
-// the byte buffer, and setting Sponge.state to absorbing.
-func (d *state) Reset() {
- // Zero the permutation's state.
- for i := range d.a {
- d.a[i] = 0
- }
- d.state = spongeAbsorbing
- d.buf = d.storage[:0]
-}
-
-func (d *state) clone() *state {
- ret := *d
- if ret.state == spongeAbsorbing {
- ret.buf = ret.storage[:len(ret.buf)]
- } else {
- ret.buf = ret.storage[d.rate-cap(d.buf) : d.rate]
- }
-
- return &ret
-}
-
-// permute applies the KeccakF-1600 permutation. It handles
-// any input-output buffering.
-func (d *state) permute() {
- switch d.state {
- case spongeAbsorbing:
- // If we're absorbing, we need to xor the input into the state
- // before applying the permutation.
- xorIn(d, d.buf)
- d.buf = d.storage[:0]
- keccakF1600(&d.a)
- case spongeSqueezing:
- // If we're squeezing, we need to apply the permutatin before
- // copying more output.
- keccakF1600(&d.a)
- d.buf = d.storage[:d.rate]
- copyOut(d, d.buf)
- }
-}
-
-// pads appends the domain separation bits in dsbyte, applies
-// the multi-bitrate 10..1 padding rule, and permutes the state.
-func (d *state) padAndPermute(dsbyte byte) {
- if d.buf == nil {
- d.buf = d.storage[:0]
- }
- // Pad with this instance's domain-separator bits. We know that there's
- // at least one byte of space in d.buf because, if it were full,
- // permute would have been called to empty it. dsbyte also contains the
- // first one bit for the padding. See the comment in the state struct.
- d.buf = append(d.buf, dsbyte)
- zerosStart := len(d.buf)
- d.buf = d.storage[:d.rate]
- for i := zerosStart; i < d.rate; i++ {
- d.buf[i] = 0
- }
- // This adds the final one bit for the padding. Because of the way that
- // bits are numbered from the LSB upwards, the final bit is the MSB of
- // the last byte.
- d.buf[d.rate-1] ^= 0x80
- // Apply the permutation
- d.permute()
- d.state = spongeSqueezing
- d.buf = d.storage[:d.rate]
- copyOut(d, d.buf)
-}
-
-// Write absorbs more data into the hash's state. It produces an error
-// if more data is written to the ShakeHash after writing
-func (d *state) Write(p []byte) (written int, err error) {
- if d.state != spongeAbsorbing {
- panic("sha3: write to sponge after read")
- }
- if d.buf == nil {
- d.buf = d.storage[:0]
- }
- written = len(p)
-
- for len(p) > 0 {
- if len(d.buf) == 0 && len(p) >= d.rate {
- // The fast path; absorb a full "rate" bytes of input and apply the permutation.
- xorIn(d, p[:d.rate])
- p = p[d.rate:]
- keccakF1600(&d.a)
- } else {
- // The slow path; buffer the input until we can fill the sponge, and then xor it in.
- todo := d.rate - len(d.buf)
- if todo > len(p) {
- todo = len(p)
- }
- d.buf = append(d.buf, p[:todo]...)
- p = p[todo:]
-
- // If the sponge is full, apply the permutation.
- if len(d.buf) == d.rate {
- d.permute()
- }
- }
- }
-
- return
-}
-
-// Read squeezes an arbitrary number of bytes from the sponge.
-func (d *state) Read(out []byte) (n int, err error) {
- // If we're still absorbing, pad and apply the permutation.
- if d.state == spongeAbsorbing {
- d.padAndPermute(d.dsbyte)
- }
-
- n = len(out)
-
- // Now, do the squeezing.
- for len(out) > 0 {
- n := copy(out, d.buf)
- d.buf = d.buf[n:]
- out = out[n:]
-
- // Apply the permutation if we've squeezed the sponge dry.
- if len(d.buf) == 0 {
- d.permute()
- }
- }
-
- return
-}
-
-// Sum applies padding to the hash state and then squeezes out the desired
-// number of output bytes.
-func (d *state) Sum(in []byte) []byte {
- // Make a copy of the original hash so that caller can keep writing
- // and summing.
- dup := d.clone()
- hash := make([]byte, dup.outputLen)
- dup.Read(hash)
- return append(in, hash...)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3_test.go
deleted file mode 100644
index 312e8f907..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/sha3_test.go
+++ /dev/null
@@ -1,311 +0,0 @@
-// Copyright 2014 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 file.
-
-package sha3
-
-// Tests include all the ShortMsgKATs provided by the Keccak team at
-// https://github.com/gvanas/KeccakCodePackage
-//
-// They only include the zero-bit case of the bitwise testvectors
-// published by NIST in the draft of FIPS-202.
-
-import (
- "bytes"
- "compress/flate"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "hash"
- "os"
- "strings"
- "testing"
-)
-
-const (
- testString = "brekeccakkeccak koax koax"
- katFilename = "testdata/keccakKats.json.deflate"
-)
-
-// Internal-use instances of SHAKE used to test against KATs.
-func newHashShake128() hash.Hash {
- return &state{rate: 168, dsbyte: 0x1f, outputLen: 512}
-}
-func newHashShake256() hash.Hash {
- return &state{rate: 136, dsbyte: 0x1f, outputLen: 512}
-}
-
-// testDigests contains functions returning hash.Hash instances
-// with output-length equal to the KAT length for both SHA-3 and
-// SHAKE instances.
-var testDigests = map[string]func() hash.Hash{
- "SHA3-224": New224,
- "SHA3-256": New256,
- "SHA3-384": New384,
- "SHA3-512": New512,
- "SHAKE128": newHashShake128,
- "SHAKE256": newHashShake256,
-}
-
-// testShakes contains functions that return ShakeHash instances for
-// testing the ShakeHash-specific interface.
-var testShakes = map[string]func() ShakeHash{
- "SHAKE128": NewShake128,
- "SHAKE256": NewShake256,
-}
-
-// decodeHex converts a hex-encoded string into a raw byte string.
-func decodeHex(s string) []byte {
- b, err := hex.DecodeString(s)
- if err != nil {
- panic(err)
- }
- return b
-}
-
-// structs used to marshal JSON test-cases.
-type KeccakKats struct {
- Kats map[string][]struct {
- Digest string `json:"digest"`
- Length int64 `json:"length"`
- Message string `json:"message"`
- }
-}
-
-func testUnalignedAndGeneric(t *testing.T, testf func(impl string)) {
- xorInOrig, copyOutOrig := xorIn, copyOut
- xorIn, copyOut = xorInGeneric, copyOutGeneric
- testf("generic")
- if xorImplementationUnaligned != "generic" {
- xorIn, copyOut = xorInUnaligned, copyOutUnaligned
- testf("unaligned")
- }
- xorIn, copyOut = xorInOrig, copyOutOrig
-}
-
-// TestKeccakKats tests the SHA-3 and Shake implementations against all the
-// ShortMsgKATs from https://github.com/gvanas/KeccakCodePackage
-// (The testvectors are stored in keccakKats.json.deflate due to their length.)
-func TestKeccakKats(t *testing.T) {
- testUnalignedAndGeneric(t, func(impl string) {
- // Read the KATs.
- deflated, err := os.Open(katFilename)
- if err != nil {
- t.Errorf("error opening %s: %s", katFilename, err)
- }
- file := flate.NewReader(deflated)
- dec := json.NewDecoder(file)
- var katSet KeccakKats
- err = dec.Decode(&katSet)
- if err != nil {
- t.Errorf("error decoding KATs: %s", err)
- }
-
- // Do the KATs.
- for functionName, kats := range katSet.Kats {
- d := testDigests[functionName]()
- for _, kat := range kats {
- d.Reset()
- in, err := hex.DecodeString(kat.Message)
- if err != nil {
- t.Errorf("error decoding KAT: %s", err)
- }
- d.Write(in[:kat.Length/8])
- got := strings.ToUpper(hex.EncodeToString(d.Sum(nil)))
- if got != kat.Digest {
- t.Errorf("function=%s, implementation=%s, length=%d\nmessage:\n %s\ngot:\n %s\nwanted:\n %s",
- functionName, impl, kat.Length, kat.Message, got, kat.Digest)
- t.Logf("wanted %+v", kat)
- t.FailNow()
- }
- continue
- }
- }
- })
-}
-
-// TestUnalignedWrite tests that writing data in an arbitrary pattern with
-// small input buffers.
-func testUnalignedWrite(t *testing.T) {
- testUnalignedAndGeneric(t, func(impl string) {
- buf := sequentialBytes(0x10000)
- for alg, df := range testDigests {
- d := df()
- d.Reset()
- d.Write(buf)
- want := d.Sum(nil)
- d.Reset()
- for i := 0; i < len(buf); {
- // Cycle through offsets which make a 137 byte sequence.
- // Because 137 is prime this sequence should exercise all corner cases.
- offsets := [17]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1}
- for _, j := range offsets {
- if v := len(buf) - i; v < j {
- j = v
- }
- d.Write(buf[i : i+j])
- i += j
- }
- }
- got := d.Sum(nil)
- if !bytes.Equal(got, want) {
- t.Errorf("Unaligned writes, implementation=%s, alg=%s\ngot %q, want %q", impl, alg, got, want)
- }
- }
- })
-}
-
-// TestAppend checks that appending works when reallocation is necessary.
-func TestAppend(t *testing.T) {
- testUnalignedAndGeneric(t, func(impl string) {
- d := New224()
-
- for capacity := 2; capacity <= 66; capacity += 64 {
- // The first time around the loop, Sum will have to reallocate.
- // The second time, it will not.
- buf := make([]byte, 2, capacity)
- d.Reset()
- d.Write([]byte{0xcc})
- buf = d.Sum(buf)
- expected := "0000DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39"
- if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected {
- t.Errorf("got %s, want %s", got, expected)
- }
- }
- })
-}
-
-// TestAppendNoRealloc tests that appending works when no reallocation is necessary.
-func TestAppendNoRealloc(t *testing.T) {
- testUnalignedAndGeneric(t, func(impl string) {
- buf := make([]byte, 1, 200)
- d := New224()
- d.Write([]byte{0xcc})
- buf = d.Sum(buf)
- expected := "00DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39"
- if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected {
- t.Errorf("%s: got %s, want %s", impl, got, expected)
- }
- })
-}
-
-// TestSqueezing checks that squeezing the full output a single time produces
-// the same output as repeatedly squeezing the instance.
-func TestSqueezing(t *testing.T) {
- testUnalignedAndGeneric(t, func(impl string) {
- for functionName, newShakeHash := range testShakes {
- d0 := newShakeHash()
- d0.Write([]byte(testString))
- ref := make([]byte, 32)
- d0.Read(ref)
-
- d1 := newShakeHash()
- d1.Write([]byte(testString))
- var multiple []byte
- for _ = range ref {
- one := make([]byte, 1)
- d1.Read(one)
- multiple = append(multiple, one...)
- }
- if !bytes.Equal(ref, multiple) {
- t.Errorf("%s (%s): squeezing %d bytes one at a time failed", functionName, impl, len(ref))
- }
- }
- })
-}
-
-// sequentialBytes produces a buffer of size consecutive bytes 0x00, 0x01, ..., used for testing.
-func sequentialBytes(size int) []byte {
- result := make([]byte, size)
- for i := range result {
- result[i] = byte(i)
- }
- return result
-}
-
-// BenchmarkPermutationFunction measures the speed of the permutation function
-// with no input data.
-func BenchmarkPermutationFunction(b *testing.B) {
- b.SetBytes(int64(200))
- var lanes [25]uint64
- for i := 0; i < b.N; i++ {
- keccakF1600(&lanes)
- }
-}
-
-// benchmarkHash tests the speed to hash num buffers of buflen each.
-func benchmarkHash(b *testing.B, h hash.Hash, size, num int) {
- b.StopTimer()
- h.Reset()
- data := sequentialBytes(size)
- b.SetBytes(int64(size * num))
- b.StartTimer()
-
- var state []byte
- for i := 0; i < b.N; i++ {
- for j := 0; j < num; j++ {
- h.Write(data)
- }
- state = h.Sum(state[:0])
- }
- b.StopTimer()
- h.Reset()
-}
-
-// benchmarkShake is specialized to the Shake instances, which don't
-// require a copy on reading output.
-func benchmarkShake(b *testing.B, h ShakeHash, size, num int) {
- b.StopTimer()
- h.Reset()
- data := sequentialBytes(size)
- d := make([]byte, 32)
-
- b.SetBytes(int64(size * num))
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- h.Reset()
- for j := 0; j < num; j++ {
- h.Write(data)
- }
- h.Read(d)
- }
-}
-
-func BenchmarkSha3_512_MTU(b *testing.B) { benchmarkHash(b, New512(), 1350, 1) }
-func BenchmarkSha3_384_MTU(b *testing.B) { benchmarkHash(b, New384(), 1350, 1) }
-func BenchmarkSha3_256_MTU(b *testing.B) { benchmarkHash(b, New256(), 1350, 1) }
-func BenchmarkSha3_224_MTU(b *testing.B) { benchmarkHash(b, New224(), 1350, 1) }
-
-func BenchmarkShake128_MTU(b *testing.B) { benchmarkShake(b, NewShake128(), 1350, 1) }
-func BenchmarkShake256_MTU(b *testing.B) { benchmarkShake(b, NewShake256(), 1350, 1) }
-func BenchmarkShake256_16x(b *testing.B) { benchmarkShake(b, NewShake256(), 16, 1024) }
-func BenchmarkShake256_1MiB(b *testing.B) { benchmarkShake(b, NewShake256(), 1024, 1024) }
-
-func BenchmarkSha3_512_1MiB(b *testing.B) { benchmarkHash(b, New512(), 1024, 1024) }
-
-func Example_sum() {
- buf := []byte("some data to hash")
- // A hash needs to be 64 bytes long to have 256-bit collision resistance.
- h := make([]byte, 64)
- // Compute a 64-byte hash of buf and put it in h.
- ShakeSum256(h, buf)
- fmt.Printf("%x\n", h)
- // Output: 0f65fe41fc353e52c55667bb9e2b27bfcc8476f2c413e9437d272ee3194a4e3146d05ec04a25d16b8f577c19b82d16b1424c3e022e783d2b4da98de3658d363d
-}
-
-func Example_mac() {
- k := []byte("this is a secret key; you should generate a strong random key that's at least 32 bytes long")
- buf := []byte("and this is some data to authenticate")
- // A MAC with 32 bytes of output has 256-bit security strength -- if you use at least a 32-byte-long key.
- h := make([]byte, 32)
- d := NewShake256()
- // Write the key into the hash.
- d.Write(k)
- // Now write the data.
- d.Write(buf)
- // Read 32 bytes of output from the hash into h.
- d.Read(h)
- fmt.Printf("%x\n", h)
- // Output: 78de2974bd2711d5549ffd32b753ef0f5fa80a0db2556db60f0987eb8a9218ff
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/shake.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/shake.go
deleted file mode 100644
index 841f9860f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/shake.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 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 file.
-
-package sha3
-
-// This file defines the ShakeHash interface, and provides
-// functions for creating SHAKE instances, as well as utility
-// functions for hashing bytes to arbitrary-length output.
-
-import (
- "io"
-)
-
-// ShakeHash defines the interface to hash functions that
-// support arbitrary-length output.
-type ShakeHash interface {
- // Write absorbs more data into the hash's state. It panics if input is
- // written to it after output has been read from it.
- io.Writer
-
- // Read reads more output from the hash; reading affects the hash's
- // state. (ShakeHash.Read is thus very different from Hash.Sum)
- // It never returns an error.
- io.Reader
-
- // Clone returns a copy of the ShakeHash in its current state.
- Clone() ShakeHash
-
- // Reset resets the ShakeHash to its initial state.
- Reset()
-}
-
-func (d *state) Clone() ShakeHash {
- return d.clone()
-}
-
-// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
-// Its generic security strength is 128 bits against all attacks if at
-// least 32 bytes of its output are used.
-func NewShake128() ShakeHash { return &state{rate: 168, dsbyte: 0x1f} }
-
-// NewShake256 creates a new SHAKE128 variable-output-length ShakeHash.
-// Its generic security strength is 256 bits against all attacks if
-// at least 64 bytes of its output are used.
-func NewShake256() ShakeHash { return &state{rate: 136, dsbyte: 0x1f} }
-
-// ShakeSum128 writes an arbitrary-length digest of data into hash.
-func ShakeSum128(hash, data []byte) {
- h := NewShake128()
- h.Write(data)
- h.Read(hash)
-}
-
-// ShakeSum256 writes an arbitrary-length digest of data into hash.
-func ShakeSum256(hash, data []byte) {
- h := NewShake256()
- h.Write(data)
- h.Read(hash)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate
deleted file mode 100644
index 62e85ae24..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor.go
deleted file mode 100644
index 46a0d63a6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !amd64,!386,!ppc64le appengine
-
-package sha3
-
-var (
- xorIn = xorInGeneric
- copyOut = copyOutGeneric
- xorInUnaligned = xorInGeneric
- copyOutUnaligned = copyOutGeneric
-)
-
-const xorImplementationUnaligned = "generic"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_generic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_generic.go
deleted file mode 100644
index fd35f02ef..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_generic.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 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 file.
-
-package sha3
-
-import "encoding/binary"
-
-// xorInGeneric xors the bytes in buf into the state; it
-// makes no non-portable assumptions about memory layout
-// or alignment.
-func xorInGeneric(d *state, buf []byte) {
- n := len(buf) / 8
-
- for i := 0; i < n; i++ {
- a := binary.LittleEndian.Uint64(buf)
- d.a[i] ^= a
- buf = buf[8:]
- }
-}
-
-// copyOutGeneric copies ulint64s to a byte buffer.
-func copyOutGeneric(d *state, b []byte) {
- for i := 0; len(b) >= 8; i++ {
- binary.LittleEndian.PutUint64(b, d.a[i])
- b = b[8:]
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_unaligned.go
deleted file mode 100644
index 929a486a7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/sha3/xor_unaligned.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build amd64 386 ppc64le
-// +build !appengine
-
-package sha3
-
-import "unsafe"
-
-func xorInUnaligned(d *state, buf []byte) {
- bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))
- n := len(buf)
- if n >= 72 {
- d.a[0] ^= bw[0]
- d.a[1] ^= bw[1]
- d.a[2] ^= bw[2]
- d.a[3] ^= bw[3]
- d.a[4] ^= bw[4]
- d.a[5] ^= bw[5]
- d.a[6] ^= bw[6]
- d.a[7] ^= bw[7]
- d.a[8] ^= bw[8]
- }
- if n >= 104 {
- d.a[9] ^= bw[9]
- d.a[10] ^= bw[10]
- d.a[11] ^= bw[11]
- d.a[12] ^= bw[12]
- }
- if n >= 136 {
- d.a[13] ^= bw[13]
- d.a[14] ^= bw[14]
- d.a[15] ^= bw[15]
- d.a[16] ^= bw[16]
- }
- if n >= 144 {
- d.a[17] ^= bw[17]
- }
- if n >= 168 {
- d.a[18] ^= bw[18]
- d.a[19] ^= bw[19]
- d.a[20] ^= bw[20]
- }
-}
-
-func copyOutUnaligned(d *state, buf []byte) {
- ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
- copy(buf, ab[:])
-}
-
-var (
- xorIn = xorInUnaligned
- copyOut = copyOutUnaligned
-)
-
-const xorImplementationUnaligned = "unaligned"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client.go
deleted file mode 100644
index dce7682fa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client.go
+++ /dev/null
@@ -1,683 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package agent implements the ssh-agent protocol, and provides both
-// a client and a server. The client can talk to a standard ssh-agent
-// that uses UNIX sockets, and one could implement an alternative
-// ssh-agent process using the sample server.
-//
-// References:
-// [PROTOCOL.agent]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.agent?rev=HEAD
-package agent // import "golang.org/x/crypto/ssh/agent"
-
-import (
- "bytes"
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rsa"
- "encoding/base64"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "math/big"
- "sync"
-
- "golang.org/x/crypto/ed25519"
- "golang.org/x/crypto/ssh"
-)
-
-// Agent represents the capabilities of an ssh-agent.
-type Agent interface {
- // List returns the identities known to the agent.
- List() ([]*Key, error)
-
- // Sign has the agent sign the data using a protocol 2 key as defined
- // in [PROTOCOL.agent] section 2.6.2.
- Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)
-
- // Add adds a private key to the agent.
- Add(key AddedKey) error
-
- // Remove removes all identities with the given public key.
- Remove(key ssh.PublicKey) error
-
- // RemoveAll removes all identities.
- RemoveAll() error
-
- // Lock locks the agent. Sign and Remove will fail, and List will empty an empty list.
- Lock(passphrase []byte) error
-
- // Unlock undoes the effect of Lock
- Unlock(passphrase []byte) error
-
- // Signers returns signers for all the known keys.
- Signers() ([]ssh.Signer, error)
-}
-
-// ConstraintExtension describes an optional constraint defined by users.
-type ConstraintExtension struct {
- // ExtensionName consist of a UTF-8 string suffixed by the
- // implementation domain following the naming scheme defined
- // in Section 4.2 of [RFC4251], e.g. "foo@example.com".
- ExtensionName string
- // ExtensionDetails contains the actual content of the extended
- // constraint.
- ExtensionDetails []byte
-}
-
-// AddedKey describes an SSH key to be added to an Agent.
-type AddedKey struct {
- // PrivateKey must be a *rsa.PrivateKey, *dsa.PrivateKey or
- // *ecdsa.PrivateKey, which will be inserted into the agent.
- PrivateKey interface{}
- // Certificate, if not nil, is communicated to the agent and will be
- // stored with the key.
- Certificate *ssh.Certificate
- // Comment is an optional, free-form string.
- Comment string
- // LifetimeSecs, if not zero, is the number of seconds that the
- // agent will store the key for.
- LifetimeSecs uint32
- // ConfirmBeforeUse, if true, requests that the agent confirm with the
- // user before each use of this key.
- ConfirmBeforeUse bool
- // ConstraintExtensions are the experimental or private-use constraints
- // defined by users.
- ConstraintExtensions []ConstraintExtension
-}
-
-// See [PROTOCOL.agent], section 3.
-const (
- agentRequestV1Identities = 1
- agentRemoveAllV1Identities = 9
-
- // 3.2 Requests from client to agent for protocol 2 key operations
- agentAddIdentity = 17
- agentRemoveIdentity = 18
- agentRemoveAllIdentities = 19
- agentAddIdConstrained = 25
-
- // 3.3 Key-type independent requests from client to agent
- agentAddSmartcardKey = 20
- agentRemoveSmartcardKey = 21
- agentLock = 22
- agentUnlock = 23
- agentAddSmartcardKeyConstrained = 26
-
- // 3.7 Key constraint identifiers
- agentConstrainLifetime = 1
- agentConstrainConfirm = 2
- agentConstrainExtension = 3
-)
-
-// maxAgentResponseBytes is the maximum agent reply size that is accepted. This
-// is a sanity check, not a limit in the spec.
-const maxAgentResponseBytes = 16 << 20
-
-// Agent messages:
-// These structures mirror the wire format of the corresponding ssh agent
-// messages found in [PROTOCOL.agent].
-
-// 3.4 Generic replies from agent to client
-const agentFailure = 5
-
-type failureAgentMsg struct{}
-
-const agentSuccess = 6
-
-type successAgentMsg struct{}
-
-// See [PROTOCOL.agent], section 2.5.2.
-const agentRequestIdentities = 11
-
-type requestIdentitiesAgentMsg struct{}
-
-// See [PROTOCOL.agent], section 2.5.2.
-const agentIdentitiesAnswer = 12
-
-type identitiesAnswerAgentMsg struct {
- NumKeys uint32 `sshtype:"12"`
- Keys []byte `ssh:"rest"`
-}
-
-// See [PROTOCOL.agent], section 2.6.2.
-const agentSignRequest = 13
-
-type signRequestAgentMsg struct {
- KeyBlob []byte `sshtype:"13"`
- Data []byte
- Flags uint32
-}
-
-// See [PROTOCOL.agent], section 2.6.2.
-
-// 3.6 Replies from agent to client for protocol 2 key operations
-const agentSignResponse = 14
-
-type signResponseAgentMsg struct {
- SigBlob []byte `sshtype:"14"`
-}
-
-type publicKey struct {
- Format string
- Rest []byte `ssh:"rest"`
-}
-
-// 3.7 Key constraint identifiers
-type constrainLifetimeAgentMsg struct {
- LifetimeSecs uint32 `sshtype:"1"`
-}
-
-type constrainExtensionAgentMsg struct {
- ExtensionName string `sshtype:"3"`
- ExtensionDetails []byte
-
- // Rest is a field used for parsing, not part of message
- Rest []byte `ssh:"rest"`
-}
-
-// Key represents a protocol 2 public key as defined in
-// [PROTOCOL.agent], section 2.5.2.
-type Key struct {
- Format string
- Blob []byte
- Comment string
-}
-
-func clientErr(err error) error {
- return fmt.Errorf("agent: client error: %v", err)
-}
-
-// String returns the storage form of an agent key with the format, base64
-// encoded serialized key, and the comment if it is not empty.
-func (k *Key) String() string {
- s := string(k.Format) + " " + base64.StdEncoding.EncodeToString(k.Blob)
-
- if k.Comment != "" {
- s += " " + k.Comment
- }
-
- return s
-}
-
-// Type returns the public key type.
-func (k *Key) Type() string {
- return k.Format
-}
-
-// Marshal returns key blob to satisfy the ssh.PublicKey interface.
-func (k *Key) Marshal() []byte {
- return k.Blob
-}
-
-// Verify satisfies the ssh.PublicKey interface.
-func (k *Key) Verify(data []byte, sig *ssh.Signature) error {
- pubKey, err := ssh.ParsePublicKey(k.Blob)
- if err != nil {
- return fmt.Errorf("agent: bad public key: %v", err)
- }
- return pubKey.Verify(data, sig)
-}
-
-type wireKey struct {
- Format string
- Rest []byte `ssh:"rest"`
-}
-
-func parseKey(in []byte) (out *Key, rest []byte, err error) {
- var record struct {
- Blob []byte
- Comment string
- Rest []byte `ssh:"rest"`
- }
-
- if err := ssh.Unmarshal(in, &record); err != nil {
- return nil, nil, err
- }
-
- var wk wireKey
- if err := ssh.Unmarshal(record.Blob, &wk); err != nil {
- return nil, nil, err
- }
-
- return &Key{
- Format: wk.Format,
- Blob: record.Blob,
- Comment: record.Comment,
- }, record.Rest, nil
-}
-
-// client is a client for an ssh-agent process.
-type client struct {
- // conn is typically a *net.UnixConn
- conn io.ReadWriter
- // mu is used to prevent concurrent access to the agent
- mu sync.Mutex
-}
-
-// NewClient returns an Agent that talks to an ssh-agent process over
-// the given connection.
-func NewClient(rw io.ReadWriter) Agent {
- return &client{conn: rw}
-}
-
-// call sends an RPC to the agent. On success, the reply is
-// unmarshaled into reply and replyType is set to the first byte of
-// the reply, which contains the type of the message.
-func (c *client) call(req []byte) (reply interface{}, err error) {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- msg := make([]byte, 4+len(req))
- binary.BigEndian.PutUint32(msg, uint32(len(req)))
- copy(msg[4:], req)
- if _, err = c.conn.Write(msg); err != nil {
- return nil, clientErr(err)
- }
-
- var respSizeBuf [4]byte
- if _, err = io.ReadFull(c.conn, respSizeBuf[:]); err != nil {
- return nil, clientErr(err)
- }
- respSize := binary.BigEndian.Uint32(respSizeBuf[:])
- if respSize > maxAgentResponseBytes {
- return nil, clientErr(err)
- }
-
- buf := make([]byte, respSize)
- if _, err = io.ReadFull(c.conn, buf); err != nil {
- return nil, clientErr(err)
- }
- reply, err = unmarshal(buf)
- if err != nil {
- return nil, clientErr(err)
- }
- return reply, err
-}
-
-func (c *client) simpleCall(req []byte) error {
- resp, err := c.call(req)
- if err != nil {
- return err
- }
- if _, ok := resp.(*successAgentMsg); ok {
- return nil
- }
- return errors.New("agent: failure")
-}
-
-func (c *client) RemoveAll() error {
- return c.simpleCall([]byte{agentRemoveAllIdentities})
-}
-
-func (c *client) Remove(key ssh.PublicKey) error {
- req := ssh.Marshal(&agentRemoveIdentityMsg{
- KeyBlob: key.Marshal(),
- })
- return c.simpleCall(req)
-}
-
-func (c *client) Lock(passphrase []byte) error {
- req := ssh.Marshal(&agentLockMsg{
- Passphrase: passphrase,
- })
- return c.simpleCall(req)
-}
-
-func (c *client) Unlock(passphrase []byte) error {
- req := ssh.Marshal(&agentUnlockMsg{
- Passphrase: passphrase,
- })
- return c.simpleCall(req)
-}
-
-// List returns the identities known to the agent.
-func (c *client) List() ([]*Key, error) {
- // see [PROTOCOL.agent] section 2.5.2.
- req := []byte{agentRequestIdentities}
-
- msg, err := c.call(req)
- if err != nil {
- return nil, err
- }
-
- switch msg := msg.(type) {
- case *identitiesAnswerAgentMsg:
- if msg.NumKeys > maxAgentResponseBytes/8 {
- return nil, errors.New("agent: too many keys in agent reply")
- }
- keys := make([]*Key, msg.NumKeys)
- data := msg.Keys
- for i := uint32(0); i < msg.NumKeys; i++ {
- var key *Key
- var err error
- if key, data, err = parseKey(data); err != nil {
- return nil, err
- }
- keys[i] = key
- }
- return keys, nil
- case *failureAgentMsg:
- return nil, errors.New("agent: failed to list keys")
- }
- panic("unreachable")
-}
-
-// Sign has the agent sign the data using a protocol 2 key as defined
-// in [PROTOCOL.agent] section 2.6.2.
-func (c *client) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) {
- req := ssh.Marshal(signRequestAgentMsg{
- KeyBlob: key.Marshal(),
- Data: data,
- })
-
- msg, err := c.call(req)
- if err != nil {
- return nil, err
- }
-
- switch msg := msg.(type) {
- case *signResponseAgentMsg:
- var sig ssh.Signature
- if err := ssh.Unmarshal(msg.SigBlob, &sig); err != nil {
- return nil, err
- }
-
- return &sig, nil
- case *failureAgentMsg:
- return nil, errors.New("agent: failed to sign challenge")
- }
- panic("unreachable")
-}
-
-// unmarshal parses an agent message in packet, returning the parsed
-// form and the message type of packet.
-func unmarshal(packet []byte) (interface{}, error) {
- if len(packet) < 1 {
- return nil, errors.New("agent: empty packet")
- }
- var msg interface{}
- switch packet[0] {
- case agentFailure:
- return new(failureAgentMsg), nil
- case agentSuccess:
- return new(successAgentMsg), nil
- case agentIdentitiesAnswer:
- msg = new(identitiesAnswerAgentMsg)
- case agentSignResponse:
- msg = new(signResponseAgentMsg)
- case agentV1IdentitiesAnswer:
- msg = new(agentV1IdentityMsg)
- default:
- return nil, fmt.Errorf("agent: unknown type tag %d", packet[0])
- }
- if err := ssh.Unmarshal(packet, msg); err != nil {
- return nil, err
- }
- return msg, nil
-}
-
-type rsaKeyMsg struct {
- Type string `sshtype:"17|25"`
- N *big.Int
- E *big.Int
- D *big.Int
- Iqmp *big.Int // IQMP = Inverse Q Mod P
- P *big.Int
- Q *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type dsaKeyMsg struct {
- Type string `sshtype:"17|25"`
- P *big.Int
- Q *big.Int
- G *big.Int
- Y *big.Int
- X *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type ecdsaKeyMsg struct {
- Type string `sshtype:"17|25"`
- Curve string
- KeyBytes []byte
- D *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type ed25519KeyMsg struct {
- Type string `sshtype:"17|25"`
- Pub []byte
- Priv []byte
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-// Insert adds a private key to the agent.
-func (c *client) insertKey(s interface{}, comment string, constraints []byte) error {
- var req []byte
- switch k := s.(type) {
- case *rsa.PrivateKey:
- if len(k.Primes) != 2 {
- return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes))
- }
- k.Precompute()
- req = ssh.Marshal(rsaKeyMsg{
- Type: ssh.KeyAlgoRSA,
- N: k.N,
- E: big.NewInt(int64(k.E)),
- D: k.D,
- Iqmp: k.Precomputed.Qinv,
- P: k.Primes[0],
- Q: k.Primes[1],
- Comments: comment,
- Constraints: constraints,
- })
- case *dsa.PrivateKey:
- req = ssh.Marshal(dsaKeyMsg{
- Type: ssh.KeyAlgoDSA,
- P: k.P,
- Q: k.Q,
- G: k.G,
- Y: k.Y,
- X: k.X,
- Comments: comment,
- Constraints: constraints,
- })
- case *ecdsa.PrivateKey:
- nistID := fmt.Sprintf("nistp%d", k.Params().BitSize)
- req = ssh.Marshal(ecdsaKeyMsg{
- Type: "ecdsa-sha2-" + nistID,
- Curve: nistID,
- KeyBytes: elliptic.Marshal(k.Curve, k.X, k.Y),
- D: k.D,
- Comments: comment,
- Constraints: constraints,
- })
- case *ed25519.PrivateKey:
- req = ssh.Marshal(ed25519KeyMsg{
- Type: ssh.KeyAlgoED25519,
- Pub: []byte(*k)[32:],
- Priv: []byte(*k),
- Comments: comment,
- Constraints: constraints,
- })
- default:
- return fmt.Errorf("agent: unsupported key type %T", s)
- }
-
- // if constraints are present then the message type needs to be changed.
- if len(constraints) != 0 {
- req[0] = agentAddIdConstrained
- }
-
- resp, err := c.call(req)
- if err != nil {
- return err
- }
- if _, ok := resp.(*successAgentMsg); ok {
- return nil
- }
- return errors.New("agent: failure")
-}
-
-type rsaCertMsg struct {
- Type string `sshtype:"17|25"`
- CertBytes []byte
- D *big.Int
- Iqmp *big.Int // IQMP = Inverse Q Mod P
- P *big.Int
- Q *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type dsaCertMsg struct {
- Type string `sshtype:"17|25"`
- CertBytes []byte
- X *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type ecdsaCertMsg struct {
- Type string `sshtype:"17|25"`
- CertBytes []byte
- D *big.Int
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-type ed25519CertMsg struct {
- Type string `sshtype:"17|25"`
- CertBytes []byte
- Pub []byte
- Priv []byte
- Comments string
- Constraints []byte `ssh:"rest"`
-}
-
-// Add adds a private key to the agent. If a certificate is given,
-// that certificate is added instead as public key.
-func (c *client) Add(key AddedKey) error {
- var constraints []byte
-
- if secs := key.LifetimeSecs; secs != 0 {
- constraints = append(constraints, ssh.Marshal(constrainLifetimeAgentMsg{secs})...)
- }
-
- if key.ConfirmBeforeUse {
- constraints = append(constraints, agentConstrainConfirm)
- }
-
- if cert := key.Certificate; cert == nil {
- return c.insertKey(key.PrivateKey, key.Comment, constraints)
- } else {
- return c.insertCert(key.PrivateKey, cert, key.Comment, constraints)
- }
-}
-
-func (c *client) insertCert(s interface{}, cert *ssh.Certificate, comment string, constraints []byte) error {
- var req []byte
- switch k := s.(type) {
- case *rsa.PrivateKey:
- if len(k.Primes) != 2 {
- return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes))
- }
- k.Precompute()
- req = ssh.Marshal(rsaCertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- D: k.D,
- Iqmp: k.Precomputed.Qinv,
- P: k.Primes[0],
- Q: k.Primes[1],
- Comments: comment,
- Constraints: constraints,
- })
- case *dsa.PrivateKey:
- req = ssh.Marshal(dsaCertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- X: k.X,
- Comments: comment,
- Constraints: constraints,
- })
- case *ecdsa.PrivateKey:
- req = ssh.Marshal(ecdsaCertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- D: k.D,
- Comments: comment,
- Constraints: constraints,
- })
- case *ed25519.PrivateKey:
- req = ssh.Marshal(ed25519CertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- Pub: []byte(*k)[32:],
- Priv: []byte(*k),
- Comments: comment,
- Constraints: constraints,
- })
- default:
- return fmt.Errorf("agent: unsupported key type %T", s)
- }
-
- // if constraints are present then the message type needs to be changed.
- if len(constraints) != 0 {
- req[0] = agentAddIdConstrained
- }
-
- signer, err := ssh.NewSignerFromKey(s)
- if err != nil {
- return err
- }
- if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 {
- return errors.New("agent: signer and cert have different public key")
- }
-
- resp, err := c.call(req)
- if err != nil {
- return err
- }
- if _, ok := resp.(*successAgentMsg); ok {
- return nil
- }
- return errors.New("agent: failure")
-}
-
-// Signers provides a callback for client authentication.
-func (c *client) Signers() ([]ssh.Signer, error) {
- keys, err := c.List()
- if err != nil {
- return nil, err
- }
-
- var result []ssh.Signer
- for _, k := range keys {
- result = append(result, &agentKeyringSigner{c, k})
- }
- return result, nil
-}
-
-type agentKeyringSigner struct {
- agent *client
- pub ssh.PublicKey
-}
-
-func (s *agentKeyringSigner) PublicKey() ssh.PublicKey {
- return s.pub
-}
-
-func (s *agentKeyringSigner) Sign(rand io.Reader, data []byte) (*ssh.Signature, error) {
- // The agent has its own entropy source, so the rand argument is ignored.
- return s.agent.Sign(s.pub, data)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client_test.go
deleted file mode 100644
index 266fd6d40..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/client_test.go
+++ /dev/null
@@ -1,379 +0,0 @@
-// Copyright 2012 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 file.
-
-package agent
-
-import (
- "bytes"
- "crypto/rand"
- "errors"
- "net"
- "os"
- "os/exec"
- "path/filepath"
- "strconv"
- "testing"
- "time"
-
- "golang.org/x/crypto/ssh"
-)
-
-// startOpenSSHAgent executes ssh-agent, and returns an Agent interface to it.
-func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func()) {
- if testing.Short() {
- // ssh-agent is not always available, and the key
- // types supported vary by platform.
- t.Skip("skipping test due to -short")
- }
-
- bin, err := exec.LookPath("ssh-agent")
- if err != nil {
- t.Skip("could not find ssh-agent")
- }
-
- cmd := exec.Command(bin, "-s")
- out, err := cmd.Output()
- if err != nil {
- t.Fatalf("cmd.Output: %v", err)
- }
-
- /* Output looks like:
-
- SSH_AUTH_SOCK=/tmp/ssh-P65gpcqArqvH/agent.15541; export SSH_AUTH_SOCK;
- SSH_AGENT_PID=15542; export SSH_AGENT_PID;
- echo Agent pid 15542;
- */
- fields := bytes.Split(out, []byte(";"))
- line := bytes.SplitN(fields[0], []byte("="), 2)
- line[0] = bytes.TrimLeft(line[0], "\n")
- if string(line[0]) != "SSH_AUTH_SOCK" {
- t.Fatalf("could not find key SSH_AUTH_SOCK in %q", fields[0])
- }
- socket = string(line[1])
-
- line = bytes.SplitN(fields[2], []byte("="), 2)
- line[0] = bytes.TrimLeft(line[0], "\n")
- if string(line[0]) != "SSH_AGENT_PID" {
- t.Fatalf("could not find key SSH_AGENT_PID in %q", fields[2])
- }
- pidStr := line[1]
- pid, err := strconv.Atoi(string(pidStr))
- if err != nil {
- t.Fatalf("Atoi(%q): %v", pidStr, err)
- }
-
- conn, err := net.Dial("unix", string(socket))
- if err != nil {
- t.Fatalf("net.Dial: %v", err)
- }
-
- ac := NewClient(conn)
- return ac, socket, func() {
- proc, _ := os.FindProcess(pid)
- if proc != nil {
- proc.Kill()
- }
- conn.Close()
- os.RemoveAll(filepath.Dir(socket))
- }
-}
-
-// startKeyringAgent uses Keyring to simulate a ssh-agent Server and returns a client.
-func startKeyringAgent(t *testing.T) (client Agent, cleanup func()) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- go ServeAgent(NewKeyring(), c2)
-
- return NewClient(c1), func() {
- c1.Close()
- c2.Close()
- }
-}
-
-func testOpenSSHAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) {
- agent, _, cleanup := startOpenSSHAgent(t)
- defer cleanup()
-
- testAgentInterface(t, agent, key, cert, lifetimeSecs)
-}
-
-func testKeyringAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) {
- agent, cleanup := startKeyringAgent(t)
- defer cleanup()
-
- testAgentInterface(t, agent, key, cert, lifetimeSecs)
-}
-
-func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) {
- signer, err := ssh.NewSignerFromKey(key)
- if err != nil {
- t.Fatalf("NewSignerFromKey(%T): %v", key, err)
- }
- // The agent should start up empty.
- if keys, err := agent.List(); err != nil {
- t.Fatalf("RequestIdentities: %v", err)
- } else if len(keys) > 0 {
- t.Fatalf("got %d keys, want 0: %v", len(keys), keys)
- }
-
- // Attempt to insert the key, with certificate if specified.
- var pubKey ssh.PublicKey
- if cert != nil {
- err = agent.Add(AddedKey{
- PrivateKey: key,
- Certificate: cert,
- Comment: "comment",
- LifetimeSecs: lifetimeSecs,
- })
- pubKey = cert
- } else {
- err = agent.Add(AddedKey{PrivateKey: key, Comment: "comment", LifetimeSecs: lifetimeSecs})
- pubKey = signer.PublicKey()
- }
- if err != nil {
- t.Fatalf("insert(%T): %v", key, err)
- }
-
- // Did the key get inserted successfully?
- if keys, err := agent.List(); err != nil {
- t.Fatalf("List: %v", err)
- } else if len(keys) != 1 {
- t.Fatalf("got %v, want 1 key", keys)
- } else if keys[0].Comment != "comment" {
- t.Fatalf("key comment: got %v, want %v", keys[0].Comment, "comment")
- } else if !bytes.Equal(keys[0].Blob, pubKey.Marshal()) {
- t.Fatalf("key mismatch")
- }
-
- // Can the agent make a valid signature?
- data := []byte("hello")
- sig, err := agent.Sign(pubKey, data)
- if err != nil {
- t.Fatalf("Sign(%s): %v", pubKey.Type(), err)
- }
-
- if err := pubKey.Verify(data, sig); err != nil {
- t.Fatalf("Verify(%s): %v", pubKey.Type(), err)
- }
-
- // If the key has a lifetime, is it removed when it should be?
- if lifetimeSecs > 0 {
- time.Sleep(time.Second*time.Duration(lifetimeSecs) + 100*time.Millisecond)
- keys, err := agent.List()
- if err != nil {
- t.Fatalf("List: %v", err)
- }
- if len(keys) > 0 {
- t.Fatalf("key not expired")
- }
- }
-
-}
-
-func TestAgent(t *testing.T) {
- for _, keyType := range []string{"rsa", "dsa", "ecdsa", "ed25519"} {
- testOpenSSHAgent(t, testPrivateKeys[keyType], nil, 0)
- testKeyringAgent(t, testPrivateKeys[keyType], nil, 0)
- }
-}
-
-func TestCert(t *testing.T) {
- cert := &ssh.Certificate{
- Key: testPublicKeys["rsa"],
- ValidBefore: ssh.CertTimeInfinity,
- CertType: ssh.UserCert,
- }
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
-
- testOpenSSHAgent(t, testPrivateKeys["rsa"], cert, 0)
- testKeyringAgent(t, testPrivateKeys["rsa"], cert, 0)
-}
-
-// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and
-// therefore is buffered (net.Pipe deadlocks if both sides start with
-// a write.)
-func netPipe() (net.Conn, net.Conn, error) {
- listener, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- listener, err = net.Listen("tcp", "[::1]:0")
- if err != nil {
- return nil, nil, err
- }
- }
- defer listener.Close()
- c1, err := net.Dial("tcp", listener.Addr().String())
- if err != nil {
- return nil, nil, err
- }
-
- c2, err := listener.Accept()
- if err != nil {
- c1.Close()
- return nil, nil, err
- }
-
- return c1, c2, nil
-}
-
-func TestAuth(t *testing.T) {
- agent, _, cleanup := startOpenSSHAgent(t)
- defer cleanup()
-
- a, b, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
-
- defer a.Close()
- defer b.Close()
-
- if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["rsa"], Comment: "comment"}); err != nil {
- t.Errorf("Add: %v", err)
- }
-
- serverConf := ssh.ServerConfig{}
- serverConf.AddHostKey(testSigners["rsa"])
- serverConf.PublicKeyCallback = func(c ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) {
- if bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) {
- return nil, nil
- }
-
- return nil, errors.New("pubkey rejected")
- }
-
- go func() {
- conn, _, _, err := ssh.NewServerConn(a, &serverConf)
- if err != nil {
- t.Fatalf("Server: %v", err)
- }
- conn.Close()
- }()
-
- conf := ssh.ClientConfig{
- HostKeyCallback: ssh.InsecureIgnoreHostKey(),
- }
- conf.Auth = append(conf.Auth, ssh.PublicKeysCallback(agent.Signers))
- conn, _, _, err := ssh.NewClientConn(b, "", &conf)
- if err != nil {
- t.Fatalf("NewClientConn: %v", err)
- }
- conn.Close()
-}
-
-func TestLockOpenSSHAgent(t *testing.T) {
- agent, _, cleanup := startOpenSSHAgent(t)
- defer cleanup()
- testLockAgent(agent, t)
-}
-
-func TestLockKeyringAgent(t *testing.T) {
- agent, cleanup := startKeyringAgent(t)
- defer cleanup()
- testLockAgent(agent, t)
-}
-
-func testLockAgent(agent Agent, t *testing.T) {
- if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["rsa"], Comment: "comment 1"}); err != nil {
- t.Errorf("Add: %v", err)
- }
- if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["dsa"], Comment: "comment dsa"}); err != nil {
- t.Errorf("Add: %v", err)
- }
- if keys, err := agent.List(); err != nil {
- t.Errorf("List: %v", err)
- } else if len(keys) != 2 {
- t.Errorf("Want 2 keys, got %v", keys)
- }
-
- passphrase := []byte("secret")
- if err := agent.Lock(passphrase); err != nil {
- t.Errorf("Lock: %v", err)
- }
-
- if keys, err := agent.List(); err != nil {
- t.Errorf("List: %v", err)
- } else if len(keys) != 0 {
- t.Errorf("Want 0 keys, got %v", keys)
- }
-
- signer, _ := ssh.NewSignerFromKey(testPrivateKeys["rsa"])
- if _, err := agent.Sign(signer.PublicKey(), []byte("hello")); err == nil {
- t.Fatalf("Sign did not fail")
- }
-
- if err := agent.Remove(signer.PublicKey()); err == nil {
- t.Fatalf("Remove did not fail")
- }
-
- if err := agent.RemoveAll(); err == nil {
- t.Fatalf("RemoveAll did not fail")
- }
-
- if err := agent.Unlock(nil); err == nil {
- t.Errorf("Unlock with wrong passphrase succeeded")
- }
- if err := agent.Unlock(passphrase); err != nil {
- t.Errorf("Unlock: %v", err)
- }
-
- if err := agent.Remove(signer.PublicKey()); err != nil {
- t.Fatalf("Remove: %v", err)
- }
-
- if keys, err := agent.List(); err != nil {
- t.Errorf("List: %v", err)
- } else if len(keys) != 1 {
- t.Errorf("Want 1 keys, got %v", keys)
- }
-}
-
-func testOpenSSHAgentLifetime(t *testing.T) {
- agent, _, cleanup := startOpenSSHAgent(t)
- defer cleanup()
- testAgentLifetime(t, agent)
-}
-
-func testKeyringAgentLifetime(t *testing.T) {
- agent, cleanup := startKeyringAgent(t)
- defer cleanup()
- testAgentLifetime(t, agent)
-}
-
-func testAgentLifetime(t *testing.T, agent Agent) {
- for _, keyType := range []string{"rsa", "dsa", "ecdsa"} {
- // Add private keys to the agent.
- err := agent.Add(AddedKey{
- PrivateKey: testPrivateKeys[keyType],
- Comment: "comment",
- LifetimeSecs: 1,
- })
- if err != nil {
- t.Fatalf("add: %v", err)
- }
- // Add certs to the agent.
- cert := &ssh.Certificate{
- Key: testPublicKeys[keyType],
- ValidBefore: ssh.CertTimeInfinity,
- CertType: ssh.UserCert,
- }
- cert.SignCert(rand.Reader, testSigners[keyType])
- err = agent.Add(AddedKey{
- PrivateKey: testPrivateKeys[keyType],
- Certificate: cert,
- Comment: "comment",
- LifetimeSecs: 1,
- })
- if err != nil {
- t.Fatalf("add: %v", err)
- }
- }
- time.Sleep(1100 * time.Millisecond)
- if keys, err := agent.List(); err != nil {
- t.Errorf("List: %v", err)
- } else if len(keys) != 0 {
- t.Errorf("Want 0 keys, got %v", len(keys))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/example_test.go
deleted file mode 100644
index 85562253e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/example_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2016 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 file.
-
-package agent_test
-
-import (
- "log"
- "net"
- "os"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/agent"
-)
-
-func ExampleClientAgent() {
- // ssh-agent has a UNIX socket under $SSH_AUTH_SOCK
- socket := os.Getenv("SSH_AUTH_SOCK")
- conn, err := net.Dial("unix", socket)
- if err != nil {
- log.Fatalf("net.Dial: %v", err)
- }
- agentClient := agent.NewClient(conn)
- config := &ssh.ClientConfig{
- User: "username",
- Auth: []ssh.AuthMethod{
- // Use a callback rather than PublicKeys
- // so we only consult the agent once the remote server
- // wants it.
- ssh.PublicKeysCallback(agentClient.Signers),
- },
- HostKeyCallback: ssh.InsecureIgnoreHostKey(),
- }
-
- sshc, err := ssh.Dial("tcp", "localhost:22", config)
- if err != nil {
- log.Fatalf("Dial: %v", err)
- }
- // .. use sshc
- sshc.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/forward.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/forward.go
deleted file mode 100644
index fd24ba900..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/forward.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2014 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 file.
-
-package agent
-
-import (
- "errors"
- "io"
- "net"
- "sync"
-
- "golang.org/x/crypto/ssh"
-)
-
-// RequestAgentForwarding sets up agent forwarding for the session.
-// ForwardToAgent or ForwardToRemote should be called to route
-// the authentication requests.
-func RequestAgentForwarding(session *ssh.Session) error {
- ok, err := session.SendRequest("auth-agent-req@openssh.com", true, nil)
- if err != nil {
- return err
- }
- if !ok {
- return errors.New("forwarding request denied")
- }
- return nil
-}
-
-// ForwardToAgent routes authentication requests to the given keyring.
-func ForwardToAgent(client *ssh.Client, keyring Agent) error {
- channels := client.HandleChannelOpen(channelType)
- if channels == nil {
- return errors.New("agent: already have handler for " + channelType)
- }
-
- go func() {
- for ch := range channels {
- channel, reqs, err := ch.Accept()
- if err != nil {
- continue
- }
- go ssh.DiscardRequests(reqs)
- go func() {
- ServeAgent(keyring, channel)
- channel.Close()
- }()
- }
- }()
- return nil
-}
-
-const channelType = "auth-agent@openssh.com"
-
-// ForwardToRemote routes authentication requests to the ssh-agent
-// process serving on the given unix socket.
-func ForwardToRemote(client *ssh.Client, addr string) error {
- channels := client.HandleChannelOpen(channelType)
- if channels == nil {
- return errors.New("agent: already have handler for " + channelType)
- }
- conn, err := net.Dial("unix", addr)
- if err != nil {
- return err
- }
- conn.Close()
-
- go func() {
- for ch := range channels {
- channel, reqs, err := ch.Accept()
- if err != nil {
- continue
- }
- go ssh.DiscardRequests(reqs)
- go forwardUnixSocket(channel, addr)
- }
- }()
- return nil
-}
-
-func forwardUnixSocket(channel ssh.Channel, addr string) {
- conn, err := net.Dial("unix", addr)
- if err != nil {
- return
- }
-
- var wg sync.WaitGroup
- wg.Add(2)
- go func() {
- io.Copy(conn, channel)
- conn.(*net.UnixConn).CloseWrite()
- wg.Done()
- }()
- go func() {
- io.Copy(channel, conn)
- channel.CloseWrite()
- wg.Done()
- }()
-
- wg.Wait()
- conn.Close()
- channel.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring.go
deleted file mode 100644
index a6ba06ab3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring.go
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2014 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 file.
-
-package agent
-
-import (
- "bytes"
- "crypto/rand"
- "crypto/subtle"
- "errors"
- "fmt"
- "sync"
- "time"
-
- "golang.org/x/crypto/ssh"
-)
-
-type privKey struct {
- signer ssh.Signer
- comment string
- expire *time.Time
-}
-
-type keyring struct {
- mu sync.Mutex
- keys []privKey
-
- locked bool
- passphrase []byte
-}
-
-var errLocked = errors.New("agent: locked")
-
-// NewKeyring returns an Agent that holds keys in memory. It is safe
-// for concurrent use by multiple goroutines.
-func NewKeyring() Agent {
- return &keyring{}
-}
-
-// RemoveAll removes all identities.
-func (r *keyring) RemoveAll() error {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return errLocked
- }
-
- r.keys = nil
- return nil
-}
-
-// removeLocked does the actual key removal. The caller must already be holding the
-// keyring mutex.
-func (r *keyring) removeLocked(want []byte) error {
- found := false
- for i := 0; i < len(r.keys); {
- if bytes.Equal(r.keys[i].signer.PublicKey().Marshal(), want) {
- found = true
- r.keys[i] = r.keys[len(r.keys)-1]
- r.keys = r.keys[:len(r.keys)-1]
- continue
- } else {
- i++
- }
- }
-
- if !found {
- return errors.New("agent: key not found")
- }
- return nil
-}
-
-// Remove removes all identities with the given public key.
-func (r *keyring) Remove(key ssh.PublicKey) error {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return errLocked
- }
-
- return r.removeLocked(key.Marshal())
-}
-
-// Lock locks the agent. Sign and Remove will fail, and List will return an empty list.
-func (r *keyring) Lock(passphrase []byte) error {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return errLocked
- }
-
- r.locked = true
- r.passphrase = passphrase
- return nil
-}
-
-// Unlock undoes the effect of Lock
-func (r *keyring) Unlock(passphrase []byte) error {
- r.mu.Lock()
- defer r.mu.Unlock()
- if !r.locked {
- return errors.New("agent: not locked")
- }
- if len(passphrase) != len(r.passphrase) || 1 != subtle.ConstantTimeCompare(passphrase, r.passphrase) {
- return fmt.Errorf("agent: incorrect passphrase")
- }
-
- r.locked = false
- r.passphrase = nil
- return nil
-}
-
-// expireKeysLocked removes expired keys from the keyring. If a key was added
-// with a lifetimesecs contraint and seconds >= lifetimesecs seconds have
-// ellapsed, it is removed. The caller *must* be holding the keyring mutex.
-func (r *keyring) expireKeysLocked() {
- for _, k := range r.keys {
- if k.expire != nil && time.Now().After(*k.expire) {
- r.removeLocked(k.signer.PublicKey().Marshal())
- }
- }
-}
-
-// List returns the identities known to the agent.
-func (r *keyring) List() ([]*Key, error) {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- // section 2.7: locked agents return empty.
- return nil, nil
- }
-
- r.expireKeysLocked()
- var ids []*Key
- for _, k := range r.keys {
- pub := k.signer.PublicKey()
- ids = append(ids, &Key{
- Format: pub.Type(),
- Blob: pub.Marshal(),
- Comment: k.comment})
- }
- return ids, nil
-}
-
-// Insert adds a private key to the keyring. If a certificate
-// is given, that certificate is added as public key. Note that
-// any constraints given are ignored.
-func (r *keyring) Add(key AddedKey) error {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return errLocked
- }
- signer, err := ssh.NewSignerFromKey(key.PrivateKey)
-
- if err != nil {
- return err
- }
-
- if cert := key.Certificate; cert != nil {
- signer, err = ssh.NewCertSigner(cert, signer)
- if err != nil {
- return err
- }
- }
-
- p := privKey{
- signer: signer,
- comment: key.Comment,
- }
-
- if key.LifetimeSecs > 0 {
- t := time.Now().Add(time.Duration(key.LifetimeSecs) * time.Second)
- p.expire = &t
- }
-
- r.keys = append(r.keys, p)
-
- return nil
-}
-
-// Sign returns a signature for the data.
-func (r *keyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return nil, errLocked
- }
-
- r.expireKeysLocked()
- wanted := key.Marshal()
- for _, k := range r.keys {
- if bytes.Equal(k.signer.PublicKey().Marshal(), wanted) {
- return k.signer.Sign(rand.Reader, data)
- }
- }
- return nil, errors.New("not found")
-}
-
-// Signers returns signers for all the known keys.
-func (r *keyring) Signers() ([]ssh.Signer, error) {
- r.mu.Lock()
- defer r.mu.Unlock()
- if r.locked {
- return nil, errLocked
- }
-
- r.expireKeysLocked()
- s := make([]ssh.Signer, 0, len(r.keys))
- for _, k := range r.keys {
- s = append(s, k.signer)
- }
- return s, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring_test.go
deleted file mode 100644
index e5d50e7e0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/keyring_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2015 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 file.
-
-package agent
-
-import "testing"
-
-func addTestKey(t *testing.T, a Agent, keyName string) {
- err := a.Add(AddedKey{
- PrivateKey: testPrivateKeys[keyName],
- Comment: keyName,
- })
- if err != nil {
- t.Fatalf("failed to add key %q: %v", keyName, err)
- }
-}
-
-func removeTestKey(t *testing.T, a Agent, keyName string) {
- err := a.Remove(testPublicKeys[keyName])
- if err != nil {
- t.Fatalf("failed to remove key %q: %v", keyName, err)
- }
-}
-
-func validateListedKeys(t *testing.T, a Agent, expectedKeys []string) {
- listedKeys, err := a.List()
- if err != nil {
- t.Fatalf("failed to list keys: %v", err)
- return
- }
- actualKeys := make(map[string]bool)
- for _, key := range listedKeys {
- actualKeys[key.Comment] = true
- }
-
- matchedKeys := make(map[string]bool)
- for _, expectedKey := range expectedKeys {
- if !actualKeys[expectedKey] {
- t.Fatalf("expected key %q, but was not found", expectedKey)
- } else {
- matchedKeys[expectedKey] = true
- }
- }
-
- for actualKey := range actualKeys {
- if !matchedKeys[actualKey] {
- t.Fatalf("key %q was found, but was not expected", actualKey)
- }
- }
-}
-
-func TestKeyringAddingAndRemoving(t *testing.T) {
- keyNames := []string{"dsa", "ecdsa", "rsa", "user"}
-
- // add all test private keys
- k := NewKeyring()
- for _, keyName := range keyNames {
- addTestKey(t, k, keyName)
- }
- validateListedKeys(t, k, keyNames)
-
- // remove a key in the middle
- keyToRemove := keyNames[1]
- keyNames = append(keyNames[:1], keyNames[2:]...)
-
- removeTestKey(t, k, keyToRemove)
- validateListedKeys(t, k, keyNames)
-
- // remove all keys
- err := k.RemoveAll()
- if err != nil {
- t.Fatalf("failed to remove all keys: %v", err)
- }
- validateListedKeys(t, k, []string{})
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server.go
deleted file mode 100644
index 321e48a26..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server.go
+++ /dev/null
@@ -1,523 +0,0 @@
-// Copyright 2012 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 file.
-
-package agent
-
-import (
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rsa"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "log"
- "math/big"
-
- "golang.org/x/crypto/ed25519"
- "golang.org/x/crypto/ssh"
-)
-
-// Server wraps an Agent and uses it to implement the agent side of
-// the SSH-agent, wire protocol.
-type server struct {
- agent Agent
-}
-
-func (s *server) processRequestBytes(reqData []byte) []byte {
- rep, err := s.processRequest(reqData)
- if err != nil {
- if err != errLocked {
- // TODO(hanwen): provide better logging interface?
- log.Printf("agent %d: %v", reqData[0], err)
- }
- return []byte{agentFailure}
- }
-
- if err == nil && rep == nil {
- return []byte{agentSuccess}
- }
-
- return ssh.Marshal(rep)
-}
-
-func marshalKey(k *Key) []byte {
- var record struct {
- Blob []byte
- Comment string
- }
- record.Blob = k.Marshal()
- record.Comment = k.Comment
-
- return ssh.Marshal(&record)
-}
-
-// See [PROTOCOL.agent], section 2.5.1.
-const agentV1IdentitiesAnswer = 2
-
-type agentV1IdentityMsg struct {
- Numkeys uint32 `sshtype:"2"`
-}
-
-type agentRemoveIdentityMsg struct {
- KeyBlob []byte `sshtype:"18"`
-}
-
-type agentLockMsg struct {
- Passphrase []byte `sshtype:"22"`
-}
-
-type agentUnlockMsg struct {
- Passphrase []byte `sshtype:"23"`
-}
-
-func (s *server) processRequest(data []byte) (interface{}, error) {
- switch data[0] {
- case agentRequestV1Identities:
- return &agentV1IdentityMsg{0}, nil
-
- case agentRemoveAllV1Identities:
- return nil, nil
-
- case agentRemoveIdentity:
- var req agentRemoveIdentityMsg
- if err := ssh.Unmarshal(data, &req); err != nil {
- return nil, err
- }
-
- var wk wireKey
- if err := ssh.Unmarshal(req.KeyBlob, &wk); err != nil {
- return nil, err
- }
-
- return nil, s.agent.Remove(&Key{Format: wk.Format, Blob: req.KeyBlob})
-
- case agentRemoveAllIdentities:
- return nil, s.agent.RemoveAll()
-
- case agentLock:
- var req agentLockMsg
- if err := ssh.Unmarshal(data, &req); err != nil {
- return nil, err
- }
-
- return nil, s.agent.Lock(req.Passphrase)
-
- case agentUnlock:
- var req agentUnlockMsg
- if err := ssh.Unmarshal(data, &req); err != nil {
- return nil, err
- }
- return nil, s.agent.Unlock(req.Passphrase)
-
- case agentSignRequest:
- var req signRequestAgentMsg
- if err := ssh.Unmarshal(data, &req); err != nil {
- return nil, err
- }
-
- var wk wireKey
- if err := ssh.Unmarshal(req.KeyBlob, &wk); err != nil {
- return nil, err
- }
-
- k := &Key{
- Format: wk.Format,
- Blob: req.KeyBlob,
- }
-
- sig, err := s.agent.Sign(k, req.Data) // TODO(hanwen): flags.
- if err != nil {
- return nil, err
- }
- return &signResponseAgentMsg{SigBlob: ssh.Marshal(sig)}, nil
-
- case agentRequestIdentities:
- keys, err := s.agent.List()
- if err != nil {
- return nil, err
- }
-
- rep := identitiesAnswerAgentMsg{
- NumKeys: uint32(len(keys)),
- }
- for _, k := range keys {
- rep.Keys = append(rep.Keys, marshalKey(k)...)
- }
- return rep, nil
-
- case agentAddIdConstrained, agentAddIdentity:
- return nil, s.insertIdentity(data)
- }
-
- return nil, fmt.Errorf("unknown opcode %d", data[0])
-}
-
-func parseConstraints(constraints []byte) (lifetimeSecs uint32, confirmBeforeUse bool, extensions []ConstraintExtension, err error) {
- for len(constraints) != 0 {
- switch constraints[0] {
- case agentConstrainLifetime:
- lifetimeSecs = binary.BigEndian.Uint32(constraints[1:5])
- constraints = constraints[5:]
- case agentConstrainConfirm:
- confirmBeforeUse = true
- constraints = constraints[1:]
- case agentConstrainExtension:
- var msg constrainExtensionAgentMsg
- if err = ssh.Unmarshal(constraints, &msg); err != nil {
- return 0, false, nil, err
- }
- extensions = append(extensions, ConstraintExtension{
- ExtensionName: msg.ExtensionName,
- ExtensionDetails: msg.ExtensionDetails,
- })
- constraints = msg.Rest
- default:
- return 0, false, nil, fmt.Errorf("unknown constraint type: %d", constraints[0])
- }
- }
- return
-}
-
-func setConstraints(key *AddedKey, constraintBytes []byte) error {
- lifetimeSecs, confirmBeforeUse, constraintExtensions, err := parseConstraints(constraintBytes)
- if err != nil {
- return err
- }
-
- key.LifetimeSecs = lifetimeSecs
- key.ConfirmBeforeUse = confirmBeforeUse
- key.ConstraintExtensions = constraintExtensions
- return nil
-}
-
-func parseRSAKey(req []byte) (*AddedKey, error) {
- var k rsaKeyMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
- if k.E.BitLen() > 30 {
- return nil, errors.New("agent: RSA public exponent too large")
- }
- priv := &rsa.PrivateKey{
- PublicKey: rsa.PublicKey{
- E: int(k.E.Int64()),
- N: k.N,
- },
- D: k.D,
- Primes: []*big.Int{k.P, k.Q},
- }
- priv.Precompute()
-
- addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseEd25519Key(req []byte) (*AddedKey, error) {
- var k ed25519KeyMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
- priv := ed25519.PrivateKey(k.Priv)
-
- addedKey := &AddedKey{PrivateKey: &priv, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseDSAKey(req []byte) (*AddedKey, error) {
- var k dsaKeyMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
- priv := &dsa.PrivateKey{
- PublicKey: dsa.PublicKey{
- Parameters: dsa.Parameters{
- P: k.P,
- Q: k.Q,
- G: k.G,
- },
- Y: k.Y,
- },
- X: k.X,
- }
-
- addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func unmarshalECDSA(curveName string, keyBytes []byte, privScalar *big.Int) (priv *ecdsa.PrivateKey, err error) {
- priv = &ecdsa.PrivateKey{
- D: privScalar,
- }
-
- switch curveName {
- case "nistp256":
- priv.Curve = elliptic.P256()
- case "nistp384":
- priv.Curve = elliptic.P384()
- case "nistp521":
- priv.Curve = elliptic.P521()
- default:
- return nil, fmt.Errorf("agent: unknown curve %q", curveName)
- }
-
- priv.X, priv.Y = elliptic.Unmarshal(priv.Curve, keyBytes)
- if priv.X == nil || priv.Y == nil {
- return nil, errors.New("agent: point not on curve")
- }
-
- return priv, nil
-}
-
-func parseEd25519Cert(req []byte) (*AddedKey, error) {
- var k ed25519CertMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
- pubKey, err := ssh.ParsePublicKey(k.CertBytes)
- if err != nil {
- return nil, err
- }
- priv := ed25519.PrivateKey(k.Priv)
- cert, ok := pubKey.(*ssh.Certificate)
- if !ok {
- return nil, errors.New("agent: bad ED25519 certificate")
- }
-
- addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseECDSAKey(req []byte) (*AddedKey, error) {
- var k ecdsaKeyMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
-
- priv, err := unmarshalECDSA(k.Curve, k.KeyBytes, k.D)
- if err != nil {
- return nil, err
- }
-
- addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseRSACert(req []byte) (*AddedKey, error) {
- var k rsaCertMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
-
- pubKey, err := ssh.ParsePublicKey(k.CertBytes)
- if err != nil {
- return nil, err
- }
-
- cert, ok := pubKey.(*ssh.Certificate)
- if !ok {
- return nil, errors.New("agent: bad RSA certificate")
- }
-
- // An RSA publickey as marshaled by rsaPublicKey.Marshal() in keys.go
- var rsaPub struct {
- Name string
- E *big.Int
- N *big.Int
- }
- if err := ssh.Unmarshal(cert.Key.Marshal(), &rsaPub); err != nil {
- return nil, fmt.Errorf("agent: Unmarshal failed to parse public key: %v", err)
- }
-
- if rsaPub.E.BitLen() > 30 {
- return nil, errors.New("agent: RSA public exponent too large")
- }
-
- priv := rsa.PrivateKey{
- PublicKey: rsa.PublicKey{
- E: int(rsaPub.E.Int64()),
- N: rsaPub.N,
- },
- D: k.D,
- Primes: []*big.Int{k.Q, k.P},
- }
- priv.Precompute()
-
- addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseDSACert(req []byte) (*AddedKey, error) {
- var k dsaCertMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
- pubKey, err := ssh.ParsePublicKey(k.CertBytes)
- if err != nil {
- return nil, err
- }
- cert, ok := pubKey.(*ssh.Certificate)
- if !ok {
- return nil, errors.New("agent: bad DSA certificate")
- }
-
- // A DSA publickey as marshaled by dsaPublicKey.Marshal() in keys.go
- var w struct {
- Name string
- P, Q, G, Y *big.Int
- }
- if err := ssh.Unmarshal(cert.Key.Marshal(), &w); err != nil {
- return nil, fmt.Errorf("agent: Unmarshal failed to parse public key: %v", err)
- }
-
- priv := &dsa.PrivateKey{
- PublicKey: dsa.PublicKey{
- Parameters: dsa.Parameters{
- P: w.P,
- Q: w.Q,
- G: w.G,
- },
- Y: w.Y,
- },
- X: k.X,
- }
-
- addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func parseECDSACert(req []byte) (*AddedKey, error) {
- var k ecdsaCertMsg
- if err := ssh.Unmarshal(req, &k); err != nil {
- return nil, err
- }
-
- pubKey, err := ssh.ParsePublicKey(k.CertBytes)
- if err != nil {
- return nil, err
- }
- cert, ok := pubKey.(*ssh.Certificate)
- if !ok {
- return nil, errors.New("agent: bad ECDSA certificate")
- }
-
- // An ECDSA publickey as marshaled by ecdsaPublicKey.Marshal() in keys.go
- var ecdsaPub struct {
- Name string
- ID string
- Key []byte
- }
- if err := ssh.Unmarshal(cert.Key.Marshal(), &ecdsaPub); err != nil {
- return nil, err
- }
-
- priv, err := unmarshalECDSA(ecdsaPub.ID, ecdsaPub.Key, k.D)
- if err != nil {
- return nil, err
- }
-
- addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments}
- if err := setConstraints(addedKey, k.Constraints); err != nil {
- return nil, err
- }
- return addedKey, nil
-}
-
-func (s *server) insertIdentity(req []byte) error {
- var record struct {
- Type string `sshtype:"17|25"`
- Rest []byte `ssh:"rest"`
- }
-
- if err := ssh.Unmarshal(req, &record); err != nil {
- return err
- }
-
- var addedKey *AddedKey
- var err error
-
- switch record.Type {
- case ssh.KeyAlgoRSA:
- addedKey, err = parseRSAKey(req)
- case ssh.KeyAlgoDSA:
- addedKey, err = parseDSAKey(req)
- case ssh.KeyAlgoECDSA256, ssh.KeyAlgoECDSA384, ssh.KeyAlgoECDSA521:
- addedKey, err = parseECDSAKey(req)
- case ssh.KeyAlgoED25519:
- addedKey, err = parseEd25519Key(req)
- case ssh.CertAlgoRSAv01:
- addedKey, err = parseRSACert(req)
- case ssh.CertAlgoDSAv01:
- addedKey, err = parseDSACert(req)
- case ssh.CertAlgoECDSA256v01, ssh.CertAlgoECDSA384v01, ssh.CertAlgoECDSA521v01:
- addedKey, err = parseECDSACert(req)
- case ssh.CertAlgoED25519v01:
- addedKey, err = parseEd25519Cert(req)
- default:
- return fmt.Errorf("agent: not implemented: %q", record.Type)
- }
-
- if err != nil {
- return err
- }
- return s.agent.Add(*addedKey)
-}
-
-// ServeAgent serves the agent protocol on the given connection. It
-// returns when an I/O error occurs.
-func ServeAgent(agent Agent, c io.ReadWriter) error {
- s := &server{agent}
-
- var length [4]byte
- for {
- if _, err := io.ReadFull(c, length[:]); err != nil {
- return err
- }
- l := binary.BigEndian.Uint32(length[:])
- if l > maxAgentResponseBytes {
- // We also cap requests.
- return fmt.Errorf("agent: request too large: %d", l)
- }
-
- req := make([]byte, l)
- if _, err := io.ReadFull(c, req); err != nil {
- return err
- }
-
- repData := s.processRequestBytes(req)
- if len(repData) > maxAgentResponseBytes {
- return fmt.Errorf("agent: reply too large: %d bytes", len(repData))
- }
-
- binary.BigEndian.PutUint32(length[:], uint32(len(repData)))
- if _, err := c.Write(length[:]); err != nil {
- return err
- }
- if _, err := c.Write(repData); err != nil {
- return err
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server_test.go
deleted file mode 100644
index 038018ebb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/server_test.go
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2012 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 file.
-
-package agent
-
-import (
- "crypto"
- "crypto/rand"
- "fmt"
- pseudorand "math/rand"
- "reflect"
- "strings"
- "testing"
-
- "golang.org/x/crypto/ssh"
-)
-
-func TestServer(t *testing.T) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
- client := NewClient(c1)
-
- go ServeAgent(NewKeyring(), c2)
-
- testAgentInterface(t, client, testPrivateKeys["rsa"], nil, 0)
-}
-
-func TestLockServer(t *testing.T) {
- testLockAgent(NewKeyring(), t)
-}
-
-func TestSetupForwardAgent(t *testing.T) {
- a, b, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
-
- defer a.Close()
- defer b.Close()
-
- _, socket, cleanup := startOpenSSHAgent(t)
- defer cleanup()
-
- serverConf := ssh.ServerConfig{
- NoClientAuth: true,
- }
- serverConf.AddHostKey(testSigners["rsa"])
- incoming := make(chan *ssh.ServerConn, 1)
- go func() {
- conn, _, _, err := ssh.NewServerConn(a, &serverConf)
- if err != nil {
- t.Fatalf("Server: %v", err)
- }
- incoming <- conn
- }()
-
- conf := ssh.ClientConfig{
- HostKeyCallback: ssh.InsecureIgnoreHostKey(),
- }
- conn, chans, reqs, err := ssh.NewClientConn(b, "", &conf)
- if err != nil {
- t.Fatalf("NewClientConn: %v", err)
- }
- client := ssh.NewClient(conn, chans, reqs)
-
- if err := ForwardToRemote(client, socket); err != nil {
- t.Fatalf("SetupForwardAgent: %v", err)
- }
-
- server := <-incoming
- ch, reqs, err := server.OpenChannel(channelType, nil)
- if err != nil {
- t.Fatalf("OpenChannel(%q): %v", channelType, err)
- }
- go ssh.DiscardRequests(reqs)
-
- agentClient := NewClient(ch)
- testAgentInterface(t, agentClient, testPrivateKeys["rsa"], nil, 0)
- conn.Close()
-}
-
-func TestV1ProtocolMessages(t *testing.T) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
- c := NewClient(c1)
-
- go ServeAgent(NewKeyring(), c2)
-
- testV1ProtocolMessages(t, c.(*client))
-}
-
-func testV1ProtocolMessages(t *testing.T, c *client) {
- reply, err := c.call([]byte{agentRequestV1Identities})
- if err != nil {
- t.Fatalf("v1 request all failed: %v", err)
- }
- if msg, ok := reply.(*agentV1IdentityMsg); !ok || msg.Numkeys != 0 {
- t.Fatalf("invalid request all response: %#v", reply)
- }
-
- reply, err = c.call([]byte{agentRemoveAllV1Identities})
- if err != nil {
- t.Fatalf("v1 remove all failed: %v", err)
- }
- if _, ok := reply.(*successAgentMsg); !ok {
- t.Fatalf("invalid remove all response: %#v", reply)
- }
-}
-
-func verifyKey(sshAgent Agent) error {
- keys, err := sshAgent.List()
- if err != nil {
- return fmt.Errorf("listing keys: %v", err)
- }
-
- if len(keys) != 1 {
- return fmt.Errorf("bad number of keys found. expected 1, got %d", len(keys))
- }
-
- buf := make([]byte, 128)
- if _, err := rand.Read(buf); err != nil {
- return fmt.Errorf("rand: %v", err)
- }
-
- sig, err := sshAgent.Sign(keys[0], buf)
- if err != nil {
- return fmt.Errorf("sign: %v", err)
- }
-
- if err := keys[0].Verify(buf, sig); err != nil {
- return fmt.Errorf("verify: %v", err)
- }
- return nil
-}
-
-func addKeyToAgent(key crypto.PrivateKey) error {
- sshAgent := NewKeyring()
- if err := sshAgent.Add(AddedKey{PrivateKey: key}); err != nil {
- return fmt.Errorf("add: %v", err)
- }
- return verifyKey(sshAgent)
-}
-
-func TestKeyTypes(t *testing.T) {
- for k, v := range testPrivateKeys {
- if err := addKeyToAgent(v); err != nil {
- t.Errorf("error adding key type %s, %v", k, err)
- }
- if err := addCertToAgentSock(v, nil); err != nil {
- t.Errorf("error adding key type %s, %v", k, err)
- }
- }
-}
-
-func addCertToAgentSock(key crypto.PrivateKey, cert *ssh.Certificate) error {
- a, b, err := netPipe()
- if err != nil {
- return err
- }
- agentServer := NewKeyring()
- go ServeAgent(agentServer, a)
-
- agentClient := NewClient(b)
- if err := agentClient.Add(AddedKey{PrivateKey: key, Certificate: cert}); err != nil {
- return fmt.Errorf("add: %v", err)
- }
- return verifyKey(agentClient)
-}
-
-func addCertToAgent(key crypto.PrivateKey, cert *ssh.Certificate) error {
- sshAgent := NewKeyring()
- if err := sshAgent.Add(AddedKey{PrivateKey: key, Certificate: cert}); err != nil {
- return fmt.Errorf("add: %v", err)
- }
- return verifyKey(sshAgent)
-}
-
-func TestCertTypes(t *testing.T) {
- for keyType, key := range testPublicKeys {
- cert := &ssh.Certificate{
- ValidPrincipals: []string{"gopher1"},
- ValidAfter: 0,
- ValidBefore: ssh.CertTimeInfinity,
- Key: key,
- Serial: 1,
- CertType: ssh.UserCert,
- SignatureKey: testPublicKeys["rsa"],
- Permissions: ssh.Permissions{
- CriticalOptions: map[string]string{},
- Extensions: map[string]string{},
- },
- }
- if err := cert.SignCert(rand.Reader, testSigners["rsa"]); err != nil {
- t.Fatalf("signcert: %v", err)
- }
- if err := addCertToAgent(testPrivateKeys[keyType], cert); err != nil {
- t.Fatalf("%v", err)
- }
- if err := addCertToAgentSock(testPrivateKeys[keyType], cert); err != nil {
- t.Fatalf("%v", err)
- }
- }
-}
-
-func TestParseConstraints(t *testing.T) {
- // Test LifetimeSecs
- var msg = constrainLifetimeAgentMsg{pseudorand.Uint32()}
- lifetimeSecs, _, _, err := parseConstraints(ssh.Marshal(msg))
- if err != nil {
- t.Fatalf("parseConstraints: %v", err)
- }
- if lifetimeSecs != msg.LifetimeSecs {
- t.Errorf("got lifetime %v, want %v", lifetimeSecs, msg.LifetimeSecs)
- }
-
- // Test ConfirmBeforeUse
- _, confirmBeforeUse, _, err := parseConstraints([]byte{agentConstrainConfirm})
- if err != nil {
- t.Fatalf("%v", err)
- }
- if !confirmBeforeUse {
- t.Error("got comfirmBeforeUse == false")
- }
-
- // Test ConstraintExtensions
- var data []byte
- var expect []ConstraintExtension
- for i := 0; i < 10; i++ {
- var ext = ConstraintExtension{
- ExtensionName: fmt.Sprintf("name%d", i),
- ExtensionDetails: []byte(fmt.Sprintf("details: %d", i)),
- }
- expect = append(expect, ext)
- data = append(data, agentConstrainExtension)
- data = append(data, ssh.Marshal(ext)...)
- }
- _, _, extensions, err := parseConstraints(data)
- if err != nil {
- t.Fatalf("%v", err)
- }
- if !reflect.DeepEqual(expect, extensions) {
- t.Errorf("got extension %v, want %v", extensions, expect)
- }
-
- // Test Unknown Constraint
- _, _, _, err = parseConstraints([]byte{128})
- if err == nil || !strings.Contains(err.Error(), "unknown constraint") {
- t.Errorf("unexpected error: %v", err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/testdata_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/testdata_test.go
deleted file mode 100644
index cc42a87cb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/agent/testdata_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014 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 file.
-
-// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
-// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
-// instances.
-
-package agent
-
-import (
- "crypto/rand"
- "fmt"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/testdata"
-)
-
-var (
- testPrivateKeys map[string]interface{}
- testSigners map[string]ssh.Signer
- testPublicKeys map[string]ssh.PublicKey
-)
-
-func init() {
- var err error
-
- n := len(testdata.PEMBytes)
- testPrivateKeys = make(map[string]interface{}, n)
- testSigners = make(map[string]ssh.Signer, n)
- testPublicKeys = make(map[string]ssh.PublicKey, n)
- for t, k := range testdata.PEMBytes {
- testPrivateKeys[t], err = ssh.ParseRawPrivateKey(k)
- if err != nil {
- panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err))
- }
- testSigners[t], err = ssh.NewSignerFromKey(testPrivateKeys[t])
- if err != nil {
- panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err))
- }
- testPublicKeys[t] = testSigners[t].PublicKey()
- }
-
- // Create a cert and sign it for use in tests.
- testCert := &ssh.Certificate{
- Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage
- ValidAfter: 0, // unix epoch
- ValidBefore: ssh.CertTimeInfinity, // The end of currently representable time.
- Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- Key: testPublicKeys["ecdsa"],
- SignatureKey: testPublicKeys["rsa"],
- Permissions: ssh.Permissions{
- CriticalOptions: map[string]string{},
- Extensions: map[string]string{},
- },
- }
- testCert.SignCert(rand.Reader, testSigners["rsa"])
- testPrivateKeys["cert"] = testPrivateKeys["ecdsa"]
- testSigners["cert"], err = ssh.NewCertSigner(testCert, testSigners["ecdsa"])
- if err != nil {
- panic(fmt.Sprintf("Unable to create certificate signer: %v", err))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/benchmark_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/benchmark_test.go
deleted file mode 100644
index d9f7eb9b6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/benchmark_test.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "errors"
- "io"
- "net"
- "testing"
-)
-
-type server struct {
- *ServerConn
- chans <-chan NewChannel
-}
-
-func newServer(c net.Conn, conf *ServerConfig) (*server, error) {
- sconn, chans, reqs, err := NewServerConn(c, conf)
- if err != nil {
- return nil, err
- }
- go DiscardRequests(reqs)
- return &server{sconn, chans}, nil
-}
-
-func (s *server) Accept() (NewChannel, error) {
- n, ok := <-s.chans
- if !ok {
- return nil, io.EOF
- }
- return n, nil
-}
-
-func sshPipe() (Conn, *server, error) {
- c1, c2, err := netPipe()
- if err != nil {
- return nil, nil, err
- }
-
- clientConf := ClientConfig{
- User: "user",
- }
- serverConf := ServerConfig{
- NoClientAuth: true,
- }
- serverConf.AddHostKey(testSigners["ecdsa"])
- done := make(chan *server, 1)
- go func() {
- server, err := newServer(c2, &serverConf)
- if err != nil {
- done <- nil
- }
- done <- server
- }()
-
- client, _, reqs, err := NewClientConn(c1, "", &clientConf)
- if err != nil {
- return nil, nil, err
- }
-
- server := <-done
- if server == nil {
- return nil, nil, errors.New("server handshake failed.")
- }
- go DiscardRequests(reqs)
-
- return client, server, nil
-}
-
-func BenchmarkEndToEnd(b *testing.B) {
- b.StopTimer()
-
- client, server, err := sshPipe()
- if err != nil {
- b.Fatalf("sshPipe: %v", err)
- }
-
- defer client.Close()
- defer server.Close()
-
- size := (1 << 20)
- input := make([]byte, size)
- output := make([]byte, size)
- b.SetBytes(int64(size))
- done := make(chan int, 1)
-
- go func() {
- newCh, err := server.Accept()
- if err != nil {
- b.Fatalf("Client: %v", err)
- }
- ch, incoming, err := newCh.Accept()
- go DiscardRequests(incoming)
- for i := 0; i < b.N; i++ {
- if _, err := io.ReadFull(ch, output); err != nil {
- b.Fatalf("ReadFull: %v", err)
- }
- }
- ch.Close()
- done <- 1
- }()
-
- ch, in, err := client.OpenChannel("speed", nil)
- if err != nil {
- b.Fatalf("OpenChannel: %v", err)
- }
- go DiscardRequests(in)
-
- b.ResetTimer()
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- if _, err := ch.Write(input); err != nil {
- b.Fatalf("WriteFull: %v", err)
- }
- }
- ch.Close()
- b.StopTimer()
-
- <-done
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer.go
deleted file mode 100644
index 1ab07d078..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2012 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 file.
-
-package ssh
-
-import (
- "io"
- "sync"
-)
-
-// buffer provides a linked list buffer for data exchange
-// between producer and consumer. Theoretically the buffer is
-// of unlimited capacity as it does no allocation of its own.
-type buffer struct {
- // protects concurrent access to head, tail and closed
- *sync.Cond
-
- head *element // the buffer that will be read first
- tail *element // the buffer that will be read last
-
- closed bool
-}
-
-// An element represents a single link in a linked list.
-type element struct {
- buf []byte
- next *element
-}
-
-// newBuffer returns an empty buffer that is not closed.
-func newBuffer() *buffer {
- e := new(element)
- b := &buffer{
- Cond: newCond(),
- head: e,
- tail: e,
- }
- return b
-}
-
-// write makes buf available for Read to receive.
-// buf must not be modified after the call to write.
-func (b *buffer) write(buf []byte) {
- b.Cond.L.Lock()
- e := &element{buf: buf}
- b.tail.next = e
- b.tail = e
- b.Cond.Signal()
- b.Cond.L.Unlock()
-}
-
-// eof closes the buffer. Reads from the buffer once all
-// the data has been consumed will receive io.EOF.
-func (b *buffer) eof() {
- b.Cond.L.Lock()
- b.closed = true
- b.Cond.Signal()
- b.Cond.L.Unlock()
-}
-
-// Read reads data from the internal buffer in buf. Reads will block
-// if no data is available, or until the buffer is closed.
-func (b *buffer) Read(buf []byte) (n int, err error) {
- b.Cond.L.Lock()
- defer b.Cond.L.Unlock()
-
- for len(buf) > 0 {
- // if there is data in b.head, copy it
- if len(b.head.buf) > 0 {
- r := copy(buf, b.head.buf)
- buf, b.head.buf = buf[r:], b.head.buf[r:]
- n += r
- continue
- }
- // if there is a next buffer, make it the head
- if len(b.head.buf) == 0 && b.head != b.tail {
- b.head = b.head.next
- continue
- }
-
- // if at least one byte has been copied, return
- if n > 0 {
- break
- }
-
- // if nothing was read, and there is nothing outstanding
- // check to see if the buffer is closed.
- if b.closed {
- err = io.EOF
- break
- }
- // out of buffers, wait for producer
- b.Cond.Wait()
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer_test.go
deleted file mode 100644
index d5781cb3d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/buffer_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "io"
- "testing"
-)
-
-var alphabet = []byte("abcdefghijklmnopqrstuvwxyz")
-
-func TestBufferReadwrite(t *testing.T) {
- b := newBuffer()
- b.write(alphabet[:10])
- r, _ := b.Read(make([]byte, 10))
- if r != 10 {
- t.Fatalf("Expected written == read == 10, written: 10, read %d", r)
- }
-
- b = newBuffer()
- b.write(alphabet[:5])
- r, _ = b.Read(make([]byte, 10))
- if r != 5 {
- t.Fatalf("Expected written == read == 5, written: 5, read %d", r)
- }
-
- b = newBuffer()
- b.write(alphabet[:10])
- r, _ = b.Read(make([]byte, 5))
- if r != 5 {
- t.Fatalf("Expected written == 10, read == 5, written: 10, read %d", r)
- }
-
- b = newBuffer()
- b.write(alphabet[:5])
- b.write(alphabet[5:15])
- r, _ = b.Read(make([]byte, 10))
- r2, _ := b.Read(make([]byte, 10))
- if r != 10 || r2 != 5 || 15 != r+r2 {
- t.Fatal("Expected written == read == 15")
- }
-}
-
-func TestBufferClose(t *testing.T) {
- b := newBuffer()
- b.write(alphabet[:10])
- b.eof()
- _, err := b.Read(make([]byte, 5))
- if err != nil {
- t.Fatal("expected read of 5 to not return EOF")
- }
- b = newBuffer()
- b.write(alphabet[:10])
- b.eof()
- r, err := b.Read(make([]byte, 5))
- r2, err2 := b.Read(make([]byte, 10))
- if r != 5 || r2 != 5 || err != nil || err2 != nil {
- t.Fatal("expected reads of 5 and 5")
- }
-
- b = newBuffer()
- b.write(alphabet[:10])
- b.eof()
- r, err = b.Read(make([]byte, 5))
- r2, err2 = b.Read(make([]byte, 10))
- r3, err3 := b.Read(make([]byte, 10))
- if r != 5 || r2 != 5 || r3 != 0 || err != nil || err2 != nil || err3 != io.EOF {
- t.Fatal("expected reads of 5 and 5 and 0, with EOF")
- }
-
- b = newBuffer()
- b.write(make([]byte, 5))
- b.write(make([]byte, 10))
- b.eof()
- r, err = b.Read(make([]byte, 9))
- r2, err2 = b.Read(make([]byte, 3))
- r3, err3 = b.Read(make([]byte, 3))
- r4, err4 := b.Read(make([]byte, 10))
- if err != nil || err2 != nil || err3 != nil || err4 != io.EOF {
- t.Fatalf("Expected EOF on forth read only, err=%v, err2=%v, err3=%v, err4=%v", err, err2, err3, err4)
- }
- if r != 9 || r2 != 3 || r3 != 3 || r4 != 0 {
- t.Fatal("Expected written == read == 15", r, r2, r3, r4)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs.go
deleted file mode 100644
index b1f022078..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs.go
+++ /dev/null
@@ -1,519 +0,0 @@
-// Copyright 2012 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 file.
-
-package ssh
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "net"
- "sort"
- "time"
-)
-
-// These constants from [PROTOCOL.certkeys] represent the algorithm names
-// for certificate types supported by this package.
-const (
- CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com"
- CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com"
- CertAlgoECDSA256v01 = "ecdsa-sha2-nistp256-cert-v01@openssh.com"
- CertAlgoECDSA384v01 = "ecdsa-sha2-nistp384-cert-v01@openssh.com"
- CertAlgoECDSA521v01 = "ecdsa-sha2-nistp521-cert-v01@openssh.com"
- CertAlgoED25519v01 = "ssh-ed25519-cert-v01@openssh.com"
-)
-
-// Certificate types distinguish between host and user
-// certificates. The values can be set in the CertType field of
-// Certificate.
-const (
- UserCert = 1
- HostCert = 2
-)
-
-// Signature represents a cryptographic signature.
-type Signature struct {
- Format string
- Blob []byte
-}
-
-// CertTimeInfinity can be used for OpenSSHCertV01.ValidBefore to indicate that
-// a certificate does not expire.
-const CertTimeInfinity = 1<<64 - 1
-
-// An Certificate represents an OpenSSH certificate as defined in
-// [PROTOCOL.certkeys]?rev=1.8.
-type Certificate struct {
- Nonce []byte
- Key PublicKey
- Serial uint64
- CertType uint32
- KeyId string
- ValidPrincipals []string
- ValidAfter uint64
- ValidBefore uint64
- Permissions
- Reserved []byte
- SignatureKey PublicKey
- Signature *Signature
-}
-
-// genericCertData holds the key-independent part of the certificate data.
-// Overall, certificates contain an nonce, public key fields and
-// key-independent fields.
-type genericCertData struct {
- Serial uint64
- CertType uint32
- KeyId string
- ValidPrincipals []byte
- ValidAfter uint64
- ValidBefore uint64
- CriticalOptions []byte
- Extensions []byte
- Reserved []byte
- SignatureKey []byte
- Signature []byte
-}
-
-func marshalStringList(namelist []string) []byte {
- var to []byte
- for _, name := range namelist {
- s := struct{ N string }{name}
- to = append(to, Marshal(&s)...)
- }
- return to
-}
-
-type optionsTuple struct {
- Key string
- Value []byte
-}
-
-type optionsTupleValue struct {
- Value string
-}
-
-// serialize a map of critical options or extensions
-// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation,
-// we need two length prefixes for a non-empty string value
-func marshalTuples(tups map[string]string) []byte {
- keys := make([]string, 0, len(tups))
- for key := range tups {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- var ret []byte
- for _, key := range keys {
- s := optionsTuple{Key: key}
- if value := tups[key]; len(value) > 0 {
- s.Value = Marshal(&optionsTupleValue{value})
- }
- ret = append(ret, Marshal(&s)...)
- }
- return ret
-}
-
-// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation,
-// we need two length prefixes for a non-empty option value
-func parseTuples(in []byte) (map[string]string, error) {
- tups := map[string]string{}
- var lastKey string
- var haveLastKey bool
-
- for len(in) > 0 {
- var key, val, extra []byte
- var ok bool
-
- if key, in, ok = parseString(in); !ok {
- return nil, errShortRead
- }
- keyStr := string(key)
- // according to [PROTOCOL.certkeys], the names must be in
- // lexical order.
- if haveLastKey && keyStr <= lastKey {
- return nil, fmt.Errorf("ssh: certificate options are not in lexical order")
- }
- lastKey, haveLastKey = keyStr, true
- // the next field is a data field, which if non-empty has a string embedded
- if val, in, ok = parseString(in); !ok {
- return nil, errShortRead
- }
- if len(val) > 0 {
- val, extra, ok = parseString(val)
- if !ok {
- return nil, errShortRead
- }
- if len(extra) > 0 {
- return nil, fmt.Errorf("ssh: unexpected trailing data after certificate option value")
- }
- tups[keyStr] = string(val)
- } else {
- tups[keyStr] = ""
- }
- }
- return tups, nil
-}
-
-func parseCert(in []byte, privAlgo string) (*Certificate, error) {
- nonce, rest, ok := parseString(in)
- if !ok {
- return nil, errShortRead
- }
-
- key, rest, err := parsePubKey(rest, privAlgo)
- if err != nil {
- return nil, err
- }
-
- var g genericCertData
- if err := Unmarshal(rest, &g); err != nil {
- return nil, err
- }
-
- c := &Certificate{
- Nonce: nonce,
- Key: key,
- Serial: g.Serial,
- CertType: g.CertType,
- KeyId: g.KeyId,
- ValidAfter: g.ValidAfter,
- ValidBefore: g.ValidBefore,
- }
-
- for principals := g.ValidPrincipals; len(principals) > 0; {
- principal, rest, ok := parseString(principals)
- if !ok {
- return nil, errShortRead
- }
- c.ValidPrincipals = append(c.ValidPrincipals, string(principal))
- principals = rest
- }
-
- c.CriticalOptions, err = parseTuples(g.CriticalOptions)
- if err != nil {
- return nil, err
- }
- c.Extensions, err = parseTuples(g.Extensions)
- if err != nil {
- return nil, err
- }
- c.Reserved = g.Reserved
- k, err := ParsePublicKey(g.SignatureKey)
- if err != nil {
- return nil, err
- }
-
- c.SignatureKey = k
- c.Signature, rest, ok = parseSignatureBody(g.Signature)
- if !ok || len(rest) > 0 {
- return nil, errors.New("ssh: signature parse error")
- }
-
- return c, nil
-}
-
-type openSSHCertSigner struct {
- pub *Certificate
- signer Signer
-}
-
-// NewCertSigner returns a Signer that signs with the given Certificate, whose
-// private key is held by signer. It returns an error if the public key in cert
-// doesn't match the key used by signer.
-func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) {
- if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 {
- return nil, errors.New("ssh: signer and cert have different public key")
- }
-
- return &openSSHCertSigner{cert, signer}, nil
-}
-
-func (s *openSSHCertSigner) Sign(rand io.Reader, data []byte) (*Signature, error) {
- return s.signer.Sign(rand, data)
-}
-
-func (s *openSSHCertSigner) PublicKey() PublicKey {
- return s.pub
-}
-
-const sourceAddressCriticalOption = "source-address"
-
-// CertChecker does the work of verifying a certificate. Its methods
-// can be plugged into ClientConfig.HostKeyCallback and
-// ServerConfig.PublicKeyCallback. For the CertChecker to work,
-// minimally, the IsAuthority callback should be set.
-type CertChecker struct {
- // SupportedCriticalOptions lists the CriticalOptions that the
- // server application layer understands. These are only used
- // for user certificates.
- SupportedCriticalOptions []string
-
- // IsUserAuthority should return true if the key is recognized as an
- // authority for the given user certificate. This allows for
- // certificates to be signed by other certificates. This must be set
- // if this CertChecker will be checking user certificates.
- IsUserAuthority func(auth PublicKey) bool
-
- // IsHostAuthority should report whether the key is recognized as
- // an authority for this host. This allows for certificates to be
- // signed by other keys, and for those other keys to only be valid
- // signers for particular hostnames. This must be set if this
- // CertChecker will be checking host certificates.
- IsHostAuthority func(auth PublicKey, address string) bool
-
- // Clock is used for verifying time stamps. If nil, time.Now
- // is used.
- Clock func() time.Time
-
- // UserKeyFallback is called when CertChecker.Authenticate encounters a
- // public key that is not a certificate. It must implement validation
- // of user keys or else, if nil, all such keys are rejected.
- UserKeyFallback func(conn ConnMetadata, key PublicKey) (*Permissions, error)
-
- // HostKeyFallback is called when CertChecker.CheckHostKey encounters a
- // public key that is not a certificate. It must implement host key
- // validation or else, if nil, all such keys are rejected.
- HostKeyFallback HostKeyCallback
-
- // IsRevoked is called for each certificate so that revocation checking
- // can be implemented. It should return true if the given certificate
- // is revoked and false otherwise. If nil, no certificates are
- // considered to have been revoked.
- IsRevoked func(cert *Certificate) bool
-}
-
-// CheckHostKey checks a host key certificate. This method can be
-// plugged into ClientConfig.HostKeyCallback.
-func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey) error {
- cert, ok := key.(*Certificate)
- if !ok {
- if c.HostKeyFallback != nil {
- return c.HostKeyFallback(addr, remote, key)
- }
- return errors.New("ssh: non-certificate host key")
- }
- if cert.CertType != HostCert {
- return fmt.Errorf("ssh: certificate presented as a host key has type %d", cert.CertType)
- }
- if !c.IsHostAuthority(cert.SignatureKey, addr) {
- return fmt.Errorf("ssh: no authorities for hostname: %v", addr)
- }
-
- hostname, _, err := net.SplitHostPort(addr)
- if err != nil {
- return err
- }
-
- // Pass hostname only as principal for host certificates (consistent with OpenSSH)
- return c.CheckCert(hostname, cert)
-}
-
-// Authenticate checks a user certificate. Authenticate can be used as
-// a value for ServerConfig.PublicKeyCallback.
-func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permissions, error) {
- cert, ok := pubKey.(*Certificate)
- if !ok {
- if c.UserKeyFallback != nil {
- return c.UserKeyFallback(conn, pubKey)
- }
- return nil, errors.New("ssh: normal key pairs not accepted")
- }
-
- if cert.CertType != UserCert {
- return nil, fmt.Errorf("ssh: cert has type %d", cert.CertType)
- }
- if !c.IsUserAuthority(cert.SignatureKey) {
- return nil, fmt.Errorf("ssh: certificate signed by unrecognized authority")
- }
-
- if err := c.CheckCert(conn.User(), cert); err != nil {
- return nil, err
- }
-
- return &cert.Permissions, nil
-}
-
-// CheckCert checks CriticalOptions, ValidPrincipals, revocation, timestamp and
-// the signature of the certificate.
-func (c *CertChecker) CheckCert(principal string, cert *Certificate) error {
- if c.IsRevoked != nil && c.IsRevoked(cert) {
- return fmt.Errorf("ssh: certicate serial %d revoked", cert.Serial)
- }
-
- for opt, _ := range cert.CriticalOptions {
- // sourceAddressCriticalOption will be enforced by
- // serverAuthenticate
- if opt == sourceAddressCriticalOption {
- continue
- }
-
- found := false
- for _, supp := range c.SupportedCriticalOptions {
- if supp == opt {
- found = true
- break
- }
- }
- if !found {
- return fmt.Errorf("ssh: unsupported critical option %q in certificate", opt)
- }
- }
-
- if len(cert.ValidPrincipals) > 0 {
- // By default, certs are valid for all users/hosts.
- found := false
- for _, p := range cert.ValidPrincipals {
- if p == principal {
- found = true
- break
- }
- }
- if !found {
- return fmt.Errorf("ssh: principal %q not in the set of valid principals for given certificate: %q", principal, cert.ValidPrincipals)
- }
- }
-
- clock := c.Clock
- if clock == nil {
- clock = time.Now
- }
-
- unixNow := clock().Unix()
- if after := int64(cert.ValidAfter); after < 0 || unixNow < int64(cert.ValidAfter) {
- return fmt.Errorf("ssh: cert is not yet valid")
- }
- if before := int64(cert.ValidBefore); cert.ValidBefore != uint64(CertTimeInfinity) && (unixNow >= before || before < 0) {
- return fmt.Errorf("ssh: cert has expired")
- }
- if err := cert.SignatureKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil {
- return fmt.Errorf("ssh: certificate signature does not verify")
- }
-
- return nil
-}
-
-// SignCert sets c.SignatureKey to the authority's public key and stores a
-// Signature, by authority, in the certificate.
-func (c *Certificate) SignCert(rand io.Reader, authority Signer) error {
- c.Nonce = make([]byte, 32)
- if _, err := io.ReadFull(rand, c.Nonce); err != nil {
- return err
- }
- c.SignatureKey = authority.PublicKey()
-
- sig, err := authority.Sign(rand, c.bytesForSigning())
- if err != nil {
- return err
- }
- c.Signature = sig
- return nil
-}
-
-var certAlgoNames = map[string]string{
- KeyAlgoRSA: CertAlgoRSAv01,
- KeyAlgoDSA: CertAlgoDSAv01,
- KeyAlgoECDSA256: CertAlgoECDSA256v01,
- KeyAlgoECDSA384: CertAlgoECDSA384v01,
- KeyAlgoECDSA521: CertAlgoECDSA521v01,
- KeyAlgoED25519: CertAlgoED25519v01,
-}
-
-// certToPrivAlgo returns the underlying algorithm for a certificate algorithm.
-// Panics if a non-certificate algorithm is passed.
-func certToPrivAlgo(algo string) string {
- for privAlgo, pubAlgo := range certAlgoNames {
- if pubAlgo == algo {
- return privAlgo
- }
- }
- panic("unknown cert algorithm")
-}
-
-func (cert *Certificate) bytesForSigning() []byte {
- c2 := *cert
- c2.Signature = nil
- out := c2.Marshal()
- // Drop trailing signature length.
- return out[:len(out)-4]
-}
-
-// Marshal serializes c into OpenSSH's wire format. It is part of the
-// PublicKey interface.
-func (c *Certificate) Marshal() []byte {
- generic := genericCertData{
- Serial: c.Serial,
- CertType: c.CertType,
- KeyId: c.KeyId,
- ValidPrincipals: marshalStringList(c.ValidPrincipals),
- ValidAfter: uint64(c.ValidAfter),
- ValidBefore: uint64(c.ValidBefore),
- CriticalOptions: marshalTuples(c.CriticalOptions),
- Extensions: marshalTuples(c.Extensions),
- Reserved: c.Reserved,
- SignatureKey: c.SignatureKey.Marshal(),
- }
- if c.Signature != nil {
- generic.Signature = Marshal(c.Signature)
- }
- genericBytes := Marshal(&generic)
- keyBytes := c.Key.Marshal()
- _, keyBytes, _ = parseString(keyBytes)
- prefix := Marshal(&struct {
- Name string
- Nonce []byte
- Key []byte `ssh:"rest"`
- }{c.Type(), c.Nonce, keyBytes})
-
- result := make([]byte, 0, len(prefix)+len(genericBytes))
- result = append(result, prefix...)
- result = append(result, genericBytes...)
- return result
-}
-
-// Type returns the key name. It is part of the PublicKey interface.
-func (c *Certificate) Type() string {
- algo, ok := certAlgoNames[c.Key.Type()]
- if !ok {
- panic("unknown cert key type " + c.Key.Type())
- }
- return algo
-}
-
-// Verify verifies a signature against the certificate's public
-// key. It is part of the PublicKey interface.
-func (c *Certificate) Verify(data []byte, sig *Signature) error {
- return c.Key.Verify(data, sig)
-}
-
-func parseSignatureBody(in []byte) (out *Signature, rest []byte, ok bool) {
- format, in, ok := parseString(in)
- if !ok {
- return
- }
-
- out = &Signature{
- Format: string(format),
- }
-
- if out.Blob, in, ok = parseString(in); !ok {
- return
- }
-
- return out, in, ok
-}
-
-func parseSignature(in []byte) (out *Signature, rest []byte, ok bool) {
- sigBytes, rest, ok := parseString(in)
- if !ok {
- return
- }
-
- out, trailing, ok := parseSignatureBody(sigBytes)
- if !ok || len(trailing) > 0 {
- return nil, nil, false
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs_test.go
deleted file mode 100644
index 0200531f4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/certs_test.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto/rand"
- "reflect"
- "testing"
- "time"
-)
-
-// Cert generated by ssh-keygen 6.0p1 Debian-4.
-// % ssh-keygen -s ca-key -I test user-key
-const exampleSSHCert = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgb1srW/W3ZDjYAO45xLYAwzHBDLsJ4Ux6ICFIkTjb1LEAAAADAQABAAAAYQCkoR51poH0wE8w72cqSB8Sszx+vAhzcMdCO0wqHTj7UNENHWEXGrU0E0UQekD7U+yhkhtoyjbPOVIP7hNa6aRk/ezdh/iUnCIt4Jt1v3Z1h1P+hA4QuYFMHNB+rmjPwAcAAAAAAAAAAAAAAAEAAAAEdGVzdAAAAAAAAAAAAAAAAP//////////AAAAAAAAAIIAAAAVcGVybWl0LVgxMS1mb3J3YXJkaW5nAAAAAAAAABdwZXJtaXQtYWdlbnQtZm9yd2FyZGluZwAAAAAAAAAWcGVybWl0LXBvcnQtZm9yd2FyZGluZwAAAAAAAAAKcGVybWl0LXB0eQAAAAAAAAAOcGVybWl0LXVzZXItcmMAAAAAAAAAAAAAAHcAAAAHc3NoLXJzYQAAAAMBAAEAAABhANFS2kaktpSGc+CcmEKPyw9mJC4nZKxHKTgLVZeaGbFZOvJTNzBspQHdy7Q1uKSfktxpgjZnksiu/tFF9ngyY2KFoc+U88ya95IZUycBGCUbBQ8+bhDtw/icdDGQD5WnUwAAAG8AAAAHc3NoLXJzYQAAAGC8Y9Z2LQKhIhxf52773XaWrXdxP0t3GBVo4A10vUWiYoAGepr6rQIoGGXFxT4B9Gp+nEBJjOwKDXPrAevow0T9ca8gZN+0ykbhSrXLE5Ao48rqr3zP4O1/9P7e6gp0gw8=`
-
-func TestParseCert(t *testing.T) {
- authKeyBytes := []byte(exampleSSHCert)
-
- key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes)
- if err != nil {
- t.Fatalf("ParseAuthorizedKey: %v", err)
- }
- if len(rest) > 0 {
- t.Errorf("rest: got %q, want empty", rest)
- }
-
- if _, ok := key.(*Certificate); !ok {
- t.Fatalf("got %v (%T), want *Certificate", key, key)
- }
-
- marshaled := MarshalAuthorizedKey(key)
- // Before comparison, remove the trailing newline that
- // MarshalAuthorizedKey adds.
- marshaled = marshaled[:len(marshaled)-1]
- if !bytes.Equal(authKeyBytes, marshaled) {
- t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes)
- }
-}
-
-// Cert generated by ssh-keygen OpenSSH_6.8p1 OS X 10.10.3
-// % ssh-keygen -s ca -I testcert -O source-address=192.168.1.0/24 -O force-command=/bin/sleep user.pub
-// user.pub key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMN
-// Critical Options:
-// force-command /bin/sleep
-// source-address 192.168.1.0/24
-// Extensions:
-// permit-X11-forwarding
-// permit-agent-forwarding
-// permit-port-forwarding
-// permit-pty
-// permit-user-rc
-const exampleSSHCertWithOptions = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDyysCJY0XrO1n03EeRRoITnTPdjENFmWDs9X58PP3VUAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMNAAAAAAAAAAAAAAABAAAACHRlc3RjZXJ0AAAAAAAAAAAAAAAA//////////8AAABLAAAADWZvcmNlLWNvbW1hbmQAAAAOAAAACi9iaW4vc2xlZXAAAAAOc291cmNlLWFkZHJlc3MAAAASAAAADjE5Mi4xNjguMS4wLzI0AAAAggAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEAwU+c5ui5A8+J/CFpjW8wCa52bEODA808WWQDCSuTG/eMXNf59v9Y8Pk0F1E9dGCosSNyVcB/hacUrc6He+i97+HJCyKavBsE6GDxrjRyxYqAlfcOXi/IVmaUGiO8OQ39d4GHrjToInKvExSUeleQyH4Y4/e27T/pILAqPFL3fyrvMLT5qU9QyIt6zIpa7GBP5+urouNavMprV3zsfIqNBbWypinOQAw823a5wN+zwXnhZrgQiHZ/USG09Y6k98y1dTVz8YHlQVR4D3lpTAsKDKJ5hCH9WU4fdf+lU8OyNGaJ/vz0XNqxcToe1l4numLTnaoSuH89pHryjqurB7lJKwAAAQ8AAAAHc3NoLXJzYQAAAQCaHvUIoPL1zWUHIXLvu96/HU1s/i4CAW2IIEuGgxCUCiFj6vyTyYtgxQxcmbfZf6eaITlS6XJZa7Qq4iaFZh75C1DXTX8labXhRSD4E2t//AIP9MC1rtQC5xo6FmbQ+BoKcDskr+mNACcbRSxs3IL3bwCfWDnIw2WbVox9ZdcthJKk4UoCW4ix4QwdHw7zlddlz++fGEEVhmTbll1SUkycGApPFBsAYRTMupUJcYPIeReBI/m8XfkoMk99bV8ZJQTAd7OekHY2/48Ff53jLmyDjP7kNw1F8OaPtkFs6dGJXta4krmaekPy87j+35In5hFj7yoOqvSbmYUkeX70/GGQ`
-
-func TestParseCertWithOptions(t *testing.T) {
- opts := map[string]string{
- "source-address": "192.168.1.0/24",
- "force-command": "/bin/sleep",
- }
- exts := map[string]string{
- "permit-X11-forwarding": "",
- "permit-agent-forwarding": "",
- "permit-port-forwarding": "",
- "permit-pty": "",
- "permit-user-rc": "",
- }
- authKeyBytes := []byte(exampleSSHCertWithOptions)
-
- key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes)
- if err != nil {
- t.Fatalf("ParseAuthorizedKey: %v", err)
- }
- if len(rest) > 0 {
- t.Errorf("rest: got %q, want empty", rest)
- }
- cert, ok := key.(*Certificate)
- if !ok {
- t.Fatalf("got %v (%T), want *Certificate", key, key)
- }
- if !reflect.DeepEqual(cert.CriticalOptions, opts) {
- t.Errorf("unexpected critical options - got %v, want %v", cert.CriticalOptions, opts)
- }
- if !reflect.DeepEqual(cert.Extensions, exts) {
- t.Errorf("unexpected Extensions - got %v, want %v", cert.Extensions, exts)
- }
- marshaled := MarshalAuthorizedKey(key)
- // Before comparison, remove the trailing newline that
- // MarshalAuthorizedKey adds.
- marshaled = marshaled[:len(marshaled)-1]
- if !bytes.Equal(authKeyBytes, marshaled) {
- t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes)
- }
-}
-
-func TestValidateCert(t *testing.T) {
- key, _, _, _, err := ParseAuthorizedKey([]byte(exampleSSHCert))
- if err != nil {
- t.Fatalf("ParseAuthorizedKey: %v", err)
- }
- validCert, ok := key.(*Certificate)
- if !ok {
- t.Fatalf("got %v (%T), want *Certificate", key, key)
- }
- checker := CertChecker{}
- checker.IsUserAuthority = func(k PublicKey) bool {
- return bytes.Equal(k.Marshal(), validCert.SignatureKey.Marshal())
- }
-
- if err := checker.CheckCert("user", validCert); err != nil {
- t.Errorf("Unable to validate certificate: %v", err)
- }
- invalidCert := &Certificate{
- Key: testPublicKeys["rsa"],
- SignatureKey: testPublicKeys["ecdsa"],
- ValidBefore: CertTimeInfinity,
- Signature: &Signature{},
- }
- if err := checker.CheckCert("user", invalidCert); err == nil {
- t.Error("Invalid cert signature passed validation")
- }
-}
-
-func TestValidateCertTime(t *testing.T) {
- cert := Certificate{
- ValidPrincipals: []string{"user"},
- Key: testPublicKeys["rsa"],
- ValidAfter: 50,
- ValidBefore: 100,
- }
-
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
-
- for ts, ok := range map[int64]bool{
- 25: false,
- 50: true,
- 99: true,
- 100: false,
- 125: false,
- } {
- checker := CertChecker{
- Clock: func() time.Time { return time.Unix(ts, 0) },
- }
- checker.IsUserAuthority = func(k PublicKey) bool {
- return bytes.Equal(k.Marshal(),
- testPublicKeys["ecdsa"].Marshal())
- }
-
- if v := checker.CheckCert("user", &cert); (v == nil) != ok {
- t.Errorf("Authenticate(%d): %v", ts, v)
- }
- }
-}
-
-// TODO(hanwen): tests for
-//
-// host keys:
-// * fallbacks
-
-func TestHostKeyCert(t *testing.T) {
- cert := &Certificate{
- ValidPrincipals: []string{"hostname", "hostname.domain", "otherhost"},
- Key: testPublicKeys["rsa"],
- ValidBefore: CertTimeInfinity,
- CertType: HostCert,
- }
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
-
- checker := &CertChecker{
- IsHostAuthority: func(p PublicKey, addr string) bool {
- return addr == "hostname:22" && bytes.Equal(testPublicKeys["ecdsa"].Marshal(), p.Marshal())
- },
- }
-
- certSigner, err := NewCertSigner(cert, testSigners["rsa"])
- if err != nil {
- t.Errorf("NewCertSigner: %v", err)
- }
-
- for _, test := range []struct {
- addr string
- succeed bool
- }{
- {addr: "hostname:22", succeed: true},
- {addr: "otherhost:22", succeed: false}, // The certificate is valid for 'otherhost' as hostname, but we only recognize the authority of the signer for the address 'hostname:22'
- {addr: "lasthost:22", succeed: false},
- } {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- errc := make(chan error)
-
- go func() {
- conf := ServerConfig{
- NoClientAuth: true,
- }
- conf.AddHostKey(certSigner)
- _, _, _, err := NewServerConn(c1, &conf)
- errc <- err
- }()
-
- config := &ClientConfig{
- User: "user",
- HostKeyCallback: checker.CheckHostKey,
- }
- _, _, _, err = NewClientConn(c2, test.addr, config)
-
- if (err == nil) != test.succeed {
- t.Fatalf("NewClientConn(%q): %v", test.addr, err)
- }
-
- err = <-errc
- if (err == nil) != test.succeed {
- t.Fatalf("NewServerConn(%q): %v", test.addr, err)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/channel.go
deleted file mode 100644
index 195530ea0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/channel.go
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "log"
- "sync"
-)
-
-const (
- minPacketLength = 9
- // channelMaxPacket contains the maximum number of bytes that will be
- // sent in a single packet. As per RFC 4253, section 6.1, 32k is also
- // the minimum.
- channelMaxPacket = 1 << 15
- // We follow OpenSSH here.
- channelWindowSize = 64 * channelMaxPacket
-)
-
-// NewChannel represents an incoming request to a channel. It must either be
-// accepted for use by calling Accept, or rejected by calling Reject.
-type NewChannel interface {
- // Accept accepts the channel creation request. It returns the Channel
- // and a Go channel containing SSH requests. The Go channel must be
- // serviced otherwise the Channel will hang.
- Accept() (Channel, <-chan *Request, error)
-
- // Reject rejects the channel creation request. After calling
- // this, no other methods on the Channel may be called.
- Reject(reason RejectionReason, message string) error
-
- // ChannelType returns the type of the channel, as supplied by the
- // client.
- ChannelType() string
-
- // ExtraData returns the arbitrary payload for this channel, as supplied
- // by the client. This data is specific to the channel type.
- ExtraData() []byte
-}
-
-// A Channel is an ordered, reliable, flow-controlled, duplex stream
-// that is multiplexed over an SSH connection.
-type Channel interface {
- // Read reads up to len(data) bytes from the channel.
- Read(data []byte) (int, error)
-
- // Write writes len(data) bytes to the channel.
- Write(data []byte) (int, error)
-
- // Close signals end of channel use. No data may be sent after this
- // call.
- Close() error
-
- // CloseWrite signals the end of sending in-band
- // data. Requests may still be sent, and the other side may
- // still send data
- CloseWrite() error
-
- // SendRequest sends a channel request. If wantReply is true,
- // it will wait for a reply and return the result as a
- // boolean, otherwise the return value will be false. Channel
- // requests are out-of-band messages so they may be sent even
- // if the data stream is closed or blocked by flow control.
- // If the channel is closed before a reply is returned, io.EOF
- // is returned.
- SendRequest(name string, wantReply bool, payload []byte) (bool, error)
-
- // Stderr returns an io.ReadWriter that writes to this channel
- // with the extended data type set to stderr. Stderr may
- // safely be read and written from a different goroutine than
- // Read and Write respectively.
- Stderr() io.ReadWriter
-}
-
-// Request is a request sent outside of the normal stream of
-// data. Requests can either be specific to an SSH channel, or they
-// can be global.
-type Request struct {
- Type string
- WantReply bool
- Payload []byte
-
- ch *channel
- mux *mux
-}
-
-// Reply sends a response to a request. It must be called for all requests
-// where WantReply is true and is a no-op otherwise. The payload argument is
-// ignored for replies to channel-specific requests.
-func (r *Request) Reply(ok bool, payload []byte) error {
- if !r.WantReply {
- return nil
- }
-
- if r.ch == nil {
- return r.mux.ackRequest(ok, payload)
- }
-
- return r.ch.ackRequest(ok)
-}
-
-// RejectionReason is an enumeration used when rejecting channel creation
-// requests. See RFC 4254, section 5.1.
-type RejectionReason uint32
-
-const (
- Prohibited RejectionReason = iota + 1
- ConnectionFailed
- UnknownChannelType
- ResourceShortage
-)
-
-// String converts the rejection reason to human readable form.
-func (r RejectionReason) String() string {
- switch r {
- case Prohibited:
- return "administratively prohibited"
- case ConnectionFailed:
- return "connect failed"
- case UnknownChannelType:
- return "unknown channel type"
- case ResourceShortage:
- return "resource shortage"
- }
- return fmt.Sprintf("unknown reason %d", int(r))
-}
-
-func min(a uint32, b int) uint32 {
- if a < uint32(b) {
- return a
- }
- return uint32(b)
-}
-
-type channelDirection uint8
-
-const (
- channelInbound channelDirection = iota
- channelOutbound
-)
-
-// channel is an implementation of the Channel interface that works
-// with the mux class.
-type channel struct {
- // R/O after creation
- chanType string
- extraData []byte
- localId, remoteId uint32
-
- // maxIncomingPayload and maxRemotePayload are the maximum
- // payload sizes of normal and extended data packets for
- // receiving and sending, respectively. The wire packet will
- // be 9 or 13 bytes larger (excluding encryption overhead).
- maxIncomingPayload uint32
- maxRemotePayload uint32
-
- mux *mux
-
- // decided is set to true if an accept or reject message has been sent
- // (for outbound channels) or received (for inbound channels).
- decided bool
-
- // direction contains either channelOutbound, for channels created
- // locally, or channelInbound, for channels created by the peer.
- direction channelDirection
-
- // Pending internal channel messages.
- msg chan interface{}
-
- // Since requests have no ID, there can be only one request
- // with WantReply=true outstanding. This lock is held by a
- // goroutine that has such an outgoing request pending.
- sentRequestMu sync.Mutex
-
- incomingRequests chan *Request
-
- sentEOF bool
-
- // thread-safe data
- remoteWin window
- pending *buffer
- extPending *buffer
-
- // windowMu protects myWindow, the flow-control window.
- windowMu sync.Mutex
- myWindow uint32
-
- // writeMu serializes calls to mux.conn.writePacket() and
- // protects sentClose and packetPool. This mutex must be
- // different from windowMu, as writePacket can block if there
- // is a key exchange pending.
- writeMu sync.Mutex
- sentClose bool
-
- // packetPool has a buffer for each extended channel ID to
- // save allocations during writes.
- packetPool map[uint32][]byte
-}
-
-// writePacket sends a packet. If the packet is a channel close, it updates
-// sentClose. This method takes the lock c.writeMu.
-func (c *channel) writePacket(packet []byte) error {
- c.writeMu.Lock()
- if c.sentClose {
- c.writeMu.Unlock()
- return io.EOF
- }
- c.sentClose = (packet[0] == msgChannelClose)
- err := c.mux.conn.writePacket(packet)
- c.writeMu.Unlock()
- return err
-}
-
-func (c *channel) sendMessage(msg interface{}) error {
- if debugMux {
- log.Printf("send(%d): %#v", c.mux.chanList.offset, msg)
- }
-
- p := Marshal(msg)
- binary.BigEndian.PutUint32(p[1:], c.remoteId)
- return c.writePacket(p)
-}
-
-// WriteExtended writes data to a specific extended stream. These streams are
-// used, for example, for stderr.
-func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) {
- if c.sentEOF {
- return 0, io.EOF
- }
- // 1 byte message type, 4 bytes remoteId, 4 bytes data length
- opCode := byte(msgChannelData)
- headerLength := uint32(9)
- if extendedCode > 0 {
- headerLength += 4
- opCode = msgChannelExtendedData
- }
-
- c.writeMu.Lock()
- packet := c.packetPool[extendedCode]
- // We don't remove the buffer from packetPool, so
- // WriteExtended calls from different goroutines will be
- // flagged as errors by the race detector.
- c.writeMu.Unlock()
-
- for len(data) > 0 {
- space := min(c.maxRemotePayload, len(data))
- if space, err = c.remoteWin.reserve(space); err != nil {
- return n, err
- }
- if want := headerLength + space; uint32(cap(packet)) < want {
- packet = make([]byte, want)
- } else {
- packet = packet[:want]
- }
-
- todo := data[:space]
-
- packet[0] = opCode
- binary.BigEndian.PutUint32(packet[1:], c.remoteId)
- if extendedCode > 0 {
- binary.BigEndian.PutUint32(packet[5:], uint32(extendedCode))
- }
- binary.BigEndian.PutUint32(packet[headerLength-4:], uint32(len(todo)))
- copy(packet[headerLength:], todo)
- if err = c.writePacket(packet); err != nil {
- return n, err
- }
-
- n += len(todo)
- data = data[len(todo):]
- }
-
- c.writeMu.Lock()
- c.packetPool[extendedCode] = packet
- c.writeMu.Unlock()
-
- return n, err
-}
-
-func (c *channel) handleData(packet []byte) error {
- headerLen := 9
- isExtendedData := packet[0] == msgChannelExtendedData
- if isExtendedData {
- headerLen = 13
- }
- if len(packet) < headerLen {
- // malformed data packet
- return parseError(packet[0])
- }
-
- var extended uint32
- if isExtendedData {
- extended = binary.BigEndian.Uint32(packet[5:])
- }
-
- length := binary.BigEndian.Uint32(packet[headerLen-4 : headerLen])
- if length == 0 {
- return nil
- }
- if length > c.maxIncomingPayload {
- // TODO(hanwen): should send Disconnect?
- return errors.New("ssh: incoming packet exceeds maximum payload size")
- }
-
- data := packet[headerLen:]
- if length != uint32(len(data)) {
- return errors.New("ssh: wrong packet length")
- }
-
- c.windowMu.Lock()
- if c.myWindow < length {
- c.windowMu.Unlock()
- // TODO(hanwen): should send Disconnect with reason?
- return errors.New("ssh: remote side wrote too much")
- }
- c.myWindow -= length
- c.windowMu.Unlock()
-
- if extended == 1 {
- c.extPending.write(data)
- } else if extended > 0 {
- // discard other extended data.
- } else {
- c.pending.write(data)
- }
- return nil
-}
-
-func (c *channel) adjustWindow(n uint32) error {
- c.windowMu.Lock()
- // Since myWindow is managed on our side, and can never exceed
- // the initial window setting, we don't worry about overflow.
- c.myWindow += uint32(n)
- c.windowMu.Unlock()
- return c.sendMessage(windowAdjustMsg{
- AdditionalBytes: uint32(n),
- })
-}
-
-func (c *channel) ReadExtended(data []byte, extended uint32) (n int, err error) {
- switch extended {
- case 1:
- n, err = c.extPending.Read(data)
- case 0:
- n, err = c.pending.Read(data)
- default:
- return 0, fmt.Errorf("ssh: extended code %d unimplemented", extended)
- }
-
- if n > 0 {
- err = c.adjustWindow(uint32(n))
- // sendWindowAdjust can return io.EOF if the remote
- // peer has closed the connection, however we want to
- // defer forwarding io.EOF to the caller of Read until
- // the buffer has been drained.
- if n > 0 && err == io.EOF {
- err = nil
- }
- }
-
- return n, err
-}
-
-func (c *channel) close() {
- c.pending.eof()
- c.extPending.eof()
- close(c.msg)
- close(c.incomingRequests)
- c.writeMu.Lock()
- // This is not necessary for a normal channel teardown, but if
- // there was another error, it is.
- c.sentClose = true
- c.writeMu.Unlock()
- // Unblock writers.
- c.remoteWin.close()
-}
-
-// responseMessageReceived is called when a success or failure message is
-// received on a channel to check that such a message is reasonable for the
-// given channel.
-func (c *channel) responseMessageReceived() error {
- if c.direction == channelInbound {
- return errors.New("ssh: channel response message received on inbound channel")
- }
- if c.decided {
- return errors.New("ssh: duplicate response received for channel")
- }
- c.decided = true
- return nil
-}
-
-func (c *channel) handlePacket(packet []byte) error {
- switch packet[0] {
- case msgChannelData, msgChannelExtendedData:
- return c.handleData(packet)
- case msgChannelClose:
- c.sendMessage(channelCloseMsg{PeersId: c.remoteId})
- c.mux.chanList.remove(c.localId)
- c.close()
- return nil
- case msgChannelEOF:
- // RFC 4254 is mute on how EOF affects dataExt messages but
- // it is logical to signal EOF at the same time.
- c.extPending.eof()
- c.pending.eof()
- return nil
- }
-
- decoded, err := decode(packet)
- if err != nil {
- return err
- }
-
- switch msg := decoded.(type) {
- case *channelOpenFailureMsg:
- if err := c.responseMessageReceived(); err != nil {
- return err
- }
- c.mux.chanList.remove(msg.PeersId)
- c.msg <- msg
- case *channelOpenConfirmMsg:
- if err := c.responseMessageReceived(); err != nil {
- return err
- }
- if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 {
- return fmt.Errorf("ssh: invalid MaxPacketSize %d from peer", msg.MaxPacketSize)
- }
- c.remoteId = msg.MyId
- c.maxRemotePayload = msg.MaxPacketSize
- c.remoteWin.add(msg.MyWindow)
- c.msg <- msg
- case *windowAdjustMsg:
- if !c.remoteWin.add(msg.AdditionalBytes) {
- return fmt.Errorf("ssh: invalid window update for %d bytes", msg.AdditionalBytes)
- }
- case *channelRequestMsg:
- req := Request{
- Type: msg.Request,
- WantReply: msg.WantReply,
- Payload: msg.RequestSpecificData,
- ch: c,
- }
-
- c.incomingRequests <- &req
- default:
- c.msg <- msg
- }
- return nil
-}
-
-func (m *mux) newChannel(chanType string, direction channelDirection, extraData []byte) *channel {
- ch := &channel{
- remoteWin: window{Cond: newCond()},
- myWindow: channelWindowSize,
- pending: newBuffer(),
- extPending: newBuffer(),
- direction: direction,
- incomingRequests: make(chan *Request, chanSize),
- msg: make(chan interface{}, chanSize),
- chanType: chanType,
- extraData: extraData,
- mux: m,
- packetPool: make(map[uint32][]byte),
- }
- ch.localId = m.chanList.add(ch)
- return ch
-}
-
-var errUndecided = errors.New("ssh: must Accept or Reject channel")
-var errDecidedAlready = errors.New("ssh: can call Accept or Reject only once")
-
-type extChannel struct {
- code uint32
- ch *channel
-}
-
-func (e *extChannel) Write(data []byte) (n int, err error) {
- return e.ch.WriteExtended(data, e.code)
-}
-
-func (e *extChannel) Read(data []byte) (n int, err error) {
- return e.ch.ReadExtended(data, e.code)
-}
-
-func (c *channel) Accept() (Channel, <-chan *Request, error) {
- if c.decided {
- return nil, nil, errDecidedAlready
- }
- c.maxIncomingPayload = channelMaxPacket
- confirm := channelOpenConfirmMsg{
- PeersId: c.remoteId,
- MyId: c.localId,
- MyWindow: c.myWindow,
- MaxPacketSize: c.maxIncomingPayload,
- }
- c.decided = true
- if err := c.sendMessage(confirm); err != nil {
- return nil, nil, err
- }
-
- return c, c.incomingRequests, nil
-}
-
-func (ch *channel) Reject(reason RejectionReason, message string) error {
- if ch.decided {
- return errDecidedAlready
- }
- reject := channelOpenFailureMsg{
- PeersId: ch.remoteId,
- Reason: reason,
- Message: message,
- Language: "en",
- }
- ch.decided = true
- return ch.sendMessage(reject)
-}
-
-func (ch *channel) Read(data []byte) (int, error) {
- if !ch.decided {
- return 0, errUndecided
- }
- return ch.ReadExtended(data, 0)
-}
-
-func (ch *channel) Write(data []byte) (int, error) {
- if !ch.decided {
- return 0, errUndecided
- }
- return ch.WriteExtended(data, 0)
-}
-
-func (ch *channel) CloseWrite() error {
- if !ch.decided {
- return errUndecided
- }
- ch.sentEOF = true
- return ch.sendMessage(channelEOFMsg{
- PeersId: ch.remoteId})
-}
-
-func (ch *channel) Close() error {
- if !ch.decided {
- return errUndecided
- }
-
- return ch.sendMessage(channelCloseMsg{
- PeersId: ch.remoteId})
-}
-
-// Extended returns an io.ReadWriter that sends and receives data on the given,
-// SSH extended stream. Such streams are used, for example, for stderr.
-func (ch *channel) Extended(code uint32) io.ReadWriter {
- if !ch.decided {
- return nil
- }
- return &extChannel{code, ch}
-}
-
-func (ch *channel) Stderr() io.ReadWriter {
- return ch.Extended(1)
-}
-
-func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (bool, error) {
- if !ch.decided {
- return false, errUndecided
- }
-
- if wantReply {
- ch.sentRequestMu.Lock()
- defer ch.sentRequestMu.Unlock()
- }
-
- msg := channelRequestMsg{
- PeersId: ch.remoteId,
- Request: name,
- WantReply: wantReply,
- RequestSpecificData: payload,
- }
-
- if err := ch.sendMessage(msg); err != nil {
- return false, err
- }
-
- if wantReply {
- m, ok := (<-ch.msg)
- if !ok {
- return false, io.EOF
- }
- switch m.(type) {
- case *channelRequestFailureMsg:
- return false, nil
- case *channelRequestSuccessMsg:
- return true, nil
- default:
- return false, fmt.Errorf("ssh: unexpected response to channel request: %#v", m)
- }
- }
-
- return false, nil
-}
-
-// ackRequest either sends an ack or nack to the channel request.
-func (ch *channel) ackRequest(ok bool) error {
- if !ch.decided {
- return errUndecided
- }
-
- var msg interface{}
- if !ok {
- msg = channelRequestFailureMsg{
- PeersId: ch.remoteId,
- }
- } else {
- msg = channelRequestSuccessMsg{
- PeersId: ch.remoteId,
- }
- }
- return ch.sendMessage(msg)
-}
-
-func (ch *channel) ChannelType() string {
- return ch.chanType
-}
-
-func (ch *channel) ExtraData() []byte {
- return ch.extraData
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher.go
deleted file mode 100644
index aed2b1f01..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher.go
+++ /dev/null
@@ -1,629 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "crypto/aes"
- "crypto/cipher"
- "crypto/des"
- "crypto/rc4"
- "crypto/subtle"
- "encoding/binary"
- "errors"
- "fmt"
- "hash"
- "io"
- "io/ioutil"
-)
-
-const (
- packetSizeMultiple = 16 // TODO(huin) this should be determined by the cipher.
-
- // RFC 4253 section 6.1 defines a minimum packet size of 32768 that implementations
- // MUST be able to process (plus a few more kilobytes for padding and mac). The RFC
- // indicates implementations SHOULD be able to handle larger packet sizes, but then
- // waffles on about reasonable limits.
- //
- // OpenSSH caps their maxPacket at 256kB so we choose to do
- // the same. maxPacket is also used to ensure that uint32
- // length fields do not overflow, so it should remain well
- // below 4G.
- maxPacket = 256 * 1024
-)
-
-// noneCipher implements cipher.Stream and provides no encryption. It is used
-// by the transport before the first key-exchange.
-type noneCipher struct{}
-
-func (c noneCipher) XORKeyStream(dst, src []byte) {
- copy(dst, src)
-}
-
-func newAESCTR(key, iv []byte) (cipher.Stream, error) {
- c, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
- return cipher.NewCTR(c, iv), nil
-}
-
-func newRC4(key, iv []byte) (cipher.Stream, error) {
- return rc4.NewCipher(key)
-}
-
-type streamCipherMode struct {
- keySize int
- ivSize int
- skip int
- createFunc func(key, iv []byte) (cipher.Stream, error)
-}
-
-func (c *streamCipherMode) createStream(key, iv []byte) (cipher.Stream, error) {
- if len(key) < c.keySize {
- panic("ssh: key length too small for cipher")
- }
- if len(iv) < c.ivSize {
- panic("ssh: iv too small for cipher")
- }
-
- stream, err := c.createFunc(key[:c.keySize], iv[:c.ivSize])
- if err != nil {
- return nil, err
- }
-
- var streamDump []byte
- if c.skip > 0 {
- streamDump = make([]byte, 512)
- }
-
- for remainingToDump := c.skip; remainingToDump > 0; {
- dumpThisTime := remainingToDump
- if dumpThisTime > len(streamDump) {
- dumpThisTime = len(streamDump)
- }
- stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime])
- remainingToDump -= dumpThisTime
- }
-
- return stream, nil
-}
-
-// cipherModes documents properties of supported ciphers. Ciphers not included
-// are not supported and will not be negotiated, even if explicitly requested in
-// ClientConfig.Crypto.Ciphers.
-var cipherModes = map[string]*streamCipherMode{
- // Ciphers from RFC4344, which introduced many CTR-based ciphers. Algorithms
- // are defined in the order specified in the RFC.
- "aes128-ctr": {16, aes.BlockSize, 0, newAESCTR},
- "aes192-ctr": {24, aes.BlockSize, 0, newAESCTR},
- "aes256-ctr": {32, aes.BlockSize, 0, newAESCTR},
-
- // Ciphers from RFC4345, which introduces security-improved arcfour ciphers.
- // They are defined in the order specified in the RFC.
- "arcfour128": {16, 0, 1536, newRC4},
- "arcfour256": {32, 0, 1536, newRC4},
-
- // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol.
- // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and
- // RC4) has problems with weak keys, and should be used with caution."
- // RFC4345 introduces improved versions of Arcfour.
- "arcfour": {16, 0, 0, newRC4},
-
- // AES-GCM is not a stream cipher, so it is constructed with a
- // special case. If we add any more non-stream ciphers, we
- // should invest a cleaner way to do this.
- gcmCipherID: {16, 12, 0, nil},
-
- // CBC mode is insecure and so is not included in the default config.
- // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely
- // needed, it's possible to specify a custom Config to enable it.
- // You should expect that an active attacker can recover plaintext if
- // you do.
- aes128cbcID: {16, aes.BlockSize, 0, nil},
-
- // 3des-cbc is insecure and is disabled by default.
- tripledescbcID: {24, des.BlockSize, 0, nil},
-}
-
-// prefixLen is the length of the packet prefix that contains the packet length
-// and number of padding bytes.
-const prefixLen = 5
-
-// streamPacketCipher is a packetCipher using a stream cipher.
-type streamPacketCipher struct {
- mac hash.Hash
- cipher cipher.Stream
- etm bool
-
- // The following members are to avoid per-packet allocations.
- prefix [prefixLen]byte
- seqNumBytes [4]byte
- padding [2 * packetSizeMultiple]byte
- packetData []byte
- macResult []byte
-}
-
-// readPacket reads and decrypt a single packet from the reader argument.
-func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
- if _, err := io.ReadFull(r, s.prefix[:]); err != nil {
- return nil, err
- }
-
- var encryptedPaddingLength [1]byte
- if s.mac != nil && s.etm {
- copy(encryptedPaddingLength[:], s.prefix[4:5])
- s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5])
- } else {
- s.cipher.XORKeyStream(s.prefix[:], s.prefix[:])
- }
-
- length := binary.BigEndian.Uint32(s.prefix[0:4])
- paddingLength := uint32(s.prefix[4])
-
- var macSize uint32
- if s.mac != nil {
- s.mac.Reset()
- binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum)
- s.mac.Write(s.seqNumBytes[:])
- if s.etm {
- s.mac.Write(s.prefix[:4])
- s.mac.Write(encryptedPaddingLength[:])
- } else {
- s.mac.Write(s.prefix[:])
- }
- macSize = uint32(s.mac.Size())
- }
-
- if length <= paddingLength+1 {
- return nil, errors.New("ssh: invalid packet length, packet too small")
- }
-
- if length > maxPacket {
- return nil, errors.New("ssh: invalid packet length, packet too large")
- }
-
- // the maxPacket check above ensures that length-1+macSize
- // does not overflow.
- if uint32(cap(s.packetData)) < length-1+macSize {
- s.packetData = make([]byte, length-1+macSize)
- } else {
- s.packetData = s.packetData[:length-1+macSize]
- }
-
- if _, err := io.ReadFull(r, s.packetData); err != nil {
- return nil, err
- }
- mac := s.packetData[length-1:]
- data := s.packetData[:length-1]
-
- if s.mac != nil && s.etm {
- s.mac.Write(data)
- }
-
- s.cipher.XORKeyStream(data, data)
-
- if s.mac != nil {
- if !s.etm {
- s.mac.Write(data)
- }
- s.macResult = s.mac.Sum(s.macResult[:0])
- if subtle.ConstantTimeCompare(s.macResult, mac) != 1 {
- return nil, errors.New("ssh: MAC failure")
- }
- }
-
- return s.packetData[:length-paddingLength-1], nil
-}
-
-// writePacket encrypts and sends a packet of data to the writer argument
-func (s *streamPacketCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
- if len(packet) > maxPacket {
- return errors.New("ssh: packet too large")
- }
-
- aadlen := 0
- if s.mac != nil && s.etm {
- // packet length is not encrypted for EtM modes
- aadlen = 4
- }
-
- paddingLength := packetSizeMultiple - (prefixLen+len(packet)-aadlen)%packetSizeMultiple
- if paddingLength < 4 {
- paddingLength += packetSizeMultiple
- }
-
- length := len(packet) + 1 + paddingLength
- binary.BigEndian.PutUint32(s.prefix[:], uint32(length))
- s.prefix[4] = byte(paddingLength)
- padding := s.padding[:paddingLength]
- if _, err := io.ReadFull(rand, padding); err != nil {
- return err
- }
-
- if s.mac != nil {
- s.mac.Reset()
- binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum)
- s.mac.Write(s.seqNumBytes[:])
-
- if s.etm {
- // For EtM algorithms, the packet length must stay unencrypted,
- // but the following data (padding length) must be encrypted
- s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5])
- }
-
- s.mac.Write(s.prefix[:])
-
- if !s.etm {
- // For non-EtM algorithms, the algorithm is applied on unencrypted data
- s.mac.Write(packet)
- s.mac.Write(padding)
- }
- }
-
- if !(s.mac != nil && s.etm) {
- // For EtM algorithms, the padding length has already been encrypted
- // and the packet length must remain unencrypted
- s.cipher.XORKeyStream(s.prefix[:], s.prefix[:])
- }
-
- s.cipher.XORKeyStream(packet, packet)
- s.cipher.XORKeyStream(padding, padding)
-
- if s.mac != nil && s.etm {
- // For EtM algorithms, packet and padding must be encrypted
- s.mac.Write(packet)
- s.mac.Write(padding)
- }
-
- if _, err := w.Write(s.prefix[:]); err != nil {
- return err
- }
- if _, err := w.Write(packet); err != nil {
- return err
- }
- if _, err := w.Write(padding); err != nil {
- return err
- }
-
- if s.mac != nil {
- s.macResult = s.mac.Sum(s.macResult[:0])
- if _, err := w.Write(s.macResult); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type gcmCipher struct {
- aead cipher.AEAD
- prefix [4]byte
- iv []byte
- buf []byte
-}
-
-func newGCMCipher(iv, key []byte) (packetCipher, error) {
- c, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
-
- aead, err := cipher.NewGCM(c)
- if err != nil {
- return nil, err
- }
-
- return &gcmCipher{
- aead: aead,
- iv: iv,
- }, nil
-}
-
-const gcmTagSize = 16
-
-func (c *gcmCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
- // Pad out to multiple of 16 bytes. This is different from the
- // stream cipher because that encrypts the length too.
- padding := byte(packetSizeMultiple - (1+len(packet))%packetSizeMultiple)
- if padding < 4 {
- padding += packetSizeMultiple
- }
-
- length := uint32(len(packet) + int(padding) + 1)
- binary.BigEndian.PutUint32(c.prefix[:], length)
- if _, err := w.Write(c.prefix[:]); err != nil {
- return err
- }
-
- if cap(c.buf) < int(length) {
- c.buf = make([]byte, length)
- } else {
- c.buf = c.buf[:length]
- }
-
- c.buf[0] = padding
- copy(c.buf[1:], packet)
- if _, err := io.ReadFull(rand, c.buf[1+len(packet):]); err != nil {
- return err
- }
- c.buf = c.aead.Seal(c.buf[:0], c.iv, c.buf, c.prefix[:])
- if _, err := w.Write(c.buf); err != nil {
- return err
- }
- c.incIV()
-
- return nil
-}
-
-func (c *gcmCipher) incIV() {
- for i := 4 + 7; i >= 4; i-- {
- c.iv[i]++
- if c.iv[i] != 0 {
- break
- }
- }
-}
-
-func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
- if _, err := io.ReadFull(r, c.prefix[:]); err != nil {
- return nil, err
- }
- length := binary.BigEndian.Uint32(c.prefix[:])
- if length > maxPacket {
- return nil, errors.New("ssh: max packet length exceeded.")
- }
-
- if cap(c.buf) < int(length+gcmTagSize) {
- c.buf = make([]byte, length+gcmTagSize)
- } else {
- c.buf = c.buf[:length+gcmTagSize]
- }
-
- if _, err := io.ReadFull(r, c.buf); err != nil {
- return nil, err
- }
-
- plain, err := c.aead.Open(c.buf[:0], c.iv, c.buf, c.prefix[:])
- if err != nil {
- return nil, err
- }
- c.incIV()
-
- padding := plain[0]
- if padding < 4 {
- // padding is a byte, so it automatically satisfies
- // the maximum size, which is 255.
- return nil, fmt.Errorf("ssh: illegal padding %d", padding)
- }
-
- if int(padding+1) >= len(plain) {
- return nil, fmt.Errorf("ssh: padding %d too large", padding)
- }
- plain = plain[1 : length-uint32(padding)]
- return plain, nil
-}
-
-// cbcCipher implements aes128-cbc cipher defined in RFC 4253 section 6.1
-type cbcCipher struct {
- mac hash.Hash
- macSize uint32
- decrypter cipher.BlockMode
- encrypter cipher.BlockMode
-
- // The following members are to avoid per-packet allocations.
- seqNumBytes [4]byte
- packetData []byte
- macResult []byte
-
- // Amount of data we should still read to hide which
- // verification error triggered.
- oracleCamouflage uint32
-}
-
-func newCBCCipher(c cipher.Block, iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) {
- cbc := &cbcCipher{
- mac: macModes[algs.MAC].new(macKey),
- decrypter: cipher.NewCBCDecrypter(c, iv),
- encrypter: cipher.NewCBCEncrypter(c, iv),
- packetData: make([]byte, 1024),
- }
- if cbc.mac != nil {
- cbc.macSize = uint32(cbc.mac.Size())
- }
-
- return cbc, nil
-}
-
-func newAESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) {
- c, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
-
- cbc, err := newCBCCipher(c, iv, key, macKey, algs)
- if err != nil {
- return nil, err
- }
-
- return cbc, nil
-}
-
-func newTripleDESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) {
- c, err := des.NewTripleDESCipher(key)
- if err != nil {
- return nil, err
- }
-
- cbc, err := newCBCCipher(c, iv, key, macKey, algs)
- if err != nil {
- return nil, err
- }
-
- return cbc, nil
-}
-
-func maxUInt32(a, b int) uint32 {
- if a > b {
- return uint32(a)
- }
- return uint32(b)
-}
-
-const (
- cbcMinPacketSizeMultiple = 8
- cbcMinPacketSize = 16
- cbcMinPaddingSize = 4
-)
-
-// cbcError represents a verification error that may leak information.
-type cbcError string
-
-func (e cbcError) Error() string { return string(e) }
-
-func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
- p, err := c.readPacketLeaky(seqNum, r)
- if err != nil {
- if _, ok := err.(cbcError); ok {
- // Verification error: read a fixed amount of
- // data, to make distinguishing between
- // failing MAC and failing length check more
- // difficult.
- io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage))
- }
- }
- return p, err
-}
-
-func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) {
- blockSize := c.decrypter.BlockSize()
-
- // Read the header, which will include some of the subsequent data in the
- // case of block ciphers - this is copied back to the payload later.
- // How many bytes of payload/padding will be read with this first read.
- firstBlockLength := uint32((prefixLen + blockSize - 1) / blockSize * blockSize)
- firstBlock := c.packetData[:firstBlockLength]
- if _, err := io.ReadFull(r, firstBlock); err != nil {
- return nil, err
- }
-
- c.oracleCamouflage = maxPacket + 4 + c.macSize - firstBlockLength
-
- c.decrypter.CryptBlocks(firstBlock, firstBlock)
- length := binary.BigEndian.Uint32(firstBlock[:4])
- if length > maxPacket {
- return nil, cbcError("ssh: packet too large")
- }
- if length+4 < maxUInt32(cbcMinPacketSize, blockSize) {
- // The minimum size of a packet is 16 (or the cipher block size, whichever
- // is larger) bytes.
- return nil, cbcError("ssh: packet too small")
- }
- // The length of the packet (including the length field but not the MAC) must
- // be a multiple of the block size or 8, whichever is larger.
- if (length+4)%maxUInt32(cbcMinPacketSizeMultiple, blockSize) != 0 {
- return nil, cbcError("ssh: invalid packet length multiple")
- }
-
- paddingLength := uint32(firstBlock[4])
- if paddingLength < cbcMinPaddingSize || length <= paddingLength+1 {
- return nil, cbcError("ssh: invalid packet length")
- }
-
- // Positions within the c.packetData buffer:
- macStart := 4 + length
- paddingStart := macStart - paddingLength
-
- // Entire packet size, starting before length, ending at end of mac.
- entirePacketSize := macStart + c.macSize
-
- // Ensure c.packetData is large enough for the entire packet data.
- if uint32(cap(c.packetData)) < entirePacketSize {
- // Still need to upsize and copy, but this should be rare at runtime, only
- // on upsizing the packetData buffer.
- c.packetData = make([]byte, entirePacketSize)
- copy(c.packetData, firstBlock)
- } else {
- c.packetData = c.packetData[:entirePacketSize]
- }
-
- if n, err := io.ReadFull(r, c.packetData[firstBlockLength:]); err != nil {
- return nil, err
- } else {
- c.oracleCamouflage -= uint32(n)
- }
-
- remainingCrypted := c.packetData[firstBlockLength:macStart]
- c.decrypter.CryptBlocks(remainingCrypted, remainingCrypted)
-
- mac := c.packetData[macStart:]
- if c.mac != nil {
- c.mac.Reset()
- binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum)
- c.mac.Write(c.seqNumBytes[:])
- c.mac.Write(c.packetData[:macStart])
- c.macResult = c.mac.Sum(c.macResult[:0])
- if subtle.ConstantTimeCompare(c.macResult, mac) != 1 {
- return nil, cbcError("ssh: MAC failure")
- }
- }
-
- return c.packetData[prefixLen:paddingStart], nil
-}
-
-func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
- effectiveBlockSize := maxUInt32(cbcMinPacketSizeMultiple, c.encrypter.BlockSize())
-
- // Length of encrypted portion of the packet (header, payload, padding).
- // Enforce minimum padding and packet size.
- encLength := maxUInt32(prefixLen+len(packet)+cbcMinPaddingSize, cbcMinPaddingSize)
- // Enforce block size.
- encLength = (encLength + effectiveBlockSize - 1) / effectiveBlockSize * effectiveBlockSize
-
- length := encLength - 4
- paddingLength := int(length) - (1 + len(packet))
-
- // Overall buffer contains: header, payload, padding, mac.
- // Space for the MAC is reserved in the capacity but not the slice length.
- bufferSize := encLength + c.macSize
- if uint32(cap(c.packetData)) < bufferSize {
- c.packetData = make([]byte, encLength, bufferSize)
- } else {
- c.packetData = c.packetData[:encLength]
- }
-
- p := c.packetData
-
- // Packet header.
- binary.BigEndian.PutUint32(p, length)
- p = p[4:]
- p[0] = byte(paddingLength)
-
- // Payload.
- p = p[1:]
- copy(p, packet)
-
- // Padding.
- p = p[len(packet):]
- if _, err := io.ReadFull(rand, p); err != nil {
- return err
- }
-
- if c.mac != nil {
- c.mac.Reset()
- binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum)
- c.mac.Write(c.seqNumBytes[:])
- c.mac.Write(c.packetData)
- // The MAC is now appended into the capacity reserved for it earlier.
- c.packetData = c.mac.Sum(c.packetData)
- }
-
- c.encrypter.CryptBlocks(c.packetData[:encLength], c.packetData[:encLength])
-
- if _, err := w.Write(c.packetData); err != nil {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher_test.go
deleted file mode 100644
index 5cfa17a62..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/cipher_test.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto"
- "crypto/aes"
- "crypto/rand"
- "testing"
-)
-
-func TestDefaultCiphersExist(t *testing.T) {
- for _, cipherAlgo := range supportedCiphers {
- if _, ok := cipherModes[cipherAlgo]; !ok {
- t.Errorf("default cipher %q is unknown", cipherAlgo)
- }
- }
-}
-
-func TestPacketCiphers(t *testing.T) {
- // Still test aes128cbc cipher although it's commented out.
- cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil}
- defer delete(cipherModes, aes128cbcID)
-
- for cipher := range cipherModes {
- for mac := range macModes {
- kr := &kexResult{Hash: crypto.SHA1}
- algs := directionAlgorithms{
- Cipher: cipher,
- MAC: mac,
- Compression: "none",
- }
- client, err := newPacketCipher(clientKeys, algs, kr)
- if err != nil {
- t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err)
- continue
- }
- server, err := newPacketCipher(clientKeys, algs, kr)
- if err != nil {
- t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err)
- continue
- }
-
- want := "bla bla"
- input := []byte(want)
- buf := &bytes.Buffer{}
- if err := client.writePacket(0, buf, rand.Reader, input); err != nil {
- t.Errorf("writePacket(%q, %q): %v", cipher, mac, err)
- continue
- }
-
- packet, err := server.readPacket(0, buf)
- if err != nil {
- t.Errorf("readPacket(%q, %q): %v", cipher, mac, err)
- continue
- }
-
- if string(packet) != want {
- t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want)
- }
- }
- }
-}
-
-func TestCBCOracleCounterMeasure(t *testing.T) {
- cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil}
- defer delete(cipherModes, aes128cbcID)
-
- kr := &kexResult{Hash: crypto.SHA1}
- algs := directionAlgorithms{
- Cipher: aes128cbcID,
- MAC: "hmac-sha1",
- Compression: "none",
- }
- client, err := newPacketCipher(clientKeys, algs, kr)
- if err != nil {
- t.Fatalf("newPacketCipher(client): %v", err)
- }
-
- want := "bla bla"
- input := []byte(want)
- buf := &bytes.Buffer{}
- if err := client.writePacket(0, buf, rand.Reader, input); err != nil {
- t.Errorf("writePacket: %v", err)
- }
-
- packetSize := buf.Len()
- buf.Write(make([]byte, 2*maxPacket))
-
- // We corrupt each byte, but this usually will only test the
- // 'packet too large' or 'MAC failure' cases.
- lastRead := -1
- for i := 0; i < packetSize; i++ {
- server, err := newPacketCipher(clientKeys, algs, kr)
- if err != nil {
- t.Fatalf("newPacketCipher(client): %v", err)
- }
-
- fresh := &bytes.Buffer{}
- fresh.Write(buf.Bytes())
- fresh.Bytes()[i] ^= 0x01
-
- before := fresh.Len()
- _, err = server.readPacket(0, fresh)
- if err == nil {
- t.Errorf("corrupt byte %d: readPacket succeeded ", i)
- continue
- }
- if _, ok := err.(cbcError); !ok {
- t.Errorf("corrupt byte %d: got %v (%T), want cbcError", i, err, err)
- continue
- }
-
- after := fresh.Len()
- bytesRead := before - after
- if bytesRead < maxPacket {
- t.Errorf("corrupt byte %d: read %d bytes, want more than %d", i, bytesRead, maxPacket)
- continue
- }
-
- if i > 0 && bytesRead != lastRead {
- t.Errorf("corrupt byte %d: read %d bytes, want %d bytes read", i, bytesRead, lastRead)
- }
- lastRead = bytesRead
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client.go
deleted file mode 100644
index 6fd199455..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "errors"
- "fmt"
- "net"
- "os"
- "sync"
- "time"
-)
-
-// Client implements a traditional SSH client that supports shells,
-// subprocesses, TCP port/streamlocal forwarding and tunneled dialing.
-type Client struct {
- Conn
-
- forwards forwardList // forwarded tcpip connections from the remote side
- mu sync.Mutex
- channelHandlers map[string]chan NewChannel
-}
-
-// HandleChannelOpen returns a channel on which NewChannel requests
-// for the given type are sent. If the type already is being handled,
-// nil is returned. The channel is closed when the connection is closed.
-func (c *Client) HandleChannelOpen(channelType string) <-chan NewChannel {
- c.mu.Lock()
- defer c.mu.Unlock()
- if c.channelHandlers == nil {
- // The SSH channel has been closed.
- c := make(chan NewChannel)
- close(c)
- return c
- }
-
- ch := c.channelHandlers[channelType]
- if ch != nil {
- return nil
- }
-
- ch = make(chan NewChannel, chanSize)
- c.channelHandlers[channelType] = ch
- return ch
-}
-
-// NewClient creates a Client on top of the given connection.
-func NewClient(c Conn, chans <-chan NewChannel, reqs <-chan *Request) *Client {
- conn := &Client{
- Conn: c,
- channelHandlers: make(map[string]chan NewChannel, 1),
- }
-
- go conn.handleGlobalRequests(reqs)
- go conn.handleChannelOpens(chans)
- go func() {
- conn.Wait()
- conn.forwards.closeAll()
- }()
- go conn.forwards.handleChannels(conn.HandleChannelOpen("forwarded-tcpip"))
- go conn.forwards.handleChannels(conn.HandleChannelOpen("forwarded-streamlocal@openssh.com"))
- return conn
-}
-
-// NewClientConn establishes an authenticated SSH connection using c
-// as the underlying transport. The Request and NewChannel channels
-// must be serviced or the connection will hang.
-func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan NewChannel, <-chan *Request, error) {
- fullConf := *config
- fullConf.SetDefaults()
- if fullConf.HostKeyCallback == nil {
- c.Close()
- return nil, nil, nil, errors.New("ssh: must specify HostKeyCallback")
- }
-
- conn := &connection{
- sshConn: sshConn{conn: c},
- }
-
- if err := conn.clientHandshake(addr, &fullConf); err != nil {
- c.Close()
- return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %v", err)
- }
- conn.mux = newMux(conn.transport)
- return conn, conn.mux.incomingChannels, conn.mux.incomingRequests, nil
-}
-
-// clientHandshake performs the client side key exchange. See RFC 4253 Section
-// 7.
-func (c *connection) clientHandshake(dialAddress string, config *ClientConfig) error {
- if config.ClientVersion != "" {
- c.clientVersion = []byte(config.ClientVersion)
- } else {
- c.clientVersion = []byte(packageVersion)
- }
- var err error
- c.serverVersion, err = exchangeVersions(c.sshConn.conn, c.clientVersion)
- if err != nil {
- return err
- }
-
- c.transport = newClientTransport(
- newTransport(c.sshConn.conn, config.Rand, true /* is client */),
- c.clientVersion, c.serverVersion, config, dialAddress, c.sshConn.RemoteAddr())
- if err := c.transport.waitSession(); err != nil {
- return err
- }
-
- c.sessionID = c.transport.getSessionID()
- return c.clientAuthenticate(config)
-}
-
-// verifyHostKeySignature verifies the host key obtained in the key
-// exchange.
-func verifyHostKeySignature(hostKey PublicKey, result *kexResult) error {
- sig, rest, ok := parseSignatureBody(result.Signature)
- if len(rest) > 0 || !ok {
- return errors.New("ssh: signature parse error")
- }
-
- return hostKey.Verify(result.H, sig)
-}
-
-// NewSession opens a new Session for this client. (A session is a remote
-// execution of a program.)
-func (c *Client) NewSession() (*Session, error) {
- ch, in, err := c.OpenChannel("session", nil)
- if err != nil {
- return nil, err
- }
- return newSession(ch, in)
-}
-
-func (c *Client) handleGlobalRequests(incoming <-chan *Request) {
- for r := range incoming {
- // This handles keepalive messages and matches
- // the behaviour of OpenSSH.
- r.Reply(false, nil)
- }
-}
-
-// handleChannelOpens channel open messages from the remote side.
-func (c *Client) handleChannelOpens(in <-chan NewChannel) {
- for ch := range in {
- c.mu.Lock()
- handler := c.channelHandlers[ch.ChannelType()]
- c.mu.Unlock()
-
- if handler != nil {
- handler <- ch
- } else {
- ch.Reject(UnknownChannelType, fmt.Sprintf("unknown channel type: %v", ch.ChannelType()))
- }
- }
-
- c.mu.Lock()
- for _, ch := range c.channelHandlers {
- close(ch)
- }
- c.channelHandlers = nil
- c.mu.Unlock()
-}
-
-// Dial starts a client connection to the given SSH server. It is a
-// convenience function that connects to the given network address,
-// initiates the SSH handshake, and then sets up a Client. For access
-// to incoming channels and requests, use net.Dial with NewClientConn
-// instead.
-func Dial(network, addr string, config *ClientConfig) (*Client, error) {
- conn, err := net.DialTimeout(network, addr, config.Timeout)
- if err != nil {
- return nil, err
- }
- c, chans, reqs, err := NewClientConn(conn, addr, config)
- if err != nil {
- return nil, err
- }
- return NewClient(c, chans, reqs), nil
-}
-
-// HostKeyCallback is the function type used for verifying server
-// keys. A HostKeyCallback must return nil if the host key is OK, or
-// an error to reject it. It receives the hostname as passed to Dial
-// or NewClientConn. The remote address is the RemoteAddr of the
-// net.Conn underlying the the SSH connection.
-type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error
-
-// BannerCallback is the function type used for treat the banner sent by
-// the server. A BannerCallback receives the message sent by the remote server.
-type BannerCallback func(message string) error
-
-// A ClientConfig structure is used to configure a Client. It must not be
-// modified after having been passed to an SSH function.
-type ClientConfig struct {
- // Config contains configuration that is shared between clients and
- // servers.
- Config
-
- // User contains the username to authenticate as.
- User string
-
- // Auth contains possible authentication methods to use with the
- // server. Only the first instance of a particular RFC 4252 method will
- // be used during authentication.
- Auth []AuthMethod
-
- // HostKeyCallback is called during the cryptographic
- // handshake to validate the server's host key. The client
- // configuration must supply this callback for the connection
- // to succeed. The functions InsecureIgnoreHostKey or
- // FixedHostKey can be used for simplistic host key checks.
- HostKeyCallback HostKeyCallback
-
- // BannerCallback is called during the SSH dance to display a custom
- // server's message. The client configuration can supply this callback to
- // handle it as wished. The function BannerDisplayStderr can be used for
- // simplistic display on Stderr.
- BannerCallback BannerCallback
-
- // ClientVersion contains the version identification string that will
- // be used for the connection. If empty, a reasonable default is used.
- ClientVersion string
-
- // HostKeyAlgorithms lists the key types that the client will
- // accept from the server as host key, in order of
- // preference. If empty, a reasonable default is used. Any
- // string returned from PublicKey.Type method may be used, or
- // any of the CertAlgoXxxx and KeyAlgoXxxx constants.
- HostKeyAlgorithms []string
-
- // Timeout is the maximum amount of time for the TCP connection to establish.
- //
- // A Timeout of zero means no timeout.
- Timeout time.Duration
-}
-
-// InsecureIgnoreHostKey returns a function that can be used for
-// ClientConfig.HostKeyCallback to accept any host key. It should
-// not be used for production code.
-func InsecureIgnoreHostKey() HostKeyCallback {
- return func(hostname string, remote net.Addr, key PublicKey) error {
- return nil
- }
-}
-
-type fixedHostKey struct {
- key PublicKey
-}
-
-func (f *fixedHostKey) check(hostname string, remote net.Addr, key PublicKey) error {
- if f.key == nil {
- return fmt.Errorf("ssh: required host key was nil")
- }
- if !bytes.Equal(key.Marshal(), f.key.Marshal()) {
- return fmt.Errorf("ssh: host key mismatch")
- }
- return nil
-}
-
-// FixedHostKey returns a function for use in
-// ClientConfig.HostKeyCallback to accept only a specific host key.
-func FixedHostKey(key PublicKey) HostKeyCallback {
- hk := &fixedHostKey{key}
- return hk.check
-}
-
-// BannerDisplayStderr returns a function that can be used for
-// ClientConfig.BannerCallback to display banners on os.Stderr.
-func BannerDisplayStderr() BannerCallback {
- return func(banner string) error {
- _, err := os.Stderr.WriteString(banner)
-
- return err
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth.go
deleted file mode 100644
index a1252cb9b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth.go
+++ /dev/null
@@ -1,510 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
-)
-
-// clientAuthenticate authenticates with the remote server. See RFC 4252.
-func (c *connection) clientAuthenticate(config *ClientConfig) error {
- // initiate user auth session
- if err := c.transport.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})); err != nil {
- return err
- }
- packet, err := c.transport.readPacket()
- if err != nil {
- return err
- }
- var serviceAccept serviceAcceptMsg
- if err := Unmarshal(packet, &serviceAccept); err != nil {
- return err
- }
-
- // during the authentication phase the client first attempts the "none" method
- // then any untried methods suggested by the server.
- tried := make(map[string]bool)
- var lastMethods []string
-
- sessionID := c.transport.getSessionID()
- for auth := AuthMethod(new(noneAuth)); auth != nil; {
- ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand)
- if err != nil {
- return err
- }
- if ok {
- // success
- return nil
- }
- tried[auth.method()] = true
- if methods == nil {
- methods = lastMethods
- }
- lastMethods = methods
-
- auth = nil
-
- findNext:
- for _, a := range config.Auth {
- candidateMethod := a.method()
- if tried[candidateMethod] {
- continue
- }
- for _, meth := range methods {
- if meth == candidateMethod {
- auth = a
- break findNext
- }
- }
- }
- }
- return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", keys(tried))
-}
-
-func keys(m map[string]bool) []string {
- s := make([]string, 0, len(m))
-
- for key := range m {
- s = append(s, key)
- }
- return s
-}
-
-// An AuthMethod represents an instance of an RFC 4252 authentication method.
-type AuthMethod interface {
- // auth authenticates user over transport t.
- // Returns true if authentication is successful.
- // If authentication is not successful, a []string of alternative
- // method names is returned. If the slice is nil, it will be ignored
- // and the previous set of possible methods will be reused.
- auth(session []byte, user string, p packetConn, rand io.Reader) (bool, []string, error)
-
- // method returns the RFC 4252 method name.
- method() string
-}
-
-// "none" authentication, RFC 4252 section 5.2.
-type noneAuth int
-
-func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) {
- if err := c.writePacket(Marshal(&userAuthRequestMsg{
- User: user,
- Service: serviceSSH,
- Method: "none",
- })); err != nil {
- return false, nil, err
- }
-
- return handleAuthResponse(c)
-}
-
-func (n *noneAuth) method() string {
- return "none"
-}
-
-// passwordCallback is an AuthMethod that fetches the password through
-// a function call, e.g. by prompting the user.
-type passwordCallback func() (password string, err error)
-
-func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) {
- type passwordAuthMsg struct {
- User string `sshtype:"50"`
- Service string
- Method string
- Reply bool
- Password string
- }
-
- pw, err := cb()
- // REVIEW NOTE: is there a need to support skipping a password attempt?
- // The program may only find out that the user doesn't have a password
- // when prompting.
- if err != nil {
- return false, nil, err
- }
-
- if err := c.writePacket(Marshal(&passwordAuthMsg{
- User: user,
- Service: serviceSSH,
- Method: cb.method(),
- Reply: false,
- Password: pw,
- })); err != nil {
- return false, nil, err
- }
-
- return handleAuthResponse(c)
-}
-
-func (cb passwordCallback) method() string {
- return "password"
-}
-
-// Password returns an AuthMethod using the given password.
-func Password(secret string) AuthMethod {
- return passwordCallback(func() (string, error) { return secret, nil })
-}
-
-// PasswordCallback returns an AuthMethod that uses a callback for
-// fetching a password.
-func PasswordCallback(prompt func() (secret string, err error)) AuthMethod {
- return passwordCallback(prompt)
-}
-
-type publickeyAuthMsg struct {
- User string `sshtype:"50"`
- Service string
- Method string
- // HasSig indicates to the receiver packet that the auth request is signed and
- // should be used for authentication of the request.
- HasSig bool
- Algoname string
- PubKey []byte
- // Sig is tagged with "rest" so Marshal will exclude it during
- // validateKey
- Sig []byte `ssh:"rest"`
-}
-
-// publicKeyCallback is an AuthMethod that uses a set of key
-// pairs for authentication.
-type publicKeyCallback func() ([]Signer, error)
-
-func (cb publicKeyCallback) method() string {
- return "publickey"
-}
-
-func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) {
- // Authentication is performed by sending an enquiry to test if a key is
- // acceptable to the remote. If the key is acceptable, the client will
- // attempt to authenticate with the valid key. If not the client will repeat
- // the process with the remaining keys.
-
- signers, err := cb()
- if err != nil {
- return false, nil, err
- }
- var methods []string
- for _, signer := range signers {
- ok, err := validateKey(signer.PublicKey(), user, c)
- if err != nil {
- return false, nil, err
- }
- if !ok {
- continue
- }
-
- pub := signer.PublicKey()
- pubKey := pub.Marshal()
- sign, err := signer.Sign(rand, buildDataSignedForAuth(session, userAuthRequestMsg{
- User: user,
- Service: serviceSSH,
- Method: cb.method(),
- }, []byte(pub.Type()), pubKey))
- if err != nil {
- return false, nil, err
- }
-
- // manually wrap the serialized signature in a string
- s := Marshal(sign)
- sig := make([]byte, stringLength(len(s)))
- marshalString(sig, s)
- msg := publickeyAuthMsg{
- User: user,
- Service: serviceSSH,
- Method: cb.method(),
- HasSig: true,
- Algoname: pub.Type(),
- PubKey: pubKey,
- Sig: sig,
- }
- p := Marshal(&msg)
- if err := c.writePacket(p); err != nil {
- return false, nil, err
- }
- var success bool
- success, methods, err = handleAuthResponse(c)
- if err != nil {
- return false, nil, err
- }
-
- // If authentication succeeds or the list of available methods does not
- // contain the "publickey" method, do not attempt to authenticate with any
- // other keys. According to RFC 4252 Section 7, the latter can occur when
- // additional authentication methods are required.
- if success || !containsMethod(methods, cb.method()) {
- return success, methods, err
- }
- }
-
- return false, methods, nil
-}
-
-func containsMethod(methods []string, method string) bool {
- for _, m := range methods {
- if m == method {
- return true
- }
- }
-
- return false
-}
-
-// validateKey validates the key provided is acceptable to the server.
-func validateKey(key PublicKey, user string, c packetConn) (bool, error) {
- pubKey := key.Marshal()
- msg := publickeyAuthMsg{
- User: user,
- Service: serviceSSH,
- Method: "publickey",
- HasSig: false,
- Algoname: key.Type(),
- PubKey: pubKey,
- }
- if err := c.writePacket(Marshal(&msg)); err != nil {
- return false, err
- }
-
- return confirmKeyAck(key, c)
-}
-
-func confirmKeyAck(key PublicKey, c packetConn) (bool, error) {
- pubKey := key.Marshal()
- algoname := key.Type()
-
- for {
- packet, err := c.readPacket()
- if err != nil {
- return false, err
- }
- switch packet[0] {
- case msgUserAuthBanner:
- if err := handleBannerResponse(c, packet); err != nil {
- return false, err
- }
- case msgUserAuthPubKeyOk:
- var msg userAuthPubKeyOkMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return false, err
- }
- if msg.Algo != algoname || !bytes.Equal(msg.PubKey, pubKey) {
- return false, nil
- }
- return true, nil
- case msgUserAuthFailure:
- return false, nil
- default:
- return false, unexpectedMessageError(msgUserAuthSuccess, packet[0])
- }
- }
-}
-
-// PublicKeys returns an AuthMethod that uses the given key
-// pairs.
-func PublicKeys(signers ...Signer) AuthMethod {
- return publicKeyCallback(func() ([]Signer, error) { return signers, nil })
-}
-
-// PublicKeysCallback returns an AuthMethod that runs the given
-// function to obtain a list of key pairs.
-func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMethod {
- return publicKeyCallback(getSigners)
-}
-
-// handleAuthResponse returns whether the preceding authentication request succeeded
-// along with a list of remaining authentication methods to try next and
-// an error if an unexpected response was received.
-func handleAuthResponse(c packetConn) (bool, []string, error) {
- for {
- packet, err := c.readPacket()
- if err != nil {
- return false, nil, err
- }
-
- switch packet[0] {
- case msgUserAuthBanner:
- if err := handleBannerResponse(c, packet); err != nil {
- return false, nil, err
- }
- case msgUserAuthFailure:
- var msg userAuthFailureMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return false, nil, err
- }
- return false, msg.Methods, nil
- case msgUserAuthSuccess:
- return true, nil, nil
- default:
- return false, nil, unexpectedMessageError(msgUserAuthSuccess, packet[0])
- }
- }
-}
-
-func handleBannerResponse(c packetConn, packet []byte) error {
- var msg userAuthBannerMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return err
- }
-
- transport, ok := c.(*handshakeTransport)
- if !ok {
- return nil
- }
-
- if transport.bannerCallback != nil {
- return transport.bannerCallback(msg.Message)
- }
-
- return nil
-}
-
-// KeyboardInteractiveChallenge should print questions, optionally
-// disabling echoing (e.g. for passwords), and return all the answers.
-// Challenge may be called multiple times in a single session. After
-// successful authentication, the server may send a challenge with no
-// questions, for which the user and instruction messages should be
-// printed. RFC 4256 section 3.3 details how the UI should behave for
-// both CLI and GUI environments.
-type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error)
-
-// KeyboardInteractive returns an AuthMethod using a prompt/response
-// sequence controlled by the server.
-func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod {
- return challenge
-}
-
-func (cb KeyboardInteractiveChallenge) method() string {
- return "keyboard-interactive"
-}
-
-func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) {
- type initiateMsg struct {
- User string `sshtype:"50"`
- Service string
- Method string
- Language string
- Submethods string
- }
-
- if err := c.writePacket(Marshal(&initiateMsg{
- User: user,
- Service: serviceSSH,
- Method: "keyboard-interactive",
- })); err != nil {
- return false, nil, err
- }
-
- for {
- packet, err := c.readPacket()
- if err != nil {
- return false, nil, err
- }
-
- // like handleAuthResponse, but with less options.
- switch packet[0] {
- case msgUserAuthBanner:
- if err := handleBannerResponse(c, packet); err != nil {
- return false, nil, err
- }
- continue
- case msgUserAuthInfoRequest:
- // OK
- case msgUserAuthFailure:
- var msg userAuthFailureMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return false, nil, err
- }
- return false, msg.Methods, nil
- case msgUserAuthSuccess:
- return true, nil, nil
- default:
- return false, nil, unexpectedMessageError(msgUserAuthInfoRequest, packet[0])
- }
-
- var msg userAuthInfoRequestMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return false, nil, err
- }
-
- // Manually unpack the prompt/echo pairs.
- rest := msg.Prompts
- var prompts []string
- var echos []bool
- for i := 0; i < int(msg.NumPrompts); i++ {
- prompt, r, ok := parseString(rest)
- if !ok || len(r) == 0 {
- return false, nil, errors.New("ssh: prompt format error")
- }
- prompts = append(prompts, string(prompt))
- echos = append(echos, r[0] != 0)
- rest = r[1:]
- }
-
- if len(rest) != 0 {
- return false, nil, errors.New("ssh: extra data following keyboard-interactive pairs")
- }
-
- answers, err := cb(msg.User, msg.Instruction, prompts, echos)
- if err != nil {
- return false, nil, err
- }
-
- if len(answers) != len(prompts) {
- return false, nil, errors.New("ssh: not enough answers from keyboard-interactive callback")
- }
- responseLength := 1 + 4
- for _, a := range answers {
- responseLength += stringLength(len(a))
- }
- serialized := make([]byte, responseLength)
- p := serialized
- p[0] = msgUserAuthInfoResponse
- p = p[1:]
- p = marshalUint32(p, uint32(len(answers)))
- for _, a := range answers {
- p = marshalString(p, []byte(a))
- }
-
- if err := c.writePacket(serialized); err != nil {
- return false, nil, err
- }
- }
-}
-
-type retryableAuthMethod struct {
- authMethod AuthMethod
- maxTries int
-}
-
-func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader) (ok bool, methods []string, err error) {
- for i := 0; r.maxTries <= 0 || i < r.maxTries; i++ {
- ok, methods, err = r.authMethod.auth(session, user, c, rand)
- if ok || err != nil { // either success or error terminate
- return ok, methods, err
- }
- }
- return ok, methods, err
-}
-
-func (r *retryableAuthMethod) method() string {
- return r.authMethod.method()
-}
-
-// RetryableAuthMethod is a decorator for other auth methods enabling them to
-// be retried up to maxTries before considering that AuthMethod itself failed.
-// If maxTries is <= 0, will retry indefinitely
-//
-// This is useful for interactive clients using challenge/response type
-// authentication (e.g. Keyboard-Interactive, Password, etc) where the user
-// could mistype their response resulting in the server issuing a
-// SSH_MSG_USERAUTH_FAILURE (rfc4252 #8 [password] and rfc4256 #3.4
-// [keyboard-interactive]); Without this decorator, the non-retryable
-// AuthMethod would be removed from future consideration, and never tried again
-// (and so the user would never be able to retry their entry).
-func RetryableAuthMethod(auth AuthMethod, maxTries int) AuthMethod {
- return &retryableAuthMethod{authMethod: auth, maxTries: maxTries}
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth_test.go
deleted file mode 100644
index 145b57a2b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_auth_test.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto/rand"
- "errors"
- "fmt"
- "os"
- "strings"
- "testing"
-)
-
-type keyboardInteractive map[string]string
-
-func (cr keyboardInteractive) Challenge(user string, instruction string, questions []string, echos []bool) ([]string, error) {
- var answers []string
- for _, q := range questions {
- answers = append(answers, cr[q])
- }
- return answers, nil
-}
-
-// reused internally by tests
-var clientPassword = "tiger"
-
-// tryAuth runs a handshake with a given config against an SSH server
-// with config serverConfig
-func tryAuth(t *testing.T, config *ClientConfig) error {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- certChecker := CertChecker{
- IsUserAuthority: func(k PublicKey) bool {
- return bytes.Equal(k.Marshal(), testPublicKeys["ecdsa"].Marshal())
- },
- UserKeyFallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) {
- if conn.User() == "testuser" && bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) {
- return nil, nil
- }
-
- return nil, fmt.Errorf("pubkey for %q not acceptable", conn.User())
- },
- IsRevoked: func(c *Certificate) bool {
- return c.Serial == 666
- },
- }
-
- serverConfig := &ServerConfig{
- PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) {
- if conn.User() == "testuser" && string(pass) == clientPassword {
- return nil, nil
- }
- return nil, errors.New("password auth failed")
- },
- PublicKeyCallback: certChecker.Authenticate,
- KeyboardInteractiveCallback: func(conn ConnMetadata, challenge KeyboardInteractiveChallenge) (*Permissions, error) {
- ans, err := challenge("user",
- "instruction",
- []string{"question1", "question2"},
- []bool{true, true})
- if err != nil {
- return nil, err
- }
- ok := conn.User() == "testuser" && ans[0] == "answer1" && ans[1] == "answer2"
- if ok {
- challenge("user", "motd", nil, nil)
- return nil, nil
- }
- return nil, errors.New("keyboard-interactive failed")
- },
- }
- serverConfig.AddHostKey(testSigners["rsa"])
-
- go newServer(c1, serverConfig)
- _, _, _, err = NewClientConn(c2, "", config)
- return err
-}
-
-func TestClientAuthPublicKey(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-}
-
-func TestAuthMethodPassword(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- Password(clientPassword),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-}
-
-func TestAuthMethodFallback(t *testing.T) {
- var passwordCalled bool
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(testSigners["rsa"]),
- PasswordCallback(
- func() (string, error) {
- passwordCalled = true
- return "WRONG", nil
- }),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-
- if passwordCalled {
- t.Errorf("password auth tried before public-key auth.")
- }
-}
-
-func TestAuthMethodWrongPassword(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- Password("wrong"),
- PublicKeys(testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-}
-
-func TestAuthMethodKeyboardInteractive(t *testing.T) {
- answers := keyboardInteractive(map[string]string{
- "question1": "answer1",
- "question2": "answer2",
- })
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- KeyboardInteractive(answers.Challenge),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-}
-
-func TestAuthMethodWrongKeyboardInteractive(t *testing.T) {
- answers := keyboardInteractive(map[string]string{
- "question1": "answer1",
- "question2": "WRONG",
- })
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- KeyboardInteractive(answers.Challenge),
- },
- }
-
- if err := tryAuth(t, config); err == nil {
- t.Fatalf("wrong answers should not have authenticated with KeyboardInteractive")
- }
-}
-
-// the mock server will only authenticate ssh-rsa keys
-func TestAuthMethodInvalidPublicKey(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(testSigners["dsa"]),
- },
- }
-
- if err := tryAuth(t, config); err == nil {
- t.Fatalf("dsa private key should not have authenticated with rsa public key")
- }
-}
-
-// the client should authenticate with the second key
-func TestAuthMethodRSAandDSA(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(testSigners["dsa"], testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("client could not authenticate with rsa key: %v", err)
- }
-}
-
-func TestClientHMAC(t *testing.T) {
- for _, mac := range supportedMACs {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(testSigners["rsa"]),
- },
- Config: Config{
- MACs: []string{mac},
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("client could not authenticate with mac algo %s: %v", mac, err)
- }
- }
-}
-
-// issue 4285.
-func TestClientUnsupportedCipher(t *testing.T) {
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(),
- },
- Config: Config{
- Ciphers: []string{"aes128-cbc"}, // not currently supported
- },
- }
- if err := tryAuth(t, config); err == nil {
- t.Errorf("expected no ciphers in common")
- }
-}
-
-func TestClientUnsupportedKex(t *testing.T) {
- if os.Getenv("GO_BUILDER_NAME") != "" {
- t.Skip("skipping known-flaky test on the Go build dashboard; see golang.org/issue/15198")
- }
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(),
- },
- Config: Config{
- KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, // not currently supported
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, config); err == nil || !strings.Contains(err.Error(), "common algorithm") {
- t.Errorf("got %v, expected 'common algorithm'", err)
- }
-}
-
-func TestClientLoginCert(t *testing.T) {
- cert := &Certificate{
- Key: testPublicKeys["rsa"],
- ValidBefore: CertTimeInfinity,
- CertType: UserCert,
- }
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- certSigner, err := NewCertSigner(cert, testSigners["rsa"])
- if err != nil {
- t.Fatalf("NewCertSigner: %v", err)
- }
-
- clientConfig := &ClientConfig{
- User: "user",
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- clientConfig.Auth = append(clientConfig.Auth, PublicKeys(certSigner))
-
- // should succeed
- if err := tryAuth(t, clientConfig); err != nil {
- t.Errorf("cert login failed: %v", err)
- }
-
- // corrupted signature
- cert.Signature.Blob[0]++
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login passed with corrupted sig")
- }
-
- // revoked
- cert.Serial = 666
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("revoked cert login succeeded")
- }
- cert.Serial = 1
-
- // sign with wrong key
- cert.SignCert(rand.Reader, testSigners["dsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login passed with non-authoritative key")
- }
-
- // host cert
- cert.CertType = HostCert
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login passed with wrong type")
- }
- cert.CertType = UserCert
-
- // principal specified
- cert.ValidPrincipals = []string{"user"}
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err != nil {
- t.Errorf("cert login failed: %v", err)
- }
-
- // wrong principal specified
- cert.ValidPrincipals = []string{"fred"}
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login passed with wrong principal")
- }
- cert.ValidPrincipals = nil
-
- // added critical option
- cert.CriticalOptions = map[string]string{"root-access": "yes"}
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login passed with unrecognized critical option")
- }
-
- // allowed source address
- cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42/24,::42/120"}
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err != nil {
- t.Errorf("cert login with source-address failed: %v", err)
- }
-
- // disallowed source address
- cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42,::42"}
- cert.SignCert(rand.Reader, testSigners["ecdsa"])
- if err := tryAuth(t, clientConfig); err == nil {
- t.Errorf("cert login with source-address succeeded")
- }
-}
-
-func testPermissionsPassing(withPermissions bool, t *testing.T) {
- serverConfig := &ServerConfig{
- PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) {
- if conn.User() == "nopermissions" {
- return nil, nil
- }
- return &Permissions{}, nil
- },
- }
- serverConfig.AddHostKey(testSigners["rsa"])
-
- clientConfig := &ClientConfig{
- Auth: []AuthMethod{
- PublicKeys(testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if withPermissions {
- clientConfig.User = "permissions"
- } else {
- clientConfig.User = "nopermissions"
- }
-
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go NewClientConn(c2, "", clientConfig)
- serverConn, err := newServer(c1, serverConfig)
- if err != nil {
- t.Fatal(err)
- }
- if p := serverConn.Permissions; (p != nil) != withPermissions {
- t.Fatalf("withPermissions is %t, but Permissions object is %#v", withPermissions, p)
- }
-}
-
-func TestPermissionsPassing(t *testing.T) {
- testPermissionsPassing(true, t)
-}
-
-func TestNoPermissionsPassing(t *testing.T) {
- testPermissionsPassing(false, t)
-}
-
-func TestRetryableAuth(t *testing.T) {
- n := 0
- passwords := []string{"WRONG1", "WRONG2"}
-
- config := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- RetryableAuthMethod(PasswordCallback(func() (string, error) {
- p := passwords[n]
- n++
- return p, nil
- }), 2),
- PublicKeys(testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
- if n != 2 {
- t.Fatalf("Did not try all passwords")
- }
-}
-
-func ExampleRetryableAuthMethod(t *testing.T) {
- user := "testuser"
- NumberOfPrompts := 3
-
- // Normally this would be a callback that prompts the user to answer the
- // provided questions
- Cb := func(user, instruction string, questions []string, echos []bool) (answers []string, err error) {
- return []string{"answer1", "answer2"}, nil
- }
-
- config := &ClientConfig{
- HostKeyCallback: InsecureIgnoreHostKey(),
- User: user,
- Auth: []AuthMethod{
- RetryableAuthMethod(KeyboardInteractiveChallenge(Cb), NumberOfPrompts),
- },
- }
-
- if err := tryAuth(t, config); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-}
-
-// Test if username is received on server side when NoClientAuth is used
-func TestClientAuthNone(t *testing.T) {
- user := "testuser"
- serverConfig := &ServerConfig{
- NoClientAuth: true,
- }
- serverConfig.AddHostKey(testSigners["rsa"])
-
- clientConfig := &ClientConfig{
- User: user,
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go NewClientConn(c2, "", clientConfig)
- serverConn, err := newServer(c1, serverConfig)
- if err != nil {
- t.Fatalf("newServer: %v", err)
- }
- if serverConn.User() != user {
- t.Fatalf("server: got %q, want %q", serverConn.User(), user)
- }
-}
-
-// Test if authentication attempts are limited on server when MaxAuthTries is set
-func TestClientAuthMaxAuthTries(t *testing.T) {
- user := "testuser"
-
- serverConfig := &ServerConfig{
- MaxAuthTries: 2,
- PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) {
- if conn.User() == "testuser" && string(pass) == "right" {
- return nil, nil
- }
- return nil, errors.New("password auth failed")
- },
- }
- serverConfig.AddHostKey(testSigners["rsa"])
-
- expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{
- Reason: 2,
- Message: "too many authentication failures",
- })
-
- for tries := 2; tries < 4; tries++ {
- n := tries
- clientConfig := &ClientConfig{
- User: user,
- Auth: []AuthMethod{
- RetryableAuthMethod(PasswordCallback(func() (string, error) {
- n--
- if n == 0 {
- return "right", nil
- }
- return "wrong", nil
- }), tries),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go newServer(c1, serverConfig)
- _, _, _, err = NewClientConn(c2, "", clientConfig)
- if tries > 2 {
- if err == nil {
- t.Fatalf("client: got no error, want %s", expectedErr)
- } else if err.Error() != expectedErr.Error() {
- t.Fatalf("client: got %s, want %s", err, expectedErr)
- }
- } else {
- if err != nil {
- t.Fatalf("client: got %s, want no error", err)
- }
- }
- }
-}
-
-// Test if authentication attempts are correctly limited on server
-// when more public keys are provided then MaxAuthTries
-func TestClientAuthMaxAuthTriesPublicKey(t *testing.T) {
- signers := []Signer{}
- for i := 0; i < 6; i++ {
- signers = append(signers, testSigners["dsa"])
- }
-
- validConfig := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(append([]Signer{testSigners["rsa"]}, signers...)...),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, validConfig); err != nil {
- t.Fatalf("unable to dial remote side: %s", err)
- }
-
- expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{
- Reason: 2,
- Message: "too many authentication failures",
- })
- invalidConfig := &ClientConfig{
- User: "testuser",
- Auth: []AuthMethod{
- PublicKeys(append(signers, testSigners["rsa"])...),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- if err := tryAuth(t, invalidConfig); err == nil {
- t.Fatalf("client: got no error, want %s", expectedErr)
- } else if err.Error() != expectedErr.Error() {
- t.Fatalf("client: got %s, want %s", err, expectedErr)
- }
-}
-
-// Test whether authentication errors are being properly logged if all
-// authentication methods have been exhausted
-func TestClientAuthErrorList(t *testing.T) {
- publicKeyErr := errors.New("This is an error from PublicKeyCallback")
-
- clientConfig := &ClientConfig{
- Auth: []AuthMethod{
- PublicKeys(testSigners["rsa"]),
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- serverConfig := &ServerConfig{
- PublicKeyCallback: func(_ ConnMetadata, _ PublicKey) (*Permissions, error) {
- return nil, publicKeyErr
- },
- }
- serverConfig.AddHostKey(testSigners["rsa"])
-
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go NewClientConn(c2, "", clientConfig)
- _, err = newServer(c1, serverConfig)
- if err == nil {
- t.Fatal("newServer: got nil, expected errors")
- }
-
- authErrs, ok := err.(*ServerAuthError)
- if !ok {
- t.Fatalf("errors: got %T, want *ssh.ServerAuthError", err)
- }
- for i, e := range authErrs.Errors {
- switch i {
- case 0:
- if e.Error() != "no auth passed yet" {
- t.Fatalf("errors: got %v, want no auth passed yet", e.Error())
- }
- case 1:
- if e != publicKeyErr {
- t.Fatalf("errors: got %v, want %v", e, publicKeyErr)
- }
- default:
- t.Fatalf("errors: got %v, expected 2 errors", authErrs.Errors)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_test.go
deleted file mode 100644
index 9dbe04222..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/client_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2014 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 file.
-
-package ssh
-
-import (
- "net"
- "strings"
- "testing"
-)
-
-func testClientVersion(t *testing.T, config *ClientConfig, expected string) {
- clientConn, serverConn := net.Pipe()
- defer clientConn.Close()
- receivedVersion := make(chan string, 1)
- config.HostKeyCallback = InsecureIgnoreHostKey()
- go func() {
- version, err := readVersion(serverConn)
- if err != nil {
- receivedVersion <- ""
- } else {
- receivedVersion <- string(version)
- }
- serverConn.Close()
- }()
- NewClientConn(clientConn, "", config)
- actual := <-receivedVersion
- if actual != expected {
- t.Fatalf("got %s; want %s", actual, expected)
- }
-}
-
-func TestCustomClientVersion(t *testing.T) {
- version := "Test-Client-Version-0.0"
- testClientVersion(t, &ClientConfig{ClientVersion: version}, version)
-}
-
-func TestDefaultClientVersion(t *testing.T) {
- testClientVersion(t, &ClientConfig{}, packageVersion)
-}
-
-func TestHostKeyCheck(t *testing.T) {
- for _, tt := range []struct {
- name string
- wantError string
- key PublicKey
- }{
- {"no callback", "must specify HostKeyCallback", nil},
- {"correct key", "", testSigners["rsa"].PublicKey()},
- {"mismatch", "mismatch", testSigners["ecdsa"].PublicKey()},
- } {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
- serverConf := &ServerConfig{
- NoClientAuth: true,
- }
- serverConf.AddHostKey(testSigners["rsa"])
-
- go NewServerConn(c1, serverConf)
- clientConf := ClientConfig{
- User: "user",
- }
- if tt.key != nil {
- clientConf.HostKeyCallback = FixedHostKey(tt.key)
- }
-
- _, _, _, err = NewClientConn(c2, "", &clientConf)
- if err != nil {
- if tt.wantError == "" || !strings.Contains(err.Error(), tt.wantError) {
- t.Errorf("%s: got error %q, missing %q", tt.name, err.Error(), tt.wantError)
- }
- } else if tt.wantError != "" {
- t.Errorf("%s: succeeded, but want error string %q", tt.name, tt.wantError)
- }
- }
-}
-
-func TestBannerCallback(t *testing.T) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- serverConf := &ServerConfig{
- NoClientAuth: true,
- BannerCallback: func(conn ConnMetadata) string {
- return "Hello World"
- },
- }
- serverConf.AddHostKey(testSigners["rsa"])
- go NewServerConn(c1, serverConf)
-
- var receivedBanner string
- clientConf := ClientConfig{
- User: "user",
- HostKeyCallback: InsecureIgnoreHostKey(),
- BannerCallback: func(message string) error {
- receivedBanner = message
- return nil
- },
- }
-
- _, _, _, err = NewClientConn(c2, "", &clientConf)
- if err != nil {
- t.Fatal(err)
- }
-
- expected := "Hello World"
- if receivedBanner != expected {
- t.Fatalf("got %s; want %s", receivedBanner, expected)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/common.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/common.go
deleted file mode 100644
index dc39e4d23..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/common.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "crypto"
- "crypto/rand"
- "fmt"
- "io"
- "math"
- "sync"
-
- _ "crypto/sha1"
- _ "crypto/sha256"
- _ "crypto/sha512"
-)
-
-// These are string constants in the SSH protocol.
-const (
- compressionNone = "none"
- serviceUserAuth = "ssh-userauth"
- serviceSSH = "ssh-connection"
-)
-
-// supportedCiphers specifies the supported ciphers in preference order.
-var supportedCiphers = []string{
- "aes128-ctr", "aes192-ctr", "aes256-ctr",
- "aes128-gcm@openssh.com",
- "arcfour256", "arcfour128",
-}
-
-// supportedKexAlgos specifies the supported key-exchange algorithms in
-// preference order.
-var supportedKexAlgos = []string{
- kexAlgoCurve25519SHA256,
- // P384 and P521 are not constant-time yet, but since we don't
- // reuse ephemeral keys, using them for ECDH should be OK.
- kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521,
- kexAlgoDH14SHA1, kexAlgoDH1SHA1,
-}
-
-// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods
-// of authenticating servers) in preference order.
-var supportedHostKeyAlgos = []string{
- CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01,
- CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01,
-
- KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521,
- KeyAlgoRSA, KeyAlgoDSA,
-
- KeyAlgoED25519,
-}
-
-// supportedMACs specifies a default set of MAC algorithms in preference order.
-// This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed
-// because they have reached the end of their useful life.
-var supportedMACs = []string{
- "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96",
-}
-
-var supportedCompressions = []string{compressionNone}
-
-// hashFuncs keeps the mapping of supported algorithms to their respective
-// hashes needed for signature verification.
-var hashFuncs = map[string]crypto.Hash{
- KeyAlgoRSA: crypto.SHA1,
- KeyAlgoDSA: crypto.SHA1,
- KeyAlgoECDSA256: crypto.SHA256,
- KeyAlgoECDSA384: crypto.SHA384,
- KeyAlgoECDSA521: crypto.SHA512,
- CertAlgoRSAv01: crypto.SHA1,
- CertAlgoDSAv01: crypto.SHA1,
- CertAlgoECDSA256v01: crypto.SHA256,
- CertAlgoECDSA384v01: crypto.SHA384,
- CertAlgoECDSA521v01: crypto.SHA512,
-}
-
-// unexpectedMessageError results when the SSH message that we received didn't
-// match what we wanted.
-func unexpectedMessageError(expected, got uint8) error {
- return fmt.Errorf("ssh: unexpected message type %d (expected %d)", got, expected)
-}
-
-// parseError results from a malformed SSH message.
-func parseError(tag uint8) error {
- return fmt.Errorf("ssh: parse error in message type %d", tag)
-}
-
-func findCommon(what string, client []string, server []string) (common string, err error) {
- for _, c := range client {
- for _, s := range server {
- if c == s {
- return c, nil
- }
- }
- }
- return "", fmt.Errorf("ssh: no common algorithm for %s; client offered: %v, server offered: %v", what, client, server)
-}
-
-type directionAlgorithms struct {
- Cipher string
- MAC string
- Compression string
-}
-
-// rekeyBytes returns a rekeying intervals in bytes.
-func (a *directionAlgorithms) rekeyBytes() int64 {
- // According to RFC4344 block ciphers should rekey after
- // 2^(BLOCKSIZE/4) blocks. For all AES flavors BLOCKSIZE is
- // 128.
- switch a.Cipher {
- case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcmCipherID, aes128cbcID:
- return 16 * (1 << 32)
-
- }
-
- // For others, stick with RFC4253 recommendation to rekey after 1 Gb of data.
- return 1 << 30
-}
-
-type algorithms struct {
- kex string
- hostKey string
- w directionAlgorithms
- r directionAlgorithms
-}
-
-func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) {
- result := &algorithms{}
-
- result.kex, err = findCommon("key exchange", clientKexInit.KexAlgos, serverKexInit.KexAlgos)
- if err != nil {
- return
- }
-
- result.hostKey, err = findCommon("host key", clientKexInit.ServerHostKeyAlgos, serverKexInit.ServerHostKeyAlgos)
- if err != nil {
- return
- }
-
- result.w.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer)
- if err != nil {
- return
- }
-
- result.r.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient)
- if err != nil {
- return
- }
-
- result.w.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer)
- if err != nil {
- return
- }
-
- result.r.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient)
- if err != nil {
- return
- }
-
- result.w.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer)
- if err != nil {
- return
- }
-
- result.r.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient)
- if err != nil {
- return
- }
-
- return result, nil
-}
-
-// If rekeythreshold is too small, we can't make any progress sending
-// stuff.
-const minRekeyThreshold uint64 = 256
-
-// Config contains configuration data common to both ServerConfig and
-// ClientConfig.
-type Config struct {
- // Rand provides the source of entropy for cryptographic
- // primitives. If Rand is nil, the cryptographic random reader
- // in package crypto/rand will be used.
- Rand io.Reader
-
- // The maximum number of bytes sent or received after which a
- // new key is negotiated. It must be at least 256. If
- // unspecified, a size suitable for the chosen cipher is used.
- RekeyThreshold uint64
-
- // The allowed key exchanges algorithms. If unspecified then a
- // default set of algorithms is used.
- KeyExchanges []string
-
- // The allowed cipher algorithms. If unspecified then a sensible
- // default is used.
- Ciphers []string
-
- // The allowed MAC algorithms. If unspecified then a sensible default
- // is used.
- MACs []string
-}
-
-// SetDefaults sets sensible values for unset fields in config. This is
-// exported for testing: Configs passed to SSH functions are copied and have
-// default values set automatically.
-func (c *Config) SetDefaults() {
- if c.Rand == nil {
- c.Rand = rand.Reader
- }
- if c.Ciphers == nil {
- c.Ciphers = supportedCiphers
- }
- var ciphers []string
- for _, c := range c.Ciphers {
- if cipherModes[c] != nil {
- // reject the cipher if we have no cipherModes definition
- ciphers = append(ciphers, c)
- }
- }
- c.Ciphers = ciphers
-
- if c.KeyExchanges == nil {
- c.KeyExchanges = supportedKexAlgos
- }
-
- if c.MACs == nil {
- c.MACs = supportedMACs
- }
-
- if c.RekeyThreshold == 0 {
- // cipher specific default
- } else if c.RekeyThreshold < minRekeyThreshold {
- c.RekeyThreshold = minRekeyThreshold
- } else if c.RekeyThreshold >= math.MaxInt64 {
- // Avoid weirdness if somebody uses -1 as a threshold.
- c.RekeyThreshold = math.MaxInt64
- }
-}
-
-// buildDataSignedForAuth returns the data that is signed in order to prove
-// possession of a private key. See RFC 4252, section 7.
-func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte {
- data := struct {
- Session []byte
- Type byte
- User string
- Service string
- Method string
- Sign bool
- Algo []byte
- PubKey []byte
- }{
- sessionId,
- msgUserAuthRequest,
- req.User,
- req.Service,
- req.Method,
- true,
- algo,
- pubKey,
- }
- return Marshal(data)
-}
-
-func appendU16(buf []byte, n uint16) []byte {
- return append(buf, byte(n>>8), byte(n))
-}
-
-func appendU32(buf []byte, n uint32) []byte {
- return append(buf, byte(n>>24), byte(n>>16), byte(n>>8), byte(n))
-}
-
-func appendU64(buf []byte, n uint64) []byte {
- return append(buf,
- byte(n>>56), byte(n>>48), byte(n>>40), byte(n>>32),
- byte(n>>24), byte(n>>16), byte(n>>8), byte(n))
-}
-
-func appendInt(buf []byte, n int) []byte {
- return appendU32(buf, uint32(n))
-}
-
-func appendString(buf []byte, s string) []byte {
- buf = appendU32(buf, uint32(len(s)))
- buf = append(buf, s...)
- return buf
-}
-
-func appendBool(buf []byte, b bool) []byte {
- if b {
- return append(buf, 1)
- }
- return append(buf, 0)
-}
-
-// newCond is a helper to hide the fact that there is no usable zero
-// value for sync.Cond.
-func newCond() *sync.Cond { return sync.NewCond(new(sync.Mutex)) }
-
-// window represents the buffer available to clients
-// wishing to write to a channel.
-type window struct {
- *sync.Cond
- win uint32 // RFC 4254 5.2 says the window size can grow to 2^32-1
- writeWaiters int
- closed bool
-}
-
-// add adds win to the amount of window available
-// for consumers.
-func (w *window) add(win uint32) bool {
- // a zero sized window adjust is a noop.
- if win == 0 {
- return true
- }
- w.L.Lock()
- if w.win+win < win {
- w.L.Unlock()
- return false
- }
- w.win += win
- // It is unusual that multiple goroutines would be attempting to reserve
- // window space, but not guaranteed. Use broadcast to notify all waiters
- // that additional window is available.
- w.Broadcast()
- w.L.Unlock()
- return true
-}
-
-// close sets the window to closed, so all reservations fail
-// immediately.
-func (w *window) close() {
- w.L.Lock()
- w.closed = true
- w.Broadcast()
- w.L.Unlock()
-}
-
-// reserve reserves win from the available window capacity.
-// If no capacity remains, reserve will block. reserve may
-// return less than requested.
-func (w *window) reserve(win uint32) (uint32, error) {
- var err error
- w.L.Lock()
- w.writeWaiters++
- w.Broadcast()
- for w.win == 0 && !w.closed {
- w.Wait()
- }
- w.writeWaiters--
- if w.win < win {
- win = w.win
- }
- w.win -= win
- if w.closed {
- err = io.EOF
- }
- w.L.Unlock()
- return win, err
-}
-
-// waitWriterBlocked waits until some goroutine is blocked for further
-// writes. It is used in tests only.
-func (w *window) waitWriterBlocked() {
- w.Cond.L.Lock()
- for w.writeWaiters == 0 {
- w.Cond.Wait()
- }
- w.Cond.L.Unlock()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/connection.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/connection.go
deleted file mode 100644
index fd6b0681b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/connection.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "fmt"
- "net"
-)
-
-// OpenChannelError is returned if the other side rejects an
-// OpenChannel request.
-type OpenChannelError struct {
- Reason RejectionReason
- Message string
-}
-
-func (e *OpenChannelError) Error() string {
- return fmt.Sprintf("ssh: rejected: %s (%s)", e.Reason, e.Message)
-}
-
-// ConnMetadata holds metadata for the connection.
-type ConnMetadata interface {
- // User returns the user ID for this connection.
- User() string
-
- // SessionID returns the session hash, also denoted by H.
- SessionID() []byte
-
- // ClientVersion returns the client's version string as hashed
- // into the session ID.
- ClientVersion() []byte
-
- // ServerVersion returns the server's version string as hashed
- // into the session ID.
- ServerVersion() []byte
-
- // RemoteAddr returns the remote address for this connection.
- RemoteAddr() net.Addr
-
- // LocalAddr returns the local address for this connection.
- LocalAddr() net.Addr
-}
-
-// Conn represents an SSH connection for both server and client roles.
-// Conn is the basis for implementing an application layer, such
-// as ClientConn, which implements the traditional shell access for
-// clients.
-type Conn interface {
- ConnMetadata
-
- // SendRequest sends a global request, and returns the
- // reply. If wantReply is true, it returns the response status
- // and payload. See also RFC4254, section 4.
- SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error)
-
- // OpenChannel tries to open an channel. If the request is
- // rejected, it returns *OpenChannelError. On success it returns
- // the SSH Channel and a Go channel for incoming, out-of-band
- // requests. The Go channel must be serviced, or the
- // connection will hang.
- OpenChannel(name string, data []byte) (Channel, <-chan *Request, error)
-
- // Close closes the underlying network connection
- Close() error
-
- // Wait blocks until the connection has shut down, and returns the
- // error causing the shutdown.
- Wait() error
-
- // TODO(hanwen): consider exposing:
- // RequestKeyChange
- // Disconnect
-}
-
-// DiscardRequests consumes and rejects all requests from the
-// passed-in channel.
-func DiscardRequests(in <-chan *Request) {
- for req := range in {
- if req.WantReply {
- req.Reply(false, nil)
- }
- }
-}
-
-// A connection represents an incoming connection.
-type connection struct {
- transport *handshakeTransport
- sshConn
-
- // The connection protocol.
- *mux
-}
-
-func (c *connection) Close() error {
- return c.sshConn.conn.Close()
-}
-
-// sshconn provides net.Conn metadata, but disallows direct reads and
-// writes.
-type sshConn struct {
- conn net.Conn
-
- user string
- sessionID []byte
- clientVersion []byte
- serverVersion []byte
-}
-
-func dup(src []byte) []byte {
- dst := make([]byte, len(src))
- copy(dst, src)
- return dst
-}
-
-func (c *sshConn) User() string {
- return c.user
-}
-
-func (c *sshConn) RemoteAddr() net.Addr {
- return c.conn.RemoteAddr()
-}
-
-func (c *sshConn) Close() error {
- return c.conn.Close()
-}
-
-func (c *sshConn) LocalAddr() net.Addr {
- return c.conn.LocalAddr()
-}
-
-func (c *sshConn) SessionID() []byte {
- return dup(c.sessionID)
-}
-
-func (c *sshConn) ClientVersion() []byte {
- return dup(c.clientVersion)
-}
-
-func (c *sshConn) ServerVersion() []byte {
- return dup(c.serverVersion)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/doc.go
deleted file mode 100644
index 67b7322c0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2011 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 file.
-
-/*
-Package ssh implements an SSH client and server.
-
-SSH is a transport security protocol, an authentication protocol and a
-family of application protocols. The most typical application level
-protocol is a remote shell and this is specifically implemented. However,
-the multiplexed nature of SSH is exposed to users that wish to support
-others.
-
-References:
- [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD
- [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1
-
-This package does not fall under the stability promise of the Go language itself,
-so its API may be changed when pressing needs arise.
-*/
-package ssh // import "golang.org/x/crypto/ssh"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/example_test.go
deleted file mode 100644
index b910c7bf6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/example_test.go
+++ /dev/null
@@ -1,320 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh_test
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io/ioutil"
- "log"
- "net"
- "net/http"
- "os"
- "path/filepath"
- "strings"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/terminal"
-)
-
-func ExampleNewServerConn() {
- // Public key authentication is done by comparing
- // the public key of a received connection
- // with the entries in the authorized_keys file.
- authorizedKeysBytes, err := ioutil.ReadFile("authorized_keys")
- if err != nil {
- log.Fatalf("Failed to load authorized_keys, err: %v", err)
- }
-
- authorizedKeysMap := map[string]bool{}
- for len(authorizedKeysBytes) > 0 {
- pubKey, _, _, rest, err := ssh.ParseAuthorizedKey(authorizedKeysBytes)
- if err != nil {
- log.Fatal(err)
- }
-
- authorizedKeysMap[string(pubKey.Marshal())] = true
- authorizedKeysBytes = rest
- }
-
- // An SSH server is represented by a ServerConfig, which holds
- // certificate details and handles authentication of ServerConns.
- config := &ssh.ServerConfig{
- // Remove to disable password auth.
- PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
- // Should use constant-time compare (or better, salt+hash) in
- // a production setting.
- if c.User() == "testuser" && string(pass) == "tiger" {
- return nil, nil
- }
- return nil, fmt.Errorf("password rejected for %q", c.User())
- },
-
- // Remove to disable public key auth.
- PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) {
- if authorizedKeysMap[string(pubKey.Marshal())] {
- return &ssh.Permissions{
- // Record the public key used for authentication.
- Extensions: map[string]string{
- "pubkey-fp": ssh.FingerprintSHA256(pubKey),
- },
- }, nil
- }
- return nil, fmt.Errorf("unknown public key for %q", c.User())
- },
- }
-
- privateBytes, err := ioutil.ReadFile("id_rsa")
- if err != nil {
- log.Fatal("Failed to load private key: ", err)
- }
-
- private, err := ssh.ParsePrivateKey(privateBytes)
- if err != nil {
- log.Fatal("Failed to parse private key: ", err)
- }
-
- config.AddHostKey(private)
-
- // Once a ServerConfig has been configured, connections can be
- // accepted.
- listener, err := net.Listen("tcp", "0.0.0.0:2022")
- if err != nil {
- log.Fatal("failed to listen for connection: ", err)
- }
- nConn, err := listener.Accept()
- if err != nil {
- log.Fatal("failed to accept incoming connection: ", err)
- }
-
- // Before use, a handshake must be performed on the incoming
- // net.Conn.
- conn, chans, reqs, err := ssh.NewServerConn(nConn, config)
- if err != nil {
- log.Fatal("failed to handshake: ", err)
- }
- log.Printf("logged in with key %s", conn.Permissions.Extensions["pubkey-fp"])
-
- // The incoming Request channel must be serviced.
- go ssh.DiscardRequests(reqs)
-
- // Service the incoming Channel channel.
- for newChannel := range chans {
- // Channels have a type, depending on the application level
- // protocol intended. In the case of a shell, the type is
- // "session" and ServerShell may be used to present a simple
- // terminal interface.
- if newChannel.ChannelType() != "session" {
- newChannel.Reject(ssh.UnknownChannelType, "unknown channel type")
- continue
- }
- channel, requests, err := newChannel.Accept()
- if err != nil {
- log.Fatalf("Could not accept channel: %v", err)
- }
-
- // Sessions have out-of-band requests such as "shell",
- // "pty-req" and "env". Here we handle only the
- // "shell" request.
- go func(in <-chan *ssh.Request) {
- for req := range in {
- req.Reply(req.Type == "shell", nil)
- }
- }(requests)
-
- term := terminal.NewTerminal(channel, "> ")
-
- go func() {
- defer channel.Close()
- for {
- line, err := term.ReadLine()
- if err != nil {
- break
- }
- fmt.Println(line)
- }
- }()
- }
-}
-
-func ExampleHostKeyCheck() {
- // Every client must provide a host key check. Here is a
- // simple-minded parse of OpenSSH's known_hosts file
- host := "hostname"
- file, err := os.Open(filepath.Join(os.Getenv("HOME"), ".ssh", "known_hosts"))
- if err != nil {
- log.Fatal(err)
- }
- defer file.Close()
-
- scanner := bufio.NewScanner(file)
- var hostKey ssh.PublicKey
- for scanner.Scan() {
- fields := strings.Split(scanner.Text(), " ")
- if len(fields) != 3 {
- continue
- }
- if strings.Contains(fields[0], host) {
- var err error
- hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes())
- if err != nil {
- log.Fatalf("error parsing %q: %v", fields[2], err)
- }
- break
- }
- }
-
- if hostKey == nil {
- log.Fatalf("no hostkey for %s", host)
- }
-
- config := ssh.ClientConfig{
- User: os.Getenv("USER"),
- HostKeyCallback: ssh.FixedHostKey(hostKey),
- }
-
- _, err = ssh.Dial("tcp", host+":22", &config)
- log.Println(err)
-}
-
-func ExampleDial() {
- var hostKey ssh.PublicKey
- // An SSH client is represented with a ClientConn.
- //
- // To authenticate with the remote server you must pass at least one
- // implementation of AuthMethod via the Auth field in ClientConfig,
- // and provide a HostKeyCallback.
- config := &ssh.ClientConfig{
- User: "username",
- Auth: []ssh.AuthMethod{
- ssh.Password("yourpassword"),
- },
- HostKeyCallback: ssh.FixedHostKey(hostKey),
- }
- client, err := ssh.Dial("tcp", "yourserver.com:22", config)
- if err != nil {
- log.Fatal("Failed to dial: ", err)
- }
-
- // Each ClientConn can support multiple interactive sessions,
- // represented by a Session.
- session, err := client.NewSession()
- if err != nil {
- log.Fatal("Failed to create session: ", err)
- }
- defer session.Close()
-
- // Once a Session is created, you can execute a single command on
- // the remote side using the Run method.
- var b bytes.Buffer
- session.Stdout = &b
- if err := session.Run("/usr/bin/whoami"); err != nil {
- log.Fatal("Failed to run: " + err.Error())
- }
- fmt.Println(b.String())
-}
-
-func ExamplePublicKeys() {
- var hostKey ssh.PublicKey
- // A public key may be used to authenticate against the remote
- // server by using an unencrypted PEM-encoded private key file.
- //
- // If you have an encrypted private key, the crypto/x509 package
- // can be used to decrypt it.
- key, err := ioutil.ReadFile("/home/user/.ssh/id_rsa")
- if err != nil {
- log.Fatalf("unable to read private key: %v", err)
- }
-
- // Create the Signer for this private key.
- signer, err := ssh.ParsePrivateKey(key)
- if err != nil {
- log.Fatalf("unable to parse private key: %v", err)
- }
-
- config := &ssh.ClientConfig{
- User: "user",
- Auth: []ssh.AuthMethod{
- // Use the PublicKeys method for remote authentication.
- ssh.PublicKeys(signer),
- },
- HostKeyCallback: ssh.FixedHostKey(hostKey),
- }
-
- // Connect to the remote server and perform the SSH handshake.
- client, err := ssh.Dial("tcp", "host.com:22", config)
- if err != nil {
- log.Fatalf("unable to connect: %v", err)
- }
- defer client.Close()
-}
-
-func ExampleClient_Listen() {
- var hostKey ssh.PublicKey
- config := &ssh.ClientConfig{
- User: "username",
- Auth: []ssh.AuthMethod{
- ssh.Password("password"),
- },
- HostKeyCallback: ssh.FixedHostKey(hostKey),
- }
- // Dial your ssh server.
- conn, err := ssh.Dial("tcp", "localhost:22", config)
- if err != nil {
- log.Fatal("unable to connect: ", err)
- }
- defer conn.Close()
-
- // Request the remote side to open port 8080 on all interfaces.
- l, err := conn.Listen("tcp", "0.0.0.0:8080")
- if err != nil {
- log.Fatal("unable to register tcp forward: ", err)
- }
- defer l.Close()
-
- // Serve HTTP with your SSH server acting as a reverse proxy.
- http.Serve(l, http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
- fmt.Fprintf(resp, "Hello world!\n")
- }))
-}
-
-func ExampleSession_RequestPty() {
- var hostKey ssh.PublicKey
- // Create client config
- config := &ssh.ClientConfig{
- User: "username",
- Auth: []ssh.AuthMethod{
- ssh.Password("password"),
- },
- HostKeyCallback: ssh.FixedHostKey(hostKey),
- }
- // Connect to ssh server
- conn, err := ssh.Dial("tcp", "localhost:22", config)
- if err != nil {
- log.Fatal("unable to connect: ", err)
- }
- defer conn.Close()
- // Create a session
- session, err := conn.NewSession()
- if err != nil {
- log.Fatal("unable to create session: ", err)
- }
- defer session.Close()
- // Set up terminal modes
- modes := ssh.TerminalModes{
- ssh.ECHO: 0, // disable echoing
- ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud
- ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud
- }
- // Request pseudo terminal
- if err := session.RequestPty("xterm", 40, 80, modes); err != nil {
- log.Fatal("request for pseudo terminal failed: ", err)
- }
- // Start remote shell
- if err := session.Shell(); err != nil {
- log.Fatal("failed to start shell: ", err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake.go
deleted file mode 100644
index 4f7912ecd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake.go
+++ /dev/null
@@ -1,646 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "crypto/rand"
- "errors"
- "fmt"
- "io"
- "log"
- "net"
- "sync"
-)
-
-// debugHandshake, if set, prints messages sent and received. Key
-// exchange messages are printed as if DH were used, so the debug
-// messages are wrong when using ECDH.
-const debugHandshake = false
-
-// chanSize sets the amount of buffering SSH connections. This is
-// primarily for testing: setting chanSize=0 uncovers deadlocks more
-// quickly.
-const chanSize = 16
-
-// keyingTransport is a packet based transport that supports key
-// changes. It need not be thread-safe. It should pass through
-// msgNewKeys in both directions.
-type keyingTransport interface {
- packetConn
-
- // prepareKeyChange sets up a key change. The key change for a
- // direction will be effected if a msgNewKeys message is sent
- // or received.
- prepareKeyChange(*algorithms, *kexResult) error
-}
-
-// handshakeTransport implements rekeying on top of a keyingTransport
-// and offers a thread-safe writePacket() interface.
-type handshakeTransport struct {
- conn keyingTransport
- config *Config
-
- serverVersion []byte
- clientVersion []byte
-
- // hostKeys is non-empty if we are the server. In that case,
- // it contains all host keys that can be used to sign the
- // connection.
- hostKeys []Signer
-
- // hostKeyAlgorithms is non-empty if we are the client. In that case,
- // we accept these key types from the server as host key.
- hostKeyAlgorithms []string
-
- // On read error, incoming is closed, and readError is set.
- incoming chan []byte
- readError error
-
- mu sync.Mutex
- writeError error
- sentInitPacket []byte
- sentInitMsg *kexInitMsg
- pendingPackets [][]byte // Used when a key exchange is in progress.
-
- // If the read loop wants to schedule a kex, it pings this
- // channel, and the write loop will send out a kex
- // message.
- requestKex chan struct{}
-
- // If the other side requests or confirms a kex, its kexInit
- // packet is sent here for the write loop to find it.
- startKex chan *pendingKex
-
- // data for host key checking
- hostKeyCallback HostKeyCallback
- dialAddress string
- remoteAddr net.Addr
-
- // bannerCallback is non-empty if we are the client and it has been set in
- // ClientConfig. In that case it is called during the user authentication
- // dance to handle a custom server's message.
- bannerCallback BannerCallback
-
- // Algorithms agreed in the last key exchange.
- algorithms *algorithms
-
- readPacketsLeft uint32
- readBytesLeft int64
-
- writePacketsLeft uint32
- writeBytesLeft int64
-
- // The session ID or nil if first kex did not complete yet.
- sessionID []byte
-}
-
-type pendingKex struct {
- otherInit []byte
- done chan error
-}
-
-func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, serverVersion []byte) *handshakeTransport {
- t := &handshakeTransport{
- conn: conn,
- serverVersion: serverVersion,
- clientVersion: clientVersion,
- incoming: make(chan []byte, chanSize),
- requestKex: make(chan struct{}, 1),
- startKex: make(chan *pendingKex, 1),
-
- config: config,
- }
- t.resetReadThresholds()
- t.resetWriteThresholds()
-
- // We always start with a mandatory key exchange.
- t.requestKex <- struct{}{}
- return t
-}
-
-func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ClientConfig, dialAddr string, addr net.Addr) *handshakeTransport {
- t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion)
- t.dialAddress = dialAddr
- t.remoteAddr = addr
- t.hostKeyCallback = config.HostKeyCallback
- t.bannerCallback = config.BannerCallback
- if config.HostKeyAlgorithms != nil {
- t.hostKeyAlgorithms = config.HostKeyAlgorithms
- } else {
- t.hostKeyAlgorithms = supportedHostKeyAlgos
- }
- go t.readLoop()
- go t.kexLoop()
- return t
-}
-
-func newServerTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ServerConfig) *handshakeTransport {
- t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion)
- t.hostKeys = config.hostKeys
- go t.readLoop()
- go t.kexLoop()
- return t
-}
-
-func (t *handshakeTransport) getSessionID() []byte {
- return t.sessionID
-}
-
-// waitSession waits for the session to be established. This should be
-// the first thing to call after instantiating handshakeTransport.
-func (t *handshakeTransport) waitSession() error {
- p, err := t.readPacket()
- if err != nil {
- return err
- }
- if p[0] != msgNewKeys {
- return fmt.Errorf("ssh: first packet should be msgNewKeys")
- }
-
- return nil
-}
-
-func (t *handshakeTransport) id() string {
- if len(t.hostKeys) > 0 {
- return "server"
- }
- return "client"
-}
-
-func (t *handshakeTransport) printPacket(p []byte, write bool) {
- action := "got"
- if write {
- action = "sent"
- }
-
- if p[0] == msgChannelData || p[0] == msgChannelExtendedData {
- log.Printf("%s %s data (packet %d bytes)", t.id(), action, len(p))
- } else {
- msg, err := decode(p)
- log.Printf("%s %s %T %v (%v)", t.id(), action, msg, msg, err)
- }
-}
-
-func (t *handshakeTransport) readPacket() ([]byte, error) {
- p, ok := <-t.incoming
- if !ok {
- return nil, t.readError
- }
- return p, nil
-}
-
-func (t *handshakeTransport) readLoop() {
- first := true
- for {
- p, err := t.readOnePacket(first)
- first = false
- if err != nil {
- t.readError = err
- close(t.incoming)
- break
- }
- if p[0] == msgIgnore || p[0] == msgDebug {
- continue
- }
- t.incoming <- p
- }
-
- // Stop writers too.
- t.recordWriteError(t.readError)
-
- // Unblock the writer should it wait for this.
- close(t.startKex)
-
- // Don't close t.requestKex; it's also written to from writePacket.
-}
-
-func (t *handshakeTransport) pushPacket(p []byte) error {
- if debugHandshake {
- t.printPacket(p, true)
- }
- return t.conn.writePacket(p)
-}
-
-func (t *handshakeTransport) getWriteError() error {
- t.mu.Lock()
- defer t.mu.Unlock()
- return t.writeError
-}
-
-func (t *handshakeTransport) recordWriteError(err error) {
- t.mu.Lock()
- defer t.mu.Unlock()
- if t.writeError == nil && err != nil {
- t.writeError = err
- }
-}
-
-func (t *handshakeTransport) requestKeyExchange() {
- select {
- case t.requestKex <- struct{}{}:
- default:
- // something already requested a kex, so do nothing.
- }
-}
-
-func (t *handshakeTransport) resetWriteThresholds() {
- t.writePacketsLeft = packetRekeyThreshold
- if t.config.RekeyThreshold > 0 {
- t.writeBytesLeft = int64(t.config.RekeyThreshold)
- } else if t.algorithms != nil {
- t.writeBytesLeft = t.algorithms.w.rekeyBytes()
- } else {
- t.writeBytesLeft = 1 << 30
- }
-}
-
-func (t *handshakeTransport) kexLoop() {
-
-write:
- for t.getWriteError() == nil {
- var request *pendingKex
- var sent bool
-
- for request == nil || !sent {
- var ok bool
- select {
- case request, ok = <-t.startKex:
- if !ok {
- break write
- }
- case <-t.requestKex:
- break
- }
-
- if !sent {
- if err := t.sendKexInit(); err != nil {
- t.recordWriteError(err)
- break
- }
- sent = true
- }
- }
-
- if err := t.getWriteError(); err != nil {
- if request != nil {
- request.done <- err
- }
- break
- }
-
- // We're not servicing t.requestKex, but that is OK:
- // we never block on sending to t.requestKex.
-
- // We're not servicing t.startKex, but the remote end
- // has just sent us a kexInitMsg, so it can't send
- // another key change request, until we close the done
- // channel on the pendingKex request.
-
- err := t.enterKeyExchange(request.otherInit)
-
- t.mu.Lock()
- t.writeError = err
- t.sentInitPacket = nil
- t.sentInitMsg = nil
-
- t.resetWriteThresholds()
-
- // we have completed the key exchange. Since the
- // reader is still blocked, it is safe to clear out
- // the requestKex channel. This avoids the situation
- // where: 1) we consumed our own request for the
- // initial kex, and 2) the kex from the remote side
- // caused another send on the requestKex channel,
- clear:
- for {
- select {
- case <-t.requestKex:
- //
- default:
- break clear
- }
- }
-
- request.done <- t.writeError
-
- // kex finished. Push packets that we received while
- // the kex was in progress. Don't look at t.startKex
- // and don't increment writtenSinceKex: if we trigger
- // another kex while we are still busy with the last
- // one, things will become very confusing.
- for _, p := range t.pendingPackets {
- t.writeError = t.pushPacket(p)
- if t.writeError != nil {
- break
- }
- }
- t.pendingPackets = t.pendingPackets[:0]
- t.mu.Unlock()
- }
-
- // drain startKex channel. We don't service t.requestKex
- // because nobody does blocking sends there.
- go func() {
- for init := range t.startKex {
- init.done <- t.writeError
- }
- }()
-
- // Unblock reader.
- t.conn.Close()
-}
-
-// The protocol uses uint32 for packet counters, so we can't let them
-// reach 1<<32. We will actually read and write more packets than
-// this, though: the other side may send more packets, and after we
-// hit this limit on writing we will send a few more packets for the
-// key exchange itself.
-const packetRekeyThreshold = (1 << 31)
-
-func (t *handshakeTransport) resetReadThresholds() {
- t.readPacketsLeft = packetRekeyThreshold
- if t.config.RekeyThreshold > 0 {
- t.readBytesLeft = int64(t.config.RekeyThreshold)
- } else if t.algorithms != nil {
- t.readBytesLeft = t.algorithms.r.rekeyBytes()
- } else {
- t.readBytesLeft = 1 << 30
- }
-}
-
-func (t *handshakeTransport) readOnePacket(first bool) ([]byte, error) {
- p, err := t.conn.readPacket()
- if err != nil {
- return nil, err
- }
-
- if t.readPacketsLeft > 0 {
- t.readPacketsLeft--
- } else {
- t.requestKeyExchange()
- }
-
- if t.readBytesLeft > 0 {
- t.readBytesLeft -= int64(len(p))
- } else {
- t.requestKeyExchange()
- }
-
- if debugHandshake {
- t.printPacket(p, false)
- }
-
- if first && p[0] != msgKexInit {
- return nil, fmt.Errorf("ssh: first packet should be msgKexInit")
- }
-
- if p[0] != msgKexInit {
- return p, nil
- }
-
- firstKex := t.sessionID == nil
-
- kex := pendingKex{
- done: make(chan error, 1),
- otherInit: p,
- }
- t.startKex <- &kex
- err = <-kex.done
-
- if debugHandshake {
- log.Printf("%s exited key exchange (first %v), err %v", t.id(), firstKex, err)
- }
-
- if err != nil {
- return nil, err
- }
-
- t.resetReadThresholds()
-
- // By default, a key exchange is hidden from higher layers by
- // translating it into msgIgnore.
- successPacket := []byte{msgIgnore}
- if firstKex {
- // sendKexInit() for the first kex waits for
- // msgNewKeys so the authentication process is
- // guaranteed to happen over an encrypted transport.
- successPacket = []byte{msgNewKeys}
- }
-
- return successPacket, nil
-}
-
-// sendKexInit sends a key change message.
-func (t *handshakeTransport) sendKexInit() error {
- t.mu.Lock()
- defer t.mu.Unlock()
- if t.sentInitMsg != nil {
- // kexInits may be sent either in response to the other side,
- // or because our side wants to initiate a key change, so we
- // may have already sent a kexInit. In that case, don't send a
- // second kexInit.
- return nil
- }
-
- msg := &kexInitMsg{
- KexAlgos: t.config.KeyExchanges,
- CiphersClientServer: t.config.Ciphers,
- CiphersServerClient: t.config.Ciphers,
- MACsClientServer: t.config.MACs,
- MACsServerClient: t.config.MACs,
- CompressionClientServer: supportedCompressions,
- CompressionServerClient: supportedCompressions,
- }
- io.ReadFull(rand.Reader, msg.Cookie[:])
-
- if len(t.hostKeys) > 0 {
- for _, k := range t.hostKeys {
- msg.ServerHostKeyAlgos = append(
- msg.ServerHostKeyAlgos, k.PublicKey().Type())
- }
- } else {
- msg.ServerHostKeyAlgos = t.hostKeyAlgorithms
- }
- packet := Marshal(msg)
-
- // writePacket destroys the contents, so save a copy.
- packetCopy := make([]byte, len(packet))
- copy(packetCopy, packet)
-
- if err := t.pushPacket(packetCopy); err != nil {
- return err
- }
-
- t.sentInitMsg = msg
- t.sentInitPacket = packet
-
- return nil
-}
-
-func (t *handshakeTransport) writePacket(p []byte) error {
- switch p[0] {
- case msgKexInit:
- return errors.New("ssh: only handshakeTransport can send kexInit")
- case msgNewKeys:
- return errors.New("ssh: only handshakeTransport can send newKeys")
- }
-
- t.mu.Lock()
- defer t.mu.Unlock()
- if t.writeError != nil {
- return t.writeError
- }
-
- if t.sentInitMsg != nil {
- // Copy the packet so the writer can reuse the buffer.
- cp := make([]byte, len(p))
- copy(cp, p)
- t.pendingPackets = append(t.pendingPackets, cp)
- return nil
- }
-
- if t.writeBytesLeft > 0 {
- t.writeBytesLeft -= int64(len(p))
- } else {
- t.requestKeyExchange()
- }
-
- if t.writePacketsLeft > 0 {
- t.writePacketsLeft--
- } else {
- t.requestKeyExchange()
- }
-
- if err := t.pushPacket(p); err != nil {
- t.writeError = err
- }
-
- return nil
-}
-
-func (t *handshakeTransport) Close() error {
- return t.conn.Close()
-}
-
-func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
- if debugHandshake {
- log.Printf("%s entered key exchange", t.id())
- }
-
- otherInit := &kexInitMsg{}
- if err := Unmarshal(otherInitPacket, otherInit); err != nil {
- return err
- }
-
- magics := handshakeMagics{
- clientVersion: t.clientVersion,
- serverVersion: t.serverVersion,
- clientKexInit: otherInitPacket,
- serverKexInit: t.sentInitPacket,
- }
-
- clientInit := otherInit
- serverInit := t.sentInitMsg
- if len(t.hostKeys) == 0 {
- clientInit, serverInit = serverInit, clientInit
-
- magics.clientKexInit = t.sentInitPacket
- magics.serverKexInit = otherInitPacket
- }
-
- var err error
- t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit)
- if err != nil {
- return err
- }
-
- // We don't send FirstKexFollows, but we handle receiving it.
- //
- // RFC 4253 section 7 defines the kex and the agreement method for
- // first_kex_packet_follows. It states that the guessed packet
- // should be ignored if the "kex algorithm and/or the host
- // key algorithm is guessed wrong (server and client have
- // different preferred algorithm), or if any of the other
- // algorithms cannot be agreed upon". The other algorithms have
- // already been checked above so the kex algorithm and host key
- // algorithm are checked here.
- if otherInit.FirstKexFollows && (clientInit.KexAlgos[0] != serverInit.KexAlgos[0] || clientInit.ServerHostKeyAlgos[0] != serverInit.ServerHostKeyAlgos[0]) {
- // other side sent a kex message for the wrong algorithm,
- // which we have to ignore.
- if _, err := t.conn.readPacket(); err != nil {
- return err
- }
- }
-
- kex, ok := kexAlgoMap[t.algorithms.kex]
- if !ok {
- return fmt.Errorf("ssh: unexpected key exchange algorithm %v", t.algorithms.kex)
- }
-
- var result *kexResult
- if len(t.hostKeys) > 0 {
- result, err = t.server(kex, t.algorithms, &magics)
- } else {
- result, err = t.client(kex, t.algorithms, &magics)
- }
-
- if err != nil {
- return err
- }
-
- if t.sessionID == nil {
- t.sessionID = result.H
- }
- result.SessionID = t.sessionID
-
- if err := t.conn.prepareKeyChange(t.algorithms, result); err != nil {
- return err
- }
- if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil {
- return err
- }
- if packet, err := t.conn.readPacket(); err != nil {
- return err
- } else if packet[0] != msgNewKeys {
- return unexpectedMessageError(msgNewKeys, packet[0])
- }
-
- return nil
-}
-
-func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) {
- var hostKey Signer
- for _, k := range t.hostKeys {
- if algs.hostKey == k.PublicKey().Type() {
- hostKey = k
- }
- }
-
- r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey)
- return r, err
-}
-
-func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) {
- result, err := kex.Client(t.conn, t.config.Rand, magics)
- if err != nil {
- return nil, err
- }
-
- hostKey, err := ParsePublicKey(result.HostKey)
- if err != nil {
- return nil, err
- }
-
- if err := verifyHostKeySignature(hostKey, result); err != nil {
- return nil, err
- }
-
- err = t.hostKeyCallback(t.dialAddress, t.remoteAddr, hostKey)
- if err != nil {
- return nil, err
- }
-
- return result, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake_test.go
deleted file mode 100644
index 91d493568..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/handshake_test.go
+++ /dev/null
@@ -1,559 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto/rand"
- "errors"
- "fmt"
- "io"
- "net"
- "reflect"
- "runtime"
- "strings"
- "sync"
- "testing"
-)
-
-type testChecker struct {
- calls []string
-}
-
-func (t *testChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error {
- if dialAddr == "bad" {
- return fmt.Errorf("dialAddr is bad")
- }
-
- if tcpAddr, ok := addr.(*net.TCPAddr); !ok || tcpAddr == nil {
- return fmt.Errorf("testChecker: got %T want *net.TCPAddr", addr)
- }
-
- t.calls = append(t.calls, fmt.Sprintf("%s %v %s %x", dialAddr, addr, key.Type(), key.Marshal()))
-
- return nil
-}
-
-// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and
-// therefore is buffered (net.Pipe deadlocks if both sides start with
-// a write.)
-func netPipe() (net.Conn, net.Conn, error) {
- listener, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- listener, err = net.Listen("tcp", "[::1]:0")
- if err != nil {
- return nil, nil, err
- }
- }
- defer listener.Close()
- c1, err := net.Dial("tcp", listener.Addr().String())
- if err != nil {
- return nil, nil, err
- }
-
- c2, err := listener.Accept()
- if err != nil {
- c1.Close()
- return nil, nil, err
- }
-
- return c1, c2, nil
-}
-
-// noiseTransport inserts ignore messages to check that the read loop
-// and the key exchange filters out these messages.
-type noiseTransport struct {
- keyingTransport
-}
-
-func (t *noiseTransport) writePacket(p []byte) error {
- ignore := []byte{msgIgnore}
- if err := t.keyingTransport.writePacket(ignore); err != nil {
- return err
- }
- debug := []byte{msgDebug, 1, 2, 3}
- if err := t.keyingTransport.writePacket(debug); err != nil {
- return err
- }
-
- return t.keyingTransport.writePacket(p)
-}
-
-func addNoiseTransport(t keyingTransport) keyingTransport {
- return &noiseTransport{t}
-}
-
-// handshakePair creates two handshakeTransports connected with each
-// other. If the noise argument is true, both transports will try to
-// confuse the other side by sending ignore and debug messages.
-func handshakePair(clientConf *ClientConfig, addr string, noise bool) (client *handshakeTransport, server *handshakeTransport, err error) {
- a, b, err := netPipe()
- if err != nil {
- return nil, nil, err
- }
-
- var trC, trS keyingTransport
-
- trC = newTransport(a, rand.Reader, true)
- trS = newTransport(b, rand.Reader, false)
- if noise {
- trC = addNoiseTransport(trC)
- trS = addNoiseTransport(trS)
- }
- clientConf.SetDefaults()
-
- v := []byte("version")
- client = newClientTransport(trC, v, v, clientConf, addr, a.RemoteAddr())
-
- serverConf := &ServerConfig{}
- serverConf.AddHostKey(testSigners["ecdsa"])
- serverConf.AddHostKey(testSigners["rsa"])
- serverConf.SetDefaults()
- server = newServerTransport(trS, v, v, serverConf)
-
- if err := server.waitSession(); err != nil {
- return nil, nil, fmt.Errorf("server.waitSession: %v", err)
- }
- if err := client.waitSession(); err != nil {
- return nil, nil, fmt.Errorf("client.waitSession: %v", err)
- }
-
- return client, server, nil
-}
-
-func TestHandshakeBasic(t *testing.T) {
- if runtime.GOOS == "plan9" {
- t.Skip("see golang.org/issue/7237")
- }
-
- checker := &syncChecker{
- waitCall: make(chan int, 10),
- called: make(chan int, 10),
- }
-
- checker.waitCall <- 1
- trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false)
- if err != nil {
- t.Fatalf("handshakePair: %v", err)
- }
-
- defer trC.Close()
- defer trS.Close()
-
- // Let first kex complete normally.
- <-checker.called
-
- clientDone := make(chan int, 0)
- gotHalf := make(chan int, 0)
- const N = 20
-
- go func() {
- defer close(clientDone)
- // Client writes a bunch of stuff, and does a key
- // change in the middle. This should not confuse the
- // handshake in progress. We do this twice, so we test
- // that the packet buffer is reset correctly.
- for i := 0; i < N; i++ {
- p := []byte{msgRequestSuccess, byte(i)}
- if err := trC.writePacket(p); err != nil {
- t.Fatalf("sendPacket: %v", err)
- }
- if (i % 10) == 5 {
- <-gotHalf
- // halfway through, we request a key change.
- trC.requestKeyExchange()
-
- // Wait until we can be sure the key
- // change has really started before we
- // write more.
- <-checker.called
- }
- if (i % 10) == 7 {
- // write some packets until the kex
- // completes, to test buffering of
- // packets.
- checker.waitCall <- 1
- }
- }
- }()
-
- // Server checks that client messages come in cleanly
- i := 0
- err = nil
- for ; i < N; i++ {
- var p []byte
- p, err = trS.readPacket()
- if err != nil {
- break
- }
- if (i % 10) == 5 {
- gotHalf <- 1
- }
-
- want := []byte{msgRequestSuccess, byte(i)}
- if bytes.Compare(p, want) != 0 {
- t.Errorf("message %d: got %v, want %v", i, p, want)
- }
- }
- <-clientDone
- if err != nil && err != io.EOF {
- t.Fatalf("server error: %v", err)
- }
- if i != N {
- t.Errorf("received %d messages, want 10.", i)
- }
-
- close(checker.called)
- if _, ok := <-checker.called; ok {
- // If all went well, we registered exactly 2 key changes: one
- // that establishes the session, and one that we requested
- // additionally.
- t.Fatalf("got another host key checks after 2 handshakes")
- }
-}
-
-func TestForceFirstKex(t *testing.T) {
- // like handshakePair, but must access the keyingTransport.
- checker := &testChecker{}
- clientConf := &ClientConfig{HostKeyCallback: checker.Check}
- a, b, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
-
- var trC, trS keyingTransport
-
- trC = newTransport(a, rand.Reader, true)
-
- // This is the disallowed packet:
- trC.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth}))
-
- // Rest of the setup.
- trS = newTransport(b, rand.Reader, false)
- clientConf.SetDefaults()
-
- v := []byte("version")
- client := newClientTransport(trC, v, v, clientConf, "addr", a.RemoteAddr())
-
- serverConf := &ServerConfig{}
- serverConf.AddHostKey(testSigners["ecdsa"])
- serverConf.AddHostKey(testSigners["rsa"])
- serverConf.SetDefaults()
- server := newServerTransport(trS, v, v, serverConf)
-
- defer client.Close()
- defer server.Close()
-
- // We setup the initial key exchange, but the remote side
- // tries to send serviceRequestMsg in cleartext, which is
- // disallowed.
-
- if err := server.waitSession(); err == nil {
- t.Errorf("server first kex init should reject unexpected packet")
- }
-}
-
-func TestHandshakeAutoRekeyWrite(t *testing.T) {
- checker := &syncChecker{
- called: make(chan int, 10),
- waitCall: nil,
- }
- clientConf := &ClientConfig{HostKeyCallback: checker.Check}
- clientConf.RekeyThreshold = 500
- trC, trS, err := handshakePair(clientConf, "addr", false)
- if err != nil {
- t.Fatalf("handshakePair: %v", err)
- }
- defer trC.Close()
- defer trS.Close()
-
- input := make([]byte, 251)
- input[0] = msgRequestSuccess
-
- done := make(chan int, 1)
- const numPacket = 5
- go func() {
- defer close(done)
- j := 0
- for ; j < numPacket; j++ {
- if p, err := trS.readPacket(); err != nil {
- break
- } else if !bytes.Equal(input, p) {
- t.Errorf("got packet type %d, want %d", p[0], input[0])
- }
- }
-
- if j != numPacket {
- t.Errorf("got %d, want 5 messages", j)
- }
- }()
-
- <-checker.called
-
- for i := 0; i < numPacket; i++ {
- p := make([]byte, len(input))
- copy(p, input)
- if err := trC.writePacket(p); err != nil {
- t.Errorf("writePacket: %v", err)
- }
- if i == 2 {
- // Make sure the kex is in progress.
- <-checker.called
- }
-
- }
- <-done
-}
-
-type syncChecker struct {
- waitCall chan int
- called chan int
-}
-
-func (c *syncChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error {
- c.called <- 1
- if c.waitCall != nil {
- <-c.waitCall
- }
- return nil
-}
-
-func TestHandshakeAutoRekeyRead(t *testing.T) {
- sync := &syncChecker{
- called: make(chan int, 2),
- waitCall: nil,
- }
- clientConf := &ClientConfig{
- HostKeyCallback: sync.Check,
- }
- clientConf.RekeyThreshold = 500
-
- trC, trS, err := handshakePair(clientConf, "addr", false)
- if err != nil {
- t.Fatalf("handshakePair: %v", err)
- }
- defer trC.Close()
- defer trS.Close()
-
- packet := make([]byte, 501)
- packet[0] = msgRequestSuccess
- if err := trS.writePacket(packet); err != nil {
- t.Fatalf("writePacket: %v", err)
- }
-
- // While we read out the packet, a key change will be
- // initiated.
- done := make(chan int, 1)
- go func() {
- defer close(done)
- if _, err := trC.readPacket(); err != nil {
- t.Fatalf("readPacket(client): %v", err)
- }
-
- }()
-
- <-done
- <-sync.called
-}
-
-// errorKeyingTransport generates errors after a given number of
-// read/write operations.
-type errorKeyingTransport struct {
- packetConn
- readLeft, writeLeft int
-}
-
-func (n *errorKeyingTransport) prepareKeyChange(*algorithms, *kexResult) error {
- return nil
-}
-
-func (n *errorKeyingTransport) getSessionID() []byte {
- return nil
-}
-
-func (n *errorKeyingTransport) writePacket(packet []byte) error {
- if n.writeLeft == 0 {
- n.Close()
- return errors.New("barf")
- }
-
- n.writeLeft--
- return n.packetConn.writePacket(packet)
-}
-
-func (n *errorKeyingTransport) readPacket() ([]byte, error) {
- if n.readLeft == 0 {
- n.Close()
- return nil, errors.New("barf")
- }
-
- n.readLeft--
- return n.packetConn.readPacket()
-}
-
-func TestHandshakeErrorHandlingRead(t *testing.T) {
- for i := 0; i < 20; i++ {
- testHandshakeErrorHandlingN(t, i, -1, false)
- }
-}
-
-func TestHandshakeErrorHandlingWrite(t *testing.T) {
- for i := 0; i < 20; i++ {
- testHandshakeErrorHandlingN(t, -1, i, false)
- }
-}
-
-func TestHandshakeErrorHandlingReadCoupled(t *testing.T) {
- for i := 0; i < 20; i++ {
- testHandshakeErrorHandlingN(t, i, -1, true)
- }
-}
-
-func TestHandshakeErrorHandlingWriteCoupled(t *testing.T) {
- for i := 0; i < 20; i++ {
- testHandshakeErrorHandlingN(t, -1, i, true)
- }
-}
-
-// testHandshakeErrorHandlingN runs handshakes, injecting errors. If
-// handshakeTransport deadlocks, the go runtime will detect it and
-// panic.
-func testHandshakeErrorHandlingN(t *testing.T, readLimit, writeLimit int, coupled bool) {
- msg := Marshal(&serviceRequestMsg{strings.Repeat("x", int(minRekeyThreshold)/4)})
-
- a, b := memPipe()
- defer a.Close()
- defer b.Close()
-
- key := testSigners["ecdsa"]
- serverConf := Config{RekeyThreshold: minRekeyThreshold}
- serverConf.SetDefaults()
- serverConn := newHandshakeTransport(&errorKeyingTransport{a, readLimit, writeLimit}, &serverConf, []byte{'a'}, []byte{'b'})
- serverConn.hostKeys = []Signer{key}
- go serverConn.readLoop()
- go serverConn.kexLoop()
-
- clientConf := Config{RekeyThreshold: 10 * minRekeyThreshold}
- clientConf.SetDefaults()
- clientConn := newHandshakeTransport(&errorKeyingTransport{b, -1, -1}, &clientConf, []byte{'a'}, []byte{'b'})
- clientConn.hostKeyAlgorithms = []string{key.PublicKey().Type()}
- clientConn.hostKeyCallback = InsecureIgnoreHostKey()
- go clientConn.readLoop()
- go clientConn.kexLoop()
-
- var wg sync.WaitGroup
-
- for _, hs := range []packetConn{serverConn, clientConn} {
- if !coupled {
- wg.Add(2)
- go func(c packetConn) {
- for i := 0; ; i++ {
- str := fmt.Sprintf("%08x", i) + strings.Repeat("x", int(minRekeyThreshold)/4-8)
- err := c.writePacket(Marshal(&serviceRequestMsg{str}))
- if err != nil {
- break
- }
- }
- wg.Done()
- c.Close()
- }(hs)
- go func(c packetConn) {
- for {
- _, err := c.readPacket()
- if err != nil {
- break
- }
- }
- wg.Done()
- }(hs)
- } else {
- wg.Add(1)
- go func(c packetConn) {
- for {
- _, err := c.readPacket()
- if err != nil {
- break
- }
- if err := c.writePacket(msg); err != nil {
- break
- }
-
- }
- wg.Done()
- }(hs)
- }
- }
- wg.Wait()
-}
-
-func TestDisconnect(t *testing.T) {
- if runtime.GOOS == "plan9" {
- t.Skip("see golang.org/issue/7237")
- }
- checker := &testChecker{}
- trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false)
- if err != nil {
- t.Fatalf("handshakePair: %v", err)
- }
-
- defer trC.Close()
- defer trS.Close()
-
- trC.writePacket([]byte{msgRequestSuccess, 0, 0})
- errMsg := &disconnectMsg{
- Reason: 42,
- Message: "such is life",
- }
- trC.writePacket(Marshal(errMsg))
- trC.writePacket([]byte{msgRequestSuccess, 0, 0})
-
- packet, err := trS.readPacket()
- if err != nil {
- t.Fatalf("readPacket 1: %v", err)
- }
- if packet[0] != msgRequestSuccess {
- t.Errorf("got packet %v, want packet type %d", packet, msgRequestSuccess)
- }
-
- _, err = trS.readPacket()
- if err == nil {
- t.Errorf("readPacket 2 succeeded")
- } else if !reflect.DeepEqual(err, errMsg) {
- t.Errorf("got error %#v, want %#v", err, errMsg)
- }
-
- _, err = trS.readPacket()
- if err == nil {
- t.Errorf("readPacket 3 succeeded")
- }
-}
-
-func TestHandshakeRekeyDefault(t *testing.T) {
- clientConf := &ClientConfig{
- Config: Config{
- Ciphers: []string{"aes128-ctr"},
- },
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- trC, trS, err := handshakePair(clientConf, "addr", false)
- if err != nil {
- t.Fatalf("handshakePair: %v", err)
- }
- defer trC.Close()
- defer trS.Close()
-
- trC.writePacket([]byte{msgRequestSuccess, 0, 0})
- trC.Close()
-
- rgb := (1024 + trC.readBytesLeft) >> 30
- wgb := (1024 + trC.writeBytesLeft) >> 30
-
- if rgb != 64 {
- t.Errorf("got rekey after %dG read, want 64G", rgb)
- }
- if wgb != 64 {
- t.Errorf("got rekey after %dG write, want 64G", wgb)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex.go
deleted file mode 100644
index f91c2770e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex.go
+++ /dev/null
@@ -1,540 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/subtle"
- "errors"
- "io"
- "math/big"
-
- "golang.org/x/crypto/curve25519"
-)
-
-const (
- kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1"
- kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1"
- kexAlgoECDH256 = "ecdh-sha2-nistp256"
- kexAlgoECDH384 = "ecdh-sha2-nistp384"
- kexAlgoECDH521 = "ecdh-sha2-nistp521"
- kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org"
-)
-
-// kexResult captures the outcome of a key exchange.
-type kexResult struct {
- // Session hash. See also RFC 4253, section 8.
- H []byte
-
- // Shared secret. See also RFC 4253, section 8.
- K []byte
-
- // Host key as hashed into H.
- HostKey []byte
-
- // Signature of H.
- Signature []byte
-
- // A cryptographic hash function that matches the security
- // level of the key exchange algorithm. It is used for
- // calculating H, and for deriving keys from H and K.
- Hash crypto.Hash
-
- // The session ID, which is the first H computed. This is used
- // to derive key material inside the transport.
- SessionID []byte
-}
-
-// handshakeMagics contains data that is always included in the
-// session hash.
-type handshakeMagics struct {
- clientVersion, serverVersion []byte
- clientKexInit, serverKexInit []byte
-}
-
-func (m *handshakeMagics) write(w io.Writer) {
- writeString(w, m.clientVersion)
- writeString(w, m.serverVersion)
- writeString(w, m.clientKexInit)
- writeString(w, m.serverKexInit)
-}
-
-// kexAlgorithm abstracts different key exchange algorithms.
-type kexAlgorithm interface {
- // Server runs server-side key agreement, signing the result
- // with a hostkey.
- Server(p packetConn, rand io.Reader, magics *handshakeMagics, s Signer) (*kexResult, error)
-
- // Client runs the client-side key agreement. Caller is
- // responsible for verifying the host key signature.
- Client(p packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error)
-}
-
-// dhGroup is a multiplicative group suitable for implementing Diffie-Hellman key agreement.
-type dhGroup struct {
- g, p, pMinus1 *big.Int
-}
-
-func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) {
- if theirPublic.Cmp(bigOne) <= 0 || theirPublic.Cmp(group.pMinus1) >= 0 {
- return nil, errors.New("ssh: DH parameter out of bounds")
- }
- return new(big.Int).Exp(theirPublic, myPrivate, group.p), nil
-}
-
-func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) {
- hashFunc := crypto.SHA1
-
- var x *big.Int
- for {
- var err error
- if x, err = rand.Int(randSource, group.pMinus1); err != nil {
- return nil, err
- }
- if x.Sign() > 0 {
- break
- }
- }
-
- X := new(big.Int).Exp(group.g, x, group.p)
- kexDHInit := kexDHInitMsg{
- X: X,
- }
- if err := c.writePacket(Marshal(&kexDHInit)); err != nil {
- return nil, err
- }
-
- packet, err := c.readPacket()
- if err != nil {
- return nil, err
- }
-
- var kexDHReply kexDHReplyMsg
- if err = Unmarshal(packet, &kexDHReply); err != nil {
- return nil, err
- }
-
- kInt, err := group.diffieHellman(kexDHReply.Y, x)
- if err != nil {
- return nil, err
- }
-
- h := hashFunc.New()
- magics.write(h)
- writeString(h, kexDHReply.HostKey)
- writeInt(h, X)
- writeInt(h, kexDHReply.Y)
- K := make([]byte, intLength(kInt))
- marshalInt(K, kInt)
- h.Write(K)
-
- return &kexResult{
- H: h.Sum(nil),
- K: K,
- HostKey: kexDHReply.HostKey,
- Signature: kexDHReply.Signature,
- Hash: crypto.SHA1,
- }, nil
-}
-
-func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) {
- hashFunc := crypto.SHA1
- packet, err := c.readPacket()
- if err != nil {
- return
- }
- var kexDHInit kexDHInitMsg
- if err = Unmarshal(packet, &kexDHInit); err != nil {
- return
- }
-
- var y *big.Int
- for {
- if y, err = rand.Int(randSource, group.pMinus1); err != nil {
- return
- }
- if y.Sign() > 0 {
- break
- }
- }
-
- Y := new(big.Int).Exp(group.g, y, group.p)
- kInt, err := group.diffieHellman(kexDHInit.X, y)
- if err != nil {
- return nil, err
- }
-
- hostKeyBytes := priv.PublicKey().Marshal()
-
- h := hashFunc.New()
- magics.write(h)
- writeString(h, hostKeyBytes)
- writeInt(h, kexDHInit.X)
- writeInt(h, Y)
-
- K := make([]byte, intLength(kInt))
- marshalInt(K, kInt)
- h.Write(K)
-
- H := h.Sum(nil)
-
- // H is already a hash, but the hostkey signing will apply its
- // own key-specific hash algorithm.
- sig, err := signAndMarshal(priv, randSource, H)
- if err != nil {
- return nil, err
- }
-
- kexDHReply := kexDHReplyMsg{
- HostKey: hostKeyBytes,
- Y: Y,
- Signature: sig,
- }
- packet = Marshal(&kexDHReply)
-
- err = c.writePacket(packet)
- return &kexResult{
- H: H,
- K: K,
- HostKey: hostKeyBytes,
- Signature: sig,
- Hash: crypto.SHA1,
- }, nil
-}
-
-// ecdh performs Elliptic Curve Diffie-Hellman key exchange as
-// described in RFC 5656, section 4.
-type ecdh struct {
- curve elliptic.Curve
-}
-
-func (kex *ecdh) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) {
- ephKey, err := ecdsa.GenerateKey(kex.curve, rand)
- if err != nil {
- return nil, err
- }
-
- kexInit := kexECDHInitMsg{
- ClientPubKey: elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y),
- }
-
- serialized := Marshal(&kexInit)
- if err := c.writePacket(serialized); err != nil {
- return nil, err
- }
-
- packet, err := c.readPacket()
- if err != nil {
- return nil, err
- }
-
- var reply kexECDHReplyMsg
- if err = Unmarshal(packet, &reply); err != nil {
- return nil, err
- }
-
- x, y, err := unmarshalECKey(kex.curve, reply.EphemeralPubKey)
- if err != nil {
- return nil, err
- }
-
- // generate shared secret
- secret, _ := kex.curve.ScalarMult(x, y, ephKey.D.Bytes())
-
- h := ecHash(kex.curve).New()
- magics.write(h)
- writeString(h, reply.HostKey)
- writeString(h, kexInit.ClientPubKey)
- writeString(h, reply.EphemeralPubKey)
- K := make([]byte, intLength(secret))
- marshalInt(K, secret)
- h.Write(K)
-
- return &kexResult{
- H: h.Sum(nil),
- K: K,
- HostKey: reply.HostKey,
- Signature: reply.Signature,
- Hash: ecHash(kex.curve),
- }, nil
-}
-
-// unmarshalECKey parses and checks an EC key.
-func unmarshalECKey(curve elliptic.Curve, pubkey []byte) (x, y *big.Int, err error) {
- x, y = elliptic.Unmarshal(curve, pubkey)
- if x == nil {
- return nil, nil, errors.New("ssh: elliptic.Unmarshal failure")
- }
- if !validateECPublicKey(curve, x, y) {
- return nil, nil, errors.New("ssh: public key not on curve")
- }
- return x, y, nil
-}
-
-// validateECPublicKey checks that the point is a valid public key for
-// the given curve. See [SEC1], 3.2.2
-func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool {
- if x.Sign() == 0 && y.Sign() == 0 {
- return false
- }
-
- if x.Cmp(curve.Params().P) >= 0 {
- return false
- }
-
- if y.Cmp(curve.Params().P) >= 0 {
- return false
- }
-
- if !curve.IsOnCurve(x, y) {
- return false
- }
-
- // We don't check if N * PubKey == 0, since
- //
- // - the NIST curves have cofactor = 1, so this is implicit.
- // (We don't foresee an implementation that supports non NIST
- // curves)
- //
- // - for ephemeral keys, we don't need to worry about small
- // subgroup attacks.
- return true
-}
-
-func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) {
- packet, err := c.readPacket()
- if err != nil {
- return nil, err
- }
-
- var kexECDHInit kexECDHInitMsg
- if err = Unmarshal(packet, &kexECDHInit); err != nil {
- return nil, err
- }
-
- clientX, clientY, err := unmarshalECKey(kex.curve, kexECDHInit.ClientPubKey)
- if err != nil {
- return nil, err
- }
-
- // We could cache this key across multiple users/multiple
- // connection attempts, but the benefit is small. OpenSSH
- // generates a new key for each incoming connection.
- ephKey, err := ecdsa.GenerateKey(kex.curve, rand)
- if err != nil {
- return nil, err
- }
-
- hostKeyBytes := priv.PublicKey().Marshal()
-
- serializedEphKey := elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y)
-
- // generate shared secret
- secret, _ := kex.curve.ScalarMult(clientX, clientY, ephKey.D.Bytes())
-
- h := ecHash(kex.curve).New()
- magics.write(h)
- writeString(h, hostKeyBytes)
- writeString(h, kexECDHInit.ClientPubKey)
- writeString(h, serializedEphKey)
-
- K := make([]byte, intLength(secret))
- marshalInt(K, secret)
- h.Write(K)
-
- H := h.Sum(nil)
-
- // H is already a hash, but the hostkey signing will apply its
- // own key-specific hash algorithm.
- sig, err := signAndMarshal(priv, rand, H)
- if err != nil {
- return nil, err
- }
-
- reply := kexECDHReplyMsg{
- EphemeralPubKey: serializedEphKey,
- HostKey: hostKeyBytes,
- Signature: sig,
- }
-
- serialized := Marshal(&reply)
- if err := c.writePacket(serialized); err != nil {
- return nil, err
- }
-
- return &kexResult{
- H: H,
- K: K,
- HostKey: reply.HostKey,
- Signature: sig,
- Hash: ecHash(kex.curve),
- }, nil
-}
-
-var kexAlgoMap = map[string]kexAlgorithm{}
-
-func init() {
- // This is the group called diffie-hellman-group1-sha1 in RFC
- // 4253 and Oakley Group 2 in RFC 2409.
- p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF", 16)
- kexAlgoMap[kexAlgoDH1SHA1] = &dhGroup{
- g: new(big.Int).SetInt64(2),
- p: p,
- pMinus1: new(big.Int).Sub(p, bigOne),
- }
-
- // This is the group called diffie-hellman-group14-sha1 in RFC
- // 4253 and Oakley Group 14 in RFC 3526.
- p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16)
-
- kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{
- g: new(big.Int).SetInt64(2),
- p: p,
- pMinus1: new(big.Int).Sub(p, bigOne),
- }
-
- kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()}
- kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()}
- kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()}
- kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{}
-}
-
-// curve25519sha256 implements the curve25519-sha256@libssh.org key
-// agreement protocol, as described in
-// https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt
-type curve25519sha256 struct{}
-
-type curve25519KeyPair struct {
- priv [32]byte
- pub [32]byte
-}
-
-func (kp *curve25519KeyPair) generate(rand io.Reader) error {
- if _, err := io.ReadFull(rand, kp.priv[:]); err != nil {
- return err
- }
- curve25519.ScalarBaseMult(&kp.pub, &kp.priv)
- return nil
-}
-
-// curve25519Zeros is just an array of 32 zero bytes so that we have something
-// convenient to compare against in order to reject curve25519 points with the
-// wrong order.
-var curve25519Zeros [32]byte
-
-func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) {
- var kp curve25519KeyPair
- if err := kp.generate(rand); err != nil {
- return nil, err
- }
- if err := c.writePacket(Marshal(&kexECDHInitMsg{kp.pub[:]})); err != nil {
- return nil, err
- }
-
- packet, err := c.readPacket()
- if err != nil {
- return nil, err
- }
-
- var reply kexECDHReplyMsg
- if err = Unmarshal(packet, &reply); err != nil {
- return nil, err
- }
- if len(reply.EphemeralPubKey) != 32 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong length")
- }
-
- var servPub, secret [32]byte
- copy(servPub[:], reply.EphemeralPubKey)
- curve25519.ScalarMult(&secret, &kp.priv, &servPub)
- if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong order")
- }
-
- h := crypto.SHA256.New()
- magics.write(h)
- writeString(h, reply.HostKey)
- writeString(h, kp.pub[:])
- writeString(h, reply.EphemeralPubKey)
-
- kInt := new(big.Int).SetBytes(secret[:])
- K := make([]byte, intLength(kInt))
- marshalInt(K, kInt)
- h.Write(K)
-
- return &kexResult{
- H: h.Sum(nil),
- K: K,
- HostKey: reply.HostKey,
- Signature: reply.Signature,
- Hash: crypto.SHA256,
- }, nil
-}
-
-func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) {
- packet, err := c.readPacket()
- if err != nil {
- return
- }
- var kexInit kexECDHInitMsg
- if err = Unmarshal(packet, &kexInit); err != nil {
- return
- }
-
- if len(kexInit.ClientPubKey) != 32 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong length")
- }
-
- var kp curve25519KeyPair
- if err := kp.generate(rand); err != nil {
- return nil, err
- }
-
- var clientPub, secret [32]byte
- copy(clientPub[:], kexInit.ClientPubKey)
- curve25519.ScalarMult(&secret, &kp.priv, &clientPub)
- if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong order")
- }
-
- hostKeyBytes := priv.PublicKey().Marshal()
-
- h := crypto.SHA256.New()
- magics.write(h)
- writeString(h, hostKeyBytes)
- writeString(h, kexInit.ClientPubKey)
- writeString(h, kp.pub[:])
-
- kInt := new(big.Int).SetBytes(secret[:])
- K := make([]byte, intLength(kInt))
- marshalInt(K, kInt)
- h.Write(K)
-
- H := h.Sum(nil)
-
- sig, err := signAndMarshal(priv, rand, H)
- if err != nil {
- return nil, err
- }
-
- reply := kexECDHReplyMsg{
- EphemeralPubKey: kp.pub[:],
- HostKey: hostKeyBytes,
- Signature: sig,
- }
- if err := c.writePacket(Marshal(&reply)); err != nil {
- return nil, err
- }
- return &kexResult{
- H: H,
- K: K,
- HostKey: hostKeyBytes,
- Signature: sig,
- Hash: crypto.SHA256,
- }, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex_test.go
deleted file mode 100644
index 12ca0acd3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/kex_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-// Key exchange tests.
-
-import (
- "crypto/rand"
- "reflect"
- "testing"
-)
-
-func TestKexes(t *testing.T) {
- type kexResultErr struct {
- result *kexResult
- err error
- }
-
- for name, kex := range kexAlgoMap {
- a, b := memPipe()
-
- s := make(chan kexResultErr, 1)
- c := make(chan kexResultErr, 1)
- var magics handshakeMagics
- go func() {
- r, e := kex.Client(a, rand.Reader, &magics)
- a.Close()
- c <- kexResultErr{r, e}
- }()
- go func() {
- r, e := kex.Server(b, rand.Reader, &magics, testSigners["ecdsa"])
- b.Close()
- s <- kexResultErr{r, e}
- }()
-
- clientRes := <-c
- serverRes := <-s
- if clientRes.err != nil {
- t.Errorf("client: %v", clientRes.err)
- }
- if serverRes.err != nil {
- t.Errorf("server: %v", serverRes.err)
- }
- if !reflect.DeepEqual(clientRes.result, serverRes.result) {
- t.Errorf("kex %q: mismatch %#v, %#v", name, clientRes.result, serverRes.result)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys.go
deleted file mode 100644
index b682c1741..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys.go
+++ /dev/null
@@ -1,1031 +0,0 @@
-// Copyright 2012 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto"
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/md5"
- "crypto/rsa"
- "crypto/sha256"
- "crypto/x509"
- "encoding/asn1"
- "encoding/base64"
- "encoding/hex"
- "encoding/pem"
- "errors"
- "fmt"
- "io"
- "math/big"
- "strings"
-
- "golang.org/x/crypto/ed25519"
-)
-
-// These constants represent the algorithm names for key types supported by this
-// package.
-const (
- KeyAlgoRSA = "ssh-rsa"
- KeyAlgoDSA = "ssh-dss"
- KeyAlgoECDSA256 = "ecdsa-sha2-nistp256"
- KeyAlgoECDSA384 = "ecdsa-sha2-nistp384"
- KeyAlgoECDSA521 = "ecdsa-sha2-nistp521"
- KeyAlgoED25519 = "ssh-ed25519"
-)
-
-// parsePubKey parses a public key of the given algorithm.
-// Use ParsePublicKey for keys with prepended algorithm.
-func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) {
- switch algo {
- case KeyAlgoRSA:
- return parseRSA(in)
- case KeyAlgoDSA:
- return parseDSA(in)
- case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521:
- return parseECDSA(in)
- case KeyAlgoED25519:
- return parseED25519(in)
- case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01:
- cert, err := parseCert(in, certToPrivAlgo(algo))
- if err != nil {
- return nil, nil, err
- }
- return cert, nil, nil
- }
- return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", algo)
-}
-
-// parseAuthorizedKey parses a public key in OpenSSH authorized_keys format
-// (see sshd(8) manual page) once the options and key type fields have been
-// removed.
-func parseAuthorizedKey(in []byte) (out PublicKey, comment string, err error) {
- in = bytes.TrimSpace(in)
-
- i := bytes.IndexAny(in, " \t")
- if i == -1 {
- i = len(in)
- }
- base64Key := in[:i]
-
- key := make([]byte, base64.StdEncoding.DecodedLen(len(base64Key)))
- n, err := base64.StdEncoding.Decode(key, base64Key)
- if err != nil {
- return nil, "", err
- }
- key = key[:n]
- out, err = ParsePublicKey(key)
- if err != nil {
- return nil, "", err
- }
- comment = string(bytes.TrimSpace(in[i:]))
- return out, comment, nil
-}
-
-// ParseKnownHosts parses an entry in the format of the known_hosts file.
-//
-// The known_hosts format is documented in the sshd(8) manual page. This
-// function will parse a single entry from in. On successful return, marker
-// will contain the optional marker value (i.e. "cert-authority" or "revoked")
-// or else be empty, hosts will contain the hosts that this entry matches,
-// pubKey will contain the public key and comment will contain any trailing
-// comment at the end of the line. See the sshd(8) manual page for the various
-// forms that a host string can take.
-//
-// The unparsed remainder of the input will be returned in rest. This function
-// can be called repeatedly to parse multiple entries.
-//
-// If no entries were found in the input then err will be io.EOF. Otherwise a
-// non-nil err value indicates a parse error.
-func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey, comment string, rest []byte, err error) {
- for len(in) > 0 {
- end := bytes.IndexByte(in, '\n')
- if end != -1 {
- rest = in[end+1:]
- in = in[:end]
- } else {
- rest = nil
- }
-
- end = bytes.IndexByte(in, '\r')
- if end != -1 {
- in = in[:end]
- }
-
- in = bytes.TrimSpace(in)
- if len(in) == 0 || in[0] == '#' {
- in = rest
- continue
- }
-
- i := bytes.IndexAny(in, " \t")
- if i == -1 {
- in = rest
- continue
- }
-
- // Strip out the beginning of the known_host key.
- // This is either an optional marker or a (set of) hostname(s).
- keyFields := bytes.Fields(in)
- if len(keyFields) < 3 || len(keyFields) > 5 {
- return "", nil, nil, "", nil, errors.New("ssh: invalid entry in known_hosts data")
- }
-
- // keyFields[0] is either "@cert-authority", "@revoked" or a comma separated
- // list of hosts
- marker := ""
- if keyFields[0][0] == '@' {
- marker = string(keyFields[0][1:])
- keyFields = keyFields[1:]
- }
-
- hosts := string(keyFields[0])
- // keyFields[1] contains the key type (e.g. “ssh-rsaâ€).
- // However, that information is duplicated inside the
- // base64-encoded key and so is ignored here.
-
- key := bytes.Join(keyFields[2:], []byte(" "))
- if pubKey, comment, err = parseAuthorizedKey(key); err != nil {
- return "", nil, nil, "", nil, err
- }
-
- return marker, strings.Split(hosts, ","), pubKey, comment, rest, nil
- }
-
- return "", nil, nil, "", nil, io.EOF
-}
-
-// ParseAuthorizedKeys parses a public key from an authorized_keys
-// file used in OpenSSH according to the sshd(8) manual page.
-func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) {
- for len(in) > 0 {
- end := bytes.IndexByte(in, '\n')
- if end != -1 {
- rest = in[end+1:]
- in = in[:end]
- } else {
- rest = nil
- }
-
- end = bytes.IndexByte(in, '\r')
- if end != -1 {
- in = in[:end]
- }
-
- in = bytes.TrimSpace(in)
- if len(in) == 0 || in[0] == '#' {
- in = rest
- continue
- }
-
- i := bytes.IndexAny(in, " \t")
- if i == -1 {
- in = rest
- continue
- }
-
- if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
- return out, comment, options, rest, nil
- }
-
- // No key type recognised. Maybe there's an options field at
- // the beginning.
- var b byte
- inQuote := false
- var candidateOptions []string
- optionStart := 0
- for i, b = range in {
- isEnd := !inQuote && (b == ' ' || b == '\t')
- if (b == ',' && !inQuote) || isEnd {
- if i-optionStart > 0 {
- candidateOptions = append(candidateOptions, string(in[optionStart:i]))
- }
- optionStart = i + 1
- }
- if isEnd {
- break
- }
- if b == '"' && (i == 0 || (i > 0 && in[i-1] != '\\')) {
- inQuote = !inQuote
- }
- }
- for i < len(in) && (in[i] == ' ' || in[i] == '\t') {
- i++
- }
- if i == len(in) {
- // Invalid line: unmatched quote
- in = rest
- continue
- }
-
- in = in[i:]
- i = bytes.IndexAny(in, " \t")
- if i == -1 {
- in = rest
- continue
- }
-
- if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
- options = candidateOptions
- return out, comment, options, rest, nil
- }
-
- in = rest
- continue
- }
-
- return nil, "", nil, nil, errors.New("ssh: no key found")
-}
-
-// ParsePublicKey parses an SSH public key formatted for use in
-// the SSH wire protocol according to RFC 4253, section 6.6.
-func ParsePublicKey(in []byte) (out PublicKey, err error) {
- algo, in, ok := parseString(in)
- if !ok {
- return nil, errShortRead
- }
- var rest []byte
- out, rest, err = parsePubKey(in, string(algo))
- if len(rest) > 0 {
- return nil, errors.New("ssh: trailing junk in public key")
- }
-
- return out, err
-}
-
-// MarshalAuthorizedKey serializes key for inclusion in an OpenSSH
-// authorized_keys file. The return value ends with newline.
-func MarshalAuthorizedKey(key PublicKey) []byte {
- b := &bytes.Buffer{}
- b.WriteString(key.Type())
- b.WriteByte(' ')
- e := base64.NewEncoder(base64.StdEncoding, b)
- e.Write(key.Marshal())
- e.Close()
- b.WriteByte('\n')
- return b.Bytes()
-}
-
-// PublicKey is an abstraction of different types of public keys.
-type PublicKey interface {
- // Type returns the key's type, e.g. "ssh-rsa".
- Type() string
-
- // Marshal returns the serialized key data in SSH wire format,
- // with the name prefix.
- Marshal() []byte
-
- // Verify that sig is a signature on the given data using this
- // key. This function will hash the data appropriately first.
- Verify(data []byte, sig *Signature) error
-}
-
-// CryptoPublicKey, if implemented by a PublicKey,
-// returns the underlying crypto.PublicKey form of the key.
-type CryptoPublicKey interface {
- CryptoPublicKey() crypto.PublicKey
-}
-
-// A Signer can create signatures that verify against a public key.
-type Signer interface {
- // PublicKey returns an associated PublicKey instance.
- PublicKey() PublicKey
-
- // Sign returns raw signature for the given data. This method
- // will apply the hash specified for the keytype to the data.
- Sign(rand io.Reader, data []byte) (*Signature, error)
-}
-
-type rsaPublicKey rsa.PublicKey
-
-func (r *rsaPublicKey) Type() string {
- return "ssh-rsa"
-}
-
-// parseRSA parses an RSA key according to RFC 4253, section 6.6.
-func parseRSA(in []byte) (out PublicKey, rest []byte, err error) {
- var w struct {
- E *big.Int
- N *big.Int
- Rest []byte `ssh:"rest"`
- }
- if err := Unmarshal(in, &w); err != nil {
- return nil, nil, err
- }
-
- if w.E.BitLen() > 24 {
- return nil, nil, errors.New("ssh: exponent too large")
- }
- e := w.E.Int64()
- if e < 3 || e&1 == 0 {
- return nil, nil, errors.New("ssh: incorrect exponent")
- }
-
- var key rsa.PublicKey
- key.E = int(e)
- key.N = w.N
- return (*rsaPublicKey)(&key), w.Rest, nil
-}
-
-func (r *rsaPublicKey) Marshal() []byte {
- e := new(big.Int).SetInt64(int64(r.E))
- // RSA publickey struct layout should match the struct used by
- // parseRSACert in the x/crypto/ssh/agent package.
- wirekey := struct {
- Name string
- E *big.Int
- N *big.Int
- }{
- KeyAlgoRSA,
- e,
- r.N,
- }
- return Marshal(&wirekey)
-}
-
-func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error {
- if sig.Format != r.Type() {
- return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type())
- }
- h := crypto.SHA1.New()
- h.Write(data)
- digest := h.Sum(nil)
- return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), crypto.SHA1, digest, sig.Blob)
-}
-
-func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey {
- return (*rsa.PublicKey)(r)
-}
-
-type dsaPublicKey dsa.PublicKey
-
-func (r *dsaPublicKey) Type() string {
- return "ssh-dss"
-}
-
-func checkDSAParams(param *dsa.Parameters) error {
- // SSH specifies FIPS 186-2, which only provided a single size
- // (1024 bits) DSA key. FIPS 186-3 allows for larger key
- // sizes, which would confuse SSH.
- if l := param.P.BitLen(); l != 1024 {
- return fmt.Errorf("ssh: unsupported DSA key size %d", l)
- }
-
- return nil
-}
-
-// parseDSA parses an DSA key according to RFC 4253, section 6.6.
-func parseDSA(in []byte) (out PublicKey, rest []byte, err error) {
- var w struct {
- P, Q, G, Y *big.Int
- Rest []byte `ssh:"rest"`
- }
- if err := Unmarshal(in, &w); err != nil {
- return nil, nil, err
- }
-
- param := dsa.Parameters{
- P: w.P,
- Q: w.Q,
- G: w.G,
- }
- if err := checkDSAParams(&param); err != nil {
- return nil, nil, err
- }
-
- key := &dsaPublicKey{
- Parameters: param,
- Y: w.Y,
- }
- return key, w.Rest, nil
-}
-
-func (k *dsaPublicKey) Marshal() []byte {
- // DSA publickey struct layout should match the struct used by
- // parseDSACert in the x/crypto/ssh/agent package.
- w := struct {
- Name string
- P, Q, G, Y *big.Int
- }{
- k.Type(),
- k.P,
- k.Q,
- k.G,
- k.Y,
- }
-
- return Marshal(&w)
-}
-
-func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error {
- if sig.Format != k.Type() {
- return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type())
- }
- h := crypto.SHA1.New()
- h.Write(data)
- digest := h.Sum(nil)
-
- // Per RFC 4253, section 6.6,
- // The value for 'dss_signature_blob' is encoded as a string containing
- // r, followed by s (which are 160-bit integers, without lengths or
- // padding, unsigned, and in network byte order).
- // For DSS purposes, sig.Blob should be exactly 40 bytes in length.
- if len(sig.Blob) != 40 {
- return errors.New("ssh: DSA signature parse error")
- }
- r := new(big.Int).SetBytes(sig.Blob[:20])
- s := new(big.Int).SetBytes(sig.Blob[20:])
- if dsa.Verify((*dsa.PublicKey)(k), digest, r, s) {
- return nil
- }
- return errors.New("ssh: signature did not verify")
-}
-
-func (k *dsaPublicKey) CryptoPublicKey() crypto.PublicKey {
- return (*dsa.PublicKey)(k)
-}
-
-type dsaPrivateKey struct {
- *dsa.PrivateKey
-}
-
-func (k *dsaPrivateKey) PublicKey() PublicKey {
- return (*dsaPublicKey)(&k.PrivateKey.PublicKey)
-}
-
-func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) {
- h := crypto.SHA1.New()
- h.Write(data)
- digest := h.Sum(nil)
- r, s, err := dsa.Sign(rand, k.PrivateKey, digest)
- if err != nil {
- return nil, err
- }
-
- sig := make([]byte, 40)
- rb := r.Bytes()
- sb := s.Bytes()
-
- copy(sig[20-len(rb):20], rb)
- copy(sig[40-len(sb):], sb)
-
- return &Signature{
- Format: k.PublicKey().Type(),
- Blob: sig,
- }, nil
-}
-
-type ecdsaPublicKey ecdsa.PublicKey
-
-func (key *ecdsaPublicKey) Type() string {
- return "ecdsa-sha2-" + key.nistID()
-}
-
-func (key *ecdsaPublicKey) nistID() string {
- switch key.Params().BitSize {
- case 256:
- return "nistp256"
- case 384:
- return "nistp384"
- case 521:
- return "nistp521"
- }
- panic("ssh: unsupported ecdsa key size")
-}
-
-type ed25519PublicKey ed25519.PublicKey
-
-func (key ed25519PublicKey) Type() string {
- return KeyAlgoED25519
-}
-
-func parseED25519(in []byte) (out PublicKey, rest []byte, err error) {
- var w struct {
- KeyBytes []byte
- Rest []byte `ssh:"rest"`
- }
-
- if err := Unmarshal(in, &w); err != nil {
- return nil, nil, err
- }
-
- key := ed25519.PublicKey(w.KeyBytes)
-
- return (ed25519PublicKey)(key), w.Rest, nil
-}
-
-func (key ed25519PublicKey) Marshal() []byte {
- w := struct {
- Name string
- KeyBytes []byte
- }{
- KeyAlgoED25519,
- []byte(key),
- }
- return Marshal(&w)
-}
-
-func (key ed25519PublicKey) Verify(b []byte, sig *Signature) error {
- if sig.Format != key.Type() {
- return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type())
- }
-
- edKey := (ed25519.PublicKey)(key)
- if ok := ed25519.Verify(edKey, b, sig.Blob); !ok {
- return errors.New("ssh: signature did not verify")
- }
-
- return nil
-}
-
-func (k ed25519PublicKey) CryptoPublicKey() crypto.PublicKey {
- return ed25519.PublicKey(k)
-}
-
-func supportedEllipticCurve(curve elliptic.Curve) bool {
- return curve == elliptic.P256() || curve == elliptic.P384() || curve == elliptic.P521()
-}
-
-// ecHash returns the hash to match the given elliptic curve, see RFC
-// 5656, section 6.2.1
-func ecHash(curve elliptic.Curve) crypto.Hash {
- bitSize := curve.Params().BitSize
- switch {
- case bitSize <= 256:
- return crypto.SHA256
- case bitSize <= 384:
- return crypto.SHA384
- }
- return crypto.SHA512
-}
-
-// parseECDSA parses an ECDSA key according to RFC 5656, section 3.1.
-func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) {
- var w struct {
- Curve string
- KeyBytes []byte
- Rest []byte `ssh:"rest"`
- }
-
- if err := Unmarshal(in, &w); err != nil {
- return nil, nil, err
- }
-
- key := new(ecdsa.PublicKey)
-
- switch w.Curve {
- case "nistp256":
- key.Curve = elliptic.P256()
- case "nistp384":
- key.Curve = elliptic.P384()
- case "nistp521":
- key.Curve = elliptic.P521()
- default:
- return nil, nil, errors.New("ssh: unsupported curve")
- }
-
- key.X, key.Y = elliptic.Unmarshal(key.Curve, w.KeyBytes)
- if key.X == nil || key.Y == nil {
- return nil, nil, errors.New("ssh: invalid curve point")
- }
- return (*ecdsaPublicKey)(key), w.Rest, nil
-}
-
-func (key *ecdsaPublicKey) Marshal() []byte {
- // See RFC 5656, section 3.1.
- keyBytes := elliptic.Marshal(key.Curve, key.X, key.Y)
- // ECDSA publickey struct layout should match the struct used by
- // parseECDSACert in the x/crypto/ssh/agent package.
- w := struct {
- Name string
- ID string
- Key []byte
- }{
- key.Type(),
- key.nistID(),
- keyBytes,
- }
-
- return Marshal(&w)
-}
-
-func (key *ecdsaPublicKey) Verify(data []byte, sig *Signature) error {
- if sig.Format != key.Type() {
- return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type())
- }
-
- h := ecHash(key.Curve).New()
- h.Write(data)
- digest := h.Sum(nil)
-
- // Per RFC 5656, section 3.1.2,
- // The ecdsa_signature_blob value has the following specific encoding:
- // mpint r
- // mpint s
- var ecSig struct {
- R *big.Int
- S *big.Int
- }
-
- if err := Unmarshal(sig.Blob, &ecSig); err != nil {
- return err
- }
-
- if ecdsa.Verify((*ecdsa.PublicKey)(key), digest, ecSig.R, ecSig.S) {
- return nil
- }
- return errors.New("ssh: signature did not verify")
-}
-
-func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey {
- return (*ecdsa.PublicKey)(k)
-}
-
-// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey,
-// *ecdsa.PrivateKey or any other crypto.Signer and returns a
-// corresponding Signer instance. ECDSA keys must use P-256, P-384 or
-// P-521. DSA keys must use parameter size L1024N160.
-func NewSignerFromKey(key interface{}) (Signer, error) {
- switch key := key.(type) {
- case crypto.Signer:
- return NewSignerFromSigner(key)
- case *dsa.PrivateKey:
- return newDSAPrivateKey(key)
- default:
- return nil, fmt.Errorf("ssh: unsupported key type %T", key)
- }
-}
-
-func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) {
- if err := checkDSAParams(&key.PublicKey.Parameters); err != nil {
- return nil, err
- }
-
- return &dsaPrivateKey{key}, nil
-}
-
-type wrappedSigner struct {
- signer crypto.Signer
- pubKey PublicKey
-}
-
-// NewSignerFromSigner takes any crypto.Signer implementation and
-// returns a corresponding Signer interface. This can be used, for
-// example, with keys kept in hardware modules.
-func NewSignerFromSigner(signer crypto.Signer) (Signer, error) {
- pubKey, err := NewPublicKey(signer.Public())
- if err != nil {
- return nil, err
- }
-
- return &wrappedSigner{signer, pubKey}, nil
-}
-
-func (s *wrappedSigner) PublicKey() PublicKey {
- return s.pubKey
-}
-
-func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) {
- var hashFunc crypto.Hash
-
- switch key := s.pubKey.(type) {
- case *rsaPublicKey, *dsaPublicKey:
- hashFunc = crypto.SHA1
- case *ecdsaPublicKey:
- hashFunc = ecHash(key.Curve)
- case ed25519PublicKey:
- default:
- return nil, fmt.Errorf("ssh: unsupported key type %T", key)
- }
-
- var digest []byte
- if hashFunc != 0 {
- h := hashFunc.New()
- h.Write(data)
- digest = h.Sum(nil)
- } else {
- digest = data
- }
-
- signature, err := s.signer.Sign(rand, digest, hashFunc)
- if err != nil {
- return nil, err
- }
-
- // crypto.Signer.Sign is expected to return an ASN.1-encoded signature
- // for ECDSA and DSA, but that's not the encoding expected by SSH, so
- // re-encode.
- switch s.pubKey.(type) {
- case *ecdsaPublicKey, *dsaPublicKey:
- type asn1Signature struct {
- R, S *big.Int
- }
- asn1Sig := new(asn1Signature)
- _, err := asn1.Unmarshal(signature, asn1Sig)
- if err != nil {
- return nil, err
- }
-
- switch s.pubKey.(type) {
- case *ecdsaPublicKey:
- signature = Marshal(asn1Sig)
-
- case *dsaPublicKey:
- signature = make([]byte, 40)
- r := asn1Sig.R.Bytes()
- s := asn1Sig.S.Bytes()
- copy(signature[20-len(r):20], r)
- copy(signature[40-len(s):40], s)
- }
- }
-
- return &Signature{
- Format: s.pubKey.Type(),
- Blob: signature,
- }, nil
-}
-
-// NewPublicKey takes an *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey,
-// or ed25519.PublicKey returns a corresponding PublicKey instance.
-// ECDSA keys must use P-256, P-384 or P-521.
-func NewPublicKey(key interface{}) (PublicKey, error) {
- switch key := key.(type) {
- case *rsa.PublicKey:
- return (*rsaPublicKey)(key), nil
- case *ecdsa.PublicKey:
- if !supportedEllipticCurve(key.Curve) {
- return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported.")
- }
- return (*ecdsaPublicKey)(key), nil
- case *dsa.PublicKey:
- return (*dsaPublicKey)(key), nil
- case ed25519.PublicKey:
- return (ed25519PublicKey)(key), nil
- default:
- return nil, fmt.Errorf("ssh: unsupported key type %T", key)
- }
-}
-
-// ParsePrivateKey returns a Signer from a PEM encoded private key. It supports
-// the same keys as ParseRawPrivateKey.
-func ParsePrivateKey(pemBytes []byte) (Signer, error) {
- key, err := ParseRawPrivateKey(pemBytes)
- if err != nil {
- return nil, err
- }
-
- return NewSignerFromKey(key)
-}
-
-// ParsePrivateKeyWithPassphrase returns a Signer from a PEM encoded private
-// key and passphrase. It supports the same keys as
-// ParseRawPrivateKeyWithPassphrase.
-func ParsePrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (Signer, error) {
- key, err := ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase)
- if err != nil {
- return nil, err
- }
-
- return NewSignerFromKey(key)
-}
-
-// encryptedBlock tells whether a private key is
-// encrypted by examining its Proc-Type header
-// for a mention of ENCRYPTED
-// according to RFC 1421 Section 4.6.1.1.
-func encryptedBlock(block *pem.Block) bool {
- return strings.Contains(block.Headers["Proc-Type"], "ENCRYPTED")
-}
-
-// ParseRawPrivateKey returns a private key from a PEM encoded private key. It
-// supports RSA (PKCS#1), DSA (OpenSSL), and ECDSA private keys.
-func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) {
- block, _ := pem.Decode(pemBytes)
- if block == nil {
- return nil, errors.New("ssh: no key found")
- }
-
- if encryptedBlock(block) {
- return nil, errors.New("ssh: cannot decode encrypted private keys")
- }
-
- switch block.Type {
- case "RSA PRIVATE KEY":
- return x509.ParsePKCS1PrivateKey(block.Bytes)
- case "EC PRIVATE KEY":
- return x509.ParseECPrivateKey(block.Bytes)
- case "DSA PRIVATE KEY":
- return ParseDSAPrivateKey(block.Bytes)
- case "OPENSSH PRIVATE KEY":
- return parseOpenSSHPrivateKey(block.Bytes)
- default:
- return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type)
- }
-}
-
-// ParseRawPrivateKeyWithPassphrase returns a private key decrypted with
-// passphrase from a PEM encoded private key. If wrong passphrase, return
-// x509.IncorrectPasswordError.
-func ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (interface{}, error) {
- block, _ := pem.Decode(pemBytes)
- if block == nil {
- return nil, errors.New("ssh: no key found")
- }
- buf := block.Bytes
-
- if encryptedBlock(block) {
- if x509.IsEncryptedPEMBlock(block) {
- var err error
- buf, err = x509.DecryptPEMBlock(block, passPhrase)
- if err != nil {
- if err == x509.IncorrectPasswordError {
- return nil, err
- }
- return nil, fmt.Errorf("ssh: cannot decode encrypted private keys: %v", err)
- }
- }
- }
-
- switch block.Type {
- case "RSA PRIVATE KEY":
- return x509.ParsePKCS1PrivateKey(buf)
- case "EC PRIVATE KEY":
- return x509.ParseECPrivateKey(buf)
- case "DSA PRIVATE KEY":
- return ParseDSAPrivateKey(buf)
- case "OPENSSH PRIVATE KEY":
- return parseOpenSSHPrivateKey(buf)
- default:
- return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type)
- }
-}
-
-// ParseDSAPrivateKey returns a DSA private key from its ASN.1 DER encoding, as
-// specified by the OpenSSL DSA man page.
-func ParseDSAPrivateKey(der []byte) (*dsa.PrivateKey, error) {
- var k struct {
- Version int
- P *big.Int
- Q *big.Int
- G *big.Int
- Pub *big.Int
- Priv *big.Int
- }
- rest, err := asn1.Unmarshal(der, &k)
- if err != nil {
- return nil, errors.New("ssh: failed to parse DSA key: " + err.Error())
- }
- if len(rest) > 0 {
- return nil, errors.New("ssh: garbage after DSA key")
- }
-
- return &dsa.PrivateKey{
- PublicKey: dsa.PublicKey{
- Parameters: dsa.Parameters{
- P: k.P,
- Q: k.Q,
- G: k.G,
- },
- Y: k.Pub,
- },
- X: k.Priv,
- }, nil
-}
-
-// Implemented based on the documentation at
-// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
-func parseOpenSSHPrivateKey(key []byte) (crypto.PrivateKey, error) {
- magic := append([]byte("openssh-key-v1"), 0)
- if !bytes.Equal(magic, key[0:len(magic)]) {
- return nil, errors.New("ssh: invalid openssh private key format")
- }
- remaining := key[len(magic):]
-
- var w struct {
- CipherName string
- KdfName string
- KdfOpts string
- NumKeys uint32
- PubKey []byte
- PrivKeyBlock []byte
- }
-
- if err := Unmarshal(remaining, &w); err != nil {
- return nil, err
- }
-
- if w.KdfName != "none" || w.CipherName != "none" {
- return nil, errors.New("ssh: cannot decode encrypted private keys")
- }
-
- pk1 := struct {
- Check1 uint32
- Check2 uint32
- Keytype string
- Rest []byte `ssh:"rest"`
- }{}
-
- if err := Unmarshal(w.PrivKeyBlock, &pk1); err != nil {
- return nil, err
- }
-
- if pk1.Check1 != pk1.Check2 {
- return nil, errors.New("ssh: checkint mismatch")
- }
-
- // we only handle ed25519 and rsa keys currently
- switch pk1.Keytype {
- case KeyAlgoRSA:
- // https://github.com/openssh/openssh-portable/blob/master/sshkey.c#L2760-L2773
- key := struct {
- N *big.Int
- E *big.Int
- D *big.Int
- Iqmp *big.Int
- P *big.Int
- Q *big.Int
- Comment string
- Pad []byte `ssh:"rest"`
- }{}
-
- if err := Unmarshal(pk1.Rest, &key); err != nil {
- return nil, err
- }
-
- for i, b := range key.Pad {
- if int(b) != i+1 {
- return nil, errors.New("ssh: padding not as expected")
- }
- }
-
- pk := &rsa.PrivateKey{
- PublicKey: rsa.PublicKey{
- N: key.N,
- E: int(key.E.Int64()),
- },
- D: key.D,
- Primes: []*big.Int{key.P, key.Q},
- }
-
- if err := pk.Validate(); err != nil {
- return nil, err
- }
-
- pk.Precompute()
-
- return pk, nil
- case KeyAlgoED25519:
- key := struct {
- Pub []byte
- Priv []byte
- Comment string
- Pad []byte `ssh:"rest"`
- }{}
-
- if err := Unmarshal(pk1.Rest, &key); err != nil {
- return nil, err
- }
-
- if len(key.Priv) != ed25519.PrivateKeySize {
- return nil, errors.New("ssh: private key unexpected length")
- }
-
- for i, b := range key.Pad {
- if int(b) != i+1 {
- return nil, errors.New("ssh: padding not as expected")
- }
- }
-
- pk := ed25519.PrivateKey(make([]byte, ed25519.PrivateKeySize))
- copy(pk, key.Priv)
- return &pk, nil
- default:
- return nil, errors.New("ssh: unhandled key type")
- }
-}
-
-// FingerprintLegacyMD5 returns the user presentation of the key's
-// fingerprint as described by RFC 4716 section 4.
-func FingerprintLegacyMD5(pubKey PublicKey) string {
- md5sum := md5.Sum(pubKey.Marshal())
- hexarray := make([]string, len(md5sum))
- for i, c := range md5sum {
- hexarray[i] = hex.EncodeToString([]byte{c})
- }
- return strings.Join(hexarray, ":")
-}
-
-// FingerprintSHA256 returns the user presentation of the key's
-// fingerprint as unpadded base64 encoded sha256 hash.
-// This format was introduced from OpenSSH 6.8.
-// https://www.openssh.com/txt/release-6.8
-// https://tools.ietf.org/html/rfc4648#section-3.2 (unpadded base64 encoding)
-func FingerprintSHA256(pubKey PublicKey) string {
- sha256sum := sha256.Sum256(pubKey.Marshal())
- hash := base64.RawStdEncoding.EncodeToString(sha256sum[:])
- return "SHA256:" + hash
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys_test.go
deleted file mode 100644
index 20ab954e2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/keys_test.go
+++ /dev/null
@@ -1,500 +0,0 @@
-// Copyright 2014 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto/dsa"
- "crypto/ecdsa"
- "crypto/elliptic"
- "crypto/rand"
- "crypto/rsa"
- "crypto/x509"
- "encoding/base64"
- "fmt"
- "reflect"
- "strings"
- "testing"
-
- "golang.org/x/crypto/ed25519"
- "golang.org/x/crypto/ssh/testdata"
-)
-
-func rawKey(pub PublicKey) interface{} {
- switch k := pub.(type) {
- case *rsaPublicKey:
- return (*rsa.PublicKey)(k)
- case *dsaPublicKey:
- return (*dsa.PublicKey)(k)
- case *ecdsaPublicKey:
- return (*ecdsa.PublicKey)(k)
- case ed25519PublicKey:
- return (ed25519.PublicKey)(k)
- case *Certificate:
- return k
- }
- panic("unknown key type")
-}
-
-func TestKeyMarshalParse(t *testing.T) {
- for _, priv := range testSigners {
- pub := priv.PublicKey()
- roundtrip, err := ParsePublicKey(pub.Marshal())
- if err != nil {
- t.Errorf("ParsePublicKey(%T): %v", pub, err)
- }
-
- k1 := rawKey(pub)
- k2 := rawKey(roundtrip)
-
- if !reflect.DeepEqual(k1, k2) {
- t.Errorf("got %#v in roundtrip, want %#v", k2, k1)
- }
- }
-}
-
-func TestUnsupportedCurves(t *testing.T) {
- raw, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
- if err != nil {
- t.Fatalf("GenerateKey: %v", err)
- }
-
- if _, err = NewSignerFromKey(raw); err == nil || !strings.Contains(err.Error(), "only P-256") {
- t.Fatalf("NewPrivateKey should not succeed with P-224, got: %v", err)
- }
-
- if _, err = NewPublicKey(&raw.PublicKey); err == nil || !strings.Contains(err.Error(), "only P-256") {
- t.Fatalf("NewPublicKey should not succeed with P-224, got: %v", err)
- }
-}
-
-func TestNewPublicKey(t *testing.T) {
- for _, k := range testSigners {
- raw := rawKey(k.PublicKey())
- // Skip certificates, as NewPublicKey does not support them.
- if _, ok := raw.(*Certificate); ok {
- continue
- }
- pub, err := NewPublicKey(raw)
- if err != nil {
- t.Errorf("NewPublicKey(%#v): %v", raw, err)
- }
- if !reflect.DeepEqual(k.PublicKey(), pub) {
- t.Errorf("NewPublicKey(%#v) = %#v, want %#v", raw, pub, k.PublicKey())
- }
- }
-}
-
-func TestKeySignVerify(t *testing.T) {
- for _, priv := range testSigners {
- pub := priv.PublicKey()
-
- data := []byte("sign me")
- sig, err := priv.Sign(rand.Reader, data)
- if err != nil {
- t.Fatalf("Sign(%T): %v", priv, err)
- }
-
- if err := pub.Verify(data, sig); err != nil {
- t.Errorf("publicKey.Verify(%T): %v", priv, err)
- }
- sig.Blob[5]++
- if err := pub.Verify(data, sig); err == nil {
- t.Errorf("publicKey.Verify on broken sig did not fail")
- }
- }
-}
-
-func TestParseRSAPrivateKey(t *testing.T) {
- key := testPrivateKeys["rsa"]
-
- rsa, ok := key.(*rsa.PrivateKey)
- if !ok {
- t.Fatalf("got %T, want *rsa.PrivateKey", rsa)
- }
-
- if err := rsa.Validate(); err != nil {
- t.Errorf("Validate: %v", err)
- }
-}
-
-func TestParseECPrivateKey(t *testing.T) {
- key := testPrivateKeys["ecdsa"]
-
- ecKey, ok := key.(*ecdsa.PrivateKey)
- if !ok {
- t.Fatalf("got %T, want *ecdsa.PrivateKey", ecKey)
- }
-
- if !validateECPublicKey(ecKey.Curve, ecKey.X, ecKey.Y) {
- t.Fatalf("public key does not validate.")
- }
-}
-
-// See Issue https://github.com/golang/go/issues/6650.
-func TestParseEncryptedPrivateKeysFails(t *testing.T) {
- const wantSubstring = "encrypted"
- for i, tt := range testdata.PEMEncryptedKeys {
- _, err := ParsePrivateKey(tt.PEMBytes)
- if err == nil {
- t.Errorf("#%d key %s: ParsePrivateKey successfully parsed, expected an error", i, tt.Name)
- continue
- }
-
- if !strings.Contains(err.Error(), wantSubstring) {
- t.Errorf("#%d key %s: got error %q, want substring %q", i, tt.Name, err, wantSubstring)
- }
- }
-}
-
-// Parse encrypted private keys with passphrase
-func TestParseEncryptedPrivateKeysWithPassphrase(t *testing.T) {
- data := []byte("sign me")
- for _, tt := range testdata.PEMEncryptedKeys {
- s, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte(tt.EncryptionKey))
- if err != nil {
- t.Fatalf("ParsePrivateKeyWithPassphrase returned error: %s", err)
- continue
- }
- sig, err := s.Sign(rand.Reader, data)
- if err != nil {
- t.Fatalf("dsa.Sign: %v", err)
- }
- if err := s.PublicKey().Verify(data, sig); err != nil {
- t.Errorf("Verify failed: %v", err)
- }
- }
-
- tt := testdata.PEMEncryptedKeys[0]
- _, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte("incorrect"))
- if err != x509.IncorrectPasswordError {
- t.Fatalf("got %v want IncorrectPasswordError", err)
- }
-}
-
-func TestParseDSA(t *testing.T) {
- // We actually exercise the ParsePrivateKey codepath here, as opposed to
- // using the ParseRawPrivateKey+NewSignerFromKey path that testdata_test.go
- // uses.
- s, err := ParsePrivateKey(testdata.PEMBytes["dsa"])
- if err != nil {
- t.Fatalf("ParsePrivateKey returned error: %s", err)
- }
-
- data := []byte("sign me")
- sig, err := s.Sign(rand.Reader, data)
- if err != nil {
- t.Fatalf("dsa.Sign: %v", err)
- }
-
- if err := s.PublicKey().Verify(data, sig); err != nil {
- t.Errorf("Verify failed: %v", err)
- }
-}
-
-// Tests for authorized_keys parsing.
-
-// getTestKey returns a public key, and its base64 encoding.
-func getTestKey() (PublicKey, string) {
- k := testPublicKeys["rsa"]
-
- b := &bytes.Buffer{}
- e := base64.NewEncoder(base64.StdEncoding, b)
- e.Write(k.Marshal())
- e.Close()
-
- return k, b.String()
-}
-
-func TestMarshalParsePublicKey(t *testing.T) {
- pub, pubSerialized := getTestKey()
- line := fmt.Sprintf("%s %s user@host", pub.Type(), pubSerialized)
-
- authKeys := MarshalAuthorizedKey(pub)
- actualFields := strings.Fields(string(authKeys))
- if len(actualFields) == 0 {
- t.Fatalf("failed authKeys: %v", authKeys)
- }
-
- // drop the comment
- expectedFields := strings.Fields(line)[0:2]
-
- if !reflect.DeepEqual(actualFields, expectedFields) {
- t.Errorf("got %v, expected %v", actualFields, expectedFields)
- }
-
- actPub, _, _, _, err := ParseAuthorizedKey([]byte(line))
- if err != nil {
- t.Fatalf("cannot parse %v: %v", line, err)
- }
- if !reflect.DeepEqual(actPub, pub) {
- t.Errorf("got %v, expected %v", actPub, pub)
- }
-}
-
-type authResult struct {
- pubKey PublicKey
- options []string
- comments string
- rest string
- ok bool
-}
-
-func testAuthorizedKeys(t *testing.T, authKeys []byte, expected []authResult) {
- rest := authKeys
- var values []authResult
- for len(rest) > 0 {
- var r authResult
- var err error
- r.pubKey, r.comments, r.options, rest, err = ParseAuthorizedKey(rest)
- r.ok = (err == nil)
- t.Log(err)
- r.rest = string(rest)
- values = append(values, r)
- }
-
- if !reflect.DeepEqual(values, expected) {
- t.Errorf("got %#v, expected %#v", values, expected)
- }
-}
-
-func TestAuthorizedKeyBasic(t *testing.T) {
- pub, pubSerialized := getTestKey()
- line := "ssh-rsa " + pubSerialized + " user@host"
- testAuthorizedKeys(t, []byte(line),
- []authResult{
- {pub, nil, "user@host", "", true},
- })
-}
-
-func TestAuth(t *testing.T) {
- pub, pubSerialized := getTestKey()
- authWithOptions := []string{
- `# comments to ignore before any keys...`,
- ``,
- `env="HOME=/home/root",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`,
- `# comments to ignore, along with a blank line`,
- ``,
- `env="HOME=/home/root2" ssh-rsa ` + pubSerialized + ` user2@host2`,
- ``,
- `# more comments, plus a invalid entry`,
- `ssh-rsa data-that-will-not-parse user@host3`,
- }
- for _, eol := range []string{"\n", "\r\n"} {
- authOptions := strings.Join(authWithOptions, eol)
- rest2 := strings.Join(authWithOptions[3:], eol)
- rest3 := strings.Join(authWithOptions[6:], eol)
- testAuthorizedKeys(t, []byte(authOptions), []authResult{
- {pub, []string{`env="HOME=/home/root"`, "no-port-forwarding"}, "user@host", rest2, true},
- {pub, []string{`env="HOME=/home/root2"`}, "user2@host2", rest3, true},
- {nil, nil, "", "", false},
- })
- }
-}
-
-func TestAuthWithQuotedSpaceInEnv(t *testing.T) {
- pub, pubSerialized := getTestKey()
- authWithQuotedSpaceInEnv := []byte(`env="HOME=/home/root dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`)
- testAuthorizedKeys(t, []byte(authWithQuotedSpaceInEnv), []authResult{
- {pub, []string{`env="HOME=/home/root dir"`, "no-port-forwarding"}, "user@host", "", true},
- })
-}
-
-func TestAuthWithQuotedCommaInEnv(t *testing.T) {
- pub, pubSerialized := getTestKey()
- authWithQuotedCommaInEnv := []byte(`env="HOME=/home/root,dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`)
- testAuthorizedKeys(t, []byte(authWithQuotedCommaInEnv), []authResult{
- {pub, []string{`env="HOME=/home/root,dir"`, "no-port-forwarding"}, "user@host", "", true},
- })
-}
-
-func TestAuthWithQuotedQuoteInEnv(t *testing.T) {
- pub, pubSerialized := getTestKey()
- authWithQuotedQuoteInEnv := []byte(`env="HOME=/home/\"root dir",no-port-forwarding` + "\t" + `ssh-rsa` + "\t" + pubSerialized + ` user@host`)
- authWithDoubleQuotedQuote := []byte(`no-port-forwarding,env="HOME=/home/ \"root dir\"" ssh-rsa ` + pubSerialized + "\t" + `user@host`)
- testAuthorizedKeys(t, []byte(authWithQuotedQuoteInEnv), []authResult{
- {pub, []string{`env="HOME=/home/\"root dir"`, "no-port-forwarding"}, "user@host", "", true},
- })
-
- testAuthorizedKeys(t, []byte(authWithDoubleQuotedQuote), []authResult{
- {pub, []string{"no-port-forwarding", `env="HOME=/home/ \"root dir\""`}, "user@host", "", true},
- })
-}
-
-func TestAuthWithInvalidSpace(t *testing.T) {
- _, pubSerialized := getTestKey()
- authWithInvalidSpace := []byte(`env="HOME=/home/root dir", no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host
-#more to follow but still no valid keys`)
- testAuthorizedKeys(t, []byte(authWithInvalidSpace), []authResult{
- {nil, nil, "", "", false},
- })
-}
-
-func TestAuthWithMissingQuote(t *testing.T) {
- pub, pubSerialized := getTestKey()
- authWithMissingQuote := []byte(`env="HOME=/home/root,no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host
-env="HOME=/home/root",shared-control ssh-rsa ` + pubSerialized + ` user@host`)
-
- testAuthorizedKeys(t, []byte(authWithMissingQuote), []authResult{
- {pub, []string{`env="HOME=/home/root"`, `shared-control`}, "user@host", "", true},
- })
-}
-
-func TestInvalidEntry(t *testing.T) {
- authInvalid := []byte(`ssh-rsa`)
- _, _, _, _, err := ParseAuthorizedKey(authInvalid)
- if err == nil {
- t.Errorf("got valid entry for %q", authInvalid)
- }
-}
-
-var knownHostsParseTests = []struct {
- input string
- err string
-
- marker string
- comment string
- hosts []string
- rest string
-}{
- {
- "",
- "EOF",
-
- "", "", nil, "",
- },
- {
- "# Just a comment",
- "EOF",
-
- "", "", nil, "",
- },
- {
- " \t ",
- "EOF",
-
- "", "", nil, "",
- },
- {
- "localhost ssh-rsa {RSAPUB}",
- "",
-
- "", "", []string{"localhost"}, "",
- },
- {
- "localhost\tssh-rsa {RSAPUB}",
- "",
-
- "", "", []string{"localhost"}, "",
- },
- {
- "localhost\tssh-rsa {RSAPUB}\tcomment comment",
- "",
-
- "", "comment comment", []string{"localhost"}, "",
- },
- {
- "localhost\tssh-rsa {RSAPUB}\tcomment comment\n",
- "",
-
- "", "comment comment", []string{"localhost"}, "",
- },
- {
- "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\n",
- "",
-
- "", "comment comment", []string{"localhost"}, "",
- },
- {
- "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\nnext line",
- "",
-
- "", "comment comment", []string{"localhost"}, "next line",
- },
- {
- "localhost,[host2:123]\tssh-rsa {RSAPUB}\tcomment comment",
- "",
-
- "", "comment comment", []string{"localhost", "[host2:123]"}, "",
- },
- {
- "@marker \tlocalhost,[host2:123]\tssh-rsa {RSAPUB}",
- "",
-
- "marker", "", []string{"localhost", "[host2:123]"}, "",
- },
- {
- "@marker \tlocalhost,[host2:123]\tssh-rsa aabbccdd",
- "short read",
-
- "", "", nil, "",
- },
-}
-
-func TestKnownHostsParsing(t *testing.T) {
- rsaPub, rsaPubSerialized := getTestKey()
-
- for i, test := range knownHostsParseTests {
- var expectedKey PublicKey
- const rsaKeyToken = "{RSAPUB}"
-
- input := test.input
- if strings.Contains(input, rsaKeyToken) {
- expectedKey = rsaPub
- input = strings.Replace(test.input, rsaKeyToken, rsaPubSerialized, -1)
- }
-
- marker, hosts, pubKey, comment, rest, err := ParseKnownHosts([]byte(input))
- if err != nil {
- if len(test.err) == 0 {
- t.Errorf("#%d: unexpectedly failed with %q", i, err)
- } else if !strings.Contains(err.Error(), test.err) {
- t.Errorf("#%d: expected error containing %q, but got %q", i, test.err, err)
- }
- continue
- } else if len(test.err) != 0 {
- t.Errorf("#%d: succeeded but expected error including %q", i, test.err)
- continue
- }
-
- if !reflect.DeepEqual(expectedKey, pubKey) {
- t.Errorf("#%d: expected key %#v, but got %#v", i, expectedKey, pubKey)
- }
-
- if marker != test.marker {
- t.Errorf("#%d: expected marker %q, but got %q", i, test.marker, marker)
- }
-
- if comment != test.comment {
- t.Errorf("#%d: expected comment %q, but got %q", i, test.comment, comment)
- }
-
- if !reflect.DeepEqual(test.hosts, hosts) {
- t.Errorf("#%d: expected hosts %#v, but got %#v", i, test.hosts, hosts)
- }
-
- if rest := string(rest); rest != test.rest {
- t.Errorf("#%d: expected remaining input to be %q, but got %q", i, test.rest, rest)
- }
- }
-}
-
-func TestFingerprintLegacyMD5(t *testing.T) {
- pub, _ := getTestKey()
- fingerprint := FingerprintLegacyMD5(pub)
- want := "fb:61:6d:1a:e3:f0:95:45:3c:a0:79:be:4a:93:63:66" // ssh-keygen -lf -E md5 rsa
- if fingerprint != want {
- t.Errorf("got fingerprint %q want %q", fingerprint, want)
- }
-}
-
-func TestFingerprintSHA256(t *testing.T) {
- pub, _ := getTestKey()
- fingerprint := FingerprintSHA256(pub)
- want := "SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8" // ssh-keygen -lf rsa
- if fingerprint != want {
- t.Errorf("got fingerprint %q want %q", fingerprint, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
deleted file mode 100644
index ea92b2983..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
+++ /dev/null
@@ -1,546 +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 file.
-
-// Package knownhosts implements a parser for the OpenSSH
-// known_hosts host key database.
-package knownhosts
-
-import (
- "bufio"
- "bytes"
- "crypto/hmac"
- "crypto/rand"
- "crypto/sha1"
- "encoding/base64"
- "errors"
- "fmt"
- "io"
- "net"
- "os"
- "strings"
-
- "golang.org/x/crypto/ssh"
-)
-
-// See the sshd manpage
-// (http://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT) for
-// background.
-
-type addr struct{ host, port string }
-
-func (a *addr) String() string {
- h := a.host
- if strings.Contains(h, ":") {
- h = "[" + h + "]"
- }
- return h + ":" + a.port
-}
-
-type matcher interface {
- match([]addr) bool
-}
-
-type hostPattern struct {
- negate bool
- addr addr
-}
-
-func (p *hostPattern) String() string {
- n := ""
- if p.negate {
- n = "!"
- }
-
- return n + p.addr.String()
-}
-
-type hostPatterns []hostPattern
-
-func (ps hostPatterns) match(addrs []addr) bool {
- matched := false
- for _, p := range ps {
- for _, a := range addrs {
- m := p.match(a)
- if !m {
- continue
- }
- if p.negate {
- return false
- }
- matched = true
- }
- }
- return matched
-}
-
-// See
-// https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/addrmatch.c
-// The matching of * has no regard for separators, unlike filesystem globs
-func wildcardMatch(pat []byte, str []byte) bool {
- for {
- if len(pat) == 0 {
- return len(str) == 0
- }
- if len(str) == 0 {
- return false
- }
-
- if pat[0] == '*' {
- if len(pat) == 1 {
- return true
- }
-
- for j := range str {
- if wildcardMatch(pat[1:], str[j:]) {
- return true
- }
- }
- return false
- }
-
- if pat[0] == '?' || pat[0] == str[0] {
- pat = pat[1:]
- str = str[1:]
- } else {
- return false
- }
- }
-}
-
-func (l *hostPattern) match(a addr) bool {
- return wildcardMatch([]byte(l.addr.host), []byte(a.host)) && l.addr.port == a.port
-}
-
-type keyDBLine struct {
- cert bool
- matcher matcher
- knownKey KnownKey
-}
-
-func serialize(k ssh.PublicKey) string {
- return k.Type() + " " + base64.StdEncoding.EncodeToString(k.Marshal())
-}
-
-func (l *keyDBLine) match(addrs []addr) bool {
- return l.matcher.match(addrs)
-}
-
-type hostKeyDB struct {
- // Serialized version of revoked keys
- revoked map[string]*KnownKey
- lines []keyDBLine
-}
-
-func newHostKeyDB() *hostKeyDB {
- db := &hostKeyDB{
- revoked: make(map[string]*KnownKey),
- }
-
- return db
-}
-
-func keyEq(a, b ssh.PublicKey) bool {
- return bytes.Equal(a.Marshal(), b.Marshal())
-}
-
-// IsAuthorityForHost can be used as a callback in ssh.CertChecker
-func (db *hostKeyDB) IsHostAuthority(remote ssh.PublicKey, address string) bool {
- h, p, err := net.SplitHostPort(address)
- if err != nil {
- return false
- }
- a := addr{host: h, port: p}
-
- for _, l := range db.lines {
- if l.cert && keyEq(l.knownKey.Key, remote) && l.match([]addr{a}) {
- return true
- }
- }
- return false
-}
-
-// IsRevoked can be used as a callback in ssh.CertChecker
-func (db *hostKeyDB) IsRevoked(key *ssh.Certificate) bool {
- _, ok := db.revoked[string(key.Marshal())]
- return ok
-}
-
-const markerCert = "@cert-authority"
-const markerRevoked = "@revoked"
-
-func nextWord(line []byte) (string, []byte) {
- i := bytes.IndexAny(line, "\t ")
- if i == -1 {
- return string(line), nil
- }
-
- return string(line[:i]), bytes.TrimSpace(line[i:])
-}
-
-func parseLine(line []byte) (marker, host string, key ssh.PublicKey, err error) {
- if w, next := nextWord(line); w == markerCert || w == markerRevoked {
- marker = w
- line = next
- }
-
- host, line = nextWord(line)
- if len(line) == 0 {
- return "", "", nil, errors.New("knownhosts: missing host pattern")
- }
-
- // ignore the keytype as it's in the key blob anyway.
- _, line = nextWord(line)
- if len(line) == 0 {
- return "", "", nil, errors.New("knownhosts: missing key type pattern")
- }
-
- keyBlob, _ := nextWord(line)
-
- keyBytes, err := base64.StdEncoding.DecodeString(keyBlob)
- if err != nil {
- return "", "", nil, err
- }
- key, err = ssh.ParsePublicKey(keyBytes)
- if err != nil {
- return "", "", nil, err
- }
-
- return marker, host, key, nil
-}
-
-func (db *hostKeyDB) parseLine(line []byte, filename string, linenum int) error {
- marker, pattern, key, err := parseLine(line)
- if err != nil {
- return err
- }
-
- if marker == markerRevoked {
- db.revoked[string(key.Marshal())] = &KnownKey{
- Key: key,
- Filename: filename,
- Line: linenum,
- }
-
- return nil
- }
-
- entry := keyDBLine{
- cert: marker == markerCert,
- knownKey: KnownKey{
- Filename: filename,
- Line: linenum,
- Key: key,
- },
- }
-
- if pattern[0] == '|' {
- entry.matcher, err = newHashedHost(pattern)
- } else {
- entry.matcher, err = newHostnameMatcher(pattern)
- }
-
- if err != nil {
- return err
- }
-
- db.lines = append(db.lines, entry)
- return nil
-}
-
-func newHostnameMatcher(pattern string) (matcher, error) {
- var hps hostPatterns
- for _, p := range strings.Split(pattern, ",") {
- if len(p) == 0 {
- continue
- }
-
- var a addr
- var negate bool
- if p[0] == '!' {
- negate = true
- p = p[1:]
- }
-
- if len(p) == 0 {
- return nil, errors.New("knownhosts: negation without following hostname")
- }
-
- var err error
- if p[0] == '[' {
- a.host, a.port, err = net.SplitHostPort(p)
- if err != nil {
- return nil, err
- }
- } else {
- a.host, a.port, err = net.SplitHostPort(p)
- if err != nil {
- a.host = p
- a.port = "22"
- }
- }
- hps = append(hps, hostPattern{
- negate: negate,
- addr: a,
- })
- }
- return hps, nil
-}
-
-// KnownKey represents a key declared in a known_hosts file.
-type KnownKey struct {
- Key ssh.PublicKey
- Filename string
- Line int
-}
-
-func (k *KnownKey) String() string {
- return fmt.Sprintf("%s:%d: %s", k.Filename, k.Line, serialize(k.Key))
-}
-
-// KeyError is returned if we did not find the key in the host key
-// database, or there was a mismatch. Typically, in batch
-// applications, this should be interpreted as failure. Interactive
-// applications can offer an interactive prompt to the user.
-type KeyError struct {
- // Want holds the accepted host keys. For each key algorithm,
- // there can be one hostkey. If Want is empty, the host is
- // unknown. If Want is non-empty, there was a mismatch, which
- // can signify a MITM attack.
- Want []KnownKey
-}
-
-func (u *KeyError) Error() string {
- if len(u.Want) == 0 {
- return "knownhosts: key is unknown"
- }
- return "knownhosts: key mismatch"
-}
-
-// RevokedError is returned if we found a key that was revoked.
-type RevokedError struct {
- Revoked KnownKey
-}
-
-func (r *RevokedError) Error() string {
- return "knownhosts: key is revoked"
-}
-
-// check checks a key against the host database. This should not be
-// used for verifying certificates.
-func (db *hostKeyDB) check(address string, remote net.Addr, remoteKey ssh.PublicKey) error {
- if revoked := db.revoked[string(remoteKey.Marshal())]; revoked != nil {
- return &RevokedError{Revoked: *revoked}
- }
-
- host, port, err := net.SplitHostPort(remote.String())
- if err != nil {
- return fmt.Errorf("knownhosts: SplitHostPort(%s): %v", remote, err)
- }
-
- addrs := []addr{
- {host, port},
- }
-
- if address != "" {
- host, port, err := net.SplitHostPort(address)
- if err != nil {
- return fmt.Errorf("knownhosts: SplitHostPort(%s): %v", address, err)
- }
-
- addrs = append(addrs, addr{host, port})
- }
-
- return db.checkAddrs(addrs, remoteKey)
-}
-
-// checkAddrs checks if we can find the given public key for any of
-// the given addresses. If we only find an entry for the IP address,
-// or only the hostname, then this still succeeds.
-func (db *hostKeyDB) checkAddrs(addrs []addr, remoteKey ssh.PublicKey) error {
- // TODO(hanwen): are these the right semantics? What if there
- // is just a key for the IP address, but not for the
- // hostname?
-
- // Algorithm => key.
- knownKeys := map[string]KnownKey{}
- for _, l := range db.lines {
- if l.match(addrs) {
- typ := l.knownKey.Key.Type()
- if _, ok := knownKeys[typ]; !ok {
- knownKeys[typ] = l.knownKey
- }
- }
- }
-
- keyErr := &KeyError{}
- for _, v := range knownKeys {
- keyErr.Want = append(keyErr.Want, v)
- }
-
- // Unknown remote host.
- if len(knownKeys) == 0 {
- return keyErr
- }
-
- // If the remote host starts using a different, unknown key type, we
- // also interpret that as a mismatch.
- if known, ok := knownKeys[remoteKey.Type()]; !ok || !keyEq(known.Key, remoteKey) {
- return keyErr
- }
-
- return nil
-}
-
-// The Read function parses file contents.
-func (db *hostKeyDB) Read(r io.Reader, filename string) error {
- scanner := bufio.NewScanner(r)
-
- lineNum := 0
- for scanner.Scan() {
- lineNum++
- line := scanner.Bytes()
- line = bytes.TrimSpace(line)
- if len(line) == 0 || line[0] == '#' {
- continue
- }
-
- if err := db.parseLine(line, filename, lineNum); err != nil {
- return fmt.Errorf("knownhosts: %s:%d: %v", filename, lineNum, err)
- }
- }
- return scanner.Err()
-}
-
-// New creates a host key callback from the given OpenSSH host key
-// files. The returned callback is for use in
-// ssh.ClientConfig.HostKeyCallback. Hashed hostnames are not supported.
-func New(files ...string) (ssh.HostKeyCallback, error) {
- db := newHostKeyDB()
- for _, fn := range files {
- f, err := os.Open(fn)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- if err := db.Read(f, fn); err != nil {
- return nil, err
- }
- }
-
- var certChecker ssh.CertChecker
- certChecker.IsHostAuthority = db.IsHostAuthority
- certChecker.IsRevoked = db.IsRevoked
- certChecker.HostKeyFallback = db.check
-
- return certChecker.CheckHostKey, nil
-}
-
-// Normalize normalizes an address into the form used in known_hosts
-func Normalize(address string) string {
- host, port, err := net.SplitHostPort(address)
- if err != nil {
- host = address
- port = "22"
- }
- entry := host
- if port != "22" {
- entry = "[" + entry + "]:" + port
- } else if strings.Contains(host, ":") && !strings.HasPrefix(host, "[") {
- entry = "[" + entry + "]"
- }
- return entry
-}
-
-// Line returns a line to add append to the known_hosts files.
-func Line(addresses []string, key ssh.PublicKey) string {
- var trimmed []string
- for _, a := range addresses {
- trimmed = append(trimmed, Normalize(a))
- }
-
- return strings.Join(trimmed, ",") + " " + serialize(key)
-}
-
-// HashHostname hashes the given hostname. The hostname is not
-// normalized before hashing.
-func HashHostname(hostname string) string {
- // TODO(hanwen): check if we can safely normalize this always.
- salt := make([]byte, sha1.Size)
-
- _, err := rand.Read(salt)
- if err != nil {
- panic(fmt.Sprintf("crypto/rand failure %v", err))
- }
-
- hash := hashHost(hostname, salt)
- return encodeHash(sha1HashType, salt, hash)
-}
-
-func decodeHash(encoded string) (hashType string, salt, hash []byte, err error) {
- if len(encoded) == 0 || encoded[0] != '|' {
- err = errors.New("knownhosts: hashed host must start with '|'")
- return
- }
- components := strings.Split(encoded, "|")
- if len(components) != 4 {
- err = fmt.Errorf("knownhosts: got %d components, want 3", len(components))
- return
- }
-
- hashType = components[1]
- if salt, err = base64.StdEncoding.DecodeString(components[2]); err != nil {
- return
- }
- if hash, err = base64.StdEncoding.DecodeString(components[3]); err != nil {
- return
- }
- return
-}
-
-func encodeHash(typ string, salt []byte, hash []byte) string {
- return strings.Join([]string{"",
- typ,
- base64.StdEncoding.EncodeToString(salt),
- base64.StdEncoding.EncodeToString(hash),
- }, "|")
-}
-
-// See https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/hostfile.c#120
-func hashHost(hostname string, salt []byte) []byte {
- mac := hmac.New(sha1.New, salt)
- mac.Write([]byte(hostname))
- return mac.Sum(nil)
-}
-
-type hashedHost struct {
- salt []byte
- hash []byte
-}
-
-const sha1HashType = "1"
-
-func newHashedHost(encoded string) (*hashedHost, error) {
- typ, salt, hash, err := decodeHash(encoded)
- if err != nil {
- return nil, err
- }
-
- // The type field seems for future algorithm agility, but it's
- // actually hardcoded in openssh currently, see
- // https://android.googlesource.com/platform/external/openssh/+/ab28f5495c85297e7a597c1ba62e996416da7c7e/hostfile.c#120
- if typ != sha1HashType {
- return nil, fmt.Errorf("knownhosts: got hash type %s, must be '1'", typ)
- }
-
- return &hashedHost{salt: salt, hash: hash}, nil
-}
-
-func (h *hashedHost) match(addrs []addr) bool {
- for _, a := range addrs {
- if bytes.Equal(hashHost(Normalize(a.String()), h.salt), h.hash) {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go
deleted file mode 100644
index be7cc0e80..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go
+++ /dev/null
@@ -1,329 +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 file.
-
-package knownhosts
-
-import (
- "bytes"
- "fmt"
- "net"
- "reflect"
- "testing"
-
- "golang.org/x/crypto/ssh"
-)
-
-const edKeyStr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBAarftlLeoyf+v+nVchEZII/vna2PCV8FaX4vsF5BX"
-const alternateEdKeyStr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIXffBYeYL+WVzVru8npl5JHt2cjlr4ornFTWzoij9sx"
-const ecKeyStr = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNLCu01+wpXe3xB5olXCN4SqU2rQu0qjSRKJO4Bg+JRCPU+ENcgdA5srTU8xYDz/GEa4dzK5ldPw4J/gZgSXCMs="
-
-var ecKey, alternateEdKey, edKey ssh.PublicKey
-var testAddr = &net.TCPAddr{
- IP: net.IP{198, 41, 30, 196},
- Port: 22,
-}
-
-var testAddr6 = &net.TCPAddr{
- IP: net.IP{198, 41, 30, 196,
- 1, 2, 3, 4,
- 1, 2, 3, 4,
- 1, 2, 3, 4,
- },
- Port: 22,
-}
-
-func init() {
- var err error
- ecKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(ecKeyStr))
- if err != nil {
- panic(err)
- }
- edKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(edKeyStr))
- if err != nil {
- panic(err)
- }
- alternateEdKey, _, _, _, err = ssh.ParseAuthorizedKey([]byte(alternateEdKeyStr))
- if err != nil {
- panic(err)
- }
-}
-
-func testDB(t *testing.T, s string) *hostKeyDB {
- db := newHostKeyDB()
- if err := db.Read(bytes.NewBufferString(s), "testdb"); err != nil {
- t.Fatalf("Read: %v", err)
- }
-
- return db
-}
-
-func TestRevoked(t *testing.T) {
- db := testDB(t, "\n\n@revoked * "+edKeyStr+"\n")
- want := &RevokedError{
- Revoked: KnownKey{
- Key: edKey,
- Filename: "testdb",
- Line: 3,
- },
- }
- if err := db.check("", &net.TCPAddr{
- Port: 42,
- }, edKey); err == nil {
- t.Fatal("no error for revoked key")
- } else if !reflect.DeepEqual(want, err) {
- t.Fatalf("got %#v, want %#v", want, err)
- }
-}
-
-func TestHostAuthority(t *testing.T) {
- for _, m := range []struct {
- authorityFor string
- address string
-
- good bool
- }{
- {authorityFor: "localhost", address: "localhost:22", good: true},
- {authorityFor: "localhost", address: "localhost", good: false},
- {authorityFor: "localhost", address: "localhost:1234", good: false},
- {authorityFor: "[localhost]:1234", address: "localhost:1234", good: true},
- {authorityFor: "[localhost]:1234", address: "localhost:22", good: false},
- {authorityFor: "[localhost]:1234", address: "localhost", good: false},
- } {
- db := testDB(t, `@cert-authority `+m.authorityFor+` `+edKeyStr)
- if ok := db.IsHostAuthority(db.lines[0].knownKey.Key, m.address); ok != m.good {
- t.Errorf("IsHostAuthority: authority %s, address %s, wanted good = %v, got good = %v",
- m.authorityFor, m.address, m.good, ok)
- }
- }
-}
-
-func TestBracket(t *testing.T) {
- db := testDB(t, `[git.eclipse.org]:29418,[198.41.30.196]:29418 `+edKeyStr)
-
- if err := db.check("git.eclipse.org:29418", &net.TCPAddr{
- IP: net.IP{198, 41, 30, 196},
- Port: 29418,
- }, edKey); err != nil {
- t.Errorf("got error %v, want none", err)
- }
-
- if err := db.check("git.eclipse.org:29419", &net.TCPAddr{
- Port: 42,
- }, edKey); err == nil {
- t.Fatalf("no error for unknown address")
- } else if ke, ok := err.(*KeyError); !ok {
- t.Fatalf("got type %T, want *KeyError", err)
- } else if len(ke.Want) > 0 {
- t.Fatalf("got Want %v, want []", ke.Want)
- }
-}
-
-func TestNewKeyType(t *testing.T) {
- str := fmt.Sprintf("%s %s", testAddr, edKeyStr)
- db := testDB(t, str)
- if err := db.check("", testAddr, ecKey); err == nil {
- t.Fatalf("no error for unknown address")
- } else if ke, ok := err.(*KeyError); !ok {
- t.Fatalf("got type %T, want *KeyError", err)
- } else if len(ke.Want) == 0 {
- t.Fatalf("got empty KeyError.Want")
- }
-}
-
-func TestSameKeyType(t *testing.T) {
- str := fmt.Sprintf("%s %s", testAddr, edKeyStr)
- db := testDB(t, str)
- if err := db.check("", testAddr, alternateEdKey); err == nil {
- t.Fatalf("no error for unknown address")
- } else if ke, ok := err.(*KeyError); !ok {
- t.Fatalf("got type %T, want *KeyError", err)
- } else if len(ke.Want) == 0 {
- t.Fatalf("got empty KeyError.Want")
- } else if got, want := ke.Want[0].Key.Marshal(), edKey.Marshal(); !bytes.Equal(got, want) {
- t.Fatalf("got key %q, want %q", got, want)
- }
-}
-
-func TestIPAddress(t *testing.T) {
- str := fmt.Sprintf("%s %s", testAddr, edKeyStr)
- db := testDB(t, str)
- if err := db.check("", testAddr, edKey); err != nil {
- t.Errorf("got error %q, want none", err)
- }
-}
-
-func TestIPv6Address(t *testing.T) {
- str := fmt.Sprintf("%s %s", testAddr6, edKeyStr)
- db := testDB(t, str)
-
- if err := db.check("", testAddr6, edKey); err != nil {
- t.Errorf("got error %q, want none", err)
- }
-}
-
-func TestBasic(t *testing.T) {
- str := fmt.Sprintf("#comment\n\nserver.org,%s %s\notherhost %s", testAddr, edKeyStr, ecKeyStr)
- db := testDB(t, str)
- if err := db.check("server.org:22", testAddr, edKey); err != nil {
- t.Errorf("got error %q, want none", err)
- }
-
- want := KnownKey{
- Key: edKey,
- Filename: "testdb",
- Line: 3,
- }
- if err := db.check("server.org:22", testAddr, ecKey); err == nil {
- t.Errorf("succeeded, want KeyError")
- } else if ke, ok := err.(*KeyError); !ok {
- t.Errorf("got %T, want *KeyError", err)
- } else if len(ke.Want) != 1 {
- t.Errorf("got %v, want 1 entry", ke)
- } else if !reflect.DeepEqual(ke.Want[0], want) {
- t.Errorf("got %v, want %v", ke.Want[0], want)
- }
-}
-
-func TestNegate(t *testing.T) {
- str := fmt.Sprintf("%s,!server.org %s", testAddr, edKeyStr)
- db := testDB(t, str)
- if err := db.check("server.org:22", testAddr, ecKey); err == nil {
- t.Errorf("succeeded")
- } else if ke, ok := err.(*KeyError); !ok {
- t.Errorf("got error type %T, want *KeyError", err)
- } else if len(ke.Want) != 0 {
- t.Errorf("got expected keys %d (first of type %s), want []", len(ke.Want), ke.Want[0].Key.Type())
- }
-}
-
-func TestWildcard(t *testing.T) {
- str := fmt.Sprintf("server*.domain %s", edKeyStr)
- db := testDB(t, str)
-
- want := &KeyError{
- Want: []KnownKey{{
- Filename: "testdb",
- Line: 1,
- Key: edKey,
- }},
- }
-
- got := db.check("server.domain:22", &net.TCPAddr{}, ecKey)
- if !reflect.DeepEqual(got, want) {
- t.Errorf("got %s, want %s", got, want)
- }
-}
-
-func TestLine(t *testing.T) {
- for in, want := range map[string]string{
- "server.org": "server.org " + edKeyStr,
- "server.org:22": "server.org " + edKeyStr,
- "server.org:23": "[server.org]:23 " + edKeyStr,
- "[c629:1ec4:102:304:102:304:102:304]:22": "[c629:1ec4:102:304:102:304:102:304] " + edKeyStr,
- "[c629:1ec4:102:304:102:304:102:304]:23": "[c629:1ec4:102:304:102:304:102:304]:23 " + edKeyStr,
- } {
- if got := Line([]string{in}, edKey); got != want {
- t.Errorf("Line(%q) = %q, want %q", in, got, want)
- }
- }
-}
-
-func TestWildcardMatch(t *testing.T) {
- for _, c := range []struct {
- pat, str string
- want bool
- }{
- {"a?b", "abb", true},
- {"ab", "abc", false},
- {"abc", "ab", false},
- {"a*b", "axxxb", true},
- {"a*b", "axbxb", true},
- {"a*b", "axbxbc", false},
- {"a*?", "axbxc", true},
- {"a*b*", "axxbxxxxxx", true},
- {"a*b*c", "axxbxxxxxxc", true},
- {"a*b*?", "axxbxxxxxxc", true},
- {"a*b*z", "axxbxxbxxxz", true},
- {"a*b*z", "axxbxxzxxxz", true},
- {"a*b*z", "axxbxxzxxx", false},
- } {
- got := wildcardMatch([]byte(c.pat), []byte(c.str))
- if got != c.want {
- t.Errorf("wildcardMatch(%q, %q) = %v, want %v", c.pat, c.str, got, c.want)
- }
-
- }
-}
-
-// TODO(hanwen): test coverage for certificates.
-
-const testHostname = "hostname"
-
-// generated with keygen -H -f
-const encodedTestHostnameHash = "|1|IHXZvQMvTcZTUU29+2vXFgx8Frs=|UGccIWfRVDwilMBnA3WJoRAC75Y="
-
-func TestHostHash(t *testing.T) {
- testHostHash(t, testHostname, encodedTestHostnameHash)
-}
-
-func TestHashList(t *testing.T) {
- encoded := HashHostname(testHostname)
- testHostHash(t, testHostname, encoded)
-}
-
-func testHostHash(t *testing.T, hostname, encoded string) {
- typ, salt, hash, err := decodeHash(encoded)
- if err != nil {
- t.Fatalf("decodeHash: %v", err)
- }
-
- if got := encodeHash(typ, salt, hash); got != encoded {
- t.Errorf("got encoding %s want %s", got, encoded)
- }
-
- if typ != sha1HashType {
- t.Fatalf("got hash type %q, want %q", typ, sha1HashType)
- }
-
- got := hashHost(hostname, salt)
- if !bytes.Equal(got, hash) {
- t.Errorf("got hash %x want %x", got, hash)
- }
-}
-
-func TestNormalize(t *testing.T) {
- for in, want := range map[string]string{
- "127.0.0.1:22": "127.0.0.1",
- "[127.0.0.1]:22": "127.0.0.1",
- "[127.0.0.1]:23": "[127.0.0.1]:23",
- "127.0.0.1:23": "[127.0.0.1]:23",
- "[a.b.c]:22": "a.b.c",
- "[abcd:abcd:abcd:abcd]": "[abcd:abcd:abcd:abcd]",
- "[abcd:abcd:abcd:abcd]:22": "[abcd:abcd:abcd:abcd]",
- "[abcd:abcd:abcd:abcd]:23": "[abcd:abcd:abcd:abcd]:23",
- } {
- got := Normalize(in)
- if got != want {
- t.Errorf("Normalize(%q) = %q, want %q", in, got, want)
- }
- }
-}
-
-func TestHashedHostkeyCheck(t *testing.T) {
- str := fmt.Sprintf("%s %s", HashHostname(testHostname), edKeyStr)
- db := testDB(t, str)
- if err := db.check(testHostname+":22", testAddr, edKey); err != nil {
- t.Errorf("check(%s): %v", testHostname, err)
- }
- want := &KeyError{
- Want: []KnownKey{{
- Filename: "testdb",
- Line: 1,
- Key: edKey,
- }},
- }
- if got := db.check(testHostname+":22", testAddr, alternateEdKey); !reflect.DeepEqual(got, want) {
- t.Errorf("got error %v, want %v", got, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mac.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mac.go
deleted file mode 100644
index c07a06285..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mac.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 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 file.
-
-package ssh
-
-// Message authentication support
-
-import (
- "crypto/hmac"
- "crypto/sha1"
- "crypto/sha256"
- "hash"
-)
-
-type macMode struct {
- keySize int
- etm bool
- new func(key []byte) hash.Hash
-}
-
-// truncatingMAC wraps around a hash.Hash and truncates the output digest to
-// a given size.
-type truncatingMAC struct {
- length int
- hmac hash.Hash
-}
-
-func (t truncatingMAC) Write(data []byte) (int, error) {
- return t.hmac.Write(data)
-}
-
-func (t truncatingMAC) Sum(in []byte) []byte {
- out := t.hmac.Sum(in)
- return out[:len(in)+t.length]
-}
-
-func (t truncatingMAC) Reset() {
- t.hmac.Reset()
-}
-
-func (t truncatingMAC) Size() int {
- return t.length
-}
-
-func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() }
-
-var macModes = map[string]*macMode{
- "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash {
- return hmac.New(sha256.New, key)
- }},
- "hmac-sha2-256": {32, false, func(key []byte) hash.Hash {
- return hmac.New(sha256.New, key)
- }},
- "hmac-sha1": {20, false, func(key []byte) hash.Hash {
- return hmac.New(sha1.New, key)
- }},
- "hmac-sha1-96": {20, false, func(key []byte) hash.Hash {
- return truncatingMAC{12, hmac.New(sha1.New, key)}
- }},
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mempipe_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mempipe_test.go
deleted file mode 100644
index 8697cd614..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mempipe_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "io"
- "sync"
- "testing"
-)
-
-// An in-memory packetConn. It is safe to call Close and writePacket
-// from different goroutines.
-type memTransport struct {
- eof bool
- pending [][]byte
- write *memTransport
- sync.Mutex
- *sync.Cond
-}
-
-func (t *memTransport) readPacket() ([]byte, error) {
- t.Lock()
- defer t.Unlock()
- for {
- if len(t.pending) > 0 {
- r := t.pending[0]
- t.pending = t.pending[1:]
- return r, nil
- }
- if t.eof {
- return nil, io.EOF
- }
- t.Cond.Wait()
- }
-}
-
-func (t *memTransport) closeSelf() error {
- t.Lock()
- defer t.Unlock()
- if t.eof {
- return io.EOF
- }
- t.eof = true
- t.Cond.Broadcast()
- return nil
-}
-
-func (t *memTransport) Close() error {
- err := t.write.closeSelf()
- t.closeSelf()
- return err
-}
-
-func (t *memTransport) writePacket(p []byte) error {
- t.write.Lock()
- defer t.write.Unlock()
- if t.write.eof {
- return io.EOF
- }
- c := make([]byte, len(p))
- copy(c, p)
- t.write.pending = append(t.write.pending, c)
- t.write.Cond.Signal()
- return nil
-}
-
-func memPipe() (a, b packetConn) {
- t1 := memTransport{}
- t2 := memTransport{}
- t1.write = &t2
- t2.write = &t1
- t1.Cond = sync.NewCond(&t1.Mutex)
- t2.Cond = sync.NewCond(&t2.Mutex)
- return &t1, &t2
-}
-
-func TestMemPipe(t *testing.T) {
- a, b := memPipe()
- if err := a.writePacket([]byte{42}); err != nil {
- t.Fatalf("writePacket: %v", err)
- }
- if err := a.Close(); err != nil {
- t.Fatal("Close: ", err)
- }
- p, err := b.readPacket()
- if err != nil {
- t.Fatal("readPacket: ", err)
- }
- if len(p) != 1 || p[0] != 42 {
- t.Fatalf("got %v, want {42}", p)
- }
- p, err = b.readPacket()
- if err != io.EOF {
- t.Fatalf("got %v, %v, want EOF", p, err)
- }
-}
-
-func TestDoubleClose(t *testing.T) {
- a, _ := memPipe()
- err := a.Close()
- if err != nil {
- t.Errorf("Close: %v", err)
- }
- err = a.Close()
- if err != io.EOF {
- t.Errorf("expect EOF on double close.")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages.go
deleted file mode 100644
index c96e1bec5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages.go
+++ /dev/null
@@ -1,766 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "math/big"
- "reflect"
- "strconv"
- "strings"
-)
-
-// These are SSH message type numbers. They are scattered around several
-// documents but many were taken from [SSH-PARAMETERS].
-const (
- msgIgnore = 2
- msgUnimplemented = 3
- msgDebug = 4
- msgNewKeys = 21
-)
-
-// SSH messages:
-//
-// These structures mirror the wire format of the corresponding SSH messages.
-// They are marshaled using reflection with the marshal and unmarshal functions
-// in this file. The only wrinkle is that a final member of type []byte with a
-// ssh tag of "rest" receives the remainder of a packet when unmarshaling.
-
-// See RFC 4253, section 11.1.
-const msgDisconnect = 1
-
-// disconnectMsg is the message that signals a disconnect. It is also
-// the error type returned from mux.Wait()
-type disconnectMsg struct {
- Reason uint32 `sshtype:"1"`
- Message string
- Language string
-}
-
-func (d *disconnectMsg) Error() string {
- return fmt.Sprintf("ssh: disconnect, reason %d: %s", d.Reason, d.Message)
-}
-
-// See RFC 4253, section 7.1.
-const msgKexInit = 20
-
-type kexInitMsg struct {
- Cookie [16]byte `sshtype:"20"`
- KexAlgos []string
- ServerHostKeyAlgos []string
- CiphersClientServer []string
- CiphersServerClient []string
- MACsClientServer []string
- MACsServerClient []string
- CompressionClientServer []string
- CompressionServerClient []string
- LanguagesClientServer []string
- LanguagesServerClient []string
- FirstKexFollows bool
- Reserved uint32
-}
-
-// See RFC 4253, section 8.
-
-// Diffie-Helman
-const msgKexDHInit = 30
-
-type kexDHInitMsg struct {
- X *big.Int `sshtype:"30"`
-}
-
-const msgKexECDHInit = 30
-
-type kexECDHInitMsg struct {
- ClientPubKey []byte `sshtype:"30"`
-}
-
-const msgKexECDHReply = 31
-
-type kexECDHReplyMsg struct {
- HostKey []byte `sshtype:"31"`
- EphemeralPubKey []byte
- Signature []byte
-}
-
-const msgKexDHReply = 31
-
-type kexDHReplyMsg struct {
- HostKey []byte `sshtype:"31"`
- Y *big.Int
- Signature []byte
-}
-
-// See RFC 4253, section 10.
-const msgServiceRequest = 5
-
-type serviceRequestMsg struct {
- Service string `sshtype:"5"`
-}
-
-// See RFC 4253, section 10.
-const msgServiceAccept = 6
-
-type serviceAcceptMsg struct {
- Service string `sshtype:"6"`
-}
-
-// See RFC 4252, section 5.
-const msgUserAuthRequest = 50
-
-type userAuthRequestMsg struct {
- User string `sshtype:"50"`
- Service string
- Method string
- Payload []byte `ssh:"rest"`
-}
-
-// Used for debug printouts of packets.
-type userAuthSuccessMsg struct {
-}
-
-// See RFC 4252, section 5.1
-const msgUserAuthFailure = 51
-
-type userAuthFailureMsg struct {
- Methods []string `sshtype:"51"`
- PartialSuccess bool
-}
-
-// See RFC 4252, section 5.1
-const msgUserAuthSuccess = 52
-
-// See RFC 4252, section 5.4
-const msgUserAuthBanner = 53
-
-type userAuthBannerMsg struct {
- Message string `sshtype:"53"`
- // unused, but required to allow message parsing
- Language string
-}
-
-// See RFC 4256, section 3.2
-const msgUserAuthInfoRequest = 60
-const msgUserAuthInfoResponse = 61
-
-type userAuthInfoRequestMsg struct {
- User string `sshtype:"60"`
- Instruction string
- DeprecatedLanguage string
- NumPrompts uint32
- Prompts []byte `ssh:"rest"`
-}
-
-// See RFC 4254, section 5.1.
-const msgChannelOpen = 90
-
-type channelOpenMsg struct {
- ChanType string `sshtype:"90"`
- PeersId uint32
- PeersWindow uint32
- MaxPacketSize uint32
- TypeSpecificData []byte `ssh:"rest"`
-}
-
-const msgChannelExtendedData = 95
-const msgChannelData = 94
-
-// Used for debug print outs of packets.
-type channelDataMsg struct {
- PeersId uint32 `sshtype:"94"`
- Length uint32
- Rest []byte `ssh:"rest"`
-}
-
-// See RFC 4254, section 5.1.
-const msgChannelOpenConfirm = 91
-
-type channelOpenConfirmMsg struct {
- PeersId uint32 `sshtype:"91"`
- MyId uint32
- MyWindow uint32
- MaxPacketSize uint32
- TypeSpecificData []byte `ssh:"rest"`
-}
-
-// See RFC 4254, section 5.1.
-const msgChannelOpenFailure = 92
-
-type channelOpenFailureMsg struct {
- PeersId uint32 `sshtype:"92"`
- Reason RejectionReason
- Message string
- Language string
-}
-
-const msgChannelRequest = 98
-
-type channelRequestMsg struct {
- PeersId uint32 `sshtype:"98"`
- Request string
- WantReply bool
- RequestSpecificData []byte `ssh:"rest"`
-}
-
-// See RFC 4254, section 5.4.
-const msgChannelSuccess = 99
-
-type channelRequestSuccessMsg struct {
- PeersId uint32 `sshtype:"99"`
-}
-
-// See RFC 4254, section 5.4.
-const msgChannelFailure = 100
-
-type channelRequestFailureMsg struct {
- PeersId uint32 `sshtype:"100"`
-}
-
-// See RFC 4254, section 5.3
-const msgChannelClose = 97
-
-type channelCloseMsg struct {
- PeersId uint32 `sshtype:"97"`
-}
-
-// See RFC 4254, section 5.3
-const msgChannelEOF = 96
-
-type channelEOFMsg struct {
- PeersId uint32 `sshtype:"96"`
-}
-
-// See RFC 4254, section 4
-const msgGlobalRequest = 80
-
-type globalRequestMsg struct {
- Type string `sshtype:"80"`
- WantReply bool
- Data []byte `ssh:"rest"`
-}
-
-// See RFC 4254, section 4
-const msgRequestSuccess = 81
-
-type globalRequestSuccessMsg struct {
- Data []byte `ssh:"rest" sshtype:"81"`
-}
-
-// See RFC 4254, section 4
-const msgRequestFailure = 82
-
-type globalRequestFailureMsg struct {
- Data []byte `ssh:"rest" sshtype:"82"`
-}
-
-// See RFC 4254, section 5.2
-const msgChannelWindowAdjust = 93
-
-type windowAdjustMsg struct {
- PeersId uint32 `sshtype:"93"`
- AdditionalBytes uint32
-}
-
-// See RFC 4252, section 7
-const msgUserAuthPubKeyOk = 60
-
-type userAuthPubKeyOkMsg struct {
- Algo string `sshtype:"60"`
- PubKey []byte
-}
-
-// typeTags returns the possible type bytes for the given reflect.Type, which
-// should be a struct. The possible values are separated by a '|' character.
-func typeTags(structType reflect.Type) (tags []byte) {
- tagStr := structType.Field(0).Tag.Get("sshtype")
-
- for _, tag := range strings.Split(tagStr, "|") {
- i, err := strconv.Atoi(tag)
- if err == nil {
- tags = append(tags, byte(i))
- }
- }
-
- return tags
-}
-
-func fieldError(t reflect.Type, field int, problem string) error {
- if problem != "" {
- problem = ": " + problem
- }
- return fmt.Errorf("ssh: unmarshal error for field %s of type %s%s", t.Field(field).Name, t.Name(), problem)
-}
-
-var errShortRead = errors.New("ssh: short read")
-
-// Unmarshal parses data in SSH wire format into a structure. The out
-// argument should be a pointer to struct. If the first member of the
-// struct has the "sshtype" tag set to a '|'-separated set of numbers
-// in decimal, the packet must start with one of those numbers. In
-// case of error, Unmarshal returns a ParseError or
-// UnexpectedMessageError.
-func Unmarshal(data []byte, out interface{}) error {
- v := reflect.ValueOf(out).Elem()
- structType := v.Type()
- expectedTypes := typeTags(structType)
-
- var expectedType byte
- if len(expectedTypes) > 0 {
- expectedType = expectedTypes[0]
- }
-
- if len(data) == 0 {
- return parseError(expectedType)
- }
-
- if len(expectedTypes) > 0 {
- goodType := false
- for _, e := range expectedTypes {
- if e > 0 && data[0] == e {
- goodType = true
- break
- }
- }
- if !goodType {
- return fmt.Errorf("ssh: unexpected message type %d (expected one of %v)", data[0], expectedTypes)
- }
- data = data[1:]
- }
-
- var ok bool
- for i := 0; i < v.NumField(); i++ {
- field := v.Field(i)
- t := field.Type()
- switch t.Kind() {
- case reflect.Bool:
- if len(data) < 1 {
- return errShortRead
- }
- field.SetBool(data[0] != 0)
- data = data[1:]
- case reflect.Array:
- if t.Elem().Kind() != reflect.Uint8 {
- return fieldError(structType, i, "array of unsupported type")
- }
- if len(data) < t.Len() {
- return errShortRead
- }
- for j, n := 0, t.Len(); j < n; j++ {
- field.Index(j).Set(reflect.ValueOf(data[j]))
- }
- data = data[t.Len():]
- case reflect.Uint64:
- var u64 uint64
- if u64, data, ok = parseUint64(data); !ok {
- return errShortRead
- }
- field.SetUint(u64)
- case reflect.Uint32:
- var u32 uint32
- if u32, data, ok = parseUint32(data); !ok {
- return errShortRead
- }
- field.SetUint(uint64(u32))
- case reflect.Uint8:
- if len(data) < 1 {
- return errShortRead
- }
- field.SetUint(uint64(data[0]))
- data = data[1:]
- case reflect.String:
- var s []byte
- if s, data, ok = parseString(data); !ok {
- return fieldError(structType, i, "")
- }
- field.SetString(string(s))
- case reflect.Slice:
- switch t.Elem().Kind() {
- case reflect.Uint8:
- if structType.Field(i).Tag.Get("ssh") == "rest" {
- field.Set(reflect.ValueOf(data))
- data = nil
- } else {
- var s []byte
- if s, data, ok = parseString(data); !ok {
- return errShortRead
- }
- field.Set(reflect.ValueOf(s))
- }
- case reflect.String:
- var nl []string
- if nl, data, ok = parseNameList(data); !ok {
- return errShortRead
- }
- field.Set(reflect.ValueOf(nl))
- default:
- return fieldError(structType, i, "slice of unsupported type")
- }
- case reflect.Ptr:
- if t == bigIntType {
- var n *big.Int
- if n, data, ok = parseInt(data); !ok {
- return errShortRead
- }
- field.Set(reflect.ValueOf(n))
- } else {
- return fieldError(structType, i, "pointer to unsupported type")
- }
- default:
- return fieldError(structType, i, fmt.Sprintf("unsupported type: %v", t))
- }
- }
-
- if len(data) != 0 {
- return parseError(expectedType)
- }
-
- return nil
-}
-
-// Marshal serializes the message in msg to SSH wire format. The msg
-// argument should be a struct or pointer to struct. If the first
-// member has the "sshtype" tag set to a number in decimal, that
-// number is prepended to the result. If the last of member has the
-// "ssh" tag set to "rest", its contents are appended to the output.
-func Marshal(msg interface{}) []byte {
- out := make([]byte, 0, 64)
- return marshalStruct(out, msg)
-}
-
-func marshalStruct(out []byte, msg interface{}) []byte {
- v := reflect.Indirect(reflect.ValueOf(msg))
- msgTypes := typeTags(v.Type())
- if len(msgTypes) > 0 {
- out = append(out, msgTypes[0])
- }
-
- for i, n := 0, v.NumField(); i < n; i++ {
- field := v.Field(i)
- switch t := field.Type(); t.Kind() {
- case reflect.Bool:
- var v uint8
- if field.Bool() {
- v = 1
- }
- out = append(out, v)
- case reflect.Array:
- if t.Elem().Kind() != reflect.Uint8 {
- panic(fmt.Sprintf("array of non-uint8 in field %d: %T", i, field.Interface()))
- }
- for j, l := 0, t.Len(); j < l; j++ {
- out = append(out, uint8(field.Index(j).Uint()))
- }
- case reflect.Uint32:
- out = appendU32(out, uint32(field.Uint()))
- case reflect.Uint64:
- out = appendU64(out, uint64(field.Uint()))
- case reflect.Uint8:
- out = append(out, uint8(field.Uint()))
- case reflect.String:
- s := field.String()
- out = appendInt(out, len(s))
- out = append(out, s...)
- case reflect.Slice:
- switch t.Elem().Kind() {
- case reflect.Uint8:
- if v.Type().Field(i).Tag.Get("ssh") != "rest" {
- out = appendInt(out, field.Len())
- }
- out = append(out, field.Bytes()...)
- case reflect.String:
- offset := len(out)
- out = appendU32(out, 0)
- if n := field.Len(); n > 0 {
- for j := 0; j < n; j++ {
- f := field.Index(j)
- if j != 0 {
- out = append(out, ',')
- }
- out = append(out, f.String()...)
- }
- // overwrite length value
- binary.BigEndian.PutUint32(out[offset:], uint32(len(out)-offset-4))
- }
- default:
- panic(fmt.Sprintf("slice of unknown type in field %d: %T", i, field.Interface()))
- }
- case reflect.Ptr:
- if t == bigIntType {
- var n *big.Int
- nValue := reflect.ValueOf(&n)
- nValue.Elem().Set(field)
- needed := intLength(n)
- oldLength := len(out)
-
- if cap(out)-len(out) < needed {
- newOut := make([]byte, len(out), 2*(len(out)+needed))
- copy(newOut, out)
- out = newOut
- }
- out = out[:oldLength+needed]
- marshalInt(out[oldLength:], n)
- } else {
- panic(fmt.Sprintf("pointer to unknown type in field %d: %T", i, field.Interface()))
- }
- }
- }
-
- return out
-}
-
-var bigOne = big.NewInt(1)
-
-func parseString(in []byte) (out, rest []byte, ok bool) {
- if len(in) < 4 {
- return
- }
- length := binary.BigEndian.Uint32(in)
- in = in[4:]
- if uint32(len(in)) < length {
- return
- }
- out = in[:length]
- rest = in[length:]
- ok = true
- return
-}
-
-var (
- comma = []byte{','}
- emptyNameList = []string{}
-)
-
-func parseNameList(in []byte) (out []string, rest []byte, ok bool) {
- contents, rest, ok := parseString(in)
- if !ok {
- return
- }
- if len(contents) == 0 {
- out = emptyNameList
- return
- }
- parts := bytes.Split(contents, comma)
- out = make([]string, len(parts))
- for i, part := range parts {
- out[i] = string(part)
- }
- return
-}
-
-func parseInt(in []byte) (out *big.Int, rest []byte, ok bool) {
- contents, rest, ok := parseString(in)
- if !ok {
- return
- }
- out = new(big.Int)
-
- if len(contents) > 0 && contents[0]&0x80 == 0x80 {
- // This is a negative number
- notBytes := make([]byte, len(contents))
- for i := range notBytes {
- notBytes[i] = ^contents[i]
- }
- out.SetBytes(notBytes)
- out.Add(out, bigOne)
- out.Neg(out)
- } else {
- // Positive number
- out.SetBytes(contents)
- }
- ok = true
- return
-}
-
-func parseUint32(in []byte) (uint32, []byte, bool) {
- if len(in) < 4 {
- return 0, nil, false
- }
- return binary.BigEndian.Uint32(in), in[4:], true
-}
-
-func parseUint64(in []byte) (uint64, []byte, bool) {
- if len(in) < 8 {
- return 0, nil, false
- }
- return binary.BigEndian.Uint64(in), in[8:], true
-}
-
-func intLength(n *big.Int) int {
- length := 4 /* length bytes */
- if n.Sign() < 0 {
- nMinus1 := new(big.Int).Neg(n)
- nMinus1.Sub(nMinus1, bigOne)
- bitLen := nMinus1.BitLen()
- if bitLen%8 == 0 {
- // The number will need 0xff padding
- length++
- }
- length += (bitLen + 7) / 8
- } else if n.Sign() == 0 {
- // A zero is the zero length string
- } else {
- bitLen := n.BitLen()
- if bitLen%8 == 0 {
- // The number will need 0x00 padding
- length++
- }
- length += (bitLen + 7) / 8
- }
-
- return length
-}
-
-func marshalUint32(to []byte, n uint32) []byte {
- binary.BigEndian.PutUint32(to, n)
- return to[4:]
-}
-
-func marshalUint64(to []byte, n uint64) []byte {
- binary.BigEndian.PutUint64(to, n)
- return to[8:]
-}
-
-func marshalInt(to []byte, n *big.Int) []byte {
- lengthBytes := to
- to = to[4:]
- length := 0
-
- if n.Sign() < 0 {
- // A negative number has to be converted to two's-complement
- // form. So we'll subtract 1 and invert. If the
- // most-significant-bit isn't set then we'll need to pad the
- // beginning with 0xff in order to keep the number negative.
- nMinus1 := new(big.Int).Neg(n)
- nMinus1.Sub(nMinus1, bigOne)
- bytes := nMinus1.Bytes()
- for i := range bytes {
- bytes[i] ^= 0xff
- }
- if len(bytes) == 0 || bytes[0]&0x80 == 0 {
- to[0] = 0xff
- to = to[1:]
- length++
- }
- nBytes := copy(to, bytes)
- to = to[nBytes:]
- length += nBytes
- } else if n.Sign() == 0 {
- // A zero is the zero length string
- } else {
- bytes := n.Bytes()
- if len(bytes) > 0 && bytes[0]&0x80 != 0 {
- // We'll have to pad this with a 0x00 in order to
- // stop it looking like a negative number.
- to[0] = 0
- to = to[1:]
- length++
- }
- nBytes := copy(to, bytes)
- to = to[nBytes:]
- length += nBytes
- }
-
- lengthBytes[0] = byte(length >> 24)
- lengthBytes[1] = byte(length >> 16)
- lengthBytes[2] = byte(length >> 8)
- lengthBytes[3] = byte(length)
- return to
-}
-
-func writeInt(w io.Writer, n *big.Int) {
- length := intLength(n)
- buf := make([]byte, length)
- marshalInt(buf, n)
- w.Write(buf)
-}
-
-func writeString(w io.Writer, s []byte) {
- var lengthBytes [4]byte
- lengthBytes[0] = byte(len(s) >> 24)
- lengthBytes[1] = byte(len(s) >> 16)
- lengthBytes[2] = byte(len(s) >> 8)
- lengthBytes[3] = byte(len(s))
- w.Write(lengthBytes[:])
- w.Write(s)
-}
-
-func stringLength(n int) int {
- return 4 + n
-}
-
-func marshalString(to []byte, s []byte) []byte {
- to[0] = byte(len(s) >> 24)
- to[1] = byte(len(s) >> 16)
- to[2] = byte(len(s) >> 8)
- to[3] = byte(len(s))
- to = to[4:]
- copy(to, s)
- return to[len(s):]
-}
-
-var bigIntType = reflect.TypeOf((*big.Int)(nil))
-
-// Decode a packet into its corresponding message.
-func decode(packet []byte) (interface{}, error) {
- var msg interface{}
- switch packet[0] {
- case msgDisconnect:
- msg = new(disconnectMsg)
- case msgServiceRequest:
- msg = new(serviceRequestMsg)
- case msgServiceAccept:
- msg = new(serviceAcceptMsg)
- case msgKexInit:
- msg = new(kexInitMsg)
- case msgKexDHInit:
- msg = new(kexDHInitMsg)
- case msgKexDHReply:
- msg = new(kexDHReplyMsg)
- case msgUserAuthRequest:
- msg = new(userAuthRequestMsg)
- case msgUserAuthSuccess:
- return new(userAuthSuccessMsg), nil
- case msgUserAuthFailure:
- msg = new(userAuthFailureMsg)
- case msgUserAuthPubKeyOk:
- msg = new(userAuthPubKeyOkMsg)
- case msgGlobalRequest:
- msg = new(globalRequestMsg)
- case msgRequestSuccess:
- msg = new(globalRequestSuccessMsg)
- case msgRequestFailure:
- msg = new(globalRequestFailureMsg)
- case msgChannelOpen:
- msg = new(channelOpenMsg)
- case msgChannelData:
- msg = new(channelDataMsg)
- case msgChannelOpenConfirm:
- msg = new(channelOpenConfirmMsg)
- case msgChannelOpenFailure:
- msg = new(channelOpenFailureMsg)
- case msgChannelWindowAdjust:
- msg = new(windowAdjustMsg)
- case msgChannelEOF:
- msg = new(channelEOFMsg)
- case msgChannelClose:
- msg = new(channelCloseMsg)
- case msgChannelRequest:
- msg = new(channelRequestMsg)
- case msgChannelSuccess:
- msg = new(channelRequestSuccessMsg)
- case msgChannelFailure:
- msg = new(channelRequestFailureMsg)
- default:
- return nil, unexpectedMessageError(0, packet[0])
- }
- if err := Unmarshal(packet, msg); err != nil {
- return nil, err
- }
- return msg, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages_test.go
deleted file mode 100644
index e79076412..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/messages_test.go
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "math/big"
- "math/rand"
- "reflect"
- "testing"
- "testing/quick"
-)
-
-var intLengthTests = []struct {
- val, length int
-}{
- {0, 4 + 0},
- {1, 4 + 1},
- {127, 4 + 1},
- {128, 4 + 2},
- {-1, 4 + 1},
-}
-
-func TestIntLength(t *testing.T) {
- for _, test := range intLengthTests {
- v := new(big.Int).SetInt64(int64(test.val))
- length := intLength(v)
- if length != test.length {
- t.Errorf("For %d, got length %d but expected %d", test.val, length, test.length)
- }
- }
-}
-
-type msgAllTypes struct {
- Bool bool `sshtype:"21"`
- Array [16]byte
- Uint64 uint64
- Uint32 uint32
- Uint8 uint8
- String string
- Strings []string
- Bytes []byte
- Int *big.Int
- Rest []byte `ssh:"rest"`
-}
-
-func (t *msgAllTypes) Generate(rand *rand.Rand, size int) reflect.Value {
- m := &msgAllTypes{}
- m.Bool = rand.Intn(2) == 1
- randomBytes(m.Array[:], rand)
- m.Uint64 = uint64(rand.Int63n(1<<63 - 1))
- m.Uint32 = uint32(rand.Intn((1 << 31) - 1))
- m.Uint8 = uint8(rand.Intn(1 << 8))
- m.String = string(m.Array[:])
- m.Strings = randomNameList(rand)
- m.Bytes = m.Array[:]
- m.Int = randomInt(rand)
- m.Rest = m.Array[:]
- return reflect.ValueOf(m)
-}
-
-func TestMarshalUnmarshal(t *testing.T) {
- rand := rand.New(rand.NewSource(0))
- iface := &msgAllTypes{}
- ty := reflect.ValueOf(iface).Type()
-
- n := 100
- if testing.Short() {
- n = 5
- }
- for j := 0; j < n; j++ {
- v, ok := quick.Value(ty, rand)
- if !ok {
- t.Errorf("failed to create value")
- break
- }
-
- m1 := v.Elem().Interface()
- m2 := iface
-
- marshaled := Marshal(m1)
- if err := Unmarshal(marshaled, m2); err != nil {
- t.Errorf("Unmarshal %#v: %s", m1, err)
- break
- }
-
- if !reflect.DeepEqual(v.Interface(), m2) {
- t.Errorf("got: %#v\nwant:%#v\n%x", m2, m1, marshaled)
- break
- }
- }
-}
-
-func TestUnmarshalEmptyPacket(t *testing.T) {
- var b []byte
- var m channelRequestSuccessMsg
- if err := Unmarshal(b, &m); err == nil {
- t.Fatalf("unmarshal of empty slice succeeded")
- }
-}
-
-func TestUnmarshalUnexpectedPacket(t *testing.T) {
- type S struct {
- I uint32 `sshtype:"43"`
- S string
- B bool
- }
-
- s := S{11, "hello", true}
- packet := Marshal(s)
- packet[0] = 42
- roundtrip := S{}
- err := Unmarshal(packet, &roundtrip)
- if err == nil {
- t.Fatal("expected error, not nil")
- }
-}
-
-func TestMarshalPtr(t *testing.T) {
- s := struct {
- S string
- }{"hello"}
-
- m1 := Marshal(s)
- m2 := Marshal(&s)
- if !bytes.Equal(m1, m2) {
- t.Errorf("got %q, want %q for marshaled pointer", m2, m1)
- }
-}
-
-func TestBareMarshalUnmarshal(t *testing.T) {
- type S struct {
- I uint32
- S string
- B bool
- }
-
- s := S{42, "hello", true}
- packet := Marshal(s)
- roundtrip := S{}
- Unmarshal(packet, &roundtrip)
-
- if !reflect.DeepEqual(s, roundtrip) {
- t.Errorf("got %#v, want %#v", roundtrip, s)
- }
-}
-
-func TestBareMarshal(t *testing.T) {
- type S2 struct {
- I uint32
- }
- s := S2{42}
- packet := Marshal(s)
- i, rest, ok := parseUint32(packet)
- if len(rest) > 0 || !ok {
- t.Errorf("parseInt(%q): parse error", packet)
- }
- if i != s.I {
- t.Errorf("got %d, want %d", i, s.I)
- }
-}
-
-func TestUnmarshalShortKexInitPacket(t *testing.T) {
- // This used to panic.
- // Issue 11348
- packet := []byte{0x14, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xff, 0xff, 0xff}
- kim := &kexInitMsg{}
- if err := Unmarshal(packet, kim); err == nil {
- t.Error("truncated packet unmarshaled without error")
- }
-}
-
-func TestMarshalMultiTag(t *testing.T) {
- var res struct {
- A uint32 `sshtype:"1|2"`
- }
-
- good1 := struct {
- A uint32 `sshtype:"1"`
- }{
- 1,
- }
- good2 := struct {
- A uint32 `sshtype:"2"`
- }{
- 1,
- }
-
- if e := Unmarshal(Marshal(good1), &res); e != nil {
- t.Errorf("error unmarshaling multipart tag: %v", e)
- }
-
- if e := Unmarshal(Marshal(good2), &res); e != nil {
- t.Errorf("error unmarshaling multipart tag: %v", e)
- }
-
- bad1 := struct {
- A uint32 `sshtype:"3"`
- }{
- 1,
- }
- if e := Unmarshal(Marshal(bad1), &res); e == nil {
- t.Errorf("bad struct unmarshaled without error")
- }
-}
-
-func randomBytes(out []byte, rand *rand.Rand) {
- for i := 0; i < len(out); i++ {
- out[i] = byte(rand.Int31())
- }
-}
-
-func randomNameList(rand *rand.Rand) []string {
- ret := make([]string, rand.Int31()&15)
- for i := range ret {
- s := make([]byte, 1+(rand.Int31()&15))
- for j := range s {
- s[j] = 'a' + uint8(rand.Int31()&15)
- }
- ret[i] = string(s)
- }
- return ret
-}
-
-func randomInt(rand *rand.Rand) *big.Int {
- return new(big.Int).SetInt64(int64(int32(rand.Uint32())))
-}
-
-func (*kexInitMsg) Generate(rand *rand.Rand, size int) reflect.Value {
- ki := &kexInitMsg{}
- randomBytes(ki.Cookie[:], rand)
- ki.KexAlgos = randomNameList(rand)
- ki.ServerHostKeyAlgos = randomNameList(rand)
- ki.CiphersClientServer = randomNameList(rand)
- ki.CiphersServerClient = randomNameList(rand)
- ki.MACsClientServer = randomNameList(rand)
- ki.MACsServerClient = randomNameList(rand)
- ki.CompressionClientServer = randomNameList(rand)
- ki.CompressionServerClient = randomNameList(rand)
- ki.LanguagesClientServer = randomNameList(rand)
- ki.LanguagesServerClient = randomNameList(rand)
- if rand.Int31()&1 == 1 {
- ki.FirstKexFollows = true
- }
- return reflect.ValueOf(ki)
-}
-
-func (*kexDHInitMsg) Generate(rand *rand.Rand, size int) reflect.Value {
- dhi := &kexDHInitMsg{}
- dhi.X = randomInt(rand)
- return reflect.ValueOf(dhi)
-}
-
-var (
- _kexInitMsg = new(kexInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface()
- _kexDHInitMsg = new(kexDHInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface()
-
- _kexInit = Marshal(_kexInitMsg)
- _kexDHInit = Marshal(_kexDHInitMsg)
-)
-
-func BenchmarkMarshalKexInitMsg(b *testing.B) {
- for i := 0; i < b.N; i++ {
- Marshal(_kexInitMsg)
- }
-}
-
-func BenchmarkUnmarshalKexInitMsg(b *testing.B) {
- m := new(kexInitMsg)
- for i := 0; i < b.N; i++ {
- Unmarshal(_kexInit, m)
- }
-}
-
-func BenchmarkMarshalKexDHInitMsg(b *testing.B) {
- for i := 0; i < b.N; i++ {
- Marshal(_kexDHInitMsg)
- }
-}
-
-func BenchmarkUnmarshalKexDHInitMsg(b *testing.B) {
- m := new(kexDHInitMsg)
- for i := 0; i < b.N; i++ {
- Unmarshal(_kexDHInit, m)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux.go
deleted file mode 100644
index 27a527c10..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux.go
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "encoding/binary"
- "fmt"
- "io"
- "log"
- "sync"
- "sync/atomic"
-)
-
-// debugMux, if set, causes messages in the connection protocol to be
-// logged.
-const debugMux = false
-
-// chanList is a thread safe channel list.
-type chanList struct {
- // protects concurrent access to chans
- sync.Mutex
-
- // chans are indexed by the local id of the channel, which the
- // other side should send in the PeersId field.
- chans []*channel
-
- // This is a debugging aid: it offsets all IDs by this
- // amount. This helps distinguish otherwise identical
- // server/client muxes
- offset uint32
-}
-
-// Assigns a channel ID to the given channel.
-func (c *chanList) add(ch *channel) uint32 {
- c.Lock()
- defer c.Unlock()
- for i := range c.chans {
- if c.chans[i] == nil {
- c.chans[i] = ch
- return uint32(i) + c.offset
- }
- }
- c.chans = append(c.chans, ch)
- return uint32(len(c.chans)-1) + c.offset
-}
-
-// getChan returns the channel for the given ID.
-func (c *chanList) getChan(id uint32) *channel {
- id -= c.offset
-
- c.Lock()
- defer c.Unlock()
- if id < uint32(len(c.chans)) {
- return c.chans[id]
- }
- return nil
-}
-
-func (c *chanList) remove(id uint32) {
- id -= c.offset
- c.Lock()
- if id < uint32(len(c.chans)) {
- c.chans[id] = nil
- }
- c.Unlock()
-}
-
-// dropAll forgets all channels it knows, returning them in a slice.
-func (c *chanList) dropAll() []*channel {
- c.Lock()
- defer c.Unlock()
- var r []*channel
-
- for _, ch := range c.chans {
- if ch == nil {
- continue
- }
- r = append(r, ch)
- }
- c.chans = nil
- return r
-}
-
-// mux represents the state for the SSH connection protocol, which
-// multiplexes many channels onto a single packet transport.
-type mux struct {
- conn packetConn
- chanList chanList
-
- incomingChannels chan NewChannel
-
- globalSentMu sync.Mutex
- globalResponses chan interface{}
- incomingRequests chan *Request
-
- errCond *sync.Cond
- err error
-}
-
-// When debugging, each new chanList instantiation has a different
-// offset.
-var globalOff uint32
-
-func (m *mux) Wait() error {
- m.errCond.L.Lock()
- defer m.errCond.L.Unlock()
- for m.err == nil {
- m.errCond.Wait()
- }
- return m.err
-}
-
-// newMux returns a mux that runs over the given connection.
-func newMux(p packetConn) *mux {
- m := &mux{
- conn: p,
- incomingChannels: make(chan NewChannel, chanSize),
- globalResponses: make(chan interface{}, 1),
- incomingRequests: make(chan *Request, chanSize),
- errCond: newCond(),
- }
- if debugMux {
- m.chanList.offset = atomic.AddUint32(&globalOff, 1)
- }
-
- go m.loop()
- return m
-}
-
-func (m *mux) sendMessage(msg interface{}) error {
- p := Marshal(msg)
- if debugMux {
- log.Printf("send global(%d): %#v", m.chanList.offset, msg)
- }
- return m.conn.writePacket(p)
-}
-
-func (m *mux) SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) {
- if wantReply {
- m.globalSentMu.Lock()
- defer m.globalSentMu.Unlock()
- }
-
- if err := m.sendMessage(globalRequestMsg{
- Type: name,
- WantReply: wantReply,
- Data: payload,
- }); err != nil {
- return false, nil, err
- }
-
- if !wantReply {
- return false, nil, nil
- }
-
- msg, ok := <-m.globalResponses
- if !ok {
- return false, nil, io.EOF
- }
- switch msg := msg.(type) {
- case *globalRequestFailureMsg:
- return false, msg.Data, nil
- case *globalRequestSuccessMsg:
- return true, msg.Data, nil
- default:
- return false, nil, fmt.Errorf("ssh: unexpected response to request: %#v", msg)
- }
-}
-
-// ackRequest must be called after processing a global request that
-// has WantReply set.
-func (m *mux) ackRequest(ok bool, data []byte) error {
- if ok {
- return m.sendMessage(globalRequestSuccessMsg{Data: data})
- }
- return m.sendMessage(globalRequestFailureMsg{Data: data})
-}
-
-func (m *mux) Close() error {
- return m.conn.Close()
-}
-
-// loop runs the connection machine. It will process packets until an
-// error is encountered. To synchronize on loop exit, use mux.Wait.
-func (m *mux) loop() {
- var err error
- for err == nil {
- err = m.onePacket()
- }
-
- for _, ch := range m.chanList.dropAll() {
- ch.close()
- }
-
- close(m.incomingChannels)
- close(m.incomingRequests)
- close(m.globalResponses)
-
- m.conn.Close()
-
- m.errCond.L.Lock()
- m.err = err
- m.errCond.Broadcast()
- m.errCond.L.Unlock()
-
- if debugMux {
- log.Println("loop exit", err)
- }
-}
-
-// onePacket reads and processes one packet.
-func (m *mux) onePacket() error {
- packet, err := m.conn.readPacket()
- if err != nil {
- return err
- }
-
- if debugMux {
- if packet[0] == msgChannelData || packet[0] == msgChannelExtendedData {
- log.Printf("decoding(%d): data packet - %d bytes", m.chanList.offset, len(packet))
- } else {
- p, _ := decode(packet)
- log.Printf("decoding(%d): %d %#v - %d bytes", m.chanList.offset, packet[0], p, len(packet))
- }
- }
-
- switch packet[0] {
- case msgChannelOpen:
- return m.handleChannelOpen(packet)
- case msgGlobalRequest, msgRequestSuccess, msgRequestFailure:
- return m.handleGlobalPacket(packet)
- }
-
- // assume a channel packet.
- if len(packet) < 5 {
- return parseError(packet[0])
- }
- id := binary.BigEndian.Uint32(packet[1:])
- ch := m.chanList.getChan(id)
- if ch == nil {
- return fmt.Errorf("ssh: invalid channel %d", id)
- }
-
- return ch.handlePacket(packet)
-}
-
-func (m *mux) handleGlobalPacket(packet []byte) error {
- msg, err := decode(packet)
- if err != nil {
- return err
- }
-
- switch msg := msg.(type) {
- case *globalRequestMsg:
- m.incomingRequests <- &Request{
- Type: msg.Type,
- WantReply: msg.WantReply,
- Payload: msg.Data,
- mux: m,
- }
- case *globalRequestSuccessMsg, *globalRequestFailureMsg:
- m.globalResponses <- msg
- default:
- panic(fmt.Sprintf("not a global message %#v", msg))
- }
-
- return nil
-}
-
-// handleChannelOpen schedules a channel to be Accept()ed.
-func (m *mux) handleChannelOpen(packet []byte) error {
- var msg channelOpenMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return err
- }
-
- if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 {
- failMsg := channelOpenFailureMsg{
- PeersId: msg.PeersId,
- Reason: ConnectionFailed,
- Message: "invalid request",
- Language: "en_US.UTF-8",
- }
- return m.sendMessage(failMsg)
- }
-
- c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData)
- c.remoteId = msg.PeersId
- c.maxRemotePayload = msg.MaxPacketSize
- c.remoteWin.add(msg.PeersWindow)
- m.incomingChannels <- c
- return nil
-}
-
-func (m *mux) OpenChannel(chanType string, extra []byte) (Channel, <-chan *Request, error) {
- ch, err := m.openChannel(chanType, extra)
- if err != nil {
- return nil, nil, err
- }
-
- return ch, ch.incomingRequests, nil
-}
-
-func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) {
- ch := m.newChannel(chanType, channelOutbound, extra)
-
- ch.maxIncomingPayload = channelMaxPacket
-
- open := channelOpenMsg{
- ChanType: chanType,
- PeersWindow: ch.myWindow,
- MaxPacketSize: ch.maxIncomingPayload,
- TypeSpecificData: extra,
- PeersId: ch.localId,
- }
- if err := m.sendMessage(open); err != nil {
- return nil, err
- }
-
- switch msg := (<-ch.msg).(type) {
- case *channelOpenConfirmMsg:
- return ch, nil
- case *channelOpenFailureMsg:
- return nil, &OpenChannelError{msg.Reason, msg.Message}
- default:
- return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux_test.go
deleted file mode 100644
index 25d2181d6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/mux_test.go
+++ /dev/null
@@ -1,505 +0,0 @@
-// Copyright 2013 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 file.
-
-package ssh
-
-import (
- "io"
- "io/ioutil"
- "sync"
- "testing"
-)
-
-func muxPair() (*mux, *mux) {
- a, b := memPipe()
-
- s := newMux(a)
- c := newMux(b)
-
- return s, c
-}
-
-// Returns both ends of a channel, and the mux for the the 2nd
-// channel.
-func channelPair(t *testing.T) (*channel, *channel, *mux) {
- c, s := muxPair()
-
- res := make(chan *channel, 1)
- go func() {
- newCh, ok := <-s.incomingChannels
- if !ok {
- t.Fatalf("No incoming channel")
- }
- if newCh.ChannelType() != "chan" {
- t.Fatalf("got type %q want chan", newCh.ChannelType())
- }
- ch, _, err := newCh.Accept()
- if err != nil {
- t.Fatalf("Accept %v", err)
- }
- res <- ch.(*channel)
- }()
-
- ch, err := c.openChannel("chan", nil)
- if err != nil {
- t.Fatalf("OpenChannel: %v", err)
- }
-
- return <-res, ch, c
-}
-
-// Test that stderr and stdout can be addressed from different
-// goroutines. This is intended for use with the race detector.
-func TestMuxChannelExtendedThreadSafety(t *testing.T) {
- writer, reader, mux := channelPair(t)
- defer writer.Close()
- defer reader.Close()
- defer mux.Close()
-
- var wr, rd sync.WaitGroup
- magic := "hello world"
-
- wr.Add(2)
- go func() {
- io.WriteString(writer, magic)
- wr.Done()
- }()
- go func() {
- io.WriteString(writer.Stderr(), magic)
- wr.Done()
- }()
-
- rd.Add(2)
- go func() {
- c, err := ioutil.ReadAll(reader)
- if string(c) != magic {
- t.Fatalf("stdout read got %q, want %q (error %s)", c, magic, err)
- }
- rd.Done()
- }()
- go func() {
- c, err := ioutil.ReadAll(reader.Stderr())
- if string(c) != magic {
- t.Fatalf("stderr read got %q, want %q (error %s)", c, magic, err)
- }
- rd.Done()
- }()
-
- wr.Wait()
- writer.CloseWrite()
- rd.Wait()
-}
-
-func TestMuxReadWrite(t *testing.T) {
- s, c, mux := channelPair(t)
- defer s.Close()
- defer c.Close()
- defer mux.Close()
-
- magic := "hello world"
- magicExt := "hello stderr"
- go func() {
- _, err := s.Write([]byte(magic))
- if err != nil {
- t.Fatalf("Write: %v", err)
- }
- _, err = s.Extended(1).Write([]byte(magicExt))
- if err != nil {
- t.Fatalf("Write: %v", err)
- }
- err = s.Close()
- if err != nil {
- t.Fatalf("Close: %v", err)
- }
- }()
-
- var buf [1024]byte
- n, err := c.Read(buf[:])
- if err != nil {
- t.Fatalf("server Read: %v", err)
- }
- got := string(buf[:n])
- if got != magic {
- t.Fatalf("server: got %q want %q", got, magic)
- }
-
- n, err = c.Extended(1).Read(buf[:])
- if err != nil {
- t.Fatalf("server Read: %v", err)
- }
-
- got = string(buf[:n])
- if got != magicExt {
- t.Fatalf("server: got %q want %q", got, magic)
- }
-}
-
-func TestMuxChannelOverflow(t *testing.T) {
- reader, writer, mux := channelPair(t)
- defer reader.Close()
- defer writer.Close()
- defer mux.Close()
-
- wDone := make(chan int, 1)
- go func() {
- if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil {
- t.Errorf("could not fill window: %v", err)
- }
- writer.Write(make([]byte, 1))
- wDone <- 1
- }()
- writer.remoteWin.waitWriterBlocked()
-
- // Send 1 byte.
- packet := make([]byte, 1+4+4+1)
- packet[0] = msgChannelData
- marshalUint32(packet[1:], writer.remoteId)
- marshalUint32(packet[5:], uint32(1))
- packet[9] = 42
-
- if err := writer.mux.conn.writePacket(packet); err != nil {
- t.Errorf("could not send packet")
- }
- if _, err := reader.SendRequest("hello", true, nil); err == nil {
- t.Errorf("SendRequest succeeded.")
- }
- <-wDone
-}
-
-func TestMuxChannelCloseWriteUnblock(t *testing.T) {
- reader, writer, mux := channelPair(t)
- defer reader.Close()
- defer writer.Close()
- defer mux.Close()
-
- wDone := make(chan int, 1)
- go func() {
- if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil {
- t.Errorf("could not fill window: %v", err)
- }
- if _, err := writer.Write(make([]byte, 1)); err != io.EOF {
- t.Errorf("got %v, want EOF for unblock write", err)
- }
- wDone <- 1
- }()
-
- writer.remoteWin.waitWriterBlocked()
- reader.Close()
- <-wDone
-}
-
-func TestMuxConnectionCloseWriteUnblock(t *testing.T) {
- reader, writer, mux := channelPair(t)
- defer reader.Close()
- defer writer.Close()
- defer mux.Close()
-
- wDone := make(chan int, 1)
- go func() {
- if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil {
- t.Errorf("could not fill window: %v", err)
- }
- if _, err := writer.Write(make([]byte, 1)); err != io.EOF {
- t.Errorf("got %v, want EOF for unblock write", err)
- }
- wDone <- 1
- }()
-
- writer.remoteWin.waitWriterBlocked()
- mux.Close()
- <-wDone
-}
-
-func TestMuxReject(t *testing.T) {
- client, server := muxPair()
- defer server.Close()
- defer client.Close()
-
- go func() {
- ch, ok := <-server.incomingChannels
- if !ok {
- t.Fatalf("Accept")
- }
- if ch.ChannelType() != "ch" || string(ch.ExtraData()) != "extra" {
- t.Fatalf("unexpected channel: %q, %q", ch.ChannelType(), ch.ExtraData())
- }
- ch.Reject(RejectionReason(42), "message")
- }()
-
- ch, err := client.openChannel("ch", []byte("extra"))
- if ch != nil {
- t.Fatal("openChannel not rejected")
- }
-
- ocf, ok := err.(*OpenChannelError)
- if !ok {
- t.Errorf("got %#v want *OpenChannelError", err)
- } else if ocf.Reason != 42 || ocf.Message != "message" {
- t.Errorf("got %#v, want {Reason: 42, Message: %q}", ocf, "message")
- }
-
- want := "ssh: rejected: unknown reason 42 (message)"
- if err.Error() != want {
- t.Errorf("got %q, want %q", err.Error(), want)
- }
-}
-
-func TestMuxChannelRequest(t *testing.T) {
- client, server, mux := channelPair(t)
- defer server.Close()
- defer client.Close()
- defer mux.Close()
-
- var received int
- var wg sync.WaitGroup
- wg.Add(1)
- go func() {
- for r := range server.incomingRequests {
- received++
- r.Reply(r.Type == "yes", nil)
- }
- wg.Done()
- }()
- _, err := client.SendRequest("yes", false, nil)
- if err != nil {
- t.Fatalf("SendRequest: %v", err)
- }
- ok, err := client.SendRequest("yes", true, nil)
- if err != nil {
- t.Fatalf("SendRequest: %v", err)
- }
-
- if !ok {
- t.Errorf("SendRequest(yes): %v", ok)
-
- }
-
- ok, err = client.SendRequest("no", true, nil)
- if err != nil {
- t.Fatalf("SendRequest: %v", err)
- }
- if ok {
- t.Errorf("SendRequest(no): %v", ok)
-
- }
-
- client.Close()
- wg.Wait()
-
- if received != 3 {
- t.Errorf("got %d requests, want %d", received, 3)
- }
-}
-
-func TestMuxGlobalRequest(t *testing.T) {
- clientMux, serverMux := muxPair()
- defer serverMux.Close()
- defer clientMux.Close()
-
- var seen bool
- go func() {
- for r := range serverMux.incomingRequests {
- seen = seen || r.Type == "peek"
- if r.WantReply {
- err := r.Reply(r.Type == "yes",
- append([]byte(r.Type), r.Payload...))
- if err != nil {
- t.Errorf("AckRequest: %v", err)
- }
- }
- }
- }()
-
- _, _, err := clientMux.SendRequest("peek", false, nil)
- if err != nil {
- t.Errorf("SendRequest: %v", err)
- }
-
- ok, data, err := clientMux.SendRequest("yes", true, []byte("a"))
- if !ok || string(data) != "yesa" || err != nil {
- t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v",
- ok, data, err)
- }
- if ok, data, err := clientMux.SendRequest("yes", true, []byte("a")); !ok || string(data) != "yesa" || err != nil {
- t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v",
- ok, data, err)
- }
-
- if ok, data, err := clientMux.SendRequest("no", true, []byte("a")); ok || string(data) != "noa" || err != nil {
- t.Errorf("SendRequest(\"no\", true, \"a\"): %v %v %v",
- ok, data, err)
- }
-
- if !seen {
- t.Errorf("never saw 'peek' request")
- }
-}
-
-func TestMuxGlobalRequestUnblock(t *testing.T) {
- clientMux, serverMux := muxPair()
- defer serverMux.Close()
- defer clientMux.Close()
-
- result := make(chan error, 1)
- go func() {
- _, _, err := clientMux.SendRequest("hello", true, nil)
- result <- err
- }()
-
- <-serverMux.incomingRequests
- serverMux.conn.Close()
- err := <-result
-
- if err != io.EOF {
- t.Errorf("want EOF, got %v", io.EOF)
- }
-}
-
-func TestMuxChannelRequestUnblock(t *testing.T) {
- a, b, connB := channelPair(t)
- defer a.Close()
- defer b.Close()
- defer connB.Close()
-
- result := make(chan error, 1)
- go func() {
- _, err := a.SendRequest("hello", true, nil)
- result <- err
- }()
-
- <-b.incomingRequests
- connB.conn.Close()
- err := <-result
-
- if err != io.EOF {
- t.Errorf("want EOF, got %v", err)
- }
-}
-
-func TestMuxCloseChannel(t *testing.T) {
- r, w, mux := channelPair(t)
- defer mux.Close()
- defer r.Close()
- defer w.Close()
-
- result := make(chan error, 1)
- go func() {
- var b [1024]byte
- _, err := r.Read(b[:])
- result <- err
- }()
- if err := w.Close(); err != nil {
- t.Errorf("w.Close: %v", err)
- }
-
- if _, err := w.Write([]byte("hello")); err != io.EOF {
- t.Errorf("got err %v, want io.EOF after Close", err)
- }
-
- if err := <-result; err != io.EOF {
- t.Errorf("got %v (%T), want io.EOF", err, err)
- }
-}
-
-func TestMuxCloseWriteChannel(t *testing.T) {
- r, w, mux := channelPair(t)
- defer mux.Close()
-
- result := make(chan error, 1)
- go func() {
- var b [1024]byte
- _, err := r.Read(b[:])
- result <- err
- }()
- if err := w.CloseWrite(); err != nil {
- t.Errorf("w.CloseWrite: %v", err)
- }
-
- if _, err := w.Write([]byte("hello")); err != io.EOF {
- t.Errorf("got err %v, want io.EOF after CloseWrite", err)
- }
-
- if err := <-result; err != io.EOF {
- t.Errorf("got %v (%T), want io.EOF", err, err)
- }
-}
-
-func TestMuxInvalidRecord(t *testing.T) {
- a, b := muxPair()
- defer a.Close()
- defer b.Close()
-
- packet := make([]byte, 1+4+4+1)
- packet[0] = msgChannelData
- marshalUint32(packet[1:], 29348723 /* invalid channel id */)
- marshalUint32(packet[5:], 1)
- packet[9] = 42
-
- a.conn.writePacket(packet)
- go a.SendRequest("hello", false, nil)
- // 'a' wrote an invalid packet, so 'b' has exited.
- req, ok := <-b.incomingRequests
- if ok {
- t.Errorf("got request %#v after receiving invalid packet", req)
- }
-}
-
-func TestZeroWindowAdjust(t *testing.T) {
- a, b, mux := channelPair(t)
- defer a.Close()
- defer b.Close()
- defer mux.Close()
-
- go func() {
- io.WriteString(a, "hello")
- // bogus adjust.
- a.sendMessage(windowAdjustMsg{})
- io.WriteString(a, "world")
- a.Close()
- }()
-
- want := "helloworld"
- c, _ := ioutil.ReadAll(b)
- if string(c) != want {
- t.Errorf("got %q want %q", c, want)
- }
-}
-
-func TestMuxMaxPacketSize(t *testing.T) {
- a, b, mux := channelPair(t)
- defer a.Close()
- defer b.Close()
- defer mux.Close()
-
- large := make([]byte, a.maxRemotePayload+1)
- packet := make([]byte, 1+4+4+1+len(large))
- packet[0] = msgChannelData
- marshalUint32(packet[1:], a.remoteId)
- marshalUint32(packet[5:], uint32(len(large)))
- packet[9] = 42
-
- if err := a.mux.conn.writePacket(packet); err != nil {
- t.Errorf("could not send packet")
- }
-
- go a.SendRequest("hello", false, nil)
-
- _, ok := <-b.incomingRequests
- if ok {
- t.Errorf("connection still alive after receiving large packet.")
- }
-}
-
-// Don't ship code with debug=true.
-func TestDebug(t *testing.T) {
- if debugMux {
- t.Error("mux debug switched on")
- }
- if debugHandshake {
- t.Error("handshake debug switched on")
- }
- if debugTransport {
- t.Error("transport debug switched on")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/server.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/server.go
deleted file mode 100644
index 148d2cb24..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/server.go
+++ /dev/null
@@ -1,580 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "net"
- "strings"
-)
-
-// The Permissions type holds fine-grained permissions that are
-// specific to a user or a specific authentication method for a user.
-// The Permissions value for a successful authentication attempt is
-// available in ServerConn, so it can be used to pass information from
-// the user-authentication phase to the application layer.
-type Permissions struct {
- // CriticalOptions indicate restrictions to the default
- // permissions, and are typically used in conjunction with
- // user certificates. The standard for SSH certificates
- // defines "force-command" (only allow the given command to
- // execute) and "source-address" (only allow connections from
- // the given address). The SSH package currently only enforces
- // the "source-address" critical option. It is up to server
- // implementations to enforce other critical options, such as
- // "force-command", by checking them after the SSH handshake
- // is successful. In general, SSH servers should reject
- // connections that specify critical options that are unknown
- // or not supported.
- CriticalOptions map[string]string
-
- // Extensions are extra functionality that the server may
- // offer on authenticated connections. Lack of support for an
- // extension does not preclude authenticating a user. Common
- // extensions are "permit-agent-forwarding",
- // "permit-X11-forwarding". The Go SSH library currently does
- // not act on any extension, and it is up to server
- // implementations to honor them. Extensions can be used to
- // pass data from the authentication callbacks to the server
- // application layer.
- Extensions map[string]string
-}
-
-// ServerConfig holds server specific configuration data.
-type ServerConfig struct {
- // Config contains configuration shared between client and server.
- Config
-
- hostKeys []Signer
-
- // NoClientAuth is true if clients are allowed to connect without
- // authenticating.
- NoClientAuth bool
-
- // MaxAuthTries specifies the maximum number of authentication attempts
- // permitted per connection. If set to a negative number, the number of
- // attempts are unlimited. If set to zero, the number of attempts are limited
- // to 6.
- MaxAuthTries int
-
- // PasswordCallback, if non-nil, is called when a user
- // attempts to authenticate using a password.
- PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error)
-
- // PublicKeyCallback, if non-nil, is called when a client
- // offers a public key for authentication. It must return a nil error
- // if the given public key can be used to authenticate the
- // given user. For example, see CertChecker.Authenticate. A
- // call to this function does not guarantee that the key
- // offered is in fact used to authenticate. To record any data
- // depending on the public key, store it inside a
- // Permissions.Extensions entry.
- PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error)
-
- // KeyboardInteractiveCallback, if non-nil, is called when
- // keyboard-interactive authentication is selected (RFC
- // 4256). The client object's Challenge function should be
- // used to query the user. The callback may offer multiple
- // Challenge rounds. To avoid information leaks, the client
- // should be presented a challenge even if the user is
- // unknown.
- KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error)
-
- // AuthLogCallback, if non-nil, is called to log all authentication
- // attempts.
- AuthLogCallback func(conn ConnMetadata, method string, err error)
-
- // ServerVersion is the version identification string to announce in
- // the public handshake.
- // If empty, a reasonable default is used.
- // Note that RFC 4253 section 4.2 requires that this string start with
- // "SSH-2.0-".
- ServerVersion string
-
- // BannerCallback, if present, is called and the return string is sent to
- // the client after key exchange completed but before authentication.
- BannerCallback func(conn ConnMetadata) string
-}
-
-// AddHostKey adds a private key as a host key. If an existing host
-// key exists with the same algorithm, it is overwritten. Each server
-// config must have at least one host key.
-func (s *ServerConfig) AddHostKey(key Signer) {
- for i, k := range s.hostKeys {
- if k.PublicKey().Type() == key.PublicKey().Type() {
- s.hostKeys[i] = key
- return
- }
- }
-
- s.hostKeys = append(s.hostKeys, key)
-}
-
-// cachedPubKey contains the results of querying whether a public key is
-// acceptable for a user.
-type cachedPubKey struct {
- user string
- pubKeyData []byte
- result error
- perms *Permissions
-}
-
-const maxCachedPubKeys = 16
-
-// pubKeyCache caches tests for public keys. Since SSH clients
-// will query whether a public key is acceptable before attempting to
-// authenticate with it, we end up with duplicate queries for public
-// key validity. The cache only applies to a single ServerConn.
-type pubKeyCache struct {
- keys []cachedPubKey
-}
-
-// get returns the result for a given user/algo/key tuple.
-func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) {
- for _, k := range c.keys {
- if k.user == user && bytes.Equal(k.pubKeyData, pubKeyData) {
- return k, true
- }
- }
- return cachedPubKey{}, false
-}
-
-// add adds the given tuple to the cache.
-func (c *pubKeyCache) add(candidate cachedPubKey) {
- if len(c.keys) < maxCachedPubKeys {
- c.keys = append(c.keys, candidate)
- }
-}
-
-// ServerConn is an authenticated SSH connection, as seen from the
-// server
-type ServerConn struct {
- Conn
-
- // If the succeeding authentication callback returned a
- // non-nil Permissions pointer, it is stored here.
- Permissions *Permissions
-}
-
-// NewServerConn starts a new SSH server with c as the underlying
-// transport. It starts with a handshake and, if the handshake is
-// unsuccessful, it closes the connection and returns an error. The
-// Request and NewChannel channels must be serviced, or the connection
-// will hang.
-func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error) {
- fullConf := *config
- fullConf.SetDefaults()
- if fullConf.MaxAuthTries == 0 {
- fullConf.MaxAuthTries = 6
- }
-
- s := &connection{
- sshConn: sshConn{conn: c},
- }
- perms, err := s.serverHandshake(&fullConf)
- if err != nil {
- c.Close()
- return nil, nil, nil, err
- }
- return &ServerConn{s, perms}, s.mux.incomingChannels, s.mux.incomingRequests, nil
-}
-
-// signAndMarshal signs the data with the appropriate algorithm,
-// and serializes the result in SSH wire format.
-func signAndMarshal(k Signer, rand io.Reader, data []byte) ([]byte, error) {
- sig, err := k.Sign(rand, data)
- if err != nil {
- return nil, err
- }
-
- return Marshal(sig), nil
-}
-
-// handshake performs key exchange and user authentication.
-func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) {
- if len(config.hostKeys) == 0 {
- return nil, errors.New("ssh: server has no host keys")
- }
-
- if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil && config.KeyboardInteractiveCallback == nil {
- return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false")
- }
-
- if config.ServerVersion != "" {
- s.serverVersion = []byte(config.ServerVersion)
- } else {
- s.serverVersion = []byte(packageVersion)
- }
- var err error
- s.clientVersion, err = exchangeVersions(s.sshConn.conn, s.serverVersion)
- if err != nil {
- return nil, err
- }
-
- tr := newTransport(s.sshConn.conn, config.Rand, false /* not client */)
- s.transport = newServerTransport(tr, s.clientVersion, s.serverVersion, config)
-
- if err := s.transport.waitSession(); err != nil {
- return nil, err
- }
-
- // We just did the key change, so the session ID is established.
- s.sessionID = s.transport.getSessionID()
-
- var packet []byte
- if packet, err = s.transport.readPacket(); err != nil {
- return nil, err
- }
-
- var serviceRequest serviceRequestMsg
- if err = Unmarshal(packet, &serviceRequest); err != nil {
- return nil, err
- }
- if serviceRequest.Service != serviceUserAuth {
- return nil, errors.New("ssh: requested service '" + serviceRequest.Service + "' before authenticating")
- }
- serviceAccept := serviceAcceptMsg{
- Service: serviceUserAuth,
- }
- if err := s.transport.writePacket(Marshal(&serviceAccept)); err != nil {
- return nil, err
- }
-
- perms, err := s.serverAuthenticate(config)
- if err != nil {
- return nil, err
- }
- s.mux = newMux(s.transport)
- return perms, err
-}
-
-func isAcceptableAlgo(algo string) bool {
- switch algo {
- case KeyAlgoRSA, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoED25519,
- CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01:
- return true
- }
- return false
-}
-
-func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
- if addr == nil {
- return errors.New("ssh: no address known for client, but source-address match required")
- }
-
- tcpAddr, ok := addr.(*net.TCPAddr)
- if !ok {
- return fmt.Errorf("ssh: remote address %v is not an TCP address when checking source-address match", addr)
- }
-
- for _, sourceAddr := range strings.Split(sourceAddrs, ",") {
- if allowedIP := net.ParseIP(sourceAddr); allowedIP != nil {
- if allowedIP.Equal(tcpAddr.IP) {
- return nil
- }
- } else {
- _, ipNet, err := net.ParseCIDR(sourceAddr)
- if err != nil {
- return fmt.Errorf("ssh: error parsing source-address restriction %q: %v", sourceAddr, err)
- }
-
- if ipNet.Contains(tcpAddr.IP) {
- return nil
- }
- }
- }
-
- return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr)
-}
-
-// ServerAuthError implements the error interface. It appends any authentication
-// errors that may occur, and is returned if all of the authentication methods
-// provided by the user failed to authenticate.
-type ServerAuthError struct {
- // Errors contains authentication errors returned by the authentication
- // callback methods.
- Errors []error
-}
-
-func (l ServerAuthError) Error() string {
- var errs []string
- for _, err := range l.Errors {
- errs = append(errs, err.Error())
- }
- return "[" + strings.Join(errs, ", ") + "]"
-}
-
-func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) {
- sessionID := s.transport.getSessionID()
- var cache pubKeyCache
- var perms *Permissions
-
- authFailures := 0
- var authErrs []error
-
-userAuthLoop:
- for {
- if authFailures >= config.MaxAuthTries && config.MaxAuthTries > 0 {
- discMsg := &disconnectMsg{
- Reason: 2,
- Message: "too many authentication failures",
- }
-
- if err := s.transport.writePacket(Marshal(discMsg)); err != nil {
- return nil, err
- }
-
- return nil, discMsg
- }
-
- var userAuthReq userAuthRequestMsg
- if packet, err := s.transport.readPacket(); err != nil {
- if err == io.EOF {
- return nil, &ServerAuthError{Errors: authErrs}
- }
- return nil, err
- } else if err = Unmarshal(packet, &userAuthReq); err != nil {
- return nil, err
- }
-
- if userAuthReq.Service != serviceSSH {
- return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service)
- }
-
- s.user = userAuthReq.User
-
- if authFailures == 0 && config.BannerCallback != nil {
- msg := config.BannerCallback(s)
- if msg != "" {
- bannerMsg := &userAuthBannerMsg{
- Message: msg,
- }
- if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil {
- return nil, err
- }
- }
- }
-
- perms = nil
- authErr := errors.New("no auth passed yet")
-
- switch userAuthReq.Method {
- case "none":
- if config.NoClientAuth {
- authErr = nil
- }
-
- // allow initial attempt of 'none' without penalty
- if authFailures == 0 {
- authFailures--
- }
- case "password":
- if config.PasswordCallback == nil {
- authErr = errors.New("ssh: password auth not configured")
- break
- }
- payload := userAuthReq.Payload
- if len(payload) < 1 || payload[0] != 0 {
- return nil, parseError(msgUserAuthRequest)
- }
- payload = payload[1:]
- password, payload, ok := parseString(payload)
- if !ok || len(payload) > 0 {
- return nil, parseError(msgUserAuthRequest)
- }
-
- perms, authErr = config.PasswordCallback(s, password)
- case "keyboard-interactive":
- if config.KeyboardInteractiveCallback == nil {
- authErr = errors.New("ssh: keyboard-interactive auth not configubred")
- break
- }
-
- prompter := &sshClientKeyboardInteractive{s}
- perms, authErr = config.KeyboardInteractiveCallback(s, prompter.Challenge)
- case "publickey":
- if config.PublicKeyCallback == nil {
- authErr = errors.New("ssh: publickey auth not configured")
- break
- }
- payload := userAuthReq.Payload
- if len(payload) < 1 {
- return nil, parseError(msgUserAuthRequest)
- }
- isQuery := payload[0] == 0
- payload = payload[1:]
- algoBytes, payload, ok := parseString(payload)
- if !ok {
- return nil, parseError(msgUserAuthRequest)
- }
- algo := string(algoBytes)
- if !isAcceptableAlgo(algo) {
- authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo)
- break
- }
-
- pubKeyData, payload, ok := parseString(payload)
- if !ok {
- return nil, parseError(msgUserAuthRequest)
- }
-
- pubKey, err := ParsePublicKey(pubKeyData)
- if err != nil {
- return nil, err
- }
-
- candidate, ok := cache.get(s.user, pubKeyData)
- if !ok {
- candidate.user = s.user
- candidate.pubKeyData = pubKeyData
- candidate.perms, candidate.result = config.PublicKeyCallback(s, pubKey)
- if candidate.result == nil && candidate.perms != nil && candidate.perms.CriticalOptions != nil && candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" {
- candidate.result = checkSourceAddress(
- s.RemoteAddr(),
- candidate.perms.CriticalOptions[sourceAddressCriticalOption])
- }
- cache.add(candidate)
- }
-
- if isQuery {
- // The client can query if the given public key
- // would be okay.
-
- if len(payload) > 0 {
- return nil, parseError(msgUserAuthRequest)
- }
-
- if candidate.result == nil {
- okMsg := userAuthPubKeyOkMsg{
- Algo: algo,
- PubKey: pubKeyData,
- }
- if err = s.transport.writePacket(Marshal(&okMsg)); err != nil {
- return nil, err
- }
- continue userAuthLoop
- }
- authErr = candidate.result
- } else {
- sig, payload, ok := parseSignature(payload)
- if !ok || len(payload) > 0 {
- return nil, parseError(msgUserAuthRequest)
- }
- // Ensure the public key algo and signature algo
- // are supported. Compare the private key
- // algorithm name that corresponds to algo with
- // sig.Format. This is usually the same, but
- // for certs, the names differ.
- if !isAcceptableAlgo(sig.Format) {
- break
- }
- signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData)
-
- if err := pubKey.Verify(signedData, sig); err != nil {
- return nil, err
- }
-
- authErr = candidate.result
- perms = candidate.perms
- }
- default:
- authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method)
- }
-
- authErrs = append(authErrs, authErr)
-
- if config.AuthLogCallback != nil {
- config.AuthLogCallback(s, userAuthReq.Method, authErr)
- }
-
- if authErr == nil {
- break userAuthLoop
- }
-
- authFailures++
-
- var failureMsg userAuthFailureMsg
- if config.PasswordCallback != nil {
- failureMsg.Methods = append(failureMsg.Methods, "password")
- }
- if config.PublicKeyCallback != nil {
- failureMsg.Methods = append(failureMsg.Methods, "publickey")
- }
- if config.KeyboardInteractiveCallback != nil {
- failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive")
- }
-
- if len(failureMsg.Methods) == 0 {
- return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false")
- }
-
- if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil {
- return nil, err
- }
- }
-
- if err := s.transport.writePacket([]byte{msgUserAuthSuccess}); err != nil {
- return nil, err
- }
- return perms, nil
-}
-
-// sshClientKeyboardInteractive implements a ClientKeyboardInteractive by
-// asking the client on the other side of a ServerConn.
-type sshClientKeyboardInteractive struct {
- *connection
-}
-
-func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) (answers []string, err error) {
- if len(questions) != len(echos) {
- return nil, errors.New("ssh: echos and questions must have equal length")
- }
-
- var prompts []byte
- for i := range questions {
- prompts = appendString(prompts, questions[i])
- prompts = appendBool(prompts, echos[i])
- }
-
- if err := c.transport.writePacket(Marshal(&userAuthInfoRequestMsg{
- Instruction: instruction,
- NumPrompts: uint32(len(questions)),
- Prompts: prompts,
- })); err != nil {
- return nil, err
- }
-
- packet, err := c.transport.readPacket()
- if err != nil {
- return nil, err
- }
- if packet[0] != msgUserAuthInfoResponse {
- return nil, unexpectedMessageError(msgUserAuthInfoResponse, packet[0])
- }
- packet = packet[1:]
-
- n, packet, ok := parseUint32(packet)
- if !ok || int(n) != len(questions) {
- return nil, parseError(msgUserAuthInfoResponse)
- }
-
- for i := uint32(0); i < n; i++ {
- ans, rest, ok := parseString(packet)
- if !ok {
- return nil, parseError(msgUserAuthInfoResponse)
- }
-
- answers = append(answers, string(ans))
- packet = rest
- }
- if len(packet) != 0 {
- return nil, errors.New("ssh: junk at end of message")
- }
-
- return answers, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session.go
deleted file mode 100644
index cc06e03f5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session.go
+++ /dev/null
@@ -1,647 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-// Session implements an interactive session described in
-// "RFC 4254, section 6".
-
-import (
- "bytes"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "sync"
-)
-
-type Signal string
-
-// POSIX signals as listed in RFC 4254 Section 6.10.
-const (
- SIGABRT Signal = "ABRT"
- SIGALRM Signal = "ALRM"
- SIGFPE Signal = "FPE"
- SIGHUP Signal = "HUP"
- SIGILL Signal = "ILL"
- SIGINT Signal = "INT"
- SIGKILL Signal = "KILL"
- SIGPIPE Signal = "PIPE"
- SIGQUIT Signal = "QUIT"
- SIGSEGV Signal = "SEGV"
- SIGTERM Signal = "TERM"
- SIGUSR1 Signal = "USR1"
- SIGUSR2 Signal = "USR2"
-)
-
-var signals = map[Signal]int{
- SIGABRT: 6,
- SIGALRM: 14,
- SIGFPE: 8,
- SIGHUP: 1,
- SIGILL: 4,
- SIGINT: 2,
- SIGKILL: 9,
- SIGPIPE: 13,
- SIGQUIT: 3,
- SIGSEGV: 11,
- SIGTERM: 15,
-}
-
-type TerminalModes map[uint8]uint32
-
-// POSIX terminal mode flags as listed in RFC 4254 Section 8.
-const (
- tty_OP_END = 0
- VINTR = 1
- VQUIT = 2
- VERASE = 3
- VKILL = 4
- VEOF = 5
- VEOL = 6
- VEOL2 = 7
- VSTART = 8
- VSTOP = 9
- VSUSP = 10
- VDSUSP = 11
- VREPRINT = 12
- VWERASE = 13
- VLNEXT = 14
- VFLUSH = 15
- VSWTCH = 16
- VSTATUS = 17
- VDISCARD = 18
- IGNPAR = 30
- PARMRK = 31
- INPCK = 32
- ISTRIP = 33
- INLCR = 34
- IGNCR = 35
- ICRNL = 36
- IUCLC = 37
- IXON = 38
- IXANY = 39
- IXOFF = 40
- IMAXBEL = 41
- ISIG = 50
- ICANON = 51
- XCASE = 52
- ECHO = 53
- ECHOE = 54
- ECHOK = 55
- ECHONL = 56
- NOFLSH = 57
- TOSTOP = 58
- IEXTEN = 59
- ECHOCTL = 60
- ECHOKE = 61
- PENDIN = 62
- OPOST = 70
- OLCUC = 71
- ONLCR = 72
- OCRNL = 73
- ONOCR = 74
- ONLRET = 75
- CS7 = 90
- CS8 = 91
- PARENB = 92
- PARODD = 93
- TTY_OP_ISPEED = 128
- TTY_OP_OSPEED = 129
-)
-
-// A Session represents a connection to a remote command or shell.
-type Session struct {
- // Stdin specifies the remote process's standard input.
- // If Stdin is nil, the remote process reads from an empty
- // bytes.Buffer.
- Stdin io.Reader
-
- // Stdout and Stderr specify the remote process's standard
- // output and error.
- //
- // If either is nil, Run connects the corresponding file
- // descriptor to an instance of ioutil.Discard. There is a
- // fixed amount of buffering that is shared for the two streams.
- // If either blocks it may eventually cause the remote
- // command to block.
- Stdout io.Writer
- Stderr io.Writer
-
- ch Channel // the channel backing this session
- started bool // true once Start, Run or Shell is invoked.
- copyFuncs []func() error
- errors chan error // one send per copyFunc
-
- // true if pipe method is active
- stdinpipe, stdoutpipe, stderrpipe bool
-
- // stdinPipeWriter is non-nil if StdinPipe has not been called
- // and Stdin was specified by the user; it is the write end of
- // a pipe connecting Session.Stdin to the stdin channel.
- stdinPipeWriter io.WriteCloser
-
- exitStatus chan error
-}
-
-// SendRequest sends an out-of-band channel request on the SSH channel
-// underlying the session.
-func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) {
- return s.ch.SendRequest(name, wantReply, payload)
-}
-
-func (s *Session) Close() error {
- return s.ch.Close()
-}
-
-// RFC 4254 Section 6.4.
-type setenvRequest struct {
- Name string
- Value string
-}
-
-// Setenv sets an environment variable that will be applied to any
-// command executed by Shell or Run.
-func (s *Session) Setenv(name, value string) error {
- msg := setenvRequest{
- Name: name,
- Value: value,
- }
- ok, err := s.ch.SendRequest("env", true, Marshal(&msg))
- if err == nil && !ok {
- err = errors.New("ssh: setenv failed")
- }
- return err
-}
-
-// RFC 4254 Section 6.2.
-type ptyRequestMsg struct {
- Term string
- Columns uint32
- Rows uint32
- Width uint32
- Height uint32
- Modelist string
-}
-
-// RequestPty requests the association of a pty with the session on the remote host.
-func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error {
- var tm []byte
- for k, v := range termmodes {
- kv := struct {
- Key byte
- Val uint32
- }{k, v}
-
- tm = append(tm, Marshal(&kv)...)
- }
- tm = append(tm, tty_OP_END)
- req := ptyRequestMsg{
- Term: term,
- Columns: uint32(w),
- Rows: uint32(h),
- Width: uint32(w * 8),
- Height: uint32(h * 8),
- Modelist: string(tm),
- }
- ok, err := s.ch.SendRequest("pty-req", true, Marshal(&req))
- if err == nil && !ok {
- err = errors.New("ssh: pty-req failed")
- }
- return err
-}
-
-// RFC 4254 Section 6.5.
-type subsystemRequestMsg struct {
- Subsystem string
-}
-
-// RequestSubsystem requests the association of a subsystem with the session on the remote host.
-// A subsystem is a predefined command that runs in the background when the ssh session is initiated
-func (s *Session) RequestSubsystem(subsystem string) error {
- msg := subsystemRequestMsg{
- Subsystem: subsystem,
- }
- ok, err := s.ch.SendRequest("subsystem", true, Marshal(&msg))
- if err == nil && !ok {
- err = errors.New("ssh: subsystem request failed")
- }
- return err
-}
-
-// RFC 4254 Section 6.7.
-type ptyWindowChangeMsg struct {
- Columns uint32
- Rows uint32
- Width uint32
- Height uint32
-}
-
-// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns.
-func (s *Session) WindowChange(h, w int) error {
- req := ptyWindowChangeMsg{
- Columns: uint32(w),
- Rows: uint32(h),
- Width: uint32(w * 8),
- Height: uint32(h * 8),
- }
- _, err := s.ch.SendRequest("window-change", false, Marshal(&req))
- return err
-}
-
-// RFC 4254 Section 6.9.
-type signalMsg struct {
- Signal string
-}
-
-// Signal sends the given signal to the remote process.
-// sig is one of the SIG* constants.
-func (s *Session) Signal(sig Signal) error {
- msg := signalMsg{
- Signal: string(sig),
- }
-
- _, err := s.ch.SendRequest("signal", false, Marshal(&msg))
- return err
-}
-
-// RFC 4254 Section 6.5.
-type execMsg struct {
- Command string
-}
-
-// Start runs cmd on the remote host. Typically, the remote
-// server passes cmd to the shell for interpretation.
-// A Session only accepts one call to Run, Start or Shell.
-func (s *Session) Start(cmd string) error {
- if s.started {
- return errors.New("ssh: session already started")
- }
- req := execMsg{
- Command: cmd,
- }
-
- ok, err := s.ch.SendRequest("exec", true, Marshal(&req))
- if err == nil && !ok {
- err = fmt.Errorf("ssh: command %v failed", cmd)
- }
- if err != nil {
- return err
- }
- return s.start()
-}
-
-// Run runs cmd on the remote host. Typically, the remote
-// server passes cmd to the shell for interpretation.
-// A Session only accepts one call to Run, Start, Shell, Output,
-// or CombinedOutput.
-//
-// The returned error is nil if the command runs, has no problems
-// copying stdin, stdout, and stderr, and exits with a zero exit
-// status.
-//
-// If the remote server does not send an exit status, an error of type
-// *ExitMissingError is returned. If the command completes
-// unsuccessfully or is interrupted by a signal, the error is of type
-// *ExitError. Other error types may be returned for I/O problems.
-func (s *Session) Run(cmd string) error {
- err := s.Start(cmd)
- if err != nil {
- return err
- }
- return s.Wait()
-}
-
-// Output runs cmd on the remote host and returns its standard output.
-func (s *Session) Output(cmd string) ([]byte, error) {
- if s.Stdout != nil {
- return nil, errors.New("ssh: Stdout already set")
- }
- var b bytes.Buffer
- s.Stdout = &b
- err := s.Run(cmd)
- return b.Bytes(), err
-}
-
-type singleWriter struct {
- b bytes.Buffer
- mu sync.Mutex
-}
-
-func (w *singleWriter) Write(p []byte) (int, error) {
- w.mu.Lock()
- defer w.mu.Unlock()
- return w.b.Write(p)
-}
-
-// CombinedOutput runs cmd on the remote host and returns its combined
-// standard output and standard error.
-func (s *Session) CombinedOutput(cmd string) ([]byte, error) {
- if s.Stdout != nil {
- return nil, errors.New("ssh: Stdout already set")
- }
- if s.Stderr != nil {
- return nil, errors.New("ssh: Stderr already set")
- }
- var b singleWriter
- s.Stdout = &b
- s.Stderr = &b
- err := s.Run(cmd)
- return b.b.Bytes(), err
-}
-
-// Shell starts a login shell on the remote host. A Session only
-// accepts one call to Run, Start, Shell, Output, or CombinedOutput.
-func (s *Session) Shell() error {
- if s.started {
- return errors.New("ssh: session already started")
- }
-
- ok, err := s.ch.SendRequest("shell", true, nil)
- if err == nil && !ok {
- return errors.New("ssh: could not start shell")
- }
- if err != nil {
- return err
- }
- return s.start()
-}
-
-func (s *Session) start() error {
- s.started = true
-
- type F func(*Session)
- for _, setupFd := range []F{(*Session).stdin, (*Session).stdout, (*Session).stderr} {
- setupFd(s)
- }
-
- s.errors = make(chan error, len(s.copyFuncs))
- for _, fn := range s.copyFuncs {
- go func(fn func() error) {
- s.errors <- fn()
- }(fn)
- }
- return nil
-}
-
-// Wait waits for the remote command to exit.
-//
-// The returned error is nil if the command runs, has no problems
-// copying stdin, stdout, and stderr, and exits with a zero exit
-// status.
-//
-// If the remote server does not send an exit status, an error of type
-// *ExitMissingError is returned. If the command completes
-// unsuccessfully or is interrupted by a signal, the error is of type
-// *ExitError. Other error types may be returned for I/O problems.
-func (s *Session) Wait() error {
- if !s.started {
- return errors.New("ssh: session not started")
- }
- waitErr := <-s.exitStatus
-
- if s.stdinPipeWriter != nil {
- s.stdinPipeWriter.Close()
- }
- var copyError error
- for _ = range s.copyFuncs {
- if err := <-s.errors; err != nil && copyError == nil {
- copyError = err
- }
- }
- if waitErr != nil {
- return waitErr
- }
- return copyError
-}
-
-func (s *Session) wait(reqs <-chan *Request) error {
- wm := Waitmsg{status: -1}
- // Wait for msg channel to be closed before returning.
- for msg := range reqs {
- switch msg.Type {
- case "exit-status":
- wm.status = int(binary.BigEndian.Uint32(msg.Payload))
- case "exit-signal":
- var sigval struct {
- Signal string
- CoreDumped bool
- Error string
- Lang string
- }
- if err := Unmarshal(msg.Payload, &sigval); err != nil {
- return err
- }
-
- // Must sanitize strings?
- wm.signal = sigval.Signal
- wm.msg = sigval.Error
- wm.lang = sigval.Lang
- default:
- // This handles keepalives and matches
- // OpenSSH's behaviour.
- if msg.WantReply {
- msg.Reply(false, nil)
- }
- }
- }
- if wm.status == 0 {
- return nil
- }
- if wm.status == -1 {
- // exit-status was never sent from server
- if wm.signal == "" {
- // signal was not sent either. RFC 4254
- // section 6.10 recommends against this
- // behavior, but it is allowed, so we let
- // clients handle it.
- return &ExitMissingError{}
- }
- wm.status = 128
- if _, ok := signals[Signal(wm.signal)]; ok {
- wm.status += signals[Signal(wm.signal)]
- }
- }
-
- return &ExitError{wm}
-}
-
-// ExitMissingError is returned if a session is torn down cleanly, but
-// the server sends no confirmation of the exit status.
-type ExitMissingError struct{}
-
-func (e *ExitMissingError) Error() string {
- return "wait: remote command exited without exit status or exit signal"
-}
-
-func (s *Session) stdin() {
- if s.stdinpipe {
- return
- }
- var stdin io.Reader
- if s.Stdin == nil {
- stdin = new(bytes.Buffer)
- } else {
- r, w := io.Pipe()
- go func() {
- _, err := io.Copy(w, s.Stdin)
- w.CloseWithError(err)
- }()
- stdin, s.stdinPipeWriter = r, w
- }
- s.copyFuncs = append(s.copyFuncs, func() error {
- _, err := io.Copy(s.ch, stdin)
- if err1 := s.ch.CloseWrite(); err == nil && err1 != io.EOF {
- err = err1
- }
- return err
- })
-}
-
-func (s *Session) stdout() {
- if s.stdoutpipe {
- return
- }
- if s.Stdout == nil {
- s.Stdout = ioutil.Discard
- }
- s.copyFuncs = append(s.copyFuncs, func() error {
- _, err := io.Copy(s.Stdout, s.ch)
- return err
- })
-}
-
-func (s *Session) stderr() {
- if s.stderrpipe {
- return
- }
- if s.Stderr == nil {
- s.Stderr = ioutil.Discard
- }
- s.copyFuncs = append(s.copyFuncs, func() error {
- _, err := io.Copy(s.Stderr, s.ch.Stderr())
- return err
- })
-}
-
-// sessionStdin reroutes Close to CloseWrite.
-type sessionStdin struct {
- io.Writer
- ch Channel
-}
-
-func (s *sessionStdin) Close() error {
- return s.ch.CloseWrite()
-}
-
-// StdinPipe returns a pipe that will be connected to the
-// remote command's standard input when the command starts.
-func (s *Session) StdinPipe() (io.WriteCloser, error) {
- if s.Stdin != nil {
- return nil, errors.New("ssh: Stdin already set")
- }
- if s.started {
- return nil, errors.New("ssh: StdinPipe after process started")
- }
- s.stdinpipe = true
- return &sessionStdin{s.ch, s.ch}, nil
-}
-
-// StdoutPipe returns a pipe that will be connected to the
-// remote command's standard output when the command starts.
-// There is a fixed amount of buffering that is shared between
-// stdout and stderr streams. If the StdoutPipe reader is
-// not serviced fast enough it may eventually cause the
-// remote command to block.
-func (s *Session) StdoutPipe() (io.Reader, error) {
- if s.Stdout != nil {
- return nil, errors.New("ssh: Stdout already set")
- }
- if s.started {
- return nil, errors.New("ssh: StdoutPipe after process started")
- }
- s.stdoutpipe = true
- return s.ch, nil
-}
-
-// StderrPipe returns a pipe that will be connected to the
-// remote command's standard error when the command starts.
-// There is a fixed amount of buffering that is shared between
-// stdout and stderr streams. If the StderrPipe reader is
-// not serviced fast enough it may eventually cause the
-// remote command to block.
-func (s *Session) StderrPipe() (io.Reader, error) {
- if s.Stderr != nil {
- return nil, errors.New("ssh: Stderr already set")
- }
- if s.started {
- return nil, errors.New("ssh: StderrPipe after process started")
- }
- s.stderrpipe = true
- return s.ch.Stderr(), nil
-}
-
-// newSession returns a new interactive session on the remote host.
-func newSession(ch Channel, reqs <-chan *Request) (*Session, error) {
- s := &Session{
- ch: ch,
- }
- s.exitStatus = make(chan error, 1)
- go func() {
- s.exitStatus <- s.wait(reqs)
- }()
-
- return s, nil
-}
-
-// An ExitError reports unsuccessful completion of a remote command.
-type ExitError struct {
- Waitmsg
-}
-
-func (e *ExitError) Error() string {
- return e.Waitmsg.String()
-}
-
-// Waitmsg stores the information about an exited remote command
-// as reported by Wait.
-type Waitmsg struct {
- status int
- signal string
- msg string
- lang string
-}
-
-// ExitStatus returns the exit status of the remote command.
-func (w Waitmsg) ExitStatus() int {
- return w.status
-}
-
-// Signal returns the exit signal of the remote command if
-// it was terminated violently.
-func (w Waitmsg) Signal() string {
- return w.signal
-}
-
-// Msg returns the exit message given by the remote command
-func (w Waitmsg) Msg() string {
- return w.msg
-}
-
-// Lang returns the language tag. See RFC 3066
-func (w Waitmsg) Lang() string {
- return w.lang
-}
-
-func (w Waitmsg) String() string {
- str := fmt.Sprintf("Process exited with status %v", w.status)
- if w.signal != "" {
- str += fmt.Sprintf(" from signal %v", w.signal)
- }
- if w.msg != "" {
- str += fmt.Sprintf(". Reason was: %v", w.msg)
- }
- return str
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session_test.go
deleted file mode 100644
index 7dce6dd69..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/session_test.go
+++ /dev/null
@@ -1,774 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-// Session tests.
-
-import (
- "bytes"
- crypto_rand "crypto/rand"
- "errors"
- "io"
- "io/ioutil"
- "math/rand"
- "net"
- "testing"
-
- "golang.org/x/crypto/ssh/terminal"
-)
-
-type serverType func(Channel, <-chan *Request, *testing.T)
-
-// dial constructs a new test server and returns a *ClientConn.
-func dial(handler serverType, t *testing.T) *Client {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
-
- go func() {
- defer c1.Close()
- conf := ServerConfig{
- NoClientAuth: true,
- }
- conf.AddHostKey(testSigners["rsa"])
-
- _, chans, reqs, err := NewServerConn(c1, &conf)
- if err != nil {
- t.Fatalf("Unable to handshake: %v", err)
- }
- go DiscardRequests(reqs)
-
- for newCh := range chans {
- if newCh.ChannelType() != "session" {
- newCh.Reject(UnknownChannelType, "unknown channel type")
- continue
- }
-
- ch, inReqs, err := newCh.Accept()
- if err != nil {
- t.Errorf("Accept: %v", err)
- continue
- }
- go func() {
- handler(ch, inReqs, t)
- }()
- }
- }()
-
- config := &ClientConfig{
- User: "testuser",
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
-
- conn, chans, reqs, err := NewClientConn(c2, "", config)
- if err != nil {
- t.Fatalf("unable to dial remote side: %v", err)
- }
-
- return NewClient(conn, chans, reqs)
-}
-
-// Test a simple string is returned to session.Stdout.
-func TestSessionShell(t *testing.T) {
- conn := dial(shellHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- stdout := new(bytes.Buffer)
- session.Stdout = stdout
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %s", err)
- }
- if err := session.Wait(); err != nil {
- t.Fatalf("Remote command did not exit cleanly: %v", err)
- }
- actual := stdout.String()
- if actual != "golang" {
- t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual)
- }
-}
-
-// TODO(dfc) add support for Std{in,err}Pipe when the Server supports it.
-
-// Test a simple string is returned via StdoutPipe.
-func TestSessionStdoutPipe(t *testing.T) {
- conn := dial(shellHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("Unable to request StdoutPipe(): %v", err)
- }
- var buf bytes.Buffer
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- done := make(chan bool, 1)
- go func() {
- if _, err := io.Copy(&buf, stdout); err != nil {
- t.Errorf("Copy of stdout failed: %v", err)
- }
- done <- true
- }()
- if err := session.Wait(); err != nil {
- t.Fatalf("Remote command did not exit cleanly: %v", err)
- }
- <-done
- actual := buf.String()
- if actual != "golang" {
- t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual)
- }
-}
-
-// Test that a simple string is returned via the Output helper,
-// and that stderr is discarded.
-func TestSessionOutput(t *testing.T) {
- conn := dial(fixedOutputHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
-
- buf, err := session.Output("") // cmd is ignored by fixedOutputHandler
- if err != nil {
- t.Error("Remote command did not exit cleanly:", err)
- }
- w := "this-is-stdout."
- g := string(buf)
- if g != w {
- t.Error("Remote command did not return expected string:")
- t.Logf("want %q", w)
- t.Logf("got %q", g)
- }
-}
-
-// Test that both stdout and stderr are returned
-// via the CombinedOutput helper.
-func TestSessionCombinedOutput(t *testing.T) {
- conn := dial(fixedOutputHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
-
- buf, err := session.CombinedOutput("") // cmd is ignored by fixedOutputHandler
- if err != nil {
- t.Error("Remote command did not exit cleanly:", err)
- }
- const stdout = "this-is-stdout."
- const stderr = "this-is-stderr."
- g := string(buf)
- if g != stdout+stderr && g != stderr+stdout {
- t.Error("Remote command did not return expected string:")
- t.Logf("want %q, or %q", stdout+stderr, stderr+stdout)
- t.Logf("got %q", g)
- }
-}
-
-// Test non-0 exit status is returned correctly.
-func TestExitStatusNonZero(t *testing.T) {
- conn := dial(exitStatusNonZeroHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err == nil {
- t.Fatalf("expected command to fail but it didn't")
- }
- e, ok := err.(*ExitError)
- if !ok {
- t.Fatalf("expected *ExitError but got %T", err)
- }
- if e.ExitStatus() != 15 {
- t.Fatalf("expected command to exit with 15 but got %v", e.ExitStatus())
- }
-}
-
-// Test 0 exit status is returned correctly.
-func TestExitStatusZero(t *testing.T) {
- conn := dial(exitStatusZeroHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
-
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err != nil {
- t.Fatalf("expected nil but got %v", err)
- }
-}
-
-// Test exit signal and status are both returned correctly.
-func TestExitSignalAndStatus(t *testing.T) {
- conn := dial(exitSignalAndStatusHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err == nil {
- t.Fatalf("expected command to fail but it didn't")
- }
- e, ok := err.(*ExitError)
- if !ok {
- t.Fatalf("expected *ExitError but got %T", err)
- }
- if e.Signal() != "TERM" || e.ExitStatus() != 15 {
- t.Fatalf("expected command to exit with signal TERM and status 15 but got signal %s and status %v", e.Signal(), e.ExitStatus())
- }
-}
-
-// Test exit signal and status are both returned correctly.
-func TestKnownExitSignalOnly(t *testing.T) {
- conn := dial(exitSignalHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err == nil {
- t.Fatalf("expected command to fail but it didn't")
- }
- e, ok := err.(*ExitError)
- if !ok {
- t.Fatalf("expected *ExitError but got %T", err)
- }
- if e.Signal() != "TERM" || e.ExitStatus() != 143 {
- t.Fatalf("expected command to exit with signal TERM and status 143 but got signal %s and status %v", e.Signal(), e.ExitStatus())
- }
-}
-
-// Test exit signal and status are both returned correctly.
-func TestUnknownExitSignal(t *testing.T) {
- conn := dial(exitSignalUnknownHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err == nil {
- t.Fatalf("expected command to fail but it didn't")
- }
- e, ok := err.(*ExitError)
- if !ok {
- t.Fatalf("expected *ExitError but got %T", err)
- }
- if e.Signal() != "SYS" || e.ExitStatus() != 128 {
- t.Fatalf("expected command to exit with signal SYS and status 128 but got signal %s and status %v", e.Signal(), e.ExitStatus())
- }
-}
-
-func TestExitWithoutStatusOrSignal(t *testing.T) {
- conn := dial(exitWithoutSignalOrStatus, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("Unable to request new session: %v", err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err == nil {
- t.Fatalf("expected command to fail but it didn't")
- }
- if _, ok := err.(*ExitMissingError); !ok {
- t.Fatalf("got %T want *ExitMissingError", err)
- }
-}
-
-// windowTestBytes is the number of bytes that we'll send to the SSH server.
-const windowTestBytes = 16000 * 200
-
-// TestServerWindow writes random data to the server. The server is expected to echo
-// the same data back, which is compared against the original.
-func TestServerWindow(t *testing.T) {
- origBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes))
- io.CopyN(origBuf, crypto_rand.Reader, windowTestBytes)
- origBytes := origBuf.Bytes()
-
- conn := dial(echoHandler, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatal(err)
- }
- defer session.Close()
- result := make(chan []byte)
-
- go func() {
- defer close(result)
- echoedBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes))
- serverStdout, err := session.StdoutPipe()
- if err != nil {
- t.Errorf("StdoutPipe failed: %v", err)
- return
- }
- n, err := copyNRandomly("stdout", echoedBuf, serverStdout, windowTestBytes)
- if err != nil && err != io.EOF {
- t.Errorf("Read only %d bytes from server, expected %d: %v", n, windowTestBytes, err)
- }
- result <- echoedBuf.Bytes()
- }()
-
- serverStdin, err := session.StdinPipe()
- if err != nil {
- t.Fatalf("StdinPipe failed: %v", err)
- }
- written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes)
- if err != nil {
- t.Fatalf("failed to copy origBuf to serverStdin: %v", err)
- }
- if written != windowTestBytes {
- t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes)
- }
-
- echoedBytes := <-result
-
- if !bytes.Equal(origBytes, echoedBytes) {
- t.Fatalf("Echoed buffer differed from original, orig %d, echoed %d", len(origBytes), len(echoedBytes))
- }
-}
-
-// Verify the client can handle a keepalive packet from the server.
-func TestClientHandlesKeepalives(t *testing.T) {
- conn := dial(channelKeepaliveSender, t)
- defer conn.Close()
- session, err := conn.NewSession()
- if err != nil {
- t.Fatal(err)
- }
- defer session.Close()
- if err := session.Shell(); err != nil {
- t.Fatalf("Unable to execute command: %v", err)
- }
- err = session.Wait()
- if err != nil {
- t.Fatalf("expected nil but got: %v", err)
- }
-}
-
-type exitStatusMsg struct {
- Status uint32
-}
-
-type exitSignalMsg struct {
- Signal string
- CoreDumped bool
- Errmsg string
- Lang string
-}
-
-func handleTerminalRequests(in <-chan *Request) {
- for req := range in {
- ok := false
- switch req.Type {
- case "shell":
- ok = true
- if len(req.Payload) > 0 {
- // We don't accept any commands, only the default shell.
- ok = false
- }
- case "env":
- ok = true
- }
- req.Reply(ok, nil)
- }
-}
-
-func newServerShell(ch Channel, in <-chan *Request, prompt string) *terminal.Terminal {
- term := terminal.NewTerminal(ch, prompt)
- go handleTerminalRequests(in)
- return term
-}
-
-func exitStatusZeroHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- // this string is returned to stdout
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- sendStatus(0, ch, t)
-}
-
-func exitStatusNonZeroHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- sendStatus(15, ch, t)
-}
-
-func exitSignalAndStatusHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- sendStatus(15, ch, t)
- sendSignal("TERM", ch, t)
-}
-
-func exitSignalHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- sendSignal("TERM", ch, t)
-}
-
-func exitSignalUnknownHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- sendSignal("SYS", ch, t)
-}
-
-func exitWithoutSignalOrStatus(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
-}
-
-func shellHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- // this string is returned to stdout
- shell := newServerShell(ch, in, "golang")
- readLine(shell, t)
- sendStatus(0, ch, t)
-}
-
-// Ignores the command, writes fixed strings to stderr and stdout.
-// Strings are "this-is-stdout." and "this-is-stderr.".
-func fixedOutputHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- _, err := ch.Read(nil)
-
- req, ok := <-in
- if !ok {
- t.Fatalf("error: expected channel request, got: %#v", err)
- return
- }
-
- // ignore request, always send some text
- req.Reply(true, nil)
-
- _, err = io.WriteString(ch, "this-is-stdout.")
- if err != nil {
- t.Fatalf("error writing on server: %v", err)
- }
- _, err = io.WriteString(ch.Stderr(), "this-is-stderr.")
- if err != nil {
- t.Fatalf("error writing on server: %v", err)
- }
- sendStatus(0, ch, t)
-}
-
-func readLine(shell *terminal.Terminal, t *testing.T) {
- if _, err := shell.ReadLine(); err != nil && err != io.EOF {
- t.Errorf("unable to read line: %v", err)
- }
-}
-
-func sendStatus(status uint32, ch Channel, t *testing.T) {
- msg := exitStatusMsg{
- Status: status,
- }
- if _, err := ch.SendRequest("exit-status", false, Marshal(&msg)); err != nil {
- t.Errorf("unable to send status: %v", err)
- }
-}
-
-func sendSignal(signal string, ch Channel, t *testing.T) {
- sig := exitSignalMsg{
- Signal: signal,
- CoreDumped: false,
- Errmsg: "Process terminated",
- Lang: "en-GB-oed",
- }
- if _, err := ch.SendRequest("exit-signal", false, Marshal(&sig)); err != nil {
- t.Errorf("unable to send signal: %v", err)
- }
-}
-
-func discardHandler(ch Channel, t *testing.T) {
- defer ch.Close()
- io.Copy(ioutil.Discard, ch)
-}
-
-func echoHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- if n, err := copyNRandomly("echohandler", ch, ch, windowTestBytes); err != nil {
- t.Errorf("short write, wrote %d, expected %d: %v ", n, windowTestBytes, err)
- }
-}
-
-// copyNRandomly copies n bytes from src to dst. It uses a variable, and random,
-// buffer size to exercise more code paths.
-func copyNRandomly(title string, dst io.Writer, src io.Reader, n int) (int, error) {
- var (
- buf = make([]byte, 32*1024)
- written int
- remaining = n
- )
- for remaining > 0 {
- l := rand.Intn(1 << 15)
- if remaining < l {
- l = remaining
- }
- nr, er := src.Read(buf[:l])
- nw, ew := dst.Write(buf[:nr])
- remaining -= nw
- written += nw
- if ew != nil {
- return written, ew
- }
- if nr != nw {
- return written, io.ErrShortWrite
- }
- if er != nil && er != io.EOF {
- return written, er
- }
- }
- return written, nil
-}
-
-func channelKeepaliveSender(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- shell := newServerShell(ch, in, "> ")
- readLine(shell, t)
- if _, err := ch.SendRequest("keepalive@openssh.com", true, nil); err != nil {
- t.Errorf("unable to send channel keepalive request: %v", err)
- }
- sendStatus(0, ch, t)
-}
-
-func TestClientWriteEOF(t *testing.T) {
- conn := dial(simpleEchoHandler, t)
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatal(err)
- }
- defer session.Close()
- stdin, err := session.StdinPipe()
- if err != nil {
- t.Fatalf("StdinPipe failed: %v", err)
- }
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("StdoutPipe failed: %v", err)
- }
-
- data := []byte(`0000`)
- _, err = stdin.Write(data)
- if err != nil {
- t.Fatalf("Write failed: %v", err)
- }
- stdin.Close()
-
- res, err := ioutil.ReadAll(stdout)
- if err != nil {
- t.Fatalf("Read failed: %v", err)
- }
-
- if !bytes.Equal(data, res) {
- t.Fatalf("Read differed from write, wrote: %v, read: %v", data, res)
- }
-}
-
-func simpleEchoHandler(ch Channel, in <-chan *Request, t *testing.T) {
- defer ch.Close()
- data, err := ioutil.ReadAll(ch)
- if err != nil {
- t.Errorf("handler read error: %v", err)
- }
- _, err = ch.Write(data)
- if err != nil {
- t.Errorf("handler write error: %v", err)
- }
-}
-
-func TestSessionID(t *testing.T) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- serverID := make(chan []byte, 1)
- clientID := make(chan []byte, 1)
-
- serverConf := &ServerConfig{
- NoClientAuth: true,
- }
- serverConf.AddHostKey(testSigners["ecdsa"])
- clientConf := &ClientConfig{
- HostKeyCallback: InsecureIgnoreHostKey(),
- User: "user",
- }
-
- go func() {
- conn, chans, reqs, err := NewServerConn(c1, serverConf)
- if err != nil {
- t.Fatalf("server handshake: %v", err)
- }
- serverID <- conn.SessionID()
- go DiscardRequests(reqs)
- for ch := range chans {
- ch.Reject(Prohibited, "")
- }
- }()
-
- go func() {
- conn, chans, reqs, err := NewClientConn(c2, "", clientConf)
- if err != nil {
- t.Fatalf("client handshake: %v", err)
- }
- clientID <- conn.SessionID()
- go DiscardRequests(reqs)
- for ch := range chans {
- ch.Reject(Prohibited, "")
- }
- }()
-
- s := <-serverID
- c := <-clientID
- if bytes.Compare(s, c) != 0 {
- t.Errorf("server session ID (%x) != client session ID (%x)", s, c)
- } else if len(s) == 0 {
- t.Errorf("client and server SessionID were empty.")
- }
-}
-
-type noReadConn struct {
- readSeen bool
- net.Conn
-}
-
-func (c *noReadConn) Close() error {
- return nil
-}
-
-func (c *noReadConn) Read(b []byte) (int, error) {
- c.readSeen = true
- return 0, errors.New("noReadConn error")
-}
-
-func TestInvalidServerConfiguration(t *testing.T) {
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- serveConn := noReadConn{Conn: c1}
- serverConf := &ServerConfig{}
-
- NewServerConn(&serveConn, serverConf)
- if serveConn.readSeen {
- t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing host key")
- }
-
- serverConf.AddHostKey(testSigners["ecdsa"])
-
- NewServerConn(&serveConn, serverConf)
- if serveConn.readSeen {
- t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing authentication method")
- }
-}
-
-func TestHostKeyAlgorithms(t *testing.T) {
- serverConf := &ServerConfig{
- NoClientAuth: true,
- }
- serverConf.AddHostKey(testSigners["rsa"])
- serverConf.AddHostKey(testSigners["ecdsa"])
-
- connect := func(clientConf *ClientConfig, want string) {
- var alg string
- clientConf.HostKeyCallback = func(h string, a net.Addr, key PublicKey) error {
- alg = key.Type()
- return nil
- }
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go NewServerConn(c1, serverConf)
- _, _, _, err = NewClientConn(c2, "", clientConf)
- if err != nil {
- t.Fatalf("NewClientConn: %v", err)
- }
- if alg != want {
- t.Errorf("selected key algorithm %s, want %s", alg, want)
- }
- }
-
- // By default, we get the preferred algorithm, which is ECDSA 256.
-
- clientConf := &ClientConfig{
- HostKeyCallback: InsecureIgnoreHostKey(),
- }
- connect(clientConf, KeyAlgoECDSA256)
-
- // Client asks for RSA explicitly.
- clientConf.HostKeyAlgorithms = []string{KeyAlgoRSA}
- connect(clientConf, KeyAlgoRSA)
-
- c1, c2, err := netPipe()
- if err != nil {
- t.Fatalf("netPipe: %v", err)
- }
- defer c1.Close()
- defer c2.Close()
-
- go NewServerConn(c1, serverConf)
- clientConf.HostKeyAlgorithms = []string{"nonexistent-hostkey-algo"}
- _, _, _, err = NewClientConn(c2, "", clientConf)
- if err == nil {
- t.Fatal("succeeded connecting with unknown hostkey algorithm")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/streamlocal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/streamlocal.go
deleted file mode 100644
index a2dccc64c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/streamlocal.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package ssh
-
-import (
- "errors"
- "io"
- "net"
-)
-
-// streamLocalChannelOpenDirectMsg is a struct used for SSH_MSG_CHANNEL_OPEN message
-// with "direct-streamlocal@openssh.com" string.
-//
-// See openssh-portable/PROTOCOL, section 2.4. connection: Unix domain socket forwarding
-// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL#L235
-type streamLocalChannelOpenDirectMsg struct {
- socketPath string
- reserved0 string
- reserved1 uint32
-}
-
-// forwardedStreamLocalPayload is a struct used for SSH_MSG_CHANNEL_OPEN message
-// with "forwarded-streamlocal@openssh.com" string.
-type forwardedStreamLocalPayload struct {
- SocketPath string
- Reserved0 string
-}
-
-// streamLocalChannelForwardMsg is a struct used for SSH2_MSG_GLOBAL_REQUEST message
-// with "streamlocal-forward@openssh.com"/"cancel-streamlocal-forward@openssh.com" string.
-type streamLocalChannelForwardMsg struct {
- socketPath string
-}
-
-// ListenUnix is similar to ListenTCP but uses a Unix domain socket.
-func (c *Client) ListenUnix(socketPath string) (net.Listener, error) {
- m := streamLocalChannelForwardMsg{
- socketPath,
- }
- // send message
- ok, _, err := c.SendRequest("streamlocal-forward@openssh.com", true, Marshal(&m))
- if err != nil {
- return nil, err
- }
- if !ok {
- return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer")
- }
- ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"})
-
- return &unixListener{socketPath, c, ch}, nil
-}
-
-func (c *Client) dialStreamLocal(socketPath string) (Channel, error) {
- msg := streamLocalChannelOpenDirectMsg{
- socketPath: socketPath,
- }
- ch, in, err := c.OpenChannel("direct-streamlocal@openssh.com", Marshal(&msg))
- if err != nil {
- return nil, err
- }
- go DiscardRequests(in)
- return ch, err
-}
-
-type unixListener struct {
- socketPath string
-
- conn *Client
- in <-chan forward
-}
-
-// Accept waits for and returns the next connection to the listener.
-func (l *unixListener) Accept() (net.Conn, error) {
- s, ok := <-l.in
- if !ok {
- return nil, io.EOF
- }
- ch, incoming, err := s.newCh.Accept()
- if err != nil {
- return nil, err
- }
- go DiscardRequests(incoming)
-
- return &chanConn{
- Channel: ch,
- laddr: &net.UnixAddr{
- Name: l.socketPath,
- Net: "unix",
- },
- raddr: &net.UnixAddr{
- Name: "@",
- Net: "unix",
- },
- }, nil
-}
-
-// Close closes the listener.
-func (l *unixListener) Close() error {
- // this also closes the listener.
- l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"})
- m := streamLocalChannelForwardMsg{
- l.socketPath,
- }
- ok, _, err := l.conn.SendRequest("cancel-streamlocal-forward@openssh.com", true, Marshal(&m))
- if err == nil && !ok {
- err = errors.New("ssh: cancel-streamlocal-forward@openssh.com failed")
- }
- return err
-}
-
-// Addr returns the listener's network address.
-func (l *unixListener) Addr() net.Addr {
- return &net.UnixAddr{
- Name: l.socketPath,
- Net: "unix",
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip.go
deleted file mode 100644
index acf17175d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip.go
+++ /dev/null
@@ -1,465 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "errors"
- "fmt"
- "io"
- "math/rand"
- "net"
- "strconv"
- "strings"
- "sync"
- "time"
-)
-
-// Listen requests the remote peer open a listening socket on
-// addr. Incoming connections will be available by calling Accept on
-// the returned net.Listener. The listener must be serviced, or the
-// SSH connection may hang.
-// N must be "tcp", "tcp4", "tcp6", or "unix".
-func (c *Client) Listen(n, addr string) (net.Listener, error) {
- switch n {
- case "tcp", "tcp4", "tcp6":
- laddr, err := net.ResolveTCPAddr(n, addr)
- if err != nil {
- return nil, err
- }
- return c.ListenTCP(laddr)
- case "unix":
- return c.ListenUnix(addr)
- default:
- return nil, fmt.Errorf("ssh: unsupported protocol: %s", n)
- }
-}
-
-// Automatic port allocation is broken with OpenSSH before 6.0. See
-// also https://bugzilla.mindrot.org/show_bug.cgi?id=2017. In
-// particular, OpenSSH 5.9 sends a channelOpenMsg with port number 0,
-// rather than the actual port number. This means you can never open
-// two different listeners with auto allocated ports. We work around
-// this by trying explicit ports until we succeed.
-
-const openSSHPrefix = "OpenSSH_"
-
-var portRandomizer = rand.New(rand.NewSource(time.Now().UnixNano()))
-
-// isBrokenOpenSSHVersion returns true if the given version string
-// specifies a version of OpenSSH that is known to have a bug in port
-// forwarding.
-func isBrokenOpenSSHVersion(versionStr string) bool {
- i := strings.Index(versionStr, openSSHPrefix)
- if i < 0 {
- return false
- }
- i += len(openSSHPrefix)
- j := i
- for ; j < len(versionStr); j++ {
- if versionStr[j] < '0' || versionStr[j] > '9' {
- break
- }
- }
- version, _ := strconv.Atoi(versionStr[i:j])
- return version < 6
-}
-
-// autoPortListenWorkaround simulates automatic port allocation by
-// trying random ports repeatedly.
-func (c *Client) autoPortListenWorkaround(laddr *net.TCPAddr) (net.Listener, error) {
- var sshListener net.Listener
- var err error
- const tries = 10
- for i := 0; i < tries; i++ {
- addr := *laddr
- addr.Port = 1024 + portRandomizer.Intn(60000)
- sshListener, err = c.ListenTCP(&addr)
- if err == nil {
- laddr.Port = addr.Port
- return sshListener, err
- }
- }
- return nil, fmt.Errorf("ssh: listen on random port failed after %d tries: %v", tries, err)
-}
-
-// RFC 4254 7.1
-type channelForwardMsg struct {
- addr string
- rport uint32
-}
-
-// ListenTCP requests the remote peer open a listening socket
-// on laddr. Incoming connections will be available by calling
-// Accept on the returned net.Listener.
-func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) {
- if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) {
- return c.autoPortListenWorkaround(laddr)
- }
-
- m := channelForwardMsg{
- laddr.IP.String(),
- uint32(laddr.Port),
- }
- // send message
- ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m))
- if err != nil {
- return nil, err
- }
- if !ok {
- return nil, errors.New("ssh: tcpip-forward request denied by peer")
- }
-
- // If the original port was 0, then the remote side will
- // supply a real port number in the response.
- if laddr.Port == 0 {
- var p struct {
- Port uint32
- }
- if err := Unmarshal(resp, &p); err != nil {
- return nil, err
- }
- laddr.Port = int(p.Port)
- }
-
- // Register this forward, using the port number we obtained.
- ch := c.forwards.add(laddr)
-
- return &tcpListener{laddr, c, ch}, nil
-}
-
-// forwardList stores a mapping between remote
-// forward requests and the tcpListeners.
-type forwardList struct {
- sync.Mutex
- entries []forwardEntry
-}
-
-// forwardEntry represents an established mapping of a laddr on a
-// remote ssh server to a channel connected to a tcpListener.
-type forwardEntry struct {
- laddr net.Addr
- c chan forward
-}
-
-// forward represents an incoming forwarded tcpip connection. The
-// arguments to add/remove/lookup should be address as specified in
-// the original forward-request.
-type forward struct {
- newCh NewChannel // the ssh client channel underlying this forward
- raddr net.Addr // the raddr of the incoming connection
-}
-
-func (l *forwardList) add(addr net.Addr) chan forward {
- l.Lock()
- defer l.Unlock()
- f := forwardEntry{
- laddr: addr,
- c: make(chan forward, 1),
- }
- l.entries = append(l.entries, f)
- return f.c
-}
-
-// See RFC 4254, section 7.2
-type forwardedTCPPayload struct {
- Addr string
- Port uint32
- OriginAddr string
- OriginPort uint32
-}
-
-// parseTCPAddr parses the originating address from the remote into a *net.TCPAddr.
-func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) {
- if port == 0 || port > 65535 {
- return nil, fmt.Errorf("ssh: port number out of range: %d", port)
- }
- ip := net.ParseIP(string(addr))
- if ip == nil {
- return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr)
- }
- return &net.TCPAddr{IP: ip, Port: int(port)}, nil
-}
-
-func (l *forwardList) handleChannels(in <-chan NewChannel) {
- for ch := range in {
- var (
- laddr net.Addr
- raddr net.Addr
- err error
- )
- switch channelType := ch.ChannelType(); channelType {
- case "forwarded-tcpip":
- var payload forwardedTCPPayload
- if err = Unmarshal(ch.ExtraData(), &payload); err != nil {
- ch.Reject(ConnectionFailed, "could not parse forwarded-tcpip payload: "+err.Error())
- continue
- }
-
- // RFC 4254 section 7.2 specifies that incoming
- // addresses should list the address, in string
- // format. It is implied that this should be an IP
- // address, as it would be impossible to connect to it
- // otherwise.
- laddr, err = parseTCPAddr(payload.Addr, payload.Port)
- if err != nil {
- ch.Reject(ConnectionFailed, err.Error())
- continue
- }
- raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort)
- if err != nil {
- ch.Reject(ConnectionFailed, err.Error())
- continue
- }
-
- case "forwarded-streamlocal@openssh.com":
- var payload forwardedStreamLocalPayload
- if err = Unmarshal(ch.ExtraData(), &payload); err != nil {
- ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error())
- continue
- }
- laddr = &net.UnixAddr{
- Name: payload.SocketPath,
- Net: "unix",
- }
- raddr = &net.UnixAddr{
- Name: "@",
- Net: "unix",
- }
- default:
- panic(fmt.Errorf("ssh: unknown channel type %s", channelType))
- }
- if ok := l.forward(laddr, raddr, ch); !ok {
- // Section 7.2, implementations MUST reject spurious incoming
- // connections.
- ch.Reject(Prohibited, "no forward for address")
- continue
- }
-
- }
-}
-
-// remove removes the forward entry, and the channel feeding its
-// listener.
-func (l *forwardList) remove(addr net.Addr) {
- l.Lock()
- defer l.Unlock()
- for i, f := range l.entries {
- if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() {
- l.entries = append(l.entries[:i], l.entries[i+1:]...)
- close(f.c)
- return
- }
- }
-}
-
-// closeAll closes and clears all forwards.
-func (l *forwardList) closeAll() {
- l.Lock()
- defer l.Unlock()
- for _, f := range l.entries {
- close(f.c)
- }
- l.entries = nil
-}
-
-func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool {
- l.Lock()
- defer l.Unlock()
- for _, f := range l.entries {
- if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() {
- f.c <- forward{newCh: ch, raddr: raddr}
- return true
- }
- }
- return false
-}
-
-type tcpListener struct {
- laddr *net.TCPAddr
-
- conn *Client
- in <-chan forward
-}
-
-// Accept waits for and returns the next connection to the listener.
-func (l *tcpListener) Accept() (net.Conn, error) {
- s, ok := <-l.in
- if !ok {
- return nil, io.EOF
- }
- ch, incoming, err := s.newCh.Accept()
- if err != nil {
- return nil, err
- }
- go DiscardRequests(incoming)
-
- return &chanConn{
- Channel: ch,
- laddr: l.laddr,
- raddr: s.raddr,
- }, nil
-}
-
-// Close closes the listener.
-func (l *tcpListener) Close() error {
- m := channelForwardMsg{
- l.laddr.IP.String(),
- uint32(l.laddr.Port),
- }
-
- // this also closes the listener.
- l.conn.forwards.remove(l.laddr)
- ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m))
- if err == nil && !ok {
- err = errors.New("ssh: cancel-tcpip-forward failed")
- }
- return err
-}
-
-// Addr returns the listener's network address.
-func (l *tcpListener) Addr() net.Addr {
- return l.laddr
-}
-
-// Dial initiates a connection to the addr from the remote host.
-// The resulting connection has a zero LocalAddr() and RemoteAddr().
-func (c *Client) Dial(n, addr string) (net.Conn, error) {
- var ch Channel
- switch n {
- case "tcp", "tcp4", "tcp6":
- // Parse the address into host and numeric port.
- host, portString, err := net.SplitHostPort(addr)
- if err != nil {
- return nil, err
- }
- port, err := strconv.ParseUint(portString, 10, 16)
- if err != nil {
- return nil, err
- }
- ch, err = c.dial(net.IPv4zero.String(), 0, host, int(port))
- if err != nil {
- return nil, err
- }
- // Use a zero address for local and remote address.
- zeroAddr := &net.TCPAddr{
- IP: net.IPv4zero,
- Port: 0,
- }
- return &chanConn{
- Channel: ch,
- laddr: zeroAddr,
- raddr: zeroAddr,
- }, nil
- case "unix":
- var err error
- ch, err = c.dialStreamLocal(addr)
- if err != nil {
- return nil, err
- }
- return &chanConn{
- Channel: ch,
- laddr: &net.UnixAddr{
- Name: "@",
- Net: "unix",
- },
- raddr: &net.UnixAddr{
- Name: addr,
- Net: "unix",
- },
- }, nil
- default:
- return nil, fmt.Errorf("ssh: unsupported protocol: %s", n)
- }
-}
-
-// DialTCP connects to the remote address raddr on the network net,
-// which must be "tcp", "tcp4", or "tcp6". If laddr is not nil, it is used
-// as the local address for the connection.
-func (c *Client) DialTCP(n string, laddr, raddr *net.TCPAddr) (net.Conn, error) {
- if laddr == nil {
- laddr = &net.TCPAddr{
- IP: net.IPv4zero,
- Port: 0,
- }
- }
- ch, err := c.dial(laddr.IP.String(), laddr.Port, raddr.IP.String(), raddr.Port)
- if err != nil {
- return nil, err
- }
- return &chanConn{
- Channel: ch,
- laddr: laddr,
- raddr: raddr,
- }, nil
-}
-
-// RFC 4254 7.2
-type channelOpenDirectMsg struct {
- raddr string
- rport uint32
- laddr string
- lport uint32
-}
-
-func (c *Client) dial(laddr string, lport int, raddr string, rport int) (Channel, error) {
- msg := channelOpenDirectMsg{
- raddr: raddr,
- rport: uint32(rport),
- laddr: laddr,
- lport: uint32(lport),
- }
- ch, in, err := c.OpenChannel("direct-tcpip", Marshal(&msg))
- if err != nil {
- return nil, err
- }
- go DiscardRequests(in)
- return ch, err
-}
-
-type tcpChan struct {
- Channel // the backing channel
-}
-
-// chanConn fulfills the net.Conn interface without
-// the tcpChan having to hold laddr or raddr directly.
-type chanConn struct {
- Channel
- laddr, raddr net.Addr
-}
-
-// LocalAddr returns the local network address.
-func (t *chanConn) LocalAddr() net.Addr {
- return t.laddr
-}
-
-// RemoteAddr returns the remote network address.
-func (t *chanConn) RemoteAddr() net.Addr {
- return t.raddr
-}
-
-// SetDeadline sets the read and write deadlines associated
-// with the connection.
-func (t *chanConn) SetDeadline(deadline time.Time) error {
- if err := t.SetReadDeadline(deadline); err != nil {
- return err
- }
- return t.SetWriteDeadline(deadline)
-}
-
-// SetReadDeadline sets the read deadline.
-// A zero value for t means Read will not time out.
-// After the deadline, the error from Read will implement net.Error
-// with Timeout() == true.
-func (t *chanConn) SetReadDeadline(deadline time.Time) error {
- // for compatibility with previous version,
- // the error message contains "tcpChan"
- return errors.New("ssh: tcpChan: deadline not supported")
-}
-
-// SetWriteDeadline exists to satisfy the net.Conn interface
-// but is not implemented by this type. It always returns an error.
-func (t *chanConn) SetWriteDeadline(deadline time.Time) error {
- return errors.New("ssh: tcpChan: deadline not supported")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip_test.go
deleted file mode 100644
index f1265cb49..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/tcpip_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 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 file.
-
-package ssh
-
-import (
- "testing"
-)
-
-func TestAutoPortListenBroken(t *testing.T) {
- broken := "SSH-2.0-OpenSSH_5.9hh11"
- works := "SSH-2.0-OpenSSH_6.1"
- if !isBrokenOpenSSHVersion(broken) {
- t.Errorf("version %q not marked as broken", broken)
- }
- if isBrokenOpenSSHVersion(works) {
- t.Errorf("version %q marked as broken", works)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal.go
deleted file mode 100644
index 18379a935..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal.go
+++ /dev/null
@@ -1,951 +0,0 @@
-// Copyright 2011 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 file.
-
-package terminal
-
-import (
- "bytes"
- "io"
- "sync"
- "unicode/utf8"
-)
-
-// EscapeCodes contains escape sequences that can be written to the terminal in
-// order to achieve different styles of text.
-type EscapeCodes struct {
- // Foreground colors
- Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte
-
- // Reset all attributes
- Reset []byte
-}
-
-var vt100EscapeCodes = EscapeCodes{
- Black: []byte{keyEscape, '[', '3', '0', 'm'},
- Red: []byte{keyEscape, '[', '3', '1', 'm'},
- Green: []byte{keyEscape, '[', '3', '2', 'm'},
- Yellow: []byte{keyEscape, '[', '3', '3', 'm'},
- Blue: []byte{keyEscape, '[', '3', '4', 'm'},
- Magenta: []byte{keyEscape, '[', '3', '5', 'm'},
- Cyan: []byte{keyEscape, '[', '3', '6', 'm'},
- White: []byte{keyEscape, '[', '3', '7', 'm'},
-
- Reset: []byte{keyEscape, '[', '0', 'm'},
-}
-
-// Terminal contains the state for running a VT100 terminal that is capable of
-// reading lines of input.
-type Terminal struct {
- // AutoCompleteCallback, if non-null, is called for each keypress with
- // the full input line and the current position of the cursor (in
- // bytes, as an index into |line|). If it returns ok=false, the key
- // press is processed normally. Otherwise it returns a replacement line
- // and the new cursor position.
- AutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool)
-
- // Escape contains a pointer to the escape codes for this terminal.
- // It's always a valid pointer, although the escape codes themselves
- // may be empty if the terminal doesn't support them.
- Escape *EscapeCodes
-
- // lock protects the terminal and the state in this object from
- // concurrent processing of a key press and a Write() call.
- lock sync.Mutex
-
- c io.ReadWriter
- prompt []rune
-
- // line is the current line being entered.
- line []rune
- // pos is the logical position of the cursor in line
- pos int
- // echo is true if local echo is enabled
- echo bool
- // pasteActive is true iff there is a bracketed paste operation in
- // progress.
- pasteActive bool
-
- // cursorX contains the current X value of the cursor where the left
- // edge is 0. cursorY contains the row number where the first row of
- // the current line is 0.
- cursorX, cursorY int
- // maxLine is the greatest value of cursorY so far.
- maxLine int
-
- termWidth, termHeight int
-
- // outBuf contains the terminal data to be sent.
- outBuf []byte
- // remainder contains the remainder of any partial key sequences after
- // a read. It aliases into inBuf.
- remainder []byte
- inBuf [256]byte
-
- // history contains previously entered commands so that they can be
- // accessed with the up and down keys.
- history stRingBuffer
- // historyIndex stores the currently accessed history entry, where zero
- // means the immediately previous entry.
- historyIndex int
- // When navigating up and down the history it's possible to return to
- // the incomplete, initial line. That value is stored in
- // historyPending.
- historyPending string
-}
-
-// NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is
-// a local terminal, that terminal must first have been put into raw mode.
-// prompt is a string that is written at the start of each input line (i.e.
-// "> ").
-func NewTerminal(c io.ReadWriter, prompt string) *Terminal {
- return &Terminal{
- Escape: &vt100EscapeCodes,
- c: c,
- prompt: []rune(prompt),
- termWidth: 80,
- termHeight: 24,
- echo: true,
- historyIndex: -1,
- }
-}
-
-const (
- keyCtrlD = 4
- keyCtrlU = 21
- keyEnter = '\r'
- keyEscape = 27
- keyBackspace = 127
- keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota
- keyUp
- keyDown
- keyLeft
- keyRight
- keyAltLeft
- keyAltRight
- keyHome
- keyEnd
- keyDeleteWord
- keyDeleteLine
- keyClearScreen
- keyPasteStart
- keyPasteEnd
-)
-
-var (
- crlf = []byte{'\r', '\n'}
- pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}
- pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'}
-)
-
-// bytesToKey tries to parse a key sequence from b. If successful, it returns
-// the key and the remainder of the input. Otherwise it returns utf8.RuneError.
-func bytesToKey(b []byte, pasteActive bool) (rune, []byte) {
- if len(b) == 0 {
- return utf8.RuneError, nil
- }
-
- if !pasteActive {
- switch b[0] {
- case 1: // ^A
- return keyHome, b[1:]
- case 5: // ^E
- return keyEnd, b[1:]
- case 8: // ^H
- return keyBackspace, b[1:]
- case 11: // ^K
- return keyDeleteLine, b[1:]
- case 12: // ^L
- return keyClearScreen, b[1:]
- case 23: // ^W
- return keyDeleteWord, b[1:]
- }
- }
-
- if b[0] != keyEscape {
- if !utf8.FullRune(b) {
- return utf8.RuneError, b
- }
- r, l := utf8.DecodeRune(b)
- return r, b[l:]
- }
-
- if !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' {
- switch b[2] {
- case 'A':
- return keyUp, b[3:]
- case 'B':
- return keyDown, b[3:]
- case 'C':
- return keyRight, b[3:]
- case 'D':
- return keyLeft, b[3:]
- case 'H':
- return keyHome, b[3:]
- case 'F':
- return keyEnd, b[3:]
- }
- }
-
- if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' {
- switch b[5] {
- case 'C':
- return keyAltRight, b[6:]
- case 'D':
- return keyAltLeft, b[6:]
- }
- }
-
- if !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) {
- return keyPasteStart, b[6:]
- }
-
- if pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) {
- return keyPasteEnd, b[6:]
- }
-
- // If we get here then we have a key that we don't recognise, or a
- // partial sequence. It's not clear how one should find the end of a
- // sequence without knowing them all, but it seems that [a-zA-Z~] only
- // appears at the end of a sequence.
- for i, c := range b[0:] {
- if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' {
- return keyUnknown, b[i+1:]
- }
- }
-
- return utf8.RuneError, b
-}
-
-// queue appends data to the end of t.outBuf
-func (t *Terminal) queue(data []rune) {
- t.outBuf = append(t.outBuf, []byte(string(data))...)
-}
-
-var eraseUnderCursor = []rune{' ', keyEscape, '[', 'D'}
-var space = []rune{' '}
-
-func isPrintable(key rune) bool {
- isInSurrogateArea := key >= 0xd800 && key <= 0xdbff
- return key >= 32 && !isInSurrogateArea
-}
-
-// moveCursorToPos appends data to t.outBuf which will move the cursor to the
-// given, logical position in the text.
-func (t *Terminal) moveCursorToPos(pos int) {
- if !t.echo {
- return
- }
-
- x := visualLength(t.prompt) + pos
- y := x / t.termWidth
- x = x % t.termWidth
-
- up := 0
- if y < t.cursorY {
- up = t.cursorY - y
- }
-
- down := 0
- if y > t.cursorY {
- down = y - t.cursorY
- }
-
- left := 0
- if x < t.cursorX {
- left = t.cursorX - x
- }
-
- right := 0
- if x > t.cursorX {
- right = x - t.cursorX
- }
-
- t.cursorX = x
- t.cursorY = y
- t.move(up, down, left, right)
-}
-
-func (t *Terminal) move(up, down, left, right int) {
- movement := make([]rune, 3*(up+down+left+right))
- m := movement
- for i := 0; i < up; i++ {
- m[0] = keyEscape
- m[1] = '['
- m[2] = 'A'
- m = m[3:]
- }
- for i := 0; i < down; i++ {
- m[0] = keyEscape
- m[1] = '['
- m[2] = 'B'
- m = m[3:]
- }
- for i := 0; i < left; i++ {
- m[0] = keyEscape
- m[1] = '['
- m[2] = 'D'
- m = m[3:]
- }
- for i := 0; i < right; i++ {
- m[0] = keyEscape
- m[1] = '['
- m[2] = 'C'
- m = m[3:]
- }
-
- t.queue(movement)
-}
-
-func (t *Terminal) clearLineToRight() {
- op := []rune{keyEscape, '[', 'K'}
- t.queue(op)
-}
-
-const maxLineLength = 4096
-
-func (t *Terminal) setLine(newLine []rune, newPos int) {
- if t.echo {
- t.moveCursorToPos(0)
- t.writeLine(newLine)
- for i := len(newLine); i < len(t.line); i++ {
- t.writeLine(space)
- }
- t.moveCursorToPos(newPos)
- }
- t.line = newLine
- t.pos = newPos
-}
-
-func (t *Terminal) advanceCursor(places int) {
- t.cursorX += places
- t.cursorY += t.cursorX / t.termWidth
- if t.cursorY > t.maxLine {
- t.maxLine = t.cursorY
- }
- t.cursorX = t.cursorX % t.termWidth
-
- if places > 0 && t.cursorX == 0 {
- // Normally terminals will advance the current position
- // when writing a character. But that doesn't happen
- // for the last character in a line. However, when
- // writing a character (except a new line) that causes
- // a line wrap, the position will be advanced two
- // places.
- //
- // So, if we are stopping at the end of a line, we
- // need to write a newline so that our cursor can be
- // advanced to the next line.
- t.outBuf = append(t.outBuf, '\r', '\n')
- }
-}
-
-func (t *Terminal) eraseNPreviousChars(n int) {
- if n == 0 {
- return
- }
-
- if t.pos < n {
- n = t.pos
- }
- t.pos -= n
- t.moveCursorToPos(t.pos)
-
- copy(t.line[t.pos:], t.line[n+t.pos:])
- t.line = t.line[:len(t.line)-n]
- if t.echo {
- t.writeLine(t.line[t.pos:])
- for i := 0; i < n; i++ {
- t.queue(space)
- }
- t.advanceCursor(n)
- t.moveCursorToPos(t.pos)
- }
-}
-
-// countToLeftWord returns then number of characters from the cursor to the
-// start of the previous word.
-func (t *Terminal) countToLeftWord() int {
- if t.pos == 0 {
- return 0
- }
-
- pos := t.pos - 1
- for pos > 0 {
- if t.line[pos] != ' ' {
- break
- }
- pos--
- }
- for pos > 0 {
- if t.line[pos] == ' ' {
- pos++
- break
- }
- pos--
- }
-
- return t.pos - pos
-}
-
-// countToRightWord returns then number of characters from the cursor to the
-// start of the next word.
-func (t *Terminal) countToRightWord() int {
- pos := t.pos
- for pos < len(t.line) {
- if t.line[pos] == ' ' {
- break
- }
- pos++
- }
- for pos < len(t.line) {
- if t.line[pos] != ' ' {
- break
- }
- pos++
- }
- return pos - t.pos
-}
-
-// visualLength returns the number of visible glyphs in s.
-func visualLength(runes []rune) int {
- inEscapeSeq := false
- length := 0
-
- for _, r := range runes {
- switch {
- case inEscapeSeq:
- if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') {
- inEscapeSeq = false
- }
- case r == '\x1b':
- inEscapeSeq = true
- default:
- length++
- }
- }
-
- return length
-}
-
-// handleKey processes the given key and, optionally, returns a line of text
-// that the user has entered.
-func (t *Terminal) handleKey(key rune) (line string, ok bool) {
- if t.pasteActive && key != keyEnter {
- t.addKeyToLine(key)
- return
- }
-
- switch key {
- case keyBackspace:
- if t.pos == 0 {
- return
- }
- t.eraseNPreviousChars(1)
- case keyAltLeft:
- // move left by a word.
- t.pos -= t.countToLeftWord()
- t.moveCursorToPos(t.pos)
- case keyAltRight:
- // move right by a word.
- t.pos += t.countToRightWord()
- t.moveCursorToPos(t.pos)
- case keyLeft:
- if t.pos == 0 {
- return
- }
- t.pos--
- t.moveCursorToPos(t.pos)
- case keyRight:
- if t.pos == len(t.line) {
- return
- }
- t.pos++
- t.moveCursorToPos(t.pos)
- case keyHome:
- if t.pos == 0 {
- return
- }
- t.pos = 0
- t.moveCursorToPos(t.pos)
- case keyEnd:
- if t.pos == len(t.line) {
- return
- }
- t.pos = len(t.line)
- t.moveCursorToPos(t.pos)
- case keyUp:
- entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1)
- if !ok {
- return "", false
- }
- if t.historyIndex == -1 {
- t.historyPending = string(t.line)
- }
- t.historyIndex++
- runes := []rune(entry)
- t.setLine(runes, len(runes))
- case keyDown:
- switch t.historyIndex {
- case -1:
- return
- case 0:
- runes := []rune(t.historyPending)
- t.setLine(runes, len(runes))
- t.historyIndex--
- default:
- entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1)
- if ok {
- t.historyIndex--
- runes := []rune(entry)
- t.setLine(runes, len(runes))
- }
- }
- case keyEnter:
- t.moveCursorToPos(len(t.line))
- t.queue([]rune("\r\n"))
- line = string(t.line)
- ok = true
- t.line = t.line[:0]
- t.pos = 0
- t.cursorX = 0
- t.cursorY = 0
- t.maxLine = 0
- case keyDeleteWord:
- // Delete zero or more spaces and then one or more characters.
- t.eraseNPreviousChars(t.countToLeftWord())
- case keyDeleteLine:
- // Delete everything from the current cursor position to the
- // end of line.
- for i := t.pos; i < len(t.line); i++ {
- t.queue(space)
- t.advanceCursor(1)
- }
- t.line = t.line[:t.pos]
- t.moveCursorToPos(t.pos)
- case keyCtrlD:
- // Erase the character under the current position.
- // The EOF case when the line is empty is handled in
- // readLine().
- if t.pos < len(t.line) {
- t.pos++
- t.eraseNPreviousChars(1)
- }
- case keyCtrlU:
- t.eraseNPreviousChars(t.pos)
- case keyClearScreen:
- // Erases the screen and moves the cursor to the home position.
- t.queue([]rune("\x1b[2J\x1b[H"))
- t.queue(t.prompt)
- t.cursorX, t.cursorY = 0, 0
- t.advanceCursor(visualLength(t.prompt))
- t.setLine(t.line, t.pos)
- default:
- if t.AutoCompleteCallback != nil {
- prefix := string(t.line[:t.pos])
- suffix := string(t.line[t.pos:])
-
- t.lock.Unlock()
- newLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key)
- t.lock.Lock()
-
- if completeOk {
- t.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos]))
- return
- }
- }
- if !isPrintable(key) {
- return
- }
- if len(t.line) == maxLineLength {
- return
- }
- t.addKeyToLine(key)
- }
- return
-}
-
-// addKeyToLine inserts the given key at the current position in the current
-// line.
-func (t *Terminal) addKeyToLine(key rune) {
- if len(t.line) == cap(t.line) {
- newLine := make([]rune, len(t.line), 2*(1+len(t.line)))
- copy(newLine, t.line)
- t.line = newLine
- }
- t.line = t.line[:len(t.line)+1]
- copy(t.line[t.pos+1:], t.line[t.pos:])
- t.line[t.pos] = key
- if t.echo {
- t.writeLine(t.line[t.pos:])
- }
- t.pos++
- t.moveCursorToPos(t.pos)
-}
-
-func (t *Terminal) writeLine(line []rune) {
- for len(line) != 0 {
- remainingOnLine := t.termWidth - t.cursorX
- todo := len(line)
- if todo > remainingOnLine {
- todo = remainingOnLine
- }
- t.queue(line[:todo])
- t.advanceCursor(visualLength(line[:todo]))
- line = line[todo:]
- }
-}
-
-// writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n.
-func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) {
- for len(buf) > 0 {
- i := bytes.IndexByte(buf, '\n')
- todo := len(buf)
- if i >= 0 {
- todo = i
- }
-
- var nn int
- nn, err = w.Write(buf[:todo])
- n += nn
- if err != nil {
- return n, err
- }
- buf = buf[todo:]
-
- if i >= 0 {
- if _, err = w.Write(crlf); err != nil {
- return n, err
- }
- n += 1
- buf = buf[1:]
- }
- }
-
- return n, nil
-}
-
-func (t *Terminal) Write(buf []byte) (n int, err error) {
- t.lock.Lock()
- defer t.lock.Unlock()
-
- if t.cursorX == 0 && t.cursorY == 0 {
- // This is the easy case: there's nothing on the screen that we
- // have to move out of the way.
- return writeWithCRLF(t.c, buf)
- }
-
- // We have a prompt and possibly user input on the screen. We
- // have to clear it first.
- t.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */)
- t.cursorX = 0
- t.clearLineToRight()
-
- for t.cursorY > 0 {
- t.move(1 /* up */, 0, 0, 0)
- t.cursorY--
- t.clearLineToRight()
- }
-
- if _, err = t.c.Write(t.outBuf); err != nil {
- return
- }
- t.outBuf = t.outBuf[:0]
-
- if n, err = writeWithCRLF(t.c, buf); err != nil {
- return
- }
-
- t.writeLine(t.prompt)
- if t.echo {
- t.writeLine(t.line)
- }
-
- t.moveCursorToPos(t.pos)
-
- if _, err = t.c.Write(t.outBuf); err != nil {
- return
- }
- t.outBuf = t.outBuf[:0]
- return
-}
-
-// ReadPassword temporarily changes the prompt and reads a password, without
-// echo, from the terminal.
-func (t *Terminal) ReadPassword(prompt string) (line string, err error) {
- t.lock.Lock()
- defer t.lock.Unlock()
-
- oldPrompt := t.prompt
- t.prompt = []rune(prompt)
- t.echo = false
-
- line, err = t.readLine()
-
- t.prompt = oldPrompt
- t.echo = true
-
- return
-}
-
-// ReadLine returns a line of input from the terminal.
-func (t *Terminal) ReadLine() (line string, err error) {
- t.lock.Lock()
- defer t.lock.Unlock()
-
- return t.readLine()
-}
-
-func (t *Terminal) readLine() (line string, err error) {
- // t.lock must be held at this point
-
- if t.cursorX == 0 && t.cursorY == 0 {
- t.writeLine(t.prompt)
- t.c.Write(t.outBuf)
- t.outBuf = t.outBuf[:0]
- }
-
- lineIsPasted := t.pasteActive
-
- for {
- rest := t.remainder
- lineOk := false
- for !lineOk {
- var key rune
- key, rest = bytesToKey(rest, t.pasteActive)
- if key == utf8.RuneError {
- break
- }
- if !t.pasteActive {
- if key == keyCtrlD {
- if len(t.line) == 0 {
- return "", io.EOF
- }
- }
- if key == keyPasteStart {
- t.pasteActive = true
- if len(t.line) == 0 {
- lineIsPasted = true
- }
- continue
- }
- } else if key == keyPasteEnd {
- t.pasteActive = false
- continue
- }
- if !t.pasteActive {
- lineIsPasted = false
- }
- line, lineOk = t.handleKey(key)
- }
- if len(rest) > 0 {
- n := copy(t.inBuf[:], rest)
- t.remainder = t.inBuf[:n]
- } else {
- t.remainder = nil
- }
- t.c.Write(t.outBuf)
- t.outBuf = t.outBuf[:0]
- if lineOk {
- if t.echo {
- t.historyIndex = -1
- t.history.Add(line)
- }
- if lineIsPasted {
- err = ErrPasteIndicator
- }
- return
- }
-
- // t.remainder is a slice at the beginning of t.inBuf
- // containing a partial key sequence
- readBuf := t.inBuf[len(t.remainder):]
- var n int
-
- t.lock.Unlock()
- n, err = t.c.Read(readBuf)
- t.lock.Lock()
-
- if err != nil {
- return
- }
-
- t.remainder = t.inBuf[:n+len(t.remainder)]
- }
-}
-
-// SetPrompt sets the prompt to be used when reading subsequent lines.
-func (t *Terminal) SetPrompt(prompt string) {
- t.lock.Lock()
- defer t.lock.Unlock()
-
- t.prompt = []rune(prompt)
-}
-
-func (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) {
- // Move cursor to column zero at the start of the line.
- t.move(t.cursorY, 0, t.cursorX, 0)
- t.cursorX, t.cursorY = 0, 0
- t.clearLineToRight()
- for t.cursorY < numPrevLines {
- // Move down a line
- t.move(0, 1, 0, 0)
- t.cursorY++
- t.clearLineToRight()
- }
- // Move back to beginning.
- t.move(t.cursorY, 0, 0, 0)
- t.cursorX, t.cursorY = 0, 0
-
- t.queue(t.prompt)
- t.advanceCursor(visualLength(t.prompt))
- t.writeLine(t.line)
- t.moveCursorToPos(t.pos)
-}
-
-func (t *Terminal) SetSize(width, height int) error {
- t.lock.Lock()
- defer t.lock.Unlock()
-
- if width == 0 {
- width = 1
- }
-
- oldWidth := t.termWidth
- t.termWidth, t.termHeight = width, height
-
- switch {
- case width == oldWidth:
- // If the width didn't change then nothing else needs to be
- // done.
- return nil
- case len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0:
- // If there is nothing on current line and no prompt printed,
- // just do nothing
- return nil
- case width < oldWidth:
- // Some terminals (e.g. xterm) will truncate lines that were
- // too long when shinking. Others, (e.g. gnome-terminal) will
- // attempt to wrap them. For the former, repainting t.maxLine
- // works great, but that behaviour goes badly wrong in the case
- // of the latter because they have doubled every full line.
-
- // We assume that we are working on a terminal that wraps lines
- // and adjust the cursor position based on every previous line
- // wrapping and turning into two. This causes the prompt on
- // xterms to move upwards, which isn't great, but it avoids a
- // huge mess with gnome-terminal.
- if t.cursorX >= t.termWidth {
- t.cursorX = t.termWidth - 1
- }
- t.cursorY *= 2
- t.clearAndRepaintLinePlusNPrevious(t.maxLine * 2)
- case width > oldWidth:
- // If the terminal expands then our position calculations will
- // be wrong in the future because we think the cursor is
- // |t.pos| chars into the string, but there will be a gap at
- // the end of any wrapped line.
- //
- // But the position will actually be correct until we move, so
- // we can move back to the beginning and repaint everything.
- t.clearAndRepaintLinePlusNPrevious(t.maxLine)
- }
-
- _, err := t.c.Write(t.outBuf)
- t.outBuf = t.outBuf[:0]
- return err
-}
-
-type pasteIndicatorError struct{}
-
-func (pasteIndicatorError) Error() string {
- return "terminal: ErrPasteIndicator not correctly handled"
-}
-
-// ErrPasteIndicator may be returned from ReadLine as the error, in addition
-// to valid line data. It indicates that bracketed paste mode is enabled and
-// that the returned line consists only of pasted data. Programs may wish to
-// interpret pasted data more literally than typed data.
-var ErrPasteIndicator = pasteIndicatorError{}
-
-// SetBracketedPasteMode requests that the terminal bracket paste operations
-// with markers. Not all terminals support this but, if it is supported, then
-// enabling this mode will stop any autocomplete callback from running due to
-// pastes. Additionally, any lines that are completely pasted will be returned
-// from ReadLine with the error set to ErrPasteIndicator.
-func (t *Terminal) SetBracketedPasteMode(on bool) {
- if on {
- io.WriteString(t.c, "\x1b[?2004h")
- } else {
- io.WriteString(t.c, "\x1b[?2004l")
- }
-}
-
-// stRingBuffer is a ring buffer of strings.
-type stRingBuffer struct {
- // entries contains max elements.
- entries []string
- max int
- // head contains the index of the element most recently added to the ring.
- head int
- // size contains the number of elements in the ring.
- size int
-}
-
-func (s *stRingBuffer) Add(a string) {
- if s.entries == nil {
- const defaultNumEntries = 100
- s.entries = make([]string, defaultNumEntries)
- s.max = defaultNumEntries
- }
-
- s.head = (s.head + 1) % s.max
- s.entries[s.head] = a
- if s.size < s.max {
- s.size++
- }
-}
-
-// NthPreviousEntry returns the value passed to the nth previous call to Add.
-// If n is zero then the immediately prior value is returned, if one, then the
-// next most recent, and so on. If such an element doesn't exist then ok is
-// false.
-func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
- if n >= s.size {
- return "", false
- }
- index := s.head - n
- if index < 0 {
- index += s.max
- }
- return s.entries[index], true
-}
-
-// readPasswordLine reads from reader until it finds \n or io.EOF.
-// The slice returned does not include the \n.
-// readPasswordLine also ignores any \r it finds.
-func readPasswordLine(reader io.Reader) ([]byte, error) {
- var buf [1]byte
- var ret []byte
-
- for {
- n, err := reader.Read(buf[:])
- if n > 0 {
- switch buf[0] {
- case '\n':
- return ret, nil
- case '\r':
- // remove \r from passwords on Windows
- default:
- ret = append(ret, buf[0])
- }
- continue
- }
- if err != nil {
- if err == io.EOF && len(ret) > 0 {
- return ret, nil
- }
- return ret, err
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go
deleted file mode 100644
index 901c72ab3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright 2011 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 file.
-
-package terminal
-
-import (
- "bytes"
- "io"
- "os"
- "testing"
-)
-
-type MockTerminal struct {
- toSend []byte
- bytesPerRead int
- received []byte
-}
-
-func (c *MockTerminal) Read(data []byte) (n int, err error) {
- n = len(data)
- if n == 0 {
- return
- }
- if n > len(c.toSend) {
- n = len(c.toSend)
- }
- if n == 0 {
- return 0, io.EOF
- }
- if c.bytesPerRead > 0 && n > c.bytesPerRead {
- n = c.bytesPerRead
- }
- copy(data, c.toSend[:n])
- c.toSend = c.toSend[n:]
- return
-}
-
-func (c *MockTerminal) Write(data []byte) (n int, err error) {
- c.received = append(c.received, data...)
- return len(data), nil
-}
-
-func TestClose(t *testing.T) {
- c := &MockTerminal{}
- ss := NewTerminal(c, "> ")
- line, err := ss.ReadLine()
- if line != "" {
- t.Errorf("Expected empty line but got: %s", line)
- }
- if err != io.EOF {
- t.Errorf("Error should have been EOF but got: %s", err)
- }
-}
-
-var keyPressTests = []struct {
- in string
- line string
- err error
- throwAwayLines int
-}{
- {
- err: io.EOF,
- },
- {
- in: "\r",
- line: "",
- },
- {
- in: "foo\r",
- line: "foo",
- },
- {
- in: "a\x1b[Cb\r", // right
- line: "ab",
- },
- {
- in: "a\x1b[Db\r", // left
- line: "ba",
- },
- {
- in: "a\177b\r", // backspace
- line: "b",
- },
- {
- in: "\x1b[A\r", // up
- },
- {
- in: "\x1b[B\r", // down
- },
- {
- in: "line\x1b[A\x1b[B\r", // up then down
- line: "line",
- },
- {
- in: "line1\rline2\x1b[A\r", // recall previous line.
- line: "line1",
- throwAwayLines: 1,
- },
- {
- // recall two previous lines and append.
- in: "line1\rline2\rline3\x1b[A\x1b[Axxx\r",
- line: "line1xxx",
- throwAwayLines: 2,
- },
- {
- // Ctrl-A to move to beginning of line followed by ^K to kill
- // line.
- in: "a b \001\013\r",
- line: "",
- },
- {
- // Ctrl-A to move to beginning of line, Ctrl-E to move to end,
- // finally ^K to kill nothing.
- in: "a b \001\005\013\r",
- line: "a b ",
- },
- {
- in: "\027\r",
- line: "",
- },
- {
- in: "a\027\r",
- line: "",
- },
- {
- in: "a \027\r",
- line: "",
- },
- {
- in: "a b\027\r",
- line: "a ",
- },
- {
- in: "a b \027\r",
- line: "a ",
- },
- {
- in: "one two thr\x1b[D\027\r",
- line: "one two r",
- },
- {
- in: "\013\r",
- line: "",
- },
- {
- in: "a\013\r",
- line: "a",
- },
- {
- in: "ab\x1b[D\013\r",
- line: "a",
- },
- {
- in: "Ξεσκεπάζω\r",
- line: "Ξεσκεπάζω",
- },
- {
- in: "£\r\x1b[A\177\r", // non-ASCII char, enter, up, backspace.
- line: "",
- throwAwayLines: 1,
- },
- {
- in: "£\r££\x1b[A\x1b[B\177\r", // non-ASCII char, enter, 2x non-ASCII, up, down, backspace, enter.
- line: "£",
- throwAwayLines: 1,
- },
- {
- // Ctrl-D at the end of the line should be ignored.
- in: "a\004\r",
- line: "a",
- },
- {
- // a, b, left, Ctrl-D should erase the b.
- in: "ab\x1b[D\004\r",
- line: "a",
- },
- {
- // a, b, c, d, left, left, ^U should erase to the beginning of
- // the line.
- in: "abcd\x1b[D\x1b[D\025\r",
- line: "cd",
- },
- {
- // Bracketed paste mode: control sequences should be returned
- // verbatim in paste mode.
- in: "abc\x1b[200~de\177f\x1b[201~\177\r",
- line: "abcde\177",
- },
- {
- // Enter in bracketed paste mode should still work.
- in: "abc\x1b[200~d\refg\x1b[201~h\r",
- line: "efgh",
- throwAwayLines: 1,
- },
- {
- // Lines consisting entirely of pasted data should be indicated as such.
- in: "\x1b[200~a\r",
- line: "a",
- err: ErrPasteIndicator,
- },
-}
-
-func TestKeyPresses(t *testing.T) {
- for i, test := range keyPressTests {
- for j := 1; j < len(test.in); j++ {
- c := &MockTerminal{
- toSend: []byte(test.in),
- bytesPerRead: j,
- }
- ss := NewTerminal(c, "> ")
- for k := 0; k < test.throwAwayLines; k++ {
- _, err := ss.ReadLine()
- if err != nil {
- t.Errorf("Throwaway line %d from test %d resulted in error: %s", k, i, err)
- }
- }
- line, err := ss.ReadLine()
- if line != test.line {
- t.Errorf("Line resulting from test %d (%d bytes per read) was '%s', expected '%s'", i, j, line, test.line)
- break
- }
- if err != test.err {
- t.Errorf("Error resulting from test %d (%d bytes per read) was '%v', expected '%v'", i, j, err, test.err)
- break
- }
- }
- }
-}
-
-func TestPasswordNotSaved(t *testing.T) {
- c := &MockTerminal{
- toSend: []byte("password\r\x1b[A\r"),
- bytesPerRead: 1,
- }
- ss := NewTerminal(c, "> ")
- pw, _ := ss.ReadPassword("> ")
- if pw != "password" {
- t.Fatalf("failed to read password, got %s", pw)
- }
- line, _ := ss.ReadLine()
- if len(line) > 0 {
- t.Fatalf("password was saved in history")
- }
-}
-
-var setSizeTests = []struct {
- width, height int
-}{
- {40, 13},
- {80, 24},
- {132, 43},
-}
-
-func TestTerminalSetSize(t *testing.T) {
- for _, setSize := range setSizeTests {
- c := &MockTerminal{
- toSend: []byte("password\r\x1b[A\r"),
- bytesPerRead: 1,
- }
- ss := NewTerminal(c, "> ")
- ss.SetSize(setSize.width, setSize.height)
- pw, _ := ss.ReadPassword("Password: ")
- if pw != "password" {
- t.Fatalf("failed to read password, got %s", pw)
- }
- if string(c.received) != "Password: \r\n" {
- t.Errorf("failed to set the temporary prompt expected %q, got %q", "Password: ", c.received)
- }
- }
-}
-
-func TestReadPasswordLineEnd(t *testing.T) {
- var tests = []struct {
- input string
- want string
- }{
- {"\n", ""},
- {"\r\n", ""},
- {"test\r\n", "test"},
- {"testtesttesttes\n", "testtesttesttes"},
- {"testtesttesttes\r\n", "testtesttesttes"},
- {"testtesttesttesttest\n", "testtesttesttesttest"},
- {"testtesttesttesttest\r\n", "testtesttesttesttest"},
- }
- for _, test := range tests {
- buf := new(bytes.Buffer)
- if _, err := buf.WriteString(test.input); err != nil {
- t.Fatal(err)
- }
-
- have, err := readPasswordLine(buf)
- if err != nil {
- t.Errorf("readPasswordLine(%q) failed: %v", test.input, err)
- continue
- }
- if string(have) != test.want {
- t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want)
- continue
- }
-
- if _, err = buf.WriteString(test.input); err != nil {
- t.Fatal(err)
- }
- have, err = readPasswordLine(buf)
- if err != nil {
- t.Errorf("readPasswordLine(%q) failed: %v", test.input, err)
- continue
- }
- if string(have) != test.want {
- t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want)
- continue
- }
- }
-}
-
-func TestMakeRawState(t *testing.T) {
- fd := int(os.Stdout.Fd())
- if !IsTerminal(fd) {
- t.Skip("stdout is not a terminal; skipping test")
- }
-
- st, err := GetState(fd)
- if err != nil {
- t.Fatalf("failed to get terminal state from GetState: %s", err)
- }
- defer Restore(fd, st)
- raw, err := MakeRaw(fd)
- if err != nil {
- t.Fatalf("failed to get terminal state from MakeRaw: %s", err)
- }
-
- if *st != *raw {
- t.Errorf("states do not match; was %v, expected %v", raw, st)
- }
-}
-
-func TestOutputNewlines(t *testing.T) {
- // \n should be changed to \r\n in terminal output.
- buf := new(bytes.Buffer)
- term := NewTerminal(buf, ">")
-
- term.Write([]byte("1\n2\n"))
- output := string(buf.Bytes())
- const expected = "1\r\n2\r\n"
-
- if output != expected {
- t.Errorf("incorrect output: was %q, expected %q", output, expected)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util.go
deleted file mode 100644
index 02dad484e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2011 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 file.
-
-// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
-
-// Package terminal provides support functions for dealing with terminals, as
-// commonly found on UNIX systems.
-//
-// Putting a terminal into raw mode is the most common requirement:
-//
-// oldState, err := terminal.MakeRaw(0)
-// if err != nil {
-// panic(err)
-// }
-// defer terminal.Restore(0, oldState)
-package terminal // import "golang.org/x/crypto/ssh/terminal"
-
-import (
- "golang.org/x/sys/unix"
-)
-
-// State contains the state of a terminal.
-type State struct {
- termios unix.Termios
-}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
- _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
- return err == nil
-}
-
-// MakeRaw put the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-func MakeRaw(fd int) (*State, error) {
- termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
- if err != nil {
- return nil, err
- }
-
- oldState := State{termios: *termios}
-
- // This attempts to replicate the behaviour documented for cfmakeraw in
- // the termios(3) manpage.
- termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
- termios.Oflag &^= unix.OPOST
- termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
- termios.Cflag &^= unix.CSIZE | unix.PARENB
- termios.Cflag |= unix.CS8
- termios.Cc[unix.VMIN] = 1
- termios.Cc[unix.VTIME] = 0
- if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil {
- return nil, err
- }
-
- return &oldState, nil
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
- termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
- if err != nil {
- return nil, err
- }
-
- return &State{termios: *termios}, nil
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func Restore(fd int, state *State) error {
- return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios)
-}
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (width, height int, err error) {
- ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
- if err != nil {
- return -1, -1, err
- }
- return int(ws.Col), int(ws.Row), nil
-}
-
-// passwordReader is an io.Reader that reads from a specific file descriptor.
-type passwordReader int
-
-func (r passwordReader) Read(buf []byte) (int, error) {
- return unix.Read(int(r), buf)
-}
-
-// ReadPassword reads a line of input from a terminal without local echo. This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
- termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
- if err != nil {
- return nil, err
- }
-
- newState := *termios
- newState.Lflag &^= unix.ECHO
- newState.Lflag |= unix.ICANON | unix.ISIG
- newState.Iflag |= unix.ICRNL
- if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil {
- return nil, err
- }
-
- defer func() {
- unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)
- }()
-
- return readPasswordLine(passwordReader(fd))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go
deleted file mode 100644
index cb23a5904..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package terminal
-
-import "golang.org/x/sys/unix"
-
-const ioctlReadTermios = unix.TIOCGETA
-const ioctlWriteTermios = unix.TIOCSETA
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go
deleted file mode 100644
index 799f049f0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package terminal provides support functions for dealing with terminals, as
-// commonly found on UNIX systems.
-//
-// Putting a terminal into raw mode is the most common requirement:
-//
-// oldState, err := terminal.MakeRaw(0)
-// if err != nil {
-// panic(err)
-// }
-// defer terminal.Restore(0, oldState)
-package terminal
-
-import (
- "fmt"
- "runtime"
-)
-
-type State struct{}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
- return false
-}
-
-// MakeRaw put the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-func MakeRaw(fd int) (*State, error) {
- return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
- return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func Restore(fd int, state *State) error {
- return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
-}
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (width, height int, err error) {
- return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
-}
-
-// ReadPassword reads a line of input from a terminal without local echo. This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
- return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
deleted file mode 100644
index a2e1b57dc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build solaris
-
-package terminal // import "golang.org/x/crypto/ssh/terminal"
-
-import (
- "golang.org/x/sys/unix"
- "io"
- "syscall"
-)
-
-// State contains the state of a terminal.
-type State struct {
- state *unix.Termios
-}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
- _, err := unix.IoctlGetTermio(fd, unix.TCGETA)
- return err == nil
-}
-
-// ReadPassword reads a line of input from a terminal without local echo. This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
- // see also: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c
- val, err := unix.IoctlGetTermios(fd, unix.TCGETS)
- if err != nil {
- return nil, err
- }
- oldState := *val
-
- newState := oldState
- newState.Lflag &^= syscall.ECHO
- newState.Lflag |= syscall.ICANON | syscall.ISIG
- newState.Iflag |= syscall.ICRNL
- err = unix.IoctlSetTermios(fd, unix.TCSETS, &newState)
- if err != nil {
- return nil, err
- }
-
- defer unix.IoctlSetTermios(fd, unix.TCSETS, &oldState)
-
- var buf [16]byte
- var ret []byte
- for {
- n, err := syscall.Read(fd, buf[:])
- if err != nil {
- return nil, err
- }
- if n == 0 {
- if len(ret) == 0 {
- return nil, io.EOF
- }
- break
- }
- if buf[n-1] == '\n' {
- n--
- }
- ret = append(ret, buf[:n]...)
- if n < len(buf) {
- break
- }
- }
-
- return ret, nil
-}
-
-// MakeRaw puts the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-// see http://cr.illumos.org/~webrev/andy_js/1060/
-func MakeRaw(fd int) (*State, error) {
- oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
- if err != nil {
- return nil, err
- }
- oldTermios := *oldTermiosPtr
-
- newTermios := oldTermios
- newTermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON
- newTermios.Oflag &^= syscall.OPOST
- newTermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
- newTermios.Cflag &^= syscall.CSIZE | syscall.PARENB
- newTermios.Cflag |= syscall.CS8
- newTermios.Cc[unix.VMIN] = 1
- newTermios.Cc[unix.VTIME] = 0
-
- if err := unix.IoctlSetTermios(fd, unix.TCSETS, &newTermios); err != nil {
- return nil, err
- }
-
- return &State{
- state: oldTermiosPtr,
- }, nil
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func Restore(fd int, oldState *State) error {
- return unix.IoctlSetTermios(fd, unix.TCSETS, oldState.state)
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
- oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
- if err != nil {
- return nil, err
- }
-
- return &State{
- state: oldTermiosPtr,
- }, nil
-}
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (width, height int, err error) {
- ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
- if err != nil {
- return 0, 0, err
- }
- return int(ws.Col), int(ws.Row), nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
deleted file mode 100644
index 92944f3b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2011 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 file.
-
-// +build windows
-
-// Package terminal provides support functions for dealing with terminals, as
-// commonly found on UNIX systems.
-//
-// Putting a terminal into raw mode is the most common requirement:
-//
-// oldState, err := terminal.MakeRaw(0)
-// if err != nil {
-// panic(err)
-// }
-// defer terminal.Restore(0, oldState)
-package terminal
-
-import (
- "os"
-
- "golang.org/x/sys/windows"
-)
-
-type State struct {
- mode uint32
-}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
- var st uint32
- err := windows.GetConsoleMode(windows.Handle(fd), &st)
- return err == nil
-}
-
-// MakeRaw put the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-func MakeRaw(fd int) (*State, error) {
- var st uint32
- if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
- return nil, err
- }
- raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
- if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
- return nil, err
- }
- return &State{st}, nil
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
- var st uint32
- if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
- return nil, err
- }
- return &State{st}, nil
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func Restore(fd int, state *State) error {
- return windows.SetConsoleMode(windows.Handle(fd), state.mode)
-}
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (width, height int, err error) {
- var info windows.ConsoleScreenBufferInfo
- if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
- return 0, 0, err
- }
- return int(info.Size.X), int(info.Size.Y), nil
-}
-
-// ReadPassword reads a line of input from a terminal without local echo. This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
- var st uint32
- if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
- return nil, err
- }
- old := st
-
- st &^= (windows.ENABLE_ECHO_INPUT)
- st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
- if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil {
- return nil, err
- }
-
- defer func() {
- windows.SetConsoleMode(windows.Handle(fd), old)
- }()
-
- return readPasswordLine(os.NewFile(uintptr(fd), "stdin"))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go
deleted file mode 100644
index f481253c9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package test
-
-import (
- "bytes"
- "testing"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/agent"
-)
-
-func TestAgentForward(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- keyring := agent.NewKeyring()
- if err := keyring.Add(agent.AddedKey{PrivateKey: testPrivateKeys["dsa"]}); err != nil {
- t.Fatalf("Error adding key: %s", err)
- }
- if err := keyring.Add(agent.AddedKey{
- PrivateKey: testPrivateKeys["dsa"],
- ConfirmBeforeUse: true,
- LifetimeSecs: 3600,
- }); err != nil {
- t.Fatalf("Error adding key with constraints: %s", err)
- }
- pub := testPublicKeys["dsa"]
-
- sess, err := conn.NewSession()
- if err != nil {
- t.Fatalf("NewSession: %v", err)
- }
- if err := agent.RequestAgentForwarding(sess); err != nil {
- t.Fatalf("RequestAgentForwarding: %v", err)
- }
-
- if err := agent.ForwardToAgent(conn, keyring); err != nil {
- t.Fatalf("SetupForwardKeyring: %v", err)
- }
- out, err := sess.CombinedOutput("ssh-add -L")
- if err != nil {
- t.Fatalf("running ssh-add: %v, out %s", err, out)
- }
- key, _, _, _, err := ssh.ParseAuthorizedKey(out)
- if err != nil {
- t.Fatalf("ParseAuthorizedKey(%q): %v", out, err)
- }
-
- if !bytes.Equal(key.Marshal(), pub.Marshal()) {
- t.Fatalf("got key %s, want %s", ssh.MarshalAuthorizedKey(key), ssh.MarshalAuthorizedKey(pub))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/banner_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/banner_test.go
deleted file mode 100644
index f1ad4697c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/banner_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package test
-
-import (
- "testing"
-
-)
-
-func TestBannerCallbackAgainstOpenSSH(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
-
- clientConf := clientConfig()
-
- var receivedBanner string
- clientConf.BannerCallback = func(message string) error {
- receivedBanner = message
- return nil
- }
-
- conn := server.Dial(clientConf)
- defer conn.Close()
-
- expected := "Server Banner"
- if receivedBanner != expected {
- t.Fatalf("got %v; want %v", receivedBanner, expected)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/cert_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/cert_test.go
deleted file mode 100644
index b231dd80c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/cert_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package test
-
-import (
- "bytes"
- "crypto/rand"
- "testing"
-
- "golang.org/x/crypto/ssh"
-)
-
-// Test both logging in with a cert, and also that the certificate presented by an OpenSSH host can be validated correctly
-func TestCertLogin(t *testing.T) {
- s := newServer(t)
- defer s.Shutdown()
-
- // Use a key different from the default.
- clientKey := testSigners["dsa"]
- caAuthKey := testSigners["ecdsa"]
- cert := &ssh.Certificate{
- Key: clientKey.PublicKey(),
- ValidPrincipals: []string{username()},
- CertType: ssh.UserCert,
- ValidBefore: ssh.CertTimeInfinity,
- }
- if err := cert.SignCert(rand.Reader, caAuthKey); err != nil {
- t.Fatalf("SetSignature: %v", err)
- }
-
- certSigner, err := ssh.NewCertSigner(cert, clientKey)
- if err != nil {
- t.Fatalf("NewCertSigner: %v", err)
- }
-
- conf := &ssh.ClientConfig{
- User: username(),
- HostKeyCallback: (&ssh.CertChecker{
- IsHostAuthority: func(pk ssh.PublicKey, addr string) bool {
- return bytes.Equal(pk.Marshal(), testPublicKeys["ca"].Marshal())
- },
- }).CheckHostKey,
- }
- conf.Auth = append(conf.Auth, ssh.PublicKeys(certSigner))
-
- for _, test := range []struct {
- addr string
- succeed bool
- }{
- {addr: "host.example.com:22", succeed: true},
- {addr: "host.example.com:10000", succeed: true}, // non-standard port must be OK
- {addr: "host.example.com", succeed: false}, // port must be specified
- {addr: "host.ex4mple.com:22", succeed: false}, // wrong host
- } {
- client, err := s.TryDialWithAddr(conf, test.addr)
-
- // Always close client if opened successfully
- if err == nil {
- client.Close()
- }
-
- // Now evaluate whether the test failed or passed
- if test.succeed {
- if err != nil {
- t.Fatalf("TryDialWithAddr: %v", err)
- }
- } else {
- if err == nil {
- t.Fatalf("TryDialWithAddr, unexpected success")
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go
deleted file mode 100644
index 091e48cc1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !windows
-
-package test
-
-// direct-tcpip and direct-streamlocal functional tests
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "strings"
- "testing"
-)
-
-type dialTester interface {
- TestServerConn(t *testing.T, c net.Conn)
- TestClientConn(t *testing.T, c net.Conn)
-}
-
-func testDial(t *testing.T, n, listenAddr string, x dialTester) {
- server := newServer(t)
- defer server.Shutdown()
- sshConn := server.Dial(clientConfig())
- defer sshConn.Close()
-
- l, err := net.Listen(n, listenAddr)
- if err != nil {
- t.Fatalf("Listen: %v", err)
- }
- defer l.Close()
-
- testData := fmt.Sprintf("hello from %s, %s", n, listenAddr)
- go func() {
- for {
- c, err := l.Accept()
- if err != nil {
- break
- }
- x.TestServerConn(t, c)
-
- io.WriteString(c, testData)
- c.Close()
- }
- }()
-
- conn, err := sshConn.Dial(n, l.Addr().String())
- if err != nil {
- t.Fatalf("Dial: %v", err)
- }
- x.TestClientConn(t, conn)
- defer conn.Close()
- b, err := ioutil.ReadAll(conn)
- if err != nil {
- t.Fatalf("ReadAll: %v", err)
- }
- t.Logf("got %q", string(b))
- if string(b) != testData {
- t.Fatalf("expected %q, got %q", testData, string(b))
- }
-}
-
-type tcpDialTester struct {
- listenAddr string
-}
-
-func (x *tcpDialTester) TestServerConn(t *testing.T, c net.Conn) {
- host := strings.Split(x.listenAddr, ":")[0]
- prefix := host + ":"
- if !strings.HasPrefix(c.LocalAddr().String(), prefix) {
- t.Fatalf("expected to start with %q, got %q", prefix, c.LocalAddr().String())
- }
- if !strings.HasPrefix(c.RemoteAddr().String(), prefix) {
- t.Fatalf("expected to start with %q, got %q", prefix, c.RemoteAddr().String())
- }
-}
-
-func (x *tcpDialTester) TestClientConn(t *testing.T, c net.Conn) {
- // we use zero addresses. see *Client.Dial.
- if c.LocalAddr().String() != "0.0.0.0:0" {
- t.Fatalf("expected \"0.0.0.0:0\", got %q", c.LocalAddr().String())
- }
- if c.RemoteAddr().String() != "0.0.0.0:0" {
- t.Fatalf("expected \"0.0.0.0:0\", got %q", c.RemoteAddr().String())
- }
-}
-
-func TestDialTCP(t *testing.T) {
- x := &tcpDialTester{
- listenAddr: "127.0.0.1:0",
- }
- testDial(t, "tcp", x.listenAddr, x)
-}
-
-type unixDialTester struct {
- listenAddr string
-}
-
-func (x *unixDialTester) TestServerConn(t *testing.T, c net.Conn) {
- if c.LocalAddr().String() != x.listenAddr {
- t.Fatalf("expected %q, got %q", x.listenAddr, c.LocalAddr().String())
- }
- if c.RemoteAddr().String() != "@" {
- t.Fatalf("expected \"@\", got %q", c.RemoteAddr().String())
- }
-}
-
-func (x *unixDialTester) TestClientConn(t *testing.T, c net.Conn) {
- if c.RemoteAddr().String() != x.listenAddr {
- t.Fatalf("expected %q, got %q", x.listenAddr, c.RemoteAddr().String())
- }
- if c.LocalAddr().String() != "@" {
- t.Fatalf("expected \"@\", got %q", c.LocalAddr().String())
- }
-}
-
-func TestDialUnix(t *testing.T) {
- addr, cleanup := newTempSocket(t)
- defer cleanup()
- x := &unixDialTester{
- listenAddr: addr,
- }
- testDial(t, "unix", x.listenAddr, x)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/doc.go
deleted file mode 100644
index 3f9b3346d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/doc.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2012 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 file.
-
-// This package contains integration tests for the
-// golang.org/x/crypto/ssh package.
-package test // import "golang.org/x/crypto/ssh/test"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go
deleted file mode 100644
index ea8193780..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package test
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "math/rand"
- "net"
- "testing"
- "time"
-)
-
-type closeWriter interface {
- CloseWrite() error
-}
-
-func testPortForward(t *testing.T, n, listenAddr string) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- sshListener, err := conn.Listen(n, listenAddr)
- if err != nil {
- t.Fatal(err)
- }
-
- go func() {
- sshConn, err := sshListener.Accept()
- if err != nil {
- t.Fatalf("listen.Accept failed: %v", err)
- }
-
- _, err = io.Copy(sshConn, sshConn)
- if err != nil && err != io.EOF {
- t.Fatalf("ssh client copy: %v", err)
- }
- sshConn.Close()
- }()
-
- forwardedAddr := sshListener.Addr().String()
- netConn, err := net.Dial(n, forwardedAddr)
- if err != nil {
- t.Fatalf("net dial failed: %v", err)
- }
-
- readChan := make(chan []byte)
- go func() {
- data, _ := ioutil.ReadAll(netConn)
- readChan <- data
- }()
-
- // Invent some data.
- data := make([]byte, 100*1000)
- for i := range data {
- data[i] = byte(i % 255)
- }
-
- var sent []byte
- for len(sent) < 1000*1000 {
- // Send random sized chunks
- m := rand.Intn(len(data))
- n, err := netConn.Write(data[:m])
- if err != nil {
- break
- }
- sent = append(sent, data[:n]...)
- }
- if err := netConn.(closeWriter).CloseWrite(); err != nil {
- t.Errorf("netConn.CloseWrite: %v", err)
- }
-
- read := <-readChan
-
- if len(sent) != len(read) {
- t.Fatalf("got %d bytes, want %d", len(read), len(sent))
- }
- if bytes.Compare(sent, read) != 0 {
- t.Fatalf("read back data does not match")
- }
-
- if err := sshListener.Close(); err != nil {
- t.Fatalf("sshListener.Close: %v", err)
- }
-
- // Check that the forward disappeared.
- netConn, err = net.Dial(n, forwardedAddr)
- if err == nil {
- netConn.Close()
- t.Errorf("still listening to %s after closing", forwardedAddr)
- }
-}
-
-func TestPortForwardTCP(t *testing.T) {
- testPortForward(t, "tcp", "localhost:0")
-}
-
-func TestPortForwardUnix(t *testing.T) {
- addr, cleanup := newTempSocket(t)
- defer cleanup()
- testPortForward(t, "unix", addr)
-}
-
-func testAcceptClose(t *testing.T, n, listenAddr string) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
-
- sshListener, err := conn.Listen(n, listenAddr)
- if err != nil {
- t.Fatal(err)
- }
-
- quit := make(chan error, 1)
- go func() {
- for {
- c, err := sshListener.Accept()
- if err != nil {
- quit <- err
- break
- }
- c.Close()
- }
- }()
- sshListener.Close()
-
- select {
- case <-time.After(1 * time.Second):
- t.Errorf("timeout: listener did not close.")
- case err := <-quit:
- t.Logf("quit as expected (error %v)", err)
- }
-}
-
-func TestAcceptCloseTCP(t *testing.T) {
- testAcceptClose(t, "tcp", "localhost:0")
-}
-
-func TestAcceptCloseUnix(t *testing.T) {
- addr, cleanup := newTempSocket(t)
- defer cleanup()
- testAcceptClose(t, "unix", addr)
-}
-
-// Check that listeners exit if the underlying client transport dies.
-func testPortForwardConnectionClose(t *testing.T, n, listenAddr string) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
-
- sshListener, err := conn.Listen(n, listenAddr)
- if err != nil {
- t.Fatal(err)
- }
-
- quit := make(chan error, 1)
- go func() {
- for {
- c, err := sshListener.Accept()
- if err != nil {
- quit <- err
- break
- }
- c.Close()
- }
- }()
-
- // It would be even nicer if we closed the server side, but it
- // is more involved as the fd for that side is dup()ed.
- server.clientConn.Close()
-
- select {
- case <-time.After(1 * time.Second):
- t.Errorf("timeout: listener did not close.")
- case err := <-quit:
- t.Logf("quit as expected (error %v)", err)
- }
-}
-
-func TestPortForwardConnectionCloseTCP(t *testing.T) {
- testPortForwardConnectionClose(t, "tcp", "localhost:0")
-}
-
-func TestPortForwardConnectionCloseUnix(t *testing.T) {
- addr, cleanup := newTempSocket(t)
- defer cleanup()
- testPortForwardConnectionClose(t, "unix", addr)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/session_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/session_test.go
deleted file mode 100644
index 8238d9d90..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/session_test.go
+++ /dev/null
@@ -1,413 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !windows
-
-package test
-
-// Session functional tests.
-
-import (
- "bytes"
- "errors"
- "io"
- "strings"
- "testing"
-
- "golang.org/x/crypto/ssh"
-)
-
-func TestRunCommandSuccess(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
- err = session.Run("true")
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
-}
-
-func TestHostKeyCheck(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
-
- conf := clientConfig()
- hostDB := hostKeyDB()
- conf.HostKeyCallback = hostDB.Check
-
- // change the keys.
- hostDB.keys[ssh.KeyAlgoRSA][25]++
- hostDB.keys[ssh.KeyAlgoDSA][25]++
- hostDB.keys[ssh.KeyAlgoECDSA256][25]++
-
- conn, err := server.TryDial(conf)
- if err == nil {
- conn.Close()
- t.Fatalf("dial should have failed.")
- } else if !strings.Contains(err.Error(), "host key mismatch") {
- t.Fatalf("'host key mismatch' not found in %v", err)
- }
-}
-
-func TestRunCommandStdin(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
-
- r, w := io.Pipe()
- defer r.Close()
- defer w.Close()
- session.Stdin = r
-
- err = session.Run("true")
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
-}
-
-func TestRunCommandStdinError(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
-
- r, w := io.Pipe()
- defer r.Close()
- session.Stdin = r
- pipeErr := errors.New("closing write end of pipe")
- w.CloseWithError(pipeErr)
-
- err = session.Run("true")
- if err != pipeErr {
- t.Fatalf("expected %v, found %v", pipeErr, err)
- }
-}
-
-func TestRunCommandFailed(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
- err = session.Run(`bash -c "kill -9 $$"`)
- if err == nil {
- t.Fatalf("session succeeded: %v", err)
- }
-}
-
-func TestRunCommandWeClosed(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- err = session.Shell()
- if err != nil {
- t.Fatalf("shell failed: %v", err)
- }
- err = session.Close()
- if err != nil {
- t.Fatalf("shell failed: %v", err)
- }
-}
-
-func TestFuncLargeRead(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("unable to create new session: %s", err)
- }
-
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdout pipe: %s", err)
- }
-
- err = session.Start("dd if=/dev/urandom bs=2048 count=1024")
- if err != nil {
- t.Fatalf("unable to execute remote command: %s", err)
- }
-
- buf := new(bytes.Buffer)
- n, err := io.Copy(buf, stdout)
- if err != nil {
- t.Fatalf("error reading from remote stdout: %s", err)
- }
-
- if n != 2048*1024 {
- t.Fatalf("Expected %d bytes but read only %d from remote command", 2048, n)
- }
-}
-
-func TestKeyChange(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conf := clientConfig()
- hostDB := hostKeyDB()
- conf.HostKeyCallback = hostDB.Check
- conf.RekeyThreshold = 1024
- conn := server.Dial(conf)
- defer conn.Close()
-
- for i := 0; i < 4; i++ {
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("unable to create new session: %s", err)
- }
-
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdout pipe: %s", err)
- }
-
- err = session.Start("dd if=/dev/urandom bs=1024 count=1")
- if err != nil {
- t.Fatalf("unable to execute remote command: %s", err)
- }
- buf := new(bytes.Buffer)
- n, err := io.Copy(buf, stdout)
- if err != nil {
- t.Fatalf("error reading from remote stdout: %s", err)
- }
-
- want := int64(1024)
- if n != want {
- t.Fatalf("Expected %d bytes but read only %d from remote command", want, n)
- }
- }
-
- if changes := hostDB.checkCount; changes < 4 {
- t.Errorf("got %d key changes, want 4", changes)
- }
-}
-
-func TestInvalidTerminalMode(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
-
- if err = session.RequestPty("vt100", 80, 40, ssh.TerminalModes{255: 1984}); err == nil {
- t.Fatalf("req-pty failed: successful request with invalid mode")
- }
-}
-
-func TestValidTerminalMode(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
-
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdout pipe: %s", err)
- }
-
- stdin, err := session.StdinPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdin pipe: %s", err)
- }
-
- tm := ssh.TerminalModes{ssh.ECHO: 0}
- if err = session.RequestPty("xterm", 80, 40, tm); err != nil {
- t.Fatalf("req-pty failed: %s", err)
- }
-
- err = session.Shell()
- if err != nil {
- t.Fatalf("session failed: %s", err)
- }
-
- stdin.Write([]byte("stty -a && exit\n"))
-
- var buf bytes.Buffer
- if _, err := io.Copy(&buf, stdout); err != nil {
- t.Fatalf("reading failed: %s", err)
- }
-
- if sttyOutput := buf.String(); !strings.Contains(sttyOutput, "-echo ") {
- t.Fatalf("terminal mode failure: expected -echo in stty output, got %s", sttyOutput)
- }
-}
-
-func TestWindowChange(t *testing.T) {
- server := newServer(t)
- defer server.Shutdown()
- conn := server.Dial(clientConfig())
- defer conn.Close()
-
- session, err := conn.NewSession()
- if err != nil {
- t.Fatalf("session failed: %v", err)
- }
- defer session.Close()
-
- stdout, err := session.StdoutPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdout pipe: %s", err)
- }
-
- stdin, err := session.StdinPipe()
- if err != nil {
- t.Fatalf("unable to acquire stdin pipe: %s", err)
- }
-
- tm := ssh.TerminalModes{ssh.ECHO: 0}
- if err = session.RequestPty("xterm", 80, 40, tm); err != nil {
- t.Fatalf("req-pty failed: %s", err)
- }
-
- if err := session.WindowChange(100, 100); err != nil {
- t.Fatalf("window-change failed: %s", err)
- }
-
- err = session.Shell()
- if err != nil {
- t.Fatalf("session failed: %s", err)
- }
-
- stdin.Write([]byte("stty size && exit\n"))
-
- var buf bytes.Buffer
- if _, err := io.Copy(&buf, stdout); err != nil {
- t.Fatalf("reading failed: %s", err)
- }
-
- if sttyOutput := buf.String(); !strings.Contains(sttyOutput, "100 100") {
- t.Fatalf("terminal WindowChange failure: expected \"100 100\" stty output, got %s", sttyOutput)
- }
-}
-
-func TestCiphers(t *testing.T) {
- var config ssh.Config
- config.SetDefaults()
- cipherOrder := config.Ciphers
- // These ciphers will not be tested when commented out in cipher.go it will
- // fallback to the next available as per line 292.
- cipherOrder = append(cipherOrder, "aes128-cbc", "3des-cbc")
-
- for _, ciph := range cipherOrder {
- server := newServer(t)
- defer server.Shutdown()
- conf := clientConfig()
- conf.Ciphers = []string{ciph}
- // Don't fail if sshd doesn't have the cipher.
- conf.Ciphers = append(conf.Ciphers, cipherOrder...)
- conn, err := server.TryDial(conf)
- if err == nil {
- conn.Close()
- } else {
- t.Fatalf("failed for cipher %q", ciph)
- }
- }
-}
-
-func TestMACs(t *testing.T) {
- var config ssh.Config
- config.SetDefaults()
- macOrder := config.MACs
-
- for _, mac := range macOrder {
- server := newServer(t)
- defer server.Shutdown()
- conf := clientConfig()
- conf.MACs = []string{mac}
- // Don't fail if sshd doesn't have the MAC.
- conf.MACs = append(conf.MACs, macOrder...)
- if conn, err := server.TryDial(conf); err == nil {
- conn.Close()
- } else {
- t.Fatalf("failed for MAC %q", mac)
- }
- }
-}
-
-func TestKeyExchanges(t *testing.T) {
- var config ssh.Config
- config.SetDefaults()
- kexOrder := config.KeyExchanges
- for _, kex := range kexOrder {
- server := newServer(t)
- defer server.Shutdown()
- conf := clientConfig()
- // Don't fail if sshd doesn't have the kex.
- conf.KeyExchanges = append([]string{kex}, kexOrder...)
- conn, err := server.TryDial(conf)
- if err == nil {
- conn.Close()
- } else {
- t.Errorf("failed for kex %q", kex)
- }
- }
-}
-
-func TestClientAuthAlgorithms(t *testing.T) {
- for _, key := range []string{
- "rsa",
- "dsa",
- "ecdsa",
- "ed25519",
- } {
- server := newServer(t)
- conf := clientConfig()
- conf.SetDefaults()
- conf.Auth = []ssh.AuthMethod{
- ssh.PublicKeys(testSigners[key]),
- }
-
- conn, err := server.TryDial(conf)
- if err == nil {
- conn.Close()
- } else {
- t.Errorf("failed for key %q", key)
- }
-
- server.Shutdown()
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go
deleted file mode 100644
index 6b1e0fff1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd plan9
-
-package test
-
-// functional test harness for unix.
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "log"
- "net"
- "os"
- "os/exec"
- "os/user"
- "path/filepath"
- "testing"
- "text/template"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/testdata"
-)
-
-const sshd_config = `
-Protocol 2
-Banner {{.Dir}}/banner
-HostKey {{.Dir}}/id_rsa
-HostKey {{.Dir}}/id_dsa
-HostKey {{.Dir}}/id_ecdsa
-HostCertificate {{.Dir}}/id_rsa-cert.pub
-Pidfile {{.Dir}}/sshd.pid
-#UsePrivilegeSeparation no
-KeyRegenerationInterval 3600
-ServerKeyBits 768
-SyslogFacility AUTH
-LogLevel DEBUG2
-LoginGraceTime 120
-PermitRootLogin no
-StrictModes no
-RSAAuthentication yes
-PubkeyAuthentication yes
-AuthorizedKeysFile {{.Dir}}/authorized_keys
-TrustedUserCAKeys {{.Dir}}/id_ecdsa.pub
-IgnoreRhosts yes
-RhostsRSAAuthentication no
-HostbasedAuthentication no
-PubkeyAcceptedKeyTypes=*
-`
-
-var configTmpl = template.Must(template.New("").Parse(sshd_config))
-
-type server struct {
- t *testing.T
- cleanup func() // executed during Shutdown
- configfile string
- cmd *exec.Cmd
- output bytes.Buffer // holds stderr from sshd process
-
- // Client half of the network connection.
- clientConn net.Conn
-}
-
-func username() string {
- var username string
- if user, err := user.Current(); err == nil {
- username = user.Username
- } else {
- // user.Current() currently requires cgo. If an error is
- // returned attempt to get the username from the environment.
- log.Printf("user.Current: %v; falling back on $USER", err)
- username = os.Getenv("USER")
- }
- if username == "" {
- panic("Unable to get username")
- }
- return username
-}
-
-type storedHostKey struct {
- // keys map from an algorithm string to binary key data.
- keys map[string][]byte
-
- // checkCount counts the Check calls. Used for testing
- // rekeying.
- checkCount int
-}
-
-func (k *storedHostKey) Add(key ssh.PublicKey) {
- if k.keys == nil {
- k.keys = map[string][]byte{}
- }
- k.keys[key.Type()] = key.Marshal()
-}
-
-func (k *storedHostKey) Check(addr string, remote net.Addr, key ssh.PublicKey) error {
- k.checkCount++
- algo := key.Type()
-
- if k.keys == nil || bytes.Compare(key.Marshal(), k.keys[algo]) != 0 {
- return fmt.Errorf("host key mismatch. Got %q, want %q", key, k.keys[algo])
- }
- return nil
-}
-
-func hostKeyDB() *storedHostKey {
- keyChecker := &storedHostKey{}
- keyChecker.Add(testPublicKeys["ecdsa"])
- keyChecker.Add(testPublicKeys["rsa"])
- keyChecker.Add(testPublicKeys["dsa"])
- return keyChecker
-}
-
-func clientConfig() *ssh.ClientConfig {
- config := &ssh.ClientConfig{
- User: username(),
- Auth: []ssh.AuthMethod{
- ssh.PublicKeys(testSigners["user"]),
- },
- HostKeyCallback: hostKeyDB().Check,
- HostKeyAlgorithms: []string{ // by default, don't allow certs as this affects the hostKeyDB checker
- ssh.KeyAlgoECDSA256, ssh.KeyAlgoECDSA384, ssh.KeyAlgoECDSA521,
- ssh.KeyAlgoRSA, ssh.KeyAlgoDSA,
- ssh.KeyAlgoED25519,
- },
- }
- return config
-}
-
-// unixConnection creates two halves of a connected net.UnixConn. It
-// is used for connecting the Go SSH client with sshd without opening
-// ports.
-func unixConnection() (*net.UnixConn, *net.UnixConn, error) {
- dir, err := ioutil.TempDir("", "unixConnection")
- if err != nil {
- return nil, nil, err
- }
- defer os.Remove(dir)
-
- addr := filepath.Join(dir, "ssh")
- listener, err := net.Listen("unix", addr)
- if err != nil {
- return nil, nil, err
- }
- defer listener.Close()
- c1, err := net.Dial("unix", addr)
- if err != nil {
- return nil, nil, err
- }
-
- c2, err := listener.Accept()
- if err != nil {
- c1.Close()
- return nil, nil, err
- }
-
- return c1.(*net.UnixConn), c2.(*net.UnixConn), nil
-}
-
-func (s *server) TryDial(config *ssh.ClientConfig) (*ssh.Client, error) {
- return s.TryDialWithAddr(config, "")
-}
-
-// addr is the user specified host:port. While we don't actually dial it,
-// we need to know this for host key matching
-func (s *server) TryDialWithAddr(config *ssh.ClientConfig, addr string) (*ssh.Client, error) {
- sshd, err := exec.LookPath("sshd")
- if err != nil {
- s.t.Skipf("skipping test: %v", err)
- }
-
- c1, c2, err := unixConnection()
- if err != nil {
- s.t.Fatalf("unixConnection: %v", err)
- }
-
- s.cmd = exec.Command(sshd, "-f", s.configfile, "-i", "-e")
- f, err := c2.File()
- if err != nil {
- s.t.Fatalf("UnixConn.File: %v", err)
- }
- defer f.Close()
- s.cmd.Stdin = f
- s.cmd.Stdout = f
- s.cmd.Stderr = &s.output
- if err := s.cmd.Start(); err != nil {
- s.t.Fail()
- s.Shutdown()
- s.t.Fatalf("s.cmd.Start: %v", err)
- }
- s.clientConn = c1
- conn, chans, reqs, err := ssh.NewClientConn(c1, addr, config)
- if err != nil {
- return nil, err
- }
- return ssh.NewClient(conn, chans, reqs), nil
-}
-
-func (s *server) Dial(config *ssh.ClientConfig) *ssh.Client {
- conn, err := s.TryDial(config)
- if err != nil {
- s.t.Fail()
- s.Shutdown()
- s.t.Fatalf("ssh.Client: %v", err)
- }
- return conn
-}
-
-func (s *server) Shutdown() {
- if s.cmd != nil && s.cmd.Process != nil {
- // Don't check for errors; if it fails it's most
- // likely "os: process already finished", and we don't
- // care about that. Use os.Interrupt, so child
- // processes are killed too.
- s.cmd.Process.Signal(os.Interrupt)
- s.cmd.Wait()
- }
- if s.t.Failed() {
- // log any output from sshd process
- s.t.Logf("sshd: %s", s.output.String())
- }
- s.cleanup()
-}
-
-func writeFile(path string, contents []byte) {
- f, err := os.OpenFile(path, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0600)
- if err != nil {
- panic(err)
- }
- defer f.Close()
- if _, err := f.Write(contents); err != nil {
- panic(err)
- }
-}
-
-// newServer returns a new mock ssh server.
-func newServer(t *testing.T) *server {
- if testing.Short() {
- t.Skip("skipping test due to -short")
- }
- dir, err := ioutil.TempDir("", "sshtest")
- if err != nil {
- t.Fatal(err)
- }
- f, err := os.Create(filepath.Join(dir, "sshd_config"))
- if err != nil {
- t.Fatal(err)
- }
- err = configTmpl.Execute(f, map[string]string{
- "Dir": dir,
- })
- if err != nil {
- t.Fatal(err)
- }
- f.Close()
-
- writeFile(filepath.Join(dir, "banner"), []byte("Server Banner"))
-
- for k, v := range testdata.PEMBytes {
- filename := "id_" + k
- writeFile(filepath.Join(dir, filename), v)
- writeFile(filepath.Join(dir, filename+".pub"), ssh.MarshalAuthorizedKey(testPublicKeys[k]))
- }
-
- for k, v := range testdata.SSHCertificates {
- filename := "id_" + k + "-cert.pub"
- writeFile(filepath.Join(dir, filename), v)
- }
-
- var authkeys bytes.Buffer
- for k, _ := range testdata.PEMBytes {
- authkeys.Write(ssh.MarshalAuthorizedKey(testPublicKeys[k]))
- }
- writeFile(filepath.Join(dir, "authorized_keys"), authkeys.Bytes())
-
- return &server{
- t: t,
- configfile: f.Name(),
- cleanup: func() {
- if err := os.RemoveAll(dir); err != nil {
- t.Error(err)
- }
- },
- }
-}
-
-func newTempSocket(t *testing.T) (string, func()) {
- dir, err := ioutil.TempDir("", "socket")
- if err != nil {
- t.Fatal(err)
- }
- deferFunc := func() { os.RemoveAll(dir) }
- addr := filepath.Join(dir, "sock")
- return addr, deferFunc
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/testdata_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/testdata_test.go
deleted file mode 100644
index a053f67ea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/test/testdata_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014 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 file.
-
-// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
-// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
-// instances.
-
-package test
-
-import (
- "crypto/rand"
- "fmt"
-
- "golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/testdata"
-)
-
-var (
- testPrivateKeys map[string]interface{}
- testSigners map[string]ssh.Signer
- testPublicKeys map[string]ssh.PublicKey
-)
-
-func init() {
- var err error
-
- n := len(testdata.PEMBytes)
- testPrivateKeys = make(map[string]interface{}, n)
- testSigners = make(map[string]ssh.Signer, n)
- testPublicKeys = make(map[string]ssh.PublicKey, n)
- for t, k := range testdata.PEMBytes {
- testPrivateKeys[t], err = ssh.ParseRawPrivateKey(k)
- if err != nil {
- panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err))
- }
- testSigners[t], err = ssh.NewSignerFromKey(testPrivateKeys[t])
- if err != nil {
- panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err))
- }
- testPublicKeys[t] = testSigners[t].PublicKey()
- }
-
- // Create a cert and sign it for use in tests.
- testCert := &ssh.Certificate{
- Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage
- ValidAfter: 0, // unix epoch
- ValidBefore: ssh.CertTimeInfinity, // The end of currently representable time.
- Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- Key: testPublicKeys["ecdsa"],
- SignatureKey: testPublicKeys["rsa"],
- Permissions: ssh.Permissions{
- CriticalOptions: map[string]string{},
- Extensions: map[string]string{},
- },
- }
- testCert.SignCert(rand.Reader, testSigners["rsa"])
- testPrivateKeys["cert"] = testPrivateKeys["ecdsa"]
- testSigners["cert"], err = ssh.NewCertSigner(testCert, testSigners["ecdsa"])
- if err != nil {
- panic(fmt.Sprintf("Unable to create certificate signer: %v", err))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/doc.go
deleted file mode 100644
index fcae47ca6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/doc.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2014 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 file.
-
-// This package contains test data shared between the various subpackages of
-// the golang.org/x/crypto/ssh package. Under no circumstance should
-// this data be used for production code.
-package testdata // import "golang.org/x/crypto/ssh/testdata"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/keys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/keys.go
deleted file mode 100644
index 3b3d26c5b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata/keys.go
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2014 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 file.
-
-package testdata
-
-var PEMBytes = map[string][]byte{
- "dsa": []byte(`-----BEGIN DSA PRIVATE KEY-----
-MIIBuwIBAAKBgQD6PDSEyXiI9jfNs97WuM46MSDCYlOqWw80ajN16AohtBncs1YB
-lHk//dQOvCYOsYaE+gNix2jtoRjwXhDsc25/IqQbU1ahb7mB8/rsaILRGIbA5WH3
-EgFtJmXFovDz3if6F6TzvhFpHgJRmLYVR8cqsezL3hEZOvvs2iH7MorkxwIVAJHD
-nD82+lxh2fb4PMsIiaXudAsBAoGAQRf7Q/iaPRn43ZquUhd6WwvirqUj+tkIu6eV
-2nZWYmXLlqFQKEy4Tejl7Wkyzr2OSYvbXLzo7TNxLKoWor6ips0phYPPMyXld14r
-juhT24CrhOzuLMhDduMDi032wDIZG4Y+K7ElU8Oufn8Sj5Wge8r6ANmmVgmFfynr
-FhdYCngCgYEA3ucGJ93/Mx4q4eKRDxcWD3QzWyqpbRVRRV1Vmih9Ha/qC994nJFz
-DQIdjxDIT2Rk2AGzMqFEB68Zc3O+Wcsmz5eWWzEwFxaTwOGWTyDqsDRLm3fD+QYj
-nOwuxb0Kce+gWI8voWcqC9cyRm09jGzu2Ab3Bhtpg8JJ8L7gS3MRZK4CFEx4UAfY
-Fmsr0W6fHB9nhS4/UXM8
------END DSA PRIVATE KEY-----
-`),
- "ecdsa": []byte(`-----BEGIN EC PRIVATE KEY-----
-MHcCAQEEINGWx0zo6fhJ/0EAfrPzVFyFC9s18lBt3cRoEDhS3ARooAoGCCqGSM49
-AwEHoUQDQgAEi9Hdw6KvZcWxfg2IDhA7UkpDtzzt6ZqJXSsFdLd+Kx4S3Sx4cVO+
-6/ZOXRnPmNAlLUqjShUsUBBngG0u2fqEqA==
------END EC PRIVATE KEY-----
-`),
- "rsa": []byte(`-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2
-a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8
-Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQIDAQAB
-AoGAJMCk5vqfSRzyXOTXLGIYCuR4Kj6pdsbNSeuuRGfYBeR1F2c/XdFAg7D/8s5R
-38p/Ih52/Ty5S8BfJtwtvgVY9ecf/JlU/rl/QzhG8/8KC0NG7KsyXklbQ7gJT8UT
-Ojmw5QpMk+rKv17ipDVkQQmPaj+gJXYNAHqImke5mm/K/h0CQQDciPmviQ+DOhOq
-2ZBqUfH8oXHgFmp7/6pXw80DpMIxgV3CwkxxIVx6a8lVH9bT/AFySJ6vXq4zTuV9
-6QmZcZzDAkEA2j/UXJPIs1fQ8z/6sONOkU/BjtoePFIWJlRxdN35cZjXnBraX5UR
-fFHkePv4YwqmXNqrBOvSu+w2WdSDci+IKwJAcsPRc/jWmsrJW1q3Ha0hSf/WG/Bu
-X7MPuXaKpP/DkzGoUmb8ks7yqj6XWnYkPNLjCc8izU5vRwIiyWBRf4mxMwJBAILa
-NDvRS0rjwt6lJGv7zPZoqDc65VfrK2aNyHx2PgFyzwrEOtuF57bu7pnvEIxpLTeM
-z26i6XVMeYXAWZMTloMCQBbpGgEERQpeUknLBqUHhg/wXF6+lFA+vEGnkY+Dwab2
-KCXFGd+SQ5GdUcEMe9isUH6DYj/6/yCDoFrXXmpQb+M=
------END RSA PRIVATE KEY-----
-`),
- "ed25519": []byte(`-----BEGIN OPENSSH PRIVATE KEY-----
-b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
-QyNTUxOQAAACA+3f7hS7g5UWwXOGVTrMfhmxyrjqz7Sxxbx7I1j8DvvwAAAJhAFfkOQBX5
-DgAAAAtzc2gtZWQyNTUxOQAAACA+3f7hS7g5UWwXOGVTrMfhmxyrjqz7Sxxbx7I1j8Dvvw
-AAAEAaYmXltfW6nhRo3iWGglRB48lYq0z0Q3I3KyrdutEr6j7d/uFLuDlRbBc4ZVOsx+Gb
-HKuOrPtLHFvHsjWPwO+/AAAAE2dhcnRvbm1AZ2FydG9ubS14cHMBAg==
------END OPENSSH PRIVATE KEY-----
-`),
- "rsa-openssh-format": []byte(`-----BEGIN OPENSSH PRIVATE KEY-----
-b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
-NhAAAAAwEAAQAAAIEAwa48yfWFi3uIdqzuf9X7C2Zxfea/Iaaw0zIwHudpF8U92WVIiC5l
-oEuW1+OaVi3UWfIEjWMV1tHGysrHOwtwc34BPCJqJknUQO/KtDTBTJ4Pryhw1bWPC999Lz
-a+yrCTdNQYBzoROXKExZgPFh9pTMi5wqpHDuOQ2qZFIEI3lT0AAAIQWL0H31i9B98AAAAH
-c3NoLXJzYQAAAIEAwa48yfWFi3uIdqzuf9X7C2Zxfea/Iaaw0zIwHudpF8U92WVIiC5loE
-uW1+OaVi3UWfIEjWMV1tHGysrHOwtwc34BPCJqJknUQO/KtDTBTJ4Pryhw1bWPC999Lza+
-yrCTdNQYBzoROXKExZgPFh9pTMi5wqpHDuOQ2qZFIEI3lT0AAAADAQABAAAAgCThyTGsT4
-IARDxVMhWl6eiB2ZrgFgWSeJm/NOqtppWgOebsIqPMMg4UVuVFsl422/lE3RkPhVkjGXgE
-pWvZAdCnmLmApK8wK12vF334lZhZT7t3Z9EzJps88PWEHo7kguf285HcnUM7FlFeissJdk
-kXly34y7/3X/a6Tclm+iABAAAAQE0xR/KxZ39slwfMv64Rz7WKk1PPskaryI29aHE3mKHk
-pY2QA+P3QlrKxT/VWUMjHUbNNdYfJm48xu0SGNMRdKMAAABBAORh2NP/06JUV3J9W/2Hju
-X1ViJuqqcQnJPVzpgSL826EC2xwOECTqoY8uvFpUdD7CtpksIxNVqRIhuNOlz0lqEAAABB
-ANkaHTTaPojClO0dKJ/Zjs7pWOCGliebBYprQ/Y4r9QLBkC/XaWMS26gFIrjgC7D2Rv+rZ
-wSD0v0RcmkITP1ZR0AAAAYcHF1ZXJuYUBMdWNreUh5ZHJvLmxvY2FsAQID
------END OPENSSH PRIVATE KEY-----`),
- "user": []byte(`-----BEGIN EC PRIVATE KEY-----
-MHcCAQEEILYCAeq8f7V4vSSypRw7pxy8yz3V5W4qg8kSC3zJhqpQoAoGCCqGSM49
-AwEHoUQDQgAEYcO2xNKiRUYOLEHM7VYAp57HNyKbOdYtHD83Z4hzNPVC4tM5mdGD
-PLL8IEwvYu2wq+lpXfGQnNMbzYf9gspG0w==
------END EC PRIVATE KEY-----
-`),
- "ca": []byte(`-----BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAvg9dQ9IRG59lYJb+GESfKWTch4yBpr7Ydw1jkK6vvtrx9jLo
-5hkA8X6+ElRPRqTAZSlN5cBm6YCAcQIOsmXDUn6Oj1lVPQAoOjTBTvsjM3NjGhvv
-52kHTY0nsMsBeY9q5DTtlzmlYkVUq2a6Htgf2mNi01dIw5fJ7uTTo8EbNf7O0i3u
-c9a8P19HaZl5NKiWN4EIZkfB2WdXYRJCVBsGgQj3dE/GrEmH9QINq1A+GkNvK96u
-vZm8H1jjmuqzHplWa7lFeXcx8FTVTbVb/iJrZ2Lc/JvIPitKZWhqbR59yrGjpwEp
-Id7bo4WhO5L3OB0fSIJYvfu+o4WYnt4f3UzecwIDAQABAoIBABRD9yHgKErVuC2Q
-bA+SYZY8VvdtF/X7q4EmQFORDNRA7EPgMc03JU6awRGbQ8i4kHs46EFzPoXvWcKz
-AXYsO6N0Myc900Tp22A5d9NAHATEbPC/wdje7hRq1KyZONMJY9BphFv3nZbY5apR
-Dc90JBFZP5RhXjTc3n9GjvqLAKfFEKVmPRCvqxCOZunw6XR+SgIQLJo36nsIsbhW
-QUXIVaCI6cXMN8bRPm8EITdBNZu06Fpu4ZHm6VaxlXN9smERCDkgBSNXNWHKxmmA
-c3Glo2DByUr2/JFBOrLEe9fkYgr24KNCQkHVcSaFxEcZvTggr7StjKISVHlCNEaB
-7Q+kPoECgYEA3zE9FmvFGoQCU4g4Nl3dpQHs6kaAW8vJlrmq3xsireIuaJoa2HMe
-wYdIvgCnK9DIjyxd5OWnE4jXtAEYPsyGD32B5rSLQrRO96lgb3f4bESCLUb3Bsn/
-sdgeE3p1xZMA0B59htqCrvVgN9k8WxyevBxYl3/gSBm/p8OVH1RTW/ECgYEA2f9Z
-95OLj0KQHQtxQXf+I3VjhCw3LkLW39QZOXVI0QrCJfqqP7uxsJXH9NYX0l0GFTcR
-kRrlyoaSU1EGQosZh+n1MvplGBTkTSV47/bPsTzFpgK2NfEZuFm9RoWgltS+nYeH
-Y2k4mnAN3PhReCMwuprmJz8GRLsO3Cs2s2YylKMCgYEA2UX+uO/q7jgqZ5UJW+ue
-1H5+W0aMuFA3i7JtZEnvRaUVFqFGlwXin/WJ2+WY1++k/rPrJ+Rk9IBXtBUIvEGw
-FC5TIfsKQsJyyWgqx/jbbtJ2g4s8+W/1qfTAuqeRNOg5d2DnRDs90wJuS4//0JaY
-9HkHyVwkQyxFxhSA/AHEMJECgYA2MvyFR1O9bIk0D3I7GsA+xKLXa77Ua53MzIjw
-9i4CezBGDQpjCiFli/fI8am+jY5DnAtsDknvjoG24UAzLy5L0mk6IXMdB6SzYYut
-7ak5oahqW+Y9hxIj+XvLmtGQbphtxhJtLu35x75KoBpxSh6FZpmuTEccs31AVCYn
-eFM/DQKBgQDOPUwbLKqVi6ddFGgrV9MrWw+SWsDa43bPuyvYppMM3oqesvyaX1Dt
-qDvN7owaNxNM4OnfKcZr91z8YPVCFo4RbBif3DXRzjNNBlxEjHBtuMOikwvsmucN
-vIrbeEpjTiUMTEAr6PoTiVHjsfS8WAM6MDlF5M+2PNswDsBpa2yLgA==
------END RSA PRIVATE KEY-----
-`),
-}
-
-var SSHCertificates = map[string][]byte{
- // The following are corresponding certificates for the private keys above, signed by the CA key
- // Generated by the following commands:
- //
- // 1. Assumes "rsa" key above in file named "rsa", write out the public key to "rsa.pub":
- // ssh-keygen -y -f rsa > rsa.pu
- //
- // 2. Assumes "ca" key above in file named "ca", sign a cert for "rsa.pub":
- // ssh-keygen -s ca -h -n host.example.com -V +500w -I host.example.com-key rsa.pub
- "rsa": []byte(`ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgLjYqmmuTSEmjVhSfLQphBSTJMLwIZhRgmpn8FHKLiEIAAAADAQABAAAAgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2a6ySEJQb3IYquw7HlJgu6fg3WIWhOmHCjfpG0PrL4CRwbqQ2LaPPXhJErWYejcD8Di00cF3677+G10KMZk9RXbmHtuBFZT98wxg8j+ZsBMqGM1+7yrWUvynswQAAAAAAAAAAAAAAAgAAABRob3N0LmV4YW1wbGUuY29tLWtleQAAABQAAAAQaG9zdC5leGFtcGxlLmNvbQAAAABZHN8UAAAAAGsjIYUAAAAAAAAAAAAAAAAAAAEXAAAAB3NzaC1yc2EAAAADAQABAAABAQC+D11D0hEbn2Vglv4YRJ8pZNyHjIGmvth3DWOQrq++2vH2MujmGQDxfr4SVE9GpMBlKU3lwGbpgIBxAg6yZcNSfo6PWVU9ACg6NMFO+yMzc2MaG+/naQdNjSewywF5j2rkNO2XOaViRVSrZroe2B/aY2LTV0jDl8nu5NOjwRs1/s7SLe5z1rw/X0dpmXk0qJY3gQhmR8HZZ1dhEkJUGwaBCPd0T8asSYf1Ag2rUD4aQ28r3q69mbwfWOOa6rMemVZruUV5dzHwVNVNtVv+ImtnYtz8m8g+K0plaGptHn3KsaOnASkh3tujhaE7kvc4HR9Igli9+76jhZie3h/dTN5zAAABDwAAAAdzc2gtcnNhAAABALeDea+60H6xJGhktAyosHaSY7AYzLocaqd8hJQjEIDifBwzoTlnBmcK9CxGhKuaoJFThdCLdaevCeOSuquh8HTkf+2ebZZc/G5T+2thPvPqmcuEcmMosWo+SIjYhbP3S6KD49aLC1X0kz8IBQeauFvURhkZ5ZjhA1L4aQYt9NjL73nqOl8PplRui+Ov5w8b4ldul4zOvYAFrzfcP6wnnXk3c1Zzwwf5wynD5jakO8GpYKBuhM7Z4crzkKSQjU3hla7xqgfomC5Gz4XbR2TNjcQiRrJQ0UlKtX3X3ObRCEhuvG0Kzjklhv+Ddw6txrhKjMjiSi/Yyius/AE8TmC1p4U= host.example.com
-`),
-}
-
-var PEMEncryptedKeys = []struct {
- Name string
- EncryptionKey string
- PEMBytes []byte
-}{
- 0: {
- Name: "rsa-encrypted",
- EncryptionKey: "r54-G0pher_t3st$",
- PEMBytes: []byte(`-----BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: AES-128-CBC,3E1714DE130BC5E81327F36564B05462
-
-MqW88sud4fnWk/Jk3fkjh7ydu51ZkHLN5qlQgA4SkAXORPPMj2XvqZOv1v2LOgUV
-dUevUn8PZK7a9zbZg4QShUSzwE5k6wdB7XKPyBgI39mJ79GBd2U4W3h6KT6jIdWA
-goQpluxkrzr2/X602IaxLEre97FT9mpKC6zxKCLvyFWVIP9n3OSFS47cTTXyFr+l
-7PdRhe60nn6jSBgUNk/Q1lAvEQ9fufdPwDYY93F1wyJ6lOr0F1+mzRrMbH67NyKs
-rG8J1Fa7cIIre7ueKIAXTIne7OAWqpU9UDgQatDtZTbvA7ciqGsSFgiwwW13N+Rr
-hN8MkODKs9cjtONxSKi05s206A3NDU6STtZ3KuPDjFE1gMJODotOuqSM+cxKfyFq
-wxpk/CHYCDdMAVBSwxb/vraOHamylL4uCHpJdBHypzf2HABt+lS8Su23uAmL87DR
-yvyCS/lmpuNTndef6qHPRkoW2EV3xqD3ovosGf7kgwGJUk2ZpCLVteqmYehKlZDK
-r/Jy+J26ooI2jIg9bjvD1PZq+Mv+2dQ1RlDrPG3PB+rEixw6vBaL9x3jatCd4ej7
-XG7lb3qO9xFpLsx89tkEcvpGR+broSpUJ6Mu5LBCVmrvqHjvnDhrZVz1brMiQtU9
-iMZbgXqDLXHd6ERWygk7OTU03u+l1gs+KGMfmS0h0ZYw6KGVLgMnsoxqd6cFSKNB
-8Ohk9ZTZGCiovlXBUepyu8wKat1k8YlHSfIHoRUJRhhcd7DrmojC+bcbMIZBU22T
-Pl2ftVRGtcQY23lYd0NNKfebF7ncjuLWQGy+vZW+7cgfI6wPIbfYfP6g7QAutk6W
-KQx0AoX5woZ6cNxtpIrymaVjSMRRBkKQrJKmRp3pC/lul5E5P2cueMs1fj4OHTbJ
-lAUv88ywr+R+mRgYQlFW/XQ653f6DT4t6+njfO9oBcPrQDASZel3LjXLpjjYG/N5
-+BWnVexuJX9ika8HJiFl55oqaKb+WknfNhk5cPY+x7SDV9ywQeMiDZpr0ffeYAEP
-LlwwiWRDYpO+uwXHSFF3+JjWwjhs8m8g99iFb7U93yKgBB12dCEPPa2ZeH9wUHMJ
-sreYhNuq6f4iWWSXpzN45inQqtTi8jrJhuNLTT543ErW7DtntBO2rWMhff3aiXbn
-Uy3qzZM1nPbuCGuBmP9L2dJ3Z5ifDWB4JmOyWY4swTZGt9AVmUxMIKdZpRONx8vz
-I9u9nbVPGZBcou50Pa0qTLbkWsSL94MNXrARBxzhHC9Zs6XNEtwN7mOuii7uMkVc
-adrxgknBH1J1N+NX/eTKzUwJuPvDtA+Z5ILWNN9wpZT/7ed8zEnKHPNUexyeT5g3
-uw9z9jH7ffGxFYlx87oiVPHGOrCXYZYW5uoZE31SCBkbtNuffNRJRKIFeipmpJ3P
-7bpAG+kGHMelQH6b+5K1Qgsv4tpuSyKeTKpPFH9Av5nN4P1ZBm9N80tzbNWqjSJm
-S7rYdHnuNEVnUGnRmEUMmVuYZnNBEVN/fP2m2SEwXcP3Uh7TiYlcWw10ygaGmOr7
-MvMLGkYgQ4Utwnd98mtqa0jr0hK2TcOSFir3AqVvXN3XJj4cVULkrXe4Im1laWgp
------END RSA PRIVATE KEY-----
-`),
- },
-
- 1: {
- Name: "dsa-encrypted",
- EncryptionKey: "qG0pher-dsa_t3st$",
- PEMBytes: []byte(`-----BEGIN DSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: AES-128-CBC,7CE7A6E4A647DC01AF860210B15ADE3E
-
-hvnBpI99Hceq/55pYRdOzBLntIEis02JFNXuLEydWL+RJBFDn7tA+vXec0ERJd6J
-G8JXlSOAhmC2H4uK3q2xR8/Y3yL95n6OIcjvCBiLsV+o3jj1MYJmErxP6zRtq4w3
-JjIjGHWmaYFSxPKQ6e8fs74HEqaeMV9ONUoTtB+aISmgaBL15Fcoayg245dkBvVl
-h5Kqspe7yvOBmzA3zjRuxmSCqKJmasXM7mqs3vIrMxZE3XPo1/fWKcPuExgpVQoT
-HkJZEoIEIIPnPMwT2uYbFJSGgPJVMDT84xz7yvjCdhLmqrsXgs5Qw7Pw0i0c0BUJ
-b7fDJ2UhdiwSckWGmIhTLlJZzr8K+JpjCDlP+REYBI5meB7kosBnlvCEHdw2EJkH
-0QDc/2F4xlVrHOLbPRFyu1Oi2Gvbeoo9EsM/DThpd1hKAlb0sF5Y0y0d+owv0PnE
-R/4X3HWfIdOHsDUvJ8xVWZ4BZk9Zk9qol045DcFCehpr/3hslCrKSZHakLt9GI58
-vVQJ4L0aYp5nloLfzhViZtKJXRLkySMKdzYkIlNmW1oVGl7tce5UCNI8Nok4j6yn
-IiHM7GBn+0nJoKTXsOGMIBe3ulKlKVxLjEuk9yivh/8=
------END DSA PRIVATE KEY-----
-`),
- },
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata_test.go
deleted file mode 100644
index 2da8c79dc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/testdata_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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 file.
-
-// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
-// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
-// instances.
-
-package ssh
-
-import (
- "crypto/rand"
- "fmt"
-
- "golang.org/x/crypto/ssh/testdata"
-)
-
-var (
- testPrivateKeys map[string]interface{}
- testSigners map[string]Signer
- testPublicKeys map[string]PublicKey
-)
-
-func init() {
- var err error
-
- n := len(testdata.PEMBytes)
- testPrivateKeys = make(map[string]interface{}, n)
- testSigners = make(map[string]Signer, n)
- testPublicKeys = make(map[string]PublicKey, n)
- for t, k := range testdata.PEMBytes {
- testPrivateKeys[t], err = ParseRawPrivateKey(k)
- if err != nil {
- panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err))
- }
- testSigners[t], err = NewSignerFromKey(testPrivateKeys[t])
- if err != nil {
- panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err))
- }
- testPublicKeys[t] = testSigners[t].PublicKey()
- }
-
- // Create a cert and sign it for use in tests.
- testCert := &Certificate{
- Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage
- ValidAfter: 0, // unix epoch
- ValidBefore: CertTimeInfinity, // The end of currently representable time.
- Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil
- Key: testPublicKeys["ecdsa"],
- SignatureKey: testPublicKeys["rsa"],
- Permissions: Permissions{
- CriticalOptions: map[string]string{},
- Extensions: map[string]string{},
- },
- }
- testCert.SignCert(rand.Reader, testSigners["rsa"])
- testPrivateKeys["cert"] = testPrivateKeys["ecdsa"]
- testSigners["cert"], err = NewCertSigner(testCert, testSigners["ecdsa"])
- if err != nil {
- panic(fmt.Sprintf("Unable to create certificate signer: %v", err))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport.go
deleted file mode 100644
index ab2b88765..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport.go
+++ /dev/null
@@ -1,375 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bufio"
- "errors"
- "io"
- "log"
-)
-
-// debugTransport if set, will print packet types as they go over the
-// wire. No message decoding is done, to minimize the impact on timing.
-const debugTransport = false
-
-const (
- gcmCipherID = "aes128-gcm@openssh.com"
- aes128cbcID = "aes128-cbc"
- tripledescbcID = "3des-cbc"
-)
-
-// packetConn represents a transport that implements packet based
-// operations.
-type packetConn interface {
- // Encrypt and send a packet of data to the remote peer.
- writePacket(packet []byte) error
-
- // Read a packet from the connection. The read is blocking,
- // i.e. if error is nil, then the returned byte slice is
- // always non-empty.
- readPacket() ([]byte, error)
-
- // Close closes the write-side of the connection.
- Close() error
-}
-
-// transport is the keyingTransport that implements the SSH packet
-// protocol.
-type transport struct {
- reader connectionState
- writer connectionState
-
- bufReader *bufio.Reader
- bufWriter *bufio.Writer
- rand io.Reader
- isClient bool
- io.Closer
-}
-
-// packetCipher represents a combination of SSH encryption/MAC
-// protocol. A single instance should be used for one direction only.
-type packetCipher interface {
- // writePacket encrypts the packet and writes it to w. The
- // contents of the packet are generally scrambled.
- writePacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error
-
- // readPacket reads and decrypts a packet of data. The
- // returned packet may be overwritten by future calls of
- // readPacket.
- readPacket(seqnum uint32, r io.Reader) ([]byte, error)
-}
-
-// connectionState represents one side (read or write) of the
-// connection. This is necessary because each direction has its own
-// keys, and can even have its own algorithms
-type connectionState struct {
- packetCipher
- seqNum uint32
- dir direction
- pendingKeyChange chan packetCipher
-}
-
-// prepareKeyChange sets up key material for a keychange. The key changes in
-// both directions are triggered by reading and writing a msgNewKey packet
-// respectively.
-func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error {
- if ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult); err != nil {
- return err
- } else {
- t.reader.pendingKeyChange <- ciph
- }
-
- if ciph, err := newPacketCipher(t.writer.dir, algs.w, kexResult); err != nil {
- return err
- } else {
- t.writer.pendingKeyChange <- ciph
- }
-
- return nil
-}
-
-func (t *transport) printPacket(p []byte, write bool) {
- if len(p) == 0 {
- return
- }
- who := "server"
- if t.isClient {
- who = "client"
- }
- what := "read"
- if write {
- what = "write"
- }
-
- log.Println(what, who, p[0])
-}
-
-// Read and decrypt next packet.
-func (t *transport) readPacket() (p []byte, err error) {
- for {
- p, err = t.reader.readPacket(t.bufReader)
- if err != nil {
- break
- }
- if len(p) == 0 || (p[0] != msgIgnore && p[0] != msgDebug) {
- break
- }
- }
- if debugTransport {
- t.printPacket(p, false)
- }
-
- return p, err
-}
-
-func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) {
- packet, err := s.packetCipher.readPacket(s.seqNum, r)
- s.seqNum++
- if err == nil && len(packet) == 0 {
- err = errors.New("ssh: zero length packet")
- }
-
- if len(packet) > 0 {
- switch packet[0] {
- case msgNewKeys:
- select {
- case cipher := <-s.pendingKeyChange:
- s.packetCipher = cipher
- default:
- return nil, errors.New("ssh: got bogus newkeys message.")
- }
-
- case msgDisconnect:
- // Transform a disconnect message into an
- // error. Since this is lowest level at which
- // we interpret message types, doing it here
- // ensures that we don't have to handle it
- // elsewhere.
- var msg disconnectMsg
- if err := Unmarshal(packet, &msg); err != nil {
- return nil, err
- }
- return nil, &msg
- }
- }
-
- // The packet may point to an internal buffer, so copy the
- // packet out here.
- fresh := make([]byte, len(packet))
- copy(fresh, packet)
-
- return fresh, err
-}
-
-func (t *transport) writePacket(packet []byte) error {
- if debugTransport {
- t.printPacket(packet, true)
- }
- return t.writer.writePacket(t.bufWriter, t.rand, packet)
-}
-
-func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error {
- changeKeys := len(packet) > 0 && packet[0] == msgNewKeys
-
- err := s.packetCipher.writePacket(s.seqNum, w, rand, packet)
- if err != nil {
- return err
- }
- if err = w.Flush(); err != nil {
- return err
- }
- s.seqNum++
- if changeKeys {
- select {
- case cipher := <-s.pendingKeyChange:
- s.packetCipher = cipher
- default:
- panic("ssh: no key material for msgNewKeys")
- }
- }
- return err
-}
-
-func newTransport(rwc io.ReadWriteCloser, rand io.Reader, isClient bool) *transport {
- t := &transport{
- bufReader: bufio.NewReader(rwc),
- bufWriter: bufio.NewWriter(rwc),
- rand: rand,
- reader: connectionState{
- packetCipher: &streamPacketCipher{cipher: noneCipher{}},
- pendingKeyChange: make(chan packetCipher, 1),
- },
- writer: connectionState{
- packetCipher: &streamPacketCipher{cipher: noneCipher{}},
- pendingKeyChange: make(chan packetCipher, 1),
- },
- Closer: rwc,
- }
- t.isClient = isClient
-
- if isClient {
- t.reader.dir = serverKeys
- t.writer.dir = clientKeys
- } else {
- t.reader.dir = clientKeys
- t.writer.dir = serverKeys
- }
-
- return t
-}
-
-type direction struct {
- ivTag []byte
- keyTag []byte
- macKeyTag []byte
-}
-
-var (
- serverKeys = direction{[]byte{'B'}, []byte{'D'}, []byte{'F'}}
- clientKeys = direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}}
-)
-
-// generateKeys generates key material for IV, MAC and encryption.
-func generateKeys(d direction, algs directionAlgorithms, kex *kexResult) (iv, key, macKey []byte) {
- cipherMode := cipherModes[algs.Cipher]
- macMode := macModes[algs.MAC]
-
- iv = make([]byte, cipherMode.ivSize)
- key = make([]byte, cipherMode.keySize)
- macKey = make([]byte, macMode.keySize)
-
- generateKeyMaterial(iv, d.ivTag, kex)
- generateKeyMaterial(key, d.keyTag, kex)
- generateKeyMaterial(macKey, d.macKeyTag, kex)
- return
-}
-
-// setupKeys sets the cipher and MAC keys from kex.K, kex.H and sessionId, as
-// described in RFC 4253, section 6.4. direction should either be serverKeys
-// (to setup server->client keys) or clientKeys (for client->server keys).
-func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) {
- iv, key, macKey := generateKeys(d, algs, kex)
-
- if algs.Cipher == gcmCipherID {
- return newGCMCipher(iv, key)
- }
-
- if algs.Cipher == aes128cbcID {
- return newAESCBCCipher(iv, key, macKey, algs)
- }
-
- if algs.Cipher == tripledescbcID {
- return newTripleDESCBCCipher(iv, key, macKey, algs)
- }
-
- c := &streamPacketCipher{
- mac: macModes[algs.MAC].new(macKey),
- etm: macModes[algs.MAC].etm,
- }
- c.macResult = make([]byte, c.mac.Size())
-
- var err error
- c.cipher, err = cipherModes[algs.Cipher].createStream(key, iv)
- if err != nil {
- return nil, err
- }
-
- return c, nil
-}
-
-// generateKeyMaterial fills out with key material generated from tag, K, H
-// and sessionId, as specified in RFC 4253, section 7.2.
-func generateKeyMaterial(out, tag []byte, r *kexResult) {
- var digestsSoFar []byte
-
- h := r.Hash.New()
- for len(out) > 0 {
- h.Reset()
- h.Write(r.K)
- h.Write(r.H)
-
- if len(digestsSoFar) == 0 {
- h.Write(tag)
- h.Write(r.SessionID)
- } else {
- h.Write(digestsSoFar)
- }
-
- digest := h.Sum(nil)
- n := copy(out, digest)
- out = out[n:]
- if len(out) > 0 {
- digestsSoFar = append(digestsSoFar, digest...)
- }
- }
-}
-
-const packageVersion = "SSH-2.0-Go"
-
-// Sends and receives a version line. The versionLine string should
-// be US ASCII, start with "SSH-2.0-", and should not include a
-// newline. exchangeVersions returns the other side's version line.
-func exchangeVersions(rw io.ReadWriter, versionLine []byte) (them []byte, err error) {
- // Contrary to the RFC, we do not ignore lines that don't
- // start with "SSH-2.0-" to make the library usable with
- // nonconforming servers.
- for _, c := range versionLine {
- // The spec disallows non US-ASCII chars, and
- // specifically forbids null chars.
- if c < 32 {
- return nil, errors.New("ssh: junk character in version line")
- }
- }
- if _, err = rw.Write(append(versionLine, '\r', '\n')); err != nil {
- return
- }
-
- them, err = readVersion(rw)
- return them, err
-}
-
-// maxVersionStringBytes is the maximum number of bytes that we'll
-// accept as a version string. RFC 4253 section 4.2 limits this at 255
-// chars
-const maxVersionStringBytes = 255
-
-// Read version string as specified by RFC 4253, section 4.2.
-func readVersion(r io.Reader) ([]byte, error) {
- versionString := make([]byte, 0, 64)
- var ok bool
- var buf [1]byte
-
- for len(versionString) < maxVersionStringBytes {
- _, err := io.ReadFull(r, buf[:])
- if err != nil {
- return nil, err
- }
- // The RFC says that the version should be terminated with \r\n
- // but several SSH servers actually only send a \n.
- if buf[0] == '\n' {
- ok = true
- break
- }
-
- // non ASCII chars are disallowed, but we are lenient,
- // since Go doesn't use null-terminated strings.
-
- // The RFC allows a comment after a space, however,
- // all of it (version and comments) goes into the
- // session hash.
- versionString = append(versionString, buf[0])
- }
-
- if !ok {
- return nil, errors.New("ssh: overflow reading version string")
- }
-
- // There might be a '\r' on the end which we should remove.
- if len(versionString) > 0 && versionString[len(versionString)-1] == '\r' {
- versionString = versionString[:len(versionString)-1]
- }
- return versionString, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport_test.go
deleted file mode 100644
index 92d83abf9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/transport_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2011 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 file.
-
-package ssh
-
-import (
- "bytes"
- "crypto/rand"
- "encoding/binary"
- "strings"
- "testing"
-)
-
-func TestReadVersion(t *testing.T) {
- longversion := strings.Repeat("SSH-2.0-bla", 50)[:253]
- cases := map[string]string{
- "SSH-2.0-bla\r\n": "SSH-2.0-bla",
- "SSH-2.0-bla\n": "SSH-2.0-bla",
- longversion + "\r\n": longversion,
- }
-
- for in, want := range cases {
- result, err := readVersion(bytes.NewBufferString(in))
- if err != nil {
- t.Errorf("readVersion(%q): %s", in, err)
- }
- got := string(result)
- if got != want {
- t.Errorf("got %q, want %q", got, want)
- }
- }
-}
-
-func TestReadVersionError(t *testing.T) {
- longversion := strings.Repeat("SSH-2.0-bla", 50)[:253]
- cases := []string{
- longversion + "too-long\r\n",
- }
- for _, in := range cases {
- if _, err := readVersion(bytes.NewBufferString(in)); err == nil {
- t.Errorf("readVersion(%q) should have failed", in)
- }
- }
-}
-
-func TestExchangeVersionsBasic(t *testing.T) {
- v := "SSH-2.0-bla"
- buf := bytes.NewBufferString(v + "\r\n")
- them, err := exchangeVersions(buf, []byte("xyz"))
- if err != nil {
- t.Errorf("exchangeVersions: %v", err)
- }
-
- if want := "SSH-2.0-bla"; string(them) != want {
- t.Errorf("got %q want %q for our version", them, want)
- }
-}
-
-func TestExchangeVersions(t *testing.T) {
- cases := []string{
- "not\x000allowed",
- "not allowed\n",
- }
- for _, c := range cases {
- buf := bytes.NewBufferString("SSH-2.0-bla\r\n")
- if _, err := exchangeVersions(buf, []byte(c)); err == nil {
- t.Errorf("exchangeVersions(%q): should have failed", c)
- }
- }
-}
-
-type closerBuffer struct {
- bytes.Buffer
-}
-
-func (b *closerBuffer) Close() error {
- return nil
-}
-
-func TestTransportMaxPacketWrite(t *testing.T) {
- buf := &closerBuffer{}
- tr := newTransport(buf, rand.Reader, true)
- huge := make([]byte, maxPacket+1)
- err := tr.writePacket(huge)
- if err == nil {
- t.Errorf("transport accepted write for a huge packet.")
- }
-}
-
-func TestTransportMaxPacketReader(t *testing.T) {
- var header [5]byte
- huge := make([]byte, maxPacket+128)
- binary.BigEndian.PutUint32(header[0:], uint32(len(huge)))
- // padding.
- header[4] = 0
-
- buf := &closerBuffer{}
- buf.Write(header[:])
- buf.Write(huge)
-
- tr := newTransport(buf, rand.Reader, true)
- _, err := tr.readPacket()
- if err == nil {
- t.Errorf("transport succeeded reading huge packet.")
- } else if !strings.Contains(err.Error(), "large") {
- t.Errorf("got %q, should mention %q", err.Error(), "large")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/cipher.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/cipher.go
deleted file mode 100644
index 9c13d12a2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/cipher.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2015 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 file.
-
-// Package tea implements the TEA algorithm, as defined in Needham and
-// Wheeler's 1994 technical report, “TEA, a Tiny Encryption Algorithmâ€. See
-// http://www.cix.co.uk/~klockstone/tea.pdf for details.
-
-package tea
-
-import (
- "crypto/cipher"
- "encoding/binary"
- "errors"
-)
-
-const (
- // BlockSize is the size of a TEA block, in bytes.
- BlockSize = 8
-
- // KeySize is the size of a TEA key, in bytes.
- KeySize = 16
-
- // delta is the TEA key schedule constant.
- delta = 0x9e3779b9
-
- // numRounds is the standard number of rounds in TEA.
- numRounds = 64
-)
-
-// tea is an instance of the TEA cipher with a particular key.
-type tea struct {
- key [16]byte
- rounds int
-}
-
-// NewCipher returns an instance of the TEA cipher with the standard number of
-// rounds. The key argument must be 16 bytes long.
-func NewCipher(key []byte) (cipher.Block, error) {
- return NewCipherWithRounds(key, numRounds)
-}
-
-// NewCipherWithRounds returns an instance of the TEA cipher with a given
-// number of rounds, which must be even. The key argument must be 16 bytes
-// long.
-func NewCipherWithRounds(key []byte, rounds int) (cipher.Block, error) {
- if len(key) != 16 {
- return nil, errors.New("tea: incorrect key size")
- }
-
- if rounds&1 != 0 {
- return nil, errors.New("tea: odd number of rounds specified")
- }
-
- c := &tea{
- rounds: rounds,
- }
- copy(c.key[:], key)
-
- return c, nil
-}
-
-// BlockSize returns the TEA block size, which is eight bytes. It is necessary
-// to satisfy the Block interface in the package "crypto/cipher".
-func (*tea) BlockSize() int {
- return BlockSize
-}
-
-// Encrypt encrypts the 8 byte buffer src using the key in t and stores the
-// result in dst. Note that for amounts of data larger than a block, it is not
-// safe to just call Encrypt on successive blocks; instead, use an encryption
-// mode like CBC (see crypto/cipher/cbc.go).
-func (t *tea) Encrypt(dst, src []byte) {
- e := binary.BigEndian
- v0, v1 := e.Uint32(src), e.Uint32(src[4:])
- k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:])
-
- sum := uint32(0)
- delta := uint32(delta)
-
- for i := 0; i < t.rounds/2; i++ {
- sum += delta
- v0 += ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1)
- v1 += ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3)
- }
-
- e.PutUint32(dst, v0)
- e.PutUint32(dst[4:], v1)
-}
-
-// Decrypt decrypts the 8 byte buffer src using the key in t and stores the
-// result in dst.
-func (t *tea) Decrypt(dst, src []byte) {
- e := binary.BigEndian
- v0, v1 := e.Uint32(src), e.Uint32(src[4:])
- k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:])
-
- delta := uint32(delta)
- sum := delta * uint32(t.rounds/2) // in general, sum = delta * n
-
- for i := 0; i < t.rounds/2; i++ {
- v1 -= ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3)
- v0 -= ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1)
- sum -= delta
- }
-
- e.PutUint32(dst, v0)
- e.PutUint32(dst[4:], v1)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/tea_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/tea_test.go
deleted file mode 100644
index eb98d1e0e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/tea/tea_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2015 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 file.
-
-package tea
-
-import (
- "bytes"
- "testing"
-)
-
-// A sample test key for when we just want to initialize a cipher
-var testKey = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}
-
-// Test that the block size for tea is correct
-func TestBlocksize(t *testing.T) {
- c, err := NewCipher(testKey)
- if err != nil {
- t.Fatalf("NewCipher returned error: %s", err)
- }
-
- if result := c.BlockSize(); result != BlockSize {
- t.Errorf("cipher.BlockSize returned %d, but expected %d", result, BlockSize)
- }
-}
-
-// Test that invalid key sizes return an error
-func TestInvalidKeySize(t *testing.T) {
- var key [KeySize + 1]byte
-
- if _, err := NewCipher(key[:]); err == nil {
- t.Errorf("invalid key size %d didn't result in an error.", len(key))
- }
-
- if _, err := NewCipher(key[:KeySize-1]); err == nil {
- t.Errorf("invalid key size %d didn't result in an error.", KeySize-1)
- }
-}
-
-// Test Vectors
-type teaTest struct {
- rounds int
- key []byte
- plaintext []byte
- ciphertext []byte
-}
-
-var teaTests = []teaTest{
- // These were sourced from https://github.com/froydnj/ironclad/blob/master/testing/test-vectors/tea.testvec
- {
- numRounds,
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x41, 0xea, 0x3a, 0x0a, 0x94, 0xba, 0xa9, 0x40},
- },
- {
- numRounds,
- []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- []byte{0x31, 0x9b, 0xbe, 0xfb, 0x01, 0x6a, 0xbd, 0xb2},
- },
- {
- 16,
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0xed, 0x28, 0x5d, 0xa1, 0x45, 0x5b, 0x33, 0xc1},
- },
-}
-
-// Test encryption
-func TestCipherEncrypt(t *testing.T) {
- // Test encryption with standard 64 rounds
- for i, test := range teaTests {
- c, err := NewCipherWithRounds(test.key, test.rounds)
- if err != nil {
- t.Fatalf("#%d: NewCipher returned error: %s", i, err)
- }
-
- var ciphertext [BlockSize]byte
- c.Encrypt(ciphertext[:], test.plaintext)
-
- if !bytes.Equal(ciphertext[:], test.ciphertext) {
- t.Errorf("#%d: incorrect ciphertext. Got %x, wanted %x", i, ciphertext, test.ciphertext)
- }
-
- var plaintext2 [BlockSize]byte
- c.Decrypt(plaintext2[:], ciphertext[:])
-
- if !bytes.Equal(plaintext2[:], test.plaintext) {
- t.Errorf("#%d: incorrect plaintext. Got %x, wanted %x", i, plaintext2, test.plaintext)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish.go
deleted file mode 100644
index 6db01fcf4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package twofish implements Bruce Schneier's Twofish encryption algorithm.
-package twofish // import "golang.org/x/crypto/twofish"
-
-// Twofish is defined in https://www.schneier.com/paper-twofish-paper.pdf [TWOFISH]
-
-// This code is a port of the LibTom C implementation.
-// See http://libtom.org/?page=features&newsitems=5&whatfile=crypt.
-// LibTomCrypt is free for all purposes under the public domain.
-// It was heavily inspired by the go blowfish package.
-
-import "strconv"
-
-// BlockSize is the constant block size of Twofish.
-const BlockSize = 16
-
-const mdsPolynomial = 0x169 // x^8 + x^6 + x^5 + x^3 + 1, see [TWOFISH] 4.2
-const rsPolynomial = 0x14d // x^8 + x^6 + x^3 + x^2 + 1, see [TWOFISH] 4.3
-
-// A Cipher is an instance of Twofish encryption using a particular key.
-type Cipher struct {
- s [4][256]uint32
- k [40]uint32
-}
-
-type KeySizeError int
-
-func (k KeySizeError) Error() string {
- return "crypto/twofish: invalid key size " + strconv.Itoa(int(k))
-}
-
-// NewCipher creates and returns a Cipher.
-// The key argument should be the Twofish key, 16, 24 or 32 bytes.
-func NewCipher(key []byte) (*Cipher, error) {
- keylen := len(key)
-
- if keylen != 16 && keylen != 24 && keylen != 32 {
- return nil, KeySizeError(keylen)
- }
-
- // k is the number of 64 bit words in key
- k := keylen / 8
-
- // Create the S[..] words
- var S [4 * 4]byte
- for i := 0; i < k; i++ {
- // Computes [y0 y1 y2 y3] = rs . [x0 x1 x2 x3 x4 x5 x6 x7]
- for j, rsRow := range rs {
- for k, rsVal := range rsRow {
- S[4*i+j] ^= gfMult(key[8*i+k], rsVal, rsPolynomial)
- }
- }
- }
-
- // Calculate subkeys
- c := new(Cipher)
- var tmp [4]byte
- for i := byte(0); i < 20; i++ {
- // A = h(p * 2x, Me)
- for j := range tmp {
- tmp[j] = 2 * i
- }
- A := h(tmp[:], key, 0)
-
- // B = rolc(h(p * (2x + 1), Mo), 8)
- for j := range tmp {
- tmp[j] = 2*i + 1
- }
- B := h(tmp[:], key, 1)
- B = rol(B, 8)
-
- c.k[2*i] = A + B
-
- // K[2i+1] = (A + 2B) <<< 9
- c.k[2*i+1] = rol(2*B+A, 9)
- }
-
- // Calculate sboxes
- switch k {
- case 2:
- for i := range c.s[0] {
- c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][byte(i)]^S[0]]^S[4]], 0)
- c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][byte(i)]^S[1]]^S[5]], 1)
- c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][byte(i)]^S[2]]^S[6]], 2)
- c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][byte(i)]^S[3]]^S[7]], 3)
- }
- case 3:
- for i := range c.s[0] {
- c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]], 0)
- c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[1]]^S[5]]^S[9]], 1)
- c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]], 2)
- c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[3]]^S[7]]^S[11]], 3)
- }
- default:
- for i := range c.s[0] {
- c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]]^S[12]], 0)
- c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[1]]^S[5]]^S[9]]^S[13]], 1)
- c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]]^S[14]], 2)
- c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][sbox[1][byte(i)]^S[3]]^S[7]]^S[11]]^S[15]], 3)
- }
- }
-
- return c, nil
-}
-
-// BlockSize returns the Twofish block size, 16 bytes.
-func (c *Cipher) BlockSize() int { return BlockSize }
-
-// store32l stores src in dst in little-endian form.
-func store32l(dst []byte, src uint32) {
- dst[0] = byte(src)
- dst[1] = byte(src >> 8)
- dst[2] = byte(src >> 16)
- dst[3] = byte(src >> 24)
- return
-}
-
-// load32l reads a little-endian uint32 from src.
-func load32l(src []byte) uint32 {
- return uint32(src[0]) | uint32(src[1])<<8 | uint32(src[2])<<16 | uint32(src[3])<<24
-}
-
-// rol returns x after a left circular rotation of y bits.
-func rol(x, y uint32) uint32 {
- return (x << (y & 31)) | (x >> (32 - (y & 31)))
-}
-
-// ror returns x after a right circular rotation of y bits.
-func ror(x, y uint32) uint32 {
- return (x >> (y & 31)) | (x << (32 - (y & 31)))
-}
-
-// The RS matrix. See [TWOFISH] 4.3
-var rs = [4][8]byte{
- {0x01, 0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E},
- {0xA4, 0x56, 0x82, 0xF3, 0x1E, 0xC6, 0x68, 0xE5},
- {0x02, 0xA1, 0xFC, 0xC1, 0x47, 0xAE, 0x3D, 0x19},
- {0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E, 0x03},
-}
-
-// sbox tables
-var sbox = [2][256]byte{
- {
- 0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38,
- 0x0d, 0xc6, 0x35, 0x98, 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, 0x94, 0x48,
- 0xf2, 0xd0, 0x8b, 0x30, 0x84, 0x54, 0xdf, 0x23, 0x19, 0x5b, 0x3d, 0x59, 0xf3, 0xae, 0xa2, 0x82,
- 0x63, 0x01, 0x83, 0x2e, 0xd9, 0x51, 0x9b, 0x7c, 0xa6, 0xeb, 0xa5, 0xbe, 0x16, 0x0c, 0xe3, 0x61,
- 0xc0, 0x8c, 0x3a, 0xf5, 0x73, 0x2c, 0x25, 0x0b, 0xbb, 0x4e, 0x89, 0x6b, 0x53, 0x6a, 0xb4, 0xf1,
- 0xe1, 0xe6, 0xbd, 0x45, 0xe2, 0xf4, 0xb6, 0x66, 0xcc, 0x95, 0x03, 0x56, 0xd4, 0x1c, 0x1e, 0xd7,
- 0xfb, 0xc3, 0x8e, 0xb5, 0xe9, 0xcf, 0xbf, 0xba, 0xea, 0x77, 0x39, 0xaf, 0x33, 0xc9, 0x62, 0x71,
- 0x81, 0x79, 0x09, 0xad, 0x24, 0xcd, 0xf9, 0xd8, 0xe5, 0xc5, 0xb9, 0x4d, 0x44, 0x08, 0x86, 0xe7,
- 0xa1, 0x1d, 0xaa, 0xed, 0x06, 0x70, 0xb2, 0xd2, 0x41, 0x7b, 0xa0, 0x11, 0x31, 0xc2, 0x27, 0x90,
- 0x20, 0xf6, 0x60, 0xff, 0x96, 0x5c, 0xb1, 0xab, 0x9e, 0x9c, 0x52, 0x1b, 0x5f, 0x93, 0x0a, 0xef,
- 0x91, 0x85, 0x49, 0xee, 0x2d, 0x4f, 0x8f, 0x3b, 0x47, 0x87, 0x6d, 0x46, 0xd6, 0x3e, 0x69, 0x64,
- 0x2a, 0xce, 0xcb, 0x2f, 0xfc, 0x97, 0x05, 0x7a, 0xac, 0x7f, 0xd5, 0x1a, 0x4b, 0x0e, 0xa7, 0x5a,
- 0x28, 0x14, 0x3f, 0x29, 0x88, 0x3c, 0x4c, 0x02, 0xb8, 0xda, 0xb0, 0x17, 0x55, 0x1f, 0x8a, 0x7d,
- 0x57, 0xc7, 0x8d, 0x74, 0xb7, 0xc4, 0x9f, 0x72, 0x7e, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34,
- 0x6e, 0x50, 0xde, 0x68, 0x65, 0xbc, 0xdb, 0xf8, 0xc8, 0xa8, 0x2b, 0x40, 0xdc, 0xfe, 0x32, 0xa4,
- 0xca, 0x10, 0x21, 0xf0, 0xd3, 0x5d, 0x0f, 0x00, 0x6f, 0x9d, 0x36, 0x42, 0x4a, 0x5e, 0xc1, 0xe0,
- },
- {
- 0x75, 0xf3, 0xc6, 0xf4, 0xdb, 0x7b, 0xfb, 0xc8, 0x4a, 0xd3, 0xe6, 0x6b, 0x45, 0x7d, 0xe8, 0x4b,
- 0xd6, 0x32, 0xd8, 0xfd, 0x37, 0x71, 0xf1, 0xe1, 0x30, 0x0f, 0xf8, 0x1b, 0x87, 0xfa, 0x06, 0x3f,
- 0x5e, 0xba, 0xae, 0x5b, 0x8a, 0x00, 0xbc, 0x9d, 0x6d, 0xc1, 0xb1, 0x0e, 0x80, 0x5d, 0xd2, 0xd5,
- 0xa0, 0x84, 0x07, 0x14, 0xb5, 0x90, 0x2c, 0xa3, 0xb2, 0x73, 0x4c, 0x54, 0x92, 0x74, 0x36, 0x51,
- 0x38, 0xb0, 0xbd, 0x5a, 0xfc, 0x60, 0x62, 0x96, 0x6c, 0x42, 0xf7, 0x10, 0x7c, 0x28, 0x27, 0x8c,
- 0x13, 0x95, 0x9c, 0xc7, 0x24, 0x46, 0x3b, 0x70, 0xca, 0xe3, 0x85, 0xcb, 0x11, 0xd0, 0x93, 0xb8,
- 0xa6, 0x83, 0x20, 0xff, 0x9f, 0x77, 0xc3, 0xcc, 0x03, 0x6f, 0x08, 0xbf, 0x40, 0xe7, 0x2b, 0xe2,
- 0x79, 0x0c, 0xaa, 0x82, 0x41, 0x3a, 0xea, 0xb9, 0xe4, 0x9a, 0xa4, 0x97, 0x7e, 0xda, 0x7a, 0x17,
- 0x66, 0x94, 0xa1, 0x1d, 0x3d, 0xf0, 0xde, 0xb3, 0x0b, 0x72, 0xa7, 0x1c, 0xef, 0xd1, 0x53, 0x3e,
- 0x8f, 0x33, 0x26, 0x5f, 0xec, 0x76, 0x2a, 0x49, 0x81, 0x88, 0xee, 0x21, 0xc4, 0x1a, 0xeb, 0xd9,
- 0xc5, 0x39, 0x99, 0xcd, 0xad, 0x31, 0x8b, 0x01, 0x18, 0x23, 0xdd, 0x1f, 0x4e, 0x2d, 0xf9, 0x48,
- 0x4f, 0xf2, 0x65, 0x8e, 0x78, 0x5c, 0x58, 0x19, 0x8d, 0xe5, 0x98, 0x57, 0x67, 0x7f, 0x05, 0x64,
- 0xaf, 0x63, 0xb6, 0xfe, 0xf5, 0xb7, 0x3c, 0xa5, 0xce, 0xe9, 0x68, 0x44, 0xe0, 0x4d, 0x43, 0x69,
- 0x29, 0x2e, 0xac, 0x15, 0x59, 0xa8, 0x0a, 0x9e, 0x6e, 0x47, 0xdf, 0x34, 0x35, 0x6a, 0xcf, 0xdc,
- 0x22, 0xc9, 0xc0, 0x9b, 0x89, 0xd4, 0xed, 0xab, 0x12, 0xa2, 0x0d, 0x52, 0xbb, 0x02, 0x2f, 0xa9,
- 0xd7, 0x61, 0x1e, 0xb4, 0x50, 0x04, 0xf6, 0xc2, 0x16, 0x25, 0x86, 0x56, 0x55, 0x09, 0xbe, 0x91,
- },
-}
-
-// gfMult returns a·b in GF(2^8)/p
-func gfMult(a, b byte, p uint32) byte {
- B := [2]uint32{0, uint32(b)}
- P := [2]uint32{0, p}
- var result uint32
-
- // branchless GF multiplier
- for i := 0; i < 7; i++ {
- result ^= B[a&1]
- a >>= 1
- B[1] = P[B[1]>>7] ^ (B[1] << 1)
- }
- result ^= B[a&1]
- return byte(result)
-}
-
-// mdsColumnMult calculates y{col} where [y0 y1 y2 y3] = MDS · [x0]
-func mdsColumnMult(in byte, col int) uint32 {
- mul01 := in
- mul5B := gfMult(in, 0x5B, mdsPolynomial)
- mulEF := gfMult(in, 0xEF, mdsPolynomial)
-
- switch col {
- case 0:
- return uint32(mul01) | uint32(mul5B)<<8 | uint32(mulEF)<<16 | uint32(mulEF)<<24
- case 1:
- return uint32(mulEF) | uint32(mulEF)<<8 | uint32(mul5B)<<16 | uint32(mul01)<<24
- case 2:
- return uint32(mul5B) | uint32(mulEF)<<8 | uint32(mul01)<<16 | uint32(mulEF)<<24
- case 3:
- return uint32(mul5B) | uint32(mul01)<<8 | uint32(mulEF)<<16 | uint32(mul5B)<<24
- }
-
- panic("unreachable")
-}
-
-// h implements the S-box generation function. See [TWOFISH] 4.3.5
-func h(in, key []byte, offset int) uint32 {
- var y [4]byte
- for x := range y {
- y[x] = in[x]
- }
- switch len(key) / 8 {
- case 4:
- y[0] = sbox[1][y[0]] ^ key[4*(6+offset)+0]
- y[1] = sbox[0][y[1]] ^ key[4*(6+offset)+1]
- y[2] = sbox[0][y[2]] ^ key[4*(6+offset)+2]
- y[3] = sbox[1][y[3]] ^ key[4*(6+offset)+3]
- fallthrough
- case 3:
- y[0] = sbox[1][y[0]] ^ key[4*(4+offset)+0]
- y[1] = sbox[1][y[1]] ^ key[4*(4+offset)+1]
- y[2] = sbox[0][y[2]] ^ key[4*(4+offset)+2]
- y[3] = sbox[0][y[3]] ^ key[4*(4+offset)+3]
- fallthrough
- case 2:
- y[0] = sbox[1][sbox[0][sbox[0][y[0]]^key[4*(2+offset)+0]]^key[4*(0+offset)+0]]
- y[1] = sbox[0][sbox[0][sbox[1][y[1]]^key[4*(2+offset)+1]]^key[4*(0+offset)+1]]
- y[2] = sbox[1][sbox[1][sbox[0][y[2]]^key[4*(2+offset)+2]]^key[4*(0+offset)+2]]
- y[3] = sbox[0][sbox[1][sbox[1][y[3]]^key[4*(2+offset)+3]]^key[4*(0+offset)+3]]
- }
- // [y0 y1 y2 y3] = MDS . [x0 x1 x2 x3]
- var mdsMult uint32
- for i := range y {
- mdsMult ^= mdsColumnMult(y[i], i)
- }
- return mdsMult
-}
-
-// Encrypt encrypts a 16-byte block from src to dst, which may overlap.
-// Note that for amounts of data larger than a block,
-// it is not safe to just call Encrypt on successive blocks;
-// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
-func (c *Cipher) Encrypt(dst, src []byte) {
- S1 := c.s[0]
- S2 := c.s[1]
- S3 := c.s[2]
- S4 := c.s[3]
-
- // Load input
- ia := load32l(src[0:4])
- ib := load32l(src[4:8])
- ic := load32l(src[8:12])
- id := load32l(src[12:16])
-
- // Pre-whitening
- ia ^= c.k[0]
- ib ^= c.k[1]
- ic ^= c.k[2]
- id ^= c.k[3]
-
- for i := 0; i < 8; i++ {
- k := c.k[8+i*4 : 12+i*4]
- t2 := S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)]
- t1 := S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2
- ic = ror(ic^(t1+k[0]), 1)
- id = rol(id, 1) ^ (t2 + t1 + k[1])
-
- t2 = S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)]
- t1 = S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2
- ia = ror(ia^(t1+k[2]), 1)
- ib = rol(ib, 1) ^ (t2 + t1 + k[3])
- }
-
- // Output with "undo last swap"
- ta := ic ^ c.k[4]
- tb := id ^ c.k[5]
- tc := ia ^ c.k[6]
- td := ib ^ c.k[7]
-
- store32l(dst[0:4], ta)
- store32l(dst[4:8], tb)
- store32l(dst[8:12], tc)
- store32l(dst[12:16], td)
-}
-
-// Decrypt decrypts a 16-byte block from src to dst, which may overlap.
-func (c *Cipher) Decrypt(dst, src []byte) {
- S1 := c.s[0]
- S2 := c.s[1]
- S3 := c.s[2]
- S4 := c.s[3]
-
- // Load input
- ta := load32l(src[0:4])
- tb := load32l(src[4:8])
- tc := load32l(src[8:12])
- td := load32l(src[12:16])
-
- // Undo undo final swap
- ia := tc ^ c.k[6]
- ib := td ^ c.k[7]
- ic := ta ^ c.k[4]
- id := tb ^ c.k[5]
-
- for i := 8; i > 0; i-- {
- k := c.k[4+i*4 : 8+i*4]
- t2 := S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)]
- t1 := S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2
- ia = rol(ia, 1) ^ (t1 + k[2])
- ib = ror(ib^(t2+t1+k[3]), 1)
-
- t2 = S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)]
- t1 = S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2
- ic = rol(ic, 1) ^ (t1 + k[0])
- id = ror(id^(t2+t1+k[1]), 1)
- }
-
- // Undo pre-whitening
- ia ^= c.k[0]
- ib ^= c.k[1]
- ic ^= c.k[2]
- id ^= c.k[3]
-
- store32l(dst[0:4], ia)
- store32l(dst[4:8], ib)
- store32l(dst[8:12], ic)
- store32l(dst[12:16], id)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish_test.go
deleted file mode 100644
index ed6a1a8fd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/twofish/twofish_test.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2011 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 file.
-
-package twofish
-
-import (
- "bytes"
- "testing"
-)
-
-var qbox = [2][4][16]byte{
- {
- {0x8, 0x1, 0x7, 0xD, 0x6, 0xF, 0x3, 0x2, 0x0, 0xB, 0x5, 0x9, 0xE, 0xC, 0xA, 0x4},
- {0xE, 0xC, 0xB, 0x8, 0x1, 0x2, 0x3, 0x5, 0xF, 0x4, 0xA, 0x6, 0x7, 0x0, 0x9, 0xD},
- {0xB, 0xA, 0x5, 0xE, 0x6, 0xD, 0x9, 0x0, 0xC, 0x8, 0xF, 0x3, 0x2, 0x4, 0x7, 0x1},
- {0xD, 0x7, 0xF, 0x4, 0x1, 0x2, 0x6, 0xE, 0x9, 0xB, 0x3, 0x0, 0x8, 0x5, 0xC, 0xA},
- },
- {
- {0x2, 0x8, 0xB, 0xD, 0xF, 0x7, 0x6, 0xE, 0x3, 0x1, 0x9, 0x4, 0x0, 0xA, 0xC, 0x5},
- {0x1, 0xE, 0x2, 0xB, 0x4, 0xC, 0x3, 0x7, 0x6, 0xD, 0xA, 0x5, 0xF, 0x9, 0x0, 0x8},
- {0x4, 0xC, 0x7, 0x5, 0x1, 0x6, 0x9, 0xA, 0x0, 0xE, 0xD, 0x8, 0x2, 0xB, 0x3, 0xF},
- {0xB, 0x9, 0x5, 0x1, 0xC, 0x3, 0xD, 0xE, 0x6, 0x4, 0x7, 0xF, 0x2, 0x0, 0x8, 0xA},
- },
-}
-
-// genSbox generates the variable sbox
-func genSbox(qi int, x byte) byte {
- a0, b0 := x/16, x%16
- for i := 0; i < 2; i++ {
- a1 := a0 ^ b0
- b1 := (a0 ^ ((b0 << 3) | (b0 >> 1)) ^ (a0 << 3)) & 15
- a0 = qbox[qi][2*i][a1]
- b0 = qbox[qi][2*i+1][b1]
- }
- return (b0 << 4) + a0
-}
-
-func TestSbox(t *testing.T) {
- for n := range sbox {
- for m := range sbox[n] {
- if genSbox(n, byte(m)) != sbox[n][m] {
- t.Errorf("#%d|%d: sbox value = %d want %d", n, m, sbox[n][m], genSbox(n, byte(m)))
- }
- }
- }
-}
-
-var testVectors = []struct {
- key []byte
- dec []byte
- enc []byte
-}{
- // These tests are extracted from LibTom
- {
- []byte{0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32, 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A},
- []byte{0xD4, 0x91, 0xDB, 0x16, 0xE7, 0xB1, 0xC3, 0x9E, 0x86, 0xCB, 0x08, 0x6B, 0x78, 0x9F, 0x54, 0x19},
- []byte{0x01, 0x9F, 0x98, 0x09, 0xDE, 0x17, 0x11, 0x85, 0x8F, 0xAA, 0xC3, 0xA3, 0xBA, 0x20, 0xFB, 0xC3},
- },
- {
- []byte{0x88, 0xB2, 0xB2, 0x70, 0x6B, 0x10, 0x5E, 0x36, 0xB4, 0x46, 0xBB, 0x6D, 0x73, 0x1A, 0x1E, 0x88,
- 0xEF, 0xA7, 0x1F, 0x78, 0x89, 0x65, 0xBD, 0x44},
- []byte{0x39, 0xDA, 0x69, 0xD6, 0xBA, 0x49, 0x97, 0xD5, 0x85, 0xB6, 0xDC, 0x07, 0x3C, 0xA3, 0x41, 0xB2},
- []byte{0x18, 0x2B, 0x02, 0xD8, 0x14, 0x97, 0xEA, 0x45, 0xF9, 0xDA, 0xAC, 0xDC, 0x29, 0x19, 0x3A, 0x65},
- },
- {
- []byte{0xD4, 0x3B, 0xB7, 0x55, 0x6E, 0xA3, 0x2E, 0x46, 0xF2, 0xA2, 0x82, 0xB7, 0xD4, 0x5B, 0x4E, 0x0D,
- 0x57, 0xFF, 0x73, 0x9D, 0x4D, 0xC9, 0x2C, 0x1B, 0xD7, 0xFC, 0x01, 0x70, 0x0C, 0xC8, 0x21, 0x6F},
- []byte{0x90, 0xAF, 0xE9, 0x1B, 0xB2, 0x88, 0x54, 0x4F, 0x2C, 0x32, 0xDC, 0x23, 0x9B, 0x26, 0x35, 0xE6},
- []byte{0x6C, 0xB4, 0x56, 0x1C, 0x40, 0xBF, 0x0A, 0x97, 0x05, 0x93, 0x1C, 0xB6, 0xD4, 0x08, 0xE7, 0xFA},
- },
- // These tests are derived from https://www.schneier.com/code/ecb_ival.txt
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32, 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A},
- },
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
- 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
- },
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0xCF, 0xD1, 0xD2, 0xE5, 0xA9, 0xBE, 0x9C, 0xDF, 0x50, 0x1F, 0x13, 0xB8, 0x92, 0xBD, 0x22, 0x48},
- },
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
- 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF,
- },
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x37, 0x52, 0x7B, 0xE0, 0x05, 0x23, 0x34, 0xB8, 0x9F, 0x0C, 0xFC, 0xCA, 0xE8, 0x7C, 0xFA, 0x20},
- },
-}
-
-func TestCipher(t *testing.T) {
- for n, tt := range testVectors {
- // Test if the plaintext (dec) is encrypts to the given
- // ciphertext (enc) using the given key. Test also if enc can
- // be decrypted again into dec.
- c, err := NewCipher(tt.key)
- if err != nil {
- t.Errorf("#%d: NewCipher: %v", n, err)
- return
- }
-
- buf := make([]byte, 16)
- c.Encrypt(buf, tt.dec)
- if !bytes.Equal(buf, tt.enc) {
- t.Errorf("#%d: encrypt = %x want %x", n, buf, tt.enc)
- }
- c.Decrypt(buf, tt.enc)
- if !bytes.Equal(buf, tt.dec) {
- t.Errorf("#%d: decrypt = %x want %x", n, buf, tt.dec)
- }
-
- // Test that 16 zero bytes, encrypted 1000 times then decrypted
- // 1000 times results in zero bytes again.
- zero := make([]byte, 16)
- buf = make([]byte, 16)
- for i := 0; i < 1000; i++ {
- c.Encrypt(buf, buf)
- }
- for i := 0; i < 1000; i++ {
- c.Decrypt(buf, buf)
- }
- if !bytes.Equal(buf, zero) {
- t.Errorf("#%d: encrypt/decrypt 1000: have %x want %x", n, buf, zero)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/block.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/block.go
deleted file mode 100644
index bf5d24599..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/block.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2009 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 file.
-
-/*
- Implementation adapted from Needham and Wheeler's paper:
- http://www.cix.co.uk/~klockstone/xtea.pdf
-
- A precalculated look up table is used during encryption/decryption for values that are based purely on the key.
-*/
-
-package xtea
-
-// XTEA is based on 64 rounds.
-const numRounds = 64
-
-// blockToUint32 reads an 8 byte slice into two uint32s.
-// The block is treated as big endian.
-func blockToUint32(src []byte) (uint32, uint32) {
- r0 := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
- r1 := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
- return r0, r1
-}
-
-// uint32ToBlock writes two uint32s into an 8 byte data block.
-// Values are written as big endian.
-func uint32ToBlock(v0, v1 uint32, dst []byte) {
- dst[0] = byte(v0 >> 24)
- dst[1] = byte(v0 >> 16)
- dst[2] = byte(v0 >> 8)
- dst[3] = byte(v0)
- dst[4] = byte(v1 >> 24)
- dst[5] = byte(v1 >> 16)
- dst[6] = byte(v1 >> 8)
- dst[7] = byte(v1 >> 0)
-}
-
-// encryptBlock encrypts a single 8 byte block using XTEA.
-func encryptBlock(c *Cipher, dst, src []byte) {
- v0, v1 := blockToUint32(src)
-
- // Two rounds of XTEA applied per loop
- for i := 0; i < numRounds; {
- v0 += ((v1<<4 ^ v1>>5) + v1) ^ c.table[i]
- i++
- v1 += ((v0<<4 ^ v0>>5) + v0) ^ c.table[i]
- i++
- }
-
- uint32ToBlock(v0, v1, dst)
-}
-
-// decryptBlock decrypt a single 8 byte block using XTEA.
-func decryptBlock(c *Cipher, dst, src []byte) {
- v0, v1 := blockToUint32(src)
-
- // Two rounds of XTEA applied per loop
- for i := numRounds; i > 0; {
- i--
- v1 -= ((v0<<4 ^ v0>>5) + v0) ^ c.table[i]
- i--
- v0 -= ((v1<<4 ^ v1>>5) + v1) ^ c.table[i]
- }
-
- uint32ToBlock(v0, v1, dst)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/cipher.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/cipher.go
deleted file mode 100644
index 108b42635..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/cipher.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2009 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 file.
-
-// Package xtea implements XTEA encryption, as defined in Needham and Wheeler's
-// 1997 technical report, "Tea extensions."
-package xtea // import "golang.org/x/crypto/xtea"
-
-// For details, see http://www.cix.co.uk/~klockstone/xtea.pdf
-
-import "strconv"
-
-// The XTEA block size in bytes.
-const BlockSize = 8
-
-// A Cipher is an instance of an XTEA cipher using a particular key.
-// table contains a series of precalculated values that are used each round.
-type Cipher struct {
- table [64]uint32
-}
-
-type KeySizeError int
-
-func (k KeySizeError) Error() string {
- return "crypto/xtea: invalid key size " + strconv.Itoa(int(k))
-}
-
-// NewCipher creates and returns a new Cipher.
-// The key argument should be the XTEA key.
-// XTEA only supports 128 bit (16 byte) keys.
-func NewCipher(key []byte) (*Cipher, error) {
- k := len(key)
- switch k {
- default:
- return nil, KeySizeError(k)
- case 16:
- break
- }
-
- c := new(Cipher)
- initCipher(c, key)
-
- return c, nil
-}
-
-// BlockSize returns the XTEA block size, 8 bytes.
-// It is necessary to satisfy the Block interface in the
-// package "crypto/cipher".
-func (c *Cipher) BlockSize() int { return BlockSize }
-
-// Encrypt encrypts the 8 byte buffer src using the key and stores the result in dst.
-// Note that for amounts of data larger than a block,
-// it is not safe to just call Encrypt on successive blocks;
-// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
-func (c *Cipher) Encrypt(dst, src []byte) { encryptBlock(c, dst, src) }
-
-// Decrypt decrypts the 8 byte buffer src using the key k and stores the result in dst.
-func (c *Cipher) Decrypt(dst, src []byte) { decryptBlock(c, dst, src) }
-
-// initCipher initializes the cipher context by creating a look up table
-// of precalculated values that are based on the key.
-func initCipher(c *Cipher, key []byte) {
- // Load the key into four uint32s
- var k [4]uint32
- for i := 0; i < len(k); i++ {
- j := i << 2 // Multiply by 4
- k[i] = uint32(key[j+0])<<24 | uint32(key[j+1])<<16 | uint32(key[j+2])<<8 | uint32(key[j+3])
- }
-
- // Precalculate the table
- const delta = 0x9E3779B9
- var sum uint32 = 0
-
- // Two rounds of XTEA applied per loop
- for i := 0; i < numRounds; {
- c.table[i] = sum + k[sum&3]
- i++
- sum += delta
- c.table[i] = sum + k[(sum>>11)&3]
- i++
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/xtea_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/xtea_test.go
deleted file mode 100644
index be711bf5a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xtea/xtea_test.go
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2009 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 file.
-
-package xtea
-
-import (
- "testing"
-)
-
-// A sample test key for when we just want to initialize a cipher
-var testKey = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}
-
-// Test that the block size for XTEA is correct
-func TestBlocksize(t *testing.T) {
- if BlockSize != 8 {
- t.Errorf("BlockSize constant - expected 8, got %d", BlockSize)
- return
- }
-
- c, err := NewCipher(testKey)
- if err != nil {
- t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err)
- return
- }
-
- result := c.BlockSize()
- if result != 8 {
- t.Errorf("BlockSize function - expected 8, got %d", result)
- return
- }
-}
-
-// A series of test values to confirm that the Cipher.table array was initialized correctly
-var testTable = []uint32{
- 0x00112233, 0x6B1568B8, 0xE28CE030, 0xC5089E2D, 0xC5089E2D, 0x1EFBD3A2, 0xA7845C2A, 0x78EF0917,
- 0x78EF0917, 0x172682D0, 0x5B6AC714, 0x822AC955, 0x3DE68511, 0xDC1DFECA, 0x2062430E, 0x3611343F,
- 0xF1CCEFFB, 0x900469B4, 0xD448ADF8, 0x2E3BE36D, 0xB6C46BF5, 0x994029F2, 0x994029F2, 0xF3335F67,
- 0x6AAAD6DF, 0x4D2694DC, 0x4D2694DC, 0xEB5E0E95, 0x2FA252D9, 0x4551440A, 0x121E10D6, 0xB0558A8F,
- 0xE388BDC3, 0x0A48C004, 0xC6047BC0, 0x643BF579, 0xA88039BD, 0x02736F32, 0x8AFBF7BA, 0x5C66A4A7,
- 0x5C66A4A7, 0xC76AEB2C, 0x3EE262A4, 0x215E20A1, 0x215E20A1, 0x7B515616, 0x03D9DE9E, 0x1988CFCF,
- 0xD5448B8B, 0x737C0544, 0xB7C04988, 0xDE804BC9, 0x9A3C0785, 0x3873813E, 0x7CB7C582, 0xD6AAFAF7,
- 0x4E22726F, 0x309E306C, 0x309E306C, 0x8A9165E1, 0x1319EE69, 0xF595AC66, 0xF595AC66, 0x4F88E1DB,
-}
-
-// Test that the cipher context is initialized correctly
-func TestCipherInit(t *testing.T) {
- c, err := NewCipher(testKey)
- if err != nil {
- t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err)
- return
- }
-
- for i := 0; i < len(c.table); i++ {
- if c.table[i] != testTable[i] {
- t.Errorf("NewCipher() failed to initialize Cipher.table[%d] correctly. Expected %08X, got %08X", i, testTable[i], c.table[i])
- break
- }
- }
-}
-
-// Test that invalid key sizes return an error
-func TestInvalidKeySize(t *testing.T) {
- // Test a long key
- key := []byte{
- 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF,
- 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF,
- }
-
- _, err := NewCipher(key)
- if err == nil {
- t.Errorf("Invalid key size %d didn't result in an error.", len(key))
- }
-
- // Test a short key
- key = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77}
-
- _, err = NewCipher(key)
- if err == nil {
- t.Errorf("Invalid key size %d didn't result in an error.", len(key))
- }
-}
-
-// Test that we can correctly decode some bytes we have encoded
-func TestEncodeDecode(t *testing.T) {
- original := []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}
- input := original
- output := make([]byte, BlockSize)
-
- c, err := NewCipher(testKey)
- if err != nil {
- t.Errorf("NewCipher(%d bytes) = %s", len(testKey), err)
- return
- }
-
- // Encrypt the input block
- c.Encrypt(output, input)
-
- // Check that the output does not match the input
- differs := false
- for i := 0; i < len(input); i++ {
- if output[i] != input[i] {
- differs = true
- break
- }
- }
- if differs == false {
- t.Error("Cipher.Encrypt: Failed to encrypt the input block.")
- return
- }
-
- // Decrypt the block we just encrypted
- input = output
- output = make([]byte, BlockSize)
- c.Decrypt(output, input)
-
- // Check that the output from decrypt matches our initial input
- for i := 0; i < len(input); i++ {
- if output[i] != original[i] {
- t.Errorf("Decrypted byte %d differed. Expected %02X, got %02X\n", i, original[i], output[i])
- return
- }
- }
-}
-
-// Test Vectors
-type CryptTest struct {
- key []byte
- plainText []byte
- cipherText []byte
-}
-
-var CryptTests = []CryptTest{
- // These were sourced from http://www.freemedialibrary.com/index.php/XTEA_test_vectors
- {
- []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
- []byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48},
- []byte{0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5},
- },
- {
- []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
- []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
- []byte{0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8},
- },
- {
- []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
- []byte{0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f},
- []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
- },
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48},
- []byte{0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5},
- },
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
- []byte{0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d},
- },
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55},
- []byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
- },
-
- // These vectors are from http://wiki.secondlife.com/wiki/XTEA_Strong_Encryption_Implementation#Bouncy_Castle_C.23_API
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0xDE, 0xE9, 0xD4, 0xD8, 0xF7, 0x13, 0x1E, 0xD9},
- },
- {
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
- []byte{0x06, 0x5C, 0x1B, 0x89, 0x75, 0xC6, 0xA8, 0x16},
- },
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A},
- []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- []byte{0x1F, 0xF9, 0xA0, 0x26, 0x1A, 0xC6, 0x42, 0x64},
- },
- {
- []byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A},
- []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
- []byte{0x8C, 0x67, 0x15, 0x5B, 0x2E, 0xF9, 0x1E, 0xAD},
- },
-}
-
-// Test encryption
-func TestCipherEncrypt(t *testing.T) {
- for i, tt := range CryptTests {
- c, err := NewCipher(tt.key)
- if err != nil {
- t.Errorf("NewCipher(%d bytes), vector %d = %s", len(tt.key), i, err)
- continue
- }
-
- out := make([]byte, len(tt.plainText))
- c.Encrypt(out, tt.plainText)
-
- for j := 0; j < len(out); j++ {
- if out[j] != tt.cipherText[j] {
- t.Errorf("Cipher.Encrypt %d: out[%d] = %02X, expected %02X", i, j, out[j], tt.cipherText[j])
- break
- }
- }
- }
-}
-
-// Test decryption
-func TestCipherDecrypt(t *testing.T) {
- for i, tt := range CryptTests {
- c, err := NewCipher(tt.key)
- if err != nil {
- t.Errorf("NewCipher(%d bytes), vector %d = %s", len(tt.key), i, err)
- continue
- }
-
- out := make([]byte, len(tt.cipherText))
- c.Decrypt(out, tt.cipherText)
-
- for j := 0; j < len(out); j++ {
- if out[j] != tt.plainText[j] {
- t.Errorf("Cipher.Decrypt %d: out[%d] = %02X, expected %02X", i, j, out[j], tt.plainText[j])
- break
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts.go
deleted file mode 100644
index 92cbce99b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package xts implements the XTS cipher mode as specified in IEEE P1619/D16.
-//
-// XTS mode is typically used for disk encryption, which presents a number of
-// novel problems that make more common modes inapplicable. The disk is
-// conceptually an array of sectors and we must be able to encrypt and decrypt
-// a sector in isolation. However, an attacker must not be able to transpose
-// two sectors of plaintext by transposing their ciphertext.
-//
-// XTS wraps a block cipher with Rogaway's XEX mode in order to build a
-// tweakable block cipher. This allows each sector to have a unique tweak and
-// effectively create a unique key for each sector.
-//
-// XTS does not provide any authentication. An attacker can manipulate the
-// ciphertext and randomise a block (16 bytes) of the plaintext.
-//
-// (Note: this package does not implement ciphertext-stealing so sectors must
-// be a multiple of 16 bytes.)
-package xts // import "golang.org/x/crypto/xts"
-
-import (
- "crypto/cipher"
- "encoding/binary"
- "errors"
-)
-
-// Cipher contains an expanded key structure. It doesn't contain mutable state
-// and therefore can be used concurrently.
-type Cipher struct {
- k1, k2 cipher.Block
-}
-
-// blockSize is the block size that the underlying cipher must have. XTS is
-// only defined for 16-byte ciphers.
-const blockSize = 16
-
-// NewCipher creates a Cipher given a function for creating the underlying
-// block cipher (which must have a block size of 16 bytes). The key must be
-// twice the length of the underlying cipher's key.
-func NewCipher(cipherFunc func([]byte) (cipher.Block, error), key []byte) (c *Cipher, err error) {
- c = new(Cipher)
- if c.k1, err = cipherFunc(key[:len(key)/2]); err != nil {
- return
- }
- c.k2, err = cipherFunc(key[len(key)/2:])
-
- if c.k1.BlockSize() != blockSize {
- err = errors.New("xts: cipher does not have a block size of 16")
- }
-
- return
-}
-
-// Encrypt encrypts a sector of plaintext and puts the result into ciphertext.
-// Plaintext and ciphertext must overlap entirely or not at all.
-// Sectors must be a multiple of 16 bytes and less than 2²ⴠbytes.
-func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) {
- if len(ciphertext) < len(plaintext) {
- panic("xts: ciphertext is smaller than plaintext")
- }
- if len(plaintext)%blockSize != 0 {
- panic("xts: plaintext is not a multiple of the block size")
- }
-
- var tweak [blockSize]byte
- binary.LittleEndian.PutUint64(tweak[:8], sectorNum)
-
- c.k2.Encrypt(tweak[:], tweak[:])
-
- for len(plaintext) > 0 {
- for j := range tweak {
- ciphertext[j] = plaintext[j] ^ tweak[j]
- }
- c.k1.Encrypt(ciphertext, ciphertext)
- for j := range tweak {
- ciphertext[j] ^= tweak[j]
- }
- plaintext = plaintext[blockSize:]
- ciphertext = ciphertext[blockSize:]
-
- mul2(&tweak)
- }
-}
-
-// Decrypt decrypts a sector of ciphertext and puts the result into plaintext.
-// Plaintext and ciphertext must overlap entirely or not at all.
-// Sectors must be a multiple of 16 bytes and less than 2²ⴠbytes.
-func (c *Cipher) Decrypt(plaintext, ciphertext []byte, sectorNum uint64) {
- if len(plaintext) < len(ciphertext) {
- panic("xts: plaintext is smaller than ciphertext")
- }
- if len(ciphertext)%blockSize != 0 {
- panic("xts: ciphertext is not a multiple of the block size")
- }
-
- var tweak [blockSize]byte
- binary.LittleEndian.PutUint64(tweak[:8], sectorNum)
-
- c.k2.Encrypt(tweak[:], tweak[:])
-
- for len(ciphertext) > 0 {
- for j := range tweak {
- plaintext[j] = ciphertext[j] ^ tweak[j]
- }
- c.k1.Decrypt(plaintext, plaintext)
- for j := range tweak {
- plaintext[j] ^= tweak[j]
- }
- plaintext = plaintext[blockSize:]
- ciphertext = ciphertext[blockSize:]
-
- mul2(&tweak)
- }
-}
-
-// mul2 multiplies tweak by 2 in GF(2¹²â¸) with an irreducible polynomial of
-// x¹²⸠+ xⷠ+ x² + x + 1.
-func mul2(tweak *[blockSize]byte) {
- var carryIn byte
- for j := range tweak {
- carryOut := tweak[j] >> 7
- tweak[j] = (tweak[j] << 1) + carryIn
- carryIn = carryOut
- }
- if carryIn != 0 {
- // If we have a carry bit then we need to subtract a multiple
- // of the irreducible polynomial (x¹²⸠+ xⷠ+ x² + x + 1).
- // By dropping the carry bit, we're subtracting the x^128 term
- // so all that remains is to subtract xⷠ+ x² + x + 1.
- // Subtraction (and addition) in this representation is just
- // XOR.
- tweak[0] ^= 1<<7 | 1<<2 | 1<<1 | 1
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts_test.go
deleted file mode 100644
index 96d3b6cbc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/xts/xts_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2012 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 file.
-
-package xts
-
-import (
- "bytes"
- "crypto/aes"
- "encoding/hex"
- "testing"
-)
-
-// These test vectors have been taken from IEEE P1619/D16, Annex B.
-var xtsTestVectors = []struct {
- key string
- sector uint64
- plaintext string
- ciphertext string
-}{
- {
- "0000000000000000000000000000000000000000000000000000000000000000",
- 0,
- "0000000000000000000000000000000000000000000000000000000000000000",
- "917cf69ebd68b2ec9b9fe9a3eadda692cd43d2f59598ed858c02c2652fbf922e",
- }, {
- "1111111111111111111111111111111122222222222222222222222222222222",
- 0x3333333333,
- "4444444444444444444444444444444444444444444444444444444444444444",
- "c454185e6a16936e39334038acef838bfb186fff7480adc4289382ecd6d394f0",
- }, {
- "fffefdfcfbfaf9f8f7f6f5f4f3f2f1f022222222222222222222222222222222",
- 0x3333333333,
- "4444444444444444444444444444444444444444444444444444444444444444",
- "af85336b597afc1a900b2eb21ec949d292df4c047e0b21532186a5971a227a89",
- }, {
- "2718281828459045235360287471352631415926535897932384626433832795",
- 0,
- "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
- "27a7479befa1d476489f308cd4cfa6e2a96e4bbe3208ff25287dd3819616e89cc78cf7f5e543445f8333d8fa7f56000005279fa5d8b5e4ad40e736ddb4d35412328063fd2aab53e5ea1e0a9f332500a5df9487d07a5c92cc512c8866c7e860ce93fdf166a24912b422976146ae20ce846bb7dc9ba94a767aaef20c0d61ad02655ea92dc4c4e41a8952c651d33174be51a10c421110e6d81588ede82103a252d8a750e8768defffed9122810aaeb99f9172af82b604dc4b8e51bcb08235a6f4341332e4ca60482a4ba1a03b3e65008fc5da76b70bf1690db4eae29c5f1badd03c5ccf2a55d705ddcd86d449511ceb7ec30bf12b1fa35b913f9f747a8afd1b130e94bff94effd01a91735ca1726acd0b197c4e5b03393697e126826fb6bbde8ecc1e08298516e2c9ed03ff3c1b7860f6de76d4cecd94c8119855ef5297ca67e9f3e7ff72b1e99785ca0a7e7720c5b36dc6d72cac9574c8cbbc2f801e23e56fd344b07f22154beba0f08ce8891e643ed995c94d9a69c9f1b5f499027a78572aeebd74d20cc39881c213ee770b1010e4bea718846977ae119f7a023ab58cca0ad752afe656bb3c17256a9f6e9bf19fdd5a38fc82bbe872c5539edb609ef4f79c203ebb140f2e583cb2ad15b4aa5b655016a8449277dbd477ef2c8d6c017db738b18deb4a427d1923ce3ff262735779a418f20a282df920147beabe421ee5319d0568",
- }, {
- "2718281828459045235360287471352631415926535897932384626433832795",
- 1,
- "27a7479befa1d476489f308cd4cfa6e2a96e4bbe3208ff25287dd3819616e89cc78cf7f5e543445f8333d8fa7f56000005279fa5d8b5e4ad40e736ddb4d35412328063fd2aab53e5ea1e0a9f332500a5df9487d07a5c92cc512c8866c7e860ce93fdf166a24912b422976146ae20ce846bb7dc9ba94a767aaef20c0d61ad02655ea92dc4c4e41a8952c651d33174be51a10c421110e6d81588ede82103a252d8a750e8768defffed9122810aaeb99f9172af82b604dc4b8e51bcb08235a6f4341332e4ca60482a4ba1a03b3e65008fc5da76b70bf1690db4eae29c5f1badd03c5ccf2a55d705ddcd86d449511ceb7ec30bf12b1fa35b913f9f747a8afd1b130e94bff94effd01a91735ca1726acd0b197c4e5b03393697e126826fb6bbde8ecc1e08298516e2c9ed03ff3c1b7860f6de76d4cecd94c8119855ef5297ca67e9f3e7ff72b1e99785ca0a7e7720c5b36dc6d72cac9574c8cbbc2f801e23e56fd344b07f22154beba0f08ce8891e643ed995c94d9a69c9f1b5f499027a78572aeebd74d20cc39881c213ee770b1010e4bea718846977ae119f7a023ab58cca0ad752afe656bb3c17256a9f6e9bf19fdd5a38fc82bbe872c5539edb609ef4f79c203ebb140f2e583cb2ad15b4aa5b655016a8449277dbd477ef2c8d6c017db738b18deb4a427d1923ce3ff262735779a418f20a282df920147beabe421ee5319d0568",
- "264d3ca8512194fec312c8c9891f279fefdd608d0c027b60483a3fa811d65ee59d52d9e40ec5672d81532b38b6b089ce951f0f9c35590b8b978d175213f329bb1c2fd30f2f7f30492a61a532a79f51d36f5e31a7c9a12c286082ff7d2394d18f783e1a8e72c722caaaa52d8f065657d2631fd25bfd8e5baad6e527d763517501c68c5edc3cdd55435c532d7125c8614deed9adaa3acade5888b87bef641c4c994c8091b5bcd387f3963fb5bc37aa922fbfe3df4e5b915e6eb514717bdd2a74079a5073f5c4bfd46adf7d282e7a393a52579d11a028da4d9cd9c77124f9648ee383b1ac763930e7162a8d37f350b2f74b8472cf09902063c6b32e8c2d9290cefbd7346d1c779a0df50edcde4531da07b099c638e83a755944df2aef1aa31752fd323dcb710fb4bfbb9d22b925bc3577e1b8949e729a90bbafeacf7f7879e7b1147e28ba0bae940db795a61b15ecf4df8db07b824bb062802cc98a9545bb2aaeed77cb3fc6db15dcd7d80d7d5bc406c4970a3478ada8899b329198eb61c193fb6275aa8ca340344a75a862aebe92eee1ce032fd950b47d7704a3876923b4ad62844bf4a09c4dbe8b4397184b7471360c9564880aedddb9baa4af2e75394b08cd32ff479c57a07d3eab5d54de5f9738b8d27f27a9f0ab11799d7b7ffefb2704c95c6ad12c39f1e867a4b7b1d7818a4b753dfd2a89ccb45e001a03a867b187f225dd",
- }, {
- "27182818284590452353602874713526624977572470936999595749669676273141592653589793238462643383279502884197169399375105820974944592",
- 0xff,
- "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
- "1c3b3a102f770386e4836c99e370cf9bea00803f5e482357a4ae12d414a3e63b5d31e276f8fe4a8d66b317f9ac683f44680a86ac35adfc3345befecb4bb188fd5776926c49a3095eb108fd1098baec70aaa66999a72a82f27d848b21d4a741b0c5cd4d5fff9dac89aeba122961d03a757123e9870f8acf1000020887891429ca2a3e7a7d7df7b10355165c8b9a6d0a7de8b062c4500dc4cd120c0f7418dae3d0b5781c34803fa75421c790dfe1de1834f280d7667b327f6c8cd7557e12ac3a0f93ec05c52e0493ef31a12d3d9260f79a289d6a379bc70c50841473d1a8cc81ec583e9645e07b8d9670655ba5bbcfecc6dc3966380ad8fecb17b6ba02469a020a84e18e8f84252070c13e9f1f289be54fbc481457778f616015e1327a02b140f1505eb309326d68378f8374595c849d84f4c333ec4423885143cb47bd71c5edae9be69a2ffeceb1bec9de244fbe15992b11b77c040f12bd8f6a975a44a0f90c29a9abc3d4d893927284c58754cce294529f8614dcd2aba991925fedc4ae74ffac6e333b93eb4aff0479da9a410e4450e0dd7ae4c6e2910900575da401fc07059f645e8b7e9bfdef33943054ff84011493c27b3429eaedb4ed5376441a77ed43851ad77f16f541dfd269d50d6a5f14fb0aab1cbb4c1550be97f7ab4066193c4caa773dad38014bd2092fa755c824bb5e54c4f36ffda9fcea70b9c6e693e148c151",
- },
-}
-
-func fromHex(s string) []byte {
- ret, err := hex.DecodeString(s)
- if err != nil {
- panic("xts: invalid hex in test")
- }
- return ret
-}
-
-func TestXTS(t *testing.T) {
- for i, test := range xtsTestVectors {
- c, err := NewCipher(aes.NewCipher, fromHex(test.key))
- if err != nil {
- t.Errorf("#%d: failed to create cipher: %s", i, err)
- continue
- }
- plaintext := fromHex(test.plaintext)
- ciphertext := make([]byte, len(plaintext))
- c.Encrypt(ciphertext, plaintext, test.sector)
-
- expectedCiphertext := fromHex(test.ciphertext)
- if !bytes.Equal(ciphertext, expectedCiphertext) {
- t.Errorf("#%d: encrypted failed, got: %x, want: %x", i, ciphertext, expectedCiphertext)
- continue
- }
-
- decrypted := make([]byte, len(ciphertext))
- c.Decrypt(decrypted, ciphertext, test.sector)
- if !bytes.Equal(decrypted, plaintext) {
- t.Errorf("#%d: decryption failed, got: %x, want: %x", i, decrypted, plaintext)
- }
- }
-}
-
-func TestShorterCiphertext(t *testing.T) {
- // Decrypt used to panic if the input was shorter than the output. See
- // https://go-review.googlesource.com/c/39954/
- c, err := NewCipher(aes.NewCipher, make([]byte, 32))
- if err != nil {
- t.Fatalf("NewCipher failed: %s", err)
- }
-
- plaintext := make([]byte, 32)
- encrypted := make([]byte, 48)
- decrypted := make([]byte, 48)
-
- c.Encrypt(encrypted, plaintext, 0)
- c.Decrypt(decrypted, encrypted[:len(plaintext)], 0)
-
- if !bytes.Equal(plaintext, decrypted[:len(plaintext)]) {
- t.Errorf("En/Decryption is not inverse")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitattributes b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitattributes
deleted file mode 100644
index d2f212e5d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitattributes
+++ /dev/null
@@ -1,10 +0,0 @@
-# Treat all files in this repo as binary, with no git magic updating
-# line endings. Windows users contributing to Go will need to use a
-# modern version of git and editors capable of LF line endings.
-#
-# We'll prevent accidental CRLF line endings from entering the repo
-# via the git-review gofmt checks.
-#
-# See golang.org/issue/9281
-
-* -text
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitignore b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitignore
deleted file mode 100644
index 8339fd61d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Add no patterns to .hgignore except for files generated by the build.
-last-change
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/AUTHORS b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/AUTHORS
deleted file mode 100644
index 15167cd74..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTING.md
deleted file mode 100644
index 88dff59bc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing to Go
-
-Go is an open source project.
-
-It is the work of hundreds of contributors. We appreciate your help!
-
-
-## Filing issues
-
-When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
-
-1. What version of Go are you using (`go version`)?
-2. What operating system and processor architecture are you using?
-3. What did you do?
-4. What did you expect to see?
-5. What did you see instead?
-
-General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
-The gophers there will answer or ask you to file an issue if you've tripped over a bug.
-
-## Contributing code
-
-Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
-before sending patches.
-
-**We do not accept GitHub pull requests**
-(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
-
-Unless otherwise noted, the Go source files are distributed under
-the BSD-style license found in the LICENSE file.
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTORS
deleted file mode 100644
index 1c4577e96..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/LICENSE b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/LICENSE
deleted file mode 100644
index 6a66aea5e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. 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.
- * Neither the name of Google Inc. nor the names of its
-contributors may 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
-OWNER 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/miekg/dns/vendor/golang.org/x/net/PATENTS b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/PATENTS
deleted file mode 100644
index 733099041..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google 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,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/README.md b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/README.md
deleted file mode 100644
index 00a9b6eb2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Go Networking
-
-This repository holds supplementary Go networking libraries.
-
-## Download/Install
-
-The easiest way to install is to run `go get -u golang.org/x/net`. You can
-also manually git clone the repository to `$GOPATH/src/golang.org/x/net`.
-
-## Report Issues / Send Patches
-
-This repository uses Gerrit for code changes. To learn how to submit
-changes to this repository, see https://golang.org/doc/contribute.html.
-The main issue tracker for the net repository is located at
-https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the
-subject line, so it is easy to find.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/asm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/asm.go
deleted file mode 100644
index 15e21b181..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/asm.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-import "fmt"
-
-// Assemble converts insts into raw instructions suitable for loading
-// into a BPF virtual machine.
-//
-// Currently, no optimization is attempted, the assembled program flow
-// is exactly as provided.
-func Assemble(insts []Instruction) ([]RawInstruction, error) {
- ret := make([]RawInstruction, len(insts))
- var err error
- for i, inst := range insts {
- ret[i], err = inst.Assemble()
- if err != nil {
- return nil, fmt.Errorf("assembling instruction %d: %s", i+1, err)
- }
- }
- return ret, nil
-}
-
-// Disassemble attempts to parse raw back into
-// Instructions. Unrecognized RawInstructions are assumed to be an
-// extension not implemented by this package, and are passed through
-// unchanged to the output. The allDecoded value reports whether insts
-// contains no RawInstructions.
-func Disassemble(raw []RawInstruction) (insts []Instruction, allDecoded bool) {
- insts = make([]Instruction, len(raw))
- allDecoded = true
- for i, r := range raw {
- insts[i] = r.Disassemble()
- if _, ok := insts[i].(RawInstruction); ok {
- allDecoded = false
- }
- }
- return insts, allDecoded
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/constants.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/constants.go
deleted file mode 100644
index b89ca3523..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/constants.go
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-// A Register is a register of the BPF virtual machine.
-type Register uint16
-
-const (
- // RegA is the accumulator register. RegA is always the
- // destination register of ALU operations.
- RegA Register = iota
- // RegX is the indirection register, used by LoadIndirect
- // operations.
- RegX
-)
-
-// An ALUOp is an arithmetic or logic operation.
-type ALUOp uint16
-
-// ALU binary operation types.
-const (
- ALUOpAdd ALUOp = iota << 4
- ALUOpSub
- ALUOpMul
- ALUOpDiv
- ALUOpOr
- ALUOpAnd
- ALUOpShiftLeft
- ALUOpShiftRight
- aluOpNeg // Not exported because it's the only unary ALU operation, and gets its own instruction type.
- ALUOpMod
- ALUOpXor
-)
-
-// A JumpTest is a comparison operator used in conditional jumps.
-type JumpTest uint16
-
-// Supported operators for conditional jumps.
-const (
- // K == A
- JumpEqual JumpTest = iota
- // K != A
- JumpNotEqual
- // K > A
- JumpGreaterThan
- // K < A
- JumpLessThan
- // K >= A
- JumpGreaterOrEqual
- // K <= A
- JumpLessOrEqual
- // K & A != 0
- JumpBitsSet
- // K & A == 0
- JumpBitsNotSet
-)
-
-// An Extension is a function call provided by the kernel that
-// performs advanced operations that are expensive or impossible
-// within the BPF virtual machine.
-//
-// Extensions are only implemented by the Linux kernel.
-//
-// TODO: should we prune this list? Some of these extensions seem
-// either broken or near-impossible to use correctly, whereas other
-// (len, random, ifindex) are quite useful.
-type Extension int
-
-// Extension functions available in the Linux kernel.
-const (
- // extOffset is the negative maximum number of instructions used
- // to load instructions by overloading the K argument.
- extOffset = -0x1000
- // ExtLen returns the length of the packet.
- ExtLen Extension = 1
- // ExtProto returns the packet's L3 protocol type.
- ExtProto Extension = 0
- // ExtType returns the packet's type (skb->pkt_type in the kernel)
- //
- // TODO: better documentation. How nice an API do we want to
- // provide for these esoteric extensions?
- ExtType Extension = 4
- // ExtPayloadOffset returns the offset of the packet payload, or
- // the first protocol header that the kernel does not know how to
- // parse.
- ExtPayloadOffset Extension = 52
- // ExtInterfaceIndex returns the index of the interface on which
- // the packet was received.
- ExtInterfaceIndex Extension = 8
- // ExtNetlinkAttr returns the netlink attribute of type X at
- // offset A.
- ExtNetlinkAttr Extension = 12
- // ExtNetlinkAttrNested returns the nested netlink attribute of
- // type X at offset A.
- ExtNetlinkAttrNested Extension = 16
- // ExtMark returns the packet's mark value.
- ExtMark Extension = 20
- // ExtQueue returns the packet's assigned hardware queue.
- ExtQueue Extension = 24
- // ExtLinkLayerType returns the packet's hardware address type
- // (e.g. Ethernet, Infiniband).
- ExtLinkLayerType Extension = 28
- // ExtRXHash returns the packets receive hash.
- //
- // TODO: figure out what this rxhash actually is.
- ExtRXHash Extension = 32
- // ExtCPUID returns the ID of the CPU processing the current
- // packet.
- ExtCPUID Extension = 36
- // ExtVLANTag returns the packet's VLAN tag.
- ExtVLANTag Extension = 44
- // ExtVLANTagPresent returns non-zero if the packet has a VLAN
- // tag.
- //
- // TODO: I think this might be a lie: it reads bit 0x1000 of the
- // VLAN header, which changed meaning in recent revisions of the
- // spec - this extension may now return meaningless information.
- ExtVLANTagPresent Extension = 48
- // ExtVLANProto returns 0x8100 if the frame has a VLAN header,
- // 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some
- // other value if no VLAN information is present.
- ExtVLANProto Extension = 60
- // ExtRand returns a uniformly random uint32.
- ExtRand Extension = 56
-)
-
-// The following gives names to various bit patterns used in opcode construction.
-
-const (
- opMaskCls uint16 = 0x7
- // opClsLoad masks
- opMaskLoadDest = 0x01
- opMaskLoadWidth = 0x18
- opMaskLoadMode = 0xe0
- // opClsALU
- opMaskOperandSrc = 0x08
- opMaskOperator = 0xf0
- // opClsJump
- opMaskJumpConst = 0x0f
- opMaskJumpCond = 0xf0
-)
-
-const (
- // +---------------+-----------------+---+---+---+
- // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 0 |
- // +---------------+-----------------+---+---+---+
- opClsLoadA uint16 = iota
- // +---------------+-----------------+---+---+---+
- // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 1 |
- // +---------------+-----------------+---+---+---+
- opClsLoadX
- // +---+---+---+---+---+---+---+---+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
- // +---+---+---+---+---+---+---+---+
- opClsStoreA
- // +---+---+---+---+---+---+---+---+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
- // +---+---+---+---+---+---+---+---+
- opClsStoreX
- // +---------------+-----------------+---+---+---+
- // | Operator (4b) | OperandSrc (1b) | 1 | 0 | 0 |
- // +---------------+-----------------+---+---+---+
- opClsALU
- // +-----------------------------+---+---+---+---+
- // | TestOperator (4b) | 0 | 1 | 0 | 1 |
- // +-----------------------------+---+---+---+---+
- opClsJump
- // +---+-------------------------+---+---+---+---+
- // | 0 | 0 | 0 | RetSrc (1b) | 0 | 1 | 1 | 0 |
- // +---+-------------------------+---+---+---+---+
- opClsReturn
- // +---+-------------------------+---+---+---+---+
- // | 0 | 0 | 0 | TXAorTAX (1b) | 0 | 1 | 1 | 1 |
- // +---+-------------------------+---+---+---+---+
- opClsMisc
-)
-
-const (
- opAddrModeImmediate uint16 = iota << 5
- opAddrModeAbsolute
- opAddrModeIndirect
- opAddrModeScratch
- opAddrModePacketLen // actually an extension, not an addressing mode.
- opAddrModeMemShift
-)
-
-const (
- opLoadWidth4 uint16 = iota << 3
- opLoadWidth2
- opLoadWidth1
-)
-
-// Operator defined by ALUOp*
-
-const (
- opALUSrcConstant uint16 = iota << 3
- opALUSrcX
-)
-
-const (
- opJumpAlways = iota << 4
- opJumpEqual
- opJumpGT
- opJumpGE
- opJumpSet
-)
-
-const (
- opRetSrcConstant uint16 = iota << 4
- opRetSrcA
-)
-
-const (
- opMiscTAX = 0x00
- opMiscTXA = 0x80
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/doc.go
deleted file mode 100644
index ae62feb53..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/doc.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2016 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 file.
-
-/*
-
-Package bpf implements marshaling and unmarshaling of programs for the
-Berkeley Packet Filter virtual machine, and provides a Go implementation
-of the virtual machine.
-
-BPF's main use is to specify a packet filter for network taps, so that
-the kernel doesn't have to expensively copy every packet it sees to
-userspace. However, it's been repurposed to other areas where running
-user code in-kernel is needed. For example, Linux's seccomp uses BPF
-to apply security policies to system calls. For simplicity, this
-documentation refers only to packets, but other uses of BPF have their
-own data payloads.
-
-BPF programs run in a restricted virtual machine. It has almost no
-access to kernel functions, and while conditional branches are
-allowed, they can only jump forwards, to guarantee that there are no
-infinite loops.
-
-The virtual machine
-
-The BPF VM is an accumulator machine. Its main register, called
-register A, is an implicit source and destination in all arithmetic
-and logic operations. The machine also has 16 scratch registers for
-temporary storage, and an indirection register (register X) for
-indirect memory access. All registers are 32 bits wide.
-
-Each run of a BPF program is given one packet, which is placed in the
-VM's read-only "main memory". LoadAbsolute and LoadIndirect
-instructions can fetch up to 32 bits at a time into register A for
-examination.
-
-The goal of a BPF program is to produce and return a verdict (uint32),
-which tells the kernel what to do with the packet. In the context of
-packet filtering, the returned value is the number of bytes of the
-packet to forward to userspace, or 0 to ignore the packet. Other
-contexts like seccomp define their own return values.
-
-In order to simplify programs, attempts to read past the end of the
-packet terminate the program execution with a verdict of 0 (ignore
-packet). This means that the vast majority of BPF programs don't need
-to do any explicit bounds checking.
-
-In addition to the bytes of the packet, some BPF programs have access
-to extensions, which are essentially calls to kernel utility
-functions. Currently, the only extensions supported by this package
-are the Linux packet filter extensions.
-
-Examples
-
-This packet filter selects all ARP packets.
-
- bpf.Assemble([]bpf.Instruction{
- // Load "EtherType" field from the ethernet header.
- bpf.LoadAbsolute{Off: 12, Size: 2},
- // Skip over the next instruction if EtherType is not ARP.
- bpf.JumpIf{Cond: bpf.JumpNotEqual, Val: 0x0806, SkipTrue: 1},
- // Verdict is "send up to 4k of the packet to userspace."
- bpf.RetConstant{Val: 4096},
- // Verdict is "ignore packet."
- bpf.RetConstant{Val: 0},
- })
-
-This packet filter captures a random 1% sample of traffic.
-
- bpf.Assemble([]bpf.Instruction{
- // Get a 32-bit random number from the Linux kernel.
- bpf.LoadExtension{Num: bpf.ExtRand},
- // 1% dice roll?
- bpf.JumpIf{Cond: bpf.JumpLessThan, Val: 2^32/100, SkipFalse: 1},
- // Capture.
- bpf.RetConstant{Val: 4096},
- // Ignore.
- bpf.RetConstant{Val: 0},
- })
-
-*/
-package bpf // import "golang.org/x/net/bpf"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions.go
deleted file mode 100644
index 3b4fd0891..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions.go
+++ /dev/null
@@ -1,704 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-import "fmt"
-
-// An Instruction is one instruction executed by the BPF virtual
-// machine.
-type Instruction interface {
- // Assemble assembles the Instruction into a RawInstruction.
- Assemble() (RawInstruction, error)
-}
-
-// A RawInstruction is a raw BPF virtual machine instruction.
-type RawInstruction struct {
- // Operation to execute.
- Op uint16
- // For conditional jump instructions, the number of instructions
- // to skip if the condition is true/false.
- Jt uint8
- Jf uint8
- // Constant parameter. The meaning depends on the Op.
- K uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (ri RawInstruction) Assemble() (RawInstruction, error) { return ri, nil }
-
-// Disassemble parses ri into an Instruction and returns it. If ri is
-// not recognized by this package, ri itself is returned.
-func (ri RawInstruction) Disassemble() Instruction {
- switch ri.Op & opMaskCls {
- case opClsLoadA, opClsLoadX:
- reg := Register(ri.Op & opMaskLoadDest)
- sz := 0
- switch ri.Op & opMaskLoadWidth {
- case opLoadWidth4:
- sz = 4
- case opLoadWidth2:
- sz = 2
- case opLoadWidth1:
- sz = 1
- default:
- return ri
- }
- switch ri.Op & opMaskLoadMode {
- case opAddrModeImmediate:
- if sz != 4 {
- return ri
- }
- return LoadConstant{Dst: reg, Val: ri.K}
- case opAddrModeScratch:
- if sz != 4 || ri.K > 15 {
- return ri
- }
- return LoadScratch{Dst: reg, N: int(ri.K)}
- case opAddrModeAbsolute:
- if ri.K > extOffset+0xffffffff {
- return LoadExtension{Num: Extension(-extOffset + ri.K)}
- }
- return LoadAbsolute{Size: sz, Off: ri.K}
- case opAddrModeIndirect:
- return LoadIndirect{Size: sz, Off: ri.K}
- case opAddrModePacketLen:
- if sz != 4 {
- return ri
- }
- return LoadExtension{Num: ExtLen}
- case opAddrModeMemShift:
- return LoadMemShift{Off: ri.K}
- default:
- return ri
- }
-
- case opClsStoreA:
- if ri.Op != opClsStoreA || ri.K > 15 {
- return ri
- }
- return StoreScratch{Src: RegA, N: int(ri.K)}
-
- case opClsStoreX:
- if ri.Op != opClsStoreX || ri.K > 15 {
- return ri
- }
- return StoreScratch{Src: RegX, N: int(ri.K)}
-
- case opClsALU:
- switch op := ALUOp(ri.Op & opMaskOperator); op {
- case ALUOpAdd, ALUOpSub, ALUOpMul, ALUOpDiv, ALUOpOr, ALUOpAnd, ALUOpShiftLeft, ALUOpShiftRight, ALUOpMod, ALUOpXor:
- if ri.Op&opMaskOperandSrc != 0 {
- return ALUOpX{Op: op}
- }
- return ALUOpConstant{Op: op, Val: ri.K}
- case aluOpNeg:
- return NegateA{}
- default:
- return ri
- }
-
- case opClsJump:
- if ri.Op&opMaskJumpConst != opClsJump {
- return ri
- }
- switch ri.Op & opMaskJumpCond {
- case opJumpAlways:
- return Jump{Skip: ri.K}
- case opJumpEqual:
- if ri.Jt == 0 {
- return JumpIf{
- Cond: JumpNotEqual,
- Val: ri.K,
- SkipTrue: ri.Jf,
- SkipFalse: 0,
- }
- }
- return JumpIf{
- Cond: JumpEqual,
- Val: ri.K,
- SkipTrue: ri.Jt,
- SkipFalse: ri.Jf,
- }
- case opJumpGT:
- if ri.Jt == 0 {
- return JumpIf{
- Cond: JumpLessOrEqual,
- Val: ri.K,
- SkipTrue: ri.Jf,
- SkipFalse: 0,
- }
- }
- return JumpIf{
- Cond: JumpGreaterThan,
- Val: ri.K,
- SkipTrue: ri.Jt,
- SkipFalse: ri.Jf,
- }
- case opJumpGE:
- if ri.Jt == 0 {
- return JumpIf{
- Cond: JumpLessThan,
- Val: ri.K,
- SkipTrue: ri.Jf,
- SkipFalse: 0,
- }
- }
- return JumpIf{
- Cond: JumpGreaterOrEqual,
- Val: ri.K,
- SkipTrue: ri.Jt,
- SkipFalse: ri.Jf,
- }
- case opJumpSet:
- return JumpIf{
- Cond: JumpBitsSet,
- Val: ri.K,
- SkipTrue: ri.Jt,
- SkipFalse: ri.Jf,
- }
- default:
- return ri
- }
-
- case opClsReturn:
- switch ri.Op {
- case opClsReturn | opRetSrcA:
- return RetA{}
- case opClsReturn | opRetSrcConstant:
- return RetConstant{Val: ri.K}
- default:
- return ri
- }
-
- case opClsMisc:
- switch ri.Op {
- case opClsMisc | opMiscTAX:
- return TAX{}
- case opClsMisc | opMiscTXA:
- return TXA{}
- default:
- return ri
- }
-
- default:
- panic("unreachable") // switch is exhaustive on the bit pattern
- }
-}
-
-// LoadConstant loads Val into register Dst.
-type LoadConstant struct {
- Dst Register
- Val uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadConstant) Assemble() (RawInstruction, error) {
- return assembleLoad(a.Dst, 4, opAddrModeImmediate, a.Val)
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadConstant) String() string {
- switch a.Dst {
- case RegA:
- return fmt.Sprintf("ld #%d", a.Val)
- case RegX:
- return fmt.Sprintf("ldx #%d", a.Val)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// LoadScratch loads scratch[N] into register Dst.
-type LoadScratch struct {
- Dst Register
- N int // 0-15
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadScratch) Assemble() (RawInstruction, error) {
- if a.N < 0 || a.N > 15 {
- return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N)
- }
- return assembleLoad(a.Dst, 4, opAddrModeScratch, uint32(a.N))
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadScratch) String() string {
- switch a.Dst {
- case RegA:
- return fmt.Sprintf("ld M[%d]", a.N)
- case RegX:
- return fmt.Sprintf("ldx M[%d]", a.N)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// LoadAbsolute loads packet[Off:Off+Size] as an integer value into
-// register A.
-type LoadAbsolute struct {
- Off uint32
- Size int // 1, 2 or 4
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadAbsolute) Assemble() (RawInstruction, error) {
- return assembleLoad(RegA, a.Size, opAddrModeAbsolute, a.Off)
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadAbsolute) String() string {
- switch a.Size {
- case 1: // byte
- return fmt.Sprintf("ldb [%d]", a.Off)
- case 2: // half word
- return fmt.Sprintf("ldh [%d]", a.Off)
- case 4: // word
- if a.Off > extOffset+0xffffffff {
- return LoadExtension{Num: Extension(a.Off + 0x1000)}.String()
- }
- return fmt.Sprintf("ld [%d]", a.Off)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// LoadIndirect loads packet[X+Off:X+Off+Size] as an integer value
-// into register A.
-type LoadIndirect struct {
- Off uint32
- Size int // 1, 2 or 4
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadIndirect) Assemble() (RawInstruction, error) {
- return assembleLoad(RegA, a.Size, opAddrModeIndirect, a.Off)
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadIndirect) String() string {
- switch a.Size {
- case 1: // byte
- return fmt.Sprintf("ldb [x + %d]", a.Off)
- case 2: // half word
- return fmt.Sprintf("ldh [x + %d]", a.Off)
- case 4: // word
- return fmt.Sprintf("ld [x + %d]", a.Off)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// LoadMemShift multiplies the first 4 bits of the byte at packet[Off]
-// by 4 and stores the result in register X.
-//
-// This instruction is mainly useful to load into X the length of an
-// IPv4 packet header in a single instruction, rather than have to do
-// the arithmetic on the header's first byte by hand.
-type LoadMemShift struct {
- Off uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadMemShift) Assemble() (RawInstruction, error) {
- return assembleLoad(RegX, 1, opAddrModeMemShift, a.Off)
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadMemShift) String() string {
- return fmt.Sprintf("ldx 4*([%d]&0xf)", a.Off)
-}
-
-// LoadExtension invokes a linux-specific extension and stores the
-// result in register A.
-type LoadExtension struct {
- Num Extension
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a LoadExtension) Assemble() (RawInstruction, error) {
- if a.Num == ExtLen {
- return assembleLoad(RegA, 4, opAddrModePacketLen, 0)
- }
- return assembleLoad(RegA, 4, opAddrModeAbsolute, uint32(extOffset+a.Num))
-}
-
-// String returns the the instruction in assembler notation.
-func (a LoadExtension) String() string {
- switch a.Num {
- case ExtLen:
- return "ld #len"
- case ExtProto:
- return "ld #proto"
- case ExtType:
- return "ld #type"
- case ExtPayloadOffset:
- return "ld #poff"
- case ExtInterfaceIndex:
- return "ld #ifidx"
- case ExtNetlinkAttr:
- return "ld #nla"
- case ExtNetlinkAttrNested:
- return "ld #nlan"
- case ExtMark:
- return "ld #mark"
- case ExtQueue:
- return "ld #queue"
- case ExtLinkLayerType:
- return "ld #hatype"
- case ExtRXHash:
- return "ld #rxhash"
- case ExtCPUID:
- return "ld #cpu"
- case ExtVLANTag:
- return "ld #vlan_tci"
- case ExtVLANTagPresent:
- return "ld #vlan_avail"
- case ExtVLANProto:
- return "ld #vlan_tpid"
- case ExtRand:
- return "ld #rand"
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// StoreScratch stores register Src into scratch[N].
-type StoreScratch struct {
- Src Register
- N int // 0-15
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a StoreScratch) Assemble() (RawInstruction, error) {
- if a.N < 0 || a.N > 15 {
- return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N)
- }
- var op uint16
- switch a.Src {
- case RegA:
- op = opClsStoreA
- case RegX:
- op = opClsStoreX
- default:
- return RawInstruction{}, fmt.Errorf("invalid source register %v", a.Src)
- }
-
- return RawInstruction{
- Op: op,
- K: uint32(a.N),
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a StoreScratch) String() string {
- switch a.Src {
- case RegA:
- return fmt.Sprintf("st M[%d]", a.N)
- case RegX:
- return fmt.Sprintf("stx M[%d]", a.N)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// ALUOpConstant executes A = A <Op> Val.
-type ALUOpConstant struct {
- Op ALUOp
- Val uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a ALUOpConstant) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsALU | opALUSrcConstant | uint16(a.Op),
- K: a.Val,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a ALUOpConstant) String() string {
- switch a.Op {
- case ALUOpAdd:
- return fmt.Sprintf("add #%d", a.Val)
- case ALUOpSub:
- return fmt.Sprintf("sub #%d", a.Val)
- case ALUOpMul:
- return fmt.Sprintf("mul #%d", a.Val)
- case ALUOpDiv:
- return fmt.Sprintf("div #%d", a.Val)
- case ALUOpMod:
- return fmt.Sprintf("mod #%d", a.Val)
- case ALUOpAnd:
- return fmt.Sprintf("and #%d", a.Val)
- case ALUOpOr:
- return fmt.Sprintf("or #%d", a.Val)
- case ALUOpXor:
- return fmt.Sprintf("xor #%d", a.Val)
- case ALUOpShiftLeft:
- return fmt.Sprintf("lsh #%d", a.Val)
- case ALUOpShiftRight:
- return fmt.Sprintf("rsh #%d", a.Val)
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// ALUOpX executes A = A <Op> X
-type ALUOpX struct {
- Op ALUOp
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a ALUOpX) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsALU | opALUSrcX | uint16(a.Op),
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a ALUOpX) String() string {
- switch a.Op {
- case ALUOpAdd:
- return "add x"
- case ALUOpSub:
- return "sub x"
- case ALUOpMul:
- return "mul x"
- case ALUOpDiv:
- return "div x"
- case ALUOpMod:
- return "mod x"
- case ALUOpAnd:
- return "and x"
- case ALUOpOr:
- return "or x"
- case ALUOpXor:
- return "xor x"
- case ALUOpShiftLeft:
- return "lsh x"
- case ALUOpShiftRight:
- return "rsh x"
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-// NegateA executes A = -A.
-type NegateA struct{}
-
-// Assemble implements the Instruction Assemble method.
-func (a NegateA) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsALU | uint16(aluOpNeg),
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a NegateA) String() string {
- return fmt.Sprintf("neg")
-}
-
-// Jump skips the following Skip instructions in the program.
-type Jump struct {
- Skip uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a Jump) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsJump | opJumpAlways,
- K: a.Skip,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a Jump) String() string {
- return fmt.Sprintf("ja %d", a.Skip)
-}
-
-// JumpIf skips the following Skip instructions in the program if A
-// <Cond> Val is true.
-type JumpIf struct {
- Cond JumpTest
- Val uint32
- SkipTrue uint8
- SkipFalse uint8
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a JumpIf) Assemble() (RawInstruction, error) {
- var (
- cond uint16
- flip bool
- )
- switch a.Cond {
- case JumpEqual:
- cond = opJumpEqual
- case JumpNotEqual:
- cond, flip = opJumpEqual, true
- case JumpGreaterThan:
- cond = opJumpGT
- case JumpLessThan:
- cond, flip = opJumpGE, true
- case JumpGreaterOrEqual:
- cond = opJumpGE
- case JumpLessOrEqual:
- cond, flip = opJumpGT, true
- case JumpBitsSet:
- cond = opJumpSet
- case JumpBitsNotSet:
- cond, flip = opJumpSet, true
- default:
- return RawInstruction{}, fmt.Errorf("unknown JumpTest %v", a.Cond)
- }
- jt, jf := a.SkipTrue, a.SkipFalse
- if flip {
- jt, jf = jf, jt
- }
- return RawInstruction{
- Op: opClsJump | cond,
- Jt: jt,
- Jf: jf,
- K: a.Val,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a JumpIf) String() string {
- switch a.Cond {
- // K == A
- case JumpEqual:
- return conditionalJump(a, "jeq", "jneq")
- // K != A
- case JumpNotEqual:
- return fmt.Sprintf("jneq #%d,%d", a.Val, a.SkipTrue)
- // K > A
- case JumpGreaterThan:
- return conditionalJump(a, "jgt", "jle")
- // K < A
- case JumpLessThan:
- return fmt.Sprintf("jlt #%d,%d", a.Val, a.SkipTrue)
- // K >= A
- case JumpGreaterOrEqual:
- return conditionalJump(a, "jge", "jlt")
- // K <= A
- case JumpLessOrEqual:
- return fmt.Sprintf("jle #%d,%d", a.Val, a.SkipTrue)
- // K & A != 0
- case JumpBitsSet:
- if a.SkipFalse > 0 {
- return fmt.Sprintf("jset #%d,%d,%d", a.Val, a.SkipTrue, a.SkipFalse)
- }
- return fmt.Sprintf("jset #%d,%d", a.Val, a.SkipTrue)
- // K & A == 0, there is no assembler instruction for JumpBitNotSet, use JumpBitSet and invert skips
- case JumpBitsNotSet:
- return JumpIf{Cond: JumpBitsSet, SkipTrue: a.SkipFalse, SkipFalse: a.SkipTrue, Val: a.Val}.String()
- default:
- return fmt.Sprintf("unknown instruction: %#v", a)
- }
-}
-
-func conditionalJump(inst JumpIf, positiveJump, negativeJump string) string {
- if inst.SkipTrue > 0 {
- if inst.SkipFalse > 0 {
- return fmt.Sprintf("%s #%d,%d,%d", positiveJump, inst.Val, inst.SkipTrue, inst.SkipFalse)
- }
- return fmt.Sprintf("%s #%d,%d", positiveJump, inst.Val, inst.SkipTrue)
- }
- return fmt.Sprintf("%s #%d,%d", negativeJump, inst.Val, inst.SkipFalse)
-}
-
-// RetA exits the BPF program, returning the value of register A.
-type RetA struct{}
-
-// Assemble implements the Instruction Assemble method.
-func (a RetA) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsReturn | opRetSrcA,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a RetA) String() string {
- return fmt.Sprintf("ret a")
-}
-
-// RetConstant exits the BPF program, returning a constant value.
-type RetConstant struct {
- Val uint32
-}
-
-// Assemble implements the Instruction Assemble method.
-func (a RetConstant) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsReturn | opRetSrcConstant,
- K: a.Val,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a RetConstant) String() string {
- return fmt.Sprintf("ret #%d", a.Val)
-}
-
-// TXA copies the value of register X to register A.
-type TXA struct{}
-
-// Assemble implements the Instruction Assemble method.
-func (a TXA) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsMisc | opMiscTXA,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a TXA) String() string {
- return fmt.Sprintf("txa")
-}
-
-// TAX copies the value of register A to register X.
-type TAX struct{}
-
-// Assemble implements the Instruction Assemble method.
-func (a TAX) Assemble() (RawInstruction, error) {
- return RawInstruction{
- Op: opClsMisc | opMiscTAX,
- }, nil
-}
-
-// String returns the the instruction in assembler notation.
-func (a TAX) String() string {
- return fmt.Sprintf("tax")
-}
-
-func assembleLoad(dst Register, loadSize int, mode uint16, k uint32) (RawInstruction, error) {
- var (
- cls uint16
- sz uint16
- )
- switch dst {
- case RegA:
- cls = opClsLoadA
- case RegX:
- cls = opClsLoadX
- default:
- return RawInstruction{}, fmt.Errorf("invalid target register %v", dst)
- }
- switch loadSize {
- case 1:
- sz = opLoadWidth1
- case 2:
- sz = opLoadWidth2
- case 4:
- sz = opLoadWidth4
- default:
- return RawInstruction{}, fmt.Errorf("invalid load byte length %d", sz)
- }
- return RawInstruction{
- Op: cls | sz | mode,
- K: k,
- }, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions_test.go
deleted file mode 100644
index dde474aba..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/instructions_test.go
+++ /dev/null
@@ -1,525 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-import (
- "fmt"
- "io/ioutil"
- "reflect"
- "strconv"
- "strings"
- "testing"
-)
-
-// This is a direct translation of the program in
-// testdata/all_instructions.txt.
-var allInstructions = []Instruction{
- LoadConstant{Dst: RegA, Val: 42},
- LoadConstant{Dst: RegX, Val: 42},
-
- LoadScratch{Dst: RegA, N: 3},
- LoadScratch{Dst: RegX, N: 3},
-
- LoadAbsolute{Off: 42, Size: 1},
- LoadAbsolute{Off: 42, Size: 2},
- LoadAbsolute{Off: 42, Size: 4},
-
- LoadIndirect{Off: 42, Size: 1},
- LoadIndirect{Off: 42, Size: 2},
- LoadIndirect{Off: 42, Size: 4},
-
- LoadMemShift{Off: 42},
-
- LoadExtension{Num: ExtLen},
- LoadExtension{Num: ExtProto},
- LoadExtension{Num: ExtType},
- LoadExtension{Num: ExtRand},
-
- StoreScratch{Src: RegA, N: 3},
- StoreScratch{Src: RegX, N: 3},
-
- ALUOpConstant{Op: ALUOpAdd, Val: 42},
- ALUOpConstant{Op: ALUOpSub, Val: 42},
- ALUOpConstant{Op: ALUOpMul, Val: 42},
- ALUOpConstant{Op: ALUOpDiv, Val: 42},
- ALUOpConstant{Op: ALUOpOr, Val: 42},
- ALUOpConstant{Op: ALUOpAnd, Val: 42},
- ALUOpConstant{Op: ALUOpShiftLeft, Val: 42},
- ALUOpConstant{Op: ALUOpShiftRight, Val: 42},
- ALUOpConstant{Op: ALUOpMod, Val: 42},
- ALUOpConstant{Op: ALUOpXor, Val: 42},
-
- ALUOpX{Op: ALUOpAdd},
- ALUOpX{Op: ALUOpSub},
- ALUOpX{Op: ALUOpMul},
- ALUOpX{Op: ALUOpDiv},
- ALUOpX{Op: ALUOpOr},
- ALUOpX{Op: ALUOpAnd},
- ALUOpX{Op: ALUOpShiftLeft},
- ALUOpX{Op: ALUOpShiftRight},
- ALUOpX{Op: ALUOpMod},
- ALUOpX{Op: ALUOpXor},
-
- NegateA{},
-
- Jump{Skip: 10},
- JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 8, SkipFalse: 9},
- JumpIf{Cond: JumpNotEqual, Val: 42, SkipTrue: 8},
- JumpIf{Cond: JumpLessThan, Val: 42, SkipTrue: 7},
- JumpIf{Cond: JumpLessOrEqual, Val: 42, SkipTrue: 6},
- JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 4, SkipFalse: 5},
- JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 3, SkipFalse: 4},
- JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 2, SkipFalse: 3},
-
- TAX{},
- TXA{},
-
- RetA{},
- RetConstant{Val: 42},
-}
-var allInstructionsExpected = "testdata/all_instructions.bpf"
-
-// Check that we produce the same output as the canonical bpf_asm
-// linux kernel tool.
-func TestInterop(t *testing.T) {
- out, err := Assemble(allInstructions)
- if err != nil {
- t.Fatalf("assembly of allInstructions program failed: %s", err)
- }
- t.Logf("Assembled program is %d instructions long", len(out))
-
- bs, err := ioutil.ReadFile(allInstructionsExpected)
- if err != nil {
- t.Fatalf("reading %s: %s", allInstructionsExpected, err)
- }
- // First statement is the number of statements, last statement is
- // empty. We just ignore both and rely on slice length.
- stmts := strings.Split(string(bs), ",")
- if len(stmts)-2 != len(out) {
- t.Fatalf("test program lengths don't match: %s has %d, Go implementation has %d", allInstructionsExpected, len(stmts)-2, len(allInstructions))
- }
-
- for i, stmt := range stmts[1 : len(stmts)-2] {
- nums := strings.Split(stmt, " ")
- if len(nums) != 4 {
- t.Fatalf("malformed instruction %d in %s: %s", i+1, allInstructionsExpected, stmt)
- }
-
- actual := out[i]
-
- op, err := strconv.ParseUint(nums[0], 10, 16)
- if err != nil {
- t.Fatalf("malformed opcode %s in instruction %d of %s", nums[0], i+1, allInstructionsExpected)
- }
- if actual.Op != uint16(op) {
- t.Errorf("opcode mismatch on instruction %d (%#v): got 0x%02x, want 0x%02x", i+1, allInstructions[i], actual.Op, op)
- }
-
- jt, err := strconv.ParseUint(nums[1], 10, 8)
- if err != nil {
- t.Fatalf("malformed jt offset %s in instruction %d of %s", nums[1], i+1, allInstructionsExpected)
- }
- if actual.Jt != uint8(jt) {
- t.Errorf("jt mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.Jt, jt)
- }
-
- jf, err := strconv.ParseUint(nums[2], 10, 8)
- if err != nil {
- t.Fatalf("malformed jf offset %s in instruction %d of %s", nums[2], i+1, allInstructionsExpected)
- }
- if actual.Jf != uint8(jf) {
- t.Errorf("jf mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.Jf, jf)
- }
-
- k, err := strconv.ParseUint(nums[3], 10, 32)
- if err != nil {
- t.Fatalf("malformed constant %s in instruction %d of %s", nums[3], i+1, allInstructionsExpected)
- }
- if actual.K != uint32(k) {
- t.Errorf("constant mismatch on instruction %d (%#v): got %d, want %d", i+1, allInstructions[i], actual.K, k)
- }
- }
-}
-
-// Check that assembly and disassembly match each other.
-func TestAsmDisasm(t *testing.T) {
- prog1, err := Assemble(allInstructions)
- if err != nil {
- t.Fatalf("assembly of allInstructions program failed: %s", err)
- }
- t.Logf("Assembled program is %d instructions long", len(prog1))
-
- got, allDecoded := Disassemble(prog1)
- if !allDecoded {
- t.Errorf("Disassemble(Assemble(allInstructions)) produced unrecognized instructions:")
- for i, inst := range got {
- if r, ok := inst.(RawInstruction); ok {
- t.Logf(" insn %d, %#v --> %#v", i+1, allInstructions[i], r)
- }
- }
- }
-
- if len(allInstructions) != len(got) {
- t.Fatalf("disassembly changed program size: %d insns before, %d insns after", len(allInstructions), len(got))
- }
- if !reflect.DeepEqual(allInstructions, got) {
- t.Errorf("program mutated by disassembly:")
- for i := range got {
- if !reflect.DeepEqual(allInstructions[i], got[i]) {
- t.Logf(" insn %d, s: %#v, p1: %#v, got: %#v", i+1, allInstructions[i], prog1[i], got[i])
- }
- }
- }
-}
-
-type InvalidInstruction struct{}
-
-func (a InvalidInstruction) Assemble() (RawInstruction, error) {
- return RawInstruction{}, fmt.Errorf("Invalid Instruction")
-}
-
-func (a InvalidInstruction) String() string {
- return fmt.Sprintf("unknown instruction: %#v", a)
-}
-
-func TestString(t *testing.T) {
- testCases := []struct {
- instruction Instruction
- assembler string
- }{
- {
- instruction: LoadConstant{Dst: RegA, Val: 42},
- assembler: "ld #42",
- },
- {
- instruction: LoadConstant{Dst: RegX, Val: 42},
- assembler: "ldx #42",
- },
- {
- instruction: LoadConstant{Dst: 0xffff, Val: 42},
- assembler: "unknown instruction: bpf.LoadConstant{Dst:0xffff, Val:0x2a}",
- },
- {
- instruction: LoadScratch{Dst: RegA, N: 3},
- assembler: "ld M[3]",
- },
- {
- instruction: LoadScratch{Dst: RegX, N: 3},
- assembler: "ldx M[3]",
- },
- {
- instruction: LoadScratch{Dst: 0xffff, N: 3},
- assembler: "unknown instruction: bpf.LoadScratch{Dst:0xffff, N:3}",
- },
- {
- instruction: LoadAbsolute{Off: 42, Size: 1},
- assembler: "ldb [42]",
- },
- {
- instruction: LoadAbsolute{Off: 42, Size: 2},
- assembler: "ldh [42]",
- },
- {
- instruction: LoadAbsolute{Off: 42, Size: 4},
- assembler: "ld [42]",
- },
- {
- instruction: LoadAbsolute{Off: 42, Size: -1},
- assembler: "unknown instruction: bpf.LoadAbsolute{Off:0x2a, Size:-1}",
- },
- {
- instruction: LoadIndirect{Off: 42, Size: 1},
- assembler: "ldb [x + 42]",
- },
- {
- instruction: LoadIndirect{Off: 42, Size: 2},
- assembler: "ldh [x + 42]",
- },
- {
- instruction: LoadIndirect{Off: 42, Size: 4},
- assembler: "ld [x + 42]",
- },
- {
- instruction: LoadIndirect{Off: 42, Size: -1},
- assembler: "unknown instruction: bpf.LoadIndirect{Off:0x2a, Size:-1}",
- },
- {
- instruction: LoadMemShift{Off: 42},
- assembler: "ldx 4*([42]&0xf)",
- },
- {
- instruction: LoadExtension{Num: ExtLen},
- assembler: "ld #len",
- },
- {
- instruction: LoadExtension{Num: ExtProto},
- assembler: "ld #proto",
- },
- {
- instruction: LoadExtension{Num: ExtType},
- assembler: "ld #type",
- },
- {
- instruction: LoadExtension{Num: ExtPayloadOffset},
- assembler: "ld #poff",
- },
- {
- instruction: LoadExtension{Num: ExtInterfaceIndex},
- assembler: "ld #ifidx",
- },
- {
- instruction: LoadExtension{Num: ExtNetlinkAttr},
- assembler: "ld #nla",
- },
- {
- instruction: LoadExtension{Num: ExtNetlinkAttrNested},
- assembler: "ld #nlan",
- },
- {
- instruction: LoadExtension{Num: ExtMark},
- assembler: "ld #mark",
- },
- {
- instruction: LoadExtension{Num: ExtQueue},
- assembler: "ld #queue",
- },
- {
- instruction: LoadExtension{Num: ExtLinkLayerType},
- assembler: "ld #hatype",
- },
- {
- instruction: LoadExtension{Num: ExtRXHash},
- assembler: "ld #rxhash",
- },
- {
- instruction: LoadExtension{Num: ExtCPUID},
- assembler: "ld #cpu",
- },
- {
- instruction: LoadExtension{Num: ExtVLANTag},
- assembler: "ld #vlan_tci",
- },
- {
- instruction: LoadExtension{Num: ExtVLANTagPresent},
- assembler: "ld #vlan_avail",
- },
- {
- instruction: LoadExtension{Num: ExtVLANProto},
- assembler: "ld #vlan_tpid",
- },
- {
- instruction: LoadExtension{Num: ExtRand},
- assembler: "ld #rand",
- },
- {
- instruction: LoadAbsolute{Off: 0xfffff038, Size: 4},
- assembler: "ld #rand",
- },
- {
- instruction: LoadExtension{Num: 0xfff},
- assembler: "unknown instruction: bpf.LoadExtension{Num:4095}",
- },
- {
- instruction: StoreScratch{Src: RegA, N: 3},
- assembler: "st M[3]",
- },
- {
- instruction: StoreScratch{Src: RegX, N: 3},
- assembler: "stx M[3]",
- },
- {
- instruction: StoreScratch{Src: 0xffff, N: 3},
- assembler: "unknown instruction: bpf.StoreScratch{Src:0xffff, N:3}",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpAdd, Val: 42},
- assembler: "add #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpSub, Val: 42},
- assembler: "sub #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpMul, Val: 42},
- assembler: "mul #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpDiv, Val: 42},
- assembler: "div #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpOr, Val: 42},
- assembler: "or #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpAnd, Val: 42},
- assembler: "and #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpShiftLeft, Val: 42},
- assembler: "lsh #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpShiftRight, Val: 42},
- assembler: "rsh #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpMod, Val: 42},
- assembler: "mod #42",
- },
- {
- instruction: ALUOpConstant{Op: ALUOpXor, Val: 42},
- assembler: "xor #42",
- },
- {
- instruction: ALUOpConstant{Op: 0xffff, Val: 42},
- assembler: "unknown instruction: bpf.ALUOpConstant{Op:0xffff, Val:0x2a}",
- },
- {
- instruction: ALUOpX{Op: ALUOpAdd},
- assembler: "add x",
- },
- {
- instruction: ALUOpX{Op: ALUOpSub},
- assembler: "sub x",
- },
- {
- instruction: ALUOpX{Op: ALUOpMul},
- assembler: "mul x",
- },
- {
- instruction: ALUOpX{Op: ALUOpDiv},
- assembler: "div x",
- },
- {
- instruction: ALUOpX{Op: ALUOpOr},
- assembler: "or x",
- },
- {
- instruction: ALUOpX{Op: ALUOpAnd},
- assembler: "and x",
- },
- {
- instruction: ALUOpX{Op: ALUOpShiftLeft},
- assembler: "lsh x",
- },
- {
- instruction: ALUOpX{Op: ALUOpShiftRight},
- assembler: "rsh x",
- },
- {
- instruction: ALUOpX{Op: ALUOpMod},
- assembler: "mod x",
- },
- {
- instruction: ALUOpX{Op: ALUOpXor},
- assembler: "xor x",
- },
- {
- instruction: ALUOpX{Op: 0xffff},
- assembler: "unknown instruction: bpf.ALUOpX{Op:0xffff}",
- },
- {
- instruction: NegateA{},
- assembler: "neg",
- },
- {
- instruction: Jump{Skip: 10},
- assembler: "ja 10",
- },
- {
- instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 8, SkipFalse: 9},
- assembler: "jeq #42,8,9",
- },
- {
- instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipTrue: 8},
- assembler: "jeq #42,8",
- },
- {
- instruction: JumpIf{Cond: JumpEqual, Val: 42, SkipFalse: 8},
- assembler: "jneq #42,8",
- },
- {
- instruction: JumpIf{Cond: JumpNotEqual, Val: 42, SkipTrue: 8},
- assembler: "jneq #42,8",
- },
- {
- instruction: JumpIf{Cond: JumpLessThan, Val: 42, SkipTrue: 7},
- assembler: "jlt #42,7",
- },
- {
- instruction: JumpIf{Cond: JumpLessOrEqual, Val: 42, SkipTrue: 6},
- assembler: "jle #42,6",
- },
- {
- instruction: JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 4, SkipFalse: 5},
- assembler: "jgt #42,4,5",
- },
- {
- instruction: JumpIf{Cond: JumpGreaterThan, Val: 42, SkipTrue: 4},
- assembler: "jgt #42,4",
- },
- {
- instruction: JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 3, SkipFalse: 4},
- assembler: "jge #42,3,4",
- },
- {
- instruction: JumpIf{Cond: JumpGreaterOrEqual, Val: 42, SkipTrue: 3},
- assembler: "jge #42,3",
- },
- {
- instruction: JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 2, SkipFalse: 3},
- assembler: "jset #42,2,3",
- },
- {
- instruction: JumpIf{Cond: JumpBitsSet, Val: 42, SkipTrue: 2},
- assembler: "jset #42,2",
- },
- {
- instruction: JumpIf{Cond: JumpBitsNotSet, Val: 42, SkipTrue: 2, SkipFalse: 3},
- assembler: "jset #42,3,2",
- },
- {
- instruction: JumpIf{Cond: JumpBitsNotSet, Val: 42, SkipTrue: 2},
- assembler: "jset #42,0,2",
- },
- {
- instruction: JumpIf{Cond: 0xffff, Val: 42, SkipTrue: 1, SkipFalse: 2},
- assembler: "unknown instruction: bpf.JumpIf{Cond:0xffff, Val:0x2a, SkipTrue:0x1, SkipFalse:0x2}",
- },
- {
- instruction: TAX{},
- assembler: "tax",
- },
- {
- instruction: TXA{},
- assembler: "txa",
- },
- {
- instruction: RetA{},
- assembler: "ret a",
- },
- {
- instruction: RetConstant{Val: 42},
- assembler: "ret #42",
- },
- // Invalid instruction
- {
- instruction: InvalidInstruction{},
- assembler: "unknown instruction: bpf.InvalidInstruction{}",
- },
- }
-
- for _, testCase := range testCases {
- if input, ok := testCase.instruction.(fmt.Stringer); ok {
- got := input.String()
- if got != testCase.assembler {
- t.Errorf("String did not return expected assembler notation, expected: %s, got: %s", testCase.assembler, got)
- }
- } else {
- t.Errorf("Instruction %#v is not a fmt.Stringer", testCase.instruction)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/setter.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/setter.go
deleted file mode 100644
index 43e35f0ac..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/setter.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package bpf
-
-// A Setter is a type which can attach a compiled BPF filter to itself.
-type Setter interface {
- SetBPF(filter []RawInstruction) error
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf
deleted file mode 100644
index f87144064..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf
+++ /dev/null
@@ -1 +0,0 @@
-50,0 0 0 42,1 0 0 42,96 0 0 3,97 0 0 3,48 0 0 42,40 0 0 42,32 0 0 42,80 0 0 42,72 0 0 42,64 0 0 42,177 0 0 42,128 0 0 0,32 0 0 4294963200,32 0 0 4294963204,32 0 0 4294963256,2 0 0 3,3 0 0 3,4 0 0 42,20 0 0 42,36 0 0 42,52 0 0 42,68 0 0 42,84 0 0 42,100 0 0 42,116 0 0 42,148 0 0 42,164 0 0 42,12 0 0 0,28 0 0 0,44 0 0 0,60 0 0 0,76 0 0 0,92 0 0 0,108 0 0 0,124 0 0 0,156 0 0 0,172 0 0 0,132 0 0 0,5 0 0 10,21 8 9 42,21 0 8 42,53 0 7 42,37 0 6 42,37 4 5 42,53 3 4 42,69 2 3 42,7 0 0 0,135 0 0 0,22 0 0 0,6 0 0 0,
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt
deleted file mode 100644
index 304550155..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-# This filter is compiled to all_instructions.bpf by the `bpf_asm`
-# tool, which can be found in the linux kernel source tree under
-# tools/net.
-
-# Load immediate
-ld #42
-ldx #42
-
-# Load scratch
-ld M[3]
-ldx M[3]
-
-# Load absolute
-ldb [42]
-ldh [42]
-ld [42]
-
-# Load indirect
-ldb [x + 42]
-ldh [x + 42]
-ld [x + 42]
-
-# Load IPv4 header length
-ldx 4*([42]&0xf)
-
-# Run extension function
-ld #len
-ld #proto
-ld #type
-ld #rand
-
-# Store scratch
-st M[3]
-stx M[3]
-
-# A <op> constant
-add #42
-sub #42
-mul #42
-div #42
-or #42
-and #42
-lsh #42
-rsh #42
-mod #42
-xor #42
-
-# A <op> X
-add x
-sub x
-mul x
-div x
-or x
-and x
-lsh x
-rsh x
-mod x
-xor x
-
-# !A
-neg
-
-# Jumps
-ja end
-jeq #42,prev,end
-jne #42,end
-jlt #42,end
-jle #42,end
-jgt #42,prev,end
-jge #42,prev,end
-jset #42,prev,end
-
-# Register transfers
-tax
-txa
-
-# Returns
-prev: ret a
-end: ret #42
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm.go
deleted file mode 100644
index 4c656f1e1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-import (
- "errors"
- "fmt"
-)
-
-// A VM is an emulated BPF virtual machine.
-type VM struct {
- filter []Instruction
-}
-
-// NewVM returns a new VM using the input BPF program.
-func NewVM(filter []Instruction) (*VM, error) {
- if len(filter) == 0 {
- return nil, errors.New("one or more Instructions must be specified")
- }
-
- for i, ins := range filter {
- check := len(filter) - (i + 1)
- switch ins := ins.(type) {
- // Check for out-of-bounds jumps in instructions
- case Jump:
- if check <= int(ins.Skip) {
- return nil, fmt.Errorf("cannot jump %d instructions; jumping past program bounds", ins.Skip)
- }
- case JumpIf:
- if check <= int(ins.SkipTrue) {
- return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue)
- }
- if check <= int(ins.SkipFalse) {
- return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse)
- }
- // Check for division or modulus by zero
- case ALUOpConstant:
- if ins.Val != 0 {
- break
- }
-
- switch ins.Op {
- case ALUOpDiv, ALUOpMod:
- return nil, errors.New("cannot divide by zero using ALUOpConstant")
- }
- // Check for unknown extensions
- case LoadExtension:
- switch ins.Num {
- case ExtLen:
- default:
- return nil, fmt.Errorf("extension %d not implemented", ins.Num)
- }
- }
- }
-
- // Make sure last instruction is a return instruction
- switch filter[len(filter)-1].(type) {
- case RetA, RetConstant:
- default:
- return nil, errors.New("BPF program must end with RetA or RetConstant")
- }
-
- // Though our VM works using disassembled instructions, we
- // attempt to assemble the input filter anyway to ensure it is compatible
- // with an operating system VM.
- _, err := Assemble(filter)
-
- return &VM{
- filter: filter,
- }, err
-}
-
-// Run runs the VM's BPF program against the input bytes.
-// Run returns the number of bytes accepted by the BPF program, and any errors
-// which occurred while processing the program.
-func (v *VM) Run(in []byte) (int, error) {
- var (
- // Registers of the virtual machine
- regA uint32
- regX uint32
- regScratch [16]uint32
-
- // OK is true if the program should continue processing the next
- // instruction, or false if not, causing the loop to break
- ok = true
- )
-
- // TODO(mdlayher): implement:
- // - NegateA:
- // - would require a change from uint32 registers to int32
- // registers
-
- // TODO(mdlayher): add interop tests that check signedness of ALU
- // operations against kernel implementation, and make sure Go
- // implementation matches behavior
-
- for i := 0; i < len(v.filter) && ok; i++ {
- ins := v.filter[i]
-
- switch ins := ins.(type) {
- case ALUOpConstant:
- regA = aluOpConstant(ins, regA)
- case ALUOpX:
- regA, ok = aluOpX(ins, regA, regX)
- case Jump:
- i += int(ins.Skip)
- case JumpIf:
- jump := jumpIf(ins, regA)
- i += jump
- case LoadAbsolute:
- regA, ok = loadAbsolute(ins, in)
- case LoadConstant:
- regA, regX = loadConstant(ins, regA, regX)
- case LoadExtension:
- regA = loadExtension(ins, in)
- case LoadIndirect:
- regA, ok = loadIndirect(ins, in, regX)
- case LoadMemShift:
- regX, ok = loadMemShift(ins, in)
- case LoadScratch:
- regA, regX = loadScratch(ins, regScratch, regA, regX)
- case RetA:
- return int(regA), nil
- case RetConstant:
- return int(ins.Val), nil
- case StoreScratch:
- regScratch = storeScratch(ins, regScratch, regA, regX)
- case TAX:
- regX = regA
- case TXA:
- regA = regX
- default:
- return 0, fmt.Errorf("unknown Instruction at index %d: %T", i, ins)
- }
- }
-
- return 0, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_aluop_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_aluop_test.go
deleted file mode 100644
index 16678244a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_aluop_test.go
+++ /dev/null
@@ -1,512 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-func TestVMALUOpAdd(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpAdd,
- Val: 3,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 8, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 3, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpSub(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.TAX{},
- bpf.ALUOpX{
- Op: bpf.ALUOpSub,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpMul(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpMul,
- Val: 2,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 6, 2, 3, 4,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpDiv(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpDiv,
- Val: 2,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 20, 2, 3, 4,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpDivByZeroALUOpConstant(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.ALUOpConstant{
- Op: bpf.ALUOpDiv,
- Val: 0,
- },
- bpf.RetA{},
- })
- if errStr(err) != "cannot divide by zero using ALUOpConstant" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMALUOpDivByZeroALUOpX(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- // Load byte 0 into X
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.TAX{},
- // Load byte 1 into A
- bpf.LoadAbsolute{
- Off: 9,
- Size: 1,
- },
- // Attempt to perform 1/0
- bpf.ALUOpX{
- Op: bpf.ALUOpDiv,
- },
- // Return 4 bytes if program does not terminate
- bpf.LoadConstant{
- Val: 12,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 3, 4,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpOr(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpOr,
- Val: 0x01,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x10, 0x03, 0x04,
- 0x05, 0x06, 0x07, 0x08,
- 0x09, 0xff,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 9, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpAnd(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpAnd,
- Val: 0x0019,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0xaa, 0x09,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpShiftLeft(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpShiftLeft,
- Val: 0x01,
- },
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 0x02,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x01, 0xaa,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpShiftRight(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpShiftRight,
- Val: 0x01,
- },
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 0x04,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x08, 0xff, 0xff,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpMod(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpMod,
- Val: 20,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 30, 0, 0,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpModByZeroALUOpConstant(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpMod,
- Val: 0,
- },
- bpf.RetA{},
- })
- if errStr(err) != "cannot divide by zero using ALUOpConstant" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMALUOpModByZeroALUOpX(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- // Load byte 0 into X
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.TAX{},
- // Load byte 1 into A
- bpf.LoadAbsolute{
- Off: 9,
- Size: 1,
- },
- // Attempt to perform 1%0
- bpf.ALUOpX{
- Op: bpf.ALUOpMod,
- },
- // Return 4 bytes if program does not terminate
- bpf.LoadConstant{
- Val: 12,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 3, 4,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpXor(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpXor,
- Val: 0x0a,
- },
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 0x01,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x0b, 0x00, 0x00, 0x00,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMALUOpUnknown(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.ALUOpConstant{
- Op: bpf.ALUOpAdd,
- Val: 1,
- },
- // Verify that an unknown operation is a no-op
- bpf.ALUOpConstant{
- Op: 100,
- },
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 0x02,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_bpf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_bpf_test.go
deleted file mode 100644
index 77fa8fe4a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_bpf_test.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "net"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/ipv4"
-)
-
-// A virtualMachine is a BPF virtual machine which can process an
-// input packet against a BPF program and render a verdict.
-type virtualMachine interface {
- Run(in []byte) (int, error)
-}
-
-// canUseOSVM indicates if the OS BPF VM is available on this platform.
-func canUseOSVM() bool {
- // OS BPF VM can only be used on platforms where x/net/ipv4 supports
- // attaching a BPF program to a socket.
- switch runtime.GOOS {
- case "linux":
- return true
- }
-
- return false
-}
-
-// All BPF tests against both the Go VM and OS VM are assumed to
-// be used with a UDP socket. As a result, the entire contents
-// of a UDP datagram is sent through the BPF program, but only
-// the body after the UDP header will ever be returned in output.
-
-// testVM sets up a Go BPF VM, and if available, a native OS BPF VM
-// for integration testing.
-func testVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func(), error) {
- goVM, err := bpf.NewVM(filter)
- if err != nil {
- // Some tests expect an error, so this error must be returned
- // instead of fatally exiting the test
- return nil, nil, err
- }
-
- mvm := &multiVirtualMachine{
- goVM: goVM,
-
- t: t,
- }
-
- // If available, add the OS VM for tests which verify that both the Go
- // VM and OS VM have exactly the same output for the same input program
- // and packet.
- done := func() {}
- if canUseOSVM() {
- osVM, osVMDone := testOSVM(t, filter)
- done = func() { osVMDone() }
- mvm.osVM = osVM
- }
-
- return mvm, done, nil
-}
-
-// udpHeaderLen is the length of a UDP header.
-const udpHeaderLen = 8
-
-// A multiVirtualMachine is a virtualMachine which can call out to both the Go VM
-// and the native OS VM, if the OS VM is available.
-type multiVirtualMachine struct {
- goVM virtualMachine
- osVM virtualMachine
-
- t *testing.T
-}
-
-func (mvm *multiVirtualMachine) Run(in []byte) (int, error) {
- if len(in) < udpHeaderLen {
- mvm.t.Fatalf("input must be at least length of UDP header (%d), got: %d",
- udpHeaderLen, len(in))
- }
-
- // All tests have a UDP header as part of input, because the OS VM
- // packets always will. For the Go VM, this output is trimmed before
- // being sent back to tests.
- goOut, goErr := mvm.goVM.Run(in)
- if goOut >= udpHeaderLen {
- goOut -= udpHeaderLen
- }
-
- // If Go output is larger than the size of the packet, packet filtering
- // interop tests must trim the output bytes to the length of the packet.
- // The BPF VM should not do this on its own, as other uses of it do
- // not trim the output byte count.
- trim := len(in) - udpHeaderLen
- if goOut > trim {
- goOut = trim
- }
-
- // When the OS VM is not available, process using the Go VM alone
- if mvm.osVM == nil {
- return goOut, goErr
- }
-
- // The OS VM will apply its own UDP header, so remove the pseudo header
- // that the Go VM needs.
- osOut, err := mvm.osVM.Run(in[udpHeaderLen:])
- if err != nil {
- mvm.t.Fatalf("error while running OS VM: %v", err)
- }
-
- // Verify both VMs return same number of bytes
- var mismatch bool
- if goOut != osOut {
- mismatch = true
- mvm.t.Logf("output byte count does not match:\n- go: %v\n- os: %v", goOut, osOut)
- }
-
- if mismatch {
- mvm.t.Fatal("Go BPF and OS BPF packet outputs do not match")
- }
-
- return goOut, goErr
-}
-
-// An osVirtualMachine is a virtualMachine which uses the OS's BPF VM for
-// processing BPF programs.
-type osVirtualMachine struct {
- l net.PacketConn
- s net.Conn
-}
-
-// testOSVM creates a virtualMachine which uses the OS's BPF VM by injecting
-// packets into a UDP listener with a BPF program attached to it.
-func testOSVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func()) {
- l, err := net.ListenPacket("udp4", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("failed to open OS VM UDP listener: %v", err)
- }
-
- prog, err := bpf.Assemble(filter)
- if err != nil {
- t.Fatalf("failed to compile BPF program: %v", err)
- }
-
- p := ipv4.NewPacketConn(l)
- if err = p.SetBPF(prog); err != nil {
- t.Fatalf("failed to attach BPF program to listener: %v", err)
- }
-
- s, err := net.Dial("udp4", l.LocalAddr().String())
- if err != nil {
- t.Fatalf("failed to dial connection to listener: %v", err)
- }
-
- done := func() {
- _ = s.Close()
- _ = l.Close()
- }
-
- return &osVirtualMachine{
- l: l,
- s: s,
- }, done
-}
-
-// Run sends the input bytes into the OS's BPF VM and returns its verdict.
-func (vm *osVirtualMachine) Run(in []byte) (int, error) {
- go func() {
- _, _ = vm.s.Write(in)
- }()
-
- vm.l.SetDeadline(time.Now().Add(50 * time.Millisecond))
-
- var b [512]byte
- n, _, err := vm.l.ReadFrom(b[:])
- if err != nil {
- // A timeout indicates that BPF filtered out the packet, and thus,
- // no input should be returned.
- if nerr, ok := err.(net.Error); ok && nerr.Timeout() {
- return n, nil
- }
-
- return n, err
- }
-
- return n, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_extension_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_extension_test.go
deleted file mode 100644
index 7a48c82f3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_extension_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-func TestVMLoadExtensionNotImplemented(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadExtension{
- Num: 100,
- },
- bpf.RetA{},
- })
- if errStr(err) != "extension 100 not implemented" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMLoadExtensionExtLen(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadExtension{
- Num: bpf.ExtLen,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_instructions.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_instructions.go
deleted file mode 100644
index 516f9462b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_instructions.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf
-
-import (
- "encoding/binary"
- "fmt"
-)
-
-func aluOpConstant(ins ALUOpConstant, regA uint32) uint32 {
- return aluOpCommon(ins.Op, regA, ins.Val)
-}
-
-func aluOpX(ins ALUOpX, regA uint32, regX uint32) (uint32, bool) {
- // Guard against division or modulus by zero by terminating
- // the program, as the OS BPF VM does
- if regX == 0 {
- switch ins.Op {
- case ALUOpDiv, ALUOpMod:
- return 0, false
- }
- }
-
- return aluOpCommon(ins.Op, regA, regX), true
-}
-
-func aluOpCommon(op ALUOp, regA uint32, value uint32) uint32 {
- switch op {
- case ALUOpAdd:
- return regA + value
- case ALUOpSub:
- return regA - value
- case ALUOpMul:
- return regA * value
- case ALUOpDiv:
- // Division by zero not permitted by NewVM and aluOpX checks
- return regA / value
- case ALUOpOr:
- return regA | value
- case ALUOpAnd:
- return regA & value
- case ALUOpShiftLeft:
- return regA << value
- case ALUOpShiftRight:
- return regA >> value
- case ALUOpMod:
- // Modulus by zero not permitted by NewVM and aluOpX checks
- return regA % value
- case ALUOpXor:
- return regA ^ value
- default:
- return regA
- }
-}
-
-func jumpIf(ins JumpIf, value uint32) int {
- var ok bool
- inV := uint32(ins.Val)
-
- switch ins.Cond {
- case JumpEqual:
- ok = value == inV
- case JumpNotEqual:
- ok = value != inV
- case JumpGreaterThan:
- ok = value > inV
- case JumpLessThan:
- ok = value < inV
- case JumpGreaterOrEqual:
- ok = value >= inV
- case JumpLessOrEqual:
- ok = value <= inV
- case JumpBitsSet:
- ok = (value & inV) != 0
- case JumpBitsNotSet:
- ok = (value & inV) == 0
- }
-
- if ok {
- return int(ins.SkipTrue)
- }
-
- return int(ins.SkipFalse)
-}
-
-func loadAbsolute(ins LoadAbsolute, in []byte) (uint32, bool) {
- offset := int(ins.Off)
- size := int(ins.Size)
-
- return loadCommon(in, offset, size)
-}
-
-func loadConstant(ins LoadConstant, regA uint32, regX uint32) (uint32, uint32) {
- switch ins.Dst {
- case RegA:
- regA = ins.Val
- case RegX:
- regX = ins.Val
- }
-
- return regA, regX
-}
-
-func loadExtension(ins LoadExtension, in []byte) uint32 {
- switch ins.Num {
- case ExtLen:
- return uint32(len(in))
- default:
- panic(fmt.Sprintf("unimplemented extension: %d", ins.Num))
- }
-}
-
-func loadIndirect(ins LoadIndirect, in []byte, regX uint32) (uint32, bool) {
- offset := int(ins.Off) + int(regX)
- size := int(ins.Size)
-
- return loadCommon(in, offset, size)
-}
-
-func loadMemShift(ins LoadMemShift, in []byte) (uint32, bool) {
- offset := int(ins.Off)
-
- if !inBounds(len(in), offset, 0) {
- return 0, false
- }
-
- // Mask off high 4 bits and multiply low 4 bits by 4
- return uint32(in[offset]&0x0f) * 4, true
-}
-
-func inBounds(inLen int, offset int, size int) bool {
- return offset+size <= inLen
-}
-
-func loadCommon(in []byte, offset int, size int) (uint32, bool) {
- if !inBounds(len(in), offset, size) {
- return 0, false
- }
-
- switch size {
- case 1:
- return uint32(in[offset]), true
- case 2:
- return uint32(binary.BigEndian.Uint16(in[offset : offset+size])), true
- case 4:
- return uint32(binary.BigEndian.Uint32(in[offset : offset+size])), true
- default:
- panic(fmt.Sprintf("invalid load size: %d", size))
- }
-}
-
-func loadScratch(ins LoadScratch, regScratch [16]uint32, regA uint32, regX uint32) (uint32, uint32) {
- switch ins.Dst {
- case RegA:
- regA = regScratch[ins.N]
- case RegX:
- regX = regScratch[ins.N]
- }
-
- return regA, regX
-}
-
-func storeScratch(ins StoreScratch, regScratch [16]uint32, regA uint32, regX uint32) [16]uint32 {
- switch ins.Src {
- case RegA:
- regScratch[ins.N] = regA
- case RegX:
- regScratch[ins.N] = regX
- }
-
- return regScratch
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_jump_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_jump_test.go
deleted file mode 100644
index e0a3a988b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_jump_test.go
+++ /dev/null
@@ -1,380 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-func TestVMJumpOne(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.Jump{
- Skip: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpOutOfProgram(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.Jump{
- Skip: 1,
- },
- bpf.RetA{},
- })
- if errStr(err) != "cannot jump 1 instructions; jumping past program bounds" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMJumpIfTrueOutOfProgram(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- SkipTrue: 2,
- },
- bpf.RetA{},
- })
- if errStr(err) != "cannot jump 2 instructions in true case; jumping past program bounds" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMJumpIfFalseOutOfProgram(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- SkipFalse: 3,
- },
- bpf.RetA{},
- })
- if errStr(err) != "cannot jump 3 instructions in false case; jumping past program bounds" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMJumpIfEqual(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 1,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfNotEqual(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.JumpIf{
- Cond: bpf.JumpNotEqual,
- Val: 1,
- SkipFalse: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfGreaterThan(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 4,
- },
- bpf.JumpIf{
- Cond: bpf.JumpGreaterThan,
- Val: 0x00010202,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 12,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfLessThan(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 4,
- },
- bpf.JumpIf{
- Cond: bpf.JumpLessThan,
- Val: 0xff010203,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 12,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfGreaterOrEqual(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 4,
- },
- bpf.JumpIf{
- Cond: bpf.JumpGreaterOrEqual,
- Val: 0x00010203,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 12,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfLessOrEqual(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 4,
- },
- bpf.JumpIf{
- Cond: bpf.JumpLessOrEqual,
- Val: 0xff010203,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 12,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 4, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfBitsSet(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.JumpIf{
- Cond: bpf.JumpBitsSet,
- Val: 0x1122,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 10,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x01, 0x02,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMJumpIfBitsNotSet(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.JumpIf{
- Cond: bpf.JumpBitsNotSet,
- Val: 0x1221,
- SkipTrue: 1,
- },
- bpf.RetConstant{
- Val: 0,
- },
- bpf.RetConstant{
- Val: 10,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x01, 0x02,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_load_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_load_test.go
deleted file mode 100644
index 04578b66b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_load_test.go
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "net"
- "testing"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/ipv4"
-)
-
-func TestVMLoadAbsoluteOffsetOutOfBounds(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 100,
- Size: 2,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1, 2, 3,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMLoadAbsoluteOffsetPlusSizeOutOfBounds(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMLoadAbsoluteBadInstructionSize(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Size: 5,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid load byte length 0" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMLoadConstantOK(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadConstant{
- Dst: bpf.RegX,
- Val: 9,
- },
- bpf.TXA{},
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMLoadIndirectOutOfBounds(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadIndirect{
- Off: 100,
- Size: 1,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMLoadMemShiftOutOfBounds(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadMemShift{
- Off: 100,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-const (
- dhcp4Port = 53
-)
-
-func TestVMLoadMemShiftLoadIndirectNoResult(t *testing.T) {
- vm, in, done := testDHCPv4(t)
- defer done()
-
- // Append mostly empty UDP header with incorrect DHCPv4 port
- in = append(in, []byte{
- 0, 0,
- 0, dhcp4Port + 1,
- 0, 0,
- 0, 0,
- }...)
-
- out, err := vm.Run(in)
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 0, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMLoadMemShiftLoadIndirectOK(t *testing.T) {
- vm, in, done := testDHCPv4(t)
- defer done()
-
- // Append mostly empty UDP header with correct DHCPv4 port
- in = append(in, []byte{
- 0, 0,
- 0, dhcp4Port,
- 0, 0,
- 0, 0,
- }...)
-
- out, err := vm.Run(in)
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := len(in)-8, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func testDHCPv4(t *testing.T) (virtualMachine, []byte, func()) {
- // DHCPv4 test data courtesy of David Anderson:
- // https://github.com/google/netboot/blob/master/dhcp4/conn_linux.go#L59-L70
- vm, done, err := testVM(t, []bpf.Instruction{
- // Load IPv4 packet length
- bpf.LoadMemShift{Off: 8},
- // Get UDP dport
- bpf.LoadIndirect{Off: 8 + 2, Size: 2},
- // Correct dport?
- bpf.JumpIf{Cond: bpf.JumpEqual, Val: dhcp4Port, SkipFalse: 1},
- // Accept
- bpf.RetConstant{Val: 1500},
- // Ignore
- bpf.RetConstant{Val: 0},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
-
- // Minimal requirements to make a valid IPv4 header
- h := &ipv4.Header{
- Len: ipv4.HeaderLen,
- Src: net.IPv4(192, 168, 1, 1),
- Dst: net.IPv4(192, 168, 1, 2),
- }
- hb, err := h.Marshal()
- if err != nil {
- t.Fatalf("failed to marshal IPv4 header: %v", err)
- }
-
- hb = append([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- }, hb...)
-
- return vm, hb, done
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_ret_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_ret_test.go
deleted file mode 100644
index 2d86eae3e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_ret_test.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-func TestVMRetA(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 9,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMRetALargerThanInput(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadAbsolute{
- Off: 8,
- Size: 2,
- },
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 255,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMRetConstant(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.RetConstant{
- Val: 9,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 1, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMRetConstantLargerThanInput(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.RetConstant{
- Val: 16,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0, 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_scratch_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_scratch_test.go
deleted file mode 100644
index e600e3c28..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_scratch_test.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-func TestVMStoreScratchInvalidScratchRegisterTooSmall(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: -1,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid scratch slot -1" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMStoreScratchInvalidScratchRegisterTooLarge(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: 16,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid scratch slot 16" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMStoreScratchUnknownSourceRegister(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.StoreScratch{
- Src: 100,
- N: 0,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid source register 100" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMLoadScratchInvalidScratchRegisterTooSmall(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadScratch{
- Dst: bpf.RegX,
- N: -1,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid scratch slot -1" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMLoadScratchInvalidScratchRegisterTooLarge(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadScratch{
- Dst: bpf.RegX,
- N: 16,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid scratch slot 16" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMLoadScratchUnknownDestinationRegister(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadScratch{
- Dst: 100,
- N: 0,
- },
- bpf.RetA{},
- })
- if errStr(err) != "assembling instruction 1: invalid target register 100" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMStoreScratchLoadScratchOneValue(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- // Load byte 255
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- // Copy to X and store in scratch[0]
- bpf.TAX{},
- bpf.StoreScratch{
- Src: bpf.RegX,
- N: 0,
- },
- // Load byte 1
- bpf.LoadAbsolute{
- Off: 9,
- Size: 1,
- },
- // Overwrite 1 with 255 from scratch[0]
- bpf.LoadScratch{
- Dst: bpf.RegA,
- N: 0,
- },
- // Return 255
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 255, 1, 2,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 3, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
-
-func TestVMStoreScratchLoadScratchMultipleValues(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- // Load byte 10
- bpf.LoadAbsolute{
- Off: 8,
- Size: 1,
- },
- // Store in scratch[0]
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: 0,
- },
- // Load byte 20
- bpf.LoadAbsolute{
- Off: 9,
- Size: 1,
- },
- // Store in scratch[1]
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: 1,
- },
- // Load byte 30
- bpf.LoadAbsolute{
- Off: 10,
- Size: 1,
- },
- // Store in scratch[2]
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: 2,
- },
- // Load byte 1
- bpf.LoadAbsolute{
- Off: 11,
- Size: 1,
- },
- // Store in scratch[3]
- bpf.StoreScratch{
- Src: bpf.RegA,
- N: 3,
- },
- // Load in byte 10 to X
- bpf.LoadScratch{
- Dst: bpf.RegX,
- N: 0,
- },
- // Copy X -> A
- bpf.TXA{},
- // Verify value is 10
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 10,
- SkipTrue: 1,
- },
- // Fail test if incorrect
- bpf.RetConstant{
- Val: 0,
- },
- // Load in byte 20 to A
- bpf.LoadScratch{
- Dst: bpf.RegA,
- N: 1,
- },
- // Verify value is 20
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 20,
- SkipTrue: 1,
- },
- // Fail test if incorrect
- bpf.RetConstant{
- Val: 0,
- },
- // Load in byte 30 to A
- bpf.LoadScratch{
- Dst: bpf.RegA,
- N: 2,
- },
- // Verify value is 30
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: 30,
- SkipTrue: 1,
- },
- // Fail test if incorrect
- bpf.RetConstant{
- Val: 0,
- },
- // Return first two bytes on success
- bpf.RetConstant{
- Val: 10,
- },
- })
- if err != nil {
- t.Fatalf("failed to load BPF program: %v", err)
- }
- defer done()
-
- out, err := vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 10, 20, 30, 1,
- })
- if err != nil {
- t.Fatalf("unexpected error while running program: %v", err)
- }
- if want, got := 2, out; want != got {
- t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d",
- want, got)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_test.go
deleted file mode 100644
index 6bd4dd5c3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/bpf/vm_test.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2016 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 file.
-
-package bpf_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/net/bpf"
-)
-
-var _ bpf.Instruction = unknown{}
-
-type unknown struct{}
-
-func (unknown) Assemble() (bpf.RawInstruction, error) {
- return bpf.RawInstruction{}, nil
-}
-
-func TestVMUnknownInstruction(t *testing.T) {
- vm, done, err := testVM(t, []bpf.Instruction{
- bpf.LoadConstant{
- Dst: bpf.RegA,
- Val: 100,
- },
- // Should terminate the program with an error immediately
- unknown{},
- bpf.RetA{},
- })
- if err != nil {
- t.Fatalf("unexpected error: %v", err)
- }
- defer done()
-
- _, err = vm.Run([]byte{
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00,
- })
- if errStr(err) != "unknown Instruction at index 1: bpf_test.unknown" {
- t.Fatalf("unexpected error while running program: %v", err)
- }
-}
-
-func TestVMNoReturnInstruction(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{
- bpf.LoadConstant{
- Dst: bpf.RegA,
- Val: 1,
- },
- })
- if errStr(err) != "BPF program must end with RetA or RetConstant" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-func TestVMNoInputInstructions(t *testing.T) {
- _, _, err := testVM(t, []bpf.Instruction{})
- if errStr(err) != "one or more Instructions must be specified" {
- t.Fatalf("unexpected error: %v", err)
- }
-}
-
-// ExampleNewVM demonstrates usage of a VM, using an Ethernet frame
-// as input and checking its EtherType to determine if it should be accepted.
-func ExampleNewVM() {
- // Offset | Length | Comment
- // -------------------------
- // 00 | 06 | Ethernet destination MAC address
- // 06 | 06 | Ethernet source MAC address
- // 12 | 02 | Ethernet EtherType
- const (
- etOff = 12
- etLen = 2
-
- etARP = 0x0806
- )
-
- // Set up a VM to filter traffic based on if its EtherType
- // matches the ARP EtherType.
- vm, err := bpf.NewVM([]bpf.Instruction{
- // Load EtherType value from Ethernet header
- bpf.LoadAbsolute{
- Off: etOff,
- Size: etLen,
- },
- // If EtherType is equal to the ARP EtherType, jump to allow
- // packet to be accepted
- bpf.JumpIf{
- Cond: bpf.JumpEqual,
- Val: etARP,
- SkipTrue: 1,
- },
- // EtherType does not match the ARP EtherType
- bpf.RetConstant{
- Val: 0,
- },
- // EtherType matches the ARP EtherType, accept up to 1500
- // bytes of packet
- bpf.RetConstant{
- Val: 1500,
- },
- })
- if err != nil {
- panic(fmt.Sprintf("failed to load BPF program: %v", err))
- }
-
- // Create an Ethernet frame with the ARP EtherType for testing
- frame := []byte{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
- 0x08, 0x06,
- // Payload omitted for brevity
- }
-
- // Run our VM's BPF program using the Ethernet frame as input
- out, err := vm.Run(frame)
- if err != nil {
- panic(fmt.Sprintf("failed to accept Ethernet frame: %v", err))
- }
-
- // BPF VM can return a byte count greater than the number of input
- // bytes, so trim the output to match the input byte length
- if out > len(frame) {
- out = len(frame)
- }
-
- fmt.Printf("out: %d bytes", out)
-
- // Output:
- // out: 14 bytes
-}
-
-// errStr returns the string representation of an error, or
-// "<nil>" if it is nil.
-func errStr(err error) string {
- if err == nil {
- return "<nil>"
- }
-
- return err.Error()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/codereview.cfg b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/codereview.cfg
deleted file mode 100644
index 3f8b14b64..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/codereview.cfg
+++ /dev/null
@@ -1 +0,0 @@
-issuerepo: golang/go
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context.go
deleted file mode 100644
index a3c021d3f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package context defines the Context type, which carries deadlines,
-// cancelation signals, and other request-scoped values across API boundaries
-// and between processes.
-// As of Go 1.7 this package is available in the standard library under the
-// name context. https://golang.org/pkg/context.
-//
-// Incoming requests to a server should create a Context, and outgoing calls to
-// servers should accept a Context. The chain of function calls between must
-// propagate the Context, optionally replacing it with a modified copy created
-// using WithDeadline, WithTimeout, WithCancel, or WithValue.
-//
-// Programs that use Contexts should follow these rules to keep interfaces
-// consistent across packages and enable static analysis tools to check context
-// propagation:
-//
-// Do not store Contexts inside a struct type; instead, pass a Context
-// explicitly to each function that needs it. The Context should be the first
-// parameter, typically named ctx:
-//
-// func DoSomething(ctx context.Context, arg Arg) error {
-// // ... use ctx ...
-// }
-//
-// Do not pass a nil Context, even if a function permits it. Pass context.TODO
-// if you are unsure about which Context to use.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-//
-// The same Context may be passed to functions running in different goroutines;
-// Contexts are safe for simultaneous use by multiple goroutines.
-//
-// See http://blog.golang.org/context for example code for a server that uses
-// Contexts.
-package context // import "golang.org/x/net/context"
-
-// Background returns a non-nil, empty Context. It is never canceled, has no
-// values, and has no deadline. It is typically used by the main function,
-// initialization, and tests, and as the top-level Context for incoming
-// requests.
-func Background() Context {
- return background
-}
-
-// TODO returns a non-nil, empty Context. Code should use context.TODO when
-// it's unclear which Context to use or it is not yet available (because the
-// surrounding function has not yet been extended to accept a Context
-// parameter). TODO is recognized by static analysis tools that determine
-// whether Contexts are propagated correctly in a program.
-func TODO() Context {
- return todo
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context_test.go
deleted file mode 100644
index 62844131b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/context_test.go
+++ /dev/null
@@ -1,583 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !go1.7
-
-package context
-
-import (
- "fmt"
- "math/rand"
- "runtime"
- "strings"
- "sync"
- "testing"
- "time"
-)
-
-// otherContext is a Context that's not one of the types defined in context.go.
-// This lets us test code paths that differ based on the underlying type of the
-// Context.
-type otherContext struct {
- Context
-}
-
-func TestBackground(t *testing.T) {
- c := Background()
- if c == nil {
- t.Fatalf("Background returned nil")
- }
- select {
- case x := <-c.Done():
- t.Errorf("<-c.Done() == %v want nothing (it should block)", x)
- default:
- }
- if got, want := fmt.Sprint(c), "context.Background"; got != want {
- t.Errorf("Background().String() = %q want %q", got, want)
- }
-}
-
-func TestTODO(t *testing.T) {
- c := TODO()
- if c == nil {
- t.Fatalf("TODO returned nil")
- }
- select {
- case x := <-c.Done():
- t.Errorf("<-c.Done() == %v want nothing (it should block)", x)
- default:
- }
- if got, want := fmt.Sprint(c), "context.TODO"; got != want {
- t.Errorf("TODO().String() = %q want %q", got, want)
- }
-}
-
-func TestWithCancel(t *testing.T) {
- c1, cancel := WithCancel(Background())
-
- if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want {
- t.Errorf("c1.String() = %q want %q", got, want)
- }
-
- o := otherContext{c1}
- c2, _ := WithCancel(o)
- contexts := []Context{c1, o, c2}
-
- for i, c := range contexts {
- if d := c.Done(); d == nil {
- t.Errorf("c[%d].Done() == %v want non-nil", i, d)
- }
- if e := c.Err(); e != nil {
- t.Errorf("c[%d].Err() == %v want nil", i, e)
- }
-
- select {
- case x := <-c.Done():
- t.Errorf("<-c.Done() == %v want nothing (it should block)", x)
- default:
- }
- }
-
- cancel()
- time.Sleep(100 * time.Millisecond) // let cancelation propagate
-
- for i, c := range contexts {
- select {
- case <-c.Done():
- default:
- t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i)
- }
- if e := c.Err(); e != Canceled {
- t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled)
- }
- }
-}
-
-func TestParentFinishesChild(t *testing.T) {
- // Context tree:
- // parent -> cancelChild
- // parent -> valueChild -> timerChild
- parent, cancel := WithCancel(Background())
- cancelChild, stop := WithCancel(parent)
- defer stop()
- valueChild := WithValue(parent, "key", "value")
- timerChild, stop := WithTimeout(valueChild, 10000*time.Hour)
- defer stop()
-
- select {
- case x := <-parent.Done():
- t.Errorf("<-parent.Done() == %v want nothing (it should block)", x)
- case x := <-cancelChild.Done():
- t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x)
- case x := <-timerChild.Done():
- t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x)
- case x := <-valueChild.Done():
- t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x)
- default:
- }
-
- // The parent's children should contain the two cancelable children.
- pc := parent.(*cancelCtx)
- cc := cancelChild.(*cancelCtx)
- tc := timerChild.(*timerCtx)
- pc.mu.Lock()
- if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] {
- t.Errorf("bad linkage: pc.children = %v, want %v and %v",
- pc.children, cc, tc)
- }
- pc.mu.Unlock()
-
- if p, ok := parentCancelCtx(cc.Context); !ok || p != pc {
- t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc)
- }
- if p, ok := parentCancelCtx(tc.Context); !ok || p != pc {
- t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc)
- }
-
- cancel()
-
- pc.mu.Lock()
- if len(pc.children) != 0 {
- t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children)
- }
- pc.mu.Unlock()
-
- // parent and children should all be finished.
- check := func(ctx Context, name string) {
- select {
- case <-ctx.Done():
- default:
- t.Errorf("<-%s.Done() blocked, but shouldn't have", name)
- }
- if e := ctx.Err(); e != Canceled {
- t.Errorf("%s.Err() == %v want %v", name, e, Canceled)
- }
- }
- check(parent, "parent")
- check(cancelChild, "cancelChild")
- check(valueChild, "valueChild")
- check(timerChild, "timerChild")
-
- // WithCancel should return a canceled context on a canceled parent.
- precanceledChild := WithValue(parent, "key", "value")
- select {
- case <-precanceledChild.Done():
- default:
- t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have")
- }
- if e := precanceledChild.Err(); e != Canceled {
- t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled)
- }
-}
-
-func TestChildFinishesFirst(t *testing.T) {
- cancelable, stop := WithCancel(Background())
- defer stop()
- for _, parent := range []Context{Background(), cancelable} {
- child, cancel := WithCancel(parent)
-
- select {
- case x := <-parent.Done():
- t.Errorf("<-parent.Done() == %v want nothing (it should block)", x)
- case x := <-child.Done():
- t.Errorf("<-child.Done() == %v want nothing (it should block)", x)
- default:
- }
-
- cc := child.(*cancelCtx)
- pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background()
- if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) {
- t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok)
- }
-
- if pcok {
- pc.mu.Lock()
- if len(pc.children) != 1 || !pc.children[cc] {
- t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc)
- }
- pc.mu.Unlock()
- }
-
- cancel()
-
- if pcok {
- pc.mu.Lock()
- if len(pc.children) != 0 {
- t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children)
- }
- pc.mu.Unlock()
- }
-
- // child should be finished.
- select {
- case <-child.Done():
- default:
- t.Errorf("<-child.Done() blocked, but shouldn't have")
- }
- if e := child.Err(); e != Canceled {
- t.Errorf("child.Err() == %v want %v", e, Canceled)
- }
-
- // parent should not be finished.
- select {
- case x := <-parent.Done():
- t.Errorf("<-parent.Done() == %v want nothing (it should block)", x)
- default:
- }
- if e := parent.Err(); e != nil {
- t.Errorf("parent.Err() == %v want nil", e)
- }
- }
-}
-
-func testDeadline(c Context, wait time.Duration, t *testing.T) {
- select {
- case <-time.After(wait):
- t.Fatalf("context should have timed out")
- case <-c.Done():
- }
- if e := c.Err(); e != DeadlineExceeded {
- t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded)
- }
-}
-
-func TestDeadline(t *testing.T) {
- t.Parallel()
- const timeUnit = 500 * time.Millisecond
- c, _ := WithDeadline(Background(), time.Now().Add(1*timeUnit))
- if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) {
- t.Errorf("c.String() = %q want prefix %q", got, prefix)
- }
- testDeadline(c, 2*timeUnit, t)
-
- c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit))
- o := otherContext{c}
- testDeadline(o, 2*timeUnit, t)
-
- c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit))
- o = otherContext{c}
- c, _ = WithDeadline(o, time.Now().Add(3*timeUnit))
- testDeadline(c, 2*timeUnit, t)
-}
-
-func TestTimeout(t *testing.T) {
- t.Parallel()
- const timeUnit = 500 * time.Millisecond
- c, _ := WithTimeout(Background(), 1*timeUnit)
- if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) {
- t.Errorf("c.String() = %q want prefix %q", got, prefix)
- }
- testDeadline(c, 2*timeUnit, t)
-
- c, _ = WithTimeout(Background(), 1*timeUnit)
- o := otherContext{c}
- testDeadline(o, 2*timeUnit, t)
-
- c, _ = WithTimeout(Background(), 1*timeUnit)
- o = otherContext{c}
- c, _ = WithTimeout(o, 3*timeUnit)
- testDeadline(c, 2*timeUnit, t)
-}
-
-func TestCanceledTimeout(t *testing.T) {
- t.Parallel()
- const timeUnit = 500 * time.Millisecond
- c, _ := WithTimeout(Background(), 2*timeUnit)
- o := otherContext{c}
- c, cancel := WithTimeout(o, 4*timeUnit)
- cancel()
- time.Sleep(1 * timeUnit) // let cancelation propagate
- select {
- case <-c.Done():
- default:
- t.Errorf("<-c.Done() blocked, but shouldn't have")
- }
- if e := c.Err(); e != Canceled {
- t.Errorf("c.Err() == %v want %v", e, Canceled)
- }
-}
-
-type key1 int
-type key2 int
-
-var k1 = key1(1)
-var k2 = key2(1) // same int as k1, different type
-var k3 = key2(3) // same type as k2, different int
-
-func TestValues(t *testing.T) {
- check := func(c Context, nm, v1, v2, v3 string) {
- if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 {
- t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0)
- }
- if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 {
- t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0)
- }
- if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 {
- t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0)
- }
- }
-
- c0 := Background()
- check(c0, "c0", "", "", "")
-
- c1 := WithValue(Background(), k1, "c1k1")
- check(c1, "c1", "c1k1", "", "")
-
- if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want {
- t.Errorf("c.String() = %q want %q", got, want)
- }
-
- c2 := WithValue(c1, k2, "c2k2")
- check(c2, "c2", "c1k1", "c2k2", "")
-
- c3 := WithValue(c2, k3, "c3k3")
- check(c3, "c2", "c1k1", "c2k2", "c3k3")
-
- c4 := WithValue(c3, k1, nil)
- check(c4, "c4", "", "c2k2", "c3k3")
-
- o0 := otherContext{Background()}
- check(o0, "o0", "", "", "")
-
- o1 := otherContext{WithValue(Background(), k1, "c1k1")}
- check(o1, "o1", "c1k1", "", "")
-
- o2 := WithValue(o1, k2, "o2k2")
- check(o2, "o2", "c1k1", "o2k2", "")
-
- o3 := otherContext{c4}
- check(o3, "o3", "", "c2k2", "c3k3")
-
- o4 := WithValue(o3, k3, nil)
- check(o4, "o4", "", "c2k2", "")
-}
-
-func TestAllocs(t *testing.T) {
- bg := Background()
- for _, test := range []struct {
- desc string
- f func()
- limit float64
- gccgoLimit float64
- }{
- {
- desc: "Background()",
- f: func() { Background() },
- limit: 0,
- gccgoLimit: 0,
- },
- {
- desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1),
- f: func() {
- c := WithValue(bg, k1, nil)
- c.Value(k1)
- },
- limit: 3,
- gccgoLimit: 3,
- },
- {
- desc: "WithTimeout(bg, 15*time.Millisecond)",
- f: func() {
- c, _ := WithTimeout(bg, 15*time.Millisecond)
- <-c.Done()
- },
- limit: 8,
- gccgoLimit: 16,
- },
- {
- desc: "WithCancel(bg)",
- f: func() {
- c, cancel := WithCancel(bg)
- cancel()
- <-c.Done()
- },
- limit: 5,
- gccgoLimit: 8,
- },
- {
- desc: "WithTimeout(bg, 100*time.Millisecond)",
- f: func() {
- c, cancel := WithTimeout(bg, 100*time.Millisecond)
- cancel()
- <-c.Done()
- },
- limit: 8,
- gccgoLimit: 25,
- },
- } {
- limit := test.limit
- if runtime.Compiler == "gccgo" {
- // gccgo does not yet do escape analysis.
- // TODO(iant): Remove this when gccgo does do escape analysis.
- limit = test.gccgoLimit
- }
- if n := testing.AllocsPerRun(100, test.f); n > limit {
- t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit))
- }
- }
-}
-
-func TestSimultaneousCancels(t *testing.T) {
- root, cancel := WithCancel(Background())
- m := map[Context]CancelFunc{root: cancel}
- q := []Context{root}
- // Create a tree of contexts.
- for len(q) != 0 && len(m) < 100 {
- parent := q[0]
- q = q[1:]
- for i := 0; i < 4; i++ {
- ctx, cancel := WithCancel(parent)
- m[ctx] = cancel
- q = append(q, ctx)
- }
- }
- // Start all the cancels in a random order.
- var wg sync.WaitGroup
- wg.Add(len(m))
- for _, cancel := range m {
- go func(cancel CancelFunc) {
- cancel()
- wg.Done()
- }(cancel)
- }
- // Wait on all the contexts in a random order.
- for ctx := range m {
- select {
- case <-ctx.Done():
- case <-time.After(1 * time.Second):
- buf := make([]byte, 10<<10)
- n := runtime.Stack(buf, true)
- t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n])
- }
- }
- // Wait for all the cancel functions to return.
- done := make(chan struct{})
- go func() {
- wg.Wait()
- close(done)
- }()
- select {
- case <-done:
- case <-time.After(1 * time.Second):
- buf := make([]byte, 10<<10)
- n := runtime.Stack(buf, true)
- t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n])
- }
-}
-
-func TestInterlockedCancels(t *testing.T) {
- parent, cancelParent := WithCancel(Background())
- child, cancelChild := WithCancel(parent)
- go func() {
- parent.Done()
- cancelChild()
- }()
- cancelParent()
- select {
- case <-child.Done():
- case <-time.After(1 * time.Second):
- buf := make([]byte, 10<<10)
- n := runtime.Stack(buf, true)
- t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n])
- }
-}
-
-func TestLayersCancel(t *testing.T) {
- testLayers(t, time.Now().UnixNano(), false)
-}
-
-func TestLayersTimeout(t *testing.T) {
- testLayers(t, time.Now().UnixNano(), true)
-}
-
-func testLayers(t *testing.T, seed int64, testTimeout bool) {
- rand.Seed(seed)
- errorf := func(format string, a ...interface{}) {
- t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...)
- }
- const (
- timeout = 200 * time.Millisecond
- minLayers = 30
- )
- type value int
- var (
- vals []*value
- cancels []CancelFunc
- numTimers int
- ctx = Background()
- )
- for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ {
- switch rand.Intn(3) {
- case 0:
- v := new(value)
- ctx = WithValue(ctx, v, v)
- vals = append(vals, v)
- case 1:
- var cancel CancelFunc
- ctx, cancel = WithCancel(ctx)
- cancels = append(cancels, cancel)
- case 2:
- var cancel CancelFunc
- ctx, cancel = WithTimeout(ctx, timeout)
- cancels = append(cancels, cancel)
- numTimers++
- }
- }
- checkValues := func(when string) {
- for _, key := range vals {
- if val := ctx.Value(key).(*value); key != val {
- errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key)
- }
- }
- }
- select {
- case <-ctx.Done():
- errorf("ctx should not be canceled yet")
- default:
- }
- if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) {
- t.Errorf("ctx.String() = %q want prefix %q", s, prefix)
- }
- t.Log(ctx)
- checkValues("before cancel")
- if testTimeout {
- select {
- case <-ctx.Done():
- case <-time.After(timeout + 100*time.Millisecond):
- errorf("ctx should have timed out")
- }
- checkValues("after timeout")
- } else {
- cancel := cancels[rand.Intn(len(cancels))]
- cancel()
- select {
- case <-ctx.Done():
- default:
- errorf("ctx should be canceled")
- }
- checkValues("after cancel")
- }
-}
-
-func TestCancelRemoves(t *testing.T) {
- checkChildren := func(when string, ctx Context, want int) {
- if got := len(ctx.(*cancelCtx).children); got != want {
- t.Errorf("%s: context has %d children, want %d", when, got, want)
- }
- }
-
- ctx, _ := WithCancel(Background())
- checkChildren("after creation", ctx, 0)
- _, cancel := WithCancel(ctx)
- checkChildren("with WithCancel child ", ctx, 1)
- cancel()
- checkChildren("after cancelling WithCancel child", ctx, 0)
-
- ctx, _ = WithCancel(Background())
- checkChildren("after creation", ctx, 0)
- _, cancel = WithTimeout(ctx, 60*time.Minute)
- checkChildren("with WithTimeout child ", ctx, 1)
- cancel()
- checkChildren("after cancelling WithTimeout child", ctx, 0)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
deleted file mode 100644
index 606cf1f97..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7
-
-// Package ctxhttp provides helper functions for performing context-aware HTTP requests.
-package ctxhttp // import "golang.org/x/net/context/ctxhttp"
-
-import (
- "io"
- "net/http"
- "net/url"
- "strings"
-
- "golang.org/x/net/context"
-)
-
-// Do sends an HTTP request with the provided http.Client and returns
-// an HTTP response.
-//
-// If the client is nil, http.DefaultClient is used.
-//
-// The provided ctx must be non-nil. If it is canceled or times out,
-// ctx.Err() will be returned.
-func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
- if client == nil {
- client = http.DefaultClient
- }
- resp, err := client.Do(req.WithContext(ctx))
- // If we got an error, and the context has been canceled,
- // the context's error is probably more useful.
- if err != nil {
- select {
- case <-ctx.Done():
- err = ctx.Err()
- default:
- }
- }
- return resp, err
-}
-
-// Get issues a GET request via the Do function.
-func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Head issues a HEAD request via the Do function.
-func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("HEAD", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Post issues a POST request via the Do function.
-func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
- req, err := http.NewRequest("POST", url, body)
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", bodyType)
- return Do(ctx, client, req)
-}
-
-// PostForm issues a POST request via the Do function.
-func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
- return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go
deleted file mode 100644
index 72411b1b6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !plan9,go1.7
-
-package ctxhttp
-
-import (
- "io"
- "net/http"
- "net/http/httptest"
- "testing"
-
- "context"
-)
-
-func TestGo17Context(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, "ok")
- }))
- defer ts.Close()
- ctx := context.Background()
- resp, err := Get(ctx, http.DefaultClient, ts.URL)
- if resp == nil || err != nil {
- t.Fatalf("error received from client: %v %v", err, resp)
- }
- resp.Body.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go
deleted file mode 100644
index 926870cc2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !go1.7
-
-package ctxhttp // import "golang.org/x/net/context/ctxhttp"
-
-import (
- "io"
- "net/http"
- "net/url"
- "strings"
-
- "golang.org/x/net/context"
-)
-
-func nop() {}
-
-var (
- testHookContextDoneBeforeHeaders = nop
- testHookDoReturned = nop
- testHookDidBodyClose = nop
-)
-
-// Do sends an HTTP request with the provided http.Client and returns an HTTP response.
-// If the client is nil, http.DefaultClient is used.
-// If the context is canceled or times out, ctx.Err() will be returned.
-func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
- if client == nil {
- client = http.DefaultClient
- }
-
- // TODO(djd): Respect any existing value of req.Cancel.
- cancel := make(chan struct{})
- req.Cancel = cancel
-
- type responseAndError struct {
- resp *http.Response
- err error
- }
- result := make(chan responseAndError, 1)
-
- // Make local copies of test hooks closed over by goroutines below.
- // Prevents data races in tests.
- testHookDoReturned := testHookDoReturned
- testHookDidBodyClose := testHookDidBodyClose
-
- go func() {
- resp, err := client.Do(req)
- testHookDoReturned()
- result <- responseAndError{resp, err}
- }()
-
- var resp *http.Response
-
- select {
- case <-ctx.Done():
- testHookContextDoneBeforeHeaders()
- close(cancel)
- // Clean up after the goroutine calling client.Do:
- go func() {
- if r := <-result; r.resp != nil {
- testHookDidBodyClose()
- r.resp.Body.Close()
- }
- }()
- return nil, ctx.Err()
- case r := <-result:
- var err error
- resp, err = r.resp, r.err
- if err != nil {
- return resp, err
- }
- }
-
- c := make(chan struct{})
- go func() {
- select {
- case <-ctx.Done():
- close(cancel)
- case <-c:
- // The response's Body is closed.
- }
- }()
- resp.Body = &notifyingReader{resp.Body, c}
-
- return resp, nil
-}
-
-// Get issues a GET request via the Do function.
-func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Head issues a HEAD request via the Do function.
-func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
- req, err := http.NewRequest("HEAD", url, nil)
- if err != nil {
- return nil, err
- }
- return Do(ctx, client, req)
-}
-
-// Post issues a POST request via the Do function.
-func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
- req, err := http.NewRequest("POST", url, body)
- if err != nil {
- return nil, err
- }
- req.Header.Set("Content-Type", bodyType)
- return Do(ctx, client, req)
-}
-
-// PostForm issues a POST request via the Do function.
-func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
- return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
-}
-
-// notifyingReader is an io.ReadCloser that closes the notify channel after
-// Close is called or a Read fails on the underlying ReadCloser.
-type notifyingReader struct {
- io.ReadCloser
- notify chan<- struct{}
-}
-
-func (r *notifyingReader) Read(p []byte) (int, error) {
- n, err := r.ReadCloser.Read(p)
- if err != nil && r.notify != nil {
- close(r.notify)
- r.notify = nil
- }
- return n, err
-}
-
-func (r *notifyingReader) Close() error {
- err := r.ReadCloser.Close()
- if r.notify != nil {
- close(r.notify)
- r.notify = nil
- }
- return err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go
deleted file mode 100644
index 9159cf022..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !plan9,!go1.7
-
-package ctxhttp
-
-import (
- "net"
- "net/http"
- "net/http/httptest"
- "sync"
- "testing"
- "time"
-
- "golang.org/x/net/context"
-)
-
-// golang.org/issue/14065
-func TestClosesResponseBodyOnCancel(t *testing.T) {
- defer func() { testHookContextDoneBeforeHeaders = nop }()
- defer func() { testHookDoReturned = nop }()
- defer func() { testHookDidBodyClose = nop }()
-
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
- defer ts.Close()
-
- ctx, cancel := context.WithCancel(context.Background())
-
- // closed when Do enters select case <-ctx.Done()
- enteredDonePath := make(chan struct{})
-
- testHookContextDoneBeforeHeaders = func() {
- close(enteredDonePath)
- }
-
- testHookDoReturned = func() {
- // We now have the result (the Flush'd headers) at least,
- // so we can cancel the request.
- cancel()
-
- // But block the client.Do goroutine from sending
- // until Do enters into the <-ctx.Done() path, since
- // otherwise if both channels are readable, select
- // picks a random one.
- <-enteredDonePath
- }
-
- sawBodyClose := make(chan struct{})
- testHookDidBodyClose = func() { close(sawBodyClose) }
-
- tr := &http.Transport{}
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
- req, _ := http.NewRequest("GET", ts.URL, nil)
- _, doErr := Do(ctx, c, req)
-
- select {
- case <-sawBodyClose:
- case <-time.After(5 * time.Second):
- t.Fatal("timeout waiting for body to close")
- }
-
- if doErr != ctx.Err() {
- t.Errorf("Do error = %v; want %v", doErr, ctx.Err())
- }
-}
-
-type noteCloseConn struct {
- net.Conn
- onceClose sync.Once
- closefn func()
-}
-
-func (c *noteCloseConn) Close() error {
- c.onceClose.Do(c.closefn)
- return c.Conn.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go
deleted file mode 100644
index 1e4155180..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !plan9
-
-package ctxhttp
-
-import (
- "io"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-
- "golang.org/x/net/context"
-)
-
-const (
- requestDuration = 100 * time.Millisecond
- requestBody = "ok"
-)
-
-func okHandler(w http.ResponseWriter, r *http.Request) {
- time.Sleep(requestDuration)
- io.WriteString(w, requestBody)
-}
-
-func TestNoTimeout(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(okHandler))
- defer ts.Close()
-
- ctx := context.Background()
- res, err := Get(ctx, nil, ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatal(err)
- }
- if string(slurp) != requestBody {
- t.Errorf("body = %q; want %q", slurp, requestBody)
- }
-}
-
-func TestCancelBeforeHeaders(t *testing.T) {
- ctx, cancel := context.WithCancel(context.Background())
-
- blockServer := make(chan struct{})
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- cancel()
- <-blockServer
- io.WriteString(w, requestBody)
- }))
- defer ts.Close()
- defer close(blockServer)
-
- res, err := Get(ctx, nil, ts.URL)
- if err == nil {
- res.Body.Close()
- t.Fatal("Get returned unexpected nil error")
- }
- if err != context.Canceled {
- t.Errorf("err = %v; want %v", err, context.Canceled)
- }
-}
-
-func TestCancelAfterHangingRequest(t *testing.T) {
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- w.(http.Flusher).Flush()
- <-w.(http.CloseNotifier).CloseNotify()
- }))
- defer ts.Close()
-
- ctx, cancel := context.WithCancel(context.Background())
- resp, err := Get(ctx, nil, ts.URL)
- if err != nil {
- t.Fatalf("unexpected error in Get: %v", err)
- }
-
- // Cancel befer reading the body.
- // Reading Request.Body should fail, since the request was
- // canceled before anything was written.
- cancel()
-
- done := make(chan struct{})
-
- go func() {
- b, err := ioutil.ReadAll(resp.Body)
- if len(b) != 0 || err == nil {
- t.Errorf(`Read got (%q, %v); want ("", error)`, b, err)
- }
- close(done)
- }()
-
- select {
- case <-time.After(1 * time.Second):
- t.Errorf("Test timed out")
- case <-done:
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go17.go
deleted file mode 100644
index d20f52b7d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go17.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7
-
-package context
-
-import (
- "context" // standard library's context, as of Go 1.7
- "time"
-)
-
-var (
- todo = context.TODO()
- background = context.Background()
-)
-
-// Canceled is the error returned by Context.Err when the context is canceled.
-var Canceled = context.Canceled
-
-// DeadlineExceeded is the error returned by Context.Err when the context's
-// deadline passes.
-var DeadlineExceeded = context.DeadlineExceeded
-
-// WithCancel returns a copy of parent with a new Done channel. The returned
-// context's Done channel is closed when the returned cancel function is called
-// or when the parent context's Done channel is closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
- ctx, f := context.WithCancel(parent)
- return ctx, CancelFunc(f)
-}
-
-// WithDeadline returns a copy of the parent context with the deadline adjusted
-// to be no later than d. If the parent's deadline is already earlier than d,
-// WithDeadline(parent, d) is semantically equivalent to parent. The returned
-// context's Done channel is closed when the deadline expires, when the returned
-// cancel function is called, or when the parent context's Done channel is
-// closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
- ctx, f := context.WithDeadline(parent, deadline)
- return ctx, CancelFunc(f)
-}
-
-// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete:
-//
-// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
-// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
-// defer cancel() // releases resources if slowOperation completes before timeout elapses
-// return slowOperation(ctx)
-// }
-func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
- return WithDeadline(parent, time.Now().Add(timeout))
-}
-
-// WithValue returns a copy of parent in which the value associated with key is
-// val.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-func WithValue(parent Context, key interface{}, val interface{}) Context {
- return context.WithValue(parent, key, val)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go19.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go19.go
deleted file mode 100644
index d88bd1db1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/go19.go
+++ /dev/null
@@ -1,20 +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 file.
-
-// +build go1.9
-
-package context
-
-import "context" // standard library's context, as of Go 1.7
-
-// A Context carries a deadline, a cancelation signal, and other values across
-// API boundaries.
-//
-// Context's methods may be called by multiple goroutines simultaneously.
-type Context = context.Context
-
-// A CancelFunc tells an operation to abandon its work.
-// A CancelFunc does not wait for the work to stop.
-// After the first call, subsequent calls to a CancelFunc do nothing.
-type CancelFunc = context.CancelFunc
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go17.go
deleted file mode 100644
index 0f35592df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go17.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !go1.7
-
-package context
-
-import (
- "errors"
- "fmt"
- "sync"
- "time"
-)
-
-// An emptyCtx is never canceled, has no values, and has no deadline. It is not
-// struct{}, since vars of this type must have distinct addresses.
-type emptyCtx int
-
-func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
- return
-}
-
-func (*emptyCtx) Done() <-chan struct{} {
- return nil
-}
-
-func (*emptyCtx) Err() error {
- return nil
-}
-
-func (*emptyCtx) Value(key interface{}) interface{} {
- return nil
-}
-
-func (e *emptyCtx) String() string {
- switch e {
- case background:
- return "context.Background"
- case todo:
- return "context.TODO"
- }
- return "unknown empty Context"
-}
-
-var (
- background = new(emptyCtx)
- todo = new(emptyCtx)
-)
-
-// Canceled is the error returned by Context.Err when the context is canceled.
-var Canceled = errors.New("context canceled")
-
-// DeadlineExceeded is the error returned by Context.Err when the context's
-// deadline passes.
-var DeadlineExceeded = errors.New("context deadline exceeded")
-
-// WithCancel returns a copy of parent with a new Done channel. The returned
-// context's Done channel is closed when the returned cancel function is called
-// or when the parent context's Done channel is closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
- c := newCancelCtx(parent)
- propagateCancel(parent, c)
- return c, func() { c.cancel(true, Canceled) }
-}
-
-// newCancelCtx returns an initialized cancelCtx.
-func newCancelCtx(parent Context) *cancelCtx {
- return &cancelCtx{
- Context: parent,
- done: make(chan struct{}),
- }
-}
-
-// propagateCancel arranges for child to be canceled when parent is.
-func propagateCancel(parent Context, child canceler) {
- if parent.Done() == nil {
- return // parent is never canceled
- }
- if p, ok := parentCancelCtx(parent); ok {
- p.mu.Lock()
- if p.err != nil {
- // parent has already been canceled
- child.cancel(false, p.err)
- } else {
- if p.children == nil {
- p.children = make(map[canceler]bool)
- }
- p.children[child] = true
- }
- p.mu.Unlock()
- } else {
- go func() {
- select {
- case <-parent.Done():
- child.cancel(false, parent.Err())
- case <-child.Done():
- }
- }()
- }
-}
-
-// parentCancelCtx follows a chain of parent references until it finds a
-// *cancelCtx. This function understands how each of the concrete types in this
-// package represents its parent.
-func parentCancelCtx(parent Context) (*cancelCtx, bool) {
- for {
- switch c := parent.(type) {
- case *cancelCtx:
- return c, true
- case *timerCtx:
- return c.cancelCtx, true
- case *valueCtx:
- parent = c.Context
- default:
- return nil, false
- }
- }
-}
-
-// removeChild removes a context from its parent.
-func removeChild(parent Context, child canceler) {
- p, ok := parentCancelCtx(parent)
- if !ok {
- return
- }
- p.mu.Lock()
- if p.children != nil {
- delete(p.children, child)
- }
- p.mu.Unlock()
-}
-
-// A canceler is a context type that can be canceled directly. The
-// implementations are *cancelCtx and *timerCtx.
-type canceler interface {
- cancel(removeFromParent bool, err error)
- Done() <-chan struct{}
-}
-
-// A cancelCtx can be canceled. When canceled, it also cancels any children
-// that implement canceler.
-type cancelCtx struct {
- Context
-
- done chan struct{} // closed by the first cancel call.
-
- mu sync.Mutex
- children map[canceler]bool // set to nil by the first cancel call
- err error // set to non-nil by the first cancel call
-}
-
-func (c *cancelCtx) Done() <-chan struct{} {
- return c.done
-}
-
-func (c *cancelCtx) Err() error {
- c.mu.Lock()
- defer c.mu.Unlock()
- return c.err
-}
-
-func (c *cancelCtx) String() string {
- return fmt.Sprintf("%v.WithCancel", c.Context)
-}
-
-// cancel closes c.done, cancels each of c's children, and, if
-// removeFromParent is true, removes c from its parent's children.
-func (c *cancelCtx) cancel(removeFromParent bool, err error) {
- if err == nil {
- panic("context: internal error: missing cancel error")
- }
- c.mu.Lock()
- if c.err != nil {
- c.mu.Unlock()
- return // already canceled
- }
- c.err = err
- close(c.done)
- for child := range c.children {
- // NOTE: acquiring the child's lock while holding parent's lock.
- child.cancel(false, err)
- }
- c.children = nil
- c.mu.Unlock()
-
- if removeFromParent {
- removeChild(c.Context, c)
- }
-}
-
-// WithDeadline returns a copy of the parent context with the deadline adjusted
-// to be no later than d. If the parent's deadline is already earlier than d,
-// WithDeadline(parent, d) is semantically equivalent to parent. The returned
-// context's Done channel is closed when the deadline expires, when the returned
-// cancel function is called, or when the parent context's Done channel is
-// closed, whichever happens first.
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
-func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
- if cur, ok := parent.Deadline(); ok && cur.Before(deadline) {
- // The current deadline is already sooner than the new one.
- return WithCancel(parent)
- }
- c := &timerCtx{
- cancelCtx: newCancelCtx(parent),
- deadline: deadline,
- }
- propagateCancel(parent, c)
- d := deadline.Sub(time.Now())
- if d <= 0 {
- c.cancel(true, DeadlineExceeded) // deadline has already passed
- return c, func() { c.cancel(true, Canceled) }
- }
- c.mu.Lock()
- defer c.mu.Unlock()
- if c.err == nil {
- c.timer = time.AfterFunc(d, func() {
- c.cancel(true, DeadlineExceeded)
- })
- }
- return c, func() { c.cancel(true, Canceled) }
-}
-
-// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to
-// implement Done and Err. It implements cancel by stopping its timer then
-// delegating to cancelCtx.cancel.
-type timerCtx struct {
- *cancelCtx
- timer *time.Timer // Under cancelCtx.mu.
-
- deadline time.Time
-}
-
-func (c *timerCtx) Deadline() (deadline time.Time, ok bool) {
- return c.deadline, true
-}
-
-func (c *timerCtx) String() string {
- return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now()))
-}
-
-func (c *timerCtx) cancel(removeFromParent bool, err error) {
- c.cancelCtx.cancel(false, err)
- if removeFromParent {
- // Remove this timerCtx from its parent cancelCtx's children.
- removeChild(c.cancelCtx.Context, c)
- }
- c.mu.Lock()
- if c.timer != nil {
- c.timer.Stop()
- c.timer = nil
- }
- c.mu.Unlock()
-}
-
-// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
-//
-// Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete:
-//
-// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
-// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
-// defer cancel() // releases resources if slowOperation completes before timeout elapses
-// return slowOperation(ctx)
-// }
-func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
- return WithDeadline(parent, time.Now().Add(timeout))
-}
-
-// WithValue returns a copy of parent in which the value associated with key is
-// val.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
-func WithValue(parent Context, key interface{}, val interface{}) Context {
- return &valueCtx{parent, key, val}
-}
-
-// A valueCtx carries a key-value pair. It implements Value for that key and
-// delegates all other calls to the embedded Context.
-type valueCtx struct {
- Context
- key, val interface{}
-}
-
-func (c *valueCtx) String() string {
- return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val)
-}
-
-func (c *valueCtx) Value(key interface{}) interface{} {
- if c.key == key {
- return c.val
- }
- return c.Context.Value(key)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go19.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go19.go
deleted file mode 100644
index b105f80be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/pre_go19.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !go1.9
-
-package context
-
-import "time"
-
-// A Context carries a deadline, a cancelation signal, and other values across
-// API boundaries.
-//
-// Context's methods may be called by multiple goroutines simultaneously.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- //
- // WithCancel arranges for Done to be closed when cancel is called;
- // WithDeadline arranges for Done to be closed when the deadline
- // expires; WithTimeout arranges for Done to be closed when the timeout
- // elapses.
- //
- // Done is provided for use in select statements:
- //
- // // Stream generates values with DoSomething and sends them to out
- // // until DoSomething returns an error or ctx.Done is closed.
- // func Stream(ctx context.Context, out chan<- Value) error {
- // for {
- // v, err := DoSomething(ctx)
- // if err != nil {
- // return err
- // }
- // select {
- // case <-ctx.Done():
- // return ctx.Err()
- // case out <- v:
- // }
- // }
- // }
- //
- // See http://blog.golang.org/pipelines for more examples of how to use
- // a Done channel for cancelation.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- //
- // A key identifies a specific value in a Context. Functions that wish
- // to store values in Context typically allocate a key in a global
- // variable then use that key as the argument to context.WithValue and
- // Context.Value. A key can be any type that supports equality;
- // packages should define keys as an unexported type to avoid
- // collisions.
- //
- // Packages that define a Context key should provide type-safe accessors
- // for the values stores using that key:
- //
- // // Package user defines a User type that's stored in Contexts.
- // package user
- //
- // import "golang.org/x/net/context"
- //
- // // User is the type of value stored in the Contexts.
- // type User struct {...}
- //
- // // key is an unexported type for keys defined in this package.
- // // This prevents collisions with keys defined in other packages.
- // type key int
- //
- // // userKey is the key for user.User values in Contexts. It is
- // // unexported; clients use user.NewContext and user.FromContext
- // // instead of using this key directly.
- // var userKey key = 0
- //
- // // NewContext returns a new Context that carries value u.
- // func NewContext(ctx context.Context, u *User) context.Context {
- // return context.WithValue(ctx, userKey, u)
- // }
- //
- // // FromContext returns the User value stored in ctx, if any.
- // func FromContext(ctx context.Context) (*User, bool) {
- // u, ok := ctx.Value(userKey).(*User)
- // return u, ok
- // }
- Value(key interface{}) interface{}
-}
-
-// A CancelFunc tells an operation to abandon its work.
-// A CancelFunc does not wait for the work to stop.
-// After the first call, subsequent calls to a CancelFunc do nothing.
-type CancelFunc func()
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/withtimeout_test.go
deleted file mode 100644
index e6f56691d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/context/withtimeout_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 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 file.
-
-package context_test
-
-import (
- "fmt"
- "time"
-
- "golang.org/x/net/context"
-)
-
-// This example passes a context with a timeout to tell a blocking function that
-// it should abandon its work after the timeout elapses.
-func ExampleWithTimeout() {
- // Pass a context with a timeout to tell a blocking function that it
- // should abandon its work after the timeout elapses.
- ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
- defer cancel()
-
- select {
- case <-time.After(1 * time.Second):
- fmt.Println("overslept")
- case <-ctx.Done():
- fmt.Println(ctx.Err()) // prints "context deadline exceeded"
- }
-
- // Output:
- // context deadline exceeded
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dict/dict.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dict/dict.go
deleted file mode 100644
index 93e65c03c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dict/dict.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2010 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 file.
-
-// Package dict implements the Dictionary Server Protocol
-// as defined in RFC 2229.
-package dict // import "golang.org/x/net/dict"
-
-import (
- "net/textproto"
- "strconv"
- "strings"
-)
-
-// A Client represents a client connection to a dictionary server.
-type Client struct {
- text *textproto.Conn
-}
-
-// Dial returns a new client connected to a dictionary server at
-// addr on the given network.
-func Dial(network, addr string) (*Client, error) {
- text, err := textproto.Dial(network, addr)
- if err != nil {
- return nil, err
- }
- _, _, err = text.ReadCodeLine(220)
- if err != nil {
- text.Close()
- return nil, err
- }
- return &Client{text: text}, nil
-}
-
-// Close closes the connection to the dictionary server.
-func (c *Client) Close() error {
- return c.text.Close()
-}
-
-// A Dict represents a dictionary available on the server.
-type Dict struct {
- Name string // short name of dictionary
- Desc string // long description
-}
-
-// Dicts returns a list of the dictionaries available on the server.
-func (c *Client) Dicts() ([]Dict, error) {
- id, err := c.text.Cmd("SHOW DB")
- if err != nil {
- return nil, err
- }
-
- c.text.StartResponse(id)
- defer c.text.EndResponse(id)
-
- _, _, err = c.text.ReadCodeLine(110)
- if err != nil {
- return nil, err
- }
- lines, err := c.text.ReadDotLines()
- if err != nil {
- return nil, err
- }
- _, _, err = c.text.ReadCodeLine(250)
-
- dicts := make([]Dict, len(lines))
- for i := range dicts {
- d := &dicts[i]
- a, _ := fields(lines[i])
- if len(a) < 2 {
- return nil, textproto.ProtocolError("invalid dictionary: " + lines[i])
- }
- d.Name = a[0]
- d.Desc = a[1]
- }
- return dicts, err
-}
-
-// A Defn represents a definition.
-type Defn struct {
- Dict Dict // Dict where definition was found
- Word string // Word being defined
- Text []byte // Definition text, typically multiple lines
-}
-
-// Define requests the definition of the given word.
-// The argument dict names the dictionary to use,
-// the Name field of a Dict returned by Dicts.
-//
-// The special dictionary name "*" means to look in all the
-// server's dictionaries.
-// The special dictionary name "!" means to look in all the
-// server's dictionaries in turn, stopping after finding the word
-// in one of them.
-func (c *Client) Define(dict, word string) ([]*Defn, error) {
- id, err := c.text.Cmd("DEFINE %s %q", dict, word)
- if err != nil {
- return nil, err
- }
-
- c.text.StartResponse(id)
- defer c.text.EndResponse(id)
-
- _, line, err := c.text.ReadCodeLine(150)
- if err != nil {
- return nil, err
- }
- a, _ := fields(line)
- if len(a) < 1 {
- return nil, textproto.ProtocolError("malformed response: " + line)
- }
- n, err := strconv.Atoi(a[0])
- if err != nil {
- return nil, textproto.ProtocolError("invalid definition count: " + a[0])
- }
- def := make([]*Defn, n)
- for i := 0; i < n; i++ {
- _, line, err = c.text.ReadCodeLine(151)
- if err != nil {
- return nil, err
- }
- a, _ := fields(line)
- if len(a) < 3 {
- // skip it, to keep protocol in sync
- i--
- n--
- def = def[0:n]
- continue
- }
- d := &Defn{Word: a[0], Dict: Dict{a[1], a[2]}}
- d.Text, err = c.text.ReadDotBytes()
- if err != nil {
- return nil, err
- }
- def[i] = d
- }
- _, _, err = c.text.ReadCodeLine(250)
- return def, err
-}
-
-// Fields returns the fields in s.
-// Fields are space separated unquoted words
-// or quoted with single or double quote.
-func fields(s string) ([]string, error) {
- var v []string
- i := 0
- for {
- for i < len(s) && (s[i] == ' ' || s[i] == '\t') {
- i++
- }
- if i >= len(s) {
- break
- }
- if s[i] == '"' || s[i] == '\'' {
- q := s[i]
- // quoted string
- var j int
- for j = i + 1; ; j++ {
- if j >= len(s) {
- return nil, textproto.ProtocolError("malformed quoted string")
- }
- if s[j] == '\\' {
- j++
- continue
- }
- if s[j] == q {
- j++
- break
- }
- }
- v = append(v, unquote(s[i+1:j-1]))
- i = j
- } else {
- // atom
- var j int
- for j = i; j < len(s); j++ {
- if s[j] == ' ' || s[j] == '\t' || s[j] == '\\' || s[j] == '"' || s[j] == '\'' {
- break
- }
- }
- v = append(v, s[i:j])
- i = j
- }
- if i < len(s) {
- c := s[i]
- if c != ' ' && c != '\t' {
- return nil, textproto.ProtocolError("quotes not on word boundaries")
- }
- }
- }
- return v, nil
-}
-
-func unquote(s string) string {
- if strings.Index(s, "\\") < 0 {
- return s
- }
- b := []byte(s)
- w := 0
- for r := 0; r < len(b); r++ {
- c := b[r]
- if c == '\\' {
- r++
- c = b[r]
- }
- b[w] = c
- w++
- }
- return string(b[0:w])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/example_test.go
deleted file mode 100644
index 5415c2d3a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/example_test.go
+++ /dev/null
@@ -1,132 +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 file.
-
-package dnsmessage_test
-
-import (
- "fmt"
- "net"
- "strings"
-
- "golang.org/x/net/dns/dnsmessage"
-)
-
-func mustNewName(name string) dnsmessage.Name {
- n, err := dnsmessage.NewName(name)
- if err != nil {
- panic(err)
- }
- return n
-}
-
-func ExampleParser() {
- msg := dnsmessage.Message{
- Header: dnsmessage.Header{Response: true, Authoritative: true},
- Questions: []dnsmessage.Question{
- {
- Name: mustNewName("foo.bar.example.com."),
- Type: dnsmessage.TypeA,
- Class: dnsmessage.ClassINET,
- },
- {
- Name: mustNewName("bar.example.com."),
- Type: dnsmessage.TypeA,
- Class: dnsmessage.ClassINET,
- },
- },
- Answers: []dnsmessage.Resource{
- {
- dnsmessage.ResourceHeader{
- Name: mustNewName("foo.bar.example.com."),
- Type: dnsmessage.TypeA,
- Class: dnsmessage.ClassINET,
- },
- &dnsmessage.AResource{[4]byte{127, 0, 0, 1}},
- },
- {
- dnsmessage.ResourceHeader{
- Name: mustNewName("bar.example.com."),
- Type: dnsmessage.TypeA,
- Class: dnsmessage.ClassINET,
- },
- &dnsmessage.AResource{[4]byte{127, 0, 0, 2}},
- },
- },
- }
-
- buf, err := msg.Pack()
- if err != nil {
- panic(err)
- }
-
- wantName := "bar.example.com."
-
- var p dnsmessage.Parser
- if _, err := p.Start(buf); err != nil {
- panic(err)
- }
-
- for {
- q, err := p.Question()
- if err == dnsmessage.ErrSectionDone {
- break
- }
- if err != nil {
- panic(err)
- }
-
- if q.Name.String() != wantName {
- continue
- }
-
- fmt.Println("Found question for name", wantName)
- if err := p.SkipAllQuestions(); err != nil {
- panic(err)
- }
- break
- }
-
- var gotIPs []net.IP
- for {
- h, err := p.AnswerHeader()
- if err == dnsmessage.ErrSectionDone {
- break
- }
- if err != nil {
- panic(err)
- }
-
- if (h.Type != dnsmessage.TypeA && h.Type != dnsmessage.TypeAAAA) || h.Class != dnsmessage.ClassINET {
- continue
- }
-
- if !strings.EqualFold(h.Name.String(), wantName) {
- if err := p.SkipAnswer(); err != nil {
- panic(err)
- }
- continue
- }
-
- switch h.Type {
- case dnsmessage.TypeA:
- r, err := p.AResource()
- if err != nil {
- panic(err)
- }
- gotIPs = append(gotIPs, r.A[:])
- case dnsmessage.TypeAAAA:
- r, err := p.AAAAResource()
- if err != nil {
- panic(err)
- }
- gotIPs = append(gotIPs, r.AAAA[:])
- }
- }
-
- fmt.Printf("Found A/AAAA records for name %s: %v\n", wantName, gotIPs)
-
- // Output:
- // Found question for name bar.example.com.
- // Found A/AAAA records for name bar.example.com.: [127.0.0.2]
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message.go
deleted file mode 100644
index c7244b782..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message.go
+++ /dev/null
@@ -1,2001 +0,0 @@
-// Copyright 2009 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 file.
-
-// Package dnsmessage provides a mostly RFC 1035 compliant implementation of
-// DNS message packing and unpacking.
-//
-// This implementation is designed to minimize heap allocations and avoid
-// unnecessary packing and unpacking as much as possible.
-package dnsmessage
-
-import (
- "errors"
-)
-
-// Packet formats
-
-// A Type is a type of DNS request and response.
-type Type uint16
-
-// A Class is a type of network.
-type Class uint16
-
-// An OpCode is a DNS operation code.
-type OpCode uint16
-
-// An RCode is a DNS response status code.
-type RCode uint16
-
-// Wire constants.
-const (
- // ResourceHeader.Type and Question.Type
- TypeA Type = 1
- TypeNS Type = 2
- TypeCNAME Type = 5
- TypeSOA Type = 6
- TypePTR Type = 12
- TypeMX Type = 15
- TypeTXT Type = 16
- TypeAAAA Type = 28
- TypeSRV Type = 33
-
- // Question.Type
- TypeWKS Type = 11
- TypeHINFO Type = 13
- TypeMINFO Type = 14
- TypeAXFR Type = 252
- TypeALL Type = 255
-
- // ResourceHeader.Class and Question.Class
- ClassINET Class = 1
- ClassCSNET Class = 2
- ClassCHAOS Class = 3
- ClassHESIOD Class = 4
-
- // Question.Class
- ClassANY Class = 255
-
- // Message.Rcode
- RCodeSuccess RCode = 0
- RCodeFormatError RCode = 1
- RCodeServerFailure RCode = 2
- RCodeNameError RCode = 3
- RCodeNotImplemented RCode = 4
- RCodeRefused RCode = 5
-)
-
-var (
- // ErrNotStarted indicates that the prerequisite information isn't
- // available yet because the previous records haven't been appropriately
- // parsed, skipped or finished.
- ErrNotStarted = errors.New("parsing/packing of this type isn't available yet")
-
- // ErrSectionDone indicated that all records in the section have been
- // parsed or finished.
- ErrSectionDone = errors.New("parsing/packing of this section has completed")
-
- errBaseLen = errors.New("insufficient data for base length type")
- errCalcLen = errors.New("insufficient data for calculated length type")
- errReserved = errors.New("segment prefix is reserved")
- errTooManyPtr = errors.New("too many pointers (>10)")
- errInvalidPtr = errors.New("invalid pointer")
- errNilResouceBody = errors.New("nil resource body")
- errResourceLen = errors.New("insufficient data for resource body length")
- errSegTooLong = errors.New("segment length too long")
- errZeroSegLen = errors.New("zero length segment")
- errResTooLong = errors.New("resource length too long")
- errTooManyQuestions = errors.New("too many Questions to pack (>65535)")
- errTooManyAnswers = errors.New("too many Answers to pack (>65535)")
- errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)")
- errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)")
- errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)")
-)
-
-// Internal constants.
-const (
- // packStartingCap is the default initial buffer size allocated during
- // packing.
- //
- // The starting capacity doesn't matter too much, but most DNS responses
- // Will be <= 512 bytes as it is the limit for DNS over UDP.
- packStartingCap = 512
-
- // uint16Len is the length (in bytes) of a uint16.
- uint16Len = 2
-
- // uint32Len is the length (in bytes) of a uint32.
- uint32Len = 4
-
- // headerLen is the length (in bytes) of a DNS header.
- //
- // A header is comprised of 6 uint16s and no padding.
- headerLen = 6 * uint16Len
-)
-
-type nestedError struct {
- // s is the current level's error message.
- s string
-
- // err is the nested error.
- err error
-}
-
-// nestedError implements error.Error.
-func (e *nestedError) Error() string {
- return e.s + ": " + e.err.Error()
-}
-
-// Header is a representation of a DNS message header.
-type Header struct {
- ID uint16
- Response bool
- OpCode OpCode
- Authoritative bool
- Truncated bool
- RecursionDesired bool
- RecursionAvailable bool
- RCode RCode
-}
-
-func (m *Header) pack() (id uint16, bits uint16) {
- id = m.ID
- bits = uint16(m.OpCode)<<11 | uint16(m.RCode)
- if m.RecursionAvailable {
- bits |= headerBitRA
- }
- if m.RecursionDesired {
- bits |= headerBitRD
- }
- if m.Truncated {
- bits |= headerBitTC
- }
- if m.Authoritative {
- bits |= headerBitAA
- }
- if m.Response {
- bits |= headerBitQR
- }
- return
-}
-
-// Message is a representation of a DNS message.
-type Message struct {
- Header
- Questions []Question
- Answers []Resource
- Authorities []Resource
- Additionals []Resource
-}
-
-type section uint8
-
-const (
- sectionNotStarted section = iota
- sectionHeader
- sectionQuestions
- sectionAnswers
- sectionAuthorities
- sectionAdditionals
- sectionDone
-
- headerBitQR = 1 << 15 // query/response (response=1)
- headerBitAA = 1 << 10 // authoritative
- headerBitTC = 1 << 9 // truncated
- headerBitRD = 1 << 8 // recursion desired
- headerBitRA = 1 << 7 // recursion available
-)
-
-var sectionNames = map[section]string{
- sectionHeader: "header",
- sectionQuestions: "Question",
- sectionAnswers: "Answer",
- sectionAuthorities: "Authority",
- sectionAdditionals: "Additional",
-}
-
-// header is the wire format for a DNS message header.
-type header struct {
- id uint16
- bits uint16
- questions uint16
- answers uint16
- authorities uint16
- additionals uint16
-}
-
-func (h *header) count(sec section) uint16 {
- switch sec {
- case sectionQuestions:
- return h.questions
- case sectionAnswers:
- return h.answers
- case sectionAuthorities:
- return h.authorities
- case sectionAdditionals:
- return h.additionals
- }
- return 0
-}
-
-func (h *header) pack(msg []byte) []byte {
- msg = packUint16(msg, h.id)
- msg = packUint16(msg, h.bits)
- msg = packUint16(msg, h.questions)
- msg = packUint16(msg, h.answers)
- msg = packUint16(msg, h.authorities)
- return packUint16(msg, h.additionals)
-}
-
-func (h *header) unpack(msg []byte, off int) (int, error) {
- newOff := off
- var err error
- if h.id, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"id", err}
- }
- if h.bits, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"bits", err}
- }
- if h.questions, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"questions", err}
- }
- if h.answers, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"answers", err}
- }
- if h.authorities, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"authorities", err}
- }
- if h.additionals, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"additionals", err}
- }
- return newOff, nil
-}
-
-func (h *header) header() Header {
- return Header{
- ID: h.id,
- Response: (h.bits & headerBitQR) != 0,
- OpCode: OpCode(h.bits>>11) & 0xF,
- Authoritative: (h.bits & headerBitAA) != 0,
- Truncated: (h.bits & headerBitTC) != 0,
- RecursionDesired: (h.bits & headerBitRD) != 0,
- RecursionAvailable: (h.bits & headerBitRA) != 0,
- RCode: RCode(h.bits & 0xF),
- }
-}
-
-// A Resource is a DNS resource record.
-type Resource struct {
- Header ResourceHeader
- Body ResourceBody
-}
-
-// A ResourceBody is a DNS resource record minus the header.
-type ResourceBody interface {
- // pack packs a Resource except for its header.
- pack(msg []byte, compression map[string]int) ([]byte, error)
-
- // realType returns the actual type of the Resource. This is used to
- // fill in the header Type field.
- realType() Type
-}
-
-func (r *Resource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- if r.Body == nil {
- return msg, errNilResouceBody
- }
- oldMsg := msg
- r.Header.Type = r.Body.realType()
- msg, length, err := r.Header.pack(msg, compression)
- if err != nil {
- return msg, &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- msg, err = r.Body.pack(msg, compression)
- if err != nil {
- return msg, &nestedError{"content", err}
- }
- if err := r.Header.fixLen(msg, length, preLen); err != nil {
- return oldMsg, err
- }
- return msg, nil
-}
-
-// A Parser allows incrementally parsing a DNS message.
-//
-// When parsing is started, the Header is parsed. Next, each Question can be
-// either parsed or skipped. Alternatively, all Questions can be skipped at
-// once. When all Questions have been parsed, attempting to parse Questions
-// will return (nil, nil) and attempting to skip Questions will return
-// (true, nil). After all Questions have been either parsed or skipped, all
-// Answers, Authorities and Additionals can be either parsed or skipped in the
-// same way, and each type of Resource must be fully parsed or skipped before
-// proceeding to the next type of Resource.
-//
-// Note that there is no requirement to fully skip or parse the message.
-type Parser struct {
- msg []byte
- header header
-
- section section
- off int
- index int
- resHeaderValid bool
- resHeader ResourceHeader
-}
-
-// Start parses the header and enables the parsing of Questions.
-func (p *Parser) Start(msg []byte) (Header, error) {
- if p.msg != nil {
- *p = Parser{}
- }
- p.msg = msg
- var err error
- if p.off, err = p.header.unpack(msg, 0); err != nil {
- return Header{}, &nestedError{"unpacking header", err}
- }
- p.section = sectionQuestions
- return p.header.header(), nil
-}
-
-func (p *Parser) checkAdvance(sec section) error {
- if p.section < sec {
- return ErrNotStarted
- }
- if p.section > sec {
- return ErrSectionDone
- }
- p.resHeaderValid = false
- if p.index == int(p.header.count(sec)) {
- p.index = 0
- p.section++
- return ErrSectionDone
- }
- return nil
-}
-
-func (p *Parser) resource(sec section) (Resource, error) {
- var r Resource
- var err error
- r.Header, err = p.resourceHeader(sec)
- if err != nil {
- return r, err
- }
- p.resHeaderValid = false
- r.Body, p.off, err = unpackResourceBody(p.msg, p.off, r.Header)
- if err != nil {
- return Resource{}, &nestedError{"unpacking " + sectionNames[sec], err}
- }
- p.index++
- return r, nil
-}
-
-func (p *Parser) resourceHeader(sec section) (ResourceHeader, error) {
- if p.resHeaderValid {
- return p.resHeader, nil
- }
- if err := p.checkAdvance(sec); err != nil {
- return ResourceHeader{}, err
- }
- var hdr ResourceHeader
- off, err := hdr.unpack(p.msg, p.off)
- if err != nil {
- return ResourceHeader{}, err
- }
- p.resHeaderValid = true
- p.resHeader = hdr
- p.off = off
- return hdr, nil
-}
-
-func (p *Parser) skipResource(sec section) error {
- if p.resHeaderValid {
- newOff := p.off + int(p.resHeader.Length)
- if newOff > len(p.msg) {
- return errResourceLen
- }
- p.off = newOff
- p.resHeaderValid = false
- p.index++
- return nil
- }
- if err := p.checkAdvance(sec); err != nil {
- return err
- }
- var err error
- p.off, err = skipResource(p.msg, p.off)
- if err != nil {
- return &nestedError{"skipping: " + sectionNames[sec], err}
- }
- p.index++
- return nil
-}
-
-// Question parses a single Question.
-func (p *Parser) Question() (Question, error) {
- if err := p.checkAdvance(sectionQuestions); err != nil {
- return Question{}, err
- }
- var name Name
- off, err := name.unpack(p.msg, p.off)
- if err != nil {
- return Question{}, &nestedError{"unpacking Question.Name", err}
- }
- typ, off, err := unpackType(p.msg, off)
- if err != nil {
- return Question{}, &nestedError{"unpacking Question.Type", err}
- }
- class, off, err := unpackClass(p.msg, off)
- if err != nil {
- return Question{}, &nestedError{"unpacking Question.Class", err}
- }
- p.off = off
- p.index++
- return Question{name, typ, class}, nil
-}
-
-// AllQuestions parses all Questions.
-func (p *Parser) AllQuestions() ([]Question, error) {
- qs := make([]Question, 0, p.header.questions)
- for {
- q, err := p.Question()
- if err == ErrSectionDone {
- return qs, nil
- }
- if err != nil {
- return nil, err
- }
- qs = append(qs, q)
- }
-}
-
-// SkipQuestion skips a single Question.
-func (p *Parser) SkipQuestion() error {
- if err := p.checkAdvance(sectionQuestions); err != nil {
- return err
- }
- off, err := skipName(p.msg, p.off)
- if err != nil {
- return &nestedError{"skipping Question Name", err}
- }
- if off, err = skipType(p.msg, off); err != nil {
- return &nestedError{"skipping Question Type", err}
- }
- if off, err = skipClass(p.msg, off); err != nil {
- return &nestedError{"skipping Question Class", err}
- }
- p.off = off
- p.index++
- return nil
-}
-
-// SkipAllQuestions skips all Questions.
-func (p *Parser) SkipAllQuestions() error {
- for {
- if err := p.SkipQuestion(); err == ErrSectionDone {
- return nil
- } else if err != nil {
- return err
- }
- }
-}
-
-// AnswerHeader parses a single Answer ResourceHeader.
-func (p *Parser) AnswerHeader() (ResourceHeader, error) {
- return p.resourceHeader(sectionAnswers)
-}
-
-// Answer parses a single Answer Resource.
-func (p *Parser) Answer() (Resource, error) {
- return p.resource(sectionAnswers)
-}
-
-// AllAnswers parses all Answer Resources.
-func (p *Parser) AllAnswers() ([]Resource, error) {
- as := make([]Resource, 0, p.header.answers)
- for {
- a, err := p.Answer()
- if err == ErrSectionDone {
- return as, nil
- }
- if err != nil {
- return nil, err
- }
- as = append(as, a)
- }
-}
-
-// SkipAnswer skips a single Answer Resource.
-func (p *Parser) SkipAnswer() error {
- return p.skipResource(sectionAnswers)
-}
-
-// SkipAllAnswers skips all Answer Resources.
-func (p *Parser) SkipAllAnswers() error {
- for {
- if err := p.SkipAnswer(); err == ErrSectionDone {
- return nil
- } else if err != nil {
- return err
- }
- }
-}
-
-// AuthorityHeader parses a single Authority ResourceHeader.
-func (p *Parser) AuthorityHeader() (ResourceHeader, error) {
- return p.resourceHeader(sectionAuthorities)
-}
-
-// Authority parses a single Authority Resource.
-func (p *Parser) Authority() (Resource, error) {
- return p.resource(sectionAuthorities)
-}
-
-// AllAuthorities parses all Authority Resources.
-func (p *Parser) AllAuthorities() ([]Resource, error) {
- as := make([]Resource, 0, p.header.authorities)
- for {
- a, err := p.Authority()
- if err == ErrSectionDone {
- return as, nil
- }
- if err != nil {
- return nil, err
- }
- as = append(as, a)
- }
-}
-
-// SkipAuthority skips a single Authority Resource.
-func (p *Parser) SkipAuthority() error {
- return p.skipResource(sectionAuthorities)
-}
-
-// SkipAllAuthorities skips all Authority Resources.
-func (p *Parser) SkipAllAuthorities() error {
- for {
- if err := p.SkipAuthority(); err == ErrSectionDone {
- return nil
- } else if err != nil {
- return err
- }
- }
-}
-
-// AdditionalHeader parses a single Additional ResourceHeader.
-func (p *Parser) AdditionalHeader() (ResourceHeader, error) {
- return p.resourceHeader(sectionAdditionals)
-}
-
-// Additional parses a single Additional Resource.
-func (p *Parser) Additional() (Resource, error) {
- return p.resource(sectionAdditionals)
-}
-
-// AllAdditionals parses all Additional Resources.
-func (p *Parser) AllAdditionals() ([]Resource, error) {
- as := make([]Resource, 0, p.header.additionals)
- for {
- a, err := p.Additional()
- if err == ErrSectionDone {
- return as, nil
- }
- if err != nil {
- return nil, err
- }
- as = append(as, a)
- }
-}
-
-// SkipAdditional skips a single Additional Resource.
-func (p *Parser) SkipAdditional() error {
- return p.skipResource(sectionAdditionals)
-}
-
-// SkipAllAdditionals skips all Additional Resources.
-func (p *Parser) SkipAllAdditionals() error {
- for {
- if err := p.SkipAdditional(); err == ErrSectionDone {
- return nil
- } else if err != nil {
- return err
- }
- }
-}
-
-// CNAMEResource parses a single CNAMEResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) CNAMEResource() (CNAMEResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeCNAME {
- return CNAMEResource{}, ErrNotStarted
- }
- r, err := unpackCNAMEResource(p.msg, p.off)
- if err != nil {
- return CNAMEResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// MXResource parses a single MXResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) MXResource() (MXResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeMX {
- return MXResource{}, ErrNotStarted
- }
- r, err := unpackMXResource(p.msg, p.off)
- if err != nil {
- return MXResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// NSResource parses a single NSResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) NSResource() (NSResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeNS {
- return NSResource{}, ErrNotStarted
- }
- r, err := unpackNSResource(p.msg, p.off)
- if err != nil {
- return NSResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// PTRResource parses a single PTRResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) PTRResource() (PTRResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypePTR {
- return PTRResource{}, ErrNotStarted
- }
- r, err := unpackPTRResource(p.msg, p.off)
- if err != nil {
- return PTRResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// SOAResource parses a single SOAResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) SOAResource() (SOAResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeSOA {
- return SOAResource{}, ErrNotStarted
- }
- r, err := unpackSOAResource(p.msg, p.off)
- if err != nil {
- return SOAResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// TXTResource parses a single TXTResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) TXTResource() (TXTResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeTXT {
- return TXTResource{}, ErrNotStarted
- }
- r, err := unpackTXTResource(p.msg, p.off, p.resHeader.Length)
- if err != nil {
- return TXTResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// SRVResource parses a single SRVResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) SRVResource() (SRVResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeSRV {
- return SRVResource{}, ErrNotStarted
- }
- r, err := unpackSRVResource(p.msg, p.off)
- if err != nil {
- return SRVResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// AResource parses a single AResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) AResource() (AResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeA {
- return AResource{}, ErrNotStarted
- }
- r, err := unpackAResource(p.msg, p.off)
- if err != nil {
- return AResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// AAAAResource parses a single AAAAResource.
-//
-// One of the XXXHeader methods must have been called before calling this
-// method.
-func (p *Parser) AAAAResource() (AAAAResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeAAAA {
- return AAAAResource{}, ErrNotStarted
- }
- r, err := unpackAAAAResource(p.msg, p.off)
- if err != nil {
- return AAAAResource{}, err
- }
- p.off += int(p.resHeader.Length)
- p.resHeaderValid = false
- p.index++
- return r, nil
-}
-
-// Unpack parses a full Message.
-func (m *Message) Unpack(msg []byte) error {
- var p Parser
- var err error
- if m.Header, err = p.Start(msg); err != nil {
- return err
- }
- if m.Questions, err = p.AllQuestions(); err != nil {
- return err
- }
- if m.Answers, err = p.AllAnswers(); err != nil {
- return err
- }
- if m.Authorities, err = p.AllAuthorities(); err != nil {
- return err
- }
- if m.Additionals, err = p.AllAdditionals(); err != nil {
- return err
- }
- return nil
-}
-
-// Pack packs a full Message.
-func (m *Message) Pack() ([]byte, error) {
- return m.AppendPack(make([]byte, 0, packStartingCap))
-}
-
-// AppendPack is like Pack but appends the full Message to b and returns the
-// extended buffer.
-func (m *Message) AppendPack(b []byte) ([]byte, error) {
- // Validate the lengths. It is very unlikely that anyone will try to
- // pack more than 65535 of any particular type, but it is possible and
- // we should fail gracefully.
- if len(m.Questions) > int(^uint16(0)) {
- return nil, errTooManyQuestions
- }
- if len(m.Answers) > int(^uint16(0)) {
- return nil, errTooManyAnswers
- }
- if len(m.Authorities) > int(^uint16(0)) {
- return nil, errTooManyAuthorities
- }
- if len(m.Additionals) > int(^uint16(0)) {
- return nil, errTooManyAdditionals
- }
-
- var h header
- h.id, h.bits = m.Header.pack()
-
- h.questions = uint16(len(m.Questions))
- h.answers = uint16(len(m.Answers))
- h.authorities = uint16(len(m.Authorities))
- h.additionals = uint16(len(m.Additionals))
-
- msg := h.pack(b)
-
- // RFC 1035 allows (but does not require) compression for packing. RFC
- // 1035 requires unpacking implementations to support compression, so
- // unconditionally enabling it is fine.
- //
- // DNS lookups are typically done over UDP, and RFC 1035 states that UDP
- // DNS packets can be a maximum of 512 bytes long. Without compression,
- // many DNS response packets are over this limit, so enabling
- // compression will help ensure compliance.
- compression := map[string]int{}
-
- for i := range m.Questions {
- var err error
- if msg, err = m.Questions[i].pack(msg, compression); err != nil {
- return nil, &nestedError{"packing Question", err}
- }
- }
- for i := range m.Answers {
- var err error
- if msg, err = m.Answers[i].pack(msg, compression); err != nil {
- return nil, &nestedError{"packing Answer", err}
- }
- }
- for i := range m.Authorities {
- var err error
- if msg, err = m.Authorities[i].pack(msg, compression); err != nil {
- return nil, &nestedError{"packing Authority", err}
- }
- }
- for i := range m.Additionals {
- var err error
- if msg, err = m.Additionals[i].pack(msg, compression); err != nil {
- return nil, &nestedError{"packing Additional", err}
- }
- }
-
- return msg, nil
-}
-
-// A Builder allows incrementally packing a DNS message.
-type Builder struct {
- msg []byte
- header header
- section section
- compression map[string]int
-}
-
-// Start initializes the builder.
-//
-// buf is optional (nil is fine), but if provided, Start takes ownership of buf.
-func (b *Builder) Start(buf []byte, h Header) {
- b.StartWithoutCompression(buf, h)
- b.compression = map[string]int{}
-}
-
-// StartWithoutCompression initializes the builder with compression disabled.
-//
-// This avoids compression related allocations, but can result in larger message
-// sizes. Be careful with this mode as it can cause messages to exceed the UDP
-// size limit.
-//
-// buf is optional (nil is fine), but if provided, Start takes ownership of buf.
-func (b *Builder) StartWithoutCompression(buf []byte, h Header) {
- *b = Builder{msg: buf}
- b.header.id, b.header.bits = h.pack()
- if cap(b.msg) < headerLen {
- b.msg = make([]byte, 0, packStartingCap)
- }
- b.msg = b.msg[:headerLen]
- b.section = sectionHeader
-}
-
-func (b *Builder) startCheck(s section) error {
- if b.section <= sectionNotStarted {
- return ErrNotStarted
- }
- if b.section > s {
- return ErrSectionDone
- }
- return nil
-}
-
-// StartQuestions prepares the builder for packing Questions.
-func (b *Builder) StartQuestions() error {
- if err := b.startCheck(sectionQuestions); err != nil {
- return err
- }
- b.section = sectionQuestions
- return nil
-}
-
-// StartAnswers prepares the builder for packing Answers.
-func (b *Builder) StartAnswers() error {
- if err := b.startCheck(sectionAnswers); err != nil {
- return err
- }
- b.section = sectionAnswers
- return nil
-}
-
-// StartAuthorities prepares the builder for packing Authorities.
-func (b *Builder) StartAuthorities() error {
- if err := b.startCheck(sectionAuthorities); err != nil {
- return err
- }
- b.section = sectionAuthorities
- return nil
-}
-
-// StartAdditionals prepares the builder for packing Additionals.
-func (b *Builder) StartAdditionals() error {
- if err := b.startCheck(sectionAdditionals); err != nil {
- return err
- }
- b.section = sectionAdditionals
- return nil
-}
-
-func (b *Builder) incrementSectionCount() error {
- var count *uint16
- var err error
- switch b.section {
- case sectionQuestions:
- count = &b.header.questions
- err = errTooManyQuestions
- case sectionAnswers:
- count = &b.header.answers
- err = errTooManyAnswers
- case sectionAuthorities:
- count = &b.header.authorities
- err = errTooManyAuthorities
- case sectionAdditionals:
- count = &b.header.additionals
- err = errTooManyAdditionals
- }
- if *count == ^uint16(0) {
- return err
- }
- *count++
- return nil
-}
-
-// Question adds a single Question.
-func (b *Builder) Question(q Question) error {
- if b.section < sectionQuestions {
- return ErrNotStarted
- }
- if b.section > sectionQuestions {
- return ErrSectionDone
- }
- msg, err := q.pack(b.msg, b.compression)
- if err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-func (b *Builder) checkResourceSection() error {
- if b.section < sectionAnswers {
- return ErrNotStarted
- }
- if b.section > sectionAdditionals {
- return ErrSectionDone
- }
- return nil
-}
-
-// CNAMEResource adds a single CNAMEResource.
-func (b *Builder) CNAMEResource(h ResourceHeader, r CNAMEResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"CNAMEResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// MXResource adds a single MXResource.
-func (b *Builder) MXResource(h ResourceHeader, r MXResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"MXResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// NSResource adds a single NSResource.
-func (b *Builder) NSResource(h ResourceHeader, r NSResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"NSResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// PTRResource adds a single PTRResource.
-func (b *Builder) PTRResource(h ResourceHeader, r PTRResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"PTRResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// SOAResource adds a single SOAResource.
-func (b *Builder) SOAResource(h ResourceHeader, r SOAResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"SOAResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// TXTResource adds a single TXTResource.
-func (b *Builder) TXTResource(h ResourceHeader, r TXTResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"TXTResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// SRVResource adds a single SRVResource.
-func (b *Builder) SRVResource(h ResourceHeader, r SRVResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"SRVResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// AResource adds a single AResource.
-func (b *Builder) AResource(h ResourceHeader, r AResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"AResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// AAAAResource adds a single AAAAResource.
-func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error {
- if err := b.checkResourceSection(); err != nil {
- return err
- }
- h.Type = r.realType()
- msg, length, err := h.pack(b.msg, b.compression)
- if err != nil {
- return &nestedError{"ResourceHeader", err}
- }
- preLen := len(msg)
- if msg, err = r.pack(msg, b.compression); err != nil {
- return &nestedError{"AAAAResource body", err}
- }
- if err := h.fixLen(msg, length, preLen); err != nil {
- return err
- }
- if err := b.incrementSectionCount(); err != nil {
- return err
- }
- b.msg = msg
- return nil
-}
-
-// Finish ends message building and generates a binary packet.
-func (b *Builder) Finish() ([]byte, error) {
- if b.section < sectionHeader {
- return nil, ErrNotStarted
- }
- b.section = sectionDone
- b.header.pack(b.msg[:0])
- return b.msg, nil
-}
-
-// A ResourceHeader is the header of a DNS resource record. There are
-// many types of DNS resource records, but they all share the same header.
-type ResourceHeader struct {
- // Name is the domain name for which this resource record pertains.
- Name Name
-
- // Type is the type of DNS resource record.
- //
- // This field will be set automatically during packing.
- Type Type
-
- // Class is the class of network to which this DNS resource record
- // pertains.
- Class Class
-
- // TTL is the length of time (measured in seconds) which this resource
- // record is valid for (time to live). All Resources in a set should
- // have the same TTL (RFC 2181 Section 5.2).
- TTL uint32
-
- // Length is the length of data in the resource record after the header.
- //
- // This field will be set automatically during packing.
- Length uint16
-}
-
-// pack packs all of the fields in a ResourceHeader except for the length. The
-// length bytes are returned as a slice so they can be filled in after the rest
-// of the Resource has been packed.
-func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int) (msg []byte, length []byte, err error) {
- msg = oldMsg
- if msg, err = h.Name.pack(msg, compression); err != nil {
- return oldMsg, nil, &nestedError{"Name", err}
- }
- msg = packType(msg, h.Type)
- msg = packClass(msg, h.Class)
- msg = packUint32(msg, h.TTL)
- lenBegin := len(msg)
- msg = packUint16(msg, h.Length)
- return msg, msg[lenBegin : lenBegin+uint16Len], nil
-}
-
-func (h *ResourceHeader) unpack(msg []byte, off int) (int, error) {
- newOff := off
- var err error
- if newOff, err = h.Name.unpack(msg, newOff); err != nil {
- return off, &nestedError{"Name", err}
- }
- if h.Type, newOff, err = unpackType(msg, newOff); err != nil {
- return off, &nestedError{"Type", err}
- }
- if h.Class, newOff, err = unpackClass(msg, newOff); err != nil {
- return off, &nestedError{"Class", err}
- }
- if h.TTL, newOff, err = unpackUint32(msg, newOff); err != nil {
- return off, &nestedError{"TTL", err}
- }
- if h.Length, newOff, err = unpackUint16(msg, newOff); err != nil {
- return off, &nestedError{"Length", err}
- }
- return newOff, nil
-}
-
-func (h *ResourceHeader) fixLen(msg []byte, length []byte, preLen int) error {
- conLen := len(msg) - preLen
- if conLen > int(^uint16(0)) {
- return errResTooLong
- }
-
- // Fill in the length now that we know how long the content is.
- packUint16(length[:0], uint16(conLen))
- h.Length = uint16(conLen)
-
- return nil
-}
-
-func skipResource(msg []byte, off int) (int, error) {
- newOff, err := skipName(msg, off)
- if err != nil {
- return off, &nestedError{"Name", err}
- }
- if newOff, err = skipType(msg, newOff); err != nil {
- return off, &nestedError{"Type", err}
- }
- if newOff, err = skipClass(msg, newOff); err != nil {
- return off, &nestedError{"Class", err}
- }
- if newOff, err = skipUint32(msg, newOff); err != nil {
- return off, &nestedError{"TTL", err}
- }
- length, newOff, err := unpackUint16(msg, newOff)
- if err != nil {
- return off, &nestedError{"Length", err}
- }
- if newOff += int(length); newOff > len(msg) {
- return off, errResourceLen
- }
- return newOff, nil
-}
-
-func packUint16(msg []byte, field uint16) []byte {
- return append(msg, byte(field>>8), byte(field))
-}
-
-func unpackUint16(msg []byte, off int) (uint16, int, error) {
- if off+uint16Len > len(msg) {
- return 0, off, errBaseLen
- }
- return uint16(msg[off])<<8 | uint16(msg[off+1]), off + uint16Len, nil
-}
-
-func skipUint16(msg []byte, off int) (int, error) {
- if off+uint16Len > len(msg) {
- return off, errBaseLen
- }
- return off + uint16Len, nil
-}
-
-func packType(msg []byte, field Type) []byte {
- return packUint16(msg, uint16(field))
-}
-
-func unpackType(msg []byte, off int) (Type, int, error) {
- t, o, err := unpackUint16(msg, off)
- return Type(t), o, err
-}
-
-func skipType(msg []byte, off int) (int, error) {
- return skipUint16(msg, off)
-}
-
-func packClass(msg []byte, field Class) []byte {
- return packUint16(msg, uint16(field))
-}
-
-func unpackClass(msg []byte, off int) (Class, int, error) {
- c, o, err := unpackUint16(msg, off)
- return Class(c), o, err
-}
-
-func skipClass(msg []byte, off int) (int, error) {
- return skipUint16(msg, off)
-}
-
-func packUint32(msg []byte, field uint32) []byte {
- return append(
- msg,
- byte(field>>24),
- byte(field>>16),
- byte(field>>8),
- byte(field),
- )
-}
-
-func unpackUint32(msg []byte, off int) (uint32, int, error) {
- if off+uint32Len > len(msg) {
- return 0, off, errBaseLen
- }
- v := uint32(msg[off])<<24 | uint32(msg[off+1])<<16 | uint32(msg[off+2])<<8 | uint32(msg[off+3])
- return v, off + uint32Len, nil
-}
-
-func skipUint32(msg []byte, off int) (int, error) {
- if off+uint32Len > len(msg) {
- return off, errBaseLen
- }
- return off + uint32Len, nil
-}
-
-func packText(msg []byte, field string) []byte {
- for len(field) > 0 {
- l := len(field)
- if l > 255 {
- l = 255
- }
- msg = append(msg, byte(l))
- msg = append(msg, field[:l]...)
- field = field[l:]
- }
- return msg
-}
-
-func unpackText(msg []byte, off int) (string, int, error) {
- if off >= len(msg) {
- return "", off, errBaseLen
- }
- beginOff := off + 1
- endOff := beginOff + int(msg[off])
- if endOff > len(msg) {
- return "", off, errCalcLen
- }
- return string(msg[beginOff:endOff]), endOff, nil
-}
-
-func skipText(msg []byte, off int) (int, error) {
- if off >= len(msg) {
- return off, errBaseLen
- }
- endOff := off + 1 + int(msg[off])
- if endOff > len(msg) {
- return off, errCalcLen
- }
- return endOff, nil
-}
-
-func packBytes(msg []byte, field []byte) []byte {
- return append(msg, field...)
-}
-
-func unpackBytes(msg []byte, off int, field []byte) (int, error) {
- newOff := off + len(field)
- if newOff > len(msg) {
- return off, errBaseLen
- }
- copy(field, msg[off:newOff])
- return newOff, nil
-}
-
-func skipBytes(msg []byte, off int, field []byte) (int, error) {
- newOff := off + len(field)
- if newOff > len(msg) {
- return off, errBaseLen
- }
- return newOff, nil
-}
-
-const nameLen = 255
-
-// A Name is a non-encoded domain name. It is used instead of strings to avoid
-// allocations.
-type Name struct {
- Data [nameLen]byte
- Length uint8
-}
-
-// NewName creates a new Name from a string.
-func NewName(name string) (Name, error) {
- if len([]byte(name)) > nameLen {
- return Name{}, errCalcLen
- }
- n := Name{Length: uint8(len(name))}
- copy(n.Data[:], []byte(name))
- return n, nil
-}
-
-func (n Name) String() string {
- return string(n.Data[:n.Length])
-}
-
-// pack packs a domain name.
-//
-// Domain names are a sequence of counted strings split at the dots. They end
-// with a zero-length string. Compression can be used to reuse domain suffixes.
-//
-// The compression map will be updated with new domain suffixes. If compression
-// is nil, compression will not be used.
-func (n *Name) pack(msg []byte, compression map[string]int) ([]byte, error) {
- oldMsg := msg
-
- // Add a trailing dot to canonicalize name.
- if n.Length == 0 || n.Data[n.Length-1] != '.' {
- return oldMsg, errNonCanonicalName
- }
-
- // Allow root domain.
- if n.Data[0] == '.' && n.Length == 1 {
- return append(msg, 0), nil
- }
-
- // Emit sequence of counted strings, chopping at dots.
- for i, begin := 0, 0; i < int(n.Length); i++ {
- // Check for the end of the segment.
- if n.Data[i] == '.' {
- // The two most significant bits have special meaning.
- // It isn't allowed for segments to be long enough to
- // need them.
- if i-begin >= 1<<6 {
- return oldMsg, errSegTooLong
- }
-
- // Segments must have a non-zero length.
- if i-begin == 0 {
- return oldMsg, errZeroSegLen
- }
-
- msg = append(msg, byte(i-begin))
-
- for j := begin; j < i; j++ {
- msg = append(msg, n.Data[j])
- }
-
- begin = i + 1
- continue
- }
-
- // We can only compress domain suffixes starting with a new
- // segment. A pointer is two bytes with the two most significant
- // bits set to 1 to indicate that it is a pointer.
- if (i == 0 || n.Data[i-1] == '.') && compression != nil {
- if ptr, ok := compression[string(n.Data[i:])]; ok {
- // Hit. Emit a pointer instead of the rest of
- // the domain.
- return append(msg, byte(ptr>>8|0xC0), byte(ptr)), nil
- }
-
- // Miss. Add the suffix to the compression table if the
- // offset can be stored in the available 14 bytes.
- if len(msg) <= int(^uint16(0)>>2) {
- compression[string(n.Data[i:])] = len(msg)
- }
- }
- }
- return append(msg, 0), nil
-}
-
-// unpack unpacks a domain name.
-func (n *Name) unpack(msg []byte, off int) (int, error) {
- // currOff is the current working offset.
- currOff := off
-
- // newOff is the offset where the next record will start. Pointers lead
- // to data that belongs to other names and thus doesn't count towards to
- // the usage of this name.
- newOff := off
-
- // ptr is the number of pointers followed.
- var ptr int
-
- // Name is a slice representation of the name data.
- name := n.Data[:0]
-
-Loop:
- for {
- if currOff >= len(msg) {
- return off, errBaseLen
- }
- c := int(msg[currOff])
- currOff++
- switch c & 0xC0 {
- case 0x00: // String segment
- if c == 0x00 {
- // A zero length signals the end of the name.
- break Loop
- }
- endOff := currOff + c
- if endOff > len(msg) {
- return off, errCalcLen
- }
- name = append(name, msg[currOff:endOff]...)
- name = append(name, '.')
- currOff = endOff
- case 0xC0: // Pointer
- if currOff >= len(msg) {
- return off, errInvalidPtr
- }
- c1 := msg[currOff]
- currOff++
- if ptr == 0 {
- newOff = currOff
- }
- // Don't follow too many pointers, maybe there's a loop.
- if ptr++; ptr > 10 {
- return off, errTooManyPtr
- }
- currOff = (c^0xC0)<<8 | int(c1)
- default:
- // Prefixes 0x80 and 0x40 are reserved.
- return off, errReserved
- }
- }
- if len(name) == 0 {
- name = append(name, '.')
- }
- if len(name) > len(n.Data) {
- return off, errCalcLen
- }
- n.Length = uint8(len(name))
- if ptr == 0 {
- newOff = currOff
- }
- return newOff, nil
-}
-
-func skipName(msg []byte, off int) (int, error) {
- // newOff is the offset where the next record will start. Pointers lead
- // to data that belongs to other names and thus doesn't count towards to
- // the usage of this name.
- newOff := off
-
-Loop:
- for {
- if newOff >= len(msg) {
- return off, errBaseLen
- }
- c := int(msg[newOff])
- newOff++
- switch c & 0xC0 {
- case 0x00:
- if c == 0x00 {
- // A zero length signals the end of the name.
- break Loop
- }
- // literal string
- newOff += c
- if newOff > len(msg) {
- return off, errCalcLen
- }
- case 0xC0:
- // Pointer to somewhere else in msg.
-
- // Pointers are two bytes.
- newOff++
-
- // Don't follow the pointer as the data here has ended.
- break Loop
- default:
- // Prefixes 0x80 and 0x40 are reserved.
- return off, errReserved
- }
- }
-
- return newOff, nil
-}
-
-// A Question is a DNS query.
-type Question struct {
- Name Name
- Type Type
- Class Class
-}
-
-func (q *Question) pack(msg []byte, compression map[string]int) ([]byte, error) {
- msg, err := q.Name.pack(msg, compression)
- if err != nil {
- return msg, &nestedError{"Name", err}
- }
- msg = packType(msg, q.Type)
- return packClass(msg, q.Class), nil
-}
-
-func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody, int, error) {
- var (
- r ResourceBody
- err error
- name string
- )
- switch hdr.Type {
- case TypeA:
- var rb AResource
- rb, err = unpackAResource(msg, off)
- r = &rb
- name = "A"
- case TypeNS:
- var rb NSResource
- rb, err = unpackNSResource(msg, off)
- r = &rb
- name = "NS"
- case TypeCNAME:
- var rb CNAMEResource
- rb, err = unpackCNAMEResource(msg, off)
- r = &rb
- name = "CNAME"
- case TypeSOA:
- var rb SOAResource
- rb, err = unpackSOAResource(msg, off)
- r = &rb
- name = "SOA"
- case TypePTR:
- var rb PTRResource
- rb, err = unpackPTRResource(msg, off)
- r = &rb
- name = "PTR"
- case TypeMX:
- var rb MXResource
- rb, err = unpackMXResource(msg, off)
- r = &rb
- name = "MX"
- case TypeTXT:
- var rb TXTResource
- rb, err = unpackTXTResource(msg, off, hdr.Length)
- r = &rb
- name = "TXT"
- case TypeAAAA:
- var rb AAAAResource
- rb, err = unpackAAAAResource(msg, off)
- r = &rb
- name = "AAAA"
- case TypeSRV:
- var rb SRVResource
- rb, err = unpackSRVResource(msg, off)
- r = &rb
- name = "SRV"
- }
- if err != nil {
- return nil, off, &nestedError{name + " record", err}
- }
- if r == nil {
- return nil, off, errors.New("invalid resource type: " + string(hdr.Type+'0'))
- }
- return r, off + int(hdr.Length), nil
-}
-
-// A CNAMEResource is a CNAME Resource record.
-type CNAMEResource struct {
- CNAME Name
-}
-
-func (r *CNAMEResource) realType() Type {
- return TypeCNAME
-}
-
-func (r *CNAMEResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return r.CNAME.pack(msg, compression)
-}
-
-func unpackCNAMEResource(msg []byte, off int) (CNAMEResource, error) {
- var cname Name
- if _, err := cname.unpack(msg, off); err != nil {
- return CNAMEResource{}, err
- }
- return CNAMEResource{cname}, nil
-}
-
-// An MXResource is an MX Resource record.
-type MXResource struct {
- Pref uint16
- MX Name
-}
-
-func (r *MXResource) realType() Type {
- return TypeMX
-}
-
-func (r *MXResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- oldMsg := msg
- msg = packUint16(msg, r.Pref)
- msg, err := r.MX.pack(msg, compression)
- if err != nil {
- return oldMsg, &nestedError{"MXResource.MX", err}
- }
- return msg, nil
-}
-
-func unpackMXResource(msg []byte, off int) (MXResource, error) {
- pref, off, err := unpackUint16(msg, off)
- if err != nil {
- return MXResource{}, &nestedError{"Pref", err}
- }
- var mx Name
- if _, err := mx.unpack(msg, off); err != nil {
- return MXResource{}, &nestedError{"MX", err}
- }
- return MXResource{pref, mx}, nil
-}
-
-// An NSResource is an NS Resource record.
-type NSResource struct {
- NS Name
-}
-
-func (r *NSResource) realType() Type {
- return TypeNS
-}
-
-func (r *NSResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return r.NS.pack(msg, compression)
-}
-
-func unpackNSResource(msg []byte, off int) (NSResource, error) {
- var ns Name
- if _, err := ns.unpack(msg, off); err != nil {
- return NSResource{}, err
- }
- return NSResource{ns}, nil
-}
-
-// A PTRResource is a PTR Resource record.
-type PTRResource struct {
- PTR Name
-}
-
-func (r *PTRResource) realType() Type {
- return TypePTR
-}
-
-func (r *PTRResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return r.PTR.pack(msg, compression)
-}
-
-func unpackPTRResource(msg []byte, off int) (PTRResource, error) {
- var ptr Name
- if _, err := ptr.unpack(msg, off); err != nil {
- return PTRResource{}, err
- }
- return PTRResource{ptr}, nil
-}
-
-// An SOAResource is an SOA Resource record.
-type SOAResource struct {
- NS Name
- MBox Name
- Serial uint32
- Refresh uint32
- Retry uint32
- Expire uint32
-
- // MinTTL the is the default TTL of Resources records which did not
- // contain a TTL value and the TTL of negative responses. (RFC 2308
- // Section 4)
- MinTTL uint32
-}
-
-func (r *SOAResource) realType() Type {
- return TypeSOA
-}
-
-func (r *SOAResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- oldMsg := msg
- msg, err := r.NS.pack(msg, compression)
- if err != nil {
- return oldMsg, &nestedError{"SOAResource.NS", err}
- }
- msg, err = r.MBox.pack(msg, compression)
- if err != nil {
- return oldMsg, &nestedError{"SOAResource.MBox", err}
- }
- msg = packUint32(msg, r.Serial)
- msg = packUint32(msg, r.Refresh)
- msg = packUint32(msg, r.Retry)
- msg = packUint32(msg, r.Expire)
- return packUint32(msg, r.MinTTL), nil
-}
-
-func unpackSOAResource(msg []byte, off int) (SOAResource, error) {
- var ns Name
- off, err := ns.unpack(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"NS", err}
- }
- var mbox Name
- if off, err = mbox.unpack(msg, off); err != nil {
- return SOAResource{}, &nestedError{"MBox", err}
- }
- serial, off, err := unpackUint32(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"Serial", err}
- }
- refresh, off, err := unpackUint32(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"Refresh", err}
- }
- retry, off, err := unpackUint32(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"Retry", err}
- }
- expire, off, err := unpackUint32(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"Expire", err}
- }
- minTTL, _, err := unpackUint32(msg, off)
- if err != nil {
- return SOAResource{}, &nestedError{"MinTTL", err}
- }
- return SOAResource{ns, mbox, serial, refresh, retry, expire, minTTL}, nil
-}
-
-// A TXTResource is a TXT Resource record.
-type TXTResource struct {
- Txt string // Not a domain name.
-}
-
-func (r *TXTResource) realType() Type {
- return TypeTXT
-}
-
-func (r *TXTResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packText(msg, r.Txt), nil
-}
-
-func unpackTXTResource(msg []byte, off int, length uint16) (TXTResource, error) {
- var txt string
- for n := uint16(0); n < length; {
- var t string
- var err error
- if t, off, err = unpackText(msg, off); err != nil {
- return TXTResource{}, &nestedError{"text", err}
- }
- // Check if we got too many bytes.
- if length-n < uint16(len(t))+1 {
- return TXTResource{}, errCalcLen
- }
- n += uint16(len(t)) + 1
- txt += t
- }
- return TXTResource{txt}, nil
-}
-
-// An SRVResource is an SRV Resource record.
-type SRVResource struct {
- Priority uint16
- Weight uint16
- Port uint16
- Target Name // Not compressed as per RFC 2782.
-}
-
-func (r *SRVResource) realType() Type {
- return TypeSRV
-}
-
-func (r *SRVResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- oldMsg := msg
- msg = packUint16(msg, r.Priority)
- msg = packUint16(msg, r.Weight)
- msg = packUint16(msg, r.Port)
- msg, err := r.Target.pack(msg, nil)
- if err != nil {
- return oldMsg, &nestedError{"SRVResource.Target", err}
- }
- return msg, nil
-}
-
-func unpackSRVResource(msg []byte, off int) (SRVResource, error) {
- priority, off, err := unpackUint16(msg, off)
- if err != nil {
- return SRVResource{}, &nestedError{"Priority", err}
- }
- weight, off, err := unpackUint16(msg, off)
- if err != nil {
- return SRVResource{}, &nestedError{"Weight", err}
- }
- port, off, err := unpackUint16(msg, off)
- if err != nil {
- return SRVResource{}, &nestedError{"Port", err}
- }
- var target Name
- if _, err := target.unpack(msg, off); err != nil {
- return SRVResource{}, &nestedError{"Target", err}
- }
- return SRVResource{priority, weight, port, target}, nil
-}
-
-// An AResource is an A Resource record.
-type AResource struct {
- A [4]byte
-}
-
-func (r *AResource) realType() Type {
- return TypeA
-}
-
-func (r *AResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packBytes(msg, r.A[:]), nil
-}
-
-func unpackAResource(msg []byte, off int) (AResource, error) {
- var a [4]byte
- if _, err := unpackBytes(msg, off, a[:]); err != nil {
- return AResource{}, err
- }
- return AResource{a}, nil
-}
-
-// An AAAAResource is an AAAA Resource record.
-type AAAAResource struct {
- AAAA [16]byte
-}
-
-func (r *AAAAResource) realType() Type {
- return TypeAAAA
-}
-
-func (r *AAAAResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packBytes(msg, r.AAAA[:]), nil
-}
-
-func unpackAAAAResource(msg []byte, off int) (AAAAResource, error) {
- var aaaa [16]byte
- if _, err := unpackBytes(msg, off, aaaa[:]); err != nil {
- return AAAAResource{}, err
- }
- return AAAAResource{aaaa}, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message_test.go
deleted file mode 100644
index 2bb763420..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/dns/dnsmessage/message_test.go
+++ /dev/null
@@ -1,1141 +0,0 @@
-// Copyright 2009 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 file.
-
-package dnsmessage
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "testing"
-)
-
-func mustNewName(name string) Name {
- n, err := NewName(name)
- if err != nil {
- panic(err)
- }
- return n
-}
-
-func (m *Message) String() string {
- s := fmt.Sprintf("Message: %#v\n", &m.Header)
- if len(m.Questions) > 0 {
- s += "-- Questions\n"
- for _, q := range m.Questions {
- s += fmt.Sprintf("%#v\n", q)
- }
- }
- if len(m.Answers) > 0 {
- s += "-- Answers\n"
- for _, a := range m.Answers {
- s += fmt.Sprintf("%#v\n", a)
- }
- }
- if len(m.Authorities) > 0 {
- s += "-- Authorities\n"
- for _, ns := range m.Authorities {
- s += fmt.Sprintf("%#v\n", ns)
- }
- }
- if len(m.Additionals) > 0 {
- s += "-- Additionals\n"
- for _, e := range m.Additionals {
- s += fmt.Sprintf("%#v\n", e)
- }
- }
- return s
-}
-
-func TestNameString(t *testing.T) {
- want := "foo"
- name := mustNewName(want)
- if got := fmt.Sprint(name); got != want {
- t.Errorf("got fmt.Sprint(%#v) = %s, want = %s", name, got, want)
- }
-}
-
-func TestQuestionPackUnpack(t *testing.T) {
- want := Question{
- Name: mustNewName("."),
- Type: TypeA,
- Class: ClassINET,
- }
- buf, err := want.pack(make([]byte, 1, 50), map[string]int{})
- if err != nil {
- t.Fatal("Packing failed:", err)
- }
- var p Parser
- p.msg = buf
- p.header.questions = 1
- p.section = sectionQuestions
- p.off = 1
- got, err := p.Question()
- if err != nil {
- t.Fatalf("Unpacking failed: %v\n%s", err, string(buf[1:]))
- }
- if p.off != len(buf) {
- t.Errorf("Unpacked different amount than packed: got n = %d, want = %d", p.off, len(buf))
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("Got = %+v, want = %+v", got, want)
- }
-}
-
-func TestName(t *testing.T) {
- tests := []string{
- "",
- ".",
- "google..com",
- "google.com",
- "google..com.",
- "google.com.",
- ".google.com.",
- "www..google.com.",
- "www.google.com.",
- }
-
- for _, test := range tests {
- n, err := NewName(test)
- if err != nil {
- t.Errorf("Creating name for %q: %v", test, err)
- continue
- }
- if ns := n.String(); ns != test {
- t.Errorf("Got %#v.String() = %q, want = %q", n, ns, test)
- continue
- }
- }
-}
-
-func TestNamePackUnpack(t *testing.T) {
- tests := []struct {
- in string
- want string
- err error
- }{
- {"", "", errNonCanonicalName},
- {".", ".", nil},
- {"google..com", "", errNonCanonicalName},
- {"google.com", "", errNonCanonicalName},
- {"google..com.", "", errZeroSegLen},
- {"google.com.", "google.com.", nil},
- {".google.com.", "", errZeroSegLen},
- {"www..google.com.", "", errZeroSegLen},
- {"www.google.com.", "www.google.com.", nil},
- }
-
- for _, test := range tests {
- in := mustNewName(test.in)
- want := mustNewName(test.want)
- buf, err := in.pack(make([]byte, 0, 30), map[string]int{})
- if err != test.err {
- t.Errorf("Packing of %q: got err = %v, want err = %v", test.in, err, test.err)
- continue
- }
- if test.err != nil {
- continue
- }
- var got Name
- n, err := got.unpack(buf, 0)
- if err != nil {
- t.Errorf("Unpacking for %q failed: %v", test.in, err)
- continue
- }
- if n != len(buf) {
- t.Errorf(
- "Unpacked different amount than packed for %q: got n = %d, want = %d",
- test.in,
- n,
- len(buf),
- )
- }
- if got != want {
- t.Errorf("Unpacking packing of %q: got = %#v, want = %#v", test.in, got, want)
- }
- }
-}
-
-func checkErrorPrefix(err error, prefix string) bool {
- e, ok := err.(*nestedError)
- return ok && e.s == prefix
-}
-
-func TestHeaderUnpackError(t *testing.T) {
- wants := []string{
- "id",
- "bits",
- "questions",
- "answers",
- "authorities",
- "additionals",
- }
- var buf []byte
- var h header
- for _, want := range wants {
- n, err := h.unpack(buf, 0)
- if n != 0 || !checkErrorPrefix(err, want) {
- t.Errorf("got h.unpack([%d]byte, 0) = %d, %v, want = 0, %s", len(buf), n, err, want)
- }
- buf = append(buf, 0, 0)
- }
-}
-
-func TestParserStart(t *testing.T) {
- const want = "unpacking header"
- var p Parser
- for i := 0; i <= 1; i++ {
- _, err := p.Start([]byte{})
- if !checkErrorPrefix(err, want) {
- t.Errorf("got p.Start(nil) = _, %v, want = _, %s", err, want)
- }
- }
-}
-
-func TestResourceNotStarted(t *testing.T) {
- tests := []struct {
- name string
- fn func(*Parser) error
- }{
- {"CNAMEResource", func(p *Parser) error { _, err := p.CNAMEResource(); return err }},
- {"MXResource", func(p *Parser) error { _, err := p.MXResource(); return err }},
- {"NSResource", func(p *Parser) error { _, err := p.NSResource(); return err }},
- {"PTRResource", func(p *Parser) error { _, err := p.PTRResource(); return err }},
- {"SOAResource", func(p *Parser) error { _, err := p.SOAResource(); return err }},
- {"TXTResource", func(p *Parser) error { _, err := p.TXTResource(); return err }},
- {"SRVResource", func(p *Parser) error { _, err := p.SRVResource(); return err }},
- {"AResource", func(p *Parser) error { _, err := p.AResource(); return err }},
- {"AAAAResource", func(p *Parser) error { _, err := p.AAAAResource(); return err }},
- }
-
- for _, test := range tests {
- if err := test.fn(&Parser{}); err != ErrNotStarted {
- t.Errorf("got _, %v = p.%s(), want = _, %v", err, test.name, ErrNotStarted)
- }
- }
-}
-
-func TestDNSPackUnpack(t *testing.T) {
- wants := []Message{
- {
- Questions: []Question{
- {
- Name: mustNewName("."),
- Type: TypeAAAA,
- Class: ClassINET,
- },
- },
- Answers: []Resource{},
- Authorities: []Resource{},
- Additionals: []Resource{},
- },
- largeTestMsg(),
- }
- for i, want := range wants {
- b, err := want.Pack()
- if err != nil {
- t.Fatalf("%d: packing failed: %v", i, err)
- }
- var got Message
- err = got.Unpack(b)
- if err != nil {
- t.Fatalf("%d: unpacking failed: %v", i, err)
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("%d: got = %+v, want = %+v", i, &got, &want)
- }
- }
-}
-
-func TestSkipAll(t *testing.T) {
- msg := largeTestMsg()
- buf, err := msg.Pack()
- if err != nil {
- t.Fatal("Packing large test message:", err)
- }
- var p Parser
- if _, err := p.Start(buf); err != nil {
- t.Fatal(err)
- }
-
- tests := []struct {
- name string
- f func() error
- }{
- {"SkipAllQuestions", p.SkipAllQuestions},
- {"SkipAllAnswers", p.SkipAllAnswers},
- {"SkipAllAuthorities", p.SkipAllAuthorities},
- {"SkipAllAdditionals", p.SkipAllAdditionals},
- }
- for _, test := range tests {
- for i := 1; i <= 3; i++ {
- if err := test.f(); err != nil {
- t.Errorf("Call #%d to %s(): %v", i, test.name, err)
- }
- }
- }
-}
-
-func TestSkipEach(t *testing.T) {
- msg := smallTestMsg()
-
- buf, err := msg.Pack()
- if err != nil {
- t.Fatal("Packing test message:", err)
- }
- var p Parser
- if _, err := p.Start(buf); err != nil {
- t.Fatal(err)
- }
-
- tests := []struct {
- name string
- f func() error
- }{
- {"SkipQuestion", p.SkipQuestion},
- {"SkipAnswer", p.SkipAnswer},
- {"SkipAuthority", p.SkipAuthority},
- {"SkipAdditional", p.SkipAdditional},
- }
- for _, test := range tests {
- if err := test.f(); err != nil {
- t.Errorf("First call: got %s() = %v, want = %v", test.name, err, nil)
- }
- if err := test.f(); err != ErrSectionDone {
- t.Errorf("Second call: got %s() = %v, want = %v", test.name, err, ErrSectionDone)
- }
- }
-}
-
-func TestSkipAfterRead(t *testing.T) {
- msg := smallTestMsg()
-
- buf, err := msg.Pack()
- if err != nil {
- t.Fatal("Packing test message:", err)
- }
- var p Parser
- if _, err := p.Start(buf); err != nil {
- t.Fatal(err)
- }
-
- tests := []struct {
- name string
- skip func() error
- read func() error
- }{
- {"Question", p.SkipQuestion, func() error { _, err := p.Question(); return err }},
- {"Answer", p.SkipAnswer, func() error { _, err := p.Answer(); return err }},
- {"Authority", p.SkipAuthority, func() error { _, err := p.Authority(); return err }},
- {"Additional", p.SkipAdditional, func() error { _, err := p.Additional(); return err }},
- }
- for _, test := range tests {
- if err := test.read(); err != nil {
- t.Errorf("Got %s() = _, %v, want = _, %v", test.name, err, nil)
- }
- if err := test.skip(); err != ErrSectionDone {
- t.Errorf("Got Skip%s() = %v, want = %v", test.name, err, ErrSectionDone)
- }
- }
-}
-
-func TestSkipNotStarted(t *testing.T) {
- var p Parser
-
- tests := []struct {
- name string
- f func() error
- }{
- {"SkipAllQuestions", p.SkipAllQuestions},
- {"SkipAllAnswers", p.SkipAllAnswers},
- {"SkipAllAuthorities", p.SkipAllAuthorities},
- {"SkipAllAdditionals", p.SkipAllAdditionals},
- }
- for _, test := range tests {
- if err := test.f(); err != ErrNotStarted {
- t.Errorf("Got %s() = %v, want = %v", test.name, err, ErrNotStarted)
- }
- }
-}
-
-func TestTooManyRecords(t *testing.T) {
- const recs = int(^uint16(0)) + 1
- tests := []struct {
- name string
- msg Message
- want error
- }{
- {
- "Questions",
- Message{
- Questions: make([]Question, recs),
- },
- errTooManyQuestions,
- },
- {
- "Answers",
- Message{
- Answers: make([]Resource, recs),
- },
- errTooManyAnswers,
- },
- {
- "Authorities",
- Message{
- Authorities: make([]Resource, recs),
- },
- errTooManyAuthorities,
- },
- {
- "Additionals",
- Message{
- Additionals: make([]Resource, recs),
- },
- errTooManyAdditionals,
- },
- }
-
- for _, test := range tests {
- if _, got := test.msg.Pack(); got != test.want {
- t.Errorf("Packing %d %s: got = %v, want = %v", recs, test.name, got, test.want)
- }
- }
-}
-
-func TestVeryLongTxt(t *testing.T) {
- want := Resource{
- ResourceHeader{
- Name: mustNewName("foo.bar.example.com."),
- Type: TypeTXT,
- Class: ClassINET,
- },
- &TXTResource{loremIpsum},
- }
- buf, err := want.pack(make([]byte, 0, 8000), map[string]int{})
- if err != nil {
- t.Fatal("Packing failed:", err)
- }
- var got Resource
- off, err := got.Header.unpack(buf, 0)
- if err != nil {
- t.Fatal("Unpacking ResourceHeader failed:", err)
- }
- body, n, err := unpackResourceBody(buf, off, got.Header)
- if err != nil {
- t.Fatal("Unpacking failed:", err)
- }
- got.Body = body
- if n != len(buf) {
- t.Errorf("Unpacked different amount than packed: got n = %d, want = %d", n, len(buf))
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("Got = %#v, want = %#v", got, want)
- }
-}
-
-func TestStartError(t *testing.T) {
- tests := []struct {
- name string
- fn func(*Builder) error
- }{
- {"Questions", func(b *Builder) error { return b.StartQuestions() }},
- {"Answers", func(b *Builder) error { return b.StartAnswers() }},
- {"Authorities", func(b *Builder) error { return b.StartAuthorities() }},
- {"Additionals", func(b *Builder) error { return b.StartAdditionals() }},
- }
-
- envs := []struct {
- name string
- fn func() *Builder
- want error
- }{
- {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted},
- {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone},
- }
-
- for _, env := range envs {
- for _, test := range tests {
- if got := test.fn(env.fn()); got != env.want {
- t.Errorf("got Builder{%s}.Start%s = %v, want = %v", env.name, test.name, got, env.want)
- }
- }
- }
-}
-
-func TestBuilderResourceError(t *testing.T) {
- tests := []struct {
- name string
- fn func(*Builder) error
- }{
- {"CNAMEResource", func(b *Builder) error { return b.CNAMEResource(ResourceHeader{}, CNAMEResource{}) }},
- {"MXResource", func(b *Builder) error { return b.MXResource(ResourceHeader{}, MXResource{}) }},
- {"NSResource", func(b *Builder) error { return b.NSResource(ResourceHeader{}, NSResource{}) }},
- {"PTRResource", func(b *Builder) error { return b.PTRResource(ResourceHeader{}, PTRResource{}) }},
- {"SOAResource", func(b *Builder) error { return b.SOAResource(ResourceHeader{}, SOAResource{}) }},
- {"TXTResource", func(b *Builder) error { return b.TXTResource(ResourceHeader{}, TXTResource{}) }},
- {"SRVResource", func(b *Builder) error { return b.SRVResource(ResourceHeader{}, SRVResource{}) }},
- {"AResource", func(b *Builder) error { return b.AResource(ResourceHeader{}, AResource{}) }},
- {"AAAAResource", func(b *Builder) error { return b.AAAAResource(ResourceHeader{}, AAAAResource{}) }},
- }
-
- envs := []struct {
- name string
- fn func() *Builder
- want error
- }{
- {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted},
- {"sectionHeader", func() *Builder { return &Builder{section: sectionHeader} }, ErrNotStarted},
- {"sectionQuestions", func() *Builder { return &Builder{section: sectionQuestions} }, ErrNotStarted},
- {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone},
- }
-
- for _, env := range envs {
- for _, test := range tests {
- if got := test.fn(env.fn()); got != env.want {
- t.Errorf("got Builder{%s}.%s = %v, want = %v", env.name, test.name, got, env.want)
- }
- }
- }
-}
-
-func TestFinishError(t *testing.T) {
- var b Builder
- want := ErrNotStarted
- if _, got := b.Finish(); got != want {
- t.Errorf("got Builder{}.Finish() = %v, want = %v", got, want)
- }
-}
-
-func TestBuilder(t *testing.T) {
- msg := largeTestMsg()
- want, err := msg.Pack()
- if err != nil {
- t.Fatal("Packing without builder:", err)
- }
-
- var b Builder
- b.Start(nil, msg.Header)
-
- if err := b.StartQuestions(); err != nil {
- t.Fatal("b.StartQuestions():", err)
- }
- for _, q := range msg.Questions {
- if err := b.Question(q); err != nil {
- t.Fatalf("b.Question(%#v): %v", q, err)
- }
- }
-
- if err := b.StartAnswers(); err != nil {
- t.Fatal("b.StartAnswers():", err)
- }
- for _, a := range msg.Answers {
- switch a.Header.Type {
- case TypeA:
- if err := b.AResource(a.Header, *a.Body.(*AResource)); err != nil {
- t.Fatalf("b.AResource(%#v): %v", a, err)
- }
- case TypeNS:
- if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil {
- t.Fatalf("b.NSResource(%#v): %v", a, err)
- }
- case TypeCNAME:
- if err := b.CNAMEResource(a.Header, *a.Body.(*CNAMEResource)); err != nil {
- t.Fatalf("b.CNAMEResource(%#v): %v", a, err)
- }
- case TypeSOA:
- if err := b.SOAResource(a.Header, *a.Body.(*SOAResource)); err != nil {
- t.Fatalf("b.SOAResource(%#v): %v", a, err)
- }
- case TypePTR:
- if err := b.PTRResource(a.Header, *a.Body.(*PTRResource)); err != nil {
- t.Fatalf("b.PTRResource(%#v): %v", a, err)
- }
- case TypeMX:
- if err := b.MXResource(a.Header, *a.Body.(*MXResource)); err != nil {
- t.Fatalf("b.MXResource(%#v): %v", a, err)
- }
- case TypeTXT:
- if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil {
- t.Fatalf("b.TXTResource(%#v): %v", a, err)
- }
- case TypeAAAA:
- if err := b.AAAAResource(a.Header, *a.Body.(*AAAAResource)); err != nil {
- t.Fatalf("b.AAAAResource(%#v): %v", a, err)
- }
- case TypeSRV:
- if err := b.SRVResource(a.Header, *a.Body.(*SRVResource)); err != nil {
- t.Fatalf("b.SRVResource(%#v): %v", a, err)
- }
- }
- }
-
- if err := b.StartAuthorities(); err != nil {
- t.Fatal("b.StartAuthorities():", err)
- }
- for _, a := range msg.Authorities {
- if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil {
- t.Fatalf("b.NSResource(%#v): %v", a, err)
- }
- }
-
- if err := b.StartAdditionals(); err != nil {
- t.Fatal("b.StartAdditionals():", err)
- }
- for _, a := range msg.Additionals {
- if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil {
- t.Fatalf("b.TXTResource(%#v): %v", a, err)
- }
- }
-
- got, err := b.Finish()
- if err != nil {
- t.Fatal("b.Finish():", err)
- }
- if !bytes.Equal(got, want) {
- t.Fatalf("Got from Builder: %#v\nwant = %#v", got, want)
- }
-}
-
-func TestResourcePack(t *testing.T) {
- for _, tt := range []struct {
- m Message
- err error
- }{
- {
- Message{
- Questions: []Question{
- {
- Name: mustNewName("."),
- Type: TypeAAAA,
- Class: ClassINET,
- },
- },
- Answers: []Resource{{ResourceHeader{}, nil}},
- },
- &nestedError{"packing Answer", errNilResouceBody},
- },
- {
- Message{
- Questions: []Question{
- {
- Name: mustNewName("."),
- Type: TypeAAAA,
- Class: ClassINET,
- },
- },
- Authorities: []Resource{{ResourceHeader{}, (*NSResource)(nil)}},
- },
- &nestedError{"packing Authority",
- &nestedError{"ResourceHeader",
- &nestedError{"Name", errNonCanonicalName},
- },
- },
- },
- {
- Message{
- Questions: []Question{
- {
- Name: mustNewName("."),
- Type: TypeA,
- Class: ClassINET,
- },
- },
- Additionals: []Resource{{ResourceHeader{}, nil}},
- },
- &nestedError{"packing Additional", errNilResouceBody},
- },
- } {
- _, err := tt.m.Pack()
- if !reflect.DeepEqual(err, tt.err) {
- t.Errorf("got %v for %v; want %v", err, tt.m, tt.err)
- }
- }
-}
-
-func BenchmarkParsing(b *testing.B) {
- b.ReportAllocs()
-
- name := mustNewName("foo.bar.example.com.")
- msg := Message{
- Header: Header{Response: true, Authoritative: true},
- Questions: []Question{
- {
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- },
- Answers: []Resource{
- {
- ResourceHeader{
- Name: name,
- Class: ClassINET,
- },
- &AResource{[4]byte{}},
- },
- {
- ResourceHeader{
- Name: name,
- Class: ClassINET,
- },
- &AAAAResource{[16]byte{}},
- },
- {
- ResourceHeader{
- Name: name,
- Class: ClassINET,
- },
- &CNAMEResource{name},
- },
- {
- ResourceHeader{
- Name: name,
- Class: ClassINET,
- },
- &NSResource{name},
- },
- },
- }
-
- buf, err := msg.Pack()
- if err != nil {
- b.Fatal("msg.Pack():", err)
- }
-
- for i := 0; i < b.N; i++ {
- var p Parser
- if _, err := p.Start(buf); err != nil {
- b.Fatal("p.Start(buf):", err)
- }
-
- for {
- _, err := p.Question()
- if err == ErrSectionDone {
- break
- }
- if err != nil {
- b.Fatal("p.Question():", err)
- }
- }
-
- for {
- h, err := p.AnswerHeader()
- if err == ErrSectionDone {
- break
- }
- if err != nil {
- panic(err)
- }
-
- switch h.Type {
- case TypeA:
- if _, err := p.AResource(); err != nil {
- b.Fatal("p.AResource():", err)
- }
- case TypeAAAA:
- if _, err := p.AAAAResource(); err != nil {
- b.Fatal("p.AAAAResource():", err)
- }
- case TypeCNAME:
- if _, err := p.CNAMEResource(); err != nil {
- b.Fatal("p.CNAMEResource():", err)
- }
- case TypeNS:
- if _, err := p.NSResource(); err != nil {
- b.Fatal("p.NSResource():", err)
- }
- default:
- b.Fatalf("unknown type: %T", h)
- }
- }
- }
-}
-
-func BenchmarkBuilding(b *testing.B) {
- b.ReportAllocs()
-
- name := mustNewName("foo.bar.example.com.")
- buf := make([]byte, 0, packStartingCap)
-
- for i := 0; i < b.N; i++ {
- var bld Builder
- bld.StartWithoutCompression(buf, Header{Response: true, Authoritative: true})
-
- if err := bld.StartQuestions(); err != nil {
- b.Fatal("bld.StartQuestions():", err)
- }
- q := Question{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- }
- if err := bld.Question(q); err != nil {
- b.Fatalf("bld.Question(%+v): %v", q, err)
- }
-
- hdr := ResourceHeader{
- Name: name,
- Class: ClassINET,
- }
- if err := bld.StartAnswers(); err != nil {
- b.Fatal("bld.StartQuestions():", err)
- }
-
- ar := AResource{[4]byte{}}
- if err := bld.AResource(hdr, ar); err != nil {
- b.Fatalf("bld.AResource(%+v, %+v): %v", hdr, ar, err)
- }
-
- aaar := AAAAResource{[16]byte{}}
- if err := bld.AAAAResource(hdr, aaar); err != nil {
- b.Fatalf("bld.AAAAResource(%+v, %+v): %v", hdr, aaar, err)
- }
-
- cnr := CNAMEResource{name}
- if err := bld.CNAMEResource(hdr, cnr); err != nil {
- b.Fatalf("bld.CNAMEResource(%+v, %+v): %v", hdr, cnr, err)
- }
-
- nsr := NSResource{name}
- if err := bld.NSResource(hdr, nsr); err != nil {
- b.Fatalf("bld.NSResource(%+v, %+v): %v", hdr, nsr, err)
- }
-
- if _, err := bld.Finish(); err != nil {
- b.Fatal("bld.Finish():", err)
- }
- }
-}
-
-func smallTestMsg() Message {
- name := mustNewName("example.com.")
- return Message{
- Header: Header{Response: true, Authoritative: true},
- Questions: []Question{
- {
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- },
- Answers: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- &AResource{[4]byte{127, 0, 0, 1}},
- },
- },
- Authorities: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- &AResource{[4]byte{127, 0, 0, 1}},
- },
- },
- Additionals: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- &AResource{[4]byte{127, 0, 0, 1}},
- },
- },
- }
-}
-
-func BenchmarkPack(b *testing.B) {
- msg := largeTestMsg()
-
- b.ReportAllocs()
-
- for i := 0; i < b.N; i++ {
- if _, err := msg.Pack(); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkAppendPack(b *testing.B) {
- msg := largeTestMsg()
- buf := make([]byte, 0, packStartingCap)
-
- b.ReportAllocs()
-
- for i := 0; i < b.N; i++ {
- if _, err := msg.AppendPack(buf[:0]); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func largeTestMsg() Message {
- name := mustNewName("foo.bar.example.com.")
- return Message{
- Header: Header{Response: true, Authoritative: true},
- Questions: []Question{
- {
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- },
- Answers: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- &AResource{[4]byte{127, 0, 0, 1}},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeA,
- Class: ClassINET,
- },
- &AResource{[4]byte{127, 0, 0, 2}},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeAAAA,
- Class: ClassINET,
- },
- &AAAAResource{[16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeCNAME,
- Class: ClassINET,
- },
- &CNAMEResource{mustNewName("alias.example.com.")},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeSOA,
- Class: ClassINET,
- },
- &SOAResource{
- NS: mustNewName("ns1.example.com."),
- MBox: mustNewName("mb.example.com."),
- Serial: 1,
- Refresh: 2,
- Retry: 3,
- Expire: 4,
- MinTTL: 5,
- },
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypePTR,
- Class: ClassINET,
- },
- &PTRResource{mustNewName("ptr.example.com.")},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeMX,
- Class: ClassINET,
- },
- &MXResource{
- 7,
- mustNewName("mx.example.com."),
- },
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeSRV,
- Class: ClassINET,
- },
- &SRVResource{
- 8,
- 9,
- 11,
- mustNewName("srv.example.com."),
- },
- },
- },
- Authorities: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeNS,
- Class: ClassINET,
- },
- &NSResource{mustNewName("ns1.example.com.")},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeNS,
- Class: ClassINET,
- },
- &NSResource{mustNewName("ns2.example.com.")},
- },
- },
- Additionals: []Resource{
- {
- ResourceHeader{
- Name: name,
- Type: TypeTXT,
- Class: ClassINET,
- },
- &TXTResource{"So Long, and Thanks for All the Fish"},
- },
- {
- ResourceHeader{
- Name: name,
- Type: TypeTXT,
- Class: ClassINET,
- },
- &TXTResource{"Hamster Huey and the Gooey Kablooie"},
- },
- },
- }
-}
-
-const loremIpsum = `
-Lorem ipsum dolor sit amet, nec enim antiopam id, an ullum choro
-nonumes qui, pro eu debet honestatis mediocritatem. No alia enim eos,
-magna signiferumque ex vis. Mei no aperiri dissentias, cu vel quas
-regione. Malorum quaeque vim ut, eum cu semper aliquid invidunt, ei
-nam ipsum assentior.
-
-Nostrum appellantur usu no, vis ex probatus adipiscing. Cu usu illum
-facilis eleifend. Iusto conceptam complectitur vim id. Tale omnesque
-no usu, ei oblique sadipscing vim. At nullam voluptua usu, mei laudem
-reformidans et. Qui ei eros porro reformidans, ius suas veritus
-torquatos ex. Mea te facer alterum consequat.
-
-Soleat torquatos democritum sed et, no mea congue appareat, facer
-aliquam nec in. Has te ipsum tritani. At justo dicta option nec, movet
-phaedrum ad nam. Ea detracto verterem liberavisse has, delectus
-suscipiantur in mei. Ex nam meliore complectitur. Ut nam omnis
-honestatis quaerendum, ea mea nihil affert detracto, ad vix rebum
-mollis.
-
-Ut epicurei praesent neglegentur pri, prima fuisset intellegebat ad
-vim. An habemus comprehensam usu, at enim dignissim pro. Eam reque
-vivendum adipisci ea. Vel ne odio choro minimum. Sea admodum
-dissentiet ex. Mundi tamquam evertitur ius cu. Homero postea iisque ut
-pro, vel ne saepe senserit consetetur.
-
-Nulla utamur facilisis ius ea, in viderer diceret pertinax eum. Mei no
-enim quodsi facilisi, ex sed aeterno appareat mediocritatem, eum
-sententiae deterruisset ut. At suas timeam euismod cum, offendit
-appareat interpretaris ne vix. Vel ea civibus albucius, ex vim quidam
-accusata intellegebat, noluisse instructior sea id. Nec te nonumes
-habemus appellantur, quis dignissim vituperata eu nam.
-
-At vix apeirian patrioque vituperatoribus, an usu agam assum. Debet
-iisque an mea. Per eu dicant ponderum accommodare. Pri alienum
-placerat senserit an, ne eum ferri abhorreant vituperatoribus. Ut mea
-eligendi disputationi. Ius no tation everti impedit, ei magna quidam
-mediocritatem pri.
-
-Legendos perpetua iracundia ne usu, no ius ullum epicurei intellegam,
-ad modus epicuri lucilius eam. In unum quaerendum usu. Ne diam paulo
-has, ea veri virtute sed. Alia honestatis conclusionemque mea eu, ut
-iudico albucius his.
-
-Usu essent probatus eu, sed omnis dolor delicatissimi ex. No qui augue
-dissentias dissentiet. Laudem recteque no usu, vel an velit noluisse,
-an sed utinam eirmod appetere. Ne mea fuisset inimicus ocurreret. At
-vis dicant abhorreant, utinam forensibus nec ne, mei te docendi
-consequat. Brute inermis persecuti cum id. Ut ipsum munere propriae
-usu, dicit graeco disputando id has.
-
-Eros dolore quaerendum nam ei. Timeam ornatus inciderint pro id. Nec
-torquatos sadipscing ei, ancillae molestie per in. Malis principes duo
-ea, usu liber postulant ei.
-
-Graece timeam voluptatibus eu eam. Alia probatus quo no, ea scripta
-feugiat duo. Congue option meliore ex qui, noster invenire appellantur
-ea vel. Eu exerci legendos vel. Consetetur repudiandae vim ut. Vix an
-probo minimum, et nam illud falli tempor.
-
-Cum dico signiferumque eu. Sed ut regione maiorum, id veritus insolens
-tacimates vix. Eu mel sint tamquam lucilius, duo no oporteat
-tacimates. Atqui augue concludaturque vix ei, id mel utroque menandri.
-
-Ad oratio blandit aliquando pro. Vis et dolorum rationibus
-philosophia, ad cum nulla molestie. Hinc fuisset adversarium eum et,
-ne qui nisl verear saperet, vel te quaestio forensibus. Per odio
-option delenit an. Alii placerat has no, in pri nihil platonem
-cotidieque. Est ut elit copiosae scaevola, debet tollit maluisset sea
-an.
-
-Te sea hinc debet pericula, liber ridens fabulas cu sed, quem mutat
-accusam mea et. Elitr labitur albucius et pri, an labore feugait mel.
-Velit zril melius usu ea. Ad stet putent interpretaris qui. Mel no
-error volumus scripserit. In pro paulo iudico, quo ei dolorem
-verterem, affert fabellas dissentiet ea vix.
-
-Vis quot deserunt te. Error aliquid detraxit eu usu, vis alia eruditi
-salutatus cu. Est nostrud bonorum an, ei usu alii salutatus. Vel at
-nisl primis, eum ex aperiri noluisse reformidans. Ad veri velit
-utroque vis, ex equidem detraxit temporibus has.
-
-Inermis appareat usu ne. Eros placerat periculis mea ad, in dictas
-pericula pro. Errem postulant at usu, ea nec amet ornatus mentitum. Ad
-mazim graeco eum, vel ex percipit volutpat iudicabit, sit ne delicata
-interesset. Mel sapientem prodesset abhorreant et, oblique suscipit
-eam id.
-
-An maluisset disputando mea, vidit mnesarchum pri et. Malis insolens
-inciderint no sea. Ea persius maluisset vix, ne vim appellantur
-instructior, consul quidam definiebas pri id. Cum integre feugiat
-pericula in, ex sed persius similique, mel ne natum dicit percipitur.
-
-Primis discere ne pri, errem putent definitionem at vis. Ei mel dolore
-neglegentur, mei tincidunt percipitur ei. Pro ad simul integre
-rationibus. Eu vel alii honestatis definitiones, mea no nonumy
-reprehendunt.
-
-Dicta appareat legendos est cu. Eu vel congue dicunt omittam, no vix
-adhuc minimum constituam, quot noluisse id mel. Eu quot sale mutat
-duo, ex nisl munere invenire duo. Ne nec ullum utamur. Pro alterum
-debitis nostrum no, ut vel aliquid vivendo.
-
-Aliquip fierent praesent quo ne, id sit audiam recusabo delicatissimi.
-Usu postulant incorrupte cu. At pro dicit tibique intellegam, cibo
-dolore impedit id eam, et aeque feugait assentior has. Quando sensibus
-nec ex. Possit sensibus pri ad, unum mutat periculis cu vix.
-
-Mundi tibique vix te, duo simul partiendo qualisque id, est at vidit
-sonet tempor. No per solet aeterno deseruisse. Petentium salutandi
-definiebas pri cu. Munere vivendum est in. Ei justo congue eligendi
-vis, modus offendit omittantur te mel.
-
-Integre voluptaria in qui, sit habemus tractatos constituam no. Utinam
-melius conceptam est ne, quo in minimum apeirian delicata, ut ius
-porro recusabo. Dicant expetenda vix no, ludus scripserit sed ex, eu
-his modo nostro. Ut etiam sonet his, quodsi inciderint philosophia te
-per. Nullam lobortis eu cum, vix an sonet efficiendi repudiandae. Vis
-ad idque fabellas intellegebat.
-
-Eum commodo senserit conclusionemque ex. Sed forensibus sadipscing ut,
-mei in facer delicata periculis, sea ne hinc putent cetero. Nec ne
-alia corpora invenire, alia prima soleat te cum. Eleifend posidonium
-nam at.
-
-Dolorum indoctum cu quo, ex dolor legendos recteque eam, cu pri zril
-discere. Nec civibus officiis dissentiunt ex, est te liber ludus
-elaboraret. Cum ea fabellas invenire. Ex vim nostrud eripuit
-comprehensam, nam te inermis delectus, saepe inermis senserit.
-`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom.go
deleted file mode 100644
index cd0a8ac15..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package atom provides integer codes (also known as atoms) for a fixed set of
-// frequently occurring HTML strings: tag names and attribute keys such as "p"
-// and "id".
-//
-// Sharing an atom's name between all elements with the same tag can result in
-// fewer string allocations when tokenizing and parsing HTML. Integer
-// comparisons are also generally faster than string comparisons.
-//
-// The value of an atom's particular code is not guaranteed to stay the same
-// between versions of this package. Neither is any ordering guaranteed:
-// whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to
-// be dense. The only guarantees are that e.g. looking up "div" will yield
-// atom.Div, calling atom.Div.String will return "div", and atom.Div != 0.
-package atom // import "golang.org/x/net/html/atom"
-
-// Atom is an integer code for a string. The zero value maps to "".
-type Atom uint32
-
-// String returns the atom's name.
-func (a Atom) String() string {
- start := uint32(a >> 8)
- n := uint32(a & 0xff)
- if start+n > uint32(len(atomText)) {
- return ""
- }
- return atomText[start : start+n]
-}
-
-func (a Atom) string() string {
- return atomText[a>>8 : a>>8+a&0xff]
-}
-
-// fnv computes the FNV hash with an arbitrary starting value h.
-func fnv(h uint32, s []byte) uint32 {
- for i := range s {
- h ^= uint32(s[i])
- h *= 16777619
- }
- return h
-}
-
-func match(s string, t []byte) bool {
- for i, c := range t {
- if s[i] != c {
- return false
- }
- }
- return true
-}
-
-// Lookup returns the atom whose name is s. It returns zero if there is no
-// such atom. The lookup is case sensitive.
-func Lookup(s []byte) Atom {
- if len(s) == 0 || len(s) > maxAtomLen {
- return 0
- }
- h := fnv(hash0, s)
- if a := table[h&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) {
- return a
- }
- if a := table[(h>>16)&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) {
- return a
- }
- return 0
-}
-
-// String returns a string whose contents are equal to s. In that sense, it is
-// equivalent to string(s) but may be more efficient.
-func String(s []byte) string {
- if a := Lookup(s); a != 0 {
- return a.String()
- }
- return string(s)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom_test.go
deleted file mode 100644
index 6e33704dd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/atom_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2012 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 file.
-
-package atom
-
-import (
- "sort"
- "testing"
-)
-
-func TestKnown(t *testing.T) {
- for _, s := range testAtomList {
- if atom := Lookup([]byte(s)); atom.String() != s {
- t.Errorf("Lookup(%q) = %#x (%q)", s, uint32(atom), atom.String())
- }
- }
-}
-
-func TestHits(t *testing.T) {
- for _, a := range table {
- if a == 0 {
- continue
- }
- got := Lookup([]byte(a.String()))
- if got != a {
- t.Errorf("Lookup(%q) = %#x, want %#x", a.String(), uint32(got), uint32(a))
- }
- }
-}
-
-func TestMisses(t *testing.T) {
- testCases := []string{
- "",
- "\x00",
- "\xff",
- "A",
- "DIV",
- "Div",
- "dIV",
- "aa",
- "a\x00",
- "ab",
- "abb",
- "abbr0",
- "abbr ",
- " abbr",
- " a",
- "acceptcharset",
- "acceptCharset",
- "accept_charset",
- "h0",
- "h1h2",
- "h7",
- "onClick",
- "λ",
- // The following string has the same hash (0xa1d7fab7) as "onmouseover".
- "\x00\x00\x00\x00\x00\x50\x18\xae\x38\xd0\xb7",
- }
- for _, tc := range testCases {
- got := Lookup([]byte(tc))
- if got != 0 {
- t.Errorf("Lookup(%q): got %d, want 0", tc, got)
- }
- }
-}
-
-func TestForeignObject(t *testing.T) {
- const (
- afo = Foreignobject
- afO = ForeignObject
- sfo = "foreignobject"
- sfO = "foreignObject"
- )
- if got := Lookup([]byte(sfo)); got != afo {
- t.Errorf("Lookup(%q): got %#v, want %#v", sfo, got, afo)
- }
- if got := Lookup([]byte(sfO)); got != afO {
- t.Errorf("Lookup(%q): got %#v, want %#v", sfO, got, afO)
- }
- if got := afo.String(); got != sfo {
- t.Errorf("Atom(%#v).String(): got %q, want %q", afo, got, sfo)
- }
- if got := afO.String(); got != sfO {
- t.Errorf("Atom(%#v).String(): got %q, want %q", afO, got, sfO)
- }
-}
-
-func BenchmarkLookup(b *testing.B) {
- sortedTable := make([]string, 0, len(table))
- for _, a := range table {
- if a != 0 {
- sortedTable = append(sortedTable, a.String())
- }
- }
- sort.Strings(sortedTable)
-
- x := make([][]byte, 1000)
- for i := range x {
- x[i] = []byte(sortedTable[i%len(sortedTable)])
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for _, s := range x {
- Lookup(s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/gen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/gen.go
deleted file mode 100644
index cc5dc5dbc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/gen.go
+++ /dev/null
@@ -1,709 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build ignore
-
-//go:generate go run gen.go
-//go:generate go run gen.go -test
-
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "go/format"
- "io/ioutil"
- "math/rand"
- "os"
- "sort"
- "strings"
-)
-
-// identifier converts s to a Go exported identifier.
-// It converts "div" to "Div" and "accept-charset" to "AcceptCharset".
-func identifier(s string) string {
- b := make([]byte, 0, len(s))
- cap := true
- for _, c := range s {
- if c == '-' {
- cap = true
- continue
- }
- if cap && 'a' <= c && c <= 'z' {
- c -= 'a' - 'A'
- }
- cap = false
- b = append(b, byte(c))
- }
- return string(b)
-}
-
-var test = flag.Bool("test", false, "generate table_test.go")
-
-func genFile(name string, buf *bytes.Buffer) {
- b, err := format.Source(buf.Bytes())
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- if err := ioutil.WriteFile(name, b, 0644); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func main() {
- flag.Parse()
-
- var all []string
- all = append(all, elements...)
- all = append(all, attributes...)
- all = append(all, eventHandlers...)
- all = append(all, extra...)
- sort.Strings(all)
-
- // uniq - lists have dups
- w := 0
- for _, s := range all {
- if w == 0 || all[w-1] != s {
- all[w] = s
- w++
- }
- }
- all = all[:w]
-
- if *test {
- var buf bytes.Buffer
- fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n")
- fmt.Fprintln(&buf, "//go:generate go run gen.go -test\n")
- fmt.Fprintln(&buf, "package atom\n")
- fmt.Fprintln(&buf, "var testAtomList = []string{")
- for _, s := range all {
- fmt.Fprintf(&buf, "\t%q,\n", s)
- }
- fmt.Fprintln(&buf, "}")
-
- genFile("table_test.go", &buf)
- return
- }
-
- // Find hash that minimizes table size.
- var best *table
- for i := 0; i < 1000000; i++ {
- if best != nil && 1<<(best.k-1) < len(all) {
- break
- }
- h := rand.Uint32()
- for k := uint(0); k <= 16; k++ {
- if best != nil && k >= best.k {
- break
- }
- var t table
- if t.init(h, k, all) {
- best = &t
- break
- }
- }
- }
- if best == nil {
- fmt.Fprintf(os.Stderr, "failed to construct string table\n")
- os.Exit(1)
- }
-
- // Lay out strings, using overlaps when possible.
- layout := append([]string{}, all...)
-
- // Remove strings that are substrings of other strings
- for changed := true; changed; {
- changed = false
- for i, s := range layout {
- if s == "" {
- continue
- }
- for j, t := range layout {
- if i != j && t != "" && strings.Contains(s, t) {
- changed = true
- layout[j] = ""
- }
- }
- }
- }
-
- // Join strings where one suffix matches another prefix.
- for {
- // Find best i, j, k such that layout[i][len-k:] == layout[j][:k],
- // maximizing overlap length k.
- besti := -1
- bestj := -1
- bestk := 0
- for i, s := range layout {
- if s == "" {
- continue
- }
- for j, t := range layout {
- if i == j {
- continue
- }
- for k := bestk + 1; k <= len(s) && k <= len(t); k++ {
- if s[len(s)-k:] == t[:k] {
- besti = i
- bestj = j
- bestk = k
- }
- }
- }
- }
- if bestk > 0 {
- layout[besti] += layout[bestj][bestk:]
- layout[bestj] = ""
- continue
- }
- break
- }
-
- text := strings.Join(layout, "")
-
- atom := map[string]uint32{}
- for _, s := range all {
- off := strings.Index(text, s)
- if off < 0 {
- panic("lost string " + s)
- }
- atom[s] = uint32(off<<8 | len(s))
- }
-
- var buf bytes.Buffer
- // Generate the Go code.
- fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n")
- fmt.Fprintln(&buf, "//go:generate go run gen.go\n")
- fmt.Fprintln(&buf, "package atom\n\nconst (")
-
- // compute max len
- maxLen := 0
- for _, s := range all {
- if maxLen < len(s) {
- maxLen = len(s)
- }
- fmt.Fprintf(&buf, "\t%s Atom = %#x\n", identifier(s), atom[s])
- }
- fmt.Fprintln(&buf, ")\n")
-
- fmt.Fprintf(&buf, "const hash0 = %#x\n\n", best.h0)
- fmt.Fprintf(&buf, "const maxAtomLen = %d\n\n", maxLen)
-
- fmt.Fprintf(&buf, "var table = [1<<%d]Atom{\n", best.k)
- for i, s := range best.tab {
- if s == "" {
- continue
- }
- fmt.Fprintf(&buf, "\t%#x: %#x, // %s\n", i, atom[s], s)
- }
- fmt.Fprintf(&buf, "}\n")
- datasize := (1 << best.k) * 4
-
- fmt.Fprintln(&buf, "const atomText =")
- textsize := len(text)
- for len(text) > 60 {
- fmt.Fprintf(&buf, "\t%q +\n", text[:60])
- text = text[60:]
- }
- fmt.Fprintf(&buf, "\t%q\n\n", text)
-
- genFile("table.go", &buf)
-
- fmt.Fprintf(os.Stdout, "%d atoms; %d string bytes + %d tables = %d total data\n", len(all), textsize, datasize, textsize+datasize)
-}
-
-type byLen []string
-
-func (x byLen) Less(i, j int) bool { return len(x[i]) > len(x[j]) }
-func (x byLen) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byLen) Len() int { return len(x) }
-
-// fnv computes the FNV hash with an arbitrary starting value h.
-func fnv(h uint32, s string) uint32 {
- for i := 0; i < len(s); i++ {
- h ^= uint32(s[i])
- h *= 16777619
- }
- return h
-}
-
-// A table represents an attempt at constructing the lookup table.
-// The lookup table uses cuckoo hashing, meaning that each string
-// can be found in one of two positions.
-type table struct {
- h0 uint32
- k uint
- mask uint32
- tab []string
-}
-
-// hash returns the two hashes for s.
-func (t *table) hash(s string) (h1, h2 uint32) {
- h := fnv(t.h0, s)
- h1 = h & t.mask
- h2 = (h >> 16) & t.mask
- return
-}
-
-// init initializes the table with the given parameters.
-// h0 is the initial hash value,
-// k is the number of bits of hash value to use, and
-// x is the list of strings to store in the table.
-// init returns false if the table cannot be constructed.
-func (t *table) init(h0 uint32, k uint, x []string) bool {
- t.h0 = h0
- t.k = k
- t.tab = make([]string, 1<<k)
- t.mask = 1<<k - 1
- for _, s := range x {
- if !t.insert(s) {
- return false
- }
- }
- return true
-}
-
-// insert inserts s in the table.
-func (t *table) insert(s string) bool {
- h1, h2 := t.hash(s)
- if t.tab[h1] == "" {
- t.tab[h1] = s
- return true
- }
- if t.tab[h2] == "" {
- t.tab[h2] = s
- return true
- }
- if t.push(h1, 0) {
- t.tab[h1] = s
- return true
- }
- if t.push(h2, 0) {
- t.tab[h2] = s
- return true
- }
- return false
-}
-
-// push attempts to push aside the entry in slot i.
-func (t *table) push(i uint32, depth int) bool {
- if depth > len(t.tab) {
- return false
- }
- s := t.tab[i]
- h1, h2 := t.hash(s)
- j := h1 + h2 - i
- if t.tab[j] != "" && !t.push(j, depth+1) {
- return false
- }
- t.tab[j] = s
- return true
-}
-
-// The lists of element names and attribute keys were taken from
-// https://html.spec.whatwg.org/multipage/indices.html#index
-// as of the "HTML Living Standard - Last Updated 18 September 2017" version.
-
-// "command", "keygen" and "menuitem" have been removed from the spec,
-// but are kept here for backwards compatibility.
-var elements = []string{
- "a",
- "abbr",
- "address",
- "area",
- "article",
- "aside",
- "audio",
- "b",
- "base",
- "bdi",
- "bdo",
- "blockquote",
- "body",
- "br",
- "button",
- "canvas",
- "caption",
- "cite",
- "code",
- "col",
- "colgroup",
- "command",
- "data",
- "datalist",
- "dd",
- "del",
- "details",
- "dfn",
- "dialog",
- "div",
- "dl",
- "dt",
- "em",
- "embed",
- "fieldset",
- "figcaption",
- "figure",
- "footer",
- "form",
- "h1",
- "h2",
- "h3",
- "h4",
- "h5",
- "h6",
- "head",
- "header",
- "hgroup",
- "hr",
- "html",
- "i",
- "iframe",
- "img",
- "input",
- "ins",
- "kbd",
- "keygen",
- "label",
- "legend",
- "li",
- "link",
- "main",
- "map",
- "mark",
- "menu",
- "menuitem",
- "meta",
- "meter",
- "nav",
- "noscript",
- "object",
- "ol",
- "optgroup",
- "option",
- "output",
- "p",
- "param",
- "picture",
- "pre",
- "progress",
- "q",
- "rp",
- "rt",
- "ruby",
- "s",
- "samp",
- "script",
- "section",
- "select",
- "slot",
- "small",
- "source",
- "span",
- "strong",
- "style",
- "sub",
- "summary",
- "sup",
- "table",
- "tbody",
- "td",
- "template",
- "textarea",
- "tfoot",
- "th",
- "thead",
- "time",
- "title",
- "tr",
- "track",
- "u",
- "ul",
- "var",
- "video",
- "wbr",
-}
-
-// https://html.spec.whatwg.org/multipage/indices.html#attributes-3
-//
-// "challenge", "command", "contextmenu", "dropzone", "icon", "keytype", "mediagroup",
-// "radiogroup", "spellcheck", "scoped", "seamless", "sortable" and "sorted" have been removed from the spec,
-// but are kept here for backwards compatibility.
-var attributes = []string{
- "abbr",
- "accept",
- "accept-charset",
- "accesskey",
- "action",
- "allowfullscreen",
- "allowpaymentrequest",
- "allowusermedia",
- "alt",
- "as",
- "async",
- "autocomplete",
- "autofocus",
- "autoplay",
- "challenge",
- "charset",
- "checked",
- "cite",
- "class",
- "color",
- "cols",
- "colspan",
- "command",
- "content",
- "contenteditable",
- "contextmenu",
- "controls",
- "coords",
- "crossorigin",
- "data",
- "datetime",
- "default",
- "defer",
- "dir",
- "dirname",
- "disabled",
- "download",
- "draggable",
- "dropzone",
- "enctype",
- "for",
- "form",
- "formaction",
- "formenctype",
- "formmethod",
- "formnovalidate",
- "formtarget",
- "headers",
- "height",
- "hidden",
- "high",
- "href",
- "hreflang",
- "http-equiv",
- "icon",
- "id",
- "inputmode",
- "integrity",
- "is",
- "ismap",
- "itemid",
- "itemprop",
- "itemref",
- "itemscope",
- "itemtype",
- "keytype",
- "kind",
- "label",
- "lang",
- "list",
- "loop",
- "low",
- "manifest",
- "max",
- "maxlength",
- "media",
- "mediagroup",
- "method",
- "min",
- "minlength",
- "multiple",
- "muted",
- "name",
- "nomodule",
- "nonce",
- "novalidate",
- "open",
- "optimum",
- "pattern",
- "ping",
- "placeholder",
- "playsinline",
- "poster",
- "preload",
- "radiogroup",
- "readonly",
- "referrerpolicy",
- "rel",
- "required",
- "reversed",
- "rows",
- "rowspan",
- "sandbox",
- "spellcheck",
- "scope",
- "scoped",
- "seamless",
- "selected",
- "shape",
- "size",
- "sizes",
- "sortable",
- "sorted",
- "slot",
- "span",
- "spellcheck",
- "src",
- "srcdoc",
- "srclang",
- "srcset",
- "start",
- "step",
- "style",
- "tabindex",
- "target",
- "title",
- "translate",
- "type",
- "typemustmatch",
- "updateviacache",
- "usemap",
- "value",
- "width",
- "workertype",
- "wrap",
-}
-
-// "onautocomplete", "onautocompleteerror", "onmousewheel",
-// "onshow" and "onsort" have been removed from the spec,
-// but are kept here for backwards compatibility.
-var eventHandlers = []string{
- "onabort",
- "onautocomplete",
- "onautocompleteerror",
- "onauxclick",
- "onafterprint",
- "onbeforeprint",
- "onbeforeunload",
- "onblur",
- "oncancel",
- "oncanplay",
- "oncanplaythrough",
- "onchange",
- "onclick",
- "onclose",
- "oncontextmenu",
- "oncopy",
- "oncuechange",
- "oncut",
- "ondblclick",
- "ondrag",
- "ondragend",
- "ondragenter",
- "ondragexit",
- "ondragleave",
- "ondragover",
- "ondragstart",
- "ondrop",
- "ondurationchange",
- "onemptied",
- "onended",
- "onerror",
- "onfocus",
- "onhashchange",
- "oninput",
- "oninvalid",
- "onkeydown",
- "onkeypress",
- "onkeyup",
- "onlanguagechange",
- "onload",
- "onloadeddata",
- "onloadedmetadata",
- "onloadend",
- "onloadstart",
- "onmessage",
- "onmessageerror",
- "onmousedown",
- "onmouseenter",
- "onmouseleave",
- "onmousemove",
- "onmouseout",
- "onmouseover",
- "onmouseup",
- "onmousewheel",
- "onwheel",
- "onoffline",
- "ononline",
- "onpagehide",
- "onpageshow",
- "onpaste",
- "onpause",
- "onplay",
- "onplaying",
- "onpopstate",
- "onprogress",
- "onratechange",
- "onreset",
- "onresize",
- "onrejectionhandled",
- "onscroll",
- "onsecuritypolicyviolation",
- "onseeked",
- "onseeking",
- "onselect",
- "onshow",
- "onsort",
- "onstalled",
- "onstorage",
- "onsubmit",
- "onsuspend",
- "ontimeupdate",
- "ontoggle",
- "onunhandledrejection",
- "onunload",
- "onvolumechange",
- "onwaiting",
-}
-
-// extra are ad-hoc values not covered by any of the lists above.
-var extra = []string{
- "align",
- "annotation",
- "annotation-xml",
- "applet",
- "basefont",
- "bgsound",
- "big",
- "blink",
- "center",
- "color",
- "desc",
- "face",
- "font",
- "foreignObject", // HTML is case-insensitive, but SVG-embedded-in-HTML is case-sensitive.
- "foreignobject",
- "frame",
- "frameset",
- "image",
- "isindex",
- "listing",
- "malignmark",
- "marquee",
- "math",
- "mglyph",
- "mi",
- "mn",
- "mo",
- "ms",
- "mtext",
- "nobr",
- "noembed",
- "noframes",
- "plaintext",
- "prompt",
- "public",
- "spacer",
- "strike",
- "svg",
- "system",
- "tt",
- "xmp",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table.go
deleted file mode 100644
index f74018ece..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table.go
+++ /dev/null
@@ -1,777 +0,0 @@
-// Code generated by go generate gen.go; DO NOT EDIT.
-
-//go:generate go run gen.go
-
-package atom
-
-const (
- A Atom = 0x1
- Abbr Atom = 0x4
- Accept Atom = 0x1a06
- AcceptCharset Atom = 0x1a0e
- Accesskey Atom = 0x2c09
- Action Atom = 0x25a06
- Address Atom = 0x6ed07
- Align Atom = 0x6d405
- Allowfullscreen Atom = 0x1f00f
- Allowpaymentrequest Atom = 0x6913
- Allowusermedia Atom = 0x850e
- Alt Atom = 0xb003
- Annotation Atom = 0x1b90a
- AnnotationXml Atom = 0x1b90e
- Applet Atom = 0x30106
- Area Atom = 0x34a04
- Article Atom = 0x3f007
- As Atom = 0xb902
- Aside Atom = 0xc105
- Async Atom = 0xb905
- Audio Atom = 0xcf05
- Autocomplete Atom = 0x2600c
- Autofocus Atom = 0xeb09
- Autoplay Atom = 0x10608
- B Atom = 0x101
- Base Atom = 0x11504
- Basefont Atom = 0x11508
- Bdi Atom = 0x16103
- Bdo Atom = 0x13403
- Bgsound Atom = 0x14707
- Big Atom = 0x15903
- Blink Atom = 0x15c05
- Blockquote Atom = 0x1680a
- Body Atom = 0x2804
- Br Atom = 0x202
- Button Atom = 0x17206
- Canvas Atom = 0xbd06
- Caption Atom = 0x21907
- Center Atom = 0x20806
- Challenge Atom = 0x28309
- Charset Atom = 0x2107
- Checked Atom = 0x46d07
- Cite Atom = 0x55804
- Class Atom = 0x5b905
- Code Atom = 0x19004
- Col Atom = 0x19703
- Colgroup Atom = 0x19708
- Color Atom = 0x1af05
- Cols Atom = 0x1b404
- Colspan Atom = 0x1b407
- Command Atom = 0x1c707
- Content Atom = 0x57f07
- Contenteditable Atom = 0x57f0f
- Contextmenu Atom = 0x3740b
- Controls Atom = 0x1ce08
- Coords Atom = 0x1da06
- Crossorigin Atom = 0x1e30b
- Data Atom = 0x49904
- Datalist Atom = 0x49908
- Datetime Atom = 0x2a008
- Dd Atom = 0x2bf02
- Default Atom = 0xc407
- Defer Atom = 0x19205
- Del Atom = 0x44603
- Desc Atom = 0x55504
- Details Atom = 0x4607
- Dfn Atom = 0x5f03
- Dialog Atom = 0x16206
- Dir Atom = 0xa303
- Dirname Atom = 0xa307
- Disabled Atom = 0x14d08
- Div Atom = 0x15403
- Dl Atom = 0x5e202
- Download Atom = 0x45708
- Draggable Atom = 0x18309
- Dropzone Atom = 0x3f908
- Dt Atom = 0x64702
- Em Atom = 0x4202
- Embed Atom = 0x4205
- Enctype Atom = 0x27507
- Face Atom = 0x20604
- Fieldset Atom = 0x20e08
- Figcaption Atom = 0x2160a
- Figure Atom = 0x23006
- Font Atom = 0x11904
- Footer Atom = 0xb306
- For Atom = 0x23c03
- ForeignObject Atom = 0x23c0d
- Foreignobject Atom = 0x2490d
- Form Atom = 0x25604
- Formaction Atom = 0x2560a
- Formenctype Atom = 0x2710b
- Formmethod Atom = 0x28c0a
- Formnovalidate Atom = 0x2960e
- Formtarget Atom = 0x2a80a
- Frame Atom = 0x5705
- Frameset Atom = 0x5708
- H1 Atom = 0x14502
- H2 Atom = 0x2c602
- H3 Atom = 0x2f502
- H4 Atom = 0x33902
- H5 Atom = 0x34302
- H6 Atom = 0x64902
- Head Atom = 0x32504
- Header Atom = 0x32506
- Headers Atom = 0x32507
- Height Atom = 0x12c06
- Hgroup Atom = 0x2b206
- Hidden Atom = 0x2bd06
- High Atom = 0x2c304
- Hr Atom = 0x14002
- Href Atom = 0x2c804
- Hreflang Atom = 0x2c808
- Html Atom = 0x13004
- HttpEquiv Atom = 0x2d00a
- I Atom = 0x601
- Icon Atom = 0x57e04
- Id Atom = 0xc302
- Iframe Atom = 0x2e406
- Image Atom = 0x2ea05
- Img Atom = 0x2ef03
- Input Atom = 0x43f05
- Inputmode Atom = 0x43f09
- Ins Atom = 0x1ec03
- Integrity Atom = 0x22709
- Is Atom = 0x14e02
- Isindex Atom = 0x2f707
- Ismap Atom = 0x2fe05
- Itemid Atom = 0x37f06
- Itemprop Atom = 0x55908
- Itemref Atom = 0x3c107
- Itemscope Atom = 0x66d09
- Itemtype Atom = 0x30708
- Kbd Atom = 0x16003
- Keygen Atom = 0x3206
- Keytype Atom = 0x7e07
- Kind Atom = 0x18004
- Label Atom = 0xda05
- Lang Atom = 0x2cc04
- Legend Atom = 0x18a06
- Li Atom = 0x11102
- Link Atom = 0x15d04
- List Atom = 0x49d04
- Listing Atom = 0x49d07
- Loop Atom = 0xde04
- Low Atom = 0x6b03
- Main Atom = 0x1004
- Malignmark Atom = 0x6d30a
- Manifest Atom = 0x30f08
- Map Atom = 0x30003
- Mark Atom = 0x6d904
- Marquee Atom = 0x31b07
- Math Atom = 0x32204
- Max Atom = 0x33103
- Maxlength Atom = 0x33109
- Media Atom = 0x8e05
- Mediagroup Atom = 0x8e0a
- Menu Atom = 0x37b04
- Menuitem Atom = 0x37b08
- Meta Atom = 0x4ac04
- Meter Atom = 0xa805
- Method Atom = 0x29006
- Mglyph Atom = 0x2f006
- Mi Atom = 0x33b02
- Min Atom = 0x33b03
- Minlength Atom = 0x33b09
- Mn Atom = 0x29902
- Mo Atom = 0x6302
- Ms Atom = 0x67002
- Mtext Atom = 0x34505
- Multiple Atom = 0x35308
- Muted Atom = 0x35b05
- Name Atom = 0xa604
- Nav Atom = 0x1303
- Nobr Atom = 0x3704
- Noembed Atom = 0x4007
- Noframes Atom = 0x5508
- Nomodule Atom = 0x6108
- Nonce Atom = 0x56205
- Noscript Atom = 0x1fe08
- Novalidate Atom = 0x29a0a
- Object Atom = 0x25006
- Ol Atom = 0x10102
- Onabort Atom = 0x17607
- Onafterprint Atom = 0x21e0c
- Onautocomplete Atom = 0x25e0e
- Onautocompleteerror Atom = 0x25e13
- Onauxclick Atom = 0x61b0a
- Onbeforeprint Atom = 0x69a0d
- Onbeforeunload Atom = 0x6e10e
- Onblur Atom = 0x5c206
- Oncancel Atom = 0xd308
- Oncanplay Atom = 0x13609
- Oncanplaythrough Atom = 0x13610
- Onchange Atom = 0x40f08
- Onclick Atom = 0x2dd07
- Onclose Atom = 0x36007
- Oncontextmenu Atom = 0x3720d
- Oncopy Atom = 0x38506
- Oncuechange Atom = 0x38b0b
- Oncut Atom = 0x39605
- Ondblclick Atom = 0x39b0a
- Ondrag Atom = 0x3a506
- Ondragend Atom = 0x3a509
- Ondragenter Atom = 0x3ae0b
- Ondragexit Atom = 0x3b90a
- Ondragleave Atom = 0x3d30b
- Ondragover Atom = 0x3de0a
- Ondragstart Atom = 0x3e80b
- Ondrop Atom = 0x3f706
- Ondurationchange Atom = 0x40710
- Onemptied Atom = 0x3fe09
- Onended Atom = 0x41707
- Onerror Atom = 0x41e07
- Onfocus Atom = 0x42507
- Onhashchange Atom = 0x4310c
- Oninput Atom = 0x43d07
- Oninvalid Atom = 0x44909
- Onkeydown Atom = 0x45209
- Onkeypress Atom = 0x45f0a
- Onkeyup Atom = 0x47407
- Onlanguagechange Atom = 0x48110
- Onload Atom = 0x49106
- Onloadeddata Atom = 0x4910c
- Onloadedmetadata Atom = 0x4a410
- Onloadend Atom = 0x4ba09
- Onloadstart Atom = 0x4c30b
- Onmessage Atom = 0x4ce09
- Onmessageerror Atom = 0x4ce0e
- Onmousedown Atom = 0x4dc0b
- Onmouseenter Atom = 0x4e70c
- Onmouseleave Atom = 0x4f30c
- Onmousemove Atom = 0x4ff0b
- Onmouseout Atom = 0x50a0a
- Onmouseover Atom = 0x5170b
- Onmouseup Atom = 0x52209
- Onmousewheel Atom = 0x5300c
- Onoffline Atom = 0x53c09
- Ononline Atom = 0x54508
- Onpagehide Atom = 0x54d0a
- Onpageshow Atom = 0x5670a
- Onpaste Atom = 0x57307
- Onpause Atom = 0x58e07
- Onplay Atom = 0x59806
- Onplaying Atom = 0x59809
- Onpopstate Atom = 0x5a10a
- Onprogress Atom = 0x5ab0a
- Onratechange Atom = 0x5c80c
- Onrejectionhandled Atom = 0x5d412
- Onreset Atom = 0x5e607
- Onresize Atom = 0x5ed08
- Onscroll Atom = 0x5fc08
- Onsecuritypolicyviolation Atom = 0x60419
- Onseeked Atom = 0x62508
- Onseeking Atom = 0x62d09
- Onselect Atom = 0x63608
- Onshow Atom = 0x64006
- Onsort Atom = 0x64b06
- Onstalled Atom = 0x65509
- Onstorage Atom = 0x65e09
- Onsubmit Atom = 0x66708
- Onsuspend Atom = 0x67709
- Ontimeupdate Atom = 0x11a0c
- Ontoggle Atom = 0x68008
- Onunhandledrejection Atom = 0x68814
- Onunload Atom = 0x6a708
- Onvolumechange Atom = 0x6af0e
- Onwaiting Atom = 0x6bd09
- Onwheel Atom = 0x6c607
- Open Atom = 0x55f04
- Optgroup Atom = 0xe008
- Optimum Atom = 0x6cd07
- Option Atom = 0x6dd06
- Output Atom = 0x51106
- P Atom = 0xc01
- Param Atom = 0xc05
- Pattern Atom = 0x4f07
- Picture Atom = 0x9707
- Ping Atom = 0xe704
- Placeholder Atom = 0xfb0b
- Plaintext Atom = 0x19e09
- Playsinline Atom = 0x10a0b
- Poster Atom = 0x2b706
- Pre Atom = 0x46403
- Preload Atom = 0x47a07
- Progress Atom = 0x5ad08
- Prompt Atom = 0x52a06
- Public Atom = 0x57a06
- Q Atom = 0x7701
- Radiogroup Atom = 0x30a
- Readonly Atom = 0x34b08
- Referrerpolicy Atom = 0x3c50e
- Rel Atom = 0x47b03
- Required Atom = 0x23408
- Reversed Atom = 0x9c08
- Rows Atom = 0x3a04
- Rowspan Atom = 0x3a07
- Rp Atom = 0x22402
- Rt Atom = 0x17b02
- Ruby Atom = 0xac04
- S Atom = 0x2501
- Samp Atom = 0x4c04
- Sandbox Atom = 0xf307
- Scope Atom = 0x67105
- Scoped Atom = 0x67106
- Script Atom = 0x20006
- Seamless Atom = 0x36508
- Section Atom = 0x5bd07
- Select Atom = 0x63806
- Selected Atom = 0x63808
- Shape Atom = 0x1d505
- Size Atom = 0x5f104
- Sizes Atom = 0x5f105
- Slot Atom = 0x1df04
- Small Atom = 0x1ee05
- Sortable Atom = 0x64d08
- Sorted Atom = 0x32b06
- Source Atom = 0x36c06
- Spacer Atom = 0x42b06
- Span Atom = 0x3d04
- Spellcheck Atom = 0x4680a
- Src Atom = 0x5b403
- Srcdoc Atom = 0x5b406
- Srclang Atom = 0x5f507
- Srcset Atom = 0x6f306
- Start Atom = 0x3ee05
- Step Atom = 0x57704
- Strike Atom = 0x7a06
- Strong Atom = 0x31506
- Style Atom = 0x6f905
- Sub Atom = 0x66903
- Summary Atom = 0x6fe07
- Sup Atom = 0x70503
- Svg Atom = 0x70803
- System Atom = 0x70b06
- Tabindex Atom = 0x4b208
- Table Atom = 0x58905
- Target Atom = 0x2ac06
- Tbody Atom = 0x2705
- Td Atom = 0x5e02
- Template Atom = 0x70e08
- Textarea Atom = 0x34608
- Tfoot Atom = 0xb205
- Th Atom = 0x13f02
- Thead Atom = 0x32405
- Time Atom = 0x11c04
- Title Atom = 0xca05
- Tr Atom = 0x7402
- Track Atom = 0x17c05
- Translate Atom = 0x1a609
- Tt Atom = 0x5102
- Type Atom = 0x8104
- Typemustmatch Atom = 0x2780d
- U Atom = 0xb01
- Ul Atom = 0x6602
- Updateviacache Atom = 0x1200e
- Usemap Atom = 0x59206
- Value Atom = 0x1505
- Var Atom = 0x15603
- Video Atom = 0x2d905
- Wbr Atom = 0x57003
- Width Atom = 0x64505
- Workertype Atom = 0x7160a
- Wrap Atom = 0x72004
- Xmp Atom = 0xf903
-)
-
-const hash0 = 0x81cdf10e
-
-const maxAtomLen = 25
-
-var table = [1 << 9]Atom{
- 0x1: 0x8e0a, // mediagroup
- 0x2: 0x2cc04, // lang
- 0x4: 0x2c09, // accesskey
- 0x5: 0x5708, // frameset
- 0x7: 0x63608, // onselect
- 0x8: 0x70b06, // system
- 0xa: 0x64505, // width
- 0xc: 0x2710b, // formenctype
- 0xd: 0x10102, // ol
- 0xe: 0x38b0b, // oncuechange
- 0x10: 0x13403, // bdo
- 0x11: 0xcf05, // audio
- 0x12: 0x18309, // draggable
- 0x14: 0x2d905, // video
- 0x15: 0x29902, // mn
- 0x16: 0x37b04, // menu
- 0x17: 0x2b706, // poster
- 0x19: 0xb306, // footer
- 0x1a: 0x29006, // method
- 0x1b: 0x2a008, // datetime
- 0x1c: 0x17607, // onabort
- 0x1d: 0x1200e, // updateviacache
- 0x1e: 0xb905, // async
- 0x1f: 0x49106, // onload
- 0x21: 0xd308, // oncancel
- 0x22: 0x62508, // onseeked
- 0x23: 0x2ea05, // image
- 0x24: 0x5d412, // onrejectionhandled
- 0x26: 0x15d04, // link
- 0x27: 0x51106, // output
- 0x28: 0x32504, // head
- 0x29: 0x4f30c, // onmouseleave
- 0x2a: 0x57307, // onpaste
- 0x2b: 0x59809, // onplaying
- 0x2c: 0x1b407, // colspan
- 0x2f: 0x1af05, // color
- 0x30: 0x5f104, // size
- 0x31: 0x2d00a, // http-equiv
- 0x33: 0x601, // i
- 0x34: 0x54d0a, // onpagehide
- 0x35: 0x68814, // onunhandledrejection
- 0x37: 0x41e07, // onerror
- 0x3a: 0x11508, // basefont
- 0x3f: 0x1303, // nav
- 0x40: 0x18004, // kind
- 0x41: 0x34b08, // readonly
- 0x42: 0x2f006, // mglyph
- 0x44: 0x11102, // li
- 0x46: 0x2bd06, // hidden
- 0x47: 0x70803, // svg
- 0x48: 0x57704, // step
- 0x49: 0x22709, // integrity
- 0x4a: 0x57a06, // public
- 0x4c: 0x19703, // col
- 0x4d: 0x1680a, // blockquote
- 0x4e: 0x34302, // h5
- 0x50: 0x5ad08, // progress
- 0x51: 0x5f105, // sizes
- 0x52: 0x33902, // h4
- 0x56: 0x32405, // thead
- 0x57: 0x7e07, // keytype
- 0x58: 0x5ab0a, // onprogress
- 0x59: 0x43f09, // inputmode
- 0x5a: 0x3a509, // ondragend
- 0x5d: 0x39605, // oncut
- 0x5e: 0x42b06, // spacer
- 0x5f: 0x19708, // colgroup
- 0x62: 0x14e02, // is
- 0x65: 0xb902, // as
- 0x66: 0x53c09, // onoffline
- 0x67: 0x32b06, // sorted
- 0x69: 0x48110, // onlanguagechange
- 0x6c: 0x4310c, // onhashchange
- 0x6d: 0xa604, // name
- 0x6e: 0xb205, // tfoot
- 0x6f: 0x55504, // desc
- 0x70: 0x33103, // max
- 0x72: 0x1da06, // coords
- 0x73: 0x2f502, // h3
- 0x74: 0x6e10e, // onbeforeunload
- 0x75: 0x3a04, // rows
- 0x76: 0x63806, // select
- 0x77: 0xa805, // meter
- 0x78: 0x37f06, // itemid
- 0x79: 0x5300c, // onmousewheel
- 0x7a: 0x5b406, // srcdoc
- 0x7d: 0x17c05, // track
- 0x7f: 0x30708, // itemtype
- 0x82: 0x6302, // mo
- 0x83: 0x40f08, // onchange
- 0x84: 0x32507, // headers
- 0x85: 0x5c80c, // onratechange
- 0x86: 0x60419, // onsecuritypolicyviolation
- 0x88: 0x49908, // datalist
- 0x89: 0x4dc0b, // onmousedown
- 0x8a: 0x1df04, // slot
- 0x8b: 0x4a410, // onloadedmetadata
- 0x8c: 0x1a06, // accept
- 0x8d: 0x25006, // object
- 0x91: 0x6af0e, // onvolumechange
- 0x92: 0x2107, // charset
- 0x93: 0x25e13, // onautocompleteerror
- 0x94: 0x6913, // allowpaymentrequest
- 0x95: 0x2804, // body
- 0x96: 0xc407, // default
- 0x97: 0x63808, // selected
- 0x98: 0x20604, // face
- 0x99: 0x1d505, // shape
- 0x9b: 0x68008, // ontoggle
- 0x9e: 0x64702, // dt
- 0x9f: 0x6d904, // mark
- 0xa1: 0xb01, // u
- 0xa4: 0x6a708, // onunload
- 0xa5: 0xde04, // loop
- 0xa6: 0x14d08, // disabled
- 0xaa: 0x41707, // onended
- 0xab: 0x6d30a, // malignmark
- 0xad: 0x67709, // onsuspend
- 0xae: 0x34505, // mtext
- 0xaf: 0x64b06, // onsort
- 0xb0: 0x55908, // itemprop
- 0xb3: 0x66d09, // itemscope
- 0xb4: 0x15c05, // blink
- 0xb6: 0x3a506, // ondrag
- 0xb7: 0x6602, // ul
- 0xb8: 0x25604, // form
- 0xb9: 0xf307, // sandbox
- 0xba: 0x5705, // frame
- 0xbb: 0x1505, // value
- 0xbc: 0x65e09, // onstorage
- 0xc0: 0x17b02, // rt
- 0xc2: 0x202, // br
- 0xc3: 0x20e08, // fieldset
- 0xc4: 0x2780d, // typemustmatch
- 0xc5: 0x6108, // nomodule
- 0xc6: 0x4007, // noembed
- 0xc7: 0x69a0d, // onbeforeprint
- 0xc8: 0x17206, // button
- 0xc9: 0x2dd07, // onclick
- 0xca: 0x6fe07, // summary
- 0xcd: 0xac04, // ruby
- 0xce: 0x5b905, // class
- 0xcf: 0x3e80b, // ondragstart
- 0xd0: 0x21907, // caption
- 0xd4: 0x850e, // allowusermedia
- 0xd5: 0x4c30b, // onloadstart
- 0xd9: 0x15403, // div
- 0xda: 0x49d04, // list
- 0xdb: 0x32204, // math
- 0xdc: 0x43f05, // input
- 0xdf: 0x3de0a, // ondragover
- 0xe0: 0x2c602, // h2
- 0xe2: 0x19e09, // plaintext
- 0xe4: 0x4e70c, // onmouseenter
- 0xe7: 0x46d07, // checked
- 0xe8: 0x46403, // pre
- 0xea: 0x35308, // multiple
- 0xeb: 0x16103, // bdi
- 0xec: 0x33109, // maxlength
- 0xed: 0x7701, // q
- 0xee: 0x61b0a, // onauxclick
- 0xf0: 0x57003, // wbr
- 0xf2: 0x11504, // base
- 0xf3: 0x6dd06, // option
- 0xf5: 0x40710, // ondurationchange
- 0xf7: 0x5508, // noframes
- 0xf9: 0x3f908, // dropzone
- 0xfb: 0x67105, // scope
- 0xfc: 0x9c08, // reversed
- 0xfd: 0x3ae0b, // ondragenter
- 0xfe: 0x3ee05, // start
- 0xff: 0xf903, // xmp
- 0x100: 0x5f507, // srclang
- 0x101: 0x2ef03, // img
- 0x104: 0x101, // b
- 0x105: 0x23c03, // for
- 0x106: 0xc105, // aside
- 0x107: 0x43d07, // oninput
- 0x108: 0x34a04, // area
- 0x109: 0x28c0a, // formmethod
- 0x10a: 0x72004, // wrap
- 0x10c: 0x22402, // rp
- 0x10d: 0x45f0a, // onkeypress
- 0x10e: 0x5102, // tt
- 0x110: 0x33b02, // mi
- 0x111: 0x35b05, // muted
- 0x112: 0xb003, // alt
- 0x113: 0x19004, // code
- 0x114: 0x4202, // em
- 0x115: 0x3b90a, // ondragexit
- 0x117: 0x3d04, // span
- 0x119: 0x30f08, // manifest
- 0x11a: 0x37b08, // menuitem
- 0x11b: 0x57f07, // content
- 0x11d: 0x6bd09, // onwaiting
- 0x11f: 0x4ba09, // onloadend
- 0x121: 0x3720d, // oncontextmenu
- 0x123: 0x5c206, // onblur
- 0x124: 0x3f007, // article
- 0x125: 0xa303, // dir
- 0x126: 0xe704, // ping
- 0x127: 0x23408, // required
- 0x128: 0x44909, // oninvalid
- 0x129: 0x6d405, // align
- 0x12b: 0x57e04, // icon
- 0x12c: 0x64902, // h6
- 0x12d: 0x1b404, // cols
- 0x12e: 0x2160a, // figcaption
- 0x12f: 0x45209, // onkeydown
- 0x130: 0x66708, // onsubmit
- 0x131: 0x13609, // oncanplay
- 0x132: 0x70503, // sup
- 0x133: 0xc01, // p
- 0x135: 0x3fe09, // onemptied
- 0x136: 0x38506, // oncopy
- 0x137: 0x55804, // cite
- 0x138: 0x39b0a, // ondblclick
- 0x13a: 0x4ff0b, // onmousemove
- 0x13c: 0x66903, // sub
- 0x13d: 0x47b03, // rel
- 0x13e: 0xe008, // optgroup
- 0x142: 0x3a07, // rowspan
- 0x143: 0x36c06, // source
- 0x144: 0x1fe08, // noscript
- 0x145: 0x55f04, // open
- 0x146: 0x1ec03, // ins
- 0x147: 0x23c0d, // foreignObject
- 0x148: 0x5a10a, // onpopstate
- 0x14a: 0x27507, // enctype
- 0x14b: 0x25e0e, // onautocomplete
- 0x14c: 0x34608, // textarea
- 0x14e: 0x2600c, // autocomplete
- 0x14f: 0x14002, // hr
- 0x150: 0x1ce08, // controls
- 0x151: 0xc302, // id
- 0x153: 0x21e0c, // onafterprint
- 0x155: 0x2490d, // foreignobject
- 0x156: 0x31b07, // marquee
- 0x157: 0x58e07, // onpause
- 0x158: 0x5e202, // dl
- 0x159: 0x12c06, // height
- 0x15a: 0x33b03, // min
- 0x15b: 0xa307, // dirname
- 0x15c: 0x1a609, // translate
- 0x15d: 0x13004, // html
- 0x15e: 0x33b09, // minlength
- 0x15f: 0x47a07, // preload
- 0x160: 0x70e08, // template
- 0x161: 0x3d30b, // ondragleave
- 0x164: 0x5b403, // src
- 0x165: 0x31506, // strong
- 0x167: 0x4c04, // samp
- 0x168: 0x6ed07, // address
- 0x169: 0x54508, // ononline
- 0x16b: 0xfb0b, // placeholder
- 0x16c: 0x2ac06, // target
- 0x16d: 0x1ee05, // small
- 0x16e: 0x6c607, // onwheel
- 0x16f: 0x1b90a, // annotation
- 0x170: 0x4680a, // spellcheck
- 0x171: 0x4607, // details
- 0x172: 0xbd06, // canvas
- 0x173: 0xeb09, // autofocus
- 0x174: 0xc05, // param
- 0x176: 0x45708, // download
- 0x177: 0x44603, // del
- 0x178: 0x36007, // onclose
- 0x179: 0x16003, // kbd
- 0x17a: 0x30106, // applet
- 0x17b: 0x2c804, // href
- 0x17c: 0x5ed08, // onresize
- 0x17e: 0x4910c, // onloadeddata
- 0x180: 0x7402, // tr
- 0x181: 0x2a80a, // formtarget
- 0x182: 0xca05, // title
- 0x183: 0x6f905, // style
- 0x184: 0x7a06, // strike
- 0x185: 0x59206, // usemap
- 0x186: 0x2e406, // iframe
- 0x187: 0x1004, // main
- 0x189: 0x9707, // picture
- 0x18c: 0x2fe05, // ismap
- 0x18e: 0x49904, // data
- 0x18f: 0xda05, // label
- 0x191: 0x3c50e, // referrerpolicy
- 0x192: 0x13f02, // th
- 0x194: 0x52a06, // prompt
- 0x195: 0x5bd07, // section
- 0x197: 0x6cd07, // optimum
- 0x198: 0x2c304, // high
- 0x199: 0x14502, // h1
- 0x19a: 0x65509, // onstalled
- 0x19b: 0x15603, // var
- 0x19c: 0x11c04, // time
- 0x19e: 0x67002, // ms
- 0x19f: 0x32506, // header
- 0x1a0: 0x4ce09, // onmessage
- 0x1a1: 0x56205, // nonce
- 0x1a2: 0x2560a, // formaction
- 0x1a3: 0x20806, // center
- 0x1a4: 0x3704, // nobr
- 0x1a5: 0x58905, // table
- 0x1a6: 0x49d07, // listing
- 0x1a7: 0x18a06, // legend
- 0x1a9: 0x28309, // challenge
- 0x1aa: 0x23006, // figure
- 0x1ab: 0x8e05, // media
- 0x1ae: 0x8104, // type
- 0x1af: 0x11904, // font
- 0x1b0: 0x4ce0e, // onmessageerror
- 0x1b1: 0x36508, // seamless
- 0x1b2: 0x5f03, // dfn
- 0x1b3: 0x19205, // defer
- 0x1b4: 0x6b03, // low
- 0x1b5: 0x62d09, // onseeking
- 0x1b6: 0x5170b, // onmouseover
- 0x1b7: 0x29a0a, // novalidate
- 0x1b8: 0x7160a, // workertype
- 0x1ba: 0x3c107, // itemref
- 0x1bd: 0x1, // a
- 0x1be: 0x30003, // map
- 0x1bf: 0x11a0c, // ontimeupdate
- 0x1c0: 0x14707, // bgsound
- 0x1c1: 0x3206, // keygen
- 0x1c2: 0x2705, // tbody
- 0x1c5: 0x64006, // onshow
- 0x1c7: 0x2501, // s
- 0x1c8: 0x4f07, // pattern
- 0x1cc: 0x13610, // oncanplaythrough
- 0x1ce: 0x2bf02, // dd
- 0x1cf: 0x6f306, // srcset
- 0x1d0: 0x15903, // big
- 0x1d2: 0x64d08, // sortable
- 0x1d3: 0x47407, // onkeyup
- 0x1d5: 0x59806, // onplay
- 0x1d7: 0x4ac04, // meta
- 0x1d8: 0x3f706, // ondrop
- 0x1da: 0x5fc08, // onscroll
- 0x1db: 0x1e30b, // crossorigin
- 0x1dc: 0x5670a, // onpageshow
- 0x1dd: 0x4, // abbr
- 0x1de: 0x5e02, // td
- 0x1df: 0x57f0f, // contenteditable
- 0x1e0: 0x25a06, // action
- 0x1e1: 0x10a0b, // playsinline
- 0x1e2: 0x42507, // onfocus
- 0x1e3: 0x2c808, // hreflang
- 0x1e5: 0x50a0a, // onmouseout
- 0x1e6: 0x5e607, // onreset
- 0x1e7: 0x10608, // autoplay
- 0x1ea: 0x67106, // scoped
- 0x1ec: 0x30a, // radiogroup
- 0x1ee: 0x3740b, // contextmenu
- 0x1ef: 0x52209, // onmouseup
- 0x1f1: 0x2b206, // hgroup
- 0x1f2: 0x1f00f, // allowfullscreen
- 0x1f3: 0x4b208, // tabindex
- 0x1f6: 0x2f707, // isindex
- 0x1f7: 0x1a0e, // accept-charset
- 0x1f8: 0x2960e, // formnovalidate
- 0x1fb: 0x1b90e, // annotation-xml
- 0x1fc: 0x4205, // embed
- 0x1fd: 0x20006, // script
- 0x1fe: 0x16206, // dialog
- 0x1ff: 0x1c707, // command
-}
-
-const atomText = "abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobro" +
- "wspanoembedetailsampatternoframesetdfnomoduleallowpaymentreq" +
- "uestrikeytypeallowusermediagroupictureversedirnameterubyaltf" +
- "ooterasyncanvasidefaultitleaudioncancelabelooptgroupingautof" +
- "ocusandboxmplaceholderautoplaysinlinebasefontimeupdateviacac" +
- "heightmlbdoncanplaythrough1bgsoundisabledivarbigblinkbdialog" +
- "blockquotebuttonabortrackindraggablegendcodefercolgrouplaint" +
- "extranslatecolorcolspannotation-xmlcommandcontrolshapecoords" +
- "lotcrossoriginsmallowfullscreenoscriptfacenterfieldsetfigcap" +
- "tionafterprintegrityfigurequiredforeignObjectforeignobjectfo" +
- "rmactionautocompleteerrorformenctypemustmatchallengeformmeth" +
- "odformnovalidatetimeformtargethgrouposterhiddenhigh2hreflang" +
- "http-equivideonclickiframeimageimglyph3isindexismappletitemt" +
- "ypemanifestrongmarqueematheadersortedmaxlength4minlength5mte" +
- "xtareadonlymultiplemutedoncloseamlessourceoncontextmenuitemi" +
- "doncopyoncuechangeoncutondblclickondragendondragenterondrage" +
- "xitemreferrerpolicyondragleaveondragoverondragstarticleondro" +
- "pzonemptiedondurationchangeonendedonerroronfocuspaceronhashc" +
- "hangeoninputmodeloninvalidonkeydownloadonkeypresspellchecked" +
- "onkeyupreloadonlanguagechangeonloadeddatalistingonloadedmeta" +
- "databindexonloadendonloadstartonmessageerroronmousedownonmou" +
- "seenteronmouseleaveonmousemoveonmouseoutputonmouseoveronmous" +
- "eupromptonmousewheelonofflineononlineonpagehidescitempropeno" +
- "nceonpageshowbronpastepublicontenteditableonpausemaponplayin" +
- "gonpopstateonprogressrcdoclassectionbluronratechangeonreject" +
- "ionhandledonresetonresizesrclangonscrollonsecuritypolicyviol" +
- "ationauxclickonseekedonseekingonselectedonshowidth6onsortabl" +
- "eonstalledonstorageonsubmitemscopedonsuspendontoggleonunhand" +
- "ledrejectionbeforeprintonunloadonvolumechangeonwaitingonwhee" +
- "loptimumalignmarkoptionbeforeunloaddressrcsetstylesummarysup" +
- "svgsystemplateworkertypewrap"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table_test.go
deleted file mode 100644
index 16891054f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/atom/table_test.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Code generated by go generate gen.go; DO NOT EDIT.
-
-//go:generate go run gen.go -test
-
-package atom
-
-var testAtomList = []string{
- "a",
- "abbr",
- "accept",
- "accept-charset",
- "accesskey",
- "action",
- "address",
- "align",
- "allowfullscreen",
- "allowpaymentrequest",
- "allowusermedia",
- "alt",
- "annotation",
- "annotation-xml",
- "applet",
- "area",
- "article",
- "as",
- "aside",
- "async",
- "audio",
- "autocomplete",
- "autofocus",
- "autoplay",
- "b",
- "base",
- "basefont",
- "bdi",
- "bdo",
- "bgsound",
- "big",
- "blink",
- "blockquote",
- "body",
- "br",
- "button",
- "canvas",
- "caption",
- "center",
- "challenge",
- "charset",
- "checked",
- "cite",
- "class",
- "code",
- "col",
- "colgroup",
- "color",
- "cols",
- "colspan",
- "command",
- "content",
- "contenteditable",
- "contextmenu",
- "controls",
- "coords",
- "crossorigin",
- "data",
- "datalist",
- "datetime",
- "dd",
- "default",
- "defer",
- "del",
- "desc",
- "details",
- "dfn",
- "dialog",
- "dir",
- "dirname",
- "disabled",
- "div",
- "dl",
- "download",
- "draggable",
- "dropzone",
- "dt",
- "em",
- "embed",
- "enctype",
- "face",
- "fieldset",
- "figcaption",
- "figure",
- "font",
- "footer",
- "for",
- "foreignObject",
- "foreignobject",
- "form",
- "formaction",
- "formenctype",
- "formmethod",
- "formnovalidate",
- "formtarget",
- "frame",
- "frameset",
- "h1",
- "h2",
- "h3",
- "h4",
- "h5",
- "h6",
- "head",
- "header",
- "headers",
- "height",
- "hgroup",
- "hidden",
- "high",
- "hr",
- "href",
- "hreflang",
- "html",
- "http-equiv",
- "i",
- "icon",
- "id",
- "iframe",
- "image",
- "img",
- "input",
- "inputmode",
- "ins",
- "integrity",
- "is",
- "isindex",
- "ismap",
- "itemid",
- "itemprop",
- "itemref",
- "itemscope",
- "itemtype",
- "kbd",
- "keygen",
- "keytype",
- "kind",
- "label",
- "lang",
- "legend",
- "li",
- "link",
- "list",
- "listing",
- "loop",
- "low",
- "main",
- "malignmark",
- "manifest",
- "map",
- "mark",
- "marquee",
- "math",
- "max",
- "maxlength",
- "media",
- "mediagroup",
- "menu",
- "menuitem",
- "meta",
- "meter",
- "method",
- "mglyph",
- "mi",
- "min",
- "minlength",
- "mn",
- "mo",
- "ms",
- "mtext",
- "multiple",
- "muted",
- "name",
- "nav",
- "nobr",
- "noembed",
- "noframes",
- "nomodule",
- "nonce",
- "noscript",
- "novalidate",
- "object",
- "ol",
- "onabort",
- "onafterprint",
- "onautocomplete",
- "onautocompleteerror",
- "onauxclick",
- "onbeforeprint",
- "onbeforeunload",
- "onblur",
- "oncancel",
- "oncanplay",
- "oncanplaythrough",
- "onchange",
- "onclick",
- "onclose",
- "oncontextmenu",
- "oncopy",
- "oncuechange",
- "oncut",
- "ondblclick",
- "ondrag",
- "ondragend",
- "ondragenter",
- "ondragexit",
- "ondragleave",
- "ondragover",
- "ondragstart",
- "ondrop",
- "ondurationchange",
- "onemptied",
- "onended",
- "onerror",
- "onfocus",
- "onhashchange",
- "oninput",
- "oninvalid",
- "onkeydown",
- "onkeypress",
- "onkeyup",
- "onlanguagechange",
- "onload",
- "onloadeddata",
- "onloadedmetadata",
- "onloadend",
- "onloadstart",
- "onmessage",
- "onmessageerror",
- "onmousedown",
- "onmouseenter",
- "onmouseleave",
- "onmousemove",
- "onmouseout",
- "onmouseover",
- "onmouseup",
- "onmousewheel",
- "onoffline",
- "ononline",
- "onpagehide",
- "onpageshow",
- "onpaste",
- "onpause",
- "onplay",
- "onplaying",
- "onpopstate",
- "onprogress",
- "onratechange",
- "onrejectionhandled",
- "onreset",
- "onresize",
- "onscroll",
- "onsecuritypolicyviolation",
- "onseeked",
- "onseeking",
- "onselect",
- "onshow",
- "onsort",
- "onstalled",
- "onstorage",
- "onsubmit",
- "onsuspend",
- "ontimeupdate",
- "ontoggle",
- "onunhandledrejection",
- "onunload",
- "onvolumechange",
- "onwaiting",
- "onwheel",
- "open",
- "optgroup",
- "optimum",
- "option",
- "output",
- "p",
- "param",
- "pattern",
- "picture",
- "ping",
- "placeholder",
- "plaintext",
- "playsinline",
- "poster",
- "pre",
- "preload",
- "progress",
- "prompt",
- "public",
- "q",
- "radiogroup",
- "readonly",
- "referrerpolicy",
- "rel",
- "required",
- "reversed",
- "rows",
- "rowspan",
- "rp",
- "rt",
- "ruby",
- "s",
- "samp",
- "sandbox",
- "scope",
- "scoped",
- "script",
- "seamless",
- "section",
- "select",
- "selected",
- "shape",
- "size",
- "sizes",
- "slot",
- "small",
- "sortable",
- "sorted",
- "source",
- "spacer",
- "span",
- "spellcheck",
- "src",
- "srcdoc",
- "srclang",
- "srcset",
- "start",
- "step",
- "strike",
- "strong",
- "style",
- "sub",
- "summary",
- "sup",
- "svg",
- "system",
- "tabindex",
- "table",
- "target",
- "tbody",
- "td",
- "template",
- "textarea",
- "tfoot",
- "th",
- "thead",
- "time",
- "title",
- "tr",
- "track",
- "translate",
- "tt",
- "type",
- "typemustmatch",
- "u",
- "ul",
- "updateviacache",
- "usemap",
- "value",
- "var",
- "video",
- "wbr",
- "width",
- "workertype",
- "wrap",
- "xmp",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset.go
deleted file mode 100644
index 13bed1599..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset.go
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright 2013 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 file.
-
-// Package charset provides common text encodings for HTML documents.
-//
-// The mapping from encoding labels to encodings is defined at
-// https://encoding.spec.whatwg.org/.
-package charset // import "golang.org/x/net/html/charset"
-
-import (
- "bytes"
- "fmt"
- "io"
- "mime"
- "strings"
- "unicode/utf8"
-
- "golang.org/x/net/html"
- "golang.org/x/text/encoding"
- "golang.org/x/text/encoding/charmap"
- "golang.org/x/text/encoding/htmlindex"
- "golang.org/x/text/transform"
-)
-
-// Lookup returns the encoding with the specified label, and its canonical
-// name. It returns nil and the empty string if label is not one of the
-// standard encodings for HTML. Matching is case-insensitive and ignores
-// leading and trailing whitespace. Encoders will use HTML escape sequences for
-// runes that are not supported by the character set.
-func Lookup(label string) (e encoding.Encoding, name string) {
- e, err := htmlindex.Get(label)
- if err != nil {
- return nil, ""
- }
- name, _ = htmlindex.Name(e)
- return &htmlEncoding{e}, name
-}
-
-type htmlEncoding struct{ encoding.Encoding }
-
-func (h *htmlEncoding) NewEncoder() *encoding.Encoder {
- // HTML requires a non-terminating legacy encoder. We use HTML escapes to
- // substitute unsupported code points.
- return encoding.HTMLEscapeUnsupported(h.Encoding.NewEncoder())
-}
-
-// DetermineEncoding determines the encoding of an HTML document by examining
-// up to the first 1024 bytes of content and the declared Content-Type.
-//
-// See http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding
-func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) {
- if len(content) > 1024 {
- content = content[:1024]
- }
-
- for _, b := range boms {
- if bytes.HasPrefix(content, b.bom) {
- e, name = Lookup(b.enc)
- return e, name, true
- }
- }
-
- if _, params, err := mime.ParseMediaType(contentType); err == nil {
- if cs, ok := params["charset"]; ok {
- if e, name = Lookup(cs); e != nil {
- return e, name, true
- }
- }
- }
-
- if len(content) > 0 {
- e, name = prescan(content)
- if e != nil {
- return e, name, false
- }
- }
-
- // Try to detect UTF-8.
- // First eliminate any partial rune at the end.
- for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- {
- b := content[i]
- if b < 0x80 {
- break
- }
- if utf8.RuneStart(b) {
- content = content[:i]
- break
- }
- }
- hasHighBit := false
- for _, c := range content {
- if c >= 0x80 {
- hasHighBit = true
- break
- }
- }
- if hasHighBit && utf8.Valid(content) {
- return encoding.Nop, "utf-8", false
- }
-
- // TODO: change default depending on user's locale?
- return charmap.Windows1252, "windows-1252", false
-}
-
-// NewReader returns an io.Reader that converts the content of r to UTF-8.
-// It calls DetermineEncoding to find out what r's encoding is.
-func NewReader(r io.Reader, contentType string) (io.Reader, error) {
- preview := make([]byte, 1024)
- n, err := io.ReadFull(r, preview)
- switch {
- case err == io.ErrUnexpectedEOF:
- preview = preview[:n]
- r = bytes.NewReader(preview)
- case err != nil:
- return nil, err
- default:
- r = io.MultiReader(bytes.NewReader(preview), r)
- }
-
- if e, _, _ := DetermineEncoding(preview, contentType); e != encoding.Nop {
- r = transform.NewReader(r, e.NewDecoder())
- }
- return r, nil
-}
-
-// NewReaderLabel returns a reader that converts from the specified charset to
-// UTF-8. It uses Lookup to find the encoding that corresponds to label, and
-// returns an error if Lookup returns nil. It is suitable for use as
-// encoding/xml.Decoder's CharsetReader function.
-func NewReaderLabel(label string, input io.Reader) (io.Reader, error) {
- e, _ := Lookup(label)
- if e == nil {
- return nil, fmt.Errorf("unsupported charset: %q", label)
- }
- return transform.NewReader(input, e.NewDecoder()), nil
-}
-
-func prescan(content []byte) (e encoding.Encoding, name string) {
- z := html.NewTokenizer(bytes.NewReader(content))
- for {
- switch z.Next() {
- case html.ErrorToken:
- return nil, ""
-
- case html.StartTagToken, html.SelfClosingTagToken:
- tagName, hasAttr := z.TagName()
- if !bytes.Equal(tagName, []byte("meta")) {
- continue
- }
- attrList := make(map[string]bool)
- gotPragma := false
-
- const (
- dontKnow = iota
- doNeedPragma
- doNotNeedPragma
- )
- needPragma := dontKnow
-
- name = ""
- e = nil
- for hasAttr {
- var key, val []byte
- key, val, hasAttr = z.TagAttr()
- ks := string(key)
- if attrList[ks] {
- continue
- }
- attrList[ks] = true
- for i, c := range val {
- if 'A' <= c && c <= 'Z' {
- val[i] = c + 0x20
- }
- }
-
- switch ks {
- case "http-equiv":
- if bytes.Equal(val, []byte("content-type")) {
- gotPragma = true
- }
-
- case "content":
- if e == nil {
- name = fromMetaElement(string(val))
- if name != "" {
- e, name = Lookup(name)
- if e != nil {
- needPragma = doNeedPragma
- }
- }
- }
-
- case "charset":
- e, name = Lookup(string(val))
- needPragma = doNotNeedPragma
- }
- }
-
- if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma {
- continue
- }
-
- if strings.HasPrefix(name, "utf-16") {
- name = "utf-8"
- e = encoding.Nop
- }
-
- if e != nil {
- return e, name
- }
- }
- }
-}
-
-func fromMetaElement(s string) string {
- for s != "" {
- csLoc := strings.Index(s, "charset")
- if csLoc == -1 {
- return ""
- }
- s = s[csLoc+len("charset"):]
- s = strings.TrimLeft(s, " \t\n\f\r")
- if !strings.HasPrefix(s, "=") {
- continue
- }
- s = s[1:]
- s = strings.TrimLeft(s, " \t\n\f\r")
- if s == "" {
- return ""
- }
- if q := s[0]; q == '"' || q == '\'' {
- s = s[1:]
- closeQuote := strings.IndexRune(s, rune(q))
- if closeQuote == -1 {
- return ""
- }
- return s[:closeQuote]
- }
-
- end := strings.IndexAny(s, "; \t\n\f\r")
- if end == -1 {
- end = len(s)
- }
- return s[:end]
- }
- return ""
-}
-
-var boms = []struct {
- bom []byte
- enc string
-}{
- {[]byte{0xfe, 0xff}, "utf-16be"},
- {[]byte{0xff, 0xfe}, "utf-16le"},
- {[]byte{0xef, 0xbb, 0xbf}, "utf-8"},
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset_test.go
deleted file mode 100644
index e4e7d86bf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/charset_test.go
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2013 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 file.
-
-package charset
-
-import (
- "bytes"
- "encoding/xml"
- "io/ioutil"
- "runtime"
- "strings"
- "testing"
-
- "golang.org/x/text/transform"
-)
-
-func transformString(t transform.Transformer, s string) (string, error) {
- r := transform.NewReader(strings.NewReader(s), t)
- b, err := ioutil.ReadAll(r)
- return string(b), err
-}
-
-type testCase struct {
- utf8, other, otherEncoding string
-}
-
-// testCases for encoding and decoding.
-var testCases = []testCase{
- {"Résumé", "Résumé", "utf8"},
- {"Résumé", "R\xe9sum\xe9", "latin1"},
- {"ã“ã‚Œã¯æ¼¢å­—ã§ã™ã€‚", "S0\x8c0o0\"oW[g0Y0\x020", "UTF-16LE"},
- {"ã“ã‚Œã¯æ¼¢å­—ã§ã™ã€‚", "0S0\x8c0oo\"[W0g0Y0\x02", "UTF-16BE"},
- {"Hello, world", "Hello, world", "ASCII"},
- {"Gdańsk", "Gda\xf1sk", "ISO-8859-2"},
- {"Ââ ÄŒÄ ÄÄ‘ ÅŠÅ‹ Õõ Å Å¡ Žž Ã…Ã¥ Ää", "\xc2\xe2 \xc8\xe8 \xa9\xb9 \xaf\xbf \xd5\xf5 \xaa\xba \xac\xbc \xc5\xe5 \xc4\xe4", "ISO-8859-10"},
- {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "ISO-8859-11"},
- {"latviešu", "latvie\xf0u", "ISO-8859-13"},
- {"Seònaid", "Se\xf2naid", "ISO-8859-14"},
- {"€1 is cheap", "\xa41 is cheap", "ISO-8859-15"},
- {"românește", "rom\xe2ne\xbate", "ISO-8859-16"},
- {"nutraĵo", "nutra\xbco", "ISO-8859-3"},
- {"Kalâdlit", "Kal\xe2dlit", "ISO-8859-4"},
- {"руÑÑкий", "\xe0\xe3\xe1\xe1\xda\xd8\xd9", "ISO-8859-5"},
- {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "ISO-8859-7"},
- {"KaÄŸan", "Ka\xf0an", "ISO-8859-9"},
- {"Résumé", "R\x8esum\x8e", "macintosh"},
- {"Gdańsk", "Gda\xf1sk", "windows-1250"},
- {"руÑÑкий", "\xf0\xf3\xf1\xf1\xea\xe8\xe9", "windows-1251"},
- {"Résumé", "R\xe9sum\xe9", "windows-1252"},
- {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "windows-1253"},
- {"KaÄŸan", "Ka\xf0an", "windows-1254"},
- {"עִבְרִית", "\xf2\xc4\xe1\xc0\xf8\xc4\xe9\xfa", "windows-1255"},
- {"العربية", "\xc7\xe1\xda\xd1\xc8\xed\xc9", "windows-1256"},
- {"latviešu", "latvie\xf0u", "windows-1257"},
- {"Việt", "Vi\xea\xf2t", "windows-1258"},
- {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "windows-874"},
- {"руÑÑкий", "\xd2\xd5\xd3\xd3\xcb\xc9\xca", "KOI8-R"},
- {"українÑька", "\xd5\xcb\xd2\xc1\xa7\xce\xd3\xd8\xcb\xc1", "KOI8-U"},
- {"Hello 常用國字標準字體表", "Hello \xb1`\xa5\u03b0\xea\xa6r\xbc\u0437\u01e6r\xc5\xe9\xaa\xed", "big5"},
- {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gbk"},
- {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gb18030"},
- {"עִבְרִית", "\x81\x30\xfb\x30\x81\x30\xf6\x34\x81\x30\xf9\x33\x81\x30\xf6\x30\x81\x30\xfb\x36\x81\x30\xf6\x34\x81\x30\xfa\x31\x81\x30\xfb\x38", "gb18030"},
- {"㧯", "\x82\x31\x89\x38", "gb18030"},
- {"ã“ã‚Œã¯æ¼¢å­—ã§ã™ã€‚", "\x82\xb1\x82\xea\x82\xcd\x8a\xbf\x8e\x9a\x82\xc5\x82\xb7\x81B", "SJIS"},
- {"Hello, 世界!", "Hello, \x90\xa2\x8aE!", "SJIS"},
- {"イウエオカ", "\xb2\xb3\xb4\xb5\xb6", "SJIS"},
- {"ã“ã‚Œã¯æ¼¢å­—ã§ã™ã€‚", "\xa4\xb3\xa4\xec\xa4\u03f4\xc1\xbb\xfa\xa4\u01e4\xb9\xa1\xa3", "EUC-JP"},
- {"Hello, 世界!", "Hello, \x1b$B@$3&\x1b(B!", "ISO-2022-JP"},
- {"다ìŒê³¼ ê°™ì€ ì¡°ê±´ì„ ë”°ë¼ì•¼ 합니다: 저작ìží‘œì‹œ", "\xb4\xd9\xc0\xbd\xb0\xfa \xb0\xb0\xc0\xba \xc1\xb6\xb0\xc7\xc0\xbb \xb5\xfb\xb6\xf3\xbe\xdf \xc7Õ´Ï´\xd9: \xc0\xfa\xc0\xdb\xc0\xdaÇ¥\xbd\xc3", "EUC-KR"},
-}
-
-func TestDecode(t *testing.T) {
- testCases := append(testCases, []testCase{
- // Replace multi-byte maximum subpart of ill-formed subsequence with
- // single replacement character (WhatWG requirement).
- {"Rés\ufffdumé", "Rés\xe1\x80umé", "utf8"},
- }...)
- for _, tc := range testCases {
- e, _ := Lookup(tc.otherEncoding)
- if e == nil {
- t.Errorf("%s: not found", tc.otherEncoding)
- continue
- }
- s, err := transformString(e.NewDecoder(), tc.other)
- if err != nil {
- t.Errorf("%s: decode %q: %v", tc.otherEncoding, tc.other, err)
- continue
- }
- if s != tc.utf8 {
- t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.utf8)
- }
- }
-}
-
-func TestEncode(t *testing.T) {
- testCases := append(testCases, []testCase{
- // Use Go-style replacement.
- {"Rés\xe1\x80umé", "Rés\ufffd\ufffdumé", "utf8"},
- // U+0144 LATIN SMALL LETTER N WITH ACUTE not supported by encoding.
- {"Gdańsk", "Gda&#324;sk", "ISO-8859-11"},
- {"\ufffd", "&#65533;", "ISO-8859-11"},
- {"a\xe1\x80b", "a&#65533;&#65533;b", "ISO-8859-11"},
- }...)
- for _, tc := range testCases {
- e, _ := Lookup(tc.otherEncoding)
- if e == nil {
- t.Errorf("%s: not found", tc.otherEncoding)
- continue
- }
- s, err := transformString(e.NewEncoder(), tc.utf8)
- if err != nil {
- t.Errorf("%s: encode %q: %s", tc.otherEncoding, tc.utf8, err)
- continue
- }
- if s != tc.other {
- t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.other)
- }
- }
-}
-
-var sniffTestCases = []struct {
- filename, declared, want string
-}{
- {"HTTP-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"},
- {"UTF-16LE-BOM.html", "", "utf-16le"},
- {"UTF-16BE-BOM.html", "", "utf-16be"},
- {"meta-content-attribute.html", "text/html", "iso-8859-15"},
- {"meta-charset-attribute.html", "text/html", "iso-8859-15"},
- {"No-encoding-declaration.html", "text/html", "utf-8"},
- {"HTTP-vs-UTF-8-BOM.html", "text/html; charset=iso-8859-15", "utf-8"},
- {"HTTP-vs-meta-content.html", "text/html; charset=iso-8859-15", "iso-8859-15"},
- {"HTTP-vs-meta-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"},
- {"UTF-8-BOM-vs-meta-content.html", "text/html", "utf-8"},
- {"UTF-8-BOM-vs-meta-charset.html", "text/html", "utf-8"},
-}
-
-func TestSniff(t *testing.T) {
- switch runtime.GOOS {
- case "nacl": // platforms that don't permit direct file system access
- t.Skipf("not supported on %q", runtime.GOOS)
- }
-
- for _, tc := range sniffTestCases {
- content, err := ioutil.ReadFile("testdata/" + tc.filename)
- if err != nil {
- t.Errorf("%s: error reading file: %v", tc.filename, err)
- continue
- }
-
- _, name, _ := DetermineEncoding(content, tc.declared)
- if name != tc.want {
- t.Errorf("%s: got %q, want %q", tc.filename, name, tc.want)
- continue
- }
- }
-}
-
-func TestReader(t *testing.T) {
- switch runtime.GOOS {
- case "nacl": // platforms that don't permit direct file system access
- t.Skipf("not supported on %q", runtime.GOOS)
- }
-
- for _, tc := range sniffTestCases {
- content, err := ioutil.ReadFile("testdata/" + tc.filename)
- if err != nil {
- t.Errorf("%s: error reading file: %v", tc.filename, err)
- continue
- }
-
- r, err := NewReader(bytes.NewReader(content), tc.declared)
- if err != nil {
- t.Errorf("%s: error creating reader: %v", tc.filename, err)
- continue
- }
-
- got, err := ioutil.ReadAll(r)
- if err != nil {
- t.Errorf("%s: error reading from charset.NewReader: %v", tc.filename, err)
- continue
- }
-
- e, _ := Lookup(tc.want)
- want, err := ioutil.ReadAll(transform.NewReader(bytes.NewReader(content), e.NewDecoder()))
- if err != nil {
- t.Errorf("%s: error decoding with hard-coded charset name: %v", tc.filename, err)
- continue
- }
-
- if !bytes.Equal(got, want) {
- t.Errorf("%s: got %q, want %q", tc.filename, got, want)
- continue
- }
- }
-}
-
-var metaTestCases = []struct {
- meta, want string
-}{
- {"", ""},
- {"text/html", ""},
- {"text/html; charset utf-8", ""},
- {"text/html; charset=latin-2", "latin-2"},
- {"text/html; charset; charset = utf-8", "utf-8"},
- {`charset="big5"`, "big5"},
- {"charset='shift_jis'", "shift_jis"},
-}
-
-func TestFromMeta(t *testing.T) {
- for _, tc := range metaTestCases {
- got := fromMetaElement(tc.meta)
- if got != tc.want {
- t.Errorf("%q: got %q, want %q", tc.meta, got, tc.want)
- }
- }
-}
-
-func TestXML(t *testing.T) {
- const s = "<?xml version=\"1.0\" encoding=\"windows-1252\"?><a><Word>r\xe9sum\xe9</Word></a>"
-
- d := xml.NewDecoder(strings.NewReader(s))
- d.CharsetReader = NewReaderLabel
-
- var a struct {
- Word string
- }
- err := d.Decode(&a)
- if err != nil {
- t.Fatalf("Decode: %v", err)
- }
-
- want := "résumé"
- if a.Word != want {
- t.Errorf("got %q, want %q", a.Word, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html
deleted file mode 100644
index 9915fa0ee..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <title>HTTP charset</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="The character encoding of a page can be set using the HTTP header charset declaration.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
-</head>
-<body>
-<p class='title'>HTTP charset</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">The character encoding of a page can be set using the HTTP header charset declaration.</p>
-<div class="notes"><p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00C3;&#x0153;&#x00C3;&#x20AC;&#x00C3;&#x0161;</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p><p>The only character encoding declaration for this HTML file is in the HTTP header, which sets the encoding to ISO 8859-15.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-003">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-001<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-001" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html
deleted file mode 100644
index 26e5d8b4e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <title>HTTP vs UTF-8 BOM</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
-</head>
-<body>
-<p class='title'>HTTP vs UTF-8 BOM</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.</p>
-<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a UTF-8 signature.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00FD;&#x00E4;&#x00E8;</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p><p>If the test is unsuccessful, the characters &#x00EF;&#x00BB;&#x00BF; should appear at the top of the page. These represent the bytes that make up the UTF-8 signature when encountered in the ISO 8859-15 encoding.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-022">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-034<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-034" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html
deleted file mode 100644
index 2f07e9515..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta charset="iso-8859-1" > <title>HTTP vs meta charset</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.">
-<style type='text/css'>
-.test div { width: 50px; }.test div { width: 90px; }
-</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
-</head>
-<body>
-<p class='title'>HTTP vs meta charset</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.</p>
-<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-1.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00C3;&#x0153;&#x00C3;&#x20AC;&#x00C3;&#x0161;</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-037">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-018<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-018" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html
deleted file mode 100644
index 6853cddec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" > <title>HTTP vs meta content</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.">
-<style type='text/css'>
-.test div { width: 50px; }.test div { width: 90px; }
-</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
-</head>
-<body>
-<p class='title'>HTTP vs meta content</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.</p>
-<div class="notes"><p><p>The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-1.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00C3;&#x0153;&#x00C3;&#x20AC;&#x00C3;&#x0161;</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-018">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-016<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-016" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html
deleted file mode 100644
index 612e26c6c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <title>No encoding declaration</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
-</head>
-<body>
-<p class='title'>No encoding declaration</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.</p>
-<div class="notes"><p><p>The test on this page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00FD;&#x00E4;&#x00E8;</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-034">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-015<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-015" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/README b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/README
deleted file mode 100644
index 38ef0f9f1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/README
+++ /dev/null
@@ -1,9 +0,0 @@
-These test cases come from
-http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics
-
-Distributed under both the W3C Test Suite License
-(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license)
-and the W3C 3-clause BSD License
-(http://www.w3.org/Consortium/Legal/2008/03-bsd-license).
-To contribute to a W3C Test Suite, see the policies and contribution
-forms (http://www.w3.org/2004/10/27-testcases).
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html
deleted file mode 100644
index 3abf7a934..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html
deleted file mode 100644
index 76254c980..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html
deleted file mode 100644
index 83de43338..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta charset="iso-8859-15"> <title>UTF-8 BOM vs meta charset</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.">
-<style type='text/css'>
-.test div { width: 50px; }.test div { width: 90px; }
-</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
-</head>
-<body>
-<p class='title'>UTF-8 BOM vs meta charset</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.</p>
-<div class="notes"><p><p>The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00FD;&#x00E4;&#x00E8;</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-024">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-038<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-038" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html
deleted file mode 100644
index 501aac2d6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-15"> <title>UTF-8 BOM vs meta content</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-utf8.css">
-</head>
-<body>
-<p class='title'>UTF-8 BOM vs meta content</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.</p>
-<div class="notes"><p><p>The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00FD;&#x00E4;&#x00E8;</code>. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-038">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-037<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#precedence" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-037" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html
deleted file mode 100644
index 2d7d25aba..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta charset="iso-8859-15"> <title>meta charset attribute</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="The character encoding of the page can be set by a meta element with charset attribute.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
-</head>
-<body>
-<p class='title'>meta charset attribute</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">The character encoding of the page can be set by a meta element with charset attribute.</p>
-<div class="notes"><p><p>The only character encoding declaration for this HTML file is in the charset attribute of the meta element, which declares the encoding to be ISO 8859-15.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00C3;&#x0153;&#x00C3;&#x20AC;&#x00C3;&#x0161;</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-015">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-009<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-009" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html
deleted file mode 100644
index 1c3f228e7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" >
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-15"> <title>meta content attribute</title>
-<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
-<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>
-<link rel="stylesheet" type="text/css" href="./generatedtests.css">
-<script src="http://w3c-test.org/resources/testharness.js"></script>
-<script src="http://w3c-test.org/resources/testharnessreport.js"></script>
-<meta name='flags' content='http'>
-<meta name="assert" content="The character encoding of the page can be set by a meta element with http-equiv and content attributes.">
-<style type='text/css'>
-.test div { width: 50px; }</style>
-<link rel="stylesheet" type="text/css" href="the-input-byte-stream/support/encodingtests-15.css">
-</head>
-<body>
-<p class='title'>meta content attribute</p>
-
-
-<div id='log'></div>
-
-
-<div class='test'><div id='box' class='ýäè'>&#xA0;</div></div>
-
-
-
-
-
-<div class='description'>
-<p class="assertion" title="Assertion">The character encoding of the page can be set by a meta element with http-equiv and content attributes.</p>
-<div class="notes"><p><p>The only character encoding declaration for this HTML file is in the content attribute of the meta element, which declares the encoding to be ISO 8859-15.</p><p>The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector <code>.test div.&#x00C3;&#x0153;&#x00C3;&#x20AC;&#x00C3;&#x0161;</code>. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.</p></p>
-</div>
-</div>
-<div class="nexttest"><div><a href="generate?test=the-input-byte-stream-009">Next test</a></div><div class="doctype">HTML5</div>
-<p class="jump">the-input-byte-stream-007<br /><a href="/International/tests/html5/the-input-byte-stream/results-basics#basics" target="_blank">Result summary &amp; related tests</a><br /><a href="http://w3c-test.org/framework/details/i18n-html5/the-input-byte-stream-007" target="_blank">Detailed results for this test</a><br/> <a href="http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream" target="_blank">Link to spec</a></p>
-<div class='prereq'>Assumptions: <ul><li>The default encoding for the browser you are testing is not set to ISO 8859-15.</li>
- <li>The test is read from a server that supports HTTP.</li></ul></div>
-</div>
-<script>
-test(function() {
-assert_equals(document.getElementById('box').offsetWidth, 100);
-}, " ");
-</script>
-
-</body>
-</html>
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/const.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/const.go
deleted file mode 100644
index b37e62124..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/const.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2011 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 file.
-
-package html
-
-// Section 12.2.3.2 of the HTML5 specification says "The following elements
-// have varying levels of special parsing rules".
-// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements
-var isSpecialElementMap = map[string]bool{
- "address": true,
- "applet": true,
- "area": true,
- "article": true,
- "aside": true,
- "base": true,
- "basefont": true,
- "bgsound": true,
- "blockquote": true,
- "body": true,
- "br": true,
- "button": true,
- "caption": true,
- "center": true,
- "col": true,
- "colgroup": true,
- "dd": true,
- "details": true,
- "dir": true,
- "div": true,
- "dl": true,
- "dt": true,
- "embed": true,
- "fieldset": true,
- "figcaption": true,
- "figure": true,
- "footer": true,
- "form": true,
- "frame": true,
- "frameset": true,
- "h1": true,
- "h2": true,
- "h3": true,
- "h4": true,
- "h5": true,
- "h6": true,
- "head": true,
- "header": true,
- "hgroup": true,
- "hr": true,
- "html": true,
- "iframe": true,
- "img": true,
- "input": true,
- "isindex": true, // The 'isindex' element has been removed, but keep it for backwards compatibility.
- "keygen": true,
- "li": true,
- "link": true,
- "listing": true,
- "main": true,
- "marquee": true,
- "menu": true,
- "meta": true,
- "nav": true,
- "noembed": true,
- "noframes": true,
- "noscript": true,
- "object": true,
- "ol": true,
- "p": true,
- "param": true,
- "plaintext": true,
- "pre": true,
- "script": true,
- "section": true,
- "select": true,
- "source": true,
- "style": true,
- "summary": true,
- "table": true,
- "tbody": true,
- "td": true,
- "template": true,
- "textarea": true,
- "tfoot": true,
- "th": true,
- "thead": true,
- "title": true,
- "tr": true,
- "track": true,
- "ul": true,
- "wbr": true,
- "xmp": true,
-}
-
-func isSpecialElement(element *Node) bool {
- switch element.Namespace {
- case "", "html":
- return isSpecialElementMap[element.Data]
- case "svg":
- return element.Data == "foreignObject"
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doc.go
deleted file mode 100644
index 822ed42a0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doc.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2010 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 file.
-
-/*
-Package html implements an HTML5-compliant tokenizer and parser.
-
-Tokenization is done by creating a Tokenizer for an io.Reader r. It is the
-caller's responsibility to ensure that r provides UTF-8 encoded HTML.
-
- z := html.NewTokenizer(r)
-
-Given a Tokenizer z, the HTML is tokenized by repeatedly calling z.Next(),
-which parses the next token and returns its type, or an error:
-
- for {
- tt := z.Next()
- if tt == html.ErrorToken {
- // ...
- return ...
- }
- // Process the current token.
- }
-
-There are two APIs for retrieving the current token. The high-level API is to
-call Token; the low-level API is to call Text or TagName / TagAttr. Both APIs
-allow optionally calling Raw after Next but before Token, Text, TagName, or
-TagAttr. In EBNF notation, the valid call sequence per token is:
-
- Next {Raw} [ Token | Text | TagName {TagAttr} ]
-
-Token returns an independent data structure that completely describes a token.
-Entities (such as "&lt;") are unescaped, tag names and attribute keys are
-lower-cased, and attributes are collected into a []Attribute. For example:
-
- for {
- if z.Next() == html.ErrorToken {
- // Returning io.EOF indicates success.
- return z.Err()
- }
- emitToken(z.Token())
- }
-
-The low-level API performs fewer allocations and copies, but the contents of
-the []byte values returned by Text, TagName and TagAttr may change on the next
-call to Next. For example, to extract an HTML page's anchor text:
-
- depth := 0
- for {
- tt := z.Next()
- switch tt {
- case html.ErrorToken:
- return z.Err()
- case html.TextToken:
- if depth > 0 {
- // emitBytes should copy the []byte it receives,
- // if it doesn't process it immediately.
- emitBytes(z.Text())
- }
- case html.StartTagToken, html.EndTagToken:
- tn, _ := z.TagName()
- if len(tn) == 1 && tn[0] == 'a' {
- if tt == html.StartTagToken {
- depth++
- } else {
- depth--
- }
- }
- }
- }
-
-Parsing is done by calling Parse with an io.Reader, which returns the root of
-the parse tree (the document element) as a *Node. It is the caller's
-responsibility to ensure that the Reader provides UTF-8 encoded HTML. For
-example, to process each anchor node in depth-first order:
-
- doc, err := html.Parse(r)
- if err != nil {
- // ...
- }
- var f func(*html.Node)
- f = func(n *html.Node) {
- if n.Type == html.ElementNode && n.Data == "a" {
- // Do something with n...
- }
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- f(c)
- }
- }
- f(doc)
-
-The relevant specifications include:
-https://html.spec.whatwg.org/multipage/syntax.html and
-https://html.spec.whatwg.org/multipage/syntax.html#tokenization
-*/
-package html // import "golang.org/x/net/html"
-
-// The tokenization algorithm implemented by this package is not a line-by-line
-// transliteration of the relatively verbose state-machine in the WHATWG
-// specification. A more direct approach is used instead, where the program
-// counter implies the state, such as whether it is tokenizing a tag or a text
-// node. Specification compliance is verified by checking expected and actual
-// outputs over a test suite rather than aiming for algorithmic fidelity.
-
-// TODO(nigeltao): Does a DOM API belong in this package or a separate one?
-// TODO(nigeltao): How does parsing interact with a JavaScript engine?
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doctype.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doctype.go
deleted file mode 100644
index c484e5a94..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/doctype.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2011 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 file.
-
-package html
-
-import (
- "strings"
-)
-
-// parseDoctype parses the data from a DoctypeToken into a name,
-// public identifier, and system identifier. It returns a Node whose Type
-// is DoctypeNode, whose Data is the name, and which has attributes
-// named "system" and "public" for the two identifiers if they were present.
-// quirks is whether the document should be parsed in "quirks mode".
-func parseDoctype(s string) (n *Node, quirks bool) {
- n = &Node{Type: DoctypeNode}
-
- // Find the name.
- space := strings.IndexAny(s, whitespace)
- if space == -1 {
- space = len(s)
- }
- n.Data = s[:space]
- // The comparison to "html" is case-sensitive.
- if n.Data != "html" {
- quirks = true
- }
- n.Data = strings.ToLower(n.Data)
- s = strings.TrimLeft(s[space:], whitespace)
-
- if len(s) < 6 {
- // It can't start with "PUBLIC" or "SYSTEM".
- // Ignore the rest of the string.
- return n, quirks || s != ""
- }
-
- key := strings.ToLower(s[:6])
- s = s[6:]
- for key == "public" || key == "system" {
- s = strings.TrimLeft(s, whitespace)
- if s == "" {
- break
- }
- quote := s[0]
- if quote != '"' && quote != '\'' {
- break
- }
- s = s[1:]
- q := strings.IndexRune(s, rune(quote))
- var id string
- if q == -1 {
- id = s
- s = ""
- } else {
- id = s[:q]
- s = s[q+1:]
- }
- n.Attr = append(n.Attr, Attribute{Key: key, Val: id})
- if key == "public" {
- key = "system"
- } else {
- key = ""
- }
- }
-
- if key != "" || s != "" {
- quirks = true
- } else if len(n.Attr) > 0 {
- if n.Attr[0].Key == "public" {
- public := strings.ToLower(n.Attr[0].Val)
- switch public {
- case "-//w3o//dtd w3 html strict 3.0//en//", "-/w3d/dtd html 4.0 transitional/en", "html":
- quirks = true
- default:
- for _, q := range quirkyIDs {
- if strings.HasPrefix(public, q) {
- quirks = true
- break
- }
- }
- }
- // The following two public IDs only cause quirks mode if there is no system ID.
- if len(n.Attr) == 1 && (strings.HasPrefix(public, "-//w3c//dtd html 4.01 frameset//") ||
- strings.HasPrefix(public, "-//w3c//dtd html 4.01 transitional//")) {
- quirks = true
- }
- }
- if lastAttr := n.Attr[len(n.Attr)-1]; lastAttr.Key == "system" &&
- strings.ToLower(lastAttr.Val) == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" {
- quirks = true
- }
- }
-
- return n, quirks
-}
-
-// quirkyIDs is a list of public doctype identifiers that cause a document
-// to be interpreted in quirks mode. The identifiers should be in lower case.
-var quirkyIDs = []string{
- "+//silmaril//dtd html pro v0r11 19970101//",
- "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
- "-//as//dtd html 3.0 aswedit + extensions//",
- "-//ietf//dtd html 2.0 level 1//",
- "-//ietf//dtd html 2.0 level 2//",
- "-//ietf//dtd html 2.0 strict level 1//",
- "-//ietf//dtd html 2.0 strict level 2//",
- "-//ietf//dtd html 2.0 strict//",
- "-//ietf//dtd html 2.0//",
- "-//ietf//dtd html 2.1e//",
- "-//ietf//dtd html 3.0//",
- "-//ietf//dtd html 3.2 final//",
- "-//ietf//dtd html 3.2//",
- "-//ietf//dtd html 3//",
- "-//ietf//dtd html level 0//",
- "-//ietf//dtd html level 1//",
- "-//ietf//dtd html level 2//",
- "-//ietf//dtd html level 3//",
- "-//ietf//dtd html strict level 0//",
- "-//ietf//dtd html strict level 1//",
- "-//ietf//dtd html strict level 2//",
- "-//ietf//dtd html strict level 3//",
- "-//ietf//dtd html strict//",
- "-//ietf//dtd html//",
- "-//metrius//dtd metrius presentational//",
- "-//microsoft//dtd internet explorer 2.0 html strict//",
- "-//microsoft//dtd internet explorer 2.0 html//",
- "-//microsoft//dtd internet explorer 2.0 tables//",
- "-//microsoft//dtd internet explorer 3.0 html strict//",
- "-//microsoft//dtd internet explorer 3.0 html//",
- "-//microsoft//dtd internet explorer 3.0 tables//",
- "-//netscape comm. corp.//dtd html//",
- "-//netscape comm. corp.//dtd strict html//",
- "-//o'reilly and associates//dtd html 2.0//",
- "-//o'reilly and associates//dtd html extended 1.0//",
- "-//o'reilly and associates//dtd html extended relaxed 1.0//",
- "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
- "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
- "-//spyglass//dtd html 2.0 extended//",
- "-//sq//dtd html 2.0 hotmetal + extensions//",
- "-//sun microsystems corp.//dtd hotjava html//",
- "-//sun microsystems corp.//dtd hotjava strict html//",
- "-//w3c//dtd html 3 1995-03-24//",
- "-//w3c//dtd html 3.2 draft//",
- "-//w3c//dtd html 3.2 final//",
- "-//w3c//dtd html 3.2//",
- "-//w3c//dtd html 3.2s draft//",
- "-//w3c//dtd html 4.0 frameset//",
- "-//w3c//dtd html 4.0 transitional//",
- "-//w3c//dtd html experimental 19960712//",
- "-//w3c//dtd html experimental 970421//",
- "-//w3c//dtd w3 html//",
- "-//w3o//dtd w3 html 3.0//",
- "-//webtechs//dtd mozilla html 2.0//",
- "-//webtechs//dtd mozilla html//",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity.go
deleted file mode 100644
index a50c04c60..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity.go
+++ /dev/null
@@ -1,2253 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-// All entities that do not end with ';' are 6 or fewer bytes long.
-const longestEntityWithoutSemicolon = 6
-
-// entity is a map from HTML entity names to their values. The semicolon matters:
-// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references
-// lists both "amp" and "amp;" as two separate entries.
-//
-// Note that the HTML5 list is larger than the HTML4 list at
-// http://www.w3.org/TR/html4/sgml/entities.html
-var entity = map[string]rune{
- "AElig;": '\U000000C6',
- "AMP;": '\U00000026',
- "Aacute;": '\U000000C1',
- "Abreve;": '\U00000102',
- "Acirc;": '\U000000C2',
- "Acy;": '\U00000410',
- "Afr;": '\U0001D504',
- "Agrave;": '\U000000C0',
- "Alpha;": '\U00000391',
- "Amacr;": '\U00000100',
- "And;": '\U00002A53',
- "Aogon;": '\U00000104',
- "Aopf;": '\U0001D538',
- "ApplyFunction;": '\U00002061',
- "Aring;": '\U000000C5',
- "Ascr;": '\U0001D49C',
- "Assign;": '\U00002254',
- "Atilde;": '\U000000C3',
- "Auml;": '\U000000C4',
- "Backslash;": '\U00002216',
- "Barv;": '\U00002AE7',
- "Barwed;": '\U00002306',
- "Bcy;": '\U00000411',
- "Because;": '\U00002235',
- "Bernoullis;": '\U0000212C',
- "Beta;": '\U00000392',
- "Bfr;": '\U0001D505',
- "Bopf;": '\U0001D539',
- "Breve;": '\U000002D8',
- "Bscr;": '\U0000212C',
- "Bumpeq;": '\U0000224E',
- "CHcy;": '\U00000427',
- "COPY;": '\U000000A9',
- "Cacute;": '\U00000106',
- "Cap;": '\U000022D2',
- "CapitalDifferentialD;": '\U00002145',
- "Cayleys;": '\U0000212D',
- "Ccaron;": '\U0000010C',
- "Ccedil;": '\U000000C7',
- "Ccirc;": '\U00000108',
- "Cconint;": '\U00002230',
- "Cdot;": '\U0000010A',
- "Cedilla;": '\U000000B8',
- "CenterDot;": '\U000000B7',
- "Cfr;": '\U0000212D',
- "Chi;": '\U000003A7',
- "CircleDot;": '\U00002299',
- "CircleMinus;": '\U00002296',
- "CirclePlus;": '\U00002295',
- "CircleTimes;": '\U00002297',
- "ClockwiseContourIntegral;": '\U00002232',
- "CloseCurlyDoubleQuote;": '\U0000201D',
- "CloseCurlyQuote;": '\U00002019',
- "Colon;": '\U00002237',
- "Colone;": '\U00002A74',
- "Congruent;": '\U00002261',
- "Conint;": '\U0000222F',
- "ContourIntegral;": '\U0000222E',
- "Copf;": '\U00002102',
- "Coproduct;": '\U00002210',
- "CounterClockwiseContourIntegral;": '\U00002233',
- "Cross;": '\U00002A2F',
- "Cscr;": '\U0001D49E',
- "Cup;": '\U000022D3',
- "CupCap;": '\U0000224D',
- "DD;": '\U00002145',
- "DDotrahd;": '\U00002911',
- "DJcy;": '\U00000402',
- "DScy;": '\U00000405',
- "DZcy;": '\U0000040F',
- "Dagger;": '\U00002021',
- "Darr;": '\U000021A1',
- "Dashv;": '\U00002AE4',
- "Dcaron;": '\U0000010E',
- "Dcy;": '\U00000414',
- "Del;": '\U00002207',
- "Delta;": '\U00000394',
- "Dfr;": '\U0001D507',
- "DiacriticalAcute;": '\U000000B4',
- "DiacriticalDot;": '\U000002D9',
- "DiacriticalDoubleAcute;": '\U000002DD',
- "DiacriticalGrave;": '\U00000060',
- "DiacriticalTilde;": '\U000002DC',
- "Diamond;": '\U000022C4',
- "DifferentialD;": '\U00002146',
- "Dopf;": '\U0001D53B',
- "Dot;": '\U000000A8',
- "DotDot;": '\U000020DC',
- "DotEqual;": '\U00002250',
- "DoubleContourIntegral;": '\U0000222F',
- "DoubleDot;": '\U000000A8',
- "DoubleDownArrow;": '\U000021D3',
- "DoubleLeftArrow;": '\U000021D0',
- "DoubleLeftRightArrow;": '\U000021D4',
- "DoubleLeftTee;": '\U00002AE4',
- "DoubleLongLeftArrow;": '\U000027F8',
- "DoubleLongLeftRightArrow;": '\U000027FA',
- "DoubleLongRightArrow;": '\U000027F9',
- "DoubleRightArrow;": '\U000021D2',
- "DoubleRightTee;": '\U000022A8',
- "DoubleUpArrow;": '\U000021D1',
- "DoubleUpDownArrow;": '\U000021D5',
- "DoubleVerticalBar;": '\U00002225',
- "DownArrow;": '\U00002193',
- "DownArrowBar;": '\U00002913',
- "DownArrowUpArrow;": '\U000021F5',
- "DownBreve;": '\U00000311',
- "DownLeftRightVector;": '\U00002950',
- "DownLeftTeeVector;": '\U0000295E',
- "DownLeftVector;": '\U000021BD',
- "DownLeftVectorBar;": '\U00002956',
- "DownRightTeeVector;": '\U0000295F',
- "DownRightVector;": '\U000021C1',
- "DownRightVectorBar;": '\U00002957',
- "DownTee;": '\U000022A4',
- "DownTeeArrow;": '\U000021A7',
- "Downarrow;": '\U000021D3',
- "Dscr;": '\U0001D49F',
- "Dstrok;": '\U00000110',
- "ENG;": '\U0000014A',
- "ETH;": '\U000000D0',
- "Eacute;": '\U000000C9',
- "Ecaron;": '\U0000011A',
- "Ecirc;": '\U000000CA',
- "Ecy;": '\U0000042D',
- "Edot;": '\U00000116',
- "Efr;": '\U0001D508',
- "Egrave;": '\U000000C8',
- "Element;": '\U00002208',
- "Emacr;": '\U00000112',
- "EmptySmallSquare;": '\U000025FB',
- "EmptyVerySmallSquare;": '\U000025AB',
- "Eogon;": '\U00000118',
- "Eopf;": '\U0001D53C',
- "Epsilon;": '\U00000395',
- "Equal;": '\U00002A75',
- "EqualTilde;": '\U00002242',
- "Equilibrium;": '\U000021CC',
- "Escr;": '\U00002130',
- "Esim;": '\U00002A73',
- "Eta;": '\U00000397',
- "Euml;": '\U000000CB',
- "Exists;": '\U00002203',
- "ExponentialE;": '\U00002147',
- "Fcy;": '\U00000424',
- "Ffr;": '\U0001D509',
- "FilledSmallSquare;": '\U000025FC',
- "FilledVerySmallSquare;": '\U000025AA',
- "Fopf;": '\U0001D53D',
- "ForAll;": '\U00002200',
- "Fouriertrf;": '\U00002131',
- "Fscr;": '\U00002131',
- "GJcy;": '\U00000403',
- "GT;": '\U0000003E',
- "Gamma;": '\U00000393',
- "Gammad;": '\U000003DC',
- "Gbreve;": '\U0000011E',
- "Gcedil;": '\U00000122',
- "Gcirc;": '\U0000011C',
- "Gcy;": '\U00000413',
- "Gdot;": '\U00000120',
- "Gfr;": '\U0001D50A',
- "Gg;": '\U000022D9',
- "Gopf;": '\U0001D53E',
- "GreaterEqual;": '\U00002265',
- "GreaterEqualLess;": '\U000022DB',
- "GreaterFullEqual;": '\U00002267',
- "GreaterGreater;": '\U00002AA2',
- "GreaterLess;": '\U00002277',
- "GreaterSlantEqual;": '\U00002A7E',
- "GreaterTilde;": '\U00002273',
- "Gscr;": '\U0001D4A2',
- "Gt;": '\U0000226B',
- "HARDcy;": '\U0000042A',
- "Hacek;": '\U000002C7',
- "Hat;": '\U0000005E',
- "Hcirc;": '\U00000124',
- "Hfr;": '\U0000210C',
- "HilbertSpace;": '\U0000210B',
- "Hopf;": '\U0000210D',
- "HorizontalLine;": '\U00002500',
- "Hscr;": '\U0000210B',
- "Hstrok;": '\U00000126',
- "HumpDownHump;": '\U0000224E',
- "HumpEqual;": '\U0000224F',
- "IEcy;": '\U00000415',
- "IJlig;": '\U00000132',
- "IOcy;": '\U00000401',
- "Iacute;": '\U000000CD',
- "Icirc;": '\U000000CE',
- "Icy;": '\U00000418',
- "Idot;": '\U00000130',
- "Ifr;": '\U00002111',
- "Igrave;": '\U000000CC',
- "Im;": '\U00002111',
- "Imacr;": '\U0000012A',
- "ImaginaryI;": '\U00002148',
- "Implies;": '\U000021D2',
- "Int;": '\U0000222C',
- "Integral;": '\U0000222B',
- "Intersection;": '\U000022C2',
- "InvisibleComma;": '\U00002063',
- "InvisibleTimes;": '\U00002062',
- "Iogon;": '\U0000012E',
- "Iopf;": '\U0001D540',
- "Iota;": '\U00000399',
- "Iscr;": '\U00002110',
- "Itilde;": '\U00000128',
- "Iukcy;": '\U00000406',
- "Iuml;": '\U000000CF',
- "Jcirc;": '\U00000134',
- "Jcy;": '\U00000419',
- "Jfr;": '\U0001D50D',
- "Jopf;": '\U0001D541',
- "Jscr;": '\U0001D4A5',
- "Jsercy;": '\U00000408',
- "Jukcy;": '\U00000404',
- "KHcy;": '\U00000425',
- "KJcy;": '\U0000040C',
- "Kappa;": '\U0000039A',
- "Kcedil;": '\U00000136',
- "Kcy;": '\U0000041A',
- "Kfr;": '\U0001D50E',
- "Kopf;": '\U0001D542',
- "Kscr;": '\U0001D4A6',
- "LJcy;": '\U00000409',
- "LT;": '\U0000003C',
- "Lacute;": '\U00000139',
- "Lambda;": '\U0000039B',
- "Lang;": '\U000027EA',
- "Laplacetrf;": '\U00002112',
- "Larr;": '\U0000219E',
- "Lcaron;": '\U0000013D',
- "Lcedil;": '\U0000013B',
- "Lcy;": '\U0000041B',
- "LeftAngleBracket;": '\U000027E8',
- "LeftArrow;": '\U00002190',
- "LeftArrowBar;": '\U000021E4',
- "LeftArrowRightArrow;": '\U000021C6',
- "LeftCeiling;": '\U00002308',
- "LeftDoubleBracket;": '\U000027E6',
- "LeftDownTeeVector;": '\U00002961',
- "LeftDownVector;": '\U000021C3',
- "LeftDownVectorBar;": '\U00002959',
- "LeftFloor;": '\U0000230A',
- "LeftRightArrow;": '\U00002194',
- "LeftRightVector;": '\U0000294E',
- "LeftTee;": '\U000022A3',
- "LeftTeeArrow;": '\U000021A4',
- "LeftTeeVector;": '\U0000295A',
- "LeftTriangle;": '\U000022B2',
- "LeftTriangleBar;": '\U000029CF',
- "LeftTriangleEqual;": '\U000022B4',
- "LeftUpDownVector;": '\U00002951',
- "LeftUpTeeVector;": '\U00002960',
- "LeftUpVector;": '\U000021BF',
- "LeftUpVectorBar;": '\U00002958',
- "LeftVector;": '\U000021BC',
- "LeftVectorBar;": '\U00002952',
- "Leftarrow;": '\U000021D0',
- "Leftrightarrow;": '\U000021D4',
- "LessEqualGreater;": '\U000022DA',
- "LessFullEqual;": '\U00002266',
- "LessGreater;": '\U00002276',
- "LessLess;": '\U00002AA1',
- "LessSlantEqual;": '\U00002A7D',
- "LessTilde;": '\U00002272',
- "Lfr;": '\U0001D50F',
- "Ll;": '\U000022D8',
- "Lleftarrow;": '\U000021DA',
- "Lmidot;": '\U0000013F',
- "LongLeftArrow;": '\U000027F5',
- "LongLeftRightArrow;": '\U000027F7',
- "LongRightArrow;": '\U000027F6',
- "Longleftarrow;": '\U000027F8',
- "Longleftrightarrow;": '\U000027FA',
- "Longrightarrow;": '\U000027F9',
- "Lopf;": '\U0001D543',
- "LowerLeftArrow;": '\U00002199',
- "LowerRightArrow;": '\U00002198',
- "Lscr;": '\U00002112',
- "Lsh;": '\U000021B0',
- "Lstrok;": '\U00000141',
- "Lt;": '\U0000226A',
- "Map;": '\U00002905',
- "Mcy;": '\U0000041C',
- "MediumSpace;": '\U0000205F',
- "Mellintrf;": '\U00002133',
- "Mfr;": '\U0001D510',
- "MinusPlus;": '\U00002213',
- "Mopf;": '\U0001D544',
- "Mscr;": '\U00002133',
- "Mu;": '\U0000039C',
- "NJcy;": '\U0000040A',
- "Nacute;": '\U00000143',
- "Ncaron;": '\U00000147',
- "Ncedil;": '\U00000145',
- "Ncy;": '\U0000041D',
- "NegativeMediumSpace;": '\U0000200B',
- "NegativeThickSpace;": '\U0000200B',
- "NegativeThinSpace;": '\U0000200B',
- "NegativeVeryThinSpace;": '\U0000200B',
- "NestedGreaterGreater;": '\U0000226B',
- "NestedLessLess;": '\U0000226A',
- "NewLine;": '\U0000000A',
- "Nfr;": '\U0001D511',
- "NoBreak;": '\U00002060',
- "NonBreakingSpace;": '\U000000A0',
- "Nopf;": '\U00002115',
- "Not;": '\U00002AEC',
- "NotCongruent;": '\U00002262',
- "NotCupCap;": '\U0000226D',
- "NotDoubleVerticalBar;": '\U00002226',
- "NotElement;": '\U00002209',
- "NotEqual;": '\U00002260',
- "NotExists;": '\U00002204',
- "NotGreater;": '\U0000226F',
- "NotGreaterEqual;": '\U00002271',
- "NotGreaterLess;": '\U00002279',
- "NotGreaterTilde;": '\U00002275',
- "NotLeftTriangle;": '\U000022EA',
- "NotLeftTriangleEqual;": '\U000022EC',
- "NotLess;": '\U0000226E',
- "NotLessEqual;": '\U00002270',
- "NotLessGreater;": '\U00002278',
- "NotLessTilde;": '\U00002274',
- "NotPrecedes;": '\U00002280',
- "NotPrecedesSlantEqual;": '\U000022E0',
- "NotReverseElement;": '\U0000220C',
- "NotRightTriangle;": '\U000022EB',
- "NotRightTriangleEqual;": '\U000022ED',
- "NotSquareSubsetEqual;": '\U000022E2',
- "NotSquareSupersetEqual;": '\U000022E3',
- "NotSubsetEqual;": '\U00002288',
- "NotSucceeds;": '\U00002281',
- "NotSucceedsSlantEqual;": '\U000022E1',
- "NotSupersetEqual;": '\U00002289',
- "NotTilde;": '\U00002241',
- "NotTildeEqual;": '\U00002244',
- "NotTildeFullEqual;": '\U00002247',
- "NotTildeTilde;": '\U00002249',
- "NotVerticalBar;": '\U00002224',
- "Nscr;": '\U0001D4A9',
- "Ntilde;": '\U000000D1',
- "Nu;": '\U0000039D',
- "OElig;": '\U00000152',
- "Oacute;": '\U000000D3',
- "Ocirc;": '\U000000D4',
- "Ocy;": '\U0000041E',
- "Odblac;": '\U00000150',
- "Ofr;": '\U0001D512',
- "Ograve;": '\U000000D2',
- "Omacr;": '\U0000014C',
- "Omega;": '\U000003A9',
- "Omicron;": '\U0000039F',
- "Oopf;": '\U0001D546',
- "OpenCurlyDoubleQuote;": '\U0000201C',
- "OpenCurlyQuote;": '\U00002018',
- "Or;": '\U00002A54',
- "Oscr;": '\U0001D4AA',
- "Oslash;": '\U000000D8',
- "Otilde;": '\U000000D5',
- "Otimes;": '\U00002A37',
- "Ouml;": '\U000000D6',
- "OverBar;": '\U0000203E',
- "OverBrace;": '\U000023DE',
- "OverBracket;": '\U000023B4',
- "OverParenthesis;": '\U000023DC',
- "PartialD;": '\U00002202',
- "Pcy;": '\U0000041F',
- "Pfr;": '\U0001D513',
- "Phi;": '\U000003A6',
- "Pi;": '\U000003A0',
- "PlusMinus;": '\U000000B1',
- "Poincareplane;": '\U0000210C',
- "Popf;": '\U00002119',
- "Pr;": '\U00002ABB',
- "Precedes;": '\U0000227A',
- "PrecedesEqual;": '\U00002AAF',
- "PrecedesSlantEqual;": '\U0000227C',
- "PrecedesTilde;": '\U0000227E',
- "Prime;": '\U00002033',
- "Product;": '\U0000220F',
- "Proportion;": '\U00002237',
- "Proportional;": '\U0000221D',
- "Pscr;": '\U0001D4AB',
- "Psi;": '\U000003A8',
- "QUOT;": '\U00000022',
- "Qfr;": '\U0001D514',
- "Qopf;": '\U0000211A',
- "Qscr;": '\U0001D4AC',
- "RBarr;": '\U00002910',
- "REG;": '\U000000AE',
- "Racute;": '\U00000154',
- "Rang;": '\U000027EB',
- "Rarr;": '\U000021A0',
- "Rarrtl;": '\U00002916',
- "Rcaron;": '\U00000158',
- "Rcedil;": '\U00000156',
- "Rcy;": '\U00000420',
- "Re;": '\U0000211C',
- "ReverseElement;": '\U0000220B',
- "ReverseEquilibrium;": '\U000021CB',
- "ReverseUpEquilibrium;": '\U0000296F',
- "Rfr;": '\U0000211C',
- "Rho;": '\U000003A1',
- "RightAngleBracket;": '\U000027E9',
- "RightArrow;": '\U00002192',
- "RightArrowBar;": '\U000021E5',
- "RightArrowLeftArrow;": '\U000021C4',
- "RightCeiling;": '\U00002309',
- "RightDoubleBracket;": '\U000027E7',
- "RightDownTeeVector;": '\U0000295D',
- "RightDownVector;": '\U000021C2',
- "RightDownVectorBar;": '\U00002955',
- "RightFloor;": '\U0000230B',
- "RightTee;": '\U000022A2',
- "RightTeeArrow;": '\U000021A6',
- "RightTeeVector;": '\U0000295B',
- "RightTriangle;": '\U000022B3',
- "RightTriangleBar;": '\U000029D0',
- "RightTriangleEqual;": '\U000022B5',
- "RightUpDownVector;": '\U0000294F',
- "RightUpTeeVector;": '\U0000295C',
- "RightUpVector;": '\U000021BE',
- "RightUpVectorBar;": '\U00002954',
- "RightVector;": '\U000021C0',
- "RightVectorBar;": '\U00002953',
- "Rightarrow;": '\U000021D2',
- "Ropf;": '\U0000211D',
- "RoundImplies;": '\U00002970',
- "Rrightarrow;": '\U000021DB',
- "Rscr;": '\U0000211B',
- "Rsh;": '\U000021B1',
- "RuleDelayed;": '\U000029F4',
- "SHCHcy;": '\U00000429',
- "SHcy;": '\U00000428',
- "SOFTcy;": '\U0000042C',
- "Sacute;": '\U0000015A',
- "Sc;": '\U00002ABC',
- "Scaron;": '\U00000160',
- "Scedil;": '\U0000015E',
- "Scirc;": '\U0000015C',
- "Scy;": '\U00000421',
- "Sfr;": '\U0001D516',
- "ShortDownArrow;": '\U00002193',
- "ShortLeftArrow;": '\U00002190',
- "ShortRightArrow;": '\U00002192',
- "ShortUpArrow;": '\U00002191',
- "Sigma;": '\U000003A3',
- "SmallCircle;": '\U00002218',
- "Sopf;": '\U0001D54A',
- "Sqrt;": '\U0000221A',
- "Square;": '\U000025A1',
- "SquareIntersection;": '\U00002293',
- "SquareSubset;": '\U0000228F',
- "SquareSubsetEqual;": '\U00002291',
- "SquareSuperset;": '\U00002290',
- "SquareSupersetEqual;": '\U00002292',
- "SquareUnion;": '\U00002294',
- "Sscr;": '\U0001D4AE',
- "Star;": '\U000022C6',
- "Sub;": '\U000022D0',
- "Subset;": '\U000022D0',
- "SubsetEqual;": '\U00002286',
- "Succeeds;": '\U0000227B',
- "SucceedsEqual;": '\U00002AB0',
- "SucceedsSlantEqual;": '\U0000227D',
- "SucceedsTilde;": '\U0000227F',
- "SuchThat;": '\U0000220B',
- "Sum;": '\U00002211',
- "Sup;": '\U000022D1',
- "Superset;": '\U00002283',
- "SupersetEqual;": '\U00002287',
- "Supset;": '\U000022D1',
- "THORN;": '\U000000DE',
- "TRADE;": '\U00002122',
- "TSHcy;": '\U0000040B',
- "TScy;": '\U00000426',
- "Tab;": '\U00000009',
- "Tau;": '\U000003A4',
- "Tcaron;": '\U00000164',
- "Tcedil;": '\U00000162',
- "Tcy;": '\U00000422',
- "Tfr;": '\U0001D517',
- "Therefore;": '\U00002234',
- "Theta;": '\U00000398',
- "ThinSpace;": '\U00002009',
- "Tilde;": '\U0000223C',
- "TildeEqual;": '\U00002243',
- "TildeFullEqual;": '\U00002245',
- "TildeTilde;": '\U00002248',
- "Topf;": '\U0001D54B',
- "TripleDot;": '\U000020DB',
- "Tscr;": '\U0001D4AF',
- "Tstrok;": '\U00000166',
- "Uacute;": '\U000000DA',
- "Uarr;": '\U0000219F',
- "Uarrocir;": '\U00002949',
- "Ubrcy;": '\U0000040E',
- "Ubreve;": '\U0000016C',
- "Ucirc;": '\U000000DB',
- "Ucy;": '\U00000423',
- "Udblac;": '\U00000170',
- "Ufr;": '\U0001D518',
- "Ugrave;": '\U000000D9',
- "Umacr;": '\U0000016A',
- "UnderBar;": '\U0000005F',
- "UnderBrace;": '\U000023DF',
- "UnderBracket;": '\U000023B5',
- "UnderParenthesis;": '\U000023DD',
- "Union;": '\U000022C3',
- "UnionPlus;": '\U0000228E',
- "Uogon;": '\U00000172',
- "Uopf;": '\U0001D54C',
- "UpArrow;": '\U00002191',
- "UpArrowBar;": '\U00002912',
- "UpArrowDownArrow;": '\U000021C5',
- "UpDownArrow;": '\U00002195',
- "UpEquilibrium;": '\U0000296E',
- "UpTee;": '\U000022A5',
- "UpTeeArrow;": '\U000021A5',
- "Uparrow;": '\U000021D1',
- "Updownarrow;": '\U000021D5',
- "UpperLeftArrow;": '\U00002196',
- "UpperRightArrow;": '\U00002197',
- "Upsi;": '\U000003D2',
- "Upsilon;": '\U000003A5',
- "Uring;": '\U0000016E',
- "Uscr;": '\U0001D4B0',
- "Utilde;": '\U00000168',
- "Uuml;": '\U000000DC',
- "VDash;": '\U000022AB',
- "Vbar;": '\U00002AEB',
- "Vcy;": '\U00000412',
- "Vdash;": '\U000022A9',
- "Vdashl;": '\U00002AE6',
- "Vee;": '\U000022C1',
- "Verbar;": '\U00002016',
- "Vert;": '\U00002016',
- "VerticalBar;": '\U00002223',
- "VerticalLine;": '\U0000007C',
- "VerticalSeparator;": '\U00002758',
- "VerticalTilde;": '\U00002240',
- "VeryThinSpace;": '\U0000200A',
- "Vfr;": '\U0001D519',
- "Vopf;": '\U0001D54D',
- "Vscr;": '\U0001D4B1',
- "Vvdash;": '\U000022AA',
- "Wcirc;": '\U00000174',
- "Wedge;": '\U000022C0',
- "Wfr;": '\U0001D51A',
- "Wopf;": '\U0001D54E',
- "Wscr;": '\U0001D4B2',
- "Xfr;": '\U0001D51B',
- "Xi;": '\U0000039E',
- "Xopf;": '\U0001D54F',
- "Xscr;": '\U0001D4B3',
- "YAcy;": '\U0000042F',
- "YIcy;": '\U00000407',
- "YUcy;": '\U0000042E',
- "Yacute;": '\U000000DD',
- "Ycirc;": '\U00000176',
- "Ycy;": '\U0000042B',
- "Yfr;": '\U0001D51C',
- "Yopf;": '\U0001D550',
- "Yscr;": '\U0001D4B4',
- "Yuml;": '\U00000178',
- "ZHcy;": '\U00000416',
- "Zacute;": '\U00000179',
- "Zcaron;": '\U0000017D',
- "Zcy;": '\U00000417',
- "Zdot;": '\U0000017B',
- "ZeroWidthSpace;": '\U0000200B',
- "Zeta;": '\U00000396',
- "Zfr;": '\U00002128',
- "Zopf;": '\U00002124',
- "Zscr;": '\U0001D4B5',
- "aacute;": '\U000000E1',
- "abreve;": '\U00000103',
- "ac;": '\U0000223E',
- "acd;": '\U0000223F',
- "acirc;": '\U000000E2',
- "acute;": '\U000000B4',
- "acy;": '\U00000430',
- "aelig;": '\U000000E6',
- "af;": '\U00002061',
- "afr;": '\U0001D51E',
- "agrave;": '\U000000E0',
- "alefsym;": '\U00002135',
- "aleph;": '\U00002135',
- "alpha;": '\U000003B1',
- "amacr;": '\U00000101',
- "amalg;": '\U00002A3F',
- "amp;": '\U00000026',
- "and;": '\U00002227',
- "andand;": '\U00002A55',
- "andd;": '\U00002A5C',
- "andslope;": '\U00002A58',
- "andv;": '\U00002A5A',
- "ang;": '\U00002220',
- "ange;": '\U000029A4',
- "angle;": '\U00002220',
- "angmsd;": '\U00002221',
- "angmsdaa;": '\U000029A8',
- "angmsdab;": '\U000029A9',
- "angmsdac;": '\U000029AA',
- "angmsdad;": '\U000029AB',
- "angmsdae;": '\U000029AC',
- "angmsdaf;": '\U000029AD',
- "angmsdag;": '\U000029AE',
- "angmsdah;": '\U000029AF',
- "angrt;": '\U0000221F',
- "angrtvb;": '\U000022BE',
- "angrtvbd;": '\U0000299D',
- "angsph;": '\U00002222',
- "angst;": '\U000000C5',
- "angzarr;": '\U0000237C',
- "aogon;": '\U00000105',
- "aopf;": '\U0001D552',
- "ap;": '\U00002248',
- "apE;": '\U00002A70',
- "apacir;": '\U00002A6F',
- "ape;": '\U0000224A',
- "apid;": '\U0000224B',
- "apos;": '\U00000027',
- "approx;": '\U00002248',
- "approxeq;": '\U0000224A',
- "aring;": '\U000000E5',
- "ascr;": '\U0001D4B6',
- "ast;": '\U0000002A',
- "asymp;": '\U00002248',
- "asympeq;": '\U0000224D',
- "atilde;": '\U000000E3',
- "auml;": '\U000000E4',
- "awconint;": '\U00002233',
- "awint;": '\U00002A11',
- "bNot;": '\U00002AED',
- "backcong;": '\U0000224C',
- "backepsilon;": '\U000003F6',
- "backprime;": '\U00002035',
- "backsim;": '\U0000223D',
- "backsimeq;": '\U000022CD',
- "barvee;": '\U000022BD',
- "barwed;": '\U00002305',
- "barwedge;": '\U00002305',
- "bbrk;": '\U000023B5',
- "bbrktbrk;": '\U000023B6',
- "bcong;": '\U0000224C',
- "bcy;": '\U00000431',
- "bdquo;": '\U0000201E',
- "becaus;": '\U00002235',
- "because;": '\U00002235',
- "bemptyv;": '\U000029B0',
- "bepsi;": '\U000003F6',
- "bernou;": '\U0000212C',
- "beta;": '\U000003B2',
- "beth;": '\U00002136',
- "between;": '\U0000226C',
- "bfr;": '\U0001D51F',
- "bigcap;": '\U000022C2',
- "bigcirc;": '\U000025EF',
- "bigcup;": '\U000022C3',
- "bigodot;": '\U00002A00',
- "bigoplus;": '\U00002A01',
- "bigotimes;": '\U00002A02',
- "bigsqcup;": '\U00002A06',
- "bigstar;": '\U00002605',
- "bigtriangledown;": '\U000025BD',
- "bigtriangleup;": '\U000025B3',
- "biguplus;": '\U00002A04',
- "bigvee;": '\U000022C1',
- "bigwedge;": '\U000022C0',
- "bkarow;": '\U0000290D',
- "blacklozenge;": '\U000029EB',
- "blacksquare;": '\U000025AA',
- "blacktriangle;": '\U000025B4',
- "blacktriangledown;": '\U000025BE',
- "blacktriangleleft;": '\U000025C2',
- "blacktriangleright;": '\U000025B8',
- "blank;": '\U00002423',
- "blk12;": '\U00002592',
- "blk14;": '\U00002591',
- "blk34;": '\U00002593',
- "block;": '\U00002588',
- "bnot;": '\U00002310',
- "bopf;": '\U0001D553',
- "bot;": '\U000022A5',
- "bottom;": '\U000022A5',
- "bowtie;": '\U000022C8',
- "boxDL;": '\U00002557',
- "boxDR;": '\U00002554',
- "boxDl;": '\U00002556',
- "boxDr;": '\U00002553',
- "boxH;": '\U00002550',
- "boxHD;": '\U00002566',
- "boxHU;": '\U00002569',
- "boxHd;": '\U00002564',
- "boxHu;": '\U00002567',
- "boxUL;": '\U0000255D',
- "boxUR;": '\U0000255A',
- "boxUl;": '\U0000255C',
- "boxUr;": '\U00002559',
- "boxV;": '\U00002551',
- "boxVH;": '\U0000256C',
- "boxVL;": '\U00002563',
- "boxVR;": '\U00002560',
- "boxVh;": '\U0000256B',
- "boxVl;": '\U00002562',
- "boxVr;": '\U0000255F',
- "boxbox;": '\U000029C9',
- "boxdL;": '\U00002555',
- "boxdR;": '\U00002552',
- "boxdl;": '\U00002510',
- "boxdr;": '\U0000250C',
- "boxh;": '\U00002500',
- "boxhD;": '\U00002565',
- "boxhU;": '\U00002568',
- "boxhd;": '\U0000252C',
- "boxhu;": '\U00002534',
- "boxminus;": '\U0000229F',
- "boxplus;": '\U0000229E',
- "boxtimes;": '\U000022A0',
- "boxuL;": '\U0000255B',
- "boxuR;": '\U00002558',
- "boxul;": '\U00002518',
- "boxur;": '\U00002514',
- "boxv;": '\U00002502',
- "boxvH;": '\U0000256A',
- "boxvL;": '\U00002561',
- "boxvR;": '\U0000255E',
- "boxvh;": '\U0000253C',
- "boxvl;": '\U00002524',
- "boxvr;": '\U0000251C',
- "bprime;": '\U00002035',
- "breve;": '\U000002D8',
- "brvbar;": '\U000000A6',
- "bscr;": '\U0001D4B7',
- "bsemi;": '\U0000204F',
- "bsim;": '\U0000223D',
- "bsime;": '\U000022CD',
- "bsol;": '\U0000005C',
- "bsolb;": '\U000029C5',
- "bsolhsub;": '\U000027C8',
- "bull;": '\U00002022',
- "bullet;": '\U00002022',
- "bump;": '\U0000224E',
- "bumpE;": '\U00002AAE',
- "bumpe;": '\U0000224F',
- "bumpeq;": '\U0000224F',
- "cacute;": '\U00000107',
- "cap;": '\U00002229',
- "capand;": '\U00002A44',
- "capbrcup;": '\U00002A49',
- "capcap;": '\U00002A4B',
- "capcup;": '\U00002A47',
- "capdot;": '\U00002A40',
- "caret;": '\U00002041',
- "caron;": '\U000002C7',
- "ccaps;": '\U00002A4D',
- "ccaron;": '\U0000010D',
- "ccedil;": '\U000000E7',
- "ccirc;": '\U00000109',
- "ccups;": '\U00002A4C',
- "ccupssm;": '\U00002A50',
- "cdot;": '\U0000010B',
- "cedil;": '\U000000B8',
- "cemptyv;": '\U000029B2',
- "cent;": '\U000000A2',
- "centerdot;": '\U000000B7',
- "cfr;": '\U0001D520',
- "chcy;": '\U00000447',
- "check;": '\U00002713',
- "checkmark;": '\U00002713',
- "chi;": '\U000003C7',
- "cir;": '\U000025CB',
- "cirE;": '\U000029C3',
- "circ;": '\U000002C6',
- "circeq;": '\U00002257',
- "circlearrowleft;": '\U000021BA',
- "circlearrowright;": '\U000021BB',
- "circledR;": '\U000000AE',
- "circledS;": '\U000024C8',
- "circledast;": '\U0000229B',
- "circledcirc;": '\U0000229A',
- "circleddash;": '\U0000229D',
- "cire;": '\U00002257',
- "cirfnint;": '\U00002A10',
- "cirmid;": '\U00002AEF',
- "cirscir;": '\U000029C2',
- "clubs;": '\U00002663',
- "clubsuit;": '\U00002663',
- "colon;": '\U0000003A',
- "colone;": '\U00002254',
- "coloneq;": '\U00002254',
- "comma;": '\U0000002C',
- "commat;": '\U00000040',
- "comp;": '\U00002201',
- "compfn;": '\U00002218',
- "complement;": '\U00002201',
- "complexes;": '\U00002102',
- "cong;": '\U00002245',
- "congdot;": '\U00002A6D',
- "conint;": '\U0000222E',
- "copf;": '\U0001D554',
- "coprod;": '\U00002210',
- "copy;": '\U000000A9',
- "copysr;": '\U00002117',
- "crarr;": '\U000021B5',
- "cross;": '\U00002717',
- "cscr;": '\U0001D4B8',
- "csub;": '\U00002ACF',
- "csube;": '\U00002AD1',
- "csup;": '\U00002AD0',
- "csupe;": '\U00002AD2',
- "ctdot;": '\U000022EF',
- "cudarrl;": '\U00002938',
- "cudarrr;": '\U00002935',
- "cuepr;": '\U000022DE',
- "cuesc;": '\U000022DF',
- "cularr;": '\U000021B6',
- "cularrp;": '\U0000293D',
- "cup;": '\U0000222A',
- "cupbrcap;": '\U00002A48',
- "cupcap;": '\U00002A46',
- "cupcup;": '\U00002A4A',
- "cupdot;": '\U0000228D',
- "cupor;": '\U00002A45',
- "curarr;": '\U000021B7',
- "curarrm;": '\U0000293C',
- "curlyeqprec;": '\U000022DE',
- "curlyeqsucc;": '\U000022DF',
- "curlyvee;": '\U000022CE',
- "curlywedge;": '\U000022CF',
- "curren;": '\U000000A4',
- "curvearrowleft;": '\U000021B6',
- "curvearrowright;": '\U000021B7',
- "cuvee;": '\U000022CE',
- "cuwed;": '\U000022CF',
- "cwconint;": '\U00002232',
- "cwint;": '\U00002231',
- "cylcty;": '\U0000232D',
- "dArr;": '\U000021D3',
- "dHar;": '\U00002965',
- "dagger;": '\U00002020',
- "daleth;": '\U00002138',
- "darr;": '\U00002193',
- "dash;": '\U00002010',
- "dashv;": '\U000022A3',
- "dbkarow;": '\U0000290F',
- "dblac;": '\U000002DD',
- "dcaron;": '\U0000010F',
- "dcy;": '\U00000434',
- "dd;": '\U00002146',
- "ddagger;": '\U00002021',
- "ddarr;": '\U000021CA',
- "ddotseq;": '\U00002A77',
- "deg;": '\U000000B0',
- "delta;": '\U000003B4',
- "demptyv;": '\U000029B1',
- "dfisht;": '\U0000297F',
- "dfr;": '\U0001D521',
- "dharl;": '\U000021C3',
- "dharr;": '\U000021C2',
- "diam;": '\U000022C4',
- "diamond;": '\U000022C4',
- "diamondsuit;": '\U00002666',
- "diams;": '\U00002666',
- "die;": '\U000000A8',
- "digamma;": '\U000003DD',
- "disin;": '\U000022F2',
- "div;": '\U000000F7',
- "divide;": '\U000000F7',
- "divideontimes;": '\U000022C7',
- "divonx;": '\U000022C7',
- "djcy;": '\U00000452',
- "dlcorn;": '\U0000231E',
- "dlcrop;": '\U0000230D',
- "dollar;": '\U00000024',
- "dopf;": '\U0001D555',
- "dot;": '\U000002D9',
- "doteq;": '\U00002250',
- "doteqdot;": '\U00002251',
- "dotminus;": '\U00002238',
- "dotplus;": '\U00002214',
- "dotsquare;": '\U000022A1',
- "doublebarwedge;": '\U00002306',
- "downarrow;": '\U00002193',
- "downdownarrows;": '\U000021CA',
- "downharpoonleft;": '\U000021C3',
- "downharpoonright;": '\U000021C2',
- "drbkarow;": '\U00002910',
- "drcorn;": '\U0000231F',
- "drcrop;": '\U0000230C',
- "dscr;": '\U0001D4B9',
- "dscy;": '\U00000455',
- "dsol;": '\U000029F6',
- "dstrok;": '\U00000111',
- "dtdot;": '\U000022F1',
- "dtri;": '\U000025BF',
- "dtrif;": '\U000025BE',
- "duarr;": '\U000021F5',
- "duhar;": '\U0000296F',
- "dwangle;": '\U000029A6',
- "dzcy;": '\U0000045F',
- "dzigrarr;": '\U000027FF',
- "eDDot;": '\U00002A77',
- "eDot;": '\U00002251',
- "eacute;": '\U000000E9',
- "easter;": '\U00002A6E',
- "ecaron;": '\U0000011B',
- "ecir;": '\U00002256',
- "ecirc;": '\U000000EA',
- "ecolon;": '\U00002255',
- "ecy;": '\U0000044D',
- "edot;": '\U00000117',
- "ee;": '\U00002147',
- "efDot;": '\U00002252',
- "efr;": '\U0001D522',
- "eg;": '\U00002A9A',
- "egrave;": '\U000000E8',
- "egs;": '\U00002A96',
- "egsdot;": '\U00002A98',
- "el;": '\U00002A99',
- "elinters;": '\U000023E7',
- "ell;": '\U00002113',
- "els;": '\U00002A95',
- "elsdot;": '\U00002A97',
- "emacr;": '\U00000113',
- "empty;": '\U00002205',
- "emptyset;": '\U00002205',
- "emptyv;": '\U00002205',
- "emsp;": '\U00002003',
- "emsp13;": '\U00002004',
- "emsp14;": '\U00002005',
- "eng;": '\U0000014B',
- "ensp;": '\U00002002',
- "eogon;": '\U00000119',
- "eopf;": '\U0001D556',
- "epar;": '\U000022D5',
- "eparsl;": '\U000029E3',
- "eplus;": '\U00002A71',
- "epsi;": '\U000003B5',
- "epsilon;": '\U000003B5',
- "epsiv;": '\U000003F5',
- "eqcirc;": '\U00002256',
- "eqcolon;": '\U00002255',
- "eqsim;": '\U00002242',
- "eqslantgtr;": '\U00002A96',
- "eqslantless;": '\U00002A95',
- "equals;": '\U0000003D',
- "equest;": '\U0000225F',
- "equiv;": '\U00002261',
- "equivDD;": '\U00002A78',
- "eqvparsl;": '\U000029E5',
- "erDot;": '\U00002253',
- "erarr;": '\U00002971',
- "escr;": '\U0000212F',
- "esdot;": '\U00002250',
- "esim;": '\U00002242',
- "eta;": '\U000003B7',
- "eth;": '\U000000F0',
- "euml;": '\U000000EB',
- "euro;": '\U000020AC',
- "excl;": '\U00000021',
- "exist;": '\U00002203',
- "expectation;": '\U00002130',
- "exponentiale;": '\U00002147',
- "fallingdotseq;": '\U00002252',
- "fcy;": '\U00000444',
- "female;": '\U00002640',
- "ffilig;": '\U0000FB03',
- "fflig;": '\U0000FB00',
- "ffllig;": '\U0000FB04',
- "ffr;": '\U0001D523',
- "filig;": '\U0000FB01',
- "flat;": '\U0000266D',
- "fllig;": '\U0000FB02',
- "fltns;": '\U000025B1',
- "fnof;": '\U00000192',
- "fopf;": '\U0001D557',
- "forall;": '\U00002200',
- "fork;": '\U000022D4',
- "forkv;": '\U00002AD9',
- "fpartint;": '\U00002A0D',
- "frac12;": '\U000000BD',
- "frac13;": '\U00002153',
- "frac14;": '\U000000BC',
- "frac15;": '\U00002155',
- "frac16;": '\U00002159',
- "frac18;": '\U0000215B',
- "frac23;": '\U00002154',
- "frac25;": '\U00002156',
- "frac34;": '\U000000BE',
- "frac35;": '\U00002157',
- "frac38;": '\U0000215C',
- "frac45;": '\U00002158',
- "frac56;": '\U0000215A',
- "frac58;": '\U0000215D',
- "frac78;": '\U0000215E',
- "frasl;": '\U00002044',
- "frown;": '\U00002322',
- "fscr;": '\U0001D4BB',
- "gE;": '\U00002267',
- "gEl;": '\U00002A8C',
- "gacute;": '\U000001F5',
- "gamma;": '\U000003B3',
- "gammad;": '\U000003DD',
- "gap;": '\U00002A86',
- "gbreve;": '\U0000011F',
- "gcirc;": '\U0000011D',
- "gcy;": '\U00000433',
- "gdot;": '\U00000121',
- "ge;": '\U00002265',
- "gel;": '\U000022DB',
- "geq;": '\U00002265',
- "geqq;": '\U00002267',
- "geqslant;": '\U00002A7E',
- "ges;": '\U00002A7E',
- "gescc;": '\U00002AA9',
- "gesdot;": '\U00002A80',
- "gesdoto;": '\U00002A82',
- "gesdotol;": '\U00002A84',
- "gesles;": '\U00002A94',
- "gfr;": '\U0001D524',
- "gg;": '\U0000226B',
- "ggg;": '\U000022D9',
- "gimel;": '\U00002137',
- "gjcy;": '\U00000453',
- "gl;": '\U00002277',
- "glE;": '\U00002A92',
- "gla;": '\U00002AA5',
- "glj;": '\U00002AA4',
- "gnE;": '\U00002269',
- "gnap;": '\U00002A8A',
- "gnapprox;": '\U00002A8A',
- "gne;": '\U00002A88',
- "gneq;": '\U00002A88',
- "gneqq;": '\U00002269',
- "gnsim;": '\U000022E7',
- "gopf;": '\U0001D558',
- "grave;": '\U00000060',
- "gscr;": '\U0000210A',
- "gsim;": '\U00002273',
- "gsime;": '\U00002A8E',
- "gsiml;": '\U00002A90',
- "gt;": '\U0000003E',
- "gtcc;": '\U00002AA7',
- "gtcir;": '\U00002A7A',
- "gtdot;": '\U000022D7',
- "gtlPar;": '\U00002995',
- "gtquest;": '\U00002A7C',
- "gtrapprox;": '\U00002A86',
- "gtrarr;": '\U00002978',
- "gtrdot;": '\U000022D7',
- "gtreqless;": '\U000022DB',
- "gtreqqless;": '\U00002A8C',
- "gtrless;": '\U00002277',
- "gtrsim;": '\U00002273',
- "hArr;": '\U000021D4',
- "hairsp;": '\U0000200A',
- "half;": '\U000000BD',
- "hamilt;": '\U0000210B',
- "hardcy;": '\U0000044A',
- "harr;": '\U00002194',
- "harrcir;": '\U00002948',
- "harrw;": '\U000021AD',
- "hbar;": '\U0000210F',
- "hcirc;": '\U00000125',
- "hearts;": '\U00002665',
- "heartsuit;": '\U00002665',
- "hellip;": '\U00002026',
- "hercon;": '\U000022B9',
- "hfr;": '\U0001D525',
- "hksearow;": '\U00002925',
- "hkswarow;": '\U00002926',
- "hoarr;": '\U000021FF',
- "homtht;": '\U0000223B',
- "hookleftarrow;": '\U000021A9',
- "hookrightarrow;": '\U000021AA',
- "hopf;": '\U0001D559',
- "horbar;": '\U00002015',
- "hscr;": '\U0001D4BD',
- "hslash;": '\U0000210F',
- "hstrok;": '\U00000127',
- "hybull;": '\U00002043',
- "hyphen;": '\U00002010',
- "iacute;": '\U000000ED',
- "ic;": '\U00002063',
- "icirc;": '\U000000EE',
- "icy;": '\U00000438',
- "iecy;": '\U00000435',
- "iexcl;": '\U000000A1',
- "iff;": '\U000021D4',
- "ifr;": '\U0001D526',
- "igrave;": '\U000000EC',
- "ii;": '\U00002148',
- "iiiint;": '\U00002A0C',
- "iiint;": '\U0000222D',
- "iinfin;": '\U000029DC',
- "iiota;": '\U00002129',
- "ijlig;": '\U00000133',
- "imacr;": '\U0000012B',
- "image;": '\U00002111',
- "imagline;": '\U00002110',
- "imagpart;": '\U00002111',
- "imath;": '\U00000131',
- "imof;": '\U000022B7',
- "imped;": '\U000001B5',
- "in;": '\U00002208',
- "incare;": '\U00002105',
- "infin;": '\U0000221E',
- "infintie;": '\U000029DD',
- "inodot;": '\U00000131',
- "int;": '\U0000222B',
- "intcal;": '\U000022BA',
- "integers;": '\U00002124',
- "intercal;": '\U000022BA',
- "intlarhk;": '\U00002A17',
- "intprod;": '\U00002A3C',
- "iocy;": '\U00000451',
- "iogon;": '\U0000012F',
- "iopf;": '\U0001D55A',
- "iota;": '\U000003B9',
- "iprod;": '\U00002A3C',
- "iquest;": '\U000000BF',
- "iscr;": '\U0001D4BE',
- "isin;": '\U00002208',
- "isinE;": '\U000022F9',
- "isindot;": '\U000022F5',
- "isins;": '\U000022F4',
- "isinsv;": '\U000022F3',
- "isinv;": '\U00002208',
- "it;": '\U00002062',
- "itilde;": '\U00000129',
- "iukcy;": '\U00000456',
- "iuml;": '\U000000EF',
- "jcirc;": '\U00000135',
- "jcy;": '\U00000439',
- "jfr;": '\U0001D527',
- "jmath;": '\U00000237',
- "jopf;": '\U0001D55B',
- "jscr;": '\U0001D4BF',
- "jsercy;": '\U00000458',
- "jukcy;": '\U00000454',
- "kappa;": '\U000003BA',
- "kappav;": '\U000003F0',
- "kcedil;": '\U00000137',
- "kcy;": '\U0000043A',
- "kfr;": '\U0001D528',
- "kgreen;": '\U00000138',
- "khcy;": '\U00000445',
- "kjcy;": '\U0000045C',
- "kopf;": '\U0001D55C',
- "kscr;": '\U0001D4C0',
- "lAarr;": '\U000021DA',
- "lArr;": '\U000021D0',
- "lAtail;": '\U0000291B',
- "lBarr;": '\U0000290E',
- "lE;": '\U00002266',
- "lEg;": '\U00002A8B',
- "lHar;": '\U00002962',
- "lacute;": '\U0000013A',
- "laemptyv;": '\U000029B4',
- "lagran;": '\U00002112',
- "lambda;": '\U000003BB',
- "lang;": '\U000027E8',
- "langd;": '\U00002991',
- "langle;": '\U000027E8',
- "lap;": '\U00002A85',
- "laquo;": '\U000000AB',
- "larr;": '\U00002190',
- "larrb;": '\U000021E4',
- "larrbfs;": '\U0000291F',
- "larrfs;": '\U0000291D',
- "larrhk;": '\U000021A9',
- "larrlp;": '\U000021AB',
- "larrpl;": '\U00002939',
- "larrsim;": '\U00002973',
- "larrtl;": '\U000021A2',
- "lat;": '\U00002AAB',
- "latail;": '\U00002919',
- "late;": '\U00002AAD',
- "lbarr;": '\U0000290C',
- "lbbrk;": '\U00002772',
- "lbrace;": '\U0000007B',
- "lbrack;": '\U0000005B',
- "lbrke;": '\U0000298B',
- "lbrksld;": '\U0000298F',
- "lbrkslu;": '\U0000298D',
- "lcaron;": '\U0000013E',
- "lcedil;": '\U0000013C',
- "lceil;": '\U00002308',
- "lcub;": '\U0000007B',
- "lcy;": '\U0000043B',
- "ldca;": '\U00002936',
- "ldquo;": '\U0000201C',
- "ldquor;": '\U0000201E',
- "ldrdhar;": '\U00002967',
- "ldrushar;": '\U0000294B',
- "ldsh;": '\U000021B2',
- "le;": '\U00002264',
- "leftarrow;": '\U00002190',
- "leftarrowtail;": '\U000021A2',
- "leftharpoondown;": '\U000021BD',
- "leftharpoonup;": '\U000021BC',
- "leftleftarrows;": '\U000021C7',
- "leftrightarrow;": '\U00002194',
- "leftrightarrows;": '\U000021C6',
- "leftrightharpoons;": '\U000021CB',
- "leftrightsquigarrow;": '\U000021AD',
- "leftthreetimes;": '\U000022CB',
- "leg;": '\U000022DA',
- "leq;": '\U00002264',
- "leqq;": '\U00002266',
- "leqslant;": '\U00002A7D',
- "les;": '\U00002A7D',
- "lescc;": '\U00002AA8',
- "lesdot;": '\U00002A7F',
- "lesdoto;": '\U00002A81',
- "lesdotor;": '\U00002A83',
- "lesges;": '\U00002A93',
- "lessapprox;": '\U00002A85',
- "lessdot;": '\U000022D6',
- "lesseqgtr;": '\U000022DA',
- "lesseqqgtr;": '\U00002A8B',
- "lessgtr;": '\U00002276',
- "lesssim;": '\U00002272',
- "lfisht;": '\U0000297C',
- "lfloor;": '\U0000230A',
- "lfr;": '\U0001D529',
- "lg;": '\U00002276',
- "lgE;": '\U00002A91',
- "lhard;": '\U000021BD',
- "lharu;": '\U000021BC',
- "lharul;": '\U0000296A',
- "lhblk;": '\U00002584',
- "ljcy;": '\U00000459',
- "ll;": '\U0000226A',
- "llarr;": '\U000021C7',
- "llcorner;": '\U0000231E',
- "llhard;": '\U0000296B',
- "lltri;": '\U000025FA',
- "lmidot;": '\U00000140',
- "lmoust;": '\U000023B0',
- "lmoustache;": '\U000023B0',
- "lnE;": '\U00002268',
- "lnap;": '\U00002A89',
- "lnapprox;": '\U00002A89',
- "lne;": '\U00002A87',
- "lneq;": '\U00002A87',
- "lneqq;": '\U00002268',
- "lnsim;": '\U000022E6',
- "loang;": '\U000027EC',
- "loarr;": '\U000021FD',
- "lobrk;": '\U000027E6',
- "longleftarrow;": '\U000027F5',
- "longleftrightarrow;": '\U000027F7',
- "longmapsto;": '\U000027FC',
- "longrightarrow;": '\U000027F6',
- "looparrowleft;": '\U000021AB',
- "looparrowright;": '\U000021AC',
- "lopar;": '\U00002985',
- "lopf;": '\U0001D55D',
- "loplus;": '\U00002A2D',
- "lotimes;": '\U00002A34',
- "lowast;": '\U00002217',
- "lowbar;": '\U0000005F',
- "loz;": '\U000025CA',
- "lozenge;": '\U000025CA',
- "lozf;": '\U000029EB',
- "lpar;": '\U00000028',
- "lparlt;": '\U00002993',
- "lrarr;": '\U000021C6',
- "lrcorner;": '\U0000231F',
- "lrhar;": '\U000021CB',
- "lrhard;": '\U0000296D',
- "lrm;": '\U0000200E',
- "lrtri;": '\U000022BF',
- "lsaquo;": '\U00002039',
- "lscr;": '\U0001D4C1',
- "lsh;": '\U000021B0',
- "lsim;": '\U00002272',
- "lsime;": '\U00002A8D',
- "lsimg;": '\U00002A8F',
- "lsqb;": '\U0000005B',
- "lsquo;": '\U00002018',
- "lsquor;": '\U0000201A',
- "lstrok;": '\U00000142',
- "lt;": '\U0000003C',
- "ltcc;": '\U00002AA6',
- "ltcir;": '\U00002A79',
- "ltdot;": '\U000022D6',
- "lthree;": '\U000022CB',
- "ltimes;": '\U000022C9',
- "ltlarr;": '\U00002976',
- "ltquest;": '\U00002A7B',
- "ltrPar;": '\U00002996',
- "ltri;": '\U000025C3',
- "ltrie;": '\U000022B4',
- "ltrif;": '\U000025C2',
- "lurdshar;": '\U0000294A',
- "luruhar;": '\U00002966',
- "mDDot;": '\U0000223A',
- "macr;": '\U000000AF',
- "male;": '\U00002642',
- "malt;": '\U00002720',
- "maltese;": '\U00002720',
- "map;": '\U000021A6',
- "mapsto;": '\U000021A6',
- "mapstodown;": '\U000021A7',
- "mapstoleft;": '\U000021A4',
- "mapstoup;": '\U000021A5',
- "marker;": '\U000025AE',
- "mcomma;": '\U00002A29',
- "mcy;": '\U0000043C',
- "mdash;": '\U00002014',
- "measuredangle;": '\U00002221',
- "mfr;": '\U0001D52A',
- "mho;": '\U00002127',
- "micro;": '\U000000B5',
- "mid;": '\U00002223',
- "midast;": '\U0000002A',
- "midcir;": '\U00002AF0',
- "middot;": '\U000000B7',
- "minus;": '\U00002212',
- "minusb;": '\U0000229F',
- "minusd;": '\U00002238',
- "minusdu;": '\U00002A2A',
- "mlcp;": '\U00002ADB',
- "mldr;": '\U00002026',
- "mnplus;": '\U00002213',
- "models;": '\U000022A7',
- "mopf;": '\U0001D55E',
- "mp;": '\U00002213',
- "mscr;": '\U0001D4C2',
- "mstpos;": '\U0000223E',
- "mu;": '\U000003BC',
- "multimap;": '\U000022B8',
- "mumap;": '\U000022B8',
- "nLeftarrow;": '\U000021CD',
- "nLeftrightarrow;": '\U000021CE',
- "nRightarrow;": '\U000021CF',
- "nVDash;": '\U000022AF',
- "nVdash;": '\U000022AE',
- "nabla;": '\U00002207',
- "nacute;": '\U00000144',
- "nap;": '\U00002249',
- "napos;": '\U00000149',
- "napprox;": '\U00002249',
- "natur;": '\U0000266E',
- "natural;": '\U0000266E',
- "naturals;": '\U00002115',
- "nbsp;": '\U000000A0',
- "ncap;": '\U00002A43',
- "ncaron;": '\U00000148',
- "ncedil;": '\U00000146',
- "ncong;": '\U00002247',
- "ncup;": '\U00002A42',
- "ncy;": '\U0000043D',
- "ndash;": '\U00002013',
- "ne;": '\U00002260',
- "neArr;": '\U000021D7',
- "nearhk;": '\U00002924',
- "nearr;": '\U00002197',
- "nearrow;": '\U00002197',
- "nequiv;": '\U00002262',
- "nesear;": '\U00002928',
- "nexist;": '\U00002204',
- "nexists;": '\U00002204',
- "nfr;": '\U0001D52B',
- "nge;": '\U00002271',
- "ngeq;": '\U00002271',
- "ngsim;": '\U00002275',
- "ngt;": '\U0000226F',
- "ngtr;": '\U0000226F',
- "nhArr;": '\U000021CE',
- "nharr;": '\U000021AE',
- "nhpar;": '\U00002AF2',
- "ni;": '\U0000220B',
- "nis;": '\U000022FC',
- "nisd;": '\U000022FA',
- "niv;": '\U0000220B',
- "njcy;": '\U0000045A',
- "nlArr;": '\U000021CD',
- "nlarr;": '\U0000219A',
- "nldr;": '\U00002025',
- "nle;": '\U00002270',
- "nleftarrow;": '\U0000219A',
- "nleftrightarrow;": '\U000021AE',
- "nleq;": '\U00002270',
- "nless;": '\U0000226E',
- "nlsim;": '\U00002274',
- "nlt;": '\U0000226E',
- "nltri;": '\U000022EA',
- "nltrie;": '\U000022EC',
- "nmid;": '\U00002224',
- "nopf;": '\U0001D55F',
- "not;": '\U000000AC',
- "notin;": '\U00002209',
- "notinva;": '\U00002209',
- "notinvb;": '\U000022F7',
- "notinvc;": '\U000022F6',
- "notni;": '\U0000220C',
- "notniva;": '\U0000220C',
- "notnivb;": '\U000022FE',
- "notnivc;": '\U000022FD',
- "npar;": '\U00002226',
- "nparallel;": '\U00002226',
- "npolint;": '\U00002A14',
- "npr;": '\U00002280',
- "nprcue;": '\U000022E0',
- "nprec;": '\U00002280',
- "nrArr;": '\U000021CF',
- "nrarr;": '\U0000219B',
- "nrightarrow;": '\U0000219B',
- "nrtri;": '\U000022EB',
- "nrtrie;": '\U000022ED',
- "nsc;": '\U00002281',
- "nsccue;": '\U000022E1',
- "nscr;": '\U0001D4C3',
- "nshortmid;": '\U00002224',
- "nshortparallel;": '\U00002226',
- "nsim;": '\U00002241',
- "nsime;": '\U00002244',
- "nsimeq;": '\U00002244',
- "nsmid;": '\U00002224',
- "nspar;": '\U00002226',
- "nsqsube;": '\U000022E2',
- "nsqsupe;": '\U000022E3',
- "nsub;": '\U00002284',
- "nsube;": '\U00002288',
- "nsubseteq;": '\U00002288',
- "nsucc;": '\U00002281',
- "nsup;": '\U00002285',
- "nsupe;": '\U00002289',
- "nsupseteq;": '\U00002289',
- "ntgl;": '\U00002279',
- "ntilde;": '\U000000F1',
- "ntlg;": '\U00002278',
- "ntriangleleft;": '\U000022EA',
- "ntrianglelefteq;": '\U000022EC',
- "ntriangleright;": '\U000022EB',
- "ntrianglerighteq;": '\U000022ED',
- "nu;": '\U000003BD',
- "num;": '\U00000023',
- "numero;": '\U00002116',
- "numsp;": '\U00002007',
- "nvDash;": '\U000022AD',
- "nvHarr;": '\U00002904',
- "nvdash;": '\U000022AC',
- "nvinfin;": '\U000029DE',
- "nvlArr;": '\U00002902',
- "nvrArr;": '\U00002903',
- "nwArr;": '\U000021D6',
- "nwarhk;": '\U00002923',
- "nwarr;": '\U00002196',
- "nwarrow;": '\U00002196',
- "nwnear;": '\U00002927',
- "oS;": '\U000024C8',
- "oacute;": '\U000000F3',
- "oast;": '\U0000229B',
- "ocir;": '\U0000229A',
- "ocirc;": '\U000000F4',
- "ocy;": '\U0000043E',
- "odash;": '\U0000229D',
- "odblac;": '\U00000151',
- "odiv;": '\U00002A38',
- "odot;": '\U00002299',
- "odsold;": '\U000029BC',
- "oelig;": '\U00000153',
- "ofcir;": '\U000029BF',
- "ofr;": '\U0001D52C',
- "ogon;": '\U000002DB',
- "ograve;": '\U000000F2',
- "ogt;": '\U000029C1',
- "ohbar;": '\U000029B5',
- "ohm;": '\U000003A9',
- "oint;": '\U0000222E',
- "olarr;": '\U000021BA',
- "olcir;": '\U000029BE',
- "olcross;": '\U000029BB',
- "oline;": '\U0000203E',
- "olt;": '\U000029C0',
- "omacr;": '\U0000014D',
- "omega;": '\U000003C9',
- "omicron;": '\U000003BF',
- "omid;": '\U000029B6',
- "ominus;": '\U00002296',
- "oopf;": '\U0001D560',
- "opar;": '\U000029B7',
- "operp;": '\U000029B9',
- "oplus;": '\U00002295',
- "or;": '\U00002228',
- "orarr;": '\U000021BB',
- "ord;": '\U00002A5D',
- "order;": '\U00002134',
- "orderof;": '\U00002134',
- "ordf;": '\U000000AA',
- "ordm;": '\U000000BA',
- "origof;": '\U000022B6',
- "oror;": '\U00002A56',
- "orslope;": '\U00002A57',
- "orv;": '\U00002A5B',
- "oscr;": '\U00002134',
- "oslash;": '\U000000F8',
- "osol;": '\U00002298',
- "otilde;": '\U000000F5',
- "otimes;": '\U00002297',
- "otimesas;": '\U00002A36',
- "ouml;": '\U000000F6',
- "ovbar;": '\U0000233D',
- "par;": '\U00002225',
- "para;": '\U000000B6',
- "parallel;": '\U00002225',
- "parsim;": '\U00002AF3',
- "parsl;": '\U00002AFD',
- "part;": '\U00002202',
- "pcy;": '\U0000043F',
- "percnt;": '\U00000025',
- "period;": '\U0000002E',
- "permil;": '\U00002030',
- "perp;": '\U000022A5',
- "pertenk;": '\U00002031',
- "pfr;": '\U0001D52D',
- "phi;": '\U000003C6',
- "phiv;": '\U000003D5',
- "phmmat;": '\U00002133',
- "phone;": '\U0000260E',
- "pi;": '\U000003C0',
- "pitchfork;": '\U000022D4',
- "piv;": '\U000003D6',
- "planck;": '\U0000210F',
- "planckh;": '\U0000210E',
- "plankv;": '\U0000210F',
- "plus;": '\U0000002B',
- "plusacir;": '\U00002A23',
- "plusb;": '\U0000229E',
- "pluscir;": '\U00002A22',
- "plusdo;": '\U00002214',
- "plusdu;": '\U00002A25',
- "pluse;": '\U00002A72',
- "plusmn;": '\U000000B1',
- "plussim;": '\U00002A26',
- "plustwo;": '\U00002A27',
- "pm;": '\U000000B1',
- "pointint;": '\U00002A15',
- "popf;": '\U0001D561',
- "pound;": '\U000000A3',
- "pr;": '\U0000227A',
- "prE;": '\U00002AB3',
- "prap;": '\U00002AB7',
- "prcue;": '\U0000227C',
- "pre;": '\U00002AAF',
- "prec;": '\U0000227A',
- "precapprox;": '\U00002AB7',
- "preccurlyeq;": '\U0000227C',
- "preceq;": '\U00002AAF',
- "precnapprox;": '\U00002AB9',
- "precneqq;": '\U00002AB5',
- "precnsim;": '\U000022E8',
- "precsim;": '\U0000227E',
- "prime;": '\U00002032',
- "primes;": '\U00002119',
- "prnE;": '\U00002AB5',
- "prnap;": '\U00002AB9',
- "prnsim;": '\U000022E8',
- "prod;": '\U0000220F',
- "profalar;": '\U0000232E',
- "profline;": '\U00002312',
- "profsurf;": '\U00002313',
- "prop;": '\U0000221D',
- "propto;": '\U0000221D',
- "prsim;": '\U0000227E',
- "prurel;": '\U000022B0',
- "pscr;": '\U0001D4C5',
- "psi;": '\U000003C8',
- "puncsp;": '\U00002008',
- "qfr;": '\U0001D52E',
- "qint;": '\U00002A0C',
- "qopf;": '\U0001D562',
- "qprime;": '\U00002057',
- "qscr;": '\U0001D4C6',
- "quaternions;": '\U0000210D',
- "quatint;": '\U00002A16',
- "quest;": '\U0000003F',
- "questeq;": '\U0000225F',
- "quot;": '\U00000022',
- "rAarr;": '\U000021DB',
- "rArr;": '\U000021D2',
- "rAtail;": '\U0000291C',
- "rBarr;": '\U0000290F',
- "rHar;": '\U00002964',
- "racute;": '\U00000155',
- "radic;": '\U0000221A',
- "raemptyv;": '\U000029B3',
- "rang;": '\U000027E9',
- "rangd;": '\U00002992',
- "range;": '\U000029A5',
- "rangle;": '\U000027E9',
- "raquo;": '\U000000BB',
- "rarr;": '\U00002192',
- "rarrap;": '\U00002975',
- "rarrb;": '\U000021E5',
- "rarrbfs;": '\U00002920',
- "rarrc;": '\U00002933',
- "rarrfs;": '\U0000291E',
- "rarrhk;": '\U000021AA',
- "rarrlp;": '\U000021AC',
- "rarrpl;": '\U00002945',
- "rarrsim;": '\U00002974',
- "rarrtl;": '\U000021A3',
- "rarrw;": '\U0000219D',
- "ratail;": '\U0000291A',
- "ratio;": '\U00002236',
- "rationals;": '\U0000211A',
- "rbarr;": '\U0000290D',
- "rbbrk;": '\U00002773',
- "rbrace;": '\U0000007D',
- "rbrack;": '\U0000005D',
- "rbrke;": '\U0000298C',
- "rbrksld;": '\U0000298E',
- "rbrkslu;": '\U00002990',
- "rcaron;": '\U00000159',
- "rcedil;": '\U00000157',
- "rceil;": '\U00002309',
- "rcub;": '\U0000007D',
- "rcy;": '\U00000440',
- "rdca;": '\U00002937',
- "rdldhar;": '\U00002969',
- "rdquo;": '\U0000201D',
- "rdquor;": '\U0000201D',
- "rdsh;": '\U000021B3',
- "real;": '\U0000211C',
- "realine;": '\U0000211B',
- "realpart;": '\U0000211C',
- "reals;": '\U0000211D',
- "rect;": '\U000025AD',
- "reg;": '\U000000AE',
- "rfisht;": '\U0000297D',
- "rfloor;": '\U0000230B',
- "rfr;": '\U0001D52F',
- "rhard;": '\U000021C1',
- "rharu;": '\U000021C0',
- "rharul;": '\U0000296C',
- "rho;": '\U000003C1',
- "rhov;": '\U000003F1',
- "rightarrow;": '\U00002192',
- "rightarrowtail;": '\U000021A3',
- "rightharpoondown;": '\U000021C1',
- "rightharpoonup;": '\U000021C0',
- "rightleftarrows;": '\U000021C4',
- "rightleftharpoons;": '\U000021CC',
- "rightrightarrows;": '\U000021C9',
- "rightsquigarrow;": '\U0000219D',
- "rightthreetimes;": '\U000022CC',
- "ring;": '\U000002DA',
- "risingdotseq;": '\U00002253',
- "rlarr;": '\U000021C4',
- "rlhar;": '\U000021CC',
- "rlm;": '\U0000200F',
- "rmoust;": '\U000023B1',
- "rmoustache;": '\U000023B1',
- "rnmid;": '\U00002AEE',
- "roang;": '\U000027ED',
- "roarr;": '\U000021FE',
- "robrk;": '\U000027E7',
- "ropar;": '\U00002986',
- "ropf;": '\U0001D563',
- "roplus;": '\U00002A2E',
- "rotimes;": '\U00002A35',
- "rpar;": '\U00000029',
- "rpargt;": '\U00002994',
- "rppolint;": '\U00002A12',
- "rrarr;": '\U000021C9',
- "rsaquo;": '\U0000203A',
- "rscr;": '\U0001D4C7',
- "rsh;": '\U000021B1',
- "rsqb;": '\U0000005D',
- "rsquo;": '\U00002019',
- "rsquor;": '\U00002019',
- "rthree;": '\U000022CC',
- "rtimes;": '\U000022CA',
- "rtri;": '\U000025B9',
- "rtrie;": '\U000022B5',
- "rtrif;": '\U000025B8',
- "rtriltri;": '\U000029CE',
- "ruluhar;": '\U00002968',
- "rx;": '\U0000211E',
- "sacute;": '\U0000015B',
- "sbquo;": '\U0000201A',
- "sc;": '\U0000227B',
- "scE;": '\U00002AB4',
- "scap;": '\U00002AB8',
- "scaron;": '\U00000161',
- "sccue;": '\U0000227D',
- "sce;": '\U00002AB0',
- "scedil;": '\U0000015F',
- "scirc;": '\U0000015D',
- "scnE;": '\U00002AB6',
- "scnap;": '\U00002ABA',
- "scnsim;": '\U000022E9',
- "scpolint;": '\U00002A13',
- "scsim;": '\U0000227F',
- "scy;": '\U00000441',
- "sdot;": '\U000022C5',
- "sdotb;": '\U000022A1',
- "sdote;": '\U00002A66',
- "seArr;": '\U000021D8',
- "searhk;": '\U00002925',
- "searr;": '\U00002198',
- "searrow;": '\U00002198',
- "sect;": '\U000000A7',
- "semi;": '\U0000003B',
- "seswar;": '\U00002929',
- "setminus;": '\U00002216',
- "setmn;": '\U00002216',
- "sext;": '\U00002736',
- "sfr;": '\U0001D530',
- "sfrown;": '\U00002322',
- "sharp;": '\U0000266F',
- "shchcy;": '\U00000449',
- "shcy;": '\U00000448',
- "shortmid;": '\U00002223',
- "shortparallel;": '\U00002225',
- "shy;": '\U000000AD',
- "sigma;": '\U000003C3',
- "sigmaf;": '\U000003C2',
- "sigmav;": '\U000003C2',
- "sim;": '\U0000223C',
- "simdot;": '\U00002A6A',
- "sime;": '\U00002243',
- "simeq;": '\U00002243',
- "simg;": '\U00002A9E',
- "simgE;": '\U00002AA0',
- "siml;": '\U00002A9D',
- "simlE;": '\U00002A9F',
- "simne;": '\U00002246',
- "simplus;": '\U00002A24',
- "simrarr;": '\U00002972',
- "slarr;": '\U00002190',
- "smallsetminus;": '\U00002216',
- "smashp;": '\U00002A33',
- "smeparsl;": '\U000029E4',
- "smid;": '\U00002223',
- "smile;": '\U00002323',
- "smt;": '\U00002AAA',
- "smte;": '\U00002AAC',
- "softcy;": '\U0000044C',
- "sol;": '\U0000002F',
- "solb;": '\U000029C4',
- "solbar;": '\U0000233F',
- "sopf;": '\U0001D564',
- "spades;": '\U00002660',
- "spadesuit;": '\U00002660',
- "spar;": '\U00002225',
- "sqcap;": '\U00002293',
- "sqcup;": '\U00002294',
- "sqsub;": '\U0000228F',
- "sqsube;": '\U00002291',
- "sqsubset;": '\U0000228F',
- "sqsubseteq;": '\U00002291',
- "sqsup;": '\U00002290',
- "sqsupe;": '\U00002292',
- "sqsupset;": '\U00002290',
- "sqsupseteq;": '\U00002292',
- "squ;": '\U000025A1',
- "square;": '\U000025A1',
- "squarf;": '\U000025AA',
- "squf;": '\U000025AA',
- "srarr;": '\U00002192',
- "sscr;": '\U0001D4C8',
- "ssetmn;": '\U00002216',
- "ssmile;": '\U00002323',
- "sstarf;": '\U000022C6',
- "star;": '\U00002606',
- "starf;": '\U00002605',
- "straightepsilon;": '\U000003F5',
- "straightphi;": '\U000003D5',
- "strns;": '\U000000AF',
- "sub;": '\U00002282',
- "subE;": '\U00002AC5',
- "subdot;": '\U00002ABD',
- "sube;": '\U00002286',
- "subedot;": '\U00002AC3',
- "submult;": '\U00002AC1',
- "subnE;": '\U00002ACB',
- "subne;": '\U0000228A',
- "subplus;": '\U00002ABF',
- "subrarr;": '\U00002979',
- "subset;": '\U00002282',
- "subseteq;": '\U00002286',
- "subseteqq;": '\U00002AC5',
- "subsetneq;": '\U0000228A',
- "subsetneqq;": '\U00002ACB',
- "subsim;": '\U00002AC7',
- "subsub;": '\U00002AD5',
- "subsup;": '\U00002AD3',
- "succ;": '\U0000227B',
- "succapprox;": '\U00002AB8',
- "succcurlyeq;": '\U0000227D',
- "succeq;": '\U00002AB0',
- "succnapprox;": '\U00002ABA',
- "succneqq;": '\U00002AB6',
- "succnsim;": '\U000022E9',
- "succsim;": '\U0000227F',
- "sum;": '\U00002211',
- "sung;": '\U0000266A',
- "sup;": '\U00002283',
- "sup1;": '\U000000B9',
- "sup2;": '\U000000B2',
- "sup3;": '\U000000B3',
- "supE;": '\U00002AC6',
- "supdot;": '\U00002ABE',
- "supdsub;": '\U00002AD8',
- "supe;": '\U00002287',
- "supedot;": '\U00002AC4',
- "suphsol;": '\U000027C9',
- "suphsub;": '\U00002AD7',
- "suplarr;": '\U0000297B',
- "supmult;": '\U00002AC2',
- "supnE;": '\U00002ACC',
- "supne;": '\U0000228B',
- "supplus;": '\U00002AC0',
- "supset;": '\U00002283',
- "supseteq;": '\U00002287',
- "supseteqq;": '\U00002AC6',
- "supsetneq;": '\U0000228B',
- "supsetneqq;": '\U00002ACC',
- "supsim;": '\U00002AC8',
- "supsub;": '\U00002AD4',
- "supsup;": '\U00002AD6',
- "swArr;": '\U000021D9',
- "swarhk;": '\U00002926',
- "swarr;": '\U00002199',
- "swarrow;": '\U00002199',
- "swnwar;": '\U0000292A',
- "szlig;": '\U000000DF',
- "target;": '\U00002316',
- "tau;": '\U000003C4',
- "tbrk;": '\U000023B4',
- "tcaron;": '\U00000165',
- "tcedil;": '\U00000163',
- "tcy;": '\U00000442',
- "tdot;": '\U000020DB',
- "telrec;": '\U00002315',
- "tfr;": '\U0001D531',
- "there4;": '\U00002234',
- "therefore;": '\U00002234',
- "theta;": '\U000003B8',
- "thetasym;": '\U000003D1',
- "thetav;": '\U000003D1',
- "thickapprox;": '\U00002248',
- "thicksim;": '\U0000223C',
- "thinsp;": '\U00002009',
- "thkap;": '\U00002248',
- "thksim;": '\U0000223C',
- "thorn;": '\U000000FE',
- "tilde;": '\U000002DC',
- "times;": '\U000000D7',
- "timesb;": '\U000022A0',
- "timesbar;": '\U00002A31',
- "timesd;": '\U00002A30',
- "tint;": '\U0000222D',
- "toea;": '\U00002928',
- "top;": '\U000022A4',
- "topbot;": '\U00002336',
- "topcir;": '\U00002AF1',
- "topf;": '\U0001D565',
- "topfork;": '\U00002ADA',
- "tosa;": '\U00002929',
- "tprime;": '\U00002034',
- "trade;": '\U00002122',
- "triangle;": '\U000025B5',
- "triangledown;": '\U000025BF',
- "triangleleft;": '\U000025C3',
- "trianglelefteq;": '\U000022B4',
- "triangleq;": '\U0000225C',
- "triangleright;": '\U000025B9',
- "trianglerighteq;": '\U000022B5',
- "tridot;": '\U000025EC',
- "trie;": '\U0000225C',
- "triminus;": '\U00002A3A',
- "triplus;": '\U00002A39',
- "trisb;": '\U000029CD',
- "tritime;": '\U00002A3B',
- "trpezium;": '\U000023E2',
- "tscr;": '\U0001D4C9',
- "tscy;": '\U00000446',
- "tshcy;": '\U0000045B',
- "tstrok;": '\U00000167',
- "twixt;": '\U0000226C',
- "twoheadleftarrow;": '\U0000219E',
- "twoheadrightarrow;": '\U000021A0',
- "uArr;": '\U000021D1',
- "uHar;": '\U00002963',
- "uacute;": '\U000000FA',
- "uarr;": '\U00002191',
- "ubrcy;": '\U0000045E',
- "ubreve;": '\U0000016D',
- "ucirc;": '\U000000FB',
- "ucy;": '\U00000443',
- "udarr;": '\U000021C5',
- "udblac;": '\U00000171',
- "udhar;": '\U0000296E',
- "ufisht;": '\U0000297E',
- "ufr;": '\U0001D532',
- "ugrave;": '\U000000F9',
- "uharl;": '\U000021BF',
- "uharr;": '\U000021BE',
- "uhblk;": '\U00002580',
- "ulcorn;": '\U0000231C',
- "ulcorner;": '\U0000231C',
- "ulcrop;": '\U0000230F',
- "ultri;": '\U000025F8',
- "umacr;": '\U0000016B',
- "uml;": '\U000000A8',
- "uogon;": '\U00000173',
- "uopf;": '\U0001D566',
- "uparrow;": '\U00002191',
- "updownarrow;": '\U00002195',
- "upharpoonleft;": '\U000021BF',
- "upharpoonright;": '\U000021BE',
- "uplus;": '\U0000228E',
- "upsi;": '\U000003C5',
- "upsih;": '\U000003D2',
- "upsilon;": '\U000003C5',
- "upuparrows;": '\U000021C8',
- "urcorn;": '\U0000231D',
- "urcorner;": '\U0000231D',
- "urcrop;": '\U0000230E',
- "uring;": '\U0000016F',
- "urtri;": '\U000025F9',
- "uscr;": '\U0001D4CA',
- "utdot;": '\U000022F0',
- "utilde;": '\U00000169',
- "utri;": '\U000025B5',
- "utrif;": '\U000025B4',
- "uuarr;": '\U000021C8',
- "uuml;": '\U000000FC',
- "uwangle;": '\U000029A7',
- "vArr;": '\U000021D5',
- "vBar;": '\U00002AE8',
- "vBarv;": '\U00002AE9',
- "vDash;": '\U000022A8',
- "vangrt;": '\U0000299C',
- "varepsilon;": '\U000003F5',
- "varkappa;": '\U000003F0',
- "varnothing;": '\U00002205',
- "varphi;": '\U000003D5',
- "varpi;": '\U000003D6',
- "varpropto;": '\U0000221D',
- "varr;": '\U00002195',
- "varrho;": '\U000003F1',
- "varsigma;": '\U000003C2',
- "vartheta;": '\U000003D1',
- "vartriangleleft;": '\U000022B2',
- "vartriangleright;": '\U000022B3',
- "vcy;": '\U00000432',
- "vdash;": '\U000022A2',
- "vee;": '\U00002228',
- "veebar;": '\U000022BB',
- "veeeq;": '\U0000225A',
- "vellip;": '\U000022EE',
- "verbar;": '\U0000007C',
- "vert;": '\U0000007C',
- "vfr;": '\U0001D533',
- "vltri;": '\U000022B2',
- "vopf;": '\U0001D567',
- "vprop;": '\U0000221D',
- "vrtri;": '\U000022B3',
- "vscr;": '\U0001D4CB',
- "vzigzag;": '\U0000299A',
- "wcirc;": '\U00000175',
- "wedbar;": '\U00002A5F',
- "wedge;": '\U00002227',
- "wedgeq;": '\U00002259',
- "weierp;": '\U00002118',
- "wfr;": '\U0001D534',
- "wopf;": '\U0001D568',
- "wp;": '\U00002118',
- "wr;": '\U00002240',
- "wreath;": '\U00002240',
- "wscr;": '\U0001D4CC',
- "xcap;": '\U000022C2',
- "xcirc;": '\U000025EF',
- "xcup;": '\U000022C3',
- "xdtri;": '\U000025BD',
- "xfr;": '\U0001D535',
- "xhArr;": '\U000027FA',
- "xharr;": '\U000027F7',
- "xi;": '\U000003BE',
- "xlArr;": '\U000027F8',
- "xlarr;": '\U000027F5',
- "xmap;": '\U000027FC',
- "xnis;": '\U000022FB',
- "xodot;": '\U00002A00',
- "xopf;": '\U0001D569',
- "xoplus;": '\U00002A01',
- "xotime;": '\U00002A02',
- "xrArr;": '\U000027F9',
- "xrarr;": '\U000027F6',
- "xscr;": '\U0001D4CD',
- "xsqcup;": '\U00002A06',
- "xuplus;": '\U00002A04',
- "xutri;": '\U000025B3',
- "xvee;": '\U000022C1',
- "xwedge;": '\U000022C0',
- "yacute;": '\U000000FD',
- "yacy;": '\U0000044F',
- "ycirc;": '\U00000177',
- "ycy;": '\U0000044B',
- "yen;": '\U000000A5',
- "yfr;": '\U0001D536',
- "yicy;": '\U00000457',
- "yopf;": '\U0001D56A',
- "yscr;": '\U0001D4CE',
- "yucy;": '\U0000044E',
- "yuml;": '\U000000FF',
- "zacute;": '\U0000017A',
- "zcaron;": '\U0000017E',
- "zcy;": '\U00000437',
- "zdot;": '\U0000017C',
- "zeetrf;": '\U00002128',
- "zeta;": '\U000003B6',
- "zfr;": '\U0001D537',
- "zhcy;": '\U00000436',
- "zigrarr;": '\U000021DD',
- "zopf;": '\U0001D56B',
- "zscr;": '\U0001D4CF',
- "zwj;": '\U0000200D',
- "zwnj;": '\U0000200C',
- "AElig": '\U000000C6',
- "AMP": '\U00000026',
- "Aacute": '\U000000C1',
- "Acirc": '\U000000C2',
- "Agrave": '\U000000C0',
- "Aring": '\U000000C5',
- "Atilde": '\U000000C3',
- "Auml": '\U000000C4',
- "COPY": '\U000000A9',
- "Ccedil": '\U000000C7',
- "ETH": '\U000000D0',
- "Eacute": '\U000000C9',
- "Ecirc": '\U000000CA',
- "Egrave": '\U000000C8',
- "Euml": '\U000000CB',
- "GT": '\U0000003E',
- "Iacute": '\U000000CD',
- "Icirc": '\U000000CE',
- "Igrave": '\U000000CC',
- "Iuml": '\U000000CF',
- "LT": '\U0000003C',
- "Ntilde": '\U000000D1',
- "Oacute": '\U000000D3',
- "Ocirc": '\U000000D4',
- "Ograve": '\U000000D2',
- "Oslash": '\U000000D8',
- "Otilde": '\U000000D5',
- "Ouml": '\U000000D6',
- "QUOT": '\U00000022',
- "REG": '\U000000AE',
- "THORN": '\U000000DE',
- "Uacute": '\U000000DA',
- "Ucirc": '\U000000DB',
- "Ugrave": '\U000000D9',
- "Uuml": '\U000000DC',
- "Yacute": '\U000000DD',
- "aacute": '\U000000E1',
- "acirc": '\U000000E2',
- "acute": '\U000000B4',
- "aelig": '\U000000E6',
- "agrave": '\U000000E0',
- "amp": '\U00000026',
- "aring": '\U000000E5',
- "atilde": '\U000000E3',
- "auml": '\U000000E4',
- "brvbar": '\U000000A6',
- "ccedil": '\U000000E7',
- "cedil": '\U000000B8',
- "cent": '\U000000A2',
- "copy": '\U000000A9',
- "curren": '\U000000A4',
- "deg": '\U000000B0',
- "divide": '\U000000F7',
- "eacute": '\U000000E9',
- "ecirc": '\U000000EA',
- "egrave": '\U000000E8',
- "eth": '\U000000F0',
- "euml": '\U000000EB',
- "frac12": '\U000000BD',
- "frac14": '\U000000BC',
- "frac34": '\U000000BE',
- "gt": '\U0000003E',
- "iacute": '\U000000ED',
- "icirc": '\U000000EE',
- "iexcl": '\U000000A1',
- "igrave": '\U000000EC',
- "iquest": '\U000000BF',
- "iuml": '\U000000EF',
- "laquo": '\U000000AB',
- "lt": '\U0000003C',
- "macr": '\U000000AF',
- "micro": '\U000000B5',
- "middot": '\U000000B7',
- "nbsp": '\U000000A0',
- "not": '\U000000AC',
- "ntilde": '\U000000F1',
- "oacute": '\U000000F3',
- "ocirc": '\U000000F4',
- "ograve": '\U000000F2',
- "ordf": '\U000000AA',
- "ordm": '\U000000BA',
- "oslash": '\U000000F8',
- "otilde": '\U000000F5',
- "ouml": '\U000000F6',
- "para": '\U000000B6',
- "plusmn": '\U000000B1',
- "pound": '\U000000A3',
- "quot": '\U00000022',
- "raquo": '\U000000BB',
- "reg": '\U000000AE',
- "sect": '\U000000A7',
- "shy": '\U000000AD',
- "sup1": '\U000000B9',
- "sup2": '\U000000B2',
- "sup3": '\U000000B3',
- "szlig": '\U000000DF',
- "thorn": '\U000000FE',
- "times": '\U000000D7',
- "uacute": '\U000000FA',
- "ucirc": '\U000000FB',
- "ugrave": '\U000000F9',
- "uml": '\U000000A8',
- "uuml": '\U000000FC',
- "yacute": '\U000000FD',
- "yen": '\U000000A5',
- "yuml": '\U000000FF',
-}
-
-// HTML entities that are two unicode codepoints.
-var entity2 = map[string][2]rune{
- // TODO(nigeltao): Handle replacements that are wider than their names.
- // "nLt;": {'\u226A', '\u20D2'},
- // "nGt;": {'\u226B', '\u20D2'},
- "NotEqualTilde;": {'\u2242', '\u0338'},
- "NotGreaterFullEqual;": {'\u2267', '\u0338'},
- "NotGreaterGreater;": {'\u226B', '\u0338'},
- "NotGreaterSlantEqual;": {'\u2A7E', '\u0338'},
- "NotHumpDownHump;": {'\u224E', '\u0338'},
- "NotHumpEqual;": {'\u224F', '\u0338'},
- "NotLeftTriangleBar;": {'\u29CF', '\u0338'},
- "NotLessLess;": {'\u226A', '\u0338'},
- "NotLessSlantEqual;": {'\u2A7D', '\u0338'},
- "NotNestedGreaterGreater;": {'\u2AA2', '\u0338'},
- "NotNestedLessLess;": {'\u2AA1', '\u0338'},
- "NotPrecedesEqual;": {'\u2AAF', '\u0338'},
- "NotRightTriangleBar;": {'\u29D0', '\u0338'},
- "NotSquareSubset;": {'\u228F', '\u0338'},
- "NotSquareSuperset;": {'\u2290', '\u0338'},
- "NotSubset;": {'\u2282', '\u20D2'},
- "NotSucceedsEqual;": {'\u2AB0', '\u0338'},
- "NotSucceedsTilde;": {'\u227F', '\u0338'},
- "NotSuperset;": {'\u2283', '\u20D2'},
- "ThickSpace;": {'\u205F', '\u200A'},
- "acE;": {'\u223E', '\u0333'},
- "bne;": {'\u003D', '\u20E5'},
- "bnequiv;": {'\u2261', '\u20E5'},
- "caps;": {'\u2229', '\uFE00'},
- "cups;": {'\u222A', '\uFE00'},
- "fjlig;": {'\u0066', '\u006A'},
- "gesl;": {'\u22DB', '\uFE00'},
- "gvertneqq;": {'\u2269', '\uFE00'},
- "gvnE;": {'\u2269', '\uFE00'},
- "lates;": {'\u2AAD', '\uFE00'},
- "lesg;": {'\u22DA', '\uFE00'},
- "lvertneqq;": {'\u2268', '\uFE00'},
- "lvnE;": {'\u2268', '\uFE00'},
- "nGg;": {'\u22D9', '\u0338'},
- "nGtv;": {'\u226B', '\u0338'},
- "nLl;": {'\u22D8', '\u0338'},
- "nLtv;": {'\u226A', '\u0338'},
- "nang;": {'\u2220', '\u20D2'},
- "napE;": {'\u2A70', '\u0338'},
- "napid;": {'\u224B', '\u0338'},
- "nbump;": {'\u224E', '\u0338'},
- "nbumpe;": {'\u224F', '\u0338'},
- "ncongdot;": {'\u2A6D', '\u0338'},
- "nedot;": {'\u2250', '\u0338'},
- "nesim;": {'\u2242', '\u0338'},
- "ngE;": {'\u2267', '\u0338'},
- "ngeqq;": {'\u2267', '\u0338'},
- "ngeqslant;": {'\u2A7E', '\u0338'},
- "nges;": {'\u2A7E', '\u0338'},
- "nlE;": {'\u2266', '\u0338'},
- "nleqq;": {'\u2266', '\u0338'},
- "nleqslant;": {'\u2A7D', '\u0338'},
- "nles;": {'\u2A7D', '\u0338'},
- "notinE;": {'\u22F9', '\u0338'},
- "notindot;": {'\u22F5', '\u0338'},
- "nparsl;": {'\u2AFD', '\u20E5'},
- "npart;": {'\u2202', '\u0338'},
- "npre;": {'\u2AAF', '\u0338'},
- "npreceq;": {'\u2AAF', '\u0338'},
- "nrarrc;": {'\u2933', '\u0338'},
- "nrarrw;": {'\u219D', '\u0338'},
- "nsce;": {'\u2AB0', '\u0338'},
- "nsubE;": {'\u2AC5', '\u0338'},
- "nsubset;": {'\u2282', '\u20D2'},
- "nsubseteqq;": {'\u2AC5', '\u0338'},
- "nsucceq;": {'\u2AB0', '\u0338'},
- "nsupE;": {'\u2AC6', '\u0338'},
- "nsupset;": {'\u2283', '\u20D2'},
- "nsupseteqq;": {'\u2AC6', '\u0338'},
- "nvap;": {'\u224D', '\u20D2'},
- "nvge;": {'\u2265', '\u20D2'},
- "nvgt;": {'\u003E', '\u20D2'},
- "nvle;": {'\u2264', '\u20D2'},
- "nvlt;": {'\u003C', '\u20D2'},
- "nvltrie;": {'\u22B4', '\u20D2'},
- "nvrtrie;": {'\u22B5', '\u20D2'},
- "nvsim;": {'\u223C', '\u20D2'},
- "race;": {'\u223D', '\u0331'},
- "smtes;": {'\u2AAC', '\uFE00'},
- "sqcaps;": {'\u2293', '\uFE00'},
- "sqcups;": {'\u2294', '\uFE00'},
- "varsubsetneq;": {'\u228A', '\uFE00'},
- "varsubsetneqq;": {'\u2ACB', '\uFE00'},
- "varsupsetneq;": {'\u228B', '\uFE00'},
- "varsupsetneqq;": {'\u2ACC', '\uFE00'},
- "vnsub;": {'\u2282', '\u20D2'},
- "vnsup;": {'\u2283', '\u20D2'},
- "vsubnE;": {'\u2ACB', '\uFE00'},
- "vsubne;": {'\u228A', '\uFE00'},
- "vsupnE;": {'\u2ACC', '\uFE00'},
- "vsupne;": {'\u228B', '\uFE00'},
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity_test.go
deleted file mode 100644
index b53f866fa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/entity_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "testing"
- "unicode/utf8"
-)
-
-func TestEntityLength(t *testing.T) {
- // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key).
- // The +1 comes from the leading "&". This property implies that the length of
- // unescaped text is <= the length of escaped text.
- for k, v := range entity {
- if 1+len(k) < utf8.RuneLen(v) {
- t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v))
- }
- if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' {
- t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon)
- }
- }
- for k, v := range entity2 {
- if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) {
- t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1]))
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape.go
deleted file mode 100644
index d85613962..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape.go
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "bytes"
- "strings"
- "unicode/utf8"
-)
-
-// These replacements permit compatibility with old numeric entities that
-// assumed Windows-1252 encoding.
-// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference
-var replacementTable = [...]rune{
- '\u20AC', // First entry is what 0x80 should be replaced with.
- '\u0081',
- '\u201A',
- '\u0192',
- '\u201E',
- '\u2026',
- '\u2020',
- '\u2021',
- '\u02C6',
- '\u2030',
- '\u0160',
- '\u2039',
- '\u0152',
- '\u008D',
- '\u017D',
- '\u008F',
- '\u0090',
- '\u2018',
- '\u2019',
- '\u201C',
- '\u201D',
- '\u2022',
- '\u2013',
- '\u2014',
- '\u02DC',
- '\u2122',
- '\u0161',
- '\u203A',
- '\u0153',
- '\u009D',
- '\u017E',
- '\u0178', // Last entry is 0x9F.
- // 0x00->'\uFFFD' is handled programmatically.
- // 0x0D->'\u000D' is a no-op.
-}
-
-// unescapeEntity reads an entity like "&lt;" from b[src:] and writes the
-// corresponding "<" to b[dst:], returning the incremented dst and src cursors.
-// Precondition: b[src] == '&' && dst <= src.
-// attribute should be true if parsing an attribute value.
-func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) {
- // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference
-
- // i starts at 1 because we already know that s[0] == '&'.
- i, s := 1, b[src:]
-
- if len(s) <= 1 {
- b[dst] = b[src]
- return dst + 1, src + 1
- }
-
- if s[i] == '#' {
- if len(s) <= 3 { // We need to have at least "&#.".
- b[dst] = b[src]
- return dst + 1, src + 1
- }
- i++
- c := s[i]
- hex := false
- if c == 'x' || c == 'X' {
- hex = true
- i++
- }
-
- x := '\x00'
- for i < len(s) {
- c = s[i]
- i++
- if hex {
- if '0' <= c && c <= '9' {
- x = 16*x + rune(c) - '0'
- continue
- } else if 'a' <= c && c <= 'f' {
- x = 16*x + rune(c) - 'a' + 10
- continue
- } else if 'A' <= c && c <= 'F' {
- x = 16*x + rune(c) - 'A' + 10
- continue
- }
- } else if '0' <= c && c <= '9' {
- x = 10*x + rune(c) - '0'
- continue
- }
- if c != ';' {
- i--
- }
- break
- }
-
- if i <= 3 { // No characters matched.
- b[dst] = b[src]
- return dst + 1, src + 1
- }
-
- if 0x80 <= x && x <= 0x9F {
- // Replace characters from Windows-1252 with UTF-8 equivalents.
- x = replacementTable[x-0x80]
- } else if x == 0 || (0xD800 <= x && x <= 0xDFFF) || x > 0x10FFFF {
- // Replace invalid characters with the replacement character.
- x = '\uFFFD'
- }
-
- return dst + utf8.EncodeRune(b[dst:], x), src + i
- }
-
- // Consume the maximum number of characters possible, with the
- // consumed characters matching one of the named references.
-
- for i < len(s) {
- c := s[i]
- i++
- // Lower-cased characters are more common in entities, so we check for them first.
- if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' {
- continue
- }
- if c != ';' {
- i--
- }
- break
- }
-
- entityName := string(s[1:i])
- if entityName == "" {
- // No-op.
- } else if attribute && entityName[len(entityName)-1] != ';' && len(s) > i && s[i] == '=' {
- // No-op.
- } else if x := entity[entityName]; x != 0 {
- return dst + utf8.EncodeRune(b[dst:], x), src + i
- } else if x := entity2[entityName]; x[0] != 0 {
- dst1 := dst + utf8.EncodeRune(b[dst:], x[0])
- return dst1 + utf8.EncodeRune(b[dst1:], x[1]), src + i
- } else if !attribute {
- maxLen := len(entityName) - 1
- if maxLen > longestEntityWithoutSemicolon {
- maxLen = longestEntityWithoutSemicolon
- }
- for j := maxLen; j > 1; j-- {
- if x := entity[entityName[:j]]; x != 0 {
- return dst + utf8.EncodeRune(b[dst:], x), src + j + 1
- }
- }
- }
-
- dst1, src1 = dst+i, src+i
- copy(b[dst:dst1], b[src:src1])
- return dst1, src1
-}
-
-// unescape unescapes b's entities in-place, so that "a&lt;b" becomes "a<b".
-// attribute should be true if parsing an attribute value.
-func unescape(b []byte, attribute bool) []byte {
- for i, c := range b {
- if c == '&' {
- dst, src := unescapeEntity(b, i, i, attribute)
- for src < len(b) {
- c := b[src]
- if c == '&' {
- dst, src = unescapeEntity(b, dst, src, attribute)
- } else {
- b[dst] = c
- dst, src = dst+1, src+1
- }
- }
- return b[0:dst]
- }
- }
- return b
-}
-
-// lower lower-cases the A-Z bytes in b in-place, so that "aBc" becomes "abc".
-func lower(b []byte) []byte {
- for i, c := range b {
- if 'A' <= c && c <= 'Z' {
- b[i] = c + 'a' - 'A'
- }
- }
- return b
-}
-
-const escapedChars = "&'<>\"\r"
-
-func escape(w writer, s string) error {
- i := strings.IndexAny(s, escapedChars)
- for i != -1 {
- if _, err := w.WriteString(s[:i]); err != nil {
- return err
- }
- var esc string
- switch s[i] {
- case '&':
- esc = "&amp;"
- case '\'':
- // "&#39;" is shorter than "&apos;" and apos was not in HTML until HTML5.
- esc = "&#39;"
- case '<':
- esc = "&lt;"
- case '>':
- esc = "&gt;"
- case '"':
- // "&#34;" is shorter than "&quot;".
- esc = "&#34;"
- case '\r':
- esc = "&#13;"
- default:
- panic("unrecognized escape character")
- }
- s = s[i+1:]
- if _, err := w.WriteString(esc); err != nil {
- return err
- }
- i = strings.IndexAny(s, escapedChars)
- }
- _, err := w.WriteString(s)
- return err
-}
-
-// EscapeString escapes special characters like "<" to become "&lt;". It
-// escapes only five such characters: <, >, &, ' and ".
-// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't
-// always true.
-func EscapeString(s string) string {
- if strings.IndexAny(s, escapedChars) == -1 {
- return s
- }
- var buf bytes.Buffer
- escape(&buf, s)
- return buf.String()
-}
-
-// UnescapeString unescapes entities like "&lt;" to become "<". It unescapes a
-// larger range of entities than EscapeString escapes. For example, "&aacute;"
-// unescapes to "á", as does "&#225;" and "&xE1;".
-// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't
-// always true.
-func UnescapeString(s string) string {
- for _, c := range s {
- if c == '&' {
- return string(unescape([]byte(s), false))
- }
- }
- return s
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape_test.go
deleted file mode 100644
index b405d4b4a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/escape_test.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2013 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 file.
-
-package html
-
-import "testing"
-
-type unescapeTest struct {
- // A short description of the test case.
- desc string
- // The HTML text.
- html string
- // The unescaped text.
- unescaped string
-}
-
-var unescapeTests = []unescapeTest{
- // Handle no entities.
- {
- "copy",
- "A\ttext\nstring",
- "A\ttext\nstring",
- },
- // Handle simple named entities.
- {
- "simple",
- "&amp; &gt; &lt;",
- "& > <",
- },
- // Handle hitting the end of the string.
- {
- "stringEnd",
- "&amp &amp",
- "& &",
- },
- // Handle entities with two codepoints.
- {
- "multiCodepoint",
- "text &gesl; blah",
- "text \u22db\ufe00 blah",
- },
- // Handle decimal numeric entities.
- {
- "decimalEntity",
- "Delta = &#916; ",
- "Delta = Δ ",
- },
- // Handle hexadecimal numeric entities.
- {
- "hexadecimalEntity",
- "Lambda = &#x3bb; = &#X3Bb ",
- "Lambda = λ = λ ",
- },
- // Handle numeric early termination.
- {
- "numericEnds",
- "&# &#x &#128;43 &copy = &#169f = &#xa9",
- "&# &#x €43 © = ©f = ©",
- },
- // Handle numeric ISO-8859-1 entity replacements.
- {
- "numericReplacements",
- "Footnote&#x87;",
- "Footnote‡",
- },
-}
-
-func TestUnescape(t *testing.T) {
- for _, tt := range unescapeTests {
- unescaped := UnescapeString(tt.html)
- if unescaped != tt.unescaped {
- t.Errorf("TestUnescape %s: want %q, got %q", tt.desc, tt.unescaped, unescaped)
- }
- }
-}
-
-func TestUnescapeEscape(t *testing.T) {
- ss := []string{
- ``,
- `abc def`,
- `a & b`,
- `a&amp;b`,
- `a &amp b`,
- `&quot;`,
- `"`,
- `"<&>"`,
- `&quot;&lt;&amp;&gt;&quot;`,
- `3&5==1 && 0<1, "0&lt;1", a+acute=&aacute;`,
- `The special characters are: <, >, &, ' and "`,
- }
- for _, s := range ss {
- if got := UnescapeString(EscapeString(s)); got != s {
- t.Errorf("got %q want %q", got, s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/example_test.go
deleted file mode 100644
index 0b06ed773..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/example_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2012 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 file.
-
-// This example demonstrates parsing HTML data and walking the resulting tree.
-package html_test
-
-import (
- "fmt"
- "log"
- "strings"
-
- "golang.org/x/net/html"
-)
-
-func ExampleParse() {
- s := `<p>Links:</p><ul><li><a href="foo">Foo</a><li><a href="/bar/baz">BarBaz</a></ul>`
- doc, err := html.Parse(strings.NewReader(s))
- if err != nil {
- log.Fatal(err)
- }
- var f func(*html.Node)
- f = func(n *html.Node) {
- if n.Type == html.ElementNode && n.Data == "a" {
- for _, a := range n.Attr {
- if a.Key == "href" {
- fmt.Println(a.Val)
- break
- }
- }
- }
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- f(c)
- }
- }
- f(doc)
- // Output:
- // foo
- // /bar/baz
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/foreign.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/foreign.go
deleted file mode 100644
index d3b384409..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/foreign.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2011 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 file.
-
-package html
-
-import (
- "strings"
-)
-
-func adjustAttributeNames(aa []Attribute, nameMap map[string]string) {
- for i := range aa {
- if newName, ok := nameMap[aa[i].Key]; ok {
- aa[i].Key = newName
- }
- }
-}
-
-func adjustForeignAttributes(aa []Attribute) {
- for i, a := range aa {
- if a.Key == "" || a.Key[0] != 'x' {
- continue
- }
- switch a.Key {
- case "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show",
- "xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "xmlns:xlink":
- j := strings.Index(a.Key, ":")
- aa[i].Namespace = a.Key[:j]
- aa[i].Key = a.Key[j+1:]
- }
- }
-}
-
-func htmlIntegrationPoint(n *Node) bool {
- if n.Type != ElementNode {
- return false
- }
- switch n.Namespace {
- case "math":
- if n.Data == "annotation-xml" {
- for _, a := range n.Attr {
- if a.Key == "encoding" {
- val := strings.ToLower(a.Val)
- if val == "text/html" || val == "application/xhtml+xml" {
- return true
- }
- }
- }
- }
- case "svg":
- switch n.Data {
- case "desc", "foreignObject", "title":
- return true
- }
- }
- return false
-}
-
-func mathMLTextIntegrationPoint(n *Node) bool {
- if n.Namespace != "math" {
- return false
- }
- switch n.Data {
- case "mi", "mo", "mn", "ms", "mtext":
- return true
- }
- return false
-}
-
-// Section 12.2.5.5.
-var breakout = map[string]bool{
- "b": true,
- "big": true,
- "blockquote": true,
- "body": true,
- "br": true,
- "center": true,
- "code": true,
- "dd": true,
- "div": true,
- "dl": true,
- "dt": true,
- "em": true,
- "embed": true,
- "h1": true,
- "h2": true,
- "h3": true,
- "h4": true,
- "h5": true,
- "h6": true,
- "head": true,
- "hr": true,
- "i": true,
- "img": true,
- "li": true,
- "listing": true,
- "menu": true,
- "meta": true,
- "nobr": true,
- "ol": true,
- "p": true,
- "pre": true,
- "ruby": true,
- "s": true,
- "small": true,
- "span": true,
- "strong": true,
- "strike": true,
- "sub": true,
- "sup": true,
- "table": true,
- "tt": true,
- "u": true,
- "ul": true,
- "var": true,
-}
-
-// Section 12.2.5.5.
-var svgTagNameAdjustments = map[string]string{
- "altglyph": "altGlyph",
- "altglyphdef": "altGlyphDef",
- "altglyphitem": "altGlyphItem",
- "animatecolor": "animateColor",
- "animatemotion": "animateMotion",
- "animatetransform": "animateTransform",
- "clippath": "clipPath",
- "feblend": "feBlend",
- "fecolormatrix": "feColorMatrix",
- "fecomponenttransfer": "feComponentTransfer",
- "fecomposite": "feComposite",
- "feconvolvematrix": "feConvolveMatrix",
- "fediffuselighting": "feDiffuseLighting",
- "fedisplacementmap": "feDisplacementMap",
- "fedistantlight": "feDistantLight",
- "feflood": "feFlood",
- "fefunca": "feFuncA",
- "fefuncb": "feFuncB",
- "fefuncg": "feFuncG",
- "fefuncr": "feFuncR",
- "fegaussianblur": "feGaussianBlur",
- "feimage": "feImage",
- "femerge": "feMerge",
- "femergenode": "feMergeNode",
- "femorphology": "feMorphology",
- "feoffset": "feOffset",
- "fepointlight": "fePointLight",
- "fespecularlighting": "feSpecularLighting",
- "fespotlight": "feSpotLight",
- "fetile": "feTile",
- "feturbulence": "feTurbulence",
- "foreignobject": "foreignObject",
- "glyphref": "glyphRef",
- "lineargradient": "linearGradient",
- "radialgradient": "radialGradient",
- "textpath": "textPath",
-}
-
-// Section 12.2.5.1
-var mathMLAttributeAdjustments = map[string]string{
- "definitionurl": "definitionURL",
-}
-
-var svgAttributeAdjustments = map[string]string{
- "attributename": "attributeName",
- "attributetype": "attributeType",
- "basefrequency": "baseFrequency",
- "baseprofile": "baseProfile",
- "calcmode": "calcMode",
- "clippathunits": "clipPathUnits",
- "contentscripttype": "contentScriptType",
- "contentstyletype": "contentStyleType",
- "diffuseconstant": "diffuseConstant",
- "edgemode": "edgeMode",
- "externalresourcesrequired": "externalResourcesRequired",
- "filterres": "filterRes",
- "filterunits": "filterUnits",
- "glyphref": "glyphRef",
- "gradienttransform": "gradientTransform",
- "gradientunits": "gradientUnits",
- "kernelmatrix": "kernelMatrix",
- "kernelunitlength": "kernelUnitLength",
- "keypoints": "keyPoints",
- "keysplines": "keySplines",
- "keytimes": "keyTimes",
- "lengthadjust": "lengthAdjust",
- "limitingconeangle": "limitingConeAngle",
- "markerheight": "markerHeight",
- "markerunits": "markerUnits",
- "markerwidth": "markerWidth",
- "maskcontentunits": "maskContentUnits",
- "maskunits": "maskUnits",
- "numoctaves": "numOctaves",
- "pathlength": "pathLength",
- "patterncontentunits": "patternContentUnits",
- "patterntransform": "patternTransform",
- "patternunits": "patternUnits",
- "pointsatx": "pointsAtX",
- "pointsaty": "pointsAtY",
- "pointsatz": "pointsAtZ",
- "preservealpha": "preserveAlpha",
- "preserveaspectratio": "preserveAspectRatio",
- "primitiveunits": "primitiveUnits",
- "refx": "refX",
- "refy": "refY",
- "repeatcount": "repeatCount",
- "repeatdur": "repeatDur",
- "requiredextensions": "requiredExtensions",
- "requiredfeatures": "requiredFeatures",
- "specularconstant": "specularConstant",
- "specularexponent": "specularExponent",
- "spreadmethod": "spreadMethod",
- "startoffset": "startOffset",
- "stddeviation": "stdDeviation",
- "stitchtiles": "stitchTiles",
- "surfacescale": "surfaceScale",
- "systemlanguage": "systemLanguage",
- "tablevalues": "tableValues",
- "targetx": "targetX",
- "targety": "targetY",
- "textlength": "textLength",
- "viewbox": "viewBox",
- "viewtarget": "viewTarget",
- "xchannelselector": "xChannelSelector",
- "ychannelselector": "yChannelSelector",
- "zoomandpan": "zoomAndPan",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node.go
deleted file mode 100644
index 26b657aec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2011 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 file.
-
-package html
-
-import (
- "golang.org/x/net/html/atom"
-)
-
-// A NodeType is the type of a Node.
-type NodeType uint32
-
-const (
- ErrorNode NodeType = iota
- TextNode
- DocumentNode
- ElementNode
- CommentNode
- DoctypeNode
- scopeMarkerNode
-)
-
-// Section 12.2.3.3 says "scope markers are inserted when entering applet
-// elements, buttons, object elements, marquees, table cells, and table
-// captions, and are used to prevent formatting from 'leaking'".
-var scopeMarker = Node{Type: scopeMarkerNode}
-
-// A Node consists of a NodeType and some Data (tag name for element nodes,
-// content for text) and are part of a tree of Nodes. Element nodes may also
-// have a Namespace and contain a slice of Attributes. Data is unescaped, so
-// that it looks like "a<b" rather than "a&lt;b". For element nodes, DataAtom
-// is the atom for Data, or zero if Data is not a known tag name.
-//
-// An empty Namespace implies a "http://www.w3.org/1999/xhtml" namespace.
-// Similarly, "math" is short for "http://www.w3.org/1998/Math/MathML", and
-// "svg" is short for "http://www.w3.org/2000/svg".
-type Node struct {
- Parent, FirstChild, LastChild, PrevSibling, NextSibling *Node
-
- Type NodeType
- DataAtom atom.Atom
- Data string
- Namespace string
- Attr []Attribute
-}
-
-// InsertBefore inserts newChild as a child of n, immediately before oldChild
-// in the sequence of n's children. oldChild may be nil, in which case newChild
-// is appended to the end of n's children.
-//
-// It will panic if newChild already has a parent or siblings.
-func (n *Node) InsertBefore(newChild, oldChild *Node) {
- if newChild.Parent != nil || newChild.PrevSibling != nil || newChild.NextSibling != nil {
- panic("html: InsertBefore called for an attached child Node")
- }
- var prev, next *Node
- if oldChild != nil {
- prev, next = oldChild.PrevSibling, oldChild
- } else {
- prev = n.LastChild
- }
- if prev != nil {
- prev.NextSibling = newChild
- } else {
- n.FirstChild = newChild
- }
- if next != nil {
- next.PrevSibling = newChild
- } else {
- n.LastChild = newChild
- }
- newChild.Parent = n
- newChild.PrevSibling = prev
- newChild.NextSibling = next
-}
-
-// AppendChild adds a node c as a child of n.
-//
-// It will panic if c already has a parent or siblings.
-func (n *Node) AppendChild(c *Node) {
- if c.Parent != nil || c.PrevSibling != nil || c.NextSibling != nil {
- panic("html: AppendChild called for an attached child Node")
- }
- last := n.LastChild
- if last != nil {
- last.NextSibling = c
- } else {
- n.FirstChild = c
- }
- n.LastChild = c
- c.Parent = n
- c.PrevSibling = last
-}
-
-// RemoveChild removes a node c that is a child of n. Afterwards, c will have
-// no parent and no siblings.
-//
-// It will panic if c's parent is not n.
-func (n *Node) RemoveChild(c *Node) {
- if c.Parent != n {
- panic("html: RemoveChild called for a non-child Node")
- }
- if n.FirstChild == c {
- n.FirstChild = c.NextSibling
- }
- if c.NextSibling != nil {
- c.NextSibling.PrevSibling = c.PrevSibling
- }
- if n.LastChild == c {
- n.LastChild = c.PrevSibling
- }
- if c.PrevSibling != nil {
- c.PrevSibling.NextSibling = c.NextSibling
- }
- c.Parent = nil
- c.PrevSibling = nil
- c.NextSibling = nil
-}
-
-// reparentChildren reparents all of src's child nodes to dst.
-func reparentChildren(dst, src *Node) {
- for {
- child := src.FirstChild
- if child == nil {
- break
- }
- src.RemoveChild(child)
- dst.AppendChild(child)
- }
-}
-
-// clone returns a new node with the same type, data and attributes.
-// The clone has no parent, no siblings and no children.
-func (n *Node) clone() *Node {
- m := &Node{
- Type: n.Type,
- DataAtom: n.DataAtom,
- Data: n.Data,
- Attr: make([]Attribute, len(n.Attr)),
- }
- copy(m.Attr, n.Attr)
- return m
-}
-
-// nodeStack is a stack of nodes.
-type nodeStack []*Node
-
-// pop pops the stack. It will panic if s is empty.
-func (s *nodeStack) pop() *Node {
- i := len(*s)
- n := (*s)[i-1]
- *s = (*s)[:i-1]
- return n
-}
-
-// top returns the most recently pushed node, or nil if s is empty.
-func (s *nodeStack) top() *Node {
- if i := len(*s); i > 0 {
- return (*s)[i-1]
- }
- return nil
-}
-
-// index returns the index of the top-most occurrence of n in the stack, or -1
-// if n is not present.
-func (s *nodeStack) index(n *Node) int {
- for i := len(*s) - 1; i >= 0; i-- {
- if (*s)[i] == n {
- return i
- }
- }
- return -1
-}
-
-// insert inserts a node at the given index.
-func (s *nodeStack) insert(i int, n *Node) {
- (*s) = append(*s, nil)
- copy((*s)[i+1:], (*s)[i:])
- (*s)[i] = n
-}
-
-// remove removes a node from the stack. It is a no-op if n is not present.
-func (s *nodeStack) remove(n *Node) {
- i := s.index(n)
- if i == -1 {
- return
- }
- copy((*s)[i:], (*s)[i+1:])
- j := len(*s) - 1
- (*s)[j] = nil
- *s = (*s)[:j]
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node_test.go
deleted file mode 100644
index 471102f3a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/node_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "fmt"
-)
-
-// checkTreeConsistency checks that a node and its descendants are all
-// consistent in their parent/child/sibling relationships.
-func checkTreeConsistency(n *Node) error {
- return checkTreeConsistency1(n, 0)
-}
-
-func checkTreeConsistency1(n *Node, depth int) error {
- if depth == 1e4 {
- return fmt.Errorf("html: tree looks like it contains a cycle")
- }
- if err := checkNodeConsistency(n); err != nil {
- return err
- }
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if err := checkTreeConsistency1(c, depth+1); err != nil {
- return err
- }
- }
- return nil
-}
-
-// checkNodeConsistency checks that a node's parent/child/sibling relationships
-// are consistent.
-func checkNodeConsistency(n *Node) error {
- if n == nil {
- return nil
- }
-
- nParent := 0
- for p := n.Parent; p != nil; p = p.Parent {
- nParent++
- if nParent == 1e4 {
- return fmt.Errorf("html: parent list looks like an infinite loop")
- }
- }
-
- nForward := 0
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- nForward++
- if nForward == 1e6 {
- return fmt.Errorf("html: forward list of children looks like an infinite loop")
- }
- if c.Parent != n {
- return fmt.Errorf("html: inconsistent child/parent relationship")
- }
- }
-
- nBackward := 0
- for c := n.LastChild; c != nil; c = c.PrevSibling {
- nBackward++
- if nBackward == 1e6 {
- return fmt.Errorf("html: backward list of children looks like an infinite loop")
- }
- if c.Parent != n {
- return fmt.Errorf("html: inconsistent child/parent relationship")
- }
- }
-
- if n.Parent != nil {
- if n.Parent == n {
- return fmt.Errorf("html: inconsistent parent relationship")
- }
- if n.Parent == n.FirstChild {
- return fmt.Errorf("html: inconsistent parent/first relationship")
- }
- if n.Parent == n.LastChild {
- return fmt.Errorf("html: inconsistent parent/last relationship")
- }
- if n.Parent == n.PrevSibling {
- return fmt.Errorf("html: inconsistent parent/prev relationship")
- }
- if n.Parent == n.NextSibling {
- return fmt.Errorf("html: inconsistent parent/next relationship")
- }
-
- parentHasNAsAChild := false
- for c := n.Parent.FirstChild; c != nil; c = c.NextSibling {
- if c == n {
- parentHasNAsAChild = true
- break
- }
- }
- if !parentHasNAsAChild {
- return fmt.Errorf("html: inconsistent parent/child relationship")
- }
- }
-
- if n.PrevSibling != nil && n.PrevSibling.NextSibling != n {
- return fmt.Errorf("html: inconsistent prev/next relationship")
- }
- if n.NextSibling != nil && n.NextSibling.PrevSibling != n {
- return fmt.Errorf("html: inconsistent next/prev relationship")
- }
-
- if (n.FirstChild == nil) != (n.LastChild == nil) {
- return fmt.Errorf("html: inconsistent first/last relationship")
- }
- if n.FirstChild != nil && n.FirstChild == n.LastChild {
- // We have a sole child.
- if n.FirstChild.PrevSibling != nil || n.FirstChild.NextSibling != nil {
- return fmt.Errorf("html: inconsistent sole child's sibling relationship")
- }
- }
-
- seen := map[*Node]bool{}
-
- var last *Node
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if seen[c] {
- return fmt.Errorf("html: inconsistent repeated child")
- }
- seen[c] = true
- last = c
- }
- if last != n.LastChild {
- return fmt.Errorf("html: inconsistent last relationship")
- }
-
- var first *Node
- for c := n.LastChild; c != nil; c = c.PrevSibling {
- if !seen[c] {
- return fmt.Errorf("html: inconsistent missing child")
- }
- delete(seen, c)
- first = c
- }
- if first != n.FirstChild {
- return fmt.Errorf("html: inconsistent first relationship")
- }
-
- if len(seen) != 0 {
- return fmt.Errorf("html: inconsistent forwards/backwards child list")
- }
-
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse.go
deleted file mode 100644
index be4b2bf5a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse.go
+++ /dev/null
@@ -1,2094 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "errors"
- "fmt"
- "io"
- "strings"
-
- a "golang.org/x/net/html/atom"
-)
-
-// A parser implements the HTML5 parsing algorithm:
-// https://html.spec.whatwg.org/multipage/syntax.html#tree-construction
-type parser struct {
- // tokenizer provides the tokens for the parser.
- tokenizer *Tokenizer
- // tok is the most recently read token.
- tok Token
- // Self-closing tags like <hr/> are treated as start tags, except that
- // hasSelfClosingToken is set while they are being processed.
- hasSelfClosingToken bool
- // doc is the document root element.
- doc *Node
- // The stack of open elements (section 12.2.3.2) and active formatting
- // elements (section 12.2.3.3).
- oe, afe nodeStack
- // Element pointers (section 12.2.3.4).
- head, form *Node
- // Other parsing state flags (section 12.2.3.5).
- scripting, framesetOK bool
- // im is the current insertion mode.
- im insertionMode
- // originalIM is the insertion mode to go back to after completing a text
- // or inTableText insertion mode.
- originalIM insertionMode
- // fosterParenting is whether new elements should be inserted according to
- // the foster parenting rules (section 12.2.5.3).
- fosterParenting bool
- // quirks is whether the parser is operating in "quirks mode."
- quirks bool
- // fragment is whether the parser is parsing an HTML fragment.
- fragment bool
- // context is the context element when parsing an HTML fragment
- // (section 12.4).
- context *Node
-}
-
-func (p *parser) top() *Node {
- if n := p.oe.top(); n != nil {
- return n
- }
- return p.doc
-}
-
-// Stop tags for use in popUntil. These come from section 12.2.3.2.
-var (
- defaultScopeStopTags = map[string][]a.Atom{
- "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object, a.Template},
- "math": {a.AnnotationXml, a.Mi, a.Mn, a.Mo, a.Ms, a.Mtext},
- "svg": {a.Desc, a.ForeignObject, a.Title},
- }
-)
-
-type scope int
-
-const (
- defaultScope scope = iota
- listItemScope
- buttonScope
- tableScope
- tableRowScope
- tableBodyScope
- selectScope
-)
-
-// popUntil pops the stack of open elements at the highest element whose tag
-// is in matchTags, provided there is no higher element in the scope's stop
-// tags (as defined in section 12.2.3.2). It returns whether or not there was
-// such an element. If there was not, popUntil leaves the stack unchanged.
-//
-// For example, the set of stop tags for table scope is: "html", "table". If
-// the stack was:
-// ["html", "body", "font", "table", "b", "i", "u"]
-// then popUntil(tableScope, "font") would return false, but
-// popUntil(tableScope, "i") would return true and the stack would become:
-// ["html", "body", "font", "table", "b"]
-//
-// If an element's tag is in both the stop tags and matchTags, then the stack
-// will be popped and the function returns true (provided, of course, there was
-// no higher element in the stack that was also in the stop tags). For example,
-// popUntil(tableScope, "table") returns true and leaves:
-// ["html", "body", "font"]
-func (p *parser) popUntil(s scope, matchTags ...a.Atom) bool {
- if i := p.indexOfElementInScope(s, matchTags...); i != -1 {
- p.oe = p.oe[:i]
- return true
- }
- return false
-}
-
-// indexOfElementInScope returns the index in p.oe of the highest element whose
-// tag is in matchTags that is in scope. If no matching element is in scope, it
-// returns -1.
-func (p *parser) indexOfElementInScope(s scope, matchTags ...a.Atom) int {
- for i := len(p.oe) - 1; i >= 0; i-- {
- tagAtom := p.oe[i].DataAtom
- if p.oe[i].Namespace == "" {
- for _, t := range matchTags {
- if t == tagAtom {
- return i
- }
- }
- switch s {
- case defaultScope:
- // No-op.
- case listItemScope:
- if tagAtom == a.Ol || tagAtom == a.Ul {
- return -1
- }
- case buttonScope:
- if tagAtom == a.Button {
- return -1
- }
- case tableScope:
- if tagAtom == a.Html || tagAtom == a.Table {
- return -1
- }
- case selectScope:
- if tagAtom != a.Optgroup && tagAtom != a.Option {
- return -1
- }
- default:
- panic("unreachable")
- }
- }
- switch s {
- case defaultScope, listItemScope, buttonScope:
- for _, t := range defaultScopeStopTags[p.oe[i].Namespace] {
- if t == tagAtom {
- return -1
- }
- }
- }
- }
- return -1
-}
-
-// elementInScope is like popUntil, except that it doesn't modify the stack of
-// open elements.
-func (p *parser) elementInScope(s scope, matchTags ...a.Atom) bool {
- return p.indexOfElementInScope(s, matchTags...) != -1
-}
-
-// clearStackToContext pops elements off the stack of open elements until a
-// scope-defined element is found.
-func (p *parser) clearStackToContext(s scope) {
- for i := len(p.oe) - 1; i >= 0; i-- {
- tagAtom := p.oe[i].DataAtom
- switch s {
- case tableScope:
- if tagAtom == a.Html || tagAtom == a.Table {
- p.oe = p.oe[:i+1]
- return
- }
- case tableRowScope:
- if tagAtom == a.Html || tagAtom == a.Tr {
- p.oe = p.oe[:i+1]
- return
- }
- case tableBodyScope:
- if tagAtom == a.Html || tagAtom == a.Tbody || tagAtom == a.Tfoot || tagAtom == a.Thead {
- p.oe = p.oe[:i+1]
- return
- }
- default:
- panic("unreachable")
- }
- }
-}
-
-// generateImpliedEndTags pops nodes off the stack of open elements as long as
-// the top node has a tag name of dd, dt, li, option, optgroup, p, rp, or rt.
-// If exceptions are specified, nodes with that name will not be popped off.
-func (p *parser) generateImpliedEndTags(exceptions ...string) {
- var i int
-loop:
- for i = len(p.oe) - 1; i >= 0; i-- {
- n := p.oe[i]
- if n.Type == ElementNode {
- switch n.DataAtom {
- case a.Dd, a.Dt, a.Li, a.Option, a.Optgroup, a.P, a.Rp, a.Rt:
- for _, except := range exceptions {
- if n.Data == except {
- break loop
- }
- }
- continue
- }
- }
- break
- }
-
- p.oe = p.oe[:i+1]
-}
-
-// addChild adds a child node n to the top element, and pushes n onto the stack
-// of open elements if it is an element node.
-func (p *parser) addChild(n *Node) {
- if p.shouldFosterParent() {
- p.fosterParent(n)
- } else {
- p.top().AppendChild(n)
- }
-
- if n.Type == ElementNode {
- p.oe = append(p.oe, n)
- }
-}
-
-// shouldFosterParent returns whether the next node to be added should be
-// foster parented.
-func (p *parser) shouldFosterParent() bool {
- if p.fosterParenting {
- switch p.top().DataAtom {
- case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- return true
- }
- }
- return false
-}
-
-// fosterParent adds a child node according to the foster parenting rules.
-// Section 12.2.5.3, "foster parenting".
-func (p *parser) fosterParent(n *Node) {
- var table, parent, prev *Node
- var i int
- for i = len(p.oe) - 1; i >= 0; i-- {
- if p.oe[i].DataAtom == a.Table {
- table = p.oe[i]
- break
- }
- }
-
- if table == nil {
- // The foster parent is the html element.
- parent = p.oe[0]
- } else {
- parent = table.Parent
- }
- if parent == nil {
- parent = p.oe[i-1]
- }
-
- if table != nil {
- prev = table.PrevSibling
- } else {
- prev = parent.LastChild
- }
- if prev != nil && prev.Type == TextNode && n.Type == TextNode {
- prev.Data += n.Data
- return
- }
-
- parent.InsertBefore(n, table)
-}
-
-// addText adds text to the preceding node if it is a text node, or else it
-// calls addChild with a new text node.
-func (p *parser) addText(text string) {
- if text == "" {
- return
- }
-
- if p.shouldFosterParent() {
- p.fosterParent(&Node{
- Type: TextNode,
- Data: text,
- })
- return
- }
-
- t := p.top()
- if n := t.LastChild; n != nil && n.Type == TextNode {
- n.Data += text
- return
- }
- p.addChild(&Node{
- Type: TextNode,
- Data: text,
- })
-}
-
-// addElement adds a child element based on the current token.
-func (p *parser) addElement() {
- p.addChild(&Node{
- Type: ElementNode,
- DataAtom: p.tok.DataAtom,
- Data: p.tok.Data,
- Attr: p.tok.Attr,
- })
-}
-
-// Section 12.2.3.3.
-func (p *parser) addFormattingElement() {
- tagAtom, attr := p.tok.DataAtom, p.tok.Attr
- p.addElement()
-
- // Implement the Noah's Ark clause, but with three per family instead of two.
- identicalElements := 0
-findIdenticalElements:
- for i := len(p.afe) - 1; i >= 0; i-- {
- n := p.afe[i]
- if n.Type == scopeMarkerNode {
- break
- }
- if n.Type != ElementNode {
- continue
- }
- if n.Namespace != "" {
- continue
- }
- if n.DataAtom != tagAtom {
- continue
- }
- if len(n.Attr) != len(attr) {
- continue
- }
- compareAttributes:
- for _, t0 := range n.Attr {
- for _, t1 := range attr {
- if t0.Key == t1.Key && t0.Namespace == t1.Namespace && t0.Val == t1.Val {
- // Found a match for this attribute, continue with the next attribute.
- continue compareAttributes
- }
- }
- // If we get here, there is no attribute that matches a.
- // Therefore the element is not identical to the new one.
- continue findIdenticalElements
- }
-
- identicalElements++
- if identicalElements >= 3 {
- p.afe.remove(n)
- }
- }
-
- p.afe = append(p.afe, p.top())
-}
-
-// Section 12.2.3.3.
-func (p *parser) clearActiveFormattingElements() {
- for {
- n := p.afe.pop()
- if len(p.afe) == 0 || n.Type == scopeMarkerNode {
- return
- }
- }
-}
-
-// Section 12.2.3.3.
-func (p *parser) reconstructActiveFormattingElements() {
- n := p.afe.top()
- if n == nil {
- return
- }
- if n.Type == scopeMarkerNode || p.oe.index(n) != -1 {
- return
- }
- i := len(p.afe) - 1
- for n.Type != scopeMarkerNode && p.oe.index(n) == -1 {
- if i == 0 {
- i = -1
- break
- }
- i--
- n = p.afe[i]
- }
- for {
- i++
- clone := p.afe[i].clone()
- p.addChild(clone)
- p.afe[i] = clone
- if i == len(p.afe)-1 {
- break
- }
- }
-}
-
-// Section 12.2.4.
-func (p *parser) acknowledgeSelfClosingTag() {
- p.hasSelfClosingToken = false
-}
-
-// An insertion mode (section 12.2.3.1) is the state transition function from
-// a particular state in the HTML5 parser's state machine. It updates the
-// parser's fields depending on parser.tok (where ErrorToken means EOF).
-// It returns whether the token was consumed.
-type insertionMode func(*parser) bool
-
-// setOriginalIM sets the insertion mode to return to after completing a text or
-// inTableText insertion mode.
-// Section 12.2.3.1, "using the rules for".
-func (p *parser) setOriginalIM() {
- if p.originalIM != nil {
- panic("html: bad parser state: originalIM was set twice")
- }
- p.originalIM = p.im
-}
-
-// Section 12.2.3.1, "reset the insertion mode".
-func (p *parser) resetInsertionMode() {
- for i := len(p.oe) - 1; i >= 0; i-- {
- n := p.oe[i]
- if i == 0 && p.context != nil {
- n = p.context
- }
-
- switch n.DataAtom {
- case a.Select:
- p.im = inSelectIM
- case a.Td, a.Th:
- p.im = inCellIM
- case a.Tr:
- p.im = inRowIM
- case a.Tbody, a.Thead, a.Tfoot:
- p.im = inTableBodyIM
- case a.Caption:
- p.im = inCaptionIM
- case a.Colgroup:
- p.im = inColumnGroupIM
- case a.Table:
- p.im = inTableIM
- case a.Head:
- p.im = inBodyIM
- case a.Body:
- p.im = inBodyIM
- case a.Frameset:
- p.im = inFramesetIM
- case a.Html:
- p.im = beforeHeadIM
- default:
- continue
- }
- return
- }
- p.im = inBodyIM
-}
-
-const whitespace = " \t\r\n\f"
-
-// Section 12.2.5.4.1.
-func initialIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace)
- if len(p.tok.Data) == 0 {
- // It was all whitespace, so ignore it.
- return true
- }
- case CommentToken:
- p.doc.AppendChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- n, quirks := parseDoctype(p.tok.Data)
- p.doc.AppendChild(n)
- p.quirks = quirks
- p.im = beforeHTMLIM
- return true
- }
- p.quirks = true
- p.im = beforeHTMLIM
- return false
-}
-
-// Section 12.2.5.4.2.
-func beforeHTMLIM(p *parser) bool {
- switch p.tok.Type {
- case DoctypeToken:
- // Ignore the token.
- return true
- case TextToken:
- p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace)
- if len(p.tok.Data) == 0 {
- // It was all whitespace, so ignore it.
- return true
- }
- case StartTagToken:
- if p.tok.DataAtom == a.Html {
- p.addElement()
- p.im = beforeHeadIM
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Head, a.Body, a.Html, a.Br:
- p.parseImpliedToken(StartTagToken, a.Html, a.Html.String())
- return false
- default:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.doc.AppendChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- }
- p.parseImpliedToken(StartTagToken, a.Html, a.Html.String())
- return false
-}
-
-// Section 12.2.5.4.3.
-func beforeHeadIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace)
- if len(p.tok.Data) == 0 {
- // It was all whitespace, so ignore it.
- return true
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Head:
- p.addElement()
- p.head = p.top()
- p.im = inHeadIM
- return true
- case a.Html:
- return inBodyIM(p)
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Head, a.Body, a.Html, a.Br:
- p.parseImpliedToken(StartTagToken, a.Head, a.Head.String())
- return false
- default:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- // Ignore the token.
- return true
- }
-
- p.parseImpliedToken(StartTagToken, a.Head, a.Head.String())
- return false
-}
-
-// Section 12.2.5.4.4.
-func inHeadIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- s := strings.TrimLeft(p.tok.Data, whitespace)
- if len(s) < len(p.tok.Data) {
- // Add the initial whitespace to the current node.
- p.addText(p.tok.Data[:len(p.tok.Data)-len(s)])
- if s == "" {
- return true
- }
- p.tok.Data = s
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta:
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- return true
- case a.Script, a.Title, a.Noscript, a.Noframes, a.Style:
- p.addElement()
- p.setOriginalIM()
- p.im = textIM
- return true
- case a.Head:
- // Ignore the token.
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Head:
- n := p.oe.pop()
- if n.DataAtom != a.Head {
- panic("html: bad parser state: <head> element not found, in the in-head insertion mode")
- }
- p.im = afterHeadIM
- return true
- case a.Body, a.Html, a.Br:
- p.parseImpliedToken(EndTagToken, a.Head, a.Head.String())
- return false
- default:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- // Ignore the token.
- return true
- }
-
- p.parseImpliedToken(EndTagToken, a.Head, a.Head.String())
- return false
-}
-
-// Section 12.2.5.4.6.
-func afterHeadIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- s := strings.TrimLeft(p.tok.Data, whitespace)
- if len(s) < len(p.tok.Data) {
- // Add the initial whitespace to the current node.
- p.addText(p.tok.Data[:len(p.tok.Data)-len(s)])
- if s == "" {
- return true
- }
- p.tok.Data = s
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Body:
- p.addElement()
- p.framesetOK = false
- p.im = inBodyIM
- return true
- case a.Frameset:
- p.addElement()
- p.im = inFramesetIM
- return true
- case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title:
- p.oe = append(p.oe, p.head)
- defer p.oe.remove(p.head)
- return inHeadIM(p)
- case a.Head:
- // Ignore the token.
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Body, a.Html, a.Br:
- // Drop down to creating an implied <body> tag.
- default:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- // Ignore the token.
- return true
- }
-
- p.parseImpliedToken(StartTagToken, a.Body, a.Body.String())
- p.framesetOK = true
- return false
-}
-
-// copyAttributes copies attributes of src not found on dst to dst.
-func copyAttributes(dst *Node, src Token) {
- if len(src.Attr) == 0 {
- return
- }
- attr := map[string]string{}
- for _, t := range dst.Attr {
- attr[t.Key] = t.Val
- }
- for _, t := range src.Attr {
- if _, ok := attr[t.Key]; !ok {
- dst.Attr = append(dst.Attr, t)
- attr[t.Key] = t.Val
- }
- }
-}
-
-// Section 12.2.5.4.7.
-func inBodyIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- d := p.tok.Data
- switch n := p.oe.top(); n.DataAtom {
- case a.Pre, a.Listing:
- if n.FirstChild == nil {
- // Ignore a newline at the start of a <pre> block.
- if d != "" && d[0] == '\r' {
- d = d[1:]
- }
- if d != "" && d[0] == '\n' {
- d = d[1:]
- }
- }
- }
- d = strings.Replace(d, "\x00", "", -1)
- if d == "" {
- return true
- }
- p.reconstructActiveFormattingElements()
- p.addText(d)
- if p.framesetOK && strings.TrimLeft(d, whitespace) != "" {
- // There were non-whitespace characters inserted.
- p.framesetOK = false
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- copyAttributes(p.oe[0], p.tok)
- case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title:
- return inHeadIM(p)
- case a.Body:
- if len(p.oe) >= 2 {
- body := p.oe[1]
- if body.Type == ElementNode && body.DataAtom == a.Body {
- p.framesetOK = false
- copyAttributes(body, p.tok)
- }
- }
- case a.Frameset:
- if !p.framesetOK || len(p.oe) < 2 || p.oe[1].DataAtom != a.Body {
- // Ignore the token.
- return true
- }
- body := p.oe[1]
- if body.Parent != nil {
- body.Parent.RemoveChild(body)
- }
- p.oe = p.oe[:1]
- p.addElement()
- p.im = inFramesetIM
- return true
- case a.Address, a.Article, a.Aside, a.Blockquote, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Menu, a.Nav, a.Ol, a.P, a.Section, a.Summary, a.Ul:
- p.popUntil(buttonScope, a.P)
- p.addElement()
- case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
- p.popUntil(buttonScope, a.P)
- switch n := p.top(); n.DataAtom {
- case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
- p.oe.pop()
- }
- p.addElement()
- case a.Pre, a.Listing:
- p.popUntil(buttonScope, a.P)
- p.addElement()
- // The newline, if any, will be dealt with by the TextToken case.
- p.framesetOK = false
- case a.Form:
- if p.form == nil {
- p.popUntil(buttonScope, a.P)
- p.addElement()
- p.form = p.top()
- }
- case a.Li:
- p.framesetOK = false
- for i := len(p.oe) - 1; i >= 0; i-- {
- node := p.oe[i]
- switch node.DataAtom {
- case a.Li:
- p.oe = p.oe[:i]
- case a.Address, a.Div, a.P:
- continue
- default:
- if !isSpecialElement(node) {
- continue
- }
- }
- break
- }
- p.popUntil(buttonScope, a.P)
- p.addElement()
- case a.Dd, a.Dt:
- p.framesetOK = false
- for i := len(p.oe) - 1; i >= 0; i-- {
- node := p.oe[i]
- switch node.DataAtom {
- case a.Dd, a.Dt:
- p.oe = p.oe[:i]
- case a.Address, a.Div, a.P:
- continue
- default:
- if !isSpecialElement(node) {
- continue
- }
- }
- break
- }
- p.popUntil(buttonScope, a.P)
- p.addElement()
- case a.Plaintext:
- p.popUntil(buttonScope, a.P)
- p.addElement()
- case a.Button:
- p.popUntil(defaultScope, a.Button)
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.framesetOK = false
- case a.A:
- for i := len(p.afe) - 1; i >= 0 && p.afe[i].Type != scopeMarkerNode; i-- {
- if n := p.afe[i]; n.Type == ElementNode && n.DataAtom == a.A {
- p.inBodyEndTagFormatting(a.A)
- p.oe.remove(n)
- p.afe.remove(n)
- break
- }
- }
- p.reconstructActiveFormattingElements()
- p.addFormattingElement()
- case a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
- p.reconstructActiveFormattingElements()
- p.addFormattingElement()
- case a.Nobr:
- p.reconstructActiveFormattingElements()
- if p.elementInScope(defaultScope, a.Nobr) {
- p.inBodyEndTagFormatting(a.Nobr)
- p.reconstructActiveFormattingElements()
- }
- p.addFormattingElement()
- case a.Applet, a.Marquee, a.Object:
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.afe = append(p.afe, &scopeMarker)
- p.framesetOK = false
- case a.Table:
- if !p.quirks {
- p.popUntil(buttonScope, a.P)
- }
- p.addElement()
- p.framesetOK = false
- p.im = inTableIM
- return true
- case a.Area, a.Br, a.Embed, a.Img, a.Input, a.Keygen, a.Wbr:
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- if p.tok.DataAtom == a.Input {
- for _, t := range p.tok.Attr {
- if t.Key == "type" {
- if strings.ToLower(t.Val) == "hidden" {
- // Skip setting framesetOK = false
- return true
- }
- }
- }
- }
- p.framesetOK = false
- case a.Param, a.Source, a.Track:
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- case a.Hr:
- p.popUntil(buttonScope, a.P)
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- p.framesetOK = false
- case a.Image:
- p.tok.DataAtom = a.Img
- p.tok.Data = a.Img.String()
- return false
- case a.Isindex:
- if p.form != nil {
- // Ignore the token.
- return true
- }
- action := ""
- prompt := "This is a searchable index. Enter search keywords: "
- attr := []Attribute{{Key: "name", Val: "isindex"}}
- for _, t := range p.tok.Attr {
- switch t.Key {
- case "action":
- action = t.Val
- case "name":
- // Ignore the attribute.
- case "prompt":
- prompt = t.Val
- default:
- attr = append(attr, t)
- }
- }
- p.acknowledgeSelfClosingTag()
- p.popUntil(buttonScope, a.P)
- p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
- if action != "" {
- p.form.Attr = []Attribute{{Key: "action", Val: action}}
- }
- p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
- p.parseImpliedToken(StartTagToken, a.Label, a.Label.String())
- p.addText(prompt)
- p.addChild(&Node{
- Type: ElementNode,
- DataAtom: a.Input,
- Data: a.Input.String(),
- Attr: attr,
- })
- p.oe.pop()
- p.parseImpliedToken(EndTagToken, a.Label, a.Label.String())
- p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
- p.parseImpliedToken(EndTagToken, a.Form, a.Form.String())
- case a.Textarea:
- p.addElement()
- p.setOriginalIM()
- p.framesetOK = false
- p.im = textIM
- case a.Xmp:
- p.popUntil(buttonScope, a.P)
- p.reconstructActiveFormattingElements()
- p.framesetOK = false
- p.addElement()
- p.setOriginalIM()
- p.im = textIM
- case a.Iframe:
- p.framesetOK = false
- p.addElement()
- p.setOriginalIM()
- p.im = textIM
- case a.Noembed, a.Noscript:
- p.addElement()
- p.setOriginalIM()
- p.im = textIM
- case a.Select:
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.framesetOK = false
- p.im = inSelectIM
- return true
- case a.Optgroup, a.Option:
- if p.top().DataAtom == a.Option {
- p.oe.pop()
- }
- p.reconstructActiveFormattingElements()
- p.addElement()
- case a.Rp, a.Rt:
- if p.elementInScope(defaultScope, a.Ruby) {
- p.generateImpliedEndTags()
- }
- p.addElement()
- case a.Math, a.Svg:
- p.reconstructActiveFormattingElements()
- if p.tok.DataAtom == a.Math {
- adjustAttributeNames(p.tok.Attr, mathMLAttributeAdjustments)
- } else {
- adjustAttributeNames(p.tok.Attr, svgAttributeAdjustments)
- }
- adjustForeignAttributes(p.tok.Attr)
- p.addElement()
- p.top().Namespace = p.tok.Data
- if p.hasSelfClosingToken {
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- }
- return true
- case a.Caption, a.Col, a.Colgroup, a.Frame, a.Head, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
- // Ignore the token.
- default:
- p.reconstructActiveFormattingElements()
- p.addElement()
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Body:
- if p.elementInScope(defaultScope, a.Body) {
- p.im = afterBodyIM
- }
- case a.Html:
- if p.elementInScope(defaultScope, a.Body) {
- p.parseImpliedToken(EndTagToken, a.Body, a.Body.String())
- return false
- }
- return true
- case a.Address, a.Article, a.Aside, a.Blockquote, a.Button, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Listing, a.Menu, a.Nav, a.Ol, a.Pre, a.Section, a.Summary, a.Ul:
- p.popUntil(defaultScope, p.tok.DataAtom)
- case a.Form:
- node := p.form
- p.form = nil
- i := p.indexOfElementInScope(defaultScope, a.Form)
- if node == nil || i == -1 || p.oe[i] != node {
- // Ignore the token.
- return true
- }
- p.generateImpliedEndTags()
- p.oe.remove(node)
- case a.P:
- if !p.elementInScope(buttonScope, a.P) {
- p.parseImpliedToken(StartTagToken, a.P, a.P.String())
- }
- p.popUntil(buttonScope, a.P)
- case a.Li:
- p.popUntil(listItemScope, a.Li)
- case a.Dd, a.Dt:
- p.popUntil(defaultScope, p.tok.DataAtom)
- case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
- p.popUntil(defaultScope, a.H1, a.H2, a.H3, a.H4, a.H5, a.H6)
- case a.A, a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.Nobr, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
- p.inBodyEndTagFormatting(p.tok.DataAtom)
- case a.Applet, a.Marquee, a.Object:
- if p.popUntil(defaultScope, p.tok.DataAtom) {
- p.clearActiveFormattingElements()
- }
- case a.Br:
- p.tok.Type = StartTagToken
- return false
- default:
- p.inBodyEndTagOther(p.tok.DataAtom)
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- }
-
- return true
-}
-
-func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) {
- // This is the "adoption agency" algorithm, described at
- // https://html.spec.whatwg.org/multipage/syntax.html#adoptionAgency
-
- // TODO: this is a fairly literal line-by-line translation of that algorithm.
- // Once the code successfully parses the comprehensive test suite, we should
- // refactor this code to be more idiomatic.
-
- // Steps 1-4. The outer loop.
- for i := 0; i < 8; i++ {
- // Step 5. Find the formatting element.
- var formattingElement *Node
- for j := len(p.afe) - 1; j >= 0; j-- {
- if p.afe[j].Type == scopeMarkerNode {
- break
- }
- if p.afe[j].DataAtom == tagAtom {
- formattingElement = p.afe[j]
- break
- }
- }
- if formattingElement == nil {
- p.inBodyEndTagOther(tagAtom)
- return
- }
- feIndex := p.oe.index(formattingElement)
- if feIndex == -1 {
- p.afe.remove(formattingElement)
- return
- }
- if !p.elementInScope(defaultScope, tagAtom) {
- // Ignore the tag.
- return
- }
-
- // Steps 9-10. Find the furthest block.
- var furthestBlock *Node
- for _, e := range p.oe[feIndex:] {
- if isSpecialElement(e) {
- furthestBlock = e
- break
- }
- }
- if furthestBlock == nil {
- e := p.oe.pop()
- for e != formattingElement {
- e = p.oe.pop()
- }
- p.afe.remove(e)
- return
- }
-
- // Steps 11-12. Find the common ancestor and bookmark node.
- commonAncestor := p.oe[feIndex-1]
- bookmark := p.afe.index(formattingElement)
-
- // Step 13. The inner loop. Find the lastNode to reparent.
- lastNode := furthestBlock
- node := furthestBlock
- x := p.oe.index(node)
- // Steps 13.1-13.2
- for j := 0; j < 3; j++ {
- // Step 13.3.
- x--
- node = p.oe[x]
- // Step 13.4 - 13.5.
- if p.afe.index(node) == -1 {
- p.oe.remove(node)
- continue
- }
- // Step 13.6.
- if node == formattingElement {
- break
- }
- // Step 13.7.
- clone := node.clone()
- p.afe[p.afe.index(node)] = clone
- p.oe[p.oe.index(node)] = clone
- node = clone
- // Step 13.8.
- if lastNode == furthestBlock {
- bookmark = p.afe.index(node) + 1
- }
- // Step 13.9.
- if lastNode.Parent != nil {
- lastNode.Parent.RemoveChild(lastNode)
- }
- node.AppendChild(lastNode)
- // Step 13.10.
- lastNode = node
- }
-
- // Step 14. Reparent lastNode to the common ancestor,
- // or for misnested table nodes, to the foster parent.
- if lastNode.Parent != nil {
- lastNode.Parent.RemoveChild(lastNode)
- }
- switch commonAncestor.DataAtom {
- case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- p.fosterParent(lastNode)
- default:
- commonAncestor.AppendChild(lastNode)
- }
-
- // Steps 15-17. Reparent nodes from the furthest block's children
- // to a clone of the formatting element.
- clone := formattingElement.clone()
- reparentChildren(clone, furthestBlock)
- furthestBlock.AppendChild(clone)
-
- // Step 18. Fix up the list of active formatting elements.
- if oldLoc := p.afe.index(formattingElement); oldLoc != -1 && oldLoc < bookmark {
- // Move the bookmark with the rest of the list.
- bookmark--
- }
- p.afe.remove(formattingElement)
- p.afe.insert(bookmark, clone)
-
- // Step 19. Fix up the stack of open elements.
- p.oe.remove(formattingElement)
- p.oe.insert(p.oe.index(furthestBlock)+1, clone)
- }
-}
-
-// inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM.
-// "Any other end tag" handling from 12.2.5.5 The rules for parsing tokens in foreign content
-// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inforeign
-func (p *parser) inBodyEndTagOther(tagAtom a.Atom) {
- for i := len(p.oe) - 1; i >= 0; i-- {
- if p.oe[i].DataAtom == tagAtom {
- p.oe = p.oe[:i]
- break
- }
- if isSpecialElement(p.oe[i]) {
- break
- }
- }
-}
-
-// Section 12.2.5.4.8.
-func textIM(p *parser) bool {
- switch p.tok.Type {
- case ErrorToken:
- p.oe.pop()
- case TextToken:
- d := p.tok.Data
- if n := p.oe.top(); n.DataAtom == a.Textarea && n.FirstChild == nil {
- // Ignore a newline at the start of a <textarea> block.
- if d != "" && d[0] == '\r' {
- d = d[1:]
- }
- if d != "" && d[0] == '\n' {
- d = d[1:]
- }
- }
- if d == "" {
- return true
- }
- p.addText(d)
- return true
- case EndTagToken:
- p.oe.pop()
- }
- p.im = p.originalIM
- p.originalIM = nil
- return p.tok.Type == EndTagToken
-}
-
-// Section 12.2.5.4.9.
-func inTableIM(p *parser) bool {
- switch p.tok.Type {
- case ErrorToken:
- // Stop parsing.
- return true
- case TextToken:
- p.tok.Data = strings.Replace(p.tok.Data, "\x00", "", -1)
- switch p.oe.top().DataAtom {
- case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- if strings.Trim(p.tok.Data, whitespace) == "" {
- p.addText(p.tok.Data)
- return true
- }
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Caption:
- p.clearStackToContext(tableScope)
- p.afe = append(p.afe, &scopeMarker)
- p.addElement()
- p.im = inCaptionIM
- return true
- case a.Colgroup:
- p.clearStackToContext(tableScope)
- p.addElement()
- p.im = inColumnGroupIM
- return true
- case a.Col:
- p.parseImpliedToken(StartTagToken, a.Colgroup, a.Colgroup.String())
- return false
- case a.Tbody, a.Tfoot, a.Thead:
- p.clearStackToContext(tableScope)
- p.addElement()
- p.im = inTableBodyIM
- return true
- case a.Td, a.Th, a.Tr:
- p.parseImpliedToken(StartTagToken, a.Tbody, a.Tbody.String())
- return false
- case a.Table:
- if p.popUntil(tableScope, a.Table) {
- p.resetInsertionMode()
- return false
- }
- // Ignore the token.
- return true
- case a.Style, a.Script:
- return inHeadIM(p)
- case a.Input:
- for _, t := range p.tok.Attr {
- if t.Key == "type" && strings.ToLower(t.Val) == "hidden" {
- p.addElement()
- p.oe.pop()
- return true
- }
- }
- // Otherwise drop down to the default action.
- case a.Form:
- if p.form != nil {
- // Ignore the token.
- return true
- }
- p.addElement()
- p.form = p.oe.pop()
- case a.Select:
- p.reconstructActiveFormattingElements()
- switch p.top().DataAtom {
- case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- p.fosterParenting = true
- }
- p.addElement()
- p.fosterParenting = false
- p.framesetOK = false
- p.im = inSelectInTableIM
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Table:
- if p.popUntil(tableScope, a.Table) {
- p.resetInsertionMode()
- return true
- }
- // Ignore the token.
- return true
- case a.Body, a.Caption, a.Col, a.Colgroup, a.Html, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- // Ignore the token.
- return true
- }
-
- p.fosterParenting = true
- defer func() { p.fosterParenting = false }()
-
- return inBodyIM(p)
-}
-
-// Section 12.2.5.4.11.
-func inCaptionIM(p *parser) bool {
- switch p.tok.Type {
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Td, a.Tfoot, a.Thead, a.Tr:
- if p.popUntil(tableScope, a.Caption) {
- p.clearActiveFormattingElements()
- p.im = inTableIM
- return false
- } else {
- // Ignore the token.
- return true
- }
- case a.Select:
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.framesetOK = false
- p.im = inSelectInTableIM
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Caption:
- if p.popUntil(tableScope, a.Caption) {
- p.clearActiveFormattingElements()
- p.im = inTableIM
- }
- return true
- case a.Table:
- if p.popUntil(tableScope, a.Caption) {
- p.clearActiveFormattingElements()
- p.im = inTableIM
- return false
- } else {
- // Ignore the token.
- return true
- }
- case a.Body, a.Col, a.Colgroup, a.Html, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
- // Ignore the token.
- return true
- }
- }
- return inBodyIM(p)
-}
-
-// Section 12.2.5.4.12.
-func inColumnGroupIM(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- s := strings.TrimLeft(p.tok.Data, whitespace)
- if len(s) < len(p.tok.Data) {
- // Add the initial whitespace to the current node.
- p.addText(p.tok.Data[:len(p.tok.Data)-len(s)])
- if s == "" {
- return true
- }
- p.tok.Data = s
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- // Ignore the token.
- return true
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Col:
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Colgroup:
- if p.oe.top().DataAtom != a.Html {
- p.oe.pop()
- p.im = inTableIM
- }
- return true
- case a.Col:
- // Ignore the token.
- return true
- }
- }
- if p.oe.top().DataAtom != a.Html {
- p.oe.pop()
- p.im = inTableIM
- return false
- }
- return true
-}
-
-// Section 12.2.5.4.13.
-func inTableBodyIM(p *parser) bool {
- switch p.tok.Type {
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Tr:
- p.clearStackToContext(tableBodyScope)
- p.addElement()
- p.im = inRowIM
- return true
- case a.Td, a.Th:
- p.parseImpliedToken(StartTagToken, a.Tr, a.Tr.String())
- return false
- case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Tfoot, a.Thead:
- if p.popUntil(tableScope, a.Tbody, a.Thead, a.Tfoot) {
- p.im = inTableIM
- return false
- }
- // Ignore the token.
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Tbody, a.Tfoot, a.Thead:
- if p.elementInScope(tableScope, p.tok.DataAtom) {
- p.clearStackToContext(tableBodyScope)
- p.oe.pop()
- p.im = inTableIM
- }
- return true
- case a.Table:
- if p.popUntil(tableScope, a.Tbody, a.Thead, a.Tfoot) {
- p.im = inTableIM
- return false
- }
- // Ignore the token.
- return true
- case a.Body, a.Caption, a.Col, a.Colgroup, a.Html, a.Td, a.Th, a.Tr:
- // Ignore the token.
- return true
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- }
-
- return inTableIM(p)
-}
-
-// Section 12.2.5.4.14.
-func inRowIM(p *parser) bool {
- switch p.tok.Type {
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Td, a.Th:
- p.clearStackToContext(tableRowScope)
- p.addElement()
- p.afe = append(p.afe, &scopeMarker)
- p.im = inCellIM
- return true
- case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- if p.popUntil(tableScope, a.Tr) {
- p.im = inTableBodyIM
- return false
- }
- // Ignore the token.
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Tr:
- if p.popUntil(tableScope, a.Tr) {
- p.im = inTableBodyIM
- return true
- }
- // Ignore the token.
- return true
- case a.Table:
- if p.popUntil(tableScope, a.Tr) {
- p.im = inTableBodyIM
- return false
- }
- // Ignore the token.
- return true
- case a.Tbody, a.Tfoot, a.Thead:
- if p.elementInScope(tableScope, p.tok.DataAtom) {
- p.parseImpliedToken(EndTagToken, a.Tr, a.Tr.String())
- return false
- }
- // Ignore the token.
- return true
- case a.Body, a.Caption, a.Col, a.Colgroup, a.Html, a.Td, a.Th:
- // Ignore the token.
- return true
- }
- }
-
- return inTableIM(p)
-}
-
-// Section 12.2.5.4.15.
-func inCellIM(p *parser) bool {
- switch p.tok.Type {
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
- if p.popUntil(tableScope, a.Td, a.Th) {
- // Close the cell and reprocess.
- p.clearActiveFormattingElements()
- p.im = inRowIM
- return false
- }
- // Ignore the token.
- return true
- case a.Select:
- p.reconstructActiveFormattingElements()
- p.addElement()
- p.framesetOK = false
- p.im = inSelectInTableIM
- return true
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Td, a.Th:
- if !p.popUntil(tableScope, p.tok.DataAtom) {
- // Ignore the token.
- return true
- }
- p.clearActiveFormattingElements()
- p.im = inRowIM
- return true
- case a.Body, a.Caption, a.Col, a.Colgroup, a.Html:
- // Ignore the token.
- return true
- case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- if !p.elementInScope(tableScope, p.tok.DataAtom) {
- // Ignore the token.
- return true
- }
- // Close the cell and reprocess.
- p.popUntil(tableScope, a.Td, a.Th)
- p.clearActiveFormattingElements()
- p.im = inRowIM
- return false
- }
- }
- return inBodyIM(p)
-}
-
-// Section 12.2.5.4.16.
-func inSelectIM(p *parser) bool {
- switch p.tok.Type {
- case ErrorToken:
- // Stop parsing.
- return true
- case TextToken:
- p.addText(strings.Replace(p.tok.Data, "\x00", "", -1))
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Option:
- if p.top().DataAtom == a.Option {
- p.oe.pop()
- }
- p.addElement()
- case a.Optgroup:
- if p.top().DataAtom == a.Option {
- p.oe.pop()
- }
- if p.top().DataAtom == a.Optgroup {
- p.oe.pop()
- }
- p.addElement()
- case a.Select:
- p.tok.Type = EndTagToken
- return false
- case a.Input, a.Keygen, a.Textarea:
- if p.elementInScope(selectScope, a.Select) {
- p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
- return false
- }
- // In order to properly ignore <textarea>, we need to change the tokenizer mode.
- p.tokenizer.NextIsNotRawText()
- // Ignore the token.
- return true
- case a.Script:
- return inHeadIM(p)
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Option:
- if p.top().DataAtom == a.Option {
- p.oe.pop()
- }
- case a.Optgroup:
- i := len(p.oe) - 1
- if p.oe[i].DataAtom == a.Option {
- i--
- }
- if p.oe[i].DataAtom == a.Optgroup {
- p.oe = p.oe[:i]
- }
- case a.Select:
- if p.popUntil(selectScope, a.Select) {
- p.resetInsertionMode()
- }
- }
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- case DoctypeToken:
- // Ignore the token.
- return true
- }
-
- return true
-}
-
-// Section 12.2.5.4.17.
-func inSelectInTableIM(p *parser) bool {
- switch p.tok.Type {
- case StartTagToken, EndTagToken:
- switch p.tok.DataAtom {
- case a.Caption, a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr, a.Td, a.Th:
- if p.tok.Type == StartTagToken || p.elementInScope(tableScope, p.tok.DataAtom) {
- p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
- return false
- } else {
- // Ignore the token.
- return true
- }
- }
- }
- return inSelectIM(p)
-}
-
-// Section 12.2.5.4.18.
-func afterBodyIM(p *parser) bool {
- switch p.tok.Type {
- case ErrorToken:
- // Stop parsing.
- return true
- case TextToken:
- s := strings.TrimLeft(p.tok.Data, whitespace)
- if len(s) == 0 {
- // It was all whitespace.
- return inBodyIM(p)
- }
- case StartTagToken:
- if p.tok.DataAtom == a.Html {
- return inBodyIM(p)
- }
- case EndTagToken:
- if p.tok.DataAtom == a.Html {
- if !p.fragment {
- p.im = afterAfterBodyIM
- }
- return true
- }
- case CommentToken:
- // The comment is attached to the <html> element.
- if len(p.oe) < 1 || p.oe[0].DataAtom != a.Html {
- panic("html: bad parser state: <html> element not found, in the after-body insertion mode")
- }
- p.oe[0].AppendChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- }
- p.im = inBodyIM
- return false
-}
-
-// Section 12.2.5.4.19.
-func inFramesetIM(p *parser) bool {
- switch p.tok.Type {
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- case TextToken:
- // Ignore all text but whitespace.
- s := strings.Map(func(c rune) rune {
- switch c {
- case ' ', '\t', '\n', '\f', '\r':
- return c
- }
- return -1
- }, p.tok.Data)
- if s != "" {
- p.addText(s)
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Frameset:
- p.addElement()
- case a.Frame:
- p.addElement()
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- case a.Noframes:
- return inHeadIM(p)
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Frameset:
- if p.oe.top().DataAtom != a.Html {
- p.oe.pop()
- if p.oe.top().DataAtom != a.Frameset {
- p.im = afterFramesetIM
- return true
- }
- }
- }
- default:
- // Ignore the token.
- }
- return true
-}
-
-// Section 12.2.5.4.20.
-func afterFramesetIM(p *parser) bool {
- switch p.tok.Type {
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- case TextToken:
- // Ignore all text but whitespace.
- s := strings.Map(func(c rune) rune {
- switch c {
- case ' ', '\t', '\n', '\f', '\r':
- return c
- }
- return -1
- }, p.tok.Data)
- if s != "" {
- p.addText(s)
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Noframes:
- return inHeadIM(p)
- }
- case EndTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- p.im = afterAfterFramesetIM
- return true
- }
- default:
- // Ignore the token.
- }
- return true
-}
-
-// Section 12.2.5.4.21.
-func afterAfterBodyIM(p *parser) bool {
- switch p.tok.Type {
- case ErrorToken:
- // Stop parsing.
- return true
- case TextToken:
- s := strings.TrimLeft(p.tok.Data, whitespace)
- if len(s) == 0 {
- // It was all whitespace.
- return inBodyIM(p)
- }
- case StartTagToken:
- if p.tok.DataAtom == a.Html {
- return inBodyIM(p)
- }
- case CommentToken:
- p.doc.AppendChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
- case DoctypeToken:
- return inBodyIM(p)
- }
- p.im = inBodyIM
- return false
-}
-
-// Section 12.2.5.4.22.
-func afterAfterFramesetIM(p *parser) bool {
- switch p.tok.Type {
- case CommentToken:
- p.doc.AppendChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- case TextToken:
- // Ignore all text but whitespace.
- s := strings.Map(func(c rune) rune {
- switch c {
- case ' ', '\t', '\n', '\f', '\r':
- return c
- }
- return -1
- }, p.tok.Data)
- if s != "" {
- p.tok.Data = s
- return inBodyIM(p)
- }
- case StartTagToken:
- switch p.tok.DataAtom {
- case a.Html:
- return inBodyIM(p)
- case a.Noframes:
- return inHeadIM(p)
- }
- case DoctypeToken:
- return inBodyIM(p)
- default:
- // Ignore the token.
- }
- return true
-}
-
-const whitespaceOrNUL = whitespace + "\x00"
-
-// Section 12.2.5.5.
-func parseForeignContent(p *parser) bool {
- switch p.tok.Type {
- case TextToken:
- if p.framesetOK {
- p.framesetOK = strings.TrimLeft(p.tok.Data, whitespaceOrNUL) == ""
- }
- p.tok.Data = strings.Replace(p.tok.Data, "\x00", "\ufffd", -1)
- p.addText(p.tok.Data)
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- case StartTagToken:
- b := breakout[p.tok.Data]
- if p.tok.DataAtom == a.Font {
- loop:
- for _, attr := range p.tok.Attr {
- switch attr.Key {
- case "color", "face", "size":
- b = true
- break loop
- }
- }
- }
- if b {
- for i := len(p.oe) - 1; i >= 0; i-- {
- n := p.oe[i]
- if n.Namespace == "" || htmlIntegrationPoint(n) || mathMLTextIntegrationPoint(n) {
- p.oe = p.oe[:i+1]
- break
- }
- }
- return false
- }
- switch p.top().Namespace {
- case "math":
- adjustAttributeNames(p.tok.Attr, mathMLAttributeAdjustments)
- case "svg":
- // Adjust SVG tag names. The tokenizer lower-cases tag names, but
- // SVG wants e.g. "foreignObject" with a capital second "O".
- if x := svgTagNameAdjustments[p.tok.Data]; x != "" {
- p.tok.DataAtom = a.Lookup([]byte(x))
- p.tok.Data = x
- }
- adjustAttributeNames(p.tok.Attr, svgAttributeAdjustments)
- default:
- panic("html: bad parser state: unexpected namespace")
- }
- adjustForeignAttributes(p.tok.Attr)
- namespace := p.top().Namespace
- p.addElement()
- p.top().Namespace = namespace
- if namespace != "" {
- // Don't let the tokenizer go into raw text mode in foreign content
- // (e.g. in an SVG <title> tag).
- p.tokenizer.NextIsNotRawText()
- }
- if p.hasSelfClosingToken {
- p.oe.pop()
- p.acknowledgeSelfClosingTag()
- }
- case EndTagToken:
- for i := len(p.oe) - 1; i >= 0; i-- {
- if p.oe[i].Namespace == "" {
- return p.im(p)
- }
- if strings.EqualFold(p.oe[i].Data, p.tok.Data) {
- p.oe = p.oe[:i]
- break
- }
- }
- return true
- default:
- // Ignore the token.
- }
- return true
-}
-
-// Section 12.2.5.
-func (p *parser) inForeignContent() bool {
- if len(p.oe) == 0 {
- return false
- }
- n := p.oe[len(p.oe)-1]
- if n.Namespace == "" {
- return false
- }
- if mathMLTextIntegrationPoint(n) {
- if p.tok.Type == StartTagToken && p.tok.DataAtom != a.Mglyph && p.tok.DataAtom != a.Malignmark {
- return false
- }
- if p.tok.Type == TextToken {
- return false
- }
- }
- if n.Namespace == "math" && n.DataAtom == a.AnnotationXml && p.tok.Type == StartTagToken && p.tok.DataAtom == a.Svg {
- return false
- }
- if htmlIntegrationPoint(n) && (p.tok.Type == StartTagToken || p.tok.Type == TextToken) {
- return false
- }
- if p.tok.Type == ErrorToken {
- return false
- }
- return true
-}
-
-// parseImpliedToken parses a token as though it had appeared in the parser's
-// input.
-func (p *parser) parseImpliedToken(t TokenType, dataAtom a.Atom, data string) {
- realToken, selfClosing := p.tok, p.hasSelfClosingToken
- p.tok = Token{
- Type: t,
- DataAtom: dataAtom,
- Data: data,
- }
- p.hasSelfClosingToken = false
- p.parseCurrentToken()
- p.tok, p.hasSelfClosingToken = realToken, selfClosing
-}
-
-// parseCurrentToken runs the current token through the parsing routines
-// until it is consumed.
-func (p *parser) parseCurrentToken() {
- if p.tok.Type == SelfClosingTagToken {
- p.hasSelfClosingToken = true
- p.tok.Type = StartTagToken
- }
-
- consumed := false
- for !consumed {
- if p.inForeignContent() {
- consumed = parseForeignContent(p)
- } else {
- consumed = p.im(p)
- }
- }
-
- if p.hasSelfClosingToken {
- // This is a parse error, but ignore it.
- p.hasSelfClosingToken = false
- }
-}
-
-func (p *parser) parse() error {
- // Iterate until EOF. Any other error will cause an early return.
- var err error
- for err != io.EOF {
- // CDATA sections are allowed only in foreign content.
- n := p.oe.top()
- p.tokenizer.AllowCDATA(n != nil && n.Namespace != "")
- // Read and parse the next token.
- p.tokenizer.Next()
- p.tok = p.tokenizer.Token()
- if p.tok.Type == ErrorToken {
- err = p.tokenizer.Err()
- if err != nil && err != io.EOF {
- return err
- }
- }
- p.parseCurrentToken()
- }
- return nil
-}
-
-// Parse returns the parse tree for the HTML from the given Reader.
-// The input is assumed to be UTF-8 encoded.
-func Parse(r io.Reader) (*Node, error) {
- p := &parser{
- tokenizer: NewTokenizer(r),
- doc: &Node{
- Type: DocumentNode,
- },
- scripting: true,
- framesetOK: true,
- im: initialIM,
- }
- err := p.parse()
- if err != nil {
- return nil, err
- }
- return p.doc, nil
-}
-
-// ParseFragment parses a fragment of HTML and returns the nodes that were
-// found. If the fragment is the InnerHTML for an existing element, pass that
-// element in context.
-func ParseFragment(r io.Reader, context *Node) ([]*Node, error) {
- contextTag := ""
- if context != nil {
- if context.Type != ElementNode {
- return nil, errors.New("html: ParseFragment of non-element Node")
- }
- // The next check isn't just context.DataAtom.String() == context.Data because
- // it is valid to pass an element whose tag isn't a known atom. For example,
- // DataAtom == 0 and Data = "tagfromthefuture" is perfectly consistent.
- if context.DataAtom != a.Lookup([]byte(context.Data)) {
- return nil, fmt.Errorf("html: inconsistent Node: DataAtom=%q, Data=%q", context.DataAtom, context.Data)
- }
- contextTag = context.DataAtom.String()
- }
- p := &parser{
- tokenizer: NewTokenizerFragment(r, contextTag),
- doc: &Node{
- Type: DocumentNode,
- },
- scripting: true,
- fragment: true,
- context: context,
- }
-
- root := &Node{
- Type: ElementNode,
- DataAtom: a.Html,
- Data: a.Html.String(),
- }
- p.doc.AppendChild(root)
- p.oe = nodeStack{root}
- p.resetInsertionMode()
-
- for n := context; n != nil; n = n.Parent {
- if n.Type == ElementNode && n.DataAtom == a.Form {
- p.form = n
- break
- }
- }
-
- err := p.parse()
- if err != nil {
- return nil, err
- }
-
- parent := p.doc
- if context != nil {
- parent = root
- }
-
- var result []*Node
- for c := parent.FirstChild; c != nil; {
- next := c.NextSibling
- parent.RemoveChild(c)
- result = append(result, c)
- c = next
- }
- return result, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse_test.go
deleted file mode 100644
index 7e47d11be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/parse_test.go
+++ /dev/null
@@ -1,388 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "runtime"
- "sort"
- "strings"
- "testing"
-
- "golang.org/x/net/html/atom"
-)
-
-// readParseTest reads a single test case from r.
-func readParseTest(r *bufio.Reader) (text, want, context string, err error) {
- line, err := r.ReadSlice('\n')
- if err != nil {
- return "", "", "", err
- }
- var b []byte
-
- // Read the HTML.
- if string(line) != "#data\n" {
- return "", "", "", fmt.Errorf(`got %q want "#data\n"`, line)
- }
- for {
- line, err = r.ReadSlice('\n')
- if err != nil {
- return "", "", "", err
- }
- if line[0] == '#' {
- break
- }
- b = append(b, line...)
- }
- text = strings.TrimSuffix(string(b), "\n")
- b = b[:0]
-
- // Skip the error list.
- if string(line) != "#errors\n" {
- return "", "", "", fmt.Errorf(`got %q want "#errors\n"`, line)
- }
- for {
- line, err = r.ReadSlice('\n')
- if err != nil {
- return "", "", "", err
- }
- if line[0] == '#' {
- break
- }
- }
-
- if string(line) == "#document-fragment\n" {
- line, err = r.ReadSlice('\n')
- if err != nil {
- return "", "", "", err
- }
- context = strings.TrimSpace(string(line))
- line, err = r.ReadSlice('\n')
- if err != nil {
- return "", "", "", err
- }
- }
-
- // Read the dump of what the parse tree should be.
- if string(line) != "#document\n" {
- return "", "", "", fmt.Errorf(`got %q want "#document\n"`, line)
- }
- inQuote := false
- for {
- line, err = r.ReadSlice('\n')
- if err != nil && err != io.EOF {
- return "", "", "", err
- }
- trimmed := bytes.Trim(line, "| \n")
- if len(trimmed) > 0 {
- if line[0] == '|' && trimmed[0] == '"' {
- inQuote = true
- }
- if trimmed[len(trimmed)-1] == '"' && !(line[0] == '|' && len(trimmed) == 1) {
- inQuote = false
- }
- }
- if len(line) == 0 || len(line) == 1 && line[0] == '\n' && !inQuote {
- break
- }
- b = append(b, line...)
- }
- return text, string(b), context, nil
-}
-
-func dumpIndent(w io.Writer, level int) {
- io.WriteString(w, "| ")
- for i := 0; i < level; i++ {
- io.WriteString(w, " ")
- }
-}
-
-type sortedAttributes []Attribute
-
-func (a sortedAttributes) Len() int {
- return len(a)
-}
-
-func (a sortedAttributes) Less(i, j int) bool {
- if a[i].Namespace != a[j].Namespace {
- return a[i].Namespace < a[j].Namespace
- }
- return a[i].Key < a[j].Key
-}
-
-func (a sortedAttributes) Swap(i, j int) {
- a[i], a[j] = a[j], a[i]
-}
-
-func dumpLevel(w io.Writer, n *Node, level int) error {
- dumpIndent(w, level)
- switch n.Type {
- case ErrorNode:
- return errors.New("unexpected ErrorNode")
- case DocumentNode:
- return errors.New("unexpected DocumentNode")
- case ElementNode:
- if n.Namespace != "" {
- fmt.Fprintf(w, "<%s %s>", n.Namespace, n.Data)
- } else {
- fmt.Fprintf(w, "<%s>", n.Data)
- }
- attr := sortedAttributes(n.Attr)
- sort.Sort(attr)
- for _, a := range attr {
- io.WriteString(w, "\n")
- dumpIndent(w, level+1)
- if a.Namespace != "" {
- fmt.Fprintf(w, `%s %s="%s"`, a.Namespace, a.Key, a.Val)
- } else {
- fmt.Fprintf(w, `%s="%s"`, a.Key, a.Val)
- }
- }
- case TextNode:
- fmt.Fprintf(w, `"%s"`, n.Data)
- case CommentNode:
- fmt.Fprintf(w, "<!-- %s -->", n.Data)
- case DoctypeNode:
- fmt.Fprintf(w, "<!DOCTYPE %s", n.Data)
- if n.Attr != nil {
- var p, s string
- for _, a := range n.Attr {
- switch a.Key {
- case "public":
- p = a.Val
- case "system":
- s = a.Val
- }
- }
- if p != "" || s != "" {
- fmt.Fprintf(w, ` "%s"`, p)
- fmt.Fprintf(w, ` "%s"`, s)
- }
- }
- io.WriteString(w, ">")
- case scopeMarkerNode:
- return errors.New("unexpected scopeMarkerNode")
- default:
- return errors.New("unknown node type")
- }
- io.WriteString(w, "\n")
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if err := dumpLevel(w, c, level+1); err != nil {
- return err
- }
- }
- return nil
-}
-
-func dump(n *Node) (string, error) {
- if n == nil || n.FirstChild == nil {
- return "", nil
- }
- var b bytes.Buffer
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if err := dumpLevel(&b, c, 0); err != nil {
- return "", err
- }
- }
- return b.String(), nil
-}
-
-const testDataDir = "testdata/webkit/"
-
-func TestParser(t *testing.T) {
- testFiles, err := filepath.Glob(testDataDir + "*.dat")
- if err != nil {
- t.Fatal(err)
- }
- for _, tf := range testFiles {
- f, err := os.Open(tf)
- if err != nil {
- t.Fatal(err)
- }
- defer f.Close()
- r := bufio.NewReader(f)
-
- for i := 0; ; i++ {
- text, want, context, err := readParseTest(r)
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
-
- err = testParseCase(text, want, context)
-
- if err != nil {
- t.Errorf("%s test #%d %q, %s", tf, i, text, err)
- }
- }
- }
-}
-
-// testParseCase tests one test case from the test files. If the test does not
-// pass, it returns an error that explains the failure.
-// text is the HTML to be parsed, want is a dump of the correct parse tree,
-// and context is the name of the context node, if any.
-func testParseCase(text, want, context string) (err error) {
- defer func() {
- if x := recover(); x != nil {
- switch e := x.(type) {
- case error:
- err = e
- default:
- err = fmt.Errorf("%v", e)
- }
- }
- }()
-
- var doc *Node
- if context == "" {
- doc, err = Parse(strings.NewReader(text))
- if err != nil {
- return err
- }
- } else {
- contextNode := &Node{
- Type: ElementNode,
- DataAtom: atom.Lookup([]byte(context)),
- Data: context,
- }
- nodes, err := ParseFragment(strings.NewReader(text), contextNode)
- if err != nil {
- return err
- }
- doc = &Node{
- Type: DocumentNode,
- }
- for _, n := range nodes {
- doc.AppendChild(n)
- }
- }
-
- if err := checkTreeConsistency(doc); err != nil {
- return err
- }
-
- got, err := dump(doc)
- if err != nil {
- return err
- }
- // Compare the parsed tree to the #document section.
- if got != want {
- return fmt.Errorf("got vs want:\n----\n%s----\n%s----", got, want)
- }
-
- if renderTestBlacklist[text] || context != "" {
- return nil
- }
-
- // Check that rendering and re-parsing results in an identical tree.
- pr, pw := io.Pipe()
- go func() {
- pw.CloseWithError(Render(pw, doc))
- }()
- doc1, err := Parse(pr)
- if err != nil {
- return err
- }
- got1, err := dump(doc1)
- if err != nil {
- return err
- }
- if got != got1 {
- return fmt.Errorf("got vs got1:\n----\n%s----\n%s----", got, got1)
- }
-
- return nil
-}
-
-// Some test input result in parse trees are not 'well-formed' despite
-// following the HTML5 recovery algorithms. Rendering and re-parsing such a
-// tree will not result in an exact clone of that tree. We blacklist such
-// inputs from the render test.
-var renderTestBlacklist = map[string]bool{
- // The second <a> will be reparented to the first <table>'s parent. This
- // results in an <a> whose parent is an <a>, which is not 'well-formed'.
- `<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y`: true,
- // The same thing with a <p>:
- `<p><table></p>`: true,
- // More cases of <a> being reparented:
- `<a href="blah">aba<table><a href="foo">br<tr><td></td></tr>x</table>aoe`: true,
- `<a><table><a></table><p><a><div><a>`: true,
- `<a><table><td><a><table></table><a></tr><a></table><a>`: true,
- // A similar reparenting situation involving <nobr>:
- `<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3`: true,
- // A <plaintext> element is reparented, putting it before a table.
- // A <plaintext> element can't have anything after it in HTML.
- `<table><plaintext><td>`: true,
- `<!doctype html><table><plaintext></plaintext>`: true,
- `<!doctype html><table><tbody><plaintext></plaintext>`: true,
- `<!doctype html><table><tbody><tr><plaintext></plaintext>`: true,
- // A form inside a table inside a form doesn't work either.
- `<!doctype html><form><table></form><form></table></form>`: true,
- // A script that ends at EOF may escape its own closing tag when rendered.
- `<!doctype html><script><!--<script `: true,
- `<!doctype html><script><!--<script <`: true,
- `<!doctype html><script><!--<script <a`: true,
- `<!doctype html><script><!--<script </`: true,
- `<!doctype html><script><!--<script </s`: true,
- `<!doctype html><script><!--<script </script`: true,
- `<!doctype html><script><!--<script </scripta`: true,
- `<!doctype html><script><!--<script -`: true,
- `<!doctype html><script><!--<script -a`: true,
- `<!doctype html><script><!--<script -<`: true,
- `<!doctype html><script><!--<script --`: true,
- `<!doctype html><script><!--<script --a`: true,
- `<!doctype html><script><!--<script --<`: true,
- `<script><!--<script `: true,
- `<script><!--<script <a`: true,
- `<script><!--<script </script`: true,
- `<script><!--<script </scripta`: true,
- `<script><!--<script -`: true,
- `<script><!--<script -a`: true,
- `<script><!--<script --`: true,
- `<script><!--<script --a`: true,
- `<script><!--<script <`: true,
- `<script><!--<script </`: true,
- `<script><!--<script </s`: true,
- // Reconstructing the active formatting elements results in a <plaintext>
- // element that contains an <a> element.
- `<!doctype html><p><a><plaintext>b`: true,
-}
-
-func TestNodeConsistency(t *testing.T) {
- // inconsistentNode is a Node whose DataAtom and Data do not agree.
- inconsistentNode := &Node{
- Type: ElementNode,
- DataAtom: atom.Frameset,
- Data: "table",
- }
- _, err := ParseFragment(strings.NewReader("<p>hello</p>"), inconsistentNode)
- if err == nil {
- t.Errorf("got nil error, want non-nil")
- }
-}
-
-func BenchmarkParser(b *testing.B) {
- buf, err := ioutil.ReadFile("testdata/go1.html")
- if err != nil {
- b.Fatalf("could not read testdata/go1.html: %v", err)
- }
- b.SetBytes(int64(len(buf)))
- runtime.GC()
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Parse(bytes.NewBuffer(buf))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render.go
deleted file mode 100644
index d34564f49..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright 2011 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 file.
-
-package html
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "strings"
-)
-
-type writer interface {
- io.Writer
- io.ByteWriter
- WriteString(string) (int, error)
-}
-
-// Render renders the parse tree n to the given writer.
-//
-// Rendering is done on a 'best effort' basis: calling Parse on the output of
-// Render will always result in something similar to the original tree, but it
-// is not necessarily an exact clone unless the original tree was 'well-formed'.
-// 'Well-formed' is not easily specified; the HTML5 specification is
-// complicated.
-//
-// Calling Parse on arbitrary input typically results in a 'well-formed' parse
-// tree. However, it is possible for Parse to yield a 'badly-formed' parse tree.
-// For example, in a 'well-formed' parse tree, no <a> element is a child of
-// another <a> element: parsing "<a><a>" results in two sibling elements.
-// Similarly, in a 'well-formed' parse tree, no <a> element is a child of a
-// <table> element: parsing "<p><table><a>" results in a <p> with two sibling
-// children; the <a> is reparented to the <table>'s parent. However, calling
-// Parse on "<a><table><a>" does not return an error, but the result has an <a>
-// element with an <a> child, and is therefore not 'well-formed'.
-//
-// Programmatically constructed trees are typically also 'well-formed', but it
-// is possible to construct a tree that looks innocuous but, when rendered and
-// re-parsed, results in a different tree. A simple example is that a solitary
-// text node would become a tree containing <html>, <head> and <body> elements.
-// Another example is that the programmatic equivalent of "a<head>b</head>c"
-// becomes "<html><head><head/><body>abc</body></html>".
-func Render(w io.Writer, n *Node) error {
- if x, ok := w.(writer); ok {
- return render(x, n)
- }
- buf := bufio.NewWriter(w)
- if err := render(buf, n); err != nil {
- return err
- }
- return buf.Flush()
-}
-
-// plaintextAbort is returned from render1 when a <plaintext> element
-// has been rendered. No more end tags should be rendered after that.
-var plaintextAbort = errors.New("html: internal error (plaintext abort)")
-
-func render(w writer, n *Node) error {
- err := render1(w, n)
- if err == plaintextAbort {
- err = nil
- }
- return err
-}
-
-func render1(w writer, n *Node) error {
- // Render non-element nodes; these are the easy cases.
- switch n.Type {
- case ErrorNode:
- return errors.New("html: cannot render an ErrorNode node")
- case TextNode:
- return escape(w, n.Data)
- case DocumentNode:
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if err := render1(w, c); err != nil {
- return err
- }
- }
- return nil
- case ElementNode:
- // No-op.
- case CommentNode:
- if _, err := w.WriteString("<!--"); err != nil {
- return err
- }
- if _, err := w.WriteString(n.Data); err != nil {
- return err
- }
- if _, err := w.WriteString("-->"); err != nil {
- return err
- }
- return nil
- case DoctypeNode:
- if _, err := w.WriteString("<!DOCTYPE "); err != nil {
- return err
- }
- if _, err := w.WriteString(n.Data); err != nil {
- return err
- }
- if n.Attr != nil {
- var p, s string
- for _, a := range n.Attr {
- switch a.Key {
- case "public":
- p = a.Val
- case "system":
- s = a.Val
- }
- }
- if p != "" {
- if _, err := w.WriteString(" PUBLIC "); err != nil {
- return err
- }
- if err := writeQuoted(w, p); err != nil {
- return err
- }
- if s != "" {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- if err := writeQuoted(w, s); err != nil {
- return err
- }
- }
- } else if s != "" {
- if _, err := w.WriteString(" SYSTEM "); err != nil {
- return err
- }
- if err := writeQuoted(w, s); err != nil {
- return err
- }
- }
- }
- return w.WriteByte('>')
- default:
- return errors.New("html: unknown node type")
- }
-
- // Render the <xxx> opening tag.
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if _, err := w.WriteString(n.Data); err != nil {
- return err
- }
- for _, a := range n.Attr {
- if err := w.WriteByte(' '); err != nil {
- return err
- }
- if a.Namespace != "" {
- if _, err := w.WriteString(a.Namespace); err != nil {
- return err
- }
- if err := w.WriteByte(':'); err != nil {
- return err
- }
- }
- if _, err := w.WriteString(a.Key); err != nil {
- return err
- }
- if _, err := w.WriteString(`="`); err != nil {
- return err
- }
- if err := escape(w, a.Val); err != nil {
- return err
- }
- if err := w.WriteByte('"'); err != nil {
- return err
- }
- }
- if voidElements[n.Data] {
- if n.FirstChild != nil {
- return fmt.Errorf("html: void element <%s> has child nodes", n.Data)
- }
- _, err := w.WriteString("/>")
- return err
- }
- if err := w.WriteByte('>'); err != nil {
- return err
- }
-
- // Add initial newline where there is danger of a newline beging ignored.
- if c := n.FirstChild; c != nil && c.Type == TextNode && strings.HasPrefix(c.Data, "\n") {
- switch n.Data {
- case "pre", "listing", "textarea":
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- }
-
- // Render any child nodes.
- switch n.Data {
- case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "xmp":
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if c.Type == TextNode {
- if _, err := w.WriteString(c.Data); err != nil {
- return err
- }
- } else {
- if err := render1(w, c); err != nil {
- return err
- }
- }
- }
- if n.Data == "plaintext" {
- // Don't render anything else. <plaintext> must be the
- // last element in the file, with no closing tag.
- return plaintextAbort
- }
- default:
- for c := n.FirstChild; c != nil; c = c.NextSibling {
- if err := render1(w, c); err != nil {
- return err
- }
- }
- }
-
- // Render the </xxx> closing tag.
- if _, err := w.WriteString("</"); err != nil {
- return err
- }
- if _, err := w.WriteString(n.Data); err != nil {
- return err
- }
- return w.WriteByte('>')
-}
-
-// writeQuoted writes s to w surrounded by quotes. Normally it will use double
-// quotes, but if s contains a double quote, it will use single quotes.
-// It is used for writing the identifiers in a doctype declaration.
-// In valid HTML, they can't contain both types of quotes.
-func writeQuoted(w writer, s string) error {
- var q byte = '"'
- if strings.Contains(s, `"`) {
- q = '\''
- }
- if err := w.WriteByte(q); err != nil {
- return err
- }
- if _, err := w.WriteString(s); err != nil {
- return err
- }
- if err := w.WriteByte(q); err != nil {
- return err
- }
- return nil
-}
-
-// Section 12.1.2, "Elements", gives this list of void elements. Void elements
-// are those that can't have any contents.
-var voidElements = map[string]bool{
- "area": true,
- "base": true,
- "br": true,
- "col": true,
- "command": true,
- "embed": true,
- "hr": true,
- "img": true,
- "input": true,
- "keygen": true,
- "link": true,
- "meta": true,
- "param": true,
- "source": true,
- "track": true,
- "wbr": true,
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render_test.go
deleted file mode 100644
index 11da54b31..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/render_test.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "bytes"
- "testing"
-)
-
-func TestRenderer(t *testing.T) {
- nodes := [...]*Node{
- 0: {
- Type: ElementNode,
- Data: "html",
- },
- 1: {
- Type: ElementNode,
- Data: "head",
- },
- 2: {
- Type: ElementNode,
- Data: "body",
- },
- 3: {
- Type: TextNode,
- Data: "0<1",
- },
- 4: {
- Type: ElementNode,
- Data: "p",
- Attr: []Attribute{
- {
- Key: "id",
- Val: "A",
- },
- {
- Key: "foo",
- Val: `abc"def`,
- },
- },
- },
- 5: {
- Type: TextNode,
- Data: "2",
- },
- 6: {
- Type: ElementNode,
- Data: "b",
- Attr: []Attribute{
- {
- Key: "empty",
- Val: "",
- },
- },
- },
- 7: {
- Type: TextNode,
- Data: "3",
- },
- 8: {
- Type: ElementNode,
- Data: "i",
- Attr: []Attribute{
- {
- Key: "backslash",
- Val: `\`,
- },
- },
- },
- 9: {
- Type: TextNode,
- Data: "&4",
- },
- 10: {
- Type: TextNode,
- Data: "5",
- },
- 11: {
- Type: ElementNode,
- Data: "blockquote",
- },
- 12: {
- Type: ElementNode,
- Data: "br",
- },
- 13: {
- Type: TextNode,
- Data: "6",
- },
- }
-
- // Build a tree out of those nodes, based on a textual representation.
- // Only the ".\t"s are significant. The trailing HTML-like text is
- // just commentary. The "0:" prefixes are for easy cross-reference with
- // the nodes array.
- treeAsText := [...]string{
- 0: `<html>`,
- 1: `. <head>`,
- 2: `. <body>`,
- 3: `. . "0&lt;1"`,
- 4: `. . <p id="A" foo="abc&#34;def">`,
- 5: `. . . "2"`,
- 6: `. . . <b empty="">`,
- 7: `. . . . "3"`,
- 8: `. . . <i backslash="\">`,
- 9: `. . . . "&amp;4"`,
- 10: `. . "5"`,
- 11: `. . <blockquote>`,
- 12: `. . <br>`,
- 13: `. . "6"`,
- }
- if len(nodes) != len(treeAsText) {
- t.Fatal("len(nodes) != len(treeAsText)")
- }
- var stack [8]*Node
- for i, line := range treeAsText {
- level := 0
- for line[0] == '.' {
- // Strip a leading ".\t".
- line = line[2:]
- level++
- }
- n := nodes[i]
- if level == 0 {
- if stack[0] != nil {
- t.Fatal("multiple root nodes")
- }
- stack[0] = n
- } else {
- stack[level-1].AppendChild(n)
- stack[level] = n
- for i := level + 1; i < len(stack); i++ {
- stack[i] = nil
- }
- }
- // At each stage of tree construction, we check all nodes for consistency.
- for j, m := range nodes {
- if err := checkNodeConsistency(m); err != nil {
- t.Fatalf("i=%d, j=%d: %v", i, j, err)
- }
- }
- }
-
- want := `<html><head></head><body>0&lt;1<p id="A" foo="abc&#34;def">` +
- `2<b empty="">3</b><i backslash="\">&amp;4</i></p>` +
- `5<blockquote></blockquote><br/>6</body></html>`
- b := new(bytes.Buffer)
- if err := Render(b, nodes[0]); err != nil {
- t.Fatal(err)
- }
- if got := b.String(); got != want {
- t.Errorf("got vs want:\n%s\n%s\n", got, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/go1.html b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/go1.html
deleted file mode 100644
index d238257c3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/go1.html
+++ /dev/null
@@ -1,2237 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
- <title>Go 1 Release Notes - The Go Programming Language</title>
-
-<link type="text/css" rel="stylesheet" href="/doc/style.css">
-<script type="text/javascript" src="/doc/godocs.js"></script>
-
-<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" />
-
-<script type="text/javascript">
-var _gaq = _gaq || [];
-_gaq.push(["_setAccount", "UA-11222381-2"]);
-_gaq.push(["_trackPageview"]);
-</script>
-</head>
-<body>
-
-<div id="topbar"><div class="container wide">
-
-<form method="GET" action="/search">
-<div id="menu">
-<a href="/doc/">Documents</a>
-<a href="/ref/">References</a>
-<a href="/pkg/">Packages</a>
-<a href="/project/">The Project</a>
-<a href="/help/">Help</a>
-<input type="text" id="search" name="q" class="inactive" value="Search">
-</div>
-<div id="heading"><a href="/">The Go Programming Language</a></div>
-</form>
-
-</div></div>
-
-<div id="page" class="wide">
-
-
- <div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
- <h1>Go 1 Release Notes</h1>
-
-
-
-
-<div id="nav"></div>
-
-
-
-
-<h2 id="introduction">Introduction to Go 1</h2>
-
-<p>
-Go version 1, Go 1 for short, defines a language and a set of core libraries
-that provide a stable foundation for creating reliable products, projects, and
-publications.
-</p>
-
-<p>
-The driving motivation for Go 1 is stability for its users. People should be able to
-write Go programs and expect that they will continue to compile and run without
-change, on a time scale of years, including in production environments such as
-Google App Engine. Similarly, people should be able to write books about Go, be
-able to say which version of Go the book is describing, and have that version
-number still be meaningful much later.
-</p>
-
-<p>
-Code that compiles in Go 1 should, with few exceptions, continue to compile and
-run throughout the lifetime of that version, even as we issue updates and bug
-fixes such as Go version 1.1, 1.2, and so on. Other than critical fixes, changes
-made to the language and library for subsequent releases of Go 1 may
-add functionality but will not break existing Go 1 programs.
-<a href="go1compat.html">The Go 1 compatibility document</a>
-explains the compatibility guidelines in more detail.
-</p>
-
-<p>
-Go 1 is a representation of Go as it used today, not a wholesale rethinking of
-the language. We avoided designing new features and instead focused on cleaning
-up problems and inconsistencies and improving portability. There are a number
-changes to the Go language and packages that we had considered for some time and
-prototyped but not released primarily because they are significant and
-backwards-incompatible. Go 1 was an opportunity to get them out, which is
-helpful for the long term, but also means that Go 1 introduces incompatibilities
-for old programs. Fortunately, the <code>go</code> <code>fix</code> tool can
-automate much of the work needed to bring programs up to the Go 1 standard.
-</p>
-
-<p>
-This document outlines the major changes in Go 1 that will affect programmers
-updating existing code; its reference point is the prior release, r60 (tagged as
-r60.3). It also explains how to update code from r60 to run under Go 1.
-</p>
-
-<h2 id="language">Changes to the language</h2>
-
-<h3 id="append">Append</h3>
-
-<p>
-The <code>append</code> predeclared variadic function makes it easy to grow a slice
-by adding elements to the end.
-A common use is to add bytes to the end of a byte slice when generating output.
-However, <code>append</code> did not provide a way to append a string to a <code>[]byte</code>,
-which is another common case.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/greeting := ..byte/` `/append.*hello/`}}
---> greeting := []byte{}
- greeting = append(greeting, []byte(&#34;hello &#34;)...)</pre>
-
-<p>
-By analogy with the similar property of <code>copy</code>, Go 1
-permits a string to be appended (byte-wise) directly to a byte
-slice, reducing the friction between strings and byte slices.
-The conversion is no longer necessary:
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/append.*world/`}}
---> greeting = append(greeting, &#34;world&#34;...)</pre>
-
-<p>
-<em>Updating</em>:
-This is a new feature, so existing code needs no changes.
-</p>
-
-<h3 id="close">Close</h3>
-
-<p>
-The <code>close</code> predeclared function provides a mechanism
-for a sender to signal that no more values will be sent.
-It is important to the implementation of <code>for</code> <code>range</code>
-loops over channels and is helpful in other situations.
-Partly by design and partly because of race conditions that can occur otherwise,
-it is intended for use only by the goroutine sending on the channel,
-not by the goroutine receiving data.
-However, before Go 1 there was no compile-time checking that <code>close</code>
-was being used correctly.
-</p>
-
-<p>
-To close this gap, at least in part, Go 1 disallows <code>close</code> on receive-only channels.
-Attempting to close such a channel is a compile-time error.
-</p>
-
-<pre>
- var c chan int
- var csend chan&lt;- int = c
- var crecv &lt;-chan int = c
- close(c) // legal
- close(csend) // legal
- close(crecv) // illegal
-</pre>
-
-<p>
-<em>Updating</em>:
-Existing code that attempts to close a receive-only channel was
-erroneous even before Go 1 and should be fixed. The compiler will
-now reject such code.
-</p>
-
-<h3 id="literals">Composite literals</h3>
-
-<p>
-In Go 1, a composite literal of array, slice, or map type can elide the
-type specification for the elements' initializers if they are of pointer type.
-All four of the initializations in this example are legal; the last one was illegal before Go 1.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/type Date struct/` `/STOP/`}}
---> type Date struct {
- month string
- day int
- }
- <span class="comment">// Struct values, fully qualified; always legal.</span>
- holiday1 := []Date{
- Date{&#34;Feb&#34;, 14},
- Date{&#34;Nov&#34;, 11},
- Date{&#34;Dec&#34;, 25},
- }
- <span class="comment">// Struct values, type name elided; always legal.</span>
- holiday2 := []Date{
- {&#34;Feb&#34;, 14},
- {&#34;Nov&#34;, 11},
- {&#34;Dec&#34;, 25},
- }
- <span class="comment">// Pointers, fully qualified, always legal.</span>
- holiday3 := []*Date{
- &amp;Date{&#34;Feb&#34;, 14},
- &amp;Date{&#34;Nov&#34;, 11},
- &amp;Date{&#34;Dec&#34;, 25},
- }
- <span class="comment">// Pointers, type name elided; legal in Go 1.</span>
- holiday4 := []*Date{
- {&#34;Feb&#34;, 14},
- {&#34;Nov&#34;, 11},
- {&#34;Dec&#34;, 25},
- }</pre>
-
-<p>
-<em>Updating</em>:
-This change has no effect on existing code, but the command
-<code>gofmt</code> <code>-s</code> applied to existing source
-will, among other things, elide explicit element types wherever permitted.
-</p>
-
-
-<h3 id="init">Goroutines during init</h3>
-
-<p>
-The old language defined that <code>go</code> statements executed during initialization created goroutines but that they did not begin to run until initialization of the entire program was complete.
-This introduced clumsiness in many places and, in effect, limited the utility
-of the <code>init</code> construct:
-if it was possible for another package to use the library during initialization, the library
-was forced to avoid goroutines.
-This design was done for reasons of simplicity and safety but,
-as our confidence in the language grew, it seemed unnecessary.
-Running goroutines during initialization is no more complex or unsafe than running them during normal execution.
-</p>
-
-<p>
-In Go 1, code that uses goroutines can be called from
-<code>init</code> routines and global initialization expressions
-without introducing a deadlock.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/PackageGlobal/` `/^}/`}}
--->var PackageGlobal int
-
-func init() {
- c := make(chan int)
- go initializationFunction(c)
- PackageGlobal = &lt;-c
-}</pre>
-
-<p>
-<em>Updating</em>:
-This is a new feature, so existing code needs no changes,
-although it's possible that code that depends on goroutines not starting before <code>main</code> will break.
-There was no such code in the standard repository.
-</p>
-
-<h3 id="rune">The rune type</h3>
-
-<p>
-The language spec allows the <code>int</code> type to be 32 or 64 bits wide, but current implementations set <code>int</code> to 32 bits even on 64-bit platforms.
-It would be preferable to have <code>int</code> be 64 bits on 64-bit platforms.
-(There are important consequences for indexing large slices.)
-However, this change would waste space when processing Unicode characters with
-the old language because the <code>int</code> type was also used to hold Unicode code points: each code point would waste an extra 32 bits of storage if <code>int</code> grew from 32 bits to 64.
-</p>
-
-<p>
-To make changing to 64-bit <code>int</code> feasible,
-Go 1 introduces a new basic type, <code>rune</code>, to represent
-individual Unicode code points.
-It is an alias for <code>int32</code>, analogous to <code>byte</code>
-as an alias for <code>uint8</code>.
-</p>
-
-<p>
-Character literals such as <code>'a'</code>, <code>'語'</code>, and <code>'\u0345'</code>
-now have default type <code>rune</code>,
-analogous to <code>1.0</code> having default type <code>float64</code>.
-A variable initialized to a character constant will therefore
-have type <code>rune</code> unless otherwise specified.
-</p>
-
-<p>
-Libraries have been updated to use <code>rune</code> rather than <code>int</code>
-when appropriate. For instance, the functions <code>unicode.ToLower</code> and
-relatives now take and return a <code>rune</code>.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/STARTRUNE/` `/ENDRUNE/`}}
---> delta := &#39;δ&#39; <span class="comment">// delta has type rune.</span>
- var DELTA rune
- DELTA = unicode.ToUpper(delta)
- epsilon := unicode.ToLower(DELTA + 1)
- if epsilon != &#39;δ&#39;+1 {
- log.Fatal(&#34;inconsistent casing for Greek&#34;)
- }</pre>
-
-<p>
-<em>Updating</em>:
-Most source code will be unaffected by this because the type inference from
-<code>:=</code> initializers introduces the new type silently, and it propagates
-from there.
-Some code may get type errors that a trivial conversion will resolve.
-</p>
-
-<h3 id="error">The error type</h3>
-
-<p>
-Go 1 introduces a new built-in type, <code>error</code>, which has the following definition:
-</p>
-
-<pre>
- type error interface {
- Error() string
- }
-</pre>
-
-<p>
-Since the consequences of this type are all in the package library,
-it is discussed <a href="#errors">below</a>.
-</p>
-
-<h3 id="delete">Deleting from maps</h3>
-
-<p>
-In the old language, to delete the entry with key <code>k</code> from map <code>m</code>, one wrote the statement,
-</p>
-
-<pre>
- m[k] = value, false
-</pre>
-
-<p>
-This syntax was a peculiar special case, the only two-to-one assignment.
-It required passing a value (usually ignored) that is evaluated but discarded,
-plus a boolean that was nearly always the constant <code>false</code>.
-It did the job but was odd and a point of contention.
-</p>
-
-<p>
-In Go 1, that syntax has gone; instead there is a new built-in
-function, <code>delete</code>. The call
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/delete\(m, k\)/`}}
---> delete(m, k)</pre>
-
-<p>
-will delete the map entry retrieved by the expression <code>m[k]</code>.
-There is no return value. Deleting a non-existent entry is a no-op.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will convert expressions of the form <code>m[k] = value,
-false</code> into <code>delete(m, k)</code> when it is clear that
-the ignored value can be safely discarded from the program and
-<code>false</code> refers to the predefined boolean constant.
-The fix tool
-will flag other uses of the syntax for inspection by the programmer.
-</p>
-
-<h3 id="iteration">Iterating in maps</h3>
-
-<p>
-The old language specification did not define the order of iteration for maps,
-and in practice it differed across hardware platforms.
-This caused tests that iterated over maps to be fragile and non-portable, with the
-unpleasant property that a test might always pass on one machine but break on another.
-</p>
-
-<p>
-In Go 1, the order in which elements are visited when iterating
-over a map using a <code>for</code> <code>range</code> statement
-is defined to be unpredictable, even if the same loop is run multiple
-times with the same map.
-Code should not assume that the elements are visited in any particular order.
-</p>
-
-<p>
-This change means that code that depends on iteration order is very likely to break early and be fixed long before it becomes a problem.
-Just as important, it allows the map implementation to ensure better map balancing even when programs are using range loops to select an element from a map.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/Sunday/` `/^ }/`}}
---> m := map[string]int{&#34;Sunday&#34;: 0, &#34;Monday&#34;: 1}
- for name, value := range m {
- <span class="comment">// This loop should not assume Sunday will be visited first.</span>
- f(name, value)
- }</pre>
-
-<p>
-<em>Updating</em>:
-This is one change where tools cannot help. Most existing code
-will be unaffected, but some programs may break or misbehave; we
-recommend manual checking of all range statements over maps to
-verify they do not depend on iteration order. There were a few such
-examples in the standard repository; they have been fixed.
-Note that it was already incorrect to depend on the iteration order, which
-was unspecified. This change codifies the unpredictability.
-</p>
-
-<h3 id="multiple_assignment">Multiple assignment</h3>
-
-<p>
-The language specification has long guaranteed that in assignments
-the right-hand-side expressions are all evaluated before any left-hand-side expressions are assigned.
-To guarantee predictable behavior,
-Go 1 refines the specification further.
-</p>
-
-<p>
-If the left-hand side of the assignment
-statement contains expressions that require evaluation, such as
-function calls or array indexing operations, these will all be done
-using the usual left-to-right rule before any variables are assigned
-their value. Once everything is evaluated, the actual assignments
-proceed in left-to-right order.
-</p>
-
-<p>
-These examples illustrate the behavior.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/sa :=/` `/then sc.0. = 2/`}}
---> sa := []int{1, 2, 3}
- i := 0
- i, sa[i] = 1, 2 <span class="comment">// sets i = 1, sa[0] = 2</span>
-
- sb := []int{1, 2, 3}
- j := 0
- sb[j], j = 2, 1 <span class="comment">// sets sb[0] = 2, j = 1</span>
-
- sc := []int{1, 2, 3}
- sc[0], sc[0] = 1, 2 <span class="comment">// sets sc[0] = 1, then sc[0] = 2 (so sc[0] = 2 at end)</span></pre>
-
-<p>
-<em>Updating</em>:
-This is one change where tools cannot help, but breakage is unlikely.
-No code in the standard repository was broken by this change, and code
-that depended on the previous unspecified behavior was already incorrect.
-</p>
-
-<h3 id="shadowing">Returns and shadowed variables</h3>
-
-<p>
-A common mistake is to use <code>return</code> (without arguments) after an assignment to a variable that has the same name as a result variable but is not the same variable.
-This situation is called <em>shadowing</em>: the result variable has been shadowed by another variable with the same name declared in an inner scope.
-</p>
-
-<p>
-In functions with named return values,
-the Go 1 compilers disallow return statements without arguments if any of the named return values is shadowed at the point of the return statement.
-(It isn't part of the specification, because this is one area we are still exploring;
-the situation is analogous to the compilers rejecting functions that do not end with an explicit return statement.)
-</p>
-
-<p>
-This function implicitly returns a shadowed return value and will be rejected by the compiler:
-</p>
-
-<pre>
- func Bug() (i, j, k int) {
- for i = 0; i &lt; 5; i++ {
- for j := 0; j &lt; 5; j++ { // Redeclares j.
- k += i*j
- if k > 100 {
- return // Rejected: j is shadowed here.
- }
- }
- }
- return // OK: j is not shadowed here.
- }
-</pre>
-
-<p>
-<em>Updating</em>:
-Code that shadows return values in this way will be rejected by the compiler and will need to be fixed by hand.
-The few cases that arose in the standard repository were mostly bugs.
-</p>
-
-<h3 id="unexported">Copying structs with unexported fields</h3>
-
-<p>
-The old language did not allow a package to make a copy of a struct value containing unexported fields belonging to a different package.
-There was, however, a required exception for a method receiver;
-also, the implementations of <code>copy</code> and <code>append</code> have never honored the restriction.
-</p>
-
-<p>
-Go 1 will allow packages to copy struct values containing unexported fields from other packages.
-Besides resolving the inconsistency,
-this change admits a new kind of API: a package can return an opaque value without resorting to a pointer or interface.
-The new implementations of <code>time.Time</code> and
-<code>reflect.Value</code> are examples of types taking advantage of this new property.
-</p>
-
-<p>
-As an example, if package <code>p</code> includes the definitions,
-</p>
-
-<pre>
- type Struct struct {
- Public int
- secret int
- }
- func NewStruct(a int) Struct { // Note: not a pointer.
- return Struct{a, f(a)}
- }
- func (s Struct) String() string {
- return fmt.Sprintf("{%d (secret %d)}", s.Public, s.secret)
- }
-</pre>
-
-<p>
-a package that imports <code>p</code> can assign and copy values of type
-<code>p.Struct</code> at will.
-Behind the scenes the unexported fields will be assigned and copied just
-as if they were exported,
-but the client code will never be aware of them. The code
-</p>
-
-<pre>
- import "p"
-
- myStruct := p.NewStruct(23)
- copyOfMyStruct := myStruct
- fmt.Println(myStruct, copyOfMyStruct)
-</pre>
-
-<p>
-will show that the secret field of the struct has been copied to the new value.
-</p>
-
-<p>
-<em>Updating</em>:
-This is a new feature, so existing code needs no changes.
-</p>
-
-<h3 id="equality">Equality</h3>
-
-<p>
-Before Go 1, the language did not define equality on struct and array values.
-This meant,
-among other things, that structs and arrays could not be used as map keys.
-On the other hand, Go did define equality on function and map values.
-Function equality was problematic in the presence of closures
-(when are two closures equal?)
-while map equality compared pointers, not the maps' content, which was usually
-not what the user would want.
-</p>
-
-<p>
-Go 1 addressed these issues.
-First, structs and arrays can be compared for equality and inequality
-(<code>==</code> and <code>!=</code>),
-and therefore be used as map keys,
-provided they are composed from elements for which equality is also defined,
-using element-wise comparison.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/type Day struct/` `/Printf/`}}
---> type Day struct {
- long string
- short string
- }
- Christmas := Day{&#34;Christmas&#34;, &#34;XMas&#34;}
- Thanksgiving := Day{&#34;Thanksgiving&#34;, &#34;Turkey&#34;}
- holiday := map[Day]bool{
- Christmas: true,
- Thanksgiving: true,
- }
- fmt.Printf(&#34;Christmas is a holiday: %t\n&#34;, holiday[Christmas])</pre>
-
-<p>
-Second, Go 1 removes the definition of equality for function values,
-except for comparison with <code>nil</code>.
-Finally, map equality is gone too, also except for comparison with <code>nil</code>.
-</p>
-
-<p>
-Note that equality is still undefined for slices, for which the
-calculation is in general infeasible. Also note that the ordered
-comparison operators (<code>&lt;</code> <code>&lt;=</code>
-<code>&gt;</code> <code>&gt;=</code>) are still undefined for
-structs and arrays.
-
-<p>
-<em>Updating</em>:
-Struct and array equality is a new feature, so existing code needs no changes.
-Existing code that depends on function or map equality will be
-rejected by the compiler and will need to be fixed by hand.
-Few programs will be affected, but the fix may require some
-redesign.
-</p>
-
-<h2 id="packages">The package hierarchy</h2>
-
-<p>
-Go 1 addresses many deficiencies in the old standard library and
-cleans up a number of packages, making them more internally consistent
-and portable.
-</p>
-
-<p>
-This section describes how the packages have been rearranged in Go 1.
-Some have moved, some have been renamed, some have been deleted.
-New packages are described in later sections.
-</p>
-
-<h3 id="hierarchy">The package hierarchy</h3>
-
-<p>
-Go 1 has a rearranged package hierarchy that groups related items
-into subdirectories. For instance, <code>utf8</code> and
-<code>utf16</code> now occupy subdirectories of <code>unicode</code>.
-Also, <a href="#subrepo">some packages</a> have moved into
-subrepositories of
-<a href="http://code.google.com/p/go"><code>code.google.com/p/go</code></a>
-while <a href="#deleted">others</a> have been deleted outright.
-</p>
-
-<table class="codetable" frame="border" summary="Moved packages">
-<colgroup align="left" width="60%"></colgroup>
-<colgroup align="left" width="40%"></colgroup>
-<tr>
-<th align="left">Old path</th>
-<th align="left">New path</th>
-</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>asn1</td> <td>encoding/asn1</td></tr>
-<tr><td>csv</td> <td>encoding/csv</td></tr>
-<tr><td>gob</td> <td>encoding/gob</td></tr>
-<tr><td>json</td> <td>encoding/json</td></tr>
-<tr><td>xml</td> <td>encoding/xml</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>exp/template/html</td> <td>html/template</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>big</td> <td>math/big</td></tr>
-<tr><td>cmath</td> <td>math/cmplx</td></tr>
-<tr><td>rand</td> <td>math/rand</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>http</td> <td>net/http</td></tr>
-<tr><td>http/cgi</td> <td>net/http/cgi</td></tr>
-<tr><td>http/fcgi</td> <td>net/http/fcgi</td></tr>
-<tr><td>http/httptest</td> <td>net/http/httptest</td></tr>
-<tr><td>http/pprof</td> <td>net/http/pprof</td></tr>
-<tr><td>mail</td> <td>net/mail</td></tr>
-<tr><td>rpc</td> <td>net/rpc</td></tr>
-<tr><td>rpc/jsonrpc</td> <td>net/rpc/jsonrpc</td></tr>
-<tr><td>smtp</td> <td>net/smtp</td></tr>
-<tr><td>url</td> <td>net/url</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>exec</td> <td>os/exec</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>scanner</td> <td>text/scanner</td></tr>
-<tr><td>tabwriter</td> <td>text/tabwriter</td></tr>
-<tr><td>template</td> <td>text/template</td></tr>
-<tr><td>template/parse</td> <td>text/template/parse</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>utf8</td> <td>unicode/utf8</td></tr>
-<tr><td>utf16</td> <td>unicode/utf16</td></tr>
-</table>
-
-<p>
-Note that the package names for the old <code>cmath</code> and
-<code>exp/template/html</code> packages have changed to <code>cmplx</code>
-and <code>template</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update all imports and package renames for packages that
-remain inside the standard repository. Programs that import packages
-that are no longer in the standard repository will need to be edited
-by hand.
-</p>
-
-<h3 id="exp">The package tree exp</h3>
-
-<p>
-Because they are not standardized, the packages under the <code>exp</code> directory will not be available in the
-standard Go 1 release distributions, although they will be available in source code form
-in <a href="http://code.google.com/p/go/">the repository</a> for
-developers who wish to use them.
-</p>
-
-<p>
-Several packages have moved under <code>exp</code> at the time of Go 1's release:
-</p>
-
-<ul>
-<li><code>ebnf</code></li>
-<li><code>html</code><sup>&#8224;</sup></li>
-<li><code>go/types</code></li>
-</ul>
-
-<p>
-(<sup>&#8224;</sup>The <code>EscapeString</code> and <code>UnescapeString</code> types remain
-in package <code>html</code>.)
-</p>
-
-<p>
-All these packages are available under the same names, with the prefix <code>exp/</code>: <code>exp/ebnf</code> etc.
-</p>
-
-<p>
-Also, the <code>utf8.String</code> type has been moved to its own package, <code>exp/utf8string</code>.
-</p>
-
-<p>
-Finally, the <code>gotype</code> command now resides in <code>exp/gotype</code>, while
-<code>ebnflint</code> is now in <code>exp/ebnflint</code>.
-If they are installed, they now reside in <code>$GOROOT/bin/tool</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses packages in <code>exp</code> will need to be updated by hand,
-or else compiled from an installation that has <code>exp</code> available.
-The <code>go</code> <code>fix</code> tool or the compiler will complain about such uses.
-</p>
-
-<h3 id="old">The package tree old</h3>
-
-<p>
-Because they are deprecated, the packages under the <code>old</code> directory will not be available in the
-standard Go 1 release distributions, although they will be available in source code form for
-developers who wish to use them.
-</p>
-
-<p>
-The packages in their new locations are:
-</p>
-
-<ul>
-<li><code>old/netchan</code></li>
-<li><code>old/regexp</code></li>
-<li><code>old/template</code></li>
-</ul>
-
-<p>
-<em>Updating</em>:
-Code that uses packages now in <code>old</code> will need to be updated by hand,
-or else compiled from an installation that has <code>old</code> available.
-The <code>go</code> <code>fix</code> tool will warn about such uses.
-</p>
-
-<h3 id="deleted">Deleted packages</h3>
-
-<p>
-Go 1 deletes several packages outright:
-</p>
-
-<ul>
-<li><code>container/vector</code></li>
-<li><code>exp/datafmt</code></li>
-<li><code>go/typechecker</code></li>
-<li><code>try</code></li>
-</ul>
-
-<p>
-and also the command <code>gotry</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses <code>container/vector</code> should be updated to use
-slices directly. See
-<a href="http://code.google.com/p/go-wiki/wiki/SliceTricks">the Go
-Language Community Wiki</a> for some suggestions.
-Code that uses the other packages (there should be almost zero) will need to be rethought.
-</p>
-
-<h3 id="subrepo">Packages moving to subrepositories</h3>
-
-<p>
-Go 1 has moved a number of packages into other repositories, usually sub-repositories of
-<a href="http://code.google.com/p/go/">the main Go repository</a>.
-This table lists the old and new import paths:
-
-<table class="codetable" frame="border" summary="Sub-repositories">
-<colgroup align="left" width="40%"></colgroup>
-<colgroup align="left" width="60%"></colgroup>
-<tr>
-<th align="left">Old</th>
-<th align="left">New</th>
-</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>crypto/bcrypt</td> <td>code.google.com/p/go.crypto/bcrypt</tr>
-<tr><td>crypto/blowfish</td> <td>code.google.com/p/go.crypto/blowfish</tr>
-<tr><td>crypto/cast5</td> <td>code.google.com/p/go.crypto/cast5</tr>
-<tr><td>crypto/md4</td> <td>code.google.com/p/go.crypto/md4</tr>
-<tr><td>crypto/ocsp</td> <td>code.google.com/p/go.crypto/ocsp</tr>
-<tr><td>crypto/openpgp</td> <td>code.google.com/p/go.crypto/openpgp</tr>
-<tr><td>crypto/openpgp/armor</td> <td>code.google.com/p/go.crypto/openpgp/armor</tr>
-<tr><td>crypto/openpgp/elgamal</td> <td>code.google.com/p/go.crypto/openpgp/elgamal</tr>
-<tr><td>crypto/openpgp/errors</td> <td>code.google.com/p/go.crypto/openpgp/errors</tr>
-<tr><td>crypto/openpgp/packet</td> <td>code.google.com/p/go.crypto/openpgp/packet</tr>
-<tr><td>crypto/openpgp/s2k</td> <td>code.google.com/p/go.crypto/openpgp/s2k</tr>
-<tr><td>crypto/ripemd160</td> <td>code.google.com/p/go.crypto/ripemd160</tr>
-<tr><td>crypto/twofish</td> <td>code.google.com/p/go.crypto/twofish</tr>
-<tr><td>crypto/xtea</td> <td>code.google.com/p/go.crypto/xtea</tr>
-<tr><td>exp/ssh</td> <td>code.google.com/p/go.crypto/ssh</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>image/bmp</td> <td>code.google.com/p/go.image/bmp</tr>
-<tr><td>image/tiff</td> <td>code.google.com/p/go.image/tiff</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>net/dict</td> <td>code.google.com/p/go.net/dict</tr>
-<tr><td>net/websocket</td> <td>code.google.com/p/go.net/websocket</tr>
-<tr><td>exp/spdy</td> <td>code.google.com/p/go.net/spdy</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>encoding/git85</td> <td>code.google.com/p/go.codereview/git85</tr>
-<tr><td>patch</td> <td>code.google.com/p/go.codereview/patch</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>exp/wingui</td> <td>code.google.com/p/gowingui</tr>
-</table>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update imports of these packages to use the new import paths.
-Installations that depend on these packages will need to install them using
-a <code>go get</code> command.
-</p>
-
-<h2 id="major">Major changes to the library</h2>
-
-<p>
-This section describes significant changes to the core libraries, the ones that
-affect the most programs.
-</p>
-
-<h3 id="errors">The error type and errors package</h3>
-
-<p>
-The placement of <code>os.Error</code> in package <code>os</code> is mostly historical: errors first came up when implementing package <code>os</code>, and they seemed system-related at the time.
-Since then it has become clear that errors are more fundamental than the operating system. For example, it would be nice to use <code>Errors</code> in packages that <code>os</code> depends on, like <code>syscall</code>.
-Also, having <code>Error</code> in <code>os</code> introduces many dependencies on <code>os</code> that would otherwise not exist.
-</p>
-
-<p>
-Go 1 solves these problems by introducing a built-in <code>error</code> interface type and a separate <code>errors</code> package (analogous to <code>bytes</code> and <code>strings</code>) that contains utility functions.
-It replaces <code>os.NewError</code> with
-<a href="/pkg/errors/#New"><code>errors.New</code></a>,
-giving errors a more central place in the environment.
-</p>
-
-<p>
-So the widely-used <code>String</code> method does not cause accidental satisfaction
-of the <code>error</code> interface, the <code>error</code> interface uses instead
-the name <code>Error</code> for that method:
-</p>
-
-<pre>
- type error interface {
- Error() string
- }
-</pre>
-
-<p>
-The <code>fmt</code> library automatically invokes <code>Error</code>, as it already
-does for <code>String</code>, for easy printing of error values.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/START ERROR EXAMPLE/` `/END ERROR EXAMPLE/`}}
--->type SyntaxError struct {
- File string
- Line int
- Message string
-}
-
-func (se *SyntaxError) Error() string {
- return fmt.Sprintf(&#34;%s:%d: %s&#34;, se.File, se.Line, se.Message)
-}</pre>
-
-<p>
-All standard packages have been updated to use the new interface; the old <code>os.Error</code> is gone.
-</p>
-
-<p>
-A new package, <a href="/pkg/errors/"><code>errors</code></a>, contains the function
-</p>
-
-<pre>
-func New(text string) error
-</pre>
-
-<p>
-to turn a string into an error. It replaces the old <code>os.NewError</code>.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/ErrSyntax/`}}
---> var ErrSyntax = errors.New(&#34;syntax error&#34;)</pre>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
-Code that defines error types with a <code>String</code> method will need to be updated
-by hand to rename the methods to <code>Error</code>.
-</p>
-
-<h3 id="errno">System call errors</h3>
-
-<p>
-The old <code>syscall</code> package, which predated <code>os.Error</code>
-(and just about everything else),
-returned errors as <code>int</code> values.
-In turn, the <code>os</code> package forwarded many of these errors, such
-as <code>EINVAL</code>, but using a different set of errors on each platform.
-This behavior was unpleasant and unportable.
-</p>
-
-<p>
-In Go 1, the
-<a href="/pkg/syscall/"><code>syscall</code></a>
-package instead returns an <code>error</code> for system call errors.
-On Unix, the implementation is done by a
-<a href="/pkg/syscall/#Errno"><code>syscall.Errno</code></a> type
-that satisfies <code>error</code> and replaces the old <code>os.Errno</code>.
-</p>
-
-<p>
-The changes affecting <code>os.EINVAL</code> and relatives are
-described <a href="#os">elsewhere</a>.
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
-Regardless, most code should use the <code>os</code> package
-rather than <code>syscall</code> and so will be unaffected.
-</p>
-
-<h3 id="time">Time</h3>
-
-<p>
-Time is always a challenge to support well in a programming language.
-The old Go <code>time</code> package had <code>int64</code> units, no
-real type safety,
-and no distinction between absolute times and durations.
-</p>
-
-<p>
-One of the most sweeping changes in the Go 1 library is therefore a
-complete redesign of the
-<a href="/pkg/time/"><code>time</code></a> package.
-Instead of an integer number of nanoseconds as an <code>int64</code>,
-and a separate <code>*time.Time</code> type to deal with human
-units such as hours and years,
-there are now two fundamental types:
-<a href="/pkg/time/#Time"><code>time.Time</code></a>
-(a value, so the <code>*</code> is gone), which represents a moment in time;
-and <a href="/pkg/time/#Duration"><code>time.Duration</code></a>,
-which represents an interval.
-Both have nanosecond resolution.
-A <code>Time</code> can represent any time into the ancient
-past and remote future, while a <code>Duration</code> can
-span plus or minus only about 290 years.
-There are methods on these types, plus a number of helpful
-predefined constant durations such as <code>time.Second</code>.
-</p>
-
-<p>
-Among the new methods are things like
-<a href="/pkg/time/#Time.Add"><code>Time.Add</code></a>,
-which adds a <code>Duration</code> to a <code>Time</code>, and
-<a href="/pkg/time/#Time.Sub"><code>Time.Sub</code></a>,
-which subtracts two <code>Times</code> to yield a <code>Duration</code>.
-</p>
-
-<p>
-The most important semantic change is that the Unix epoch (Jan 1, 1970) is now
-relevant only for those functions and methods that mention Unix:
-<a href="/pkg/time/#Unix"><code>time.Unix</code></a>
-and the <a href="/pkg/time/#Time.Unix"><code>Unix</code></a>
-and <a href="/pkg/time/#Time.UnixNano"><code>UnixNano</code></a> methods
-of the <code>Time</code> type.
-In particular,
-<a href="/pkg/time/#Now"><code>time.Now</code></a>
-returns a <code>time.Time</code> value rather than, in the old
-API, an integer nanosecond count since the Unix epoch.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/sleepUntil/` `/^}/`}}
---><span class="comment">// sleepUntil sleeps until the specified time. It returns immediately if it&#39;s too late.</span>
-func sleepUntil(wakeup time.Time) {
- now := time.Now() <span class="comment">// A Time.</span>
- if !wakeup.After(now) {
- return
- }
- delta := wakeup.Sub(now) <span class="comment">// A Duration.</span>
- fmt.Printf(&#34;Sleeping for %.3fs\n&#34;, delta.Seconds())
- time.Sleep(delta)
-}</pre>
-
-<p>
-The new types, methods, and constants have been propagated through
-all the standard packages that use time, such as <code>os</code> and
-its representation of file time stamps.
-</p>
-
-<p>
-<em>Updating</em>:
-The <code>go</code> <code>fix</code> tool will update many uses of the old <code>time</code> package to use the new
-types and methods, although it does not replace values such as <code>1e9</code>
-representing nanoseconds per second.
-Also, because of type changes in some of the values that arise,
-some of the expressions rewritten by the fix tool may require
-further hand editing; in such cases the rewrite will include
-the correct function or method for the old functionality, but
-may have the wrong type or require further analysis.
-</p>
-
-<h2 id="minor">Minor changes to the library</h2>
-
-<p>
-This section describes smaller changes, such as those to less commonly
-used packages or that affect
-few programs beyond the need to run <code>go</code> <code>fix</code>.
-This category includes packages that are new in Go 1.
-Collectively they improve portability, regularize behavior, and
-make the interfaces more modern and Go-like.
-</p>
-
-<h3 id="archive_zip">The archive/zip package</h3>
-
-<p>
-In Go 1, <a href="/pkg/archive/zip/#Writer"><code>*zip.Writer</code></a> no
-longer has a <code>Write</code> method. Its presence was a mistake.
-</p>
-
-<p>
-<em>Updating</em>:
-What little code is affected will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="bufio">The bufio package</h3>
-
-<p>
-In Go 1, <a href="/pkg/bufio/#NewReaderSize"><code>bufio.NewReaderSize</code></a>
-and
-<a href="/pkg/bufio/#NewWriterSize"><code>bufio.NewWriterSize</code></a>
-functions no longer return an error for invalid sizes.
-If the argument size is too small or invalid, it is adjusted.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update calls that assign the error to _.
-Calls that aren't fixed will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="compress">The compress/flate, compress/gzip and compress/zlib packages</h3>
-
-<p>
-In Go 1, the <code>NewWriterXxx</code> functions in
-<a href="/pkg/compress/flate"><code>compress/flate</code></a>,
-<a href="/pkg/compress/gzip"><code>compress/gzip</code></a> and
-<a href="/pkg/compress/zlib"><code>compress/zlib</code></a>
-all return <code>(*Writer, error)</code> if they take a compression level,
-and <code>*Writer</code> otherwise. Package <code>gzip</code>'s
-<code>Compressor</code> and <code>Decompressor</code> types have been renamed
-to <code>Writer</code> and <code>Reader</code>. Package <code>flate</code>'s
-<code>WrongValueError</code> type has been removed.
-</p>
-
-<p>
-<em>Updating</em>
-Running <code>go</code> <code>fix</code> will update old names and calls that assign the error to _.
-Calls that aren't fixed will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="crypto_aes_des">The crypto/aes and crypto/des packages</h3>
-
-<p>
-In Go 1, the <code>Reset</code> method has been removed. Go does not guarantee
-that memory is not copied and therefore this method was misleading.
-</p>
-
-<p>
-The cipher-specific types <code>*aes.Cipher</code>, <code>*des.Cipher</code>,
-and <code>*des.TripleDESCipher</code> have been removed in favor of
-<code>cipher.Block</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Remove the calls to Reset. Replace uses of the specific cipher types with
-cipher.Block.
-</p>
-
-<h3 id="crypto_elliptic">The crypto/elliptic package</h3>
-
-<p>
-In Go 1, <a href="/pkg/crypto/elliptic/#Curve"><code>elliptic.Curve</code></a>
-has been made an interface to permit alternative implementations. The curve
-parameters have been moved to the
-<a href="/pkg/crypto/elliptic/#CurveParams"><code>elliptic.CurveParams</code></a>
-structure.
-</p>
-
-<p>
-<em>Updating</em>:
-Existing users of <code>*elliptic.Curve</code> will need to change to
-simply <code>elliptic.Curve</code>. Calls to <code>Marshal</code>,
-<code>Unmarshal</code> and <code>GenerateKey</code> are now functions
-in <code>crypto/elliptic</code> that take an <code>elliptic.Curve</code>
-as their first argument.
-</p>
-
-<h3 id="crypto_hmac">The crypto/hmac package</h3>
-
-<p>
-In Go 1, the hash-specific functions, such as <code>hmac.NewMD5</code>, have
-been removed from <code>crypto/hmac</code>. Instead, <code>hmac.New</code> takes
-a function that returns a <code>hash.Hash</code>, such as <code>md5.New</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will perform the needed changes.
-</p>
-
-<h3 id="crypto_x509">The crypto/x509 package</h3>
-
-<p>
-In Go 1, the
-<a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
-and
-<a href="/pkg/crypto/x509/#CreateCRL"><code>CreateCRL</code></a>
-functions in <code>crypto/x509</code> have been altered to take an
-<code>interface{}</code> where they previously took a <code>*rsa.PublicKey</code>
-or <code>*rsa.PrivateKey</code>. This will allow other public key algorithms
-to be implemented in the future.
-</p>
-
-<p>
-<em>Updating</em>:
-No changes will be needed.
-</p>
-
-<h3 id="encoding_binary">The encoding/binary package</h3>
-
-<p>
-In Go 1, the <code>binary.TotalSize</code> function has been replaced by
-<a href="/pkg/encoding/binary/#Size"><code>Size</code></a>,
-which takes an <code>interface{}</code> argument rather than
-a <code>reflect.Value</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-What little code is affected will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="encoding_xml">The encoding/xml package</h3>
-
-<p>
-In Go 1, the <a href="/pkg/encoding/xml/"><code>xml</code></a> package
-has been brought closer in design to the other marshaling packages such
-as <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>.
-</p>
-
-<p>
-The old <code>Parser</code> type is renamed
-<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> and has a new
-<a href="/pkg/encoding/xml/#Decoder.Decode"><code>Decode</code></a> method. An
-<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a> type was also introduced.
-</p>
-
-<p>
-The functions <a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a>
-and <a href="/pkg/encoding/xml/#Unmarshal"><code>Unmarshal</code></a>
-work with <code>[]byte</code> values now. To work with streams,
-use the new <a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a>
-and <a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> types.
-</p>
-
-<p>
-When marshaling or unmarshaling values, the format of supported flags in
-field tags has changed to be closer to the
-<a href="/pkg/encoding/json"><code>json</code></a> package
-(<code>`xml:"name,flag"`</code>). The matching done between field tags, field
-names, and the XML attribute and element names is now case-sensitive.
-The <code>XMLName</code> field tag, if present, must also match the name
-of the XML element being marshaled.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update most uses of the package except for some calls to
-<code>Unmarshal</code>. Special care must be taken with field tags,
-since the fix tool will not update them and if not fixed by hand they will
-misbehave silently in some cases. For example, the old
-<code>"attr"</code> is now written <code>",attr"</code> while plain
-<code>"attr"</code> remains valid but with a different meaning.
-</p>
-
-<h3 id="expvar">The expvar package</h3>
-
-<p>
-In Go 1, the <code>RemoveAll</code> function has been removed.
-The <code>Iter</code> function and Iter method on <code>*Map</code> have
-been replaced by
-<a href="/pkg/expvar/#Do"><code>Do</code></a>
-and
-<a href="/pkg/expvar/#Map.Do"><code>(*Map).Do</code></a>.
-</p>
-
-<p>
-<em>Updating</em>:
-Most code using <code>expvar</code> will not need changing. The rare code that used
-<code>Iter</code> can be updated to pass a closure to <code>Do</code> to achieve the same effect.
-</p>
-
-<h3 id="flag">The flag package</h3>
-
-<p>
-In Go 1, the interface <a href="/pkg/flag/#Value"><code>flag.Value</code></a> has changed slightly.
-The <code>Set</code> method now returns an <code>error</code> instead of
-a <code>bool</code> to indicate success or failure.
-</p>
-
-<p>
-There is also a new kind of flag, <code>Duration</code>, to support argument
-values specifying time intervals.
-Values for such flags must be given units, just as <code>time.Duration</code>
-formats them: <code>10s</code>, <code>1h30m</code>, etc.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/timeout/`}}
--->var timeout = flag.Duration(&#34;timeout&#34;, 30*time.Second, &#34;how long to wait for completion&#34;)</pre>
-
-<p>
-<em>Updating</em>:
-Programs that implement their own flags will need minor manual fixes to update their
-<code>Set</code> methods.
-The <code>Duration</code> flag is new and affects no existing code.
-</p>
-
-
-<h3 id="go">The go/* packages</h3>
-
-<p>
-Several packages under <code>go</code> have slightly revised APIs.
-</p>
-
-<p>
-A concrete <code>Mode</code> type was introduced for configuration mode flags
-in the packages
-<a href="/pkg/go/scanner/"><code>go/scanner</code></a>,
-<a href="/pkg/go/parser/"><code>go/parser</code></a>,
-<a href="/pkg/go/printer/"><code>go/printer</code></a>, and
-<a href="/pkg/go/doc/"><code>go/doc</code></a>.
-</p>
-
-<p>
-The modes <code>AllowIllegalChars</code> and <code>InsertSemis</code> have been removed
-from the <a href="/pkg/go/scanner/"><code>go/scanner</code></a> package. They were mostly
-useful for scanning text other then Go source files. Instead, the
-<a href="/pkg/text/scanner/"><code>text/scanner</code></a> package should be used
-for that purpose.
-</p>
-
-<p>
-The <a href="/pkg/go/scanner/#ErrorHandler"><code>ErrorHandler</code></a> provided
-to the scanner's <a href="/pkg/go/scanner/#Scanner.Init"><code>Init</code></a> method is
-now simply a function rather than an interface. The <code>ErrorVector</code> type has
-been removed in favor of the (existing) <a href="/pkg/go/scanner/#ErrorList"><code>ErrorList</code></a>
-type, and the <code>ErrorVector</code> methods have been migrated. Instead of embedding
-an <code>ErrorVector</code> in a client of the scanner, now a client should maintain
-an <code>ErrorList</code>.
-</p>
-
-<p>
-The set of parse functions provided by the <a href="/pkg/go/parser/"><code>go/parser</code></a>
-package has been reduced to the primary parse function
-<a href="/pkg/go/parser/#ParseFile"><code>ParseFile</code></a>, and a couple of
-convenience functions <a href="/pkg/go/parser/#ParseDir"><code>ParseDir</code></a>
-and <a href="/pkg/go/parser/#ParseExpr"><code>ParseExpr</code></a>.
-</p>
-
-<p>
-The <a href="/pkg/go/printer/"><code>go/printer</code></a> package supports an additional
-configuration mode <a href="/pkg/go/printer/#Mode"><code>SourcePos</code></a>;
-if set, the printer will emit <code>//line</code> comments such that the generated
-output contains the original source code position information. The new type
-<a href="/pkg/go/printer/#CommentedNode"><code>CommentedNode</code></a> can be
-used to provide comments associated with an arbitrary
-<a href="/pkg/go/ast/#Node"><code>ast.Node</code></a> (until now only
-<a href="/pkg/go/ast/#File"><code>ast.File</code></a> carried comment information).
-</p>
-
-<p>
-The type names of the <a href="/pkg/go/doc/"><code>go/doc</code></a> package have been
-streamlined by removing the <code>Doc</code> suffix: <code>PackageDoc</code>
-is now <code>Package</code>, <code>ValueDoc</code> is <code>Value</code>, etc.
-Also, all types now consistently have a <code>Name</code> field (or <code>Names</code>,
-in the case of type <code>Value</code>) and <code>Type.Factories</code> has become
-<code>Type.Funcs</code>.
-Instead of calling <code>doc.NewPackageDoc(pkg, importpath)</code>,
-documentation for a package is created with:
-</p>
-
-<pre>
- doc.New(pkg, importpath, mode)
-</pre>
-
-<p>
-where the new <code>mode</code> parameter specifies the operation mode:
-if set to <a href="/pkg/go/doc/#AllDecls"><code>AllDecls</code></a>, all declarations
-(not just exported ones) are considered.
-The function <code>NewFileDoc</code> was removed, and the function
-<code>CommentText</code> has become the method
-<a href="/pkg/go/ast/#Text"><code>Text</code></a> of
-<a href="/pkg/go/ast/#CommentGroup"><code>ast.CommentGroup</code></a>.
-</p>
-
-<p>
-In package <a href="/pkg/go/token/"><code>go/token</code></a>, the
-<a href="/pkg/go/token/#FileSet"><code>token.FileSet</code></a> method <code>Files</code>
-(which originally returned a channel of <code>*token.File</code>s) has been replaced
-with the iterator <a href="/pkg/go/token/#FileSet.Iterate"><code>Iterate</code></a> that
-accepts a function argument instead.
-</p>
-
-<p>
-In package <a href="/pkg/go/build/"><code>go/build</code></a>, the API
-has been nearly completely replaced.
-The package still computes Go package information
-but it does not run the build: the <code>Cmd</code> and <code>Script</code>
-types are gone.
-(To build code, use the new
-<a href="/cmd/go/"><code>go</code></a> command instead.)
-The <code>DirInfo</code> type is now named
-<a href="/pkg/go/build/#Package"><code>Package</code></a>.
-<code>FindTree</code> and <code>ScanDir</code> are replaced by
-<a href="/pkg/go/build/#Import"><code>Import</code></a>
-and
-<a href="/pkg/go/build/#ImportDir"><code>ImportDir</code></a>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses packages in <code>go</code> will have to be updated by hand; the
-compiler will reject incorrect uses. Templates used in conjunction with any of the
-<code>go/doc</code> types may need manual fixes; the renamed fields will lead
-to run-time errors.
-</p>
-
-<h3 id="hash">The hash package</h3>
-
-<p>
-In Go 1, the definition of <a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> includes
-a new method, <code>BlockSize</code>. This new method is used primarily in the
-cryptographic libraries.
-</p>
-
-<p>
-The <code>Sum</code> method of the
-<a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> interface now takes a
-<code>[]byte</code> argument, to which the hash value will be appended.
-The previous behavior can be recreated by adding a <code>nil</code> argument to the call.
-</p>
-
-<p>
-<em>Updating</em>:
-Existing implementations of <code>hash.Hash</code> will need to add a
-<code>BlockSize</code> method. Hashes that process the input one byte at
-a time can implement <code>BlockSize</code> to return 1.
-Running <code>go</code> <code>fix</code> will update calls to the <code>Sum</code> methods of the various
-implementations of <code>hash.Hash</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Since the package's functionality is new, no updating is necessary.
-</p>
-
-<h3 id="http">The http package</h3>
-
-<p>
-In Go 1 the <a href="/pkg/net/http/"><code>http</code></a> package is refactored,
-putting some of the utilities into a
-<a href="/pkg/net/http/httputil/"><code>httputil</code></a> subdirectory.
-These pieces are only rarely needed by HTTP clients.
-The affected items are:
-</p>
-
-<ul>
-<li>ClientConn</li>
-<li>DumpRequest</li>
-<li>DumpRequestOut</li>
-<li>DumpResponse</li>
-<li>NewChunkedReader</li>
-<li>NewChunkedWriter</li>
-<li>NewClientConn</li>
-<li>NewProxyClientConn</li>
-<li>NewServerConn</li>
-<li>NewSingleHostReverseProxy</li>
-<li>ReverseProxy</li>
-<li>ServerConn</li>
-</ul>
-
-<p>
-The <code>Request.RawURL</code> field has been removed; it was a
-historical artifact.
-</p>
-
-<p>
-The <code>Handle</code> and <code>HandleFunc</code>
-functions, and the similarly-named methods of <code>ServeMux</code>,
-now panic if an attempt is made to register the same pattern twice.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update the few programs that are affected except for
-uses of <code>RawURL</code>, which must be fixed by hand.
-</p>
-
-<h3 id="image">The image package</h3>
-
-<p>
-The <a href="/pkg/image/"><code>image</code></a> package has had a number of
-minor changes, rearrangements and renamings.
-</p>
-
-<p>
-Most of the color handling code has been moved into its own package,
-<a href="/pkg/image/color/"><code>image/color</code></a>.
-For the elements that moved, a symmetry arises; for instance,
-each pixel of an
-<a href="/pkg/image/#RGBA"><code>image.RGBA</code></a>
-is a
-<a href="/pkg/image/color/#RGBA"><code>color.RGBA</code></a>.
-</p>
-
-<p>
-The old <code>image/ycbcr</code> package has been folded, with some
-renamings, into the
-<a href="/pkg/image/"><code>image</code></a>
-and
-<a href="/pkg/image/color/"><code>image/color</code></a>
-packages.
-</p>
-
-<p>
-The old <code>image.ColorImage</code> type is still in the <code>image</code>
-package but has been renamed
-<a href="/pkg/image/#Uniform"><code>image.Uniform</code></a>,
-while <code>image.Tiled</code> has been removed.
-</p>
-
-<p>
-This table lists the renamings.
-</p>
-
-<table class="codetable" frame="border" summary="image renames">
-<colgroup align="left" width="50%"></colgroup>
-<colgroup align="left" width="50%"></colgroup>
-<tr>
-<th align="left">Old</th>
-<th align="left">New</th>
-</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>image.Color</td> <td>color.Color</td></tr>
-<tr><td>image.ColorModel</td> <td>color.Model</td></tr>
-<tr><td>image.ColorModelFunc</td> <td>color.ModelFunc</td></tr>
-<tr><td>image.PalettedColorModel</td> <td>color.Palette</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>image.RGBAColor</td> <td>color.RGBA</td></tr>
-<tr><td>image.RGBA64Color</td> <td>color.RGBA64</td></tr>
-<tr><td>image.NRGBAColor</td> <td>color.NRGBA</td></tr>
-<tr><td>image.NRGBA64Color</td> <td>color.NRGBA64</td></tr>
-<tr><td>image.AlphaColor</td> <td>color.Alpha</td></tr>
-<tr><td>image.Alpha16Color</td> <td>color.Alpha16</td></tr>
-<tr><td>image.GrayColor</td> <td>color.Gray</td></tr>
-<tr><td>image.Gray16Color</td> <td>color.Gray16</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>image.RGBAColorModel</td> <td>color.RGBAModel</td></tr>
-<tr><td>image.RGBA64ColorModel</td> <td>color.RGBA64Model</td></tr>
-<tr><td>image.NRGBAColorModel</td> <td>color.NRGBAModel</td></tr>
-<tr><td>image.NRGBA64ColorModel</td> <td>color.NRGBA64Model</td></tr>
-<tr><td>image.AlphaColorModel</td> <td>color.AlphaModel</td></tr>
-<tr><td>image.Alpha16ColorModel</td> <td>color.Alpha16Model</td></tr>
-<tr><td>image.GrayColorModel</td> <td>color.GrayModel</td></tr>
-<tr><td>image.Gray16ColorModel</td> <td>color.Gray16Model</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>ycbcr.RGBToYCbCr</td> <td>color.RGBToYCbCr</td></tr>
-<tr><td>ycbcr.YCbCrToRGB</td> <td>color.YCbCrToRGB</td></tr>
-<tr><td>ycbcr.YCbCrColorModel</td> <td>color.YCbCrModel</td></tr>
-<tr><td>ycbcr.YCbCrColor</td> <td>color.YCbCr</td></tr>
-<tr><td>ycbcr.YCbCr</td> <td>image.YCbCr</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>ycbcr.SubsampleRatio444</td> <td>image.YCbCrSubsampleRatio444</td></tr>
-<tr><td>ycbcr.SubsampleRatio422</td> <td>image.YCbCrSubsampleRatio422</td></tr>
-<tr><td>ycbcr.SubsampleRatio420</td> <td>image.YCbCrSubsampleRatio420</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>image.ColorImage</td> <td>image.Uniform</td></tr>
-</table>
-
-<p>
-The image package's <code>New</code> functions
-(<a href="/pkg/image/#NewRGBA"><code>NewRGBA</code></a>,
-<a href="/pkg/image/#NewRGBA64"><code>NewRGBA64</code></a>, etc.)
-take an <a href="/pkg/image/#Rectangle"><code>image.Rectangle</code></a> as an argument
-instead of four integers.
-</p>
-
-<p>
-Finally, there are new predefined <code>color.Color</code> variables
-<a href="/pkg/image/color/#Black"><code>color.Black</code></a>,
-<a href="/pkg/image/color/#White"><code>color.White</code></a>,
-<a href="/pkg/image/color/#Opaque"><code>color.Opaque</code></a>
-and
-<a href="/pkg/image/color/#Transparent"><code>color.Transparent</code></a>.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
-</p>
-
-<h3 id="log_syslog">The log/syslog package</h3>
-
-<p>
-In Go 1, the <a href="/pkg/log/syslog/#NewLogger"><code>syslog.NewLogger</code></a>
-function returns an error as well as a <code>log.Logger</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-What little code is affected will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="mime">The mime package</h3>
-
-<p>
-In Go 1, the <a href="/pkg/mime/#FormatMediaType"><code>FormatMediaType</code></a> function
-of the <code>mime</code> package has been simplified to make it
-consistent with
-<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>.
-It now takes <code>"text/html"</code> rather than <code>"text"</code> and <code>"html"</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-What little code is affected will be caught by the compiler and must be updated by hand.
-</p>
-
-<h3 id="net">The net package</h3>
-
-<p>
-In Go 1, the various <code>SetTimeout</code>,
-<code>SetReadTimeout</code>, and <code>SetWriteTimeout</code> methods
-have been replaced with
-<a href="/pkg/net/#IPConn.SetDeadline"><code>SetDeadline</code></a>,
-<a href="/pkg/net/#IPConn.SetReadDeadline"><code>SetReadDeadline</code></a>, and
-<a href="/pkg/net/#IPConn.SetWriteDeadline"><code>SetWriteDeadline</code></a>,
-respectively. Rather than taking a timeout value in nanoseconds that
-apply to any activity on the connection, the new methods set an
-absolute deadline (as a <code>time.Time</code> value) after which
-reads and writes will time out and no longer block.
-</p>
-
-<p>
-There are also new functions
-<a href="/pkg/net/#DialTimeout"><code>net.DialTimeout</code></a>
-to simplify timing out dialing a network address and
-<a href="/pkg/net/#ListenMulticastUDP"><code>net.ListenMulticastUDP</code></a>
-to allow multicast UDP to listen concurrently across multiple listeners.
-The <code>net.ListenMulticastUDP</code> function replaces the old
-<code>JoinGroup</code> and <code>LeaveGroup</code> methods.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses the old methods will fail to compile and must be updated by hand.
-The semantic change makes it difficult for the fix tool to update automatically.
-</p>
-
-<h3 id="os">The os package</h3>
-
-<p>
-The <code>Time</code> function has been removed; callers should use
-the <a href="/pkg/time/#Time"><code>Time</code></a> type from the
-<code>time</code> package.
-</p>
-
-<p>
-The <code>Exec</code> function has been removed; callers should use
-<code>Exec</code> from the <code>syscall</code> package, where available.
-</p>
-
-<p>
-The <code>ShellExpand</code> function has been renamed to <a
-href="/pkg/os/#ExpandEnv"><code>ExpandEnv</code></a>.
-</p>
-
-<p>
-The <a href="/pkg/os/#NewFile"><code>NewFile</code></a> function
-now takes a <code>uintptr</code> fd, instead of an <code>int</code>.
-The <a href="/pkg/os/#File.Fd"><code>Fd</code></a> method on files now
-also returns a <code>uintptr</code>.
-</p>
-
-<p>
-There are no longer error constants such as <code>EINVAL</code>
-in the <code>os</code> package, since the set of values varied with
-the underlying operating system. There are new portable functions like
-<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>
-to test common error properties, plus a few new error values
-with more Go-like names, such as
-<a href="/pkg/os/#ErrPermission"><code>ErrPermission</code></a>
-and
-<a href="/pkg/os/#ErrNoEnv"><code>ErrNoEnv</code></a>.
-</p>
-
-<p>
-The <code>Getenverror</code> function has been removed. To distinguish
-between a non-existent environment variable and an empty string,
-use <a href="/pkg/os/#Environ"><code>os.Environ</code></a> or
-<a href="/pkg/syscall/#Getenv"><code>syscall.Getenv</code></a>.
-</p>
-
-
-<p>
-The <a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a> method has
-dropped its option argument and the associated constants are gone
-from the package.
-Also, the function <code>Wait</code> is gone; only the method of
-the <code>Process</code> type persists.
-</p>
-
-<p>
-The <code>Waitmsg</code> type returned by
-<a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a>
-has been replaced with a more portable
-<a href="/pkg/os/#ProcessState"><code>ProcessState</code></a>
-type with accessor methods to recover information about the
-process.
-Because of changes to <code>Wait</code>, the <code>ProcessState</code>
-value always describes an exited process.
-Portability concerns simplified the interface in other ways, but the values returned by the
-<a href="/pkg/os/#ProcessState.Sys"><code>ProcessState.Sys</code></a> and
-<a href="/pkg/os/#ProcessState.SysUsage"><code>ProcessState.SysUsage</code></a>
-methods can be type-asserted to underlying system-specific data structures such as
-<a href="/pkg/syscall/#WaitStatus"><code>syscall.WaitStatus</code></a> and
-<a href="/pkg/syscall/#Rusage"><code>syscall.Rusage</code></a> on Unix.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will drop a zero argument to <code>Process.Wait</code>.
-All other changes will be caught by the compiler and must be updated by hand.
-</p>
-
-<h4 id="os_fileinfo">The os.FileInfo type</h4>
-
-<p>
-Go 1 redefines the <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a> type,
-changing it from a struct to an interface:
-</p>
-
-<pre>
- type FileInfo interface {
- Name() string // base name of the file
- Size() int64 // length in bytes
- Mode() FileMode // file mode bits
- ModTime() time.Time // modification time
- IsDir() bool // abbreviation for Mode().IsDir()
- Sys() interface{} // underlying data source (can return nil)
- }
-</pre>
-
-<p>
-The file mode information has been moved into a subtype called
-<a href="/pkg/os/#FileMode"><code>os.FileMode</code></a>,
-a simple integer type with <code>IsDir</code>, <code>Perm</code>, and <code>String</code>
-methods.
-</p>
-
-<p>
-The system-specific details of file modes and properties such as (on Unix)
-i-number have been removed from <code>FileInfo</code> altogether.
-Instead, each operating system's <code>os</code> package provides an
-implementation of the <code>FileInfo</code> interface, which
-has a <code>Sys</code> method that returns the
-system-specific representation of file metadata.
-For instance, to discover the i-number of a file on a Unix system, unpack
-the <code>FileInfo</code> like this:
-</p>
-
-<pre>
- fi, err := os.Stat("hello.go")
- if err != nil {
- log.Fatal(err)
- }
- // Check that it's a Unix file.
- unixStat, ok := fi.Sys().(*syscall.Stat_t)
- if !ok {
- log.Fatal("hello.go: not a Unix file")
- }
- fmt.Printf("file i-number: %d\n", unixStat.Ino)
-</pre>
-
-<p>
-Assuming (which is unwise) that <code>"hello.go"</code> is a Unix file,
-the i-number expression could be contracted to
-</p>
-
-<pre>
- fi.Sys().(*syscall.Stat_t).Ino
-</pre>
-
-<p>
-The vast majority of uses of <code>FileInfo</code> need only the methods
-of the standard interface.
-</p>
-
-<p>
-The <code>os</code> package no longer contains wrappers for the POSIX errors
-such as <code>ENOENT</code>.
-For the few programs that need to verify particular error conditions, there are
-now the boolean functions
-<a href="/pkg/os/#IsExist"><code>IsExist</code></a>,
-<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a>
-and
-<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/os\.Open/` `/}/`}}
---> f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600)
- if os.IsExist(err) {
- log.Printf(&#34;%s already exists&#34;, name)
- }</pre>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update code that uses the old equivalent of the current <code>os.FileInfo</code>
-and <code>os.FileMode</code> API.
-Code that needs system-specific file details will need to be updated by hand.
-Code that uses the old POSIX error values from the <code>os</code> package
-will fail to compile and will also need to be updated by hand.
-</p>
-
-<h3 id="os_signal">The os/signal package</h3>
-
-<p>
-The <code>os/signal</code> package in Go 1 replaces the
-<code>Incoming</code> function, which returned a channel
-that received all incoming signals,
-with the selective <code>Notify</code> function, which asks
-for delivery of specific signals on an existing channel.
-</p>
-
-<p>
-<em>Updating</em>:
-Code must be updated by hand.
-A literal translation of
-</p>
-<pre>
-c := signal.Incoming()
-</pre>
-<p>
-is
-</p>
-<pre>
-c := make(chan os.Signal)
-signal.Notify(c) // ask for all signals
-</pre>
-<p>
-but most code should list the specific signals it wants to handle instead:
-</p>
-<pre>
-c := make(chan os.Signal)
-signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
-</pre>
-
-<h3 id="path_filepath">The path/filepath package</h3>
-
-<p>
-In Go 1, the <a href="/pkg/path/filepath/#Walk"><code>Walk</code></a> function of the
-<code>path/filepath</code> package
-has been changed to take a function value of type
-<a href="/pkg/path/filepath/#WalkFunc"><code>WalkFunc</code></a>
-instead of a <code>Visitor</code> interface value.
-<code>WalkFunc</code> unifies the handling of both files and directories.
-</p>
-
-<pre>
- type WalkFunc func(path string, info os.FileInfo, err error) error
-</pre>
-
-<p>
-The <code>WalkFunc</code> function will be called even for files or directories that could not be opened;
-in such cases the error argument will describe the failure.
-If a directory's contents are to be skipped,
-the function should return the value <a href="/pkg/path/filepath/#variables"><code>filepath.SkipDir</code></a>
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/STARTWALK/` `/ENDWALK/`}}
---> markFn := func(path string, info os.FileInfo, err error) error {
- if path == &#34;pictures&#34; { <span class="comment">// Will skip walking of directory pictures and its contents.</span>
- return filepath.SkipDir
- }
- if err != nil {
- return err
- }
- log.Println(path)
- return nil
- }
- err := filepath.Walk(&#34;.&#34;, markFn)
- if err != nil {
- log.Fatal(err)
- }</pre>
-
-<p>
-<em>Updating</em>:
-The change simplifies most code but has subtle consequences, so affected programs
-will need to be updated by hand.
-The compiler will catch code using the old interface.
-</p>
-
-<h3 id="regexp">The regexp package</h3>
-
-<p>
-The <a href="/pkg/regexp/"><code>regexp</code></a> package has been rewritten.
-It has the same interface but the specification of the regular expressions
-it supports has changed from the old "egrep" form to that of
-<a href="http://code.google.com/p/re2/">RE2</a>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses the package should have its regular expressions checked by hand.
-</p>
-
-<h3 id="runtime">The runtime package</h3>
-
-<p>
-In Go 1, much of the API exported by package
-<code>runtime</code> has been removed in favor of
-functionality provided by other packages.
-Code using the <code>runtime.Type</code> interface
-or its specific concrete type implementations should
-now use package <a href="/pkg/reflect/"><code>reflect</code></a>.
-Code using <code>runtime.Semacquire</code> or <code>runtime.Semrelease</code>
-should use channels or the abstractions in package <a href="/pkg/sync/"><code>sync</code></a>.
-The <code>runtime.Alloc</code>, <code>runtime.Free</code>,
-and <code>runtime.Lookup</code> functions, an unsafe API created for
-debugging the memory allocator, have no replacement.
-</p>
-
-<p>
-Before, <code>runtime.MemStats</code> was a global variable holding
-statistics about memory allocation, and calls to <code>runtime.UpdateMemStats</code>
-ensured that it was up to date.
-In Go 1, <code>runtime.MemStats</code> is a struct type, and code should use
-<a href="/pkg/runtime/#ReadMemStats"><code>runtime.ReadMemStats</code></a>
-to obtain the current statistics.
-</p>
-
-<p>
-The package adds a new function,
-<a href="/pkg/runtime/#NumCPU"><code>runtime.NumCPU</code></a>, that returns the number of CPUs available
-for parallel execution, as reported by the operating system kernel.
-Its value can inform the setting of <code>GOMAXPROCS</code>.
-The <code>runtime.Cgocalls</code> and <code>runtime.Goroutines</code> functions
-have been renamed to <code>runtime.NumCgoCall</code> and <code>runtime.NumGoroutine</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update code for the function renamings.
-Other code will need to be updated by hand.
-</p>
-
-<h3 id="strconv">The strconv package</h3>
-
-<p>
-In Go 1, the
-<a href="/pkg/strconv/"><code>strconv</code></a>
-package has been significantly reworked to make it more Go-like and less C-like,
-although <code>Atoi</code> lives on (it's similar to
-<code>int(ParseInt(x, 10, 0))</code>, as does
-<code>Itoa(x)</code> (<code>FormatInt(int64(x), 10)</code>).
-There are also new variants of some of the functions that append to byte slices rather than
-return strings, to allow control over allocation.
-</p>
-
-<p>
-This table summarizes the renamings; see the
-<a href="/pkg/strconv/">package documentation</a>
-for full details.
-</p>
-
-<table class="codetable" frame="border" summary="strconv renames">
-<colgroup align="left" width="50%"></colgroup>
-<colgroup align="left" width="50%"></colgroup>
-<tr>
-<th align="left">Old call</th>
-<th align="left">New call</th>
-</tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Atob(x)</td> <td>ParseBool(x)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Atof32(x)</td> <td>ParseFloat(x, 32)§</td></tr>
-<tr><td>Atof64(x)</td> <td>ParseFloat(x, 64)</td></tr>
-<tr><td>AtofN(x, n)</td> <td>ParseFloat(x, n)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Atoi(x)</td> <td>Atoi(x)</td></tr>
-<tr><td>Atoi(x)</td> <td>ParseInt(x, 10, 0)§</td></tr>
-<tr><td>Atoi64(x)</td> <td>ParseInt(x, 10, 64)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Atoui(x)</td> <td>ParseUint(x, 10, 0)§</td></tr>
-<tr><td>Atoui64(x)</td> <td>ParseUint(x, 10, 64)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Btoi64(x, b)</td> <td>ParseInt(x, b, 64)</td></tr>
-<tr><td>Btoui64(x, b)</td> <td>ParseUint(x, b, 64)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Btoa(x)</td> <td>FormatBool(x)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Ftoa32(x, f, p)</td> <td>FormatFloat(float64(x), f, p, 32)</td></tr>
-<tr><td>Ftoa64(x, f, p)</td> <td>FormatFloat(x, f, p, 64)</td></tr>
-<tr><td>FtoaN(x, f, p, n)</td> <td>FormatFloat(x, f, p, n)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Itoa(x)</td> <td>Itoa(x)</td></tr>
-<tr><td>Itoa(x)</td> <td>FormatInt(int64(x), 10)</td></tr>
-<tr><td>Itoa64(x)</td> <td>FormatInt(x, 10)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Itob(x, b)</td> <td>FormatInt(int64(x), b)</td></tr>
-<tr><td>Itob64(x, b)</td> <td>FormatInt(x, b)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Uitoa(x)</td> <td>FormatUint(uint64(x), 10)</td></tr>
-<tr><td>Uitoa64(x)</td> <td>FormatUint(x, 10)</td></tr>
-<tr>
-<td colspan="2"><hr></td>
-</tr>
-<tr><td>Uitob(x, b)</td> <td>FormatUint(uint64(x), b)</td></tr>
-<tr><td>Uitob64(x, b)</td> <td>FormatUint(x, b)</td></tr>
-</table>
-
-<p>
-<em>Updating</em>:
-Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
-<br>
-§ <code>Atoi</code> persists but <code>Atoui</code> and <code>Atof32</code> do not, so
-they may require
-a cast that must be added by hand; the <code>go</code> <code>fix</code> tool will warn about it.
-</p>
-
-
-<h3 id="templates">The template packages</h3>
-
-<p>
-The <code>template</code> and <code>exp/template/html</code> packages have moved to
-<a href="/pkg/text/template/"><code>text/template</code></a> and
-<a href="/pkg/html/template/"><code>html/template</code></a>.
-More significant, the interface to these packages has been simplified.
-The template language is the same, but the concept of "template set" is gone
-and the functions and methods of the packages have changed accordingly,
-often by elimination.
-</p>
-
-<p>
-Instead of sets, a <code>Template</code> object
-may contain multiple named template definitions,
-in effect constructing
-name spaces for template invocation.
-A template can invoke any other template associated with it, but only those
-templates associated with it.
-The simplest way to associate templates is to parse them together, something
-made easier with the new structure of the packages.
-</p>
-
-<p>
-<em>Updating</em>:
-The imports will be updated by fix tool.
-Single-template uses will be otherwise be largely unaffected.
-Code that uses multiple templates in concert will need to be updated by hand.
-The <a href="/pkg/text/template/#examples">examples</a> in
-the documentation for <code>text/template</code> can provide guidance.
-</p>
-
-<h3 id="testing">The testing package</h3>
-
-<p>
-The testing package has a type, <code>B</code>, passed as an argument to benchmark functions.
-In Go 1, <code>B</code> has new methods, analogous to those of <code>T</code>, enabling
-logging and failure reporting.
-</p>
-
-<pre><!--{{code "/doc/progs/go1.go" `/func.*Benchmark/` `/^}/`}}
--->func BenchmarkSprintf(b *testing.B) {
- <span class="comment">// Verify correctness before running benchmark.</span>
- b.StopTimer()
- got := fmt.Sprintf(&#34;%x&#34;, 23)
- const expect = &#34;17&#34;
- if expect != got {
- b.Fatalf(&#34;expected %q; got %q&#34;, expect, got)
- }
- b.StartTimer()
- for i := 0; i &lt; b.N; i++ {
- fmt.Sprintf(&#34;%x&#34;, 23)
- }
-}</pre>
-
-<p>
-<em>Updating</em>:
-Existing code is unaffected, although benchmarks that use <code>println</code>
-or <code>panic</code> should be updated to use the new methods.
-</p>
-
-<h3 id="testing_script">The testing/script package</h3>
-
-<p>
-The testing/script package has been deleted. It was a dreg.
-</p>
-
-<p>
-<em>Updating</em>:
-No code is likely to be affected.
-</p>
-
-<h3 id="unsafe">The unsafe package</h3>
-
-<p>
-In Go 1, the functions
-<code>unsafe.Typeof</code>, <code>unsafe.Reflect</code>,
-<code>unsafe.Unreflect</code>, <code>unsafe.New</code>, and
-<code>unsafe.NewArray</code> have been removed;
-they duplicated safer functionality provided by
-package <a href="/pkg/reflect/"><code>reflect</code></a>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code using these functions must be rewritten to use
-package <a href="/pkg/reflect/"><code>reflect</code></a>.
-The changes to <a href="http://code.google.com/p/go/source/detail?r=2646dc956207">encoding/gob</a> and the <a href="http://code.google.com/p/goprotobuf/source/detail?r=5340ad310031">protocol buffer library</a>
-may be helpful as examples.
-</p>
-
-<h3 id="url">The url package</h3>
-
-<p>
-In Go 1 several fields from the <a href="/pkg/net/url/#URL"><code>url.URL</code></a> type
-were removed or replaced.
-</p>
-
-<p>
-The <a href="/pkg/net/url/#URL.String"><code>String</code></a> method now
-predictably rebuilds an encoded URL string using all of <code>URL</code>'s
-fields as necessary. The resulting string will also no longer have
-passwords escaped.
-</p>
-
-<p>
-The <code>Raw</code> field has been removed. In most cases the <code>String</code>
-method may be used in its place.
-</p>
-
-<p>
-The old <code>RawUserinfo</code> field is replaced by the <code>User</code>
-field, of type <a href="/pkg/net/url/#Userinfo"><code>*net.Userinfo</code></a>.
-Values of this type may be created using the new <a href="/pkg/net/url/#User"><code>net.User</code></a>
-and <a href="/pkg/net/url/#UserPassword"><code>net.UserPassword</code></a>
-functions. The <code>EscapeUserinfo</code> and <code>UnescapeUserinfo</code>
-functions are also gone.
-</p>
-
-<p>
-The <code>RawAuthority</code> field has been removed. The same information is
-available in the <code>Host</code> and <code>User</code> fields.
-</p>
-
-<p>
-The <code>RawPath</code> field and the <code>EncodedPath</code> method have
-been removed. The path information in rooted URLs (with a slash following the
-schema) is now available only in decoded form in the <code>Path</code> field.
-Occasionally, the encoded data may be required to obtain information that
-was lost in the decoding process. These cases must be handled by accessing
-the data the URL was built from.
-</p>
-
-<p>
-URLs with non-rooted paths, such as <code>"mailto:dev@golang.org?subject=Hi"</code>,
-are also handled differently. The <code>OpaquePath</code> boolean field has been
-removed and a new <code>Opaque</code> string field introduced to hold the encoded
-path for such URLs. In Go 1, the cited URL parses as:
-</p>
-
-<pre>
- URL{
- Scheme: "mailto",
- Opaque: "dev@golang.org",
- RawQuery: "subject=Hi",
- }
-</pre>
-
-<p>
-A new <a href="/pkg/net/url/#URL.RequestURI"><code>RequestURI</code></a> method was
-added to <code>URL</code>.
-</p>
-
-<p>
-The <code>ParseWithReference</code> function has been renamed to <code>ParseWithFragment</code>.
-</p>
-
-<p>
-<em>Updating</em>:
-Code that uses the old fields will fail to compile and must be updated by hand.
-The semantic changes make it difficult for the fix tool to update automatically.
-</p>
-
-<h2 id="cmd_go">The go command</h2>
-
-<p>
-Go 1 introduces the <a href="/cmd/go/">go command</a>, a tool for fetching,
-building, and installing Go packages and commands. The <code>go</code> command
-does away with makefiles, instead using Go source code to find dependencies and
-determine build conditions. Most existing Go programs will no longer require
-makefiles to be built.
-</p>
-
-<p>
-See <a href="/doc/code.html">How to Write Go Code</a> for a primer on the
-<code>go</code> command and the <a href="/cmd/go/">go command documentation</a>
-for the full details.
-</p>
-
-<p>
-<em>Updating</em>:
-Projects that depend on the Go project's old makefile-based build
-infrastructure (<code>Make.pkg</code>, <code>Make.cmd</code>, and so on) should
-switch to using the <code>go</code> command for building Go code and, if
-necessary, rewrite their makefiles to perform any auxiliary build tasks.
-</p>
-
-<h2 id="cmd_cgo">The cgo command</h2>
-
-<p>
-In Go 1, the <a href="/cmd/cgo">cgo command</a>
-uses a different <code>_cgo_export.h</code>
-file, which is generated for packages containing <code>//export</code> lines.
-The <code>_cgo_export.h</code> file now begins with the C preamble comment,
-so that exported function definitions can use types defined there.
-This has the effect of compiling the preamble multiple times, so a
-package using <code>//export</code> must not put function definitions
-or variable initializations in the C preamble.
-</p>
-
-<h2 id="releases">Packaged releases</h2>
-
-<p>
-One of the most significant changes associated with Go 1 is the availability
-of prepackaged, downloadable distributions.
-They are available for many combinations of architecture and operating system
-(including Windows) and the list will grow.
-Installation details are described on the
-<a href="/doc/install">Getting Started</a> page, while
-the distributions themselves are listed on the
-<a href="http://code.google.com/p/go/downloads/list">downloads page</a>.
-
-
-</div>
-
-<div id="footer">
-Build version go1.0.1.<br>
-A link <a href="http://code.google.com/policies.html#restrictions">noted</a>,
-and then, coming up on the very next line, we will
-find yet another link, link 3.0 if you will,
-after a few more words <a href="/LINK">link text</a>.<br>
-<a href="/doc/tos.html">Terms of Service</a> |
-<a href="http://www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a>
-</div>
-
-<script type="text/javascript">
-(function() {
- var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
- ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
- var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
-})();
-</script>
-</body>
-<script type="text/javascript">
- (function() {
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- })();
-</script>
-</html>
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/README b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/README
deleted file mode 100644
index 9b4c2d8be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/README
+++ /dev/null
@@ -1,28 +0,0 @@
-The *.dat files in this directory are copied from The WebKit Open Source
-Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources.
-WebKit is licensed under a BSD style license.
-http://webkit.org/coding/bsd-license.html says:
-
-Copyright (C) 2009 Apple Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-2. 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.
-
-THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat
deleted file mode 100644
index 787e1b01e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat
+++ /dev/null
@@ -1,194 +0,0 @@
-#data
-<a><p></a></p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <p>
-| <a>
-
-#data
-<a>1<p>2</a>3</p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <p>
-| <a>
-| "2"
-| "3"
-
-#data
-<a>1<button>2</a>3</button>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <button>
-| <a>
-| "2"
-| "3"
-
-#data
-<a>1<b>2</a>3</b>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <b>
-| "2"
-| <b>
-| "3"
-
-#data
-<a>1<div>2<div>3</a>4</div>5</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <div>
-| <a>
-| "2"
-| <div>
-| <a>
-| "3"
-| "4"
-| "5"
-
-#data
-<table><a>1<p>2</a>3</p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <p>
-| <a>
-| "2"
-| "3"
-| <table>
-
-#data
-<b><b><a><p></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <b>
-| <a>
-| <p>
-| <a>
-
-#data
-<b><a><b><p></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <a>
-| <b>
-| <b>
-| <p>
-| <a>
-
-#data
-<a><b><b><p></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <b>
-| <b>
-| <b>
-| <p>
-| <a>
-
-#data
-<p>1<s id="A">2<b id="B">3</p>4</s>5</b>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| "1"
-| <s>
-| id="A"
-| "2"
-| <b>
-| id="B"
-| "3"
-| <s>
-| id="A"
-| <b>
-| id="B"
-| "4"
-| <b>
-| id="B"
-| "5"
-
-#data
-<table><a>1<td>2</td>3</table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "1"
-| <a>
-| "3"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "2"
-
-#data
-<table>A<td>B</td>C</table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "AC"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "B"
-
-#data
-<a><svg><tr><input></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <svg svg>
-| <svg tr>
-| <svg input>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat
deleted file mode 100644
index d18151b44..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat
+++ /dev/null
@@ -1,31 +0,0 @@
-#data
-<b>1<i>2<p>3</b>4
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "1"
-| <i>
-| "2"
-| <i>
-| <p>
-| <b>
-| "3"
-| "4"
-
-#data
-<a><div><style></style><address><a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <div>
-| <a>
-| <style>
-| <address>
-| <a>
-| <a>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/comments01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/comments01.dat
deleted file mode 100644
index 44f187683..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/comments01.dat
+++ /dev/null
@@ -1,135 +0,0 @@
-#data
-FOO<!-- BAR -->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -->
-| "BAZ"
-
-#data
-FOO<!-- BAR --!>BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -->
-| "BAZ"
-
-#data
-FOO<!-- BAR -- >BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -- >BAZ -->
-
-#data
-FOO<!-- BAR -- <QUX> -- MUX -->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -- <QUX> -- MUX -->
-| "BAZ"
-
-#data
-FOO<!-- BAR -- <QUX> -- MUX --!>BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -- <QUX> -- MUX -->
-| "BAZ"
-
-#data
-FOO<!-- BAR -- <QUX> -- MUX -- >BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- BAR -- <QUX> -- MUX -- >BAZ -->
-
-#data
-FOO<!---->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- -->
-| "BAZ"
-
-#data
-FOO<!--->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- -->
-| "BAZ"
-
-#data
-FOO<!-->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- -->
-| "BAZ"
-
-#data
-<?xml version="1.0">Hi
-#errors
-#document
-| <!-- ?xml version="1.0" -->
-| <html>
-| <head>
-| <body>
-| "Hi"
-
-#data
-<?xml version="1.0">
-#errors
-#document
-| <!-- ?xml version="1.0" -->
-| <html>
-| <head>
-| <body>
-
-#data
-<?xml version
-#errors
-#document
-| <!-- ?xml version -->
-| <html>
-| <head>
-| <body>
-
-#data
-FOO<!----->BAZ
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <!-- - -->
-| "BAZ"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat
deleted file mode 100644
index ae457328a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat
+++ /dev/null
@@ -1,370 +0,0 @@
-#data
-<!DOCTYPE html>Hello
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!dOctYpE HtMl>Hello
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPEhtml>Hello
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE>Hello
-#errors
-#document
-| <!DOCTYPE >
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE >Hello
-#errors
-#document
-| <!DOCTYPE >
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato >Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato taco>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato taco "ddd>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato sYstEM>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato sYstEM >Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato sYstEM ggg>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato SYSTEM taco >Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato SYSTEM 'taco"'>Hello
-#errors
-#document
-| <!DOCTYPE potato "" "taco"">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato SYSTEM "taco">Hello
-#errors
-#document
-| <!DOCTYPE potato "" "taco">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato SYSTEM "tai'co">Hello
-#errors
-#document
-| <!DOCTYPE potato "" "tai'co">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato SYSTEMtaco "ddd">Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato grass SYSTEM taco>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato pUbLIc>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato pUbLIc >Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato pUbLIcgoof>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato PUBLIC goof>Hello
-#errors
-#document
-| <!DOCTYPE potato>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato PUBLIC "go'of">Hello
-#errors
-#document
-| <!DOCTYPE potato "go'of" "">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato PUBLIC 'go'of'>Hello
-#errors
-#document
-| <!DOCTYPE potato "go" "">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato PUBLIC 'go:hh of' >Hello
-#errors
-#document
-| <!DOCTYPE potato "go:hh of" "">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE potato PUBLIC "W3C-//dfdf" SYSTEM ggg>Hello
-#errors
-#document
-| <!DOCTYPE potato "W3C-//dfdf" "">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">Hello
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE ...>Hello
-#errors
-#document
-| <!DOCTYPE ...>
-| <html>
-| <head>
-| <body>
-| "Hello"
-
-#data
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] "uri" [
-<!-- internal declarations -->
-]>
-#errors
-#document
-| <!DOCTYPE root-element>
-| <html>
-| <head>
-| <body>
-| "]>"
-
-#data
-<!DOCTYPE html PUBLIC
- "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
- "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-#errors
-#document
-| <!DOCTYPE html "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE HTML SYSTEM "http://www.w3.org/DTD/HTML4-strict.dtd"><body><b>Mine!</b></body>
-#errors
-#document
-| <!DOCTYPE html "" "http://www.w3.org/DTD/HTML4-strict.dtd">
-| <html>
-| <head>
-| <body>
-| <b>
-| "Mine!"
-
-#data
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE HTML PUBLIC'-//W3C//DTD HTML 4.01//EN''http://www.w3.org/TR/html4/strict.dtd'>
-#errors
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-| <head>
-| <body>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities01.dat
deleted file mode 100644
index c8073b781..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities01.dat
+++ /dev/null
@@ -1,603 +0,0 @@
-#data
-FOO&gt;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO>BAR"
-
-#data
-FOO&gtBAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO>BAR"
-
-#data
-FOO&gt BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO> BAR"
-
-#data
-FOO&gt;;;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO>;;BAR"
-
-#data
-I'm &notit; I tell you
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "I'm ¬it; I tell you"
-
-#data
-I'm &notin; I tell you
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "I'm ∉ I tell you"
-
-#data
-FOO& BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO& BAR"
-
-#data
-FOO&<BAR>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&"
-| <bar>
-
-#data
-FOO&&&&gt;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&&&>BAR"
-
-#data
-FOO&#41;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO)BAR"
-
-#data
-FOO&#x41;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOABAR"
-
-#data
-FOO&#X41;BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOABAR"
-
-#data
-FOO&#BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&#BAR"
-
-#data
-FOO&#ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&#ZOO"
-
-#data
-FOO&#xBAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOºR"
-
-#data
-FOO&#xZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&#xZOO"
-
-#data
-FOO&#XZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO&#XZOO"
-
-#data
-FOO&#41BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO)BAR"
-
-#data
-FOO&#x41BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO䆺R"
-
-#data
-FOO&#x41ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOAZOO"
-
-#data
-FOO&#x0000;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#x0078;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOxZOO"
-
-#data
-FOO&#x0079;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOyZOO"
-
-#data
-FOO&#x0080;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO€ZOO"
-
-#data
-FOO&#x0081;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÂZOO"
-
-#data
-FOO&#x0082;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO‚ZOO"
-
-#data
-FOO&#x0083;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÆ’ZOO"
-
-#data
-FOO&#x0084;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO„ZOO"
-
-#data
-FOO&#x0085;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO…ZOO"
-
-#data
-FOO&#x0086;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO†ZOO"
-
-#data
-FOO&#x0087;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO‡ZOO"
-
-#data
-FOO&#x0088;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOˆZOO"
-
-#data
-FOO&#x0089;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO‰ZOO"
-
-#data
-FOO&#x008A;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÅ ZOO"
-
-#data
-FOO&#x008B;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO‹ZOO"
-
-#data
-FOO&#x008C;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÅ’ZOO"
-
-#data
-FOO&#x008D;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÂZOO"
-
-#data
-FOO&#x008E;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOŽZOO"
-
-#data
-FOO&#x008F;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÂZOO"
-
-#data
-FOO&#x0090;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÂZOO"
-
-#data
-FOO&#x0091;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO‘ZOO"
-
-#data
-FOO&#x0092;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO’ZOO"
-
-#data
-FOO&#x0093;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO“ZOO"
-
-#data
-FOO&#x0094;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOâ€ZOO"
-
-#data
-FOO&#x0095;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO•ZOO"
-
-#data
-FOO&#x0096;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO–ZOO"
-
-#data
-FOO&#x0097;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO—ZOO"
-
-#data
-FOO&#x0098;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOËœZOO"
-
-#data
-FOO&#x0099;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOâ„¢ZOO"
-
-#data
-FOO&#x009A;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÅ¡ZOO"
-
-#data
-FOO&#x009B;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO›ZOO"
-
-#data
-FOO&#x009C;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÅ“ZOO"
-
-#data
-FOO&#x009D;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOÂZOO"
-
-#data
-FOO&#x009E;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOžZOO"
-
-#data
-FOO&#x009F;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOŸZOO"
-
-#data
-FOO&#x00A0;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO ZOO"
-
-#data
-FOO&#xD7FF;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO퟿ZOO"
-
-#data
-FOO&#xD800;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#xD801;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#xDFFE;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#xDFFF;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#xE000;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOZOO"
-
-#data
-FOO&#x10FFFE;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOô¿¾ZOO"
-
-#data
-FOO&#x1087D4;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO􈟔ZOO"
-
-#data
-FOO&#x10FFFF;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOOô¿¿ZOO"
-
-#data
-FOO&#x110000;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
-
-#data
-FOO&#xFFFFFF;ZOO
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO�ZOO"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities02.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities02.dat
deleted file mode 100644
index e2fb42a07..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/entities02.dat
+++ /dev/null
@@ -1,249 +0,0 @@
-#data
-<div bar="ZZ&gt;YY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ>YY"
-
-#data
-<div bar="ZZ&"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&"
-
-#data
-<div bar='ZZ&'></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&"
-
-#data
-<div bar=ZZ&></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&"
-
-#data
-<div bar="ZZ&gt=YY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&gt=YY"
-
-#data
-<div bar="ZZ&gt0YY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&gt0YY"
-
-#data
-<div bar="ZZ&gt9YY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&gt9YY"
-
-#data
-<div bar="ZZ&gtaYY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&gtaYY"
-
-#data
-<div bar="ZZ&gtZYY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&gtZYY"
-
-#data
-<div bar="ZZ&gt YY"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ> YY"
-
-#data
-<div bar="ZZ&gt"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ>"
-
-#data
-<div bar='ZZ&gt'></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ>"
-
-#data
-<div bar=ZZ&gt></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ>"
-
-#data
-<div bar="ZZ&pound_id=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ£_id=23"
-
-#data
-<div bar="ZZ&prod_id=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&prod_id=23"
-
-#data
-<div bar="ZZ&pound;_id=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ£_id=23"
-
-#data
-<div bar="ZZ&prod;_id=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZâˆ_id=23"
-
-#data
-<div bar="ZZ&pound=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&pound=23"
-
-#data
-<div bar="ZZ&prod=23"></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| bar="ZZ&prod=23"
-
-#data
-<div>ZZ&pound_id=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZ£_id=23"
-
-#data
-<div>ZZ&prod_id=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZ&prod_id=23"
-
-#data
-<div>ZZ&pound;_id=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZ£_id=23"
-
-#data
-<div>ZZ&prod;_id=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZâˆ_id=23"
-
-#data
-<div>ZZ&pound=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZ£=23"
-
-#data
-<div>ZZ&prod=23</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "ZZ&prod=23"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat
deleted file mode 100644
index d7cb71db0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat
+++ /dev/null
@@ -1,246 +0,0 @@
-#data
-<div<div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div<div>
-
-#data
-<div foo<bar=''>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| foo<bar=""
-
-#data
-<div foo=`bar`>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| foo="`bar`"
-
-#data
-<div \"foo=''>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| \"foo=""
-
-#data
-<a href='\nbar'></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| href="\nbar"
-
-#data
-<!DOCTYPE html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-&lang;&rang;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "⟨⟩"
-
-#data
-&apos;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "'"
-
-#data
-&ImaginaryI;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "â…ˆ"
-
-#data
-&Kopf;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "ð•‚"
-
-#data
-&notinva;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "∉"
-
-#data
-<?import namespace="foo" implementation="#bar">
-#errors
-#document
-| <!-- ?import namespace="foo" implementation="#bar" -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!--foo--bar-->
-#errors
-#document
-| <!-- foo--bar -->
-| <html>
-| <head>
-| <body>
-
-#data
-<![CDATA[x]]>
-#errors
-#document
-| <!-- [CDATA[x]] -->
-| <html>
-| <head>
-| <body>
-
-#data
-<textarea><!--</textarea>--></textarea>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<!--"
-| "-->"
-
-#data
-<textarea><!--</textarea>-->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<!--"
-| "-->"
-
-#data
-<style><!--</style>--></style>
-#errors
-#document
-| <html>
-| <head>
-| <style>
-| "<!--"
-| <body>
-| "-->"
-
-#data
-<style><!--</style>-->
-#errors
-#document
-| <html>
-| <head>
-| <style>
-| "<!--"
-| <body>
-| "-->"
-
-#data
-<ul><li>A </li> <li>B</li></ul>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <ul>
-| <li>
-| "A "
-| " "
-| <li>
-| "B"
-
-#data
-<table><form><input type=hidden><input></form><div></div></table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <input>
-| <div>
-| <table>
-| <form>
-| <input>
-| type="hidden"
-
-#data
-<i>A<b>B<p></i>C</b>D
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <i>
-| "A"
-| <b>
-| "B"
-| <b>
-| <p>
-| <b>
-| <i>
-| "C"
-| "D"
-
-#data
-<div></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-
-#data
-<svg></svg>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<math></math>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat
deleted file mode 100644
index 3f2bd374c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat
+++ /dev/null
@@ -1,43 +0,0 @@
-#data
-<button>1</foo>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <button>
-| "1"
-
-#data
-<foo>1<p>2</foo>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| "1"
-| <p>
-| "2"
-
-#data
-<dd>1</foo>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <dd>
-| "1"
-
-#data
-<foo>1<dd>2</foo>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| "1"
-| <dd>
-| "2"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/isindex.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/isindex.dat
deleted file mode 100644
index 88325ffe6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/isindex.dat
+++ /dev/null
@@ -1,40 +0,0 @@
-#data
-<isindex>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <form>
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| <hr>
-
-#data
-<isindex name="A" action="B" prompt="C" foo="D">
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <form>
-| action="B"
-| <hr>
-| <label>
-| "C"
-| <input>
-| foo="D"
-| name="isindex"
-| <hr>
-
-#data
-<form><isindex>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <form>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat
deleted file mode 100644
index a5ebb1eb2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat
deleted file mode 100644
index 5a9208465..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat
+++ /dev/null
@@ -1,52 +0,0 @@
-#data
-<input type="hidden"><frameset>
-#errors
-21: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-31: “frameset†start tag seen.
-31: End of file seen and there were open elements.
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><table><caption><svg>foo</table>bar
-#errors
-47: End tag “table†did not match the name of the current open element (“svgâ€).
-47: “table†closed but “caption†was still open.
-47: End tag “table†seen, but there were open elements.
-36: Unclosed element “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <svg svg>
-| "foo"
-| "bar"
-
-#data
-<table><tr><td><svg><desc><td></desc><circle>
-#errors
-7: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-30: A table cell was implicitly closed, but there were open elements.
-26: Unclosed element “descâ€.
-20: Unclosed element “svgâ€.
-37: Stray end tag “descâ€.
-45: End of file seen and there were open elements.
-45: Unclosed element “circleâ€.
-7: Unclosed element “tableâ€.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg desc>
-| <td>
-| <circle>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat
deleted file mode 100644
index 04cc11fb9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat
deleted file mode 100644
index 76b67f4ba..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat
+++ /dev/null
@@ -1,308 +0,0 @@
-#data
-FOO<script>'Hello'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'Hello'"
-| "BAR"
-
-#data
-FOO<script></script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "BAR"
-
-#data
-FOO<script></script >BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "BAR"
-
-#data
-FOO<script></script/>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "BAR"
-
-#data
-FOO<script></script/ >BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "BAR"
-
-#data
-FOO<script type="text/plain"></scriptx>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "</scriptx>BAR"
-
-#data
-FOO<script></script foo=">" dd>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "BAR"
-
-#data
-FOO<script>'<'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<'"
-| "BAR"
-
-#data
-FOO<script>'<!'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!'"
-| "BAR"
-
-#data
-FOO<script>'<!-'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-'"
-| "BAR"
-
-#data
-FOO<script>'<!--'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!--'"
-| "BAR"
-
-#data
-FOO<script>'<!---'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!---'"
-| "BAR"
-
-#data
-FOO<script>'<!-->'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-->'"
-| "BAR"
-
-#data
-FOO<script>'<!-->'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-->'"
-| "BAR"
-
-#data
-FOO<script>'<!-- potato'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-- potato'"
-| "BAR"
-
-#data
-FOO<script>'<!-- <sCrIpt'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-- <sCrIpt'"
-| "BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt>'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt>'</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt> -'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt> -'</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt> --'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt> --'</script>BAR"
-
-#data
-FOO<script>'<!-- <sCrIpt> -->'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| "'<!-- <sCrIpt> -->'"
-| "BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt> --!>'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt> --!>'</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt> -- >'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt> -- >'</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt '</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt '</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt/'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt/'</script>BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt\'</script>BAR
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt\'"
-| "BAR"
-
-#data
-FOO<script type="text/plain">'<!-- <sCrIpt/'</script>BAR</script>QUX
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "FOO"
-| <script>
-| type="text/plain"
-| "'<!-- <sCrIpt/'</script>BAR"
-| "QUX"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat
deleted file mode 100644
index 4e08d0e84..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat
+++ /dev/null
@@ -1,15 +0,0 @@
-#data
-<p><b id="A"><script>document.getElementById("A").id = "B"</script></p>TEXT</b>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| id="B"
-| <script>
-| "document.getElementById("A").id = "B""
-| <b>
-| id="A"
-| "TEXT"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat
deleted file mode 100644
index ef4a41ca0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat
+++ /dev/null
@@ -1,28 +0,0 @@
-#data
-1<script>document.write("2")</script>3
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "1"
-| <script>
-| "document.write("2")"
-| "23"
-
-#data
-1<script>document.write("<script>document.write('2')</scr"+ "ipt><script>document.write('3')</scr" + "ipt>")</script>4
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "1"
-| <script>
-| "document.write("<script>document.write('2')</scr"+ "ipt><script>document.write('3')</scr" + "ipt>")"
-| <script>
-| "document.write('2')"
-| "2"
-| <script>
-| "document.write('3')"
-| "34"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tables01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tables01.dat
deleted file mode 100644
index c4b47e48a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tables01.dat
+++ /dev/null
@@ -1,212 +0,0 @@
-#data
-<table><th>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <th>
-
-#data
-<table><td>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><col foo='bar'>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <colgroup>
-| <col>
-| foo="bar"
-
-#data
-<table><colgroup></html>foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "foo"
-| <table>
-| <colgroup>
-
-#data
-<table></table><p>foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <p>
-| "foo"
-
-#data
-<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr><td>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><select><option>3</select></table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| "3"
-| <table>
-
-#data
-<table><select><table></table></select></table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <table>
-| <table>
-
-#data
-<table><select></table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <table>
-
-#data
-<table><select><option>A<tr><td>B</td></tr></table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| "A"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "B"
-
-#data
-<table><td></body></caption></col></colgroup></html>foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "foo"
-
-#data
-<table><td>A</table>B
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "A"
-| "B"
-
-#data
-<table><tr><caption>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <caption>
-
-#data
-<table><tr></body></caption></col></colgroup></html></td></th><td>foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "foo"
-
-#data
-<table><td><tr>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <tr>
-
-#data
-<table><td><button><td>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <button>
-| <td>
-
-#data
-<table><tr><td><svg><desc><td>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg desc>
-| <td>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests1.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests1.dat
deleted file mode 100644
index cbf8bdda6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests1.dat
+++ /dev/null
@@ -1,1952 +0,0 @@
-#data
-Test
-#errors
-Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "Test"
-
-#data
-<p>One<p>Two
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| "One"
-| <p>
-| "Two"
-
-#data
-Line1<br>Line2<br>Line3<br>Line4
-#errors
-Line: 1 Col: 5 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "Line1"
-| <br>
-| "Line2"
-| <br>
-| "Line3"
-| <br>
-| "Line4"
-
-#data
-<html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<head>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<body>
-#errors
-Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head></head>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head></head><body>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head></head><body></body>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head><body></body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head></body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-Line: 1 Col: 19 Unexpected end tag (body).
-Line: 1 Col: 26 Unexpected end tag (html).
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><head><body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<html><body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<head></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end tag (html). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-</head>
-#errors
-Line: 1 Col: 7 Unexpected end tag (head). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-</body>
-#errors
-Line: 1 Col: 7 Unexpected end tag (body). Expected DOCTYPE.
-Line: 1 Col: 7 Unexpected end tag (body) after the (implied) root element.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-</html>
-#errors
-Line: 1 Col: 7 Unexpected end tag (html). Expected DOCTYPE.
-Line: 1 Col: 7 Unexpected end tag (html) after the (implied) root element.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<b><table><td><i></table>
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 25 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <i>
-
-#data
-<b><table><td></b><i></table>X
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 18 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 29 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 30 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <i>
-| "X"
-
-#data
-<h1>Hello<h2>World
-#errors
-4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-13: Heading cannot be a child of another heading.
-18: End of file seen and there were open elements.
-#document
-| <html>
-| <head>
-| <body>
-| <h1>
-| "Hello"
-| <h2>
-| "World"
-
-#data
-<a><p>X<a>Y</a>Z</p></a>
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 10 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 10 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 24 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <p>
-| <a>
-| "X"
-| <a>
-| "Y"
-| "Z"
-
-#data
-<b><button>foo</b>bar
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 15 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <button>
-| <b>
-| "foo"
-| "bar"
-
-#data
-<!DOCTYPE html><span><button>foo</span>bar
-#errors
-39: End tag “span†seen but there were unclosed elements.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <span>
-| <button>
-| "foobar"
-
-#data
-<p><b><div><marquee></p></b></div>X
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end tag (p). Ignored.
-Line: 1 Col: 24 Unexpected end tag (p). Ignored.
-Line: 1 Col: 28 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 34 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| <div>
-| <b>
-| <marquee>
-| <p>
-| "X"
-
-#data
-<script><div></script></div><title><p></title><p><p>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 28 Unexpected end tag (div). Ignored.
-#document
-| <html>
-| <head>
-| <script>
-| "<div>"
-| <title>
-| "<p>"
-| <body>
-| <p>
-| <p>
-
-#data
-<!--><div>--<!-->
-#errors
-Line: 1 Col: 5 Incorrect comment.
-Line: 1 Col: 10 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 17 Incorrect comment.
-Line: 1 Col: 17 Expected closing tag. Unexpected end of file.
-#document
-| <!-- -->
-| <html>
-| <head>
-| <body>
-| <div>
-| "--"
-| <!-- -->
-
-#data
-<p><hr></p>
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end tag (p). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <hr>
-| <p>
-
-#data
-<select><b><option><select><option></b></select>X
-#errors
-Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored.
-Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag.
-Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 48 Unexpected end tag (select). Ignored.
-Line: 1 Col: 49 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| <option>
-| "X"
-
-#data
-<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 63 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 64 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <a>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <a>
-| <table>
-| <a>
-| <a>
-| <b>
-| "X"
-| "C"
-| <a>
-| "Y"
-
-#data
-<a X>0<b>1<a Y>2
-#errors
-Line: 1 Col: 5 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| x=""
-| "0"
-| <b>
-| "1"
-| <b>
-| <a>
-| y=""
-| "2"
-
-#data
-<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->
-#errors
-Line: 1 Col: 7 Unexpected '-' after '--' found in comment.
-Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE.
-Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode.
-Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase.
-Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase.
-Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing.
-Line: 1 Col: 71 Unexpected end of file. Expected table content.
-#document
-| <!-- - -->
-| <html>
-| <head>
-| <body>
-| <font>
-| <div>
-| "helloexcite!"
-| <b>
-| "me!"
-| <table>
-| <tbody>
-| <tr>
-| <th>
-| <i>
-| "please!"
-| <!-- X -->
-
-#data
-<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->
-#errors
-Line: 1 Col: 61 Unexpected end tag (li). Missing end tag (body).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <li>
-| "hello"
-| <li>
-| "world"
-| <ul>
-| "how"
-| <li>
-| "do"
-| "you"
-| <!-- do -->
-
-#data
-<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E
-#errors
-Line: 1 Col: 54 Unexpected end tag (option) in the select phase. Ignored.
-Line: 1 Col: 55 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "A"
-| <option>
-| "B"
-| <optgroup>
-| "C"
-| <select>
-| "DE"
-
-#data
-<
-#errors
-Line: 1 Col: 1 Expected tag name. Got something else instead
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "<"
-
-#data
-<#
-#errors
-Line: 1 Col: 1 Expected tag name. Got something else instead
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "<#"
-
-#data
-</
-#errors
-Line: 1 Col: 2 Expected closing tag. Unexpected end of file.
-Line: 1 Col: 2 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "</"
-
-#data
-</#
-#errors
-Line: 1 Col: 2 Expected closing tag. Unexpected character '#' found.
-Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- # -->
-| <html>
-| <head>
-| <body>
-
-#data
-<?
-#errors
-Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)
-Line: 1 Col: 2 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- ? -->
-| <html>
-| <head>
-| <body>
-
-#data
-<?#
-#errors
-Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)
-Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- ?# -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!
-#errors
-Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.
-Line: 1 Col: 2 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!#
-#errors
-Line: 1 Col: 3 Expected '--' or 'DOCTYPE'. Not found.
-Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- # -->
-| <html>
-| <head>
-| <body>
-
-#data
-<?COMMENT?>
-#errors
-Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)
-Line: 1 Col: 11 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- ?COMMENT? -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!COMMENT>
-#errors
-Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.
-Line: 1 Col: 10 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- COMMENT -->
-| <html>
-| <head>
-| <body>
-
-#data
-</ COMMENT >
-#errors
-Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found.
-Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- COMMENT -->
-| <html>
-| <head>
-| <body>
-
-#data
-<?COM--MENT?>
-#errors
-Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)
-Line: 1 Col: 13 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- ?COM--MENT? -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!COM--MENT>
-#errors
-Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.
-Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- COM--MENT -->
-| <html>
-| <head>
-| <body>
-
-#data
-</ COM--MENT >
-#errors
-Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found.
-Line: 1 Col: 14 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- COM--MENT -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><style> EOF
-#errors
-Line: 1 Col: 26 Unexpected end of file. Expected end tag (style).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| " EOF"
-| <body>
-
-#data
-<!DOCTYPE html><script> <!-- </script> --> </script> EOF
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| " <!-- "
-| " "
-| <body>
-| "--> EOF"
-
-#data
-<b><p></b>TEST
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 10 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <p>
-| <b>
-| "TEST"
-
-#data
-<p id=a><b><p id=b></b>TEST
-#errors
-Line: 1 Col: 8 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 19 Unexpected end tag (p). Ignored.
-Line: 1 Col: 23 End tag (b) violates step 1, paragraph 2 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| id="a"
-| <b>
-| <p>
-| id="b"
-| "TEST"
-
-#data
-<b id=a><p><b id=b></p></b>TEST
-#errors
-Line: 1 Col: 8 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end tag (p). Ignored.
-Line: 1 Col: 27 End tag (b) violates step 1, paragraph 2 of the adoption agency algorithm.
-Line: 1 Col: 31 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| id="a"
-| <p>
-| <b>
-| id="b"
-| "TEST"
-
-#data
-<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>
-#errors
-Line: 1 Col: 61 Unexpected end tag (p). Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "U-test"
-| <body>
-| <div>
-| <p>
-| "Test"
-| <u>
-
-#data
-<!DOCTYPE html><font><table></font></table></font>
-#errors
-Line: 1 Col: 35 Unexpected end tag (font) in table context caused voodoo mode.
-Line: 1 Col: 35 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <font>
-| <table>
-
-#data
-<font><p>hello<b>cruel</font>world
-#errors
-Line: 1 Col: 6 Unexpected start tag (font). Expected DOCTYPE.
-Line: 1 Col: 29 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 29 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 34 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <font>
-| <p>
-| <font>
-| "hello"
-| <b>
-| "cruel"
-| <b>
-| "world"
-
-#data
-<b>Test</i>Test
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 11 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "TestTest"
-
-#data
-<b>A<cite>B<div>C
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 17 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "A"
-| <cite>
-| "B"
-| <div>
-| "C"
-
-#data
-<b>A<cite>B<div>C</cite>D
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 24 Unexpected end tag (cite). Ignored.
-Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "A"
-| <cite>
-| "B"
-| <div>
-| "CD"
-
-#data
-<b>A<cite>B<div>C</b>D
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 21 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 22 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "A"
-| <cite>
-| "B"
-| <div>
-| <b>
-| "C"
-| "D"
-
-#data
-
-#errors
-Line: 1 Col: 0 Unexpected End of file. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<DIV>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 5 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-
-#data
-<DIV> abc
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 9 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc"
-
-#data
-<DIV> abc <B>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 13 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-
-#data
-<DIV> abc <B> def
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 17 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def"
-
-#data
-<DIV> abc <B> def <I>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 21 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-
-#data
-<DIV> abc <B> def <I> ghi
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi"
-
-#data
-<DIV> abc <B> def <I> ghi <P>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 29 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <p>
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 33 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <p>
-| " jkl"
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 38 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <b>
-| " jkl "
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B> mno
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 42 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <b>
-| " jkl "
-| " mno"
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 47 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <i>
-| <b>
-| " jkl "
-| " mno "
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 51 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <i>
-| <b>
-| " jkl "
-| " mno "
-| " pqr"
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P>
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 56 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <i>
-| <b>
-| " jkl "
-| " mno "
-| " pqr "
-
-#data
-<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 60 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| " abc "
-| <b>
-| " def "
-| <i>
-| " ghi "
-| <i>
-| <p>
-| <i>
-| <b>
-| " jkl "
-| " mno "
-| " pqr "
-| " stu"
-
-#data
-<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
-#errors
-Line: 1 Col: 1040 Unexpected start tag (test). Expected DOCTYPE.
-Line: 1 Col: 1040 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <test>
-| attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=""
-
-#data
-<a href="blah">aba<table><a href="foo">br<tr><td></td></tr>x</table>aoe
-#errors
-Line: 1 Col: 15 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 39 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 39 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 39 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 45 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
-
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| href="blah"
-| "aba"
-| <a>
-| href="foo"
-| "br"
-| <a>
-| href="foo"
-| "x"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <a>
-| href="foo"
-| "aoe"
-
-#data
-<a href="blah">aba<table><tr><td><a href="foo">br</td></tr>x</table>aoe
-#errors
-Line: 1 Col: 15 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 54 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 60 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| href="blah"
-| "abax"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <a>
-| href="foo"
-| "br"
-| "aoe"
-
-#data
-<table><a href="blah">aba<tr><td><a href="foo">br</td></tr>x</table>aoe
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 29 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 54 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| href="blah"
-| "aba"
-| <a>
-| href="blah"
-| "x"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <a>
-| href="foo"
-| "br"
-| <a>
-| href="blah"
-| "aoe"
-
-#data
-<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa
-#errors
-Line: 1 Col: 10 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 45 End tag (marquee) seen too early. Expected other end tag.
-Line: 1 Col: 47 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| href="a"
-| "aa"
-| <marquee>
-| "aa"
-| <a>
-| href="b"
-| "bb"
-| "aa"
-
-#data
-<wbr><strike><code></strike><code><strike></code>
-#errors
-Line: 1 Col: 5 Unexpected start tag (wbr). Expected DOCTYPE.
-Line: 1 Col: 28 End tag (strike) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 49 Unexpected end tag (code). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <wbr>
-| <strike>
-| <code>
-| <code>
-| <code>
-| <strike>
-
-#data
-<!DOCTYPE html><spacer>foo
-#errors
-26: End of file seen and there were open elements.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <spacer>
-| "foo"
-
-#data
-<title><meta></title><link><title><meta></title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| "<meta>"
-| <link>
-| <title>
-| "<meta>"
-| <body>
-
-#data
-<style><!--</style><meta><script>--><link></script>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 51 Unexpected end of file. Expected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| "<!--"
-| <meta>
-| <script>
-| "--><link>"
-| <body>
-
-#data
-<head><meta></head><link>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 25 Unexpected start tag (link) that can be in head. Moved.
-#document
-| <html>
-| <head>
-| <meta>
-| <link>
-| <body>
-
-#data
-<table><tr><tr><td><td><span><th><span>X</table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 33 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 48 Got table cell end tag (th) while required end tags are missing.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <tr>
-| <td>
-| <td>
-| <span>
-| <th>
-| <span>
-| "X"
-
-#data
-<body><body><base><link><meta><title><p></title><body><p></body>
-#errors
-Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected start tag (body).
-Line: 1 Col: 54 Unexpected start tag (body).
-Line: 1 Col: 64 Unexpected end tag (p). Missing end tag (body).
-#document
-| <html>
-| <head>
-| <body>
-| <base>
-| <link>
-| <meta>
-| <title>
-| "<p>"
-| <p>
-
-#data
-<textarea><p></textarea>
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<p>"
-
-#data
-<p><image></p>
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 10 Unexpected start tag (image). Treated as img.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <img>
-
-#data
-<a><table><a></table><p><a><div><a>
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 13 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 13 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 21 Unexpected end tag (table). Expected end tag (a).
-Line: 1 Col: 27 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 27 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm.
-Line: 1 Col: 32 Unexpected end tag (p). Ignored.
-Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 35 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm.
-Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <a>
-| <table>
-| <p>
-| <a>
-| <div>
-| <a>
-
-#data
-<head></p><meta><p>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 10 Unexpected end tag (p). Ignored.
-#document
-| <html>
-| <head>
-| <meta>
-| <body>
-| <p>
-
-#data
-<head></html><meta><p>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 19 Unexpected start tag (meta).
-#document
-| <html>
-| <head>
-| <body>
-| <meta>
-| <p>
-
-#data
-<b><table><td><i></table>
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 25 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <i>
-
-#data
-<b><table><td></b><i></table>
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 18 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 29 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 29 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <i>
-
-#data
-<h1><h2>
-#errors
-4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-8: Heading cannot be a child of another heading.
-8: End of file seen and there were open elements.
-#document
-| <html>
-| <head>
-| <body>
-| <h1>
-| <h2>
-
-#data
-<a><p><a></a></p></a>
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 9 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 9 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 21 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <p>
-| <a>
-| <a>
-
-#data
-<b><button></b></button></b>
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 15 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <button>
-| <b>
-
-#data
-<p><b><div><marquee></p></b></div>
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end tag (p). Ignored.
-Line: 1 Col: 24 Unexpected end tag (p). Ignored.
-Line: 1 Col: 28 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 34 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 34 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| <div>
-| <b>
-| <marquee>
-| <p>
-
-#data
-<script></script></div><title></title><p><p>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end tag (div). Ignored.
-#document
-| <html>
-| <head>
-| <script>
-| <title>
-| <body>
-| <p>
-| <p>
-
-#data
-<p><hr></p>
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end tag (p). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <hr>
-| <p>
-
-#data
-<select><b><option><select><option></b></select>
-#errors
-Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored.
-Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag.
-Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 48 Unexpected end tag (select). Ignored.
-Line: 1 Col: 48 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| <option>
-
-#data
-<html><head><title></title><body></body></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| <body>
-
-#data
-<a><table><td><a><table></table><a></tr><a></table><a>
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase.
-Line: 1 Col: 54 Unexpected start tag (a) implies end tag (a).
-Line: 1 Col: 54 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm.
-Line: 1 Col: 54 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <a>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <a>
-| <table>
-| <a>
-| <a>
-
-#data
-<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul>
-#errors
-Line: 1 Col: 4 Unexpected start tag (ul). Expected DOCTYPE.
-Line: 1 Col: 45 Missing end tag (div, li).
-Line: 1 Col: 58 Missing end tag (address, li).
-Line: 1 Col: 69 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-#document
-| <html>
-| <head>
-| <body>
-| <ul>
-| <li>
-| <div>
-| <li>
-| <li>
-| <li>
-| <div>
-| <li>
-| <address>
-| <li>
-| <b>
-| <em>
-| <li>
-
-#data
-<ul><li><ul></li><li>a</li></ul></li></ul>
-#errors
-XXX: fix me
-#document
-| <html>
-| <head>
-| <body>
-| <ul>
-| <li>
-| <ul>
-| <li>
-| "a"
-
-#data
-<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <frameset>
-| <frame>
-| <frameset>
-| <frame>
-| <noframes>
-
-#data
-<h1><table><td><h3></table><h3></h1>
-#errors
-4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-15: “td†start tag in table body.
-27: Unclosed elements.
-31: Heading cannot be a child of another heading.
-36: End tag “h1†seen but there were unclosed elements.
-#document
-| <html>
-| <head>
-| <body>
-| <h1>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <h3>
-| <h3>
-
-#data
-<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <colgroup>
-| <col>
-| <colgroup>
-| <col>
-| <col>
-| <col>
-| <colgroup>
-| <col>
-| <col>
-| <thead>
-| <tr>
-| <td>
-
-#data
-<table><col><tbody><col><tr><col><td><col></table><col>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 37 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 55 Unexpected start tag col. Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <colgroup>
-| <col>
-| <tbody>
-| <colgroup>
-| <col>
-| <tbody>
-| <tr>
-| <colgroup>
-| <col>
-| <tbody>
-| <tr>
-| <td>
-| <colgroup>
-| <col>
-
-#data
-<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 52 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 80 Unexpected start tag colgroup. Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <colgroup>
-| <tbody>
-| <colgroup>
-| <tbody>
-| <tr>
-| <colgroup>
-| <tbody>
-| <tr>
-| <td>
-| <colgroup>
-
-#data
-</strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
-#errors
-Line: 1 Col: 9 Unexpected end tag (strong). Expected DOCTYPE.
-Line: 1 Col: 9 Unexpected end tag (strong) after the (implied) root element.
-Line: 1 Col: 13 Unexpected end tag (b) after the (implied) root element.
-Line: 1 Col: 18 Unexpected end tag (em) after the (implied) root element.
-Line: 1 Col: 22 Unexpected end tag (i) after the (implied) root element.
-Line: 1 Col: 26 Unexpected end tag (u) after the (implied) root element.
-Line: 1 Col: 35 Unexpected end tag (strike) after the (implied) root element.
-Line: 1 Col: 39 Unexpected end tag (s) after the (implied) root element.
-Line: 1 Col: 47 Unexpected end tag (blink) after the (implied) root element.
-Line: 1 Col: 52 Unexpected end tag (tt) after the (implied) root element.
-Line: 1 Col: 58 Unexpected end tag (pre) after the (implied) root element.
-Line: 1 Col: 64 Unexpected end tag (big) after the (implied) root element.
-Line: 1 Col: 72 Unexpected end tag (small) after the (implied) root element.
-Line: 1 Col: 79 Unexpected end tag (font) after the (implied) root element.
-Line: 1 Col: 88 Unexpected end tag (select) after the (implied) root element.
-Line: 1 Col: 93 Unexpected end tag (h1) after the (implied) root element.
-Line: 1 Col: 98 Unexpected end tag (h2) after the (implied) root element.
-Line: 1 Col: 103 Unexpected end tag (h3) after the (implied) root element.
-Line: 1 Col: 108 Unexpected end tag (h4) after the (implied) root element.
-Line: 1 Col: 113 Unexpected end tag (h5) after the (implied) root element.
-Line: 1 Col: 118 Unexpected end tag (h6) after the (implied) root element.
-Line: 1 Col: 125 Unexpected end tag (body) after the (implied) root element.
-Line: 1 Col: 130 Unexpected end tag (br). Treated as br element.
-Line: 1 Col: 134 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 140 This element (img) has no end tag.
-Line: 1 Col: 148 Unexpected end tag (title). Ignored.
-Line: 1 Col: 155 Unexpected end tag (span). Ignored.
-Line: 1 Col: 163 Unexpected end tag (style). Ignored.
-Line: 1 Col: 172 Unexpected end tag (script). Ignored.
-Line: 1 Col: 180 Unexpected end tag (table). Ignored.
-Line: 1 Col: 185 Unexpected end tag (th). Ignored.
-Line: 1 Col: 190 Unexpected end tag (td). Ignored.
-Line: 1 Col: 195 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 203 This element (frame) has no end tag.
-Line: 1 Col: 210 This element (area) has no end tag.
-Line: 1 Col: 217 Unexpected end tag (link). Ignored.
-Line: 1 Col: 225 This element (param) has no end tag.
-Line: 1 Col: 230 This element (hr) has no end tag.
-Line: 1 Col: 238 This element (input) has no end tag.
-Line: 1 Col: 244 Unexpected end tag (col). Ignored.
-Line: 1 Col: 251 Unexpected end tag (base). Ignored.
-Line: 1 Col: 258 Unexpected end tag (meta). Ignored.
-Line: 1 Col: 269 This element (basefont) has no end tag.
-Line: 1 Col: 279 This element (bgsound) has no end tag.
-Line: 1 Col: 287 This element (embed) has no end tag.
-Line: 1 Col: 296 This element (spacer) has no end tag.
-Line: 1 Col: 300 Unexpected end tag (p). Ignored.
-Line: 1 Col: 305 End tag (dd) seen too early. Expected other end tag.
-Line: 1 Col: 310 End tag (dt) seen too early. Expected other end tag.
-Line: 1 Col: 320 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 331 Unexpected end tag (colgroup). Ignored.
-Line: 1 Col: 339 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 347 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 355 Unexpected end tag (thead). Ignored.
-Line: 1 Col: 365 End tag (address) seen too early. Expected other end tag.
-Line: 1 Col: 378 End tag (blockquote) seen too early. Expected other end tag.
-Line: 1 Col: 387 End tag (center) seen too early. Expected other end tag.
-Line: 1 Col: 393 Unexpected end tag (dir). Ignored.
-Line: 1 Col: 399 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 404 End tag (dl) seen too early. Expected other end tag.
-Line: 1 Col: 415 End tag (fieldset) seen too early. Expected other end tag.
-Line: 1 Col: 425 End tag (listing) seen too early. Expected other end tag.
-Line: 1 Col: 432 End tag (menu) seen too early. Expected other end tag.
-Line: 1 Col: 437 End tag (ol) seen too early. Expected other end tag.
-Line: 1 Col: 442 End tag (ul) seen too early. Expected other end tag.
-Line: 1 Col: 447 End tag (li) seen too early. Expected other end tag.
-Line: 1 Col: 454 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 460 This element (wbr) has no end tag.
-Line: 1 Col: 476 End tag (button) seen too early. Expected other end tag.
-Line: 1 Col: 486 End tag (marquee) seen too early. Expected other end tag.
-Line: 1 Col: 495 End tag (object) seen too early. Expected other end tag.
-Line: 1 Col: 513 Unexpected end tag (html). Ignored.
-Line: 1 Col: 513 Unexpected end tag (frameset). Ignored.
-Line: 1 Col: 520 Unexpected end tag (head). Ignored.
-Line: 1 Col: 529 Unexpected end tag (iframe). Ignored.
-Line: 1 Col: 537 This element (image) has no end tag.
-Line: 1 Col: 547 This element (isindex) has no end tag.
-Line: 1 Col: 557 Unexpected end tag (noembed). Ignored.
-Line: 1 Col: 568 Unexpected end tag (noframes). Ignored.
-Line: 1 Col: 579 Unexpected end tag (noscript). Ignored.
-Line: 1 Col: 590 Unexpected end tag (optgroup). Ignored.
-Line: 1 Col: 599 Unexpected end tag (option). Ignored.
-Line: 1 Col: 611 Unexpected end tag (plaintext). Ignored.
-Line: 1 Col: 622 Unexpected end tag (textarea). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <br>
-| <p>
-
-#data
-<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end tag (strong) in table context caused voodoo mode.
-Line: 1 Col: 20 End tag (strong) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 24 Unexpected end tag (b) in table context caused voodoo mode.
-Line: 1 Col: 24 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 29 Unexpected end tag (em) in table context caused voodoo mode.
-Line: 1 Col: 29 End tag (em) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 33 Unexpected end tag (i) in table context caused voodoo mode.
-Line: 1 Col: 33 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 37 Unexpected end tag (u) in table context caused voodoo mode.
-Line: 1 Col: 37 End tag (u) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 46 Unexpected end tag (strike) in table context caused voodoo mode.
-Line: 1 Col: 46 End tag (strike) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 50 Unexpected end tag (s) in table context caused voodoo mode.
-Line: 1 Col: 50 End tag (s) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 58 Unexpected end tag (blink) in table context caused voodoo mode.
-Line: 1 Col: 58 Unexpected end tag (blink). Ignored.
-Line: 1 Col: 63 Unexpected end tag (tt) in table context caused voodoo mode.
-Line: 1 Col: 63 End tag (tt) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 69 Unexpected end tag (pre) in table context caused voodoo mode.
-Line: 1 Col: 69 End tag (pre) seen too early. Expected other end tag.
-Line: 1 Col: 75 Unexpected end tag (big) in table context caused voodoo mode.
-Line: 1 Col: 75 End tag (big) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 83 Unexpected end tag (small) in table context caused voodoo mode.
-Line: 1 Col: 83 End tag (small) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 90 Unexpected end tag (font) in table context caused voodoo mode.
-Line: 1 Col: 90 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 99 Unexpected end tag (select) in table context caused voodoo mode.
-Line: 1 Col: 99 Unexpected end tag (select). Ignored.
-Line: 1 Col: 104 Unexpected end tag (h1) in table context caused voodoo mode.
-Line: 1 Col: 104 End tag (h1) seen too early. Expected other end tag.
-Line: 1 Col: 109 Unexpected end tag (h2) in table context caused voodoo mode.
-Line: 1 Col: 109 End tag (h2) seen too early. Expected other end tag.
-Line: 1 Col: 114 Unexpected end tag (h3) in table context caused voodoo mode.
-Line: 1 Col: 114 End tag (h3) seen too early. Expected other end tag.
-Line: 1 Col: 119 Unexpected end tag (h4) in table context caused voodoo mode.
-Line: 1 Col: 119 End tag (h4) seen too early. Expected other end tag.
-Line: 1 Col: 124 Unexpected end tag (h5) in table context caused voodoo mode.
-Line: 1 Col: 124 End tag (h5) seen too early. Expected other end tag.
-Line: 1 Col: 129 Unexpected end tag (h6) in table context caused voodoo mode.
-Line: 1 Col: 129 End tag (h6) seen too early. Expected other end tag.
-Line: 1 Col: 136 Unexpected end tag (body) in the table row phase. Ignored.
-Line: 1 Col: 141 Unexpected end tag (br) in table context caused voodoo mode.
-Line: 1 Col: 141 Unexpected end tag (br). Treated as br element.
-Line: 1 Col: 145 Unexpected end tag (a) in table context caused voodoo mode.
-Line: 1 Col: 145 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 151 Unexpected end tag (img) in table context caused voodoo mode.
-Line: 1 Col: 151 This element (img) has no end tag.
-Line: 1 Col: 159 Unexpected end tag (title) in table context caused voodoo mode.
-Line: 1 Col: 159 Unexpected end tag (title). Ignored.
-Line: 1 Col: 166 Unexpected end tag (span) in table context caused voodoo mode.
-Line: 1 Col: 166 Unexpected end tag (span). Ignored.
-Line: 1 Col: 174 Unexpected end tag (style) in table context caused voodoo mode.
-Line: 1 Col: 174 Unexpected end tag (style). Ignored.
-Line: 1 Col: 183 Unexpected end tag (script) in table context caused voodoo mode.
-Line: 1 Col: 183 Unexpected end tag (script). Ignored.
-Line: 1 Col: 196 Unexpected end tag (th). Ignored.
-Line: 1 Col: 201 Unexpected end tag (td). Ignored.
-Line: 1 Col: 206 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 214 This element (frame) has no end tag.
-Line: 1 Col: 221 This element (area) has no end tag.
-Line: 1 Col: 228 Unexpected end tag (link). Ignored.
-Line: 1 Col: 236 This element (param) has no end tag.
-Line: 1 Col: 241 This element (hr) has no end tag.
-Line: 1 Col: 249 This element (input) has no end tag.
-Line: 1 Col: 255 Unexpected end tag (col). Ignored.
-Line: 1 Col: 262 Unexpected end tag (base). Ignored.
-Line: 1 Col: 269 Unexpected end tag (meta). Ignored.
-Line: 1 Col: 280 This element (basefont) has no end tag.
-Line: 1 Col: 290 This element (bgsound) has no end tag.
-Line: 1 Col: 298 This element (embed) has no end tag.
-Line: 1 Col: 307 This element (spacer) has no end tag.
-Line: 1 Col: 311 Unexpected end tag (p). Ignored.
-Line: 1 Col: 316 End tag (dd) seen too early. Expected other end tag.
-Line: 1 Col: 321 End tag (dt) seen too early. Expected other end tag.
-Line: 1 Col: 331 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 342 Unexpected end tag (colgroup). Ignored.
-Line: 1 Col: 350 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 358 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 366 Unexpected end tag (thead). Ignored.
-Line: 1 Col: 376 End tag (address) seen too early. Expected other end tag.
-Line: 1 Col: 389 End tag (blockquote) seen too early. Expected other end tag.
-Line: 1 Col: 398 End tag (center) seen too early. Expected other end tag.
-Line: 1 Col: 404 Unexpected end tag (dir). Ignored.
-Line: 1 Col: 410 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 415 End tag (dl) seen too early. Expected other end tag.
-Line: 1 Col: 426 End tag (fieldset) seen too early. Expected other end tag.
-Line: 1 Col: 436 End tag (listing) seen too early. Expected other end tag.
-Line: 1 Col: 443 End tag (menu) seen too early. Expected other end tag.
-Line: 1 Col: 448 End tag (ol) seen too early. Expected other end tag.
-Line: 1 Col: 453 End tag (ul) seen too early. Expected other end tag.
-Line: 1 Col: 458 End tag (li) seen too early. Expected other end tag.
-Line: 1 Col: 465 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm.
-Line: 1 Col: 471 This element (wbr) has no end tag.
-Line: 1 Col: 487 End tag (button) seen too early. Expected other end tag.
-Line: 1 Col: 497 End tag (marquee) seen too early. Expected other end tag.
-Line: 1 Col: 506 End tag (object) seen too early. Expected other end tag.
-Line: 1 Col: 524 Unexpected end tag (html). Ignored.
-Line: 1 Col: 524 Unexpected end tag (frameset). Ignored.
-Line: 1 Col: 531 Unexpected end tag (head). Ignored.
-Line: 1 Col: 540 Unexpected end tag (iframe). Ignored.
-Line: 1 Col: 548 This element (image) has no end tag.
-Line: 1 Col: 558 This element (isindex) has no end tag.
-Line: 1 Col: 568 Unexpected end tag (noembed). Ignored.
-Line: 1 Col: 579 Unexpected end tag (noframes). Ignored.
-Line: 1 Col: 590 Unexpected end tag (noscript). Ignored.
-Line: 1 Col: 601 Unexpected end tag (optgroup). Ignored.
-Line: 1 Col: 610 Unexpected end tag (option). Ignored.
-Line: 1 Col: 622 Unexpected end tag (plaintext). Ignored.
-Line: 1 Col: 633 Unexpected end tag (textarea). Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| <br>
-| <table>
-| <tbody>
-| <tr>
-| <p>
-
-#data
-<frameset>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 1 Col: 10 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <frameset>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat
deleted file mode 100644
index 4f8df86f2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat
+++ /dev/null
@@ -1,799 +0,0 @@
-#data
-<!DOCTYPE html><svg></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<!DOCTYPE html><svg></svg><![CDATA[a]]>
-#errors
-29: Bogus comment
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <!-- [CDATA[a]] -->
-
-#data
-<!DOCTYPE html><body><svg></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<!DOCTYPE html><body><select><svg></svg></select>
-#errors
-35: Stray “svg†start tag.
-42: Stray end tag “svgâ€
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!DOCTYPE html><body><select><option><svg></svg></option></select>
-#errors
-43: Stray “svg†start tag.
-50: Stray end tag “svgâ€
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-
-#data
-<!DOCTYPE html><body><table><svg></svg></table>
-#errors
-34: Start tag “svg†seen in “tableâ€.
-41: Stray end tag “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <table>
-
-#data
-<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>
-#errors
-34: Start tag “svg†seen in “tableâ€.
-46: Stray end tag “gâ€.
-53: Stray end tag “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <table>
-
-#data
-<!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table>
-#errors
-34: Start tag “svg†seen in “tableâ€.
-46: Stray end tag “gâ€.
-58: Stray end tag “gâ€.
-65: Stray end tag “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <table>
-
-#data
-<!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table>
-#errors
-41: Start tag “svg†seen in “tableâ€.
-53: Stray end tag “gâ€.
-65: Stray end tag “gâ€.
-72: Stray end tag “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <table>
-| <tbody>
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table>
-#errors
-45: Start tag “svg†seen in “tableâ€.
-57: Stray end tag “gâ€.
-69: Stray end tag “gâ€.
-76: Stray end tag “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-#errors
-70: HTML start tag “p†in a foreign namespace context.
-81: “table†closed but “caption†was still open.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux
-#errors
-78: “table†closed but “caption†was still open.
-78: Unclosed elements on stack.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| "baz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-#errors
-44: Start tag “svg†seen in “tableâ€.
-56: Stray end tag “gâ€.
-68: Stray end tag “gâ€.
-71: HTML start tag “p†in a foreign namespace context.
-71: Start tag “p†seen in “tableâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-| <table>
-| <colgroup>
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-#errors
-50: Stray “svg†start tag.
-54: Stray “g†start tag.
-62: Stray end tag “gâ€
-66: Stray “g†start tag.
-74: Stray end tag “gâ€
-77: Stray “p†start tag.
-88: “table†end tag with “select†open.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <select>
-| "foobarbaz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-#errors
-36: Start tag “select†seen in “tableâ€.
-42: Stray “svg†start tag.
-46: Stray “g†start tag.
-54: Stray end tag “gâ€
-58: Stray “g†start tag.
-66: Stray end tag “gâ€
-69: Stray “p†start tag.
-80: “table†end tag with “select†open.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| "foobarbaz"
-| <table>
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz
-#errors
-41: Stray “svg†start tag.
-68: HTML start tag “p†in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz
-#errors
-34: Stray “svg†start tag.
-61: HTML start tag “p†in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg g>
-| "foo"
-| <svg g>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><frameset><svg><g></g><g></g><p><span>
-#errors
-31: Stray “svg†start tag.
-35: Stray “g†start tag.
-40: Stray end tag “gâ€
-44: Stray “g†start tag.
-49: Stray end tag “gâ€
-52: Stray “p†start tag.
-58: Stray “span†start tag.
-58: End of file seen and there were open elements.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>
-#errors
-42: Stray “svg†start tag.
-46: Stray “g†start tag.
-51: Stray end tag “gâ€
-55: Stray “g†start tag.
-60: Stray end tag “gâ€
-63: Stray “p†start tag.
-69: Stray “span†start tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| <svg svg>
-| xlink href="foo"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <svg svg>
-| <svg g>
-| xlink href="foo"
-| xml lang="en"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <svg svg>
-| <svg g>
-| xlink href="foo"
-| xml lang="en"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <svg svg>
-| <svg g>
-| xlink href="foo"
-| xml lang="en"
-| "bar"
-
-#data
-<svg></path>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<div><svg></div>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| "a"
-
-#data
-<div><svg><path></div>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| <svg path>
-| "a"
-
-#data
-<div><svg><path></svg><path>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| <svg path>
-| <path>
-
-#data
-<div><svg><path><foreignObject><math></div>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| <svg path>
-| <svg foreignObject>
-| <math math>
-| "a"
-
-#data
-<div><svg><path><foreignObject><p></div>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| <svg path>
-| <svg foreignObject>
-| <p>
-| "a"
-
-#data
-<!DOCTYPE html><svg><desc><div><svg><ul>a
-#errors
-40: HTML start tag “ul†in a foreign namespace context.
-41: End of file in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg desc>
-| <div>
-| <svg svg>
-| <ul>
-| "a"
-
-#data
-<!DOCTYPE html><svg><desc><svg><ul>a
-#errors
-35: HTML start tag “ul†in a foreign namespace context.
-36: End of file in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg desc>
-| <svg svg>
-| <ul>
-| "a"
-
-#data
-<!DOCTYPE html><p><svg><desc><p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <svg svg>
-| <svg desc>
-| <p>
-
-#data
-<!DOCTYPE html><p><svg><title><p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <svg svg>
-| <svg title>
-| <p>
-
-#data
-<div><svg><path><foreignObject><p></foreignObject><p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <svg svg>
-| <svg path>
-| <svg foreignObject>
-| <p>
-| <p>
-
-#data
-<math><mi><div><object><div><span></span></div></object></div></mi><mi>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| <div>
-| <object>
-| <div>
-| <span>
-| <math mi>
-
-#data
-<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| <svg svg>
-| <svg foreignObject>
-| <div>
-| <div>
-| <math mi>
-
-#data
-<svg><script></script><path>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg script>
-| <svg path>
-
-#data
-<table><svg></svg><tr>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<math><mi><mglyph>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| <math mglyph>
-
-#data
-<math><mi><malignmark>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| <math malignmark>
-
-#data
-<math><mo><mglyph>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mo>
-| <math mglyph>
-
-#data
-<math><mo><malignmark>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mo>
-| <math malignmark>
-
-#data
-<math><mn><mglyph>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mn>
-| <math mglyph>
-
-#data
-<math><mn><malignmark>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mn>
-| <math malignmark>
-
-#data
-<math><ms><mglyph>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math ms>
-| <math mglyph>
-
-#data
-<math><ms><malignmark>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math ms>
-| <math malignmark>
-
-#data
-<math><mtext><mglyph>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mtext>
-| <math mglyph>
-
-#data
-<math><mtext><malignmark>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mtext>
-| <math malignmark>
-
-#data
-<math><annotation-xml><svg></svg></annotation-xml><mi>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| <svg svg>
-| <math mi>
-
-#data
-<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| <svg svg>
-| <svg foreignObject>
-| <div>
-| <math math>
-| <math mi>
-| <span>
-| <svg path>
-| <math mi>
-
-#data
-<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| <svg svg>
-| <svg foreignObject>
-| <math math>
-| <math mi>
-| <svg svg>
-| <math mo>
-| <span>
-| <svg path>
-| <math mi>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat
deleted file mode 100644
index 638cde479..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat
+++ /dev/null
@@ -1,482 +0,0 @@
-#data
-<!DOCTYPE html><body><svg attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' contentScriptType='' contentStyleType='' diffuseConstant='' edgeMode='' externalResourcesRequired='' filterRes='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| attributeName=""
-| attributeType=""
-| baseFrequency=""
-| baseProfile=""
-| calcMode=""
-| clipPathUnits=""
-| contentScriptType=""
-| contentStyleType=""
-| diffuseConstant=""
-| edgeMode=""
-| externalResourcesRequired=""
-| filterRes=""
-| filterUnits=""
-| glyphRef=""
-| gradientTransform=""
-| gradientUnits=""
-| kernelMatrix=""
-| kernelUnitLength=""
-| keyPoints=""
-| keySplines=""
-| keyTimes=""
-| lengthAdjust=""
-| limitingConeAngle=""
-| markerHeight=""
-| markerUnits=""
-| markerWidth=""
-| maskContentUnits=""
-| maskUnits=""
-| numOctaves=""
-| pathLength=""
-| patternContentUnits=""
-| patternTransform=""
-| patternUnits=""
-| pointsAtX=""
-| pointsAtY=""
-| pointsAtZ=""
-| preserveAlpha=""
-| preserveAspectRatio=""
-| primitiveUnits=""
-| refX=""
-| refY=""
-| repeatCount=""
-| repeatDur=""
-| requiredExtensions=""
-| requiredFeatures=""
-| specularConstant=""
-| specularExponent=""
-| spreadMethod=""
-| startOffset=""
-| stdDeviation=""
-| stitchTiles=""
-| surfaceScale=""
-| systemLanguage=""
-| tableValues=""
-| targetX=""
-| targetY=""
-| textLength=""
-| viewBox=""
-| viewTarget=""
-| xChannelSelector=""
-| yChannelSelector=""
-| zoomAndPan=""
-
-#data
-<!DOCTYPE html><BODY><SVG ATTRIBUTENAME='' ATTRIBUTETYPE='' BASEFREQUENCY='' BASEPROFILE='' CALCMODE='' CLIPPATHUNITS='' CONTENTSCRIPTTYPE='' CONTENTSTYLETYPE='' DIFFUSECONSTANT='' EDGEMODE='' EXTERNALRESOURCESREQUIRED='' FILTERRES='' FILTERUNITS='' GLYPHREF='' GRADIENTTRANSFORM='' GRADIENTUNITS='' KERNELMATRIX='' KERNELUNITLENGTH='' KEYPOINTS='' KEYSPLINES='' KEYTIMES='' LENGTHADJUST='' LIMITINGCONEANGLE='' MARKERHEIGHT='' MARKERUNITS='' MARKERWIDTH='' MASKCONTENTUNITS='' MASKUNITS='' NUMOCTAVES='' PATHLENGTH='' PATTERNCONTENTUNITS='' PATTERNTRANSFORM='' PATTERNUNITS='' POINTSATX='' POINTSATY='' POINTSATZ='' PRESERVEALPHA='' PRESERVEASPECTRATIO='' PRIMITIVEUNITS='' REFX='' REFY='' REPEATCOUNT='' REPEATDUR='' REQUIREDEXTENSIONS='' REQUIREDFEATURES='' SPECULARCONSTANT='' SPECULAREXPONENT='' SPREADMETHOD='' STARTOFFSET='' STDDEVIATION='' STITCHTILES='' SURFACESCALE='' SYSTEMLANGUAGE='' TABLEVALUES='' TARGETX='' TARGETY='' TEXTLENGTH='' VIEWBOX='' VIEWTARGET='' XCHANNELSELECTOR='' YCHANNELSELECTOR='' ZOOMANDPAN=''></SVG>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| attributeName=""
-| attributeType=""
-| baseFrequency=""
-| baseProfile=""
-| calcMode=""
-| clipPathUnits=""
-| contentScriptType=""
-| contentStyleType=""
-| diffuseConstant=""
-| edgeMode=""
-| externalResourcesRequired=""
-| filterRes=""
-| filterUnits=""
-| glyphRef=""
-| gradientTransform=""
-| gradientUnits=""
-| kernelMatrix=""
-| kernelUnitLength=""
-| keyPoints=""
-| keySplines=""
-| keyTimes=""
-| lengthAdjust=""
-| limitingConeAngle=""
-| markerHeight=""
-| markerUnits=""
-| markerWidth=""
-| maskContentUnits=""
-| maskUnits=""
-| numOctaves=""
-| pathLength=""
-| patternContentUnits=""
-| patternTransform=""
-| patternUnits=""
-| pointsAtX=""
-| pointsAtY=""
-| pointsAtZ=""
-| preserveAlpha=""
-| preserveAspectRatio=""
-| primitiveUnits=""
-| refX=""
-| refY=""
-| repeatCount=""
-| repeatDur=""
-| requiredExtensions=""
-| requiredFeatures=""
-| specularConstant=""
-| specularExponent=""
-| spreadMethod=""
-| startOffset=""
-| stdDeviation=""
-| stitchTiles=""
-| surfaceScale=""
-| systemLanguage=""
-| tableValues=""
-| targetX=""
-| targetY=""
-| textLength=""
-| viewBox=""
-| viewTarget=""
-| xChannelSelector=""
-| yChannelSelector=""
-| zoomAndPan=""
-
-#data
-<!DOCTYPE html><body><svg attributename='' attributetype='' basefrequency='' baseprofile='' calcmode='' clippathunits='' contentscripttype='' contentstyletype='' diffuseconstant='' edgemode='' externalresourcesrequired='' filterres='' filterunits='' glyphref='' gradienttransform='' gradientunits='' kernelmatrix='' kernelunitlength='' keypoints='' keysplines='' keytimes='' lengthadjust='' limitingconeangle='' markerheight='' markerunits='' markerwidth='' maskcontentunits='' maskunits='' numoctaves='' pathlength='' patterncontentunits='' patterntransform='' patternunits='' pointsatx='' pointsaty='' pointsatz='' preservealpha='' preserveaspectratio='' primitiveunits='' refx='' refy='' repeatcount='' repeatdur='' requiredextensions='' requiredfeatures='' specularconstant='' specularexponent='' spreadmethod='' startoffset='' stddeviation='' stitchtiles='' surfacescale='' systemlanguage='' tablevalues='' targetx='' targety='' textlength='' viewbox='' viewtarget='' xchannelselector='' ychannelselector='' zoomandpan=''></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| attributeName=""
-| attributeType=""
-| baseFrequency=""
-| baseProfile=""
-| calcMode=""
-| clipPathUnits=""
-| contentScriptType=""
-| contentStyleType=""
-| diffuseConstant=""
-| edgeMode=""
-| externalResourcesRequired=""
-| filterRes=""
-| filterUnits=""
-| glyphRef=""
-| gradientTransform=""
-| gradientUnits=""
-| kernelMatrix=""
-| kernelUnitLength=""
-| keyPoints=""
-| keySplines=""
-| keyTimes=""
-| lengthAdjust=""
-| limitingConeAngle=""
-| markerHeight=""
-| markerUnits=""
-| markerWidth=""
-| maskContentUnits=""
-| maskUnits=""
-| numOctaves=""
-| pathLength=""
-| patternContentUnits=""
-| patternTransform=""
-| patternUnits=""
-| pointsAtX=""
-| pointsAtY=""
-| pointsAtZ=""
-| preserveAlpha=""
-| preserveAspectRatio=""
-| primitiveUnits=""
-| refX=""
-| refY=""
-| repeatCount=""
-| repeatDur=""
-| requiredExtensions=""
-| requiredFeatures=""
-| specularConstant=""
-| specularExponent=""
-| spreadMethod=""
-| startOffset=""
-| stdDeviation=""
-| stitchTiles=""
-| surfaceScale=""
-| systemLanguage=""
-| tableValues=""
-| targetX=""
-| targetY=""
-| textLength=""
-| viewBox=""
-| viewTarget=""
-| xChannelSelector=""
-| yChannelSelector=""
-| zoomAndPan=""
-
-#data
-<!DOCTYPE html><body><math attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' contentScriptType='' contentStyleType='' diffuseConstant='' edgeMode='' externalResourcesRequired='' filterRes='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| attributename=""
-| attributetype=""
-| basefrequency=""
-| baseprofile=""
-| calcmode=""
-| clippathunits=""
-| contentscripttype=""
-| contentstyletype=""
-| diffuseconstant=""
-| edgemode=""
-| externalresourcesrequired=""
-| filterres=""
-| filterunits=""
-| glyphref=""
-| gradienttransform=""
-| gradientunits=""
-| kernelmatrix=""
-| kernelunitlength=""
-| keypoints=""
-| keysplines=""
-| keytimes=""
-| lengthadjust=""
-| limitingconeangle=""
-| markerheight=""
-| markerunits=""
-| markerwidth=""
-| maskcontentunits=""
-| maskunits=""
-| numoctaves=""
-| pathlength=""
-| patterncontentunits=""
-| patterntransform=""
-| patternunits=""
-| pointsatx=""
-| pointsaty=""
-| pointsatz=""
-| preservealpha=""
-| preserveaspectratio=""
-| primitiveunits=""
-| refx=""
-| refy=""
-| repeatcount=""
-| repeatdur=""
-| requiredextensions=""
-| requiredfeatures=""
-| specularconstant=""
-| specularexponent=""
-| spreadmethod=""
-| startoffset=""
-| stddeviation=""
-| stitchtiles=""
-| surfacescale=""
-| systemlanguage=""
-| tablevalues=""
-| targetx=""
-| targety=""
-| textlength=""
-| viewbox=""
-| viewtarget=""
-| xchannelselector=""
-| ychannelselector=""
-| zoomandpan=""
-
-#data
-<!DOCTYPE html><body><svg><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg altGlyph>
-| <svg altGlyphDef>
-| <svg altGlyphItem>
-| <svg animateColor>
-| <svg animateMotion>
-| <svg animateTransform>
-| <svg clipPath>
-| <svg feBlend>
-| <svg feColorMatrix>
-| <svg feComponentTransfer>
-| <svg feComposite>
-| <svg feConvolveMatrix>
-| <svg feDiffuseLighting>
-| <svg feDisplacementMap>
-| <svg feDistantLight>
-| <svg feFlood>
-| <svg feFuncA>
-| <svg feFuncB>
-| <svg feFuncG>
-| <svg feFuncR>
-| <svg feGaussianBlur>
-| <svg feImage>
-| <svg feMerge>
-| <svg feMergeNode>
-| <svg feMorphology>
-| <svg feOffset>
-| <svg fePointLight>
-| <svg feSpecularLighting>
-| <svg feSpotLight>
-| <svg feTile>
-| <svg feTurbulence>
-| <svg foreignObject>
-| <svg glyphRef>
-| <svg linearGradient>
-| <svg radialGradient>
-| <svg textPath>
-
-#data
-<!DOCTYPE html><body><svg><altglyph /><altglyphdef /><altglyphitem /><animatecolor /><animatemotion /><animatetransform /><clippath /><feblend /><fecolormatrix /><fecomponenttransfer /><fecomposite /><feconvolvematrix /><fediffuselighting /><fedisplacementmap /><fedistantlight /><feflood /><fefunca /><fefuncb /><fefuncg /><fefuncr /><fegaussianblur /><feimage /><femerge /><femergenode /><femorphology /><feoffset /><fepointlight /><fespecularlighting /><fespotlight /><fetile /><feturbulence /><foreignobject /><glyphref /><lineargradient /><radialgradient /><textpath /></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg altGlyph>
-| <svg altGlyphDef>
-| <svg altGlyphItem>
-| <svg animateColor>
-| <svg animateMotion>
-| <svg animateTransform>
-| <svg clipPath>
-| <svg feBlend>
-| <svg feColorMatrix>
-| <svg feComponentTransfer>
-| <svg feComposite>
-| <svg feConvolveMatrix>
-| <svg feDiffuseLighting>
-| <svg feDisplacementMap>
-| <svg feDistantLight>
-| <svg feFlood>
-| <svg feFuncA>
-| <svg feFuncB>
-| <svg feFuncG>
-| <svg feFuncR>
-| <svg feGaussianBlur>
-| <svg feImage>
-| <svg feMerge>
-| <svg feMergeNode>
-| <svg feMorphology>
-| <svg feOffset>
-| <svg fePointLight>
-| <svg feSpecularLighting>
-| <svg feSpotLight>
-| <svg feTile>
-| <svg feTurbulence>
-| <svg foreignObject>
-| <svg glyphRef>
-| <svg linearGradient>
-| <svg radialGradient>
-| <svg textPath>
-
-#data
-<!DOCTYPE html><BODY><SVG><ALTGLYPH /><ALTGLYPHDEF /><ALTGLYPHITEM /><ANIMATECOLOR /><ANIMATEMOTION /><ANIMATETRANSFORM /><CLIPPATH /><FEBLEND /><FECOLORMATRIX /><FECOMPONENTTRANSFER /><FECOMPOSITE /><FECONVOLVEMATRIX /><FEDIFFUSELIGHTING /><FEDISPLACEMENTMAP /><FEDISTANTLIGHT /><FEFLOOD /><FEFUNCA /><FEFUNCB /><FEFUNCG /><FEFUNCR /><FEGAUSSIANBLUR /><FEIMAGE /><FEMERGE /><FEMERGENODE /><FEMORPHOLOGY /><FEOFFSET /><FEPOINTLIGHT /><FESPECULARLIGHTING /><FESPOTLIGHT /><FETILE /><FETURBULENCE /><FOREIGNOBJECT /><GLYPHREF /><LINEARGRADIENT /><RADIALGRADIENT /><TEXTPATH /></SVG>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg altGlyph>
-| <svg altGlyphDef>
-| <svg altGlyphItem>
-| <svg animateColor>
-| <svg animateMotion>
-| <svg animateTransform>
-| <svg clipPath>
-| <svg feBlend>
-| <svg feColorMatrix>
-| <svg feComponentTransfer>
-| <svg feComposite>
-| <svg feConvolveMatrix>
-| <svg feDiffuseLighting>
-| <svg feDisplacementMap>
-| <svg feDistantLight>
-| <svg feFlood>
-| <svg feFuncA>
-| <svg feFuncB>
-| <svg feFuncG>
-| <svg feFuncR>
-| <svg feGaussianBlur>
-| <svg feImage>
-| <svg feMerge>
-| <svg feMergeNode>
-| <svg feMorphology>
-| <svg feOffset>
-| <svg fePointLight>
-| <svg feSpecularLighting>
-| <svg feSpotLight>
-| <svg feTile>
-| <svg feTurbulence>
-| <svg foreignObject>
-| <svg glyphRef>
-| <svg linearGradient>
-| <svg radialGradient>
-| <svg textPath>
-
-#data
-<!DOCTYPE html><body><math><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math altglyph>
-| <math altglyphdef>
-| <math altglyphitem>
-| <math animatecolor>
-| <math animatemotion>
-| <math animatetransform>
-| <math clippath>
-| <math feblend>
-| <math fecolormatrix>
-| <math fecomponenttransfer>
-| <math fecomposite>
-| <math feconvolvematrix>
-| <math fediffuselighting>
-| <math fedisplacementmap>
-| <math fedistantlight>
-| <math feflood>
-| <math fefunca>
-| <math fefuncb>
-| <math fefuncg>
-| <math fefuncr>
-| <math fegaussianblur>
-| <math feimage>
-| <math femerge>
-| <math femergenode>
-| <math femorphology>
-| <math feoffset>
-| <math fepointlight>
-| <math fespecularlighting>
-| <math fespotlight>
-| <math fetile>
-| <math feturbulence>
-| <math foreignobject>
-| <math glyphref>
-| <math lineargradient>
-| <math radialgradient>
-| <math textpath>
-
-#data
-<!DOCTYPE html><body><svg><solidColor /></svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg solidcolor>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat
deleted file mode 100644
index 63107d277..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat
+++ /dev/null
@@ -1,62 +0,0 @@
-#data
-<!DOCTYPE html><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| "foo"
-| <math math>
-| <math mtext>
-| <i>
-| "baz"
-| <math annotation-xml>
-| <svg svg>
-| <svg desc>
-| <b>
-| "eggs"
-| <svg g>
-| <svg foreignObject>
-| <p>
-| "spam"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <img>
-| <svg g>
-| "quux"
-| "bar"
-
-#data
-<!DOCTYPE html><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "foo"
-| <math math>
-| <math mtext>
-| <i>
-| "baz"
-| <math annotation-xml>
-| <svg svg>
-| <svg desc>
-| <b>
-| "eggs"
-| <svg g>
-| <svg foreignObject>
-| <p>
-| "spam"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <img>
-| <svg g>
-| "quux"
-| "bar"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat
deleted file mode 100644
index b8713f885..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat
+++ /dev/null
@@ -1,74 +0,0 @@
-#data
-<!DOCTYPE html><html><body><xyz:abc></xyz:abc>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <xyz:abc>
-
-#data
-<!DOCTYPE html><html><body><xyz:abc></xyz:abc><span></span>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <xyz:abc>
-| <span>
-
-#data
-<!DOCTYPE html><html><html abc:def=gh><xyz:abc></xyz:abc>
-#errors
-15: Unexpected start tag html
-#document
-| <!DOCTYPE html>
-| <html>
-| abc:def="gh"
-| <head>
-| <body>
-| <xyz:abc>
-
-#data
-<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo>
-#errors
-15: Unexpected start tag html
-#document
-| <!DOCTYPE html>
-| <html>
-| xml:lang="bar"
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><html 123=456>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| 123="456"
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><html 123=456><html 789=012>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| 123="456"
-| 789="012"
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><html><body 789=012>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| 789="012"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat
deleted file mode 100644
index 6ce1c0d16..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat
+++ /dev/null
@@ -1,208 +0,0 @@
-#data
-<!DOCTYPE html><p><b><i><u></p> <p>X
-#errors
-Line: 1 Col: 31 Unexpected end tag (p). Ignored.
-Line: 1 Col: 36 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| <i>
-| <u>
-| <b>
-| <i>
-| <u>
-| " "
-| <p>
-| "X"
-
-#data
-<p><b><i><u></p>
-<p>X
-#errors
-Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected end tag (p). Ignored.
-Line: 2 Col: 4 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| <i>
-| <u>
-| <b>
-| <i>
-| <u>
-| "
-"
-| <p>
-| "X"
-
-#data
-<!doctype html></html> <head>
-#errors
-Line: 1 Col: 22 Unexpected end tag (html) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " "
-
-#data
-<!doctype html></body><meta>
-#errors
-Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <meta>
-
-#data
-<html></html><!-- foo -->
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end tag (html) after the (implied) root element.
-#document
-| <html>
-| <head>
-| <body>
-| <!-- foo -->
-
-#data
-<!doctype html></body><title>X</title>
-#errors
-Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <title>
-| "X"
-
-#data
-<!doctype html><table> X<meta></table>
-#errors
-Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 30 Unexpected start tag (meta) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " X"
-| <meta>
-| <table>
-
-#data
-<!doctype html><table> x</table>
-#errors
-Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " x"
-| <table>
-
-#data
-<!doctype html><table> x </table>
-#errors
-Line: 1 Col: 25 Unexpected non-space characters in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " x "
-| <table>
-
-#data
-<!doctype html><table><tr> x</table>
-#errors
-Line: 1 Col: 28 Unexpected non-space characters in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " x"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><table>X<style> <tr>x </style> </table>
-#errors
-Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-| <table>
-| <style>
-| " <tr>x "
-| " "
-
-#data
-<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>
-#errors
-Line: 1 Col: 30 Unexpected start tag (a) in table context caused voodoo mode.
-Line: 1 Col: 37 Unexpected end tag (a) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-| <a>
-| "foo"
-| <table>
-| " "
-| <tbody>
-| <tr>
-| <td>
-| "bar"
-| " "
-
-#data
-<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>
-#errors
-6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-13: Stray start tag “frameâ€.
-21: Stray end tag “frameâ€.
-29: Stray end tag “frameâ€.
-39: “frameset†start tag after “body†already open.
-105: End of file seen inside an [R]CDATA element.
-105: End of file seen and there were open elements.
-XXX: These errors are wrong, please fix me!
-#document
-| <html>
-| <head>
-| <frameset>
-| <frame>
-| <frameset>
-| <frame>
-| <noframes>
-| "</frameset><noframes>"
-
-#data
-<!DOCTYPE html><object></html>
-#errors
-1: Expected closing tag. Unexpected end of file
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <object>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat
deleted file mode 100644
index c8ef66f0e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat
+++ /dev/null
@@ -1,2299 +0,0 @@
-#data
-<!doctype html><script>
-#errors
-Line: 1 Col: 23 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<!doctype html><script>a
-#errors
-Line: 1 Col: 24 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "a"
-| <body>
-
-#data
-<!doctype html><script><
-#errors
-Line: 1 Col: 24 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<"
-| <body>
-
-#data
-<!doctype html><script></
-#errors
-Line: 1 Col: 25 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</"
-| <body>
-
-#data
-<!doctype html><script></S
-#errors
-Line: 1 Col: 26 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</S"
-| <body>
-
-#data
-<!doctype html><script></SC
-#errors
-Line: 1 Col: 27 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</SC"
-| <body>
-
-#data
-<!doctype html><script></SCR
-#errors
-Line: 1 Col: 28 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</SCR"
-| <body>
-
-#data
-<!doctype html><script></SCRI
-#errors
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</SCRI"
-| <body>
-
-#data
-<!doctype html><script></SCRIP
-#errors
-Line: 1 Col: 30 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</SCRIP"
-| <body>
-
-#data
-<!doctype html><script></SCRIPT
-#errors
-Line: 1 Col: 31 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</SCRIPT"
-| <body>
-
-#data
-<!doctype html><script></SCRIPT
-#errors
-Line: 1 Col: 32 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<!doctype html><script></s
-#errors
-Line: 1 Col: 26 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</s"
-| <body>
-
-#data
-<!doctype html><script></sc
-#errors
-Line: 1 Col: 27 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</sc"
-| <body>
-
-#data
-<!doctype html><script></scr
-#errors
-Line: 1 Col: 28 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</scr"
-| <body>
-
-#data
-<!doctype html><script></scri
-#errors
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</scri"
-| <body>
-
-#data
-<!doctype html><script></scrip
-#errors
-Line: 1 Col: 30 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</scrip"
-| <body>
-
-#data
-<!doctype html><script></script
-#errors
-Line: 1 Col: 31 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "</script"
-| <body>
-
-#data
-<!doctype html><script></script
-#errors
-Line: 1 Col: 32 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<!doctype html><script><!
-#errors
-Line: 1 Col: 25 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!"
-| <body>
-
-#data
-<!doctype html><script><!a
-#errors
-Line: 1 Col: 26 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!a"
-| <body>
-
-#data
-<!doctype html><script><!-
-#errors
-Line: 1 Col: 26 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!-"
-| <body>
-
-#data
-<!doctype html><script><!-a
-#errors
-Line: 1 Col: 27 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!-a"
-| <body>
-
-#data
-<!doctype html><script><!--
-#errors
-Line: 1 Col: 27 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--"
-| <body>
-
-#data
-<!doctype html><script><!--a
-#errors
-Line: 1 Col: 28 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--a"
-| <body>
-
-#data
-<!doctype html><script><!--<
-#errors
-Line: 1 Col: 28 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<"
-| <body>
-
-#data
-<!doctype html><script><!--<a
-#errors
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<a"
-| <body>
-
-#data
-<!doctype html><script><!--</
-#errors
-Line: 1 Col: 27 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--</"
-| <body>
-
-#data
-<!doctype html><script><!--</script
-#errors
-Line: 1 Col: 35 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--</script"
-| <body>
-
-#data
-<!doctype html><script><!--</script
-#errors
-Line: 1 Col: 36 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--"
-| <body>
-
-#data
-<!doctype html><script><!--<s
-#errors
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<s"
-| <body>
-
-#data
-<!doctype html><script><!--<script
-#errors
-Line: 1 Col: 34 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script"
-| <body>
-
-#data
-<!doctype html><script><!--<script
-#errors
-Line: 1 Col: 35 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script "
-| <body>
-
-#data
-<!doctype html><script><!--<script <
-#errors
-Line: 1 Col: 36 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script <"
-| <body>
-
-#data
-<!doctype html><script><!--<script <a
-#errors
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script <a"
-| <body>
-
-#data
-<!doctype html><script><!--<script </
-#errors
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </"
-| <body>
-
-#data
-<!doctype html><script><!--<script </s
-#errors
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </s"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script
-#errors
-Line: 1 Col: 43 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script"
-| <body>
-
-#data
-<!doctype html><script><!--<script </scripta
-#errors
-Line: 1 Col: 44 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </scripta"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script
-#errors
-Line: 1 Col: 44 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<!doctype html><script><!--<script </script>
-#errors
-Line: 1 Col: 44 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script>"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script/
-#errors
-Line: 1 Col: 44 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script/"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script <
-#errors
-Line: 1 Col: 45 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script <"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script <a
-#errors
-Line: 1 Col: 46 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script <a"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script </
-#errors
-Line: 1 Col: 46 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script </"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script </script
-#errors
-Line: 1 Col: 52 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script </script"
-| <body>
-
-#data
-<!doctype html><script><!--<script </script </script
-#errors
-Line: 1 Col: 53 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<!doctype html><script><!--<script </script </script/
-#errors
-Line: 1 Col: 53 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<!doctype html><script><!--<script </script </script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<!doctype html><script><!--<script -
-#errors
-Line: 1 Col: 36 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -"
-| <body>
-
-#data
-<!doctype html><script><!--<script -a
-#errors
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -a"
-| <body>
-
-#data
-<!doctype html><script><!--<script -<
-#errors
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -<"
-| <body>
-
-#data
-<!doctype html><script><!--<script --
-#errors
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --"
-| <body>
-
-#data
-<!doctype html><script><!--<script --a
-#errors
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --a"
-| <body>
-
-#data
-<!doctype html><script><!--<script --<
-#errors
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --<"
-| <body>
-
-#data
-<!doctype html><script><!--<script -->
-#errors
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<!doctype html><script><!--<script --><
-#errors
-Line: 1 Col: 39 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --><"
-| <body>
-
-#data
-<!doctype html><script><!--<script --></
-#errors
-Line: 1 Col: 40 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --></"
-| <body>
-
-#data
-<!doctype html><script><!--<script --></script
-#errors
-Line: 1 Col: 46 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script --></script"
-| <body>
-
-#data
-<!doctype html><script><!--<script --></script
-#errors
-Line: 1 Col: 47 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<!doctype html><script><!--<script --></script/
-#errors
-Line: 1 Col: 47 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<!doctype html><script><!--<script --></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<!doctype html><script><!--<script><\/script>--></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script><\/script>-->"
-| <body>
-
-#data
-<!doctype html><script><!--<script></scr'+'ipt>--></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></scr'+'ipt>-->"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script>--><!--</script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>--><!--"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script>-- ></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>-- >"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script>- -></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>- ->"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script>- - ></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>- - >"
-| <body>
-
-#data
-<!doctype html><script><!--<script></script><script></script>-></script>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>->"
-| <body>
-
-#data
-<!doctype html><script><!--<script>--!></script>X
-#errors
-Line: 1 Col: 49 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script>--!></script>X"
-| <body>
-
-#data
-<!doctype html><script><!--<scr'+'ipt></script>--></script>
-#errors
-Line: 1 Col: 59 Unexpected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<scr'+'ipt>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><script><!--<script></scr'+'ipt></script>X
-#errors
-Line: 1 Col: 57 Unexpected end of file. Expected end tag (script).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "<!--<script></scr'+'ipt></script>X"
-| <body>
-
-#data
-<!doctype html><style><!--<style></style>--></style>
-#errors
-Line: 1 Col: 52 Unexpected end tag (style).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--<style>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><style><!--</style>X
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--"
-| <body>
-| "X"
-
-#data
-<!doctype html><style><!--...</style>...--></style>
-#errors
-Line: 1 Col: 51 Unexpected end tag (style).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--..."
-| <body>
-| "...-->"
-
-#data
-<!doctype html><style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>"
-| <body>
-| "X"
-
-#data
-<!doctype html><style><!--...<style><!--...--!></style>--></style>
-#errors
-Line: 1 Col: 66 Unexpected end tag (style).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--...<style><!--...--!>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><style><!--...</style><!-- --><style>@import ...</style>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "<!--..."
-| <!-- -->
-| <style>
-| "@import ..."
-| <body>
-
-#data
-<!doctype html><style>...<style><!--...</style><!-- --></style>
-#errors
-Line: 1 Col: 63 Unexpected end tag (style).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "...<style><!--..."
-| <!-- -->
-| <body>
-
-#data
-<!doctype html><style>...<!--[if IE]><style>...</style>X
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <style>
-| "...<!--[if IE]><style>..."
-| <body>
-| "X"
-
-#data
-<!doctype html><title><!--<title></title>--></title>
-#errors
-Line: 1 Col: 52 Unexpected end tag (title).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "<!--<title>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><title>&lt;/title></title>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "</title>"
-| <body>
-
-#data
-<!doctype html><title>foo/title><link></head><body>X
-#errors
-Line: 1 Col: 52 Unexpected end of file. Expected end tag (title).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "foo/title><link></head><body>X"
-| <body>
-
-#data
-<!doctype html><noscript><!--<noscript></noscript>--></noscript>
-#errors
-Line: 1 Col: 64 Unexpected end tag (noscript).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <noscript>
-| "<!--<noscript>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <noscript>
-| "<!--"
-| <body>
-| "X"
-| <noscript>
-| "-->"
-
-#data
-<!doctype html><noscript><iframe></noscript>X
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <noscript>
-| "<iframe>"
-| <body>
-| "X"
-
-#data
-<!doctype html><noframes><!--<noframes></noframes>--></noframes>
-#errors
-Line: 1 Col: 64 Unexpected end tag (noframes).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <noframes>
-| "<!--<noframes>"
-| <body>
-| "-->"
-
-#data
-<!doctype html><noframes><body><script><!--...</script></body></noframes></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <noframes>
-| "<body><script><!--...</script></body>"
-| <body>
-
-#data
-<!doctype html><textarea><!--<textarea></textarea>--></textarea>
-#errors
-Line: 1 Col: 64 Unexpected end tag (textarea).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<!--<textarea>"
-| "-->"
-
-#data
-<!doctype html><textarea>&lt;/textarea></textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "</textarea>"
-
-#data
-<!doctype html><textarea>&lt;</textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<"
-
-#data
-<!doctype html><textarea>a&lt;b</textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "a<b"
-
-#data
-<!doctype html><iframe><!--<iframe></iframe>--></iframe>
-#errors
-Line: 1 Col: 56 Unexpected end tag (iframe).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <iframe>
-| "<!--<iframe>"
-| "-->"
-
-#data
-<!doctype html><iframe>...<!--X->...<!--/X->...</iframe>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <iframe>
-| "...<!--X->...<!--/X->..."
-
-#data
-<!doctype html><xmp><!--<xmp></xmp>--></xmp>
-#errors
-Line: 1 Col: 44 Unexpected end tag (xmp).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <xmp>
-| "<!--<xmp>"
-| "-->"
-
-#data
-<!doctype html><noembed><!--<noembed></noembed>--></noembed>
-#errors
-Line: 1 Col: 60 Unexpected end tag (noembed).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <noembed>
-| "<!--<noembed>"
-| "-->"
-
-#data
-<script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 8 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<script>a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 9 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "a"
-| <body>
-
-#data
-<script><
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 9 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<"
-| <body>
-
-#data
-<script></
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 10 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</"
-| <body>
-
-#data
-<script></S
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</S"
-| <body>
-
-#data
-<script></SC
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</SC"
-| <body>
-
-#data
-<script></SCR
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</SCR"
-| <body>
-
-#data
-<script></SCRI
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</SCRI"
-| <body>
-
-#data
-<script></SCRIP
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</SCRIP"
-| <body>
-
-#data
-<script></SCRIPT
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</SCRIPT"
-| <body>
-
-#data
-<script></SCRIPT
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 17 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<script></s
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</s"
-| <body>
-
-#data
-<script></sc
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</sc"
-| <body>
-
-#data
-<script></scr
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</scr"
-| <body>
-
-#data
-<script></scri
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</scri"
-| <body>
-
-#data
-<script></scrip
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</scrip"
-| <body>
-
-#data
-<script></script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</script"
-| <body>
-
-#data
-<script></script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 17 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<script><!
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 10 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!"
-| <body>
-
-#data
-<script><!a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!a"
-| <body>
-
-#data
-<script><!-
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!-"
-| <body>
-
-#data
-<script><!-a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!-a"
-| <body>
-
-#data
-<script><!--
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--"
-| <body>
-
-#data
-<script><!--a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--a"
-| <body>
-
-#data
-<script><!--<
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<"
-| <body>
-
-#data
-<script><!--<a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<a"
-| <body>
-
-#data
-<script><!--</
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--</"
-| <body>
-
-#data
-<script><!--</script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--</script"
-| <body>
-
-#data
-<script><!--</script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 21 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--"
-| <body>
-
-#data
-<script><!--<s
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<s"
-| <body>
-
-#data
-<script><!--<script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 19 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script"
-| <body>
-
-#data
-<script><!--<script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script "
-| <body>
-
-#data
-<script><!--<script <
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 21 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script <"
-| <body>
-
-#data
-<script><!--<script <a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script <a"
-| <body>
-
-#data
-<script><!--<script </
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </"
-| <body>
-
-#data
-<script><!--<script </s
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </s"
-| <body>
-
-#data
-<script><!--<script </script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 28 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script"
-| <body>
-
-#data
-<script><!--<script </scripta
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </scripta"
-| <body>
-
-#data
-<script><!--<script </script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<script><!--<script </script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script>"
-| <body>
-
-#data
-<script><!--<script </script/
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 29 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script/"
-| <body>
-
-#data
-<script><!--<script </script <
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 30 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script <"
-| <body>
-
-#data
-<script><!--<script </script <a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 31 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script <a"
-| <body>
-
-#data
-<script><!--<script </script </
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 31 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script </"
-| <body>
-
-#data
-<script><!--<script </script </script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script </script"
-| <body>
-
-#data
-<script><!--<script </script </script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<script><!--<script </script </script/
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 38 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<script><!--<script </script </script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script </script "
-| <body>
-
-#data
-<script><!--<script -
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 21 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -"
-| <body>
-
-#data
-<script><!--<script -a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -a"
-| <body>
-
-#data
-<script><!--<script --
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script --"
-| <body>
-
-#data
-<script><!--<script --a
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script --a"
-| <body>
-
-#data
-<script><!--<script -->
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<script><!--<script --><
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 24 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script --><"
-| <body>
-
-#data
-<script><!--<script --></
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 25 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script --></"
-| <body>
-
-#data
-<script><!--<script --></script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 31 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script --></script"
-| <body>
-
-#data
-<script><!--<script --></script
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 32 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<script><!--<script --></script/
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 32 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<script><!--<script --></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script -->"
-| <body>
-
-#data
-<script><!--<script><\/script>--></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script><\/script>-->"
-| <body>
-
-#data
-<script><!--<script></scr'+'ipt>--></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></scr'+'ipt>-->"
-| <body>
-
-#data
-<script><!--<script></script><script></script></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>"
-| <body>
-
-#data
-<script><!--<script></script><script></script>--><!--</script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>--><!--"
-| <body>
-
-#data
-<script><!--<script></script><script></script>-- ></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>-- >"
-| <body>
-
-#data
-<script><!--<script></script><script></script>- -></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>- ->"
-| <body>
-
-#data
-<script><!--<script></script><script></script>- - ></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>- - >"
-| <body>
-
-#data
-<script><!--<script></script><script></script>-></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></script><script></script>->"
-| <body>
-
-#data
-<script><!--<script>--!></script>X
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 34 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script>--!></script>X"
-| <body>
-
-#data
-<script><!--<scr'+'ipt></script>--></script>
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 44 Unexpected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<scr'+'ipt>"
-| <body>
-| "-->"
-
-#data
-<script><!--<script></scr'+'ipt></script>X
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 42 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "<!--<script></scr'+'ipt></script>X"
-| <body>
-
-#data
-<style><!--<style></style>--></style>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 37 Unexpected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| "<!--<style>"
-| <body>
-| "-->"
-
-#data
-<style><!--</style>X
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| "<!--"
-| <body>
-| "X"
-
-#data
-<style><!--...</style>...--></style>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 36 Unexpected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| "<!--..."
-| <body>
-| "...-->"
-
-#data
-<style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>"
-| <body>
-| "X"
-
-#data
-<style><!--...<style><!--...--!></style>--></style>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 51 Unexpected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| "<!--...<style><!--...--!>"
-| <body>
-| "-->"
-
-#data
-<style><!--...</style><!-- --><style>@import ...</style>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| "<!--..."
-| <!-- -->
-| <style>
-| "@import ..."
-| <body>
-
-#data
-<style>...<style><!--...</style><!-- --></style>
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 48 Unexpected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| "...<style><!--..."
-| <!-- -->
-| <body>
-
-#data
-<style>...<!--[if IE]><style>...</style>X
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| "...<!--[if IE]><style>..."
-| <body>
-| "X"
-
-#data
-<title><!--<title></title>--></title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-Line: 1 Col: 37 Unexpected end tag (title).
-#document
-| <html>
-| <head>
-| <title>
-| "<!--<title>"
-| <body>
-| "-->"
-
-#data
-<title>&lt;/title></title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| "</title>"
-| <body>
-
-#data
-<title>foo/title><link></head><body>X
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-Line: 1 Col: 37 Unexpected end of file. Expected end tag (title).
-#document
-| <html>
-| <head>
-| <title>
-| "foo/title><link></head><body>X"
-| <body>
-
-#data
-<noscript><!--<noscript></noscript>--></noscript>
-#errors
-Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE.
-Line: 1 Col: 49 Unexpected end tag (noscript).
-#document
-| <html>
-| <head>
-| <noscript>
-| "<!--<noscript>"
-| <body>
-| "-->"
-
-#data
-<noscript><!--</noscript>X<noscript>--></noscript>
-#errors
-Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <noscript>
-| "<!--"
-| <body>
-| "X"
-| <noscript>
-| "-->"
-
-#data
-<noscript><iframe></noscript>X
-#errors
-Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <noscript>
-| "<iframe>"
-| <body>
-| "X"
-
-#data
-<noframes><!--<noframes></noframes>--></noframes>
-#errors
-Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE.
-Line: 1 Col: 49 Unexpected end tag (noframes).
-#document
-| <html>
-| <head>
-| <noframes>
-| "<!--<noframes>"
-| <body>
-| "-->"
-
-#data
-<noframes><body><script><!--...</script></body></noframes></html>
-#errors
-Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <noframes>
-| "<body><script><!--...</script></body>"
-| <body>
-
-#data
-<textarea><!--<textarea></textarea>--></textarea>
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-Line: 1 Col: 49 Unexpected end tag (textarea).
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "<!--<textarea>"
-| "-->"
-
-#data
-<textarea>&lt;/textarea></textarea>
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "</textarea>"
-
-#data
-<iframe><!--<iframe></iframe>--></iframe>
-#errors
-Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
-Line: 1 Col: 41 Unexpected end tag (iframe).
-#document
-| <html>
-| <head>
-| <body>
-| <iframe>
-| "<!--<iframe>"
-| "-->"
-
-#data
-<iframe>...<!--X->...<!--/X->...</iframe>
-#errors
-Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <iframe>
-| "...<!--X->...<!--/X->..."
-
-#data
-<xmp><!--<xmp></xmp>--></xmp>
-#errors
-Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE.
-Line: 1 Col: 29 Unexpected end tag (xmp).
-#document
-| <html>
-| <head>
-| <body>
-| <xmp>
-| "<!--<xmp>"
-| "-->"
-
-#data
-<noembed><!--<noembed></noembed>--></noembed>
-#errors
-Line: 1 Col: 9 Unexpected start tag (noembed). Expected DOCTYPE.
-Line: 1 Col: 45 Unexpected end tag (noembed).
-#document
-| <html>
-| <head>
-| <body>
-| <noembed>
-| "<!--<noembed>"
-| "-->"
-
-#data
-<!doctype html><table>
-
-#errors
-Line 2 Col 0 Unexpected end of file. Expected table content.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| "
-"
-
-#data
-<!doctype html><table><td><span><font></span><span>
-#errors
-Line 1 Col 26 Unexpected table cell start tag (td) in the table body phase.
-Line 1 Col 45 Unexpected end tag (span).
-Line 1 Col 51 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <span>
-| <font>
-| <font>
-| <span>
-
-#data
-<!doctype html><form><table></form><form></table></form>
-#errors
-35: Stray end tag “formâ€.
-41: Start tag “form†seen in “tableâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <table>
-| <form>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat
deleted file mode 100644
index 7b555f888..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat
+++ /dev/null
@@ -1,153 +0,0 @@
-#data
-<!doctype html><table><tbody><select><tr>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><table><tr><select><td>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<!doctype html><table><tr><td><select><td>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <select>
-| <td>
-
-#data
-<!doctype html><table><tr><th><select><td>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <th>
-| <select>
-| <td>
-
-#data
-<!doctype html><table><caption><select><tr>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <select>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><select><tr>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><td>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><th>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><tbody>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><thead>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><tfoot>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><select><caption>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><table><tr></table>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| "a"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat
deleted file mode 100644
index 680e1f068..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat
+++ /dev/null
@@ -1,269 +0,0 @@
-#data
-<!doctype html><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-
-#data
-<!doctype html><table><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-| <table>
-
-#data
-<!doctype html><table><tbody><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-| <table>
-| <tbody>
-
-#data
-<!doctype html><table><tbody><tr><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><table><tbody><tr><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><table><td><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <plaintext>
-| "</plaintext>"
-
-#data
-<!doctype html><table><caption><plaintext></plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <plaintext>
-| "</plaintext>"
-
-#data
-<!doctype html><table><tr><style></script></style>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "abc"
-| <table>
-| <tbody>
-| <tr>
-| <style>
-| "</script>"
-
-#data
-<!doctype html><table><tr><script></style></script>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "abc"
-| <table>
-| <tbody>
-| <tr>
-| <script>
-| "</style>"
-
-#data
-<!doctype html><table><caption><style></script></style>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <style>
-| "</script>"
-| "abc"
-
-#data
-<!doctype html><table><td><style></script></style>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <style>
-| "</script>"
-| "abc"
-
-#data
-<!doctype html><select><script></style></script>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <script>
-| "</style>"
-| "abc"
-
-#data
-<!doctype html><table><select><script></style></script>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <script>
-| "</style>"
-| "abc"
-| <table>
-
-#data
-<!doctype html><table><tr><select><script></style></script>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <script>
-| "</style>"
-| "abc"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><frameset></frameset><noframes>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <noframes>
-| "abc"
-
-#data
-<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <noframes>
-| "abc"
-| <!-- abc -->
-
-#data
-<!doctype html><frameset></frameset></html><noframes>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <noframes>
-| "abc"
-
-#data
-<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <noframes>
-| "abc"
-| <!-- abc -->
-
-#data
-<!doctype html><table><tr></tbody><tfoot>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <tfoot>
-
-#data
-<!doctype html><table><td><svg></svg>abc<td>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| "abc"
-| <td>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat
deleted file mode 100644
index 0d62f5a5b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat
+++ /dev/null
@@ -1,1237 +0,0 @@
-#data
-<!doctype html><math><mn DefinitionUrl="foo">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mn>
-| definitionURL="foo"
-
-#data
-<!doctype html><html></p><!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <!-- foo -->
-| <head>
-| <body>
-
-#data
-<!doctype html><head></head></p><!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <!-- foo -->
-| <body>
-
-#data
-<!doctype html><body><p><pre>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <pre>
-
-#data
-<!doctype html><body><p><listing>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <listing>
-
-#data
-<!doctype html><p><plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <plaintext>
-
-#data
-<!doctype html><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <h1>
-
-#data
-<!doctype html><form><isindex>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-
-#data
-<!doctype html><isindex action="POST">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| action="POST"
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| <hr>
-
-#data
-<!doctype html><isindex prompt="this is isindex">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <hr>
-| <label>
-| "this is isindex"
-| <input>
-| name="isindex"
-| <hr>
-
-#data
-<!doctype html><isindex type="hidden">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| type="hidden"
-| <hr>
-
-#data
-<!doctype html><isindex name="foo">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| <hr>
-
-#data
-<!doctype html><ruby><p><rp>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <p>
-| <rp>
-
-#data
-<!doctype html><ruby><div><span><rp>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <span>
-| <rp>
-
-#data
-<!doctype html><ruby><div><p><rp>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <p>
-| <rp>
-
-#data
-<!doctype html><ruby><p><rt>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <p>
-| <rt>
-
-#data
-<!doctype html><ruby><div><span><rt>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <span>
-| <rt>
-
-#data
-<!doctype html><ruby><div><p><rt>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <p>
-| <rt>
-
-#data
-<!doctype html><math/><foo>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <foo>
-
-#data
-<!doctype html><svg/><foo>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <foo>
-
-#data
-<!doctype html><div></body><!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-| <!-- foo -->
-
-#data
-<!doctype html><h1><div><h3><span></h1>foo
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <h1>
-| <div>
-| <h3>
-| <span>
-| "foo"
-
-#data
-<!doctype html><p></h3>foo
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| "foo"
-
-#data
-<!doctype html><h3><li>abc</h2>foo
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <h3>
-| <li>
-| "abc"
-| "foo"
-
-#data
-<!doctype html><table>abc<!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "abc"
-| <table>
-| <!-- foo -->
-
-#data
-<!doctype html><table> <!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| " "
-| <!-- foo -->
-
-#data
-<!doctype html><table> b <!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| " b "
-| <table>
-| <!-- foo -->
-
-#data
-<!doctype html><select><option><option>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| <option>
-
-#data
-<!doctype html><select><option></optgroup>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-
-#data
-<!doctype html><select><option></optgroup>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-
-#data
-<!doctype html><p><math><mi><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math mi>
-| <p>
-| <h1>
-
-#data
-<!doctype html><p><math><mo><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math mo>
-| <p>
-| <h1>
-
-#data
-<!doctype html><p><math><mn><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math mn>
-| <p>
-| <h1>
-
-#data
-<!doctype html><p><math><ms><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math ms>
-| <p>
-| <h1>
-
-#data
-<!doctype html><p><math><mtext><p><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math mtext>
-| <p>
-| <h1>
-
-#data
-<!doctype html><frameset></noframes>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><html c=d><body></html><html a=b>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| a="b"
-| c="d"
-| <head>
-| <body>
-
-#data
-<!doctype html><html c=d><frameset></frameset></html><html a=b>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| a="b"
-| c="d"
-| <head>
-| <frameset>
-
-#data
-<!doctype html><html><frameset></frameset></html><!--foo-->
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <!-- foo -->
-
-#data
-<!doctype html><html><frameset></frameset></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| " "
-
-#data
-<!doctype html><html><frameset></frameset></html>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><html><frameset></frameset></html><p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><html><frameset></frameset></html></p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<html><frameset></frameset></html><!doctype html>
-#errors
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><body><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<!doctype html><p><frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<!doctype html><p>a<frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| "a"
-
-#data
-<!doctype html><p> <frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<!doctype html><pre><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-
-#data
-<!doctype html><listing><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <listing>
-
-#data
-<!doctype html><li><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <li>
-
-#data
-<!doctype html><dd><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <dd>
-
-#data
-<!doctype html><dt><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <dt>
-
-#data
-<!doctype html><button><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <button>
-
-#data
-<!doctype html><applet><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <applet>
-
-#data
-<!doctype html><marquee><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <marquee>
-
-#data
-<!doctype html><object><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <object>
-
-#data
-<!doctype html><table><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-
-#data
-<!doctype html><area><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <area>
-
-#data
-<!doctype html><basefont><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <basefont>
-| <frameset>
-
-#data
-<!doctype html><bgsound><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <bgsound>
-| <frameset>
-
-#data
-<!doctype html><br><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <br>
-
-#data
-<!doctype html><embed><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <embed>
-
-#data
-<!doctype html><img><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <img>
-
-#data
-<!doctype html><input><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <input>
-
-#data
-<!doctype html><keygen><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <keygen>
-
-#data
-<!doctype html><wbr><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <wbr>
-
-#data
-<!doctype html><hr><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <hr>
-
-#data
-<!doctype html><textarea></textarea><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-
-#data
-<!doctype html><xmp></xmp><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <xmp>
-
-#data
-<!doctype html><iframe></iframe><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <iframe>
-
-#data
-<!doctype html><select></select><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!doctype html><svg></svg><frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<!doctype html><math></math><frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<!doctype html><svg><foreignObject><div> <frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<!doctype html><svg>a</svg><frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "a"
-
-#data
-<!doctype html><svg> </svg><frameset><frame>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-| <frame>
-
-#data
-<html>aaa<frameset></frameset>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "aaa"
-
-#data
-<html> a <frameset></frameset>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "a "
-
-#data
-<!doctype html><div><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><div><body><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-
-#data
-<!doctype html><p><math></p>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| "a"
-
-#data
-<!doctype html><p><math><mn><span></p>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <math math>
-| <math mn>
-| <span>
-| <p>
-| "a"
-
-#data
-<!doctype html><math></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-
-#data
-<!doctype html><meta charset="ascii">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <meta>
-| charset="ascii"
-| <body>
-
-#data
-<!doctype html><meta http-equiv="content-type" content="text/html;charset=ascii">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <meta>
-| content="text/html;charset=ascii"
-| http-equiv="content-type"
-| <body>
-
-#data
-<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset="utf8">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -->
-| <meta>
-| charset="utf8"
-| <body>
-
-#data
-<!doctype html><html a=b><head></head><html c=d>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| a="b"
-| c="d"
-| <head>
-| <body>
-
-#data
-<!doctype html><image/>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <img>
-
-#data
-<!doctype html>a<i>b<table>c<b>d</i>e</b>f
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "a"
-| <i>
-| "bc"
-| <b>
-| "de"
-| "f"
-| <table>
-
-#data
-<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <i>
-| "a"
-| <b>
-| "b"
-| <b>
-| <div>
-| <b>
-| <i>
-| "c"
-| <a>
-| "d"
-| <a>
-| "e"
-| <a>
-| "f"
-| <table>
-
-#data
-<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <i>
-| "a"
-| <b>
-| "b"
-| <b>
-| <div>
-| <b>
-| <i>
-| "c"
-| <a>
-| "d"
-| <a>
-| "e"
-| <a>
-| "f"
-
-#data
-<!doctype html><table><i>a<b>b<div>c</i>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <i>
-| "a"
-| <b>
-| "b"
-| <b>
-| <div>
-| <i>
-| "c"
-| <table>
-
-#data
-<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <i>
-| "a"
-| <b>
-| "b"
-| <b>
-| <div>
-| <b>
-| <i>
-| "c"
-| <a>
-| "d"
-| <a>
-| "e"
-| <a>
-| "f"
-| <table>
-
-#data
-<!doctype html><table><i>a<div>b<tr>c<b>d</i>e
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <i>
-| "a"
-| <div>
-| "b"
-| <i>
-| "c"
-| <b>
-| "d"
-| <b>
-| "e"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><table><td><table><i>a<div>b<b>c</i>d
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <i>
-| "a"
-| <div>
-| <i>
-| "b"
-| <b>
-| "c"
-| <b>
-| "d"
-| <table>
-
-#data
-<!doctype html><body><bgsound>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <bgsound>
-
-#data
-<!doctype html><body><basefont>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <basefont>
-
-#data
-<!doctype html><a><b></a><basefont>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <basefont>
-
-#data
-<!doctype html><a><b></a><bgsound>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <bgsound>
-
-#data
-<!doctype html><figcaption><article></figcaption>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <figcaption>
-| <article>
-| "a"
-
-#data
-<!doctype html><summary><article></summary>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <summary>
-| <article>
-| "a"
-
-#data
-<!doctype html><p><a><plaintext>b
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <a>
-| <plaintext>
-| <a>
-| "b"
-
-#data
-<!DOCTYPE html><div>a<a></div>b<p>c</p>d
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-| "a"
-| <a>
-| <a>
-| "b"
-| <p>
-| "c"
-| "d"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat
deleted file mode 100644
index 60d859221..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat
+++ /dev/null
@@ -1,763 +0,0 @@
-#data
-<!DOCTYPE html>Test
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "Test"
-
-#data
-<textarea>test</div>test
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-Line: 1 Col: 24 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "test</div>test"
-
-#data
-<table><td>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 11 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><td>test</tbody></table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "test"
-
-#data
-<frame>test
-#errors
-Line: 1 Col: 7 Unexpected start tag (frame). Expected DOCTYPE.
-Line: 1 Col: 7 Unexpected start tag frame. Ignored.
-#document
-| <html>
-| <head>
-| <body>
-| "test"
-
-#data
-<!DOCTYPE html><frameset>test
-#errors
-Line: 1 Col: 29 Unepxected characters in the frameset phase. Characters ignored.
-Line: 1 Col: 29 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><frameset><!DOCTYPE html>
-#errors
-Line: 1 Col: 40 Unexpected DOCTYPE. Ignored.
-Line: 1 Col: 40 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><font><p><b>test</font>
-#errors
-Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <font>
-| <p>
-| <font>
-| <b>
-| "test"
-
-#data
-<!DOCTYPE html><dt><div><dd>
-#errors
-Line: 1 Col: 28 Missing end tag (div, dt).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <dt>
-| <div>
-| <dd>
-
-#data
-<script></x
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
-#document
-| <html>
-| <head>
-| <script>
-| "</x"
-| <body>
-
-#data
-<table><plaintext><td>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode.
-Line: 1 Col: 22 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "<td>"
-| <table>
-
-#data
-<plaintext></plaintext>
-#errors
-Line: 1 Col: 11 Unexpected start tag (plaintext). Expected DOCTYPE.
-Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <plaintext>
-| "</plaintext>"
-
-#data
-<!DOCTYPE html><table><tr>TEST
-#errors
-Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 30 Unexpected end of file. Expected table content.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "TEST"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4>
-#errors
-Line: 1 Col: 37 Unexpected start tag (body).
-Line: 1 Col: 53 Unexpected start tag (body).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| t1="1"
-| t2="2"
-| t3="3"
-| t4="4"
-
-#data
-</b test
-#errors
-Line: 1 Col: 8 Unexpected end of file in attribute name.
-Line: 1 Col: 8 End tag contains unexpected attributes.
-Line: 1 Col: 8 Unexpected end tag (b). Expected DOCTYPE.
-Line: 1 Col: 8 Unexpected end tag (b) after the (implied) root element.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html></b test<b &=&amp>X
-#errors
-Line: 1 Col: 32 Named entity didn't end with ';'.
-Line: 1 Col: 33 End tag contains unexpected attributes.
-Line: 1 Col: 33 Unexpected end tag (b) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-
-#data
-<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-Line: 1 Col: 54 Unexpected end of file in the tag name.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| type="text/x-foobar;baz"
-| "X</SCRipt"
-| <body>
-
-#data
-&
-#errors
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&"
-
-#data
-&#
-#errors
-Line: 1 Col: 1 Numeric entity expected. Got end of file instead.
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&#"
-
-#data
-&#X
-#errors
-Line: 1 Col: 3 Numeric entity expected but none found.
-Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&#X"
-
-#data
-&#x
-#errors
-Line: 1 Col: 3 Numeric entity expected but none found.
-Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&#x"
-
-#data
-&#45
-#errors
-Line: 1 Col: 4 Numeric entity didn't end with ';'.
-Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "-"
-
-#data
-&x-test
-#errors
-Line: 1 Col: 1 Named entity expected. Got none.
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&x-test"
-
-#data
-<!doctypehtml><p><li>
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <li>
-
-#data
-<!doctypehtml><p><dt>
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <dt>
-
-#data
-<!doctypehtml><p><dd>
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <dd>
-
-#data
-<!doctypehtml><p><form>
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <form>
-
-#data
-<!DOCTYPE html><p></P>X
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| "X"
-
-#data
-&AMP
-#errors
-Line: 1 Col: 4 Named entity didn't end with ';'.
-Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&"
-
-#data
-&AMp;
-#errors
-Line: 1 Col: 1 Named entity expected. Got none.
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "&AMp;"
-
-#data
-<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>
-#errors
-Line: 1 Col: 110 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>
-
-#data
-<!DOCTYPE html>X</body>X
-#errors
-Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "XX"
-
-#data
-<!DOCTYPE html><!-- X
-#errors
-Line: 1 Col: 21 Unexpected end of file in comment.
-#document
-| <!DOCTYPE html>
-| <!-- X -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><table><caption>test TEST</caption><td>test
-#errors
-Line: 1 Col: 54 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 58 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| "test TEST"
-| <tbody>
-| <tr>
-| <td>
-| "test"
-
-#data
-<!DOCTYPE html><select><option><optgroup>
-#errors
-Line: 1 Col: 41 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| <optgroup>
-
-#data
-<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>
-#errors
-Line: 1 Col: 68 Unexpected select start tag in the select phase treated as select end tag.
-Line: 1 Col: 76 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <optgroup>
-| <option>
-| <option>
-| <option>
-
-#data
-<!DOCTYPE html><select><optgroup><option><optgroup>
-#errors
-Line: 1 Col: 51 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <optgroup>
-| <option>
-| <optgroup>
-
-#data
-<!DOCTYPE html><datalist><option>foo</datalist>bar
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <datalist>
-| <option>
-| "foo"
-| "bar"
-
-#data
-<!DOCTYPE html><font><input><input></font>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <font>
-| <input>
-| <input>
-
-#data
-<!DOCTYPE html><!-- XXX - XXX -->
-#errors
-#document
-| <!DOCTYPE html>
-| <!-- XXX - XXX -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><!-- XXX - XXX
-#errors
-Line: 1 Col: 29 Unexpected end of file in comment (-)
-#document
-| <!DOCTYPE html>
-| <!-- XXX - XXX -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><!-- XXX - XXX - XXX -->
-#errors
-#document
-| <!DOCTYPE html>
-| <!-- XXX - XXX - XXX -->
-| <html>
-| <head>
-| <body>
-
-#data
-<isindex test=x name=x>
-#errors
-Line: 1 Col: 23 Unexpected start tag (isindex). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected start tag isindex. Don't use it!
-#document
-| <html>
-| <head>
-| <body>
-| <form>
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| test="x"
-| <hr>
-
-#data
-test
-test
-#errors
-Line: 2 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "test
-test"
-
-#data
-<!DOCTYPE html><body><title>test</body></title>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <title>
-| "test</body>"
-
-#data
-<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>
-x { content:"</style" } </style>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <title>
-| "X"
-| <meta>
-| name="z"
-| <link>
-| rel="foo"
-| <style>
-| "
-x { content:"</style" } "
-
-#data
-<!DOCTYPE html><select><optgroup></optgroup></select>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <optgroup>
-
-#data
-
-
-#errors
-Line: 2 Col: 1 Unexpected End of file. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html> <html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><script>
-</script> <title>x</title> </head>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <script>
-| "
-"
-| " "
-| <title>
-| "x"
-| " "
-| <body>
-
-#data
-<!DOCTYPE html><html><body><html id=x>
-#errors
-Line: 1 Col: 38 html needs to be the first start tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| id="x"
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html>X</body><html id="x">
-#errors
-Line: 1 Col: 36 Unexpected start tag token (html) in the after body phase.
-Line: 1 Col: 36 html needs to be the first start tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| id="x"
-| <head>
-| <body>
-| "X"
-
-#data
-<!DOCTYPE html><head><html id=x>
-#errors
-Line: 1 Col: 32 html needs to be the first start tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| id="x"
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html>X</html>X
-#errors
-Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "XX"
-
-#data
-<!DOCTYPE html>X</html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X "
-
-#data
-<!DOCTYPE html>X</html><p>X
-#errors
-Line: 1 Col: 26 Unexpected start tag (p).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-| <p>
-| "X"
-
-#data
-<!DOCTYPE html>X<p/x/y/z>
-#errors
-Line: 1 Col: 19 Expected a > after the /.
-Line: 1 Col: 21 Solidus (/) incorrectly placed in tag.
-Line: 1 Col: 23 Solidus (/) incorrectly placed in tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-| <p>
-| x=""
-| y=""
-| z=""
-
-#data
-<!DOCTYPE html><!--x--
-#errors
-Line: 1 Col: 22 Unexpected end of file in comment (--).
-#document
-| <!DOCTYPE html>
-| <!-- x -->
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE html><table><tr><td></p></table>
-#errors
-Line: 1 Col: 34 Unexpected end tag (p). Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <p>
-
-#data
-<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->
-#errors
-Line: 1 Col: 20 Expected space or '>'. Got ''
-Line: 1 Col: 25 Erroneous DOCTYPE.
-Line: 1 Col: 35 Unexpected character in comment found.
-#document
-| <!DOCTYPE <!doctype>
-| <html>
-| <head>
-| <body>
-| ">"
-| <!-- <!--x -->
-| "-->"
-
-#data
-<!doctype html><div><form></form><div></div></div>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-| <form>
-| <div>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests20.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests20.dat
deleted file mode 100644
index 6bd825608..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests20.dat
+++ /dev/null
@@ -1,455 +0,0 @@
-#data
-<!doctype html><p><button><button>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <button>
-
-#data
-<!doctype html><p><button><address>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <address>
-
-#data
-<!doctype html><p><button><blockquote>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <blockquote>
-
-#data
-<!doctype html><p><button><menu>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <menu>
-
-#data
-<!doctype html><p><button><p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <p>
-
-#data
-<!doctype html><p><button><ul>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <ul>
-
-#data
-<!doctype html><p><button><h1>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <h1>
-
-#data
-<!doctype html><p><button><h6>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <h6>
-
-#data
-<!doctype html><p><button><listing>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <listing>
-
-#data
-<!doctype html><p><button><pre>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <pre>
-
-#data
-<!doctype html><p><button><form>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <form>
-
-#data
-<!doctype html><p><button><li>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <li>
-
-#data
-<!doctype html><p><button><dd>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <dd>
-
-#data
-<!doctype html><p><button><dt>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <dt>
-
-#data
-<!doctype html><p><button><plaintext>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <plaintext>
-
-#data
-<!doctype html><p><button><table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <table>
-
-#data
-<!doctype html><p><button><hr>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <hr>
-
-#data
-<!doctype html><p><button><xmp>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <xmp>
-
-#data
-<!doctype html><p><button></p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <button>
-| <p>
-
-#data
-<!doctype html><address><button></address>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <address>
-| <button>
-| "a"
-
-#data
-<!doctype html><address><button></address>a
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <address>
-| <button>
-| "a"
-
-#data
-<p><table></p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <p>
-| <table>
-
-#data
-<!doctype html><svg>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<!doctype html><p><figcaption>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <figcaption>
-
-#data
-<!doctype html><p><summary>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <summary>
-
-#data
-<!doctype html><form><table><form>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <table>
-
-#data
-<!doctype html><table><form><form>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <form>
-
-#data
-<!doctype html><table><form></table><form>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <form>
-
-#data
-<!doctype html><svg><foreignObject><p>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg foreignObject>
-| <p>
-
-#data
-<!doctype html><svg><title>abc
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg title>
-| "abc"
-
-#data
-<option><span><option>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <option>
-| <span>
-| <option>
-
-#data
-<option><option>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <option>
-| <option>
-
-#data
-<math><annotation-xml><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| <div>
-
-#data
-<math><annotation-xml encoding="application/svg+xml"><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding="application/svg+xml"
-| <div>
-
-#data
-<math><annotation-xml encoding="application/xhtml+xml"><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding="application/xhtml+xml"
-| <div>
-
-#data
-<math><annotation-xml encoding="aPPlication/xhtmL+xMl"><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding="aPPlication/xhtmL+xMl"
-| <div>
-
-#data
-<math><annotation-xml encoding="text/html"><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding="text/html"
-| <div>
-
-#data
-<math><annotation-xml encoding="Text/htmL"><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding="Text/htmL"
-| <div>
-
-#data
-<math><annotation-xml encoding=" text/html "><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| encoding=" text/html "
-| <div>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests21.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests21.dat
deleted file mode 100644
index 1260ec03e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests21.dat
+++ /dev/null
@@ -1,221 +0,0 @@
-#data
-<svg><![CDATA[foo]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "foo"
-
-#data
-<math><![CDATA[foo]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| "foo"
-
-#data
-<div><![CDATA[foo]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <!-- [CDATA[foo]] -->
-
-#data
-<svg><![CDATA[foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "foo"
-
-#data
-<svg><![CDATA[foo
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "foo"
-
-#data
-<svg><![CDATA[
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<svg><![CDATA[]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-
-#data
-<svg><![CDATA[]] >]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "]] >"
-
-#data
-<svg><![CDATA[]] >]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "]] >"
-
-#data
-<svg><![CDATA[]]
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "]]"
-
-#data
-<svg><![CDATA[]
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "]"
-
-#data
-<svg><![CDATA[]>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "]>a"
-
-#data
-<svg><foreignObject><div><![CDATA[foo]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg foreignObject>
-| <div>
-| <!-- [CDATA[foo]] -->
-
-#data
-<svg><![CDATA[<svg>]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>"
-
-#data
-<svg><![CDATA[</svg>a]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "</svg>a"
-
-#data
-<svg><![CDATA[<svg>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>a"
-
-#data
-<svg><![CDATA[</svg>a
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "</svg>a"
-
-#data
-<svg><![CDATA[<svg>]]><path>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>"
-| <svg path>
-
-#data
-<svg><![CDATA[<svg>]]></path>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>"
-
-#data
-<svg><![CDATA[<svg>]]><!--path-->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>"
-| <!-- path -->
-
-#data
-<svg><![CDATA[<svg>]]>path
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<svg>path"
-
-#data
-<svg><![CDATA[<!--svg-->]]>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| "<!--svg-->"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests22.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests22.dat
deleted file mode 100644
index aab27b2e9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests22.dat
+++ /dev/null
@@ -1,157 +0,0 @@
-#data
-<a><b><big><em><strong><div>X</a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <big>
-| <em>
-| <strong>
-| <big>
-| <em>
-| <strong>
-| <div>
-| <a>
-| "X"
-
-#data
-<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8>A</a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <b>
-| <div>
-| id="1"
-| <a>
-| <div>
-| id="2"
-| <a>
-| <div>
-| id="3"
-| <a>
-| <div>
-| id="4"
-| <a>
-| <div>
-| id="5"
-| <a>
-| <div>
-| id="6"
-| <a>
-| <div>
-| id="7"
-| <a>
-| <div>
-| id="8"
-| <a>
-| "A"
-
-#data
-<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9>A</a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <b>
-| <div>
-| id="1"
-| <a>
-| <div>
-| id="2"
-| <a>
-| <div>
-| id="3"
-| <a>
-| <div>
-| id="4"
-| <a>
-| <div>
-| id="5"
-| <a>
-| <div>
-| id="6"
-| <a>
-| <div>
-| id="7"
-| <a>
-| <div>
-| id="8"
-| <a>
-| <div>
-| id="9"
-| "A"
-
-#data
-<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9><div id=10>A</a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <b>
-| <b>
-| <div>
-| id="1"
-| <a>
-| <div>
-| id="2"
-| <a>
-| <div>
-| id="3"
-| <a>
-| <div>
-| id="4"
-| <a>
-| <div>
-| id="5"
-| <a>
-| <div>
-| id="6"
-| <a>
-| <div>
-| id="7"
-| <a>
-| <div>
-| id="8"
-| <a>
-| <div>
-| id="9"
-| <div>
-| id="10"
-| "A"
-
-#data
-<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST
-#errors
-Line: 1 Col: 6 Unexpected start tag (cite). Expected DOCTYPE.
-Line: 1 Col: 46 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 50 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <cite>
-| <b>
-| <cite>
-| <i>
-| <cite>
-| <i>
-| <cite>
-| <i>
-| <i>
-| <i>
-| <div>
-| <b>
-| "X"
-| "TEST"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests23.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests23.dat
deleted file mode 100644
index 34d2a73f1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests23.dat
+++ /dev/null
@@ -1,155 +0,0 @@
-#data
-<p><font size=4><font color=red><font size=4><font size=4><font size=4><font size=4><font size=4><font color=red><p>X
-#errors
-3: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-116: Unclosed elements.
-117: End of file seen and there were open elements.
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <font>
-| size="4"
-| <font>
-| color="red"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| color="red"
-| <p>
-| <font>
-| color="red"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| color="red"
-| "X"
-
-#data
-<p><font size=4><font size=4><font size=4><font size=4><p>X
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <p>
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| "X"
-
-#data
-<p><font size=4><font size=4><font size=4><font size="5"><font size=4><p>X
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="5"
-| <font>
-| size="4"
-| <p>
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="5"
-| <font>
-| size="4"
-| "X"
-
-#data
-<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <font>
-| id="a"
-| size="4"
-| <font>
-| id="b"
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| <p>
-| <font>
-| id="a"
-| size="4"
-| <font>
-| id="b"
-| size="4"
-| <font>
-| size="4"
-| <font>
-| size="4"
-| "X"
-
-#data
-<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <b>
-| id="a"
-| <b>
-| id="a"
-| <b>
-| id="a"
-| <b>
-| <object>
-| <b>
-| id="a"
-| <b>
-| id="a"
-| "X"
-| <p>
-| <b>
-| id="a"
-| <b>
-| id="a"
-| <b>
-| id="a"
-| <b>
-| "Y"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests24.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests24.dat
deleted file mode 100644
index f6dc7eb48..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests24.dat
+++ /dev/null
@@ -1,79 +0,0 @@
-#data
-<!DOCTYPE html>&NotEqualTilde;
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "≂̸"
-
-#data
-<!DOCTYPE html>&NotEqualTilde;A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "≂̸A"
-
-#data
-<!DOCTYPE html>&ThickSpace;
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "âŸâ€Š"
-
-#data
-<!DOCTYPE html>&ThickSpace;A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "âŸâ€ŠA"
-
-#data
-<!DOCTYPE html>&NotSubset;
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "⊂⃒"
-
-#data
-<!DOCTYPE html>&NotSubset;A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "⊂⃒A"
-
-#data
-<!DOCTYPE html>&Gopf;
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "ð”¾"
-
-#data
-<!DOCTYPE html>&Gopf;A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "ð”¾A"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests25.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests25.dat
deleted file mode 100644
index 00de7295b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests25.dat
+++ /dev/null
@@ -1,219 +0,0 @@
-#data
-<!DOCTYPE html><body><foo>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <foo>
-| "A"
-
-#data
-<!DOCTYPE html><body><area>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <area>
-| "A"
-
-#data
-<!DOCTYPE html><body><base>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <base>
-| "A"
-
-#data
-<!DOCTYPE html><body><basefont>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <basefont>
-| "A"
-
-#data
-<!DOCTYPE html><body><bgsound>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <bgsound>
-| "A"
-
-#data
-<!DOCTYPE html><body><br>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <br>
-| "A"
-
-#data
-<!DOCTYPE html><body><col>A
-#errors
-26: Stray start tag “colâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "A"
-
-#data
-<!DOCTYPE html><body><command>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <command>
-| "A"
-
-#data
-<!DOCTYPE html><body><embed>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <embed>
-| "A"
-
-#data
-<!DOCTYPE html><body><frame>A
-#errors
-26: Stray start tag “frameâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "A"
-
-#data
-<!DOCTYPE html><body><hr>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <hr>
-| "A"
-
-#data
-<!DOCTYPE html><body><img>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <img>
-| "A"
-
-#data
-<!DOCTYPE html><body><input>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <input>
-| "A"
-
-#data
-<!DOCTYPE html><body><keygen>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <keygen>
-| "A"
-
-#data
-<!DOCTYPE html><body><link>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <link>
-| "A"
-
-#data
-<!DOCTYPE html><body><meta>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <meta>
-| "A"
-
-#data
-<!DOCTYPE html><body><param>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <param>
-| "A"
-
-#data
-<!DOCTYPE html><body><source>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <source>
-| "A"
-
-#data
-<!DOCTYPE html><body><track>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <track>
-| "A"
-
-#data
-<!DOCTYPE html><body><wbr>A
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <wbr>
-| "A"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests26.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests26.dat
deleted file mode 100644
index fae11ffdf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests26.dat
+++ /dev/null
@@ -1,313 +0,0 @@
-#data
-<!DOCTYPE html><body><a href='#1'><nobr>1<nobr></a><br><a href='#2'><nobr>2<nobr></a><br><a href='#3'><nobr>3<nobr></a>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <a>
-| href="#1"
-| <nobr>
-| "1"
-| <nobr>
-| <nobr>
-| <br>
-| <a>
-| href="#2"
-| <a>
-| href="#2"
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| <br>
-| <a>
-| href="#3"
-| <a>
-| href="#3"
-| <nobr>
-| "3"
-| <nobr>
-
-#data
-<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <nobr>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| "3"
-
-#data
-<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| "3"
-| <table>
-
-#data
-<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| "3"
-
-#data
-<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <div>
-| <b>
-| <nobr>
-| <nobr>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| "3"
-
-#data
-<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <nobr>
-| <div>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-| <nobr>
-| <nobr>
-| "3"
-
-#data
-<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <nobr>
-| <ins>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-
-#data
-<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| <nobr>
-| "1"
-| <ins>
-| <nobr>
-| <nobr>
-| <i>
-| "2"
-
-#data
-<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <b>
-| "1"
-| <nobr>
-| <nobr>
-| <i>
-| <i>
-| <nobr>
-| "2"
-
-#data
-<p><code x</code></p>
-
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <code>
-| code=""
-| x<=""
-| <code>
-| code=""
-| x<=""
-| "
-"
-
-#data
-<!DOCTYPE html><svg><foreignObject><p><i></p>a
-#errors
-45: End tag “p†seen, but there were open elements.
-41: Unclosed element “iâ€.
-46: End of file seen and there were open elements.
-35: Unclosed element “foreignObjectâ€.
-20: Unclosed element “svgâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg foreignObject>
-| <p>
-| <i>
-| <i>
-| "a"
-
-#data
-<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a
-#errors
-56: End tag “p†seen, but there were open elements.
-52: Unclosed element “iâ€.
-57: End of file seen and there were open elements.
-46: Unclosed element “foreignObjectâ€.
-31: Unclosed element “svgâ€.
-22: Unclosed element “tableâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg foreignObject>
-| <p>
-| <i>
-| <i>
-| "a"
-
-#data
-<!DOCTYPE html><math><mtext><p><i></p>a
-#errors
-38: End tag “p†seen, but there were open elements.
-34: Unclosed element “iâ€.
-39: End of file in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mtext>
-| <p>
-| <i>
-| <i>
-| "a"
-
-#data
-<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a
-#errors
-53: End tag “p†seen, but there were open elements.
-49: Unclosed element “iâ€.
-54: End of file in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <math math>
-| <math mtext>
-| <p>
-| <i>
-| <i>
-| "a"
-
-#data
-<!DOCTYPE html><body><div><!/div>a
-#errors
-29: Bogus comment.
-34: End of file seen and there were open elements.
-26: Unclosed element “divâ€.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <div>
-| <!-- /div -->
-| "a"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests3.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests3.dat
deleted file mode 100644
index 38dc501be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests3.dat
+++ /dev/null
@@ -1,305 +0,0 @@
-#data
-<head></head><style></style>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected start tag (style) that can be in head. Moved.
-#document
-| <html>
-| <head>
-| <style>
-| <body>
-
-#data
-<head></head><script></script>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved.
-#document
-| <html>
-| <head>
-| <script>
-| <body>
-
-#data
-<head></head><!-- --><style></style><!-- --><script></script>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved.
-#document
-| <html>
-| <head>
-| <style>
-| <script>
-| <!-- -->
-| <!-- -->
-| <body>
-
-#data
-<head></head><!-- -->x<style></style><!-- --><script></script>
-#errors
-Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <!-- -->
-| <body>
-| "x"
-| <style>
-| <!-- -->
-| <script>
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>
-</pre></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>
-foo</pre></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "foo"
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>
-
-foo</pre></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "
-foo"
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>
-foo
-</pre></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "foo
-"
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>x</pre><span>
-</span></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "x"
-| <span>
-| "
-"
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>x
-y</pre></body></html>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "x
-y"
-
-#data
-<!DOCTYPE html><html><head></head><body><pre>x<div>
-y</pre></body></html>
-#errors
-Line: 2 Col: 7 End tag (pre) seen too early. Expected other end tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "x"
-| <div>
-| "
-y"
-
-#data
-<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <pre>
-| "
-A"
-
-#data
-<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>
-#errors
-Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <meta>
-| <body>
-
-#data
-<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>
-#errors
-Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<textarea>foo<span>bar</span><i>baz
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "foo<span>bar</span><i>baz"
-
-#data
-<title>foo<span>bar</em><i>baz
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-Line: 1 Col: 30 Unexpected end of file. Expected end tag (title).
-#document
-| <html>
-| <head>
-| <title>
-| "foo<span>bar</em><i>baz"
-| <body>
-
-#data
-<!DOCTYPE html><textarea>
-</textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-
-#data
-<!DOCTYPE html><textarea>
-foo</textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "foo"
-
-#data
-<!DOCTYPE html><textarea>
-
-foo</textarea>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <textarea>
-| "
-foo"
-
-#data
-<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>
-#errors
-Line: 1 Col: 60 Missing end tag (div, li).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <ul>
-| <li>
-| <div>
-| <p>
-| <li>
-
-#data
-<!doctype html><nobr><nobr><nobr>
-#errors
-Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr).
-Line: 1 Col: 33 Unexpected start tag (nobr) implies end tag (nobr).
-Line: 1 Col: 33 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <nobr>
-| <nobr>
-| <nobr>
-
-#data
-<!doctype html><nobr><nobr></nobr><nobr>
-#errors
-Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr).
-Line: 1 Col: 40 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <nobr>
-| <nobr>
-| <nobr>
-
-#data
-<!doctype html><html><body><p><table></table></body></html>
-#errors
-Not known
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <table>
-
-#data
-<p><table></table>
-#errors
-Not known
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <table>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests4.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests4.dat
deleted file mode 100644
index 3c506326d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests4.dat
+++ /dev/null
@@ -1,59 +0,0 @@
-#data
-direct div content
-#errors
-#document-fragment
-div
-#document
-| "direct div content"
-
-#data
-direct textarea content
-#errors
-#document-fragment
-textarea
-#document
-| "direct textarea content"
-
-#data
-textarea content with <em>pseudo</em> <foo>markup
-#errors
-#document-fragment
-textarea
-#document
-| "textarea content with <em>pseudo</em> <foo>markup"
-
-#data
-this is &#x0043;DATA inside a <style> element
-#errors
-#document-fragment
-style
-#document
-| "this is &#x0043;DATA inside a <style> element"
-
-#data
-</plaintext>
-#errors
-#document-fragment
-plaintext
-#document
-| "</plaintext>"
-
-#data
-setting html's innerHTML
-#errors
-Line: 1 Col: 24 Unexpected EOF in inner html mode.
-#document-fragment
-html
-#document
-| <head>
-| <body>
-| "setting html's innerHTML"
-
-#data
-<title>setting head's innerHTML</title>
-#errors
-#document-fragment
-head
-#document
-| <title>
-| "setting head's innerHTML"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests5.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests5.dat
deleted file mode 100644
index d7b5128a4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests5.dat
+++ /dev/null
@@ -1,191 +0,0 @@
-#data
-<style> <!-- </style>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end of file. Expected end tag (style).
-#document
-| <html>
-| <head>
-| <style>
-| " <!-- "
-| <body>
-| "x"
-
-#data
-<style> <!-- </style> --> </style>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| " <!-- "
-| " "
-| <body>
-| "--> x"
-
-#data
-<style> <!--> </style>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| " <!--> "
-| <body>
-| "x"
-
-#data
-<style> <!---> </style>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| " <!---> "
-| <body>
-| "x"
-
-#data
-<iframe> <!---> </iframe>x
-#errors
-Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <iframe>
-| " <!---> "
-| "x"
-
-#data
-<iframe> <!--- </iframe>->x</iframe> --> </iframe>x
-#errors
-Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <iframe>
-| " <!--- "
-| "->x --> x"
-
-#data
-<script> <!-- </script> --> </script>x
-#errors
-Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <script>
-| " <!-- "
-| " "
-| <body>
-| "--> x"
-
-#data
-<title> <!-- </title> --> </title>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| " <!-- "
-| " "
-| <body>
-| "--> x"
-
-#data
-<textarea> <!--- </textarea>->x</textarea> --> </textarea>x
-#errors
-Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <textarea>
-| " <!--- "
-| "->x --> x"
-
-#data
-<style> <!</-- </style>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <style>
-| " <!</-- "
-| <body>
-| "x"
-
-#data
-<p><xmp></xmp>
-#errors
-XXX: Unknown
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <xmp>
-
-#data
-<xmp> <!-- > --> </xmp>
-#errors
-Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <xmp>
-| " <!-- > --> "
-
-#data
-<title>&amp;</title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| "&"
-| <body>
-
-#data
-<title><!--&amp;--></title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <title>
-| "<!--&-->"
-| <body>
-
-#data
-<title><!--</title>
-#errors
-Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
-Line: 1 Col: 19 Unexpected end of file. Expected end tag (title).
-#document
-| <html>
-| <head>
-| <title>
-| "<!--"
-| <body>
-
-#data
-<noscript><!--</noscript>--></noscript>
-#errors
-Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <noscript>
-| "<!--"
-| <body>
-| "-->"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests6.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests6.dat
deleted file mode 100644
index f28ece4fb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests6.dat
+++ /dev/null
@@ -1,663 +0,0 @@
-#data
-<!doctype html></head> <head>
-#errors
-Line: 1 Col: 29 Unexpected start tag head. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| " "
-| <body>
-
-#data
-<!doctype html><form><div></form><div>
-#errors
-33: End tag "form" seen but there were unclosed elements.
-38: End of file seen and there were open elements.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <form>
-| <div>
-| <div>
-
-#data
-<!doctype html><title>&amp;</title>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "&"
-| <body>
-
-#data
-<!doctype html><title><!--&amp;--></title>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "<!--&-->"
-| <body>
-
-#data
-<!doctype>
-#errors
-Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
-Line: 1 Col: 10 Unexpected > character. Expected DOCTYPE name.
-Line: 1 Col: 10 Erroneous DOCTYPE.
-#document
-| <!DOCTYPE >
-| <html>
-| <head>
-| <body>
-
-#data
-<!---x
-#errors
-Line: 1 Col: 6 Unexpected end of file in comment.
-Line: 1 Col: 6 Unexpected End of file. Expected DOCTYPE.
-#document
-| <!-- -x -->
-| <html>
-| <head>
-| <body>
-
-#data
-<body>
-<div>
-#errors
-Line: 1 Col: 6 Unexpected start tag (body).
-Line: 2 Col: 5 Expected closing tag. Unexpected end of file.
-#document-fragment
-div
-#document
-| "
-"
-| <div>
-
-#data
-<frameset></frameset>
-foo
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 2 Col: 3 Unexpected non-space characters in the after frameset phase. Ignored.
-#document
-| <html>
-| <head>
-| <frameset>
-| "
-"
-
-#data
-<frameset></frameset>
-<noframes>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 2 Col: 10 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <frameset>
-| "
-"
-| <noframes>
-
-#data
-<frameset></frameset>
-<div>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 2 Col: 5 Unexpected start tag (div) in the after frameset phase. Ignored.
-#document
-| <html>
-| <head>
-| <frameset>
-| "
-"
-
-#data
-<frameset></frameset>
-</html>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <frameset>
-| "
-"
-
-#data
-<frameset></frameset>
-</div>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 2 Col: 6 Unexpected end tag (div) in the after frameset phase. Ignored.
-#document
-| <html>
-| <head>
-| <frameset>
-| "
-"
-
-#data
-<form><form>
-#errors
-Line: 1 Col: 6 Unexpected start tag (form). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected start tag (form).
-Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <form>
-
-#data
-<button><button>
-#errors
-Line: 1 Col: 8 Unexpected start tag (button). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected start tag (button) implies end tag (button).
-Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <button>
-| <button>
-
-#data
-<table><tr><td></th>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end tag (th). Ignored.
-Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><caption><td>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end tag (td). Ignored.
-Line: 1 Col: 20 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><caption><div>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 21 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <div>
-
-#data
-</caption><div>
-#errors
-Line: 1 Col: 10 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
-#document-fragment
-caption
-#document
-| <div>
-
-#data
-<table><caption><div></caption>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 31 Unexpected end tag (caption). Missing end tag (div).
-Line: 1 Col: 31 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <div>
-
-#data
-<table><caption></table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 24 Unexpected end table tag in caption. Generates implied end caption.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-
-#data
-</table><div>
-#errors
-Line: 1 Col: 8 Unexpected end table tag in caption. Generates implied end caption.
-Line: 1 Col: 8 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 13 Expected closing tag. Unexpected end of file.
-#document-fragment
-caption
-#document
-| <div>
-
-#data
-<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 23 Unexpected end tag (body). Ignored.
-Line: 1 Col: 29 Unexpected end tag (col). Ignored.
-Line: 1 Col: 40 Unexpected end tag (colgroup). Ignored.
-Line: 1 Col: 47 Unexpected end tag (html). Ignored.
-Line: 1 Col: 55 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 60 Unexpected end tag (td). Ignored.
-Line: 1 Col: 68 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 73 Unexpected end tag (th). Ignored.
-Line: 1 Col: 81 Unexpected end tag (thead). Ignored.
-Line: 1 Col: 86 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 86 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-
-#data
-<table><caption><div></div>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 27 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <div>
-
-#data
-<table><tr><td></body></caption></col></colgroup></html>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end tag (body). Ignored.
-Line: 1 Col: 32 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 38 Unexpected end tag (col). Ignored.
-Line: 1 Col: 49 Unexpected end tag (colgroup). Ignored.
-Line: 1 Col: 56 Unexpected end tag (html). Ignored.
-Line: 1 Col: 56 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-</table></tbody></tfoot></thead></tr><div>
-#errors
-Line: 1 Col: 8 Unexpected end tag (table). Ignored.
-Line: 1 Col: 16 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 24 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 32 Unexpected end tag (thead). Ignored.
-Line: 1 Col: 37 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 42 Expected closing tag. Unexpected end of file.
-#document-fragment
-td
-#document
-| <div>
-
-#data
-<table><colgroup>foo
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 20 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| "foo"
-| <table>
-| <colgroup>
-
-#data
-foo<col>
-#errors
-Line: 1 Col: 3 Unexpected end tag (colgroup). Ignored.
-#document-fragment
-colgroup
-#document
-| <col>
-
-#data
-<table><colgroup></col>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 23 This element (col) has no end tag.
-Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <colgroup>
-
-#data
-<frameset><div>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected start tag token (div) in the frameset phase. Ignored.
-Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-</frameset><frame>
-#errors
-Line: 1 Col: 11 Unexpected end tag token (frameset) in the frameset phase (innerHTML).
-#document-fragment
-frameset
-#document
-| <frame>
-
-#data
-<frameset></div>
-#errors
-Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected end tag token (div) in the frameset phase. Ignored.
-Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-</body><div>
-#errors
-Line: 1 Col: 7 Unexpected end tag (body). Ignored.
-Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
-#document-fragment
-body
-#document
-| <div>
-
-#data
-<table><tr><div>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode.
-Line: 1 Col: 16 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <table>
-| <tbody>
-| <tr>
-
-#data
-</tr><td>
-#errors
-Line: 1 Col: 5 Unexpected end tag (tr). Ignored.
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-</tbody></tfoot></thead><td>
-#errors
-Line: 1 Col: 8 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 16 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 24 Unexpected end tag (thead). Ignored.
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<table><tr><div><td>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode.
-Line: 1 Col: 20 Unexpected implied end tag (div) in the table row phase.
-Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<caption><col><colgroup><tbody><tfoot><thead><tr>
-#errors
-Line: 1 Col: 9 Unexpected start tag (caption).
-Line: 1 Col: 14 Unexpected start tag (col).
-Line: 1 Col: 24 Unexpected start tag (colgroup).
-Line: 1 Col: 31 Unexpected start tag (tbody).
-Line: 1 Col: 38 Unexpected start tag (tfoot).
-Line: 1 Col: 45 Unexpected start tag (thead).
-Line: 1 Col: 49 Unexpected end of file. Expected table content.
-#document-fragment
-tbody
-#document
-| <tr>
-
-#data
-<table><tbody></thead>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 22 Unexpected end tag (thead) in the table body phase. Ignored.
-Line: 1 Col: 22 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-
-#data
-</table><tr>
-#errors
-Line: 1 Col: 8 Unexpected end tag (table). Ignored.
-Line: 1 Col: 12 Unexpected end of file. Expected table content.
-#document-fragment
-tbody
-#document
-| <tr>
-
-#data
-<table><tbody></body></caption></col></colgroup></html></td></th></tr>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 21 Unexpected end tag (body) in the table body phase. Ignored.
-Line: 1 Col: 31 Unexpected end tag (caption) in the table body phase. Ignored.
-Line: 1 Col: 37 Unexpected end tag (col) in the table body phase. Ignored.
-Line: 1 Col: 48 Unexpected end tag (colgroup) in the table body phase. Ignored.
-Line: 1 Col: 55 Unexpected end tag (html) in the table body phase. Ignored.
-Line: 1 Col: 60 Unexpected end tag (td) in the table body phase. Ignored.
-Line: 1 Col: 65 Unexpected end tag (th) in the table body phase. Ignored.
-Line: 1 Col: 70 Unexpected end tag (tr) in the table body phase. Ignored.
-Line: 1 Col: 70 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-
-#data
-<table><tbody></div>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 20 Unexpected end tag (div) in table context caused voodoo mode.
-Line: 1 Col: 20 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 20 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-
-#data
-<table><table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected start tag (table) implies end tag (table).
-Line: 1 Col: 14 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <table>
-
-#data
-<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 14 Unexpected end tag (body). Ignored.
-Line: 1 Col: 24 Unexpected end tag (caption). Ignored.
-Line: 1 Col: 30 Unexpected end tag (col). Ignored.
-Line: 1 Col: 41 Unexpected end tag (colgroup). Ignored.
-Line: 1 Col: 48 Unexpected end tag (html). Ignored.
-Line: 1 Col: 56 Unexpected end tag (tbody). Ignored.
-Line: 1 Col: 61 Unexpected end tag (td). Ignored.
-Line: 1 Col: 69 Unexpected end tag (tfoot). Ignored.
-Line: 1 Col: 74 Unexpected end tag (th). Ignored.
-Line: 1 Col: 82 Unexpected end tag (thead). Ignored.
-Line: 1 Col: 87 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 87 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-
-#data
-</table><tr>
-#errors
-Line: 1 Col: 8 Unexpected end tag (table). Ignored.
-Line: 1 Col: 12 Unexpected end of file. Expected table content.
-#document-fragment
-table
-#document
-| <tbody>
-| <tr>
-
-#data
-<body></body></html>
-#errors
-Line: 1 Col: 20 Unexpected html end tag in inner html mode.
-Line: 1 Col: 20 Unexpected EOF in inner html mode.
-#document-fragment
-html
-#document
-| <head>
-| <body>
-
-#data
-<html><frameset></frameset></html>
-#errors
-Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <frameset>
-| " "
-
-#data
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html></html>
-#errors
-Line: 1 Col: 50 Erroneous DOCTYPE.
-Line: 1 Col: 63 Unexpected end tag (html) after the (implied) root element.
-#document
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "">
-| <html>
-| <head>
-| <body>
-
-#data
-<param><frameset></frameset>
-#errors
-Line: 1 Col: 7 Unexpected start tag (param). Expected DOCTYPE.
-Line: 1 Col: 17 Unexpected start tag (frameset).
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-<source><frameset></frameset>
-#errors
-Line: 1 Col: 7 Unexpected start tag (source). Expected DOCTYPE.
-Line: 1 Col: 17 Unexpected start tag (frameset).
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-<track><frameset></frameset>
-#errors
-Line: 1 Col: 7 Unexpected start tag (track). Expected DOCTYPE.
-Line: 1 Col: 17 Unexpected start tag (frameset).
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-</html><frameset></frameset>
-#errors
-7: End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-17: Stray “frameset†start tag.
-17: “frameset†start tag seen.
-#document
-| <html>
-| <head>
-| <frameset>
-
-#data
-</body><frameset></frameset>
-#errors
-7: End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>â€.
-17: Stray “frameset†start tag.
-17: “frameset†start tag seen.
-#document
-| <html>
-| <head>
-| <frameset>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests7.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests7.dat
deleted file mode 100644
index f5193c660..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests7.dat
+++ /dev/null
@@ -1,390 +0,0 @@
-#data
-<!doctype html><body><title>X</title>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <title>
-| "X"
-
-#data
-<!doctype html><table><title>X</title></table>
-#errors
-Line: 1 Col: 29 Unexpected start tag (title) in table context caused voodoo mode.
-Line: 1 Col: 38 Unexpected end tag (title) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <title>
-| "X"
-| <table>
-
-#data
-<!doctype html><head></head><title>X</title>
-#errors
-Line: 1 Col: 35 Unexpected start tag (title) that can be in head. Moved.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "X"
-| <body>
-
-#data
-<!doctype html></head><title>X</title>
-#errors
-Line: 1 Col: 29 Unexpected start tag (title) that can be in head. Moved.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <title>
-| "X"
-| <body>
-
-#data
-<!doctype html><table><meta></table>
-#errors
-Line: 1 Col: 28 Unexpected start tag (meta) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <meta>
-| <table>
-
-#data
-<!doctype html><table>X<tr><td><table> <meta></table></table>
-#errors
-Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 45 Unexpected start tag (meta) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <meta>
-| <table>
-| " "
-
-#data
-<!doctype html><html> <head>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<!doctype html> <head>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<!doctype html><table><style> <tr>x </style> </table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <style>
-| " <tr>x "
-| " "
-
-#data
-<!doctype html><table><TBODY><script> <tr>x </script> </table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <script>
-| " <tr>x "
-| " "
-
-#data
-<!doctype html><p><applet><p>X</p></applet>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <p>
-| <applet>
-| <p>
-| "X"
-
-#data
-<!doctype html><listing>
-X</listing>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <listing>
-| "X"
-
-#data
-<!doctype html><select><input>X
-#errors
-Line: 1 Col: 30 Unexpected input start tag in the select phase.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <input>
-| "X"
-
-#data
-<!doctype html><select><select>X
-#errors
-Line: 1 Col: 31 Unexpected select start tag in the select phase treated as select end tag.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| "X"
-
-#data
-<!doctype html><table><input type=hidDEN></table>
-#errors
-Line: 1 Col: 41 Unexpected input with type hidden in table context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <input>
-| type="hidDEN"
-
-#data
-<!doctype html><table>X<input type=hidDEN></table>
-#errors
-Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| "X"
-| <table>
-| <input>
-| type="hidDEN"
-
-#data
-<!doctype html><table> <input type=hidDEN></table>
-#errors
-Line: 1 Col: 43 Unexpected input with type hidden in table context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| " "
-| <input>
-| type="hidDEN"
-
-#data
-<!doctype html><table> <input type='hidDEN'></table>
-#errors
-Line: 1 Col: 45 Unexpected input with type hidden in table context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| " "
-| <input>
-| type="hidDEN"
-
-#data
-<!doctype html><table><input type=" hidden"><input type=hidDEN></table>
-#errors
-Line: 1 Col: 44 Unexpected start tag (input) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <input>
-| type=" hidden"
-| <table>
-| <input>
-| type="hidDEN"
-
-#data
-<!doctype html><table><select>X<tr>
-#errors
-Line: 1 Col: 30 Unexpected start tag (select) in table context caused voodoo mode.
-Line: 1 Col: 35 Unexpected table element start tag (trs) in the select in table phase.
-Line: 1 Col: 35 Unexpected end of file. Expected table content.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| "X"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!doctype html><select>X</select>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| "X"
-
-#data
-<!DOCTYPE hTmL><html></html>
-#errors
-Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<!DOCTYPE HTML><html></html>
-#errors
-Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-
-#data
-<body>X</body></body>
-#errors
-Line: 1 Col: 21 Unexpected end tag token (body) in the after body phase.
-Line: 1 Col: 21 Unexpected EOF in inner html mode.
-#document-fragment
-html
-#document
-| <head>
-| <body>
-| "X"
-
-#data
-<div><p>a</x> b
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 13 Unexpected end tag (x). Ignored.
-Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <p>
-| "a b"
-
-#data
-<table><tr><td><code></code> </table>
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <code>
-| " "
-
-#data
-<table><b><tr><td>aaa</td></tr>bbb</table>ccc
-#errors
-XXX: Fix me
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <b>
-| "bbb"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "aaa"
-| <b>
-| "ccc"
-
-#data
-A<table><tr> B</tr> B</table>
-#errors
-XXX: Fix me
-#document
-| <html>
-| <head>
-| <body>
-| "A B B"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-A<table><tr> B</tr> </em>C</table>
-#errors
-XXX: Fix me
-#document
-| <html>
-| <head>
-| <body>
-| "A BC"
-| <table>
-| <tbody>
-| <tr>
-| " "
-
-#data
-<select><keygen>
-#errors
-Not known
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <keygen>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests8.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests8.dat
deleted file mode 100644
index 90e6c919e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests8.dat
+++ /dev/null
@@ -1,148 +0,0 @@
-#data
-<div>
-<div></div>
-</span>x
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 3 Col: 7 Unexpected end tag (span). Ignored.
-Line: 3 Col: 8 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "
-"
-| <div>
-| "
-x"
-
-#data
-<div>x<div></div>
-</span>x
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 2 Col: 7 Unexpected end tag (span). Ignored.
-Line: 2 Col: 8 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "x"
-| <div>
-| "
-x"
-
-#data
-<div>x<div></div>x</span>x
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 25 Unexpected end tag (span). Ignored.
-Line: 1 Col: 26 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "x"
-| <div>
-| "xx"
-
-#data
-<div>x<div></div>y</span>z
-#errors
-Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
-Line: 1 Col: 25 Unexpected end tag (span). Ignored.
-Line: 1 Col: 26 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "x"
-| <div>
-| "yz"
-
-#data
-<table><div>x<div></div>x</span>x
-#errors
-Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
-Line: 1 Col: 12 Unexpected start tag (div) in table context caused voodoo mode.
-Line: 1 Col: 18 Unexpected start tag (div) in table context caused voodoo mode.
-Line: 1 Col: 24 Unexpected end tag (div) in table context caused voodoo mode.
-Line: 1 Col: 32 Unexpected end tag (span) in table context caused voodoo mode.
-Line: 1 Col: 32 Unexpected end tag (span). Ignored.
-Line: 1 Col: 33 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "x"
-| <div>
-| "xx"
-| <table>
-
-#data
-x<table>x
-#errors
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-Line: 1 Col: 9 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 9 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| "xx"
-| <table>
-
-#data
-x<table><table>x
-#errors
-Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected start tag (table) implies end tag (table).
-Line: 1 Col: 16 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 16 Unexpected end of file. Expected table content.
-#document
-| <html>
-| <head>
-| <body>
-| "x"
-| <table>
-| "x"
-| <table>
-
-#data
-<b>a<div></div><div></b>y
-#errors
-Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
-Line: 1 Col: 24 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| "a"
-| <div>
-| <div>
-| <b>
-| "y"
-
-#data
-<a><div><p></a>
-#errors
-Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
-Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
-Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <div>
-| <a>
-| <p>
-| <a>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests9.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests9.dat
deleted file mode 100644
index 554e27aec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests9.dat
+++ /dev/null
@@ -1,457 +0,0 @@
-#data
-<!DOCTYPE html><math></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-
-#data
-<!DOCTYPE html><body><math></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-
-#data
-<!DOCTYPE html><math><mi>
-#errors
-25: End of file in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-
-#data
-<!DOCTYPE html><math><annotation-xml><svg><u>
-#errors
-45: HTML start tag “u†in a foreign namespace context.
-45: End of file seen and there were open elements.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math annotation-xml>
-| <svg svg>
-| <u>
-
-#data
-<!DOCTYPE html><body><select><math></math></select>
-#errors
-Line: 1 Col: 35 Unexpected start tag token (math) in the select phase. Ignored.
-Line: 1 Col: 42 Unexpected end tag (math) in the select phase. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-
-#data
-<!DOCTYPE html><body><select><option><math></math></option></select>
-#errors
-Line: 1 Col: 43 Unexpected start tag token (math) in the select phase. Ignored.
-Line: 1 Col: 50 Unexpected end tag (math) in the select phase. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-
-#data
-<!DOCTYPE html><body><table><math></math></table>
-#errors
-Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 41 Unexpected end tag (math) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <table>
-
-#data
-<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>
-#errors
-Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 53 Unexpected end tag (math) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <table>
-
-#data
-<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>
-#errors
-Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 58 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 65 Unexpected end tag (math) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <table>
-
-#data
-<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>
-#errors
-Line: 1 Col: 41 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 53 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 65 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 72 Unexpected end tag (math) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <table>
-| <tbody>
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>
-#errors
-Line: 1 Col: 45 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 57 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 69 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 76 Unexpected end tag (math) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-
-#data
-<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-#errors
-Line: 1 Col: 70 HTML start tag "p" in a foreign namespace context.
-Line: 1 Col: 81 Unexpected end table tag in caption. Generates implied end caption.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux
-#errors
-Line: 1 Col: 78 Unexpected end table tag in caption. Generates implied end caption.
-Line: 1 Col: 78 Unexpected end tag (caption). Missing end tag (math).
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <caption>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| "baz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-#errors
-Line: 1 Col: 44 Unexpected start tag (math) in table context caused voodoo mode.
-Line: 1 Col: 56 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 68 Unexpected end tag (mi) in table context caused voodoo mode.
-Line: 1 Col: 71 HTML start tag "p" in a foreign namespace context.
-Line: 1 Col: 71 Unexpected start tag (p) in table context caused voodoo mode.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-| <table>
-| <colgroup>
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-#errors
-Line: 1 Col: 50 Unexpected start tag token (math) in the select phase. Ignored.
-Line: 1 Col: 54 Unexpected start tag token (mi) in the select phase. Ignored.
-Line: 1 Col: 62 Unexpected end tag (mi) in the select phase. Ignored.
-Line: 1 Col: 66 Unexpected start tag token (mi) in the select phase. Ignored.
-Line: 1 Col: 74 Unexpected end tag (mi) in the select phase. Ignored.
-Line: 1 Col: 77 Unexpected start tag token (p) in the select phase. Ignored.
-Line: 1 Col: 88 Unexpected table element end tag (tables) in the select in table phase.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <select>
-| "foobarbaz"
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-#errors
-Line: 1 Col: 36 Unexpected start tag (select) in table context caused voodoo mode.
-Line: 1 Col: 42 Unexpected start tag token (math) in the select phase. Ignored.
-Line: 1 Col: 46 Unexpected start tag token (mi) in the select phase. Ignored.
-Line: 1 Col: 54 Unexpected end tag (mi) in the select phase. Ignored.
-Line: 1 Col: 58 Unexpected start tag token (mi) in the select phase. Ignored.
-Line: 1 Col: 66 Unexpected end tag (mi) in the select phase. Ignored.
-Line: 1 Col: 69 Unexpected start tag token (p) in the select phase. Ignored.
-Line: 1 Col: 80 Unexpected table element end tag (tables) in the select in table phase.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <select>
-| "foobarbaz"
-| <table>
-| <p>
-| "quux"
-
-#data
-<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz
-#errors
-Line: 1 Col: 41 Unexpected start tag (math).
-Line: 1 Col: 68 HTML start tag "p" in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz
-#errors
-Line: 1 Col: 34 Unexpected start tag token (math) in the after body phase.
-Line: 1 Col: 61 HTML start tag "p" in a foreign namespace context.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mi>
-| "foo"
-| <math mi>
-| "bar"
-| <p>
-| "baz"
-
-#data
-<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>
-#errors
-Line: 1 Col: 31 Unexpected start tag token (math) in the frameset phase. Ignored.
-Line: 1 Col: 35 Unexpected start tag token (mi) in the frameset phase. Ignored.
-Line: 1 Col: 40 Unexpected end tag token (mi) in the frameset phase. Ignored.
-Line: 1 Col: 44 Unexpected start tag token (mi) in the frameset phase. Ignored.
-Line: 1 Col: 49 Unexpected end tag token (mi) in the frameset phase. Ignored.
-Line: 1 Col: 52 Unexpected start tag token (p) in the frameset phase. Ignored.
-Line: 1 Col: 58 Unexpected start tag token (span) in the frameset phase. Ignored.
-Line: 1 Col: 58 Expected closing tag. Unexpected end of file.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>
-#errors
-Line: 1 Col: 42 Unexpected start tag (math) in the after frameset phase. Ignored.
-Line: 1 Col: 46 Unexpected start tag (mi) in the after frameset phase. Ignored.
-Line: 1 Col: 51 Unexpected end tag (mi) in the after frameset phase. Ignored.
-Line: 1 Col: 55 Unexpected start tag (mi) in the after frameset phase. Ignored.
-Line: 1 Col: 60 Unexpected end tag (mi) in the after frameset phase. Ignored.
-Line: 1 Col: 63 Unexpected start tag (p) in the after frameset phase. Ignored.
-Line: 1 Col: 69 Unexpected start tag (span) in the after frameset phase. Ignored.
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| <math math>
-| xlink href="foo"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <math math>
-| <math mi>
-| xlink href="foo"
-| xml lang="en"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <math math>
-| <math mi>
-| xlink href="foo"
-| xml lang="en"
-
-#data
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| xlink:href="foo"
-| xml:lang="en"
-| <math math>
-| <math mi>
-| xlink href="foo"
-| xml lang="en"
-| "bar"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat
deleted file mode 100644
index 6c78661e0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat
+++ /dev/null
@@ -1,741 +0,0 @@
-#data
-<body><span>
-#errors
-#document-fragment
-body
-#document
-| <span>
-
-#data
-<span><body>
-#errors
-#document-fragment
-body
-#document
-| <span>
-
-#data
-<span><body>
-#errors
-#document-fragment
-div
-#document
-| <span>
-
-#data
-<body><span>
-#errors
-#document-fragment
-html
-#document
-| <head>
-| <body>
-| <span>
-
-#data
-<frameset><span>
-#errors
-#document-fragment
-body
-#document
-| <span>
-
-#data
-<span><frameset>
-#errors
-#document-fragment
-body
-#document
-| <span>
-
-#data
-<span><frameset>
-#errors
-#document-fragment
-div
-#document
-| <span>
-
-#data
-<frameset><span>
-#errors
-#document-fragment
-html
-#document
-| <head>
-| <frameset>
-
-#data
-<table><tr>
-#errors
-#document-fragment
-table
-#document
-| <tbody>
-| <tr>
-
-#data
-</table><tr>
-#errors
-#document-fragment
-table
-#document
-| <tbody>
-| <tr>
-
-#data
-<a>
-#errors
-#document-fragment
-table
-#document
-| <a>
-
-#data
-<a>
-#errors
-#document-fragment
-table
-#document
-| <a>
-
-#data
-<a><caption>a
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <caption>
-| "a"
-
-#data
-<a><colgroup><col>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <colgroup>
-| <col>
-
-#data
-<a><tbody><tr>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <tbody>
-| <tr>
-
-#data
-<a><tfoot><tr>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <tfoot>
-| <tr>
-
-#data
-<a><thead><tr>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <thead>
-| <tr>
-
-#data
-<a><tr>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <tbody>
-| <tr>
-
-#data
-<a><th>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <tbody>
-| <tr>
-| <th>
-
-#data
-<a><td>
-#errors
-#document-fragment
-table
-#document
-| <a>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table></table><tbody>
-#errors
-#document-fragment
-caption
-#document
-| <table>
-
-#data
-</table><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-
-#data
-<span></table>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-
-#data
-</caption><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-
-#data
-<span></caption><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><caption><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><col><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><colgroup><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><html><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><tbody><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><td><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><tfoot><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><thead><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><th><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span><tr><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-<span></table><span>
-#errors
-#document-fragment
-caption
-#document
-| <span>
-| <span>
-
-#data
-</colgroup><col>
-#errors
-#document-fragment
-colgroup
-#document
-| <col>
-
-#data
-<a><col>
-#errors
-#document-fragment
-colgroup
-#document
-| <col>
-
-#data
-<caption><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<col><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<colgroup><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<tbody><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<tfoot><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<thead><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-</table><a>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-
-#data
-<a><tr>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-| <tr>
-
-#data
-<a><td>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-| <tr>
-| <td>
-
-#data
-<a><td>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-| <tr>
-| <td>
-
-#data
-<a><td>
-#errors
-#document-fragment
-tbody
-#document
-| <a>
-| <tr>
-| <td>
-
-#data
-<td><table><tbody><a><tr>
-#errors
-#document-fragment
-tbody
-#document
-| <tr>
-| <td>
-| <a>
-| <table>
-| <tbody>
-| <tr>
-
-#data
-</tr><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<td><table><a><tr></tr><tr>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-| <a>
-| <table>
-| <tbody>
-| <tr>
-| <tr>
-
-#data
-<caption><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<col><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<colgroup><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<tbody><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<tfoot><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<thead><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<tr><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-</table><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-
-#data
-<td><table></table><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-| <table>
-| <td>
-
-#data
-<td><table></table><td>
-#errors
-#document-fragment
-tr
-#document
-| <td>
-| <table>
-| <td>
-
-#data
-<caption><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<col><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<colgroup><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<tbody><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<tfoot><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<th><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<thead><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<tr><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</table><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</tbody><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</td><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</tfoot><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</thead><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</th><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-</tr><a>
-#errors
-#document-fragment
-td
-#document
-| <a>
-
-#data
-<table><td><td>
-#errors
-#document-fragment
-td
-#document
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <td>
-
-#data
-</select><option>
-#errors
-#document-fragment
-select
-#document
-| <option>
-
-#data
-<input><option>
-#errors
-#document-fragment
-select
-#document
-| <option>
-
-#data
-<keygen><option>
-#errors
-#document-fragment
-select
-#document
-| <option>
-
-#data
-<textarea><option>
-#errors
-#document-fragment
-select
-#document
-| <option>
-
-#data
-</html><!--abc-->
-#errors
-#document-fragment
-html
-#document
-| <head>
-| <body>
-| <!-- abc -->
-
-#data
-</frameset><frame>
-#errors
-#document-fragment
-frameset
-#document
-| <frame>
-
-#data
-#errors
-#document-fragment
-html
-#document
-| <head>
-| <body>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat
deleted file mode 100644
index 084199244..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat
+++ /dev/null
@@ -1,261 +0,0 @@
-#data
-<b><p>Bold </b> Not bold</p>
-Also not bold.
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <b>
-| <p>
-| <b>
-| "Bold "
-| " Not bold"
-| "
-Also not bold."
-
-#data
-<html>
-<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain
-<p>I should not be red. <font color=red>Red. <i>Italic and red.</p>
-<p>Italic and red. </i> Red.</font> I should not be red.</p>
-<b>Bold <i>Bold and italic</b> Only Italic </i> Plain
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <font>
-| color="red"
-| <i>
-| "Italic and Red"
-| <i>
-| <p>
-| <font>
-| color="red"
-| "Italic and Red "
-| " Just italic."
-| " Italic only."
-| " Plain
-"
-| <p>
-| "I should not be red. "
-| <font>
-| color="red"
-| "Red. "
-| <i>
-| "Italic and red."
-| <font>
-| color="red"
-| <i>
-| "
-"
-| <p>
-| <font>
-| color="red"
-| <i>
-| "Italic and red. "
-| " Red."
-| " I should not be red."
-| "
-"
-| <b>
-| "Bold "
-| <i>
-| "Bold and italic"
-| <i>
-| " Only Italic "
-| " Plain"
-
-#data
-<html><body>
-<p><font size="7">First paragraph.</p>
-<p>Second paragraph.</p></font>
-<b><p><i>Bold and Italic</b> Italic</p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "
-"
-| <p>
-| <font>
-| size="7"
-| "First paragraph."
-| <font>
-| size="7"
-| "
-"
-| <p>
-| "Second paragraph."
-| "
-"
-| <b>
-| <p>
-| <b>
-| <i>
-| "Bold and Italic"
-| <i>
-| " Italic"
-
-#data
-<html>
-<dl>
-<dt><b>Boo
-<dd>Goo?
-</dl>
-</html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <dl>
-| "
-"
-| <dt>
-| <b>
-| "Boo
-"
-| <dd>
-| <b>
-| "Goo?
-"
-| <b>
-| "
-"
-
-#data
-<html><body>
-<label><a><div>Hello<div>World</div></a></label>
-</body></html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "
-"
-| <label>
-| <a>
-| <div>
-| <a>
-| "Hello"
-| <div>
-| "World"
-| "
-"
-
-#data
-<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <center>
-| " "
-| <font>
-| "a"
-| <font>
-| <img>
-| " "
-| <table>
-| " "
-| <tbody>
-| <tr>
-| <td>
-| " "
-| " "
-| " "
-
-#data
-<table><tr><p><a><p>You should see this text.
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| <a>
-| <p>
-| <a>
-| "You should see this text."
-| <table>
-| <tbody>
-| <tr>
-
-#data
-<TABLE>
-<TR>
-<CENTER><CENTER><TD></TD></TR><TR>
-<FONT>
-<TABLE><tr></tr></TABLE>
-</P>
-<a></font><font></a>
-This page contains an insanely badly-nested tag sequence.
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <center>
-| <center>
-| <font>
-| "
-"
-| <table>
-| "
-"
-| <tbody>
-| <tr>
-| "
-"
-| <td>
-| <tr>
-| "
-"
-| <table>
-| <tbody>
-| <tr>
-| <font>
-| "
-"
-| <p>
-| "
-"
-| <a>
-| <a>
-| <font>
-| <font>
-| "
-This page contains an insanely badly-nested tag sequence."
-
-#data
-<html>
-<body>
-<b><nobr><div>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the
-nobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre>
-</body>
-</html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "
-"
-| <b>
-| <nobr>
-| <div>
-| <b>
-| <nobr>
-| "This text is in a div inside a nobr"
-| "More text that should not be in the nobr, i.e., the
-nobr should have closed the div inside it implicitly. "
-| <pre>
-| "A pre tag outside everything else."
-| "
-
-"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat
deleted file mode 100644
index 9d425e99d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat
+++ /dev/null
@@ -1,610 +0,0 @@
-#data
-Test
-#errors
-Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
-#document
-| <html>
-| <head>
-| <body>
-| "Test"
-
-#data
-<div></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-
-#data
-<div>Test</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "Test"
-
-#data
-<di
-#errors
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<div>Hello</div>
-<script>
-console.log("PASS");
-</script>
-<div>Bye</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "Hello"
-| "
-"
-| <script>
-| "
-console.log("PASS");
-"
-| "
-"
-| <div>
-| "Bye"
-
-#data
-<div foo="bar">Hello</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| foo="bar"
-| "Hello"
-
-#data
-<div>Hello</div>
-<script>
-console.log("FOO<span>BAR</span>BAZ");
-</script>
-<div>Bye</div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| "Hello"
-| "
-"
-| <script>
-| "
-console.log("FOO<span>BAR</span>BAZ");
-"
-| "
-"
-| <div>
-| "Bye"
-
-#data
-<foo bar="baz"></foo><potato quack="duck"></potato>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| bar="baz"
-| <potato>
-| quack="duck"
-
-#data
-<foo bar="baz"><potato quack="duck"></potato></foo>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| bar="baz"
-| <potato>
-| quack="duck"
-
-#data
-<foo></foo bar="baz"><potato></potato quack="duck">
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| <potato>
-
-#data
-</ tttt>
-#errors
-#document
-| <!-- tttt -->
-| <html>
-| <head>
-| <body>
-
-#data
-<div FOO ><img><img></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| foo=""
-| <img>
-| <img>
-
-#data
-<p>Test</p<p>Test2</p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| "TestTest2"
-
-#data
-<rdar://problem/6869687>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <rdar:>
-| 6869687=""
-| problem=""
-
-#data
-<A>test< /A>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| "test< /A>"
-
-#data
-&lt;
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "<"
-
-#data
-<body foo='bar'><body foo='baz' yo='mama'>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| foo="bar"
-| yo="mama"
-
-#data
-<body></br foo="bar"></body>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <br>
-
-#data
-<bdy><br foo="bar"></body>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <bdy>
-| <br>
-| foo="bar"
-
-#data
-<body></body></br foo="bar">
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <br>
-
-#data
-<bdy></body><br foo="bar">
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <bdy>
-| <br>
-| foo="bar"
-
-#data
-<html><body></body></html><!-- Hi there -->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <!-- Hi there -->
-
-#data
-<html><body></body></html>x<!-- Hi there -->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "x"
-| <!-- Hi there -->
-
-#data
-<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "x"
-| <!-- Hi there -->
-| <!-- Again -->
-
-#data
-<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "x"
-| <!-- Hi there -->
-| <!-- Again -->
-
-#data
-<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <rp>
-| "xx"
-
-#data
-<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <ruby>
-| <div>
-| <rt>
-| "xx"
-
-#data
-<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->
-#errors
-#document
-| <html>
-| <head>
-| <frameset>
-| <!-- 1 -->
-| <noframes>
-| "A"
-| <!-- 2 -->
-| <!-- 3 -->
-| <noframes>
-| "B"
-| <!-- 4 -->
-| <noframes>
-| "C"
-| <!-- 5 -->
-| <!-- 6 -->
-
-#data
-<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <select>
-| <option>
-| "A"
-| <option>
-| "B"
-| <select>
-| <option>
-| "C"
-| <option>
-| "D"
-| <select>
-| <option>
-| "E"
-| <option>
-| "F"
-| <select>
-| <option>
-| "G"
-
-#data
-<dd><dd><dt><dt><dd><li><li>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <dd>
-| <dd>
-| <dt>
-| <dt>
-| <dd>
-| <li>
-| <li>
-
-#data
-<div><b></div><div><nobr>a<nobr>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <b>
-| <div>
-| <b>
-| <nobr>
-| "a"
-| <nobr>
-
-#data
-<head></head>
-<body></body>
-#errors
-#document
-| <html>
-| <head>
-| "
-"
-| <body>
-
-#data
-<head></head> <style></style>ddd
-#errors
-#document
-| <html>
-| <head>
-| <style>
-| " "
-| <body>
-| "ddd"
-
-#data
-<kbd><table></kbd><col><select><tr>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <kbd>
-| <select>
-| <table>
-| <colgroup>
-| <col>
-| <tbody>
-| <tr>
-
-#data
-<kbd><table></kbd><col><select><tr></table><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <kbd>
-| <select>
-| <table>
-| <colgroup>
-| <col>
-| <tbody>
-| <tr>
-| <div>
-
-#data
-<a><li><style></style><title></title></a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <li>
-| <a>
-| <style>
-| <title>
-
-#data
-<font></p><p><meta><title></title></font>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <font>
-| <p>
-| <p>
-| <font>
-| <meta>
-| <title>
-
-#data
-<a><center><title></title><a>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <a>
-| <center>
-| <a>
-| <title>
-| <a>
-
-#data
-<svg><title><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg title>
-| <div>
-
-#data
-<svg><title><rect><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg title>
-| <rect>
-| <div>
-
-#data
-<svg><title><svg><div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg title>
-| <svg svg>
-| <div>
-
-#data
-<img <="" FAIL>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <img>
-| <=""
-| fail=""
-
-#data
-<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <ul>
-| <li>
-| <div>
-| id="foo"
-| "A"
-| <li>
-| "B"
-| <div>
-| "C"
-
-#data
-<svg><em><desc></em>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <em>
-| <desc>
-
-#data
-<table><tr><td><svg><desc><td></desc><circle>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| <svg svg>
-| <svg desc>
-| <td>
-| <circle>
-
-#data
-<svg><tfoot></mi><td>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <svg svg>
-| <svg tfoot>
-| <svg td>
-
-#data
-<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <math math>
-| <math mrow>
-| <math mrow>
-| <math mn>
-| "1"
-| <math mi>
-| "a"
-
-#data
-<!doctype html><input type="hidden"><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <frameset>
-
-#data
-<!doctype html><input type="button"><frameset>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-| <head>
-| <body>
-| <input>
-| type="button"
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat
deleted file mode 100644
index 905783d3c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat
+++ /dev/null
@@ -1,159 +0,0 @@
-#data
-<foo bar=qux/>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <foo>
-| bar="qux/"
-
-#data
-<p id="status"><noscript><strong>A</strong></noscript><span>B</span></p>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <p>
-| id="status"
-| <noscript>
-| "<strong>A</strong>"
-| <span>
-| "B"
-
-#data
-<div><sarcasm><div></div></sarcasm></div>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <div>
-| <sarcasm>
-| <div>
-
-#data
-<html><body><img src="" border="0" alt="><div>A</div></body></html>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-
-#data
-<table><td></tbody>A
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| "A"
-| <table>
-| <tbody>
-| <tr>
-| <td>
-
-#data
-<table><td></thead>A
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "A"
-
-#data
-<table><td></tfoot>A
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <tbody>
-| <tr>
-| <td>
-| "A"
-
-#data
-<table><thead><td></tbody>A
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <table>
-| <thead>
-| <tr>
-| <td>
-| "A"
-
-#data
-<legend>test</legend>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <legend>
-| "test"
-
-#data
-<table><input>
-#errors
-#document
-| <html>
-| <head>
-| <body>
-| <input>
-| <table>
-
-#data
-<b><em><dcell><postfield><postfield><postfield><postfield><missing_glyph><missing_glyph><missing_glyph><missing_glyph><hkern><aside></b></em>
-#errors
-#document-fragment
-div
-#document
-| <b>
-| <em>
-| <dcell>
-| <postfield>
-| <postfield>
-| <postfield>
-| <postfield>
-| <missing_glyph>
-| <missing_glyph>
-| <missing_glyph>
-| <missing_glyph>
-| <hkern>
-| <aside>
-| <em>
-| <b>
-
-#data
-<isindex action="x">
-#errors
-#document-fragment
-table
-#document
-| <form>
-| action="x"
-| <hr>
-| <label>
-| "This is a searchable index. Enter search keywords: "
-| <input>
-| name="isindex"
-| <hr>
-
-#data
-<option><XH<optgroup></optgroup>
-#errors
-#document-fragment
-select
-#document
-| <option>
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token.go
deleted file mode 100644
index 893e272a9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token.go
+++ /dev/null
@@ -1,1219 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "bytes"
- "errors"
- "io"
- "strconv"
- "strings"
-
- "golang.org/x/net/html/atom"
-)
-
-// A TokenType is the type of a Token.
-type TokenType uint32
-
-const (
- // ErrorToken means that an error occurred during tokenization.
- ErrorToken TokenType = iota
- // TextToken means a text node.
- TextToken
- // A StartTagToken looks like <a>.
- StartTagToken
- // An EndTagToken looks like </a>.
- EndTagToken
- // A SelfClosingTagToken tag looks like <br/>.
- SelfClosingTagToken
- // A CommentToken looks like <!--x-->.
- CommentToken
- // A DoctypeToken looks like <!DOCTYPE x>
- DoctypeToken
-)
-
-// ErrBufferExceeded means that the buffering limit was exceeded.
-var ErrBufferExceeded = errors.New("max buffer exceeded")
-
-// String returns a string representation of the TokenType.
-func (t TokenType) String() string {
- switch t {
- case ErrorToken:
- return "Error"
- case TextToken:
- return "Text"
- case StartTagToken:
- return "StartTag"
- case EndTagToken:
- return "EndTag"
- case SelfClosingTagToken:
- return "SelfClosingTag"
- case CommentToken:
- return "Comment"
- case DoctypeToken:
- return "Doctype"
- }
- return "Invalid(" + strconv.Itoa(int(t)) + ")"
-}
-
-// An Attribute is an attribute namespace-key-value triple. Namespace is
-// non-empty for foreign attributes like xlink, Key is alphabetic (and hence
-// does not contain escapable characters like '&', '<' or '>'), and Val is
-// unescaped (it looks like "a<b" rather than "a&lt;b").
-//
-// Namespace is only used by the parser, not the tokenizer.
-type Attribute struct {
- Namespace, Key, Val string
-}
-
-// A Token consists of a TokenType and some Data (tag name for start and end
-// tags, content for text, comments and doctypes). A tag Token may also contain
-// a slice of Attributes. Data is unescaped for all Tokens (it looks like "a<b"
-// rather than "a&lt;b"). For tag Tokens, DataAtom is the atom for Data, or
-// zero if Data is not a known tag name.
-type Token struct {
- Type TokenType
- DataAtom atom.Atom
- Data string
- Attr []Attribute
-}
-
-// tagString returns a string representation of a tag Token's Data and Attr.
-func (t Token) tagString() string {
- if len(t.Attr) == 0 {
- return t.Data
- }
- buf := bytes.NewBufferString(t.Data)
- for _, a := range t.Attr {
- buf.WriteByte(' ')
- buf.WriteString(a.Key)
- buf.WriteString(`="`)
- escape(buf, a.Val)
- buf.WriteByte('"')
- }
- return buf.String()
-}
-
-// String returns a string representation of the Token.
-func (t Token) String() string {
- switch t.Type {
- case ErrorToken:
- return ""
- case TextToken:
- return EscapeString(t.Data)
- case StartTagToken:
- return "<" + t.tagString() + ">"
- case EndTagToken:
- return "</" + t.tagString() + ">"
- case SelfClosingTagToken:
- return "<" + t.tagString() + "/>"
- case CommentToken:
- return "<!--" + t.Data + "-->"
- case DoctypeToken:
- return "<!DOCTYPE " + t.Data + ">"
- }
- return "Invalid(" + strconv.Itoa(int(t.Type)) + ")"
-}
-
-// span is a range of bytes in a Tokenizer's buffer. The start is inclusive,
-// the end is exclusive.
-type span struct {
- start, end int
-}
-
-// A Tokenizer returns a stream of HTML Tokens.
-type Tokenizer struct {
- // r is the source of the HTML text.
- r io.Reader
- // tt is the TokenType of the current token.
- tt TokenType
- // err is the first error encountered during tokenization. It is possible
- // for tt != Error && err != nil to hold: this means that Next returned a
- // valid token but the subsequent Next call will return an error token.
- // For example, if the HTML text input was just "plain", then the first
- // Next call would set z.err to io.EOF but return a TextToken, and all
- // subsequent Next calls would return an ErrorToken.
- // err is never reset. Once it becomes non-nil, it stays non-nil.
- err error
- // readErr is the error returned by the io.Reader r. It is separate from
- // err because it is valid for an io.Reader to return (n int, err1 error)
- // such that n > 0 && err1 != nil, and callers should always process the
- // n > 0 bytes before considering the error err1.
- readErr error
- // buf[raw.start:raw.end] holds the raw bytes of the current token.
- // buf[raw.end:] is buffered input that will yield future tokens.
- raw span
- buf []byte
- // maxBuf limits the data buffered in buf. A value of 0 means unlimited.
- maxBuf int
- // buf[data.start:data.end] holds the raw bytes of the current token's data:
- // a text token's text, a tag token's tag name, etc.
- data span
- // pendingAttr is the attribute key and value currently being tokenized.
- // When complete, pendingAttr is pushed onto attr. nAttrReturned is
- // incremented on each call to TagAttr.
- pendingAttr [2]span
- attr [][2]span
- nAttrReturned int
- // rawTag is the "script" in "</script>" that closes the next token. If
- // non-empty, the subsequent call to Next will return a raw or RCDATA text
- // token: one that treats "<p>" as text instead of an element.
- // rawTag's contents are lower-cased.
- rawTag string
- // textIsRaw is whether the current text token's data is not escaped.
- textIsRaw bool
- // convertNUL is whether NUL bytes in the current token's data should
- // be converted into \ufffd replacement characters.
- convertNUL bool
- // allowCDATA is whether CDATA sections are allowed in the current context.
- allowCDATA bool
-}
-
-// AllowCDATA sets whether or not the tokenizer recognizes <![CDATA[foo]]> as
-// the text "foo". The default value is false, which means to recognize it as
-// a bogus comment "<!-- [CDATA[foo]] -->" instead.
-//
-// Strictly speaking, an HTML5 compliant tokenizer should allow CDATA if and
-// only if tokenizing foreign content, such as MathML and SVG. However,
-// tracking foreign-contentness is difficult to do purely in the tokenizer,
-// as opposed to the parser, due to HTML integration points: an <svg> element
-// can contain a <foreignObject> that is foreign-to-SVG but not foreign-to-
-// HTML. For strict compliance with the HTML5 tokenization algorithm, it is the
-// responsibility of the user of a tokenizer to call AllowCDATA as appropriate.
-// In practice, if using the tokenizer without caring whether MathML or SVG
-// CDATA is text or comments, such as tokenizing HTML to find all the anchor
-// text, it is acceptable to ignore this responsibility.
-func (z *Tokenizer) AllowCDATA(allowCDATA bool) {
- z.allowCDATA = allowCDATA
-}
-
-// NextIsNotRawText instructs the tokenizer that the next token should not be
-// considered as 'raw text'. Some elements, such as script and title elements,
-// normally require the next token after the opening tag to be 'raw text' that
-// has no child elements. For example, tokenizing "<title>a<b>c</b>d</title>"
-// yields a start tag token for "<title>", a text token for "a<b>c</b>d", and
-// an end tag token for "</title>". There are no distinct start tag or end tag
-// tokens for the "<b>" and "</b>".
-//
-// This tokenizer implementation will generally look for raw text at the right
-// times. Strictly speaking, an HTML5 compliant tokenizer should not look for
-// raw text if in foreign content: <title> generally needs raw text, but a
-// <title> inside an <svg> does not. Another example is that a <textarea>
-// generally needs raw text, but a <textarea> is not allowed as an immediate
-// child of a <select>; in normal parsing, a <textarea> implies </select>, but
-// one cannot close the implicit element when parsing a <select>'s InnerHTML.
-// Similarly to AllowCDATA, tracking the correct moment to override raw-text-
-// ness is difficult to do purely in the tokenizer, as opposed to the parser.
-// For strict compliance with the HTML5 tokenization algorithm, it is the
-// responsibility of the user of a tokenizer to call NextIsNotRawText as
-// appropriate. In practice, like AllowCDATA, it is acceptable to ignore this
-// responsibility for basic usage.
-//
-// Note that this 'raw text' concept is different from the one offered by the
-// Tokenizer.Raw method.
-func (z *Tokenizer) NextIsNotRawText() {
- z.rawTag = ""
-}
-
-// Err returns the error associated with the most recent ErrorToken token.
-// This is typically io.EOF, meaning the end of tokenization.
-func (z *Tokenizer) Err() error {
- if z.tt != ErrorToken {
- return nil
- }
- return z.err
-}
-
-// readByte returns the next byte from the input stream, doing a buffered read
-// from z.r into z.buf if necessary. z.buf[z.raw.start:z.raw.end] remains a contiguous byte
-// slice that holds all the bytes read so far for the current token.
-// It sets z.err if the underlying reader returns an error.
-// Pre-condition: z.err == nil.
-func (z *Tokenizer) readByte() byte {
- if z.raw.end >= len(z.buf) {
- // Our buffer is exhausted and we have to read from z.r. Check if the
- // previous read resulted in an error.
- if z.readErr != nil {
- z.err = z.readErr
- return 0
- }
- // We copy z.buf[z.raw.start:z.raw.end] to the beginning of z.buf. If the length
- // z.raw.end - z.raw.start is more than half the capacity of z.buf, then we
- // allocate a new buffer before the copy.
- c := cap(z.buf)
- d := z.raw.end - z.raw.start
- var buf1 []byte
- if 2*d > c {
- buf1 = make([]byte, d, 2*c)
- } else {
- buf1 = z.buf[:d]
- }
- copy(buf1, z.buf[z.raw.start:z.raw.end])
- if x := z.raw.start; x != 0 {
- // Adjust the data/attr spans to refer to the same contents after the copy.
- z.data.start -= x
- z.data.end -= x
- z.pendingAttr[0].start -= x
- z.pendingAttr[0].end -= x
- z.pendingAttr[1].start -= x
- z.pendingAttr[1].end -= x
- for i := range z.attr {
- z.attr[i][0].start -= x
- z.attr[i][0].end -= x
- z.attr[i][1].start -= x
- z.attr[i][1].end -= x
- }
- }
- z.raw.start, z.raw.end, z.buf = 0, d, buf1[:d]
- // Now that we have copied the live bytes to the start of the buffer,
- // we read from z.r into the remainder.
- var n int
- n, z.readErr = readAtLeastOneByte(z.r, buf1[d:cap(buf1)])
- if n == 0 {
- z.err = z.readErr
- return 0
- }
- z.buf = buf1[:d+n]
- }
- x := z.buf[z.raw.end]
- z.raw.end++
- if z.maxBuf > 0 && z.raw.end-z.raw.start >= z.maxBuf {
- z.err = ErrBufferExceeded
- return 0
- }
- return x
-}
-
-// Buffered returns a slice containing data buffered but not yet tokenized.
-func (z *Tokenizer) Buffered() []byte {
- return z.buf[z.raw.end:]
-}
-
-// readAtLeastOneByte wraps an io.Reader so that reading cannot return (0, nil).
-// It returns io.ErrNoProgress if the underlying r.Read method returns (0, nil)
-// too many times in succession.
-func readAtLeastOneByte(r io.Reader, b []byte) (int, error) {
- for i := 0; i < 100; i++ {
- n, err := r.Read(b)
- if n != 0 || err != nil {
- return n, err
- }
- }
- return 0, io.ErrNoProgress
-}
-
-// skipWhiteSpace skips past any white space.
-func (z *Tokenizer) skipWhiteSpace() {
- if z.err != nil {
- return
- }
- for {
- c := z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f':
- // No-op.
- default:
- z.raw.end--
- return
- }
- }
-}
-
-// readRawOrRCDATA reads until the next "</foo>", where "foo" is z.rawTag and
-// is typically something like "script" or "textarea".
-func (z *Tokenizer) readRawOrRCDATA() {
- if z.rawTag == "script" {
- z.readScript()
- z.textIsRaw = true
- z.rawTag = ""
- return
- }
-loop:
- for {
- c := z.readByte()
- if z.err != nil {
- break loop
- }
- if c != '<' {
- continue loop
- }
- c = z.readByte()
- if z.err != nil {
- break loop
- }
- if c != '/' {
- continue loop
- }
- if z.readRawEndTag() || z.err != nil {
- break loop
- }
- }
- z.data.end = z.raw.end
- // A textarea's or title's RCDATA can contain escaped entities.
- z.textIsRaw = z.rawTag != "textarea" && z.rawTag != "title"
- z.rawTag = ""
-}
-
-// readRawEndTag attempts to read a tag like "</foo>", where "foo" is z.rawTag.
-// If it succeeds, it backs up the input position to reconsume the tag and
-// returns true. Otherwise it returns false. The opening "</" has already been
-// consumed.
-func (z *Tokenizer) readRawEndTag() bool {
- for i := 0; i < len(z.rawTag); i++ {
- c := z.readByte()
- if z.err != nil {
- return false
- }
- if c != z.rawTag[i] && c != z.rawTag[i]-('a'-'A') {
- z.raw.end--
- return false
- }
- }
- c := z.readByte()
- if z.err != nil {
- return false
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f', '/', '>':
- // The 3 is 2 for the leading "</" plus 1 for the trailing character c.
- z.raw.end -= 3 + len(z.rawTag)
- return true
- }
- z.raw.end--
- return false
-}
-
-// readScript reads until the next </script> tag, following the byzantine
-// rules for escaping/hiding the closing tag.
-func (z *Tokenizer) readScript() {
- defer func() {
- z.data.end = z.raw.end
- }()
- var c byte
-
-scriptData:
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c == '<' {
- goto scriptDataLessThanSign
- }
- goto scriptData
-
-scriptDataLessThanSign:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '/':
- goto scriptDataEndTagOpen
- case '!':
- goto scriptDataEscapeStart
- }
- z.raw.end--
- goto scriptData
-
-scriptDataEndTagOpen:
- if z.readRawEndTag() || z.err != nil {
- return
- }
- goto scriptData
-
-scriptDataEscapeStart:
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c == '-' {
- goto scriptDataEscapeStartDash
- }
- z.raw.end--
- goto scriptData
-
-scriptDataEscapeStartDash:
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c == '-' {
- goto scriptDataEscapedDashDash
- }
- z.raw.end--
- goto scriptData
-
-scriptDataEscaped:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataEscapedDash
- case '<':
- goto scriptDataEscapedLessThanSign
- }
- goto scriptDataEscaped
-
-scriptDataEscapedDash:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataEscapedDashDash
- case '<':
- goto scriptDataEscapedLessThanSign
- }
- goto scriptDataEscaped
-
-scriptDataEscapedDashDash:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataEscapedDashDash
- case '<':
- goto scriptDataEscapedLessThanSign
- case '>':
- goto scriptData
- }
- goto scriptDataEscaped
-
-scriptDataEscapedLessThanSign:
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c == '/' {
- goto scriptDataEscapedEndTagOpen
- }
- if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' {
- goto scriptDataDoubleEscapeStart
- }
- z.raw.end--
- goto scriptData
-
-scriptDataEscapedEndTagOpen:
- if z.readRawEndTag() || z.err != nil {
- return
- }
- goto scriptDataEscaped
-
-scriptDataDoubleEscapeStart:
- z.raw.end--
- for i := 0; i < len("script"); i++ {
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c != "script"[i] && c != "SCRIPT"[i] {
- z.raw.end--
- goto scriptDataEscaped
- }
- }
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f', '/', '>':
- goto scriptDataDoubleEscaped
- }
- z.raw.end--
- goto scriptDataEscaped
-
-scriptDataDoubleEscaped:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataDoubleEscapedDash
- case '<':
- goto scriptDataDoubleEscapedLessThanSign
- }
- goto scriptDataDoubleEscaped
-
-scriptDataDoubleEscapedDash:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataDoubleEscapedDashDash
- case '<':
- goto scriptDataDoubleEscapedLessThanSign
- }
- goto scriptDataDoubleEscaped
-
-scriptDataDoubleEscapedDashDash:
- c = z.readByte()
- if z.err != nil {
- return
- }
- switch c {
- case '-':
- goto scriptDataDoubleEscapedDashDash
- case '<':
- goto scriptDataDoubleEscapedLessThanSign
- case '>':
- goto scriptData
- }
- goto scriptDataDoubleEscaped
-
-scriptDataDoubleEscapedLessThanSign:
- c = z.readByte()
- if z.err != nil {
- return
- }
- if c == '/' {
- goto scriptDataDoubleEscapeEnd
- }
- z.raw.end--
- goto scriptDataDoubleEscaped
-
-scriptDataDoubleEscapeEnd:
- if z.readRawEndTag() {
- z.raw.end += len("</script>")
- goto scriptDataEscaped
- }
- if z.err != nil {
- return
- }
- goto scriptDataDoubleEscaped
-}
-
-// readComment reads the next comment token starting with "<!--". The opening
-// "<!--" has already been consumed.
-func (z *Tokenizer) readComment() {
- z.data.start = z.raw.end
- defer func() {
- if z.data.end < z.data.start {
- // It's a comment with no data, like <!-->.
- z.data.end = z.data.start
- }
- }()
- for dashCount := 2; ; {
- c := z.readByte()
- if z.err != nil {
- // Ignore up to two dashes at EOF.
- if dashCount > 2 {
- dashCount = 2
- }
- z.data.end = z.raw.end - dashCount
- return
- }
- switch c {
- case '-':
- dashCount++
- continue
- case '>':
- if dashCount >= 2 {
- z.data.end = z.raw.end - len("-->")
- return
- }
- case '!':
- if dashCount >= 2 {
- c = z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return
- }
- if c == '>' {
- z.data.end = z.raw.end - len("--!>")
- return
- }
- }
- }
- dashCount = 0
- }
-}
-
-// readUntilCloseAngle reads until the next ">".
-func (z *Tokenizer) readUntilCloseAngle() {
- z.data.start = z.raw.end
- for {
- c := z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return
- }
- if c == '>' {
- z.data.end = z.raw.end - len(">")
- return
- }
- }
-}
-
-// readMarkupDeclaration reads the next token starting with "<!". It might be
-// a "<!--comment-->", a "<!DOCTYPE foo>", a "<![CDATA[section]]>" or
-// "<!a bogus comment". The opening "<!" has already been consumed.
-func (z *Tokenizer) readMarkupDeclaration() TokenType {
- z.data.start = z.raw.end
- var c [2]byte
- for i := 0; i < 2; i++ {
- c[i] = z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return CommentToken
- }
- }
- if c[0] == '-' && c[1] == '-' {
- z.readComment()
- return CommentToken
- }
- z.raw.end -= 2
- if z.readDoctype() {
- return DoctypeToken
- }
- if z.allowCDATA && z.readCDATA() {
- z.convertNUL = true
- return TextToken
- }
- // It's a bogus comment.
- z.readUntilCloseAngle()
- return CommentToken
-}
-
-// readDoctype attempts to read a doctype declaration and returns true if
-// successful. The opening "<!" has already been consumed.
-func (z *Tokenizer) readDoctype() bool {
- const s = "DOCTYPE"
- for i := 0; i < len(s); i++ {
- c := z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return false
- }
- if c != s[i] && c != s[i]+('a'-'A') {
- // Back up to read the fragment of "DOCTYPE" again.
- z.raw.end = z.data.start
- return false
- }
- }
- if z.skipWhiteSpace(); z.err != nil {
- z.data.start = z.raw.end
- z.data.end = z.raw.end
- return true
- }
- z.readUntilCloseAngle()
- return true
-}
-
-// readCDATA attempts to read a CDATA section and returns true if
-// successful. The opening "<!" has already been consumed.
-func (z *Tokenizer) readCDATA() bool {
- const s = "[CDATA["
- for i := 0; i < len(s); i++ {
- c := z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return false
- }
- if c != s[i] {
- // Back up to read the fragment of "[CDATA[" again.
- z.raw.end = z.data.start
- return false
- }
- }
- z.data.start = z.raw.end
- brackets := 0
- for {
- c := z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return true
- }
- switch c {
- case ']':
- brackets++
- case '>':
- if brackets >= 2 {
- z.data.end = z.raw.end - len("]]>")
- return true
- }
- brackets = 0
- default:
- brackets = 0
- }
- }
-}
-
-// startTagIn returns whether the start tag in z.buf[z.data.start:z.data.end]
-// case-insensitively matches any element of ss.
-func (z *Tokenizer) startTagIn(ss ...string) bool {
-loop:
- for _, s := range ss {
- if z.data.end-z.data.start != len(s) {
- continue loop
- }
- for i := 0; i < len(s); i++ {
- c := z.buf[z.data.start+i]
- if 'A' <= c && c <= 'Z' {
- c += 'a' - 'A'
- }
- if c != s[i] {
- continue loop
- }
- }
- return true
- }
- return false
-}
-
-// readStartTag reads the next start tag token. The opening "<a" has already
-// been consumed, where 'a' means anything in [A-Za-z].
-func (z *Tokenizer) readStartTag() TokenType {
- z.readTag(true)
- if z.err != nil {
- return ErrorToken
- }
- // Several tags flag the tokenizer's next token as raw.
- c, raw := z.buf[z.data.start], false
- if 'A' <= c && c <= 'Z' {
- c += 'a' - 'A'
- }
- switch c {
- case 'i':
- raw = z.startTagIn("iframe")
- case 'n':
- raw = z.startTagIn("noembed", "noframes", "noscript")
- case 'p':
- raw = z.startTagIn("plaintext")
- case 's':
- raw = z.startTagIn("script", "style")
- case 't':
- raw = z.startTagIn("textarea", "title")
- case 'x':
- raw = z.startTagIn("xmp")
- }
- if raw {
- z.rawTag = strings.ToLower(string(z.buf[z.data.start:z.data.end]))
- }
- // Look for a self-closing token like "<br/>".
- if z.err == nil && z.buf[z.raw.end-2] == '/' {
- return SelfClosingTagToken
- }
- return StartTagToken
-}
-
-// readTag reads the next tag token and its attributes. If saveAttr, those
-// attributes are saved in z.attr, otherwise z.attr is set to an empty slice.
-// The opening "<a" or "</a" has already been consumed, where 'a' means anything
-// in [A-Za-z].
-func (z *Tokenizer) readTag(saveAttr bool) {
- z.attr = z.attr[:0]
- z.nAttrReturned = 0
- // Read the tag name and attribute key/value pairs.
- z.readTagName()
- if z.skipWhiteSpace(); z.err != nil {
- return
- }
- for {
- c := z.readByte()
- if z.err != nil || c == '>' {
- break
- }
- z.raw.end--
- z.readTagAttrKey()
- z.readTagAttrVal()
- // Save pendingAttr if saveAttr and that attribute has a non-empty key.
- if saveAttr && z.pendingAttr[0].start != z.pendingAttr[0].end {
- z.attr = append(z.attr, z.pendingAttr)
- }
- if z.skipWhiteSpace(); z.err != nil {
- break
- }
- }
-}
-
-// readTagName sets z.data to the "div" in "<div k=v>". The reader (z.raw.end)
-// is positioned such that the first byte of the tag name (the "d" in "<div")
-// has already been consumed.
-func (z *Tokenizer) readTagName() {
- z.data.start = z.raw.end - 1
- for {
- c := z.readByte()
- if z.err != nil {
- z.data.end = z.raw.end
- return
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f':
- z.data.end = z.raw.end - 1
- return
- case '/', '>':
- z.raw.end--
- z.data.end = z.raw.end
- return
- }
- }
-}
-
-// readTagAttrKey sets z.pendingAttr[0] to the "k" in "<div k=v>".
-// Precondition: z.err == nil.
-func (z *Tokenizer) readTagAttrKey() {
- z.pendingAttr[0].start = z.raw.end
- for {
- c := z.readByte()
- if z.err != nil {
- z.pendingAttr[0].end = z.raw.end
- return
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f', '/':
- z.pendingAttr[0].end = z.raw.end - 1
- return
- case '=', '>':
- z.raw.end--
- z.pendingAttr[0].end = z.raw.end
- return
- }
- }
-}
-
-// readTagAttrVal sets z.pendingAttr[1] to the "v" in "<div k=v>".
-func (z *Tokenizer) readTagAttrVal() {
- z.pendingAttr[1].start = z.raw.end
- z.pendingAttr[1].end = z.raw.end
- if z.skipWhiteSpace(); z.err != nil {
- return
- }
- c := z.readByte()
- if z.err != nil {
- return
- }
- if c != '=' {
- z.raw.end--
- return
- }
- if z.skipWhiteSpace(); z.err != nil {
- return
- }
- quote := z.readByte()
- if z.err != nil {
- return
- }
- switch quote {
- case '>':
- z.raw.end--
- return
-
- case '\'', '"':
- z.pendingAttr[1].start = z.raw.end
- for {
- c := z.readByte()
- if z.err != nil {
- z.pendingAttr[1].end = z.raw.end
- return
- }
- if c == quote {
- z.pendingAttr[1].end = z.raw.end - 1
- return
- }
- }
-
- default:
- z.pendingAttr[1].start = z.raw.end - 1
- for {
- c := z.readByte()
- if z.err != nil {
- z.pendingAttr[1].end = z.raw.end
- return
- }
- switch c {
- case ' ', '\n', '\r', '\t', '\f':
- z.pendingAttr[1].end = z.raw.end - 1
- return
- case '>':
- z.raw.end--
- z.pendingAttr[1].end = z.raw.end
- return
- }
- }
- }
-}
-
-// Next scans the next token and returns its type.
-func (z *Tokenizer) Next() TokenType {
- z.raw.start = z.raw.end
- z.data.start = z.raw.end
- z.data.end = z.raw.end
- if z.err != nil {
- z.tt = ErrorToken
- return z.tt
- }
- if z.rawTag != "" {
- if z.rawTag == "plaintext" {
- // Read everything up to EOF.
- for z.err == nil {
- z.readByte()
- }
- z.data.end = z.raw.end
- z.textIsRaw = true
- } else {
- z.readRawOrRCDATA()
- }
- if z.data.end > z.data.start {
- z.tt = TextToken
- z.convertNUL = true
- return z.tt
- }
- }
- z.textIsRaw = false
- z.convertNUL = false
-
-loop:
- for {
- c := z.readByte()
- if z.err != nil {
- break loop
- }
- if c != '<' {
- continue loop
- }
-
- // Check if the '<' we have just read is part of a tag, comment
- // or doctype. If not, it's part of the accumulated text token.
- c = z.readByte()
- if z.err != nil {
- break loop
- }
- var tokenType TokenType
- switch {
- case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z':
- tokenType = StartTagToken
- case c == '/':
- tokenType = EndTagToken
- case c == '!' || c == '?':
- // We use CommentToken to mean any of "<!--actual comments-->",
- // "<!DOCTYPE declarations>" and "<?xml processing instructions?>".
- tokenType = CommentToken
- default:
- // Reconsume the current character.
- z.raw.end--
- continue
- }
-
- // We have a non-text token, but we might have accumulated some text
- // before that. If so, we return the text first, and return the non-
- // text token on the subsequent call to Next.
- if x := z.raw.end - len("<a"); z.raw.start < x {
- z.raw.end = x
- z.data.end = x
- z.tt = TextToken
- return z.tt
- }
- switch tokenType {
- case StartTagToken:
- z.tt = z.readStartTag()
- return z.tt
- case EndTagToken:
- c = z.readByte()
- if z.err != nil {
- break loop
- }
- if c == '>' {
- // "</>" does not generate a token at all. Generate an empty comment
- // to allow passthrough clients to pick up the data using Raw.
- // Reset the tokenizer state and start again.
- z.tt = CommentToken
- return z.tt
- }
- if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' {
- z.readTag(false)
- if z.err != nil {
- z.tt = ErrorToken
- } else {
- z.tt = EndTagToken
- }
- return z.tt
- }
- z.raw.end--
- z.readUntilCloseAngle()
- z.tt = CommentToken
- return z.tt
- case CommentToken:
- if c == '!' {
- z.tt = z.readMarkupDeclaration()
- return z.tt
- }
- z.raw.end--
- z.readUntilCloseAngle()
- z.tt = CommentToken
- return z.tt
- }
- }
- if z.raw.start < z.raw.end {
- z.data.end = z.raw.end
- z.tt = TextToken
- return z.tt
- }
- z.tt = ErrorToken
- return z.tt
-}
-
-// Raw returns the unmodified text of the current token. Calling Next, Token,
-// Text, TagName or TagAttr may change the contents of the returned slice.
-func (z *Tokenizer) Raw() []byte {
- return z.buf[z.raw.start:z.raw.end]
-}
-
-// convertNewlines converts "\r" and "\r\n" in s to "\n".
-// The conversion happens in place, but the resulting slice may be shorter.
-func convertNewlines(s []byte) []byte {
- for i, c := range s {
- if c != '\r' {
- continue
- }
-
- src := i + 1
- if src >= len(s) || s[src] != '\n' {
- s[i] = '\n'
- continue
- }
-
- dst := i
- for src < len(s) {
- if s[src] == '\r' {
- if src+1 < len(s) && s[src+1] == '\n' {
- src++
- }
- s[dst] = '\n'
- } else {
- s[dst] = s[src]
- }
- src++
- dst++
- }
- return s[:dst]
- }
- return s
-}
-
-var (
- nul = []byte("\x00")
- replacement = []byte("\ufffd")
-)
-
-// Text returns the unescaped text of a text, comment or doctype token. The
-// contents of the returned slice may change on the next call to Next.
-func (z *Tokenizer) Text() []byte {
- switch z.tt {
- case TextToken, CommentToken, DoctypeToken:
- s := z.buf[z.data.start:z.data.end]
- z.data.start = z.raw.end
- z.data.end = z.raw.end
- s = convertNewlines(s)
- if (z.convertNUL || z.tt == CommentToken) && bytes.Contains(s, nul) {
- s = bytes.Replace(s, nul, replacement, -1)
- }
- if !z.textIsRaw {
- s = unescape(s, false)
- }
- return s
- }
- return nil
-}
-
-// TagName returns the lower-cased name of a tag token (the `img` out of
-// `<IMG SRC="foo">`) and whether the tag has attributes.
-// The contents of the returned slice may change on the next call to Next.
-func (z *Tokenizer) TagName() (name []byte, hasAttr bool) {
- if z.data.start < z.data.end {
- switch z.tt {
- case StartTagToken, EndTagToken, SelfClosingTagToken:
- s := z.buf[z.data.start:z.data.end]
- z.data.start = z.raw.end
- z.data.end = z.raw.end
- return lower(s), z.nAttrReturned < len(z.attr)
- }
- }
- return nil, false
-}
-
-// TagAttr returns the lower-cased key and unescaped value of the next unparsed
-// attribute for the current tag token and whether there are more attributes.
-// The contents of the returned slices may change on the next call to Next.
-func (z *Tokenizer) TagAttr() (key, val []byte, moreAttr bool) {
- if z.nAttrReturned < len(z.attr) {
- switch z.tt {
- case StartTagToken, SelfClosingTagToken:
- x := z.attr[z.nAttrReturned]
- z.nAttrReturned++
- key = z.buf[x[0].start:x[0].end]
- val = z.buf[x[1].start:x[1].end]
- return lower(key), unescape(convertNewlines(val), true), z.nAttrReturned < len(z.attr)
- }
- }
- return nil, nil, false
-}
-
-// Token returns the next Token. The result's Data and Attr values remain valid
-// after subsequent Next calls.
-func (z *Tokenizer) Token() Token {
- t := Token{Type: z.tt}
- switch z.tt {
- case TextToken, CommentToken, DoctypeToken:
- t.Data = string(z.Text())
- case StartTagToken, SelfClosingTagToken, EndTagToken:
- name, moreAttr := z.TagName()
- for moreAttr {
- var key, val []byte
- key, val, moreAttr = z.TagAttr()
- t.Attr = append(t.Attr, Attribute{"", atom.String(key), string(val)})
- }
- if a := atom.Lookup(name); a != 0 {
- t.DataAtom, t.Data = a, a.String()
- } else {
- t.DataAtom, t.Data = 0, string(name)
- }
- }
- return t
-}
-
-// SetMaxBuf sets a limit on the amount of data buffered during tokenization.
-// A value of 0 means unlimited.
-func (z *Tokenizer) SetMaxBuf(n int) {
- z.maxBuf = n
-}
-
-// NewTokenizer returns a new HTML Tokenizer for the given Reader.
-// The input is assumed to be UTF-8 encoded.
-func NewTokenizer(r io.Reader) *Tokenizer {
- return NewTokenizerFragment(r, "")
-}
-
-// NewTokenizerFragment returns a new HTML Tokenizer for the given Reader, for
-// tokenizing an existing element's InnerHTML fragment. contextTag is that
-// element's tag, such as "div" or "iframe".
-//
-// For example, how the InnerHTML "a<b" is tokenized depends on whether it is
-// for a <p> tag or a <script> tag.
-//
-// The input is assumed to be UTF-8 encoded.
-func NewTokenizerFragment(r io.Reader, contextTag string) *Tokenizer {
- z := &Tokenizer{
- r: r,
- buf: make([]byte, 0, 4096),
- }
- if contextTag != "" {
- switch s := strings.ToLower(contextTag); s {
- case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "title", "textarea", "xmp":
- z.rawTag = s
- }
- }
- return z
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token_test.go
deleted file mode 100644
index 20221c328..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/html/token_test.go
+++ /dev/null
@@ -1,748 +0,0 @@
-// Copyright 2010 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 file.
-
-package html
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "reflect"
- "runtime"
- "strings"
- "testing"
-)
-
-type tokenTest struct {
- // A short description of the test case.
- desc string
- // The HTML to parse.
- html string
- // The string representations of the expected tokens, joined by '$'.
- golden string
-}
-
-var tokenTests = []tokenTest{
- {
- "empty",
- "",
- "",
- },
- // A single text node. The tokenizer should not break text nodes on whitespace,
- // nor should it normalize whitespace within a text node.
- {
- "text",
- "foo bar",
- "foo bar",
- },
- // An entity.
- {
- "entity",
- "one &lt; two",
- "one &lt; two",
- },
- // A start, self-closing and end tag. The tokenizer does not care if the start
- // and end tokens don't match; that is the job of the parser.
- {
- "tags",
- "<a>b<c/>d</e>",
- "<a>$b$<c/>$d$</e>",
- },
- // Angle brackets that aren't a tag.
- {
- "not a tag #0",
- "<",
- "&lt;",
- },
- {
- "not a tag #1",
- "</",
- "&lt;/",
- },
- {
- "not a tag #2",
- "</>",
- "<!---->",
- },
- {
- "not a tag #3",
- "a</>b",
- "a$<!---->$b",
- },
- {
- "not a tag #4",
- "</ >",
- "<!-- -->",
- },
- {
- "not a tag #5",
- "</.",
- "<!--.-->",
- },
- {
- "not a tag #6",
- "</.>",
- "<!--.-->",
- },
- {
- "not a tag #7",
- "a < b",
- "a &lt; b",
- },
- {
- "not a tag #8",
- "<.>",
- "&lt;.&gt;",
- },
- {
- "not a tag #9",
- "a<<<b>>>c",
- "a&lt;&lt;$<b>$&gt;&gt;c",
- },
- {
- "not a tag #10",
- "if x<0 and y < 0 then x*y>0",
- "if x&lt;0 and y &lt; 0 then x*y&gt;0",
- },
- {
- "not a tag #11",
- "<<p>",
- "&lt;$<p>",
- },
- // EOF in a tag name.
- {
- "tag name eof #0",
- "<a",
- "",
- },
- {
- "tag name eof #1",
- "<a ",
- "",
- },
- {
- "tag name eof #2",
- "a<b",
- "a",
- },
- {
- "tag name eof #3",
- "<a><b",
- "<a>",
- },
- {
- "tag name eof #4",
- `<a x`,
- ``,
- },
- // Some malformed tags that are missing a '>'.
- {
- "malformed tag #0",
- `<p</p>`,
- `<p< p="">`,
- },
- {
- "malformed tag #1",
- `<p </p>`,
- `<p <="" p="">`,
- },
- {
- "malformed tag #2",
- `<p id`,
- ``,
- },
- {
- "malformed tag #3",
- `<p id=`,
- ``,
- },
- {
- "malformed tag #4",
- `<p id=>`,
- `<p id="">`,
- },
- {
- "malformed tag #5",
- `<p id=0`,
- ``,
- },
- {
- "malformed tag #6",
- `<p id=0</p>`,
- `<p id="0&lt;/p">`,
- },
- {
- "malformed tag #7",
- `<p id="0</p>`,
- ``,
- },
- {
- "malformed tag #8",
- `<p id="0"</p>`,
- `<p id="0" <="" p="">`,
- },
- {
- "malformed tag #9",
- `<p></p id`,
- `<p>`,
- },
- // Raw text and RCDATA.
- {
- "basic raw text",
- "<script><a></b></script>",
- "<script>$&lt;a&gt;&lt;/b&gt;$</script>",
- },
- {
- "unfinished script end tag",
- "<SCRIPT>a</SCR",
- "<script>$a&lt;/SCR",
- },
- {
- "broken script end tag",
- "<SCRIPT>a</SCR ipt>",
- "<script>$a&lt;/SCR ipt&gt;",
- },
- {
- "EOF in script end tag",
- "<SCRIPT>a</SCRipt",
- "<script>$a&lt;/SCRipt",
- },
- {
- "scriptx end tag",
- "<SCRIPT>a</SCRiptx",
- "<script>$a&lt;/SCRiptx",
- },
- {
- "' ' completes script end tag",
- "<SCRIPT>a</SCRipt ",
- "<script>$a",
- },
- {
- "'>' completes script end tag",
- "<SCRIPT>a</SCRipt>",
- "<script>$a$</script>",
- },
- {
- "self-closing script end tag",
- "<SCRIPT>a</SCRipt/>",
- "<script>$a$</script>",
- },
- {
- "nested script tag",
- "<SCRIPT>a</SCRipt<script>",
- "<script>$a&lt;/SCRipt&lt;script&gt;",
- },
- {
- "script end tag after unfinished",
- "<SCRIPT>a</SCRipt</script>",
- "<script>$a&lt;/SCRipt$</script>",
- },
- {
- "script/style mismatched tags",
- "<script>a</style>",
- "<script>$a&lt;/style&gt;",
- },
- {
- "style element with entity",
- "<style>&apos;",
- "<style>$&amp;apos;",
- },
- {
- "textarea with tag",
- "<textarea><div></textarea>",
- "<textarea>$&lt;div&gt;$</textarea>",
- },
- {
- "title with tag and entity",
- "<title><b>K&amp;R C</b></title>",
- "<title>$&lt;b&gt;K&amp;R C&lt;/b&gt;$</title>",
- },
- // DOCTYPE tests.
- {
- "Proper DOCTYPE",
- "<!DOCTYPE html>",
- "<!DOCTYPE html>",
- },
- {
- "DOCTYPE with no space",
- "<!doctypehtml>",
- "<!DOCTYPE html>",
- },
- {
- "DOCTYPE with two spaces",
- "<!doctype html>",
- "<!DOCTYPE html>",
- },
- {
- "looks like DOCTYPE but isn't",
- "<!DOCUMENT html>",
- "<!--DOCUMENT html-->",
- },
- {
- "DOCTYPE at EOF",
- "<!DOCtype",
- "<!DOCTYPE >",
- },
- // XML processing instructions.
- {
- "XML processing instruction",
- "<?xml?>",
- "<!--?xml?-->",
- },
- // Comments.
- {
- "comment0",
- "abc<b><!-- skipme --></b>def",
- "abc$<b>$<!-- skipme -->$</b>$def",
- },
- {
- "comment1",
- "a<!-->z",
- "a$<!---->$z",
- },
- {
- "comment2",
- "a<!--->z",
- "a$<!---->$z",
- },
- {
- "comment3",
- "a<!--x>-->z",
- "a$<!--x>-->$z",
- },
- {
- "comment4",
- "a<!--x->-->z",
- "a$<!--x->-->$z",
- },
- {
- "comment5",
- "a<!>z",
- "a$<!---->$z",
- },
- {
- "comment6",
- "a<!->z",
- "a$<!----->$z",
- },
- {
- "comment7",
- "a<!---<>z",
- "a$<!---<>z-->",
- },
- {
- "comment8",
- "a<!--z",
- "a$<!--z-->",
- },
- {
- "comment9",
- "a<!--z-",
- "a$<!--z-->",
- },
- {
- "comment10",
- "a<!--z--",
- "a$<!--z-->",
- },
- {
- "comment11",
- "a<!--z---",
- "a$<!--z--->",
- },
- {
- "comment12",
- "a<!--z----",
- "a$<!--z---->",
- },
- {
- "comment13",
- "a<!--x--!>z",
- "a$<!--x-->$z",
- },
- // An attribute with a backslash.
- {
- "backslash",
- `<p id="a\"b">`,
- `<p id="a\" b"="">`,
- },
- // Entities, tag name and attribute key lower-casing, and whitespace
- // normalization within a tag.
- {
- "tricky",
- "<p \t\n iD=\"a&quot;B\" foo=\"bar\"><EM>te&lt;&amp;;xt</em></p>",
- `<p id="a&#34;B" foo="bar">$<em>$te&lt;&amp;;xt$</em>$</p>`,
- },
- // A nonexistent entity. Tokenizing and converting back to a string should
- // escape the "&" to become "&amp;".
- {
- "noSuchEntity",
- `<a b="c&noSuchEntity;d">&lt;&alsoDoesntExist;&`,
- `<a b="c&amp;noSuchEntity;d">$&lt;&amp;alsoDoesntExist;&amp;`,
- },
- {
- "entity without semicolon",
- `&notit;&notin;<a b="q=z&amp=5&notice=hello&not;=world">`,
- `¬it;∉$<a b="q=z&amp;amp=5&amp;notice=hello¬=world">`,
- },
- {
- "entity with digits",
- "&frac12;",
- "½",
- },
- // Attribute tests:
- // http://dev.w3.org/html5/pf-summary/Overview.html#attributes
- {
- "Empty attribute",
- `<input disabled FOO>`,
- `<input disabled="" foo="">`,
- },
- {
- "Empty attribute, whitespace",
- `<input disabled FOO >`,
- `<input disabled="" foo="">`,
- },
- {
- "Unquoted attribute value",
- `<input value=yes FOO=BAR>`,
- `<input value="yes" foo="BAR">`,
- },
- {
- "Unquoted attribute value, spaces",
- `<input value = yes FOO = BAR>`,
- `<input value="yes" foo="BAR">`,
- },
- {
- "Unquoted attribute value, trailing space",
- `<input value=yes FOO=BAR >`,
- `<input value="yes" foo="BAR">`,
- },
- {
- "Single-quoted attribute value",
- `<input value='yes' FOO='BAR'>`,
- `<input value="yes" foo="BAR">`,
- },
- {
- "Single-quoted attribute value, trailing space",
- `<input value='yes' FOO='BAR' >`,
- `<input value="yes" foo="BAR">`,
- },
- {
- "Double-quoted attribute value",
- `<input value="I'm an attribute" FOO="BAR">`,
- `<input value="I&#39;m an attribute" foo="BAR">`,
- },
- {
- "Attribute name characters",
- `<meta http-equiv="content-type">`,
- `<meta http-equiv="content-type">`,
- },
- {
- "Mixed attributes",
- `a<P V="0 1" w='2' X=3 y>z`,
- `a$<p v="0 1" w="2" x="3" y="">$z`,
- },
- {
- "Attributes with a solitary single quote",
- `<p id=can't><p id=won't>`,
- `<p id="can&#39;t">$<p id="won&#39;t">`,
- },
-}
-
-func TestTokenizer(t *testing.T) {
-loop:
- for _, tt := range tokenTests {
- z := NewTokenizer(strings.NewReader(tt.html))
- if tt.golden != "" {
- for i, s := range strings.Split(tt.golden, "$") {
- if z.Next() == ErrorToken {
- t.Errorf("%s token %d: want %q got error %v", tt.desc, i, s, z.Err())
- continue loop
- }
- actual := z.Token().String()
- if s != actual {
- t.Errorf("%s token %d: want %q got %q", tt.desc, i, s, actual)
- continue loop
- }
- }
- }
- z.Next()
- if z.Err() != io.EOF {
- t.Errorf("%s: want EOF got %q", tt.desc, z.Err())
- }
- }
-}
-
-func TestMaxBuffer(t *testing.T) {
- // Exceeding the maximum buffer size generates ErrBufferExceeded.
- z := NewTokenizer(strings.NewReader("<" + strings.Repeat("t", 10)))
- z.SetMaxBuf(5)
- tt := z.Next()
- if got, want := tt, ErrorToken; got != want {
- t.Fatalf("token type: got: %v want: %v", got, want)
- }
- if got, want := z.Err(), ErrBufferExceeded; got != want {
- t.Errorf("error type: got: %v want: %v", got, want)
- }
- if got, want := string(z.Raw()), "<tttt"; got != want {
- t.Fatalf("buffered before overflow: got: %q want: %q", got, want)
- }
-}
-
-func TestMaxBufferReconstruction(t *testing.T) {
- // Exceeding the maximum buffer size at any point while tokenizing permits
- // reconstructing the original input.
-tests:
- for _, test := range tokenTests {
- for maxBuf := 1; ; maxBuf++ {
- r := strings.NewReader(test.html)
- z := NewTokenizer(r)
- z.SetMaxBuf(maxBuf)
- var tokenized bytes.Buffer
- for {
- tt := z.Next()
- tokenized.Write(z.Raw())
- if tt == ErrorToken {
- if err := z.Err(); err != io.EOF && err != ErrBufferExceeded {
- t.Errorf("%s: unexpected error: %v", test.desc, err)
- }
- break
- }
- }
- // Anything tokenized along with untokenized input or data left in the reader.
- assembled, err := ioutil.ReadAll(io.MultiReader(&tokenized, bytes.NewReader(z.Buffered()), r))
- if err != nil {
- t.Errorf("%s: ReadAll: %v", test.desc, err)
- continue tests
- }
- if got, want := string(assembled), test.html; got != want {
- t.Errorf("%s: reassembled html:\n got: %q\nwant: %q", test.desc, got, want)
- continue tests
- }
- // EOF indicates that we completed tokenization and hence found the max
- // maxBuf that generates ErrBufferExceeded, so continue to the next test.
- if z.Err() == io.EOF {
- break
- }
- } // buffer sizes
- } // tests
-}
-
-func TestPassthrough(t *testing.T) {
- // Accumulating the raw output for each parse event should reconstruct the
- // original input.
- for _, test := range tokenTests {
- z := NewTokenizer(strings.NewReader(test.html))
- var parsed bytes.Buffer
- for {
- tt := z.Next()
- parsed.Write(z.Raw())
- if tt == ErrorToken {
- break
- }
- }
- if got, want := parsed.String(), test.html; got != want {
- t.Errorf("%s: parsed output:\n got: %q\nwant: %q", test.desc, got, want)
- }
- }
-}
-
-func TestBufAPI(t *testing.T) {
- s := "0<a>1</a>2<b>3<a>4<a>5</a>6</b>7</a>8<a/>9"
- z := NewTokenizer(bytes.NewBufferString(s))
- var result bytes.Buffer
- depth := 0
-loop:
- for {
- tt := z.Next()
- switch tt {
- case ErrorToken:
- if z.Err() != io.EOF {
- t.Error(z.Err())
- }
- break loop
- case TextToken:
- if depth > 0 {
- result.Write(z.Text())
- }
- case StartTagToken, EndTagToken:
- tn, _ := z.TagName()
- if len(tn) == 1 && tn[0] == 'a' {
- if tt == StartTagToken {
- depth++
- } else {
- depth--
- }
- }
- }
- }
- u := "14567"
- v := string(result.Bytes())
- if u != v {
- t.Errorf("TestBufAPI: want %q got %q", u, v)
- }
-}
-
-func TestConvertNewlines(t *testing.T) {
- testCases := map[string]string{
- "Mac\rDOS\r\nUnix\n": "Mac\nDOS\nUnix\n",
- "Unix\nMac\rDOS\r\n": "Unix\nMac\nDOS\n",
- "DOS\r\nDOS\r\nDOS\r\n": "DOS\nDOS\nDOS\n",
- "": "",
- "\n": "\n",
- "\n\r": "\n\n",
- "\r": "\n",
- "\r\n": "\n",
- "\r\n\n": "\n\n",
- "\r\n\r": "\n\n",
- "\r\n\r\n": "\n\n",
- "\r\r": "\n\n",
- "\r\r\n": "\n\n",
- "\r\r\n\n": "\n\n\n",
- "\r\r\r\n": "\n\n\n",
- "\r \n": "\n \n",
- "xyz": "xyz",
- }
- for in, want := range testCases {
- if got := string(convertNewlines([]byte(in))); got != want {
- t.Errorf("input %q: got %q, want %q", in, got, want)
- }
- }
-}
-
-func TestReaderEdgeCases(t *testing.T) {
- const s = "<p>An io.Reader can return (0, nil) or (n, io.EOF).</p>"
- testCases := []io.Reader{
- &zeroOneByteReader{s: s},
- &eofStringsReader{s: s},
- &stuckReader{},
- }
- for i, tc := range testCases {
- got := []TokenType{}
- z := NewTokenizer(tc)
- for {
- tt := z.Next()
- if tt == ErrorToken {
- break
- }
- got = append(got, tt)
- }
- if err := z.Err(); err != nil && err != io.EOF {
- if err != io.ErrNoProgress {
- t.Errorf("i=%d: %v", i, err)
- }
- continue
- }
- want := []TokenType{
- StartTagToken,
- TextToken,
- EndTagToken,
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("i=%d: got %v, want %v", i, got, want)
- continue
- }
- }
-}
-
-// zeroOneByteReader is like a strings.Reader that alternates between
-// returning 0 bytes and 1 byte at a time.
-type zeroOneByteReader struct {
- s string
- n int
-}
-
-func (r *zeroOneByteReader) Read(p []byte) (int, error) {
- if len(p) == 0 {
- return 0, nil
- }
- if len(r.s) == 0 {
- return 0, io.EOF
- }
- r.n++
- if r.n%2 != 0 {
- return 0, nil
- }
- p[0], r.s = r.s[0], r.s[1:]
- return 1, nil
-}
-
-// eofStringsReader is like a strings.Reader but can return an (n, err) where
-// n > 0 && err != nil.
-type eofStringsReader struct {
- s string
-}
-
-func (r *eofStringsReader) Read(p []byte) (int, error) {
- n := copy(p, r.s)
- r.s = r.s[n:]
- if r.s != "" {
- return n, nil
- }
- return n, io.EOF
-}
-
-// stuckReader is an io.Reader that always returns no data and no error.
-type stuckReader struct{}
-
-func (*stuckReader) Read(p []byte) (int, error) {
- return 0, nil
-}
-
-const (
- rawLevel = iota
- lowLevel
- highLevel
-)
-
-func benchmarkTokenizer(b *testing.B, level int) {
- buf, err := ioutil.ReadFile("testdata/go1.html")
- if err != nil {
- b.Fatalf("could not read testdata/go1.html: %v", err)
- }
- b.SetBytes(int64(len(buf)))
- runtime.GC()
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- z := NewTokenizer(bytes.NewBuffer(buf))
- for {
- tt := z.Next()
- if tt == ErrorToken {
- if err := z.Err(); err != nil && err != io.EOF {
- b.Fatalf("tokenizer error: %v", err)
- }
- break
- }
- switch level {
- case rawLevel:
- // Calling z.Raw just returns the raw bytes of the token. It does
- // not unescape &lt; to <, or lower-case tag names and attribute keys.
- z.Raw()
- case lowLevel:
- // Caling z.Text, z.TagName and z.TagAttr returns []byte values
- // whose contents may change on the next call to z.Next.
- switch tt {
- case TextToken, CommentToken, DoctypeToken:
- z.Text()
- case StartTagToken, SelfClosingTagToken:
- _, more := z.TagName()
- for more {
- _, _, more = z.TagAttr()
- }
- case EndTagToken:
- z.TagName()
- }
- case highLevel:
- // Calling z.Token converts []byte values to strings whose validity
- // extend beyond the next call to z.Next.
- z.Token()
- }
- }
- }
-}
-
-func BenchmarkRawLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, rawLevel) }
-func BenchmarkLowLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, lowLevel) }
-func BenchmarkHighLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, highLevel) }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/export_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/export_test.go
deleted file mode 100644
index 36b29d2db..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/export_test.go
+++ /dev/null
@@ -1,7 +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 file.
-
-package httpproxy
-
-var ExportUseProxy = (*Config).useProxy
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/go19_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/go19_test.go
deleted file mode 100644
index 2117ca569..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/go19_test.go
+++ /dev/null
@@ -1,13 +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 file.
-
-// +build go1.9
-
-package httpproxy_test
-
-import "testing"
-
-func init() {
- setHelper = func(t *testing.T) { t.Helper() }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy.go
deleted file mode 100644
index cbe1d2a0a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy.go
+++ /dev/null
@@ -1,239 +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 file.
-
-// Package httpproxy provides support for HTTP proxy determination
-// based on environment variables, as provided by net/http's
-// ProxyFromEnvironment function.
-//
-// The API is not subject to the Go 1 compatibility promise and may change at
-// any time.
-package httpproxy
-
-import (
- "errors"
- "fmt"
- "net"
- "net/url"
- "os"
- "strings"
- "unicode/utf8"
-
- "golang.org/x/net/idna"
-)
-
-// Config holds configuration for HTTP proxy settings. See
-// FromEnvironment for details.
-type Config struct {
- // HTTPProxy represents the value of the HTTP_PROXY or
- // http_proxy environment variable. It will be used as the proxy
- // URL for HTTP requests and HTTPS requests unless overridden by
- // HTTPSProxy or NoProxy.
- HTTPProxy string
-
- // HTTPSProxy represents the HTTPS_PROXY or https_proxy
- // environment variable. It will be used as the proxy URL for
- // HTTPS requests unless overridden by NoProxy.
- HTTPSProxy string
-
- // NoProxy represents the NO_PROXY or no_proxy environment
- // variable. It specifies URLs that should be excluded from
- // proxying as a comma-separated list of domain names or a
- // single asterisk (*) to indicate that no proxying should be
- // done. A domain name matches that name and all subdomains. A
- // domain name with a leading "." matches subdomains only. For
- // example "foo.com" matches "foo.com" and "bar.foo.com";
- // ".y.com" matches "x.y.com" but not "y.com".
- NoProxy string
-
- // CGI holds whether the current process is running
- // as a CGI handler (FromEnvironment infers this from the
- // presence of a REQUEST_METHOD environment variable).
- // When this is set, ProxyForURL will return an error
- // when HTTPProxy applies, because a client could be
- // setting HTTP_PROXY maliciously. See https://golang.org/s/cgihttpproxy.
- CGI bool
-}
-
-// FromEnvironment returns a Config instance populated from the
-// environment variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the
-// lowercase versions thereof). HTTPS_PROXY takes precedence over
-// HTTP_PROXY for https requests.
-//
-// The environment values may be either a complete URL or a
-// "host[:port]", in which case the "http" scheme is assumed. An error
-// is returned if the value is a different form.
-func FromEnvironment() *Config {
- return &Config{
- HTTPProxy: getEnvAny("HTTP_PROXY", "http_proxy"),
- HTTPSProxy: getEnvAny("HTTPS_PROXY", "https_proxy"),
- NoProxy: getEnvAny("NO_PROXY", "no_proxy"),
- CGI: os.Getenv("REQUEST_METHOD") != "",
- }
-}
-
-func getEnvAny(names ...string) string {
- for _, n := range names {
- if val := os.Getenv(n); val != "" {
- return val
- }
- }
- return ""
-}
-
-// ProxyFunc returns a function that determines the proxy URL to use for
-// a given request URL. Changing the contents of cfg will not affect
-// proxy functions created earlier.
-//
-// A nil URL and nil error are returned if no proxy is defined in the
-// environment, or a proxy should not be used for the given request, as
-// defined by NO_PROXY.
-//
-// As a special case, if req.URL.Host is "localhost" (with or without a
-// port number), then a nil URL and nil error will be returned.
-func (cfg *Config) ProxyFunc() func(reqURL *url.URL) (*url.URL, error) {
- // Prevent Config changes from affecting the function calculation.
- // TODO Preprocess proxy settings for more efficient evaluation.
- cfg1 := *cfg
- return cfg1.proxyForURL
-}
-
-func (cfg *Config) proxyForURL(reqURL *url.URL) (*url.URL, error) {
- var proxy string
- if reqURL.Scheme == "https" {
- proxy = cfg.HTTPSProxy
- }
- if proxy == "" {
- proxy = cfg.HTTPProxy
- if proxy != "" && cfg.CGI {
- return nil, errors.New("refusing to use HTTP_PROXY value in CGI environment; see golang.org/s/cgihttpproxy")
- }
- }
- if proxy == "" {
- return nil, nil
- }
- if !cfg.useProxy(canonicalAddr(reqURL)) {
- return nil, nil
- }
- proxyURL, err := url.Parse(proxy)
- if err != nil ||
- (proxyURL.Scheme != "http" &&
- proxyURL.Scheme != "https" &&
- proxyURL.Scheme != "socks5") {
- // proxy was bogus. Try prepending "http://" to it and
- // see if that parses correctly. If not, we fall
- // through and complain about the original one.
- if proxyURL, err := url.Parse("http://" + proxy); err == nil {
- return proxyURL, nil
- }
- }
- if err != nil {
- return nil, fmt.Errorf("invalid proxy address %q: %v", proxy, err)
- }
- return proxyURL, nil
-}
-
-// useProxy reports whether requests to addr should use a proxy,
-// according to the NO_PROXY or no_proxy environment variable.
-// addr is always a canonicalAddr with a host and port.
-func (cfg *Config) useProxy(addr string) bool {
- if len(addr) == 0 {
- return true
- }
- host, _, err := net.SplitHostPort(addr)
- if err != nil {
- return false
- }
- if host == "localhost" {
- return false
- }
- if ip := net.ParseIP(host); ip != nil {
- if ip.IsLoopback() {
- return false
- }
- }
-
- noProxy := cfg.NoProxy
- if noProxy == "*" {
- return false
- }
-
- addr = strings.ToLower(strings.TrimSpace(addr))
- if hasPort(addr) {
- addr = addr[:strings.LastIndex(addr, ":")]
- }
-
- for _, p := range strings.Split(noProxy, ",") {
- p = strings.ToLower(strings.TrimSpace(p))
- if len(p) == 0 {
- continue
- }
- if hasPort(p) {
- p = p[:strings.LastIndex(p, ":")]
- }
- if addr == p {
- return false
- }
- if len(p) == 0 {
- // There is no host part, likely the entry is malformed; ignore.
- continue
- }
- if p[0] == '.' && (strings.HasSuffix(addr, p) || addr == p[1:]) {
- // no_proxy ".foo.com" matches "bar.foo.com" or "foo.com"
- return false
- }
- if p[0] != '.' && strings.HasSuffix(addr, p) && addr[len(addr)-len(p)-1] == '.' {
- // no_proxy "foo.com" matches "bar.foo.com"
- return false
- }
- }
- return true
-}
-
-var portMap = map[string]string{
- "http": "80",
- "https": "443",
- "socks5": "1080",
-}
-
-// canonicalAddr returns url.Host but always with a ":port" suffix
-func canonicalAddr(url *url.URL) string {
- addr := url.Hostname()
- if v, err := idnaASCII(addr); err == nil {
- addr = v
- }
- port := url.Port()
- if port == "" {
- port = portMap[url.Scheme]
- }
- return net.JoinHostPort(addr, port)
-}
-
-// Given a string of the form "host", "host:port", or "[ipv6::address]:port",
-// return true if the string includes a port.
-func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
-
-func idnaASCII(v string) (string, error) {
- // TODO: Consider removing this check after verifying performance is okay.
- // Right now punycode verification, length checks, context checks, and the
- // permissible character tests are all omitted. It also prevents the ToASCII
- // call from salvaging an invalid IDN, when possible. As a result it may be
- // possible to have two IDNs that appear identical to the user where the
- // ASCII-only version causes an error downstream whereas the non-ASCII
- // version does not.
- // Note that for correct ASCII IDNs ToASCII will only do considerably more
- // work, but it will not cause an allocation.
- if isASCII(v) {
- return v, nil
- }
- return idna.Lookup.ToASCII(v)
-}
-
-func isASCII(s string) bool {
- for i := 0; i < len(s); i++ {
- if s[i] >= utf8.RuneSelf {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy_test.go
deleted file mode 100644
index e4af199c6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http/httpproxy/proxy_test.go
+++ /dev/null
@@ -1,301 +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 file.
-
-package httpproxy_test
-
-import (
- "bytes"
- "errors"
- "fmt"
- "net/url"
- "os"
- "strings"
- "testing"
-
- "golang.org/x/net/http/httpproxy"
-)
-
-// setHelper calls t.Helper() for Go 1.9+ (see go19_test.go) and does nothing otherwise.
-var setHelper = func(t *testing.T) {}
-
-type proxyForURLTest struct {
- cfg httpproxy.Config
- req string // URL to fetch; blank means "http://example.com"
- want string
- wanterr error
-}
-
-func (t proxyForURLTest) String() string {
- var buf bytes.Buffer
- space := func() {
- if buf.Len() > 0 {
- buf.WriteByte(' ')
- }
- }
- if t.cfg.HTTPProxy != "" {
- fmt.Fprintf(&buf, "http_proxy=%q", t.cfg.HTTPProxy)
- }
- if t.cfg.HTTPSProxy != "" {
- space()
- fmt.Fprintf(&buf, "https_proxy=%q", t.cfg.HTTPSProxy)
- }
- if t.cfg.NoProxy != "" {
- space()
- fmt.Fprintf(&buf, "no_proxy=%q", t.cfg.NoProxy)
- }
- req := "http://example.com"
- if t.req != "" {
- req = t.req
- }
- space()
- fmt.Fprintf(&buf, "req=%q", req)
- return strings.TrimSpace(buf.String())
-}
-
-var proxyForURLTests = []proxyForURLTest{{
- cfg: httpproxy.Config{
- HTTPProxy: "127.0.0.1:8080",
- },
- want: "http://127.0.0.1:8080",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "cache.corp.example.com:1234",
- },
- want: "http://cache.corp.example.com:1234",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "cache.corp.example.com",
- },
- want: "http://cache.corp.example.com",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "https://cache.corp.example.com",
- },
- want: "https://cache.corp.example.com",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "http://127.0.0.1:8080",
- },
- want: "http://127.0.0.1:8080",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "https://127.0.0.1:8080",
- },
- want: "https://127.0.0.1:8080",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "socks5://127.0.0.1",
- },
- want: "socks5://127.0.0.1",
-}, {
- // Don't use secure for http
- cfg: httpproxy.Config{
- HTTPProxy: "http.proxy.tld",
- HTTPSProxy: "secure.proxy.tld",
- },
- req: "http://insecure.tld/",
- want: "http://http.proxy.tld",
-}, {
- // Use secure for https.
- cfg: httpproxy.Config{
- HTTPProxy: "http.proxy.tld",
- HTTPSProxy: "secure.proxy.tld",
- },
- req: "https://secure.tld/",
- want: "http://secure.proxy.tld",
-}, {
- cfg: httpproxy.Config{
- HTTPProxy: "http.proxy.tld",
- HTTPSProxy: "https://secure.proxy.tld",
- },
- req: "https://secure.tld/",
- want: "https://secure.proxy.tld",
-}, {
- // Issue 16405: don't use HTTP_PROXY in a CGI environment,
- // where HTTP_PROXY can be attacker-controlled.
- cfg: httpproxy.Config{
- HTTPProxy: "http://10.1.2.3:8080",
- CGI: true,
- },
- want: "<nil>",
- wanterr: errors.New("refusing to use HTTP_PROXY value in CGI environment; see golang.org/s/cgihttpproxy"),
-}, {
- // HTTPS proxy is still used even in CGI environment.
- // (perhaps dubious but it's the historical behaviour).
- cfg: httpproxy.Config{
- HTTPSProxy: "https://secure.proxy.tld",
- CGI: true,
- },
- req: "https://secure.tld/",
- want: "https://secure.proxy.tld",
-}, {
- want: "<nil>",
-}, {
- cfg: httpproxy.Config{
- NoProxy: "example.com",
- HTTPProxy: "proxy",
- },
- req: "http://example.com/",
- want: "<nil>",
-}, {
- cfg: httpproxy.Config{
- NoProxy: ".example.com",
- HTTPProxy: "proxy",
- },
- req: "http://example.com/",
- want: "<nil>",
-}, {
- cfg: httpproxy.Config{
- NoProxy: "ample.com",
- HTTPProxy: "proxy",
- },
- req: "http://example.com/",
- want: "http://proxy",
-}, {
- cfg: httpproxy.Config{
- NoProxy: "example.com",
- HTTPProxy: "proxy",
- },
- req: "http://foo.example.com/",
- want: "<nil>",
-}, {
- cfg: httpproxy.Config{
- NoProxy: ".foo.com",
- HTTPProxy: "proxy",
- },
- req: "http://example.com/",
- want: "http://proxy",
-}}
-
-func testProxyForURL(t *testing.T, tt proxyForURLTest) {
- setHelper(t)
- reqURLStr := tt.req
- if reqURLStr == "" {
- reqURLStr = "http://example.com"
- }
- reqURL, err := url.Parse(reqURLStr)
- if err != nil {
- t.Errorf("invalid URL %q", reqURLStr)
- return
- }
- cfg := tt.cfg
- proxyForURL := cfg.ProxyFunc()
- url, err := proxyForURL(reqURL)
- if g, e := fmt.Sprintf("%v", err), fmt.Sprintf("%v", tt.wanterr); g != e {
- t.Errorf("%v: got error = %q, want %q", tt, g, e)
- return
- }
- if got := fmt.Sprintf("%s", url); got != tt.want {
- t.Errorf("%v: got URL = %q, want %q", tt, url, tt.want)
- }
-
- // Check that changing the Config doesn't change the results
- // of the functuon.
- cfg = httpproxy.Config{}
- url, err = proxyForURL(reqURL)
- if g, e := fmt.Sprintf("%v", err), fmt.Sprintf("%v", tt.wanterr); g != e {
- t.Errorf("(after mutating config) %v: got error = %q, want %q", tt, g, e)
- return
- }
- if got := fmt.Sprintf("%s", url); got != tt.want {
- t.Errorf("(after mutating config) %v: got URL = %q, want %q", tt, url, tt.want)
- }
-}
-
-func TestProxyForURL(t *testing.T) {
- for _, tt := range proxyForURLTests {
- testProxyForURL(t, tt)
- }
-}
-
-func TestFromEnvironment(t *testing.T) {
- os.Setenv("HTTP_PROXY", "httpproxy")
- os.Setenv("HTTPS_PROXY", "httpsproxy")
- os.Setenv("NO_PROXY", "noproxy")
- os.Setenv("REQUEST_METHOD", "")
- got := httpproxy.FromEnvironment()
- want := httpproxy.Config{
- HTTPProxy: "httpproxy",
- HTTPSProxy: "httpsproxy",
- NoProxy: "noproxy",
- }
- if *got != want {
- t.Errorf("unexpected proxy config, got %#v want %#v", got, want)
- }
-}
-
-func TestFromEnvironmentWithRequestMethod(t *testing.T) {
- os.Setenv("HTTP_PROXY", "httpproxy")
- os.Setenv("HTTPS_PROXY", "httpsproxy")
- os.Setenv("NO_PROXY", "noproxy")
- os.Setenv("REQUEST_METHOD", "PUT")
- got := httpproxy.FromEnvironment()
- want := httpproxy.Config{
- HTTPProxy: "httpproxy",
- HTTPSProxy: "httpsproxy",
- NoProxy: "noproxy",
- CGI: true,
- }
- if *got != want {
- t.Errorf("unexpected proxy config, got %#v want %#v", got, want)
- }
-}
-
-func TestFromEnvironmentLowerCase(t *testing.T) {
- os.Setenv("http_proxy", "httpproxy")
- os.Setenv("https_proxy", "httpsproxy")
- os.Setenv("no_proxy", "noproxy")
- os.Setenv("REQUEST_METHOD", "")
- got := httpproxy.FromEnvironment()
- want := httpproxy.Config{
- HTTPProxy: "httpproxy",
- HTTPSProxy: "httpsproxy",
- NoProxy: "noproxy",
- }
- if *got != want {
- t.Errorf("unexpected proxy config, got %#v want %#v", got, want)
- }
-}
-
-var UseProxyTests = []struct {
- host string
- match bool
-}{
- // Never proxy localhost:
- {"localhost", false},
- {"127.0.0.1", false},
- {"127.0.0.2", false},
- {"[::1]", false},
- {"[::2]", true}, // not a loopback address
-
- {"barbaz.net", false}, // match as .barbaz.net
- {"foobar.com", false}, // have a port but match
- {"foofoobar.com", true}, // not match as a part of foobar.com
- {"baz.com", true}, // not match as a part of barbaz.com
- {"localhost.net", true}, // not match as suffix of address
- {"local.localhost", true}, // not match as prefix as address
- {"barbarbaz.net", true}, // not match because NO_PROXY have a '.'
- {"www.foobar.com", false}, // match because NO_PROXY includes "foobar.com"
-}
-
-func TestUseProxy(t *testing.T) {
- cfg := &httpproxy.Config{
- NoProxy: "foobar.com, .barbaz.net",
- }
- for _, test := range UseProxyTests {
- if httpproxy.ExportUseProxy(cfg, test.host+":80") != test.match {
- t.Errorf("useProxy(%v) = %v, want %v", test.host, !test.match, test.match)
- }
- }
-}
-
-func TestInvalidNoProxy(t *testing.T) {
- cfg := &httpproxy.Config{
- NoProxy: ":1",
- }
- ok := httpproxy.ExportUseProxy(cfg, "example.com:80") // should not panic
- if !ok {
- t.Errorf("useProxy unexpected return; got false; want true")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/.gitignore b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/.gitignore
deleted file mode 100644
index 190f12234..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*~
-h2i/h2i
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Dockerfile b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Dockerfile
deleted file mode 100644
index 53fc52579..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Dockerfile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# This Dockerfile builds a recent curl with HTTP/2 client support, using
-# a recent nghttp2 build.
-#
-# See the Makefile for how to tag it. If Docker and that image is found, the
-# Go tests use this curl binary for integration tests.
-#
-
-FROM ubuntu:trusty
-
-RUN apt-get update && \
- apt-get upgrade -y && \
- apt-get install -y git-core build-essential wget
-
-RUN apt-get install -y --no-install-recommends \
- autotools-dev libtool pkg-config zlib1g-dev \
- libcunit1-dev libssl-dev libxml2-dev libevent-dev \
- automake autoconf
-
-# The list of packages nghttp2 recommends for h2load:
-RUN apt-get install -y --no-install-recommends make binutils \
- autoconf automake autotools-dev \
- libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev \
- libev-dev libevent-dev libjansson-dev libjemalloc-dev \
- cython python3.4-dev python-setuptools
-
-# Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached:
-ENV NGHTTP2_VER 895da9a
-RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git
-
-WORKDIR /root/nghttp2
-RUN git reset --hard $NGHTTP2_VER
-RUN autoreconf -i
-RUN automake
-RUN autoconf
-RUN ./configure
-RUN make
-RUN make install
-
-WORKDIR /root
-RUN wget http://curl.haxx.se/download/curl-7.45.0.tar.gz
-RUN tar -zxvf curl-7.45.0.tar.gz
-WORKDIR /root/curl-7.45.0
-RUN ./configure --with-ssl --with-nghttp2=/usr/local
-RUN make
-RUN make install
-RUN ldconfig
-
-CMD ["-h"]
-ENTRYPOINT ["/usr/local/bin/curl"]
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Makefile b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Makefile
deleted file mode 100644
index 55fd826f7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-curlimage:
- docker build -t gohttp2/curl .
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/README b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/README
deleted file mode 100644
index 360d5aa37..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/README
+++ /dev/null
@@ -1,20 +0,0 @@
-This is a work-in-progress HTTP/2 implementation for Go.
-
-It will eventually live in the Go standard library and won't require
-any changes to your code to use. It will just be automatic.
-
-Status:
-
-* The server support is pretty good. A few things are missing
- but are being worked on.
-* The client work has just started but shares a lot of code
- is coming along much quicker.
-
-Docs are at https://godoc.org/golang.org/x/net/http2
-
-Demo test server at https://http2.golang.org/
-
-Help & bug reports welcome!
-
-Contributing: https://golang.org/doc/contribute.html
-Bugs: https://golang.org/issue/new?title=x/net/http2:+
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers.go
deleted file mode 100644
index 698860b77..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers.go
+++ /dev/null
@@ -1,641 +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 file.
-
-package http2
-
-// A list of the possible cipher suite ids. Taken from
-// http://www.iana.org/assignments/tls-parameters/tls-parameters.txt
-
-const (
- cipher_TLS_NULL_WITH_NULL_NULL uint16 = 0x0000
- cipher_TLS_RSA_WITH_NULL_MD5 uint16 = 0x0001
- cipher_TLS_RSA_WITH_NULL_SHA uint16 = 0x0002
- cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0003
- cipher_TLS_RSA_WITH_RC4_128_MD5 uint16 = 0x0004
- cipher_TLS_RSA_WITH_RC4_128_SHA uint16 = 0x0005
- cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x0006
- cipher_TLS_RSA_WITH_IDEA_CBC_SHA uint16 = 0x0007
- cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0008
- cipher_TLS_RSA_WITH_DES_CBC_SHA uint16 = 0x0009
- cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000A
- cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000B
- cipher_TLS_DH_DSS_WITH_DES_CBC_SHA uint16 = 0x000C
- cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x000D
- cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000E
- cipher_TLS_DH_RSA_WITH_DES_CBC_SHA uint16 = 0x000F
- cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0010
- cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0011
- cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA uint16 = 0x0012
- cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x0013
- cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0014
- cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA uint16 = 0x0015
- cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0016
- cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0017
- cipher_TLS_DH_anon_WITH_RC4_128_MD5 uint16 = 0x0018
- cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0019
- cipher_TLS_DH_anon_WITH_DES_CBC_SHA uint16 = 0x001A
- cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0x001B
- // Reserved uint16 = 0x001C-1D
- cipher_TLS_KRB5_WITH_DES_CBC_SHA uint16 = 0x001E
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA uint16 = 0x001F
- cipher_TLS_KRB5_WITH_RC4_128_SHA uint16 = 0x0020
- cipher_TLS_KRB5_WITH_IDEA_CBC_SHA uint16 = 0x0021
- cipher_TLS_KRB5_WITH_DES_CBC_MD5 uint16 = 0x0022
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5 uint16 = 0x0023
- cipher_TLS_KRB5_WITH_RC4_128_MD5 uint16 = 0x0024
- cipher_TLS_KRB5_WITH_IDEA_CBC_MD5 uint16 = 0x0025
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA uint16 = 0x0026
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA uint16 = 0x0027
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA uint16 = 0x0028
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 uint16 = 0x0029
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x002A
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5 uint16 = 0x002B
- cipher_TLS_PSK_WITH_NULL_SHA uint16 = 0x002C
- cipher_TLS_DHE_PSK_WITH_NULL_SHA uint16 = 0x002D
- cipher_TLS_RSA_PSK_WITH_NULL_SHA uint16 = 0x002E
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA uint16 = 0x002F
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0030
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0031
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0032
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0033
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA uint16 = 0x0034
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0035
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0036
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0037
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0038
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0039
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA uint16 = 0x003A
- cipher_TLS_RSA_WITH_NULL_SHA256 uint16 = 0x003B
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003C
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x003D
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x003E
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003F
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x0040
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0041
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0042
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0043
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0044
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0045
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0046
- // Reserved uint16 = 0x0047-4F
- // Reserved uint16 = 0x0050-58
- // Reserved uint16 = 0x0059-5C
- // Unassigned uint16 = 0x005D-5F
- // Reserved uint16 = 0x0060-66
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x0067
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x0068
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x0069
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x006A
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x006B
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256 uint16 = 0x006C
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256 uint16 = 0x006D
- // Unassigned uint16 = 0x006E-83
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0084
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0085
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0086
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0087
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0088
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0089
- cipher_TLS_PSK_WITH_RC4_128_SHA uint16 = 0x008A
- cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008B
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA uint16 = 0x008C
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA uint16 = 0x008D
- cipher_TLS_DHE_PSK_WITH_RC4_128_SHA uint16 = 0x008E
- cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008F
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0090
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0091
- cipher_TLS_RSA_PSK_WITH_RC4_128_SHA uint16 = 0x0092
- cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x0093
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0094
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0095
- cipher_TLS_RSA_WITH_SEED_CBC_SHA uint16 = 0x0096
- cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA uint16 = 0x0097
- cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA uint16 = 0x0098
- cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA uint16 = 0x0099
- cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA uint16 = 0x009A
- cipher_TLS_DH_anon_WITH_SEED_CBC_SHA uint16 = 0x009B
- cipher_TLS_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009C
- cipher_TLS_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009D
- cipher_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009E
- cipher_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009F
- cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x00A0
- cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x00A1
- cipher_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A2
- cipher_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A3
- cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A4
- cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A5
- cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256 uint16 = 0x00A6
- cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384 uint16 = 0x00A7
- cipher_TLS_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00A8
- cipher_TLS_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00A9
- cipher_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AA
- cipher_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AB
- cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AC
- cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AD
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00AE
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00AF
- cipher_TLS_PSK_WITH_NULL_SHA256 uint16 = 0x00B0
- cipher_TLS_PSK_WITH_NULL_SHA384 uint16 = 0x00B1
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B2
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B3
- cipher_TLS_DHE_PSK_WITH_NULL_SHA256 uint16 = 0x00B4
- cipher_TLS_DHE_PSK_WITH_NULL_SHA384 uint16 = 0x00B5
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B6
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B7
- cipher_TLS_RSA_PSK_WITH_NULL_SHA256 uint16 = 0x00B8
- cipher_TLS_RSA_PSK_WITH_NULL_SHA384 uint16 = 0x00B9
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BA
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BB
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BC
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BD
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BE
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BF
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C0
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C1
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C2
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C3
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C4
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C5
- // Unassigned uint16 = 0x00C6-FE
- cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV uint16 = 0x00FF
- // Unassigned uint16 = 0x01-55,*
- cipher_TLS_FALLBACK_SCSV uint16 = 0x5600
- // Unassigned uint16 = 0x5601 - 0xC000
- cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA uint16 = 0xC001
- cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA uint16 = 0xC002
- cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC003
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC004
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC005
- cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA uint16 = 0xC006
- cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA uint16 = 0xC007
- cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC008
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC009
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC00A
- cipher_TLS_ECDH_RSA_WITH_NULL_SHA uint16 = 0xC00B
- cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA uint16 = 0xC00C
- cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC00D
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC00E
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC00F
- cipher_TLS_ECDHE_RSA_WITH_NULL_SHA uint16 = 0xC010
- cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA uint16 = 0xC011
- cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC012
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC013
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC014
- cipher_TLS_ECDH_anon_WITH_NULL_SHA uint16 = 0xC015
- cipher_TLS_ECDH_anon_WITH_RC4_128_SHA uint16 = 0xC016
- cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0xC017
- cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA uint16 = 0xC018
- cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA uint16 = 0xC019
- cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01A
- cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01B
- cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01C
- cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA uint16 = 0xC01D
- cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC01E
- cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA uint16 = 0xC01F
- cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA uint16 = 0xC020
- cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC021
- cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA uint16 = 0xC022
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC023
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC024
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC025
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC026
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC027
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC028
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC029
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC02A
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02B
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02C
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02D
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02E
- cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02F
- cipher_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC030
- cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC031
- cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC032
- cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA uint16 = 0xC033
- cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0xC034
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0xC035
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0xC036
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0xC037
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0xC038
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA uint16 = 0xC039
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256 uint16 = 0xC03A
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384 uint16 = 0xC03B
- cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03C
- cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03D
- cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03E
- cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03F
- cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC040
- cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC041
- cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC042
- cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC043
- cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC044
- cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC045
- cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC046
- cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC047
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC048
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC049
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04A
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04B
- cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04C
- cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04D
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04E
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04F
- cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC050
- cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC051
- cipher_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC052
- cipher_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC053
- cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC054
- cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC055
- cipher_TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC056
- cipher_TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC057
- cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC058
- cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC059
- cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05A
- cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05B
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05C
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05D
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05E
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05F
- cipher_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC060
- cipher_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC061
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC062
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC063
- cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC064
- cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC065
- cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC066
- cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC067
- cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC068
- cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC069
- cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06A
- cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06B
- cipher_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06C
- cipher_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06D
- cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06E
- cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06F
- cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC070
- cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC071
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC072
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC073
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC074
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC075
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC076
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC077
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC078
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC079
- cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07A
- cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07B
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07C
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07D
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07E
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07F
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC080
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC081
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC082
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC083
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC084
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC085
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC086
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC087
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC088
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC089
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08A
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08B
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08C
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08D
- cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08E
- cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08F
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC090
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC091
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC092
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC093
- cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC094
- cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC095
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC096
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC097
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC098
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC099
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC09A
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC09B
- cipher_TLS_RSA_WITH_AES_128_CCM uint16 = 0xC09C
- cipher_TLS_RSA_WITH_AES_256_CCM uint16 = 0xC09D
- cipher_TLS_DHE_RSA_WITH_AES_128_CCM uint16 = 0xC09E
- cipher_TLS_DHE_RSA_WITH_AES_256_CCM uint16 = 0xC09F
- cipher_TLS_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A0
- cipher_TLS_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A1
- cipher_TLS_DHE_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A2
- cipher_TLS_DHE_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A3
- cipher_TLS_PSK_WITH_AES_128_CCM uint16 = 0xC0A4
- cipher_TLS_PSK_WITH_AES_256_CCM uint16 = 0xC0A5
- cipher_TLS_DHE_PSK_WITH_AES_128_CCM uint16 = 0xC0A6
- cipher_TLS_DHE_PSK_WITH_AES_256_CCM uint16 = 0xC0A7
- cipher_TLS_PSK_WITH_AES_128_CCM_8 uint16 = 0xC0A8
- cipher_TLS_PSK_WITH_AES_256_CCM_8 uint16 = 0xC0A9
- cipher_TLS_PSK_DHE_WITH_AES_128_CCM_8 uint16 = 0xC0AA
- cipher_TLS_PSK_DHE_WITH_AES_256_CCM_8 uint16 = 0xC0AB
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM uint16 = 0xC0AC
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM uint16 = 0xC0AD
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 uint16 = 0xC0AE
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 uint16 = 0xC0AF
- // Unassigned uint16 = 0xC0B0-FF
- // Unassigned uint16 = 0xC1-CB,*
- // Unassigned uint16 = 0xCC00-A7
- cipher_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA8
- cipher_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA9
- cipher_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAA
- cipher_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAB
- cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAC
- cipher_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAD
- cipher_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAE
-)
-
-// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec.
-// References:
-// https://tools.ietf.org/html/rfc7540#appendix-A
-// Reject cipher suites from Appendix A.
-// "This list includes those cipher suites that do not
-// offer an ephemeral key exchange and those that are
-// based on the TLS null, stream or block cipher type"
-func isBadCipher(cipher uint16) bool {
- switch cipher {
- case cipher_TLS_NULL_WITH_NULL_NULL,
- cipher_TLS_RSA_WITH_NULL_MD5,
- cipher_TLS_RSA_WITH_NULL_SHA,
- cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_RSA_WITH_RC4_128_MD5,
- cipher_TLS_RSA_WITH_RC4_128_SHA,
- cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
- cipher_TLS_RSA_WITH_IDEA_CBC_SHA,
- cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_DES_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_DH_anon_WITH_RC4_128_MD5,
- cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_anon_WITH_DES_CBC_SHA,
- cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_KRB5_WITH_DES_CBC_SHA,
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_KRB5_WITH_RC4_128_SHA,
- cipher_TLS_KRB5_WITH_IDEA_CBC_SHA,
- cipher_TLS_KRB5_WITH_DES_CBC_MD5,
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
- cipher_TLS_KRB5_WITH_RC4_128_MD5,
- cipher_TLS_KRB5_WITH_IDEA_CBC_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_PSK_WITH_NULL_SHA,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA,
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_WITH_NULL_SHA256,
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_PSK_WITH_RC4_128_SHA,
- cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_RC4_128_SHA,
- cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_RC4_128_SHA,
- cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_anon_WITH_SEED_CBC_SHA,
- cipher_TLS_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_AES_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_AES_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_PSK_WITH_NULL_SHA256,
- cipher_TLS_PSK_WITH_NULL_SHA384,
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA256,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA256,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
- cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_NULL_SHA,
- cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_NULL_SHA,
- cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_NULL_SHA,
- cipher_TLS_ECDH_anon_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_AES_128_CCM,
- cipher_TLS_RSA_WITH_AES_256_CCM,
- cipher_TLS_RSA_WITH_AES_128_CCM_8,
- cipher_TLS_RSA_WITH_AES_256_CCM_8,
- cipher_TLS_PSK_WITH_AES_128_CCM,
- cipher_TLS_PSK_WITH_AES_256_CCM,
- cipher_TLS_PSK_WITH_AES_128_CCM_8,
- cipher_TLS_PSK_WITH_AES_256_CCM_8:
- return true
- default:
- return false
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers_test.go
deleted file mode 100644
index 764bbc8c8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/ciphers_test.go
+++ /dev/null
@@ -1,309 +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 file.
-
-package http2
-
-import "testing"
-
-func TestIsBadCipherBad(t *testing.T) {
- for _, c := range badCiphers {
- if !isBadCipher(c) {
- t.Errorf("Wrong result for isBadCipher(%d), want true", c)
- }
- }
-}
-
-// verify we don't give false positives on ciphers not on blacklist
-func TestIsBadCipherGood(t *testing.T) {
- goodCiphers := map[uint16]string{
- cipher_TLS_DHE_RSA_WITH_AES_256_CCM: "cipher_TLS_DHE_RSA_WITH_AES_256_CCM",
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM: "cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM",
- cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: "cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
- }
- for c, name := range goodCiphers {
- if isBadCipher(c) {
- t.Errorf("Wrong result for isBadCipher(%d) %s, want false", c, name)
- }
- }
-}
-
-// copied from https://http2.github.io/http2-spec/#BadCipherSuites,
-var badCiphers = []uint16{
- cipher_TLS_NULL_WITH_NULL_NULL,
- cipher_TLS_RSA_WITH_NULL_MD5,
- cipher_TLS_RSA_WITH_NULL_SHA,
- cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_RSA_WITH_RC4_128_MD5,
- cipher_TLS_RSA_WITH_RC4_128_SHA,
- cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
- cipher_TLS_RSA_WITH_IDEA_CBC_SHA,
- cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_DES_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_DH_anon_WITH_RC4_128_MD5,
- cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
- cipher_TLS_DH_anon_WITH_DES_CBC_SHA,
- cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_KRB5_WITH_DES_CBC_SHA,
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_KRB5_WITH_RC4_128_SHA,
- cipher_TLS_KRB5_WITH_IDEA_CBC_SHA,
- cipher_TLS_KRB5_WITH_DES_CBC_MD5,
- cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
- cipher_TLS_KRB5_WITH_RC4_128_MD5,
- cipher_TLS_KRB5_WITH_IDEA_CBC_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
- cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,
- cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
- cipher_TLS_PSK_WITH_NULL_SHA,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA,
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_WITH_NULL_SHA256,
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,
- cipher_TLS_PSK_WITH_RC4_128_SHA,
- cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_RC4_128_SHA,
- cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_RC4_128_SHA,
- cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,
- cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,
- cipher_TLS_DH_anon_WITH_SEED_CBC_SHA,
- cipher_TLS_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_AES_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_AES_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_PSK_WITH_NULL_SHA256,
- cipher_TLS_PSK_WITH_NULL_SHA384,
- cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA256,
- cipher_TLS_DHE_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA256,
- cipher_TLS_RSA_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,
- cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
- cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_NULL_SHA,
- cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_NULL_SHA,
- cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_NULL_SHA,
- cipher_TLS_ECDH_anon_WITH_RC4_128_SHA,
- cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
- cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
- cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
- cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,
- cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
- cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
- cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
- cipher_TLS_RSA_WITH_AES_128_CCM,
- cipher_TLS_RSA_WITH_AES_256_CCM,
- cipher_TLS_RSA_WITH_AES_128_CCM_8,
- cipher_TLS_RSA_WITH_AES_256_CCM_8,
- cipher_TLS_PSK_WITH_AES_128_CCM,
- cipher_TLS_PSK_WITH_AES_256_CCM,
- cipher_TLS_PSK_WITH_AES_128_CCM_8,
- cipher_TLS_PSK_WITH_AES_256_CCM_8,
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/client_conn_pool.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/client_conn_pool.go
deleted file mode 100644
index bdf5652b0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/client_conn_pool.go
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright 2015 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 file.
-
-// Transport code's client connection pooling.
-
-package http2
-
-import (
- "crypto/tls"
- "net/http"
- "sync"
-)
-
-// ClientConnPool manages a pool of HTTP/2 client connections.
-type ClientConnPool interface {
- GetClientConn(req *http.Request, addr string) (*ClientConn, error)
- MarkDead(*ClientConn)
-}
-
-// clientConnPoolIdleCloser is the interface implemented by ClientConnPool
-// implementations which can close their idle connections.
-type clientConnPoolIdleCloser interface {
- ClientConnPool
- closeIdleConnections()
-}
-
-var (
- _ clientConnPoolIdleCloser = (*clientConnPool)(nil)
- _ clientConnPoolIdleCloser = noDialClientConnPool{}
-)
-
-// TODO: use singleflight for dialing and addConnCalls?
-type clientConnPool struct {
- t *Transport
-
- mu sync.Mutex // TODO: maybe switch to RWMutex
- // TODO: add support for sharing conns based on cert names
- // (e.g. share conn for googleapis.com and appspot.com)
- conns map[string][]*ClientConn // key is host:port
- dialing map[string]*dialCall // currently in-flight dials
- keys map[*ClientConn][]string
- addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls
-}
-
-func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
- return p.getClientConn(req, addr, dialOnMiss)
-}
-
-const (
- dialOnMiss = true
- noDialOnMiss = false
-)
-
-func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
- if isConnectionCloseRequest(req) && dialOnMiss {
- // It gets its own connection.
- const singleUse = true
- cc, err := p.t.dialClientConn(addr, singleUse)
- if err != nil {
- return nil, err
- }
- return cc, nil
- }
- p.mu.Lock()
- for _, cc := range p.conns[addr] {
- if cc.CanTakeNewRequest() {
- p.mu.Unlock()
- return cc, nil
- }
- }
- if !dialOnMiss {
- p.mu.Unlock()
- return nil, ErrNoCachedConn
- }
- call := p.getStartDialLocked(addr)
- p.mu.Unlock()
- <-call.done
- return call.res, call.err
-}
-
-// dialCall is an in-flight Transport dial call to a host.
-type dialCall struct {
- p *clientConnPool
- done chan struct{} // closed when done
- res *ClientConn // valid after done is closed
- err error // valid after done is closed
-}
-
-// requires p.mu is held.
-func (p *clientConnPool) getStartDialLocked(addr string) *dialCall {
- if call, ok := p.dialing[addr]; ok {
- // A dial is already in-flight. Don't start another.
- return call
- }
- call := &dialCall{p: p, done: make(chan struct{})}
- if p.dialing == nil {
- p.dialing = make(map[string]*dialCall)
- }
- p.dialing[addr] = call
- go call.dial(addr)
- return call
-}
-
-// run in its own goroutine.
-func (c *dialCall) dial(addr string) {
- const singleUse = false // shared conn
- c.res, c.err = c.p.t.dialClientConn(addr, singleUse)
- close(c.done)
-
- c.p.mu.Lock()
- delete(c.p.dialing, addr)
- if c.err == nil {
- c.p.addConnLocked(addr, c.res)
- }
- c.p.mu.Unlock()
-}
-
-// addConnIfNeeded makes a NewClientConn out of c if a connection for key doesn't
-// already exist. It coalesces concurrent calls with the same key.
-// This is used by the http1 Transport code when it creates a new connection. Because
-// the http1 Transport doesn't de-dup TCP dials to outbound hosts (because it doesn't know
-// the protocol), it can get into a situation where it has multiple TLS connections.
-// This code decides which ones live or die.
-// The return value used is whether c was used.
-// c is never closed.
-func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c *tls.Conn) (used bool, err error) {
- p.mu.Lock()
- for _, cc := range p.conns[key] {
- if cc.CanTakeNewRequest() {
- p.mu.Unlock()
- return false, nil
- }
- }
- call, dup := p.addConnCalls[key]
- if !dup {
- if p.addConnCalls == nil {
- p.addConnCalls = make(map[string]*addConnCall)
- }
- call = &addConnCall{
- p: p,
- done: make(chan struct{}),
- }
- p.addConnCalls[key] = call
- go call.run(t, key, c)
- }
- p.mu.Unlock()
-
- <-call.done
- if call.err != nil {
- return false, call.err
- }
- return !dup, nil
-}
-
-type addConnCall struct {
- p *clientConnPool
- done chan struct{} // closed when done
- err error
-}
-
-func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
- cc, err := t.NewClientConn(tc)
-
- p := c.p
- p.mu.Lock()
- if err != nil {
- c.err = err
- } else {
- p.addConnLocked(key, cc)
- }
- delete(p.addConnCalls, key)
- p.mu.Unlock()
- close(c.done)
-}
-
-func (p *clientConnPool) addConn(key string, cc *ClientConn) {
- p.mu.Lock()
- p.addConnLocked(key, cc)
- p.mu.Unlock()
-}
-
-// p.mu must be held
-func (p *clientConnPool) addConnLocked(key string, cc *ClientConn) {
- for _, v := range p.conns[key] {
- if v == cc {
- return
- }
- }
- if p.conns == nil {
- p.conns = make(map[string][]*ClientConn)
- }
- if p.keys == nil {
- p.keys = make(map[*ClientConn][]string)
- }
- p.conns[key] = append(p.conns[key], cc)
- p.keys[cc] = append(p.keys[cc], key)
-}
-
-func (p *clientConnPool) MarkDead(cc *ClientConn) {
- p.mu.Lock()
- defer p.mu.Unlock()
- for _, key := range p.keys[cc] {
- vv, ok := p.conns[key]
- if !ok {
- continue
- }
- newList := filterOutClientConn(vv, cc)
- if len(newList) > 0 {
- p.conns[key] = newList
- } else {
- delete(p.conns, key)
- }
- }
- delete(p.keys, cc)
-}
-
-func (p *clientConnPool) closeIdleConnections() {
- p.mu.Lock()
- defer p.mu.Unlock()
- // TODO: don't close a cc if it was just added to the pool
- // milliseconds ago and has never been used. There's currently
- // a small race window with the HTTP/1 Transport's integration
- // where it can add an idle conn just before using it, and
- // somebody else can concurrently call CloseIdleConns and
- // break some caller's RoundTrip.
- for _, vv := range p.conns {
- for _, cc := range vv {
- cc.closeIfIdle()
- }
- }
-}
-
-func filterOutClientConn(in []*ClientConn, exclude *ClientConn) []*ClientConn {
- out := in[:0]
- for _, v := range in {
- if v != exclude {
- out = append(out, v)
- }
- }
- // If we filtered it out, zero out the last item to prevent
- // the GC from seeing it.
- if len(in) != len(out) {
- in[len(in)-1] = nil
- }
- return out
-}
-
-// noDialClientConnPool is an implementation of http2.ClientConnPool
-// which never dials. We let the HTTP/1.1 client dial and use its TLS
-// connection instead.
-type noDialClientConnPool struct{ *clientConnPool }
-
-func (p noDialClientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
- return p.getClientConn(req, addr, noDialOnMiss)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/configure_transport.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/configure_transport.go
deleted file mode 100644
index b65fc6d42..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/configure_transport.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build go1.6
-
-package http2
-
-import (
- "crypto/tls"
- "fmt"
- "net/http"
-)
-
-func configureTransport(t1 *http.Transport) (*Transport, error) {
- connPool := new(clientConnPool)
- t2 := &Transport{
- ConnPool: noDialClientConnPool{connPool},
- t1: t1,
- }
- connPool.t = t2
- if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil {
- return nil, err
- }
- if t1.TLSClientConfig == nil {
- t1.TLSClientConfig = new(tls.Config)
- }
- if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") {
- t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...)
- }
- if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") {
- t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1")
- }
- upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper {
- addr := authorityAddr("https", authority)
- if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil {
- go c.Close()
- return erringRoundTripper{err}
- } else if !used {
- // Turns out we don't need this c.
- // For example, two goroutines made requests to the same host
- // at the same time, both kicking off TCP dials. (since protocol
- // was unknown)
- go c.Close()
- }
- return t2
- }
- if m := t1.TLSNextProto; len(m) == 0 {
- t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{
- "h2": upgradeFn,
- }
- } else {
- m["h2"] = upgradeFn
- }
- return t2, nil
-}
-
-// registerHTTPSProtocol calls Transport.RegisterProtocol but
-// converting panics into errors.
-func registerHTTPSProtocol(t *http.Transport, rt http.RoundTripper) (err error) {
- defer func() {
- if e := recover(); e != nil {
- err = fmt.Errorf("%v", e)
- }
- }()
- t.RegisterProtocol("https", rt)
- return nil
-}
-
-// noDialH2RoundTripper is a RoundTripper which only tries to complete the request
-// if there's already has a cached connection to the host.
-type noDialH2RoundTripper struct{ t *Transport }
-
-func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
- res, err := rt.t.RoundTrip(req)
- if err == ErrNoCachedConn {
- return nil, http.ErrSkipAltProtocol
- }
- return res, err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer.go
deleted file mode 100644
index a3067f8de..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "errors"
- "fmt"
- "sync"
-)
-
-// Buffer chunks are allocated from a pool to reduce pressure on GC.
-// The maximum wasted space per dataBuffer is 2x the largest size class,
-// which happens when the dataBuffer has multiple chunks and there is
-// one unread byte in both the first and last chunks. We use a few size
-// classes to minimize overheads for servers that typically receive very
-// small request bodies.
-//
-// TODO: Benchmark to determine if the pools are necessary. The GC may have
-// improved enough that we can instead allocate chunks like this:
-// make([]byte, max(16<<10, expectedBytesRemaining))
-var (
- dataChunkSizeClasses = []int{
- 1 << 10,
- 2 << 10,
- 4 << 10,
- 8 << 10,
- 16 << 10,
- }
- dataChunkPools = [...]sync.Pool{
- {New: func() interface{} { return make([]byte, 1<<10) }},
- {New: func() interface{} { return make([]byte, 2<<10) }},
- {New: func() interface{} { return make([]byte, 4<<10) }},
- {New: func() interface{} { return make([]byte, 8<<10) }},
- {New: func() interface{} { return make([]byte, 16<<10) }},
- }
-)
-
-func getDataBufferChunk(size int64) []byte {
- i := 0
- for ; i < len(dataChunkSizeClasses)-1; i++ {
- if size <= int64(dataChunkSizeClasses[i]) {
- break
- }
- }
- return dataChunkPools[i].Get().([]byte)
-}
-
-func putDataBufferChunk(p []byte) {
- for i, n := range dataChunkSizeClasses {
- if len(p) == n {
- dataChunkPools[i].Put(p)
- return
- }
- }
- panic(fmt.Sprintf("unexpected buffer len=%v", len(p)))
-}
-
-// dataBuffer is an io.ReadWriter backed by a list of data chunks.
-// Each dataBuffer is used to read DATA frames on a single stream.
-// The buffer is divided into chunks so the server can limit the
-// total memory used by a single connection without limiting the
-// request body size on any single stream.
-type dataBuffer struct {
- chunks [][]byte
- r int // next byte to read is chunks[0][r]
- w int // next byte to write is chunks[len(chunks)-1][w]
- size int // total buffered bytes
- expected int64 // we expect at least this many bytes in future Write calls (ignored if <= 0)
-}
-
-var errReadEmpty = errors.New("read from empty dataBuffer")
-
-// Read copies bytes from the buffer into p.
-// It is an error to read when no data is available.
-func (b *dataBuffer) Read(p []byte) (int, error) {
- if b.size == 0 {
- return 0, errReadEmpty
- }
- var ntotal int
- for len(p) > 0 && b.size > 0 {
- readFrom := b.bytesFromFirstChunk()
- n := copy(p, readFrom)
- p = p[n:]
- ntotal += n
- b.r += n
- b.size -= n
- // If the first chunk has been consumed, advance to the next chunk.
- if b.r == len(b.chunks[0]) {
- putDataBufferChunk(b.chunks[0])
- end := len(b.chunks) - 1
- copy(b.chunks[:end], b.chunks[1:])
- b.chunks[end] = nil
- b.chunks = b.chunks[:end]
- b.r = 0
- }
- }
- return ntotal, nil
-}
-
-func (b *dataBuffer) bytesFromFirstChunk() []byte {
- if len(b.chunks) == 1 {
- return b.chunks[0][b.r:b.w]
- }
- return b.chunks[0][b.r:]
-}
-
-// Len returns the number of bytes of the unread portion of the buffer.
-func (b *dataBuffer) Len() int {
- return b.size
-}
-
-// Write appends p to the buffer.
-func (b *dataBuffer) Write(p []byte) (int, error) {
- ntotal := len(p)
- for len(p) > 0 {
- // If the last chunk is empty, allocate a new chunk. Try to allocate
- // enough to fully copy p plus any additional bytes we expect to
- // receive. However, this may allocate less than len(p).
- want := int64(len(p))
- if b.expected > want {
- want = b.expected
- }
- chunk := b.lastChunkOrAlloc(want)
- n := copy(chunk[b.w:], p)
- p = p[n:]
- b.w += n
- b.size += n
- b.expected -= int64(n)
- }
- return ntotal, nil
-}
-
-func (b *dataBuffer) lastChunkOrAlloc(want int64) []byte {
- if len(b.chunks) != 0 {
- last := b.chunks[len(b.chunks)-1]
- if b.w < len(last) {
- return last
- }
- }
- chunk := getDataBufferChunk(want)
- b.chunks = append(b.chunks, chunk)
- b.w = 0
- return chunk
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer_test.go
deleted file mode 100644
index 028e12e52..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/databuffer_test.go
+++ /dev/null
@@ -1,157 +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 file.
-
-// +build go1.7
-
-package http2
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "testing"
-)
-
-func fmtDataChunk(chunk []byte) string {
- out := ""
- var last byte
- var count int
- for _, c := range chunk {
- if c != last {
- if count > 0 {
- out += fmt.Sprintf(" x %d ", count)
- count = 0
- }
- out += string([]byte{c})
- last = c
- }
- count++
- }
- if count > 0 {
- out += fmt.Sprintf(" x %d", count)
- }
- return out
-}
-
-func fmtDataChunks(chunks [][]byte) string {
- var out string
- for _, chunk := range chunks {
- out += fmt.Sprintf("{%q}", fmtDataChunk(chunk))
- }
- return out
-}
-
-func testDataBuffer(t *testing.T, wantBytes []byte, setup func(t *testing.T) *dataBuffer) {
- // Run setup, then read the remaining bytes from the dataBuffer and check
- // that they match wantBytes. We use different read sizes to check corner
- // cases in Read.
- for _, readSize := range []int{1, 2, 1 * 1024, 32 * 1024} {
- t.Run(fmt.Sprintf("ReadSize=%d", readSize), func(t *testing.T) {
- b := setup(t)
- buf := make([]byte, readSize)
- var gotRead bytes.Buffer
- for {
- n, err := b.Read(buf)
- gotRead.Write(buf[:n])
- if err == errReadEmpty {
- break
- }
- if err != nil {
- t.Fatalf("error after %v bytes: %v", gotRead.Len(), err)
- }
- }
- if got, want := gotRead.Bytes(), wantBytes; !bytes.Equal(got, want) {
- t.Errorf("FinalRead=%q, want %q", fmtDataChunk(got), fmtDataChunk(want))
- }
- })
- }
-}
-
-func TestDataBufferAllocation(t *testing.T) {
- writes := [][]byte{
- bytes.Repeat([]byte("a"), 1*1024-1),
- []byte("a"),
- bytes.Repeat([]byte("b"), 4*1024-1),
- []byte("b"),
- bytes.Repeat([]byte("c"), 8*1024-1),
- []byte("c"),
- bytes.Repeat([]byte("d"), 16*1024-1),
- []byte("d"),
- bytes.Repeat([]byte("e"), 32*1024),
- }
- var wantRead bytes.Buffer
- for _, p := range writes {
- wantRead.Write(p)
- }
-
- testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer {
- b := &dataBuffer{}
- for _, p := range writes {
- if n, err := b.Write(p); n != len(p) || err != nil {
- t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p))
- }
- }
- want := [][]byte{
- bytes.Repeat([]byte("a"), 1*1024),
- bytes.Repeat([]byte("b"), 4*1024),
- bytes.Repeat([]byte("c"), 8*1024),
- bytes.Repeat([]byte("d"), 16*1024),
- bytes.Repeat([]byte("e"), 16*1024),
- bytes.Repeat([]byte("e"), 16*1024),
- }
- if !reflect.DeepEqual(b.chunks, want) {
- t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want))
- }
- return b
- })
-}
-
-func TestDataBufferAllocationWithExpected(t *testing.T) {
- writes := [][]byte{
- bytes.Repeat([]byte("a"), 1*1024), // allocates 16KB
- bytes.Repeat([]byte("b"), 14*1024),
- bytes.Repeat([]byte("c"), 15*1024), // allocates 16KB more
- bytes.Repeat([]byte("d"), 2*1024),
- bytes.Repeat([]byte("e"), 1*1024), // overflows 32KB expectation, allocates just 1KB
- }
- var wantRead bytes.Buffer
- for _, p := range writes {
- wantRead.Write(p)
- }
-
- testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer {
- b := &dataBuffer{expected: 32 * 1024}
- for _, p := range writes {
- if n, err := b.Write(p); n != len(p) || err != nil {
- t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p))
- }
- }
- want := [][]byte{
- append(bytes.Repeat([]byte("a"), 1*1024), append(bytes.Repeat([]byte("b"), 14*1024), bytes.Repeat([]byte("c"), 1*1024)...)...),
- append(bytes.Repeat([]byte("c"), 14*1024), bytes.Repeat([]byte("d"), 2*1024)...),
- bytes.Repeat([]byte("e"), 1*1024),
- }
- if !reflect.DeepEqual(b.chunks, want) {
- t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want))
- }
- return b
- })
-}
-
-func TestDataBufferWriteAfterPartialRead(t *testing.T) {
- testDataBuffer(t, []byte("cdxyz"), func(t *testing.T) *dataBuffer {
- b := &dataBuffer{}
- if n, err := b.Write([]byte("abcd")); n != 4 || err != nil {
- t.Fatalf("Write(\"abcd\")=%v,%v want 4,nil", n, err)
- }
- p := make([]byte, 2)
- if n, err := b.Read(p); n != 2 || err != nil || !bytes.Equal(p, []byte("ab")) {
- t.Fatalf("Read()=%q,%v,%v want \"ab\",2,nil", p, n, err)
- }
- if n, err := b.Write([]byte("xyz")); n != 3 || err != nil {
- t.Fatalf("Write(\"xyz\")=%v,%v want 3,nil", n, err)
- }
- return b
- })
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors.go
deleted file mode 100644
index 71f2c4631..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "errors"
- "fmt"
-)
-
-// An ErrCode is an unsigned 32-bit error code as defined in the HTTP/2 spec.
-type ErrCode uint32
-
-const (
- ErrCodeNo ErrCode = 0x0
- ErrCodeProtocol ErrCode = 0x1
- ErrCodeInternal ErrCode = 0x2
- ErrCodeFlowControl ErrCode = 0x3
- ErrCodeSettingsTimeout ErrCode = 0x4
- ErrCodeStreamClosed ErrCode = 0x5
- ErrCodeFrameSize ErrCode = 0x6
- ErrCodeRefusedStream ErrCode = 0x7
- ErrCodeCancel ErrCode = 0x8
- ErrCodeCompression ErrCode = 0x9
- ErrCodeConnect ErrCode = 0xa
- ErrCodeEnhanceYourCalm ErrCode = 0xb
- ErrCodeInadequateSecurity ErrCode = 0xc
- ErrCodeHTTP11Required ErrCode = 0xd
-)
-
-var errCodeName = map[ErrCode]string{
- ErrCodeNo: "NO_ERROR",
- ErrCodeProtocol: "PROTOCOL_ERROR",
- ErrCodeInternal: "INTERNAL_ERROR",
- ErrCodeFlowControl: "FLOW_CONTROL_ERROR",
- ErrCodeSettingsTimeout: "SETTINGS_TIMEOUT",
- ErrCodeStreamClosed: "STREAM_CLOSED",
- ErrCodeFrameSize: "FRAME_SIZE_ERROR",
- ErrCodeRefusedStream: "REFUSED_STREAM",
- ErrCodeCancel: "CANCEL",
- ErrCodeCompression: "COMPRESSION_ERROR",
- ErrCodeConnect: "CONNECT_ERROR",
- ErrCodeEnhanceYourCalm: "ENHANCE_YOUR_CALM",
- ErrCodeInadequateSecurity: "INADEQUATE_SECURITY",
- ErrCodeHTTP11Required: "HTTP_1_1_REQUIRED",
-}
-
-func (e ErrCode) String() string {
- if s, ok := errCodeName[e]; ok {
- return s
- }
- return fmt.Sprintf("unknown error code 0x%x", uint32(e))
-}
-
-// ConnectionError is an error that results in the termination of the
-// entire connection.
-type ConnectionError ErrCode
-
-func (e ConnectionError) Error() string { return fmt.Sprintf("connection error: %s", ErrCode(e)) }
-
-// StreamError is an error that only affects one stream within an
-// HTTP/2 connection.
-type StreamError struct {
- StreamID uint32
- Code ErrCode
- Cause error // optional additional detail
-}
-
-func streamError(id uint32, code ErrCode) StreamError {
- return StreamError{StreamID: id, Code: code}
-}
-
-func (e StreamError) Error() string {
- if e.Cause != nil {
- return fmt.Sprintf("stream error: stream ID %d; %v; %v", e.StreamID, e.Code, e.Cause)
- }
- return fmt.Sprintf("stream error: stream ID %d; %v", e.StreamID, e.Code)
-}
-
-// 6.9.1 The Flow Control Window
-// "If a sender receives a WINDOW_UPDATE that causes a flow control
-// window to exceed this maximum it MUST terminate either the stream
-// or the connection, as appropriate. For streams, [...]; for the
-// connection, a GOAWAY frame with a FLOW_CONTROL_ERROR code."
-type goAwayFlowError struct{}
-
-func (goAwayFlowError) Error() string { return "connection exceeded flow control window size" }
-
-// connError represents an HTTP/2 ConnectionError error code, along
-// with a string (for debugging) explaining why.
-//
-// Errors of this type are only returned by the frame parser functions
-// and converted into ConnectionError(Code), after stashing away
-// the Reason into the Framer's errDetail field, accessible via
-// the (*Framer).ErrorDetail method.
-type connError struct {
- Code ErrCode // the ConnectionError error code
- Reason string // additional reason
-}
-
-func (e connError) Error() string {
- return fmt.Sprintf("http2: connection error: %v: %v", e.Code, e.Reason)
-}
-
-type pseudoHeaderError string
-
-func (e pseudoHeaderError) Error() string {
- return fmt.Sprintf("invalid pseudo-header %q", string(e))
-}
-
-type duplicatePseudoHeaderError string
-
-func (e duplicatePseudoHeaderError) Error() string {
- return fmt.Sprintf("duplicate pseudo-header %q", string(e))
-}
-
-type headerFieldNameError string
-
-func (e headerFieldNameError) Error() string {
- return fmt.Sprintf("invalid header field name %q", string(e))
-}
-
-type headerFieldValueError string
-
-func (e headerFieldValueError) Error() string {
- return fmt.Sprintf("invalid header field value %q", string(e))
-}
-
-var (
- errMixPseudoHeaderTypes = errors.New("mix of request and response pseudo headers")
- errPseudoAfterRegular = errors.New("pseudo header field after regular")
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors_test.go
deleted file mode 100644
index da5c58c31..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/errors_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import "testing"
-
-func TestErrCodeString(t *testing.T) {
- tests := []struct {
- err ErrCode
- want string
- }{
- {ErrCodeProtocol, "PROTOCOL_ERROR"},
- {0xd, "HTTP_1_1_REQUIRED"},
- {0xf, "unknown error code 0xf"},
- }
- for i, tt := range tests {
- got := tt.err.String()
- if got != tt.want {
- t.Errorf("%d. Error = %q; want %q", i, got, tt.want)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow.go
deleted file mode 100644
index 957de2542..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 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 file.
-
-// Flow control
-
-package http2
-
-// flow is the flow control window's size.
-type flow struct {
- // n is the number of DATA bytes we're allowed to send.
- // A flow is kept both on a conn and a per-stream.
- n int32
-
- // conn points to the shared connection-level flow that is
- // shared by all streams on that conn. It is nil for the flow
- // that's on the conn directly.
- conn *flow
-}
-
-func (f *flow) setConnFlow(cf *flow) { f.conn = cf }
-
-func (f *flow) available() int32 {
- n := f.n
- if f.conn != nil && f.conn.n < n {
- n = f.conn.n
- }
- return n
-}
-
-func (f *flow) take(n int32) {
- if n > f.available() {
- panic("internal error: took too much")
- }
- f.n -= n
- if f.conn != nil {
- f.conn.n -= n
- }
-}
-
-// add adds n bytes (positive or negative) to the flow control window.
-// It returns false if the sum would exceed 2^31-1.
-func (f *flow) add(n int32) bool {
- remain := (1<<31 - 1) - f.n
- if n > remain {
- return false
- }
- f.n += n
- return true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow_test.go
deleted file mode 100644
index 859adf5d1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/flow_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import "testing"
-
-func TestFlow(t *testing.T) {
- var st flow
- var conn flow
- st.add(3)
- conn.add(2)
-
- if got, want := st.available(), int32(3); got != want {
- t.Errorf("available = %d; want %d", got, want)
- }
- st.setConnFlow(&conn)
- if got, want := st.available(), int32(2); got != want {
- t.Errorf("after parent setup, available = %d; want %d", got, want)
- }
-
- st.take(2)
- if got, want := conn.available(), int32(0); got != want {
- t.Errorf("after taking 2, conn = %d; want %d", got, want)
- }
- if got, want := st.available(), int32(0); got != want {
- t.Errorf("after taking 2, stream = %d; want %d", got, want)
- }
-}
-
-func TestFlowAdd(t *testing.T) {
- var f flow
- if !f.add(1) {
- t.Fatal("failed to add 1")
- }
- if !f.add(-1) {
- t.Fatal("failed to add -1")
- }
- if got, want := f.available(), int32(0); got != want {
- t.Fatalf("size = %d; want %d", got, want)
- }
- if !f.add(1<<31 - 1) {
- t.Fatal("failed to add 2^31-1")
- }
- if got, want := f.available(), int32(1<<31-1); got != want {
- t.Fatalf("size = %d; want %d", got, want)
- }
- if f.add(1) {
- t.Fatal("adding 1 to max shouldn't be allowed")
- }
-
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame.go
deleted file mode 100644
index 3b1489072..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame.go
+++ /dev/null
@@ -1,1579 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "log"
- "strings"
- "sync"
-
- "golang.org/x/net/http2/hpack"
- "golang.org/x/net/lex/httplex"
-)
-
-const frameHeaderLen = 9
-
-var padZeros = make([]byte, 255) // zeros for padding
-
-// A FrameType is a registered frame type as defined in
-// http://http2.github.io/http2-spec/#rfc.section.11.2
-type FrameType uint8
-
-const (
- FrameData FrameType = 0x0
- FrameHeaders FrameType = 0x1
- FramePriority FrameType = 0x2
- FrameRSTStream FrameType = 0x3
- FrameSettings FrameType = 0x4
- FramePushPromise FrameType = 0x5
- FramePing FrameType = 0x6
- FrameGoAway FrameType = 0x7
- FrameWindowUpdate FrameType = 0x8
- FrameContinuation FrameType = 0x9
-)
-
-var frameName = map[FrameType]string{
- FrameData: "DATA",
- FrameHeaders: "HEADERS",
- FramePriority: "PRIORITY",
- FrameRSTStream: "RST_STREAM",
- FrameSettings: "SETTINGS",
- FramePushPromise: "PUSH_PROMISE",
- FramePing: "PING",
- FrameGoAway: "GOAWAY",
- FrameWindowUpdate: "WINDOW_UPDATE",
- FrameContinuation: "CONTINUATION",
-}
-
-func (t FrameType) String() string {
- if s, ok := frameName[t]; ok {
- return s
- }
- return fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", uint8(t))
-}
-
-// Flags is a bitmask of HTTP/2 flags.
-// The meaning of flags varies depending on the frame type.
-type Flags uint8
-
-// Has reports whether f contains all (0 or more) flags in v.
-func (f Flags) Has(v Flags) bool {
- return (f & v) == v
-}
-
-// Frame-specific FrameHeader flag bits.
-const (
- // Data Frame
- FlagDataEndStream Flags = 0x1
- FlagDataPadded Flags = 0x8
-
- // Headers Frame
- FlagHeadersEndStream Flags = 0x1
- FlagHeadersEndHeaders Flags = 0x4
- FlagHeadersPadded Flags = 0x8
- FlagHeadersPriority Flags = 0x20
-
- // Settings Frame
- FlagSettingsAck Flags = 0x1
-
- // Ping Frame
- FlagPingAck Flags = 0x1
-
- // Continuation Frame
- FlagContinuationEndHeaders Flags = 0x4
-
- FlagPushPromiseEndHeaders Flags = 0x4
- FlagPushPromisePadded Flags = 0x8
-)
-
-var flagName = map[FrameType]map[Flags]string{
- FrameData: {
- FlagDataEndStream: "END_STREAM",
- FlagDataPadded: "PADDED",
- },
- FrameHeaders: {
- FlagHeadersEndStream: "END_STREAM",
- FlagHeadersEndHeaders: "END_HEADERS",
- FlagHeadersPadded: "PADDED",
- FlagHeadersPriority: "PRIORITY",
- },
- FrameSettings: {
- FlagSettingsAck: "ACK",
- },
- FramePing: {
- FlagPingAck: "ACK",
- },
- FrameContinuation: {
- FlagContinuationEndHeaders: "END_HEADERS",
- },
- FramePushPromise: {
- FlagPushPromiseEndHeaders: "END_HEADERS",
- FlagPushPromisePadded: "PADDED",
- },
-}
-
-// a frameParser parses a frame given its FrameHeader and payload
-// bytes. The length of payload will always equal fh.Length (which
-// might be 0).
-type frameParser func(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error)
-
-var frameParsers = map[FrameType]frameParser{
- FrameData: parseDataFrame,
- FrameHeaders: parseHeadersFrame,
- FramePriority: parsePriorityFrame,
- FrameRSTStream: parseRSTStreamFrame,
- FrameSettings: parseSettingsFrame,
- FramePushPromise: parsePushPromise,
- FramePing: parsePingFrame,
- FrameGoAway: parseGoAwayFrame,
- FrameWindowUpdate: parseWindowUpdateFrame,
- FrameContinuation: parseContinuationFrame,
-}
-
-func typeFrameParser(t FrameType) frameParser {
- if f := frameParsers[t]; f != nil {
- return f
- }
- return parseUnknownFrame
-}
-
-// A FrameHeader is the 9 byte header of all HTTP/2 frames.
-//
-// See http://http2.github.io/http2-spec/#FrameHeader
-type FrameHeader struct {
- valid bool // caller can access []byte fields in the Frame
-
- // Type is the 1 byte frame type. There are ten standard frame
- // types, but extension frame types may be written by WriteRawFrame
- // and will be returned by ReadFrame (as UnknownFrame).
- Type FrameType
-
- // Flags are the 1 byte of 8 potential bit flags per frame.
- // They are specific to the frame type.
- Flags Flags
-
- // Length is the length of the frame, not including the 9 byte header.
- // The maximum size is one byte less than 16MB (uint24), but only
- // frames up to 16KB are allowed without peer agreement.
- Length uint32
-
- // StreamID is which stream this frame is for. Certain frames
- // are not stream-specific, in which case this field is 0.
- StreamID uint32
-}
-
-// Header returns h. It exists so FrameHeaders can be embedded in other
-// specific frame types and implement the Frame interface.
-func (h FrameHeader) Header() FrameHeader { return h }
-
-func (h FrameHeader) String() string {
- var buf bytes.Buffer
- buf.WriteString("[FrameHeader ")
- h.writeDebug(&buf)
- buf.WriteByte(']')
- return buf.String()
-}
-
-func (h FrameHeader) writeDebug(buf *bytes.Buffer) {
- buf.WriteString(h.Type.String())
- if h.Flags != 0 {
- buf.WriteString(" flags=")
- set := 0
- for i := uint8(0); i < 8; i++ {
- if h.Flags&(1<<i) == 0 {
- continue
- }
- set++
- if set > 1 {
- buf.WriteByte('|')
- }
- name := flagName[h.Type][Flags(1<<i)]
- if name != "" {
- buf.WriteString(name)
- } else {
- fmt.Fprintf(buf, "0x%x", 1<<i)
- }
- }
- }
- if h.StreamID != 0 {
- fmt.Fprintf(buf, " stream=%d", h.StreamID)
- }
- fmt.Fprintf(buf, " len=%d", h.Length)
-}
-
-func (h *FrameHeader) checkValid() {
- if !h.valid {
- panic("Frame accessor called on non-owned Frame")
- }
-}
-
-func (h *FrameHeader) invalidate() { h.valid = false }
-
-// frame header bytes.
-// Used only by ReadFrameHeader.
-var fhBytes = sync.Pool{
- New: func() interface{} {
- buf := make([]byte, frameHeaderLen)
- return &buf
- },
-}
-
-// ReadFrameHeader reads 9 bytes from r and returns a FrameHeader.
-// Most users should use Framer.ReadFrame instead.
-func ReadFrameHeader(r io.Reader) (FrameHeader, error) {
- bufp := fhBytes.Get().(*[]byte)
- defer fhBytes.Put(bufp)
- return readFrameHeader(*bufp, r)
-}
-
-func readFrameHeader(buf []byte, r io.Reader) (FrameHeader, error) {
- _, err := io.ReadFull(r, buf[:frameHeaderLen])
- if err != nil {
- return FrameHeader{}, err
- }
- return FrameHeader{
- Length: (uint32(buf[0])<<16 | uint32(buf[1])<<8 | uint32(buf[2])),
- Type: FrameType(buf[3]),
- Flags: Flags(buf[4]),
- StreamID: binary.BigEndian.Uint32(buf[5:]) & (1<<31 - 1),
- valid: true,
- }, nil
-}
-
-// A Frame is the base interface implemented by all frame types.
-// Callers will generally type-assert the specific frame type:
-// *HeadersFrame, *SettingsFrame, *WindowUpdateFrame, etc.
-//
-// Frames are only valid until the next call to Framer.ReadFrame.
-type Frame interface {
- Header() FrameHeader
-
- // invalidate is called by Framer.ReadFrame to make this
- // frame's buffers as being invalid, since the subsequent
- // frame will reuse them.
- invalidate()
-}
-
-// A Framer reads and writes Frames.
-type Framer struct {
- r io.Reader
- lastFrame Frame
- errDetail error
-
- // lastHeaderStream is non-zero if the last frame was an
- // unfinished HEADERS/CONTINUATION.
- lastHeaderStream uint32
-
- maxReadSize uint32
- headerBuf [frameHeaderLen]byte
-
- // TODO: let getReadBuf be configurable, and use a less memory-pinning
- // allocator in server.go to minimize memory pinned for many idle conns.
- // Will probably also need to make frame invalidation have a hook too.
- getReadBuf func(size uint32) []byte
- readBuf []byte // cache for default getReadBuf
-
- maxWriteSize uint32 // zero means unlimited; TODO: implement
-
- w io.Writer
- wbuf []byte
-
- // AllowIllegalWrites permits the Framer's Write methods to
- // write frames that do not conform to the HTTP/2 spec. This
- // permits using the Framer to test other HTTP/2
- // implementations' conformance to the spec.
- // If false, the Write methods will prefer to return an error
- // rather than comply.
- AllowIllegalWrites bool
-
- // AllowIllegalReads permits the Framer's ReadFrame method
- // to return non-compliant frames or frame orders.
- // This is for testing and permits using the Framer to test
- // other HTTP/2 implementations' conformance to the spec.
- // It is not compatible with ReadMetaHeaders.
- AllowIllegalReads bool
-
- // ReadMetaHeaders if non-nil causes ReadFrame to merge
- // HEADERS and CONTINUATION frames together and return
- // MetaHeadersFrame instead.
- ReadMetaHeaders *hpack.Decoder
-
- // MaxHeaderListSize is the http2 MAX_HEADER_LIST_SIZE.
- // It's used only if ReadMetaHeaders is set; 0 means a sane default
- // (currently 16MB)
- // If the limit is hit, MetaHeadersFrame.Truncated is set true.
- MaxHeaderListSize uint32
-
- // TODO: track which type of frame & with which flags was sent
- // last. Then return an error (unless AllowIllegalWrites) if
- // we're in the middle of a header block and a
- // non-Continuation or Continuation on a different stream is
- // attempted to be written.
-
- logReads, logWrites bool
-
- debugFramer *Framer // only use for logging written writes
- debugFramerBuf *bytes.Buffer
- debugReadLoggerf func(string, ...interface{})
- debugWriteLoggerf func(string, ...interface{})
-
- frameCache *frameCache // nil if frames aren't reused (default)
-}
-
-func (fr *Framer) maxHeaderListSize() uint32 {
- if fr.MaxHeaderListSize == 0 {
- return 16 << 20 // sane default, per docs
- }
- return fr.MaxHeaderListSize
-}
-
-func (f *Framer) startWrite(ftype FrameType, flags Flags, streamID uint32) {
- // Write the FrameHeader.
- f.wbuf = append(f.wbuf[:0],
- 0, // 3 bytes of length, filled in in endWrite
- 0,
- 0,
- byte(ftype),
- byte(flags),
- byte(streamID>>24),
- byte(streamID>>16),
- byte(streamID>>8),
- byte(streamID))
-}
-
-func (f *Framer) endWrite() error {
- // Now that we know the final size, fill in the FrameHeader in
- // the space previously reserved for it. Abuse append.
- length := len(f.wbuf) - frameHeaderLen
- if length >= (1 << 24) {
- return ErrFrameTooLarge
- }
- _ = append(f.wbuf[:0],
- byte(length>>16),
- byte(length>>8),
- byte(length))
- if f.logWrites {
- f.logWrite()
- }
-
- n, err := f.w.Write(f.wbuf)
- if err == nil && n != len(f.wbuf) {
- err = io.ErrShortWrite
- }
- return err
-}
-
-func (f *Framer) logWrite() {
- if f.debugFramer == nil {
- f.debugFramerBuf = new(bytes.Buffer)
- f.debugFramer = NewFramer(nil, f.debugFramerBuf)
- f.debugFramer.logReads = false // we log it ourselves, saying "wrote" below
- // Let us read anything, even if we accidentally wrote it
- // in the wrong order:
- f.debugFramer.AllowIllegalReads = true
- }
- f.debugFramerBuf.Write(f.wbuf)
- fr, err := f.debugFramer.ReadFrame()
- if err != nil {
- f.debugWriteLoggerf("http2: Framer %p: failed to decode just-written frame", f)
- return
- }
- f.debugWriteLoggerf("http2: Framer %p: wrote %v", f, summarizeFrame(fr))
-}
-
-func (f *Framer) writeByte(v byte) { f.wbuf = append(f.wbuf, v) }
-func (f *Framer) writeBytes(v []byte) { f.wbuf = append(f.wbuf, v...) }
-func (f *Framer) writeUint16(v uint16) { f.wbuf = append(f.wbuf, byte(v>>8), byte(v)) }
-func (f *Framer) writeUint32(v uint32) {
- f.wbuf = append(f.wbuf, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
-}
-
-const (
- minMaxFrameSize = 1 << 14
- maxFrameSize = 1<<24 - 1
-)
-
-// SetReuseFrames allows the Framer to reuse Frames.
-// If called on a Framer, Frames returned by calls to ReadFrame are only
-// valid until the next call to ReadFrame.
-func (fr *Framer) SetReuseFrames() {
- if fr.frameCache != nil {
- return
- }
- fr.frameCache = &frameCache{}
-}
-
-type frameCache struct {
- dataFrame DataFrame
-}
-
-func (fc *frameCache) getDataFrame() *DataFrame {
- if fc == nil {
- return &DataFrame{}
- }
- return &fc.dataFrame
-}
-
-// NewFramer returns a Framer that writes frames to w and reads them from r.
-func NewFramer(w io.Writer, r io.Reader) *Framer {
- fr := &Framer{
- w: w,
- r: r,
- logReads: logFrameReads,
- logWrites: logFrameWrites,
- debugReadLoggerf: log.Printf,
- debugWriteLoggerf: log.Printf,
- }
- fr.getReadBuf = func(size uint32) []byte {
- if cap(fr.readBuf) >= int(size) {
- return fr.readBuf[:size]
- }
- fr.readBuf = make([]byte, size)
- return fr.readBuf
- }
- fr.SetMaxReadFrameSize(maxFrameSize)
- return fr
-}
-
-// SetMaxReadFrameSize sets the maximum size of a frame
-// that will be read by a subsequent call to ReadFrame.
-// It is the caller's responsibility to advertise this
-// limit with a SETTINGS frame.
-func (fr *Framer) SetMaxReadFrameSize(v uint32) {
- if v > maxFrameSize {
- v = maxFrameSize
- }
- fr.maxReadSize = v
-}
-
-// ErrorDetail returns a more detailed error of the last error
-// returned by Framer.ReadFrame. For instance, if ReadFrame
-// returns a StreamError with code PROTOCOL_ERROR, ErrorDetail
-// will say exactly what was invalid. ErrorDetail is not guaranteed
-// to return a non-nil value and like the rest of the http2 package,
-// its return value is not protected by an API compatibility promise.
-// ErrorDetail is reset after the next call to ReadFrame.
-func (fr *Framer) ErrorDetail() error {
- return fr.errDetail
-}
-
-// ErrFrameTooLarge is returned from Framer.ReadFrame when the peer
-// sends a frame that is larger than declared with SetMaxReadFrameSize.
-var ErrFrameTooLarge = errors.New("http2: frame too large")
-
-// terminalReadFrameError reports whether err is an unrecoverable
-// error from ReadFrame and no other frames should be read.
-func terminalReadFrameError(err error) bool {
- if _, ok := err.(StreamError); ok {
- return false
- }
- return err != nil
-}
-
-// ReadFrame reads a single frame. The returned Frame is only valid
-// until the next call to ReadFrame.
-//
-// If the frame is larger than previously set with SetMaxReadFrameSize, the
-// returned error is ErrFrameTooLarge. Other errors may be of type
-// ConnectionError, StreamError, or anything else from the underlying
-// reader.
-func (fr *Framer) ReadFrame() (Frame, error) {
- fr.errDetail = nil
- if fr.lastFrame != nil {
- fr.lastFrame.invalidate()
- }
- fh, err := readFrameHeader(fr.headerBuf[:], fr.r)
- if err != nil {
- return nil, err
- }
- if fh.Length > fr.maxReadSize {
- return nil, ErrFrameTooLarge
- }
- payload := fr.getReadBuf(fh.Length)
- if _, err := io.ReadFull(fr.r, payload); err != nil {
- return nil, err
- }
- f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, payload)
- if err != nil {
- if ce, ok := err.(connError); ok {
- return nil, fr.connError(ce.Code, ce.Reason)
- }
- return nil, err
- }
- if err := fr.checkFrameOrder(f); err != nil {
- return nil, err
- }
- if fr.logReads {
- fr.debugReadLoggerf("http2: Framer %p: read %v", fr, summarizeFrame(f))
- }
- if fh.Type == FrameHeaders && fr.ReadMetaHeaders != nil {
- return fr.readMetaFrame(f.(*HeadersFrame))
- }
- return f, nil
-}
-
-// connError returns ConnectionError(code) but first
-// stashes away a public reason to the caller can optionally relay it
-// to the peer before hanging up on them. This might help others debug
-// their implementations.
-func (fr *Framer) connError(code ErrCode, reason string) error {
- fr.errDetail = errors.New(reason)
- return ConnectionError(code)
-}
-
-// checkFrameOrder reports an error if f is an invalid frame to return
-// next from ReadFrame. Mostly it checks whether HEADERS and
-// CONTINUATION frames are contiguous.
-func (fr *Framer) checkFrameOrder(f Frame) error {
- last := fr.lastFrame
- fr.lastFrame = f
- if fr.AllowIllegalReads {
- return nil
- }
-
- fh := f.Header()
- if fr.lastHeaderStream != 0 {
- if fh.Type != FrameContinuation {
- return fr.connError(ErrCodeProtocol,
- fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d",
- fh.Type, fh.StreamID,
- last.Header().Type, fr.lastHeaderStream))
- }
- if fh.StreamID != fr.lastHeaderStream {
- return fr.connError(ErrCodeProtocol,
- fmt.Sprintf("got CONTINUATION for stream %d; expected stream %d",
- fh.StreamID, fr.lastHeaderStream))
- }
- } else if fh.Type == FrameContinuation {
- return fr.connError(ErrCodeProtocol, fmt.Sprintf("unexpected CONTINUATION for stream %d", fh.StreamID))
- }
-
- switch fh.Type {
- case FrameHeaders, FrameContinuation:
- if fh.Flags.Has(FlagHeadersEndHeaders) {
- fr.lastHeaderStream = 0
- } else {
- fr.lastHeaderStream = fh.StreamID
- }
- }
-
- return nil
-}
-
-// A DataFrame conveys arbitrary, variable-length sequences of octets
-// associated with a stream.
-// See http://http2.github.io/http2-spec/#rfc.section.6.1
-type DataFrame struct {
- FrameHeader
- data []byte
-}
-
-func (f *DataFrame) StreamEnded() bool {
- return f.FrameHeader.Flags.Has(FlagDataEndStream)
-}
-
-// Data returns the frame's data octets, not including any padding
-// size byte or padding suffix bytes.
-// The caller must not retain the returned memory past the next
-// call to ReadFrame.
-func (f *DataFrame) Data() []byte {
- f.checkValid()
- return f.data
-}
-
-func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
- if fh.StreamID == 0 {
- // DATA frames MUST be associated with a stream. If a
- // DATA frame is received whose stream identifier
- // field is 0x0, the recipient MUST respond with a
- // connection error (Section 5.4.1) of type
- // PROTOCOL_ERROR.
- return nil, connError{ErrCodeProtocol, "DATA frame with stream ID 0"}
- }
- f := fc.getDataFrame()
- f.FrameHeader = fh
-
- var padSize byte
- if fh.Flags.Has(FlagDataPadded) {
- var err error
- payload, padSize, err = readByte(payload)
- if err != nil {
- return nil, err
- }
- }
- if int(padSize) > len(payload) {
- // If the length of the padding is greater than the
- // length of the frame payload, the recipient MUST
- // treat this as a connection error.
- // Filed: https://github.com/http2/http2-spec/issues/610
- return nil, connError{ErrCodeProtocol, "pad size larger than data payload"}
- }
- f.data = payload[:len(payload)-int(padSize)]
- return f, nil
-}
-
-var (
- errStreamID = errors.New("invalid stream ID")
- errDepStreamID = errors.New("invalid dependent stream ID")
- errPadLength = errors.New("pad length too large")
- errPadBytes = errors.New("padding bytes must all be zeros unless AllowIllegalWrites is enabled")
-)
-
-func validStreamIDOrZero(streamID uint32) bool {
- return streamID&(1<<31) == 0
-}
-
-func validStreamID(streamID uint32) bool {
- return streamID != 0 && streamID&(1<<31) == 0
-}
-
-// WriteData writes a DATA frame.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility not to violate the maximum frame size
-// and to not call other Write methods concurrently.
-func (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error {
- return f.WriteDataPadded(streamID, endStream, data, nil)
-}
-
-// WriteData writes a DATA frame with optional padding.
-//
-// If pad is nil, the padding bit is not sent.
-// The length of pad must not exceed 255 bytes.
-// The bytes of pad must all be zero, unless f.AllowIllegalWrites is set.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility not to violate the maximum frame size
-// and to not call other Write methods concurrently.
-func (f *Framer) WriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {
- if !validStreamID(streamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- if len(pad) > 0 {
- if len(pad) > 255 {
- return errPadLength
- }
- if !f.AllowIllegalWrites {
- for _, b := range pad {
- if b != 0 {
- // "Padding octets MUST be set to zero when sending."
- return errPadBytes
- }
- }
- }
- }
- var flags Flags
- if endStream {
- flags |= FlagDataEndStream
- }
- if pad != nil {
- flags |= FlagDataPadded
- }
- f.startWrite(FrameData, flags, streamID)
- if pad != nil {
- f.wbuf = append(f.wbuf, byte(len(pad)))
- }
- f.wbuf = append(f.wbuf, data...)
- f.wbuf = append(f.wbuf, pad...)
- return f.endWrite()
-}
-
-// A SettingsFrame conveys configuration parameters that affect how
-// endpoints communicate, such as preferences and constraints on peer
-// behavior.
-//
-// See http://http2.github.io/http2-spec/#SETTINGS
-type SettingsFrame struct {
- FrameHeader
- p []byte
-}
-
-func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- if fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 {
- // When this (ACK 0x1) bit is set, the payload of the
- // SETTINGS frame MUST be empty. Receipt of a
- // SETTINGS frame with the ACK flag set and a length
- // field value other than 0 MUST be treated as a
- // connection error (Section 5.4.1) of type
- // FRAME_SIZE_ERROR.
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- if fh.StreamID != 0 {
- // SETTINGS frames always apply to a connection,
- // never a single stream. The stream identifier for a
- // SETTINGS frame MUST be zero (0x0). If an endpoint
- // receives a SETTINGS frame whose stream identifier
- // field is anything other than 0x0, the endpoint MUST
- // respond with a connection error (Section 5.4.1) of
- // type PROTOCOL_ERROR.
- return nil, ConnectionError(ErrCodeProtocol)
- }
- if len(p)%6 != 0 {
- // Expecting even number of 6 byte settings.
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- f := &SettingsFrame{FrameHeader: fh, p: p}
- if v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 {
- // Values above the maximum flow control window size of 2^31 - 1 MUST
- // be treated as a connection error (Section 5.4.1) of type
- // FLOW_CONTROL_ERROR.
- return nil, ConnectionError(ErrCodeFlowControl)
- }
- return f, nil
-}
-
-func (f *SettingsFrame) IsAck() bool {
- return f.FrameHeader.Flags.Has(FlagSettingsAck)
-}
-
-func (f *SettingsFrame) Value(s SettingID) (v uint32, ok bool) {
- f.checkValid()
- buf := f.p
- for len(buf) > 0 {
- settingID := SettingID(binary.BigEndian.Uint16(buf[:2]))
- if settingID == s {
- return binary.BigEndian.Uint32(buf[2:6]), true
- }
- buf = buf[6:]
- }
- return 0, false
-}
-
-// ForeachSetting runs fn for each setting.
-// It stops and returns the first error.
-func (f *SettingsFrame) ForeachSetting(fn func(Setting) error) error {
- f.checkValid()
- buf := f.p
- for len(buf) > 0 {
- if err := fn(Setting{
- SettingID(binary.BigEndian.Uint16(buf[:2])),
- binary.BigEndian.Uint32(buf[2:6]),
- }); err != nil {
- return err
- }
- buf = buf[6:]
- }
- return nil
-}
-
-// WriteSettings writes a SETTINGS frame with zero or more settings
-// specified and the ACK bit not set.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WriteSettings(settings ...Setting) error {
- f.startWrite(FrameSettings, 0, 0)
- for _, s := range settings {
- f.writeUint16(uint16(s.ID))
- f.writeUint32(s.Val)
- }
- return f.endWrite()
-}
-
-// WriteSettingsAck writes an empty SETTINGS frame with the ACK bit set.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WriteSettingsAck() error {
- f.startWrite(FrameSettings, FlagSettingsAck, 0)
- return f.endWrite()
-}
-
-// A PingFrame is a mechanism for measuring a minimal round trip time
-// from the sender, as well as determining whether an idle connection
-// is still functional.
-// See http://http2.github.io/http2-spec/#rfc.section.6.7
-type PingFrame struct {
- FrameHeader
- Data [8]byte
-}
-
-func (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) }
-
-func parsePingFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
- if len(payload) != 8 {
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- if fh.StreamID != 0 {
- return nil, ConnectionError(ErrCodeProtocol)
- }
- f := &PingFrame{FrameHeader: fh}
- copy(f.Data[:], payload)
- return f, nil
-}
-
-func (f *Framer) WritePing(ack bool, data [8]byte) error {
- var flags Flags
- if ack {
- flags = FlagPingAck
- }
- f.startWrite(FramePing, flags, 0)
- f.writeBytes(data[:])
- return f.endWrite()
-}
-
-// A GoAwayFrame informs the remote peer to stop creating streams on this connection.
-// See http://http2.github.io/http2-spec/#rfc.section.6.8
-type GoAwayFrame struct {
- FrameHeader
- LastStreamID uint32
- ErrCode ErrCode
- debugData []byte
-}
-
-// DebugData returns any debug data in the GOAWAY frame. Its contents
-// are not defined.
-// The caller must not retain the returned memory past the next
-// call to ReadFrame.
-func (f *GoAwayFrame) DebugData() []byte {
- f.checkValid()
- return f.debugData
-}
-
-func parseGoAwayFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- if fh.StreamID != 0 {
- return nil, ConnectionError(ErrCodeProtocol)
- }
- if len(p) < 8 {
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- return &GoAwayFrame{
- FrameHeader: fh,
- LastStreamID: binary.BigEndian.Uint32(p[:4]) & (1<<31 - 1),
- ErrCode: ErrCode(binary.BigEndian.Uint32(p[4:8])),
- debugData: p[8:],
- }, nil
-}
-
-func (f *Framer) WriteGoAway(maxStreamID uint32, code ErrCode, debugData []byte) error {
- f.startWrite(FrameGoAway, 0, 0)
- f.writeUint32(maxStreamID & (1<<31 - 1))
- f.writeUint32(uint32(code))
- f.writeBytes(debugData)
- return f.endWrite()
-}
-
-// An UnknownFrame is the frame type returned when the frame type is unknown
-// or no specific frame type parser exists.
-type UnknownFrame struct {
- FrameHeader
- p []byte
-}
-
-// Payload returns the frame's payload (after the header). It is not
-// valid to call this method after a subsequent call to
-// Framer.ReadFrame, nor is it valid to retain the returned slice.
-// The memory is owned by the Framer and is invalidated when the next
-// frame is read.
-func (f *UnknownFrame) Payload() []byte {
- f.checkValid()
- return f.p
-}
-
-func parseUnknownFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- return &UnknownFrame{fh, p}, nil
-}
-
-// A WindowUpdateFrame is used to implement flow control.
-// See http://http2.github.io/http2-spec/#rfc.section.6.9
-type WindowUpdateFrame struct {
- FrameHeader
- Increment uint32 // never read with high bit set
-}
-
-func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- if len(p) != 4 {
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- inc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit
- if inc == 0 {
- // A receiver MUST treat the receipt of a
- // WINDOW_UPDATE frame with an flow control window
- // increment of 0 as a stream error (Section 5.4.2) of
- // type PROTOCOL_ERROR; errors on the connection flow
- // control window MUST be treated as a connection
- // error (Section 5.4.1).
- if fh.StreamID == 0 {
- return nil, ConnectionError(ErrCodeProtocol)
- }
- return nil, streamError(fh.StreamID, ErrCodeProtocol)
- }
- return &WindowUpdateFrame{
- FrameHeader: fh,
- Increment: inc,
- }, nil
-}
-
-// WriteWindowUpdate writes a WINDOW_UPDATE frame.
-// The increment value must be between 1 and 2,147,483,647, inclusive.
-// If the Stream ID is zero, the window update applies to the
-// connection as a whole.
-func (f *Framer) WriteWindowUpdate(streamID, incr uint32) error {
- // "The legal range for the increment to the flow control window is 1 to 2^31-1 (2,147,483,647) octets."
- if (incr < 1 || incr > 2147483647) && !f.AllowIllegalWrites {
- return errors.New("illegal window increment value")
- }
- f.startWrite(FrameWindowUpdate, 0, streamID)
- f.writeUint32(incr)
- return f.endWrite()
-}
-
-// A HeadersFrame is used to open a stream and additionally carries a
-// header block fragment.
-type HeadersFrame struct {
- FrameHeader
-
- // Priority is set if FlagHeadersPriority is set in the FrameHeader.
- Priority PriorityParam
-
- headerFragBuf []byte // not owned
-}
-
-func (f *HeadersFrame) HeaderBlockFragment() []byte {
- f.checkValid()
- return f.headerFragBuf
-}
-
-func (f *HeadersFrame) HeadersEnded() bool {
- return f.FrameHeader.Flags.Has(FlagHeadersEndHeaders)
-}
-
-func (f *HeadersFrame) StreamEnded() bool {
- return f.FrameHeader.Flags.Has(FlagHeadersEndStream)
-}
-
-func (f *HeadersFrame) HasPriority() bool {
- return f.FrameHeader.Flags.Has(FlagHeadersPriority)
-}
-
-func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
- hf := &HeadersFrame{
- FrameHeader: fh,
- }
- if fh.StreamID == 0 {
- // HEADERS frames MUST be associated with a stream. If a HEADERS frame
- // is received whose stream identifier field is 0x0, the recipient MUST
- // respond with a connection error (Section 5.4.1) of type
- // PROTOCOL_ERROR.
- return nil, connError{ErrCodeProtocol, "HEADERS frame with stream ID 0"}
- }
- var padLength uint8
- if fh.Flags.Has(FlagHeadersPadded) {
- if p, padLength, err = readByte(p); err != nil {
- return
- }
- }
- if fh.Flags.Has(FlagHeadersPriority) {
- var v uint32
- p, v, err = readUint32(p)
- if err != nil {
- return nil, err
- }
- hf.Priority.StreamDep = v & 0x7fffffff
- hf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set
- p, hf.Priority.Weight, err = readByte(p)
- if err != nil {
- return nil, err
- }
- }
- if len(p)-int(padLength) <= 0 {
- return nil, streamError(fh.StreamID, ErrCodeProtocol)
- }
- hf.headerFragBuf = p[:len(p)-int(padLength)]
- return hf, nil
-}
-
-// HeadersFrameParam are the parameters for writing a HEADERS frame.
-type HeadersFrameParam struct {
- // StreamID is the required Stream ID to initiate.
- StreamID uint32
- // BlockFragment is part (or all) of a Header Block.
- BlockFragment []byte
-
- // EndStream indicates that the header block is the last that
- // the endpoint will send for the identified stream. Setting
- // this flag causes the stream to enter one of "half closed"
- // states.
- EndStream bool
-
- // EndHeaders indicates that this frame contains an entire
- // header block and is not followed by any
- // CONTINUATION frames.
- EndHeaders bool
-
- // PadLength is the optional number of bytes of zeros to add
- // to this frame.
- PadLength uint8
-
- // Priority, if non-zero, includes stream priority information
- // in the HEADER frame.
- Priority PriorityParam
-}
-
-// WriteHeaders writes a single HEADERS frame.
-//
-// This is a low-level header writing method. Encoding headers and
-// splitting them into any necessary CONTINUATION frames is handled
-// elsewhere.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WriteHeaders(p HeadersFrameParam) error {
- if !validStreamID(p.StreamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- var flags Flags
- if p.PadLength != 0 {
- flags |= FlagHeadersPadded
- }
- if p.EndStream {
- flags |= FlagHeadersEndStream
- }
- if p.EndHeaders {
- flags |= FlagHeadersEndHeaders
- }
- if !p.Priority.IsZero() {
- flags |= FlagHeadersPriority
- }
- f.startWrite(FrameHeaders, flags, p.StreamID)
- if p.PadLength != 0 {
- f.writeByte(p.PadLength)
- }
- if !p.Priority.IsZero() {
- v := p.Priority.StreamDep
- if !validStreamIDOrZero(v) && !f.AllowIllegalWrites {
- return errDepStreamID
- }
- if p.Priority.Exclusive {
- v |= 1 << 31
- }
- f.writeUint32(v)
- f.writeByte(p.Priority.Weight)
- }
- f.wbuf = append(f.wbuf, p.BlockFragment...)
- f.wbuf = append(f.wbuf, padZeros[:p.PadLength]...)
- return f.endWrite()
-}
-
-// A PriorityFrame specifies the sender-advised priority of a stream.
-// See http://http2.github.io/http2-spec/#rfc.section.6.3
-type PriorityFrame struct {
- FrameHeader
- PriorityParam
-}
-
-// PriorityParam are the stream prioritzation parameters.
-type PriorityParam struct {
- // StreamDep is a 31-bit stream identifier for the
- // stream that this stream depends on. Zero means no
- // dependency.
- StreamDep uint32
-
- // Exclusive is whether the dependency is exclusive.
- Exclusive bool
-
- // Weight is the stream's zero-indexed weight. It should be
- // set together with StreamDep, or neither should be set. Per
- // the spec, "Add one to the value to obtain a weight between
- // 1 and 256."
- Weight uint8
-}
-
-func (p PriorityParam) IsZero() bool {
- return p == PriorityParam{}
-}
-
-func parsePriorityFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
- if fh.StreamID == 0 {
- return nil, connError{ErrCodeProtocol, "PRIORITY frame with stream ID 0"}
- }
- if len(payload) != 5 {
- return nil, connError{ErrCodeFrameSize, fmt.Sprintf("PRIORITY frame payload size was %d; want 5", len(payload))}
- }
- v := binary.BigEndian.Uint32(payload[:4])
- streamID := v & 0x7fffffff // mask off high bit
- return &PriorityFrame{
- FrameHeader: fh,
- PriorityParam: PriorityParam{
- Weight: payload[4],
- StreamDep: streamID,
- Exclusive: streamID != v, // was high bit set?
- },
- }, nil
-}
-
-// WritePriority writes a PRIORITY frame.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WritePriority(streamID uint32, p PriorityParam) error {
- if !validStreamID(streamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- if !validStreamIDOrZero(p.StreamDep) {
- return errDepStreamID
- }
- f.startWrite(FramePriority, 0, streamID)
- v := p.StreamDep
- if p.Exclusive {
- v |= 1 << 31
- }
- f.writeUint32(v)
- f.writeByte(p.Weight)
- return f.endWrite()
-}
-
-// A RSTStreamFrame allows for abnormal termination of a stream.
-// See http://http2.github.io/http2-spec/#rfc.section.6.4
-type RSTStreamFrame struct {
- FrameHeader
- ErrCode ErrCode
-}
-
-func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- if len(p) != 4 {
- return nil, ConnectionError(ErrCodeFrameSize)
- }
- if fh.StreamID == 0 {
- return nil, ConnectionError(ErrCodeProtocol)
- }
- return &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil
-}
-
-// WriteRSTStream writes a RST_STREAM frame.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WriteRSTStream(streamID uint32, code ErrCode) error {
- if !validStreamID(streamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- f.startWrite(FrameRSTStream, 0, streamID)
- f.writeUint32(uint32(code))
- return f.endWrite()
-}
-
-// A ContinuationFrame is used to continue a sequence of header block fragments.
-// See http://http2.github.io/http2-spec/#rfc.section.6.10
-type ContinuationFrame struct {
- FrameHeader
- headerFragBuf []byte
-}
-
-func parseContinuationFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
- if fh.StreamID == 0 {
- return nil, connError{ErrCodeProtocol, "CONTINUATION frame with stream ID 0"}
- }
- return &ContinuationFrame{fh, p}, nil
-}
-
-func (f *ContinuationFrame) HeaderBlockFragment() []byte {
- f.checkValid()
- return f.headerFragBuf
-}
-
-func (f *ContinuationFrame) HeadersEnded() bool {
- return f.FrameHeader.Flags.Has(FlagContinuationEndHeaders)
-}
-
-// WriteContinuation writes a CONTINUATION frame.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WriteContinuation(streamID uint32, endHeaders bool, headerBlockFragment []byte) error {
- if !validStreamID(streamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- var flags Flags
- if endHeaders {
- flags |= FlagContinuationEndHeaders
- }
- f.startWrite(FrameContinuation, flags, streamID)
- f.wbuf = append(f.wbuf, headerBlockFragment...)
- return f.endWrite()
-}
-
-// A PushPromiseFrame is used to initiate a server stream.
-// See http://http2.github.io/http2-spec/#rfc.section.6.6
-type PushPromiseFrame struct {
- FrameHeader
- PromiseID uint32
- headerFragBuf []byte // not owned
-}
-
-func (f *PushPromiseFrame) HeaderBlockFragment() []byte {
- f.checkValid()
- return f.headerFragBuf
-}
-
-func (f *PushPromiseFrame) HeadersEnded() bool {
- return f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders)
-}
-
-func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
- pp := &PushPromiseFrame{
- FrameHeader: fh,
- }
- if pp.StreamID == 0 {
- // PUSH_PROMISE frames MUST be associated with an existing,
- // peer-initiated stream. The stream identifier of a
- // PUSH_PROMISE frame indicates the stream it is associated
- // with. If the stream identifier field specifies the value
- // 0x0, a recipient MUST respond with a connection error
- // (Section 5.4.1) of type PROTOCOL_ERROR.
- return nil, ConnectionError(ErrCodeProtocol)
- }
- // The PUSH_PROMISE frame includes optional padding.
- // Padding fields and flags are identical to those defined for DATA frames
- var padLength uint8
- if fh.Flags.Has(FlagPushPromisePadded) {
- if p, padLength, err = readByte(p); err != nil {
- return
- }
- }
-
- p, pp.PromiseID, err = readUint32(p)
- if err != nil {
- return
- }
- pp.PromiseID = pp.PromiseID & (1<<31 - 1)
-
- if int(padLength) > len(p) {
- // like the DATA frame, error out if padding is longer than the body.
- return nil, ConnectionError(ErrCodeProtocol)
- }
- pp.headerFragBuf = p[:len(p)-int(padLength)]
- return pp, nil
-}
-
-// PushPromiseParam are the parameters for writing a PUSH_PROMISE frame.
-type PushPromiseParam struct {
- // StreamID is the required Stream ID to initiate.
- StreamID uint32
-
- // PromiseID is the required Stream ID which this
- // Push Promises
- PromiseID uint32
-
- // BlockFragment is part (or all) of a Header Block.
- BlockFragment []byte
-
- // EndHeaders indicates that this frame contains an entire
- // header block and is not followed by any
- // CONTINUATION frames.
- EndHeaders bool
-
- // PadLength is the optional number of bytes of zeros to add
- // to this frame.
- PadLength uint8
-}
-
-// WritePushPromise writes a single PushPromise Frame.
-//
-// As with Header Frames, This is the low level call for writing
-// individual frames. Continuation frames are handled elsewhere.
-//
-// It will perform exactly one Write to the underlying Writer.
-// It is the caller's responsibility to not call other Write methods concurrently.
-func (f *Framer) WritePushPromise(p PushPromiseParam) error {
- if !validStreamID(p.StreamID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- var flags Flags
- if p.PadLength != 0 {
- flags |= FlagPushPromisePadded
- }
- if p.EndHeaders {
- flags |= FlagPushPromiseEndHeaders
- }
- f.startWrite(FramePushPromise, flags, p.StreamID)
- if p.PadLength != 0 {
- f.writeByte(p.PadLength)
- }
- if !validStreamID(p.PromiseID) && !f.AllowIllegalWrites {
- return errStreamID
- }
- f.writeUint32(p.PromiseID)
- f.wbuf = append(f.wbuf, p.BlockFragment...)
- f.wbuf = append(f.wbuf, padZeros[:p.PadLength]...)
- return f.endWrite()
-}
-
-// WriteRawFrame writes a raw frame. This can be used to write
-// extension frames unknown to this package.
-func (f *Framer) WriteRawFrame(t FrameType, flags Flags, streamID uint32, payload []byte) error {
- f.startWrite(t, flags, streamID)
- f.writeBytes(payload)
- return f.endWrite()
-}
-
-func readByte(p []byte) (remain []byte, b byte, err error) {
- if len(p) == 0 {
- return nil, 0, io.ErrUnexpectedEOF
- }
- return p[1:], p[0], nil
-}
-
-func readUint32(p []byte) (remain []byte, v uint32, err error) {
- if len(p) < 4 {
- return nil, 0, io.ErrUnexpectedEOF
- }
- return p[4:], binary.BigEndian.Uint32(p[:4]), nil
-}
-
-type streamEnder interface {
- StreamEnded() bool
-}
-
-type headersEnder interface {
- HeadersEnded() bool
-}
-
-type headersOrContinuation interface {
- headersEnder
- HeaderBlockFragment() []byte
-}
-
-// A MetaHeadersFrame is the representation of one HEADERS frame and
-// zero or more contiguous CONTINUATION frames and the decoding of
-// their HPACK-encoded contents.
-//
-// This type of frame does not appear on the wire and is only returned
-// by the Framer when Framer.ReadMetaHeaders is set.
-type MetaHeadersFrame struct {
- *HeadersFrame
-
- // Fields are the fields contained in the HEADERS and
- // CONTINUATION frames. The underlying slice is owned by the
- // Framer and must not be retained after the next call to
- // ReadFrame.
- //
- // Fields are guaranteed to be in the correct http2 order and
- // not have unknown pseudo header fields or invalid header
- // field names or values. Required pseudo header fields may be
- // missing, however. Use the MetaHeadersFrame.Pseudo accessor
- // method access pseudo headers.
- Fields []hpack.HeaderField
-
- // Truncated is whether the max header list size limit was hit
- // and Fields is incomplete. The hpack decoder state is still
- // valid, however.
- Truncated bool
-}
-
-// PseudoValue returns the given pseudo header field's value.
-// The provided pseudo field should not contain the leading colon.
-func (mh *MetaHeadersFrame) PseudoValue(pseudo string) string {
- for _, hf := range mh.Fields {
- if !hf.IsPseudo() {
- return ""
- }
- if hf.Name[1:] == pseudo {
- return hf.Value
- }
- }
- return ""
-}
-
-// RegularFields returns the regular (non-pseudo) header fields of mh.
-// The caller does not own the returned slice.
-func (mh *MetaHeadersFrame) RegularFields() []hpack.HeaderField {
- for i, hf := range mh.Fields {
- if !hf.IsPseudo() {
- return mh.Fields[i:]
- }
- }
- return nil
-}
-
-// PseudoFields returns the pseudo header fields of mh.
-// The caller does not own the returned slice.
-func (mh *MetaHeadersFrame) PseudoFields() []hpack.HeaderField {
- for i, hf := range mh.Fields {
- if !hf.IsPseudo() {
- return mh.Fields[:i]
- }
- }
- return mh.Fields
-}
-
-func (mh *MetaHeadersFrame) checkPseudos() error {
- var isRequest, isResponse bool
- pf := mh.PseudoFields()
- for i, hf := range pf {
- switch hf.Name {
- case ":method", ":path", ":scheme", ":authority":
- isRequest = true
- case ":status":
- isResponse = true
- default:
- return pseudoHeaderError(hf.Name)
- }
- // Check for duplicates.
- // This would be a bad algorithm, but N is 4.
- // And this doesn't allocate.
- for _, hf2 := range pf[:i] {
- if hf.Name == hf2.Name {
- return duplicatePseudoHeaderError(hf.Name)
- }
- }
- }
- if isRequest && isResponse {
- return errMixPseudoHeaderTypes
- }
- return nil
-}
-
-func (fr *Framer) maxHeaderStringLen() int {
- v := fr.maxHeaderListSize()
- if uint32(int(v)) == v {
- return int(v)
- }
- // They had a crazy big number for MaxHeaderBytes anyway,
- // so give them unlimited header lengths:
- return 0
-}
-
-// readMetaFrame returns 0 or more CONTINUATION frames from fr and
-// merge them into into the provided hf and returns a MetaHeadersFrame
-// with the decoded hpack values.
-func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
- if fr.AllowIllegalReads {
- return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")
- }
- mh := &MetaHeadersFrame{
- HeadersFrame: hf,
- }
- var remainSize = fr.maxHeaderListSize()
- var sawRegular bool
-
- var invalid error // pseudo header field errors
- hdec := fr.ReadMetaHeaders
- hdec.SetEmitEnabled(true)
- hdec.SetMaxStringLength(fr.maxHeaderStringLen())
- hdec.SetEmitFunc(func(hf hpack.HeaderField) {
- if VerboseLogs && fr.logReads {
- fr.debugReadLoggerf("http2: decoded hpack field %+v", hf)
- }
- if !httplex.ValidHeaderFieldValue(hf.Value) {
- invalid = headerFieldValueError(hf.Value)
- }
- isPseudo := strings.HasPrefix(hf.Name, ":")
- if isPseudo {
- if sawRegular {
- invalid = errPseudoAfterRegular
- }
- } else {
- sawRegular = true
- if !validWireHeaderFieldName(hf.Name) {
- invalid = headerFieldNameError(hf.Name)
- }
- }
-
- if invalid != nil {
- hdec.SetEmitEnabled(false)
- return
- }
-
- size := hf.Size()
- if size > remainSize {
- hdec.SetEmitEnabled(false)
- mh.Truncated = true
- return
- }
- remainSize -= size
-
- mh.Fields = append(mh.Fields, hf)
- })
- // Lose reference to MetaHeadersFrame:
- defer hdec.SetEmitFunc(func(hf hpack.HeaderField) {})
-
- var hc headersOrContinuation = hf
- for {
- frag := hc.HeaderBlockFragment()
- if _, err := hdec.Write(frag); err != nil {
- return nil, ConnectionError(ErrCodeCompression)
- }
-
- if hc.HeadersEnded() {
- break
- }
- if f, err := fr.ReadFrame(); err != nil {
- return nil, err
- } else {
- hc = f.(*ContinuationFrame) // guaranteed by checkFrameOrder
- }
- }
-
- mh.HeadersFrame.headerFragBuf = nil
- mh.HeadersFrame.invalidate()
-
- if err := hdec.Close(); err != nil {
- return nil, ConnectionError(ErrCodeCompression)
- }
- if invalid != nil {
- fr.errDetail = invalid
- if VerboseLogs {
- log.Printf("http2: invalid header: %v", invalid)
- }
- return nil, StreamError{mh.StreamID, ErrCodeProtocol, invalid}
- }
- if err := mh.checkPseudos(); err != nil {
- fr.errDetail = err
- if VerboseLogs {
- log.Printf("http2: invalid pseudo headers: %v", err)
- }
- return nil, StreamError{mh.StreamID, ErrCodeProtocol, err}
- }
- return mh, nil
-}
-
-func summarizeFrame(f Frame) string {
- var buf bytes.Buffer
- f.Header().writeDebug(&buf)
- switch f := f.(type) {
- case *SettingsFrame:
- n := 0
- f.ForeachSetting(func(s Setting) error {
- n++
- if n == 1 {
- buf.WriteString(", settings:")
- }
- fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val)
- return nil
- })
- if n > 0 {
- buf.Truncate(buf.Len() - 1) // remove trailing comma
- }
- case *DataFrame:
- data := f.Data()
- const max = 256
- if len(data) > max {
- data = data[:max]
- }
- fmt.Fprintf(&buf, " data=%q", data)
- if len(f.Data()) > max {
- fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max)
- }
- case *WindowUpdateFrame:
- if f.StreamID == 0 {
- buf.WriteString(" (conn)")
- }
- fmt.Fprintf(&buf, " incr=%v", f.Increment)
- case *PingFrame:
- fmt.Fprintf(&buf, " ping=%q", f.Data[:])
- case *GoAwayFrame:
- fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q",
- f.LastStreamID, f.ErrCode, f.debugData)
- case *RSTStreamFrame:
- fmt.Fprintf(&buf, " ErrCode=%v", f.ErrCode)
- }
- return buf.String()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame_test.go
deleted file mode 100644
index 37266bc58..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/frame_test.go
+++ /dev/null
@@ -1,1191 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "strings"
- "testing"
- "unsafe"
-
- "golang.org/x/net/http2/hpack"
-)
-
-func testFramer() (*Framer, *bytes.Buffer) {
- buf := new(bytes.Buffer)
- return NewFramer(buf, buf), buf
-}
-
-func TestFrameSizes(t *testing.T) {
- // Catch people rearranging the FrameHeader fields.
- if got, want := int(unsafe.Sizeof(FrameHeader{})), 12; got != want {
- t.Errorf("FrameHeader size = %d; want %d", got, want)
- }
-}
-
-func TestFrameTypeString(t *testing.T) {
- tests := []struct {
- ft FrameType
- want string
- }{
- {FrameData, "DATA"},
- {FramePing, "PING"},
- {FrameGoAway, "GOAWAY"},
- {0xf, "UNKNOWN_FRAME_TYPE_15"},
- }
-
- for i, tt := range tests {
- got := tt.ft.String()
- if got != tt.want {
- t.Errorf("%d. String(FrameType %d) = %q; want %q", i, int(tt.ft), got, tt.want)
- }
- }
-}
-
-func TestWriteRST(t *testing.T) {
- fr, buf := testFramer()
- var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4
- var errCode uint32 = 7<<24 + 6<<16 + 5<<8 + 4
- fr.WriteRSTStream(streamID, ErrCode(errCode))
- const wantEnc = "\x00\x00\x04\x03\x00\x01\x02\x03\x04\x07\x06\x05\x04"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- want := &RSTStreamFrame{
- FrameHeader: FrameHeader{
- valid: true,
- Type: 0x3,
- Flags: 0x0,
- Length: 0x4,
- StreamID: 0x1020304,
- },
- ErrCode: 0x7060504,
- }
- if !reflect.DeepEqual(f, want) {
- t.Errorf("parsed back %#v; want %#v", f, want)
- }
-}
-
-func TestWriteData(t *testing.T) {
- fr, buf := testFramer()
- var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4
- data := []byte("ABC")
- fr.WriteData(streamID, true, data)
- const wantEnc = "\x00\x00\x03\x00\x01\x01\x02\x03\x04ABC"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- df, ok := f.(*DataFrame)
- if !ok {
- t.Fatalf("got %T; want *DataFrame", f)
- }
- if !bytes.Equal(df.Data(), data) {
- t.Errorf("got %q; want %q", df.Data(), data)
- }
- if f.Header().Flags&1 == 0 {
- t.Errorf("didn't see END_STREAM flag")
- }
-}
-
-func TestWriteDataPadded(t *testing.T) {
- tests := [...]struct {
- streamID uint32
- endStream bool
- data []byte
- pad []byte
- wantHeader FrameHeader
- }{
- // Unpadded:
- 0: {
- streamID: 1,
- endStream: true,
- data: []byte("foo"),
- pad: nil,
- wantHeader: FrameHeader{
- Type: FrameData,
- Flags: FlagDataEndStream,
- Length: 3,
- StreamID: 1,
- },
- },
-
- // Padded bit set, but no padding:
- 1: {
- streamID: 1,
- endStream: true,
- data: []byte("foo"),
- pad: []byte{},
- wantHeader: FrameHeader{
- Type: FrameData,
- Flags: FlagDataEndStream | FlagDataPadded,
- Length: 4,
- StreamID: 1,
- },
- },
-
- // Padded bit set, with padding:
- 2: {
- streamID: 1,
- endStream: false,
- data: []byte("foo"),
- pad: []byte{0, 0, 0},
- wantHeader: FrameHeader{
- Type: FrameData,
- Flags: FlagDataPadded,
- Length: 7,
- StreamID: 1,
- },
- },
- }
- for i, tt := range tests {
- fr, _ := testFramer()
- fr.WriteDataPadded(tt.streamID, tt.endStream, tt.data, tt.pad)
- f, err := fr.ReadFrame()
- if err != nil {
- t.Errorf("%d. ReadFrame: %v", i, err)
- continue
- }
- got := f.Header()
- tt.wantHeader.valid = true
- if got != tt.wantHeader {
- t.Errorf("%d. read %+v; want %+v", i, got, tt.wantHeader)
- continue
- }
- df := f.(*DataFrame)
- if !bytes.Equal(df.Data(), tt.data) {
- t.Errorf("%d. got %q; want %q", i, df.Data(), tt.data)
- }
- }
-}
-
-func TestWriteHeaders(t *testing.T) {
- tests := []struct {
- name string
- p HeadersFrameParam
- wantEnc string
- wantFrame *HeadersFrame
- }{
- {
- "basic",
- HeadersFrameParam{
- StreamID: 42,
- BlockFragment: []byte("abc"),
- Priority: PriorityParam{},
- },
- "\x00\x00\x03\x01\x00\x00\x00\x00*abc",
- &HeadersFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: 42,
- Type: FrameHeaders,
- Length: uint32(len("abc")),
- },
- Priority: PriorityParam{},
- headerFragBuf: []byte("abc"),
- },
- },
- {
- "basic + end flags",
- HeadersFrameParam{
- StreamID: 42,
- BlockFragment: []byte("abc"),
- EndStream: true,
- EndHeaders: true,
- Priority: PriorityParam{},
- },
- "\x00\x00\x03\x01\x05\x00\x00\x00*abc",
- &HeadersFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: 42,
- Type: FrameHeaders,
- Flags: FlagHeadersEndStream | FlagHeadersEndHeaders,
- Length: uint32(len("abc")),
- },
- Priority: PriorityParam{},
- headerFragBuf: []byte("abc"),
- },
- },
- {
- "with padding",
- HeadersFrameParam{
- StreamID: 42,
- BlockFragment: []byte("abc"),
- EndStream: true,
- EndHeaders: true,
- PadLength: 5,
- Priority: PriorityParam{},
- },
- "\x00\x00\t\x01\r\x00\x00\x00*\x05abc\x00\x00\x00\x00\x00",
- &HeadersFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: 42,
- Type: FrameHeaders,
- Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded,
- Length: uint32(1 + len("abc") + 5), // pad length + contents + padding
- },
- Priority: PriorityParam{},
- headerFragBuf: []byte("abc"),
- },
- },
- {
- "with priority",
- HeadersFrameParam{
- StreamID: 42,
- BlockFragment: []byte("abc"),
- EndStream: true,
- EndHeaders: true,
- PadLength: 2,
- Priority: PriorityParam{
- StreamDep: 15,
- Exclusive: true,
- Weight: 127,
- },
- },
- "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x0f\u007fabc\x00\x00",
- &HeadersFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: 42,
- Type: FrameHeaders,
- Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority,
- Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding
- },
- Priority: PriorityParam{
- StreamDep: 15,
- Exclusive: true,
- Weight: 127,
- },
- headerFragBuf: []byte("abc"),
- },
- },
- {
- "with priority stream dep zero", // golang.org/issue/15444
- HeadersFrameParam{
- StreamID: 42,
- BlockFragment: []byte("abc"),
- EndStream: true,
- EndHeaders: true,
- PadLength: 2,
- Priority: PriorityParam{
- StreamDep: 0,
- Exclusive: true,
- Weight: 127,
- },
- },
- "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x00\u007fabc\x00\x00",
- &HeadersFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: 42,
- Type: FrameHeaders,
- Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority,
- Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding
- },
- Priority: PriorityParam{
- StreamDep: 0,
- Exclusive: true,
- Weight: 127,
- },
- headerFragBuf: []byte("abc"),
- },
- },
- }
- for _, tt := range tests {
- fr, buf := testFramer()
- if err := fr.WriteHeaders(tt.p); err != nil {
- t.Errorf("test %q: %v", tt.name, err)
- continue
- }
- if buf.String() != tt.wantEnc {
- t.Errorf("test %q: encoded %q; want %q", tt.name, buf.Bytes(), tt.wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Errorf("test %q: failed to read the frame back: %v", tt.name, err)
- continue
- }
- if !reflect.DeepEqual(f, tt.wantFrame) {
- t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame)
- }
- }
-}
-
-func TestWriteInvalidStreamDep(t *testing.T) {
- fr, _ := testFramer()
- err := fr.WriteHeaders(HeadersFrameParam{
- StreamID: 42,
- Priority: PriorityParam{
- StreamDep: 1 << 31,
- },
- })
- if err != errDepStreamID {
- t.Errorf("header error = %v; want %q", err, errDepStreamID)
- }
-
- err = fr.WritePriority(2, PriorityParam{StreamDep: 1 << 31})
- if err != errDepStreamID {
- t.Errorf("priority error = %v; want %q", err, errDepStreamID)
- }
-}
-
-func TestWriteContinuation(t *testing.T) {
- const streamID = 42
- tests := []struct {
- name string
- end bool
- frag []byte
-
- wantFrame *ContinuationFrame
- }{
- {
- "not end",
- false,
- []byte("abc"),
- &ContinuationFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: streamID,
- Type: FrameContinuation,
- Length: uint32(len("abc")),
- },
- headerFragBuf: []byte("abc"),
- },
- },
- {
- "end",
- true,
- []byte("def"),
- &ContinuationFrame{
- FrameHeader: FrameHeader{
- valid: true,
- StreamID: streamID,
- Type: FrameContinuation,
- Flags: FlagContinuationEndHeaders,
- Length: uint32(len("def")),
- },
- headerFragBuf: []byte("def"),
- },
- },
- }
- for _, tt := range tests {
- fr, _ := testFramer()
- if err := fr.WriteContinuation(streamID, tt.end, tt.frag); err != nil {
- t.Errorf("test %q: %v", tt.name, err)
- continue
- }
- fr.AllowIllegalReads = true
- f, err := fr.ReadFrame()
- if err != nil {
- t.Errorf("test %q: failed to read the frame back: %v", tt.name, err)
- continue
- }
- if !reflect.DeepEqual(f, tt.wantFrame) {
- t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame)
- }
- }
-}
-
-func TestWritePriority(t *testing.T) {
- const streamID = 42
- tests := []struct {
- name string
- priority PriorityParam
- wantFrame *PriorityFrame
- }{
- {
- "not exclusive",
- PriorityParam{
- StreamDep: 2,
- Exclusive: false,
- Weight: 127,
- },
- &PriorityFrame{
- FrameHeader{
- valid: true,
- StreamID: streamID,
- Type: FramePriority,
- Length: 5,
- },
- PriorityParam{
- StreamDep: 2,
- Exclusive: false,
- Weight: 127,
- },
- },
- },
-
- {
- "exclusive",
- PriorityParam{
- StreamDep: 3,
- Exclusive: true,
- Weight: 77,
- },
- &PriorityFrame{
- FrameHeader{
- valid: true,
- StreamID: streamID,
- Type: FramePriority,
- Length: 5,
- },
- PriorityParam{
- StreamDep: 3,
- Exclusive: true,
- Weight: 77,
- },
- },
- },
- }
- for _, tt := range tests {
- fr, _ := testFramer()
- if err := fr.WritePriority(streamID, tt.priority); err != nil {
- t.Errorf("test %q: %v", tt.name, err)
- continue
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Errorf("test %q: failed to read the frame back: %v", tt.name, err)
- continue
- }
- if !reflect.DeepEqual(f, tt.wantFrame) {
- t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame)
- }
- }
-}
-
-func TestWriteSettings(t *testing.T) {
- fr, buf := testFramer()
- settings := []Setting{{1, 2}, {3, 4}}
- fr.WriteSettings(settings...)
- const wantEnc = "\x00\x00\f\x04\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x03\x00\x00\x00\x04"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- sf, ok := f.(*SettingsFrame)
- if !ok {
- t.Fatalf("Got a %T; want a SettingsFrame", f)
- }
- var got []Setting
- sf.ForeachSetting(func(s Setting) error {
- got = append(got, s)
- valBack, ok := sf.Value(s.ID)
- if !ok || valBack != s.Val {
- t.Errorf("Value(%d) = %v, %v; want %v, true", s.ID, valBack, ok, s.Val)
- }
- return nil
- })
- if !reflect.DeepEqual(settings, got) {
- t.Errorf("Read settings %+v != written settings %+v", got, settings)
- }
-}
-
-func TestWriteSettingsAck(t *testing.T) {
- fr, buf := testFramer()
- fr.WriteSettingsAck()
- const wantEnc = "\x00\x00\x00\x04\x01\x00\x00\x00\x00"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
-}
-
-func TestWriteWindowUpdate(t *testing.T) {
- fr, buf := testFramer()
- const streamID = 1<<24 + 2<<16 + 3<<8 + 4
- const incr = 7<<24 + 6<<16 + 5<<8 + 4
- if err := fr.WriteWindowUpdate(streamID, incr); err != nil {
- t.Fatal(err)
- }
- const wantEnc = "\x00\x00\x04\x08\x00\x01\x02\x03\x04\x07\x06\x05\x04"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- want := &WindowUpdateFrame{
- FrameHeader: FrameHeader{
- valid: true,
- Type: 0x8,
- Flags: 0x0,
- Length: 0x4,
- StreamID: 0x1020304,
- },
- Increment: 0x7060504,
- }
- if !reflect.DeepEqual(f, want) {
- t.Errorf("parsed back %#v; want %#v", f, want)
- }
-}
-
-func TestWritePing(t *testing.T) { testWritePing(t, false) }
-func TestWritePingAck(t *testing.T) { testWritePing(t, true) }
-
-func testWritePing(t *testing.T, ack bool) {
- fr, buf := testFramer()
- if err := fr.WritePing(ack, [8]byte{1, 2, 3, 4, 5, 6, 7, 8}); err != nil {
- t.Fatal(err)
- }
- var wantFlags Flags
- if ack {
- wantFlags = FlagPingAck
- }
- var wantEnc = "\x00\x00\x08\x06" + string(wantFlags) + "\x00\x00\x00\x00" + "\x01\x02\x03\x04\x05\x06\x07\x08"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
-
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- want := &PingFrame{
- FrameHeader: FrameHeader{
- valid: true,
- Type: 0x6,
- Flags: wantFlags,
- Length: 0x8,
- StreamID: 0,
- },
- Data: [8]byte{1, 2, 3, 4, 5, 6, 7, 8},
- }
- if !reflect.DeepEqual(f, want) {
- t.Errorf("parsed back %#v; want %#v", f, want)
- }
-}
-
-func TestReadFrameHeader(t *testing.T) {
- tests := []struct {
- in string
- want FrameHeader
- }{
- {in: "\x00\x00\x00" + "\x00" + "\x00" + "\x00\x00\x00\x00", want: FrameHeader{}},
- {in: "\x01\x02\x03" + "\x04" + "\x05" + "\x06\x07\x08\x09", want: FrameHeader{
- Length: 66051, Type: 4, Flags: 5, StreamID: 101124105,
- }},
- // Ignore high bit:
- {in: "\xff\xff\xff" + "\xff" + "\xff" + "\xff\xff\xff\xff", want: FrameHeader{
- Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}},
- {in: "\xff\xff\xff" + "\xff" + "\xff" + "\x7f\xff\xff\xff", want: FrameHeader{
- Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}},
- }
- for i, tt := range tests {
- got, err := readFrameHeader(make([]byte, 9), strings.NewReader(tt.in))
- if err != nil {
- t.Errorf("%d. readFrameHeader(%q) = %v", i, tt.in, err)
- continue
- }
- tt.want.valid = true
- if got != tt.want {
- t.Errorf("%d. readFrameHeader(%q) = %+v; want %+v", i, tt.in, got, tt.want)
- }
- }
-}
-
-func TestReadWriteFrameHeader(t *testing.T) {
- tests := []struct {
- len uint32
- typ FrameType
- flags Flags
- streamID uint32
- }{
- {len: 0, typ: 255, flags: 1, streamID: 0},
- {len: 0, typ: 255, flags: 1, streamID: 1},
- {len: 0, typ: 255, flags: 1, streamID: 255},
- {len: 0, typ: 255, flags: 1, streamID: 256},
- {len: 0, typ: 255, flags: 1, streamID: 65535},
- {len: 0, typ: 255, flags: 1, streamID: 65536},
-
- {len: 0, typ: 1, flags: 255, streamID: 1},
- {len: 255, typ: 1, flags: 255, streamID: 1},
- {len: 256, typ: 1, flags: 255, streamID: 1},
- {len: 65535, typ: 1, flags: 255, streamID: 1},
- {len: 65536, typ: 1, flags: 255, streamID: 1},
- {len: 16777215, typ: 1, flags: 255, streamID: 1},
- }
- for _, tt := range tests {
- fr, buf := testFramer()
- fr.startWrite(tt.typ, tt.flags, tt.streamID)
- fr.writeBytes(make([]byte, tt.len))
- fr.endWrite()
- fh, err := ReadFrameHeader(buf)
- if err != nil {
- t.Errorf("ReadFrameHeader(%+v) = %v", tt, err)
- continue
- }
- if fh.Type != tt.typ || fh.Flags != tt.flags || fh.Length != tt.len || fh.StreamID != tt.streamID {
- t.Errorf("ReadFrameHeader(%+v) = %+v; mismatch", tt, fh)
- }
- }
-
-}
-
-func TestWriteTooLargeFrame(t *testing.T) {
- fr, _ := testFramer()
- fr.startWrite(0, 1, 1)
- fr.writeBytes(make([]byte, 1<<24))
- err := fr.endWrite()
- if err != ErrFrameTooLarge {
- t.Errorf("endWrite = %v; want errFrameTooLarge", err)
- }
-}
-
-func TestWriteGoAway(t *testing.T) {
- const debug = "foo"
- fr, buf := testFramer()
- if err := fr.WriteGoAway(0x01020304, 0x05060708, []byte(debug)); err != nil {
- t.Fatal(err)
- }
- const wantEnc = "\x00\x00\v\a\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08" + debug
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- want := &GoAwayFrame{
- FrameHeader: FrameHeader{
- valid: true,
- Type: 0x7,
- Flags: 0,
- Length: uint32(4 + 4 + len(debug)),
- StreamID: 0,
- },
- LastStreamID: 0x01020304,
- ErrCode: 0x05060708,
- debugData: []byte(debug),
- }
- if !reflect.DeepEqual(f, want) {
- t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want)
- }
- if got := string(f.(*GoAwayFrame).DebugData()); got != debug {
- t.Errorf("debug data = %q; want %q", got, debug)
- }
-}
-
-func TestWritePushPromise(t *testing.T) {
- pp := PushPromiseParam{
- StreamID: 42,
- PromiseID: 42,
- BlockFragment: []byte("abc"),
- }
- fr, buf := testFramer()
- if err := fr.WritePushPromise(pp); err != nil {
- t.Fatal(err)
- }
- const wantEnc = "\x00\x00\x07\x05\x00\x00\x00\x00*\x00\x00\x00*abc"
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- _, ok := f.(*PushPromiseFrame)
- if !ok {
- t.Fatalf("got %T; want *PushPromiseFrame", f)
- }
- want := &PushPromiseFrame{
- FrameHeader: FrameHeader{
- valid: true,
- Type: 0x5,
- Flags: 0x0,
- Length: 0x7,
- StreamID: 42,
- },
- PromiseID: 42,
- headerFragBuf: []byte("abc"),
- }
- if !reflect.DeepEqual(f, want) {
- t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want)
- }
-}
-
-// test checkFrameOrder and that HEADERS and CONTINUATION frames can't be intermingled.
-func TestReadFrameOrder(t *testing.T) {
- head := func(f *Framer, id uint32, end bool) {
- f.WriteHeaders(HeadersFrameParam{
- StreamID: id,
- BlockFragment: []byte("foo"), // unused, but non-empty
- EndHeaders: end,
- })
- }
- cont := func(f *Framer, id uint32, end bool) {
- f.WriteContinuation(id, end, []byte("foo"))
- }
-
- tests := [...]struct {
- name string
- w func(*Framer)
- atLeast int
- wantErr string
- }{
- 0: {
- w: func(f *Framer) {
- head(f, 1, true)
- },
- },
- 1: {
- w: func(f *Framer) {
- head(f, 1, true)
- head(f, 2, true)
- },
- },
- 2: {
- wantErr: "got HEADERS for stream 2; expected CONTINUATION following HEADERS for stream 1",
- w: func(f *Framer) {
- head(f, 1, false)
- head(f, 2, true)
- },
- },
- 3: {
- wantErr: "got DATA for stream 1; expected CONTINUATION following HEADERS for stream 1",
- w: func(f *Framer) {
- head(f, 1, false)
- },
- },
- 4: {
- w: func(f *Framer) {
- head(f, 1, false)
- cont(f, 1, true)
- head(f, 2, true)
- },
- },
- 5: {
- wantErr: "got CONTINUATION for stream 2; expected stream 1",
- w: func(f *Framer) {
- head(f, 1, false)
- cont(f, 2, true)
- head(f, 2, true)
- },
- },
- 6: {
- wantErr: "unexpected CONTINUATION for stream 1",
- w: func(f *Framer) {
- cont(f, 1, true)
- },
- },
- 7: {
- wantErr: "unexpected CONTINUATION for stream 1",
- w: func(f *Framer) {
- cont(f, 1, false)
- },
- },
- 8: {
- wantErr: "HEADERS frame with stream ID 0",
- w: func(f *Framer) {
- head(f, 0, true)
- },
- },
- 9: {
- wantErr: "CONTINUATION frame with stream ID 0",
- w: func(f *Framer) {
- cont(f, 0, true)
- },
- },
- 10: {
- wantErr: "unexpected CONTINUATION for stream 1",
- atLeast: 5,
- w: func(f *Framer) {
- head(f, 1, false)
- cont(f, 1, false)
- cont(f, 1, false)
- cont(f, 1, false)
- cont(f, 1, true)
- cont(f, 1, false)
- },
- },
- }
- for i, tt := range tests {
- buf := new(bytes.Buffer)
- f := NewFramer(buf, buf)
- f.AllowIllegalWrites = true
- tt.w(f)
- f.WriteData(1, true, nil) // to test transition away from last step
-
- var err error
- n := 0
- var log bytes.Buffer
- for {
- var got Frame
- got, err = f.ReadFrame()
- fmt.Fprintf(&log, " read %v, %v\n", got, err)
- if err != nil {
- break
- }
- n++
- }
- if err == io.EOF {
- err = nil
- }
- ok := tt.wantErr == ""
- if ok && err != nil {
- t.Errorf("%d. after %d good frames, ReadFrame = %v; want success\n%s", i, n, err, log.Bytes())
- continue
- }
- if !ok && err != ConnectionError(ErrCodeProtocol) {
- t.Errorf("%d. after %d good frames, ReadFrame = %v; want ConnectionError(ErrCodeProtocol)\n%s", i, n, err, log.Bytes())
- continue
- }
- if !((f.errDetail == nil && tt.wantErr == "") || (fmt.Sprint(f.errDetail) == tt.wantErr)) {
- t.Errorf("%d. framer eror = %q; want %q\n%s", i, f.errDetail, tt.wantErr, log.Bytes())
- }
- if n < tt.atLeast {
- t.Errorf("%d. framer only read %d frames; want at least %d\n%s", i, n, tt.atLeast, log.Bytes())
- }
- }
-}
-
-func TestMetaFrameHeader(t *testing.T) {
- write := func(f *Framer, frags ...[]byte) {
- for i, frag := range frags {
- end := (i == len(frags)-1)
- if i == 0 {
- f.WriteHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: frag,
- EndHeaders: end,
- })
- } else {
- f.WriteContinuation(1, end, frag)
- }
- }
- }
-
- want := func(flags Flags, length uint32, pairs ...string) *MetaHeadersFrame {
- mh := &MetaHeadersFrame{
- HeadersFrame: &HeadersFrame{
- FrameHeader: FrameHeader{
- Type: FrameHeaders,
- Flags: flags,
- Length: length,
- StreamID: 1,
- },
- },
- Fields: []hpack.HeaderField(nil),
- }
- for len(pairs) > 0 {
- mh.Fields = append(mh.Fields, hpack.HeaderField{
- Name: pairs[0],
- Value: pairs[1],
- })
- pairs = pairs[2:]
- }
- return mh
- }
- truncated := func(mh *MetaHeadersFrame) *MetaHeadersFrame {
- mh.Truncated = true
- return mh
- }
-
- const noFlags Flags = 0
-
- oneKBString := strings.Repeat("a", 1<<10)
-
- tests := [...]struct {
- name string
- w func(*Framer)
- want interface{} // *MetaHeaderFrame or error
- wantErrReason string
- maxHeaderListSize uint32
- }{
- 0: {
- name: "single_headers",
- w: func(f *Framer) {
- var he hpackEncoder
- all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/")
- write(f, all)
- },
- want: want(FlagHeadersEndHeaders, 2, ":method", "GET", ":path", "/"),
- },
- 1: {
- name: "with_continuation",
- w: func(f *Framer) {
- var he hpackEncoder
- all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar")
- write(f, all[:1], all[1:])
- },
- want: want(noFlags, 1, ":method", "GET", ":path", "/", "foo", "bar"),
- },
- 2: {
- name: "with_two_continuation",
- w: func(f *Framer) {
- var he hpackEncoder
- all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar")
- write(f, all[:2], all[2:4], all[4:])
- },
- want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", "bar"),
- },
- 3: {
- name: "big_string_okay",
- w: func(f *Framer) {
- var he hpackEncoder
- all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString)
- write(f, all[:2], all[2:])
- },
- want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", oneKBString),
- },
- 4: {
- name: "big_string_error",
- w: func(f *Framer) {
- var he hpackEncoder
- all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString)
- write(f, all[:2], all[2:])
- },
- maxHeaderListSize: (1 << 10) / 2,
- want: ConnectionError(ErrCodeCompression),
- },
- 5: {
- name: "max_header_list_truncated",
- w: func(f *Framer) {
- var he hpackEncoder
- var pairs = []string{":method", "GET", ":path", "/"}
- for i := 0; i < 100; i++ {
- pairs = append(pairs, "foo", "bar")
- }
- all := he.encodeHeaderRaw(t, pairs...)
- write(f, all[:2], all[2:])
- },
- maxHeaderListSize: (1 << 10) / 2,
- want: truncated(want(noFlags, 2,
- ":method", "GET",
- ":path", "/",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar",
- "foo", "bar", // 11
- )),
- },
- 6: {
- name: "pseudo_order",
- w: func(f *Framer) {
- write(f, encodeHeaderRaw(t,
- ":method", "GET",
- "foo", "bar",
- ":path", "/", // bogus
- ))
- },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "pseudo header field after regular",
- },
- 7: {
- name: "pseudo_unknown",
- w: func(f *Framer) {
- write(f, encodeHeaderRaw(t,
- ":unknown", "foo", // bogus
- "foo", "bar",
- ))
- },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "invalid pseudo-header \":unknown\"",
- },
- 8: {
- name: "pseudo_mix_request_response",
- w: func(f *Framer) {
- write(f, encodeHeaderRaw(t,
- ":method", "GET",
- ":status", "100",
- ))
- },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "mix of request and response pseudo headers",
- },
- 9: {
- name: "pseudo_dup",
- w: func(f *Framer) {
- write(f, encodeHeaderRaw(t,
- ":method", "GET",
- ":method", "POST",
- ))
- },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "duplicate pseudo-header \":method\"",
- },
- 10: {
- name: "trailer_okay_no_pseudo",
- w: func(f *Framer) { write(f, encodeHeaderRaw(t, "foo", "bar")) },
- want: want(FlagHeadersEndHeaders, 8, "foo", "bar"),
- },
- 11: {
- name: "invalid_field_name",
- w: func(f *Framer) { write(f, encodeHeaderRaw(t, "CapitalBad", "x")) },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "invalid header field name \"CapitalBad\"",
- },
- 12: {
- name: "invalid_field_value",
- w: func(f *Framer) { write(f, encodeHeaderRaw(t, "key", "bad_null\x00")) },
- want: streamError(1, ErrCodeProtocol),
- wantErrReason: "invalid header field value \"bad_null\\x00\"",
- },
- }
- for i, tt := range tests {
- buf := new(bytes.Buffer)
- f := NewFramer(buf, buf)
- f.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
- f.MaxHeaderListSize = tt.maxHeaderListSize
- tt.w(f)
-
- name := tt.name
- if name == "" {
- name = fmt.Sprintf("test index %d", i)
- }
-
- var got interface{}
- var err error
- got, err = f.ReadFrame()
- if err != nil {
- got = err
-
- // Ignore the StreamError.Cause field, if it matches the wantErrReason.
- // The test table above predates the Cause field.
- if se, ok := err.(StreamError); ok && se.Cause != nil && se.Cause.Error() == tt.wantErrReason {
- se.Cause = nil
- got = se
- }
- }
- if !reflect.DeepEqual(got, tt.want) {
- if mhg, ok := got.(*MetaHeadersFrame); ok {
- if mhw, ok := tt.want.(*MetaHeadersFrame); ok {
- hg := mhg.HeadersFrame
- hw := mhw.HeadersFrame
- if hg != nil && hw != nil && !reflect.DeepEqual(*hg, *hw) {
- t.Errorf("%s: headers differ:\n got: %+v\nwant: %+v\n", name, *hg, *hw)
- }
- }
- }
- str := func(v interface{}) string {
- if _, ok := v.(error); ok {
- return fmt.Sprintf("error %v", v)
- } else {
- return fmt.Sprintf("value %#v", v)
- }
- }
- t.Errorf("%s:\n got: %v\nwant: %s", name, str(got), str(tt.want))
- }
- if tt.wantErrReason != "" && tt.wantErrReason != fmt.Sprint(f.errDetail) {
- t.Errorf("%s: got error reason %q; want %q", name, f.errDetail, tt.wantErrReason)
- }
- }
-}
-
-func TestSetReuseFrames(t *testing.T) {
- fr, buf := testFramer()
- fr.SetReuseFrames()
-
- // Check that DataFrames are reused. Note that
- // SetReuseFrames only currently implements reuse of DataFrames.
- firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t)
-
- for i := 0; i < 10; i++ {
- df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t)
- if df != firstDf {
- t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf)
- }
- }
-
- for i := 0; i < 10; i++ {
- df := readAndVerifyDataFrame("", 0, fr, buf, t)
- if df != firstDf {
- t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf)
- }
- }
-
- for i := 0; i < 10; i++ {
- df := readAndVerifyDataFrame("HHH", 3, fr, buf, t)
- if df != firstDf {
- t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf)
- }
- }
-}
-
-func TestSetReuseFramesMoreThanOnce(t *testing.T) {
- fr, buf := testFramer()
- fr.SetReuseFrames()
-
- firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t)
- fr.SetReuseFrames()
-
- for i := 0; i < 10; i++ {
- df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t)
- // SetReuseFrames should be idempotent
- fr.SetReuseFrames()
- if df != firstDf {
- t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf)
- }
- }
-}
-
-func TestNoSetReuseFrames(t *testing.T) {
- fr, buf := testFramer()
- const numNewDataFrames = 10
- dfSoFar := make([]interface{}, numNewDataFrames)
-
- // Check that DataFrames are not reused if SetReuseFrames wasn't called.
- // SetReuseFrames only currently implements reuse of DataFrames.
- for i := 0; i < numNewDataFrames; i++ {
- df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t)
- for _, item := range dfSoFar {
- if df == item {
- t.Errorf("Expected Framer to return new DataFrames since SetNoReuseFrames not set.")
- }
- }
- dfSoFar[i] = df
- }
-}
-
-func readAndVerifyDataFrame(data string, length byte, fr *Framer, buf *bytes.Buffer, t *testing.T) *DataFrame {
- var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4
- fr.WriteData(streamID, true, []byte(data))
- wantEnc := "\x00\x00" + string(length) + "\x00\x01\x01\x02\x03\x04" + data
- if buf.String() != wantEnc {
- t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc)
- }
- f, err := fr.ReadFrame()
- if err != nil {
- t.Fatal(err)
- }
- df, ok := f.(*DataFrame)
- if !ok {
- t.Fatalf("got %T; want *DataFrame", f)
- }
- if !bytes.Equal(df.Data(), []byte(data)) {
- t.Errorf("got %q; want %q", df.Data(), []byte(data))
- }
- if f.Header().Flags&1 == 0 {
- t.Errorf("didn't see END_STREAM flag")
- }
- return df
-}
-
-func encodeHeaderRaw(t *testing.T, pairs ...string) []byte {
- var he hpackEncoder
- return he.encodeHeaderRaw(t, pairs...)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go16.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go16.go
deleted file mode 100644
index 00b2e9e3c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go16.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.6
-
-package http2
-
-import (
- "net/http"
- "time"
-)
-
-func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
- return t1.ExpectContinueTimeout
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17.go
deleted file mode 100644
index 47b7fae08..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7
-
-package http2
-
-import (
- "context"
- "net"
- "net/http"
- "net/http/httptrace"
- "time"
-)
-
-type contextContext interface {
- context.Context
-}
-
-func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
- ctx, cancel = context.WithCancel(context.Background())
- ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())
- if hs := opts.baseConfig(); hs != nil {
- ctx = context.WithValue(ctx, http.ServerContextKey, hs)
- }
- return
-}
-
-func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) {
- return context.WithCancel(ctx)
-}
-
-func requestWithContext(req *http.Request, ctx contextContext) *http.Request {
- return req.WithContext(ctx)
-}
-
-type clientTrace httptrace.ClientTrace
-
-func reqContext(r *http.Request) context.Context { return r.Context() }
-
-func (t *Transport) idleConnTimeout() time.Duration {
- if t.t1 != nil {
- return t.t1.IdleConnTimeout
- }
- return 0
-}
-
-func setResponseUncompressed(res *http.Response) { res.Uncompressed = true }
-
-func traceGotConn(req *http.Request, cc *ClientConn) {
- trace := httptrace.ContextClientTrace(req.Context())
- if trace == nil || trace.GotConn == nil {
- return
- }
- ci := httptrace.GotConnInfo{Conn: cc.tconn}
- cc.mu.Lock()
- ci.Reused = cc.nextStreamID > 1
- ci.WasIdle = len(cc.streams) == 0 && ci.Reused
- if ci.WasIdle && !cc.lastActive.IsZero() {
- ci.IdleTime = time.Now().Sub(cc.lastActive)
- }
- cc.mu.Unlock()
-
- trace.GotConn(ci)
-}
-
-func traceWroteHeaders(trace *clientTrace) {
- if trace != nil && trace.WroteHeaders != nil {
- trace.WroteHeaders()
- }
-}
-
-func traceGot100Continue(trace *clientTrace) {
- if trace != nil && trace.Got100Continue != nil {
- trace.Got100Continue()
- }
-}
-
-func traceWait100Continue(trace *clientTrace) {
- if trace != nil && trace.Wait100Continue != nil {
- trace.Wait100Continue()
- }
-}
-
-func traceWroteRequest(trace *clientTrace, err error) {
- if trace != nil && trace.WroteRequest != nil {
- trace.WroteRequest(httptrace.WroteRequestInfo{Err: err})
- }
-}
-
-func traceFirstResponseByte(trace *clientTrace) {
- if trace != nil && trace.GotFirstResponseByte != nil {
- trace.GotFirstResponseByte()
- }
-}
-
-func requestTrace(req *http.Request) *clientTrace {
- trace := httptrace.ContextClientTrace(req.Context())
- return (*clientTrace)(trace)
-}
-
-// Ping sends a PING frame to the server and waits for the ack.
-func (cc *ClientConn) Ping(ctx context.Context) error {
- return cc.ping(ctx)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17_not18.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17_not18.go
deleted file mode 100644
index b4c52ecec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go17_not18.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7,!go1.8
-
-package http2
-
-import "crypto/tls"
-
-// temporary copy of Go 1.7's private tls.Config.clone:
-func cloneTLSConfig(c *tls.Config) *tls.Config {
- return &tls.Config{
- Rand: c.Rand,
- Time: c.Time,
- Certificates: c.Certificates,
- NameToCertificate: c.NameToCertificate,
- GetCertificate: c.GetCertificate,
- RootCAs: c.RootCAs,
- NextProtos: c.NextProtos,
- ServerName: c.ServerName,
- ClientAuth: c.ClientAuth,
- ClientCAs: c.ClientCAs,
- InsecureSkipVerify: c.InsecureSkipVerify,
- CipherSuites: c.CipherSuites,
- PreferServerCipherSuites: c.PreferServerCipherSuites,
- SessionTicketsDisabled: c.SessionTicketsDisabled,
- SessionTicketKey: c.SessionTicketKey,
- ClientSessionCache: c.ClientSessionCache,
- MinVersion: c.MinVersion,
- MaxVersion: c.MaxVersion,
- CurvePreferences: c.CurvePreferences,
- DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled,
- Renegotiation: c.Renegotiation,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18.go
deleted file mode 100644
index 4f30d228a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build go1.8
-
-package http2
-
-import (
- "crypto/tls"
- "io"
- "net/http"
-)
-
-func cloneTLSConfig(c *tls.Config) *tls.Config {
- c2 := c.Clone()
- c2.GetClientCertificate = c.GetClientCertificate // golang.org/issue/19264
- return c2
-}
-
-var _ http.Pusher = (*responseWriter)(nil)
-
-// Push implements http.Pusher.
-func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
- internalOpts := pushOptions{}
- if opts != nil {
- internalOpts.Method = opts.Method
- internalOpts.Header = opts.Header
- }
- return w.push(target, internalOpts)
-}
-
-func configureServer18(h1 *http.Server, h2 *Server) error {
- if h2.IdleTimeout == 0 {
- if h1.IdleTimeout != 0 {
- h2.IdleTimeout = h1.IdleTimeout
- } else {
- h2.IdleTimeout = h1.ReadTimeout
- }
- }
- return nil
-}
-
-func shouldLogPanic(panicValue interface{}) bool {
- return panicValue != nil && panicValue != http.ErrAbortHandler
-}
-
-func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
- return req.GetBody
-}
-
-func reqBodyIsNoBody(body io.ReadCloser) bool {
- return body == http.NoBody
-}
-
-func go18httpNoBody() io.ReadCloser { return http.NoBody } // for tests only
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18_test.go
deleted file mode 100644
index 30e3b038b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go18_test.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.8
-
-package http2
-
-import (
- "crypto/tls"
- "net/http"
- "testing"
- "time"
-)
-
-// Tests that http2.Server.IdleTimeout is initialized from
-// http.Server.{Idle,Read}Timeout. http.Server.IdleTimeout was
-// added in Go 1.8.
-func TestConfigureServerIdleTimeout_Go18(t *testing.T) {
- const timeout = 5 * time.Second
- const notThisOne = 1 * time.Second
-
- // With a zero http2.Server, verify that it copies IdleTimeout:
- {
- s1 := &http.Server{
- IdleTimeout: timeout,
- ReadTimeout: notThisOne,
- }
- s2 := &Server{}
- if err := ConfigureServer(s1, s2); err != nil {
- t.Fatal(err)
- }
- if s2.IdleTimeout != timeout {
- t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout)
- }
- }
-
- // And that it falls back to ReadTimeout:
- {
- s1 := &http.Server{
- ReadTimeout: timeout,
- }
- s2 := &Server{}
- if err := ConfigureServer(s1, s2); err != nil {
- t.Fatal(err)
- }
- if s2.IdleTimeout != timeout {
- t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout)
- }
- }
-
- // Verify that s1's IdleTimeout doesn't overwrite an existing setting:
- {
- s1 := &http.Server{
- IdleTimeout: notThisOne,
- }
- s2 := &Server{
- IdleTimeout: timeout,
- }
- if err := ConfigureServer(s1, s2); err != nil {
- t.Fatal(err)
- }
- if s2.IdleTimeout != timeout {
- t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout)
- }
- }
-}
-
-func TestCertClone(t *testing.T) {
- c := &tls.Config{
- GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) {
- panic("shouldn't be called")
- },
- }
- c2 := cloneTLSConfig(c)
- if c2.GetClientCertificate == nil {
- t.Error("GetClientCertificate is nil")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19.go
deleted file mode 100644
index 38124ba56..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build go1.9
-
-package http2
-
-import (
- "net/http"
-)
-
-func configureServer19(s *http.Server, conf *Server) error {
- s.RegisterOnShutdown(conf.state.startGracefulShutdown)
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19_test.go
deleted file mode 100644
index 22b000667..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/go19_test.go
+++ /dev/null
@@ -1,59 +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 file.
-
-// +build go1.9
-
-package http2
-
-import (
- "context"
- "net/http"
- "reflect"
- "testing"
- "time"
-)
-
-func TestServerGracefulShutdown(t *testing.T) {
- var st *serverTester
- handlerDone := make(chan struct{})
- st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- defer close(handlerDone)
- go st.ts.Config.Shutdown(context.Background())
-
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeNo {
- t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode)
- }
- if ga.LastStreamID != 1 {
- t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID)
- }
-
- w.Header().Set("x-foo", "bar")
- })
- defer st.Close()
-
- st.greet()
- st.bodylessReq1()
-
- select {
- case <-handlerDone:
- case <-time.After(5 * time.Second):
- t.Fatalf("server did not shutdown?")
- }
- hf := st.wantHeaders()
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"x-foo", "bar"},
- {"content-length", "0"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
-
- n, err := st.cc.Read([]byte{0})
- if n != 0 || err == nil {
- t.Errorf("Read = %v, %v; want 0, non-nil", n, err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack.go
deleted file mode 100644
index 9933c9f8c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2014 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 file.
-
-// Defensive debug-only utility to track that functions run on the
-// goroutine that they're supposed to.
-
-package http2
-
-import (
- "bytes"
- "errors"
- "fmt"
- "os"
- "runtime"
- "strconv"
- "sync"
-)
-
-var DebugGoroutines = os.Getenv("DEBUG_HTTP2_GOROUTINES") == "1"
-
-type goroutineLock uint64
-
-func newGoroutineLock() goroutineLock {
- if !DebugGoroutines {
- return 0
- }
- return goroutineLock(curGoroutineID())
-}
-
-func (g goroutineLock) check() {
- if !DebugGoroutines {
- return
- }
- if curGoroutineID() != uint64(g) {
- panic("running on the wrong goroutine")
- }
-}
-
-func (g goroutineLock) checkNotOn() {
- if !DebugGoroutines {
- return
- }
- if curGoroutineID() == uint64(g) {
- panic("running on the wrong goroutine")
- }
-}
-
-var goroutineSpace = []byte("goroutine ")
-
-func curGoroutineID() uint64 {
- bp := littleBuf.Get().(*[]byte)
- defer littleBuf.Put(bp)
- b := *bp
- b = b[:runtime.Stack(b, false)]
- // Parse the 4707 out of "goroutine 4707 ["
- b = bytes.TrimPrefix(b, goroutineSpace)
- i := bytes.IndexByte(b, ' ')
- if i < 0 {
- panic(fmt.Sprintf("No space found in %q", b))
- }
- b = b[:i]
- n, err := parseUintBytes(b, 10, 64)
- if err != nil {
- panic(fmt.Sprintf("Failed to parse goroutine ID out of %q: %v", b, err))
- }
- return n
-}
-
-var littleBuf = sync.Pool{
- New: func() interface{} {
- buf := make([]byte, 64)
- return &buf
- },
-}
-
-// parseUintBytes is like strconv.ParseUint, but using a []byte.
-func parseUintBytes(s []byte, base int, bitSize int) (n uint64, err error) {
- var cutoff, maxVal uint64
-
- if bitSize == 0 {
- bitSize = int(strconv.IntSize)
- }
-
- s0 := s
- switch {
- case len(s) < 1:
- err = strconv.ErrSyntax
- goto Error
-
- case 2 <= base && base <= 36:
- // valid base; nothing to do
-
- case base == 0:
- // Look for octal, hex prefix.
- switch {
- case s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'):
- base = 16
- s = s[2:]
- if len(s) < 1 {
- err = strconv.ErrSyntax
- goto Error
- }
- case s[0] == '0':
- base = 8
- default:
- base = 10
- }
-
- default:
- err = errors.New("invalid base " + strconv.Itoa(base))
- goto Error
- }
-
- n = 0
- cutoff = cutoff64(base)
- maxVal = 1<<uint(bitSize) - 1
-
- for i := 0; i < len(s); i++ {
- var v byte
- d := s[i]
- switch {
- case '0' <= d && d <= '9':
- v = d - '0'
- case 'a' <= d && d <= 'z':
- v = d - 'a' + 10
- case 'A' <= d && d <= 'Z':
- v = d - 'A' + 10
- default:
- n = 0
- err = strconv.ErrSyntax
- goto Error
- }
- if int(v) >= base {
- n = 0
- err = strconv.ErrSyntax
- goto Error
- }
-
- if n >= cutoff {
- // n*base overflows
- n = 1<<64 - 1
- err = strconv.ErrRange
- goto Error
- }
- n *= uint64(base)
-
- n1 := n + uint64(v)
- if n1 < n || n1 > maxVal {
- // n+v overflows
- n = 1<<64 - 1
- err = strconv.ErrRange
- goto Error
- }
- n = n1
- }
-
- return n, nil
-
-Error:
- return n, &strconv.NumError{Func: "ParseUint", Num: string(s0), Err: err}
-}
-
-// Return the first number n such that n*base >= 1<<64.
-func cutoff64(base int) uint64 {
- if base < 2 {
- return 0
- }
- return (1<<64-1)/uint64(base) + 1
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack_test.go
deleted file mode 100644
index 06db61231..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/gotrack_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "fmt"
- "strings"
- "testing"
-)
-
-func TestGoroutineLock(t *testing.T) {
- oldDebug := DebugGoroutines
- DebugGoroutines = true
- defer func() { DebugGoroutines = oldDebug }()
-
- g := newGoroutineLock()
- g.check()
-
- sawPanic := make(chan interface{})
- go func() {
- defer func() { sawPanic <- recover() }()
- g.check() // should panic
- }()
- e := <-sawPanic
- if e == nil {
- t.Fatal("did not see panic from check in other goroutine")
- }
- if !strings.Contains(fmt.Sprint(e), "wrong goroutine") {
- t.Errorf("expected on see panic about running on the wrong goroutine; got %v", e)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/.gitignore b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/.gitignore
deleted file mode 100644
index 0de86ddbc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-h2demo
-h2demo.linux
-client-id.dat
-client-secret.dat
-token.dat
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/Makefile b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/Makefile
deleted file mode 100644
index f5c31ef3e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-h2demo.linux: h2demo.go
- GOOS=linux go build --tags=h2demo -o h2demo.linux .
-
-FORCE:
-
-upload: FORCE
- go install golang.org/x/build/cmd/upload
- upload --verbose --osarch=linux-amd64 --tags=h2demo --file=go:golang.org/x/net/http2/h2demo --public http2-demo-server-tls/h2demo
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/README b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/README
deleted file mode 100644
index 212a96f38..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/README
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Client:
- -- Firefox nightly with about:config network.http.spdy.enabled.http2draft set true
- -- Chrome: go to chrome://flags/#enable-spdy4, save and restart (button at bottom)
-
-Make CA:
-$ openssl genrsa -out rootCA.key 2048
-$ openssl req -x509 -new -nodes -key rootCA.key -days 1024 -out rootCA.pem
-... install that to Firefox
-
-Make cert:
-$ openssl genrsa -out server.key 2048
-$ openssl req -new -key server.key -out server.csr
-$ openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 500
-
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/h2demo.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/h2demo.go
deleted file mode 100644
index 9853107b9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/h2demo.go
+++ /dev/null
@@ -1,538 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build h2demo
-
-package main
-
-import (
- "bytes"
- "crypto/tls"
- "flag"
- "fmt"
- "hash/crc32"
- "image"
- "image/jpeg"
- "io"
- "io/ioutil"
- "log"
- "net"
- "net/http"
- "os"
- "path"
- "regexp"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "go4.org/syncutil/singleflight"
- "golang.org/x/crypto/acme/autocert"
- "golang.org/x/net/http2"
-)
-
-var (
- prod = flag.Bool("prod", false, "Whether to configure itself to be the production http2.golang.org server.")
-
- httpsAddr = flag.String("https_addr", "localhost:4430", "TLS address to listen on ('host:port' or ':port'). Required.")
- httpAddr = flag.String("http_addr", "", "Plain HTTP address to listen on ('host:port', or ':port'). Empty means no HTTP.")
-
- hostHTTP = flag.String("http_host", "", "Optional host or host:port to use for http:// links to this service. By default, this is implied from -http_addr.")
- hostHTTPS = flag.String("https_host", "", "Optional host or host:port to use for http:// links to this service. By default, this is implied from -https_addr.")
-)
-
-func homeOldHTTP(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, `<html>
-<body>
-<h1>Go + HTTP/2</h1>
-<p>Welcome to <a href="https://golang.org/">the Go language</a>'s <a href="https://http2.github.io/">HTTP/2</a> demo & interop server.</p>
-<p>Unfortunately, you're <b>not</b> using HTTP/2 right now. To do so:</p>
-<ul>
- <li>Use Firefox Nightly or go to <b>about:config</b> and enable "network.http.spdy.enabled.http2draft"</li>
- <li>Use Google Chrome Canary and/or go to <b>chrome://flags/#enable-spdy4</b> to <i>Enable SPDY/4</i> (Chrome's name for HTTP/2)</li>
-</ul>
-<p>See code & instructions for connecting at <a href="https://github.com/golang/net/tree/master/http2">https://github.com/golang/net/tree/master/http2</a>.</p>
-
-</body></html>`)
-}
-
-func home(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" {
- http.NotFound(w, r)
- return
- }
- io.WriteString(w, `<html>
-<body>
-<h1>Go + HTTP/2</h1>
-
-<p>Welcome to <a href="https://golang.org/">the Go language</a>'s <a
-href="https://http2.github.io/">HTTP/2</a> demo & interop server.</p>
-
-<p>Congratulations, <b>you're using HTTP/2 right now</b>.</p>
-
-<p>This server exists for others in the HTTP/2 community to test their HTTP/2 client implementations and point out flaws in our server.</p>
-
-<p>
-The code is at <a href="https://golang.org/x/net/http2">golang.org/x/net/http2</a> and
-is used transparently by the Go standard library from Go 1.6 and later.
-</p>
-
-<p>Contact info: <i>bradfitz@golang.org</i>, or <a
-href="https://golang.org/s/http2bug">file a bug</a>.</p>
-
-<h2>Handlers for testing</h2>
-<ul>
- <li>GET <a href="/reqinfo">/reqinfo</a> to dump the request + headers received</li>
- <li>GET <a href="/clockstream">/clockstream</a> streams the current time every second</li>
- <li>GET <a href="/gophertiles">/gophertiles</a> to see a page with a bunch of images</li>
- <li>GET <a href="/serverpush">/serverpush</a> to see a page with server push</li>
- <li>GET <a href="/file/gopher.png">/file/gopher.png</a> for a small file (does If-Modified-Since, Content-Range, etc)</li>
- <li>GET <a href="/file/go.src.tar.gz">/file/go.src.tar.gz</a> for a larger file (~10 MB)</li>
- <li>GET <a href="/redirect">/redirect</a> to redirect back to / (this page)</li>
- <li>GET <a href="/goroutines">/goroutines</a> to see all active goroutines in this server</li>
- <li>PUT something to <a href="/crc32">/crc32</a> to get a count of number of bytes and its CRC-32</li>
- <li>PUT something to <a href="/ECHO">/ECHO</a> and it will be streamed back to you capitalized</li>
-</ul>
-
-</body></html>`)
-}
-
-func reqInfoHandler(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "text/plain")
- fmt.Fprintf(w, "Method: %s\n", r.Method)
- fmt.Fprintf(w, "Protocol: %s\n", r.Proto)
- fmt.Fprintf(w, "Host: %s\n", r.Host)
- fmt.Fprintf(w, "RemoteAddr: %s\n", r.RemoteAddr)
- fmt.Fprintf(w, "RequestURI: %q\n", r.RequestURI)
- fmt.Fprintf(w, "URL: %#v\n", r.URL)
- fmt.Fprintf(w, "Body.ContentLength: %d (-1 means unknown)\n", r.ContentLength)
- fmt.Fprintf(w, "Close: %v (relevant for HTTP/1 only)\n", r.Close)
- fmt.Fprintf(w, "TLS: %#v\n", r.TLS)
- fmt.Fprintf(w, "\nHeaders:\n")
- r.Header.Write(w)
-}
-
-func crcHandler(w http.ResponseWriter, r *http.Request) {
- if r.Method != "PUT" {
- http.Error(w, "PUT required.", 400)
- return
- }
- crc := crc32.NewIEEE()
- n, err := io.Copy(crc, r.Body)
- if err == nil {
- w.Header().Set("Content-Type", "text/plain")
- fmt.Fprintf(w, "bytes=%d, CRC32=%x", n, crc.Sum(nil))
- }
-}
-
-type capitalizeReader struct {
- r io.Reader
-}
-
-func (cr capitalizeReader) Read(p []byte) (n int, err error) {
- n, err = cr.r.Read(p)
- for i, b := range p[:n] {
- if b >= 'a' && b <= 'z' {
- p[i] = b - ('a' - 'A')
- }
- }
- return
-}
-
-type flushWriter struct {
- w io.Writer
-}
-
-func (fw flushWriter) Write(p []byte) (n int, err error) {
- n, err = fw.w.Write(p)
- if f, ok := fw.w.(http.Flusher); ok {
- f.Flush()
- }
- return
-}
-
-func echoCapitalHandler(w http.ResponseWriter, r *http.Request) {
- if r.Method != "PUT" {
- http.Error(w, "PUT required.", 400)
- return
- }
- io.Copy(flushWriter{w}, capitalizeReader{r.Body})
-}
-
-var (
- fsGrp singleflight.Group
- fsMu sync.Mutex // guards fsCache
- fsCache = map[string]http.Handler{}
-)
-
-// fileServer returns a file-serving handler that proxies URL.
-// It lazily fetches URL on the first access and caches its contents forever.
-func fileServer(url string, latency time.Duration) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if latency > 0 {
- time.Sleep(latency)
- }
- hi, err := fsGrp.Do(url, func() (interface{}, error) {
- fsMu.Lock()
- if h, ok := fsCache[url]; ok {
- fsMu.Unlock()
- return h, nil
- }
- fsMu.Unlock()
-
- res, err := http.Get(url)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return nil, err
- }
-
- modTime := time.Now()
- var h http.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- http.ServeContent(w, r, path.Base(url), modTime, bytes.NewReader(slurp))
- })
- fsMu.Lock()
- fsCache[url] = h
- fsMu.Unlock()
- return h, nil
- })
- if err != nil {
- http.Error(w, err.Error(), 500)
- return
- }
- hi.(http.Handler).ServeHTTP(w, r)
- })
-}
-
-func clockStreamHandler(w http.ResponseWriter, r *http.Request) {
- clientGone := w.(http.CloseNotifier).CloseNotify()
- w.Header().Set("Content-Type", "text/plain")
- ticker := time.NewTicker(1 * time.Second)
- defer ticker.Stop()
- fmt.Fprintf(w, "# ~1KB of junk to force browsers to start rendering immediately: \n")
- io.WriteString(w, strings.Repeat("# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", 13))
-
- for {
- fmt.Fprintf(w, "%v\n", time.Now())
- w.(http.Flusher).Flush()
- select {
- case <-ticker.C:
- case <-clientGone:
- log.Printf("Client %v disconnected from the clock", r.RemoteAddr)
- return
- }
- }
-}
-
-func registerHandlers() {
- tiles := newGopherTilesHandler()
- push := newPushHandler()
-
- mux2 := http.NewServeMux()
- http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- switch {
- case r.URL.Path == "/gophertiles":
- tiles.ServeHTTP(w, r) // allow HTTP/2 + HTTP/1.x
- return
- case strings.HasPrefix(r.URL.Path, "/serverpush"):
- push.ServeHTTP(w, r) // allow HTTP/2 + HTTP/1.x
- return
- case r.TLS == nil: // do not allow HTTP/1.x for anything else
- http.Redirect(w, r, "https://"+httpsHost()+"/", http.StatusFound)
- return
- }
- if r.ProtoMajor == 1 {
- if r.URL.Path == "/reqinfo" {
- reqInfoHandler(w, r)
- return
- }
- homeOldHTTP(w, r)
- return
- }
- mux2.ServeHTTP(w, r)
- })
- mux2.HandleFunc("/", home)
- mux2.Handle("/file/gopher.png", fileServer("https://golang.org/doc/gopher/frontpage.png", 0))
- mux2.Handle("/file/go.src.tar.gz", fileServer("https://storage.googleapis.com/golang/go1.4.1.src.tar.gz", 0))
- mux2.HandleFunc("/reqinfo", reqInfoHandler)
- mux2.HandleFunc("/crc32", crcHandler)
- mux2.HandleFunc("/ECHO", echoCapitalHandler)
- mux2.HandleFunc("/clockstream", clockStreamHandler)
- mux2.Handle("/gophertiles", tiles)
- mux2.HandleFunc("/redirect", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, "/", http.StatusFound)
- })
- stripHomedir := regexp.MustCompile(`/(Users|home)/\w+`)
- mux2.HandleFunc("/goroutines", func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "text/plain; charset=utf-8")
- buf := make([]byte, 2<<20)
- w.Write(stripHomedir.ReplaceAll(buf[:runtime.Stack(buf, true)], nil))
- })
-}
-
-var pushResources = map[string]http.Handler{
- "/serverpush/static/jquery.min.js": fileServer("https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js", 100*time.Millisecond),
- "/serverpush/static/godocs.js": fileServer("https://golang.org/lib/godoc/godocs.js", 100*time.Millisecond),
- "/serverpush/static/playground.js": fileServer("https://golang.org/lib/godoc/playground.js", 100*time.Millisecond),
- "/serverpush/static/style.css": fileServer("https://golang.org/lib/godoc/style.css", 100*time.Millisecond),
-}
-
-func newPushHandler() http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- for path, handler := range pushResources {
- if r.URL.Path == path {
- handler.ServeHTTP(w, r)
- return
- }
- }
-
- cacheBust := time.Now().UnixNano()
- if pusher, ok := w.(http.Pusher); ok {
- for path := range pushResources {
- url := fmt.Sprintf("%s?%d", path, cacheBust)
- if err := pusher.Push(url, nil); err != nil {
- log.Printf("Failed to push %v: %v", path, err)
- }
- }
- }
- time.Sleep(100 * time.Millisecond) // fake network latency + parsing time
- if err := pushTmpl.Execute(w, struct {
- CacheBust int64
- HTTPSHost string
- HTTPHost string
- }{
- CacheBust: cacheBust,
- HTTPSHost: httpsHost(),
- HTTPHost: httpHost(),
- }); err != nil {
- log.Printf("Executing server push template: %v", err)
- }
- })
-}
-
-func newGopherTilesHandler() http.Handler {
- const gopherURL = "https://blog.golang.org/go-programming-language-turns-two_gophers.jpg"
- res, err := http.Get(gopherURL)
- if err != nil {
- log.Fatal(err)
- }
- if res.StatusCode != 200 {
- log.Fatalf("Error fetching %s: %v", gopherURL, res.Status)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- res.Body.Close()
- if err != nil {
- log.Fatal(err)
- }
- im, err := jpeg.Decode(bytes.NewReader(slurp))
- if err != nil {
- if len(slurp) > 1024 {
- slurp = slurp[:1024]
- }
- log.Fatalf("Failed to decode gopher image: %v (got %q)", err, slurp)
- }
-
- type subImager interface {
- SubImage(image.Rectangle) image.Image
- }
- const tileSize = 32
- xt := im.Bounds().Max.X / tileSize
- yt := im.Bounds().Max.Y / tileSize
- var tile [][][]byte // y -> x -> jpeg bytes
- for yi := 0; yi < yt; yi++ {
- var row [][]byte
- for xi := 0; xi < xt; xi++ {
- si := im.(subImager).SubImage(image.Rectangle{
- Min: image.Point{xi * tileSize, yi * tileSize},
- Max: image.Point{(xi + 1) * tileSize, (yi + 1) * tileSize},
- })
- buf := new(bytes.Buffer)
- if err := jpeg.Encode(buf, si, &jpeg.Options{Quality: 90}); err != nil {
- log.Fatal(err)
- }
- row = append(row, buf.Bytes())
- }
- tile = append(tile, row)
- }
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ms, _ := strconv.Atoi(r.FormValue("latency"))
- const nanosPerMilli = 1e6
- if r.FormValue("x") != "" {
- x, _ := strconv.Atoi(r.FormValue("x"))
- y, _ := strconv.Atoi(r.FormValue("y"))
- if ms <= 1000 {
- time.Sleep(time.Duration(ms) * nanosPerMilli)
- }
- if x >= 0 && x < xt && y >= 0 && y < yt {
- http.ServeContent(w, r, "", time.Time{}, bytes.NewReader(tile[y][x]))
- return
- }
- }
- io.WriteString(w, "<html><body onload='showtimes()'>")
- fmt.Fprintf(w, "A grid of %d tiled images is below. Compare:<p>", xt*yt)
- for _, ms := range []int{0, 30, 200, 1000} {
- d := time.Duration(ms) * nanosPerMilli
- fmt.Fprintf(w, "[<a href='https://%s/gophertiles?latency=%d'>HTTP/2, %v latency</a>] [<a href='http://%s/gophertiles?latency=%d'>HTTP/1, %v latency</a>]<br>\n",
- httpsHost(), ms, d,
- httpHost(), ms, d,
- )
- }
- io.WriteString(w, "<p>\n")
- cacheBust := time.Now().UnixNano()
- for y := 0; y < yt; y++ {
- for x := 0; x < xt; x++ {
- fmt.Fprintf(w, "<img width=%d height=%d src='/gophertiles?x=%d&y=%d&cachebust=%d&latency=%d'>",
- tileSize, tileSize, x, y, cacheBust, ms)
- }
- io.WriteString(w, "<br/>\n")
- }
- io.WriteString(w, `<p><div id='loadtimes'></div></p>
-<script>
-function showtimes() {
- var times = 'Times from connection start:<br>'
- times += 'DOM loaded: ' + (window.performance.timing.domContentLoadedEventEnd - window.performance.timing.connectStart) + 'ms<br>'
- times += 'DOM complete (images loaded): ' + (window.performance.timing.domComplete - window.performance.timing.connectStart) + 'ms<br>'
- document.getElementById('loadtimes').innerHTML = times
-}
-</script>
-<hr><a href='/'>&lt;&lt Back to Go HTTP/2 demo server</a></body></html>`)
- })
-}
-
-func httpsHost() string {
- if *hostHTTPS != "" {
- return *hostHTTPS
- }
- if v := *httpsAddr; strings.HasPrefix(v, ":") {
- return "localhost" + v
- } else {
- return v
- }
-}
-
-func httpHost() string {
- if *hostHTTP != "" {
- return *hostHTTP
- }
- if v := *httpAddr; strings.HasPrefix(v, ":") {
- return "localhost" + v
- } else {
- return v
- }
-}
-
-func serveProdTLS() error {
- const cacheDir = "/var/cache/autocert"
- if err := os.MkdirAll(cacheDir, 0700); err != nil {
- return err
- }
- m := autocert.Manager{
- Cache: autocert.DirCache(cacheDir),
- Prompt: autocert.AcceptTOS,
- HostPolicy: autocert.HostWhitelist("http2.golang.org"),
- }
- srv := &http.Server{
- TLSConfig: &tls.Config{
- GetCertificate: m.GetCertificate,
- },
- }
- http2.ConfigureServer(srv, &http2.Server{
- NewWriteScheduler: func() http2.WriteScheduler {
- return http2.NewPriorityWriteScheduler(nil)
- },
- })
- ln, err := net.Listen("tcp", ":443")
- if err != nil {
- return err
- }
- return srv.Serve(tls.NewListener(tcpKeepAliveListener{ln.(*net.TCPListener)}, srv.TLSConfig))
-}
-
-type tcpKeepAliveListener struct {
- *net.TCPListener
-}
-
-func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
- tc, err := ln.AcceptTCP()
- if err != nil {
- return
- }
- tc.SetKeepAlive(true)
- tc.SetKeepAlivePeriod(3 * time.Minute)
- return tc, nil
-}
-
-func serveProd() error {
- errc := make(chan error, 2)
- go func() { errc <- http.ListenAndServe(":80", nil) }()
- go func() { errc <- serveProdTLS() }()
- return <-errc
-}
-
-const idleTimeout = 5 * time.Minute
-const activeTimeout = 10 * time.Minute
-
-// TODO: put this into the standard library and actually send
-// PING frames and GOAWAY, etc: golang.org/issue/14204
-func idleTimeoutHook() func(net.Conn, http.ConnState) {
- var mu sync.Mutex
- m := map[net.Conn]*time.Timer{}
- return func(c net.Conn, cs http.ConnState) {
- mu.Lock()
- defer mu.Unlock()
- if t, ok := m[c]; ok {
- delete(m, c)
- t.Stop()
- }
- var d time.Duration
- switch cs {
- case http.StateNew, http.StateIdle:
- d = idleTimeout
- case http.StateActive:
- d = activeTimeout
- default:
- return
- }
- m[c] = time.AfterFunc(d, func() {
- log.Printf("closing idle conn %v after %v", c.RemoteAddr(), d)
- go c.Close()
- })
- }
-}
-
-func main() {
- var srv http.Server
- flag.BoolVar(&http2.VerboseLogs, "verbose", false, "Verbose HTTP/2 debugging.")
- flag.Parse()
- srv.Addr = *httpsAddr
- srv.ConnState = idleTimeoutHook()
-
- registerHandlers()
-
- if *prod {
- *hostHTTP = "http2.golang.org"
- *hostHTTPS = "http2.golang.org"
- log.Fatal(serveProd())
- }
-
- url := "https://" + httpsHost() + "/"
- log.Printf("Listening on " + url)
- http2.ConfigureServer(&srv, &http2.Server{})
-
- if *httpAddr != "" {
- go func() {
- log.Printf("Listening on http://" + httpHost() + "/ (for unencrypted HTTP/1)")
- log.Fatal(http.ListenAndServe(*httpAddr, nil))
- }()
- }
-
- go func() {
- log.Fatal(srv.ListenAndServeTLS("server.crt", "server.key"))
- }()
- select {}
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/launch.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/launch.go
deleted file mode 100644
index df0866a30..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/launch.go
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-package main
-
-import (
- "bufio"
- "bytes"
- "encoding/json"
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "net/http"
- "os"
- "strings"
- "time"
-
- "golang.org/x/oauth2"
- "golang.org/x/oauth2/google"
- compute "google.golang.org/api/compute/v1"
-)
-
-var (
- proj = flag.String("project", "symbolic-datum-552", "name of Project")
- zone = flag.String("zone", "us-central1-a", "GCE zone")
- mach = flag.String("machinetype", "n1-standard-1", "Machine type")
- instName = flag.String("instance_name", "http2-demo", "Name of VM instance.")
- sshPub = flag.String("ssh_public_key", "", "ssh public key file to authorize. Can modify later in Google's web UI anyway.")
- staticIP = flag.String("static_ip", "130.211.116.44", "Static IP to use. If empty, automatic.")
-
- writeObject = flag.String("write_object", "", "If non-empty, a VM isn't created and the flag value is Google Cloud Storage bucket/object to write. The contents from stdin.")
- publicObject = flag.Bool("write_object_is_public", false, "Whether the object created by --write_object should be public.")
-)
-
-func readFile(v string) string {
- slurp, err := ioutil.ReadFile(v)
- if err != nil {
- log.Fatalf("Error reading %s: %v", v, err)
- }
- return strings.TrimSpace(string(slurp))
-}
-
-var config = &oauth2.Config{
- // The client-id and secret should be for an "Installed Application" when using
- // the CLI. Later we'll use a web application with a callback.
- ClientID: readFile("client-id.dat"),
- ClientSecret: readFile("client-secret.dat"),
- Endpoint: google.Endpoint,
- Scopes: []string{
- compute.DevstorageFullControlScope,
- compute.ComputeScope,
- "https://www.googleapis.com/auth/sqlservice",
- "https://www.googleapis.com/auth/sqlservice.admin",
- },
- RedirectURL: "urn:ietf:wg:oauth:2.0:oob",
-}
-
-const baseConfig = `#cloud-config
-coreos:
- units:
- - name: h2demo.service
- command: start
- content: |
- [Unit]
- Description=HTTP2 Demo
-
- [Service]
- ExecStartPre=/bin/bash -c 'mkdir -p /opt/bin && curl -s -o /opt/bin/h2demo http://storage.googleapis.com/http2-demo-server-tls/h2demo && chmod +x /opt/bin/h2demo'
- ExecStart=/opt/bin/h2demo --prod
- RestartSec=5s
- Restart=always
- Type=simple
-
- [Install]
- WantedBy=multi-user.target
-`
-
-func main() {
- flag.Parse()
- if *proj == "" {
- log.Fatalf("Missing --project flag")
- }
- prefix := "https://www.googleapis.com/compute/v1/projects/" + *proj
- machType := prefix + "/zones/" + *zone + "/machineTypes/" + *mach
-
- const tokenFileName = "token.dat"
- tokenFile := tokenCacheFile(tokenFileName)
- tokenSource := oauth2.ReuseTokenSource(nil, tokenFile)
- token, err := tokenSource.Token()
- if err != nil {
- if *writeObject != "" {
- log.Fatalf("Can't use --write_object without a valid token.dat file already cached.")
- }
- log.Printf("Error getting token from %s: %v", tokenFileName, err)
- log.Printf("Get auth code from %v", config.AuthCodeURL("my-state"))
- fmt.Print("\nEnter auth code: ")
- sc := bufio.NewScanner(os.Stdin)
- sc.Scan()
- authCode := strings.TrimSpace(sc.Text())
- token, err = config.Exchange(oauth2.NoContext, authCode)
- if err != nil {
- log.Fatalf("Error exchanging auth code for a token: %v", err)
- }
- if err := tokenFile.WriteToken(token); err != nil {
- log.Fatalf("Error writing to %s: %v", tokenFileName, err)
- }
- tokenSource = oauth2.ReuseTokenSource(token, nil)
- }
-
- oauthClient := oauth2.NewClient(oauth2.NoContext, tokenSource)
-
- if *writeObject != "" {
- writeCloudStorageObject(oauthClient)
- return
- }
-
- computeService, _ := compute.New(oauthClient)
-
- natIP := *staticIP
- if natIP == "" {
- // Try to find it by name.
- aggAddrList, err := computeService.Addresses.AggregatedList(*proj).Do()
- if err != nil {
- log.Fatal(err)
- }
- // http://godoc.org/code.google.com/p/google-api-go-client/compute/v1#AddressAggregatedList
- IPLoop:
- for _, asl := range aggAddrList.Items {
- for _, addr := range asl.Addresses {
- if addr.Name == *instName+"-ip" && addr.Status == "RESERVED" {
- natIP = addr.Address
- break IPLoop
- }
- }
- }
- }
-
- cloudConfig := baseConfig
- if *sshPub != "" {
- key := strings.TrimSpace(readFile(*sshPub))
- cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", key)
- }
- if os.Getenv("USER") == "bradfitz" {
- cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwks9dwWKlRC+73gRbvYtVg0vdCwDSuIlyt4z6xa/YU/jTDynM4R4W10hm2tPjy8iR1k8XhDv4/qdxe6m07NjG/By1tkmGpm1mGwho4Pr5kbAAy/Qg+NLCSdAYnnE00FQEcFOC15GFVMOW2AzDGKisReohwH9eIzHPzdYQNPRWXE= bradfitz@papag.bradfitz.com")
- }
- const maxCloudConfig = 32 << 10 // per compute API docs
- if len(cloudConfig) > maxCloudConfig {
- log.Fatalf("cloud config length of %d bytes is over %d byte limit", len(cloudConfig), maxCloudConfig)
- }
-
- instance := &compute.Instance{
- Name: *instName,
- Description: "Go Builder",
- MachineType: machType,
- Disks: []*compute.AttachedDisk{instanceDisk(computeService)},
- Tags: &compute.Tags{
- Items: []string{"http-server", "https-server"},
- },
- Metadata: &compute.Metadata{
- Items: []*compute.MetadataItems{
- {
- Key: "user-data",
- Value: &cloudConfig,
- },
- },
- },
- NetworkInterfaces: []*compute.NetworkInterface{
- {
- AccessConfigs: []*compute.AccessConfig{
- {
- Type: "ONE_TO_ONE_NAT",
- Name: "External NAT",
- NatIP: natIP,
- },
- },
- Network: prefix + "/global/networks/default",
- },
- },
- ServiceAccounts: []*compute.ServiceAccount{
- {
- Email: "default",
- Scopes: []string{
- compute.DevstorageFullControlScope,
- compute.ComputeScope,
- },
- },
- },
- }
-
- log.Printf("Creating instance...")
- op, err := computeService.Instances.Insert(*proj, *zone, instance).Do()
- if err != nil {
- log.Fatalf("Failed to create instance: %v", err)
- }
- opName := op.Name
- log.Printf("Created. Waiting on operation %v", opName)
-OpLoop:
- for {
- time.Sleep(2 * time.Second)
- op, err := computeService.ZoneOperations.Get(*proj, *zone, opName).Do()
- if err != nil {
- log.Fatalf("Failed to get op %s: %v", opName, err)
- }
- switch op.Status {
- case "PENDING", "RUNNING":
- log.Printf("Waiting on operation %v", opName)
- continue
- case "DONE":
- if op.Error != nil {
- for _, operr := range op.Error.Errors {
- log.Printf("Error: %+v", operr)
- }
- log.Fatalf("Failed to start.")
- }
- log.Printf("Success. %+v", op)
- break OpLoop
- default:
- log.Fatalf("Unknown status %q: %+v", op.Status, op)
- }
- }
-
- inst, err := computeService.Instances.Get(*proj, *zone, *instName).Do()
- if err != nil {
- log.Fatalf("Error getting instance after creation: %v", err)
- }
- ij, _ := json.MarshalIndent(inst, "", " ")
- log.Printf("Instance: %s", ij)
-}
-
-func instanceDisk(svc *compute.Service) *compute.AttachedDisk {
- const imageURL = "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-444-5-0-v20141016"
- diskName := *instName + "-disk"
-
- return &compute.AttachedDisk{
- AutoDelete: true,
- Boot: true,
- Type: "PERSISTENT",
- InitializeParams: &compute.AttachedDiskInitializeParams{
- DiskName: diskName,
- SourceImage: imageURL,
- DiskSizeGb: 50,
- },
- }
-}
-
-func writeCloudStorageObject(httpClient *http.Client) {
- content := os.Stdin
- const maxSlurp = 1 << 20
- var buf bytes.Buffer
- n, err := io.CopyN(&buf, content, maxSlurp)
- if err != nil && err != io.EOF {
- log.Fatalf("Error reading from stdin: %v, %v", n, err)
- }
- contentType := http.DetectContentType(buf.Bytes())
-
- req, err := http.NewRequest("PUT", "https://storage.googleapis.com/"+*writeObject, io.MultiReader(&buf, content))
- if err != nil {
- log.Fatal(err)
- }
- req.Header.Set("x-goog-api-version", "2")
- if *publicObject {
- req.Header.Set("x-goog-acl", "public-read")
- }
- req.Header.Set("Content-Type", contentType)
- res, err := httpClient.Do(req)
- if err != nil {
- log.Fatal(err)
- }
- if res.StatusCode != 200 {
- res.Write(os.Stderr)
- log.Fatalf("Failed.")
- }
- log.Printf("Success.")
- os.Exit(0)
-}
-
-type tokenCacheFile string
-
-func (f tokenCacheFile) Token() (*oauth2.Token, error) {
- slurp, err := ioutil.ReadFile(string(f))
- if err != nil {
- return nil, err
- }
- t := new(oauth2.Token)
- if err := json.Unmarshal(slurp, t); err != nil {
- return nil, err
- }
- return t, nil
-}
-
-func (f tokenCacheFile) WriteToken(t *oauth2.Token) error {
- jt, err := json.Marshal(t)
- if err != nil {
- return err
- }
- return ioutil.WriteFile(string(f), jt, 0600)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.key b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.key
deleted file mode 100644
index a15a6abaf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSSR8Od0+9Q
-62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoTZjkUygby
-XDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYkJfODVGnV
-mr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3mOoLb4yJ
-JQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYWcaiW8LWZ
-SUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDAQABAoIBAFFHV7JMAqPWnMYA
-nezY6J81v9+XN+7xABNWM2Q8uv4WdksbigGLTXR3/680Z2hXqJ7LMeC5XJACFT/e
-/Gr0vmpgOCygnCPfjGehGKpavtfksXV3edikUlnCXsOP1C//c1bFL+sMYmFCVgTx
-qYdDK8yKzXNGrKYT6q5YG7IglyRNV1rsQa8lM/5taFYiD1Ck/3tQi3YIq8Lcuser
-hrxsMABcQ6mi+EIvG6Xr4mfJug0dGJMHG4RG1UGFQn6RXrQq2+q53fC8ZbVUSi0j
-NQ918aKFzktwv+DouKU0ME4I9toks03gM860bAL7zCbKGmwR3hfgX/TqzVCWpG9E
-LDVfvekCgYEA8fk9N53jbBRmULUGEf4qWypcLGiZnNU0OeXWpbPV9aa3H0VDytA7
-8fCN2dPAVDPqlthMDdVe983NCNwp2Yo8ZimDgowyIAKhdC25s1kejuaiH9OAPj3c
-0f8KbriYX4n8zNHxFwK6Ae3pQ6EqOLJVCUsziUaZX9nyKY5aZlyX6xcCgYEAwjws
-K62PjC64U5wYddNLp+kNdJ4edx+a7qBb3mEgPvSFT2RO3/xafJyG8kQB30Mfstjd
-bRxyUV6N0vtX1zA7VQtRUAvfGCecpMo+VQZzcHXKzoRTnQ7eZg4Lmj5fQ9tOAKAo
-QCVBoSW/DI4PZL26CAMDcAba4Pa22ooLapoRIQsCgYA6pIfkkbxLNkpxpt2YwLtt
-Kr/590O7UaR9n6k8sW/aQBRDXNsILR1KDl2ifAIxpf9lnXgZJiwE7HiTfCAcW7c1
-nzwDCI0hWuHcMTS/NYsFYPnLsstyyjVZI3FY0h4DkYKV9Q9z3zJLQ2hz/nwoD3gy
-b2pHC7giFcTts1VPV4Nt8wKBgHeFn4ihHJweg76vZz3Z78w7VNRWGFklUalVdDK7
-gaQ7w2y/ROn/146mo0OhJaXFIFRlrpvdzVrU3GDf2YXJYDlM5ZRkObwbZADjksev
-WInzcgDy3KDg7WnPasRXbTfMU4t/AkW2p1QKbi3DnSVYuokDkbH2Beo45vxDxhKr
-C69RAoGBAIyo3+OJenoZmoNzNJl2WPW5MeBUzSh8T/bgyjFTdqFHF5WiYRD/lfHj
-x9Glyw2nutuT4hlOqHvKhgTYdDMsF2oQ72fe3v8Q5FU7FuKndNPEAyvKNXZaShVA
-hnlhv5DjXKb0wFWnt5PCCiQLtzG0yyHaITrrEme7FikkIcTxaX/Y
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.pem b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.pem
deleted file mode 100644
index 3a323e774..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.pem
+++ /dev/null
@@ -1,26 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEWjCCA0KgAwIBAgIJALfRlWsI8YQHMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNV
-BAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEUMBIG
-A1UEChMLQnJhZGZpdHppbmMxEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsGCSqGSIb3
-DQEJARYOYnJhZEBkYW5nYS5jb20wHhcNMTQwNzE1MjA0NjA1WhcNMTcwNTA0MjA0
-NjA1WjB7MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBG
-cmFuY2lzY28xFDASBgNVBAoTC0JyYWRmaXR6aW5jMRIwEAYDVQQDEwlsb2NhbGhv
-c3QxHTAbBgkqhkiG9w0BCQEWDmJyYWRAZGFuZ2EuY29tMIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSS
-R8Od0+9Q62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoT
-ZjkUygbyXDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYk
-JfODVGnVmr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3
-mOoLb4yJJQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYW
-caiW8LWZSUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDAQABo4HgMIHdMB0G
-A1UdDgQWBBRcAROthS4P4U7vTfjByC569R7E6DCBrQYDVR0jBIGlMIGigBRcAROt
-hS4P4U7vTfjByC569R7E6KF/pH0wezELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB
-MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRQwEgYDVQQKEwtCcmFkZml0emluYzES
-MBAGA1UEAxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5icmFkQGRhbmdhLmNv
-bYIJALfRlWsI8YQHMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAG6h
-U9f9sNH0/6oBbGGy2EVU0UgITUQIrFWo9rFkrW5k/XkDjQm+3lzjT0iGR4IxE/Ao
-eU6sQhua7wrWeFEn47GL98lnCsJdD7oZNhFmQ95Tb/LnDUjs5Yj9brP0NWzXfYU4
-UK2ZnINJRcJpB8iRCaCxE8DdcUF0XqIEq6pA272snoLmiXLMvNl3kYEdm+je6voD
-58SNVEUsztzQyXmJEhCpwVI0A6QCjzXj+qvpmw3ZZHi8JwXei8ZZBLTSFBki8Z7n
-sH9BBH38/SzUmAN4QHSPy1gjqm00OAE8NaYDkh/bzE4d7mLGGMWp/WE3KPSu82HF
-kPe6XoSbiLm/kxk32T0=
------END CERTIFICATE-----
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.srl b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.srl
deleted file mode 100644
index 6db389188..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/rootCA.srl
+++ /dev/null
@@ -1 +0,0 @@
-E2CE26BF3285059C
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.crt b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.crt
deleted file mode 100644
index c59059bd6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.crt
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDPjCCAiYCCQDizia/MoUFnDANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJV
-UzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xFDASBgNVBAoT
-C0JyYWRmaXR6aW5jMRIwEAYDVQQDEwlsb2NhbGhvc3QxHTAbBgkqhkiG9w0BCQEW
-DmJyYWRAZGFuZ2EuY29tMB4XDTE0MDcxNTIwNTAyN1oXDTE1MTEyNzIwNTAyN1ow
-RzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQHEwJTRjEeMBwGA1UE
-ChMVYnJhZGZpdHogaHR0cDIgc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAs1Y9CyLFrdL8VQWN1WaifDqaZFnoqjHhCMlc1TfG2zA+InDifx2l
-gZD3o8FeNnAcfM2sPlk3+ZleOYw9P/CklFVDlvqmpCv9ss/BEp/dDaWvy1LmJ4c2
-dbQJfmTxn7CV1H3TsVJvKdwFmdoABb41NoBp6+NNO7OtDyhbIMiCI0pL3Nefb3HL
-A7hIMo3DYbORTtJLTIH9W8YKrEWL0lwHLrYFx/UdutZnv+HjdmO6vCN4na55mjws
-/vjKQUmc7xeY7Xe20xDEG2oDKVkL2eD7FfyrYMS3rO1ExP2KSqlXYG/1S9I/fz88
-F0GK7HX55b5WjZCl2J3ERVdnv/0MQv+sYQIDAQABMA0GCSqGSIb3DQEBBQUAA4IB
-AQC0zL+n/YpRZOdulSu9tS8FxrstXqGWoxfe+vIUgqfMZ5+0MkjJ/vW0FqlLDl2R
-rn4XaR3e7FmWkwdDVbq/UB6lPmoAaFkCgh9/5oapMaclNVNnfF3fjCJfRr+qj/iD
-EmJStTIN0ZuUjAlpiACmfnpEU55PafT5Zx+i1yE4FGjw8bJpFoyD4Hnm54nGjX19
-KeCuvcYFUPnBm3lcL0FalF2AjqV02WTHYNQk7YF/oeO7NKBoEgvGvKG3x+xaOeBI
-dwvdq175ZsGul30h+QjrRlXhH/twcuaT3GSdoysDl9cCYE8f1Mk8PD6gan3uBCJU
-90p6/CbU71bGbfpM2PHot2fm
------END CERTIFICATE-----
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.key b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.key
deleted file mode 100644
index f329c1421..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/server.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAs1Y9CyLFrdL8VQWN1WaifDqaZFnoqjHhCMlc1TfG2zA+InDi
-fx2lgZD3o8FeNnAcfM2sPlk3+ZleOYw9P/CklFVDlvqmpCv9ss/BEp/dDaWvy1Lm
-J4c2dbQJfmTxn7CV1H3TsVJvKdwFmdoABb41NoBp6+NNO7OtDyhbIMiCI0pL3Nef
-b3HLA7hIMo3DYbORTtJLTIH9W8YKrEWL0lwHLrYFx/UdutZnv+HjdmO6vCN4na55
-mjws/vjKQUmc7xeY7Xe20xDEG2oDKVkL2eD7FfyrYMS3rO1ExP2KSqlXYG/1S9I/
-fz88F0GK7HX55b5WjZCl2J3ERVdnv/0MQv+sYQIDAQABAoIBADQ2spUwbY+bcz4p
-3M66ECrNQTBggP40gYl2XyHxGGOu2xhZ94f9ELf1hjRWU2DUKWco1rJcdZClV6q3
-qwmXvcM2Q/SMS8JW0ImkNVl/0/NqPxGatEnj8zY30d/L8hGFb0orzFu/XYA5gCP4
-NbN2WrXgk3ZLeqwcNxHHtSiJWGJ/fPyeDWAu/apy75u9Xf2GlzBZmV6HYD9EfK80
-LTlI60f5FO487CrJnboL7ovPJrIHn+k05xRQqwma4orpz932rTXnTjs9Lg6KtbQN
-a7PrqfAntIISgr11a66Mng3IYH1lYqJsWJJwX/xHT4WLEy0EH4/0+PfYemJekz2+
-Co62drECgYEA6O9zVJZXrLSDsIi54cfxA7nEZWm5CAtkYWeAHa4EJ+IlZ7gIf9sL
-W8oFcEfFGpvwVqWZ+AsQ70dsjXAv3zXaG0tmg9FtqWp7pzRSMPidifZcQwWkKeTO
-gJnFmnVyed8h6GfjTEu4gxo1/S5U0V+mYSha01z5NTnN6ltKx1Or3b0CgYEAxRgm
-S30nZxnyg/V7ys61AZhst1DG2tkZXEMcA7dYhabMoXPJAP/EfhlWwpWYYUs/u0gS
-Wwmf5IivX5TlYScgmkvb/NYz0u4ZmOXkLTnLPtdKKFXhjXJcHjUP67jYmOxNlJLp
-V4vLRnFxTpffAV+OszzRxsXX6fvruwZBANYJeXUCgYBVouLFsFgfWGYp2rpr9XP4
-KK25kvrBqF6JKOIDB1zjxNJ3pUMKrl8oqccCFoCyXa4oTM2kUX0yWxHfleUjrMq4
-yimwQKiOZmV7fVLSSjSw6e/VfBd0h3gb82ygcplZkN0IclkwTY5SNKqwn/3y07V5
-drqdhkrgdJXtmQ6O5YYECQKBgATERcDToQ1USlI4sKrB/wyv1AlG8dg/IebiVJ4e
-ZAyvcQmClFzq0qS+FiQUnB/WQw9TeeYrwGs1hxBHuJh16srwhLyDrbMvQP06qh8R
-48F8UXXSRec22dV9MQphaROhu2qZdv1AC0WD3tqov6L33aqmEOi+xi8JgbT/PLk5
-c/c1AoGBAI1A/02ryksW6/wc7/6SP2M2rTy4m1sD/GnrTc67EHnRcVBdKO6qH2RY
-nqC8YcveC2ZghgPTDsA3VGuzuBXpwY6wTyV99q6jxQJ6/xcrD9/NUG6Uwv/xfCxl
-IJLeBYEqQundSSny3VtaAUK8Ul1nxpTvVRNwtcyWTo8RHAAyNPWd
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/tmpl.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/tmpl.go
deleted file mode 100644
index 504d6a78a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2demo/tmpl.go
+++ /dev/null
@@ -1,1991 +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 file.
-
-// +build h2demo
-
-package main
-
-import "html/template"
-
-var pushTmpl = template.Must(template.New("serverpush").Parse(`
-
-<!DOCTYPE html>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta name="theme-color" content="#375EAB">
-
- <title>HTTP/2 Server Push Demo</title>
-
-<link type="text/css" rel="stylesheet" href="/serverpush/static/style.css?{{.CacheBust}}">
-<script>
-window.initFuncs = [];
-</script>
-
-<script>
-function showtimes() {
- var times = 'DOM loaded: ' + (window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart) + 'ms, '
- times += 'DOM complete (all loaded): ' + (window.performance.timing.domComplete - window.performance.timing.navigationStart) + 'ms, '
- times += 'Load event fired: ' + (window.performance.timing.loadEventStart - window.performance.timing.navigationStart) + 'ms'
- document.getElementById('loadtimes').innerHTML = times
-}
-</script>
-
-</head>
-<body onload="showtimes()">
-
-<div style="background:#fff9a4;padding:10px">
-Note: This page exists for demonstration purposes. For the actual cmd/go docs, go to <a href="golang.org/cmd/go">golang.org/cmd/go</a>.
-</div>
-
-<div style="padding:20px">
-
-
-<a href="https://{{.HTTPSHost}}/serverpush">HTTP/2 with Server Push</a> | <a href="http://{{.HTTPHost}}/serverpush">HTTP only</a>
-<div id="loadtimes"></div>
-
-</div>
-
-<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
-...
-</div><!-- #lowframe -->
-
-<div id="topbar" class="wide"><div class="container">
-<div class="top-heading" id="heading-wide"><a href="/">The Go Programming Language</a></div>
-<div class="top-heading" id="heading-narrow"><a href="/">Go</a></div>
-<a href="#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
-<form method="GET" action="/search">
-<div id="menu">
-<a href="/doc/">Documents</a>
-<a href="/pkg/">Packages</a>
-<a href="/project/">The Project</a>
-<a href="/help/">Help</a>
-<a href="/blog/">Blog</a>
-
-<a id="playgroundButton" href="http://play.golang.org/" title="Show Go Playground">Play</a>
-
-<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
-</div>
-</form>
-
-</div></div>
-
-
-<div id="playground" class="play">
- <div class="input"><textarea class="code" spellcheck="false">package main
-
-import "fmt"
-
-func main() {
- fmt.Println("Hello, 世界")
-}</textarea></div>
- <div class="output"></div>
- <div class="buttons">
- <a class="run" title="Run this code [shift-enter]">Run</a>
- <a class="fmt" title="Format this code">Format</a>
-
- <a class="share" title="Share this code">Share</a>
-
- </div>
-</div>
-
-
-<div id="page" class="wide">
-<div class="container">
-
-
- <h1>Command go</h1>
-
-
-
-
-<div id="nav"></div>
-
-
-<!--
- Copyright 2009 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 file.
--->
-<!--
- Note: Static (i.e., not template-generated) href and id
- attributes start with "pkg-" to make it impossible for
- them to conflict with generated attributes (some of which
- correspond to Go identifiers).
--->
-
- <script type='text/javascript'>
- document.ANALYSIS_DATA = null;
- document.CALLGRAPH = null;
- </script>
-
-
-
- <p>
-Go is a tool for managing Go source code.
-</p>
-<p>
-Usage:
-</p>
-<pre>go command [arguments]
-</pre>
-<p>
-The commands are:
-</p>
-<pre>build compile packages and dependencies
-clean remove object files
-doc show documentation for package or symbol
-env print Go environment information
-bug start a bug report
-fix run go tool fix on packages
-fmt run gofmt on package sources
-generate generate Go files by processing source
-get download and install packages and dependencies
-install compile and install packages and dependencies
-list list packages
-run compile and run Go program
-test test packages
-tool run specified go tool
-version print Go version
-vet run go tool vet on packages
-</pre>
-<p>
-Use &#34;go help [command]&#34; for more information about a command.
-</p>
-<p>
-Additional help topics:
-</p>
-<pre>c calling between Go and C
-buildmode description of build modes
-filetype file types
-gopath GOPATH environment variable
-environment environment variables
-importpath import path syntax
-packages description of package lists
-testflag description of testing flags
-testfunc description of testing functions
-</pre>
-<p>
-Use &#34;go help [topic]&#34; for more information about that topic.
-</p>
-<h3 id="hdr-Compile_packages_and_dependencies">Compile packages and dependencies</h3>
-<p>
-Usage:
-</p>
-<pre>go build [-o output] [-i] [build flags] [packages]
-</pre>
-<p>
-Build compiles the packages named by the import paths,
-along with their dependencies, but it does not install the results.
-</p>
-<p>
-If the arguments to build are a list of .go files, build treats
-them as a list of source files specifying a single package.
-</p>
-<p>
-When compiling a single main package, build writes
-the resulting executable to an output file named after
-the first source file (&#39;go build ed.go rx.go&#39; writes &#39;ed&#39; or &#39;ed.exe&#39;)
-or the source code directory (&#39;go build unix/sam&#39; writes &#39;sam&#39; or &#39;sam.exe&#39;).
-The &#39;.exe&#39; suffix is added when writing a Windows executable.
-</p>
-<p>
-When compiling multiple packages or a single non-main package,
-build compiles the packages but discards the resulting object,
-serving only as a check that the packages can be built.
-</p>
-<p>
-When compiling packages, build ignores files that end in &#39;_test.go&#39;.
-</p>
-<p>
-The -o flag, only allowed when compiling a single package,
-forces build to write the resulting executable or object
-to the named output file, instead of the default behavior described
-in the last two paragraphs.
-</p>
-<p>
-The -i flag installs the packages that are dependencies of the target.
-</p>
-<p>
-The build flags are shared by the build, clean, get, install, list, run,
-and test commands:
-</p>
-<pre>-a
- force rebuilding of packages that are already up-to-date.
--n
- print the commands but do not run them.
--p n
- the number of programs, such as build commands or
- test binaries, that can be run in parallel.
- The default is the number of CPUs available.
--race
- enable data race detection.
- Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
--msan
- enable interoperation with memory sanitizer.
- Supported only on linux/amd64,
- and only with Clang/LLVM as the host C compiler.
--v
- print the names of packages as they are compiled.
--work
- print the name of the temporary work directory and
- do not delete it when exiting.
--x
- print the commands.
-
--asmflags &#39;flag list&#39;
- arguments to pass on each go tool asm invocation.
--buildmode mode
- build mode to use. See &#39;go help buildmode&#39; for more.
--compiler name
- name of compiler to use, as in runtime.Compiler (gccgo or gc).
--gccgoflags &#39;arg list&#39;
- arguments to pass on each gccgo compiler/linker invocation.
--gcflags &#39;arg list&#39;
- arguments to pass on each go tool compile invocation.
--installsuffix suffix
- a suffix to use in the name of the package installation directory,
- in order to keep output separate from default builds.
- If using the -race flag, the install suffix is automatically set to race
- or, if set explicitly, has _race appended to it. Likewise for the -msan
- flag. Using a -buildmode option that requires non-default compile flags
- has a similar effect.
--ldflags &#39;flag list&#39;
- arguments to pass on each go tool link invocation.
--linkshared
- link against shared libraries previously created with
- -buildmode=shared.
--pkgdir dir
- install and load all packages from dir instead of the usual locations.
- For example, when building with a non-standard configuration,
- use -pkgdir to keep generated packages in a separate location.
--tags &#39;tag list&#39;
- a list of build tags to consider satisfied during the build.
- For more information about build tags, see the description of
- build constraints in the documentation for the go/build package.
--toolexec &#39;cmd args&#39;
- a program to use to invoke toolchain programs like vet and asm.
- For example, instead of running asm, the go command will run
- &#39;cmd args /path/to/asm &lt;arguments for asm&gt;&#39;.
-</pre>
-<p>
-The list flags accept a space-separated list of strings. To embed spaces
-in an element in the list, surround it with either single or double quotes.
-</p>
-<p>
-For more about specifying packages, see &#39;go help packages&#39;.
-For more about where packages and binaries are installed,
-run &#39;go help gopath&#39;.
-For more about calling between Go and C/C++, run &#39;go help c&#39;.
-</p>
-<p>
-Note: Build adheres to certain conventions such as those described
-by &#39;go help gopath&#39;. Not all projects can follow these conventions,
-however. Installations that have their own conventions or that use
-a separate software build system may choose to use lower-level
-invocations such as &#39;go tool compile&#39; and &#39;go tool link&#39; to avoid
-some of the overheads and design decisions of the build tool.
-</p>
-<p>
-See also: go install, go get, go clean.
-</p>
-<h3 id="hdr-Remove_object_files">Remove object files</h3>
-<p>
-Usage:
-</p>
-<pre>go clean [-i] [-r] [-n] [-x] [build flags] [packages]
-</pre>
-<p>
-Clean removes object files from package source directories.
-The go command builds most objects in a temporary directory,
-so go clean is mainly concerned with object files left by other
-tools or by manual invocations of go build.
-</p>
-<p>
-Specifically, clean removes the following files from each of the
-source directories corresponding to the import paths:
-</p>
-<pre>_obj/ old object directory, left from Makefiles
-_test/ old test directory, left from Makefiles
-_testmain.go old gotest file, left from Makefiles
-test.out old test log, left from Makefiles
-build.out old test log, left from Makefiles
-*.[568ao] object files, left from Makefiles
-
-DIR(.exe) from go build
-DIR.test(.exe) from go test -c
-MAINFILE(.exe) from go build MAINFILE.go
-*.so from SWIG
-</pre>
-<p>
-In the list, DIR represents the final path element of the
-directory, and MAINFILE is the base name of any Go source
-file in the directory that is not included when building
-the package.
-</p>
-<p>
-The -i flag causes clean to remove the corresponding installed
-archive or binary (what &#39;go install&#39; would create).
-</p>
-<p>
-The -n flag causes clean to print the remove commands it would execute,
-but not run them.
-</p>
-<p>
-The -r flag causes clean to be applied recursively to all the
-dependencies of the packages named by the import paths.
-</p>
-<p>
-The -x flag causes clean to print remove commands as it executes them.
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-</p>
-<p>
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<h3 id="hdr-Show_documentation_for_package_or_symbol">Show documentation for package or symbol</h3>
-<p>
-Usage:
-</p>
-<pre>go doc [-u] [-c] [package|[package.]symbol[.method]]
-</pre>
-<p>
-Doc prints the documentation comments associated with the item identified by its
-arguments (a package, const, func, type, var, or method) followed by a one-line
-summary of each of the first-level items &#34;under&#34; that item (package-level
-declarations for a package, methods for a type, etc.).
-</p>
-<p>
-Doc accepts zero, one, or two arguments.
-</p>
-<p>
-Given no arguments, that is, when run as
-</p>
-<pre>go doc
-</pre>
-<p>
-it prints the package documentation for the package in the current directory.
-If the package is a command (package main), the exported symbols of the package
-are elided from the presentation unless the -cmd flag is provided.
-</p>
-<p>
-When run with one argument, the argument is treated as a Go-syntax-like
-representation of the item to be documented. What the argument selects depends
-on what is installed in GOROOT and GOPATH, as well as the form of the argument,
-which is schematically one of these:
-</p>
-<pre>go doc &lt;pkg&gt;
-go doc &lt;sym&gt;[.&lt;method&gt;]
-go doc [&lt;pkg&gt;.]&lt;sym&gt;[.&lt;method&gt;]
-go doc [&lt;pkg&gt;.][&lt;sym&gt;.]&lt;method&gt;
-</pre>
-<p>
-The first item in this list matched by the argument is the one whose documentation
-is printed. (See the examples below.) However, if the argument starts with a capital
-letter it is assumed to identify a symbol or method in the current directory.
-</p>
-<p>
-For packages, the order of scanning is determined lexically in breadth-first order.
-That is, the package presented is the one that matches the search and is nearest
-the root and lexically first at its level of the hierarchy. The GOROOT tree is
-always scanned in its entirety before GOPATH.
-</p>
-<p>
-If there is no package specified or matched, the package in the current
-directory is selected, so &#34;go doc Foo&#34; shows the documentation for symbol Foo in
-the current package.
-</p>
-<p>
-The package path must be either a qualified path or a proper suffix of a
-path. The go tool&#39;s usual package mechanism does not apply: package path
-elements like . and ... are not implemented by go doc.
-</p>
-<p>
-When run with two arguments, the first must be a full package path (not just a
-suffix), and the second is a symbol or symbol and method; this is similar to the
-syntax accepted by godoc:
-</p>
-<pre>go doc &lt;pkg&gt; &lt;sym&gt;[.&lt;method&gt;]
-</pre>
-<p>
-In all forms, when matching symbols, lower-case letters in the argument match
-either case but upper-case letters match exactly. This means that there may be
-multiple matches of a lower-case argument in a package if different symbols have
-different cases. If this occurs, documentation for all matches is printed.
-</p>
-<p>
-Examples:
-</p>
-<pre>go doc
- Show documentation for current package.
-go doc Foo
- Show documentation for Foo in the current package.
- (Foo starts with a capital letter so it cannot match
- a package path.)
-go doc encoding/json
- Show documentation for the encoding/json package.
-go doc json
- Shorthand for encoding/json.
-go doc json.Number (or go doc json.number)
- Show documentation and method summary for json.Number.
-go doc json.Number.Int64 (or go doc json.number.int64)
- Show documentation for json.Number&#39;s Int64 method.
-go doc cmd/doc
- Show package docs for the doc command.
-go doc -cmd cmd/doc
- Show package docs and exported symbols within the doc command.
-go doc template.new
- Show documentation for html/template&#39;s New function.
- (html/template is lexically before text/template)
-go doc text/template.new # One argument
- Show documentation for text/template&#39;s New function.
-go doc text/template new # Two arguments
- Show documentation for text/template&#39;s New function.
-
-At least in the current tree, these invocations all print the
-documentation for json.Decoder&#39;s Decode method:
-
-go doc json.Decoder.Decode
-go doc json.decoder.decode
-go doc json.decode
-cd go/src/encoding/json; go doc decode
-</pre>
-<p>
-Flags:
-</p>
-<pre>-c
- Respect case when matching symbols.
--cmd
- Treat a command (package main) like a regular package.
- Otherwise package main&#39;s exported symbols are hidden
- when showing the package&#39;s top-level documentation.
--u
- Show documentation for unexported as well as exported
- symbols and methods.
-</pre>
-<h3 id="hdr-Print_Go_environment_information">Print Go environment information</h3>
-<p>
-Usage:
-</p>
-<pre>go env [var ...]
-</pre>
-<p>
-Env prints Go environment information.
-</p>
-<p>
-By default env prints information as a shell script
-(on Windows, a batch file). If one or more variable
-names is given as arguments, env prints the value of
-each named variable on its own line.
-</p>
-<h3 id="hdr-Start_a_bug_report">Start a bug report</h3>
-<p>
-Usage:
-</p>
-<pre>go bug
-</pre>
-<p>
-Bug opens the default browser and starts a new bug report.
-The report includes useful system information.
-</p>
-<h3 id="hdr-Run_go_tool_fix_on_packages">Run go tool fix on packages</h3>
-<p>
-Usage:
-</p>
-<pre>go fix [packages]
-</pre>
-<p>
-Fix runs the Go fix command on the packages named by the import paths.
-</p>
-<p>
-For more about fix, see &#39;go doc cmd/fix&#39;.
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-To run fix with specific options, run &#39;go tool fix&#39;.
-</p>
-<p>
-See also: go fmt, go vet.
-</p>
-<h3 id="hdr-Run_gofmt_on_package_sources">Run gofmt on package sources</h3>
-<p>
-Usage:
-</p>
-<pre>go fmt [-n] [-x] [packages]
-</pre>
-<p>
-Fmt runs the command &#39;gofmt -l -w&#39; on the packages named
-by the import paths. It prints the names of the files that are modified.
-</p>
-<p>
-For more about gofmt, see &#39;go doc cmd/gofmt&#39;.
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-</p>
-<p>
-To run gofmt with specific options, run gofmt itself.
-</p>
-<p>
-See also: go fix, go vet.
-</p>
-<h3 id="hdr-Generate_Go_files_by_processing_source">Generate Go files by processing source</h3>
-<p>
-Usage:
-</p>
-<pre>go generate [-run regexp] [-n] [-v] [-x] [build flags] [file.go... | packages]
-</pre>
-<p>
-Generate runs commands described by directives within existing
-files. Those commands can run any process but the intent is to
-create or update Go source files.
-</p>
-<p>
-Go generate is never run automatically by go build, go get, go test,
-and so on. It must be run explicitly.
-</p>
-<p>
-Go generate scans the file for directives, which are lines of
-the form,
-</p>
-<pre>//go:generate command argument...
-</pre>
-<p>
-(note: no leading spaces and no space in &#34;//go&#34;) where command
-is the generator to be run, corresponding to an executable file
-that can be run locally. It must either be in the shell path
-(gofmt), a fully qualified path (/usr/you/bin/mytool), or a
-command alias, described below.
-</p>
-<p>
-Note that go generate does not parse the file, so lines that look
-like directives in comments or multiline strings will be treated
-as directives.
-</p>
-<p>
-The arguments to the directive are space-separated tokens or
-double-quoted strings passed to the generator as individual
-arguments when it is run.
-</p>
-<p>
-Quoted strings use Go syntax and are evaluated before execution; a
-quoted string appears as a single argument to the generator.
-</p>
-<p>
-Go generate sets several variables when it runs the generator:
-</p>
-<pre>$GOARCH
- The execution architecture (arm, amd64, etc.)
-$GOOS
- The execution operating system (linux, windows, etc.)
-$GOFILE
- The base name of the file.
-$GOLINE
- The line number of the directive in the source file.
-$GOPACKAGE
- The name of the package of the file containing the directive.
-$DOLLAR
- A dollar sign.
-</pre>
-<p>
-Other than variable substitution and quoted-string evaluation, no
-special processing such as &#34;globbing&#34; is performed on the command
-line.
-</p>
-<p>
-As a last step before running the command, any invocations of any
-environment variables with alphanumeric names, such as $GOFILE or
-$HOME, are expanded throughout the command line. The syntax for
-variable expansion is $NAME on all operating systems. Due to the
-order of evaluation, variables are expanded even inside quoted
-strings. If the variable NAME is not set, $NAME expands to the
-empty string.
-</p>
-<p>
-A directive of the form,
-</p>
-<pre>//go:generate -command xxx args...
-</pre>
-<p>
-specifies, for the remainder of this source file only, that the
-string xxx represents the command identified by the arguments. This
-can be used to create aliases or to handle multiword generators.
-For example,
-</p>
-<pre>//go:generate -command foo go tool foo
-</pre>
-<p>
-specifies that the command &#34;foo&#34; represents the generator
-&#34;go tool foo&#34;.
-</p>
-<p>
-Generate processes packages in the order given on the command line,
-one at a time. If the command line lists .go files, they are treated
-as a single package. Within a package, generate processes the
-source files in a package in file name order, one at a time. Within
-a source file, generate runs generators in the order they appear
-in the file, one at a time.
-</p>
-<p>
-If any generator returns an error exit status, &#34;go generate&#34; skips
-all further processing for that package.
-</p>
-<p>
-The generator is run in the package&#39;s source directory.
-</p>
-<p>
-Go generate accepts one specific flag:
-</p>
-<pre>-run=&#34;&#34;
- if non-empty, specifies a regular expression to select
- directives whose full original source text (excluding
- any trailing spaces and final newline) matches the
- expression.
-</pre>
-<p>
-It also accepts the standard build flags including -v, -n, and -x.
-The -v flag prints the names of packages and files as they are
-processed.
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-</p>
-<p>
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<h3 id="hdr-Download_and_install_packages_and_dependencies">Download and install packages and dependencies</h3>
-<p>
-Usage:
-</p>
-<pre>go get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
-</pre>
-<p>
-Get downloads the packages named by the import paths, along with their
-dependencies. It then installs the named packages, like &#39;go install&#39;.
-</p>
-<p>
-The -d flag instructs get to stop after downloading the packages; that is,
-it instructs get not to install the packages.
-</p>
-<p>
-The -f flag, valid only when -u is set, forces get -u not to verify that
-each package has been checked out from the source control repository
-implied by its import path. This can be useful if the source is a local fork
-of the original.
-</p>
-<p>
-The -fix flag instructs get to run the fix tool on the downloaded packages
-before resolving dependencies or building the code.
-</p>
-<p>
-The -insecure flag permits fetching from repositories and resolving
-custom domains using insecure schemes such as HTTP. Use with caution.
-</p>
-<p>
-The -t flag instructs get to also download the packages required to build
-the tests for the specified packages.
-</p>
-<p>
-The -u flag instructs get to use the network to update the named packages
-and their dependencies. By default, get uses the network to check out
-missing packages but does not use it to look for updates to existing packages.
-</p>
-<p>
-The -v flag enables verbose progress and debug output.
-</p>
-<p>
-Get also accepts build flags to control the installation. See &#39;go help build&#39;.
-</p>
-<p>
-When checking out a new package, get creates the target directory
-GOPATH/src/&lt;import-path&gt;. If the GOPATH contains multiple entries,
-get uses the first one. For more details see: &#39;go help gopath&#39;.
-</p>
-<p>
-When checking out or updating a package, get looks for a branch or tag
-that matches the locally installed version of Go. The most important
-rule is that if the local installation is running version &#34;go1&#34;, get
-searches for a branch or tag named &#34;go1&#34;. If no such version exists it
-retrieves the most recent version of the package.
-</p>
-<p>
-When go get checks out or updates a Git repository,
-it also updates any git submodules referenced by the repository.
-</p>
-<p>
-Get never checks out or updates code stored in vendor directories.
-</p>
-<p>
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-For more about how &#39;go get&#39; finds source code to
-download, see &#39;go help importpath&#39;.
-</p>
-<p>
-See also: go build, go install, go clean.
-</p>
-<h3 id="hdr-Compile_and_install_packages_and_dependencies">Compile and install packages and dependencies</h3>
-<p>
-Usage:
-</p>
-<pre>go install [build flags] [packages]
-</pre>
-<p>
-Install compiles and installs the packages named by the import paths,
-along with their dependencies.
-</p>
-<p>
-For more about the build flags, see &#39;go help build&#39;.
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-See also: go build, go get, go clean.
-</p>
-<h3 id="hdr-List_packages">List packages</h3>
-<p>
-Usage:
-</p>
-<pre>go list [-e] [-f format] [-json] [build flags] [packages]
-</pre>
-<p>
-List lists the packages named by the import paths, one per line.
-</p>
-<p>
-The default output shows the package import path:
-</p>
-<pre>bytes
-encoding/json
-github.com/gorilla/mux
-golang.org/x/net/html
-</pre>
-<p>
-The -f flag specifies an alternate format for the list, using the
-syntax of package template. The default output is equivalent to -f
-&#39;&#39;. The struct being passed to the template is:
-</p>
-<pre>type Package struct {
- Dir string // directory containing package sources
- ImportPath string // import path of package in dir
- ImportComment string // path in import comment on package statement
- Name string // package name
- Doc string // package documentation string
- Target string // install path
- Shlib string // the shared library that contains this package (only set when -linkshared)
- Goroot bool // is this package in the Go root?
- Standard bool // is this package part of the standard Go library?
- Stale bool // would &#39;go install&#39; do anything for this package?
- StaleReason string // explanation for Stale==true
- Root string // Go root or Go path dir containing this package
- ConflictDir string // this directory shadows Dir in $GOPATH
- BinaryOnly bool // binary-only package: cannot be recompiled from sources
-
- // Source files
- GoFiles []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)
- CgoFiles []string // .go sources files that import &#34;C&#34;
- IgnoredGoFiles []string // .go sources ignored due to build constraints
- CFiles []string // .c source files
- CXXFiles []string // .cc, .cxx and .cpp source files
- MFiles []string // .m source files
- HFiles []string // .h, .hh, .hpp and .hxx source files
- FFiles []string // .f, .F, .for and .f90 Fortran source files
- SFiles []string // .s source files
- SwigFiles []string // .swig files
- SwigCXXFiles []string // .swigcxx files
- SysoFiles []string // .syso object files to add to archive
- TestGoFiles []string // _test.go files in package
- XTestGoFiles []string // _test.go files outside package
-
- // Cgo directives
- CgoCFLAGS []string // cgo: flags for C compiler
- CgoCPPFLAGS []string // cgo: flags for C preprocessor
- CgoCXXFLAGS []string // cgo: flags for C++ compiler
- CgoFFLAGS []string // cgo: flags for Fortran compiler
- CgoLDFLAGS []string // cgo: flags for linker
- CgoPkgConfig []string // cgo: pkg-config names
-
- // Dependency information
- Imports []string // import paths used by this package
- Deps []string // all (recursively) imported dependencies
- TestImports []string // imports from TestGoFiles
- XTestImports []string // imports from XTestGoFiles
-
- // Error information
- Incomplete bool // this package or a dependency has an error
- Error *PackageError // error loading package
- DepsErrors []*PackageError // errors loading dependencies
-}
-</pre>
-<p>
-Packages stored in vendor directories report an ImportPath that includes the
-path to the vendor directory (for example, &#34;d/vendor/p&#34; instead of &#34;p&#34;),
-so that the ImportPath uniquely identifies a given copy of a package.
-The Imports, Deps, TestImports, and XTestImports lists also contain these
-expanded imports paths. See golang.org/s/go15vendor for more about vendoring.
-</p>
-<p>
-The error information, if any, is
-</p>
-<pre>type PackageError struct {
- ImportStack []string // shortest path from package named on command line to this one
- Pos string // position of error (if present, file:line:col)
- Err string // the error itself
-}
-</pre>
-<p>
-The template function &#34;join&#34; calls strings.Join.
-</p>
-<p>
-The template function &#34;context&#34; returns the build context, defined as:
-</p>
-<pre>type Context struct {
- GOARCH string // target architecture
- GOOS string // target operating system
- GOROOT string // Go root
- GOPATH string // Go path
- CgoEnabled bool // whether cgo can be used
- UseAllFiles bool // use files regardless of +build lines, file names
- Compiler string // compiler to assume when computing target paths
- BuildTags []string // build constraints to match in +build lines
- ReleaseTags []string // releases the current release is compatible with
- InstallSuffix string // suffix to use in the name of the install dir
-}
-</pre>
-<p>
-For more information about the meaning of these fields see the documentation
-for the go/build package&#39;s Context type.
-</p>
-<p>
-The -json flag causes the package data to be printed in JSON format
-instead of using the template format.
-</p>
-<p>
-The -e flag changes the handling of erroneous packages, those that
-cannot be found or are malformed. By default, the list command
-prints an error to standard error for each erroneous package and
-omits the packages from consideration during the usual printing.
-With the -e flag, the list command never prints errors to standard
-error and instead processes the erroneous packages with the usual
-printing. Erroneous packages will have a non-empty ImportPath and
-a non-nil Error field; other information may or may not be missing
-(zeroed).
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-</p>
-<p>
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<h3 id="hdr-Compile_and_run_Go_program">Compile and run Go program</h3>
-<p>
-Usage:
-</p>
-<pre>go run [build flags] [-exec xprog] gofiles... [arguments...]
-</pre>
-<p>
-Run compiles and runs the main package comprising the named Go source files.
-A Go source file is defined to be a file ending in a literal &#34;.go&#34; suffix.
-</p>
-<p>
-By default, &#39;go run&#39; runs the compiled binary directly: &#39;a.out arguments...&#39;.
-If the -exec flag is given, &#39;go run&#39; invokes the binary using xprog:
-</p>
-<pre>&#39;xprog a.out arguments...&#39;.
-</pre>
-<p>
-If the -exec flag is not given, GOOS or GOARCH is different from the system
-default, and a program named go_$GOOS_$GOARCH_exec can be found
-on the current search path, &#39;go run&#39; invokes the binary using that program,
-for example &#39;go_nacl_386_exec a.out arguments...&#39;. This allows execution of
-cross-compiled programs when a simulator or other execution method is
-available.
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-</p>
-<p>
-See also: go build.
-</p>
-<h3 id="hdr-Test_packages">Test packages</h3>
-<p>
-Usage:
-</p>
-<pre>go test [build/test flags] [packages] [build/test flags &amp; test binary flags]
-</pre>
-<p>
-&#39;Go test&#39; automates testing the packages named by the import paths.
-It prints a summary of the test results in the format:
-</p>
-<pre>ok archive/tar 0.011s
-FAIL archive/zip 0.022s
-ok compress/gzip 0.033s
-...
-</pre>
-<p>
-followed by detailed output for each failed package.
-</p>
-<p>
-&#39;Go test&#39; recompiles each package along with any files with names matching
-the file pattern &#34;*_test.go&#34;.
-Files whose names begin with &#34;_&#34; (including &#34;_test.go&#34;) or &#34;.&#34; are ignored.
-These additional files can contain test functions, benchmark functions, and
-example functions. See &#39;go help testfunc&#39; for more.
-Each listed package causes the execution of a separate test binary.
-</p>
-<p>
-Test files that declare a package with the suffix &#34;_test&#34; will be compiled as a
-separate package, and then linked and run with the main test binary.
-</p>
-<p>
-The go tool will ignore a directory named &#34;testdata&#34;, making it available
-to hold ancillary data needed by the tests.
-</p>
-<p>
-By default, go test needs no arguments. It compiles and tests the package
-with source in the current directory, including tests, and runs the tests.
-</p>
-<p>
-The package is built in a temporary directory so it does not interfere with the
-non-test installation.
-</p>
-<p>
-In addition to the build flags, the flags handled by &#39;go test&#39; itself are:
-</p>
-<pre>-args
- Pass the remainder of the command line (everything after -args)
- to the test binary, uninterpreted and unchanged.
- Because this flag consumes the remainder of the command line,
- the package list (if present) must appear before this flag.
-
--c
- Compile the test binary to pkg.test but do not run it
- (where pkg is the last element of the package&#39;s import path).
- The file name can be changed with the -o flag.
-
--exec xprog
- Run the test binary using xprog. The behavior is the same as
- in &#39;go run&#39;. See &#39;go help run&#39; for details.
-
--i
- Install packages that are dependencies of the test.
- Do not run the test.
-
--o file
- Compile the test binary to the named file.
- The test still runs (unless -c or -i is specified).
-</pre>
-<p>
-The test binary also accepts flags that control execution of the test; these
-flags are also accessible by &#39;go test&#39;. See &#39;go help testflag&#39; for details.
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-See also: go build, go vet.
-</p>
-<h3 id="hdr-Run_specified_go_tool">Run specified go tool</h3>
-<p>
-Usage:
-</p>
-<pre>go tool [-n] command [args...]
-</pre>
-<p>
-Tool runs the go tool command identified by the arguments.
-With no arguments it prints the list of known tools.
-</p>
-<p>
-The -n flag causes tool to print the command that would be
-executed but not execute it.
-</p>
-<p>
-For more about each tool command, see &#39;go tool command -h&#39;.
-</p>
-<h3 id="hdr-Print_Go_version">Print Go version</h3>
-<p>
-Usage:
-</p>
-<pre>go version
-</pre>
-<p>
-Version prints the Go version, as reported by runtime.Version.
-</p>
-<h3 id="hdr-Run_go_tool_vet_on_packages">Run go tool vet on packages</h3>
-<p>
-Usage:
-</p>
-<pre>go vet [-n] [-x] [build flags] [packages]
-</pre>
-<p>
-Vet runs the Go vet command on the packages named by the import paths.
-</p>
-<p>
-For more about vet, see &#39;go doc cmd/vet&#39;.
-For more about specifying packages, see &#39;go help packages&#39;.
-</p>
-<p>
-To run the vet tool with specific options, run &#39;go tool vet&#39;.
-</p>
-<p>
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-</p>
-<p>
-For more about build flags, see &#39;go help build&#39;.
-</p>
-<p>
-See also: go fmt, go fix.
-</p>
-<h3 id="hdr-Calling_between_Go_and_C">Calling between Go and C</h3>
-<p>
-There are two different ways to call between Go and C/C++ code.
-</p>
-<p>
-The first is the cgo tool, which is part of the Go distribution. For
-information on how to use it see the cgo documentation (go doc cmd/cgo).
-</p>
-<p>
-The second is the SWIG program, which is a general tool for
-interfacing between languages. For information on SWIG see
-<a href="http://swig.org/">http://swig.org/</a>. When running go build, any file with a .swig
-extension will be passed to SWIG. Any file with a .swigcxx extension
-will be passed to SWIG with the -c++ option.
-</p>
-<p>
-When either cgo or SWIG is used, go build will pass any .c, .m, .s,
-or .S files to the C compiler, and any .cc, .cpp, .cxx files to the C++
-compiler. The CC or CXX environment variables may be set to determine
-the C or C++ compiler, respectively, to use.
-</p>
-<h3 id="hdr-Description_of_build_modes">Description of build modes</h3>
-<p>
-The &#39;go build&#39; and &#39;go install&#39; commands take a -buildmode argument which
-indicates which kind of object file is to be built. Currently supported values
-are:
-</p>
-<pre>-buildmode=archive
- Build the listed non-main packages into .a files. Packages named
- main are ignored.
-
--buildmode=c-archive
- Build the listed main package, plus all packages it imports,
- into a C archive file. The only callable symbols will be those
- functions exported using a cgo //export comment. Requires
- exactly one main package to be listed.
-
--buildmode=c-shared
- Build the listed main packages, plus all packages that they
- import, into C shared libraries. The only callable symbols will
- be those functions exported using a cgo //export comment.
- Non-main packages are ignored.
-
--buildmode=default
- Listed main packages are built into executables and listed
- non-main packages are built into .a files (the default
- behavior).
-
--buildmode=shared
- Combine all the listed non-main packages into a single shared
- library that will be used when building with the -linkshared
- option. Packages named main are ignored.
-
--buildmode=exe
- Build the listed main packages and everything they import into
- executables. Packages not named main are ignored.
-
--buildmode=pie
- Build the listed main packages and everything they import into
- position independent executables (PIE). Packages not named
- main are ignored.
-
--buildmode=plugin
- Build the listed main packages, plus all packages that they
- import, into a Go plugin. Packages not named main are ignored.
-</pre>
-<h3 id="hdr-File_types">File types</h3>
-<p>
-The go command examines the contents of a restricted set of files
-in each directory. It identifies which files to examine based on
-the extension of the file name. These extensions are:
-</p>
-<pre>.go
- Go source files.
-.c, .h
- C source files.
- If the package uses cgo or SWIG, these will be compiled with the
- OS-native compiler (typically gcc); otherwise they will
- trigger an error.
-.cc, .cpp, .cxx, .hh, .hpp, .hxx
- C++ source files. Only useful with cgo or SWIG, and always
- compiled with the OS-native compiler.
-.m
- Objective-C source files. Only useful with cgo, and always
- compiled with the OS-native compiler.
-.s, .S
- Assembler source files.
- If the package uses cgo or SWIG, these will be assembled with the
- OS-native assembler (typically gcc (sic)); otherwise they
- will be assembled with the Go assembler.
-.swig, .swigcxx
- SWIG definition files.
-.syso
- System object files.
-</pre>
-<p>
-Files of each of these types except .syso may contain build
-constraints, but the go command stops scanning for build constraints
-at the first item in the file that is not a blank line or //-style
-line comment. See the go/build package documentation for
-more details.
-</p>
-<p>
-Non-test Go source files can also include a //go:binary-only-package
-comment, indicating that the package sources are included
-for documentation only and must not be used to build the
-package binary. This enables distribution of Go packages in
-their compiled form alone. See the go/build package documentation
-for more details.
-</p>
-<h3 id="hdr-GOPATH_environment_variable">GOPATH environment variable</h3>
-<p>
-The Go path is used to resolve import statements.
-It is implemented by and documented in the go/build package.
-</p>
-<p>
-The GOPATH environment variable lists places to look for Go code.
-On Unix, the value is a colon-separated string.
-On Windows, the value is a semicolon-separated string.
-On Plan 9, the value is a list.
-</p>
-<p>
-If the environment variable is unset, GOPATH defaults
-to a subdirectory named &#34;go&#34; in the user&#39;s home directory
-($HOME/go on Unix, %USERPROFILE%\go on Windows),
-unless that directory holds a Go distribution.
-Run &#34;go env GOPATH&#34; to see the current GOPATH.
-</p>
-<p>
-See <a href="https://golang.org/wiki/SettingGOPATH">https://golang.org/wiki/SettingGOPATH</a> to set a custom GOPATH.
-</p>
-<p>
-Each directory listed in GOPATH must have a prescribed structure:
-</p>
-<p>
-The src directory holds source code. The path below src
-determines the import path or executable name.
-</p>
-<p>
-The pkg directory holds installed package objects.
-As in the Go tree, each target operating system and
-architecture pair has its own subdirectory of pkg
-(pkg/GOOS_GOARCH).
-</p>
-<p>
-If DIR is a directory listed in the GOPATH, a package with
-source in DIR/src/foo/bar can be imported as &#34;foo/bar&#34; and
-has its compiled form installed to &#34;DIR/pkg/GOOS_GOARCH/foo/bar.a&#34;.
-</p>
-<p>
-The bin directory holds compiled commands.
-Each command is named for its source directory, but only
-the final element, not the entire path. That is, the
-command with source in DIR/src/foo/quux is installed into
-DIR/bin/quux, not DIR/bin/foo/quux. The &#34;foo/&#34; prefix is stripped
-so that you can add DIR/bin to your PATH to get at the
-installed commands. If the GOBIN environment variable is
-set, commands are installed to the directory it names instead
-of DIR/bin. GOBIN must be an absolute path.
-</p>
-<p>
-Here&#39;s an example directory layout:
-</p>
-<pre>GOPATH=/home/user/go
-
-/home/user/go/
- src/
- foo/
- bar/ (go code in package bar)
- x.go
- quux/ (go code in package main)
- y.go
- bin/
- quux (installed command)
- pkg/
- linux_amd64/
- foo/
- bar.a (installed package object)
-</pre>
-<p>
-Go searches each directory listed in GOPATH to find source code,
-but new packages are always downloaded into the first directory
-in the list.
-</p>
-<p>
-See <a href="https://golang.org/doc/code.html">https://golang.org/doc/code.html</a> for an example.
-</p>
-<h3 id="hdr-Internal_Directories">Internal Directories</h3>
-<p>
-Code in or below a directory named &#34;internal&#34; is importable only
-by code in the directory tree rooted at the parent of &#34;internal&#34;.
-Here&#39;s an extended version of the directory layout above:
-</p>
-<pre>/home/user/go/
- src/
- crash/
- bang/ (go code in package bang)
- b.go
- foo/ (go code in package foo)
- f.go
- bar/ (go code in package bar)
- x.go
- internal/
- baz/ (go code in package baz)
- z.go
- quux/ (go code in package main)
- y.go
-</pre>
-<p>
-The code in z.go is imported as &#34;foo/internal/baz&#34;, but that
-import statement can only appear in source files in the subtree
-rooted at foo. The source files foo/f.go, foo/bar/x.go, and
-foo/quux/y.go can all import &#34;foo/internal/baz&#34;, but the source file
-crash/bang/b.go cannot.
-</p>
-<p>
-See <a href="https://golang.org/s/go14internal">https://golang.org/s/go14internal</a> for details.
-</p>
-<h3 id="hdr-Vendor_Directories">Vendor Directories</h3>
-<p>
-Go 1.6 includes support for using local copies of external dependencies
-to satisfy imports of those dependencies, often referred to as vendoring.
-</p>
-<p>
-Code below a directory named &#34;vendor&#34; is importable only
-by code in the directory tree rooted at the parent of &#34;vendor&#34;,
-and only using an import path that omits the prefix up to and
-including the vendor element.
-</p>
-<p>
-Here&#39;s the example from the previous section,
-but with the &#34;internal&#34; directory renamed to &#34;vendor&#34;
-and a new foo/vendor/crash/bang directory added:
-</p>
-<pre>/home/user/go/
- src/
- crash/
- bang/ (go code in package bang)
- b.go
- foo/ (go code in package foo)
- f.go
- bar/ (go code in package bar)
- x.go
- vendor/
- crash/
- bang/ (go code in package bang)
- b.go
- baz/ (go code in package baz)
- z.go
- quux/ (go code in package main)
- y.go
-</pre>
-<p>
-The same visibility rules apply as for internal, but the code
-in z.go is imported as &#34;baz&#34;, not as &#34;foo/vendor/baz&#34;.
-</p>
-<p>
-Code in vendor directories deeper in the source tree shadows
-code in higher directories. Within the subtree rooted at foo, an import
-of &#34;crash/bang&#34; resolves to &#34;foo/vendor/crash/bang&#34;, not the
-top-level &#34;crash/bang&#34;.
-</p>
-<p>
-Code in vendor directories is not subject to import path
-checking (see &#39;go help importpath&#39;).
-</p>
-<p>
-When &#39;go get&#39; checks out or updates a git repository, it now also
-updates submodules.
-</p>
-<p>
-Vendor directories do not affect the placement of new repositories
-being checked out for the first time by &#39;go get&#39;: those are always
-placed in the main GOPATH, never in a vendor subtree.
-</p>
-<p>
-See <a href="https://golang.org/s/go15vendor">https://golang.org/s/go15vendor</a> for details.
-</p>
-<h3 id="hdr-Environment_variables">Environment variables</h3>
-<p>
-The go command, and the tools it invokes, examine a few different
-environment variables. For many of these, you can see the default
-value of on your system by running &#39;go env NAME&#39;, where NAME is the
-name of the variable.
-</p>
-<p>
-General-purpose environment variables:
-</p>
-<pre>GCCGO
- The gccgo command to run for &#39;go build -compiler=gccgo&#39;.
-GOARCH
- The architecture, or processor, for which to compile code.
- Examples are amd64, 386, arm, ppc64.
-GOBIN
- The directory where &#39;go install&#39; will install a command.
-GOOS
- The operating system for which to compile code.
- Examples are linux, darwin, windows, netbsd.
-GOPATH
- For more details see: &#39;go help gopath&#39;.
-GORACE
- Options for the race detector.
- See <a href="https://golang.org/doc/articles/race_detector.html">https://golang.org/doc/articles/race_detector.html</a>.
-GOROOT
- The root of the go tree.
-</pre>
-<p>
-Environment variables for use with cgo:
-</p>
-<pre>CC
- The command to use to compile C code.
-CGO_ENABLED
- Whether the cgo command is supported. Either 0 or 1.
-CGO_CFLAGS
- Flags that cgo will pass to the compiler when compiling
- C code.
-CGO_CPPFLAGS
- Flags that cgo will pass to the compiler when compiling
- C or C++ code.
-CGO_CXXFLAGS
- Flags that cgo will pass to the compiler when compiling
- C++ code.
-CGO_FFLAGS
- Flags that cgo will pass to the compiler when compiling
- Fortran code.
-CGO_LDFLAGS
- Flags that cgo will pass to the compiler when linking.
-CXX
- The command to use to compile C++ code.
-PKG_CONFIG
- Path to pkg-config tool.
-</pre>
-<p>
-Architecture-specific environment variables:
-</p>
-<pre>GOARM
- For GOARCH=arm, the ARM architecture for which to compile.
- Valid values are 5, 6, 7.
-GO386
- For GOARCH=386, the floating point instruction set.
- Valid values are 387, sse2.
-</pre>
-<p>
-Special-purpose environment variables:
-</p>
-<pre>GOROOT_FINAL
- The root of the installed Go tree, when it is
- installed in a location other than where it is built.
- File names in stack traces are rewritten from GOROOT to
- GOROOT_FINAL.
-GO_EXTLINK_ENABLED
- Whether the linker should use external linking mode
- when using -linkmode=auto with code that uses cgo.
- Set to 0 to disable external linking mode, 1 to enable it.
-GIT_ALLOW_PROTOCOL
- Defined by Git. A colon-separated list of schemes that are allowed to be used
- with git fetch/clone. If set, any scheme not explicitly mentioned will be
- considered insecure by &#39;go get&#39;.
-</pre>
-<h3 id="hdr-Import_path_syntax">Import path syntax</h3>
-<p>
-An import path (see &#39;go help packages&#39;) denotes a package stored in the local
-file system. In general, an import path denotes either a standard package (such
-as &#34;unicode/utf8&#34;) or a package found in one of the work spaces (For more
-details see: &#39;go help gopath&#39;).
-</p>
-<h3 id="hdr-Relative_import_paths">Relative import paths</h3>
-<p>
-An import path beginning with ./ or ../ is called a relative path.
-The toolchain supports relative import paths as a shortcut in two ways.
-</p>
-<p>
-First, a relative path can be used as a shorthand on the command line.
-If you are working in the directory containing the code imported as
-&#34;unicode&#34; and want to run the tests for &#34;unicode/utf8&#34;, you can type
-&#34;go test ./utf8&#34; instead of needing to specify the full path.
-Similarly, in the reverse situation, &#34;go test ..&#34; will test &#34;unicode&#34; from
-the &#34;unicode/utf8&#34; directory. Relative patterns are also allowed, like
-&#34;go test ./...&#34; to test all subdirectories. See &#39;go help packages&#39; for details
-on the pattern syntax.
-</p>
-<p>
-Second, if you are compiling a Go program not in a work space,
-you can use a relative path in an import statement in that program
-to refer to nearby code also not in a work space.
-This makes it easy to experiment with small multipackage programs
-outside of the usual work spaces, but such programs cannot be
-installed with &#34;go install&#34; (there is no work space in which to install them),
-so they are rebuilt from scratch each time they are built.
-To avoid ambiguity, Go programs cannot use relative import paths
-within a work space.
-</p>
-<h3 id="hdr-Remote_import_paths">Remote import paths</h3>
-<p>
-Certain import paths also
-describe how to obtain the source code for the package using
-a revision control system.
-</p>
-<p>
-A few common code hosting sites have special syntax:
-</p>
-<pre>Bitbucket (Git, Mercurial)
-
- import &#34;bitbucket.org/user/project&#34;
- import &#34;bitbucket.org/user/project/sub/directory&#34;
-
-GitHub (Git)
-
- import &#34;github.com/user/project&#34;
- import &#34;github.com/user/project/sub/directory&#34;
-
-Launchpad (Bazaar)
-
- import &#34;launchpad.net/project&#34;
- import &#34;launchpad.net/project/series&#34;
- import &#34;launchpad.net/project/series/sub/directory&#34;
-
- import &#34;launchpad.net/~user/project/branch&#34;
- import &#34;launchpad.net/~user/project/branch/sub/directory&#34;
-
-IBM DevOps Services (Git)
-
- import &#34;hub.jazz.net/git/user/project&#34;
- import &#34;hub.jazz.net/git/user/project/sub/directory&#34;
-</pre>
-<p>
-For code hosted on other servers, import paths may either be qualified
-with the version control type, or the go tool can dynamically fetch
-the import path over https/http and discover where the code resides
-from a &lt;meta&gt; tag in the HTML.
-</p>
-<p>
-To declare the code location, an import path of the form
-</p>
-<pre>repository.vcs/path
-</pre>
-<p>
-specifies the given repository, with or without the .vcs suffix,
-using the named version control system, and then the path inside
-that repository. The supported version control systems are:
-</p>
-<pre>Bazaar .bzr
-Git .git
-Mercurial .hg
-Subversion .svn
-</pre>
-<p>
-For example,
-</p>
-<pre>import &#34;example.org/user/foo.hg&#34;
-</pre>
-<p>
-denotes the root directory of the Mercurial repository at
-example.org/user/foo or foo.hg, and
-</p>
-<pre>import &#34;example.org/repo.git/foo/bar&#34;
-</pre>
-<p>
-denotes the foo/bar directory of the Git repository at
-example.org/repo or repo.git.
-</p>
-<p>
-When a version control system supports multiple protocols,
-each is tried in turn when downloading. For example, a Git
-download tries https://, then git+ssh://.
-</p>
-<p>
-By default, downloads are restricted to known secure protocols
-(e.g. https, ssh). To override this setting for Git downloads, the
-GIT_ALLOW_PROTOCOL environment variable can be set (For more details see:
-&#39;go help environment&#39;).
-</p>
-<p>
-If the import path is not a known code hosting site and also lacks a
-version control qualifier, the go tool attempts to fetch the import
-over https/http and looks for a &lt;meta&gt; tag in the document&#39;s HTML
-&lt;head&gt;.
-</p>
-<p>
-The meta tag has the form:
-</p>
-<pre>&lt;meta name=&#34;go-import&#34; content=&#34;import-prefix vcs repo-root&#34;&gt;
-</pre>
-<p>
-The import-prefix is the import path corresponding to the repository
-root. It must be a prefix or an exact match of the package being
-fetched with &#34;go get&#34;. If it&#39;s not an exact match, another http
-request is made at the prefix to verify the &lt;meta&gt; tags match.
-</p>
-<p>
-The meta tag should appear as early in the file as possible.
-In particular, it should appear before any raw JavaScript or CSS,
-to avoid confusing the go command&#39;s restricted parser.
-</p>
-<p>
-The vcs is one of &#34;git&#34;, &#34;hg&#34;, &#34;svn&#34;, etc,
-</p>
-<p>
-The repo-root is the root of the version control system
-containing a scheme and not containing a .vcs qualifier.
-</p>
-<p>
-For example,
-</p>
-<pre>import &#34;example.org/pkg/foo&#34;
-</pre>
-<p>
-will result in the following requests:
-</p>
-<pre><a href="https://example.org/pkg/foo?go-get=1">https://example.org/pkg/foo?go-get=1</a> (preferred)
-<a href="http://example.org/pkg/foo?go-get=1">http://example.org/pkg/foo?go-get=1</a> (fallback, only with -insecure)
-</pre>
-<p>
-If that page contains the meta tag
-</p>
-<pre>&lt;meta name=&#34;go-import&#34; content=&#34;example.org git <a href="https://code.org/r/p/exproj">https://code.org/r/p/exproj</a>&#34;&gt;
-</pre>
-<p>
-the go tool will verify that <a href="https://example.org/?go-get=1">https://example.org/?go-get=1</a> contains the
-same meta tag and then git clone <a href="https://code.org/r/p/exproj">https://code.org/r/p/exproj</a> into
-GOPATH/src/example.org.
-</p>
-<p>
-New downloaded packages are written to the first directory listed in the GOPATH
-environment variable (For more details see: &#39;go help gopath&#39;).
-</p>
-<p>
-The go command attempts to download the version of the
-package appropriate for the Go release being used.
-Run &#39;go help get&#39; for more.
-</p>
-<h3 id="hdr-Import_path_checking">Import path checking</h3>
-<p>
-When the custom import path feature described above redirects to a
-known code hosting site, each of the resulting packages has two possible
-import paths, using the custom domain or the known hosting site.
-</p>
-<p>
-A package statement is said to have an &#34;import comment&#34; if it is immediately
-followed (before the next newline) by a comment of one of these two forms:
-</p>
-<pre>package math // import &#34;path&#34;
-package math /* import &#34;path&#34; */
-</pre>
-<p>
-The go command will refuse to install a package with an import comment
-unless it is being referred to by that import path. In this way, import comments
-let package authors make sure the custom import path is used and not a
-direct path to the underlying code hosting site.
-</p>
-<p>
-Import path checking is disabled for code found within vendor trees.
-This makes it possible to copy code into alternate locations in vendor trees
-without needing to update import comments.
-</p>
-<p>
-See <a href="https://golang.org/s/go14customimport">https://golang.org/s/go14customimport</a> for details.
-</p>
-<h3 id="hdr-Description_of_package_lists">Description of package lists</h3>
-<p>
-Many commands apply to a set of packages:
-</p>
-<pre>go action [packages]
-</pre>
-<p>
-Usually, [packages] is a list of import paths.
-</p>
-<p>
-An import path that is a rooted path or that begins with
-a . or .. element is interpreted as a file system path and
-denotes the package in that directory.
-</p>
-<p>
-Otherwise, the import path P denotes the package found in
-the directory DIR/src/P for some DIR listed in the GOPATH
-environment variable (For more details see: &#39;go help gopath&#39;).
-</p>
-<p>
-If no import paths are given, the action applies to the
-package in the current directory.
-</p>
-<p>
-There are four reserved names for paths that should not be used
-for packages to be built with the go tool:
-</p>
-<p>
-- &#34;main&#34; denotes the top-level package in a stand-alone executable.
-</p>
-<p>
-- &#34;all&#34; expands to all package directories found in all the GOPATH
-trees. For example, &#39;go list all&#39; lists all the packages on the local
-system.
-</p>
-<p>
-- &#34;std&#34; is like all but expands to just the packages in the standard
-Go library.
-</p>
-<p>
-- &#34;cmd&#34; expands to the Go repository&#39;s commands and their
-internal libraries.
-</p>
-<p>
-Import paths beginning with &#34;cmd/&#34; only match source code in
-the Go repository.
-</p>
-<p>
-An import path is a pattern if it includes one or more &#34;...&#34; wildcards,
-each of which can match any string, including the empty string and
-strings containing slashes. Such a pattern expands to all package
-directories found in the GOPATH trees with names matching the
-patterns. As a special case, x/... matches x as well as x&#39;s subdirectories.
-For example, net/... expands to net and packages in its subdirectories.
-</p>
-<p>
-An import path can also name a package to be downloaded from
-a remote repository. Run &#39;go help importpath&#39; for details.
-</p>
-<p>
-Every package in a program must have a unique import path.
-By convention, this is arranged by starting each path with a
-unique prefix that belongs to you. For example, paths used
-internally at Google all begin with &#39;google&#39;, and paths
-denoting remote repositories begin with the path to the code,
-such as &#39;github.com/user/repo&#39;.
-</p>
-<p>
-Packages in a program need not have unique package names,
-but there are two reserved package names with special meaning.
-The name main indicates a command, not a library.
-Commands are built into binaries and cannot be imported.
-The name documentation indicates documentation for
-a non-Go program in the directory. Files in package documentation
-are ignored by the go command.
-</p>
-<p>
-As a special case, if the package list is a list of .go files from a
-single directory, the command is applied to a single synthesized
-package made up of exactly those files, ignoring any build constraints
-in those files and ignoring any other files in the directory.
-</p>
-<p>
-Directory and file names that begin with &#34;.&#34; or &#34;_&#34; are ignored
-by the go tool, as are directories named &#34;testdata&#34;.
-</p>
-<h3 id="hdr-Description_of_testing_flags">Description of testing flags</h3>
-<p>
-The &#39;go test&#39; command takes both flags that apply to &#39;go test&#39; itself
-and flags that apply to the resulting test binary.
-</p>
-<p>
-Several of the flags control profiling and write an execution profile
-suitable for &#34;go tool pprof&#34;; run &#34;go tool pprof -h&#34; for more
-information. The --alloc_space, --alloc_objects, and --show_bytes
-options of pprof control how the information is presented.
-</p>
-<p>
-The following flags are recognized by the &#39;go test&#39; command and
-control the execution of any test:
-</p>
-<pre>-bench regexp
- Run (sub)benchmarks matching a regular expression.
- The given regular expression is split into smaller ones by
- top-level &#39;/&#39;, where each must match the corresponding part of a
- benchmark&#39;s identifier.
- By default, no benchmarks run. To run all benchmarks,
- use &#39;-bench .&#39; or &#39;-bench=.&#39;.
-
--benchtime t
- Run enough iterations of each benchmark to take t, specified
- as a time.Duration (for example, -benchtime 1h30s).
- The default is 1 second (1s).
-
--count n
- Run each test and benchmark n times (default 1).
- If -cpu is set, run n times for each GOMAXPROCS value.
- Examples are always run once.
-
--cover
- Enable coverage analysis.
-
--covermode set,count,atomic
- Set the mode for coverage analysis for the package[s]
- being tested. The default is &#34;set&#34; unless -race is enabled,
- in which case it is &#34;atomic&#34;.
- The values:
- set: bool: does this statement run?
- count: int: how many times does this statement run?
- atomic: int: count, but correct in multithreaded tests;
- significantly more expensive.
- Sets -cover.
-
--coverpkg pkg1,pkg2,pkg3
- Apply coverage analysis in each test to the given list of packages.
- The default is for each test to analyze only the package being tested.
- Packages are specified as import paths.
- Sets -cover.
-
--cpu 1,2,4
- Specify a list of GOMAXPROCS values for which the tests or
- benchmarks should be executed. The default is the current value
- of GOMAXPROCS.
-
--parallel n
- Allow parallel execution of test functions that call t.Parallel.
- The value of this flag is the maximum number of tests to run
- simultaneously; by default, it is set to the value of GOMAXPROCS.
- Note that -parallel only applies within a single test binary.
- The &#39;go test&#39; command may run tests for different packages
- in parallel as well, according to the setting of the -p flag
- (see &#39;go help build&#39;).
-
--run regexp
- Run only those tests and examples matching the regular expression.
- For tests the regular expression is split into smaller ones by
- top-level &#39;/&#39;, where each must match the corresponding part of a
- test&#39;s identifier.
-
--short
- Tell long-running tests to shorten their run time.
- It is off by default but set during all.bash so that installing
- the Go tree can run a sanity check but not spend time running
- exhaustive tests.
-
--timeout t
- If a test runs longer than t, panic.
- The default is 10 minutes (10m).
-
--v
- Verbose output: log all tests as they are run. Also print all
- text from Log and Logf calls even if the test succeeds.
-</pre>
-<p>
-The following flags are also recognized by &#39;go test&#39; and can be used to
-profile the tests during execution:
-</p>
-<pre>-benchmem
- Print memory allocation statistics for benchmarks.
-
--blockprofile block.out
- Write a goroutine blocking profile to the specified file
- when all tests are complete.
- Writes test binary as -c would.
-
--blockprofilerate n
- Control the detail provided in goroutine blocking profiles by
- calling runtime.SetBlockProfileRate with n.
- See &#39;go doc runtime.SetBlockProfileRate&#39;.
- The profiler aims to sample, on average, one blocking event every
- n nanoseconds the program spends blocked. By default,
- if -test.blockprofile is set without this flag, all blocking events
- are recorded, equivalent to -test.blockprofilerate=1.
-
--coverprofile cover.out
- Write a coverage profile to the file after all tests have passed.
- Sets -cover.
-
--cpuprofile cpu.out
- Write a CPU profile to the specified file before exiting.
- Writes test binary as -c would.
-
--memprofile mem.out
- Write a memory profile to the file after all tests have passed.
- Writes test binary as -c would.
-
--memprofilerate n
- Enable more precise (and expensive) memory profiles by setting
- runtime.MemProfileRate. See &#39;go doc runtime.MemProfileRate&#39;.
- To profile all memory allocations, use -test.memprofilerate=1
- and pass --alloc_space flag to the pprof tool.
-
--mutexprofile mutex.out
- Write a mutex contention profile to the specified file
- when all tests are complete.
- Writes test binary as -c would.
-
--mutexprofilefraction n
- Sample 1 in n stack traces of goroutines holding a
- contended mutex.
-
--outputdir directory
- Place output files from profiling in the specified directory,
- by default the directory in which &#34;go test&#34; is running.
-
--trace trace.out
- Write an execution trace to the specified file before exiting.
-</pre>
-<p>
-Each of these flags is also recognized with an optional &#39;test.&#39; prefix,
-as in -test.v. When invoking the generated test binary (the result of
-&#39;go test -c&#39;) directly, however, the prefix is mandatory.
-</p>
-<p>
-The &#39;go test&#39; command rewrites or removes recognized flags,
-as appropriate, both before and after the optional package list,
-before invoking the test binary.
-</p>
-<p>
-For instance, the command
-</p>
-<pre>go test -v -myflag testdata -cpuprofile=prof.out -x
-</pre>
-<p>
-will compile the test binary and then run it as
-</p>
-<pre>pkg.test -test.v -myflag testdata -test.cpuprofile=prof.out
-</pre>
-<p>
-(The -x flag is removed because it applies only to the go command&#39;s
-execution, not to the test itself.)
-</p>
-<p>
-The test flags that generate profiles (other than for coverage) also
-leave the test binary in pkg.test for use when analyzing the profiles.
-</p>
-<p>
-When &#39;go test&#39; runs a test binary, it does so from within the
-corresponding package&#39;s source code directory. Depending on the test,
-it may be necessary to do the same when invoking a generated test
-binary directly.
-</p>
-<p>
-The command-line package list, if present, must appear before any
-flag not known to the go test command. Continuing the example above,
-the package list would have to appear before -myflag, but could appear
-on either side of -v.
-</p>
-<p>
-To keep an argument for a test binary from being interpreted as a
-known flag or a package name, use -args (see &#39;go help test&#39;) which
-passes the remainder of the command line through to the test binary
-uninterpreted and unaltered.
-</p>
-<p>
-For instance, the command
-</p>
-<pre>go test -v -args -x -v
-</pre>
-<p>
-will compile the test binary and then run it as
-</p>
-<pre>pkg.test -test.v -x -v
-</pre>
-<p>
-Similarly,
-</p>
-<pre>go test -args math
-</pre>
-<p>
-will compile the test binary and then run it as
-</p>
-<pre>pkg.test math
-</pre>
-<p>
-In the first example, the -x and the second -v are passed through to the
-test binary unchanged and with no effect on the go command itself.
-In the second example, the argument math is passed through to the test
-binary, instead of being interpreted as the package list.
-</p>
-<h3 id="hdr-Description_of_testing_functions">Description of testing functions</h3>
-<p>
-The &#39;go test&#39; command expects to find test, benchmark, and example functions
-in the &#34;*_test.go&#34; files corresponding to the package under test.
-</p>
-<p>
-A test function is one named TestXXX (where XXX is any alphanumeric string
-not starting with a lower case letter) and should have the signature,
-</p>
-<pre>func TestXXX(t *testing.T) { ... }
-</pre>
-<p>
-A benchmark function is one named BenchmarkXXX and should have the signature,
-</p>
-<pre>func BenchmarkXXX(b *testing.B) { ... }
-</pre>
-<p>
-An example function is similar to a test function but, instead of using
-*testing.T to report success or failure, prints output to os.Stdout.
-If the last comment in the function starts with &#34;Output:&#34; then the output
-is compared exactly against the comment (see examples below). If the last
-comment begins with &#34;Unordered output:&#34; then the output is compared to the
-comment, however the order of the lines is ignored. An example with no such
-comment is compiled but not executed. An example with no text after
-&#34;Output:&#34; is compiled, executed, and expected to produce no output.
-</p>
-<p>
-Godoc displays the body of ExampleXXX to demonstrate the use
-of the function, constant, or variable XXX. An example of a method M with
-receiver type T or *T is named ExampleT_M. There may be multiple examples
-for a given function, constant, or variable, distinguished by a trailing _xxx,
-where xxx is a suffix not beginning with an upper case letter.
-</p>
-<p>
-Here is an example of an example:
-</p>
-<pre>func ExamplePrintln() {
- Println(&#34;The output of\nthis example.&#34;)
- // Output: The output of
- // this example.
-}
-</pre>
-<p>
-Here is another example where the ordering of the output is ignored:
-</p>
-<pre>func ExamplePerm() {
- for _, value := range Perm(4) {
- fmt.Println(value)
- }
-
- // Unordered output: 4
- // 2
- // 1
- // 3
- // 0
-}
-</pre>
-<p>
-The entire test file is presented as the example when it contains a single
-example function, at least one other function, type, variable, or constant
-declaration, and no test or benchmark functions.
-</p>
-<p>
-See the documentation of the testing package for more information.
-</p>
-
-<div id="footer">
-Build version go1.8.<br>
-Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
-the content of this page is licensed under the
-Creative Commons Attribution 3.0 License,
-and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
-<a href="/doc/tos.html">Terms of Service</a> |
-<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
-</div>
-
-</div><!-- .container -->
-</div><!-- #page -->
-
-<!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
-<script type="text/javascript" src="/serverpush/static/jquery.min.js?{{.CacheBust}}"></script>
-<script type="text/javascript" src="/serverpush/static/playground.js?{{.CacheBust}}"></script>
-<script>var goVersion = "go1.8";</script>
-<script type="text/javascript" src="/serverpush/static/godocs.js?{{.CacheBust}}"></script>
-</body>
-</html>
-`))
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/README.md b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/README.md
deleted file mode 100644
index fb5c5efb0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# h2i
-
-**h2i** is an interactive HTTP/2 ("h2") console debugger. Miss the good ol'
-days of telnetting to your HTTP/1.n servers? We're bringing you
-back.
-
-Features:
-- send raw HTTP/2 frames
- - PING
- - SETTINGS
- - HEADERS
- - etc
-- type in HTTP/1.n and have it auto-HPACK/frame-ify it for HTTP/2
-- pretty print all received HTTP/2 frames from the peer (including HPACK decoding)
-- tab completion of commands, options
-
-Not yet features, but soon:
-- unnecessary CONTINUATION frames on short boundaries, to test peer implementations
-- request bodies (DATA frames)
-- send invalid frames for testing server implementations (supported by underlying Framer)
-
-Later:
-- act like a server
-
-## Installation
-
-```
-$ go get golang.org/x/net/http2/h2i
-$ h2i <host>
-```
-
-## Demo
-
-```
-$ h2i
-Usage: h2i <hostname>
-
- -insecure
- Whether to skip TLS cert validation
- -nextproto string
- Comma-separated list of NPN/ALPN protocol names to negotiate. (default "h2,h2-14")
-
-$ h2i google.com
-Connecting to google.com:443 ...
-Connected to 74.125.224.41:443
-Negotiated protocol "h2-14"
-[FrameHeader SETTINGS len=18]
- [MAX_CONCURRENT_STREAMS = 100]
- [INITIAL_WINDOW_SIZE = 1048576]
- [MAX_FRAME_SIZE = 16384]
-[FrameHeader WINDOW_UPDATE len=4]
- Window-Increment = 983041
-
-h2i> PING h2iSayHI
-[FrameHeader PING flags=ACK len=8]
- Data = "h2iSayHI"
-h2i> headers
-(as HTTP/1.1)> GET / HTTP/1.1
-(as HTTP/1.1)> Host: ip.appspot.com
-(as HTTP/1.1)> User-Agent: h2i/brad-n-blake
-(as HTTP/1.1)>
-Opening Stream-ID 1:
- :authority = ip.appspot.com
- :method = GET
- :path = /
- :scheme = https
- user-agent = h2i/brad-n-blake
-[FrameHeader HEADERS flags=END_HEADERS stream=1 len=77]
- :status = "200"
- alternate-protocol = "443:quic,p=1"
- content-length = "15"
- content-type = "text/html"
- date = "Fri, 01 May 2015 23:06:56 GMT"
- server = "Google Frontend"
-[FrameHeader DATA flags=END_STREAM stream=1 len=15]
- "173.164.155.78\n"
-[FrameHeader PING len=8]
- Data = "\x00\x00\x00\x00\x00\x00\x00\x00"
-h2i> ping
-[FrameHeader PING flags=ACK len=8]
- Data = "h2i_ping"
-h2i> ping
-[FrameHeader PING flags=ACK len=8]
- Data = "h2i_ping"
-h2i> ping
-[FrameHeader GOAWAY len=22]
- Last-Stream-ID = 1; Error-Code = PROTOCOL_ERROR (1)
-
-ReadFrame: EOF
-```
-
-## Status
-
-Quick few hour hack. So much yet to do. Feel free to file issues for
-bugs or wishlist items, but [@bmizerany](https://github.com/bmizerany/)
-and I aren't yet accepting pull requests until things settle down.
-
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/h2i.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/h2i.go
deleted file mode 100644
index 62e57527c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/h2i/h2i.go
+++ /dev/null
@@ -1,522 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !plan9,!solaris
-
-/*
-The h2i command is an interactive HTTP/2 console.
-
-Usage:
- $ h2i [flags] <hostname>
-
-Interactive commands in the console: (all parts case-insensitive)
-
- ping [data]
- settings ack
- settings FOO=n BAR=z
- headers (open a new stream by typing HTTP/1.1)
-*/
-package main
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "errors"
- "flag"
- "fmt"
- "io"
- "log"
- "net"
- "net/http"
- "os"
- "regexp"
- "strconv"
- "strings"
-
- "golang.org/x/crypto/ssh/terminal"
- "golang.org/x/net/http2"
- "golang.org/x/net/http2/hpack"
-)
-
-// Flags
-var (
- flagNextProto = flag.String("nextproto", "h2,h2-14", "Comma-separated list of NPN/ALPN protocol names to negotiate.")
- flagInsecure = flag.Bool("insecure", false, "Whether to skip TLS cert validation")
- flagSettings = flag.String("settings", "empty", "comma-separated list of KEY=value settings for the initial SETTINGS frame. The magic value 'empty' sends an empty initial settings frame, and the magic value 'omit' causes no initial settings frame to be sent.")
- flagDial = flag.String("dial", "", "optional ip:port to dial, to connect to a host:port but use a different SNI name (including a SNI name without DNS)")
-)
-
-type command struct {
- run func(*h2i, []string) error // required
-
- // complete optionally specifies tokens (case-insensitive) which are
- // valid for this subcommand.
- complete func() []string
-}
-
-var commands = map[string]command{
- "ping": {run: (*h2i).cmdPing},
- "settings": {
- run: (*h2i).cmdSettings,
- complete: func() []string {
- return []string{
- "ACK",
- http2.SettingHeaderTableSize.String(),
- http2.SettingEnablePush.String(),
- http2.SettingMaxConcurrentStreams.String(),
- http2.SettingInitialWindowSize.String(),
- http2.SettingMaxFrameSize.String(),
- http2.SettingMaxHeaderListSize.String(),
- }
- },
- },
- "quit": {run: (*h2i).cmdQuit},
- "headers": {run: (*h2i).cmdHeaders},
-}
-
-func usage() {
- fmt.Fprintf(os.Stderr, "Usage: h2i <hostname>\n\n")
- flag.PrintDefaults()
-}
-
-// withPort adds ":443" if another port isn't already present.
-func withPort(host string) string {
- if _, _, err := net.SplitHostPort(host); err != nil {
- return net.JoinHostPort(host, "443")
- }
- return host
-}
-
-// withoutPort strips the port from addr if present.
-func withoutPort(addr string) string {
- if h, _, err := net.SplitHostPort(addr); err == nil {
- return h
- }
- return addr
-}
-
-// h2i is the app's state.
-type h2i struct {
- host string
- tc *tls.Conn
- framer *http2.Framer
- term *terminal.Terminal
-
- // owned by the command loop:
- streamID uint32
- hbuf bytes.Buffer
- henc *hpack.Encoder
-
- // owned by the readFrames loop:
- peerSetting map[http2.SettingID]uint32
- hdec *hpack.Decoder
-}
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- if flag.NArg() != 1 {
- usage()
- os.Exit(2)
- }
- log.SetFlags(0)
-
- host := flag.Arg(0)
- app := &h2i{
- host: host,
- peerSetting: make(map[http2.SettingID]uint32),
- }
- app.henc = hpack.NewEncoder(&app.hbuf)
-
- if err := app.Main(); err != nil {
- if app.term != nil {
- app.logf("%v\n", err)
- } else {
- fmt.Fprintf(os.Stderr, "%v\n", err)
- }
- os.Exit(1)
- }
- fmt.Fprintf(os.Stdout, "\n")
-}
-
-func (app *h2i) Main() error {
- cfg := &tls.Config{
- ServerName: withoutPort(app.host),
- NextProtos: strings.Split(*flagNextProto, ","),
- InsecureSkipVerify: *flagInsecure,
- }
-
- hostAndPort := *flagDial
- if hostAndPort == "" {
- hostAndPort = withPort(app.host)
- }
- log.Printf("Connecting to %s ...", hostAndPort)
- tc, err := tls.Dial("tcp", hostAndPort, cfg)
- if err != nil {
- return fmt.Errorf("Error dialing %s: %v", hostAndPort, err)
- }
- log.Printf("Connected to %v", tc.RemoteAddr())
- defer tc.Close()
-
- if err := tc.Handshake(); err != nil {
- return fmt.Errorf("TLS handshake: %v", err)
- }
- if !*flagInsecure {
- if err := tc.VerifyHostname(app.host); err != nil {
- return fmt.Errorf("VerifyHostname: %v", err)
- }
- }
- state := tc.ConnectionState()
- log.Printf("Negotiated protocol %q", state.NegotiatedProtocol)
- if !state.NegotiatedProtocolIsMutual || state.NegotiatedProtocol == "" {
- return fmt.Errorf("Could not negotiate protocol mutually")
- }
-
- if _, err := io.WriteString(tc, http2.ClientPreface); err != nil {
- return err
- }
-
- app.framer = http2.NewFramer(tc, tc)
-
- oldState, err := terminal.MakeRaw(int(os.Stdin.Fd()))
- if err != nil {
- return err
- }
- defer terminal.Restore(0, oldState)
-
- var screen = struct {
- io.Reader
- io.Writer
- }{os.Stdin, os.Stdout}
-
- app.term = terminal.NewTerminal(screen, "h2i> ")
- lastWord := regexp.MustCompile(`.+\W(\w+)$`)
- app.term.AutoCompleteCallback = func(line string, pos int, key rune) (newLine string, newPos int, ok bool) {
- if key != '\t' {
- return
- }
- if pos != len(line) {
- // TODO: we're being lazy for now, only supporting tab completion at the end.
- return
- }
- // Auto-complete for the command itself.
- if !strings.Contains(line, " ") {
- var name string
- name, _, ok = lookupCommand(line)
- if !ok {
- return
- }
- return name, len(name), true
- }
- _, c, ok := lookupCommand(line[:strings.IndexByte(line, ' ')])
- if !ok || c.complete == nil {
- return
- }
- if strings.HasSuffix(line, " ") {
- app.logf("%s", strings.Join(c.complete(), " "))
- return line, pos, true
- }
- m := lastWord.FindStringSubmatch(line)
- if m == nil {
- return line, len(line), true
- }
- soFar := m[1]
- var match []string
- for _, cand := range c.complete() {
- if len(soFar) > len(cand) || !strings.EqualFold(cand[:len(soFar)], soFar) {
- continue
- }
- match = append(match, cand)
- }
- if len(match) == 0 {
- return
- }
- if len(match) > 1 {
- // TODO: auto-complete any common prefix
- app.logf("%s", strings.Join(match, " "))
- return line, pos, true
- }
- newLine = line[:len(line)-len(soFar)] + match[0]
- return newLine, len(newLine), true
-
- }
-
- errc := make(chan error, 2)
- go func() { errc <- app.readFrames() }()
- go func() { errc <- app.readConsole() }()
- return <-errc
-}
-
-func (app *h2i) logf(format string, args ...interface{}) {
- fmt.Fprintf(app.term, format+"\r\n", args...)
-}
-
-func (app *h2i) readConsole() error {
- if s := *flagSettings; s != "omit" {
- var args []string
- if s != "empty" {
- args = strings.Split(s, ",")
- }
- _, c, ok := lookupCommand("settings")
- if !ok {
- panic("settings command not found")
- }
- c.run(app, args)
- }
-
- for {
- line, err := app.term.ReadLine()
- if err == io.EOF {
- return nil
- }
- if err != nil {
- return fmt.Errorf("terminal.ReadLine: %v", err)
- }
- f := strings.Fields(line)
- if len(f) == 0 {
- continue
- }
- cmd, args := f[0], f[1:]
- if _, c, ok := lookupCommand(cmd); ok {
- err = c.run(app, args)
- } else {
- app.logf("Unknown command %q", line)
- }
- if err == errExitApp {
- return nil
- }
- if err != nil {
- return err
- }
- }
-}
-
-func lookupCommand(prefix string) (name string, c command, ok bool) {
- prefix = strings.ToLower(prefix)
- if c, ok = commands[prefix]; ok {
- return prefix, c, ok
- }
-
- for full, candidate := range commands {
- if strings.HasPrefix(full, prefix) {
- if c.run != nil {
- return "", command{}, false // ambiguous
- }
- c = candidate
- name = full
- }
- }
- return name, c, c.run != nil
-}
-
-var errExitApp = errors.New("internal sentinel error value to quit the console reading loop")
-
-func (a *h2i) cmdQuit(args []string) error {
- if len(args) > 0 {
- a.logf("the QUIT command takes no argument")
- return nil
- }
- return errExitApp
-}
-
-func (a *h2i) cmdSettings(args []string) error {
- if len(args) == 1 && strings.EqualFold(args[0], "ACK") {
- return a.framer.WriteSettingsAck()
- }
- var settings []http2.Setting
- for _, arg := range args {
- if strings.EqualFold(arg, "ACK") {
- a.logf("Error: ACK must be only argument with the SETTINGS command")
- return nil
- }
- eq := strings.Index(arg, "=")
- if eq == -1 {
- a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg)
- return nil
- }
- sid, ok := settingByName(arg[:eq])
- if !ok {
- a.logf("Error: unknown setting name %q", arg[:eq])
- return nil
- }
- val, err := strconv.ParseUint(arg[eq+1:], 10, 32)
- if err != nil {
- a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg)
- return nil
- }
- settings = append(settings, http2.Setting{
- ID: sid,
- Val: uint32(val),
- })
- }
- a.logf("Sending: %v", settings)
- return a.framer.WriteSettings(settings...)
-}
-
-func settingByName(name string) (http2.SettingID, bool) {
- for _, sid := range [...]http2.SettingID{
- http2.SettingHeaderTableSize,
- http2.SettingEnablePush,
- http2.SettingMaxConcurrentStreams,
- http2.SettingInitialWindowSize,
- http2.SettingMaxFrameSize,
- http2.SettingMaxHeaderListSize,
- } {
- if strings.EqualFold(sid.String(), name) {
- return sid, true
- }
- }
- return 0, false
-}
-
-func (app *h2i) cmdPing(args []string) error {
- if len(args) > 1 {
- app.logf("invalid PING usage: only accepts 0 or 1 args")
- return nil // nil means don't end the program
- }
- var data [8]byte
- if len(args) == 1 {
- copy(data[:], args[0])
- } else {
- copy(data[:], "h2i_ping")
- }
- return app.framer.WritePing(false, data)
-}
-
-func (app *h2i) cmdHeaders(args []string) error {
- if len(args) > 0 {
- app.logf("Error: HEADERS doesn't yet take arguments.")
- // TODO: flags for restricting window size, to force CONTINUATION
- // frames.
- return nil
- }
- var h1req bytes.Buffer
- app.term.SetPrompt("(as HTTP/1.1)> ")
- defer app.term.SetPrompt("h2i> ")
- for {
- line, err := app.term.ReadLine()
- if err != nil {
- return err
- }
- h1req.WriteString(line)
- h1req.WriteString("\r\n")
- if line == "" {
- break
- }
- }
- req, err := http.ReadRequest(bufio.NewReader(&h1req))
- if err != nil {
- app.logf("Invalid HTTP/1.1 request: %v", err)
- return nil
- }
- if app.streamID == 0 {
- app.streamID = 1
- } else {
- app.streamID += 2
- }
- app.logf("Opening Stream-ID %d:", app.streamID)
- hbf := app.encodeHeaders(req)
- if len(hbf) > 16<<10 {
- app.logf("TODO: h2i doesn't yet write CONTINUATION frames. Copy it from transport.go")
- return nil
- }
- return app.framer.WriteHeaders(http2.HeadersFrameParam{
- StreamID: app.streamID,
- BlockFragment: hbf,
- EndStream: req.Method == "GET" || req.Method == "HEAD", // good enough for now
- EndHeaders: true, // for now
- })
-}
-
-func (app *h2i) readFrames() error {
- for {
- f, err := app.framer.ReadFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame: %v", err)
- }
- app.logf("%v", f)
- switch f := f.(type) {
- case *http2.PingFrame:
- app.logf(" Data = %q", f.Data)
- case *http2.SettingsFrame:
- f.ForeachSetting(func(s http2.Setting) error {
- app.logf(" %v", s)
- app.peerSetting[s.ID] = s.Val
- return nil
- })
- case *http2.WindowUpdateFrame:
- app.logf(" Window-Increment = %v", f.Increment)
- case *http2.GoAwayFrame:
- app.logf(" Last-Stream-ID = %d; Error-Code = %v (%d)", f.LastStreamID, f.ErrCode, f.ErrCode)
- case *http2.DataFrame:
- app.logf(" %q", f.Data())
- case *http2.HeadersFrame:
- if f.HasPriority() {
- app.logf(" PRIORITY = %v", f.Priority)
- }
- if app.hdec == nil {
- // TODO: if the user uses h2i to send a SETTINGS frame advertising
- // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE
- // and stuff here instead of using the 4k default. But for now:
- tableSize := uint32(4 << 10)
- app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
- }
- app.hdec.Write(f.HeaderBlockFragment())
- case *http2.PushPromiseFrame:
- if app.hdec == nil {
- // TODO: if the user uses h2i to send a SETTINGS frame advertising
- // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE
- // and stuff here instead of using the 4k default. But for now:
- tableSize := uint32(4 << 10)
- app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
- }
- app.hdec.Write(f.HeaderBlockFragment())
- }
- }
-}
-
-// called from readLoop
-func (app *h2i) onNewHeaderField(f hpack.HeaderField) {
- if f.Sensitive {
- app.logf(" %s = %q (SENSITIVE)", f.Name, f.Value)
- }
- app.logf(" %s = %q", f.Name, f.Value)
-}
-
-func (app *h2i) encodeHeaders(req *http.Request) []byte {
- app.hbuf.Reset()
-
- // TODO(bradfitz): figure out :authority-vs-Host stuff between http2 and Go
- host := req.Host
- if host == "" {
- host = req.URL.Host
- }
-
- path := req.RequestURI
- if path == "" {
- path = "/"
- }
-
- app.writeHeader(":authority", host) // probably not right for all sites
- app.writeHeader(":method", req.Method)
- app.writeHeader(":path", path)
- app.writeHeader(":scheme", "https")
-
- for k, vv := range req.Header {
- lowKey := strings.ToLower(k)
- if lowKey == "host" {
- continue
- }
- for _, v := range vv {
- app.writeHeader(lowKey, v)
- }
- }
- return app.hbuf.Bytes()
-}
-
-func (app *h2i) writeHeader(name, value string) {
- app.henc.WriteField(hpack.HeaderField{Name: name, Value: value})
- app.logf(" %s = %s", name, value)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/headermap.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/headermap.go
deleted file mode 100644
index c2805f6ac..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/headermap.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "net/http"
- "strings"
-)
-
-var (
- commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case
- commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case
-)
-
-func init() {
- for _, v := range []string{
- "accept",
- "accept-charset",
- "accept-encoding",
- "accept-language",
- "accept-ranges",
- "age",
- "access-control-allow-origin",
- "allow",
- "authorization",
- "cache-control",
- "content-disposition",
- "content-encoding",
- "content-language",
- "content-length",
- "content-location",
- "content-range",
- "content-type",
- "cookie",
- "date",
- "etag",
- "expect",
- "expires",
- "from",
- "host",
- "if-match",
- "if-modified-since",
- "if-none-match",
- "if-unmodified-since",
- "last-modified",
- "link",
- "location",
- "max-forwards",
- "proxy-authenticate",
- "proxy-authorization",
- "range",
- "referer",
- "refresh",
- "retry-after",
- "server",
- "set-cookie",
- "strict-transport-security",
- "trailer",
- "transfer-encoding",
- "user-agent",
- "vary",
- "via",
- "www-authenticate",
- } {
- chk := http.CanonicalHeaderKey(v)
- commonLowerHeader[chk] = v
- commonCanonHeader[v] = chk
- }
-}
-
-func lowerHeader(v string) string {
- if s, ok := commonLowerHeader[v]; ok {
- return s
- }
- return strings.ToLower(v)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode.go
deleted file mode 100644
index 54726c2a3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode.go
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2014 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 file.
-
-package hpack
-
-import (
- "io"
-)
-
-const (
- uint32Max = ^uint32(0)
- initialHeaderTableSize = 4096
-)
-
-type Encoder struct {
- dynTab dynamicTable
- // minSize is the minimum table size set by
- // SetMaxDynamicTableSize after the previous Header Table Size
- // Update.
- minSize uint32
- // maxSizeLimit is the maximum table size this encoder
- // supports. This will protect the encoder from too large
- // size.
- maxSizeLimit uint32
- // tableSizeUpdate indicates whether "Header Table Size
- // Update" is required.
- tableSizeUpdate bool
- w io.Writer
- buf []byte
-}
-
-// NewEncoder returns a new Encoder which performs HPACK encoding. An
-// encoded data is written to w.
-func NewEncoder(w io.Writer) *Encoder {
- e := &Encoder{
- minSize: uint32Max,
- maxSizeLimit: initialHeaderTableSize,
- tableSizeUpdate: false,
- w: w,
- }
- e.dynTab.table.init()
- e.dynTab.setMaxSize(initialHeaderTableSize)
- return e
-}
-
-// WriteField encodes f into a single Write to e's underlying Writer.
-// This function may also produce bytes for "Header Table Size Update"
-// if necessary. If produced, it is done before encoding f.
-func (e *Encoder) WriteField(f HeaderField) error {
- e.buf = e.buf[:0]
-
- if e.tableSizeUpdate {
- e.tableSizeUpdate = false
- if e.minSize < e.dynTab.maxSize {
- e.buf = appendTableSize(e.buf, e.minSize)
- }
- e.minSize = uint32Max
- e.buf = appendTableSize(e.buf, e.dynTab.maxSize)
- }
-
- idx, nameValueMatch := e.searchTable(f)
- if nameValueMatch {
- e.buf = appendIndexed(e.buf, idx)
- } else {
- indexing := e.shouldIndex(f)
- if indexing {
- e.dynTab.add(f)
- }
-
- if idx == 0 {
- e.buf = appendNewName(e.buf, f, indexing)
- } else {
- e.buf = appendIndexedName(e.buf, f, idx, indexing)
- }
- }
- n, err := e.w.Write(e.buf)
- if err == nil && n != len(e.buf) {
- err = io.ErrShortWrite
- }
- return err
-}
-
-// searchTable searches f in both stable and dynamic header tables.
-// The static header table is searched first. Only when there is no
-// exact match for both name and value, the dynamic header table is
-// then searched. If there is no match, i is 0. If both name and value
-// match, i is the matched index and nameValueMatch becomes true. If
-// only name matches, i points to that index and nameValueMatch
-// becomes false.
-func (e *Encoder) searchTable(f HeaderField) (i uint64, nameValueMatch bool) {
- i, nameValueMatch = staticTable.search(f)
- if nameValueMatch {
- return i, true
- }
-
- j, nameValueMatch := e.dynTab.table.search(f)
- if nameValueMatch || (i == 0 && j != 0) {
- return j + uint64(staticTable.len()), nameValueMatch
- }
-
- return i, false
-}
-
-// SetMaxDynamicTableSize changes the dynamic header table size to v.
-// The actual size is bounded by the value passed to
-// SetMaxDynamicTableSizeLimit.
-func (e *Encoder) SetMaxDynamicTableSize(v uint32) {
- if v > e.maxSizeLimit {
- v = e.maxSizeLimit
- }
- if v < e.minSize {
- e.minSize = v
- }
- e.tableSizeUpdate = true
- e.dynTab.setMaxSize(v)
-}
-
-// SetMaxDynamicTableSizeLimit changes the maximum value that can be
-// specified in SetMaxDynamicTableSize to v. By default, it is set to
-// 4096, which is the same size of the default dynamic header table
-// size described in HPACK specification. If the current maximum
-// dynamic header table size is strictly greater than v, "Header Table
-// Size Update" will be done in the next WriteField call and the
-// maximum dynamic header table size is truncated to v.
-func (e *Encoder) SetMaxDynamicTableSizeLimit(v uint32) {
- e.maxSizeLimit = v
- if e.dynTab.maxSize > v {
- e.tableSizeUpdate = true
- e.dynTab.setMaxSize(v)
- }
-}
-
-// shouldIndex reports whether f should be indexed.
-func (e *Encoder) shouldIndex(f HeaderField) bool {
- return !f.Sensitive && f.Size() <= e.dynTab.maxSize
-}
-
-// appendIndexed appends index i, as encoded in "Indexed Header Field"
-// representation, to dst and returns the extended buffer.
-func appendIndexed(dst []byte, i uint64) []byte {
- first := len(dst)
- dst = appendVarInt(dst, 7, i)
- dst[first] |= 0x80
- return dst
-}
-
-// appendNewName appends f, as encoded in one of "Literal Header field
-// - New Name" representation variants, to dst and returns the
-// extended buffer.
-//
-// If f.Sensitive is true, "Never Indexed" representation is used. If
-// f.Sensitive is false and indexing is true, "Inremental Indexing"
-// representation is used.
-func appendNewName(dst []byte, f HeaderField, indexing bool) []byte {
- dst = append(dst, encodeTypeByte(indexing, f.Sensitive))
- dst = appendHpackString(dst, f.Name)
- return appendHpackString(dst, f.Value)
-}
-
-// appendIndexedName appends f and index i referring indexed name
-// entry, as encoded in one of "Literal Header field - Indexed Name"
-// representation variants, to dst and returns the extended buffer.
-//
-// If f.Sensitive is true, "Never Indexed" representation is used. If
-// f.Sensitive is false and indexing is true, "Incremental Indexing"
-// representation is used.
-func appendIndexedName(dst []byte, f HeaderField, i uint64, indexing bool) []byte {
- first := len(dst)
- var n byte
- if indexing {
- n = 6
- } else {
- n = 4
- }
- dst = appendVarInt(dst, n, i)
- dst[first] |= encodeTypeByte(indexing, f.Sensitive)
- return appendHpackString(dst, f.Value)
-}
-
-// appendTableSize appends v, as encoded in "Header Table Size Update"
-// representation, to dst and returns the extended buffer.
-func appendTableSize(dst []byte, v uint32) []byte {
- first := len(dst)
- dst = appendVarInt(dst, 5, uint64(v))
- dst[first] |= 0x20
- return dst
-}
-
-// appendVarInt appends i, as encoded in variable integer form using n
-// bit prefix, to dst and returns the extended buffer.
-//
-// See
-// http://http2.github.io/http2-spec/compression.html#integer.representation
-func appendVarInt(dst []byte, n byte, i uint64) []byte {
- k := uint64((1 << n) - 1)
- if i < k {
- return append(dst, byte(i))
- }
- dst = append(dst, byte(k))
- i -= k
- for ; i >= 128; i >>= 7 {
- dst = append(dst, byte(0x80|(i&0x7f)))
- }
- return append(dst, byte(i))
-}
-
-// appendHpackString appends s, as encoded in "String Literal"
-// representation, to dst and returns the the extended buffer.
-//
-// s will be encoded in Huffman codes only when it produces strictly
-// shorter byte string.
-func appendHpackString(dst []byte, s string) []byte {
- huffmanLength := HuffmanEncodeLength(s)
- if huffmanLength < uint64(len(s)) {
- first := len(dst)
- dst = appendVarInt(dst, 7, huffmanLength)
- dst = AppendHuffmanString(dst, s)
- dst[first] |= 0x80
- } else {
- dst = appendVarInt(dst, 7, uint64(len(s)))
- dst = append(dst, s...)
- }
- return dst
-}
-
-// encodeTypeByte returns type byte. If sensitive is true, type byte
-// for "Never Indexed" representation is returned. If sensitive is
-// false and indexing is true, type byte for "Incremental Indexing"
-// representation is returned. Otherwise, type byte for "Without
-// Indexing" is returned.
-func encodeTypeByte(indexing, sensitive bool) byte {
- if sensitive {
- return 0x10
- }
- if indexing {
- return 0x40
- }
- return 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode_test.go
deleted file mode 100644
index 05f12db9c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/encode_test.go
+++ /dev/null
@@ -1,386 +0,0 @@
-// Copyright 2014 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 file.
-
-package hpack
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "math/rand"
- "reflect"
- "strings"
- "testing"
-)
-
-func TestEncoderTableSizeUpdate(t *testing.T) {
- tests := []struct {
- size1, size2 uint32
- wantHex string
- }{
- // Should emit 2 table size updates (2048 and 4096)
- {2048, 4096, "3fe10f 3fe11f 82"},
-
- // Should emit 1 table size update (2048)
- {16384, 2048, "3fe10f 82"},
- }
- for _, tt := range tests {
- var buf bytes.Buffer
- e := NewEncoder(&buf)
- e.SetMaxDynamicTableSize(tt.size1)
- e.SetMaxDynamicTableSize(tt.size2)
- if err := e.WriteField(pair(":method", "GET")); err != nil {
- t.Fatal(err)
- }
- want := removeSpace(tt.wantHex)
- if got := hex.EncodeToString(buf.Bytes()); got != want {
- t.Errorf("e.SetDynamicTableSize %v, %v = %q; want %q", tt.size1, tt.size2, got, want)
- }
- }
-}
-
-func TestEncoderWriteField(t *testing.T) {
- var buf bytes.Buffer
- e := NewEncoder(&buf)
- var got []HeaderField
- d := NewDecoder(4<<10, func(f HeaderField) {
- got = append(got, f)
- })
-
- tests := []struct {
- hdrs []HeaderField
- }{
- {[]HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- }},
- {[]HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- pair("cache-control", "no-cache"),
- }},
- {[]HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "https"),
- pair(":path", "/index.html"),
- pair(":authority", "www.example.com"),
- pair("custom-key", "custom-value"),
- }},
- }
- for i, tt := range tests {
- buf.Reset()
- got = got[:0]
- for _, hf := range tt.hdrs {
- if err := e.WriteField(hf); err != nil {
- t.Fatal(err)
- }
- }
- _, err := d.Write(buf.Bytes())
- if err != nil {
- t.Errorf("%d. Decoder Write = %v", i, err)
- }
- if !reflect.DeepEqual(got, tt.hdrs) {
- t.Errorf("%d. Decoded %+v; want %+v", i, got, tt.hdrs)
- }
- }
-}
-
-func TestEncoderSearchTable(t *testing.T) {
- e := NewEncoder(nil)
-
- e.dynTab.add(pair("foo", "bar"))
- e.dynTab.add(pair("blake", "miz"))
- e.dynTab.add(pair(":method", "GET"))
-
- tests := []struct {
- hf HeaderField
- wantI uint64
- wantMatch bool
- }{
- // Name and Value match
- {pair("foo", "bar"), uint64(staticTable.len()) + 3, true},
- {pair("blake", "miz"), uint64(staticTable.len()) + 2, true},
- {pair(":method", "GET"), 2, true},
-
- // Only name match because Sensitive == true. This is allowed to match
- // any ":method" entry. The current implementation uses the last entry
- // added in newStaticTable.
- {HeaderField{":method", "GET", true}, 3, false},
-
- // Only Name matches
- {pair("foo", "..."), uint64(staticTable.len()) + 3, false},
- {pair("blake", "..."), uint64(staticTable.len()) + 2, false},
- // As before, this is allowed to match any ":method" entry.
- {pair(":method", "..."), 3, false},
-
- // None match
- {pair("foo-", "bar"), 0, false},
- }
- for _, tt := range tests {
- if gotI, gotMatch := e.searchTable(tt.hf); gotI != tt.wantI || gotMatch != tt.wantMatch {
- t.Errorf("d.search(%+v) = %v, %v; want %v, %v", tt.hf, gotI, gotMatch, tt.wantI, tt.wantMatch)
- }
- }
-}
-
-func TestAppendVarInt(t *testing.T) {
- tests := []struct {
- n byte
- i uint64
- want []byte
- }{
- // Fits in a byte:
- {1, 0, []byte{0}},
- {2, 2, []byte{2}},
- {3, 6, []byte{6}},
- {4, 14, []byte{14}},
- {5, 30, []byte{30}},
- {6, 62, []byte{62}},
- {7, 126, []byte{126}},
- {8, 254, []byte{254}},
-
- // Multiple bytes:
- {5, 1337, []byte{31, 154, 10}},
- }
- for _, tt := range tests {
- got := appendVarInt(nil, tt.n, tt.i)
- if !bytes.Equal(got, tt.want) {
- t.Errorf("appendVarInt(nil, %v, %v) = %v; want %v", tt.n, tt.i, got, tt.want)
- }
- }
-}
-
-func TestAppendHpackString(t *testing.T) {
- tests := []struct {
- s, wantHex string
- }{
- // Huffman encoded
- {"www.example.com", "8c f1e3 c2e5 f23a 6ba0 ab90 f4ff"},
-
- // Not Huffman encoded
- {"a", "01 61"},
-
- // zero length
- {"", "00"},
- }
- for _, tt := range tests {
- want := removeSpace(tt.wantHex)
- buf := appendHpackString(nil, tt.s)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("appendHpackString(nil, %q) = %q; want %q", tt.s, got, want)
- }
- }
-}
-
-func TestAppendIndexed(t *testing.T) {
- tests := []struct {
- i uint64
- wantHex string
- }{
- // 1 byte
- {1, "81"},
- {126, "fe"},
-
- // 2 bytes
- {127, "ff00"},
- {128, "ff01"},
- }
- for _, tt := range tests {
- want := removeSpace(tt.wantHex)
- buf := appendIndexed(nil, tt.i)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("appendIndex(nil, %v) = %q; want %q", tt.i, got, want)
- }
- }
-}
-
-func TestAppendNewName(t *testing.T) {
- tests := []struct {
- f HeaderField
- indexing bool
- wantHex string
- }{
- // Incremental indexing
- {HeaderField{"custom-key", "custom-value", false}, true, "40 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"},
-
- // Without indexing
- {HeaderField{"custom-key", "custom-value", false}, false, "00 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"},
-
- // Never indexed
- {HeaderField{"custom-key", "custom-value", true}, true, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"},
- {HeaderField{"custom-key", "custom-value", true}, false, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"},
- }
- for _, tt := range tests {
- want := removeSpace(tt.wantHex)
- buf := appendNewName(nil, tt.f, tt.indexing)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("appendNewName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want)
- }
- }
-}
-
-func TestAppendIndexedName(t *testing.T) {
- tests := []struct {
- f HeaderField
- i uint64
- indexing bool
- wantHex string
- }{
- // Incremental indexing
- {HeaderField{":status", "302", false}, 8, true, "48 82 6402"},
-
- // Without indexing
- {HeaderField{":status", "302", false}, 8, false, "08 82 6402"},
-
- // Never indexed
- {HeaderField{":status", "302", true}, 8, true, "18 82 6402"},
- {HeaderField{":status", "302", true}, 8, false, "18 82 6402"},
- }
- for _, tt := range tests {
- want := removeSpace(tt.wantHex)
- buf := appendIndexedName(nil, tt.f, tt.i, tt.indexing)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("appendIndexedName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want)
- }
- }
-}
-
-func TestAppendTableSize(t *testing.T) {
- tests := []struct {
- i uint32
- wantHex string
- }{
- // Fits into 1 byte
- {30, "3e"},
-
- // Extra byte
- {31, "3f00"},
- {32, "3f01"},
- }
- for _, tt := range tests {
- want := removeSpace(tt.wantHex)
- buf := appendTableSize(nil, tt.i)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("appendTableSize(nil, %v) = %q; want %q", tt.i, got, want)
- }
- }
-}
-
-func TestEncoderSetMaxDynamicTableSize(t *testing.T) {
- var buf bytes.Buffer
- e := NewEncoder(&buf)
- tests := []struct {
- v uint32
- wantUpdate bool
- wantMinSize uint32
- wantMaxSize uint32
- }{
- // Set new table size to 2048
- {2048, true, 2048, 2048},
-
- // Set new table size to 16384, but still limited to
- // 4096
- {16384, true, 2048, 4096},
- }
- for _, tt := range tests {
- e.SetMaxDynamicTableSize(tt.v)
- if got := e.tableSizeUpdate; tt.wantUpdate != got {
- t.Errorf("e.tableSizeUpdate = %v; want %v", got, tt.wantUpdate)
- }
- if got := e.minSize; tt.wantMinSize != got {
- t.Errorf("e.minSize = %v; want %v", got, tt.wantMinSize)
- }
- if got := e.dynTab.maxSize; tt.wantMaxSize != got {
- t.Errorf("e.maxSize = %v; want %v", got, tt.wantMaxSize)
- }
- }
-}
-
-func TestEncoderSetMaxDynamicTableSizeLimit(t *testing.T) {
- e := NewEncoder(nil)
- // 4095 < initialHeaderTableSize means maxSize is truncated to
- // 4095.
- e.SetMaxDynamicTableSizeLimit(4095)
- if got, want := e.dynTab.maxSize, uint32(4095); got != want {
- t.Errorf("e.dynTab.maxSize = %v; want %v", got, want)
- }
- if got, want := e.maxSizeLimit, uint32(4095); got != want {
- t.Errorf("e.maxSizeLimit = %v; want %v", got, want)
- }
- if got, want := e.tableSizeUpdate, true; got != want {
- t.Errorf("e.tableSizeUpdate = %v; want %v", got, want)
- }
- // maxSize will be truncated to maxSizeLimit
- e.SetMaxDynamicTableSize(16384)
- if got, want := e.dynTab.maxSize, uint32(4095); got != want {
- t.Errorf("e.dynTab.maxSize = %v; want %v", got, want)
- }
- // 8192 > current maxSizeLimit, so maxSize does not change.
- e.SetMaxDynamicTableSizeLimit(8192)
- if got, want := e.dynTab.maxSize, uint32(4095); got != want {
- t.Errorf("e.dynTab.maxSize = %v; want %v", got, want)
- }
- if got, want := e.maxSizeLimit, uint32(8192); got != want {
- t.Errorf("e.maxSizeLimit = %v; want %v", got, want)
- }
-}
-
-func removeSpace(s string) string {
- return strings.Replace(s, " ", "", -1)
-}
-
-func BenchmarkEncoderSearchTable(b *testing.B) {
- e := NewEncoder(nil)
-
- // A sample of possible header fields.
- // This is not based on any actual data from HTTP/2 traces.
- var possible []HeaderField
- for _, f := range staticTable.ents {
- if f.Value == "" {
- possible = append(possible, f)
- continue
- }
- // Generate 5 random values, except for cookie and set-cookie,
- // which we know can have many values in practice.
- num := 5
- if f.Name == "cookie" || f.Name == "set-cookie" {
- num = 25
- }
- for i := 0; i < num; i++ {
- f.Value = fmt.Sprintf("%s-%d", f.Name, i)
- possible = append(possible, f)
- }
- }
- for k := 0; k < 10; k++ {
- f := HeaderField{
- Name: fmt.Sprintf("x-header-%d", k),
- Sensitive: rand.Int()%2 == 0,
- }
- for i := 0; i < 5; i++ {
- f.Value = fmt.Sprintf("%s-%d", f.Name, i)
- possible = append(possible, f)
- }
- }
-
- // Add a random sample to the dynamic table. This very loosely simulates
- // a history of 100 requests with 20 header fields per request.
- for r := 0; r < 100*20; r++ {
- f := possible[rand.Int31n(int32(len(possible)))]
- // Skip if this is in the staticTable verbatim.
- if _, has := staticTable.search(f); !has {
- e.dynTab.add(f)
- }
- }
-
- b.ResetTimer()
- for n := 0; n < b.N; n++ {
- for _, f := range possible {
- e.searchTable(f)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack.go
deleted file mode 100644
index 176644acd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack.go
+++ /dev/null
@@ -1,490 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package hpack implements HPACK, a compression format for
-// efficiently representing HTTP header fields in the context of HTTP/2.
-//
-// See http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-09
-package hpack
-
-import (
- "bytes"
- "errors"
- "fmt"
-)
-
-// A DecodingError is something the spec defines as a decoding error.
-type DecodingError struct {
- Err error
-}
-
-func (de DecodingError) Error() string {
- return fmt.Sprintf("decoding error: %v", de.Err)
-}
-
-// An InvalidIndexError is returned when an encoder references a table
-// entry before the static table or after the end of the dynamic table.
-type InvalidIndexError int
-
-func (e InvalidIndexError) Error() string {
- return fmt.Sprintf("invalid indexed representation index %d", int(e))
-}
-
-// A HeaderField is a name-value pair. Both the name and value are
-// treated as opaque sequences of octets.
-type HeaderField struct {
- Name, Value string
-
- // Sensitive means that this header field should never be
- // indexed.
- Sensitive bool
-}
-
-// IsPseudo reports whether the header field is an http2 pseudo header.
-// That is, it reports whether it starts with a colon.
-// It is not otherwise guaranteed to be a valid pseudo header field,
-// though.
-func (hf HeaderField) IsPseudo() bool {
- return len(hf.Name) != 0 && hf.Name[0] == ':'
-}
-
-func (hf HeaderField) String() string {
- var suffix string
- if hf.Sensitive {
- suffix = " (sensitive)"
- }
- return fmt.Sprintf("header field %q = %q%s", hf.Name, hf.Value, suffix)
-}
-
-// Size returns the size of an entry per RFC 7541 section 4.1.
-func (hf HeaderField) Size() uint32 {
- // http://http2.github.io/http2-spec/compression.html#rfc.section.4.1
- // "The size of the dynamic table is the sum of the size of
- // its entries. The size of an entry is the sum of its name's
- // length in octets (as defined in Section 5.2), its value's
- // length in octets (see Section 5.2), plus 32. The size of
- // an entry is calculated using the length of the name and
- // value without any Huffman encoding applied."
-
- // This can overflow if somebody makes a large HeaderField
- // Name and/or Value by hand, but we don't care, because that
- // won't happen on the wire because the encoding doesn't allow
- // it.
- return uint32(len(hf.Name) + len(hf.Value) + 32)
-}
-
-// A Decoder is the decoding context for incremental processing of
-// header blocks.
-type Decoder struct {
- dynTab dynamicTable
- emit func(f HeaderField)
-
- emitEnabled bool // whether calls to emit are enabled
- maxStrLen int // 0 means unlimited
-
- // buf is the unparsed buffer. It's only written to
- // saveBuf if it was truncated in the middle of a header
- // block. Because it's usually not owned, we can only
- // process it under Write.
- buf []byte // not owned; only valid during Write
-
- // saveBuf is previous data passed to Write which we weren't able
- // to fully parse before. Unlike buf, we own this data.
- saveBuf bytes.Buffer
-}
-
-// NewDecoder returns a new decoder with the provided maximum dynamic
-// table size. The emitFunc will be called for each valid field
-// parsed, in the same goroutine as calls to Write, before Write returns.
-func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder {
- d := &Decoder{
- emit: emitFunc,
- emitEnabled: true,
- }
- d.dynTab.table.init()
- d.dynTab.allowedMaxSize = maxDynamicTableSize
- d.dynTab.setMaxSize(maxDynamicTableSize)
- return d
-}
-
-// ErrStringLength is returned by Decoder.Write when the max string length
-// (as configured by Decoder.SetMaxStringLength) would be violated.
-var ErrStringLength = errors.New("hpack: string too long")
-
-// SetMaxStringLength sets the maximum size of a HeaderField name or
-// value string. If a string exceeds this length (even after any
-// decompression), Write will return ErrStringLength.
-// A value of 0 means unlimited and is the default from NewDecoder.
-func (d *Decoder) SetMaxStringLength(n int) {
- d.maxStrLen = n
-}
-
-// SetEmitFunc changes the callback used when new header fields
-// are decoded.
-// It must be non-nil. It does not affect EmitEnabled.
-func (d *Decoder) SetEmitFunc(emitFunc func(f HeaderField)) {
- d.emit = emitFunc
-}
-
-// SetEmitEnabled controls whether the emitFunc provided to NewDecoder
-// should be called. The default is true.
-//
-// This facility exists to let servers enforce MAX_HEADER_LIST_SIZE
-// while still decoding and keeping in-sync with decoder state, but
-// without doing unnecessary decompression or generating unnecessary
-// garbage for header fields past the limit.
-func (d *Decoder) SetEmitEnabled(v bool) { d.emitEnabled = v }
-
-// EmitEnabled reports whether calls to the emitFunc provided to NewDecoder
-// are currently enabled. The default is true.
-func (d *Decoder) EmitEnabled() bool { return d.emitEnabled }
-
-// TODO: add method *Decoder.Reset(maxSize, emitFunc) to let callers re-use Decoders and their
-// underlying buffers for garbage reasons.
-
-func (d *Decoder) SetMaxDynamicTableSize(v uint32) {
- d.dynTab.setMaxSize(v)
-}
-
-// SetAllowedMaxDynamicTableSize sets the upper bound that the encoded
-// stream (via dynamic table size updates) may set the maximum size
-// to.
-func (d *Decoder) SetAllowedMaxDynamicTableSize(v uint32) {
- d.dynTab.allowedMaxSize = v
-}
-
-type dynamicTable struct {
- // http://http2.github.io/http2-spec/compression.html#rfc.section.2.3.2
- table headerFieldTable
- size uint32 // in bytes
- maxSize uint32 // current maxSize
- allowedMaxSize uint32 // maxSize may go up to this, inclusive
-}
-
-func (dt *dynamicTable) setMaxSize(v uint32) {
- dt.maxSize = v
- dt.evict()
-}
-
-func (dt *dynamicTable) add(f HeaderField) {
- dt.table.addEntry(f)
- dt.size += f.Size()
- dt.evict()
-}
-
-// If we're too big, evict old stuff.
-func (dt *dynamicTable) evict() {
- var n int
- for dt.size > dt.maxSize && n < dt.table.len() {
- dt.size -= dt.table.ents[n].Size()
- n++
- }
- dt.table.evictOldest(n)
-}
-
-func (d *Decoder) maxTableIndex() int {
- // This should never overflow. RFC 7540 Section 6.5.2 limits the size of
- // the dynamic table to 2^32 bytes, where each entry will occupy more than
- // one byte. Further, the staticTable has a fixed, small length.
- return d.dynTab.table.len() + staticTable.len()
-}
-
-func (d *Decoder) at(i uint64) (hf HeaderField, ok bool) {
- // See Section 2.3.3.
- if i == 0 {
- return
- }
- if i <= uint64(staticTable.len()) {
- return staticTable.ents[i-1], true
- }
- if i > uint64(d.maxTableIndex()) {
- return
- }
- // In the dynamic table, newer entries have lower indices.
- // However, dt.ents[0] is the oldest entry. Hence, dt.ents is
- // the reversed dynamic table.
- dt := d.dynTab.table
- return dt.ents[dt.len()-(int(i)-staticTable.len())], true
-}
-
-// Decode decodes an entire block.
-//
-// TODO: remove this method and make it incremental later? This is
-// easier for debugging now.
-func (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) {
- var hf []HeaderField
- saveFunc := d.emit
- defer func() { d.emit = saveFunc }()
- d.emit = func(f HeaderField) { hf = append(hf, f) }
- if _, err := d.Write(p); err != nil {
- return nil, err
- }
- if err := d.Close(); err != nil {
- return nil, err
- }
- return hf, nil
-}
-
-func (d *Decoder) Close() error {
- if d.saveBuf.Len() > 0 {
- d.saveBuf.Reset()
- return DecodingError{errors.New("truncated headers")}
- }
- return nil
-}
-
-func (d *Decoder) Write(p []byte) (n int, err error) {
- if len(p) == 0 {
- // Prevent state machine CPU attacks (making us redo
- // work up to the point of finding out we don't have
- // enough data)
- return
- }
- // Only copy the data if we have to. Optimistically assume
- // that p will contain a complete header block.
- if d.saveBuf.Len() == 0 {
- d.buf = p
- } else {
- d.saveBuf.Write(p)
- d.buf = d.saveBuf.Bytes()
- d.saveBuf.Reset()
- }
-
- for len(d.buf) > 0 {
- err = d.parseHeaderFieldRepr()
- if err == errNeedMore {
- // Extra paranoia, making sure saveBuf won't
- // get too large. All the varint and string
- // reading code earlier should already catch
- // overlong things and return ErrStringLength,
- // but keep this as a last resort.
- const varIntOverhead = 8 // conservative
- if d.maxStrLen != 0 && int64(len(d.buf)) > 2*(int64(d.maxStrLen)+varIntOverhead) {
- return 0, ErrStringLength
- }
- d.saveBuf.Write(d.buf)
- return len(p), nil
- }
- if err != nil {
- break
- }
- }
- return len(p), err
-}
-
-// errNeedMore is an internal sentinel error value that means the
-// buffer is truncated and we need to read more data before we can
-// continue parsing.
-var errNeedMore = errors.New("need more data")
-
-type indexType int
-
-const (
- indexedTrue indexType = iota
- indexedFalse
- indexedNever
-)
-
-func (v indexType) indexed() bool { return v == indexedTrue }
-func (v indexType) sensitive() bool { return v == indexedNever }
-
-// returns errNeedMore if there isn't enough data available.
-// any other error is fatal.
-// consumes d.buf iff it returns nil.
-// precondition: must be called with len(d.buf) > 0
-func (d *Decoder) parseHeaderFieldRepr() error {
- b := d.buf[0]
- switch {
- case b&128 != 0:
- // Indexed representation.
- // High bit set?
- // http://http2.github.io/http2-spec/compression.html#rfc.section.6.1
- return d.parseFieldIndexed()
- case b&192 == 64:
- // 6.2.1 Literal Header Field with Incremental Indexing
- // 0b10xxxxxx: top two bits are 10
- // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.1
- return d.parseFieldLiteral(6, indexedTrue)
- case b&240 == 0:
- // 6.2.2 Literal Header Field without Indexing
- // 0b0000xxxx: top four bits are 0000
- // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.2
- return d.parseFieldLiteral(4, indexedFalse)
- case b&240 == 16:
- // 6.2.3 Literal Header Field never Indexed
- // 0b0001xxxx: top four bits are 0001
- // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.3
- return d.parseFieldLiteral(4, indexedNever)
- case b&224 == 32:
- // 6.3 Dynamic Table Size Update
- // Top three bits are '001'.
- // http://http2.github.io/http2-spec/compression.html#rfc.section.6.3
- return d.parseDynamicTableSizeUpdate()
- }
-
- return DecodingError{errors.New("invalid encoding")}
-}
-
-// (same invariants and behavior as parseHeaderFieldRepr)
-func (d *Decoder) parseFieldIndexed() error {
- buf := d.buf
- idx, buf, err := readVarInt(7, buf)
- if err != nil {
- return err
- }
- hf, ok := d.at(idx)
- if !ok {
- return DecodingError{InvalidIndexError(idx)}
- }
- d.buf = buf
- return d.callEmit(HeaderField{Name: hf.Name, Value: hf.Value})
-}
-
-// (same invariants and behavior as parseHeaderFieldRepr)
-func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error {
- buf := d.buf
- nameIdx, buf, err := readVarInt(n, buf)
- if err != nil {
- return err
- }
-
- var hf HeaderField
- wantStr := d.emitEnabled || it.indexed()
- if nameIdx > 0 {
- ihf, ok := d.at(nameIdx)
- if !ok {
- return DecodingError{InvalidIndexError(nameIdx)}
- }
- hf.Name = ihf.Name
- } else {
- hf.Name, buf, err = d.readString(buf, wantStr)
- if err != nil {
- return err
- }
- }
- hf.Value, buf, err = d.readString(buf, wantStr)
- if err != nil {
- return err
- }
- d.buf = buf
- if it.indexed() {
- d.dynTab.add(hf)
- }
- hf.Sensitive = it.sensitive()
- return d.callEmit(hf)
-}
-
-func (d *Decoder) callEmit(hf HeaderField) error {
- if d.maxStrLen != 0 {
- if len(hf.Name) > d.maxStrLen || len(hf.Value) > d.maxStrLen {
- return ErrStringLength
- }
- }
- if d.emitEnabled {
- d.emit(hf)
- }
- return nil
-}
-
-// (same invariants and behavior as parseHeaderFieldRepr)
-func (d *Decoder) parseDynamicTableSizeUpdate() error {
- buf := d.buf
- size, buf, err := readVarInt(5, buf)
- if err != nil {
- return err
- }
- if size > uint64(d.dynTab.allowedMaxSize) {
- return DecodingError{errors.New("dynamic table size update too large")}
- }
- d.dynTab.setMaxSize(uint32(size))
- d.buf = buf
- return nil
-}
-
-var errVarintOverflow = DecodingError{errors.New("varint integer overflow")}
-
-// readVarInt reads an unsigned variable length integer off the
-// beginning of p. n is the parameter as described in
-// http://http2.github.io/http2-spec/compression.html#rfc.section.5.1.
-//
-// n must always be between 1 and 8.
-//
-// The returned remain buffer is either a smaller suffix of p, or err != nil.
-// The error is errNeedMore if p doesn't contain a complete integer.
-func readVarInt(n byte, p []byte) (i uint64, remain []byte, err error) {
- if n < 1 || n > 8 {
- panic("bad n")
- }
- if len(p) == 0 {
- return 0, p, errNeedMore
- }
- i = uint64(p[0])
- if n < 8 {
- i &= (1 << uint64(n)) - 1
- }
- if i < (1<<uint64(n))-1 {
- return i, p[1:], nil
- }
-
- origP := p
- p = p[1:]
- var m uint64
- for len(p) > 0 {
- b := p[0]
- p = p[1:]
- i += uint64(b&127) << m
- if b&128 == 0 {
- return i, p, nil
- }
- m += 7
- if m >= 63 { // TODO: proper overflow check. making this up.
- return 0, origP, errVarintOverflow
- }
- }
- return 0, origP, errNeedMore
-}
-
-// readString decodes an hpack string from p.
-//
-// wantStr is whether s will be used. If false, decompression and
-// []byte->string garbage are skipped if s will be ignored
-// anyway. This does mean that huffman decoding errors for non-indexed
-// strings past the MAX_HEADER_LIST_SIZE are ignored, but the server
-// is returning an error anyway, and because they're not indexed, the error
-// won't affect the decoding state.
-func (d *Decoder) readString(p []byte, wantStr bool) (s string, remain []byte, err error) {
- if len(p) == 0 {
- return "", p, errNeedMore
- }
- isHuff := p[0]&128 != 0
- strLen, p, err := readVarInt(7, p)
- if err != nil {
- return "", p, err
- }
- if d.maxStrLen != 0 && strLen > uint64(d.maxStrLen) {
- return "", nil, ErrStringLength
- }
- if uint64(len(p)) < strLen {
- return "", p, errNeedMore
- }
- if !isHuff {
- if wantStr {
- s = string(p[:strLen])
- }
- return s, p[strLen:], nil
- }
-
- if wantStr {
- buf := bufPool.Get().(*bytes.Buffer)
- buf.Reset() // don't trust others
- defer bufPool.Put(buf)
- if err := huffmanDecode(buf, d.maxStrLen, p[:strLen]); err != nil {
- buf.Reset()
- return "", nil, err
- }
- s = buf.String()
- buf.Reset() // be nice to GC
- }
- return s, p[strLen:], nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack_test.go
deleted file mode 100644
index bc7f47678..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/hpack_test.go
+++ /dev/null
@@ -1,722 +0,0 @@
-// Copyright 2014 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 file.
-
-package hpack
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "math/rand"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-func (d *Decoder) mustAt(idx int) HeaderField {
- if hf, ok := d.at(uint64(idx)); !ok {
- panic(fmt.Sprintf("bogus index %d", idx))
- } else {
- return hf
- }
-}
-
-func TestDynamicTableAt(t *testing.T) {
- d := NewDecoder(4096, nil)
- at := d.mustAt
- if got, want := at(2), (pair(":method", "GET")); got != want {
- t.Errorf("at(2) = %v; want %v", got, want)
- }
- d.dynTab.add(pair("foo", "bar"))
- d.dynTab.add(pair("blake", "miz"))
- if got, want := at(staticTable.len()+1), (pair("blake", "miz")); got != want {
- t.Errorf("at(dyn 1) = %v; want %v", got, want)
- }
- if got, want := at(staticTable.len()+2), (pair("foo", "bar")); got != want {
- t.Errorf("at(dyn 2) = %v; want %v", got, want)
- }
- if got, want := at(3), (pair(":method", "POST")); got != want {
- t.Errorf("at(3) = %v; want %v", got, want)
- }
-}
-
-func TestDynamicTableSizeEvict(t *testing.T) {
- d := NewDecoder(4096, nil)
- if want := uint32(0); d.dynTab.size != want {
- t.Fatalf("size = %d; want %d", d.dynTab.size, want)
- }
- add := d.dynTab.add
- add(pair("blake", "eats pizza"))
- if want := uint32(15 + 32); d.dynTab.size != want {
- t.Fatalf("after pizza, size = %d; want %d", d.dynTab.size, want)
- }
- add(pair("foo", "bar"))
- if want := uint32(15 + 32 + 6 + 32); d.dynTab.size != want {
- t.Fatalf("after foo bar, size = %d; want %d", d.dynTab.size, want)
- }
- d.dynTab.setMaxSize(15 + 32 + 1 /* slop */)
- if want := uint32(6 + 32); d.dynTab.size != want {
- t.Fatalf("after setMaxSize, size = %d; want %d", d.dynTab.size, want)
- }
- if got, want := d.mustAt(staticTable.len()+1), (pair("foo", "bar")); got != want {
- t.Errorf("at(dyn 1) = %v; want %v", got, want)
- }
- add(pair("long", strings.Repeat("x", 500)))
- if want := uint32(0); d.dynTab.size != want {
- t.Fatalf("after big one, size = %d; want %d", d.dynTab.size, want)
- }
-}
-
-func TestDecoderDecode(t *testing.T) {
- tests := []struct {
- name string
- in []byte
- want []HeaderField
- wantDynTab []HeaderField // newest entry first
- }{
- // C.2.1 Literal Header Field with Indexing
- // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.1
- {"C.2.1", dehex("400a 6375 7374 6f6d 2d6b 6579 0d63 7573 746f 6d2d 6865 6164 6572"),
- []HeaderField{pair("custom-key", "custom-header")},
- []HeaderField{pair("custom-key", "custom-header")},
- },
-
- // C.2.2 Literal Header Field without Indexing
- // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.2
- {"C.2.2", dehex("040c 2f73 616d 706c 652f 7061 7468"),
- []HeaderField{pair(":path", "/sample/path")},
- []HeaderField{}},
-
- // C.2.3 Literal Header Field never Indexed
- // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.3
- {"C.2.3", dehex("1008 7061 7373 776f 7264 0673 6563 7265 74"),
- []HeaderField{{"password", "secret", true}},
- []HeaderField{}},
-
- // C.2.4 Indexed Header Field
- // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.4
- {"C.2.4", []byte("\x82"),
- []HeaderField{pair(":method", "GET")},
- []HeaderField{}},
- }
- for _, tt := range tests {
- d := NewDecoder(4096, nil)
- hf, err := d.DecodeFull(tt.in)
- if err != nil {
- t.Errorf("%s: %v", tt.name, err)
- continue
- }
- if !reflect.DeepEqual(hf, tt.want) {
- t.Errorf("%s: Got %v; want %v", tt.name, hf, tt.want)
- }
- gotDynTab := d.dynTab.reverseCopy()
- if !reflect.DeepEqual(gotDynTab, tt.wantDynTab) {
- t.Errorf("%s: dynamic table after = %v; want %v", tt.name, gotDynTab, tt.wantDynTab)
- }
- }
-}
-
-func (dt *dynamicTable) reverseCopy() (hf []HeaderField) {
- hf = make([]HeaderField, len(dt.table.ents))
- for i := range hf {
- hf[i] = dt.table.ents[len(dt.table.ents)-1-i]
- }
- return
-}
-
-type encAndWant struct {
- enc []byte
- want []HeaderField
- wantDynTab []HeaderField
- wantDynSize uint32
-}
-
-// C.3 Request Examples without Huffman Coding
-// http://http2.github.io/http2-spec/compression.html#rfc.section.C.3
-func TestDecodeC3_NoHuffman(t *testing.T) {
- testDecodeSeries(t, 4096, []encAndWant{
- {dehex("8286 8441 0f77 7777 2e65 7861 6d70 6c65 2e63 6f6d"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- },
- []HeaderField{
- pair(":authority", "www.example.com"),
- },
- 57,
- },
- {dehex("8286 84be 5808 6e6f 2d63 6163 6865"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- pair("cache-control", "no-cache"),
- },
- []HeaderField{
- pair("cache-control", "no-cache"),
- pair(":authority", "www.example.com"),
- },
- 110,
- },
- {dehex("8287 85bf 400a 6375 7374 6f6d 2d6b 6579 0c63 7573 746f 6d2d 7661 6c75 65"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "https"),
- pair(":path", "/index.html"),
- pair(":authority", "www.example.com"),
- pair("custom-key", "custom-value"),
- },
- []HeaderField{
- pair("custom-key", "custom-value"),
- pair("cache-control", "no-cache"),
- pair(":authority", "www.example.com"),
- },
- 164,
- },
- })
-}
-
-// C.4 Request Examples with Huffman Coding
-// http://http2.github.io/http2-spec/compression.html#rfc.section.C.4
-func TestDecodeC4_Huffman(t *testing.T) {
- testDecodeSeries(t, 4096, []encAndWant{
- {dehex("8286 8441 8cf1 e3c2 e5f2 3a6b a0ab 90f4 ff"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- },
- []HeaderField{
- pair(":authority", "www.example.com"),
- },
- 57,
- },
- {dehex("8286 84be 5886 a8eb 1064 9cbf"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "http"),
- pair(":path", "/"),
- pair(":authority", "www.example.com"),
- pair("cache-control", "no-cache"),
- },
- []HeaderField{
- pair("cache-control", "no-cache"),
- pair(":authority", "www.example.com"),
- },
- 110,
- },
- {dehex("8287 85bf 4088 25a8 49e9 5ba9 7d7f 8925 a849 e95b b8e8 b4bf"),
- []HeaderField{
- pair(":method", "GET"),
- pair(":scheme", "https"),
- pair(":path", "/index.html"),
- pair(":authority", "www.example.com"),
- pair("custom-key", "custom-value"),
- },
- []HeaderField{
- pair("custom-key", "custom-value"),
- pair("cache-control", "no-cache"),
- pair(":authority", "www.example.com"),
- },
- 164,
- },
- })
-}
-
-// http://http2.github.io/http2-spec/compression.html#rfc.section.C.5
-// "This section shows several consecutive header lists, corresponding
-// to HTTP responses, on the same connection. The HTTP/2 setting
-// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256
-// octets, causing some evictions to occur."
-func TestDecodeC5_ResponsesNoHuff(t *testing.T) {
- testDecodeSeries(t, 256, []encAndWant{
- {dehex(`
-4803 3330 3258 0770 7269 7661 7465 611d
-4d6f 6e2c 2032 3120 4f63 7420 3230 3133
-2032 303a 3133 3a32 3120 474d 546e 1768
-7474 7073 3a2f 2f77 7777 2e65 7861 6d70
-6c65 2e63 6f6d
-`),
- []HeaderField{
- pair(":status", "302"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("location", "https://www.example.com"),
- },
- []HeaderField{
- pair("location", "https://www.example.com"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("cache-control", "private"),
- pair(":status", "302"),
- },
- 222,
- },
- {dehex("4803 3330 37c1 c0bf"),
- []HeaderField{
- pair(":status", "307"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("location", "https://www.example.com"),
- },
- []HeaderField{
- pair(":status", "307"),
- pair("location", "https://www.example.com"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("cache-control", "private"),
- },
- 222,
- },
- {dehex(`
-88c1 611d 4d6f 6e2c 2032 3120 4f63 7420
-3230 3133 2032 303a 3133 3a32 3220 474d
-54c0 5a04 677a 6970 7738 666f 6f3d 4153
-444a 4b48 514b 425a 584f 5157 454f 5049
-5541 5851 5745 4f49 553b 206d 6178 2d61
-6765 3d33 3630 303b 2076 6572 7369 6f6e
-3d31
-`),
- []HeaderField{
- pair(":status", "200"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"),
- pair("location", "https://www.example.com"),
- pair("content-encoding", "gzip"),
- pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"),
- },
- []HeaderField{
- pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"),
- pair("content-encoding", "gzip"),
- pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"),
- },
- 215,
- },
- })
-}
-
-// http://http2.github.io/http2-spec/compression.html#rfc.section.C.6
-// "This section shows the same examples as the previous section, but
-// using Huffman encoding for the literal values. The HTTP/2 setting
-// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256
-// octets, causing some evictions to occur. The eviction mechanism
-// uses the length of the decoded literal values, so the same
-// evictions occurs as in the previous section."
-func TestDecodeC6_ResponsesHuffman(t *testing.T) {
- testDecodeSeries(t, 256, []encAndWant{
- {dehex(`
-4882 6402 5885 aec3 771a 4b61 96d0 7abe
-9410 54d4 44a8 2005 9504 0b81 66e0 82a6
-2d1b ff6e 919d 29ad 1718 63c7 8f0b 97c8
-e9ae 82ae 43d3
-`),
- []HeaderField{
- pair(":status", "302"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("location", "https://www.example.com"),
- },
- []HeaderField{
- pair("location", "https://www.example.com"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("cache-control", "private"),
- pair(":status", "302"),
- },
- 222,
- },
- {dehex("4883 640e ffc1 c0bf"),
- []HeaderField{
- pair(":status", "307"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("location", "https://www.example.com"),
- },
- []HeaderField{
- pair(":status", "307"),
- pair("location", "https://www.example.com"),
- pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"),
- pair("cache-control", "private"),
- },
- 222,
- },
- {dehex(`
-88c1 6196 d07a be94 1054 d444 a820 0595
-040b 8166 e084 a62d 1bff c05a 839b d9ab
-77ad 94e7 821d d7f2 e6c7 b335 dfdf cd5b
-3960 d5af 2708 7f36 72c1 ab27 0fb5 291f
-9587 3160 65c0 03ed 4ee5 b106 3d50 07
-`),
- []HeaderField{
- pair(":status", "200"),
- pair("cache-control", "private"),
- pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"),
- pair("location", "https://www.example.com"),
- pair("content-encoding", "gzip"),
- pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"),
- },
- []HeaderField{
- pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"),
- pair("content-encoding", "gzip"),
- pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"),
- },
- 215,
- },
- })
-}
-
-func testDecodeSeries(t *testing.T, size uint32, steps []encAndWant) {
- d := NewDecoder(size, nil)
- for i, step := range steps {
- hf, err := d.DecodeFull(step.enc)
- if err != nil {
- t.Fatalf("Error at step index %d: %v", i, err)
- }
- if !reflect.DeepEqual(hf, step.want) {
- t.Fatalf("At step index %d: Got headers %v; want %v", i, hf, step.want)
- }
- gotDynTab := d.dynTab.reverseCopy()
- if !reflect.DeepEqual(gotDynTab, step.wantDynTab) {
- t.Errorf("After step index %d, dynamic table = %v; want %v", i, gotDynTab, step.wantDynTab)
- }
- if d.dynTab.size != step.wantDynSize {
- t.Errorf("After step index %d, dynamic table size = %v; want %v", i, d.dynTab.size, step.wantDynSize)
- }
- }
-}
-
-func TestHuffmanDecodeExcessPadding(t *testing.T) {
- tests := [][]byte{
- {0xff}, // Padding Exceeds 7 bits
- {0x1f, 0xff}, // {"a", 1 byte excess padding}
- {0x1f, 0xff, 0xff}, // {"a", 2 byte excess padding}
- {0x1f, 0xff, 0xff, 0xff}, // {"a", 3 byte excess padding}
- {0xff, 0x9f, 0xff, 0xff, 0xff}, // {"a", 29 bit excess padding}
- {'R', 0xbc, '0', 0xff, 0xff, 0xff, 0xff}, // Padding ends on partial symbol.
- }
- for i, in := range tests {
- var buf bytes.Buffer
- if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman {
- t.Errorf("test-%d: decode(%q) = %v; want ErrInvalidHuffman", i, in, err)
- }
- }
-}
-
-func TestHuffmanDecodeEOS(t *testing.T) {
- in := []byte{0xff, 0xff, 0xff, 0xff, 0xfc} // {EOS, "?"}
- var buf bytes.Buffer
- if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman {
- t.Errorf("error = %v; want ErrInvalidHuffman", err)
- }
-}
-
-func TestHuffmanDecodeMaxLengthOnTrailingByte(t *testing.T) {
- in := []byte{0x00, 0x01} // {"0", "0", "0"}
- var buf bytes.Buffer
- if err := huffmanDecode(&buf, 2, in); err != ErrStringLength {
- t.Errorf("error = %v; want ErrStringLength", err)
- }
-}
-
-func TestHuffmanDecodeCorruptPadding(t *testing.T) {
- in := []byte{0x00}
- var buf bytes.Buffer
- if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman {
- t.Errorf("error = %v; want ErrInvalidHuffman", err)
- }
-}
-
-func TestHuffmanDecode(t *testing.T) {
- tests := []struct {
- inHex, want string
- }{
- {"f1e3 c2e5 f23a 6ba0 ab90 f4ff", "www.example.com"},
- {"a8eb 1064 9cbf", "no-cache"},
- {"25a8 49e9 5ba9 7d7f", "custom-key"},
- {"25a8 49e9 5bb8 e8b4 bf", "custom-value"},
- {"6402", "302"},
- {"aec3 771a 4b", "private"},
- {"d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff", "Mon, 21 Oct 2013 20:13:21 GMT"},
- {"9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3", "https://www.example.com"},
- {"9bd9 ab", "gzip"},
- {"94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07",
- "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"},
- }
- for i, tt := range tests {
- var buf bytes.Buffer
- in, err := hex.DecodeString(strings.Replace(tt.inHex, " ", "", -1))
- if err != nil {
- t.Errorf("%d. hex input error: %v", i, err)
- continue
- }
- if _, err := HuffmanDecode(&buf, in); err != nil {
- t.Errorf("%d. decode error: %v", i, err)
- continue
- }
- if got := buf.String(); tt.want != got {
- t.Errorf("%d. decode = %q; want %q", i, got, tt.want)
- }
- }
-}
-
-func TestAppendHuffmanString(t *testing.T) {
- tests := []struct {
- in, want string
- }{
- {"www.example.com", "f1e3 c2e5 f23a 6ba0 ab90 f4ff"},
- {"no-cache", "a8eb 1064 9cbf"},
- {"custom-key", "25a8 49e9 5ba9 7d7f"},
- {"custom-value", "25a8 49e9 5bb8 e8b4 bf"},
- {"302", "6402"},
- {"private", "aec3 771a 4b"},
- {"Mon, 21 Oct 2013 20:13:21 GMT", "d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff"},
- {"https://www.example.com", "9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3"},
- {"gzip", "9bd9 ab"},
- {"foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1",
- "94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07"},
- }
- for i, tt := range tests {
- buf := []byte{}
- want := strings.Replace(tt.want, " ", "", -1)
- buf = AppendHuffmanString(buf, tt.in)
- if got := hex.EncodeToString(buf); want != got {
- t.Errorf("%d. encode = %q; want %q", i, got, want)
- }
- }
-}
-
-func TestHuffmanMaxStrLen(t *testing.T) {
- const msg = "Some string"
- huff := AppendHuffmanString(nil, msg)
-
- testGood := func(max int) {
- var out bytes.Buffer
- if err := huffmanDecode(&out, max, huff); err != nil {
- t.Errorf("For maxLen=%d, unexpected error: %v", max, err)
- }
- if out.String() != msg {
- t.Errorf("For maxLen=%d, out = %q; want %q", max, out.String(), msg)
- }
- }
- testGood(0)
- testGood(len(msg))
- testGood(len(msg) + 1)
-
- var out bytes.Buffer
- if err := huffmanDecode(&out, len(msg)-1, huff); err != ErrStringLength {
- t.Errorf("err = %v; want ErrStringLength", err)
- }
-}
-
-func TestHuffmanRoundtripStress(t *testing.T) {
- const Len = 50 // of uncompressed string
- input := make([]byte, Len)
- var output bytes.Buffer
- var huff []byte
-
- n := 5000
- if testing.Short() {
- n = 100
- }
- seed := time.Now().UnixNano()
- t.Logf("Seed = %v", seed)
- src := rand.New(rand.NewSource(seed))
- var encSize int64
- for i := 0; i < n; i++ {
- for l := range input {
- input[l] = byte(src.Intn(256))
- }
- huff = AppendHuffmanString(huff[:0], string(input))
- encSize += int64(len(huff))
- output.Reset()
- if err := huffmanDecode(&output, 0, huff); err != nil {
- t.Errorf("Failed to decode %q -> %q -> error %v", input, huff, err)
- continue
- }
- if !bytes.Equal(output.Bytes(), input) {
- t.Errorf("Roundtrip failure on %q -> %q -> %q", input, huff, output.Bytes())
- }
- }
- t.Logf("Compressed size of original: %0.02f%% (%v -> %v)", 100*(float64(encSize)/(Len*float64(n))), Len*n, encSize)
-}
-
-func TestHuffmanDecodeFuzz(t *testing.T) {
- const Len = 50 // of compressed
- var buf, zbuf bytes.Buffer
-
- n := 5000
- if testing.Short() {
- n = 100
- }
- seed := time.Now().UnixNano()
- t.Logf("Seed = %v", seed)
- src := rand.New(rand.NewSource(seed))
- numFail := 0
- for i := 0; i < n; i++ {
- zbuf.Reset()
- if i == 0 {
- // Start with at least one invalid one.
- zbuf.WriteString("00\x91\xff\xff\xff\xff\xc8")
- } else {
- for l := 0; l < Len; l++ {
- zbuf.WriteByte(byte(src.Intn(256)))
- }
- }
-
- buf.Reset()
- if err := huffmanDecode(&buf, 0, zbuf.Bytes()); err != nil {
- if err == ErrInvalidHuffman {
- numFail++
- continue
- }
- t.Errorf("Failed to decode %q: %v", zbuf.Bytes(), err)
- continue
- }
- }
- t.Logf("%0.02f%% are invalid (%d / %d)", 100*float64(numFail)/float64(n), numFail, n)
- if numFail < 1 {
- t.Error("expected at least one invalid huffman encoding (test starts with one)")
- }
-}
-
-func TestReadVarInt(t *testing.T) {
- type res struct {
- i uint64
- consumed int
- err error
- }
- tests := []struct {
- n byte
- p []byte
- want res
- }{
- // Fits in a byte:
- {1, []byte{0}, res{0, 1, nil}},
- {2, []byte{2}, res{2, 1, nil}},
- {3, []byte{6}, res{6, 1, nil}},
- {4, []byte{14}, res{14, 1, nil}},
- {5, []byte{30}, res{30, 1, nil}},
- {6, []byte{62}, res{62, 1, nil}},
- {7, []byte{126}, res{126, 1, nil}},
- {8, []byte{254}, res{254, 1, nil}},
-
- // Doesn't fit in a byte:
- {1, []byte{1}, res{0, 0, errNeedMore}},
- {2, []byte{3}, res{0, 0, errNeedMore}},
- {3, []byte{7}, res{0, 0, errNeedMore}},
- {4, []byte{15}, res{0, 0, errNeedMore}},
- {5, []byte{31}, res{0, 0, errNeedMore}},
- {6, []byte{63}, res{0, 0, errNeedMore}},
- {7, []byte{127}, res{0, 0, errNeedMore}},
- {8, []byte{255}, res{0, 0, errNeedMore}},
-
- // Ignoring top bits:
- {5, []byte{255, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 111
- {5, []byte{159, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 100
- {5, []byte{191, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 101
-
- // Extra byte:
- {5, []byte{191, 154, 10, 2}, res{1337, 3, nil}}, // extra byte
-
- // Short a byte:
- {5, []byte{191, 154}, res{0, 0, errNeedMore}},
-
- // integer overflow:
- {1, []byte{255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, res{0, 0, errVarintOverflow}},
- }
- for _, tt := range tests {
- i, remain, err := readVarInt(tt.n, tt.p)
- consumed := len(tt.p) - len(remain)
- got := res{i, consumed, err}
- if got != tt.want {
- t.Errorf("readVarInt(%d, %v ~ %x) = %+v; want %+v", tt.n, tt.p, tt.p, got, tt.want)
- }
- }
-}
-
-// Fuzz crash, originally reported at https://github.com/bradfitz/http2/issues/56
-func TestHuffmanFuzzCrash(t *testing.T) {
- got, err := HuffmanDecodeToString([]byte("00\x91\xff\xff\xff\xff\xc8"))
- if got != "" {
- t.Errorf("Got %q; want empty string", got)
- }
- if err != ErrInvalidHuffman {
- t.Errorf("Err = %v; want ErrInvalidHuffman", err)
- }
-}
-
-func pair(name, value string) HeaderField {
- return HeaderField{Name: name, Value: value}
-}
-
-func dehex(s string) []byte {
- s = strings.Replace(s, " ", "", -1)
- s = strings.Replace(s, "\n", "", -1)
- b, err := hex.DecodeString(s)
- if err != nil {
- panic(err)
- }
- return b
-}
-
-func TestEmitEnabled(t *testing.T) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- enc.WriteField(HeaderField{Name: "foo", Value: "bar"})
- enc.WriteField(HeaderField{Name: "foo", Value: "bar"})
-
- numCallback := 0
- var dec *Decoder
- dec = NewDecoder(8<<20, func(HeaderField) {
- numCallback++
- dec.SetEmitEnabled(false)
- })
- if !dec.EmitEnabled() {
- t.Errorf("initial emit enabled = false; want true")
- }
- if _, err := dec.Write(buf.Bytes()); err != nil {
- t.Error(err)
- }
- if numCallback != 1 {
- t.Errorf("num callbacks = %d; want 1", numCallback)
- }
- if dec.EmitEnabled() {
- t.Errorf("emit enabled = true; want false")
- }
-}
-
-func TestSaveBufLimit(t *testing.T) {
- const maxStr = 1 << 10
- var got []HeaderField
- dec := NewDecoder(initialHeaderTableSize, func(hf HeaderField) {
- got = append(got, hf)
- })
- dec.SetMaxStringLength(maxStr)
- var frag []byte
- frag = append(frag[:0], encodeTypeByte(false, false))
- frag = appendVarInt(frag, 7, 3)
- frag = append(frag, "foo"...)
- frag = appendVarInt(frag, 7, 3)
- frag = append(frag, "bar"...)
-
- if _, err := dec.Write(frag); err != nil {
- t.Fatal(err)
- }
-
- want := []HeaderField{{Name: "foo", Value: "bar"}}
- if !reflect.DeepEqual(got, want) {
- t.Errorf("After small writes, got %v; want %v", got, want)
- }
-
- frag = append(frag[:0], encodeTypeByte(false, false))
- frag = appendVarInt(frag, 7, maxStr*3)
- frag = append(frag, make([]byte, maxStr*3)...)
-
- _, err := dec.Write(frag)
- if err != ErrStringLength {
- t.Fatalf("Write error = %v; want ErrStringLength", err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/huffman.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/huffman.go
deleted file mode 100644
index 8850e3946..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/huffman.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2014 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 file.
-
-package hpack
-
-import (
- "bytes"
- "errors"
- "io"
- "sync"
-)
-
-var bufPool = sync.Pool{
- New: func() interface{} { return new(bytes.Buffer) },
-}
-
-// HuffmanDecode decodes the string in v and writes the expanded
-// result to w, returning the number of bytes written to w and the
-// Write call's return value. At most one Write call is made.
-func HuffmanDecode(w io.Writer, v []byte) (int, error) {
- buf := bufPool.Get().(*bytes.Buffer)
- buf.Reset()
- defer bufPool.Put(buf)
- if err := huffmanDecode(buf, 0, v); err != nil {
- return 0, err
- }
- return w.Write(buf.Bytes())
-}
-
-// HuffmanDecodeToString decodes the string in v.
-func HuffmanDecodeToString(v []byte) (string, error) {
- buf := bufPool.Get().(*bytes.Buffer)
- buf.Reset()
- defer bufPool.Put(buf)
- if err := huffmanDecode(buf, 0, v); err != nil {
- return "", err
- }
- return buf.String(), nil
-}
-
-// ErrInvalidHuffman is returned for errors found decoding
-// Huffman-encoded strings.
-var ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data")
-
-// huffmanDecode decodes v to buf.
-// If maxLen is greater than 0, attempts to write more to buf than
-// maxLen bytes will return ErrStringLength.
-func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
- n := rootHuffmanNode
- // cur is the bit buffer that has not been fed into n.
- // cbits is the number of low order bits in cur that are valid.
- // sbits is the number of bits of the symbol prefix being decoded.
- cur, cbits, sbits := uint(0), uint8(0), uint8(0)
- for _, b := range v {
- cur = cur<<8 | uint(b)
- cbits += 8
- sbits += 8
- for cbits >= 8 {
- idx := byte(cur >> (cbits - 8))
- n = n.children[idx]
- if n == nil {
- return ErrInvalidHuffman
- }
- if n.children == nil {
- if maxLen != 0 && buf.Len() == maxLen {
- return ErrStringLength
- }
- buf.WriteByte(n.sym)
- cbits -= n.codeLen
- n = rootHuffmanNode
- sbits = cbits
- } else {
- cbits -= 8
- }
- }
- }
- for cbits > 0 {
- n = n.children[byte(cur<<(8-cbits))]
- if n == nil {
- return ErrInvalidHuffman
- }
- if n.children != nil || n.codeLen > cbits {
- break
- }
- if maxLen != 0 && buf.Len() == maxLen {
- return ErrStringLength
- }
- buf.WriteByte(n.sym)
- cbits -= n.codeLen
- n = rootHuffmanNode
- sbits = cbits
- }
- if sbits > 7 {
- // Either there was an incomplete symbol, or overlong padding.
- // Both are decoding errors per RFC 7541 section 5.2.
- return ErrInvalidHuffman
- }
- if mask := uint(1<<cbits - 1); cur&mask != mask {
- // Trailing bits must be a prefix of EOS per RFC 7541 section 5.2.
- return ErrInvalidHuffman
- }
-
- return nil
-}
-
-type node struct {
- // children is non-nil for internal nodes
- children []*node
-
- // The following are only valid if children is nil:
- codeLen uint8 // number of bits that led to the output of sym
- sym byte // output symbol
-}
-
-func newInternalNode() *node {
- return &node{children: make([]*node, 256)}
-}
-
-var rootHuffmanNode = newInternalNode()
-
-func init() {
- if len(huffmanCodes) != 256 {
- panic("unexpected size")
- }
- for i, code := range huffmanCodes {
- addDecoderNode(byte(i), code, huffmanCodeLen[i])
- }
-}
-
-func addDecoderNode(sym byte, code uint32, codeLen uint8) {
- cur := rootHuffmanNode
- for codeLen > 8 {
- codeLen -= 8
- i := uint8(code >> codeLen)
- if cur.children[i] == nil {
- cur.children[i] = newInternalNode()
- }
- cur = cur.children[i]
- }
- shift := 8 - codeLen
- start, end := int(uint8(code<<shift)), int(1<<shift)
- for i := start; i < start+end; i++ {
- cur.children[i] = &node{sym: sym, codeLen: codeLen}
- }
-}
-
-// AppendHuffmanString appends s, as encoded in Huffman codes, to dst
-// and returns the extended buffer.
-func AppendHuffmanString(dst []byte, s string) []byte {
- rembits := uint8(8)
-
- for i := 0; i < len(s); i++ {
- if rembits == 8 {
- dst = append(dst, 0)
- }
- dst, rembits = appendByteToHuffmanCode(dst, rembits, s[i])
- }
-
- if rembits < 8 {
- // special EOS symbol
- code := uint32(0x3fffffff)
- nbits := uint8(30)
-
- t := uint8(code >> (nbits - rembits))
- dst[len(dst)-1] |= t
- }
-
- return dst
-}
-
-// HuffmanEncodeLength returns the number of bytes required to encode
-// s in Huffman codes. The result is round up to byte boundary.
-func HuffmanEncodeLength(s string) uint64 {
- n := uint64(0)
- for i := 0; i < len(s); i++ {
- n += uint64(huffmanCodeLen[s[i]])
- }
- return (n + 7) / 8
-}
-
-// appendByteToHuffmanCode appends Huffman code for c to dst and
-// returns the extended buffer and the remaining bits in the last
-// element. The appending is not byte aligned and the remaining bits
-// in the last element of dst is given in rembits.
-func appendByteToHuffmanCode(dst []byte, rembits uint8, c byte) ([]byte, uint8) {
- code := huffmanCodes[c]
- nbits := huffmanCodeLen[c]
-
- for {
- if rembits > nbits {
- t := uint8(code << (rembits - nbits))
- dst[len(dst)-1] |= t
- rembits -= nbits
- break
- }
-
- t := uint8(code >> (nbits - rembits))
- dst[len(dst)-1] |= t
-
- nbits -= rembits
- rembits = 8
-
- if nbits == 0 {
- break
- }
-
- dst = append(dst, 0)
- }
-
- return dst, rembits
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables.go
deleted file mode 100644
index a66cfbea6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables.go
+++ /dev/null
@@ -1,479 +0,0 @@
-// Copyright 2014 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 file.
-
-package hpack
-
-import (
- "fmt"
-)
-
-// headerFieldTable implements a list of HeaderFields.
-// This is used to implement the static and dynamic tables.
-type headerFieldTable struct {
- // For static tables, entries are never evicted.
- //
- // For dynamic tables, entries are evicted from ents[0] and added to the end.
- // Each entry has a unique id that starts at one and increments for each
- // entry that is added. This unique id is stable across evictions, meaning
- // it can be used as a pointer to a specific entry. As in hpack, unique ids
- // are 1-based. The unique id for ents[k] is k + evictCount + 1.
- //
- // Zero is not a valid unique id.
- //
- // evictCount should not overflow in any remotely practical situation. In
- // practice, we will have one dynamic table per HTTP/2 connection. If we
- // assume a very powerful server that handles 1M QPS per connection and each
- // request adds (then evicts) 100 entries from the table, it would still take
- // 2M years for evictCount to overflow.
- ents []HeaderField
- evictCount uint64
-
- // byName maps a HeaderField name to the unique id of the newest entry with
- // the same name. See above for a definition of "unique id".
- byName map[string]uint64
-
- // byNameValue maps a HeaderField name/value pair to the unique id of the newest
- // entry with the same name and value. See above for a definition of "unique id".
- byNameValue map[pairNameValue]uint64
-}
-
-type pairNameValue struct {
- name, value string
-}
-
-func (t *headerFieldTable) init() {
- t.byName = make(map[string]uint64)
- t.byNameValue = make(map[pairNameValue]uint64)
-}
-
-// len reports the number of entries in the table.
-func (t *headerFieldTable) len() int {
- return len(t.ents)
-}
-
-// addEntry adds a new entry.
-func (t *headerFieldTable) addEntry(f HeaderField) {
- id := uint64(t.len()) + t.evictCount + 1
- t.byName[f.Name] = id
- t.byNameValue[pairNameValue{f.Name, f.Value}] = id
- t.ents = append(t.ents, f)
-}
-
-// evictOldest evicts the n oldest entries in the table.
-func (t *headerFieldTable) evictOldest(n int) {
- if n > t.len() {
- panic(fmt.Sprintf("evictOldest(%v) on table with %v entries", n, t.len()))
- }
- for k := 0; k < n; k++ {
- f := t.ents[k]
- id := t.evictCount + uint64(k) + 1
- if t.byName[f.Name] == id {
- delete(t.byName, f.Name)
- }
- if p := (pairNameValue{f.Name, f.Value}); t.byNameValue[p] == id {
- delete(t.byNameValue, p)
- }
- }
- copy(t.ents, t.ents[n:])
- for k := t.len() - n; k < t.len(); k++ {
- t.ents[k] = HeaderField{} // so strings can be garbage collected
- }
- t.ents = t.ents[:t.len()-n]
- if t.evictCount+uint64(n) < t.evictCount {
- panic("evictCount overflow")
- }
- t.evictCount += uint64(n)
-}
-
-// search finds f in the table. If there is no match, i is 0.
-// If both name and value match, i is the matched index and nameValueMatch
-// becomes true. If only name matches, i points to that index and
-// nameValueMatch becomes false.
-//
-// The returned index is a 1-based HPACK index. For dynamic tables, HPACK says
-// that index 1 should be the newest entry, but t.ents[0] is the oldest entry,
-// meaning t.ents is reversed for dynamic tables. Hence, when t is a dynamic
-// table, the return value i actually refers to the entry t.ents[t.len()-i].
-//
-// All tables are assumed to be a dynamic tables except for the global
-// staticTable pointer.
-//
-// See Section 2.3.3.
-func (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) {
- if !f.Sensitive {
- if id := t.byNameValue[pairNameValue{f.Name, f.Value}]; id != 0 {
- return t.idToIndex(id), true
- }
- }
- if id := t.byName[f.Name]; id != 0 {
- return t.idToIndex(id), false
- }
- return 0, false
-}
-
-// idToIndex converts a unique id to an HPACK index.
-// See Section 2.3.3.
-func (t *headerFieldTable) idToIndex(id uint64) uint64 {
- if id <= t.evictCount {
- panic(fmt.Sprintf("id (%v) <= evictCount (%v)", id, t.evictCount))
- }
- k := id - t.evictCount - 1 // convert id to an index t.ents[k]
- if t != staticTable {
- return uint64(t.len()) - k // dynamic table
- }
- return k + 1
-}
-
-// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B
-var staticTable = newStaticTable()
-var staticTableEntries = [...]HeaderField{
- {Name: ":authority"},
- {Name: ":method", Value: "GET"},
- {Name: ":method", Value: "POST"},
- {Name: ":path", Value: "/"},
- {Name: ":path", Value: "/index.html"},
- {Name: ":scheme", Value: "http"},
- {Name: ":scheme", Value: "https"},
- {Name: ":status", Value: "200"},
- {Name: ":status", Value: "204"},
- {Name: ":status", Value: "206"},
- {Name: ":status", Value: "304"},
- {Name: ":status", Value: "400"},
- {Name: ":status", Value: "404"},
- {Name: ":status", Value: "500"},
- {Name: "accept-charset"},
- {Name: "accept-encoding", Value: "gzip, deflate"},
- {Name: "accept-language"},
- {Name: "accept-ranges"},
- {Name: "accept"},
- {Name: "access-control-allow-origin"},
- {Name: "age"},
- {Name: "allow"},
- {Name: "authorization"},
- {Name: "cache-control"},
- {Name: "content-disposition"},
- {Name: "content-encoding"},
- {Name: "content-language"},
- {Name: "content-length"},
- {Name: "content-location"},
- {Name: "content-range"},
- {Name: "content-type"},
- {Name: "cookie"},
- {Name: "date"},
- {Name: "etag"},
- {Name: "expect"},
- {Name: "expires"},
- {Name: "from"},
- {Name: "host"},
- {Name: "if-match"},
- {Name: "if-modified-since"},
- {Name: "if-none-match"},
- {Name: "if-range"},
- {Name: "if-unmodified-since"},
- {Name: "last-modified"},
- {Name: "link"},
- {Name: "location"},
- {Name: "max-forwards"},
- {Name: "proxy-authenticate"},
- {Name: "proxy-authorization"},
- {Name: "range"},
- {Name: "referer"},
- {Name: "refresh"},
- {Name: "retry-after"},
- {Name: "server"},
- {Name: "set-cookie"},
- {Name: "strict-transport-security"},
- {Name: "transfer-encoding"},
- {Name: "user-agent"},
- {Name: "vary"},
- {Name: "via"},
- {Name: "www-authenticate"},
-}
-
-func newStaticTable() *headerFieldTable {
- t := &headerFieldTable{}
- t.init()
- for _, e := range staticTableEntries[:] {
- t.addEntry(e)
- }
- return t
-}
-
-var huffmanCodes = [256]uint32{
- 0x1ff8,
- 0x7fffd8,
- 0xfffffe2,
- 0xfffffe3,
- 0xfffffe4,
- 0xfffffe5,
- 0xfffffe6,
- 0xfffffe7,
- 0xfffffe8,
- 0xffffea,
- 0x3ffffffc,
- 0xfffffe9,
- 0xfffffea,
- 0x3ffffffd,
- 0xfffffeb,
- 0xfffffec,
- 0xfffffed,
- 0xfffffee,
- 0xfffffef,
- 0xffffff0,
- 0xffffff1,
- 0xffffff2,
- 0x3ffffffe,
- 0xffffff3,
- 0xffffff4,
- 0xffffff5,
- 0xffffff6,
- 0xffffff7,
- 0xffffff8,
- 0xffffff9,
- 0xffffffa,
- 0xffffffb,
- 0x14,
- 0x3f8,
- 0x3f9,
- 0xffa,
- 0x1ff9,
- 0x15,
- 0xf8,
- 0x7fa,
- 0x3fa,
- 0x3fb,
- 0xf9,
- 0x7fb,
- 0xfa,
- 0x16,
- 0x17,
- 0x18,
- 0x0,
- 0x1,
- 0x2,
- 0x19,
- 0x1a,
- 0x1b,
- 0x1c,
- 0x1d,
- 0x1e,
- 0x1f,
- 0x5c,
- 0xfb,
- 0x7ffc,
- 0x20,
- 0xffb,
- 0x3fc,
- 0x1ffa,
- 0x21,
- 0x5d,
- 0x5e,
- 0x5f,
- 0x60,
- 0x61,
- 0x62,
- 0x63,
- 0x64,
- 0x65,
- 0x66,
- 0x67,
- 0x68,
- 0x69,
- 0x6a,
- 0x6b,
- 0x6c,
- 0x6d,
- 0x6e,
- 0x6f,
- 0x70,
- 0x71,
- 0x72,
- 0xfc,
- 0x73,
- 0xfd,
- 0x1ffb,
- 0x7fff0,
- 0x1ffc,
- 0x3ffc,
- 0x22,
- 0x7ffd,
- 0x3,
- 0x23,
- 0x4,
- 0x24,
- 0x5,
- 0x25,
- 0x26,
- 0x27,
- 0x6,
- 0x74,
- 0x75,
- 0x28,
- 0x29,
- 0x2a,
- 0x7,
- 0x2b,
- 0x76,
- 0x2c,
- 0x8,
- 0x9,
- 0x2d,
- 0x77,
- 0x78,
- 0x79,
- 0x7a,
- 0x7b,
- 0x7ffe,
- 0x7fc,
- 0x3ffd,
- 0x1ffd,
- 0xffffffc,
- 0xfffe6,
- 0x3fffd2,
- 0xfffe7,
- 0xfffe8,
- 0x3fffd3,
- 0x3fffd4,
- 0x3fffd5,
- 0x7fffd9,
- 0x3fffd6,
- 0x7fffda,
- 0x7fffdb,
- 0x7fffdc,
- 0x7fffdd,
- 0x7fffde,
- 0xffffeb,
- 0x7fffdf,
- 0xffffec,
- 0xffffed,
- 0x3fffd7,
- 0x7fffe0,
- 0xffffee,
- 0x7fffe1,
- 0x7fffe2,
- 0x7fffe3,
- 0x7fffe4,
- 0x1fffdc,
- 0x3fffd8,
- 0x7fffe5,
- 0x3fffd9,
- 0x7fffe6,
- 0x7fffe7,
- 0xffffef,
- 0x3fffda,
- 0x1fffdd,
- 0xfffe9,
- 0x3fffdb,
- 0x3fffdc,
- 0x7fffe8,
- 0x7fffe9,
- 0x1fffde,
- 0x7fffea,
- 0x3fffdd,
- 0x3fffde,
- 0xfffff0,
- 0x1fffdf,
- 0x3fffdf,
- 0x7fffeb,
- 0x7fffec,
- 0x1fffe0,
- 0x1fffe1,
- 0x3fffe0,
- 0x1fffe2,
- 0x7fffed,
- 0x3fffe1,
- 0x7fffee,
- 0x7fffef,
- 0xfffea,
- 0x3fffe2,
- 0x3fffe3,
- 0x3fffe4,
- 0x7ffff0,
- 0x3fffe5,
- 0x3fffe6,
- 0x7ffff1,
- 0x3ffffe0,
- 0x3ffffe1,
- 0xfffeb,
- 0x7fff1,
- 0x3fffe7,
- 0x7ffff2,
- 0x3fffe8,
- 0x1ffffec,
- 0x3ffffe2,
- 0x3ffffe3,
- 0x3ffffe4,
- 0x7ffffde,
- 0x7ffffdf,
- 0x3ffffe5,
- 0xfffff1,
- 0x1ffffed,
- 0x7fff2,
- 0x1fffe3,
- 0x3ffffe6,
- 0x7ffffe0,
- 0x7ffffe1,
- 0x3ffffe7,
- 0x7ffffe2,
- 0xfffff2,
- 0x1fffe4,
- 0x1fffe5,
- 0x3ffffe8,
- 0x3ffffe9,
- 0xffffffd,
- 0x7ffffe3,
- 0x7ffffe4,
- 0x7ffffe5,
- 0xfffec,
- 0xfffff3,
- 0xfffed,
- 0x1fffe6,
- 0x3fffe9,
- 0x1fffe7,
- 0x1fffe8,
- 0x7ffff3,
- 0x3fffea,
- 0x3fffeb,
- 0x1ffffee,
- 0x1ffffef,
- 0xfffff4,
- 0xfffff5,
- 0x3ffffea,
- 0x7ffff4,
- 0x3ffffeb,
- 0x7ffffe6,
- 0x3ffffec,
- 0x3ffffed,
- 0x7ffffe7,
- 0x7ffffe8,
- 0x7ffffe9,
- 0x7ffffea,
- 0x7ffffeb,
- 0xffffffe,
- 0x7ffffec,
- 0x7ffffed,
- 0x7ffffee,
- 0x7ffffef,
- 0x7fffff0,
- 0x3ffffee,
-}
-
-var huffmanCodeLen = [256]uint8{
- 13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28,
- 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6,
- 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10,
- 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6,
- 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5,
- 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28,
- 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23,
- 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24,
- 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23,
- 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23,
- 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25,
- 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27,
- 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23,
- 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26,
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables_test.go
deleted file mode 100644
index d963f3635..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/hpack/tables_test.go
+++ /dev/null
@@ -1,214 +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 file.
-
-package hpack
-
-import (
- "bufio"
- "regexp"
- "strconv"
- "strings"
- "testing"
-)
-
-func TestHeaderFieldTable(t *testing.T) {
- table := &headerFieldTable{}
- table.init()
- table.addEntry(pair("key1", "value1-1"))
- table.addEntry(pair("key2", "value2-1"))
- table.addEntry(pair("key1", "value1-2"))
- table.addEntry(pair("key3", "value3-1"))
- table.addEntry(pair("key4", "value4-1"))
- table.addEntry(pair("key2", "value2-2"))
-
- // Tests will be run twice: once before evicting anything, and
- // again after evicting the three oldest entries.
- tests := []struct {
- f HeaderField
- beforeWantStaticI uint64
- beforeWantMatch bool
- afterWantStaticI uint64
- afterWantMatch bool
- }{
- {HeaderField{"key1", "value1-1", false}, 1, true, 0, false},
- {HeaderField{"key1", "value1-2", false}, 3, true, 0, false},
- {HeaderField{"key1", "value1-3", false}, 3, false, 0, false},
- {HeaderField{"key2", "value2-1", false}, 2, true, 3, false},
- {HeaderField{"key2", "value2-2", false}, 6, true, 3, true},
- {HeaderField{"key2", "value2-3", false}, 6, false, 3, false},
- {HeaderField{"key4", "value4-1", false}, 5, true, 2, true},
- // Name match only, because sensitive.
- {HeaderField{"key4", "value4-1", true}, 5, false, 2, false},
- // Key not found.
- {HeaderField{"key5", "value5-x", false}, 0, false, 0, false},
- }
-
- staticToDynamic := func(i uint64) uint64 {
- if i == 0 {
- return 0
- }
- return uint64(table.len()) - i + 1 // dynamic is the reversed table
- }
-
- searchStatic := func(f HeaderField) (uint64, bool) {
- old := staticTable
- staticTable = table
- defer func() { staticTable = old }()
- return staticTable.search(f)
- }
-
- searchDynamic := func(f HeaderField) (uint64, bool) {
- return table.search(f)
- }
-
- for _, test := range tests {
- gotI, gotMatch := searchStatic(test.f)
- if wantI, wantMatch := test.beforeWantStaticI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch {
- t.Errorf("before evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch)
- }
- gotI, gotMatch = searchDynamic(test.f)
- wantDynamicI := staticToDynamic(test.beforeWantStaticI)
- if wantI, wantMatch := wantDynamicI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch {
- t.Errorf("before evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch)
- }
- }
-
- table.evictOldest(3)
-
- for _, test := range tests {
- gotI, gotMatch := searchStatic(test.f)
- if wantI, wantMatch := test.afterWantStaticI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch {
- t.Errorf("after evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch)
- }
- gotI, gotMatch = searchDynamic(test.f)
- wantDynamicI := staticToDynamic(test.afterWantStaticI)
- if wantI, wantMatch := wantDynamicI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch {
- t.Errorf("after evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch)
- }
- }
-}
-
-func TestHeaderFieldTable_LookupMapEviction(t *testing.T) {
- table := &headerFieldTable{}
- table.init()
- table.addEntry(pair("key1", "value1-1"))
- table.addEntry(pair("key2", "value2-1"))
- table.addEntry(pair("key1", "value1-2"))
- table.addEntry(pair("key3", "value3-1"))
- table.addEntry(pair("key4", "value4-1"))
- table.addEntry(pair("key2", "value2-2"))
-
- // evict all pairs
- table.evictOldest(table.len())
-
- if l := table.len(); l > 0 {
- t.Errorf("table.len() = %d, want 0", l)
- }
-
- if l := len(table.byName); l > 0 {
- t.Errorf("len(table.byName) = %d, want 0", l)
- }
-
- if l := len(table.byNameValue); l > 0 {
- t.Errorf("len(table.byNameValue) = %d, want 0", l)
- }
-}
-
-func TestStaticTable(t *testing.T) {
- fromSpec := `
- +-------+-----------------------------+---------------+
- | 1 | :authority | |
- | 2 | :method | GET |
- | 3 | :method | POST |
- | 4 | :path | / |
- | 5 | :path | /index.html |
- | 6 | :scheme | http |
- | 7 | :scheme | https |
- | 8 | :status | 200 |
- | 9 | :status | 204 |
- | 10 | :status | 206 |
- | 11 | :status | 304 |
- | 12 | :status | 400 |
- | 13 | :status | 404 |
- | 14 | :status | 500 |
- | 15 | accept-charset | |
- | 16 | accept-encoding | gzip, deflate |
- | 17 | accept-language | |
- | 18 | accept-ranges | |
- | 19 | accept | |
- | 20 | access-control-allow-origin | |
- | 21 | age | |
- | 22 | allow | |
- | 23 | authorization | |
- | 24 | cache-control | |
- | 25 | content-disposition | |
- | 26 | content-encoding | |
- | 27 | content-language | |
- | 28 | content-length | |
- | 29 | content-location | |
- | 30 | content-range | |
- | 31 | content-type | |
- | 32 | cookie | |
- | 33 | date | |
- | 34 | etag | |
- | 35 | expect | |
- | 36 | expires | |
- | 37 | from | |
- | 38 | host | |
- | 39 | if-match | |
- | 40 | if-modified-since | |
- | 41 | if-none-match | |
- | 42 | if-range | |
- | 43 | if-unmodified-since | |
- | 44 | last-modified | |
- | 45 | link | |
- | 46 | location | |
- | 47 | max-forwards | |
- | 48 | proxy-authenticate | |
- | 49 | proxy-authorization | |
- | 50 | range | |
- | 51 | referer | |
- | 52 | refresh | |
- | 53 | retry-after | |
- | 54 | server | |
- | 55 | set-cookie | |
- | 56 | strict-transport-security | |
- | 57 | transfer-encoding | |
- | 58 | user-agent | |
- | 59 | vary | |
- | 60 | via | |
- | 61 | www-authenticate | |
- +-------+-----------------------------+---------------+
-`
- bs := bufio.NewScanner(strings.NewReader(fromSpec))
- re := regexp.MustCompile(`\| (\d+)\s+\| (\S+)\s*\| (\S(.*\S)?)?\s+\|`)
- for bs.Scan() {
- l := bs.Text()
- if !strings.Contains(l, "|") {
- continue
- }
- m := re.FindStringSubmatch(l)
- if m == nil {
- continue
- }
- i, err := strconv.Atoi(m[1])
- if err != nil {
- t.Errorf("Bogus integer on line %q", l)
- continue
- }
- if i < 1 || i > staticTable.len() {
- t.Errorf("Bogus index %d on line %q", i, l)
- continue
- }
- if got, want := staticTable.ents[i-1].Name, m[2]; got != want {
- t.Errorf("header index %d name = %q; want %q", i, got, want)
- }
- if got, want := staticTable.ents[i-1].Value, m[3]; got != want {
- t.Errorf("header index %d value = %q; want %q", i, got, want)
- }
- }
- if err := bs.Err(); err != nil {
- t.Error(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2.go
deleted file mode 100644
index d565f40e0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2.go
+++ /dev/null
@@ -1,391 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package http2 implements the HTTP/2 protocol.
-//
-// This package is low-level and intended to be used directly by very
-// few people. Most users will use it indirectly through the automatic
-// use by the net/http package (from Go 1.6 and later).
-// For use in earlier Go versions see ConfigureServer. (Transport support
-// requires Go 1.6 or later)
-//
-// See https://http2.github.io/ for more information on HTTP/2.
-//
-// See https://http2.golang.org/ for a test server running this code.
-//
-package http2 // import "golang.org/x/net/http2"
-
-import (
- "bufio"
- "crypto/tls"
- "errors"
- "fmt"
- "io"
- "net/http"
- "os"
- "sort"
- "strconv"
- "strings"
- "sync"
-
- "golang.org/x/net/lex/httplex"
-)
-
-var (
- VerboseLogs bool
- logFrameWrites bool
- logFrameReads bool
- inTests bool
-)
-
-func init() {
- e := os.Getenv("GODEBUG")
- if strings.Contains(e, "http2debug=1") {
- VerboseLogs = true
- }
- if strings.Contains(e, "http2debug=2") {
- VerboseLogs = true
- logFrameWrites = true
- logFrameReads = true
- }
-}
-
-const (
- // ClientPreface is the string that must be sent by new
- // connections from clients.
- ClientPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
-
- // SETTINGS_MAX_FRAME_SIZE default
- // http://http2.github.io/http2-spec/#rfc.section.6.5.2
- initialMaxFrameSize = 16384
-
- // NextProtoTLS is the NPN/ALPN protocol negotiated during
- // HTTP/2's TLS setup.
- NextProtoTLS = "h2"
-
- // http://http2.github.io/http2-spec/#SettingValues
- initialHeaderTableSize = 4096
-
- initialWindowSize = 65535 // 6.9.2 Initial Flow Control Window Size
-
- defaultMaxReadFrameSize = 1 << 20
-)
-
-var (
- clientPreface = []byte(ClientPreface)
-)
-
-type streamState int
-
-// HTTP/2 stream states.
-//
-// See http://tools.ietf.org/html/rfc7540#section-5.1.
-//
-// For simplicity, the server code merges "reserved (local)" into
-// "half-closed (remote)". This is one less state transition to track.
-// The only downside is that we send PUSH_PROMISEs slightly less
-// liberally than allowable. More discussion here:
-// https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0599.html
-//
-// "reserved (remote)" is omitted since the client code does not
-// support server push.
-const (
- stateIdle streamState = iota
- stateOpen
- stateHalfClosedLocal
- stateHalfClosedRemote
- stateClosed
-)
-
-var stateName = [...]string{
- stateIdle: "Idle",
- stateOpen: "Open",
- stateHalfClosedLocal: "HalfClosedLocal",
- stateHalfClosedRemote: "HalfClosedRemote",
- stateClosed: "Closed",
-}
-
-func (st streamState) String() string {
- return stateName[st]
-}
-
-// Setting is a setting parameter: which setting it is, and its value.
-type Setting struct {
- // ID is which setting is being set.
- // See http://http2.github.io/http2-spec/#SettingValues
- ID SettingID
-
- // Val is the value.
- Val uint32
-}
-
-func (s Setting) String() string {
- return fmt.Sprintf("[%v = %d]", s.ID, s.Val)
-}
-
-// Valid reports whether the setting is valid.
-func (s Setting) Valid() error {
- // Limits and error codes from 6.5.2 Defined SETTINGS Parameters
- switch s.ID {
- case SettingEnablePush:
- if s.Val != 1 && s.Val != 0 {
- return ConnectionError(ErrCodeProtocol)
- }
- case SettingInitialWindowSize:
- if s.Val > 1<<31-1 {
- return ConnectionError(ErrCodeFlowControl)
- }
- case SettingMaxFrameSize:
- if s.Val < 16384 || s.Val > 1<<24-1 {
- return ConnectionError(ErrCodeProtocol)
- }
- }
- return nil
-}
-
-// A SettingID is an HTTP/2 setting as defined in
-// http://http2.github.io/http2-spec/#iana-settings
-type SettingID uint16
-
-const (
- SettingHeaderTableSize SettingID = 0x1
- SettingEnablePush SettingID = 0x2
- SettingMaxConcurrentStreams SettingID = 0x3
- SettingInitialWindowSize SettingID = 0x4
- SettingMaxFrameSize SettingID = 0x5
- SettingMaxHeaderListSize SettingID = 0x6
-)
-
-var settingName = map[SettingID]string{
- SettingHeaderTableSize: "HEADER_TABLE_SIZE",
- SettingEnablePush: "ENABLE_PUSH",
- SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS",
- SettingInitialWindowSize: "INITIAL_WINDOW_SIZE",
- SettingMaxFrameSize: "MAX_FRAME_SIZE",
- SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE",
-}
-
-func (s SettingID) String() string {
- if v, ok := settingName[s]; ok {
- return v
- }
- return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s))
-}
-
-var (
- errInvalidHeaderFieldName = errors.New("http2: invalid header field name")
- errInvalidHeaderFieldValue = errors.New("http2: invalid header field value")
-)
-
-// validWireHeaderFieldName reports whether v is a valid header field
-// name (key). See httplex.ValidHeaderName for the base rules.
-//
-// Further, http2 says:
-// "Just as in HTTP/1.x, header field names are strings of ASCII
-// characters that are compared in a case-insensitive
-// fashion. However, header field names MUST be converted to
-// lowercase prior to their encoding in HTTP/2. "
-func validWireHeaderFieldName(v string) bool {
- if len(v) == 0 {
- return false
- }
- for _, r := range v {
- if !httplex.IsTokenRune(r) {
- return false
- }
- if 'A' <= r && r <= 'Z' {
- return false
- }
- }
- return true
-}
-
-var httpCodeStringCommon = map[int]string{} // n -> strconv.Itoa(n)
-
-func init() {
- for i := 100; i <= 999; i++ {
- if v := http.StatusText(i); v != "" {
- httpCodeStringCommon[i] = strconv.Itoa(i)
- }
- }
-}
-
-func httpCodeString(code int) string {
- if s, ok := httpCodeStringCommon[code]; ok {
- return s
- }
- return strconv.Itoa(code)
-}
-
-// from pkg io
-type stringWriter interface {
- WriteString(s string) (n int, err error)
-}
-
-// A gate lets two goroutines coordinate their activities.
-type gate chan struct{}
-
-func (g gate) Done() { g <- struct{}{} }
-func (g gate) Wait() { <-g }
-
-// A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed).
-type closeWaiter chan struct{}
-
-// Init makes a closeWaiter usable.
-// It exists because so a closeWaiter value can be placed inside a
-// larger struct and have the Mutex and Cond's memory in the same
-// allocation.
-func (cw *closeWaiter) Init() {
- *cw = make(chan struct{})
-}
-
-// Close marks the closeWaiter as closed and unblocks any waiters.
-func (cw closeWaiter) Close() {
- close(cw)
-}
-
-// Wait waits for the closeWaiter to become closed.
-func (cw closeWaiter) Wait() {
- <-cw
-}
-
-// bufferedWriter is a buffered writer that writes to w.
-// Its buffered writer is lazily allocated as needed, to minimize
-// idle memory usage with many connections.
-type bufferedWriter struct {
- w io.Writer // immutable
- bw *bufio.Writer // non-nil when data is buffered
-}
-
-func newBufferedWriter(w io.Writer) *bufferedWriter {
- return &bufferedWriter{w: w}
-}
-
-// bufWriterPoolBufferSize is the size of bufio.Writer's
-// buffers created using bufWriterPool.
-//
-// TODO: pick a less arbitrary value? this is a bit under
-// (3 x typical 1500 byte MTU) at least. Other than that,
-// not much thought went into it.
-const bufWriterPoolBufferSize = 4 << 10
-
-var bufWriterPool = sync.Pool{
- New: func() interface{} {
- return bufio.NewWriterSize(nil, bufWriterPoolBufferSize)
- },
-}
-
-func (w *bufferedWriter) Available() int {
- if w.bw == nil {
- return bufWriterPoolBufferSize
- }
- return w.bw.Available()
-}
-
-func (w *bufferedWriter) Write(p []byte) (n int, err error) {
- if w.bw == nil {
- bw := bufWriterPool.Get().(*bufio.Writer)
- bw.Reset(w.w)
- w.bw = bw
- }
- return w.bw.Write(p)
-}
-
-func (w *bufferedWriter) Flush() error {
- bw := w.bw
- if bw == nil {
- return nil
- }
- err := bw.Flush()
- bw.Reset(nil)
- bufWriterPool.Put(bw)
- w.bw = nil
- return err
-}
-
-func mustUint31(v int32) uint32 {
- if v < 0 || v > 2147483647 {
- panic("out of range")
- }
- return uint32(v)
-}
-
-// bodyAllowedForStatus reports whether a given response status code
-// permits a body. See RFC 2616, section 4.4.
-func bodyAllowedForStatus(status int) bool {
- switch {
- case status >= 100 && status <= 199:
- return false
- case status == 204:
- return false
- case status == 304:
- return false
- }
- return true
-}
-
-type httpError struct {
- msg string
- timeout bool
-}
-
-func (e *httpError) Error() string { return e.msg }
-func (e *httpError) Timeout() bool { return e.timeout }
-func (e *httpError) Temporary() bool { return true }
-
-var errTimeout error = &httpError{msg: "http2: timeout awaiting response headers", timeout: true}
-
-type connectionStater interface {
- ConnectionState() tls.ConnectionState
-}
-
-var sorterPool = sync.Pool{New: func() interface{} { return new(sorter) }}
-
-type sorter struct {
- v []string // owned by sorter
-}
-
-func (s *sorter) Len() int { return len(s.v) }
-func (s *sorter) Swap(i, j int) { s.v[i], s.v[j] = s.v[j], s.v[i] }
-func (s *sorter) Less(i, j int) bool { return s.v[i] < s.v[j] }
-
-// Keys returns the sorted keys of h.
-//
-// The returned slice is only valid until s used again or returned to
-// its pool.
-func (s *sorter) Keys(h http.Header) []string {
- keys := s.v[:0]
- for k := range h {
- keys = append(keys, k)
- }
- s.v = keys
- sort.Sort(s)
- return keys
-}
-
-func (s *sorter) SortStrings(ss []string) {
- // Our sorter works on s.v, which sorter owns, so
- // stash it away while we sort the user's buffer.
- save := s.v
- s.v = ss
- sort.Sort(s)
- s.v = save
-}
-
-// validPseudoPath reports whether v is a valid :path pseudo-header
-// value. It must be either:
-//
-// *) a non-empty string starting with '/'
-// *) the string '*', for OPTIONS requests.
-//
-// For now this is only used a quick check for deciding when to clean
-// up Opaque URLs before sending requests from the Transport.
-// See golang.org/issue/16847
-//
-// We used to enforce that the path also didn't start with "//", but
-// Google's GFE accepts such paths and Chrome sends them, so ignore
-// that part of the spec. See golang.org/issue/19103.
-func validPseudoPath(v string) bool {
- return (len(v) > 0 && v[0] == '/') || v == "*"
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2_test.go
deleted file mode 100644
index 524877647..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/http2_test.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "errors"
- "flag"
- "fmt"
- "net/http"
- "os/exec"
- "strconv"
- "strings"
- "testing"
-
- "golang.org/x/net/http2/hpack"
-)
-
-var knownFailing = flag.Bool("known_failing", false, "Run known-failing tests.")
-
-func condSkipFailingTest(t *testing.T) {
- if !*knownFailing {
- t.Skip("Skipping known-failing test without --known_failing")
- }
-}
-
-func init() {
- inTests = true
- DebugGoroutines = true
- flag.BoolVar(&VerboseLogs, "verboseh2", VerboseLogs, "Verbose HTTP/2 debug logging")
-}
-
-func TestSettingString(t *testing.T) {
- tests := []struct {
- s Setting
- want string
- }{
- {Setting{SettingMaxFrameSize, 123}, "[MAX_FRAME_SIZE = 123]"},
- {Setting{1<<16 - 1, 123}, "[UNKNOWN_SETTING_65535 = 123]"},
- }
- for i, tt := range tests {
- got := fmt.Sprint(tt.s)
- if got != tt.want {
- t.Errorf("%d. for %#v, string = %q; want %q", i, tt.s, got, tt.want)
- }
- }
-}
-
-type twriter struct {
- t testing.TB
- st *serverTester // optional
-}
-
-func (w twriter) Write(p []byte) (n int, err error) {
- if w.st != nil {
- ps := string(p)
- for _, phrase := range w.st.logFilter {
- if strings.Contains(ps, phrase) {
- return len(p), nil // no logging
- }
- }
- }
- w.t.Logf("%s", p)
- return len(p), nil
-}
-
-// like encodeHeader, but don't add implicit pseudo headers.
-func encodeHeaderNoImplicit(t *testing.T, headers ...string) []byte {
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- for len(headers) > 0 {
- k, v := headers[0], headers[1]
- headers = headers[2:]
- if err := enc.WriteField(hpack.HeaderField{Name: k, Value: v}); err != nil {
- t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err)
- }
- }
- return buf.Bytes()
-}
-
-// Verify that curl has http2.
-func requireCurl(t *testing.T) {
- out, err := dockerLogs(curl(t, "--version"))
- if err != nil {
- t.Skipf("failed to determine curl features; skipping test")
- }
- if !strings.Contains(string(out), "HTTP2") {
- t.Skip("curl doesn't support HTTP2; skipping test")
- }
-}
-
-func curl(t *testing.T, args ...string) (container string) {
- out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "gohttp2/curl"}, args...)...).Output()
- if err != nil {
- t.Skipf("Failed to run curl in docker: %v, %s", err, out)
- }
- return strings.TrimSpace(string(out))
-}
-
-// Verify that h2load exists.
-func requireH2load(t *testing.T) {
- out, err := dockerLogs(h2load(t, "--version"))
- if err != nil {
- t.Skipf("failed to probe h2load; skipping test: %s", out)
- }
- if !strings.Contains(string(out), "h2load nghttp2/") {
- t.Skipf("h2load not present; skipping test. (Output=%q)", out)
- }
-}
-
-func h2load(t *testing.T, args ...string) (container string) {
- out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl"}, args...)...).Output()
- if err != nil {
- t.Skipf("Failed to run h2load in docker: %v, %s", err, out)
- }
- return strings.TrimSpace(string(out))
-}
-
-type puppetCommand struct {
- fn func(w http.ResponseWriter, r *http.Request)
- done chan<- bool
-}
-
-type handlerPuppet struct {
- ch chan puppetCommand
-}
-
-func newHandlerPuppet() *handlerPuppet {
- return &handlerPuppet{
- ch: make(chan puppetCommand),
- }
-}
-
-func (p *handlerPuppet) act(w http.ResponseWriter, r *http.Request) {
- for cmd := range p.ch {
- cmd.fn(w, r)
- cmd.done <- true
- }
-}
-
-func (p *handlerPuppet) done() { close(p.ch) }
-func (p *handlerPuppet) do(fn func(http.ResponseWriter, *http.Request)) {
- done := make(chan bool)
- p.ch <- puppetCommand{fn, done}
- <-done
-}
-func dockerLogs(container string) ([]byte, error) {
- out, err := exec.Command("docker", "wait", container).CombinedOutput()
- if err != nil {
- return out, err
- }
- exitStatus, err := strconv.Atoi(strings.TrimSpace(string(out)))
- if err != nil {
- return out, errors.New("unexpected exit status from docker wait")
- }
- out, err = exec.Command("docker", "logs", container).CombinedOutput()
- exec.Command("docker", "rm", container).Run()
- if err == nil && exitStatus != 0 {
- err = fmt.Errorf("exit status %d: %s", exitStatus, out)
- }
- return out, err
-}
-
-func kill(container string) {
- exec.Command("docker", "kill", container).Run()
- exec.Command("docker", "rm", container).Run()
-}
-
-func cleanDate(res *http.Response) {
- if d := res.Header["Date"]; len(d) == 1 {
- d[0] = "XXX"
- }
-}
-
-func TestSorterPoolAllocs(t *testing.T) {
- ss := []string{"a", "b", "c"}
- h := http.Header{
- "a": nil,
- "b": nil,
- "c": nil,
- }
- sorter := new(sorter)
-
- if allocs := testing.AllocsPerRun(100, func() {
- sorter.SortStrings(ss)
- }); allocs >= 1 {
- t.Logf("SortStrings allocs = %v; want <1", allocs)
- }
-
- if allocs := testing.AllocsPerRun(5, func() {
- if len(sorter.Keys(h)) != 3 {
- t.Fatal("wrong result")
- }
- }); allocs > 0 {
- t.Logf("Keys allocs = %v; want <1", allocs)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go16.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go16.go
deleted file mode 100644
index 508cebcc4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go16.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build !go1.6
-
-package http2
-
-import (
- "net/http"
- "time"
-)
-
-func configureTransport(t1 *http.Transport) (*Transport, error) {
- return nil, errTransportVersion
-}
-
-func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
- return 0
-
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go17.go
deleted file mode 100644
index 140434a79..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go17.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.7
-
-package http2
-
-import (
- "crypto/tls"
- "net"
- "net/http"
- "time"
-)
-
-type contextContext interface {
- Done() <-chan struct{}
- Err() error
-}
-
-type fakeContext struct{}
-
-func (fakeContext) Done() <-chan struct{} { return nil }
-func (fakeContext) Err() error { panic("should not be called") }
-
-func reqContext(r *http.Request) fakeContext {
- return fakeContext{}
-}
-
-func setResponseUncompressed(res *http.Response) {
- // Nothing.
-}
-
-type clientTrace struct{}
-
-func requestTrace(*http.Request) *clientTrace { return nil }
-func traceGotConn(*http.Request, *ClientConn) {}
-func traceFirstResponseByte(*clientTrace) {}
-func traceWroteHeaders(*clientTrace) {}
-func traceWroteRequest(*clientTrace, error) {}
-func traceGot100Continue(trace *clientTrace) {}
-func traceWait100Continue(trace *clientTrace) {}
-
-func nop() {}
-
-func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
- return nil, nop
-}
-
-func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) {
- return ctx, nop
-}
-
-func requestWithContext(req *http.Request, ctx contextContext) *http.Request {
- return req
-}
-
-// temporary copy of Go 1.6's private tls.Config.clone:
-func cloneTLSConfig(c *tls.Config) *tls.Config {
- return &tls.Config{
- Rand: c.Rand,
- Time: c.Time,
- Certificates: c.Certificates,
- NameToCertificate: c.NameToCertificate,
- GetCertificate: c.GetCertificate,
- RootCAs: c.RootCAs,
- NextProtos: c.NextProtos,
- ServerName: c.ServerName,
- ClientAuth: c.ClientAuth,
- ClientCAs: c.ClientCAs,
- InsecureSkipVerify: c.InsecureSkipVerify,
- CipherSuites: c.CipherSuites,
- PreferServerCipherSuites: c.PreferServerCipherSuites,
- SessionTicketsDisabled: c.SessionTicketsDisabled,
- SessionTicketKey: c.SessionTicketKey,
- ClientSessionCache: c.ClientSessionCache,
- MinVersion: c.MinVersion,
- MaxVersion: c.MaxVersion,
- CurvePreferences: c.CurvePreferences,
- }
-}
-
-func (cc *ClientConn) Ping(ctx contextContext) error {
- return cc.ping(ctx)
-}
-
-func (t *Transport) idleConnTimeout() time.Duration { return 0 }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go18.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go18.go
deleted file mode 100644
index 6f8d3f86f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go18.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.8
-
-package http2
-
-import (
- "io"
- "net/http"
-)
-
-func configureServer18(h1 *http.Server, h2 *Server) error {
- // No IdleTimeout to sync prior to Go 1.8.
- return nil
-}
-
-func shouldLogPanic(panicValue interface{}) bool {
- return panicValue != nil
-}
-
-func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
- return nil
-}
-
-func reqBodyIsNoBody(io.ReadCloser) bool { return false }
-
-func go18httpNoBody() io.ReadCloser { return nil } // for tests only
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go19.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go19.go
deleted file mode 100644
index 5ae07726b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/not_go19.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.9
-
-package http2
-
-import (
- "net/http"
-)
-
-func configureServer19(s *http.Server, conf *Server) error {
- // not supported prior to go1.9
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe.go
deleted file mode 100644
index a6140099c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "errors"
- "io"
- "sync"
-)
-
-// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like
-// io.Pipe except there are no PipeReader/PipeWriter halves, and the
-// underlying buffer is an interface. (io.Pipe is always unbuffered)
-type pipe struct {
- mu sync.Mutex
- c sync.Cond // c.L lazily initialized to &p.mu
- b pipeBuffer // nil when done reading
- err error // read error once empty. non-nil means closed.
- breakErr error // immediate read error (caller doesn't see rest of b)
- donec chan struct{} // closed on error
- readFn func() // optional code to run in Read before error
-}
-
-type pipeBuffer interface {
- Len() int
- io.Writer
- io.Reader
-}
-
-func (p *pipe) Len() int {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.b == nil {
- return 0
- }
- return p.b.Len()
-}
-
-// Read waits until data is available and copies bytes
-// from the buffer into p.
-func (p *pipe) Read(d []byte) (n int, err error) {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.c.L == nil {
- p.c.L = &p.mu
- }
- for {
- if p.breakErr != nil {
- return 0, p.breakErr
- }
- if p.b != nil && p.b.Len() > 0 {
- return p.b.Read(d)
- }
- if p.err != nil {
- if p.readFn != nil {
- p.readFn() // e.g. copy trailers
- p.readFn = nil // not sticky like p.err
- }
- p.b = nil
- return 0, p.err
- }
- p.c.Wait()
- }
-}
-
-var errClosedPipeWrite = errors.New("write on closed buffer")
-
-// Write copies bytes from p into the buffer and wakes a reader.
-// It is an error to write more data than the buffer can hold.
-func (p *pipe) Write(d []byte) (n int, err error) {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.c.L == nil {
- p.c.L = &p.mu
- }
- defer p.c.Signal()
- if p.err != nil {
- return 0, errClosedPipeWrite
- }
- if p.breakErr != nil {
- return len(d), nil // discard when there is no reader
- }
- return p.b.Write(d)
-}
-
-// CloseWithError causes the next Read (waking up a current blocked
-// Read if needed) to return the provided err after all data has been
-// read.
-//
-// The error must be non-nil.
-func (p *pipe) CloseWithError(err error) { p.closeWithError(&p.err, err, nil) }
-
-// BreakWithError causes the next Read (waking up a current blocked
-// Read if needed) to return the provided err immediately, without
-// waiting for unread data.
-func (p *pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) }
-
-// closeWithErrorAndCode is like CloseWithError but also sets some code to run
-// in the caller's goroutine before returning the error.
-func (p *pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) }
-
-func (p *pipe) closeWithError(dst *error, err error, fn func()) {
- if err == nil {
- panic("err must be non-nil")
- }
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.c.L == nil {
- p.c.L = &p.mu
- }
- defer p.c.Signal()
- if *dst != nil {
- // Already been done.
- return
- }
- p.readFn = fn
- if dst == &p.breakErr {
- p.b = nil
- }
- *dst = err
- p.closeDoneLocked()
-}
-
-// requires p.mu be held.
-func (p *pipe) closeDoneLocked() {
- if p.donec == nil {
- return
- }
- // Close if unclosed. This isn't racy since we always
- // hold p.mu while closing.
- select {
- case <-p.donec:
- default:
- close(p.donec)
- }
-}
-
-// Err returns the error (if any) first set by BreakWithError or CloseWithError.
-func (p *pipe) Err() error {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.breakErr != nil {
- return p.breakErr
- }
- return p.err
-}
-
-// Done returns a channel which is closed if and when this pipe is closed
-// with CloseWithError.
-func (p *pipe) Done() <-chan struct{} {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.donec == nil {
- p.donec = make(chan struct{})
- if p.err != nil || p.breakErr != nil {
- // Already hit an error.
- p.closeDoneLocked()
- }
- }
- return p.donec
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe_test.go
deleted file mode 100644
index 1bf351ff6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/pipe_test.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "errors"
- "io"
- "io/ioutil"
- "testing"
-)
-
-func TestPipeClose(t *testing.T) {
- var p pipe
- p.b = new(bytes.Buffer)
- a := errors.New("a")
- b := errors.New("b")
- p.CloseWithError(a)
- p.CloseWithError(b)
- _, err := p.Read(make([]byte, 1))
- if err != a {
- t.Errorf("err = %v want %v", err, a)
- }
-}
-
-func TestPipeDoneChan(t *testing.T) {
- var p pipe
- done := p.Done()
- select {
- case <-done:
- t.Fatal("done too soon")
- default:
- }
- p.CloseWithError(io.EOF)
- select {
- case <-done:
- default:
- t.Fatal("should be done")
- }
-}
-
-func TestPipeDoneChan_ErrFirst(t *testing.T) {
- var p pipe
- p.CloseWithError(io.EOF)
- done := p.Done()
- select {
- case <-done:
- default:
- t.Fatal("should be done")
- }
-}
-
-func TestPipeDoneChan_Break(t *testing.T) {
- var p pipe
- done := p.Done()
- select {
- case <-done:
- t.Fatal("done too soon")
- default:
- }
- p.BreakWithError(io.EOF)
- select {
- case <-done:
- default:
- t.Fatal("should be done")
- }
-}
-
-func TestPipeDoneChan_Break_ErrFirst(t *testing.T) {
- var p pipe
- p.BreakWithError(io.EOF)
- done := p.Done()
- select {
- case <-done:
- default:
- t.Fatal("should be done")
- }
-}
-
-func TestPipeCloseWithError(t *testing.T) {
- p := &pipe{b: new(bytes.Buffer)}
- const body = "foo"
- io.WriteString(p, body)
- a := errors.New("test error")
- p.CloseWithError(a)
- all, err := ioutil.ReadAll(p)
- if string(all) != body {
- t.Errorf("read bytes = %q; want %q", all, body)
- }
- if err != a {
- t.Logf("read error = %v, %v", err, a)
- }
- // Read and Write should fail.
- if n, err := p.Write([]byte("abc")); err != errClosedPipeWrite || n != 0 {
- t.Errorf("Write(abc) after close\ngot %v, %v\nwant 0, %v", n, err, errClosedPipeWrite)
- }
- if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 {
- t.Errorf("Read() after close\ngot %v, nil\nwant 0, %v", n, errClosedPipeWrite)
- }
-}
-
-func TestPipeBreakWithError(t *testing.T) {
- p := &pipe{b: new(bytes.Buffer)}
- io.WriteString(p, "foo")
- a := errors.New("test err")
- p.BreakWithError(a)
- all, err := ioutil.ReadAll(p)
- if string(all) != "" {
- t.Errorf("read bytes = %q; want empty string", all)
- }
- if err != a {
- t.Logf("read error = %v, %v", err, a)
- }
- if p.b != nil {
- t.Errorf("buffer should be nil after BreakWithError")
- }
- // Write should succeed silently.
- if n, err := p.Write([]byte("abc")); err != nil || n != 3 {
- t.Errorf("Write(abc) after break\ngot %v, %v\nwant 0, nil", n, err)
- }
- if p.b != nil {
- t.Errorf("buffer should be nil after Write")
- }
- // Read should fail.
- if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 {
- t.Errorf("Read() after close\ngot %v, nil\nwant 0, not nil", n)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server.go
deleted file mode 100644
index 7a502263a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server.go
+++ /dev/null
@@ -1,2888 +0,0 @@
-// Copyright 2014 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 file.
-
-// TODO: turn off the serve goroutine when idle, so
-// an idle conn only has the readFrames goroutine active. (which could
-// also be optimized probably to pin less memory in crypto/tls). This
-// would involve tracking when the serve goroutine is active (atomic
-// int32 read/CAS probably?) and starting it up when frames arrive,
-// and shutting it down when all handlers exit. the occasional PING
-// packets could use time.AfterFunc to call sc.wakeStartServeLoop()
-// (which is a no-op if already running) and then queue the PING write
-// as normal. The serve loop would then exit in most cases (if no
-// Handlers running) and not be woken up again until the PING packet
-// returns.
-
-// TODO (maybe): add a mechanism for Handlers to going into
-// half-closed-local mode (rw.(io.Closer) test?) but not exit their
-// handler, and continue to be able to read from the
-// Request.Body. This would be a somewhat semantic change from HTTP/1
-// (or at least what we expose in net/http), so I'd probably want to
-// add it there too. For now, this package says that returning from
-// the Handler ServeHTTP function means you're both done reading and
-// done writing, without a way to stop just one or the other.
-
-package http2
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "errors"
- "fmt"
- "io"
- "log"
- "math"
- "net"
- "net/http"
- "net/textproto"
- "net/url"
- "os"
- "reflect"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/http2/hpack"
-)
-
-const (
- prefaceTimeout = 10 * time.Second
- firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway
- handlerChunkWriteSize = 4 << 10
- defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to?
-)
-
-var (
- errClientDisconnected = errors.New("client disconnected")
- errClosedBody = errors.New("body closed by handler")
- errHandlerComplete = errors.New("http2: request body closed due to handler exiting")
- errStreamClosed = errors.New("http2: stream closed")
-)
-
-var responseWriterStatePool = sync.Pool{
- New: func() interface{} {
- rws := &responseWriterState{}
- rws.bw = bufio.NewWriterSize(chunkWriter{rws}, handlerChunkWriteSize)
- return rws
- },
-}
-
-// Test hooks.
-var (
- testHookOnConn func()
- testHookGetServerConn func(*serverConn)
- testHookOnPanicMu *sync.Mutex // nil except in tests
- testHookOnPanic func(sc *serverConn, panicVal interface{}) (rePanic bool)
-)
-
-// Server is an HTTP/2 server.
-type Server struct {
- // MaxHandlers limits the number of http.Handler ServeHTTP goroutines
- // which may run at a time over all connections.
- // Negative or zero no limit.
- // TODO: implement
- MaxHandlers int
-
- // MaxConcurrentStreams optionally specifies the number of
- // concurrent streams that each client may have open at a
- // time. This is unrelated to the number of http.Handler goroutines
- // which may be active globally, which is MaxHandlers.
- // If zero, MaxConcurrentStreams defaults to at least 100, per
- // the HTTP/2 spec's recommendations.
- MaxConcurrentStreams uint32
-
- // MaxReadFrameSize optionally specifies the largest frame
- // this server is willing to read. A valid value is between
- // 16k and 16M, inclusive. If zero or otherwise invalid, a
- // default value is used.
- MaxReadFrameSize uint32
-
- // PermitProhibitedCipherSuites, if true, permits the use of
- // cipher suites prohibited by the HTTP/2 spec.
- PermitProhibitedCipherSuites bool
-
- // IdleTimeout specifies how long until idle clients should be
- // closed with a GOAWAY frame. PING frames are not considered
- // activity for the purposes of IdleTimeout.
- IdleTimeout time.Duration
-
- // MaxUploadBufferPerConnection is the size of the initial flow
- // control window for each connections. The HTTP/2 spec does not
- // allow this to be smaller than 65535 or larger than 2^32-1.
- // If the value is outside this range, a default value will be
- // used instead.
- MaxUploadBufferPerConnection int32
-
- // MaxUploadBufferPerStream is the size of the initial flow control
- // window for each stream. The HTTP/2 spec does not allow this to
- // be larger than 2^32-1. If the value is zero or larger than the
- // maximum, a default value will be used instead.
- MaxUploadBufferPerStream int32
-
- // NewWriteScheduler constructs a write scheduler for a connection.
- // If nil, a default scheduler is chosen.
- NewWriteScheduler func() WriteScheduler
-
- // Internal state. This is a pointer (rather than embedded directly)
- // so that we don't embed a Mutex in this struct, which will make the
- // struct non-copyable, which might break some callers.
- state *serverInternalState
-}
-
-func (s *Server) initialConnRecvWindowSize() int32 {
- if s.MaxUploadBufferPerConnection > initialWindowSize {
- return s.MaxUploadBufferPerConnection
- }
- return 1 << 20
-}
-
-func (s *Server) initialStreamRecvWindowSize() int32 {
- if s.MaxUploadBufferPerStream > 0 {
- return s.MaxUploadBufferPerStream
- }
- return 1 << 20
-}
-
-func (s *Server) maxReadFrameSize() uint32 {
- if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize {
- return v
- }
- return defaultMaxReadFrameSize
-}
-
-func (s *Server) maxConcurrentStreams() uint32 {
- if v := s.MaxConcurrentStreams; v > 0 {
- return v
- }
- return defaultMaxStreams
-}
-
-type serverInternalState struct {
- mu sync.Mutex
- activeConns map[*serverConn]struct{}
-}
-
-func (s *serverInternalState) registerConn(sc *serverConn) {
- if s == nil {
- return // if the Server was used without calling ConfigureServer
- }
- s.mu.Lock()
- s.activeConns[sc] = struct{}{}
- s.mu.Unlock()
-}
-
-func (s *serverInternalState) unregisterConn(sc *serverConn) {
- if s == nil {
- return // if the Server was used without calling ConfigureServer
- }
- s.mu.Lock()
- delete(s.activeConns, sc)
- s.mu.Unlock()
-}
-
-func (s *serverInternalState) startGracefulShutdown() {
- if s == nil {
- return // if the Server was used without calling ConfigureServer
- }
- s.mu.Lock()
- for sc := range s.activeConns {
- sc.startGracefulShutdown()
- }
- s.mu.Unlock()
-}
-
-// ConfigureServer adds HTTP/2 support to a net/http Server.
-//
-// The configuration conf may be nil.
-//
-// ConfigureServer must be called before s begins serving.
-func ConfigureServer(s *http.Server, conf *Server) error {
- if s == nil {
- panic("nil *http.Server")
- }
- if conf == nil {
- conf = new(Server)
- }
- conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})}
- if err := configureServer18(s, conf); err != nil {
- return err
- }
- if err := configureServer19(s, conf); err != nil {
- return err
- }
-
- if s.TLSConfig == nil {
- s.TLSConfig = new(tls.Config)
- } else if s.TLSConfig.CipherSuites != nil {
- // If they already provided a CipherSuite list, return
- // an error if it has a bad order or is missing
- // ECDHE_RSA_WITH_AES_128_GCM_SHA256 or ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.
- haveRequired := false
- sawBad := false
- for i, cs := range s.TLSConfig.CipherSuites {
- switch cs {
- case tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
- // Alternative MTI cipher to not discourage ECDSA-only servers.
- // See http://golang.org/cl/30721 for further information.
- tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
- haveRequired = true
- }
- if isBadCipher(cs) {
- sawBad = true
- } else if sawBad {
- return fmt.Errorf("http2: TLSConfig.CipherSuites index %d contains an HTTP/2-approved cipher suite (%#04x), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.", i, cs)
- }
- }
- if !haveRequired {
- return fmt.Errorf("http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.")
- }
- }
-
- // Note: not setting MinVersion to tls.VersionTLS12,
- // as we don't want to interfere with HTTP/1.1 traffic
- // on the user's server. We enforce TLS 1.2 later once
- // we accept a connection. Ideally this should be done
- // during next-proto selection, but using TLS <1.2 with
- // HTTP/2 is still the client's bug.
-
- s.TLSConfig.PreferServerCipherSuites = true
-
- haveNPN := false
- for _, p := range s.TLSConfig.NextProtos {
- if p == NextProtoTLS {
- haveNPN = true
- break
- }
- }
- if !haveNPN {
- s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, NextProtoTLS)
- }
-
- if s.TLSNextProto == nil {
- s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){}
- }
- protoHandler := func(hs *http.Server, c *tls.Conn, h http.Handler) {
- if testHookOnConn != nil {
- testHookOnConn()
- }
- conf.ServeConn(c, &ServeConnOpts{
- Handler: h,
- BaseConfig: hs,
- })
- }
- s.TLSNextProto[NextProtoTLS] = protoHandler
- return nil
-}
-
-// ServeConnOpts are options for the Server.ServeConn method.
-type ServeConnOpts struct {
- // BaseConfig optionally sets the base configuration
- // for values. If nil, defaults are used.
- BaseConfig *http.Server
-
- // Handler specifies which handler to use for processing
- // requests. If nil, BaseConfig.Handler is used. If BaseConfig
- // or BaseConfig.Handler is nil, http.DefaultServeMux is used.
- Handler http.Handler
-}
-
-func (o *ServeConnOpts) baseConfig() *http.Server {
- if o != nil && o.BaseConfig != nil {
- return o.BaseConfig
- }
- return new(http.Server)
-}
-
-func (o *ServeConnOpts) handler() http.Handler {
- if o != nil {
- if o.Handler != nil {
- return o.Handler
- }
- if o.BaseConfig != nil && o.BaseConfig.Handler != nil {
- return o.BaseConfig.Handler
- }
- }
- return http.DefaultServeMux
-}
-
-// ServeConn serves HTTP/2 requests on the provided connection and
-// blocks until the connection is no longer readable.
-//
-// ServeConn starts speaking HTTP/2 assuming that c has not had any
-// reads or writes. It writes its initial settings frame and expects
-// to be able to read the preface and settings frame from the
-// client. If c has a ConnectionState method like a *tls.Conn, the
-// ConnectionState is used to verify the TLS ciphersuite and to set
-// the Request.TLS field in Handlers.
-//
-// ServeConn does not support h2c by itself. Any h2c support must be
-// implemented in terms of providing a suitably-behaving net.Conn.
-//
-// The opts parameter is optional. If nil, default values are used.
-func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
- baseCtx, cancel := serverConnBaseContext(c, opts)
- defer cancel()
-
- sc := &serverConn{
- srv: s,
- hs: opts.baseConfig(),
- conn: c,
- baseCtx: baseCtx,
- remoteAddrStr: c.RemoteAddr().String(),
- bw: newBufferedWriter(c),
- handler: opts.handler(),
- streams: make(map[uint32]*stream),
- readFrameCh: make(chan readFrameResult),
- wantWriteFrameCh: make(chan FrameWriteRequest, 8),
- serveMsgCh: make(chan interface{}, 8),
- wroteFrameCh: make(chan frameWriteResult, 1), // buffered; one send in writeFrameAsync
- bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way
- doneServing: make(chan struct{}),
- clientMaxStreams: math.MaxUint32, // Section 6.5.2: "Initially, there is no limit to this value"
- advMaxStreams: s.maxConcurrentStreams(),
- initialStreamSendWindowSize: initialWindowSize,
- maxFrameSize: initialMaxFrameSize,
- headerTableSize: initialHeaderTableSize,
- serveG: newGoroutineLock(),
- pushEnabled: true,
- }
-
- s.state.registerConn(sc)
- defer s.state.unregisterConn(sc)
-
- // The net/http package sets the write deadline from the
- // http.Server.WriteTimeout during the TLS handshake, but then
- // passes the connection off to us with the deadline already set.
- // Write deadlines are set per stream in serverConn.newStream.
- // Disarm the net.Conn write deadline here.
- if sc.hs.WriteTimeout != 0 {
- sc.conn.SetWriteDeadline(time.Time{})
- }
-
- if s.NewWriteScheduler != nil {
- sc.writeSched = s.NewWriteScheduler()
- } else {
- sc.writeSched = NewRandomWriteScheduler()
- }
-
- // These start at the RFC-specified defaults. If there is a higher
- // configured value for inflow, that will be updated when we send a
- // WINDOW_UPDATE shortly after sending SETTINGS.
- sc.flow.add(initialWindowSize)
- sc.inflow.add(initialWindowSize)
- sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)
-
- fr := NewFramer(sc.bw, c)
- fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
- fr.MaxHeaderListSize = sc.maxHeaderListSize()
- fr.SetMaxReadFrameSize(s.maxReadFrameSize())
- sc.framer = fr
-
- if tc, ok := c.(connectionStater); ok {
- sc.tlsState = new(tls.ConnectionState)
- *sc.tlsState = tc.ConnectionState()
- // 9.2 Use of TLS Features
- // An implementation of HTTP/2 over TLS MUST use TLS
- // 1.2 or higher with the restrictions on feature set
- // and cipher suite described in this section. Due to
- // implementation limitations, it might not be
- // possible to fail TLS negotiation. An endpoint MUST
- // immediately terminate an HTTP/2 connection that
- // does not meet the TLS requirements described in
- // this section with a connection error (Section
- // 5.4.1) of type INADEQUATE_SECURITY.
- if sc.tlsState.Version < tls.VersionTLS12 {
- sc.rejectConn(ErrCodeInadequateSecurity, "TLS version too low")
- return
- }
-
- if sc.tlsState.ServerName == "" {
- // Client must use SNI, but we don't enforce that anymore,
- // since it was causing problems when connecting to bare IP
- // addresses during development.
- //
- // TODO: optionally enforce? Or enforce at the time we receive
- // a new request, and verify the the ServerName matches the :authority?
- // But that precludes proxy situations, perhaps.
- //
- // So for now, do nothing here again.
- }
-
- if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) {
- // "Endpoints MAY choose to generate a connection error
- // (Section 5.4.1) of type INADEQUATE_SECURITY if one of
- // the prohibited cipher suites are negotiated."
- //
- // We choose that. In my opinion, the spec is weak
- // here. It also says both parties must support at least
- // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 so there's no
- // excuses here. If we really must, we could allow an
- // "AllowInsecureWeakCiphers" option on the server later.
- // Let's see how it plays out first.
- sc.rejectConn(ErrCodeInadequateSecurity, fmt.Sprintf("Prohibited TLS 1.2 Cipher Suite: %x", sc.tlsState.CipherSuite))
- return
- }
- }
-
- if hook := testHookGetServerConn; hook != nil {
- hook(sc)
- }
- sc.serve()
-}
-
-func (sc *serverConn) rejectConn(err ErrCode, debug string) {
- sc.vlogf("http2: server rejecting conn: %v, %s", err, debug)
- // ignoring errors. hanging up anyway.
- sc.framer.WriteGoAway(0, err, []byte(debug))
- sc.bw.Flush()
- sc.conn.Close()
-}
-
-type serverConn struct {
- // Immutable:
- srv *Server
- hs *http.Server
- conn net.Conn
- bw *bufferedWriter // writing to conn
- handler http.Handler
- baseCtx contextContext
- framer *Framer
- doneServing chan struct{} // closed when serverConn.serve ends
- readFrameCh chan readFrameResult // written by serverConn.readFrames
- wantWriteFrameCh chan FrameWriteRequest // from handlers -> serve
- wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes
- bodyReadCh chan bodyReadMsg // from handlers -> serve
- serveMsgCh chan interface{} // misc messages & code to send to / run on the serve loop
- flow flow // conn-wide (not stream-specific) outbound flow control
- inflow flow // conn-wide inbound flow control
- tlsState *tls.ConnectionState // shared by all handlers, like net/http
- remoteAddrStr string
- writeSched WriteScheduler
-
- // Everything following is owned by the serve loop; use serveG.check():
- serveG goroutineLock // used to verify funcs are on serve()
- pushEnabled bool
- sawFirstSettings bool // got the initial SETTINGS frame after the preface
- needToSendSettingsAck bool
- unackedSettings int // how many SETTINGS have we sent without ACKs?
- clientMaxStreams uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit)
- advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client
- curClientStreams uint32 // number of open streams initiated by the client
- curPushedStreams uint32 // number of open streams initiated by server push
- maxClientStreamID uint32 // max ever seen from client (odd), or 0 if there have been no client requests
- maxPushPromiseID uint32 // ID of the last push promise (even), or 0 if there have been no pushes
- streams map[uint32]*stream
- initialStreamSendWindowSize int32
- maxFrameSize int32
- headerTableSize uint32
- peerMaxHeaderListSize uint32 // zero means unknown (default)
- canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case
- writingFrame bool // started writing a frame (on serve goroutine or separate)
- writingFrameAsync bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh
- needsFrameFlush bool // last frame write wasn't a flush
- inGoAway bool // we've started to or sent GOAWAY
- inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop
- needToSendGoAway bool // we need to schedule a GOAWAY frame write
- goAwayCode ErrCode
- shutdownTimer *time.Timer // nil until used
- idleTimer *time.Timer // nil if unused
-
- // Owned by the writeFrameAsync goroutine:
- headerWriteBuf bytes.Buffer
- hpackEncoder *hpack.Encoder
-
- // Used by startGracefulShutdown.
- shutdownOnce sync.Once
-}
-
-func (sc *serverConn) maxHeaderListSize() uint32 {
- n := sc.hs.MaxHeaderBytes
- if n <= 0 {
- n = http.DefaultMaxHeaderBytes
- }
- // http2's count is in a slightly different unit and includes 32 bytes per pair.
- // So, take the net/http.Server value and pad it up a bit, assuming 10 headers.
- const perFieldOverhead = 32 // per http2 spec
- const typicalHeaders = 10 // conservative
- return uint32(n + typicalHeaders*perFieldOverhead)
-}
-
-func (sc *serverConn) curOpenStreams() uint32 {
- sc.serveG.check()
- return sc.curClientStreams + sc.curPushedStreams
-}
-
-// stream represents a stream. This is the minimal metadata needed by
-// the serve goroutine. Most of the actual stream state is owned by
-// the http.Handler's goroutine in the responseWriter. Because the
-// responseWriter's responseWriterState is recycled at the end of a
-// handler, this struct intentionally has no pointer to the
-// *responseWriter{,State} itself, as the Handler ending nils out the
-// responseWriter's state field.
-type stream struct {
- // immutable:
- sc *serverConn
- id uint32
- body *pipe // non-nil if expecting DATA frames
- cw closeWaiter // closed wait stream transitions to closed state
- ctx contextContext
- cancelCtx func()
-
- // owned by serverConn's serve loop:
- bodyBytes int64 // body bytes seen so far
- declBodyBytes int64 // or -1 if undeclared
- flow flow // limits writing from Handler to client
- inflow flow // what the client is allowed to POST/etc to us
- parent *stream // or nil
- numTrailerValues int64
- weight uint8
- state streamState
- resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
- gotTrailerHeader bool // HEADER frame for trailers was seen
- wroteHeaders bool // whether we wrote headers (not status 100)
- writeDeadline *time.Timer // nil if unused
-
- trailer http.Header // accumulated trailers
- reqTrailer http.Header // handler's Request.Trailer
-}
-
-func (sc *serverConn) Framer() *Framer { return sc.framer }
-func (sc *serverConn) CloseConn() error { return sc.conn.Close() }
-func (sc *serverConn) Flush() error { return sc.bw.Flush() }
-func (sc *serverConn) HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) {
- return sc.hpackEncoder, &sc.headerWriteBuf
-}
-
-func (sc *serverConn) state(streamID uint32) (streamState, *stream) {
- sc.serveG.check()
- // http://tools.ietf.org/html/rfc7540#section-5.1
- if st, ok := sc.streams[streamID]; ok {
- return st.state, st
- }
- // "The first use of a new stream identifier implicitly closes all
- // streams in the "idle" state that might have been initiated by
- // that peer with a lower-valued stream identifier. For example, if
- // a client sends a HEADERS frame on stream 7 without ever sending a
- // frame on stream 5, then stream 5 transitions to the "closed"
- // state when the first frame for stream 7 is sent or received."
- if streamID%2 == 1 {
- if streamID <= sc.maxClientStreamID {
- return stateClosed, nil
- }
- } else {
- if streamID <= sc.maxPushPromiseID {
- return stateClosed, nil
- }
- }
- return stateIdle, nil
-}
-
-// setConnState calls the net/http ConnState hook for this connection, if configured.
-// Note that the net/http package does StateNew and StateClosed for us.
-// There is currently no plan for StateHijacked or hijacking HTTP/2 connections.
-func (sc *serverConn) setConnState(state http.ConnState) {
- if sc.hs.ConnState != nil {
- sc.hs.ConnState(sc.conn, state)
- }
-}
-
-func (sc *serverConn) vlogf(format string, args ...interface{}) {
- if VerboseLogs {
- sc.logf(format, args...)
- }
-}
-
-func (sc *serverConn) logf(format string, args ...interface{}) {
- if lg := sc.hs.ErrorLog; lg != nil {
- lg.Printf(format, args...)
- } else {
- log.Printf(format, args...)
- }
-}
-
-// errno returns v's underlying uintptr, else 0.
-//
-// TODO: remove this helper function once http2 can use build
-// tags. See comment in isClosedConnError.
-func errno(v error) uintptr {
- if rv := reflect.ValueOf(v); rv.Kind() == reflect.Uintptr {
- return uintptr(rv.Uint())
- }
- return 0
-}
-
-// isClosedConnError reports whether err is an error from use of a closed
-// network connection.
-func isClosedConnError(err error) bool {
- if err == nil {
- return false
- }
-
- // TODO: remove this string search and be more like the Windows
- // case below. That might involve modifying the standard library
- // to return better error types.
- str := err.Error()
- if strings.Contains(str, "use of closed network connection") {
- return true
- }
-
- // TODO(bradfitz): x/tools/cmd/bundle doesn't really support
- // build tags, so I can't make an http2_windows.go file with
- // Windows-specific stuff. Fix that and move this, once we
- // have a way to bundle this into std's net/http somehow.
- if runtime.GOOS == "windows" {
- if oe, ok := err.(*net.OpError); ok && oe.Op == "read" {
- if se, ok := oe.Err.(*os.SyscallError); ok && se.Syscall == "wsarecv" {
- const WSAECONNABORTED = 10053
- const WSAECONNRESET = 10054
- if n := errno(se.Err); n == WSAECONNRESET || n == WSAECONNABORTED {
- return true
- }
- }
- }
- }
- return false
-}
-
-func (sc *serverConn) condlogf(err error, format string, args ...interface{}) {
- if err == nil {
- return
- }
- if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) || err == errPrefaceTimeout {
- // Boring, expected errors.
- sc.vlogf(format, args...)
- } else {
- sc.logf(format, args...)
- }
-}
-
-func (sc *serverConn) canonicalHeader(v string) string {
- sc.serveG.check()
- cv, ok := commonCanonHeader[v]
- if ok {
- return cv
- }
- cv, ok = sc.canonHeader[v]
- if ok {
- return cv
- }
- if sc.canonHeader == nil {
- sc.canonHeader = make(map[string]string)
- }
- cv = http.CanonicalHeaderKey(v)
- sc.canonHeader[v] = cv
- return cv
-}
-
-type readFrameResult struct {
- f Frame // valid until readMore is called
- err error
-
- // readMore should be called once the consumer no longer needs or
- // retains f. After readMore, f is invalid and more frames can be
- // read.
- readMore func()
-}
-
-// readFrames is the loop that reads incoming frames.
-// It takes care to only read one frame at a time, blocking until the
-// consumer is done with the frame.
-// It's run on its own goroutine.
-func (sc *serverConn) readFrames() {
- gate := make(gate)
- gateDone := gate.Done
- for {
- f, err := sc.framer.ReadFrame()
- select {
- case sc.readFrameCh <- readFrameResult{f, err, gateDone}:
- case <-sc.doneServing:
- return
- }
- select {
- case <-gate:
- case <-sc.doneServing:
- return
- }
- if terminalReadFrameError(err) {
- return
- }
- }
-}
-
-// frameWriteResult is the message passed from writeFrameAsync to the serve goroutine.
-type frameWriteResult struct {
- wr FrameWriteRequest // what was written (or attempted)
- err error // result of the writeFrame call
-}
-
-// writeFrameAsync runs in its own goroutine and writes a single frame
-// and then reports when it's done.
-// At most one goroutine can be running writeFrameAsync at a time per
-// serverConn.
-func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest) {
- err := wr.write.writeFrame(sc)
- sc.wroteFrameCh <- frameWriteResult{wr, err}
-}
-
-func (sc *serverConn) closeAllStreamsOnConnClose() {
- sc.serveG.check()
- for _, st := range sc.streams {
- sc.closeStream(st, errClientDisconnected)
- }
-}
-
-func (sc *serverConn) stopShutdownTimer() {
- sc.serveG.check()
- if t := sc.shutdownTimer; t != nil {
- t.Stop()
- }
-}
-
-func (sc *serverConn) notePanic() {
- // Note: this is for serverConn.serve panicking, not http.Handler code.
- if testHookOnPanicMu != nil {
- testHookOnPanicMu.Lock()
- defer testHookOnPanicMu.Unlock()
- }
- if testHookOnPanic != nil {
- if e := recover(); e != nil {
- if testHookOnPanic(sc, e) {
- panic(e)
- }
- }
- }
-}
-
-func (sc *serverConn) serve() {
- sc.serveG.check()
- defer sc.notePanic()
- defer sc.conn.Close()
- defer sc.closeAllStreamsOnConnClose()
- defer sc.stopShutdownTimer()
- defer close(sc.doneServing) // unblocks handlers trying to send
-
- if VerboseLogs {
- sc.vlogf("http2: server connection from %v on %p", sc.conn.RemoteAddr(), sc.hs)
- }
-
- sc.writeFrame(FrameWriteRequest{
- write: writeSettings{
- {SettingMaxFrameSize, sc.srv.maxReadFrameSize()},
- {SettingMaxConcurrentStreams, sc.advMaxStreams},
- {SettingMaxHeaderListSize, sc.maxHeaderListSize()},
- {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())},
- },
- })
- sc.unackedSettings++
-
- // Each connection starts with intialWindowSize inflow tokens.
- // If a higher value is configured, we add more tokens.
- if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 {
- sc.sendWindowUpdate(nil, int(diff))
- }
-
- if err := sc.readPreface(); err != nil {
- sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err)
- return
- }
- // Now that we've got the preface, get us out of the
- // "StateNew" state. We can't go directly to idle, though.
- // Active means we read some data and anticipate a request. We'll
- // do another Active when we get a HEADERS frame.
- sc.setConnState(http.StateActive)
- sc.setConnState(http.StateIdle)
-
- if sc.srv.IdleTimeout != 0 {
- sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
- defer sc.idleTimer.Stop()
- }
-
- go sc.readFrames() // closed by defer sc.conn.Close above
-
- settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer)
- defer settingsTimer.Stop()
-
- loopNum := 0
- for {
- loopNum++
- select {
- case wr := <-sc.wantWriteFrameCh:
- if se, ok := wr.write.(StreamError); ok {
- sc.resetStream(se)
- break
- }
- sc.writeFrame(wr)
- case res := <-sc.wroteFrameCh:
- sc.wroteFrame(res)
- case res := <-sc.readFrameCh:
- if !sc.processFrameFromReader(res) {
- return
- }
- res.readMore()
- if settingsTimer != nil {
- settingsTimer.Stop()
- settingsTimer = nil
- }
- case m := <-sc.bodyReadCh:
- sc.noteBodyRead(m.st, m.n)
- case msg := <-sc.serveMsgCh:
- switch v := msg.(type) {
- case func(int):
- v(loopNum) // for testing
- case *serverMessage:
- switch v {
- case settingsTimerMsg:
- sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr())
- return
- case idleTimerMsg:
- sc.vlogf("connection is idle")
- sc.goAway(ErrCodeNo)
- case shutdownTimerMsg:
- sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr())
- return
- case gracefulShutdownMsg:
- sc.startGracefulShutdownInternal()
- default:
- panic("unknown timer")
- }
- case *startPushRequest:
- sc.startPush(v)
- default:
- panic(fmt.Sprintf("unexpected type %T", v))
- }
- }
-
- // Start the shutdown timer after sending a GOAWAY. When sending GOAWAY
- // with no error code (graceful shutdown), don't start the timer until
- // all open streams have been completed.
- sentGoAway := sc.inGoAway && !sc.needToSendGoAway && !sc.writingFrame
- gracefulShutdownComplete := sc.goAwayCode == ErrCodeNo && sc.curOpenStreams() == 0
- if sentGoAway && sc.shutdownTimer == nil && (sc.goAwayCode != ErrCodeNo || gracefulShutdownComplete) {
- sc.shutDownIn(goAwayTimeout)
- }
- }
-}
-
-func (sc *serverConn) awaitGracefulShutdown(sharedCh <-chan struct{}, privateCh chan struct{}) {
- select {
- case <-sc.doneServing:
- case <-sharedCh:
- close(privateCh)
- }
-}
-
-type serverMessage int
-
-// Message values sent to serveMsgCh.
-var (
- settingsTimerMsg = new(serverMessage)
- idleTimerMsg = new(serverMessage)
- shutdownTimerMsg = new(serverMessage)
- gracefulShutdownMsg = new(serverMessage)
-)
-
-func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }
-func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) }
-func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) }
-
-func (sc *serverConn) sendServeMsg(msg interface{}) {
- sc.serveG.checkNotOn() // NOT
- select {
- case sc.serveMsgCh <- msg:
- case <-sc.doneServing:
- }
-}
-
-var errPrefaceTimeout = errors.New("timeout waiting for client preface")
-
-// readPreface reads the ClientPreface greeting from the peer or
-// returns errPrefaceTimeout on timeout, or an error if the greeting
-// is invalid.
-func (sc *serverConn) readPreface() error {
- errc := make(chan error, 1)
- go func() {
- // Read the client preface
- buf := make([]byte, len(ClientPreface))
- if _, err := io.ReadFull(sc.conn, buf); err != nil {
- errc <- err
- } else if !bytes.Equal(buf, clientPreface) {
- errc <- fmt.Errorf("bogus greeting %q", buf)
- } else {
- errc <- nil
- }
- }()
- timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server?
- defer timer.Stop()
- select {
- case <-timer.C:
- return errPrefaceTimeout
- case err := <-errc:
- if err == nil {
- if VerboseLogs {
- sc.vlogf("http2: server: client %v said hello", sc.conn.RemoteAddr())
- }
- }
- return err
- }
-}
-
-var errChanPool = sync.Pool{
- New: func() interface{} { return make(chan error, 1) },
-}
-
-var writeDataPool = sync.Pool{
- New: func() interface{} { return new(writeData) },
-}
-
-// writeDataFromHandler writes DATA response frames from a handler on
-// the given stream.
-func (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStream bool) error {
- ch := errChanPool.Get().(chan error)
- writeArg := writeDataPool.Get().(*writeData)
- *writeArg = writeData{stream.id, data, endStream}
- err := sc.writeFrameFromHandler(FrameWriteRequest{
- write: writeArg,
- stream: stream,
- done: ch,
- })
- if err != nil {
- return err
- }
- var frameWriteDone bool // the frame write is done (successfully or not)
- select {
- case err = <-ch:
- frameWriteDone = true
- case <-sc.doneServing:
- return errClientDisconnected
- case <-stream.cw:
- // If both ch and stream.cw were ready (as might
- // happen on the final Write after an http.Handler
- // ends), prefer the write result. Otherwise this
- // might just be us successfully closing the stream.
- // The writeFrameAsync and serve goroutines guarantee
- // that the ch send will happen before the stream.cw
- // close.
- select {
- case err = <-ch:
- frameWriteDone = true
- default:
- return errStreamClosed
- }
- }
- errChanPool.Put(ch)
- if frameWriteDone {
- writeDataPool.Put(writeArg)
- }
- return err
-}
-
-// writeFrameFromHandler sends wr to sc.wantWriteFrameCh, but aborts
-// if the connection has gone away.
-//
-// This must not be run from the serve goroutine itself, else it might
-// deadlock writing to sc.wantWriteFrameCh (which is only mildly
-// buffered and is read by serve itself). If you're on the serve
-// goroutine, call writeFrame instead.
-func (sc *serverConn) writeFrameFromHandler(wr FrameWriteRequest) error {
- sc.serveG.checkNotOn() // NOT
- select {
- case sc.wantWriteFrameCh <- wr:
- return nil
- case <-sc.doneServing:
- // Serve loop is gone.
- // Client has closed their connection to the server.
- return errClientDisconnected
- }
-}
-
-// writeFrame schedules a frame to write and sends it if there's nothing
-// already being written.
-//
-// There is no pushback here (the serve goroutine never blocks). It's
-// the http.Handlers that block, waiting for their previous frames to
-// make it onto the wire
-//
-// If you're not on the serve goroutine, use writeFrameFromHandler instead.
-func (sc *serverConn) writeFrame(wr FrameWriteRequest) {
- sc.serveG.check()
-
- // If true, wr will not be written and wr.done will not be signaled.
- var ignoreWrite bool
-
- // We are not allowed to write frames on closed streams. RFC 7540 Section
- // 5.1.1 says: "An endpoint MUST NOT send frames other than PRIORITY on
- // a closed stream." Our server never sends PRIORITY, so that exception
- // does not apply.
- //
- // The serverConn might close an open stream while the stream's handler
- // is still running. For example, the server might close a stream when it
- // receives bad data from the client. If this happens, the handler might
- // attempt to write a frame after the stream has been closed (since the
- // handler hasn't yet been notified of the close). In this case, we simply
- // ignore the frame. The handler will notice that the stream is closed when
- // it waits for the frame to be written.
- //
- // As an exception to this rule, we allow sending RST_STREAM after close.
- // This allows us to immediately reject new streams without tracking any
- // state for those streams (except for the queued RST_STREAM frame). This
- // may result in duplicate RST_STREAMs in some cases, but the client should
- // ignore those.
- if wr.StreamID() != 0 {
- _, isReset := wr.write.(StreamError)
- if state, _ := sc.state(wr.StreamID()); state == stateClosed && !isReset {
- ignoreWrite = true
- }
- }
-
- // Don't send a 100-continue response if we've already sent headers.
- // See golang.org/issue/14030.
- switch wr.write.(type) {
- case *writeResHeaders:
- wr.stream.wroteHeaders = true
- case write100ContinueHeadersFrame:
- if wr.stream.wroteHeaders {
- // We do not need to notify wr.done because this frame is
- // never written with wr.done != nil.
- if wr.done != nil {
- panic("wr.done != nil for write100ContinueHeadersFrame")
- }
- ignoreWrite = true
- }
- }
-
- if !ignoreWrite {
- sc.writeSched.Push(wr)
- }
- sc.scheduleFrameWrite()
-}
-
-// startFrameWrite starts a goroutine to write wr (in a separate
-// goroutine since that might block on the network), and updates the
-// serve goroutine's state about the world, updated from info in wr.
-func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) {
- sc.serveG.check()
- if sc.writingFrame {
- panic("internal error: can only be writing one frame at a time")
- }
-
- st := wr.stream
- if st != nil {
- switch st.state {
- case stateHalfClosedLocal:
- switch wr.write.(type) {
- case StreamError, handlerPanicRST, writeWindowUpdate:
- // RFC 7540 Section 5.1 allows sending RST_STREAM, PRIORITY, and WINDOW_UPDATE
- // in this state. (We never send PRIORITY from the server, so that is not checked.)
- default:
- panic(fmt.Sprintf("internal error: attempt to send frame on a half-closed-local stream: %v", wr))
- }
- case stateClosed:
- panic(fmt.Sprintf("internal error: attempt to send frame on a closed stream: %v", wr))
- }
- }
- if wpp, ok := wr.write.(*writePushPromise); ok {
- var err error
- wpp.promisedID, err = wpp.allocatePromisedID()
- if err != nil {
- sc.writingFrameAsync = false
- wr.replyToWriter(err)
- return
- }
- }
-
- sc.writingFrame = true
- sc.needsFrameFlush = true
- if wr.write.staysWithinBuffer(sc.bw.Available()) {
- sc.writingFrameAsync = false
- err := wr.write.writeFrame(sc)
- sc.wroteFrame(frameWriteResult{wr, err})
- } else {
- sc.writingFrameAsync = true
- go sc.writeFrameAsync(wr)
- }
-}
-
-// errHandlerPanicked is the error given to any callers blocked in a read from
-// Request.Body when the main goroutine panics. Since most handlers read in the
-// the main ServeHTTP goroutine, this will show up rarely.
-var errHandlerPanicked = errors.New("http2: handler panicked")
-
-// wroteFrame is called on the serve goroutine with the result of
-// whatever happened on writeFrameAsync.
-func (sc *serverConn) wroteFrame(res frameWriteResult) {
- sc.serveG.check()
- if !sc.writingFrame {
- panic("internal error: expected to be already writing a frame")
- }
- sc.writingFrame = false
- sc.writingFrameAsync = false
-
- wr := res.wr
-
- if writeEndsStream(wr.write) {
- st := wr.stream
- if st == nil {
- panic("internal error: expecting non-nil stream")
- }
- switch st.state {
- case stateOpen:
- // Here we would go to stateHalfClosedLocal in
- // theory, but since our handler is done and
- // the net/http package provides no mechanism
- // for closing a ResponseWriter while still
- // reading data (see possible TODO at top of
- // this file), we go into closed state here
- // anyway, after telling the peer we're
- // hanging up on them. We'll transition to
- // stateClosed after the RST_STREAM frame is
- // written.
- st.state = stateHalfClosedLocal
- // Section 8.1: a server MAY request that the client abort
- // transmission of a request without error by sending a
- // RST_STREAM with an error code of NO_ERROR after sending
- // a complete response.
- sc.resetStream(streamError(st.id, ErrCodeNo))
- case stateHalfClosedRemote:
- sc.closeStream(st, errHandlerComplete)
- }
- } else {
- switch v := wr.write.(type) {
- case StreamError:
- // st may be unknown if the RST_STREAM was generated to reject bad input.
- if st, ok := sc.streams[v.StreamID]; ok {
- sc.closeStream(st, v)
- }
- case handlerPanicRST:
- sc.closeStream(wr.stream, errHandlerPanicked)
- }
- }
-
- // Reply (if requested) to unblock the ServeHTTP goroutine.
- wr.replyToWriter(res.err)
-
- sc.scheduleFrameWrite()
-}
-
-// scheduleFrameWrite tickles the frame writing scheduler.
-//
-// If a frame is already being written, nothing happens. This will be called again
-// when the frame is done being written.
-//
-// If a frame isn't being written we need to send one, the best frame
-// to send is selected, preferring first things that aren't
-// stream-specific (e.g. ACKing settings), and then finding the
-// highest priority stream.
-//
-// If a frame isn't being written and there's nothing else to send, we
-// flush the write buffer.
-func (sc *serverConn) scheduleFrameWrite() {
- sc.serveG.check()
- if sc.writingFrame || sc.inFrameScheduleLoop {
- return
- }
- sc.inFrameScheduleLoop = true
- for !sc.writingFrameAsync {
- if sc.needToSendGoAway {
- sc.needToSendGoAway = false
- sc.startFrameWrite(FrameWriteRequest{
- write: &writeGoAway{
- maxStreamID: sc.maxClientStreamID,
- code: sc.goAwayCode,
- },
- })
- continue
- }
- if sc.needToSendSettingsAck {
- sc.needToSendSettingsAck = false
- sc.startFrameWrite(FrameWriteRequest{write: writeSettingsAck{}})
- continue
- }
- if !sc.inGoAway || sc.goAwayCode == ErrCodeNo {
- if wr, ok := sc.writeSched.Pop(); ok {
- sc.startFrameWrite(wr)
- continue
- }
- }
- if sc.needsFrameFlush {
- sc.startFrameWrite(FrameWriteRequest{write: flushFrameWriter{}})
- sc.needsFrameFlush = false // after startFrameWrite, since it sets this true
- continue
- }
- break
- }
- sc.inFrameScheduleLoop = false
-}
-
-// startGracefulShutdown gracefully shuts down a connection. This
-// sends GOAWAY with ErrCodeNo to tell the client we're gracefully
-// shutting down. The connection isn't closed until all current
-// streams are done.
-//
-// startGracefulShutdown returns immediately; it does not wait until
-// the connection has shut down.
-func (sc *serverConn) startGracefulShutdown() {
- sc.serveG.checkNotOn() // NOT
- sc.shutdownOnce.Do(func() { sc.sendServeMsg(gracefulShutdownMsg) })
-}
-
-// After sending GOAWAY, the connection will close after goAwayTimeout.
-// If we close the connection immediately after sending GOAWAY, there may
-// be unsent data in our kernel receive buffer, which will cause the kernel
-// to send a TCP RST on close() instead of a FIN. This RST will abort the
-// connection immediately, whether or not the client had received the GOAWAY.
-//
-// Ideally we should delay for at least 1 RTT + epsilon so the client has
-// a chance to read the GOAWAY and stop sending messages. Measuring RTT
-// is hard, so we approximate with 1 second. See golang.org/issue/18701.
-//
-// This is a var so it can be shorter in tests, where all requests uses the
-// loopback interface making the expected RTT very small.
-//
-// TODO: configurable?
-var goAwayTimeout = 1 * time.Second
-
-func (sc *serverConn) startGracefulShutdownInternal() {
- sc.goAway(ErrCodeNo)
-}
-
-func (sc *serverConn) goAway(code ErrCode) {
- sc.serveG.check()
- if sc.inGoAway {
- return
- }
- sc.inGoAway = true
- sc.needToSendGoAway = true
- sc.goAwayCode = code
- sc.scheduleFrameWrite()
-}
-
-func (sc *serverConn) shutDownIn(d time.Duration) {
- sc.serveG.check()
- sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer)
-}
-
-func (sc *serverConn) resetStream(se StreamError) {
- sc.serveG.check()
- sc.writeFrame(FrameWriteRequest{write: se})
- if st, ok := sc.streams[se.StreamID]; ok {
- st.resetQueued = true
- }
-}
-
-// processFrameFromReader processes the serve loop's read from readFrameCh from the
-// frame-reading goroutine.
-// processFrameFromReader returns whether the connection should be kept open.
-func (sc *serverConn) processFrameFromReader(res readFrameResult) bool {
- sc.serveG.check()
- err := res.err
- if err != nil {
- if err == ErrFrameTooLarge {
- sc.goAway(ErrCodeFrameSize)
- return true // goAway will close the loop
- }
- clientGone := err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err)
- if clientGone {
- // TODO: could we also get into this state if
- // the peer does a half close
- // (e.g. CloseWrite) because they're done
- // sending frames but they're still wanting
- // our open replies? Investigate.
- // TODO: add CloseWrite to crypto/tls.Conn first
- // so we have a way to test this? I suppose
- // just for testing we could have a non-TLS mode.
- return false
- }
- } else {
- f := res.f
- if VerboseLogs {
- sc.vlogf("http2: server read frame %v", summarizeFrame(f))
- }
- err = sc.processFrame(f)
- if err == nil {
- return true
- }
- }
-
- switch ev := err.(type) {
- case StreamError:
- sc.resetStream(ev)
- return true
- case goAwayFlowError:
- sc.goAway(ErrCodeFlowControl)
- return true
- case ConnectionError:
- sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev)
- sc.goAway(ErrCode(ev))
- return true // goAway will handle shutdown
- default:
- if res.err != nil {
- sc.vlogf("http2: server closing client connection; error reading frame from client %s: %v", sc.conn.RemoteAddr(), err)
- } else {
- sc.logf("http2: server closing client connection: %v", err)
- }
- return false
- }
-}
-
-func (sc *serverConn) processFrame(f Frame) error {
- sc.serveG.check()
-
- // First frame received must be SETTINGS.
- if !sc.sawFirstSettings {
- if _, ok := f.(*SettingsFrame); !ok {
- return ConnectionError(ErrCodeProtocol)
- }
- sc.sawFirstSettings = true
- }
-
- switch f := f.(type) {
- case *SettingsFrame:
- return sc.processSettings(f)
- case *MetaHeadersFrame:
- return sc.processHeaders(f)
- case *WindowUpdateFrame:
- return sc.processWindowUpdate(f)
- case *PingFrame:
- return sc.processPing(f)
- case *DataFrame:
- return sc.processData(f)
- case *RSTStreamFrame:
- return sc.processResetStream(f)
- case *PriorityFrame:
- return sc.processPriority(f)
- case *GoAwayFrame:
- return sc.processGoAway(f)
- case *PushPromiseFrame:
- // A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE
- // frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
- return ConnectionError(ErrCodeProtocol)
- default:
- sc.vlogf("http2: server ignoring frame: %v", f.Header())
- return nil
- }
-}
-
-func (sc *serverConn) processPing(f *PingFrame) error {
- sc.serveG.check()
- if f.IsAck() {
- // 6.7 PING: " An endpoint MUST NOT respond to PING frames
- // containing this flag."
- return nil
- }
- if f.StreamID != 0 {
- // "PING frames are not associated with any individual
- // stream. If a PING frame is received with a stream
- // identifier field value other than 0x0, the recipient MUST
- // respond with a connection error (Section 5.4.1) of type
- // PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
- }
- if sc.inGoAway && sc.goAwayCode != ErrCodeNo {
- return nil
- }
- sc.writeFrame(FrameWriteRequest{write: writePingAck{f}})
- return nil
-}
-
-func (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error {
- sc.serveG.check()
- switch {
- case f.StreamID != 0: // stream-level flow control
- state, st := sc.state(f.StreamID)
- if state == stateIdle {
- // Section 5.1: "Receiving any frame other than HEADERS
- // or PRIORITY on a stream in this state MUST be
- // treated as a connection error (Section 5.4.1) of
- // type PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
- }
- if st == nil {
- // "WINDOW_UPDATE can be sent by a peer that has sent a
- // frame bearing the END_STREAM flag. This means that a
- // receiver could receive a WINDOW_UPDATE frame on a "half
- // closed (remote)" or "closed" stream. A receiver MUST
- // NOT treat this as an error, see Section 5.1."
- return nil
- }
- if !st.flow.add(int32(f.Increment)) {
- return streamError(f.StreamID, ErrCodeFlowControl)
- }
- default: // connection-level flow control
- if !sc.flow.add(int32(f.Increment)) {
- return goAwayFlowError{}
- }
- }
- sc.scheduleFrameWrite()
- return nil
-}
-
-func (sc *serverConn) processResetStream(f *RSTStreamFrame) error {
- sc.serveG.check()
-
- state, st := sc.state(f.StreamID)
- if state == stateIdle {
- // 6.4 "RST_STREAM frames MUST NOT be sent for a
- // stream in the "idle" state. If a RST_STREAM frame
- // identifying an idle stream is received, the
- // recipient MUST treat this as a connection error
- // (Section 5.4.1) of type PROTOCOL_ERROR.
- return ConnectionError(ErrCodeProtocol)
- }
- if st != nil {
- st.cancelCtx()
- sc.closeStream(st, streamError(f.StreamID, f.ErrCode))
- }
- return nil
-}
-
-func (sc *serverConn) closeStream(st *stream, err error) {
- sc.serveG.check()
- if st.state == stateIdle || st.state == stateClosed {
- panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state))
- }
- st.state = stateClosed
- if st.writeDeadline != nil {
- st.writeDeadline.Stop()
- }
- if st.isPushed() {
- sc.curPushedStreams--
- } else {
- sc.curClientStreams--
- }
- delete(sc.streams, st.id)
- if len(sc.streams) == 0 {
- sc.setConnState(http.StateIdle)
- if sc.srv.IdleTimeout != 0 {
- sc.idleTimer.Reset(sc.srv.IdleTimeout)
- }
- if h1ServerKeepAlivesDisabled(sc.hs) {
- sc.startGracefulShutdownInternal()
- }
- }
- if p := st.body; p != nil {
- // Return any buffered unread bytes worth of conn-level flow control.
- // See golang.org/issue/16481
- sc.sendWindowUpdate(nil, p.Len())
-
- p.CloseWithError(err)
- }
- st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc
- sc.writeSched.CloseStream(st.id)
-}
-
-func (sc *serverConn) processSettings(f *SettingsFrame) error {
- sc.serveG.check()
- if f.IsAck() {
- sc.unackedSettings--
- if sc.unackedSettings < 0 {
- // Why is the peer ACKing settings we never sent?
- // The spec doesn't mention this case, but
- // hang up on them anyway.
- return ConnectionError(ErrCodeProtocol)
- }
- return nil
- }
- if err := f.ForeachSetting(sc.processSetting); err != nil {
- return err
- }
- sc.needToSendSettingsAck = true
- sc.scheduleFrameWrite()
- return nil
-}
-
-func (sc *serverConn) processSetting(s Setting) error {
- sc.serveG.check()
- if err := s.Valid(); err != nil {
- return err
- }
- if VerboseLogs {
- sc.vlogf("http2: server processing setting %v", s)
- }
- switch s.ID {
- case SettingHeaderTableSize:
- sc.headerTableSize = s.Val
- sc.hpackEncoder.SetMaxDynamicTableSize(s.Val)
- case SettingEnablePush:
- sc.pushEnabled = s.Val != 0
- case SettingMaxConcurrentStreams:
- sc.clientMaxStreams = s.Val
- case SettingInitialWindowSize:
- return sc.processSettingInitialWindowSize(s.Val)
- case SettingMaxFrameSize:
- sc.maxFrameSize = int32(s.Val) // the maximum valid s.Val is < 2^31
- case SettingMaxHeaderListSize:
- sc.peerMaxHeaderListSize = s.Val
- default:
- // Unknown setting: "An endpoint that receives a SETTINGS
- // frame with any unknown or unsupported identifier MUST
- // ignore that setting."
- if VerboseLogs {
- sc.vlogf("http2: server ignoring unknown setting %v", s)
- }
- }
- return nil
-}
-
-func (sc *serverConn) processSettingInitialWindowSize(val uint32) error {
- sc.serveG.check()
- // Note: val already validated to be within range by
- // processSetting's Valid call.
-
- // "A SETTINGS frame can alter the initial flow control window
- // size for all current streams. When the value of
- // SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST
- // adjust the size of all stream flow control windows that it
- // maintains by the difference between the new value and the
- // old value."
- old := sc.initialStreamSendWindowSize
- sc.initialStreamSendWindowSize = int32(val)
- growth := int32(val) - old // may be negative
- for _, st := range sc.streams {
- if !st.flow.add(growth) {
- // 6.9.2 Initial Flow Control Window Size
- // "An endpoint MUST treat a change to
- // SETTINGS_INITIAL_WINDOW_SIZE that causes any flow
- // control window to exceed the maximum size as a
- // connection error (Section 5.4.1) of type
- // FLOW_CONTROL_ERROR."
- return ConnectionError(ErrCodeFlowControl)
- }
- }
- return nil
-}
-
-func (sc *serverConn) processData(f *DataFrame) error {
- sc.serveG.check()
- if sc.inGoAway && sc.goAwayCode != ErrCodeNo {
- return nil
- }
- data := f.Data()
-
- // "If a DATA frame is received whose stream is not in "open"
- // or "half closed (local)" state, the recipient MUST respond
- // with a stream error (Section 5.4.2) of type STREAM_CLOSED."
- id := f.Header().StreamID
- state, st := sc.state(id)
- if id == 0 || state == stateIdle {
- // Section 5.1: "Receiving any frame other than HEADERS
- // or PRIORITY on a stream in this state MUST be
- // treated as a connection error (Section 5.4.1) of
- // type PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
- }
- if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {
- // This includes sending a RST_STREAM if the stream is
- // in stateHalfClosedLocal (which currently means that
- // the http.Handler returned, so it's done reading &
- // done writing). Try to stop the client from sending
- // more DATA.
-
- // But still enforce their connection-level flow control,
- // and return any flow control bytes since we're not going
- // to consume them.
- if sc.inflow.available() < int32(f.Length) {
- return streamError(id, ErrCodeFlowControl)
- }
- // Deduct the flow control from inflow, since we're
- // going to immediately add it back in
- // sendWindowUpdate, which also schedules sending the
- // frames.
- sc.inflow.take(int32(f.Length))
- sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
-
- if st != nil && st.resetQueued {
- // Already have a stream error in flight. Don't send another.
- return nil
- }
- return streamError(id, ErrCodeStreamClosed)
- }
- if st.body == nil {
- panic("internal error: should have a body in this state")
- }
-
- // Sender sending more than they'd declared?
- if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes {
- st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes))
- return streamError(id, ErrCodeStreamClosed)
- }
- if f.Length > 0 {
- // Check whether the client has flow control quota.
- if st.inflow.available() < int32(f.Length) {
- return streamError(id, ErrCodeFlowControl)
- }
- st.inflow.take(int32(f.Length))
-
- if len(data) > 0 {
- wrote, err := st.body.Write(data)
- if err != nil {
- return streamError(id, ErrCodeStreamClosed)
- }
- if wrote != len(data) {
- panic("internal error: bad Writer")
- }
- st.bodyBytes += int64(len(data))
- }
-
- // Return any padded flow control now, since we won't
- // refund it later on body reads.
- if pad := int32(f.Length) - int32(len(data)); pad > 0 {
- sc.sendWindowUpdate32(nil, pad)
- sc.sendWindowUpdate32(st, pad)
- }
- }
- if f.StreamEnded() {
- st.endStream()
- }
- return nil
-}
-
-func (sc *serverConn) processGoAway(f *GoAwayFrame) error {
- sc.serveG.check()
- if f.ErrCode != ErrCodeNo {
- sc.logf("http2: received GOAWAY %+v, starting graceful shutdown", f)
- } else {
- sc.vlogf("http2: received GOAWAY %+v, starting graceful shutdown", f)
- }
- sc.startGracefulShutdownInternal()
- // http://tools.ietf.org/html/rfc7540#section-6.8
- // We should not create any new streams, which means we should disable push.
- sc.pushEnabled = false
- return nil
-}
-
-// isPushed reports whether the stream is server-initiated.
-func (st *stream) isPushed() bool {
- return st.id%2 == 0
-}
-
-// endStream closes a Request.Body's pipe. It is called when a DATA
-// frame says a request body is over (or after trailers).
-func (st *stream) endStream() {
- sc := st.sc
- sc.serveG.check()
-
- if st.declBodyBytes != -1 && st.declBodyBytes != st.bodyBytes {
- st.body.CloseWithError(fmt.Errorf("request declared a Content-Length of %d but only wrote %d bytes",
- st.declBodyBytes, st.bodyBytes))
- } else {
- st.body.closeWithErrorAndCode(io.EOF, st.copyTrailersToHandlerRequest)
- st.body.CloseWithError(io.EOF)
- }
- st.state = stateHalfClosedRemote
-}
-
-// copyTrailersToHandlerRequest is run in the Handler's goroutine in
-// its Request.Body.Read just before it gets io.EOF.
-func (st *stream) copyTrailersToHandlerRequest() {
- for k, vv := range st.trailer {
- if _, ok := st.reqTrailer[k]; ok {
- // Only copy it over it was pre-declared.
- st.reqTrailer[k] = vv
- }
- }
-}
-
-// onWriteTimeout is run on its own goroutine (from time.AfterFunc)
-// when the stream's WriteTimeout has fired.
-func (st *stream) onWriteTimeout() {
- st.sc.writeFrameFromHandler(FrameWriteRequest{write: streamError(st.id, ErrCodeInternal)})
-}
-
-func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
- sc.serveG.check()
- id := f.StreamID
- if sc.inGoAway {
- // Ignore.
- return nil
- }
- // http://tools.ietf.org/html/rfc7540#section-5.1.1
- // Streams initiated by a client MUST use odd-numbered stream
- // identifiers. [...] An endpoint that receives an unexpected
- // stream identifier MUST respond with a connection error
- // (Section 5.4.1) of type PROTOCOL_ERROR.
- if id%2 != 1 {
- return ConnectionError(ErrCodeProtocol)
- }
- // A HEADERS frame can be used to create a new stream or
- // send a trailer for an open one. If we already have a stream
- // open, let it process its own HEADERS frame (trailers at this
- // point, if it's valid).
- if st := sc.streams[f.StreamID]; st != nil {
- if st.resetQueued {
- // We're sending RST_STREAM to close the stream, so don't bother
- // processing this frame.
- return nil
- }
- return st.processTrailerHeaders(f)
- }
-
- // [...] The identifier of a newly established stream MUST be
- // numerically greater than all streams that the initiating
- // endpoint has opened or reserved. [...] An endpoint that
- // receives an unexpected stream identifier MUST respond with
- // a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
- if id <= sc.maxClientStreamID {
- return ConnectionError(ErrCodeProtocol)
- }
- sc.maxClientStreamID = id
-
- if sc.idleTimer != nil {
- sc.idleTimer.Stop()
- }
-
- // http://tools.ietf.org/html/rfc7540#section-5.1.2
- // [...] Endpoints MUST NOT exceed the limit set by their peer. An
- // endpoint that receives a HEADERS frame that causes their
- // advertised concurrent stream limit to be exceeded MUST treat
- // this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR
- // or REFUSED_STREAM.
- if sc.curClientStreams+1 > sc.advMaxStreams {
- if sc.unackedSettings == 0 {
- // They should know better.
- return streamError(id, ErrCodeProtocol)
- }
- // Assume it's a network race, where they just haven't
- // received our last SETTINGS update. But actually
- // this can't happen yet, because we don't yet provide
- // a way for users to adjust server parameters at
- // runtime.
- return streamError(id, ErrCodeRefusedStream)
- }
-
- initialState := stateOpen
- if f.StreamEnded() {
- initialState = stateHalfClosedRemote
- }
- st := sc.newStream(id, 0, initialState)
-
- if f.HasPriority() {
- if err := checkPriority(f.StreamID, f.Priority); err != nil {
- return err
- }
- sc.writeSched.AdjustStream(st.id, f.Priority)
- }
-
- rw, req, err := sc.newWriterAndRequest(st, f)
- if err != nil {
- return err
- }
- st.reqTrailer = req.Trailer
- if st.reqTrailer != nil {
- st.trailer = make(http.Header)
- }
- st.body = req.Body.(*requestBody).pipe // may be nil
- st.declBodyBytes = req.ContentLength
-
- handler := sc.handler.ServeHTTP
- if f.Truncated {
- // Their header list was too long. Send a 431 error.
- handler = handleHeaderListTooLong
- } else if err := checkValidHTTP2RequestHeaders(req.Header); err != nil {
- handler = new400Handler(err)
- }
-
- // The net/http package sets the read deadline from the
- // http.Server.ReadTimeout during the TLS handshake, but then
- // passes the connection off to us with the deadline already
- // set. Disarm it here after the request headers are read,
- // similar to how the http1 server works. Here it's
- // technically more like the http1 Server's ReadHeaderTimeout
- // (in Go 1.8), though. That's a more sane option anyway.
- if sc.hs.ReadTimeout != 0 {
- sc.conn.SetReadDeadline(time.Time{})
- }
-
- go sc.runHandler(rw, req, handler)
- return nil
-}
-
-func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
- sc := st.sc
- sc.serveG.check()
- if st.gotTrailerHeader {
- return ConnectionError(ErrCodeProtocol)
- }
- st.gotTrailerHeader = true
- if !f.StreamEnded() {
- return streamError(st.id, ErrCodeProtocol)
- }
-
- if len(f.PseudoFields()) > 0 {
- return streamError(st.id, ErrCodeProtocol)
- }
- if st.trailer != nil {
- for _, hf := range f.RegularFields() {
- key := sc.canonicalHeader(hf.Name)
- if !ValidTrailerHeader(key) {
- // TODO: send more details to the peer somehow. But http2 has
- // no way to send debug data at a stream level. Discuss with
- // HTTP folk.
- return streamError(st.id, ErrCodeProtocol)
- }
- st.trailer[key] = append(st.trailer[key], hf.Value)
- }
- }
- st.endStream()
- return nil
-}
-
-func checkPriority(streamID uint32, p PriorityParam) error {
- if streamID == p.StreamDep {
- // Section 5.3.1: "A stream cannot depend on itself. An endpoint MUST treat
- // this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR."
- // Section 5.3.3 says that a stream can depend on one of its dependencies,
- // so it's only self-dependencies that are forbidden.
- return streamError(streamID, ErrCodeProtocol)
- }
- return nil
-}
-
-func (sc *serverConn) processPriority(f *PriorityFrame) error {
- if sc.inGoAway {
- return nil
- }
- if err := checkPriority(f.StreamID, f.PriorityParam); err != nil {
- return err
- }
- sc.writeSched.AdjustStream(f.StreamID, f.PriorityParam)
- return nil
-}
-
-func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream {
- sc.serveG.check()
- if id == 0 {
- panic("internal error: cannot create stream with id 0")
- }
-
- ctx, cancelCtx := contextWithCancel(sc.baseCtx)
- st := &stream{
- sc: sc,
- id: id,
- state: state,
- ctx: ctx,
- cancelCtx: cancelCtx,
- }
- st.cw.Init()
- st.flow.conn = &sc.flow // link to conn-level counter
- st.flow.add(sc.initialStreamSendWindowSize)
- st.inflow.conn = &sc.inflow // link to conn-level counter
- st.inflow.add(sc.srv.initialStreamRecvWindowSize())
- if sc.hs.WriteTimeout != 0 {
- st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
- }
-
- sc.streams[id] = st
- sc.writeSched.OpenStream(st.id, OpenStreamOptions{PusherID: pusherID})
- if st.isPushed() {
- sc.curPushedStreams++
- } else {
- sc.curClientStreams++
- }
- if sc.curOpenStreams() == 1 {
- sc.setConnState(http.StateActive)
- }
-
- return st
-}
-
-func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*responseWriter, *http.Request, error) {
- sc.serveG.check()
-
- rp := requestParam{
- method: f.PseudoValue("method"),
- scheme: f.PseudoValue("scheme"),
- authority: f.PseudoValue("authority"),
- path: f.PseudoValue("path"),
- }
-
- isConnect := rp.method == "CONNECT"
- if isConnect {
- if rp.path != "" || rp.scheme != "" || rp.authority == "" {
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
- }
- } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") {
- // See 8.1.2.6 Malformed Requests and Responses:
- //
- // Malformed requests or responses that are detected
- // MUST be treated as a stream error (Section 5.4.2)
- // of type PROTOCOL_ERROR."
- //
- // 8.1.2.3 Request Pseudo-Header Fields
- // "All HTTP/2 requests MUST include exactly one valid
- // value for the :method, :scheme, and :path
- // pseudo-header fields"
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
- }
-
- bodyOpen := !f.StreamEnded()
- if rp.method == "HEAD" && bodyOpen {
- // HEAD requests can't have bodies
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
- }
-
- rp.header = make(http.Header)
- for _, hf := range f.RegularFields() {
- rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value)
- }
- if rp.authority == "" {
- rp.authority = rp.header.Get("Host")
- }
-
- rw, req, err := sc.newWriterAndRequestNoBody(st, rp)
- if err != nil {
- return nil, nil, err
- }
- if bodyOpen {
- if vv, ok := rp.header["Content-Length"]; ok {
- req.ContentLength, _ = strconv.ParseInt(vv[0], 10, 64)
- } else {
- req.ContentLength = -1
- }
- req.Body.(*requestBody).pipe = &pipe{
- b: &dataBuffer{expected: req.ContentLength},
- }
- }
- return rw, req, nil
-}
-
-type requestParam struct {
- method string
- scheme, authority, path string
- header http.Header
-}
-
-func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*responseWriter, *http.Request, error) {
- sc.serveG.check()
-
- var tlsState *tls.ConnectionState // nil if not scheme https
- if rp.scheme == "https" {
- tlsState = sc.tlsState
- }
-
- needsContinue := rp.header.Get("Expect") == "100-continue"
- if needsContinue {
- rp.header.Del("Expect")
- }
- // Merge Cookie headers into one "; "-delimited value.
- if cookies := rp.header["Cookie"]; len(cookies) > 1 {
- rp.header.Set("Cookie", strings.Join(cookies, "; "))
- }
-
- // Setup Trailers
- var trailer http.Header
- for _, v := range rp.header["Trailer"] {
- for _, key := range strings.Split(v, ",") {
- key = http.CanonicalHeaderKey(strings.TrimSpace(key))
- switch key {
- case "Transfer-Encoding", "Trailer", "Content-Length":
- // Bogus. (copy of http1 rules)
- // Ignore.
- default:
- if trailer == nil {
- trailer = make(http.Header)
- }
- trailer[key] = nil
- }
- }
- }
- delete(rp.header, "Trailer")
-
- var url_ *url.URL
- var requestURI string
- if rp.method == "CONNECT" {
- url_ = &url.URL{Host: rp.authority}
- requestURI = rp.authority // mimic HTTP/1 server behavior
- } else {
- var err error
- url_, err = url.ParseRequestURI(rp.path)
- if err != nil {
- return nil, nil, streamError(st.id, ErrCodeProtocol)
- }
- requestURI = rp.path
- }
-
- body := &requestBody{
- conn: sc,
- stream: st,
- needsContinue: needsContinue,
- }
- req := &http.Request{
- Method: rp.method,
- URL: url_,
- RemoteAddr: sc.remoteAddrStr,
- Header: rp.header,
- RequestURI: requestURI,
- Proto: "HTTP/2.0",
- ProtoMajor: 2,
- ProtoMinor: 0,
- TLS: tlsState,
- Host: rp.authority,
- Body: body,
- Trailer: trailer,
- }
- req = requestWithContext(req, st.ctx)
-
- rws := responseWriterStatePool.Get().(*responseWriterState)
- bwSave := rws.bw
- *rws = responseWriterState{} // zero all the fields
- rws.conn = sc
- rws.bw = bwSave
- rws.bw.Reset(chunkWriter{rws})
- rws.stream = st
- rws.req = req
- rws.body = body
-
- rw := &responseWriter{rws: rws}
- return rw, req, nil
-}
-
-// Run on its own goroutine.
-func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {
- didPanic := true
- defer func() {
- rw.rws.stream.cancelCtx()
- if didPanic {
- e := recover()
- sc.writeFrameFromHandler(FrameWriteRequest{
- write: handlerPanicRST{rw.rws.stream.id},
- stream: rw.rws.stream,
- })
- // Same as net/http:
- if shouldLogPanic(e) {
- const size = 64 << 10
- buf := make([]byte, size)
- buf = buf[:runtime.Stack(buf, false)]
- sc.logf("http2: panic serving %v: %v\n%s", sc.conn.RemoteAddr(), e, buf)
- }
- return
- }
- rw.handlerDone()
- }()
- handler(rw, req)
- didPanic = false
-}
-
-func handleHeaderListTooLong(w http.ResponseWriter, r *http.Request) {
- // 10.5.1 Limits on Header Block Size:
- // .. "A server that receives a larger header block than it is
- // willing to handle can send an HTTP 431 (Request Header Fields Too
- // Large) status code"
- const statusRequestHeaderFieldsTooLarge = 431 // only in Go 1.6+
- w.WriteHeader(statusRequestHeaderFieldsTooLarge)
- io.WriteString(w, "<h1>HTTP Error 431</h1><p>Request Header Field(s) Too Large</p>")
-}
-
-// called from handler goroutines.
-// h may be nil.
-func (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) error {
- sc.serveG.checkNotOn() // NOT on
- var errc chan error
- if headerData.h != nil {
- // If there's a header map (which we don't own), so we have to block on
- // waiting for this frame to be written, so an http.Flush mid-handler
- // writes out the correct value of keys, before a handler later potentially
- // mutates it.
- errc = errChanPool.Get().(chan error)
- }
- if err := sc.writeFrameFromHandler(FrameWriteRequest{
- write: headerData,
- stream: st,
- done: errc,
- }); err != nil {
- return err
- }
- if errc != nil {
- select {
- case err := <-errc:
- errChanPool.Put(errc)
- return err
- case <-sc.doneServing:
- return errClientDisconnected
- case <-st.cw:
- return errStreamClosed
- }
- }
- return nil
-}
-
-// called from handler goroutines.
-func (sc *serverConn) write100ContinueHeaders(st *stream) {
- sc.writeFrameFromHandler(FrameWriteRequest{
- write: write100ContinueHeadersFrame{st.id},
- stream: st,
- })
-}
-
-// A bodyReadMsg tells the server loop that the http.Handler read n
-// bytes of the DATA from the client on the given stream.
-type bodyReadMsg struct {
- st *stream
- n int
-}
-
-// called from handler goroutines.
-// Notes that the handler for the given stream ID read n bytes of its body
-// and schedules flow control tokens to be sent.
-func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int, err error) {
- sc.serveG.checkNotOn() // NOT on
- if n > 0 {
- select {
- case sc.bodyReadCh <- bodyReadMsg{st, n}:
- case <-sc.doneServing:
- }
- }
-}
-
-func (sc *serverConn) noteBodyRead(st *stream, n int) {
- sc.serveG.check()
- sc.sendWindowUpdate(nil, n) // conn-level
- if st.state != stateHalfClosedRemote && st.state != stateClosed {
- // Don't send this WINDOW_UPDATE if the stream is closed
- // remotely.
- sc.sendWindowUpdate(st, n)
- }
-}
-
-// st may be nil for conn-level
-func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
- sc.serveG.check()
- // "The legal range for the increment to the flow control
- // window is 1 to 2^31-1 (2,147,483,647) octets."
- // A Go Read call on 64-bit machines could in theory read
- // a larger Read than this. Very unlikely, but we handle it here
- // rather than elsewhere for now.
- const maxUint31 = 1<<31 - 1
- for n >= maxUint31 {
- sc.sendWindowUpdate32(st, maxUint31)
- n -= maxUint31
- }
- sc.sendWindowUpdate32(st, int32(n))
-}
-
-// st may be nil for conn-level
-func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) {
- sc.serveG.check()
- if n == 0 {
- return
- }
- if n < 0 {
- panic("negative update")
- }
- var streamID uint32
- if st != nil {
- streamID = st.id
- }
- sc.writeFrame(FrameWriteRequest{
- write: writeWindowUpdate{streamID: streamID, n: uint32(n)},
- stream: st,
- })
- var ok bool
- if st == nil {
- ok = sc.inflow.add(n)
- } else {
- ok = st.inflow.add(n)
- }
- if !ok {
- panic("internal error; sent too many window updates without decrements?")
- }
-}
-
-// requestBody is the Handler's Request.Body type.
-// Read and Close may be called concurrently.
-type requestBody struct {
- stream *stream
- conn *serverConn
- closed bool // for use by Close only
- sawEOF bool // for use by Read only
- pipe *pipe // non-nil if we have a HTTP entity message body
- needsContinue bool // need to send a 100-continue
-}
-
-func (b *requestBody) Close() error {
- if b.pipe != nil && !b.closed {
- b.pipe.BreakWithError(errClosedBody)
- }
- b.closed = true
- return nil
-}
-
-func (b *requestBody) Read(p []byte) (n int, err error) {
- if b.needsContinue {
- b.needsContinue = false
- b.conn.write100ContinueHeaders(b.stream)
- }
- if b.pipe == nil || b.sawEOF {
- return 0, io.EOF
- }
- n, err = b.pipe.Read(p)
- if err == io.EOF {
- b.sawEOF = true
- }
- if b.conn == nil && inTests {
- return
- }
- b.conn.noteBodyReadFromHandler(b.stream, n, err)
- return
-}
-
-// responseWriter is the http.ResponseWriter implementation. It's
-// intentionally small (1 pointer wide) to minimize garbage. The
-// responseWriterState pointer inside is zeroed at the end of a
-// request (in handlerDone) and calls on the responseWriter thereafter
-// simply crash (caller's mistake), but the much larger responseWriterState
-// and buffers are reused between multiple requests.
-type responseWriter struct {
- rws *responseWriterState
-}
-
-// Optional http.ResponseWriter interfaces implemented.
-var (
- _ http.CloseNotifier = (*responseWriter)(nil)
- _ http.Flusher = (*responseWriter)(nil)
- _ stringWriter = (*responseWriter)(nil)
-)
-
-type responseWriterState struct {
- // immutable within a request:
- stream *stream
- req *http.Request
- body *requestBody // to close at end of request, if DATA frames didn't
- conn *serverConn
-
- // TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc
- bw *bufio.Writer // writing to a chunkWriter{this *responseWriterState}
-
- // mutated by http.Handler goroutine:
- handlerHeader http.Header // nil until called
- snapHeader http.Header // snapshot of handlerHeader at WriteHeader time
- trailers []string // set in writeChunk
- status int // status code passed to WriteHeader
- wroteHeader bool // WriteHeader called (explicitly or implicitly). Not necessarily sent to user yet.
- sentHeader bool // have we sent the header frame?
- handlerDone bool // handler has finished
- dirty bool // a Write failed; don't reuse this responseWriterState
-
- sentContentLen int64 // non-zero if handler set a Content-Length header
- wroteBytes int64
-
- closeNotifierMu sync.Mutex // guards closeNotifierCh
- closeNotifierCh chan bool // nil until first used
-}
-
-type chunkWriter struct{ rws *responseWriterState }
-
-func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) }
-
-func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) != 0 }
-
-// declareTrailer is called for each Trailer header when the
-// response header is written. It notes that a header will need to be
-// written in the trailers at the end of the response.
-func (rws *responseWriterState) declareTrailer(k string) {
- k = http.CanonicalHeaderKey(k)
- if !ValidTrailerHeader(k) {
- // Forbidden by RFC 2616 14.40.
- rws.conn.logf("ignoring invalid trailer %q", k)
- return
- }
- if !strSliceContains(rws.trailers, k) {
- rws.trailers = append(rws.trailers, k)
- }
-}
-
-// writeChunk writes chunks from the bufio.Writer. But because
-// bufio.Writer may bypass its chunking, sometimes p may be
-// arbitrarily large.
-//
-// writeChunk is also responsible (on the first chunk) for sending the
-// HEADER response.
-func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
- if !rws.wroteHeader {
- rws.writeHeader(200)
- }
-
- isHeadResp := rws.req.Method == "HEAD"
- if !rws.sentHeader {
- rws.sentHeader = true
- var ctype, clen string
- if clen = rws.snapHeader.Get("Content-Length"); clen != "" {
- rws.snapHeader.Del("Content-Length")
- clen64, err := strconv.ParseInt(clen, 10, 64)
- if err == nil && clen64 >= 0 {
- rws.sentContentLen = clen64
- } else {
- clen = ""
- }
- }
- if clen == "" && rws.handlerDone && bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
- clen = strconv.Itoa(len(p))
- }
- _, hasContentType := rws.snapHeader["Content-Type"]
- if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {
- ctype = http.DetectContentType(p)
- }
- var date string
- if _, ok := rws.snapHeader["Date"]; !ok {
- // TODO(bradfitz): be faster here, like net/http? measure.
- date = time.Now().UTC().Format(http.TimeFormat)
- }
-
- for _, v := range rws.snapHeader["Trailer"] {
- foreachHeaderElement(v, rws.declareTrailer)
- }
-
- endStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp
- err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{
- streamID: rws.stream.id,
- httpResCode: rws.status,
- h: rws.snapHeader,
- endStream: endStream,
- contentType: ctype,
- contentLength: clen,
- date: date,
- })
- if err != nil {
- rws.dirty = true
- return 0, err
- }
- if endStream {
- return 0, nil
- }
- }
- if isHeadResp {
- return len(p), nil
- }
- if len(p) == 0 && !rws.handlerDone {
- return 0, nil
- }
-
- if rws.handlerDone {
- rws.promoteUndeclaredTrailers()
- }
-
- endStream := rws.handlerDone && !rws.hasTrailers()
- if len(p) > 0 || endStream {
- // only send a 0 byte DATA frame if we're ending the stream.
- if err := rws.conn.writeDataFromHandler(rws.stream, p, endStream); err != nil {
- rws.dirty = true
- return 0, err
- }
- }
-
- if rws.handlerDone && rws.hasTrailers() {
- err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{
- streamID: rws.stream.id,
- h: rws.handlerHeader,
- trailers: rws.trailers,
- endStream: true,
- })
- if err != nil {
- rws.dirty = true
- }
- return len(p), err
- }
- return len(p), nil
-}
-
-// TrailerPrefix is a magic prefix for ResponseWriter.Header map keys
-// that, if present, signals that the map entry is actually for
-// the response trailers, and not the response headers. The prefix
-// is stripped after the ServeHTTP call finishes and the values are
-// sent in the trailers.
-//
-// This mechanism is intended only for trailers that are not known
-// prior to the headers being written. If the set of trailers is fixed
-// or known before the header is written, the normal Go trailers mechanism
-// is preferred:
-// https://golang.org/pkg/net/http/#ResponseWriter
-// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
-const TrailerPrefix = "Trailer:"
-
-// promoteUndeclaredTrailers permits http.Handlers to set trailers
-// after the header has already been flushed. Because the Go
-// ResponseWriter interface has no way to set Trailers (only the
-// Header), and because we didn't want to expand the ResponseWriter
-// interface, and because nobody used trailers, and because RFC 2616
-// says you SHOULD (but not must) predeclare any trailers in the
-// header, the official ResponseWriter rules said trailers in Go must
-// be predeclared, and then we reuse the same ResponseWriter.Header()
-// map to mean both Headers and Trailers. When it's time to write the
-// Trailers, we pick out the fields of Headers that were declared as
-// trailers. That worked for a while, until we found the first major
-// user of Trailers in the wild: gRPC (using them only over http2),
-// and gRPC libraries permit setting trailers mid-stream without
-// predeclarnig them. So: change of plans. We still permit the old
-// way, but we also permit this hack: if a Header() key begins with
-// "Trailer:", the suffix of that key is a Trailer. Because ':' is an
-// invalid token byte anyway, there is no ambiguity. (And it's already
-// filtered out) It's mildly hacky, but not terrible.
-//
-// This method runs after the Handler is done and promotes any Header
-// fields to be trailers.
-func (rws *responseWriterState) promoteUndeclaredTrailers() {
- for k, vv := range rws.handlerHeader {
- if !strings.HasPrefix(k, TrailerPrefix) {
- continue
- }
- trailerKey := strings.TrimPrefix(k, TrailerPrefix)
- rws.declareTrailer(trailerKey)
- rws.handlerHeader[http.CanonicalHeaderKey(trailerKey)] = vv
- }
-
- if len(rws.trailers) > 1 {
- sorter := sorterPool.Get().(*sorter)
- sorter.SortStrings(rws.trailers)
- sorterPool.Put(sorter)
- }
-}
-
-func (w *responseWriter) Flush() {
- rws := w.rws
- if rws == nil {
- panic("Header called after Handler finished")
- }
- if rws.bw.Buffered() > 0 {
- if err := rws.bw.Flush(); err != nil {
- // Ignore the error. The frame writer already knows.
- return
- }
- } else {
- // The bufio.Writer won't call chunkWriter.Write
- // (writeChunk with zero bytes, so we have to do it
- // ourselves to force the HTTP response header and/or
- // final DATA frame (with END_STREAM) to be sent.
- rws.writeChunk(nil)
- }
-}
-
-func (w *responseWriter) CloseNotify() <-chan bool {
- rws := w.rws
- if rws == nil {
- panic("CloseNotify called after Handler finished")
- }
- rws.closeNotifierMu.Lock()
- ch := rws.closeNotifierCh
- if ch == nil {
- ch = make(chan bool, 1)
- rws.closeNotifierCh = ch
- cw := rws.stream.cw
- go func() {
- cw.Wait() // wait for close
- ch <- true
- }()
- }
- rws.closeNotifierMu.Unlock()
- return ch
-}
-
-func (w *responseWriter) Header() http.Header {
- rws := w.rws
- if rws == nil {
- panic("Header called after Handler finished")
- }
- if rws.handlerHeader == nil {
- rws.handlerHeader = make(http.Header)
- }
- return rws.handlerHeader
-}
-
-// checkWriteHeaderCode is a copy of net/http's checkWriteHeaderCode.
-func checkWriteHeaderCode(code int) {
- // Issue 22880: require valid WriteHeader status codes.
- // For now we only enforce that it's three digits.
- // In the future we might block things over 599 (600 and above aren't defined
- // at http://httpwg.org/specs/rfc7231.html#status.codes)
- // and we might block under 200 (once we have more mature 1xx support).
- // But for now any three digits.
- //
- // We used to send "HTTP/1.1 000 0" on the wire in responses but there's
- // no equivalent bogus thing we can realistically send in HTTP/2,
- // so we'll consistently panic instead and help people find their bugs
- // early. (We can't return an error from WriteHeader even if we wanted to.)
- if code < 100 || code > 999 {
- panic(fmt.Sprintf("invalid WriteHeader code %v", code))
- }
-}
-
-func (w *responseWriter) WriteHeader(code int) {
- checkWriteHeaderCode(code)
- rws := w.rws
- if rws == nil {
- panic("WriteHeader called after Handler finished")
- }
- rws.writeHeader(code)
-}
-
-func (rws *responseWriterState) writeHeader(code int) {
- if !rws.wroteHeader {
- rws.wroteHeader = true
- rws.status = code
- if len(rws.handlerHeader) > 0 {
- rws.snapHeader = cloneHeader(rws.handlerHeader)
- }
- }
-}
-
-func cloneHeader(h http.Header) http.Header {
- h2 := make(http.Header, len(h))
- for k, vv := range h {
- vv2 := make([]string, len(vv))
- copy(vv2, vv)
- h2[k] = vv2
- }
- return h2
-}
-
-// The Life Of A Write is like this:
-//
-// * Handler calls w.Write or w.WriteString ->
-// * -> rws.bw (*bufio.Writer) ->
-// * (Handler might call Flush)
-// * -> chunkWriter{rws}
-// * -> responseWriterState.writeChunk(p []byte)
-// * -> responseWriterState.writeChunk (most of the magic; see comment there)
-func (w *responseWriter) Write(p []byte) (n int, err error) {
- return w.write(len(p), p, "")
-}
-
-func (w *responseWriter) WriteString(s string) (n int, err error) {
- return w.write(len(s), nil, s)
-}
-
-// either dataB or dataS is non-zero.
-func (w *responseWriter) write(lenData int, dataB []byte, dataS string) (n int, err error) {
- rws := w.rws
- if rws == nil {
- panic("Write called after Handler finished")
- }
- if !rws.wroteHeader {
- w.WriteHeader(200)
- }
- if !bodyAllowedForStatus(rws.status) {
- return 0, http.ErrBodyNotAllowed
- }
- rws.wroteBytes += int64(len(dataB)) + int64(len(dataS)) // only one can be set
- if rws.sentContentLen != 0 && rws.wroteBytes > rws.sentContentLen {
- // TODO: send a RST_STREAM
- return 0, errors.New("http2: handler wrote more than declared Content-Length")
- }
-
- if dataB != nil {
- return rws.bw.Write(dataB)
- } else {
- return rws.bw.WriteString(dataS)
- }
-}
-
-func (w *responseWriter) handlerDone() {
- rws := w.rws
- dirty := rws.dirty
- rws.handlerDone = true
- w.Flush()
- w.rws = nil
- if !dirty {
- // Only recycle the pool if all prior Write calls to
- // the serverConn goroutine completed successfully. If
- // they returned earlier due to resets from the peer
- // there might still be write goroutines outstanding
- // from the serverConn referencing the rws memory. See
- // issue 20704.
- responseWriterStatePool.Put(rws)
- }
-}
-
-// Push errors.
-var (
- ErrRecursivePush = errors.New("http2: recursive push not allowed")
- ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS")
-)
-
-// pushOptions is the internal version of http.PushOptions, which we
-// cannot include here because it's only defined in Go 1.8 and later.
-type pushOptions struct {
- Method string
- Header http.Header
-}
-
-func (w *responseWriter) push(target string, opts pushOptions) error {
- st := w.rws.stream
- sc := st.sc
- sc.serveG.checkNotOn()
-
- // No recursive pushes: "PUSH_PROMISE frames MUST only be sent on a peer-initiated stream."
- // http://tools.ietf.org/html/rfc7540#section-6.6
- if st.isPushed() {
- return ErrRecursivePush
- }
-
- // Default options.
- if opts.Method == "" {
- opts.Method = "GET"
- }
- if opts.Header == nil {
- opts.Header = http.Header{}
- }
- wantScheme := "http"
- if w.rws.req.TLS != nil {
- wantScheme = "https"
- }
-
- // Validate the request.
- u, err := url.Parse(target)
- if err != nil {
- return err
- }
- if u.Scheme == "" {
- if !strings.HasPrefix(target, "/") {
- return fmt.Errorf("target must be an absolute URL or an absolute path: %q", target)
- }
- u.Scheme = wantScheme
- u.Host = w.rws.req.Host
- } else {
- if u.Scheme != wantScheme {
- return fmt.Errorf("cannot push URL with scheme %q from request with scheme %q", u.Scheme, wantScheme)
- }
- if u.Host == "" {
- return errors.New("URL must have a host")
- }
- }
- for k := range opts.Header {
- if strings.HasPrefix(k, ":") {
- return fmt.Errorf("promised request headers cannot include pseudo header %q", k)
- }
- // These headers are meaningful only if the request has a body,
- // but PUSH_PROMISE requests cannot have a body.
- // http://tools.ietf.org/html/rfc7540#section-8.2
- // Also disallow Host, since the promised URL must be absolute.
- switch strings.ToLower(k) {
- case "content-length", "content-encoding", "trailer", "te", "expect", "host":
- return fmt.Errorf("promised request headers cannot include %q", k)
- }
- }
- if err := checkValidHTTP2RequestHeaders(opts.Header); err != nil {
- return err
- }
-
- // The RFC effectively limits promised requests to GET and HEAD:
- // "Promised requests MUST be cacheable [GET, HEAD, or POST], and MUST be safe [GET or HEAD]"
- // http://tools.ietf.org/html/rfc7540#section-8.2
- if opts.Method != "GET" && opts.Method != "HEAD" {
- return fmt.Errorf("method %q must be GET or HEAD", opts.Method)
- }
-
- msg := &startPushRequest{
- parent: st,
- method: opts.Method,
- url: u,
- header: cloneHeader(opts.Header),
- done: errChanPool.Get().(chan error),
- }
-
- select {
- case <-sc.doneServing:
- return errClientDisconnected
- case <-st.cw:
- return errStreamClosed
- case sc.serveMsgCh <- msg:
- }
-
- select {
- case <-sc.doneServing:
- return errClientDisconnected
- case <-st.cw:
- return errStreamClosed
- case err := <-msg.done:
- errChanPool.Put(msg.done)
- return err
- }
-}
-
-type startPushRequest struct {
- parent *stream
- method string
- url *url.URL
- header http.Header
- done chan error
-}
-
-func (sc *serverConn) startPush(msg *startPushRequest) {
- sc.serveG.check()
-
- // http://tools.ietf.org/html/rfc7540#section-6.6.
- // PUSH_PROMISE frames MUST only be sent on a peer-initiated stream that
- // is in either the "open" or "half-closed (remote)" state.
- if msg.parent.state != stateOpen && msg.parent.state != stateHalfClosedRemote {
- // responseWriter.Push checks that the stream is peer-initiaed.
- msg.done <- errStreamClosed
- return
- }
-
- // http://tools.ietf.org/html/rfc7540#section-6.6.
- if !sc.pushEnabled {
- msg.done <- http.ErrNotSupported
- return
- }
-
- // PUSH_PROMISE frames must be sent in increasing order by stream ID, so
- // we allocate an ID for the promised stream lazily, when the PUSH_PROMISE
- // is written. Once the ID is allocated, we start the request handler.
- allocatePromisedID := func() (uint32, error) {
- sc.serveG.check()
-
- // Check this again, just in case. Technically, we might have received
- // an updated SETTINGS by the time we got around to writing this frame.
- if !sc.pushEnabled {
- return 0, http.ErrNotSupported
- }
- // http://tools.ietf.org/html/rfc7540#section-6.5.2.
- if sc.curPushedStreams+1 > sc.clientMaxStreams {
- return 0, ErrPushLimitReached
- }
-
- // http://tools.ietf.org/html/rfc7540#section-5.1.1.
- // Streams initiated by the server MUST use even-numbered identifiers.
- // A server that is unable to establish a new stream identifier can send a GOAWAY
- // frame so that the client is forced to open a new connection for new streams.
- if sc.maxPushPromiseID+2 >= 1<<31 {
- sc.startGracefulShutdownInternal()
- return 0, ErrPushLimitReached
- }
- sc.maxPushPromiseID += 2
- promisedID := sc.maxPushPromiseID
-
- // http://tools.ietf.org/html/rfc7540#section-8.2.
- // Strictly speaking, the new stream should start in "reserved (local)", then
- // transition to "half closed (remote)" after sending the initial HEADERS, but
- // we start in "half closed (remote)" for simplicity.
- // See further comments at the definition of stateHalfClosedRemote.
- promised := sc.newStream(promisedID, msg.parent.id, stateHalfClosedRemote)
- rw, req, err := sc.newWriterAndRequestNoBody(promised, requestParam{
- method: msg.method,
- scheme: msg.url.Scheme,
- authority: msg.url.Host,
- path: msg.url.RequestURI(),
- header: cloneHeader(msg.header), // clone since handler runs concurrently with writing the PUSH_PROMISE
- })
- if err != nil {
- // Should not happen, since we've already validated msg.url.
- panic(fmt.Sprintf("newWriterAndRequestNoBody(%+v): %v", msg.url, err))
- }
-
- go sc.runHandler(rw, req, sc.handler.ServeHTTP)
- return promisedID, nil
- }
-
- sc.writeFrame(FrameWriteRequest{
- write: &writePushPromise{
- streamID: msg.parent.id,
- method: msg.method,
- url: msg.url,
- h: msg.header,
- allocatePromisedID: allocatePromisedID,
- },
- stream: msg.parent,
- done: msg.done,
- })
-}
-
-// foreachHeaderElement splits v according to the "#rule" construction
-// in RFC 2616 section 2.1 and calls fn for each non-empty element.
-func foreachHeaderElement(v string, fn func(string)) {
- v = textproto.TrimString(v)
- if v == "" {
- return
- }
- if !strings.Contains(v, ",") {
- fn(v)
- return
- }
- for _, f := range strings.Split(v, ",") {
- if f = textproto.TrimString(f); f != "" {
- fn(f)
- }
- }
-}
-
-// From http://httpwg.org/specs/rfc7540.html#rfc.section.8.1.2.2
-var connHeaders = []string{
- "Connection",
- "Keep-Alive",
- "Proxy-Connection",
- "Transfer-Encoding",
- "Upgrade",
-}
-
-// checkValidHTTP2RequestHeaders checks whether h is a valid HTTP/2 request,
-// per RFC 7540 Section 8.1.2.2.
-// The returned error is reported to users.
-func checkValidHTTP2RequestHeaders(h http.Header) error {
- for _, k := range connHeaders {
- if _, ok := h[k]; ok {
- return fmt.Errorf("request header %q is not valid in HTTP/2", k)
- }
- }
- te := h["Te"]
- if len(te) > 0 && (len(te) > 1 || (te[0] != "trailers" && te[0] != "")) {
- return errors.New(`request header "TE" may only be "trailers" in HTTP/2`)
- }
- return nil
-}
-
-func new400Handler(err error) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- http.Error(w, err.Error(), http.StatusBadRequest)
- }
-}
-
-// ValidTrailerHeader reports whether name is a valid header field name to appear
-// in trailers.
-// See: http://tools.ietf.org/html/rfc7230#section-4.1.2
-func ValidTrailerHeader(name string) bool {
- name = http.CanonicalHeaderKey(name)
- if strings.HasPrefix(name, "If-") || badTrailer[name] {
- return false
- }
- return true
-}
-
-var badTrailer = map[string]bool{
- "Authorization": true,
- "Cache-Control": true,
- "Connection": true,
- "Content-Encoding": true,
- "Content-Length": true,
- "Content-Range": true,
- "Content-Type": true,
- "Expect": true,
- "Host": true,
- "Keep-Alive": true,
- "Max-Forwards": true,
- "Pragma": true,
- "Proxy-Authenticate": true,
- "Proxy-Authorization": true,
- "Proxy-Connection": true,
- "Range": true,
- "Realm": true,
- "Te": true,
- "Trailer": true,
- "Transfer-Encoding": true,
- "Www-Authenticate": true,
-}
-
-// h1ServerKeepAlivesDisabled reports whether hs has its keep-alives
-// disabled. See comments on h1ServerShutdownChan above for why
-// the code is written this way.
-func h1ServerKeepAlivesDisabled(hs *http.Server) bool {
- var x interface{} = hs
- type I interface {
- doKeepAlives() bool
- }
- if hs, ok := x.(I); ok {
- return !hs.doKeepAlives()
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_push_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_push_test.go
deleted file mode 100644
index 918fd30dc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_push_test.go
+++ /dev/null
@@ -1,521 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.8
-
-package http2
-
-import (
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "reflect"
- "strconv"
- "sync"
- "testing"
- "time"
-)
-
-func TestServer_Push_Success(t *testing.T) {
- const (
- mainBody = "<html>index page</html>"
- pushedBody = "<html>pushed page</html>"
- userAgent = "testagent"
- cookie = "testcookie"
- )
-
- var stURL string
- checkPromisedReq := func(r *http.Request, wantMethod string, wantH http.Header) error {
- if got, want := r.Method, wantMethod; got != want {
- return fmt.Errorf("promised Req.Method=%q, want %q", got, want)
- }
- if got, want := r.Header, wantH; !reflect.DeepEqual(got, want) {
- return fmt.Errorf("promised Req.Header=%q, want %q", got, want)
- }
- if got, want := "https://"+r.Host, stURL; got != want {
- return fmt.Errorf("promised Req.Host=%q, want %q", got, want)
- }
- if r.Body == nil {
- return fmt.Errorf("nil Body")
- }
- if buf, err := ioutil.ReadAll(r.Body); err != nil || len(buf) != 0 {
- return fmt.Errorf("ReadAll(Body)=%q,%v, want '',nil", buf, err)
- }
- return nil
- }
-
- errc := make(chan error, 3)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- switch r.URL.RequestURI() {
- case "/":
- // Push "/pushed?get" as a GET request, using an absolute URL.
- opt := &http.PushOptions{
- Header: http.Header{
- "User-Agent": {userAgent},
- },
- }
- if err := w.(http.Pusher).Push(stURL+"/pushed?get", opt); err != nil {
- errc <- fmt.Errorf("error pushing /pushed?get: %v", err)
- return
- }
- // Push "/pushed?head" as a HEAD request, using a path.
- opt = &http.PushOptions{
- Method: "HEAD",
- Header: http.Header{
- "User-Agent": {userAgent},
- "Cookie": {cookie},
- },
- }
- if err := w.(http.Pusher).Push("/pushed?head", opt); err != nil {
- errc <- fmt.Errorf("error pushing /pushed?head: %v", err)
- return
- }
- w.Header().Set("Content-Type", "text/html")
- w.Header().Set("Content-Length", strconv.Itoa(len(mainBody)))
- w.WriteHeader(200)
- io.WriteString(w, mainBody)
- errc <- nil
-
- case "/pushed?get":
- wantH := http.Header{}
- wantH.Set("User-Agent", userAgent)
- if err := checkPromisedReq(r, "GET", wantH); err != nil {
- errc <- fmt.Errorf("/pushed?get: %v", err)
- return
- }
- w.Header().Set("Content-Type", "text/html")
- w.Header().Set("Content-Length", strconv.Itoa(len(pushedBody)))
- w.WriteHeader(200)
- io.WriteString(w, pushedBody)
- errc <- nil
-
- case "/pushed?head":
- wantH := http.Header{}
- wantH.Set("User-Agent", userAgent)
- wantH.Set("Cookie", cookie)
- if err := checkPromisedReq(r, "HEAD", wantH); err != nil {
- errc <- fmt.Errorf("/pushed?head: %v", err)
- return
- }
- w.WriteHeader(204)
- errc <- nil
-
- default:
- errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI())
- }
- })
- stURL = st.ts.URL
-
- // Send one request, which should push two responses.
- st.greet()
- getSlash(st)
- for k := 0; k < 3; k++ {
- select {
- case <-time.After(2 * time.Second):
- t.Errorf("timeout waiting for handler %d to finish", k)
- case err := <-errc:
- if err != nil {
- t.Fatal(err)
- }
- }
- }
-
- checkPushPromise := func(f Frame, promiseID uint32, wantH [][2]string) error {
- pp, ok := f.(*PushPromiseFrame)
- if !ok {
- return fmt.Errorf("got a %T; want *PushPromiseFrame", f)
- }
- if !pp.HeadersEnded() {
- return fmt.Errorf("want END_HEADERS flag in PushPromiseFrame")
- }
- if got, want := pp.PromiseID, promiseID; got != want {
- return fmt.Errorf("got PromiseID %v; want %v", got, want)
- }
- gotH := st.decodeHeader(pp.HeaderBlockFragment())
- if !reflect.DeepEqual(gotH, wantH) {
- return fmt.Errorf("got promised headers %v; want %v", gotH, wantH)
- }
- return nil
- }
- checkHeaders := func(f Frame, wantH [][2]string) error {
- hf, ok := f.(*HeadersFrame)
- if !ok {
- return fmt.Errorf("got a %T; want *HeadersFrame", f)
- }
- gotH := st.decodeHeader(hf.HeaderBlockFragment())
- if !reflect.DeepEqual(gotH, wantH) {
- return fmt.Errorf("got response headers %v; want %v", gotH, wantH)
- }
- return nil
- }
- checkData := func(f Frame, wantData string) error {
- df, ok := f.(*DataFrame)
- if !ok {
- return fmt.Errorf("got a %T; want *DataFrame", f)
- }
- if gotData := string(df.Data()); gotData != wantData {
- return fmt.Errorf("got response data %q; want %q", gotData, wantData)
- }
- return nil
- }
-
- // Stream 1 has 2 PUSH_PROMISE + HEADERS + DATA
- // Stream 2 has HEADERS + DATA
- // Stream 4 has HEADERS
- expected := map[uint32][]func(Frame) error{
- 1: {
- func(f Frame) error {
- return checkPushPromise(f, 2, [][2]string{
- {":method", "GET"},
- {":scheme", "https"},
- {":authority", st.ts.Listener.Addr().String()},
- {":path", "/pushed?get"},
- {"user-agent", userAgent},
- })
- },
- func(f Frame) error {
- return checkPushPromise(f, 4, [][2]string{
- {":method", "HEAD"},
- {":scheme", "https"},
- {":authority", st.ts.Listener.Addr().String()},
- {":path", "/pushed?head"},
- {"cookie", cookie},
- {"user-agent", userAgent},
- })
- },
- func(f Frame) error {
- return checkHeaders(f, [][2]string{
- {":status", "200"},
- {"content-type", "text/html"},
- {"content-length", strconv.Itoa(len(mainBody))},
- })
- },
- func(f Frame) error {
- return checkData(f, mainBody)
- },
- },
- 2: {
- func(f Frame) error {
- return checkHeaders(f, [][2]string{
- {":status", "200"},
- {"content-type", "text/html"},
- {"content-length", strconv.Itoa(len(pushedBody))},
- })
- },
- func(f Frame) error {
- return checkData(f, pushedBody)
- },
- },
- 4: {
- func(f Frame) error {
- return checkHeaders(f, [][2]string{
- {":status", "204"},
- })
- },
- },
- }
-
- consumed := map[uint32]int{}
- for k := 0; len(expected) > 0; k++ {
- f, err := st.readFrame()
- if err != nil {
- for id, left := range expected {
- t.Errorf("stream %d: missing %d frames", id, len(left))
- }
- t.Fatalf("readFrame %d: %v", k, err)
- }
- id := f.Header().StreamID
- label := fmt.Sprintf("stream %d, frame %d", id, consumed[id])
- if len(expected[id]) == 0 {
- t.Fatalf("%s: unexpected frame %#+v", label, f)
- }
- check := expected[id][0]
- expected[id] = expected[id][1:]
- if len(expected[id]) == 0 {
- delete(expected, id)
- }
- if err := check(f); err != nil {
- t.Fatalf("%s: %v", label, err)
- }
- consumed[id]++
- }
-}
-
-func TestServer_Push_SuccessNoRace(t *testing.T) {
- // Regression test for issue #18326. Ensure the request handler can mutate
- // pushed request headers without racing with the PUSH_PROMISE write.
- errc := make(chan error, 2)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- switch r.URL.RequestURI() {
- case "/":
- opt := &http.PushOptions{
- Header: http.Header{"User-Agent": {"testagent"}},
- }
- if err := w.(http.Pusher).Push("/pushed", opt); err != nil {
- errc <- fmt.Errorf("error pushing: %v", err)
- return
- }
- w.WriteHeader(200)
- errc <- nil
-
- case "/pushed":
- // Update request header, ensure there is no race.
- r.Header.Set("User-Agent", "newagent")
- r.Header.Set("Cookie", "cookie")
- w.WriteHeader(200)
- errc <- nil
-
- default:
- errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI())
- }
- })
-
- // Send one request, which should push one response.
- st.greet()
- getSlash(st)
- for k := 0; k < 2; k++ {
- select {
- case <-time.After(2 * time.Second):
- t.Errorf("timeout waiting for handler %d to finish", k)
- case err := <-errc:
- if err != nil {
- t.Fatal(err)
- }
- }
- }
-}
-
-func TestServer_Push_RejectRecursivePush(t *testing.T) {
- // Expect two requests, but might get three if there's a bug and the second push succeeds.
- errc := make(chan error, 3)
- handler := func(w http.ResponseWriter, r *http.Request) error {
- baseURL := "https://" + r.Host
- switch r.URL.Path {
- case "/":
- if err := w.(http.Pusher).Push(baseURL+"/push1", nil); err != nil {
- return fmt.Errorf("first Push()=%v, want nil", err)
- }
- return nil
-
- case "/push1":
- if got, want := w.(http.Pusher).Push(baseURL+"/push2", nil), ErrRecursivePush; got != want {
- return fmt.Errorf("Push()=%v, want %v", got, want)
- }
- return nil
-
- default:
- return fmt.Errorf("unexpected path: %q", r.URL.Path)
- }
- }
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- errc <- handler(w, r)
- })
- defer st.Close()
- st.greet()
- getSlash(st)
- if err := <-errc; err != nil {
- t.Errorf("First request failed: %v", err)
- }
- if err := <-errc; err != nil {
- t.Errorf("Second request failed: %v", err)
- }
-}
-
-func testServer_Push_RejectSingleRequest(t *testing.T, doPush func(http.Pusher, *http.Request) error, settings ...Setting) {
- // Expect one request, but might get two if there's a bug and the push succeeds.
- errc := make(chan error, 2)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- errc <- doPush(w.(http.Pusher), r)
- })
- defer st.Close()
- st.greet()
- if err := st.fr.WriteSettings(settings...); err != nil {
- st.t.Fatalf("WriteSettings: %v", err)
- }
- st.wantSettingsAck()
- getSlash(st)
- if err := <-errc; err != nil {
- t.Error(err)
- }
- // Should not get a PUSH_PROMISE frame.
- hf := st.wantHeaders()
- if !hf.StreamEnded() {
- t.Error("stream should end after headers")
- }
-}
-
-func TestServer_Push_RejectIfDisabled(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if got, want := p.Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want {
- return fmt.Errorf("Push()=%v, want %v", got, want)
- }
- return nil
- },
- Setting{SettingEnablePush, 0})
-}
-
-func TestServer_Push_RejectWhenNoConcurrentStreams(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if got, want := p.Push("https://"+r.Host+"/pushed", nil), ErrPushLimitReached; got != want {
- return fmt.Errorf("Push()=%v, want %v", got, want)
- }
- return nil
- },
- Setting{SettingMaxConcurrentStreams, 0})
-}
-
-func TestServer_Push_RejectWrongScheme(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if err := p.Push("http://"+r.Host+"/pushed", nil); err == nil {
- return errors.New("Push() should have failed (push target URL is http)")
- }
- return nil
- })
-}
-
-func TestServer_Push_RejectMissingHost(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if err := p.Push("https:pushed", nil); err == nil {
- return errors.New("Push() should have failed (push target URL missing host)")
- }
- return nil
- })
-}
-
-func TestServer_Push_RejectRelativePath(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if err := p.Push("../test", nil); err == nil {
- return errors.New("Push() should have failed (push target is a relative path)")
- }
- return nil
- })
-}
-
-func TestServer_Push_RejectForbiddenMethod(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Method: "POST"}); err == nil {
- return errors.New("Push() should have failed (cannot promise a POST)")
- }
- return nil
- })
-}
-
-func TestServer_Push_RejectForbiddenHeader(t *testing.T) {
- testServer_Push_RejectSingleRequest(t,
- func(p http.Pusher, r *http.Request) error {
- header := http.Header{
- "Content-Length": {"10"},
- "Content-Encoding": {"gzip"},
- "Trailer": {"Foo"},
- "Te": {"trailers"},
- "Host": {"test.com"},
- ":authority": {"test.com"},
- }
- if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Header: header}); err == nil {
- return errors.New("Push() should have failed (forbidden headers)")
- }
- return nil
- })
-}
-
-func TestServer_Push_StateTransitions(t *testing.T) {
- const body = "foo"
-
- gotPromise := make(chan bool)
- finishedPush := make(chan bool)
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- switch r.URL.RequestURI() {
- case "/":
- if err := w.(http.Pusher).Push("/pushed", nil); err != nil {
- t.Errorf("Push error: %v", err)
- }
- // Don't finish this request until the push finishes so we don't
- // nondeterministically interleave output frames with the push.
- <-finishedPush
- case "/pushed":
- <-gotPromise
- }
- w.Header().Set("Content-Type", "text/html")
- w.Header().Set("Content-Length", strconv.Itoa(len(body)))
- w.WriteHeader(200)
- io.WriteString(w, body)
- })
- defer st.Close()
-
- st.greet()
- if st.stream(2) != nil {
- t.Fatal("stream 2 should be empty")
- }
- if got, want := st.streamState(2), stateIdle; got != want {
- t.Fatalf("streamState(2)=%v, want %v", got, want)
- }
- getSlash(st)
- // After the PUSH_PROMISE is sent, the stream should be stateHalfClosedRemote.
- st.wantPushPromise()
- if got, want := st.streamState(2), stateHalfClosedRemote; got != want {
- t.Fatalf("streamState(2)=%v, want %v", got, want)
- }
- // We stall the HTTP handler for "/pushed" until the above check. If we don't
- // stall the handler, then the handler might write HEADERS and DATA and finish
- // the stream before we check st.streamState(2) -- should that happen, we'll
- // see stateClosed and fail the above check.
- close(gotPromise)
- st.wantHeaders()
- if df := st.wantData(); !df.StreamEnded() {
- t.Fatal("expected END_STREAM flag on DATA")
- }
- if got, want := st.streamState(2), stateClosed; got != want {
- t.Fatalf("streamState(2)=%v, want %v", got, want)
- }
- close(finishedPush)
-}
-
-func TestServer_Push_RejectAfterGoAway(t *testing.T) {
- var readyOnce sync.Once
- ready := make(chan struct{})
- errc := make(chan error, 2)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- select {
- case <-ready:
- case <-time.After(5 * time.Second):
- errc <- fmt.Errorf("timeout waiting for GOAWAY to be processed")
- }
- if got, want := w.(http.Pusher).Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want {
- errc <- fmt.Errorf("Push()=%v, want %v", got, want)
- }
- errc <- nil
- })
- defer st.Close()
- st.greet()
- getSlash(st)
-
- // Send GOAWAY and wait for it to be processed.
- st.fr.WriteGoAway(1, ErrCodeNo, nil)
- go func() {
- for {
- select {
- case <-ready:
- return
- default:
- }
- st.sc.serveMsgCh <- func(loopNum int) {
- if !st.sc.pushEnabled {
- readyOnce.Do(func() { close(ready) })
- }
- }
- }
- }()
- if err := <-errc; err != nil {
- t.Error(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_test.go
deleted file mode 100644
index bd1ba20d0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/server_test.go
+++ /dev/null
@@ -1,3725 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "crypto/tls"
- "errors"
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "net"
- "net/http"
- "net/http/httptest"
- "os"
- "os/exec"
- "reflect"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-
- "golang.org/x/net/http2/hpack"
-)
-
-var stderrVerbose = flag.Bool("stderr_verbose", false, "Mirror verbosity to stderr, unbuffered")
-
-func stderrv() io.Writer {
- if *stderrVerbose {
- return os.Stderr
- }
-
- return ioutil.Discard
-}
-
-type serverTester struct {
- cc net.Conn // client conn
- t testing.TB
- ts *httptest.Server
- fr *Framer
- serverLogBuf bytes.Buffer // logger for httptest.Server
- logFilter []string // substrings to filter out
- scMu sync.Mutex // guards sc
- sc *serverConn
- hpackDec *hpack.Decoder
- decodedHeaders [][2]string
-
- // If http2debug!=2, then we capture Frame debug logs that will be written
- // to t.Log after a test fails. The read and write logs use separate locks
- // and buffers so we don't accidentally introduce synchronization between
- // the read and write goroutines, which may hide data races.
- frameReadLogMu sync.Mutex
- frameReadLogBuf bytes.Buffer
- frameWriteLogMu sync.Mutex
- frameWriteLogBuf bytes.Buffer
-
- // writing headers:
- headerBuf bytes.Buffer
- hpackEnc *hpack.Encoder
-}
-
-func init() {
- testHookOnPanicMu = new(sync.Mutex)
- goAwayTimeout = 25 * time.Millisecond
-}
-
-func resetHooks() {
- testHookOnPanicMu.Lock()
- testHookOnPanic = nil
- testHookOnPanicMu.Unlock()
-}
-
-type serverTesterOpt string
-
-var optOnlyServer = serverTesterOpt("only_server")
-var optQuiet = serverTesterOpt("quiet_logging")
-var optFramerReuseFrames = serverTesterOpt("frame_reuse_frames")
-
-func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}) *serverTester {
- resetHooks()
-
- ts := httptest.NewUnstartedServer(handler)
-
- tlsConfig := &tls.Config{
- InsecureSkipVerify: true,
- NextProtos: []string{NextProtoTLS},
- }
-
- var onlyServer, quiet, framerReuseFrames bool
- h2server := new(Server)
- for _, opt := range opts {
- switch v := opt.(type) {
- case func(*tls.Config):
- v(tlsConfig)
- case func(*httptest.Server):
- v(ts)
- case func(*Server):
- v(h2server)
- case serverTesterOpt:
- switch v {
- case optOnlyServer:
- onlyServer = true
- case optQuiet:
- quiet = true
- case optFramerReuseFrames:
- framerReuseFrames = true
- }
- case func(net.Conn, http.ConnState):
- ts.Config.ConnState = v
- default:
- t.Fatalf("unknown newServerTester option type %T", v)
- }
- }
-
- ConfigureServer(ts.Config, h2server)
-
- st := &serverTester{
- t: t,
- ts: ts,
- }
- st.hpackEnc = hpack.NewEncoder(&st.headerBuf)
- st.hpackDec = hpack.NewDecoder(initialHeaderTableSize, st.onHeaderField)
-
- ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config
- if quiet {
- ts.Config.ErrorLog = log.New(ioutil.Discard, "", 0)
- } else {
- ts.Config.ErrorLog = log.New(io.MultiWriter(stderrv(), twriter{t: t, st: st}, &st.serverLogBuf), "", log.LstdFlags)
- }
- ts.StartTLS()
-
- if VerboseLogs {
- t.Logf("Running test server at: %s", ts.URL)
- }
- testHookGetServerConn = func(v *serverConn) {
- st.scMu.Lock()
- defer st.scMu.Unlock()
- st.sc = v
- }
- log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st}))
- if !onlyServer {
- cc, err := tls.Dial("tcp", ts.Listener.Addr().String(), tlsConfig)
- if err != nil {
- t.Fatal(err)
- }
- st.cc = cc
- st.fr = NewFramer(cc, cc)
- if framerReuseFrames {
- st.fr.SetReuseFrames()
- }
- if !logFrameReads && !logFrameWrites {
- st.fr.debugReadLoggerf = func(m string, v ...interface{}) {
- m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n"
- st.frameReadLogMu.Lock()
- fmt.Fprintf(&st.frameReadLogBuf, m, v...)
- st.frameReadLogMu.Unlock()
- }
- st.fr.debugWriteLoggerf = func(m string, v ...interface{}) {
- m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n"
- st.frameWriteLogMu.Lock()
- fmt.Fprintf(&st.frameWriteLogBuf, m, v...)
- st.frameWriteLogMu.Unlock()
- }
- st.fr.logReads = true
- st.fr.logWrites = true
- }
- }
- return st
-}
-
-func (st *serverTester) closeConn() {
- st.scMu.Lock()
- defer st.scMu.Unlock()
- st.sc.conn.Close()
-}
-
-func (st *serverTester) addLogFilter(phrase string) {
- st.logFilter = append(st.logFilter, phrase)
-}
-
-func (st *serverTester) stream(id uint32) *stream {
- ch := make(chan *stream, 1)
- st.sc.serveMsgCh <- func(int) {
- ch <- st.sc.streams[id]
- }
- return <-ch
-}
-
-func (st *serverTester) streamState(id uint32) streamState {
- ch := make(chan streamState, 1)
- st.sc.serveMsgCh <- func(int) {
- state, _ := st.sc.state(id)
- ch <- state
- }
- return <-ch
-}
-
-// loopNum reports how many times this conn's select loop has gone around.
-func (st *serverTester) loopNum() int {
- lastc := make(chan int, 1)
- st.sc.serveMsgCh <- func(loopNum int) {
- lastc <- loopNum
- }
- return <-lastc
-}
-
-// awaitIdle heuristically awaits for the server conn's select loop to be idle.
-// The heuristic is that the server connection's serve loop must schedule
-// 50 times in a row without any channel sends or receives occurring.
-func (st *serverTester) awaitIdle() {
- remain := 50
- last := st.loopNum()
- for remain > 0 {
- n := st.loopNum()
- if n == last+1 {
- remain--
- } else {
- remain = 50
- }
- last = n
- }
-}
-
-func (st *serverTester) Close() {
- if st.t.Failed() {
- st.frameReadLogMu.Lock()
- if st.frameReadLogBuf.Len() > 0 {
- st.t.Logf("Framer read log:\n%s", st.frameReadLogBuf.String())
- }
- st.frameReadLogMu.Unlock()
-
- st.frameWriteLogMu.Lock()
- if st.frameWriteLogBuf.Len() > 0 {
- st.t.Logf("Framer write log:\n%s", st.frameWriteLogBuf.String())
- }
- st.frameWriteLogMu.Unlock()
-
- // If we failed already (and are likely in a Fatal,
- // unwindowing), force close the connection, so the
- // httptest.Server doesn't wait forever for the conn
- // to close.
- if st.cc != nil {
- st.cc.Close()
- }
- }
- st.ts.Close()
- if st.cc != nil {
- st.cc.Close()
- }
- log.SetOutput(os.Stderr)
-}
-
-// greet initiates the client's HTTP/2 connection into a state where
-// frames may be sent.
-func (st *serverTester) greet() {
- st.greetAndCheckSettings(func(Setting) error { return nil })
-}
-
-func (st *serverTester) greetAndCheckSettings(checkSetting func(s Setting) error) {
- st.writePreface()
- st.writeInitialSettings()
- st.wantSettings().ForeachSetting(checkSetting)
- st.writeSettingsAck()
-
- // The initial WINDOW_UPDATE and SETTINGS ACK can come in any order.
- var gotSettingsAck bool
- var gotWindowUpdate bool
-
- for i := 0; i < 2; i++ {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatal(err)
- }
- switch f := f.(type) {
- case *SettingsFrame:
- if !f.Header().Flags.Has(FlagSettingsAck) {
- st.t.Fatal("Settings Frame didn't have ACK set")
- }
- gotSettingsAck = true
-
- case *WindowUpdateFrame:
- if f.FrameHeader.StreamID != 0 {
- st.t.Fatalf("WindowUpdate StreamID = %d; want 0", f.FrameHeader.StreamID)
- }
- incr := uint32((&Server{}).initialConnRecvWindowSize() - initialWindowSize)
- if f.Increment != incr {
- st.t.Fatalf("WindowUpdate increment = %d; want %d", f.Increment, incr)
- }
- gotWindowUpdate = true
-
- default:
- st.t.Fatalf("Wanting a settings ACK or window update, received a %T", f)
- }
- }
-
- if !gotSettingsAck {
- st.t.Fatalf("Didn't get a settings ACK")
- }
- if !gotWindowUpdate {
- st.t.Fatalf("Didn't get a window update")
- }
-}
-
-func (st *serverTester) writePreface() {
- n, err := st.cc.Write(clientPreface)
- if err != nil {
- st.t.Fatalf("Error writing client preface: %v", err)
- }
- if n != len(clientPreface) {
- st.t.Fatalf("Writing client preface, wrote %d bytes; want %d", n, len(clientPreface))
- }
-}
-
-func (st *serverTester) writeInitialSettings() {
- if err := st.fr.WriteSettings(); err != nil {
- st.t.Fatalf("Error writing initial SETTINGS frame from client to server: %v", err)
- }
-}
-
-func (st *serverTester) writeSettingsAck() {
- if err := st.fr.WriteSettingsAck(); err != nil {
- st.t.Fatalf("Error writing ACK of server's SETTINGS: %v", err)
- }
-}
-
-func (st *serverTester) writeHeaders(p HeadersFrameParam) {
- if err := st.fr.WriteHeaders(p); err != nil {
- st.t.Fatalf("Error writing HEADERS: %v", err)
- }
-}
-
-func (st *serverTester) writePriority(id uint32, p PriorityParam) {
- if err := st.fr.WritePriority(id, p); err != nil {
- st.t.Fatalf("Error writing PRIORITY: %v", err)
- }
-}
-
-func (st *serverTester) encodeHeaderField(k, v string) {
- err := st.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v})
- if err != nil {
- st.t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err)
- }
-}
-
-// encodeHeaderRaw is the magic-free version of encodeHeader.
-// It takes 0 or more (k, v) pairs and encodes them.
-func (st *serverTester) encodeHeaderRaw(headers ...string) []byte {
- if len(headers)%2 == 1 {
- panic("odd number of kv args")
- }
- st.headerBuf.Reset()
- for len(headers) > 0 {
- k, v := headers[0], headers[1]
- st.encodeHeaderField(k, v)
- headers = headers[2:]
- }
- return st.headerBuf.Bytes()
-}
-
-// encodeHeader encodes headers and returns their HPACK bytes. headers
-// must contain an even number of key/value pairs. There may be
-// multiple pairs for keys (e.g. "cookie"). The :method, :path, and
-// :scheme headers default to GET, / and https. The :authority header
-// defaults to st.ts.Listener.Addr().
-func (st *serverTester) encodeHeader(headers ...string) []byte {
- if len(headers)%2 == 1 {
- panic("odd number of kv args")
- }
-
- st.headerBuf.Reset()
- defaultAuthority := st.ts.Listener.Addr().String()
-
- if len(headers) == 0 {
- // Fast path, mostly for benchmarks, so test code doesn't pollute
- // profiles when we're looking to improve server allocations.
- st.encodeHeaderField(":method", "GET")
- st.encodeHeaderField(":scheme", "https")
- st.encodeHeaderField(":authority", defaultAuthority)
- st.encodeHeaderField(":path", "/")
- return st.headerBuf.Bytes()
- }
-
- if len(headers) == 2 && headers[0] == ":method" {
- // Another fast path for benchmarks.
- st.encodeHeaderField(":method", headers[1])
- st.encodeHeaderField(":scheme", "https")
- st.encodeHeaderField(":authority", defaultAuthority)
- st.encodeHeaderField(":path", "/")
- return st.headerBuf.Bytes()
- }
-
- pseudoCount := map[string]int{}
- keys := []string{":method", ":scheme", ":authority", ":path"}
- vals := map[string][]string{
- ":method": {"GET"},
- ":scheme": {"https"},
- ":authority": {defaultAuthority},
- ":path": {"/"},
- }
- for len(headers) > 0 {
- k, v := headers[0], headers[1]
- headers = headers[2:]
- if _, ok := vals[k]; !ok {
- keys = append(keys, k)
- }
- if strings.HasPrefix(k, ":") {
- pseudoCount[k]++
- if pseudoCount[k] == 1 {
- vals[k] = []string{v}
- } else {
- // Allows testing of invalid headers w/ dup pseudo fields.
- vals[k] = append(vals[k], v)
- }
- } else {
- vals[k] = append(vals[k], v)
- }
- }
- for _, k := range keys {
- for _, v := range vals[k] {
- st.encodeHeaderField(k, v)
- }
- }
- return st.headerBuf.Bytes()
-}
-
-// bodylessReq1 writes a HEADERS frames with StreamID 1 and EndStream and EndHeaders set.
-func (st *serverTester) bodylessReq1(headers ...string) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(headers...),
- EndStream: true,
- EndHeaders: true,
- })
-}
-
-func (st *serverTester) writeData(streamID uint32, endStream bool, data []byte) {
- if err := st.fr.WriteData(streamID, endStream, data); err != nil {
- st.t.Fatalf("Error writing DATA: %v", err)
- }
-}
-
-func (st *serverTester) writeDataPadded(streamID uint32, endStream bool, data, pad []byte) {
- if err := st.fr.WriteDataPadded(streamID, endStream, data, pad); err != nil {
- st.t.Fatalf("Error writing DATA: %v", err)
- }
-}
-
-func readFrameTimeout(fr *Framer, wait time.Duration) (Frame, error) {
- ch := make(chan interface{}, 1)
- go func() {
- fr, err := fr.ReadFrame()
- if err != nil {
- ch <- err
- } else {
- ch <- fr
- }
- }()
- t := time.NewTimer(wait)
- select {
- case v := <-ch:
- t.Stop()
- if fr, ok := v.(Frame); ok {
- return fr, nil
- }
- return nil, v.(error)
- case <-t.C:
- return nil, errors.New("timeout waiting for frame")
- }
-}
-
-func (st *serverTester) readFrame() (Frame, error) {
- return readFrameTimeout(st.fr, 2*time.Second)
-}
-
-func (st *serverTester) wantHeaders() *HeadersFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a HEADERS frame: %v", err)
- }
- hf, ok := f.(*HeadersFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *HeadersFrame", f)
- }
- return hf
-}
-
-func (st *serverTester) wantContinuation() *ContinuationFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a CONTINUATION frame: %v", err)
- }
- cf, ok := f.(*ContinuationFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *ContinuationFrame", f)
- }
- return cf
-}
-
-func (st *serverTester) wantData() *DataFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a DATA frame: %v", err)
- }
- df, ok := f.(*DataFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *DataFrame", f)
- }
- return df
-}
-
-func (st *serverTester) wantSettings() *SettingsFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a SETTINGS frame: %v", err)
- }
- sf, ok := f.(*SettingsFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *SettingsFrame", f)
- }
- return sf
-}
-
-func (st *serverTester) wantPing() *PingFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a PING frame: %v", err)
- }
- pf, ok := f.(*PingFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *PingFrame", f)
- }
- return pf
-}
-
-func (st *serverTester) wantGoAway() *GoAwayFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a GOAWAY frame: %v", err)
- }
- gf, ok := f.(*GoAwayFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *GoAwayFrame", f)
- }
- return gf
-}
-
-func (st *serverTester) wantRSTStream(streamID uint32, errCode ErrCode) {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting an RSTStream frame: %v", err)
- }
- rs, ok := f.(*RSTStreamFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *RSTStreamFrame", f)
- }
- if rs.FrameHeader.StreamID != streamID {
- st.t.Fatalf("RSTStream StreamID = %d; want %d", rs.FrameHeader.StreamID, streamID)
- }
- if rs.ErrCode != errCode {
- st.t.Fatalf("RSTStream ErrCode = %d (%s); want %d (%s)", rs.ErrCode, rs.ErrCode, errCode, errCode)
- }
-}
-
-func (st *serverTester) wantWindowUpdate(streamID, incr uint32) {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatalf("Error while expecting a WINDOW_UPDATE frame: %v", err)
- }
- wu, ok := f.(*WindowUpdateFrame)
- if !ok {
- st.t.Fatalf("got a %T; want *WindowUpdateFrame", f)
- }
- if wu.FrameHeader.StreamID != streamID {
- st.t.Fatalf("WindowUpdate StreamID = %d; want %d", wu.FrameHeader.StreamID, streamID)
- }
- if wu.Increment != incr {
- st.t.Fatalf("WindowUpdate increment = %d; want %d", wu.Increment, incr)
- }
-}
-
-func (st *serverTester) wantSettingsAck() {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatal(err)
- }
- sf, ok := f.(*SettingsFrame)
- if !ok {
- st.t.Fatalf("Wanting a settings ACK, received a %T", f)
- }
- if !sf.Header().Flags.Has(FlagSettingsAck) {
- st.t.Fatal("Settings Frame didn't have ACK set")
- }
-}
-
-func (st *serverTester) wantPushPromise() *PushPromiseFrame {
- f, err := st.readFrame()
- if err != nil {
- st.t.Fatal(err)
- }
- ppf, ok := f.(*PushPromiseFrame)
- if !ok {
- st.t.Fatalf("Wanted PushPromise, received %T", ppf)
- }
- return ppf
-}
-
-func TestServer(t *testing.T) {
- gotReq := make(chan bool, 1)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Foo", "Bar")
- gotReq <- true
- })
- defer st.Close()
-
- covers("3.5", `
- The server connection preface consists of a potentially empty
- SETTINGS frame ([SETTINGS]) that MUST be the first frame the
- server sends in the HTTP/2 connection.
- `)
-
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(),
- EndStream: true, // no DATA frames
- EndHeaders: true,
- })
-
- select {
- case <-gotReq:
- case <-time.After(2 * time.Second):
- t.Error("timeout waiting for request")
- }
-}
-
-func TestServer_Request_Get(t *testing.T) {
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader("foo-bar", "some-value"),
- EndStream: true, // no DATA frames
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("Method = %q; want GET", r.Method)
- }
- if r.URL.Path != "/" {
- t.Errorf("URL.Path = %q; want /", r.URL.Path)
- }
- if r.ContentLength != 0 {
- t.Errorf("ContentLength = %v; want 0", r.ContentLength)
- }
- if r.Close {
- t.Error("Close = true; want false")
- }
- if !strings.Contains(r.RemoteAddr, ":") {
- t.Errorf("RemoteAddr = %q; want something with a colon", r.RemoteAddr)
- }
- if r.Proto != "HTTP/2.0" || r.ProtoMajor != 2 || r.ProtoMinor != 0 {
- t.Errorf("Proto = %q Major=%v,Minor=%v; want HTTP/2.0", r.Proto, r.ProtoMajor, r.ProtoMinor)
- }
- wantHeader := http.Header{
- "Foo-Bar": []string{"some-value"},
- }
- if !reflect.DeepEqual(r.Header, wantHeader) {
- t.Errorf("Header = %#v; want %#v", r.Header, wantHeader)
- }
- if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 {
- t.Errorf("Read = %d, %v; want 0, EOF", n, err)
- }
- })
-}
-
-func TestServer_Request_Get_PathSlashes(t *testing.T) {
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":path", "/%2f/"),
- EndStream: true, // no DATA frames
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if r.RequestURI != "/%2f/" {
- t.Errorf("RequestURI = %q; want /%%2f/", r.RequestURI)
- }
- if r.URL.Path != "///" {
- t.Errorf("URL.Path = %q; want ///", r.URL.Path)
- }
- })
-}
-
-// TODO: add a test with EndStream=true on the HEADERS but setting a
-// Content-Length anyway. Should we just omit it and force it to
-// zero?
-
-func TestServer_Request_Post_NoContentLength_EndStream(t *testing.T) {
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: true,
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if r.Method != "POST" {
- t.Errorf("Method = %q; want POST", r.Method)
- }
- if r.ContentLength != 0 {
- t.Errorf("ContentLength = %v; want 0", r.ContentLength)
- }
- if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 {
- t.Errorf("Read = %d, %v; want 0, EOF", n, err)
- }
- })
-}
-
-func TestServer_Request_Post_Body_ImmediateEOF(t *testing.T) {
- testBodyContents(t, -1, "", func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, true, nil) // just kidding. empty body.
- })
-}
-
-func TestServer_Request_Post_Body_OneData(t *testing.T) {
- const content = "Some content"
- testBodyContents(t, -1, content, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, true, []byte(content))
- })
-}
-
-func TestServer_Request_Post_Body_TwoData(t *testing.T) {
- const content = "Some content"
- testBodyContents(t, -1, content, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, false, []byte(content[:5]))
- st.writeData(1, true, []byte(content[5:]))
- })
-}
-
-func TestServer_Request_Post_Body_ContentLength_Correct(t *testing.T) {
- const content = "Some content"
- testBodyContents(t, int64(len(content)), content, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(
- ":method", "POST",
- "content-length", strconv.Itoa(len(content)),
- ),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, true, []byte(content))
- })
-}
-
-func TestServer_Request_Post_Body_ContentLength_TooLarge(t *testing.T) {
- testBodyContentsFail(t, 3, "request declared a Content-Length of 3 but only wrote 2 bytes",
- func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(
- ":method", "POST",
- "content-length", "3",
- ),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, true, []byte("12"))
- })
-}
-
-func TestServer_Request_Post_Body_ContentLength_TooSmall(t *testing.T) {
- testBodyContentsFail(t, 4, "sender tried to send more than declared Content-Length of 4 bytes",
- func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(
- ":method", "POST",
- "content-length", "4",
- ),
- EndStream: false, // to say DATA frames are coming
- EndHeaders: true,
- })
- st.writeData(1, true, []byte("12345"))
- })
-}
-
-func testBodyContents(t *testing.T, wantContentLength int64, wantBody string, write func(st *serverTester)) {
- testServerRequest(t, write, func(r *http.Request) {
- if r.Method != "POST" {
- t.Errorf("Method = %q; want POST", r.Method)
- }
- if r.ContentLength != wantContentLength {
- t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength)
- }
- all, err := ioutil.ReadAll(r.Body)
- if err != nil {
- t.Fatal(err)
- }
- if string(all) != wantBody {
- t.Errorf("Read = %q; want %q", all, wantBody)
- }
- if err := r.Body.Close(); err != nil {
- t.Fatalf("Close: %v", err)
- }
- })
-}
-
-func testBodyContentsFail(t *testing.T, wantContentLength int64, wantReadError string, write func(st *serverTester)) {
- testServerRequest(t, write, func(r *http.Request) {
- if r.Method != "POST" {
- t.Errorf("Method = %q; want POST", r.Method)
- }
- if r.ContentLength != wantContentLength {
- t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength)
- }
- all, err := ioutil.ReadAll(r.Body)
- if err == nil {
- t.Fatalf("expected an error (%q) reading from the body. Successfully read %q instead.",
- wantReadError, all)
- }
- if !strings.Contains(err.Error(), wantReadError) {
- t.Fatalf("Body.Read = %v; want substring %q", err, wantReadError)
- }
- if err := r.Body.Close(); err != nil {
- t.Fatalf("Close: %v", err)
- }
- })
-}
-
-// Using a Host header, instead of :authority
-func TestServer_Request_Get_Host(t *testing.T) {
- const host = "example.com"
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":authority", "", "host", host),
- EndStream: true,
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if r.Host != host {
- t.Errorf("Host = %q; want %q", r.Host, host)
- }
- })
-}
-
-// Using an :authority pseudo-header, instead of Host
-func TestServer_Request_Get_Authority(t *testing.T) {
- const host = "example.com"
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":authority", host),
- EndStream: true,
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if r.Host != host {
- t.Errorf("Host = %q; want %q", r.Host, host)
- }
- })
-}
-
-func TestServer_Request_WithContinuation(t *testing.T) {
- wantHeader := http.Header{
- "Foo-One": []string{"value-one"},
- "Foo-Two": []string{"value-two"},
- "Foo-Three": []string{"value-three"},
- }
- testServerRequest(t, func(st *serverTester) {
- fullHeaders := st.encodeHeader(
- "foo-one", "value-one",
- "foo-two", "value-two",
- "foo-three", "value-three",
- )
- remain := fullHeaders
- chunks := 0
- for len(remain) > 0 {
- const maxChunkSize = 5
- chunk := remain
- if len(chunk) > maxChunkSize {
- chunk = chunk[:maxChunkSize]
- }
- remain = remain[len(chunk):]
-
- if chunks == 0 {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: chunk,
- EndStream: true, // no DATA frames
- EndHeaders: false, // we'll have continuation frames
- })
- } else {
- err := st.fr.WriteContinuation(1, len(remain) == 0, chunk)
- if err != nil {
- t.Fatal(err)
- }
- }
- chunks++
- }
- if chunks < 2 {
- t.Fatal("too few chunks")
- }
- }, func(r *http.Request) {
- if !reflect.DeepEqual(r.Header, wantHeader) {
- t.Errorf("Header = %#v; want %#v", r.Header, wantHeader)
- }
- })
-}
-
-// Concatenated cookie headers. ("8.1.2.5 Compressing the Cookie Header Field")
-func TestServer_Request_CookieConcat(t *testing.T) {
- const host = "example.com"
- testServerRequest(t, func(st *serverTester) {
- st.bodylessReq1(
- ":authority", host,
- "cookie", "a=b",
- "cookie", "c=d",
- "cookie", "e=f",
- )
- }, func(r *http.Request) {
- const want = "a=b; c=d; e=f"
- if got := r.Header.Get("Cookie"); got != want {
- t.Errorf("Cookie = %q; want %q", got, want)
- }
- })
-}
-
-func TestServer_Request_Reject_CapitalHeader(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("UPPER", "v") })
-}
-
-func TestServer_Request_Reject_HeaderFieldNameColon(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has:colon", "v") })
-}
-
-func TestServer_Request_Reject_HeaderFieldNameNULL(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has\x00null", "v") })
-}
-
-func TestServer_Request_Reject_HeaderFieldNameEmpty(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("", "v") })
-}
-
-func TestServer_Request_Reject_HeaderFieldValueNewline(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\nnewline") })
-}
-
-func TestServer_Request_Reject_HeaderFieldValueCR(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\rcarriage") })
-}
-
-func TestServer_Request_Reject_HeaderFieldValueDEL(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\x7fdel") })
-}
-
-func TestServer_Request_Reject_Pseudo_Missing_method(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":method", "") })
-}
-
-func TestServer_Request_Reject_Pseudo_ExactlyOne(t *testing.T) {
- // 8.1.2.3 Request Pseudo-Header Fields
- // "All HTTP/2 requests MUST include exactly one valid value" ...
- testRejectRequest(t, func(st *serverTester) {
- st.addLogFilter("duplicate pseudo-header")
- st.bodylessReq1(":method", "GET", ":method", "POST")
- })
-}
-
-func TestServer_Request_Reject_Pseudo_AfterRegular(t *testing.T) {
- // 8.1.2.3 Request Pseudo-Header Fields
- // "All pseudo-header fields MUST appear in the header block
- // before regular header fields. Any request or response that
- // contains a pseudo-header field that appears in a header
- // block after a regular header field MUST be treated as
- // malformed (Section 8.1.2.6)."
- testRejectRequest(t, func(st *serverTester) {
- st.addLogFilter("pseudo-header after regular header")
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":method", Value: "GET"})
- enc.WriteField(hpack.HeaderField{Name: "regular", Value: "foobar"})
- enc.WriteField(hpack.HeaderField{Name: ":path", Value: "/"})
- enc.WriteField(hpack.HeaderField{Name: ":scheme", Value: "https"})
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: buf.Bytes(),
- EndStream: true,
- EndHeaders: true,
- })
- })
-}
-
-func TestServer_Request_Reject_Pseudo_Missing_path(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":path", "") })
-}
-
-func TestServer_Request_Reject_Pseudo_Missing_scheme(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "") })
-}
-
-func TestServer_Request_Reject_Pseudo_scheme_invalid(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "bogus") })
-}
-
-func TestServer_Request_Reject_Pseudo_Unknown(t *testing.T) {
- testRejectRequest(t, func(st *serverTester) {
- st.addLogFilter(`invalid pseudo-header ":unknown_thing"`)
- st.bodylessReq1(":unknown_thing", "")
- })
-}
-
-func testRejectRequest(t *testing.T, send func(*serverTester)) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- t.Error("server request made it to handler; should've been rejected")
- })
- defer st.Close()
-
- st.greet()
- send(st)
- st.wantRSTStream(1, ErrCodeProtocol)
-}
-
-func testRejectRequestWithProtocolError(t *testing.T, send func(*serverTester)) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- t.Error("server request made it to handler; should've been rejected")
- }, optQuiet)
- defer st.Close()
-
- st.greet()
- send(st)
- gf := st.wantGoAway()
- if gf.ErrCode != ErrCodeProtocol {
- t.Errorf("err code = %v; want %v", gf.ErrCode, ErrCodeProtocol)
- }
-}
-
-// Section 5.1, on idle connections: "Receiving any frame other than
-// HEADERS or PRIORITY on a stream in this state MUST be treated as a
-// connection error (Section 5.4.1) of type PROTOCOL_ERROR."
-func TestRejectFrameOnIdle_WindowUpdate(t *testing.T) {
- testRejectRequestWithProtocolError(t, func(st *serverTester) {
- st.fr.WriteWindowUpdate(123, 456)
- })
-}
-func TestRejectFrameOnIdle_Data(t *testing.T) {
- testRejectRequestWithProtocolError(t, func(st *serverTester) {
- st.fr.WriteData(123, true, nil)
- })
-}
-func TestRejectFrameOnIdle_RSTStream(t *testing.T) {
- testRejectRequestWithProtocolError(t, func(st *serverTester) {
- st.fr.WriteRSTStream(123, ErrCodeCancel)
- })
-}
-
-func TestServer_Request_Connect(t *testing.T) {
- testServerRequest(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeaderRaw(
- ":method", "CONNECT",
- ":authority", "example.com:123",
- ),
- EndStream: true,
- EndHeaders: true,
- })
- }, func(r *http.Request) {
- if g, w := r.Method, "CONNECT"; g != w {
- t.Errorf("Method = %q; want %q", g, w)
- }
- if g, w := r.RequestURI, "example.com:123"; g != w {
- t.Errorf("RequestURI = %q; want %q", g, w)
- }
- if g, w := r.URL.Host, "example.com:123"; g != w {
- t.Errorf("URL.Host = %q; want %q", g, w)
- }
- })
-}
-
-func TestServer_Request_Connect_InvalidPath(t *testing.T) {
- testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeaderRaw(
- ":method", "CONNECT",
- ":authority", "example.com:123",
- ":path", "/bogus",
- ),
- EndStream: true,
- EndHeaders: true,
- })
- })
-}
-
-func TestServer_Request_Connect_InvalidScheme(t *testing.T) {
- testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeaderRaw(
- ":method", "CONNECT",
- ":authority", "example.com:123",
- ":scheme", "https",
- ),
- EndStream: true,
- EndHeaders: true,
- })
- })
-}
-
-func TestServer_Ping(t *testing.T) {
- st := newServerTester(t, nil)
- defer st.Close()
- st.greet()
-
- // Server should ignore this one, since it has ACK set.
- ackPingData := [8]byte{1, 2, 4, 8, 16, 32, 64, 128}
- if err := st.fr.WritePing(true, ackPingData); err != nil {
- t.Fatal(err)
- }
-
- // But the server should reply to this one, since ACK is false.
- pingData := [8]byte{1, 2, 3, 4, 5, 6, 7, 8}
- if err := st.fr.WritePing(false, pingData); err != nil {
- t.Fatal(err)
- }
-
- pf := st.wantPing()
- if !pf.Flags.Has(FlagPingAck) {
- t.Error("response ping doesn't have ACK set")
- }
- if pf.Data != pingData {
- t.Errorf("response ping has data %q; want %q", pf.Data, pingData)
- }
-}
-
-func TestServer_RejectsLargeFrames(t *testing.T) {
- if runtime.GOOS == "windows" {
- t.Skip("see golang.org/issue/13434")
- }
-
- st := newServerTester(t, nil)
- defer st.Close()
- st.greet()
-
- // Write too large of a frame (too large by one byte)
- // We ignore the return value because it's expected that the server
- // will only read the first 9 bytes (the headre) and then disconnect.
- st.fr.WriteRawFrame(0xff, 0, 0, make([]byte, defaultMaxReadFrameSize+1))
-
- gf := st.wantGoAway()
- if gf.ErrCode != ErrCodeFrameSize {
- t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFrameSize)
- }
- if st.serverLogBuf.Len() != 0 {
- // Previously we spun here for a bit until the GOAWAY disconnect
- // timer fired, logging while we fired.
- t.Errorf("unexpected server output: %.500s\n", st.serverLogBuf.Bytes())
- }
-}
-
-func TestServer_Handler_Sends_WindowUpdate(t *testing.T) {
- puppet := newHandlerPuppet()
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- puppet.act(w, r)
- })
- defer st.Close()
- defer puppet.done()
-
- st.greet()
-
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // data coming
- EndHeaders: true,
- })
- st.writeData(1, false, []byte("abcdef"))
- puppet.do(readBodyHandler(t, "abc"))
- st.wantWindowUpdate(0, 3)
- st.wantWindowUpdate(1, 3)
-
- puppet.do(readBodyHandler(t, "def"))
- st.wantWindowUpdate(0, 3)
- st.wantWindowUpdate(1, 3)
-
- st.writeData(1, true, []byte("ghijkl")) // END_STREAM here
- puppet.do(readBodyHandler(t, "ghi"))
- puppet.do(readBodyHandler(t, "jkl"))
- st.wantWindowUpdate(0, 3)
- st.wantWindowUpdate(0, 3) // no more stream-level, since END_STREAM
-}
-
-// the version of the TestServer_Handler_Sends_WindowUpdate with padding.
-// See golang.org/issue/16556
-func TestServer_Handler_Sends_WindowUpdate_Padding(t *testing.T) {
- puppet := newHandlerPuppet()
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- puppet.act(w, r)
- })
- defer st.Close()
- defer puppet.done()
-
- st.greet()
-
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false,
- EndHeaders: true,
- })
- st.writeDataPadded(1, false, []byte("abcdef"), []byte{0, 0, 0, 0})
-
- // Expect to immediately get our 5 bytes of padding back for
- // both the connection and stream (4 bytes of padding + 1 byte of length)
- st.wantWindowUpdate(0, 5)
- st.wantWindowUpdate(1, 5)
-
- puppet.do(readBodyHandler(t, "abc"))
- st.wantWindowUpdate(0, 3)
- st.wantWindowUpdate(1, 3)
-
- puppet.do(readBodyHandler(t, "def"))
- st.wantWindowUpdate(0, 3)
- st.wantWindowUpdate(1, 3)
-}
-
-func TestServer_Send_GoAway_After_Bogus_WindowUpdate(t *testing.T) {
- st := newServerTester(t, nil)
- defer st.Close()
- st.greet()
- if err := st.fr.WriteWindowUpdate(0, 1<<31-1); err != nil {
- t.Fatal(err)
- }
- gf := st.wantGoAway()
- if gf.ErrCode != ErrCodeFlowControl {
- t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFlowControl)
- }
- if gf.LastStreamID != 0 {
- t.Errorf("GOAWAY last stream ID = %v; want %v", gf.LastStreamID, 0)
- }
-}
-
-func TestServer_Send_RstStream_After_Bogus_WindowUpdate(t *testing.T) {
- inHandler := make(chan bool)
- blockHandler := make(chan bool)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- inHandler <- true
- <-blockHandler
- })
- defer st.Close()
- defer close(blockHandler)
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // keep it open
- EndHeaders: true,
- })
- <-inHandler
- // Send a bogus window update:
- if err := st.fr.WriteWindowUpdate(1, 1<<31-1); err != nil {
- t.Fatal(err)
- }
- st.wantRSTStream(1, ErrCodeFlowControl)
-}
-
-// testServerPostUnblock sends a hanging POST with unsent data to handler,
-// then runs fn once in the handler, and verifies that the error returned from
-// handler is acceptable. It fails if takes over 5 seconds for handler to exit.
-func testServerPostUnblock(t *testing.T,
- handler func(http.ResponseWriter, *http.Request) error,
- fn func(*serverTester),
- checkErr func(error),
- otherHeaders ...string) {
- inHandler := make(chan bool)
- errc := make(chan error, 1)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- inHandler <- true
- errc <- handler(w, r)
- })
- defer st.Close()
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(append([]string{":method", "POST"}, otherHeaders...)...),
- EndStream: false, // keep it open
- EndHeaders: true,
- })
- <-inHandler
- fn(st)
- select {
- case err := <-errc:
- if checkErr != nil {
- checkErr(err)
- }
- case <-time.After(5 * time.Second):
- t.Fatal("timeout waiting for Handler to return")
- }
-}
-
-func TestServer_RSTStream_Unblocks_Read(t *testing.T) {
- testServerPostUnblock(t,
- func(w http.ResponseWriter, r *http.Request) (err error) {
- _, err = r.Body.Read(make([]byte, 1))
- return
- },
- func(st *serverTester) {
- if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil {
- t.Fatal(err)
- }
- },
- func(err error) {
- want := StreamError{StreamID: 0x1, Code: 0x8}
- if !reflect.DeepEqual(err, want) {
- t.Errorf("Read error = %v; want %v", err, want)
- }
- },
- )
-}
-
-func TestServer_RSTStream_Unblocks_Header_Write(t *testing.T) {
- // Run this test a bunch, because it doesn't always
- // deadlock. But with a bunch, it did.
- n := 50
- if testing.Short() {
- n = 5
- }
- for i := 0; i < n; i++ {
- testServer_RSTStream_Unblocks_Header_Write(t)
- }
-}
-
-func testServer_RSTStream_Unblocks_Header_Write(t *testing.T) {
- inHandler := make(chan bool, 1)
- unblockHandler := make(chan bool, 1)
- headerWritten := make(chan bool, 1)
- wroteRST := make(chan bool, 1)
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- inHandler <- true
- <-wroteRST
- w.Header().Set("foo", "bar")
- w.WriteHeader(200)
- w.(http.Flusher).Flush()
- headerWritten <- true
- <-unblockHandler
- })
- defer st.Close()
-
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // keep it open
- EndHeaders: true,
- })
- <-inHandler
- if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil {
- t.Fatal(err)
- }
- wroteRST <- true
- st.awaitIdle()
- select {
- case <-headerWritten:
- case <-time.After(2 * time.Second):
- t.Error("timeout waiting for header write")
- }
- unblockHandler <- true
-}
-
-func TestServer_DeadConn_Unblocks_Read(t *testing.T) {
- testServerPostUnblock(t,
- func(w http.ResponseWriter, r *http.Request) (err error) {
- _, err = r.Body.Read(make([]byte, 1))
- return
- },
- func(st *serverTester) { st.cc.Close() },
- func(err error) {
- if err == nil {
- t.Error("unexpected nil error from Request.Body.Read")
- }
- },
- )
-}
-
-var blockUntilClosed = func(w http.ResponseWriter, r *http.Request) error {
- <-w.(http.CloseNotifier).CloseNotify()
- return nil
-}
-
-func TestServer_CloseNotify_After_RSTStream(t *testing.T) {
- testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) {
- if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil {
- t.Fatal(err)
- }
- }, nil)
-}
-
-func TestServer_CloseNotify_After_ConnClose(t *testing.T) {
- testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { st.cc.Close() }, nil)
-}
-
-// that CloseNotify unblocks after a stream error due to the client's
-// problem that's unrelated to them explicitly canceling it (which is
-// TestServer_CloseNotify_After_RSTStream above)
-func TestServer_CloseNotify_After_StreamError(t *testing.T) {
- testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) {
- // data longer than declared Content-Length => stream error
- st.writeData(1, true, []byte("1234"))
- }, nil, "content-length", "3")
-}
-
-func TestServer_StateTransitions(t *testing.T) {
- var st *serverTester
- inHandler := make(chan bool)
- writeData := make(chan bool)
- leaveHandler := make(chan bool)
- st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- inHandler <- true
- if st.stream(1) == nil {
- t.Errorf("nil stream 1 in handler")
- }
- if got, want := st.streamState(1), stateOpen; got != want {
- t.Errorf("in handler, state is %v; want %v", got, want)
- }
- writeData <- true
- if n, err := r.Body.Read(make([]byte, 1)); n != 0 || err != io.EOF {
- t.Errorf("body read = %d, %v; want 0, EOF", n, err)
- }
- if got, want := st.streamState(1), stateHalfClosedRemote; got != want {
- t.Errorf("in handler, state is %v; want %v", got, want)
- }
-
- <-leaveHandler
- })
- st.greet()
- if st.stream(1) != nil {
- t.Fatal("stream 1 should be empty")
- }
- if got := st.streamState(1); got != stateIdle {
- t.Fatalf("stream 1 should be idle; got %v", got)
- }
-
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false, // keep it open
- EndHeaders: true,
- })
- <-inHandler
- <-writeData
- st.writeData(1, true, nil)
-
- leaveHandler <- true
- hf := st.wantHeaders()
- if !hf.StreamEnded() {
- t.Fatal("expected END_STREAM flag")
- }
-
- if got, want := st.streamState(1), stateClosed; got != want {
- t.Errorf("at end, state is %v; want %v", got, want)
- }
- if st.stream(1) != nil {
- t.Fatal("at end, stream 1 should be gone")
- }
-}
-
-// test HEADERS w/o EndHeaders + another HEADERS (should get rejected)
-func TestServer_Rejects_HeadersNoEnd_Then_Headers(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: false,
- })
- st.writeHeaders(HeadersFrameParam{ // Not a continuation.
- StreamID: 3, // different stream.
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- })
- })
-}
-
-// test HEADERS w/o EndHeaders + PING (should get rejected)
-func TestServer_Rejects_HeadersNoEnd_Then_Ping(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: false,
- })
- if err := st.fr.WritePing(false, [8]byte{}); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-// test HEADERS w/ EndHeaders + a continuation HEADERS (should get rejected)
-func TestServer_Rejects_HeadersEnd_Then_Continuation(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- })
- st.wantHeaders()
- if err := st.fr.WriteContinuation(1, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-// test HEADERS w/o EndHeaders + a continuation HEADERS on wrong stream ID
-func TestServer_Rejects_HeadersNoEnd_Then_ContinuationWrongStream(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: false,
- })
- if err := st.fr.WriteContinuation(3, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-// No HEADERS on stream 0.
-func TestServer_Rejects_Headers0(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.fr.AllowIllegalWrites = true
- st.writeHeaders(HeadersFrameParam{
- StreamID: 0,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- })
- })
-}
-
-// No CONTINUATION on stream 0.
-func TestServer_Rejects_Continuation0(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.fr.AllowIllegalWrites = true
- if err := st.fr.WriteContinuation(0, true, st.encodeHeader()); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-// No PRIORITY on stream 0.
-func TestServer_Rejects_Priority0(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- st.fr.AllowIllegalWrites = true
- st.writePriority(0, PriorityParam{StreamDep: 1})
- })
-}
-
-// No HEADERS frame with a self-dependence.
-func TestServer_Rejects_HeadersSelfDependence(t *testing.T) {
- testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) {
- st.fr.AllowIllegalWrites = true
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- Priority: PriorityParam{StreamDep: 1},
- })
- })
-}
-
-// No PRIORTY frame with a self-dependence.
-func TestServer_Rejects_PrioritySelfDependence(t *testing.T) {
- testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) {
- st.fr.AllowIllegalWrites = true
- st.writePriority(1, PriorityParam{StreamDep: 1})
- })
-}
-
-func TestServer_Rejects_PushPromise(t *testing.T) {
- testServerRejectsConn(t, func(st *serverTester) {
- pp := PushPromiseParam{
- StreamID: 1,
- PromiseID: 3,
- }
- if err := st.fr.WritePushPromise(pp); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-// testServerRejectsConn tests that the server hangs up with a GOAWAY
-// frame and a server close after the client does something
-// deserving a CONNECTION_ERROR.
-func testServerRejectsConn(t *testing.T, writeReq func(*serverTester)) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {})
- st.addLogFilter("connection error: PROTOCOL_ERROR")
- defer st.Close()
- st.greet()
- writeReq(st)
-
- st.wantGoAway()
- errc := make(chan error, 1)
- go func() {
- fr, err := st.fr.ReadFrame()
- if err == nil {
- err = fmt.Errorf("got frame of type %T", fr)
- }
- errc <- err
- }()
- select {
- case err := <-errc:
- if err != io.EOF {
- t.Errorf("ReadFrame = %v; want io.EOF", err)
- }
- case <-time.After(2 * time.Second):
- t.Error("timeout waiting for disconnect")
- }
-}
-
-// testServerRejectsStream tests that the server sends a RST_STREAM with the provided
-// error code after a client sends a bogus request.
-func testServerRejectsStream(t *testing.T, code ErrCode, writeReq func(*serverTester)) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {})
- defer st.Close()
- st.greet()
- writeReq(st)
- st.wantRSTStream(1, code)
-}
-
-// testServerRequest sets up an idle HTTP/2 connection and lets you
-// write a single request with writeReq, and then verify that the
-// *http.Request is built correctly in checkReq.
-func testServerRequest(t *testing.T, writeReq func(*serverTester), checkReq func(*http.Request)) {
- gotReq := make(chan bool, 1)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- if r.Body == nil {
- t.Fatal("nil Body")
- }
- checkReq(r)
- gotReq <- true
- })
- defer st.Close()
-
- st.greet()
- writeReq(st)
-
- select {
- case <-gotReq:
- case <-time.After(2 * time.Second):
- t.Error("timeout waiting for request")
- }
-}
-
-func getSlash(st *serverTester) { st.bodylessReq1() }
-
-func TestServer_Response_NoData(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- // Nothing.
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if !hf.StreamEnded() {
- t.Fatal("want END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- })
-}
-
-func TestServer_Response_NoData_Header_FooBar(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Set("Foo-Bar", "some-value")
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if !hf.StreamEnded() {
- t.Fatal("want END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"foo-bar", "some-value"},
- {"content-length", "0"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- })
-}
-
-func TestServer_Response_Data_Sniff_DoesntOverride(t *testing.T) {
- const msg = "<html>this is HTML."
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Set("Content-Type", "foo/bar")
- io.WriteString(w, msg)
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("don't want END_STREAM, expecting data")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "foo/bar"},
- {"content-length", strconv.Itoa(len(msg))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- df := st.wantData()
- if !df.StreamEnded() {
- t.Error("expected DATA to have END_STREAM flag")
- }
- if got := string(df.Data()); got != msg {
- t.Errorf("got DATA %q; want %q", got, msg)
- }
- })
-}
-
-func TestServer_Response_TransferEncoding_chunked(t *testing.T) {
- const msg = "hi"
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Set("Transfer-Encoding", "chunked") // should be stripped
- io.WriteString(w, msg)
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "text/plain; charset=utf-8"},
- {"content-length", strconv.Itoa(len(msg))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- })
-}
-
-// Header accessed only after the initial write.
-func TestServer_Response_Data_IgnoreHeaderAfterWrite_After(t *testing.T) {
- const msg = "<html>this is HTML."
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- io.WriteString(w, msg)
- w.Header().Set("foo", "should be ignored")
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "text/html; charset=utf-8"},
- {"content-length", strconv.Itoa(len(msg))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- })
-}
-
-// Header accessed before the initial write and later mutated.
-func TestServer_Response_Data_IgnoreHeaderAfterWrite_Overwrite(t *testing.T) {
- const msg = "<html>this is HTML."
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Set("foo", "proper value")
- io.WriteString(w, msg)
- w.Header().Set("foo", "should be ignored")
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"foo", "proper value"},
- {"content-type", "text/html; charset=utf-8"},
- {"content-length", strconv.Itoa(len(msg))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- })
-}
-
-func TestServer_Response_Data_SniffLenType(t *testing.T) {
- const msg = "<html>this is HTML."
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- io.WriteString(w, msg)
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("don't want END_STREAM, expecting data")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "text/html; charset=utf-8"},
- {"content-length", strconv.Itoa(len(msg))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- df := st.wantData()
- if !df.StreamEnded() {
- t.Error("expected DATA to have END_STREAM flag")
- }
- if got := string(df.Data()); got != msg {
- t.Errorf("got DATA %q; want %q", got, msg)
- }
- })
-}
-
-func TestServer_Response_Header_Flush_MidWrite(t *testing.T) {
- const msg = "<html>this is HTML"
- const msg2 = ", and this is the next chunk"
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- io.WriteString(w, msg)
- w.(http.Flusher).Flush()
- io.WriteString(w, msg2)
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "text/html; charset=utf-8"}, // sniffed
- // and no content-length
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- {
- df := st.wantData()
- if df.StreamEnded() {
- t.Error("unexpected END_STREAM flag")
- }
- if got := string(df.Data()); got != msg {
- t.Errorf("got DATA %q; want %q", got, msg)
- }
- }
- {
- df := st.wantData()
- if !df.StreamEnded() {
- t.Error("wanted END_STREAM flag on last data chunk")
- }
- if got := string(df.Data()); got != msg2 {
- t.Errorf("got DATA %q; want %q", got, msg2)
- }
- }
- })
-}
-
-func TestServer_Response_LargeWrite(t *testing.T) {
- const size = 1 << 20
- const maxFrameSize = 16 << 10
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- n, err := w.Write(bytes.Repeat([]byte("a"), size))
- if err != nil {
- return fmt.Errorf("Write error: %v", err)
- }
- if n != size {
- return fmt.Errorf("wrong size %d from Write", n)
- }
- return nil
- }, func(st *serverTester) {
- if err := st.fr.WriteSettings(
- Setting{SettingInitialWindowSize, 0},
- Setting{SettingMaxFrameSize, maxFrameSize},
- ); err != nil {
- t.Fatal(err)
- }
- st.wantSettingsAck()
-
- getSlash(st) // make the single request
-
- // Give the handler quota to write:
- if err := st.fr.WriteWindowUpdate(1, size); err != nil {
- t.Fatal(err)
- }
- // Give the handler quota to write to connection-level
- // window as well
- if err := st.fr.WriteWindowUpdate(0, size); err != nil {
- t.Fatal(err)
- }
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"content-type", "text/plain; charset=utf-8"}, // sniffed
- // and no content-length
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
- var bytes, frames int
- for {
- df := st.wantData()
- bytes += len(df.Data())
- frames++
- for _, b := range df.Data() {
- if b != 'a' {
- t.Fatal("non-'a' byte seen in DATA")
- }
- }
- if df.StreamEnded() {
- break
- }
- }
- if bytes != size {
- t.Errorf("Got %d bytes; want %d", bytes, size)
- }
- if want := int(size / maxFrameSize); frames < want || frames > want*2 {
- t.Errorf("Got %d frames; want %d", frames, size)
- }
- })
-}
-
-// Test that the handler can't write more than the client allows
-func TestServer_Response_LargeWrite_FlowControlled(t *testing.T) {
- // Make these reads. Before each read, the client adds exactly enough
- // flow-control to satisfy the read. Numbers chosen arbitrarily.
- reads := []int{123, 1, 13, 127}
- size := 0
- for _, n := range reads {
- size += n
- }
-
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.(http.Flusher).Flush()
- n, err := w.Write(bytes.Repeat([]byte("a"), size))
- if err != nil {
- return fmt.Errorf("Write error: %v", err)
- }
- if n != size {
- return fmt.Errorf("wrong size %d from Write", n)
- }
- return nil
- }, func(st *serverTester) {
- // Set the window size to something explicit for this test.
- // It's also how much initial data we expect.
- if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, uint32(reads[0])}); err != nil {
- t.Fatal(err)
- }
- st.wantSettingsAck()
-
- getSlash(st) // make the single request
-
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
-
- df := st.wantData()
- if got := len(df.Data()); got != reads[0] {
- t.Fatalf("Initial window size = %d but got DATA with %d bytes", reads[0], got)
- }
-
- for _, quota := range reads[1:] {
- if err := st.fr.WriteWindowUpdate(1, uint32(quota)); err != nil {
- t.Fatal(err)
- }
- df := st.wantData()
- if int(quota) != len(df.Data()) {
- t.Fatalf("read %d bytes after giving %d quota", len(df.Data()), quota)
- }
- }
- })
-}
-
-// Test that the handler blocked in a Write is unblocked if the server sends a RST_STREAM.
-func TestServer_Response_RST_Unblocks_LargeWrite(t *testing.T) {
- const size = 1 << 20
- const maxFrameSize = 16 << 10
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.(http.Flusher).Flush()
- errc := make(chan error, 1)
- go func() {
- _, err := w.Write(bytes.Repeat([]byte("a"), size))
- errc <- err
- }()
- select {
- case err := <-errc:
- if err == nil {
- return errors.New("unexpected nil error from Write in handler")
- }
- return nil
- case <-time.After(2 * time.Second):
- return errors.New("timeout waiting for Write in handler")
- }
- }, func(st *serverTester) {
- if err := st.fr.WriteSettings(
- Setting{SettingInitialWindowSize, 0},
- Setting{SettingMaxFrameSize, maxFrameSize},
- ); err != nil {
- t.Fatal(err)
- }
- st.wantSettingsAck()
-
- getSlash(st) // make the single request
-
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
-
- if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil {
- t.Fatal(err)
- }
- })
-}
-
-func TestServer_Response_Empty_Data_Not_FlowControlled(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.(http.Flusher).Flush()
- // Nothing; send empty DATA
- return nil
- }, func(st *serverTester) {
- // Handler gets no data quota:
- if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, 0}); err != nil {
- t.Fatal(err)
- }
- st.wantSettingsAck()
-
- getSlash(st) // make the single request
-
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
-
- df := st.wantData()
- if got := len(df.Data()); got != 0 {
- t.Fatalf("unexpected %d DATA bytes; want 0", got)
- }
- if !df.StreamEnded() {
- t.Fatal("DATA didn't have END_STREAM")
- }
- })
-}
-
-func TestServer_Response_Automatic100Continue(t *testing.T) {
- const msg = "foo"
- const reply = "bar"
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- if v := r.Header.Get("Expect"); v != "" {
- t.Errorf("Expect header = %q; want empty", v)
- }
- buf := make([]byte, len(msg))
- // This read should trigger the 100-continue being sent.
- if n, err := io.ReadFull(r.Body, buf); err != nil || n != len(msg) || string(buf) != msg {
- return fmt.Errorf("ReadFull = %q, %v; want %q, nil", buf[:n], err, msg)
- }
- _, err := io.WriteString(w, reply)
- return err
- }, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "POST", "expect", "100-continue"),
- EndStream: false,
- EndHeaders: true,
- })
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "100"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Fatalf("Got headers %v; want %v", goth, wanth)
- }
-
- // Okay, they sent status 100, so we can send our
- // gigantic and/or sensitive "foo" payload now.
- st.writeData(1, true, []byte(msg))
-
- st.wantWindowUpdate(0, uint32(len(msg)))
-
- hf = st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("expected data to follow")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- goth = st.decodeHeader(hf.HeaderBlockFragment())
- wanth = [][2]string{
- {":status", "200"},
- {"content-type", "text/plain; charset=utf-8"},
- {"content-length", strconv.Itoa(len(reply))},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
-
- df := st.wantData()
- if string(df.Data()) != reply {
- t.Errorf("Client read %q; want %q", df.Data(), reply)
- }
- if !df.StreamEnded() {
- t.Errorf("expect data stream end")
- }
- })
-}
-
-func TestServer_HandlerWriteErrorOnDisconnect(t *testing.T) {
- errc := make(chan error, 1)
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- p := []byte("some data.\n")
- for {
- _, err := w.Write(p)
- if err != nil {
- errc <- err
- return nil
- }
- }
- }, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: false,
- EndHeaders: true,
- })
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("unexpected END_STREAM flag")
- }
- if !hf.HeadersEnded() {
- t.Fatal("want END_HEADERS flag")
- }
- // Close the connection and wait for the handler to (hopefully) notice.
- st.cc.Close()
- select {
- case <-errc:
- case <-time.After(5 * time.Second):
- t.Error("timeout")
- }
- })
-}
-
-func TestServer_Rejects_Too_Many_Streams(t *testing.T) {
- const testPath = "/some/path"
-
- inHandler := make(chan uint32)
- leaveHandler := make(chan bool)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- id := w.(*responseWriter).rws.stream.id
- inHandler <- id
- if id == 1+(defaultMaxStreams+1)*2 && r.URL.Path != testPath {
- t.Errorf("decoded final path as %q; want %q", r.URL.Path, testPath)
- }
- <-leaveHandler
- })
- defer st.Close()
- st.greet()
- nextStreamID := uint32(1)
- streamID := func() uint32 {
- defer func() { nextStreamID += 2 }()
- return nextStreamID
- }
- sendReq := func(id uint32, headers ...string) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: id,
- BlockFragment: st.encodeHeader(headers...),
- EndStream: true,
- EndHeaders: true,
- })
- }
- for i := 0; i < defaultMaxStreams; i++ {
- sendReq(streamID())
- <-inHandler
- }
- defer func() {
- for i := 0; i < defaultMaxStreams; i++ {
- leaveHandler <- true
- }
- }()
-
- // And this one should cross the limit:
- // (It's also sent as a CONTINUATION, to verify we still track the decoder context,
- // even if we're rejecting it)
- rejectID := streamID()
- headerBlock := st.encodeHeader(":path", testPath)
- frag1, frag2 := headerBlock[:3], headerBlock[3:]
- st.writeHeaders(HeadersFrameParam{
- StreamID: rejectID,
- BlockFragment: frag1,
- EndStream: true,
- EndHeaders: false, // CONTINUATION coming
- })
- if err := st.fr.WriteContinuation(rejectID, true, frag2); err != nil {
- t.Fatal(err)
- }
- st.wantRSTStream(rejectID, ErrCodeProtocol)
-
- // But let a handler finish:
- leaveHandler <- true
- st.wantHeaders()
-
- // And now another stream should be able to start:
- goodID := streamID()
- sendReq(goodID, ":path", testPath)
- select {
- case got := <-inHandler:
- if got != goodID {
- t.Errorf("Got stream %d; want %d", got, goodID)
- }
- case <-time.After(3 * time.Second):
- t.Error("timeout waiting for handler")
- }
-}
-
-// So many response headers that the server needs to use CONTINUATION frames:
-func TestServer_Response_ManyHeaders_With_Continuation(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- h := w.Header()
- for i := 0; i < 5000; i++ {
- h.Set(fmt.Sprintf("x-header-%d", i), fmt.Sprintf("x-value-%d", i))
- }
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.HeadersEnded() {
- t.Fatal("got unwanted END_HEADERS flag")
- }
- n := 0
- for {
- n++
- cf := st.wantContinuation()
- if cf.HeadersEnded() {
- break
- }
- }
- if n < 5 {
- t.Errorf("Only got %d CONTINUATION frames; expected 5+ (currently 6)", n)
- }
- })
-}
-
-// This previously crashed (reported by Mathieu Lonjaret as observed
-// while using Camlistore) because we got a DATA frame from the client
-// after the handler exited and our logic at the time was wrong,
-// keeping a stream in the map in stateClosed, which tickled an
-// invariant check later when we tried to remove that stream (via
-// defer sc.closeAllStreamsOnConnClose) when the serverConn serve loop
-// ended.
-func TestServer_NoCrash_HandlerClose_Then_ClientClose(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- // nothing
- return nil
- }, func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: false, // DATA is coming
- EndHeaders: true,
- })
- hf := st.wantHeaders()
- if !hf.HeadersEnded() || !hf.StreamEnded() {
- t.Fatalf("want END_HEADERS+END_STREAM, got %v", hf)
- }
-
- // Sent when the a Handler closes while a client has
- // indicated it's still sending DATA:
- st.wantRSTStream(1, ErrCodeNo)
-
- // Now the handler has ended, so it's ended its
- // stream, but the client hasn't closed its side
- // (stateClosedLocal). So send more data and verify
- // it doesn't crash with an internal invariant panic, like
- // it did before.
- st.writeData(1, true, []byte("foo"))
-
- // Get our flow control bytes back, since the handler didn't get them.
- st.wantWindowUpdate(0, uint32(len("foo")))
-
- // Sent after a peer sends data anyway (admittedly the
- // previous RST_STREAM might've still been in-flight),
- // but they'll get the more friendly 'cancel' code
- // first.
- st.wantRSTStream(1, ErrCodeStreamClosed)
-
- // Set up a bunch of machinery to record the panic we saw
- // previously.
- var (
- panMu sync.Mutex
- panicVal interface{}
- )
-
- testHookOnPanicMu.Lock()
- testHookOnPanic = func(sc *serverConn, pv interface{}) bool {
- panMu.Lock()
- panicVal = pv
- panMu.Unlock()
- return true
- }
- testHookOnPanicMu.Unlock()
-
- // Now force the serve loop to end, via closing the connection.
- st.cc.Close()
- select {
- case <-st.sc.doneServing:
- // Loop has exited.
- panMu.Lock()
- got := panicVal
- panMu.Unlock()
- if got != nil {
- t.Errorf("Got panic: %v", got)
- }
- case <-time.After(5 * time.Second):
- t.Error("timeout")
- }
- })
-}
-
-func TestServer_Rejects_TLS10(t *testing.T) { testRejectTLS(t, tls.VersionTLS10) }
-func TestServer_Rejects_TLS11(t *testing.T) { testRejectTLS(t, tls.VersionTLS11) }
-
-func testRejectTLS(t *testing.T, max uint16) {
- st := newServerTester(t, nil, func(c *tls.Config) {
- c.MaxVersion = max
- })
- defer st.Close()
- gf := st.wantGoAway()
- if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want {
- t.Errorf("Got error code %v; want %v", got, want)
- }
-}
-
-func TestServer_Rejects_TLSBadCipher(t *testing.T) {
- st := newServerTester(t, nil, func(c *tls.Config) {
- // Only list bad ones:
- c.CipherSuites = []uint16{
- tls.TLS_RSA_WITH_RC4_128_SHA,
- tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- tls.TLS_RSA_WITH_AES_128_CBC_SHA,
- tls.TLS_RSA_WITH_AES_256_CBC_SHA,
- tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
- tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
- tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
- tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA,
- tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
- tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
- tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
- cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
- }
- })
- defer st.Close()
- gf := st.wantGoAway()
- if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want {
- t.Errorf("Got error code %v; want %v", got, want)
- }
-}
-
-func TestServer_Advertises_Common_Cipher(t *testing.T) {
- const requiredSuite = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- st := newServerTester(t, nil, func(c *tls.Config) {
- // Have the client only support the one required by the spec.
- c.CipherSuites = []uint16{requiredSuite}
- }, func(ts *httptest.Server) {
- var srv *http.Server = ts.Config
- // Have the server configured with no specific cipher suites.
- // This tests that Go's defaults include the required one.
- srv.TLSConfig = nil
- })
- defer st.Close()
- st.greet()
-}
-
-func (st *serverTester) onHeaderField(f hpack.HeaderField) {
- if f.Name == "date" {
- return
- }
- st.decodedHeaders = append(st.decodedHeaders, [2]string{f.Name, f.Value})
-}
-
-func (st *serverTester) decodeHeader(headerBlock []byte) (pairs [][2]string) {
- st.decodedHeaders = nil
- if _, err := st.hpackDec.Write(headerBlock); err != nil {
- st.t.Fatalf("hpack decoding error: %v", err)
- }
- if err := st.hpackDec.Close(); err != nil {
- st.t.Fatalf("hpack decoding error: %v", err)
- }
- return st.decodedHeaders
-}
-
-// testServerResponse sets up an idle HTTP/2 connection. The client function should
-// write a single request that must be handled by the handler. This waits up to 5s
-// for client to return, then up to an additional 2s for the handler to return.
-func testServerResponse(t testing.TB,
- handler func(http.ResponseWriter, *http.Request) error,
- client func(*serverTester),
-) {
- errc := make(chan error, 1)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- if r.Body == nil {
- t.Fatal("nil Body")
- }
- errc <- handler(w, r)
- })
- defer st.Close()
-
- donec := make(chan bool)
- go func() {
- defer close(donec)
- st.greet()
- client(st)
- }()
-
- select {
- case <-donec:
- case <-time.After(5 * time.Second):
- t.Fatal("timeout in client")
- }
-
- select {
- case err := <-errc:
- if err != nil {
- t.Fatalf("Error in handler: %v", err)
- }
- case <-time.After(2 * time.Second):
- t.Fatal("timeout in handler")
- }
-}
-
-// readBodyHandler returns an http Handler func that reads len(want)
-// bytes from r.Body and fails t if the contents read were not
-// the value of want.
-func readBodyHandler(t *testing.T, want string) func(w http.ResponseWriter, r *http.Request) {
- return func(w http.ResponseWriter, r *http.Request) {
- buf := make([]byte, len(want))
- _, err := io.ReadFull(r.Body, buf)
- if err != nil {
- t.Error(err)
- return
- }
- if string(buf) != want {
- t.Errorf("read %q; want %q", buf, want)
- }
- }
-}
-
-// TestServerWithCurl currently fails, hence the LenientCipherSuites test. See:
-// https://github.com/tatsuhiro-t/nghttp2/issues/140 &
-// http://sourceforge.net/p/curl/bugs/1472/
-func TestServerWithCurl(t *testing.T) { testServerWithCurl(t, false) }
-func TestServerWithCurl_LenientCipherSuites(t *testing.T) { testServerWithCurl(t, true) }
-
-func testServerWithCurl(t *testing.T, permitProhibitedCipherSuites bool) {
- if runtime.GOOS != "linux" {
- t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway")
- }
- if testing.Short() {
- t.Skip("skipping curl test in short mode")
- }
- requireCurl(t)
- var gotConn int32
- testHookOnConn = func() { atomic.StoreInt32(&gotConn, 1) }
-
- const msg = "Hello from curl!\n"
- ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Foo", "Bar")
- w.Header().Set("Client-Proto", r.Proto)
- io.WriteString(w, msg)
- }))
- ConfigureServer(ts.Config, &Server{
- PermitProhibitedCipherSuites: permitProhibitedCipherSuites,
- })
- ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config
- ts.StartTLS()
- defer ts.Close()
-
- t.Logf("Running test server for curl to hit at: %s", ts.URL)
- container := curl(t, "--silent", "--http2", "--insecure", "-v", ts.URL)
- defer kill(container)
- resc := make(chan interface{}, 1)
- go func() {
- res, err := dockerLogs(container)
- if err != nil {
- resc <- err
- } else {
- resc <- res
- }
- }()
- select {
- case res := <-resc:
- if err, ok := res.(error); ok {
- t.Fatal(err)
- }
- body := string(res.([]byte))
- // Search for both "key: value" and "key:value", since curl changed their format
- // Our Dockerfile contains the latest version (no space), but just in case people
- // didn't rebuild, check both.
- if !strings.Contains(body, "foo: Bar") && !strings.Contains(body, "foo:Bar") {
- t.Errorf("didn't see foo: Bar header")
- t.Logf("Got: %s", body)
- }
- if !strings.Contains(body, "client-proto: HTTP/2") && !strings.Contains(body, "client-proto:HTTP/2") {
- t.Errorf("didn't see client-proto: HTTP/2 header")
- t.Logf("Got: %s", res)
- }
- if !strings.Contains(string(res.([]byte)), msg) {
- t.Errorf("didn't see %q content", msg)
- t.Logf("Got: %s", res)
- }
- case <-time.After(3 * time.Second):
- t.Errorf("timeout waiting for curl")
- }
-
- if atomic.LoadInt32(&gotConn) == 0 {
- t.Error("never saw an http2 connection")
- }
-}
-
-var doh2load = flag.Bool("h2load", false, "Run h2load test")
-
-func TestServerWithH2Load(t *testing.T) {
- if !*doh2load {
- t.Skip("Skipping without --h2load flag.")
- }
- if runtime.GOOS != "linux" {
- t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway")
- }
- requireH2load(t)
-
- msg := strings.Repeat("Hello, h2load!\n", 5000)
- ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, msg)
- w.(http.Flusher).Flush()
- io.WriteString(w, msg)
- }))
- ts.StartTLS()
- defer ts.Close()
-
- cmd := exec.Command("docker", "run", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl",
- "-n100000", "-c100", "-m100", ts.URL)
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- if err := cmd.Run(); err != nil {
- t.Fatal(err)
- }
-}
-
-// Issue 12843
-func TestServerDoS_MaxHeaderListSize(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {})
- defer st.Close()
-
- // shake hands
- frameSize := defaultMaxReadFrameSize
- var advHeaderListSize *uint32
- st.greetAndCheckSettings(func(s Setting) error {
- switch s.ID {
- case SettingMaxFrameSize:
- if s.Val < minMaxFrameSize {
- frameSize = minMaxFrameSize
- } else if s.Val > maxFrameSize {
- frameSize = maxFrameSize
- } else {
- frameSize = int(s.Val)
- }
- case SettingMaxHeaderListSize:
- advHeaderListSize = &s.Val
- }
- return nil
- })
-
- if advHeaderListSize == nil {
- t.Errorf("server didn't advertise a max header list size")
- } else if *advHeaderListSize == 0 {
- t.Errorf("server advertised a max header list size of 0")
- }
-
- st.encodeHeaderField(":method", "GET")
- st.encodeHeaderField(":path", "/")
- st.encodeHeaderField(":scheme", "https")
- cookie := strings.Repeat("*", 4058)
- st.encodeHeaderField("cookie", cookie)
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.headerBuf.Bytes(),
- EndStream: true,
- EndHeaders: false,
- })
-
- // Capture the short encoding of a duplicate ~4K cookie, now
- // that we've already sent it once.
- st.headerBuf.Reset()
- st.encodeHeaderField("cookie", cookie)
-
- // Now send 1MB of it.
- const size = 1 << 20
- b := bytes.Repeat(st.headerBuf.Bytes(), size/st.headerBuf.Len())
- for len(b) > 0 {
- chunk := b
- if len(chunk) > frameSize {
- chunk = chunk[:frameSize]
- }
- b = b[len(chunk):]
- st.fr.WriteContinuation(1, len(b) == 0, chunk)
- }
-
- h := st.wantHeaders()
- if !h.HeadersEnded() {
- t.Fatalf("Got HEADERS without END_HEADERS set: %v", h)
- }
- headers := st.decodeHeader(h.HeaderBlockFragment())
- want := [][2]string{
- {":status", "431"},
- {"content-type", "text/html; charset=utf-8"},
- {"content-length", "63"},
- }
- if !reflect.DeepEqual(headers, want) {
- t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
- }
-}
-
-func TestCompressionErrorOnWrite(t *testing.T) {
- const maxStrLen = 8 << 10
- var serverConfig *http.Server
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // No response body.
- }, func(ts *httptest.Server) {
- serverConfig = ts.Config
- serverConfig.MaxHeaderBytes = maxStrLen
- })
- st.addLogFilter("connection error: COMPRESSION_ERROR")
- defer st.Close()
- st.greet()
-
- maxAllowed := st.sc.framer.maxHeaderStringLen()
-
- // Crank this up, now that we have a conn connected with the
- // hpack.Decoder's max string length set has been initialized
- // from the earlier low ~8K value. We want this higher so don't
- // hit the max header list size. We only want to test hitting
- // the max string size.
- serverConfig.MaxHeaderBytes = 1 << 20
-
- // First a request with a header that's exactly the max allowed size
- // for the hpack compression. It's still too long for the header list
- // size, so we'll get the 431 error, but that keeps the compression
- // context still valid.
- hbf := st.encodeHeader("foo", strings.Repeat("a", maxAllowed))
-
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: hbf,
- EndStream: true,
- EndHeaders: true,
- })
- h := st.wantHeaders()
- if !h.HeadersEnded() {
- t.Fatalf("Got HEADERS without END_HEADERS set: %v", h)
- }
- headers := st.decodeHeader(h.HeaderBlockFragment())
- want := [][2]string{
- {":status", "431"},
- {"content-type", "text/html; charset=utf-8"},
- {"content-length", "63"},
- }
- if !reflect.DeepEqual(headers, want) {
- t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
- }
- df := st.wantData()
- if !strings.Contains(string(df.Data()), "HTTP Error 431") {
- t.Errorf("Unexpected data body: %q", df.Data())
- }
- if !df.StreamEnded() {
- t.Fatalf("expect data stream end")
- }
-
- // And now send one that's just one byte too big.
- hbf = st.encodeHeader("bar", strings.Repeat("b", maxAllowed+1))
- st.writeHeaders(HeadersFrameParam{
- StreamID: 3,
- BlockFragment: hbf,
- EndStream: true,
- EndHeaders: true,
- })
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeCompression {
- t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode)
- }
-}
-
-func TestCompressionErrorOnClose(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // No response body.
- })
- st.addLogFilter("connection error: COMPRESSION_ERROR")
- defer st.Close()
- st.greet()
-
- hbf := st.encodeHeader("foo", "bar")
- hbf = hbf[:len(hbf)-1] // truncate one byte from the end, so hpack.Decoder.Close fails.
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: hbf,
- EndStream: true,
- EndHeaders: true,
- })
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeCompression {
- t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode)
- }
-}
-
-// test that a server handler can read trailers from a client
-func TestServerReadsTrailers(t *testing.T) {
- const testBody = "some test body"
- writeReq := func(st *serverTester) {
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader("trailer", "Foo, Bar", "trailer", "Baz"),
- EndStream: false,
- EndHeaders: true,
- })
- st.writeData(1, false, []byte(testBody))
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeaderRaw(
- "foo", "foov",
- "bar", "barv",
- "baz", "bazv",
- "surprise", "wasn't declared; shouldn't show up",
- ),
- EndStream: true,
- EndHeaders: true,
- })
- }
- checkReq := func(r *http.Request) {
- wantTrailer := http.Header{
- "Foo": nil,
- "Bar": nil,
- "Baz": nil,
- }
- if !reflect.DeepEqual(r.Trailer, wantTrailer) {
- t.Errorf("initial Trailer = %v; want %v", r.Trailer, wantTrailer)
- }
- slurp, err := ioutil.ReadAll(r.Body)
- if string(slurp) != testBody {
- t.Errorf("read body %q; want %q", slurp, testBody)
- }
- if err != nil {
- t.Fatalf("Body slurp: %v", err)
- }
- wantTrailerAfter := http.Header{
- "Foo": {"foov"},
- "Bar": {"barv"},
- "Baz": {"bazv"},
- }
- if !reflect.DeepEqual(r.Trailer, wantTrailerAfter) {
- t.Errorf("final Trailer = %v; want %v", r.Trailer, wantTrailerAfter)
- }
- }
- testServerRequest(t, writeReq, checkReq)
-}
-
-// test that a server handler can send trailers
-func TestServerWritesTrailers_WithFlush(t *testing.T) { testServerWritesTrailers(t, true) }
-func TestServerWritesTrailers_WithoutFlush(t *testing.T) { testServerWritesTrailers(t, false) }
-
-func testServerWritesTrailers(t *testing.T, withFlush bool) {
- // See https://httpwg.github.io/specs/rfc7540.html#rfc.section.8.1.3
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Set("Trailer", "Server-Trailer-A, Server-Trailer-B")
- w.Header().Add("Trailer", "Server-Trailer-C")
- w.Header().Add("Trailer", "Transfer-Encoding, Content-Length, Trailer") // filtered
-
- // Regular headers:
- w.Header().Set("Foo", "Bar")
- w.Header().Set("Content-Length", "5") // len("Hello")
-
- io.WriteString(w, "Hello")
- if withFlush {
- w.(http.Flusher).Flush()
- }
- w.Header().Set("Server-Trailer-A", "valuea")
- w.Header().Set("Server-Trailer-C", "valuec") // skipping B
- // After a flush, random keys like Server-Surprise shouldn't show up:
- w.Header().Set("Server-Surpise", "surprise! this isn't predeclared!")
- // But we do permit promoting keys to trailers after a
- // flush if they start with the magic
- // otherwise-invalid "Trailer:" prefix:
- w.Header().Set("Trailer:Post-Header-Trailer", "hi1")
- w.Header().Set("Trailer:post-header-trailer2", "hi2")
- w.Header().Set("Trailer:Range", "invalid")
- w.Header().Set("Trailer:Foo\x01Bogus", "invalid")
- w.Header().Set("Transfer-Encoding", "should not be included; Forbidden by RFC 2616 14.40")
- w.Header().Set("Content-Length", "should not be included; Forbidden by RFC 2616 14.40")
- w.Header().Set("Trailer", "should not be included; Forbidden by RFC 2616 14.40")
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if hf.StreamEnded() {
- t.Fatal("response HEADERS had END_STREAM")
- }
- if !hf.HeadersEnded() {
- t.Fatal("response HEADERS didn't have END_HEADERS")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"foo", "Bar"},
- {"trailer", "Server-Trailer-A, Server-Trailer-B"},
- {"trailer", "Server-Trailer-C"},
- {"trailer", "Transfer-Encoding, Content-Length, Trailer"},
- {"content-type", "text/plain; charset=utf-8"},
- {"content-length", "5"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth)
- }
- df := st.wantData()
- if string(df.Data()) != "Hello" {
- t.Fatalf("Client read %q; want Hello", df.Data())
- }
- if df.StreamEnded() {
- t.Fatalf("data frame had STREAM_ENDED")
- }
- tf := st.wantHeaders() // for the trailers
- if !tf.StreamEnded() {
- t.Fatalf("trailers HEADERS lacked END_STREAM")
- }
- if !tf.HeadersEnded() {
- t.Fatalf("trailers HEADERS lacked END_HEADERS")
- }
- wanth = [][2]string{
- {"post-header-trailer", "hi1"},
- {"post-header-trailer2", "hi2"},
- {"server-trailer-a", "valuea"},
- {"server-trailer-c", "valuec"},
- }
- goth = st.decodeHeader(tf.HeaderBlockFragment())
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth)
- }
- })
-}
-
-// validate transmitted header field names & values
-// golang.org/issue/14048
-func TestServerDoesntWriteInvalidHeaders(t *testing.T) {
- testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
- w.Header().Add("OK1", "x")
- w.Header().Add("Bad:Colon", "x") // colon (non-token byte) in key
- w.Header().Add("Bad1\x00", "x") // null in key
- w.Header().Add("Bad2", "x\x00y") // null in value
- return nil
- }, func(st *serverTester) {
- getSlash(st)
- hf := st.wantHeaders()
- if !hf.StreamEnded() {
- t.Error("response HEADERS lacked END_STREAM")
- }
- if !hf.HeadersEnded() {
- t.Fatal("response HEADERS didn't have END_HEADERS")
- }
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"ok1", "x"},
- {"content-length", "0"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth)
- }
- })
-}
-
-func BenchmarkServerGets(b *testing.B) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
-
- const msg = "Hello, world"
- st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, msg)
- })
- defer st.Close()
- st.greet()
-
- // Give the server quota to reply. (plus it has the the 64KB)
- if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil {
- b.Fatal(err)
- }
-
- for i := 0; i < b.N; i++ {
- id := 1 + uint32(i)*2
- st.writeHeaders(HeadersFrameParam{
- StreamID: id,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- })
- st.wantHeaders()
- df := st.wantData()
- if !df.StreamEnded() {
- b.Fatalf("DATA didn't have END_STREAM; got %v", df)
- }
- }
-}
-
-func BenchmarkServerPosts(b *testing.B) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
-
- const msg = "Hello, world"
- st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) {
- // Consume the (empty) body from th peer before replying, otherwise
- // the server will sometimes (depending on scheduling) send the peer a
- // a RST_STREAM with the CANCEL error code.
- if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil {
- b.Errorf("Copy error; got %v, %v; want 0, nil", n, err)
- }
- io.WriteString(w, msg)
- })
- defer st.Close()
- st.greet()
-
- // Give the server quota to reply. (plus it has the the 64KB)
- if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil {
- b.Fatal(err)
- }
-
- for i := 0; i < b.N; i++ {
- id := 1 + uint32(i)*2
- st.writeHeaders(HeadersFrameParam{
- StreamID: id,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false,
- EndHeaders: true,
- })
- st.writeData(id, true, nil)
- st.wantHeaders()
- df := st.wantData()
- if !df.StreamEnded() {
- b.Fatalf("DATA didn't have END_STREAM; got %v", df)
- }
- }
-}
-
-// Send a stream of messages from server to client in separate data frames.
-// Brings up performance issues seen in long streams.
-// Created to show problem in go issue #18502
-func BenchmarkServerToClientStreamDefaultOptions(b *testing.B) {
- benchmarkServerToClientStream(b)
-}
-
-// Justification for Change-Id: Iad93420ef6c3918f54249d867098f1dadfa324d8
-// Expect to see memory/alloc reduction by opting in to Frame reuse with the Framer.
-func BenchmarkServerToClientStreamReuseFrames(b *testing.B) {
- benchmarkServerToClientStream(b, optFramerReuseFrames)
-}
-
-func benchmarkServerToClientStream(b *testing.B, newServerOpts ...interface{}) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
- const msgLen = 1
- // default window size
- const windowSize = 1<<16 - 1
-
- // next message to send from the server and for the client to expect
- nextMsg := func(i int) []byte {
- msg := make([]byte, msgLen)
- msg[0] = byte(i)
- if len(msg) != msgLen {
- panic("invalid test setup msg length")
- }
- return msg
- }
-
- st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) {
- // Consume the (empty) body from th peer before replying, otherwise
- // the server will sometimes (depending on scheduling) send the peer a
- // a RST_STREAM with the CANCEL error code.
- if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil {
- b.Errorf("Copy error; got %v, %v; want 0, nil", n, err)
- }
- for i := 0; i < b.N; i += 1 {
- w.Write(nextMsg(i))
- w.(http.Flusher).Flush()
- }
- }, newServerOpts...)
- defer st.Close()
- st.greet()
-
- const id = uint32(1)
-
- st.writeHeaders(HeadersFrameParam{
- StreamID: id,
- BlockFragment: st.encodeHeader(":method", "POST"),
- EndStream: false,
- EndHeaders: true,
- })
-
- st.writeData(id, true, nil)
- st.wantHeaders()
-
- var pendingWindowUpdate = uint32(0)
-
- for i := 0; i < b.N; i += 1 {
- expected := nextMsg(i)
- df := st.wantData()
- if bytes.Compare(expected, df.data) != 0 {
- b.Fatalf("Bad message received; want %v; got %v", expected, df.data)
- }
- // try to send infrequent but large window updates so they don't overwhelm the test
- pendingWindowUpdate += uint32(len(df.data))
- if pendingWindowUpdate >= windowSize/2 {
- if err := st.fr.WriteWindowUpdate(0, pendingWindowUpdate); err != nil {
- b.Fatal(err)
- }
- if err := st.fr.WriteWindowUpdate(id, pendingWindowUpdate); err != nil {
- b.Fatal(err)
- }
- pendingWindowUpdate = 0
- }
- }
- df := st.wantData()
- if !df.StreamEnded() {
- b.Fatalf("DATA didn't have END_STREAM; got %v", df)
- }
-}
-
-// go-fuzz bug, originally reported at https://github.com/bradfitz/http2/issues/53
-// Verify we don't hang.
-func TestIssue53(t *testing.T) {
- const data = "PRI * HTTP/2.0\r\n\r\nSM" +
- "\r\n\r\n\x00\x00\x00\x01\ainfinfin\ad"
- s := &http.Server{
- ErrorLog: log.New(io.MultiWriter(stderrv(), twriter{t: t}), "", log.LstdFlags),
- Handler: http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- w.Write([]byte("hello"))
- }),
- }
- s2 := &Server{
- MaxReadFrameSize: 1 << 16,
- PermitProhibitedCipherSuites: true,
- }
- c := &issue53Conn{[]byte(data), false, false}
- s2.ServeConn(c, &ServeConnOpts{BaseConfig: s})
- if !c.closed {
- t.Fatal("connection is not closed")
- }
-}
-
-type issue53Conn struct {
- data []byte
- closed bool
- written bool
-}
-
-func (c *issue53Conn) Read(b []byte) (n int, err error) {
- if len(c.data) == 0 {
- return 0, io.EOF
- }
- n = copy(b, c.data)
- c.data = c.data[n:]
- return
-}
-
-func (c *issue53Conn) Write(b []byte) (n int, err error) {
- c.written = true
- return len(b), nil
-}
-
-func (c *issue53Conn) Close() error {
- c.closed = true
- return nil
-}
-
-func (c *issue53Conn) LocalAddr() net.Addr {
- return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706}
-}
-func (c *issue53Conn) RemoteAddr() net.Addr {
- return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706}
-}
-func (c *issue53Conn) SetDeadline(t time.Time) error { return nil }
-func (c *issue53Conn) SetReadDeadline(t time.Time) error { return nil }
-func (c *issue53Conn) SetWriteDeadline(t time.Time) error { return nil }
-
-// golang.org/issue/12895
-func TestConfigureServer(t *testing.T) {
- tests := []struct {
- name string
- tlsConfig *tls.Config
- wantErr string
- }{
- {
- name: "empty server",
- },
- {
- name: "just the required cipher suite",
- tlsConfig: &tls.Config{
- CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
- },
- },
- {
- name: "just the alternative required cipher suite",
- tlsConfig: &tls.Config{
- CipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
- },
- },
- {
- name: "missing required cipher suite",
- tlsConfig: &tls.Config{
- CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384},
- },
- wantErr: "is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.",
- },
- {
- name: "required after bad",
- tlsConfig: &tls.Config{
- CipherSuites: []uint16{tls.TLS_RSA_WITH_RC4_128_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
- },
- wantErr: "contains an HTTP/2-approved cipher suite (0xc02f), but it comes after",
- },
- {
- name: "bad after required",
- tlsConfig: &tls.Config{
- CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_RSA_WITH_RC4_128_SHA},
- },
- },
- }
- for _, tt := range tests {
- srv := &http.Server{TLSConfig: tt.tlsConfig}
- err := ConfigureServer(srv, nil)
- if (err != nil) != (tt.wantErr != "") {
- if tt.wantErr != "" {
- t.Errorf("%s: success, but want error", tt.name)
- } else {
- t.Errorf("%s: unexpected error: %v", tt.name, err)
- }
- }
- if err != nil && tt.wantErr != "" && !strings.Contains(err.Error(), tt.wantErr) {
- t.Errorf("%s: err = %v; want substring %q", tt.name, err, tt.wantErr)
- }
- if err == nil && !srv.TLSConfig.PreferServerCipherSuites {
- t.Errorf("%s: PreferServerCipherSuite is false; want true", tt.name)
- }
- }
-}
-
-func TestServerRejectHeadWithBody(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // No response body.
- })
- defer st.Close()
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "HEAD"),
- EndStream: false, // what we're testing, a bogus HEAD request with body
- EndHeaders: true,
- })
- st.wantRSTStream(1, ErrCodeProtocol)
-}
-
-func TestServerNoAutoContentLengthOnHead(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // No response body. (or smaller than one frame)
- })
- defer st.Close()
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1, // clients send odd numbers
- BlockFragment: st.encodeHeader(":method", "HEAD"),
- EndStream: true,
- EndHeaders: true,
- })
- h := st.wantHeaders()
- headers := st.decodeHeader(h.HeaderBlockFragment())
- want := [][2]string{
- {":status", "200"},
- }
- if !reflect.DeepEqual(headers, want) {
- t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
- }
-}
-
-// golang.org/issue/13495
-func TestServerNoDuplicateContentType(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.Header()["Content-Type"] = []string{""}
- fmt.Fprintf(w, "<html><head></head><body>hi</body></html>")
- })
- defer st.Close()
- st.greet()
- st.writeHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: st.encodeHeader(),
- EndStream: true,
- EndHeaders: true,
- })
- h := st.wantHeaders()
- headers := st.decodeHeader(h.HeaderBlockFragment())
- want := [][2]string{
- {":status", "200"},
- {"content-type", ""},
- {"content-length", "41"},
- }
- if !reflect.DeepEqual(headers, want) {
- t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
- }
-}
-
-func disableGoroutineTracking() (restore func()) {
- old := DebugGoroutines
- DebugGoroutines = false
- return func() { DebugGoroutines = old }
-}
-
-func BenchmarkServer_GetRequest(b *testing.B) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
- const msg = "Hello, world."
- st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) {
- n, err := io.Copy(ioutil.Discard, r.Body)
- if err != nil || n > 0 {
- b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err)
- }
- io.WriteString(w, msg)
- })
- defer st.Close()
-
- st.greet()
- // Give the server quota to reply. (plus it has the the 64KB)
- if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil {
- b.Fatal(err)
- }
- hbf := st.encodeHeader(":method", "GET")
- for i := 0; i < b.N; i++ {
- streamID := uint32(1 + 2*i)
- st.writeHeaders(HeadersFrameParam{
- StreamID: streamID,
- BlockFragment: hbf,
- EndStream: true,
- EndHeaders: true,
- })
- st.wantHeaders()
- st.wantData()
- }
-}
-
-func BenchmarkServer_PostRequest(b *testing.B) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
- const msg = "Hello, world."
- st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) {
- n, err := io.Copy(ioutil.Discard, r.Body)
- if err != nil || n > 0 {
- b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err)
- }
- io.WriteString(w, msg)
- })
- defer st.Close()
- st.greet()
- // Give the server quota to reply. (plus it has the the 64KB)
- if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil {
- b.Fatal(err)
- }
- hbf := st.encodeHeader(":method", "POST")
- for i := 0; i < b.N; i++ {
- streamID := uint32(1 + 2*i)
- st.writeHeaders(HeadersFrameParam{
- StreamID: streamID,
- BlockFragment: hbf,
- EndStream: false,
- EndHeaders: true,
- })
- st.writeData(streamID, true, nil)
- st.wantHeaders()
- st.wantData()
- }
-}
-
-type connStateConn struct {
- net.Conn
- cs tls.ConnectionState
-}
-
-func (c connStateConn) ConnectionState() tls.ConnectionState { return c.cs }
-
-// golang.org/issue/12737 -- handle any net.Conn, not just
-// *tls.Conn.
-func TestServerHandleCustomConn(t *testing.T) {
- var s Server
- c1, c2 := net.Pipe()
- clientDone := make(chan struct{})
- handlerDone := make(chan struct{})
- var req *http.Request
- go func() {
- defer close(clientDone)
- defer c2.Close()
- fr := NewFramer(c2, c2)
- io.WriteString(c2, ClientPreface)
- fr.WriteSettings()
- fr.WriteSettingsAck()
- f, err := fr.ReadFrame()
- if err != nil {
- t.Error(err)
- return
- }
- if sf, ok := f.(*SettingsFrame); !ok || sf.IsAck() {
- t.Errorf("Got %v; want non-ACK SettingsFrame", summarizeFrame(f))
- return
- }
- f, err = fr.ReadFrame()
- if err != nil {
- t.Error(err)
- return
- }
- if sf, ok := f.(*SettingsFrame); !ok || !sf.IsAck() {
- t.Errorf("Got %v; want ACK SettingsFrame", summarizeFrame(f))
- return
- }
- var henc hpackEncoder
- fr.WriteHeaders(HeadersFrameParam{
- StreamID: 1,
- BlockFragment: henc.encodeHeaderRaw(t, ":method", "GET", ":path", "/", ":scheme", "https", ":authority", "foo.com"),
- EndStream: true,
- EndHeaders: true,
- })
- go io.Copy(ioutil.Discard, c2)
- <-handlerDone
- }()
- const testString = "my custom ConnectionState"
- fakeConnState := tls.ConnectionState{
- ServerName: testString,
- Version: tls.VersionTLS12,
- CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
- }
- go s.ServeConn(connStateConn{c1, fakeConnState}, &ServeConnOpts{
- BaseConfig: &http.Server{
- Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- defer close(handlerDone)
- req = r
- }),
- }})
- select {
- case <-clientDone:
- case <-time.After(5 * time.Second):
- t.Fatal("timeout waiting for handler")
- }
- if req.TLS == nil {
- t.Fatalf("Request.TLS is nil. Got: %#v", req)
- }
- if req.TLS.ServerName != testString {
- t.Fatalf("Request.TLS = %+v; want ServerName of %q", req.TLS, testString)
- }
-}
-
-// golang.org/issue/14214
-func TestServer_Rejects_ConnHeaders(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- t.Error("should not get to Handler")
- })
- defer st.Close()
- st.greet()
- st.bodylessReq1("connection", "foo")
- hf := st.wantHeaders()
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "400"},
- {"content-type", "text/plain; charset=utf-8"},
- {"x-content-type-options", "nosniff"},
- {"content-length", "51"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
-}
-
-type hpackEncoder struct {
- enc *hpack.Encoder
- buf bytes.Buffer
-}
-
-func (he *hpackEncoder) encodeHeaderRaw(t *testing.T, headers ...string) []byte {
- if len(headers)%2 == 1 {
- panic("odd number of kv args")
- }
- he.buf.Reset()
- if he.enc == nil {
- he.enc = hpack.NewEncoder(&he.buf)
- }
- for len(headers) > 0 {
- k, v := headers[0], headers[1]
- err := he.enc.WriteField(hpack.HeaderField{Name: k, Value: v})
- if err != nil {
- t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err)
- }
- headers = headers[2:]
- }
- return he.buf.Bytes()
-}
-
-func TestCheckValidHTTP2Request(t *testing.T) {
- tests := []struct {
- h http.Header
- want error
- }{
- {
- h: http.Header{"Te": {"trailers"}},
- want: nil,
- },
- {
- h: http.Header{"Te": {"trailers", "bogus"}},
- want: errors.New(`request header "TE" may only be "trailers" in HTTP/2`),
- },
- {
- h: http.Header{"Foo": {""}},
- want: nil,
- },
- {
- h: http.Header{"Connection": {""}},
- want: errors.New(`request header "Connection" is not valid in HTTP/2`),
- },
- {
- h: http.Header{"Proxy-Connection": {""}},
- want: errors.New(`request header "Proxy-Connection" is not valid in HTTP/2`),
- },
- {
- h: http.Header{"Keep-Alive": {""}},
- want: errors.New(`request header "Keep-Alive" is not valid in HTTP/2`),
- },
- {
- h: http.Header{"Upgrade": {""}},
- want: errors.New(`request header "Upgrade" is not valid in HTTP/2`),
- },
- }
- for i, tt := range tests {
- got := checkValidHTTP2RequestHeaders(tt.h)
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("%d. checkValidHTTP2Request = %v; want %v", i, got, tt.want)
- }
- }
-}
-
-// golang.org/issue/14030
-func TestExpect100ContinueAfterHandlerWrites(t *testing.T) {
- const msg = "Hello"
- const msg2 = "World"
-
- doRead := make(chan bool, 1)
- defer close(doRead) // fallback cleanup
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, msg)
- w.(http.Flusher).Flush()
-
- // Do a read, which might force a 100-continue status to be sent.
- <-doRead
- r.Body.Read(make([]byte, 10))
-
- io.WriteString(w, msg2)
-
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- req, _ := http.NewRequest("POST", st.ts.URL, io.LimitReader(neverEnding('A'), 2<<20))
- req.Header.Set("Expect", "100-continue")
-
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
-
- buf := make([]byte, len(msg))
- if _, err := io.ReadFull(res.Body, buf); err != nil {
- t.Fatal(err)
- }
- if string(buf) != msg {
- t.Fatalf("msg = %q; want %q", buf, msg)
- }
-
- doRead <- true
-
- if _, err := io.ReadFull(res.Body, buf); err != nil {
- t.Fatal(err)
- }
- if string(buf) != msg2 {
- t.Fatalf("second msg = %q; want %q", buf, msg2)
- }
-}
-
-type funcReader func([]byte) (n int, err error)
-
-func (f funcReader) Read(p []byte) (n int, err error) { return f(p) }
-
-// golang.org/issue/16481 -- return flow control when streams close with unread data.
-// (The Server version of the bug. See also TestUnreadFlowControlReturned_Transport)
-func TestUnreadFlowControlReturned_Server(t *testing.T) {
- unblock := make(chan bool, 1)
- defer close(unblock)
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // Don't read the 16KB request body. Wait until the client's
- // done sending it and then return. This should cause the Server
- // to then return those 16KB of flow control to the client.
- <-unblock
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- // This previously hung on the 4th iteration.
- for i := 0; i < 6; i++ {
- body := io.MultiReader(
- io.LimitReader(neverEnding('A'), 16<<10),
- funcReader(func([]byte) (n int, err error) {
- unblock <- true
- return 0, io.EOF
- }),
- )
- req, _ := http.NewRequest("POST", st.ts.URL, body)
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- res.Body.Close()
- }
-
-}
-
-func TestServerIdleTimeout(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping in short mode")
- }
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- }, func(h2s *Server) {
- h2s.IdleTimeout = 500 * time.Millisecond
- })
- defer st.Close()
-
- st.greet()
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeNo {
- t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode)
- }
-}
-
-func TestServerIdleTimeout_AfterRequest(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping in short mode")
- }
- const timeout = 250 * time.Millisecond
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- time.Sleep(timeout * 2)
- }, func(h2s *Server) {
- h2s.IdleTimeout = timeout
- })
- defer st.Close()
-
- st.greet()
-
- // Send a request which takes twice the timeout. Verifies the
- // idle timeout doesn't fire while we're in a request:
- st.bodylessReq1()
- st.wantHeaders()
-
- // But the idle timeout should be rearmed after the request
- // is done:
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeNo {
- t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode)
- }
-}
-
-// grpc-go closes the Request.Body currently with a Read.
-// Verify that it doesn't race.
-// See https://github.com/grpc/grpc-go/pull/938
-func TestRequestBodyReadCloseRace(t *testing.T) {
- for i := 0; i < 100; i++ {
- body := &requestBody{
- pipe: &pipe{
- b: new(bytes.Buffer),
- },
- }
- body.pipe.CloseWithError(io.EOF)
-
- done := make(chan bool, 1)
- buf := make([]byte, 10)
- go func() {
- time.Sleep(1 * time.Millisecond)
- body.Close()
- done <- true
- }()
- body.Read(buf)
- <-done
- }
-}
-
-func TestIssue20704Race(t *testing.T) {
- if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" {
- t.Skip("skipping in short mode")
- }
- const (
- itemSize = 1 << 10
- itemCount = 100
- )
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- for i := 0; i < itemCount; i++ {
- _, err := w.Write(make([]byte, itemSize))
- if err != nil {
- return
- }
- }
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- cl := &http.Client{Transport: tr}
-
- for i := 0; i < 1000; i++ {
- resp, err := cl.Get(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- // Force a RST stream to the server by closing without
- // reading the body:
- resp.Body.Close()
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml
deleted file mode 100644
index 31a84bed4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml
+++ /dev/null
@@ -1,5021 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="lib/rfc2629.xslt"?>
-<?rfc toc="yes" ?>
-<?rfc symrefs="yes" ?>
-<?rfc sortrefs="yes" ?>
-<?rfc compact="yes"?>
-<?rfc subcompact="no" ?>
-<?rfc linkmailto="no" ?>
-<?rfc editing="no" ?>
-<?rfc comments="yes" ?>
-<?rfc inline="yes"?>
-<?rfc rfcedstyle="yes"?>
-<?rfc-ext allow-markup-in-artwork="yes" ?>
-<?rfc-ext include-index="no" ?>
-
-<rfc ipr="trust200902"
- category="std"
- docName="draft-ietf-httpbis-http2-latest"
- x:maturity-level="proposed"
- xmlns:x="http://purl.org/net/xml2rfc/ext">
- <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
- <front>
- <title abbrev="HTTP/2">Hypertext Transfer Protocol version 2</title>
-
- <author initials="M." surname="Belshe" fullname="Mike Belshe">
- <organization>Twist</organization>
- <address>
- <email>mbelshe@chromium.org</email>
- </address>
- </author>
-
- <author initials="R." surname="Peon" fullname="Roberto Peon">
- <organization>Google, Inc</organization>
- <address>
- <email>fenix@google.com</email>
- </address>
- </author>
-
- <author initials="M." surname="Thomson" fullname="Martin Thomson" role="editor">
- <organization>Mozilla</organization>
- <address>
- <postal>
- <street>331 E Evelyn Street</street>
- <city>Mountain View</city>
- <region>CA</region>
- <code>94041</code>
- <country>US</country>
- </postal>
- <email>martin.thomson@gmail.com</email>
- </address>
- </author>
-
- <date year="2014" />
- <area>Applications</area>
- <workgroup>HTTPbis</workgroup>
- <keyword>HTTP</keyword>
- <keyword>SPDY</keyword>
- <keyword>Web</keyword>
-
- <abstract>
- <t>
- This specification describes an optimized expression of the semantics of the Hypertext
- Transfer Protocol (HTTP). HTTP/2 enables a more efficient use of network resources and a
- reduced perception of latency by introducing header field compression and allowing multiple
- concurrent messages on the same connection. It also introduces unsolicited push of
- representations from servers to clients.
- </t>
- <t>
- This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax.
- HTTP's existing semantics remain unchanged.
- </t>
- </abstract>
-
- <note title="Editorial Note (To be removed by RFC Editor)">
- <t>
- Discussion of this draft takes place on the HTTPBIS working group mailing list
- (ietf-http-wg@w3.org), which is archived at <eref
- target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
- </t>
- <t>
- Working Group information can be found at <eref
- target="https://tools.ietf.org/wg/httpbis/"/>; that specific to HTTP/2 are at <eref
- target="https://http2.github.io/"/>.
- </t>
- <t>
- The changes in this draft are summarized in <xref
- target="change.log"/>.
- </t>
- </note>
-
- </front>
-
- <middle>
- <section anchor="intro" title="Introduction">
-
- <t>
- The Hypertext Transfer Protocol (HTTP) is a wildly successful protocol. However, the
- HTTP/1.1 message format (<xref target="RFC7230" x:fmt="," x:rel="#http.message"/>) has
- several characteristics that have a negative overall effect on application performance
- today.
- </t>
- <t>
- In particular, HTTP/1.0 allowed only one request to be outstanding at a time on a given
- TCP connection. HTTP/1.1 added request pipelining, but this only partially addressed
- request concurrency and still suffers from head-of-line blocking. Therefore, HTTP/1.1
- clients that need to make many requests typically use multiple connections to a server in
- order to achieve concurrency and thereby reduce latency.
- </t>
- <t>
- Furthermore, HTTP header fields are often repetitive and verbose, causing unnecessary
- network traffic, as well as causing the initial <xref target="TCP">TCP</xref> congestion
- window to quickly fill. This can result in excessive latency when multiple requests are
- made on a new TCP connection.
- </t>
- <t>
- HTTP/2 addresses these issues by defining an optimized mapping of HTTP's semantics to an
- underlying connection. Specifically, it allows interleaving of request and response
- messages on the same connection and uses an efficient coding for HTTP header fields. It
- also allows prioritization of requests, letting more important requests complete more
- quickly, further improving performance.
- </t>
- <t>
- The resulting protocol is more friendly to the network, because fewer TCP connections can
- be used in comparison to HTTP/1.x. This means less competition with other flows, and
- longer-lived connections, which in turn leads to better utilization of available network
- capacity.
- </t>
- <t>
- Finally, HTTP/2 also enables more efficient processing of messages through use of binary
- message framing.
- </t>
- </section>
-
- <section anchor="Overview" title="HTTP/2 Protocol Overview">
- <t>
- HTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 supports all of the core
- features of HTTP/1.1, but aims to be more efficient in several ways.
- </t>
- <t>
- The basic protocol unit in HTTP/2 is a <xref target="FrameHeader">frame</xref>. Each frame
- type serves a different purpose. For example, <x:ref>HEADERS</x:ref> and
- <x:ref>DATA</x:ref> frames form the basis of <xref target="HttpSequence">HTTP requests and
- responses</xref>; other frame types like <x:ref>SETTINGS</x:ref>,
- <x:ref>WINDOW_UPDATE</x:ref>, and <x:ref>PUSH_PROMISE</x:ref> are used in support of other
- HTTP/2 features.
- </t>
- <t>
- Multiplexing of requests is achieved by having each HTTP request-response exchange
- associated with its own <xref target="StreamsLayer">stream</xref>. Streams are largely
- independent of each other, so a blocked or stalled request or response does not prevent
- progress on other streams.
- </t>
- <t>
- Flow control and prioritization ensure that it is possible to efficiently use multiplexed
- streams. <xref target="FlowControl">Flow control</xref> helps to ensure that only data that
- can be used by a receiver is transmitted. <xref
- target="StreamPriority">Prioritization</xref> ensures that limited resources can be directed
- to the most important streams first.
- </t>
- <t>
- HTTP/2 adds a new interaction mode, whereby a server can <xref target="PushResources">push
- responses to a client</xref>. Server push allows a server to speculatively send a client
- data that the server anticipates the client will need, trading off some network usage
- against a potential latency gain. The server does this by synthesizing a request, which it
- sends as a <x:ref>PUSH_PROMISE</x:ref> frame. The server is then able to send a response to
- the synthetic request on a separate stream.
- </t>
- <t>
- Frames that contain HTTP header fields are <xref target="HeaderBlock">compressed</xref>.
- HTTP requests can be highly redundant, so compression can reduce the size of requests and
- responses significantly.
- </t>
-
- <section title="Document Organization">
- <t>
- The HTTP/2 specification is split into four parts:
- <list style="symbols">
- <t>
- <xref target="starting">Starting HTTP/2</xref> covers how an HTTP/2 connection is
- initiated.
- </t>
- <t>
- The <xref target="FramingLayer">framing</xref> and <xref
- target="StreamsLayer">streams</xref> layers describe the way HTTP/2 frames are
- structured and formed into multiplexed streams.
- </t>
- <t>
- <xref target="FrameTypes">Frame</xref> and <xref target="ErrorCodes">error</xref>
- definitions include details of the frame and error types used in HTTP/2.
- </t>
- <t>
- <xref target="HTTPLayer">HTTP mappings</xref> and <xref target="HttpExtra">additional
- requirements</xref> describe how HTTP semantics are expressed using frames and
- streams.
- </t>
- </list>
- </t>
- <t>
- While some of the frame and stream layer concepts are isolated from HTTP, this
- specification does not define a completely generic framing layer. The framing and streams
- layers are tailored to the needs of the HTTP protocol and server push.
- </t>
- </section>
-
- <section title="Conventions and Terminology">
- <t>
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
- NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
- described in <xref target="RFC2119">RFC 2119</xref>.
- </t>
- <t>
- All numeric values are in network byte order. Values are unsigned unless otherwise
- indicated. Literal values are provided in decimal or hexadecimal as appropriate.
- Hexadecimal literals are prefixed with <spanx style="verb">0x</spanx> to distinguish them
- from decimal literals.
- </t>
- <t>
- The following terms are used:
- <list style="hanging">
- <t hangText="client:">
- The endpoint initiating the HTTP/2 connection.
- </t>
- <t hangText="connection:">
- A transport-layer connection between two endpoints.
- </t>
- <t hangText="connection error:">
- An error that affects the entire HTTP/2 connection.
- </t>
- <t hangText="endpoint:">
- Either the client or server of the connection.
- </t>
- <t hangText="frame:">
- The smallest unit of communication within an HTTP/2 connection, consisting of a header
- and a variable-length sequence of octets structured according to the frame type.
- </t>
- <t hangText="peer:">
- An endpoint. When discussing a particular endpoint, "peer" refers to the endpoint
- that is remote to the primary subject of discussion.
- </t>
- <t hangText="receiver:">
- An endpoint that is receiving frames.
- </t>
- <t hangText="sender:">
- An endpoint that is transmitting frames.
- </t>
- <t hangText="server:">
- The endpoint which did not initiate the HTTP/2 connection.
- </t>
- <t hangText="stream:">
- A bi-directional flow of frames across a virtual channel within the HTTP/2 connection.
- </t>
- <t hangText="stream error:">
- An error on the individual HTTP/2 stream.
- </t>
- </list>
- </t>
- <t>
- Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" are defined
- in <xref target="RFC7230" x:fmt="of" x:rel="#intermediaries"/>.
- </t>
- </section>
- </section>
-
- <section anchor="starting" title="Starting HTTP/2">
- <t>
- An HTTP/2 connection is an application layer protocol running on top of a TCP connection
- (<xref target="TCP"/>). The client is the TCP connection initiator.
- </t>
- <t>
- HTTP/2 uses the same "http" and "https" URI schemes used by HTTP/1.1. HTTP/2 shares the same
- default port numbers: 80 for "http" URIs and 443 for "https" URIs. As a result,
- implementations processing requests for target resource URIs like <spanx
- style="verb">http://example.org/foo</spanx> or <spanx
- style="verb">https://example.com/bar</spanx> are required to first discover whether the
- upstream server (the immediate peer to which the client wishes to establish a connection)
- supports HTTP/2.
- </t>
-
- <t>
- The means by which support for HTTP/2 is determined is different for "http" and "https"
- URIs. Discovery for "http" URIs is described in <xref target="discover-http"/>. Discovery
- for "https" URIs is described in <xref target="discover-https"/>.
- </t>
-
- <section anchor="versioning" title="HTTP/2 Version Identification">
- <t>
- The protocol defined in this document has two identifiers.
- <list style="symbols">
- <x:lt>
- <t>
- The string "h2" identifies the protocol where HTTP/2 uses <xref
- target="TLS12">TLS</xref>. This identifier is used in the <xref
- target="TLS-ALPN">TLS application layer protocol negotiation extension (ALPN)</xref>
- field and any place that HTTP/2 over TLS is identified.
- </t>
- <t>
- The "h2" string is serialized into an ALPN protocol identifier as the two octet
- sequence: 0x68, 0x32.
- </t>
- </x:lt>
- <x:lt>
- <t>
- The string "h2c" identifies the protocol where HTTP/2 is run over cleartext TCP.
- This identifier is used in the HTTP/1.1 Upgrade header field and any place that
- HTTP/2 over TCP is identified.
- </t>
- </x:lt>
- </list>
- </t>
- <t>
- Negotiating "h2" or "h2c" implies the use of the transport, security, framing and message
- semantics described in this document.
- </t>
- <t>
- <cref>RFC Editor's Note: please remove the remainder of this section prior to the
- publication of a final version of this document.</cref>
- </t>
- <t>
- Only implementations of the final, published RFC can identify themselves as "h2" or "h2c".
- Until such an RFC exists, implementations MUST NOT identify themselves using these
- strings.
- </t>
- <t>
- Examples and text throughout the rest of this document use "h2" as a matter of
- editorial convenience only. Implementations of draft versions MUST NOT identify using
- this string.
- </t>
- <t>
- Implementations of draft versions of the protocol MUST add the string "-" and the
- corresponding draft number to the identifier. For example, draft-ietf-httpbis-http2-11
- over TLS is identified using the string "h2-11".
- </t>
- <t>
- Non-compatible experiments that are based on these draft versions MUST append the string
- "-" and an experiment name to the identifier. For example, an experimental implementation
- of packet mood-based encoding based on draft-ietf-httpbis-http2-09 might identify itself
- as "h2-09-emo". Note that any label MUST conform to the "token" syntax defined in
- <xref target="RFC7230" x:fmt="of" x:rel="#field.components"/>. Experimenters are
- encouraged to coordinate their experiments on the ietf-http-wg@w3.org mailing list.
- </t>
- </section>
-
- <section anchor="discover-http" title="Starting HTTP/2 for &quot;http&quot; URIs">
- <t>
- A client that makes a request for an "http" URI without prior knowledge about support for
- HTTP/2 uses the HTTP Upgrade mechanism (<xref target="RFC7230" x:fmt="of"
- x:rel="#header.upgrade"/>). The client makes an HTTP/1.1 request that includes an Upgrade
- header field identifying HTTP/2 with the "h2c" token. The HTTP/1.1 request MUST include
- exactly one <xref target="Http2SettingsHeader">HTTP2-Settings</xref> header field.
- </t>
- <figure>
- <preamble>For example:</preamble>
- <artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with=" "><![CDATA[
-GET / HTTP/1.1
-Host: server.example.com
-Connection: Upgrade, HTTP2-Settings
-Upgrade: h2c
-HTTP2-Settings: <base64url encoding of HTTP/2 SETTINGS payload>
-
-]]></artwork>
- </figure>
- <t>
- Requests that contain an entity body MUST be sent in their entirety before the client can
- send HTTP/2 frames. This means that a large request entity can block the use of the
- connection until it is completely sent.
- </t>
- <t>
- If concurrency of an initial request with subsequent requests is important, an OPTIONS
- request can be used to perform the upgrade to HTTP/2, at the cost of an additional
- round-trip.
- </t>
- <t>
- A server that does not support HTTP/2 can respond to the request as though the Upgrade
- header field were absent:
- </t>
- <figure>
- <artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with=" ">
-HTTP/1.1 200 OK
-Content-Length: 243
-Content-Type: text/html
-
-...
-</artwork>
- </figure>
- <t>
- A server MUST ignore a "h2" token in an Upgrade header field. Presence of a token with
- "h2" implies HTTP/2 over TLS, which is instead negotiated as described in <xref
- target="discover-https"/>.
- </t>
- <t>
- A server that supports HTTP/2 can accept the upgrade with a 101 (Switching Protocols)
- response. After the empty line that terminates the 101 response, the server can begin
- sending HTTP/2 frames. These frames MUST include a response to the request that initiated
- the Upgrade.
- </t>
-
- <figure>
- <preamble>
- For example:
- </preamble>
- <artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with=" ">
-HTTP/1.1 101 Switching Protocols
-Connection: Upgrade
-Upgrade: h2c
-
-[ HTTP/2 connection ...
-</artwork>
- </figure>
- <t>
- The first HTTP/2 frame sent by the server is a <x:ref>SETTINGS</x:ref> frame (<xref
- target="SETTINGS"/>) as the server connection preface (<xref
- target="ConnectionHeader"/>). Upon receiving the 101 response, the client sends a <xref
- target="ConnectionHeader">connection preface</xref>, which includes a
- <x:ref>SETTINGS</x:ref> frame.
- </t>
- <t>
- The HTTP/1.1 request that is sent prior to upgrade is assigned stream identifier 1 and is
- assigned <xref target="pri-default">default priority values</xref>. Stream 1 is
- implicitly half closed from the client toward the server, since the request is completed
- as an HTTP/1.1 request. After commencing the HTTP/2 connection, stream 1 is used for the
- response.
- </t>
-
- <section anchor="Http2SettingsHeader" title="HTTP2-Settings Header Field">
- <t>
- A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one <spanx
- style="verb">HTTP2-Settings</spanx> header field. The <spanx
- style="verb">HTTP2-Settings</spanx> header field is a connection-specific header field
- that includes parameters that govern the HTTP/2 connection, provided in anticipation of
- the server accepting the request to upgrade.
- </t>
- <figure>
- <artwork type="abnf" x:indent-with=" "><![CDATA[
-HTTP2-Settings = token68
-]]></artwork>
- </figure>
- <t>
- A server MUST NOT upgrade the connection to HTTP/2 if this header field is not present,
- or if more than one is present. A server MUST NOT send this header field.
- </t>
-
- <t>
- The content of the <spanx style="verb">HTTP2-Settings</spanx> header field is the
- payload of a <x:ref>SETTINGS</x:ref> frame (<xref target="SETTINGS"/>), encoded as a
- base64url string (that is, the URL- and filename-safe Base64 encoding described in <xref
- target="RFC4648" x:fmt="of" x:sec="5"/>, with any trailing '=' characters omitted). The
- <xref target="RFC5234">ABNF</xref> production for <spanx style="verb">token68</spanx> is
- defined in <xref target="RFC7235" x:fmt="of" x:rel="#challenge.and.response"/>.
- </t>
- <t>
- Since the upgrade is only intended to apply to the immediate connection, a client
- sending <spanx style="verb">HTTP2-Settings</spanx> MUST also send <spanx
- style="verb">HTTP2-Settings</spanx> as a connection option in the <spanx
- style="verb">Connection</spanx> header field to prevent it from being forwarded
- downstream.
- </t>
- <t>
- A server decodes and interprets these values as it would any other
- <x:ref>SETTINGS</x:ref> frame. <xref target="SettingsSync">Acknowledgement of the
- SETTINGS parameters</xref> is not necessary, since a 101 response serves as implicit
- acknowledgment. Providing these values in the Upgrade request gives a client an
- opportunity to provide parameters prior to receiving any frames from the server.
- </t>
- </section>
- </section>
-
- <section anchor="discover-https" title="Starting HTTP/2 for &quot;https&quot; URIs">
- <t>
- A client that makes a request to an "https" URI uses <xref target="TLS12">TLS</xref>
- with the <xref target="TLS-ALPN">application layer protocol negotiation extension</xref>.
- </t>
- <t>
- HTTP/2 over TLS uses the "h2" application token. The "h2c" token MUST NOT be sent by a
- client or selected by a server.
- </t>
- <t>
- Once TLS negotiation is complete, both the client and the server send a <xref
- target="ConnectionHeader">connection preface</xref>.
- </t>
- </section>
-
- <section anchor="known-http" title="Starting HTTP/2 with Prior Knowledge">
- <t>
- A client can learn that a particular server supports HTTP/2 by other means. For example,
- <xref target="ALT-SVC"/> describes a mechanism for advertising this capability.
- </t>
- <t>
- A client MAY immediately send HTTP/2 frames to a server that is known to support HTTP/2,
- after the <xref target="ConnectionHeader">connection preface</xref>; a server can
- identify such a connection by the presence of the connection preface. This only affects
- the establishment of HTTP/2 connections over cleartext TCP; implementations that support
- HTTP/2 over TLS MUST use <xref target="TLS-ALPN">protocol negotiation in TLS</xref>.
- </t>
- <t>
- Without additional information, prior support for HTTP/2 is not a strong signal that a
- given server will support HTTP/2 for future connections. For example, it is possible for
- server configurations to change, for configurations to differ between instances in
- clustered servers, or for network conditions to change.
- </t>
- </section>
-
- <section anchor="ConnectionHeader" title="HTTP/2 Connection Preface">
- <t>
- Upon establishment of a TCP connection and determination that HTTP/2 will be used by both
- peers, each endpoint MUST send a connection preface as a final confirmation and to
- establish the initial SETTINGS parameters for the HTTP/2 connection. The client and
- server each send a different connection preface.
- </t>
- <t>
- The client connection preface starts with a sequence of 24 octets, which in hex notation
- are:
- </t>
- <figure>
- <artwork type="inline" x:indent-with=" "><![CDATA[
-0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a
-]]></artwork>
- </figure>
- <t>
- (the string <spanx style="verb">PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n</spanx>). This sequence
- is followed by a <x:ref>SETTINGS</x:ref> frame (<xref target="SETTINGS"/>). The
- <x:ref>SETTINGS</x:ref> frame MAY be empty. The client sends the client connection
- preface immediately upon receipt of a 101 Switching Protocols response (indicating a
- successful upgrade), or as the first application data octets of a TLS connection. If
- starting an HTTP/2 connection with prior knowledge of server support for the protocol, the
- client connection preface is sent upon connection establishment.
- </t>
- <t>
- <list>
- <t>
- The client connection preface is selected so that a large proportion of HTTP/1.1 or
- HTTP/1.0 servers and intermediaries do not attempt to process further frames. Note
- that this does not address the concerns raised in <xref target="TALKING"/>.
- </t>
- </list>
- </t>
- <t>
- The server connection preface consists of a potentially empty <x:ref>SETTINGS</x:ref>
- frame (<xref target="SETTINGS"/>) that MUST be the first frame the server sends in the
- HTTP/2 connection.
- </t>
- <t>
- The <x:ref>SETTINGS</x:ref> frames received from a peer as part of the connection preface
- MUST be acknowledged (see <xref target="SettingsSync"/>) after sending the connection
- preface.
- </t>
- <t>
- To avoid unnecessary latency, clients are permitted to send additional frames to the
- server immediately after sending the client connection preface, without waiting to receive
- the server connection preface. It is important to note, however, that the server
- connection preface <x:ref>SETTINGS</x:ref> frame might include parameters that necessarily
- alter how a client is expected to communicate with the server. Upon receiving the
- <x:ref>SETTINGS</x:ref> frame, the client is expected to honor any parameters established.
- In some configurations, it is possible for the server to transmit <x:ref>SETTINGS</x:ref>
- before the client sends additional frames, providing an opportunity to avoid this issue.
- </t>
- <t>
- Clients and servers MUST treat an invalid connection preface as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>. A <x:ref>GOAWAY</x:ref> frame (<xref target="GOAWAY"/>)
- MAY be omitted in this case, since an invalid preface indicates that the peer is not using
- HTTP/2.
- </t>
- </section>
- </section>
-
- <section anchor="FramingLayer" title="HTTP Frames">
- <t>
- Once the HTTP/2 connection is established, endpoints can begin exchanging frames.
- </t>
-
- <section anchor="FrameHeader" title="Frame Format">
- <t>
- All frames begin with a fixed 9-octet header followed by a variable-length payload.
- </t>
- <figure title="Frame Layout">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length (24) |
- +---------------+---------------+---------------+
- | Type (8) | Flags (8) |
- +-+-+-----------+---------------+-------------------------------+
- |R| Stream Identifier (31) |
- +=+=============================================================+
- | Frame Payload (0...) ...
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The fields of the frame header are defined as:
- <list style="hanging">
- <x:lt hangText="Length:">
- <t>
- The length of the frame payload expressed as an unsigned 24-bit integer. Values
- greater than 2<x:sup>14</x:sup> (16,384) MUST NOT be sent unless the receiver has
- set a larger value for <x:ref>SETTINGS_MAX_FRAME_SIZE</x:ref>.
- </t>
- <t>
- The 9 octets of the frame header are not included in this value.
- </t>
- </x:lt>
- <x:lt hangText="Type:">
- <t>
- The 8-bit type of the frame. The frame type determines the format and semantics of
- the frame. Implementations MUST ignore and discard any frame that has a type that
- is unknown.
- </t>
- </x:lt>
- <x:lt hangText="Flags:">
- <t>
- An 8-bit field reserved for frame-type specific boolean flags.
- </t>
- <t>
- Flags are assigned semantics specific to the indicated frame type. Flags that have
- no defined semantics for a particular frame type MUST be ignored, and MUST be left
- unset (0) when sending.
- </t>
- </x:lt>
- <x:lt hangText="R:">
- <t>
- A reserved 1-bit field. The semantics of this bit are undefined and the bit MUST
- remain unset (0) when sending and MUST be ignored when receiving.
- </t>
- </x:lt>
- <x:lt hangText="Stream Identifier:">
- <t>
- A 31-bit stream identifier (see <xref target="StreamIdentifiers"/>). The value 0 is
- reserved for frames that are associated with the connection as a whole as opposed to
- an individual stream.
- </t>
- </x:lt>
- </list>
- </t>
- <t>
- The structure and content of the frame payload is dependent entirely on the frame type.
- </t>
- </section>
-
- <section anchor="FrameSize" title="Frame Size">
- <t>
- The size of a frame payload is limited by the maximum size that a receiver advertises in
- the <x:ref>SETTINGS_MAX_FRAME_SIZE</x:ref> setting. This setting can have any value
- between 2<x:sup>14</x:sup> (16,384) and 2<x:sup>24</x:sup>-1 (16,777,215) octets,
- inclusive.
- </t>
- <t>
- All implementations MUST be capable of receiving and minimally processing frames up to
- 2<x:sup>14</x:sup> octets in length, plus the 9 octet <xref target="FrameHeader">frame
- header</xref>. The size of the frame header is not included when describing frame sizes.
- <list style="hanging">
- <t hangText="Note:">
- Certain frame types, such as <xref target="PING">PING</xref>, impose additional limits
- on the amount of payload data allowed.
- </t>
- </list>
- </t>
- <t>
- If a frame size exceeds any defined limit, or is too small to contain mandatory frame
- data, the endpoint MUST send a <x:ref>FRAME_SIZE_ERROR</x:ref> error. A frame size error
- in a frame that could alter the state of the entire connection MUST be treated as a <xref
- target="ConnectionErrorHandler">connection error</xref>; this includes any frame carrying
- a <xref target="HeaderBlock">header block</xref> (that is, <x:ref>HEADERS</x:ref>,
- <x:ref>PUSH_PROMISE</x:ref>, and <x:ref>CONTINUATION</x:ref>), <x:ref>SETTINGS</x:ref>,
- and any <x:ref>WINDOW_UPDATE</x:ref> frame with a stream identifier of 0.
- </t>
- <t>
- Endpoints are not obligated to use all available space in a frame. Responsiveness can be
- improved by using frames that are smaller than the permitted maximum size. Sending large
- frames can result in delays in sending time-sensitive frames (such
- <x:ref>RST_STREAM</x:ref>, <x:ref>WINDOW_UPDATE</x:ref>, or <x:ref>PRIORITY</x:ref>)
- which if blocked by the transmission of a large frame, could affect performance.
- </t>
- </section>
-
- <section anchor="HeaderBlock" title="Header Compression and Decompression">
- <t>
- Just as in HTTP/1, a header field in HTTP/2 is a name with one or more associated values.
- They are used within HTTP request and response messages as well as server push operations
- (see <xref target="PushResources" />).
- </t>
- <t>
- Header lists are collections of zero or more header fields. When transmitted over a
- connection, a header list is serialized into a header block using <xref
- target="COMPRESSION">HTTP Header Compression</xref>. The serialized header block is then
- divided into one or more octet sequences, called header block fragments, and transmitted
- within the payload of <xref target="HEADERS">HEADERS</xref>, <xref
- target="PUSH_PROMISE">PUSH_PROMISE</xref> or <xref
- target="CONTINUATION">CONTINUATION</xref> frames.
- </t>
- <t>
- The <xref target="COOKIE">Cookie header field</xref> is treated specially by the HTTP
- mapping (see <xref target="CompressCookie"/>).
- </t>
- <t>
- A receiving endpoint reassembles the header block by concatenating its fragments, then
- decompresses the block to reconstruct the header list.
- </t>
- <t>
- A complete header block consists of either:
- <list style="symbols">
- <t>
- a single <x:ref>HEADERS</x:ref> or <x:ref>PUSH_PROMISE</x:ref> frame,
- with the END_HEADERS flag set, or
- </t>
- <t>
- a <x:ref>HEADERS</x:ref> or <x:ref>PUSH_PROMISE</x:ref> frame with the END_HEADERS
- flag cleared and one or more <x:ref>CONTINUATION</x:ref> frames,
- where the last <x:ref>CONTINUATION</x:ref> frame has the END_HEADERS flag set.
- </t>
- </list>
- </t>
- <t>
- Header compression is stateful. One compression context and one decompression context is
- used for the entire connection. Each header block is processed as a discrete unit.
- Header blocks MUST be transmitted as a contiguous sequence of frames, with no interleaved
- frames of any other type or from any other stream. The last frame in a sequence of
- <x:ref>HEADERS</x:ref> or <x:ref>CONTINUATION</x:ref> frames MUST have the END_HEADERS
- flag set. The last frame in a sequence of <x:ref>PUSH_PROMISE</x:ref> or
- <x:ref>CONTINUATION</x:ref> frames MUST have the END_HEADERS flag set. This allows a
- header block to be logically equivalent to a single frame.
- </t>
- <t>
- Header block fragments can only be sent as the payload of <x:ref>HEADERS</x:ref>,
- <x:ref>PUSH_PROMISE</x:ref> or <x:ref>CONTINUATION</x:ref> frames, because these frames
- carry data that can modify the compression context maintained by a receiver. An endpoint
- receiving <x:ref>HEADERS</x:ref>, <x:ref>PUSH_PROMISE</x:ref> or
- <x:ref>CONTINUATION</x:ref> frames MUST reassemble header blocks and perform decompression
- even if the frames are to be discarded. A receiver MUST terminate the connection with a
- <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>COMPRESSION_ERROR</x:ref> if it does not decompress a header block.
- </t>
- </section>
- </section>
-
- <section anchor="StreamsLayer" title="Streams and Multiplexing">
- <t>
- A "stream" is an independent, bi-directional sequence of frames exchanged between the client
- and server within an HTTP/2 connection. Streams have several important characteristics:
- <list style="symbols">
- <t>
- A single HTTP/2 connection can contain multiple concurrently open streams, with either
- endpoint interleaving frames from multiple streams.
- </t>
- <t>
- Streams can be established and used unilaterally or shared by either the client or
- server.
- </t>
- <t>
- Streams can be closed by either endpoint.
- </t>
- <t>
- The order in which frames are sent on a stream is significant. Recipients process frames
- in the order they are received. In particular, the order of <x:ref>HEADERS</x:ref>,
- and <x:ref>DATA</x:ref> frames is semantically significant.
- </t>
- <t>
- Streams are identified by an integer. Stream identifiers are assigned to streams by the
- endpoint initiating the stream.
- </t>
- </list>
- </t>
-
- <section anchor="StreamStates" title="Stream States">
- <t>
- The lifecycle of a stream is shown in <xref target="StreamStatesFigure"/>.
- </t>
-
- <figure anchor="StreamStatesFigure" title="Stream States">
- <artwork type="drawing">
- <![CDATA[
- +--------+
- PP | | PP
- ,--------| idle |--------.
- / | | \
- v +--------+ v
- +----------+ | +----------+
- | | | H | |
- ,---| reserved | | | reserved |---.
- | | (local) | v | (remote) | |
- | +----------+ +--------+ +----------+ |
- | | ES | | ES | |
- | | H ,-------| open |-------. | H |
- | | / | | \ | |
- | v v +--------+ v v |
- | +----------+ | +----------+ |
- | | half | | | half | |
- | | closed | | R | closed | |
- | | (remote) | | | (local) | |
- | +----------+ | +----------+ |
- | | v | |
- | | ES / R +--------+ ES / R | |
- | `----------->| |<-----------' |
- | R | closed | R |
- `-------------------->| |<--------------------'
- +--------+
-
- H: HEADERS frame (with implied CONTINUATIONs)
- PP: PUSH_PROMISE frame (with implied CONTINUATIONs)
- ES: END_STREAM flag
- R: RST_STREAM frame
-]]>
- </artwork>
- </figure>
-
- <t>
- Note that this diagram shows stream state transitions and the frames and flags that affect
- those transitions only. In this regard, <x:ref>CONTINUATION</x:ref> frames do not result
- in state transitions; they are effectively part of the <x:ref>HEADERS</x:ref> or
- <x:ref>PUSH_PROMISE</x:ref> that they follow. For this purpose, the END_STREAM flag is
- processed as a separate event to the frame that bears it; a <x:ref>HEADERS</x:ref> frame
- with the END_STREAM flag set can cause two state transitions.
- </t>
- <t>
- Both endpoints have a subjective view of the state of a stream that could be different
- when frames are in transit. Endpoints do not coordinate the creation of streams; they are
- created unilaterally by either endpoint. The negative consequences of a mismatch in
- states are limited to the "closed" state after sending <x:ref>RST_STREAM</x:ref>, where
- frames might be received for some time after closing.
- </t>
- <t>
- Streams have the following states:
- <list style="hanging">
-
- <x:lt hangText="idle:">
- <t>
- <vspace blankLines="0"/>
- All streams start in the "idle" state. In this state, no frames have been
- exchanged.
- </t>
- <t>
- The following transitions are valid from this state:
- <list style="symbols">
- <t>
- Sending or receiving a <x:ref>HEADERS</x:ref> frame causes the stream to become
- "open". The stream identifier is selected as described in <xref
- target="StreamIdentifiers"/>. The same <x:ref>HEADERS</x:ref> frame can also
- cause a stream to immediately become "half closed".
- </t>
- <t>
- Sending a <x:ref>PUSH_PROMISE</x:ref> frame marks the associated stream for
- later use. The stream state for the reserved stream transitions to "reserved
- (local)".
- </t>
- <t>
- Receiving a <x:ref>PUSH_PROMISE</x:ref> frame marks the associated stream as
- reserved by the remote peer. The state of the stream becomes "reserved
- (remote)".
- </t>
- </list>
- </t>
- <t>
- Receiving any frames other than <x:ref>HEADERS</x:ref> or
- <x:ref>PUSH_PROMISE</x:ref> on a stream in this state MUST be treated as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
-
- <x:lt hangText="reserved (local):">
- <t>
- <vspace blankLines="0"/>
- A stream in the "reserved (local)" state is one that has been promised by sending a
- <x:ref>PUSH_PROMISE</x:ref> frame. A <x:ref>PUSH_PROMISE</x:ref> frame reserves an
- idle stream by associating the stream with an open stream that was initiated by the
- remote peer (see <xref target="PushResources"/>).
- </t>
- <t>
- In this state, only the following transitions are possible:
- <list style="symbols">
- <t>
- The endpoint can send a <x:ref>HEADERS</x:ref> frame. This causes the stream to
- open in a "half closed (remote)" state.
- </t>
- <t>
- Either endpoint can send a <x:ref>RST_STREAM</x:ref> frame to cause the stream
- to become "closed". This releases the stream reservation.
- </t>
- </list>
- </t>
- <t>
- An endpoint MUST NOT send any type of frame other than <x:ref>HEADERS</x:ref> or
- <x:ref>RST_STREAM</x:ref> in this state.
- </t>
- <t>
- A <x:ref>PRIORITY</x:ref> frame MAY be received in this state. Receiving any type
- of frame other than <x:ref>RST_STREAM</x:ref> or <x:ref>PRIORITY</x:ref> on a stream
- in this state MUST be treated as a <xref target="ConnectionErrorHandler">connection
- error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
-
- <x:lt hangText="reserved (remote):">
- <t>
- <vspace blankLines="0"/>
- A stream in the "reserved (remote)" state has been reserved by a remote peer.
- </t>
- <t>
- In this state, only the following transitions are possible:
- <list style="symbols">
- <t>
- Receiving a <x:ref>HEADERS</x:ref> frame causes the stream to transition to
- "half closed (local)".
- </t>
- <t>
- Either endpoint can send a <x:ref>RST_STREAM</x:ref> frame to cause the stream
- to become "closed". This releases the stream reservation.
- </t>
- </list>
- </t>
- <t>
- An endpoint MAY send a <x:ref>PRIORITY</x:ref> frame in this state to reprioritize
- the reserved stream. An endpoint MUST NOT send any type of frame other than
- <x:ref>RST_STREAM</x:ref>, <x:ref>WINDOW_UPDATE</x:ref>, or <x:ref>PRIORITY</x:ref>
- in this state.
- </t>
- <t>
- Receiving any type of frame other than <x:ref>HEADERS</x:ref> or
- <x:ref>RST_STREAM</x:ref> on a stream in this state MUST be treated as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
-
- <x:lt hangText="open:">
- <t>
- <vspace blankLines="0"/>
- A stream in the "open" state may be used by both peers to send frames of any type.
- In this state, sending peers observe advertised <xref target="FlowControl">stream
- level flow control limits</xref>.
- </t>
- <t>
- From this state either endpoint can send a frame with an END_STREAM flag set, which
- causes the stream to transition into one of the "half closed" states: an endpoint
- sending an END_STREAM flag causes the stream state to become "half closed (local)";
- an endpoint receiving an END_STREAM flag causes the stream state to become "half
- closed (remote)".
- </t>
- <t>
- Either endpoint can send a <x:ref>RST_STREAM</x:ref> frame from this state, causing
- it to transition immediately to "closed".
- </t>
- </x:lt>
-
- <x:lt hangText="half closed (local):">
- <t>
- <vspace blankLines="0"/>
- A stream that is in the "half closed (local)" state cannot be used for sending
- frames. Only <x:ref>WINDOW_UPDATE</x:ref>, <x:ref>PRIORITY</x:ref> and
- <x:ref>RST_STREAM</x:ref> frames can be sent in this state.
- </t>
- <t>
- A stream transitions from this state to "closed" when a frame that contains an
- END_STREAM flag is received, or when either peer sends a <x:ref>RST_STREAM</x:ref>
- frame.
- </t>
- <t>
- A receiver can ignore <x:ref>WINDOW_UPDATE</x:ref> frames in this state, which might
- arrive for a short period after a frame bearing the END_STREAM flag is sent.
- </t>
- <t>
- <x:ref>PRIORITY</x:ref> frames received in this state are used to reprioritize
- streams that depend on the current stream.
- </t>
- </x:lt>
-
- <x:lt hangText="half closed (remote):">
- <t>
- <vspace blankLines="0"/>
- A stream that is "half closed (remote)" is no longer being used by the peer to send
- frames. In this state, an endpoint is no longer obligated to maintain a receiver
- flow control window if it performs flow control.
- </t>
- <t>
- If an endpoint receives additional frames for a stream that is in this state, other
- than <x:ref>WINDOW_UPDATE</x:ref>, <x:ref>PRIORITY</x:ref> or
- <x:ref>RST_STREAM</x:ref>, it MUST respond with a <xref
- target="StreamErrorHandler">stream error</xref> of type
- <x:ref>STREAM_CLOSED</x:ref>.
- </t>
- <t>
- A stream that is "half closed (remote)" can be used by the endpoint to send frames
- of any type. In this state, the endpoint continues to observe advertised <xref
- target="FlowControl">stream level flow control limits</xref>.
- </t>
- <t>
- A stream can transition from this state to "closed" by sending a frame that contains
- an END_STREAM flag, or when either peer sends a <x:ref>RST_STREAM</x:ref> frame.
- </t>
- </x:lt>
-
- <x:lt hangText="closed:">
- <t>
- <vspace blankLines="0"/>
- The "closed" state is the terminal state.
- </t>
- <t>
- An endpoint MUST NOT send frames other than <x:ref>PRIORITY</x:ref> on a closed
- stream. An endpoint that receives any frame other than <x:ref>PRIORITY</x:ref>
- after receiving a <x:ref>RST_STREAM</x:ref> MUST treat that as a <xref
- target="StreamErrorHandler">stream error</xref> of type
- <x:ref>STREAM_CLOSED</x:ref>. Similarly, an endpoint that receives any frames after
- receiving a frame with the END_STREAM flag set MUST treat that as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>STREAM_CLOSED</x:ref>, unless the frame is permitted as described below.
- </t>
- <t>
- <x:ref>WINDOW_UPDATE</x:ref> or <x:ref>RST_STREAM</x:ref> frames can be received in
- this state for a short period after a <x:ref>DATA</x:ref> or <x:ref>HEADERS</x:ref>
- frame containing an END_STREAM flag is sent. Until the remote peer receives and
- processes <x:ref>RST_STREAM</x:ref> or the frame bearing the END_STREAM flag, it
- might send frames of these types. Endpoints MUST ignore
- <x:ref>WINDOW_UPDATE</x:ref> or <x:ref>RST_STREAM</x:ref> frames received in this
- state, though endpoints MAY choose to treat frames that arrive a significant time
- after sending END_STREAM as a <xref target="ConnectionErrorHandler">connection
- error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- <x:ref>PRIORITY</x:ref> frames can be sent on closed streams to prioritize streams
- that are dependent on the closed stream. Endpoints SHOULD process
- <x:ref>PRIORITY</x:ref> frame, though they can be ignored if the stream has been
- removed from the dependency tree (see <xref target="priority-gc"/>).
- </t>
- <t>
- If this state is reached as a result of sending a <x:ref>RST_STREAM</x:ref> frame,
- the peer that receives the <x:ref>RST_STREAM</x:ref> might have already sent - or
- enqueued for sending - frames on the stream that cannot be withdrawn. An endpoint
- MUST ignore frames that it receives on closed streams after it has sent a
- <x:ref>RST_STREAM</x:ref> frame. An endpoint MAY choose to limit the period over
- which it ignores frames and treat frames that arrive after this time as being in
- error.
- </t>
- <t>
- Flow controlled frames (i.e., <x:ref>DATA</x:ref>) received after sending
- <x:ref>RST_STREAM</x:ref> are counted toward the connection flow control window.
- Even though these frames might be ignored, because they are sent before the sender
- receives the <x:ref>RST_STREAM</x:ref>, the sender will consider the frames to count
- against the flow control window.
- </t>
- <t>
- An endpoint might receive a <x:ref>PUSH_PROMISE</x:ref> frame after it sends
- <x:ref>RST_STREAM</x:ref>. <x:ref>PUSH_PROMISE</x:ref> causes a stream to become
- "reserved" even if the associated stream has been reset. Therefore, a
- <x:ref>RST_STREAM</x:ref> is needed to close an unwanted promised stream.
- </t>
- </x:lt>
- </list>
- </t>
- <t>
- In the absence of more specific guidance elsewhere in this document, implementations
- SHOULD treat the receipt of a frame that is not expressly permitted in the description of
- a state as a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>. Frame of unknown types are ignored.
- </t>
- <t>
- An example of the state transitions for an HTTP request/response exchange can be found in
- <xref target="HttpSequence"/>. An example of the state transitions for server push can be
- found in <xref target="PushRequests"/> and <xref target="PushResponses"/>.
- </t>
-
- <section anchor="StreamIdentifiers" title="Stream Identifiers">
- <t>
- Streams are identified with an unsigned 31-bit integer. Streams initiated by a client
- MUST use odd-numbered stream identifiers; those initiated by the server MUST use
- even-numbered stream identifiers. A stream identifier of zero (0x0) is used for
- connection control messages; the stream identifier zero cannot be used to establish a
- new stream.
- </t>
- <t>
- HTTP/1.1 requests that are upgraded to HTTP/2 (see <xref target="discover-http"/>) are
- responded to with a stream identifier of one (0x1). After the upgrade
- completes, stream 0x1 is "half closed (local)" to the client. Therefore, stream 0x1
- cannot be selected as a new stream identifier by a client that upgrades from HTTP/1.1.
- </t>
- <t>
- The identifier of a newly established stream MUST be numerically greater than all
- streams that the initiating endpoint has opened or reserved. This governs streams that
- are opened using a <x:ref>HEADERS</x:ref> frame and streams that are reserved using
- <x:ref>PUSH_PROMISE</x:ref>. An endpoint that receives an unexpected stream identifier
- MUST respond with a <xref target="ConnectionErrorHandler">connection error</xref> of
- type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- The first use of a new stream identifier implicitly closes all streams in the "idle"
- state that might have been initiated by that peer with a lower-valued stream identifier.
- For example, if a client sends a <x:ref>HEADERS</x:ref> frame on stream 7 without ever
- sending a frame on stream 5, then stream 5 transitions to the "closed" state when the
- first frame for stream 7 is sent or received.
- </t>
- <t>
- Stream identifiers cannot be reused. Long-lived connections can result in an endpoint
- exhausting the available range of stream identifiers. A client that is unable to
- establish a new stream identifier can establish a new connection for new streams. A
- server that is unable to establish a new stream identifier can send a
- <x:ref>GOAWAY</x:ref> frame so that the client is forced to open a new connection for
- new streams.
- </t>
- </section>
-
- <section title="Stream Concurrency">
- <t>
- A peer can limit the number of concurrently active streams using the
- <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref> parameter (see <xref
- target="SettingValues"/>) within a <x:ref>SETTINGS</x:ref> frame. The maximum concurrent
- streams setting is specific to each endpoint and applies only to the peer that receives
- the setting. That is, clients specify the maximum number of concurrent streams the
- server can initiate, and servers specify the maximum number of concurrent streams the
- client can initiate.
- </t>
- <t>
- Streams that are in the "open" state, or either of the "half closed" states count toward
- the maximum number of streams that an endpoint is permitted to open. Streams in any of
- these three states count toward the limit advertised in the
- <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref> setting. Streams in either of the
- "reserved" states do not count toward the stream limit.
- </t>
- <t>
- Endpoints MUST NOT exceed the limit set by their peer. An endpoint that receives a
- <x:ref>HEADERS</x:ref> frame that causes their advertised concurrent stream limit to be
- exceeded MUST treat this as a <xref target="StreamErrorHandler">stream error</xref>. An
- endpoint that wishes to reduce the value of
- <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref> to a value that is below the current
- number of open streams can either close streams that exceed the new value or allow
- streams to complete.
- </t>
- </section>
- </section>
-
- <section anchor="FlowControl" title="Flow Control">
- <t>
- Using streams for multiplexing introduces contention over use of the TCP connection,
- resulting in blocked streams. A flow control scheme ensures that streams on the same
- connection do not destructively interfere with each other. Flow control is used for both
- individual streams and for the connection as a whole.
- </t>
- <t>
- HTTP/2 provides for flow control through use of the <xref
- target="WINDOW_UPDATE">WINDOW_UPDATE frame</xref>.
- </t>
-
- <section anchor="fc-principles" title="Flow Control Principles">
- <t>
- HTTP/2 stream flow control aims to allow a variety of flow control algorithms to be
- used without requiring protocol changes. Flow control in HTTP/2 has the following
- characteristics:
- <list style="numbers">
- <t>
- Flow control is specific to a connection; i.e., it is "hop-by-hop", not
- "end-to-end".
- </t>
- <t>
- Flow control is based on window update frames. Receivers advertise how many octets
- they are prepared to receive on a stream and for the entire connection. This is a
- credit-based scheme.
- </t>
- <t>
- Flow control is directional with overall control provided by the receiver. A
- receiver MAY choose to set any window size that it desires for each stream and for
- the entire connection. A sender MUST respect flow control limits imposed by a
- receiver. Clients, servers and intermediaries all independently advertise their
- flow control window as a receiver and abide by the flow control limits set by
- their peer when sending.
- </t>
- <t>
- The initial value for the flow control window is 65,535 octets for both new streams
- and the overall connection.
- </t>
- <t>
- The frame type determines whether flow control applies to a frame. Of the frames
- specified in this document, only <x:ref>DATA</x:ref> frames are subject to flow
- control; all other frame types do not consume space in the advertised flow control
- window. This ensures that important control frames are not blocked by flow control.
- </t>
- <t>
- Flow control cannot be disabled.
- </t>
- <t>
- HTTP/2 defines only the format and semantics of the <x:ref>WINDOW_UPDATE</x:ref>
- frame (<xref target="WINDOW_UPDATE"/>). This document does not stipulate how a
- receiver decides when to send this frame or the value that it sends, nor does it
- specify how a sender chooses to send packets. Implementations are able to select
- any algorithm that suits their needs.
- </t>
- </list>
- </t>
- <t>
- Implementations are also responsible for managing how requests and responses are sent
- based on priority; choosing how to avoid head of line blocking for requests; and
- managing the creation of new streams. Algorithm choices for these could interact with
- any flow control algorithm.
- </t>
- </section>
-
- <section anchor="DisableFlowControl" title="Appropriate Use of Flow Control">
- <t>
- Flow control is defined to protect endpoints that are operating under resource
- constraints. For example, a proxy needs to share memory between many connections, and
- also might have a slow upstream connection and a fast downstream one. Flow control
- addresses cases where the receiver is unable process data on one stream, yet wants to
- continue to process other streams in the same connection.
- </t>
- <t>
- Deployments that do not require this capability can advertise a flow control window of
- the maximum size, incrementing the available space when new data is received. This
- effectively disables flow control for that receiver. Conversely, a sender is always
- subject to the flow control window advertised by the receiver.
- </t>
- <t>
- Deployments with constrained resources (for example, memory) can employ flow control to
- limit the amount of memory a peer can consume. Note, however, that this can lead to
- suboptimal use of available network resources if flow control is enabled without
- knowledge of the bandwidth-delay product (see <xref target="RFC1323"/>).
- </t>
- <t>
- Even with full awareness of the current bandwidth-delay product, implementation of flow
- control can be difficult. When using flow control, the receiver MUST read from the TCP
- receive buffer in a timely fashion. Failure to do so could lead to a deadlock when
- critical frames, such as <x:ref>WINDOW_UPDATE</x:ref>, are not read and acted upon.
- </t>
- </section>
- </section>
-
- <section anchor="StreamPriority" title="Stream priority">
- <t>
- A client can assign a priority for a new stream by including prioritization information in
- the <xref target="HEADERS">HEADERS frame</xref> that opens the stream. For an existing
- stream, the <xref target="PRIORITY">PRIORITY frame</xref> can be used to change the
- priority.
- </t>
- <t>
- The purpose of prioritization is to allow an endpoint to express how it would prefer its
- peer allocate resources when managing concurrent streams. Most importantly, priority can
- be used to select streams for transmitting frames when there is limited capacity for
- sending.
- </t>
- <t>
- Streams can be prioritized by marking them as dependent on the completion of other streams
- (<xref target="pri-depend"/>). Each dependency is assigned a relative weight, a number
- that is used to determine the relative proportion of available resources that are assigned
- to streams dependent on the same stream.
- </t>
- <!--
- Note that stream dependencies have not yet been validated in practice. The theory
- might be fairly sound, but there are no implementations currently sending these. If it
- turns out that they are not useful, or actively harmful, implementations will be requested
- to avoid creating stream dependencies.
- -->
- <t>
- Explicitly setting the priority for a stream is input to a prioritization process. It
- does not guarantee any particular processing or transmission order for the stream relative
- to any other stream. An endpoint cannot force a peer to process concurrent streams in a
- particular order using priority. Expressing priority is therefore only ever a suggestion.
- </t>
- <t>
- Providing prioritization information is optional, so default values are used if no
- explicit indicator is provided (<xref target="pri-default"/>).
- </t>
-
- <section title="Stream Dependencies" anchor="pri-depend">
- <t>
- Each stream can be given an explicit dependency on another stream. Including a
- dependency expresses a preference to allocate resources to the identified stream rather
- than to the dependent stream.
- </t>
- <t>
- A stream that is not dependent on any other stream is given a stream dependency of 0x0.
- In other words, the non-existent stream 0 forms the root of the tree.
- </t>
- <t>
- A stream that depends on another stream is a dependent stream. The stream upon which a
- stream is dependent is a parent stream. A dependency on a stream that is not currently
- in the tree - such as a stream in the "idle" state - results in that stream being given
- a <xref target="pri-default">default priority</xref>.
- </t>
- <t>
- When assigning a dependency on another stream, the stream is added as a new dependency
- of the parent stream. Dependent streams that share the same parent are not ordered with
- respect to each other. For example, if streams B and C are dependent on stream A, and
- if stream D is created with a dependency on stream A, this results in a dependency order
- of A followed by B, C, and D in any order.
- </t>
- <figure title="Example of Default Dependency Creation">
- <artwork type="inline"><![CDATA[
- A A
- / \ ==> /|\
- B C B D C
-]]></artwork>
- </figure>
- <t>
- An exclusive flag allows for the insertion of a new level of dependencies. The
- exclusive flag causes the stream to become the sole dependency of its parent stream,
- causing other dependencies to become dependent on the exclusive stream. In the
- previous example, if stream D is created with an exclusive dependency on stream A, this
- results in D becoming the dependency parent of B and C.
- </t>
- <figure title="Example of Exclusive Dependency Creation">
- <artwork type="inline"><![CDATA[
- A
- A |
- / \ ==> D
- B C / \
- B C
-]]></artwork>
- </figure>
- <t>
- Inside the dependency tree, a dependent stream SHOULD only be allocated resources if all
- of the streams that it depends on (the chain of parent streams up to 0x0) are either
- closed, or it is not possible to make progress on them.
- </t>
- <t>
- A stream cannot depend on itself. An endpoint MUST treat this as a <xref
- target="StreamErrorHandler">stream error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </section>
-
- <section title="Dependency Weighting">
- <t>
- All dependent streams are allocated an integer weight between 1 and 256 (inclusive).
- </t>
- <t>
- Streams with the same parent SHOULD be allocated resources proportionally based on their
- weight. Thus, if stream B depends on stream A with weight 4, and C depends on stream A
- with weight 12, and if no progress can be made on A, stream B ideally receives one third
- of the resources allocated to stream C.
- </t>
- </section>
-
- <section anchor="reprioritize" title="Reprioritization">
- <t>
- Stream priorities are changed using the <x:ref>PRIORITY</x:ref> frame. Setting a
- dependency causes a stream to become dependent on the identified parent stream.
- </t>
- <t>
- Dependent streams move with their parent stream if the parent is reprioritized. Setting
- a dependency with the exclusive flag for a reprioritized stream moves all the
- dependencies of the new parent stream to become dependent on the reprioritized stream.
- </t>
- <t>
- If a stream is made dependent on one of its own dependencies, the formerly dependent
- stream is first moved to be dependent on the reprioritized stream's previous parent.
- The moved dependency retains its weight.
- </t>
- <figure title="Example of Dependency Reordering">
- <preamble>
- For example, consider an original dependency tree where B and C depend on A, D and E
- depend on C, and F depends on D. If A is made dependent on D, then D takes the place
- of A. All other dependency relationships stay the same, except for F, which becomes
- dependent on A if the reprioritization is exclusive.
- </preamble>
- <artwork type="inline"><![CDATA[
- ? ? ? ?
- | / \ | |
- A D A D D
- / \ / / \ / \ |
- B C ==> F B C ==> F A OR A
- / \ | / \ /|\
- D E E B C B C F
- | | |
- F E E
- (intermediate) (non-exclusive) (exclusive)
-]]></artwork>
- </figure>
- </section>
-
- <section anchor="priority-gc" title="Prioritization State Management">
- <t>
- When a stream is removed from the dependency tree, its dependencies can be moved to
- become dependent on the parent of the closed stream. The weights of new dependencies
- are recalculated by distributing the weight of the dependency of the closed stream
- proportionally based on the weights of its dependencies.
- </t>
- <t>
- Streams that are removed from the dependency tree cause some prioritization information
- to be lost. Resources are shared between streams with the same parent stream, which
- means that if a stream in that set closes or becomes blocked, any spare capacity
- allocated to a stream is distributed to the immediate neighbors of the stream. However,
- if the common dependency is removed from the tree, those streams share resources with
- streams at the next highest level.
- </t>
- <t>
- For example, assume streams A and B share a parent, and streams C and D both depend on
- stream A. Prior to the removal of stream A, if streams A and D are unable to proceed,
- then stream C receives all the resources dedicated to stream A. If stream A is removed
- from the tree, the weight of stream A is divided between streams C and D. If stream D
- is still unable to proceed, this results in stream C receiving a reduced proportion of
- resources. For equal starting weights, C receives one third, rather than one half, of
- available resources.
- </t>
- <t>
- It is possible for a stream to become closed while prioritization information that
- creates a dependency on that stream is in transit. If a stream identified in a
- dependency has no associated priority information, then the dependent stream is instead
- assigned a <xref target="pri-default">default priority</xref>. This potentially creates
- suboptimal prioritization, since the stream could be given a priority that is different
- to what is intended.
- </t>
- <t>
- To avoid these problems, an endpoint SHOULD retain stream prioritization state for a
- period after streams become closed. The longer state is retained, the lower the chance
- that streams are assigned incorrect or default priority values.
- </t>
- <t>
- This could create a large state burden for an endpoint, so this state MAY be limited.
- An endpoint MAY apply a fixed upper limit on the number of closed streams for which
- prioritization state is tracked to limit state exposure. The amount of additional state
- an endpoint maintains could be dependent on load; under high load, prioritization state
- can be discarded to limit resource commitments. In extreme cases, an endpoint could
- even discard prioritization state for active or reserved streams. If a fixed limit is
- applied, endpoints SHOULD maintain state for at least as many streams as allowed by
- their setting for <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref>.
- </t>
- <t>
- An endpoint receiving a <x:ref>PRIORITY</x:ref> frame that changes the priority of a
- closed stream SHOULD alter the dependencies of the streams that depend on it, if it has
- retained enough state to do so.
- </t>
- </section>
-
- <section title="Default Priorities" anchor="pri-default">
- <t>
- Providing priority information is optional. Streams are assigned a non-exclusive
- dependency on stream 0x0 by default. <xref target="PushResources">Pushed streams</xref>
- initially depend on their associated stream. In both cases, streams are assigned a
- default weight of 16.
- </t>
- </section>
- </section>
-
- <section title="Error Handling">
- <t>
- HTTP/2 framing permits two classes of error:
- <list style="symbols">
- <t>
- An error condition that renders the entire connection unusable is a connection error.
- </t>
- <t>
- An error in an individual stream is a stream error.
- </t>
- </list>
- </t>
- <t>
- A list of error codes is included in <xref target="ErrorCodes"/>.
- </t>
-
- <section anchor="ConnectionErrorHandler" title="Connection Error Handling">
- <t>
- A connection error is any error which prevents further processing of the framing layer,
- or which corrupts any connection state.
- </t>
- <t>
- An endpoint that encounters a connection error SHOULD first send a <x:ref>GOAWAY</x:ref>
- frame (<xref target="GOAWAY"/>) with the stream identifier of the last stream that it
- successfully received from its peer. The <x:ref>GOAWAY</x:ref> frame includes an error
- code that indicates why the connection is terminating. After sending the
- <x:ref>GOAWAY</x:ref> frame, the endpoint MUST close the TCP connection.
- </t>
- <t>
- It is possible that the <x:ref>GOAWAY</x:ref> will not be reliably received by the
- receiving endpoint (see <xref target="RFC7230" x:fmt=","
- x:rel="#persistent.tear-down"/>). In the event of a connection error,
- <x:ref>GOAWAY</x:ref> only provides a best effort attempt to communicate with the peer
- about why the connection is being terminated.
- </t>
- <t>
- An endpoint can end a connection at any time. In particular, an endpoint MAY choose to
- treat a stream error as a connection error. Endpoints SHOULD send a
- <x:ref>GOAWAY</x:ref> frame when ending a connection, providing that circumstances
- permit it.
- </t>
- </section>
-
- <section anchor="StreamErrorHandler" title="Stream Error Handling">
- <t>
- A stream error is an error related to a specific stream that does not affect processing
- of other streams.
- </t>
- <t>
- An endpoint that detects a stream error sends a <x:ref>RST_STREAM</x:ref> frame (<xref
- target="RST_STREAM"/>) that contains the stream identifier of the stream where the error
- occurred. The <x:ref>RST_STREAM</x:ref> frame includes an error code that indicates the
- type of error.
- </t>
- <t>
- A <x:ref>RST_STREAM</x:ref> is the last frame that an endpoint can send on a stream.
- The peer that sends the <x:ref>RST_STREAM</x:ref> frame MUST be prepared to receive any
- frames that were sent or enqueued for sending by the remote peer. These frames can be
- ignored, except where they modify connection state (such as the state maintained for
- <xref target="HeaderBlock">header compression</xref>, or flow control).
- </t>
- <t>
- Normally, an endpoint SHOULD NOT send more than one <x:ref>RST_STREAM</x:ref> frame for
- any stream. However, an endpoint MAY send additional <x:ref>RST_STREAM</x:ref> frames if
- it receives frames on a closed stream after more than a round-trip time. This behavior
- is permitted to deal with misbehaving implementations.
- </t>
- <t>
- An endpoint MUST NOT send a <x:ref>RST_STREAM</x:ref> in response to an
- <x:ref>RST_STREAM</x:ref> frame, to avoid looping.
- </t>
- </section>
-
- <section title="Connection Termination">
- <t>
- If the TCP connection is closed or reset while streams remain in open or half closed
- states, then the endpoint MUST assume that those streams were abnormally interrupted and
- could be incomplete.
- </t>
- </section>
- </section>
-
- <section anchor="extensibility" title="Extending HTTP/2">
- <t>
- HTTP/2 permits extension of the protocol. Protocol extensions can be used to provide
- additional services or alter any aspect of the protocol, within the limitations described
- in this section. Extensions are effective only within the scope of a single HTTP/2
- connection.
- </t>
- <t>
- Extensions are permitted to use new <xref target="FrameHeader">frame types</xref>, new
- <xref target="SettingValues">settings</xref>, or new <xref target="ErrorCodes">error
- codes</xref>. Registries are established for managing these extension points: <xref
- target="iana-frames">frame types</xref>, <xref target="iana-settings">settings</xref> and
- <xref target="iana-errors">error codes</xref>.
- </t>
- <t>
- Implementations MUST ignore unknown or unsupported values in all extensible protocol
- elements. Implementations MUST discard frames that have unknown or unsupported types.
- This means that any of these extension points can be safely used by extensions without
- prior arrangement or negotiation. However, extension frames that appear in the middle of
- a <xref target="HeaderBlock">header block</xref> are not permitted; these MUST be treated
- as a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- However, extensions that could change the semantics of existing protocol components MUST
- be negotiated before being used. For example, an extension that changes the layout of the
- <x:ref>HEADERS</x:ref> frame cannot be used until the peer has given a positive signal
- that this is acceptable. In this case, it could also be necessary to coordinate when the
- revised layout comes into effect. Note that treating any frame other than
- <x:ref>DATA</x:ref> frames as flow controlled is such a change in semantics, and can only
- be done through negotiation.
- </t>
- <t>
- This document doesn't mandate a specific method for negotiating the use of an extension,
- but notes that a <xref target="SettingValues">setting</xref> could be used for that
- purpose. If both peers set a value that indicates willingness to use the extension, then
- the extension can be used. If a setting is used for extension negotiation, the initial
- value MUST be defined so that the extension is initially disabled.
- </t>
- </section>
- </section>
-
- <section anchor="FrameTypes" title="Frame Definitions">
- <t>
- This specification defines a number of frame types, each identified by a unique 8-bit type
- code. Each frame type serves a distinct purpose either in the establishment and management
- of the connection as a whole, or of individual streams.
- </t>
- <t>
- The transmission of specific frame types can alter the state of a connection. If endpoints
- fail to maintain a synchronized view of the connection state, successful communication
- within the connection will no longer be possible. Therefore, it is important that endpoints
- have a shared comprehension of how the state is affected by the use any given frame.
- </t>
-
- <section anchor="DATA" title="DATA">
- <t>
- DATA frames (type=0x0) convey arbitrary, variable-length sequences of octets associated
- with a stream. One or more DATA frames are used, for instance, to carry HTTP request or
- response payloads.
- </t>
- <t>
- DATA frames MAY also contain arbitrary padding. Padding can be added to DATA frames to
- obscure the size of messages.
- </t>
- <figure title="DATA Frame Payload">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |Pad Length? (8)|
- +---------------+-----------------------------------------------+
- | Data (*) ...
- +---------------------------------------------------------------+
- | Padding (*) ...
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The DATA frame contains the following fields:
- <list style="hanging">
- <t hangText="Pad Length:">
- An 8-bit field containing the length of the frame padding in units of octets. This
- field is optional and is only present if the PADDED flag is set.
- </t>
- <t hangText="Data:">
- Application data. The amount of data is the remainder of the frame payload after
- subtracting the length of the other fields that are present.
- </t>
- <t hangText="Padding:">
- Padding octets that contain no application semantic value. Padding octets MUST be set
- to zero when sending and ignored when receiving.
- </t>
- </list>
- </t>
-
- <t>
- The DATA frame defines the following flags:
- <list style="hanging">
- <t hangText="END_STREAM (0x1):">
- Bit 1 being set indicates that this frame is the last that the endpoint will send for
- the identified stream. Setting this flag causes the stream to enter one of <xref
- target="StreamStates">the "half closed" states or the "closed" state</xref>.
- </t>
- <t hangText="PADDED (0x8):">
- Bit 4 being set indicates that the Pad Length field and any padding that it describes
- is present.
- </t>
- </list>
- </t>
- <t>
- DATA frames MUST be associated with a stream. If a DATA frame is received whose stream
- identifier field is 0x0, the recipient MUST respond with a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- DATA frames are subject to flow control and can only be sent when a stream is in the
- "open" or "half closed (remote)" states. The entire DATA frame payload is included in flow
- control, including Pad Length and Padding fields if present. If a DATA frame is received
- whose stream is not in "open" or "half closed (local)" state, the recipient MUST respond
- with a <xref target="StreamErrorHandler">stream error</xref> of type
- <x:ref>STREAM_CLOSED</x:ref>.
- </t>
- <t>
- The total number of padding octets is determined by the value of the Pad Length field. If
- the length of the padding is greater than the length of the frame payload, the recipient
- MUST treat this as a <xref target="ConnectionErrorHandler">connection error</xref> of
- type <x:ref>PROTOCOL_ERROR</x:ref>.
- <list style="hanging">
- <t hangText="Note:">
- A frame can be increased in size by one octet by including a Pad Length field with a
- value of zero.
- </t>
- </list>
- </t>
- <t>
- Padding is a security feature; see <xref target="padding"/>.
- </t>
- </section>
-
- <section anchor="HEADERS" title="HEADERS">
- <t>
- The HEADERS frame (type=0x1) is used to <xref target="StreamStates">open a stream</xref>,
- and additionally carries a header block fragment. HEADERS frames can be sent on a stream
- in the "open" or "half closed (remote)" states.
- </t>
- <figure title="HEADERS Frame Payload">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |Pad Length? (8)|
- +-+-------------+-----------------------------------------------+
- |E| Stream Dependency? (31) |
- +-+-------------+-----------------------------------------------+
- | Weight? (8) |
- +-+-------------+-----------------------------------------------+
- | Header Block Fragment (*) ...
- +---------------------------------------------------------------+
- | Padding (*) ...
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The HEADERS frame payload has the following fields:
- <list style="hanging">
- <t hangText="Pad Length:">
- An 8-bit field containing the length of the frame padding in units of octets. This
- field is only present if the PADDED flag is set.
- </t>
- <t hangText="E:">
- A single bit flag indicates that the stream dependency is exclusive, see <xref
- target="StreamPriority"/>. This field is only present if the PRIORITY flag is set.
- </t>
- <t hangText="Stream Dependency:">
- A 31-bit stream identifier for the stream that this stream depends on, see <xref
- target="StreamPriority"/>. This field is only present if the PRIORITY flag is set.
- </t>
- <t hangText="Weight:">
- An 8-bit weight for the stream, see <xref target="StreamPriority"/>. Add one to the
- value to obtain a weight between 1 and 256. This field is only present if the
- PRIORITY flag is set.
- </t>
- <t hangText="Header Block Fragment:">
- A <xref target="HeaderBlock">header block fragment</xref>.
- </t>
- <t hangText="Padding:">
- Padding octets that contain no application semantic value. Padding octets MUST be set
- to zero when sending and ignored when receiving.
- </t>
- </list>
- </t>
-
- <t>
- The HEADERS frame defines the following flags:
- <list style="hanging">
- <x:lt hangText="END_STREAM (0x1):">
- <t>
- Bit 1 being set indicates that the <xref target="HeaderBlock">header block</xref> is
- the last that the endpoint will send for the identified stream. Setting this flag
- causes the stream to enter one of <xref target="StreamStates">"half closed"
- states</xref>.
- </t>
- <t>
- A HEADERS frame carries the END_STREAM flag that signals the end of a stream.
- However, a HEADERS frame with the END_STREAM flag set can be followed by
- <x:ref>CONTINUATION</x:ref> frames on the same stream. Logically, the
- <x:ref>CONTINUATION</x:ref> frames are part of the HEADERS frame.
- </t>
- </x:lt>
- <x:lt hangText="END_HEADERS (0x4):">
- <t>
- Bit 3 being set indicates that this frame contains an entire <xref
- target="HeaderBlock">header block</xref> and is not followed by any
- <x:ref>CONTINUATION</x:ref> frames.
- </t>
- <t>
- A HEADERS frame without the END_HEADERS flag set MUST be followed by a
- <x:ref>CONTINUATION</x:ref> frame for the same stream. A receiver MUST treat the
- receipt of any other type of frame or a frame on a different stream as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
- <x:lt hangText="PADDED (0x8):">
- <t>
- Bit 4 being set indicates that the Pad Length field and any padding that it
- describes is present.
- </t>
- </x:lt>
- <x:lt hangText="PRIORITY (0x20):">
- <t>
- Bit 6 being set indicates that the Exclusive Flag (E), Stream Dependency, and Weight
- fields are present; see <xref target="StreamPriority"/>.
- </t>
- </x:lt>
- </list>
- </t>
-
- <t>
- The payload of a HEADERS frame contains a <xref target="HeaderBlock">header block
- fragment</xref>. A header block that does not fit within a HEADERS frame is continued in
- a <xref target="CONTINUATION">CONTINUATION frame</xref>.
- </t>
-
- <t>
- HEADERS frames MUST be associated with a stream. If a HEADERS frame is received whose
- stream identifier field is 0x0, the recipient MUST respond with a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <t>
- The HEADERS frame changes the connection state as described in <xref
- target="HeaderBlock"/>.
- </t>
-
- <t>
- The HEADERS frame includes optional padding. Padding fields and flags are identical to
- those defined for <xref target="DATA">DATA frames</xref>.
- </t>
- <t>
- Prioritization information in a HEADERS frame is logically equivalent to a separate
- <x:ref>PRIORITY</x:ref> frame, but inclusion in HEADERS avoids the potential for churn in
- stream prioritization when new streams are created. Priorization fields in HEADERS frames
- subsequent to the first on a stream <xref target="reprioritize">reprioritize the
- stream</xref>.
- </t>
- </section>
-
- <section anchor="PRIORITY" title="PRIORITY">
- <t>
- The PRIORITY frame (type=0x2) specifies the <xref target="StreamPriority">sender-advised
- priority of a stream</xref>. It can be sent at any time for an existing stream, including
- closed streams. This enables reprioritization of existing streams.
- </t>
- <figure title="PRIORITY Frame Payload">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |E| Stream Dependency (31) |
- +-+-------------+-----------------------------------------------+
- | Weight (8) |
- +-+-------------+
-]]></artwork>
- </figure>
- <t>
- The payload of a PRIORITY frame contains the following fields:
- <list style="hanging">
- <t hangText="E:">
- A single bit flag indicates that the stream dependency is exclusive, see <xref
- target="StreamPriority"/>.
- </t>
- <t hangText="Stream Dependency:">
- A 31-bit stream identifier for the stream that this stream depends on, see <xref
- target="StreamPriority"/>.
- </t>
- <t hangText="Weight:">
- An 8-bit weight for the identified stream dependency, see <xref
- target="StreamPriority"/>. Add one to the value to obtain a weight between 1 and 256.
- </t>
- </list>
- </t>
-
- <t>
- The PRIORITY frame does not define any flags.
- </t>
-
- <t>
- The PRIORITY frame is associated with an existing stream. If a PRIORITY frame is received
- with a stream identifier of 0x0, the recipient MUST respond with a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- The PRIORITY frame can be sent on a stream in any of the "reserved (remote)", "open",
- "half closed (local)", "half closed (remote)", or "closed" states, though it cannot be
- sent between consecutive frames that comprise a single <xref target="HeaderBlock">header
- block</xref>. Note that this frame could arrive after processing or frame sending has
- completed, which would cause it to have no effect on the current stream. For a stream
- that is in the "half closed (remote)" or "closed" - state, this frame can only affect
- processing of the current stream and not frame transmission.
- </t>
- <t>
- The PRIORITY frame is the only frame that can be sent for a stream in the "closed" state.
- This allows for the reprioritization of a group of dependent streams by altering the
- priority of a parent stream, which might be closed. However, a PRIORITY frame sent on a
- closed stream risks being ignored due to the peer having discarded priority state
- information for that stream.
- </t>
- </section>
-
- <section anchor="RST_STREAM" title="RST_STREAM">
- <t>
- The RST_STREAM frame (type=0x3) allows for abnormal termination of a stream. When sent by
- the initiator of a stream, it indicates that they wish to cancel the stream or that an
- error condition has occurred. When sent by the receiver of a stream, it indicates that
- either the receiver is rejecting the stream, requesting that the stream be cancelled, or
- that an error condition has occurred.
- </t>
- <figure title="RST_STREAM Frame Payload">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Error Code (32) |
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
-
- <t>
- The RST_STREAM frame contains a single unsigned, 32-bit integer identifying the <xref
- target="ErrorCodes">error code</xref>. The error code indicates why the stream is being
- terminated.
- </t>
-
- <t>
- The RST_STREAM frame does not define any flags.
- </t>
-
- <t>
- The RST_STREAM frame fully terminates the referenced stream and causes it to enter the
- closed state. After receiving a RST_STREAM on a stream, the receiver MUST NOT send
- additional frames for that stream, with the exception of <x:ref>PRIORITY</x:ref>. However,
- after sending the RST_STREAM, the sending endpoint MUST be prepared to receive and process
- additional frames sent on the stream that might have been sent by the peer prior to the
- arrival of the RST_STREAM.
- </t>
-
- <t>
- RST_STREAM frames MUST be associated with a stream. If a RST_STREAM frame is received
- with a stream identifier of 0x0, the recipient MUST treat this as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <t>
- RST_STREAM frames MUST NOT be sent for a stream in the "idle" state. If a RST_STREAM
- frame identifying an idle stream is received, the recipient MUST treat this as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- </section>
-
- <section anchor="SETTINGS" title="SETTINGS">
- <t>
- The SETTINGS frame (type=0x4) conveys configuration parameters that affect how endpoints
- communicate, such as preferences and constraints on peer behavior. The SETTINGS frame is
- also used to acknowledge the receipt of those parameters. Individually, a SETTINGS
- parameter can also be referred to as a "setting".
- </t>
- <t>
- SETTINGS parameters are not negotiated; they describe characteristics of the sending peer,
- which are used by the receiving peer. Different values for the same parameter can be
- advertised by each peer. For example, a client might set a high initial flow control
- window, whereas a server might set a lower value to conserve resources.
- </t>
-
- <t>
- A SETTINGS frame MUST be sent by both endpoints at the start of a connection, and MAY be
- sent at any other time by either endpoint over the lifetime of the connection.
- Implementations MUST support all of the parameters defined by this specification.
- </t>
-
- <t>
- Each parameter in a SETTINGS frame replaces any existing value for that parameter.
- Parameters are processed in the order in which they appear, and a receiver of a SETTINGS
- frame does not need to maintain any state other than the current value of its
- parameters. Therefore, the value of a SETTINGS parameter is the last value that is seen by
- a receiver.
- </t>
- <t>
- SETTINGS parameters are acknowledged by the receiving peer. To enable this, the SETTINGS
- frame defines the following flag:
- <list style="hanging">
- <t hangText="ACK (0x1):">
- Bit 1 being set indicates that this frame acknowledges receipt and application of the
- peer's SETTINGS frame. When this bit is set, the payload of the SETTINGS frame MUST
- be empty. Receipt of a SETTINGS frame with the ACK flag set and a length field value
- other than 0 MUST be treated as a <xref target="ConnectionErrorHandler">connection
- error</xref> of type <x:ref>FRAME_SIZE_ERROR</x:ref>. For more info, see <xref
- target="SettingsSync">Settings Synchronization</xref>.
- </t>
- </list>
- </t>
- <t>
- SETTINGS frames always apply to a connection, never a single stream. The stream
- identifier for a SETTINGS frame MUST be zero (0x0). If an endpoint receives a SETTINGS
- frame whose stream identifier field is anything other than 0x0, the endpoint MUST respond
- with a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- The SETTINGS frame affects connection state. A badly formed or incomplete SETTINGS frame
- MUST be treated as a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <section title="SETTINGS Format" anchor="SettingFormat">
- <t>
- The payload of a SETTINGS frame consists of zero or more parameters, each consisting of
- an unsigned 16-bit setting identifier and an unsigned 32-bit value.
- </t>
-
- <figure title="Setting Format">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Identifier (16) |
- +-------------------------------+-------------------------------+
- | Value (32) |
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- </section>
-
- <section anchor="SettingValues" title="Defined SETTINGS Parameters">
- <t>
- The following parameters are defined:
- <list style="hanging">
- <x:lt hangText="SETTINGS_HEADER_TABLE_SIZE (0x1):"
- anchor="SETTINGS_HEADER_TABLE_SIZE">
- <t>
- Allows the sender to inform the remote endpoint of the maximum size of the header
- compression table used to decode header blocks, in octets. The encoder can select
- any size equal to or less than this value by using signaling specific to the
- header compression format inside a header block. The initial value is 4,096
- octets.
- </t>
- </x:lt>
- <x:lt hangText="SETTINGS_ENABLE_PUSH (0x2):"
- anchor="SETTINGS_ENABLE_PUSH">
- <t>
- This setting can be use to disable <xref target="PushResources">server
- push</xref>. An endpoint MUST NOT send a <x:ref>PUSH_PROMISE</x:ref> frame if it
- receives this parameter set to a value of 0. An endpoint that has both set this
- parameter to 0 and had it acknowledged MUST treat the receipt of a
- <x:ref>PUSH_PROMISE</x:ref> frame as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- The initial value is 1, which indicates that server push is permitted. Any value
- other than 0 or 1 MUST be treated as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
- <x:lt hangText="SETTINGS_MAX_CONCURRENT_STREAMS (0x3):"
- anchor="SETTINGS_MAX_CONCURRENT_STREAMS">
- <t>
- Indicates the maximum number of concurrent streams that the sender will allow.
- This limit is directional: it applies to the number of streams that the sender
- permits the receiver to create. Initially there is no limit to this value. It is
- recommended that this value be no smaller than 100, so as to not unnecessarily
- limit parallelism.
- </t>
- <t>
- A value of 0 for SETTINGS_MAX_CONCURRENT_STREAMS SHOULD NOT be treated as special
- by endpoints. A zero value does prevent the creation of new streams, however this
- can also happen for any limit that is exhausted with active streams. Servers
- SHOULD only set a zero value for short durations; if a server does not wish to
- accept requests, closing the connection could be preferable.
- </t>
- </x:lt>
- <x:lt hangText="SETTINGS_INITIAL_WINDOW_SIZE (0x4):"
- anchor="SETTINGS_INITIAL_WINDOW_SIZE">
- <t>
- Indicates the sender's initial window size (in octets) for stream level flow
- control. The initial value is 2<x:sup>16</x:sup>-1 (65,535) octets.
- </t>
- <t>
- This setting affects the window size of all streams, including existing streams,
- see <xref target="InitialWindowSize"/>.
- </t>
- <t>
- Values above the maximum flow control window size of 2<x:sup>31</x:sup>-1 MUST
- be treated as a <xref target="ConnectionErrorHandler">connection error</xref> of
- type <x:ref>FLOW_CONTROL_ERROR</x:ref>.
- </t>
- </x:lt>
- <x:lt hangText="SETTINGS_MAX_FRAME_SIZE (0x5):"
- anchor="SETTINGS_MAX_FRAME_SIZE">
- <t>
- Indicates the size of the largest frame payload that the sender is willing to
- receive, in octets.
- </t>
- <t>
- The initial value is 2<x:sup>14</x:sup> (16,384) octets. The value advertised by
- an endpoint MUST be between this initial value and the maximum allowed frame size
- (2<x:sup>24</x:sup>-1 or 16,777,215 octets), inclusive. Values outside this range
- MUST be treated as a <xref target="ConnectionErrorHandler">connection error</xref>
- of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
- <x:lt hangText="SETTINGS_MAX_HEADER_LIST_SIZE (0x6):"
- anchor="SETTINGS_MAX_HEADER_LIST_SIZE">
- <t>
- This advisory setting informs a peer of the maximum size of header list that the
- sender is prepared to accept, in octets. The value is based on the uncompressed
- size of header fields, including the length of the name and value in octets plus
- an overhead of 32 octets for each header field.
- </t>
- <t>
- For any given request, a lower limit than what is advertised MAY be enforced. The
- initial value of this setting is unlimited.
- </t>
- </x:lt>
- </list>
- </t>
- <t>
- An endpoint that receives a SETTINGS frame with any unknown or unsupported identifier
- MUST ignore that setting.
- </t>
- </section>
-
- <section anchor="SettingsSync" title="Settings Synchronization">
- <t>
- Most values in SETTINGS benefit from or require an understanding of when the peer has
- received and applied the changed parameter values. In order to provide
- such synchronization timepoints, the recipient of a SETTINGS frame in which the ACK flag
- is not set MUST apply the updated parameters as soon as possible upon receipt.
- </t>
- <t>
- The values in the SETTINGS frame MUST be processed in the order they appear, with no
- other frame processing between values. Unsupported parameters MUST be ignored. Once
- all values have been processed, the recipient MUST immediately emit a SETTINGS frame
- with the ACK flag set. Upon receiving a SETTINGS frame with the ACK flag set, the sender
- of the altered parameters can rely on the setting having been applied.
- </t>
- <t>
- If the sender of a SETTINGS frame does not receive an acknowledgement within a
- reasonable amount of time, it MAY issue a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>SETTINGS_TIMEOUT</x:ref>.
- </t>
- </section>
- </section>
-
- <section anchor="PUSH_PROMISE" title="PUSH_PROMISE">
- <t>
- The PUSH_PROMISE frame (type=0x5) is used to notify the peer endpoint in advance of
- streams the sender intends to initiate. The PUSH_PROMISE frame includes the unsigned
- 31-bit identifier of the stream the endpoint plans to create along with a set of headers
- that provide additional context for the stream. <xref target="PushResources"/> contains a
- thorough description of the use of PUSH_PROMISE frames.
- </t>
-
- <figure title="PUSH_PROMISE Payload Format">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |Pad Length? (8)|
- +-+-------------+-----------------------------------------------+
- |R| Promised Stream ID (31) |
- +-+-----------------------------+-------------------------------+
- | Header Block Fragment (*) ...
- +---------------------------------------------------------------+
- | Padding (*) ...
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The PUSH_PROMISE frame payload has the following fields:
- <list style="hanging">
- <t hangText="Pad Length:">
- An 8-bit field containing the length of the frame padding in units of octets. This
- field is only present if the PADDED flag is set.
- </t>
- <t hangText="R:">
- A single reserved bit.
- </t>
- <t hangText="Promised Stream ID:">
- An unsigned 31-bit integer that identifies the stream that is reserved by the
- PUSH_PROMISE. The promised stream identifier MUST be a valid choice for the next
- stream sent by the sender (see <xref target="StreamIdentifiers">new stream
- identifier</xref>).
- </t>
- <t hangText="Header Block Fragment:">
- A <xref target="HeaderBlock">header block fragment</xref> containing request header
- fields.
- </t>
- <t hangText="Padding:">
- Padding octets.
- </t>
- </list>
- </t>
-
- <t>
- The PUSH_PROMISE frame defines the following flags:
- <list style="hanging">
- <x:lt hangText="END_HEADERS (0x4):">
- <t>
- Bit 3 being set indicates that this frame contains an entire <xref
- target="HeaderBlock">header block</xref> and is not followed by any
- <x:ref>CONTINUATION</x:ref> frames.
- </t>
- <t>
- A PUSH_PROMISE frame without the END_HEADERS flag set MUST be followed by a
- CONTINUATION frame for the same stream. A receiver MUST treat the receipt of any
- other type of frame or a frame on a different stream as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
- <x:lt hangText="PADDED (0x8):">
- <t>
- Bit 4 being set indicates that the Pad Length field and any padding that it
- describes is present.
- </t>
- </x:lt>
- </list>
- </t>
-
- <t>
- PUSH_PROMISE frames MUST be associated with an existing, peer-initiated stream. The stream
- identifier of a PUSH_PROMISE frame indicates the stream it is associated with. If the
- stream identifier field specifies the value 0x0, a recipient MUST respond with a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <t>
- Promised streams are not required to be used in the order they are promised. The
- PUSH_PROMISE only reserves stream identifiers for later use.
- </t>
-
- <t>
- PUSH_PROMISE MUST NOT be sent if the <x:ref>SETTINGS_ENABLE_PUSH</x:ref> setting of the
- peer endpoint is set to 0. An endpoint that has set this setting and has received
- acknowledgement MUST treat the receipt of a PUSH_PROMISE frame as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- Recipients of PUSH_PROMISE frames can choose to reject promised streams by returning a
- <x:ref>RST_STREAM</x:ref> referencing the promised stream identifier back to the sender of
- the PUSH_PROMISE.
- </t>
-
- <t>
- A PUSH_PROMISE frame modifies the connection state in two ways. The inclusion of a <xref
- target="HeaderBlock">header block</xref> potentially modifies the state maintained for
- header compression. PUSH_PROMISE also reserves a stream for later use, causing the
- promised stream to enter the "reserved" state. A sender MUST NOT send a PUSH_PROMISE on a
- stream unless that stream is either "open" or "half closed (remote)"; the sender MUST
- ensure that the promised stream is a valid choice for a <xref
- target="StreamIdentifiers">new stream identifier</xref> (that is, the promised stream MUST
- be in the "idle" state).
- </t>
- <t>
- Since PUSH_PROMISE reserves a stream, ignoring a PUSH_PROMISE frame causes the stream
- state to become indeterminate. A receiver MUST treat the receipt of a PUSH_PROMISE on a
- stream that is neither "open" nor "half closed (local)" as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>. However, an endpoint that has sent
- <x:ref>RST_STREAM</x:ref> on the associated stream MUST handle PUSH_PROMISE frames that
- might have been created before the <x:ref>RST_STREAM</x:ref> frame is received and
- processed.
- </t>
- <t>
- A receiver MUST treat the receipt of a PUSH_PROMISE that promises an <xref
- target="StreamIdentifiers">illegal stream identifier</xref> (that is, an identifier for a
- stream that is not currently in the "idle" state) as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <t>
- The PUSH_PROMISE frame includes optional padding. Padding fields and flags are identical
- to those defined for <xref target="DATA">DATA frames</xref>.
- </t>
- </section>
-
- <section anchor="PING" title="PING">
- <t>
- The PING frame (type=0x6) is a mechanism for measuring a minimal round trip time from the
- sender, as well as determining whether an idle connection is still functional. PING
- frames can be sent from any endpoint.
- </t>
- <figure title="PING Payload Format">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- | Opaque Data (64) |
- | |
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
-
- <t>
- In addition to the frame header, PING frames MUST contain 8 octets of data in the payload.
- A sender can include any value it chooses and use those bytes in any fashion.
- </t>
- <t>
- Receivers of a PING frame that does not include an ACK flag MUST send a PING frame with
- the ACK flag set in response, with an identical payload. PING responses SHOULD be given
- higher priority than any other frame.
- </t>
-
- <t>
- The PING frame defines the following flags:
- <list style="hanging">
- <t hangText="ACK (0x1):">
- Bit 1 being set indicates that this PING frame is a PING response. An endpoint MUST
- set this flag in PING responses. An endpoint MUST NOT respond to PING frames
- containing this flag.
- </t>
- </list>
- </t>
- <t>
- PING frames are not associated with any individual stream. If a PING frame is received
- with a stream identifier field value other than 0x0, the recipient MUST respond with a
- <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- Receipt of a PING frame with a length field value other than 8 MUST be treated as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>FRAME_SIZE_ERROR</x:ref>.
- </t>
-
- </section>
-
- <section anchor="GOAWAY" title="GOAWAY">
- <t>
- The GOAWAY frame (type=0x7) informs the remote peer to stop creating streams on this
- connection. GOAWAY can be sent by either the client or the server. Once sent, the sender
- will ignore frames sent on any new streams with identifiers higher than the included last
- stream identifier. Receivers of a GOAWAY frame MUST NOT open additional streams on the
- connection, although a new connection can be established for new streams.
- </t>
- <t>
- The purpose of this frame is to allow an endpoint to gracefully stop accepting new
- streams, while still finishing processing of previously established streams. This enables
- administrative actions, like server maintainance.
- </t>
- <t>
- There is an inherent race condition between an endpoint starting new streams and the
- remote sending a GOAWAY frame. To deal with this case, the GOAWAY contains the stream
- identifier of the last peer-initiated stream which was or might be processed on the
- sending endpoint in this connection. For instance, if the server sends a GOAWAY frame,
- the identified stream is the highest numbered stream initiated by the client.
- </t>
- <t>
- If the receiver of the GOAWAY has sent data on streams with a higher stream identifier
- than what is indicated in the GOAWAY frame, those streams are not or will not be
- processed. The receiver of the GOAWAY frame can treat the streams as though they had
- never been created at all, thereby allowing those streams to be retried later on a new
- connection.
- </t>
- <t>
- Endpoints SHOULD always send a GOAWAY frame before closing a connection so that the remote
- can know whether a stream has been partially processed or not. For example, if an HTTP
- client sends a POST at the same time that a server closes a connection, the client cannot
- know if the server started to process that POST request if the server does not send a
- GOAWAY frame to indicate what streams it might have acted on.
- </t>
- <t>
- An endpoint might choose to close a connection without sending GOAWAY for misbehaving
- peers.
- </t>
-
- <figure title="GOAWAY Payload Format">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |R| Last-Stream-ID (31) |
- +-+-------------------------------------------------------------+
- | Error Code (32) |
- +---------------------------------------------------------------+
- | Additional Debug Data (*) |
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The GOAWAY frame does not define any flags.
- </t>
- <t>
- The GOAWAY frame applies to the connection, not a specific stream. An endpoint MUST treat
- a <x:ref>GOAWAY</x:ref> frame with a stream identifier other than 0x0 as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- The last stream identifier in the GOAWAY frame contains the highest numbered stream
- identifier for which the sender of the GOAWAY frame might have taken some action on, or
- might yet take action on. All streams up to and including the identified stream might
- have been processed in some way. The last stream identifier can be set to 0 if no streams
- were processed.
- <list style="hanging">
- <t hangText="Note:">
- In this context, "processed" means that some data from the stream was passed to some
- higher layer of software that might have taken some action as a result.
- </t>
- </list>
- If a connection terminates without a GOAWAY frame, the last stream identifier is
- effectively the highest possible stream identifier.
- </t>
- <t>
- On streams with lower or equal numbered identifiers that were not closed completely prior
- to the connection being closed, re-attempting requests, transactions, or any protocol
- activity is not possible, with the exception of idempotent actions like HTTP GET, PUT, or
- DELETE. Any protocol activity that uses higher numbered streams can be safely retried
- using a new connection.
- </t>
- <t>
- Activity on streams numbered lower or equal to the last stream identifier might still
- complete successfully. The sender of a GOAWAY frame might gracefully shut down a
- connection by sending a GOAWAY frame, maintaining the connection in an open state until
- all in-progress streams complete.
- </t>
- <t>
- An endpoint MAY send multiple GOAWAY frames if circumstances change. For instance, an
- endpoint that sends GOAWAY with <x:ref>NO_ERROR</x:ref> during graceful shutdown could
- subsequently encounter an condition that requires immediate termination of the connection.
- The last stream identifier from the last GOAWAY frame received indicates which streams
- could have been acted upon. Endpoints MUST NOT increase the value they send in the last
- stream identifier, since the peers might already have retried unprocessed requests on
- another connection.
- </t>
- <t>
- A client that is unable to retry requests loses all requests that are in flight when the
- server closes the connection. This is especially true for intermediaries that might
- not be serving clients using HTTP/2. A server that is attempting to gracefully shut down
- a connection SHOULD send an initial GOAWAY frame with the last stream identifier set to
- 2<x:sup>31</x:sup>-1 and a <x:ref>NO_ERROR</x:ref> code. This signals to the client that
- a shutdown is imminent and that no further requests can be initiated. After waiting at
- least one round trip time, the server can send another GOAWAY frame with an updated last
- stream identifier. This ensures that a connection can be cleanly shut down without losing
- requests.
- </t>
-
- <t>
- After sending a GOAWAY frame, the sender can discard frames for streams with identifiers
- higher than the identified last stream. However, any frames that alter connection state
- cannot be completely ignored. For instance, <x:ref>HEADERS</x:ref>,
- <x:ref>PUSH_PROMISE</x:ref> and <x:ref>CONTINUATION</x:ref> frames MUST be minimally
- processed to ensure the state maintained for header compression is consistent (see <xref
- target="HeaderBlock"/>); similarly DATA frames MUST be counted toward the connection flow
- control window. Failure to process these frames can cause flow control or header
- compression state to become unsynchronized.
- </t>
-
- <t>
- The GOAWAY frame also contains a 32-bit <xref target="ErrorCodes">error code</xref> that
- contains the reason for closing the connection.
- </t>
- <t>
- Endpoints MAY append opaque data to the payload of any GOAWAY frame. Additional debug
- data is intended for diagnostic purposes only and carries no semantic value. Debug
- information could contain security- or privacy-sensitive data. Logged or otherwise
- persistently stored debug data MUST have adequate safeguards to prevent unauthorized
- access.
- </t>
- </section>
-
- <section anchor="WINDOW_UPDATE" title="WINDOW_UPDATE">
- <t>
- The WINDOW_UPDATE frame (type=0x8) is used to implement flow control; see <xref
- target="FlowControl"/> for an overview.
- </t>
- <t>
- Flow control operates at two levels: on each individual stream and on the entire
- connection.
- </t>
- <t>
- Both types of flow control are hop-by-hop; that is, only between the two endpoints.
- Intermediaries do not forward WINDOW_UPDATE frames between dependent connections.
- However, throttling of data transfer by any receiver can indirectly cause the propagation
- of flow control information toward the original sender.
- </t>
- <t>
- Flow control only applies to frames that are identified as being subject to flow control.
- Of the frame types defined in this document, this includes only <x:ref>DATA</x:ref> frames.
- Frames that are exempt from flow control MUST be accepted and processed, unless the
- receiver is unable to assign resources to handling the frame. A receiver MAY respond with
- a <xref target="StreamErrorHandler">stream error</xref> or <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>FLOW_CONTROL_ERROR</x:ref> if it is unable to accept a frame.
- </t>
- <figure title="WINDOW_UPDATE Payload Format">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |R| Window Size Increment (31) |
- +-+-------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The payload of a WINDOW_UPDATE frame is one reserved bit, plus an unsigned 31-bit integer
- indicating the number of octets that the sender can transmit in addition to the existing
- flow control window. The legal range for the increment to the flow control window is 1 to
- 2<x:sup>31</x:sup>-1 (0x7fffffff) octets.
- </t>
- <t>
- The WINDOW_UPDATE frame does not define any flags.
- </t>
- <t>
- The WINDOW_UPDATE frame can be specific to a stream or to the entire connection. In the
- former case, the frame's stream identifier indicates the affected stream; in the latter,
- the value "0" indicates that the entire connection is the subject of the frame.
- </t>
- <t>
- A receiver MUST treat the receipt of a WINDOW_UPDATE frame with an flow control window
- increment of 0 as a <xref target="StreamErrorHandler">stream error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>; errors on the connection flow control window MUST be
- treated as a <xref target="ConnectionErrorHandler">connection error</xref>.
- </t>
- <t>
- WINDOW_UPDATE can be sent by a peer that has sent a frame bearing the END_STREAM flag.
- This means that a receiver could receive a WINDOW_UPDATE frame on a "half closed (remote)"
- or "closed" stream. A receiver MUST NOT treat this as an error, see <xref
- target="StreamStates"/>.
- </t>
- <t>
- A receiver that receives a flow controlled frame MUST always account for its contribution
- against the connection flow control window, unless the receiver treats this as a <xref
- target="ConnectionErrorHandler">connection error</xref>. This is necessary even if the
- frame is in error. Since the sender counts the frame toward the flow control window, if
- the receiver does not, the flow control window at sender and receiver can become
- different.
- </t>
-
- <section title="The Flow Control Window">
- <t>
- Flow control in HTTP/2 is implemented using a window kept by each sender on every
- stream. The flow control window is a simple integer value that indicates how many octets
- of data the sender is permitted to transmit; as such, its size is a measure of the
- buffering capacity of the receiver.
- </t>
- <t>
- Two flow control windows are applicable: the stream flow control window and the
- connection flow control window. The sender MUST NOT send a flow controlled frame with a
- length that exceeds the space available in either of the flow control windows advertised
- by the receiver. Frames with zero length with the END_STREAM flag set (that is, an
- empty <x:ref>DATA</x:ref> frame) MAY be sent if there is no available space in either
- flow control window.
- </t>
- <t>
- For flow control calculations, the 9 octet frame header is not counted.
- </t>
- <t>
- After sending a flow controlled frame, the sender reduces the space available in both
- windows by the length of the transmitted frame.
- </t>
- <t>
- The receiver of a frame sends a WINDOW_UPDATE frame as it consumes data and frees up
- space in flow control windows. Separate WINDOW_UPDATE frames are sent for the stream
- and connection level flow control windows.
- </t>
- <t>
- A sender that receives a WINDOW_UPDATE frame updates the corresponding window by the
- amount specified in the frame.
- </t>
- <t>
- A sender MUST NOT allow a flow control window to exceed 2<x:sup>31</x:sup>-1 octets.
- If a sender receives a WINDOW_UPDATE that causes a flow control window to exceed this
- maximum it MUST terminate either the stream or the connection, as appropriate. For
- streams, the sender sends a <x:ref>RST_STREAM</x:ref> with the error code of
- <x:ref>FLOW_CONTROL_ERROR</x:ref> code; for the connection, a <x:ref>GOAWAY</x:ref>
- frame with a <x:ref>FLOW_CONTROL_ERROR</x:ref> code.
- </t>
- <t>
- Flow controlled frames from the sender and WINDOW_UPDATE frames from the receiver are
- completely asynchronous with respect to each other. This property allows a receiver to
- aggressively update the window size kept by the sender to prevent streams from stalling.
- </t>
- </section>
-
- <section anchor="InitialWindowSize" title="Initial Flow Control Window Size">
- <t>
- When an HTTP/2 connection is first established, new streams are created with an initial
- flow control window size of 65,535 octets. The connection flow control window is 65,535
- octets. Both endpoints can adjust the initial window size for new streams by including
- a value for <x:ref>SETTINGS_INITIAL_WINDOW_SIZE</x:ref> in the <x:ref>SETTINGS</x:ref>
- frame that forms part of the connection preface. The connection flow control window can
- only be changed using WINDOW_UPDATE frames.
- </t>
- <t>
- Prior to receiving a <x:ref>SETTINGS</x:ref> frame that sets a value for
- <x:ref>SETTINGS_INITIAL_WINDOW_SIZE</x:ref>, an endpoint can only use the default
- initial window size when sending flow controlled frames. Similarly, the connection flow
- control window is set to the default initial window size until a WINDOW_UPDATE frame is
- received.
- </t>
- <t>
- A <x:ref>SETTINGS</x:ref> frame can alter the initial flow control window size for all
- current streams. When the value of <x:ref>SETTINGS_INITIAL_WINDOW_SIZE</x:ref> changes,
- a receiver MUST adjust the size of all stream flow control windows that it maintains by
- the difference between the new value and the old value.
- </t>
- <t>
- A change to <x:ref>SETTINGS_INITIAL_WINDOW_SIZE</x:ref> can cause the available space in
- a flow control window to become negative. A sender MUST track the negative flow control
- window, and MUST NOT send new flow controlled frames until it receives WINDOW_UPDATE
- frames that cause the flow control window to become positive.
- </t>
- <t>
- For example, if the client sends 60KB immediately on connection establishment, and the
- server sets the initial window size to be 16KB, the client will recalculate the
- available flow control window to be -44KB on receipt of the <x:ref>SETTINGS</x:ref>
- frame. The client retains a negative flow control window until WINDOW_UPDATE frames
- restore the window to being positive, after which the client can resume sending.
- </t>
- <t>
- A <x:ref>SETTINGS</x:ref> frame cannot alter the connection flow control window.
- </t>
- <t>
- An endpoint MUST treat a change to <x:ref>SETTINGS_INITIAL_WINDOW_SIZE</x:ref> that
- causes any flow control window to exceed the maximum size as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>FLOW_CONTROL_ERROR</x:ref>.
- </t>
- </section>
-
- <section title="Reducing the Stream Window Size">
- <t>
- A receiver that wishes to use a smaller flow control window than the current size can
- send a new <x:ref>SETTINGS</x:ref> frame. However, the receiver MUST be prepared to
- receive data that exceeds this window size, since the sender might send data that
- exceeds the lower limit prior to processing the <x:ref>SETTINGS</x:ref> frame.
- </t>
- <t>
- After sending a SETTINGS frame that reduces the initial flow control window size, a
- receiver has two options for handling streams that exceed flow control limits:
- <list style="numbers">
- <t>
- The receiver can immediately send <x:ref>RST_STREAM</x:ref> with
- <x:ref>FLOW_CONTROL_ERROR</x:ref> error code for the affected streams.
- </t>
- <t>
- The receiver can accept the streams and tolerate the resulting head of line
- blocking, sending WINDOW_UPDATE frames as it consumes data.
- </t>
- </list>
- </t>
- </section>
- </section>
-
- <section anchor="CONTINUATION" title="CONTINUATION">
- <t>
- The CONTINUATION frame (type=0x9) is used to continue a sequence of <xref
- target="HeaderBlock">header block fragments</xref>. Any number of CONTINUATION frames can
- be sent on an existing stream, as long as the preceding frame is on the same stream and is
- a <x:ref>HEADERS</x:ref>, <x:ref>PUSH_PROMISE</x:ref> or CONTINUATION frame without the
- END_HEADERS flag set.
- </t>
-
- <figure title="CONTINUATION Frame Payload">
- <artwork type="inline"><![CDATA[
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Header Block Fragment (*) ...
- +---------------------------------------------------------------+
-]]></artwork>
- </figure>
- <t>
- The CONTINUATION frame payload contains a <xref target="HeaderBlock">header block
- fragment</xref>.
- </t>
-
- <t>
- The CONTINUATION frame defines the following flag:
- <list style="hanging">
- <x:lt hangText="END_HEADERS (0x4):">
- <t>
- Bit 3 being set indicates that this frame ends a <xref target="HeaderBlock">header
- block</xref>.
- </t>
- <t>
- If the END_HEADERS bit is not set, this frame MUST be followed by another
- CONTINUATION frame. A receiver MUST treat the receipt of any other type of frame or
- a frame on a different stream as a <xref target="ConnectionErrorHandler">connection
- error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </x:lt>
- </list>
- </t>
-
- <t>
- The CONTINUATION frame changes the connection state as defined in <xref
- target="HeaderBlock" />.
- </t>
-
- <t>
- CONTINUATION frames MUST be associated with a stream. If a CONTINUATION frame is received
- whose stream identifier field is 0x0, the recipient MUST respond with a <xref
- target="ConnectionErrorHandler">connection error</xref> of type PROTOCOL_ERROR.
- </t>
-
- <t>
- A CONTINUATION frame MUST be preceded by a <x:ref>HEADERS</x:ref>,
- <x:ref>PUSH_PROMISE</x:ref> or CONTINUATION frame without the END_HEADERS flag set. A
- recipient that observes violation of this rule MUST respond with a <xref
- target="ConnectionErrorHandler"> connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- </section>
- </section>
-
- <section anchor="ErrorCodes" title="Error Codes">
- <t>
- Error codes are 32-bit fields that are used in <x:ref>RST_STREAM</x:ref> and
- <x:ref>GOAWAY</x:ref> frames to convey the reasons for the stream or connection error.
- </t>
-
- <t>
- Error codes share a common code space. Some error codes apply only to either streams or the
- entire connection and have no defined semantics in the other context.
- </t>
-
- <t>
- The following error codes are defined:
- <list style="hanging">
- <t hangText="NO_ERROR (0x0):" anchor="NO_ERROR">
- The associated condition is not as a result of an error. For example, a
- <x:ref>GOAWAY</x:ref> might include this code to indicate graceful shutdown of a
- connection.
- </t>
- <t hangText="PROTOCOL_ERROR (0x1):" anchor="PROTOCOL_ERROR">
- The endpoint detected an unspecific protocol error. This error is for use when a more
- specific error code is not available.
- </t>
- <t hangText="INTERNAL_ERROR (0x2):" anchor="INTERNAL_ERROR">
- The endpoint encountered an unexpected internal error.
- </t>
- <t hangText="FLOW_CONTROL_ERROR (0x3):" anchor="FLOW_CONTROL_ERROR">
- The endpoint detected that its peer violated the flow control protocol.
- </t>
- <t hangText="SETTINGS_TIMEOUT (0x4):" anchor="SETTINGS_TIMEOUT">
- The endpoint sent a <x:ref>SETTINGS</x:ref> frame, but did not receive a response in a
- timely manner. See <xref target="SettingsSync">Settings Synchronization</xref>.
- </t>
- <t hangText="STREAM_CLOSED (0x5):" anchor="STREAM_CLOSED">
- The endpoint received a frame after a stream was half closed.
- </t>
- <t hangText="FRAME_SIZE_ERROR (0x6):" anchor="FRAME_SIZE_ERROR">
- The endpoint received a frame with an invalid size.
- </t>
- <t hangText="REFUSED_STREAM (0x7):" anchor="REFUSED_STREAM">
- The endpoint refuses the stream prior to performing any application processing, see
- <xref target="Reliability"/> for details.
- </t>
- <t hangText="CANCEL (0x8):" anchor="CANCEL">
- Used by the endpoint to indicate that the stream is no longer needed.
- </t>
- <t hangText="COMPRESSION_ERROR (0x9):" anchor="COMPRESSION_ERROR">
- The endpoint is unable to maintain the header compression context for the connection.
- </t>
- <t hangText="CONNECT_ERROR (0xa):" anchor="CONNECT_ERROR">
- The connection established in response to a <xref target="CONNECT">CONNECT
- request</xref> was reset or abnormally closed.
- </t>
- <t hangText="ENHANCE_YOUR_CALM (0xb):" anchor="ENHANCE_YOUR_CALM">
- The endpoint detected that its peer is exhibiting a behavior that might be generating
- excessive load.
- </t>
- <t hangText="INADEQUATE_SECURITY (0xc):" anchor="INADEQUATE_SECURITY">
- The underlying transport has properties that do not meet minimum security
- requirements (see <xref target="TLSUsage"/>).
- </t>
- </list>
- </t>
- <t>
- Unknown or unsupported error codes MUST NOT trigger any special behavior. These MAY be
- treated by an implementation as being equivalent to <x:ref>INTERNAL_ERROR</x:ref>.
- </t>
- </section>
-
- <section anchor="HTTPLayer" title="HTTP Message Exchanges">
- <t>
- HTTP/2 is intended to be as compatible as possible with current uses of HTTP. This means
- that, from the application perspective, the features of the protocol are largely
- unchanged. To achieve this, all request and response semantics are preserved, although the
- syntax of conveying those semantics has changed.
- </t>
- <t>
- Thus, the specification and requirements of HTTP/1.1 Semantics and Content <xref
- target="RFC7231"/>, Conditional Requests <xref target="RFC7232"/>, Range Requests <xref
- target="RFC7233"/>, Caching <xref target="RFC7234"/> and Authentication <xref
- target="RFC7235"/> are applicable to HTTP/2. Selected portions of HTTP/1.1 Message Syntax
- and Routing <xref target="RFC7230"/>, such as the HTTP and HTTPS URI schemes, are also
- applicable in HTTP/2, but the expression of those semantics for this protocol are defined
- in the sections below.
- </t>
-
- <section anchor="HttpSequence" title="HTTP Request/Response Exchange">
- <t>
- A client sends an HTTP request on a new stream, using a previously unused <xref
- target="StreamIdentifiers">stream identifier</xref>. A server sends an HTTP response on
- the same stream as the request.
- </t>
- <t>
- An HTTP message (request or response) consists of:
- <list style="numbers">
- <t>
- for a response only, zero or more <x:ref>HEADERS</x:ref> frames (each followed by zero
- or more <x:ref>CONTINUATION</x:ref> frames) containing the message headers of
- informational (1xx) HTTP responses (see <xref target="RFC7230" x:fmt=","
- x:rel="#header.fields"/> and <xref target="RFC7231" x:fmt="," x:rel="#status.1xx"/>),
- and
- </t>
- <t>
- one <x:ref>HEADERS</x:ref> frame (followed by zero or more <x:ref>CONTINUATION</x:ref>
- frames) containing the message headers (see <xref target="RFC7230" x:fmt=","
- x:rel="#header.fields"/>), and
- </t>
- <t>
- zero or more <x:ref>DATA</x:ref> frames containing the message payload (see <xref
- target="RFC7230" x:fmt="," x:rel="#message.body"/>), and
- </t>
- <t>
- optionally, one <x:ref>HEADERS</x:ref> frame, followed by zero or more
- <x:ref>CONTINUATION</x:ref> frames containing the trailer-part, if present (see <xref
- target="RFC7230" x:fmt="," x:rel="#chunked.trailer.part"/>).
- </t>
- </list>
- The last frame in the sequence bears an END_STREAM flag, noting that a
- <x:ref>HEADERS</x:ref> frame bearing the END_STREAM flag can be followed by
- <x:ref>CONTINUATION</x:ref> frames that carry any remaining portions of the header block.
- </t>
- <t>
- Other frames (from any stream) MUST NOT occur between either <x:ref>HEADERS</x:ref> frame
- and any <x:ref>CONTINUATION</x:ref> frames that might follow.
- </t>
-
- <t>
- Trailing header fields are carried in a header block that also terminates the stream.
- That is, a sequence starting with a <x:ref>HEADERS</x:ref> frame, followed by zero or more
- <x:ref>CONTINUATION</x:ref> frames, where the <x:ref>HEADERS</x:ref> frame bears an
- END_STREAM flag. Header blocks after the first that do not terminate the stream are not
- part of an HTTP request or response.
- </t>
- <t>
- A <x:ref>HEADERS</x:ref> frame (and associated <x:ref>CONTINUATION</x:ref> frames) can
- only appear at the start or end of a stream. An endpoint that receives a
- <x:ref>HEADERS</x:ref> frame without the END_STREAM flag set after receiving a final
- (non-informational) status code MUST treat the corresponding request or response as <xref
- target="malformed">malformed</xref>.
- </t>
-
- <t>
- An HTTP request/response exchange fully consumes a single stream. A request starts with
- the <x:ref>HEADERS</x:ref> frame that puts the stream into an "open" state. The request
- ends with a frame bearing END_STREAM, which causes the stream to become "half closed
- (local)" for the client and "half closed (remote)" for the server. A response starts with
- a <x:ref>HEADERS</x:ref> frame and ends with a frame bearing END_STREAM, which places the
- stream in the "closed" state.
- <!-- Yes, the response might be completed before the request does, but that's not a detail
- we need to expand upon. It's complicated enough explaining this as it is. -->
- </t>
-
- <section anchor="informational-responses" title="Upgrading From HTTP/2">
- <t>
- HTTP/2 removes support for the 101 (Switching Protocols) informational status code
- (<xref target="RFC7231" x:fmt="," x:rel="#status.101"/>).
- </t>
- <t>
- The semantics of 101 (Switching Protocols) aren't applicable to a multiplexed protocol.
- Alternative protocols are able to use the same mechanisms that HTTP/2 uses to negotiate
- their use (see <xref target="starting"/>).
- </t>
- </section>
-
- <section anchor="HttpHeaders" title="HTTP Header Fields">
- <t>
- HTTP header fields carry information as a series of key-value pairs. For a listing of
- registered HTTP headers, see the Message Header Field Registry maintained at <eref
- target="https://www.iana.org/assignments/message-headers"/>.
- </t>
-
- <section anchor="PseudoHeaderFields" title="Pseudo-Header Fields">
- <t>
- While HTTP/1.x used the message start-line (see <xref target="RFC7230" x:fmt=","
- x:rel="#start.line"/>) to convey the target URI and method of the request, and the
- status code for the response, HTTP/2 uses special pseudo-header fields beginning with
- ':' character (ASCII 0x3a) for this purpose.
- </t>
- <t>
- Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT generate
- pseudo-header fields other than those defined in this document.
- </t>
- <t>
- Pseudo-header fields are only valid in the context in which they are defined.
- Pseudo-header fields defined for requests MUST NOT appear in responses; pseudo-header
- fields defined for responses MUST NOT appear in requests. Pseudo-header fields MUST
- NOT appear in trailers. Endpoints MUST treat a request or response that contains
- undefined or invalid pseudo-header fields as <xref
- target="malformed">malformed</xref>.
- </t>
- <t>
- Just as in HTTP/1.x, header field names are strings of ASCII characters that are
- compared in a case-insensitive fashion. However, header field names MUST be converted
- to lowercase prior to their encoding in HTTP/2. A request or response containing
- uppercase header field names MUST be treated as <xref
- target="malformed">malformed</xref>.
- </t>
- <t>
- All pseudo-header fields MUST appear in the header block before regular header fields.
- Any request or response that contains a pseudo-header field that appears in a header
- block after a regular header field MUST be treated as <xref
- target="malformed">malformed</xref>.
- </t>
- </section>
-
- <section title="Connection-Specific Header Fields">
- <t>
- HTTP/2 does not use the <spanx style="verb">Connection</spanx> header field to
- indicate connection-specific header fields; in this protocol, connection-specific
- metadata is conveyed by other means. An endpoint MUST NOT generate a HTTP/2 message
- containing connection-specific header fields; any message containing
- connection-specific header fields MUST be treated as <xref
- target="malformed">malformed</xref>.
- </t>
- <t>
- This means that an intermediary transforming an HTTP/1.x message to HTTP/2 will need
- to remove any header fields nominated by the Connection header field, along with the
- Connection header field itself. Such intermediaries SHOULD also remove other
- connection-specific header fields, such as Keep-Alive, Proxy-Connection,
- Transfer-Encoding and Upgrade, even if they are not nominated by Connection.
- </t>
- <t>
- One exception to this is the TE header field, which MAY be present in an HTTP/2
- request, but when it is MUST NOT contain any value other than "trailers".
- </t>
- <t>
- <list style="hanging">
- <t hangText="Note:">
- HTTP/2 purposefully does not support upgrade to another protocol. The handshake
- methods described in <xref target="starting"/> are believed sufficient to
- negotiate the use of alternative protocols.
- </t>
- </list>
- </t>
- </section>
-
- <section anchor="HttpRequest" title="Request Pseudo-Header Fields">
- <t>
- The following pseudo-header fields are defined for HTTP/2 requests:
- <list style="symbols">
- <x:lt>
- <t>
- The <spanx style="verb">:method</spanx> pseudo-header field includes the HTTP
- method (<xref target="RFC7231" x:fmt="," x:rel="#methods"/>).
- </t>
- </x:lt>
- <x:lt>
- <t>
- The <spanx style="verb">:scheme</spanx> pseudo-header field includes the scheme
- portion of the target URI (<xref target="RFC3986" x:fmt="," x:sec="3.1"/>).
- </t>
- <t>
- <spanx style="verb">:scheme</spanx> is not restricted to <spanx
- style="verb">http</spanx> and <spanx style="verb">https</spanx> schemed URIs. A
- proxy or gateway can translate requests for non-HTTP schemes, enabling the use
- of HTTP to interact with non-HTTP services.
- </t>
- </x:lt>
- <x:lt>
- <t>
- The <spanx style="verb">:authority</spanx> pseudo-header field includes the
- authority portion of the target URI (<xref target="RFC3986" x:fmt=","
- x:sec="3.2"/>). The authority MUST NOT include the deprecated <spanx
- style="verb">userinfo</spanx> subcomponent for <spanx style="verb">http</spanx>
- or <spanx style="verb">https</spanx> schemed URIs.
- </t>
- <t>
- To ensure that the HTTP/1.1 request line can be reproduced accurately, this
- pseudo-header field MUST be omitted when translating from an HTTP/1.1 request
- that has a request target in origin or asterisk form (see <xref
- target="RFC7230" x:fmt="," x:rel="#request-target"/>). Clients that generate
- HTTP/2 requests directly SHOULD use the <spanx>:authority</spanx> pseudo-header
- field instead of the <spanx style="verb">Host</spanx> header field. An
- intermediary that converts an HTTP/2 request to HTTP/1.1 MUST create a <spanx
- style="verb">Host</spanx> header field if one is not present in a request by
- copying the value of the <spanx style="verb">:authority</spanx> pseudo-header
- field.
- </t>
- </x:lt>
- <x:lt>
- <t>
- The <spanx style="verb">:path</spanx> pseudo-header field includes the path and
- query parts of the target URI (the <spanx style="verb">path-absolute</spanx>
- production from <xref target="RFC3986"/> and optionally a '?' character
- followed by the <spanx style="verb">query</spanx> production, see <xref
- target="RFC3986" x:fmt="," x:sec="3.3"/> and <xref target="RFC3986" x:fmt=","
- x:sec="3.4"/>). A request in asterisk form includes the value '*' for the
- <spanx style="verb">:path</spanx> pseudo-header field.
- </t>
- <t>
- This pseudo-header field MUST NOT be empty for <spanx style="verb">http</spanx>
- or <spanx style="verb">https</spanx> URIs; <spanx style="verb">http</spanx> or
- <spanx style="verb">https</spanx> URIs that do not contain a path component
- MUST include a value of '/'. The exception to this rule is an OPTIONS request
- for an <spanx style="verb">http</spanx> or <spanx style="verb">https</spanx>
- URI that does not include a path component; these MUST include a <spanx
- style="verb">:path</spanx> pseudo-header field with a value of '*' (see <xref
- target="RFC7230" x:fmt="," x:rel="#asterisk-form"/>).
- </t>
- </x:lt>
- </list>
- </t>
- <t>
- All HTTP/2 requests MUST include exactly one valid value for the <spanx
- style="verb">:method</spanx>, <spanx style="verb">:scheme</spanx>, and <spanx
- style="verb">:path</spanx> pseudo-header fields, unless it is a <xref
- target="CONNECT">CONNECT request</xref>. An HTTP request that omits mandatory
- pseudo-header fields is <xref target="malformed">malformed</xref>.
- </t>
- <t>
- HTTP/2 does not define a way to carry the version identifier that is included in the
- HTTP/1.1 request line.
- </t>
- </section>
-
- <section anchor="HttpResponse" title="Response Pseudo-Header Fields">
- <t>
- For HTTP/2 responses, a single <spanx style="verb">:status</spanx> pseudo-header
- field is defined that carries the HTTP status code field (see <xref target="RFC7231"
- x:fmt="," x:rel="#status.codes"/>). This pseudo-header field MUST be included in all
- responses, otherwise the response is <xref target="malformed">malformed</xref>.
- </t>
- <t>
- HTTP/2 does not define a way to carry the version or reason phrase that is included in
- an HTTP/1.1 status line.
- </t>
- </section>
-
- <section anchor="CompressCookie" title="Compressing the Cookie Header Field">
- <t>
- The <xref target="COOKIE">Cookie header field</xref> can carry a significant amount of
- redundant data.
- </t>
- <t>
- The Cookie header field uses a semi-colon (";") to delimit cookie-pairs (or "crumbs").
- This header field doesn't follow the list construction rules in HTTP (see <xref
- target="RFC7230" x:fmt="," x:rel="#field.order"/>), which prevents cookie-pairs from
- being separated into different name-value pairs. This can significantly reduce
- compression efficiency as individual cookie-pairs are updated.
- </t>
- <t>
- To allow for better compression efficiency, the Cookie header field MAY be split into
- separate header fields, each with one or more cookie-pairs. If there are multiple
- Cookie header fields after decompression, these MUST be concatenated into a single
- octet string using the two octet delimiter of 0x3B, 0x20 (the ASCII string "; ")
- before being passed into a non-HTTP/2 context, such as an HTTP/1.1 connection, or a
- generic HTTP server application.
- </t>
- <figure>
- <preamble>
- Therefore, the following two lists of Cookie header fields are semantically
- equivalent.
- </preamble>
- <artwork type="inline"><![CDATA[
- cookie: a=b; c=d; e=f
-
- cookie: a=b
- cookie: c=d
- cookie: e=f
-]]></artwork>
- </figure>
- </section>
-
- <section anchor="malformed" title="Malformed Requests and Responses">
- <t>
- A malformed request or response is one that is an otherwise valid sequence of HTTP/2
- frames, but is otherwise invalid due to the presence of extraneous frames, prohibited
- header fields, the absence of mandatory header fields, or the inclusion of uppercase
- header field names.
- </t>
- <t>
- A request or response that includes an entity body can include a <spanx
- style="verb">content-length</spanx> header field. A request or response is also
- malformed if the value of a <spanx style="verb">content-length</spanx> header field
- does not equal the sum of the <x:ref>DATA</x:ref> frame payload lengths that form the
- body. A response that is defined to have no payload, as described in <xref
- target="RFC7230" x:fmt="," x:rel="#header.content-length"/>, can have a non-zero
- <spanx style="verb">content-length</spanx> header field, even though no content is
- included in <x:ref>DATA</x:ref> frames.
- </t>
- <t>
- Intermediaries that process HTTP requests or responses (i.e., any intermediary not
- acting as a tunnel) MUST NOT forward a malformed request or response. Malformed
- requests or responses that are detected MUST be treated as a <xref
- target="StreamErrorHandler">stream error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- For malformed requests, a server MAY send an HTTP response prior to closing or
- resetting the stream. Clients MUST NOT accept a malformed response. Note that these
- requirements are intended to protect against several types of common attacks against
- HTTP; they are deliberately strict, because being permissive can expose
- implementations to these vulnerabilities.
- </t>
- </section>
- </section>
-
- <section title="Examples">
- <t>
- This section shows HTTP/1.1 requests and responses, with illustrations of equivalent
- HTTP/2 requests and responses.
- </t>
- <t>
- An HTTP GET request includes request header fields and no body and is therefore
- transmitted as a single <x:ref>HEADERS</x:ref> frame, followed by zero or more
- <x:ref>CONTINUATION</x:ref> frames containing the serialized block of request header
- fields. The <x:ref>HEADERS</x:ref> frame in the following has both the END_HEADERS and
- END_STREAM flags set; no <x:ref>CONTINUATION</x:ref> frames are sent:
- </t>
-
- <figure>
- <artwork type="inline"><![CDATA[
- GET /resource HTTP/1.1 HEADERS
- Host: example.org ==> + END_STREAM
- Accept: image/jpeg + END_HEADERS
- :method = GET
- :scheme = https
- :path = /resource
- host = example.org
- accept = image/jpeg
-]]></artwork>
- </figure>
-
- <t>
- Similarly, a response that includes only response header fields is transmitted as a
- <x:ref>HEADERS</x:ref> frame (again, followed by zero or more
- <x:ref>CONTINUATION</x:ref> frames) containing the serialized block of response header
- fields.
- </t>
-
- <figure>
- <artwork type="inline"><![CDATA[
- HTTP/1.1 304 Not Modified HEADERS
- ETag: "xyzzy" ==> + END_STREAM
- Expires: Thu, 23 Jan ... + END_HEADERS
- :status = 304
- etag = "xyzzy"
- expires = Thu, 23 Jan ...
-]]></artwork>
- </figure>
-
- <t>
- An HTTP POST request that includes request header fields and payload data is transmitted
- as one <x:ref>HEADERS</x:ref> frame, followed by zero or more
- <x:ref>CONTINUATION</x:ref> frames containing the request header fields, followed by one
- or more <x:ref>DATA</x:ref> frames, with the last <x:ref>CONTINUATION</x:ref> (or
- <x:ref>HEADERS</x:ref>) frame having the END_HEADERS flag set and the final
- <x:ref>DATA</x:ref> frame having the END_STREAM flag set:
- </t>
-
- <figure>
- <artwork type="inline"><![CDATA[
- POST /resource HTTP/1.1 HEADERS
- Host: example.org ==> - END_STREAM
- Content-Type: image/jpeg - END_HEADERS
- Content-Length: 123 :method = POST
- :path = /resource
- {binary data} :scheme = https
-
- CONTINUATION
- + END_HEADERS
- content-type = image/jpeg
- host = example.org
- content-length = 123
-
- DATA
- + END_STREAM
- {binary data}
-]]></artwork>
- <postamble>
- Note that data contributing to any given header field could be spread between header
- block fragments. The allocation of header fields to frames in this example is
- illustrative only.
- </postamble>
- </figure>
-
- <t>
- A response that includes header fields and payload data is transmitted as a
- <x:ref>HEADERS</x:ref> frame, followed by zero or more <x:ref>CONTINUATION</x:ref>
- frames, followed by one or more <x:ref>DATA</x:ref> frames, with the last
- <x:ref>DATA</x:ref> frame in the sequence having the END_STREAM flag set:
- </t>
-
- <figure>
- <artwork type="inline"><![CDATA[
- HTTP/1.1 200 OK HEADERS
- Content-Type: image/jpeg ==> - END_STREAM
- Content-Length: 123 + END_HEADERS
- :status = 200
- {binary data} content-type = image/jpeg
- content-length = 123
-
- DATA
- + END_STREAM
- {binary data}
-]]></artwork>
- </figure>
-
- <t>
- Trailing header fields are sent as a header block after both the request or response
- header block and all the <x:ref>DATA</x:ref> frames have been sent. The
- <x:ref>HEADERS</x:ref> frame starting the trailers header block has the END_STREAM flag
- set.
- </t>
-
- <figure>
- <artwork type="inline"><![CDATA[
- HTTP/1.1 200 OK HEADERS
- Content-Type: image/jpeg ==> - END_STREAM
- Transfer-Encoding: chunked + END_HEADERS
- Trailer: Foo :status = 200
- content-length = 123
- 123 content-type = image/jpeg
- {binary data} trailer = Foo
- 0
- Foo: bar DATA
- - END_STREAM
- {binary data}
-
- HEADERS
- + END_STREAM
- + END_HEADERS
- foo = bar
-]]></artwork>
- </figure>
-
-
- <figure>
- <preamble>
- An informational response using a 1xx status code other than 101 is transmitted as a
- <x:ref>HEADERS</x:ref> frame, followed by zero or more <x:ref>CONTINUATION</x:ref>
- frames:
- </preamble>
- <artwork type="inline"><![CDATA[
- HTTP/1.1 103 BAR HEADERS
- Extension-Field: bar ==> - END_STREAM
- + END_HEADERS
- :status = 103
- extension-field = bar
-]]></artwork>
- </figure>
- </section>
-
- <section anchor="Reliability" title="Request Reliability Mechanisms in HTTP/2">
- <t>
- In HTTP/1.1, an HTTP client is unable to retry a non-idempotent request when an error
- occurs, because there is no means to determine the nature of the error. It is possible
- that some server processing occurred prior to the error, which could result in
- undesirable effects if the request were reattempted.
- </t>
- <t>
- HTTP/2 provides two mechanisms for providing a guarantee to a client that a request has
- not been processed:
- <list style="symbols">
- <t>
- The <x:ref>GOAWAY</x:ref> frame indicates the highest stream number that might have
- been processed. Requests on streams with higher numbers are therefore guaranteed to
- be safe to retry.
- </t>
- <t>
- The <x:ref>REFUSED_STREAM</x:ref> error code can be included in a
- <x:ref>RST_STREAM</x:ref> frame to indicate that the stream is being closed prior to
- any processing having occurred. Any request that was sent on the reset stream can
- be safely retried.
- </t>
- </list>
- </t>
- <t>
- Requests that have not been processed have not failed; clients MAY automatically retry
- them, even those with non-idempotent methods.
- </t>
- <t>
- A server MUST NOT indicate that a stream has not been processed unless it can guarantee
- that fact. If frames that are on a stream are passed to the application layer for any
- stream, then <x:ref>REFUSED_STREAM</x:ref> MUST NOT be used for that stream, and a
- <x:ref>GOAWAY</x:ref> frame MUST include a stream identifier that is greater than or
- equal to the given stream identifier.
- </t>
- <t>
- In addition to these mechanisms, the <x:ref>PING</x:ref> frame provides a way for a
- client to easily test a connection. Connections that remain idle can become broken as
- some middleboxes (for instance, network address translators, or load balancers) silently
- discard connection bindings. The <x:ref>PING</x:ref> frame allows a client to safely
- test whether a connection is still active without sending a request.
- </t>
- </section>
- </section>
-
- <section anchor="PushResources" title="Server Push">
- <t>
- HTTP/2 allows a server to pre-emptively send (or "push") responses (along with
- corresponding "promised" requests) to a client in association with a previous
- client-initiated request. This can be useful when the server knows the client will need
- to have those responses available in order to fully process the response to the original
- request.
- </t>
-
- <t>
- Pushing additional message exchanges in this fashion is optional, and is negotiated
- between individual endpoints. The <x:ref>SETTINGS_ENABLE_PUSH</x:ref> setting can be set
- to 0 to indicate that server push is disabled.
- </t>
- <t>
- Promised requests MUST be cacheable (see <xref target="RFC7231" x:fmt=","
- x:rel="#cacheable.methods"/>), MUST be safe (see <xref target="RFC7231" x:fmt=","
- x:rel="#safe.methods"/>) and MUST NOT include a request body. Clients that receive a
- promised request that is not cacheable, unsafe or that includes a request body MUST
- reset the stream with a <xref target="StreamErrorHandler">stream error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
- <t>
- Pushed responses that are cacheable (see <xref target="RFC7234" x:fmt=","
- x:rel="#response.cacheability"/>) can be stored by the client, if it implements a HTTP
- cache. Pushed responses are considered successfully validated on the origin server (e.g.,
- if the "no-cache" cache response directive <xref target="RFC7234" x:fmt=","
- x:rel="#cache-response-directive"/> is present) while the stream identified by the
- promised stream ID is still open.
- </t>
- <t>
- Pushed responses that are not cacheable MUST NOT be stored by any HTTP cache. They MAY
- be made available to the application separately.
- </t>
- <t>
- An intermediary can receive pushes from the server and choose not to forward them on to
- the client. In other words, how to make use of the pushed information is up to that
- intermediary. Equally, the intermediary might choose to make additional pushes to the
- client, without any action taken by the server.
- </t>
- <t>
- A client cannot push. Thus, servers MUST treat the receipt of a
- <x:ref>PUSH_PROMISE</x:ref> frame as a <xref target="ConnectionErrorHandler">connection
- error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>. Clients MUST reject any attempt to
- change the <x:ref>SETTINGS_ENABLE_PUSH</x:ref> setting to a value other than 0 by treating
- the message as a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <section anchor="PushRequests" title="Push Requests">
- <t>
- Server push is semantically equivalent to a server responding to a request; however, in
- this case that request is also sent by the server, as a <x:ref>PUSH_PROMISE</x:ref>
- frame.
- </t>
- <t>
- The <x:ref>PUSH_PROMISE</x:ref> frame includes a header block that contains a complete
- set of request header fields that the server attributes to the request. It is not
- possible to push a response to a request that includes a request body.
- </t>
-
- <t>
- Pushed responses are always associated with an explicit request from the client. The
- <x:ref>PUSH_PROMISE</x:ref> frames sent by the server are sent on that explicit
- request's stream. The <x:ref>PUSH_PROMISE</x:ref> frame also includes a promised stream
- identifier, chosen from the stream identifiers available to the server (see <xref
- target="StreamIdentifiers"/>).
- </t>
-
- <t>
- The header fields in <x:ref>PUSH_PROMISE</x:ref> and any subsequent
- <x:ref>CONTINUATION</x:ref> frames MUST be a valid and complete set of <xref
- target="HttpRequest">request header fields</xref>. The server MUST include a method in
- the <spanx style="verb">:method</spanx> header field that is safe and cacheable. If a
- client receives a <x:ref>PUSH_PROMISE</x:ref> that does not include a complete and valid
- set of header fields, or the <spanx style="verb">:method</spanx> header field identifies
- a method that is not safe, it MUST respond with a <xref
- target="StreamErrorHandler">stream error</xref> of type <x:ref>PROTOCOL_ERROR</x:ref>.
- </t>
-
- <t>
- The server SHOULD send <x:ref>PUSH_PROMISE</x:ref> (<xref target="PUSH_PROMISE"/>)
- frames prior to sending any frames that reference the promised responses. This avoids a
- race where clients issue requests prior to receiving any <x:ref>PUSH_PROMISE</x:ref>
- frames.
- </t>
- <t>
- For example, if the server receives a request for a document containing embedded links
- to multiple image files, and the server chooses to push those additional images to the
- client, sending push promises before the <x:ref>DATA</x:ref> frames that contain the
- image links ensures that the client is able to see the promises before discovering
- embedded links. Similarly, if the server pushes responses referenced by the header block
- (for instance, in Link header fields), sending the push promises before sending the
- header block ensures that clients do not request them.
- </t>
-
- <t>
- <x:ref>PUSH_PROMISE</x:ref> frames MUST NOT be sent by the client.
- </t>
- <t>
- <x:ref>PUSH_PROMISE</x:ref> frames can be sent by the server in response to any
- client-initiated stream, but the stream MUST be in either the "open" or "half closed
- (remote)" state with respect to the server. <x:ref>PUSH_PROMISE</x:ref> frames are
- interspersed with the frames that comprise a response, though they cannot be
- interspersed with <x:ref>HEADERS</x:ref> and <x:ref>CONTINUATION</x:ref> frames that
- comprise a single header block.
- </t>
- <t>
- Sending a <x:ref>PUSH_PROMISE</x:ref> frame creates a new stream and puts the stream
- into the “reserved (local)†state for the server and the “reserved (remote)†state for
- the client.
- </t>
- </section>
-
- <section anchor="PushResponses" title="Push Responses">
- <t>
- After sending the <x:ref>PUSH_PROMISE</x:ref> frame, the server can begin delivering the
- pushed response as a <xref target="HttpResponse">response</xref> on a server-initiated
- stream that uses the promised stream identifier. The server uses this stream to
- transmit an HTTP response, using the same sequence of frames as defined in <xref
- target="HttpSequence"/>. This stream becomes <xref target="StreamStates">"half closed"
- to the client</xref> after the initial <x:ref>HEADERS</x:ref> frame is sent.
- </t>
-
- <t>
- Once a client receives a <x:ref>PUSH_PROMISE</x:ref> frame and chooses to accept the
- pushed response, the client SHOULD NOT issue any requests for the promised response
- until after the promised stream has closed.
- </t>
-
- <t>
- If the client determines, for any reason, that it does not wish to receive the pushed
- response from the server, or if the server takes too long to begin sending the promised
- response, the client can send an <x:ref>RST_STREAM</x:ref> frame, using either the
- <x:ref>CANCEL</x:ref> or <x:ref>REFUSED_STREAM</x:ref> codes, and referencing the pushed
- stream's identifier.
- </t>
- <t>
- A client can use the <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref> setting to limit the
- number of responses that can be concurrently pushed by a server. Advertising a
- <x:ref>SETTINGS_MAX_CONCURRENT_STREAMS</x:ref> value of zero disables server push by
- preventing the server from creating the necessary streams. This does not prohibit a
- server from sending <x:ref>PUSH_PROMISE</x:ref> frames; clients need to reset any
- promised streams that are not wanted.
- </t>
-
- <t>
- Clients receiving a pushed response MUST validate that either the server is
- authoritative (see <xref target="authority"/>), or the proxy that provided the pushed
- response is configured for the corresponding request. For example, a server that offers
- a certificate for only the <spanx style="verb">example.com</spanx> DNS-ID or Common Name
- is not permitted to push a response for <spanx
- style="verb">https://www.example.org/doc</spanx>.
- </t>
- <t>
- The response for a <x:ref>PUSH_PROMISE</x:ref> stream begins with a
- <x:ref>HEADERS</x:ref> frame, which immediately puts the stream into the “half closed
- (remote)†state for the server and “half closed (local)†state for the client, and ends
- with a frame bearing END_STREAM, which places the stream in the "closed" state.
- <list style="hanging">
- <t hangText="Note:">
- The client never sends a frame with the END_STREAM flag for a server push.
- </t>
- </list>
- </t>
- </section>
-
- </section>
-
- <section anchor="CONNECT" title="The CONNECT Method">
- <t>
- In HTTP/1.x, the pseudo-method CONNECT (<xref target="RFC7231" x:fmt=","
- x:rel="#CONNECT"/>) is used to convert an HTTP connection into a tunnel to a remote host.
- CONNECT is primarily used with HTTP proxies to establish a TLS session with an origin
- server for the purposes of interacting with <spanx style="verb">https</spanx> resources.
- </t>
- <t>
- In HTTP/2, the CONNECT method is used to establish a tunnel over a single HTTP/2 stream to
- a remote host, for similar purposes. The HTTP header field mapping works as defined in
- <xref target="HttpRequest">Request Header Fields</xref>, with a few
- differences. Specifically:
- <list style="symbols">
- <t>
- The <spanx style="verb">:method</spanx> header field is set to <spanx
- style="verb">CONNECT</spanx>.
- </t>
- <t>
- The <spanx style="verb">:scheme</spanx> and <spanx style="verb">:path</spanx> header
- fields MUST be omitted.
- </t>
- <t>
- The <spanx style="verb">:authority</spanx> header field contains the host and port to
- connect to (equivalent to the authority-form of the request-target of CONNECT
- requests, see <xref target="RFC7230" x:fmt="," x:rel="#request-target"/>).
- </t>
- </list>
- </t>
- <t>
- A proxy that supports CONNECT establishes a <xref target="TCP">TCP connection</xref> to
- the server identified in the <spanx style="verb">:authority</spanx> header field. Once
- this connection is successfully established, the proxy sends a <x:ref>HEADERS</x:ref>
- frame containing a 2xx series status code to the client, as defined in <xref
- target="RFC7231" x:fmt="," x:rel="#CONNECT"/>.
- </t>
- <t>
- After the initial <x:ref>HEADERS</x:ref> frame sent by each peer, all subsequent
- <x:ref>DATA</x:ref> frames correspond to data sent on the TCP connection. The payload of
- any <x:ref>DATA</x:ref> frames sent by the client is transmitted by the proxy to the TCP
- server; data received from the TCP server is assembled into <x:ref>DATA</x:ref> frames by
- the proxy. Frame types other than <x:ref>DATA</x:ref> or stream management frames
- (<x:ref>RST_STREAM</x:ref>, <x:ref>WINDOW_UPDATE</x:ref>, and <x:ref>PRIORITY</x:ref>)
- MUST NOT be sent on a connected stream, and MUST be treated as a <xref
- target="StreamErrorHandler">stream error</xref> if received.
- </t>
- <t>
- The TCP connection can be closed by either peer. The END_STREAM flag on a
- <x:ref>DATA</x:ref> frame is treated as being equivalent to the TCP FIN bit. A client is
- expected to send a <x:ref>DATA</x:ref> frame with the END_STREAM flag set after receiving
- a frame bearing the END_STREAM flag. A proxy that receives a <x:ref>DATA</x:ref> frame
- with the END_STREAM flag set sends the attached data with the FIN bit set on the last TCP
- segment. A proxy that receives a TCP segment with the FIN bit set sends a
- <x:ref>DATA</x:ref> frame with the END_STREAM flag set. Note that the final TCP segment
- or <x:ref>DATA</x:ref> frame could be empty.
- </t>
- <t>
- A TCP connection error is signaled with <x:ref>RST_STREAM</x:ref>. A proxy treats any
- error in the TCP connection, which includes receiving a TCP segment with the RST bit set,
- as a <xref target="StreamErrorHandler">stream error</xref> of type
- <x:ref>CONNECT_ERROR</x:ref>. Correspondingly, a proxy MUST send a TCP segment with the
- RST bit set if it detects an error with the stream or the HTTP/2 connection.
- </t>
- </section>
- </section>
-
- <section anchor="HttpExtra" title="Additional HTTP Requirements/Considerations">
- <t>
- This section outlines attributes of the HTTP protocol that improve interoperability, reduce
- exposure to known security vulnerabilities, or reduce the potential for implementation
- variation.
- </t>
-
- <section title="Connection Management">
- <t>
- HTTP/2 connections are persistent. For best performance, it is expected clients will not
- close connections until it is determined that no further communication with a server is
- necessary (for example, when a user navigates away from a particular web page), or until
- the server closes the connection.
- </t>
- <t>
- Clients SHOULD NOT open more than one HTTP/2 connection to a given host and port pair,
- where host is derived from a URI, a selected <xref target="ALT-SVC">alternative
- service</xref>, or a configured proxy.
- </t>
- <t>
- A client can create additional connections as replacements, either to replace connections
- that are near to exhausting the available <xref target="StreamIdentifiers">stream
- identifier space</xref>, to refresh the keying material for a TLS connection, or to
- replace connections that have encountered <xref
- target="ConnectionErrorHandler">errors</xref>.
- </t>
- <t>
- A client MAY open multiple connections to the same IP address and TCP port using different
- <xref target="TLS-EXT">Server Name Indication</xref> values or to provide different TLS
- client certificates, but SHOULD avoid creating multiple connections with the same
- configuration.
- </t>
- <t>
- Servers are encouraged to maintain open connections for as long as possible, but are
- permitted to terminate idle connections if necessary. When either endpoint chooses to
- close the transport-layer TCP connection, the terminating endpoint SHOULD first send a
- <x:ref>GOAWAY</x:ref> (<xref target="GOAWAY"/>) frame so that both endpoints can reliably
- determine whether previously sent frames have been processed and gracefully complete or
- terminate any necessary remaining tasks.
- </t>
-
- <section anchor="reuse" title="Connection Reuse">
- <t>
- Connections that are made to an origin servers, either directly or through a tunnel
- created using the <xref target="CONNECT">CONNECT method</xref> MAY be reused for
- requests with multiple different URI authority components. A connection can be reused
- as long as the origin server is <xref target="authority">authoritative</xref>. For
- <spanx style="verb">http</spanx> resources, this depends on the host having resolved to
- the same IP address.
- </t>
- <t>
- For <spanx style="verb">https</spanx> resources, connection reuse additionally depends
- on having a certificate that is valid for the host in the URI. An origin server might
- offer a certificate with multiple <spanx style="verb">subjectAltName</spanx> attributes,
- or names with wildcards, one of which is valid for the authority in the URI. For
- example, a certificate with a <spanx style="verb">subjectAltName</spanx> of <spanx
- style="verb">*.example.com</spanx> might permit the use of the same connection for
- requests to URIs starting with <spanx style="verb">https://a.example.com/</spanx> and
- <spanx style="verb">https://b.example.com/</spanx>.
- </t>
- <t>
- In some deployments, reusing a connection for multiple origins can result in requests
- being directed to the wrong origin server. For example, TLS termination might be
- performed by a middlebox that uses the TLS <xref target="TLS-EXT">Server Name Indication
- (SNI)</xref> extension to select an origin server. This means that it is possible
- for clients to send confidential information to servers that might not be the intended
- target for the request, even though the server is otherwise authoritative.
- </t>
- <t>
- A server that does not wish clients to reuse connections can indicate that it is not
- authoritative for a request by sending a 421 (Misdirected Request) status code in response
- to the request (see <xref target="MisdirectedRequest"/>).
- </t>
- <t>
- A client that is configured to use a proxy over HTTP/2 directs requests to that proxy
- through a single connection. That is, all requests sent via a proxy reuse the
- connection to the proxy.
- </t>
- </section>
-
- <section anchor="MisdirectedRequest" title="The 421 (Misdirected Request) Status Code">
- <t>
- The 421 (Misdirected Request) status code indicates that the request was directed at a
- server that is not able to produce a response. This can be sent by a server that is not
- configured to produce responses for the combination of scheme and authority that are
- included in the request URI.
- </t>
- <t>
- Clients receiving a 421 (Misdirected Request) response from a server MAY retry the
- request - whether the request method is idempotent or not - over a different connection.
- This is possible if a connection is reused (<xref target="reuse"/>) or if an alternative
- service is selected (<xref target="ALT-SVC"/>).
- </t>
- <t>
- This status code MUST NOT be generated by proxies.
- </t>
- <t>
- A 421 response is cacheable by default; i.e., unless otherwise indicated by the method
- definition or explicit cache controls (see <xref target="RFC7234"
- x:rel="#heuristic.freshness" x:fmt="of"/>).
- </t>
- </section>
- </section>
-
- <section title="Use of TLS Features" anchor="TLSUsage">
- <t>
- Implementations of HTTP/2 MUST support <xref target="TLS12">TLS 1.2</xref> for HTTP/2 over
- TLS. The general TLS usage guidance in <xref target="TLSBCP"/> SHOULD be followed, with
- some additional restrictions that are specific to HTTP/2.
- </t>
-
- <t>
- An implementation of HTTP/2 over TLS MUST use TLS 1.2 or higher with the restrictions on
- feature set and cipher suite described in this section. Due to implementation
- limitations, it might not be possible to fail TLS negotiation. An endpoint MUST
- immediately terminate an HTTP/2 connection that does not meet these minimum requirements
- with a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>INADEQUATE_SECURITY</x:ref>.
- </t>
-
- <section anchor="TLSFeatures" title="TLS Features">
- <t>
- The TLS implementation MUST support the <xref target="TLS-EXT">Server Name Indication
- (SNI)</xref> extension to TLS. HTTP/2 clients MUST indicate the target domain name when
- negotiating TLS.
- </t>
- <t>
- The TLS implementation MUST disable compression. TLS compression can lead to the
- exposure of information that would not otherwise be revealed <xref target="RFC3749"/>.
- Generic compression is unnecessary since HTTP/2 provides compression features that are
- more aware of context and therefore likely to be more appropriate for use for
- performance, security or other reasons.
- </t>
- <t>
- The TLS implementation MUST disable renegotiation. An endpoint MUST treat a TLS
- renegotiation as a <xref target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>PROTOCOL_ERROR</x:ref>. Note that disabling renegotiation can result in
- long-lived connections becoming unusable due to limits on the number of messages the
- underlying cipher suite can encipher.
- </t>
- <t>
- A client MAY use renegotiation to provide confidentiality protection for client
- credentials offered in the handshake, but any renegotiation MUST occur prior to sending
- the connection preface. A server SHOULD request a client certificate if it sees a
- renegotiation request immediately after establishing a connection.
- </t>
- <t>
- This effectively prevents the use of renegotiation in response to a request for a
- specific protected resource. A future specification might provide a way to support this
- use case. <!-- <cref> We are tracking this in a non-blocking fashion in issue #496 and
- with a new draft. -->
- </t>
- </section>
-
- <section title="TLS Cipher Suites">
- <t>
- The set of TLS cipher suites that are permitted in HTTP/2 is restricted. HTTP/2 MUST
- only be used with cipher suites that have ephemeral key exchange, such as the <xref
- target="TLS12">ephemeral Diffie-Hellman (DHE)</xref> or the <xref
- target="RFC4492">elliptic curve variant (ECDHE)</xref>. Ephemeral key exchange MUST
- have a minimum size of 2048 bits for DHE or security level of 128 bits for ECDHE.
- Clients MUST accept DHE sizes of up to 4096 bits. HTTP MUST NOT be used with cipher
- suites that use stream or block ciphers. Authenticated Encryption with Additional Data
- (AEAD) modes, such as the <xref target="RFC5288">Galois Counter Model (GCM) mode for
- AES</xref> are acceptable.
- </t>
- <t>
- The effect of these restrictions is that TLS 1.2 implementations could have
- non-intersecting sets of available cipher suites, since these prevent the use of the
- cipher suite that TLS 1.2 makes mandatory. To avoid this problem, implementations of
- HTTP/2 that use TLS 1.2 MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 <xref
- target="TLS-ECDHE"/> with P256 <xref target="FIPS186"/>.
- </t>
- <t>
- Clients MAY advertise support of cipher suites that are prohibited by the above
- restrictions in order to allow for connection to servers that do not support HTTP/2.
- This enables a fallback to protocols without these constraints without the additional
- latency imposed by using a separate connection for fallback.
- </t>
- </section>
- </section>
- </section>
-
- <section anchor="security" title="Security Considerations">
- <section title="Server Authority" anchor="authority">
- <t>
- HTTP/2 relies on the HTTP/1.1 definition of authority for determining whether a server is
- authoritative in providing a given response, see <xref target="RFC7230" x:fmt=","
- x:rel="#establishing.authority"/>. This relies on local name resolution for the "http"
- URI scheme, and the authenticated server identity for the "https" scheme (see <xref
- target="RFC2818" x:fmt="," x:sec="3"/>).
- </t>
- </section>
-
- <section title="Cross-Protocol Attacks">
- <t>
- In a cross-protocol attack, an attacker causes a client to initiate a transaction in one
- protocol toward a server that understands a different protocol. An attacker might be able
- to cause the transaction to appear as valid transaction in the second protocol. In
- combination with the capabilities of the web context, this can be used to interact with
- poorly protected servers in private networks.
- </t>
- <t>
- Completing a TLS handshake with an ALPN identifier for HTTP/2 can be considered sufficient
- protection against cross protocol attacks. ALPN provides a positive indication that a
- server is willing to proceed with HTTP/2, which prevents attacks on other TLS-based
- protocols.
- </t>
- <t>
- The encryption in TLS makes it difficult for attackers to control the data which could be
- used in a cross-protocol attack on a cleartext protocol.
- </t>
- <t>
- The cleartext version of HTTP/2 has minimal protection against cross-protocol attacks.
- The <xref target="ConnectionHeader">connection preface</xref> contains a string that is
- designed to confuse HTTP/1.1 servers, but no special protection is offered for other
- protocols. A server that is willing to ignore parts of an HTTP/1.1 request containing an
- Upgrade header field in addition to the client connection preface could be exposed to a
- cross-protocol attack.
- </t>
- </section>
-
- <section title="Intermediary Encapsulation Attacks">
- <t>
- HTTP/2 header field names and values are encoded as sequences of octets with a length
- prefix. This enables HTTP/2 to carry any string of octets as the name or value of a
- header field. An intermediary that translates HTTP/2 requests or responses into HTTP/1.1
- directly could permit the creation of corrupted HTTP/1.1 messages. An attacker might
- exploit this behavior to cause the intermediary to create HTTP/1.1 messages with illegal
- header fields, extra header fields, or even new messages that are entirely falsified.
- </t>
- <t>
- Header field names or values that contain characters not permitted by HTTP/1.1, including
- carriage return (ASCII 0xd) or line feed (ASCII 0xa) MUST NOT be translated verbatim by an
- intermediary, as stipulated in <xref target="RFC7230" x:rel="#field.parsing" x:fmt=","/>.
- </t>
- <t>
- Translation from HTTP/1.x to HTTP/2 does not produce the same opportunity to an attacker.
- Intermediaries that perform translation to HTTP/2 MUST remove any instances of the <spanx
- style="verb">obs-fold</spanx> production from header field values.
- </t>
- </section>
-
- <section title="Cacheability of Pushed Responses">
- <t>
- Pushed responses do not have an explicit request from the client; the request
- is provided by the server in the <x:ref>PUSH_PROMISE</x:ref> frame.
- </t>
- <t>
- Caching responses that are pushed is possible based on the guidance provided by the origin
- server in the Cache-Control header field. However, this can cause issues if a single
- server hosts more than one tenant. For example, a server might offer multiple users each
- a small portion of its URI space.
- </t>
- <t>
- Where multiple tenants share space on the same server, that server MUST ensure that
- tenants are not able to push representations of resources that they do not have authority
- over. Failure to enforce this would allow a tenant to provide a representation that would
- be served out of cache, overriding the actual representation that the authoritative tenant
- provides.
- </t>
- <t>
- Pushed responses for which an origin server is not authoritative (see
- <xref target="authority"/>) are never cached or used.
- </t>
- </section>
-
- <section anchor="dos" title="Denial of Service Considerations">
- <t>
- An HTTP/2 connection can demand a greater commitment of resources to operate than a
- HTTP/1.1 connection. The use of header compression and flow control depend on a
- commitment of resources for storing a greater amount of state. Settings for these
- features ensure that memory commitments for these features are strictly bounded.
- </t>
- <t>
- The number of <x:ref>PUSH_PROMISE</x:ref> frames is not constrained in the same fashion.
- A client that accepts server push SHOULD limit the number of streams it allows to be in
- the "reserved (remote)" state. Excessive number of server push streams can be treated as
- a <xref target="StreamErrorHandler">stream error</xref> of type
- <x:ref>ENHANCE_YOUR_CALM</x:ref>.
- </t>
- <t>
- Processing capacity cannot be guarded as effectively as state capacity.
- </t>
- <t>
- The <x:ref>SETTINGS</x:ref> frame can be abused to cause a peer to expend additional
- processing time. This might be done by pointlessly changing SETTINGS parameters, setting
- multiple undefined parameters, or changing the same setting multiple times in the same
- frame. <x:ref>WINDOW_UPDATE</x:ref> or <x:ref>PRIORITY</x:ref> frames can be abused to
- cause an unnecessary waste of resources.
- </t>
- <t>
- Large numbers of small or empty frames can be abused to cause a peer to expend time
- processing frame headers. Note however that some uses are entirely legitimate, such as
- the sending of an empty <x:ref>DATA</x:ref> frame to end a stream.
- </t>
- <t>
- Header compression also offers some opportunities to waste processing resources; see <xref
- target="COMPRESSION" x:fmt="of" x:rel="#Security"/> for more details on potential abuses.
- </t>
- <t>
- Limits in <x:ref>SETTINGS</x:ref> parameters cannot be reduced instantaneously, which
- leaves an endpoint exposed to behavior from a peer that could exceed the new limits. In
- particular, immediately after establishing a connection, limits set by a server are not
- known to clients and could be exceeded without being an obvious protocol violation.
- </t>
- <t>
- All these features - i.e., <x:ref>SETTINGS</x:ref> changes, small frames, header
- compression - have legitimate uses. These features become a burden only when they are
- used unnecessarily or to excess.
- </t>
- <t>
- An endpoint that doesn't monitor this behavior exposes itself to a risk of denial of
- service attack. Implementations SHOULD track the use of these features and set limits on
- their use. An endpoint MAY treat activity that is suspicious as a <xref
- target="ConnectionErrorHandler">connection error</xref> of type
- <x:ref>ENHANCE_YOUR_CALM</x:ref>.
- </t>
-
- <section anchor="MaxHeaderBlock" title="Limits on Header Block Size">
- <t>
- A large <xref target="HeaderBlock">header block</xref> can cause an implementation to
- commit a large amount of state. Header fields that are critical for routing can appear
- toward the end of a header block, which prevents streaming of header fields to their
- ultimate destination. For this an other reasons, such as ensuring cache correctness,
- means that an endpoint might need to buffer the entire header block. Since there is no
- hard limit to the size of a header block, some endpoints could be forced commit a large
- amount of available memory for header fields.
- </t>
- <t>
- An endpoint can use the <x:ref>SETTINGS_MAX_HEADER_LIST_SIZE</x:ref> to advise peers of
- limits that might apply on the size of header blocks. This setting is only advisory, so
- endpoints MAY choose to send header blocks that exceed this limit and risk having the
- request or response being treated as malformed. This setting specific to a connection,
- so any request or response could encounter a hop with a lower, unknown limit. An
- intermediary can attempt to avoid this problem by passing on values presented by
- different peers, but they are not obligated to do so.
- </t>
- <t>
- A server that receives a larger header block than it is willing to handle can send an
- HTTP 431 (Request Header Fields Too Large) status code <xref target="RFC6585"/>. A
- client can discard responses that it cannot process. The header block MUST be processed
- to ensure a consistent connection state, unless the connection is closed.
- </t>
- </section>
- </section>
-
- <section title="Use of Compression">
- <t>
- HTTP/2 enables greater use of compression for both header fields (<xref
- target="HeaderBlock"/>) and entity bodies. Compression can allow an attacker to recover
- secret data when it is compressed in the same context as data under attacker control.
- </t>
- <t>
- There are demonstrable attacks on compression that exploit the characteristics of the web
- (e.g., <xref target="BREACH"/>). The attacker induces multiple requests containing
- varying plaintext, observing the length of the resulting ciphertext in each, which
- reveals a shorter length when a guess about the secret is correct.
- </t>
- <t>
- Implementations communicating on a secure channel MUST NOT compress content that includes
- both confidential and attacker-controlled data unless separate compression dictionaries
- are used for each source of data. Compression MUST NOT be used if the source of data
- cannot be reliably determined. Generic stream compression, such as that provided by TLS
- MUST NOT be used with HTTP/2 (<xref target="TLSFeatures"/>).
- </t>
- <t>
- Further considerations regarding the compression of header fields are described in <xref
- target="COMPRESSION"/>.
- </t>
- </section>
-
- <section title="Use of Padding" anchor="padding">
- <t>
- Padding within HTTP/2 is not intended as a replacement for general purpose padding, such
- as might be provided by <xref target="TLS12">TLS</xref>. Redundant padding could even be
- counterproductive. Correct application can depend on having specific knowledge of the
- data that is being padded.
- </t>
- <t>
- To mitigate attacks that rely on compression, disabling or limiting compression might be
- preferable to padding as a countermeasure.
- </t>
- <t>
- Padding can be used to obscure the exact size of frame content, and is provided to
- mitigate specific attacks within HTTP. For example, attacks where compressed content
- includes both attacker-controlled plaintext and secret data (see for example, <xref
- target="BREACH"/>).
- </t>
- <t>
- Use of padding can result in less protection than might seem immediately obvious. At
- best, padding only makes it more difficult for an attacker to infer length information by
- increasing the number of frames an attacker has to observe. Incorrectly implemented
- padding schemes can be easily defeated. In particular, randomized padding with a
- predictable distribution provides very little protection; similarly, padding payloads to a
- fixed size exposes information as payload sizes cross the fixed size boundary, which could
- be possible if an attacker can control plaintext.
- </t>
- <t>
- Intermediaries SHOULD retain padding for <x:ref>DATA</x:ref> frames, but MAY drop padding
- for <x:ref>HEADERS</x:ref> and <x:ref>PUSH_PROMISE</x:ref> frames. A valid reason for an
- intermediary to change the amount of padding of frames is to improve the protections that
- padding provides.
- </t>
- </section>
-
- <section title="Privacy Considerations">
- <t>
- Several characteristics of HTTP/2 provide an observer an opportunity to correlate actions
- of a single client or server over time. This includes the value of settings, the manner
- in which flow control windows are managed, the way priorities are allocated to streams,
- timing of reactions to stimulus, and handling of any optional features.
- </t>
- <t>
- As far as this creates observable differences in behavior, they could be used as a basis
- for fingerprinting a specific client, as defined in <xref target="HTML5" x:fmt="of"
- x:sec="1.8" x:rel="introduction.html#fingerprint"/>.
- </t>
- </section>
- </section>
-
- <section anchor="iana" title="IANA Considerations">
- <t>
- A string for identifying HTTP/2 is entered into the "Application Layer Protocol Negotiation
- (ALPN) Protocol IDs" registry established in <xref target="TLS-ALPN"/>.
- </t>
- <t>
- This document establishes a registry for frame types, settings, and error codes. These new
- registries are entered into a new "Hypertext Transfer Protocol (HTTP) 2 Parameters" section.
- </t>
- <t>
- This document registers the <spanx style="verb">HTTP2-Settings</spanx> header field for
- use in HTTP; and the 421 (Misdirected Request) status code.
- </t>
- <t>
- This document registers the <spanx style="verb">PRI</spanx> method for use in HTTP, to avoid
- collisions with the <xref target="ConnectionHeader">connection preface</xref>.
- </t>
-
- <section anchor="iana-alpn" title="Registration of HTTP/2 Identification Strings">
- <t>
- This document creates two registrations for the identification of HTTP/2 in the
- "Application Layer Protocol Negotiation (ALPN) Protocol IDs" registry established in <xref
- target="TLS-ALPN"/>.
- </t>
- <t>
- The "h2" string identifies HTTP/2 when used over TLS:
- <list style="hanging">
- <t hangText="Protocol:">HTTP/2 over TLS</t>
- <t hangText="Identification Sequence:">0x68 0x32 ("h2")</t>
- <t hangText="Specification:">This document</t>
- </list>
- </t>
- <t>
- The "h2c" string identifies HTTP/2 when used over cleartext TCP:
- <list style="hanging">
- <t hangText="Protocol:">HTTP/2 over TCP</t>
- <t hangText="Identification Sequence:">0x68 0x32 0x63 ("h2c")</t>
- <t hangText="Specification:">This document</t>
- </list>
- </t>
- </section>
-
- <section anchor="iana-frames" title="Frame Type Registry">
- <t>
- This document establishes a registry for HTTP/2 frame type codes. The "HTTP/2 Frame
- Type" registry manages an 8-bit space. The "HTTP/2 Frame Type" registry operates under
- either of the <xref target="RFC5226">"IETF Review" or "IESG Approval" policies</xref> for
- values between 0x00 and 0xef, with values between 0xf0 and 0xff being reserved for
- experimental use.
- </t>
- <t>
- New entries in this registry require the following information:
- <list style="hanging">
- <t hangText="Frame Type:">
- A name or label for the frame type.
- </t>
- <t hangText="Code:">
- The 8-bit code assigned to the frame type.
- </t>
- <t hangText="Specification:">
- A reference to a specification that includes a description of the frame layout,
- it's semantics and flags that the frame type uses, including any parts of the frame
- that are conditionally present based on the value of flags.
- </t>
- </list>
- </t>
- <t>
- The entries in the following table are registered by this document.
- </t>
- <texttable align="left" suppress-title="true">
- <ttcol>Frame Type</ttcol>
- <ttcol>Code</ttcol>
- <ttcol>Section</ttcol>
- <c>DATA</c><c>0x0</c><c><xref target="DATA"/></c>
- <c>HEADERS</c><c>0x1</c><c><xref target="HEADERS"/></c>
- <c>PRIORITY</c><c>0x2</c><c><xref target="PRIORITY"/></c>
- <c>RST_STREAM</c><c>0x3</c><c><xref target="RST_STREAM"/></c>
- <c>SETTINGS</c><c>0x4</c><c><xref target="SETTINGS"/></c>
- <c>PUSH_PROMISE</c><c>0x5</c><c><xref target="PUSH_PROMISE"/></c>
- <c>PING</c><c>0x6</c><c><xref target="PING"/></c>
- <c>GOAWAY</c><c>0x7</c><c><xref target="GOAWAY"/></c>
- <c>WINDOW_UPDATE</c><c>0x8</c><c><xref target="WINDOW_UPDATE"/></c>
- <c>CONTINUATION</c><c>0x9</c><c><xref target="CONTINUATION"/></c>
- </texttable>
- </section>
-
- <section anchor="iana-settings" title="Settings Registry">
- <t>
- This document establishes a registry for HTTP/2 settings. The "HTTP/2 Settings" registry
- manages a 16-bit space. The "HTTP/2 Settings" registry operates under the <xref
- target="RFC5226">"Expert Review" policy</xref> for values in the range from 0x0000 to
- 0xefff, with values between and 0xf000 and 0xffff being reserved for experimental use.
- </t>
- <t>
- New registrations are advised to provide the following information:
- <list style="hanging">
- <t hangText="Name:">
- A symbolic name for the setting. Specifying a setting name is optional.
- </t>
- <t hangText="Code:">
- The 16-bit code assigned to the setting.
- </t>
- <t hangText="Initial Value:">
- An initial value for the setting.
- </t>
- <t hangText="Specification:">
- An optional reference to a specification that describes the use of the setting.
- </t>
- </list>
- </t>
- <t>
- An initial set of setting registrations can be found in <xref target="SettingValues"/>.
- </t>
- <texttable align="left" suppress-title="true">
- <ttcol>Name</ttcol>
- <ttcol>Code</ttcol>
- <ttcol>Initial Value</ttcol>
- <ttcol>Specification</ttcol>
- <c>HEADER_TABLE_SIZE</c>
- <c>0x1</c><c>4096</c><c><xref target="SettingValues"/></c>
- <c>ENABLE_PUSH</c>
- <c>0x2</c><c>1</c><c><xref target="SettingValues"/></c>
- <c>MAX_CONCURRENT_STREAMS</c>
- <c>0x3</c><c>(infinite)</c><c><xref target="SettingValues"/></c>
- <c>INITIAL_WINDOW_SIZE</c>
- <c>0x4</c><c>65535</c><c><xref target="SettingValues"/></c>
- <c>MAX_FRAME_SIZE</c>
- <c>0x5</c><c>16384</c><c><xref target="SettingValues"/></c>
- <c>MAX_HEADER_LIST_SIZE</c>
- <c>0x6</c><c>(infinite)</c><c><xref target="SettingValues"/></c>
- </texttable>
-
- </section>
-
- <section anchor="iana-errors" title="Error Code Registry">
- <t>
- This document establishes a registry for HTTP/2 error codes. The "HTTP/2 Error Code"
- registry manages a 32-bit space. The "HTTP/2 Error Code" registry operates under the
- <xref target="RFC5226">"Expert Review" policy</xref>.
- </t>
- <t>
- Registrations for error codes are required to include a description of the error code. An
- expert reviewer is advised to examine new registrations for possible duplication with
- existing error codes. Use of existing registrations is to be encouraged, but not
- mandated.
- </t>
- <t>
- New registrations are advised to provide the following information:
- <list style="hanging">
- <t hangText="Name:">
- A name for the error code. Specifying an error code name is optional.
- </t>
- <t hangText="Code:">
- The 32-bit error code value.
- </t>
- <t hangText="Description:">
- A brief description of the error code semantics, longer if no detailed specification
- is provided.
- </t>
- <t hangText="Specification:">
- An optional reference for a specification that defines the error code.
- </t>
- </list>
- </t>
- <t>
- The entries in the following table are registered by this document.
- </t>
- <texttable align="left" suppress-title="true">
- <ttcol>Name</ttcol>
- <ttcol>Code</ttcol>
- <ttcol>Description</ttcol>
- <ttcol>Specification</ttcol>
- <c>NO_ERROR</c><c>0x0</c>
- <c>Graceful shutdown</c>
- <c><xref target="ErrorCodes"/></c>
- <c>PROTOCOL_ERROR</c><c>0x1</c>
- <c>Protocol error detected</c>
- <c><xref target="ErrorCodes"/></c>
- <c>INTERNAL_ERROR</c><c>0x2</c>
- <c>Implementation fault</c>
- <c><xref target="ErrorCodes"/></c>
- <c>FLOW_CONTROL_ERROR</c><c>0x3</c>
- <c>Flow control limits exceeded</c>
- <c><xref target="ErrorCodes"/></c>
- <c>SETTINGS_TIMEOUT</c><c>0x4</c>
- <c>Settings not acknowledged</c>
- <c><xref target="ErrorCodes"/></c>
- <c>STREAM_CLOSED</c><c>0x5</c>
- <c>Frame received for closed stream</c>
- <c><xref target="ErrorCodes"/></c>
- <c>FRAME_SIZE_ERROR</c><c>0x6</c>
- <c>Frame size incorrect</c>
- <c><xref target="ErrorCodes"/></c>
- <c>REFUSED_STREAM</c><c>0x7</c>
- <c>Stream not processed</c>
- <c><xref target="ErrorCodes"/></c>
- <c>CANCEL</c><c>0x8</c>
- <c>Stream cancelled</c>
- <c><xref target="ErrorCodes"/></c>
- <c>COMPRESSION_ERROR</c><c>0x9</c>
- <c>Compression state not updated</c>
- <c><xref target="ErrorCodes"/></c>
- <c>CONNECT_ERROR</c><c>0xa</c>
- <c>TCP connection error for CONNECT method</c>
- <c><xref target="ErrorCodes"/></c>
- <c>ENHANCE_YOUR_CALM</c><c>0xb</c>
- <c>Processing capacity exceeded</c>
- <c><xref target="ErrorCodes"/></c>
- <c>INADEQUATE_SECURITY</c><c>0xc</c>
- <c>Negotiated TLS parameters not acceptable</c>
- <c><xref target="ErrorCodes"/></c>
- </texttable>
-
- </section>
-
- <section title="HTTP2-Settings Header Field Registration">
- <t>
- This section registers the <spanx style="verb">HTTP2-Settings</spanx> header field in the
- <xref target="BCP90">Permanent Message Header Field Registry</xref>.
- <list style="hanging">
- <t hangText="Header field name:">
- HTTP2-Settings
- </t>
- <t hangText="Applicable protocol:">
- http
- </t>
- <t hangText="Status:">
- standard
- </t>
- <t hangText="Author/Change controller:">
- IETF
- </t>
- <t hangText="Specification document(s):">
- <xref target="Http2SettingsHeader"/> of this document
- </t>
- <t hangText="Related information:">
- This header field is only used by an HTTP/2 client for Upgrade-based negotiation.
- </t>
- </list>
- </t>
- </section>
-
- <section title="PRI Method Registration">
- <t>
- This section registers the <spanx style="verb">PRI</spanx> method in the HTTP Method
- Registry (<xref target="RFC7231" x:fmt="," x:rel="#method.registry"/>).
- <list style="hanging">
- <t hangText="Method Name:">
- PRI
- </t>
- <t hangText="Safe">
- No
- </t>
- <t hangText="Idempotent">
- No
- </t>
- <t hangText="Specification document(s)">
- <xref target="ConnectionHeader"/> of this document
- </t>
- <t hangText="Related information:">
- This method is never used by an actual client. This method will appear to be used
- when an HTTP/1.1 server or intermediary attempts to parse an HTTP/2 connection
- preface.
- </t>
- </list>
- </t>
- </section>
-
- <section title="The 421 (Misdirected Request) HTTP Status Code"
- anchor="iana-MisdirectedRequest">
- <t>
- This document registers the 421 (Misdirected Request) HTTP Status code in the Hypertext
- Transfer Protocol (HTTP) Status Code Registry (<xref target="RFC7231" x:fmt=","
- x:rel="#status.code.registry"/>).
- </t>
- <t>
- <list style="hanging">
- <t hangText="Status Code:">
- 421
- </t>
- <t hangText="Short Description:">
- Misdirected Request
- </t>
- <t hangText="Specification:">
- <xref target="MisdirectedRequest"/> of this document
- </t>
- </list>
- </t>
- </section>
-
- </section>
-
- <section title="Acknowledgements">
- <t>
- This document includes substantial input from the following individuals:
- <list style="symbols">
- <t>
- Adam Langley, Wan-Teh Chang, Jim Morrison, Mark Nottingham, Alyssa Wilk, Costin
- Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin
- Peters, Kent Alstad, Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton (SPDY
- contributors).
- </t>
- <t>
- Gabriel Montenegro and Willy Tarreau (Upgrade mechanism).
- </t>
- <t>
- William Chan, Salvatore Loreto, Osama Mazahir, Gabriel Montenegro, Jitu Padhye, Roberto
- Peon, Rob Trace (Flow control).
- </t>
- <t>
- Mike Bishop (Extensibility).
- </t>
- <t>
- Mark Nottingham, Julian Reschke, James Snell, Jeff Pinner, Mike Bishop, Herve Ruellan
- (Substantial editorial contributions).
- </t>
- <t>
- Kari Hurtta, Tatsuhiro Tsujikawa, Greg Wilkins, Poul-Henning Kamp.
- </t>
- <t>
- Alexey Melnikov was an editor of this document during 2013.
- </t>
- <t>
- A substantial proportion of Martin's contribution was supported by Microsoft during his
- employment there.
- </t>
- </list>
- </t>
- </section>
- </middle>
-
- <back>
- <references title="Normative References">
- <reference anchor="COMPRESSION">
- <front>
- <title>HPACK - Header Compression for HTTP/2</title>
- <author initials="H." surname="Ruellan" fullname="Herve Ruellan"/>
- <author initials="R." surname="Peon" fullname="Roberto Peon"/>
- <date month="July" year="2014" />
- </front>
- <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-header-compression-09" />
- <x:source href="refs/draft-ietf-httpbis-header-compression-09.xml"/>
- </reference>
-
- <reference anchor="TCP">
- <front>
- <title abbrev="Transmission Control Protocol">
- Transmission Control Protocol
- </title>
- <author initials="J." surname="Postel" fullname="Jon Postel">
- <organization>University of Southern California (USC)/Information Sciences
- Institute</organization>
- </author>
- <date year="1981" month="September" />
- </front>
- <seriesInfo name="STD" value="7" />
- <seriesInfo name="RFC" value="793" />
- </reference>
-
- <reference anchor="RFC2119">
- <front>
- <title>
- Key words for use in RFCs to Indicate Requirement Levels
- </title>
- <author initials="S." surname="Bradner" fullname="Scott Bradner">
- <organization>Harvard University</organization>
- <address><email>sob@harvard.edu</email></address>
- </author>
- <date month="March" year="1997"/>
- </front>
- <seriesInfo name="BCP" value="14"/>
- <seriesInfo name="RFC" value="2119"/>
- </reference>
-
- <reference anchor="RFC2818">
- <front>
- <title>
- HTTP Over TLS
- </title>
- <author initials="E." surname="Rescorla" fullname="Eric Rescorla"/>
- <date month="May" year="2000"/>
- </front>
- <seriesInfo name="RFC" value="2818"/>
- </reference>
-
- <reference anchor="RFC3986">
- <front>
- <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic
- Syntax</title>
- <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"></author>
- <author initials="R." surname="Fielding" fullname="Roy T. Fielding"></author>
- <author initials="L." surname="Masinter" fullname="Larry Masinter"></author>
- <date year="2005" month="January" />
- </front>
- <seriesInfo name="STD" value="66" />
- <seriesInfo name="RFC" value="3986" />
- </reference>
-
- <reference anchor="RFC4648">
- <front>
- <title>The Base16, Base32, and Base64 Data Encodings</title>
- <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
- <date year="2006" month="October"/>
- </front>
- <seriesInfo value="4648" name="RFC"/>
- </reference>
-
- <reference anchor="RFC5226">
- <front>
- <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
- <author initials="T." surname="Narten" fullname="T. Narten"/>
- <author initials="H." surname="Alvestrand" fullname="H. Alvestrand"/>
- <date year="2008" month="May" />
- </front>
- <seriesInfo name="BCP" value="26" />
- <seriesInfo name="RFC" value="5226" />
- </reference>
-
- <reference anchor="RFC5234">
- <front>
- <title>Augmented BNF for Syntax Specifications: ABNF</title>
- <author initials="D." surname="Crocker" fullname="D. Crocker"/>
- <author initials="P." surname="Overell" fullname="P. Overell"/>
- <date year="2008" month="January" />
- </front>
- <seriesInfo name="STD" value="68" />
- <seriesInfo name="RFC" value="5234" />
- </reference>
-
- <reference anchor="TLS12">
- <front>
- <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
- <author initials="T." surname="Dierks" fullname="Tim Dierks"/>
- <author initials="E." surname="Rescorla" fullname="Eric Rescorla"/>
- <date year="2008" month="August" />
- </front>
- <seriesInfo name="RFC" value="5246" />
- </reference>
-
- <reference anchor="TLS-EXT">
- <front>
- <title>
- Transport Layer Security (TLS) Extensions: Extension Definitions
- </title>
- <author initials="D." surname="Eastlake" fullname="D. Eastlake"/>
- <date year="2011" month="January"/>
- </front>
- <seriesInfo name="RFC" value="6066"/>
- </reference>
-
- <reference anchor="TLS-ALPN">
- <front>
- <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
- <author initials="S." surname="Friedl" fullname="Stephan Friedl"></author>
- <author initials="A." surname="Popov" fullname="Andrei Popov"></author>
- <author initials="A." surname="Langley" fullname="Adam Langley"></author>
- <author initials="E." surname="Stephan" fullname="Emile Stephan"></author>
- <date month="July" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7301" />
- </reference>
-
- <reference anchor="TLS-ECDHE">
- <front>
- <title>
- TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois
- Counter Mode (GCM)
- </title>
- <author initials="E." surname="Rescorla" fullname="E. Rescorla"/>
- <date year="2008" month="August" />
- </front>
- <seriesInfo name="RFC" value="5289" />
- </reference>
-
- <reference anchor="FIPS186">
- <front>
- <title>
- Digital Signature Standard (DSS)
- </title>
- <author><organization>NIST</organization></author>
- <date year="2013" month="July" />
- </front>
- <seriesInfo name="FIPS" value="PUB 186-4" />
- </reference>
-
- <reference anchor="RFC7230">
- <front>
- <title>
- Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
- <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7230" />
- <x:source href="refs/rfc7230.xml"
- basename="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230"/>
- </reference>
- <reference anchor="RFC7231">
- <front>
- <title>
- Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
- <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7231" />
- <x:source href="refs/rfc7231.xml"
- basename="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231"/>
- </reference>
- <reference anchor="RFC7232">
- <front>
- <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
- <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7232" />
- </reference>
- <reference anchor="RFC7233">
- <front>
- <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
- <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
- <organization abbrev="W3C">World Wide Web Consortium</organization>
- <address><email>ylafon@w3.org</email></address>
- </author>
- <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7233" />
- </reference>
- <reference anchor="RFC7234">
- <front>
- <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
- <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
- <organization>Akamai</organization>
- <address><email>mnot@mnot.net</email></address>
- </author>
- <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7234"/>
- <x:source href="refs/rfc7234.xml"
- basename="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7234"/>
- </reference>
- <reference anchor="RFC7235">
- <front>
- <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
- <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
- <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
- <address><email>fielding@gbiv.com</email></address>
- </author>
- <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
- <organization abbrev="greenbytes">greenbytes GmbH</organization>
- <address><email>julian.reschke@greenbytes.de</email></address>
- </author>
- <date month="June" year="2014" />
- </front>
- <seriesInfo name="RFC" value="7235"/>
- <x:source href="refs/rfc7235.xml"
- basename="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7235"/>
- </reference>
-
- <reference anchor="COOKIE">
- <front>
- <title>HTTP State Management Mechanism</title>
- <author initials="A." surname="Barth" fullname="A. Barth"/>
- <date year="2011" month="April" />
- </front>
- <seriesInfo name="RFC" value="6265" />
- </reference>
- </references>
-
- <references title="Informative References">
- <reference anchor="RFC1323">
- <front>
- <title>
- TCP Extensions for High Performance
- </title>
- <author initials="V." surname="Jacobson" fullname="Van Jacobson"></author>
- <author initials="B." surname="Braden" fullname="Bob Braden"></author>
- <author initials="D." surname="Borman" fullname="Dave Borman"></author>
- <date year="1992" month="May" />
- </front>
- <seriesInfo name="RFC" value="1323" />
- </reference>
-
- <reference anchor="RFC3749">
- <front>
- <title>Transport Layer Security Protocol Compression Methods</title>
- <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck"/>
- <date year="2004" month="May" />
- </front>
- <seriesInfo name="RFC" value="3749" />
- </reference>
-
- <reference anchor="RFC6585">
- <front>
- <title>Additional HTTP Status Codes</title>
- <author initials="M." surname="Nottingham" fullname="Mark Nottingham"/>
- <author initials="R." surname="Fielding" fullname="Roy Fielding"/>
- <date year="2012" month="April" />
- </front>
- <seriesInfo name="RFC" value="6585" />
- </reference>
-
- <reference anchor="RFC4492">
- <front>
- <title>
- Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS)
- </title>
- <author initials="S." surname="Blake-Wilson" fullname="S. Blake-Wilson"/>
- <author initials="N." surname="Bolyard" fullname="N. Bolyard"/>
- <author initials="V." surname="Gupta" fullname="V. Gupta"/>
- <author initials="C." surname="Hawk" fullname="C. Hawk"/>
- <author initials="B." surname="Moeller" fullname="B. Moeller"/>
- <date year="2006" month="May" />
- </front>
- <seriesInfo name="RFC" value="4492" />
- </reference>
-
- <reference anchor="RFC5288">
- <front>
- <title>
- AES Galois Counter Mode (GCM) Cipher Suites for TLS
- </title>
- <author initials="J." surname="Salowey" fullname="J. Salowey"/>
- <author initials="A." surname="Choudhury" fullname="A. Choudhury"/>
- <author initials="D." surname="McGrew" fullname="D. McGrew"/>
- <date year="2008" month="August" />
- </front>
- <seriesInfo name="RFC" value="5288" />
- </reference>
-
- <reference anchor='HTML5'
- target='http://www.w3.org/TR/2014/CR-html5-20140731/'>
- <front>
- <title>HTML5</title>
- <author fullname='Robin Berjon' surname='Berjon' initials='R.'/>
- <author fullname='Steve Faulkner' surname='Faulkner' initials='S.'/>
- <author fullname='Travis Leithead' surname='Leithead' initials='T.'/>
- <author fullname='Erika Doyle Navara' surname='Doyle Navara' initials='E.'/>
- <author fullname='Edward O&apos;Connor' surname='O&apos;Connor' initials='E.'/>
- <author fullname='Silvia Pfeiffer' surname='Pfeiffer' initials='S.'/>
- <date year='2014' month='July' day='31'/>
- </front>
- <seriesInfo name='W3C Candidate Recommendation' value='CR-html5-20140731'/>
- <annotation>
- Latest version available at
- <eref target='http://www.w3.org/TR/html5/'/>.
- </annotation>
- </reference>
-
- <reference anchor="TALKING" target="http://w2spconf.com/2011/papers/websocket.pdf">
- <front>
- <title>
- Talking to Yourself for Fun and Profit
- </title>
- <author initials="L-S." surname="Huang"/>
- <author initials="E." surname="Chen"/>
- <author initials="A." surname="Barth"/>
- <author initials="E." surname="Rescorla"/>
- <author initials="C." surname="Jackson"/>
- <date year="2011" />
- </front>
- </reference>
-
- <reference anchor="BREACH"
- target="http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf">
- <front>
- <title>
- BREACH: Reviving the CRIME Attack
- </title>
- <author initials="Y." surname="Gluck"/>
- <author initials="N." surname="Harris"/>
- <author initials="A." surname="Prado"/>
- <date year="2013" month="July" day="12"/>
- </front>
- </reference>
-
- <reference anchor="BCP90">
- <front>
- <title>Registration Procedures for Message Header Fields</title>
- <author initials="G." surname="Klyne" fullname="G. Klyne">
- <organization>Nine by Nine</organization>
- <address><email>GK-IETF@ninebynine.org</email></address>
- </author>
- <author initials="M." surname="Nottingham" fullname="M. Nottingham">
- <organization>BEA Systems</organization>
- <address><email>mnot@pobox.com</email></address>
- </author>
- <author initials="J." surname="Mogul" fullname="J. Mogul">
- <organization>HP Labs</organization>
- <address><email>JeffMogul@acm.org</email></address>
- </author>
- <date year="2004" month="September" />
- </front>
- <seriesInfo name="BCP" value="90" />
- <seriesInfo name="RFC" value="3864" />
- </reference>
-
- <reference anchor="TLSBCP">
- <front>
- <title>Recommendations for Secure Use of TLS and DTLS</title>
- <author initials="Y" surname="Sheffer" fullname="Yaron Sheffer">
- <organization />
- </author>
- <author initials="R" surname="Holz" fullname="Ralph Holz">
- <organization />
- </author>
- <author initials="P" surname="Saint-Andre" fullname="Peter Saint-Andre">
- <organization />
- </author>
- <date month="June" day="23" year="2014" />
- </front>
- <seriesInfo name="Internet-Draft" value="draft-ietf-uta-tls-bcp-01" />
- </reference>
-
- <reference anchor="ALT-SVC">
- <front>
- <title>
- HTTP Alternative Services
- </title>
- <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
- <organization>Akamai</organization>
- </author>
- <author initials="P." surname="McManus" fullname="Patrick McManus">
- <organization>Mozilla</organization>
- </author>
- <author initials="J." surname="Reschke" fullname="Julian Reschke">
- <organization>greenbytes</organization>
- </author>
- <date year="2014" month="April"/>
- </front>
- <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-alt-svc-02"/>
- <x:source href="refs/draft-ietf-httpbis-alt-svc-02.xml"/>
- </reference>
- </references>
-
- <section title="Change Log" anchor="change.log">
- <t>
- This section is to be removed by RFC Editor before publication.
- </t>
-
- <section title="Since draft-ietf-httpbis-http2-14" anchor="changes.since.draft-ietf-httpbis-http2-14">
- <t>
- Renamed Not Authoritative status code to Misdirected Request.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-13" anchor="changes.since.draft-ietf-httpbis-http2-13">
- <t>
- Pseudo-header fields are now required to appear strictly before regular ones.
- </t>
- <t>
- Restored 1xx series status codes, except 101.
- </t>
- <t>
- Changed frame length field 24-bits. Expanded frame header to 9 octets. Added a setting
- to limit the damage.
- </t>
- <t>
- Added a setting to advise peers of header set size limits.
- </t>
- <t>
- Removed segments.
- </t>
- <t>
- Made non-semantic-bearing <x:ref>HEADERS</x:ref> frames illegal in the HTTP mapping.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-12" anchor="changes.since.draft-ietf-httpbis-http2-12">
- <t>
- Restored extensibility options.
- </t>
- <t>
- Restricting TLS cipher suites to AEAD only.
- </t>
- <t>
- Removing Content-Encoding requirements.
- </t>
- <t>
- Permitting the use of <x:ref>PRIORITY</x:ref> after stream close.
- </t>
- <t>
- Removed ALTSVC frame.
- </t>
- <t>
- Removed BLOCKED frame.
- </t>
- <t>
- Reducing the maximum padding size to 256 octets; removing padding from
- <x:ref>CONTINUATION</x:ref> frames.
- </t>
- <t>
- Removed per-frame GZIP compression.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-11" anchor="changes.since.draft-ietf-httpbis-http2-11">
- <t>
- Added BLOCKED frame (at risk).
- </t>
- <t>
- Simplified priority scheme.
- </t>
- <t>
- Added <x:ref>DATA</x:ref> per-frame GZIP compression.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-10" anchor="changes.since.draft-ietf-httpbis-http2-10">
- <t>
- Changed "connection header" to "connection preface" to avoid confusion.
- </t>
- <t>
- Added dependency-based stream prioritization.
- </t>
- <t>
- Added "h2c" identifier to distinguish between cleartext and secured HTTP/2.
- </t>
- <t>
- Adding missing padding to <x:ref>PUSH_PROMISE</x:ref>.
- </t>
- <t>
- Integrate ALTSVC frame and supporting text.
- </t>
- <t>
- Dropping requirement on "deflate" Content-Encoding.
- </t>
- <t>
- Improving security considerations around use of compression.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-09" anchor="changes.since.draft-ietf-httpbis-http2-09">
- <t>
- Adding padding for data frames.
- </t>
- <t>
- Renumbering frame types, error codes, and settings.
- </t>
- <t>
- Adding INADEQUATE_SECURITY error code.
- </t>
- <t>
- Updating TLS usage requirements to 1.2; forbidding TLS compression.
- </t>
- <t>
- Removing extensibility for frames and settings.
- </t>
- <t>
- Changing setting identifier size.
- </t>
- <t>
- Removing the ability to disable flow control.
- </t>
- <t>
- Changing the protocol identification token to "h2".
- </t>
- <t>
- Changing the use of :authority to make it optional and to allow userinfo in non-HTTP
- cases.
- </t>
- <t>
- Allowing split on 0x0 for Cookie.
- </t>
- <t>
- Reserved PRI method in HTTP/1.1 to avoid possible future collisions.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-08" anchor="changes.since.draft-ietf-httpbis-http2-08">
- <t>
- Added cookie crumbling for more efficient header compression.
- </t>
- <t>
- Added header field ordering with the value-concatenation mechanism.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-07" anchor="changes.since.draft-ietf-httpbis-http2-07">
- <t>
- Marked draft for implementation.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-06" anchor="changes.since.draft-ietf-httpbis-http2-06">
- <t>
- Adding definition for CONNECT method.
- </t>
- <t>
- Constraining the use of push to safe, cacheable methods with no request body.
- </t>
- <t>
- Changing from :host to :authority to remove any potential confusion.
- </t>
- <t>
- Adding setting for header compression table size.
- </t>
- <t>
- Adding settings acknowledgement.
- </t>
- <t>
- Removing unnecessary and potentially problematic flags from CONTINUATION.
- </t>
- <t>
- Added denial of service considerations.
- </t>
- </section>
- <section title="Since draft-ietf-httpbis-http2-05" anchor="changes.since.draft-ietf-httpbis-http2-05">
- <t>
- Marking the draft ready for implementation.
- </t>
- <t>
- Renumbering END_PUSH_PROMISE flag.
- </t>
- <t>
- Editorial clarifications and changes.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-04" anchor="changes.since.draft-ietf-httpbis-http2-04">
- <t>
- Added CONTINUATION frame for HEADERS and PUSH_PROMISE.
- </t>
- <t>
- PUSH_PROMISE is no longer implicitly prohibited if SETTINGS_MAX_CONCURRENT_STREAMS is
- zero.
- </t>
- <t>
- Push expanded to allow all safe methods without a request body.
- </t>
- <t>
- Clarified the use of HTTP header fields in requests and responses. Prohibited HTTP/1.1
- hop-by-hop header fields.
- </t>
- <t>
- Requiring that intermediaries not forward requests with missing or illegal routing
- :-headers.
- </t>
- <t>
- Clarified requirements around handling different frames after stream close, stream reset
- and <x:ref>GOAWAY</x:ref>.
- </t>
- <t>
- Added more specific prohibitions for sending of different frame types in various stream
- states.
- </t>
- <t>
- Making the last received setting value the effective value.
- </t>
- <t>
- Clarified requirements on TLS version, extension and ciphers.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-03" anchor="changes.since.draft-ietf-httpbis-http2-03">
- <t>
- Committed major restructuring atrocities.
- </t>
- <t>
- Added reference to first header compression draft.
- </t>
- <t>
- Added more formal description of frame lifecycle.
- </t>
- <t>
- Moved END_STREAM (renamed from FINAL) back to <x:ref>HEADERS</x:ref>/<x:ref>DATA</x:ref>.
- </t>
- <t>
- Removed HEADERS+PRIORITY, added optional priority to <x:ref>HEADERS</x:ref> frame.
- </t>
- <t>
- Added <x:ref>PRIORITY</x:ref> frame.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-02" anchor="changes.since.draft-ietf-httpbis-http2-02">
- <t>
- Added continuations to frames carrying header blocks.
- </t>
- <t>
- Replaced use of "session" with "connection" to avoid confusion with other HTTP stateful
- concepts, like cookies.
- </t>
- <t>
- Removed "message".
- </t>
- <t>
- Switched to TLS ALPN from NPN.
- </t>
- <t>
- Editorial changes.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-01" anchor="changes.since.draft-ietf-httpbis-http2-01">
- <t>
- Added IANA considerations section for frame types, error codes and settings.
- </t>
- <t>
- Removed data frame compression.
- </t>
- <t>
- Added <x:ref>PUSH_PROMISE</x:ref>.
- </t>
- <t>
- Added globally applicable flags to framing.
- </t>
- <t>
- Removed zlib-based header compression mechanism.
- </t>
- <t>
- Updated references.
- </t>
- <t>
- Clarified stream identifier reuse.
- </t>
- <t>
- Removed CREDENTIALS frame and associated mechanisms.
- </t>
- <t>
- Added advice against naive implementation of flow control.
- </t>
- <t>
- Added session header section.
- </t>
- <t>
- Restructured frame header. Removed distinction between data and control frames.
- </t>
- <t>
- Altered flow control properties to include session-level limits.
- </t>
- <t>
- Added note on cacheability of pushed resources and multiple tenant servers.
- </t>
- <t>
- Changed protocol label form based on discussions.
- </t>
- </section>
-
- <section title="Since draft-ietf-httpbis-http2-00" anchor="changes.since.draft-ietf-httpbis-http2-00">
- <t>
- Changed title throughout.
- </t>
- <t>
- Removed section on Incompatibilities with SPDY draft#2.
- </t>
- <t>
- Changed <x:ref>INTERNAL_ERROR</x:ref> on <x:ref>GOAWAY</x:ref> to have a value of 2 <eref
- target="https://groups.google.com/forum/?fromgroups#!topic/spdy-dev/cfUef2gL3iU"/>.
- </t>
- <t>
- Replaced abstract and introduction.
- </t>
- <t>
- Added section on starting HTTP/2.0, including upgrade mechanism.
- </t>
- <t>
- Removed unused references.
- </t>
- <t>
- Added <xref target="fc-principles">flow control principles</xref> based on <eref
- target="https://tools.ietf.org/html/draft-montenegro-httpbis-http2-fc-principles-01"/>.
- </t>
- </section>
-
- <section title="Since draft-mbelshe-httpbis-spdy-00" anchor="changes.since.draft-mbelshe-httpbis-spdy-00">
- <t>
- Adopted as base for draft-ietf-httpbis-http2.
- </t>
- <t>
- Updated authors/editors list.
- </t>
- <t>
- Added status note.
- </t>
- </section>
- </section>
-
- </back>
-</rfc>
-<!--
- vim:et:tw=100:sw=2:
- -->
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport.go
deleted file mode 100644
index c65f1a397..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport.go
+++ /dev/null
@@ -1,2284 +0,0 @@
-// Copyright 2015 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 file.
-
-// Transport code.
-
-package http2
-
-import (
- "bufio"
- "bytes"
- "compress/gzip"
- "crypto/rand"
- "crypto/tls"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "math"
- mathrand "math/rand"
- "net"
- "net/http"
- "sort"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/http2/hpack"
- "golang.org/x/net/idna"
- "golang.org/x/net/lex/httplex"
-)
-
-const (
- // transportDefaultConnFlow is how many connection-level flow control
- // tokens we give the server at start-up, past the default 64k.
- transportDefaultConnFlow = 1 << 30
-
- // transportDefaultStreamFlow is how many stream-level flow
- // control tokens we announce to the peer, and how many bytes
- // we buffer per stream.
- transportDefaultStreamFlow = 4 << 20
-
- // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send
- // a stream-level WINDOW_UPDATE for at a time.
- transportDefaultStreamMinRefresh = 4 << 10
-
- defaultUserAgent = "Go-http-client/2.0"
-)
-
-// Transport is an HTTP/2 Transport.
-//
-// A Transport internally caches connections to servers. It is safe
-// for concurrent use by multiple goroutines.
-type Transport struct {
- // DialTLS specifies an optional dial function for creating
- // TLS connections for requests.
- //
- // If DialTLS is nil, tls.Dial is used.
- //
- // If the returned net.Conn has a ConnectionState method like tls.Conn,
- // it will be used to set http.Response.TLS.
- DialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error)
-
- // TLSClientConfig specifies the TLS configuration to use with
- // tls.Client. If nil, the default configuration is used.
- TLSClientConfig *tls.Config
-
- // ConnPool optionally specifies an alternate connection pool to use.
- // If nil, the default is used.
- ConnPool ClientConnPool
-
- // DisableCompression, if true, prevents the Transport from
- // requesting compression with an "Accept-Encoding: gzip"
- // request header when the Request contains no existing
- // Accept-Encoding value. If the Transport requests gzip on
- // its own and gets a gzipped response, it's transparently
- // decoded in the Response.Body. However, if the user
- // explicitly requested gzip it is not automatically
- // uncompressed.
- DisableCompression bool
-
- // AllowHTTP, if true, permits HTTP/2 requests using the insecure,
- // plain-text "http" scheme. Note that this does not enable h2c support.
- AllowHTTP bool
-
- // MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to
- // send in the initial settings frame. It is how many bytes
- // of response headers are allowed. Unlike the http2 spec, zero here
- // means to use a default limit (currently 10MB). If you actually
- // want to advertise an ulimited value to the peer, Transport
- // interprets the highest possible value here (0xffffffff or 1<<32-1)
- // to mean no limit.
- MaxHeaderListSize uint32
-
- // t1, if non-nil, is the standard library Transport using
- // this transport. Its settings are used (but not its
- // RoundTrip method, etc).
- t1 *http.Transport
-
- connPoolOnce sync.Once
- connPoolOrDef ClientConnPool // non-nil version of ConnPool
-}
-
-func (t *Transport) maxHeaderListSize() uint32 {
- if t.MaxHeaderListSize == 0 {
- return 10 << 20
- }
- if t.MaxHeaderListSize == 0xffffffff {
- return 0
- }
- return t.MaxHeaderListSize
-}
-
-func (t *Transport) disableCompression() bool {
- return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
-}
-
-var errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6")
-
-// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2.
-// It requires Go 1.6 or later and returns an error if the net/http package is too old
-// or if t1 has already been HTTP/2-enabled.
-func ConfigureTransport(t1 *http.Transport) error {
- _, err := configureTransport(t1) // in configure_transport.go (go1.6) or not_go16.go
- return err
-}
-
-func (t *Transport) connPool() ClientConnPool {
- t.connPoolOnce.Do(t.initConnPool)
- return t.connPoolOrDef
-}
-
-func (t *Transport) initConnPool() {
- if t.ConnPool != nil {
- t.connPoolOrDef = t.ConnPool
- } else {
- t.connPoolOrDef = &clientConnPool{t: t}
- }
-}
-
-// ClientConn is the state of a single HTTP/2 client connection to an
-// HTTP/2 server.
-type ClientConn struct {
- t *Transport
- tconn net.Conn // usually *tls.Conn, except specialized impls
- tlsState *tls.ConnectionState // nil only for specialized impls
- singleUse bool // whether being used for a single http.Request
-
- // readLoop goroutine fields:
- readerDone chan struct{} // closed on error
- readerErr error // set before readerDone is closed
-
- idleTimeout time.Duration // or 0 for never
- idleTimer *time.Timer
-
- mu sync.Mutex // guards following
- cond *sync.Cond // hold mu; broadcast on flow/closed changes
- flow flow // our conn-level flow control quota (cs.flow is per stream)
- inflow flow // peer's conn-level flow control
- closed bool
- wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back
- goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received
- goAwayDebug string // goAway frame's debug data, retained as a string
- streams map[uint32]*clientStream // client-initiated
- nextStreamID uint32
- pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams
- pings map[[8]byte]chan struct{} // in flight ping data to notification channel
- bw *bufio.Writer
- br *bufio.Reader
- fr *Framer
- lastActive time.Time
- // Settings from peer: (also guarded by mu)
- maxFrameSize uint32
- maxConcurrentStreams uint32
- peerMaxHeaderListSize uint64
- initialWindowSize uint32
-
- hbuf bytes.Buffer // HPACK encoder writes into this
- henc *hpack.Encoder
- freeBuf [][]byte
-
- wmu sync.Mutex // held while writing; acquire AFTER mu if holding both
- werr error // first write error that has occurred
-}
-
-// clientStream is the state for a single HTTP/2 stream. One of these
-// is created for each Transport.RoundTrip call.
-type clientStream struct {
- cc *ClientConn
- req *http.Request
- trace *clientTrace // or nil
- ID uint32
- resc chan resAndError
- bufPipe pipe // buffered pipe with the flow-controlled response payload
- startedWrite bool // started request body write; guarded by cc.mu
- requestedGzip bool
- on100 func() // optional code to run if get a 100 continue response
-
- flow flow // guarded by cc.mu
- inflow flow // guarded by cc.mu
- bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read
- readErr error // sticky read error; owned by transportResponseBody.Read
- stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu
- didReset bool // whether we sent a RST_STREAM to the server; guarded by cc.mu
-
- peerReset chan struct{} // closed on peer reset
- resetErr error // populated before peerReset is closed
-
- done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu
-
- // owned by clientConnReadLoop:
- firstByte bool // got the first response byte
- pastHeaders bool // got first MetaHeadersFrame (actual headers)
- pastTrailers bool // got optional second MetaHeadersFrame (trailers)
-
- trailer http.Header // accumulated trailers
- resTrailer *http.Header // client's Response.Trailer
-}
-
-// awaitRequestCancel waits for the user to cancel a request or for the done
-// channel to be signaled. A non-nil error is returned only if the request was
-// canceled.
-func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
- ctx := reqContext(req)
- if req.Cancel == nil && ctx.Done() == nil {
- return nil
- }
- select {
- case <-req.Cancel:
- return errRequestCanceled
- case <-ctx.Done():
- return ctx.Err()
- case <-done:
- return nil
- }
-}
-
-// awaitRequestCancel waits for the user to cancel a request, its context to
-// expire, or for the request to be done (any way it might be removed from the
-// cc.streams map: peer reset, successful completion, TCP connection breakage,
-// etc). If the request is canceled, then cs will be canceled and closed.
-func (cs *clientStream) awaitRequestCancel(req *http.Request) {
- if err := awaitRequestCancel(req, cs.done); err != nil {
- cs.cancelStream()
- cs.bufPipe.CloseWithError(err)
- }
-}
-
-func (cs *clientStream) cancelStream() {
- cc := cs.cc
- cc.mu.Lock()
- didReset := cs.didReset
- cs.didReset = true
- cc.mu.Unlock()
-
- if !didReset {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- cc.forgetStreamID(cs.ID)
- }
-}
-
-// checkResetOrDone reports any error sent in a RST_STREAM frame by the
-// server, or errStreamClosed if the stream is complete.
-func (cs *clientStream) checkResetOrDone() error {
- select {
- case <-cs.peerReset:
- return cs.resetErr
- case <-cs.done:
- return errStreamClosed
- default:
- return nil
- }
-}
-
-func (cs *clientStream) getStartedWrite() bool {
- cc := cs.cc
- cc.mu.Lock()
- defer cc.mu.Unlock()
- return cs.startedWrite
-}
-
-func (cs *clientStream) abortRequestBodyWrite(err error) {
- if err == nil {
- panic("nil error")
- }
- cc := cs.cc
- cc.mu.Lock()
- cs.stopReqBody = err
- cc.cond.Broadcast()
- cc.mu.Unlock()
-}
-
-type stickyErrWriter struct {
- w io.Writer
- err *error
-}
-
-func (sew stickyErrWriter) Write(p []byte) (n int, err error) {
- if *sew.err != nil {
- return 0, *sew.err
- }
- n, err = sew.w.Write(p)
- *sew.err = err
- return
-}
-
-var ErrNoCachedConn = errors.New("http2: no cached connection was available")
-
-// RoundTripOpt are options for the Transport.RoundTripOpt method.
-type RoundTripOpt struct {
- // OnlyCachedConn controls whether RoundTripOpt may
- // create a new TCP connection. If set true and
- // no cached connection is available, RoundTripOpt
- // will return ErrNoCachedConn.
- OnlyCachedConn bool
-}
-
-func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
- return t.RoundTripOpt(req, RoundTripOpt{})
-}
-
-// authorityAddr returns a given authority (a host/IP, or host:port / ip:port)
-// and returns a host:port. The port 443 is added if needed.
-func authorityAddr(scheme string, authority string) (addr string) {
- host, port, err := net.SplitHostPort(authority)
- if err != nil { // authority didn't have a port
- port = "443"
- if scheme == "http" {
- port = "80"
- }
- host = authority
- }
- if a, err := idna.ToASCII(host); err == nil {
- host = a
- }
- // IPv6 address literal, without a port:
- if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
- return host + ":" + port
- }
- return net.JoinHostPort(host, port)
-}
-
-// RoundTripOpt is like RoundTrip, but takes options.
-func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
- if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
- return nil, errors.New("http2: unsupported scheme")
- }
-
- addr := authorityAddr(req.URL.Scheme, req.URL.Host)
- for retry := 0; ; retry++ {
- cc, err := t.connPool().GetClientConn(req, addr)
- if err != nil {
- t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err)
- return nil, err
- }
- traceGotConn(req, cc)
- res, gotErrAfterReqBodyWrite, err := cc.roundTrip(req)
- if err != nil && retry <= 6 {
- if req, err = shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); err == nil {
- // After the first retry, do exponential backoff with 10% jitter.
- if retry == 0 {
- continue
- }
- backoff := float64(uint(1) << (uint(retry) - 1))
- backoff += backoff * (0.1 * mathrand.Float64())
- select {
- case <-time.After(time.Second * time.Duration(backoff)):
- continue
- case <-reqContext(req).Done():
- return nil, reqContext(req).Err()
- }
- }
- }
- if err != nil {
- t.vlogf("RoundTrip failure: %v", err)
- return nil, err
- }
- return res, nil
- }
-}
-
-// CloseIdleConnections closes any connections which were previously
-// connected from previous requests but are now sitting idle.
-// It does not interrupt any connections currently in use.
-func (t *Transport) CloseIdleConnections() {
- if cp, ok := t.connPool().(clientConnPoolIdleCloser); ok {
- cp.closeIdleConnections()
- }
-}
-
-var (
- errClientConnClosed = errors.New("http2: client conn is closed")
- errClientConnUnusable = errors.New("http2: client conn not usable")
- errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY")
-)
-
-// shouldRetryRequest is called by RoundTrip when a request fails to get
-// response headers. It is always called with a non-nil error.
-// It returns either a request to retry (either the same request, or a
-// modified clone), or an error if the request can't be replayed.
-func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) {
- if !canRetryError(err) {
- return nil, err
- }
- if !afterBodyWrite {
- return req, nil
- }
- // If the Body is nil (or http.NoBody), it's safe to reuse
- // this request and its Body.
- if req.Body == nil || reqBodyIsNoBody(req.Body) {
- return req, nil
- }
- // Otherwise we depend on the Request having its GetBody
- // func defined.
- getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody
- if getBody == nil {
- return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err)
- }
- body, err := getBody()
- if err != nil {
- return nil, err
- }
- newReq := *req
- newReq.Body = body
- return &newReq, nil
-}
-
-func canRetryError(err error) bool {
- if err == errClientConnUnusable || err == errClientConnGotGoAway {
- return true
- }
- if se, ok := err.(StreamError); ok {
- return se.Code == ErrCodeRefusedStream
- }
- return false
-}
-
-func (t *Transport) dialClientConn(addr string, singleUse bool) (*ClientConn, error) {
- host, _, err := net.SplitHostPort(addr)
- if err != nil {
- return nil, err
- }
- tconn, err := t.dialTLS()("tcp", addr, t.newTLSConfig(host))
- if err != nil {
- return nil, err
- }
- return t.newClientConn(tconn, singleUse)
-}
-
-func (t *Transport) newTLSConfig(host string) *tls.Config {
- cfg := new(tls.Config)
- if t.TLSClientConfig != nil {
- *cfg = *cloneTLSConfig(t.TLSClientConfig)
- }
- if !strSliceContains(cfg.NextProtos, NextProtoTLS) {
- cfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...)
- }
- if cfg.ServerName == "" {
- cfg.ServerName = host
- }
- return cfg
-}
-
-func (t *Transport) dialTLS() func(string, string, *tls.Config) (net.Conn, error) {
- if t.DialTLS != nil {
- return t.DialTLS
- }
- return t.dialTLSDefault
-}
-
-func (t *Transport) dialTLSDefault(network, addr string, cfg *tls.Config) (net.Conn, error) {
- cn, err := tls.Dial(network, addr, cfg)
- if err != nil {
- return nil, err
- }
- if err := cn.Handshake(); err != nil {
- return nil, err
- }
- if !cfg.InsecureSkipVerify {
- if err := cn.VerifyHostname(cfg.ServerName); err != nil {
- return nil, err
- }
- }
- state := cn.ConnectionState()
- if p := state.NegotiatedProtocol; p != NextProtoTLS {
- return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS)
- }
- if !state.NegotiatedProtocolIsMutual {
- return nil, errors.New("http2: could not negotiate protocol mutually")
- }
- return cn, nil
-}
-
-// disableKeepAlives reports whether connections should be closed as
-// soon as possible after handling the first request.
-func (t *Transport) disableKeepAlives() bool {
- return t.t1 != nil && t.t1.DisableKeepAlives
-}
-
-func (t *Transport) expectContinueTimeout() time.Duration {
- if t.t1 == nil {
- return 0
- }
- return transportExpectContinueTimeout(t.t1)
-}
-
-func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
- return t.newClientConn(c, false)
-}
-
-func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) {
- cc := &ClientConn{
- t: t,
- tconn: c,
- readerDone: make(chan struct{}),
- nextStreamID: 1,
- maxFrameSize: 16 << 10, // spec default
- initialWindowSize: 65535, // spec default
- maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough.
- peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
- streams: make(map[uint32]*clientStream),
- singleUse: singleUse,
- wantSettingsAck: true,
- pings: make(map[[8]byte]chan struct{}),
- }
- if d := t.idleConnTimeout(); d != 0 {
- cc.idleTimeout = d
- cc.idleTimer = time.AfterFunc(d, cc.onIdleTimeout)
- }
- if VerboseLogs {
- t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr())
- }
-
- cc.cond = sync.NewCond(&cc.mu)
- cc.flow.add(int32(initialWindowSize))
-
- // TODO: adjust this writer size to account for frame size +
- // MTU + crypto/tls record padding.
- cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr})
- cc.br = bufio.NewReader(c)
- cc.fr = NewFramer(cc.bw, cc.br)
- cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
- cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
-
- // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on
- // henc in response to SETTINGS frames?
- cc.henc = hpack.NewEncoder(&cc.hbuf)
-
- if cs, ok := c.(connectionStater); ok {
- state := cs.ConnectionState()
- cc.tlsState = &state
- }
-
- initialSettings := []Setting{
- {ID: SettingEnablePush, Val: 0},
- {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
- }
- if max := t.maxHeaderListSize(); max != 0 {
- initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})
- }
-
- cc.bw.Write(clientPreface)
- cc.fr.WriteSettings(initialSettings...)
- cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow)
- cc.inflow.add(transportDefaultConnFlow + initialWindowSize)
- cc.bw.Flush()
- if cc.werr != nil {
- return nil, cc.werr
- }
-
- go cc.readLoop()
- return cc, nil
-}
-
-func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
- cc.mu.Lock()
- defer cc.mu.Unlock()
-
- old := cc.goAway
- cc.goAway = f
-
- // Merge the previous and current GoAway error frames.
- if cc.goAwayDebug == "" {
- cc.goAwayDebug = string(f.DebugData())
- }
- if old != nil && old.ErrCode != ErrCodeNo {
- cc.goAway.ErrCode = old.ErrCode
- }
- last := f.LastStreamID
- for streamID, cs := range cc.streams {
- if streamID > last {
- select {
- case cs.resc <- resAndError{err: errClientConnGotGoAway}:
- default:
- }
- }
- }
-}
-
-// CanTakeNewRequest reports whether the connection can take a new request,
-// meaning it has not been closed or received or sent a GOAWAY.
-func (cc *ClientConn) CanTakeNewRequest() bool {
- cc.mu.Lock()
- defer cc.mu.Unlock()
- return cc.canTakeNewRequestLocked()
-}
-
-func (cc *ClientConn) canTakeNewRequestLocked() bool {
- if cc.singleUse && cc.nextStreamID > 1 {
- return false
- }
- return cc.goAway == nil && !cc.closed &&
- int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32
-}
-
-// onIdleTimeout is called from a time.AfterFunc goroutine. It will
-// only be called when we're idle, but because we're coming from a new
-// goroutine, there could be a new request coming in at the same time,
-// so this simply calls the synchronized closeIfIdle to shut down this
-// connection. The timer could just call closeIfIdle, but this is more
-// clear.
-func (cc *ClientConn) onIdleTimeout() {
- cc.closeIfIdle()
-}
-
-func (cc *ClientConn) closeIfIdle() {
- cc.mu.Lock()
- if len(cc.streams) > 0 {
- cc.mu.Unlock()
- return
- }
- cc.closed = true
- nextID := cc.nextStreamID
- // TODO: do clients send GOAWAY too? maybe? Just Close:
- cc.mu.Unlock()
-
- if VerboseLogs {
- cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, nextID-2)
- }
- cc.tconn.Close()
-}
-
-const maxAllocFrameSize = 512 << 10
-
-// frameBuffer returns a scratch buffer suitable for writing DATA frames.
-// They're capped at the min of the peer's max frame size or 512KB
-// (kinda arbitrarily), but definitely capped so we don't allocate 4GB
-// bufers.
-func (cc *ClientConn) frameScratchBuffer() []byte {
- cc.mu.Lock()
- size := cc.maxFrameSize
- if size > maxAllocFrameSize {
- size = maxAllocFrameSize
- }
- for i, buf := range cc.freeBuf {
- if len(buf) >= int(size) {
- cc.freeBuf[i] = nil
- cc.mu.Unlock()
- return buf[:size]
- }
- }
- cc.mu.Unlock()
- return make([]byte, size)
-}
-
-func (cc *ClientConn) putFrameScratchBuffer(buf []byte) {
- cc.mu.Lock()
- defer cc.mu.Unlock()
- const maxBufs = 4 // arbitrary; 4 concurrent requests per conn? investigate.
- if len(cc.freeBuf) < maxBufs {
- cc.freeBuf = append(cc.freeBuf, buf)
- return
- }
- for i, old := range cc.freeBuf {
- if old == nil {
- cc.freeBuf[i] = buf
- return
- }
- }
- // forget about it.
-}
-
-// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not
-// exported. At least they'll be DeepEqual for h1-vs-h2 comparisons tests.
-var errRequestCanceled = errors.New("net/http: request canceled")
-
-func commaSeparatedTrailers(req *http.Request) (string, error) {
- keys := make([]string, 0, len(req.Trailer))
- for k := range req.Trailer {
- k = http.CanonicalHeaderKey(k)
- switch k {
- case "Transfer-Encoding", "Trailer", "Content-Length":
- return "", &badStringError{"invalid Trailer key", k}
- }
- keys = append(keys, k)
- }
- if len(keys) > 0 {
- sort.Strings(keys)
- return strings.Join(keys, ","), nil
- }
- return "", nil
-}
-
-func (cc *ClientConn) responseHeaderTimeout() time.Duration {
- if cc.t.t1 != nil {
- return cc.t.t1.ResponseHeaderTimeout
- }
- // No way to do this (yet?) with just an http2.Transport. Probably
- // no need. Request.Cancel this is the new way. We only need to support
- // this for compatibility with the old http.Transport fields when
- // we're doing transparent http2.
- return 0
-}
-
-// checkConnHeaders checks whether req has any invalid connection-level headers.
-// per RFC 7540 section 8.1.2.2: Connection-Specific Header Fields.
-// Certain headers are special-cased as okay but not transmitted later.
-func checkConnHeaders(req *http.Request) error {
- if v := req.Header.Get("Upgrade"); v != "" {
- return fmt.Errorf("http2: invalid Upgrade request header: %q", req.Header["Upgrade"])
- }
- if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") {
- return fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", vv)
- }
- if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "close" && vv[0] != "keep-alive") {
- return fmt.Errorf("http2: invalid Connection request header: %q", vv)
- }
- return nil
-}
-
-// actualContentLength returns a sanitized version of
-// req.ContentLength, where 0 actually means zero (not unknown) and -1
-// means unknown.
-func actualContentLength(req *http.Request) int64 {
- if req.Body == nil || reqBodyIsNoBody(req.Body) {
- return 0
- }
- if req.ContentLength != 0 {
- return req.ContentLength
- }
- return -1
-}
-
-func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
- resp, _, err := cc.roundTrip(req)
- return resp, err
-}
-
-func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAfterReqBodyWrite bool, err error) {
- if err := checkConnHeaders(req); err != nil {
- return nil, false, err
- }
- if cc.idleTimer != nil {
- cc.idleTimer.Stop()
- }
-
- trailers, err := commaSeparatedTrailers(req)
- if err != nil {
- return nil, false, err
- }
- hasTrailers := trailers != ""
-
- cc.mu.Lock()
- if err := cc.awaitOpenSlotForRequest(req); err != nil {
- cc.mu.Unlock()
- return nil, false, err
- }
-
- body := req.Body
- contentLen := actualContentLength(req)
- hasBody := contentLen != 0
-
- // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
- var requestedGzip bool
- if !cc.t.disableCompression() &&
- req.Header.Get("Accept-Encoding") == "" &&
- req.Header.Get("Range") == "" &&
- req.Method != "HEAD" {
- // Request gzip only, not deflate. Deflate is ambiguous and
- // not as universally supported anyway.
- // See: http://www.gzip.org/zlib/zlib_faq.html#faq38
- //
- // Note that we don't request this for HEAD requests,
- // due to a bug in nginx:
- // http://trac.nginx.org/nginx/ticket/358
- // https://golang.org/issue/5522
- //
- // We don't request gzip if the request is for a range, since
- // auto-decoding a portion of a gzipped document will just fail
- // anyway. See https://golang.org/issue/8923
- requestedGzip = true
- }
-
- // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
- // sent by writeRequestBody below, along with any Trailers,
- // again in form HEADERS{1}, CONTINUATION{0,})
- hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen)
- if err != nil {
- cc.mu.Unlock()
- return nil, false, err
- }
-
- cs := cc.newStream()
- cs.req = req
- cs.trace = requestTrace(req)
- cs.requestedGzip = requestedGzip
- bodyWriter := cc.t.getBodyWriterState(cs, body)
- cs.on100 = bodyWriter.on100
-
- cc.wmu.Lock()
- endStream := !hasBody && !hasTrailers
- werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
- cc.wmu.Unlock()
- traceWroteHeaders(cs.trace)
- cc.mu.Unlock()
-
- if werr != nil {
- if hasBody {
- req.Body.Close() // per RoundTripper contract
- bodyWriter.cancel()
- }
- cc.forgetStreamID(cs.ID)
- // Don't bother sending a RST_STREAM (our write already failed;
- // no need to keep writing)
- traceWroteRequest(cs.trace, werr)
- return nil, false, werr
- }
-
- var respHeaderTimer <-chan time.Time
- if hasBody {
- bodyWriter.scheduleBodyWrite()
- } else {
- traceWroteRequest(cs.trace, nil)
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
- }
- }
-
- readLoopResCh := cs.resc
- bodyWritten := false
- ctx := reqContext(req)
-
- handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) {
- res := re.res
- if re.err != nil || res.StatusCode > 299 {
- // On error or status code 3xx, 4xx, 5xx, etc abort any
- // ongoing write, assuming that the server doesn't care
- // about our request body. If the server replied with 1xx or
- // 2xx, however, then assume the server DOES potentially
- // want our body (e.g. full-duplex streaming:
- // golang.org/issue/13444). If it turns out the server
- // doesn't, they'll RST_STREAM us soon enough. This is a
- // heuristic to avoid adding knobs to Transport. Hopefully
- // we can keep it.
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWrite)
- }
- if re.err != nil {
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), re.err
- }
- res.Request = req
- res.TLS = cc.tlsState
- return res, false, nil
- }
-
- for {
- select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- case <-respHeaderTimer:
- if !hasBody || bodyWritten {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- } else {
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
- }
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), errTimeout
- case <-ctx.Done():
- if !hasBody || bodyWritten {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- } else {
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
- }
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), ctx.Err()
- case <-req.Cancel:
- if !hasBody || bodyWritten {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- } else {
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
- }
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), errRequestCanceled
- case <-cs.peerReset:
- // processResetStream already removed the
- // stream from the streams map; no need for
- // forgetStreamID.
- return nil, cs.getStartedWrite(), cs.resetErr
- case err := <-bodyWriter.resc:
- // Prefer the read loop's response, if available. Issue 16102.
- select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- default:
- }
- if err != nil {
- return nil, cs.getStartedWrite(), err
- }
- bodyWritten = true
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
- }
- }
- }
-}
-
-// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams.
-// Must hold cc.mu.
-func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
- var waitingForConn chan struct{}
- var waitingForConnErr error // guarded by cc.mu
- for {
- cc.lastActive = time.Now()
- if cc.closed || !cc.canTakeNewRequestLocked() {
- return errClientConnUnusable
- }
- if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
- if waitingForConn != nil {
- close(waitingForConn)
- }
- return nil
- }
- // Unfortunately, we cannot wait on a condition variable and channel at
- // the same time, so instead, we spin up a goroutine to check if the
- // request is canceled while we wait for a slot to open in the connection.
- if waitingForConn == nil {
- waitingForConn = make(chan struct{})
- go func() {
- if err := awaitRequestCancel(req, waitingForConn); err != nil {
- cc.mu.Lock()
- waitingForConnErr = err
- cc.cond.Broadcast()
- cc.mu.Unlock()
- }
- }()
- }
- cc.pendingRequests++
- cc.cond.Wait()
- cc.pendingRequests--
- if waitingForConnErr != nil {
- return waitingForConnErr
- }
- }
-}
-
-// requires cc.wmu be held
-func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize int, hdrs []byte) error {
- first := true // first frame written (HEADERS is first, then CONTINUATION)
- for len(hdrs) > 0 && cc.werr == nil {
- chunk := hdrs
- if len(chunk) > maxFrameSize {
- chunk = chunk[:maxFrameSize]
- }
- hdrs = hdrs[len(chunk):]
- endHeaders := len(hdrs) == 0
- if first {
- cc.fr.WriteHeaders(HeadersFrameParam{
- StreamID: streamID,
- BlockFragment: chunk,
- EndStream: endStream,
- EndHeaders: endHeaders,
- })
- first = false
- } else {
- cc.fr.WriteContinuation(streamID, endHeaders, chunk)
- }
- }
- // TODO(bradfitz): this Flush could potentially block (as
- // could the WriteHeaders call(s) above), which means they
- // wouldn't respond to Request.Cancel being readable. That's
- // rare, but this should probably be in a goroutine.
- cc.bw.Flush()
- return cc.werr
-}
-
-// internal error values; they don't escape to callers
-var (
- // abort request body write; don't send cancel
- errStopReqBodyWrite = errors.New("http2: aborting request body write")
-
- // abort request body write, but send stream reset of cancel.
- errStopReqBodyWriteAndCancel = errors.New("http2: canceling request")
-)
-
-func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) {
- cc := cs.cc
- sentEnd := false // whether we sent the final DATA frame w/ END_STREAM
- buf := cc.frameScratchBuffer()
- defer cc.putFrameScratchBuffer(buf)
-
- defer func() {
- traceWroteRequest(cs.trace, err)
- // TODO: write h12Compare test showing whether
- // Request.Body is closed by the Transport,
- // and in multiple cases: server replies <=299 and >299
- // while still writing request body
- cerr := bodyCloser.Close()
- if err == nil {
- err = cerr
- }
- }()
-
- req := cs.req
- hasTrailers := req.Trailer != nil
-
- var sawEOF bool
- for !sawEOF {
- n, err := body.Read(buf)
- if err == io.EOF {
- sawEOF = true
- err = nil
- } else if err != nil {
- return err
- }
-
- remain := buf[:n]
- for len(remain) > 0 && err == nil {
- var allowed int32
- allowed, err = cs.awaitFlowControl(len(remain))
- switch {
- case err == errStopReqBodyWrite:
- return err
- case err == errStopReqBodyWriteAndCancel:
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- return err
- case err != nil:
- return err
- }
- cc.wmu.Lock()
- data := remain[:allowed]
- remain = remain[allowed:]
- sentEnd = sawEOF && len(remain) == 0 && !hasTrailers
- err = cc.fr.WriteData(cs.ID, sentEnd, data)
- if err == nil {
- // TODO(bradfitz): this flush is for latency, not bandwidth.
- // Most requests won't need this. Make this opt-in or
- // opt-out? Use some heuristic on the body type? Nagel-like
- // timers? Based on 'n'? Only last chunk of this for loop,
- // unless flow control tokens are low? For now, always.
- // If we change this, see comment below.
- err = cc.bw.Flush()
- }
- cc.wmu.Unlock()
- }
- if err != nil {
- return err
- }
- }
-
- if sentEnd {
- // Already sent END_STREAM (which implies we have no
- // trailers) and flushed, because currently all
- // WriteData frames above get a flush. So we're done.
- return nil
- }
-
- var trls []byte
- if hasTrailers {
- cc.mu.Lock()
- trls, err = cc.encodeTrailers(req)
- cc.mu.Unlock()
- if err != nil {
- cc.writeStreamReset(cs.ID, ErrCodeInternal, err)
- cc.forgetStreamID(cs.ID)
- return err
- }
- }
-
- cc.mu.Lock()
- maxFrameSize := int(cc.maxFrameSize)
- cc.mu.Unlock()
-
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
-
- // Two ways to send END_STREAM: either with trailers, or
- // with an empty DATA frame.
- if len(trls) > 0 {
- err = cc.writeHeaders(cs.ID, true, maxFrameSize, trls)
- } else {
- err = cc.fr.WriteData(cs.ID, true, nil)
- }
- if ferr := cc.bw.Flush(); ferr != nil && err == nil {
- err = ferr
- }
- return err
-}
-
-// awaitFlowControl waits for [1, min(maxBytes, cc.cs.maxFrameSize)] flow
-// control tokens from the server.
-// It returns either the non-zero number of tokens taken or an error
-// if the stream is dead.
-func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) {
- cc := cs.cc
- cc.mu.Lock()
- defer cc.mu.Unlock()
- for {
- if cc.closed {
- return 0, errClientConnClosed
- }
- if cs.stopReqBody != nil {
- return 0, cs.stopReqBody
- }
- if err := cs.checkResetOrDone(); err != nil {
- return 0, err
- }
- if a := cs.flow.available(); a > 0 {
- take := a
- if int(take) > maxBytes {
-
- take = int32(maxBytes) // can't truncate int; take is int32
- }
- if take > int32(cc.maxFrameSize) {
- take = int32(cc.maxFrameSize)
- }
- cs.flow.take(take)
- return take, nil
- }
- cc.cond.Wait()
- }
-}
-
-type badStringError struct {
- what string
- str string
-}
-
-func (e *badStringError) Error() string { return fmt.Sprintf("%s %q", e.what, e.str) }
-
-// requires cc.mu be held.
-func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) {
- cc.hbuf.Reset()
-
- host := req.Host
- if host == "" {
- host = req.URL.Host
- }
- host, err := httplex.PunycodeHostPort(host)
- if err != nil {
- return nil, err
- }
-
- var path string
- if req.Method != "CONNECT" {
- path = req.URL.RequestURI()
- if !validPseudoPath(path) {
- orig := path
- path = strings.TrimPrefix(path, req.URL.Scheme+"://"+host)
- if !validPseudoPath(path) {
- if req.URL.Opaque != "" {
- return nil, fmt.Errorf("invalid request :path %q from URL.Opaque = %q", orig, req.URL.Opaque)
- } else {
- return nil, fmt.Errorf("invalid request :path %q", orig)
- }
- }
- }
- }
-
- // Check for any invalid headers and return an error before we
- // potentially pollute our hpack state. (We want to be able to
- // continue to reuse the hpack encoder for future requests)
- for k, vv := range req.Header {
- if !httplex.ValidHeaderFieldName(k) {
- return nil, fmt.Errorf("invalid HTTP header name %q", k)
- }
- for _, v := range vv {
- if !httplex.ValidHeaderFieldValue(v) {
- return nil, fmt.Errorf("invalid HTTP header value %q for header %q", v, k)
- }
- }
- }
-
- enumerateHeaders := func(f func(name, value string)) {
- // 8.1.2.3 Request Pseudo-Header Fields
- // The :path pseudo-header field includes the path and query parts of the
- // target URI (the path-absolute production and optionally a '?' character
- // followed by the query production (see Sections 3.3 and 3.4 of
- // [RFC3986]).
- f(":authority", host)
- f(":method", req.Method)
- if req.Method != "CONNECT" {
- f(":path", path)
- f(":scheme", req.URL.Scheme)
- }
- if trailers != "" {
- f("trailer", trailers)
- }
-
- var didUA bool
- for k, vv := range req.Header {
- if strings.EqualFold(k, "host") || strings.EqualFold(k, "content-length") {
- // Host is :authority, already sent.
- // Content-Length is automatic, set below.
- continue
- } else if strings.EqualFold(k, "connection") || strings.EqualFold(k, "proxy-connection") ||
- strings.EqualFold(k, "transfer-encoding") || strings.EqualFold(k, "upgrade") ||
- strings.EqualFold(k, "keep-alive") {
- // Per 8.1.2.2 Connection-Specific Header
- // Fields, don't send connection-specific
- // fields. We have already checked if any
- // are error-worthy so just ignore the rest.
- continue
- } else if strings.EqualFold(k, "user-agent") {
- // Match Go's http1 behavior: at most one
- // User-Agent. If set to nil or empty string,
- // then omit it. Otherwise if not mentioned,
- // include the default (below).
- didUA = true
- if len(vv) < 1 {
- continue
- }
- vv = vv[:1]
- if vv[0] == "" {
- continue
- }
-
- }
-
- for _, v := range vv {
- f(k, v)
- }
- }
- if shouldSendReqContentLength(req.Method, contentLength) {
- f("content-length", strconv.FormatInt(contentLength, 10))
- }
- if addGzipHeader {
- f("accept-encoding", "gzip")
- }
- if !didUA {
- f("user-agent", defaultUserAgent)
- }
- }
-
- // Do a first pass over the headers counting bytes to ensure
- // we don't exceed cc.peerMaxHeaderListSize. This is done as a
- // separate pass before encoding the headers to prevent
- // modifying the hpack state.
- hlSize := uint64(0)
- enumerateHeaders(func(name, value string) {
- hf := hpack.HeaderField{Name: name, Value: value}
- hlSize += uint64(hf.Size())
- })
-
- if hlSize > cc.peerMaxHeaderListSize {
- return nil, errRequestHeaderListSize
- }
-
- // Header list size is ok. Write the headers.
- enumerateHeaders(func(name, value string) {
- cc.writeHeader(strings.ToLower(name), value)
- })
-
- return cc.hbuf.Bytes(), nil
-}
-
-// shouldSendReqContentLength reports whether the http2.Transport should send
-// a "content-length" request header. This logic is basically a copy of the net/http
-// transferWriter.shouldSendContentLength.
-// The contentLength is the corrected contentLength (so 0 means actually 0, not unknown).
-// -1 means unknown.
-func shouldSendReqContentLength(method string, contentLength int64) bool {
- if contentLength > 0 {
- return true
- }
- if contentLength < 0 {
- return false
- }
- // For zero bodies, whether we send a content-length depends on the method.
- // It also kinda doesn't matter for http2 either way, with END_STREAM.
- switch method {
- case "POST", "PUT", "PATCH":
- return true
- default:
- return false
- }
-}
-
-// requires cc.mu be held.
-func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
- cc.hbuf.Reset()
-
- hlSize := uint64(0)
- for k, vv := range req.Trailer {
- for _, v := range vv {
- hf := hpack.HeaderField{Name: k, Value: v}
- hlSize += uint64(hf.Size())
- }
- }
- if hlSize > cc.peerMaxHeaderListSize {
- return nil, errRequestHeaderListSize
- }
-
- for k, vv := range req.Trailer {
- // Transfer-Encoding, etc.. have already been filtered at the
- // start of RoundTrip
- lowKey := strings.ToLower(k)
- for _, v := range vv {
- cc.writeHeader(lowKey, v)
- }
- }
- return cc.hbuf.Bytes(), nil
-}
-
-func (cc *ClientConn) writeHeader(name, value string) {
- if VerboseLogs {
- log.Printf("http2: Transport encoding header %q = %q", name, value)
- }
- cc.henc.WriteField(hpack.HeaderField{Name: name, Value: value})
-}
-
-type resAndError struct {
- res *http.Response
- err error
-}
-
-// requires cc.mu be held.
-func (cc *ClientConn) newStream() *clientStream {
- cs := &clientStream{
- cc: cc,
- ID: cc.nextStreamID,
- resc: make(chan resAndError, 1),
- peerReset: make(chan struct{}),
- done: make(chan struct{}),
- }
- cs.flow.add(int32(cc.initialWindowSize))
- cs.flow.setConnFlow(&cc.flow)
- cs.inflow.add(transportDefaultStreamFlow)
- cs.inflow.setConnFlow(&cc.inflow)
- cc.nextStreamID += 2
- cc.streams[cs.ID] = cs
- return cs
-}
-
-func (cc *ClientConn) forgetStreamID(id uint32) {
- cc.streamByID(id, true)
-}
-
-func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
- cc.mu.Lock()
- defer cc.mu.Unlock()
- cs := cc.streams[id]
- if andRemove && cs != nil && !cc.closed {
- cc.lastActive = time.Now()
- delete(cc.streams, id)
- if len(cc.streams) == 0 && cc.idleTimer != nil {
- cc.idleTimer.Reset(cc.idleTimeout)
- }
- close(cs.done)
- // Wake up checkResetOrDone via clientStream.awaitFlowControl and
- // wake up RoundTrip if there is a pending request.
- cc.cond.Broadcast()
- }
- return cs
-}
-
-// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.
-type clientConnReadLoop struct {
- cc *ClientConn
- closeWhenIdle bool
-}
-
-// readLoop runs in its own goroutine and reads and dispatches frames.
-func (cc *ClientConn) readLoop() {
- rl := &clientConnReadLoop{cc: cc}
- defer rl.cleanup()
- cc.readerErr = rl.run()
- if ce, ok := cc.readerErr.(ConnectionError); ok {
- cc.wmu.Lock()
- cc.fr.WriteGoAway(0, ErrCode(ce), nil)
- cc.wmu.Unlock()
- }
-}
-
-// GoAwayError is returned by the Transport when the server closes the
-// TCP connection after sending a GOAWAY frame.
-type GoAwayError struct {
- LastStreamID uint32
- ErrCode ErrCode
- DebugData string
-}
-
-func (e GoAwayError) Error() string {
- return fmt.Sprintf("http2: server sent GOAWAY and closed the connection; LastStreamID=%v, ErrCode=%v, debug=%q",
- e.LastStreamID, e.ErrCode, e.DebugData)
-}
-
-func isEOFOrNetReadError(err error) bool {
- if err == io.EOF {
- return true
- }
- ne, ok := err.(*net.OpError)
- return ok && ne.Op == "read"
-}
-
-func (rl *clientConnReadLoop) cleanup() {
- cc := rl.cc
- defer cc.tconn.Close()
- defer cc.t.connPool().MarkDead(cc)
- defer close(cc.readerDone)
-
- if cc.idleTimer != nil {
- cc.idleTimer.Stop()
- }
-
- // Close any response bodies if the server closes prematurely.
- // TODO: also do this if we've written the headers but not
- // gotten a response yet.
- err := cc.readerErr
- cc.mu.Lock()
- if cc.goAway != nil && isEOFOrNetReadError(err) {
- err = GoAwayError{
- LastStreamID: cc.goAway.LastStreamID,
- ErrCode: cc.goAway.ErrCode,
- DebugData: cc.goAwayDebug,
- }
- } else if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- for _, cs := range cc.streams {
- cs.bufPipe.CloseWithError(err) // no-op if already closed
- select {
- case cs.resc <- resAndError{err: err}:
- default:
- }
- close(cs.done)
- }
- cc.closed = true
- cc.cond.Broadcast()
- cc.mu.Unlock()
-}
-
-func (rl *clientConnReadLoop) run() error {
- cc := rl.cc
- rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse
- gotReply := false // ever saw a HEADERS reply
- gotSettings := false
- for {
- f, err := cc.fr.ReadFrame()
- if err != nil {
- cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err)
- }
- if se, ok := err.(StreamError); ok {
- if cs := cc.streamByID(se.StreamID, false); cs != nil {
- cs.cc.writeStreamReset(cs.ID, se.Code, err)
- cs.cc.forgetStreamID(cs.ID)
- if se.Cause == nil {
- se.Cause = cc.fr.errDetail
- }
- rl.endStreamError(cs, se)
- }
- continue
- } else if err != nil {
- return err
- }
- if VerboseLogs {
- cc.vlogf("http2: Transport received %s", summarizeFrame(f))
- }
- if !gotSettings {
- if _, ok := f.(*SettingsFrame); !ok {
- cc.logf("protocol error: received %T before a SETTINGS frame", f)
- return ConnectionError(ErrCodeProtocol)
- }
- gotSettings = true
- }
- maybeIdle := false // whether frame might transition us to idle
-
- switch f := f.(type) {
- case *MetaHeadersFrame:
- err = rl.processHeaders(f)
- maybeIdle = true
- gotReply = true
- case *DataFrame:
- err = rl.processData(f)
- maybeIdle = true
- case *GoAwayFrame:
- err = rl.processGoAway(f)
- maybeIdle = true
- case *RSTStreamFrame:
- err = rl.processResetStream(f)
- maybeIdle = true
- case *SettingsFrame:
- err = rl.processSettings(f)
- case *PushPromiseFrame:
- err = rl.processPushPromise(f)
- case *WindowUpdateFrame:
- err = rl.processWindowUpdate(f)
- case *PingFrame:
- err = rl.processPing(f)
- default:
- cc.logf("Transport: unhandled response frame type %T", f)
- }
- if err != nil {
- if VerboseLogs {
- cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", cc, summarizeFrame(f), err)
- }
- return err
- }
- if rl.closeWhenIdle && gotReply && maybeIdle {
- cc.closeIfIdle()
- }
- }
-}
-
-func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
- cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
- if cs == nil {
- // We'd get here if we canceled a request while the
- // server had its response still in flight. So if this
- // was just something we canceled, ignore it.
- return nil
- }
- if f.StreamEnded() {
- // Issue 20521: If the stream has ended, streamByID() causes
- // clientStream.done to be closed, which causes the request's bodyWriter
- // to be closed with an errStreamClosed, which may be received by
- // clientConn.RoundTrip before the result of processing these headers.
- // Deferring stream closure allows the header processing to occur first.
- // clientConn.RoundTrip may still receive the bodyWriter error first, but
- // the fix for issue 16102 prioritises any response.
- //
- // Issue 22413: If there is no request body, we should close the
- // stream before writing to cs.resc so that the stream is closed
- // immediately once RoundTrip returns.
- if cs.req.Body != nil {
- defer cc.forgetStreamID(f.StreamID)
- } else {
- cc.forgetStreamID(f.StreamID)
- }
- }
- if !cs.firstByte {
- if cs.trace != nil {
- // TODO(bradfitz): move first response byte earlier,
- // when we first read the 9 byte header, not waiting
- // until all the HEADERS+CONTINUATION frames have been
- // merged. This works for now.
- traceFirstResponseByte(cs.trace)
- }
- cs.firstByte = true
- }
- if !cs.pastHeaders {
- cs.pastHeaders = true
- } else {
- return rl.processTrailers(cs, f)
- }
-
- res, err := rl.handleResponse(cs, f)
- if err != nil {
- if _, ok := err.(ConnectionError); ok {
- return err
- }
- // Any other error type is a stream error.
- cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err)
- cc.forgetStreamID(cs.ID)
- cs.resc <- resAndError{err: err}
- return nil // return nil from process* funcs to keep conn alive
- }
- if res == nil {
- // (nil, nil) special case. See handleResponse docs.
- return nil
- }
- cs.resTrailer = &res.Trailer
- cs.resc <- resAndError{res: res}
- return nil
-}
-
-// may return error types nil, or ConnectionError. Any other error value
-// is a StreamError of type ErrCodeProtocol. The returned error in that case
-// is the detail.
-//
-// As a special case, handleResponse may return (nil, nil) to skip the
-// frame (currently only used for 100 expect continue). This special
-// case is going away after Issue 13851 is fixed.
-func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFrame) (*http.Response, error) {
- if f.Truncated {
- return nil, errResponseHeaderListSize
- }
-
- status := f.PseudoValue("status")
- if status == "" {
- return nil, errors.New("malformed response from server: missing status pseudo header")
- }
- statusCode, err := strconv.Atoi(status)
- if err != nil {
- return nil, errors.New("malformed response from server: malformed non-numeric status pseudo header")
- }
-
- if statusCode == 100 {
- traceGot100Continue(cs.trace)
- if cs.on100 != nil {
- cs.on100() // forces any write delay timer to fire
- }
- cs.pastHeaders = false // do it all again
- return nil, nil
- }
-
- header := make(http.Header)
- res := &http.Response{
- Proto: "HTTP/2.0",
- ProtoMajor: 2,
- Header: header,
- StatusCode: statusCode,
- Status: status + " " + http.StatusText(statusCode),
- }
- for _, hf := range f.RegularFields() {
- key := http.CanonicalHeaderKey(hf.Name)
- if key == "Trailer" {
- t := res.Trailer
- if t == nil {
- t = make(http.Header)
- res.Trailer = t
- }
- foreachHeaderElement(hf.Value, func(v string) {
- t[http.CanonicalHeaderKey(v)] = nil
- })
- } else {
- header[key] = append(header[key], hf.Value)
- }
- }
-
- streamEnded := f.StreamEnded()
- isHead := cs.req.Method == "HEAD"
- if !streamEnded || isHead {
- res.ContentLength = -1
- if clens := res.Header["Content-Length"]; len(clens) == 1 {
- if clen64, err := strconv.ParseInt(clens[0], 10, 64); err == nil {
- res.ContentLength = clen64
- } else {
- // TODO: care? unlike http/1, it won't mess up our framing, so it's
- // more safe smuggling-wise to ignore.
- }
- } else if len(clens) > 1 {
- // TODO: care? unlike http/1, it won't mess up our framing, so it's
- // more safe smuggling-wise to ignore.
- }
- }
-
- if streamEnded || isHead {
- res.Body = noBody
- return res, nil
- }
-
- cs.bufPipe = pipe{b: &dataBuffer{expected: res.ContentLength}}
- cs.bytesRemain = res.ContentLength
- res.Body = transportResponseBody{cs}
- go cs.awaitRequestCancel(cs.req)
-
- if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" {
- res.Header.Del("Content-Encoding")
- res.Header.Del("Content-Length")
- res.ContentLength = -1
- res.Body = &gzipReader{body: res.Body}
- setResponseUncompressed(res)
- }
- return res, nil
-}
-
-func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFrame) error {
- if cs.pastTrailers {
- // Too many HEADERS frames for this stream.
- return ConnectionError(ErrCodeProtocol)
- }
- cs.pastTrailers = true
- if !f.StreamEnded() {
- // We expect that any headers for trailers also
- // has END_STREAM.
- return ConnectionError(ErrCodeProtocol)
- }
- if len(f.PseudoFields()) > 0 {
- // No pseudo header fields are defined for trailers.
- // TODO: ConnectionError might be overly harsh? Check.
- return ConnectionError(ErrCodeProtocol)
- }
-
- trailer := make(http.Header)
- for _, hf := range f.RegularFields() {
- key := http.CanonicalHeaderKey(hf.Name)
- trailer[key] = append(trailer[key], hf.Value)
- }
- cs.trailer = trailer
-
- rl.endStream(cs)
- return nil
-}
-
-// transportResponseBody is the concrete type of Transport.RoundTrip's
-// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body.
-// On Close it sends RST_STREAM if EOF wasn't already seen.
-type transportResponseBody struct {
- cs *clientStream
-}
-
-func (b transportResponseBody) Read(p []byte) (n int, err error) {
- cs := b.cs
- cc := cs.cc
-
- if cs.readErr != nil {
- return 0, cs.readErr
- }
- n, err = b.cs.bufPipe.Read(p)
- if cs.bytesRemain != -1 {
- if int64(n) > cs.bytesRemain {
- n = int(cs.bytesRemain)
- if err == nil {
- err = errors.New("net/http: server replied with more than declared Content-Length; truncated")
- cc.writeStreamReset(cs.ID, ErrCodeProtocol, err)
- }
- cs.readErr = err
- return int(cs.bytesRemain), err
- }
- cs.bytesRemain -= int64(n)
- if err == io.EOF && cs.bytesRemain > 0 {
- err = io.ErrUnexpectedEOF
- cs.readErr = err
- return n, err
- }
- }
- if n == 0 {
- // No flow control tokens to send back.
- return
- }
-
- cc.mu.Lock()
- defer cc.mu.Unlock()
-
- var connAdd, streamAdd int32
- // Check the conn-level first, before the stream-level.
- if v := cc.inflow.available(); v < transportDefaultConnFlow/2 {
- connAdd = transportDefaultConnFlow - v
- cc.inflow.add(connAdd)
- }
- if err == nil { // No need to refresh if the stream is over or failed.
- // Consider any buffered body data (read from the conn but not
- // consumed by the client) when computing flow control for this
- // stream.
- v := int(cs.inflow.available()) + cs.bufPipe.Len()
- if v < transportDefaultStreamFlow-transportDefaultStreamMinRefresh {
- streamAdd = int32(transportDefaultStreamFlow - v)
- cs.inflow.add(streamAdd)
- }
- }
- if connAdd != 0 || streamAdd != 0 {
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
- if connAdd != 0 {
- cc.fr.WriteWindowUpdate(0, mustUint31(connAdd))
- }
- if streamAdd != 0 {
- cc.fr.WriteWindowUpdate(cs.ID, mustUint31(streamAdd))
- }
- cc.bw.Flush()
- }
- return
-}
-
-var errClosedResponseBody = errors.New("http2: response body closed")
-
-func (b transportResponseBody) Close() error {
- cs := b.cs
- cc := cs.cc
-
- serverSentStreamEnd := cs.bufPipe.Err() == io.EOF
- unread := cs.bufPipe.Len()
-
- if unread > 0 || !serverSentStreamEnd {
- cc.mu.Lock()
- cc.wmu.Lock()
- if !serverSentStreamEnd {
- cc.fr.WriteRSTStream(cs.ID, ErrCodeCancel)
- cs.didReset = true
- }
- // Return connection-level flow control.
- if unread > 0 {
- cc.inflow.add(int32(unread))
- cc.fr.WriteWindowUpdate(0, uint32(unread))
- }
- cc.bw.Flush()
- cc.wmu.Unlock()
- cc.mu.Unlock()
- }
-
- cs.bufPipe.BreakWithError(errClosedResponseBody)
- cc.forgetStreamID(cs.ID)
- return nil
-}
-
-func (rl *clientConnReadLoop) processData(f *DataFrame) error {
- cc := rl.cc
- cs := cc.streamByID(f.StreamID, f.StreamEnded())
- data := f.Data()
- if cs == nil {
- cc.mu.Lock()
- neverSent := cc.nextStreamID
- cc.mu.Unlock()
- if f.StreamID >= neverSent {
- // We never asked for this.
- cc.logf("http2: Transport received unsolicited DATA frame; closing connection")
- return ConnectionError(ErrCodeProtocol)
- }
- // We probably did ask for this, but canceled. Just ignore it.
- // TODO: be stricter here? only silently ignore things which
- // we canceled, but not things which were closed normally
- // by the peer? Tough without accumulating too much state.
-
- // But at least return their flow control:
- if f.Length > 0 {
- cc.mu.Lock()
- cc.inflow.add(int32(f.Length))
- cc.mu.Unlock()
-
- cc.wmu.Lock()
- cc.fr.WriteWindowUpdate(0, uint32(f.Length))
- cc.bw.Flush()
- cc.wmu.Unlock()
- }
- return nil
- }
- if !cs.firstByte {
- cc.logf("protocol error: received DATA before a HEADERS frame")
- rl.endStreamError(cs, StreamError{
- StreamID: f.StreamID,
- Code: ErrCodeProtocol,
- })
- return nil
- }
- if f.Length > 0 {
- if cs.req.Method == "HEAD" && len(data) > 0 {
- cc.logf("protocol error: received DATA on a HEAD request")
- rl.endStreamError(cs, StreamError{
- StreamID: f.StreamID,
- Code: ErrCodeProtocol,
- })
- return nil
- }
- // Check connection-level flow control.
- cc.mu.Lock()
- if cs.inflow.available() >= int32(f.Length) {
- cs.inflow.take(int32(f.Length))
- } else {
- cc.mu.Unlock()
- return ConnectionError(ErrCodeFlowControl)
- }
- // Return any padded flow control now, since we won't
- // refund it later on body reads.
- var refund int
- if pad := int(f.Length) - len(data); pad > 0 {
- refund += pad
- }
- // Return len(data) now if the stream is already closed,
- // since data will never be read.
- didReset := cs.didReset
- if didReset {
- refund += len(data)
- }
- if refund > 0 {
- cc.inflow.add(int32(refund))
- cc.wmu.Lock()
- cc.fr.WriteWindowUpdate(0, uint32(refund))
- if !didReset {
- cs.inflow.add(int32(refund))
- cc.fr.WriteWindowUpdate(cs.ID, uint32(refund))
- }
- cc.bw.Flush()
- cc.wmu.Unlock()
- }
- cc.mu.Unlock()
-
- if len(data) > 0 && !didReset {
- if _, err := cs.bufPipe.Write(data); err != nil {
- rl.endStreamError(cs, err)
- return err
- }
- }
- }
-
- if f.StreamEnded() {
- rl.endStream(cs)
- }
- return nil
-}
-
-var errInvalidTrailers = errors.New("http2: invalid trailers")
-
-func (rl *clientConnReadLoop) endStream(cs *clientStream) {
- // TODO: check that any declared content-length matches, like
- // server.go's (*stream).endStream method.
- rl.endStreamError(cs, nil)
-}
-
-func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) {
- var code func()
- if err == nil {
- err = io.EOF
- code = cs.copyTrailers
- }
- if isConnectionCloseRequest(cs.req) {
- rl.closeWhenIdle = true
- }
- cs.bufPipe.closeWithErrorAndCode(err, code)
-
- select {
- case cs.resc <- resAndError{err: err}:
- default:
- }
-}
-
-func (cs *clientStream) copyTrailers() {
- for k, vv := range cs.trailer {
- t := cs.resTrailer
- if *t == nil {
- *t = make(http.Header)
- }
- (*t)[k] = vv
- }
-}
-
-func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
- cc := rl.cc
- cc.t.connPool().MarkDead(cc)
- if f.ErrCode != 0 {
- // TODO: deal with GOAWAY more. particularly the error code
- cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode)
- }
- cc.setGoAway(f)
- return nil
-}
-
-func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
- cc := rl.cc
- cc.mu.Lock()
- defer cc.mu.Unlock()
-
- if f.IsAck() {
- if cc.wantSettingsAck {
- cc.wantSettingsAck = false
- return nil
- }
- return ConnectionError(ErrCodeProtocol)
- }
-
- err := f.ForeachSetting(func(s Setting) error {
- switch s.ID {
- case SettingMaxFrameSize:
- cc.maxFrameSize = s.Val
- case SettingMaxConcurrentStreams:
- cc.maxConcurrentStreams = s.Val
- case SettingMaxHeaderListSize:
- cc.peerMaxHeaderListSize = uint64(s.Val)
- case SettingInitialWindowSize:
- // Values above the maximum flow-control
- // window size of 2^31-1 MUST be treated as a
- // connection error (Section 5.4.1) of type
- // FLOW_CONTROL_ERROR.
- if s.Val > math.MaxInt32 {
- return ConnectionError(ErrCodeFlowControl)
- }
-
- // Adjust flow control of currently-open
- // frames by the difference of the old initial
- // window size and this one.
- delta := int32(s.Val) - int32(cc.initialWindowSize)
- for _, cs := range cc.streams {
- cs.flow.add(delta)
- }
- cc.cond.Broadcast()
-
- cc.initialWindowSize = s.Val
- default:
- // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably.
- cc.vlogf("Unhandled Setting: %v", s)
- }
- return nil
- })
- if err != nil {
- return err
- }
-
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
-
- cc.fr.WriteSettingsAck()
- cc.bw.Flush()
- return cc.werr
-}
-
-func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
- cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
- if f.StreamID != 0 && cs == nil {
- return nil
- }
-
- cc.mu.Lock()
- defer cc.mu.Unlock()
-
- fl := &cc.flow
- if cs != nil {
- fl = &cs.flow
- }
- if !fl.add(int32(f.Increment)) {
- return ConnectionError(ErrCodeFlowControl)
- }
- cc.cond.Broadcast()
- return nil
-}
-
-func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error {
- cs := rl.cc.streamByID(f.StreamID, true)
- if cs == nil {
- // TODO: return error if server tries to RST_STEAM an idle stream
- return nil
- }
- select {
- case <-cs.peerReset:
- // Already reset.
- // This is the only goroutine
- // which closes this, so there
- // isn't a race.
- default:
- err := streamError(cs.ID, f.ErrCode)
- cs.resetErr = err
- close(cs.peerReset)
- cs.bufPipe.CloseWithError(err)
- cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl
- }
- return nil
-}
-
-// Ping sends a PING frame to the server and waits for the ack.
-// Public implementation is in go17.go and not_go17.go
-func (cc *ClientConn) ping(ctx contextContext) error {
- c := make(chan struct{})
- // Generate a random payload
- var p [8]byte
- for {
- if _, err := rand.Read(p[:]); err != nil {
- return err
- }
- cc.mu.Lock()
- // check for dup before insert
- if _, found := cc.pings[p]; !found {
- cc.pings[p] = c
- cc.mu.Unlock()
- break
- }
- cc.mu.Unlock()
- }
- cc.wmu.Lock()
- if err := cc.fr.WritePing(false, p); err != nil {
- cc.wmu.Unlock()
- return err
- }
- if err := cc.bw.Flush(); err != nil {
- cc.wmu.Unlock()
- return err
- }
- cc.wmu.Unlock()
- select {
- case <-c:
- return nil
- case <-ctx.Done():
- return ctx.Err()
- case <-cc.readerDone:
- // connection closed
- return cc.readerErr
- }
-}
-
-func (rl *clientConnReadLoop) processPing(f *PingFrame) error {
- if f.IsAck() {
- cc := rl.cc
- cc.mu.Lock()
- defer cc.mu.Unlock()
- // If ack, notify listener if any
- if c, ok := cc.pings[f.Data]; ok {
- close(c)
- delete(cc.pings, f.Data)
- }
- return nil
- }
- cc := rl.cc
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
- if err := cc.fr.WritePing(true, f.Data); err != nil {
- return err
- }
- return cc.bw.Flush()
-}
-
-func (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error {
- // We told the peer we don't want them.
- // Spec says:
- // "PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH
- // setting of the peer endpoint is set to 0. An endpoint that
- // has set this setting and has received acknowledgement MUST
- // treat the receipt of a PUSH_PROMISE frame as a connection
- // error (Section 5.4.1) of type PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
-}
-
-func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) {
- // TODO: map err to more interesting error codes, once the
- // HTTP community comes up with some. But currently for
- // RST_STREAM there's no equivalent to GOAWAY frame's debug
- // data, and the error codes are all pretty vague ("cancel").
- cc.wmu.Lock()
- cc.fr.WriteRSTStream(streamID, code)
- cc.bw.Flush()
- cc.wmu.Unlock()
-}
-
-var (
- errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit")
- errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit")
- errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers")
-)
-
-func (cc *ClientConn) logf(format string, args ...interface{}) {
- cc.t.logf(format, args...)
-}
-
-func (cc *ClientConn) vlogf(format string, args ...interface{}) {
- cc.t.vlogf(format, args...)
-}
-
-func (t *Transport) vlogf(format string, args ...interface{}) {
- if VerboseLogs {
- t.logf(format, args...)
- }
-}
-
-func (t *Transport) logf(format string, args ...interface{}) {
- log.Printf(format, args...)
-}
-
-var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil))
-
-func strSliceContains(ss []string, s string) bool {
- for _, v := range ss {
- if v == s {
- return true
- }
- }
- return false
-}
-
-type erringRoundTripper struct{ err error }
-
-func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }
-
-// gzipReader wraps a response body so it can lazily
-// call gzip.NewReader on the first call to Read
-type gzipReader struct {
- body io.ReadCloser // underlying Response.Body
- zr *gzip.Reader // lazily-initialized gzip reader
- zerr error // sticky error
-}
-
-func (gz *gzipReader) Read(p []byte) (n int, err error) {
- if gz.zerr != nil {
- return 0, gz.zerr
- }
- if gz.zr == nil {
- gz.zr, err = gzip.NewReader(gz.body)
- if err != nil {
- gz.zerr = err
- return 0, err
- }
- }
- return gz.zr.Read(p)
-}
-
-func (gz *gzipReader) Close() error {
- return gz.body.Close()
-}
-
-type errorReader struct{ err error }
-
-func (r errorReader) Read(p []byte) (int, error) { return 0, r.err }
-
-// bodyWriterState encapsulates various state around the Transport's writing
-// of the request body, particularly regarding doing delayed writes of the body
-// when the request contains "Expect: 100-continue".
-type bodyWriterState struct {
- cs *clientStream
- timer *time.Timer // if non-nil, we're doing a delayed write
- fnonce *sync.Once // to call fn with
- fn func() // the code to run in the goroutine, writing the body
- resc chan error // result of fn's execution
- delay time.Duration // how long we should delay a delayed write for
-}
-
-func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s bodyWriterState) {
- s.cs = cs
- if body == nil {
- return
- }
- resc := make(chan error, 1)
- s.resc = resc
- s.fn = func() {
- cs.cc.mu.Lock()
- cs.startedWrite = true
- cs.cc.mu.Unlock()
- resc <- cs.writeRequestBody(body, cs.req.Body)
- }
- s.delay = t.expectContinueTimeout()
- if s.delay == 0 ||
- !httplex.HeaderValuesContainsToken(
- cs.req.Header["Expect"],
- "100-continue") {
- return
- }
- s.fnonce = new(sync.Once)
-
- // Arm the timer with a very large duration, which we'll
- // intentionally lower later. It has to be large now because
- // we need a handle to it before writing the headers, but the
- // s.delay value is defined to not start until after the
- // request headers were written.
- const hugeDuration = 365 * 24 * time.Hour
- s.timer = time.AfterFunc(hugeDuration, func() {
- s.fnonce.Do(s.fn)
- })
- return
-}
-
-func (s bodyWriterState) cancel() {
- if s.timer != nil {
- s.timer.Stop()
- }
-}
-
-func (s bodyWriterState) on100() {
- if s.timer == nil {
- // If we didn't do a delayed write, ignore the server's
- // bogus 100 continue response.
- return
- }
- s.timer.Stop()
- go func() { s.fnonce.Do(s.fn) }()
-}
-
-// scheduleBodyWrite starts writing the body, either immediately (in
-// the common case) or after the delay timeout. It should not be
-// called until after the headers have been written.
-func (s bodyWriterState) scheduleBodyWrite() {
- if s.timer == nil {
- // We're not doing a delayed write (see
- // getBodyWriterState), so just start the writing
- // goroutine immediately.
- go s.fn()
- return
- }
- traceWait100Continue(s.cs.trace)
- if s.timer.Stop() {
- s.timer.Reset(s.delay)
- }
-}
-
-// isConnectionCloseRequest reports whether req should use its own
-// connection for a single request and then close the connection.
-func isConnectionCloseRequest(req *http.Request) bool {
- return req.Close || httplex.HeaderValuesContainsToken(req.Header["Connection"], "close")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport_test.go
deleted file mode 100644
index adee48cd3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/transport_test.go
+++ /dev/null
@@ -1,3847 +0,0 @@
-// Copyright 2015 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 file.
-
-package http2
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "errors"
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "math/rand"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "os"
- "reflect"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-
- "golang.org/x/net/http2/hpack"
-)
-
-var (
- extNet = flag.Bool("extnet", false, "do external network tests")
- transportHost = flag.String("transporthost", "http2.golang.org", "hostname to use for TestTransport")
- insecure = flag.Bool("insecure", false, "insecure TLS dials") // TODO: dead code. remove?
-)
-
-var tlsConfigInsecure = &tls.Config{InsecureSkipVerify: true}
-
-type testContext struct{}
-
-func (testContext) Done() <-chan struct{} { return make(chan struct{}) }
-func (testContext) Err() error { panic("should not be called") }
-func (testContext) Deadline() (deadline time.Time, ok bool) { return time.Time{}, false }
-func (testContext) Value(key interface{}) interface{} { return nil }
-
-func TestTransportExternal(t *testing.T) {
- if !*extNet {
- t.Skip("skipping external network test")
- }
- req, _ := http.NewRequest("GET", "https://"+*transportHost+"/", nil)
- rt := &Transport{TLSClientConfig: tlsConfigInsecure}
- res, err := rt.RoundTrip(req)
- if err != nil {
- t.Fatalf("%v", err)
- }
- res.Write(os.Stdout)
-}
-
-type fakeTLSConn struct {
- net.Conn
-}
-
-func (c *fakeTLSConn) ConnectionState() tls.ConnectionState {
- return tls.ConnectionState{
- Version: tls.VersionTLS12,
- CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
- }
-}
-
-func startH2cServer(t *testing.T) net.Listener {
- h2Server := &Server{}
- l := newLocalListener(t)
- go func() {
- conn, err := l.Accept()
- if err != nil {
- t.Error(err)
- return
- }
- h2Server.ServeConn(&fakeTLSConn{conn}, &ServeConnOpts{Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, "Hello, %v, http: %v", r.URL.Path, r.TLS == nil)
- })})
- }()
- return l
-}
-
-func TestTransportH2c(t *testing.T) {
- l := startH2cServer(t)
- defer l.Close()
- req, err := http.NewRequest("GET", "http://"+l.Addr().String()+"/foobar", nil)
- if err != nil {
- t.Fatal(err)
- }
- tr := &Transport{
- AllowHTTP: true,
- DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- return net.Dial(network, addr)
- },
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- if res.ProtoMajor != 2 {
- t.Fatal("proto not h2c")
- }
- body, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatal(err)
- }
- if got, want := string(body), "Hello, /foobar, http: true"; got != want {
- t.Fatalf("response got %v, want %v", got, want)
- }
-}
-
-func TestTransport(t *testing.T) {
- const body = "sup"
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, body)
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Fatal(err)
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
-
- t.Logf("Got res: %+v", res)
- if g, w := res.StatusCode, 200; g != w {
- t.Errorf("StatusCode = %v; want %v", g, w)
- }
- if g, w := res.Status, "200 OK"; g != w {
- t.Errorf("Status = %q; want %q", g, w)
- }
- wantHeader := http.Header{
- "Content-Length": []string{"3"},
- "Content-Type": []string{"text/plain; charset=utf-8"},
- "Date": []string{"XXX"}, // see cleanDate
- }
- cleanDate(res)
- if !reflect.DeepEqual(res.Header, wantHeader) {
- t.Errorf("res Header = %v; want %v", res.Header, wantHeader)
- }
- if res.Request != req {
- t.Errorf("Response.Request = %p; want %p", res.Request, req)
- }
- if res.TLS == nil {
- t.Error("Response.TLS = nil; want non-nil")
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Errorf("Body read: %v", err)
- } else if string(slurp) != body {
- t.Errorf("Body = %q; want %q", slurp, body)
- }
-}
-
-func onSameConn(t *testing.T, modReq func(*http.Request)) bool {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, r.RemoteAddr)
- }, optOnlyServer, func(c net.Conn, st http.ConnState) {
- t.Logf("conn %v is now state %v", c.RemoteAddr(), st)
- })
- defer st.Close()
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- get := func() string {
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Fatal(err)
- }
- modReq(req)
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatalf("Body read: %v", err)
- }
- addr := strings.TrimSpace(string(slurp))
- if addr == "" {
- t.Fatalf("didn't get an addr in response")
- }
- return addr
- }
- first := get()
- second := get()
- return first == second
-}
-
-func TestTransportReusesConns(t *testing.T) {
- if !onSameConn(t, func(*http.Request) {}) {
- t.Errorf("first and second responses were on different connections")
- }
-}
-
-func TestTransportReusesConn_RequestClose(t *testing.T) {
- if onSameConn(t, func(r *http.Request) { r.Close = true }) {
- t.Errorf("first and second responses were not on different connections")
- }
-}
-
-func TestTransportReusesConn_ConnClose(t *testing.T) {
- if onSameConn(t, func(r *http.Request) { r.Header.Set("Connection", "close") }) {
- t.Errorf("first and second responses were not on different connections")
- }
-}
-
-// Tests that the Transport only keeps one pending dial open per destination address.
-// https://golang.org/issue/13397
-func TestTransportGroupsPendingDials(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, r.RemoteAddr)
- }, optOnlyServer)
- defer st.Close()
- tr := &Transport{
- TLSClientConfig: tlsConfigInsecure,
- }
- defer tr.CloseIdleConnections()
- var (
- mu sync.Mutex
- dials = map[string]int{}
- )
- var wg sync.WaitGroup
- for i := 0; i < 10; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Error(err)
- return
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Error(err)
- return
- }
- defer res.Body.Close()
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Errorf("Body read: %v", err)
- }
- addr := strings.TrimSpace(string(slurp))
- if addr == "" {
- t.Errorf("didn't get an addr in response")
- }
- mu.Lock()
- dials[addr]++
- mu.Unlock()
- }()
- }
- wg.Wait()
- if len(dials) != 1 {
- t.Errorf("saw %d dials; want 1: %v", len(dials), dials)
- }
- tr.CloseIdleConnections()
- if err := retry(50, 10*time.Millisecond, func() error {
- cp, ok := tr.connPool().(*clientConnPool)
- if !ok {
- return fmt.Errorf("Conn pool is %T; want *clientConnPool", tr.connPool())
- }
- cp.mu.Lock()
- defer cp.mu.Unlock()
- if len(cp.dialing) != 0 {
- return fmt.Errorf("dialing map = %v; want empty", cp.dialing)
- }
- if len(cp.conns) != 0 {
- return fmt.Errorf("conns = %v; want empty", cp.conns)
- }
- if len(cp.keys) != 0 {
- return fmt.Errorf("keys = %v; want empty", cp.keys)
- }
- return nil
- }); err != nil {
- t.Errorf("State of pool after CloseIdleConnections: %v", err)
- }
-}
-
-func retry(tries int, delay time.Duration, fn func() error) error {
- var err error
- for i := 0; i < tries; i++ {
- err = fn()
- if err == nil {
- return nil
- }
- time.Sleep(delay)
- }
- return err
-}
-
-func TestTransportAbortClosesPipes(t *testing.T) {
- shutdown := make(chan struct{})
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- w.(http.Flusher).Flush()
- <-shutdown
- },
- optOnlyServer,
- )
- defer st.Close()
- defer close(shutdown) // we must shutdown before st.Close() to avoid hanging
-
- done := make(chan struct{})
- requestMade := make(chan struct{})
- go func() {
- defer close(done)
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Fatal(err)
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- close(requestMade)
- _, err = ioutil.ReadAll(res.Body)
- if err == nil {
- t.Error("expected error from res.Body.Read")
- }
- }()
-
- <-requestMade
- // Now force the serve loop to end, via closing the connection.
- st.closeConn()
- // deadlock? that's a bug.
- select {
- case <-done:
- case <-time.After(3 * time.Second):
- t.Fatal("timeout")
- }
-}
-
-// TODO: merge this with TestTransportBody to make TestTransportRequest? This
-// could be a table-driven test with extra goodies.
-func TestTransportPath(t *testing.T) {
- gotc := make(chan *url.URL, 1)
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- gotc <- r.URL
- },
- optOnlyServer,
- )
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- const (
- path = "/testpath"
- query = "q=1"
- )
- surl := st.ts.URL + path + "?" + query
- req, err := http.NewRequest("POST", surl, nil)
- if err != nil {
- t.Fatal(err)
- }
- c := &http.Client{Transport: tr}
- res, err := c.Do(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- got := <-gotc
- if got.Path != path {
- t.Errorf("Read Path = %q; want %q", got.Path, path)
- }
- if got.RawQuery != query {
- t.Errorf("Read RawQuery = %q; want %q", got.RawQuery, query)
- }
-}
-
-func randString(n int) string {
- rnd := rand.New(rand.NewSource(int64(n)))
- b := make([]byte, n)
- for i := range b {
- b[i] = byte(rnd.Intn(256))
- }
- return string(b)
-}
-
-type panicReader struct{}
-
-func (panicReader) Read([]byte) (int, error) { panic("unexpected Read") }
-func (panicReader) Close() error { panic("unexpected Close") }
-
-func TestActualContentLength(t *testing.T) {
- tests := []struct {
- req *http.Request
- want int64
- }{
- // Verify we don't read from Body:
- 0: {
- req: &http.Request{Body: panicReader{}},
- want: -1,
- },
- // nil Body means 0, regardless of ContentLength:
- 1: {
- req: &http.Request{Body: nil, ContentLength: 5},
- want: 0,
- },
- // ContentLength is used if set.
- 2: {
- req: &http.Request{Body: panicReader{}, ContentLength: 5},
- want: 5,
- },
- // http.NoBody means 0, not -1.
- 3: {
- req: &http.Request{Body: go18httpNoBody()},
- want: 0,
- },
- }
- for i, tt := range tests {
- got := actualContentLength(tt.req)
- if got != tt.want {
- t.Errorf("test[%d]: got %d; want %d", i, got, tt.want)
- }
- }
-}
-
-func TestTransportBody(t *testing.T) {
- bodyTests := []struct {
- body string
- noContentLen bool
- }{
- {body: "some message"},
- {body: "some message", noContentLen: true},
- {body: strings.Repeat("a", 1<<20), noContentLen: true},
- {body: strings.Repeat("a", 1<<20)},
- {body: randString(16<<10 - 1)},
- {body: randString(16 << 10)},
- {body: randString(16<<10 + 1)},
- {body: randString(512<<10 - 1)},
- {body: randString(512 << 10)},
- {body: randString(512<<10 + 1)},
- {body: randString(1<<20 - 1)},
- {body: randString(1 << 20)},
- {body: randString(1<<20 + 2)},
- }
-
- type reqInfo struct {
- req *http.Request
- slurp []byte
- err error
- }
- gotc := make(chan reqInfo, 1)
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- slurp, err := ioutil.ReadAll(r.Body)
- if err != nil {
- gotc <- reqInfo{err: err}
- } else {
- gotc <- reqInfo{req: r, slurp: slurp}
- }
- },
- optOnlyServer,
- )
- defer st.Close()
-
- for i, tt := range bodyTests {
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- var body io.Reader = strings.NewReader(tt.body)
- if tt.noContentLen {
- body = struct{ io.Reader }{body} // just a Reader, hiding concrete type and other methods
- }
- req, err := http.NewRequest("POST", st.ts.URL, body)
- if err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- c := &http.Client{Transport: tr}
- res, err := c.Do(req)
- if err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- defer res.Body.Close()
- ri := <-gotc
- if ri.err != nil {
- t.Errorf("#%d: read error: %v", i, ri.err)
- continue
- }
- if got := string(ri.slurp); got != tt.body {
- t.Errorf("#%d: Read body mismatch.\n got: %q (len %d)\nwant: %q (len %d)", i, shortString(got), len(got), shortString(tt.body), len(tt.body))
- }
- wantLen := int64(len(tt.body))
- if tt.noContentLen && tt.body != "" {
- wantLen = -1
- }
- if ri.req.ContentLength != wantLen {
- t.Errorf("#%d. handler got ContentLength = %v; want %v", i, ri.req.ContentLength, wantLen)
- }
- }
-}
-
-func shortString(v string) string {
- const maxLen = 100
- if len(v) <= maxLen {
- return v
- }
- return fmt.Sprintf("%v[...%d bytes omitted...]%v", v[:maxLen/2], len(v)-maxLen, v[len(v)-maxLen/2:])
-}
-
-func TestTransportDialTLS(t *testing.T) {
- var mu sync.Mutex // guards following
- var gotReq, didDial bool
-
- ts := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- mu.Lock()
- gotReq = true
- mu.Unlock()
- },
- optOnlyServer,
- )
- defer ts.Close()
- tr := &Transport{
- DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) {
- mu.Lock()
- didDial = true
- mu.Unlock()
- cfg.InsecureSkipVerify = true
- c, err := tls.Dial(netw, addr, cfg)
- if err != nil {
- return nil, err
- }
- return c, c.Handshake()
- },
- }
- defer tr.CloseIdleConnections()
- client := &http.Client{Transport: tr}
- res, err := client.Get(ts.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- res.Body.Close()
- mu.Lock()
- if !gotReq {
- t.Error("didn't get request")
- }
- if !didDial {
- t.Error("didn't use dial hook")
- }
-}
-
-func TestConfigureTransport(t *testing.T) {
- t1 := &http.Transport{}
- err := ConfigureTransport(t1)
- if err == errTransportVersion {
- t.Skip(err)
- }
- if err != nil {
- t.Fatal(err)
- }
- if got := fmt.Sprintf("%#v", t1); !strings.Contains(got, `"h2"`) {
- // Laziness, to avoid buildtags.
- t.Errorf("stringification of HTTP/1 transport didn't contain \"h2\": %v", got)
- }
- wantNextProtos := []string{"h2", "http/1.1"}
- if t1.TLSClientConfig == nil {
- t.Errorf("nil t1.TLSClientConfig")
- } else if !reflect.DeepEqual(t1.TLSClientConfig.NextProtos, wantNextProtos) {
- t.Errorf("TLSClientConfig.NextProtos = %q; want %q", t1.TLSClientConfig.NextProtos, wantNextProtos)
- }
- if err := ConfigureTransport(t1); err == nil {
- t.Error("unexpected success on second call to ConfigureTransport")
- }
-
- // And does it work?
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, r.Proto)
- }, optOnlyServer)
- defer st.Close()
-
- t1.TLSClientConfig.InsecureSkipVerify = true
- c := &http.Client{Transport: t1}
- res, err := c.Get(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatal(err)
- }
- if got, want := string(slurp), "HTTP/2.0"; got != want {
- t.Errorf("body = %q; want %q", got, want)
- }
-}
-
-type capitalizeReader struct {
- r io.Reader
-}
-
-func (cr capitalizeReader) Read(p []byte) (n int, err error) {
- n, err = cr.r.Read(p)
- for i, b := range p[:n] {
- if b >= 'a' && b <= 'z' {
- p[i] = b - ('a' - 'A')
- }
- }
- return
-}
-
-type flushWriter struct {
- w io.Writer
-}
-
-func (fw flushWriter) Write(p []byte) (n int, err error) {
- n, err = fw.w.Write(p)
- if f, ok := fw.w.(http.Flusher); ok {
- f.Flush()
- }
- return
-}
-
-type clientTester struct {
- t *testing.T
- tr *Transport
- sc, cc net.Conn // server and client conn
- fr *Framer // server's framer
- client func() error
- server func() error
-}
-
-func newClientTester(t *testing.T) *clientTester {
- var dialOnce struct {
- sync.Mutex
- dialed bool
- }
- ct := &clientTester{
- t: t,
- }
- ct.tr = &Transport{
- TLSClientConfig: tlsConfigInsecure,
- DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- dialOnce.Lock()
- defer dialOnce.Unlock()
- if dialOnce.dialed {
- return nil, errors.New("only one dial allowed in test mode")
- }
- dialOnce.dialed = true
- return ct.cc, nil
- },
- }
-
- ln := newLocalListener(t)
- cc, err := net.Dial("tcp", ln.Addr().String())
- if err != nil {
- t.Fatal(err)
-
- }
- sc, err := ln.Accept()
- if err != nil {
- t.Fatal(err)
- }
- ln.Close()
- ct.cc = cc
- ct.sc = sc
- ct.fr = NewFramer(sc, sc)
- return ct
-}
-
-func newLocalListener(t *testing.T) net.Listener {
- ln, err := net.Listen("tcp4", "127.0.0.1:0")
- if err == nil {
- return ln
- }
- ln, err = net.Listen("tcp6", "[::1]:0")
- if err != nil {
- t.Fatal(err)
- }
- return ln
-}
-
-func (ct *clientTester) greet(settings ...Setting) {
- buf := make([]byte, len(ClientPreface))
- _, err := io.ReadFull(ct.sc, buf)
- if err != nil {
- ct.t.Fatalf("reading client preface: %v", err)
- }
- f, err := ct.fr.ReadFrame()
- if err != nil {
- ct.t.Fatalf("Reading client settings frame: %v", err)
- }
- if sf, ok := f.(*SettingsFrame); !ok {
- ct.t.Fatalf("Wanted client settings frame; got %v", f)
- _ = sf // stash it away?
- }
- if err := ct.fr.WriteSettings(settings...); err != nil {
- ct.t.Fatal(err)
- }
- if err := ct.fr.WriteSettingsAck(); err != nil {
- ct.t.Fatal(err)
- }
-}
-
-func (ct *clientTester) readNonSettingsFrame() (Frame, error) {
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return nil, err
- }
- if _, ok := f.(*SettingsFrame); ok {
- continue
- }
- return f, nil
- }
-}
-
-func (ct *clientTester) cleanup() {
- ct.tr.CloseIdleConnections()
-}
-
-func (ct *clientTester) run() {
- errc := make(chan error, 2)
- ct.start("client", errc, ct.client)
- ct.start("server", errc, ct.server)
- defer ct.cleanup()
- for i := 0; i < 2; i++ {
- if err := <-errc; err != nil {
- ct.t.Error(err)
- return
- }
- }
-}
-
-func (ct *clientTester) start(which string, errc chan<- error, fn func() error) {
- go func() {
- finished := false
- var err error
- defer func() {
- if !finished {
- err = fmt.Errorf("%s goroutine didn't finish.", which)
- } else if err != nil {
- err = fmt.Errorf("%s: %v", which, err)
- }
- errc <- err
- }()
- err = fn()
- finished = true
- }()
-}
-
-func (ct *clientTester) readFrame() (Frame, error) {
- return readFrameTimeout(ct.fr, 2*time.Second)
-}
-
-func (ct *clientTester) firstHeaders() (*HeadersFrame, error) {
- for {
- f, err := ct.readFrame()
- if err != nil {
- return nil, fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
- }
- switch f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- continue
- }
- hf, ok := f.(*HeadersFrame)
- if !ok {
- return nil, fmt.Errorf("Got %T; want HeadersFrame", f)
- }
- return hf, nil
- }
-}
-
-type countingReader struct {
- n *int64
-}
-
-func (r countingReader) Read(p []byte) (n int, err error) {
- for i := range p {
- p[i] = byte(i)
- }
- atomic.AddInt64(r.n, int64(len(p)))
- return len(p), err
-}
-
-func TestTransportReqBodyAfterResponse_200(t *testing.T) { testTransportReqBodyAfterResponse(t, 200) }
-func TestTransportReqBodyAfterResponse_403(t *testing.T) { testTransportReqBodyAfterResponse(t, 403) }
-
-func testTransportReqBodyAfterResponse(t *testing.T, status int) {
- const bodySize = 10 << 20
- clientDone := make(chan struct{})
- ct := newClientTester(t)
- ct.client = func() error {
- defer ct.cc.(*net.TCPConn).CloseWrite()
- defer close(clientDone)
-
- var n int64 // atomic
- req, err := http.NewRequest("PUT", "https://dummy.tld/", io.LimitReader(countingReader{&n}, bodySize))
- if err != nil {
- return err
- }
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip: %v", err)
- }
- defer res.Body.Close()
- if res.StatusCode != status {
- return fmt.Errorf("status code = %v; want %v", res.StatusCode, status)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return fmt.Errorf("Slurp: %v", err)
- }
- if len(slurp) > 0 {
- return fmt.Errorf("unexpected body: %q", slurp)
- }
- if status == 200 {
- if got := atomic.LoadInt64(&n); got != bodySize {
- return fmt.Errorf("For 200 response, Transport wrote %d bytes; want %d", got, bodySize)
- }
- } else {
- if got := atomic.LoadInt64(&n); got == 0 || got >= bodySize {
- return fmt.Errorf("For %d response, Transport wrote %d bytes; want (0,%d) exclusive", status, got, bodySize)
- }
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- var dataRecv int64
- var closed bool
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- select {
- case <-clientDone:
- // If the client's done, it
- // will have reported any
- // errors on its side.
- return nil
- default:
- return err
- }
- }
- //println(fmt.Sprintf("server got frame: %v", f))
- switch f := f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- case *HeadersFrame:
- if !f.HeadersEnded() {
- return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
- }
- if f.StreamEnded() {
- return fmt.Errorf("headers contains END_STREAM unexpectedly: %v", f)
- }
- case *DataFrame:
- dataLen := len(f.Data())
- if dataLen > 0 {
- if dataRecv == 0 {
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: strconv.Itoa(status)})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
- }
- if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil {
- return err
- }
- if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil {
- return err
- }
- }
- dataRecv += int64(dataLen)
-
- if !closed && ((status != 200 && dataRecv > 0) ||
- (status == 200 && dataRecv == bodySize)) {
- closed = true
- if err := ct.fr.WriteData(f.StreamID, true, nil); err != nil {
- return err
- }
- }
- default:
- return fmt.Errorf("Unexpected client frame %v", f)
- }
- }
- }
- ct.run()
-}
-
-// See golang.org/issue/13444
-func TestTransportFullDuplex(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(200) // redundant but for clarity
- w.(http.Flusher).Flush()
- io.Copy(flushWriter{w}, capitalizeReader{r.Body})
- fmt.Fprintf(w, "bye.\n")
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
-
- pr, pw := io.Pipe()
- req, err := http.NewRequest("PUT", st.ts.URL, ioutil.NopCloser(pr))
- if err != nil {
- t.Fatal(err)
- }
- req.ContentLength = -1
- res, err := c.Do(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- if res.StatusCode != 200 {
- t.Fatalf("StatusCode = %v; want %v", res.StatusCode, 200)
- }
- bs := bufio.NewScanner(res.Body)
- want := func(v string) {
- if !bs.Scan() {
- t.Fatalf("wanted to read %q but Scan() = false, err = %v", v, bs.Err())
- }
- }
- write := func(v string) {
- _, err := io.WriteString(pw, v)
- if err != nil {
- t.Fatalf("pipe write: %v", err)
- }
- }
- write("foo\n")
- want("FOO")
- write("bar\n")
- want("BAR")
- pw.Close()
- want("bye.")
- if err := bs.Err(); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestTransportConnectRequest(t *testing.T) {
- gotc := make(chan *http.Request, 1)
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- gotc <- r
- }, optOnlyServer)
- defer st.Close()
-
- u, err := url.Parse(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
-
- tests := []struct {
- req *http.Request
- want string
- }{
- {
- req: &http.Request{
- Method: "CONNECT",
- Header: http.Header{},
- URL: u,
- },
- want: u.Host,
- },
- {
- req: &http.Request{
- Method: "CONNECT",
- Header: http.Header{},
- URL: u,
- Host: "example.com:123",
- },
- want: "example.com:123",
- },
- }
-
- for i, tt := range tests {
- res, err := c.Do(tt.req)
- if err != nil {
- t.Errorf("%d. RoundTrip = %v", i, err)
- continue
- }
- res.Body.Close()
- req := <-gotc
- if req.Method != "CONNECT" {
- t.Errorf("method = %q; want CONNECT", req.Method)
- }
- if req.Host != tt.want {
- t.Errorf("Host = %q; want %q", req.Host, tt.want)
- }
- if req.URL.Host != tt.want {
- t.Errorf("URL.Host = %q; want %q", req.URL.Host, tt.want)
- }
- }
-}
-
-type headerType int
-
-const (
- noHeader headerType = iota // omitted
- oneHeader
- splitHeader // broken into continuation on purpose
-)
-
-const (
- f0 = noHeader
- f1 = oneHeader
- f2 = splitHeader
- d0 = false
- d1 = true
-)
-
-// Test all 36 combinations of response frame orders:
-// (3 ways of 100-continue) * (2 ways of headers) * (2 ways of data) * (3 ways of trailers):func TestTransportResponsePattern_00f0(t *testing.T) { testTransportResponsePattern(h0, h1, false, h0) }
-// Generated by http://play.golang.org/p/SScqYKJYXd
-func TestTransportResPattern_c0h1d0t0(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f0) }
-func TestTransportResPattern_c0h1d0t1(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f1) }
-func TestTransportResPattern_c0h1d0t2(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f2) }
-func TestTransportResPattern_c0h1d1t0(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f0) }
-func TestTransportResPattern_c0h1d1t1(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f1) }
-func TestTransportResPattern_c0h1d1t2(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f2) }
-func TestTransportResPattern_c0h2d0t0(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f0) }
-func TestTransportResPattern_c0h2d0t1(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f1) }
-func TestTransportResPattern_c0h2d0t2(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f2) }
-func TestTransportResPattern_c0h2d1t0(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f0) }
-func TestTransportResPattern_c0h2d1t1(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f1) }
-func TestTransportResPattern_c0h2d1t2(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f2) }
-func TestTransportResPattern_c1h1d0t0(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f0) }
-func TestTransportResPattern_c1h1d0t1(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f1) }
-func TestTransportResPattern_c1h1d0t2(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f2) }
-func TestTransportResPattern_c1h1d1t0(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f0) }
-func TestTransportResPattern_c1h1d1t1(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f1) }
-func TestTransportResPattern_c1h1d1t2(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f2) }
-func TestTransportResPattern_c1h2d0t0(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f0) }
-func TestTransportResPattern_c1h2d0t1(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f1) }
-func TestTransportResPattern_c1h2d0t2(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f2) }
-func TestTransportResPattern_c1h2d1t0(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f0) }
-func TestTransportResPattern_c1h2d1t1(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f1) }
-func TestTransportResPattern_c1h2d1t2(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f2) }
-func TestTransportResPattern_c2h1d0t0(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f0) }
-func TestTransportResPattern_c2h1d0t1(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f1) }
-func TestTransportResPattern_c2h1d0t2(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f2) }
-func TestTransportResPattern_c2h1d1t0(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f0) }
-func TestTransportResPattern_c2h1d1t1(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f1) }
-func TestTransportResPattern_c2h1d1t2(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f2) }
-func TestTransportResPattern_c2h2d0t0(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f0) }
-func TestTransportResPattern_c2h2d0t1(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f1) }
-func TestTransportResPattern_c2h2d0t2(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f2) }
-func TestTransportResPattern_c2h2d1t0(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f0) }
-func TestTransportResPattern_c2h2d1t1(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f1) }
-func TestTransportResPattern_c2h2d1t2(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f2) }
-
-func testTransportResPattern(t *testing.T, expect100Continue, resHeader headerType, withData bool, trailers headerType) {
- const reqBody = "some request body"
- const resBody = "some response body"
-
- if resHeader == noHeader {
- // TODO: test 100-continue followed by immediate
- // server stream reset, without headers in the middle?
- panic("invalid combination")
- }
-
- ct := newClientTester(t)
- ct.client = func() error {
- req, _ := http.NewRequest("POST", "https://dummy.tld/", strings.NewReader(reqBody))
- if expect100Continue != noHeader {
- req.Header.Set("Expect", "100-continue")
- }
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip: %v", err)
- }
- defer res.Body.Close()
- if res.StatusCode != 200 {
- return fmt.Errorf("status code = %v; want 200", res.StatusCode)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return fmt.Errorf("Slurp: %v", err)
- }
- wantBody := resBody
- if !withData {
- wantBody = ""
- }
- if string(slurp) != wantBody {
- return fmt.Errorf("body = %q; want %q", slurp, wantBody)
- }
- if trailers == noHeader {
- if len(res.Trailer) > 0 {
- t.Errorf("Trailer = %v; want none", res.Trailer)
- }
- } else {
- want := http.Header{"Some-Trailer": {"some-value"}}
- if !reflect.DeepEqual(res.Trailer, want) {
- t.Errorf("Trailer = %v; want %v", res.Trailer, want)
- }
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return err
- }
- endStream := false
- send := func(mode headerType) {
- hbf := buf.Bytes()
- switch mode {
- case oneHeader:
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.Header().StreamID,
- EndHeaders: true,
- EndStream: endStream,
- BlockFragment: hbf,
- })
- case splitHeader:
- if len(hbf) < 2 {
- panic("too small")
- }
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.Header().StreamID,
- EndHeaders: false,
- EndStream: endStream,
- BlockFragment: hbf[:1],
- })
- ct.fr.WriteContinuation(f.Header().StreamID, true, hbf[1:])
- default:
- panic("bogus mode")
- }
- }
- switch f := f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- case *DataFrame:
- if !f.StreamEnded() {
- // No need to send flow control tokens. The test request body is tiny.
- continue
- }
- // Response headers (1+ frames; 1 or 2 in this test, but never 0)
- {
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "x-foo", Value: "blah"})
- enc.WriteField(hpack.HeaderField{Name: "x-bar", Value: "more"})
- if trailers != noHeader {
- enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "some-trailer"})
- }
- endStream = withData == false && trailers == noHeader
- send(resHeader)
- }
- if withData {
- endStream = trailers == noHeader
- ct.fr.WriteData(f.StreamID, endStream, []byte(resBody))
- }
- if trailers != noHeader {
- endStream = true
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "some-value"})
- send(trailers)
- }
- if endStream {
- return nil
- }
- case *HeadersFrame:
- if expect100Continue != noHeader {
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "100"})
- send(expect100Continue)
- }
- }
- }
- }
- ct.run()
-}
-
-func TestTransportReceiveUndeclaredTrailer(t *testing.T) {
- ct := newClientTester(t)
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip: %v", err)
- }
- defer res.Body.Close()
- if res.StatusCode != 200 {
- return fmt.Errorf("status code = %v; want 200", res.StatusCode)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return fmt.Errorf("res.Body ReadAll error = %q, %v; want %v", slurp, err, nil)
- }
- if len(slurp) > 0 {
- return fmt.Errorf("body = %q; want nothing", slurp)
- }
- if _, ok := res.Trailer["Some-Trailer"]; !ok {
- return fmt.Errorf("expected Some-Trailer")
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
-
- var n int
- var hf *HeadersFrame
- for hf == nil && n < 10 {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return err
- }
- hf, _ = f.(*HeadersFrame)
- n++
- }
-
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
-
- // send headers without Trailer header
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
-
- // send trailers
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "I'm an undeclared Trailer!"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- return nil
- }
- ct.run()
-}
-
-func TestTransportInvalidTrailer_Pseudo1(t *testing.T) {
- testTransportInvalidTrailer_Pseudo(t, oneHeader)
-}
-func TestTransportInvalidTrailer_Pseudo2(t *testing.T) {
- testTransportInvalidTrailer_Pseudo(t, splitHeader)
-}
-func testTransportInvalidTrailer_Pseudo(t *testing.T, trailers headerType) {
- testInvalidTrailer(t, trailers, pseudoHeaderError(":colon"), func(enc *hpack.Encoder) {
- enc.WriteField(hpack.HeaderField{Name: ":colon", Value: "foo"})
- enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"})
- })
-}
-
-func TestTransportInvalidTrailer_Capital1(t *testing.T) {
- testTransportInvalidTrailer_Capital(t, oneHeader)
-}
-func TestTransportInvalidTrailer_Capital2(t *testing.T) {
- testTransportInvalidTrailer_Capital(t, splitHeader)
-}
-func testTransportInvalidTrailer_Capital(t *testing.T, trailers headerType) {
- testInvalidTrailer(t, trailers, headerFieldNameError("Capital"), func(enc *hpack.Encoder) {
- enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"})
- enc.WriteField(hpack.HeaderField{Name: "Capital", Value: "bad"})
- })
-}
-func TestTransportInvalidTrailer_EmptyFieldName(t *testing.T) {
- testInvalidTrailer(t, oneHeader, headerFieldNameError(""), func(enc *hpack.Encoder) {
- enc.WriteField(hpack.HeaderField{Name: "", Value: "bad"})
- })
-}
-func TestTransportInvalidTrailer_BinaryFieldValue(t *testing.T) {
- testInvalidTrailer(t, oneHeader, headerFieldValueError("has\nnewline"), func(enc *hpack.Encoder) {
- enc.WriteField(hpack.HeaderField{Name: "x", Value: "has\nnewline"})
- })
-}
-
-func testInvalidTrailer(t *testing.T, trailers headerType, wantErr error, writeTrailer func(*hpack.Encoder)) {
- ct := newClientTester(t)
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip: %v", err)
- }
- defer res.Body.Close()
- if res.StatusCode != 200 {
- return fmt.Errorf("status code = %v; want 200", res.StatusCode)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- se, ok := err.(StreamError)
- if !ok || se.Cause != wantErr {
- return fmt.Errorf("res.Body ReadAll error = %q, %#v; want StreamError with cause %T, %#v", slurp, err, wantErr, wantErr)
- }
- if len(slurp) > 0 {
- return fmt.Errorf("body = %q; want nothing", slurp)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return err
- }
- switch f := f.(type) {
- case *HeadersFrame:
- var endStream bool
- send := func(mode headerType) {
- hbf := buf.Bytes()
- switch mode {
- case oneHeader:
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: endStream,
- BlockFragment: hbf,
- })
- case splitHeader:
- if len(hbf) < 2 {
- panic("too small")
- }
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: false,
- EndStream: endStream,
- BlockFragment: hbf[:1],
- })
- ct.fr.WriteContinuation(f.StreamID, true, hbf[1:])
- default:
- panic("bogus mode")
- }
- }
- // Response headers (1+ frames; 1 or 2 in this test, but never 0)
- {
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "declared"})
- endStream = false
- send(oneHeader)
- }
- // Trailers:
- {
- endStream = true
- buf.Reset()
- writeTrailer(enc)
- send(trailers)
- }
- return nil
- }
- }
- }
- ct.run()
-}
-
-// headerListSize returns the HTTP2 header list size of h.
-// http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE
-// http://httpwg.org/specs/rfc7540.html#MaxHeaderBlock
-func headerListSize(h http.Header) (size uint32) {
- for k, vv := range h {
- for _, v := range vv {
- hf := hpack.HeaderField{Name: k, Value: v}
- size += hf.Size()
- }
- }
- return size
-}
-
-// padHeaders adds data to an http.Header until headerListSize(h) ==
-// limit. Due to the way header list sizes are calculated, padHeaders
-// cannot add fewer than len("Pad-Headers") + 32 bytes to h, and will
-// call t.Fatal if asked to do so. PadHeaders first reserves enough
-// space for an empty "Pad-Headers" key, then adds as many copies of
-// filler as possible. Any remaining bytes necessary to push the
-// header list size up to limit are added to h["Pad-Headers"].
-func padHeaders(t *testing.T, h http.Header, limit uint64, filler string) {
- if limit > 0xffffffff {
- t.Fatalf("padHeaders: refusing to pad to more than 2^32-1 bytes. limit = %v", limit)
- }
- hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""}
- minPadding := uint64(hf.Size())
- size := uint64(headerListSize(h))
-
- minlimit := size + minPadding
- if limit < minlimit {
- t.Fatalf("padHeaders: limit %v < %v", limit, minlimit)
- }
-
- // Use a fixed-width format for name so that fieldSize
- // remains constant.
- nameFmt := "Pad-Headers-%06d"
- hf = hpack.HeaderField{Name: fmt.Sprintf(nameFmt, 1), Value: filler}
- fieldSize := uint64(hf.Size())
-
- // Add as many complete filler values as possible, leaving
- // room for at least one empty "Pad-Headers" key.
- limit = limit - minPadding
- for i := 0; size+fieldSize < limit; i++ {
- name := fmt.Sprintf(nameFmt, i)
- h.Add(name, filler)
- size += fieldSize
- }
-
- // Add enough bytes to reach limit.
- remain := limit - size
- lastValue := strings.Repeat("*", int(remain))
- h.Add("Pad-Headers", lastValue)
-}
-
-func TestPadHeaders(t *testing.T) {
- check := func(h http.Header, limit uint32, fillerLen int) {
- if h == nil {
- h = make(http.Header)
- }
- filler := strings.Repeat("f", fillerLen)
- padHeaders(t, h, uint64(limit), filler)
- gotSize := headerListSize(h)
- if gotSize != limit {
- t.Errorf("Got size = %v; want %v", gotSize, limit)
- }
- }
- // Try all possible combinations for small fillerLen and limit.
- hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""}
- minLimit := hf.Size()
- for limit := minLimit; limit <= 128; limit++ {
- for fillerLen := 0; uint32(fillerLen) <= limit; fillerLen++ {
- check(nil, limit, fillerLen)
- }
- }
-
- // Try a few tests with larger limits, plus cumulative
- // tests. Since these tests are cumulative, tests[i+1].limit
- // must be >= tests[i].limit + minLimit. See the comment on
- // padHeaders for more info on why the limit arg has this
- // restriction.
- tests := []struct {
- fillerLen int
- limit uint32
- }{
- {
- fillerLen: 64,
- limit: 1024,
- },
- {
- fillerLen: 1024,
- limit: 1286,
- },
- {
- fillerLen: 256,
- limit: 2048,
- },
- {
- fillerLen: 1024,
- limit: 10 * 1024,
- },
- {
- fillerLen: 1023,
- limit: 11 * 1024,
- },
- }
- h := make(http.Header)
- for _, tc := range tests {
- check(nil, tc.limit, tc.fillerLen)
- check(h, tc.limit, tc.fillerLen)
- }
-}
-
-func TestTransportChecksRequestHeaderListSize(t *testing.T) {
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- // Consume body & force client to send
- // trailers before writing response.
- // ioutil.ReadAll returns non-nil err for
- // requests that attempt to send greater than
- // maxHeaderListSize bytes of trailers, since
- // those requests generate a stream reset.
- ioutil.ReadAll(r.Body)
- r.Body.Close()
- },
- func(ts *httptest.Server) {
- ts.Config.MaxHeaderBytes = 16 << 10
- },
- optOnlyServer,
- optQuiet,
- )
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- checkRoundTrip := func(req *http.Request, wantErr error, desc string) {
- res, err := tr.RoundTrip(req)
- if err != wantErr {
- if res != nil {
- res.Body.Close()
- }
- t.Errorf("%v: RoundTrip err = %v; want %v", desc, err, wantErr)
- return
- }
- if err == nil {
- if res == nil {
- t.Errorf("%v: response nil; want non-nil.", desc)
- return
- }
- defer res.Body.Close()
- if res.StatusCode != http.StatusOK {
- t.Errorf("%v: response status = %v; want %v", desc, res.StatusCode, http.StatusOK)
- }
- return
- }
- if res != nil {
- t.Errorf("%v: RoundTrip err = %v but response non-nil", desc, err)
- }
- }
- headerListSizeForRequest := func(req *http.Request) (size uint64) {
- contentLen := actualContentLength(req)
- trailers, err := commaSeparatedTrailers(req)
- if err != nil {
- t.Fatalf("headerListSizeForRequest: %v", err)
- }
- cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff}
- cc.henc = hpack.NewEncoder(&cc.hbuf)
- cc.mu.Lock()
- hdrs, err := cc.encodeHeaders(req, true, trailers, contentLen)
- cc.mu.Unlock()
- if err != nil {
- t.Fatalf("headerListSizeForRequest: %v", err)
- }
- hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(hf hpack.HeaderField) {
- size += uint64(hf.Size())
- })
- if len(hdrs) > 0 {
- if _, err := hpackDec.Write(hdrs); err != nil {
- t.Fatalf("headerListSizeForRequest: %v", err)
- }
- }
- return size
- }
- // Create a new Request for each test, rather than reusing the
- // same Request, to avoid a race when modifying req.Headers.
- // See https://github.com/golang/go/issues/21316
- newRequest := func() *http.Request {
- // Body must be non-nil to enable writing trailers.
- body := strings.NewReader("hello")
- req, err := http.NewRequest("POST", st.ts.URL, body)
- if err != nil {
- t.Fatalf("newRequest: NewRequest: %v", err)
- }
- return req
- }
-
- // Make an arbitrary request to ensure we get the server's
- // settings frame and initialize peerMaxHeaderListSize.
- req := newRequest()
- checkRoundTrip(req, nil, "Initial request")
-
- // Get the ClientConn associated with the request and validate
- // peerMaxHeaderListSize.
- addr := authorityAddr(req.URL.Scheme, req.URL.Host)
- cc, err := tr.connPool().GetClientConn(req, addr)
- if err != nil {
- t.Fatalf("GetClientConn: %v", err)
- }
- cc.mu.Lock()
- peerSize := cc.peerMaxHeaderListSize
- cc.mu.Unlock()
- st.scMu.Lock()
- wantSize := uint64(st.sc.maxHeaderListSize())
- st.scMu.Unlock()
- if peerSize != wantSize {
- t.Errorf("peerMaxHeaderListSize = %v; want %v", peerSize, wantSize)
- }
-
- // Sanity check peerSize. (*serverConn) maxHeaderListSize adds
- // 320 bytes of padding.
- wantHeaderBytes := uint64(st.ts.Config.MaxHeaderBytes) + 320
- if peerSize != wantHeaderBytes {
- t.Errorf("peerMaxHeaderListSize = %v; want %v.", peerSize, wantHeaderBytes)
- }
-
- // Pad headers & trailers, but stay under peerSize.
- req = newRequest()
- req.Header = make(http.Header)
- req.Trailer = make(http.Header)
- filler := strings.Repeat("*", 1024)
- padHeaders(t, req.Trailer, peerSize, filler)
- // cc.encodeHeaders adds some default headers to the request,
- // so we need to leave room for those.
- defaultBytes := headerListSizeForRequest(req)
- padHeaders(t, req.Header, peerSize-defaultBytes, filler)
- checkRoundTrip(req, nil, "Headers & Trailers under limit")
-
- // Add enough header bytes to push us over peerSize.
- req = newRequest()
- req.Header = make(http.Header)
- padHeaders(t, req.Header, peerSize, filler)
- checkRoundTrip(req, errRequestHeaderListSize, "Headers over limit")
-
- // Push trailers over the limit.
- req = newRequest()
- req.Trailer = make(http.Header)
- padHeaders(t, req.Trailer, peerSize+1, filler)
- checkRoundTrip(req, errRequestHeaderListSize, "Trailers over limit")
-
- // Send headers with a single large value.
- req = newRequest()
- filler = strings.Repeat("*", int(peerSize))
- req.Header = make(http.Header)
- req.Header.Set("Big", filler)
- checkRoundTrip(req, errRequestHeaderListSize, "Single large header")
-
- // Send trailers with a single large value.
- req = newRequest()
- req.Trailer = make(http.Header)
- req.Trailer.Set("Big", filler)
- checkRoundTrip(req, errRequestHeaderListSize, "Single large trailer")
-}
-
-func TestTransportChecksResponseHeaderListSize(t *testing.T) {
- ct := newClientTester(t)
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != errResponseHeaderListSize {
- if res != nil {
- res.Body.Close()
- }
- size := int64(0)
- for k, vv := range res.Header {
- for _, v := range vv {
- size += int64(len(k)) + int64(len(v)) + 32
- }
- }
- return fmt.Errorf("RoundTrip Error = %v (and %d bytes of response headers); want errResponseHeaderListSize", err, size)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return err
- }
- switch f := f.(type) {
- case *HeadersFrame:
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- large := strings.Repeat("a", 1<<10)
- for i := 0; i < 5042; i++ {
- enc.WriteField(hpack.HeaderField{Name: large, Value: large})
- }
- if size, want := buf.Len(), 6329; size != want {
- // Note: this number might change if
- // our hpack implementation
- // changes. That's fine. This is
- // just a sanity check that our
- // response can fit in a single
- // header block fragment frame.
- return fmt.Errorf("encoding over 10MB of duplicate keypairs took %d bytes; expected %d", size, want)
- }
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- return nil
- }
- }
- }
- ct.run()
-}
-
-// Test that the the Transport returns a typed error from Response.Body.Read calls
-// when the server sends an error. (here we use a panic, since that should generate
-// a stream error, but others like cancel should be similar)
-func TestTransportBodyReadErrorType(t *testing.T) {
- doPanic := make(chan bool, 1)
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- w.(http.Flusher).Flush() // force headers out
- <-doPanic
- panic("boom")
- },
- optOnlyServer,
- optQuiet,
- )
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
-
- res, err := c.Get(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
- doPanic <- true
- buf := make([]byte, 100)
- n, err := res.Body.Read(buf)
- want := StreamError{StreamID: 0x1, Code: 0x2}
- if !reflect.DeepEqual(want, err) {
- t.Errorf("Read = %v, %#v; want error %#v", n, err, want)
- }
-}
-
-// golang.org/issue/13924
-// This used to fail after many iterations, especially with -race:
-// go test -v -run=TestTransportDoubleCloseOnWriteError -count=500 -race
-func TestTransportDoubleCloseOnWriteError(t *testing.T) {
- var (
- mu sync.Mutex
- conn net.Conn // to close if set
- )
-
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- mu.Lock()
- defer mu.Unlock()
- if conn != nil {
- conn.Close()
- }
- },
- optOnlyServer,
- )
- defer st.Close()
-
- tr := &Transport{
- TLSClientConfig: tlsConfigInsecure,
- DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- tc, err := tls.Dial(network, addr, cfg)
- if err != nil {
- return nil, err
- }
- mu.Lock()
- defer mu.Unlock()
- conn = tc
- return tc, nil
- },
- }
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
- c.Get(st.ts.URL)
-}
-
-// Test that the http1 Transport.DisableKeepAlives option is respected
-// and connections are closed as soon as idle.
-// See golang.org/issue/14008
-func TestTransportDisableKeepAlives(t *testing.T) {
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- io.WriteString(w, "hi")
- },
- optOnlyServer,
- )
- defer st.Close()
-
- connClosed := make(chan struct{}) // closed on tls.Conn.Close
- tr := &Transport{
- t1: &http.Transport{
- DisableKeepAlives: true,
- },
- TLSClientConfig: tlsConfigInsecure,
- DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- tc, err := tls.Dial(network, addr, cfg)
- if err != nil {
- return nil, err
- }
- return &noteCloseConn{Conn: tc, closefn: func() { close(connClosed) }}, nil
- },
- }
- c := &http.Client{Transport: tr}
- res, err := c.Get(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- if _, err := ioutil.ReadAll(res.Body); err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
-
- select {
- case <-connClosed:
- case <-time.After(1 * time.Second):
- t.Errorf("timeout")
- }
-
-}
-
-// Test concurrent requests with Transport.DisableKeepAlives. We can share connections,
-// but when things are totally idle, it still needs to close.
-func TestTransportDisableKeepAlives_Concurrency(t *testing.T) {
- const D = 25 * time.Millisecond
- st := newServerTester(t,
- func(w http.ResponseWriter, r *http.Request) {
- time.Sleep(D)
- io.WriteString(w, "hi")
- },
- optOnlyServer,
- )
- defer st.Close()
-
- var dials int32
- var conns sync.WaitGroup
- tr := &Transport{
- t1: &http.Transport{
- DisableKeepAlives: true,
- },
- TLSClientConfig: tlsConfigInsecure,
- DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- tc, err := tls.Dial(network, addr, cfg)
- if err != nil {
- return nil, err
- }
- atomic.AddInt32(&dials, 1)
- conns.Add(1)
- return &noteCloseConn{Conn: tc, closefn: func() { conns.Done() }}, nil
- },
- }
- c := &http.Client{Transport: tr}
- var reqs sync.WaitGroup
- const N = 20
- for i := 0; i < N; i++ {
- reqs.Add(1)
- if i == N-1 {
- // For the final request, try to make all the
- // others close. This isn't verified in the
- // count, other than the Log statement, since
- // it's so timing dependent. This test is
- // really to make sure we don't interrupt a
- // valid request.
- time.Sleep(D * 2)
- }
- go func() {
- defer reqs.Done()
- res, err := c.Get(st.ts.URL)
- if err != nil {
- t.Error(err)
- return
- }
- if _, err := ioutil.ReadAll(res.Body); err != nil {
- t.Error(err)
- return
- }
- res.Body.Close()
- }()
- }
- reqs.Wait()
- conns.Wait()
- t.Logf("did %d dials, %d requests", atomic.LoadInt32(&dials), N)
-}
-
-type noteCloseConn struct {
- net.Conn
- onceClose sync.Once
- closefn func()
-}
-
-func (c *noteCloseConn) Close() error {
- c.onceClose.Do(c.closefn)
- return c.Conn.Close()
-}
-
-func isTimeout(err error) bool {
- switch err := err.(type) {
- case nil:
- return false
- case *url.Error:
- return isTimeout(err.Err)
- case net.Error:
- return err.Timeout()
- }
- return false
-}
-
-// Test that the http1 Transport.ResponseHeaderTimeout option and cancel is sent.
-func TestTransportResponseHeaderTimeout_NoBody(t *testing.T) {
- testTransportResponseHeaderTimeout(t, false)
-}
-func TestTransportResponseHeaderTimeout_Body(t *testing.T) {
- testTransportResponseHeaderTimeout(t, true)
-}
-
-func testTransportResponseHeaderTimeout(t *testing.T, body bool) {
- ct := newClientTester(t)
- ct.tr.t1 = &http.Transport{
- ResponseHeaderTimeout: 5 * time.Millisecond,
- }
- ct.client = func() error {
- c := &http.Client{Transport: ct.tr}
- var err error
- var n int64
- const bodySize = 4 << 20
- if body {
- _, err = c.Post("https://dummy.tld/", "text/foo", io.LimitReader(countingReader{&n}, bodySize))
- } else {
- _, err = c.Get("https://dummy.tld/")
- }
- if !isTimeout(err) {
- t.Errorf("client expected timeout error; got %#v", err)
- }
- if body && n != bodySize {
- t.Errorf("only read %d bytes of body; want %d", n, bodySize)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- t.Logf("ReadFrame: %v", err)
- return nil
- }
- switch f := f.(type) {
- case *DataFrame:
- dataLen := len(f.Data())
- if dataLen > 0 {
- if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil {
- return err
- }
- if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil {
- return err
- }
- }
- case *RSTStreamFrame:
- if f.StreamID == 1 && f.ErrCode == ErrCodeCancel {
- return nil
- }
- }
- }
- }
- ct.run()
-}
-
-func TestTransportDisableCompression(t *testing.T) {
- const body = "sup"
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- want := http.Header{
- "User-Agent": []string{"Go-http-client/2.0"},
- }
- if !reflect.DeepEqual(r.Header, want) {
- t.Errorf("request headers = %v; want %v", r.Header, want)
- }
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{
- TLSClientConfig: tlsConfigInsecure,
- t1: &http.Transport{
- DisableCompression: true,
- },
- }
- defer tr.CloseIdleConnections()
-
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Fatal(err)
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- defer res.Body.Close()
-}
-
-// RFC 7540 section 8.1.2.2
-func TestTransportRejectsConnHeaders(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- var got []string
- for k := range r.Header {
- got = append(got, k)
- }
- sort.Strings(got)
- w.Header().Set("Got-Header", strings.Join(got, ","))
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- tests := []struct {
- key string
- value []string
- want string
- }{
- {
- key: "Upgrade",
- value: []string{"anything"},
- want: "ERROR: http2: invalid Upgrade request header: [\"anything\"]",
- },
- {
- key: "Connection",
- value: []string{"foo"},
- want: "ERROR: http2: invalid Connection request header: [\"foo\"]",
- },
- {
- key: "Connection",
- value: []string{"close"},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Connection",
- value: []string{"close", "something-else"},
- want: "ERROR: http2: invalid Connection request header: [\"close\" \"something-else\"]",
- },
- {
- key: "Connection",
- value: []string{"keep-alive"},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Proxy-Connection", // just deleted and ignored
- value: []string{"keep-alive"},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Transfer-Encoding",
- value: []string{""},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Transfer-Encoding",
- value: []string{"foo"},
- want: "ERROR: http2: invalid Transfer-Encoding request header: [\"foo\"]",
- },
- {
- key: "Transfer-Encoding",
- value: []string{"chunked"},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Transfer-Encoding",
- value: []string{"chunked", "other"},
- want: "ERROR: http2: invalid Transfer-Encoding request header: [\"chunked\" \"other\"]",
- },
- {
- key: "Content-Length",
- value: []string{"123"},
- want: "Accept-Encoding,User-Agent",
- },
- {
- key: "Keep-Alive",
- value: []string{"doop"},
- want: "Accept-Encoding,User-Agent",
- },
- }
-
- for _, tt := range tests {
- req, _ := http.NewRequest("GET", st.ts.URL, nil)
- req.Header[tt.key] = tt.value
- res, err := tr.RoundTrip(req)
- var got string
- if err != nil {
- got = fmt.Sprintf("ERROR: %v", err)
- } else {
- got = res.Header.Get("Got-Header")
- res.Body.Close()
- }
- if got != tt.want {
- t.Errorf("For key %q, value %q, got = %q; want %q", tt.key, tt.value, got, tt.want)
- }
- }
-}
-
-// golang.org/issue/14048
-func TestTransportFailsOnInvalidHeaders(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- var got []string
- for k := range r.Header {
- got = append(got, k)
- }
- sort.Strings(got)
- w.Header().Set("Got-Header", strings.Join(got, ","))
- }, optOnlyServer)
- defer st.Close()
-
- tests := [...]struct {
- h http.Header
- wantErr string
- }{
- 0: {
- h: http.Header{"with space": {"foo"}},
- wantErr: `invalid HTTP header name "with space"`,
- },
- 1: {
- h: http.Header{"name": {"БрÑд"}},
- wantErr: "", // okay
- },
- 2: {
- h: http.Header{"имÑ": {"Brad"}},
- wantErr: `invalid HTTP header name "имÑ"`,
- },
- 3: {
- h: http.Header{"foo": {"foo\x01bar"}},
- wantErr: `invalid HTTP header value "foo\x01bar" for header "foo"`,
- },
- }
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- for i, tt := range tests {
- req, _ := http.NewRequest("GET", st.ts.URL, nil)
- req.Header = tt.h
- res, err := tr.RoundTrip(req)
- var bad bool
- if tt.wantErr == "" {
- if err != nil {
- bad = true
- t.Errorf("case %d: error = %v; want no error", i, err)
- }
- } else {
- if !strings.Contains(fmt.Sprint(err), tt.wantErr) {
- bad = true
- t.Errorf("case %d: error = %v; want error %q", i, err, tt.wantErr)
- }
- }
- if err == nil {
- if bad {
- t.Logf("case %d: server got headers %q", i, res.Header.Get("Got-Header"))
- }
- res.Body.Close()
- }
- }
-}
-
-// Tests that gzipReader doesn't crash on a second Read call following
-// the first Read call's gzip.NewReader returning an error.
-func TestGzipReader_DoubleReadCrash(t *testing.T) {
- gz := &gzipReader{
- body: ioutil.NopCloser(strings.NewReader("0123456789")),
- }
- var buf [1]byte
- n, err1 := gz.Read(buf[:])
- if n != 0 || !strings.Contains(fmt.Sprint(err1), "invalid header") {
- t.Fatalf("Read = %v, %v; want 0, invalid header", n, err1)
- }
- n, err2 := gz.Read(buf[:])
- if n != 0 || err2 != err1 {
- t.Fatalf("second Read = %v, %v; want 0, %v", n, err2, err1)
- }
-}
-
-func TestTransportNewTLSConfig(t *testing.T) {
- tests := [...]struct {
- conf *tls.Config
- host string
- want *tls.Config
- }{
- // Normal case.
- 0: {
- conf: nil,
- host: "foo.com",
- want: &tls.Config{
- ServerName: "foo.com",
- NextProtos: []string{NextProtoTLS},
- },
- },
-
- // User-provided name (bar.com) takes precedence:
- 1: {
- conf: &tls.Config{
- ServerName: "bar.com",
- },
- host: "foo.com",
- want: &tls.Config{
- ServerName: "bar.com",
- NextProtos: []string{NextProtoTLS},
- },
- },
-
- // NextProto is prepended:
- 2: {
- conf: &tls.Config{
- NextProtos: []string{"foo", "bar"},
- },
- host: "example.com",
- want: &tls.Config{
- ServerName: "example.com",
- NextProtos: []string{NextProtoTLS, "foo", "bar"},
- },
- },
-
- // NextProto is not duplicated:
- 3: {
- conf: &tls.Config{
- NextProtos: []string{"foo", "bar", NextProtoTLS},
- },
- host: "example.com",
- want: &tls.Config{
- ServerName: "example.com",
- NextProtos: []string{"foo", "bar", NextProtoTLS},
- },
- },
- }
- for i, tt := range tests {
- // Ignore the session ticket keys part, which ends up populating
- // unexported fields in the Config:
- if tt.conf != nil {
- tt.conf.SessionTicketsDisabled = true
- }
-
- tr := &Transport{TLSClientConfig: tt.conf}
- got := tr.newTLSConfig(tt.host)
-
- got.SessionTicketsDisabled = false
-
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("%d. got %#v; want %#v", i, got, tt.want)
- }
- }
-}
-
-// The Google GFE responds to HEAD requests with a HEADERS frame
-// without END_STREAM, followed by a 0-length DATA frame with
-// END_STREAM. Make sure we don't get confused by that. (We did.)
-func TestTransportReadHeadResponse(t *testing.T) {
- ct := newClientTester(t)
- clientDone := make(chan struct{})
- ct.client = func() error {
- defer close(clientDone)
- req, _ := http.NewRequest("HEAD", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return err
- }
- if res.ContentLength != 123 {
- return fmt.Errorf("Content-Length = %d; want 123", res.ContentLength)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return fmt.Errorf("ReadAll: %v", err)
- }
- if len(slurp) > 0 {
- return fmt.Errorf("Unexpected non-empty ReadAll body: %q", slurp)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- t.Logf("ReadFrame: %v", err)
- return nil
- }
- hf, ok := f.(*HeadersFrame)
- if !ok {
- continue
- }
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false, // as the GFE does
- BlockFragment: buf.Bytes(),
- })
- ct.fr.WriteData(hf.StreamID, true, nil)
-
- <-clientDone
- return nil
- }
- }
- ct.run()
-}
-
-func TestTransportReadHeadResponseWithBody(t *testing.T) {
- // This test use not valid response format.
- // Discarding logger output to not spam tests output.
- log.SetOutput(ioutil.Discard)
- defer log.SetOutput(os.Stderr)
-
- response := "redirecting to /elsewhere"
- ct := newClientTester(t)
- clientDone := make(chan struct{})
- ct.client = func() error {
- defer close(clientDone)
- req, _ := http.NewRequest("HEAD", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return err
- }
- if res.ContentLength != int64(len(response)) {
- return fmt.Errorf("Content-Length = %d; want %d", res.ContentLength, len(response))
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return fmt.Errorf("ReadAll: %v", err)
- }
- if len(slurp) > 0 {
- return fmt.Errorf("Unexpected non-empty ReadAll body: %q", slurp)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- t.Logf("ReadFrame: %v", err)
- return nil
- }
- hf, ok := f.(*HeadersFrame)
- if !ok {
- continue
- }
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "content-length", Value: strconv.Itoa(len(response))})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
- ct.fr.WriteData(hf.StreamID, true, []byte(response))
-
- <-clientDone
- return nil
- }
- }
- ct.run()
-}
-
-type neverEnding byte
-
-func (b neverEnding) Read(p []byte) (int, error) {
- for i := range p {
- p[i] = byte(b)
- }
- return len(p), nil
-}
-
-// golang.org/issue/15425: test that a handler closing the request
-// body doesn't terminate the stream to the peer. (It just stops
-// readability from the handler's side, and eventually the client
-// runs out of flow control tokens)
-func TestTransportHandlerBodyClose(t *testing.T) {
- const bodySize = 10 << 20
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- r.Body.Close()
- io.Copy(w, io.LimitReader(neverEnding('A'), bodySize))
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- g0 := runtime.NumGoroutine()
-
- const numReq = 10
- for i := 0; i < numReq; i++ {
- req, err := http.NewRequest("POST", st.ts.URL, struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)})
- if err != nil {
- t.Fatal(err)
- }
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- n, err := io.Copy(ioutil.Discard, res.Body)
- res.Body.Close()
- if n != bodySize || err != nil {
- t.Fatalf("req#%d: Copy = %d, %v; want %d, nil", i, n, err, bodySize)
- }
- }
- tr.CloseIdleConnections()
-
- gd := runtime.NumGoroutine() - g0
- if gd > numReq/2 {
- t.Errorf("appeared to leak goroutines")
- }
-
-}
-
-// https://golang.org/issue/15930
-func TestTransportFlowControl(t *testing.T) {
- const bufLen = 64 << 10
- var total int64 = 100 << 20 // 100MB
- if testing.Short() {
- total = 10 << 20
- }
-
- var wrote int64 // updated atomically
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- b := make([]byte, bufLen)
- for wrote < total {
- n, err := w.Write(b)
- atomic.AddInt64(&wrote, int64(n))
- if err != nil {
- t.Errorf("ResponseWriter.Write error: %v", err)
- break
- }
- w.(http.Flusher).Flush()
- }
- }, optOnlyServer)
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- t.Fatal("NewRequest error:", err)
- }
- resp, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal("RoundTrip error:", err)
- }
- defer resp.Body.Close()
-
- var read int64
- b := make([]byte, bufLen)
- for {
- n, err := resp.Body.Read(b)
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal("Read error:", err)
- }
- read += int64(n)
-
- const max = transportDefaultStreamFlow
- if w := atomic.LoadInt64(&wrote); -max > read-w || read-w > max {
- t.Fatalf("Too much data inflight: server wrote %v bytes but client only received %v", w, read)
- }
-
- // Let the server get ahead of the client.
- time.Sleep(1 * time.Millisecond)
- }
-}
-
-// golang.org/issue/14627 -- if the server sends a GOAWAY frame, make
-// the Transport remember it and return it back to users (via
-// RoundTrip or request body reads) if needed (e.g. if the server
-// proceeds to close the TCP connection before the client gets its
-// response)
-func TestTransportUsesGoAwayDebugError_RoundTrip(t *testing.T) {
- testTransportUsesGoAwayDebugError(t, false)
-}
-
-func TestTransportUsesGoAwayDebugError_Body(t *testing.T) {
- testTransportUsesGoAwayDebugError(t, true)
-}
-
-func testTransportUsesGoAwayDebugError(t *testing.T, failMidBody bool) {
- ct := newClientTester(t)
- clientDone := make(chan struct{})
-
- const goAwayErrCode = ErrCodeHTTP11Required // arbitrary
- const goAwayDebugData = "some debug data"
-
- ct.client = func() error {
- defer close(clientDone)
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if failMidBody {
- if err != nil {
- return fmt.Errorf("unexpected client RoundTrip error: %v", err)
- }
- _, err = io.Copy(ioutil.Discard, res.Body)
- res.Body.Close()
- }
- want := GoAwayError{
- LastStreamID: 5,
- ErrCode: goAwayErrCode,
- DebugData: goAwayDebugData,
- }
- if !reflect.DeepEqual(err, want) {
- t.Errorf("RoundTrip error = %T: %#v, want %T (%#v)", err, err, want, want)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- t.Logf("ReadFrame: %v", err)
- return nil
- }
- hf, ok := f.(*HeadersFrame)
- if !ok {
- continue
- }
- if failMidBody {
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
- }
- // Write two GOAWAY frames, to test that the Transport takes
- // the interesting parts of both.
- ct.fr.WriteGoAway(5, ErrCodeNo, []byte(goAwayDebugData))
- ct.fr.WriteGoAway(5, goAwayErrCode, nil)
- ct.sc.(*net.TCPConn).CloseWrite()
- <-clientDone
- return nil
- }
- }
- ct.run()
-}
-
-func testTransportReturnsUnusedFlowControl(t *testing.T, oneDataFrame bool) {
- ct := newClientTester(t)
-
- clientClosed := make(chan struct{})
- serverWroteFirstByte := make(chan struct{})
-
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return err
- }
- <-serverWroteFirstByte
-
- if n, err := res.Body.Read(make([]byte, 1)); err != nil || n != 1 {
- return fmt.Errorf("body read = %v, %v; want 1, nil", n, err)
- }
- res.Body.Close() // leaving 4999 bytes unread
- close(clientClosed)
-
- return nil
- }
- ct.server = func() error {
- ct.greet()
-
- var hf *HeadersFrame
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
- }
- switch f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- continue
- }
- var ok bool
- hf, ok = f.(*HeadersFrame)
- if !ok {
- return fmt.Errorf("Got %T; want HeadersFrame", f)
- }
- break
- }
-
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
-
- // Two cases:
- // - Send one DATA frame with 5000 bytes.
- // - Send two DATA frames with 1 and 4999 bytes each.
- //
- // In both cases, the client should consume one byte of data,
- // refund that byte, then refund the following 4999 bytes.
- //
- // In the second case, the server waits for the client connection to
- // close before seconding the second DATA frame. This tests the case
- // where the client receives a DATA frame after it has reset the stream.
- if oneDataFrame {
- ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 5000))
- close(serverWroteFirstByte)
- <-clientClosed
- } else {
- ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 1))
- close(serverWroteFirstByte)
- <-clientClosed
- ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 4999))
- }
-
- waitingFor := "RSTStreamFrame"
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for %s: %v", waitingFor, err)
- }
- if _, ok := f.(*SettingsFrame); ok {
- continue
- }
- switch waitingFor {
- case "RSTStreamFrame":
- if rf, ok := f.(*RSTStreamFrame); !ok || rf.ErrCode != ErrCodeCancel {
- return fmt.Errorf("Expected a RSTStreamFrame with code cancel; got %v", summarizeFrame(f))
- }
- waitingFor = "WindowUpdateFrame"
- case "WindowUpdateFrame":
- if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != 4999 {
- return fmt.Errorf("Expected WindowUpdateFrame for 4999 bytes; got %v", summarizeFrame(f))
- }
- return nil
- }
- }
- }
- ct.run()
-}
-
-// See golang.org/issue/16481
-func TestTransportReturnsUnusedFlowControlSingleWrite(t *testing.T) {
- testTransportReturnsUnusedFlowControl(t, true)
-}
-
-// See golang.org/issue/20469
-func TestTransportReturnsUnusedFlowControlMultipleWrites(t *testing.T) {
- testTransportReturnsUnusedFlowControl(t, false)
-}
-
-// Issue 16612: adjust flow control on open streams when transport
-// receives SETTINGS with INITIAL_WINDOW_SIZE from server.
-func TestTransportAdjustsFlowControl(t *testing.T) {
- ct := newClientTester(t)
- clientDone := make(chan struct{})
-
- const bodySize = 1 << 20
-
- ct.client = func() error {
- defer ct.cc.(*net.TCPConn).CloseWrite()
- defer close(clientDone)
-
- req, _ := http.NewRequest("POST", "https://dummy.tld/", struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)})
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return err
- }
- res.Body.Close()
- return nil
- }
- ct.server = func() error {
- _, err := io.ReadFull(ct.sc, make([]byte, len(ClientPreface)))
- if err != nil {
- return fmt.Errorf("reading client preface: %v", err)
- }
-
- var gotBytes int64
- var sentSettings bool
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- select {
- case <-clientDone:
- return nil
- default:
- return fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
- }
- }
- switch f := f.(type) {
- case *DataFrame:
- gotBytes += int64(len(f.Data()))
- // After we've got half the client's
- // initial flow control window's worth
- // of request body data, give it just
- // enough flow control to finish.
- if gotBytes >= initialWindowSize/2 && !sentSettings {
- sentSettings = true
-
- ct.fr.WriteSettings(Setting{ID: SettingInitialWindowSize, Val: bodySize})
- ct.fr.WriteWindowUpdate(0, bodySize)
- ct.fr.WriteSettingsAck()
- }
-
- if f.StreamEnded() {
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- }
- }
- }
- }
- ct.run()
-}
-
-// See golang.org/issue/16556
-func TestTransportReturnsDataPaddingFlowControl(t *testing.T) {
- ct := newClientTester(t)
-
- unblockClient := make(chan bool, 1)
-
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err != nil {
- return err
- }
- defer res.Body.Close()
- <-unblockClient
- return nil
- }
- ct.server = func() error {
- ct.greet()
-
- var hf *HeadersFrame
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
- }
- switch f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- continue
- }
- var ok bool
- hf, ok = f.(*HeadersFrame)
- if !ok {
- return fmt.Errorf("Got %T; want HeadersFrame", f)
- }
- break
- }
-
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
- pad := make([]byte, 5)
- ct.fr.WriteDataPadded(hf.StreamID, false, make([]byte, 5000), pad) // without ending stream
-
- f, err := ct.readNonSettingsFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for first WindowUpdateFrame: %v", err)
- }
- wantBack := uint32(len(pad)) + 1 // one byte for the length of the padding
- if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID != 0 {
- return fmt.Errorf("Expected conn WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f))
- }
-
- f, err = ct.readNonSettingsFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for second WindowUpdateFrame: %v", err)
- }
- if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID == 0 {
- return fmt.Errorf("Expected stream WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f))
- }
- unblockClient <- true
- return nil
- }
- ct.run()
-}
-
-// golang.org/issue/16572 -- RoundTrip shouldn't hang when it gets a
-// StreamError as a result of the response HEADERS
-func TestTransportReturnsErrorOnBadResponseHeaders(t *testing.T) {
- ct := newClientTester(t)
-
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := ct.tr.RoundTrip(req)
- if err == nil {
- res.Body.Close()
- return errors.New("unexpected successful GET")
- }
- want := StreamError{1, ErrCodeProtocol, headerFieldNameError(" content-type")}
- if !reflect.DeepEqual(want, err) {
- t.Errorf("RoundTrip error = %#v; want %#v", err, want)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
-
- hf, err := ct.firstHeaders()
- if err != nil {
- return err
- }
-
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: " content-type", Value: "bogus"}) // bogus spaces
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
-
- for {
- fr, err := ct.readFrame()
- if err != nil {
- return fmt.Errorf("error waiting for RST_STREAM from client: %v", err)
- }
- if _, ok := fr.(*SettingsFrame); ok {
- continue
- }
- if rst, ok := fr.(*RSTStreamFrame); !ok || rst.StreamID != 1 || rst.ErrCode != ErrCodeProtocol {
- t.Errorf("Frame = %v; want RST_STREAM for stream 1 with ErrCodeProtocol", summarizeFrame(fr))
- }
- break
- }
-
- return nil
- }
- ct.run()
-}
-
-// byteAndEOFReader returns is in an io.Reader which reads one byte
-// (the underlying byte) and io.EOF at once in its Read call.
-type byteAndEOFReader byte
-
-func (b byteAndEOFReader) Read(p []byte) (n int, err error) {
- if len(p) == 0 {
- panic("unexpected useless call")
- }
- p[0] = byte(b)
- return 1, io.EOF
-}
-
-// Issue 16788: the Transport had a regression where it started
-// sending a spurious DATA frame with a duplicate END_STREAM bit after
-// the request body writer goroutine had already read an EOF from the
-// Request.Body and included the END_STREAM on a data-carrying DATA
-// frame.
-//
-// Notably, to trigger this, the requests need to use a Request.Body
-// which returns (non-0, io.EOF) and also needs to set the ContentLength
-// explicitly.
-func TestTransportBodyDoubleEndStream(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- // Nothing.
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- for i := 0; i < 2; i++ {
- req, _ := http.NewRequest("POST", st.ts.URL, byteAndEOFReader('a'))
- req.ContentLength = 1
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatalf("failure on req %d: %v", i+1, err)
- }
- defer res.Body.Close()
- }
-}
-
-// golang.org/issue/16847, golang.org/issue/19103
-func TestTransportRequestPathPseudo(t *testing.T) {
- type result struct {
- path string
- err string
- }
- tests := []struct {
- req *http.Request
- want result
- }{
- 0: {
- req: &http.Request{
- Method: "GET",
- URL: &url.URL{
- Host: "foo.com",
- Path: "/foo",
- },
- },
- want: result{path: "/foo"},
- },
- // In Go 1.7, we accepted paths of "//foo".
- // In Go 1.8, we rejected it (issue 16847).
- // In Go 1.9, we accepted it again (issue 19103).
- 1: {
- req: &http.Request{
- Method: "GET",
- URL: &url.URL{
- Host: "foo.com",
- Path: "//foo",
- },
- },
- want: result{path: "//foo"},
- },
-
- // Opaque with //$Matching_Hostname/path
- 2: {
- req: &http.Request{
- Method: "GET",
- URL: &url.URL{
- Scheme: "https",
- Opaque: "//foo.com/path",
- Host: "foo.com",
- Path: "/ignored",
- },
- },
- want: result{path: "/path"},
- },
-
- // Opaque with some other Request.Host instead:
- 3: {
- req: &http.Request{
- Method: "GET",
- Host: "bar.com",
- URL: &url.URL{
- Scheme: "https",
- Opaque: "//bar.com/path",
- Host: "foo.com",
- Path: "/ignored",
- },
- },
- want: result{path: "/path"},
- },
-
- // Opaque without the leading "//":
- 4: {
- req: &http.Request{
- Method: "GET",
- URL: &url.URL{
- Opaque: "/path",
- Host: "foo.com",
- Path: "/ignored",
- },
- },
- want: result{path: "/path"},
- },
-
- // Opaque we can't handle:
- 5: {
- req: &http.Request{
- Method: "GET",
- URL: &url.URL{
- Scheme: "https",
- Opaque: "//unknown_host/path",
- Host: "foo.com",
- Path: "/ignored",
- },
- },
- want: result{err: `invalid request :path "https://unknown_host/path" from URL.Opaque = "//unknown_host/path"`},
- },
-
- // A CONNECT request:
- 6: {
- req: &http.Request{
- Method: "CONNECT",
- URL: &url.URL{
- Host: "foo.com",
- },
- },
- want: result{},
- },
- }
- for i, tt := range tests {
- cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff}
- cc.henc = hpack.NewEncoder(&cc.hbuf)
- cc.mu.Lock()
- hdrs, err := cc.encodeHeaders(tt.req, false, "", -1)
- cc.mu.Unlock()
- var got result
- hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(f hpack.HeaderField) {
- if f.Name == ":path" {
- got.path = f.Value
- }
- })
- if err != nil {
- got.err = err.Error()
- } else if len(hdrs) > 0 {
- if _, err := hpackDec.Write(hdrs); err != nil {
- t.Errorf("%d. bogus hpack: %v", i, err)
- continue
- }
- }
- if got != tt.want {
- t.Errorf("%d. got %+v; want %+v", i, got, tt.want)
- }
-
- }
-
-}
-
-// golang.org/issue/17071 -- don't sniff the first byte of the request body
-// before we've determined that the ClientConn is usable.
-func TestRoundTripDoesntConsumeRequestBodyEarly(t *testing.T) {
- const body = "foo"
- req, _ := http.NewRequest("POST", "http://foo.com/", ioutil.NopCloser(strings.NewReader(body)))
- cc := &ClientConn{
- closed: true,
- }
- _, err := cc.RoundTrip(req)
- if err != errClientConnUnusable {
- t.Fatalf("RoundTrip = %v; want errClientConnUnusable", err)
- }
- slurp, err := ioutil.ReadAll(req.Body)
- if err != nil {
- t.Errorf("ReadAll = %v", err)
- }
- if string(slurp) != body {
- t.Errorf("Body = %q; want %q", slurp, body)
- }
-}
-
-func TestClientConnPing(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}, optOnlyServer)
- defer st.Close()
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- cc, err := tr.dialClientConn(st.ts.Listener.Addr().String(), false)
- if err != nil {
- t.Fatal(err)
- }
- if err = cc.Ping(testContext{}); err != nil {
- t.Fatal(err)
- }
-}
-
-// Issue 16974: if the server sent a DATA frame after the user
-// canceled the Transport's Request, the Transport previously wrote to a
-// closed pipe, got an error, and ended up closing the whole TCP
-// connection.
-func TestTransportCancelDataResponseRace(t *testing.T) {
- cancel := make(chan struct{})
- clientGotError := make(chan bool, 1)
-
- const msg = "Hello."
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- if strings.Contains(r.URL.Path, "/hello") {
- time.Sleep(50 * time.Millisecond)
- io.WriteString(w, msg)
- return
- }
- for i := 0; i < 50; i++ {
- io.WriteString(w, "Some data.")
- w.(http.Flusher).Flush()
- if i == 2 {
- close(cancel)
- <-clientGotError
- }
- time.Sleep(10 * time.Millisecond)
- }
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- c := &http.Client{Transport: tr}
- req, _ := http.NewRequest("GET", st.ts.URL, nil)
- req.Cancel = cancel
- res, err := c.Do(req)
- if err != nil {
- t.Fatal(err)
- }
- if _, err = io.Copy(ioutil.Discard, res.Body); err == nil {
- t.Fatal("unexpected success")
- }
- clientGotError <- true
-
- res, err = c.Get(st.ts.URL + "/hello")
- if err != nil {
- t.Fatal(err)
- }
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatal(err)
- }
- if string(slurp) != msg {
- t.Errorf("Got = %q; want %q", slurp, msg)
- }
-}
-
-// Issue 21316: It should be safe to reuse an http.Request after the
-// request has completed.
-func TestTransportNoRaceOnRequestObjectAfterRequestComplete(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(200)
- io.WriteString(w, "body")
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- req, _ := http.NewRequest("GET", st.ts.URL, nil)
- resp, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- if _, err = io.Copy(ioutil.Discard, resp.Body); err != nil {
- t.Fatalf("error reading response body: %v", err)
- }
- if err := resp.Body.Close(); err != nil {
- t.Fatalf("error closing response body: %v", err)
- }
-
- // This access of req.Header should not race with code in the transport.
- req.Header = http.Header{}
-}
-
-func TestTransportRetryAfterGOAWAY(t *testing.T) {
- var dialer struct {
- sync.Mutex
- count int
- }
- ct1 := make(chan *clientTester)
- ct2 := make(chan *clientTester)
-
- ln := newLocalListener(t)
- defer ln.Close()
-
- tr := &Transport{
- TLSClientConfig: tlsConfigInsecure,
- }
- tr.DialTLS = func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- dialer.Lock()
- defer dialer.Unlock()
- dialer.count++
- if dialer.count == 3 {
- return nil, errors.New("unexpected number of dials")
- }
- cc, err := net.Dial("tcp", ln.Addr().String())
- if err != nil {
- return nil, fmt.Errorf("dial error: %v", err)
- }
- sc, err := ln.Accept()
- if err != nil {
- return nil, fmt.Errorf("accept error: %v", err)
- }
- ct := &clientTester{
- t: t,
- tr: tr,
- cc: cc,
- sc: sc,
- fr: NewFramer(sc, sc),
- }
- switch dialer.count {
- case 1:
- ct1 <- ct
- case 2:
- ct2 <- ct
- }
- return cc, nil
- }
-
- errs := make(chan error, 3)
- done := make(chan struct{})
- defer close(done)
-
- // Client.
- go func() {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- res, err := tr.RoundTrip(req)
- if res != nil {
- res.Body.Close()
- if got := res.Header.Get("Foo"); got != "bar" {
- err = fmt.Errorf("foo header = %q; want bar", got)
- }
- }
- if err != nil {
- err = fmt.Errorf("RoundTrip: %v", err)
- }
- errs <- err
- }()
-
- connToClose := make(chan io.Closer, 2)
-
- // Server for the first request.
- go func() {
- var ct *clientTester
- select {
- case ct = <-ct1:
- case <-done:
- return
- }
-
- connToClose <- ct.cc
- ct.greet()
- hf, err := ct.firstHeaders()
- if err != nil {
- errs <- fmt.Errorf("server1 failed reading HEADERS: %v", err)
- return
- }
- t.Logf("server1 got %v", hf)
- if err := ct.fr.WriteGoAway(0 /*max id*/, ErrCodeNo, nil); err != nil {
- errs <- fmt.Errorf("server1 failed writing GOAWAY: %v", err)
- return
- }
- errs <- nil
- }()
-
- // Server for the second request.
- go func() {
- var ct *clientTester
- select {
- case ct = <-ct2:
- case <-done:
- return
- }
-
- connToClose <- ct.cc
- ct.greet()
- hf, err := ct.firstHeaders()
- if err != nil {
- errs <- fmt.Errorf("server2 failed reading HEADERS: %v", err)
- return
- }
- t.Logf("server2 got %v", hf)
-
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"})
- err = ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: hf.StreamID,
- EndHeaders: true,
- EndStream: false,
- BlockFragment: buf.Bytes(),
- })
- if err != nil {
- errs <- fmt.Errorf("server2 failed writing response HEADERS: %v", err)
- } else {
- errs <- nil
- }
- }()
-
- for k := 0; k < 3; k++ {
- select {
- case err := <-errs:
- if err != nil {
- t.Error(err)
- }
- case <-time.After(1 * time.Second):
- t.Errorf("timed out")
- }
- }
-
- for {
- select {
- case c := <-connToClose:
- c.Close()
- default:
- return
- }
- }
-}
-
-func TestTransportRetryAfterRefusedStream(t *testing.T) {
- clientDone := make(chan struct{})
- ct := newClientTester(t)
- ct.client = func() error {
- defer ct.cc.(*net.TCPConn).CloseWrite()
- defer close(clientDone)
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- resp, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip: %v", err)
- }
- resp.Body.Close()
- if resp.StatusCode != 204 {
- return fmt.Errorf("Status = %v; want 204", resp.StatusCode)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- nreq := 0
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- select {
- case <-clientDone:
- // If the client's done, it
- // will have reported any
- // errors on its side.
- return nil
- default:
- return err
- }
- }
- switch f := f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- case *HeadersFrame:
- if !f.HeadersEnded() {
- return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
- }
- nreq++
- if nreq == 1 {
- ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream)
- } else {
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- }
- default:
- return fmt.Errorf("Unexpected client frame %v", f)
- }
- }
- }
- ct.run()
-}
-
-func TestTransportRetryHasLimit(t *testing.T) {
- // Skip in short mode because the total expected delay is 1s+2s+4s+8s+16s=29s.
- if testing.Short() {
- t.Skip("skipping long test in short mode")
- }
- clientDone := make(chan struct{})
- ct := newClientTester(t)
- ct.client = func() error {
- defer ct.cc.(*net.TCPConn).CloseWrite()
- defer close(clientDone)
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- resp, err := ct.tr.RoundTrip(req)
- if err == nil {
- return fmt.Errorf("RoundTrip expected error, got response: %+v", resp)
- }
- t.Logf("expected error, got: %v", err)
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- select {
- case <-clientDone:
- // If the client's done, it
- // will have reported any
- // errors on its side.
- return nil
- default:
- return err
- }
- }
- switch f := f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- case *HeadersFrame:
- if !f.HeadersEnded() {
- return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
- }
- ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream)
- default:
- return fmt.Errorf("Unexpected client frame %v", f)
- }
- }
- }
- ct.run()
-}
-
-func TestTransportResponseDataBeforeHeaders(t *testing.T) {
- // This test use not valid response format.
- // Discarding logger output to not spam tests output.
- log.SetOutput(ioutil.Discard)
- defer log.SetOutput(os.Stderr)
-
- ct := newClientTester(t)
- ct.client = func() error {
- defer ct.cc.(*net.TCPConn).CloseWrite()
- req := httptest.NewRequest("GET", "https://dummy.tld/", nil)
- // First request is normal to ensure the check is per stream and not per connection.
- _, err := ct.tr.RoundTrip(req)
- if err != nil {
- return fmt.Errorf("RoundTrip expected no error, got: %v", err)
- }
- // Second request returns a DATA frame with no HEADERS.
- resp, err := ct.tr.RoundTrip(req)
- if err == nil {
- return fmt.Errorf("RoundTrip expected error, got response: %+v", resp)
- }
- if err, ok := err.(StreamError); !ok || err.Code != ErrCodeProtocol {
- return fmt.Errorf("expected stream PROTOCOL_ERROR, got: %v", err)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- for {
- f, err := ct.fr.ReadFrame()
- if err == io.EOF {
- return nil
- } else if err != nil {
- return err
- }
- switch f := f.(type) {
- case *WindowUpdateFrame, *SettingsFrame:
- case *HeadersFrame:
- switch f.StreamID {
- case 1:
- // Send a valid response to first request.
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- case 3:
- ct.fr.WriteData(f.StreamID, true, []byte("payload"))
- }
- default:
- return fmt.Errorf("Unexpected client frame %v", f)
- }
- }
- }
- ct.run()
-}
-func TestTransportRequestsStallAtServerLimit(t *testing.T) {
- const maxConcurrent = 2
-
- greet := make(chan struct{}) // server sends initial SETTINGS frame
- gotRequest := make(chan struct{}) // server received a request
- clientDone := make(chan struct{})
-
- // Collect errors from goroutines.
- var wg sync.WaitGroup
- errs := make(chan error, 100)
- defer func() {
- wg.Wait()
- close(errs)
- for err := range errs {
- t.Error(err)
- }
- }()
-
- // We will send maxConcurrent+2 requests. This checker goroutine waits for the
- // following stages:
- // 1. The first maxConcurrent requests are received by the server.
- // 2. The client will cancel the next request
- // 3. The server is unblocked so it can service the first maxConcurrent requests
- // 4. The client will send the final request
- wg.Add(1)
- unblockClient := make(chan struct{})
- clientRequestCancelled := make(chan struct{})
- unblockServer := make(chan struct{})
- go func() {
- defer wg.Done()
- // Stage 1.
- for k := 0; k < maxConcurrent; k++ {
- <-gotRequest
- }
- // Stage 2.
- close(unblockClient)
- <-clientRequestCancelled
- // Stage 3: give some time for the final RoundTrip call to be scheduled and
- // verify that the final request is not sent.
- time.Sleep(50 * time.Millisecond)
- select {
- case <-gotRequest:
- errs <- errors.New("last request did not stall")
- close(unblockServer)
- return
- default:
- }
- close(unblockServer)
- // Stage 4.
- <-gotRequest
- }()
-
- ct := newClientTester(t)
- ct.client = func() error {
- var wg sync.WaitGroup
- defer func() {
- wg.Wait()
- close(clientDone)
- ct.cc.(*net.TCPConn).CloseWrite()
- }()
- for k := 0; k < maxConcurrent+2; k++ {
- wg.Add(1)
- go func(k int) {
- defer wg.Done()
- // Don't send the second request until after receiving SETTINGS from the server
- // to avoid a race where we use the default SettingMaxConcurrentStreams, which
- // is much larger than maxConcurrent. We have to send the first request before
- // waiting because the first request triggers the dial and greet.
- if k > 0 {
- <-greet
- }
- // Block until maxConcurrent requests are sent before sending any more.
- if k >= maxConcurrent {
- <-unblockClient
- }
- req, _ := http.NewRequest("GET", fmt.Sprintf("https://dummy.tld/%d", k), nil)
- if k == maxConcurrent {
- // This request will be canceled.
- cancel := make(chan struct{})
- req.Cancel = cancel
- close(cancel)
- _, err := ct.tr.RoundTrip(req)
- close(clientRequestCancelled)
- if err == nil {
- errs <- fmt.Errorf("RoundTrip(%d) should have failed due to cancel", k)
- return
- }
- } else {
- resp, err := ct.tr.RoundTrip(req)
- if err != nil {
- errs <- fmt.Errorf("RoundTrip(%d): %v", k, err)
- return
- }
- ioutil.ReadAll(resp.Body)
- resp.Body.Close()
- if resp.StatusCode != 204 {
- errs <- fmt.Errorf("Status = %v; want 204", resp.StatusCode)
- return
- }
- }
- }(k)
- }
- return nil
- }
-
- ct.server = func() error {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- ct.greet(Setting{SettingMaxConcurrentStreams, maxConcurrent})
-
- // Server write loop.
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
- writeResp := make(chan uint32, maxConcurrent+1)
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- <-unblockServer
- for id := range writeResp {
- buf.Reset()
- enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"})
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: id,
- EndHeaders: true,
- EndStream: true,
- BlockFragment: buf.Bytes(),
- })
- }
- }()
-
- // Server read loop.
- var nreq int
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- select {
- case <-clientDone:
- // If the client's done, it will have reported any errors on its side.
- return nil
- default:
- return err
- }
- }
- switch f := f.(type) {
- case *WindowUpdateFrame:
- case *SettingsFrame:
- // Wait for the client SETTINGS ack until ending the greet.
- close(greet)
- case *HeadersFrame:
- if !f.HeadersEnded() {
- return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
- }
- gotRequest <- struct{}{}
- nreq++
- writeResp <- f.StreamID
- if nreq == maxConcurrent+1 {
- close(writeResp)
- }
- default:
- return fmt.Errorf("Unexpected client frame %v", f)
- }
- }
- }
-
- ct.run()
-}
-
-func TestAuthorityAddr(t *testing.T) {
- tests := []struct {
- scheme, authority string
- want string
- }{
- {"http", "foo.com", "foo.com:80"},
- {"https", "foo.com", "foo.com:443"},
- {"https", "foo.com:1234", "foo.com:1234"},
- {"https", "1.2.3.4:1234", "1.2.3.4:1234"},
- {"https", "1.2.3.4", "1.2.3.4:443"},
- {"https", "[::1]:1234", "[::1]:1234"},
- {"https", "[::1]", "[::1]:443"},
- }
- for _, tt := range tests {
- got := authorityAddr(tt.scheme, tt.authority)
- if got != tt.want {
- t.Errorf("authorityAddr(%q, %q) = %q; want %q", tt.scheme, tt.authority, got, tt.want)
- }
- }
-}
-
-// Issue 20448: stop allocating for DATA frames' payload after
-// Response.Body.Close is called.
-func TestTransportAllocationsAfterResponseBodyClose(t *testing.T) {
- megabyteZero := make([]byte, 1<<20)
-
- writeErr := make(chan error, 1)
-
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.(http.Flusher).Flush()
- var sum int64
- for i := 0; i < 100; i++ {
- n, err := w.Write(megabyteZero)
- sum += int64(n)
- if err != nil {
- writeErr <- err
- return
- }
- }
- t.Logf("wrote all %d bytes", sum)
- writeErr <- nil
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
- c := &http.Client{Transport: tr}
- res, err := c.Get(st.ts.URL)
- if err != nil {
- t.Fatal(err)
- }
- var buf [1]byte
- if _, err := res.Body.Read(buf[:]); err != nil {
- t.Error(err)
- }
- if err := res.Body.Close(); err != nil {
- t.Error(err)
- }
-
- trb, ok := res.Body.(transportResponseBody)
- if !ok {
- t.Fatalf("res.Body = %T; want transportResponseBody", res.Body)
- }
- if trb.cs.bufPipe.b != nil {
- t.Errorf("response body pipe is still open")
- }
-
- gotErr := <-writeErr
- if gotErr == nil {
- t.Errorf("Handler unexpectedly managed to write its entire response without getting an error")
- } else if gotErr != errStreamClosed {
- t.Errorf("Handler Write err = %v; want errStreamClosed", gotErr)
- }
-}
-
-// Issue 18891: make sure Request.Body == NoBody means no DATA frame
-// is ever sent, even if empty.
-func TestTransportNoBodyMeansNoDATA(t *testing.T) {
- ct := newClientTester(t)
-
- unblockClient := make(chan bool)
-
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", go18httpNoBody())
- ct.tr.RoundTrip(req)
- <-unblockClient
- return nil
- }
- ct.server = func() error {
- defer close(unblockClient)
- defer ct.cc.(*net.TCPConn).Close()
- ct.greet()
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
- }
- switch f := f.(type) {
- default:
- return fmt.Errorf("Got %T; want HeadersFrame", f)
- case *WindowUpdateFrame, *SettingsFrame:
- continue
- case *HeadersFrame:
- if !f.StreamEnded() {
- return fmt.Errorf("got headers frame without END_STREAM")
- }
- return nil
- }
- }
- }
- ct.run()
-}
-
-func benchSimpleRoundTrip(b *testing.B, nHeaders int) {
- defer disableGoroutineTracking()()
- b.ReportAllocs()
- st := newServerTester(b,
- func(w http.ResponseWriter, r *http.Request) {
- },
- optOnlyServer,
- optQuiet,
- )
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- req, err := http.NewRequest("GET", st.ts.URL, nil)
- if err != nil {
- b.Fatal(err)
- }
-
- for i := 0; i < nHeaders; i++ {
- name := fmt.Sprint("A-", i)
- req.Header.Set(name, "*")
- }
-
- b.ResetTimer()
-
- for i := 0; i < b.N; i++ {
- res, err := tr.RoundTrip(req)
- if err != nil {
- if res != nil {
- res.Body.Close()
- }
- b.Fatalf("RoundTrip err = %v; want nil", err)
- }
- res.Body.Close()
- if res.StatusCode != http.StatusOK {
- b.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK)
- }
- }
-}
-
-type infiniteReader struct{}
-
-func (r infiniteReader) Read(b []byte) (int, error) {
- return len(b), nil
-}
-
-// Issue 20521: it is not an error to receive a response and end stream
-// from the server without the body being consumed.
-func TestTransportResponseAndResetWithoutConsumingBodyRace(t *testing.T) {
- st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- }, optOnlyServer)
- defer st.Close()
-
- tr := &Transport{TLSClientConfig: tlsConfigInsecure}
- defer tr.CloseIdleConnections()
-
- // The request body needs to be big enough to trigger flow control.
- req, _ := http.NewRequest("PUT", st.ts.URL, infiniteReader{})
- res, err := tr.RoundTrip(req)
- if err != nil {
- t.Fatal(err)
- }
- if res.StatusCode != http.StatusOK {
- t.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK)
- }
-}
-
-// Verify transport doesn't crash when receiving bogus response lacking a :status header.
-// Issue 22880.
-func TestTransportHandlesInvalidStatuslessResponse(t *testing.T) {
- ct := newClientTester(t)
- ct.client = func() error {
- req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
- _, err := ct.tr.RoundTrip(req)
- const substr = "malformed response from server: missing status pseudo header"
- if !strings.Contains(fmt.Sprint(err), substr) {
- return fmt.Errorf("RoundTrip error = %v; want substring %q", err, substr)
- }
- return nil
- }
- ct.server = func() error {
- ct.greet()
- var buf bytes.Buffer
- enc := hpack.NewEncoder(&buf)
-
- for {
- f, err := ct.fr.ReadFrame()
- if err != nil {
- return err
- }
- switch f := f.(type) {
- case *HeadersFrame:
- enc.WriteField(hpack.HeaderField{Name: "content-type", Value: "text/html"}) // no :status header
- ct.fr.WriteHeaders(HeadersFrameParam{
- StreamID: f.StreamID,
- EndHeaders: true,
- EndStream: false, // we'll send some DATA to try to crash the transport
- BlockFragment: buf.Bytes(),
- })
- ct.fr.WriteData(f.StreamID, true, []byte("payload"))
- return nil
- }
- }
- }
- ct.run()
-}
-
-func BenchmarkClientRequestHeaders(b *testing.B) {
- b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) })
- b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) })
- b.Run(" 100 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 100) })
- b.Run("1000 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 1000) })
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/write.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/write.go
deleted file mode 100644
index 54ab4a88e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/write.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "fmt"
- "log"
- "net/http"
- "net/url"
-
- "golang.org/x/net/http2/hpack"
- "golang.org/x/net/lex/httplex"
-)
-
-// writeFramer is implemented by any type that is used to write frames.
-type writeFramer interface {
- writeFrame(writeContext) error
-
- // staysWithinBuffer reports whether this writer promises that
- // it will only write less than or equal to size bytes, and it
- // won't Flush the write context.
- staysWithinBuffer(size int) bool
-}
-
-// writeContext is the interface needed by the various frame writer
-// types below. All the writeFrame methods below are scheduled via the
-// frame writing scheduler (see writeScheduler in writesched.go).
-//
-// This interface is implemented by *serverConn.
-//
-// TODO: decide whether to a) use this in the client code (which didn't
-// end up using this yet, because it has a simpler design, not
-// currently implementing priorities), or b) delete this and
-// make the server code a bit more concrete.
-type writeContext interface {
- Framer() *Framer
- Flush() error
- CloseConn() error
- // HeaderEncoder returns an HPACK encoder that writes to the
- // returned buffer.
- HeaderEncoder() (*hpack.Encoder, *bytes.Buffer)
-}
-
-// writeEndsStream reports whether w writes a frame that will transition
-// the stream to a half-closed local state. This returns false for RST_STREAM,
-// which closes the entire stream (not just the local half).
-func writeEndsStream(w writeFramer) bool {
- switch v := w.(type) {
- case *writeData:
- return v.endStream
- case *writeResHeaders:
- return v.endStream
- case nil:
- // This can only happen if the caller reuses w after it's
- // been intentionally nil'ed out to prevent use. Keep this
- // here to catch future refactoring breaking it.
- panic("writeEndsStream called on nil writeFramer")
- }
- return false
-}
-
-type flushFrameWriter struct{}
-
-func (flushFrameWriter) writeFrame(ctx writeContext) error {
- return ctx.Flush()
-}
-
-func (flushFrameWriter) staysWithinBuffer(max int) bool { return false }
-
-type writeSettings []Setting
-
-func (s writeSettings) staysWithinBuffer(max int) bool {
- const settingSize = 6 // uint16 + uint32
- return frameHeaderLen+settingSize*len(s) <= max
-
-}
-
-func (s writeSettings) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteSettings([]Setting(s)...)
-}
-
-type writeGoAway struct {
- maxStreamID uint32
- code ErrCode
-}
-
-func (p *writeGoAway) writeFrame(ctx writeContext) error {
- err := ctx.Framer().WriteGoAway(p.maxStreamID, p.code, nil)
- ctx.Flush() // ignore error: we're hanging up on them anyway
- return err
-}
-
-func (*writeGoAway) staysWithinBuffer(max int) bool { return false } // flushes
-
-type writeData struct {
- streamID uint32
- p []byte
- endStream bool
-}
-
-func (w *writeData) String() string {
- return fmt.Sprintf("writeData(stream=%d, p=%d, endStream=%v)", w.streamID, len(w.p), w.endStream)
-}
-
-func (w *writeData) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteData(w.streamID, w.endStream, w.p)
-}
-
-func (w *writeData) staysWithinBuffer(max int) bool {
- return frameHeaderLen+len(w.p) <= max
-}
-
-// handlerPanicRST is the message sent from handler goroutines when
-// the handler panics.
-type handlerPanicRST struct {
- StreamID uint32
-}
-
-func (hp handlerPanicRST) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteRSTStream(hp.StreamID, ErrCodeInternal)
-}
-
-func (hp handlerPanicRST) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }
-
-func (se StreamError) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteRSTStream(se.StreamID, se.Code)
-}
-
-func (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }
-
-type writePingAck struct{ pf *PingFrame }
-
-func (w writePingAck) writeFrame(ctx writeContext) error {
- return ctx.Framer().WritePing(true, w.pf.Data)
-}
-
-func (w writePingAck) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.pf.Data) <= max }
-
-type writeSettingsAck struct{}
-
-func (writeSettingsAck) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteSettingsAck()
-}
-
-func (writeSettingsAck) staysWithinBuffer(max int) bool { return frameHeaderLen <= max }
-
-// splitHeaderBlock splits headerBlock into fragments so that each fragment fits
-// in a single frame, then calls fn for each fragment. firstFrag/lastFrag are true
-// for the first/last fragment, respectively.
-func splitHeaderBlock(ctx writeContext, headerBlock []byte, fn func(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error) error {
- // For now we're lazy and just pick the minimum MAX_FRAME_SIZE
- // that all peers must support (16KB). Later we could care
- // more and send larger frames if the peer advertised it, but
- // there's little point. Most headers are small anyway (so we
- // generally won't have CONTINUATION frames), and extra frames
- // only waste 9 bytes anyway.
- const maxFrameSize = 16384
-
- first := true
- for len(headerBlock) > 0 {
- frag := headerBlock
- if len(frag) > maxFrameSize {
- frag = frag[:maxFrameSize]
- }
- headerBlock = headerBlock[len(frag):]
- if err := fn(ctx, frag, first, len(headerBlock) == 0); err != nil {
- return err
- }
- first = false
- }
- return nil
-}
-
-// writeResHeaders is a request to write a HEADERS and 0+ CONTINUATION frames
-// for HTTP response headers or trailers from a server handler.
-type writeResHeaders struct {
- streamID uint32
- httpResCode int // 0 means no ":status" line
- h http.Header // may be nil
- trailers []string // if non-nil, which keys of h to write. nil means all.
- endStream bool
-
- date string
- contentType string
- contentLength string
-}
-
-func encKV(enc *hpack.Encoder, k, v string) {
- if VerboseLogs {
- log.Printf("http2: server encoding header %q = %q", k, v)
- }
- enc.WriteField(hpack.HeaderField{Name: k, Value: v})
-}
-
-func (w *writeResHeaders) staysWithinBuffer(max int) bool {
- // TODO: this is a common one. It'd be nice to return true
- // here and get into the fast path if we could be clever and
- // calculate the size fast enough, or at least a conservative
- // uppper bound that usually fires. (Maybe if w.h and
- // w.trailers are nil, so we don't need to enumerate it.)
- // Otherwise I'm afraid that just calculating the length to
- // answer this question would be slower than the ~2µs benefit.
- return false
-}
-
-func (w *writeResHeaders) writeFrame(ctx writeContext) error {
- enc, buf := ctx.HeaderEncoder()
- buf.Reset()
-
- if w.httpResCode != 0 {
- encKV(enc, ":status", httpCodeString(w.httpResCode))
- }
-
- encodeHeaders(enc, w.h, w.trailers)
-
- if w.contentType != "" {
- encKV(enc, "content-type", w.contentType)
- }
- if w.contentLength != "" {
- encKV(enc, "content-length", w.contentLength)
- }
- if w.date != "" {
- encKV(enc, "date", w.date)
- }
-
- headerBlock := buf.Bytes()
- if len(headerBlock) == 0 && w.trailers == nil {
- panic("unexpected empty hpack")
- }
-
- return splitHeaderBlock(ctx, headerBlock, w.writeHeaderBlock)
-}
-
-func (w *writeResHeaders) writeHeaderBlock(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error {
- if firstFrag {
- return ctx.Framer().WriteHeaders(HeadersFrameParam{
- StreamID: w.streamID,
- BlockFragment: frag,
- EndStream: w.endStream,
- EndHeaders: lastFrag,
- })
- } else {
- return ctx.Framer().WriteContinuation(w.streamID, lastFrag, frag)
- }
-}
-
-// writePushPromise is a request to write a PUSH_PROMISE and 0+ CONTINUATION frames.
-type writePushPromise struct {
- streamID uint32 // pusher stream
- method string // for :method
- url *url.URL // for :scheme, :authority, :path
- h http.Header
-
- // Creates an ID for a pushed stream. This runs on serveG just before
- // the frame is written. The returned ID is copied to promisedID.
- allocatePromisedID func() (uint32, error)
- promisedID uint32
-}
-
-func (w *writePushPromise) staysWithinBuffer(max int) bool {
- // TODO: see writeResHeaders.staysWithinBuffer
- return false
-}
-
-func (w *writePushPromise) writeFrame(ctx writeContext) error {
- enc, buf := ctx.HeaderEncoder()
- buf.Reset()
-
- encKV(enc, ":method", w.method)
- encKV(enc, ":scheme", w.url.Scheme)
- encKV(enc, ":authority", w.url.Host)
- encKV(enc, ":path", w.url.RequestURI())
- encodeHeaders(enc, w.h, nil)
-
- headerBlock := buf.Bytes()
- if len(headerBlock) == 0 {
- panic("unexpected empty hpack")
- }
-
- return splitHeaderBlock(ctx, headerBlock, w.writeHeaderBlock)
-}
-
-func (w *writePushPromise) writeHeaderBlock(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error {
- if firstFrag {
- return ctx.Framer().WritePushPromise(PushPromiseParam{
- StreamID: w.streamID,
- PromiseID: w.promisedID,
- BlockFragment: frag,
- EndHeaders: lastFrag,
- })
- } else {
- return ctx.Framer().WriteContinuation(w.streamID, lastFrag, frag)
- }
-}
-
-type write100ContinueHeadersFrame struct {
- streamID uint32
-}
-
-func (w write100ContinueHeadersFrame) writeFrame(ctx writeContext) error {
- enc, buf := ctx.HeaderEncoder()
- buf.Reset()
- encKV(enc, ":status", "100")
- return ctx.Framer().WriteHeaders(HeadersFrameParam{
- StreamID: w.streamID,
- BlockFragment: buf.Bytes(),
- EndStream: false,
- EndHeaders: true,
- })
-}
-
-func (w write100ContinueHeadersFrame) staysWithinBuffer(max int) bool {
- // Sloppy but conservative:
- return 9+2*(len(":status")+len("100")) <= max
-}
-
-type writeWindowUpdate struct {
- streamID uint32 // or 0 for conn-level
- n uint32
-}
-
-func (wu writeWindowUpdate) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }
-
-func (wu writeWindowUpdate) writeFrame(ctx writeContext) error {
- return ctx.Framer().WriteWindowUpdate(wu.streamID, wu.n)
-}
-
-// encodeHeaders encodes an http.Header. If keys is not nil, then (k, h[k])
-// is encoded only only if k is in keys.
-func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) {
- if keys == nil {
- sorter := sorterPool.Get().(*sorter)
- // Using defer here, since the returned keys from the
- // sorter.Keys method is only valid until the sorter
- // is returned:
- defer sorterPool.Put(sorter)
- keys = sorter.Keys(h)
- }
- for _, k := range keys {
- vv := h[k]
- k = lowerHeader(k)
- if !validWireHeaderFieldName(k) {
- // Skip it as backup paranoia. Per
- // golang.org/issue/14048, these should
- // already be rejected at a higher level.
- continue
- }
- isTE := k == "transfer-encoding"
- for _, v := range vv {
- if !httplex.ValidHeaderFieldValue(v) {
- // TODO: return an error? golang.org/issue/14048
- // For now just omit it.
- continue
- }
- // TODO: more of "8.1.2.2 Connection-Specific Header Fields"
- if isTE && v != "trailers" {
- continue
- }
- encKV(enc, k, v)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched.go
deleted file mode 100644
index 4fe307307..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import "fmt"
-
-// WriteScheduler is the interface implemented by HTTP/2 write schedulers.
-// Methods are never called concurrently.
-type WriteScheduler interface {
- // OpenStream opens a new stream in the write scheduler.
- // It is illegal to call this with streamID=0 or with a streamID that is
- // already open -- the call may panic.
- OpenStream(streamID uint32, options OpenStreamOptions)
-
- // CloseStream closes a stream in the write scheduler. Any frames queued on
- // this stream should be discarded. It is illegal to call this on a stream
- // that is not open -- the call may panic.
- CloseStream(streamID uint32)
-
- // AdjustStream adjusts the priority of the given stream. This may be called
- // on a stream that has not yet been opened or has been closed. Note that
- // RFC 7540 allows PRIORITY frames to be sent on streams in any state. See:
- // https://tools.ietf.org/html/rfc7540#section-5.1
- AdjustStream(streamID uint32, priority PriorityParam)
-
- // Push queues a frame in the scheduler. In most cases, this will not be
- // called with wr.StreamID()!=0 unless that stream is currently open. The one
- // exception is RST_STREAM frames, which may be sent on idle or closed streams.
- Push(wr FrameWriteRequest)
-
- // Pop dequeues the next frame to write. Returns false if no frames can
- // be written. Frames with a given wr.StreamID() are Pop'd in the same
- // order they are Push'd.
- Pop() (wr FrameWriteRequest, ok bool)
-}
-
-// OpenStreamOptions specifies extra options for WriteScheduler.OpenStream.
-type OpenStreamOptions struct {
- // PusherID is zero if the stream was initiated by the client. Otherwise,
- // PusherID names the stream that pushed the newly opened stream.
- PusherID uint32
-}
-
-// FrameWriteRequest is a request to write a frame.
-type FrameWriteRequest struct {
- // write is the interface value that does the writing, once the
- // WriteScheduler has selected this frame to write. The write
- // functions are all defined in write.go.
- write writeFramer
-
- // stream is the stream on which this frame will be written.
- // nil for non-stream frames like PING and SETTINGS.
- stream *stream
-
- // done, if non-nil, must be a buffered channel with space for
- // 1 message and is sent the return value from write (or an
- // earlier error) when the frame has been written.
- done chan error
-}
-
-// StreamID returns the id of the stream this frame will be written to.
-// 0 is used for non-stream frames such as PING and SETTINGS.
-func (wr FrameWriteRequest) StreamID() uint32 {
- if wr.stream == nil {
- if se, ok := wr.write.(StreamError); ok {
- // (*serverConn).resetStream doesn't set
- // stream because it doesn't necessarily have
- // one. So special case this type of write
- // message.
- return se.StreamID
- }
- return 0
- }
- return wr.stream.id
-}
-
-// DataSize returns the number of flow control bytes that must be consumed
-// to write this entire frame. This is 0 for non-DATA frames.
-func (wr FrameWriteRequest) DataSize() int {
- if wd, ok := wr.write.(*writeData); ok {
- return len(wd.p)
- }
- return 0
-}
-
-// Consume consumes min(n, available) bytes from this frame, where available
-// is the number of flow control bytes available on the stream. Consume returns
-// 0, 1, or 2 frames, where the integer return value gives the number of frames
-// returned.
-//
-// If flow control prevents consuming any bytes, this returns (_, _, 0). If
-// the entire frame was consumed, this returns (wr, _, 1). Otherwise, this
-// returns (consumed, rest, 2), where 'consumed' contains the consumed bytes and
-// 'rest' contains the remaining bytes. The consumed bytes are deducted from the
-// underlying stream's flow control budget.
-func (wr FrameWriteRequest) Consume(n int32) (FrameWriteRequest, FrameWriteRequest, int) {
- var empty FrameWriteRequest
-
- // Non-DATA frames are always consumed whole.
- wd, ok := wr.write.(*writeData)
- if !ok || len(wd.p) == 0 {
- return wr, empty, 1
- }
-
- // Might need to split after applying limits.
- allowed := wr.stream.flow.available()
- if n < allowed {
- allowed = n
- }
- if wr.stream.sc.maxFrameSize < allowed {
- allowed = wr.stream.sc.maxFrameSize
- }
- if allowed <= 0 {
- return empty, empty, 0
- }
- if len(wd.p) > int(allowed) {
- wr.stream.flow.take(allowed)
- consumed := FrameWriteRequest{
- stream: wr.stream,
- write: &writeData{
- streamID: wd.streamID,
- p: wd.p[:allowed],
- // Even if the original had endStream set, there
- // are bytes remaining because len(wd.p) > allowed,
- // so we know endStream is false.
- endStream: false,
- },
- // Our caller is blocking on the final DATA frame, not
- // this intermediate frame, so no need to wait.
- done: nil,
- }
- rest := FrameWriteRequest{
- stream: wr.stream,
- write: &writeData{
- streamID: wd.streamID,
- p: wd.p[allowed:],
- endStream: wd.endStream,
- },
- done: wr.done,
- }
- return consumed, rest, 2
- }
-
- // The frame is consumed whole.
- // NB: This cast cannot overflow because allowed is <= math.MaxInt32.
- wr.stream.flow.take(int32(len(wd.p)))
- return wr, empty, 1
-}
-
-// String is for debugging only.
-func (wr FrameWriteRequest) String() string {
- var des string
- if s, ok := wr.write.(fmt.Stringer); ok {
- des = s.String()
- } else {
- des = fmt.Sprintf("%T", wr.write)
- }
- return fmt.Sprintf("[FrameWriteRequest stream=%d, ch=%v, writer=%v]", wr.StreamID(), wr.done != nil, des)
-}
-
-// replyToWriter sends err to wr.done and panics if the send must block
-// This does nothing if wr.done is nil.
-func (wr *FrameWriteRequest) replyToWriter(err error) {
- if wr.done == nil {
- return
- }
- select {
- case wr.done <- err:
- default:
- panic(fmt.Sprintf("unbuffered done channel passed in for type %T", wr.write))
- }
- wr.write = nil // prevent use (assume it's tainted after wr.done send)
-}
-
-// writeQueue is used by implementations of WriteScheduler.
-type writeQueue struct {
- s []FrameWriteRequest
-}
-
-func (q *writeQueue) empty() bool { return len(q.s) == 0 }
-
-func (q *writeQueue) push(wr FrameWriteRequest) {
- q.s = append(q.s, wr)
-}
-
-func (q *writeQueue) shift() FrameWriteRequest {
- if len(q.s) == 0 {
- panic("invalid use of queue")
- }
- wr := q.s[0]
- // TODO: less copy-happy queue.
- copy(q.s, q.s[1:])
- q.s[len(q.s)-1] = FrameWriteRequest{}
- q.s = q.s[:len(q.s)-1]
- return wr
-}
-
-// consume consumes up to n bytes from q.s[0]. If the frame is
-// entirely consumed, it is removed from the queue. If the frame
-// is partially consumed, the frame is kept with the consumed
-// bytes removed. Returns true iff any bytes were consumed.
-func (q *writeQueue) consume(n int32) (FrameWriteRequest, bool) {
- if len(q.s) == 0 {
- return FrameWriteRequest{}, false
- }
- consumed, rest, numresult := q.s[0].Consume(n)
- switch numresult {
- case 0:
- return FrameWriteRequest{}, false
- case 1:
- q.shift()
- case 2:
- q.s[0] = rest
- }
- return consumed, true
-}
-
-type writeQueuePool []*writeQueue
-
-// put inserts an unused writeQueue into the pool.
-func (p *writeQueuePool) put(q *writeQueue) {
- for i := range q.s {
- q.s[i] = FrameWriteRequest{}
- }
- q.s = q.s[:0]
- *p = append(*p, q)
-}
-
-// get returns an empty writeQueue.
-func (p *writeQueuePool) get() *writeQueue {
- ln := len(*p)
- if ln == 0 {
- return new(writeQueue)
- }
- x := ln - 1
- q := (*p)[x]
- (*p)[x] = nil
- *p = (*p)[:x]
- return q
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority.go
deleted file mode 100644
index 848fed6ec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority.go
+++ /dev/null
@@ -1,452 +0,0 @@
-// Copyright 2016 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 file.
-
-package http2
-
-import (
- "fmt"
- "math"
- "sort"
-)
-
-// RFC 7540, Section 5.3.5: the default weight is 16.
-const priorityDefaultWeight = 15 // 16 = 15 + 1
-
-// PriorityWriteSchedulerConfig configures a priorityWriteScheduler.
-type PriorityWriteSchedulerConfig struct {
- // MaxClosedNodesInTree controls the maximum number of closed streams to
- // retain in the priority tree. Setting this to zero saves a small amount
- // of memory at the cost of performance.
- //
- // See RFC 7540, Section 5.3.4:
- // "It is possible for a stream to become closed while prioritization
- // information ... is in transit. ... This potentially creates suboptimal
- // prioritization, since the stream could be given a priority that is
- // different from what is intended. To avoid these problems, an endpoint
- // SHOULD retain stream prioritization state for a period after streams
- // become closed. The longer state is retained, the lower the chance that
- // streams are assigned incorrect or default priority values."
- MaxClosedNodesInTree int
-
- // MaxIdleNodesInTree controls the maximum number of idle streams to
- // retain in the priority tree. Setting this to zero saves a small amount
- // of memory at the cost of performance.
- //
- // See RFC 7540, Section 5.3.4:
- // Similarly, streams that are in the "idle" state can be assigned
- // priority or become a parent of other streams. This allows for the
- // creation of a grouping node in the dependency tree, which enables
- // more flexible expressions of priority. Idle streams begin with a
- // default priority (Section 5.3.5).
- MaxIdleNodesInTree int
-
- // ThrottleOutOfOrderWrites enables write throttling to help ensure that
- // data is delivered in priority order. This works around a race where
- // stream B depends on stream A and both streams are about to call Write
- // to queue DATA frames. If B wins the race, a naive scheduler would eagerly
- // write as much data from B as possible, but this is suboptimal because A
- // is a higher-priority stream. With throttling enabled, we write a small
- // amount of data from B to minimize the amount of bandwidth that B can
- // steal from A.
- ThrottleOutOfOrderWrites bool
-}
-
-// NewPriorityWriteScheduler constructs a WriteScheduler that schedules
-// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3.
-// If cfg is nil, default options are used.
-func NewPriorityWriteScheduler(cfg *PriorityWriteSchedulerConfig) WriteScheduler {
- if cfg == nil {
- // For justification of these defaults, see:
- // https://docs.google.com/document/d/1oLhNg1skaWD4_DtaoCxdSRN5erEXrH-KnLrMwEpOtFY
- cfg = &PriorityWriteSchedulerConfig{
- MaxClosedNodesInTree: 10,
- MaxIdleNodesInTree: 10,
- ThrottleOutOfOrderWrites: false,
- }
- }
-
- ws := &priorityWriteScheduler{
- nodes: make(map[uint32]*priorityNode),
- maxClosedNodesInTree: cfg.MaxClosedNodesInTree,
- maxIdleNodesInTree: cfg.MaxIdleNodesInTree,
- enableWriteThrottle: cfg.ThrottleOutOfOrderWrites,
- }
- ws.nodes[0] = &ws.root
- if cfg.ThrottleOutOfOrderWrites {
- ws.writeThrottleLimit = 1024
- } else {
- ws.writeThrottleLimit = math.MaxInt32
- }
- return ws
-}
-
-type priorityNodeState int
-
-const (
- priorityNodeOpen priorityNodeState = iota
- priorityNodeClosed
- priorityNodeIdle
-)
-
-// priorityNode is a node in an HTTP/2 priority tree.
-// Each node is associated with a single stream ID.
-// See RFC 7540, Section 5.3.
-type priorityNode struct {
- q writeQueue // queue of pending frames to write
- id uint32 // id of the stream, or 0 for the root of the tree
- weight uint8 // the actual weight is weight+1, so the value is in [1,256]
- state priorityNodeState // open | closed | idle
- bytes int64 // number of bytes written by this node, or 0 if closed
- subtreeBytes int64 // sum(node.bytes) of all nodes in this subtree
-
- // These links form the priority tree.
- parent *priorityNode
- kids *priorityNode // start of the kids list
- prev, next *priorityNode // doubly-linked list of siblings
-}
-
-func (n *priorityNode) setParent(parent *priorityNode) {
- if n == parent {
- panic("setParent to self")
- }
- if n.parent == parent {
- return
- }
- // Unlink from current parent.
- if parent := n.parent; parent != nil {
- if n.prev == nil {
- parent.kids = n.next
- } else {
- n.prev.next = n.next
- }
- if n.next != nil {
- n.next.prev = n.prev
- }
- }
- // Link to new parent.
- // If parent=nil, remove n from the tree.
- // Always insert at the head of parent.kids (this is assumed by walkReadyInOrder).
- n.parent = parent
- if parent == nil {
- n.next = nil
- n.prev = nil
- } else {
- n.next = parent.kids
- n.prev = nil
- if n.next != nil {
- n.next.prev = n
- }
- parent.kids = n
- }
-}
-
-func (n *priorityNode) addBytes(b int64) {
- n.bytes += b
- for ; n != nil; n = n.parent {
- n.subtreeBytes += b
- }
-}
-
-// walkReadyInOrder iterates over the tree in priority order, calling f for each node
-// with a non-empty write queue. When f returns true, this funcion returns true and the
-// walk halts. tmp is used as scratch space for sorting.
-//
-// f(n, openParent) takes two arguments: the node to visit, n, and a bool that is true
-// if any ancestor p of n is still open (ignoring the root node).
-func (n *priorityNode) walkReadyInOrder(openParent bool, tmp *[]*priorityNode, f func(*priorityNode, bool) bool) bool {
- if !n.q.empty() && f(n, openParent) {
- return true
- }
- if n.kids == nil {
- return false
- }
-
- // Don't consider the root "open" when updating openParent since
- // we can't send data frames on the root stream (only control frames).
- if n.id != 0 {
- openParent = openParent || (n.state == priorityNodeOpen)
- }
-
- // Common case: only one kid or all kids have the same weight.
- // Some clients don't use weights; other clients (like web browsers)
- // use mostly-linear priority trees.
- w := n.kids.weight
- needSort := false
- for k := n.kids.next; k != nil; k = k.next {
- if k.weight != w {
- needSort = true
- break
- }
- }
- if !needSort {
- for k := n.kids; k != nil; k = k.next {
- if k.walkReadyInOrder(openParent, tmp, f) {
- return true
- }
- }
- return false
- }
-
- // Uncommon case: sort the child nodes. We remove the kids from the parent,
- // then re-insert after sorting so we can reuse tmp for future sort calls.
- *tmp = (*tmp)[:0]
- for n.kids != nil {
- *tmp = append(*tmp, n.kids)
- n.kids.setParent(nil)
- }
- sort.Sort(sortPriorityNodeSiblings(*tmp))
- for i := len(*tmp) - 1; i >= 0; i-- {
- (*tmp)[i].setParent(n) // setParent inserts at the head of n.kids
- }
- for k := n.kids; k != nil; k = k.next {
- if k.walkReadyInOrder(openParent, tmp, f) {
- return true
- }
- }
- return false
-}
-
-type sortPriorityNodeSiblings []*priorityNode
-
-func (z sortPriorityNodeSiblings) Len() int { return len(z) }
-func (z sortPriorityNodeSiblings) Swap(i, k int) { z[i], z[k] = z[k], z[i] }
-func (z sortPriorityNodeSiblings) Less(i, k int) bool {
- // Prefer the subtree that has sent fewer bytes relative to its weight.
- // See sections 5.3.2 and 5.3.4.
- wi, bi := float64(z[i].weight+1), float64(z[i].subtreeBytes)
- wk, bk := float64(z[k].weight+1), float64(z[k].subtreeBytes)
- if bi == 0 && bk == 0 {
- return wi >= wk
- }
- if bk == 0 {
- return false
- }
- return bi/bk <= wi/wk
-}
-
-type priorityWriteScheduler struct {
- // root is the root of the priority tree, where root.id = 0.
- // The root queues control frames that are not associated with any stream.
- root priorityNode
-
- // nodes maps stream ids to priority tree nodes.
- nodes map[uint32]*priorityNode
-
- // maxID is the maximum stream id in nodes.
- maxID uint32
-
- // lists of nodes that have been closed or are idle, but are kept in
- // the tree for improved prioritization. When the lengths exceed either
- // maxClosedNodesInTree or maxIdleNodesInTree, old nodes are discarded.
- closedNodes, idleNodes []*priorityNode
-
- // From the config.
- maxClosedNodesInTree int
- maxIdleNodesInTree int
- writeThrottleLimit int32
- enableWriteThrottle bool
-
- // tmp is scratch space for priorityNode.walkReadyInOrder to reduce allocations.
- tmp []*priorityNode
-
- // pool of empty queues for reuse.
- queuePool writeQueuePool
-}
-
-func (ws *priorityWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {
- // The stream may be currently idle but cannot be opened or closed.
- if curr := ws.nodes[streamID]; curr != nil {
- if curr.state != priorityNodeIdle {
- panic(fmt.Sprintf("stream %d already opened", streamID))
- }
- curr.state = priorityNodeOpen
- return
- }
-
- // RFC 7540, Section 5.3.5:
- // "All streams are initially assigned a non-exclusive dependency on stream 0x0.
- // Pushed streams initially depend on their associated stream. In both cases,
- // streams are assigned a default weight of 16."
- parent := ws.nodes[options.PusherID]
- if parent == nil {
- parent = &ws.root
- }
- n := &priorityNode{
- q: *ws.queuePool.get(),
- id: streamID,
- weight: priorityDefaultWeight,
- state: priorityNodeOpen,
- }
- n.setParent(parent)
- ws.nodes[streamID] = n
- if streamID > ws.maxID {
- ws.maxID = streamID
- }
-}
-
-func (ws *priorityWriteScheduler) CloseStream(streamID uint32) {
- if streamID == 0 {
- panic("violation of WriteScheduler interface: cannot close stream 0")
- }
- if ws.nodes[streamID] == nil {
- panic(fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", streamID))
- }
- if ws.nodes[streamID].state != priorityNodeOpen {
- panic(fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", streamID))
- }
-
- n := ws.nodes[streamID]
- n.state = priorityNodeClosed
- n.addBytes(-n.bytes)
-
- q := n.q
- ws.queuePool.put(&q)
- n.q.s = nil
- if ws.maxClosedNodesInTree > 0 {
- ws.addClosedOrIdleNode(&ws.closedNodes, ws.maxClosedNodesInTree, n)
- } else {
- ws.removeNode(n)
- }
-}
-
-func (ws *priorityWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {
- if streamID == 0 {
- panic("adjustPriority on root")
- }
-
- // If streamID does not exist, there are two cases:
- // - A closed stream that has been removed (this will have ID <= maxID)
- // - An idle stream that is being used for "grouping" (this will have ID > maxID)
- n := ws.nodes[streamID]
- if n == nil {
- if streamID <= ws.maxID || ws.maxIdleNodesInTree == 0 {
- return
- }
- ws.maxID = streamID
- n = &priorityNode{
- q: *ws.queuePool.get(),
- id: streamID,
- weight: priorityDefaultWeight,
- state: priorityNodeIdle,
- }
- n.setParent(&ws.root)
- ws.nodes[streamID] = n
- ws.addClosedOrIdleNode(&ws.idleNodes, ws.maxIdleNodesInTree, n)
- }
-
- // Section 5.3.1: A dependency on a stream that is not currently in the tree
- // results in that stream being given a default priority (Section 5.3.5).
- parent := ws.nodes[priority.StreamDep]
- if parent == nil {
- n.setParent(&ws.root)
- n.weight = priorityDefaultWeight
- return
- }
-
- // Ignore if the client tries to make a node its own parent.
- if n == parent {
- return
- }
-
- // Section 5.3.3:
- // "If a stream is made dependent on one of its own dependencies, the
- // formerly dependent stream is first moved to be dependent on the
- // reprioritized stream's previous parent. The moved dependency retains
- // its weight."
- //
- // That is: if parent depends on n, move parent to depend on n.parent.
- for x := parent.parent; x != nil; x = x.parent {
- if x == n {
- parent.setParent(n.parent)
- break
- }
- }
-
- // Section 5.3.3: The exclusive flag causes the stream to become the sole
- // dependency of its parent stream, causing other dependencies to become
- // dependent on the exclusive stream.
- if priority.Exclusive {
- k := parent.kids
- for k != nil {
- next := k.next
- if k != n {
- k.setParent(n)
- }
- k = next
- }
- }
-
- n.setParent(parent)
- n.weight = priority.Weight
-}
-
-func (ws *priorityWriteScheduler) Push(wr FrameWriteRequest) {
- var n *priorityNode
- if id := wr.StreamID(); id == 0 {
- n = &ws.root
- } else {
- n = ws.nodes[id]
- if n == nil {
- // id is an idle or closed stream. wr should not be a HEADERS or
- // DATA frame. However, wr can be a RST_STREAM. In this case, we
- // push wr onto the root, rather than creating a new priorityNode,
- // since RST_STREAM is tiny and the stream's priority is unknown
- // anyway. See issue #17919.
- if wr.DataSize() > 0 {
- panic("add DATA on non-open stream")
- }
- n = &ws.root
- }
- }
- n.q.push(wr)
-}
-
-func (ws *priorityWriteScheduler) Pop() (wr FrameWriteRequest, ok bool) {
- ws.root.walkReadyInOrder(false, &ws.tmp, func(n *priorityNode, openParent bool) bool {
- limit := int32(math.MaxInt32)
- if openParent {
- limit = ws.writeThrottleLimit
- }
- wr, ok = n.q.consume(limit)
- if !ok {
- return false
- }
- n.addBytes(int64(wr.DataSize()))
- // If B depends on A and B continuously has data available but A
- // does not, gradually increase the throttling limit to allow B to
- // steal more and more bandwidth from A.
- if openParent {
- ws.writeThrottleLimit += 1024
- if ws.writeThrottleLimit < 0 {
- ws.writeThrottleLimit = math.MaxInt32
- }
- } else if ws.enableWriteThrottle {
- ws.writeThrottleLimit = 1024
- }
- return true
- })
- return wr, ok
-}
-
-func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, maxSize int, n *priorityNode) {
- if maxSize == 0 {
- return
- }
- if len(*list) == maxSize {
- // Remove the oldest node, then shift left.
- ws.removeNode((*list)[0])
- x := (*list)[1:]
- copy(*list, x)
- *list = (*list)[:len(x)]
- }
- *list = append(*list, n)
-}
-
-func (ws *priorityWriteScheduler) removeNode(n *priorityNode) {
- for k := n.kids; k != nil; k = k.next {
- k.setParent(n.parent)
- }
- n.setParent(nil)
- delete(ws.nodes, n.id)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority_test.go
deleted file mode 100644
index f2b535a2c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_priority_test.go
+++ /dev/null
@@ -1,541 +0,0 @@
-// Copyright 2016 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 file.
-
-package http2
-
-import (
- "bytes"
- "fmt"
- "sort"
- "testing"
-)
-
-func defaultPriorityWriteScheduler() *priorityWriteScheduler {
- return NewPriorityWriteScheduler(nil).(*priorityWriteScheduler)
-}
-
-func checkPriorityWellFormed(ws *priorityWriteScheduler) error {
- for id, n := range ws.nodes {
- if id != n.id {
- return fmt.Errorf("bad ws.nodes: ws.nodes[%d] = %d", id, n.id)
- }
- if n.parent == nil {
- if n.next != nil || n.prev != nil {
- return fmt.Errorf("bad node %d: nil parent but prev/next not nil", id)
- }
- continue
- }
- found := false
- for k := n.parent.kids; k != nil; k = k.next {
- if k.id == id {
- found = true
- break
- }
- }
- if !found {
- return fmt.Errorf("bad node %d: not found in parent %d kids list", id, n.parent.id)
- }
- }
- return nil
-}
-
-func fmtTree(ws *priorityWriteScheduler, fmtNode func(*priorityNode) string) string {
- var ids []int
- for _, n := range ws.nodes {
- ids = append(ids, int(n.id))
- }
- sort.Ints(ids)
-
- var buf bytes.Buffer
- for _, id := range ids {
- if buf.Len() != 0 {
- buf.WriteString(" ")
- }
- if id == 0 {
- buf.WriteString(fmtNode(&ws.root))
- } else {
- buf.WriteString(fmtNode(ws.nodes[uint32(id)]))
- }
- }
- return buf.String()
-}
-
-func fmtNodeParentSkipRoot(n *priorityNode) string {
- switch {
- case n.id == 0:
- return ""
- case n.parent == nil:
- return fmt.Sprintf("%d{parent:nil}", n.id)
- default:
- return fmt.Sprintf("%d{parent:%d}", n.id, n.parent.id)
- }
-}
-
-func fmtNodeWeightParentSkipRoot(n *priorityNode) string {
- switch {
- case n.id == 0:
- return ""
- case n.parent == nil:
- return fmt.Sprintf("%d{weight:%d,parent:nil}", n.id, n.weight)
- default:
- return fmt.Sprintf("%d{weight:%d,parent:%d}", n.id, n.weight, n.parent.id)
- }
-}
-
-func TestPriorityTwoStreams(t *testing.T) {
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{})
-
- want := "1{weight:15,parent:0} 2{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After open\ngot %q\nwant %q", got, want)
- }
-
- // Move 1's parent to 2.
- ws.AdjustStream(1, PriorityParam{
- StreamDep: 2,
- Weight: 32,
- Exclusive: false,
- })
- want = "1{weight:32,parent:2} 2{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
-
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityAdjustExclusiveZero(t *testing.T) {
- // 1, 2, and 3 are all children of the 0 stream.
- // Exclusive reprioritization to any of the streams should bring
- // the rest of the streams under the reprioritized stream.
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{})
- ws.OpenStream(3, OpenStreamOptions{})
-
- want := "1{weight:15,parent:0} 2{weight:15,parent:0} 3{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After open\ngot %q\nwant %q", got, want)
- }
-
- ws.AdjustStream(2, PriorityParam{
- StreamDep: 0,
- Weight: 20,
- Exclusive: true,
- })
- want = "1{weight:15,parent:2} 2{weight:20,parent:0} 3{weight:15,parent:2}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
-
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityAdjustOwnParent(t *testing.T) {
- // Assigning a node as its own parent should have no effect.
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{})
- ws.AdjustStream(2, PriorityParam{
- StreamDep: 2,
- Weight: 20,
- Exclusive: true,
- })
- want := "1{weight:15,parent:0} 2{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityClosedStreams(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxClosedNodesInTree: 2}).(*priorityWriteScheduler)
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 2})
- ws.OpenStream(4, OpenStreamOptions{PusherID: 3})
-
- // Close the first three streams. We lose 1, but keep 2 and 3.
- ws.CloseStream(1)
- ws.CloseStream(2)
- ws.CloseStream(3)
-
- want := "2{weight:15,parent:0} 3{weight:15,parent:2} 4{weight:15,parent:3}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After close\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-
- // Adding a stream as an exclusive child of 1 gives it default
- // priorities, since 1 is gone.
- ws.OpenStream(5, OpenStreamOptions{})
- ws.AdjustStream(5, PriorityParam{StreamDep: 1, Weight: 15, Exclusive: true})
-
- // Adding a stream as an exclusive child of 2 should work, since 2 is not gone.
- ws.OpenStream(6, OpenStreamOptions{})
- ws.AdjustStream(6, PriorityParam{StreamDep: 2, Weight: 15, Exclusive: true})
-
- want = "2{weight:15,parent:0} 3{weight:15,parent:6} 4{weight:15,parent:3} 5{weight:15,parent:0} 6{weight:15,parent:2}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After add streams\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityClosedStreamsDisabled(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler)
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 2})
-
- // Close the first two streams. We keep only 3.
- ws.CloseStream(1)
- ws.CloseStream(2)
-
- want := "3{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After close\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityIdleStreams(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxIdleNodesInTree: 2}).(*priorityWriteScheduler)
- ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle
- ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle
- ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle
- ws.OpenStream(4, OpenStreamOptions{})
- ws.OpenStream(5, OpenStreamOptions{})
- ws.OpenStream(6, OpenStreamOptions{})
- ws.AdjustStream(4, PriorityParam{StreamDep: 1, Weight: 15})
- ws.AdjustStream(5, PriorityParam{StreamDep: 2, Weight: 15})
- ws.AdjustStream(6, PriorityParam{StreamDep: 3, Weight: 15})
-
- want := "2{weight:15,parent:0} 3{weight:20,parent:2} 4{weight:15,parent:0} 5{weight:15,parent:2} 6{weight:15,parent:3}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After open\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityIdleStreamsDisabled(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler)
- ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle
- ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle
- ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle
- ws.OpenStream(4, OpenStreamOptions{})
-
- want := "4{weight:15,parent:0}"
- if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want {
- t.Errorf("After open\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPrioritySection531NonExclusive(t *testing.T) {
- // Example from RFC 7540 Section 5.3.1.
- // A,B,C,D = 1,2,3,4
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(4, OpenStreamOptions{})
- ws.AdjustStream(4, PriorityParam{
- StreamDep: 1,
- Weight: 15,
- Exclusive: false,
- })
- want := "1{parent:0} 2{parent:1} 3{parent:1} 4{parent:1}"
- if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPrioritySection531Exclusive(t *testing.T) {
- // Example from RFC 7540 Section 5.3.1.
- // A,B,C,D = 1,2,3,4
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(4, OpenStreamOptions{})
- ws.AdjustStream(4, PriorityParam{
- StreamDep: 1,
- Weight: 15,
- Exclusive: true,
- })
- want := "1{parent:0} 2{parent:4} 3{parent:4} 4{parent:1}"
- if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func makeSection533Tree() *priorityWriteScheduler {
- // Initial tree from RFC 7540 Section 5.3.3.
- // A,B,C,D,E,F = 1,2,3,4,5,6
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(4, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(5, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(6, OpenStreamOptions{PusherID: 4})
- return ws
-}
-
-func TestPrioritySection533NonExclusive(t *testing.T) {
- // Example from RFC 7540 Section 5.3.3.
- // A,B,C,D,E,F = 1,2,3,4,5,6
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(4, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(5, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(6, OpenStreamOptions{PusherID: 4})
- ws.AdjustStream(1, PriorityParam{
- StreamDep: 4,
- Weight: 15,
- Exclusive: false,
- })
- want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:4}"
- if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func TestPrioritySection533Exclusive(t *testing.T) {
- // Example from RFC 7540 Section 5.3.3.
- // A,B,C,D,E,F = 1,2,3,4,5,6
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(4, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(5, OpenStreamOptions{PusherID: 3})
- ws.OpenStream(6, OpenStreamOptions{PusherID: 4})
- ws.AdjustStream(1, PriorityParam{
- StreamDep: 4,
- Weight: 15,
- Exclusive: true,
- })
- want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:1}"
- if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want {
- t.Errorf("After adjust\ngot %q\nwant %q", got, want)
- }
- if err := checkPriorityWellFormed(ws); err != nil {
- t.Error(err)
- }
-}
-
-func checkPopAll(ws WriteScheduler, order []uint32) error {
- for k, id := range order {
- wr, ok := ws.Pop()
- if !ok {
- return fmt.Errorf("Pop[%d]: got ok=false, want %d (order=%v)", k, id, order)
- }
- if got := wr.StreamID(); got != id {
- return fmt.Errorf("Pop[%d]: got %v, want %d (order=%v)", k, got, id, order)
- }
- }
- wr, ok := ws.Pop()
- if ok {
- return fmt.Errorf("Pop[%d]: got %v, want ok=false (order=%v)", len(order), wr.StreamID(), order)
- }
- return nil
-}
-
-func TestPriorityPopFrom533Tree(t *testing.T) {
- ws := makeSection533Tree()
-
- ws.Push(makeWriteHeadersRequest(3 /*C*/))
- ws.Push(makeWriteNonStreamRequest())
- ws.Push(makeWriteHeadersRequest(5 /*E*/))
- ws.Push(makeWriteHeadersRequest(1 /*A*/))
- t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot))
-
- if err := checkPopAll(ws, []uint32{0 /*NonStream*/, 1, 3, 5}); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityPopFromLinearTree(t *testing.T) {
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
- ws.OpenStream(3, OpenStreamOptions{PusherID: 2})
- ws.OpenStream(4, OpenStreamOptions{PusherID: 3})
-
- ws.Push(makeWriteHeadersRequest(3))
- ws.Push(makeWriteHeadersRequest(4))
- ws.Push(makeWriteHeadersRequest(1))
- ws.Push(makeWriteHeadersRequest(2))
- ws.Push(makeWriteNonStreamRequest())
- ws.Push(makeWriteNonStreamRequest())
- t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot))
-
- if err := checkPopAll(ws, []uint32{0, 0 /*NonStreams*/, 1, 2, 3, 4}); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityFlowControl(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: false})
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
-
- sc := &serverConn{maxFrameSize: 16}
- st1 := &stream{id: 1, sc: sc}
- st2 := &stream{id: 2, sc: sc}
-
- ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 16), false}, st1, nil})
- ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 16), false}, st2, nil})
- ws.AdjustStream(2, PriorityParam{StreamDep: 1})
-
- // No flow-control bytes available.
- if wr, ok := ws.Pop(); ok {
- t.Fatalf("Pop(limited by flow control)=%v,true, want false", wr)
- }
-
- // Add enough flow-control bytes to write st2 in two Pop calls.
- // Should write data from st2 even though it's lower priority than st1.
- for i := 1; i <= 2; i++ {
- st2.flow.add(8)
- wr, ok := ws.Pop()
- if !ok {
- t.Fatalf("Pop(%d)=false, want true", i)
- }
- if got, want := wr.DataSize(), 8; got != want {
- t.Fatalf("Pop(%d)=%d bytes, want %d bytes", i, got, want)
- }
- }
-}
-
-func TestPriorityThrottleOutOfOrderWrites(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: true})
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{PusherID: 1})
-
- sc := &serverConn{maxFrameSize: 4096}
- st1 := &stream{id: 1, sc: sc}
- st2 := &stream{id: 2, sc: sc}
- st1.flow.add(4096)
- st2.flow.add(4096)
- ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 4096), false}, st2, nil})
- ws.AdjustStream(2, PriorityParam{StreamDep: 1})
-
- // We have enough flow-control bytes to write st2 in a single Pop call.
- // However, due to out-of-order write throttling, the first call should
- // only write 1KB.
- wr, ok := ws.Pop()
- if !ok {
- t.Fatalf("Pop(st2.first)=false, want true")
- }
- if got, want := wr.StreamID(), uint32(2); got != want {
- t.Fatalf("Pop(st2.first)=stream %d, want stream %d", got, want)
- }
- if got, want := wr.DataSize(), 1024; got != want {
- t.Fatalf("Pop(st2.first)=%d bytes, want %d bytes", got, want)
- }
-
- // Now add data on st1. This should take precedence.
- ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 4096), false}, st1, nil})
- wr, ok = ws.Pop()
- if !ok {
- t.Fatalf("Pop(st1)=false, want true")
- }
- if got, want := wr.StreamID(), uint32(1); got != want {
- t.Fatalf("Pop(st1)=stream %d, want stream %d", got, want)
- }
- if got, want := wr.DataSize(), 4096; got != want {
- t.Fatalf("Pop(st1)=%d bytes, want %d bytes", got, want)
- }
-
- // Should go back to writing 1KB from st2.
- wr, ok = ws.Pop()
- if !ok {
- t.Fatalf("Pop(st2.last)=false, want true")
- }
- if got, want := wr.StreamID(), uint32(2); got != want {
- t.Fatalf("Pop(st2.last)=stream %d, want stream %d", got, want)
- }
- if got, want := wr.DataSize(), 1024; got != want {
- t.Fatalf("Pop(st2.last)=%d bytes, want %d bytes", got, want)
- }
-}
-
-func TestPriorityWeights(t *testing.T) {
- ws := defaultPriorityWriteScheduler()
- ws.OpenStream(1, OpenStreamOptions{})
- ws.OpenStream(2, OpenStreamOptions{})
-
- sc := &serverConn{maxFrameSize: 8}
- st1 := &stream{id: 1, sc: sc}
- st2 := &stream{id: 2, sc: sc}
- st1.flow.add(40)
- st2.flow.add(40)
-
- ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 40), false}, st1, nil})
- ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 40), false}, st2, nil})
- ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 34})
- ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 9})
-
- // st1 gets 3.5x the bandwidth of st2 (3.5 = (34+1)/(9+1)).
- // The maximum frame size is 8 bytes. The write sequence should be:
- // st1, total bytes so far is (st1=8, st=0)
- // st2, total bytes so far is (st1=8, st=8)
- // st1, total bytes so far is (st1=16, st=8)
- // st1, total bytes so far is (st1=24, st=8) // 3x bandwidth
- // st1, total bytes so far is (st1=32, st=8) // 4x bandwidth
- // st2, total bytes so far is (st1=32, st=16) // 2x bandwidth
- // st1, total bytes so far is (st1=40, st=16)
- // st2, total bytes so far is (st1=40, st=24)
- // st2, total bytes so far is (st1=40, st=32)
- // st2, total bytes so far is (st1=40, st=40)
- if err := checkPopAll(ws, []uint32{1, 2, 1, 1, 1, 2, 1, 2, 2, 2}); err != nil {
- t.Error(err)
- }
-}
-
-func TestPriorityRstStreamOnNonOpenStreams(t *testing.T) {
- ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{
- MaxClosedNodesInTree: 0,
- MaxIdleNodesInTree: 0,
- })
- ws.OpenStream(1, OpenStreamOptions{})
- ws.CloseStream(1)
- ws.Push(FrameWriteRequest{write: streamError(1, ErrCodeProtocol)})
- ws.Push(FrameWriteRequest{write: streamError(2, ErrCodeProtocol)})
-
- if err := checkPopAll(ws, []uint32{1, 2}); err != nil {
- t.Error(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random.go
deleted file mode 100644
index 36d7919f1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import "math"
-
-// NewRandomWriteScheduler constructs a WriteScheduler that ignores HTTP/2
-// priorities. Control frames like SETTINGS and PING are written before DATA
-// frames, but if no control frames are queued and multiple streams have queued
-// HEADERS or DATA frames, Pop selects a ready stream arbitrarily.
-func NewRandomWriteScheduler() WriteScheduler {
- return &randomWriteScheduler{sq: make(map[uint32]*writeQueue)}
-}
-
-type randomWriteScheduler struct {
- // zero are frames not associated with a specific stream.
- zero writeQueue
-
- // sq contains the stream-specific queues, keyed by stream ID.
- // When a stream is idle or closed, it's deleted from the map.
- sq map[uint32]*writeQueue
-
- // pool of empty queues for reuse.
- queuePool writeQueuePool
-}
-
-func (ws *randomWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {
- // no-op: idle streams are not tracked
-}
-
-func (ws *randomWriteScheduler) CloseStream(streamID uint32) {
- q, ok := ws.sq[streamID]
- if !ok {
- return
- }
- delete(ws.sq, streamID)
- ws.queuePool.put(q)
-}
-
-func (ws *randomWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {
- // no-op: priorities are ignored
-}
-
-func (ws *randomWriteScheduler) Push(wr FrameWriteRequest) {
- id := wr.StreamID()
- if id == 0 {
- ws.zero.push(wr)
- return
- }
- q, ok := ws.sq[id]
- if !ok {
- q = ws.queuePool.get()
- ws.sq[id] = q
- }
- q.push(wr)
-}
-
-func (ws *randomWriteScheduler) Pop() (FrameWriteRequest, bool) {
- // Control frames first.
- if !ws.zero.empty() {
- return ws.zero.shift(), true
- }
- // Iterate over all non-idle streams until finding one that can be consumed.
- for _, q := range ws.sq {
- if wr, ok := q.consume(math.MaxInt32); ok {
- return wr, true
- }
- }
- return FrameWriteRequest{}, false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random_test.go
deleted file mode 100644
index 3bf4aa36a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_random_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2016 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 file.
-
-package http2
-
-import "testing"
-
-func TestRandomScheduler(t *testing.T) {
- ws := NewRandomWriteScheduler()
- ws.Push(makeWriteHeadersRequest(3))
- ws.Push(makeWriteHeadersRequest(4))
- ws.Push(makeWriteHeadersRequest(1))
- ws.Push(makeWriteHeadersRequest(2))
- ws.Push(makeWriteNonStreamRequest())
- ws.Push(makeWriteNonStreamRequest())
-
- // Pop all frames. Should get the non-stream requests first,
- // followed by the stream requests in any order.
- var order []FrameWriteRequest
- for {
- wr, ok := ws.Pop()
- if !ok {
- break
- }
- order = append(order, wr)
- }
- t.Logf("got frames: %v", order)
- if len(order) != 6 {
- t.Fatalf("got %d frames, expected 6", len(order))
- }
- if order[0].StreamID() != 0 || order[1].StreamID() != 0 {
- t.Fatal("expected non-stream frames first", order[0], order[1])
- }
- got := make(map[uint32]bool)
- for _, wr := range order[2:] {
- got[wr.StreamID()] = true
- }
- for id := uint32(1); id <= 4; id++ {
- if !got[id] {
- t.Errorf("frame not found for stream %d", id)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_test.go
deleted file mode 100644
index 0807056bc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/writesched_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2016 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 file.
-
-package http2
-
-import (
- "fmt"
- "math"
- "reflect"
- "testing"
-)
-
-func makeWriteNonStreamRequest() FrameWriteRequest {
- return FrameWriteRequest{writeSettingsAck{}, nil, nil}
-}
-
-func makeWriteHeadersRequest(streamID uint32) FrameWriteRequest {
- st := &stream{id: streamID}
- return FrameWriteRequest{&writeResHeaders{streamID: streamID, httpResCode: 200}, st, nil}
-}
-
-func checkConsume(wr FrameWriteRequest, nbytes int32, want []FrameWriteRequest) error {
- consumed, rest, n := wr.Consume(nbytes)
- var wantConsumed, wantRest FrameWriteRequest
- switch len(want) {
- case 0:
- case 1:
- wantConsumed = want[0]
- case 2:
- wantConsumed = want[0]
- wantRest = want[1]
- }
- if !reflect.DeepEqual(consumed, wantConsumed) || !reflect.DeepEqual(rest, wantRest) || n != len(want) {
- return fmt.Errorf("got %v, %v, %v\nwant %v, %v, %v", consumed, rest, n, wantConsumed, wantRest, len(want))
- }
- return nil
-}
-
-func TestFrameWriteRequestNonData(t *testing.T) {
- wr := makeWriteNonStreamRequest()
- if got, want := wr.DataSize(), 0; got != want {
- t.Errorf("DataSize: got %v, want %v", got, want)
- }
-
- // Non-DATA frames are always consumed whole.
- if err := checkConsume(wr, 0, []FrameWriteRequest{wr}); err != nil {
- t.Errorf("Consume:\n%v", err)
- }
-}
-
-func TestFrameWriteRequestData(t *testing.T) {
- st := &stream{
- id: 1,
- sc: &serverConn{maxFrameSize: 16},
- }
- const size = 32
- wr := FrameWriteRequest{&writeData{st.id, make([]byte, size), true}, st, make(chan error)}
- if got, want := wr.DataSize(), size; got != want {
- t.Errorf("DataSize: got %v, want %v", got, want)
- }
-
- // No flow-control bytes available: cannot consume anything.
- if err := checkConsume(wr, math.MaxInt32, []FrameWriteRequest{}); err != nil {
- t.Errorf("Consume(limited by flow control):\n%v", err)
- }
-
- // Add enough flow-control bytes to consume the entire frame,
- // but we're now restricted by st.sc.maxFrameSize.
- st.flow.add(size)
- want := []FrameWriteRequest{
- {
- write: &writeData{st.id, make([]byte, st.sc.maxFrameSize), false},
- stream: st,
- done: nil,
- },
- {
- write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize), true},
- stream: st,
- done: wr.done,
- },
- }
- if err := checkConsume(wr, math.MaxInt32, want); err != nil {
- t.Errorf("Consume(limited by maxFrameSize):\n%v", err)
- }
- rest := want[1]
-
- // Consume 8 bytes from the remaining frame.
- want = []FrameWriteRequest{
- {
- write: &writeData{st.id, make([]byte, 8), false},
- stream: st,
- done: nil,
- },
- {
- write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true},
- stream: st,
- done: wr.done,
- },
- }
- if err := checkConsume(rest, 8, want); err != nil {
- t.Errorf("Consume(8):\n%v", err)
- }
- rest = want[1]
-
- // Consume all remaining bytes.
- want = []FrameWriteRequest{
- {
- write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true},
- stream: st,
- done: wr.done,
- },
- }
- if err := checkConsume(rest, math.MaxInt32, want); err != nil {
- t.Errorf("Consume(remainder):\n%v", err)
- }
-}
-
-func TestFrameWriteRequest_StreamID(t *testing.T) {
- const streamID = 123
- wr := FrameWriteRequest{write: streamError(streamID, ErrCodeNo)}
- if got := wr.StreamID(); got != streamID {
- t.Errorf("FrameWriteRequest(StreamError) = %v; want %v", got, streamID)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/z_spec_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/z_spec_test.go
deleted file mode 100644
index 610b2cdbc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/http2/z_spec_test.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright 2014 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 file.
-
-package http2
-
-import (
- "bytes"
- "encoding/xml"
- "flag"
- "fmt"
- "io"
- "os"
- "reflect"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "sync"
- "testing"
-)
-
-var coverSpec = flag.Bool("coverspec", false, "Run spec coverage tests")
-
-// The global map of sentence coverage for the http2 spec.
-var defaultSpecCoverage specCoverage
-
-var loadSpecOnce sync.Once
-
-func loadSpec() {
- if f, err := os.Open("testdata/draft-ietf-httpbis-http2.xml"); err != nil {
- panic(err)
- } else {
- defaultSpecCoverage = readSpecCov(f)
- f.Close()
- }
-}
-
-// covers marks all sentences for section sec in defaultSpecCoverage. Sentences not
-// "covered" will be included in report outputted by TestSpecCoverage.
-func covers(sec, sentences string) {
- loadSpecOnce.Do(loadSpec)
- defaultSpecCoverage.cover(sec, sentences)
-}
-
-type specPart struct {
- section string
- sentence string
-}
-
-func (ss specPart) Less(oo specPart) bool {
- atoi := func(s string) int {
- n, err := strconv.Atoi(s)
- if err != nil {
- panic(err)
- }
- return n
- }
- a := strings.Split(ss.section, ".")
- b := strings.Split(oo.section, ".")
- for len(a) > 0 {
- if len(b) == 0 {
- return false
- }
- x, y := atoi(a[0]), atoi(b[0])
- if x == y {
- a, b = a[1:], b[1:]
- continue
- }
- return x < y
- }
- if len(b) > 0 {
- return true
- }
- return false
-}
-
-type bySpecSection []specPart
-
-func (a bySpecSection) Len() int { return len(a) }
-func (a bySpecSection) Less(i, j int) bool { return a[i].Less(a[j]) }
-func (a bySpecSection) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-
-type specCoverage struct {
- coverage map[specPart]bool
- d *xml.Decoder
-}
-
-func joinSection(sec []int) string {
- s := fmt.Sprintf("%d", sec[0])
- for _, n := range sec[1:] {
- s = fmt.Sprintf("%s.%d", s, n)
- }
- return s
-}
-
-func (sc specCoverage) readSection(sec []int) {
- var (
- buf = new(bytes.Buffer)
- sub = 0
- )
- for {
- tk, err := sc.d.Token()
- if err != nil {
- if err == io.EOF {
- return
- }
- panic(err)
- }
- switch v := tk.(type) {
- case xml.StartElement:
- if skipElement(v) {
- if err := sc.d.Skip(); err != nil {
- panic(err)
- }
- if v.Name.Local == "section" {
- sub++
- }
- break
- }
- switch v.Name.Local {
- case "section":
- sub++
- sc.readSection(append(sec, sub))
- case "xref":
- buf.Write(sc.readXRef(v))
- }
- case xml.CharData:
- if len(sec) == 0 {
- break
- }
- buf.Write(v)
- case xml.EndElement:
- if v.Name.Local == "section" {
- sc.addSentences(joinSection(sec), buf.String())
- return
- }
- }
- }
-}
-
-func (sc specCoverage) readXRef(se xml.StartElement) []byte {
- var b []byte
- for {
- tk, err := sc.d.Token()
- if err != nil {
- panic(err)
- }
- switch v := tk.(type) {
- case xml.CharData:
- if b != nil {
- panic("unexpected CharData")
- }
- b = []byte(string(v))
- case xml.EndElement:
- if v.Name.Local != "xref" {
- panic("expected </xref>")
- }
- if b != nil {
- return b
- }
- sig := attrSig(se)
- switch sig {
- case "target":
- return []byte(fmt.Sprintf("[%s]", attrValue(se, "target")))
- case "fmt-of,rel,target", "fmt-,,rel,target":
- return []byte(fmt.Sprintf("[%s, %s]", attrValue(se, "target"), attrValue(se, "rel")))
- case "fmt-of,sec,target", "fmt-,,sec,target":
- return []byte(fmt.Sprintf("[section %s of %s]", attrValue(se, "sec"), attrValue(se, "target")))
- case "fmt-of,rel,sec,target":
- return []byte(fmt.Sprintf("[section %s of %s, %s]", attrValue(se, "sec"), attrValue(se, "target"), attrValue(se, "rel")))
- default:
- panic(fmt.Sprintf("unknown attribute signature %q in %#v", sig, fmt.Sprintf("%#v", se)))
- }
- default:
- panic(fmt.Sprintf("unexpected tag %q", v))
- }
- }
-}
-
-var skipAnchor = map[string]bool{
- "intro": true,
- "Overview": true,
-}
-
-var skipTitle = map[string]bool{
- "Acknowledgements": true,
- "Change Log": true,
- "Document Organization": true,
- "Conventions and Terminology": true,
-}
-
-func skipElement(s xml.StartElement) bool {
- switch s.Name.Local {
- case "artwork":
- return true
- case "section":
- for _, attr := range s.Attr {
- switch attr.Name.Local {
- case "anchor":
- if skipAnchor[attr.Value] || strings.HasPrefix(attr.Value, "changes.since.") {
- return true
- }
- case "title":
- if skipTitle[attr.Value] {
- return true
- }
- }
- }
- }
- return false
-}
-
-func readSpecCov(r io.Reader) specCoverage {
- sc := specCoverage{
- coverage: map[specPart]bool{},
- d: xml.NewDecoder(r)}
- sc.readSection(nil)
- return sc
-}
-
-func (sc specCoverage) addSentences(sec string, sentence string) {
- for _, s := range parseSentences(sentence) {
- sc.coverage[specPart{sec, s}] = false
- }
-}
-
-func (sc specCoverage) cover(sec string, sentence string) {
- for _, s := range parseSentences(sentence) {
- p := specPart{sec, s}
- if _, ok := sc.coverage[p]; !ok {
- panic(fmt.Sprintf("Not found in spec: %q, %q", sec, s))
- }
- sc.coverage[specPart{sec, s}] = true
- }
-
-}
-
-var whitespaceRx = regexp.MustCompile(`\s+`)
-
-func parseSentences(sens string) []string {
- sens = strings.TrimSpace(sens)
- if sens == "" {
- return nil
- }
- ss := strings.Split(whitespaceRx.ReplaceAllString(sens, " "), ". ")
- for i, s := range ss {
- s = strings.TrimSpace(s)
- if !strings.HasSuffix(s, ".") {
- s += "."
- }
- ss[i] = s
- }
- return ss
-}
-
-func TestSpecParseSentences(t *testing.T) {
- tests := []struct {
- ss string
- want []string
- }{
- {"Sentence 1. Sentence 2.",
- []string{
- "Sentence 1.",
- "Sentence 2.",
- }},
- {"Sentence 1. \nSentence 2.\tSentence 3.",
- []string{
- "Sentence 1.",
- "Sentence 2.",
- "Sentence 3.",
- }},
- }
-
- for i, tt := range tests {
- got := parseSentences(tt.ss)
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("%d: got = %q, want %q", i, got, tt.want)
- }
- }
-}
-
-func TestSpecCoverage(t *testing.T) {
- if !*coverSpec {
- t.Skip()
- }
-
- loadSpecOnce.Do(loadSpec)
-
- var (
- list []specPart
- cv = defaultSpecCoverage.coverage
- total = len(cv)
- complete = 0
- )
-
- for sp, touched := range defaultSpecCoverage.coverage {
- if touched {
- complete++
- } else {
- list = append(list, sp)
- }
- }
- sort.Stable(bySpecSection(list))
-
- if testing.Short() && len(list) > 5 {
- list = list[:5]
- }
-
- for _, p := range list {
- t.Errorf("\tSECTION %s: %s", p.section, p.sentence)
- }
-
- t.Logf("%d/%d (%d%%) sentences covered", complete, total, (complete/total)*100)
-}
-
-func attrSig(se xml.StartElement) string {
- var names []string
- for _, attr := range se.Attr {
- if attr.Name.Local == "fmt" {
- names = append(names, "fmt-"+attr.Value)
- } else {
- names = append(names, attr.Name.Local)
- }
- }
- sort.Strings(names)
- return strings.Join(names, ",")
-}
-
-func attrValue(se xml.StartElement, attr string) string {
- for _, a := range se.Attr {
- if a.Name.Local == attr {
- return a.Value
- }
- }
- panic("unknown attribute " + attr)
-}
-
-func TestSpecPartLess(t *testing.T) {
- tests := []struct {
- sec1, sec2 string
- want bool
- }{
- {"6.2.1", "6.2", false},
- {"6.2", "6.2.1", true},
- {"6.10", "6.10.1", true},
- {"6.10", "6.1.1", false}, // 10, not 1
- {"6.1", "6.1", false}, // equal, so not less
- }
- for _, tt := range tests {
- got := (specPart{tt.sec1, "foo"}).Less(specPart{tt.sec2, "foo"})
- if got != tt.want {
- t.Errorf("Less(%q, %q) = %v; want %v", tt.sec1, tt.sec2, got, tt.want)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/dstunreach.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/dstunreach.go
deleted file mode 100644
index 75db991df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/dstunreach.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-// A DstUnreach represents an ICMP destination unreachable message
-// body.
-type DstUnreach struct {
- Data []byte // data, known as original datagram field
- Extensions []Extension // extensions
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *DstUnreach) Len(proto int) int {
- if p == nil {
- return 0
- }
- l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions)
- return 4 + l
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *DstUnreach) Marshal(proto int) ([]byte, error) {
- return marshalMultipartMessageBody(proto, p.Data, p.Extensions)
-}
-
-// parseDstUnreach parses b as an ICMP destination unreachable message
-// body.
-func parseDstUnreach(proto int, b []byte) (MessageBody, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- p := &DstUnreach{}
- var err error
- p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b)
- if err != nil {
- return nil, err
- }
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/echo.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/echo.go
deleted file mode 100644
index e6f15efd7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/echo.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2012 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 file.
-
-package icmp
-
-import "encoding/binary"
-
-// An Echo represents an ICMP echo request or reply message body.
-type Echo struct {
- ID int // identifier
- Seq int // sequence number
- Data []byte // data
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *Echo) Len(proto int) int {
- if p == nil {
- return 0
- }
- return 4 + len(p.Data)
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *Echo) Marshal(proto int) ([]byte, error) {
- b := make([]byte, 4+len(p.Data))
- binary.BigEndian.PutUint16(b[:2], uint16(p.ID))
- binary.BigEndian.PutUint16(b[2:4], uint16(p.Seq))
- copy(b[4:], p.Data)
- return b, nil
-}
-
-// parseEcho parses b as an ICMP echo request or reply message body.
-func parseEcho(proto int, b []byte) (MessageBody, error) {
- bodyLen := len(b)
- if bodyLen < 4 {
- return nil, errMessageTooShort
- }
- p := &Echo{ID: int(binary.BigEndian.Uint16(b[:2])), Seq: int(binary.BigEndian.Uint16(b[2:4]))}
- if bodyLen > 4 {
- p.Data = make([]byte, bodyLen-4)
- copy(p.Data, b[4:])
- }
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/endpoint.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/endpoint.go
deleted file mode 100644
index a68bfb010..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/endpoint.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import (
- "net"
- "runtime"
- "syscall"
- "time"
-
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-var _ net.PacketConn = &PacketConn{}
-
-// A PacketConn represents a packet network endpoint that uses either
-// ICMPv4 or ICMPv6.
-type PacketConn struct {
- c net.PacketConn
- p4 *ipv4.PacketConn
- p6 *ipv6.PacketConn
-}
-
-func (c *PacketConn) ok() bool { return c != nil && c.c != nil }
-
-// IPv4PacketConn returns the ipv4.PacketConn of c.
-// It returns nil when c is not created as the endpoint for ICMPv4.
-func (c *PacketConn) IPv4PacketConn() *ipv4.PacketConn {
- if !c.ok() {
- return nil
- }
- return c.p4
-}
-
-// IPv6PacketConn returns the ipv6.PacketConn of c.
-// It returns nil when c is not created as the endpoint for ICMPv6.
-func (c *PacketConn) IPv6PacketConn() *ipv6.PacketConn {
- if !c.ok() {
- return nil
- }
- return c.p6
-}
-
-// ReadFrom reads an ICMP message from the connection.
-func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) {
- if !c.ok() {
- return 0, nil, syscall.EINVAL
- }
- // Please be informed that ipv4.NewPacketConn enables
- // IP_STRIPHDR option by default on Darwin.
- // See golang.org/issue/9395 for further information.
- if runtime.GOOS == "darwin" && c.p4 != nil {
- n, _, peer, err := c.p4.ReadFrom(b)
- return n, peer, err
- }
- return c.c.ReadFrom(b)
-}
-
-// WriteTo writes the ICMP message b to dst.
-// Dst must be net.UDPAddr when c is a non-privileged
-// datagram-oriented ICMP endpoint. Otherwise it must be net.IPAddr.
-func (c *PacketConn) WriteTo(b []byte, dst net.Addr) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- return c.c.WriteTo(b, dst)
-}
-
-// Close closes the endpoint.
-func (c *PacketConn) Close() error {
- if !c.ok() {
- return syscall.EINVAL
- }
- return c.c.Close()
-}
-
-// LocalAddr returns the local network address.
-func (c *PacketConn) LocalAddr() net.Addr {
- if !c.ok() {
- return nil
- }
- return c.c.LocalAddr()
-}
-
-// SetDeadline sets the read and write deadlines associated with the
-// endpoint.
-func (c *PacketConn) SetDeadline(t time.Time) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- return c.c.SetDeadline(t)
-}
-
-// SetReadDeadline sets the read deadline associated with the
-// endpoint.
-func (c *PacketConn) SetReadDeadline(t time.Time) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- return c.c.SetReadDeadline(t)
-}
-
-// SetWriteDeadline sets the write deadline associated with the
-// endpoint.
-func (c *PacketConn) SetWriteDeadline(t time.Time) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- return c.c.SetWriteDeadline(t)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/example_test.go
deleted file mode 100644
index 1df4ceccd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/example_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp_test
-
-import (
- "log"
- "net"
- "os"
- "runtime"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/ipv6"
-)
-
-func ExamplePacketConn_nonPrivilegedPing() {
- switch runtime.GOOS {
- case "darwin":
- case "linux":
- log.Println("you may need to adjust the net.ipv4.ping_group_range kernel state")
- default:
- log.Println("not supported on", runtime.GOOS)
- return
- }
-
- c, err := icmp.ListenPacket("udp6", "fe80::1%en0")
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
-
- wm := icmp.Message{
- Type: ipv6.ICMPTypeEchoRequest, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }
- wb, err := wm.Marshal(nil)
- if err != nil {
- log.Fatal(err)
- }
- if _, err := c.WriteTo(wb, &net.UDPAddr{IP: net.ParseIP("ff02::1"), Zone: "en0"}); err != nil {
- log.Fatal(err)
- }
-
- rb := make([]byte, 1500)
- n, peer, err := c.ReadFrom(rb)
- if err != nil {
- log.Fatal(err)
- }
- rm, err := icmp.ParseMessage(58, rb[:n])
- if err != nil {
- log.Fatal(err)
- }
- switch rm.Type {
- case ipv6.ICMPTypeEchoReply:
- log.Printf("got reflection from %v", peer)
- default:
- log.Printf("got %+v; want echo reply", rm)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension.go
deleted file mode 100644
index 402a7514b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp
-
-import "encoding/binary"
-
-// An Extension represents an ICMP extension.
-type Extension interface {
- // Len returns the length of ICMP extension.
- // Proto must be either the ICMPv4 or ICMPv6 protocol number.
- Len(proto int) int
-
- // Marshal returns the binary encoding of ICMP extension.
- // Proto must be either the ICMPv4 or ICMPv6 protocol number.
- Marshal(proto int) ([]byte, error)
-}
-
-const extensionVersion = 2
-
-func validExtensionHeader(b []byte) bool {
- v := int(b[0]&0xf0) >> 4
- s := binary.BigEndian.Uint16(b[2:4])
- if s != 0 {
- s = checksum(b)
- }
- if v != extensionVersion || s != 0 {
- return false
- }
- return true
-}
-
-// parseExtensions parses b as a list of ICMP extensions.
-// The length attribute l must be the length attribute field in
-// received icmp messages.
-//
-// It will return a list of ICMP extensions and an adjusted length
-// attribute that represents the length of the padded original
-// datagram field. Otherwise, it returns an error.
-func parseExtensions(b []byte, l int) ([]Extension, int, error) {
- // Still a lot of non-RFC 4884 compliant implementations are
- // out there. Set the length attribute l to 128 when it looks
- // inappropriate for backwards compatibility.
- //
- // A minimal extension at least requires 8 octets; 4 octets
- // for an extension header, and 4 octets for a single object
- // header.
- //
- // See RFC 4884 for further information.
- if 128 > l || l+8 > len(b) {
- l = 128
- }
- if l+8 > len(b) {
- return nil, -1, errNoExtension
- }
- if !validExtensionHeader(b[l:]) {
- if l == 128 {
- return nil, -1, errNoExtension
- }
- l = 128
- if !validExtensionHeader(b[l:]) {
- return nil, -1, errNoExtension
- }
- }
- var exts []Extension
- for b = b[l+4:]; len(b) >= 4; {
- ol := int(binary.BigEndian.Uint16(b[:2]))
- if 4 > ol || ol > len(b) {
- break
- }
- switch b[2] {
- case classMPLSLabelStack:
- ext, err := parseMPLSLabelStack(b[:ol])
- if err != nil {
- return nil, -1, err
- }
- exts = append(exts, ext)
- case classInterfaceInfo:
- ext, err := parseInterfaceInfo(b[:ol])
- if err != nil {
- return nil, -1, err
- }
- exts = append(exts, ext)
- }
- b = b[ol:]
- }
- return exts, l, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension_test.go
deleted file mode 100644
index 0b3f7b9e1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/extension_test.go
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp
-
-import (
- "net"
- "reflect"
- "testing"
-
- "golang.org/x/net/internal/iana"
-)
-
-var marshalAndParseExtensionTests = []struct {
- proto int
- hdr []byte
- obj []byte
- exts []Extension
-}{
- // MPLS label stack with no label
- {
- proto: iana.ProtocolICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x04, 0x01, 0x01,
- },
- exts: []Extension{
- &MPLSLabelStack{
- Class: classMPLSLabelStack,
- Type: typeIncomingMPLSLabelStack,
- },
- },
- },
- // MPLS label stack with a single label
- {
- proto: iana.ProtocolIPv6ICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x08, 0x01, 0x01,
- 0x03, 0xe8, 0xe9, 0xff,
- },
- exts: []Extension{
- &MPLSLabelStack{
- Class: classMPLSLabelStack,
- Type: typeIncomingMPLSLabelStack,
- Labels: []MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- },
- },
- // MPLS label stack with multiple labels
- {
- proto: iana.ProtocolICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x0c, 0x01, 0x01,
- 0x03, 0xe8, 0xde, 0xfe,
- 0x03, 0xe8, 0xe1, 0xff,
- },
- exts: []Extension{
- &MPLSLabelStack{
- Class: classMPLSLabelStack,
- Type: typeIncomingMPLSLabelStack,
- Labels: []MPLSLabel{
- {
- Label: 16013,
- TC: 0x7,
- S: false,
- TTL: 254,
- },
- {
- Label: 16014,
- TC: 0,
- S: true,
- TTL: 255,
- },
- },
- },
- },
- },
- // Interface information with no attribute
- {
- proto: iana.ProtocolICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x04, 0x02, 0x00,
- },
- exts: []Extension{
- &InterfaceInfo{
- Class: classInterfaceInfo,
- },
- },
- },
- // Interface information with ifIndex and name
- {
- proto: iana.ProtocolICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x10, 0x02, 0x0a,
- 0x00, 0x00, 0x00, 0x10,
- 0x08, byte('e'), byte('n'), byte('1'),
- byte('0'), byte('1'), 0x00, 0x00,
- },
- exts: []Extension{
- &InterfaceInfo{
- Class: classInterfaceInfo,
- Type: 0x0a,
- Interface: &net.Interface{
- Index: 16,
- Name: "en101",
- },
- },
- },
- },
- // Interface information with ifIndex, IPAddr, name and MTU
- {
- proto: iana.ProtocolIPv6ICMP,
- hdr: []byte{
- 0x20, 0x00, 0x00, 0x00,
- },
- obj: []byte{
- 0x00, 0x28, 0x02, 0x0f,
- 0x00, 0x00, 0x00, 0x0f,
- 0x00, 0x02, 0x00, 0x00,
- 0xfe, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01,
- 0x08, byte('e'), byte('n'), byte('1'),
- byte('0'), byte('1'), 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00,
- },
- exts: []Extension{
- &InterfaceInfo{
- Class: classInterfaceInfo,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.ParseIP("fe80::1"),
- Zone: "en101",
- },
- },
- },
- },
-}
-
-func TestMarshalAndParseExtension(t *testing.T) {
- for i, tt := range marshalAndParseExtensionTests {
- for j, ext := range tt.exts {
- var err error
- var b []byte
- switch ext := ext.(type) {
- case *MPLSLabelStack:
- b, err = ext.Marshal(tt.proto)
- if err != nil {
- t.Errorf("#%v/%v: %v", i, j, err)
- continue
- }
- case *InterfaceInfo:
- b, err = ext.Marshal(tt.proto)
- if err != nil {
- t.Errorf("#%v/%v: %v", i, j, err)
- continue
- }
- }
- if !reflect.DeepEqual(b, tt.obj) {
- t.Errorf("#%v/%v: got %#v; want %#v", i, j, b, tt.obj)
- continue
- }
- }
-
- for j, wire := range []struct {
- data []byte // original datagram
- inlattr int // length of padded original datagram, a hint
- outlattr int // length of padded original datagram, a want
- err error
- }{
- {nil, 0, -1, errNoExtension},
- {make([]byte, 127), 128, -1, errNoExtension},
-
- {make([]byte, 128), 127, -1, errNoExtension},
- {make([]byte, 128), 128, -1, errNoExtension},
- {make([]byte, 128), 129, -1, errNoExtension},
-
- {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 127, 128, nil},
- {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 128, 128, nil},
- {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 129, 128, nil},
-
- {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 511, -1, errNoExtension},
- {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 512, 512, nil},
- {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 513, -1, errNoExtension},
- } {
- exts, l, err := parseExtensions(wire.data, wire.inlattr)
- if err != wire.err {
- t.Errorf("#%v/%v: got %v; want %v", i, j, err, wire.err)
- continue
- }
- if wire.err != nil {
- continue
- }
- if l != wire.outlattr {
- t.Errorf("#%v/%v: got %v; want %v", i, j, l, wire.outlattr)
- }
- if !reflect.DeepEqual(exts, tt.exts) {
- for j, ext := range exts {
- switch ext := ext.(type) {
- case *MPLSLabelStack:
- want := tt.exts[j].(*MPLSLabelStack)
- t.Errorf("#%v/%v: got %#v; want %#v", i, j, ext, want)
- case *InterfaceInfo:
- want := tt.exts[j].(*InterfaceInfo)
- t.Errorf("#%v/%v: got %#v; want %#v", i, j, ext, want)
- }
- }
- continue
- }
- }
- }
-}
-
-var parseInterfaceNameTests = []struct {
- b []byte
- error
-}{
- {[]byte{0, 'e', 'n', '0'}, errInvalidExtension},
- {[]byte{4, 'e', 'n', '0'}, nil},
- {[]byte{7, 'e', 'n', '0', 0xff, 0xff, 0xff, 0xff}, errInvalidExtension},
- {[]byte{8, 'e', 'n', '0', 0xff, 0xff, 0xff}, errMessageTooShort},
-}
-
-func TestParseInterfaceName(t *testing.T) {
- ifi := InterfaceInfo{Interface: &net.Interface{}}
- for i, tt := range parseInterfaceNameTests {
- if _, err := ifi.parseName(tt.b); err != tt.error {
- t.Errorf("#%d: got %v; want %v", i, err, tt.error)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/helper_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/helper_posix.go
deleted file mode 100644
index 398fd388f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/helper_posix.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package icmp
-
-import (
- "net"
- "strconv"
- "syscall"
-)
-
-func sockaddr(family int, address string) (syscall.Sockaddr, error) {
- switch family {
- case syscall.AF_INET:
- a, err := net.ResolveIPAddr("ip4", address)
- if err != nil {
- return nil, err
- }
- if len(a.IP) == 0 {
- a.IP = net.IPv4zero
- }
- if a.IP = a.IP.To4(); a.IP == nil {
- return nil, net.InvalidAddrError("non-ipv4 address")
- }
- sa := &syscall.SockaddrInet4{}
- copy(sa.Addr[:], a.IP)
- return sa, nil
- case syscall.AF_INET6:
- a, err := net.ResolveIPAddr("ip6", address)
- if err != nil {
- return nil, err
- }
- if len(a.IP) == 0 {
- a.IP = net.IPv6unspecified
- }
- if a.IP.Equal(net.IPv4zero) {
- a.IP = net.IPv6unspecified
- }
- if a.IP = a.IP.To16(); a.IP == nil || a.IP.To4() != nil {
- return nil, net.InvalidAddrError("non-ipv6 address")
- }
- sa := &syscall.SockaddrInet6{ZoneId: zoneToUint32(a.Zone)}
- copy(sa.Addr[:], a.IP)
- return sa, nil
- default:
- return nil, net.InvalidAddrError("unexpected family")
- }
-}
-
-func zoneToUint32(zone string) uint32 {
- if zone == "" {
- return 0
- }
- if ifi, err := net.InterfaceByName(zone); err == nil {
- return uint32(ifi.Index)
- }
- n, err := strconv.Atoi(zone)
- if err != nil {
- return 0
- }
- return uint32(n)
-}
-
-func last(s string, b byte) int {
- i := len(s)
- for i--; i >= 0; i-- {
- if s[i] == b {
- break
- }
- }
- return i
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/interface.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/interface.go
deleted file mode 100644
index 78b5b98bf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/interface.go
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp
-
-import (
- "encoding/binary"
- "net"
- "strings"
-
- "golang.org/x/net/internal/iana"
-)
-
-const (
- classInterfaceInfo = 2
-
- afiIPv4 = 1
- afiIPv6 = 2
-)
-
-const (
- attrMTU = 1 << iota
- attrName
- attrIPAddr
- attrIfIndex
-)
-
-// An InterfaceInfo represents interface and next-hop identification.
-type InterfaceInfo struct {
- Class int // extension object class number
- Type int // extension object sub-type
- Interface *net.Interface
- Addr *net.IPAddr
-}
-
-func (ifi *InterfaceInfo) nameLen() int {
- if len(ifi.Interface.Name) > 63 {
- return 64
- }
- l := 1 + len(ifi.Interface.Name)
- return (l + 3) &^ 3
-}
-
-func (ifi *InterfaceInfo) attrsAndLen(proto int) (attrs, l int) {
- l = 4
- if ifi.Interface != nil && ifi.Interface.Index > 0 {
- attrs |= attrIfIndex
- l += 4
- if len(ifi.Interface.Name) > 0 {
- attrs |= attrName
- l += ifi.nameLen()
- }
- if ifi.Interface.MTU > 0 {
- attrs |= attrMTU
- l += 4
- }
- }
- if ifi.Addr != nil {
- switch proto {
- case iana.ProtocolICMP:
- if ifi.Addr.IP.To4() != nil {
- attrs |= attrIPAddr
- l += 4 + net.IPv4len
- }
- case iana.ProtocolIPv6ICMP:
- if ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil {
- attrs |= attrIPAddr
- l += 4 + net.IPv6len
- }
- }
- }
- return
-}
-
-// Len implements the Len method of Extension interface.
-func (ifi *InterfaceInfo) Len(proto int) int {
- _, l := ifi.attrsAndLen(proto)
- return l
-}
-
-// Marshal implements the Marshal method of Extension interface.
-func (ifi *InterfaceInfo) Marshal(proto int) ([]byte, error) {
- attrs, l := ifi.attrsAndLen(proto)
- b := make([]byte, l)
- if err := ifi.marshal(proto, b, attrs, l); err != nil {
- return nil, err
- }
- return b, nil
-}
-
-func (ifi *InterfaceInfo) marshal(proto int, b []byte, attrs, l int) error {
- binary.BigEndian.PutUint16(b[:2], uint16(l))
- b[2], b[3] = classInterfaceInfo, byte(ifi.Type)
- for b = b[4:]; len(b) > 0 && attrs != 0; {
- switch {
- case attrs&attrIfIndex != 0:
- b = ifi.marshalIfIndex(proto, b)
- attrs &^= attrIfIndex
- case attrs&attrIPAddr != 0:
- b = ifi.marshalIPAddr(proto, b)
- attrs &^= attrIPAddr
- case attrs&attrName != 0:
- b = ifi.marshalName(proto, b)
- attrs &^= attrName
- case attrs&attrMTU != 0:
- b = ifi.marshalMTU(proto, b)
- attrs &^= attrMTU
- }
- }
- return nil
-}
-
-func (ifi *InterfaceInfo) marshalIfIndex(proto int, b []byte) []byte {
- binary.BigEndian.PutUint32(b[:4], uint32(ifi.Interface.Index))
- return b[4:]
-}
-
-func (ifi *InterfaceInfo) parseIfIndex(b []byte) ([]byte, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- ifi.Interface.Index = int(binary.BigEndian.Uint32(b[:4]))
- return b[4:], nil
-}
-
-func (ifi *InterfaceInfo) marshalIPAddr(proto int, b []byte) []byte {
- switch proto {
- case iana.ProtocolICMP:
- binary.BigEndian.PutUint16(b[:2], uint16(afiIPv4))
- copy(b[4:4+net.IPv4len], ifi.Addr.IP.To4())
- b = b[4+net.IPv4len:]
- case iana.ProtocolIPv6ICMP:
- binary.BigEndian.PutUint16(b[:2], uint16(afiIPv6))
- copy(b[4:4+net.IPv6len], ifi.Addr.IP.To16())
- b = b[4+net.IPv6len:]
- }
- return b
-}
-
-func (ifi *InterfaceInfo) parseIPAddr(b []byte) ([]byte, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- afi := int(binary.BigEndian.Uint16(b[:2]))
- b = b[4:]
- switch afi {
- case afiIPv4:
- if len(b) < net.IPv4len {
- return nil, errMessageTooShort
- }
- ifi.Addr.IP = make(net.IP, net.IPv4len)
- copy(ifi.Addr.IP, b[:net.IPv4len])
- b = b[net.IPv4len:]
- case afiIPv6:
- if len(b) < net.IPv6len {
- return nil, errMessageTooShort
- }
- ifi.Addr.IP = make(net.IP, net.IPv6len)
- copy(ifi.Addr.IP, b[:net.IPv6len])
- b = b[net.IPv6len:]
- }
- return b, nil
-}
-
-func (ifi *InterfaceInfo) marshalName(proto int, b []byte) []byte {
- l := byte(ifi.nameLen())
- b[0] = l
- copy(b[1:], []byte(ifi.Interface.Name))
- return b[l:]
-}
-
-func (ifi *InterfaceInfo) parseName(b []byte) ([]byte, error) {
- if 4 > len(b) || len(b) < int(b[0]) {
- return nil, errMessageTooShort
- }
- l := int(b[0])
- if l%4 != 0 || 4 > l || l > 64 {
- return nil, errInvalidExtension
- }
- var name [63]byte
- copy(name[:], b[1:l])
- ifi.Interface.Name = strings.Trim(string(name[:]), "\000")
- return b[l:], nil
-}
-
-func (ifi *InterfaceInfo) marshalMTU(proto int, b []byte) []byte {
- binary.BigEndian.PutUint32(b[:4], uint32(ifi.Interface.MTU))
- return b[4:]
-}
-
-func (ifi *InterfaceInfo) parseMTU(b []byte) ([]byte, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- ifi.Interface.MTU = int(binary.BigEndian.Uint32(b[:4]))
- return b[4:], nil
-}
-
-func parseInterfaceInfo(b []byte) (Extension, error) {
- ifi := &InterfaceInfo{
- Class: int(b[2]),
- Type: int(b[3]),
- }
- if ifi.Type&(attrIfIndex|attrName|attrMTU) != 0 {
- ifi.Interface = &net.Interface{}
- }
- if ifi.Type&attrIPAddr != 0 {
- ifi.Addr = &net.IPAddr{}
- }
- attrs := ifi.Type & (attrIfIndex | attrIPAddr | attrName | attrMTU)
- for b = b[4:]; len(b) > 0 && attrs != 0; {
- var err error
- switch {
- case attrs&attrIfIndex != 0:
- b, err = ifi.parseIfIndex(b)
- attrs &^= attrIfIndex
- case attrs&attrIPAddr != 0:
- b, err = ifi.parseIPAddr(b)
- attrs &^= attrIPAddr
- case attrs&attrName != 0:
- b, err = ifi.parseName(b)
- attrs &^= attrName
- case attrs&attrMTU != 0:
- b, err = ifi.parseMTU(b)
- attrs &^= attrMTU
- }
- if err != nil {
- return nil, err
- }
- }
- if ifi.Interface != nil && ifi.Interface.Name != "" && ifi.Addr != nil && ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil {
- ifi.Addr.Zone = ifi.Interface.Name
- }
- return ifi, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4.go
deleted file mode 100644
index ffc66ed4d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import (
- "encoding/binary"
- "net"
- "runtime"
-
- "golang.org/x/net/internal/socket"
- "golang.org/x/net/ipv4"
-)
-
-// freebsdVersion is set in sys_freebsd.go.
-// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
-var freebsdVersion uint32
-
-// ParseIPv4Header parses b as an IPv4 header of ICMP error message
-// invoking packet, which is contained in ICMP error message.
-func ParseIPv4Header(b []byte) (*ipv4.Header, error) {
- if len(b) < ipv4.HeaderLen {
- return nil, errHeaderTooShort
- }
- hdrlen := int(b[0]&0x0f) << 2
- if hdrlen > len(b) {
- return nil, errBufferTooShort
- }
- h := &ipv4.Header{
- Version: int(b[0] >> 4),
- Len: hdrlen,
- TOS: int(b[1]),
- ID: int(binary.BigEndian.Uint16(b[4:6])),
- FragOff: int(binary.BigEndian.Uint16(b[6:8])),
- TTL: int(b[8]),
- Protocol: int(b[9]),
- Checksum: int(binary.BigEndian.Uint16(b[10:12])),
- Src: net.IPv4(b[12], b[13], b[14], b[15]),
- Dst: net.IPv4(b[16], b[17], b[18], b[19]),
- }
- switch runtime.GOOS {
- case "darwin":
- h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
- case "freebsd":
- if freebsdVersion >= 1000000 {
- h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
- } else {
- h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
- }
- default:
- h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
- }
- h.Flags = ipv4.HeaderFlags(h.FragOff&0xe000) >> 13
- h.FragOff = h.FragOff & 0x1fff
- if hdrlen-ipv4.HeaderLen > 0 {
- h.Options = make([]byte, hdrlen-ipv4.HeaderLen)
- copy(h.Options, b[ipv4.HeaderLen:])
- }
- return h, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4_test.go
deleted file mode 100644
index 058953f43..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv4_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import (
- "encoding/binary"
- "net"
- "reflect"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/socket"
- "golang.org/x/net/ipv4"
-)
-
-type ipv4HeaderTest struct {
- wireHeaderFromKernel [ipv4.HeaderLen]byte
- wireHeaderFromTradBSDKernel [ipv4.HeaderLen]byte
- Header *ipv4.Header
-}
-
-var ipv4HeaderLittleEndianTest = ipv4HeaderTest{
- // TODO(mikio): Add platform dependent wire header formats when
- // we support new platforms.
- wireHeaderFromKernel: [ipv4.HeaderLen]byte{
- 0x45, 0x01, 0xbe, 0xef,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderFromTradBSDKernel: [ipv4.HeaderLen]byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- Header: &ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TOS: 1,
- TotalLen: 0xbeef,
- ID: 0xcafe,
- Flags: ipv4.DontFragment,
- FragOff: 1500,
- TTL: 255,
- Protocol: 1,
- Checksum: 0xdead,
- Src: net.IPv4(172, 16, 254, 254),
- Dst: net.IPv4(192, 168, 0, 1),
- },
-}
-
-func TestParseIPv4Header(t *testing.T) {
- tt := &ipv4HeaderLittleEndianTest
- if socket.NativeEndian != binary.LittleEndian {
- t.Skip("no test for non-little endian machine yet")
- }
-
- var wh []byte
- switch runtime.GOOS {
- case "darwin":
- wh = tt.wireHeaderFromTradBSDKernel[:]
- case "freebsd":
- if freebsdVersion >= 1000000 {
- wh = tt.wireHeaderFromKernel[:]
- } else {
- wh = tt.wireHeaderFromTradBSDKernel[:]
- }
- default:
- wh = tt.wireHeaderFromKernel[:]
- }
- h, err := ParseIPv4Header(wh)
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(h, tt.Header) {
- t.Fatalf("got %#v; want %#v", h, tt.Header)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv6.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv6.go
deleted file mode 100644
index 2e8cfeb13..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ipv6.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 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 file.
-
-package icmp
-
-import (
- "net"
-
- "golang.org/x/net/internal/iana"
-)
-
-const ipv6PseudoHeaderLen = 2*net.IPv6len + 8
-
-// IPv6PseudoHeader returns an IPv6 pseudo header for checksum
-// calculation.
-func IPv6PseudoHeader(src, dst net.IP) []byte {
- b := make([]byte, ipv6PseudoHeaderLen)
- copy(b, src.To16())
- copy(b[net.IPv6len:], dst.To16())
- b[len(b)-1] = byte(iana.ProtocolIPv6ICMP)
- return b
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_posix.go
deleted file mode 100644
index 7fac4f965..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_posix.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package icmp
-
-import (
- "net"
- "os"
- "runtime"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-const sysIP_STRIPHDR = 0x17 // for now only darwin supports this option
-
-// ListenPacket listens for incoming ICMP packets addressed to
-// address. See net.Dial for the syntax of address.
-//
-// For non-privileged datagram-oriented ICMP endpoints, network must
-// be "udp4" or "udp6". The endpoint allows to read, write a few
-// limited ICMP messages such as echo request and echo reply.
-// Currently only Darwin and Linux support this.
-//
-// Examples:
-// ListenPacket("udp4", "192.168.0.1")
-// ListenPacket("udp4", "0.0.0.0")
-// ListenPacket("udp6", "fe80::1%en0")
-// ListenPacket("udp6", "::")
-//
-// For privileged raw ICMP endpoints, network must be "ip4" or "ip6"
-// followed by a colon and an ICMP protocol number or name.
-//
-// Examples:
-// ListenPacket("ip4:icmp", "192.168.0.1")
-// ListenPacket("ip4:1", "0.0.0.0")
-// ListenPacket("ip6:ipv6-icmp", "fe80::1%en0")
-// ListenPacket("ip6:58", "::")
-func ListenPacket(network, address string) (*PacketConn, error) {
- var family, proto int
- switch network {
- case "udp4":
- family, proto = syscall.AF_INET, iana.ProtocolICMP
- case "udp6":
- family, proto = syscall.AF_INET6, iana.ProtocolIPv6ICMP
- default:
- i := last(network, ':')
- switch network[:i] {
- case "ip4":
- proto = iana.ProtocolICMP
- case "ip6":
- proto = iana.ProtocolIPv6ICMP
- }
- }
- var cerr error
- var c net.PacketConn
- switch family {
- case syscall.AF_INET, syscall.AF_INET6:
- s, err := syscall.Socket(family, syscall.SOCK_DGRAM, proto)
- if err != nil {
- return nil, os.NewSyscallError("socket", err)
- }
- if runtime.GOOS == "darwin" && family == syscall.AF_INET {
- if err := syscall.SetsockoptInt(s, iana.ProtocolIP, sysIP_STRIPHDR, 1); err != nil {
- syscall.Close(s)
- return nil, os.NewSyscallError("setsockopt", err)
- }
- }
- sa, err := sockaddr(family, address)
- if err != nil {
- syscall.Close(s)
- return nil, err
- }
- if err := syscall.Bind(s, sa); err != nil {
- syscall.Close(s)
- return nil, os.NewSyscallError("bind", err)
- }
- f := os.NewFile(uintptr(s), "datagram-oriented icmp")
- c, cerr = net.FilePacketConn(f)
- f.Close()
- default:
- c, cerr = net.ListenPacket(network, address)
- }
- if cerr != nil {
- return nil, cerr
- }
- switch proto {
- case iana.ProtocolICMP:
- return &PacketConn{c: c, p4: ipv4.NewPacketConn(c)}, nil
- case iana.ProtocolIPv6ICMP:
- return &PacketConn{c: c, p6: ipv6.NewPacketConn(c)}, nil
- default:
- return &PacketConn{c: c}, nil
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_stub.go
deleted file mode 100644
index 668728d17..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/listen_stub.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build nacl plan9
-
-package icmp
-
-// ListenPacket listens for incoming ICMP packets addressed to
-// address. See net.Dial for the syntax of address.
-//
-// For non-privileged datagram-oriented ICMP endpoints, network must
-// be "udp4" or "udp6". The endpoint allows to read, write a few
-// limited ICMP messages such as echo request and echo reply.
-// Currently only Darwin and Linux support this.
-//
-// Examples:
-// ListenPacket("udp4", "192.168.0.1")
-// ListenPacket("udp4", "0.0.0.0")
-// ListenPacket("udp6", "fe80::1%en0")
-// ListenPacket("udp6", "::")
-//
-// For privileged raw ICMP endpoints, network must be "ip4" or "ip6"
-// followed by a colon and an ICMP protocol number or name.
-//
-// Examples:
-// ListenPacket("ip4:icmp", "192.168.0.1")
-// ListenPacket("ip4:1", "0.0.0.0")
-// ListenPacket("ip6:ipv6-icmp", "fe80::1%en0")
-// ListenPacket("ip6:58", "::")
-func ListenPacket(network, address string) (*PacketConn, error) {
- return nil, errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message.go
deleted file mode 100644
index 81140b0df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package icmp provides basic functions for the manipulation of
-// messages used in the Internet Control Message Protocols,
-// ICMPv4 and ICMPv6.
-//
-// ICMPv4 and ICMPv6 are defined in RFC 792 and RFC 4443.
-// Multi-part message support for ICMP is defined in RFC 4884.
-// ICMP extensions for MPLS are defined in RFC 4950.
-// ICMP extensions for interface and next-hop identification are
-// defined in RFC 5837.
-package icmp // import "golang.org/x/net/icmp"
-
-import (
- "encoding/binary"
- "errors"
- "net"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-// BUG(mikio): This package is not implemented on NaCl and Plan 9.
-
-var (
- errMessageTooShort = errors.New("message too short")
- errHeaderTooShort = errors.New("header too short")
- errBufferTooShort = errors.New("buffer too short")
- errOpNoSupport = errors.New("operation not supported")
- errNoExtension = errors.New("no extension")
- errInvalidExtension = errors.New("invalid extension")
-)
-
-func checksum(b []byte) uint16 {
- csumcv := len(b) - 1 // checksum coverage
- s := uint32(0)
- for i := 0; i < csumcv; i += 2 {
- s += uint32(b[i+1])<<8 | uint32(b[i])
- }
- if csumcv&1 == 0 {
- s += uint32(b[csumcv])
- }
- s = s>>16 + s&0xffff
- s = s + s>>16
- return ^uint16(s)
-}
-
-// A Type represents an ICMP message type.
-type Type interface {
- Protocol() int
-}
-
-// A Message represents an ICMP message.
-type Message struct {
- Type Type // type, either ipv4.ICMPType or ipv6.ICMPType
- Code int // code
- Checksum int // checksum
- Body MessageBody // body
-}
-
-// Marshal returns the binary encoding of the ICMP message m.
-//
-// For an ICMPv4 message, the returned message always contains the
-// calculated checksum field.
-//
-// For an ICMPv6 message, the returned message contains the calculated
-// checksum field when psh is not nil, otherwise the kernel will
-// compute the checksum field during the message transmission.
-// When psh is not nil, it must be the pseudo header for IPv6.
-func (m *Message) Marshal(psh []byte) ([]byte, error) {
- var mtype int
- switch typ := m.Type.(type) {
- case ipv4.ICMPType:
- mtype = int(typ)
- case ipv6.ICMPType:
- mtype = int(typ)
- default:
- return nil, syscall.EINVAL
- }
- b := []byte{byte(mtype), byte(m.Code), 0, 0}
- if m.Type.Protocol() == iana.ProtocolIPv6ICMP && psh != nil {
- b = append(psh, b...)
- }
- if m.Body != nil && m.Body.Len(m.Type.Protocol()) != 0 {
- mb, err := m.Body.Marshal(m.Type.Protocol())
- if err != nil {
- return nil, err
- }
- b = append(b, mb...)
- }
- if m.Type.Protocol() == iana.ProtocolIPv6ICMP {
- if psh == nil { // cannot calculate checksum here
- return b, nil
- }
- off, l := 2*net.IPv6len, len(b)-len(psh)
- binary.BigEndian.PutUint32(b[off:off+4], uint32(l))
- }
- s := checksum(b)
- // Place checksum back in header; using ^= avoids the
- // assumption the checksum bytes are zero.
- b[len(psh)+2] ^= byte(s)
- b[len(psh)+3] ^= byte(s >> 8)
- return b[len(psh):], nil
-}
-
-var parseFns = map[Type]func(int, []byte) (MessageBody, error){
- ipv4.ICMPTypeDestinationUnreachable: parseDstUnreach,
- ipv4.ICMPTypeTimeExceeded: parseTimeExceeded,
- ipv4.ICMPTypeParameterProblem: parseParamProb,
-
- ipv4.ICMPTypeEcho: parseEcho,
- ipv4.ICMPTypeEchoReply: parseEcho,
-
- ipv6.ICMPTypeDestinationUnreachable: parseDstUnreach,
- ipv6.ICMPTypePacketTooBig: parsePacketTooBig,
- ipv6.ICMPTypeTimeExceeded: parseTimeExceeded,
- ipv6.ICMPTypeParameterProblem: parseParamProb,
-
- ipv6.ICMPTypeEchoRequest: parseEcho,
- ipv6.ICMPTypeEchoReply: parseEcho,
-}
-
-// ParseMessage parses b as an ICMP message.
-// Proto must be either the ICMPv4 or ICMPv6 protocol number.
-func ParseMessage(proto int, b []byte) (*Message, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- var err error
- m := &Message{Code: int(b[1]), Checksum: int(binary.BigEndian.Uint16(b[2:4]))}
- switch proto {
- case iana.ProtocolICMP:
- m.Type = ipv4.ICMPType(b[0])
- case iana.ProtocolIPv6ICMP:
- m.Type = ipv6.ICMPType(b[0])
- default:
- return nil, syscall.EINVAL
- }
- if fn, ok := parseFns[m.Type]; !ok {
- m.Body, err = parseDefaultMessageBody(proto, b[4:])
- } else {
- m.Body, err = fn(proto, b[4:])
- }
- if err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message_test.go
deleted file mode 100644
index 5d2605f8d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/message_test.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp_test
-
-import (
- "net"
- "reflect"
- "testing"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-var marshalAndParseMessageForIPv4Tests = []icmp.Message{
- {
- Type: ipv4.ICMPTypeDestinationUnreachable, Code: 15,
- Body: &icmp.DstUnreach{
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv4.ICMPTypeTimeExceeded, Code: 1,
- Body: &icmp.TimeExceeded{
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv4.ICMPTypeParameterProblem, Code: 2,
- Body: &icmp.ParamProb{
- Pointer: 8,
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: 1, Seq: 2,
- Data: []byte("HELLO-R-U-THERE"),
- },
- },
- {
- Type: ipv4.ICMPTypePhoturis,
- Body: &icmp.DefaultMessageBody{
- Data: []byte{0x80, 0x40, 0x20, 0x10},
- },
- },
-}
-
-func TestMarshalAndParseMessageForIPv4(t *testing.T) {
- for i, tt := range marshalAndParseMessageForIPv4Tests {
- b, err := tt.Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- m, err := icmp.ParseMessage(iana.ProtocolICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- if m.Type != tt.Type || m.Code != tt.Code {
- t.Errorf("#%v: got %v; want %v", i, m, &tt)
- }
- if !reflect.DeepEqual(m.Body, tt.Body) {
- t.Errorf("#%v: got %v; want %v", i, m.Body, tt.Body)
- }
- }
-}
-
-var marshalAndParseMessageForIPv6Tests = []icmp.Message{
- {
- Type: ipv6.ICMPTypeDestinationUnreachable, Code: 6,
- Body: &icmp.DstUnreach{
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv6.ICMPTypePacketTooBig, Code: 0,
- Body: &icmp.PacketTooBig{
- MTU: 1<<16 - 1,
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv6.ICMPTypeTimeExceeded, Code: 1,
- Body: &icmp.TimeExceeded{
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv6.ICMPTypeParameterProblem, Code: 2,
- Body: &icmp.ParamProb{
- Pointer: 8,
- Data: []byte("ERROR-INVOKING-PACKET"),
- },
- },
- {
- Type: ipv6.ICMPTypeEchoRequest, Code: 0,
- Body: &icmp.Echo{
- ID: 1, Seq: 2,
- Data: []byte("HELLO-R-U-THERE"),
- },
- },
- {
- Type: ipv6.ICMPTypeDuplicateAddressConfirmation,
- Body: &icmp.DefaultMessageBody{
- Data: []byte{0x80, 0x40, 0x20, 0x10},
- },
- },
-}
-
-func TestMarshalAndParseMessageForIPv6(t *testing.T) {
- pshicmp := icmp.IPv6PseudoHeader(net.ParseIP("fe80::1"), net.ParseIP("ff02::1"))
- for i, tt := range marshalAndParseMessageForIPv6Tests {
- for _, psh := range [][]byte{pshicmp, nil} {
- b, err := tt.Marshal(psh)
- if err != nil {
- t.Fatal(err)
- }
- m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- if m.Type != tt.Type || m.Code != tt.Code {
- t.Errorf("#%v: got %v; want %v", i, m, &tt)
- }
- if !reflect.DeepEqual(m.Body, tt.Body) {
- t.Errorf("#%v: got %v; want %v", i, m.Body, tt.Body)
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/messagebody.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/messagebody.go
deleted file mode 100644
index 2463730ae..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/messagebody.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012 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 file.
-
-package icmp
-
-// A MessageBody represents an ICMP message body.
-type MessageBody interface {
- // Len returns the length of ICMP message body.
- // Proto must be either the ICMPv4 or ICMPv6 protocol number.
- Len(proto int) int
-
- // Marshal returns the binary encoding of ICMP message body.
- // Proto must be either the ICMPv4 or ICMPv6 protocol number.
- Marshal(proto int) ([]byte, error)
-}
-
-// A DefaultMessageBody represents the default message body.
-type DefaultMessageBody struct {
- Data []byte // data
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *DefaultMessageBody) Len(proto int) int {
- if p == nil {
- return 0
- }
- return len(p.Data)
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *DefaultMessageBody) Marshal(proto int) ([]byte, error) {
- return p.Data, nil
-}
-
-// parseDefaultMessageBody parses b as an ICMP message body.
-func parseDefaultMessageBody(proto int, b []byte) (MessageBody, error) {
- p := &DefaultMessageBody{Data: make([]byte, len(b))}
- copy(p.Data, b)
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/mpls.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/mpls.go
deleted file mode 100644
index c31491748..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/mpls.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp
-
-import "encoding/binary"
-
-// A MPLSLabel represents a MPLS label stack entry.
-type MPLSLabel struct {
- Label int // label value
- TC int // traffic class; formerly experimental use
- S bool // bottom of stack
- TTL int // time to live
-}
-
-const (
- classMPLSLabelStack = 1
- typeIncomingMPLSLabelStack = 1
-)
-
-// A MPLSLabelStack represents a MPLS label stack.
-type MPLSLabelStack struct {
- Class int // extension object class number
- Type int // extension object sub-type
- Labels []MPLSLabel
-}
-
-// Len implements the Len method of Extension interface.
-func (ls *MPLSLabelStack) Len(proto int) int {
- return 4 + (4 * len(ls.Labels))
-}
-
-// Marshal implements the Marshal method of Extension interface.
-func (ls *MPLSLabelStack) Marshal(proto int) ([]byte, error) {
- b := make([]byte, ls.Len(proto))
- if err := ls.marshal(proto, b); err != nil {
- return nil, err
- }
- return b, nil
-}
-
-func (ls *MPLSLabelStack) marshal(proto int, b []byte) error {
- l := ls.Len(proto)
- binary.BigEndian.PutUint16(b[:2], uint16(l))
- b[2], b[3] = classMPLSLabelStack, typeIncomingMPLSLabelStack
- off := 4
- for _, ll := range ls.Labels {
- b[off], b[off+1], b[off+2] = byte(ll.Label>>12), byte(ll.Label>>4&0xff), byte(ll.Label<<4&0xf0)
- b[off+2] |= byte(ll.TC << 1 & 0x0e)
- if ll.S {
- b[off+2] |= 0x1
- }
- b[off+3] = byte(ll.TTL)
- off += 4
- }
- return nil
-}
-
-func parseMPLSLabelStack(b []byte) (Extension, error) {
- ls := &MPLSLabelStack{
- Class: int(b[2]),
- Type: int(b[3]),
- }
- for b = b[4:]; len(b) >= 4; b = b[4:] {
- ll := MPLSLabel{
- Label: int(b[0])<<12 | int(b[1])<<4 | int(b[2])>>4,
- TC: int(b[2]&0x0e) >> 1,
- TTL: int(b[3]),
- }
- if b[2]&0x1 != 0 {
- ll.S = true
- }
- ls.Labels = append(ls.Labels, ll)
- }
- return ls, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart.go
deleted file mode 100644
index f27135660..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp
-
-import "golang.org/x/net/internal/iana"
-
-// multipartMessageBodyDataLen takes b as an original datagram and
-// exts as extensions, and returns a required length for message body
-// and a required length for a padded original datagram in wire
-// format.
-func multipartMessageBodyDataLen(proto int, b []byte, exts []Extension) (bodyLen, dataLen int) {
- for _, ext := range exts {
- bodyLen += ext.Len(proto)
- }
- if bodyLen > 0 {
- dataLen = multipartMessageOrigDatagramLen(proto, b)
- bodyLen += 4 // length of extension header
- } else {
- dataLen = len(b)
- }
- bodyLen += dataLen
- return bodyLen, dataLen
-}
-
-// multipartMessageOrigDatagramLen takes b as an original datagram,
-// and returns a required length for a padded orignal datagram in wire
-// format.
-func multipartMessageOrigDatagramLen(proto int, b []byte) int {
- roundup := func(b []byte, align int) int {
- // According to RFC 4884, the padded original datagram
- // field must contain at least 128 octets.
- if len(b) < 128 {
- return 128
- }
- r := len(b)
- return (r + align - 1) & ^(align - 1)
- }
- switch proto {
- case iana.ProtocolICMP:
- return roundup(b, 4)
- case iana.ProtocolIPv6ICMP:
- return roundup(b, 8)
- default:
- return len(b)
- }
-}
-
-// marshalMultipartMessageBody takes data as an original datagram and
-// exts as extesnsions, and returns a binary encoding of message body.
-// It can be used for non-multipart message bodies when exts is nil.
-func marshalMultipartMessageBody(proto int, data []byte, exts []Extension) ([]byte, error) {
- bodyLen, dataLen := multipartMessageBodyDataLen(proto, data, exts)
- b := make([]byte, 4+bodyLen)
- copy(b[4:], data)
- off := dataLen + 4
- if len(exts) > 0 {
- b[dataLen+4] = byte(extensionVersion << 4)
- off += 4 // length of object header
- for _, ext := range exts {
- switch ext := ext.(type) {
- case *MPLSLabelStack:
- if err := ext.marshal(proto, b[off:]); err != nil {
- return nil, err
- }
- off += ext.Len(proto)
- case *InterfaceInfo:
- attrs, l := ext.attrsAndLen(proto)
- if err := ext.marshal(proto, b[off:], attrs, l); err != nil {
- return nil, err
- }
- off += ext.Len(proto)
- }
- }
- s := checksum(b[dataLen+4:])
- b[dataLen+4+2] ^= byte(s)
- b[dataLen+4+3] ^= byte(s >> 8)
- switch proto {
- case iana.ProtocolICMP:
- b[1] = byte(dataLen / 4)
- case iana.ProtocolIPv6ICMP:
- b[0] = byte(dataLen / 8)
- }
- }
- return b, nil
-}
-
-// parseMultipartMessageBody parses b as either a non-multipart
-// message body or a multipart message body.
-func parseMultipartMessageBody(proto int, b []byte) ([]byte, []Extension, error) {
- var l int
- switch proto {
- case iana.ProtocolICMP:
- l = 4 * int(b[1])
- case iana.ProtocolIPv6ICMP:
- l = 8 * int(b[0])
- }
- if len(b) == 4 {
- return nil, nil, nil
- }
- exts, l, err := parseExtensions(b[4:], l)
- if err != nil {
- l = len(b) - 4
- }
- data := make([]byte, l)
- copy(data, b[4:])
- return data, exts, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart_test.go
deleted file mode 100644
index 966ccb8da..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/multipart_test.go
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright 2015 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 file.
-
-package icmp_test
-
-import (
- "fmt"
- "net"
- "reflect"
- "testing"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-var marshalAndParseMultipartMessageForIPv4Tests = []icmp.Message{
- {
- Type: ipv4.ICMPTypeDestinationUnreachable, Code: 15,
- Body: &icmp.DstUnreach{
- Data: []byte("ERROR-INVOKING-PACKET"),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{
- Class: 1,
- Type: 1,
- Labels: []icmp.MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.IPv4(192, 168, 0, 1).To4(),
- },
- },
- },
- },
- },
- {
- Type: ipv4.ICMPTypeTimeExceeded, Code: 1,
- Body: &icmp.TimeExceeded{
- Data: []byte("ERROR-INVOKING-PACKET"),
- Extensions: []icmp.Extension{
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.IPv4(192, 168, 0, 1).To4(),
- },
- },
- &icmp.MPLSLabelStack{
- Class: 1,
- Type: 1,
- Labels: []icmp.MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- },
- },
- },
- {
- Type: ipv4.ICMPTypeParameterProblem, Code: 2,
- Body: &icmp.ParamProb{
- Pointer: 8,
- Data: []byte("ERROR-INVOKING-PACKET"),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{
- Class: 1,
- Type: 1,
- Labels: []icmp.MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.IPv4(192, 168, 0, 1).To4(),
- },
- },
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x2f,
- Interface: &net.Interface{
- Index: 16,
- Name: "en102",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.IPv4(192, 168, 0, 2).To4(),
- },
- },
- },
- },
- },
-}
-
-func TestMarshalAndParseMultipartMessageForIPv4(t *testing.T) {
- for i, tt := range marshalAndParseMultipartMessageForIPv4Tests {
- b, err := tt.Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- if b[5] != 32 {
- t.Errorf("#%v: got %v; want 32", i, b[5])
- }
- m, err := icmp.ParseMessage(iana.ProtocolICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- if m.Type != tt.Type || m.Code != tt.Code {
- t.Errorf("#%v: got %v; want %v", i, m, &tt)
- }
- switch m.Type {
- case ipv4.ICMPTypeDestinationUnreachable:
- got, want := m.Body.(*icmp.DstUnreach), tt.Body.(*icmp.DstUnreach)
- if !reflect.DeepEqual(got.Extensions, want.Extensions) {
- t.Error(dumpExtensions(i, got.Extensions, want.Extensions))
- }
- if len(got.Data) != 128 {
- t.Errorf("#%v: got %v; want 128", i, len(got.Data))
- }
- case ipv4.ICMPTypeTimeExceeded:
- got, want := m.Body.(*icmp.TimeExceeded), tt.Body.(*icmp.TimeExceeded)
- if !reflect.DeepEqual(got.Extensions, want.Extensions) {
- t.Error(dumpExtensions(i, got.Extensions, want.Extensions))
- }
- if len(got.Data) != 128 {
- t.Errorf("#%v: got %v; want 128", i, len(got.Data))
- }
- case ipv4.ICMPTypeParameterProblem:
- got, want := m.Body.(*icmp.ParamProb), tt.Body.(*icmp.ParamProb)
- if !reflect.DeepEqual(got.Extensions, want.Extensions) {
- t.Error(dumpExtensions(i, got.Extensions, want.Extensions))
- }
- if len(got.Data) != 128 {
- t.Errorf("#%v: got %v; want 128", i, len(got.Data))
- }
- }
- }
-}
-
-var marshalAndParseMultipartMessageForIPv6Tests = []icmp.Message{
- {
- Type: ipv6.ICMPTypeDestinationUnreachable, Code: 6,
- Body: &icmp.DstUnreach{
- Data: []byte("ERROR-INVOKING-PACKET"),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{
- Class: 1,
- Type: 1,
- Labels: []icmp.MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.ParseIP("fe80::1"),
- Zone: "en101",
- },
- },
- },
- },
- },
- {
- Type: ipv6.ICMPTypeTimeExceeded, Code: 1,
- Body: &icmp.TimeExceeded{
- Data: []byte("ERROR-INVOKING-PACKET"),
- Extensions: []icmp.Extension{
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x0f,
- Interface: &net.Interface{
- Index: 15,
- Name: "en101",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.ParseIP("fe80::1"),
- Zone: "en101",
- },
- },
- &icmp.MPLSLabelStack{
- Class: 1,
- Type: 1,
- Labels: []icmp.MPLSLabel{
- {
- Label: 16014,
- TC: 0x4,
- S: true,
- TTL: 255,
- },
- },
- },
- &icmp.InterfaceInfo{
- Class: 2,
- Type: 0x2f,
- Interface: &net.Interface{
- Index: 16,
- Name: "en102",
- MTU: 8192,
- },
- Addr: &net.IPAddr{
- IP: net.ParseIP("fe80::1"),
- Zone: "en102",
- },
- },
- },
- },
- },
-}
-
-func TestMarshalAndParseMultipartMessageForIPv6(t *testing.T) {
- pshicmp := icmp.IPv6PseudoHeader(net.ParseIP("fe80::1"), net.ParseIP("ff02::1"))
- for i, tt := range marshalAndParseMultipartMessageForIPv6Tests {
- for _, psh := range [][]byte{pshicmp, nil} {
- b, err := tt.Marshal(psh)
- if err != nil {
- t.Fatal(err)
- }
- if b[4] != 16 {
- t.Errorf("#%v: got %v; want 16", i, b[4])
- }
- m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- if m.Type != tt.Type || m.Code != tt.Code {
- t.Errorf("#%v: got %v; want %v", i, m, &tt)
- }
- switch m.Type {
- case ipv6.ICMPTypeDestinationUnreachable:
- got, want := m.Body.(*icmp.DstUnreach), tt.Body.(*icmp.DstUnreach)
- if !reflect.DeepEqual(got.Extensions, want.Extensions) {
- t.Error(dumpExtensions(i, got.Extensions, want.Extensions))
- }
- if len(got.Data) != 128 {
- t.Errorf("#%v: got %v; want 128", i, len(got.Data))
- }
- case ipv6.ICMPTypeTimeExceeded:
- got, want := m.Body.(*icmp.TimeExceeded), tt.Body.(*icmp.TimeExceeded)
- if !reflect.DeepEqual(got.Extensions, want.Extensions) {
- t.Error(dumpExtensions(i, got.Extensions, want.Extensions))
- }
- if len(got.Data) != 128 {
- t.Errorf("#%v: got %v; want 128", i, len(got.Data))
- }
- }
- }
- }
-}
-
-func dumpExtensions(i int, gotExts, wantExts []icmp.Extension) string {
- var s string
- for j, got := range gotExts {
- switch got := got.(type) {
- case *icmp.MPLSLabelStack:
- want := wantExts[j].(*icmp.MPLSLabelStack)
- if !reflect.DeepEqual(got, want) {
- s += fmt.Sprintf("#%v/%v: got %#v; want %#v\n", i, j, got, want)
- }
- case *icmp.InterfaceInfo:
- want := wantExts[j].(*icmp.InterfaceInfo)
- if !reflect.DeepEqual(got, want) {
- s += fmt.Sprintf("#%v/%v: got %#v, %#v, %#v; want %#v, %#v, %#v\n", i, j, got, got.Interface, got.Addr, want, want.Interface, want.Addr)
- }
- }
- }
- return s[:len(s)-1]
-}
-
-var multipartMessageBodyLenTests = []struct {
- proto int
- in icmp.MessageBody
- out int
-}{
- {
- iana.ProtocolICMP,
- &icmp.DstUnreach{
- Data: make([]byte, ipv4.HeaderLen),
- },
- 4 + ipv4.HeaderLen, // unused and original datagram
- },
- {
- iana.ProtocolICMP,
- &icmp.TimeExceeded{
- Data: make([]byte, ipv4.HeaderLen),
- },
- 4 + ipv4.HeaderLen, // unused and original datagram
- },
- {
- iana.ProtocolICMP,
- &icmp.ParamProb{
- Data: make([]byte, ipv4.HeaderLen),
- },
- 4 + ipv4.HeaderLen, // [pointer, unused] and original datagram
- },
-
- {
- iana.ProtocolICMP,
- &icmp.ParamProb{
- Data: make([]byte, ipv4.HeaderLen),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 128, // [pointer, length, unused], extension header, object header, object payload, original datagram
- },
- {
- iana.ProtocolICMP,
- &icmp.ParamProb{
- Data: make([]byte, 128),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 128, // [pointer, length, unused], extension header, object header, object payload and original datagram
- },
- {
- iana.ProtocolICMP,
- &icmp.ParamProb{
- Data: make([]byte, 129),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 132, // [pointer, length, unused], extension header, object header, object payload and original datagram
- },
-
- {
- iana.ProtocolIPv6ICMP,
- &icmp.DstUnreach{
- Data: make([]byte, ipv6.HeaderLen),
- },
- 4 + ipv6.HeaderLen, // unused and original datagram
- },
- {
- iana.ProtocolIPv6ICMP,
- &icmp.PacketTooBig{
- Data: make([]byte, ipv6.HeaderLen),
- },
- 4 + ipv6.HeaderLen, // mtu and original datagram
- },
- {
- iana.ProtocolIPv6ICMP,
- &icmp.TimeExceeded{
- Data: make([]byte, ipv6.HeaderLen),
- },
- 4 + ipv6.HeaderLen, // unused and original datagram
- },
- {
- iana.ProtocolIPv6ICMP,
- &icmp.ParamProb{
- Data: make([]byte, ipv6.HeaderLen),
- },
- 4 + ipv6.HeaderLen, // pointer and original datagram
- },
-
- {
- iana.ProtocolIPv6ICMP,
- &icmp.DstUnreach{
- Data: make([]byte, 127),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 128, // [length, unused], extension header, object header, object payload and original datagram
- },
- {
- iana.ProtocolIPv6ICMP,
- &icmp.DstUnreach{
- Data: make([]byte, 128),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 128, // [length, unused], extension header, object header, object payload and original datagram
- },
- {
- iana.ProtocolIPv6ICMP,
- &icmp.DstUnreach{
- Data: make([]byte, 129),
- Extensions: []icmp.Extension{
- &icmp.MPLSLabelStack{},
- },
- },
- 4 + 4 + 4 + 0 + 136, // [length, unused], extension header, object header, object payload and original datagram
- },
-}
-
-func TestMultipartMessageBodyLen(t *testing.T) {
- for i, tt := range multipartMessageBodyLenTests {
- if out := tt.in.Len(tt.proto); out != tt.out {
- t.Errorf("#%d: got %d; want %d", i, out, tt.out)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/packettoobig.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/packettoobig.go
deleted file mode 100644
index a1c9df7bf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/packettoobig.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import "encoding/binary"
-
-// A PacketTooBig represents an ICMP packet too big message body.
-type PacketTooBig struct {
- MTU int // maximum transmission unit of the nexthop link
- Data []byte // data, known as original datagram field
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *PacketTooBig) Len(proto int) int {
- if p == nil {
- return 0
- }
- return 4 + len(p.Data)
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *PacketTooBig) Marshal(proto int) ([]byte, error) {
- b := make([]byte, 4+len(p.Data))
- binary.BigEndian.PutUint32(b[:4], uint32(p.MTU))
- copy(b[4:], p.Data)
- return b, nil
-}
-
-// parsePacketTooBig parses b as an ICMP packet too big message body.
-func parsePacketTooBig(proto int, b []byte) (MessageBody, error) {
- bodyLen := len(b)
- if bodyLen < 4 {
- return nil, errMessageTooShort
- }
- p := &PacketTooBig{MTU: int(binary.BigEndian.Uint32(b[:4]))}
- if bodyLen > 4 {
- p.Data = make([]byte, bodyLen-4)
- copy(p.Data, b[4:])
- }
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/paramprob.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/paramprob.go
deleted file mode 100644
index 0a2548daa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/paramprob.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import (
- "encoding/binary"
- "golang.org/x/net/internal/iana"
-)
-
-// A ParamProb represents an ICMP parameter problem message body.
-type ParamProb struct {
- Pointer uintptr // offset within the data where the error was detected
- Data []byte // data, known as original datagram field
- Extensions []Extension // extensions
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *ParamProb) Len(proto int) int {
- if p == nil {
- return 0
- }
- l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions)
- return 4 + l
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *ParamProb) Marshal(proto int) ([]byte, error) {
- if proto == iana.ProtocolIPv6ICMP {
- b := make([]byte, p.Len(proto))
- binary.BigEndian.PutUint32(b[:4], uint32(p.Pointer))
- copy(b[4:], p.Data)
- return b, nil
- }
- b, err := marshalMultipartMessageBody(proto, p.Data, p.Extensions)
- if err != nil {
- return nil, err
- }
- b[0] = byte(p.Pointer)
- return b, nil
-}
-
-// parseParamProb parses b as an ICMP parameter problem message body.
-func parseParamProb(proto int, b []byte) (MessageBody, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- p := &ParamProb{}
- if proto == iana.ProtocolIPv6ICMP {
- p.Pointer = uintptr(binary.BigEndian.Uint32(b[:4]))
- p.Data = make([]byte, len(b)-4)
- copy(p.Data, b[4:])
- return p, nil
- }
- p.Pointer = uintptr(b[0])
- var err error
- p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b)
- if err != nil {
- return nil, err
- }
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ping_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ping_test.go
deleted file mode 100644
index 3171dad11..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/ping_test.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp_test
-
-import (
- "errors"
- "fmt"
- "net"
- "os"
- "runtime"
- "sync"
- "testing"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
-)
-
-func googleAddr(c *icmp.PacketConn, protocol int) (net.Addr, error) {
- const host = "www.google.com"
- ips, err := net.LookupIP(host)
- if err != nil {
- return nil, err
- }
- netaddr := func(ip net.IP) (net.Addr, error) {
- switch c.LocalAddr().(type) {
- case *net.UDPAddr:
- return &net.UDPAddr{IP: ip}, nil
- case *net.IPAddr:
- return &net.IPAddr{IP: ip}, nil
- default:
- return nil, errors.New("neither UDPAddr nor IPAddr")
- }
- }
- for _, ip := range ips {
- switch protocol {
- case iana.ProtocolICMP:
- if ip.To4() != nil {
- return netaddr(ip)
- }
- case iana.ProtocolIPv6ICMP:
- if ip.To16() != nil && ip.To4() == nil {
- return netaddr(ip)
- }
- }
- }
- return nil, errors.New("no A or AAAA record")
-}
-
-type pingTest struct {
- network, address string
- protocol int
- mtype icmp.Type
-}
-
-var nonPrivilegedPingTests = []pingTest{
- {"udp4", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho},
-
- {"udp6", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest},
-}
-
-func TestNonPrivilegedPing(t *testing.T) {
- if testing.Short() {
- t.Skip("avoid external network")
- }
- switch runtime.GOOS {
- case "darwin":
- case "linux":
- t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state")
- default:
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- for i, tt := range nonPrivilegedPingTests {
- if err := doPing(tt, i); err != nil {
- t.Error(err)
- }
- }
-}
-
-var privilegedPingTests = []pingTest{
- {"ip4:icmp", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho},
-
- {"ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest},
-}
-
-func TestPrivilegedPing(t *testing.T) {
- if testing.Short() {
- t.Skip("avoid external network")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- for i, tt := range privilegedPingTests {
- if err := doPing(tt, i); err != nil {
- t.Error(err)
- }
- }
-}
-
-func doPing(tt pingTest, seq int) error {
- c, err := icmp.ListenPacket(tt.network, tt.address)
- if err != nil {
- return err
- }
- defer c.Close()
-
- dst, err := googleAddr(c, tt.protocol)
- if err != nil {
- return err
- }
-
- if tt.network != "udp6" && tt.protocol == iana.ProtocolIPv6ICMP {
- var f ipv6.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv6.ICMPTypeDestinationUnreachable)
- f.Accept(ipv6.ICMPTypePacketTooBig)
- f.Accept(ipv6.ICMPTypeTimeExceeded)
- f.Accept(ipv6.ICMPTypeParameterProblem)
- f.Accept(ipv6.ICMPTypeEchoReply)
- if err := c.IPv6PacketConn().SetICMPFilter(&f); err != nil {
- return err
- }
- }
-
- wm := icmp.Message{
- Type: tt.mtype, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: 1 << uint(seq),
- Data: []byte("HELLO-R-U-THERE"),
- },
- }
- wb, err := wm.Marshal(nil)
- if err != nil {
- return err
- }
- if n, err := c.WriteTo(wb, dst); err != nil {
- return err
- } else if n != len(wb) {
- return fmt.Errorf("got %v; want %v", n, len(wb))
- }
-
- rb := make([]byte, 1500)
- if err := c.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil {
- return err
- }
- n, peer, err := c.ReadFrom(rb)
- if err != nil {
- return err
- }
- rm, err := icmp.ParseMessage(tt.protocol, rb[:n])
- if err != nil {
- return err
- }
- switch rm.Type {
- case ipv4.ICMPTypeEchoReply, ipv6.ICMPTypeEchoReply:
- return nil
- default:
- return fmt.Errorf("got %+v from %v; want echo reply", rm, peer)
- }
-}
-
-func TestConcurrentNonPrivilegedListenPacket(t *testing.T) {
- if testing.Short() {
- t.Skip("avoid external network")
- }
- switch runtime.GOOS {
- case "darwin":
- case "linux":
- t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state")
- default:
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- network, address := "udp4", "127.0.0.1"
- if !nettest.SupportsIPv4() {
- network, address = "udp6", "::1"
- }
- const N = 1000
- var wg sync.WaitGroup
- wg.Add(N)
- for i := 0; i < N; i++ {
- go func() {
- defer wg.Done()
- c, err := icmp.ListenPacket(network, address)
- if err != nil {
- t.Error(err)
- return
- }
- c.Close()
- }()
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/sys_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/sys_freebsd.go
deleted file mode 100644
index c75f3ddaa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/sys_freebsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-import "syscall"
-
-func init() {
- freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/timeexceeded.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/timeexceeded.go
deleted file mode 100644
index 344e15848..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/icmp/timeexceeded.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 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 file.
-
-package icmp
-
-// A TimeExceeded represents an ICMP time exceeded message body.
-type TimeExceeded struct {
- Data []byte // data, known as original datagram field
- Extensions []Extension // extensions
-}
-
-// Len implements the Len method of MessageBody interface.
-func (p *TimeExceeded) Len(proto int) int {
- if p == nil {
- return 0
- }
- l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions)
- return 4 + l
-}
-
-// Marshal implements the Marshal method of MessageBody interface.
-func (p *TimeExceeded) Marshal(proto int) ([]byte, error) {
- return marshalMultipartMessageBody(proto, p.Data, p.Extensions)
-}
-
-// parseTimeExceeded parses b as an ICMP time exceeded message body.
-func parseTimeExceeded(proto int, b []byte) (MessageBody, error) {
- if len(b) < 4 {
- return nil, errMessageTooShort
- }
- p := &TimeExceeded{}
- var err error
- p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b)
- if err != nil {
- return nil, err
- }
- return p, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/example_test.go
deleted file mode 100644
index 948f6eb20..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/example_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-// 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 file.
-
-package idna_test
-
-import (
- "fmt"
-
- "golang.org/x/net/idna"
-)
-
-func ExampleProfile() {
- // Raw Punycode has no restrictions and does no mappings.
- fmt.Println(idna.ToASCII(""))
- fmt.Println(idna.ToASCII("*.faß.com"))
- fmt.Println(idna.Punycode.ToASCII("*.faß.com"))
-
- // Rewrite IDN for lookup. This (currently) uses transitional mappings to
- // find a balance between IDNA2003 and IDNA2008 compatibility.
- fmt.Println(idna.Lookup.ToASCII(""))
- fmt.Println(idna.Lookup.ToASCII("www.faß.com"))
-
- // Convert an IDN to ASCII for registration purposes. This changes the
- // encoding, but reports an error if the input was illformed.
- fmt.Println(idna.Registration.ToASCII(""))
- fmt.Println(idna.Registration.ToASCII("www.faß.com"))
-
- // Output:
- // <nil>
- // *.xn--fa-hia.com <nil>
- // *.xn--fa-hia.com <nil>
- // <nil>
- // www.fass.com <nil>
- // idna: invalid label ""
- // www.xn--fa-hia.com <nil>
-}
-
-func ExampleNew() {
- var p *idna.Profile
-
- // Raw Punycode has no restrictions and does no mappings.
- p = idna.New()
- fmt.Println(p.ToASCII("*.faß.com"))
-
- // Do mappings. Note that star is not allowed in a DNS lookup.
- p = idna.New(
- idna.MapForLookup(),
- idna.Transitional(true)) // Map ß -> ss
- fmt.Println(p.ToASCII("*.faß.com"))
-
- // Lookup for registration. Also does not allow '*'.
- p = idna.New(idna.ValidateForRegistration())
- fmt.Println(p.ToUnicode("*.faß.com"))
-
- // Set up a profile maps for lookup, but allows wild cards.
- p = idna.New(
- idna.MapForLookup(),
- idna.Transitional(true), // Map ß -> ss
- idna.StrictDomainName(false)) // Set more permissive ASCII rules.
- fmt.Println(p.ToASCII("*.faß.com"))
-
- // Output:
- // *.xn--fa-hia.com <nil>
- // *.fass.com idna: disallowed rune U+002A
- // *.faß.com idna: disallowed rune U+002A
- // *.fass.com <nil>
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna.go
deleted file mode 100644
index 346fe4423..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna.go
+++ /dev/null
@@ -1,732 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-// Copyright 2016 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 file.
-
-// Package idna implements IDNA2008 using the compatibility processing
-// defined by UTS (Unicode Technical Standard) #46, which defines a standard to
-// deal with the transition from IDNA2003.
-//
-// IDNA2008 (Internationalized Domain Names for Applications), is defined in RFC
-// 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894.
-// UTS #46 is defined in http://www.unicode.org/reports/tr46.
-// See http://unicode.org/cldr/utility/idna.jsp for a visualization of the
-// differences between these two standards.
-package idna // import "golang.org/x/net/idna"
-
-import (
- "fmt"
- "strings"
- "unicode/utf8"
-
- "golang.org/x/text/secure/bidirule"
- "golang.org/x/text/unicode/bidi"
- "golang.org/x/text/unicode/norm"
-)
-
-// NOTE: Unlike common practice in Go APIs, the functions will return a
-// sanitized domain name in case of errors. Browsers sometimes use a partially
-// evaluated string as lookup.
-// TODO: the current error handling is, in my opinion, the least opinionated.
-// Other strategies are also viable, though:
-// Option 1) Return an empty string in case of error, but allow the user to
-// specify explicitly which errors to ignore.
-// Option 2) Return the partially evaluated string if it is itself a valid
-// string, otherwise return the empty string in case of error.
-// Option 3) Option 1 and 2.
-// Option 4) Always return an empty string for now and implement Option 1 as
-// needed, and document that the return string may not be empty in case of
-// error in the future.
-// I think Option 1 is best, but it is quite opinionated.
-
-// ToASCII is a wrapper for Punycode.ToASCII.
-func ToASCII(s string) (string, error) {
- return Punycode.process(s, true)
-}
-
-// ToUnicode is a wrapper for Punycode.ToUnicode.
-func ToUnicode(s string) (string, error) {
- return Punycode.process(s, false)
-}
-
-// An Option configures a Profile at creation time.
-type Option func(*options)
-
-// Transitional sets a Profile to use the Transitional mapping as defined in UTS
-// #46. This will cause, for example, "ß" to be mapped to "ss". Using the
-// transitional mapping provides a compromise between IDNA2003 and IDNA2008
-// compatibility. It is used by most browsers when resolving domain names. This
-// option is only meaningful if combined with MapForLookup.
-func Transitional(transitional bool) Option {
- return func(o *options) { o.transitional = true }
-}
-
-// VerifyDNSLength sets whether a Profile should fail if any of the IDN parts
-// are longer than allowed by the RFC.
-func VerifyDNSLength(verify bool) Option {
- return func(o *options) { o.verifyDNSLength = verify }
-}
-
-// RemoveLeadingDots removes leading label separators. Leading runes that map to
-// dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well.
-//
-// This is the behavior suggested by the UTS #46 and is adopted by some
-// browsers.
-func RemoveLeadingDots(remove bool) Option {
- return func(o *options) { o.removeLeadingDots = remove }
-}
-
-// ValidateLabels sets whether to check the mandatory label validation criteria
-// as defined in Section 5.4 of RFC 5891. This includes testing for correct use
-// of hyphens ('-'), normalization, validity of runes, and the context rules.
-func ValidateLabels(enable bool) Option {
- return func(o *options) {
- // Don't override existing mappings, but set one that at least checks
- // normalization if it is not set.
- if o.mapping == nil && enable {
- o.mapping = normalize
- }
- o.trie = trie
- o.validateLabels = enable
- o.fromPuny = validateFromPunycode
- }
-}
-
-// StrictDomainName limits the set of permissible ASCII characters to those
-// allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the
-// hyphen). This is set by default for MapForLookup and ValidateForRegistration.
-//
-// This option is useful, for instance, for browsers that allow characters
-// outside this range, for example a '_' (U+005F LOW LINE). See
-// http://www.rfc-editor.org/std/std3.txt for more details This option
-// corresponds to the UseSTD3ASCIIRules option in UTS #46.
-func StrictDomainName(use bool) Option {
- return func(o *options) {
- o.trie = trie
- o.useSTD3Rules = use
- o.fromPuny = validateFromPunycode
- }
-}
-
-// NOTE: the following options pull in tables. The tables should not be linked
-// in as long as the options are not used.
-
-// BidiRule enables the Bidi rule as defined in RFC 5893. Any application
-// that relies on proper validation of labels should include this rule.
-func BidiRule() Option {
- return func(o *options) { o.bidirule = bidirule.ValidString }
-}
-
-// ValidateForRegistration sets validation options to verify that a given IDN is
-// properly formatted for registration as defined by Section 4 of RFC 5891.
-func ValidateForRegistration() Option {
- return func(o *options) {
- o.mapping = validateRegistration
- StrictDomainName(true)(o)
- ValidateLabels(true)(o)
- VerifyDNSLength(true)(o)
- BidiRule()(o)
- }
-}
-
-// MapForLookup sets validation and mapping options such that a given IDN is
-// transformed for domain name lookup according to the requirements set out in
-// Section 5 of RFC 5891. The mappings follow the recommendations of RFC 5894,
-// RFC 5895 and UTS 46. It does not add the Bidi Rule. Use the BidiRule option
-// to add this check.
-//
-// The mappings include normalization and mapping case, width and other
-// compatibility mappings.
-func MapForLookup() Option {
- return func(o *options) {
- o.mapping = validateAndMap
- StrictDomainName(true)(o)
- ValidateLabels(true)(o)
- }
-}
-
-type options struct {
- transitional bool
- useSTD3Rules bool
- validateLabels bool
- verifyDNSLength bool
- removeLeadingDots bool
-
- trie *idnaTrie
-
- // fromPuny calls validation rules when converting A-labels to U-labels.
- fromPuny func(p *Profile, s string) error
-
- // mapping implements a validation and mapping step as defined in RFC 5895
- // or UTS 46, tailored to, for example, domain registration or lookup.
- mapping func(p *Profile, s string) (mapped string, isBidi bool, err error)
-
- // bidirule, if specified, checks whether s conforms to the Bidi Rule
- // defined in RFC 5893.
- bidirule func(s string) bool
-}
-
-// A Profile defines the configuration of an IDNA mapper.
-type Profile struct {
- options
-}
-
-func apply(o *options, opts []Option) {
- for _, f := range opts {
- f(o)
- }
-}
-
-// New creates a new Profile.
-//
-// With no options, the returned Profile is the most permissive and equals the
-// Punycode Profile. Options can be passed to further restrict the Profile. The
-// MapForLookup and ValidateForRegistration options set a collection of options,
-// for lookup and registration purposes respectively, which can be tailored by
-// adding more fine-grained options, where later options override earlier
-// options.
-func New(o ...Option) *Profile {
- p := &Profile{}
- apply(&p.options, o)
- return p
-}
-
-// ToASCII converts a domain or domain label to its ASCII form. For example,
-// ToASCII("bücher.example.com") is "xn--bcher-kva.example.com", and
-// ToASCII("golang") is "golang". If an error is encountered it will return
-// an error and a (partially) processed result.
-func (p *Profile) ToASCII(s string) (string, error) {
- return p.process(s, true)
-}
-
-// ToUnicode converts a domain or domain label to its Unicode form. For example,
-// ToUnicode("xn--bcher-kva.example.com") is "bücher.example.com", and
-// ToUnicode("golang") is "golang". If an error is encountered it will return
-// an error and a (partially) processed result.
-func (p *Profile) ToUnicode(s string) (string, error) {
- pp := *p
- pp.transitional = false
- return pp.process(s, false)
-}
-
-// String reports a string with a description of the profile for debugging
-// purposes. The string format may change with different versions.
-func (p *Profile) String() string {
- s := ""
- if p.transitional {
- s = "Transitional"
- } else {
- s = "NonTransitional"
- }
- if p.useSTD3Rules {
- s += ":UseSTD3Rules"
- }
- if p.validateLabels {
- s += ":ValidateLabels"
- }
- if p.verifyDNSLength {
- s += ":VerifyDNSLength"
- }
- return s
-}
-
-var (
- // Punycode is a Profile that does raw punycode processing with a minimum
- // of validation.
- Punycode *Profile = punycode
-
- // Lookup is the recommended profile for looking up domain names, according
- // to Section 5 of RFC 5891. The exact configuration of this profile may
- // change over time.
- Lookup *Profile = lookup
-
- // Display is the recommended profile for displaying domain names.
- // The configuration of this profile may change over time.
- Display *Profile = display
-
- // Registration is the recommended profile for checking whether a given
- // IDN is valid for registration, according to Section 4 of RFC 5891.
- Registration *Profile = registration
-
- punycode = &Profile{}
- lookup = &Profile{options{
- transitional: true,
- useSTD3Rules: true,
- validateLabels: true,
- trie: trie,
- fromPuny: validateFromPunycode,
- mapping: validateAndMap,
- bidirule: bidirule.ValidString,
- }}
- display = &Profile{options{
- useSTD3Rules: true,
- validateLabels: true,
- trie: trie,
- fromPuny: validateFromPunycode,
- mapping: validateAndMap,
- bidirule: bidirule.ValidString,
- }}
- registration = &Profile{options{
- useSTD3Rules: true,
- validateLabels: true,
- verifyDNSLength: true,
- trie: trie,
- fromPuny: validateFromPunycode,
- mapping: validateRegistration,
- bidirule: bidirule.ValidString,
- }}
-
- // TODO: profiles
- // Register: recommended for approving domain names: don't do any mappings
- // but rather reject on invalid input. Bundle or block deviation characters.
-)
-
-type labelError struct{ label, code_ string }
-
-func (e labelError) code() string { return e.code_ }
-func (e labelError) Error() string {
- return fmt.Sprintf("idna: invalid label %q", e.label)
-}
-
-type runeError rune
-
-func (e runeError) code() string { return "P1" }
-func (e runeError) Error() string {
- return fmt.Sprintf("idna: disallowed rune %U", e)
-}
-
-// process implements the algorithm described in section 4 of UTS #46,
-// see http://www.unicode.org/reports/tr46.
-func (p *Profile) process(s string, toASCII bool) (string, error) {
- var err error
- var isBidi bool
- if p.mapping != nil {
- s, isBidi, err = p.mapping(p, s)
- }
- // Remove leading empty labels.
- if p.removeLeadingDots {
- for ; len(s) > 0 && s[0] == '.'; s = s[1:] {
- }
- }
- // TODO: allow for a quick check of the tables data.
- // It seems like we should only create this error on ToASCII, but the
- // UTS 46 conformance tests suggests we should always check this.
- if err == nil && p.verifyDNSLength && s == "" {
- err = &labelError{s, "A4"}
- }
- labels := labelIter{orig: s}
- for ; !labels.done(); labels.next() {
- label := labels.label()
- if label == "" {
- // Empty labels are not okay. The label iterator skips the last
- // label if it is empty.
- if err == nil && p.verifyDNSLength {
- err = &labelError{s, "A4"}
- }
- continue
- }
- if strings.HasPrefix(label, acePrefix) {
- u, err2 := decode(label[len(acePrefix):])
- if err2 != nil {
- if err == nil {
- err = err2
- }
- // Spec says keep the old label.
- continue
- }
- isBidi = isBidi || bidirule.DirectionString(u) != bidi.LeftToRight
- labels.set(u)
- if err == nil && p.validateLabels {
- err = p.fromPuny(p, u)
- }
- if err == nil {
- // This should be called on NonTransitional, according to the
- // spec, but that currently does not have any effect. Use the
- // original profile to preserve options.
- err = p.validateLabel(u)
- }
- } else if err == nil {
- err = p.validateLabel(label)
- }
- }
- if isBidi && p.bidirule != nil && err == nil {
- for labels.reset(); !labels.done(); labels.next() {
- if !p.bidirule(labels.label()) {
- err = &labelError{s, "B"}
- break
- }
- }
- }
- if toASCII {
- for labels.reset(); !labels.done(); labels.next() {
- label := labels.label()
- if !ascii(label) {
- a, err2 := encode(acePrefix, label)
- if err == nil {
- err = err2
- }
- label = a
- labels.set(a)
- }
- n := len(label)
- if p.verifyDNSLength && err == nil && (n == 0 || n > 63) {
- err = &labelError{label, "A4"}
- }
- }
- }
- s = labels.result()
- if toASCII && p.verifyDNSLength && err == nil {
- // Compute the length of the domain name minus the root label and its dot.
- n := len(s)
- if n > 0 && s[n-1] == '.' {
- n--
- }
- if len(s) < 1 || n > 253 {
- err = &labelError{s, "A4"}
- }
- }
- return s, err
-}
-
-func normalize(p *Profile, s string) (mapped string, isBidi bool, err error) {
- // TODO: consider first doing a quick check to see if any of these checks
- // need to be done. This will make it slower in the general case, but
- // faster in the common case.
- mapped = norm.NFC.String(s)
- isBidi = bidirule.DirectionString(mapped) == bidi.RightToLeft
- return mapped, isBidi, nil
-}
-
-func validateRegistration(p *Profile, s string) (idem string, bidi bool, err error) {
- // TODO: filter need for normalization in loop below.
- if !norm.NFC.IsNormalString(s) {
- return s, false, &labelError{s, "V1"}
- }
- for i := 0; i < len(s); {
- v, sz := trie.lookupString(s[i:])
- if sz == 0 {
- return s, bidi, runeError(utf8.RuneError)
- }
- bidi = bidi || info(v).isBidi(s[i:])
- // Copy bytes not copied so far.
- switch p.simplify(info(v).category()) {
- // TODO: handle the NV8 defined in the Unicode idna data set to allow
- // for strict conformance to IDNA2008.
- case valid, deviation:
- case disallowed, mapped, unknown, ignored:
- r, _ := utf8.DecodeRuneInString(s[i:])
- return s, bidi, runeError(r)
- }
- i += sz
- }
- return s, bidi, nil
-}
-
-func (c info) isBidi(s string) bool {
- if !c.isMapped() {
- return c&attributesMask == rtl
- }
- // TODO: also store bidi info for mapped data. This is possible, but a bit
- // cumbersome and not for the common case.
- p, _ := bidi.LookupString(s)
- switch p.Class() {
- case bidi.R, bidi.AL, bidi.AN:
- return true
- }
- return false
-}
-
-func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) {
- var (
- b []byte
- k int
- )
- // combinedInfoBits contains the or-ed bits of all runes. We use this
- // to derive the mayNeedNorm bit later. This may trigger normalization
- // overeagerly, but it will not do so in the common case. The end result
- // is another 10% saving on BenchmarkProfile for the common case.
- var combinedInfoBits info
- for i := 0; i < len(s); {
- v, sz := trie.lookupString(s[i:])
- if sz == 0 {
- b = append(b, s[k:i]...)
- b = append(b, "\ufffd"...)
- k = len(s)
- if err == nil {
- err = runeError(utf8.RuneError)
- }
- break
- }
- combinedInfoBits |= info(v)
- bidi = bidi || info(v).isBidi(s[i:])
- start := i
- i += sz
- // Copy bytes not copied so far.
- switch p.simplify(info(v).category()) {
- case valid:
- continue
- case disallowed:
- if err == nil {
- r, _ := utf8.DecodeRuneInString(s[start:])
- err = runeError(r)
- }
- continue
- case mapped, deviation:
- b = append(b, s[k:start]...)
- b = info(v).appendMapping(b, s[start:i])
- case ignored:
- b = append(b, s[k:start]...)
- // drop the rune
- case unknown:
- b = append(b, s[k:start]...)
- b = append(b, "\ufffd"...)
- }
- k = i
- }
- if k == 0 {
- // No changes so far.
- if combinedInfoBits&mayNeedNorm != 0 {
- s = norm.NFC.String(s)
- }
- } else {
- b = append(b, s[k:]...)
- if norm.NFC.QuickSpan(b) != len(b) {
- b = norm.NFC.Bytes(b)
- }
- // TODO: the punycode converters require strings as input.
- s = string(b)
- }
- return s, bidi, err
-}
-
-// A labelIter allows iterating over domain name labels.
-type labelIter struct {
- orig string
- slice []string
- curStart int
- curEnd int
- i int
-}
-
-func (l *labelIter) reset() {
- l.curStart = 0
- l.curEnd = 0
- l.i = 0
-}
-
-func (l *labelIter) done() bool {
- return l.curStart >= len(l.orig)
-}
-
-func (l *labelIter) result() string {
- if l.slice != nil {
- return strings.Join(l.slice, ".")
- }
- return l.orig
-}
-
-func (l *labelIter) label() string {
- if l.slice != nil {
- return l.slice[l.i]
- }
- p := strings.IndexByte(l.orig[l.curStart:], '.')
- l.curEnd = l.curStart + p
- if p == -1 {
- l.curEnd = len(l.orig)
- }
- return l.orig[l.curStart:l.curEnd]
-}
-
-// next sets the value to the next label. It skips the last label if it is empty.
-func (l *labelIter) next() {
- l.i++
- if l.slice != nil {
- if l.i >= len(l.slice) || l.i == len(l.slice)-1 && l.slice[l.i] == "" {
- l.curStart = len(l.orig)
- }
- } else {
- l.curStart = l.curEnd + 1
- if l.curStart == len(l.orig)-1 && l.orig[l.curStart] == '.' {
- l.curStart = len(l.orig)
- }
- }
-}
-
-func (l *labelIter) set(s string) {
- if l.slice == nil {
- l.slice = strings.Split(l.orig, ".")
- }
- l.slice[l.i] = s
-}
-
-// acePrefix is the ASCII Compatible Encoding prefix.
-const acePrefix = "xn--"
-
-func (p *Profile) simplify(cat category) category {
- switch cat {
- case disallowedSTD3Mapped:
- if p.useSTD3Rules {
- cat = disallowed
- } else {
- cat = mapped
- }
- case disallowedSTD3Valid:
- if p.useSTD3Rules {
- cat = disallowed
- } else {
- cat = valid
- }
- case deviation:
- if !p.transitional {
- cat = valid
- }
- case validNV8, validXV8:
- // TODO: handle V2008
- cat = valid
- }
- return cat
-}
-
-func validateFromPunycode(p *Profile, s string) error {
- if !norm.NFC.IsNormalString(s) {
- return &labelError{s, "V1"}
- }
- // TODO: detect whether string may have to be normalized in the following
- // loop.
- for i := 0; i < len(s); {
- v, sz := trie.lookupString(s[i:])
- if sz == 0 {
- return runeError(utf8.RuneError)
- }
- if c := p.simplify(info(v).category()); c != valid && c != deviation {
- return &labelError{s, "V6"}
- }
- i += sz
- }
- return nil
-}
-
-const (
- zwnj = "\u200c"
- zwj = "\u200d"
-)
-
-type joinState int8
-
-const (
- stateStart joinState = iota
- stateVirama
- stateBefore
- stateBeforeVirama
- stateAfter
- stateFAIL
-)
-
-var joinStates = [][numJoinTypes]joinState{
- stateStart: {
- joiningL: stateBefore,
- joiningD: stateBefore,
- joinZWNJ: stateFAIL,
- joinZWJ: stateFAIL,
- joinVirama: stateVirama,
- },
- stateVirama: {
- joiningL: stateBefore,
- joiningD: stateBefore,
- },
- stateBefore: {
- joiningL: stateBefore,
- joiningD: stateBefore,
- joiningT: stateBefore,
- joinZWNJ: stateAfter,
- joinZWJ: stateFAIL,
- joinVirama: stateBeforeVirama,
- },
- stateBeforeVirama: {
- joiningL: stateBefore,
- joiningD: stateBefore,
- joiningT: stateBefore,
- },
- stateAfter: {
- joiningL: stateFAIL,
- joiningD: stateBefore,
- joiningT: stateAfter,
- joiningR: stateStart,
- joinZWNJ: stateFAIL,
- joinZWJ: stateFAIL,
- joinVirama: stateAfter, // no-op as we can't accept joiners here
- },
- stateFAIL: {
- 0: stateFAIL,
- joiningL: stateFAIL,
- joiningD: stateFAIL,
- joiningT: stateFAIL,
- joiningR: stateFAIL,
- joinZWNJ: stateFAIL,
- joinZWJ: stateFAIL,
- joinVirama: stateFAIL,
- },
-}
-
-// validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are
-// already implicitly satisfied by the overall implementation.
-func (p *Profile) validateLabel(s string) (err error) {
- if s == "" {
- if p.verifyDNSLength {
- return &labelError{s, "A4"}
- }
- return nil
- }
- if !p.validateLabels {
- return nil
- }
- trie := p.trie // p.validateLabels is only set if trie is set.
- if len(s) > 4 && s[2] == '-' && s[3] == '-' {
- return &labelError{s, "V2"}
- }
- if s[0] == '-' || s[len(s)-1] == '-' {
- return &labelError{s, "V3"}
- }
- // TODO: merge the use of this in the trie.
- v, sz := trie.lookupString(s)
- x := info(v)
- if x.isModifier() {
- return &labelError{s, "V5"}
- }
- // Quickly return in the absence of zero-width (non) joiners.
- if strings.Index(s, zwj) == -1 && strings.Index(s, zwnj) == -1 {
- return nil
- }
- st := stateStart
- for i := 0; ; {
- jt := x.joinType()
- if s[i:i+sz] == zwj {
- jt = joinZWJ
- } else if s[i:i+sz] == zwnj {
- jt = joinZWNJ
- }
- st = joinStates[st][jt]
- if x.isViramaModifier() {
- st = joinStates[st][joinVirama]
- }
- if i += sz; i == len(s) {
- break
- }
- v, sz = trie.lookupString(s[i:])
- x = info(v)
- }
- if st == stateFAIL || st == stateAfter {
- return &labelError{s, "C"}
- }
- return nil
-}
-
-func ascii(s string) bool {
- for i := 0; i < len(s); i++ {
- if s[i] >= utf8.RuneSelf {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna_test.go
deleted file mode 100644
index 0b067cac9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/idna_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2012 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 file.
-
-package idna
-
-import (
- "testing"
-)
-
-var idnaTestCases = [...]struct {
- ascii, unicode string
-}{
- // Labels.
- {"books", "books"},
- {"xn--bcher-kva", "bücher"},
-
- // Domains.
- {"foo--xn--bar.org", "foo--xn--bar.org"},
- {"golang.org", "golang.org"},
- {"example.xn--p1ai", "example.рф"},
- {"xn--czrw28b.tw", "商業.tw"},
- {"www.xn--mller-kva.de", "www.müller.de"},
-}
-
-func TestIDNA(t *testing.T) {
- for _, tc := range idnaTestCases {
- if a, err := ToASCII(tc.unicode); err != nil {
- t.Errorf("ToASCII(%q): %v", tc.unicode, err)
- } else if a != tc.ascii {
- t.Errorf("ToASCII(%q): got %q, want %q", tc.unicode, a, tc.ascii)
- }
-
- if u, err := ToUnicode(tc.ascii); err != nil {
- t.Errorf("ToUnicode(%q): %v", tc.ascii, err)
- } else if u != tc.unicode {
- t.Errorf("ToUnicode(%q): got %q, want %q", tc.ascii, u, tc.unicode)
- }
- }
-}
-
-func TestIDNASeparators(t *testing.T) {
- type subCase struct {
- unicode string
- wantASCII string
- wantErr bool
- }
-
- testCases := []struct {
- name string
- profile *Profile
- subCases []subCase
- }{
- {
- name: "Punycode", profile: Punycode,
- subCases: []subCase{
- {"example\u3002jp", "xn--examplejp-ck3h", false},
- {"æ±äº¬\uFF0Ejp", "xn--jp-l92cn98g071o", false},
- {"大阪\uFF61jp", "xn--jp-ku9cz72u463f", false},
- },
- },
- {
- name: "Lookup", profile: Lookup,
- subCases: []subCase{
- {"example\u3002jp", "example.jp", false},
- {"æ±äº¬\uFF0Ejp", "xn--1lqs71d.jp", false},
- {"大阪\uFF61jp", "xn--pssu33l.jp", false},
- },
- },
- {
- name: "Display", profile: Display,
- subCases: []subCase{
- {"example\u3002jp", "example.jp", false},
- {"æ±äº¬\uFF0Ejp", "xn--1lqs71d.jp", false},
- {"大阪\uFF61jp", "xn--pssu33l.jp", false},
- },
- },
- {
- name: "Registration", profile: Registration,
- subCases: []subCase{
- {"example\u3002jp", "", true},
- {"æ±äº¬\uFF0Ejp", "", true},
- {"大阪\uFF61jp", "", true},
- },
- },
- }
- for _, tc := range testCases {
- t.Run(tc.name, func(t *testing.T) {
- for _, c := range tc.subCases {
- gotA, err := tc.profile.ToASCII(c.unicode)
- if c.wantErr {
- if err == nil {
- t.Errorf("ToASCII(%q): got no error, but an error expected", c.unicode)
- }
- } else {
- if err != nil {
- t.Errorf("ToASCII(%q): got err=%v, but no error expected", c.unicode, err)
- } else if gotA != c.wantASCII {
- t.Errorf("ToASCII(%q): got %q, want %q", c.unicode, gotA, c.wantASCII)
- }
- }
- }
- })
- }
-}
-
-// TODO(nigeltao): test errors, once we've specified when ToASCII and ToUnicode
-// return errors.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode.go
deleted file mode 100644
index 02c7d59af..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode.go
+++ /dev/null
@@ -1,203 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-// Copyright 2016 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 file.
-
-package idna
-
-// This file implements the Punycode algorithm from RFC 3492.
-
-import (
- "math"
- "strings"
- "unicode/utf8"
-)
-
-// These parameter values are specified in section 5.
-//
-// All computation is done with int32s, so that overflow behavior is identical
-// regardless of whether int is 32-bit or 64-bit.
-const (
- base int32 = 36
- damp int32 = 700
- initialBias int32 = 72
- initialN int32 = 128
- skew int32 = 38
- tmax int32 = 26
- tmin int32 = 1
-)
-
-func punyError(s string) error { return &labelError{s, "A3"} }
-
-// decode decodes a string as specified in section 6.2.
-func decode(encoded string) (string, error) {
- if encoded == "" {
- return "", nil
- }
- pos := 1 + strings.LastIndex(encoded, "-")
- if pos == 1 {
- return "", punyError(encoded)
- }
- if pos == len(encoded) {
- return encoded[:len(encoded)-1], nil
- }
- output := make([]rune, 0, len(encoded))
- if pos != 0 {
- for _, r := range encoded[:pos-1] {
- output = append(output, r)
- }
- }
- i, n, bias := int32(0), initialN, initialBias
- for pos < len(encoded) {
- oldI, w := i, int32(1)
- for k := base; ; k += base {
- if pos == len(encoded) {
- return "", punyError(encoded)
- }
- digit, ok := decodeDigit(encoded[pos])
- if !ok {
- return "", punyError(encoded)
- }
- pos++
- i += digit * w
- if i < 0 {
- return "", punyError(encoded)
- }
- t := k - bias
- if t < tmin {
- t = tmin
- } else if t > tmax {
- t = tmax
- }
- if digit < t {
- break
- }
- w *= base - t
- if w >= math.MaxInt32/base {
- return "", punyError(encoded)
- }
- }
- x := int32(len(output) + 1)
- bias = adapt(i-oldI, x, oldI == 0)
- n += i / x
- i %= x
- if n > utf8.MaxRune || len(output) >= 1024 {
- return "", punyError(encoded)
- }
- output = append(output, 0)
- copy(output[i+1:], output[i:])
- output[i] = n
- i++
- }
- return string(output), nil
-}
-
-// encode encodes a string as specified in section 6.3 and prepends prefix to
-// the result.
-//
-// The "while h < length(input)" line in the specification becomes "for
-// remaining != 0" in the Go code, because len(s) in Go is in bytes, not runes.
-func encode(prefix, s string) (string, error) {
- output := make([]byte, len(prefix), len(prefix)+1+2*len(s))
- copy(output, prefix)
- delta, n, bias := int32(0), initialN, initialBias
- b, remaining := int32(0), int32(0)
- for _, r := range s {
- if r < 0x80 {
- b++
- output = append(output, byte(r))
- } else {
- remaining++
- }
- }
- h := b
- if b > 0 {
- output = append(output, '-')
- }
- for remaining != 0 {
- m := int32(0x7fffffff)
- for _, r := range s {
- if m > r && r >= n {
- m = r
- }
- }
- delta += (m - n) * (h + 1)
- if delta < 0 {
- return "", punyError(s)
- }
- n = m
- for _, r := range s {
- if r < n {
- delta++
- if delta < 0 {
- return "", punyError(s)
- }
- continue
- }
- if r > n {
- continue
- }
- q := delta
- for k := base; ; k += base {
- t := k - bias
- if t < tmin {
- t = tmin
- } else if t > tmax {
- t = tmax
- }
- if q < t {
- break
- }
- output = append(output, encodeDigit(t+(q-t)%(base-t)))
- q = (q - t) / (base - t)
- }
- output = append(output, encodeDigit(q))
- bias = adapt(delta, h+1, h == b)
- delta = 0
- h++
- remaining--
- }
- delta++
- n++
- }
- return string(output), nil
-}
-
-func decodeDigit(x byte) (digit int32, ok bool) {
- switch {
- case '0' <= x && x <= '9':
- return int32(x - ('0' - 26)), true
- case 'A' <= x && x <= 'Z':
- return int32(x - 'A'), true
- case 'a' <= x && x <= 'z':
- return int32(x - 'a'), true
- }
- return 0, false
-}
-
-func encodeDigit(digit int32) byte {
- switch {
- case 0 <= digit && digit < 26:
- return byte(digit + 'a')
- case 26 <= digit && digit < 36:
- return byte(digit + ('0' - 26))
- }
- panic("idna: internal error in punycode encoding")
-}
-
-// adapt is the bias adaptation function specified in section 6.1.
-func adapt(delta, numPoints int32, firstTime bool) int32 {
- if firstTime {
- delta /= damp
- } else {
- delta /= 2
- }
- delta += delta / numPoints
- k := int32(0)
- for delta > ((base-tmin)*tmax)/2 {
- delta /= base - tmin
- k += base
- }
- return k + (base-tmin+1)*delta/(delta+skew)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode_test.go
deleted file mode 100644
index bfec81dec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/punycode_test.go
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2012 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 file.
-
-package idna
-
-import (
- "strings"
- "testing"
-)
-
-var punycodeTestCases = [...]struct {
- s, encoded string
-}{
- {"", ""},
- {"-", "--"},
- {"-a", "-a-"},
- {"-a-", "-a--"},
- {"a", "a-"},
- {"a-", "a--"},
- {"a-b", "a-b-"},
- {"books", "books-"},
- {"bücher", "bcher-kva"},
- {"Hello世界", "Hello-ck1hg65u"},
- {"ü", "tda"},
- {"üý", "tdac"},
-
- // The test cases below come from RFC 3492 section 7.1 with Errata 3026.
- {
- // (A) Arabic (Egyptian).
- "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" +
- "\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F",
- "egbpdaj6bu4bxfgehfvwxn",
- },
- {
- // (B) Chinese (simplified).
- "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587",
- "ihqwcrb4cv8a8dqg056pqjye",
- },
- {
- // (C) Chinese (traditional).
- "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587",
- "ihqwctvzc91f659drss3x8bo0yb",
- },
- {
- // (D) Czech.
- "\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074" +
- "\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D" +
- "\u0065\u0073\u006B\u0079",
- "Proprostnemluvesky-uyb24dma41a",
- },
- {
- // (E) Hebrew.
- "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8" +
- "\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2" +
- "\u05D1\u05E8\u05D9\u05EA",
- "4dbcagdahymbxekheh6e0a7fei0b",
- },
- {
- // (F) Hindi (Devanagari).
- "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D" +
- "\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939" +
- "\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947" +
- "\u0939\u0948\u0902",
- "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd",
- },
- {
- // (G) Japanese (kanji and hiragana).
- "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092" +
- "\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B",
- "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa",
- },
- {
- // (H) Korean (Hangul syllables).
- "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774" +
- "\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74" +
- "\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C",
- "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j" +
- "psd879ccm6fea98c",
- },
- {
- // (I) Russian (Cyrillic).
- "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E" +
- "\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440" +
- "\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A" +
- "\u0438",
- "b1abfaaepdrnnbgefbadotcwatmq2g4l",
- },
- {
- // (J) Spanish.
- "\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070" +
- "\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070" +
- "\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061" +
- "\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070" +
- "\u0061\u00F1\u006F\u006C",
- "PorqunopuedensimplementehablarenEspaol-fmd56a",
- },
- {
- // (K) Vietnamese.
- "\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B" +
- "\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068" +
- "\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067" +
- "\u0056\u0069\u1EC7\u0074",
- "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g",
- },
- {
- // (L) 3<nen>B<gumi><kinpachi><sensei>.
- "\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F",
- "3B-ww4c5e180e575a65lsy2b",
- },
- {
- // (M) <amuro><namie>-with-SUPER-MONKEYS.
- "\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074" +
- "\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D" +
- "\u004F\u004E\u004B\u0045\u0059\u0053",
- "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n",
- },
- {
- // (N) Hello-Another-Way-<sorezore><no><basho>.
- "\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F" +
- "\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D" +
- "\u305D\u308C\u305E\u308C\u306E\u5834\u6240",
- "Hello-Another-Way--fc4qua05auwb3674vfr0b",
- },
- {
- // (O) <hitotsu><yane><no><shita>2.
- "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032",
- "2-u9tlzr9756bt3uc0v",
- },
- {
- // (P) Maji<de>Koi<suru>5<byou><mae>
- "\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059" +
- "\u308B\u0035\u79D2\u524D",
- "MajiKoi5-783gue6qz075azm5e",
- },
- {
- // (Q) <pafii>de<runba>
- "\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0",
- "de-jg4avhby1noc0d",
- },
- {
- // (R) <sono><supiido><de>
- "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067",
- "d9juau41awczczp",
- },
- {
- // (S) -> $1.00 <-
- "\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020" +
- "\u003C\u002D",
- "-> $1.00 <--",
- },
-}
-
-func TestPunycode(t *testing.T) {
- for _, tc := range punycodeTestCases {
- if got, err := decode(tc.encoded); err != nil {
- t.Errorf("decode(%q): %v", tc.encoded, err)
- } else if got != tc.s {
- t.Errorf("decode(%q): got %q, want %q", tc.encoded, got, tc.s)
- }
-
- if got, err := encode("", tc.s); err != nil {
- t.Errorf(`encode("", %q): %v`, tc.s, err)
- } else if got != tc.encoded {
- t.Errorf(`encode("", %q): got %q, want %q`, tc.s, got, tc.encoded)
- }
- }
-}
-
-var punycodeErrorTestCases = [...]string{
- "decode -", // A sole '-' is invalid.
- "decode foo\x00bar", // '\x00' is not in [0-9A-Za-z].
- "decode foo#bar", // '#' is not in [0-9A-Za-z].
- "decode foo\u00A3bar", // '\u00A3' is not in [0-9A-Za-z].
- "decode 9", // "9a" decodes to codepoint \u00A3; "9" is truncated.
- "decode 99999a", // "99999a" decodes to codepoint \U0048A3C1, which is > \U0010FFFF.
- "decode 9999999999a", // "9999999999a" overflows the int32 calculation.
-
- "encode " + strings.Repeat("x", 65536) + "\uff00", // int32 overflow.
-}
-
-func TestPunycodeErrors(t *testing.T) {
- for _, tc := range punycodeErrorTestCases {
- var err error
- switch {
- case strings.HasPrefix(tc, "decode "):
- _, err = decode(tc[7:])
- case strings.HasPrefix(tc, "encode "):
- _, err = encode("", tc[7:])
- }
- if err == nil {
- if len(tc) > 256 {
- tc = tc[:100] + "..." + tc[len(tc)-100:]
- }
- t.Errorf("no error for %s", tc)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/tables.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/tables.go
deleted file mode 100644
index f910b2691..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/tables.go
+++ /dev/null
@@ -1,4557 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-package idna
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "10.0.0"
-
-var mappings string = "" + // Size: 8176 bytes
- "\x00\x01 \x03 ̈\x01a\x03 Ì„\x012\x013\x03 Ì\x03 ̧\x011\x01o\x051â„4\x051â„2" +
- "\x053â„4\x03i̇\x03l·\x03ʼn\x01s\x03dž\x03â±¥\x03ⱦ\x01h\x01j\x01r\x01w\x01y" +
- "\x03 ̆\x03 ̇\x03 ÌŠ\x03 ̨\x03 ̃\x03 Ì‹\x01l\x01x\x04̈Ì\x03 ι\x01;\x05 ̈Ì" +
- "\x04եւ\x04اٴ\x04وٴ\x04ۇٴ\x04يٴ\x06क़\x06ख़\x06ग़\x06ज़\x06ड़\x06ढ़\x06फ़" +
- "\x06य़\x06ড়\x06ঢ়\x06য়\x06ਲ਼\x06ਸ਼\x06ਖ਼\x06ਗ਼\x06ਜ਼\x06ਫ਼\x06ଡ଼\x06ଢ଼" +
- "\x06à¹à¸²\x06à»àº²\x06ຫນ\x06ຫມ\x06གྷ\x06ཌྷ\x06དྷ\x06བྷ\x06ཛྷ\x06ཀྵ\x06ཱི\x06ཱུ" +
- "\x06ྲྀ\x09ྲཱྀ\x06ླྀ\x09ླཱྀ\x06ཱྀ\x06ྒྷ\x06ྜྷ\x06ྡྷ\x06ྦྷ\x06ྫྷ\x06à¾à¾µ\x02" +
- "в\x02д\x02о\x02Ñ\x02Ñ‚\x02ÑŠ\x02Ñ£\x02æ\x01b\x01d\x01e\x02Ç\x01g\x01i\x01k" +
- "\x01m\x01n\x02È£\x01p\x01t\x01u\x02É\x02É‘\x02É™\x02É›\x02Éœ\x02Å‹\x02É”\x02ɯ" +
- "\x01v\x02β\x02γ\x02δ\x02φ\x02χ\x02Ï\x02н\x02É’\x01c\x02É•\x02ð\x01f\x02ÉŸ" +
- "\x02É¡\x02É¥\x02ɨ\x02É©\x02ɪ\x02Ê\x02É­\x02ÊŸ\x02ɱ\x02É°\x02ɲ\x02ɳ\x02É´\x02ɵ" +
- "\x02ɸ\x02Ê‚\x02ʃ\x02Æ«\x02ʉ\x02ÊŠ\x02Ê‹\x02ÊŒ\x01z\x02Ê\x02Ê‘\x02Ê’\x02θ\x02ss" +
- "\x02ά\x02έ\x02ή\x02ί\x02ÏŒ\x02Ï\x02ÏŽ\x05ἀι\x05á¼Î¹\x05ἂι\x05ἃι\x05ἄι\x05ἅι" +
- "\x05ἆι\x05ἇι\x05ἠι\x05ἡι\x05ἢι\x05ἣι\x05ἤι\x05ἥι\x05ἦι\x05ἧι\x05ὠι\x05ὡι" +
- "\x05ὢι\x05ὣι\x05ὤι\x05ὥι\x05ὦι\x05ὧι\x05ὰι\x04αι\x04άι\x05ᾶι\x02ι\x05 ̈͂" +
- "\x05ὴι\x04ηι\x04ήι\x05ῆι\x05 Ì“Ì€\x05 Ì“Ì\x05 Ì“Í‚\x02Î\x05 ̔̀\x05 Ì”Ì\x05 ̔͂" +
- "\x02ΰ\x05 ̈̀\x01`\x05ὼι\x04ωι\x04ώι\x05ῶι\x06′′\x09′′′\x06‵‵\x09‵‵‵\x02!" +
- "!\x02??\x02?!\x02!?\x0c′′′′\x010\x014\x015\x016\x017\x018\x019\x01+\x01=" +
- "\x01(\x01)\x02rs\x02ħ\x02no\x01q\x02sm\x02tm\x02ω\x02Ã¥\x02×\x02ב\x02×’" +
- "\x02ד\x02Ï€\x051â„7\x051â„9\x061â„10\x051â„3\x052â„3\x051â„5\x052â„5\x053â„5\x054" +
- "â„5\x051â„6\x055â„6\x051â„8\x053â„8\x055â„8\x057â„8\x041â„\x02ii\x02iv\x02vi" +
- "\x04viii\x02ix\x02xi\x050â„3\x06∫∫\x09∫∫∫\x06∮∮\x09∮∮∮\x0210\x0211\x0212" +
- "\x0213\x0214\x0215\x0216\x0217\x0218\x0219\x0220\x04(10)\x04(11)\x04(12)" +
- "\x04(13)\x04(14)\x04(15)\x04(16)\x04(17)\x04(18)\x04(19)\x04(20)\x0c∫∫∫∫" +
- "\x02==\x05â«Ì¸\x02É«\x02ɽ\x02È¿\x02É€\x01.\x04 ã‚™\x04 ã‚š\x06より\x06コト\x05(á„€)\x05" +
- "(á„‚)\x05(ᄃ)\x05(á„…)\x05(ᄆ)\x05(ᄇ)\x05(ᄉ)\x05(á„‹)\x05(á„Œ)\x05(á„Ž)\x05(á„)\x05(á„" +
- ")\x05(á„‘)\x05(á„’)\x05(ê°€)\x05(나)\x05(다)\x05(ë¼)\x05(마)\x05(ë°”)\x05(사)\x05(ì•„)" +
- "\x05(ìž)\x05(ì°¨)\x05(ì¹´)\x05(타)\x05(파)\x05(하)\x05(주)\x08(오전)\x08(오후)\x05(一)" +
- "\x05(二)\x05(三)\x05(å››)\x05(五)\x05(å…­)\x05(七)\x05(å…«)\x05(ä¹)\x05(å)\x05(月)" +
- "\x05(ç«)\x05(æ°´)\x05(木)\x05(金)\x05(土)\x05(æ—¥)\x05(æ ª)\x05(有)\x05(社)\x05(å)" +
- "\x05(特)\x05(財)\x05(ç¥)\x05(労)\x05(代)\x05(呼)\x05(å­¦)\x05(監)\x05(ä¼)\x05(資)" +
- "\x05(å”)\x05(祭)\x05(休)\x05(自)\x05(至)\x0221\x0222\x0223\x0224\x0225\x0226" +
- "\x0227\x0228\x0229\x0230\x0231\x0232\x0233\x0234\x0235\x06참고\x06주ì˜\x0236" +
- "\x0237\x0238\x0239\x0240\x0241\x0242\x0243\x0244\x0245\x0246\x0247\x0248" +
- "\x0249\x0250\x041月\x042月\x043月\x044月\x045月\x046月\x047月\x048月\x049月\x0510" +
- "月\x0511月\x0512月\x02hg\x02ev\x0cアパート\x0cアルファ\x0cアンペア\x09アール\x0cイニング\x09" +
- "インãƒ\x09ウォン\x0fエスクード\x0cエーカー\x09オンス\x09オーム\x09カイリ\x0cカラット\x0cカロリー\x09ガロ" +
- "ン\x09ガンマ\x06ギガ\x09ギニー\x0cキュリー\x0cギルダー\x06キロ\x0fキログラム\x12キロメートル\x0fキロワッ" +
- "ト\x09グラム\x0fグラムトン\x0fクルゼイロ\x0cクローãƒ\x09ケース\x09コルナ\x09コーãƒ\x0cサイクル\x0fサンãƒ" +
- "ーム\x0cシリング\x09センãƒ\x09セント\x09ダース\x06デシ\x06ドル\x06トン\x06ナノ\x09ノット\x09ãƒã‚¤ãƒ„" +
- "\x0fパーセント\x09パーツ\x0cãƒãƒ¼ãƒ¬ãƒ«\x0fピアストル\x09ピクル\x06ピコ\x06ビル\x0fファラッド\x0cフィート" +
- "\x0fブッシェル\x09フラン\x0fヘクタール\x06ペソ\x09ペニヒ\x09ヘルツ\x09ペンス\x09ページ\x09ベータ\x0cãƒã‚¤" +
- "ント\x09ボルト\x06ホン\x09ãƒãƒ³ãƒ‰\x09ホール\x09ホーン\x0cマイクロ\x09マイル\x09マッãƒ\x09マルク\x0fマ" +
- "ンション\x0cミクロン\x06ミリ\x0fミリãƒãƒ¼ãƒ«\x06メガ\x0cメガトン\x0cメートル\x09ヤード\x09ヤール\x09ユアン" +
- "\x0cリットル\x06リラ\x09ルピー\x0cルーブル\x06レム\x0fレントゲン\x09ワット\x040点\x041点\x042点" +
- "\x043点\x044点\x045点\x046点\x047点\x048点\x049点\x0510点\x0511点\x0512点\x0513点" +
- "\x0514点\x0515点\x0516点\x0517点\x0518点\x0519点\x0520点\x0521点\x0522点\x0523点" +
- "\x0524点\x02da\x02au\x02ov\x02pc\x02dm\x02iu\x06å¹³æˆ\x06昭和\x06大正\x06明治\x0cæ ª" +
- "å¼ä¼šç¤¾\x02pa\x02na\x02ma\x02ka\x02kb\x02mb\x02gb\x04kcal\x02pf\x02nf\x02m" +
- "g\x02kg\x02hz\x02ml\x02dl\x02kl\x02fm\x02nm\x02mm\x02cm\x02km\x02m2\x02m" +
- "3\x05m∕s\x06m∕s2\x07rad∕s\x08rad∕s2\x02ps\x02ns\x02ms\x02pv\x02nv\x02mv" +
- "\x02kv\x02pw\x02nw\x02mw\x02kw\x02bq\x02cc\x02cd\x06c∕kg\x02db\x02gy\x02" +
- "ha\x02hp\x02in\x02kk\x02kt\x02lm\x02ln\x02lx\x02ph\x02pr\x02sr\x02sv\x02" +
- "wb\x05v∕m\x05a∕m\x041日\x042日\x043日\x044日\x045日\x046日\x047日\x048日\x049日" +
- "\x0510æ—¥\x0511æ—¥\x0512æ—¥\x0513æ—¥\x0514æ—¥\x0515æ—¥\x0516æ—¥\x0517æ—¥\x0518æ—¥\x0519æ—¥" +
- "\x0520æ—¥\x0521æ—¥\x0522æ—¥\x0523æ—¥\x0524æ—¥\x0525æ—¥\x0526æ—¥\x0527æ—¥\x0528æ—¥\x0529æ—¥" +
- "\x0530æ—¥\x0531æ—¥\x02ÑŒ\x02ɦ\x02ɬ\x02Êž\x02ʇ\x02Å“\x04𤋮\x04𢡊\x04𢡄\x04ð£•\x04𥉉" +
- "\x04ð¥³\x04𧻓\x02ff\x02fi\x02fl\x02st\x04Õ´Õ¶\x04Õ´Õ¥\x04Õ´Õ«\x04Õ¾Õ¶\x04Õ´Õ­\x04×™Ö´" +
- "\x04ײַ\x02×¢\x02×”\x02×›\x02ל\x02×\x02ר\x02ת\x04ש×\x04שׂ\x06שּ×\x06שּׂ\x04×" +
- "Ö·\x04×Ö¸\x04×Ö¼\x04בּ\x04×’Ö¼\x04דּ\x04×”Ö¼\x04וּ\x04×–Ö¼\x04טּ\x04×™Ö¼\x04ךּ\x04" +
- "כּ\x04לּ\x04מּ\x04נּ\x04סּ\x04ףּ\x04פּ\x04צּ\x04קּ\x04רּ\x04שּ\x04תּ" +
- "\x04וֹ\x04בֿ\x04×›Ö¿\x04פֿ\x04×ל\x02Ù±\x02Ù»\x02Ù¾\x02Ú€\x02Ùº\x02Ù¿\x02Ù¹\x02Ú¤" +
- "\x02Ú¦\x02Ú„\x02Úƒ\x02Ú†\x02Ú‡\x02Ú\x02ÚŒ\x02ÚŽ\x02Úˆ\x02Ú˜\x02Ú‘\x02Ú©\x02Ú¯\x02Ú³" +
- "\x02Ú±\x02Úº\x02Ú»\x02Û€\x02Û\x02Ú¾\x02Û’\x02Û“\x02Ú­\x02Û‡\x02Û†\x02Ûˆ\x02Û‹\x02Û…" +
- "\x02Û‰\x02Û\x02Ù‰\x04ئا\x04ئە\x04ئو\x04ئۇ\x04ئۆ\x04ئۈ\x04ئÛ\x04ئى\x02ÛŒ\x04" +
- "ئج\x04ئح\x04ئم\x04ئي\x04بج\x04بح\x04بخ\x04بم\x04بى\x04بي\x04تج\x04تح" +
- "\x04تخ\x04تم\x04تى\x04تي\x04ثج\x04ثم\x04ثى\x04ثي\x04جح\x04جم\x04حج\x04حم" +
- "\x04خج\x04خح\x04خم\x04سج\x04سح\x04سخ\x04سم\x04صح\x04صم\x04ضج\x04ضح\x04ضخ" +
- "\x04ضم\x04طح\x04طم\x04ظم\x04عج\x04عم\x04غج\x04غم\x04Ùج\x04ÙØ­\x04ÙØ®\x04ÙÙ…" +
- "\x04ÙÙ‰\x04ÙÙŠ\x04قح\x04قم\x04قى\x04قي\x04كا\x04كج\x04كح\x04كخ\x04كل\x04كم" +
- "\x04كى\x04كي\x04لج\x04لح\x04لخ\x04لم\x04لى\x04لي\x04مج\x04مح\x04مخ\x04مم" +
- "\x04مى\x04مي\x04نج\x04نح\x04نخ\x04نم\x04نى\x04ني\x04هج\x04هم\x04هى\x04هي" +
- "\x04يج\x04يح\x04يخ\x04يم\x04يى\x04يي\x04ذٰ\x04رٰ\x04ىٰ\x05 ٌّ\x05 ÙÙ‘\x05" +
- " ÙŽÙ‘\x05 ÙÙ‘\x05 ÙÙ‘\x05 ّٰ\x04ئر\x04ئز\x04ئن\x04بر\x04بز\x04بن\x04تر\x04تز" +
- "\x04تن\x04ثر\x04ثز\x04ثن\x04ما\x04نر\x04نز\x04نن\x04ير\x04يز\x04ين\x04ئخ" +
- "\x04ئه\x04به\x04ته\x04صخ\x04له\x04نه\x04هٰ\x04يه\x04ثه\x04سه\x04شم\x04شه" +
- "\x06Ù€ÙŽÙ‘\x06Ù€ÙÙ‘\x06Ù€ÙÙ‘\x04طى\x04طي\x04عى\x04عي\x04غى\x04غي\x04سى\x04سي" +
- "\x04شى\x04شي\x04حى\x04حي\x04جى\x04جي\x04خى\x04خي\x04صى\x04صي\x04ضى\x04ضي" +
- "\x04شج\x04شح\x04شخ\x04شر\x04سر\x04صر\x04ضر\x04اً\x06تجم\x06تحج\x06تحم" +
- "\x06تخم\x06تمج\x06تمح\x06تمخ\x06جمح\x06حمي\x06حمى\x06سحج\x06سجح\x06سجى" +
- "\x06سمح\x06سمج\x06سمم\x06صحح\x06صمم\x06شحم\x06شجي\x06شمخ\x06شمم\x06ضحى" +
- "\x06ضخم\x06طمح\x06طمم\x06طمي\x06عجم\x06عمم\x06عمى\x06غمم\x06غمي\x06غمى" +
- "\x06Ùخم\x06قمح\x06قمم\x06لحم\x06لحي\x06لحى\x06لجج\x06لخم\x06لمح\x06محج" +
- "\x06محم\x06محي\x06مجح\x06مجم\x06مخج\x06مخم\x06مجخ\x06همج\x06همم\x06نحم" +
- "\x06نحى\x06نجم\x06نجى\x06نمي\x06نمى\x06يمم\x06بخي\x06تجي\x06تجى\x06تخي" +
- "\x06تخى\x06تمي\x06تمى\x06جمي\x06جحى\x06جمى\x06سخى\x06صحي\x06شحي\x06ضحي" +
- "\x06لجي\x06لمي\x06يحي\x06يجي\x06يمي\x06ممي\x06قمي\x06نحي\x06عمي\x06كمي" +
- "\x06نجح\x06مخي\x06لجم\x06كمم\x06جحي\x06حجي\x06مجي\x06Ùمي\x06بحي\x06سخي" +
- "\x06نجي\x06صلے\x06قلے\x08الله\x08اكبر\x08محمد\x08صلعم\x08رسول\x08عليه" +
- "\x08وسلم\x06صلى!صلى الله عليه وسلم\x0fجل جلاله\x08ریال\x01,\x01:\x01!" +
- "\x01?\x01_\x01{\x01}\x01[\x01]\x01#\x01&\x01*\x01-\x01<\x01>\x01\\\x01$" +
- "\x01%\x01@\x04ـً\x04Ù€ÙŽ\x04Ù€Ù\x04Ù€Ù\x04ـّ\x04ـْ\x02Ø¡\x02Ø¢\x02Ø£\x02ؤ\x02Ø¥" +
- "\x02ئ\x02ا\x02ب\x02ة\x02ت\x02ث\x02ج\x02ح\x02خ\x02د\x02ذ\x02ر\x02ز\x02س" +
- "\x02Ø´\x02ص\x02ض\x02Ø·\x02ظ\x02ع\x02غ\x02Ù\x02Ù‚\x02Ùƒ\x02Ù„\x02Ù…\x02Ù†\x02Ù‡" +
- "\x02و\x02ي\x04لآ\x04لأ\x04لإ\x04لا\x01\x22\x01'\x01/\x01^\x01|\x01~\x02¢" +
- "\x02£\x02¬\x02¦\x02Â¥\x08ð…—ð…¥\x08ð…˜ð…¥\x0cð…˜ð…¥ð…®\x0cð…˜ð…¥ð…¯\x0cð…˜ð…¥ð…°\x0cð…˜ð…¥ð…±\x0cð…˜ð…¥ð…²\x08ð†¹" +
- "ð…¥\x08ð†ºð…¥\x0cð†¹ð…¥ð…®\x0cð†ºð…¥ð…®\x0cð†¹ð…¥ð…¯\x0cð†ºð…¥ð…¯\x02ı\x02È·\x02α\x02ε\x02ζ\x02η\x02" +
- "κ\x02λ\x02μ\x02ν\x02ξ\x02ο\x02σ\x02Ï„\x02Ï…\x02ψ\x03∇\x03∂\x02Ï\x02Ù®\x02Ú¡" +
- "\x02Ù¯\x020,\x021,\x022,\x023,\x024,\x025,\x026,\x027,\x028,\x029,\x03(a)" +
- "\x03(b)\x03(c)\x03(d)\x03(e)\x03(f)\x03(g)\x03(h)\x03(i)\x03(j)\x03(k)" +
- "\x03(l)\x03(m)\x03(n)\x03(o)\x03(p)\x03(q)\x03(r)\x03(s)\x03(t)\x03(u)" +
- "\x03(v)\x03(w)\x03(x)\x03(y)\x03(z)\x07〔s〕\x02wz\x02hv\x02sd\x03ppv\x02w" +
- "c\x02mc\x02md\x02dj\x06ã»ã‹\x06ココ\x03サ\x03手\x03å­—\x03åŒ\x03デ\x03二\x03多\x03解" +
- "\x03天\x03交\x03映\x03ç„¡\x03æ–™\x03å‰\x03後\x03å†\x03æ–°\x03åˆ\x03終\x03生\x03販\x03声" +
- "\x03å¹\x03æ¼”\x03投\x03æ•\x03一\x03三\x03éŠ\x03å·¦\x03中\x03å³\x03指\x03èµ°\x03打\x03ç¦" +
- "\x03空\x03åˆ\x03満\x03有\x03月\x03申\x03割\x03å–¶\x03é…\x09〔本〕\x09〔三〕\x09〔二〕\x09〔安" +
- "〕\x09〔点〕\x09〔打〕\x09〔盗〕\x09〔å‹ã€•\x09〔敗〕\x03å¾—\x03å¯\x03丽\x03丸\x03ä¹\x03ä½ \x03" +
- "ä¾®\x03ä¾»\x03倂\x03åº\x03å‚™\x03僧\x03åƒ\x03ã’ž\x03å…\x03å…”\x03å…¤\x03å…·\x03ã’¹\x03å…§\x03" +
- "冗\x03冤\x03仌\x03冬\x03况\x03凵\x03刃\x03㓟\x03刻\x03剆\x03剷\x03㔕\x03勇\x03勉\x03" +
- "勤\x03勺\x03包\x03匆\x03北\x03å‰\x03å‘\x03åš\x03å³\x03å½\x03å¿\x03ç°\x03åŠ\x03åŸ\x03" +
- "å«\x03å±\x03å†\x03å’ž\x03å¸\x03呈\x03周\x03å’¢\x03哶\x03å”\x03å•“\x03å•£\x03å–„\x03å–™\x03" +
- "å–«\x03å–³\x03å—‚\x03圖\x03嘆\x03圗\x03噑\x03å™´\x03切\x03壮\x03城\x03埴\x03å \x03åž‹\x03" +
- "堲\x03報\x03墬\x03売\x03壷\x03夆\x03夢\x03奢\x03姬\x03娛\x03娧\x03姘\x03婦\x03㛮\x03" +
- "嬈\x03嬾\x03寃\x03寘\x03寧\x03寳\x03寿\x03å°†\x03å°¢\x03ãž\x03å± \x03å±®\x03å³€\x03å²\x03" +
- "嵃\x03嵮\x03嵫\x03嵼\x03巡\x03巢\x03㠯\x03巽\x03帨\x03帽\x03幩\x03㡢\x03㡼\x03庰\x03" +
- "庳\x03庶\x03廊\x03廾\x03èˆ\x03å¼¢\x03㣇\x03å½¢\x03彫\x03㣣\x03徚\x03å¿\x03å¿—\x03忹\x03" +
- "æ‚\x03㤺\x03㤜\x03æ‚”\x03惇\x03æ…ˆ\x03æ…Œ\x03æ…Ž\x03æ…º\x03憎\x03憲\x03憤\x03憯\x03懞\x03" +
- "懲\x03懶\x03æˆ\x03戛\x03æ‰\x03抱\x03æ‹”\x03æ\x03挽\x03拼\x03æ¨\x03掃\x03æ¤\x03æ¢\x03" +
- "æ…\x03掩\x03㨮\x03æ‘©\x03摾\x03æ’\x03æ‘·\x03㩬\x03æ•\x03敬\x03æ—£\x03書\x03晉\x03㬙\x03" +
- "æš‘\x03㬈\x03㫤\x03冒\x03冕\x03最\x03æšœ\x03è‚­\x03ä™\x03朗\x03望\x03朡\x03æž\x03æ“\x03" +
- "ã­‰\x03柺\x03æž…\x03æ¡’\x03梅\x03梎\x03æ Ÿ\x03椔\x03ã®\x03楂\x03榣\x03槪\x03檨\x03æ«›\x03" +
- "ã°˜\x03次\x03æ­”\x03㱎\x03æ­²\x03殟\x03殺\x03æ®»\x03汎\x03沿\x03æ³\x03汧\x03æ´–\x03æ´¾\x03" +
- "æµ·\x03æµ\x03浩\x03浸\x03涅\x03æ´´\x03港\x03æ¹®\x03ã´³\x03滋\x03滇\x03æ·¹\x03æ½®\x03濆\x03" +
- "瀹\x03瀞\x03瀛\x03㶖\x03çŠ\x03ç½\x03ç·\x03ç‚­\x03ç……\x03熜\x03爨\x03爵\x03ç‰\x03犀\x03" +
- "犕\x03çº\x03王\x03㺬\x03玥\x03㺸\x03瑇\x03ç‘œ\x03瑱\x03ç’…\x03ç“Š\x03ã¼›\x03甤\x03甾\x03" +
- "ç•°\x03ç˜\x03㿼\x03䀈\x03ç›´\x03眞\x03真\x03çŠ\x03䀹\x03çž‹\x03ä†\x03ä‚–\x03ç¡Ž\x03碌\x03" +
- "磌\x03䃣\x03祖\x03ç¦\x03秫\x03䄯\x03ç©€\x03ç©Š\x03ç©\x03䈂\x03篆\x03築\x03䈧\x03ç³’\x03" +
- "䊠\x03糨\x03ç³£\x03ç´€\x03çµ£\x03äŒ\x03ç·‡\x03縂\x03ç¹…\x03䌴\x03ä™\x03罺\x03羕\x03翺\x03" +
- "者\x03è \x03è°\x03ä•\x03育\x03脃\x03ä‹\x03脾\x03媵\x03舄\x03辞\x03ä‘«\x03芑\x03芋\x03" +
- "èŠ\x03劳\x03花\x03芳\x03芽\x03苦\x03è‹¥\x03èŒ\x03è£\x03莭\x03茣\x03莽\x03è§\x03è‘—\x03" +
- "è“\x03èŠ\x03èŒ\x03èœ\x03䔫\x03蓱\x03蓳\x03è”–\x03蕤\x03ä•\x03ä•¡\x03ä•«\x03è™\x03虜\x03" +
- "虧\x03虩\x03èš©\x03蚈\x03蜎\x03蛢\x03è¹\x03蜨\x03è«\x03螆\x03蟡\x03è \x03ä—¹\x03è¡ \x03" +
- "è¡£\x03裗\x03裞\x03䘵\x03裺\x03ã’»\x03äš¾\x03䛇\x03誠\x03è«­\x03變\x03豕\x03貫\x03è³\x03" +
- "贛\x03起\x03跋\x03趼\x03跰\x03軔\x03輸\x03邔\x03郱\x03鄑\x03鄛\x03鈸\x03鋗\x03鋘\x03" +
- "鉼\x03é¹\x03é•\x03é–‹\x03䦕\x03é–·\x03䧦\x03雃\x03嶲\x03霣\x03ä©®\x03䩶\x03韠\x03䪲\x03" +
- "頋\x03頩\x03飢\x03䬳\x03餩\x03馧\x03駂\x03駾\x03䯎\x03鬒\x03鱀\x03鳽\x03䳎\x03䳭\x03" +
- "鵧\x03䳸\x03麻\x03äµ–\x03黹\x03黾\x03é¼…\x03é¼\x03é¼–\x03é¼»"
-
-var xorData string = "" + // Size: 4855 bytes
- "\x02\x0c\x09\x02\xb0\xec\x02\xad\xd8\x02\xad\xd9\x02\x06\x07\x02\x0f\x12" +
- "\x02\x0f\x1f\x02\x0f\x1d\x02\x01\x13\x02\x0f\x16\x02\x0f\x0b\x02\x0f3" +
- "\x02\x0f7\x02\x0f?\x02\x0f/\x02\x0f*\x02\x0c&\x02\x0c*\x02\x0c;\x02\x0c9" +
- "\x02\x0c%\x02\xab\xed\x02\xab\xe2\x02\xab\xe3\x02\xa9\xe0\x02\xa9\xe1" +
- "\x02\xa9\xe6\x02\xa3\xcb\x02\xa3\xc8\x02\xa3\xc9\x02\x01#\x02\x01\x08" +
- "\x02\x0e>\x02\x0e'\x02\x0f\x03\x02\x03\x0d\x02\x03\x09\x02\x03\x17\x02" +
- "\x03\x0e\x02\x02\x03\x02\x011\x02\x01\x00\x02\x01\x10\x02\x03<\x02\x07" +
- "\x0d\x02\x02\x0c\x02\x0c0\x02\x01\x03\x02\x01\x01\x02\x01 \x02\x01\x22" +
- "\x02\x01)\x02\x01\x0a\x02\x01\x0c\x02\x02\x06\x02\x02\x02\x02\x03\x10" +
- "\x03\x037 \x03\x0b+\x03\x02\x01\x04\x02\x01\x02\x02\x019\x02\x03\x1c\x02" +
- "\x02$\x03\x80p$\x02\x03:\x02\x03\x0a\x03\xc1r.\x03\xc1r,\x03\xc1r\x02" +
- "\x02\x02:\x02\x02>\x02\x02,\x02\x02\x10\x02\x02\x00\x03\xc1s<\x03\xc1s*" +
- "\x03\xc2L$\x03\xc2L;\x02\x09)\x02\x0a\x19\x03\x83\xab\xe3\x03\x83\xab" +
- "\xf2\x03 4\xe0\x03\x81\xab\xea\x03\x81\xab\xf3\x03 4\xef\x03\x96\xe1\xcd" +
- "\x03\x84\xe5\xc3\x02\x0d\x11\x03\x8b\xec\xcb\x03\x94\xec\xcf\x03\x9a\xec" +
- "\xc2\x03\x8b\xec\xdb\x03\x94\xec\xdf\x03\x9a\xec\xd2\x03\x01\x0c!\x03" +
- "\x01\x0c#\x03ʠ\x9d\x03ʣ\x9c\x03ʢ\x9f\x03ʥ\x9e\x03ʤ\x91\x03ʧ\x90\x03ʦ\x93" +
- "\x03ʩ\x92\x03ʨ\x95\x03\xca\xf3\xb5\x03\xca\xf0\xb4\x03\xca\xf1\xb7\x03" +
- "\xca\xf6\xb6\x03\xca\xf7\x89\x03\xca\xf4\x88\x03\xca\xf5\x8b\x03\xca\xfa" +
- "\x8a\x03\xca\xfb\x8d\x03\xca\xf8\x8c\x03\xca\xf9\x8f\x03\xca\xfe\x8e\x03" +
- "\xca\xff\x81\x03\xca\xfc\x80\x03\xca\xfd\x83\x03\xca\xe2\x82\x03\xca\xe3" +
- "\x85\x03\xca\xe0\x84\x03\xca\xe1\x87\x03\xca\xe6\x86\x03\xca\xe7\x99\x03" +
- "\xca\xe4\x98\x03\xca\xe5\x9b\x03\xca\xea\x9a\x03\xca\xeb\x9d\x03\xca\xe8" +
- "\x9c\x03Ø“\x89\x03ß”\x8b\x02\x010\x03\x03\x04\x1e\x03\x04\x15\x12\x03\x0b" +
- "\x05,\x03\x06\x04\x00\x03\x06\x04)\x03\x06\x044\x03\x06\x04<\x03\x06\x05" +
- "\x1d\x03\x06\x06\x00\x03\x06\x06\x0a\x03\x06\x06'\x03\x06\x062\x03\x0786" +
- "\x03\x079/\x03\x079 \x03\x07:\x0e\x03\x07:\x1b\x03\x07:%\x03\x07;/\x03" +
- "\x07;%\x03\x074\x11\x03\x076\x09\x03\x077*\x03\x070\x01\x03\x070\x0f\x03" +
- "\x070.\x03\x071\x16\x03\x071\x04\x03\x0710\x03\x072\x18\x03\x072-\x03" +
- "\x073\x14\x03\x073>\x03\x07'\x09\x03\x07 \x00\x03\x07\x1f\x0b\x03\x07" +
- "\x18#\x03\x07\x18(\x03\x07\x186\x03\x07\x18\x03\x03\x07\x19\x16\x03\x07" +
- "\x116\x03\x07\x12'\x03\x07\x13\x10\x03\x07\x0c&\x03\x07\x0c\x08\x03\x07" +
- "\x0c\x13\x03\x07\x0d\x02\x03\x07\x0d\x1c\x03\x07\x0b5\x03\x07\x0b\x0a" +
- "\x03\x07\x0b\x01\x03\x07\x0b\x0f\x03\x07\x05\x00\x03\x07\x05\x09\x03\x07" +
- "\x05\x0b\x03\x07\x07\x01\x03\x07\x07\x08\x03\x07\x00<\x03\x07\x00+\x03" +
- "\x07\x01)\x03\x07\x01\x1b\x03\x07\x01\x08\x03\x07\x03?\x03\x0445\x03\x04" +
- "4\x08\x03\x0454\x03\x04)/\x03\x04)5\x03\x04+\x05\x03\x04+\x14\x03\x04+ " +
- "\x03\x04+<\x03\x04*&\x03\x04*\x22\x03\x04&8\x03\x04!\x01\x03\x04!\x22" +
- "\x03\x04\x11+\x03\x04\x10.\x03\x04\x104\x03\x04\x13=\x03\x04\x12\x04\x03" +
- "\x04\x12\x0a\x03\x04\x0d\x1d\x03\x04\x0d\x07\x03\x04\x0d \x03\x05<>\x03" +
- "\x055<\x03\x055!\x03\x055#\x03\x055&\x03\x054\x1d\x03\x054\x02\x03\x054" +
- "\x07\x03\x0571\x03\x053\x1a\x03\x053\x16\x03\x05.<\x03\x05.\x07\x03\x05)" +
- ":\x03\x05)<\x03\x05)\x0c\x03\x05)\x15\x03\x05+-\x03\x05+5\x03\x05$\x1e" +
- "\x03\x05$\x14\x03\x05'\x04\x03\x05'\x14\x03\x05&\x02\x03\x05\x226\x03" +
- "\x05\x22\x0c\x03\x05\x22\x1c\x03\x05\x19\x0a\x03\x05\x1b\x09\x03\x05\x1b" +
- "\x0c\x03\x05\x14\x07\x03\x05\x16?\x03\x05\x16\x0c\x03\x05\x0c\x05\x03" +
- "\x05\x0e\x0f\x03\x05\x01\x0e\x03\x05\x00(\x03\x05\x030\x03\x05\x03\x06" +
- "\x03\x0a==\x03\x0a=1\x03\x0a=,\x03\x0a=\x0c\x03\x0a??\x03\x0a<\x08\x03" +
- "\x0a9!\x03\x0a9)\x03\x0a97\x03\x0a99\x03\x0a6\x0a\x03\x0a6\x1c\x03\x0a6" +
- "\x17\x03\x0a7'\x03\x0a78\x03\x0a73\x03\x0a'\x01\x03\x0a'&\x03\x0a\x1f" +
- "\x0e\x03\x0a\x1f\x03\x03\x0a\x1f3\x03\x0a\x1b/\x03\x0a\x18\x19\x03\x0a" +
- "\x19\x01\x03\x0a\x16\x14\x03\x0a\x0e\x22\x03\x0a\x0f\x10\x03\x0a\x0f\x02" +
- "\x03\x0a\x0f \x03\x0a\x0c\x04\x03\x0a\x0b>\x03\x0a\x0b+\x03\x0a\x08/\x03" +
- "\x0a\x046\x03\x0a\x05\x14\x03\x0a\x00\x04\x03\x0a\x00\x10\x03\x0a\x00" +
- "\x14\x03\x0b<3\x03\x0b;*\x03\x0b9\x22\x03\x0b9)\x03\x0b97\x03\x0b+\x10" +
- "\x03\x0b((\x03\x0b&5\x03\x0b$\x1c\x03\x0b$\x12\x03\x0b%\x04\x03\x0b#<" +
- "\x03\x0b#0\x03\x0b#\x0d\x03\x0b#\x19\x03\x0b!:\x03\x0b!\x1f\x03\x0b!\x00" +
- "\x03\x0b\x1e5\x03\x0b\x1c\x1d\x03\x0b\x1d-\x03\x0b\x1d(\x03\x0b\x18.\x03" +
- "\x0b\x18 \x03\x0b\x18\x16\x03\x0b\x14\x13\x03\x0b\x15$\x03\x0b\x15\x22" +
- "\x03\x0b\x12\x1b\x03\x0b\x12\x10\x03\x0b\x132\x03\x0b\x13=\x03\x0b\x12" +
- "\x18\x03\x0b\x0c&\x03\x0b\x061\x03\x0b\x06:\x03\x0b\x05#\x03\x0b\x05<" +
- "\x03\x0b\x04\x0b\x03\x0b\x04\x04\x03\x0b\x04\x1b\x03\x0b\x042\x03\x0b" +
- "\x041\x03\x0b\x03\x03\x03\x0b\x03\x1d\x03\x0b\x03/\x03\x0b\x03+\x03\x0b" +
- "\x02\x1b\x03\x0b\x02\x00\x03\x0b\x01\x1e\x03\x0b\x01\x08\x03\x0b\x015" +
- "\x03\x06\x0d9\x03\x06\x0d=\x03\x06\x0d?\x03\x02\x001\x03\x02\x003\x03" +
- "\x02\x02\x19\x03\x02\x006\x03\x02\x02\x1b\x03\x02\x004\x03\x02\x00<\x03" +
- "\x02\x02\x0a\x03\x02\x02\x0e\x03\x02\x01\x1a\x03\x02\x01\x07\x03\x02\x01" +
- "\x05\x03\x02\x01\x0b\x03\x02\x01%\x03\x02\x01\x0c\x03\x02\x01\x04\x03" +
- "\x02\x01\x1c\x03\x02\x00.\x03\x02\x002\x03\x02\x00>\x03\x02\x00\x12\x03" +
- "\x02\x00\x16\x03\x02\x011\x03\x02\x013\x03\x02\x02 \x03\x02\x02%\x03\x02" +
- "\x02$\x03\x02\x028\x03\x02\x02;\x03\x02\x024\x03\x02\x012\x03\x02\x022" +
- "\x03\x02\x02/\x03\x02\x01,\x03\x02\x01\x13\x03\x02\x01\x16\x03\x02\x01" +
- "\x11\x03\x02\x01\x1e\x03\x02\x01\x15\x03\x02\x01\x17\x03\x02\x01\x0f\x03" +
- "\x02\x01\x08\x03\x02\x00?\x03\x02\x03\x07\x03\x02\x03\x0d\x03\x02\x03" +
- "\x13\x03\x02\x03\x1d\x03\x02\x03\x1f\x03\x02\x00\x03\x03\x02\x00\x0d\x03" +
- "\x02\x00\x01\x03\x02\x00\x1b\x03\x02\x00\x19\x03\x02\x00\x18\x03\x02\x00" +
- "\x13\x03\x02\x00/\x03\x07>\x12\x03\x07<\x1f\x03\x07>\x1d\x03\x06\x1d\x0e" +
- "\x03\x07>\x1c\x03\x07>:\x03\x07>\x13\x03\x04\x12+\x03\x07?\x03\x03\x07>" +
- "\x02\x03\x06\x224\x03\x06\x1a.\x03\x07<%\x03\x06\x1c\x0b\x03\x0609\x03" +
- "\x05\x1f\x01\x03\x04'\x08\x03\x93\xfd\xf5\x03\x02\x0d \x03\x02\x0d#\x03" +
- "\x02\x0d!\x03\x02\x0d&\x03\x02\x0d\x22\x03\x02\x0d/\x03\x02\x0d,\x03\x02" +
- "\x0d$\x03\x02\x0d'\x03\x02\x0d%\x03\x02\x0d;\x03\x02\x0d=\x03\x02\x0d?" +
- "\x03\x099.\x03\x08\x0b7\x03\x08\x02\x14\x03\x08\x14\x0d\x03\x08.:\x03" +
- "\x089'\x03\x0f\x0b\x18\x03\x0f\x1c1\x03\x0f\x17&\x03\x0f9\x1f\x03\x0f0" +
- "\x0c\x03\x0e\x0a9\x03\x0e\x056\x03\x0e\x1c#\x03\x0f\x13\x0e\x03\x072\x00" +
- "\x03\x070\x0d\x03\x072\x0b\x03\x06\x11\x18\x03\x070\x10\x03\x06\x0f(\x03" +
- "\x072\x05\x03\x06\x0f,\x03\x073\x15\x03\x06\x07\x08\x03\x05\x16\x02\x03" +
- "\x04\x0b \x03\x05:8\x03\x05\x16%\x03\x0a\x0d\x1f\x03\x06\x16\x10\x03\x05" +
- "\x1d5\x03\x05*;\x03\x05\x16\x1b\x03\x04.-\x03\x06\x1a\x19\x03\x04\x03," +
- "\x03\x0b87\x03\x04/\x0a\x03\x06\x00,\x03\x04-\x01\x03\x04\x1e-\x03\x06/(" +
- "\x03\x0a\x0b5\x03\x06\x0e7\x03\x06\x07.\x03\x0597\x03\x0a*%\x03\x0760" +
- "\x03\x06\x0c;\x03\x05'\x00\x03\x072.\x03\x072\x08\x03\x06=\x01\x03\x06" +
- "\x05\x1b\x03\x06\x06\x12\x03\x06$=\x03\x06'\x0d\x03\x04\x11\x0f\x03\x076" +
- ",\x03\x06\x07;\x03\x06.,\x03\x86\xf9\xea\x03\x8f\xff\xeb\x02\x092\x02" +
- "\x095\x02\x094\x02\x09;\x02\x09>\x02\x098\x02\x09*\x02\x09/\x02\x09,\x02" +
- "\x09%\x02\x09&\x02\x09#\x02\x09 \x02\x08!\x02\x08%\x02\x08$\x02\x08+\x02" +
- "\x08.\x02\x08*\x02\x08&\x02\x088\x02\x08>\x02\x084\x02\x086\x02\x080\x02" +
- "\x08\x10\x02\x08\x17\x02\x08\x12\x02\x08\x1d\x02\x08\x1f\x02\x08\x13\x02" +
- "\x08\x15\x02\x08\x14\x02\x08\x0c\x03\x8b\xfd\xd0\x03\x81\xec\xc6\x03\x87" +
- "\xe0\x8a\x03-2\xe3\x03\x80\xef\xe4\x03-2\xea\x03\x88\xe6\xeb\x03\x8e\xe6" +
- "\xe8\x03\x84\xe6\xe9\x03\x97\xe6\xee\x03-2\xf9\x03-2\xf6\x03\x8e\xe3\xad" +
- "\x03\x80\xe3\x92\x03\x88\xe3\x90\x03\x8e\xe3\x90\x03\x80\xe3\x97\x03\x88" +
- "\xe3\x95\x03\x88\xfe\xcb\x03\x8e\xfe\xca\x03\x84\xfe\xcd\x03\x91\xef\xc9" +
- "\x03-2\xc1\x03-2\xc0\x03-2\xcb\x03\x88@\x09\x03\x8e@\x08\x03\x8f\xe0\xf5" +
- "\x03\x8e\xe6\xf9\x03\x8e\xe0\xfa\x03\x93\xff\xf4\x03\x84\xee\xd3\x03\x0b" +
- "(\x04\x023 \x021;\x02\x01*\x03\x0b#\x10\x03\x0b 0\x03\x0b!\x10\x03\x0b!0" +
- "\x03\x07\x15\x08\x03\x09?5\x03\x07\x1f\x08\x03\x07\x17\x0b\x03\x09\x1f" +
- "\x15\x03\x0b\x1c7\x03\x0a+#\x03\x06\x1a\x1b\x03\x06\x1a\x14\x03\x0a\x01" +
- "\x18\x03\x06#\x1b\x03\x0a2\x0c\x03\x0a\x01\x04\x03\x09#;\x03\x08='\x03" +
- "\x08\x1a\x0a\x03\x07</\x03\x07:+\x03\x07\x07*\x03\x06&\x1c\x03\x09\x0c" +
- "\x16\x03\x09\x10\x0e\x03\x08'\x0f\x03\x08+\x09\x03\x074%\x03\x06!3\x03" +
- "\x06\x03+\x03\x0b\x1e\x19\x03\x0a))\x03\x09\x08\x19\x03\x08,\x05\x03\x07" +
- "<2\x03\x06\x1c>\x03\x0a\x111\x03\x09\x1b\x09\x03\x073.\x03\x07\x01\x00" +
- "\x03\x09/,\x03\x07#>\x03\x07\x048\x03\x0a\x1f\x22\x03\x098>\x03\x09\x11" +
- "\x00\x03\x08/\x17\x03\x06'\x22\x03\x0b\x1a+\x03\x0a\x22\x19\x03\x0a/1" +
- "\x03\x0974\x03\x09\x0f\x22\x03\x08,\x22\x03\x08?\x14\x03\x07$5\x03\x07<3" +
- "\x03\x07=*\x03\x07\x13\x18\x03\x068\x0a\x03\x06\x09\x16\x03\x06\x13\x00" +
- "\x03\x08\x067\x03\x08\x01\x03\x03\x08\x12\x1d\x03\x07+7\x03\x06(;\x03" +
- "\x06\x1c?\x03\x07\x0e\x17\x03\x0a\x06\x1d\x03\x0a\x19\x07\x03\x08\x14$" +
- "\x03\x07$;\x03\x08,$\x03\x08\x06\x0d\x03\x07\x16\x0a\x03\x06>>\x03\x0a" +
- "\x06\x12\x03\x0a\x14)\x03\x09\x0d\x1f\x03\x09\x12\x17\x03\x09\x19\x01" +
- "\x03\x08\x11 \x03\x08\x1d'\x03\x06<\x1a\x03\x0a.\x00\x03\x07'\x18\x03" +
- "\x0a\x22\x08\x03\x08\x0d\x0a\x03\x08\x13)\x03\x07*)\x03\x06<,\x03\x07" +
- "\x0b\x1a\x03\x09.\x14\x03\x09\x0d\x1e\x03\x07\x0e#\x03\x0b\x1d'\x03\x0a" +
- "\x0a8\x03\x09%2\x03\x08+&\x03\x080\x12\x03\x0a)4\x03\x08\x06\x1f\x03\x0b" +
- "\x1b\x1a\x03\x0a\x1b\x0f\x03\x0b\x1d*\x03\x09\x16$\x03\x090\x11\x03\x08" +
- "\x11\x08\x03\x0a*(\x03\x0a\x042\x03\x089,\x03\x074'\x03\x07\x0f\x05\x03" +
- "\x09\x0b\x0a\x03\x07\x1b\x01\x03\x09\x17:\x03\x09.\x0d\x03\x07.\x11\x03" +
- "\x09+\x15\x03\x080\x13\x03\x0b\x1f\x19\x03\x0a \x11\x03\x0a\x220\x03\x09" +
- "\x07;\x03\x08\x16\x1c\x03\x07,\x13\x03\x07\x0e/\x03\x06\x221\x03\x0a." +
- "\x0a\x03\x0a7\x02\x03\x0a\x032\x03\x0a\x1d.\x03\x091\x06\x03\x09\x19:" +
- "\x03\x08\x02/\x03\x060+\x03\x06\x0f-\x03\x06\x1c\x1f\x03\x06\x1d\x07\x03" +
- "\x0a,\x11\x03\x09=\x0d\x03\x09\x0b;\x03\x07\x1b/\x03\x0a\x1f:\x03\x09 " +
- "\x1f\x03\x09.\x10\x03\x094\x0b\x03\x09\x1a1\x03\x08#\x1a\x03\x084\x1d" +
- "\x03\x08\x01\x1f\x03\x08\x11\x22\x03\x07'8\x03\x07\x1a>\x03\x0757\x03" +
- "\x06&9\x03\x06+\x11\x03\x0a.\x0b\x03\x0a,>\x03\x0a4#\x03\x08%\x17\x03" +
- "\x07\x05\x22\x03\x07\x0c\x0b\x03\x0a\x1d+\x03\x0a\x19\x16\x03\x09+\x1f" +
- "\x03\x09\x08\x0b\x03\x08\x16\x18\x03\x08+\x12\x03\x0b\x1d\x0c\x03\x0a=" +
- "\x10\x03\x0a\x09\x0d\x03\x0a\x10\x11\x03\x09&0\x03\x08(\x1f\x03\x087\x07" +
- "\x03\x08\x185\x03\x07'6\x03\x06.\x05\x03\x06=\x04\x03\x06;;\x03\x06\x06," +
- "\x03\x0b\x18>\x03\x08\x00\x18\x03\x06 \x03\x03\x06<\x00\x03\x09%\x18\x03" +
- "\x0b\x1c<\x03\x0a%!\x03\x0a\x09\x12\x03\x0a\x16\x02\x03\x090'\x03\x09" +
- "\x0e=\x03\x08 \x0e\x03\x08>\x03\x03\x074>\x03\x06&?\x03\x06\x19\x09\x03" +
- "\x06?(\x03\x0a-\x0e\x03\x09:3\x03\x098:\x03\x09\x12\x0b\x03\x09\x1d\x17" +
- "\x03\x087\x05\x03\x082\x14\x03\x08\x06%\x03\x08\x13\x1f\x03\x06\x06\x0e" +
- "\x03\x0a\x22<\x03\x09/<\x03\x06>+\x03\x0a'?\x03\x0a\x13\x0c\x03\x09\x10<" +
- "\x03\x07\x1b=\x03\x0a\x19\x13\x03\x09\x22\x1d\x03\x09\x07\x0d\x03\x08)" +
- "\x1c\x03\x06=\x1a\x03\x0a/4\x03\x0a7\x11\x03\x0a\x16:\x03\x09?3\x03\x09:" +
- "/\x03\x09\x05\x0a\x03\x09\x14\x06\x03\x087\x22\x03\x080\x07\x03\x08\x1a" +
- "\x1f\x03\x07\x04(\x03\x07\x04\x09\x03\x06 %\x03\x06<\x08\x03\x0a+\x14" +
- "\x03\x09\x1d\x16\x03\x0a70\x03\x08 >\x03\x0857\x03\x070\x0a\x03\x06=\x12" +
- "\x03\x06\x16%\x03\x06\x1d,\x03\x099#\x03\x09\x10>\x03\x07 \x1e\x03\x08" +
- "\x0c<\x03\x08\x0b\x18\x03\x08\x15+\x03\x08,:\x03\x08%\x22\x03\x07\x0a$" +
- "\x03\x0b\x1c=\x03\x07+\x08\x03\x0a/\x05\x03\x0a \x07\x03\x0a\x12'\x03" +
- "\x09#\x11\x03\x08\x1b\x15\x03\x0a\x06\x01\x03\x09\x1c\x1b\x03\x0922\x03" +
- "\x07\x14<\x03\x07\x09\x04\x03\x061\x04\x03\x07\x0e\x01\x03\x0a\x13\x18" +
- "\x03\x0a-\x0c\x03\x0a?\x0d\x03\x0a\x09\x0a\x03\x091&\x03\x0a/\x0b\x03" +
- "\x08$<\x03\x083\x1d\x03\x08\x0c$\x03\x08\x0d\x07\x03\x08\x0d?\x03\x08" +
- "\x0e\x14\x03\x065\x0a\x03\x08\x1a#\x03\x08\x16#\x03\x0702\x03\x07\x03" +
- "\x1a\x03\x06(\x1d\x03\x06+\x1b\x03\x06\x0b\x05\x03\x06\x0b\x17\x03\x06" +
- "\x0c\x04\x03\x06\x1e\x19\x03\x06+0\x03\x062\x18\x03\x0b\x16\x1e\x03\x0a+" +
- "\x16\x03\x0a-?\x03\x0a#:\x03\x0a#\x10\x03\x0a%$\x03\x0a>+\x03\x0a01\x03" +
- "\x0a1\x10\x03\x0a\x099\x03\x0a\x0a\x12\x03\x0a\x19\x1f\x03\x0a\x19\x12" +
- "\x03\x09*)\x03\x09-\x16\x03\x09.1\x03\x09.2\x03\x09<\x0e\x03\x09> \x03" +
- "\x093\x12\x03\x09\x0b\x01\x03\x09\x1c2\x03\x09\x11\x1c\x03\x09\x15%\x03" +
- "\x08,&\x03\x08!\x22\x03\x089(\x03\x08\x0b\x1a\x03\x08\x0d2\x03\x08\x0c" +
- "\x04\x03\x08\x0c\x06\x03\x08\x0c\x1f\x03\x08\x0c\x0c\x03\x08\x0f\x1f\x03" +
- "\x08\x0f\x1d\x03\x08\x00\x14\x03\x08\x03\x14\x03\x08\x06\x16\x03\x08\x1e" +
- "#\x03\x08\x11\x11\x03\x08\x10\x18\x03\x08\x14(\x03\x07)\x1e\x03\x07.1" +
- "\x03\x07 $\x03\x07 '\x03\x078\x08\x03\x07\x0d0\x03\x07\x0f7\x03\x07\x05#" +
- "\x03\x07\x05\x1a\x03\x07\x1a7\x03\x07\x1d-\x03\x07\x17\x10\x03\x06)\x1f" +
- "\x03\x062\x0b\x03\x066\x16\x03\x06\x09\x11\x03\x09(\x1e\x03\x07!5\x03" +
- "\x0b\x11\x16\x03\x0a/\x04\x03\x0a,\x1a\x03\x0b\x173\x03\x0a,1\x03\x0a/5" +
- "\x03\x0a\x221\x03\x0a\x22\x0d\x03\x0a?%\x03\x0a<,\x03\x0a?#\x03\x0a>\x19" +
- "\x03\x0a\x08&\x03\x0a\x0b\x0e\x03\x0a\x0c:\x03\x0a\x0c+\x03\x0a\x03\x22" +
- "\x03\x0a\x06)\x03\x0a\x11\x10\x03\x0a\x11\x1a\x03\x0a\x17-\x03\x0a\x14(" +
- "\x03\x09)\x1e\x03\x09/\x09\x03\x09.\x00\x03\x09,\x07\x03\x09/*\x03\x09-9" +
- "\x03\x09\x228\x03\x09%\x09\x03\x09:\x12\x03\x09;\x1d\x03\x09?\x06\x03" +
- "\x093%\x03\x096\x05\x03\x096\x08\x03\x097\x02\x03\x09\x07,\x03\x09\x04," +
- "\x03\x09\x1f\x16\x03\x09\x11\x03\x03\x09\x11\x12\x03\x09\x168\x03\x08*" +
- "\x05\x03\x08/2\x03\x084:\x03\x08\x22+\x03\x08 0\x03\x08&\x0a\x03\x08;" +
- "\x10\x03\x08>$\x03\x08>\x18\x03\x0829\x03\x082:\x03\x081,\x03\x081<\x03" +
- "\x081\x1c\x03\x087#\x03\x087*\x03\x08\x09'\x03\x08\x00\x1d\x03\x08\x05-" +
- "\x03\x08\x1f4\x03\x08\x1d\x04\x03\x08\x16\x0f\x03\x07*7\x03\x07'!\x03" +
- "\x07%\x1b\x03\x077\x0c\x03\x07\x0c1\x03\x07\x0c.\x03\x07\x00\x06\x03\x07" +
- "\x01\x02\x03\x07\x010\x03\x07\x06=\x03\x07\x01\x03\x03\x07\x01\x13\x03" +
- "\x07\x06\x06\x03\x07\x05\x0a\x03\x07\x1f\x09\x03\x07\x17:\x03\x06*1\x03" +
- "\x06-\x1d\x03\x06\x223\x03\x062:\x03\x060$\x03\x066\x1e\x03\x064\x12\x03" +
- "\x0645\x03\x06\x0b\x00\x03\x06\x0b7\x03\x06\x07\x1f\x03\x06\x15\x12\x03" +
- "\x0c\x05\x0f\x03\x0b+\x0b\x03\x0b+-\x03\x06\x16\x1b\x03\x06\x15\x17\x03" +
- "\x89\xca\xea\x03\x89\xca\xe8\x03\x0c8\x10\x03\x0c8\x01\x03\x0c8\x0f\x03" +
- "\x0d8%\x03\x0d8!\x03\x0c8-\x03\x0c8/\x03\x0c8+\x03\x0c87\x03\x0c85\x03" +
- "\x0c9\x09\x03\x0c9\x0d\x03\x0c9\x0f\x03\x0c9\x0b\x03\xcfu\x0c\x03\xcfu" +
- "\x0f\x03\xcfu\x0e\x03\xcfu\x09\x03\x0c9\x10\x03\x0d9\x0c\x03\xcf`;\x03" +
- "\xcf`>\x03\xcf`9\x03\xcf`8\x03\xcf`7\x03\xcf`*\x03\xcf`-\x03\xcf`,\x03" +
- "\x0d\x1b\x1a\x03\x0d\x1b&\x03\x0c=.\x03\x0c=%\x03\x0c>\x1e\x03\x0c>\x14" +
- "\x03\x0c?\x06\x03\x0c?\x0b\x03\x0c?\x0c\x03\x0c?\x0d\x03\x0c?\x02\x03" +
- "\x0c>\x0f\x03\x0c>\x08\x03\x0c>\x09\x03\x0c>,\x03\x0c>\x0c\x03\x0c?\x13" +
- "\x03\x0c?\x16\x03\x0c?\x15\x03\x0c?\x1c\x03\x0c?\x1f\x03\x0c?\x1d\x03" +
- "\x0c?\x1a\x03\x0c?\x17\x03\x0c?\x08\x03\x0c?\x09\x03\x0c?\x0e\x03\x0c?" +
- "\x04\x03\x0c?\x05\x03\x0c<?\x03\x0c=\x00\x03\x0c=\x06\x03\x0c=\x05\x03" +
- "\x0c=\x0c\x03\x0c=\x0f\x03\x0c=\x0d\x03\x0c=\x0b\x03\x0c=\x07\x03\x0c=" +
- "\x19\x03\x0c=\x15\x03\x0c=\x11\x03\x0c=1\x03\x0c=3\x03\x0c=0\x03\x0c=>" +
- "\x03\x0c=2\x03\x0c=6\x03\x0c<\x07\x03\x0c<\x05\x03\x0e:!\x03\x0e:#\x03" +
- "\x0e8\x09\x03\x0e:&\x03\x0e8\x0b\x03\x0e:$\x03\x0e:,\x03\x0e8\x1a\x03" +
- "\x0e8\x1e\x03\x0e:*\x03\x0e:7\x03\x0e:5\x03\x0e:;\x03\x0e:\x15\x03\x0e:<" +
- "\x03\x0e:4\x03\x0e:'\x03\x0e:-\x03\x0e:%\x03\x0e:?\x03\x0e:=\x03\x0e:)" +
- "\x03\x0e:/\x03\xcfs'\x03\x0d=\x0f\x03\x0d+*\x03\x0d99\x03\x0d9;\x03\x0d9" +
- "?\x03\x0d)\x0d\x03\x0d(%\x02\x01\x18\x02\x01(\x02\x01\x1e\x03\x0f$!\x03" +
- "\x0f87\x03\x0f4\x0e\x03\x0f5\x1d\x03\x06'\x03\x03\x0f\x08\x18\x03\x0f" +
- "\x0d\x1b\x03\x0e2=\x03\x0e;\x08\x03\x0e:\x0b\x03\x0e\x06$\x03\x0e\x0d)" +
- "\x03\x0e\x16\x1f\x03\x0e\x16\x1b\x03\x0d$\x0a\x03\x05,\x1d\x03\x0d. \x03" +
- "\x0d.#\x03\x0c(/\x03\x09%\x02\x03\x0d90\x03\x0d\x0e4\x03\x0d\x0d\x0f\x03" +
- "\x0c#\x00\x03\x0c,\x1e\x03\x0c2\x0e\x03\x0c\x01\x17\x03\x0c\x09:\x03\x0e" +
- "\x173\x03\x0c\x08\x03\x03\x0c\x11\x07\x03\x0c\x10\x18\x03\x0c\x1f\x1c" +
- "\x03\x0c\x19\x0e\x03\x0c\x1a\x1f\x03\x0f0>\x03\x0b->\x03\x0b<+\x03\x0b8" +
- "\x13\x03\x0b\x043\x03\x0b\x14\x03\x03\x0b\x16%\x03\x0d\x22&\x03\x0b\x1a" +
- "\x1a\x03\x0b\x1a\x04\x03\x0a%9\x03\x0a&2\x03\x0a&0\x03\x0a!\x1a\x03\x0a!" +
- "7\x03\x0a5\x10\x03\x0a=4\x03\x0a?\x0e\x03\x0a>\x10\x03\x0a\x00 \x03\x0a" +
- "\x0f:\x03\x0a\x0f9\x03\x0a\x0b\x0a\x03\x0a\x17%\x03\x0a\x1b-\x03\x09-" +
- "\x1a\x03\x09,4\x03\x09.,\x03\x09)\x09\x03\x096!\x03\x091\x1f\x03\x093" +
- "\x16\x03\x0c+\x1f\x03\x098 \x03\x098=\x03\x0c(\x1a\x03\x0c(\x16\x03\x09" +
- "\x0a+\x03\x09\x16\x12\x03\x09\x13\x0e\x03\x09\x153\x03\x08)!\x03\x09\x1a" +
- "\x01\x03\x09\x18\x01\x03\x08%#\x03\x08>\x22\x03\x08\x05%\x03\x08\x02*" +
- "\x03\x08\x15;\x03\x08\x1b7\x03\x0f\x07\x1d\x03\x0f\x04\x03\x03\x070\x0c" +
- "\x03\x07;\x0b\x03\x07\x08\x17\x03\x07\x12\x06\x03\x06/-\x03\x0671\x03" +
- "\x065+\x03\x06>7\x03\x06\x049\x03\x05+\x1e\x03\x05,\x17\x03\x05 \x1d\x03" +
- "\x05\x22\x05\x03\x050\x1d"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return idnaValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = idnaIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = idnaIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = idnaIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *idnaTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return idnaValues[c0]
- }
- i := idnaIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = idnaIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = idnaIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *idnaTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return idnaValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = idnaIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := idnaIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = idnaIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = idnaIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *idnaTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return idnaValues[c0]
- }
- i := idnaIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = idnaIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = idnaIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// idnaTrie. Total size: 29052 bytes (28.37 KiB). Checksum: ef06e7ecc26f36dd.
-type idnaTrie struct{}
-
-func newIdnaTrie(i int) *idnaTrie {
- return &idnaTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- case n < 125:
- return uint16(idnaValues[n<<6+uint32(b)])
- default:
- n -= 125
- return uint16(idnaSparse.lookup(n, b))
- }
-}
-
-// idnaValues: 127 blocks, 8128 entries, 16256 bytes
-// The third block is the zero block.
-var idnaValues = [8128]uint16{
- // Block 0x0, offset 0x0
- 0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,
- 0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,
- 0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,
- 0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,
- 0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,
- 0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,
- 0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,
- 0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,
- 0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,
- 0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,
- 0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,
- // Block 0x1, offset 0x40
- 0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,
- 0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,
- 0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,
- 0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,
- 0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,
- 0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,
- 0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,
- 0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,
- 0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,
- 0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,
- 0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,
- 0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,
- 0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,
- 0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,
- 0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,
- 0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,
- 0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x001a, 0xe9: 0x0018,
- 0xea: 0x0039, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x004a,
- 0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0069, 0xf3: 0x0079, 0xf4: 0x008a, 0xf5: 0x0005,
- 0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x00aa, 0xf9: 0x00c9, 0xfa: 0x00d9, 0xfb: 0x0018,
- 0xfc: 0x00e9, 0xfd: 0x0119, 0xfe: 0x0149, 0xff: 0x0018,
- // Block 0x4, offset 0x100
- 0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,
- 0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,
- 0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,
- 0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,
- 0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,
- 0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,
- 0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,
- 0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,
- 0x130: 0x0179, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,
- 0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,
- 0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0199,
- // Block 0x5, offset 0x140
- 0x140: 0x0199, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,
- 0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x01b9, 0x14a: 0xe00d, 0x14b: 0x0008,
- 0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,
- 0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,
- 0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,
- 0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,
- 0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,
- 0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,
- 0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,
- 0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,
- 0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x01d9,
- // Block 0x6, offset 0x180
- 0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,
- 0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,
- 0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,
- 0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,
- 0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,
- 0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,
- 0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,
- 0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,
- 0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,
- 0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,
- 0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x01e9, 0x1c5: 0x01e9,
- 0x1c6: 0x01e9, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,
- 0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,
- 0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,
- 0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,
- 0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,
- 0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,
- 0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,
- 0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,
- 0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,
- 0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,
- // Block 0x8, offset 0x200
- 0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,
- 0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,
- 0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,
- 0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,
- 0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,
- 0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,
- 0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,
- 0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,
- 0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,
- 0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0209, 0x23b: 0xe03d,
- 0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x0229, 0x23f: 0x0008,
- // Block 0x9, offset 0x240
- 0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,
- 0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,
- 0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,
- 0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,
- 0x258: 0x029a, 0x259: 0x02ba, 0x25a: 0x02da, 0x25b: 0x02fa, 0x25c: 0x031a, 0x25d: 0x033a,
- 0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0359, 0x262: 0x01d9, 0x263: 0x0369,
- 0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,
- 0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,
- 0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,
- 0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,
- 0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,
- // Block 0xa, offset 0x280
- 0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d,
- 0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,
- 0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,
- 0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,
- 0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,
- 0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,
- 0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,
- 0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,
- 0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,
- 0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008,
- 0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x008a, 0x2c5: 0x03d2,
- 0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,
- 0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,
- 0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,
- 0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,
- 0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,
- 0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,
- 0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,
- 0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,
- 0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,
- 0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,
- // Block 0xc, offset 0x300
- 0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,
- 0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,
- 0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,
- 0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,
- 0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,
- 0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,
- 0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,
- 0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,
- 0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,
- 0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,
- 0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,
- // Block 0xd, offset 0x340
- 0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,
- 0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,
- 0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,
- 0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,
- 0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,
- 0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,
- 0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,
- 0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,
- 0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,
- 0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,
- 0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,
- // Block 0xe, offset 0x380
- 0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,
- 0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,
- 0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,
- 0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,
- 0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,
- 0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,
- 0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,
- 0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,
- 0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,
- 0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,
- 0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,
- 0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,
- 0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,
- 0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,
- 0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,
- 0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,
- 0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,
- 0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,
- 0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,
- 0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,
- 0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,
- // Block 0x10, offset 0x400
- 0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,
- 0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,
- 0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,
- 0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,
- 0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,
- 0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,
- 0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,
- 0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,
- 0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,
- 0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,
- 0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,
- // Block 0x11, offset 0x440
- 0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,
- 0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,
- 0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,
- 0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,
- 0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,
- 0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,
- 0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,
- 0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,
- 0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,
- 0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,
- 0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,
- // Block 0x12, offset 0x480
- 0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,
- 0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,
- 0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,
- 0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,
- 0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,
- 0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,
- 0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,
- 0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,
- 0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429,
- 0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,
- 0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,
- 0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,
- 0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,
- 0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,
- 0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,
- 0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,
- 0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,
- 0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,
- 0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,
- 0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,
- 0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,
- // Block 0x14, offset 0x500
- 0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,
- 0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,
- 0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,
- 0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,
- 0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,
- 0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,
- 0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,
- 0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,
- 0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,
- 0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,
- 0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,
- // Block 0x15, offset 0x540
- 0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,
- 0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,
- 0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,
- 0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0808, 0x557: 0x0808,
- 0x558: 0x0808, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,
- 0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,
- 0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,
- 0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,
- 0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040,
- 0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040,
- 0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040,
- // Block 0x16, offset 0x580
- 0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308,
- 0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008,
- 0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308,
- 0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308,
- 0x598: 0x04c9, 0x599: 0x0501, 0x59a: 0x0539, 0x59b: 0x0571, 0x59c: 0x05a9, 0x59d: 0x05e1,
- 0x59e: 0x0619, 0x59f: 0x0651, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308,
- 0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008,
- 0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,
- 0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008,
- 0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008,
- 0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008,
- // Block 0x17, offset 0x5c0
- 0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008,
- 0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008,
- 0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040,
- 0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008,
- 0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008,
- 0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008,
- 0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040,
- 0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,
- 0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040,
- 0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040,
- 0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008,
- // Block 0x18, offset 0x600
- 0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040,
- 0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008,
- 0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040,
- 0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008,
- 0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0689, 0x61d: 0x06c1,
- 0x61e: 0x0040, 0x61f: 0x06f9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308,
- 0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008,
- 0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,
- 0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018,
- 0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018,
- 0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x0040, 0x63f: 0x0040,
- // Block 0x19, offset 0x640
- 0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008,
- 0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040,
- 0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040,
- 0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008,
- 0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008,
- 0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008,
- 0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040,
- 0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,
- 0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0731, 0x674: 0x0040, 0x675: 0x0008,
- 0x676: 0x0769, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040,
- 0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008,
- // Block 0x1a, offset 0x680
- 0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040,
- 0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308,
- 0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308,
- 0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040,
- 0x698: 0x0040, 0x699: 0x07a1, 0x69a: 0x07d9, 0x69b: 0x0811, 0x69c: 0x0008, 0x69d: 0x0040,
- 0x69e: 0x0849, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040,
- 0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008,
- 0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,
- 0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308,
- 0x6b6: 0x0040, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040,
- 0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040,
- // Block 0x1b, offset 0x6c0
- 0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008,
- 0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008,
- 0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008,
- 0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008,
- 0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008,
- 0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008,
- 0x6e4: 0x0008, 0x6e5: 0x0008, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0040,
- 0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,
- 0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008,
- 0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,
- 0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008,
- // Block 0x1c, offset 0x700
- 0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308,
- 0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008,
- 0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040,
- 0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040,
- 0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040,
- 0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308,
- 0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008,
- 0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,
- 0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040,
- 0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308,
- 0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308,
- // Block 0x1d, offset 0x740
- 0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008,
- 0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008,
- 0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040,
- 0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008,
- 0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008,
- 0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008,
- 0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040,
- 0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,
- 0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008,
- 0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040,
- 0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308,
- // Block 0x1e, offset 0x780
- 0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040,
- 0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008,
- 0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040,
- 0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x0040, 0x796: 0x3308, 0x797: 0x3008,
- 0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x0881, 0x79d: 0x08b9,
- 0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308,
- 0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008,
- 0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,
- 0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018,
- 0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040,
- 0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008,
- 0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040,
- 0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040,
- 0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040,
- 0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040,
- 0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008,
- 0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008,
- 0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008,
- 0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008,
- 0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040,
- 0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008,
- // Block 0x20, offset 0x800
- 0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040,
- 0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308,
- 0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040,
- 0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040,
- 0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040,
- 0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308,
- 0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008,
- 0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,
- 0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040,
- 0x836: 0x0040, 0x837: 0x0040, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018,
- 0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018,
- // Block 0x21, offset 0x840
- 0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0040, 0x845: 0x0008,
- 0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008,
- 0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040,
- 0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008,
- 0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008,
- 0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008,
- 0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040,
- 0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,
- 0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008,
- 0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040,
- 0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308,
- // Block 0x22, offset 0x880
- 0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040,
- 0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,
- 0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040,
- 0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040,
- 0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040,
- 0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,
- 0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,
- 0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,
- 0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040,
- 0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040,
- 0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040,
- 0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,
- 0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040,
- 0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008,
- 0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018,
- 0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,
- 0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,
- 0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,
- 0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018,
- 0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008,
- 0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008,
- // Block 0x24, offset 0x900
- 0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040,
- 0x906: 0x0040, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0040, 0x90a: 0x0008, 0x90b: 0x0040,
- 0x90c: 0x0040, 0x90d: 0x0008, 0x90e: 0x0040, 0x90f: 0x0040, 0x910: 0x0040, 0x911: 0x0040,
- 0x912: 0x0040, 0x913: 0x0040, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008,
- 0x918: 0x0040, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008,
- 0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0040, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,
- 0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0040, 0x929: 0x0040,
- 0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0040, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,
- 0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x0929, 0x934: 0x3308, 0x935: 0x3308,
- 0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x0040, 0x93b: 0x3308,
- 0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040,
- // Block 0x25, offset 0x940
- 0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x09d1, 0x944: 0x0008, 0x945: 0x0008,
- 0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,
- 0x94c: 0x0008, 0x94d: 0x0a09, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,
- 0x952: 0x0a41, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0a79,
- 0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0ab1, 0x95d: 0x0008,
- 0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,
- 0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0ae9,
- 0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040,
- 0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0b21, 0x974: 0x3308, 0x975: 0x0b59,
- 0x976: 0x0b91, 0x977: 0x0bc9, 0x978: 0x0c19, 0x979: 0x0c51, 0x97a: 0x3308, 0x97b: 0x3308,
- 0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008,
- // Block 0x26, offset 0x980
- 0x980: 0x3308, 0x981: 0x0ca1, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018,
- 0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,
- 0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308,
- 0x992: 0x3308, 0x993: 0x0cd9, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308,
- 0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0d11,
- 0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0d49, 0x9a3: 0x3308,
- 0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0d81, 0x9a8: 0x3308, 0x9a9: 0x3308,
- 0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0db9, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308,
- 0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308,
- 0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x0df1, 0x9ba: 0x3308, 0x9bb: 0x3308,
- 0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018,
- // Block 0x27, offset 0x9c0
- 0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008,
- 0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,
- 0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008,
- 0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008,
- 0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008,
- 0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008,
- 0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008,
- 0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0039, 0x9ed: 0x0ed1, 0x9ee: 0x0ee9, 0x9ef: 0x0008,
- 0x9f0: 0x0ef9, 0x9f1: 0x0f09, 0x9f2: 0x0f19, 0x9f3: 0x0f31, 0x9f4: 0x0249, 0x9f5: 0x0f41,
- 0x9f6: 0x0259, 0x9f7: 0x0f51, 0x9f8: 0x0359, 0x9f9: 0x0f61, 0x9fa: 0x0f71, 0x9fb: 0x0008,
- 0x9fc: 0x00d9, 0x9fd: 0x0f81, 0x9fe: 0x0f99, 0x9ff: 0x0269,
- // Block 0x28, offset 0xa00
- 0xa00: 0x0fa9, 0xa01: 0x0fb9, 0xa02: 0x0279, 0xa03: 0x0039, 0xa04: 0x0fc9, 0xa05: 0x0fe1,
- 0xa06: 0x059d, 0xa07: 0x0ee9, 0xa08: 0x0ef9, 0xa09: 0x0f09, 0xa0a: 0x0ff9, 0xa0b: 0x1011,
- 0xa0c: 0x1029, 0xa0d: 0x0f31, 0xa0e: 0x0008, 0xa0f: 0x0f51, 0xa10: 0x0f61, 0xa11: 0x1041,
- 0xa12: 0x00d9, 0xa13: 0x1059, 0xa14: 0x05b5, 0xa15: 0x05b5, 0xa16: 0x0f99, 0xa17: 0x0fa9,
- 0xa18: 0x0fb9, 0xa19: 0x059d, 0xa1a: 0x1071, 0xa1b: 0x1089, 0xa1c: 0x05cd, 0xa1d: 0x1099,
- 0xa1e: 0x10b1, 0xa1f: 0x10c9, 0xa20: 0x10e1, 0xa21: 0x10f9, 0xa22: 0x0f41, 0xa23: 0x0269,
- 0xa24: 0x0fb9, 0xa25: 0x1089, 0xa26: 0x1099, 0xa27: 0x10b1, 0xa28: 0x1111, 0xa29: 0x10e1,
- 0xa2a: 0x10f9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008,
- 0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008,
- 0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x1129, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008,
- 0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008,
- // Block 0x29, offset 0xa40
- 0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008,
- 0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008,
- 0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008,
- 0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008,
- 0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x1141, 0xa5c: 0x1159, 0xa5d: 0x1169,
- 0xa5e: 0x1181, 0xa5f: 0x1029, 0xa60: 0x1199, 0xa61: 0x11a9, 0xa62: 0x11c1, 0xa63: 0x11d9,
- 0xa64: 0x11f1, 0xa65: 0x1209, 0xa66: 0x1221, 0xa67: 0x05e5, 0xa68: 0x1239, 0xa69: 0x1251,
- 0xa6a: 0xe17d, 0xa6b: 0x1269, 0xa6c: 0x1281, 0xa6d: 0x1299, 0xa6e: 0x12b1, 0xa6f: 0x12c9,
- 0xa70: 0x12e1, 0xa71: 0x12f9, 0xa72: 0x1311, 0xa73: 0x1329, 0xa74: 0x1341, 0xa75: 0x1359,
- 0xa76: 0x1371, 0xa77: 0x1389, 0xa78: 0x05fd, 0xa79: 0x13a1, 0xa7a: 0x13b9, 0xa7b: 0x13d1,
- 0xa7c: 0x13e1, 0xa7d: 0x13f9, 0xa7e: 0x1411, 0xa7f: 0x1429,
- // Block 0x2a, offset 0xa80
- 0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,
- 0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,
- 0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,
- 0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008,
- 0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008,
- 0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,
- 0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,
- 0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,
- 0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,
- 0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,
- 0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,
- // Block 0x2b, offset 0xac0
- 0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,
- 0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,
- 0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,
- 0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,
- 0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x0615, 0xadb: 0x0635, 0xadc: 0x0008, 0xadd: 0x0008,
- 0xade: 0x1441, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,
- 0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,
- 0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,
- 0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,
- 0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,
- 0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,
- // Block 0x2c, offset 0xb00
- 0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008,
- 0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045,
- 0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008,
- 0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,
- 0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045,
- 0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008,
- 0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045,
- 0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045,
- 0xb30: 0x0008, 0xb31: 0x1459, 0xb32: 0x0008, 0xb33: 0x1471, 0xb34: 0x0008, 0xb35: 0x1489,
- 0xb36: 0x0008, 0xb37: 0x14a1, 0xb38: 0x0008, 0xb39: 0x14b9, 0xb3a: 0x0008, 0xb3b: 0x14d1,
- 0xb3c: 0x0008, 0xb3d: 0x14e9, 0xb3e: 0x0040, 0xb3f: 0x0040,
- // Block 0x2d, offset 0xb40
- 0xb40: 0x1501, 0xb41: 0x1531, 0xb42: 0x1561, 0xb43: 0x1591, 0xb44: 0x15c1, 0xb45: 0x15f1,
- 0xb46: 0x1621, 0xb47: 0x1651, 0xb48: 0x1501, 0xb49: 0x1531, 0xb4a: 0x1561, 0xb4b: 0x1591,
- 0xb4c: 0x15c1, 0xb4d: 0x15f1, 0xb4e: 0x1621, 0xb4f: 0x1651, 0xb50: 0x1681, 0xb51: 0x16b1,
- 0xb52: 0x16e1, 0xb53: 0x1711, 0xb54: 0x1741, 0xb55: 0x1771, 0xb56: 0x17a1, 0xb57: 0x17d1,
- 0xb58: 0x1681, 0xb59: 0x16b1, 0xb5a: 0x16e1, 0xb5b: 0x1711, 0xb5c: 0x1741, 0xb5d: 0x1771,
- 0xb5e: 0x17a1, 0xb5f: 0x17d1, 0xb60: 0x1801, 0xb61: 0x1831, 0xb62: 0x1861, 0xb63: 0x1891,
- 0xb64: 0x18c1, 0xb65: 0x18f1, 0xb66: 0x1921, 0xb67: 0x1951, 0xb68: 0x1801, 0xb69: 0x1831,
- 0xb6a: 0x1861, 0xb6b: 0x1891, 0xb6c: 0x18c1, 0xb6d: 0x18f1, 0xb6e: 0x1921, 0xb6f: 0x1951,
- 0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x1981, 0xb73: 0x19b1, 0xb74: 0x19d9, 0xb75: 0x0040,
- 0xb76: 0x0008, 0xb77: 0x1a01, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x064d, 0xb7b: 0x1459,
- 0xb7c: 0x19b1, 0xb7d: 0x0666, 0xb7e: 0x1a31, 0xb7f: 0x0686,
- // Block 0x2e, offset 0xb80
- 0xb80: 0x06a6, 0xb81: 0x1a4a, 0xb82: 0x1a79, 0xb83: 0x1aa9, 0xb84: 0x1ad1, 0xb85: 0x0040,
- 0xb86: 0x0008, 0xb87: 0x1af9, 0xb88: 0x06c5, 0xb89: 0x1471, 0xb8a: 0x06dd, 0xb8b: 0x1489,
- 0xb8c: 0x1aa9, 0xb8d: 0x1b2a, 0xb8e: 0x1b5a, 0xb8f: 0x1b8a, 0xb90: 0x0008, 0xb91: 0x0008,
- 0xb92: 0x0008, 0xb93: 0x1bb9, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008,
- 0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x06f5, 0xb9b: 0x14a1, 0xb9c: 0x0040, 0xb9d: 0x1bd2,
- 0xb9e: 0x1c02, 0xb9f: 0x1c32, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x1c61,
- 0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045,
- 0xbaa: 0x070d, 0xbab: 0x14d1, 0xbac: 0xe04d, 0xbad: 0x1c7a, 0xbae: 0x03d2, 0xbaf: 0x1caa,
- 0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x1cb9, 0xbb3: 0x1ce9, 0xbb4: 0x1d11, 0xbb5: 0x0040,
- 0xbb6: 0x0008, 0xbb7: 0x1d39, 0xbb8: 0x0725, 0xbb9: 0x14b9, 0xbba: 0x0515, 0xbbb: 0x14e9,
- 0xbbc: 0x1ce9, 0xbbd: 0x073e, 0xbbe: 0x075e, 0xbbf: 0x0040,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a,
- 0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0,
- 0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d,
- 0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x077e,
- 0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,
- 0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018,
- 0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040,
- 0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a,
- 0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x1d69, 0xbf4: 0x1da1, 0xbf5: 0x0018,
- 0xbf6: 0x1df1, 0xbf7: 0x1e29, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018,
- 0xbfc: 0x1e7a, 0xbfd: 0x0018, 0xbfe: 0x079e, 0xbff: 0x0018,
- // Block 0x30, offset 0xc00
- 0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018,
- 0xc06: 0x0018, 0xc07: 0x1e92, 0xc08: 0x1eaa, 0xc09: 0x1ec2, 0xc0a: 0x0018, 0xc0b: 0x0018,
- 0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018,
- 0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x1ed9,
- 0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,
- 0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340,
- 0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040,
- 0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340,
- 0xc30: 0x1f41, 0xc31: 0x0f41, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x1f51, 0xc35: 0x1f61,
- 0xc36: 0x1f71, 0xc37: 0x1f81, 0xc38: 0x1f91, 0xc39: 0x1fa1, 0xc3a: 0x1fb2, 0xc3b: 0x07bd,
- 0xc3c: 0x1fc2, 0xc3d: 0x1fd2, 0xc3e: 0x1fe2, 0xc3f: 0x0f71,
- // Block 0x31, offset 0xc40
- 0xc40: 0x1f41, 0xc41: 0x00c9, 0xc42: 0x0069, 0xc43: 0x0079, 0xc44: 0x1f51, 0xc45: 0x1f61,
- 0xc46: 0x1f71, 0xc47: 0x1f81, 0xc48: 0x1f91, 0xc49: 0x1fa1, 0xc4a: 0x1fb2, 0xc4b: 0x07d5,
- 0xc4c: 0x1fc2, 0xc4d: 0x1fd2, 0xc4e: 0x1fe2, 0xc4f: 0x0040, 0xc50: 0x0039, 0xc51: 0x0f09,
- 0xc52: 0x00d9, 0xc53: 0x0369, 0xc54: 0x0ff9, 0xc55: 0x0249, 0xc56: 0x0f51, 0xc57: 0x0359,
- 0xc58: 0x0f61, 0xc59: 0x0f71, 0xc5a: 0x0f99, 0xc5b: 0x01d9, 0xc5c: 0x0fa9, 0xc5d: 0x0040,
- 0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018,
- 0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x1ff1, 0xc69: 0x0018,
- 0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018,
- 0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018,
- 0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018,
- 0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018,
- // Block 0x32, offset 0xc80
- 0xc80: 0x07ee, 0xc81: 0x080e, 0xc82: 0x1159, 0xc83: 0x082d, 0xc84: 0x0018, 0xc85: 0x084e,
- 0xc86: 0x086e, 0xc87: 0x1011, 0xc88: 0x0018, 0xc89: 0x088d, 0xc8a: 0x0f31, 0xc8b: 0x0249,
- 0xc8c: 0x0249, 0xc8d: 0x0249, 0xc8e: 0x0249, 0xc8f: 0x2009, 0xc90: 0x0f41, 0xc91: 0x0f41,
- 0xc92: 0x0359, 0xc93: 0x0359, 0xc94: 0x0018, 0xc95: 0x0f71, 0xc96: 0x2021, 0xc97: 0x0018,
- 0xc98: 0x0018, 0xc99: 0x0f99, 0xc9a: 0x2039, 0xc9b: 0x0269, 0xc9c: 0x0269, 0xc9d: 0x0269,
- 0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x2049, 0xca1: 0x08ad, 0xca2: 0x2061, 0xca3: 0x0018,
- 0xca4: 0x13d1, 0xca5: 0x0018, 0xca6: 0x2079, 0xca7: 0x0018, 0xca8: 0x13d1, 0xca9: 0x0018,
- 0xcaa: 0x0f51, 0xcab: 0x2091, 0xcac: 0x0ee9, 0xcad: 0x1159, 0xcae: 0x0018, 0xcaf: 0x0f09,
- 0xcb0: 0x0f09, 0xcb1: 0x1199, 0xcb2: 0x0040, 0xcb3: 0x0f61, 0xcb4: 0x00d9, 0xcb5: 0x20a9,
- 0xcb6: 0x20c1, 0xcb7: 0x20d9, 0xcb8: 0x20f1, 0xcb9: 0x0f41, 0xcba: 0x0018, 0xcbb: 0x08cd,
- 0xcbc: 0x2109, 0xcbd: 0x10b1, 0xcbe: 0x10b1, 0xcbf: 0x2109,
- // Block 0x33, offset 0xcc0
- 0xcc0: 0x08ed, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0ef9,
- 0xcc6: 0x0ef9, 0xcc7: 0x0f09, 0xcc8: 0x0f41, 0xcc9: 0x0259, 0xcca: 0x0018, 0xccb: 0x0018,
- 0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x2121, 0xcd1: 0x2151,
- 0xcd2: 0x2181, 0xcd3: 0x21b9, 0xcd4: 0x21e9, 0xcd5: 0x2219, 0xcd6: 0x2249, 0xcd7: 0x2279,
- 0xcd8: 0x22a9, 0xcd9: 0x22d9, 0xcda: 0x2309, 0xcdb: 0x2339, 0xcdc: 0x2369, 0xcdd: 0x2399,
- 0xcde: 0x23c9, 0xcdf: 0x23f9, 0xce0: 0x0f41, 0xce1: 0x2421, 0xce2: 0x0905, 0xce3: 0x2439,
- 0xce4: 0x1089, 0xce5: 0x2451, 0xce6: 0x0925, 0xce7: 0x2469, 0xce8: 0x2491, 0xce9: 0x0369,
- 0xcea: 0x24a9, 0xceb: 0x0945, 0xcec: 0x0359, 0xced: 0x1159, 0xcee: 0x0ef9, 0xcef: 0x0f61,
- 0xcf0: 0x0f41, 0xcf1: 0x2421, 0xcf2: 0x0965, 0xcf3: 0x2439, 0xcf4: 0x1089, 0xcf5: 0x2451,
- 0xcf6: 0x0985, 0xcf7: 0x2469, 0xcf8: 0x2491, 0xcf9: 0x0369, 0xcfa: 0x24a9, 0xcfb: 0x09a5,
- 0xcfc: 0x0359, 0xcfd: 0x1159, 0xcfe: 0x0ef9, 0xcff: 0x0f61,
- // Block 0x34, offset 0xd00
- 0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018,
- 0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040,
- 0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,
- 0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,
- 0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040,
- 0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x00c9, 0xd21: 0x0069, 0xd22: 0x0079, 0xd23: 0x1f51,
- 0xd24: 0x1f61, 0xd25: 0x1f71, 0xd26: 0x1f81, 0xd27: 0x1f91, 0xd28: 0x1fa1, 0xd29: 0x2601,
- 0xd2a: 0x2619, 0xd2b: 0x2631, 0xd2c: 0x2649, 0xd2d: 0x2661, 0xd2e: 0x2679, 0xd2f: 0x2691,
- 0xd30: 0x26a9, 0xd31: 0x26c1, 0xd32: 0x26d9, 0xd33: 0x26f1, 0xd34: 0x0a06, 0xd35: 0x0a26,
- 0xd36: 0x0a46, 0xd37: 0x0a66, 0xd38: 0x0a86, 0xd39: 0x0aa6, 0xd3a: 0x0ac6, 0xd3b: 0x0ae6,
- 0xd3c: 0x0b06, 0xd3d: 0x270a, 0xd3e: 0x2732, 0xd3f: 0x275a,
- // Block 0x35, offset 0xd40
- 0xd40: 0x2782, 0xd41: 0x27aa, 0xd42: 0x27d2, 0xd43: 0x27fa, 0xd44: 0x2822, 0xd45: 0x284a,
- 0xd46: 0x2872, 0xd47: 0x289a, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040,
- 0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,
- 0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,
- 0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b26, 0xd5d: 0x0b46,
- 0xd5e: 0x0b66, 0xd5f: 0x0b86, 0xd60: 0x0ba6, 0xd61: 0x0bc6, 0xd62: 0x0be6, 0xd63: 0x0c06,
- 0xd64: 0x0c26, 0xd65: 0x0c46, 0xd66: 0x0c66, 0xd67: 0x0c86, 0xd68: 0x0ca6, 0xd69: 0x0cc6,
- 0xd6a: 0x0ce6, 0xd6b: 0x0d06, 0xd6c: 0x0d26, 0xd6d: 0x0d46, 0xd6e: 0x0d66, 0xd6f: 0x0d86,
- 0xd70: 0x0da6, 0xd71: 0x0dc6, 0xd72: 0x0de6, 0xd73: 0x0e06, 0xd74: 0x0e26, 0xd75: 0x0e46,
- 0xd76: 0x0039, 0xd77: 0x0ee9, 0xd78: 0x1159, 0xd79: 0x0ef9, 0xd7a: 0x0f09, 0xd7b: 0x1199,
- 0xd7c: 0x0f31, 0xd7d: 0x0249, 0xd7e: 0x0f41, 0xd7f: 0x0259,
- // Block 0x36, offset 0xd80
- 0xd80: 0x0f51, 0xd81: 0x0359, 0xd82: 0x0f61, 0xd83: 0x0f71, 0xd84: 0x00d9, 0xd85: 0x0f99,
- 0xd86: 0x2039, 0xd87: 0x0269, 0xd88: 0x01d9, 0xd89: 0x0fa9, 0xd8a: 0x0fb9, 0xd8b: 0x1089,
- 0xd8c: 0x0279, 0xd8d: 0x0369, 0xd8e: 0x0289, 0xd8f: 0x13d1, 0xd90: 0x0039, 0xd91: 0x0ee9,
- 0xd92: 0x1159, 0xd93: 0x0ef9, 0xd94: 0x0f09, 0xd95: 0x1199, 0xd96: 0x0f31, 0xd97: 0x0249,
- 0xd98: 0x0f41, 0xd99: 0x0259, 0xd9a: 0x0f51, 0xd9b: 0x0359, 0xd9c: 0x0f61, 0xd9d: 0x0f71,
- 0xd9e: 0x00d9, 0xd9f: 0x0f99, 0xda0: 0x2039, 0xda1: 0x0269, 0xda2: 0x01d9, 0xda3: 0x0fa9,
- 0xda4: 0x0fb9, 0xda5: 0x1089, 0xda6: 0x0279, 0xda7: 0x0369, 0xda8: 0x0289, 0xda9: 0x13d1,
- 0xdaa: 0x1f41, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018,
- 0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018,
- 0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018,
- 0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008,
- 0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008,
- 0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008,
- 0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008,
- 0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008,
- 0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x2971, 0xde3: 0x0ebd,
- 0xde4: 0x2989, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d,
- 0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0fe1, 0xdee: 0x1281, 0xdef: 0x0fc9,
- 0xdf0: 0x1141, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d,
- 0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008,
- 0xdfc: 0x0259, 0xdfd: 0x1089, 0xdfe: 0x29a1, 0xdff: 0x29b9,
- // Block 0x38, offset 0xe00
- 0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008,
- 0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008,
- 0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008,
- 0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008,
- 0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008,
- 0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008,
- 0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018,
- 0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308,
- 0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040,
- 0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018,
- 0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018,
- // Block 0x39, offset 0xe40
- 0xe40: 0x26fd, 0xe41: 0x271d, 0xe42: 0x273d, 0xe43: 0x275d, 0xe44: 0x277d, 0xe45: 0x279d,
- 0xe46: 0x27bd, 0xe47: 0x27dd, 0xe48: 0x27fd, 0xe49: 0x281d, 0xe4a: 0x283d, 0xe4b: 0x285d,
- 0xe4c: 0x287d, 0xe4d: 0x289d, 0xe4e: 0x28bd, 0xe4f: 0x28dd, 0xe50: 0x28fd, 0xe51: 0x291d,
- 0xe52: 0x293d, 0xe53: 0x295d, 0xe54: 0x297d, 0xe55: 0x299d, 0xe56: 0x0040, 0xe57: 0x0040,
- 0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040,
- 0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040,
- 0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040,
- 0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040,
- 0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040,
- 0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040,
- 0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x29d1, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008,
- 0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018,
- 0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018,
- 0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018,
- 0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018,
- 0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018,
- 0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018,
- 0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018,
- 0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018,
- 0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29bd, 0xeb9: 0x29dd, 0xeba: 0x29fd, 0xebb: 0x0018,
- 0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x2b3d, 0xec1: 0x2b5d, 0xec2: 0x2b7d, 0xec3: 0x2b9d, 0xec4: 0x2bbd, 0xec5: 0x2bdd,
- 0xec6: 0x2bdd, 0xec7: 0x2bdd, 0xec8: 0x2bfd, 0xec9: 0x2bfd, 0xeca: 0x2bfd, 0xecb: 0x2bfd,
- 0xecc: 0x2c1d, 0xecd: 0x2c1d, 0xece: 0x2c1d, 0xecf: 0x2c3d, 0xed0: 0x2c5d, 0xed1: 0x2c5d,
- 0xed2: 0x2a7d, 0xed3: 0x2a7d, 0xed4: 0x2c5d, 0xed5: 0x2c5d, 0xed6: 0x2c7d, 0xed7: 0x2c7d,
- 0xed8: 0x2c5d, 0xed9: 0x2c5d, 0xeda: 0x2a7d, 0xedb: 0x2a7d, 0xedc: 0x2c5d, 0xedd: 0x2c5d,
- 0xede: 0x2c3d, 0xedf: 0x2c3d, 0xee0: 0x2c9d, 0xee1: 0x2c9d, 0xee2: 0x2cbd, 0xee3: 0x2cbd,
- 0xee4: 0x0040, 0xee5: 0x2cdd, 0xee6: 0x2cfd, 0xee7: 0x2d1d, 0xee8: 0x2d1d, 0xee9: 0x2d3d,
- 0xeea: 0x2d5d, 0xeeb: 0x2d7d, 0xeec: 0x2d9d, 0xeed: 0x2dbd, 0xeee: 0x2ddd, 0xeef: 0x2dfd,
- 0xef0: 0x2e1d, 0xef1: 0x2e3d, 0xef2: 0x2e3d, 0xef3: 0x2e5d, 0xef4: 0x2e7d, 0xef5: 0x2e7d,
- 0xef6: 0x2e9d, 0xef7: 0x2ebd, 0xef8: 0x2e5d, 0xef9: 0x2edd, 0xefa: 0x2efd, 0xefb: 0x2edd,
- 0xefc: 0x2e5d, 0xefd: 0x2f1d, 0xefe: 0x2f3d, 0xeff: 0x2f5d,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x2f7d, 0xf01: 0x2f9d, 0xf02: 0x2cfd, 0xf03: 0x2cdd, 0xf04: 0x2fbd, 0xf05: 0x2fdd,
- 0xf06: 0x2ffd, 0xf07: 0x301d, 0xf08: 0x303d, 0xf09: 0x305d, 0xf0a: 0x307d, 0xf0b: 0x309d,
- 0xf0c: 0x30bd, 0xf0d: 0x30dd, 0xf0e: 0x30fd, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018,
- 0xf12: 0x311d, 0xf13: 0x313d, 0xf14: 0x315d, 0xf15: 0x317d, 0xf16: 0x319d, 0xf17: 0x31bd,
- 0xf18: 0x31dd, 0xf19: 0x31fd, 0xf1a: 0x321d, 0xf1b: 0x323d, 0xf1c: 0x315d, 0xf1d: 0x325d,
- 0xf1e: 0x327d, 0xf1f: 0x329d, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008,
- 0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008,
- 0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008,
- 0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008,
- 0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0040,
- 0xf3c: 0x0040, 0xf3d: 0x0040, 0xf3e: 0x0040, 0xf3f: 0x0040,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x36a2, 0xf41: 0x36d2, 0xf42: 0x3702, 0xf43: 0x3732, 0xf44: 0x32bd, 0xf45: 0x32dd,
- 0xf46: 0x32fd, 0xf47: 0x331d, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018,
- 0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x333d, 0xf51: 0x3761,
- 0xf52: 0x3779, 0xf53: 0x3791, 0xf54: 0x37a9, 0xf55: 0x37c1, 0xf56: 0x37d9, 0xf57: 0x37f1,
- 0xf58: 0x3809, 0xf59: 0x3821, 0xf5a: 0x3839, 0xf5b: 0x3851, 0xf5c: 0x3869, 0xf5d: 0x3881,
- 0xf5e: 0x3899, 0xf5f: 0x38b1, 0xf60: 0x335d, 0xf61: 0x337d, 0xf62: 0x339d, 0xf63: 0x33bd,
- 0xf64: 0x33dd, 0xf65: 0x33dd, 0xf66: 0x33fd, 0xf67: 0x341d, 0xf68: 0x343d, 0xf69: 0x345d,
- 0xf6a: 0x347d, 0xf6b: 0x349d, 0xf6c: 0x34bd, 0xf6d: 0x34dd, 0xf6e: 0x34fd, 0xf6f: 0x351d,
- 0xf70: 0x353d, 0xf71: 0x355d, 0xf72: 0x357d, 0xf73: 0x359d, 0xf74: 0x35bd, 0xf75: 0x35dd,
- 0xf76: 0x35fd, 0xf77: 0x361d, 0xf78: 0x363d, 0xf79: 0x365d, 0xf7a: 0x367d, 0xf7b: 0x369d,
- 0xf7c: 0x38c9, 0xf7d: 0x3901, 0xf7e: 0x36bd, 0xf7f: 0x0018,
- // Block 0x3e, offset 0xf80
- 0xf80: 0x36dd, 0xf81: 0x36fd, 0xf82: 0x371d, 0xf83: 0x373d, 0xf84: 0x375d, 0xf85: 0x377d,
- 0xf86: 0x379d, 0xf87: 0x37bd, 0xf88: 0x37dd, 0xf89: 0x37fd, 0xf8a: 0x381d, 0xf8b: 0x383d,
- 0xf8c: 0x385d, 0xf8d: 0x387d, 0xf8e: 0x389d, 0xf8f: 0x38bd, 0xf90: 0x38dd, 0xf91: 0x38fd,
- 0xf92: 0x391d, 0xf93: 0x393d, 0xf94: 0x395d, 0xf95: 0x397d, 0xf96: 0x399d, 0xf97: 0x39bd,
- 0xf98: 0x39dd, 0xf99: 0x39fd, 0xf9a: 0x3a1d, 0xf9b: 0x3a3d, 0xf9c: 0x3a5d, 0xf9d: 0x3a7d,
- 0xf9e: 0x3a9d, 0xf9f: 0x3abd, 0xfa0: 0x3add, 0xfa1: 0x3afd, 0xfa2: 0x3b1d, 0xfa3: 0x3b3d,
- 0xfa4: 0x3b5d, 0xfa5: 0x3b7d, 0xfa6: 0x127d, 0xfa7: 0x3b9d, 0xfa8: 0x3bbd, 0xfa9: 0x3bdd,
- 0xfaa: 0x3bfd, 0xfab: 0x3c1d, 0xfac: 0x3c3d, 0xfad: 0x3c5d, 0xfae: 0x239d, 0xfaf: 0x3c7d,
- 0xfb0: 0x3c9d, 0xfb1: 0x3939, 0xfb2: 0x3951, 0xfb3: 0x3969, 0xfb4: 0x3981, 0xfb5: 0x3999,
- 0xfb6: 0x39b1, 0xfb7: 0x39c9, 0xfb8: 0x39e1, 0xfb9: 0x39f9, 0xfba: 0x3a11, 0xfbb: 0x3a29,
- 0xfbc: 0x3a41, 0xfbd: 0x3a59, 0xfbe: 0x3a71, 0xfbf: 0x3a89,
- // Block 0x3f, offset 0xfc0
- 0xfc0: 0x3aa1, 0xfc1: 0x3ac9, 0xfc2: 0x3af1, 0xfc3: 0x3b19, 0xfc4: 0x3b41, 0xfc5: 0x3b69,
- 0xfc6: 0x3b91, 0xfc7: 0x3bb9, 0xfc8: 0x3be1, 0xfc9: 0x3c09, 0xfca: 0x3c39, 0xfcb: 0x3c69,
- 0xfcc: 0x3c99, 0xfcd: 0x3cbd, 0xfce: 0x3cb1, 0xfcf: 0x3cdd, 0xfd0: 0x3cfd, 0xfd1: 0x3d15,
- 0xfd2: 0x3d2d, 0xfd3: 0x3d45, 0xfd4: 0x3d5d, 0xfd5: 0x3d5d, 0xfd6: 0x3d45, 0xfd7: 0x3d75,
- 0xfd8: 0x07bd, 0xfd9: 0x3d8d, 0xfda: 0x3da5, 0xfdb: 0x3dbd, 0xfdc: 0x3dd5, 0xfdd: 0x3ded,
- 0xfde: 0x3e05, 0xfdf: 0x3e1d, 0xfe0: 0x3e35, 0xfe1: 0x3e4d, 0xfe2: 0x3e65, 0xfe3: 0x3e7d,
- 0xfe4: 0x3e95, 0xfe5: 0x3e95, 0xfe6: 0x3ead, 0xfe7: 0x3ead, 0xfe8: 0x3ec5, 0xfe9: 0x3ec5,
- 0xfea: 0x3edd, 0xfeb: 0x3ef5, 0xfec: 0x3f0d, 0xfed: 0x3f25, 0xfee: 0x3f3d, 0xfef: 0x3f3d,
- 0xff0: 0x3f55, 0xff1: 0x3f55, 0xff2: 0x3f55, 0xff3: 0x3f6d, 0xff4: 0x3f85, 0xff5: 0x3f9d,
- 0xff6: 0x3fb5, 0xff7: 0x3f9d, 0xff8: 0x3fcd, 0xff9: 0x3fe5, 0xffa: 0x3f6d, 0xffb: 0x3ffd,
- 0xffc: 0x4015, 0xffd: 0x4015, 0xffe: 0x4015, 0xfff: 0x0040,
- // Block 0x40, offset 0x1000
- 0x1000: 0x3cc9, 0x1001: 0x3d31, 0x1002: 0x3d99, 0x1003: 0x3e01, 0x1004: 0x3e51, 0x1005: 0x3eb9,
- 0x1006: 0x3f09, 0x1007: 0x3f59, 0x1008: 0x3fd9, 0x1009: 0x4041, 0x100a: 0x4091, 0x100b: 0x40e1,
- 0x100c: 0x4131, 0x100d: 0x4199, 0x100e: 0x4201, 0x100f: 0x4251, 0x1010: 0x42a1, 0x1011: 0x42d9,
- 0x1012: 0x4329, 0x1013: 0x4391, 0x1014: 0x43f9, 0x1015: 0x4431, 0x1016: 0x44b1, 0x1017: 0x4549,
- 0x1018: 0x45c9, 0x1019: 0x4619, 0x101a: 0x4699, 0x101b: 0x4719, 0x101c: 0x4781, 0x101d: 0x47d1,
- 0x101e: 0x4821, 0x101f: 0x4871, 0x1020: 0x48d9, 0x1021: 0x4959, 0x1022: 0x49c1, 0x1023: 0x4a11,
- 0x1024: 0x4a61, 0x1025: 0x4ab1, 0x1026: 0x4ae9, 0x1027: 0x4b21, 0x1028: 0x4b59, 0x1029: 0x4b91,
- 0x102a: 0x4be1, 0x102b: 0x4c31, 0x102c: 0x4cb1, 0x102d: 0x4d01, 0x102e: 0x4d69, 0x102f: 0x4de9,
- 0x1030: 0x4e39, 0x1031: 0x4e71, 0x1032: 0x4ea9, 0x1033: 0x4f29, 0x1034: 0x4f91, 0x1035: 0x5011,
- 0x1036: 0x5061, 0x1037: 0x50e1, 0x1038: 0x5119, 0x1039: 0x5169, 0x103a: 0x51b9, 0x103b: 0x5209,
- 0x103c: 0x5259, 0x103d: 0x52a9, 0x103e: 0x5311, 0x103f: 0x5361,
- // Block 0x41, offset 0x1040
- 0x1040: 0x5399, 0x1041: 0x53e9, 0x1042: 0x5439, 0x1043: 0x5489, 0x1044: 0x54f1, 0x1045: 0x5541,
- 0x1046: 0x5591, 0x1047: 0x55e1, 0x1048: 0x5661, 0x1049: 0x56c9, 0x104a: 0x5701, 0x104b: 0x5781,
- 0x104c: 0x57b9, 0x104d: 0x5821, 0x104e: 0x5889, 0x104f: 0x58d9, 0x1050: 0x5929, 0x1051: 0x5979,
- 0x1052: 0x59e1, 0x1053: 0x5a19, 0x1054: 0x5a69, 0x1055: 0x5ad1, 0x1056: 0x5b09, 0x1057: 0x5b89,
- 0x1058: 0x5bd9, 0x1059: 0x5c01, 0x105a: 0x5c29, 0x105b: 0x5c51, 0x105c: 0x5c79, 0x105d: 0x5ca1,
- 0x105e: 0x5cc9, 0x105f: 0x5cf1, 0x1060: 0x5d19, 0x1061: 0x5d41, 0x1062: 0x5d69, 0x1063: 0x5d99,
- 0x1064: 0x5dc9, 0x1065: 0x5df9, 0x1066: 0x5e29, 0x1067: 0x5e59, 0x1068: 0x5e89, 0x1069: 0x5eb9,
- 0x106a: 0x5ee9, 0x106b: 0x5f19, 0x106c: 0x5f49, 0x106d: 0x5f79, 0x106e: 0x5fa9, 0x106f: 0x5fd9,
- 0x1070: 0x6009, 0x1071: 0x402d, 0x1072: 0x6039, 0x1073: 0x6051, 0x1074: 0x404d, 0x1075: 0x6069,
- 0x1076: 0x6081, 0x1077: 0x6099, 0x1078: 0x406d, 0x1079: 0x406d, 0x107a: 0x60b1, 0x107b: 0x60c9,
- 0x107c: 0x6101, 0x107d: 0x6139, 0x107e: 0x6171, 0x107f: 0x61a9,
- // Block 0x42, offset 0x1080
- 0x1080: 0x6211, 0x1081: 0x6229, 0x1082: 0x408d, 0x1083: 0x6241, 0x1084: 0x6259, 0x1085: 0x6271,
- 0x1086: 0x6289, 0x1087: 0x62a1, 0x1088: 0x40ad, 0x1089: 0x62b9, 0x108a: 0x62e1, 0x108b: 0x62f9,
- 0x108c: 0x40cd, 0x108d: 0x40cd, 0x108e: 0x6311, 0x108f: 0x6329, 0x1090: 0x6341, 0x1091: 0x40ed,
- 0x1092: 0x410d, 0x1093: 0x412d, 0x1094: 0x414d, 0x1095: 0x416d, 0x1096: 0x6359, 0x1097: 0x6371,
- 0x1098: 0x6389, 0x1099: 0x63a1, 0x109a: 0x63b9, 0x109b: 0x418d, 0x109c: 0x63d1, 0x109d: 0x63e9,
- 0x109e: 0x6401, 0x109f: 0x41ad, 0x10a0: 0x41cd, 0x10a1: 0x6419, 0x10a2: 0x41ed, 0x10a3: 0x420d,
- 0x10a4: 0x422d, 0x10a5: 0x6431, 0x10a6: 0x424d, 0x10a7: 0x6449, 0x10a8: 0x6479, 0x10a9: 0x6211,
- 0x10aa: 0x426d, 0x10ab: 0x428d, 0x10ac: 0x42ad, 0x10ad: 0x42cd, 0x10ae: 0x64b1, 0x10af: 0x64f1,
- 0x10b0: 0x6539, 0x10b1: 0x6551, 0x10b2: 0x42ed, 0x10b3: 0x6569, 0x10b4: 0x6581, 0x10b5: 0x6599,
- 0x10b6: 0x430d, 0x10b7: 0x65b1, 0x10b8: 0x65c9, 0x10b9: 0x65b1, 0x10ba: 0x65e1, 0x10bb: 0x65f9,
- 0x10bc: 0x432d, 0x10bd: 0x6611, 0x10be: 0x6629, 0x10bf: 0x6611,
- // Block 0x43, offset 0x10c0
- 0x10c0: 0x434d, 0x10c1: 0x436d, 0x10c2: 0x0040, 0x10c3: 0x6641, 0x10c4: 0x6659, 0x10c5: 0x6671,
- 0x10c6: 0x6689, 0x10c7: 0x0040, 0x10c8: 0x66c1, 0x10c9: 0x66d9, 0x10ca: 0x66f1, 0x10cb: 0x6709,
- 0x10cc: 0x6721, 0x10cd: 0x6739, 0x10ce: 0x6401, 0x10cf: 0x6751, 0x10d0: 0x6769, 0x10d1: 0x6781,
- 0x10d2: 0x438d, 0x10d3: 0x6799, 0x10d4: 0x6289, 0x10d5: 0x43ad, 0x10d6: 0x43cd, 0x10d7: 0x67b1,
- 0x10d8: 0x0040, 0x10d9: 0x43ed, 0x10da: 0x67c9, 0x10db: 0x67e1, 0x10dc: 0x67f9, 0x10dd: 0x6811,
- 0x10de: 0x6829, 0x10df: 0x6859, 0x10e0: 0x6889, 0x10e1: 0x68b1, 0x10e2: 0x68d9, 0x10e3: 0x6901,
- 0x10e4: 0x6929, 0x10e5: 0x6951, 0x10e6: 0x6979, 0x10e7: 0x69a1, 0x10e8: 0x69c9, 0x10e9: 0x69f1,
- 0x10ea: 0x6a21, 0x10eb: 0x6a51, 0x10ec: 0x6a81, 0x10ed: 0x6ab1, 0x10ee: 0x6ae1, 0x10ef: 0x6b11,
- 0x10f0: 0x6b41, 0x10f1: 0x6b71, 0x10f2: 0x6ba1, 0x10f3: 0x6bd1, 0x10f4: 0x6c01, 0x10f5: 0x6c31,
- 0x10f6: 0x6c61, 0x10f7: 0x6c91, 0x10f8: 0x6cc1, 0x10f9: 0x6cf1, 0x10fa: 0x6d21, 0x10fb: 0x6d51,
- 0x10fc: 0x6d81, 0x10fd: 0x6db1, 0x10fe: 0x6de1, 0x10ff: 0x440d,
- // Block 0x44, offset 0x1100
- 0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,
- 0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,
- 0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,
- 0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,
- 0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0xe00d, 0x111d: 0x0008,
- 0x111e: 0xe00d, 0x111f: 0x0008, 0x1120: 0xe00d, 0x1121: 0x0008, 0x1122: 0xe00d, 0x1123: 0x0008,
- 0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008,
- 0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x3308,
- 0x1130: 0x3318, 0x1131: 0x3318, 0x1132: 0x3318, 0x1133: 0x0018, 0x1134: 0x3308, 0x1135: 0x3308,
- 0x1136: 0x3308, 0x1137: 0x3308, 0x1138: 0x3308, 0x1139: 0x3308, 0x113a: 0x3308, 0x113b: 0x3308,
- 0x113c: 0x3308, 0x113d: 0x3308, 0x113e: 0x0018, 0x113f: 0x0008,
- // Block 0x45, offset 0x1140
- 0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008,
- 0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008,
- 0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008,
- 0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008,
- 0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0x0ea1, 0x115d: 0x6e11,
- 0x115e: 0x3308, 0x115f: 0x3308, 0x1160: 0x0008, 0x1161: 0x0008, 0x1162: 0x0008, 0x1163: 0x0008,
- 0x1164: 0x0008, 0x1165: 0x0008, 0x1166: 0x0008, 0x1167: 0x0008, 0x1168: 0x0008, 0x1169: 0x0008,
- 0x116a: 0x0008, 0x116b: 0x0008, 0x116c: 0x0008, 0x116d: 0x0008, 0x116e: 0x0008, 0x116f: 0x0008,
- 0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008,
- 0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0x0008, 0x117a: 0x0008, 0x117b: 0x0008,
- 0x117c: 0x0008, 0x117d: 0x0008, 0x117e: 0x0008, 0x117f: 0x0008,
- // Block 0x46, offset 0x1180
- 0x1180: 0x0018, 0x1181: 0x0018, 0x1182: 0x0018, 0x1183: 0x0018, 0x1184: 0x0018, 0x1185: 0x0018,
- 0x1186: 0x0018, 0x1187: 0x0018, 0x1188: 0x0018, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0x0018,
- 0x118c: 0x0018, 0x118d: 0x0018, 0x118e: 0x0018, 0x118f: 0x0018, 0x1190: 0x0018, 0x1191: 0x0018,
- 0x1192: 0x0018, 0x1193: 0x0018, 0x1194: 0x0018, 0x1195: 0x0018, 0x1196: 0x0018, 0x1197: 0x0008,
- 0x1198: 0x0008, 0x1199: 0x0008, 0x119a: 0x0008, 0x119b: 0x0008, 0x119c: 0x0008, 0x119d: 0x0008,
- 0x119e: 0x0008, 0x119f: 0x0008, 0x11a0: 0x0018, 0x11a1: 0x0018, 0x11a2: 0xe00d, 0x11a3: 0x0008,
- 0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,
- 0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,
- 0x11b0: 0x0008, 0x11b1: 0x0008, 0x11b2: 0xe00d, 0x11b3: 0x0008, 0x11b4: 0xe00d, 0x11b5: 0x0008,
- 0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008,
- 0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008,
- // Block 0x47, offset 0x11c0
- 0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,
- 0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0xe00d, 0x11c9: 0x0008, 0x11ca: 0xe00d, 0x11cb: 0x0008,
- 0x11cc: 0xe00d, 0x11cd: 0x0008, 0x11ce: 0xe00d, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,
- 0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0xe00d, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,
- 0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,
- 0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,
- 0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,
- 0x11ea: 0xe00d, 0x11eb: 0x0008, 0x11ec: 0xe00d, 0x11ed: 0x0008, 0x11ee: 0xe00d, 0x11ef: 0x0008,
- 0x11f0: 0xe0fd, 0x11f1: 0x0008, 0x11f2: 0x0008, 0x11f3: 0x0008, 0x11f4: 0x0008, 0x11f5: 0x0008,
- 0x11f6: 0x0008, 0x11f7: 0x0008, 0x11f8: 0x0008, 0x11f9: 0xe01d, 0x11fa: 0x0008, 0x11fb: 0xe03d,
- 0x11fc: 0x0008, 0x11fd: 0x442d, 0x11fe: 0xe00d, 0x11ff: 0x0008,
- // Block 0x48, offset 0x1200
- 0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0xe00d, 0x1205: 0x0008,
- 0x1206: 0xe00d, 0x1207: 0x0008, 0x1208: 0x0008, 0x1209: 0x0018, 0x120a: 0x0018, 0x120b: 0xe03d,
- 0x120c: 0x0008, 0x120d: 0x11d9, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0xe00d, 0x1211: 0x0008,
- 0x1212: 0xe00d, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008,
- 0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0xe00d, 0x121b: 0x0008, 0x121c: 0xe00d, 0x121d: 0x0008,
- 0x121e: 0xe00d, 0x121f: 0x0008, 0x1220: 0xe00d, 0x1221: 0x0008, 0x1222: 0xe00d, 0x1223: 0x0008,
- 0x1224: 0xe00d, 0x1225: 0x0008, 0x1226: 0xe00d, 0x1227: 0x0008, 0x1228: 0xe00d, 0x1229: 0x0008,
- 0x122a: 0x6e29, 0x122b: 0x1029, 0x122c: 0x11c1, 0x122d: 0x6e41, 0x122e: 0x1221, 0x122f: 0x0040,
- 0x1230: 0x6e59, 0x1231: 0x6e71, 0x1232: 0x1239, 0x1233: 0x444d, 0x1234: 0xe00d, 0x1235: 0x0008,
- 0x1236: 0xe00d, 0x1237: 0x0008, 0x1238: 0x0040, 0x1239: 0x0040, 0x123a: 0x0040, 0x123b: 0x0040,
- 0x123c: 0x0040, 0x123d: 0x0040, 0x123e: 0x0040, 0x123f: 0x0040,
- // Block 0x49, offset 0x1240
- 0x1240: 0x64d5, 0x1241: 0x64f5, 0x1242: 0x6515, 0x1243: 0x6535, 0x1244: 0x6555, 0x1245: 0x6575,
- 0x1246: 0x6595, 0x1247: 0x65b5, 0x1248: 0x65d5, 0x1249: 0x65f5, 0x124a: 0x6615, 0x124b: 0x6635,
- 0x124c: 0x6655, 0x124d: 0x6675, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x6695, 0x1251: 0x0008,
- 0x1252: 0x66b5, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x66d5, 0x1256: 0x66f5, 0x1257: 0x6715,
- 0x1258: 0x6735, 0x1259: 0x6755, 0x125a: 0x6775, 0x125b: 0x6795, 0x125c: 0x67b5, 0x125d: 0x67d5,
- 0x125e: 0x67f5, 0x125f: 0x0008, 0x1260: 0x6815, 0x1261: 0x0008, 0x1262: 0x6835, 0x1263: 0x0008,
- 0x1264: 0x0008, 0x1265: 0x6855, 0x1266: 0x6875, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008,
- 0x126a: 0x6895, 0x126b: 0x68b5, 0x126c: 0x68d5, 0x126d: 0x68f5, 0x126e: 0x6915, 0x126f: 0x6935,
- 0x1270: 0x6955, 0x1271: 0x6975, 0x1272: 0x6995, 0x1273: 0x69b5, 0x1274: 0x69d5, 0x1275: 0x69f5,
- 0x1276: 0x6a15, 0x1277: 0x6a35, 0x1278: 0x6a55, 0x1279: 0x6a75, 0x127a: 0x6a95, 0x127b: 0x6ab5,
- 0x127c: 0x6ad5, 0x127d: 0x6af5, 0x127e: 0x6b15, 0x127f: 0x6b35,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x7a95, 0x1281: 0x7ab5, 0x1282: 0x7ad5, 0x1283: 0x7af5, 0x1284: 0x7b15, 0x1285: 0x7b35,
- 0x1286: 0x7b55, 0x1287: 0x7b75, 0x1288: 0x7b95, 0x1289: 0x7bb5, 0x128a: 0x7bd5, 0x128b: 0x7bf5,
- 0x128c: 0x7c15, 0x128d: 0x7c35, 0x128e: 0x7c55, 0x128f: 0x6ec9, 0x1290: 0x6ef1, 0x1291: 0x6f19,
- 0x1292: 0x7c75, 0x1293: 0x7c95, 0x1294: 0x7cb5, 0x1295: 0x6f41, 0x1296: 0x6f69, 0x1297: 0x6f91,
- 0x1298: 0x7cd5, 0x1299: 0x7cf5, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040,
- 0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040,
- 0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040,
- 0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040,
- 0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040,
- 0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040,
- 0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040,
- // Block 0x4b, offset 0x12c0
- 0x12c0: 0x6fb9, 0x12c1: 0x6fd1, 0x12c2: 0x6fe9, 0x12c3: 0x7d15, 0x12c4: 0x7d35, 0x12c5: 0x7001,
- 0x12c6: 0x7001, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040,
- 0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040,
- 0x12d2: 0x0040, 0x12d3: 0x7019, 0x12d4: 0x7041, 0x12d5: 0x7069, 0x12d6: 0x7091, 0x12d7: 0x70b9,
- 0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x70e1,
- 0x12de: 0x3308, 0x12df: 0x7109, 0x12e0: 0x7131, 0x12e1: 0x20a9, 0x12e2: 0x20f1, 0x12e3: 0x7149,
- 0x12e4: 0x7161, 0x12e5: 0x7179, 0x12e6: 0x7191, 0x12e7: 0x71a9, 0x12e8: 0x71c1, 0x12e9: 0x1fb2,
- 0x12ea: 0x71d9, 0x12eb: 0x7201, 0x12ec: 0x7229, 0x12ed: 0x7261, 0x12ee: 0x7299, 0x12ef: 0x72c1,
- 0x12f0: 0x72e9, 0x12f1: 0x7311, 0x12f2: 0x7339, 0x12f3: 0x7361, 0x12f4: 0x7389, 0x12f5: 0x73b1,
- 0x12f6: 0x73d9, 0x12f7: 0x0040, 0x12f8: 0x7401, 0x12f9: 0x7429, 0x12fa: 0x7451, 0x12fb: 0x7479,
- 0x12fc: 0x74a1, 0x12fd: 0x0040, 0x12fe: 0x74c9, 0x12ff: 0x0040,
- // Block 0x4c, offset 0x1300
- 0x1300: 0x74f1, 0x1301: 0x7519, 0x1302: 0x0040, 0x1303: 0x7541, 0x1304: 0x7569, 0x1305: 0x0040,
- 0x1306: 0x7591, 0x1307: 0x75b9, 0x1308: 0x75e1, 0x1309: 0x7609, 0x130a: 0x7631, 0x130b: 0x7659,
- 0x130c: 0x7681, 0x130d: 0x76a9, 0x130e: 0x76d1, 0x130f: 0x76f9, 0x1310: 0x7721, 0x1311: 0x7721,
- 0x1312: 0x7739, 0x1313: 0x7739, 0x1314: 0x7739, 0x1315: 0x7739, 0x1316: 0x7751, 0x1317: 0x7751,
- 0x1318: 0x7751, 0x1319: 0x7751, 0x131a: 0x7769, 0x131b: 0x7769, 0x131c: 0x7769, 0x131d: 0x7769,
- 0x131e: 0x7781, 0x131f: 0x7781, 0x1320: 0x7781, 0x1321: 0x7781, 0x1322: 0x7799, 0x1323: 0x7799,
- 0x1324: 0x7799, 0x1325: 0x7799, 0x1326: 0x77b1, 0x1327: 0x77b1, 0x1328: 0x77b1, 0x1329: 0x77b1,
- 0x132a: 0x77c9, 0x132b: 0x77c9, 0x132c: 0x77c9, 0x132d: 0x77c9, 0x132e: 0x77e1, 0x132f: 0x77e1,
- 0x1330: 0x77e1, 0x1331: 0x77e1, 0x1332: 0x77f9, 0x1333: 0x77f9, 0x1334: 0x77f9, 0x1335: 0x77f9,
- 0x1336: 0x7811, 0x1337: 0x7811, 0x1338: 0x7811, 0x1339: 0x7811, 0x133a: 0x7829, 0x133b: 0x7829,
- 0x133c: 0x7829, 0x133d: 0x7829, 0x133e: 0x7841, 0x133f: 0x7841,
- // Block 0x4d, offset 0x1340
- 0x1340: 0x7841, 0x1341: 0x7841, 0x1342: 0x7859, 0x1343: 0x7859, 0x1344: 0x7871, 0x1345: 0x7871,
- 0x1346: 0x7889, 0x1347: 0x7889, 0x1348: 0x78a1, 0x1349: 0x78a1, 0x134a: 0x78b9, 0x134b: 0x78b9,
- 0x134c: 0x78d1, 0x134d: 0x78d1, 0x134e: 0x78e9, 0x134f: 0x78e9, 0x1350: 0x78e9, 0x1351: 0x78e9,
- 0x1352: 0x7901, 0x1353: 0x7901, 0x1354: 0x7901, 0x1355: 0x7901, 0x1356: 0x7919, 0x1357: 0x7919,
- 0x1358: 0x7919, 0x1359: 0x7919, 0x135a: 0x7931, 0x135b: 0x7931, 0x135c: 0x7931, 0x135d: 0x7931,
- 0x135e: 0x7949, 0x135f: 0x7949, 0x1360: 0x7961, 0x1361: 0x7961, 0x1362: 0x7961, 0x1363: 0x7961,
- 0x1364: 0x7979, 0x1365: 0x7979, 0x1366: 0x7991, 0x1367: 0x7991, 0x1368: 0x7991, 0x1369: 0x7991,
- 0x136a: 0x79a9, 0x136b: 0x79a9, 0x136c: 0x79a9, 0x136d: 0x79a9, 0x136e: 0x79c1, 0x136f: 0x79c1,
- 0x1370: 0x79d9, 0x1371: 0x79d9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818,
- 0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818,
- 0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818,
- // Block 0x4e, offset 0x1380
- 0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0040, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040,
- 0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040,
- 0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040,
- 0x1392: 0x0040, 0x1393: 0x79f1, 0x1394: 0x79f1, 0x1395: 0x79f1, 0x1396: 0x79f1, 0x1397: 0x7a09,
- 0x1398: 0x7a09, 0x1399: 0x7a21, 0x139a: 0x7a21, 0x139b: 0x7a39, 0x139c: 0x7a39, 0x139d: 0x0479,
- 0x139e: 0x7a51, 0x139f: 0x7a51, 0x13a0: 0x7a69, 0x13a1: 0x7a69, 0x13a2: 0x7a81, 0x13a3: 0x7a81,
- 0x13a4: 0x7a99, 0x13a5: 0x7a99, 0x13a6: 0x7a99, 0x13a7: 0x7a99, 0x13a8: 0x7ab1, 0x13a9: 0x7ab1,
- 0x13aa: 0x7ac9, 0x13ab: 0x7ac9, 0x13ac: 0x7af1, 0x13ad: 0x7af1, 0x13ae: 0x7b19, 0x13af: 0x7b19,
- 0x13b0: 0x7b41, 0x13b1: 0x7b41, 0x13b2: 0x7b69, 0x13b3: 0x7b69, 0x13b4: 0x7b91, 0x13b5: 0x7b91,
- 0x13b6: 0x7bb9, 0x13b7: 0x7bb9, 0x13b8: 0x7bb9, 0x13b9: 0x7be1, 0x13ba: 0x7be1, 0x13bb: 0x7be1,
- 0x13bc: 0x7c09, 0x13bd: 0x7c09, 0x13be: 0x7c09, 0x13bf: 0x7c09,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x85f9, 0x13c1: 0x8621, 0x13c2: 0x8649, 0x13c3: 0x8671, 0x13c4: 0x8699, 0x13c5: 0x86c1,
- 0x13c6: 0x86e9, 0x13c7: 0x8711, 0x13c8: 0x8739, 0x13c9: 0x8761, 0x13ca: 0x8789, 0x13cb: 0x87b1,
- 0x13cc: 0x87d9, 0x13cd: 0x8801, 0x13ce: 0x8829, 0x13cf: 0x8851, 0x13d0: 0x8879, 0x13d1: 0x88a1,
- 0x13d2: 0x88c9, 0x13d3: 0x88f1, 0x13d4: 0x8919, 0x13d5: 0x8941, 0x13d6: 0x8969, 0x13d7: 0x8991,
- 0x13d8: 0x89b9, 0x13d9: 0x89e1, 0x13da: 0x8a09, 0x13db: 0x8a31, 0x13dc: 0x8a59, 0x13dd: 0x8a81,
- 0x13de: 0x8aaa, 0x13df: 0x8ada, 0x13e0: 0x8b0a, 0x13e1: 0x8b3a, 0x13e2: 0x8b6a, 0x13e3: 0x8b9a,
- 0x13e4: 0x8bc9, 0x13e5: 0x8bf1, 0x13e6: 0x7c71, 0x13e7: 0x8c19, 0x13e8: 0x7be1, 0x13e9: 0x7c99,
- 0x13ea: 0x8c41, 0x13eb: 0x8c69, 0x13ec: 0x7d39, 0x13ed: 0x8c91, 0x13ee: 0x7d61, 0x13ef: 0x7d89,
- 0x13f0: 0x8cb9, 0x13f1: 0x8ce1, 0x13f2: 0x7e29, 0x13f3: 0x8d09, 0x13f4: 0x7e51, 0x13f5: 0x7e79,
- 0x13f6: 0x8d31, 0x13f7: 0x8d59, 0x13f8: 0x7ec9, 0x13f9: 0x8d81, 0x13fa: 0x7ef1, 0x13fb: 0x7f19,
- 0x13fc: 0x83a1, 0x13fd: 0x83c9, 0x13fe: 0x8441, 0x13ff: 0x8469,
- // Block 0x50, offset 0x1400
- 0x1400: 0x8491, 0x1401: 0x8531, 0x1402: 0x8559, 0x1403: 0x8581, 0x1404: 0x85a9, 0x1405: 0x8649,
- 0x1406: 0x8671, 0x1407: 0x8699, 0x1408: 0x8da9, 0x1409: 0x8739, 0x140a: 0x8dd1, 0x140b: 0x8df9,
- 0x140c: 0x8829, 0x140d: 0x8e21, 0x140e: 0x8851, 0x140f: 0x8879, 0x1410: 0x8a81, 0x1411: 0x8e49,
- 0x1412: 0x8e71, 0x1413: 0x89b9, 0x1414: 0x8e99, 0x1415: 0x89e1, 0x1416: 0x8a09, 0x1417: 0x7c21,
- 0x1418: 0x7c49, 0x1419: 0x8ec1, 0x141a: 0x7c71, 0x141b: 0x8ee9, 0x141c: 0x7cc1, 0x141d: 0x7ce9,
- 0x141e: 0x7d11, 0x141f: 0x7d39, 0x1420: 0x8f11, 0x1421: 0x7db1, 0x1422: 0x7dd9, 0x1423: 0x7e01,
- 0x1424: 0x7e29, 0x1425: 0x8f39, 0x1426: 0x7ec9, 0x1427: 0x7f41, 0x1428: 0x7f69, 0x1429: 0x7f91,
- 0x142a: 0x7fb9, 0x142b: 0x7fe1, 0x142c: 0x8031, 0x142d: 0x8059, 0x142e: 0x8081, 0x142f: 0x80a9,
- 0x1430: 0x80d1, 0x1431: 0x80f9, 0x1432: 0x8f61, 0x1433: 0x8121, 0x1434: 0x8149, 0x1435: 0x8171,
- 0x1436: 0x8199, 0x1437: 0x81c1, 0x1438: 0x81e9, 0x1439: 0x8239, 0x143a: 0x8261, 0x143b: 0x8289,
- 0x143c: 0x82b1, 0x143d: 0x82d9, 0x143e: 0x8301, 0x143f: 0x8329,
- // Block 0x51, offset 0x1440
- 0x1440: 0x8351, 0x1441: 0x8379, 0x1442: 0x83f1, 0x1443: 0x8419, 0x1444: 0x84b9, 0x1445: 0x84e1,
- 0x1446: 0x8509, 0x1447: 0x8531, 0x1448: 0x8559, 0x1449: 0x85d1, 0x144a: 0x85f9, 0x144b: 0x8621,
- 0x144c: 0x8649, 0x144d: 0x8f89, 0x144e: 0x86c1, 0x144f: 0x86e9, 0x1450: 0x8711, 0x1451: 0x8739,
- 0x1452: 0x87b1, 0x1453: 0x87d9, 0x1454: 0x8801, 0x1455: 0x8829, 0x1456: 0x8fb1, 0x1457: 0x88a1,
- 0x1458: 0x88c9, 0x1459: 0x8fd9, 0x145a: 0x8941, 0x145b: 0x8969, 0x145c: 0x8991, 0x145d: 0x89b9,
- 0x145e: 0x9001, 0x145f: 0x7c71, 0x1460: 0x8ee9, 0x1461: 0x7d39, 0x1462: 0x8f11, 0x1463: 0x7e29,
- 0x1464: 0x8f39, 0x1465: 0x7ec9, 0x1466: 0x9029, 0x1467: 0x80d1, 0x1468: 0x9051, 0x1469: 0x9079,
- 0x146a: 0x90a1, 0x146b: 0x8531, 0x146c: 0x8559, 0x146d: 0x8649, 0x146e: 0x8829, 0x146f: 0x8fb1,
- 0x1470: 0x89b9, 0x1471: 0x9001, 0x1472: 0x90c9, 0x1473: 0x9101, 0x1474: 0x9139, 0x1475: 0x9171,
- 0x1476: 0x9199, 0x1477: 0x91c1, 0x1478: 0x91e9, 0x1479: 0x9211, 0x147a: 0x9239, 0x147b: 0x9261,
- 0x147c: 0x9289, 0x147d: 0x92b1, 0x147e: 0x92d9, 0x147f: 0x9301,
- // Block 0x52, offset 0x1480
- 0x1480: 0x9329, 0x1481: 0x9351, 0x1482: 0x9379, 0x1483: 0x93a1, 0x1484: 0x93c9, 0x1485: 0x93f1,
- 0x1486: 0x9419, 0x1487: 0x9441, 0x1488: 0x9469, 0x1489: 0x9491, 0x148a: 0x94b9, 0x148b: 0x94e1,
- 0x148c: 0x9079, 0x148d: 0x9509, 0x148e: 0x9531, 0x148f: 0x9559, 0x1490: 0x9581, 0x1491: 0x9171,
- 0x1492: 0x9199, 0x1493: 0x91c1, 0x1494: 0x91e9, 0x1495: 0x9211, 0x1496: 0x9239, 0x1497: 0x9261,
- 0x1498: 0x9289, 0x1499: 0x92b1, 0x149a: 0x92d9, 0x149b: 0x9301, 0x149c: 0x9329, 0x149d: 0x9351,
- 0x149e: 0x9379, 0x149f: 0x93a1, 0x14a0: 0x93c9, 0x14a1: 0x93f1, 0x14a2: 0x9419, 0x14a3: 0x9441,
- 0x14a4: 0x9469, 0x14a5: 0x9491, 0x14a6: 0x94b9, 0x14a7: 0x94e1, 0x14a8: 0x9079, 0x14a9: 0x9509,
- 0x14aa: 0x9531, 0x14ab: 0x9559, 0x14ac: 0x9581, 0x14ad: 0x9491, 0x14ae: 0x94b9, 0x14af: 0x94e1,
- 0x14b0: 0x9079, 0x14b1: 0x9051, 0x14b2: 0x90a1, 0x14b3: 0x8211, 0x14b4: 0x8059, 0x14b5: 0x8081,
- 0x14b6: 0x80a9, 0x14b7: 0x9491, 0x14b8: 0x94b9, 0x14b9: 0x94e1, 0x14ba: 0x8211, 0x14bb: 0x8239,
- 0x14bc: 0x95a9, 0x14bd: 0x95a9, 0x14be: 0x0018, 0x14bf: 0x0018,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x0040, 0x14c1: 0x0040, 0x14c2: 0x0040, 0x14c3: 0x0040, 0x14c4: 0x0040, 0x14c5: 0x0040,
- 0x14c6: 0x0040, 0x14c7: 0x0040, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040,
- 0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x95d1, 0x14d1: 0x9609,
- 0x14d2: 0x9609, 0x14d3: 0x9641, 0x14d4: 0x9679, 0x14d5: 0x96b1, 0x14d6: 0x96e9, 0x14d7: 0x9721,
- 0x14d8: 0x9759, 0x14d9: 0x9759, 0x14da: 0x9791, 0x14db: 0x97c9, 0x14dc: 0x9801, 0x14dd: 0x9839,
- 0x14de: 0x9871, 0x14df: 0x98a9, 0x14e0: 0x98a9, 0x14e1: 0x98e1, 0x14e2: 0x9919, 0x14e3: 0x9919,
- 0x14e4: 0x9951, 0x14e5: 0x9951, 0x14e6: 0x9989, 0x14e7: 0x99c1, 0x14e8: 0x99c1, 0x14e9: 0x99f9,
- 0x14ea: 0x9a31, 0x14eb: 0x9a31, 0x14ec: 0x9a69, 0x14ed: 0x9a69, 0x14ee: 0x9aa1, 0x14ef: 0x9ad9,
- 0x14f0: 0x9ad9, 0x14f1: 0x9b11, 0x14f2: 0x9b11, 0x14f3: 0x9b49, 0x14f4: 0x9b81, 0x14f5: 0x9bb9,
- 0x14f6: 0x9bf1, 0x14f7: 0x9bf1, 0x14f8: 0x9c29, 0x14f9: 0x9c61, 0x14fa: 0x9c99, 0x14fb: 0x9cd1,
- 0x14fc: 0x9d09, 0x14fd: 0x9d09, 0x14fe: 0x9d41, 0x14ff: 0x9d79,
- // Block 0x54, offset 0x1500
- 0x1500: 0xa949, 0x1501: 0xa981, 0x1502: 0xa9b9, 0x1503: 0xa8a1, 0x1504: 0x9bb9, 0x1505: 0x9989,
- 0x1506: 0xa9f1, 0x1507: 0xaa29, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040,
- 0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0040, 0x1510: 0x0040, 0x1511: 0x0040,
- 0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040,
- 0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,
- 0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040,
- 0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040,
- 0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,
- 0x1530: 0xaa61, 0x1531: 0xaa99, 0x1532: 0xaad1, 0x1533: 0xab19, 0x1534: 0xab61, 0x1535: 0xaba9,
- 0x1536: 0xabf1, 0x1537: 0xac39, 0x1538: 0xac81, 0x1539: 0xacc9, 0x153a: 0xad02, 0x153b: 0xae12,
- 0x153c: 0xae91, 0x153d: 0x0018, 0x153e: 0x0040, 0x153f: 0x0040,
- // Block 0x55, offset 0x1540
- 0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0,
- 0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0,
- 0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0xaeda, 0x1551: 0x7d55,
- 0x1552: 0x0040, 0x1553: 0xaeea, 0x1554: 0x03c2, 0x1555: 0xaefa, 0x1556: 0xaf0a, 0x1557: 0x7d75,
- 0x1558: 0x7d95, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040,
- 0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308,
- 0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308,
- 0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308,
- 0x1570: 0x0040, 0x1571: 0x7db5, 0x1572: 0x7dd5, 0x1573: 0xaf1a, 0x1574: 0xaf1a, 0x1575: 0x1fd2,
- 0x1576: 0x1fe2, 0x1577: 0xaf2a, 0x1578: 0xaf3a, 0x1579: 0x7df5, 0x157a: 0x7e15, 0x157b: 0x7e35,
- 0x157c: 0x7df5, 0x157d: 0x7e55, 0x157e: 0x7e75, 0x157f: 0x7e55,
- // Block 0x56, offset 0x1580
- 0x1580: 0x7e95, 0x1581: 0x7eb5, 0x1582: 0x7ed5, 0x1583: 0x7eb5, 0x1584: 0x7ef5, 0x1585: 0x0018,
- 0x1586: 0x0018, 0x1587: 0xaf4a, 0x1588: 0xaf5a, 0x1589: 0x7f16, 0x158a: 0x7f36, 0x158b: 0x7f56,
- 0x158c: 0x7f76, 0x158d: 0xaf1a, 0x158e: 0xaf1a, 0x158f: 0xaf1a, 0x1590: 0xaeda, 0x1591: 0x7f95,
- 0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x03c2, 0x1595: 0xaeea, 0x1596: 0xaf0a, 0x1597: 0xaefa,
- 0x1598: 0x7fb5, 0x1599: 0x1fd2, 0x159a: 0x1fe2, 0x159b: 0xaf2a, 0x159c: 0xaf3a, 0x159d: 0x7e95,
- 0x159e: 0x7ef5, 0x159f: 0xaf6a, 0x15a0: 0xaf7a, 0x15a1: 0xaf8a, 0x15a2: 0x1fb2, 0x15a3: 0xaf99,
- 0x15a4: 0xafaa, 0x15a5: 0xafba, 0x15a6: 0x1fc2, 0x15a7: 0x0040, 0x15a8: 0xafca, 0x15a9: 0xafda,
- 0x15aa: 0xafea, 0x15ab: 0xaffa, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040,
- 0x15b0: 0x7fd6, 0x15b1: 0xb009, 0x15b2: 0x7ff6, 0x15b3: 0x0808, 0x15b4: 0x8016, 0x15b5: 0x0040,
- 0x15b6: 0x8036, 0x15b7: 0xb031, 0x15b8: 0x8056, 0x15b9: 0xb059, 0x15ba: 0x8076, 0x15bb: 0xb081,
- 0x15bc: 0x8096, 0x15bd: 0xb0a9, 0x15be: 0x80b6, 0x15bf: 0xb0d1,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0xb0f9, 0x15c1: 0xb111, 0x15c2: 0xb111, 0x15c3: 0xb129, 0x15c4: 0xb129, 0x15c5: 0xb141,
- 0x15c6: 0xb141, 0x15c7: 0xb159, 0x15c8: 0xb159, 0x15c9: 0xb171, 0x15ca: 0xb171, 0x15cb: 0xb171,
- 0x15cc: 0xb171, 0x15cd: 0xb189, 0x15ce: 0xb189, 0x15cf: 0xb1a1, 0x15d0: 0xb1a1, 0x15d1: 0xb1a1,
- 0x15d2: 0xb1a1, 0x15d3: 0xb1b9, 0x15d4: 0xb1b9, 0x15d5: 0xb1d1, 0x15d6: 0xb1d1, 0x15d7: 0xb1d1,
- 0x15d8: 0xb1d1, 0x15d9: 0xb1e9, 0x15da: 0xb1e9, 0x15db: 0xb1e9, 0x15dc: 0xb1e9, 0x15dd: 0xb201,
- 0x15de: 0xb201, 0x15df: 0xb201, 0x15e0: 0xb201, 0x15e1: 0xb219, 0x15e2: 0xb219, 0x15e3: 0xb219,
- 0x15e4: 0xb219, 0x15e5: 0xb231, 0x15e6: 0xb231, 0x15e7: 0xb231, 0x15e8: 0xb231, 0x15e9: 0xb249,
- 0x15ea: 0xb249, 0x15eb: 0xb261, 0x15ec: 0xb261, 0x15ed: 0xb279, 0x15ee: 0xb279, 0x15ef: 0xb291,
- 0x15f0: 0xb291, 0x15f1: 0xb2a9, 0x15f2: 0xb2a9, 0x15f3: 0xb2a9, 0x15f4: 0xb2a9, 0x15f5: 0xb2c1,
- 0x15f6: 0xb2c1, 0x15f7: 0xb2c1, 0x15f8: 0xb2c1, 0x15f9: 0xb2d9, 0x15fa: 0xb2d9, 0x15fb: 0xb2d9,
- 0x15fc: 0xb2d9, 0x15fd: 0xb2f1, 0x15fe: 0xb2f1, 0x15ff: 0xb2f1,
- // Block 0x58, offset 0x1600
- 0x1600: 0xb2f1, 0x1601: 0xb309, 0x1602: 0xb309, 0x1603: 0xb309, 0x1604: 0xb309, 0x1605: 0xb321,
- 0x1606: 0xb321, 0x1607: 0xb321, 0x1608: 0xb321, 0x1609: 0xb339, 0x160a: 0xb339, 0x160b: 0xb339,
- 0x160c: 0xb339, 0x160d: 0xb351, 0x160e: 0xb351, 0x160f: 0xb351, 0x1610: 0xb351, 0x1611: 0xb369,
- 0x1612: 0xb369, 0x1613: 0xb369, 0x1614: 0xb369, 0x1615: 0xb381, 0x1616: 0xb381, 0x1617: 0xb381,
- 0x1618: 0xb381, 0x1619: 0xb399, 0x161a: 0xb399, 0x161b: 0xb399, 0x161c: 0xb399, 0x161d: 0xb3b1,
- 0x161e: 0xb3b1, 0x161f: 0xb3b1, 0x1620: 0xb3b1, 0x1621: 0xb3c9, 0x1622: 0xb3c9, 0x1623: 0xb3c9,
- 0x1624: 0xb3c9, 0x1625: 0xb3e1, 0x1626: 0xb3e1, 0x1627: 0xb3e1, 0x1628: 0xb3e1, 0x1629: 0xb3f9,
- 0x162a: 0xb3f9, 0x162b: 0xb3f9, 0x162c: 0xb3f9, 0x162d: 0xb411, 0x162e: 0xb411, 0x162f: 0x7ab1,
- 0x1630: 0x7ab1, 0x1631: 0xb429, 0x1632: 0xb429, 0x1633: 0xb429, 0x1634: 0xb429, 0x1635: 0xb441,
- 0x1636: 0xb441, 0x1637: 0xb469, 0x1638: 0xb469, 0x1639: 0xb491, 0x163a: 0xb491, 0x163b: 0xb4b9,
- 0x163c: 0xb4b9, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0,
- // Block 0x59, offset 0x1640
- 0x1640: 0x0040, 0x1641: 0xaefa, 0x1642: 0xb4e2, 0x1643: 0xaf6a, 0x1644: 0xafda, 0x1645: 0xafea,
- 0x1646: 0xaf7a, 0x1647: 0xb4f2, 0x1648: 0x1fd2, 0x1649: 0x1fe2, 0x164a: 0xaf8a, 0x164b: 0x1fb2,
- 0x164c: 0xaeda, 0x164d: 0xaf99, 0x164e: 0x29d1, 0x164f: 0xb502, 0x1650: 0x1f41, 0x1651: 0x00c9,
- 0x1652: 0x0069, 0x1653: 0x0079, 0x1654: 0x1f51, 0x1655: 0x1f61, 0x1656: 0x1f71, 0x1657: 0x1f81,
- 0x1658: 0x1f91, 0x1659: 0x1fa1, 0x165a: 0xaeea, 0x165b: 0x03c2, 0x165c: 0xafaa, 0x165d: 0x1fc2,
- 0x165e: 0xafba, 0x165f: 0xaf0a, 0x1660: 0xaffa, 0x1661: 0x0039, 0x1662: 0x0ee9, 0x1663: 0x1159,
- 0x1664: 0x0ef9, 0x1665: 0x0f09, 0x1666: 0x1199, 0x1667: 0x0f31, 0x1668: 0x0249, 0x1669: 0x0f41,
- 0x166a: 0x0259, 0x166b: 0x0f51, 0x166c: 0x0359, 0x166d: 0x0f61, 0x166e: 0x0f71, 0x166f: 0x00d9,
- 0x1670: 0x0f99, 0x1671: 0x2039, 0x1672: 0x0269, 0x1673: 0x01d9, 0x1674: 0x0fa9, 0x1675: 0x0fb9,
- 0x1676: 0x1089, 0x1677: 0x0279, 0x1678: 0x0369, 0x1679: 0x0289, 0x167a: 0x13d1, 0x167b: 0xaf4a,
- 0x167c: 0xafca, 0x167d: 0xaf5a, 0x167e: 0xb512, 0x167f: 0xaf1a,
- // Block 0x5a, offset 0x1680
- 0x1680: 0x1caa, 0x1681: 0x0039, 0x1682: 0x0ee9, 0x1683: 0x1159, 0x1684: 0x0ef9, 0x1685: 0x0f09,
- 0x1686: 0x1199, 0x1687: 0x0f31, 0x1688: 0x0249, 0x1689: 0x0f41, 0x168a: 0x0259, 0x168b: 0x0f51,
- 0x168c: 0x0359, 0x168d: 0x0f61, 0x168e: 0x0f71, 0x168f: 0x00d9, 0x1690: 0x0f99, 0x1691: 0x2039,
- 0x1692: 0x0269, 0x1693: 0x01d9, 0x1694: 0x0fa9, 0x1695: 0x0fb9, 0x1696: 0x1089, 0x1697: 0x0279,
- 0x1698: 0x0369, 0x1699: 0x0289, 0x169a: 0x13d1, 0x169b: 0xaf2a, 0x169c: 0xb522, 0x169d: 0xaf3a,
- 0x169e: 0xb532, 0x169f: 0x80d5, 0x16a0: 0x80f5, 0x16a1: 0x29d1, 0x16a2: 0x8115, 0x16a3: 0x8115,
- 0x16a4: 0x8135, 0x16a5: 0x8155, 0x16a6: 0x8175, 0x16a7: 0x8195, 0x16a8: 0x81b5, 0x16a9: 0x81d5,
- 0x16aa: 0x81f5, 0x16ab: 0x8215, 0x16ac: 0x8235, 0x16ad: 0x8255, 0x16ae: 0x8275, 0x16af: 0x8295,
- 0x16b0: 0x82b5, 0x16b1: 0x82d5, 0x16b2: 0x82f5, 0x16b3: 0x8315, 0x16b4: 0x8335, 0x16b5: 0x8355,
- 0x16b6: 0x8375, 0x16b7: 0x8395, 0x16b8: 0x83b5, 0x16b9: 0x83d5, 0x16ba: 0x83f5, 0x16bb: 0x8415,
- 0x16bc: 0x81b5, 0x16bd: 0x8435, 0x16be: 0x8455, 0x16bf: 0x8215,
- // Block 0x5b, offset 0x16c0
- 0x16c0: 0x8475, 0x16c1: 0x8495, 0x16c2: 0x84b5, 0x16c3: 0x84d5, 0x16c4: 0x84f5, 0x16c5: 0x8515,
- 0x16c6: 0x8535, 0x16c7: 0x8555, 0x16c8: 0x84d5, 0x16c9: 0x8575, 0x16ca: 0x84d5, 0x16cb: 0x8595,
- 0x16cc: 0x8595, 0x16cd: 0x85b5, 0x16ce: 0x85b5, 0x16cf: 0x85d5, 0x16d0: 0x8515, 0x16d1: 0x85f5,
- 0x16d2: 0x8615, 0x16d3: 0x85f5, 0x16d4: 0x8635, 0x16d5: 0x8615, 0x16d6: 0x8655, 0x16d7: 0x8655,
- 0x16d8: 0x8675, 0x16d9: 0x8675, 0x16da: 0x8695, 0x16db: 0x8695, 0x16dc: 0x8615, 0x16dd: 0x8115,
- 0x16de: 0x86b5, 0x16df: 0x86d5, 0x16e0: 0x0040, 0x16e1: 0x86f5, 0x16e2: 0x8715, 0x16e3: 0x8735,
- 0x16e4: 0x8755, 0x16e5: 0x8735, 0x16e6: 0x8775, 0x16e7: 0x8795, 0x16e8: 0x87b5, 0x16e9: 0x87b5,
- 0x16ea: 0x87d5, 0x16eb: 0x87d5, 0x16ec: 0x87f5, 0x16ed: 0x87f5, 0x16ee: 0x87d5, 0x16ef: 0x87d5,
- 0x16f0: 0x8815, 0x16f1: 0x8835, 0x16f2: 0x8855, 0x16f3: 0x8875, 0x16f4: 0x8895, 0x16f5: 0x88b5,
- 0x16f6: 0x88b5, 0x16f7: 0x88b5, 0x16f8: 0x88d5, 0x16f9: 0x88d5, 0x16fa: 0x88d5, 0x16fb: 0x88d5,
- 0x16fc: 0x87b5, 0x16fd: 0x87b5, 0x16fe: 0x87b5, 0x16ff: 0x0040,
- // Block 0x5c, offset 0x1700
- 0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x8715, 0x1703: 0x86f5, 0x1704: 0x88f5, 0x1705: 0x86f5,
- 0x1706: 0x8715, 0x1707: 0x86f5, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x8915, 0x170b: 0x8715,
- 0x170c: 0x8935, 0x170d: 0x88f5, 0x170e: 0x8935, 0x170f: 0x8715, 0x1710: 0x0040, 0x1711: 0x0040,
- 0x1712: 0x8955, 0x1713: 0x8975, 0x1714: 0x8875, 0x1715: 0x8935, 0x1716: 0x88f5, 0x1717: 0x8935,
- 0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x8995, 0x171b: 0x89b5, 0x171c: 0x8995, 0x171d: 0x0040,
- 0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0xb541, 0x1721: 0xb559, 0x1722: 0xb571, 0x1723: 0x89d6,
- 0x1724: 0xb589, 0x1725: 0xb5a1, 0x1726: 0x89f5, 0x1727: 0x0040, 0x1728: 0x8a15, 0x1729: 0x8a35,
- 0x172a: 0x8a55, 0x172b: 0x8a35, 0x172c: 0x8a75, 0x172d: 0x8a95, 0x172e: 0x8ab5, 0x172f: 0x0040,
- 0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,
- 0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340,
- 0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,
- // Block 0x5d, offset 0x1740
- 0x1740: 0x0a08, 0x1741: 0x0a08, 0x1742: 0x0a08, 0x1743: 0x0a08, 0x1744: 0x0a08, 0x1745: 0x0c08,
- 0x1746: 0x0808, 0x1747: 0x0c08, 0x1748: 0x0818, 0x1749: 0x0c08, 0x174a: 0x0c08, 0x174b: 0x0808,
- 0x174c: 0x0808, 0x174d: 0x0908, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0c08, 0x1751: 0x0c08,
- 0x1752: 0x0c08, 0x1753: 0x0a08, 0x1754: 0x0a08, 0x1755: 0x0a08, 0x1756: 0x0a08, 0x1757: 0x0908,
- 0x1758: 0x0a08, 0x1759: 0x0a08, 0x175a: 0x0a08, 0x175b: 0x0a08, 0x175c: 0x0a08, 0x175d: 0x0c08,
- 0x175e: 0x0a08, 0x175f: 0x0a08, 0x1760: 0x0a08, 0x1761: 0x0c08, 0x1762: 0x0808, 0x1763: 0x0808,
- 0x1764: 0x0c08, 0x1765: 0x3308, 0x1766: 0x3308, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040,
- 0x176a: 0x0040, 0x176b: 0x0a18, 0x176c: 0x0a18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0c18,
- 0x1770: 0x0818, 0x1771: 0x0818, 0x1772: 0x0818, 0x1773: 0x0818, 0x1774: 0x0818, 0x1775: 0x0818,
- 0x1776: 0x0818, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040,
- 0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040,
- // Block 0x5e, offset 0x1780
- 0x1780: 0x0a08, 0x1781: 0x0c08, 0x1782: 0x0a08, 0x1783: 0x0c08, 0x1784: 0x0c08, 0x1785: 0x0c08,
- 0x1786: 0x0a08, 0x1787: 0x0a08, 0x1788: 0x0a08, 0x1789: 0x0c08, 0x178a: 0x0a08, 0x178b: 0x0a08,
- 0x178c: 0x0c08, 0x178d: 0x0a08, 0x178e: 0x0c08, 0x178f: 0x0c08, 0x1790: 0x0a08, 0x1791: 0x0c08,
- 0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x0040,
- 0x1798: 0x0040, 0x1799: 0x0818, 0x179a: 0x0818, 0x179b: 0x0818, 0x179c: 0x0818, 0x179d: 0x0040,
- 0x179e: 0x0040, 0x179f: 0x0040, 0x17a0: 0x0040, 0x17a1: 0x0040, 0x17a2: 0x0040, 0x17a3: 0x0040,
- 0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x0040, 0x17a7: 0x0040, 0x17a8: 0x0040, 0x17a9: 0x0c18,
- 0x17aa: 0x0c18, 0x17ab: 0x0c18, 0x17ac: 0x0c18, 0x17ad: 0x0a18, 0x17ae: 0x0a18, 0x17af: 0x0818,
- 0x17b0: 0x0040, 0x17b1: 0x0040, 0x17b2: 0x0040, 0x17b3: 0x0040, 0x17b4: 0x0040, 0x17b5: 0x0040,
- 0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040,
- 0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x3308, 0x17c1: 0x3308, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x0040, 0x17c5: 0x0008,
- 0x17c6: 0x0008, 0x17c7: 0x0008, 0x17c8: 0x0008, 0x17c9: 0x0008, 0x17ca: 0x0008, 0x17cb: 0x0008,
- 0x17cc: 0x0008, 0x17cd: 0x0040, 0x17ce: 0x0040, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0040,
- 0x17d2: 0x0040, 0x17d3: 0x0008, 0x17d4: 0x0008, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0008,
- 0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008,
- 0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008,
- 0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0040,
- 0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008,
- 0x17f0: 0x0008, 0x17f1: 0x0040, 0x17f2: 0x0008, 0x17f3: 0x0008, 0x17f4: 0x0040, 0x17f5: 0x0008,
- 0x17f6: 0x0008, 0x17f7: 0x0008, 0x17f8: 0x0008, 0x17f9: 0x0008, 0x17fa: 0x0040, 0x17fb: 0x0040,
- 0x17fc: 0x3308, 0x17fd: 0x0008, 0x17fe: 0x3008, 0x17ff: 0x3008,
- // Block 0x60, offset 0x1800
- 0x1800: 0x3308, 0x1801: 0x3008, 0x1802: 0x3008, 0x1803: 0x3008, 0x1804: 0x3008, 0x1805: 0x0040,
- 0x1806: 0x0040, 0x1807: 0x3008, 0x1808: 0x3008, 0x1809: 0x0040, 0x180a: 0x0040, 0x180b: 0x3008,
- 0x180c: 0x3008, 0x180d: 0x3808, 0x180e: 0x0040, 0x180f: 0x0040, 0x1810: 0x0008, 0x1811: 0x0040,
- 0x1812: 0x0040, 0x1813: 0x0040, 0x1814: 0x0040, 0x1815: 0x0040, 0x1816: 0x0040, 0x1817: 0x3008,
- 0x1818: 0x0040, 0x1819: 0x0040, 0x181a: 0x0040, 0x181b: 0x0040, 0x181c: 0x0040, 0x181d: 0x0008,
- 0x181e: 0x0008, 0x181f: 0x0008, 0x1820: 0x0008, 0x1821: 0x0008, 0x1822: 0x3008, 0x1823: 0x3008,
- 0x1824: 0x0040, 0x1825: 0x0040, 0x1826: 0x3308, 0x1827: 0x3308, 0x1828: 0x3308, 0x1829: 0x3308,
- 0x182a: 0x3308, 0x182b: 0x3308, 0x182c: 0x3308, 0x182d: 0x0040, 0x182e: 0x0040, 0x182f: 0x0040,
- 0x1830: 0x3308, 0x1831: 0x3308, 0x1832: 0x3308, 0x1833: 0x3308, 0x1834: 0x3308, 0x1835: 0x0040,
- 0x1836: 0x0040, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040,
- 0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040,
- // Block 0x61, offset 0x1840
- 0x1840: 0x0039, 0x1841: 0x0ee9, 0x1842: 0x1159, 0x1843: 0x0ef9, 0x1844: 0x0f09, 0x1845: 0x1199,
- 0x1846: 0x0f31, 0x1847: 0x0249, 0x1848: 0x0f41, 0x1849: 0x0259, 0x184a: 0x0f51, 0x184b: 0x0359,
- 0x184c: 0x0f61, 0x184d: 0x0f71, 0x184e: 0x00d9, 0x184f: 0x0f99, 0x1850: 0x2039, 0x1851: 0x0269,
- 0x1852: 0x01d9, 0x1853: 0x0fa9, 0x1854: 0x0fb9, 0x1855: 0x1089, 0x1856: 0x0279, 0x1857: 0x0369,
- 0x1858: 0x0289, 0x1859: 0x13d1, 0x185a: 0x0039, 0x185b: 0x0ee9, 0x185c: 0x1159, 0x185d: 0x0ef9,
- 0x185e: 0x0f09, 0x185f: 0x1199, 0x1860: 0x0f31, 0x1861: 0x0249, 0x1862: 0x0f41, 0x1863: 0x0259,
- 0x1864: 0x0f51, 0x1865: 0x0359, 0x1866: 0x0f61, 0x1867: 0x0f71, 0x1868: 0x00d9, 0x1869: 0x0f99,
- 0x186a: 0x2039, 0x186b: 0x0269, 0x186c: 0x01d9, 0x186d: 0x0fa9, 0x186e: 0x0fb9, 0x186f: 0x1089,
- 0x1870: 0x0279, 0x1871: 0x0369, 0x1872: 0x0289, 0x1873: 0x13d1, 0x1874: 0x0039, 0x1875: 0x0ee9,
- 0x1876: 0x1159, 0x1877: 0x0ef9, 0x1878: 0x0f09, 0x1879: 0x1199, 0x187a: 0x0f31, 0x187b: 0x0249,
- 0x187c: 0x0f41, 0x187d: 0x0259, 0x187e: 0x0f51, 0x187f: 0x0359,
- // Block 0x62, offset 0x1880
- 0x1880: 0x0f61, 0x1881: 0x0f71, 0x1882: 0x00d9, 0x1883: 0x0f99, 0x1884: 0x2039, 0x1885: 0x0269,
- 0x1886: 0x01d9, 0x1887: 0x0fa9, 0x1888: 0x0fb9, 0x1889: 0x1089, 0x188a: 0x0279, 0x188b: 0x0369,
- 0x188c: 0x0289, 0x188d: 0x13d1, 0x188e: 0x0039, 0x188f: 0x0ee9, 0x1890: 0x1159, 0x1891: 0x0ef9,
- 0x1892: 0x0f09, 0x1893: 0x1199, 0x1894: 0x0f31, 0x1895: 0x0040, 0x1896: 0x0f41, 0x1897: 0x0259,
- 0x1898: 0x0f51, 0x1899: 0x0359, 0x189a: 0x0f61, 0x189b: 0x0f71, 0x189c: 0x00d9, 0x189d: 0x0f99,
- 0x189e: 0x2039, 0x189f: 0x0269, 0x18a0: 0x01d9, 0x18a1: 0x0fa9, 0x18a2: 0x0fb9, 0x18a3: 0x1089,
- 0x18a4: 0x0279, 0x18a5: 0x0369, 0x18a6: 0x0289, 0x18a7: 0x13d1, 0x18a8: 0x0039, 0x18a9: 0x0ee9,
- 0x18aa: 0x1159, 0x18ab: 0x0ef9, 0x18ac: 0x0f09, 0x18ad: 0x1199, 0x18ae: 0x0f31, 0x18af: 0x0249,
- 0x18b0: 0x0f41, 0x18b1: 0x0259, 0x18b2: 0x0f51, 0x18b3: 0x0359, 0x18b4: 0x0f61, 0x18b5: 0x0f71,
- 0x18b6: 0x00d9, 0x18b7: 0x0f99, 0x18b8: 0x2039, 0x18b9: 0x0269, 0x18ba: 0x01d9, 0x18bb: 0x0fa9,
- 0x18bc: 0x0fb9, 0x18bd: 0x1089, 0x18be: 0x0279, 0x18bf: 0x0369,
- // Block 0x63, offset 0x18c0
- 0x18c0: 0x0289, 0x18c1: 0x13d1, 0x18c2: 0x0039, 0x18c3: 0x0ee9, 0x18c4: 0x1159, 0x18c5: 0x0ef9,
- 0x18c6: 0x0f09, 0x18c7: 0x1199, 0x18c8: 0x0f31, 0x18c9: 0x0249, 0x18ca: 0x0f41, 0x18cb: 0x0259,
- 0x18cc: 0x0f51, 0x18cd: 0x0359, 0x18ce: 0x0f61, 0x18cf: 0x0f71, 0x18d0: 0x00d9, 0x18d1: 0x0f99,
- 0x18d2: 0x2039, 0x18d3: 0x0269, 0x18d4: 0x01d9, 0x18d5: 0x0fa9, 0x18d6: 0x0fb9, 0x18d7: 0x1089,
- 0x18d8: 0x0279, 0x18d9: 0x0369, 0x18da: 0x0289, 0x18db: 0x13d1, 0x18dc: 0x0039, 0x18dd: 0x0040,
- 0x18de: 0x1159, 0x18df: 0x0ef9, 0x18e0: 0x0040, 0x18e1: 0x0040, 0x18e2: 0x0f31, 0x18e3: 0x0040,
- 0x18e4: 0x0040, 0x18e5: 0x0259, 0x18e6: 0x0f51, 0x18e7: 0x0040, 0x18e8: 0x0040, 0x18e9: 0x0f71,
- 0x18ea: 0x00d9, 0x18eb: 0x0f99, 0x18ec: 0x2039, 0x18ed: 0x0040, 0x18ee: 0x01d9, 0x18ef: 0x0fa9,
- 0x18f0: 0x0fb9, 0x18f1: 0x1089, 0x18f2: 0x0279, 0x18f3: 0x0369, 0x18f4: 0x0289, 0x18f5: 0x13d1,
- 0x18f6: 0x0039, 0x18f7: 0x0ee9, 0x18f8: 0x1159, 0x18f9: 0x0ef9, 0x18fa: 0x0040, 0x18fb: 0x1199,
- 0x18fc: 0x0040, 0x18fd: 0x0249, 0x18fe: 0x0f41, 0x18ff: 0x0259,
- // Block 0x64, offset 0x1900
- 0x1900: 0x0f51, 0x1901: 0x0359, 0x1902: 0x0f61, 0x1903: 0x0f71, 0x1904: 0x0040, 0x1905: 0x0f99,
- 0x1906: 0x2039, 0x1907: 0x0269, 0x1908: 0x01d9, 0x1909: 0x0fa9, 0x190a: 0x0fb9, 0x190b: 0x1089,
- 0x190c: 0x0279, 0x190d: 0x0369, 0x190e: 0x0289, 0x190f: 0x13d1, 0x1910: 0x0039, 0x1911: 0x0ee9,
- 0x1912: 0x1159, 0x1913: 0x0ef9, 0x1914: 0x0f09, 0x1915: 0x1199, 0x1916: 0x0f31, 0x1917: 0x0249,
- 0x1918: 0x0f41, 0x1919: 0x0259, 0x191a: 0x0f51, 0x191b: 0x0359, 0x191c: 0x0f61, 0x191d: 0x0f71,
- 0x191e: 0x00d9, 0x191f: 0x0f99, 0x1920: 0x2039, 0x1921: 0x0269, 0x1922: 0x01d9, 0x1923: 0x0fa9,
- 0x1924: 0x0fb9, 0x1925: 0x1089, 0x1926: 0x0279, 0x1927: 0x0369, 0x1928: 0x0289, 0x1929: 0x13d1,
- 0x192a: 0x0039, 0x192b: 0x0ee9, 0x192c: 0x1159, 0x192d: 0x0ef9, 0x192e: 0x0f09, 0x192f: 0x1199,
- 0x1930: 0x0f31, 0x1931: 0x0249, 0x1932: 0x0f41, 0x1933: 0x0259, 0x1934: 0x0f51, 0x1935: 0x0359,
- 0x1936: 0x0f61, 0x1937: 0x0f71, 0x1938: 0x00d9, 0x1939: 0x0f99, 0x193a: 0x2039, 0x193b: 0x0269,
- 0x193c: 0x01d9, 0x193d: 0x0fa9, 0x193e: 0x0fb9, 0x193f: 0x1089,
- // Block 0x65, offset 0x1940
- 0x1940: 0x0279, 0x1941: 0x0369, 0x1942: 0x0289, 0x1943: 0x13d1, 0x1944: 0x0039, 0x1945: 0x0ee9,
- 0x1946: 0x0040, 0x1947: 0x0ef9, 0x1948: 0x0f09, 0x1949: 0x1199, 0x194a: 0x0f31, 0x194b: 0x0040,
- 0x194c: 0x0040, 0x194d: 0x0259, 0x194e: 0x0f51, 0x194f: 0x0359, 0x1950: 0x0f61, 0x1951: 0x0f71,
- 0x1952: 0x00d9, 0x1953: 0x0f99, 0x1954: 0x2039, 0x1955: 0x0040, 0x1956: 0x01d9, 0x1957: 0x0fa9,
- 0x1958: 0x0fb9, 0x1959: 0x1089, 0x195a: 0x0279, 0x195b: 0x0369, 0x195c: 0x0289, 0x195d: 0x0040,
- 0x195e: 0x0039, 0x195f: 0x0ee9, 0x1960: 0x1159, 0x1961: 0x0ef9, 0x1962: 0x0f09, 0x1963: 0x1199,
- 0x1964: 0x0f31, 0x1965: 0x0249, 0x1966: 0x0f41, 0x1967: 0x0259, 0x1968: 0x0f51, 0x1969: 0x0359,
- 0x196a: 0x0f61, 0x196b: 0x0f71, 0x196c: 0x00d9, 0x196d: 0x0f99, 0x196e: 0x2039, 0x196f: 0x0269,
- 0x1970: 0x01d9, 0x1971: 0x0fa9, 0x1972: 0x0fb9, 0x1973: 0x1089, 0x1974: 0x0279, 0x1975: 0x0369,
- 0x1976: 0x0289, 0x1977: 0x13d1, 0x1978: 0x0039, 0x1979: 0x0ee9, 0x197a: 0x0040, 0x197b: 0x0ef9,
- 0x197c: 0x0f09, 0x197d: 0x1199, 0x197e: 0x0f31, 0x197f: 0x0040,
- // Block 0x66, offset 0x1980
- 0x1980: 0x0f41, 0x1981: 0x0259, 0x1982: 0x0f51, 0x1983: 0x0359, 0x1984: 0x0f61, 0x1985: 0x0040,
- 0x1986: 0x00d9, 0x1987: 0x0040, 0x1988: 0x0040, 0x1989: 0x0040, 0x198a: 0x01d9, 0x198b: 0x0fa9,
- 0x198c: 0x0fb9, 0x198d: 0x1089, 0x198e: 0x0279, 0x198f: 0x0369, 0x1990: 0x0289, 0x1991: 0x0040,
- 0x1992: 0x0039, 0x1993: 0x0ee9, 0x1994: 0x1159, 0x1995: 0x0ef9, 0x1996: 0x0f09, 0x1997: 0x1199,
- 0x1998: 0x0f31, 0x1999: 0x0249, 0x199a: 0x0f41, 0x199b: 0x0259, 0x199c: 0x0f51, 0x199d: 0x0359,
- 0x199e: 0x0f61, 0x199f: 0x0f71, 0x19a0: 0x00d9, 0x19a1: 0x0f99, 0x19a2: 0x2039, 0x19a3: 0x0269,
- 0x19a4: 0x01d9, 0x19a5: 0x0fa9, 0x19a6: 0x0fb9, 0x19a7: 0x1089, 0x19a8: 0x0279, 0x19a9: 0x0369,
- 0x19aa: 0x0289, 0x19ab: 0x13d1, 0x19ac: 0x0039, 0x19ad: 0x0ee9, 0x19ae: 0x1159, 0x19af: 0x0ef9,
- 0x19b0: 0x0f09, 0x19b1: 0x1199, 0x19b2: 0x0f31, 0x19b3: 0x0249, 0x19b4: 0x0f41, 0x19b5: 0x0259,
- 0x19b6: 0x0f51, 0x19b7: 0x0359, 0x19b8: 0x0f61, 0x19b9: 0x0f71, 0x19ba: 0x00d9, 0x19bb: 0x0f99,
- 0x19bc: 0x2039, 0x19bd: 0x0269, 0x19be: 0x01d9, 0x19bf: 0x0fa9,
- // Block 0x67, offset 0x19c0
- 0x19c0: 0x0fb9, 0x19c1: 0x1089, 0x19c2: 0x0279, 0x19c3: 0x0369, 0x19c4: 0x0289, 0x19c5: 0x13d1,
- 0x19c6: 0x0039, 0x19c7: 0x0ee9, 0x19c8: 0x1159, 0x19c9: 0x0ef9, 0x19ca: 0x0f09, 0x19cb: 0x1199,
- 0x19cc: 0x0f31, 0x19cd: 0x0249, 0x19ce: 0x0f41, 0x19cf: 0x0259, 0x19d0: 0x0f51, 0x19d1: 0x0359,
- 0x19d2: 0x0f61, 0x19d3: 0x0f71, 0x19d4: 0x00d9, 0x19d5: 0x0f99, 0x19d6: 0x2039, 0x19d7: 0x0269,
- 0x19d8: 0x01d9, 0x19d9: 0x0fa9, 0x19da: 0x0fb9, 0x19db: 0x1089, 0x19dc: 0x0279, 0x19dd: 0x0369,
- 0x19de: 0x0289, 0x19df: 0x13d1, 0x19e0: 0x0039, 0x19e1: 0x0ee9, 0x19e2: 0x1159, 0x19e3: 0x0ef9,
- 0x19e4: 0x0f09, 0x19e5: 0x1199, 0x19e6: 0x0f31, 0x19e7: 0x0249, 0x19e8: 0x0f41, 0x19e9: 0x0259,
- 0x19ea: 0x0f51, 0x19eb: 0x0359, 0x19ec: 0x0f61, 0x19ed: 0x0f71, 0x19ee: 0x00d9, 0x19ef: 0x0f99,
- 0x19f0: 0x2039, 0x19f1: 0x0269, 0x19f2: 0x01d9, 0x19f3: 0x0fa9, 0x19f4: 0x0fb9, 0x19f5: 0x1089,
- 0x19f6: 0x0279, 0x19f7: 0x0369, 0x19f8: 0x0289, 0x19f9: 0x13d1, 0x19fa: 0x0039, 0x19fb: 0x0ee9,
- 0x19fc: 0x1159, 0x19fd: 0x0ef9, 0x19fe: 0x0f09, 0x19ff: 0x1199,
- // Block 0x68, offset 0x1a00
- 0x1a00: 0x0f31, 0x1a01: 0x0249, 0x1a02: 0x0f41, 0x1a03: 0x0259, 0x1a04: 0x0f51, 0x1a05: 0x0359,
- 0x1a06: 0x0f61, 0x1a07: 0x0f71, 0x1a08: 0x00d9, 0x1a09: 0x0f99, 0x1a0a: 0x2039, 0x1a0b: 0x0269,
- 0x1a0c: 0x01d9, 0x1a0d: 0x0fa9, 0x1a0e: 0x0fb9, 0x1a0f: 0x1089, 0x1a10: 0x0279, 0x1a11: 0x0369,
- 0x1a12: 0x0289, 0x1a13: 0x13d1, 0x1a14: 0x0039, 0x1a15: 0x0ee9, 0x1a16: 0x1159, 0x1a17: 0x0ef9,
- 0x1a18: 0x0f09, 0x1a19: 0x1199, 0x1a1a: 0x0f31, 0x1a1b: 0x0249, 0x1a1c: 0x0f41, 0x1a1d: 0x0259,
- 0x1a1e: 0x0f51, 0x1a1f: 0x0359, 0x1a20: 0x0f61, 0x1a21: 0x0f71, 0x1a22: 0x00d9, 0x1a23: 0x0f99,
- 0x1a24: 0x2039, 0x1a25: 0x0269, 0x1a26: 0x01d9, 0x1a27: 0x0fa9, 0x1a28: 0x0fb9, 0x1a29: 0x1089,
- 0x1a2a: 0x0279, 0x1a2b: 0x0369, 0x1a2c: 0x0289, 0x1a2d: 0x13d1, 0x1a2e: 0x0039, 0x1a2f: 0x0ee9,
- 0x1a30: 0x1159, 0x1a31: 0x0ef9, 0x1a32: 0x0f09, 0x1a33: 0x1199, 0x1a34: 0x0f31, 0x1a35: 0x0249,
- 0x1a36: 0x0f41, 0x1a37: 0x0259, 0x1a38: 0x0f51, 0x1a39: 0x0359, 0x1a3a: 0x0f61, 0x1a3b: 0x0f71,
- 0x1a3c: 0x00d9, 0x1a3d: 0x0f99, 0x1a3e: 0x2039, 0x1a3f: 0x0269,
- // Block 0x69, offset 0x1a40
- 0x1a40: 0x01d9, 0x1a41: 0x0fa9, 0x1a42: 0x0fb9, 0x1a43: 0x1089, 0x1a44: 0x0279, 0x1a45: 0x0369,
- 0x1a46: 0x0289, 0x1a47: 0x13d1, 0x1a48: 0x0039, 0x1a49: 0x0ee9, 0x1a4a: 0x1159, 0x1a4b: 0x0ef9,
- 0x1a4c: 0x0f09, 0x1a4d: 0x1199, 0x1a4e: 0x0f31, 0x1a4f: 0x0249, 0x1a50: 0x0f41, 0x1a51: 0x0259,
- 0x1a52: 0x0f51, 0x1a53: 0x0359, 0x1a54: 0x0f61, 0x1a55: 0x0f71, 0x1a56: 0x00d9, 0x1a57: 0x0f99,
- 0x1a58: 0x2039, 0x1a59: 0x0269, 0x1a5a: 0x01d9, 0x1a5b: 0x0fa9, 0x1a5c: 0x0fb9, 0x1a5d: 0x1089,
- 0x1a5e: 0x0279, 0x1a5f: 0x0369, 0x1a60: 0x0289, 0x1a61: 0x13d1, 0x1a62: 0x0039, 0x1a63: 0x0ee9,
- 0x1a64: 0x1159, 0x1a65: 0x0ef9, 0x1a66: 0x0f09, 0x1a67: 0x1199, 0x1a68: 0x0f31, 0x1a69: 0x0249,
- 0x1a6a: 0x0f41, 0x1a6b: 0x0259, 0x1a6c: 0x0f51, 0x1a6d: 0x0359, 0x1a6e: 0x0f61, 0x1a6f: 0x0f71,
- 0x1a70: 0x00d9, 0x1a71: 0x0f99, 0x1a72: 0x2039, 0x1a73: 0x0269, 0x1a74: 0x01d9, 0x1a75: 0x0fa9,
- 0x1a76: 0x0fb9, 0x1a77: 0x1089, 0x1a78: 0x0279, 0x1a79: 0x0369, 0x1a7a: 0x0289, 0x1a7b: 0x13d1,
- 0x1a7c: 0x0039, 0x1a7d: 0x0ee9, 0x1a7e: 0x1159, 0x1a7f: 0x0ef9,
- // Block 0x6a, offset 0x1a80
- 0x1a80: 0x0f09, 0x1a81: 0x1199, 0x1a82: 0x0f31, 0x1a83: 0x0249, 0x1a84: 0x0f41, 0x1a85: 0x0259,
- 0x1a86: 0x0f51, 0x1a87: 0x0359, 0x1a88: 0x0f61, 0x1a89: 0x0f71, 0x1a8a: 0x00d9, 0x1a8b: 0x0f99,
- 0x1a8c: 0x2039, 0x1a8d: 0x0269, 0x1a8e: 0x01d9, 0x1a8f: 0x0fa9, 0x1a90: 0x0fb9, 0x1a91: 0x1089,
- 0x1a92: 0x0279, 0x1a93: 0x0369, 0x1a94: 0x0289, 0x1a95: 0x13d1, 0x1a96: 0x0039, 0x1a97: 0x0ee9,
- 0x1a98: 0x1159, 0x1a99: 0x0ef9, 0x1a9a: 0x0f09, 0x1a9b: 0x1199, 0x1a9c: 0x0f31, 0x1a9d: 0x0249,
- 0x1a9e: 0x0f41, 0x1a9f: 0x0259, 0x1aa0: 0x0f51, 0x1aa1: 0x0359, 0x1aa2: 0x0f61, 0x1aa3: 0x0f71,
- 0x1aa4: 0x00d9, 0x1aa5: 0x0f99, 0x1aa6: 0x2039, 0x1aa7: 0x0269, 0x1aa8: 0x01d9, 0x1aa9: 0x0fa9,
- 0x1aaa: 0x0fb9, 0x1aab: 0x1089, 0x1aac: 0x0279, 0x1aad: 0x0369, 0x1aae: 0x0289, 0x1aaf: 0x13d1,
- 0x1ab0: 0x0039, 0x1ab1: 0x0ee9, 0x1ab2: 0x1159, 0x1ab3: 0x0ef9, 0x1ab4: 0x0f09, 0x1ab5: 0x1199,
- 0x1ab6: 0x0f31, 0x1ab7: 0x0249, 0x1ab8: 0x0f41, 0x1ab9: 0x0259, 0x1aba: 0x0f51, 0x1abb: 0x0359,
- 0x1abc: 0x0f61, 0x1abd: 0x0f71, 0x1abe: 0x00d9, 0x1abf: 0x0f99,
- // Block 0x6b, offset 0x1ac0
- 0x1ac0: 0x2039, 0x1ac1: 0x0269, 0x1ac2: 0x01d9, 0x1ac3: 0x0fa9, 0x1ac4: 0x0fb9, 0x1ac5: 0x1089,
- 0x1ac6: 0x0279, 0x1ac7: 0x0369, 0x1ac8: 0x0289, 0x1ac9: 0x13d1, 0x1aca: 0x0039, 0x1acb: 0x0ee9,
- 0x1acc: 0x1159, 0x1acd: 0x0ef9, 0x1ace: 0x0f09, 0x1acf: 0x1199, 0x1ad0: 0x0f31, 0x1ad1: 0x0249,
- 0x1ad2: 0x0f41, 0x1ad3: 0x0259, 0x1ad4: 0x0f51, 0x1ad5: 0x0359, 0x1ad6: 0x0f61, 0x1ad7: 0x0f71,
- 0x1ad8: 0x00d9, 0x1ad9: 0x0f99, 0x1ada: 0x2039, 0x1adb: 0x0269, 0x1adc: 0x01d9, 0x1add: 0x0fa9,
- 0x1ade: 0x0fb9, 0x1adf: 0x1089, 0x1ae0: 0x0279, 0x1ae1: 0x0369, 0x1ae2: 0x0289, 0x1ae3: 0x13d1,
- 0x1ae4: 0xba81, 0x1ae5: 0xba99, 0x1ae6: 0x0040, 0x1ae7: 0x0040, 0x1ae8: 0xbab1, 0x1ae9: 0x1099,
- 0x1aea: 0x10b1, 0x1aeb: 0x10c9, 0x1aec: 0xbac9, 0x1aed: 0xbae1, 0x1aee: 0xbaf9, 0x1aef: 0x1429,
- 0x1af0: 0x1a31, 0x1af1: 0xbb11, 0x1af2: 0xbb29, 0x1af3: 0xbb41, 0x1af4: 0xbb59, 0x1af5: 0xbb71,
- 0x1af6: 0xbb89, 0x1af7: 0x2109, 0x1af8: 0x1111, 0x1af9: 0x1429, 0x1afa: 0xbba1, 0x1afb: 0xbbb9,
- 0x1afc: 0xbbd1, 0x1afd: 0x10e1, 0x1afe: 0x10f9, 0x1aff: 0xbbe9,
- // Block 0x6c, offset 0x1b00
- 0x1b00: 0x2079, 0x1b01: 0xbc01, 0x1b02: 0xbab1, 0x1b03: 0x1099, 0x1b04: 0x10b1, 0x1b05: 0x10c9,
- 0x1b06: 0xbac9, 0x1b07: 0xbae1, 0x1b08: 0xbaf9, 0x1b09: 0x1429, 0x1b0a: 0x1a31, 0x1b0b: 0xbb11,
- 0x1b0c: 0xbb29, 0x1b0d: 0xbb41, 0x1b0e: 0xbb59, 0x1b0f: 0xbb71, 0x1b10: 0xbb89, 0x1b11: 0x2109,
- 0x1b12: 0x1111, 0x1b13: 0xbba1, 0x1b14: 0xbba1, 0x1b15: 0xbbb9, 0x1b16: 0xbbd1, 0x1b17: 0x10e1,
- 0x1b18: 0x10f9, 0x1b19: 0xbbe9, 0x1b1a: 0x2079, 0x1b1b: 0xbc21, 0x1b1c: 0xbac9, 0x1b1d: 0x1429,
- 0x1b1e: 0xbb11, 0x1b1f: 0x10e1, 0x1b20: 0x1111, 0x1b21: 0x2109, 0x1b22: 0xbab1, 0x1b23: 0x1099,
- 0x1b24: 0x10b1, 0x1b25: 0x10c9, 0x1b26: 0xbac9, 0x1b27: 0xbae1, 0x1b28: 0xbaf9, 0x1b29: 0x1429,
- 0x1b2a: 0x1a31, 0x1b2b: 0xbb11, 0x1b2c: 0xbb29, 0x1b2d: 0xbb41, 0x1b2e: 0xbb59, 0x1b2f: 0xbb71,
- 0x1b30: 0xbb89, 0x1b31: 0x2109, 0x1b32: 0x1111, 0x1b33: 0x1429, 0x1b34: 0xbba1, 0x1b35: 0xbbb9,
- 0x1b36: 0xbbd1, 0x1b37: 0x10e1, 0x1b38: 0x10f9, 0x1b39: 0xbbe9, 0x1b3a: 0x2079, 0x1b3b: 0xbc01,
- 0x1b3c: 0xbab1, 0x1b3d: 0x1099, 0x1b3e: 0x10b1, 0x1b3f: 0x10c9,
- // Block 0x6d, offset 0x1b40
- 0x1b40: 0xbac9, 0x1b41: 0xbae1, 0x1b42: 0xbaf9, 0x1b43: 0x1429, 0x1b44: 0x1a31, 0x1b45: 0xbb11,
- 0x1b46: 0xbb29, 0x1b47: 0xbb41, 0x1b48: 0xbb59, 0x1b49: 0xbb71, 0x1b4a: 0xbb89, 0x1b4b: 0x2109,
- 0x1b4c: 0x1111, 0x1b4d: 0xbba1, 0x1b4e: 0xbba1, 0x1b4f: 0xbbb9, 0x1b50: 0xbbd1, 0x1b51: 0x10e1,
- 0x1b52: 0x10f9, 0x1b53: 0xbbe9, 0x1b54: 0x2079, 0x1b55: 0xbc21, 0x1b56: 0xbac9, 0x1b57: 0x1429,
- 0x1b58: 0xbb11, 0x1b59: 0x10e1, 0x1b5a: 0x1111, 0x1b5b: 0x2109, 0x1b5c: 0xbab1, 0x1b5d: 0x1099,
- 0x1b5e: 0x10b1, 0x1b5f: 0x10c9, 0x1b60: 0xbac9, 0x1b61: 0xbae1, 0x1b62: 0xbaf9, 0x1b63: 0x1429,
- 0x1b64: 0x1a31, 0x1b65: 0xbb11, 0x1b66: 0xbb29, 0x1b67: 0xbb41, 0x1b68: 0xbb59, 0x1b69: 0xbb71,
- 0x1b6a: 0xbb89, 0x1b6b: 0x2109, 0x1b6c: 0x1111, 0x1b6d: 0x1429, 0x1b6e: 0xbba1, 0x1b6f: 0xbbb9,
- 0x1b70: 0xbbd1, 0x1b71: 0x10e1, 0x1b72: 0x10f9, 0x1b73: 0xbbe9, 0x1b74: 0x2079, 0x1b75: 0xbc01,
- 0x1b76: 0xbab1, 0x1b77: 0x1099, 0x1b78: 0x10b1, 0x1b79: 0x10c9, 0x1b7a: 0xbac9, 0x1b7b: 0xbae1,
- 0x1b7c: 0xbaf9, 0x1b7d: 0x1429, 0x1b7e: 0x1a31, 0x1b7f: 0xbb11,
- // Block 0x6e, offset 0x1b80
- 0x1b80: 0xbb29, 0x1b81: 0xbb41, 0x1b82: 0xbb59, 0x1b83: 0xbb71, 0x1b84: 0xbb89, 0x1b85: 0x2109,
- 0x1b86: 0x1111, 0x1b87: 0xbba1, 0x1b88: 0xbba1, 0x1b89: 0xbbb9, 0x1b8a: 0xbbd1, 0x1b8b: 0x10e1,
- 0x1b8c: 0x10f9, 0x1b8d: 0xbbe9, 0x1b8e: 0x2079, 0x1b8f: 0xbc21, 0x1b90: 0xbac9, 0x1b91: 0x1429,
- 0x1b92: 0xbb11, 0x1b93: 0x10e1, 0x1b94: 0x1111, 0x1b95: 0x2109, 0x1b96: 0xbab1, 0x1b97: 0x1099,
- 0x1b98: 0x10b1, 0x1b99: 0x10c9, 0x1b9a: 0xbac9, 0x1b9b: 0xbae1, 0x1b9c: 0xbaf9, 0x1b9d: 0x1429,
- 0x1b9e: 0x1a31, 0x1b9f: 0xbb11, 0x1ba0: 0xbb29, 0x1ba1: 0xbb41, 0x1ba2: 0xbb59, 0x1ba3: 0xbb71,
- 0x1ba4: 0xbb89, 0x1ba5: 0x2109, 0x1ba6: 0x1111, 0x1ba7: 0x1429, 0x1ba8: 0xbba1, 0x1ba9: 0xbbb9,
- 0x1baa: 0xbbd1, 0x1bab: 0x10e1, 0x1bac: 0x10f9, 0x1bad: 0xbbe9, 0x1bae: 0x2079, 0x1baf: 0xbc01,
- 0x1bb0: 0xbab1, 0x1bb1: 0x1099, 0x1bb2: 0x10b1, 0x1bb3: 0x10c9, 0x1bb4: 0xbac9, 0x1bb5: 0xbae1,
- 0x1bb6: 0xbaf9, 0x1bb7: 0x1429, 0x1bb8: 0x1a31, 0x1bb9: 0xbb11, 0x1bba: 0xbb29, 0x1bbb: 0xbb41,
- 0x1bbc: 0xbb59, 0x1bbd: 0xbb71, 0x1bbe: 0xbb89, 0x1bbf: 0x2109,
- // Block 0x6f, offset 0x1bc0
- 0x1bc0: 0x1111, 0x1bc1: 0xbba1, 0x1bc2: 0xbba1, 0x1bc3: 0xbbb9, 0x1bc4: 0xbbd1, 0x1bc5: 0x10e1,
- 0x1bc6: 0x10f9, 0x1bc7: 0xbbe9, 0x1bc8: 0x2079, 0x1bc9: 0xbc21, 0x1bca: 0xbac9, 0x1bcb: 0x1429,
- 0x1bcc: 0xbb11, 0x1bcd: 0x10e1, 0x1bce: 0x1111, 0x1bcf: 0x2109, 0x1bd0: 0xbab1, 0x1bd1: 0x1099,
- 0x1bd2: 0x10b1, 0x1bd3: 0x10c9, 0x1bd4: 0xbac9, 0x1bd5: 0xbae1, 0x1bd6: 0xbaf9, 0x1bd7: 0x1429,
- 0x1bd8: 0x1a31, 0x1bd9: 0xbb11, 0x1bda: 0xbb29, 0x1bdb: 0xbb41, 0x1bdc: 0xbb59, 0x1bdd: 0xbb71,
- 0x1bde: 0xbb89, 0x1bdf: 0x2109, 0x1be0: 0x1111, 0x1be1: 0x1429, 0x1be2: 0xbba1, 0x1be3: 0xbbb9,
- 0x1be4: 0xbbd1, 0x1be5: 0x10e1, 0x1be6: 0x10f9, 0x1be7: 0xbbe9, 0x1be8: 0x2079, 0x1be9: 0xbc01,
- 0x1bea: 0xbab1, 0x1beb: 0x1099, 0x1bec: 0x10b1, 0x1bed: 0x10c9, 0x1bee: 0xbac9, 0x1bef: 0xbae1,
- 0x1bf0: 0xbaf9, 0x1bf1: 0x1429, 0x1bf2: 0x1a31, 0x1bf3: 0xbb11, 0x1bf4: 0xbb29, 0x1bf5: 0xbb41,
- 0x1bf6: 0xbb59, 0x1bf7: 0xbb71, 0x1bf8: 0xbb89, 0x1bf9: 0x2109, 0x1bfa: 0x1111, 0x1bfb: 0xbba1,
- 0x1bfc: 0xbba1, 0x1bfd: 0xbbb9, 0x1bfe: 0xbbd1, 0x1bff: 0x10e1,
- // Block 0x70, offset 0x1c00
- 0x1c00: 0x10f9, 0x1c01: 0xbbe9, 0x1c02: 0x2079, 0x1c03: 0xbc21, 0x1c04: 0xbac9, 0x1c05: 0x1429,
- 0x1c06: 0xbb11, 0x1c07: 0x10e1, 0x1c08: 0x1111, 0x1c09: 0x2109, 0x1c0a: 0xbc41, 0x1c0b: 0xbc41,
- 0x1c0c: 0x0040, 0x1c0d: 0x0040, 0x1c0e: 0x1f41, 0x1c0f: 0x00c9, 0x1c10: 0x0069, 0x1c11: 0x0079,
- 0x1c12: 0x1f51, 0x1c13: 0x1f61, 0x1c14: 0x1f71, 0x1c15: 0x1f81, 0x1c16: 0x1f91, 0x1c17: 0x1fa1,
- 0x1c18: 0x1f41, 0x1c19: 0x00c9, 0x1c1a: 0x0069, 0x1c1b: 0x0079, 0x1c1c: 0x1f51, 0x1c1d: 0x1f61,
- 0x1c1e: 0x1f71, 0x1c1f: 0x1f81, 0x1c20: 0x1f91, 0x1c21: 0x1fa1, 0x1c22: 0x1f41, 0x1c23: 0x00c9,
- 0x1c24: 0x0069, 0x1c25: 0x0079, 0x1c26: 0x1f51, 0x1c27: 0x1f61, 0x1c28: 0x1f71, 0x1c29: 0x1f81,
- 0x1c2a: 0x1f91, 0x1c2b: 0x1fa1, 0x1c2c: 0x1f41, 0x1c2d: 0x00c9, 0x1c2e: 0x0069, 0x1c2f: 0x0079,
- 0x1c30: 0x1f51, 0x1c31: 0x1f61, 0x1c32: 0x1f71, 0x1c33: 0x1f81, 0x1c34: 0x1f91, 0x1c35: 0x1fa1,
- 0x1c36: 0x1f41, 0x1c37: 0x00c9, 0x1c38: 0x0069, 0x1c39: 0x0079, 0x1c3a: 0x1f51, 0x1c3b: 0x1f61,
- 0x1c3c: 0x1f71, 0x1c3d: 0x1f81, 0x1c3e: 0x1f91, 0x1c3f: 0x1fa1,
- // Block 0x71, offset 0x1c40
- 0x1c40: 0xe115, 0x1c41: 0xe115, 0x1c42: 0xe135, 0x1c43: 0xe135, 0x1c44: 0xe115, 0x1c45: 0xe115,
- 0x1c46: 0xe175, 0x1c47: 0xe175, 0x1c48: 0xe115, 0x1c49: 0xe115, 0x1c4a: 0xe135, 0x1c4b: 0xe135,
- 0x1c4c: 0xe115, 0x1c4d: 0xe115, 0x1c4e: 0xe1f5, 0x1c4f: 0xe1f5, 0x1c50: 0xe115, 0x1c51: 0xe115,
- 0x1c52: 0xe135, 0x1c53: 0xe135, 0x1c54: 0xe115, 0x1c55: 0xe115, 0x1c56: 0xe175, 0x1c57: 0xe175,
- 0x1c58: 0xe115, 0x1c59: 0xe115, 0x1c5a: 0xe135, 0x1c5b: 0xe135, 0x1c5c: 0xe115, 0x1c5d: 0xe115,
- 0x1c5e: 0x8b05, 0x1c5f: 0x8b05, 0x1c60: 0x04b5, 0x1c61: 0x04b5, 0x1c62: 0x0a08, 0x1c63: 0x0a08,
- 0x1c64: 0x0a08, 0x1c65: 0x0a08, 0x1c66: 0x0a08, 0x1c67: 0x0a08, 0x1c68: 0x0a08, 0x1c69: 0x0a08,
- 0x1c6a: 0x0a08, 0x1c6b: 0x0a08, 0x1c6c: 0x0a08, 0x1c6d: 0x0a08, 0x1c6e: 0x0a08, 0x1c6f: 0x0a08,
- 0x1c70: 0x0a08, 0x1c71: 0x0a08, 0x1c72: 0x0a08, 0x1c73: 0x0a08, 0x1c74: 0x0a08, 0x1c75: 0x0a08,
- 0x1c76: 0x0a08, 0x1c77: 0x0a08, 0x1c78: 0x0a08, 0x1c79: 0x0a08, 0x1c7a: 0x0a08, 0x1c7b: 0x0a08,
- 0x1c7c: 0x0a08, 0x1c7d: 0x0a08, 0x1c7e: 0x0a08, 0x1c7f: 0x0a08,
- // Block 0x72, offset 0x1c80
- 0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0x0040, 0x1c85: 0xb411,
- 0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0xb399, 0x1c8b: 0xb3b1,
- 0x1c8c: 0xb3c9, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0xb369, 0x1c91: 0xb2d9,
- 0x1c92: 0xb381, 0x1c93: 0xb279, 0x1c94: 0xb2c1, 0x1c95: 0xb1d1, 0x1c96: 0xb1e9, 0x1c97: 0xb231,
- 0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0xbc59, 0x1c9d: 0x7949,
- 0x1c9e: 0xbc71, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040,
- 0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0x0040, 0x1ca9: 0xb429,
- 0x1caa: 0xb399, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339,
- 0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1,
- 0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0x0040, 0x1cbb: 0xb351,
- 0x1cbc: 0x0040, 0x1cbd: 0x0040, 0x1cbe: 0x0040, 0x1cbf: 0x0040,
- // Block 0x73, offset 0x1cc0
- 0x1cc0: 0x0040, 0x1cc1: 0x0040, 0x1cc2: 0xb201, 0x1cc3: 0x0040, 0x1cc4: 0x0040, 0x1cc5: 0x0040,
- 0x1cc6: 0x0040, 0x1cc7: 0xb219, 0x1cc8: 0x0040, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1,
- 0x1ccc: 0x0040, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0x0040, 0x1cd1: 0xb2d9,
- 0x1cd2: 0xb381, 0x1cd3: 0x0040, 0x1cd4: 0xb2c1, 0x1cd5: 0x0040, 0x1cd6: 0x0040, 0x1cd7: 0xb231,
- 0x1cd8: 0x0040, 0x1cd9: 0xb2f1, 0x1cda: 0x0040, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x7949,
- 0x1cde: 0x0040, 0x1cdf: 0xbc89, 0x1ce0: 0x0040, 0x1ce1: 0xb1a1, 0x1ce2: 0xb201, 0x1ce3: 0x0040,
- 0x1ce4: 0xb3f9, 0x1ce5: 0x0040, 0x1ce6: 0x0040, 0x1ce7: 0xb219, 0x1ce8: 0xb309, 0x1ce9: 0xb429,
- 0x1cea: 0xb399, 0x1ceb: 0x0040, 0x1cec: 0xb3c9, 0x1ced: 0xb3e1, 0x1cee: 0xb2a9, 0x1cef: 0xb339,
- 0x1cf0: 0xb369, 0x1cf1: 0xb2d9, 0x1cf2: 0xb381, 0x1cf3: 0x0040, 0x1cf4: 0xb2c1, 0x1cf5: 0xb1d1,
- 0x1cf6: 0xb1e9, 0x1cf7: 0xb231, 0x1cf8: 0x0040, 0x1cf9: 0xb2f1, 0x1cfa: 0xb321, 0x1cfb: 0xb351,
- 0x1cfc: 0xbc59, 0x1cfd: 0x0040, 0x1cfe: 0xbc71, 0x1cff: 0x0040,
- // Block 0x74, offset 0x1d00
- 0x1d00: 0xb189, 0x1d01: 0xb1a1, 0x1d02: 0xb201, 0x1d03: 0xb249, 0x1d04: 0xb3f9, 0x1d05: 0xb411,
- 0x1d06: 0xb291, 0x1d07: 0xb219, 0x1d08: 0xb309, 0x1d09: 0xb429, 0x1d0a: 0x0040, 0x1d0b: 0xb3b1,
- 0x1d0c: 0xb3c9, 0x1d0d: 0xb3e1, 0x1d0e: 0xb2a9, 0x1d0f: 0xb339, 0x1d10: 0xb369, 0x1d11: 0xb2d9,
- 0x1d12: 0xb381, 0x1d13: 0xb279, 0x1d14: 0xb2c1, 0x1d15: 0xb1d1, 0x1d16: 0xb1e9, 0x1d17: 0xb231,
- 0x1d18: 0xb261, 0x1d19: 0xb2f1, 0x1d1a: 0xb321, 0x1d1b: 0xb351, 0x1d1c: 0x0040, 0x1d1d: 0x0040,
- 0x1d1e: 0x0040, 0x1d1f: 0x0040, 0x1d20: 0x0040, 0x1d21: 0xb1a1, 0x1d22: 0xb201, 0x1d23: 0xb249,
- 0x1d24: 0x0040, 0x1d25: 0xb411, 0x1d26: 0xb291, 0x1d27: 0xb219, 0x1d28: 0xb309, 0x1d29: 0xb429,
- 0x1d2a: 0x0040, 0x1d2b: 0xb3b1, 0x1d2c: 0xb3c9, 0x1d2d: 0xb3e1, 0x1d2e: 0xb2a9, 0x1d2f: 0xb339,
- 0x1d30: 0xb369, 0x1d31: 0xb2d9, 0x1d32: 0xb381, 0x1d33: 0xb279, 0x1d34: 0xb2c1, 0x1d35: 0xb1d1,
- 0x1d36: 0xb1e9, 0x1d37: 0xb231, 0x1d38: 0xb261, 0x1d39: 0xb2f1, 0x1d3a: 0xb321, 0x1d3b: 0xb351,
- 0x1d3c: 0x0040, 0x1d3d: 0x0040, 0x1d3e: 0x0040, 0x1d3f: 0x0040,
- // Block 0x75, offset 0x1d40
- 0x1d40: 0x0040, 0x1d41: 0xbca2, 0x1d42: 0xbcba, 0x1d43: 0xbcd2, 0x1d44: 0xbcea, 0x1d45: 0xbd02,
- 0x1d46: 0xbd1a, 0x1d47: 0xbd32, 0x1d48: 0xbd4a, 0x1d49: 0xbd62, 0x1d4a: 0xbd7a, 0x1d4b: 0x0018,
- 0x1d4c: 0x0018, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xbd92, 0x1d51: 0xbdb2,
- 0x1d52: 0xbdd2, 0x1d53: 0xbdf2, 0x1d54: 0xbe12, 0x1d55: 0xbe32, 0x1d56: 0xbe52, 0x1d57: 0xbe72,
- 0x1d58: 0xbe92, 0x1d59: 0xbeb2, 0x1d5a: 0xbed2, 0x1d5b: 0xbef2, 0x1d5c: 0xbf12, 0x1d5d: 0xbf32,
- 0x1d5e: 0xbf52, 0x1d5f: 0xbf72, 0x1d60: 0xbf92, 0x1d61: 0xbfb2, 0x1d62: 0xbfd2, 0x1d63: 0xbff2,
- 0x1d64: 0xc012, 0x1d65: 0xc032, 0x1d66: 0xc052, 0x1d67: 0xc072, 0x1d68: 0xc092, 0x1d69: 0xc0b2,
- 0x1d6a: 0xc0d1, 0x1d6b: 0x1159, 0x1d6c: 0x0269, 0x1d6d: 0x6671, 0x1d6e: 0xc111, 0x1d6f: 0x0040,
- 0x1d70: 0x0039, 0x1d71: 0x0ee9, 0x1d72: 0x1159, 0x1d73: 0x0ef9, 0x1d74: 0x0f09, 0x1d75: 0x1199,
- 0x1d76: 0x0f31, 0x1d77: 0x0249, 0x1d78: 0x0f41, 0x1d79: 0x0259, 0x1d7a: 0x0f51, 0x1d7b: 0x0359,
- 0x1d7c: 0x0f61, 0x1d7d: 0x0f71, 0x1d7e: 0x00d9, 0x1d7f: 0x0f99,
- // Block 0x76, offset 0x1d80
- 0x1d80: 0x2039, 0x1d81: 0x0269, 0x1d82: 0x01d9, 0x1d83: 0x0fa9, 0x1d84: 0x0fb9, 0x1d85: 0x1089,
- 0x1d86: 0x0279, 0x1d87: 0x0369, 0x1d88: 0x0289, 0x1d89: 0x13d1, 0x1d8a: 0xc129, 0x1d8b: 0x65b1,
- 0x1d8c: 0xc141, 0x1d8d: 0x1441, 0x1d8e: 0xc159, 0x1d8f: 0xc179, 0x1d90: 0x0018, 0x1d91: 0x0018,
- 0x1d92: 0x0018, 0x1d93: 0x0018, 0x1d94: 0x0018, 0x1d95: 0x0018, 0x1d96: 0x0018, 0x1d97: 0x0018,
- 0x1d98: 0x0018, 0x1d99: 0x0018, 0x1d9a: 0x0018, 0x1d9b: 0x0018, 0x1d9c: 0x0018, 0x1d9d: 0x0018,
- 0x1d9e: 0x0018, 0x1d9f: 0x0018, 0x1da0: 0x0018, 0x1da1: 0x0018, 0x1da2: 0x0018, 0x1da3: 0x0018,
- 0x1da4: 0x0018, 0x1da5: 0x0018, 0x1da6: 0x0018, 0x1da7: 0x0018, 0x1da8: 0x0018, 0x1da9: 0x0018,
- 0x1daa: 0xc191, 0x1dab: 0xc1a9, 0x1dac: 0x0040, 0x1dad: 0x0040, 0x1dae: 0x0040, 0x1daf: 0x0040,
- 0x1db0: 0x0018, 0x1db1: 0x0018, 0x1db2: 0x0018, 0x1db3: 0x0018, 0x1db4: 0x0018, 0x1db5: 0x0018,
- 0x1db6: 0x0018, 0x1db7: 0x0018, 0x1db8: 0x0018, 0x1db9: 0x0018, 0x1dba: 0x0018, 0x1dbb: 0x0018,
- 0x1dbc: 0x0018, 0x1dbd: 0x0018, 0x1dbe: 0x0018, 0x1dbf: 0x0018,
- // Block 0x77, offset 0x1dc0
- 0x1dc0: 0xc1d9, 0x1dc1: 0xc211, 0x1dc2: 0xc249, 0x1dc3: 0x0040, 0x1dc4: 0x0040, 0x1dc5: 0x0040,
- 0x1dc6: 0x0040, 0x1dc7: 0x0040, 0x1dc8: 0x0040, 0x1dc9: 0x0040, 0x1dca: 0x0040, 0x1dcb: 0x0040,
- 0x1dcc: 0x0040, 0x1dcd: 0x0040, 0x1dce: 0x0040, 0x1dcf: 0x0040, 0x1dd0: 0xc269, 0x1dd1: 0xc289,
- 0x1dd2: 0xc2a9, 0x1dd3: 0xc2c9, 0x1dd4: 0xc2e9, 0x1dd5: 0xc309, 0x1dd6: 0xc329, 0x1dd7: 0xc349,
- 0x1dd8: 0xc369, 0x1dd9: 0xc389, 0x1dda: 0xc3a9, 0x1ddb: 0xc3c9, 0x1ddc: 0xc3e9, 0x1ddd: 0xc409,
- 0x1dde: 0xc429, 0x1ddf: 0xc449, 0x1de0: 0xc469, 0x1de1: 0xc489, 0x1de2: 0xc4a9, 0x1de3: 0xc4c9,
- 0x1de4: 0xc4e9, 0x1de5: 0xc509, 0x1de6: 0xc529, 0x1de7: 0xc549, 0x1de8: 0xc569, 0x1de9: 0xc589,
- 0x1dea: 0xc5a9, 0x1deb: 0xc5c9, 0x1dec: 0xc5e9, 0x1ded: 0xc609, 0x1dee: 0xc629, 0x1def: 0xc649,
- 0x1df0: 0xc669, 0x1df1: 0xc689, 0x1df2: 0xc6a9, 0x1df3: 0xc6c9, 0x1df4: 0xc6e9, 0x1df5: 0xc709,
- 0x1df6: 0xc729, 0x1df7: 0xc749, 0x1df8: 0xc769, 0x1df9: 0xc789, 0x1dfa: 0xc7a9, 0x1dfb: 0xc7c9,
- 0x1dfc: 0x0040, 0x1dfd: 0x0040, 0x1dfe: 0x0040, 0x1dff: 0x0040,
- // Block 0x78, offset 0x1e00
- 0x1e00: 0xcaf9, 0x1e01: 0xcb19, 0x1e02: 0xcb39, 0x1e03: 0x8b1d, 0x1e04: 0xcb59, 0x1e05: 0xcb79,
- 0x1e06: 0xcb99, 0x1e07: 0xcbb9, 0x1e08: 0xcbd9, 0x1e09: 0xcbf9, 0x1e0a: 0xcc19, 0x1e0b: 0xcc39,
- 0x1e0c: 0xcc59, 0x1e0d: 0x8b3d, 0x1e0e: 0xcc79, 0x1e0f: 0xcc99, 0x1e10: 0xccb9, 0x1e11: 0xccd9,
- 0x1e12: 0x8b5d, 0x1e13: 0xccf9, 0x1e14: 0xcd19, 0x1e15: 0xc429, 0x1e16: 0x8b7d, 0x1e17: 0xcd39,
- 0x1e18: 0xcd59, 0x1e19: 0xcd79, 0x1e1a: 0xcd99, 0x1e1b: 0xcdb9, 0x1e1c: 0x8b9d, 0x1e1d: 0xcdd9,
- 0x1e1e: 0xcdf9, 0x1e1f: 0xce19, 0x1e20: 0xce39, 0x1e21: 0xce59, 0x1e22: 0xc789, 0x1e23: 0xce79,
- 0x1e24: 0xce99, 0x1e25: 0xceb9, 0x1e26: 0xced9, 0x1e27: 0xcef9, 0x1e28: 0xcf19, 0x1e29: 0xcf39,
- 0x1e2a: 0xcf59, 0x1e2b: 0xcf79, 0x1e2c: 0xcf99, 0x1e2d: 0xcfb9, 0x1e2e: 0xcfd9, 0x1e2f: 0xcff9,
- 0x1e30: 0xd019, 0x1e31: 0xd039, 0x1e32: 0xd039, 0x1e33: 0xd039, 0x1e34: 0x8bbd, 0x1e35: 0xd059,
- 0x1e36: 0xd079, 0x1e37: 0xd099, 0x1e38: 0x8bdd, 0x1e39: 0xd0b9, 0x1e3a: 0xd0d9, 0x1e3b: 0xd0f9,
- 0x1e3c: 0xd119, 0x1e3d: 0xd139, 0x1e3e: 0xd159, 0x1e3f: 0xd179,
- // Block 0x79, offset 0x1e40
- 0x1e40: 0xd199, 0x1e41: 0xd1b9, 0x1e42: 0xd1d9, 0x1e43: 0xd1f9, 0x1e44: 0xd219, 0x1e45: 0xd239,
- 0x1e46: 0xd239, 0x1e47: 0xd259, 0x1e48: 0xd279, 0x1e49: 0xd299, 0x1e4a: 0xd2b9, 0x1e4b: 0xd2d9,
- 0x1e4c: 0xd2f9, 0x1e4d: 0xd319, 0x1e4e: 0xd339, 0x1e4f: 0xd359, 0x1e50: 0xd379, 0x1e51: 0xd399,
- 0x1e52: 0xd3b9, 0x1e53: 0xd3d9, 0x1e54: 0xd3f9, 0x1e55: 0xd419, 0x1e56: 0xd439, 0x1e57: 0xd459,
- 0x1e58: 0xd479, 0x1e59: 0x8bfd, 0x1e5a: 0xd499, 0x1e5b: 0xd4b9, 0x1e5c: 0xd4d9, 0x1e5d: 0xc309,
- 0x1e5e: 0xd4f9, 0x1e5f: 0xd519, 0x1e60: 0x8c1d, 0x1e61: 0x8c3d, 0x1e62: 0xd539, 0x1e63: 0xd559,
- 0x1e64: 0xd579, 0x1e65: 0xd599, 0x1e66: 0xd5b9, 0x1e67: 0xd5d9, 0x1e68: 0x2040, 0x1e69: 0xd5f9,
- 0x1e6a: 0xd619, 0x1e6b: 0xd619, 0x1e6c: 0x8c5d, 0x1e6d: 0xd639, 0x1e6e: 0xd659, 0x1e6f: 0xd679,
- 0x1e70: 0xd699, 0x1e71: 0x8c7d, 0x1e72: 0xd6b9, 0x1e73: 0xd6d9, 0x1e74: 0x2040, 0x1e75: 0xd6f9,
- 0x1e76: 0xd719, 0x1e77: 0xd739, 0x1e78: 0xd759, 0x1e79: 0xd779, 0x1e7a: 0xd799, 0x1e7b: 0x8c9d,
- 0x1e7c: 0xd7b9, 0x1e7d: 0x8cbd, 0x1e7e: 0xd7d9, 0x1e7f: 0xd7f9,
- // Block 0x7a, offset 0x1e80
- 0x1e80: 0xd819, 0x1e81: 0xd839, 0x1e82: 0xd859, 0x1e83: 0xd879, 0x1e84: 0xd899, 0x1e85: 0xd8b9,
- 0x1e86: 0xd8d9, 0x1e87: 0xd8f9, 0x1e88: 0xd919, 0x1e89: 0x8cdd, 0x1e8a: 0xd939, 0x1e8b: 0xd959,
- 0x1e8c: 0xd979, 0x1e8d: 0xd999, 0x1e8e: 0xd9b9, 0x1e8f: 0x8cfd, 0x1e90: 0xd9d9, 0x1e91: 0x8d1d,
- 0x1e92: 0x8d3d, 0x1e93: 0xd9f9, 0x1e94: 0xda19, 0x1e95: 0xda19, 0x1e96: 0xda39, 0x1e97: 0x8d5d,
- 0x1e98: 0x8d7d, 0x1e99: 0xda59, 0x1e9a: 0xda79, 0x1e9b: 0xda99, 0x1e9c: 0xdab9, 0x1e9d: 0xdad9,
- 0x1e9e: 0xdaf9, 0x1e9f: 0xdb19, 0x1ea0: 0xdb39, 0x1ea1: 0xdb59, 0x1ea2: 0xdb79, 0x1ea3: 0xdb99,
- 0x1ea4: 0x8d9d, 0x1ea5: 0xdbb9, 0x1ea6: 0xdbd9, 0x1ea7: 0xdbf9, 0x1ea8: 0xdc19, 0x1ea9: 0xdbf9,
- 0x1eaa: 0xdc39, 0x1eab: 0xdc59, 0x1eac: 0xdc79, 0x1ead: 0xdc99, 0x1eae: 0xdcb9, 0x1eaf: 0xdcd9,
- 0x1eb0: 0xdcf9, 0x1eb1: 0xdd19, 0x1eb2: 0xdd39, 0x1eb3: 0xdd59, 0x1eb4: 0xdd79, 0x1eb5: 0xdd99,
- 0x1eb6: 0xddb9, 0x1eb7: 0xddd9, 0x1eb8: 0x8dbd, 0x1eb9: 0xddf9, 0x1eba: 0xde19, 0x1ebb: 0xde39,
- 0x1ebc: 0xde59, 0x1ebd: 0xde79, 0x1ebe: 0x8ddd, 0x1ebf: 0xde99,
- // Block 0x7b, offset 0x1ec0
- 0x1ec0: 0xe599, 0x1ec1: 0xe5b9, 0x1ec2: 0xe5d9, 0x1ec3: 0xe5f9, 0x1ec4: 0xe619, 0x1ec5: 0xe639,
- 0x1ec6: 0x8efd, 0x1ec7: 0xe659, 0x1ec8: 0xe679, 0x1ec9: 0xe699, 0x1eca: 0xe6b9, 0x1ecb: 0xe6d9,
- 0x1ecc: 0xe6f9, 0x1ecd: 0x8f1d, 0x1ece: 0xe719, 0x1ecf: 0xe739, 0x1ed0: 0x8f3d, 0x1ed1: 0x8f5d,
- 0x1ed2: 0xe759, 0x1ed3: 0xe779, 0x1ed4: 0xe799, 0x1ed5: 0xe7b9, 0x1ed6: 0xe7d9, 0x1ed7: 0xe7f9,
- 0x1ed8: 0xe819, 0x1ed9: 0xe839, 0x1eda: 0xe859, 0x1edb: 0x8f7d, 0x1edc: 0xe879, 0x1edd: 0x8f9d,
- 0x1ede: 0xe899, 0x1edf: 0x2040, 0x1ee0: 0xe8b9, 0x1ee1: 0xe8d9, 0x1ee2: 0xe8f9, 0x1ee3: 0x8fbd,
- 0x1ee4: 0xe919, 0x1ee5: 0xe939, 0x1ee6: 0x8fdd, 0x1ee7: 0x8ffd, 0x1ee8: 0xe959, 0x1ee9: 0xe979,
- 0x1eea: 0xe999, 0x1eeb: 0xe9b9, 0x1eec: 0xe9d9, 0x1eed: 0xe9d9, 0x1eee: 0xe9f9, 0x1eef: 0xea19,
- 0x1ef0: 0xea39, 0x1ef1: 0xea59, 0x1ef2: 0xea79, 0x1ef3: 0xea99, 0x1ef4: 0xeab9, 0x1ef5: 0x901d,
- 0x1ef6: 0xead9, 0x1ef7: 0x903d, 0x1ef8: 0xeaf9, 0x1ef9: 0x905d, 0x1efa: 0xeb19, 0x1efb: 0x907d,
- 0x1efc: 0x909d, 0x1efd: 0x90bd, 0x1efe: 0xeb39, 0x1eff: 0xeb59,
- // Block 0x7c, offset 0x1f00
- 0x1f00: 0xeb79, 0x1f01: 0x90dd, 0x1f02: 0x90fd, 0x1f03: 0x911d, 0x1f04: 0x913d, 0x1f05: 0xeb99,
- 0x1f06: 0xebb9, 0x1f07: 0xebb9, 0x1f08: 0xebd9, 0x1f09: 0xebf9, 0x1f0a: 0xec19, 0x1f0b: 0xec39,
- 0x1f0c: 0xec59, 0x1f0d: 0x915d, 0x1f0e: 0xec79, 0x1f0f: 0xec99, 0x1f10: 0xecb9, 0x1f11: 0xecd9,
- 0x1f12: 0x917d, 0x1f13: 0xecf9, 0x1f14: 0x919d, 0x1f15: 0x91bd, 0x1f16: 0xed19, 0x1f17: 0xed39,
- 0x1f18: 0xed59, 0x1f19: 0xed79, 0x1f1a: 0xed99, 0x1f1b: 0xedb9, 0x1f1c: 0x91dd, 0x1f1d: 0x91fd,
- 0x1f1e: 0x921d, 0x1f1f: 0x2040, 0x1f20: 0xedd9, 0x1f21: 0x923d, 0x1f22: 0xedf9, 0x1f23: 0xee19,
- 0x1f24: 0xee39, 0x1f25: 0x925d, 0x1f26: 0xee59, 0x1f27: 0xee79, 0x1f28: 0xee99, 0x1f29: 0xeeb9,
- 0x1f2a: 0xeed9, 0x1f2b: 0x927d, 0x1f2c: 0xeef9, 0x1f2d: 0xef19, 0x1f2e: 0xef39, 0x1f2f: 0xef59,
- 0x1f30: 0xef79, 0x1f31: 0xef99, 0x1f32: 0x929d, 0x1f33: 0x92bd, 0x1f34: 0xefb9, 0x1f35: 0x92dd,
- 0x1f36: 0xefd9, 0x1f37: 0x92fd, 0x1f38: 0xeff9, 0x1f39: 0xf019, 0x1f3a: 0xf039, 0x1f3b: 0x931d,
- 0x1f3c: 0x933d, 0x1f3d: 0xf059, 0x1f3e: 0x935d, 0x1f3f: 0xf079,
- // Block 0x7d, offset 0x1f40
- 0x1f40: 0xf6b9, 0x1f41: 0xf6d9, 0x1f42: 0xf6f9, 0x1f43: 0xf719, 0x1f44: 0xf739, 0x1f45: 0x951d,
- 0x1f46: 0xf759, 0x1f47: 0xf779, 0x1f48: 0xf799, 0x1f49: 0xf7b9, 0x1f4a: 0xf7d9, 0x1f4b: 0x953d,
- 0x1f4c: 0x955d, 0x1f4d: 0xf7f9, 0x1f4e: 0xf819, 0x1f4f: 0xf839, 0x1f50: 0xf859, 0x1f51: 0xf879,
- 0x1f52: 0xf899, 0x1f53: 0x957d, 0x1f54: 0xf8b9, 0x1f55: 0xf8d9, 0x1f56: 0xf8f9, 0x1f57: 0xf919,
- 0x1f58: 0x959d, 0x1f59: 0x95bd, 0x1f5a: 0xf939, 0x1f5b: 0xf959, 0x1f5c: 0xf979, 0x1f5d: 0x95dd,
- 0x1f5e: 0xf999, 0x1f5f: 0xf9b9, 0x1f60: 0x6815, 0x1f61: 0x95fd, 0x1f62: 0xf9d9, 0x1f63: 0xf9f9,
- 0x1f64: 0xfa19, 0x1f65: 0x961d, 0x1f66: 0xfa39, 0x1f67: 0xfa59, 0x1f68: 0xfa79, 0x1f69: 0xfa99,
- 0x1f6a: 0xfab9, 0x1f6b: 0xfad9, 0x1f6c: 0xfaf9, 0x1f6d: 0x963d, 0x1f6e: 0xfb19, 0x1f6f: 0xfb39,
- 0x1f70: 0xfb59, 0x1f71: 0x965d, 0x1f72: 0xfb79, 0x1f73: 0xfb99, 0x1f74: 0xfbb9, 0x1f75: 0xfbd9,
- 0x1f76: 0x7b35, 0x1f77: 0x967d, 0x1f78: 0xfbf9, 0x1f79: 0xfc19, 0x1f7a: 0xfc39, 0x1f7b: 0x969d,
- 0x1f7c: 0xfc59, 0x1f7d: 0x96bd, 0x1f7e: 0xfc79, 0x1f7f: 0xfc79,
- // Block 0x7e, offset 0x1f80
- 0x1f80: 0xfc99, 0x1f81: 0x96dd, 0x1f82: 0xfcb9, 0x1f83: 0xfcd9, 0x1f84: 0xfcf9, 0x1f85: 0xfd19,
- 0x1f86: 0xfd39, 0x1f87: 0xfd59, 0x1f88: 0xfd79, 0x1f89: 0x96fd, 0x1f8a: 0xfd99, 0x1f8b: 0xfdb9,
- 0x1f8c: 0xfdd9, 0x1f8d: 0xfdf9, 0x1f8e: 0xfe19, 0x1f8f: 0xfe39, 0x1f90: 0x971d, 0x1f91: 0xfe59,
- 0x1f92: 0x973d, 0x1f93: 0x975d, 0x1f94: 0x977d, 0x1f95: 0xfe79, 0x1f96: 0xfe99, 0x1f97: 0xfeb9,
- 0x1f98: 0xfed9, 0x1f99: 0xfef9, 0x1f9a: 0xff19, 0x1f9b: 0xff39, 0x1f9c: 0xff59, 0x1f9d: 0x979d,
- 0x1f9e: 0x0040, 0x1f9f: 0x0040, 0x1fa0: 0x0040, 0x1fa1: 0x0040, 0x1fa2: 0x0040, 0x1fa3: 0x0040,
- 0x1fa4: 0x0040, 0x1fa5: 0x0040, 0x1fa6: 0x0040, 0x1fa7: 0x0040, 0x1fa8: 0x0040, 0x1fa9: 0x0040,
- 0x1faa: 0x0040, 0x1fab: 0x0040, 0x1fac: 0x0040, 0x1fad: 0x0040, 0x1fae: 0x0040, 0x1faf: 0x0040,
- 0x1fb0: 0x0040, 0x1fb1: 0x0040, 0x1fb2: 0x0040, 0x1fb3: 0x0040, 0x1fb4: 0x0040, 0x1fb5: 0x0040,
- 0x1fb6: 0x0040, 0x1fb7: 0x0040, 0x1fb8: 0x0040, 0x1fb9: 0x0040, 0x1fba: 0x0040, 0x1fbb: 0x0040,
- 0x1fbc: 0x0040, 0x1fbd: 0x0040, 0x1fbe: 0x0040, 0x1fbf: 0x0040,
-}
-
-// idnaIndex: 36 blocks, 2304 entries, 4608 bytes
-// Block 0 is the zero block.
-var idnaIndex = [2304]uint16{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x7d, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,
- 0xc8: 0x06, 0xc9: 0x7e, 0xca: 0x7f, 0xcb: 0x07, 0xcc: 0x80, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,
- 0xd0: 0x81, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x82, 0xd6: 0x83, 0xd7: 0x84,
- 0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x85, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x86, 0xde: 0x87, 0xdf: 0x88,
- 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,
- 0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,
- 0xf0: 0x1d, 0xf1: 0x1e, 0xf2: 0x1e, 0xf3: 0x20, 0xf4: 0x21,
- // Block 0x4, offset 0x100
- 0x120: 0x89, 0x121: 0x13, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16,
- 0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8d,
- 0x130: 0x8e, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x8f, 0x135: 0x21, 0x136: 0x90, 0x137: 0x91,
- 0x138: 0x92, 0x139: 0x93, 0x13a: 0x22, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x96,
- // Block 0x5, offset 0x140
- 0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e,
- 0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6,
- 0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f,
- 0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae,
- 0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6,
- 0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe,
- 0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc3,
- 0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc4, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c,
- // Block 0x6, offset 0x180
- 0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc5, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc6, 0x187: 0x9b,
- 0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0x9b,
- 0x190: 0xca, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b,
- 0x198: 0x9b, 0x199: 0x9b, 0x19a: 0x9b, 0x19b: 0x9b, 0x19c: 0x9b, 0x19d: 0x9b, 0x19e: 0x9b, 0x19f: 0x9b,
- 0x1a0: 0x9b, 0x1a1: 0x9b, 0x1a2: 0x9b, 0x1a3: 0x9b, 0x1a4: 0x9b, 0x1a5: 0x9b, 0x1a6: 0x9b, 0x1a7: 0x9b,
- 0x1a8: 0xcb, 0x1a9: 0xcc, 0x1aa: 0x9b, 0x1ab: 0xcd, 0x1ac: 0x9b, 0x1ad: 0xce, 0x1ae: 0xcf, 0x1af: 0xd0,
- 0x1b0: 0xd1, 0x1b1: 0x35, 0x1b2: 0x28, 0x1b3: 0x36, 0x1b4: 0xd2, 0x1b5: 0xd3, 0x1b6: 0xd4, 0x1b7: 0xd5,
- 0x1b8: 0xd6, 0x1b9: 0xd7, 0x1ba: 0xd8, 0x1bb: 0xd9, 0x1bc: 0xda, 0x1bd: 0xdb, 0x1be: 0xdc, 0x1bf: 0x37,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x38, 0x1c1: 0xdd, 0x1c2: 0xde, 0x1c3: 0xdf, 0x1c4: 0xe0, 0x1c5: 0x39, 0x1c6: 0x3a, 0x1c7: 0xe1,
- 0x1c8: 0xe2, 0x1c9: 0x3b, 0x1ca: 0x3c, 0x1cb: 0x3d, 0x1cc: 0x3e, 0x1cd: 0x3f, 0x1ce: 0x40, 0x1cf: 0x41,
- 0x1d0: 0x9f, 0x1d1: 0x9f, 0x1d2: 0x9f, 0x1d3: 0x9f, 0x1d4: 0x9f, 0x1d5: 0x9f, 0x1d6: 0x9f, 0x1d7: 0x9f,
- 0x1d8: 0x9f, 0x1d9: 0x9f, 0x1da: 0x9f, 0x1db: 0x9f, 0x1dc: 0x9f, 0x1dd: 0x9f, 0x1de: 0x9f, 0x1df: 0x9f,
- 0x1e0: 0x9f, 0x1e1: 0x9f, 0x1e2: 0x9f, 0x1e3: 0x9f, 0x1e4: 0x9f, 0x1e5: 0x9f, 0x1e6: 0x9f, 0x1e7: 0x9f,
- 0x1e8: 0x9f, 0x1e9: 0x9f, 0x1ea: 0x9f, 0x1eb: 0x9f, 0x1ec: 0x9f, 0x1ed: 0x9f, 0x1ee: 0x9f, 0x1ef: 0x9f,
- 0x1f0: 0x9f, 0x1f1: 0x9f, 0x1f2: 0x9f, 0x1f3: 0x9f, 0x1f4: 0x9f, 0x1f5: 0x9f, 0x1f6: 0x9f, 0x1f7: 0x9f,
- 0x1f8: 0x9f, 0x1f9: 0x9f, 0x1fa: 0x9f, 0x1fb: 0x9f, 0x1fc: 0x9f, 0x1fd: 0x9f, 0x1fe: 0x9f, 0x1ff: 0x9f,
- // Block 0x8, offset 0x200
- 0x200: 0x9f, 0x201: 0x9f, 0x202: 0x9f, 0x203: 0x9f, 0x204: 0x9f, 0x205: 0x9f, 0x206: 0x9f, 0x207: 0x9f,
- 0x208: 0x9f, 0x209: 0x9f, 0x20a: 0x9f, 0x20b: 0x9f, 0x20c: 0x9f, 0x20d: 0x9f, 0x20e: 0x9f, 0x20f: 0x9f,
- 0x210: 0x9f, 0x211: 0x9f, 0x212: 0x9f, 0x213: 0x9f, 0x214: 0x9f, 0x215: 0x9f, 0x216: 0x9f, 0x217: 0x9f,
- 0x218: 0x9f, 0x219: 0x9f, 0x21a: 0x9f, 0x21b: 0x9f, 0x21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f,
- 0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f,
- 0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f,
- 0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b,
- 0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f,
- // Block 0x9, offset 0x240
- 0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f,
- 0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f,
- 0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f,
- 0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f,
- 0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f,
- 0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f,
- 0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f,
- 0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f,
- // Block 0xa, offset 0x280
- 0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f,
- 0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f,
- 0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f,
- 0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f,
- 0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f, 0x2a4: 0x9f, 0x2a5: 0x9f, 0x2a6: 0x9f, 0x2a7: 0x9f,
- 0x2a8: 0x9f, 0x2a9: 0x9f, 0x2aa: 0x9f, 0x2ab: 0x9f, 0x2ac: 0x9f, 0x2ad: 0x9f, 0x2ae: 0x9f, 0x2af: 0x9f,
- 0x2b0: 0x9f, 0x2b1: 0x9f, 0x2b2: 0x9f, 0x2b3: 0x9f, 0x2b4: 0x9f, 0x2b5: 0x9f, 0x2b6: 0x9f, 0x2b7: 0x9f,
- 0x2b8: 0x9f, 0x2b9: 0x9f, 0x2ba: 0x9f, 0x2bb: 0x9f, 0x2bc: 0x9f, 0x2bd: 0x9f, 0x2be: 0x9f, 0x2bf: 0xe3,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x9f, 0x2c1: 0x9f, 0x2c2: 0x9f, 0x2c3: 0x9f, 0x2c4: 0x9f, 0x2c5: 0x9f, 0x2c6: 0x9f, 0x2c7: 0x9f,
- 0x2c8: 0x9f, 0x2c9: 0x9f, 0x2ca: 0x9f, 0x2cb: 0x9f, 0x2cc: 0x9f, 0x2cd: 0x9f, 0x2ce: 0x9f, 0x2cf: 0x9f,
- 0x2d0: 0x9f, 0x2d1: 0x9f, 0x2d2: 0xe4, 0x2d3: 0xe5, 0x2d4: 0x9f, 0x2d5: 0x9f, 0x2d6: 0x9f, 0x2d7: 0x9f,
- 0x2d8: 0xe6, 0x2d9: 0x42, 0x2da: 0x43, 0x2db: 0xe7, 0x2dc: 0x44, 0x2dd: 0x45, 0x2de: 0x46, 0x2df: 0xe8,
- 0x2e0: 0xe9, 0x2e1: 0xea, 0x2e2: 0xeb, 0x2e3: 0xec, 0x2e4: 0xed, 0x2e5: 0xee, 0x2e6: 0xef, 0x2e7: 0xf0,
- 0x2e8: 0xf1, 0x2e9: 0xf2, 0x2ea: 0xf3, 0x2eb: 0xf4, 0x2ec: 0xf5, 0x2ed: 0xf6, 0x2ee: 0xf7, 0x2ef: 0xf8,
- 0x2f0: 0x9f, 0x2f1: 0x9f, 0x2f2: 0x9f, 0x2f3: 0x9f, 0x2f4: 0x9f, 0x2f5: 0x9f, 0x2f6: 0x9f, 0x2f7: 0x9f,
- 0x2f8: 0x9f, 0x2f9: 0x9f, 0x2fa: 0x9f, 0x2fb: 0x9f, 0x2fc: 0x9f, 0x2fd: 0x9f, 0x2fe: 0x9f, 0x2ff: 0x9f,
- // Block 0xc, offset 0x300
- 0x300: 0x9f, 0x301: 0x9f, 0x302: 0x9f, 0x303: 0x9f, 0x304: 0x9f, 0x305: 0x9f, 0x306: 0x9f, 0x307: 0x9f,
- 0x308: 0x9f, 0x309: 0x9f, 0x30a: 0x9f, 0x30b: 0x9f, 0x30c: 0x9f, 0x30d: 0x9f, 0x30e: 0x9f, 0x30f: 0x9f,
- 0x310: 0x9f, 0x311: 0x9f, 0x312: 0x9f, 0x313: 0x9f, 0x314: 0x9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f,
- 0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xf9, 0x31f: 0xfa,
- // Block 0xd, offset 0x340
- 0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba,
- 0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba,
- 0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba,
- 0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba,
- 0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba,
- 0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba,
- 0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba,
- 0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba,
- // Block 0xe, offset 0x380
- 0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba,
- 0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba,
- 0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba,
- 0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba,
- 0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfb, 0x3a5: 0xfc, 0x3a6: 0xfd, 0x3a7: 0xfe,
- 0x3a8: 0x47, 0x3a9: 0xff, 0x3aa: 0x100, 0x3ab: 0x48, 0x3ac: 0x49, 0x3ad: 0x4a, 0x3ae: 0x4b, 0x3af: 0x4c,
- 0x3b0: 0x101, 0x3b1: 0x4d, 0x3b2: 0x4e, 0x3b3: 0x4f, 0x3b4: 0x50, 0x3b5: 0x51, 0x3b6: 0x102, 0x3b7: 0x52,
- 0x3b8: 0x53, 0x3b9: 0x54, 0x3ba: 0x55, 0x3bb: 0x56, 0x3bc: 0x57, 0x3bd: 0x58, 0x3be: 0x59, 0x3bf: 0x5a,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x103, 0x3c1: 0x104, 0x3c2: 0x9f, 0x3c3: 0x105, 0x3c4: 0x106, 0x3c5: 0x9b, 0x3c6: 0x107, 0x3c7: 0x108,
- 0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x109, 0x3cb: 0x10a, 0x3cc: 0x10b, 0x3cd: 0x10c, 0x3ce: 0x10d, 0x3cf: 0x10e,
- 0x3d0: 0x10f, 0x3d1: 0x9f, 0x3d2: 0x110, 0x3d3: 0x111, 0x3d4: 0x112, 0x3d5: 0x113, 0x3d6: 0xba, 0x3d7: 0xba,
- 0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x114, 0x3dd: 0x115, 0x3de: 0xba, 0x3df: 0xba,
- 0x3e0: 0x116, 0x3e1: 0x117, 0x3e2: 0x118, 0x3e3: 0x119, 0x3e4: 0x11a, 0x3e5: 0xba, 0x3e6: 0x11b, 0x3e7: 0x11c,
- 0x3e8: 0x11d, 0x3e9: 0x11e, 0x3ea: 0x11f, 0x3eb: 0x5b, 0x3ec: 0x120, 0x3ed: 0x121, 0x3ee: 0x5c, 0x3ef: 0xba,
- 0x3f0: 0x122, 0x3f1: 0x123, 0x3f2: 0x124, 0x3f3: 0x125, 0x3f4: 0xba, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba,
- 0x3f8: 0xba, 0x3f9: 0x126, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0xba, 0x3fd: 0xba, 0x3fe: 0xba, 0x3ff: 0xba,
- // Block 0x10, offset 0x400
- 0x400: 0x127, 0x401: 0x128, 0x402: 0x129, 0x403: 0x12a, 0x404: 0x12b, 0x405: 0x12c, 0x406: 0x12d, 0x407: 0x12e,
- 0x408: 0x12f, 0x409: 0xba, 0x40a: 0x130, 0x40b: 0x131, 0x40c: 0x5d, 0x40d: 0x5e, 0x40e: 0xba, 0x40f: 0xba,
- 0x410: 0x132, 0x411: 0x133, 0x412: 0x134, 0x413: 0x135, 0x414: 0xba, 0x415: 0xba, 0x416: 0x136, 0x417: 0x137,
- 0x418: 0x138, 0x419: 0x139, 0x41a: 0x13a, 0x41b: 0x13b, 0x41c: 0x13c, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba,
- 0x420: 0xba, 0x421: 0xba, 0x422: 0x13d, 0x423: 0x13e, 0x424: 0xba, 0x425: 0xba, 0x426: 0xba, 0x427: 0xba,
- 0x428: 0x13f, 0x429: 0x140, 0x42a: 0x141, 0x42b: 0x142, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba,
- 0x430: 0x143, 0x431: 0x144, 0x432: 0x145, 0x433: 0xba, 0x434: 0x146, 0x435: 0x147, 0x436: 0xba, 0x437: 0xba,
- 0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0xba, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0xba,
- // Block 0x11, offset 0x440
- 0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f,
- 0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x148, 0x44f: 0xba,
- 0x450: 0x9b, 0x451: 0x149, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x14a, 0x456: 0xba, 0x457: 0xba,
- 0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba,
- 0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba,
- 0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba,
- 0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba,
- 0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba,
- // Block 0x12, offset 0x480
- 0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f,
- 0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f,
- 0x490: 0x14b, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba,
- 0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba,
- 0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba,
- 0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba,
- 0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba,
- 0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0xba, 0x4c1: 0xba, 0x4c2: 0xba, 0x4c3: 0xba, 0x4c4: 0xba, 0x4c5: 0xba, 0x4c6: 0xba, 0x4c7: 0xba,
- 0x4c8: 0xba, 0x4c9: 0xba, 0x4ca: 0xba, 0x4cb: 0xba, 0x4cc: 0xba, 0x4cd: 0xba, 0x4ce: 0xba, 0x4cf: 0xba,
- 0x4d0: 0x9f, 0x4d1: 0x9f, 0x4d2: 0x9f, 0x4d3: 0x9f, 0x4d4: 0x9f, 0x4d5: 0x9f, 0x4d6: 0x9f, 0x4d7: 0x9f,
- 0x4d8: 0x9f, 0x4d9: 0x14c, 0x4da: 0xba, 0x4db: 0xba, 0x4dc: 0xba, 0x4dd: 0xba, 0x4de: 0xba, 0x4df: 0xba,
- 0x4e0: 0xba, 0x4e1: 0xba, 0x4e2: 0xba, 0x4e3: 0xba, 0x4e4: 0xba, 0x4e5: 0xba, 0x4e6: 0xba, 0x4e7: 0xba,
- 0x4e8: 0xba, 0x4e9: 0xba, 0x4ea: 0xba, 0x4eb: 0xba, 0x4ec: 0xba, 0x4ed: 0xba, 0x4ee: 0xba, 0x4ef: 0xba,
- 0x4f0: 0xba, 0x4f1: 0xba, 0x4f2: 0xba, 0x4f3: 0xba, 0x4f4: 0xba, 0x4f5: 0xba, 0x4f6: 0xba, 0x4f7: 0xba,
- 0x4f8: 0xba, 0x4f9: 0xba, 0x4fa: 0xba, 0x4fb: 0xba, 0x4fc: 0xba, 0x4fd: 0xba, 0x4fe: 0xba, 0x4ff: 0xba,
- // Block 0x14, offset 0x500
- 0x500: 0xba, 0x501: 0xba, 0x502: 0xba, 0x503: 0xba, 0x504: 0xba, 0x505: 0xba, 0x506: 0xba, 0x507: 0xba,
- 0x508: 0xba, 0x509: 0xba, 0x50a: 0xba, 0x50b: 0xba, 0x50c: 0xba, 0x50d: 0xba, 0x50e: 0xba, 0x50f: 0xba,
- 0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba,
- 0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba,
- 0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f,
- 0x528: 0x142, 0x529: 0x14d, 0x52a: 0xba, 0x52b: 0x14e, 0x52c: 0x14f, 0x52d: 0x150, 0x52e: 0x151, 0x52f: 0xba,
- 0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba,
- 0x538: 0xba, 0x539: 0xba, 0x53a: 0xba, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x152, 0x53e: 0x153, 0x53f: 0x154,
- // Block 0x15, offset 0x540
- 0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f,
- 0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f,
- 0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f,
- 0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x155,
- 0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f,
- 0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x156, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba,
- 0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba,
- 0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba,
- // Block 0x16, offset 0x580
- 0x580: 0x9f, 0x581: 0x9f, 0x582: 0x9f, 0x583: 0x9f, 0x584: 0x157, 0x585: 0x158, 0x586: 0x9f, 0x587: 0x9f,
- 0x588: 0x9f, 0x589: 0x9f, 0x58a: 0x9f, 0x58b: 0x159, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba,
- 0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba,
- 0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba,
- 0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba,
- 0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba,
- 0x5b0: 0x9f, 0x5b1: 0x15a, 0x5b2: 0x15b, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba,
- 0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba,
- // Block 0x17, offset 0x5c0
- 0x5c0: 0x9b, 0x5c1: 0x9b, 0x5c2: 0x9b, 0x5c3: 0x15c, 0x5c4: 0x15d, 0x5c5: 0x15e, 0x5c6: 0x15f, 0x5c7: 0x160,
- 0x5c8: 0x9b, 0x5c9: 0x161, 0x5ca: 0xba, 0x5cb: 0xba, 0x5cc: 0x9b, 0x5cd: 0x162, 0x5ce: 0xba, 0x5cf: 0xba,
- 0x5d0: 0x5f, 0x5d1: 0x60, 0x5d2: 0x61, 0x5d3: 0x62, 0x5d4: 0x63, 0x5d5: 0x64, 0x5d6: 0x65, 0x5d7: 0x66,
- 0x5d8: 0x67, 0x5d9: 0x68, 0x5da: 0x69, 0x5db: 0x6a, 0x5dc: 0x6b, 0x5dd: 0x6c, 0x5de: 0x6d, 0x5df: 0x6e,
- 0x5e0: 0x9b, 0x5e1: 0x9b, 0x5e2: 0x9b, 0x5e3: 0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b,
- 0x5e8: 0x163, 0x5e9: 0x164, 0x5ea: 0x165, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba,
- 0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba,
- 0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba,
- // Block 0x18, offset 0x600
- 0x600: 0x166, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0xba, 0x605: 0xba, 0x606: 0xba, 0x607: 0xba,
- 0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0xba, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba,
- 0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba,
- 0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba,
- 0x620: 0x122, 0x621: 0x122, 0x622: 0x122, 0x623: 0x167, 0x624: 0x6f, 0x625: 0x168, 0x626: 0xba, 0x627: 0xba,
- 0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba,
- 0x630: 0xba, 0x631: 0xba, 0x632: 0xba, 0x633: 0xba, 0x634: 0xba, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba,
- 0x638: 0x70, 0x639: 0x71, 0x63a: 0x72, 0x63b: 0x169, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba,
- // Block 0x19, offset 0x640
- 0x640: 0x16a, 0x641: 0x9b, 0x642: 0x16b, 0x643: 0x16c, 0x644: 0x73, 0x645: 0x74, 0x646: 0x16d, 0x647: 0x16e,
- 0x648: 0x75, 0x649: 0x16f, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b,
- 0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b,
- 0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x170, 0x65c: 0x9b, 0x65d: 0x171, 0x65e: 0x9b, 0x65f: 0x172,
- 0x660: 0x173, 0x661: 0x174, 0x662: 0x175, 0x663: 0xba, 0x664: 0x176, 0x665: 0x177, 0x666: 0x178, 0x667: 0x179,
- 0x668: 0xba, 0x669: 0xba, 0x66a: 0xba, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba,
- 0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba,
- 0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba,
- // Block 0x1a, offset 0x680
- 0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f,
- 0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f,
- 0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f,
- 0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x17a, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f,
- 0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f,
- 0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f,
- 0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 0x9f, 0x6b6: 0x9f, 0x6b7: 0x9f,
- 0x6b8: 0x9f, 0x6b9: 0x9f, 0x6ba: 0x9f, 0x6bb: 0x9f, 0x6bc: 0x9f, 0x6bd: 0x9f, 0x6be: 0x9f, 0x6bf: 0x9f,
- // Block 0x1b, offset 0x6c0
- 0x6c0: 0x9f, 0x6c1: 0x9f, 0x6c2: 0x9f, 0x6c3: 0x9f, 0x6c4: 0x9f, 0x6c5: 0x9f, 0x6c6: 0x9f, 0x6c7: 0x9f,
- 0x6c8: 0x9f, 0x6c9: 0x9f, 0x6ca: 0x9f, 0x6cb: 0x9f, 0x6cc: 0x9f, 0x6cd: 0x9f, 0x6ce: 0x9f, 0x6cf: 0x9f,
- 0x6d0: 0x9f, 0x6d1: 0x9f, 0x6d2: 0x9f, 0x6d3: 0x9f, 0x6d4: 0x9f, 0x6d5: 0x9f, 0x6d6: 0x9f, 0x6d7: 0x9f,
- 0x6d8: 0x9f, 0x6d9: 0x9f, 0x6da: 0x9f, 0x6db: 0x9f, 0x6dc: 0x17b, 0x6dd: 0x9f, 0x6de: 0x9f, 0x6df: 0x9f,
- 0x6e0: 0x17c, 0x6e1: 0x9f, 0x6e2: 0x9f, 0x6e3: 0x9f, 0x6e4: 0x9f, 0x6e5: 0x9f, 0x6e6: 0x9f, 0x6e7: 0x9f,
- 0x6e8: 0x9f, 0x6e9: 0x9f, 0x6ea: 0x9f, 0x6eb: 0x9f, 0x6ec: 0x9f, 0x6ed: 0x9f, 0x6ee: 0x9f, 0x6ef: 0x9f,
- 0x6f0: 0x9f, 0x6f1: 0x9f, 0x6f2: 0x9f, 0x6f3: 0x9f, 0x6f4: 0x9f, 0x6f5: 0x9f, 0x6f6: 0x9f, 0x6f7: 0x9f,
- 0x6f8: 0x9f, 0x6f9: 0x9f, 0x6fa: 0x9f, 0x6fb: 0x9f, 0x6fc: 0x9f, 0x6fd: 0x9f, 0x6fe: 0x9f, 0x6ff: 0x9f,
- // Block 0x1c, offset 0x700
- 0x700: 0x9f, 0x701: 0x9f, 0x702: 0x9f, 0x703: 0x9f, 0x704: 0x9f, 0x705: 0x9f, 0x706: 0x9f, 0x707: 0x9f,
- 0x708: 0x9f, 0x709: 0x9f, 0x70a: 0x9f, 0x70b: 0x9f, 0x70c: 0x9f, 0x70d: 0x9f, 0x70e: 0x9f, 0x70f: 0x9f,
- 0x710: 0x9f, 0x711: 0x9f, 0x712: 0x9f, 0x713: 0x9f, 0x714: 0x9f, 0x715: 0x9f, 0x716: 0x9f, 0x717: 0x9f,
- 0x718: 0x9f, 0x719: 0x9f, 0x71a: 0x9f, 0x71b: 0x9f, 0x71c: 0x9f, 0x71d: 0x9f, 0x71e: 0x9f, 0x71f: 0x9f,
- 0x720: 0x9f, 0x721: 0x9f, 0x722: 0x9f, 0x723: 0x9f, 0x724: 0x9f, 0x725: 0x9f, 0x726: 0x9f, 0x727: 0x9f,
- 0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f,
- 0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f,
- 0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x17d, 0x73b: 0x9f, 0x73c: 0x9f, 0x73d: 0x9f, 0x73e: 0x9f, 0x73f: 0x9f,
- // Block 0x1d, offset 0x740
- 0x740: 0x9f, 0x741: 0x9f, 0x742: 0x9f, 0x743: 0x9f, 0x744: 0x9f, 0x745: 0x9f, 0x746: 0x9f, 0x747: 0x9f,
- 0x748: 0x9f, 0x749: 0x9f, 0x74a: 0x9f, 0x74b: 0x9f, 0x74c: 0x9f, 0x74d: 0x9f, 0x74e: 0x9f, 0x74f: 0x9f,
- 0x750: 0x9f, 0x751: 0x9f, 0x752: 0x9f, 0x753: 0x9f, 0x754: 0x9f, 0x755: 0x9f, 0x756: 0x9f, 0x757: 0x9f,
- 0x758: 0x9f, 0x759: 0x9f, 0x75a: 0x9f, 0x75b: 0x9f, 0x75c: 0x9f, 0x75d: 0x9f, 0x75e: 0x9f, 0x75f: 0x9f,
- 0x760: 0x9f, 0x761: 0x9f, 0x762: 0x9f, 0x763: 0x9f, 0x764: 0x9f, 0x765: 0x9f, 0x766: 0x9f, 0x767: 0x9f,
- 0x768: 0x9f, 0x769: 0x9f, 0x76a: 0x9f, 0x76b: 0x9f, 0x76c: 0x9f, 0x76d: 0x9f, 0x76e: 0x9f, 0x76f: 0x17e,
- 0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba,
- 0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba,
- // Block 0x1e, offset 0x780
- 0x780: 0xba, 0x781: 0xba, 0x782: 0xba, 0x783: 0xba, 0x784: 0xba, 0x785: 0xba, 0x786: 0xba, 0x787: 0xba,
- 0x788: 0xba, 0x789: 0xba, 0x78a: 0xba, 0x78b: 0xba, 0x78c: 0xba, 0x78d: 0xba, 0x78e: 0xba, 0x78f: 0xba,
- 0x790: 0xba, 0x791: 0xba, 0x792: 0xba, 0x793: 0xba, 0x794: 0xba, 0x795: 0xba, 0x796: 0xba, 0x797: 0xba,
- 0x798: 0xba, 0x799: 0xba, 0x79a: 0xba, 0x79b: 0xba, 0x79c: 0xba, 0x79d: 0xba, 0x79e: 0xba, 0x79f: 0xba,
- 0x7a0: 0x76, 0x7a1: 0x77, 0x7a2: 0x78, 0x7a3: 0x17f, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x180, 0x7a7: 0x7b,
- 0x7a8: 0x7c, 0x7a9: 0xba, 0x7aa: 0xba, 0x7ab: 0xba, 0x7ac: 0xba, 0x7ad: 0xba, 0x7ae: 0xba, 0x7af: 0xba,
- 0x7b0: 0xba, 0x7b1: 0xba, 0x7b2: 0xba, 0x7b3: 0xba, 0x7b4: 0xba, 0x7b5: 0xba, 0x7b6: 0xba, 0x7b7: 0xba,
- 0x7b8: 0xba, 0x7b9: 0xba, 0x7ba: 0xba, 0x7bb: 0xba, 0x7bc: 0xba, 0x7bd: 0xba, 0x7be: 0xba, 0x7bf: 0xba,
- // Block 0x1f, offset 0x7c0
- 0x7d0: 0x0d, 0x7d1: 0x0e, 0x7d2: 0x0f, 0x7d3: 0x10, 0x7d4: 0x11, 0x7d5: 0x0b, 0x7d6: 0x12, 0x7d7: 0x07,
- 0x7d8: 0x13, 0x7d9: 0x0b, 0x7da: 0x0b, 0x7db: 0x14, 0x7dc: 0x0b, 0x7dd: 0x15, 0x7de: 0x16, 0x7df: 0x17,
- 0x7e0: 0x07, 0x7e1: 0x07, 0x7e2: 0x07, 0x7e3: 0x07, 0x7e4: 0x07, 0x7e5: 0x07, 0x7e6: 0x07, 0x7e7: 0x07,
- 0x7e8: 0x07, 0x7e9: 0x07, 0x7ea: 0x18, 0x7eb: 0x19, 0x7ec: 0x1a, 0x7ed: 0x07, 0x7ee: 0x1b, 0x7ef: 0x1c,
- 0x7f0: 0x0b, 0x7f1: 0x0b, 0x7f2: 0x0b, 0x7f3: 0x0b, 0x7f4: 0x0b, 0x7f5: 0x0b, 0x7f6: 0x0b, 0x7f7: 0x0b,
- 0x7f8: 0x0b, 0x7f9: 0x0b, 0x7fa: 0x0b, 0x7fb: 0x0b, 0x7fc: 0x0b, 0x7fd: 0x0b, 0x7fe: 0x0b, 0x7ff: 0x0b,
- // Block 0x20, offset 0x800
- 0x800: 0x0b, 0x801: 0x0b, 0x802: 0x0b, 0x803: 0x0b, 0x804: 0x0b, 0x805: 0x0b, 0x806: 0x0b, 0x807: 0x0b,
- 0x808: 0x0b, 0x809: 0x0b, 0x80a: 0x0b, 0x80b: 0x0b, 0x80c: 0x0b, 0x80d: 0x0b, 0x80e: 0x0b, 0x80f: 0x0b,
- 0x810: 0x0b, 0x811: 0x0b, 0x812: 0x0b, 0x813: 0x0b, 0x814: 0x0b, 0x815: 0x0b, 0x816: 0x0b, 0x817: 0x0b,
- 0x818: 0x0b, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x0b, 0x81c: 0x0b, 0x81d: 0x0b, 0x81e: 0x0b, 0x81f: 0x0b,
- 0x820: 0x0b, 0x821: 0x0b, 0x822: 0x0b, 0x823: 0x0b, 0x824: 0x0b, 0x825: 0x0b, 0x826: 0x0b, 0x827: 0x0b,
- 0x828: 0x0b, 0x829: 0x0b, 0x82a: 0x0b, 0x82b: 0x0b, 0x82c: 0x0b, 0x82d: 0x0b, 0x82e: 0x0b, 0x82f: 0x0b,
- 0x830: 0x0b, 0x831: 0x0b, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b,
- 0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b,
- // Block 0x21, offset 0x840
- 0x840: 0x181, 0x841: 0x182, 0x842: 0xba, 0x843: 0xba, 0x844: 0x183, 0x845: 0x183, 0x846: 0x183, 0x847: 0x184,
- 0x848: 0xba, 0x849: 0xba, 0x84a: 0xba, 0x84b: 0xba, 0x84c: 0xba, 0x84d: 0xba, 0x84e: 0xba, 0x84f: 0xba,
- 0x850: 0xba, 0x851: 0xba, 0x852: 0xba, 0x853: 0xba, 0x854: 0xba, 0x855: 0xba, 0x856: 0xba, 0x857: 0xba,
- 0x858: 0xba, 0x859: 0xba, 0x85a: 0xba, 0x85b: 0xba, 0x85c: 0xba, 0x85d: 0xba, 0x85e: 0xba, 0x85f: 0xba,
- 0x860: 0xba, 0x861: 0xba, 0x862: 0xba, 0x863: 0xba, 0x864: 0xba, 0x865: 0xba, 0x866: 0xba, 0x867: 0xba,
- 0x868: 0xba, 0x869: 0xba, 0x86a: 0xba, 0x86b: 0xba, 0x86c: 0xba, 0x86d: 0xba, 0x86e: 0xba, 0x86f: 0xba,
- 0x870: 0xba, 0x871: 0xba, 0x872: 0xba, 0x873: 0xba, 0x874: 0xba, 0x875: 0xba, 0x876: 0xba, 0x877: 0xba,
- 0x878: 0xba, 0x879: 0xba, 0x87a: 0xba, 0x87b: 0xba, 0x87c: 0xba, 0x87d: 0xba, 0x87e: 0xba, 0x87f: 0xba,
- // Block 0x22, offset 0x880
- 0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b,
- 0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b,
- 0x890: 0x0b, 0x891: 0x0b, 0x892: 0x0b, 0x893: 0x0b, 0x894: 0x0b, 0x895: 0x0b, 0x896: 0x0b, 0x897: 0x0b,
- 0x898: 0x0b, 0x899: 0x0b, 0x89a: 0x0b, 0x89b: 0x0b, 0x89c: 0x0b, 0x89d: 0x0b, 0x89e: 0x0b, 0x89f: 0x0b,
- 0x8a0: 0x1f, 0x8a1: 0x0b, 0x8a2: 0x0b, 0x8a3: 0x0b, 0x8a4: 0x0b, 0x8a5: 0x0b, 0x8a6: 0x0b, 0x8a7: 0x0b,
- 0x8a8: 0x0b, 0x8a9: 0x0b, 0x8aa: 0x0b, 0x8ab: 0x0b, 0x8ac: 0x0b, 0x8ad: 0x0b, 0x8ae: 0x0b, 0x8af: 0x0b,
- 0x8b0: 0x0b, 0x8b1: 0x0b, 0x8b2: 0x0b, 0x8b3: 0x0b, 0x8b4: 0x0b, 0x8b5: 0x0b, 0x8b6: 0x0b, 0x8b7: 0x0b,
- 0x8b8: 0x0b, 0x8b9: 0x0b, 0x8ba: 0x0b, 0x8bb: 0x0b, 0x8bc: 0x0b, 0x8bd: 0x0b, 0x8be: 0x0b, 0x8bf: 0x0b,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b,
- 0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b,
-}
-
-// idnaSparseOffset: 264 entries, 528 bytes
-var idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x34, 0x3f, 0x4b, 0x4f, 0x5e, 0x63, 0x6b, 0x77, 0x85, 0x8a, 0x93, 0xa3, 0xb1, 0xbd, 0xc9, 0xda, 0xe4, 0xeb, 0xf8, 0x109, 0x110, 0x11b, 0x12a, 0x138, 0x142, 0x144, 0x149, 0x14c, 0x14f, 0x151, 0x15d, 0x168, 0x170, 0x176, 0x17c, 0x181, 0x186, 0x189, 0x18d, 0x193, 0x198, 0x1a4, 0x1ae, 0x1b4, 0x1c5, 0x1cf, 0x1d2, 0x1da, 0x1dd, 0x1ea, 0x1f2, 0x1f6, 0x1fd, 0x205, 0x215, 0x221, 0x223, 0x22d, 0x239, 0x245, 0x251, 0x259, 0x25e, 0x268, 0x279, 0x27d, 0x288, 0x28c, 0x295, 0x29d, 0x2a3, 0x2a8, 0x2ab, 0x2af, 0x2b5, 0x2b9, 0x2bd, 0x2c3, 0x2ca, 0x2d0, 0x2d8, 0x2df, 0x2ea, 0x2f4, 0x2f8, 0x2fb, 0x301, 0x305, 0x307, 0x30a, 0x30c, 0x30f, 0x319, 0x31c, 0x32b, 0x32f, 0x334, 0x337, 0x33b, 0x340, 0x345, 0x34b, 0x351, 0x360, 0x366, 0x36a, 0x379, 0x37e, 0x386, 0x390, 0x39b, 0x3a3, 0x3b4, 0x3bd, 0x3cd, 0x3da, 0x3e4, 0x3e9, 0x3f6, 0x3fa, 0x3ff, 0x401, 0x405, 0x407, 0x40b, 0x414, 0x41a, 0x41e, 0x42e, 0x438, 0x43d, 0x440, 0x446, 0x44d, 0x452, 0x456, 0x45c, 0x461, 0x46a, 0x46f, 0x475, 0x47c, 0x483, 0x48a, 0x48e, 0x493, 0x496, 0x49b, 0x4a7, 0x4ad, 0x4b2, 0x4b9, 0x4c1, 0x4c6, 0x4ca, 0x4da, 0x4e1, 0x4e5, 0x4e9, 0x4f0, 0x4f2, 0x4f5, 0x4f8, 0x4fc, 0x500, 0x506, 0x50f, 0x51b, 0x522, 0x52b, 0x533, 0x53a, 0x548, 0x555, 0x562, 0x56b, 0x56f, 0x57d, 0x585, 0x590, 0x599, 0x59f, 0x5a7, 0x5b0, 0x5ba, 0x5bd, 0x5c9, 0x5cc, 0x5d1, 0x5de, 0x5e7, 0x5f3, 0x5f6, 0x600, 0x609, 0x615, 0x622, 0x62a, 0x62d, 0x632, 0x635, 0x638, 0x63b, 0x642, 0x649, 0x64d, 0x658, 0x65b, 0x661, 0x666, 0x66a, 0x66d, 0x670, 0x673, 0x676, 0x679, 0x67e, 0x688, 0x68b, 0x68f, 0x69e, 0x6aa, 0x6ae, 0x6b3, 0x6b8, 0x6bc, 0x6c1, 0x6ca, 0x6d5, 0x6db, 0x6e3, 0x6e7, 0x6eb, 0x6f1, 0x6f7, 0x6fc, 0x6ff, 0x70f, 0x716, 0x719, 0x71c, 0x720, 0x726, 0x72b, 0x730, 0x735, 0x738, 0x73d, 0x740, 0x743, 0x747, 0x74b, 0x74e, 0x75e, 0x76f, 0x774, 0x776, 0x778}
-
-// idnaSparseValues: 1915 entries, 7660 bytes
-var idnaSparseValues = [1915]valueRange{
- // Block 0x0, offset 0x0
- {value: 0x0000, lo: 0x07},
- {value: 0xe105, lo: 0x80, hi: 0x96},
- {value: 0x0018, lo: 0x97, hi: 0x97},
- {value: 0xe105, lo: 0x98, hi: 0x9e},
- {value: 0x001f, lo: 0x9f, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xb7},
- {value: 0x0008, lo: 0xb8, hi: 0xbf},
- // Block 0x1, offset 0x8
- {value: 0x0000, lo: 0x10},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0xe01d, lo: 0x81, hi: 0x81},
- {value: 0x0008, lo: 0x82, hi: 0x82},
- {value: 0x0335, lo: 0x83, hi: 0x83},
- {value: 0x034d, lo: 0x84, hi: 0x84},
- {value: 0x0365, lo: 0x85, hi: 0x85},
- {value: 0xe00d, lo: 0x86, hi: 0x86},
- {value: 0x0008, lo: 0x87, hi: 0x87},
- {value: 0xe00d, lo: 0x88, hi: 0x88},
- {value: 0x0008, lo: 0x89, hi: 0x89},
- {value: 0xe00d, lo: 0x8a, hi: 0x8a},
- {value: 0x0008, lo: 0x8b, hi: 0x8b},
- {value: 0xe00d, lo: 0x8c, hi: 0x8c},
- {value: 0x0008, lo: 0x8d, hi: 0x8d},
- {value: 0xe00d, lo: 0x8e, hi: 0x8e},
- {value: 0x0008, lo: 0x8f, hi: 0xbf},
- // Block 0x2, offset 0x19
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0xaf},
- {value: 0x0249, lo: 0xb0, hi: 0xb0},
- {value: 0x037d, lo: 0xb1, hi: 0xb1},
- {value: 0x0259, lo: 0xb2, hi: 0xb2},
- {value: 0x0269, lo: 0xb3, hi: 0xb3},
- {value: 0x034d, lo: 0xb4, hi: 0xb4},
- {value: 0x0395, lo: 0xb5, hi: 0xb5},
- {value: 0xe1bd, lo: 0xb6, hi: 0xb6},
- {value: 0x0279, lo: 0xb7, hi: 0xb7},
- {value: 0x0289, lo: 0xb8, hi: 0xb8},
- {value: 0x0008, lo: 0xb9, hi: 0xbf},
- // Block 0x3, offset 0x25
- {value: 0x0000, lo: 0x01},
- {value: 0x3308, lo: 0x80, hi: 0xbf},
- // Block 0x4, offset 0x27
- {value: 0x0000, lo: 0x04},
- {value: 0x03f5, lo: 0x80, hi: 0x8f},
- {value: 0xe105, lo: 0x90, hi: 0x9f},
- {value: 0x049d, lo: 0xa0, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x5, offset 0x2c
- {value: 0x0000, lo: 0x07},
- {value: 0xe185, lo: 0x80, hi: 0x8f},
- {value: 0x0545, lo: 0x90, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x98},
- {value: 0x0008, lo: 0x99, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xa0},
- {value: 0x0008, lo: 0xa1, hi: 0xbf},
- // Block 0x6, offset 0x34
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0401, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x88},
- {value: 0x0018, lo: 0x89, hi: 0x8a},
- {value: 0x0040, lo: 0x8b, hi: 0x8c},
- {value: 0x0018, lo: 0x8d, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0x90},
- {value: 0x3308, lo: 0x91, hi: 0xbd},
- {value: 0x0818, lo: 0xbe, hi: 0xbe},
- {value: 0x3308, lo: 0xbf, hi: 0xbf},
- // Block 0x7, offset 0x3f
- {value: 0x0000, lo: 0x0b},
- {value: 0x0818, lo: 0x80, hi: 0x80},
- {value: 0x3308, lo: 0x81, hi: 0x82},
- {value: 0x0818, lo: 0x83, hi: 0x83},
- {value: 0x3308, lo: 0x84, hi: 0x85},
- {value: 0x0818, lo: 0x86, hi: 0x86},
- {value: 0x3308, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0808, lo: 0x90, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xaf},
- {value: 0x0808, lo: 0xb0, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0x8, offset 0x4b
- {value: 0x0000, lo: 0x03},
- {value: 0x0a08, lo: 0x80, hi: 0x87},
- {value: 0x0c08, lo: 0x88, hi: 0x99},
- {value: 0x0a08, lo: 0x9a, hi: 0xbf},
- // Block 0x9, offset 0x4f
- {value: 0x0000, lo: 0x0e},
- {value: 0x3308, lo: 0x80, hi: 0x8a},
- {value: 0x0040, lo: 0x8b, hi: 0x8c},
- {value: 0x0c08, lo: 0x8d, hi: 0x8d},
- {value: 0x0a08, lo: 0x8e, hi: 0x98},
- {value: 0x0c08, lo: 0x99, hi: 0x9b},
- {value: 0x0a08, lo: 0x9c, hi: 0xaa},
- {value: 0x0c08, lo: 0xab, hi: 0xac},
- {value: 0x0a08, lo: 0xad, hi: 0xb0},
- {value: 0x0c08, lo: 0xb1, hi: 0xb1},
- {value: 0x0a08, lo: 0xb2, hi: 0xb2},
- {value: 0x0c08, lo: 0xb3, hi: 0xb4},
- {value: 0x0a08, lo: 0xb5, hi: 0xb7},
- {value: 0x0c08, lo: 0xb8, hi: 0xb9},
- {value: 0x0a08, lo: 0xba, hi: 0xbf},
- // Block 0xa, offset 0x5e
- {value: 0x0000, lo: 0x04},
- {value: 0x0808, lo: 0x80, hi: 0xa5},
- {value: 0x3308, lo: 0xa6, hi: 0xb0},
- {value: 0x0808, lo: 0xb1, hi: 0xb1},
- {value: 0x0040, lo: 0xb2, hi: 0xbf},
- // Block 0xb, offset 0x63
- {value: 0x0000, lo: 0x07},
- {value: 0x0808, lo: 0x80, hi: 0x89},
- {value: 0x0a08, lo: 0x8a, hi: 0xaa},
- {value: 0x3308, lo: 0xab, hi: 0xb3},
- {value: 0x0808, lo: 0xb4, hi: 0xb5},
- {value: 0x0018, lo: 0xb6, hi: 0xb9},
- {value: 0x0818, lo: 0xba, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbf},
- // Block 0xc, offset 0x6b
- {value: 0x0000, lo: 0x0b},
- {value: 0x0808, lo: 0x80, hi: 0x95},
- {value: 0x3308, lo: 0x96, hi: 0x99},
- {value: 0x0808, lo: 0x9a, hi: 0x9a},
- {value: 0x3308, lo: 0x9b, hi: 0xa3},
- {value: 0x0808, lo: 0xa4, hi: 0xa4},
- {value: 0x3308, lo: 0xa5, hi: 0xa7},
- {value: 0x0808, lo: 0xa8, hi: 0xa8},
- {value: 0x3308, lo: 0xa9, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x0818, lo: 0xb0, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0xd, offset 0x77
- {value: 0x0000, lo: 0x0d},
- {value: 0x0040, lo: 0x80, hi: 0x9f},
- {value: 0x0a08, lo: 0xa0, hi: 0xa9},
- {value: 0x0c08, lo: 0xaa, hi: 0xac},
- {value: 0x0808, lo: 0xad, hi: 0xad},
- {value: 0x0c08, lo: 0xae, hi: 0xae},
- {value: 0x0a08, lo: 0xaf, hi: 0xb0},
- {value: 0x0c08, lo: 0xb1, hi: 0xb2},
- {value: 0x0a08, lo: 0xb3, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xb5},
- {value: 0x0a08, lo: 0xb6, hi: 0xb8},
- {value: 0x0c08, lo: 0xb9, hi: 0xb9},
- {value: 0x0a08, lo: 0xba, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbf},
- // Block 0xe, offset 0x85
- {value: 0x0000, lo: 0x04},
- {value: 0x0040, lo: 0x80, hi: 0x93},
- {value: 0x3308, lo: 0x94, hi: 0xa1},
- {value: 0x0840, lo: 0xa2, hi: 0xa2},
- {value: 0x3308, lo: 0xa3, hi: 0xbf},
- // Block 0xf, offset 0x8a
- {value: 0x0000, lo: 0x08},
- {value: 0x3308, lo: 0x80, hi: 0x82},
- {value: 0x3008, lo: 0x83, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0xb9},
- {value: 0x3308, lo: 0xba, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbf},
- // Block 0x10, offset 0x93
- {value: 0x0000, lo: 0x0f},
- {value: 0x3308, lo: 0x80, hi: 0x80},
- {value: 0x3008, lo: 0x81, hi: 0x82},
- {value: 0x0040, lo: 0x83, hi: 0x85},
- {value: 0x3008, lo: 0x86, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x3008, lo: 0x8a, hi: 0x8c},
- {value: 0x3b08, lo: 0x8d, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x96},
- {value: 0x3008, lo: 0x97, hi: 0x97},
- {value: 0x0040, lo: 0x98, hi: 0xa5},
- {value: 0x0008, lo: 0xa6, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbf},
- // Block 0x11, offset 0xa3
- {value: 0x0000, lo: 0x0d},
- {value: 0x3308, lo: 0x80, hi: 0x80},
- {value: 0x3008, lo: 0x81, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8d},
- {value: 0x0008, lo: 0x8e, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x91},
- {value: 0x0008, lo: 0x92, hi: 0xa8},
- {value: 0x0040, lo: 0xa9, hi: 0xa9},
- {value: 0x0008, lo: 0xaa, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbd},
- {value: 0x3308, lo: 0xbe, hi: 0xbf},
- // Block 0x12, offset 0xb1
- {value: 0x0000, lo: 0x0b},
- {value: 0x3308, lo: 0x80, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8d},
- {value: 0x0008, lo: 0x8e, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x91},
- {value: 0x0008, lo: 0x92, hi: 0xba},
- {value: 0x3b08, lo: 0xbb, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbf},
- // Block 0x13, offset 0xbd
- {value: 0x0000, lo: 0x0b},
- {value: 0x0040, lo: 0x80, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x99},
- {value: 0x0008, lo: 0x9a, hi: 0xb1},
- {value: 0x0040, lo: 0xb2, hi: 0xb2},
- {value: 0x0008, lo: 0xb3, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbf},
- // Block 0x14, offset 0xc9
- {value: 0x0000, lo: 0x10},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x89},
- {value: 0x3b08, lo: 0x8a, hi: 0x8a},
- {value: 0x0040, lo: 0x8b, hi: 0x8e},
- {value: 0x3008, lo: 0x8f, hi: 0x91},
- {value: 0x3308, lo: 0x92, hi: 0x94},
- {value: 0x0040, lo: 0x95, hi: 0x95},
- {value: 0x3308, lo: 0x96, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x97},
- {value: 0x3008, lo: 0x98, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xa5},
- {value: 0x0008, lo: 0xa6, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xb1},
- {value: 0x3008, lo: 0xb2, hi: 0xb3},
- {value: 0x0018, lo: 0xb4, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0x15, offset 0xda
- {value: 0x0000, lo: 0x09},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0xb0},
- {value: 0x3308, lo: 0xb1, hi: 0xb1},
- {value: 0x0008, lo: 0xb2, hi: 0xb2},
- {value: 0x08f1, lo: 0xb3, hi: 0xb3},
- {value: 0x3308, lo: 0xb4, hi: 0xb9},
- {value: 0x3b08, lo: 0xba, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbe},
- {value: 0x0018, lo: 0xbf, hi: 0xbf},
- // Block 0x16, offset 0xe4
- {value: 0x0000, lo: 0x06},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x3308, lo: 0x87, hi: 0x8e},
- {value: 0x0018, lo: 0x8f, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0x9b},
- {value: 0x0040, lo: 0x9c, hi: 0xbf},
- // Block 0x17, offset 0xeb
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x84},
- {value: 0x0040, lo: 0x85, hi: 0x85},
- {value: 0x0008, lo: 0x86, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x87},
- {value: 0x3308, lo: 0x88, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9b},
- {value: 0x0961, lo: 0x9c, hi: 0x9c},
- {value: 0x0999, lo: 0x9d, hi: 0x9d},
- {value: 0x0008, lo: 0x9e, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xbf},
- // Block 0x18, offset 0xf8
- {value: 0x0000, lo: 0x10},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x8a},
- {value: 0x0008, lo: 0x8b, hi: 0x8b},
- {value: 0xe03d, lo: 0x8c, hi: 0x8c},
- {value: 0x0018, lo: 0x8d, hi: 0x97},
- {value: 0x3308, lo: 0x98, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa9},
- {value: 0x0018, lo: 0xaa, hi: 0xb4},
- {value: 0x3308, lo: 0xb5, hi: 0xb5},
- {value: 0x0018, lo: 0xb6, hi: 0xb6},
- {value: 0x3308, lo: 0xb7, hi: 0xb7},
- {value: 0x0018, lo: 0xb8, hi: 0xb8},
- {value: 0x3308, lo: 0xb9, hi: 0xb9},
- {value: 0x0018, lo: 0xba, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbf},
- // Block 0x19, offset 0x109
- {value: 0x0000, lo: 0x06},
- {value: 0x0018, lo: 0x80, hi: 0x85},
- {value: 0x3308, lo: 0x86, hi: 0x86},
- {value: 0x0018, lo: 0x87, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8d},
- {value: 0x0018, lo: 0x8e, hi: 0x9a},
- {value: 0x0040, lo: 0x9b, hi: 0xbf},
- // Block 0x1a, offset 0x110
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0xaa},
- {value: 0x3008, lo: 0xab, hi: 0xac},
- {value: 0x3308, lo: 0xad, hi: 0xb0},
- {value: 0x3008, lo: 0xb1, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb7},
- {value: 0x3008, lo: 0xb8, hi: 0xb8},
- {value: 0x3b08, lo: 0xb9, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbc},
- {value: 0x3308, lo: 0xbd, hi: 0xbe},
- {value: 0x0008, lo: 0xbf, hi: 0xbf},
- // Block 0x1b, offset 0x11b
- {value: 0x0000, lo: 0x0e},
- {value: 0x0008, lo: 0x80, hi: 0x89},
- {value: 0x0018, lo: 0x8a, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x95},
- {value: 0x3008, lo: 0x96, hi: 0x97},
- {value: 0x3308, lo: 0x98, hi: 0x99},
- {value: 0x0008, lo: 0x9a, hi: 0x9d},
- {value: 0x3308, lo: 0x9e, hi: 0xa0},
- {value: 0x0008, lo: 0xa1, hi: 0xa1},
- {value: 0x3008, lo: 0xa2, hi: 0xa4},
- {value: 0x0008, lo: 0xa5, hi: 0xa6},
- {value: 0x3008, lo: 0xa7, hi: 0xad},
- {value: 0x0008, lo: 0xae, hi: 0xb0},
- {value: 0x3308, lo: 0xb1, hi: 0xb4},
- {value: 0x0008, lo: 0xb5, hi: 0xbf},
- // Block 0x1c, offset 0x12a
- {value: 0x0000, lo: 0x0d},
- {value: 0x0008, lo: 0x80, hi: 0x81},
- {value: 0x3308, lo: 0x82, hi: 0x82},
- {value: 0x3008, lo: 0x83, hi: 0x84},
- {value: 0x3308, lo: 0x85, hi: 0x86},
- {value: 0x3008, lo: 0x87, hi: 0x8c},
- {value: 0x3308, lo: 0x8d, hi: 0x8d},
- {value: 0x0008, lo: 0x8e, hi: 0x8e},
- {value: 0x3008, lo: 0x8f, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x3008, lo: 0x9a, hi: 0x9c},
- {value: 0x3308, lo: 0x9d, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xbf},
- // Block 0x1d, offset 0x138
- {value: 0x0000, lo: 0x09},
- {value: 0x0040, lo: 0x80, hi: 0x86},
- {value: 0x055d, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8c},
- {value: 0x055d, lo: 0x8d, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xba},
- {value: 0x0018, lo: 0xbb, hi: 0xbb},
- {value: 0xe105, lo: 0xbc, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbf},
- // Block 0x1e, offset 0x142
- {value: 0x0000, lo: 0x01},
- {value: 0x0018, lo: 0x80, hi: 0xbf},
- // Block 0x1f, offset 0x144
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0xa0},
- {value: 0x2018, lo: 0xa1, hi: 0xb5},
- {value: 0x0018, lo: 0xb6, hi: 0xbf},
- // Block 0x20, offset 0x149
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0xa7},
- {value: 0x2018, lo: 0xa8, hi: 0xbf},
- // Block 0x21, offset 0x14c
- {value: 0x0000, lo: 0x02},
- {value: 0x2018, lo: 0x80, hi: 0x82},
- {value: 0x0018, lo: 0x83, hi: 0xbf},
- // Block 0x22, offset 0x14f
- {value: 0x0000, lo: 0x01},
- {value: 0x0008, lo: 0x80, hi: 0xbf},
- // Block 0x23, offset 0x151
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0008, lo: 0x8a, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0x98},
- {value: 0x0040, lo: 0x99, hi: 0x99},
- {value: 0x0008, lo: 0x9a, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x24, offset 0x15d
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0008, lo: 0x8a, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xb0},
- {value: 0x0040, lo: 0xb1, hi: 0xb1},
- {value: 0x0008, lo: 0xb2, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xb7},
- {value: 0x0008, lo: 0xb8, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0x25, offset 0x168
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x0040, lo: 0x81, hi: 0x81},
- {value: 0x0008, lo: 0x82, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x87},
- {value: 0x0008, lo: 0x88, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0xbf},
- // Block 0x26, offset 0x170
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x91},
- {value: 0x0008, lo: 0x92, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0xbf},
- // Block 0x27, offset 0x176
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0x9a},
- {value: 0x0040, lo: 0x9b, hi: 0x9c},
- {value: 0x3308, lo: 0x9d, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbf},
- // Block 0x28, offset 0x17c
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x29, offset 0x181
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xb7},
- {value: 0xe045, lo: 0xb8, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbf},
- // Block 0x2a, offset 0x186
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0xbf},
- // Block 0x2b, offset 0x189
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xac},
- {value: 0x0018, lo: 0xad, hi: 0xae},
- {value: 0x0008, lo: 0xaf, hi: 0xbf},
- // Block 0x2c, offset 0x18d
- {value: 0x0000, lo: 0x05},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0x9c},
- {value: 0x0040, lo: 0x9d, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x2d, offset 0x193
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xaa},
- {value: 0x0018, lo: 0xab, hi: 0xb0},
- {value: 0x0008, lo: 0xb1, hi: 0xb8},
- {value: 0x0040, lo: 0xb9, hi: 0xbf},
- // Block 0x2e, offset 0x198
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8d},
- {value: 0x0008, lo: 0x8e, hi: 0x91},
- {value: 0x3308, lo: 0x92, hi: 0x93},
- {value: 0x3b08, lo: 0x94, hi: 0x94},
- {value: 0x0040, lo: 0x95, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb3},
- {value: 0x3b08, lo: 0xb4, hi: 0xb4},
- {value: 0x0018, lo: 0xb5, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0x2f, offset 0x1a4
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x91},
- {value: 0x3308, lo: 0x92, hi: 0x93},
- {value: 0x0040, lo: 0x94, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xad},
- {value: 0x0008, lo: 0xae, hi: 0xb0},
- {value: 0x0040, lo: 0xb1, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xbf},
- // Block 0x30, offset 0x1ae
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0xb3},
- {value: 0x3340, lo: 0xb4, hi: 0xb5},
- {value: 0x3008, lo: 0xb6, hi: 0xb6},
- {value: 0x3308, lo: 0xb7, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbf},
- // Block 0x31, offset 0x1b4
- {value: 0x0000, lo: 0x10},
- {value: 0x3008, lo: 0x80, hi: 0x85},
- {value: 0x3308, lo: 0x86, hi: 0x86},
- {value: 0x3008, lo: 0x87, hi: 0x88},
- {value: 0x3308, lo: 0x89, hi: 0x91},
- {value: 0x3b08, lo: 0x92, hi: 0x92},
- {value: 0x3308, lo: 0x93, hi: 0x93},
- {value: 0x0018, lo: 0x94, hi: 0x96},
- {value: 0x0008, lo: 0x97, hi: 0x97},
- {value: 0x0018, lo: 0x98, hi: 0x9b},
- {value: 0x0008, lo: 0x9c, hi: 0x9c},
- {value: 0x3308, lo: 0x9d, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa9},
- {value: 0x0040, lo: 0xaa, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0x32, offset 0x1c5
- {value: 0x0000, lo: 0x09},
- {value: 0x0018, lo: 0x80, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x86},
- {value: 0x0218, lo: 0x87, hi: 0x87},
- {value: 0x0018, lo: 0x88, hi: 0x8a},
- {value: 0x33c0, lo: 0x8b, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x0208, lo: 0xa0, hi: 0xbf},
- // Block 0x33, offset 0x1cf
- {value: 0x0000, lo: 0x02},
- {value: 0x0208, lo: 0x80, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbf},
- // Block 0x34, offset 0x1d2
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0x84},
- {value: 0x3308, lo: 0x85, hi: 0x86},
- {value: 0x0208, lo: 0x87, hi: 0xa8},
- {value: 0x3308, lo: 0xa9, hi: 0xa9},
- {value: 0x0208, lo: 0xaa, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x35, offset 0x1da
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xbf},
- // Block 0x36, offset 0x1dd
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0x9f},
- {value: 0x3308, lo: 0xa0, hi: 0xa2},
- {value: 0x3008, lo: 0xa3, hi: 0xa6},
- {value: 0x3308, lo: 0xa7, hi: 0xa8},
- {value: 0x3008, lo: 0xa9, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xaf},
- {value: 0x3008, lo: 0xb0, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb2},
- {value: 0x3008, lo: 0xb3, hi: 0xb8},
- {value: 0x3308, lo: 0xb9, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbf},
- // Block 0x37, offset 0x1ea
- {value: 0x0000, lo: 0x07},
- {value: 0x0018, lo: 0x80, hi: 0x80},
- {value: 0x0040, lo: 0x81, hi: 0x83},
- {value: 0x0018, lo: 0x84, hi: 0x85},
- {value: 0x0008, lo: 0x86, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0x38, offset 0x1f2
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x39, offset 0x1f6
- {value: 0x0000, lo: 0x06},
- {value: 0x0008, lo: 0x80, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0028, lo: 0x9a, hi: 0x9a},
- {value: 0x0040, lo: 0x9b, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0xbf},
- // Block 0x3a, offset 0x1fd
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0x96},
- {value: 0x3308, lo: 0x97, hi: 0x98},
- {value: 0x3008, lo: 0x99, hi: 0x9a},
- {value: 0x3308, lo: 0x9b, hi: 0x9b},
- {value: 0x0040, lo: 0x9c, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x3b, offset 0x205
- {value: 0x0000, lo: 0x0f},
- {value: 0x0008, lo: 0x80, hi: 0x94},
- {value: 0x3008, lo: 0x95, hi: 0x95},
- {value: 0x3308, lo: 0x96, hi: 0x96},
- {value: 0x3008, lo: 0x97, hi: 0x97},
- {value: 0x3308, lo: 0x98, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0x9f},
- {value: 0x3b08, lo: 0xa0, hi: 0xa0},
- {value: 0x3008, lo: 0xa1, hi: 0xa1},
- {value: 0x3308, lo: 0xa2, hi: 0xa2},
- {value: 0x3008, lo: 0xa3, hi: 0xa4},
- {value: 0x3308, lo: 0xa5, hi: 0xac},
- {value: 0x3008, lo: 0xad, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbe},
- {value: 0x3308, lo: 0xbf, hi: 0xbf},
- // Block 0x3c, offset 0x215
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xa6},
- {value: 0x0008, lo: 0xa7, hi: 0xa7},
- {value: 0x0018, lo: 0xa8, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xbd},
- {value: 0x3318, lo: 0xbe, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0x3d, offset 0x221
- {value: 0x0000, lo: 0x01},
- {value: 0x0040, lo: 0x80, hi: 0xbf},
- // Block 0x3e, offset 0x223
- {value: 0x0000, lo: 0x09},
- {value: 0x3308, lo: 0x80, hi: 0x83},
- {value: 0x3008, lo: 0x84, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0xb3},
- {value: 0x3308, lo: 0xb4, hi: 0xb4},
- {value: 0x3008, lo: 0xb5, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbc},
- {value: 0x3008, lo: 0xbd, hi: 0xbf},
- // Block 0x3f, offset 0x22d
- {value: 0x0000, lo: 0x0b},
- {value: 0x3008, lo: 0x80, hi: 0x81},
- {value: 0x3308, lo: 0x82, hi: 0x82},
- {value: 0x3008, lo: 0x83, hi: 0x83},
- {value: 0x3808, lo: 0x84, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0xaa},
- {value: 0x3308, lo: 0xab, hi: 0xb3},
- {value: 0x0018, lo: 0xb4, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbf},
- // Block 0x40, offset 0x239
- {value: 0x0000, lo: 0x0b},
- {value: 0x3308, lo: 0x80, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0xa0},
- {value: 0x3008, lo: 0xa1, hi: 0xa1},
- {value: 0x3308, lo: 0xa2, hi: 0xa5},
- {value: 0x3008, lo: 0xa6, hi: 0xa7},
- {value: 0x3308, lo: 0xa8, hi: 0xa9},
- {value: 0x3808, lo: 0xaa, hi: 0xaa},
- {value: 0x3b08, lo: 0xab, hi: 0xab},
- {value: 0x3308, lo: 0xac, hi: 0xad},
- {value: 0x0008, lo: 0xae, hi: 0xbf},
- // Block 0x41, offset 0x245
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0xa5},
- {value: 0x3308, lo: 0xa6, hi: 0xa6},
- {value: 0x3008, lo: 0xa7, hi: 0xa7},
- {value: 0x3308, lo: 0xa8, hi: 0xa9},
- {value: 0x3008, lo: 0xaa, hi: 0xac},
- {value: 0x3308, lo: 0xad, hi: 0xad},
- {value: 0x3008, lo: 0xae, hi: 0xae},
- {value: 0x3308, lo: 0xaf, hi: 0xb1},
- {value: 0x3808, lo: 0xb2, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xbb},
- {value: 0x0018, lo: 0xbc, hi: 0xbf},
- // Block 0x42, offset 0x251
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0xa3},
- {value: 0x3008, lo: 0xa4, hi: 0xab},
- {value: 0x3308, lo: 0xac, hi: 0xb3},
- {value: 0x3008, lo: 0xb4, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xba},
- {value: 0x0018, lo: 0xbb, hi: 0xbf},
- // Block 0x43, offset 0x259
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0x8c},
- {value: 0x0008, lo: 0x8d, hi: 0xbd},
- {value: 0x0018, lo: 0xbe, hi: 0xbf},
- // Block 0x44, offset 0x25e
- {value: 0x0000, lo: 0x09},
- {value: 0x0e29, lo: 0x80, hi: 0x80},
- {value: 0x0e41, lo: 0x81, hi: 0x81},
- {value: 0x0e59, lo: 0x82, hi: 0x82},
- {value: 0x0e71, lo: 0x83, hi: 0x83},
- {value: 0x0e89, lo: 0x84, hi: 0x85},
- {value: 0x0ea1, lo: 0x86, hi: 0x86},
- {value: 0x0eb9, lo: 0x87, hi: 0x87},
- {value: 0x057d, lo: 0x88, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0xbf},
- // Block 0x45, offset 0x268
- {value: 0x0000, lo: 0x10},
- {value: 0x0018, lo: 0x80, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x3308, lo: 0x90, hi: 0x92},
- {value: 0x0018, lo: 0x93, hi: 0x93},
- {value: 0x3308, lo: 0x94, hi: 0xa0},
- {value: 0x3008, lo: 0xa1, hi: 0xa1},
- {value: 0x3308, lo: 0xa2, hi: 0xa8},
- {value: 0x0008, lo: 0xa9, hi: 0xac},
- {value: 0x3308, lo: 0xad, hi: 0xad},
- {value: 0x0008, lo: 0xae, hi: 0xb1},
- {value: 0x3008, lo: 0xb2, hi: 0xb3},
- {value: 0x3308, lo: 0xb4, hi: 0xb4},
- {value: 0x0008, lo: 0xb5, hi: 0xb6},
- {value: 0x3008, lo: 0xb7, hi: 0xb7},
- {value: 0x3308, lo: 0xb8, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0x46, offset 0x279
- {value: 0x0000, lo: 0x03},
- {value: 0x3308, lo: 0x80, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xba},
- {value: 0x3308, lo: 0xbb, hi: 0xbf},
- // Block 0x47, offset 0x27d
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0x87},
- {value: 0xe045, lo: 0x88, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x97},
- {value: 0xe045, lo: 0x98, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa7},
- {value: 0xe045, lo: 0xa8, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb7},
- {value: 0xe045, lo: 0xb8, hi: 0xbf},
- // Block 0x48, offset 0x288
- {value: 0x0000, lo: 0x03},
- {value: 0x0040, lo: 0x80, hi: 0x8f},
- {value: 0x3318, lo: 0x90, hi: 0xb0},
- {value: 0x0040, lo: 0xb1, hi: 0xbf},
- // Block 0x49, offset 0x28c
- {value: 0x0000, lo: 0x08},
- {value: 0x0018, lo: 0x80, hi: 0x82},
- {value: 0x0040, lo: 0x83, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0x84},
- {value: 0x0018, lo: 0x85, hi: 0x88},
- {value: 0x24c1, lo: 0x89, hi: 0x89},
- {value: 0x0018, lo: 0x8a, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xbf},
- // Block 0x4a, offset 0x295
- {value: 0x0000, lo: 0x07},
- {value: 0x0018, lo: 0x80, hi: 0xab},
- {value: 0x24f1, lo: 0xac, hi: 0xac},
- {value: 0x2529, lo: 0xad, hi: 0xad},
- {value: 0x0018, lo: 0xae, hi: 0xae},
- {value: 0x2579, lo: 0xaf, hi: 0xaf},
- {value: 0x25b1, lo: 0xb0, hi: 0xb0},
- {value: 0x0018, lo: 0xb1, hi: 0xbf},
- // Block 0x4b, offset 0x29d
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x9f},
- {value: 0x0080, lo: 0xa0, hi: 0xa0},
- {value: 0x0018, lo: 0xa1, hi: 0xad},
- {value: 0x0080, lo: 0xae, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xbf},
- // Block 0x4c, offset 0x2a3
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0xa8},
- {value: 0x09c5, lo: 0xa9, hi: 0xa9},
- {value: 0x09e5, lo: 0xaa, hi: 0xaa},
- {value: 0x0018, lo: 0xab, hi: 0xbf},
- // Block 0x4d, offset 0x2a8
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xbf},
- // Block 0x4e, offset 0x2ab
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0x8b},
- {value: 0x28c1, lo: 0x8c, hi: 0x8c},
- {value: 0x0018, lo: 0x8d, hi: 0xbf},
- // Block 0x4f, offset 0x2af
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0xb3},
- {value: 0x0e66, lo: 0xb4, hi: 0xb4},
- {value: 0x292a, lo: 0xb5, hi: 0xb5},
- {value: 0x0e86, lo: 0xb6, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xbf},
- // Block 0x50, offset 0x2b5
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0x9b},
- {value: 0x2941, lo: 0x9c, hi: 0x9c},
- {value: 0x0018, lo: 0x9d, hi: 0xbf},
- // Block 0x51, offset 0x2b9
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xb5},
- {value: 0x0018, lo: 0xb6, hi: 0xbf},
- // Block 0x52, offset 0x2bd
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x97},
- {value: 0x0018, lo: 0x98, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbc},
- {value: 0x0018, lo: 0xbd, hi: 0xbf},
- // Block 0x53, offset 0x2c3
- {value: 0x0000, lo: 0x06},
- {value: 0x0018, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0018, lo: 0x8a, hi: 0x92},
- {value: 0x0040, lo: 0x93, hi: 0xab},
- {value: 0x0018, lo: 0xac, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
- // Block 0x54, offset 0x2ca
- {value: 0x0000, lo: 0x05},
- {value: 0xe185, lo: 0x80, hi: 0x8f},
- {value: 0x03f5, lo: 0x90, hi: 0x9f},
- {value: 0x0ea5, lo: 0xa0, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x55, offset 0x2d0
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0xa5},
- {value: 0x0040, lo: 0xa6, hi: 0xa6},
- {value: 0x0008, lo: 0xa7, hi: 0xa7},
- {value: 0x0040, lo: 0xa8, hi: 0xac},
- {value: 0x0008, lo: 0xad, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x56, offset 0x2d8
- {value: 0x0000, lo: 0x06},
- {value: 0x0008, lo: 0x80, hi: 0xa7},
- {value: 0x0040, lo: 0xa8, hi: 0xae},
- {value: 0xe075, lo: 0xaf, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb0},
- {value: 0x0040, lo: 0xb1, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0x57, offset 0x2df
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xa7},
- {value: 0x0008, lo: 0xa8, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xb7},
- {value: 0x0008, lo: 0xb8, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0x58, offset 0x2ea
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x87},
- {value: 0x0008, lo: 0x88, hi: 0x8e},
- {value: 0x0040, lo: 0x8f, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0x9f},
- {value: 0x3308, lo: 0xa0, hi: 0xbf},
- // Block 0x59, offset 0x2f4
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xae},
- {value: 0x0008, lo: 0xaf, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xbf},
- // Block 0x5a, offset 0x2f8
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0xbf},
- // Block 0x5b, offset 0x2fb
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0x9e},
- {value: 0x0edd, lo: 0x9f, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xbf},
- // Block 0x5c, offset 0x301
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xb2},
- {value: 0x0efd, lo: 0xb3, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xbf},
- // Block 0x5d, offset 0x305
- {value: 0x0020, lo: 0x01},
- {value: 0x0f1d, lo: 0x80, hi: 0xbf},
- // Block 0x5e, offset 0x307
- {value: 0x0020, lo: 0x02},
- {value: 0x171d, lo: 0x80, hi: 0x8f},
- {value: 0x18fd, lo: 0x90, hi: 0xbf},
- // Block 0x5f, offset 0x30a
- {value: 0x0020, lo: 0x01},
- {value: 0x1efd, lo: 0x80, hi: 0xbf},
- // Block 0x60, offset 0x30c
- {value: 0x0000, lo: 0x02},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0xbf},
- // Block 0x61, offset 0x30f
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x98},
- {value: 0x3308, lo: 0x99, hi: 0x9a},
- {value: 0x29e2, lo: 0x9b, hi: 0x9b},
- {value: 0x2a0a, lo: 0x9c, hi: 0x9c},
- {value: 0x0008, lo: 0x9d, hi: 0x9e},
- {value: 0x2a31, lo: 0x9f, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xa0},
- {value: 0x0008, lo: 0xa1, hi: 0xbf},
- // Block 0x62, offset 0x319
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xbe},
- {value: 0x2a69, lo: 0xbf, hi: 0xbf},
- // Block 0x63, offset 0x31c
- {value: 0x0000, lo: 0x0e},
- {value: 0x0040, lo: 0x80, hi: 0x84},
- {value: 0x0008, lo: 0x85, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xb0},
- {value: 0x2a1d, lo: 0xb1, hi: 0xb1},
- {value: 0x2a3d, lo: 0xb2, hi: 0xb2},
- {value: 0x2a5d, lo: 0xb3, hi: 0xb3},
- {value: 0x2a7d, lo: 0xb4, hi: 0xb4},
- {value: 0x2a5d, lo: 0xb5, hi: 0xb5},
- {value: 0x2a9d, lo: 0xb6, hi: 0xb6},
- {value: 0x2abd, lo: 0xb7, hi: 0xb7},
- {value: 0x2add, lo: 0xb8, hi: 0xb9},
- {value: 0x2afd, lo: 0xba, hi: 0xbb},
- {value: 0x2b1d, lo: 0xbc, hi: 0xbd},
- {value: 0x2afd, lo: 0xbe, hi: 0xbf},
- // Block 0x64, offset 0x32b
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xa3},
- {value: 0x0040, lo: 0xa4, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x65, offset 0x32f
- {value: 0x0030, lo: 0x04},
- {value: 0x2aa2, lo: 0x80, hi: 0x9d},
- {value: 0x305a, lo: 0x9e, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0x9f},
- {value: 0x30a2, lo: 0xa0, hi: 0xbf},
- // Block 0x66, offset 0x334
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xbf},
- // Block 0x67, offset 0x337
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xbf},
- // Block 0x68, offset 0x33b
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xbd},
- {value: 0x0018, lo: 0xbe, hi: 0xbf},
- // Block 0x69, offset 0x340
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x8c},
- {value: 0x0018, lo: 0x8d, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xbf},
- // Block 0x6a, offset 0x345
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0xa5},
- {value: 0x0018, lo: 0xa6, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb1},
- {value: 0x0018, lo: 0xb2, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbf},
- // Block 0x6b, offset 0x34b
- {value: 0x0000, lo: 0x05},
- {value: 0x0040, lo: 0x80, hi: 0xb6},
- {value: 0x0008, lo: 0xb7, hi: 0xb7},
- {value: 0x2009, lo: 0xb8, hi: 0xb8},
- {value: 0x6e89, lo: 0xb9, hi: 0xb9},
- {value: 0x0008, lo: 0xba, hi: 0xbf},
- // Block 0x6c, offset 0x351
- {value: 0x0000, lo: 0x0e},
- {value: 0x0008, lo: 0x80, hi: 0x81},
- {value: 0x3308, lo: 0x82, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0x85},
- {value: 0x3b08, lo: 0x86, hi: 0x86},
- {value: 0x0008, lo: 0x87, hi: 0x8a},
- {value: 0x3308, lo: 0x8b, hi: 0x8b},
- {value: 0x0008, lo: 0x8c, hi: 0xa2},
- {value: 0x3008, lo: 0xa3, hi: 0xa4},
- {value: 0x3308, lo: 0xa5, hi: 0xa6},
- {value: 0x3008, lo: 0xa7, hi: 0xa7},
- {value: 0x0018, lo: 0xa8, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0x6d, offset 0x360
- {value: 0x0000, lo: 0x05},
- {value: 0x0208, lo: 0x80, hi: 0xb1},
- {value: 0x0108, lo: 0xb2, hi: 0xb2},
- {value: 0x0008, lo: 0xb3, hi: 0xb3},
- {value: 0x0018, lo: 0xb4, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbf},
- // Block 0x6e, offset 0x366
- {value: 0x0000, lo: 0x03},
- {value: 0x3008, lo: 0x80, hi: 0x81},
- {value: 0x0008, lo: 0x82, hi: 0xb3},
- {value: 0x3008, lo: 0xb4, hi: 0xbf},
- // Block 0x6f, offset 0x36a
- {value: 0x0000, lo: 0x0e},
- {value: 0x3008, lo: 0x80, hi: 0x83},
- {value: 0x3b08, lo: 0x84, hi: 0x84},
- {value: 0x3308, lo: 0x85, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x8d},
- {value: 0x0018, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x3308, lo: 0xa0, hi: 0xb1},
- {value: 0x0008, lo: 0xb2, hi: 0xb7},
- {value: 0x0018, lo: 0xb8, hi: 0xba},
- {value: 0x0008, lo: 0xbb, hi: 0xbb},
- {value: 0x0018, lo: 0xbc, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbf},
- // Block 0x70, offset 0x379
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xa5},
- {value: 0x3308, lo: 0xa6, hi: 0xad},
- {value: 0x0018, lo: 0xae, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x71, offset 0x37e
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x3308, lo: 0x87, hi: 0x91},
- {value: 0x3008, lo: 0x92, hi: 0x92},
- {value: 0x3808, lo: 0x93, hi: 0x93},
- {value: 0x0040, lo: 0x94, hi: 0x9e},
- {value: 0x0018, lo: 0x9f, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbf},
- // Block 0x72, offset 0x386
- {value: 0x0000, lo: 0x09},
- {value: 0x3308, lo: 0x80, hi: 0x82},
- {value: 0x3008, lo: 0x83, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xb3},
- {value: 0x3008, lo: 0xb4, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xb9},
- {value: 0x3008, lo: 0xba, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbc},
- {value: 0x3008, lo: 0xbd, hi: 0xbf},
- // Block 0x73, offset 0x390
- {value: 0x0000, lo: 0x0a},
- {value: 0x3808, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8e},
- {value: 0x0008, lo: 0x8f, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa4},
- {value: 0x3308, lo: 0xa5, hi: 0xa5},
- {value: 0x0008, lo: 0xa6, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0x74, offset 0x39b
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0xa8},
- {value: 0x3308, lo: 0xa9, hi: 0xae},
- {value: 0x3008, lo: 0xaf, hi: 0xb0},
- {value: 0x3308, lo: 0xb1, hi: 0xb2},
- {value: 0x3008, lo: 0xb3, hi: 0xb4},
- {value: 0x3308, lo: 0xb5, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0x75, offset 0x3a3
- {value: 0x0000, lo: 0x10},
- {value: 0x0008, lo: 0x80, hi: 0x82},
- {value: 0x3308, lo: 0x83, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0x8b},
- {value: 0x3308, lo: 0x8c, hi: 0x8c},
- {value: 0x3008, lo: 0x8d, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9b},
- {value: 0x0018, lo: 0x9c, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xb9},
- {value: 0x0008, lo: 0xba, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbc},
- {value: 0x3008, lo: 0xbd, hi: 0xbd},
- {value: 0x0008, lo: 0xbe, hi: 0xbf},
- // Block 0x76, offset 0x3b4
- {value: 0x0000, lo: 0x08},
- {value: 0x0008, lo: 0x80, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb0},
- {value: 0x0008, lo: 0xb1, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb4},
- {value: 0x0008, lo: 0xb5, hi: 0xb6},
- {value: 0x3308, lo: 0xb7, hi: 0xb8},
- {value: 0x0008, lo: 0xb9, hi: 0xbd},
- {value: 0x3308, lo: 0xbe, hi: 0xbf},
- // Block 0x77, offset 0x3bd
- {value: 0x0000, lo: 0x0f},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x3308, lo: 0x81, hi: 0x81},
- {value: 0x0008, lo: 0x82, hi: 0x82},
- {value: 0x0040, lo: 0x83, hi: 0x9a},
- {value: 0x0008, lo: 0x9b, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xaa},
- {value: 0x3008, lo: 0xab, hi: 0xab},
- {value: 0x3308, lo: 0xac, hi: 0xad},
- {value: 0x3008, lo: 0xae, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb1},
- {value: 0x0008, lo: 0xb2, hi: 0xb4},
- {value: 0x3008, lo: 0xb5, hi: 0xb5},
- {value: 0x3b08, lo: 0xb6, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0x78, offset 0x3cd
- {value: 0x0000, lo: 0x0c},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x88},
- {value: 0x0008, lo: 0x89, hi: 0x8e},
- {value: 0x0040, lo: 0x8f, hi: 0x90},
- {value: 0x0008, lo: 0x91, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xa7},
- {value: 0x0008, lo: 0xa8, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x79, offset 0x3da
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0x9b},
- {value: 0x4465, lo: 0x9c, hi: 0x9c},
- {value: 0x447d, lo: 0x9d, hi: 0x9d},
- {value: 0x2971, lo: 0x9e, hi: 0x9e},
- {value: 0xe06d, lo: 0x9f, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa5},
- {value: 0x0040, lo: 0xa6, hi: 0xaf},
- {value: 0x4495, lo: 0xb0, hi: 0xbf},
- // Block 0x7a, offset 0x3e4
- {value: 0x0000, lo: 0x04},
- {value: 0x44b5, lo: 0x80, hi: 0x8f},
- {value: 0x44d5, lo: 0x90, hi: 0x9f},
- {value: 0x44f5, lo: 0xa0, hi: 0xaf},
- {value: 0x44d5, lo: 0xb0, hi: 0xbf},
- // Block 0x7b, offset 0x3e9
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0xa2},
- {value: 0x3008, lo: 0xa3, hi: 0xa4},
- {value: 0x3308, lo: 0xa5, hi: 0xa5},
- {value: 0x3008, lo: 0xa6, hi: 0xa7},
- {value: 0x3308, lo: 0xa8, hi: 0xa8},
- {value: 0x3008, lo: 0xa9, hi: 0xaa},
- {value: 0x0018, lo: 0xab, hi: 0xab},
- {value: 0x3008, lo: 0xac, hi: 0xac},
- {value: 0x3b08, lo: 0xad, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0x7c, offset 0x3f6
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xa3},
- {value: 0x0040, lo: 0xa4, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xbf},
- // Block 0x7d, offset 0x3fa
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x8a},
- {value: 0x0018, lo: 0x8b, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbf},
- // Block 0x7e, offset 0x3ff
- {value: 0x0020, lo: 0x01},
- {value: 0x4515, lo: 0x80, hi: 0xbf},
- // Block 0x7f, offset 0x401
- {value: 0x0020, lo: 0x03},
- {value: 0x4d15, lo: 0x80, hi: 0x94},
- {value: 0x4ad5, lo: 0x95, hi: 0x95},
- {value: 0x4fb5, lo: 0x96, hi: 0xbf},
- // Block 0x80, offset 0x405
- {value: 0x0020, lo: 0x01},
- {value: 0x54f5, lo: 0x80, hi: 0xbf},
- // Block 0x81, offset 0x407
- {value: 0x0020, lo: 0x03},
- {value: 0x5cf5, lo: 0x80, hi: 0x84},
- {value: 0x5655, lo: 0x85, hi: 0x85},
- {value: 0x5d95, lo: 0x86, hi: 0xbf},
- // Block 0x82, offset 0x40b
- {value: 0x0020, lo: 0x08},
- {value: 0x6b55, lo: 0x80, hi: 0x8f},
- {value: 0x6d15, lo: 0x90, hi: 0x90},
- {value: 0x6d55, lo: 0x91, hi: 0xab},
- {value: 0x6ea1, lo: 0xac, hi: 0xac},
- {value: 0x70b5, lo: 0xad, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xaf},
- {value: 0x70d5, lo: 0xb0, hi: 0xbf},
- // Block 0x83, offset 0x414
- {value: 0x0020, lo: 0x05},
- {value: 0x72d5, lo: 0x80, hi: 0xad},
- {value: 0x6535, lo: 0xae, hi: 0xae},
- {value: 0x7895, lo: 0xaf, hi: 0xb5},
- {value: 0x6f55, lo: 0xb6, hi: 0xb6},
- {value: 0x7975, lo: 0xb7, hi: 0xbf},
- // Block 0x84, offset 0x41a
- {value: 0x0028, lo: 0x03},
- {value: 0x7c21, lo: 0x80, hi: 0x82},
- {value: 0x7be1, lo: 0x83, hi: 0x83},
- {value: 0x7c99, lo: 0x84, hi: 0xbf},
- // Block 0x85, offset 0x41e
- {value: 0x0038, lo: 0x0f},
- {value: 0x9db1, lo: 0x80, hi: 0x83},
- {value: 0x9e59, lo: 0x84, hi: 0x85},
- {value: 0x9e91, lo: 0x86, hi: 0x87},
- {value: 0x9ec9, lo: 0x88, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x91},
- {value: 0xa089, lo: 0x92, hi: 0x97},
- {value: 0xa1a1, lo: 0x98, hi: 0x9c},
- {value: 0xa281, lo: 0x9d, hi: 0xb3},
- {value: 0x9d41, lo: 0xb4, hi: 0xb4},
- {value: 0x9db1, lo: 0xb5, hi: 0xb5},
- {value: 0xa789, lo: 0xb6, hi: 0xbb},
- {value: 0xa869, lo: 0xbc, hi: 0xbc},
- {value: 0xa7f9, lo: 0xbd, hi: 0xbd},
- {value: 0xa8d9, lo: 0xbe, hi: 0xbf},
- // Block 0x86, offset 0x42e
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x8c},
- {value: 0x0008, lo: 0x8d, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xa7},
- {value: 0x0008, lo: 0xa8, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbb},
- {value: 0x0008, lo: 0xbc, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbe},
- {value: 0x0008, lo: 0xbf, hi: 0xbf},
- // Block 0x87, offset 0x438
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0xbf},
- // Block 0x88, offset 0x43d
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbf},
- // Block 0x89, offset 0x440
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x82},
- {value: 0x0040, lo: 0x83, hi: 0x86},
- {value: 0x0018, lo: 0x87, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xbf},
- // Block 0x8a, offset 0x446
- {value: 0x0000, lo: 0x06},
- {value: 0x0018, lo: 0x80, hi: 0x8e},
- {value: 0x0040, lo: 0x8f, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0x9b},
- {value: 0x0040, lo: 0x9c, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xa0},
- {value: 0x0040, lo: 0xa1, hi: 0xbf},
- // Block 0x8b, offset 0x44d
- {value: 0x0000, lo: 0x04},
- {value: 0x0040, lo: 0x80, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xbc},
- {value: 0x3308, lo: 0xbd, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbf},
- // Block 0x8c, offset 0x452
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0x9c},
- {value: 0x0040, lo: 0x9d, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x8d, offset 0x456
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0x90},
- {value: 0x0040, lo: 0x91, hi: 0x9f},
- {value: 0x3308, lo: 0xa0, hi: 0xa0},
- {value: 0x0018, lo: 0xa1, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbf},
- // Block 0x8e, offset 0x45c
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xa3},
- {value: 0x0040, lo: 0xa4, hi: 0xac},
- {value: 0x0008, lo: 0xad, hi: 0xbf},
- // Block 0x8f, offset 0x461
- {value: 0x0000, lo: 0x08},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x81},
- {value: 0x0008, lo: 0x82, hi: 0x89},
- {value: 0x0018, lo: 0x8a, hi: 0x8a},
- {value: 0x0040, lo: 0x8b, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbf},
- // Block 0x90, offset 0x46a
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9e},
- {value: 0x0018, lo: 0x9f, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x91, offset 0x46f
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x87},
- {value: 0x0008, lo: 0x88, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0xbf},
- // Block 0x92, offset 0x475
- {value: 0x0000, lo: 0x06},
- {value: 0xe145, lo: 0x80, hi: 0x87},
- {value: 0xe1c5, lo: 0x88, hi: 0x8f},
- {value: 0xe145, lo: 0x90, hi: 0x97},
- {value: 0x8ad5, lo: 0x98, hi: 0x9f},
- {value: 0x8aed, lo: 0xa0, hi: 0xa7},
- {value: 0x0008, lo: 0xa8, hi: 0xbf},
- // Block 0x93, offset 0x47c
- {value: 0x0000, lo: 0x06},
- {value: 0x0008, lo: 0x80, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa9},
- {value: 0x0040, lo: 0xaa, hi: 0xaf},
- {value: 0x8aed, lo: 0xb0, hi: 0xb7},
- {value: 0x8ad5, lo: 0xb8, hi: 0xbf},
- // Block 0x94, offset 0x483
- {value: 0x0000, lo: 0x06},
- {value: 0xe145, lo: 0x80, hi: 0x87},
- {value: 0xe1c5, lo: 0x88, hi: 0x8f},
- {value: 0xe145, lo: 0x90, hi: 0x93},
- {value: 0x0040, lo: 0x94, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbf},
- // Block 0x95, offset 0x48a
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xa7},
- {value: 0x0040, lo: 0xa8, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x96, offset 0x48e
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xa3},
- {value: 0x0040, lo: 0xa4, hi: 0xae},
- {value: 0x0018, lo: 0xaf, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
- // Block 0x97, offset 0x493
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0x98, offset 0x496
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa7},
- {value: 0x0040, lo: 0xa8, hi: 0xbf},
- // Block 0x99, offset 0x49b
- {value: 0x0000, lo: 0x0b},
- {value: 0x0808, lo: 0x80, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x87},
- {value: 0x0808, lo: 0x88, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0808, lo: 0x8a, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xb6},
- {value: 0x0808, lo: 0xb7, hi: 0xb8},
- {value: 0x0040, lo: 0xb9, hi: 0xbb},
- {value: 0x0808, lo: 0xbc, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbe},
- {value: 0x0808, lo: 0xbf, hi: 0xbf},
- // Block 0x9a, offset 0x4a7
- {value: 0x0000, lo: 0x05},
- {value: 0x0808, lo: 0x80, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x96},
- {value: 0x0818, lo: 0x97, hi: 0x9f},
- {value: 0x0808, lo: 0xa0, hi: 0xb6},
- {value: 0x0818, lo: 0xb7, hi: 0xbf},
- // Block 0x9b, offset 0x4ad
- {value: 0x0000, lo: 0x04},
- {value: 0x0808, lo: 0x80, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0xa6},
- {value: 0x0818, lo: 0xa7, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
- // Block 0x9c, offset 0x4b2
- {value: 0x0000, lo: 0x06},
- {value: 0x0040, lo: 0x80, hi: 0x9f},
- {value: 0x0808, lo: 0xa0, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xb3},
- {value: 0x0808, lo: 0xb4, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xba},
- {value: 0x0818, lo: 0xbb, hi: 0xbf},
- // Block 0x9d, offset 0x4b9
- {value: 0x0000, lo: 0x07},
- {value: 0x0808, lo: 0x80, hi: 0x95},
- {value: 0x0818, lo: 0x96, hi: 0x9b},
- {value: 0x0040, lo: 0x9c, hi: 0x9e},
- {value: 0x0018, lo: 0x9f, hi: 0x9f},
- {value: 0x0808, lo: 0xa0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbe},
- {value: 0x0818, lo: 0xbf, hi: 0xbf},
- // Block 0x9e, offset 0x4c1
- {value: 0x0000, lo: 0x04},
- {value: 0x0808, lo: 0x80, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbb},
- {value: 0x0818, lo: 0xbc, hi: 0xbd},
- {value: 0x0808, lo: 0xbe, hi: 0xbf},
- // Block 0x9f, offset 0x4c6
- {value: 0x0000, lo: 0x03},
- {value: 0x0818, lo: 0x80, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0x91},
- {value: 0x0818, lo: 0x92, hi: 0xbf},
- // Block 0xa0, offset 0x4ca
- {value: 0x0000, lo: 0x0f},
- {value: 0x0808, lo: 0x80, hi: 0x80},
- {value: 0x3308, lo: 0x81, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x84},
- {value: 0x3308, lo: 0x85, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x8b},
- {value: 0x3308, lo: 0x8c, hi: 0x8f},
- {value: 0x0808, lo: 0x90, hi: 0x93},
- {value: 0x0040, lo: 0x94, hi: 0x94},
- {value: 0x0808, lo: 0x95, hi: 0x97},
- {value: 0x0040, lo: 0x98, hi: 0x98},
- {value: 0x0808, lo: 0x99, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xb7},
- {value: 0x3308, lo: 0xb8, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0xa1, offset 0x4da
- {value: 0x0000, lo: 0x06},
- {value: 0x0818, lo: 0x80, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0818, lo: 0x90, hi: 0x98},
- {value: 0x0040, lo: 0x99, hi: 0x9f},
- {value: 0x0808, lo: 0xa0, hi: 0xbc},
- {value: 0x0818, lo: 0xbd, hi: 0xbf},
- // Block 0xa2, offset 0x4e1
- {value: 0x0000, lo: 0x03},
- {value: 0x0808, lo: 0x80, hi: 0x9c},
- {value: 0x0818, lo: 0x9d, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xbf},
- // Block 0xa3, offset 0x4e5
- {value: 0x0000, lo: 0x03},
- {value: 0x0808, lo: 0x80, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xb8},
- {value: 0x0018, lo: 0xb9, hi: 0xbf},
- // Block 0xa4, offset 0x4e9
- {value: 0x0000, lo: 0x06},
- {value: 0x0808, lo: 0x80, hi: 0x95},
- {value: 0x0040, lo: 0x96, hi: 0x97},
- {value: 0x0818, lo: 0x98, hi: 0x9f},
- {value: 0x0808, lo: 0xa0, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xb7},
- {value: 0x0818, lo: 0xb8, hi: 0xbf},
- // Block 0xa5, offset 0x4f0
- {value: 0x0000, lo: 0x01},
- {value: 0x0808, lo: 0x80, hi: 0xbf},
- // Block 0xa6, offset 0x4f2
- {value: 0x0000, lo: 0x02},
- {value: 0x0808, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0xbf},
- // Block 0xa7, offset 0x4f5
- {value: 0x0000, lo: 0x02},
- {value: 0x03dd, lo: 0x80, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xbf},
- // Block 0xa8, offset 0x4f8
- {value: 0x0000, lo: 0x03},
- {value: 0x0808, lo: 0x80, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xb9},
- {value: 0x0818, lo: 0xba, hi: 0xbf},
- // Block 0xa9, offset 0x4fc
- {value: 0x0000, lo: 0x03},
- {value: 0x0040, lo: 0x80, hi: 0x9f},
- {value: 0x0818, lo: 0xa0, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0xaa, offset 0x500
- {value: 0x0000, lo: 0x05},
- {value: 0x3008, lo: 0x80, hi: 0x80},
- {value: 0x3308, lo: 0x81, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0xb7},
- {value: 0x3308, lo: 0xb8, hi: 0xbf},
- // Block 0xab, offset 0x506
- {value: 0x0000, lo: 0x08},
- {value: 0x3308, lo: 0x80, hi: 0x85},
- {value: 0x3b08, lo: 0x86, hi: 0x86},
- {value: 0x0018, lo: 0x87, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x91},
- {value: 0x0018, lo: 0x92, hi: 0xa5},
- {value: 0x0008, lo: 0xa6, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0xac, offset 0x50f
- {value: 0x0000, lo: 0x0b},
- {value: 0x3308, lo: 0x80, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0xaf},
- {value: 0x3008, lo: 0xb0, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xb6},
- {value: 0x3008, lo: 0xb7, hi: 0xb8},
- {value: 0x3b08, lo: 0xb9, hi: 0xb9},
- {value: 0x3308, lo: 0xba, hi: 0xba},
- {value: 0x0018, lo: 0xbb, hi: 0xbc},
- {value: 0x0340, lo: 0xbd, hi: 0xbd},
- {value: 0x0018, lo: 0xbe, hi: 0xbf},
- // Block 0xad, offset 0x51b
- {value: 0x0000, lo: 0x06},
- {value: 0x0018, lo: 0x80, hi: 0x81},
- {value: 0x0040, lo: 0x82, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xa8},
- {value: 0x0040, lo: 0xa9, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0xae, offset 0x522
- {value: 0x0000, lo: 0x08},
- {value: 0x3308, lo: 0x80, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0xa6},
- {value: 0x3308, lo: 0xa7, hi: 0xab},
- {value: 0x3008, lo: 0xac, hi: 0xac},
- {value: 0x3308, lo: 0xad, hi: 0xb2},
- {value: 0x3b08, lo: 0xb3, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xb5},
- {value: 0x0008, lo: 0xb6, hi: 0xbf},
- // Block 0xaf, offset 0x52b
- {value: 0x0000, lo: 0x07},
- {value: 0x0018, lo: 0x80, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xb3},
- {value: 0x0018, lo: 0xb4, hi: 0xb5},
- {value: 0x0008, lo: 0xb6, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0xb0, offset 0x533
- {value: 0x0000, lo: 0x06},
- {value: 0x3308, lo: 0x80, hi: 0x81},
- {value: 0x3008, lo: 0x82, hi: 0x82},
- {value: 0x0008, lo: 0x83, hi: 0xb2},
- {value: 0x3008, lo: 0xb3, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xbe},
- {value: 0x3008, lo: 0xbf, hi: 0xbf},
- // Block 0xb1, offset 0x53a
- {value: 0x0000, lo: 0x0d},
- {value: 0x3808, lo: 0x80, hi: 0x80},
- {value: 0x0008, lo: 0x81, hi: 0x84},
- {value: 0x0018, lo: 0x85, hi: 0x89},
- {value: 0x3308, lo: 0x8a, hi: 0x8c},
- {value: 0x0018, lo: 0x8d, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0x9b},
- {value: 0x0008, lo: 0x9c, hi: 0x9c},
- {value: 0x0018, lo: 0x9d, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xa0},
- {value: 0x0018, lo: 0xa1, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0xb2, offset 0x548
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x91},
- {value: 0x0040, lo: 0x92, hi: 0x92},
- {value: 0x0008, lo: 0x93, hi: 0xab},
- {value: 0x3008, lo: 0xac, hi: 0xae},
- {value: 0x3308, lo: 0xaf, hi: 0xb1},
- {value: 0x3008, lo: 0xb2, hi: 0xb3},
- {value: 0x3308, lo: 0xb4, hi: 0xb4},
- {value: 0x3808, lo: 0xb5, hi: 0xb5},
- {value: 0x3308, lo: 0xb6, hi: 0xb7},
- {value: 0x0018, lo: 0xb8, hi: 0xbd},
- {value: 0x3308, lo: 0xbe, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0xb3, offset 0x555
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x87},
- {value: 0x0008, lo: 0x88, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0008, lo: 0x8a, hi: 0x8d},
- {value: 0x0040, lo: 0x8e, hi: 0x8e},
- {value: 0x0008, lo: 0x8f, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9e},
- {value: 0x0008, lo: 0x9f, hi: 0xa8},
- {value: 0x0018, lo: 0xa9, hi: 0xa9},
- {value: 0x0040, lo: 0xaa, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0xb4, offset 0x562
- {value: 0x0000, lo: 0x08},
- {value: 0x0008, lo: 0x80, hi: 0x9e},
- {value: 0x3308, lo: 0x9f, hi: 0x9f},
- {value: 0x3008, lo: 0xa0, hi: 0xa2},
- {value: 0x3308, lo: 0xa3, hi: 0xa9},
- {value: 0x3b08, lo: 0xaa, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb9},
- {value: 0x0040, lo: 0xba, hi: 0xbf},
- // Block 0xb5, offset 0x56b
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xb4},
- {value: 0x3008, lo: 0xb5, hi: 0xb7},
- {value: 0x3308, lo: 0xb8, hi: 0xbf},
- // Block 0xb6, offset 0x56f
- {value: 0x0000, lo: 0x0d},
- {value: 0x3008, lo: 0x80, hi: 0x81},
- {value: 0x3b08, lo: 0x82, hi: 0x82},
- {value: 0x3308, lo: 0x83, hi: 0x84},
- {value: 0x3008, lo: 0x85, hi: 0x85},
- {value: 0x3308, lo: 0x86, hi: 0x86},
- {value: 0x0008, lo: 0x87, hi: 0x8a},
- {value: 0x0018, lo: 0x8b, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0x9b},
- {value: 0x0040, lo: 0x9c, hi: 0x9c},
- {value: 0x0018, lo: 0x9d, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0xbf},
- // Block 0xb7, offset 0x57d
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0xaf},
- {value: 0x3008, lo: 0xb0, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xb8},
- {value: 0x3008, lo: 0xb9, hi: 0xb9},
- {value: 0x3308, lo: 0xba, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbe},
- {value: 0x3308, lo: 0xbf, hi: 0xbf},
- // Block 0xb8, offset 0x585
- {value: 0x0000, lo: 0x0a},
- {value: 0x3308, lo: 0x80, hi: 0x80},
- {value: 0x3008, lo: 0x81, hi: 0x81},
- {value: 0x3b08, lo: 0x82, hi: 0x82},
- {value: 0x3308, lo: 0x83, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0x85},
- {value: 0x0018, lo: 0x86, hi: 0x86},
- {value: 0x0008, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0xbf},
- // Block 0xb9, offset 0x590
- {value: 0x0000, lo: 0x08},
- {value: 0x0008, lo: 0x80, hi: 0xae},
- {value: 0x3008, lo: 0xaf, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xb7},
- {value: 0x3008, lo: 0xb8, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0xba, offset 0x599
- {value: 0x0000, lo: 0x05},
- {value: 0x3308, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x97},
- {value: 0x0008, lo: 0x98, hi: 0x9b},
- {value: 0x3308, lo: 0x9c, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0xbf},
- // Block 0xbb, offset 0x59f
- {value: 0x0000, lo: 0x07},
- {value: 0x0008, lo: 0x80, hi: 0xaf},
- {value: 0x3008, lo: 0xb0, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xba},
- {value: 0x3008, lo: 0xbb, hi: 0xbc},
- {value: 0x3308, lo: 0xbd, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0xbc, offset 0x5a7
- {value: 0x0000, lo: 0x08},
- {value: 0x3308, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x83},
- {value: 0x0008, lo: 0x84, hi: 0x84},
- {value: 0x0040, lo: 0x85, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xbf},
- // Block 0xbd, offset 0x5b0
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0xaa},
- {value: 0x3308, lo: 0xab, hi: 0xab},
- {value: 0x3008, lo: 0xac, hi: 0xac},
- {value: 0x3308, lo: 0xad, hi: 0xad},
- {value: 0x3008, lo: 0xae, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb5},
- {value: 0x3808, lo: 0xb6, hi: 0xb6},
- {value: 0x3308, lo: 0xb7, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbf},
- // Block 0xbe, offset 0x5ba
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0xbf},
- // Block 0xbf, offset 0x5bd
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9c},
- {value: 0x3308, lo: 0x9d, hi: 0x9f},
- {value: 0x3008, lo: 0xa0, hi: 0xa1},
- {value: 0x3308, lo: 0xa2, hi: 0xa5},
- {value: 0x3008, lo: 0xa6, hi: 0xa6},
- {value: 0x3308, lo: 0xa7, hi: 0xaa},
- {value: 0x3b08, lo: 0xab, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xb9},
- {value: 0x0018, lo: 0xba, hi: 0xbf},
- // Block 0xc0, offset 0x5c9
- {value: 0x0000, lo: 0x02},
- {value: 0x0040, lo: 0x80, hi: 0x9f},
- {value: 0x049d, lo: 0xa0, hi: 0xbf},
- // Block 0xc1, offset 0x5cc
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xa9},
- {value: 0x0018, lo: 0xaa, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xbe},
- {value: 0x0008, lo: 0xbf, hi: 0xbf},
- // Block 0xc2, offset 0x5d1
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x3308, lo: 0x81, hi: 0x86},
- {value: 0x3008, lo: 0x87, hi: 0x88},
- {value: 0x3308, lo: 0x89, hi: 0x8a},
- {value: 0x0008, lo: 0x8b, hi: 0xb2},
- {value: 0x3308, lo: 0xb3, hi: 0xb3},
- {value: 0x3b08, lo: 0xb4, hi: 0xb4},
- {value: 0x3308, lo: 0xb5, hi: 0xb8},
- {value: 0x3008, lo: 0xb9, hi: 0xb9},
- {value: 0x0008, lo: 0xba, hi: 0xba},
- {value: 0x3308, lo: 0xbb, hi: 0xbe},
- {value: 0x0018, lo: 0xbf, hi: 0xbf},
- // Block 0xc3, offset 0x5de
- {value: 0x0000, lo: 0x08},
- {value: 0x0018, lo: 0x80, hi: 0x86},
- {value: 0x3b08, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x90},
- {value: 0x3308, lo: 0x91, hi: 0x96},
- {value: 0x3008, lo: 0x97, hi: 0x98},
- {value: 0x3308, lo: 0x99, hi: 0x9b},
- {value: 0x0008, lo: 0x9c, hi: 0xbf},
- // Block 0xc4, offset 0x5e7
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0x85},
- {value: 0x0008, lo: 0x86, hi: 0x89},
- {value: 0x3308, lo: 0x8a, hi: 0x96},
- {value: 0x3008, lo: 0x97, hi: 0x97},
- {value: 0x3308, lo: 0x98, hi: 0x98},
- {value: 0x3b08, lo: 0x99, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0x9c},
- {value: 0x0040, lo: 0x9d, hi: 0x9d},
- {value: 0x0018, lo: 0x9e, hi: 0xa2},
- {value: 0x0040, lo: 0xa3, hi: 0xbf},
- // Block 0xc5, offset 0x5f3
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xb8},
- {value: 0x0040, lo: 0xb9, hi: 0xbf},
- // Block 0xc6, offset 0x5f6
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x89},
- {value: 0x0008, lo: 0x8a, hi: 0xae},
- {value: 0x3008, lo: 0xaf, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xb7},
- {value: 0x3308, lo: 0xb8, hi: 0xbd},
- {value: 0x3008, lo: 0xbe, hi: 0xbe},
- {value: 0x3b08, lo: 0xbf, hi: 0xbf},
- // Block 0xc7, offset 0x600
- {value: 0x0000, lo: 0x08},
- {value: 0x0008, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0018, lo: 0x9a, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb1},
- {value: 0x0008, lo: 0xb2, hi: 0xbf},
- // Block 0xc8, offset 0x609
- {value: 0x0000, lo: 0x0b},
- {value: 0x0008, lo: 0x80, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0x91},
- {value: 0x3308, lo: 0x92, hi: 0xa7},
- {value: 0x0040, lo: 0xa8, hi: 0xa8},
- {value: 0x3008, lo: 0xa9, hi: 0xa9},
- {value: 0x3308, lo: 0xaa, hi: 0xb0},
- {value: 0x3008, lo: 0xb1, hi: 0xb1},
- {value: 0x3308, lo: 0xb2, hi: 0xb3},
- {value: 0x3008, lo: 0xb4, hi: 0xb4},
- {value: 0x3308, lo: 0xb5, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xbf},
- // Block 0xc9, offset 0x615
- {value: 0x0000, lo: 0x0c},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x87},
- {value: 0x0008, lo: 0x88, hi: 0x89},
- {value: 0x0040, lo: 0x8a, hi: 0x8a},
- {value: 0x0008, lo: 0x8b, hi: 0xb0},
- {value: 0x3308, lo: 0xb1, hi: 0xb6},
- {value: 0x0040, lo: 0xb7, hi: 0xb9},
- {value: 0x3308, lo: 0xba, hi: 0xba},
- {value: 0x0040, lo: 0xbb, hi: 0xbb},
- {value: 0x3308, lo: 0xbc, hi: 0xbd},
- {value: 0x0040, lo: 0xbe, hi: 0xbe},
- {value: 0x3308, lo: 0xbf, hi: 0xbf},
- // Block 0xca, offset 0x622
- {value: 0x0000, lo: 0x07},
- {value: 0x3308, lo: 0x80, hi: 0x83},
- {value: 0x3b08, lo: 0x84, hi: 0x85},
- {value: 0x0008, lo: 0x86, hi: 0x86},
- {value: 0x3308, lo: 0x87, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0xbf},
- // Block 0xcb, offset 0x62a
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0xbf},
- // Block 0xcc, offset 0x62d
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0xcd, offset 0x632
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x83},
- {value: 0x0040, lo: 0x84, hi: 0xbf},
- // Block 0xce, offset 0x635
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xbf},
- // Block 0xcf, offset 0x638
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0xbf},
- // Block 0xd0, offset 0x63b
- {value: 0x0000, lo: 0x06},
- {value: 0x0008, lo: 0x80, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa9},
- {value: 0x0040, lo: 0xaa, hi: 0xad},
- {value: 0x0018, lo: 0xae, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
- // Block 0xd1, offset 0x642
- {value: 0x0000, lo: 0x06},
- {value: 0x0040, lo: 0x80, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb4},
- {value: 0x0018, lo: 0xb5, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xbf},
- // Block 0xd2, offset 0x649
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xaf},
- {value: 0x3308, lo: 0xb0, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xbf},
- // Block 0xd3, offset 0x64d
- {value: 0x0000, lo: 0x0a},
- {value: 0x0008, lo: 0x80, hi: 0x83},
- {value: 0x0018, lo: 0x84, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9a},
- {value: 0x0018, lo: 0x9b, hi: 0xa1},
- {value: 0x0040, lo: 0xa2, hi: 0xa2},
- {value: 0x0008, lo: 0xa3, hi: 0xb7},
- {value: 0x0040, lo: 0xb8, hi: 0xbc},
- {value: 0x0008, lo: 0xbd, hi: 0xbf},
- // Block 0xd4, offset 0x658
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0xbf},
- // Block 0xd5, offset 0x65b
- {value: 0x0000, lo: 0x05},
- {value: 0x0008, lo: 0x80, hi: 0x84},
- {value: 0x0040, lo: 0x85, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x90},
- {value: 0x3008, lo: 0x91, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0xd6, offset 0x661
- {value: 0x0000, lo: 0x04},
- {value: 0x0040, lo: 0x80, hi: 0x8e},
- {value: 0x3308, lo: 0x8f, hi: 0x92},
- {value: 0x0008, lo: 0x93, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xbf},
- // Block 0xd7, offset 0x666
- {value: 0x0000, lo: 0x03},
- {value: 0x0040, lo: 0x80, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xa1},
- {value: 0x0040, lo: 0xa2, hi: 0xbf},
- // Block 0xd8, offset 0x66a
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xbf},
- // Block 0xd9, offset 0x66d
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xb2},
- {value: 0x0040, lo: 0xb3, hi: 0xbf},
- // Block 0xda, offset 0x670
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x9e},
- {value: 0x0040, lo: 0x9f, hi: 0xbf},
- // Block 0xdb, offset 0x673
- {value: 0x0000, lo: 0x02},
- {value: 0x0040, lo: 0x80, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0xdc, offset 0x676
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xbb},
- {value: 0x0040, lo: 0xbc, hi: 0xbf},
- // Block 0xdd, offset 0x679
- {value: 0x0000, lo: 0x04},
- {value: 0x0008, lo: 0x80, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbc},
- {value: 0x0040, lo: 0xbd, hi: 0xbf},
- // Block 0xde, offset 0x67e
- {value: 0x0000, lo: 0x09},
- {value: 0x0008, lo: 0x80, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x8f},
- {value: 0x0008, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9b},
- {value: 0x0018, lo: 0x9c, hi: 0x9c},
- {value: 0x3308, lo: 0x9d, hi: 0x9e},
- {value: 0x0018, lo: 0x9f, hi: 0x9f},
- {value: 0x03c0, lo: 0xa0, hi: 0xa3},
- {value: 0x0040, lo: 0xa4, hi: 0xbf},
- // Block 0xdf, offset 0x688
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xbf},
- // Block 0xe0, offset 0x68b
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xa8},
- {value: 0x0018, lo: 0xa9, hi: 0xbf},
- // Block 0xe1, offset 0x68f
- {value: 0x0000, lo: 0x0e},
- {value: 0x0018, lo: 0x80, hi: 0x9d},
- {value: 0xb5b9, lo: 0x9e, hi: 0x9e},
- {value: 0xb601, lo: 0x9f, hi: 0x9f},
- {value: 0xb649, lo: 0xa0, hi: 0xa0},
- {value: 0xb6b1, lo: 0xa1, hi: 0xa1},
- {value: 0xb719, lo: 0xa2, hi: 0xa2},
- {value: 0xb781, lo: 0xa3, hi: 0xa3},
- {value: 0xb7e9, lo: 0xa4, hi: 0xa4},
- {value: 0x3018, lo: 0xa5, hi: 0xa6},
- {value: 0x3318, lo: 0xa7, hi: 0xa9},
- {value: 0x0018, lo: 0xaa, hi: 0xac},
- {value: 0x3018, lo: 0xad, hi: 0xb2},
- {value: 0x0340, lo: 0xb3, hi: 0xba},
- {value: 0x3318, lo: 0xbb, hi: 0xbf},
- // Block 0xe2, offset 0x69e
- {value: 0x0000, lo: 0x0b},
- {value: 0x3318, lo: 0x80, hi: 0x82},
- {value: 0x0018, lo: 0x83, hi: 0x84},
- {value: 0x3318, lo: 0x85, hi: 0x8b},
- {value: 0x0018, lo: 0x8c, hi: 0xa9},
- {value: 0x3318, lo: 0xaa, hi: 0xad},
- {value: 0x0018, lo: 0xae, hi: 0xba},
- {value: 0xb851, lo: 0xbb, hi: 0xbb},
- {value: 0xb899, lo: 0xbc, hi: 0xbc},
- {value: 0xb8e1, lo: 0xbd, hi: 0xbd},
- {value: 0xb949, lo: 0xbe, hi: 0xbe},
- {value: 0xb9b1, lo: 0xbf, hi: 0xbf},
- // Block 0xe3, offset 0x6aa
- {value: 0x0000, lo: 0x03},
- {value: 0xba19, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0xa8},
- {value: 0x0040, lo: 0xa9, hi: 0xbf},
- // Block 0xe4, offset 0x6ae
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x81},
- {value: 0x3318, lo: 0x82, hi: 0x84},
- {value: 0x0018, lo: 0x85, hi: 0x85},
- {value: 0x0040, lo: 0x86, hi: 0xbf},
- // Block 0xe5, offset 0x6b3
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xb1},
- {value: 0x0040, lo: 0xb2, hi: 0xbf},
- // Block 0xe6, offset 0x6b8
- {value: 0x0000, lo: 0x03},
- {value: 0x3308, lo: 0x80, hi: 0xb6},
- {value: 0x0018, lo: 0xb7, hi: 0xba},
- {value: 0x3308, lo: 0xbb, hi: 0xbf},
- // Block 0xe7, offset 0x6bc
- {value: 0x0000, lo: 0x04},
- {value: 0x3308, lo: 0x80, hi: 0xac},
- {value: 0x0018, lo: 0xad, hi: 0xb4},
- {value: 0x3308, lo: 0xb5, hi: 0xb5},
- {value: 0x0018, lo: 0xb6, hi: 0xbf},
- // Block 0xe8, offset 0x6c1
- {value: 0x0000, lo: 0x08},
- {value: 0x0018, lo: 0x80, hi: 0x83},
- {value: 0x3308, lo: 0x84, hi: 0x84},
- {value: 0x0018, lo: 0x85, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x9a},
- {value: 0x3308, lo: 0x9b, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xa0},
- {value: 0x3308, lo: 0xa1, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
- // Block 0xe9, offset 0x6ca
- {value: 0x0000, lo: 0x0a},
- {value: 0x3308, lo: 0x80, hi: 0x86},
- {value: 0x0040, lo: 0x87, hi: 0x87},
- {value: 0x3308, lo: 0x88, hi: 0x98},
- {value: 0x0040, lo: 0x99, hi: 0x9a},
- {value: 0x3308, lo: 0x9b, hi: 0xa1},
- {value: 0x0040, lo: 0xa2, hi: 0xa2},
- {value: 0x3308, lo: 0xa3, hi: 0xa4},
- {value: 0x0040, lo: 0xa5, hi: 0xa5},
- {value: 0x3308, lo: 0xa6, hi: 0xaa},
- {value: 0x0040, lo: 0xab, hi: 0xbf},
- // Block 0xea, offset 0x6d5
- {value: 0x0000, lo: 0x05},
- {value: 0x0808, lo: 0x80, hi: 0x84},
- {value: 0x0040, lo: 0x85, hi: 0x86},
- {value: 0x0818, lo: 0x87, hi: 0x8f},
- {value: 0x3308, lo: 0x90, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0xbf},
- // Block 0xeb, offset 0x6db
- {value: 0x0000, lo: 0x07},
- {value: 0x0a08, lo: 0x80, hi: 0x83},
- {value: 0x3308, lo: 0x84, hi: 0x8a},
- {value: 0x0040, lo: 0x8b, hi: 0x8f},
- {value: 0x0808, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9d},
- {value: 0x0818, lo: 0x9e, hi: 0x9f},
- {value: 0x0040, lo: 0xa0, hi: 0xbf},
- // Block 0xec, offset 0x6e3
- {value: 0x0000, lo: 0x03},
- {value: 0x0040, lo: 0x80, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb1},
- {value: 0x0040, lo: 0xb2, hi: 0xbf},
- // Block 0xed, offset 0x6e7
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xbf},
- // Block 0xee, offset 0x6eb
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x93},
- {value: 0x0040, lo: 0x94, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xae},
- {value: 0x0040, lo: 0xaf, hi: 0xb0},
- {value: 0x0018, lo: 0xb1, hi: 0xbf},
- // Block 0xef, offset 0x6f1
- {value: 0x0000, lo: 0x05},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0018, lo: 0x81, hi: 0x8f},
- {value: 0x0040, lo: 0x90, hi: 0x90},
- {value: 0x0018, lo: 0x91, hi: 0xb5},
- {value: 0x0040, lo: 0xb6, hi: 0xbf},
- // Block 0xf0, offset 0x6f7
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x8f},
- {value: 0xc1c1, lo: 0x90, hi: 0x90},
- {value: 0x0018, lo: 0x91, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xbf},
- // Block 0xf1, offset 0x6fc
- {value: 0x0000, lo: 0x02},
- {value: 0x0040, lo: 0x80, hi: 0xa5},
- {value: 0x0018, lo: 0xa6, hi: 0xbf},
- // Block 0xf2, offset 0x6ff
- {value: 0x0000, lo: 0x0f},
- {value: 0xc7e9, lo: 0x80, hi: 0x80},
- {value: 0xc839, lo: 0x81, hi: 0x81},
- {value: 0xc889, lo: 0x82, hi: 0x82},
- {value: 0xc8d9, lo: 0x83, hi: 0x83},
- {value: 0xc929, lo: 0x84, hi: 0x84},
- {value: 0xc979, lo: 0x85, hi: 0x85},
- {value: 0xc9c9, lo: 0x86, hi: 0x86},
- {value: 0xca19, lo: 0x87, hi: 0x87},
- {value: 0xca69, lo: 0x88, hi: 0x88},
- {value: 0x0040, lo: 0x89, hi: 0x8f},
- {value: 0xcab9, lo: 0x90, hi: 0x90},
- {value: 0xcad9, lo: 0x91, hi: 0x91},
- {value: 0x0040, lo: 0x92, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xa5},
- {value: 0x0040, lo: 0xa6, hi: 0xbf},
- // Block 0xf3, offset 0x70f
- {value: 0x0000, lo: 0x06},
- {value: 0x0018, lo: 0x80, hi: 0x94},
- {value: 0x0040, lo: 0x95, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xac},
- {value: 0x0040, lo: 0xad, hi: 0xaf},
- {value: 0x0018, lo: 0xb0, hi: 0xb8},
- {value: 0x0040, lo: 0xb9, hi: 0xbf},
- // Block 0xf4, offset 0x716
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0xb3},
- {value: 0x0040, lo: 0xb4, hi: 0xbf},
- // Block 0xf5, offset 0x719
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0x94},
- {value: 0x0040, lo: 0x95, hi: 0xbf},
- // Block 0xf6, offset 0x71c
- {value: 0x0000, lo: 0x03},
- {value: 0x0018, lo: 0x80, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xbf},
- // Block 0xf7, offset 0x720
- {value: 0x0000, lo: 0x05},
- {value: 0x0018, lo: 0x80, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0x99},
- {value: 0x0040, lo: 0x9a, hi: 0x9f},
- {value: 0x0018, lo: 0xa0, hi: 0xbf},
- // Block 0xf8, offset 0x726
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x87},
- {value: 0x0040, lo: 0x88, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xad},
- {value: 0x0040, lo: 0xae, hi: 0xbf},
- // Block 0xf9, offset 0x72b
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x8b},
- {value: 0x0040, lo: 0x8c, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xbe},
- {value: 0x0040, lo: 0xbf, hi: 0xbf},
- // Block 0xfa, offset 0x730
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x8c},
- {value: 0x0040, lo: 0x8d, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xab},
- {value: 0x0040, lo: 0xac, hi: 0xbf},
- // Block 0xfb, offset 0x735
- {value: 0x0000, lo: 0x02},
- {value: 0x0018, lo: 0x80, hi: 0x97},
- {value: 0x0040, lo: 0x98, hi: 0xbf},
- // Block 0xfc, offset 0x738
- {value: 0x0000, lo: 0x04},
- {value: 0x0018, lo: 0x80, hi: 0x80},
- {value: 0x0040, lo: 0x81, hi: 0x8f},
- {value: 0x0018, lo: 0x90, hi: 0xa6},
- {value: 0x0040, lo: 0xa7, hi: 0xbf},
- // Block 0xfd, offset 0x73d
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0x96},
- {value: 0x0040, lo: 0x97, hi: 0xbf},
- // Block 0xfe, offset 0x740
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xb4},
- {value: 0x0040, lo: 0xb5, hi: 0xbf},
- // Block 0xff, offset 0x743
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0x9d},
- {value: 0x0040, lo: 0x9e, hi: 0x9f},
- {value: 0x0008, lo: 0xa0, hi: 0xbf},
- // Block 0x100, offset 0x747
- {value: 0x0000, lo: 0x03},
- {value: 0x0008, lo: 0x80, hi: 0xa1},
- {value: 0x0040, lo: 0xa2, hi: 0xaf},
- {value: 0x0008, lo: 0xb0, hi: 0xbf},
- // Block 0x101, offset 0x74b
- {value: 0x0000, lo: 0x02},
- {value: 0x0008, lo: 0x80, hi: 0xa0},
- {value: 0x0040, lo: 0xa1, hi: 0xbf},
- // Block 0x102, offset 0x74e
- {value: 0x0020, lo: 0x0f},
- {value: 0xdeb9, lo: 0x80, hi: 0x89},
- {value: 0x8dfd, lo: 0x8a, hi: 0x8a},
- {value: 0xdff9, lo: 0x8b, hi: 0x9c},
- {value: 0x8e1d, lo: 0x9d, hi: 0x9d},
- {value: 0xe239, lo: 0x9e, hi: 0xa2},
- {value: 0x8e3d, lo: 0xa3, hi: 0xa3},
- {value: 0xe2d9, lo: 0xa4, hi: 0xab},
- {value: 0x7ed5, lo: 0xac, hi: 0xac},
- {value: 0xe3d9, lo: 0xad, hi: 0xaf},
- {value: 0x8e5d, lo: 0xb0, hi: 0xb0},
- {value: 0xe439, lo: 0xb1, hi: 0xb6},
- {value: 0x8e7d, lo: 0xb7, hi: 0xb9},
- {value: 0xe4f9, lo: 0xba, hi: 0xba},
- {value: 0x8edd, lo: 0xbb, hi: 0xbb},
- {value: 0xe519, lo: 0xbc, hi: 0xbf},
- // Block 0x103, offset 0x75e
- {value: 0x0020, lo: 0x10},
- {value: 0x937d, lo: 0x80, hi: 0x80},
- {value: 0xf099, lo: 0x81, hi: 0x86},
- {value: 0x939d, lo: 0x87, hi: 0x8a},
- {value: 0xd9f9, lo: 0x8b, hi: 0x8b},
- {value: 0xf159, lo: 0x8c, hi: 0x96},
- {value: 0x941d, lo: 0x97, hi: 0x97},
- {value: 0xf2b9, lo: 0x98, hi: 0xa3},
- {value: 0x943d, lo: 0xa4, hi: 0xa6},
- {value: 0xf439, lo: 0xa7, hi: 0xaa},
- {value: 0x949d, lo: 0xab, hi: 0xab},
- {value: 0xf4b9, lo: 0xac, hi: 0xac},
- {value: 0x94bd, lo: 0xad, hi: 0xad},
- {value: 0xf4d9, lo: 0xae, hi: 0xaf},
- {value: 0x94dd, lo: 0xb0, hi: 0xb1},
- {value: 0xf519, lo: 0xb2, hi: 0xbe},
- {value: 0x2040, lo: 0xbf, hi: 0xbf},
- // Block 0x104, offset 0x76f
- {value: 0x0000, lo: 0x04},
- {value: 0x0040, lo: 0x80, hi: 0x80},
- {value: 0x0340, lo: 0x81, hi: 0x81},
- {value: 0x0040, lo: 0x82, hi: 0x9f},
- {value: 0x0340, lo: 0xa0, hi: 0xbf},
- // Block 0x105, offset 0x774
- {value: 0x0000, lo: 0x01},
- {value: 0x0340, lo: 0x80, hi: 0xbf},
- // Block 0x106, offset 0x776
- {value: 0x0000, lo: 0x01},
- {value: 0x33c0, lo: 0x80, hi: 0xbf},
- // Block 0x107, offset 0x778
- {value: 0x0000, lo: 0x02},
- {value: 0x33c0, lo: 0x80, hi: 0xaf},
- {value: 0x0040, lo: 0xb0, hi: 0xbf},
-}
-
-// Total table size 42115 bytes (41KiB); checksum: F4A1FA4E
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trie.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trie.go
deleted file mode 100644
index c4ef847e7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trie.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-// Copyright 2016 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 file.
-
-package idna
-
-// appendMapping appends the mapping for the respective rune. isMapped must be
-// true. A mapping is a categorization of a rune as defined in UTS #46.
-func (c info) appendMapping(b []byte, s string) []byte {
- index := int(c >> indexShift)
- if c&xorBit == 0 {
- s := mappings[index:]
- return append(b, s[1:s[0]+1]...)
- }
- b = append(b, s...)
- if c&inlineXOR == inlineXOR {
- // TODO: support and handle two-byte inline masks
- b[len(b)-1] ^= byte(index)
- } else {
- for p := len(b) - int(xorData[index]); p < len(b); p++ {
- index++
- b[p] ^= xorData[index]
- }
- }
- return b
-}
-
-// Sparse block handling code.
-
-type valueRange struct {
- value uint16 // header: value:stride
- lo, hi byte // header: lo:n
-}
-
-type sparseBlocks struct {
- values []valueRange
- offset []uint16
-}
-
-var idnaSparse = sparseBlocks{
- values: idnaSparseValues[:],
- offset: idnaSparseOffset[:],
-}
-
-// Don't use newIdnaTrie to avoid unconditional linking in of the table.
-var trie = &idnaTrie{}
-
-// lookup determines the type of block n and looks up the value for b.
-// For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
-// is a list of ranges with an accompanying value. Given a matching range r,
-// the value for b is by r.value + (b - r.lo) * stride.
-func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
- offset := t.offset[n]
- header := t.values[offset]
- lo := offset + 1
- hi := lo + uint16(header.lo)
- for lo < hi {
- m := lo + (hi-lo)/2
- r := t.values[m]
- if r.lo <= b && b <= r.hi {
- return r.value + uint16(b-r.lo)*header.value
- }
- if b < r.lo {
- hi = m
- } else {
- lo = m + 1
- }
- }
- return 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trieval.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trieval.go
deleted file mode 100644
index 7a8cf889b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/idna/trieval.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-package idna
-
-// This file contains definitions for interpreting the trie value of the idna
-// trie generated by "go run gen*.go". It is shared by both the generator
-// program and the resultant package. Sharing is achieved by the generator
-// copying gen_trieval.go to trieval.go and changing what's above this comment.
-
-// info holds information from the IDNA mapping table for a single rune. It is
-// the value returned by a trie lookup. In most cases, all information fits in
-// a 16-bit value. For mappings, this value may contain an index into a slice
-// with the mapped string. Such mappings can consist of the actual mapped value
-// or an XOR pattern to be applied to the bytes of the UTF8 encoding of the
-// input rune. This technique is used by the cases packages and reduces the
-// table size significantly.
-//
-// The per-rune values have the following format:
-//
-// if mapped {
-// if inlinedXOR {
-// 15..13 inline XOR marker
-// 12..11 unused
-// 10..3 inline XOR mask
-// } else {
-// 15..3 index into xor or mapping table
-// }
-// } else {
-// 15..14 unused
-// 13 mayNeedNorm
-// 12..11 attributes
-// 10..8 joining type
-// 7..3 category type
-// }
-// 2 use xor pattern
-// 1..0 mapped category
-//
-// See the definitions below for a more detailed description of the various
-// bits.
-type info uint16
-
-const (
- catSmallMask = 0x3
- catBigMask = 0xF8
- indexShift = 3
- xorBit = 0x4 // interpret the index as an xor pattern
- inlineXOR = 0xE000 // These bits are set if the XOR pattern is inlined.
-
- joinShift = 8
- joinMask = 0x07
-
- // Attributes
- attributesMask = 0x1800
- viramaModifier = 0x1800
- modifier = 0x1000
- rtl = 0x0800
-
- mayNeedNorm = 0x2000
-)
-
-// A category corresponds to a category defined in the IDNA mapping table.
-type category uint16
-
-const (
- unknown category = 0 // not currently defined in unicode.
- mapped category = 1
- disallowedSTD3Mapped category = 2
- deviation category = 3
-)
-
-const (
- valid category = 0x08
- validNV8 category = 0x18
- validXV8 category = 0x28
- disallowed category = 0x40
- disallowedSTD3Valid category = 0x80
- ignored category = 0xC0
-)
-
-// join types and additional rune information
-const (
- joiningL = (iota + 1)
- joiningD
- joiningT
- joiningR
-
- //the following types are derived during processing
- joinZWJ
- joinZWNJ
- joinVirama
- numJoinTypes
-)
-
-func (c info) isMapped() bool {
- return c&0x3 != 0
-}
-
-func (c info) category() category {
- small := c & catSmallMask
- if small != 0 {
- return category(small)
- }
- return category(c & catBigMask)
-}
-
-func (c info) joinType() info {
- if c.isMapped() {
- return 0
- }
- return (c >> joinShift) & joinMask
-}
-
-func (c info) isModifier() bool {
- return c&(modifier|catSmallMask) == modifier
-}
-
-func (c info) isViramaModifier() bool {
- return c&(attributesMask|catSmallMask) == viramaModifier
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/const.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/const.go
deleted file mode 100644
index c9df24d95..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/const.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// go generate gen.go
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
-package iana // import "golang.org/x/net/internal/iana"
-
-// Differentiated Services Field Codepoints (DSCP), Updated: 2017-05-12
-const (
- DiffServCS0 = 0x0 // CS0
- DiffServCS1 = 0x20 // CS1
- DiffServCS2 = 0x40 // CS2
- DiffServCS3 = 0x60 // CS3
- DiffServCS4 = 0x80 // CS4
- DiffServCS5 = 0xa0 // CS5
- DiffServCS6 = 0xc0 // CS6
- DiffServCS7 = 0xe0 // CS7
- DiffServAF11 = 0x28 // AF11
- DiffServAF12 = 0x30 // AF12
- DiffServAF13 = 0x38 // AF13
- DiffServAF21 = 0x48 // AF21
- DiffServAF22 = 0x50 // AF22
- DiffServAF23 = 0x58 // AF23
- DiffServAF31 = 0x68 // AF31
- DiffServAF32 = 0x70 // AF32
- DiffServAF33 = 0x78 // AF33
- DiffServAF41 = 0x88 // AF41
- DiffServAF42 = 0x90 // AF42
- DiffServAF43 = 0x98 // AF43
- DiffServEF = 0xb8 // EF
- DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT
-)
-
-// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06
-const (
- NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport)
- ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1))
- ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0))
- CongestionExperienced = 0x3 // CE (Congestion Experienced)
-)
-
-// Protocol Numbers, Updated: 2016-06-22
-const (
- ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number
- ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option
- ProtocolICMP = 1 // Internet Control Message
- ProtocolIGMP = 2 // Internet Group Management
- ProtocolGGP = 3 // Gateway-to-Gateway
- ProtocolIPv4 = 4 // IPv4 encapsulation
- ProtocolST = 5 // Stream
- ProtocolTCP = 6 // Transmission Control
- ProtocolCBT = 7 // CBT
- ProtocolEGP = 8 // Exterior Gateway Protocol
- ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP)
- ProtocolBBNRCCMON = 10 // BBN RCC Monitoring
- ProtocolNVPII = 11 // Network Voice Protocol
- ProtocolPUP = 12 // PUP
- ProtocolEMCON = 14 // EMCON
- ProtocolXNET = 15 // Cross Net Debugger
- ProtocolCHAOS = 16 // Chaos
- ProtocolUDP = 17 // User Datagram
- ProtocolMUX = 18 // Multiplexing
- ProtocolDCNMEAS = 19 // DCN Measurement Subsystems
- ProtocolHMP = 20 // Host Monitoring
- ProtocolPRM = 21 // Packet Radio Measurement
- ProtocolXNSIDP = 22 // XEROX NS IDP
- ProtocolTRUNK1 = 23 // Trunk-1
- ProtocolTRUNK2 = 24 // Trunk-2
- ProtocolLEAF1 = 25 // Leaf-1
- ProtocolLEAF2 = 26 // Leaf-2
- ProtocolRDP = 27 // Reliable Data Protocol
- ProtocolIRTP = 28 // Internet Reliable Transaction
- ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4
- ProtocolNETBLT = 30 // Bulk Data Transfer Protocol
- ProtocolMFENSP = 31 // MFE Network Services Protocol
- ProtocolMERITINP = 32 // MERIT Internodal Protocol
- ProtocolDCCP = 33 // Datagram Congestion Control Protocol
- Protocol3PC = 34 // Third Party Connect Protocol
- ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol
- ProtocolXTP = 36 // XTP
- ProtocolDDP = 37 // Datagram Delivery Protocol
- ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto
- ProtocolTPPP = 39 // TP++ Transport Protocol
- ProtocolIL = 40 // IL Transport Protocol
- ProtocolIPv6 = 41 // IPv6 encapsulation
- ProtocolSDRP = 42 // Source Demand Routing Protocol
- ProtocolIPv6Route = 43 // Routing Header for IPv6
- ProtocolIPv6Frag = 44 // Fragment Header for IPv6
- ProtocolIDRP = 45 // Inter-Domain Routing Protocol
- ProtocolRSVP = 46 // Reservation Protocol
- ProtocolGRE = 47 // Generic Routing Encapsulation
- ProtocolDSR = 48 // Dynamic Source Routing Protocol
- ProtocolBNA = 49 // BNA
- ProtocolESP = 50 // Encap Security Payload
- ProtocolAH = 51 // Authentication Header
- ProtocolINLSP = 52 // Integrated Net Layer Security TUBA
- ProtocolNARP = 54 // NBMA Address Resolution Protocol
- ProtocolMOBILE = 55 // IP Mobility
- ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management
- ProtocolSKIP = 57 // SKIP
- ProtocolIPv6ICMP = 58 // ICMP for IPv6
- ProtocolIPv6NoNxt = 59 // No Next Header for IPv6
- ProtocolIPv6Opts = 60 // Destination Options for IPv6
- ProtocolCFTP = 62 // CFTP
- ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK
- ProtocolKRYPTOLAN = 65 // Kryptolan
- ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol
- ProtocolIPPC = 67 // Internet Pluribus Packet Core
- ProtocolSATMON = 69 // SATNET Monitoring
- ProtocolVISA = 70 // VISA Protocol
- ProtocolIPCV = 71 // Internet Packet Core Utility
- ProtocolCPNX = 72 // Computer Protocol Network Executive
- ProtocolCPHB = 73 // Computer Protocol Heart Beat
- ProtocolWSN = 74 // Wang Span Network
- ProtocolPVP = 75 // Packet Video Protocol
- ProtocolBRSATMON = 76 // Backroom SATNET Monitoring
- ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary
- ProtocolWBMON = 78 // WIDEBAND Monitoring
- ProtocolWBEXPAK = 79 // WIDEBAND EXPAK
- ProtocolISOIP = 80 // ISO Internet Protocol
- ProtocolVMTP = 81 // VMTP
- ProtocolSECUREVMTP = 82 // SECURE-VMTP
- ProtocolVINES = 83 // VINES
- ProtocolTTP = 84 // Transaction Transport Protocol
- ProtocolIPTM = 84 // Internet Protocol Traffic Manager
- ProtocolNSFNETIGP = 85 // NSFNET-IGP
- ProtocolDGP = 86 // Dissimilar Gateway Protocol
- ProtocolTCF = 87 // TCF
- ProtocolEIGRP = 88 // EIGRP
- ProtocolOSPFIGP = 89 // OSPFIGP
- ProtocolSpriteRPC = 90 // Sprite RPC Protocol
- ProtocolLARP = 91 // Locus Address Resolution Protocol
- ProtocolMTP = 92 // Multicast Transport Protocol
- ProtocolAX25 = 93 // AX.25 Frames
- ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol
- ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro.
- ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation
- ProtocolENCAP = 98 // Encapsulation Header
- ProtocolGMTP = 100 // GMTP
- ProtocolIFMP = 101 // Ipsilon Flow Management Protocol
- ProtocolPNNI = 102 // PNNI over IP
- ProtocolPIM = 103 // Protocol Independent Multicast
- ProtocolARIS = 104 // ARIS
- ProtocolSCPS = 105 // SCPS
- ProtocolQNX = 106 // QNX
- ProtocolAN = 107 // Active Networks
- ProtocolIPComp = 108 // IP Payload Compression Protocol
- ProtocolSNP = 109 // Sitara Networks Protocol
- ProtocolCompaqPeer = 110 // Compaq Peer Protocol
- ProtocolIPXinIP = 111 // IPX in IP
- ProtocolVRRP = 112 // Virtual Router Redundancy Protocol
- ProtocolPGM = 113 // PGM Reliable Transport Protocol
- ProtocolL2TP = 115 // Layer Two Tunneling Protocol
- ProtocolDDX = 116 // D-II Data Exchange (DDX)
- ProtocolIATP = 117 // Interactive Agent Transfer Protocol
- ProtocolSTP = 118 // Schedule Transfer Protocol
- ProtocolSRP = 119 // SpectraLink Radio Protocol
- ProtocolUTI = 120 // UTI
- ProtocolSMP = 121 // Simple Message Protocol
- ProtocolPTP = 123 // Performance Transparency Protocol
- ProtocolISIS = 124 // ISIS over IPv4
- ProtocolFIRE = 125 // FIRE
- ProtocolCRTP = 126 // Combat Radio Transport Protocol
- ProtocolCRUDP = 127 // Combat Radio User Datagram
- ProtocolSSCOPMCE = 128 // SSCOPMCE
- ProtocolIPLT = 129 // IPLT
- ProtocolSPS = 130 // Secure Packet Shield
- ProtocolPIPE = 131 // Private IP Encapsulation within IP
- ProtocolSCTP = 132 // Stream Control Transmission Protocol
- ProtocolFC = 133 // Fibre Channel
- ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE
- ProtocolMobilityHeader = 135 // Mobility Header
- ProtocolUDPLite = 136 // UDPLite
- ProtocolMPLSinIP = 137 // MPLS-in-IP
- ProtocolMANET = 138 // MANET Protocols
- ProtocolHIP = 139 // Host Identity Protocol
- ProtocolShim6 = 140 // Shim6 Protocol
- ProtocolWESP = 141 // Wrapped Encapsulating Security Payload
- ProtocolROHC = 142 // Robust Header Compression
- ProtocolReserved = 255 // Reserved
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/gen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/gen.go
deleted file mode 100644
index 86c78b3bb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/iana/gen.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build ignore
-
-//go:generate go run gen.go
-
-// This program generates internet protocol constants and tables by
-// reading IANA protocol registries.
-package main
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "go/format"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "strconv"
- "strings"
-)
-
-var registries = []struct {
- url string
- parse func(io.Writer, io.Reader) error
-}{
- {
- "http://www.iana.org/assignments/dscp-registry/dscp-registry.xml",
- parseDSCPRegistry,
- },
- {
- "http://www.iana.org/assignments/ipv4-tos-byte/ipv4-tos-byte.xml",
- parseTOSTCByte,
- },
- {
- "http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml",
- parseProtocolNumbers,
- },
-}
-
-func main() {
- var bb bytes.Buffer
- fmt.Fprintf(&bb, "// go generate gen.go\n")
- fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n")
- fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n")
- fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n")
- for _, r := range registries {
- resp, err := http.Get(r.url)
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- defer resp.Body.Close()
- if resp.StatusCode != http.StatusOK {
- fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url)
- os.Exit(1)
- }
- if err := r.parse(&bb, resp.Body); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- fmt.Fprintf(&bb, "\n")
- }
- b, err := format.Source(bb.Bytes())
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- if err := ioutil.WriteFile("const.go", b, 0644); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func parseDSCPRegistry(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var dr dscpRegistry
- if err := dec.Decode(&dr); err != nil {
- return err
- }
- drs := dr.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, dr := range drs {
- fmt.Fprintf(w, "DiffServ%s = %#x", dr.Name, dr.Value)
- fmt.Fprintf(w, "// %s\n", dr.OrigName)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type dscpRegistry struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Note string `xml:"note"`
- RegTitle string `xml:"registry>title"`
- PoolRecords []struct {
- Name string `xml:"name"`
- Space string `xml:"space"`
- } `xml:"registry>record"`
- Records []struct {
- Name string `xml:"name"`
- Space string `xml:"space"`
- } `xml:"registry>registry>record"`
-}
-
-type canonDSCPRecord struct {
- OrigName string
- Name string
- Value int
-}
-
-func (drr *dscpRegistry) escape() []canonDSCPRecord {
- drs := make([]canonDSCPRecord, len(drr.Records))
- sr := strings.NewReplacer(
- "+", "",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, dr := range drr.Records {
- s := strings.TrimSpace(dr.Name)
- drs[i].OrigName = s
- drs[i].Name = sr.Replace(s)
- n, err := strconv.ParseUint(dr.Space, 2, 8)
- if err != nil {
- continue
- }
- drs[i].Value = int(n) << 2
- }
- return drs
-}
-
-func parseTOSTCByte(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var ttb tosTCByte
- if err := dec.Decode(&ttb); err != nil {
- return err
- }
- trs := ttb.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", ttb.Title, ttb.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, tr := range trs {
- fmt.Fprintf(w, "%s = %#x", tr.Keyword, tr.Value)
- fmt.Fprintf(w, "// %s\n", tr.OrigKeyword)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type tosTCByte struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Note string `xml:"note"`
- RegTitle string `xml:"registry>title"`
- Records []struct {
- Binary string `xml:"binary"`
- Keyword string `xml:"keyword"`
- } `xml:"registry>record"`
-}
-
-type canonTOSTCByteRecord struct {
- OrigKeyword string
- Keyword string
- Value int
-}
-
-func (ttb *tosTCByte) escape() []canonTOSTCByteRecord {
- trs := make([]canonTOSTCByteRecord, len(ttb.Records))
- sr := strings.NewReplacer(
- "Capable", "",
- "(", "",
- ")", "",
- "+", "",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, tr := range ttb.Records {
- s := strings.TrimSpace(tr.Keyword)
- trs[i].OrigKeyword = s
- ss := strings.Split(s, " ")
- if len(ss) > 1 {
- trs[i].Keyword = strings.Join(ss[1:], " ")
- } else {
- trs[i].Keyword = ss[0]
- }
- trs[i].Keyword = sr.Replace(trs[i].Keyword)
- n, err := strconv.ParseUint(tr.Binary, 2, 8)
- if err != nil {
- continue
- }
- trs[i].Value = int(n)
- }
- return trs
-}
-
-func parseProtocolNumbers(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var pn protocolNumbers
- if err := dec.Decode(&pn); err != nil {
- return err
- }
- prs := pn.escape()
- prs = append([]canonProtocolRecord{{
- Name: "IP",
- Descr: "IPv4 encapsulation, pseudo protocol number",
- Value: 0,
- }}, prs...)
- fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, pr := range prs {
- if pr.Name == "" {
- continue
- }
- fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value)
- s := pr.Descr
- if s == "" {
- s = pr.OrigName
- }
- fmt.Fprintf(w, "// %s\n", s)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type protocolNumbers struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- RegTitle string `xml:"registry>title"`
- Note string `xml:"registry>note"`
- Records []struct {
- Value string `xml:"value"`
- Name string `xml:"name"`
- Descr string `xml:"description"`
- } `xml:"registry>record"`
-}
-
-type canonProtocolRecord struct {
- OrigName string
- Name string
- Descr string
- Value int
-}
-
-func (pn *protocolNumbers) escape() []canonProtocolRecord {
- prs := make([]canonProtocolRecord, len(pn.Records))
- sr := strings.NewReplacer(
- "-in-", "in",
- "-within-", "within",
- "-over-", "over",
- "+", "P",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, pr := range pn.Records {
- if strings.Contains(pr.Name, "Deprecated") ||
- strings.Contains(pr.Name, "deprecated") {
- continue
- }
- prs[i].OrigName = pr.Name
- s := strings.TrimSpace(pr.Name)
- switch pr.Name {
- case "ISIS over IPv4":
- prs[i].Name = "ISIS"
- case "manet":
- prs[i].Name = "MANET"
- default:
- prs[i].Name = sr.Replace(s)
- }
- ss := strings.Split(pr.Descr, "\n")
- for i := range ss {
- ss[i] = strings.TrimSpace(ss[i])
- }
- if len(ss) > 1 {
- prs[i].Descr = strings.Join(ss, " ")
- } else {
- prs[i].Descr = ss[0]
- }
- prs[i].Value, _ = strconv.Atoi(pr.Value)
- }
- return prs
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_bsd.go
deleted file mode 100644
index a6e433b58..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_bsd.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package nettest
-
-import (
- "runtime"
- "strconv"
- "strings"
- "syscall"
-)
-
-var darwinVersion int
-
-func init() {
- if runtime.GOOS == "darwin" {
- // See http://support.apple.com/kb/HT1633.
- s, err := syscall.Sysctl("kern.osrelease")
- if err != nil {
- return
- }
- ss := strings.Split(s, ".")
- if len(ss) == 0 {
- return
- }
- darwinVersion, _ = strconv.Atoi(ss[0])
- }
-}
-
-func supportsIPv6MulticastDeliveryOnLoopback() bool {
- switch runtime.GOOS {
- case "freebsd":
- // See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
- // Even after the fix, it looks like the latest
- // kernels don't deliver link-local scoped multicast
- // packets correctly.
- return false
- case "darwin":
- return !causesIPv6Crash()
- default:
- return true
- }
-}
-
-func causesIPv6Crash() bool {
- // We see some kernel crash when running IPv6 with IP-level
- // options on Darwin kernel version 12 or below.
- // See golang.org/issues/17015.
- return darwinVersion < 13
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go
deleted file mode 100644
index bc7da5e0d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build linux solaris
-
-package nettest
-
-func supportsIPv6MulticastDeliveryOnLoopback() bool {
- return true
-}
-
-func causesIPv6Crash() bool {
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_posix.go
deleted file mode 100644
index 963ed9965..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_posix.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package nettest
-
-import (
- "os"
- "syscall"
-)
-
-func protocolNotSupported(err error) bool {
- switch err := err.(type) {
- case syscall.Errno:
- switch err {
- case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
- return true
- }
- case *os.SyscallError:
- switch err := err.Err.(type) {
- case syscall.Errno:
- switch err {
- case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
- return true
- }
- }
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_stub.go
deleted file mode 100644
index ea61b6f39..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_stub.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build nacl plan9
-
-package nettest
-
-import (
- "fmt"
- "runtime"
-)
-
-func maxOpenFiles() int {
- return defaultMaxOpenFiles
-}
-
-func supportsRawIPSocket() (string, bool) {
- return fmt.Sprintf("not supported on %s", runtime.GOOS), false
-}
-
-func supportsIPv6MulticastDeliveryOnLoopback() bool {
- return false
-}
-
-func causesIPv6Crash() bool {
- return false
-}
-
-func protocolNotSupported(err error) bool {
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_unix.go
deleted file mode 100644
index ed13e448b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_unix.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package nettest
-
-import (
- "fmt"
- "os"
- "runtime"
- "syscall"
-)
-
-func maxOpenFiles() int {
- var rlim syscall.Rlimit
- if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
- return defaultMaxOpenFiles
- }
- return int(rlim.Cur)
-}
-
-func supportsRawIPSocket() (string, bool) {
- if os.Getuid() != 0 {
- return fmt.Sprintf("must be root on %s", runtime.GOOS), false
- }
- return "", true
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_windows.go
deleted file mode 100644
index 3dcb727c9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/helper_windows.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 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 file.
-
-package nettest
-
-import (
- "fmt"
- "runtime"
- "syscall"
-)
-
-func maxOpenFiles() int {
- return 4 * defaultMaxOpenFiles /* actually it's 16581375 */
-}
-
-func supportsRawIPSocket() (string, bool) {
- // From http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548.aspx:
- // Note: To use a socket of type SOCK_RAW requires administrative privileges.
- // Users running Winsock applications that use raw sockets must be a member of
- // the Administrators group on the local computer, otherwise raw socket calls
- // will fail with an error code of WSAEACCES. On Windows Vista and later, access
- // for raw sockets is enforced at socket creation. In earlier versions of Windows,
- // access for raw sockets is enforced during other socket operations.
- s, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_RAW, 0)
- if err == syscall.WSAEACCES {
- return fmt.Sprintf("no access to raw socket allowed on %s", runtime.GOOS), false
- }
- if err != nil {
- return err.Error(), false
- }
- syscall.Closesocket(s)
- return "", true
-}
-
-func supportsIPv6MulticastDeliveryOnLoopback() bool {
- return true
-}
-
-func causesIPv6Crash() bool {
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/interface.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/interface.go
deleted file mode 100644
index 8e6333afe..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/interface.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2012 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 file.
-
-package nettest
-
-import "net"
-
-// IsMulticastCapable reports whether ifi is an IP multicast-capable
-// network interface. Network must be "ip", "ip4" or "ip6".
-func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool) {
- switch network {
- case "ip", "ip4", "ip6":
- default:
- return nil, false
- }
- if ifi == nil || ifi.Flags&net.FlagUp == 0 || ifi.Flags&net.FlagMulticast == 0 {
- return nil, false
- }
- return hasRoutableIP(network, ifi)
-}
-
-// RoutedInterface returns a network interface that can route IP
-// traffic and satisfies flags. It returns nil when an appropriate
-// network interface is not found. Network must be "ip", "ip4" or
-// "ip6".
-func RoutedInterface(network string, flags net.Flags) *net.Interface {
- switch network {
- case "ip", "ip4", "ip6":
- default:
- return nil
- }
- ift, err := net.Interfaces()
- if err != nil {
- return nil
- }
- for _, ifi := range ift {
- if ifi.Flags&flags != flags {
- continue
- }
- if _, ok := hasRoutableIP(network, &ifi); !ok {
- continue
- }
- return &ifi
- }
- return nil
-}
-
-func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) {
- ifat, err := ifi.Addrs()
- if err != nil {
- return nil, false
- }
- for _, ifa := range ifat {
- switch ifa := ifa.(type) {
- case *net.IPAddr:
- if ip := routableIP(network, ifa.IP); ip != nil {
- return ip, true
- }
- case *net.IPNet:
- if ip := routableIP(network, ifa.IP); ip != nil {
- return ip, true
- }
- }
- }
- return nil, false
-}
-
-func routableIP(network string, ip net.IP) net.IP {
- if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsGlobalUnicast() {
- return nil
- }
- switch network {
- case "ip4":
- if ip := ip.To4(); ip != nil {
- return ip
- }
- case "ip6":
- if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation
- return nil
- }
- if ip := ip.To16(); ip != nil && ip.To4() == nil {
- return ip
- }
- default:
- if ip := ip.To4(); ip != nil {
- return ip
- }
- if ip := ip.To16(); ip != nil {
- return ip
- }
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/rlimit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/rlimit.go
deleted file mode 100644
index bb34aec0b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/rlimit.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 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 file.
-
-package nettest
-
-const defaultMaxOpenFiles = 256
-
-// MaxOpenFiles returns the maximum number of open files for the
-// caller's process.
-func MaxOpenFiles() int { return maxOpenFiles() }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/stack.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/stack.go
deleted file mode 100644
index cc92c035b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/nettest/stack.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package nettest provides utilities for network testing.
-package nettest // import "golang.org/x/net/internal/nettest"
-
-import (
- "fmt"
- "io/ioutil"
- "net"
- "os"
- "runtime"
-)
-
-var (
- supportsIPv4 bool
- supportsIPv6 bool
-)
-
-func init() {
- if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil {
- ln.Close()
- supportsIPv4 = true
- }
- if ln, err := net.Listen("tcp6", "[::1]:0"); err == nil {
- ln.Close()
- supportsIPv6 = true
- }
-}
-
-// SupportsIPv4 reports whether the platform supports IPv4 networking
-// functionality.
-func SupportsIPv4() bool { return supportsIPv4 }
-
-// SupportsIPv6 reports whether the platform supports IPv6 networking
-// functionality.
-func SupportsIPv6() bool { return supportsIPv6 }
-
-// SupportsRawIPSocket reports whether the platform supports raw IP
-// sockets.
-func SupportsRawIPSocket() (string, bool) {
- return supportsRawIPSocket()
-}
-
-// SupportsIPv6MulticastDeliveryOnLoopback reports whether the
-// platform supports IPv6 multicast packet delivery on software
-// loopback interface.
-func SupportsIPv6MulticastDeliveryOnLoopback() bool {
- return supportsIPv6MulticastDeliveryOnLoopback()
-}
-
-// ProtocolNotSupported reports whether err is a protocol not
-// supported error.
-func ProtocolNotSupported(err error) bool {
- return protocolNotSupported(err)
-}
-
-// TestableNetwork reports whether network is testable on the current
-// platform configuration.
-func TestableNetwork(network string) bool {
- // This is based on logic from standard library's
- // net/platform_test.go.
- switch network {
- case "unix", "unixgram":
- switch runtime.GOOS {
- case "android", "nacl", "plan9", "windows":
- return false
- }
- if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
- return false
- }
- case "unixpacket":
- switch runtime.GOOS {
- case "android", "darwin", "freebsd", "nacl", "plan9", "windows":
- return false
- }
- }
- return true
-}
-
-// NewLocalListener returns a listener which listens to a loopback IP
-// address or local file system path.
-// Network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket".
-func NewLocalListener(network string) (net.Listener, error) {
- switch network {
- case "tcp":
- if supportsIPv4 {
- if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil {
- return ln, nil
- }
- }
- if supportsIPv6 {
- return net.Listen("tcp6", "[::1]:0")
- }
- case "tcp4":
- if supportsIPv4 {
- return net.Listen("tcp4", "127.0.0.1:0")
- }
- case "tcp6":
- if supportsIPv6 {
- return net.Listen("tcp6", "[::1]:0")
- }
- case "unix", "unixpacket":
- return net.Listen(network, localPath())
- }
- return nil, fmt.Errorf("%s is not supported", network)
-}
-
-// NewLocalPacketListener returns a packet listener which listens to a
-// loopback IP address or local file system path.
-// Network must be "udp", "udp4", "udp6" or "unixgram".
-func NewLocalPacketListener(network string) (net.PacketConn, error) {
- switch network {
- case "udp":
- if supportsIPv4 {
- if c, err := net.ListenPacket("udp4", "127.0.0.1:0"); err == nil {
- return c, nil
- }
- }
- if supportsIPv6 {
- return net.ListenPacket("udp6", "[::1]:0")
- }
- case "udp4":
- if supportsIPv4 {
- return net.ListenPacket("udp4", "127.0.0.1:0")
- }
- case "udp6":
- if supportsIPv6 {
- return net.ListenPacket("udp6", "[::1]:0")
- }
- case "unixgram":
- return net.ListenPacket(network, localPath())
- }
- return nil, fmt.Errorf("%s is not supported", network)
-}
-
-func localPath() string {
- f, err := ioutil.TempFile("", "nettest")
- if err != nil {
- panic(err)
- }
- path := f.Name()
- f.Close()
- os.Remove(path)
- return path
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr.go
deleted file mode 100644
index 1eb07d26d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr.go
+++ /dev/null
@@ -1,11 +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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package socket
-
-func (h *cmsghdr) len() int { return int(h.Len) }
-func (h *cmsghdr) lvl() int { return int(h.Level) }
-func (h *cmsghdr) typ() int { return int(h.Type) }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
deleted file mode 100644
index d1d0c2de5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
+++ /dev/null
@@ -1,13 +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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package socket
-
-func (h *cmsghdr) set(l, lvl, typ int) {
- h.Len = uint32(l)
- h.Level = int32(lvl)
- h.Type = int32(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
deleted file mode 100644
index bac66811d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
+++ /dev/null
@@ -1,14 +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 file.
-
-// +build arm mips mipsle 386
-// +build linux
-
-package socket
-
-func (h *cmsghdr) set(l, lvl, typ int) {
- h.Len = uint32(l)
- h.Level = int32(lvl)
- h.Type = int32(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
deleted file mode 100644
index 63f0534fa..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
+++ /dev/null
@@ -1,14 +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 file.
-
-// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
-// +build linux
-
-package socket
-
-func (h *cmsghdr) set(l, lvl, typ int) {
- h.Len = uint64(l)
- h.Level = int32(lvl)
- h.Type = int32(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
deleted file mode 100644
index 7dedd430e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
+++ /dev/null
@@ -1,14 +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 file.
-
-// +build amd64
-// +build solaris
-
-package socket
-
-func (h *cmsghdr) set(l, lvl, typ int) {
- h.Len = uint32(l)
- h.Level = int32(lvl)
- h.Type = int32(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
deleted file mode 100644
index a4e71226f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
+++ /dev/null
@@ -1,17 +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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
-
-package socket
-
-type cmsghdr struct{}
-
-const sizeofCmsghdr = 0
-
-func (h *cmsghdr) len() int { return 0 }
-func (h *cmsghdr) lvl() int { return 0 }
-func (h *cmsghdr) typ() int { return 0 }
-
-func (h *cmsghdr) set(l, lvl, typ int) {}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_darwin.go
deleted file mode 100644
index 14e28c0b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_darwin.go
+++ /dev/null
@@ -1,44 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
deleted file mode 100644
index 14e28c0b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
+++ /dev/null
@@ -1,44 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
deleted file mode 100644
index 14e28c0b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
+++ /dev/null
@@ -1,44 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_linux.go
deleted file mode 100644
index ce9ec2f6d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_linux.go
+++ /dev/null
@@ -1,49 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <linux/in.h>
-#include <linux/in6.h>
-
-#define _GNU_SOURCE
-#include <sys/socket.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type mmsghdr C.struct_mmsghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofMmsghdr = C.sizeof_struct_mmsghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
deleted file mode 100644
index 3f8433569..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
+++ /dev/null
@@ -1,47 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type mmsghdr C.struct_mmsghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofMmsghdr = C.sizeof_struct_mmsghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
deleted file mode 100644
index 14e28c0b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
+++ /dev/null
@@ -1,44 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_solaris.go
deleted file mode 100644
index 14e28c0b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/defs_solaris.go
+++ /dev/null
@@ -1,44 +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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_unix.go
deleted file mode 100644
index 93dff9180..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_unix.go
+++ /dev/null
@@ -1,31 +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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package socket
-
-import "syscall"
-
-var (
- errEAGAIN error = syscall.EAGAIN
- errEINVAL error = syscall.EINVAL
- errENOENT error = syscall.ENOENT
-)
-
-// errnoErr returns common boxed Errno values, to prevent allocations
-// at runtime.
-func errnoErr(errno syscall.Errno) error {
- switch errno {
- case 0:
- return nil
- case syscall.EAGAIN:
- return errEAGAIN
- case syscall.EINVAL:
- return errEINVAL
- case syscall.ENOENT:
- return errENOENT
- }
- return errno
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_windows.go
deleted file mode 100644
index 6a6379a8b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/error_windows.go
+++ /dev/null
@@ -1,26 +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 file.
-
-package socket
-
-import "syscall"
-
-var (
- errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING
- errEINVAL error = syscall.EINVAL
-)
-
-// errnoErr returns common boxed Errno values, to prevent allocations
-// at runtime.
-func errnoErr(errno syscall.Errno) error {
- switch errno {
- case 0:
- return nil
- case syscall.ERROR_IO_PENDING:
- return errERROR_IO_PENDING
- case syscall.EINVAL:
- return errEINVAL
- }
- return errno
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
deleted file mode 100644
index 05d6082d1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
+++ /dev/null
@@ -1,19 +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 file.
-
-// +build arm mips mipsle 386
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package socket
-
-import "unsafe"
-
-func (v *iovec) set(b []byte) {
- l := len(b)
- if l == 0 {
- return
- }
- v.Base = (*byte)(unsafe.Pointer(&b[0]))
- v.Len = uint32(l)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
deleted file mode 100644
index afb34ad58..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
+++ /dev/null
@@ -1,19 +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 file.
-
-// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package socket
-
-import "unsafe"
-
-func (v *iovec) set(b []byte) {
- l := len(b)
- if l == 0 {
- return
- }
- v.Base = (*byte)(unsafe.Pointer(&b[0]))
- v.Len = uint64(l)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
deleted file mode 100644
index 8d17a40c4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
+++ /dev/null
@@ -1,19 +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 file.
-
-// +build amd64
-// +build solaris
-
-package socket
-
-import "unsafe"
-
-func (v *iovec) set(b []byte) {
- l := len(b)
- if l == 0 {
- return
- }
- v.Base = (*int8)(unsafe.Pointer(&b[0]))
- v.Len = uint64(l)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_stub.go
deleted file mode 100644
index c87d2a933..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/iovec_stub.go
+++ /dev/null
@@ -1,11 +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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
-
-package socket
-
-type iovec struct{}
-
-func (v *iovec) set(b []byte) {}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
deleted file mode 100644
index 2e80a9cb7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
+++ /dev/null
@@ -1,21 +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 file.
-
-// +build !linux,!netbsd
-
-package socket
-
-import "net"
-
-type mmsghdr struct{}
-
-type mmsghdrs []mmsghdr
-
-func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
- return nil
-}
-
-func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
deleted file mode 100644
index 3c42ea7ad..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
+++ /dev/null
@@ -1,42 +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 file.
-
-// +build linux netbsd
-
-package socket
-
-import "net"
-
-type mmsghdrs []mmsghdr
-
-func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
- for i := range hs {
- vs := make([]iovec, len(ms[i].Buffers))
- var sa []byte
- if parseFn != nil {
- sa = make([]byte, sizeofSockaddrInet6)
- }
- if marshalFn != nil {
- sa = marshalFn(ms[i].Addr)
- }
- hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa)
- }
- return nil
-}
-
-func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
- for i := range hs {
- ms[i].N = int(hs[i].Len)
- ms[i].NN = hs[i].Hdr.controllen()
- ms[i].Flags = hs[i].Hdr.flags()
- if parseFn != nil {
- var err error
- ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint)
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
deleted file mode 100644
index 5567afc88..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
+++ /dev/null
@@ -1,39 +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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package socket
-
-import "unsafe"
-
-func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
- for i := range vs {
- vs[i].set(bs[i])
- }
- h.setIov(vs)
- if len(oob) > 0 {
- h.Control = (*byte)(unsafe.Pointer(&oob[0]))
- h.Controllen = uint32(len(oob))
- }
- if sa != nil {
- h.Name = (*byte)(unsafe.Pointer(&sa[0]))
- h.Namelen = uint32(len(sa))
- }
-}
-
-func (h *msghdr) name() []byte {
- if h.Name != nil && h.Namelen > 0 {
- return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
- }
- return nil
-}
-
-func (h *msghdr) controllen() int {
- return int(h.Controllen)
-}
-
-func (h *msghdr) flags() int {
- return int(h.Flags)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
deleted file mode 100644
index b8c87b72b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
+++ /dev/null
@@ -1,16 +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 file.
-
-// +build darwin dragonfly freebsd netbsd
-
-package socket
-
-func (h *msghdr) setIov(vs []iovec) {
- l := len(vs)
- if l == 0 {
- return
- }
- h.Iov = &vs[0]
- h.Iovlen = int32(l)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
deleted file mode 100644
index 5a38798cc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
+++ /dev/null
@@ -1,36 +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 file.
-
-package socket
-
-import "unsafe"
-
-func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
- for i := range vs {
- vs[i].set(bs[i])
- }
- h.setIov(vs)
- if len(oob) > 0 {
- h.setControl(oob)
- }
- if sa != nil {
- h.Name = (*byte)(unsafe.Pointer(&sa[0]))
- h.Namelen = uint32(len(sa))
- }
-}
-
-func (h *msghdr) name() []byte {
- if h.Name != nil && h.Namelen > 0 {
- return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
- }
- return nil
-}
-
-func (h *msghdr) controllen() int {
- return int(h.Controllen)
-}
-
-func (h *msghdr) flags() int {
- return int(h.Flags)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
deleted file mode 100644
index a7a5987c8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
+++ /dev/null
@@ -1,24 +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 file.
-
-// +build arm mips mipsle 386
-// +build linux
-
-package socket
-
-import "unsafe"
-
-func (h *msghdr) setIov(vs []iovec) {
- l := len(vs)
- if l == 0 {
- return
- }
- h.Iov = &vs[0]
- h.Iovlen = uint32(l)
-}
-
-func (h *msghdr) setControl(b []byte) {
- h.Control = (*byte)(unsafe.Pointer(&b[0]))
- h.Controllen = uint32(len(b))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
deleted file mode 100644
index 610fc4f3b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
+++ /dev/null
@@ -1,24 +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 file.
-
-// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
-// +build linux
-
-package socket
-
-import "unsafe"
-
-func (h *msghdr) setIov(vs []iovec) {
- l := len(vs)
- if l == 0 {
- return
- }
- h.Iov = &vs[0]
- h.Iovlen = uint64(l)
-}
-
-func (h *msghdr) setControl(b []byte) {
- h.Control = (*byte)(unsafe.Pointer(&b[0]))
- h.Controllen = uint64(len(b))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
deleted file mode 100644
index 71a69e251..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
+++ /dev/null
@@ -1,14 +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 file.
-
-package socket
-
-func (h *msghdr) setIov(vs []iovec) {
- l := len(vs)
- if l == 0 {
- return
- }
- h.Iov = &vs[0]
- h.Iovlen = uint32(l)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
deleted file mode 100644
index 6465b2073..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
+++ /dev/null
@@ -1,36 +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 file.
-
-// +build amd64
-// +build solaris
-
-package socket
-
-import "unsafe"
-
-func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
- for i := range vs {
- vs[i].set(bs[i])
- }
- if len(vs) > 0 {
- h.Iov = &vs[0]
- h.Iovlen = int32(len(vs))
- }
- if len(oob) > 0 {
- h.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- h.Accrightslen = int32(len(oob))
- }
- if sa != nil {
- h.Name = (*byte)(unsafe.Pointer(&sa[0]))
- h.Namelen = uint32(len(sa))
- }
-}
-
-func (h *msghdr) controllen() int {
- return int(h.Accrightslen)
-}
-
-func (h *msghdr) flags() int {
- return int(NativeEndian.Uint32(h.Pad_cgo_2[:]))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
deleted file mode 100644
index 64e817335..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
+++ /dev/null
@@ -1,14 +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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
-
-package socket
-
-type msghdr struct{}
-
-func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {}
-func (h *msghdr) name() []byte { return nil }
-func (h *msghdr) controllen() int { return 0 }
-func (h *msghdr) flags() int { return 0 }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn.go
deleted file mode 100644
index d6871d55f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn.go
+++ /dev/null
@@ -1,66 +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 file.
-
-// +build go1.9
-
-package socket
-
-import (
- "errors"
- "net"
- "os"
- "syscall"
-)
-
-// A Conn represents a raw connection.
-type Conn struct {
- network string
- c syscall.RawConn
-}
-
-// NewConn returns a new raw connection.
-func NewConn(c net.Conn) (*Conn, error) {
- var err error
- var cc Conn
- switch c := c.(type) {
- case *net.TCPConn:
- cc.network = "tcp"
- cc.c, err = c.SyscallConn()
- case *net.UDPConn:
- cc.network = "udp"
- cc.c, err = c.SyscallConn()
- case *net.IPConn:
- cc.network = "ip"
- cc.c, err = c.SyscallConn()
- default:
- return nil, errors.New("unknown connection type")
- }
- if err != nil {
- return nil, err
- }
- return &cc, nil
-}
-
-func (o *Option) get(c *Conn, b []byte) (int, error) {
- var operr error
- var n int
- fn := func(s uintptr) {
- n, operr = getsockopt(s, o.Level, o.Name, b)
- }
- if err := c.c.Control(fn); err != nil {
- return 0, err
- }
- return n, os.NewSyscallError("getsockopt", operr)
-}
-
-func (o *Option) set(c *Conn, b []byte) error {
- var operr error
- fn := func(s uintptr) {
- operr = setsockopt(s, o.Level, o.Name, b)
- }
- if err := c.c.Control(fn); err != nil {
- return err
- }
- return os.NewSyscallError("setsockopt", operr)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
deleted file mode 100644
index 499164a3f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
+++ /dev/null
@@ -1,74 +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 file.
-
-// +build go1.9
-// +build linux
-
-package socket
-
-import (
- "net"
- "os"
- "syscall"
-)
-
-func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
- hs := make(mmsghdrs, len(ms))
- var parseFn func([]byte, string) (net.Addr, error)
- if c.network != "tcp" {
- parseFn = parseInetAddr
- }
- if err := hs.pack(ms, parseFn, nil); err != nil {
- return 0, err
- }
- var operr error
- var n int
- fn := func(s uintptr) bool {
- n, operr = recvmmsg(s, hs, flags)
- if operr == syscall.EAGAIN {
- return false
- }
- return true
- }
- if err := c.c.Read(fn); err != nil {
- return n, err
- }
- if operr != nil {
- return n, os.NewSyscallError("recvmmsg", operr)
- }
- if err := hs[:n].unpack(ms[:n], parseFn, c.network); err != nil {
- return n, err
- }
- return n, nil
-}
-
-func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
- hs := make(mmsghdrs, len(ms))
- var marshalFn func(net.Addr) []byte
- if c.network != "tcp" {
- marshalFn = marshalInetAddr
- }
- if err := hs.pack(ms, nil, marshalFn); err != nil {
- return 0, err
- }
- var operr error
- var n int
- fn := func(s uintptr) bool {
- n, operr = sendmmsg(s, hs, flags)
- if operr == syscall.EAGAIN {
- return false
- }
- return true
- }
- if err := c.c.Write(fn); err != nil {
- return n, err
- }
- if operr != nil {
- return n, os.NewSyscallError("sendmmsg", operr)
- }
- if err := hs[:n].unpack(ms[:n], nil, ""); err != nil {
- return n, err
- }
- return n, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
deleted file mode 100644
index b21d2e641..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
+++ /dev/null
@@ -1,77 +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 file.
-
-// +build go1.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package socket
-
-import (
- "os"
- "syscall"
-)
-
-func (c *Conn) recvMsg(m *Message, flags int) error {
- var h msghdr
- vs := make([]iovec, len(m.Buffers))
- var sa []byte
- if c.network != "tcp" {
- sa = make([]byte, sizeofSockaddrInet6)
- }
- h.pack(vs, m.Buffers, m.OOB, sa)
- var operr error
- var n int
- fn := func(s uintptr) bool {
- n, operr = recvmsg(s, &h, flags)
- if operr == syscall.EAGAIN {
- return false
- }
- return true
- }
- if err := c.c.Read(fn); err != nil {
- return err
- }
- if operr != nil {
- return os.NewSyscallError("recvmsg", operr)
- }
- if c.network != "tcp" {
- var err error
- m.Addr, err = parseInetAddr(sa[:], c.network)
- if err != nil {
- return err
- }
- }
- m.N = n
- m.NN = h.controllen()
- m.Flags = h.flags()
- return nil
-}
-
-func (c *Conn) sendMsg(m *Message, flags int) error {
- var h msghdr
- vs := make([]iovec, len(m.Buffers))
- var sa []byte
- if m.Addr != nil {
- sa = marshalInetAddr(m.Addr)
- }
- h.pack(vs, m.Buffers, m.OOB, sa)
- var operr error
- var n int
- fn := func(s uintptr) bool {
- n, operr = sendmsg(s, &h, flags)
- if operr == syscall.EAGAIN {
- return false
- }
- return true
- }
- if err := c.c.Write(fn); err != nil {
- return err
- }
- if operr != nil {
- return os.NewSyscallError("sendmsg", operr)
- }
- m.N = n
- m.NN = len(m.OOB)
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
deleted file mode 100644
index f78832aa4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
+++ /dev/null
@@ -1,18 +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 file.
-
-// +build go1.9
-// +build !linux
-
-package socket
-
-import "errors"
-
-func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
deleted file mode 100644
index 96733cbe1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
+++ /dev/null
@@ -1,18 +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 file.
-
-// +build go1.9
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package socket
-
-import "errors"
-
-func (c *Conn) recvMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
-
-func (c *Conn) sendMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
deleted file mode 100644
index d2add1a0a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
+++ /dev/null
@@ -1,25 +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 file.
-
-// +build !go1.9
-
-package socket
-
-import "errors"
-
-func (c *Conn) recvMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
-
-func (c *Conn) sendMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
-
-func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/reflect.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/reflect.go
deleted file mode 100644
index bb179f11d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/reflect.go
+++ /dev/null
@@ -1,62 +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 file.
-
-// +build !go1.9
-
-package socket
-
-import (
- "errors"
- "net"
- "os"
- "reflect"
- "runtime"
-)
-
-// A Conn represents a raw connection.
-type Conn struct {
- c net.Conn
-}
-
-// NewConn returns a new raw connection.
-func NewConn(c net.Conn) (*Conn, error) {
- return &Conn{c: c}, nil
-}
-
-func (o *Option) get(c *Conn, b []byte) (int, error) {
- s, err := socketOf(c.c)
- if err != nil {
- return 0, err
- }
- n, err := getsockopt(s, o.Level, o.Name, b)
- return n, os.NewSyscallError("getsockopt", err)
-}
-
-func (o *Option) set(c *Conn, b []byte) error {
- s, err := socketOf(c.c)
- if err != nil {
- return err
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, o.Level, o.Name, b))
-}
-
-func socketOf(c net.Conn) (uintptr, error) {
- switch c.(type) {
- case *net.TCPConn, *net.UDPConn, *net.IPConn:
- v := reflect.ValueOf(c)
- switch e := v.Elem(); e.Kind() {
- case reflect.Struct:
- fd := e.FieldByName("conn").FieldByName("fd")
- switch e := fd.Elem(); e.Kind() {
- case reflect.Struct:
- sysfd := e.FieldByName("sysfd")
- if runtime.GOOS == "windows" {
- return uintptr(sysfd.Uint()), nil
- }
- return uintptr(sysfd.Int()), nil
- }
- }
- }
- return 0, errors.New("invalid type")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket.go
deleted file mode 100644
index 729dea14b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket.go
+++ /dev/null
@@ -1,285 +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 file.
-
-// Package socket provides a portable interface for socket system
-// calls.
-package socket // import "golang.org/x/net/internal/socket"
-
-import (
- "errors"
- "net"
- "unsafe"
-)
-
-// An Option represents a sticky socket option.
-type Option struct {
- Level int // level
- Name int // name; must be equal or greater than 1
- Len int // length of value in bytes; must be equal or greater than 1
-}
-
-// Get reads a value for the option from the kernel.
-// It returns the number of bytes written into b.
-func (o *Option) Get(c *Conn, b []byte) (int, error) {
- if o.Name < 1 || o.Len < 1 {
- return 0, errors.New("invalid option")
- }
- if len(b) < o.Len {
- return 0, errors.New("short buffer")
- }
- return o.get(c, b)
-}
-
-// GetInt returns an integer value for the option.
-//
-// The Len field of Option must be either 1 or 4.
-func (o *Option) GetInt(c *Conn) (int, error) {
- if o.Len != 1 && o.Len != 4 {
- return 0, errors.New("invalid option")
- }
- var b []byte
- var bb [4]byte
- if o.Len == 1 {
- b = bb[:1]
- } else {
- b = bb[:4]
- }
- n, err := o.get(c, b)
- if err != nil {
- return 0, err
- }
- if n != o.Len {
- return 0, errors.New("invalid option length")
- }
- if o.Len == 1 {
- return int(b[0]), nil
- }
- return int(NativeEndian.Uint32(b[:4])), nil
-}
-
-// Set writes the option and value to the kernel.
-func (o *Option) Set(c *Conn, b []byte) error {
- if o.Name < 1 || o.Len < 1 {
- return errors.New("invalid option")
- }
- if len(b) < o.Len {
- return errors.New("short buffer")
- }
- return o.set(c, b)
-}
-
-// SetInt writes the option and value to the kernel.
-//
-// The Len field of Option must be either 1 or 4.
-func (o *Option) SetInt(c *Conn, v int) error {
- if o.Len != 1 && o.Len != 4 {
- return errors.New("invalid option")
- }
- var b []byte
- if o.Len == 1 {
- b = []byte{byte(v)}
- } else {
- var bb [4]byte
- NativeEndian.PutUint32(bb[:o.Len], uint32(v))
- b = bb[:4]
- }
- return o.set(c, b)
-}
-
-func controlHeaderLen() int {
- return roundup(sizeofCmsghdr)
-}
-
-func controlMessageLen(dataLen int) int {
- return roundup(sizeofCmsghdr) + dataLen
-}
-
-// ControlMessageSpace returns the whole length of control message.
-func ControlMessageSpace(dataLen int) int {
- return roundup(sizeofCmsghdr) + roundup(dataLen)
-}
-
-// A ControlMessage represents the head message in a stream of control
-// messages.
-//
-// A control message comprises of a header, data and a few padding
-// fields to conform to the interface to the kernel.
-//
-// See RFC 3542 for further information.
-type ControlMessage []byte
-
-// Data returns the data field of the control message at the head on
-// w.
-func (m ControlMessage) Data(dataLen int) []byte {
- l := controlHeaderLen()
- if len(m) < l || len(m) < l+dataLen {
- return nil
- }
- return m[l : l+dataLen]
-}
-
-// Next returns the control message at the next on w.
-//
-// Next works only for standard control messages.
-func (m ControlMessage) Next(dataLen int) ControlMessage {
- l := ControlMessageSpace(dataLen)
- if len(m) < l {
- return nil
- }
- return m[l:]
-}
-
-// MarshalHeader marshals the header fields of the control message at
-// the head on w.
-func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error {
- if len(m) < controlHeaderLen() {
- return errors.New("short message")
- }
- h := (*cmsghdr)(unsafe.Pointer(&m[0]))
- h.set(controlMessageLen(dataLen), lvl, typ)
- return nil
-}
-
-// ParseHeader parses and returns the header fields of the control
-// message at the head on w.
-func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) {
- l := controlHeaderLen()
- if len(m) < l {
- return 0, 0, 0, errors.New("short message")
- }
- h := (*cmsghdr)(unsafe.Pointer(&m[0]))
- return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil
-}
-
-// Marshal marshals the control message at the head on w, and returns
-// the next control message.
-func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) {
- l := len(data)
- if len(m) < ControlMessageSpace(l) {
- return nil, errors.New("short message")
- }
- h := (*cmsghdr)(unsafe.Pointer(&m[0]))
- h.set(controlMessageLen(l), lvl, typ)
- if l > 0 {
- copy(m.Data(l), data)
- }
- return m.Next(l), nil
-}
-
-// Parse parses w as a single or multiple control messages.
-//
-// Parse works for both standard and compatible messages.
-func (m ControlMessage) Parse() ([]ControlMessage, error) {
- var ms []ControlMessage
- for len(m) >= controlHeaderLen() {
- h := (*cmsghdr)(unsafe.Pointer(&m[0]))
- l := h.len()
- if l <= 0 {
- return nil, errors.New("invalid header length")
- }
- if uint64(l) < uint64(controlHeaderLen()) {
- return nil, errors.New("invalid message length")
- }
- if uint64(l) > uint64(len(m)) {
- return nil, errors.New("short buffer")
- }
- // On message reception:
- //
- // |<- ControlMessageSpace --------------->|
- // |<- controlMessageLen ---------->| |
- // |<- controlHeaderLen ->| | |
- // +---------------+------+---------+------+
- // | Header | PadH | Data | PadD |
- // +---------------+------+---------+------+
- //
- // On compatible message reception:
- //
- // | ... |<- controlMessageLen ----------->|
- // | ... |<- controlHeaderLen ->| |
- // +-----+---------------+------+----------+
- // | ... | Header | PadH | Data |
- // +-----+---------------+------+----------+
- ms = append(ms, ControlMessage(m[:l]))
- ll := l - controlHeaderLen()
- if len(m) >= ControlMessageSpace(ll) {
- m = m[ControlMessageSpace(ll):]
- } else {
- m = m[controlMessageLen(ll):]
- }
- }
- return ms, nil
-}
-
-// NewControlMessage returns a new stream of control messages.
-func NewControlMessage(dataLen []int) ControlMessage {
- var l int
- for i := range dataLen {
- l += ControlMessageSpace(dataLen[i])
- }
- return make([]byte, l)
-}
-
-// A Message represents an IO message.
-type Message struct {
- // When writing, the Buffers field must contain at least one
- // byte to write.
- // When reading, the Buffers field will always contain a byte
- // to read.
- Buffers [][]byte
-
- // OOB contains protocol-specific control or miscellaneous
- // ancillary data known as out-of-band data.
- OOB []byte
-
- // Addr specifies a destination address when writing.
- // It can be nil when the underlying protocol of the raw
- // connection uses connection-oriented communication.
- // After a successful read, it may contain the source address
- // on the received packet.
- Addr net.Addr
-
- N int // # of bytes read or written from/to Buffers
- NN int // # of bytes read or written from/to OOB
- Flags int // protocol-specific information on the received message
-}
-
-// RecvMsg wraps recvmsg system call.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_PEEK.
-func (c *Conn) RecvMsg(m *Message, flags int) error {
- return c.recvMsg(m, flags)
-}
-
-// SendMsg wraps sendmsg system call.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_DONTROUTE.
-func (c *Conn) SendMsg(m *Message, flags int) error {
- return c.sendMsg(m, flags)
-}
-
-// RecvMsgs wraps recvmmsg system call.
-//
-// It returns the number of processed messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_PEEK.
-//
-// Only Linux supports this.
-func (c *Conn) RecvMsgs(ms []Message, flags int) (int, error) {
- return c.recvMsgs(ms, flags)
-}
-
-// SendMsgs wraps sendmmsg system call.
-//
-// It returns the number of processed messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_DONTROUTE.
-//
-// Only Linux supports this.
-func (c *Conn) SendMsgs(ms []Message, flags int) (int, error) {
- return c.sendMsgs(ms, flags)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go
deleted file mode 100644
index c4edd4a8d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go
+++ /dev/null
@@ -1,259 +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 file.
-
-// +build go1.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package socket_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/internal/socket"
-)
-
-type mockControl struct {
- Level int
- Type int
- Data []byte
-}
-
-func TestControlMessage(t *testing.T) {
- for _, tt := range []struct {
- cs []mockControl
- }{
- {
- []mockControl{
- {Level: 1, Type: 1},
- },
- },
- {
- []mockControl{
- {Level: 2, Type: 2, Data: []byte{0xfe}},
- },
- },
- {
- []mockControl{
- {Level: 3, Type: 3, Data: []byte{0xfe, 0xff, 0xff, 0xfe}},
- },
- },
- {
- []mockControl{
- {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}},
- },
- },
- {
- []mockControl{
- {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}},
- {Level: 2, Type: 2, Data: []byte{0xfe}},
- },
- },
- } {
- var w []byte
- var tailPadLen int
- mm := socket.NewControlMessage([]int{0})
- for i, c := range tt.cs {
- m := socket.NewControlMessage([]int{len(c.Data)})
- l := len(m) - len(mm)
- if i == len(tt.cs)-1 && l > len(c.Data) {
- tailPadLen = l - len(c.Data)
- }
- w = append(w, m...)
- }
-
- var err error
- ww := make([]byte, len(w))
- copy(ww, w)
- m := socket.ControlMessage(ww)
- for _, c := range tt.cs {
- if err = m.MarshalHeader(c.Level, c.Type, len(c.Data)); err != nil {
- t.Fatalf("(%v).MarshalHeader() = %v", tt.cs, err)
- }
- copy(m.Data(len(c.Data)), c.Data)
- m = m.Next(len(c.Data))
- }
- m = socket.ControlMessage(w)
- for _, c := range tt.cs {
- m, err = m.Marshal(c.Level, c.Type, c.Data)
- if err != nil {
- t.Fatalf("(%v).Marshal() = %v", tt.cs, err)
- }
- }
- if !bytes.Equal(ww, w) {
- t.Fatalf("got %#v; want %#v", ww, w)
- }
-
- ws := [][]byte{w}
- if tailPadLen > 0 {
- // Test a message with no tail padding.
- nopad := w[:len(w)-tailPadLen]
- ws = append(ws, [][]byte{nopad}...)
- }
- for _, w := range ws {
- ms, err := socket.ControlMessage(w).Parse()
- if err != nil {
- t.Fatalf("(%v).Parse() = %v", tt.cs, err)
- }
- for i, m := range ms {
- lvl, typ, dataLen, err := m.ParseHeader()
- if err != nil {
- t.Fatalf("(%v).ParseHeader() = %v", tt.cs, err)
- }
- if lvl != tt.cs[i].Level || typ != tt.cs[i].Type || dataLen != len(tt.cs[i].Data) {
- t.Fatalf("%v: got %d, %d, %d; want %d, %d, %d", tt.cs[i], lvl, typ, dataLen, tt.cs[i].Level, tt.cs[i].Type, len(tt.cs[i].Data))
- }
- }
- }
- }
-}
-
-func TestUDP(t *testing.T) {
- c, err := nettest.NewLocalPacketListener("udp")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- cc, err := socket.NewConn(c.(net.Conn))
- if err != nil {
- t.Fatal(err)
- }
-
- t.Run("Message", func(t *testing.T) {
- data := []byte("HELLO-R-U-THERE")
- wm := socket.Message{
- Buffers: bytes.SplitAfter(data, []byte("-")),
- Addr: c.LocalAddr(),
- }
- if err := cc.SendMsg(&wm, 0); err != nil {
- t.Fatal(err)
- }
- b := make([]byte, 32)
- rm := socket.Message{
- Buffers: [][]byte{b[:1], b[1:3], b[3:7], b[7:11], b[11:]},
- }
- if err := cc.RecvMsg(&rm, 0); err != nil {
- t.Fatal(err)
- }
- if !bytes.Equal(b[:rm.N], data) {
- t.Fatalf("got %#v; want %#v", b[:rm.N], data)
- }
- })
- switch runtime.GOOS {
- case "android", "linux":
- t.Run("Messages", func(t *testing.T) {
- data := []byte("HELLO-R-U-THERE")
- wmbs := bytes.SplitAfter(data, []byte("-"))
- wms := []socket.Message{
- {Buffers: wmbs[:1], Addr: c.LocalAddr()},
- {Buffers: wmbs[1:], Addr: c.LocalAddr()},
- }
- n, err := cc.SendMsgs(wms, 0)
- if err != nil {
- t.Fatal(err)
- }
- if n != len(wms) {
- t.Fatalf("got %d; want %d", n, len(wms))
- }
- b := make([]byte, 32)
- rmbs := [][][]byte{{b[:len(wmbs[0])]}, {b[len(wmbs[0]):]}}
- rms := []socket.Message{
- {Buffers: rmbs[0]},
- {Buffers: rmbs[1]},
- }
- n, err = cc.RecvMsgs(rms, 0)
- if err != nil {
- t.Fatal(err)
- }
- if n != len(rms) {
- t.Fatalf("got %d; want %d", n, len(rms))
- }
- nn := 0
- for i := 0; i < n; i++ {
- nn += rms[i].N
- }
- if !bytes.Equal(b[:nn], data) {
- t.Fatalf("got %#v; want %#v", b[:nn], data)
- }
- })
- }
-
- // The behavior of transmission for zero byte paylaod depends
- // on each platform implementation. Some may transmit only
- // protocol header and options, other may transmit nothing.
- // We test only that SendMsg and SendMsgs will not crash with
- // empty buffers.
- wm := socket.Message{
- Buffers: [][]byte{{}},
- Addr: c.LocalAddr(),
- }
- cc.SendMsg(&wm, 0)
- wms := []socket.Message{
- {Buffers: [][]byte{{}}, Addr: c.LocalAddr()},
- }
- cc.SendMsgs(wms, 0)
-}
-
-func BenchmarkUDP(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- cc, err := socket.NewConn(c.(net.Conn))
- if err != nil {
- b.Fatal(err)
- }
- data := []byte("HELLO-R-U-THERE")
- wm := socket.Message{
- Buffers: [][]byte{data},
- Addr: c.LocalAddr(),
- }
- rm := socket.Message{
- Buffers: [][]byte{make([]byte, 128)},
- OOB: make([]byte, 128),
- }
-
- for M := 1; M <= 1<<9; M = M << 1 {
- b.Run(fmt.Sprintf("Iter-%d", M), func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- for j := 0; j < M; j++ {
- if err := cc.SendMsg(&wm, 0); err != nil {
- b.Fatal(err)
- }
- if err := cc.RecvMsg(&rm, 0); err != nil {
- b.Fatal(err)
- }
- }
- }
- })
- switch runtime.GOOS {
- case "android", "linux":
- wms := make([]socket.Message, M)
- for i := range wms {
- wms[i].Buffers = [][]byte{data}
- wms[i].Addr = c.LocalAddr()
- }
- rms := make([]socket.Message, M)
- for i := range rms {
- rms[i].Buffers = [][]byte{make([]byte, 128)}
- rms[i].OOB = make([]byte, 128)
- }
- b.Run(fmt.Sprintf("Batch-%d", M), func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := cc.SendMsgs(wms, 0); err != nil {
- b.Fatal(err)
- }
- if _, err := cc.RecvMsgs(rms, 0); err != nil {
- b.Fatal(err)
- }
- }
- })
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_test.go
deleted file mode 100644
index bf3751b5e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/socket_test.go
+++ /dev/null
@@ -1,46 +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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package socket_test
-
-import (
- "net"
- "runtime"
- "syscall"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/internal/socket"
-)
-
-func TestSocket(t *testing.T) {
- t.Run("Option", func(t *testing.T) {
- testSocketOption(t, &socket.Option{Level: syscall.SOL_SOCKET, Name: syscall.SO_RCVBUF, Len: 4})
- })
-}
-
-func testSocketOption(t *testing.T, so *socket.Option) {
- c, err := nettest.NewLocalPacketListener("udp")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- cc, err := socket.NewConn(c.(net.Conn))
- if err != nil {
- t.Fatal(err)
- }
- const N = 2048
- if err := so.SetInt(cc, N); err != nil {
- t.Fatal(err)
- }
- n, err := so.GetInt(cc)
- if err != nil {
- t.Fatal(err)
- }
- if n < N {
- t.Fatalf("got %d; want greater than or equal to %d", n, N)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys.go
deleted file mode 100644
index 4f0eead13..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys.go
+++ /dev/null
@@ -1,33 +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 file.
-
-package socket
-
-import (
- "encoding/binary"
- "unsafe"
-)
-
-var (
- // NativeEndian is the machine native endian implementation of
- // ByteOrder.
- NativeEndian binary.ByteOrder
-
- kernelAlign int
-)
-
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- NativeEndian = binary.LittleEndian
- } else {
- NativeEndian = binary.BigEndian
- }
- kernelAlign = probeProtocolStack()
-}
-
-func roundup(l int) int {
- return (l + kernelAlign - 1) & ^(kernelAlign - 1)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsd.go
deleted file mode 100644
index f13e14ff3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsd.go
+++ /dev/null
@@ -1,17 +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 file.
-
-// +build darwin dragonfly freebsd openbsd
-
-package socket
-
-import "errors"
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
deleted file mode 100644
index f723fa36a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
+++ /dev/null
@@ -1,14 +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 file.
-
-// +build freebsd netbsd openbsd
-
-package socket
-
-import "unsafe"
-
-func probeProtocolStack() int {
- var p uintptr
- return int(unsafe.Sizeof(p))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_darwin.go
deleted file mode 100644
index b17d223bf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_darwin.go
+++ /dev/null
@@ -1,7 +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 file.
-
-package socket
-
-func probeProtocolStack() int { return 4 }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
deleted file mode 100644
index b17d223bf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
+++ /dev/null
@@ -1,7 +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 file.
-
-package socket
-
-func probeProtocolStack() int { return 4 }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux.go
deleted file mode 100644
index 1559521e0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux.go
+++ /dev/null
@@ -1,27 +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 file.
-
-// +build linux,!s390x,!386
-
-package socket
-
-import (
- "syscall"
- "unsafe"
-)
-
-func probeProtocolStack() int {
- var p uintptr
- return int(unsafe.Sizeof(p))
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
deleted file mode 100644
index 235b2cc08..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
+++ /dev/null
@@ -1,55 +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 file.
-
-package socket
-
-import (
- "syscall"
- "unsafe"
-)
-
-func probeProtocolStack() int { return 4 }
-
-const (
- sysSETSOCKOPT = 0xe
- sysGETSOCKOPT = 0xf
- sysSENDMSG = 0x10
- sysRECVMSG = 0x11
- sysRECVMMSG = 0x13
- sysSENDMMSG = 0x14
-)
-
-func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
-func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- l := uint32(len(b))
- _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
- return int(l), errnoErr(errno)
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
- return errnoErr(errno)
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
deleted file mode 100644
index 93e7d75ec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 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 file.
-
-#include "textflag.h"
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- JMP syscall·rawsocketcall(SB)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
deleted file mode 100644
index 9decee2e5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x12b
- sysSENDMMSG = 0x133
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
deleted file mode 100644
index d753b436d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x16d
- sysSENDMMSG = 0x176
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
deleted file mode 100644
index b67089436..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0xf3
- sysSENDMMSG = 0x10d
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
deleted file mode 100644
index 9c0d74014..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x10ef
- sysSENDMMSG = 0x10f7
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
deleted file mode 100644
index 071a4aba8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x14ae
- sysSENDMMSG = 0x14b6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
deleted file mode 100644
index 071a4aba8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x14ae
- sysSENDMMSG = 0x14b6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
deleted file mode 100644
index 9c0d74014..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x10ef
- sysSENDMMSG = 0x10f7
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
deleted file mode 100644
index 21c1e3f00..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x157
- sysSENDMMSG = 0x15d
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
deleted file mode 100644
index 21c1e3f00..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
+++ /dev/null
@@ -1,10 +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 file.
-
-package socket
-
-const (
- sysRECVMMSG = 0x157
- sysSENDMMSG = 0x15d
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
deleted file mode 100644
index 327979efb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
+++ /dev/null
@@ -1,55 +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 file.
-
-package socket
-
-import (
- "syscall"
- "unsafe"
-)
-
-func probeProtocolStack() int { return 8 }
-
-const (
- sysSETSOCKOPT = 0xe
- sysGETSOCKOPT = 0xf
- sysSENDMSG = 0x10
- sysRECVMSG = 0x11
- sysRECVMMSG = 0x13
- sysSENDMMSG = 0x14
-)
-
-func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
-func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- l := uint32(len(b))
- _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
- return int(l), errnoErr(errno)
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
- return errnoErr(errno)
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
deleted file mode 100644
index 06d75628c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
+++ /dev/null
@@ -1,11 +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 file.
-
-#include "textflag.h"
-
-TEXT ·socketcall(SB),NOSPLIT,$0-72
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-72
- JMP syscall·rawsocketcall(SB)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
deleted file mode 100644
index 431851c12..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
+++ /dev/null
@@ -1,25 +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 file.
-
-package socket
-
-import (
- "syscall"
- "unsafe"
-)
-
-const (
- sysRECVMMSG = 0x1db
- sysSENDMMSG = 0x1dc
-)
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
- return int(n), errnoErr(errno)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_posix.go
deleted file mode 100644
index dc130c27e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_posix.go
+++ /dev/null
@@ -1,168 +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 file.
-
-// +build go1.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package socket
-
-import (
- "encoding/binary"
- "errors"
- "net"
- "runtime"
- "strconv"
- "sync"
- "time"
-)
-
-func marshalInetAddr(a net.Addr) []byte {
- switch a := a.(type) {
- case *net.TCPAddr:
- return marshalSockaddr(a.IP, a.Port, a.Zone)
- case *net.UDPAddr:
- return marshalSockaddr(a.IP, a.Port, a.Zone)
- case *net.IPAddr:
- return marshalSockaddr(a.IP, 0, a.Zone)
- default:
- return nil
- }
-}
-
-func marshalSockaddr(ip net.IP, port int, zone string) []byte {
- if ip4 := ip.To4(); ip4 != nil {
- b := make([]byte, sizeofSockaddrInet)
- switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
- NativeEndian.PutUint16(b[:2], uint16(sysAF_INET))
- default:
- b[0] = sizeofSockaddrInet
- b[1] = sysAF_INET
- }
- binary.BigEndian.PutUint16(b[2:4], uint16(port))
- copy(b[4:8], ip4)
- return b
- }
- if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil {
- b := make([]byte, sizeofSockaddrInet6)
- switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
- NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6))
- default:
- b[0] = sizeofSockaddrInet6
- b[1] = sysAF_INET6
- }
- binary.BigEndian.PutUint16(b[2:4], uint16(port))
- copy(b[8:24], ip6)
- if zone != "" {
- NativeEndian.PutUint32(b[24:28], uint32(zoneCache.index(zone)))
- }
- return b
- }
- return nil
-}
-
-func parseInetAddr(b []byte, network string) (net.Addr, error) {
- if len(b) < 2 {
- return nil, errors.New("invalid address")
- }
- var af int
- switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
- af = int(NativeEndian.Uint16(b[:2]))
- default:
- af = int(b[1])
- }
- var ip net.IP
- var zone string
- if af == sysAF_INET {
- if len(b) < sizeofSockaddrInet {
- return nil, errors.New("short address")
- }
- ip = make(net.IP, net.IPv4len)
- copy(ip, b[4:8])
- }
- if af == sysAF_INET6 {
- if len(b) < sizeofSockaddrInet6 {
- return nil, errors.New("short address")
- }
- ip = make(net.IP, net.IPv6len)
- copy(ip, b[8:24])
- if id := int(NativeEndian.Uint32(b[24:28])); id > 0 {
- zone = zoneCache.name(id)
- }
- }
- switch network {
- case "tcp", "tcp4", "tcp6":
- return &net.TCPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
- case "udp", "udp4", "udp6":
- return &net.UDPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
- default:
- return &net.IPAddr{IP: ip, Zone: zone}, nil
- }
-}
-
-// An ipv6ZoneCache represents a cache holding partial network
-// interface information. It is used for reducing the cost of IPv6
-// addressing scope zone resolution.
-//
-// Multiple names sharing the index are managed by first-come
-// first-served basis for consistency.
-type ipv6ZoneCache struct {
- sync.RWMutex // guard the following
- lastFetched time.Time // last time routing information was fetched
- toIndex map[string]int // interface name to its index
- toName map[int]string // interface index to its name
-}
-
-var zoneCache = ipv6ZoneCache{
- toIndex: make(map[string]int),
- toName: make(map[int]string),
-}
-
-func (zc *ipv6ZoneCache) update(ift []net.Interface) {
- zc.Lock()
- defer zc.Unlock()
- now := time.Now()
- if zc.lastFetched.After(now.Add(-60 * time.Second)) {
- return
- }
- zc.lastFetched = now
- if len(ift) == 0 {
- var err error
- if ift, err = net.Interfaces(); err != nil {
- return
- }
- }
- zc.toIndex = make(map[string]int, len(ift))
- zc.toName = make(map[int]string, len(ift))
- for _, ifi := range ift {
- zc.toIndex[ifi.Name] = ifi.Index
- if _, ok := zc.toName[ifi.Index]; !ok {
- zc.toName[ifi.Index] = ifi.Name
- }
- }
-}
-
-func (zc *ipv6ZoneCache) name(zone int) string {
- zoneCache.update(nil)
- zoneCache.RLock()
- defer zoneCache.RUnlock()
- name, ok := zoneCache.toName[zone]
- if !ok {
- name = strconv.Itoa(zone)
- }
- return name
-}
-
-func (zc *ipv6ZoneCache) index(zone string) int {
- zoneCache.update(nil)
- zoneCache.RLock()
- defer zoneCache.RUnlock()
- index, ok := zoneCache.toIndex[zone]
- if !ok {
- index, _ = strconv.Atoi(zone)
- }
- return index
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris.go
deleted file mode 100644
index cced74e60..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris.go
+++ /dev/null
@@ -1,71 +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 file.
-
-package socket
-
-import (
- "errors"
- "runtime"
- "syscall"
- "unsafe"
-)
-
-func probeProtocolStack() int {
- switch runtime.GOARCH {
- case "amd64":
- return 4
- default:
- var p uintptr
- return int(unsafe.Sizeof(p))
- }
-}
-
-//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
-//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
-//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
-//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
-
-//go:linkname procGetsockopt libc___xnet_getsockopt
-//go:linkname procSetsockopt libc_setsockopt
-//go:linkname procRecvmsg libc___xnet_recvmsg
-//go:linkname procSendmsg libc___xnet_sendmsg
-
-var (
- procGetsockopt uintptr
- procSetsockopt uintptr
- procRecvmsg uintptr
- procSendmsg uintptr
-)
-
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- l := uint32(len(b))
- _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
- return int(l), errnoErr(errno)
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
- return errnoErr(errno)
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procRecvmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSendmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
- return int(n), errnoErr(errno)
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
deleted file mode 100644
index a18ac5ed7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2016 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 file.
-
-#include "textflag.h"
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·sysvicall6(SB)
-
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_stub.go
deleted file mode 100644
index d9f06d00e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_stub.go
+++ /dev/null
@@ -1,64 +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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package socket
-
-import (
- "errors"
- "net"
- "runtime"
- "unsafe"
-)
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-func probeProtocolStack() int {
- switch runtime.GOARCH {
- case "amd64p32", "mips64p32":
- return 4
- default:
- var p uintptr
- return int(unsafe.Sizeof(p))
- }
-}
-
-func marshalInetAddr(ip net.IP, port int, zone string) []byte {
- return nil
-}
-
-func parseInetAddr(b []byte, network string) (net.Addr, error) {
- return nil, errors.New("not implemented")
-}
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- return errors.New("not implemented")
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_unix.go
deleted file mode 100644
index 18eba3085..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_unix.go
+++ /dev/null
@@ -1,33 +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 file.
-
-// +build darwin dragonfly freebsd linux,!s390x,!386 netbsd openbsd
-
-package socket
-
-import (
- "syscall"
- "unsafe"
-)
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- l := uint32(len(b))
- _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
- return int(l), errnoErr(errno)
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
- return errnoErr(errno)
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
- return int(n), errnoErr(errno)
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
- return int(n), errnoErr(errno)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_windows.go
deleted file mode 100644
index 54a470ebe..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/sys_windows.go
+++ /dev/null
@@ -1,70 +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 file.
-
-package socket
-
-import (
- "errors"
- "syscall"
- "unsafe"
-)
-
-func probeProtocolStack() int {
- var p uintptr
- return int(unsafe.Sizeof(p))
-}
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x17
-
- sysSOCK_RAW = 0x3
-)
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
-
-func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- l := uint32(len(b))
- err := syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), (*int32)(unsafe.Pointer(&l)))
- return int(l), err
-}
-
-func setsockopt(s uintptr, level, name int, b []byte) error {
- return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), int32(len(b)))
-}
-
-func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
deleted file mode 100644
index 26f8feff3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
deleted file mode 100644
index e2987f7db..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
deleted file mode 100644
index 26f8feff3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
deleted file mode 100644
index c582abd57..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_dragonfly.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
deleted file mode 100644
index 04a24886c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
deleted file mode 100644
index 35c7cb9c9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
deleted file mode 100644
index 04a24886c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
deleted file mode 100644
index 430206930..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
deleted file mode 100644
index 430206930..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
deleted file mode 100644
index 430206930..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
deleted file mode 100644
index 430206930..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
deleted file mode 100644
index 1502f6c55..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint64
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
deleted file mode 100644
index db60491fe..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
deleted file mode 100644
index 2a1a79985..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type mmsghdr struct {
- Hdr msghdr
- Len uint32
- Pad_cgo_0 [4]byte
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
deleted file mode 100644
index 206ea2d11..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
deleted file mode 100644
index 1c836361e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
deleted file mode 100644
index a6c0bf464..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen uint32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
deleted file mode 100644
index 1c836361e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
-type iovec struct {
- Base *byte
- Len uint32
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Iov *iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
deleted file mode 100644
index 327c63290..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_solaris.go
-
-package socket
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1a
-
- sysSOCK_RAW = 0x4
-)
-
-type iovec struct {
- Base *int8
- Len uint64
-}
-
-type msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *iovec
- Iovlen int32
- Pad_cgo_1 [4]byte
- Accrights *int8
- Accrightslen int32
- Pad_cgo_2 [4]byte
-}
-
-type cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
-}
-
-const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
-
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x20
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries.go
deleted file mode 100644
index 685f0e7ea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries.go
+++ /dev/null
@@ -1,525 +0,0 @@
-// Copyright 2015 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 file.
-
-// Package timeseries implements a time series structure for stats collection.
-package timeseries // import "golang.org/x/net/internal/timeseries"
-
-import (
- "fmt"
- "log"
- "time"
-)
-
-const (
- timeSeriesNumBuckets = 64
- minuteHourSeriesNumBuckets = 60
-)
-
-var timeSeriesResolutions = []time.Duration{
- 1 * time.Second,
- 10 * time.Second,
- 1 * time.Minute,
- 10 * time.Minute,
- 1 * time.Hour,
- 6 * time.Hour,
- 24 * time.Hour, // 1 day
- 7 * 24 * time.Hour, // 1 week
- 4 * 7 * 24 * time.Hour, // 4 weeks
- 16 * 7 * 24 * time.Hour, // 16 weeks
-}
-
-var minuteHourSeriesResolutions = []time.Duration{
- 1 * time.Second,
- 1 * time.Minute,
-}
-
-// An Observable is a kind of data that can be aggregated in a time series.
-type Observable interface {
- Multiply(ratio float64) // Multiplies the data in self by a given ratio
- Add(other Observable) // Adds the data from a different observation to self
- Clear() // Clears the observation so it can be reused.
- CopyFrom(other Observable) // Copies the contents of a given observation to self
-}
-
-// Float attaches the methods of Observable to a float64.
-type Float float64
-
-// NewFloat returns a Float.
-func NewFloat() Observable {
- f := Float(0)
- return &f
-}
-
-// String returns the float as a string.
-func (f *Float) String() string { return fmt.Sprintf("%g", f.Value()) }
-
-// Value returns the float's value.
-func (f *Float) Value() float64 { return float64(*f) }
-
-func (f *Float) Multiply(ratio float64) { *f *= Float(ratio) }
-
-func (f *Float) Add(other Observable) {
- o := other.(*Float)
- *f += *o
-}
-
-func (f *Float) Clear() { *f = 0 }
-
-func (f *Float) CopyFrom(other Observable) {
- o := other.(*Float)
- *f = *o
-}
-
-// A Clock tells the current time.
-type Clock interface {
- Time() time.Time
-}
-
-type defaultClock int
-
-var defaultClockInstance defaultClock
-
-func (defaultClock) Time() time.Time { return time.Now() }
-
-// Information kept per level. Each level consists of a circular list of
-// observations. The start of the level may be derived from end and the
-// len(buckets) * sizeInMillis.
-type tsLevel struct {
- oldest int // index to oldest bucketed Observable
- newest int // index to newest bucketed Observable
- end time.Time // end timestamp for this level
- size time.Duration // duration of the bucketed Observable
- buckets []Observable // collections of observations
- provider func() Observable // used for creating new Observable
-}
-
-func (l *tsLevel) Clear() {
- l.oldest = 0
- l.newest = len(l.buckets) - 1
- l.end = time.Time{}
- for i := range l.buckets {
- if l.buckets[i] != nil {
- l.buckets[i].Clear()
- l.buckets[i] = nil
- }
- }
-}
-
-func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) {
- l.size = size
- l.provider = f
- l.buckets = make([]Observable, numBuckets)
-}
-
-// Keeps a sequence of levels. Each level is responsible for storing data at
-// a given resolution. For example, the first level stores data at a one
-// minute resolution while the second level stores data at a one hour
-// resolution.
-
-// Each level is represented by a sequence of buckets. Each bucket spans an
-// interval equal to the resolution of the level. New observations are added
-// to the last bucket.
-type timeSeries struct {
- provider func() Observable // make more Observable
- numBuckets int // number of buckets in each level
- levels []*tsLevel // levels of bucketed Observable
- lastAdd time.Time // time of last Observable tracked
- total Observable // convenient aggregation of all Observable
- clock Clock // Clock for getting current time
- pending Observable // observations not yet bucketed
- pendingTime time.Time // what time are we keeping in pending
- dirty bool // if there are pending observations
-}
-
-// init initializes a level according to the supplied criteria.
-func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) {
- ts.provider = f
- ts.numBuckets = numBuckets
- ts.clock = clock
- ts.levels = make([]*tsLevel, len(resolutions))
-
- for i := range resolutions {
- if i > 0 && resolutions[i-1] >= resolutions[i] {
- log.Print("timeseries: resolutions must be monotonically increasing")
- break
- }
- newLevel := new(tsLevel)
- newLevel.InitLevel(resolutions[i], ts.numBuckets, ts.provider)
- ts.levels[i] = newLevel
- }
-
- ts.Clear()
-}
-
-// Clear removes all observations from the time series.
-func (ts *timeSeries) Clear() {
- ts.lastAdd = time.Time{}
- ts.total = ts.resetObservation(ts.total)
- ts.pending = ts.resetObservation(ts.pending)
- ts.pendingTime = time.Time{}
- ts.dirty = false
-
- for i := range ts.levels {
- ts.levels[i].Clear()
- }
-}
-
-// Add records an observation at the current time.
-func (ts *timeSeries) Add(observation Observable) {
- ts.AddWithTime(observation, ts.clock.Time())
-}
-
-// AddWithTime records an observation at the specified time.
-func (ts *timeSeries) AddWithTime(observation Observable, t time.Time) {
-
- smallBucketDuration := ts.levels[0].size
-
- if t.After(ts.lastAdd) {
- ts.lastAdd = t
- }
-
- if t.After(ts.pendingTime) {
- ts.advance(t)
- ts.mergePendingUpdates()
- ts.pendingTime = ts.levels[0].end
- ts.pending.CopyFrom(observation)
- ts.dirty = true
- } else if t.After(ts.pendingTime.Add(-1 * smallBucketDuration)) {
- // The observation is close enough to go into the pending bucket.
- // This compensates for clock skewing and small scheduling delays
- // by letting the update stay in the fast path.
- ts.pending.Add(observation)
- ts.dirty = true
- } else {
- ts.mergeValue(observation, t)
- }
-}
-
-// mergeValue inserts the observation at the specified time in the past into all levels.
-func (ts *timeSeries) mergeValue(observation Observable, t time.Time) {
- for _, level := range ts.levels {
- index := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size)
- if 0 <= index && index < ts.numBuckets {
- bucketNumber := (level.oldest + index) % ts.numBuckets
- if level.buckets[bucketNumber] == nil {
- level.buckets[bucketNumber] = level.provider()
- }
- level.buckets[bucketNumber].Add(observation)
- }
- }
- ts.total.Add(observation)
-}
-
-// mergePendingUpdates applies the pending updates into all levels.
-func (ts *timeSeries) mergePendingUpdates() {
- if ts.dirty {
- ts.mergeValue(ts.pending, ts.pendingTime)
- ts.pending = ts.resetObservation(ts.pending)
- ts.dirty = false
- }
-}
-
-// advance cycles the buckets at each level until the latest bucket in
-// each level can hold the time specified.
-func (ts *timeSeries) advance(t time.Time) {
- if !t.After(ts.levels[0].end) {
- return
- }
- for i := 0; i < len(ts.levels); i++ {
- level := ts.levels[i]
- if !level.end.Before(t) {
- break
- }
-
- // If the time is sufficiently far, just clear the level and advance
- // directly.
- if !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) {
- for _, b := range level.buckets {
- ts.resetObservation(b)
- }
- level.end = time.Unix(0, (t.UnixNano()/level.size.Nanoseconds())*level.size.Nanoseconds())
- }
-
- for t.After(level.end) {
- level.end = level.end.Add(level.size)
- level.newest = level.oldest
- level.oldest = (level.oldest + 1) % ts.numBuckets
- ts.resetObservation(level.buckets[level.newest])
- }
-
- t = level.end
- }
-}
-
-// Latest returns the sum of the num latest buckets from the level.
-func (ts *timeSeries) Latest(level, num int) Observable {
- now := ts.clock.Time()
- if ts.levels[0].end.Before(now) {
- ts.advance(now)
- }
-
- ts.mergePendingUpdates()
-
- result := ts.provider()
- l := ts.levels[level]
- index := l.newest
-
- for i := 0; i < num; i++ {
- if l.buckets[index] != nil {
- result.Add(l.buckets[index])
- }
- if index == 0 {
- index = ts.numBuckets
- }
- index--
- }
-
- return result
-}
-
-// LatestBuckets returns a copy of the num latest buckets from level.
-func (ts *timeSeries) LatestBuckets(level, num int) []Observable {
- if level < 0 || level > len(ts.levels) {
- log.Print("timeseries: bad level argument: ", level)
- return nil
- }
- if num < 0 || num >= ts.numBuckets {
- log.Print("timeseries: bad num argument: ", num)
- return nil
- }
-
- results := make([]Observable, num)
- now := ts.clock.Time()
- if ts.levels[0].end.Before(now) {
- ts.advance(now)
- }
-
- ts.mergePendingUpdates()
-
- l := ts.levels[level]
- index := l.newest
-
- for i := 0; i < num; i++ {
- result := ts.provider()
- results[i] = result
- if l.buckets[index] != nil {
- result.CopyFrom(l.buckets[index])
- }
-
- if index == 0 {
- index = ts.numBuckets
- }
- index -= 1
- }
- return results
-}
-
-// ScaleBy updates observations by scaling by factor.
-func (ts *timeSeries) ScaleBy(factor float64) {
- for _, l := range ts.levels {
- for i := 0; i < ts.numBuckets; i++ {
- l.buckets[i].Multiply(factor)
- }
- }
-
- ts.total.Multiply(factor)
- ts.pending.Multiply(factor)
-}
-
-// Range returns the sum of observations added over the specified time range.
-// If start or finish times don't fall on bucket boundaries of the same
-// level, then return values are approximate answers.
-func (ts *timeSeries) Range(start, finish time.Time) Observable {
- return ts.ComputeRange(start, finish, 1)[0]
-}
-
-// Recent returns the sum of observations from the last delta.
-func (ts *timeSeries) Recent(delta time.Duration) Observable {
- now := ts.clock.Time()
- return ts.Range(now.Add(-delta), now)
-}
-
-// Total returns the total of all observations.
-func (ts *timeSeries) Total() Observable {
- ts.mergePendingUpdates()
- return ts.total
-}
-
-// ComputeRange computes a specified number of values into a slice using
-// the observations recorded over the specified time period. The return
-// values are approximate if the start or finish times don't fall on the
-// bucket boundaries at the same level or if the number of buckets spanning
-// the range is not an integral multiple of num.
-func (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable {
- if start.After(finish) {
- log.Printf("timeseries: start > finish, %v>%v", start, finish)
- return nil
- }
-
- if num < 0 {
- log.Printf("timeseries: num < 0, %v", num)
- return nil
- }
-
- results := make([]Observable, num)
-
- for _, l := range ts.levels {
- if !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) {
- ts.extract(l, start, finish, num, results)
- return results
- }
- }
-
- // Failed to find a level that covers the desired range. So just
- // extract from the last level, even if it doesn't cover the entire
- // desired range.
- ts.extract(ts.levels[len(ts.levels)-1], start, finish, num, results)
-
- return results
-}
-
-// RecentList returns the specified number of values in slice over the most
-// recent time period of the specified range.
-func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable {
- if delta < 0 {
- return nil
- }
- now := ts.clock.Time()
- return ts.ComputeRange(now.Add(-delta), now, num)
-}
-
-// extract returns a slice of specified number of observations from a given
-// level over a given range.
-func (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) {
- ts.mergePendingUpdates()
-
- srcInterval := l.size
- dstInterval := finish.Sub(start) / time.Duration(num)
- dstStart := start
- srcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets))
-
- srcIndex := 0
-
- // Where should scanning start?
- if dstStart.After(srcStart) {
- advance := dstStart.Sub(srcStart) / srcInterval
- srcIndex += int(advance)
- srcStart = srcStart.Add(advance * srcInterval)
- }
-
- // The i'th value is computed as show below.
- // interval = (finish/start)/num
- // i'th value = sum of observation in range
- // [ start + i * interval,
- // start + (i + 1) * interval )
- for i := 0; i < num; i++ {
- results[i] = ts.resetObservation(results[i])
- dstEnd := dstStart.Add(dstInterval)
- for srcIndex < ts.numBuckets && srcStart.Before(dstEnd) {
- srcEnd := srcStart.Add(srcInterval)
- if srcEnd.After(ts.lastAdd) {
- srcEnd = ts.lastAdd
- }
-
- if !srcEnd.Before(dstStart) {
- srcValue := l.buckets[(srcIndex+l.oldest)%ts.numBuckets]
- if !srcStart.Before(dstStart) && !srcEnd.After(dstEnd) {
- // dst completely contains src.
- if srcValue != nil {
- results[i].Add(srcValue)
- }
- } else {
- // dst partially overlaps src.
- overlapStart := maxTime(srcStart, dstStart)
- overlapEnd := minTime(srcEnd, dstEnd)
- base := srcEnd.Sub(srcStart)
- fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds()
-
- used := ts.provider()
- if srcValue != nil {
- used.CopyFrom(srcValue)
- }
- used.Multiply(fraction)
- results[i].Add(used)
- }
-
- if srcEnd.After(dstEnd) {
- break
- }
- }
- srcIndex++
- srcStart = srcStart.Add(srcInterval)
- }
- dstStart = dstStart.Add(dstInterval)
- }
-}
-
-// resetObservation clears the content so the struct may be reused.
-func (ts *timeSeries) resetObservation(observation Observable) Observable {
- if observation == nil {
- observation = ts.provider()
- } else {
- observation.Clear()
- }
- return observation
-}
-
-// TimeSeries tracks data at granularities from 1 second to 16 weeks.
-type TimeSeries struct {
- timeSeries
-}
-
-// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable.
-func NewTimeSeries(f func() Observable) *TimeSeries {
- return NewTimeSeriesWithClock(f, defaultClockInstance)
-}
-
-// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for
-// assigning timestamps.
-func NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries {
- ts := new(TimeSeries)
- ts.timeSeries.init(timeSeriesResolutions, f, timeSeriesNumBuckets, clock)
- return ts
-}
-
-// MinuteHourSeries tracks data at granularities of 1 minute and 1 hour.
-type MinuteHourSeries struct {
- timeSeries
-}
-
-// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable.
-func NewMinuteHourSeries(f func() Observable) *MinuteHourSeries {
- return NewMinuteHourSeriesWithClock(f, defaultClockInstance)
-}
-
-// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for
-// assigning timestamps.
-func NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries {
- ts := new(MinuteHourSeries)
- ts.timeSeries.init(minuteHourSeriesResolutions, f,
- minuteHourSeriesNumBuckets, clock)
- return ts
-}
-
-func (ts *MinuteHourSeries) Minute() Observable {
- return ts.timeSeries.Latest(0, 60)
-}
-
-func (ts *MinuteHourSeries) Hour() Observable {
- return ts.timeSeries.Latest(1, 60)
-}
-
-func minTime(a, b time.Time) time.Time {
- if a.Before(b) {
- return a
- }
- return b
-}
-
-func maxTime(a, b time.Time) time.Time {
- if a.After(b) {
- return a
- }
- return b
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go
deleted file mode 100644
index 66325a912..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2015 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 file.
-
-package timeseries
-
-import (
- "math"
- "testing"
- "time"
-)
-
-func isNear(x *Float, y float64, tolerance float64) bool {
- return math.Abs(x.Value()-y) < tolerance
-}
-
-func isApproximate(x *Float, y float64) bool {
- return isNear(x, y, 1e-2)
-}
-
-func checkApproximate(t *testing.T, o Observable, y float64) {
- x := o.(*Float)
- if !isApproximate(x, y) {
- t.Errorf("Wanted %g, got %g", y, x.Value())
- }
-}
-
-func checkNear(t *testing.T, o Observable, y, tolerance float64) {
- x := o.(*Float)
- if !isNear(x, y, tolerance) {
- t.Errorf("Wanted %g +- %g, got %g", y, tolerance, x.Value())
- }
-}
-
-var baseTime = time.Date(2013, 1, 1, 0, 0, 0, 0, time.UTC)
-
-func tu(s int64) time.Time {
- return baseTime.Add(time.Duration(s) * time.Second)
-}
-
-func tu2(s int64, ns int64) time.Time {
- return baseTime.Add(time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond)
-}
-
-func TestBasicTimeSeries(t *testing.T) {
- ts := NewTimeSeries(NewFloat)
- fo := new(Float)
- *fo = Float(10)
- ts.AddWithTime(fo, tu(1))
- ts.AddWithTime(fo, tu(1))
- ts.AddWithTime(fo, tu(1))
- ts.AddWithTime(fo, tu(1))
- checkApproximate(t, ts.Range(tu(0), tu(1)), 40)
- checkApproximate(t, ts.Total(), 40)
- ts.AddWithTime(fo, tu(3))
- ts.AddWithTime(fo, tu(3))
- ts.AddWithTime(fo, tu(3))
- checkApproximate(t, ts.Range(tu(0), tu(2)), 40)
- checkApproximate(t, ts.Range(tu(2), tu(4)), 30)
- checkApproximate(t, ts.Total(), 70)
- ts.AddWithTime(fo, tu(1))
- ts.AddWithTime(fo, tu(1))
- checkApproximate(t, ts.Range(tu(0), tu(2)), 60)
- checkApproximate(t, ts.Range(tu(2), tu(4)), 30)
- checkApproximate(t, ts.Total(), 90)
- *fo = Float(100)
- ts.AddWithTime(fo, tu(100))
- checkApproximate(t, ts.Range(tu(99), tu(100)), 100)
- checkApproximate(t, ts.Range(tu(0), tu(4)), 36)
- checkApproximate(t, ts.Total(), 190)
- *fo = Float(10)
- ts.AddWithTime(fo, tu(1))
- ts.AddWithTime(fo, tu(1))
- checkApproximate(t, ts.Range(tu(0), tu(4)), 44)
- checkApproximate(t, ts.Range(tu(37), tu2(100, 100e6)), 100)
- checkApproximate(t, ts.Range(tu(50), tu2(100, 100e6)), 100)
- checkApproximate(t, ts.Range(tu(99), tu2(100, 100e6)), 100)
- checkApproximate(t, ts.Total(), 210)
-
- for i, l := range ts.ComputeRange(tu(36), tu(100), 64) {
- if i == 63 {
- checkApproximate(t, l, 100)
- } else {
- checkApproximate(t, l, 0)
- }
- }
-
- checkApproximate(t, ts.Range(tu(0), tu(100)), 210)
- checkApproximate(t, ts.Range(tu(10), tu(100)), 100)
-
- for i, l := range ts.ComputeRange(tu(0), tu(100), 100) {
- if i < 10 {
- checkApproximate(t, l, 11)
- } else if i >= 90 {
- checkApproximate(t, l, 10)
- } else {
- checkApproximate(t, l, 0)
- }
- }
-}
-
-func TestFloat(t *testing.T) {
- f := Float(1)
- if g, w := f.String(), "1"; g != w {
- t.Errorf("Float(1).String = %q; want %q", g, w)
- }
- f2 := Float(2)
- var o Observable = &f2
- f.Add(o)
- if g, w := f.Value(), 3.0; g != w {
- t.Errorf("Float post-add = %v; want %v", g, w)
- }
- f.Multiply(2)
- if g, w := f.Value(), 6.0; g != w {
- t.Errorf("Float post-multiply = %v; want %v", g, w)
- }
- f.Clear()
- if g, w := f.Value(), 0.0; g != w {
- t.Errorf("Float post-clear = %v; want %v", g, w)
- }
- f.CopyFrom(&f2)
- if g, w := f.Value(), 2.0; g != w {
- t.Errorf("Float post-CopyFrom = %v; want %v", g, w)
- }
-}
-
-type mockClock struct {
- time time.Time
-}
-
-func (m *mockClock) Time() time.Time { return m.time }
-func (m *mockClock) Set(t time.Time) { m.time = t }
-
-const buckets = 6
-
-var testResolutions = []time.Duration{
- 10 * time.Second, // level holds one minute of observations
- 100 * time.Second, // level holds ten minutes of observations
- 10 * time.Minute, // level holds one hour of observations
-}
-
-// TestTimeSeries uses a small number of buckets to force a higher
-// error rate on approximations from the timeseries.
-type TestTimeSeries struct {
- timeSeries
-}
-
-func TestExpectedErrorRate(t *testing.T) {
- ts := new(TestTimeSeries)
- fake := new(mockClock)
- fake.Set(time.Now())
- ts.timeSeries.init(testResolutions, NewFloat, buckets, fake)
- for i := 1; i <= 61*61; i++ {
- fake.Set(fake.Time().Add(1 * time.Second))
- ob := Float(1)
- ts.AddWithTime(&ob, fake.Time())
-
- // The results should be accurate within one missing bucket (1/6) of the observations recorded.
- checkNear(t, ts.Latest(0, buckets), min(float64(i), 60), 10)
- checkNear(t, ts.Latest(1, buckets), min(float64(i), 600), 100)
- checkNear(t, ts.Latest(2, buckets), min(float64(i), 3600), 600)
- }
-}
-
-func min(a, b float64) float64 {
- if a < b {
- return a
- }
- return b
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/batch.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/batch.go
deleted file mode 100644
index b44549928..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/batch.go
+++ /dev/null
@@ -1,191 +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 file.
-
-// +build go1.9
-
-package ipv4
-
-import (
- "net"
- "runtime"
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
-// PacketConn are not implemented.
-
-// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
-// RawConn are not implemented.
-
-// A Message represents an IO message.
-//
-// type Message struct {
-// Buffers [][]byte
-// OOB []byte
-// Addr net.Addr
-// N int
-// NN int
-// Flags int
-// }
-//
-// The Buffers fields represents a list of contiguous buffers, which
-// can be used for vectored IO, for example, putting a header and a
-// payload in each slice.
-// When writing, the Buffers field must contain at least one byte to
-// write.
-// When reading, the Buffers field will always contain a byte to read.
-//
-// The OOB field contains protocol-specific control or miscellaneous
-// ancillary data known as out-of-band data.
-// It can be nil when not required.
-//
-// The Addr field specifies a destination address when writing.
-// It can be nil when the underlying protocol of the endpoint uses
-// connection-oriented communication.
-// After a successful read, it may contain the source address on the
-// received packet.
-//
-// The N field indicates the number of bytes read or written from/to
-// Buffers.
-//
-// The NN field indicates the number of bytes read or written from/to
-// OOB.
-//
-// The Flags field contains protocol-specific information on the
-// received message.
-type Message = socket.Message
-
-// ReadBatch reads a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_PEEK.
-//
-// On a successful read it returns the number of messages received, up
-// to len(ms).
-//
-// On Linux, a batch read will be optimized.
-// On other platforms, this method will read only a single message.
-//
-// Unlike the ReadFrom method, it doesn't strip the IPv4 header
-// followed by option headers from the received IPv4 datagram when the
-// underlying transport is net.IPConn. Each Buffers field of Message
-// must be large enough to accommodate an IPv4 header and option
-// headers.
-func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.RecvMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.RecvMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
-
-// WriteBatch writes a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_DONTROUTE.
-//
-// It returns the number of messages written on a successful write.
-//
-// On Linux, a batch write will be optimized.
-// On other platforms, this method will write only a single message.
-func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.SendMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.SendMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
-
-// ReadBatch reads a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_PEEK.
-//
-// On a successful read it returns the number of messages received, up
-// to len(ms).
-//
-// On Linux, a batch read will be optimized.
-// On other platforms, this method will read only a single message.
-func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.RecvMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.RecvMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
-
-// WriteBatch writes a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_DONTROUTE.
-//
-// It returns the number of messages written on a successful write.
-//
-// On Linux, a batch write will be optimized.
-// On other platforms, this method will write only a single message.
-func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.SendMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.SendMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/bpf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/bpf_test.go
deleted file mode 100644
index b44da9054..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/bpf_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2016 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 file.
-
-package ipv4_test
-
-import (
- "net"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/ipv4"
-)
-
-func TestBPF(t *testing.T) {
- if runtime.GOOS != "linux" {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- l, err := net.ListenPacket("udp4", "127.0.0.1:0")
- if err != nil {
- t.Fatal(err)
- }
- defer l.Close()
-
- p := ipv4.NewPacketConn(l)
-
- // This filter accepts UDP packets whose first payload byte is
- // even.
- prog, err := bpf.Assemble([]bpf.Instruction{
- // Load the first byte of the payload (skipping UDP header).
- bpf.LoadAbsolute{Off: 8, Size: 1},
- // Select LSB of the byte.
- bpf.ALUOpConstant{Op: bpf.ALUOpAnd, Val: 1},
- // Byte is even?
- bpf.JumpIf{Cond: bpf.JumpEqual, Val: 0, SkipFalse: 1},
- // Accept.
- bpf.RetConstant{Val: 4096},
- // Ignore.
- bpf.RetConstant{Val: 0},
- })
- if err != nil {
- t.Fatalf("compiling BPF: %s", err)
- }
-
- if err = p.SetBPF(prog); err != nil {
- t.Fatalf("attaching filter to Conn: %s", err)
- }
-
- s, err := net.Dial("udp4", l.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- defer s.Close()
- go func() {
- for i := byte(0); i < 10; i++ {
- s.Write([]byte{i})
- }
- }()
-
- l.SetDeadline(time.Now().Add(2 * time.Second))
- seen := make([]bool, 5)
- for {
- var b [512]byte
- n, _, err := l.ReadFrom(b[:])
- if err != nil {
- t.Fatalf("reading from listener: %s", err)
- }
- if n != 1 {
- t.Fatalf("unexpected packet length, want 1, got %d", n)
- }
- if b[0] >= 10 {
- t.Fatalf("unexpected byte, want 0-9, got %d", b[0])
- }
- if b[0]%2 != 0 {
- t.Fatalf("got odd byte %d, wanted only even bytes", b[0])
- }
- seen[b[0]/2] = true
-
- seenAll := true
- for _, v := range seen {
- if !v {
- seenAll = false
- break
- }
- }
- if seenAll {
- break
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control.go
deleted file mode 100644
index a2b02ca95..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "fmt"
- "net"
- "sync"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-type rawOpt struct {
- sync.RWMutex
- cflags ControlFlags
-}
-
-func (c *rawOpt) set(f ControlFlags) { c.cflags |= f }
-func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f }
-func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 }
-
-type ControlFlags uint
-
-const (
- FlagTTL ControlFlags = 1 << iota // pass the TTL on the received packet
- FlagSrc // pass the source address on the received packet
- FlagDst // pass the destination address on the received packet
- FlagInterface // pass the interface index on the received packet
-)
-
-// A ControlMessage represents per packet basis IP-level socket options.
-type ControlMessage struct {
- // Receiving socket options: SetControlMessage allows to
- // receive the options from the protocol stack using ReadFrom
- // method of PacketConn or RawConn.
- //
- // Specifying socket options: ControlMessage for WriteTo
- // method of PacketConn or RawConn allows to send the options
- // to the protocol stack.
- //
- TTL int // time-to-live, receiving only
- Src net.IP // source address, specifying only
- Dst net.IP // destination address, receiving only
- IfIndex int // interface index, must be 1 <= value when specifying
-}
-
-func (cm *ControlMessage) String() string {
- if cm == nil {
- return "<nil>"
- }
- return fmt.Sprintf("ttl=%d src=%v dst=%v ifindex=%d", cm.TTL, cm.Src, cm.Dst, cm.IfIndex)
-}
-
-// Marshal returns the binary encoding of cm.
-func (cm *ControlMessage) Marshal() []byte {
- if cm == nil {
- return nil
- }
- var m socket.ControlMessage
- if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) {
- m = socket.NewControlMessage([]int{ctlOpts[ctlPacketInfo].length})
- }
- if len(m) > 0 {
- ctlOpts[ctlPacketInfo].marshal(m, cm)
- }
- return m
-}
-
-// Parse parses b as a control message and stores the result in cm.
-func (cm *ControlMessage) Parse(b []byte) error {
- ms, err := socket.ControlMessage(b).Parse()
- if err != nil {
- return err
- }
- for _, m := range ms {
- lvl, typ, l, err := m.ParseHeader()
- if err != nil {
- return err
- }
- if lvl != iana.ProtocolIP {
- continue
- }
- switch {
- case typ == ctlOpts[ctlTTL].name && l >= ctlOpts[ctlTTL].length:
- ctlOpts[ctlTTL].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlDst].name && l >= ctlOpts[ctlDst].length:
- ctlOpts[ctlDst].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlInterface].name && l >= ctlOpts[ctlInterface].length:
- ctlOpts[ctlInterface].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
- ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
- }
- }
- return nil
-}
-
-// NewControlMessage returns a new control message.
-//
-// The returned message is large enough for options specified by cf.
-func NewControlMessage(cf ControlFlags) []byte {
- opt := rawOpt{cflags: cf}
- var l int
- if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlTTL].length)
- }
- if ctlOpts[ctlPacketInfo].name > 0 {
- if opt.isset(FlagSrc | FlagDst | FlagInterface) {
- l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
- }
- } else {
- if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlDst].length)
- }
- if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlInterface].length)
- }
- }
- var b []byte
- if l > 0 {
- b = make([]byte, l)
- }
- return b
-}
-
-// Ancillary data socket options
-const (
- ctlTTL = iota // header field
- ctlSrc // header field
- ctlDst // header field
- ctlInterface // inbound or outbound interface
- ctlPacketInfo // inbound or outbound packet path
- ctlMax
-)
-
-// A ctlOpt represents a binding for ancillary data socket option.
-type ctlOpt struct {
- name int // option name, must be equal or greater than 1
- length int // option length
- marshal func([]byte, *ControlMessage) []byte
- parse func(*ControlMessage, []byte)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_bsd.go
deleted file mode 100644
index 77e7ad5be..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_bsd.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package ipv4
-
-import (
- "net"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-func marshalDst(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len)
- return m.Next(net.IPv4len)
-}
-
-func parseDst(cm *ControlMessage, b []byte) {
- if len(cm.Dst) < net.IPv4len {
- cm.Dst = make(net.IP, net.IPv4len)
- }
- copy(cm.Dst, b[:net.IPv4len])
-}
-
-func marshalInterface(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink)
- return m.Next(syscall.SizeofSockaddrDatalink)
-}
-
-func parseInterface(cm *ControlMessage, b []byte) {
- sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&b[0]))
- cm.IfIndex = int(sadl.Index)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_pktinfo.go
deleted file mode 100644
index 425338f35..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_pktinfo.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin linux solaris
-
-package ipv4
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo)
- if cm != nil {
- pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
- if ip := cm.Src.To4(); ip != nil {
- copy(pi.Spec_dst[:], ip)
- }
- if cm.IfIndex > 0 {
- pi.setIfindex(cm.IfIndex)
- }
- }
- return m.Next(sizeofInetPktinfo)
-}
-
-func parsePacketInfo(cm *ControlMessage, b []byte) {
- pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
- cm.IfIndex = int(pi.Ifindex)
- if len(cm.Dst) < net.IPv4len {
- cm.Dst = make(net.IP, net.IPv4len)
- }
- copy(cm.Dst, pi.Addr[:])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_stub.go
deleted file mode 100644
index 5a2f7d8d3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_stub.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv4
-
-import "golang.org/x/net/internal/socket"
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_test.go
deleted file mode 100644
index f87fe124b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_test.go
+++ /dev/null
@@ -1,21 +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 file.
-
-package ipv4_test
-
-import (
- "testing"
-
- "golang.org/x/net/ipv4"
-)
-
-func TestControlMessageParseWithFuzz(t *testing.T) {
- var cm ipv4.ControlMessage
- for _, fuzz := range []string{
- "\f\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00",
- "\f\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00",
- } {
- cm.Parse([]byte(fuzz))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_unix.go
deleted file mode 100644
index e1ae8167b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_unix.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package ipv4
-
-import (
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- opt.Lock()
- defer opt.Unlock()
- if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagTTL)
- } else {
- opt.clear(FlagTTL)
- }
- }
- if so, ok := sockOpts[ssoPacketInfo]; ok {
- if cf&(FlagSrc|FlagDst|FlagInterface) != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(cf & (FlagSrc | FlagDst | FlagInterface))
- } else {
- opt.clear(cf & (FlagSrc | FlagDst | FlagInterface))
- }
- }
- } else {
- if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagDst)
- } else {
- opt.clear(FlagDst)
- }
- }
- if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagInterface)
- } else {
- opt.clear(FlagInterface)
- }
- }
- }
- return nil
-}
-
-func marshalTTL(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIP, sysIP_RECVTTL, 1)
- return m.Next(1)
-}
-
-func parseTTL(cm *ControlMessage, b []byte) {
- cm.TTL = int(*(*byte)(unsafe.Pointer(&b[:1][0])))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_windows.go
deleted file mode 100644
index ce55c6644..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/control_windows.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- // TODO(mikio): implement this
- return syscall.EWINDOWS
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_darwin.go
deleted file mode 100644
index c8f2e05b8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_darwin.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_STRIPHDR = C.IP_STRIPHDR
- sysIP_RECVTTL = C.IP_RECVTTL
- sysIP_BOUND_IF = C.IP_BOUND_IF
- sysIP_PKTINFO = C.IP_PKTINFO
- sysIP_RECVPKTINFO = C.IP_RECVPKTINFO
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
- sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF
- sysIP_MULTICAST_IFINDEX = C.IP_MULTICAST_IFINDEX
- sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP
- sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP
- sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE
- sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofInetPktinfo = C.sizeof_struct_in_pktinfo
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
- sizeofIPMreqn = C.sizeof_struct_ip_mreqn
- sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet C.struct_sockaddr_in
-
-type inetPktinfo C.struct_in_pktinfo
-
-type ipMreq C.struct_ip_mreq
-
-type ipMreqn C.struct_ip_mreqn
-
-type ipMreqSource C.struct_ip_mreq_source
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_dragonfly.go
deleted file mode 100644
index f30544ea2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_dragonfly.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_RECVTTL = C.IP_RECVTTL
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
-)
-
-type ipMreq C.struct_ip_mreq
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_freebsd.go
deleted file mode 100644
index 4dd57d865..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_freebsd.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_SENDSRCADDR = C.IP_SENDSRCADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_ONESBCAST = C.IP_ONESBCAST
- sysIP_BINDANY = C.IP_BINDANY
- sysIP_RECVTTL = C.IP_RECVTTL
- sysIP_MINTTL = C.IP_MINTTL
- sysIP_DONTFRAG = C.IP_DONTFRAG
- sysIP_RECVTOS = C.IP_RECVTOS
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
- sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF
- sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP
- sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP
- sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE
- sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
- sizeofIPMreqn = C.sizeof_struct_ip_mreqn
- sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet C.struct_sockaddr_in
-
-type ipMreq C.struct_ip_mreq
-
-type ipMreqn C.struct_ip_mreqn
-
-type ipMreqSource C.struct_ip_mreq_source
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_linux.go
deleted file mode 100644
index beb11071a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_linux.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <time.h>
-
-#include <linux/errqueue.h>
-#include <linux/icmp.h>
-#include <linux/in.h>
-#include <linux/filter.h>
-#include <sys/socket.h>
-*/
-import "C"
-
-const (
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_ROUTER_ALERT = C.IP_ROUTER_ALERT
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_PKTINFO = C.IP_PKTINFO
- sysIP_PKTOPTIONS = C.IP_PKTOPTIONS
- sysIP_MTU_DISCOVER = C.IP_MTU_DISCOVER
- sysIP_RECVERR = C.IP_RECVERR
- sysIP_RECVTTL = C.IP_RECVTTL
- sysIP_RECVTOS = C.IP_RECVTOS
- sysIP_MTU = C.IP_MTU
- sysIP_FREEBIND = C.IP_FREEBIND
- sysIP_TRANSPARENT = C.IP_TRANSPARENT
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_ORIGDSTADDR = C.IP_ORIGDSTADDR
- sysIP_RECVORIGDSTADDR = C.IP_RECVORIGDSTADDR
- sysIP_MINTTL = C.IP_MINTTL
- sysIP_NODEFRAG = C.IP_NODEFRAG
- sysIP_UNICAST_IF = C.IP_UNICAST_IF
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
- sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE
- sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE
- sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP
- sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP
- sysIP_MSFILTER = C.IP_MSFILTER
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
- sysMCAST_MSFILTER = C.MCAST_MSFILTER
- sysIP_MULTICAST_ALL = C.IP_MULTICAST_ALL
-
- //sysIP_PMTUDISC_DONT = C.IP_PMTUDISC_DONT
- //sysIP_PMTUDISC_WANT = C.IP_PMTUDISC_WANT
- //sysIP_PMTUDISC_DO = C.IP_PMTUDISC_DO
- //sysIP_PMTUDISC_PROBE = C.IP_PMTUDISC_PROBE
- //sysIP_PMTUDISC_INTERFACE = C.IP_PMTUDISC_INTERFACE
- //sysIP_PMTUDISC_OMIT = C.IP_PMTUDISC_OMIT
-
- sysICMP_FILTER = C.ICMP_FILTER
-
- sysSO_EE_ORIGIN_NONE = C.SO_EE_ORIGIN_NONE
- sysSO_EE_ORIGIN_LOCAL = C.SO_EE_ORIGIN_LOCAL
- sysSO_EE_ORIGIN_ICMP = C.SO_EE_ORIGIN_ICMP
- sysSO_EE_ORIGIN_ICMP6 = C.SO_EE_ORIGIN_ICMP6
- sysSO_EE_ORIGIN_TXSTATUS = C.SO_EE_ORIGIN_TXSTATUS
- sysSO_EE_ORIGIN_TIMESTAMPING = C.SO_EE_ORIGIN_TIMESTAMPING
-
- sysSOL_SOCKET = C.SOL_SOCKET
- sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER
-
- sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofInetPktinfo = C.sizeof_struct_in_pktinfo
- sizeofSockExtendedErr = C.sizeof_struct_sock_extended_err
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
- sizeofIPMreqn = C.sizeof_struct_ip_mreqn
- sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-
- sizeofICMPFilter = C.sizeof_struct_icmp_filter
-
- sizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
-
-type sockaddrInet C.struct_sockaddr_in
-
-type inetPktinfo C.struct_in_pktinfo
-
-type sockExtendedErr C.struct_sock_extended_err
-
-type ipMreq C.struct_ip_mreq
-
-type ipMreqn C.struct_ip_mreqn
-
-type ipMreqSource C.struct_ip_mreq_source
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
-
-type icmpFilter C.struct_icmp_filter
-
-type sockFProg C.struct_sock_fprog
-
-type sockFilter C.struct_sock_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_netbsd.go
deleted file mode 100644
index 8f8af1b89..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_netbsd.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_RECVTTL = C.IP_RECVTTL
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
-)
-
-type ipMreq C.struct_ip_mreq
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_openbsd.go
deleted file mode 100644
index 8f8af1b89..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_openbsd.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_RECVTTL = C.IP_RECVTTL
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
-)
-
-type ipMreq C.struct_ip_mreq
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_solaris.go
deleted file mode 100644
index aeb33e9c8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/defs_solaris.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-
-package ipv4
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysIP_OPTIONS = C.IP_OPTIONS
- sysIP_HDRINCL = C.IP_HDRINCL
- sysIP_TOS = C.IP_TOS
- sysIP_TTL = C.IP_TTL
- sysIP_RECVOPTS = C.IP_RECVOPTS
- sysIP_RECVRETOPTS = C.IP_RECVRETOPTS
- sysIP_RECVDSTADDR = C.IP_RECVDSTADDR
- sysIP_RETOPTS = C.IP_RETOPTS
- sysIP_RECVIF = C.IP_RECVIF
- sysIP_RECVSLLA = C.IP_RECVSLLA
- sysIP_RECVTTL = C.IP_RECVTTL
-
- sysIP_MULTICAST_IF = C.IP_MULTICAST_IF
- sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL
- sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP
- sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP
- sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP
- sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE
- sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE
- sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP
- sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP
- sysIP_NEXTHOP = C.IP_NEXTHOP
-
- sysIP_PKTINFO = C.IP_PKTINFO
- sysIP_RECVPKTINFO = C.IP_RECVPKTINFO
- sysIP_DONTFRAG = C.IP_DONTFRAG
-
- sysIP_BOUND_IF = C.IP_BOUND_IF
- sysIP_UNSPEC_SRC = C.IP_UNSPEC_SRC
- sysIP_BROADCAST_TTL = C.IP_BROADCAST_TTL
- sysIP_DHCPINIT_IF = C.IP_DHCPINIT_IF
-
- sysIP_REUSEADDR = C.IP_REUSEADDR
- sysIP_DONTROUTE = C.IP_DONTROUTE
- sysIP_BROADCAST = C.IP_BROADCAST
-
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofInetPktinfo = C.sizeof_struct_in_pktinfo
-
- sizeofIPMreq = C.sizeof_struct_ip_mreq
- sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet C.struct_sockaddr_in
-
-type inetPktinfo C.struct_in_pktinfo
-
-type ipMreq C.struct_ip_mreq
-
-type ipMreqSource C.struct_ip_mreq_source
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/dgramopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/dgramopt.go
deleted file mode 100644
index 54d77d5fe..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/dgramopt.go
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/bpf"
-)
-
-// MulticastTTL returns the time-to-live field value for outgoing
-// multicast packets.
-func (c *dgramOpt) MulticastTTL() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastTTL]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetMulticastTTL sets the time-to-live field value for future
-// outgoing multicast packets.
-func (c *dgramOpt) SetMulticastTTL(ttl int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastTTL]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, ttl)
-}
-
-// MulticastInterface returns the default interface for multicast
-// packet transmissions.
-func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
- if !c.ok() {
- return nil, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastInterface]
- if !ok {
- return nil, errOpNoSupport
- }
- return so.getMulticastInterface(c.Conn)
-}
-
-// SetMulticastInterface sets the default interface for future
-// multicast packet transmissions.
-func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastInterface]
- if !ok {
- return errOpNoSupport
- }
- return so.setMulticastInterface(c.Conn, ifi)
-}
-
-// MulticastLoopback reports whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) MulticastLoopback() (bool, error) {
- if !c.ok() {
- return false, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastLoopback]
- if !ok {
- return false, errOpNoSupport
- }
- on, err := so.GetInt(c.Conn)
- if err != nil {
- return false, err
- }
- return on == 1, nil
-}
-
-// SetMulticastLoopback sets whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) SetMulticastLoopback(on bool) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastLoopback]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, boolint(on))
-}
-
-// JoinGroup joins the group address group on the interface ifi.
-// By default all sources that can cast data to group are accepted.
-// It's possible to mute and unmute data transmission from a specific
-// source by using ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup.
-// JoinGroup uses the system assigned multicast interface when ifi is
-// nil, although this is not recommended because the assignment
-// depends on platforms and sometimes it might require routing
-// configuration.
-func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoJoinGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- return so.setGroup(c.Conn, ifi, grp)
-}
-
-// LeaveGroup leaves the group address group on the interface ifi
-// regardless of whether the group is any-source group or
-// source-specific group.
-func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoLeaveGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- return so.setGroup(c.Conn, ifi, grp)
-}
-
-// JoinSourceSpecificGroup joins the source-specific group comprising
-// group and source on the interface ifi.
-// JoinSourceSpecificGroup uses the system assigned multicast
-// interface when ifi is nil, although this is not recommended because
-// the assignment depends on platforms and sometimes it might require
-// routing configuration.
-func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoJoinSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP4(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// LeaveSourceSpecificGroup leaves the source-specific group on the
-// interface ifi.
-func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoLeaveSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP4(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// ExcludeSourceSpecificGroup excludes the source-specific group from
-// the already joined any-source groups by JoinGroup on the interface
-// ifi.
-func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoBlockSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP4(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// IncludeSourceSpecificGroup includes the excluded source-specific
-// group by ExcludeSourceSpecificGroup again on the interface ifi.
-func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoUnblockSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP4(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP4(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// ICMPFilter returns an ICMP filter.
-// Currently only Linux supports this.
-func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
- if !c.ok() {
- return nil, syscall.EINVAL
- }
- so, ok := sockOpts[ssoICMPFilter]
- if !ok {
- return nil, errOpNoSupport
- }
- return so.getICMPFilter(c.Conn)
-}
-
-// SetICMPFilter deploys the ICMP filter.
-// Currently only Linux supports this.
-func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoICMPFilter]
- if !ok {
- return errOpNoSupport
- }
- return so.setICMPFilter(c.Conn, f)
-}
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoAttachFilter]
- if !ok {
- return errOpNoSupport
- }
- return so.setBPF(c.Conn, filter)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/doc.go
deleted file mode 100644
index b43935a5a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/doc.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package ipv4 implements IP-level socket options for the Internet
-// Protocol version 4.
-//
-// The package provides IP-level socket options that allow
-// manipulation of IPv4 facilities.
-//
-// The IPv4 protocol and basic host requirements for IPv4 are defined
-// in RFC 791 and RFC 1122.
-// Host extensions for multicasting and socket interface extensions
-// for multicast source filters are defined in RFC 1112 and RFC 3678.
-// IGMPv1, IGMPv2 and IGMPv3 are defined in RFC 1112, RFC 2236 and RFC
-// 3376.
-// Source-specific multicast is defined in RFC 4607.
-//
-//
-// Unicasting
-//
-// The options for unicasting are available for net.TCPConn,
-// net.UDPConn and net.IPConn which are created as network connections
-// that use the IPv4 transport. When a single TCP connection carrying
-// a data flow of multiple packets needs to indicate the flow is
-// important, Conn is used to set the type-of-service field on the
-// IPv4 header for each packet.
-//
-// ln, err := net.Listen("tcp4", "0.0.0.0:1024")
-// if err != nil {
-// // error handling
-// }
-// defer ln.Close()
-// for {
-// c, err := ln.Accept()
-// if err != nil {
-// // error handling
-// }
-// go func(c net.Conn) {
-// defer c.Close()
-//
-// The outgoing packets will be labeled DiffServ assured forwarding
-// class 1 low drop precedence, known as AF11 packets.
-//
-// if err := ipv4.NewConn(c).SetTOS(0x28); err != nil {
-// // error handling
-// }
-// if _, err := c.Write(data); err != nil {
-// // error handling
-// }
-// }(c)
-// }
-//
-//
-// Multicasting
-//
-// The options for multicasting are available for net.UDPConn and
-// net.IPconn which are created as network connections that use the
-// IPv4 transport. A few network facilities must be prepared before
-// you begin multicasting, at a minimum joining network interfaces and
-// multicast groups.
-//
-// en0, err := net.InterfaceByName("en0")
-// if err != nil {
-// // error handling
-// }
-// en1, err := net.InterfaceByIndex(911)
-// if err != nil {
-// // error handling
-// }
-// group := net.IPv4(224, 0, 0, 250)
-//
-// First, an application listens to an appropriate address with an
-// appropriate service port.
-//
-// c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c.Close()
-//
-// Second, the application joins multicast groups, starts listening to
-// the groups on the specified network interfaces. Note that the
-// service port for transport layer protocol does not matter with this
-// operation as joining groups affects only network and link layer
-// protocols, such as IPv4 and Ethernet.
-//
-// p := ipv4.NewPacketConn(c)
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil {
-// // error handling
-// }
-//
-// The application might set per packet control message transmissions
-// between the protocol stack within the kernel. When the application
-// needs a destination address on an incoming packet,
-// SetControlMessage of PacketConn is used to enable control message
-// transmissions.
-//
-// if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil {
-// // error handling
-// }
-//
-// The application could identify whether the received packets are
-// of interest by using the control message that contains the
-// destination address of the received packet.
-//
-// b := make([]byte, 1500)
-// for {
-// n, cm, src, err := p.ReadFrom(b)
-// if err != nil {
-// // error handling
-// }
-// if cm.Dst.IsMulticast() {
-// if cm.Dst.Equal(group) {
-// // joined group, do something
-// } else {
-// // unknown group, discard
-// continue
-// }
-// }
-//
-// The application can also send both unicast and multicast packets.
-//
-// p.SetTOS(0x0)
-// p.SetTTL(16)
-// if _, err := p.WriteTo(data, nil, src); err != nil {
-// // error handling
-// }
-// dst := &net.UDPAddr{IP: group, Port: 1024}
-// for _, ifi := range []*net.Interface{en0, en1} {
-// if err := p.SetMulticastInterface(ifi); err != nil {
-// // error handling
-// }
-// p.SetMulticastTTL(2)
-// if _, err := p.WriteTo(data, nil, dst); err != nil {
-// // error handling
-// }
-// }
-// }
-//
-//
-// More multicasting
-//
-// An application that uses PacketConn or RawConn may join multiple
-// multicast groups. For example, a UDP listener with port 1024 might
-// join two different groups across over two different network
-// interfaces by using:
-//
-// c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c.Close()
-// p := ipv4.NewPacketConn(c)
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil {
-// // error handling
-// }
-//
-// It is possible for multiple UDP listeners that listen on the same
-// UDP port to join the same multicast group. The net package will
-// provide a socket that listens to a wildcard address with reusable
-// UDP port when an appropriate multicast address prefix is passed to
-// the net.ListenPacket or net.ListenUDP.
-//
-// c1, err := net.ListenPacket("udp4", "224.0.0.0:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c1.Close()
-// c2, err := net.ListenPacket("udp4", "224.0.0.0:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c2.Close()
-// p1 := ipv4.NewPacketConn(c1)
-// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
-// // error handling
-// }
-// p2 := ipv4.NewPacketConn(c2)
-// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
-// // error handling
-// }
-//
-// Also it is possible for the application to leave or rejoin a
-// multicast group on the network interface.
-//
-// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}); err != nil {
-// // error handling
-// }
-//
-//
-// Source-specific multicasting
-//
-// An application that uses PacketConn or RawConn on IGMPv3 supported
-// platform is able to join source-specific multicast groups.
-// The application may use JoinSourceSpecificGroup and
-// LeaveSourceSpecificGroup for the operation known as "include" mode,
-//
-// ssmgroup := net.UDPAddr{IP: net.IPv4(232, 7, 8, 9)}
-// ssmsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 1)})
-// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
-// // error handling
-// }
-// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
-// // error handling
-// }
-//
-// or JoinGroup, ExcludeSourceSpecificGroup,
-// IncludeSourceSpecificGroup and LeaveGroup for the operation known
-// as "exclude" mode.
-//
-// exclsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 254)}
-// if err := p.JoinGroup(en0, &ssmgroup); err != nil {
-// // error handling
-// }
-// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil {
-// // error handling
-// }
-// if err := p.LeaveGroup(en0, &ssmgroup); err != nil {
-// // error handling
-// }
-//
-// Note that it depends on each platform implementation what happens
-// when an application which runs on IGMPv3 unsupported platform uses
-// JoinSourceSpecificGroup and LeaveSourceSpecificGroup.
-// In general the platform tries to fall back to conversations using
-// IGMPv1 or IGMPv2 and starts to listen to multicast traffic.
-// In the fallback case, ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup may return an error.
-package ipv4 // import "golang.org/x/net/ipv4"
-
-// BUG(mikio): This package is not implemented on NaCl and Plan 9.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/endpoint.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/endpoint.go
deleted file mode 100644
index 2ab877363..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/endpoint.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
- "time"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
-// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup methods of PacketConn and RawConn are
-// not implemented.
-
-// A Conn represents a network endpoint that uses the IPv4 transport.
-// It is used to control basic IP-level socket options such as TOS and
-// TTL.
-type Conn struct {
- genericOpt
-}
-
-type genericOpt struct {
- *socket.Conn
-}
-
-func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
-
-// NewConn returns a new Conn.
-func NewConn(c net.Conn) *Conn {
- cc, _ := socket.NewConn(c)
- return &Conn{
- genericOpt: genericOpt{Conn: cc},
- }
-}
-
-// A PacketConn represents a packet network endpoint that uses the
-// IPv4 transport. It is used to control several IP-level socket
-// options including multicasting. It also provides datagram based
-// network I/O methods specific to the IPv4 and higher layer protocols
-// such as UDP.
-type PacketConn struct {
- genericOpt
- dgramOpt
- payloadHandler
-}
-
-type dgramOpt struct {
- *socket.Conn
-}
-
-func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
-
-// SetControlMessage sets the per packet IP-level socket options.
-func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
-}
-
-// SetDeadline sets the read and write deadlines associated with the
-// endpoint.
-func (c *PacketConn) SetDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.PacketConn.SetDeadline(t)
-}
-
-// SetReadDeadline sets the read deadline associated with the
-// endpoint.
-func (c *PacketConn) SetReadDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.PacketConn.SetReadDeadline(t)
-}
-
-// SetWriteDeadline sets the write deadline associated with the
-// endpoint.
-func (c *PacketConn) SetWriteDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.PacketConn.SetWriteDeadline(t)
-}
-
-// Close closes the endpoint.
-func (c *PacketConn) Close() error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.PacketConn.Close()
-}
-
-// NewPacketConn returns a new PacketConn using c as its underlying
-// transport.
-func NewPacketConn(c net.PacketConn) *PacketConn {
- cc, _ := socket.NewConn(c.(net.Conn))
- p := &PacketConn{
- genericOpt: genericOpt{Conn: cc},
- dgramOpt: dgramOpt{Conn: cc},
- payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
- }
- return p
-}
-
-// A RawConn represents a packet network endpoint that uses the IPv4
-// transport. It is used to control several IP-level socket options
-// including IPv4 header manipulation. It also provides datagram
-// based network I/O methods specific to the IPv4 and higher layer
-// protocols that handle IPv4 datagram directly such as OSPF, GRE.
-type RawConn struct {
- genericOpt
- dgramOpt
- packetHandler
-}
-
-// SetControlMessage sets the per packet IP-level socket options.
-func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error {
- if !c.packetHandler.ok() {
- return syscall.EINVAL
- }
- return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on)
-}
-
-// SetDeadline sets the read and write deadlines associated with the
-// endpoint.
-func (c *RawConn) SetDeadline(t time.Time) error {
- if !c.packetHandler.ok() {
- return syscall.EINVAL
- }
- return c.packetHandler.IPConn.SetDeadline(t)
-}
-
-// SetReadDeadline sets the read deadline associated with the
-// endpoint.
-func (c *RawConn) SetReadDeadline(t time.Time) error {
- if !c.packetHandler.ok() {
- return syscall.EINVAL
- }
- return c.packetHandler.IPConn.SetReadDeadline(t)
-}
-
-// SetWriteDeadline sets the write deadline associated with the
-// endpoint.
-func (c *RawConn) SetWriteDeadline(t time.Time) error {
- if !c.packetHandler.ok() {
- return syscall.EINVAL
- }
- return c.packetHandler.IPConn.SetWriteDeadline(t)
-}
-
-// Close closes the endpoint.
-func (c *RawConn) Close() error {
- if !c.packetHandler.ok() {
- return syscall.EINVAL
- }
- return c.packetHandler.IPConn.Close()
-}
-
-// NewRawConn returns a new RawConn using c as its underlying
-// transport.
-func NewRawConn(c net.PacketConn) (*RawConn, error) {
- cc, err := socket.NewConn(c.(net.Conn))
- if err != nil {
- return nil, err
- }
- r := &RawConn{
- genericOpt: genericOpt{Conn: cc},
- dgramOpt: dgramOpt{Conn: cc},
- packetHandler: packetHandler{IPConn: c.(*net.IPConn), Conn: cc},
- }
- so, ok := sockOpts[ssoHeaderPrepend]
- if !ok {
- return nil, errOpNoSupport
- }
- if err := so.SetInt(r.dgramOpt.Conn, boolint(true)); err != nil {
- return nil, err
- }
- return r, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/example_test.go
deleted file mode 100644
index ddc7577e8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/example_test.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "fmt"
- "log"
- "net"
- "os"
- "runtime"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/ipv4"
-)
-
-func ExampleConn_markingTCP() {
- ln, err := net.Listen("tcp", "0.0.0.0:1024")
- if err != nil {
- log.Fatal(err)
- }
- defer ln.Close()
-
- for {
- c, err := ln.Accept()
- if err != nil {
- log.Fatal(err)
- }
- go func(c net.Conn) {
- defer c.Close()
- if c.RemoteAddr().(*net.TCPAddr).IP.To4() != nil {
- p := ipv4.NewConn(c)
- if err := p.SetTOS(0x28); err != nil { // DSCP AF11
- log.Fatal(err)
- }
- if err := p.SetTTL(128); err != nil {
- log.Fatal(err)
- }
- }
- if _, err := c.Write([]byte("HELLO-R-U-THERE-ACK")); err != nil {
- log.Fatal(err)
- }
- }(c)
- }
-}
-
-func ExamplePacketConn_servingOneShotMulticastDNS() {
- c, err := net.ListenPacket("udp4", "0.0.0.0:5353") // mDNS over UDP
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
-
- en0, err := net.InterfaceByName("en0")
- if err != nil {
- log.Fatal(err)
- }
- mDNSLinkLocal := net.UDPAddr{IP: net.IPv4(224, 0, 0, 251)}
- if err := p.JoinGroup(en0, &mDNSLinkLocal); err != nil {
- log.Fatal(err)
- }
- defer p.LeaveGroup(en0, &mDNSLinkLocal)
- if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil {
- log.Fatal(err)
- }
-
- b := make([]byte, 1500)
- for {
- _, cm, peer, err := p.ReadFrom(b)
- if err != nil {
- log.Fatal(err)
- }
- if !cm.Dst.IsMulticast() || !cm.Dst.Equal(mDNSLinkLocal.IP) {
- continue
- }
- answers := []byte("FAKE-MDNS-ANSWERS") // fake mDNS answers, you need to implement this
- if _, err := p.WriteTo(answers, nil, peer); err != nil {
- log.Fatal(err)
- }
- }
-}
-
-func ExamplePacketConn_tracingIPPacketRoute() {
- // Tracing an IP packet route to www.google.com.
-
- const host = "www.google.com"
- ips, err := net.LookupIP(host)
- if err != nil {
- log.Fatal(err)
- }
- var dst net.IPAddr
- for _, ip := range ips {
- if ip.To4() != nil {
- dst.IP = ip
- fmt.Printf("using %v for tracing an IP packet route to %s\n", dst.IP, host)
- break
- }
- }
- if dst.IP == nil {
- log.Fatal("no A record found")
- }
-
- c, err := net.ListenPacket("ip4:1", "0.0.0.0") // ICMP for IPv4
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
-
- if err := p.SetControlMessage(ipv4.FlagTTL|ipv4.FlagSrc|ipv4.FlagDst|ipv4.FlagInterface, true); err != nil {
- log.Fatal(err)
- }
- wm := icmp.Message{
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }
-
- rb := make([]byte, 1500)
- for i := 1; i <= 64; i++ { // up to 64 hops
- wm.Body.(*icmp.Echo).Seq = i
- wb, err := wm.Marshal(nil)
- if err != nil {
- log.Fatal(err)
- }
- if err := p.SetTTL(i); err != nil {
- log.Fatal(err)
- }
-
- // In the real world usually there are several
- // multiple traffic-engineered paths for each hop.
- // You may need to probe a few times to each hop.
- begin := time.Now()
- if _, err := p.WriteTo(wb, nil, &dst); err != nil {
- log.Fatal(err)
- }
- if err := p.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil {
- log.Fatal(err)
- }
- n, cm, peer, err := p.ReadFrom(rb)
- if err != nil {
- if err, ok := err.(net.Error); ok && err.Timeout() {
- fmt.Printf("%v\t*\n", i)
- continue
- }
- log.Fatal(err)
- }
- rm, err := icmp.ParseMessage(1, rb[:n])
- if err != nil {
- log.Fatal(err)
- }
- rtt := time.Since(begin)
-
- // In the real world you need to determine whether the
- // received message is yours using ControlMessage.Src,
- // ControlMessage.Dst, icmp.Echo.ID and icmp.Echo.Seq.
- switch rm.Type {
- case ipv4.ICMPTypeTimeExceeded:
- names, _ := net.LookupAddr(peer.String())
- fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, cm)
- case ipv4.ICMPTypeEchoReply:
- names, _ := net.LookupAddr(peer.String())
- fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, cm)
- return
- default:
- log.Printf("unknown ICMP message: %+v\n", rm)
- }
- }
-}
-
-func ExampleRawConn_advertisingOSPFHello() {
- c, err := net.ListenPacket("ip4:89", "0.0.0.0") // OSPF for IPv4
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- log.Fatal(err)
- }
-
- en0, err := net.InterfaceByName("en0")
- if err != nil {
- log.Fatal(err)
- }
- allSPFRouters := net.IPAddr{IP: net.IPv4(224, 0, 0, 5)}
- if err := r.JoinGroup(en0, &allSPFRouters); err != nil {
- log.Fatal(err)
- }
- defer r.LeaveGroup(en0, &allSPFRouters)
-
- hello := make([]byte, 24) // fake hello data, you need to implement this
- ospf := make([]byte, 24) // fake ospf header, you need to implement this
- ospf[0] = 2 // version 2
- ospf[1] = 1 // hello packet
- ospf = append(ospf, hello...)
- iph := &ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TOS: 0xc0, // DSCP CS6
- TotalLen: ipv4.HeaderLen + len(ospf),
- TTL: 1,
- Protocol: 89,
- Dst: allSPFRouters.IP.To4(),
- }
-
- var cm *ipv4.ControlMessage
- switch runtime.GOOS {
- case "darwin", "linux":
- cm = &ipv4.ControlMessage{IfIndex: en0.Index}
- default:
- if err := r.SetMulticastInterface(en0); err != nil {
- log.Fatal(err)
- }
- }
- if err := r.WriteTo(iph, ospf, cm); err != nil {
- log.Fatal(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/gen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/gen.go
deleted file mode 100644
index ffb44fe68..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/gen.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build ignore
-
-//go:generate go run gen.go
-
-// This program generates system adaptation constants and types,
-// internet protocol constants and tables by reading template files
-// and IANA protocol registries.
-package main
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "go/format"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "os/exec"
- "runtime"
- "strconv"
- "strings"
-)
-
-func main() {
- if err := genzsys(); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- if err := geniana(); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func genzsys() error {
- defs := "defs_" + runtime.GOOS + ".go"
- f, err := os.Open(defs)
- if err != nil {
- if os.IsNotExist(err) {
- return nil
- }
- return err
- }
- f.Close()
- cmd := exec.Command("go", "tool", "cgo", "-godefs", defs)
- b, err := cmd.Output()
- if err != nil {
- return err
- }
- b, err = format.Source(b)
- if err != nil {
- return err
- }
- zsys := "zsys_" + runtime.GOOS + ".go"
- switch runtime.GOOS {
- case "freebsd", "linux":
- zsys = "zsys_" + runtime.GOOS + "_" + runtime.GOARCH + ".go"
- }
- if err := ioutil.WriteFile(zsys, b, 0644); err != nil {
- return err
- }
- return nil
-}
-
-var registries = []struct {
- url string
- parse func(io.Writer, io.Reader) error
-}{
- {
- "http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml",
- parseICMPv4Parameters,
- },
-}
-
-func geniana() error {
- var bb bytes.Buffer
- fmt.Fprintf(&bb, "// go generate gen.go\n")
- fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n")
- fmt.Fprintf(&bb, "package ipv4\n\n")
- for _, r := range registries {
- resp, err := http.Get(r.url)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("got HTTP status code %v for %v\n", resp.StatusCode, r.url)
- }
- if err := r.parse(&bb, resp.Body); err != nil {
- return err
- }
- fmt.Fprintf(&bb, "\n")
- }
- b, err := format.Source(bb.Bytes())
- if err != nil {
- return err
- }
- if err := ioutil.WriteFile("iana.go", b, 0644); err != nil {
- return err
- }
- return nil
-}
-
-func parseICMPv4Parameters(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var icp icmpv4Parameters
- if err := dec.Decode(&icp); err != nil {
- return err
- }
- prs := icp.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, pr := range prs {
- if pr.Descr == "" {
- continue
- }
- fmt.Fprintf(w, "ICMPType%s ICMPType = %d", pr.Descr, pr.Value)
- fmt.Fprintf(w, "// %s\n", pr.OrigDescr)
- }
- fmt.Fprintf(w, ")\n\n")
- fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated)
- fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n")
- for _, pr := range prs {
- if pr.Descr == "" {
- continue
- }
- fmt.Fprintf(w, "%d: %q,\n", pr.Value, strings.ToLower(pr.OrigDescr))
- }
- fmt.Fprintf(w, "}\n")
- return nil
-}
-
-type icmpv4Parameters struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Registries []struct {
- Title string `xml:"title"`
- Records []struct {
- Value string `xml:"value"`
- Descr string `xml:"description"`
- } `xml:"record"`
- } `xml:"registry"`
-}
-
-type canonICMPv4ParamRecord struct {
- OrigDescr string
- Descr string
- Value int
-}
-
-func (icp *icmpv4Parameters) escape() []canonICMPv4ParamRecord {
- id := -1
- for i, r := range icp.Registries {
- if strings.Contains(r.Title, "Type") || strings.Contains(r.Title, "type") {
- id = i
- break
- }
- }
- if id < 0 {
- return nil
- }
- prs := make([]canonICMPv4ParamRecord, len(icp.Registries[id].Records))
- sr := strings.NewReplacer(
- "Messages", "",
- "Message", "",
- "ICMP", "",
- "+", "P",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, pr := range icp.Registries[id].Records {
- if strings.Contains(pr.Descr, "Reserved") ||
- strings.Contains(pr.Descr, "Unassigned") ||
- strings.Contains(pr.Descr, "Deprecated") ||
- strings.Contains(pr.Descr, "Experiment") ||
- strings.Contains(pr.Descr, "experiment") {
- continue
- }
- ss := strings.Split(pr.Descr, "\n")
- if len(ss) > 1 {
- prs[i].Descr = strings.Join(ss, " ")
- } else {
- prs[i].Descr = ss[0]
- }
- s := strings.TrimSpace(prs[i].Descr)
- prs[i].OrigDescr = s
- prs[i].Descr = sr.Replace(s)
- prs[i].Value, _ = strconv.Atoi(pr.Value)
- }
- return prs
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/genericopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/genericopt.go
deleted file mode 100644
index 119bf841b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/genericopt.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import "syscall"
-
-// TOS returns the type-of-service field value for outgoing packets.
-func (c *genericOpt) TOS() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoTOS]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetTOS sets the type-of-service field value for future outgoing
-// packets.
-func (c *genericOpt) SetTOS(tos int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoTOS]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, tos)
-}
-
-// TTL returns the time-to-live field value for outgoing packets.
-func (c *genericOpt) TTL() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoTTL]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetTTL sets the time-to-live field value for future outgoing
-// packets.
-func (c *genericOpt) SetTTL(ttl int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoTTL]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, ttl)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header.go
deleted file mode 100644
index 8bb0f0f4d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "encoding/binary"
- "fmt"
- "net"
- "runtime"
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-const (
- Version = 4 // protocol version
- HeaderLen = 20 // header length without extension headers
- maxHeaderLen = 60 // sensible default, revisit if later RFCs define new usage of version and header length fields
-)
-
-type HeaderFlags int
-
-const (
- MoreFragments HeaderFlags = 1 << iota // more fragments flag
- DontFragment // don't fragment flag
-)
-
-// A Header represents an IPv4 header.
-type Header struct {
- Version int // protocol version
- Len int // header length
- TOS int // type-of-service
- TotalLen int // packet total length
- ID int // identification
- Flags HeaderFlags // flags
- FragOff int // fragment offset
- TTL int // time-to-live
- Protocol int // next protocol
- Checksum int // checksum
- Src net.IP // source address
- Dst net.IP // destination address
- Options []byte // options, extension headers
-}
-
-func (h *Header) String() string {
- if h == nil {
- return "<nil>"
- }
- return fmt.Sprintf("ver=%d hdrlen=%d tos=%#x totallen=%d id=%#x flags=%#x fragoff=%#x ttl=%d proto=%d cksum=%#x src=%v dst=%v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst)
-}
-
-// Marshal returns the binary encoding of h.
-func (h *Header) Marshal() ([]byte, error) {
- if h == nil {
- return nil, syscall.EINVAL
- }
- if h.Len < HeaderLen {
- return nil, errHeaderTooShort
- }
- hdrlen := HeaderLen + len(h.Options)
- b := make([]byte, hdrlen)
- b[0] = byte(Version<<4 | (hdrlen >> 2 & 0x0f))
- b[1] = byte(h.TOS)
- flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13)
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
- case "freebsd":
- if freebsdVersion < 1100000 {
- socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
- } else {
- binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
- }
- default:
- binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
- }
- binary.BigEndian.PutUint16(b[4:6], uint16(h.ID))
- b[8] = byte(h.TTL)
- b[9] = byte(h.Protocol)
- binary.BigEndian.PutUint16(b[10:12], uint16(h.Checksum))
- if ip := h.Src.To4(); ip != nil {
- copy(b[12:16], ip[:net.IPv4len])
- }
- if ip := h.Dst.To4(); ip != nil {
- copy(b[16:20], ip[:net.IPv4len])
- } else {
- return nil, errMissingAddress
- }
- if len(h.Options) > 0 {
- copy(b[HeaderLen:], h.Options)
- }
- return b, nil
-}
-
-// Parse parses b as an IPv4 header and sotres the result in h.
-func (h *Header) Parse(b []byte) error {
- if h == nil || len(b) < HeaderLen {
- return errHeaderTooShort
- }
- hdrlen := int(b[0]&0x0f) << 2
- if hdrlen > len(b) {
- return errBufferTooShort
- }
- h.Version = int(b[0] >> 4)
- h.Len = hdrlen
- h.TOS = int(b[1])
- h.ID = int(binary.BigEndian.Uint16(b[4:6]))
- h.TTL = int(b[8])
- h.Protocol = int(b[9])
- h.Checksum = int(binary.BigEndian.Uint16(b[10:12]))
- h.Src = net.IPv4(b[12], b[13], b[14], b[15])
- h.Dst = net.IPv4(b[16], b[17], b[18], b[19])
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + hdrlen
- h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
- case "freebsd":
- if freebsdVersion < 1100000 {
- h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
- if freebsdVersion < 1000000 {
- h.TotalLen += hdrlen
- }
- h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
- } else {
- h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
- h.FragOff = int(binary.BigEndian.Uint16(b[6:8]))
- }
- default:
- h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
- h.FragOff = int(binary.BigEndian.Uint16(b[6:8]))
- }
- h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13
- h.FragOff = h.FragOff & 0x1fff
- optlen := hdrlen - HeaderLen
- if optlen > 0 && len(b) >= hdrlen {
- if cap(h.Options) < optlen {
- h.Options = make([]byte, optlen)
- } else {
- h.Options = h.Options[:optlen]
- }
- copy(h.Options, b[HeaderLen:hdrlen])
- }
- return nil
-}
-
-// ParseHeader parses b as an IPv4 header.
-func ParseHeader(b []byte) (*Header, error) {
- h := new(Header)
- if err := h.Parse(b); err != nil {
- return nil, err
- }
- return h, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header_test.go
deleted file mode 100644
index a246aeea1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/header_test.go
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "bytes"
- "encoding/binary"
- "net"
- "reflect"
- "runtime"
- "strings"
- "testing"
-
- "golang.org/x/net/internal/socket"
-)
-
-type headerTest struct {
- wireHeaderFromKernel []byte
- wireHeaderToKernel []byte
- wireHeaderFromTradBSDKernel []byte
- wireHeaderToTradBSDKernel []byte
- wireHeaderFromFreeBSD10Kernel []byte
- wireHeaderToFreeBSD10Kernel []byte
- *Header
-}
-
-var headerLittleEndianTests = []headerTest{
- // TODO(mikio): Add platform dependent wire header formats when
- // we support new platforms.
- {
- wireHeaderFromKernel: []byte{
- 0x45, 0x01, 0xbe, 0xef,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderToKernel: []byte{
- 0x45, 0x01, 0xbe, 0xef,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderFromTradBSDKernel: []byte{
- 0x45, 0x01, 0xdb, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderToTradBSDKernel: []byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderFromFreeBSD10Kernel: []byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderToFreeBSD10Kernel: []byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- Header: &Header{
- Version: Version,
- Len: HeaderLen,
- TOS: 1,
- TotalLen: 0xbeef,
- ID: 0xcafe,
- Flags: DontFragment,
- FragOff: 1500,
- TTL: 255,
- Protocol: 1,
- Checksum: 0xdead,
- Src: net.IPv4(172, 16, 254, 254),
- Dst: net.IPv4(192, 168, 0, 1),
- },
- },
-
- // with option headers
- {
- wireHeaderFromKernel: []byte{
- 0x46, 0x01, 0xbe, 0xf3,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- wireHeaderToKernel: []byte{
- 0x46, 0x01, 0xbe, 0xf3,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- wireHeaderFromTradBSDKernel: []byte{
- 0x46, 0x01, 0xdb, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- wireHeaderToTradBSDKernel: []byte{
- 0x46, 0x01, 0xf3, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- wireHeaderFromFreeBSD10Kernel: []byte{
- 0x46, 0x01, 0xf3, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- wireHeaderToFreeBSD10Kernel: []byte{
- 0x46, 0x01, 0xf3, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- 0xff, 0xfe, 0xfe, 0xff,
- },
- Header: &Header{
- Version: Version,
- Len: HeaderLen + 4,
- TOS: 1,
- TotalLen: 0xbef3,
- ID: 0xcafe,
- Flags: DontFragment,
- FragOff: 1500,
- TTL: 255,
- Protocol: 1,
- Checksum: 0xdead,
- Src: net.IPv4(172, 16, 254, 254),
- Dst: net.IPv4(192, 168, 0, 1),
- Options: []byte{0xff, 0xfe, 0xfe, 0xff},
- },
- },
-}
-
-func TestMarshalHeader(t *testing.T) {
- if socket.NativeEndian != binary.LittleEndian {
- t.Skip("no test for non-little endian machine yet")
- }
-
- for _, tt := range headerLittleEndianTests {
- b, err := tt.Header.Marshal()
- if err != nil {
- t.Fatal(err)
- }
- var wh []byte
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- wh = tt.wireHeaderToTradBSDKernel
- case "freebsd":
- switch {
- case freebsdVersion < 1000000:
- wh = tt.wireHeaderToTradBSDKernel
- case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
- wh = tt.wireHeaderToFreeBSD10Kernel
- default:
- wh = tt.wireHeaderToKernel
- }
- default:
- wh = tt.wireHeaderToKernel
- }
- if !bytes.Equal(b, wh) {
- t.Fatalf("got %#v; want %#v", b, wh)
- }
- }
-}
-
-func TestParseHeader(t *testing.T) {
- if socket.NativeEndian != binary.LittleEndian {
- t.Skip("no test for big endian machine yet")
- }
-
- for _, tt := range headerLittleEndianTests {
- var wh []byte
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- wh = tt.wireHeaderFromTradBSDKernel
- case "freebsd":
- switch {
- case freebsdVersion < 1000000:
- wh = tt.wireHeaderFromTradBSDKernel
- case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
- wh = tt.wireHeaderFromFreeBSD10Kernel
- default:
- wh = tt.wireHeaderFromKernel
- }
- default:
- wh = tt.wireHeaderFromKernel
- }
- h, err := ParseHeader(wh)
- if err != nil {
- t.Fatal(err)
- }
- if err := h.Parse(wh); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(h, tt.Header) {
- t.Fatalf("got %#v; want %#v", h, tt.Header)
- }
- s := h.String()
- if strings.Contains(s, ",") {
- t.Fatalf("should be space-separated values: %s", s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/helper.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/helper.go
deleted file mode 100644
index a5052e324..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/helper.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "errors"
- "net"
-)
-
-var (
- errMissingAddress = errors.New("missing address")
- errMissingHeader = errors.New("missing header")
- errHeaderTooShort = errors.New("header too short")
- errBufferTooShort = errors.New("buffer too short")
- errInvalidConnType = errors.New("invalid conn type")
- errOpNoSupport = errors.New("operation not supported")
- errNoSuchInterface = errors.New("no such interface")
- errNoSuchMulticastInterface = errors.New("no such multicast interface")
-
- // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
- freebsdVersion uint32
-)
-
-func boolint(b bool) int {
- if b {
- return 1
- }
- return 0
-}
-
-func netAddrToIP4(a net.Addr) net.IP {
- switch v := a.(type) {
- case *net.UDPAddr:
- if ip := v.IP.To4(); ip != nil {
- return ip
- }
- case *net.IPAddr:
- if ip := v.IP.To4(); ip != nil {
- return ip
- }
- }
- return nil
-}
-
-func opAddr(a net.Addr) net.Addr {
- switch a.(type) {
- case *net.TCPAddr:
- if a == nil {
- return nil
- }
- case *net.UDPAddr:
- if a == nil {
- return nil
- }
- case *net.IPAddr:
- if a == nil {
- return nil
- }
- }
- return a
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/iana.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/iana.go
deleted file mode 100644
index be10c9488..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/iana.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// go generate gen.go
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package ipv4
-
-// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19
-const (
- ICMPTypeEchoReply ICMPType = 0 // Echo Reply
- ICMPTypeDestinationUnreachable ICMPType = 3 // Destination Unreachable
- ICMPTypeRedirect ICMPType = 5 // Redirect
- ICMPTypeEcho ICMPType = 8 // Echo
- ICMPTypeRouterAdvertisement ICMPType = 9 // Router Advertisement
- ICMPTypeRouterSolicitation ICMPType = 10 // Router Solicitation
- ICMPTypeTimeExceeded ICMPType = 11 // Time Exceeded
- ICMPTypeParameterProblem ICMPType = 12 // Parameter Problem
- ICMPTypeTimestamp ICMPType = 13 // Timestamp
- ICMPTypeTimestampReply ICMPType = 14 // Timestamp Reply
- ICMPTypePhoturis ICMPType = 40 // Photuris
-)
-
-// Internet Control Message Protocol (ICMP) Parameters, Updated: 2013-04-19
-var icmpTypes = map[ICMPType]string{
- 0: "echo reply",
- 3: "destination unreachable",
- 5: "redirect",
- 8: "echo",
- 9: "router advertisement",
- 10: "router solicitation",
- 11: "time exceeded",
- 12: "parameter problem",
- 13: "timestamp",
- 14: "timestamp reply",
- 40: "photuris",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp.go
deleted file mode 100644
index 9902bb3d2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv4
-
-import "golang.org/x/net/internal/iana"
-
-// An ICMPType represents a type of ICMP message.
-type ICMPType int
-
-func (typ ICMPType) String() string {
- s, ok := icmpTypes[typ]
- if !ok {
- return "<nil>"
- }
- return s
-}
-
-// Protocol returns the ICMPv4 protocol number.
-func (typ ICMPType) Protocol() int {
- return iana.ProtocolICMP
-}
-
-// An ICMPFilter represents an ICMP message filter for incoming
-// packets. The filter belongs to a packet delivery path on a host and
-// it cannot interact with forwarding packets or tunnel-outer packets.
-//
-// Note: RFC 8200 defines a reasonable role model and it works not
-// only for IPv6 but IPv4. A node means a device that implements IP.
-// A router means a node that forwards IP packets not explicitly
-// addressed to itself, and a host means a node that is not a router.
-type ICMPFilter struct {
- icmpFilter
-}
-
-// Accept accepts incoming ICMP packets including the type field value
-// typ.
-func (f *ICMPFilter) Accept(typ ICMPType) {
- f.accept(typ)
-}
-
-// Block blocks incoming ICMP packets including the type field value
-// typ.
-func (f *ICMPFilter) Block(typ ICMPType) {
- f.block(typ)
-}
-
-// SetAll sets the filter action to the filter.
-func (f *ICMPFilter) SetAll(block bool) {
- f.setAll(block)
-}
-
-// WillBlock reports whether the ICMP type will be blocked.
-func (f *ICMPFilter) WillBlock(typ ICMPType) bool {
- return f.willBlock(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_linux.go
deleted file mode 100644
index 6e1c5c80a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_linux.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-func (f *icmpFilter) accept(typ ICMPType) {
- f.Data &^= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpFilter) block(typ ICMPType) {
- f.Data |= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpFilter) setAll(block bool) {
- if block {
- f.Data = 1<<32 - 1
- } else {
- f.Data = 0
- }
-}
-
-func (f *icmpFilter) willBlock(typ ICMPType) bool {
- return f.Data&(1<<(uint32(typ)&31)) != 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_stub.go
deleted file mode 100644
index 21bb29ab3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_stub.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !linux
-
-package ipv4
-
-const sizeofICMPFilter = 0x0
-
-type icmpFilter struct {
-}
-
-func (f *icmpFilter) accept(typ ICMPType) {
-}
-
-func (f *icmpFilter) block(typ ICMPType) {
-}
-
-func (f *icmpFilter) setAll(block bool) {
-}
-
-func (f *icmpFilter) willBlock(typ ICMPType) bool {
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_test.go
deleted file mode 100644
index 3324b54df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/icmp_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4_test
-
-import (
- "net"
- "reflect"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-var icmpStringTests = []struct {
- in ipv4.ICMPType
- out string
-}{
- {ipv4.ICMPTypeDestinationUnreachable, "destination unreachable"},
-
- {256, "<nil>"},
-}
-
-func TestICMPString(t *testing.T) {
- for _, tt := range icmpStringTests {
- s := tt.in.String()
- if s != tt.out {
- t.Errorf("got %s; want %s", s, tt.out)
- }
- }
-}
-
-func TestICMPFilter(t *testing.T) {
- switch runtime.GOOS {
- case "linux":
- default:
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- var f ipv4.ICMPFilter
- for _, toggle := range []bool{false, true} {
- f.SetAll(toggle)
- for _, typ := range []ipv4.ICMPType{
- ipv4.ICMPTypeDestinationUnreachable,
- ipv4.ICMPTypeEchoReply,
- ipv4.ICMPTypeTimeExceeded,
- ipv4.ICMPTypeParameterProblem,
- } {
- f.Accept(typ)
- if f.WillBlock(typ) {
- t.Errorf("ipv4.ICMPFilter.Set(%v, false) failed", typ)
- }
- f.Block(typ)
- if !f.WillBlock(typ) {
- t.Errorf("ipv4.ICMPFilter.Set(%v, true) failed", typ)
- }
- }
- }
-}
-
-func TestSetICMPFilter(t *testing.T) {
- switch runtime.GOOS {
- case "linux":
- default:
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket("ip4:icmp", "127.0.0.1")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv4.NewPacketConn(c)
-
- var f ipv4.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv4.ICMPTypeEcho)
- f.Accept(ipv4.ICMPTypeEchoReply)
- if err := p.SetICMPFilter(&f); err != nil {
- t.Fatal(err)
- }
- kf, err := p.ICMPFilter()
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(kf, &f) {
- t.Fatalf("got %#v; want %#v", kf, f)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicast_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicast_test.go
deleted file mode 100644
index bcf49736b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicast_test.go
+++ /dev/null
@@ -1,334 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "bytes"
- "net"
- "os"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-var packetConnReadWriteMulticastUDPTests = []struct {
- addr string
- grp, src *net.UDPAddr
-}{
- {"224.0.0.0:0", &net.UDPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727
-
- {"232.0.1.0:0", &net.UDPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
-}
-
-func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "solaris", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range packetConnReadWriteMulticastUDPTests {
- c, err := net.ListenPacket("udp4", tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- grp := *tt.grp
- grp.Port = c.LocalAddr().(*net.UDPAddr).Port
- p := ipv4.NewPacketConn(c)
- defer p.Close()
- if tt.src == nil {
- if err := p.JoinGroup(ifi, &grp); err != nil {
- t.Fatal(err)
- }
- defer p.LeaveGroup(ifi, &grp)
- } else {
- if err := p.JoinSourceSpecificGroup(ifi, &grp, tt.src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support IGMPv2/3 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- defer p.LeaveSourceSpecificGroup(ifi, &grp, tt.src)
- }
- if err := p.SetMulticastInterface(ifi); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastInterface(); err != nil {
- t.Fatal(err)
- }
- if err := p.SetMulticastLoopback(true); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastLoopback(); err != nil {
- t.Fatal(err)
- }
- cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface
- wb := []byte("HELLO-R-U-THERE")
-
- for i, toggle := range []bool{true, false, true} {
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- p.SetMulticastTTL(i + 1)
- if n, err := p.WriteTo(wb, nil, &grp); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else if !bytes.Equal(rb[:n], wb) {
- t.Fatalf("got %v; want %v", rb[:n], wb)
- }
- }
- }
-}
-
-var packetConnReadWriteMulticastICMPTests = []struct {
- grp, src *net.IPAddr
-}{
- {&net.IPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727
-
- {&net.IPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
-}
-
-func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "solaris", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range packetConnReadWriteMulticastICMPTests {
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv4.NewPacketConn(c)
- defer p.Close()
- if tt.src == nil {
- if err := p.JoinGroup(ifi, tt.grp); err != nil {
- t.Fatal(err)
- }
- defer p.LeaveGroup(ifi, tt.grp)
- } else {
- if err := p.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support IGMPv2/3 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- defer p.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src)
- }
- if err := p.SetMulticastInterface(ifi); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastInterface(); err != nil {
- t.Fatal(err)
- }
- if err := p.SetMulticastLoopback(true); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastLoopback(); err != nil {
- t.Fatal(err)
- }
- cf := ipv4.FlagDst | ipv4.FlagInterface
- if runtime.GOOS != "solaris" {
- // Solaris never allows to modify ICMP properties.
- cf |= ipv4.FlagTTL
- }
-
- for i, toggle := range []bool{true, false, true} {
- wb, err := (&icmp.Message{
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- p.SetMulticastTTL(i + 1)
- if n, err := p.WriteTo(wb, nil, tt.grp); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else {
- m, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n])
- if err != nil {
- t.Fatal(err)
- }
- switch {
- case m.Type == ipv4.ICMPTypeEchoReply && m.Code == 0: // net.inet.icmp.bmcastecho=1
- case m.Type == ipv4.ICMPTypeEcho && m.Code == 0: // net.inet.icmp.bmcastecho=0
- default:
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0)
- }
- }
- }
- }
-}
-
-var rawConnReadWriteMulticastICMPTests = []struct {
- grp, src *net.IPAddr
-}{
- {&net.IPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727
-
- {&net.IPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
-}
-
-func TestRawConnReadWriteMulticastICMP(t *testing.T) {
- if testing.Short() {
- t.Skip("to avoid external network")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range rawConnReadWriteMulticastICMPTests {
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
- if tt.src == nil {
- if err := r.JoinGroup(ifi, tt.grp); err != nil {
- t.Fatal(err)
- }
- defer r.LeaveGroup(ifi, tt.grp)
- } else {
- if err := r.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support IGMPv2/3 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- defer r.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src)
- }
- if err := r.SetMulticastInterface(ifi); err != nil {
- t.Fatal(err)
- }
- if _, err := r.MulticastInterface(); err != nil {
- t.Fatal(err)
- }
- if err := r.SetMulticastLoopback(true); err != nil {
- t.Fatal(err)
- }
- if _, err := r.MulticastLoopback(); err != nil {
- t.Fatal(err)
- }
- cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface
-
- for i, toggle := range []bool{true, false, true} {
- wb, err := (&icmp.Message{
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- wh := &ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TOS: i + 1,
- TotalLen: ipv4.HeaderLen + len(wb),
- Protocol: 1,
- Dst: tt.grp.IP,
- }
- if err := r.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := r.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- r.SetMulticastTTL(i + 1)
- if err := r.WriteTo(wh, wb, nil); err != nil {
- t.Fatal(err)
- }
- rb := make([]byte, ipv4.HeaderLen+128)
- if rh, b, _, err := r.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else {
- m, err := icmp.ParseMessage(iana.ProtocolICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- switch {
- case (rh.Dst.IsLoopback() || rh.Dst.IsLinkLocalUnicast() || rh.Dst.IsGlobalUnicast()) && m.Type == ipv4.ICMPTypeEchoReply && m.Code == 0: // net.inet.icmp.bmcastecho=1
- case rh.Dst.IsMulticast() && m.Type == ipv4.ICMPTypeEcho && m.Code == 0: // net.inet.icmp.bmcastecho=0
- default:
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0)
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastlistener_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastlistener_test.go
deleted file mode 100644
index e43fbbe08..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastlistener_test.go
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-var udpMultipleGroupListenerTests = []net.Addr{
- &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}, // see RFC 4727
- &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)},
- &net.UDPAddr{IP: net.IPv4(224, 0, 0, 254)},
-}
-
-func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if testing.Short() {
- t.Skip("to avoid external network")
- }
-
- for _, gaddr := range udpMultipleGroupListenerTests {
- c, err := net.ListenPacket("udp4", "0.0.0.0:0") // wildcard address with no reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv4.NewPacketConn(c)
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok {
- continue
- }
- if err := p.JoinGroup(&ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- if err := p.LeaveGroup(ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- }
-}
-
-func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if testing.Short() {
- t.Skip("to avoid external network")
- }
-
- for _, gaddr := range udpMultipleGroupListenerTests {
- c1, err := net.ListenPacket("udp4", "224.0.0.0:0") // wildcard address with reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c1.Close()
- _, port, err := net.SplitHostPort(c1.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- c2, err := net.ListenPacket("udp4", net.JoinHostPort("224.0.0.0", port)) // wildcard address with reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c2.Close()
-
- var ps [2]*ipv4.PacketConn
- ps[0] = ipv4.NewPacketConn(c1)
- ps[1] = ipv4.NewPacketConn(c2)
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok {
- continue
- }
- for _, p := range ps {
- if err := p.JoinGroup(&ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- for _, p := range ps {
- if err := p.LeaveGroup(ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- }
- }
-}
-
-func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if testing.Short() {
- t.Skip("to avoid external network")
- }
-
- gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
- type ml struct {
- c *ipv4.PacketConn
- ifi *net.Interface
- }
- var mlt []*ml
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- port := "0"
- for i, ifi := range ift {
- ip, ok := nettest.IsMulticastCapable("ip4", &ifi)
- if !ok {
- continue
- }
- c, err := net.ListenPacket("udp4", net.JoinHostPort(ip.String(), port)) // unicast address with non-reusable port
- if err != nil {
- // The listen may fail when the serivce is
- // already in use, but it's fine because the
- // purpose of this is not to test the
- // bookkeeping of IP control block inside the
- // kernel.
- t.Log(err)
- continue
- }
- defer c.Close()
- if port == "0" {
- _, port, err = net.SplitHostPort(c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- }
- p := ipv4.NewPacketConn(c)
- if err := p.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mlt = append(mlt, &ml{p, &ift[i]})
- }
- for _, m := range mlt {
- if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if testing.Short() {
- t.Skip("to avoid external network")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") // wildcard address
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
- gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok {
- continue
- }
- if err := r.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- if err := r.LeaveGroup(ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestIPPerInterfaceSingleRawConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if testing.Short() {
- t.Skip("to avoid external network")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
- type ml struct {
- c *ipv4.RawConn
- ifi *net.Interface
- }
- var mlt []*ml
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- ip, ok := nettest.IsMulticastCapable("ip4", &ifi)
- if !ok {
- continue
- }
- c, err := net.ListenPacket("ip4:253", ip.String()) // unicast address
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
- if err := r.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mlt = append(mlt, &ml{r, &ift[i]})
- }
- for _, m := range mlt {
- if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go
deleted file mode 100644
index f7efac24c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-var packetConnMulticastSocketOptionTests = []struct {
- net, proto, addr string
- grp, src net.Addr
-}{
- {"udp4", "", "224.0.0.0:0", &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}, nil}, // see RFC 4727
- {"ip4", ":icmp", "0.0.0.0", &net.IPAddr{IP: net.IPv4(224, 0, 0, 250)}, nil}, // see RFC 4727
-
- {"udp4", "", "232.0.0.0:0", &net.UDPAddr{IP: net.IPv4(232, 0, 1, 249)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
- {"ip4", ":icmp", "0.0.0.0", &net.IPAddr{IP: net.IPv4(232, 0, 1, 250)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
-}
-
-func TestPacketConnMulticastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- m, ok := nettest.SupportsRawIPSocket()
- for _, tt := range packetConnMulticastSocketOptionTests {
- if tt.net == "ip4" && !ok {
- t.Log(m)
- continue
- }
- c, err := net.ListenPacket(tt.net+tt.proto, tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- defer p.Close()
-
- if tt.src == nil {
- testMulticastSocketOptions(t, p, ifi, tt.grp)
- } else {
- testSourceSpecificMulticastSocketOptions(t, p, ifi, tt.grp, tt.src)
- }
- }
-}
-
-var rawConnMulticastSocketOptionTests = []struct {
- grp, src net.Addr
-}{
- {&net.IPAddr{IP: net.IPv4(224, 0, 0, 250)}, nil}, // see RFC 4727
-
- {&net.IPAddr{IP: net.IPv4(232, 0, 1, 250)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771
-}
-
-func TestRawConnMulticastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range rawConnMulticastSocketOptionTests {
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
-
- if tt.src == nil {
- testMulticastSocketOptions(t, r, ifi, tt.grp)
- } else {
- testSourceSpecificMulticastSocketOptions(t, r, ifi, tt.grp, tt.src)
- }
- }
-}
-
-type testIPv4MulticastConn interface {
- MulticastTTL() (int, error)
- SetMulticastTTL(ttl int) error
- MulticastLoopback() (bool, error)
- SetMulticastLoopback(bool) error
- JoinGroup(*net.Interface, net.Addr) error
- LeaveGroup(*net.Interface, net.Addr) error
- JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
-}
-
-func testMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp net.Addr) {
- const ttl = 255
- if err := c.SetMulticastTTL(ttl); err != nil {
- t.Error(err)
- return
- }
- if v, err := c.MulticastTTL(); err != nil {
- t.Error(err)
- return
- } else if v != ttl {
- t.Errorf("got %v; want %v", v, ttl)
- return
- }
-
- for _, toggle := range []bool{true, false} {
- if err := c.SetMulticastLoopback(toggle); err != nil {
- t.Error(err)
- return
- }
- if v, err := c.MulticastLoopback(); err != nil {
- t.Error(err)
- return
- } else if v != toggle {
- t.Errorf("got %v; want %v", v, toggle)
- return
- }
- }
-
- if err := c.JoinGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-}
-
-func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp, src net.Addr) {
- // MCAST_JOIN_GROUP -> MCAST_BLOCK_SOURCE -> MCAST_UNBLOCK_SOURCE -> MCAST_LEAVE_GROUP
- if err := c.JoinGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
- if err := c.ExcludeSourceSpecificGroup(ifi, grp, src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support IGMPv2/3 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- return
- }
- t.Error(err)
- return
- }
- if err := c.IncludeSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-
- // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_SOURCE_GROUP
- if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
-
- // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_GROUP
- if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet.go
deleted file mode 100644
index f00f5b052..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the ReadFrom and WriteTo methods of RawConn
-// are not implemented.
-
-// A packetHandler represents the IPv4 datagram handler.
-type packetHandler struct {
- *net.IPConn
- *socket.Conn
- rawOpt
-}
-
-func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn != nil }
-
-// ReadFrom reads an IPv4 datagram from the endpoint c, copying the
-// datagram into b. It returns the received datagram as the IPv4
-// header h, the payload p and the control message cm.
-func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
- if !c.ok() {
- return nil, nil, nil, syscall.EINVAL
- }
- return c.readFrom(b)
-}
-
-func slicePacket(b []byte) (h, p []byte, err error) {
- if len(b) < HeaderLen {
- return nil, nil, errHeaderTooShort
- }
- hdrlen := int(b[0]&0x0f) << 2
- return b[:hdrlen], b[hdrlen:], nil
-}
-
-// WriteTo writes an IPv4 datagram through the endpoint c, copying the
-// datagram from the IPv4 header h and the payload p. The control
-// message cm allows the datagram path and the outgoing interface to be
-// specified. Currently only Darwin and Linux support this. The cm
-// may be nil if control of the outgoing datagram is not required.
-//
-// The IPv4 header h must contain appropriate fields that include:
-//
-// Version = <must be specified>
-// Len = <must be specified>
-// TOS = <must be specified>
-// TotalLen = <must be specified>
-// ID = platform sets an appropriate value if ID is zero
-// FragOff = <must be specified>
-// TTL = <must be specified>
-// Protocol = <must be specified>
-// Checksum = platform sets an appropriate value if Checksum is zero
-// Src = platform sets an appropriate value if Src is nil
-// Dst = <must be specified>
-// Options = optional
-func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- return c.writeTo(h, p, cm)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_8.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_8.go
deleted file mode 100644
index b47d18683..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_8.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !go1.9
-
-package ipv4
-
-import "net"
-
-func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
- c.rawOpt.RLock()
- oob := NewControlMessage(c.rawOpt.cflags)
- c.rawOpt.RUnlock()
- n, nn, _, src, err := c.ReadMsgIP(b, oob)
- if err != nil {
- return nil, nil, nil, err
- }
- var hs []byte
- if hs, p, err = slicePacket(b[:n]); err != nil {
- return nil, nil, nil, err
- }
- if h, err = ParseHeader(hs); err != nil {
- return nil, nil, nil, err
- }
- if nn > 0 {
- cm = new(ControlMessage)
- if err := cm.Parse(oob[:nn]); err != nil {
- return nil, nil, nil, err
- }
- }
- if src != nil && cm != nil {
- cm.Src = src.IP
- }
- return
-}
-
-func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error {
- oob := cm.Marshal()
- wh, err := h.Marshal()
- if err != nil {
- return err
- }
- dst := new(net.IPAddr)
- if cm != nil {
- if ip := cm.Dst.To4(); ip != nil {
- dst.IP = ip
- }
- }
- if dst.IP == nil {
- dst.IP = h.Dst
- }
- wh = append(wh, p...)
- _, _, err = c.WriteMsgIP(wh, oob, dst)
- return err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_9.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_9.go
deleted file mode 100644
index 082c36d73..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/packet_go1_9.go
+++ /dev/null
@@ -1,67 +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 file.
-
-// +build go1.9
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
- c.rawOpt.RLock()
- m := socket.Message{
- Buffers: [][]byte{b},
- OOB: NewControlMessage(c.rawOpt.cflags),
- }
- c.rawOpt.RUnlock()
- if err := c.RecvMsg(&m, 0); err != nil {
- return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- var hs []byte
- if hs, p, err = slicePacket(b[:m.N]); err != nil {
- return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- if h, err = ParseHeader(hs); err != nil {
- return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- if m.NN > 0 {
- cm = new(ControlMessage)
- if err := cm.Parse(m.OOB[:m.NN]); err != nil {
- return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
- }
- }
- if src, ok := m.Addr.(*net.IPAddr); ok && cm != nil {
- cm.Src = src.IP
- }
- return
-}
-
-func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error {
- m := socket.Message{
- OOB: cm.Marshal(),
- }
- wh, err := h.Marshal()
- if err != nil {
- return err
- }
- m.Buffers = [][]byte{wh, p}
- dst := new(net.IPAddr)
- if cm != nil {
- if ip := cm.Dst.To4(); ip != nil {
- dst.IP = ip
- }
- }
- if dst.IP == nil {
- dst.IP = h.Dst
- }
- m.Addr = dst
- if err := c.SendMsg(&m, 0); err != nil {
- return &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Addr: opAddr(dst), Err: err}
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload.go
deleted file mode 100644
index f95f811ac..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
-// methods of PacketConn is not implemented.
-
-// A payloadHandler represents the IPv4 datagram payload handler.
-type payloadHandler struct {
- net.PacketConn
- *socket.Conn
- rawOpt
-}
-
-func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg.go
deleted file mode 100644
index 3f06d7606..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !nacl,!plan9,!windows
-
-package ipv4
-
-import (
- "net"
- "syscall"
-)
-
-// ReadFrom reads a payload of the received IPv4 datagram, from the
-// endpoint c, copying the payload into b. It returns the number of
-// bytes copied into b, the control message cm and the source address
-// src of the received datagram.
-func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- if !c.ok() {
- return 0, nil, nil, syscall.EINVAL
- }
- return c.readFrom(b)
-}
-
-// WriteTo writes a payload of the IPv4 datagram, to the destination
-// address dst through the endpoint c, copying the payload from b. It
-// returns the number of bytes written. The control message cm allows
-// the datagram path and the outgoing interface to be specified.
-// Currently only Darwin and Linux support this. The cm may be nil if
-// control of the outgoing datagram is not required.
-func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- return c.writeTo(b, cm, dst)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
deleted file mode 100644
index d26ccd90c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !go1.9
-// +build !nacl,!plan9,!windows
-
-package ipv4
-
-import "net"
-
-func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- c.rawOpt.RLock()
- oob := NewControlMessage(c.rawOpt.cflags)
- c.rawOpt.RUnlock()
- var nn int
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- case *net.IPConn:
- nb := make([]byte, maxHeaderLen+len(b))
- if n, nn, _, src, err = c.ReadMsgIP(nb, oob); err != nil {
- return 0, nil, nil, err
- }
- hdrlen := int(nb[0]&0x0f) << 2
- copy(b, nb[hdrlen:])
- n -= hdrlen
- default:
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType}
- }
- if nn > 0 {
- cm = new(ControlMessage)
- if err = cm.Parse(oob[:nn]); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- }
- if cm != nil {
- cm.Src = netAddrToIP4(src)
- }
- return
-}
-
-func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- oob := cm.Marshal()
- if dst == nil {
- return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress}
- }
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
- case *net.IPConn:
- n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
- default:
- return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType}
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
deleted file mode 100644
index 2f1931183..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
+++ /dev/null
@@ -1,67 +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 file.
-
-// +build go1.9
-// +build !nacl,!plan9,!windows
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) {
- c.rawOpt.RLock()
- m := socket.Message{
- OOB: NewControlMessage(c.rawOpt.cflags),
- }
- c.rawOpt.RUnlock()
- switch c.PacketConn.(type) {
- case *net.UDPConn:
- m.Buffers = [][]byte{b}
- if err := c.RecvMsg(&m, 0); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- case *net.IPConn:
- h := make([]byte, HeaderLen)
- m.Buffers = [][]byte{h, b}
- if err := c.RecvMsg(&m, 0); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- hdrlen := int(h[0]&0x0f) << 2
- if hdrlen > len(h) {
- d := hdrlen - len(h)
- copy(b, b[d:])
- m.N -= d
- } else {
- m.N -= hdrlen
- }
- default:
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
- }
- var cm *ControlMessage
- if m.NN > 0 {
- cm = new(ControlMessage)
- if err := cm.Parse(m.OOB[:m.NN]); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- cm.Src = netAddrToIP4(m.Addr)
- }
- return m.N, cm, m.Addr, nil
-}
-
-func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) {
- m := socket.Message{
- Buffers: [][]byte{b},
- OOB: cm.Marshal(),
- Addr: dst,
- }
- err := c.SendMsg(&m, 0)
- if err != nil {
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
- }
- return m.N, err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
deleted file mode 100644
index 3926de70b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build nacl plan9 windows
-
-package ipv4
-
-import (
- "net"
- "syscall"
-)
-
-// ReadFrom reads a payload of the received IPv4 datagram, from the
-// endpoint c, copying the payload into b. It returns the number of
-// bytes copied into b, the control message cm and the source address
-// src of the received datagram.
-func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- if !c.ok() {
- return 0, nil, nil, syscall.EINVAL
- }
- if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
- return 0, nil, nil, err
- }
- return
-}
-
-// WriteTo writes a payload of the IPv4 datagram, to the destination
-// address dst through the endpoint c, copying the payload from b. It
-// returns the number of bytes written. The control message cm allows
-// the datagram path and the outgoing interface to be specified.
-// Currently only Darwin and Linux support this. The cm may be nil if
-// control of the outgoing datagram is not required.
-func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- if dst == nil {
- return 0, errMissingAddress
- }
- return c.PacketConn.WriteTo(b, dst)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go
deleted file mode 100644
index 1cd926e7f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !go1.9
-
-package ipv4_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- b.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph, err := (&ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TotalLen: ipv4.HeaderLen + len(payload),
- TTL: 1,
- Protocol: iana.ProtocolReserved,
- Src: net.IPv4(192, 0, 2, 1),
- Dst: net.IPv4(192, 0, 2, 254),
- }).Marshal()
- if err != nil {
- b.Fatal(err)
- }
- greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
- bb := make([]byte, 128)
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- b.Run("UDP", func(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(payload, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(payload, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
- b.Run("IP", func(b *testing.B) {
- switch runtime.GOOS {
- case "netbsd":
- b.Skip("need to configure gre on netbsd")
- case "openbsd":
- b.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(datagram, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph, err := (&ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TotalLen: ipv4.HeaderLen + len(payload),
- TTL: 1,
- Protocol: iana.ProtocolReserved,
- Src: net.IPv4(192, 0, 2, 1),
- Dst: net.IPv4(192, 0, 2, 254),
- }).Marshal()
- if err != nil {
- t.Fatal(err)
- }
- greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
-
- t.Run("UDP", func(t *testing.T) {
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr())
- })
- })
- t.Run("IP", func(t *testing.T) {
- switch runtime.GOOS {
- case "netbsd":
- t.Skip("need to configure gre on netbsd")
- case "openbsd":
- t.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr())
- })
- })
-}
-
-func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr) {
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- b := make([]byte, 128)
- n, cm, _, err := p.ReadFrom(b)
- if err != nil {
- t.Error(err)
- return
- }
- if !bytes.Equal(b[:n], data) {
- t.Errorf("got %#v; want %#v", b[:n], data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- n, err := p.WriteTo(data, &cm, dst)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(data) {
- t.Errorf("got %d; want %d", n, len(data))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- go writer(i%2 != 0)
-
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go
deleted file mode 100644
index 365de022a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go
+++ /dev/null
@@ -1,388 +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 file.
-
-// +build go1.9
-
-package ipv4_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- b.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph, err := (&ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TotalLen: ipv4.HeaderLen + len(payload),
- TTL: 1,
- Protocol: iana.ProtocolReserved,
- Src: net.IPv4(192, 0, 2, 1),
- Dst: net.IPv4(192, 0, 2, 254),
- }).Marshal()
- if err != nil {
- b.Fatal(err)
- }
- greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
- bb := make([]byte, 128)
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- b.Run("UDP", func(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- wms := []ipv4.Message{
- {
- Buffers: [][]byte{payload},
- Addr: dst,
- OOB: cm.Marshal(),
- },
- }
- rms := []ipv4.Message{
- {
- Buffers: [][]byte{bb},
- OOB: ipv4.NewControlMessage(cf),
- },
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(payload, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(payload, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("Batch", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteBatch(wms, 0); err != nil {
- b.Fatal(err)
- }
- if _, err := p.ReadBatch(rms, 0); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
- b.Run("IP", func(b *testing.B) {
- switch runtime.GOOS {
- case "netbsd":
- b.Skip("need to configure gre on netbsd")
- case "openbsd":
- b.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- wms := []ipv4.Message{
- {
- Buffers: [][]byte{datagram},
- Addr: dst,
- OOB: cm.Marshal(),
- },
- }
- rms := []ipv4.Message{
- {
- Buffers: [][]byte{bb},
- OOB: ipv4.NewControlMessage(cf),
- },
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(datagram, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("Batch", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteBatch(wms, 0); err != nil {
- b.Fatal(err)
- }
- if _, err := p.ReadBatch(rms, 0); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph, err := (&ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TotalLen: ipv4.HeaderLen + len(payload),
- TTL: 1,
- Protocol: iana.ProtocolReserved,
- Src: net.IPv4(192, 0, 2, 1),
- Dst: net.IPv4(192, 0, 2, 254),
- }).Marshal()
- if err != nil {
- t.Fatal(err)
- }
- greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
-
- t.Run("UDP", func(t *testing.T) {
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false)
- })
- t.Run("Batch", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true)
- })
- })
- t.Run("IP", func(t *testing.T) {
- switch runtime.GOOS {
- case "netbsd":
- t.Skip("need to configure gre on netbsd")
- case "openbsd":
- t.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false)
- })
- t.Run("Batch", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true)
- })
- })
-}
-
-func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr, batch bool) {
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- b := make([]byte, 128)
- n, cm, _, err := p.ReadFrom(b)
- if err != nil {
- t.Error(err)
- return
- }
- if !bytes.Equal(b[:n], data) {
- t.Errorf("got %#v; want %#v", b[:n], data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- batchReader := func() {
- defer wg.Done()
- ms := []ipv4.Message{
- {
- Buffers: [][]byte{make([]byte, 128)},
- OOB: ipv4.NewControlMessage(cf),
- },
- }
- n, err := p.ReadBatch(ms, 0)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(ms) {
- t.Errorf("got %d; want %d", n, len(ms))
- return
- }
- var cm ipv4.ControlMessage
- if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil {
- t.Error(err)
- return
- }
- var b []byte
- if _, ok := dst.(*net.IPAddr); ok {
- var h ipv4.Header
- if err := h.Parse(ms[0].Buffers[0][:ms[0].N]); err != nil {
- t.Error(err)
- return
- }
- b = ms[0].Buffers[0][h.Len:ms[0].N]
- } else {
- b = ms[0].Buffers[0][:ms[0].N]
- }
- if !bytes.Equal(b, data) {
- t.Errorf("got %#v; want %#v", b, data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- n, err := p.WriteTo(data, &cm, dst)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(data) {
- t.Errorf("got %d; want %d", n, len(data))
- return
- }
- }
- batchWriter := func(toggle bool) {
- defer wg.Done()
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- ms := []ipv4.Message{
- {
- Buffers: [][]byte{data},
- OOB: cm.Marshal(),
- Addr: dst,
- },
- }
- n, err := p.WriteBatch(ms, 0)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(ms) {
- t.Errorf("got %d; want %d", n, len(ms))
- return
- }
- if ms[0].N != len(data) {
- t.Errorf("got %d; want %d", ms[0].N, len(data))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- if batch {
- go batchReader()
- } else {
- go reader()
- }
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- if batch {
- go batchWriter(i%2 != 0)
- } else {
- go writer(i%2 != 0)
- }
-
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- if batch {
- go batchReader()
- } else {
- go reader()
- }
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_test.go
deleted file mode 100644
index 3896a8ae4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/readwrite_test.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "bytes"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-func BenchmarkReadWriteUnicast(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
-
- dst := c.LocalAddr()
- wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
-
- b.Run("NetUDP", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(wb, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("IPv4UDP", func(b *testing.B) {
- p := ipv4.NewPacketConn(c)
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- cm := ipv4.ControlMessage{TTL: 1}
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(wb, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- defer p.Close()
-
- dst := c.LocalAddr()
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
- wb := []byte("HELLO-R-U-THERE")
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- rb := make([]byte, 128)
- if n, cm, _, err := p.ReadFrom(rb); err != nil {
- t.Error(err)
- return
- } else if !bytes.Equal(rb[:n], wb) {
- t.Errorf("got %v; want %v", rb[:n], wb)
- return
- } else {
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- }
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv4.ControlMessage{
- Src: net.IPv4(127, 0, 0, 1),
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- t.Error(err)
- return
- } else if n != len(wb) {
- t.Errorf("got %d; want %d", n, len(wb))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- go writer(i%2 != 0)
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt.go
deleted file mode 100644
index 22e90c039..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-import "golang.org/x/net/internal/socket"
-
-// Sticky socket options
-const (
- ssoTOS = iota // header field for unicast packet
- ssoTTL // header field for unicast packet
- ssoMulticastTTL // header field for multicast packet
- ssoMulticastInterface // outbound interface for multicast packet
- ssoMulticastLoopback // loopback for multicast packet
- ssoReceiveTTL // header field on received packet
- ssoReceiveDst // header field on received packet
- ssoReceiveInterface // inbound interface on received packet
- ssoPacketInfo // incbound or outbound packet path
- ssoHeaderPrepend // ipv4 header prepend
- ssoStripHeader // strip ipv4 header
- ssoICMPFilter // icmp filter
- ssoJoinGroup // any-source multicast
- ssoLeaveGroup // any-source multicast
- ssoJoinSourceGroup // source-specific multicast
- ssoLeaveSourceGroup // source-specific multicast
- ssoBlockSourceGroup // any-source or source-specific multicast
- ssoUnblockSourceGroup // any-source or source-specific multicast
- ssoAttachFilter // attach BPF for filtering inbound traffic
-)
-
-// Sticky socket option value types
-const (
- ssoTypeIPMreq = iota + 1
- ssoTypeIPMreqn
- ssoTypeGroupReq
- ssoTypeGroupSourceReq
-)
-
-// A sockOpt represents a binding for sticky socket option.
-type sockOpt struct {
- socket.Option
- typ int // hint for option value type; optional
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_posix.go
deleted file mode 100644
index e96955bc1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_posix.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package ipv4
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
- switch so.typ {
- case ssoTypeIPMreqn:
- return so.getIPMreqn(c)
- default:
- return so.getMulticastIf(c)
- }
-}
-
-func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
- switch so.typ {
- case ssoTypeIPMreqn:
- return so.setIPMreqn(c, ifi, nil)
- default:
- return so.setMulticastIf(c, ifi)
- }
-}
-
-func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
- b := make([]byte, so.Len)
- n, err := so.Get(c, b)
- if err != nil {
- return nil, err
- }
- if n != sizeofICMPFilter {
- return nil, errOpNoSupport
- }
- return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
-}
-
-func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
- b := (*[sizeofICMPFilter]byte)(unsafe.Pointer(f))[:sizeofICMPFilter]
- return so.Set(c, b)
-}
-
-func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- switch so.typ {
- case ssoTypeIPMreq:
- return so.setIPMreq(c, ifi, grp)
- case ssoTypeIPMreqn:
- return so.setIPMreqn(c, ifi, grp)
- case ssoTypeGroupReq:
- return so.setGroupReq(c, ifi, grp)
- default:
- return errOpNoSupport
- }
-}
-
-func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return so.setGroupSourceReq(c, ifi, grp, src)
-}
-
-func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
- return so.setAttachFilter(c, f)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_stub.go
deleted file mode 100644
index 23249b782..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sockopt_stub.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq.go
deleted file mode 100644
index 0388cba00..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd solaris windows
-
-package ipv4
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}}
- if err := setIPMreqInterface(&mreq, ifi); err != nil {
- return err
- }
- b := (*[sizeofIPMreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPMreq]
- return so.Set(c, b)
-}
-
-func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
- var b [4]byte
- if _, err := so.Get(c, b[:]); err != nil {
- return nil, err
- }
- ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3]))
- if err != nil {
- return nil, err
- }
- return ifi, nil
-}
-
-func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
- ip, err := netInterfaceToIP4(ifi)
- if err != nil {
- return err
- }
- var b [4]byte
- copy(b[:], ip)
- return so.Set(c, b[:])
-}
-
-func setIPMreqInterface(mreq *ipMreq, ifi *net.Interface) error {
- if ifi == nil {
- return nil
- }
- ifat, err := ifi.Addrs()
- if err != nil {
- return err
- }
- for _, ifa := range ifat {
- switch ifa := ifa.(type) {
- case *net.IPAddr:
- if ip := ifa.IP.To4(); ip != nil {
- copy(mreq.Interface[:], ip)
- return nil
- }
- case *net.IPNet:
- if ip := ifa.IP.To4(); ip != nil {
- copy(mreq.Interface[:], ip)
- return nil
- }
- }
- }
- return errNoSuchInterface
-}
-
-func netIP4ToInterface(ip net.IP) (*net.Interface, error) {
- ift, err := net.Interfaces()
- if err != nil {
- return nil, err
- }
- for _, ifi := range ift {
- ifat, err := ifi.Addrs()
- if err != nil {
- return nil, err
- }
- for _, ifa := range ifat {
- switch ifa := ifa.(type) {
- case *net.IPAddr:
- if ip.Equal(ifa.IP) {
- return &ifi, nil
- }
- case *net.IPNet:
- if ip.Equal(ifa.IP) {
- return &ifi, nil
- }
- }
- }
- }
- return nil, errNoSuchInterface
-}
-
-func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) {
- if ifi == nil {
- return net.IPv4zero.To4(), nil
- }
- ifat, err := ifi.Addrs()
- if err != nil {
- return nil, err
- }
- for _, ifa := range ifat {
- switch ifa := ifa.(type) {
- case *net.IPAddr:
- if ip := ifa.IP.To4(); ip != nil {
- return ip, nil
- }
- case *net.IPNet:
- if ip := ifa.IP.To4(); ip != nil {
- return ip, nil
- }
- }
- }
- return nil, errNoSuchInterface
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
deleted file mode 100644
index f3919208b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
+++ /dev/null
@@ -1,25 +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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
deleted file mode 100644
index 1f24f69f3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin freebsd linux
-
-package ipv4
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
- b := make([]byte, so.Len)
- if _, err := so.Get(c, b); err != nil {
- return nil, err
- }
- mreqn := (*ipMreqn)(unsafe.Pointer(&b[0]))
- if mreqn.Ifindex == 0 {
- return nil, nil
- }
- ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex))
- if err != nil {
- return nil, err
- }
- return ifi, nil
-}
-
-func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- var mreqn ipMreqn
- if ifi != nil {
- mreqn.Ifindex = int32(ifi.Index)
- }
- if grp != nil {
- mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]}
- }
- b := (*[sizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:sizeofIPMreqn]
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
deleted file mode 100644
index 0711d3d78..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !darwin,!freebsd,!linux
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf.go
deleted file mode 100644
index 9f30b7308..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf.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 file.
-
-// +build linux
-
-package ipv4
-
-import (
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
- prog := sockFProg{
- Len: uint16(len(f)),
- Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
- }
- b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
deleted file mode 100644
index 9a2132093..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
+++ /dev/null
@@ -1,16 +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 file.
-
-// +build !linux
-
-package ipv4
-
-import (
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bsd.go
deleted file mode 100644
index 58256dd9d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_bsd.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build netbsd openbsd
-
-package ipv4
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
- ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
- ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
- ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- }
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_darwin.go
deleted file mode 100644
index e8fb19169..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_darwin.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-import (
- "net"
- "strconv"
- "strings"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
- ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
- ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
- ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoStripHeader: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_STRIPHDR, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- }
-)
-
-func init() {
- // Seems like kern.osreldate is veiled on latest OS X. We use
- // kern.osrelease instead.
- s, err := syscall.Sysctl("kern.osrelease")
- if err != nil {
- return
- }
- ss := strings.Split(s, ".")
- if len(ss) == 0 {
- return
- }
- // The IP_PKTINFO and protocol-independent multicast API were
- // introduced in OS X 10.7 (Darwin 11). But it looks like
- // those features require OS X 10.8 (Darwin 12) or above.
- // See http://support.apple.com/kb/HT1633.
- if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 {
- return
- }
- ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO
- ctlOpts[ctlPacketInfo].length = sizeofInetPktinfo
- ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo
- ctlOpts[ctlPacketInfo].parse = parsePacketInfo
- sockOpts[ssoPacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}}
- sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}
- sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
- sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
- sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
-}
-
-func (pi *inetPktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
deleted file mode 100644
index 859764f33..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
+++ /dev/null
@@ -1,35 +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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
- ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
- ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
- ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- }
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_freebsd.go
deleted file mode 100644
index b80032454..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_freebsd.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-import (
- "net"
- "runtime"
- "strings"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
- ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
- ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
- ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- }
-)
-
-func init() {
- freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate")
- if freebsdVersion >= 1000000 {
- sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}
- }
- if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" {
- archs, _ := syscall.Sysctl("kern.supported_archs")
- for _, s := range strings.Fields(archs) {
- if s == "amd64" {
- freebsd32o64 = true
- break
- }
- }
- }
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source))
- sa.Len = sizeofSockaddrInet
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_linux.go
deleted file mode 100644
index 60defe132..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_linux.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_TTL, 1, marshalTTL, parseTTL},
- ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_PKTINFO, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysICMP_FILTER, Len: sizeofICMPFilter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
- }
-)
-
-func (pi *inetPktinfo) setIfindex(i int) {
- pi.Ifindex = int32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_solaris.go
deleted file mode 100644
index 832fef1e2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_solaris.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2016 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 file.
-
-package ipv4
-
-import (
- "net"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 4, marshalTTL, parseTTL},
- ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
- }
-
- sockOpts = map[int]sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}},
- ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
- ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- }
-)
-
-func (pi *inetPktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260))
- sa.Family = syscall.AF_INET
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
deleted file mode 100644
index ae5704e77..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin freebsd linux solaris
-
-package ipv4
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/socket"
-)
-
-var freebsd32o64 bool
-
-func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- var gr groupReq
- if ifi != nil {
- gr.Interface = uint32(ifi.Index)
- }
- gr.setGroup(grp)
- var b []byte
- if freebsd32o64 {
- var d [sizeofGroupReq + 4]byte
- s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
- copy(d[:4], s[:4])
- copy(d[8:], s[4:])
- b = d[:]
- } else {
- b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
- }
- return so.Set(c, b)
-}
-
-func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- var gsr groupSourceReq
- if ifi != nil {
- gsr.Interface = uint32(ifi.Index)
- }
- gsr.setSourceGroup(grp, src)
- var b []byte
- if freebsd32o64 {
- var d [sizeofGroupSourceReq + 4]byte
- s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
- copy(d[:4], s[:4])
- copy(d[8:], s[4:])
- b = d[:]
- } else {
- b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
- }
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
deleted file mode 100644
index e6b7623d0..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !darwin,!freebsd,!linux,!solaris
-
-package ipv4
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_stub.go
deleted file mode 100644
index 4f076473b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_stub.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv4
-
-var (
- ctlOpts = [ctlMax]ctlOpt{}
-
- sockOpts = map[int]*sockOpt{}
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_windows.go
deleted file mode 100644
index b0913d539..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/sys_windows.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv4
-
-import (
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-const (
- // See ws2tcpip.h.
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
- sysIP_DONTFRAGMENT = 0xe
- sysIP_ADD_SOURCE_MEMBERSHIP = 0xf
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x10
- sysIP_PKTINFO = 0x13
-
- sizeofInetPktinfo = 0x8
- sizeofIPMreq = 0x8
- sizeofIPMreqSource = 0xc
-)
-
-type inetPktinfo struct {
- Addr [4]byte
- Ifindex int32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte
- Interface [4]byte
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte
- Sourceaddr [4]byte
- Interface [4]byte
-}
-
-// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx
-var (
- ctlOpts = [ctlMax]ctlOpt{}
-
- sockOpts = map[int]*sockOpt{
- ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
- ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
- ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
- ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
- }
-)
-
-func (pi *inetPktinfo) setIfindex(i int) {
- pi.Ifindex = int32(i)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicast_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicast_test.go
deleted file mode 100644
index 02c089f00..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicast_test.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "bytes"
- "net"
- "os"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- c, err := nettest.NewLocalPacketListener("udp4")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv4.NewPacketConn(c)
- defer p.Close()
-
- dst := c.LocalAddr()
- cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface
- wb := []byte("HELLO-R-U-THERE")
-
- for i, toggle := range []bool{true, false, true} {
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- p.SetTTL(i + 1)
- if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, err := p.WriteTo(wb, nil, dst); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else if !bytes.Equal(rb[:n], wb) {
- t.Fatalf("got %v; want %v", rb[:n], wb)
- }
- }
-}
-
-func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- dst, err := net.ResolveIPAddr("ip4", "127.0.0.1")
- if err != nil {
- t.Fatal(err)
- }
- p := ipv4.NewPacketConn(c)
- defer p.Close()
- cf := ipv4.FlagDst | ipv4.FlagInterface
- if runtime.GOOS != "solaris" {
- // Solaris never allows to modify ICMP properties.
- cf |= ipv4.FlagTTL
- }
-
- for i, toggle := range []bool{true, false, true} {
- wb, err := (&icmp.Message{
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- p.SetTTL(i + 1)
- if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, err := p.WriteTo(wb, nil, dst); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- loop:
- if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- } else {
- m, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n])
- if err != nil {
- t.Fatal(err)
- }
- if runtime.GOOS == "linux" && m.Type == ipv4.ICMPTypeEcho {
- // On Linux we must handle own sent packets.
- goto loop
- }
- if m.Type != ipv4.ICMPTypeEchoReply || m.Code != 0 {
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0)
- }
- }
- }
-}
-
-func TestRawConnReadWriteUnicastICMP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- dst, err := net.ResolveIPAddr("ip4", "127.0.0.1")
- if err != nil {
- t.Fatal(err)
- }
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Close()
- cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface
-
- for i, toggle := range []bool{true, false, true} {
- wb, err := (&icmp.Message{
- Type: ipv4.ICMPTypeEcho, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(nil)
- if err != nil {
- t.Fatal(err)
- }
- wh := &ipv4.Header{
- Version: ipv4.Version,
- Len: ipv4.HeaderLen,
- TOS: i + 1,
- TotalLen: ipv4.HeaderLen + len(wb),
- TTL: i + 1,
- Protocol: 1,
- Dst: dst.IP,
- }
- if err := r.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := r.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if err := r.WriteTo(wh, wb, nil); err != nil {
- t.Fatal(err)
- }
- rb := make([]byte, ipv4.HeaderLen+128)
- loop:
- if err := r.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if _, b, _, err := r.ReadFrom(rb); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- } else {
- m, err := icmp.ParseMessage(iana.ProtocolICMP, b)
- if err != nil {
- t.Fatal(err)
- }
- if runtime.GOOS == "linux" && m.Type == ipv4.ICMPTypeEcho {
- // On Linux we must handle own sent packets.
- goto loop
- }
- if m.Type != ipv4.ICMPTypeEchoReply || m.Code != 0 {
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0)
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
deleted file mode 100644
index db5213b91..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2012 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 file.
-
-package ipv4_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv4"
-)
-
-func TestConnUnicastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- ln, err := net.Listen("tcp4", "127.0.0.1:0")
- if err != nil {
- t.Fatal(err)
- }
- defer ln.Close()
-
- errc := make(chan error, 1)
- go func() {
- c, err := ln.Accept()
- if err != nil {
- errc <- err
- return
- }
- errc <- c.Close()
- }()
-
- c, err := net.Dial("tcp4", ln.Addr().String())
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- testUnicastSocketOptions(t, ipv4.NewConn(c))
-
- if err := <-errc; err != nil {
- t.Errorf("server: %v", err)
- }
-}
-
-var packetConnUnicastSocketOptionTests = []struct {
- net, proto, addr string
-}{
- {"udp4", "", "127.0.0.1:0"},
- {"ip4", ":icmp", "127.0.0.1"},
-}
-
-func TestPacketConnUnicastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- m, ok := nettest.SupportsRawIPSocket()
- for _, tt := range packetConnUnicastSocketOptionTests {
- if tt.net == "ip4" && !ok {
- t.Log(m)
- continue
- }
- c, err := net.ListenPacket(tt.net+tt.proto, tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- testUnicastSocketOptions(t, ipv4.NewPacketConn(c))
- }
-}
-
-func TestRawConnUnicastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- c, err := net.ListenPacket("ip4:icmp", "127.0.0.1")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- r, err := ipv4.NewRawConn(c)
- if err != nil {
- t.Fatal(err)
- }
-
- testUnicastSocketOptions(t, r)
-}
-
-type testIPv4UnicastConn interface {
- TOS() (int, error)
- SetTOS(int) error
- TTL() (int, error)
- SetTTL(int) error
-}
-
-func testUnicastSocketOptions(t *testing.T, c testIPv4UnicastConn) {
- tos := iana.DiffServCS0 | iana.NotECNTransport
- switch runtime.GOOS {
- case "windows":
- // IP_TOS option is supported on Windows 8 and beyond.
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- if err := c.SetTOS(tos); err != nil {
- t.Fatal(err)
- }
- if v, err := c.TOS(); err != nil {
- t.Fatal(err)
- } else if v != tos {
- t.Fatalf("got %v; want %v", v, tos)
- }
- const ttl = 255
- if err := c.SetTTL(ttl); err != nil {
- t.Fatal(err)
- }
- if v, err := c.TTL(); err != nil {
- t.Fatal(err)
- } else if v != ttl {
- t.Fatalf("got %v; want %v", v, ttl)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_darwin.go
deleted file mode 100644
index c07cc883f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_darwin.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_STRIPHDR = 0x17
- sysIP_RECVTTL = 0x18
- sysIP_BOUND_IF = 0x19
- sysIP_PKTINFO = 0x1a
- sysIP_RECVPKTINFO = 0x1a
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
- sysIP_MULTICAST_VIF = 0xe
- sysIP_MULTICAST_IFINDEX = 0x42
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x46
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x47
- sysIP_BLOCK_SOURCE = 0x48
- sysIP_UNBLOCK_SOURCE = 0x49
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type inetPktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte /* in_addr */
- Sourceaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [128]byte
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [128]byte
- Pad_cgo_1 [128]byte
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go
deleted file mode 100644
index c4365e9e7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_dragonfly.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_RECVTTL = 0x41
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_MULTICAST_VIF = 0xe
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
-
- sizeofIPMreq = 0x8
-)
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go
deleted file mode 100644
index 8c4aec94c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_SENDSRCADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_ONESBCAST = 0x17
- sysIP_BINDANY = 0x18
- sysIP_RECVTTL = 0x41
- sysIP_MINTTL = 0x42
- sysIP_DONTFRAG = 0x43
- sysIP_RECVTOS = 0x44
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
- sysIP_MULTICAST_VIF = 0xe
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x46
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x47
- sysIP_BLOCK_SOURCE = 0x48
- sysIP_UNBLOCK_SOURCE = 0x49
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte /* in_addr */
- Sourceaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type groupReq struct {
- Interface uint32
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group sockaddrStorage
- Source sockaddrStorage
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go
deleted file mode 100644
index 4b10b7c57..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_SENDSRCADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_ONESBCAST = 0x17
- sysIP_BINDANY = 0x18
- sysIP_RECVTTL = 0x41
- sysIP_MINTTL = 0x42
- sysIP_DONTFRAG = 0x43
- sysIP_RECVTOS = 0x44
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
- sysIP_MULTICAST_VIF = 0xe
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x46
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x47
- sysIP_BLOCK_SOURCE = 0x48
- sysIP_UNBLOCK_SOURCE = 0x49
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte /* in_addr */
- Sourceaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
- Source sockaddrStorage
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go
deleted file mode 100644
index 4b10b7c57..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_SENDSRCADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_ONESBCAST = 0x17
- sysIP_BINDANY = 0x18
- sysIP_RECVTTL = 0x41
- sysIP_MINTTL = 0x42
- sysIP_DONTFRAG = 0x43
- sysIP_RECVTOS = 0x44
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
- sysIP_MULTICAST_VIF = 0xe
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x46
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x47
- sysIP_BLOCK_SOURCE = 0x48
- sysIP_UNBLOCK_SOURCE = 0x49
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte /* in_addr */
- Sourceaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
- Source sockaddrStorage
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
deleted file mode 100644
index c0260f0ce..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
deleted file mode 100644
index c0260f0ce..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
deleted file mode 100644
index c0260f0ce..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
deleted file mode 100644
index c0260f0ce..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
deleted file mode 100644
index f65bd9a7a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]uint8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
deleted file mode 100644
index 9c967eaa6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv4
-
-const (
- sysIP_TOS = 0x1
- sysIP_TTL = 0x2
- sysIP_HDRINCL = 0x3
- sysIP_OPTIONS = 0x4
- sysIP_ROUTER_ALERT = 0x5
- sysIP_RECVOPTS = 0x6
- sysIP_RETOPTS = 0x7
- sysIP_PKTINFO = 0x8
- sysIP_PKTOPTIONS = 0x9
- sysIP_MTU_DISCOVER = 0xa
- sysIP_RECVERR = 0xb
- sysIP_RECVTTL = 0xc
- sysIP_RECVTOS = 0xd
- sysIP_MTU = 0xe
- sysIP_FREEBIND = 0xf
- sysIP_TRANSPARENT = 0x13
- sysIP_RECVRETOPTS = 0x7
- sysIP_ORIGDSTADDR = 0x14
- sysIP_RECVORIGDSTADDR = 0x14
- sysIP_MINTTL = 0x15
- sysIP_NODEFRAG = 0x16
- sysIP_UNICAST_IF = 0x32
-
- sysIP_MULTICAST_IF = 0x20
- sysIP_MULTICAST_TTL = 0x21
- sysIP_MULTICAST_LOOP = 0x22
- sysIP_ADD_MEMBERSHIP = 0x23
- sysIP_DROP_MEMBERSHIP = 0x24
- sysIP_UNBLOCK_SOURCE = 0x25
- sysIP_BLOCK_SOURCE = 0x26
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
- sysIP_MSFILTER = 0x29
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIP_MULTICAST_ALL = 0x31
-
- sysICMP_FILTER = 0x1
-
- sysSO_EE_ORIGIN_NONE = 0x0
- sysSO_EE_ORIGIN_LOCAL = 0x1
- sysSO_EE_ORIGIN_ICMP = 0x2
- sysSO_EE_ORIGIN_ICMP6 = 0x3
- sysSO_EE_ORIGIN_TXSTATUS = 0x4
- sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
- sizeofSockExtendedErr = 0x10
-
- sizeofIPMreq = 0x8
- sizeofIPMreqn = 0xc
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPFilter = 0x4
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- X__pad [8]uint8
-}
-
-type inetPktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type sockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type ipMreqSource struct {
- Multiaddr uint32
- Interface uint32
- Sourceaddr uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpFilter struct {
- Data uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go
deleted file mode 100644
index fd3624d93..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_netbsd.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x14
- sysIP_RECVTTL = 0x17
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
-
- sizeofIPMreq = 0x8
-)
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go
deleted file mode 100644
index 12f36be75..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_openbsd.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x1e
- sysIP_RECVTTL = 0x1f
-
- sysIP_MULTICAST_IF = 0x9
- sysIP_MULTICAST_TTL = 0xa
- sysIP_MULTICAST_LOOP = 0xb
- sysIP_ADD_MEMBERSHIP = 0xc
- sysIP_DROP_MEMBERSHIP = 0xd
-
- sizeofIPMreq = 0x8
-)
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_solaris.go
deleted file mode 100644
index 0a3875cc4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv4/zsys_solaris.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_solaris.go
-
-package ipv4
-
-const (
- sysIP_OPTIONS = 0x1
- sysIP_HDRINCL = 0x2
- sysIP_TOS = 0x3
- sysIP_TTL = 0x4
- sysIP_RECVOPTS = 0x5
- sysIP_RECVRETOPTS = 0x6
- sysIP_RECVDSTADDR = 0x7
- sysIP_RETOPTS = 0x8
- sysIP_RECVIF = 0x9
- sysIP_RECVSLLA = 0xa
- sysIP_RECVTTL = 0xb
-
- sysIP_MULTICAST_IF = 0x10
- sysIP_MULTICAST_TTL = 0x11
- sysIP_MULTICAST_LOOP = 0x12
- sysIP_ADD_MEMBERSHIP = 0x13
- sysIP_DROP_MEMBERSHIP = 0x14
- sysIP_BLOCK_SOURCE = 0x15
- sysIP_UNBLOCK_SOURCE = 0x16
- sysIP_ADD_SOURCE_MEMBERSHIP = 0x17
- sysIP_DROP_SOURCE_MEMBERSHIP = 0x18
- sysIP_NEXTHOP = 0x19
-
- sysIP_PKTINFO = 0x1a
- sysIP_RECVPKTINFO = 0x1a
- sysIP_DONTFRAG = 0x1b
-
- sysIP_BOUND_IF = 0x41
- sysIP_UNSPEC_SRC = 0x42
- sysIP_BROADCAST_TTL = 0x43
- sysIP_DHCPINIT_IF = 0x45
-
- sysIP_REUSEADDR = 0x104
- sysIP_DONTROUTE = 0x105
- sysIP_BROADCAST = 0x106
-
- sysMCAST_JOIN_GROUP = 0x29
- sysMCAST_LEAVE_GROUP = 0x2a
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_JOIN_SOURCE_GROUP = 0x2d
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2e
-
- sizeofSockaddrStorage = 0x100
- sizeofSockaddrInet = 0x10
- sizeofInetPktinfo = 0xc
-
- sizeofIPMreq = 0x8
- sizeofIPMreqSource = 0xc
- sizeofGroupReq = 0x104
- sizeofGroupSourceReq = 0x204
-)
-
-type sockaddrStorage struct {
- Family uint16
- X_ss_pad1 [6]int8
- X_ss_align float64
- X_ss_pad2 [240]int8
-}
-
-type sockaddrInet struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type inetPktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type ipMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type ipMreqSource struct {
- Multiaddr [4]byte /* in_addr */
- Sourceaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [256]byte
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [256]byte
- Pad_cgo_1 [256]byte
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/batch.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/batch.go
deleted file mode 100644
index 4f5fe683d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/batch.go
+++ /dev/null
@@ -1,119 +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 file.
-
-// +build go1.9
-
-package ipv6
-
-import (
- "net"
- "runtime"
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
-// PacketConn are not implemented.
-
-// A Message represents an IO message.
-//
-// type Message struct {
-// Buffers [][]byte
-// OOB []byte
-// Addr net.Addr
-// N int
-// NN int
-// Flags int
-// }
-//
-// The Buffers fields represents a list of contiguous buffers, which
-// can be used for vectored IO, for example, putting a header and a
-// payload in each slice.
-// When writing, the Buffers field must contain at least one byte to
-// write.
-// When reading, the Buffers field will always contain a byte to read.
-//
-// The OOB field contains protocol-specific control or miscellaneous
-// ancillary data known as out-of-band data.
-// It can be nil when not required.
-//
-// The Addr field specifies a destination address when writing.
-// It can be nil when the underlying protocol of the endpoint uses
-// connection-oriented communication.
-// After a successful read, it may contain the source address on the
-// received packet.
-//
-// The N field indicates the number of bytes read or written from/to
-// Buffers.
-//
-// The NN field indicates the number of bytes read or written from/to
-// OOB.
-//
-// The Flags field contains protocol-specific information on the
-// received message.
-type Message = socket.Message
-
-// ReadBatch reads a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_PEEK.
-//
-// On a successful read it returns the number of messages received, up
-// to len(ms).
-//
-// On Linux, a batch read will be optimized.
-// On other platforms, this method will read only a single message.
-func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.RecvMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.RecvMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
-
-// WriteBatch writes a batch of messages.
-//
-// The provided flags is a set of platform-dependent flags, such as
-// syscall.MSG_DONTROUTE.
-//
-// It returns the number of messages written on a successful write.
-//
-// On Linux, a batch write will be optimized.
-// On other platforms, this method will write only a single message.
-func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- switch runtime.GOOS {
- case "linux":
- n, err := c.SendMsgs([]socket.Message(ms), flags)
- if err != nil {
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- default:
- n := 1
- err := c.SendMsg(&ms[0], flags)
- if err != nil {
- n = 0
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- return n, err
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/bpf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/bpf_test.go
deleted file mode 100644
index 8253e1f42..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/bpf_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2016 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/ipv6"
-)
-
-func TestBPF(t *testing.T) {
- if runtime.GOOS != "linux" {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- l, err := net.ListenPacket("udp6", "[::1]:0")
- if err != nil {
- t.Fatal(err)
- }
- defer l.Close()
-
- p := ipv6.NewPacketConn(l)
-
- // This filter accepts UDP packets whose first payload byte is
- // even.
- prog, err := bpf.Assemble([]bpf.Instruction{
- // Load the first byte of the payload (skipping UDP header).
- bpf.LoadAbsolute{Off: 8, Size: 1},
- // Select LSB of the byte.
- bpf.ALUOpConstant{Op: bpf.ALUOpAnd, Val: 1},
- // Byte is even?
- bpf.JumpIf{Cond: bpf.JumpEqual, Val: 0, SkipFalse: 1},
- // Accept.
- bpf.RetConstant{Val: 4096},
- // Ignore.
- bpf.RetConstant{Val: 0},
- })
- if err != nil {
- t.Fatalf("compiling BPF: %s", err)
- }
-
- if err = p.SetBPF(prog); err != nil {
- t.Fatalf("attaching filter to Conn: %s", err)
- }
-
- s, err := net.Dial("udp6", l.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- defer s.Close()
- go func() {
- for i := byte(0); i < 10; i++ {
- s.Write([]byte{i})
- }
- }()
-
- l.SetDeadline(time.Now().Add(2 * time.Second))
- seen := make([]bool, 5)
- for {
- var b [512]byte
- n, _, err := l.ReadFrom(b[:])
- if err != nil {
- t.Fatalf("reading from listener: %s", err)
- }
- if n != 1 {
- t.Fatalf("unexpected packet length, want 1, got %d", n)
- }
- if b[0] >= 10 {
- t.Fatalf("unexpected byte, want 0-9, got %d", b[0])
- }
- if b[0]%2 != 0 {
- t.Fatalf("got odd byte %d, wanted only even bytes", b[0])
- }
- seen[b[0]/2] = true
-
- seenAll := true
- for _, v := range seen {
- if !v {
- seenAll = false
- break
- }
- }
- if seenAll {
- break
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control.go
deleted file mode 100644
index 2da644413..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "fmt"
- "net"
- "sync"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the
-// former still support RFC 2292 only. Please be aware that almost
-// all protocol implementations prohibit using a combination of RFC
-// 2292 and RFC 3542 for some practical reasons.
-
-type rawOpt struct {
- sync.RWMutex
- cflags ControlFlags
-}
-
-func (c *rawOpt) set(f ControlFlags) { c.cflags |= f }
-func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f }
-func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 }
-
-// A ControlFlags represents per packet basis IP-level socket option
-// control flags.
-type ControlFlags uint
-
-const (
- FlagTrafficClass ControlFlags = 1 << iota // pass the traffic class on the received packet
- FlagHopLimit // pass the hop limit on the received packet
- FlagSrc // pass the source address on the received packet
- FlagDst // pass the destination address on the received packet
- FlagInterface // pass the interface index on the received packet
- FlagPathMTU // pass the path MTU on the received packet path
-)
-
-const flagPacketInfo = FlagDst | FlagInterface
-
-// A ControlMessage represents per packet basis IP-level socket
-// options.
-type ControlMessage struct {
- // Receiving socket options: SetControlMessage allows to
- // receive the options from the protocol stack using ReadFrom
- // method of PacketConn.
- //
- // Specifying socket options: ControlMessage for WriteTo
- // method of PacketConn allows to send the options to the
- // protocol stack.
- //
- TrafficClass int // traffic class, must be 1 <= value <= 255 when specifying
- HopLimit int // hop limit, must be 1 <= value <= 255 when specifying
- Src net.IP // source address, specifying only
- Dst net.IP // destination address, receiving only
- IfIndex int // interface index, must be 1 <= value when specifying
- NextHop net.IP // next hop address, specifying only
- MTU int // path MTU, receiving only
-}
-
-func (cm *ControlMessage) String() string {
- if cm == nil {
- return "<nil>"
- }
- return fmt.Sprintf("tclass=%#x hoplim=%d src=%v dst=%v ifindex=%d nexthop=%v mtu=%d", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU)
-}
-
-// Marshal returns the binary encoding of cm.
-func (cm *ControlMessage) Marshal() []byte {
- if cm == nil {
- return nil
- }
- var l int
- tclass := false
- if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 {
- tclass = true
- l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
- }
- hoplimit := false
- if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 {
- hoplimit = true
- l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
- }
- pktinfo := false
- if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) {
- pktinfo = true
- l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
- }
- nexthop := false
- if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil {
- nexthop = true
- l += socket.ControlMessageSpace(ctlOpts[ctlNextHop].length)
- }
- var b []byte
- if l > 0 {
- b = make([]byte, l)
- bb := b
- if tclass {
- bb = ctlOpts[ctlTrafficClass].marshal(bb, cm)
- }
- if hoplimit {
- bb = ctlOpts[ctlHopLimit].marshal(bb, cm)
- }
- if pktinfo {
- bb = ctlOpts[ctlPacketInfo].marshal(bb, cm)
- }
- if nexthop {
- bb = ctlOpts[ctlNextHop].marshal(bb, cm)
- }
- }
- return b
-}
-
-// Parse parses b as a control message and stores the result in cm.
-func (cm *ControlMessage) Parse(b []byte) error {
- ms, err := socket.ControlMessage(b).Parse()
- if err != nil {
- return err
- }
- for _, m := range ms {
- lvl, typ, l, err := m.ParseHeader()
- if err != nil {
- return err
- }
- if lvl != iana.ProtocolIPv6 {
- continue
- }
- switch {
- case typ == ctlOpts[ctlTrafficClass].name && l >= ctlOpts[ctlTrafficClass].length:
- ctlOpts[ctlTrafficClass].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlHopLimit].name && l >= ctlOpts[ctlHopLimit].length:
- ctlOpts[ctlHopLimit].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
- ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
- case typ == ctlOpts[ctlPathMTU].name && l >= ctlOpts[ctlPathMTU].length:
- ctlOpts[ctlPathMTU].parse(cm, m.Data(l))
- }
- }
- return nil
-}
-
-// NewControlMessage returns a new control message.
-//
-// The returned message is large enough for options specified by cf.
-func NewControlMessage(cf ControlFlags) []byte {
- opt := rawOpt{cflags: cf}
- var l int
- if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
- }
- if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
- }
- if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
- }
- if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 {
- l += socket.ControlMessageSpace(ctlOpts[ctlPathMTU].length)
- }
- var b []byte
- if l > 0 {
- b = make([]byte, l)
- }
- return b
-}
-
-// Ancillary data socket options
-const (
- ctlTrafficClass = iota // header field
- ctlHopLimit // header field
- ctlPacketInfo // inbound or outbound packet path
- ctlNextHop // nexthop
- ctlPathMTU // path mtu
- ctlMax
-)
-
-// A ctlOpt represents a binding for ancillary data socket option.
-type ctlOpt struct {
- name int // option name, must be equal or greater than 1
- length int // option length
- marshal func([]byte, *ControlMessage) []byte
- parse func(*ControlMessage, []byte)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
deleted file mode 100644
index 9fd9eb15e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin
-
-package ipv6
-
-import (
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292HOPLIMIT, 4)
- if cm != nil {
- socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
- }
- return m.Next(4)
-}
-
-func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292PKTINFO, sizeofInet6Pktinfo)
- if cm != nil {
- pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
- if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
- copy(pi.Addr[:], ip)
- }
- if cm.IfIndex > 0 {
- pi.setIfindex(cm.IfIndex)
- }
- }
- return m.Next(sizeofInet6Pktinfo)
-}
-
-func marshal2292NextHop(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292NEXTHOP, sizeofSockaddrInet6)
- if cm != nil {
- sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
- sa.setSockaddr(cm.NextHop, cm.IfIndex)
- }
- return m.Next(sizeofSockaddrInet6)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
deleted file mode 100644
index eec529c20..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package ipv6
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-func marshalTrafficClass(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_TCLASS, 4)
- if cm != nil {
- socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.TrafficClass))
- }
- return m.Next(4)
-}
-
-func parseTrafficClass(cm *ControlMessage, b []byte) {
- cm.TrafficClass = int(socket.NativeEndian.Uint32(b[:4]))
-}
-
-func marshalHopLimit(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_HOPLIMIT, 4)
- if cm != nil {
- socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
- }
- return m.Next(4)
-}
-
-func parseHopLimit(cm *ControlMessage, b []byte) {
- cm.HopLimit = int(socket.NativeEndian.Uint32(b[:4]))
-}
-
-func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PKTINFO, sizeofInet6Pktinfo)
- if cm != nil {
- pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
- if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
- copy(pi.Addr[:], ip)
- }
- if cm.IfIndex > 0 {
- pi.setIfindex(cm.IfIndex)
- }
- }
- return m.Next(sizeofInet6Pktinfo)
-}
-
-func parsePacketInfo(cm *ControlMessage, b []byte) {
- pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0]))
- if len(cm.Dst) < net.IPv6len {
- cm.Dst = make(net.IP, net.IPv6len)
- }
- copy(cm.Dst, pi.Addr[:])
- cm.IfIndex = int(pi.Ifindex)
-}
-
-func marshalNextHop(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_NEXTHOP, sizeofSockaddrInet6)
- if cm != nil {
- sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
- sa.setSockaddr(cm.NextHop, cm.IfIndex)
- }
- return m.Next(sizeofSockaddrInet6)
-}
-
-func parseNextHop(cm *ControlMessage, b []byte) {
-}
-
-func marshalPathMTU(b []byte, cm *ControlMessage) []byte {
- m := socket.ControlMessage(b)
- m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PATHMTU, sizeofIPv6Mtuinfo)
- return m.Next(sizeofIPv6Mtuinfo)
-}
-
-func parsePathMTU(cm *ControlMessage, b []byte) {
- mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
- if len(cm.Dst) < net.IPv6len {
- cm.Dst = make(net.IP, net.IPv6len)
- }
- copy(cm.Dst, mi.Addr.Addr[:])
- cm.IfIndex = int(mi.Addr.Scope_id)
- cm.MTU = int(mi.Mtu)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_stub.go
deleted file mode 100644
index a045f28f7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_stub.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv6
-
-import "golang.org/x/net/internal/socket"
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_test.go
deleted file mode 100644
index c186ca99f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_test.go
+++ /dev/null
@@ -1,21 +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 file.
-
-package ipv6_test
-
-import (
- "testing"
-
- "golang.org/x/net/ipv6"
-)
-
-func TestControlMessageParseWithFuzz(t *testing.T) {
- var cm ipv6.ControlMessage
- for _, fuzz := range []string{
- "\f\x00\x00\x00)\x00\x00\x00.\x00\x00\x00",
- "\f\x00\x00\x00)\x00\x00\x00,\x00\x00\x00",
- } {
- cm.Parse([]byte(fuzz))
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_unix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_unix.go
deleted file mode 100644
index 66515060a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_unix.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package ipv6
-
-import "golang.org/x/net/internal/socket"
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- opt.Lock()
- defer opt.Unlock()
- if so, ok := sockOpts[ssoReceiveTrafficClass]; ok && cf&FlagTrafficClass != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagTrafficClass)
- } else {
- opt.clear(FlagTrafficClass)
- }
- }
- if so, ok := sockOpts[ssoReceiveHopLimit]; ok && cf&FlagHopLimit != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagHopLimit)
- } else {
- opt.clear(FlagHopLimit)
- }
- }
- if so, ok := sockOpts[ssoReceivePacketInfo]; ok && cf&flagPacketInfo != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(cf & flagPacketInfo)
- } else {
- opt.clear(cf & flagPacketInfo)
- }
- }
- if so, ok := sockOpts[ssoReceivePathMTU]; ok && cf&FlagPathMTU != 0 {
- if err := so.SetInt(c, boolint(on)); err != nil {
- return err
- }
- if on {
- opt.set(FlagPathMTU)
- } else {
- opt.clear(FlagPathMTU)
- }
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_windows.go
deleted file mode 100644
index ef2563b3f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/control_windows.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "syscall"
-
- "golang.org/x/net/internal/socket"
-)
-
-func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
- // TODO(mikio): implement this
- return syscall.EWINDOWS
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_darwin.go
deleted file mode 100644
index 55ddc116f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_darwin.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#define __APPLE_USE_RFC_3542
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
-
- sysIPV6_PORTRANGE = C.IPV6_PORTRANGE
- sysICMP6_FILTER = C.ICMP6_FILTER
- sysIPV6_2292PKTINFO = C.IPV6_2292PKTINFO
- sysIPV6_2292HOPLIMIT = C.IPV6_2292HOPLIMIT
- sysIPV6_2292NEXTHOP = C.IPV6_2292NEXTHOP
- sysIPV6_2292HOPOPTS = C.IPV6_2292HOPOPTS
- sysIPV6_2292DSTOPTS = C.IPV6_2292DSTOPTS
- sysIPV6_2292RTHDR = C.IPV6_2292RTHDR
-
- sysIPV6_2292PKTOPTIONS = C.IPV6_2292PKTOPTIONS
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
-
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
- sysIPV6_TCLASS = C.IPV6_TCLASS
-
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
-
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RTHDR = C.IPV6_RTHDR
-
- sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
-
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
- sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR
-
- sysIPV6_MSFILTER = C.IPV6_MSFILTER
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
-
- sysIPV6_BOUND_IF = C.IPV6_BOUND_IF
-
- sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
- sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
- sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type icmpv6Filter C.struct_icmp6_filter
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_dragonfly.go
deleted file mode 100644
index a4c383a51..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_dragonfly.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
- sysIPV6_PORTRANGE = C.IPV6_PORTRANGE
- sysICMP6_FILTER = C.ICMP6_FILTER
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
-
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RTHDR = C.IPV6_RTHDR
-
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
- sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
-
- sysIPV6_TCLASS = C.IPV6_TCLASS
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
- sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR
-
- sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
- sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
- sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
-
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type icmpv6Filter C.struct_icmp6_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_freebsd.go
deleted file mode 100644
index 53e625389..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_freebsd.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
- sysIPV6_PORTRANGE = C.IPV6_PORTRANGE
- sysICMP6_FILTER = C.ICMP6_FILTER
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
-
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RTHDR = C.IPV6_RTHDR
-
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
- sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
-
- sysIPV6_TCLASS = C.IPV6_TCLASS
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
- sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR
-
- sysIPV6_BINDANY = C.IPV6_BINDANY
-
- sysIPV6_MSFILTER = C.IPV6_MSFILTER
-
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
-
- sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
- sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
- sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
-
-type icmpv6Filter C.struct_icmp6_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_linux.go
deleted file mode 100644
index 3308cb2c3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_linux.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <linux/in.h>
-#include <linux/in6.h>
-#include <linux/ipv6.h>
-#include <linux/icmpv6.h>
-#include <linux/filter.h>
-#include <sys/socket.h>
-*/
-import "C"
-
-const (
- sysIPV6_ADDRFORM = C.IPV6_ADDRFORM
- sysIPV6_2292PKTINFO = C.IPV6_2292PKTINFO
- sysIPV6_2292HOPOPTS = C.IPV6_2292HOPOPTS
- sysIPV6_2292DSTOPTS = C.IPV6_2292DSTOPTS
- sysIPV6_2292RTHDR = C.IPV6_2292RTHDR
- sysIPV6_2292PKTOPTIONS = C.IPV6_2292PKTOPTIONS
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_2292HOPLIMIT = C.IPV6_2292HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_FLOWINFO = C.IPV6_FLOWINFO
-
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_ADD_MEMBERSHIP = C.IPV6_ADD_MEMBERSHIP
- sysIPV6_DROP_MEMBERSHIP = C.IPV6_DROP_MEMBERSHIP
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
- sysMCAST_MSFILTER = C.MCAST_MSFILTER
- sysIPV6_ROUTER_ALERT = C.IPV6_ROUTER_ALERT
- sysIPV6_MTU_DISCOVER = C.IPV6_MTU_DISCOVER
- sysIPV6_MTU = C.IPV6_MTU
- sysIPV6_RECVERR = C.IPV6_RECVERR
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
- sysIPV6_JOIN_ANYCAST = C.IPV6_JOIN_ANYCAST
- sysIPV6_LEAVE_ANYCAST = C.IPV6_LEAVE_ANYCAST
-
- //sysIPV6_PMTUDISC_DONT = C.IPV6_PMTUDISC_DONT
- //sysIPV6_PMTUDISC_WANT = C.IPV6_PMTUDISC_WANT
- //sysIPV6_PMTUDISC_DO = C.IPV6_PMTUDISC_DO
- //sysIPV6_PMTUDISC_PROBE = C.IPV6_PMTUDISC_PROBE
- //sysIPV6_PMTUDISC_INTERFACE = C.IPV6_PMTUDISC_INTERFACE
- //sysIPV6_PMTUDISC_OMIT = C.IPV6_PMTUDISC_OMIT
-
- sysIPV6_FLOWLABEL_MGR = C.IPV6_FLOWLABEL_MGR
- sysIPV6_FLOWINFO_SEND = C.IPV6_FLOWINFO_SEND
-
- sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
- sysIPV6_XFRM_POLICY = C.IPV6_XFRM_POLICY
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RTHDR = C.IPV6_RTHDR
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
- sysIPV6_TCLASS = C.IPV6_TCLASS
-
- sysIPV6_ADDR_PREFERENCES = C.IPV6_ADDR_PREFERENCES
-
- sysIPV6_PREFER_SRC_TMP = C.IPV6_PREFER_SRC_TMP
- sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = C.IPV6_PREFER_SRC_PUBTMP_DEFAULT
- sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA
- sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME
- sysIPV6_PREFER_SRC_CGA = C.IPV6_PREFER_SRC_CGA
- sysIPV6_PREFER_SRC_NONCGA = C.IPV6_PREFER_SRC_NONCGA
-
- sysIPV6_MINHOPCOUNT = C.IPV6_MINHOPCOUNT
-
- sysIPV6_ORIGDSTADDR = C.IPV6_ORIGDSTADDR
- sysIPV6_RECVORIGDSTADDR = C.IPV6_RECVORIGDSTADDR
- sysIPV6_TRANSPARENT = C.IPV6_TRANSPARENT
- sysIPV6_UNICAST_IF = C.IPV6_UNICAST_IF
-
- sysICMPV6_FILTER = C.ICMPV6_FILTER
-
- sysICMPV6_FILTER_BLOCK = C.ICMPV6_FILTER_BLOCK
- sysICMPV6_FILTER_PASS = C.ICMPV6_FILTER_PASS
- sysICMPV6_FILTER_BLOCKOTHERS = C.ICMPV6_FILTER_BLOCKOTHERS
- sysICMPV6_FILTER_PASSONLY = C.ICMPV6_FILTER_PASSONLY
-
- sysSOL_SOCKET = C.SOL_SOCKET
- sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER
-
- sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
- sizeofIPv6FlowlabelReq = C.sizeof_struct_in6_flowlabel_req
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-
- sizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6FlowlabelReq C.struct_in6_flowlabel_req
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
-
-type icmpv6Filter C.struct_icmp6_filter
-
-type sockFProg C.struct_sock_fprog
-
-type sockFilter C.struct_sock_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_netbsd.go
deleted file mode 100644
index be9ceb9cc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_netbsd.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
- sysIPV6_PORTRANGE = C.IPV6_PORTRANGE
- sysICMP6_FILTER = C.ICMP6_FILTER
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
-
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RTHDR = C.IPV6_RTHDR
-
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
- sysIPV6_TCLASS = C.IPV6_TCLASS
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
- sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
- sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
- sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
-
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type icmpv6Filter C.struct_icmp6_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_openbsd.go
deleted file mode 100644
index 177ddf87d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_openbsd.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
- sysIPV6_PORTRANGE = C.IPV6_PORTRANGE
- sysICMP6_FILTER = C.ICMP6_FILTER
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
- sysIPV6_RTHDR = C.IPV6_RTHDR
-
- sysIPV6_AUTH_LEVEL = C.IPV6_AUTH_LEVEL
- sysIPV6_ESP_TRANS_LEVEL = C.IPV6_ESP_TRANS_LEVEL
- sysIPV6_ESP_NETWORK_LEVEL = C.IPV6_ESP_NETWORK_LEVEL
- sysIPSEC6_OUTSA = C.IPSEC6_OUTSA
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
- sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
- sysIPV6_IPCOMP_LEVEL = C.IPV6_IPCOMP_LEVEL
-
- sysIPV6_TCLASS = C.IPV6_TCLASS
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
- sysIPV6_PIPEX = C.IPV6_PIPEX
-
- sysIPV6_RTABLE = C.IPV6_RTABLE
-
- sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
- sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
- sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
-
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type icmpv6Filter C.struct_icmp6_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_solaris.go
deleted file mode 100644
index 0f8ce2b46..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/defs_solaris.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build ignore
-
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package ipv6
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-*/
-import "C"
-
-const (
- sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
- sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
- sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
- sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
- sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP
- sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP
-
- sysIPV6_PKTINFO = C.IPV6_PKTINFO
-
- sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
- sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
- sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
- sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
-
- sysIPV6_RTHDR = C.IPV6_RTHDR
- sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
- sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
- sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
- sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
-
- sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
-
- sysIPV6_RECVRTHDRDSTOPTS = C.IPV6_RECVRTHDRDSTOPTS
-
- sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
- sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
- sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
- sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
- sysIPV6_SEC_OPT = C.IPV6_SEC_OPT
- sysIPV6_SRC_PREFERENCES = C.IPV6_SRC_PREFERENCES
- sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
- sysIPV6_PATHMTU = C.IPV6_PATHMTU
- sysIPV6_TCLASS = C.IPV6_TCLASS
- sysIPV6_V6ONLY = C.IPV6_V6ONLY
-
- sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
-
- sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
- sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
- sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
- sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
- sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
- sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
-
- sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME
- sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA
- sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC
- sysIPV6_PREFER_SRC_TMP = C.IPV6_PREFER_SRC_TMP
- sysIPV6_PREFER_SRC_NONCGA = C.IPV6_PREFER_SRC_NONCGA
- sysIPV6_PREFER_SRC_CGA = C.IPV6_PREFER_SRC_CGA
-
- sysIPV6_PREFER_SRC_MIPMASK = C.IPV6_PREFER_SRC_MIPMASK
- sysIPV6_PREFER_SRC_MIPDEFAULT = C.IPV6_PREFER_SRC_MIPDEFAULT
- sysIPV6_PREFER_SRC_TMPMASK = C.IPV6_PREFER_SRC_TMPMASK
- sysIPV6_PREFER_SRC_TMPDEFAULT = C.IPV6_PREFER_SRC_TMPDEFAULT
- sysIPV6_PREFER_SRC_CGAMASK = C.IPV6_PREFER_SRC_CGAMASK
- sysIPV6_PREFER_SRC_CGADEFAULT = C.IPV6_PREFER_SRC_CGADEFAULT
-
- sysIPV6_PREFER_SRC_MASK = C.IPV6_PREFER_SRC_MASK
-
- sysIPV6_PREFER_SRC_DEFAULT = C.IPV6_PREFER_SRC_DEFAULT
-
- sysIPV6_BOUND_IF = C.IPV6_BOUND_IF
- sysIPV6_UNSPEC_SRC = C.IPV6_UNSPEC_SRC
-
- sysICMP6_FILTER = C.ICMP6_FILTER
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
-
- sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- sizeofGroupReq = C.sizeof_struct_group_req
- sizeofGroupSourceReq = C.sizeof_struct_group_source_req
-
- sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-type inet6Pktinfo C.struct_in6_pktinfo
-
-type ipv6Mtuinfo C.struct_ip6_mtuinfo
-
-type ipv6Mreq C.struct_ipv6_mreq
-
-type groupReq C.struct_group_req
-
-type groupSourceReq C.struct_group_source_req
-
-type icmpv6Filter C.struct_icmp6_filter
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/dgramopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/dgramopt.go
deleted file mode 100644
index 703dafe84..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/dgramopt.go
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/bpf"
-)
-
-// MulticastHopLimit returns the hop limit field value for outgoing
-// multicast packets.
-func (c *dgramOpt) MulticastHopLimit() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastHopLimit]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetMulticastHopLimit sets the hop limit field value for future
-// outgoing multicast packets.
-func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastHopLimit]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, hoplim)
-}
-
-// MulticastInterface returns the default interface for multicast
-// packet transmissions.
-func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
- if !c.ok() {
- return nil, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastInterface]
- if !ok {
- return nil, errOpNoSupport
- }
- return so.getMulticastInterface(c.Conn)
-}
-
-// SetMulticastInterface sets the default interface for future
-// multicast packet transmissions.
-func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastInterface]
- if !ok {
- return errOpNoSupport
- }
- return so.setMulticastInterface(c.Conn, ifi)
-}
-
-// MulticastLoopback reports whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) MulticastLoopback() (bool, error) {
- if !c.ok() {
- return false, syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastLoopback]
- if !ok {
- return false, errOpNoSupport
- }
- on, err := so.GetInt(c.Conn)
- if err != nil {
- return false, err
- }
- return on == 1, nil
-}
-
-// SetMulticastLoopback sets whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) SetMulticastLoopback(on bool) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoMulticastLoopback]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, boolint(on))
-}
-
-// JoinGroup joins the group address group on the interface ifi.
-// By default all sources that can cast data to group are accepted.
-// It's possible to mute and unmute data transmission from a specific
-// source by using ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup.
-// JoinGroup uses the system assigned multicast interface when ifi is
-// nil, although this is not recommended because the assignment
-// depends on platforms and sometimes it might require routing
-// configuration.
-func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoJoinGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- return so.setGroup(c.Conn, ifi, grp)
-}
-
-// LeaveGroup leaves the group address group on the interface ifi
-// regardless of whether the group is any-source group or
-// source-specific group.
-func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoLeaveGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- return so.setGroup(c.Conn, ifi, grp)
-}
-
-// JoinSourceSpecificGroup joins the source-specific group comprising
-// group and source on the interface ifi.
-// JoinSourceSpecificGroup uses the system assigned multicast
-// interface when ifi is nil, although this is not recommended because
-// the assignment depends on platforms and sometimes it might require
-// routing configuration.
-func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoJoinSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP16(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// LeaveSourceSpecificGroup leaves the source-specific group on the
-// interface ifi.
-func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoLeaveSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP16(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// ExcludeSourceSpecificGroup excludes the source-specific group from
-// the already joined any-source groups by JoinGroup on the interface
-// ifi.
-func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoBlockSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP16(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// IncludeSourceSpecificGroup includes the excluded source-specific
-// group by ExcludeSourceSpecificGroup again on the interface ifi.
-func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoUnblockSourceGroup]
- if !ok {
- return errOpNoSupport
- }
- grp := netAddrToIP16(group)
- if grp == nil {
- return errMissingAddress
- }
- src := netAddrToIP16(source)
- if src == nil {
- return errMissingAddress
- }
- return so.setSourceGroup(c.Conn, ifi, grp, src)
-}
-
-// Checksum reports whether the kernel will compute, store or verify a
-// checksum for both incoming and outgoing packets. If on is true, it
-// returns an offset in bytes into the data of where the checksum
-// field is located.
-func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
- if !c.ok() {
- return false, 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoChecksum]
- if !ok {
- return false, 0, errOpNoSupport
- }
- offset, err = so.GetInt(c.Conn)
- if err != nil {
- return false, 0, err
- }
- if offset < 0 {
- return false, 0, nil
- }
- return true, offset, nil
-}
-
-// SetChecksum enables the kernel checksum processing. If on is ture,
-// the offset should be an offset in bytes into the data of where the
-// checksum field is located.
-func (c *dgramOpt) SetChecksum(on bool, offset int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoChecksum]
- if !ok {
- return errOpNoSupport
- }
- if !on {
- offset = -1
- }
- return so.SetInt(c.Conn, offset)
-}
-
-// ICMPFilter returns an ICMP filter.
-func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
- if !c.ok() {
- return nil, syscall.EINVAL
- }
- so, ok := sockOpts[ssoICMPFilter]
- if !ok {
- return nil, errOpNoSupport
- }
- return so.getICMPFilter(c.Conn)
-}
-
-// SetICMPFilter deploys the ICMP filter.
-func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoICMPFilter]
- if !ok {
- return errOpNoSupport
- }
- return so.setICMPFilter(c.Conn, f)
-}
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoAttachFilter]
- if !ok {
- return errOpNoSupport
- }
- return so.setBPF(c.Conn, filter)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/doc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/doc.go
deleted file mode 100644
index 664a97dea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/doc.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright 2013 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 file.
-
-// Package ipv6 implements IP-level socket options for the Internet
-// Protocol version 6.
-//
-// The package provides IP-level socket options that allow
-// manipulation of IPv6 facilities.
-//
-// The IPv6 protocol is defined in RFC 8200.
-// Socket interface extensions are defined in RFC 3493, RFC 3542 and
-// RFC 3678.
-// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810.
-// Source-specific multicast is defined in RFC 4607.
-//
-// On Darwin, this package requires OS X Mavericks version 10.9 or
-// above, or equivalent.
-//
-//
-// Unicasting
-//
-// The options for unicasting are available for net.TCPConn,
-// net.UDPConn and net.IPConn which are created as network connections
-// that use the IPv6 transport. When a single TCP connection carrying
-// a data flow of multiple packets needs to indicate the flow is
-// important, Conn is used to set the traffic class field on the IPv6
-// header for each packet.
-//
-// ln, err := net.Listen("tcp6", "[::]:1024")
-// if err != nil {
-// // error handling
-// }
-// defer ln.Close()
-// for {
-// c, err := ln.Accept()
-// if err != nil {
-// // error handling
-// }
-// go func(c net.Conn) {
-// defer c.Close()
-//
-// The outgoing packets will be labeled DiffServ assured forwarding
-// class 1 low drop precedence, known as AF11 packets.
-//
-// if err := ipv6.NewConn(c).SetTrafficClass(0x28); err != nil {
-// // error handling
-// }
-// if _, err := c.Write(data); err != nil {
-// // error handling
-// }
-// }(c)
-// }
-//
-//
-// Multicasting
-//
-// The options for multicasting are available for net.UDPConn and
-// net.IPconn which are created as network connections that use the
-// IPv6 transport. A few network facilities must be prepared before
-// you begin multicasting, at a minimum joining network interfaces and
-// multicast groups.
-//
-// en0, err := net.InterfaceByName("en0")
-// if err != nil {
-// // error handling
-// }
-// en1, err := net.InterfaceByIndex(911)
-// if err != nil {
-// // error handling
-// }
-// group := net.ParseIP("ff02::114")
-//
-// First, an application listens to an appropriate address with an
-// appropriate service port.
-//
-// c, err := net.ListenPacket("udp6", "[::]:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c.Close()
-//
-// Second, the application joins multicast groups, starts listening to
-// the groups on the specified network interfaces. Note that the
-// service port for transport layer protocol does not matter with this
-// operation as joining groups affects only network and link layer
-// protocols, such as IPv6 and Ethernet.
-//
-// p := ipv6.NewPacketConn(c)
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil {
-// // error handling
-// }
-//
-// The application might set per packet control message transmissions
-// between the protocol stack within the kernel. When the application
-// needs a destination address on an incoming packet,
-// SetControlMessage of PacketConn is used to enable control message
-// transmissions.
-//
-// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil {
-// // error handling
-// }
-//
-// The application could identify whether the received packets are
-// of interest by using the control message that contains the
-// destination address of the received packet.
-//
-// b := make([]byte, 1500)
-// for {
-// n, rcm, src, err := p.ReadFrom(b)
-// if err != nil {
-// // error handling
-// }
-// if rcm.Dst.IsMulticast() {
-// if rcm.Dst.Equal(group) {
-// // joined group, do something
-// } else {
-// // unknown group, discard
-// continue
-// }
-// }
-//
-// The application can also send both unicast and multicast packets.
-//
-// p.SetTrafficClass(0x0)
-// p.SetHopLimit(16)
-// if _, err := p.WriteTo(data[:n], nil, src); err != nil {
-// // error handling
-// }
-// dst := &net.UDPAddr{IP: group, Port: 1024}
-// wcm := ipv6.ControlMessage{TrafficClass: 0xe0, HopLimit: 1}
-// for _, ifi := range []*net.Interface{en0, en1} {
-// wcm.IfIndex = ifi.Index
-// if _, err := p.WriteTo(data[:n], &wcm, dst); err != nil {
-// // error handling
-// }
-// }
-// }
-//
-//
-// More multicasting
-//
-// An application that uses PacketConn may join multiple multicast
-// groups. For example, a UDP listener with port 1024 might join two
-// different groups across over two different network interfaces by
-// using:
-//
-// c, err := net.ListenPacket("udp6", "[::]:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c.Close()
-// p := ipv6.NewPacketConn(c)
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil {
-// // error handling
-// }
-//
-// It is possible for multiple UDP listeners that listen on the same
-// UDP port to join the same multicast group. The net package will
-// provide a socket that listens to a wildcard address with reusable
-// UDP port when an appropriate multicast address prefix is passed to
-// the net.ListenPacket or net.ListenUDP.
-//
-// c1, err := net.ListenPacket("udp6", "[ff02::]:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c1.Close()
-// c2, err := net.ListenPacket("udp6", "[ff02::]:1024")
-// if err != nil {
-// // error handling
-// }
-// defer c2.Close()
-// p1 := ipv6.NewPacketConn(c1)
-// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
-// // error handling
-// }
-// p2 := ipv6.NewPacketConn(c2)
-// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
-// // error handling
-// }
-//
-// Also it is possible for the application to leave or rejoin a
-// multicast group on the network interface.
-//
-// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
-// // error handling
-// }
-// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff01::114")}); err != nil {
-// // error handling
-// }
-//
-//
-// Source-specific multicasting
-//
-// An application that uses PacketConn on MLDv2 supported platform is
-// able to join source-specific multicast groups.
-// The application may use JoinSourceSpecificGroup and
-// LeaveSourceSpecificGroup for the operation known as "include" mode,
-//
-// ssmgroup := net.UDPAddr{IP: net.ParseIP("ff32::8000:9")}
-// ssmsource := net.UDPAddr{IP: net.ParseIP("fe80::cafe")}
-// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
-// // error handling
-// }
-// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
-// // error handling
-// }
-//
-// or JoinGroup, ExcludeSourceSpecificGroup,
-// IncludeSourceSpecificGroup and LeaveGroup for the operation known
-// as "exclude" mode.
-//
-// exclsource := net.UDPAddr{IP: net.ParseIP("fe80::dead")}
-// if err := p.JoinGroup(en0, &ssmgroup); err != nil {
-// // error handling
-// }
-// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil {
-// // error handling
-// }
-// if err := p.LeaveGroup(en0, &ssmgroup); err != nil {
-// // error handling
-// }
-//
-// Note that it depends on each platform implementation what happens
-// when an application which runs on MLDv2 unsupported platform uses
-// JoinSourceSpecificGroup and LeaveSourceSpecificGroup.
-// In general the platform tries to fall back to conversations using
-// MLDv1 and starts to listen to multicast traffic.
-// In the fallback case, ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup may return an error.
-package ipv6 // import "golang.org/x/net/ipv6"
-
-// BUG(mikio): This package is not implemented on NaCl and Plan 9.
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/endpoint.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/endpoint.go
deleted file mode 100644
index 0624c1740..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/endpoint.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "syscall"
- "time"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
-// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup methods of PacketConn are not
-// implemented.
-
-// A Conn represents a network endpoint that uses IPv6 transport.
-// It allows to set basic IP-level socket options such as traffic
-// class and hop limit.
-type Conn struct {
- genericOpt
-}
-
-type genericOpt struct {
- *socket.Conn
-}
-
-func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
-
-// PathMTU returns a path MTU value for the destination associated
-// with the endpoint.
-func (c *Conn) PathMTU() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoPathMTU]
- if !ok {
- return 0, errOpNoSupport
- }
- _, mtu, err := so.getMTUInfo(c.Conn)
- if err != nil {
- return 0, err
- }
- return mtu, nil
-}
-
-// NewConn returns a new Conn.
-func NewConn(c net.Conn) *Conn {
- cc, _ := socket.NewConn(c)
- return &Conn{
- genericOpt: genericOpt{Conn: cc},
- }
-}
-
-// A PacketConn represents a packet network endpoint that uses IPv6
-// transport. It is used to control several IP-level socket options
-// including IPv6 header manipulation. It also provides datagram
-// based network I/O methods specific to the IPv6 and higher layer
-// protocols such as OSPF, GRE, and UDP.
-type PacketConn struct {
- genericOpt
- dgramOpt
- payloadHandler
-}
-
-type dgramOpt struct {
- *socket.Conn
-}
-
-func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
-
-// SetControlMessage allows to receive the per packet basis IP-level
-// socket options.
-func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
-}
-
-// SetDeadline sets the read and write deadlines associated with the
-// endpoint.
-func (c *PacketConn) SetDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.SetDeadline(t)
-}
-
-// SetReadDeadline sets the read deadline associated with the
-// endpoint.
-func (c *PacketConn) SetReadDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.SetReadDeadline(t)
-}
-
-// SetWriteDeadline sets the write deadline associated with the
-// endpoint.
-func (c *PacketConn) SetWriteDeadline(t time.Time) error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.SetWriteDeadline(t)
-}
-
-// Close closes the endpoint.
-func (c *PacketConn) Close() error {
- if !c.payloadHandler.ok() {
- return syscall.EINVAL
- }
- return c.payloadHandler.Close()
-}
-
-// NewPacketConn returns a new PacketConn using c as its underlying
-// transport.
-func NewPacketConn(c net.PacketConn) *PacketConn {
- cc, _ := socket.NewConn(c.(net.Conn))
- return &PacketConn{
- genericOpt: genericOpt{Conn: cc},
- dgramOpt: dgramOpt{Conn: cc},
- payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/example_test.go
deleted file mode 100644
index e761aa2a1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/example_test.go
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv6_test
-
-import (
- "fmt"
- "log"
- "net"
- "os"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/ipv6"
-)
-
-func ExampleConn_markingTCP() {
- ln, err := net.Listen("tcp", "[::]:1024")
- if err != nil {
- log.Fatal(err)
- }
- defer ln.Close()
-
- for {
- c, err := ln.Accept()
- if err != nil {
- log.Fatal(err)
- }
- go func(c net.Conn) {
- defer c.Close()
- if c.RemoteAddr().(*net.TCPAddr).IP.To16() != nil && c.RemoteAddr().(*net.TCPAddr).IP.To4() == nil {
- p := ipv6.NewConn(c)
- if err := p.SetTrafficClass(0x28); err != nil { // DSCP AF11
- log.Fatal(err)
- }
- if err := p.SetHopLimit(128); err != nil {
- log.Fatal(err)
- }
- }
- if _, err := c.Write([]byte("HELLO-R-U-THERE-ACK")); err != nil {
- log.Fatal(err)
- }
- }(c)
- }
-}
-
-func ExamplePacketConn_servingOneShotMulticastDNS() {
- c, err := net.ListenPacket("udp6", "[::]:5353") // mDNS over UDP
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
-
- en0, err := net.InterfaceByName("en0")
- if err != nil {
- log.Fatal(err)
- }
- mDNSLinkLocal := net.UDPAddr{IP: net.ParseIP("ff02::fb")}
- if err := p.JoinGroup(en0, &mDNSLinkLocal); err != nil {
- log.Fatal(err)
- }
- defer p.LeaveGroup(en0, &mDNSLinkLocal)
- if err := p.SetControlMessage(ipv6.FlagDst|ipv6.FlagInterface, true); err != nil {
- log.Fatal(err)
- }
-
- var wcm ipv6.ControlMessage
- b := make([]byte, 1500)
- for {
- _, rcm, peer, err := p.ReadFrom(b)
- if err != nil {
- log.Fatal(err)
- }
- if !rcm.Dst.IsMulticast() || !rcm.Dst.Equal(mDNSLinkLocal.IP) {
- continue
- }
- wcm.IfIndex = rcm.IfIndex
- answers := []byte("FAKE-MDNS-ANSWERS") // fake mDNS answers, you need to implement this
- if _, err := p.WriteTo(answers, &wcm, peer); err != nil {
- log.Fatal(err)
- }
- }
-}
-
-func ExamplePacketConn_tracingIPPacketRoute() {
- // Tracing an IP packet route to www.google.com.
-
- const host = "www.google.com"
- ips, err := net.LookupIP(host)
- if err != nil {
- log.Fatal(err)
- }
- var dst net.IPAddr
- for _, ip := range ips {
- if ip.To16() != nil && ip.To4() == nil {
- dst.IP = ip
- fmt.Printf("using %v for tracing an IP packet route to %s\n", dst.IP, host)
- break
- }
- }
- if dst.IP == nil {
- log.Fatal("no AAAA record found")
- }
-
- c, err := net.ListenPacket("ip6:58", "::") // ICMP for IPv6
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
-
- if err := p.SetControlMessage(ipv6.FlagHopLimit|ipv6.FlagSrc|ipv6.FlagDst|ipv6.FlagInterface, true); err != nil {
- log.Fatal(err)
- }
- wm := icmp.Message{
- Type: ipv6.ICMPTypeEchoRequest, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }
- var f ipv6.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv6.ICMPTypeTimeExceeded)
- f.Accept(ipv6.ICMPTypeEchoReply)
- if err := p.SetICMPFilter(&f); err != nil {
- log.Fatal(err)
- }
-
- var wcm ipv6.ControlMessage
- rb := make([]byte, 1500)
- for i := 1; i <= 64; i++ { // up to 64 hops
- wm.Body.(*icmp.Echo).Seq = i
- wb, err := wm.Marshal(nil)
- if err != nil {
- log.Fatal(err)
- }
-
- // In the real world usually there are several
- // multiple traffic-engineered paths for each hop.
- // You may need to probe a few times to each hop.
- begin := time.Now()
- wcm.HopLimit = i
- if _, err := p.WriteTo(wb, &wcm, &dst); err != nil {
- log.Fatal(err)
- }
- if err := p.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil {
- log.Fatal(err)
- }
- n, rcm, peer, err := p.ReadFrom(rb)
- if err != nil {
- if err, ok := err.(net.Error); ok && err.Timeout() {
- fmt.Printf("%v\t*\n", i)
- continue
- }
- log.Fatal(err)
- }
- rm, err := icmp.ParseMessage(58, rb[:n])
- if err != nil {
- log.Fatal(err)
- }
- rtt := time.Since(begin)
-
- // In the real world you need to determine whether the
- // received message is yours using ControlMessage.Src,
- // ControlMesage.Dst, icmp.Echo.ID and icmp.Echo.Seq.
- switch rm.Type {
- case ipv6.ICMPTypeTimeExceeded:
- names, _ := net.LookupAddr(peer.String())
- fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, rcm)
- case ipv6.ICMPTypeEchoReply:
- names, _ := net.LookupAddr(peer.String())
- fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, rcm)
- return
- }
- }
-}
-
-func ExamplePacketConn_advertisingOSPFHello() {
- c, err := net.ListenPacket("ip6:89", "::") // OSPF for IPv6
- if err != nil {
- log.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
-
- en0, err := net.InterfaceByName("en0")
- if err != nil {
- log.Fatal(err)
- }
- allSPFRouters := net.IPAddr{IP: net.ParseIP("ff02::5")}
- if err := p.JoinGroup(en0, &allSPFRouters); err != nil {
- log.Fatal(err)
- }
- defer p.LeaveGroup(en0, &allSPFRouters)
-
- hello := make([]byte, 24) // fake hello data, you need to implement this
- ospf := make([]byte, 16) // fake ospf header, you need to implement this
- ospf[0] = 3 // version 3
- ospf[1] = 1 // hello packet
- ospf = append(ospf, hello...)
- if err := p.SetChecksum(true, 12); err != nil {
- log.Fatal(err)
- }
-
- cm := ipv6.ControlMessage{
- TrafficClass: 0xc0, // DSCP CS6
- HopLimit: 1,
- IfIndex: en0.Index,
- }
- if _, err := p.WriteTo(ospf, &cm, &allSPFRouters); err != nil {
- log.Fatal(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/gen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/gen.go
deleted file mode 100644
index 41886ec72..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/gen.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build ignore
-
-//go:generate go run gen.go
-
-// This program generates system adaptation constants and types,
-// internet protocol constants and tables by reading template files
-// and IANA protocol registries.
-package main
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "go/format"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "os/exec"
- "runtime"
- "strconv"
- "strings"
-)
-
-func main() {
- if err := genzsys(); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- if err := geniana(); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func genzsys() error {
- defs := "defs_" + runtime.GOOS + ".go"
- f, err := os.Open(defs)
- if err != nil {
- if os.IsNotExist(err) {
- return nil
- }
- return err
- }
- f.Close()
- cmd := exec.Command("go", "tool", "cgo", "-godefs", defs)
- b, err := cmd.Output()
- if err != nil {
- return err
- }
- b, err = format.Source(b)
- if err != nil {
- return err
- }
- zsys := "zsys_" + runtime.GOOS + ".go"
- switch runtime.GOOS {
- case "freebsd", "linux":
- zsys = "zsys_" + runtime.GOOS + "_" + runtime.GOARCH + ".go"
- }
- if err := ioutil.WriteFile(zsys, b, 0644); err != nil {
- return err
- }
- return nil
-}
-
-var registries = []struct {
- url string
- parse func(io.Writer, io.Reader) error
-}{
- {
- "http://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xml",
- parseICMPv6Parameters,
- },
-}
-
-func geniana() error {
- var bb bytes.Buffer
- fmt.Fprintf(&bb, "// go generate gen.go\n")
- fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n")
- fmt.Fprintf(&bb, "package ipv6\n\n")
- for _, r := range registries {
- resp, err := http.Get(r.url)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("got HTTP status code %v for %v\n", resp.StatusCode, r.url)
- }
- if err := r.parse(&bb, resp.Body); err != nil {
- return err
- }
- fmt.Fprintf(&bb, "\n")
- }
- b, err := format.Source(bb.Bytes())
- if err != nil {
- return err
- }
- if err := ioutil.WriteFile("iana.go", b, 0644); err != nil {
- return err
- }
- return nil
-}
-
-func parseICMPv6Parameters(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var icp icmpv6Parameters
- if err := dec.Decode(&icp); err != nil {
- return err
- }
- prs := icp.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, pr := range prs {
- if pr.Name == "" {
- continue
- }
- fmt.Fprintf(w, "ICMPType%s ICMPType = %d", pr.Name, pr.Value)
- fmt.Fprintf(w, "// %s\n", pr.OrigName)
- }
- fmt.Fprintf(w, ")\n\n")
- fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated)
- fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n")
- for _, pr := range prs {
- if pr.Name == "" {
- continue
- }
- fmt.Fprintf(w, "%d: %q,\n", pr.Value, strings.ToLower(pr.OrigName))
- }
- fmt.Fprintf(w, "}\n")
- return nil
-}
-
-type icmpv6Parameters struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Registries []struct {
- Title string `xml:"title"`
- Records []struct {
- Value string `xml:"value"`
- Name string `xml:"name"`
- } `xml:"record"`
- } `xml:"registry"`
-}
-
-type canonICMPv6ParamRecord struct {
- OrigName string
- Name string
- Value int
-}
-
-func (icp *icmpv6Parameters) escape() []canonICMPv6ParamRecord {
- id := -1
- for i, r := range icp.Registries {
- if strings.Contains(r.Title, "Type") || strings.Contains(r.Title, "type") {
- id = i
- break
- }
- }
- if id < 0 {
- return nil
- }
- prs := make([]canonICMPv6ParamRecord, len(icp.Registries[id].Records))
- sr := strings.NewReplacer(
- "Messages", "",
- "Message", "",
- "ICMP", "",
- "+", "P",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, pr := range icp.Registries[id].Records {
- if strings.Contains(pr.Name, "Reserved") ||
- strings.Contains(pr.Name, "Unassigned") ||
- strings.Contains(pr.Name, "Deprecated") ||
- strings.Contains(pr.Name, "Experiment") ||
- strings.Contains(pr.Name, "experiment") {
- continue
- }
- ss := strings.Split(pr.Name, "\n")
- if len(ss) > 1 {
- prs[i].Name = strings.Join(ss, " ")
- } else {
- prs[i].Name = ss[0]
- }
- s := strings.TrimSpace(prs[i].Name)
- prs[i].OrigName = s
- prs[i].Name = sr.Replace(s)
- prs[i].Value, _ = strconv.Atoi(pr.Value)
- }
- return prs
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/genericopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/genericopt.go
deleted file mode 100644
index e9dbc2e18..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/genericopt.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import "syscall"
-
-// TrafficClass returns the traffic class field value for outgoing
-// packets.
-func (c *genericOpt) TrafficClass() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoTrafficClass]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetTrafficClass sets the traffic class field value for future
-// outgoing packets.
-func (c *genericOpt) SetTrafficClass(tclass int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoTrafficClass]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, tclass)
-}
-
-// HopLimit returns the hop limit field value for outgoing packets.
-func (c *genericOpt) HopLimit() (int, error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- so, ok := sockOpts[ssoHopLimit]
- if !ok {
- return 0, errOpNoSupport
- }
- return so.GetInt(c.Conn)
-}
-
-// SetHopLimit sets the hop limit field value for future outgoing
-// packets.
-func (c *genericOpt) SetHopLimit(hoplim int) error {
- if !c.ok() {
- return syscall.EINVAL
- }
- so, ok := sockOpts[ssoHopLimit]
- if !ok {
- return errOpNoSupport
- }
- return so.SetInt(c.Conn, hoplim)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header.go
deleted file mode 100644
index e05cb08b2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv6
-
-import (
- "encoding/binary"
- "fmt"
- "net"
-)
-
-const (
- Version = 6 // protocol version
- HeaderLen = 40 // header length
-)
-
-// A Header represents an IPv6 base header.
-type Header struct {
- Version int // protocol version
- TrafficClass int // traffic class
- FlowLabel int // flow label
- PayloadLen int // payload length
- NextHeader int // next header
- HopLimit int // hop limit
- Src net.IP // source address
- Dst net.IP // destination address
-}
-
-func (h *Header) String() string {
- if h == nil {
- return "<nil>"
- }
- return fmt.Sprintf("ver=%d tclass=%#x flowlbl=%#x payloadlen=%d nxthdr=%d hoplim=%d src=%v dst=%v", h.Version, h.TrafficClass, h.FlowLabel, h.PayloadLen, h.NextHeader, h.HopLimit, h.Src, h.Dst)
-}
-
-// ParseHeader parses b as an IPv6 base header.
-func ParseHeader(b []byte) (*Header, error) {
- if len(b) < HeaderLen {
- return nil, errHeaderTooShort
- }
- h := &Header{
- Version: int(b[0]) >> 4,
- TrafficClass: int(b[0]&0x0f)<<4 | int(b[1])>>4,
- FlowLabel: int(b[1]&0x0f)<<16 | int(b[2])<<8 | int(b[3]),
- PayloadLen: int(binary.BigEndian.Uint16(b[4:6])),
- NextHeader: int(b[6]),
- HopLimit: int(b[7]),
- }
- h.Src = make(net.IP, net.IPv6len)
- copy(h.Src, b[8:24])
- h.Dst = make(net.IP, net.IPv6len)
- copy(h.Dst, b[24:40])
- return h, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header_test.go
deleted file mode 100644
index ca11dc23d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/header_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "reflect"
- "strings"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/ipv6"
-)
-
-var (
- wireHeaderFromKernel = [ipv6.HeaderLen]byte{
- 0x69, 0x8b, 0xee, 0xf1,
- 0xca, 0xfe, 0x2c, 0x01,
- 0x20, 0x01, 0x0d, 0xb8,
- 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01,
- 0x20, 0x01, 0x0d, 0xb8,
- 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01,
- }
-
- testHeader = &ipv6.Header{
- Version: ipv6.Version,
- TrafficClass: iana.DiffServAF43,
- FlowLabel: 0xbeef1,
- PayloadLen: 0xcafe,
- NextHeader: iana.ProtocolIPv6Frag,
- HopLimit: 1,
- Src: net.ParseIP("2001:db8:1::1"),
- Dst: net.ParseIP("2001:db8:2::1"),
- }
-)
-
-func TestParseHeader(t *testing.T) {
- h, err := ipv6.ParseHeader(wireHeaderFromKernel[:])
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(h, testHeader) {
- t.Fatalf("got %#v; want %#v", h, testHeader)
- }
- s := h.String()
- if strings.Contains(s, ",") {
- t.Fatalf("should be space-separated values: %s", s)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/helper.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/helper.go
deleted file mode 100644
index 259740132..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/helper.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "errors"
- "net"
-)
-
-var (
- errMissingAddress = errors.New("missing address")
- errHeaderTooShort = errors.New("header too short")
- errInvalidConnType = errors.New("invalid conn type")
- errOpNoSupport = errors.New("operation not supported")
- errNoSuchInterface = errors.New("no such interface")
-)
-
-func boolint(b bool) int {
- if b {
- return 1
- }
- return 0
-}
-
-func netAddrToIP16(a net.Addr) net.IP {
- switch v := a.(type) {
- case *net.UDPAddr:
- if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
- return ip
- }
- case *net.IPAddr:
- if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
- return ip
- }
- }
- return nil
-}
-
-func opAddr(a net.Addr) net.Addr {
- switch a.(type) {
- case *net.TCPAddr:
- if a == nil {
- return nil
- }
- case *net.UDPAddr:
- if a == nil {
- return nil
- }
- case *net.IPAddr:
- if a == nil {
- return nil
- }
- }
- return a
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/iana.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/iana.go
deleted file mode 100644
index 3c6214fb6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/iana.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// go generate gen.go
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package ipv6
-
-// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07
-const (
- ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable
- ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big
- ICMPTypeTimeExceeded ICMPType = 3 // Time Exceeded
- ICMPTypeParameterProblem ICMPType = 4 // Parameter Problem
- ICMPTypeEchoRequest ICMPType = 128 // Echo Request
- ICMPTypeEchoReply ICMPType = 129 // Echo Reply
- ICMPTypeMulticastListenerQuery ICMPType = 130 // Multicast Listener Query
- ICMPTypeMulticastListenerReport ICMPType = 131 // Multicast Listener Report
- ICMPTypeMulticastListenerDone ICMPType = 132 // Multicast Listener Done
- ICMPTypeRouterSolicitation ICMPType = 133 // Router Solicitation
- ICMPTypeRouterAdvertisement ICMPType = 134 // Router Advertisement
- ICMPTypeNeighborSolicitation ICMPType = 135 // Neighbor Solicitation
- ICMPTypeNeighborAdvertisement ICMPType = 136 // Neighbor Advertisement
- ICMPTypeRedirect ICMPType = 137 // Redirect Message
- ICMPTypeRouterRenumbering ICMPType = 138 // Router Renumbering
- ICMPTypeNodeInformationQuery ICMPType = 139 // ICMP Node Information Query
- ICMPTypeNodeInformationResponse ICMPType = 140 // ICMP Node Information Response
- ICMPTypeInverseNeighborDiscoverySolicitation ICMPType = 141 // Inverse Neighbor Discovery Solicitation Message
- ICMPTypeInverseNeighborDiscoveryAdvertisement ICMPType = 142 // Inverse Neighbor Discovery Advertisement Message
- ICMPTypeVersion2MulticastListenerReport ICMPType = 143 // Version 2 Multicast Listener Report
- ICMPTypeHomeAgentAddressDiscoveryRequest ICMPType = 144 // Home Agent Address Discovery Request Message
- ICMPTypeHomeAgentAddressDiscoveryReply ICMPType = 145 // Home Agent Address Discovery Reply Message
- ICMPTypeMobilePrefixSolicitation ICMPType = 146 // Mobile Prefix Solicitation
- ICMPTypeMobilePrefixAdvertisement ICMPType = 147 // Mobile Prefix Advertisement
- ICMPTypeCertificationPathSolicitation ICMPType = 148 // Certification Path Solicitation Message
- ICMPTypeCertificationPathAdvertisement ICMPType = 149 // Certification Path Advertisement Message
- ICMPTypeMulticastRouterAdvertisement ICMPType = 151 // Multicast Router Advertisement
- ICMPTypeMulticastRouterSolicitation ICMPType = 152 // Multicast Router Solicitation
- ICMPTypeMulticastRouterTermination ICMPType = 153 // Multicast Router Termination
- ICMPTypeFMIPv6 ICMPType = 154 // FMIPv6 Messages
- ICMPTypeRPLControl ICMPType = 155 // RPL Control Message
- ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message
- ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request
- ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation
- ICMPTypeMPLControl ICMPType = 159 // MPL Control Message
-)
-
-// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07
-var icmpTypes = map[ICMPType]string{
- 1: "destination unreachable",
- 2: "packet too big",
- 3: "time exceeded",
- 4: "parameter problem",
- 128: "echo request",
- 129: "echo reply",
- 130: "multicast listener query",
- 131: "multicast listener report",
- 132: "multicast listener done",
- 133: "router solicitation",
- 134: "router advertisement",
- 135: "neighbor solicitation",
- 136: "neighbor advertisement",
- 137: "redirect message",
- 138: "router renumbering",
- 139: "icmp node information query",
- 140: "icmp node information response",
- 141: "inverse neighbor discovery solicitation message",
- 142: "inverse neighbor discovery advertisement message",
- 143: "version 2 multicast listener report",
- 144: "home agent address discovery request message",
- 145: "home agent address discovery reply message",
- 146: "mobile prefix solicitation",
- 147: "mobile prefix advertisement",
- 148: "certification path solicitation message",
- 149: "certification path advertisement message",
- 151: "multicast router advertisement",
- 152: "multicast router solicitation",
- 153: "multicast router termination",
- 154: "fmipv6 messages",
- 155: "rpl control message",
- 156: "ilnpv6 locator update message",
- 157: "duplicate address request",
- 158: "duplicate address confirmation",
- 159: "mpl control message",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp.go
deleted file mode 100644
index b7f48e27b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import "golang.org/x/net/internal/iana"
-
-// BUG(mikio): On Windows, methods related to ICMPFilter are not
-// implemented.
-
-// An ICMPType represents a type of ICMP message.
-type ICMPType int
-
-func (typ ICMPType) String() string {
- s, ok := icmpTypes[typ]
- if !ok {
- return "<nil>"
- }
- return s
-}
-
-// Protocol returns the ICMPv6 protocol number.
-func (typ ICMPType) Protocol() int {
- return iana.ProtocolIPv6ICMP
-}
-
-// An ICMPFilter represents an ICMP message filter for incoming
-// packets. The filter belongs to a packet delivery path on a host and
-// it cannot interact with forwarding packets or tunnel-outer packets.
-//
-// Note: RFC 8200 defines a reasonable role model. A node means a
-// device that implements IP. A router means a node that forwards IP
-// packets not explicitly addressed to itself, and a host means a node
-// that is not a router.
-type ICMPFilter struct {
- icmpv6Filter
-}
-
-// Accept accepts incoming ICMP packets including the type field value
-// typ.
-func (f *ICMPFilter) Accept(typ ICMPType) {
- f.accept(typ)
-}
-
-// Block blocks incoming ICMP packets including the type field value
-// typ.
-func (f *ICMPFilter) Block(typ ICMPType) {
- f.block(typ)
-}
-
-// SetAll sets the filter action to the filter.
-func (f *ICMPFilter) SetAll(block bool) {
- f.setAll(block)
-}
-
-// WillBlock reports whether the ICMP type will be blocked.
-func (f *ICMPFilter) WillBlock(typ ICMPType) bool {
- return f.willBlock(typ)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_bsd.go
deleted file mode 100644
index e1a791de4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_bsd.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package ipv6
-
-func (f *icmpv6Filter) accept(typ ICMPType) {
- f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) block(typ ICMPType) {
- f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) setAll(block bool) {
- for i := range f.Filt {
- if block {
- f.Filt[i] = 0
- } else {
- f.Filt[i] = 1<<32 - 1
- }
- }
-}
-
-func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
- return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_linux.go
deleted file mode 100644
index 647f6b44f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_linux.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-func (f *icmpv6Filter) accept(typ ICMPType) {
- f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) block(typ ICMPType) {
- f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) setAll(block bool) {
- for i := range f.Data {
- if block {
- f.Data[i] = 1<<32 - 1
- } else {
- f.Data[i] = 0
- }
- }
-}
-
-func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
- return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_solaris.go
deleted file mode 100644
index 7c23bb1cf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_solaris.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-func (f *icmpv6Filter) accept(typ ICMPType) {
- f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) block(typ ICMPType) {
- f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31)
-}
-
-func (f *icmpv6Filter) setAll(block bool) {
- for i := range f.X__icmp6_filt {
- if block {
- f.X__icmp6_filt[i] = 0
- } else {
- f.X__icmp6_filt[i] = 1<<32 - 1
- }
- }
-}
-
-func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
- return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_stub.go
deleted file mode 100644
index c4b9be6db..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_stub.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv6
-
-type icmpv6Filter struct {
-}
-
-func (f *icmpv6Filter) accept(typ ICMPType) {
-}
-
-func (f *icmpv6Filter) block(typ ICMPType) {
-}
-
-func (f *icmpv6Filter) setAll(block bool) {
-}
-
-func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_test.go
deleted file mode 100644
index d8e9675dc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "reflect"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-var icmpStringTests = []struct {
- in ipv6.ICMPType
- out string
-}{
- {ipv6.ICMPTypeDestinationUnreachable, "destination unreachable"},
-
- {256, "<nil>"},
-}
-
-func TestICMPString(t *testing.T) {
- for _, tt := range icmpStringTests {
- s := tt.in.String()
- if s != tt.out {
- t.Errorf("got %s; want %s", s, tt.out)
- }
- }
-}
-
-func TestICMPFilter(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- var f ipv6.ICMPFilter
- for _, toggle := range []bool{false, true} {
- f.SetAll(toggle)
- for _, typ := range []ipv6.ICMPType{
- ipv6.ICMPTypeDestinationUnreachable,
- ipv6.ICMPTypeEchoReply,
- ipv6.ICMPTypeNeighborSolicitation,
- ipv6.ICMPTypeDuplicateAddressConfirmation,
- } {
- f.Accept(typ)
- if f.WillBlock(typ) {
- t.Errorf("ipv6.ICMPFilter.Set(%v, false) failed", typ)
- }
- f.Block(typ)
- if !f.WillBlock(typ) {
- t.Errorf("ipv6.ICMPFilter.Set(%v, true) failed", typ)
- }
- }
- }
-}
-
-func TestSetICMPFilter(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket("ip6:ipv6-icmp", "::1")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv6.NewPacketConn(c)
-
- var f ipv6.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv6.ICMPTypeEchoRequest)
- f.Accept(ipv6.ICMPTypeEchoReply)
- if err := p.SetICMPFilter(&f); err != nil {
- t.Fatal(err)
- }
- kf, err := p.ICMPFilter()
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(kf, &f) {
- t.Fatalf("got %#v; want %#v", kf, f)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_windows.go
deleted file mode 100644
index 443cd0736..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/icmp_windows.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-func (f *icmpv6Filter) accept(typ ICMPType) {
- // TODO(mikio): implement this
-}
-
-func (f *icmpv6Filter) block(typ ICMPType) {
- // TODO(mikio): implement this
-}
-
-func (f *icmpv6Filter) setAll(block bool) {
- // TODO(mikio): implement this
-}
-
-func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
- // TODO(mikio): implement this
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/mocktransponder_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/mocktransponder_test.go
deleted file mode 100644
index 6efe56c68..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/mocktransponder_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "testing"
-)
-
-func connector(t *testing.T, network, addr string, done chan<- bool) {
- defer func() { done <- true }()
-
- c, err := net.Dial(network, addr)
- if err != nil {
- t.Error(err)
- return
- }
- c.Close()
-}
-
-func acceptor(t *testing.T, ln net.Listener, done chan<- bool) {
- defer func() { done <- true }()
-
- c, err := ln.Accept()
- if err != nil {
- t.Error(err)
- return
- }
- c.Close()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicast_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicast_test.go
deleted file mode 100644
index 69a21cd38..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicast_test.go
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "bytes"
- "net"
- "os"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-var packetConnReadWriteMulticastUDPTests = []struct {
- addr string
- grp, src *net.UDPAddr
-}{
- {"[ff02::]:0", &net.UDPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727
-
- {"[ff30::8000:0]:0", &net.UDPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.UDPAddr{IP: net.IPv6loopback}}, // see RFC 5771
-}
-
-func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() {
- t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS)
- }
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range packetConnReadWriteMulticastUDPTests {
- c, err := net.ListenPacket("udp6", tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- grp := *tt.grp
- grp.Port = c.LocalAddr().(*net.UDPAddr).Port
- p := ipv6.NewPacketConn(c)
- defer p.Close()
- if tt.src == nil {
- if err := p.JoinGroup(ifi, &grp); err != nil {
- t.Fatal(err)
- }
- defer p.LeaveGroup(ifi, &grp)
- } else {
- if err := p.JoinSourceSpecificGroup(ifi, &grp, tt.src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support MLDv2 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- defer p.LeaveSourceSpecificGroup(ifi, &grp, tt.src)
- }
- if err := p.SetMulticastInterface(ifi); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastInterface(); err != nil {
- t.Fatal(err)
- }
- if err := p.SetMulticastLoopback(true); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastLoopback(); err != nil {
- t.Fatal(err)
- }
-
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- Src: net.IPv6loopback,
- IfIndex: ifi.Index,
- }
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- wb := []byte("HELLO-R-U-THERE")
-
- for i, toggle := range []bool{true, false, true} {
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- cm.HopLimit = i + 1
- if n, err := p.WriteTo(wb, &cm, &grp); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatal(err)
- }
- rb := make([]byte, 128)
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else if !bytes.Equal(rb[:n], wb) {
- t.Fatalf("got %v; want %v", rb[:n], wb)
- }
- }
- }
-}
-
-var packetConnReadWriteMulticastICMPTests = []struct {
- grp, src *net.IPAddr
-}{
- {&net.IPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727
-
- {&net.IPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.IPAddr{IP: net.IPv6loopback}}, // see RFC 5771
-}
-
-func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() {
- t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS)
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- for _, tt := range packetConnReadWriteMulticastICMPTests {
- c, err := net.ListenPacket("ip6:ipv6-icmp", "::")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- pshicmp := icmp.IPv6PseudoHeader(c.LocalAddr().(*net.IPAddr).IP, tt.grp.IP)
- p := ipv6.NewPacketConn(c)
- defer p.Close()
- if tt.src == nil {
- if err := p.JoinGroup(ifi, tt.grp); err != nil {
- t.Fatal(err)
- }
- defer p.LeaveGroup(ifi, tt.grp)
- } else {
- if err := p.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support MLDv2 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- defer p.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src)
- }
- if err := p.SetMulticastInterface(ifi); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastInterface(); err != nil {
- t.Fatal(err)
- }
- if err := p.SetMulticastLoopback(true); err != nil {
- t.Fatal(err)
- }
- if _, err := p.MulticastLoopback(); err != nil {
- t.Fatal(err)
- }
-
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- Src: net.IPv6loopback,
- IfIndex: ifi.Index,
- }
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
-
- var f ipv6.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv6.ICMPTypeEchoReply)
- if err := p.SetICMPFilter(&f); err != nil {
- t.Fatal(err)
- }
-
- var psh []byte
- for i, toggle := range []bool{true, false, true} {
- if toggle {
- psh = nil
- if err := p.SetChecksum(true, 2); err != nil {
- // Solaris never allows to
- // modify ICMP properties.
- if runtime.GOOS != "solaris" {
- t.Fatal(err)
- }
- }
- } else {
- psh = pshicmp
- // Some platforms never allow to
- // disable the kernel checksum
- // processing.
- p.SetChecksum(false, -1)
- }
- wb, err := (&icmp.Message{
- Type: ipv6.ICMPTypeEchoRequest, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(psh)
- if err != nil {
- t.Fatal(err)
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- cm.HopLimit = i + 1
- if n, err := p.WriteTo(wb, &cm, tt.grp); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- } else {
- if m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]); err != nil {
- t.Fatal(err)
- } else if m.Type != ipv6.ICMPTypeEchoReply || m.Code != 0 {
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv6.ICMPTypeEchoReply, 0)
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastlistener_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastlistener_test.go
deleted file mode 100644
index b27713e2f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastlistener_test.go
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-var udpMultipleGroupListenerTests = []net.Addr{
- &net.UDPAddr{IP: net.ParseIP("ff02::114")}, // see RFC 4727
- &net.UDPAddr{IP: net.ParseIP("ff02::1:114")},
- &net.UDPAddr{IP: net.ParseIP("ff02::2:114")},
-}
-
-func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- for _, gaddr := range udpMultipleGroupListenerTests {
- c, err := net.ListenPacket("udp6", "[::]:0") // wildcard address with non-reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv6.NewPacketConn(c)
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok {
- continue
- }
- if err := p.JoinGroup(&ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- if err := p.LeaveGroup(ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- }
-}
-
-func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- for _, gaddr := range udpMultipleGroupListenerTests {
- c1, err := net.ListenPacket("udp6", "[ff02::]:0") // wildcard address with reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c1.Close()
- _, port, err := net.SplitHostPort(c1.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- c2, err := net.ListenPacket("udp6", net.JoinHostPort("ff02::", port)) // wildcard address with reusable port
- if err != nil {
- t.Fatal(err)
- }
- defer c2.Close()
-
- var ps [2]*ipv6.PacketConn
- ps[0] = ipv6.NewPacketConn(c1)
- ps[1] = ipv6.NewPacketConn(c2)
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok {
- continue
- }
- for _, p := range ps {
- if err := p.JoinGroup(&ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- for _, p := range ps {
- if err := p.LeaveGroup(ifi, gaddr); err != nil {
- t.Fatal(err)
- }
- }
- }
- }
-}
-
-func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727
- type ml struct {
- c *ipv6.PacketConn
- ifi *net.Interface
- }
- var mlt []*ml
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- port := "0"
- for i, ifi := range ift {
- ip, ok := nettest.IsMulticastCapable("ip6", &ifi)
- if !ok {
- continue
- }
- c, err := net.ListenPacket("udp6", net.JoinHostPort(ip.String()+"%"+ifi.Name, port)) // unicast address with non-reusable port
- if err != nil {
- // The listen may fail when the serivce is
- // already in use, but it's fine because the
- // purpose of this is not to test the
- // bookkeeping of IP control block inside the
- // kernel.
- t.Log(err)
- continue
- }
- defer c.Close()
- if port == "0" {
- _, port, err = net.SplitHostPort(c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
- }
- p := ipv6.NewPacketConn(c)
- if err := p.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mlt = append(mlt, &ml{p, &ift[i]})
- }
- for _, m := range mlt {
- if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket("ip6:ipv6-icmp", "::") // wildcard address
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv6.NewPacketConn(c)
- gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727
- var mift []*net.Interface
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok {
- continue
- }
- if err := p.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mift = append(mift, &ift[i])
- }
- for _, ifi := range mift {
- if err := p.LeaveGroup(ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
- switch runtime.GOOS {
- case "darwin", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address
- t.Skipf("not supported on %s", runtime.GOOS)
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727
- type ml struct {
- c *ipv6.PacketConn
- ifi *net.Interface
- }
- var mlt []*ml
-
- ift, err := net.Interfaces()
- if err != nil {
- t.Fatal(err)
- }
- for i, ifi := range ift {
- ip, ok := nettest.IsMulticastCapable("ip6", &ifi)
- if !ok {
- continue
- }
- c, err := net.ListenPacket("ip6:ipv6-icmp", ip.String()+"%"+ifi.Name) // unicast address
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- if err := p.JoinGroup(&ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- mlt = append(mlt, &ml{p, &ift[i]})
- }
- for _, m := range mlt {
- if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go
deleted file mode 100644
index 9e6b902d7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-var packetConnMulticastSocketOptionTests = []struct {
- net, proto, addr string
- grp, src net.Addr
-}{
- {"udp6", "", "[ff02::]:0", &net.UDPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727
- {"ip6", ":ipv6-icmp", "::", &net.IPAddr{IP: net.ParseIP("ff02::115")}, nil}, // see RFC 4727
-
- {"udp6", "", "[ff30::8000:0]:0", &net.UDPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.UDPAddr{IP: net.IPv6loopback}}, // see RFC 5771
- {"ip6", ":ipv6-icmp", "::", &net.IPAddr{IP: net.ParseIP("ff30::8000:2")}, &net.IPAddr{IP: net.IPv6loopback}}, // see RFC 5771
-}
-
-func TestPacketConnMulticastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
- if ifi == nil {
- t.Skipf("not available on %s", runtime.GOOS)
- }
-
- m, ok := nettest.SupportsRawIPSocket()
- for _, tt := range packetConnMulticastSocketOptionTests {
- if tt.net == "ip6" && !ok {
- t.Log(m)
- continue
- }
- c, err := net.ListenPacket(tt.net+tt.proto, tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- defer p.Close()
-
- if tt.src == nil {
- testMulticastSocketOptions(t, p, ifi, tt.grp)
- } else {
- testSourceSpecificMulticastSocketOptions(t, p, ifi, tt.grp, tt.src)
- }
- }
-}
-
-type testIPv6MulticastConn interface {
- MulticastHopLimit() (int, error)
- SetMulticastHopLimit(ttl int) error
- MulticastLoopback() (bool, error)
- SetMulticastLoopback(bool) error
- JoinGroup(*net.Interface, net.Addr) error
- LeaveGroup(*net.Interface, net.Addr) error
- JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
- IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
-}
-
-func testMulticastSocketOptions(t *testing.T, c testIPv6MulticastConn, ifi *net.Interface, grp net.Addr) {
- const hoplim = 255
- if err := c.SetMulticastHopLimit(hoplim); err != nil {
- t.Error(err)
- return
- }
- if v, err := c.MulticastHopLimit(); err != nil {
- t.Error(err)
- return
- } else if v != hoplim {
- t.Errorf("got %v; want %v", v, hoplim)
- return
- }
-
- for _, toggle := range []bool{true, false} {
- if err := c.SetMulticastLoopback(toggle); err != nil {
- t.Error(err)
- return
- }
- if v, err := c.MulticastLoopback(); err != nil {
- t.Error(err)
- return
- } else if v != toggle {
- t.Errorf("got %v; want %v", v, toggle)
- return
- }
- }
-
- if err := c.JoinGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-}
-
-func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv6MulticastConn, ifi *net.Interface, grp, src net.Addr) {
- // MCAST_JOIN_GROUP -> MCAST_BLOCK_SOURCE -> MCAST_UNBLOCK_SOURCE -> MCAST_LEAVE_GROUP
- if err := c.JoinGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
- if err := c.ExcludeSourceSpecificGroup(ifi, grp, src); err != nil {
- switch runtime.GOOS {
- case "freebsd", "linux":
- default: // platforms that don't support MLDv2 fail here
- t.Logf("not supported on %s", runtime.GOOS)
- return
- }
- t.Error(err)
- return
- }
- if err := c.IncludeSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-
- // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_SOURCE_GROUP
- if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
-
- // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_GROUP
- if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil {
- t.Error(err)
- return
- }
- if err := c.LeaveGroup(ifi, grp); err != nil {
- t.Error(err)
- return
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload.go
deleted file mode 100644
index a8197f169..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
-// methods of PacketConn is not implemented.
-
-// A payloadHandler represents the IPv6 datagram payload handler.
-type payloadHandler struct {
- net.PacketConn
- *socket.Conn
- rawOpt
-}
-
-func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg.go
deleted file mode 100644
index 4ee4b062c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !nacl,!plan9,!windows
-
-package ipv6
-
-import (
- "net"
- "syscall"
-)
-
-// ReadFrom reads a payload of the received IPv6 datagram, from the
-// endpoint c, copying the payload into b. It returns the number of
-// bytes copied into b, the control message cm and the source address
-// src of the received datagram.
-func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- if !c.ok() {
- return 0, nil, nil, syscall.EINVAL
- }
- return c.readFrom(b)
-}
-
-// WriteTo writes a payload of the IPv6 datagram, to the destination
-// address dst through the endpoint c, copying the payload from b. It
-// returns the number of bytes written. The control message cm allows
-// the IPv6 header fields and the datagram path to be specified. The
-// cm may be nil if control of the outgoing datagram is not required.
-func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- return c.writeTo(b, cm, dst)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go
deleted file mode 100644
index fdc6c3994..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !go1.9
-// +build !nacl,!plan9,!windows
-
-package ipv6
-
-import "net"
-
-func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- c.rawOpt.RLock()
- oob := NewControlMessage(c.rawOpt.cflags)
- c.rawOpt.RUnlock()
- var nn int
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- case *net.IPConn:
- if n, nn, _, src, err = c.ReadMsgIP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- default:
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType}
- }
- if nn > 0 {
- cm = new(ControlMessage)
- if err = cm.Parse(oob[:nn]); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- }
- if cm != nil {
- cm.Src = netAddrToIP16(src)
- }
- return
-}
-
-func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- oob := cm.Marshal()
- if dst == nil {
- return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress}
- }
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
- case *net.IPConn:
- n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
- default:
- return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType}
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go
deleted file mode 100644
index 8f6d02e2f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go
+++ /dev/null
@@ -1,57 +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 file.
-
-// +build go1.9
-// +build !nacl,!plan9,!windows
-
-package ipv6
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) {
- c.rawOpt.RLock()
- m := socket.Message{
- Buffers: [][]byte{b},
- OOB: NewControlMessage(c.rawOpt.cflags),
- }
- c.rawOpt.RUnlock()
- switch c.PacketConn.(type) {
- case *net.UDPConn:
- if err := c.RecvMsg(&m, 0); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- case *net.IPConn:
- if err := c.RecvMsg(&m, 0); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- default:
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
- }
- var cm *ControlMessage
- if m.NN > 0 {
- cm = new(ControlMessage)
- if err := cm.Parse(m.OOB[:m.NN]); err != nil {
- return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
- }
- cm.Src = netAddrToIP16(m.Addr)
- }
- return m.N, cm, m.Addr, nil
-}
-
-func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) {
- m := socket.Message{
- Buffers: [][]byte{b},
- OOB: cm.Marshal(),
- Addr: dst,
- }
- err := c.SendMsg(&m, 0)
- if err != nil {
- err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
- }
- return m.N, err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go
deleted file mode 100644
index 99a43542b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/payload_nocmsg.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build nacl plan9 windows
-
-package ipv6
-
-import (
- "net"
- "syscall"
-)
-
-// ReadFrom reads a payload of the received IPv6 datagram, from the
-// endpoint c, copying the payload into b. It returns the number of
-// bytes copied into b, the control message cm and the source address
-// src of the received datagram.
-func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
- if !c.ok() {
- return 0, nil, nil, syscall.EINVAL
- }
- if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
- return 0, nil, nil, err
- }
- return
-}
-
-// WriteTo writes a payload of the IPv6 datagram, to the destination
-// address dst through the endpoint c, copying the payload from b. It
-// returns the number of bytes written. The control message cm allows
-// the IPv6 header fields and the datagram path to be specified. The
-// cm may be nil if control of the outgoing datagram is not required.
-func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
- if !c.ok() {
- return 0, syscall.EINVAL
- }
- if dst == nil {
- return 0, errMissingAddress
- }
- return c.PacketConn.WriteTo(b, dst)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go
deleted file mode 100644
index c11d92ae9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !go1.9
-
-package ipv6_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- b.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph := []byte{
- 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- }
- greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
- bb := make([]byte, 128)
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- Src: net.IPv6loopback,
- }
- if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- b.Run("UDP", func(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv6.FlagHopLimit | ipv6.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(payload, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(payload, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
- b.Run("IP", func(b *testing.B) {
- switch runtime.GOOS {
- case "netbsd":
- b.Skip("need to configure gre on netbsd")
- case "openbsd":
- b.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(datagram, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph := []byte{
- 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- }
- greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
-
- t.Run("UDP", func(t *testing.T) {
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr())
- })
- })
- t.Run("IP", func(t *testing.T) {
- switch runtime.GOOS {
- case "netbsd":
- t.Skip("need to configure gre on netbsd")
- case "openbsd":
- t.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr())
- })
- })
-}
-
-func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr) {
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- b := make([]byte, 128)
- n, cm, _, err := p.ReadFrom(b)
- if err != nil {
- t.Error(err)
- return
- }
- if !bytes.Equal(b[:n], data) {
- t.Errorf("got %#v; want %#v", b[:n], data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- Src: net.IPv6loopback,
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- n, err := p.WriteTo(data, &cm, dst)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(data) {
- t.Errorf("got %d; want %d", n, len(data))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- go writer(i%2 != 0)
-
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go
deleted file mode 100644
index e2fd73370..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go
+++ /dev/null
@@ -1,373 +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 file.
-
-// +build go1.9
-
-package ipv6_test
-
-import (
- "bytes"
- "fmt"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- b.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph := []byte{
- 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- }
- greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
- bb := make([]byte, 128)
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- Src: net.IPv6loopback,
- }
- if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- b.Run("UDP", func(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv6.FlagHopLimit | ipv6.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- wms := []ipv6.Message{
- {
- Buffers: [][]byte{payload},
- Addr: dst,
- OOB: cm.Marshal(),
- },
- }
- rms := []ipv6.Message{
- {
- Buffers: [][]byte{bb},
- OOB: ipv6.NewControlMessage(cf),
- },
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(payload, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(payload, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("Batch", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteBatch(wms, 0); err != nil {
- b.Fatal(err)
- }
- if _, err := p.ReadBatch(rms, 0); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
- b.Run("IP", func(b *testing.B) {
- switch runtime.GOOS {
- case "netbsd":
- b.Skip("need to configure gre on netbsd")
- case "openbsd":
- b.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- dst := c.LocalAddr()
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- wms := []ipv6.Message{
- {
- Buffers: [][]byte{datagram},
- Addr: dst,
- OOB: cm.Marshal(),
- },
- }
- rms := []ipv6.Message{
- {
- Buffers: [][]byte{bb},
- OOB: ipv6.NewControlMessage(cf),
- },
- }
- b.Run("Net", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(datagram, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("ToFrom", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(bb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("Batch", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteBatch(wms, 0); err != nil {
- b.Fatal(err)
- }
- if _, err := p.ReadBatch(rms, 0); err != nil {
- b.Fatal(err)
- }
- }
- })
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- payload := []byte("HELLO-R-U-THERE")
- iph := []byte{
- 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- }
- greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
- datagram := append(greh, append(iph, payload...)...)
-
- t.Run("UDP", func(t *testing.T) {
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false)
- })
- t.Run("Batch", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true)
- })
- })
- t.Run("IP", func(t *testing.T) {
- switch runtime.GOOS {
- case "netbsd":
- t.Skip("need to configure gre on netbsd")
- case "openbsd":
- t.Skip("net.inet.gre.allow=0 by default on openbsd")
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
- if err != nil {
- t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- t.Run("ToFrom", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false)
- })
- t.Run("Batch", func(t *testing.T) {
- testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true)
- })
- })
-}
-
-func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr, batch bool) {
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- b := make([]byte, 128)
- n, cm, _, err := p.ReadFrom(b)
- if err != nil {
- t.Error(err)
- return
- }
- if !bytes.Equal(b[:n], data) {
- t.Errorf("got %#v; want %#v", b[:n], data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- batchReader := func() {
- defer wg.Done()
- ms := []ipv6.Message{
- {
- Buffers: [][]byte{make([]byte, 128)},
- OOB: ipv6.NewControlMessage(cf),
- },
- }
- n, err := p.ReadBatch(ms, 0)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(ms) {
- t.Errorf("got %d; want %d", n, len(ms))
- return
- }
- var cm ipv6.ControlMessage
- if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil {
- t.Error(err)
- return
- }
- b := ms[0].Buffers[0][:ms[0].N]
- if !bytes.Equal(b, data) {
- t.Errorf("got %#v; want %#v", b, data)
- return
- }
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- return
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- Src: net.IPv6loopback,
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- n, err := p.WriteTo(data, &cm, dst)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(data) {
- t.Errorf("got %d; want %d", n, len(data))
- return
- }
- }
- batchWriter := func(toggle bool) {
- defer wg.Done()
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- Src: net.IPv6loopback,
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- ms := []ipv6.Message{
- {
- Buffers: [][]byte{data},
- OOB: cm.Marshal(),
- Addr: dst,
- },
- }
- n, err := p.WriteBatch(ms, 0)
- if err != nil {
- t.Error(err)
- return
- }
- if n != len(ms) {
- t.Errorf("got %d; want %d", n, len(ms))
- return
- }
- if ms[0].N != len(data) {
- t.Errorf("got %d; want %d", ms[0].N, len(data))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- if batch {
- go batchReader()
- } else {
- go reader()
- }
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- if batch {
- go batchWriter(i%2 != 0)
- } else {
- go writer(i%2 != 0)
- }
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- if batch {
- go batchReader()
- } else {
- go reader()
- }
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_test.go
deleted file mode 100644
index 206b915ce..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/readwrite_test.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "bytes"
- "net"
- "runtime"
- "strings"
- "sync"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-func BenchmarkReadWriteUnicast(b *testing.B) {
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
- }
- defer c.Close()
-
- dst := c.LocalAddr()
- wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
-
- b.Run("NetUDP", func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := c.WriteTo(wb, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
- }
- })
- b.Run("IPv6UDP", func(b *testing.B) {
- p := ipv6.NewPacketConn(c)
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- }
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- for i := 0; i < b.N; i++ {
- if _, err := p.WriteTo(wb, &cm, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, _, err := p.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- defer p.Close()
-
- dst := c.LocalAddr()
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- wb := []byte("HELLO-R-U-THERE")
-
- if err := p.SetControlMessage(cf, true); err != nil { // probe before test
- if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- reader := func() {
- defer wg.Done()
- rb := make([]byte, 128)
- if n, cm, _, err := p.ReadFrom(rb); err != nil {
- t.Error(err)
- return
- } else if !bytes.Equal(rb[:n], wb) {
- t.Errorf("got %v; want %v", rb[:n], wb)
- return
- } else {
- s := cm.String()
- if strings.Contains(s, ",") {
- t.Errorf("should be space-separated values: %s", s)
- }
- }
- }
- writer := func(toggle bool) {
- defer wg.Done()
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- Src: net.IPv6loopback,
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- t.Error(err)
- return
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- t.Error(err)
- return
- } else if n != len(wb) {
- t.Errorf("got %d; want %d", n, len(wb))
- return
- }
- }
-
- const N = 10
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Add(2 * N)
- for i := 0; i < 2*N; i++ {
- go writer(i%2 != 0)
- }
- wg.Add(N)
- for i := 0; i < N; i++ {
- go reader()
- }
- wg.Wait()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt.go
deleted file mode 100644
index cc3907df3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 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 file.
-
-package ipv6
-
-import "golang.org/x/net/internal/socket"
-
-// Sticky socket options
-const (
- ssoTrafficClass = iota // header field for unicast packet, RFC 3542
- ssoHopLimit // header field for unicast packet, RFC 3493
- ssoMulticastInterface // outbound interface for multicast packet, RFC 3493
- ssoMulticastHopLimit // header field for multicast packet, RFC 3493
- ssoMulticastLoopback // loopback for multicast packet, RFC 3493
- ssoReceiveTrafficClass // header field on received packet, RFC 3542
- ssoReceiveHopLimit // header field on received packet, RFC 2292 or 3542
- ssoReceivePacketInfo // incbound or outbound packet path, RFC 2292 or 3542
- ssoReceivePathMTU // path mtu, RFC 3542
- ssoPathMTU // path mtu, RFC 3542
- ssoChecksum // packet checksum, RFC 2292 or 3542
- ssoICMPFilter // icmp filter, RFC 2292 or 3542
- ssoJoinGroup // any-source multicast, RFC 3493
- ssoLeaveGroup // any-source multicast, RFC 3493
- ssoJoinSourceGroup // source-specific multicast
- ssoLeaveSourceGroup // source-specific multicast
- ssoBlockSourceGroup // any-source or source-specific multicast
- ssoUnblockSourceGroup // any-source or source-specific multicast
- ssoAttachFilter // attach BPF for filtering inbound traffic
-)
-
-// Sticky socket option value types
-const (
- ssoTypeIPMreq = iota + 1
- ssoTypeGroupReq
- ssoTypeGroupSourceReq
-)
-
-// A sockOpt represents a binding for sticky socket option.
-type sockOpt struct {
- socket.Option
- typ int // hint for option value type; optional
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_posix.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_posix.go
deleted file mode 100644
index 0eac86eb8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_posix.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package ipv6
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
- n, err := so.GetInt(c)
- if err != nil {
- return nil, err
- }
- return net.InterfaceByIndex(n)
-}
-
-func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
- var n int
- if ifi != nil {
- n = ifi.Index
- }
- return so.SetInt(c, n)
-}
-
-func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
- b := make([]byte, so.Len)
- n, err := so.Get(c, b)
- if err != nil {
- return nil, err
- }
- if n != sizeofICMPv6Filter {
- return nil, errOpNoSupport
- }
- return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
-}
-
-func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
- b := (*[sizeofICMPv6Filter]byte)(unsafe.Pointer(f))[:sizeofICMPv6Filter]
- return so.Set(c, b)
-}
-
-func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
- b := make([]byte, so.Len)
- n, err := so.Get(c, b)
- if err != nil {
- return nil, 0, err
- }
- if n != sizeofIPv6Mtuinfo {
- return nil, 0, errOpNoSupport
- }
- mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
- if mi.Addr.Scope_id == 0 {
- return nil, int(mi.Mtu), nil
- }
- ifi, err := net.InterfaceByIndex(int(mi.Addr.Scope_id))
- if err != nil {
- return nil, 0, err
- }
- return ifi, int(mi.Mtu), nil
-}
-
-func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- switch so.typ {
- case ssoTypeIPMreq:
- return so.setIPMreq(c, ifi, grp)
- case ssoTypeGroupReq:
- return so.setGroupReq(c, ifi, grp)
- default:
- return errOpNoSupport
- }
-}
-
-func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return so.setGroupSourceReq(c, ifi, grp, src)
-}
-
-func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
- return so.setAttachFilter(c, f)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_stub.go
deleted file mode 100644
index 1f4a273e4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_stub.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv6
-
-import (
- "net"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
- return nil, errOpNoSupport
-}
-
-func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
- return nil, 0, errOpNoSupport
-}
-
-func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_test.go
deleted file mode 100644
index 774338dbf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sockopt_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "fmt"
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-var supportsIPv6 bool = nettest.SupportsIPv6()
-
-func TestConnInitiatorPathMTU(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- ln, err := net.Listen("tcp6", "[::1]:0")
- if err != nil {
- t.Fatal(err)
- }
- defer ln.Close()
-
- done := make(chan bool)
- go acceptor(t, ln, done)
-
- c, err := net.Dial("tcp6", ln.Addr().String())
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
- t.Logf("not supported on %s", runtime.GOOS)
- default:
- t.Fatal(err)
- }
- } else {
- t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
- }
-
- <-done
-}
-
-func TestConnResponderPathMTU(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- ln, err := net.Listen("tcp6", "[::1]:0")
- if err != nil {
- t.Fatal(err)
- }
- defer ln.Close()
-
- done := make(chan bool)
- go connector(t, "tcp6", ln.Addr().String(), done)
-
- c, err := ln.Accept()
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
- t.Logf("not supported on %s", runtime.GOOS)
- default:
- t.Fatal(err)
- }
- } else {
- t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
- }
-
- <-done
-}
-
-func TestPacketConnChecksum(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolOSPFIGP), "::") // OSPF for IPv6
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- p := ipv6.NewPacketConn(c)
- offset := 12 // see RFC 5340
-
- for _, toggle := range []bool{false, true} {
- if err := p.SetChecksum(toggle, offset); err != nil {
- if toggle {
- t.Fatalf("ipv6.PacketConn.SetChecksum(%v, %v) failed: %v", toggle, offset, err)
- } else {
- // Some platforms never allow to disable the kernel
- // checksum processing.
- t.Logf("ipv6.PacketConn.SetChecksum(%v, %v) failed: %v", toggle, offset, err)
- }
- }
- if on, offset, err := p.Checksum(); err != nil {
- t.Fatal(err)
- } else {
- t.Logf("kernel checksum processing enabled=%v, offset=%v", on, offset)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq.go
deleted file mode 100644
index b0510c0b5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package ipv6
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- var mreq ipv6Mreq
- copy(mreq.Multiaddr[:], grp)
- if ifi != nil {
- mreq.setIfindex(ifi.Index)
- }
- b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq]
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
deleted file mode 100644
index eece96187..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv6
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf.go
deleted file mode 100644
index b2dbcb2f2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf.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 file.
-
-// +build linux
-
-package ipv6
-
-import (
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
- prog := sockFProg{
- Len: uint16(len(f)),
- Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
- }
- b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
deleted file mode 100644
index 676bea555..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
+++ /dev/null
@@ -1,16 +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 file.
-
-// +build !linux
-
-package ipv6
-
-import (
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bsd.go
deleted file mode 100644
index e416eaa1f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_bsd.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 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 file.
-
-// +build dragonfly netbsd openbsd
-
-package ipv6
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
- ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
- ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
- ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
- ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
- ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
- ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
- ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
- ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
- ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- }
-)
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (pi *inet6Pktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Interface = uint32(i)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_darwin.go
deleted file mode 100644
index e3d044392..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_darwin.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "strconv"
- "strings"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlHopLimit: {sysIPV6_2292HOPLIMIT, 4, marshal2292HopLimit, parseHopLimit},
- ctlPacketInfo: {sysIPV6_2292PKTINFO, sizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292HOPLIMIT, Len: 4}},
- ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292PKTINFO, Len: 4}},
- ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- }
-)
-
-func init() {
- // Seems like kern.osreldate is veiled on latest OS X. We use
- // kern.osrelease instead.
- s, err := syscall.Sysctl("kern.osrelease")
- if err != nil {
- return
- }
- ss := strings.Split(s, ".")
- if len(ss) == 0 {
- return
- }
- // The IP_PKTINFO and protocol-independent multicast API were
- // introduced in OS X 10.7 (Darwin 11). But it looks like
- // those features require OS X 10.8 (Darwin 12) or above.
- // See http://support.apple.com/kb/HT1633.
- if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 {
- return
- }
- ctlOpts[ctlTrafficClass] = ctlOpt{sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}
- ctlOpts[ctlHopLimit] = ctlOpt{sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}
- ctlOpts[ctlPacketInfo] = ctlOpt{sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}
- ctlOpts[ctlNextHop] = ctlOpt{sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}
- ctlOpts[ctlPathMTU] = ctlOpt{sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}
- sockOpts[ssoTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}
- sockOpts[ssoReceiveTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}
- sockOpts[ssoReceiveHopLimit] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}
- sockOpts[ssoReceivePacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}
- sockOpts[ssoReceivePathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}
- sockOpts[ssoPathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}
- sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
- sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
- sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
- sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
-}
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (pi *inet6Pktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Interface = uint32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_freebsd.go
deleted file mode 100644
index e9349dc2c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_freebsd.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "runtime"
- "strings"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
- ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
- ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
- ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
- ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
- }
-
- sockOpts = map[int]sockOpt{
- ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
- ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
- ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
- ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
- ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
- ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- }
-)
-
-func init() {
- if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" {
- archs, _ := syscall.Sysctl("kern.supported_archs")
- for _, s := range strings.Fields(archs) {
- if s == "amd64" {
- freebsd32o64 = true
- break
- }
- }
- }
-}
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (pi *inet6Pktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Interface = uint32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
- sa.Len = sizeofSockaddrInet6
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_linux.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_linux.go
deleted file mode 100644
index bc218103c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_linux.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
- ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
- ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
- ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
- ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
- ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
- ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
- ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
- ssoChecksum: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysIPV6_CHECKSUM, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMPV6_FILTER, Len: sizeofICMPv6Filter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
- }
-)
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (pi *inet6Pktinfo) setIfindex(i int) {
- pi.Ifindex = int32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Ifindex = int32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_solaris.go
deleted file mode 100644
index d348b5f6e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_solaris.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2016 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 file.
-
-package ipv6
-
-import (
- "net"
- "syscall"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
- ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
- ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
- ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
- ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
- }
-
- sockOpts = map[int]*sockOpt{
- ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
- ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
- ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
- ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
- ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
- ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
- ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
- ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
- }
-)
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (pi *inet6Pktinfo) setIfindex(i int) {
- pi.Ifindex = uint32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Interface = uint32(i)
-}
-
-func (gr *groupReq) setGroup(grp net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
-}
-
-func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
- sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], grp)
- sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260))
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], src)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
deleted file mode 100644
index add8ccc0b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build darwin freebsd linux solaris
-
-package ipv6
-
-import (
- "net"
- "unsafe"
-
- "golang.org/x/net/internal/socket"
-)
-
-var freebsd32o64 bool
-
-func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- var gr groupReq
- if ifi != nil {
- gr.Interface = uint32(ifi.Index)
- }
- gr.setGroup(grp)
- var b []byte
- if freebsd32o64 {
- var d [sizeofGroupReq + 4]byte
- s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
- copy(d[:4], s[:4])
- copy(d[8:], s[4:])
- b = d[:]
- } else {
- b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
- }
- return so.Set(c, b)
-}
-
-func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- var gsr groupSourceReq
- if ifi != nil {
- gsr.Interface = uint32(ifi.Index)
- }
- gsr.setSourceGroup(grp, src)
- var b []byte
- if freebsd32o64 {
- var d [sizeofGroupSourceReq + 4]byte
- s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
- copy(d[:4], s[:4])
- copy(d[8:], s[4:])
- b = d[:]
- } else {
- b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
- }
- return so.Set(c, b)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
deleted file mode 100644
index 581ee490f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !darwin,!freebsd,!linux,!solaris
-
-package ipv6
-
-import (
- "net"
-
- "golang.org/x/net/internal/socket"
-)
-
-func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
- return errOpNoSupport
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_stub.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_stub.go
deleted file mode 100644
index b845388ea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_stub.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 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 file.
-
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package ipv6
-
-var (
- ctlOpts = [ctlMax]ctlOpt{}
-
- sockOpts = map[int]*sockOpt{}
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_windows.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_windows.go
deleted file mode 100644
index fc36b018b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/sys_windows.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6
-
-import (
- "net"
- "syscall"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/socket"
-)
-
-const (
- // See ws2tcpip.h.
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PKTINFO = 0x13
-
- sizeofSockaddrInet6 = 0x1c
-
- sizeofIPv6Mreq = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofICMPv6Filter = 0
-)
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type icmpv6Filter struct {
- // TODO(mikio): implement this
-}
-
-var (
- ctlOpts = [ctlMax]ctlOpt{}
-
- sockOpts = map[int]*sockOpt{
- ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
- ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
- ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
- ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
- ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
- }
-)
-
-func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
- sa.Family = syscall.AF_INET6
- copy(sa.Addr[:], ip)
- sa.Scope_id = uint32(i)
-}
-
-func (mreq *ipv6Mreq) setIfindex(i int) {
- mreq.Interface = uint32(i)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicast_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicast_test.go
deleted file mode 100644
index a0b7d9550..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicast_test.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "bytes"
- "net"
- "os"
- "runtime"
- "testing"
- "time"
-
- "golang.org/x/net/icmp"
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- c, err := nettest.NewLocalPacketListener("udp6")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- defer p.Close()
-
- dst := c.LocalAddr()
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- Src: net.IPv6loopback,
- }
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- wb := []byte("HELLO-R-U-THERE")
-
- for i, toggle := range []bool{true, false, true} {
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- cm.HopLimit = i + 1
- if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- t.Fatal(err)
- } else if !bytes.Equal(rb[:n], wb) {
- t.Fatalf("got %v; want %v", rb[:n], wb)
- }
- }
-}
-
-func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
- if m, ok := nettest.SupportsRawIPSocket(); !ok {
- t.Skip(m)
- }
-
- c, err := net.ListenPacket("ip6:ipv6-icmp", "::1")
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
- p := ipv6.NewPacketConn(c)
- defer p.Close()
-
- dst, err := net.ResolveIPAddr("ip6", "::1")
- if err != nil {
- t.Fatal(err)
- }
-
- pshicmp := icmp.IPv6PseudoHeader(c.LocalAddr().(*net.IPAddr).IP, dst.IP)
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- Src: net.IPv6loopback,
- }
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
-
- var f ipv6.ICMPFilter
- f.SetAll(true)
- f.Accept(ipv6.ICMPTypeEchoReply)
- if err := p.SetICMPFilter(&f); err != nil {
- t.Fatal(err)
- }
-
- var psh []byte
- for i, toggle := range []bool{true, false, true} {
- if toggle {
- psh = nil
- if err := p.SetChecksum(true, 2); err != nil {
- // Solaris never allows to modify
- // ICMP properties.
- if runtime.GOOS != "solaris" {
- t.Fatal(err)
- }
- }
- } else {
- psh = pshicmp
- // Some platforms never allow to disable the
- // kernel checksum processing.
- p.SetChecksum(false, -1)
- }
- wb, err := (&icmp.Message{
- Type: ipv6.ICMPTypeEchoRequest, Code: 0,
- Body: &icmp.Echo{
- ID: os.Getpid() & 0xffff, Seq: i + 1,
- Data: []byte("HELLO-R-U-THERE"),
- },
- }).Marshal(psh)
- if err != nil {
- t.Fatal(err)
- }
- if err := p.SetControlMessage(cf, toggle); err != nil {
- if nettest.ProtocolNotSupported(err) {
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- }
- cm.HopLimit = i + 1
- if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- t.Fatal(err)
- } else if n != len(wb) {
- t.Fatalf("got %v; want %v", n, len(wb))
- }
- rb := make([]byte, 128)
- if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil {
- t.Fatal(err)
- }
- if n, _, _, err := p.ReadFrom(rb); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
- t.Logf("not supported on %s", runtime.GOOS)
- continue
- }
- t.Fatal(err)
- } else {
- if m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]); err != nil {
- t.Fatal(err)
- } else if m.Type != ipv6.ICMPTypeEchoReply || m.Code != 0 {
- t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv6.ICMPTypeEchoReply, 0)
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go
deleted file mode 100644
index e175dccf5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2013 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 file.
-
-package ipv6_test
-
-import (
- "net"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/iana"
- "golang.org/x/net/internal/nettest"
- "golang.org/x/net/ipv6"
-)
-
-func TestConnUnicastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- ln, err := net.Listen("tcp6", "[::1]:0")
- if err != nil {
- t.Fatal(err)
- }
- defer ln.Close()
-
- errc := make(chan error, 1)
- go func() {
- c, err := ln.Accept()
- if err != nil {
- errc <- err
- return
- }
- errc <- c.Close()
- }()
-
- c, err := net.Dial("tcp6", ln.Addr().String())
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- testUnicastSocketOptions(t, ipv6.NewConn(c))
-
- if err := <-errc; err != nil {
- t.Errorf("server: %v", err)
- }
-}
-
-var packetConnUnicastSocketOptionTests = []struct {
- net, proto, addr string
-}{
- {"udp6", "", "[::1]:0"},
- {"ip6", ":ipv6-icmp", "::1"},
-}
-
-func TestPacketConnUnicastSocketOptions(t *testing.T) {
- switch runtime.GOOS {
- case "nacl", "plan9", "windows":
- t.Skipf("not supported on %s", runtime.GOOS)
- }
- if !supportsIPv6 {
- t.Skip("ipv6 is not supported")
- }
-
- m, ok := nettest.SupportsRawIPSocket()
- for _, tt := range packetConnUnicastSocketOptionTests {
- if tt.net == "ip6" && !ok {
- t.Log(m)
- continue
- }
- c, err := net.ListenPacket(tt.net+tt.proto, tt.addr)
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- testUnicastSocketOptions(t, ipv6.NewPacketConn(c))
- }
-}
-
-type testIPv6UnicastConn interface {
- TrafficClass() (int, error)
- SetTrafficClass(int) error
- HopLimit() (int, error)
- SetHopLimit(int) error
-}
-
-func testUnicastSocketOptions(t *testing.T, c testIPv6UnicastConn) {
- tclass := iana.DiffServCS0 | iana.NotECNTransport
- if err := c.SetTrafficClass(tclass); err != nil {
- switch runtime.GOOS {
- case "darwin": // older darwin kernels don't support IPV6_TCLASS option
- t.Logf("not supported on %s", runtime.GOOS)
- goto next
- }
- t.Fatal(err)
- }
- if v, err := c.TrafficClass(); err != nil {
- t.Fatal(err)
- } else if v != tclass {
- t.Fatalf("got %v; want %v", v, tclass)
- }
-
-next:
- hoplim := 255
- if err := c.SetHopLimit(hoplim); err != nil {
- t.Fatal(err)
- }
- if v, err := c.HopLimit(); err != nil {
- t.Fatal(err)
- } else if v != hoplim {
- t.Fatalf("got %v; want %v", v, hoplim)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_darwin.go
deleted file mode 100644
index 6aab1dfab..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_darwin.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
-
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
- sysIPV6_2292PKTINFO = 0x13
- sysIPV6_2292HOPLIMIT = 0x14
- sysIPV6_2292NEXTHOP = 0x15
- sysIPV6_2292HOPOPTS = 0x16
- sysIPV6_2292DSTOPTS = 0x17
- sysIPV6_2292RTHDR = 0x18
-
- sysIPV6_2292PKTOPTIONS = 0x19
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RECVTCLASS = 0x23
- sysIPV6_TCLASS = 0x24
-
- sysIPV6_RTHDRDSTOPTS = 0x39
-
- sysIPV6_RECVPKTINFO = 0x3d
-
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
-
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PREFER_TEMPADDR = 0x3f
-
- sysIPV6_MSFILTER = 0x4a
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sysIPV6_BOUND_IF = 0x7d
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [128]byte
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [128]byte
- Pad_cgo_1 [128]byte
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go
deleted file mode 100644
index d2de804d8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_dragonfly.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RTHDRDSTOPTS = 0x23
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PREFER_TEMPADDR = 0x3f
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go
deleted file mode 100644
index 919e572d4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RTHDRDSTOPTS = 0x23
-
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PREFER_TEMPADDR = 0x3f
-
- sysIPV6_BINDANY = 0x40
-
- sysIPV6_MSFILTER = 0x4a
-
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type groupReq struct {
- Interface uint32
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group sockaddrStorage
- Source sockaddrStorage
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go
deleted file mode 100644
index cb8141f9c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RTHDRDSTOPTS = 0x23
-
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PREFER_TEMPADDR = 0x3f
-
- sysIPV6_BINDANY = 0x40
-
- sysIPV6_MSFILTER = 0x4a
-
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
- Source sockaddrStorage
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go
deleted file mode 100644
index cb8141f9c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RTHDRDSTOPTS = 0x23
-
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PREFER_TEMPADDR = 0x3f
-
- sysIPV6_BINDANY = 0x40
-
- sysIPV6_MSFILTER = 0x4a
-
- sysMCAST_JOIN_GROUP = 0x50
- sysMCAST_LEAVE_GROUP = 0x51
- sysMCAST_JOIN_SOURCE_GROUP = 0x52
- sysMCAST_LEAVE_SOURCE_GROUP = 0x53
- sysMCAST_BLOCK_SOURCE = 0x54
- sysMCAST_UNBLOCK_SOURCE = 0x55
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrStorage struct {
- Len uint8
- Family uint8
- X__ss_pad1 [6]int8
- X__ss_align int64
- X__ss_pad2 [112]int8
-}
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group sockaddrStorage
- Source sockaddrStorage
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
deleted file mode 100644
index 73aa8c6df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
deleted file mode 100644
index 73aa8c6df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
deleted file mode 100644
index 73aa8c6df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
deleted file mode 100644
index 73aa8c6df..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
deleted file mode 100644
index c9bf6a87e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x84
- sizeofGroupSourceReq = 0x104
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x8
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]uint8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
deleted file mode 100644
index b64f0157d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_linux.go
-
-package ipv6
-
-const (
- sysIPV6_ADDRFORM = 0x1
- sysIPV6_2292PKTINFO = 0x2
- sysIPV6_2292HOPOPTS = 0x3
- sysIPV6_2292DSTOPTS = 0x4
- sysIPV6_2292RTHDR = 0x5
- sysIPV6_2292PKTOPTIONS = 0x6
- sysIPV6_CHECKSUM = 0x7
- sysIPV6_2292HOPLIMIT = 0x8
- sysIPV6_NEXTHOP = 0x9
- sysIPV6_FLOWINFO = 0xb
-
- sysIPV6_UNICAST_HOPS = 0x10
- sysIPV6_MULTICAST_IF = 0x11
- sysIPV6_MULTICAST_HOPS = 0x12
- sysIPV6_MULTICAST_LOOP = 0x13
- sysIPV6_ADD_MEMBERSHIP = 0x14
- sysIPV6_DROP_MEMBERSHIP = 0x15
- sysMCAST_JOIN_GROUP = 0x2a
- sysMCAST_LEAVE_GROUP = 0x2d
- sysMCAST_JOIN_SOURCE_GROUP = 0x2e
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_MSFILTER = 0x30
- sysIPV6_ROUTER_ALERT = 0x16
- sysIPV6_MTU_DISCOVER = 0x17
- sysIPV6_MTU = 0x18
- sysIPV6_RECVERR = 0x19
- sysIPV6_V6ONLY = 0x1a
- sysIPV6_JOIN_ANYCAST = 0x1b
- sysIPV6_LEAVE_ANYCAST = 0x1c
-
- sysIPV6_FLOWLABEL_MGR = 0x20
- sysIPV6_FLOWINFO_SEND = 0x21
-
- sysIPV6_IPSEC_POLICY = 0x22
- sysIPV6_XFRM_POLICY = 0x23
-
- sysIPV6_RECVPKTINFO = 0x31
- sysIPV6_PKTINFO = 0x32
- sysIPV6_RECVHOPLIMIT = 0x33
- sysIPV6_HOPLIMIT = 0x34
- sysIPV6_RECVHOPOPTS = 0x35
- sysIPV6_HOPOPTS = 0x36
- sysIPV6_RTHDRDSTOPTS = 0x37
- sysIPV6_RECVRTHDR = 0x38
- sysIPV6_RTHDR = 0x39
- sysIPV6_RECVDSTOPTS = 0x3a
- sysIPV6_DSTOPTS = 0x3b
- sysIPV6_RECVPATHMTU = 0x3c
- sysIPV6_PATHMTU = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_RECVTCLASS = 0x42
- sysIPV6_TCLASS = 0x43
-
- sysIPV6_ADDR_PREFERENCES = 0x48
-
- sysIPV6_PREFER_SRC_TMP = 0x1
- sysIPV6_PREFER_SRC_PUBLIC = 0x2
- sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
- sysIPV6_PREFER_SRC_COA = 0x4
- sysIPV6_PREFER_SRC_HOME = 0x400
- sysIPV6_PREFER_SRC_CGA = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x800
-
- sysIPV6_MINHOPCOUNT = 0x49
-
- sysIPV6_ORIGDSTADDR = 0x4a
- sysIPV6_RECVORIGDSTADDR = 0x4a
- sysIPV6_TRANSPARENT = 0x4b
- sysIPV6_UNICAST_IF = 0x4c
-
- sysICMPV6_FILTER = 0x1
-
- sysICMPV6_FILTER_BLOCK = 0x1
- sysICMPV6_FILTER_PASS = 0x2
- sysICMPV6_FILTER_BLOCKOTHERS = 0x3
- sysICMPV6_FILTER_PASSONLY = 0x4
-
- sysSOL_SOCKET = 0x1
- sysSO_ATTACH_FILTER = 0x1a
-
- sizeofKernelSockaddrStorage = 0x80
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
- sizeofIPv6FlowlabelReq = 0x20
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x88
- sizeofGroupSourceReq = 0x108
-
- sizeofICMPv6Filter = 0x20
-
- sizeofSockFprog = 0x10
-)
-
-type kernelSockaddrStorage struct {
- Family uint16
- X__data [126]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6FlowlabelReq struct {
- Dst [16]byte /* in6_addr */
- Label uint32
- Action uint8
- Share uint8
- Flags uint16
- Expires uint16
- Linger uint16
- X__flr_pad uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Ifindex int32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [4]byte
- Group kernelSockaddrStorage
- Source kernelSockaddrStorage
-}
-
-type icmpv6Filter struct {
- Data [8]uint32
-}
-
-type sockFProg struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *sockFilter
-}
-
-type sockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go
deleted file mode 100644
index bcada13b7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_netbsd.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_IPSEC_POLICY = 0x1c
-
- sysIPV6_RTHDRDSTOPTS = 0x23
-
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go
deleted file mode 100644
index 86cf3c637..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_openbsd.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x4
- sysIPV6_MULTICAST_IF = 0x9
- sysIPV6_MULTICAST_HOPS = 0xa
- sysIPV6_MULTICAST_LOOP = 0xb
- sysIPV6_JOIN_GROUP = 0xc
- sysIPV6_LEAVE_GROUP = 0xd
- sysIPV6_PORTRANGE = 0xe
- sysICMP6_FILTER = 0x12
-
- sysIPV6_CHECKSUM = 0x1a
- sysIPV6_V6ONLY = 0x1b
-
- sysIPV6_RTHDRDSTOPTS = 0x23
-
- sysIPV6_RECVPKTINFO = 0x24
- sysIPV6_RECVHOPLIMIT = 0x25
- sysIPV6_RECVRTHDR = 0x26
- sysIPV6_RECVHOPOPTS = 0x27
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysIPV6_USE_MIN_MTU = 0x2a
- sysIPV6_RECVPATHMTU = 0x2b
-
- sysIPV6_PATHMTU = 0x2c
-
- sysIPV6_PKTINFO = 0x2e
- sysIPV6_HOPLIMIT = 0x2f
- sysIPV6_NEXTHOP = 0x30
- sysIPV6_HOPOPTS = 0x31
- sysIPV6_DSTOPTS = 0x32
- sysIPV6_RTHDR = 0x33
-
- sysIPV6_AUTH_LEVEL = 0x35
- sysIPV6_ESP_TRANS_LEVEL = 0x36
- sysIPV6_ESP_NETWORK_LEVEL = 0x37
- sysIPSEC6_OUTSA = 0x38
- sysIPV6_RECVTCLASS = 0x39
-
- sysIPV6_AUTOFLOWLABEL = 0x3b
- sysIPV6_IPCOMP_LEVEL = 0x3c
-
- sysIPV6_TCLASS = 0x3d
- sysIPV6_DONTFRAG = 0x3e
- sysIPV6_PIPEX = 0x3f
-
- sysIPV6_RTABLE = 0x1021
-
- sysIPV6_PORTRANGE_DEFAULT = 0x0
- sysIPV6_PORTRANGE_HIGH = 0x1
- sysIPV6_PORTRANGE_LOW = 0x2
-
- sizeofSockaddrInet6 = 0x1c
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x20
-
- sizeofIPv6Mreq = 0x14
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type icmpv6Filter struct {
- Filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_solaris.go
deleted file mode 100644
index cf1837dd2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/ipv6/zsys_solaris.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_solaris.go
-
-package ipv6
-
-const (
- sysIPV6_UNICAST_HOPS = 0x5
- sysIPV6_MULTICAST_IF = 0x6
- sysIPV6_MULTICAST_HOPS = 0x7
- sysIPV6_MULTICAST_LOOP = 0x8
- sysIPV6_JOIN_GROUP = 0x9
- sysIPV6_LEAVE_GROUP = 0xa
-
- sysIPV6_PKTINFO = 0xb
-
- sysIPV6_HOPLIMIT = 0xc
- sysIPV6_NEXTHOP = 0xd
- sysIPV6_HOPOPTS = 0xe
- sysIPV6_DSTOPTS = 0xf
-
- sysIPV6_RTHDR = 0x10
- sysIPV6_RTHDRDSTOPTS = 0x11
-
- sysIPV6_RECVPKTINFO = 0x12
- sysIPV6_RECVHOPLIMIT = 0x13
- sysIPV6_RECVHOPOPTS = 0x14
-
- sysIPV6_RECVRTHDR = 0x16
-
- sysIPV6_RECVRTHDRDSTOPTS = 0x17
-
- sysIPV6_CHECKSUM = 0x18
- sysIPV6_RECVTCLASS = 0x19
- sysIPV6_USE_MIN_MTU = 0x20
- sysIPV6_DONTFRAG = 0x21
- sysIPV6_SEC_OPT = 0x22
- sysIPV6_SRC_PREFERENCES = 0x23
- sysIPV6_RECVPATHMTU = 0x24
- sysIPV6_PATHMTU = 0x25
- sysIPV6_TCLASS = 0x26
- sysIPV6_V6ONLY = 0x27
-
- sysIPV6_RECVDSTOPTS = 0x28
-
- sysMCAST_JOIN_GROUP = 0x29
- sysMCAST_LEAVE_GROUP = 0x2a
- sysMCAST_BLOCK_SOURCE = 0x2b
- sysMCAST_UNBLOCK_SOURCE = 0x2c
- sysMCAST_JOIN_SOURCE_GROUP = 0x2d
- sysMCAST_LEAVE_SOURCE_GROUP = 0x2e
-
- sysIPV6_PREFER_SRC_HOME = 0x1
- sysIPV6_PREFER_SRC_COA = 0x2
- sysIPV6_PREFER_SRC_PUBLIC = 0x4
- sysIPV6_PREFER_SRC_TMP = 0x8
- sysIPV6_PREFER_SRC_NONCGA = 0x10
- sysIPV6_PREFER_SRC_CGA = 0x20
-
- sysIPV6_PREFER_SRC_MIPMASK = 0x3
- sysIPV6_PREFER_SRC_MIPDEFAULT = 0x1
- sysIPV6_PREFER_SRC_TMPMASK = 0xc
- sysIPV6_PREFER_SRC_TMPDEFAULT = 0x4
- sysIPV6_PREFER_SRC_CGAMASK = 0x30
- sysIPV6_PREFER_SRC_CGADEFAULT = 0x10
-
- sysIPV6_PREFER_SRC_MASK = 0x3f
-
- sysIPV6_PREFER_SRC_DEFAULT = 0x15
-
- sysIPV6_BOUND_IF = 0x41
- sysIPV6_UNSPEC_SRC = 0x42
-
- sysICMP6_FILTER = 0x1
-
- sizeofSockaddrStorage = 0x100
- sizeofSockaddrInet6 = 0x20
- sizeofInet6Pktinfo = 0x14
- sizeofIPv6Mtuinfo = 0x24
-
- sizeofIPv6Mreq = 0x14
- sizeofGroupReq = 0x104
- sizeofGroupSourceReq = 0x204
-
- sizeofICMPv6Filter = 0x20
-)
-
-type sockaddrStorage struct {
- Family uint16
- X_ss_pad1 [6]int8
- X_ss_align float64
- X_ss_pad2 [240]int8
-}
-
-type sockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
-}
-
-type inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type ipv6Mtuinfo struct {
- Addr sockaddrInet6
- Mtu uint32
-}
-
-type ipv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type groupReq struct {
- Interface uint32
- Pad_cgo_0 [256]byte
-}
-
-type groupSourceReq struct {
- Interface uint32
- Pad_cgo_0 [256]byte
- Pad_cgo_1 [256]byte
-}
-
-type icmpv6Filter struct {
- X__icmp6_filt [8]uint32
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex.go
deleted file mode 100644
index 20f2b8940..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex.go
+++ /dev/null
@@ -1,351 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package httplex contains rules around lexical matters of various
-// HTTP-related specifications.
-//
-// This package is shared by the standard library (which vendors it)
-// and x/net/http2. It comes with no API stability promise.
-package httplex
-
-import (
- "net"
- "strings"
- "unicode/utf8"
-
- "golang.org/x/net/idna"
-)
-
-var isTokenTable = [127]bool{
- '!': true,
- '#': true,
- '$': true,
- '%': true,
- '&': true,
- '\'': true,
- '*': true,
- '+': true,
- '-': true,
- '.': true,
- '0': true,
- '1': true,
- '2': true,
- '3': true,
- '4': true,
- '5': true,
- '6': true,
- '7': true,
- '8': true,
- '9': true,
- 'A': true,
- 'B': true,
- 'C': true,
- 'D': true,
- 'E': true,
- 'F': true,
- 'G': true,
- 'H': true,
- 'I': true,
- 'J': true,
- 'K': true,
- 'L': true,
- 'M': true,
- 'N': true,
- 'O': true,
- 'P': true,
- 'Q': true,
- 'R': true,
- 'S': true,
- 'T': true,
- 'U': true,
- 'W': true,
- 'V': true,
- 'X': true,
- 'Y': true,
- 'Z': true,
- '^': true,
- '_': true,
- '`': true,
- 'a': true,
- 'b': true,
- 'c': true,
- 'd': true,
- 'e': true,
- 'f': true,
- 'g': true,
- 'h': true,
- 'i': true,
- 'j': true,
- 'k': true,
- 'l': true,
- 'm': true,
- 'n': true,
- 'o': true,
- 'p': true,
- 'q': true,
- 'r': true,
- 's': true,
- 't': true,
- 'u': true,
- 'v': true,
- 'w': true,
- 'x': true,
- 'y': true,
- 'z': true,
- '|': true,
- '~': true,
-}
-
-func IsTokenRune(r rune) bool {
- i := int(r)
- return i < len(isTokenTable) && isTokenTable[i]
-}
-
-func isNotToken(r rune) bool {
- return !IsTokenRune(r)
-}
-
-// HeaderValuesContainsToken reports whether any string in values
-// contains the provided token, ASCII case-insensitively.
-func HeaderValuesContainsToken(values []string, token string) bool {
- for _, v := range values {
- if headerValueContainsToken(v, token) {
- return true
- }
- }
- return false
-}
-
-// isOWS reports whether b is an optional whitespace byte, as defined
-// by RFC 7230 section 3.2.3.
-func isOWS(b byte) bool { return b == ' ' || b == '\t' }
-
-// trimOWS returns x with all optional whitespace removes from the
-// beginning and end.
-func trimOWS(x string) string {
- // TODO: consider using strings.Trim(x, " \t") instead,
- // if and when it's fast enough. See issue 10292.
- // But this ASCII-only code will probably always beat UTF-8
- // aware code.
- for len(x) > 0 && isOWS(x[0]) {
- x = x[1:]
- }
- for len(x) > 0 && isOWS(x[len(x)-1]) {
- x = x[:len(x)-1]
- }
- return x
-}
-
-// headerValueContainsToken reports whether v (assumed to be a
-// 0#element, in the ABNF extension described in RFC 7230 section 7)
-// contains token amongst its comma-separated tokens, ASCII
-// case-insensitively.
-func headerValueContainsToken(v string, token string) bool {
- v = trimOWS(v)
- if comma := strings.IndexByte(v, ','); comma != -1 {
- return tokenEqual(trimOWS(v[:comma]), token) || headerValueContainsToken(v[comma+1:], token)
- }
- return tokenEqual(v, token)
-}
-
-// lowerASCII returns the ASCII lowercase version of b.
-func lowerASCII(b byte) byte {
- if 'A' <= b && b <= 'Z' {
- return b + ('a' - 'A')
- }
- return b
-}
-
-// tokenEqual reports whether t1 and t2 are equal, ASCII case-insensitively.
-func tokenEqual(t1, t2 string) bool {
- if len(t1) != len(t2) {
- return false
- }
- for i, b := range t1 {
- if b >= utf8.RuneSelf {
- // No UTF-8 or non-ASCII allowed in tokens.
- return false
- }
- if lowerASCII(byte(b)) != lowerASCII(t2[i]) {
- return false
- }
- }
- return true
-}
-
-// isLWS reports whether b is linear white space, according
-// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
-// LWS = [CRLF] 1*( SP | HT )
-func isLWS(b byte) bool { return b == ' ' || b == '\t' }
-
-// isCTL reports whether b is a control byte, according
-// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
-// CTL = <any US-ASCII control character
-// (octets 0 - 31) and DEL (127)>
-func isCTL(b byte) bool {
- const del = 0x7f // a CTL
- return b < ' ' || b == del
-}
-
-// ValidHeaderFieldName reports whether v is a valid HTTP/1.x header name.
-// HTTP/2 imposes the additional restriction that uppercase ASCII
-// letters are not allowed.
-//
-// RFC 7230 says:
-// header-field = field-name ":" OWS field-value OWS
-// field-name = token
-// token = 1*tchar
-// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
-// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
-func ValidHeaderFieldName(v string) bool {
- if len(v) == 0 {
- return false
- }
- for _, r := range v {
- if !IsTokenRune(r) {
- return false
- }
- }
- return true
-}
-
-// ValidHostHeader reports whether h is a valid host header.
-func ValidHostHeader(h string) bool {
- // The latest spec is actually this:
- //
- // http://tools.ietf.org/html/rfc7230#section-5.4
- // Host = uri-host [ ":" port ]
- //
- // Where uri-host is:
- // http://tools.ietf.org/html/rfc3986#section-3.2.2
- //
- // But we're going to be much more lenient for now and just
- // search for any byte that's not a valid byte in any of those
- // expressions.
- for i := 0; i < len(h); i++ {
- if !validHostByte[h[i]] {
- return false
- }
- }
- return true
-}
-
-// See the validHostHeader comment.
-var validHostByte = [256]bool{
- '0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true,
- '8': true, '9': true,
-
- 'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true, 'h': true,
- 'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true, 'p': true,
- 'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true, 'x': true,
- 'y': true, 'z': true,
-
- 'A': true, 'B': true, 'C': true, 'D': true, 'E': true, 'F': true, 'G': true, 'H': true,
- 'I': true, 'J': true, 'K': true, 'L': true, 'M': true, 'N': true, 'O': true, 'P': true,
- 'Q': true, 'R': true, 'S': true, 'T': true, 'U': true, 'V': true, 'W': true, 'X': true,
- 'Y': true, 'Z': true,
-
- '!': true, // sub-delims
- '$': true, // sub-delims
- '%': true, // pct-encoded (and used in IPv6 zones)
- '&': true, // sub-delims
- '(': true, // sub-delims
- ')': true, // sub-delims
- '*': true, // sub-delims
- '+': true, // sub-delims
- ',': true, // sub-delims
- '-': true, // unreserved
- '.': true, // unreserved
- ':': true, // IPv6address + Host expression's optional port
- ';': true, // sub-delims
- '=': true, // sub-delims
- '[': true,
- '\'': true, // sub-delims
- ']': true,
- '_': true, // unreserved
- '~': true, // unreserved
-}
-
-// ValidHeaderFieldValue reports whether v is a valid "field-value" according to
-// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 :
-//
-// message-header = field-name ":" [ field-value ]
-// field-value = *( field-content | LWS )
-// field-content = <the OCTETs making up the field-value
-// and consisting of either *TEXT or combinations
-// of token, separators, and quoted-string>
-//
-// http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 :
-//
-// TEXT = <any OCTET except CTLs,
-// but including LWS>
-// LWS = [CRLF] 1*( SP | HT )
-// CTL = <any US-ASCII control character
-// (octets 0 - 31) and DEL (127)>
-//
-// RFC 7230 says:
-// field-value = *( field-content / obs-fold )
-// obj-fold = N/A to http2, and deprecated
-// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
-// field-vchar = VCHAR / obs-text
-// obs-text = %x80-FF
-// VCHAR = "any visible [USASCII] character"
-//
-// http2 further says: "Similarly, HTTP/2 allows header field values
-// that are not valid. While most of the values that can be encoded
-// will not alter header field parsing, carriage return (CR, ASCII
-// 0xd), line feed (LF, ASCII 0xa), and the zero character (NUL, ASCII
-// 0x0) might be exploited by an attacker if they are translated
-// verbatim. Any request or response that contains a character not
-// permitted in a header field value MUST be treated as malformed
-// (Section 8.1.2.6). Valid characters are defined by the
-// field-content ABNF rule in Section 3.2 of [RFC7230]."
-//
-// This function does not (yet?) properly handle the rejection of
-// strings that begin or end with SP or HTAB.
-func ValidHeaderFieldValue(v string) bool {
- for i := 0; i < len(v); i++ {
- b := v[i]
- if isCTL(b) && !isLWS(b) {
- return false
- }
- }
- return true
-}
-
-func isASCII(s string) bool {
- for i := 0; i < len(s); i++ {
- if s[i] >= utf8.RuneSelf {
- return false
- }
- }
- return true
-}
-
-// PunycodeHostPort returns the IDNA Punycode version
-// of the provided "host" or "host:port" string.
-func PunycodeHostPort(v string) (string, error) {
- if isASCII(v) {
- return v, nil
- }
-
- host, port, err := net.SplitHostPort(v)
- if err != nil {
- // The input 'v' argument was just a "host" argument,
- // without a port. This error should not be returned
- // to the caller.
- host = v
- port = ""
- }
- host, err = idna.ToASCII(host)
- if err != nil {
- // Non-UTF-8? Not representable in Punycode, in any
- // case.
- return "", err
- }
- if port == "" {
- return host, nil
- }
- return net.JoinHostPort(host, port), nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex_test.go
deleted file mode 100644
index f47adc939..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lex/httplex/httplex_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2009 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 file.
-
-package httplex
-
-import (
- "testing"
-)
-
-func isChar(c rune) bool { return c <= 127 }
-
-func isCtl(c rune) bool { return c <= 31 || c == 127 }
-
-func isSeparator(c rune) bool {
- switch c {
- case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t':
- return true
- }
- return false
-}
-
-func TestIsToken(t *testing.T) {
- for i := 0; i <= 130; i++ {
- r := rune(i)
- expected := isChar(r) && !isCtl(r) && !isSeparator(r)
- if IsTokenRune(r) != expected {
- t.Errorf("isToken(0x%x) = %v", r, !expected)
- }
- }
-}
-
-func TestHeaderValuesContainsToken(t *testing.T) {
- tests := []struct {
- vals []string
- token string
- want bool
- }{
- {
- vals: []string{"foo"},
- token: "foo",
- want: true,
- },
- {
- vals: []string{"bar", "foo"},
- token: "foo",
- want: true,
- },
- {
- vals: []string{"foo"},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"foo"},
- token: "bar",
- want: false,
- },
- {
- vals: []string{" foo "},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"foo,bar"},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"bar,foo,bar"},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"bar , foo"},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"foo ,bar "},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"bar, foo ,bar"},
- token: "FOO",
- want: true,
- },
- {
- vals: []string{"bar , foo"},
- token: "FOO",
- want: true,
- },
- }
- for _, tt := range tests {
- got := HeaderValuesContainsToken(tt.vals, tt.token)
- if got != tt.want {
- t.Errorf("headerValuesContainsToken(%q, %q) = %v; want %v", tt.vals, tt.token, got, tt.want)
- }
- }
-}
-
-func TestPunycodeHostPort(t *testing.T) {
- tests := []struct {
- in, want string
- }{
- {"www.google.com", "www.google.com"},
- {"гофер.рф", "xn--c1ae0ajs.xn--p1ai"},
- {"bücher.de", "xn--bcher-kva.de"},
- {"bücher.de:8080", "xn--bcher-kva.de:8080"},
- {"[1::6]:8080", "[1::6]:8080"},
- }
- for _, tt := range tests {
- got, err := PunycodeHostPort(tt.in)
- if tt.want != got || err != nil {
- t.Errorf("PunycodeHostPort(%q) = %q, %v, want %q, nil", tt.in, got, err, tt.want)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address.go
deleted file mode 100644
index afb957fd8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-import (
- "errors"
- "unsafe"
-)
-
-// An Addr represents an address associated with packet routing.
-type Addr interface {
- // Family returns an address family.
- Family() int
-}
-
-// An Inet4Addr represents an internet address for IPv4.
-type Inet4Addr struct {
- IP [4]byte // IP address
- PrefixLen int // address prefix length
-}
-
-// Family implements the Family method of Addr interface.
-func (a *Inet4Addr) Family() int { return sysAF_INET }
-
-// An Inet6Addr represents an internet address for IPv6.
-type Inet6Addr struct {
- IP [16]byte // IP address
- PrefixLen int // address prefix length
- ZoneID int // zone identifier
-}
-
-// Family implements the Family method of Addr interface.
-func (a *Inet6Addr) Family() int { return sysAF_INET6 }
-
-// Addrs returns a list of interface addresses.
-//
-// The provided af must be an address family and name must be a data
-// link name. The zero value of af or name means a wildcard.
-func Addrs(af int, name string) ([]Addr, error) {
- eps, err := newEndpoints(af)
- if len(eps) == 0 {
- return nil, err
- }
- defer func() {
- for _, ep := range eps {
- ep.close()
- }
- }()
- lls, err := links(eps, name)
- if len(lls) == 0 {
- return nil, err
- }
- var as []Addr
- for _, ll := range lls {
- var lifr lifreq
- for i := 0; i < len(ll.Name); i++ {
- lifr.Name[i] = int8(ll.Name[i])
- }
- for _, ep := range eps {
- ioc := int64(sysSIOCGLIFADDR)
- err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifr))
- if err != nil {
- continue
- }
- sa := (*sockaddrStorage)(unsafe.Pointer(&lifr.Lifru[0]))
- l := int(nativeEndian.Uint32(lifr.Lifru1[:4]))
- if l == 0 {
- continue
- }
- switch sa.Family {
- case sysAF_INET:
- a := &Inet4Addr{PrefixLen: l}
- copy(a.IP[:], lifr.Lifru[4:8])
- as = append(as, a)
- case sysAF_INET6:
- a := &Inet6Addr{PrefixLen: l, ZoneID: int(nativeEndian.Uint32(lifr.Lifru[24:28]))}
- copy(a.IP[:], lifr.Lifru[8:24])
- as = append(as, a)
- }
- }
- }
- return as, nil
-}
-
-func parseLinkAddr(b []byte) ([]byte, error) {
- nlen, alen, slen := int(b[1]), int(b[2]), int(b[3])
- l := 4 + nlen + alen + slen
- if len(b) < l {
- return nil, errors.New("invalid address")
- }
- b = b[4:]
- var addr []byte
- if nlen > 0 {
- b = b[nlen:]
- }
- if alen > 0 {
- addr = make([]byte, alen)
- copy(addr, b[:alen])
- }
- return addr, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address_test.go
deleted file mode 100644
index a25f10b67..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/address_test.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-import (
- "fmt"
- "testing"
-)
-
-type addrFamily int
-
-func (af addrFamily) String() string {
- switch af {
- case sysAF_UNSPEC:
- return "unspec"
- case sysAF_INET:
- return "inet4"
- case sysAF_INET6:
- return "inet6"
- default:
- return fmt.Sprintf("%d", af)
- }
-}
-
-const hexDigit = "0123456789abcdef"
-
-type llAddr []byte
-
-func (a llAddr) String() string {
- if len(a) == 0 {
- return ""
- }
- buf := make([]byte, 0, len(a)*3-1)
- for i, b := range a {
- if i > 0 {
- buf = append(buf, ':')
- }
- buf = append(buf, hexDigit[b>>4])
- buf = append(buf, hexDigit[b&0xF])
- }
- return string(buf)
-}
-
-type ipAddr []byte
-
-func (a ipAddr) String() string {
- if len(a) == 0 {
- return "<nil>"
- }
- if len(a) == 4 {
- return fmt.Sprintf("%d.%d.%d.%d", a[0], a[1], a[2], a[3])
- }
- if len(a) == 16 {
- return fmt.Sprintf("%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15])
- }
- s := make([]byte, len(a)*2)
- for i, tn := range a {
- s[i*2], s[i*2+1] = hexDigit[tn>>4], hexDigit[tn&0xf]
- }
- return string(s)
-}
-
-func (a *Inet4Addr) String() string {
- return fmt.Sprintf("(%s %s %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.PrefixLen)
-}
-
-func (a *Inet6Addr) String() string {
- return fmt.Sprintf("(%s %s %d %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.PrefixLen, a.ZoneID)
-}
-
-type addrPack struct {
- af int
- as []Addr
-}
-
-func addrPacks() ([]addrPack, error) {
- var lastErr error
- var aps []addrPack
- for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- as, err := Addrs(af, "")
- if err != nil {
- lastErr = err
- continue
- }
- aps = append(aps, addrPack{af: af, as: as})
- }
- return aps, lastErr
-}
-
-func TestAddrs(t *testing.T) {
- aps, err := addrPacks()
- if len(aps) == 0 && err != nil {
- t.Fatal(err)
- }
- lps, err := linkPacks()
- if len(lps) == 0 && err != nil {
- t.Fatal(err)
- }
- for _, lp := range lps {
- n := 0
- for _, ll := range lp.lls {
- as, err := Addrs(lp.af, ll.Name)
- if err != nil {
- t.Fatal(lp.af, ll.Name, err)
- }
- t.Logf("af=%s name=%s %v", addrFamily(lp.af), ll.Name, as)
- n += len(as)
- }
- for _, ap := range aps {
- if ap.af != lp.af {
- continue
- }
- if n != len(ap.as) {
- t.Errorf("af=%s got %d; want %d", addrFamily(lp.af), n, len(ap.as))
- continue
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/binary.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/binary.go
deleted file mode 100644
index 738a94f42..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/binary.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-// This file contains duplicates of encoding/binary package.
-//
-// This package is supposed to be used by the net package of standard
-// library. Therefore the package set used in the package must be the
-// same as net package.
-
-var (
- littleEndian binaryLittleEndian
- bigEndian binaryBigEndian
-)
-
-type binaryByteOrder interface {
- Uint16([]byte) uint16
- Uint32([]byte) uint32
- Uint64([]byte) uint64
- PutUint16([]byte, uint16)
- PutUint32([]byte, uint32)
- PutUint64([]byte, uint64)
-}
-
-type binaryLittleEndian struct{}
-
-func (binaryLittleEndian) Uint16(b []byte) uint16 {
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint16(b[0]) | uint16(b[1])<<8
-}
-
-func (binaryLittleEndian) PutUint16(b []byte, v uint16) {
- _ = b[1] // early bounds check to guarantee safety of writes below
- b[0] = byte(v)
- b[1] = byte(v >> 8)
-}
-
-func (binaryLittleEndian) Uint32(b []byte) uint32 {
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func (binaryLittleEndian) PutUint32(b []byte, v uint32) {
- _ = b[3] // early bounds check to guarantee safety of writes below
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
-}
-
-func (binaryLittleEndian) Uint64(b []byte) uint64 {
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
- uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
-}
-
-func (binaryLittleEndian) PutUint64(b []byte, v uint64) {
- _ = b[7] // early bounds check to guarantee safety of writes below
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
- b[4] = byte(v >> 32)
- b[5] = byte(v >> 40)
- b[6] = byte(v >> 48)
- b[7] = byte(v >> 56)
-}
-
-type binaryBigEndian struct{}
-
-func (binaryBigEndian) Uint16(b []byte) uint16 {
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint16(b[1]) | uint16(b[0])<<8
-}
-
-func (binaryBigEndian) PutUint16(b []byte, v uint16) {
- _ = b[1] // early bounds check to guarantee safety of writes below
- b[0] = byte(v >> 8)
- b[1] = byte(v)
-}
-
-func (binaryBigEndian) Uint32(b []byte) uint32 {
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24
-}
-
-func (binaryBigEndian) PutUint32(b []byte, v uint32) {
- _ = b[3] // early bounds check to guarantee safety of writes below
- b[0] = byte(v >> 24)
- b[1] = byte(v >> 16)
- b[2] = byte(v >> 8)
- b[3] = byte(v)
-}
-
-func (binaryBigEndian) Uint64(b []byte) uint64 {
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
- uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
-}
-
-func (binaryBigEndian) PutUint64(b []byte, v uint64) {
- _ = b[7] // early bounds check to guarantee safety of writes below
- b[0] = byte(v >> 56)
- b[1] = byte(v >> 48)
- b[2] = byte(v >> 40)
- b[3] = byte(v >> 32)
- b[4] = byte(v >> 24)
- b[5] = byte(v >> 16)
- b[6] = byte(v >> 8)
- b[7] = byte(v)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/defs_solaris.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/defs_solaris.go
deleted file mode 100644
index 02c19981d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/defs_solaris.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package lif
-
-/*
-#include <sys/socket.h>
-#include <sys/sockio.h>
-
-#include <net/if.h>
-#include <net/if_types.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_DGRAM = C.SOCK_DGRAM
-)
-
-type sockaddrStorage C.struct_sockaddr_storage
-
-const (
- sysLIFC_NOXMIT = C.LIFC_NOXMIT
- sysLIFC_EXTERNAL_SOURCE = C.LIFC_EXTERNAL_SOURCE
- sysLIFC_TEMPORARY = C.LIFC_TEMPORARY
- sysLIFC_ALLZONES = C.LIFC_ALLZONES
- sysLIFC_UNDER_IPMP = C.LIFC_UNDER_IPMP
- sysLIFC_ENABLED = C.LIFC_ENABLED
-
- sysSIOCGLIFADDR = C.SIOCGLIFADDR
- sysSIOCGLIFDSTADDR = C.SIOCGLIFDSTADDR
- sysSIOCGLIFFLAGS = C.SIOCGLIFFLAGS
- sysSIOCGLIFMTU = C.SIOCGLIFMTU
- sysSIOCGLIFNETMASK = C.SIOCGLIFNETMASK
- sysSIOCGLIFMETRIC = C.SIOCGLIFMETRIC
- sysSIOCGLIFNUM = C.SIOCGLIFNUM
- sysSIOCGLIFINDEX = C.SIOCGLIFINDEX
- sysSIOCGLIFSUBNET = C.SIOCGLIFSUBNET
- sysSIOCGLIFLNKINFO = C.SIOCGLIFLNKINFO
- sysSIOCGLIFCONF = C.SIOCGLIFCONF
- sysSIOCGLIFHWADDR = C.SIOCGLIFHWADDR
-)
-
-const (
- sysIFF_UP = C.IFF_UP
- sysIFF_BROADCAST = C.IFF_BROADCAST
- sysIFF_DEBUG = C.IFF_DEBUG
- sysIFF_LOOPBACK = C.IFF_LOOPBACK
- sysIFF_POINTOPOINT = C.IFF_POINTOPOINT
- sysIFF_NOTRAILERS = C.IFF_NOTRAILERS
- sysIFF_RUNNING = C.IFF_RUNNING
- sysIFF_NOARP = C.IFF_NOARP
- sysIFF_PROMISC = C.IFF_PROMISC
- sysIFF_ALLMULTI = C.IFF_ALLMULTI
- sysIFF_INTELLIGENT = C.IFF_INTELLIGENT
- sysIFF_MULTICAST = C.IFF_MULTICAST
- sysIFF_MULTI_BCAST = C.IFF_MULTI_BCAST
- sysIFF_UNNUMBERED = C.IFF_UNNUMBERED
- sysIFF_PRIVATE = C.IFF_PRIVATE
-)
-
-const (
- sizeofLifnum = C.sizeof_struct_lifnum
- sizeofLifreq = C.sizeof_struct_lifreq
- sizeofLifconf = C.sizeof_struct_lifconf
- sizeofLifIfinfoReq = C.sizeof_struct_lif_ifinfo_req
-)
-
-type lifnum C.struct_lifnum
-
-type lifreq C.struct_lifreq
-
-type lifconf C.struct_lifconf
-
-type lifIfinfoReq C.struct_lif_ifinfo_req
-
-const (
- sysIFT_IPV4 = C.IFT_IPV4
- sysIFT_IPV6 = C.IFT_IPV6
- sysIFT_6TO4 = C.IFT_6TO4
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/lif.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/lif.go
deleted file mode 100644
index 6e81f81f1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/lif.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-// Package lif provides basic functions for the manipulation of
-// logical network interfaces and interface addresses on Solaris.
-//
-// The package supports Solaris 11 or above.
-package lif
-
-import "syscall"
-
-type endpoint struct {
- af int
- s uintptr
-}
-
-func (ep *endpoint) close() error {
- return syscall.Close(int(ep.s))
-}
-
-func newEndpoints(af int) ([]endpoint, error) {
- var lastErr error
- var eps []endpoint
- afs := []int{sysAF_INET, sysAF_INET6}
- if af != sysAF_UNSPEC {
- afs = []int{af}
- }
- for _, af := range afs {
- s, err := syscall.Socket(af, sysSOCK_DGRAM, 0)
- if err != nil {
- lastErr = err
- continue
- }
- eps = append(eps, endpoint{af: af, s: uintptr(s)})
- }
- if len(eps) == 0 {
- return nil, lastErr
- }
- return eps, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link.go
deleted file mode 100644
index 913a53e11..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-import "unsafe"
-
-// A Link represents logical data link information.
-//
-// It also represents base information for logical network interface.
-// On Solaris, each logical network interface represents network layer
-// adjacency information and the interface has a only single network
-// address or address pair for tunneling. It's usual that multiple
-// logical network interfaces share the same logical data link.
-type Link struct {
- Name string // name, equivalent to IP interface name
- Index int // index, equivalent to IP interface index
- Type int // type
- Flags int // flags
- MTU int // maximum transmission unit, basically link MTU but may differ between IP address families
- Addr []byte // address
-}
-
-func (ll *Link) fetch(s uintptr) {
- var lifr lifreq
- for i := 0; i < len(ll.Name); i++ {
- lifr.Name[i] = int8(ll.Name[i])
- }
- ioc := int64(sysSIOCGLIFINDEX)
- if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil {
- ll.Index = int(nativeEndian.Uint32(lifr.Lifru[:4]))
- }
- ioc = int64(sysSIOCGLIFFLAGS)
- if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil {
- ll.Flags = int(nativeEndian.Uint64(lifr.Lifru[:8]))
- }
- ioc = int64(sysSIOCGLIFMTU)
- if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil {
- ll.MTU = int(nativeEndian.Uint32(lifr.Lifru[:4]))
- }
- switch ll.Type {
- case sysIFT_IPV4, sysIFT_IPV6, sysIFT_6TO4:
- default:
- ioc = int64(sysSIOCGLIFHWADDR)
- if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil {
- ll.Addr, _ = parseLinkAddr(lifr.Lifru[4:])
- }
- }
-}
-
-// Links returns a list of logical data links.
-//
-// The provided af must be an address family and name must be a data
-// link name. The zero value of af or name means a wildcard.
-func Links(af int, name string) ([]Link, error) {
- eps, err := newEndpoints(af)
- if len(eps) == 0 {
- return nil, err
- }
- defer func() {
- for _, ep := range eps {
- ep.close()
- }
- }()
- return links(eps, name)
-}
-
-func links(eps []endpoint, name string) ([]Link, error) {
- var lls []Link
- lifn := lifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP}
- lifc := lifconf{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP}
- for _, ep := range eps {
- lifn.Family = uint16(ep.af)
- ioc := int64(sysSIOCGLIFNUM)
- if err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifn)); err != nil {
- continue
- }
- if lifn.Count == 0 {
- continue
- }
- b := make([]byte, lifn.Count*sizeofLifreq)
- lifc.Family = uint16(ep.af)
- lifc.Len = lifn.Count * sizeofLifreq
- if len(lifc.Lifcu) == 8 {
- nativeEndian.PutUint64(lifc.Lifcu[:], uint64(uintptr(unsafe.Pointer(&b[0]))))
- } else {
- nativeEndian.PutUint32(lifc.Lifcu[:], uint32(uintptr(unsafe.Pointer(&b[0]))))
- }
- ioc = int64(sysSIOCGLIFCONF)
- if err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifc)); err != nil {
- continue
- }
- nb := make([]byte, 32) // see LIFNAMSIZ in net/if.h
- for i := 0; i < int(lifn.Count); i++ {
- lifr := (*lifreq)(unsafe.Pointer(&b[i*sizeofLifreq]))
- for i := 0; i < 32; i++ {
- if lifr.Name[i] == 0 {
- nb = nb[:i]
- break
- }
- nb[i] = byte(lifr.Name[i])
- }
- llname := string(nb)
- nb = nb[:32]
- if isDupLink(lls, llname) || name != "" && name != llname {
- continue
- }
- ll := Link{Name: llname, Type: int(lifr.Type)}
- ll.fetch(ep.s)
- lls = append(lls, ll)
- }
- }
- return lls, nil
-}
-
-func isDupLink(lls []Link, name string) bool {
- for _, ll := range lls {
- if ll.Name == name {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link_test.go
deleted file mode 100644
index 0cb9b95c6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/link_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-import (
- "fmt"
- "testing"
-)
-
-func (ll *Link) String() string {
- return fmt.Sprintf("name=%s index=%d type=%d flags=%#x mtu=%d addr=%v", ll.Name, ll.Index, ll.Type, ll.Flags, ll.MTU, llAddr(ll.Addr))
-}
-
-type linkPack struct {
- af int
- lls []Link
-}
-
-func linkPacks() ([]linkPack, error) {
- var lastErr error
- var lps []linkPack
- for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- lls, err := Links(af, "")
- if err != nil {
- lastErr = err
- continue
- }
- lps = append(lps, linkPack{af: af, lls: lls})
- }
- return lps, lastErr
-}
-
-func TestLinks(t *testing.T) {
- lps, err := linkPacks()
- if len(lps) == 0 && err != nil {
- t.Fatal(err)
- }
- for _, lp := range lps {
- n := 0
- for _, sll := range lp.lls {
- lls, err := Links(lp.af, sll.Name)
- if err != nil {
- t.Fatal(lp.af, sll.Name, err)
- }
- for _, ll := range lls {
- if ll.Name != sll.Name || ll.Index != sll.Index {
- t.Errorf("af=%s got %v; want %v", addrFamily(lp.af), &ll, &sll)
- continue
- }
- t.Logf("af=%s name=%s %v", addrFamily(lp.af), sll.Name, &ll)
- n++
- }
- }
- if n != len(lp.lls) {
- t.Errorf("af=%s got %d; want %d", addrFamily(lp.af), n, len(lp.lls))
- continue
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys.go
deleted file mode 100644
index c896041b7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys.go
+++ /dev/null
@@ -1,21 +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 file.
-
-// +build solaris
-
-package lif
-
-import "unsafe"
-
-var nativeEndian binaryByteOrder
-
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- nativeEndian = littleEndian
- } else {
- nativeEndian = bigEndian
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys_solaris_amd64.s b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys_solaris_amd64.s
deleted file mode 100644
index 39d76af79..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/sys_solaris_amd64.s
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2016 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 file.
-
-#include "textflag.h"
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·sysvicall6(SB)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/syscall.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/syscall.go
deleted file mode 100644
index aadab2e14..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/syscall.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build solaris
-
-package lif
-
-import (
- "syscall"
- "unsafe"
-)
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
-//go:linkname procIoctl libc_ioctl
-
-var procIoctl uintptr
-
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
-
-func ioctl(s, ioc uintptr, arg unsafe.Pointer) error {
- _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0)
- if errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go
deleted file mode 100644
index b5e999bec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_solaris.go
-
-package lif
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1a
-
- sysSOCK_DGRAM = 0x1
-)
-
-type sockaddrStorage struct {
- Family uint16
- X_ss_pad1 [6]int8
- X_ss_align float64
- X_ss_pad2 [240]int8
-}
-
-const (
- sysLIFC_NOXMIT = 0x1
- sysLIFC_EXTERNAL_SOURCE = 0x2
- sysLIFC_TEMPORARY = 0x4
- sysLIFC_ALLZONES = 0x8
- sysLIFC_UNDER_IPMP = 0x10
- sysLIFC_ENABLED = 0x20
-
- sysSIOCGLIFADDR = -0x3f87968f
- sysSIOCGLIFDSTADDR = -0x3f87968d
- sysSIOCGLIFFLAGS = -0x3f87968b
- sysSIOCGLIFMTU = -0x3f879686
- sysSIOCGLIFNETMASK = -0x3f879683
- sysSIOCGLIFMETRIC = -0x3f879681
- sysSIOCGLIFNUM = -0x3ff3967e
- sysSIOCGLIFINDEX = -0x3f87967b
- sysSIOCGLIFSUBNET = -0x3f879676
- sysSIOCGLIFLNKINFO = -0x3f879674
- sysSIOCGLIFCONF = -0x3fef965b
- sysSIOCGLIFHWADDR = -0x3f879640
-)
-
-const (
- sysIFF_UP = 0x1
- sysIFF_BROADCAST = 0x2
- sysIFF_DEBUG = 0x4
- sysIFF_LOOPBACK = 0x8
- sysIFF_POINTOPOINT = 0x10
- sysIFF_NOTRAILERS = 0x20
- sysIFF_RUNNING = 0x40
- sysIFF_NOARP = 0x80
- sysIFF_PROMISC = 0x100
- sysIFF_ALLMULTI = 0x200
- sysIFF_INTELLIGENT = 0x400
- sysIFF_MULTICAST = 0x800
- sysIFF_MULTI_BCAST = 0x1000
- sysIFF_UNNUMBERED = 0x2000
- sysIFF_PRIVATE = 0x8000
-)
-
-const (
- sizeofLifnum = 0xc
- sizeofLifreq = 0x178
- sizeofLifconf = 0x18
- sizeofLifIfinfoReq = 0x10
-)
-
-type lifnum struct {
- Family uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Count int32
-}
-
-type lifreq struct {
- Name [32]int8
- Lifru1 [4]byte
- Type uint32
- Lifru [336]byte
-}
-
-type lifconf struct {
- Family uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Len int32
- Pad_cgo_1 [4]byte
- Lifcu [8]byte
-}
-
-type lifIfinfoReq struct {
- Maxhops uint8
- Pad_cgo_0 [3]byte
- Reachtime uint32
- Reachretrans uint32
- Maxmtu uint32
-}
-
-const (
- sysIFT_IPV4 = 0xc8
- sysIFT_IPV6 = 0xc9
- sysIFT_6TO4 = 0xca
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest.go
deleted file mode 100644
index 5bd3a8c68..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest.go
+++ /dev/null
@@ -1,456 +0,0 @@
-// Copyright 2016 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 file.
-
-// Package nettest provides utilities for network testing.
-package nettest
-
-import (
- "bytes"
- "encoding/binary"
- "io"
- "io/ioutil"
- "math/rand"
- "net"
- "runtime"
- "sync"
- "testing"
- "time"
-)
-
-var (
- aLongTimeAgo = time.Unix(233431200, 0)
- neverTimeout = time.Time{}
-)
-
-// MakePipe creates a connection between two endpoints and returns the pair
-// as c1 and c2, such that anything written to c1 is read by c2 and vice-versa.
-// The stop function closes all resources, including c1, c2, and the underlying
-// net.Listener (if there is one), and should not be nil.
-type MakePipe func() (c1, c2 net.Conn, stop func(), err error)
-
-// TestConn tests that a net.Conn implementation properly satisfies the interface.
-// The tests should not produce any false positives, but may experience
-// false negatives. Thus, some issues may only be detected when the test is
-// run multiple times. For maximal effectiveness, run the tests under the
-// race detector.
-func TestConn(t *testing.T, mp MakePipe) {
- testConn(t, mp)
-}
-
-type connTester func(t *testing.T, c1, c2 net.Conn)
-
-func timeoutWrapper(t *testing.T, mp MakePipe, f connTester) {
- c1, c2, stop, err := mp()
- if err != nil {
- t.Fatalf("unable to make pipe: %v", err)
- }
- var once sync.Once
- defer once.Do(func() { stop() })
- timer := time.AfterFunc(time.Minute, func() {
- once.Do(func() {
- t.Error("test timed out; terminating pipe")
- stop()
- })
- })
- defer timer.Stop()
- f(t, c1, c2)
-}
-
-// testBasicIO tests that the data sent on c1 is properly received on c2.
-func testBasicIO(t *testing.T, c1, c2 net.Conn) {
- want := make([]byte, 1<<20)
- rand.New(rand.NewSource(0)).Read(want)
-
- dataCh := make(chan []byte)
- go func() {
- rd := bytes.NewReader(want)
- if err := chunkedCopy(c1, rd); err != nil {
- t.Errorf("unexpected c1.Write error: %v", err)
- }
- if err := c1.Close(); err != nil {
- t.Errorf("unexpected c1.Close error: %v", err)
- }
- }()
-
- go func() {
- wr := new(bytes.Buffer)
- if err := chunkedCopy(wr, c2); err != nil {
- t.Errorf("unexpected c2.Read error: %v", err)
- }
- if err := c2.Close(); err != nil {
- t.Errorf("unexpected c2.Close error: %v", err)
- }
- dataCh <- wr.Bytes()
- }()
-
- if got := <-dataCh; !bytes.Equal(got, want) {
- t.Errorf("transmitted data differs")
- }
-}
-
-// testPingPong tests that the two endpoints can synchronously send data to
-// each other in a typical request-response pattern.
-func testPingPong(t *testing.T, c1, c2 net.Conn) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- pingPonger := func(c net.Conn) {
- defer wg.Done()
- buf := make([]byte, 8)
- var prev uint64
- for {
- if _, err := io.ReadFull(c, buf); err != nil {
- if err == io.EOF {
- break
- }
- t.Errorf("unexpected Read error: %v", err)
- }
-
- v := binary.LittleEndian.Uint64(buf)
- binary.LittleEndian.PutUint64(buf, v+1)
- if prev != 0 && prev+2 != v {
- t.Errorf("mismatching value: got %d, want %d", v, prev+2)
- }
- prev = v
- if v == 1000 {
- break
- }
-
- if _, err := c.Write(buf); err != nil {
- t.Errorf("unexpected Write error: %v", err)
- break
- }
- }
- if err := c.Close(); err != nil {
- t.Errorf("unexpected Close error: %v", err)
- }
- }
-
- wg.Add(2)
- go pingPonger(c1)
- go pingPonger(c2)
-
- // Start off the chain reaction.
- if _, err := c1.Write(make([]byte, 8)); err != nil {
- t.Errorf("unexpected c1.Write error: %v", err)
- }
-}
-
-// testRacyRead tests that it is safe to mutate the input Read buffer
-// immediately after cancelation has occurred.
-func testRacyRead(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(c2, rand.New(rand.NewSource(0)))
-
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c1.SetReadDeadline(time.Now().Add(time.Millisecond))
- for i := 0; i < 10; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
-
- b1 := make([]byte, 1024)
- b2 := make([]byte, 1024)
- for j := 0; j < 100; j++ {
- _, err := c1.Read(b1)
- copy(b1, b2) // Mutate b1 to trigger potential race
- if err != nil {
- checkForTimeoutError(t, err)
- c1.SetReadDeadline(time.Now().Add(time.Millisecond))
- }
- }
- }()
- }
-}
-
-// testRacyWrite tests that it is safe to mutate the input Write buffer
-// immediately after cancelation has occurred.
-func testRacyWrite(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(ioutil.Discard, c2)
-
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c1.SetWriteDeadline(time.Now().Add(time.Millisecond))
- for i := 0; i < 10; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
-
- b1 := make([]byte, 1024)
- b2 := make([]byte, 1024)
- for j := 0; j < 100; j++ {
- _, err := c1.Write(b1)
- copy(b1, b2) // Mutate b1 to trigger potential race
- if err != nil {
- checkForTimeoutError(t, err)
- c1.SetWriteDeadline(time.Now().Add(time.Millisecond))
- }
- }
- }()
- }
-}
-
-// testReadTimeout tests that Read timeouts do not affect Write.
-func testReadTimeout(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(ioutil.Discard, c2)
-
- c1.SetReadDeadline(aLongTimeAgo)
- _, err := c1.Read(make([]byte, 1024))
- checkForTimeoutError(t, err)
- if _, err := c1.Write(make([]byte, 1024)); err != nil {
- t.Errorf("unexpected Write error: %v", err)
- }
-}
-
-// testWriteTimeout tests that Write timeouts do not affect Read.
-func testWriteTimeout(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(c2, rand.New(rand.NewSource(0)))
-
- c1.SetWriteDeadline(aLongTimeAgo)
- _, err := c1.Write(make([]byte, 1024))
- checkForTimeoutError(t, err)
- if _, err := c1.Read(make([]byte, 1024)); err != nil {
- t.Errorf("unexpected Read error: %v", err)
- }
-}
-
-// testPastTimeout tests that a deadline set in the past immediately times out
-// Read and Write requests.
-func testPastTimeout(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(c2, c2)
-
- testRoundtrip(t, c1)
-
- c1.SetDeadline(aLongTimeAgo)
- n, err := c1.Write(make([]byte, 1024))
- if n != 0 {
- t.Errorf("unexpected Write count: got %d, want 0", n)
- }
- checkForTimeoutError(t, err)
- n, err = c1.Read(make([]byte, 1024))
- if n != 0 {
- t.Errorf("unexpected Read count: got %d, want 0", n)
- }
- checkForTimeoutError(t, err)
-
- testRoundtrip(t, c1)
-}
-
-// testPresentTimeout tests that a deadline set while there are pending
-// Read and Write operations immediately times out those operations.
-func testPresentTimeout(t *testing.T, c1, c2 net.Conn) {
- var wg sync.WaitGroup
- defer wg.Wait()
- wg.Add(3)
-
- deadlineSet := make(chan bool, 1)
- go func() {
- defer wg.Done()
- time.Sleep(100 * time.Millisecond)
- deadlineSet <- true
- c1.SetReadDeadline(aLongTimeAgo)
- c1.SetWriteDeadline(aLongTimeAgo)
- }()
- go func() {
- defer wg.Done()
- n, err := c1.Read(make([]byte, 1024))
- if n != 0 {
- t.Errorf("unexpected Read count: got %d, want 0", n)
- }
- checkForTimeoutError(t, err)
- if len(deadlineSet) == 0 {
- t.Error("Read timed out before deadline is set")
- }
- }()
- go func() {
- defer wg.Done()
- var err error
- for err == nil {
- _, err = c1.Write(make([]byte, 1024))
- }
- checkForTimeoutError(t, err)
- if len(deadlineSet) == 0 {
- t.Error("Write timed out before deadline is set")
- }
- }()
-}
-
-// testFutureTimeout tests that a future deadline will eventually time out
-// Read and Write operations.
-func testFutureTimeout(t *testing.T, c1, c2 net.Conn) {
- var wg sync.WaitGroup
- wg.Add(2)
-
- c1.SetDeadline(time.Now().Add(100 * time.Millisecond))
- go func() {
- defer wg.Done()
- _, err := c1.Read(make([]byte, 1024))
- checkForTimeoutError(t, err)
- }()
- go func() {
- defer wg.Done()
- var err error
- for err == nil {
- _, err = c1.Write(make([]byte, 1024))
- }
- checkForTimeoutError(t, err)
- }()
- wg.Wait()
-
- go chunkedCopy(c2, c2)
- resyncConn(t, c1)
- testRoundtrip(t, c1)
-}
-
-// testCloseTimeout tests that calling Close immediately times out pending
-// Read and Write operations.
-func testCloseTimeout(t *testing.T, c1, c2 net.Conn) {
- go chunkedCopy(c2, c2)
-
- var wg sync.WaitGroup
- defer wg.Wait()
- wg.Add(3)
-
- // Test for cancelation upon connection closure.
- c1.SetDeadline(neverTimeout)
- go func() {
- defer wg.Done()
- time.Sleep(100 * time.Millisecond)
- c1.Close()
- }()
- go func() {
- defer wg.Done()
- var err error
- buf := make([]byte, 1024)
- for err == nil {
- _, err = c1.Read(buf)
- }
- }()
- go func() {
- defer wg.Done()
- var err error
- buf := make([]byte, 1024)
- for err == nil {
- _, err = c1.Write(buf)
- }
- }()
-}
-
-// testConcurrentMethods tests that the methods of net.Conn can safely
-// be called concurrently.
-func testConcurrentMethods(t *testing.T, c1, c2 net.Conn) {
- if runtime.GOOS == "plan9" {
- t.Skip("skipping on plan9; see https://golang.org/issue/20489")
- }
- go chunkedCopy(c2, c2)
-
- // The results of the calls may be nonsensical, but this should
- // not trigger a race detector warning.
- var wg sync.WaitGroup
- for i := 0; i < 100; i++ {
- wg.Add(7)
- go func() {
- defer wg.Done()
- c1.Read(make([]byte, 1024))
- }()
- go func() {
- defer wg.Done()
- c1.Write(make([]byte, 1024))
- }()
- go func() {
- defer wg.Done()
- c1.SetDeadline(time.Now().Add(10 * time.Millisecond))
- }()
- go func() {
- defer wg.Done()
- c1.SetReadDeadline(aLongTimeAgo)
- }()
- go func() {
- defer wg.Done()
- c1.SetWriteDeadline(aLongTimeAgo)
- }()
- go func() {
- defer wg.Done()
- c1.LocalAddr()
- }()
- go func() {
- defer wg.Done()
- c1.RemoteAddr()
- }()
- }
- wg.Wait() // At worst, the deadline is set 10ms into the future
-
- resyncConn(t, c1)
- testRoundtrip(t, c1)
-}
-
-// checkForTimeoutError checks that the error satisfies the Error interface
-// and that Timeout returns true.
-func checkForTimeoutError(t *testing.T, err error) {
- if nerr, ok := err.(net.Error); ok {
- if !nerr.Timeout() {
- t.Errorf("err.Timeout() = false, want true")
- }
- } else {
- t.Errorf("got %T, want net.Error", err)
- }
-}
-
-// testRoundtrip writes something into c and reads it back.
-// It assumes that everything written into c is echoed back to itself.
-func testRoundtrip(t *testing.T, c net.Conn) {
- if err := c.SetDeadline(neverTimeout); err != nil {
- t.Errorf("roundtrip SetDeadline error: %v", err)
- }
-
- const s = "Hello, world!"
- buf := []byte(s)
- if _, err := c.Write(buf); err != nil {
- t.Errorf("roundtrip Write error: %v", err)
- }
- if _, err := io.ReadFull(c, buf); err != nil {
- t.Errorf("roundtrip Read error: %v", err)
- }
- if string(buf) != s {
- t.Errorf("roundtrip data mismatch: got %q, want %q", buf, s)
- }
-}
-
-// resyncConn resynchronizes the connection into a sane state.
-// It assumes that everything written into c is echoed back to itself.
-// It assumes that 0xff is not currently on the wire or in the read buffer.
-func resyncConn(t *testing.T, c net.Conn) {
- c.SetDeadline(neverTimeout)
- errCh := make(chan error)
- go func() {
- _, err := c.Write([]byte{0xff})
- errCh <- err
- }()
- buf := make([]byte, 1024)
- for {
- n, err := c.Read(buf)
- if n > 0 && bytes.IndexByte(buf[:n], 0xff) == n-1 {
- break
- }
- if err != nil {
- t.Errorf("unexpected Read error: %v", err)
- break
- }
- }
- if err := <-errCh; err != nil {
- t.Errorf("unexpected Write error: %v", err)
- }
-}
-
-// chunkedCopy copies from r to w in fixed-width chunks to avoid
-// causing a Write that exceeds the maximum packet size for packet-based
-// connections like "unixpacket".
-// We assume that the maximum packet size is at least 1024.
-func chunkedCopy(w io.Writer, r io.Reader) error {
- b := make([]byte, 1024)
- _, err := io.CopyBuffer(struct{ io.Writer }{w}, struct{ io.Reader }{r}, b)
- return err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go16.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go16.go
deleted file mode 100644
index 4cbf48e35..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go16.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.7
-
-package nettest
-
-import "testing"
-
-func testConn(t *testing.T, mp MakePipe) {
- // Avoid using subtests on Go 1.6 and below.
- timeoutWrapper(t, mp, testBasicIO)
- timeoutWrapper(t, mp, testPingPong)
- timeoutWrapper(t, mp, testRacyRead)
- timeoutWrapper(t, mp, testRacyWrite)
- timeoutWrapper(t, mp, testReadTimeout)
- timeoutWrapper(t, mp, testWriteTimeout)
- timeoutWrapper(t, mp, testPastTimeout)
- timeoutWrapper(t, mp, testPresentTimeout)
- timeoutWrapper(t, mp, testFutureTimeout)
- timeoutWrapper(t, mp, testCloseTimeout)
- timeoutWrapper(t, mp, testConcurrentMethods)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go17.go
deleted file mode 100644
index fa039f03f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_go17.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7
-
-package nettest
-
-import "testing"
-
-func testConn(t *testing.T, mp MakePipe) {
- // Use subtests on Go 1.7 and above since it is better organized.
- t.Run("BasicIO", func(t *testing.T) { timeoutWrapper(t, mp, testBasicIO) })
- t.Run("PingPong", func(t *testing.T) { timeoutWrapper(t, mp, testPingPong) })
- t.Run("RacyRead", func(t *testing.T) { timeoutWrapper(t, mp, testRacyRead) })
- t.Run("RacyWrite", func(t *testing.T) { timeoutWrapper(t, mp, testRacyWrite) })
- t.Run("ReadTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testReadTimeout) })
- t.Run("WriteTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testWriteTimeout) })
- t.Run("PastTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPastTimeout) })
- t.Run("PresentTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPresentTimeout) })
- t.Run("FutureTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testFutureTimeout) })
- t.Run("CloseTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testCloseTimeout) })
- t.Run("ConcurrentMethods", func(t *testing.T) { timeoutWrapper(t, mp, testConcurrentMethods) })
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_test.go
deleted file mode 100644
index 9f9453fb5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/nettest/conntest_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.8
-
-package nettest
-
-import (
- "net"
- "os"
- "runtime"
- "testing"
-
- "golang.org/x/net/internal/nettest"
-)
-
-func TestTestConn(t *testing.T) {
- tests := []struct{ name, network string }{
- {"TCP", "tcp"},
- {"UnixPipe", "unix"},
- {"UnixPacketPipe", "unixpacket"},
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if !nettest.TestableNetwork(tt.network) {
- t.Skipf("not supported on %s", runtime.GOOS)
- }
-
- mp := func() (c1, c2 net.Conn, stop func(), err error) {
- ln, err := nettest.NewLocalListener(tt.network)
- if err != nil {
- return nil, nil, nil, err
- }
-
- // Start a connection between two endpoints.
- var err1, err2 error
- done := make(chan bool)
- go func() {
- c2, err2 = ln.Accept()
- close(done)
- }()
- c1, err1 = net.Dial(ln.Addr().Network(), ln.Addr().String())
- <-done
-
- stop = func() {
- if err1 == nil {
- c1.Close()
- }
- if err2 == nil {
- c2.Close()
- }
- ln.Close()
- switch tt.network {
- case "unix", "unixpacket":
- os.Remove(ln.Addr().String())
- }
- }
-
- switch {
- case err1 != nil:
- stop()
- return nil, nil, nil, err1
- case err2 != nil:
- stop()
- return nil, nil, nil, err2
- default:
- return c1, c2, stop, nil
- }
- }
-
- TestConn(t, mp)
- })
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen.go
deleted file mode 100644
index 56f43bf65..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 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 file.
-
-// Package netutil provides network utility functions, complementing the more
-// common ones in the net package.
-package netutil // import "golang.org/x/net/netutil"
-
-import (
- "net"
- "sync"
-)
-
-// LimitListener returns a Listener that accepts at most n simultaneous
-// connections from the provided Listener.
-func LimitListener(l net.Listener, n int) net.Listener {
- return &limitListener{l, make(chan struct{}, n)}
-}
-
-type limitListener struct {
- net.Listener
- sem chan struct{}
-}
-
-func (l *limitListener) acquire() { l.sem <- struct{}{} }
-func (l *limitListener) release() { <-l.sem }
-
-func (l *limitListener) Accept() (net.Conn, error) {
- l.acquire()
- c, err := l.Listener.Accept()
- if err != nil {
- l.release()
- return nil, err
- }
- return &limitListenerConn{Conn: c, release: l.release}, nil
-}
-
-type limitListenerConn struct {
- net.Conn
- releaseOnce sync.Once
- release func()
-}
-
-func (l *limitListenerConn) Close() error {
- err := l.Conn.Close()
- l.releaseOnce.Do(l.release)
- return err
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen_test.go
deleted file mode 100644
index 5e07d7bea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/netutil/listen_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2013 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 file.
-
-package netutil
-
-import (
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-
- "golang.org/x/net/internal/nettest"
-)
-
-func TestLimitListener(t *testing.T) {
- const max = 5
- attempts := (nettest.MaxOpenFiles() - max) / 2
- if attempts > 256 { // maximum length of accept queue is 128 by default
- attempts = 256
- }
-
- l, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatal(err)
- }
- defer l.Close()
- l = LimitListener(l, max)
-
- var open int32
- go http.Serve(l, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if n := atomic.AddInt32(&open, 1); n > max {
- t.Errorf("%d open connections, want <= %d", n, max)
- }
- defer atomic.AddInt32(&open, -1)
- time.Sleep(10 * time.Millisecond)
- fmt.Fprint(w, "some body")
- }))
-
- var wg sync.WaitGroup
- var failed int32
- for i := 0; i < attempts; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
- c := http.Client{Timeout: 3 * time.Second}
- r, err := c.Get("http://" + l.Addr().String())
- if err != nil {
- t.Log(err)
- atomic.AddInt32(&failed, 1)
- return
- }
- defer r.Body.Close()
- io.Copy(ioutil.Discard, r.Body)
- }()
- }
- wg.Wait()
-
- // We expect some Gets to fail as the kernel's accept queue is filled,
- // but most should succeed.
- if int(failed) >= attempts/2 {
- t.Errorf("%d requests failed within %d attempts", failed, attempts)
- }
-}
-
-type errorListener struct {
- net.Listener
-}
-
-func (errorListener) Accept() (net.Conn, error) {
- return nil, errFake
-}
-
-var errFake = errors.New("fake error from errorListener")
-
-// This used to hang.
-func TestLimitListenerError(t *testing.T) {
- donec := make(chan bool, 1)
- go func() {
- const n = 2
- ll := LimitListener(errorListener{}, n)
- for i := 0; i < n+1; i++ {
- _, err := ll.Accept()
- if err != errFake {
- t.Fatalf("Accept error = %v; want errFake", err)
- }
- }
- donec <- true
- }()
- select {
- case <-donec:
- case <-time.After(5 * time.Second):
- t.Fatal("timeout. deadlock?")
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/direct.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/direct.go
deleted file mode 100644
index 4c5ad88b1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/direct.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2011 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 file.
-
-package proxy
-
-import (
- "net"
-)
-
-type direct struct{}
-
-// Direct is a direct proxy: one that makes network connections directly.
-var Direct = direct{}
-
-func (direct) Dial(network, addr string) (net.Conn, error) {
- return net.Dial(network, addr)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host.go
deleted file mode 100644
index 0689bb6a7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2011 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 file.
-
-package proxy
-
-import (
- "net"
- "strings"
-)
-
-// A PerHost directs connections to a default Dialer unless the host name
-// requested matches one of a number of exceptions.
-type PerHost struct {
- def, bypass Dialer
-
- bypassNetworks []*net.IPNet
- bypassIPs []net.IP
- bypassZones []string
- bypassHosts []string
-}
-
-// NewPerHost returns a PerHost Dialer that directs connections to either
-// defaultDialer or bypass, depending on whether the connection matches one of
-// the configured rules.
-func NewPerHost(defaultDialer, bypass Dialer) *PerHost {
- return &PerHost{
- def: defaultDialer,
- bypass: bypass,
- }
-}
-
-// Dial connects to the address addr on the given network through either
-// defaultDialer or bypass.
-func (p *PerHost) Dial(network, addr string) (c net.Conn, err error) {
- host, _, err := net.SplitHostPort(addr)
- if err != nil {
- return nil, err
- }
-
- return p.dialerForRequest(host).Dial(network, addr)
-}
-
-func (p *PerHost) dialerForRequest(host string) Dialer {
- if ip := net.ParseIP(host); ip != nil {
- for _, net := range p.bypassNetworks {
- if net.Contains(ip) {
- return p.bypass
- }
- }
- for _, bypassIP := range p.bypassIPs {
- if bypassIP.Equal(ip) {
- return p.bypass
- }
- }
- return p.def
- }
-
- for _, zone := range p.bypassZones {
- if strings.HasSuffix(host, zone) {
- return p.bypass
- }
- if host == zone[1:] {
- // For a zone ".example.com", we match "example.com"
- // too.
- return p.bypass
- }
- }
- for _, bypassHost := range p.bypassHosts {
- if bypassHost == host {
- return p.bypass
- }
- }
- return p.def
-}
-
-// AddFromString parses a string that contains comma-separated values
-// specifying hosts that should use the bypass proxy. Each value is either an
-// IP address, a CIDR range, a zone (*.example.com) or a host name
-// (localhost). A best effort is made to parse the string and errors are
-// ignored.
-func (p *PerHost) AddFromString(s string) {
- hosts := strings.Split(s, ",")
- for _, host := range hosts {
- host = strings.TrimSpace(host)
- if len(host) == 0 {
- continue
- }
- if strings.Contains(host, "/") {
- // We assume that it's a CIDR address like 127.0.0.0/8
- if _, net, err := net.ParseCIDR(host); err == nil {
- p.AddNetwork(net)
- }
- continue
- }
- if ip := net.ParseIP(host); ip != nil {
- p.AddIP(ip)
- continue
- }
- if strings.HasPrefix(host, "*.") {
- p.AddZone(host[1:])
- continue
- }
- p.AddHost(host)
- }
-}
-
-// AddIP specifies an IP address that will use the bypass proxy. Note that
-// this will only take effect if a literal IP address is dialed. A connection
-// to a named host will never match an IP.
-func (p *PerHost) AddIP(ip net.IP) {
- p.bypassIPs = append(p.bypassIPs, ip)
-}
-
-// AddNetwork specifies an IP range that will use the bypass proxy. Note that
-// this will only take effect if a literal IP address is dialed. A connection
-// to a named host will never match.
-func (p *PerHost) AddNetwork(net *net.IPNet) {
- p.bypassNetworks = append(p.bypassNetworks, net)
-}
-
-// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of
-// "example.com" matches "example.com" and all of its subdomains.
-func (p *PerHost) AddZone(zone string) {
- if strings.HasSuffix(zone, ".") {
- zone = zone[:len(zone)-1]
- }
- if !strings.HasPrefix(zone, ".") {
- zone = "." + zone
- }
- p.bypassZones = append(p.bypassZones, zone)
-}
-
-// AddHost specifies a host name that will use the bypass proxy.
-func (p *PerHost) AddHost(host string) {
- if strings.HasSuffix(host, ".") {
- host = host[:len(host)-1]
- }
- p.bypassHosts = append(p.bypassHosts, host)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host_test.go
deleted file mode 100644
index a7d809571..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/per_host_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2011 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 file.
-
-package proxy
-
-import (
- "errors"
- "net"
- "reflect"
- "testing"
-)
-
-type recordingProxy struct {
- addrs []string
-}
-
-func (r *recordingProxy) Dial(network, addr string) (net.Conn, error) {
- r.addrs = append(r.addrs, addr)
- return nil, errors.New("recordingProxy")
-}
-
-func TestPerHost(t *testing.T) {
- var def, bypass recordingProxy
- perHost := NewPerHost(&def, &bypass)
- perHost.AddFromString("localhost,*.zone,127.0.0.1,10.0.0.1/8,1000::/16")
-
- expectedDef := []string{
- "example.com:123",
- "1.2.3.4:123",
- "[1001::]:123",
- }
- expectedBypass := []string{
- "localhost:123",
- "zone:123",
- "foo.zone:123",
- "127.0.0.1:123",
- "10.1.2.3:123",
- "[1000::]:123",
- }
-
- for _, addr := range expectedDef {
- perHost.Dial("tcp", addr)
- }
- for _, addr := range expectedBypass {
- perHost.Dial("tcp", addr)
- }
-
- if !reflect.DeepEqual(expectedDef, def.addrs) {
- t.Errorf("Hosts which went to the default proxy didn't match. Got %v, want %v", def.addrs, expectedDef)
- }
- if !reflect.DeepEqual(expectedBypass, bypass.addrs) {
- t.Errorf("Hosts which went to the bypass proxy didn't match. Got %v, want %v", bypass.addrs, expectedBypass)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy.go
deleted file mode 100644
index 553ead7cf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2011 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 file.
-
-// Package proxy provides support for a variety of protocols to proxy network
-// data.
-package proxy // import "golang.org/x/net/proxy"
-
-import (
- "errors"
- "net"
- "net/url"
- "os"
- "sync"
-)
-
-// A Dialer is a means to establish a connection.
-type Dialer interface {
- // Dial connects to the given address via the proxy.
- Dial(network, addr string) (c net.Conn, err error)
-}
-
-// Auth contains authentication parameters that specific Dialers may require.
-type Auth struct {
- User, Password string
-}
-
-// FromEnvironment returns the dialer specified by the proxy related variables in
-// the environment.
-func FromEnvironment() Dialer {
- allProxy := allProxyEnv.Get()
- if len(allProxy) == 0 {
- return Direct
- }
-
- proxyURL, err := url.Parse(allProxy)
- if err != nil {
- return Direct
- }
- proxy, err := FromURL(proxyURL, Direct)
- if err != nil {
- return Direct
- }
-
- noProxy := noProxyEnv.Get()
- if len(noProxy) == 0 {
- return proxy
- }
-
- perHost := NewPerHost(proxy, Direct)
- perHost.AddFromString(noProxy)
- return perHost
-}
-
-// proxySchemes is a map from URL schemes to a function that creates a Dialer
-// from a URL with such a scheme.
-var proxySchemes map[string]func(*url.URL, Dialer) (Dialer, error)
-
-// RegisterDialerType takes a URL scheme and a function to generate Dialers from
-// a URL with that scheme and a forwarding Dialer. Registered schemes are used
-// by FromURL.
-func RegisterDialerType(scheme string, f func(*url.URL, Dialer) (Dialer, error)) {
- if proxySchemes == nil {
- proxySchemes = make(map[string]func(*url.URL, Dialer) (Dialer, error))
- }
- proxySchemes[scheme] = f
-}
-
-// FromURL returns a Dialer given a URL specification and an underlying
-// Dialer for it to make network requests.
-func FromURL(u *url.URL, forward Dialer) (Dialer, error) {
- var auth *Auth
- if u.User != nil {
- auth = new(Auth)
- auth.User = u.User.Username()
- if p, ok := u.User.Password(); ok {
- auth.Password = p
- }
- }
-
- switch u.Scheme {
- case "socks5":
- return SOCKS5("tcp", u.Host, auth, forward)
- }
-
- // If the scheme doesn't match any of the built-in schemes, see if it
- // was registered by another package.
- if proxySchemes != nil {
- if f, ok := proxySchemes[u.Scheme]; ok {
- return f(u, forward)
- }
- }
-
- return nil, errors.New("proxy: unknown scheme: " + u.Scheme)
-}
-
-var (
- allProxyEnv = &envOnce{
- names: []string{"ALL_PROXY", "all_proxy"},
- }
- noProxyEnv = &envOnce{
- names: []string{"NO_PROXY", "no_proxy"},
- }
-)
-
-// envOnce looks up an environment variable (optionally by multiple
-// names) once. It mitigates expensive lookups on some platforms
-// (e.g. Windows).
-// (Borrowed from net/http/transport.go)
-type envOnce struct {
- names []string
- once sync.Once
- val string
-}
-
-func (e *envOnce) Get() string {
- e.once.Do(e.init)
- return e.val
-}
-
-func (e *envOnce) init() {
- for _, n := range e.names {
- e.val = os.Getenv(n)
- if e.val != "" {
- return
- }
- }
-}
-
-// reset is used by tests
-func (e *envOnce) reset() {
- e.once = sync.Once{}
- e.val = ""
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy_test.go
deleted file mode 100644
index 0f31e211c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/proxy_test.go
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2011 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 file.
-
-package proxy
-
-import (
- "bytes"
- "fmt"
- "io"
- "net"
- "net/url"
- "os"
- "strconv"
- "strings"
- "sync"
- "testing"
-)
-
-type proxyFromEnvTest struct {
- allProxyEnv string
- noProxyEnv string
- wantTypeOf Dialer
-}
-
-func (t proxyFromEnvTest) String() string {
- var buf bytes.Buffer
- space := func() {
- if buf.Len() > 0 {
- buf.WriteByte(' ')
- }
- }
- if t.allProxyEnv != "" {
- fmt.Fprintf(&buf, "all_proxy=%q", t.allProxyEnv)
- }
- if t.noProxyEnv != "" {
- space()
- fmt.Fprintf(&buf, "no_proxy=%q", t.noProxyEnv)
- }
- return strings.TrimSpace(buf.String())
-}
-
-func TestFromEnvironment(t *testing.T) {
- ResetProxyEnv()
-
- type dummyDialer struct {
- direct
- }
-
- RegisterDialerType("irc", func(_ *url.URL, _ Dialer) (Dialer, error) {
- return dummyDialer{}, nil
- })
-
- proxyFromEnvTests := []proxyFromEnvTest{
- {allProxyEnv: "127.0.0.1:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
- {allProxyEnv: "ftp://example.com:8000", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
- {allProxyEnv: "socks5://example.com:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: &PerHost{}},
- {allProxyEnv: "irc://example.com:8000", wantTypeOf: dummyDialer{}},
- {noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
- {wantTypeOf: direct{}},
- }
-
- for _, tt := range proxyFromEnvTests {
- os.Setenv("ALL_PROXY", tt.allProxyEnv)
- os.Setenv("NO_PROXY", tt.noProxyEnv)
- ResetCachedEnvironment()
-
- d := FromEnvironment()
- if got, want := fmt.Sprintf("%T", d), fmt.Sprintf("%T", tt.wantTypeOf); got != want {
- t.Errorf("%v: got type = %T, want %T", tt, d, tt.wantTypeOf)
- }
- }
-}
-
-func TestFromURL(t *testing.T) {
- endSystem, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("net.Listen failed: %v", err)
- }
- defer endSystem.Close()
- gateway, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("net.Listen failed: %v", err)
- }
- defer gateway.Close()
-
- var wg sync.WaitGroup
- wg.Add(1)
- go socks5Gateway(t, gateway, endSystem, socks5Domain, &wg)
-
- url, err := url.Parse("socks5://user:password@" + gateway.Addr().String())
- if err != nil {
- t.Fatalf("url.Parse failed: %v", err)
- }
- proxy, err := FromURL(url, Direct)
- if err != nil {
- t.Fatalf("FromURL failed: %v", err)
- }
- _, port, err := net.SplitHostPort(endSystem.Addr().String())
- if err != nil {
- t.Fatalf("net.SplitHostPort failed: %v", err)
- }
- if c, err := proxy.Dial("tcp", "localhost:"+port); err != nil {
- t.Fatalf("FromURL.Dial failed: %v", err)
- } else {
- c.Close()
- }
-
- wg.Wait()
-}
-
-func TestSOCKS5(t *testing.T) {
- endSystem, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("net.Listen failed: %v", err)
- }
- defer endSystem.Close()
- gateway, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("net.Listen failed: %v", err)
- }
- defer gateway.Close()
-
- var wg sync.WaitGroup
- wg.Add(1)
- go socks5Gateway(t, gateway, endSystem, socks5IP4, &wg)
-
- proxy, err := SOCKS5("tcp", gateway.Addr().String(), nil, Direct)
- if err != nil {
- t.Fatalf("SOCKS5 failed: %v", err)
- }
- if c, err := proxy.Dial("tcp", endSystem.Addr().String()); err != nil {
- t.Fatalf("SOCKS5.Dial failed: %v", err)
- } else {
- c.Close()
- }
-
- wg.Wait()
-}
-
-func socks5Gateway(t *testing.T, gateway, endSystem net.Listener, typ byte, wg *sync.WaitGroup) {
- defer wg.Done()
-
- c, err := gateway.Accept()
- if err != nil {
- t.Errorf("net.Listener.Accept failed: %v", err)
- return
- }
- defer c.Close()
-
- b := make([]byte, 32)
- var n int
- if typ == socks5Domain {
- n = 4
- } else {
- n = 3
- }
- if _, err := io.ReadFull(c, b[:n]); err != nil {
- t.Errorf("io.ReadFull failed: %v", err)
- return
- }
- if _, err := c.Write([]byte{socks5Version, socks5AuthNone}); err != nil {
- t.Errorf("net.Conn.Write failed: %v", err)
- return
- }
- if typ == socks5Domain {
- n = 16
- } else {
- n = 10
- }
- if _, err := io.ReadFull(c, b[:n]); err != nil {
- t.Errorf("io.ReadFull failed: %v", err)
- return
- }
- if b[0] != socks5Version || b[1] != socks5Connect || b[2] != 0x00 || b[3] != typ {
- t.Errorf("got an unexpected packet: %#02x %#02x %#02x %#02x", b[0], b[1], b[2], b[3])
- return
- }
- if typ == socks5Domain {
- copy(b[:5], []byte{socks5Version, 0x00, 0x00, socks5Domain, 9})
- b = append(b, []byte("localhost")...)
- } else {
- copy(b[:4], []byte{socks5Version, 0x00, 0x00, socks5IP4})
- }
- host, port, err := net.SplitHostPort(endSystem.Addr().String())
- if err != nil {
- t.Errorf("net.SplitHostPort failed: %v", err)
- return
- }
- b = append(b, []byte(net.ParseIP(host).To4())...)
- p, err := strconv.Atoi(port)
- if err != nil {
- t.Errorf("strconv.Atoi failed: %v", err)
- return
- }
- b = append(b, []byte{byte(p >> 8), byte(p)}...)
- if _, err := c.Write(b); err != nil {
- t.Errorf("net.Conn.Write failed: %v", err)
- return
- }
-}
-
-func ResetProxyEnv() {
- for _, env := range []*envOnce{allProxyEnv, noProxyEnv} {
- for _, v := range env.names {
- os.Setenv(v, "")
- }
- }
- ResetCachedEnvironment()
-}
-
-func ResetCachedEnvironment() {
- allProxyEnv.reset()
- noProxyEnv.reset()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/socks5.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/socks5.go
deleted file mode 100644
index 3fed38ef1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/proxy/socks5.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright 2011 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 file.
-
-package proxy
-
-import (
- "errors"
- "io"
- "net"
- "strconv"
-)
-
-// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address
-// with an optional username and password. See RFC 1928 and RFC 1929.
-func SOCKS5(network, addr string, auth *Auth, forward Dialer) (Dialer, error) {
- s := &socks5{
- network: network,
- addr: addr,
- forward: forward,
- }
- if auth != nil {
- s.user = auth.User
- s.password = auth.Password
- }
-
- return s, nil
-}
-
-type socks5 struct {
- user, password string
- network, addr string
- forward Dialer
-}
-
-const socks5Version = 5
-
-const (
- socks5AuthNone = 0
- socks5AuthPassword = 2
-)
-
-const socks5Connect = 1
-
-const (
- socks5IP4 = 1
- socks5Domain = 3
- socks5IP6 = 4
-)
-
-var socks5Errors = []string{
- "",
- "general failure",
- "connection forbidden",
- "network unreachable",
- "host unreachable",
- "connection refused",
- "TTL expired",
- "command not supported",
- "address type not supported",
-}
-
-// Dial connects to the address addr on the given network via the SOCKS5 proxy.
-func (s *socks5) Dial(network, addr string) (net.Conn, error) {
- switch network {
- case "tcp", "tcp6", "tcp4":
- default:
- return nil, errors.New("proxy: no support for SOCKS5 proxy connections of type " + network)
- }
-
- conn, err := s.forward.Dial(s.network, s.addr)
- if err != nil {
- return nil, err
- }
- if err := s.connect(conn, addr); err != nil {
- conn.Close()
- return nil, err
- }
- return conn, nil
-}
-
-// connect takes an existing connection to a socks5 proxy server,
-// and commands the server to extend that connection to target,
-// which must be a canonical address with a host and port.
-func (s *socks5) connect(conn net.Conn, target string) error {
- host, portStr, err := net.SplitHostPort(target)
- if err != nil {
- return err
- }
-
- port, err := strconv.Atoi(portStr)
- if err != nil {
- return errors.New("proxy: failed to parse port number: " + portStr)
- }
- if port < 1 || port > 0xffff {
- return errors.New("proxy: port number out of range: " + portStr)
- }
-
- // the size here is just an estimate
- buf := make([]byte, 0, 6+len(host))
-
- buf = append(buf, socks5Version)
- if len(s.user) > 0 && len(s.user) < 256 && len(s.password) < 256 {
- buf = append(buf, 2 /* num auth methods */, socks5AuthNone, socks5AuthPassword)
- } else {
- buf = append(buf, 1 /* num auth methods */, socks5AuthNone)
- }
-
- if _, err := conn.Write(buf); err != nil {
- return errors.New("proxy: failed to write greeting to SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- if _, err := io.ReadFull(conn, buf[:2]); err != nil {
- return errors.New("proxy: failed to read greeting from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
- if buf[0] != 5 {
- return errors.New("proxy: SOCKS5 proxy at " + s.addr + " has unexpected version " + strconv.Itoa(int(buf[0])))
- }
- if buf[1] == 0xff {
- return errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication")
- }
-
- // See RFC 1929
- if buf[1] == socks5AuthPassword {
- buf = buf[:0]
- buf = append(buf, 1 /* password protocol version */)
- buf = append(buf, uint8(len(s.user)))
- buf = append(buf, s.user...)
- buf = append(buf, uint8(len(s.password)))
- buf = append(buf, s.password...)
-
- if _, err := conn.Write(buf); err != nil {
- return errors.New("proxy: failed to write authentication request to SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- if _, err := io.ReadFull(conn, buf[:2]); err != nil {
- return errors.New("proxy: failed to read authentication reply from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- if buf[1] != 0 {
- return errors.New("proxy: SOCKS5 proxy at " + s.addr + " rejected username/password")
- }
- }
-
- buf = buf[:0]
- buf = append(buf, socks5Version, socks5Connect, 0 /* reserved */)
-
- if ip := net.ParseIP(host); ip != nil {
- if ip4 := ip.To4(); ip4 != nil {
- buf = append(buf, socks5IP4)
- ip = ip4
- } else {
- buf = append(buf, socks5IP6)
- }
- buf = append(buf, ip...)
- } else {
- if len(host) > 255 {
- return errors.New("proxy: destination host name too long: " + host)
- }
- buf = append(buf, socks5Domain)
- buf = append(buf, byte(len(host)))
- buf = append(buf, host...)
- }
- buf = append(buf, byte(port>>8), byte(port))
-
- if _, err := conn.Write(buf); err != nil {
- return errors.New("proxy: failed to write connect request to SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- if _, err := io.ReadFull(conn, buf[:4]); err != nil {
- return errors.New("proxy: failed to read connect reply from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- failure := "unknown error"
- if int(buf[1]) < len(socks5Errors) {
- failure = socks5Errors[buf[1]]
- }
-
- if len(failure) > 0 {
- return errors.New("proxy: SOCKS5 proxy at " + s.addr + " failed to connect: " + failure)
- }
-
- bytesToDiscard := 0
- switch buf[3] {
- case socks5IP4:
- bytesToDiscard = net.IPv4len
- case socks5IP6:
- bytesToDiscard = net.IPv6len
- case socks5Domain:
- _, err := io.ReadFull(conn, buf[:1])
- if err != nil {
- return errors.New("proxy: failed to read domain length from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
- bytesToDiscard = int(buf[0])
- default:
- return errors.New("proxy: got unknown address type " + strconv.Itoa(int(buf[3])) + " from SOCKS5 proxy at " + s.addr)
- }
-
- if cap(buf) < bytesToDiscard {
- buf = make([]byte, bytesToDiscard)
- } else {
- buf = buf[:bytesToDiscard]
- }
- if _, err := io.ReadFull(conn, buf); err != nil {
- return errors.New("proxy: failed to read address from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- // Also need to discard the port number
- if _, err := io.ReadFull(conn, buf[:2]); err != nil {
- return errors.New("proxy: failed to read port from SOCKS5 proxy at " + s.addr + ": " + err.Error())
- }
-
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/gen.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/gen.go
deleted file mode 100644
index f85a3c32b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/gen.go
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright 2012 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 file.
-
-// +build ignore
-
-package main
-
-// This program generates table.go and table_test.go based on the authoritative
-// public suffix list at https://publicsuffix.org/list/effective_tld_names.dat
-//
-// The version is derived from
-// https://api.github.com/repos/publicsuffix/list/commits?path=public_suffix_list.dat
-// and a human-readable form is at
-// https://github.com/publicsuffix/list/commits/master/public_suffix_list.dat
-//
-// To fetch a particular git revision, such as 5c70ccd250, pass
-// -url "https://raw.githubusercontent.com/publicsuffix/list/5c70ccd250/public_suffix_list.dat"
-// and -version "an explicit version string".
-
-import (
- "bufio"
- "bytes"
- "flag"
- "fmt"
- "go/format"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "regexp"
- "sort"
- "strings"
-
- "golang.org/x/net/idna"
-)
-
-const (
- // These sum of these four values must be no greater than 32.
- nodesBitsChildren = 10
- nodesBitsICANN = 1
- nodesBitsTextOffset = 15
- nodesBitsTextLength = 6
-
- // These sum of these four values must be no greater than 32.
- childrenBitsWildcard = 1
- childrenBitsNodeType = 2
- childrenBitsHi = 14
- childrenBitsLo = 14
-)
-
-var (
- maxChildren int
- maxTextOffset int
- maxTextLength int
- maxHi uint32
- maxLo uint32
-)
-
-func max(a, b int) int {
- if a < b {
- return b
- }
- return a
-}
-
-func u32max(a, b uint32) uint32 {
- if a < b {
- return b
- }
- return a
-}
-
-const (
- nodeTypeNormal = 0
- nodeTypeException = 1
- nodeTypeParentOnly = 2
- numNodeType = 3
-)
-
-func nodeTypeStr(n int) string {
- switch n {
- case nodeTypeNormal:
- return "+"
- case nodeTypeException:
- return "!"
- case nodeTypeParentOnly:
- return "o"
- }
- panic("unreachable")
-}
-
-const (
- defaultURL = "https://publicsuffix.org/list/effective_tld_names.dat"
- gitCommitURL = "https://api.github.com/repos/publicsuffix/list/commits?path=public_suffix_list.dat"
-)
-
-var (
- labelEncoding = map[string]uint32{}
- labelsList = []string{}
- labelsMap = map[string]bool{}
- rules = []string{}
-
- // validSuffixRE is used to check that the entries in the public suffix
- // list are in canonical form (after Punycode encoding). Specifically,
- // capital letters are not allowed.
- validSuffixRE = regexp.MustCompile(`^[a-z0-9_\!\*\-\.]+$`)
-
- shaRE = regexp.MustCompile(`"sha":"([^"]+)"`)
- dateRE = regexp.MustCompile(`"committer":{[^{]+"date":"([^"]+)"`)
-
- comments = flag.Bool("comments", false, "generate table.go comments, for debugging")
- subset = flag.Bool("subset", false, "generate only a subset of the full table, for debugging")
- url = flag.String("url", defaultURL, "URL of the publicsuffix.org list. If empty, stdin is read instead")
- v = flag.Bool("v", false, "verbose output (to stderr)")
- version = flag.String("version", "", "the effective_tld_names.dat version")
-)
-
-func main() {
- if err := main1(); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func main1() error {
- flag.Parse()
- if nodesBitsTextLength+nodesBitsTextOffset+nodesBitsICANN+nodesBitsChildren > 32 {
- return fmt.Errorf("not enough bits to encode the nodes table")
- }
- if childrenBitsLo+childrenBitsHi+childrenBitsNodeType+childrenBitsWildcard > 32 {
- return fmt.Errorf("not enough bits to encode the children table")
- }
- if *version == "" {
- if *url != defaultURL {
- return fmt.Errorf("-version was not specified, and the -url is not the default one")
- }
- sha, date, err := gitCommit()
- if err != nil {
- return err
- }
- *version = fmt.Sprintf("publicsuffix.org's public_suffix_list.dat, git revision %s (%s)", sha, date)
- }
- var r io.Reader = os.Stdin
- if *url != "" {
- res, err := http.Get(*url)
- if err != nil {
- return err
- }
- if res.StatusCode != http.StatusOK {
- return fmt.Errorf("bad GET status for %s: %d", *url, res.Status)
- }
- r = res.Body
- defer res.Body.Close()
- }
-
- var root node
- icann := false
- br := bufio.NewReader(r)
- for {
- s, err := br.ReadString('\n')
- if err != nil {
- if err == io.EOF {
- break
- }
- return err
- }
- s = strings.TrimSpace(s)
- if strings.Contains(s, "BEGIN ICANN DOMAINS") {
- icann = true
- continue
- }
- if strings.Contains(s, "END ICANN DOMAINS") {
- icann = false
- continue
- }
- if s == "" || strings.HasPrefix(s, "//") {
- continue
- }
- s, err = idna.ToASCII(s)
- if err != nil {
- return err
- }
- if !validSuffixRE.MatchString(s) {
- return fmt.Errorf("bad publicsuffix.org list data: %q", s)
- }
-
- if *subset {
- switch {
- case s == "ac.jp" || strings.HasSuffix(s, ".ac.jp"):
- case s == "ak.us" || strings.HasSuffix(s, ".ak.us"):
- case s == "ao" || strings.HasSuffix(s, ".ao"):
- case s == "ar" || strings.HasSuffix(s, ".ar"):
- case s == "arpa" || strings.HasSuffix(s, ".arpa"):
- case s == "cy" || strings.HasSuffix(s, ".cy"):
- case s == "dyndns.org" || strings.HasSuffix(s, ".dyndns.org"):
- case s == "jp":
- case s == "kobe.jp" || strings.HasSuffix(s, ".kobe.jp"):
- case s == "kyoto.jp" || strings.HasSuffix(s, ".kyoto.jp"):
- case s == "om" || strings.HasSuffix(s, ".om"):
- case s == "uk" || strings.HasSuffix(s, ".uk"):
- case s == "uk.com" || strings.HasSuffix(s, ".uk.com"):
- case s == "tw" || strings.HasSuffix(s, ".tw"):
- case s == "zw" || strings.HasSuffix(s, ".zw"):
- case s == "xn--p1ai" || strings.HasSuffix(s, ".xn--p1ai"):
- // xn--p1ai is Russian-Cyrillic "рф".
- default:
- continue
- }
- }
-
- rules = append(rules, s)
-
- nt, wildcard := nodeTypeNormal, false
- switch {
- case strings.HasPrefix(s, "*."):
- s, nt = s[2:], nodeTypeParentOnly
- wildcard = true
- case strings.HasPrefix(s, "!"):
- s, nt = s[1:], nodeTypeException
- }
- labels := strings.Split(s, ".")
- for n, i := &root, len(labels)-1; i >= 0; i-- {
- label := labels[i]
- n = n.child(label)
- if i == 0 {
- if nt != nodeTypeParentOnly && n.nodeType == nodeTypeParentOnly {
- n.nodeType = nt
- }
- n.icann = n.icann && icann
- n.wildcard = n.wildcard || wildcard
- }
- labelsMap[label] = true
- }
- }
- labelsList = make([]string, 0, len(labelsMap))
- for label := range labelsMap {
- labelsList = append(labelsList, label)
- }
- sort.Strings(labelsList)
-
- if err := generate(printReal, &root, "table.go"); err != nil {
- return err
- }
- if err := generate(printTest, &root, "table_test.go"); err != nil {
- return err
- }
- return nil
-}
-
-func generate(p func(io.Writer, *node) error, root *node, filename string) error {
- buf := new(bytes.Buffer)
- if err := p(buf, root); err != nil {
- return err
- }
- b, err := format.Source(buf.Bytes())
- if err != nil {
- return err
- }
- return ioutil.WriteFile(filename, b, 0644)
-}
-
-func gitCommit() (sha, date string, retErr error) {
- res, err := http.Get(gitCommitURL)
- if err != nil {
- return "", "", err
- }
- if res.StatusCode != http.StatusOK {
- return "", "", fmt.Errorf("bad GET status for %s: %d", gitCommitURL, res.Status)
- }
- defer res.Body.Close()
- b, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return "", "", err
- }
- if m := shaRE.FindSubmatch(b); m != nil {
- sha = string(m[1])
- }
- if m := dateRE.FindSubmatch(b); m != nil {
- date = string(m[1])
- }
- if sha == "" || date == "" {
- retErr = fmt.Errorf("could not find commit SHA and date in %s", gitCommitURL)
- }
- return sha, date, retErr
-}
-
-func printTest(w io.Writer, n *node) error {
- fmt.Fprintf(w, "// generated by go run gen.go; DO NOT EDIT\n\n")
- fmt.Fprintf(w, "package publicsuffix\n\nvar rules = [...]string{\n")
- for _, rule := range rules {
- fmt.Fprintf(w, "%q,\n", rule)
- }
- fmt.Fprintf(w, "}\n\nvar nodeLabels = [...]string{\n")
- if err := n.walk(w, printNodeLabel); err != nil {
- return err
- }
- fmt.Fprintf(w, "}\n")
- return nil
-}
-
-func printReal(w io.Writer, n *node) error {
- const header = `// generated by go run gen.go; DO NOT EDIT
-
-package publicsuffix
-
-const version = %q
-
-const (
- nodesBitsChildren = %d
- nodesBitsICANN = %d
- nodesBitsTextOffset = %d
- nodesBitsTextLength = %d
-
- childrenBitsWildcard = %d
- childrenBitsNodeType = %d
- childrenBitsHi = %d
- childrenBitsLo = %d
-)
-
-const (
- nodeTypeNormal = %d
- nodeTypeException = %d
- nodeTypeParentOnly = %d
-)
-
-// numTLD is the number of top level domains.
-const numTLD = %d
-
-`
- fmt.Fprintf(w, header, *version,
- nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength,
- childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo,
- nodeTypeNormal, nodeTypeException, nodeTypeParentOnly, len(n.children))
-
- text := combineText(labelsList)
- if text == "" {
- return fmt.Errorf("internal error: makeText returned no text")
- }
- for _, label := range labelsList {
- offset, length := strings.Index(text, label), len(label)
- if offset < 0 {
- return fmt.Errorf("internal error: could not find %q in text %q", label, text)
- }
- maxTextOffset, maxTextLength = max(maxTextOffset, offset), max(maxTextLength, length)
- if offset >= 1<<nodesBitsTextOffset {
- return fmt.Errorf("text offset %d is too large, or nodeBitsTextOffset is too small", offset)
- }
- if length >= 1<<nodesBitsTextLength {
- return fmt.Errorf("text length %d is too large, or nodeBitsTextLength is too small", length)
- }
- labelEncoding[label] = uint32(offset)<<nodesBitsTextLength | uint32(length)
- }
- fmt.Fprintf(w, "// Text is the combined text of all labels.\nconst text = ")
- for len(text) > 0 {
- n, plus := len(text), ""
- if n > 64 {
- n, plus = 64, " +"
- }
- fmt.Fprintf(w, "%q%s\n", text[:n], plus)
- text = text[n:]
- }
-
- if err := n.walk(w, assignIndexes); err != nil {
- return err
- }
-
- fmt.Fprintf(w, `
-
-// nodes is the list of nodes. Each node is represented as a uint32, which
-// encodes the node's children, wildcard bit and node type (as an index into
-// the children array), ICANN bit and text.
-//
-// If the table was generated with the -comments flag, there is a //-comment
-// after each node's data. In it is the nodes-array indexes of the children,
-// formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The
-// nodeType is printed as + for normal, ! for exception, and o for parent-only
-// nodes that have children but don't match a domain label in their own right.
-// An I denotes an ICANN domain.
-//
-// The layout within the uint32, from MSB to LSB, is:
-// [%2d bits] unused
-// [%2d bits] children index
-// [%2d bits] ICANN bit
-// [%2d bits] text index
-// [%2d bits] text length
-var nodes = [...]uint32{
-`,
- 32-nodesBitsChildren-nodesBitsICANN-nodesBitsTextOffset-nodesBitsTextLength,
- nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength)
- if err := n.walk(w, printNode); err != nil {
- return err
- }
- fmt.Fprintf(w, `}
-
-// children is the list of nodes' children, the parent's wildcard bit and the
-// parent's node type. If a node has no children then their children index
-// will be in the range [0, 6), depending on the wildcard bit and node type.
-//
-// The layout within the uint32, from MSB to LSB, is:
-// [%2d bits] unused
-// [%2d bits] wildcard bit
-// [%2d bits] node type
-// [%2d bits] high nodes index (exclusive) of children
-// [%2d bits] low nodes index (inclusive) of children
-var children=[...]uint32{
-`,
- 32-childrenBitsWildcard-childrenBitsNodeType-childrenBitsHi-childrenBitsLo,
- childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo)
- for i, c := range childrenEncoding {
- s := "---------------"
- lo := c & (1<<childrenBitsLo - 1)
- hi := (c >> childrenBitsLo) & (1<<childrenBitsHi - 1)
- if lo != hi {
- s = fmt.Sprintf("n0x%04x-n0x%04x", lo, hi)
- }
- nodeType := int(c>>(childrenBitsLo+childrenBitsHi)) & (1<<childrenBitsNodeType - 1)
- wildcard := c>>(childrenBitsLo+childrenBitsHi+childrenBitsNodeType) != 0
- if *comments {
- fmt.Fprintf(w, "0x%08x, // c0x%04x (%s)%s %s\n",
- c, i, s, wildcardStr(wildcard), nodeTypeStr(nodeType))
- } else {
- fmt.Fprintf(w, "0x%x,\n", c)
- }
- }
- fmt.Fprintf(w, "}\n\n")
- fmt.Fprintf(w, "// max children %d (capacity %d)\n", maxChildren, 1<<nodesBitsChildren-1)
- fmt.Fprintf(w, "// max text offset %d (capacity %d)\n", maxTextOffset, 1<<nodesBitsTextOffset-1)
- fmt.Fprintf(w, "// max text length %d (capacity %d)\n", maxTextLength, 1<<nodesBitsTextLength-1)
- fmt.Fprintf(w, "// max hi %d (capacity %d)\n", maxHi, 1<<childrenBitsHi-1)
- fmt.Fprintf(w, "// max lo %d (capacity %d)\n", maxLo, 1<<childrenBitsLo-1)
- return nil
-}
-
-type node struct {
- label string
- nodeType int
- icann bool
- wildcard bool
- // nodesIndex and childrenIndex are the index of this node in the nodes
- // and the index of its children offset/length in the children arrays.
- nodesIndex, childrenIndex int
- // firstChild is the index of this node's first child, or zero if this
- // node has no children.
- firstChild int
- // children are the node's children, in strictly increasing node label order.
- children []*node
-}
-
-func (n *node) walk(w io.Writer, f func(w1 io.Writer, n1 *node) error) error {
- if err := f(w, n); err != nil {
- return err
- }
- for _, c := range n.children {
- if err := c.walk(w, f); err != nil {
- return err
- }
- }
- return nil
-}
-
-// child returns the child of n with the given label. The child is created if
-// it did not exist beforehand.
-func (n *node) child(label string) *node {
- for _, c := range n.children {
- if c.label == label {
- return c
- }
- }
- c := &node{
- label: label,
- nodeType: nodeTypeParentOnly,
- icann: true,
- }
- n.children = append(n.children, c)
- sort.Sort(byLabel(n.children))
- return c
-}
-
-type byLabel []*node
-
-func (b byLabel) Len() int { return len(b) }
-func (b byLabel) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b byLabel) Less(i, j int) bool { return b[i].label < b[j].label }
-
-var nextNodesIndex int
-
-// childrenEncoding are the encoded entries in the generated children array.
-// All these pre-defined entries have no children.
-var childrenEncoding = []uint32{
- 0 << (childrenBitsLo + childrenBitsHi), // Without wildcard bit, nodeTypeNormal.
- 1 << (childrenBitsLo + childrenBitsHi), // Without wildcard bit, nodeTypeException.
- 2 << (childrenBitsLo + childrenBitsHi), // Without wildcard bit, nodeTypeParentOnly.
- 4 << (childrenBitsLo + childrenBitsHi), // With wildcard bit, nodeTypeNormal.
- 5 << (childrenBitsLo + childrenBitsHi), // With wildcard bit, nodeTypeException.
- 6 << (childrenBitsLo + childrenBitsHi), // With wildcard bit, nodeTypeParentOnly.
-}
-
-var firstCallToAssignIndexes = true
-
-func assignIndexes(w io.Writer, n *node) error {
- if len(n.children) != 0 {
- // Assign nodesIndex.
- n.firstChild = nextNodesIndex
- for _, c := range n.children {
- c.nodesIndex = nextNodesIndex
- nextNodesIndex++
- }
-
- // The root node's children is implicit.
- if firstCallToAssignIndexes {
- firstCallToAssignIndexes = false
- return nil
- }
-
- // Assign childrenIndex.
- maxChildren = max(maxChildren, len(childrenEncoding))
- if len(childrenEncoding) >= 1<<nodesBitsChildren {
- return fmt.Errorf("children table size %d is too large, or nodeBitsChildren is too small", len(childrenEncoding))
- }
- n.childrenIndex = len(childrenEncoding)
- lo := uint32(n.firstChild)
- hi := lo + uint32(len(n.children))
- maxLo, maxHi = u32max(maxLo, lo), u32max(maxHi, hi)
- if lo >= 1<<childrenBitsLo {
- return fmt.Errorf("children lo %d is too large, or childrenBitsLo is too small", lo)
- }
- if hi >= 1<<childrenBitsHi {
- return fmt.Errorf("children hi %d is too large, or childrenBitsHi is too small", hi)
- }
- enc := hi<<childrenBitsLo | lo
- enc |= uint32(n.nodeType) << (childrenBitsLo + childrenBitsHi)
- if n.wildcard {
- enc |= 1 << (childrenBitsLo + childrenBitsHi + childrenBitsNodeType)
- }
- childrenEncoding = append(childrenEncoding, enc)
- } else {
- n.childrenIndex = n.nodeType
- if n.wildcard {
- n.childrenIndex += numNodeType
- }
- }
- return nil
-}
-
-func printNode(w io.Writer, n *node) error {
- for _, c := range n.children {
- s := "---------------"
- if len(c.children) != 0 {
- s = fmt.Sprintf("n0x%04x-n0x%04x", c.firstChild, c.firstChild+len(c.children))
- }
- encoding := labelEncoding[c.label]
- if c.icann {
- encoding |= 1 << (nodesBitsTextLength + nodesBitsTextOffset)
- }
- encoding |= uint32(c.childrenIndex) << (nodesBitsTextLength + nodesBitsTextOffset + nodesBitsICANN)
- if *comments {
- fmt.Fprintf(w, "0x%08x, // n0x%04x c0x%04x (%s)%s %s %s %s\n",
- encoding, c.nodesIndex, c.childrenIndex, s, wildcardStr(c.wildcard),
- nodeTypeStr(c.nodeType), icannStr(c.icann), c.label,
- )
- } else {
- fmt.Fprintf(w, "0x%x,\n", encoding)
- }
- }
- return nil
-}
-
-func printNodeLabel(w io.Writer, n *node) error {
- for _, c := range n.children {
- fmt.Fprintf(w, "%q,\n", c.label)
- }
- return nil
-}
-
-func icannStr(icann bool) string {
- if icann {
- return "I"
- }
- return " "
-}
-
-func wildcardStr(wildcard bool) string {
- if wildcard {
- return "*"
- }
- return " "
-}
-
-// combineText combines all the strings in labelsList to form one giant string.
-// Overlapping strings will be merged: "arpa" and "parliament" could yield
-// "arparliament".
-func combineText(labelsList []string) string {
- beforeLength := 0
- for _, s := range labelsList {
- beforeLength += len(s)
- }
-
- text := crush(removeSubstrings(labelsList))
- if *v {
- fmt.Fprintf(os.Stderr, "crushed %d bytes to become %d bytes\n", beforeLength, len(text))
- }
- return text
-}
-
-type byLength []string
-
-func (s byLength) Len() int { return len(s) }
-func (s byLength) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s byLength) Less(i, j int) bool { return len(s[i]) < len(s[j]) }
-
-// removeSubstrings returns a copy of its input with any strings removed
-// that are substrings of other provided strings.
-func removeSubstrings(input []string) []string {
- // Make a copy of input.
- ss := append(make([]string, 0, len(input)), input...)
- sort.Sort(byLength(ss))
-
- for i, shortString := range ss {
- // For each string, only consider strings higher than it in sort order, i.e.
- // of equal length or greater.
- for _, longString := range ss[i+1:] {
- if strings.Contains(longString, shortString) {
- ss[i] = ""
- break
- }
- }
- }
-
- // Remove the empty strings.
- sort.Strings(ss)
- for len(ss) > 0 && ss[0] == "" {
- ss = ss[1:]
- }
- return ss
-}
-
-// crush combines a list of strings, taking advantage of overlaps. It returns a
-// single string that contains each input string as a substring.
-func crush(ss []string) string {
- maxLabelLen := 0
- for _, s := range ss {
- if maxLabelLen < len(s) {
- maxLabelLen = len(s)
- }
- }
-
- for prefixLen := maxLabelLen; prefixLen > 0; prefixLen-- {
- prefixes := makePrefixMap(ss, prefixLen)
- for i, s := range ss {
- if len(s) <= prefixLen {
- continue
- }
- mergeLabel(ss, i, prefixLen, prefixes)
- }
- }
-
- return strings.Join(ss, "")
-}
-
-// mergeLabel merges the label at ss[i] with the first available matching label
-// in prefixMap, where the last "prefixLen" characters in ss[i] match the first
-// "prefixLen" characters in the matching label.
-// It will merge ss[i] repeatedly until no more matches are available.
-// All matching labels merged into ss[i] are replaced by "".
-func mergeLabel(ss []string, i, prefixLen int, prefixes prefixMap) {
- s := ss[i]
- suffix := s[len(s)-prefixLen:]
- for _, j := range prefixes[suffix] {
- // Empty strings mean "already used." Also avoid merging with self.
- if ss[j] == "" || i == j {
- continue
- }
- if *v {
- fmt.Fprintf(os.Stderr, "%d-length overlap at (%4d,%4d): %q and %q share %q\n",
- prefixLen, i, j, ss[i], ss[j], suffix)
- }
- ss[i] += ss[j][prefixLen:]
- ss[j] = ""
- // ss[i] has a new suffix, so merge again if possible.
- // Note: we only have to merge again at the same prefix length. Shorter
- // prefix lengths will be handled in the next iteration of crush's for loop.
- // Can there be matches for longer prefix lengths, introduced by the merge?
- // I believe that any such matches would by necessity have been eliminated
- // during substring removal or merged at a higher prefix length. For
- // instance, in crush("abc", "cde", "bcdef"), combining "abc" and "cde"
- // would yield "abcde", which could be merged with "bcdef." However, in
- // practice "cde" would already have been elimintated by removeSubstrings.
- mergeLabel(ss, i, prefixLen, prefixes)
- return
- }
-}
-
-// prefixMap maps from a prefix to a list of strings containing that prefix. The
-// list of strings is represented as indexes into a slice of strings stored
-// elsewhere.
-type prefixMap map[string][]int
-
-// makePrefixMap constructs a prefixMap from a slice of strings.
-func makePrefixMap(ss []string, prefixLen int) prefixMap {
- prefixes := make(prefixMap)
- for i, s := range ss {
- // We use < rather than <= because if a label matches on a prefix equal to
- // its full length, that's actually a substring match handled by
- // removeSubstrings.
- if prefixLen < len(s) {
- prefix := s[:prefixLen]
- prefixes[prefix] = append(prefixes[prefix], i)
- }
- }
-
- return prefixes
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list.go
deleted file mode 100644
index 8bbf3bcd7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2012 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 file.
-
-//go:generate go run gen.go
-
-// Package publicsuffix provides a public suffix list based on data from
-// http://publicsuffix.org/. A public suffix is one under which Internet users
-// can directly register names.
-package publicsuffix // import "golang.org/x/net/publicsuffix"
-
-// TODO: specify case sensitivity and leading/trailing dot behavior for
-// func PublicSuffix and func EffectiveTLDPlusOne.
-
-import (
- "fmt"
- "net/http/cookiejar"
- "strings"
-)
-
-// List implements the cookiejar.PublicSuffixList interface by calling the
-// PublicSuffix function.
-var List cookiejar.PublicSuffixList = list{}
-
-type list struct{}
-
-func (list) PublicSuffix(domain string) string {
- ps, _ := PublicSuffix(domain)
- return ps
-}
-
-func (list) String() string {
- return version
-}
-
-// PublicSuffix returns the public suffix of the domain using a copy of the
-// publicsuffix.org database compiled into the library.
-//
-// icann is whether the public suffix is managed by the Internet Corporation
-// for Assigned Names and Numbers. If not, the public suffix is privately
-// managed. For example, foo.org and foo.co.uk are ICANN domains,
-// foo.dyndns.org and foo.blogspot.co.uk are private domains.
-//
-// Use cases for distinguishing ICANN domains like foo.com from private
-// domains like foo.appspot.com can be found at
-// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases
-func PublicSuffix(domain string) (publicSuffix string, icann bool) {
- lo, hi := uint32(0), uint32(numTLD)
- s, suffix, wildcard := domain, len(domain), false
-loop:
- for {
- dot := strings.LastIndex(s, ".")
- if wildcard {
- suffix = 1 + dot
- }
- if lo == hi {
- break
- }
- f := find(s[1+dot:], lo, hi)
- if f == notFound {
- break
- }
-
- u := nodes[f] >> (nodesBitsTextOffset + nodesBitsTextLength)
- icann = u&(1<<nodesBitsICANN-1) != 0
- u >>= nodesBitsICANN
- u = children[u&(1<<nodesBitsChildren-1)]
- lo = u & (1<<childrenBitsLo - 1)
- u >>= childrenBitsLo
- hi = u & (1<<childrenBitsHi - 1)
- u >>= childrenBitsHi
- switch u & (1<<childrenBitsNodeType - 1) {
- case nodeTypeNormal:
- suffix = 1 + dot
- case nodeTypeException:
- suffix = 1 + len(s)
- break loop
- }
- u >>= childrenBitsNodeType
- wildcard = u&(1<<childrenBitsWildcard-1) != 0
-
- if dot == -1 {
- break
- }
- s = s[:dot]
- }
- if suffix == len(domain) {
- // If no rules match, the prevailing rule is "*".
- return domain[1+strings.LastIndex(domain, "."):], icann
- }
- return domain[suffix:], icann
-}
-
-const notFound uint32 = 1<<32 - 1
-
-// find returns the index of the node in the range [lo, hi) whose label equals
-// label, or notFound if there is no such node. The range is assumed to be in
-// strictly increasing node label order.
-func find(label string, lo, hi uint32) uint32 {
- for lo < hi {
- mid := lo + (hi-lo)/2
- s := nodeLabel(mid)
- if s < label {
- lo = mid + 1
- } else if s == label {
- return mid
- } else {
- hi = mid
- }
- }
- return notFound
-}
-
-// nodeLabel returns the label for the i'th node.
-func nodeLabel(i uint32) string {
- x := nodes[i]
- length := x & (1<<nodesBitsTextLength - 1)
- x >>= nodesBitsTextLength
- offset := x & (1<<nodesBitsTextOffset - 1)
- return text[offset : offset+length]
-}
-
-// EffectiveTLDPlusOne returns the effective top level domain plus one more
-// label. For example, the eTLD+1 for "foo.bar.golang.org" is "golang.org".
-func EffectiveTLDPlusOne(domain string) (string, error) {
- suffix, _ := PublicSuffix(domain)
- if len(domain) <= len(suffix) {
- return "", fmt.Errorf("publicsuffix: cannot derive eTLD+1 for domain %q", domain)
- }
- i := len(domain) - len(suffix) - 1
- if domain[i] != '.' {
- return "", fmt.Errorf("publicsuffix: invalid public suffix %q for domain %q", suffix, domain)
- }
- return domain[1+strings.LastIndex(domain[:i], "."):], nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list_test.go
deleted file mode 100644
index 42d79cc43..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/list_test.go
+++ /dev/null
@@ -1,416 +0,0 @@
-// Copyright 2012 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 file.
-
-package publicsuffix
-
-import (
- "sort"
- "strings"
- "testing"
-)
-
-func TestNodeLabel(t *testing.T) {
- for i, want := range nodeLabels {
- got := nodeLabel(uint32(i))
- if got != want {
- t.Errorf("%d: got %q, want %q", i, got, want)
- }
- }
-}
-
-func TestFind(t *testing.T) {
- testCases := []string{
- "",
- "a",
- "a0",
- "aaaa",
- "ao",
- "ap",
- "ar",
- "aro",
- "arp",
- "arpa",
- "arpaa",
- "arpb",
- "az",
- "b",
- "b0",
- "ba",
- "z",
- "zu",
- "zv",
- "zw",
- "zx",
- "zy",
- "zz",
- "zzzz",
- }
- for _, tc := range testCases {
- got := find(tc, 0, numTLD)
- want := notFound
- for i := uint32(0); i < numTLD; i++ {
- if tc == nodeLabel(i) {
- want = i
- break
- }
- }
- if got != want {
- t.Errorf("%q: got %d, want %d", tc, got, want)
- }
- }
-}
-
-func TestICANN(t *testing.T) {
- testCases := map[string]bool{
- "foo.org": true,
- "foo.co.uk": true,
- "foo.dyndns.org": false,
- "foo.go.dyndns.org": false,
- "foo.blogspot.co.uk": false,
- "foo.intranet": false,
- }
- for domain, want := range testCases {
- _, got := PublicSuffix(domain)
- if got != want {
- t.Errorf("%q: got %v, want %v", domain, got, want)
- }
- }
-}
-
-var publicSuffixTestCases = []struct {
- domain, want string
-}{
- // Empty string.
- {"", ""},
-
- // The .ao rules are:
- // ao
- // ed.ao
- // gv.ao
- // og.ao
- // co.ao
- // pb.ao
- // it.ao
- {"ao", "ao"},
- {"www.ao", "ao"},
- {"pb.ao", "pb.ao"},
- {"www.pb.ao", "pb.ao"},
- {"www.xxx.yyy.zzz.pb.ao", "pb.ao"},
-
- // The .ar rules are:
- // ar
- // com.ar
- // edu.ar
- // gob.ar
- // gov.ar
- // int.ar
- // mil.ar
- // net.ar
- // org.ar
- // tur.ar
- // blogspot.com.ar
- {"ar", "ar"},
- {"www.ar", "ar"},
- {"nic.ar", "ar"},
- {"www.nic.ar", "ar"},
- {"com.ar", "com.ar"},
- {"www.com.ar", "com.ar"},
- {"blogspot.com.ar", "blogspot.com.ar"},
- {"www.blogspot.com.ar", "blogspot.com.ar"},
- {"www.xxx.yyy.zzz.blogspot.com.ar", "blogspot.com.ar"},
- {"logspot.com.ar", "com.ar"},
- {"zlogspot.com.ar", "com.ar"},
- {"zblogspot.com.ar", "com.ar"},
-
- // The .arpa rules are:
- // arpa
- // e164.arpa
- // in-addr.arpa
- // ip6.arpa
- // iris.arpa
- // uri.arpa
- // urn.arpa
- {"arpa", "arpa"},
- {"www.arpa", "arpa"},
- {"urn.arpa", "urn.arpa"},
- {"www.urn.arpa", "urn.arpa"},
- {"www.xxx.yyy.zzz.urn.arpa", "urn.arpa"},
-
- // The relevant {kobe,kyoto}.jp rules are:
- // jp
- // *.kobe.jp
- // !city.kobe.jp
- // kyoto.jp
- // ide.kyoto.jp
- {"jp", "jp"},
- {"kobe.jp", "jp"},
- {"c.kobe.jp", "c.kobe.jp"},
- {"b.c.kobe.jp", "c.kobe.jp"},
- {"a.b.c.kobe.jp", "c.kobe.jp"},
- {"city.kobe.jp", "kobe.jp"},
- {"www.city.kobe.jp", "kobe.jp"},
- {"kyoto.jp", "kyoto.jp"},
- {"test.kyoto.jp", "kyoto.jp"},
- {"ide.kyoto.jp", "ide.kyoto.jp"},
- {"b.ide.kyoto.jp", "ide.kyoto.jp"},
- {"a.b.ide.kyoto.jp", "ide.kyoto.jp"},
-
- // The .tw rules are:
- // tw
- // edu.tw
- // gov.tw
- // mil.tw
- // com.tw
- // net.tw
- // org.tw
- // idv.tw
- // game.tw
- // ebiz.tw
- // club.tw
- // 網路.tw (xn--zf0ao64a.tw)
- // 組織.tw (xn--uc0atv.tw)
- // 商業.tw (xn--czrw28b.tw)
- // blogspot.tw
- {"tw", "tw"},
- {"aaa.tw", "tw"},
- {"www.aaa.tw", "tw"},
- {"xn--czrw28b.aaa.tw", "tw"},
- {"edu.tw", "edu.tw"},
- {"www.edu.tw", "edu.tw"},
- {"xn--czrw28b.edu.tw", "edu.tw"},
- {"xn--czrw28b.tw", "xn--czrw28b.tw"},
- {"www.xn--czrw28b.tw", "xn--czrw28b.tw"},
- {"xn--uc0atv.xn--czrw28b.tw", "xn--czrw28b.tw"},
- {"xn--kpry57d.tw", "tw"},
-
- // The .uk rules are:
- // uk
- // ac.uk
- // co.uk
- // gov.uk
- // ltd.uk
- // me.uk
- // net.uk
- // nhs.uk
- // org.uk
- // plc.uk
- // police.uk
- // *.sch.uk
- // blogspot.co.uk
- {"uk", "uk"},
- {"aaa.uk", "uk"},
- {"www.aaa.uk", "uk"},
- {"mod.uk", "uk"},
- {"www.mod.uk", "uk"},
- {"sch.uk", "uk"},
- {"mod.sch.uk", "mod.sch.uk"},
- {"www.sch.uk", "www.sch.uk"},
- {"blogspot.co.uk", "blogspot.co.uk"},
- {"blogspot.nic.uk", "uk"},
- {"blogspot.sch.uk", "blogspot.sch.uk"},
-
- // The .рф rules are
- // рф (xn--p1ai)
- {"xn--p1ai", "xn--p1ai"},
- {"aaa.xn--p1ai", "xn--p1ai"},
- {"www.xxx.yyy.xn--p1ai", "xn--p1ai"},
-
- // The .bd rules are:
- // *.bd
- {"bd", "bd"},
- {"www.bd", "www.bd"},
- {"zzz.bd", "zzz.bd"},
- {"www.zzz.bd", "zzz.bd"},
- {"www.xxx.yyy.zzz.bd", "zzz.bd"},
-
- // There are no .nosuchtld rules.
- {"nosuchtld", "nosuchtld"},
- {"foo.nosuchtld", "nosuchtld"},
- {"bar.foo.nosuchtld", "nosuchtld"},
-}
-
-func BenchmarkPublicSuffix(b *testing.B) {
- for i := 0; i < b.N; i++ {
- for _, tc := range publicSuffixTestCases {
- List.PublicSuffix(tc.domain)
- }
- }
-}
-
-func TestPublicSuffix(t *testing.T) {
- for _, tc := range publicSuffixTestCases {
- got := List.PublicSuffix(tc.domain)
- if got != tc.want {
- t.Errorf("%q: got %q, want %q", tc.domain, got, tc.want)
- }
- }
-}
-
-func TestSlowPublicSuffix(t *testing.T) {
- for _, tc := range publicSuffixTestCases {
- got := slowPublicSuffix(tc.domain)
- if got != tc.want {
- t.Errorf("%q: got %q, want %q", tc.domain, got, tc.want)
- }
- }
-}
-
-// slowPublicSuffix implements the canonical (but O(number of rules)) public
-// suffix algorithm described at http://publicsuffix.org/list/.
-//
-// 1. Match domain against all rules and take note of the matching ones.
-// 2. If no rules match, the prevailing rule is "*".
-// 3. If more than one rule matches, the prevailing rule is the one which is an exception rule.
-// 4. If there is no matching exception rule, the prevailing rule is the one with the most labels.
-// 5. If the prevailing rule is a exception rule, modify it by removing the leftmost label.
-// 6. The public suffix is the set of labels from the domain which directly match the labels of the prevailing rule (joined by dots).
-// 7. The registered or registrable domain is the public suffix plus one additional label.
-//
-// This function returns the public suffix, not the registrable domain, and so
-// it stops after step 6.
-func slowPublicSuffix(domain string) string {
- match := func(rulePart, domainPart string) bool {
- switch rulePart[0] {
- case '*':
- return true
- case '!':
- return rulePart[1:] == domainPart
- }
- return rulePart == domainPart
- }
-
- domainParts := strings.Split(domain, ".")
- var matchingRules [][]string
-
-loop:
- for _, rule := range rules {
- ruleParts := strings.Split(rule, ".")
- if len(domainParts) < len(ruleParts) {
- continue
- }
- for i := range ruleParts {
- rulePart := ruleParts[len(ruleParts)-1-i]
- domainPart := domainParts[len(domainParts)-1-i]
- if !match(rulePart, domainPart) {
- continue loop
- }
- }
- matchingRules = append(matchingRules, ruleParts)
- }
- if len(matchingRules) == 0 {
- matchingRules = append(matchingRules, []string{"*"})
- } else {
- sort.Sort(byPriority(matchingRules))
- }
- prevailing := matchingRules[0]
- if prevailing[0][0] == '!' {
- prevailing = prevailing[1:]
- }
- if prevailing[0][0] == '*' {
- replaced := domainParts[len(domainParts)-len(prevailing)]
- prevailing = append([]string{replaced}, prevailing[1:]...)
- }
- return strings.Join(prevailing, ".")
-}
-
-type byPriority [][]string
-
-func (b byPriority) Len() int { return len(b) }
-func (b byPriority) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b byPriority) Less(i, j int) bool {
- if b[i][0][0] == '!' {
- return true
- }
- if b[j][0][0] == '!' {
- return false
- }
- return len(b[i]) > len(b[j])
-}
-
-// eTLDPlusOneTestCases come from
-// https://github.com/publicsuffix/list/blob/master/tests/test_psl.txt
-var eTLDPlusOneTestCases = []struct {
- domain, want string
-}{
- // Empty input.
- {"", ""},
- // Unlisted TLD.
- {"example", ""},
- {"example.example", "example.example"},
- {"b.example.example", "example.example"},
- {"a.b.example.example", "example.example"},
- // TLD with only 1 rule.
- {"biz", ""},
- {"domain.biz", "domain.biz"},
- {"b.domain.biz", "domain.biz"},
- {"a.b.domain.biz", "domain.biz"},
- // TLD with some 2-level rules.
- {"com", ""},
- {"example.com", "example.com"},
- {"b.example.com", "example.com"},
- {"a.b.example.com", "example.com"},
- {"uk.com", ""},
- {"example.uk.com", "example.uk.com"},
- {"b.example.uk.com", "example.uk.com"},
- {"a.b.example.uk.com", "example.uk.com"},
- {"test.ac", "test.ac"},
- // TLD with only 1 (wildcard) rule.
- {"mm", ""},
- {"c.mm", ""},
- {"b.c.mm", "b.c.mm"},
- {"a.b.c.mm", "b.c.mm"},
- // More complex TLD.
- {"jp", ""},
- {"test.jp", "test.jp"},
- {"www.test.jp", "test.jp"},
- {"ac.jp", ""},
- {"test.ac.jp", "test.ac.jp"},
- {"www.test.ac.jp", "test.ac.jp"},
- {"kyoto.jp", ""},
- {"test.kyoto.jp", "test.kyoto.jp"},
- {"ide.kyoto.jp", ""},
- {"b.ide.kyoto.jp", "b.ide.kyoto.jp"},
- {"a.b.ide.kyoto.jp", "b.ide.kyoto.jp"},
- {"c.kobe.jp", ""},
- {"b.c.kobe.jp", "b.c.kobe.jp"},
- {"a.b.c.kobe.jp", "b.c.kobe.jp"},
- {"city.kobe.jp", "city.kobe.jp"},
- {"www.city.kobe.jp", "city.kobe.jp"},
- // TLD with a wildcard rule and exceptions.
- {"ck", ""},
- {"test.ck", ""},
- {"b.test.ck", "b.test.ck"},
- {"a.b.test.ck", "b.test.ck"},
- {"www.ck", "www.ck"},
- {"www.www.ck", "www.ck"},
- // US K12.
- {"us", ""},
- {"test.us", "test.us"},
- {"www.test.us", "test.us"},
- {"ak.us", ""},
- {"test.ak.us", "test.ak.us"},
- {"www.test.ak.us", "test.ak.us"},
- {"k12.ak.us", ""},
- {"test.k12.ak.us", "test.k12.ak.us"},
- {"www.test.k12.ak.us", "test.k12.ak.us"},
- // Punycoded IDN labels
- {"xn--85x722f.com.cn", "xn--85x722f.com.cn"},
- {"xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"},
- {"www.xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"},
- {"shishi.xn--55qx5d.cn", "shishi.xn--55qx5d.cn"},
- {"xn--55qx5d.cn", ""},
- {"xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"},
- {"www.xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"},
- {"shishi.xn--fiqs8s", "shishi.xn--fiqs8s"},
- {"xn--fiqs8s", ""},
-}
-
-func TestEffectiveTLDPlusOne(t *testing.T) {
- for _, tc := range eTLDPlusOneTestCases {
- got, _ := EffectiveTLDPlusOne(tc.domain)
- if got != tc.want {
- t.Errorf("%q: got %q, want %q", tc.domain, got, tc.want)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table.go
deleted file mode 100644
index 549511c88..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table.go
+++ /dev/null
@@ -1,9419 +0,0 @@
-// generated by go run gen.go; DO NOT EDIT
-
-package publicsuffix
-
-const version = "publicsuffix.org's public_suffix_list.dat, git revision 38b238d6324042f2c2e6270459d1f4ccfe789fba (2017-08-28T20:09:01Z)"
-
-const (
- nodesBitsChildren = 10
- nodesBitsICANN = 1
- nodesBitsTextOffset = 15
- nodesBitsTextLength = 6
-
- childrenBitsWildcard = 1
- childrenBitsNodeType = 2
- childrenBitsHi = 14
- childrenBitsLo = 14
-)
-
-const (
- nodeTypeNormal = 0
- nodeTypeException = 1
- nodeTypeParentOnly = 2
-)
-
-// numTLD is the number of top level domains.
-const numTLD = 1557
-
-// Text is the combined text of all labels.
-const text = "bifukagawalterbihorologyukuhashimoichinosekigaharaxastronomy-gat" +
- "ewaybomloans3-ca-central-1bikedagestangeorgeorgiabilbaogakihokum" +
- "akogengerdalces3-website-us-west-1billustrationikinuyamashinashi" +
- "kitchenikkoebenhavnikolaevents3-website-us-west-2bioddabirdartce" +
- "nterprisesakikugawarszawashingtondclkariyameldalindesnesakurainv" +
- "estmentsakyotanabellunord-odalivornomutashinainzais-a-candidateb" +
- "irkenesoddtangenovaraumalopolskanlandrayddnsfreebox-oslocus-3bir" +
- "thplacebitballooningladefinimakanegasakindlegokasells-for-lessal" +
- "angenikonantankarlsoyurihonjoyentattoolsztynsettlersalondonetska" +
- "rmoyusuharabjarkoyusuisserveexchangebjerkreimbalsfjordgcahcesuol" +
- "ocalhostrodawaraugustowadaegubalsanagochihayaakasakawaharanzanne" +
- "frankfurtarumizusawabkhaziamallamagazineat-url-o-g-i-naturalhist" +
- "orymuseumcentereviewskrakowebredirectmeteorappaleobihirosakikami" +
- "jimabogadocscbgdyniabruzzoologicalvinklein-addrammenuernberggfar" +
- "merseinebinagisochildrensgardenaturalsciencesnaturelles3-ap-nort" +
- "heast-2ixboxenapponazure-mobileastcoastaldefenceatonsberg12000em" +
- "mafanconagawakayamadridvagsoyericssonyoursidealerimo-i-ranaamesj" +
- "evuemielno-ip6bjugninohekinannestadraydnsaltdalombardiamondsalva" +
- "dordalibabalatinord-frontierblockbustermezjavald-aostaplesalzbur" +
- "glassassinationalheritagematsubarakawagoebloombergbauerninomiyak" +
- "onojosoyrorosamegawabloxcmsamnangerbluedancebmoattachmentsamsclu" +
- "bindalombardynamisches-dnsamsungleezebmsandvikcoromantovalle-d-a" +
- "ostathellebmwedeployuufcfanirasakis-a-catererbnpparibaselburgliw" +
- "icebnrwegroweibolzanorddalomzaporizhzheguris-a-celticsfanishiaza" +
- "is-a-chefarmsteadrivelandrobaknoluoktachikawalbrzycharternidrudu" +
- "nsanfranciscofreakunedre-eikerbonnishigoppdalorenskoglobalashovh" +
- "achinohedmarkarpaczeladzlglobodoes-itvedestrandupontariobookingl" +
- "ogoweirboomladbrokesangobootsanjournalismailillesandefjordurbana" +
- "mexnetlifyis-a-conservativefsnillfjordurhamburgloppenzaogashimad" +
- "achicagoboatsannanishiharaboschaefflerdalotenkawabostikaruizawab" +
- "ostonakijinsekikogentingmbhartiffanyuzawabotanicalgardenishiizun" +
- "azukis-a-cpadualstackspace-to-rentalstomakomaibarabotanicgardeni" +
- "shikatakayamatta-varjjataxihuanishikatsuragit-repostfoldnavybota" +
- "nybouncemerckmsdnipropetrovskjervoyagebounty-fullensakerryproper" +
- "tiesannohelplfinancialotteboutiquebecngminakamichiharabozentsuji" +
- "iebplacedekagaminordkappgafanpachigasakievennodesashibetsukumiya" +
- "mazonawsaarlandyndns-at-workinggroupalmspringsakerbrandywinevall" +
- "eybrasiliabresciabrindisibenikebristoloseyouripirangapartmentsan" +
- "okarumaifarsundyndns-blogdnsantabarbarabritishcolumbialowiezachp" +
- "omorskienishikawazukamitsuebroadcastlefrakkestadyndns-freeboxost" +
- "rowwlkpmgmodenakatombetsumitakagiizebroadwaybroke-itgorybrokerbr" +
- "onnoysundyndns-homednsantacruzsantafedjeffersonishimerabrotherme" +
- "saverdeatnurembergmxfinitybrowsersafetymarketsanukis-a-cubicle-s" +
- "lavellinotteroybrumunddalottokonamegatakasugais-a-democratjeldsu" +
- "ndyndns-ipamperedchefashionishinomiyashironobrunelasticbeanstalk" +
- "asaokaminoyamaxunusualpersonishinoomotegobrusselsaotomeloyalistj" +
- "ordalshalsenishinoshimattelefonicarbonia-iglesias-carboniaiglesi" +
- "ascarboniabruxellesapodlasiellaktyubinskiptveterinairealtorlandy" +
- "ndns-mailouvrehabmerbryanskleppanamabrynewjerseybuskerudinewport" +
- "lligatjmaxxxjaworznowtv-infoodnetworkshoppingrimstadyndns-office" +
- "-on-the-webcambulancebuzenishiokoppegardyndns-picsapporobuzzpana" +
- "sonicateringebugattipschlesischesardegnamsskoganeis-a-designerim" +
- "arumorimachidabwfastlylbaltimore-og-romsdalillyokozehimejibigawa" +
- "ukraanghkeymachinewhampshirebungoonord-aurdalpha-myqnapcloudacce" +
- "sscambridgestonemurorangeiseiyoichippubetsubetsugaruhrhcloudns3-" +
- "eu-central-1bzhitomirumalselvendrellowiczest-le-patronishitosash" +
- "imizunaminamiashigaracompute-1computerhistoryofscience-fictionco" +
- "msecuritytacticsaseboknowsitallvivano-frankivskasuyanagawacondos" +
- "hichinohealth-carereformitakeharaconferenceconstructionconsulado" +
- "esntexistanbullensvanguardyndns-workisboringrueconsultanthropolo" +
- "gyconsultingvollcontactoyonocontemporaryarteducationalchikugodoh" +
- "aruovatoyookannamifunecontractorskenconventureshinodearthdfcbank" +
- "aszubycookingchannelsdvrdnsdojoetsuwanouchikujogaszczytnordreisa" +
- "-geekatowicecoolkuszkolahppiacenzaganquannakadomarineustarhubsas" +
- "katchewancooperaunitemp-dnsassaris-a-gurulsandoycopenhagencyclop" +
- "edichernihivanovodkagoshimalvikashibatakashimaseratis-a-financia" +
- "ladvisor-aurdalucaniacorsicagliaridagawashtenawdev-myqnapcloudap" +
- "plebtimnetzwhoswhokksundyndns1corvettenrightathomeftparliamentoy" +
- "osatoyakokonoecosenzakopanerairguardiann-arboretumbriacosidnsfor" +
- "-better-thanawatchesatxn--12c1fe0bradescorporationcostumedio-cam" +
- "pidano-mediocampidanomediocouchpotatofriesaudacouncilcouponsauhe" +
- "radynnsavannahgacoursesaves-the-whalessandria-trani-barletta-and" +
- "riatranibarlettaandriacqhachiojiyahoooshikamaishimodatecranbrook" +
- "uwanalyticsavonaplesaxocreditcardynulvikatsushikabeeldengeluidyn" +
- "v6creditunioncremonashgabadaddjambylcrewiiheyakagecricketrzyncri" +
- "meast-kazakhstanangercrotonexus-2crownprovidercrsvparmacruisesbs" +
- "chokoladencryptonomichigangwoncuisinellair-traffic-controlleycul" +
- "turalcentertainmentoyotaris-a-hard-workercuneocupcakecxn--12cfi8" +
- "ixb8lcyberlevagangaviikanonjis-a-huntercymrussiacyonabarunzencyo" +
- "utheworkpccwildlifedorainfracloudcontrolledogawarabikomaezakirun" +
- "orfolkebibleikangerfidonnakaniikawatanagurafieldfiguerestauranto" +
- "yotsukaidownloadfilateliafilegearfilminamiechizenfinalfinancefin" +
- "eartscientistockholmestrandfinlandfinnoyfirebaseapparscjohnsonfi" +
- "renzefirestonefirmdaleirvikatsuyamasfjordenfishingolffanscotland" +
- "fitjarfitnessettlementoyourafjalerflesbergulenflickragerotikakeg" +
- "awaflightscrapper-siteflirflogintogurafloraflorencefloridavvesii" +
- "dazaifudaigojomedizinhistorischescrappingunmarburguovdageaidnusl" +
- "ivinghistoryfloripaderbornfloristanohatakahamangyshlakasamatsudo" +
- "ntexisteingeekaufenflorogerserveftpartis-a-landscaperflowerserve" +
- "game-serversicherungushikamifuranortonflynnhostingxn--1ck2e1bamb" +
- "leclercasadelamonedatingjerstadotsuruokakudamatsuemrflynnhubanan" +
- "arepublicaseihichisobetsuitainairforcechirealmetlifeinsuranceu-1" +
- "fndfor-ourfor-someethnologyfor-theaterforexrothachirogatakahatak" +
- "aishimogosenforgotdnservehalflifestyleforli-cesena-forlicesenafo" +
- "rlikescandynamic-dnservehttpartnerservehumourforsaleitungsenfors" +
- "andasuolodingenfortmissoulancashireggio-calabriafortworthadanose" +
- "gawaforuminamifuranofosneserveirchernovtsykkylvenetogakushimotog" +
- "anewyorkshirecipesaro-urbino-pesarourbinopesaromasvuotnaharimamu" +
- "rogawassamukawataricohdatsunanjoburgriwataraidyndns-remotewdyndn" +
- "s-serverdaluccapitalonewspaperfotaruis-a-lawyerfoxfordebianfredr" +
- "ikstadtvserveminecraftoystre-slidrettozawafreeddnsgeekgalaxyfree" +
- "masonryfreesitexascolipicenogiftservemp3freetlservep2partservepi" +
- "cservequakefreiburgfreightcminamiiselectozsdeloittevadsoccertifi" +
- "cationfresenius-4fribourgfriuli-v-giuliafriuli-ve-giuliafriuli-v" +
- "egiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiuliafr" +
- "iuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giuliafri" +
- "uliveneziagiuliafriulivgiuliafrlfroganservesarcasmatartanddesign" +
- "frognfrolandfrom-akrehamnfrom-alfrom-arfrom-azfrom-capebretonami" +
- "astalowa-wolayangroupartyfrom-coguchikuzenfrom-ctrani-andria-bar" +
- "letta-trani-andriafrom-dchirurgiens-dentistes-en-francefrom-dedy" +
- "n-ip24from-flanderservicesettsurgeonshalloffamemergencyachtsevas" +
- "topolefrom-gausdalfrom-higashiagatsumagoizumizakirkenesevenassis" +
- "icilyfrom-iafrom-idfrom-ilfrom-incheonfrom-ksewilliamhillfrom-ky" +
- "owariasahikawafrom-lancasterfrom-maniwakuratextileksvikautokeino" +
- "from-mdfrom-megurokunohealthcareersharis-a-liberalfrom-microsoft" +
- "bankazofrom-mnfrom-modellingfrom-msharpasadenamsosnowiechiryukyu" +
- "ragifuchungbukharafrom-mtnfrom-nchitachinakagawatchandclockashih" +
- "arafrom-ndfrom-nefrom-nhktraniandriabarlettatraniandriafrom-njcb" +
- "nlfrom-nminamiizukamishihoronobeauxartsandcraftshawaiijimarugame" +
- "-hostrolekamikitayamatsuris-a-libertarianfrom-nvalled-aostatoilf" +
- "rom-nyfrom-ohkurafrom-oketohmannorth-kazakhstanfrom-orfrom-padov" +
- "aksdalfrom-pratohnoshooguyfrom-rivnefrom-schoenbrunnfrom-sdfrom-" +
- "tnfrom-txn--1ctwolominamatakkokamiokamiminershellaspeziafrom-uta" +
- "zuerichardlillehammerfeste-ipassagenshimojis-a-linux-useranishia" +
- "ritabashijonawatefrom-val-daostavalleyfrom-vtranoyfrom-wafrom-wi" +
- "elunnerfrom-wvalledaostavangerfrom-wyfrosinonefrostalbanshimokaw" +
- "afroyahikobeardubaiduckdnshimokitayamafstavernfujiiderafujikawag" +
- "uchikonefujiminohtawaramotoineppubolognakanotoddenfujinomiyadafu" +
- "jiokayamansionshimonitayanagithubusercontentransportransurlfujis" +
- "atoshonairtelecitychyattorneyagawakuyabukidsmynasushiobaragusart" +
- "shimonosekikawafujisawafujishiroishidakabiratoridefenseljordfuji" +
- "tsurugashimaritimekeepingfujixeroxn--1lqs03nfujiyoshidafukayabea" +
- "tshimosuwalkis-a-llamarylandfukuchiyamadafukudominichitosetogits" +
- "uldalucernefukuis-a-musicianfukumitsubishigakirovogradoyfukuokaz" +
- "akiryuohadselfipassenger-associationfukuroishikarikaturindalfuku" +
- "sakisarazurewebsiteshikagamiishibukawafukuyamagatakaharufunabash" +
- "iriuchinadafunagatakahashimamakishiwadafunahashikamiamakusatsuma" +
- "sendaisennangonohejis-a-nascarfanfundaciofuoiskujukuriyamanxn--1" +
- "lqs71dfuosskoczowinbarcelonagasakikonaikawachinaganoharamcoacham" +
- "pionshiphoptobishimaizurugbydgoszczecinemakeupowiathletajimabari" +
- "akembuchikumagayagawakkanaibetsubamericanfamilydscloudcontrolapp" +
- "spotagerfurnitureggio-emilia-romagnakasatsunairtrafficplexus-1fu" +
- "rubiraquarellebesbyenglandfurudonostiaarpaviancarrierfurukawais-" +
- "a-nurservebbshimotsukefusodegaurafussagamiharafutabayamaguchinom" +
- "igawafutboldlygoingnowhere-for-moregontrailroadfuttsurugimperiaf" +
- "uturecmshimotsumafuturehostingfuturemailingfvgfylkesbiblackfrida" +
- "yfyresdalhangglidinghangoutsystemscloudfunctionshinichinanhannan" +
- "mokuizumodernhannotaireshinjournalisteinkjerusalembroideryhanyuz" +
- "enhapmirhareidsbergenharstadharvestcelebrationhasamarcheapgfoggi" +
- "ahasaminami-alpssells-itrapaniimimatakatoris-a-playerhashbanghas" +
- "udahasura-appharmacienshinjukumanohasvikazunohatogayaitakamoriok" +
- "aluganskolevangerhatoyamazakitahiroshimarnardalhatsukaichikaisei" +
- "s-a-republicancerresearchaeologicaliforniahattfjelldalhayashimam" +
- "otobungotakadapliernewmexicodyn-vpnplusterhazuminobusellsyourhom" +
- "egoodshinkamigotoyohashimotoshimahboehringerikehelsinkitakamiizu" +
- "misanofidelityhembygdsforbundhemneshinshinotsurgeryhemsedalhepfo" +
- "rgeherokussldheroyhgtvallee-aosteroyhigashichichibunkyonanaoshim" +
- "ageandsoundandvisionhigashihiroshimanehigashiizumozakitakatakana" +
- "beautysfjordhigashikagawahigashikagurasoedahigashikawakitaaikita" +
- "kyushuaiahigashikurumeiwamarriottravelchannelhigashimatsushimars" +
- "hallstatebankddielddanuorrikuzentakataiwanairlinebraskaunjargals" +
- "aceohigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycle" +
- "shinshirohigashinarusembokukitamidoris-a-rockstarachowicehigashi" +
- "nehigashiomihachimanchesterhigashiosakasayamanakakogawahigashish" +
- "irakawamatakanezawahigashisumiyoshikawaminamiaikitamotosumy-rout" +
- "erhigashitsunotogawahigashiurausukitanakagusukumoduminamiminowah" +
- "igashiyamatokoriyamanashifteditchyouripharmacyshintokushimahigas" +
- "hiyodogawahigashiyoshinogaris-a-socialistmein-vigorgehiraizumisa" +
- "tohobby-sitehirakatashinagawahiranais-a-soxfanhirarahiratsukagaw" +
- "ahirayaizuwakamatsubushikusakadogawahistorichouseshintomikasahar" +
- "ahitachiomiyagildeskaliszhitachiotagooglecodespotravelersinsuran" +
- "cehitraeumtgeradellogliastradinghjartdalhjelmelandholeckobierzyc" +
- "eholidayhomeiphdhomelinkfhappouhomelinuxn--1qqw23ahomeofficehome" +
- "securitymaceratakaokamakurazakitashiobarahomesecuritypchloehomes" +
- "enseminehomeunixn--2m4a15ehondahoneywellbeingzonehongopocznorthw" +
- "esternmutualhonjyoitakarazukameokameyamatotakadahornindalhorseou" +
- "lminamiogunicomcastresistancehortendofinternet-dnshinyoshitomiok" +
- "amogawahospitalhoteleshiojirishirifujiedahotmailhoyangerhoylande" +
- "troitskydivinghumanitieshioyanaizuhurdalhurumajis-a-studentalhyl" +
- "lestadhyogoris-a-teacherkassymantechnologyhyugawarahyundaiwafune" +
- "hzchocolatemasekashiwarajewishartgalleryjfkharkovalleeaosteigenj" +
- "gorajlcube-serverrankoshigayakumoldelmenhorstagejlljmphilipsynol" +
- "ogy-diskstationjnjcphilatelyjoyokaichibahccavuotnagareyamalborkd" +
- "alwaysdatabaseballangenoamishirasatochigiessensiositelemarkherso" +
- "njpmorganjpnjprshiraokananporovigotpantheonsitejuniperjurkoshuna" +
- "ntokigawakosugekotohiradomainshiratakahagitlaborkotourakouhokuta" +
- "makis-an-artistcgrouphiladelphiaareadmyblogsitekounosupplieshish" +
- "ikuis-an-engineeringkouyamashikokuchuokouzushimasoykozagawakozak" +
- "is-an-entertainerkozowindmillkpnkppspdnshisognekrasnodarkredston" +
- "ekristiansandcatshisuifuelblagdenesnaaseralingenkainanaejrietisa" +
- "latinabenonichoshibuyachiyodavvenjargaulardalutskasukabedzin-the" +
- "-bandaioiraseeklogest-mon-blogueurovisionisshingugekristiansundk" +
- "rodsheradkrokstadelvaldaostarnbergkryminamisanrikubetsupportrent" +
- "ino-alto-adigekumatorinokumejimasudakumenanyokkaichiropractichoy" +
- "odobashichikashukujitawarakunisakis-bykunitachiarailwaykunitomig" +
- "usukumamotoyamassa-carrara-massacarraramassabusinessebyklegalloc" +
- "alhistoryggeelvinckhmelnytskyivanylvenicekunneppulawykunstsammlu" +
- "ngkunstunddesignkuokgrouphoenixn--30rr7ykureggioemiliaromagnakay" +
- "amatsumaebashikshacknetrentino-altoadigekurgankurobelaudiblebork" +
- "angerkurogimilanokuroisoftwarendalenugkuromatsunais-certifieduca" +
- "torahimeshimamateramochizukirakurotakikawasakis-foundationkushir" +
- "ogawakustanais-gonekusupplykutchanelkutnokuzumakis-into-animelbo" +
- "urnekvafjordkvalsundkvamlidlugolekafjordkvanangenkvinesdalkvinnh" +
- "eradkviteseidskogkvitsoykwpspiegelkzmisugitokorozawamitourismola" +
- "ngevagrarchaeologyeongbuknx-serveronakatsugawamitoyoakemiuramiya" +
- "zumiyotamanomjondalenmlbfanmonstermonticellolmontrealestatefarme" +
- "quipmentrentino-s-tirollagrigentomologyeonggiehtavuoatnagaivuotn" +
- "agaokakyotambabia-goracleaningatlantabusebastopologyeongnamegawa" +
- "keisenbahnmonza-brianzaporizhzhiamonza-e-della-brianzapposhitara" +
- "mamonzabrianzaptokuyamatsusakahoginankokubunjis-leetnedalmonzaeb" +
- "rianzaramonzaedellabrianzamoonscalezajskolobrzegersundmoparachut" +
- "ingmordoviajessheiminamitanemoriyamatsushigemoriyoshimilitarymor" +
- "monmouthagakhanamigawamoroyamatsuuramortgagemoscowindowshizukuis" +
- "himofusaintlouis-a-bruinsfanmoseushistorymosjoenmoskeneshizuokan" +
- "azawamosshoujis-lostre-toteneis-an-accountantshirahamatonbetsurn" +
- "adalmosvikomaganemoteginowaniihamatamakawajimaoris-not-certified" +
- "unetbankhakassiamoviemovistargardmtpchristiansburgrondarmtranbym" +
- "uenstermuginozawaonsenmuikamisunagawamukochikushinonsenergymulho" +
- "uservebeermunakatanemuncieszynmuosattemuphonefosshowamurmanskoma" +
- "kiyosunndalmurotorcraftrentino-stirolmusashimurayamatsuzakis-sav" +
- "edmusashinoharamuseetrentino-sud-tirolmuseumverenigingmusicargod" +
- "addynaliascoli-picenogataijis-slickharkivgucciprianiigataishinom" +
- "akinderoymutsuzawamy-vigorlicemy-wanggouvicenzamyactivedirectory" +
- "myasustor-elvdalmycdn77-securecifedexhibitionmyddnskingmydissent" +
- "rentino-sudtirolmydrobofagemydshowtimemorialmyeffectrentino-sued" +
- "-tirolmyfirewallonieruchomoscienceandindustrynmyfritzmyftpaccess" +
- "hriramsterdamnserverbaniamyfusionmyhome-serversaillesienarashino" +
- "mykolaivaolbia-tempio-olbiatempioolbialystokkepnoduminamiuonumat" +
- "sumotofukemymailermymediapchristmasakimobetsuliguriamyokohamamat" +
- "sudamypephotographysiomypetsigdalmyphotoshibajddarchitecturealty" +
- "dalipaymypsxn--32vp30hagebostadmysecuritycamerakermyshopblocksil" +
- "komatsushimashikizunokunimihoboleslawiechonanbuilderschmidtre-ga" +
- "uldalukowhalingroks-thisayamanobeokalmykiamytis-a-bloggermytulea" +
- "piagetmyipictetrentino-suedtirolmyvnchromedicaltanissettairamywi" +
- "reitrentinoa-adigepinkomforbarclays3-us-east-2pioneerpippupictur" +
- "esimple-urlpiszpittsburghofauskedsmokorsetagayasells-for-usgarde" +
- "npiwatepixolinopizzapkommunalforbundplanetariuminamiyamashirokaw" +
- "anabelembetsukubanklabudhabikinokawabarthaebaruminamimakis-a-pai" +
- "nteractivegarsheis-a-patsfanplantationplantslingplatformshangril" +
- "anslupskommuneplaystationplazaplchryslerplumbingopmnpodzonepohlp" +
- "oivronpokerpokrovskomonopolitiendapolkowicepoltavalle-aostarostw" +
- "odzislawinnersnoasaitamatsukuris-uberleetrdpomorzeszowiosokaneya" +
- "mazoepordenonepornporsangerporsanguidell-ogliastraderporsgrunnan" +
- "poznanpraxis-a-bookkeeperugiaprdpreservationpresidioprgmrprimelh" +
- "uscultureisenprincipeprivatizehealthinsuranceprochowiceproductio" +
- "nsokndalprofbsbxn--12co0c3b4evalleaostaticschuleprogressivegasia" +
- "promombetsurfbx-oschwarzgwangjuifminamidaitomangotsukisofukushim" +
- "aparocherkasyno-dschweizpropertyprotectionprotonetrentinoaadigep" +
- "rudentialpruszkowitdkomorotsukamisatokamachintaifun-dnsaliasdabu" +
- "rprzeworskogptplusdecorativeartsolarssonpvtrentinoalto-adigepwch" +
- "ungnamdalseidfjordyndns-weberlincolniyodogawapzqldqponqslgbtrent" +
- "inoaltoadigequicksytesolognequipelementsolundbeckomvuxn--2scrj9c" +
- "hoseiroumuenchenissandnessjoenissayokoshibahikariwanumatakazakis" +
- "-a-greenissedaluroyqvchurchaseljeepsongdalenviknagatorodoystufft" +
- "oread-booksnesomnaritakurashikis-very-badajozorastuttgartrentino" +
- "sudtirolsusakis-very-evillagesusonosuzakaniepcesuzukanmakiwakuni" +
- "gamidsundsuzukis-very-goodhandsonsvalbardunloppacificirclegnicaf" +
- "ederationsveiosvelvikongsvingersvizzerasvn-reposooswedenswidnica" +
- "rtierswiebodzindianapolis-a-anarchistoireggiocalabriaswiftcovers" +
- "winoujscienceandhistoryswisshikis-very-nicesynology-dsopotrentin" +
- "os-tirolturystykanoyaltakasakiwientuscanytushuissier-justicetuva" +
- "lle-daostatic-accessorreisahayakawakamiichikawamisatotaltuxfamil" +
- "ytwmailvbargainstitutelevisionaustdalimanowarudaustevollavangena" +
- "turbruksgymnaturhistorisches3-eu-west-1venneslaskerrylogisticsor" +
- "tlandvestfoldvestnesoruminanovestre-slidreamhostersouthcarolinaz" +
- "awavestre-totennishiawakuravestvagoyvevelstadvibo-valentiavibova" +
- "lentiavideovillaskimitsubatamicable-modemoneyvinnicartoonartdeco" +
- "ffeedbackplaneapplinzis-very-sweetpeppervinnytsiavipsinaappilots" +
- "irdalvirginiavirtualvirtueeldomeindianmarketingvirtuelvisakataki" +
- "nouevistaprinternationalfirearmsouthwestfalenviterboltrevisohugh" +
- "esor-odalvivoldavixn--3bst00mincommbankmpspbarclaycards3-sa-east" +
- "-1vlaanderenvladikavkazimierz-dolnyvladimirvlogoipimientaketomis" +
- "atolgavolkswagentsowavologdanskonskowolawavolvolkenkundenvolyngd" +
- "alvossevangenvotevotingvotoyonakagyokutourspjelkavikongsbergwloc" +
- "lawekonsulatrobeepilepsydneywmflabspreadbettingworldworse-thanda" +
- "wowithgoogleapisa-hockeynutsiracusakakinokiawpdevcloudwritesthis" +
- "blogsytewroclawithyoutubeneventoeidsvollwtcircustomerwtfbxoscien" +
- "cecentersciencehistorywuozuwwwiwatsukiyonowruzhgorodeowzmiuwajim" +
- "axn--42c2d9axn--45br5cylxn--45brj9citadeliveryxn--45q11citicatho" +
- "licheltenham-radio-opencraftrainingripescaravantaaxn--4gbriminin" +
- "gxn--4it168dxn--4it797kooris-an-actorxn--4pvxs4allxn--54b7fta0cc" +
- "ivilaviationxn--55qw42gxn--55qx5dxn--5js045dxn--5rtp49civilisati" +
- "onxn--5rtq34kopervikhmelnitskiyamashikexn--5su34j936bgsgxn--5tzm" +
- "5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264civili" +
- "zationxn--80adxhkspydebergxn--80ao21axn--80aqecdr1axn--80asehdba" +
- "rreauctionaval-d-aosta-valleyolasiteu-2xn--80aswgxn--80audnedaln" +
- "xn--8ltr62koryokamikawanehonbetsurutaharaxn--8pvr4uxn--8y0a063ax" +
- "n--90a3academy-firewall-gatewayxn--90aeroportalaheadjudaicaaarbo" +
- "rteaches-yogasawaracingroks-theatreexn--90aishobaraomoriguchihar" +
- "ahkkeravjuedischesapeakebayernrtritonxn--90azhytomyrxn--9dbhblg6" +
- "dietcimdbarrel-of-knowledgemologicallimitediscountysvardolls3-us" +
- "-gov-west-1xn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aropor" +
- "t-byandexn--3ds443gxn--asky-iraxn--aurskog-hland-jnbarrell-of-kn" +
- "owledgeologyombondiscoveryomitanobninskarasjohkaminokawanishiaiz" +
- "ubangeu-3utilitiesquare7xn--avery-yuasakegawaxn--b-5gaxn--b4w605" +
- "ferdxn--bck1b9a5dre4civilwarmanagementjxn--0trq7p7nnxn--bdddj-mr" +
- "abdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--bhccav" +
- "uotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fyaotsu" +
- "rreyxn--bjddar-ptamayufuettertdasnetzxn--blt-elabourxn--bmlo-gra" +
- "ingerxn--bod-2naroyxn--brnny-wuaccident-investigation-aptiblease" +
- "ating-organicbcn-north-1xn--brnnysund-m8accident-prevention-webh" +
- "openairbusantiquest-a-la-maisondre-landebudapest-a-la-masionionj" +
- "ukudoyamagentositelekommunikationthewifiat-band-campaniaxn--brum" +
- "-voagatroandinosaurepbodynathomebuiltrentinosued-tirolxn--btsfjo" +
- "rd-9zaxn--c1avgxn--c2br7gxn--c3s14minnesotaketakatsukis-into-car" +
- "shiranukanagawaxn--cck2b3barsyonlinewhollandishakotanavigationav" +
- "oibmdisrechtranakaiwamizawaweddingjesdalimoliserniaustinnatuurwe" +
- "tenschappenaumburgjerdrumckinseyokosukanzakiyokawaragrocerybnika" +
- "hokutobamaintenancebetsuikicks-assedic66xn--cg4bkis-with-theband" +
- "ovre-eikerxn--ciqpnxn--clchc0ea0b2g2a9gcdn77-sslattumintelligenc" +
- "exn--comunicaes-v6a2oxn--correios-e-telecomunicaes-ghc29axn--czr" +
- "694bashkiriaustraliaisondriodejaneirochesterxn--czrs0trogstadxn-" +
- "-czru2dxn--czrw28basilicataniaustrheimatunduhrennesoyokotebinore" +
- "-og-uvdalaziobiraskvolloabathsbcasacamdvrcampobassociatestingjem" +
- "nes3-ap-southeast-1xn--d1acj3basketballyngenavuotnaklodzkodairau" +
- "thordalandroiddnss3-eu-west-2xn--d1alfaromeoxn--d1atromsaitomobe" +
- "llevuelosangelesjaguarmeniaxn--d5qv7z876claimsardiniaxn--davvenj" +
- "rga-y4axn--djrs72d6uyxn--djty4kosaigawaxn--dnna-grajewolterskluw" +
- "erxn--drbak-wuaxn--dyry-iraxn--e1a4clanbibaidarq-axn--eckvdtc9dx" +
- "n--efvn9srlxn--efvy88haibarakisosakitagawaxn--ehqz56nxn--elqq16h" +
- "air-surveillancexn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct42" +
- "9kosakaerodromegallupinbarefootballfinanzgoraurskog-holandroverh" +
- "alla-speziaetnagahamaroygardenebakkeshibechambagriculturennebude" +
- "jjudygarlandd-dnshome-webservercellikes-piedmontblancomeeres3-ap" +
- "-south-1kappchizippodhaleangaviikadenadexetereport3l3p0rtargets-" +
- "itargivestbytomaritimobaravennagasuke12hpalace164lima-cityeatsel" +
- "inogradultarnobrzegyptianativeamericanantiques3-ap-northeast-133" +
- "7xn--fhbeiarnxn--finny-yuaxn--fiq228c5hsrtrentinostirolxn--fiq64" +
- "batodayonagoyautomotivecoalvdalaskanittedallasalleasinglesurance" +
- "rtmgretagajoboji234xn--fiqs8srvaporcloudxn--fiqz9storagexn--fjor" +
- "d-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--fpcrj9c3dxn" +
- "--frde-grandrapidstordalxn--frna-woaraisaijotromsojampagefrontap" +
- "piemontexn--frya-hraxn--fzc2c9e2cldmailuxembourgrongaxn--fzys8d6" +
- "9uvgmailxn--g2xx48clickasumigaurawa-mazowszextraspacekitagatajir" +
- "issagaeroclubmedecincinnationwidealstahaugesunderseaportsinfolld" +
- "alabamagasakishimabarackmazerbaijan-mayendoftheinternetflixilove" +
- "collegefantasyleaguernseyxn--gckr3f0fedorapeopleirfjordynvpncher" +
- "nivtsiciliaxn--gecrj9clinichernigovernmentjometacentruminamiawaj" +
- "ikis-a-doctorayxn--ggaviika-8ya47hakatanoshiroomuraxn--gildeskl-" +
- "g0axn--givuotna-8yasakaiminatoyonezawaxn--gjvik-wuaxn--gk3at1exn" +
- "--gls-elacaixaxn--gmq050isleofmandalxn--gmqw5axn--h-2failxn--h1a" +
- "eghakodatexn--h2breg3evenestorepaircraftrentinosud-tirolxn--h2br" +
- "j9c8cliniquenoharaxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuolo-7y" +
- "a35batsfjordivtasvuodnakamagayahababyglandivttasvuotnakamurataji" +
- "mibuildingjovikarasjokarasuyamarylhurstjohnayorovnoceanographics" +
- "3-us-west-1xn--hery-iraxn--hgebostad-g3axn--hmmrfeasta-s4acctrus" +
- "teexn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hx" +
- "t814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn" +
- "--indery-fyasugivingxn--io0a7issmarterthanyouxn--j1aefedoraproje" +
- "ctoyotomiyazakis-a-knightpointtokaizukamikoaniikappugliaxn--j1am" +
- "hakonexn--j6w193gxn--jlq61u9w7bauhausposts-and-telecommunication" +
- "sncfdiyonaguniversityoriikarateu-4xn--jlster-byasuokanraxn--jrpe" +
- "land-54axn--jvr189misakis-into-cartoonshiraois-a-techietis-a-the" +
- "rapistoiaxn--k7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kf" +
- "jord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--" +
- "3e0b707exn--koluokta-7ya57hakubaghdadxn--kprw13dxn--kpry57dxn--k" +
- "pu716fermodalenxn--kput3iwchofunatoriginsurecreationishiwakis-a-" +
- "geekashiwazakiyosatokashikiyosemitexn--krager-gyatomitamamuraxn-" +
- "-kranghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49j" +
- "elenia-goraxn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsukanumazu" +
- "ryxn--kvnangen-k0axn--l-1fairwindstorfjordxn--l1accentureklambor" +
- "ghiniizaxn--laheadju-7yatsushiroxn--langevg-jxaxn--lcvr32dxn--ld" +
- "ingen-q1axn--leagaviika-52bbcasertaipeiheijiitatebayashiibahcavu" +
- "otnagaraholtalenvironmentalconservationflfanfshostrowiecasinordl" +
- "andnpalermomahachijorpelandrangedalindashorokanaieverbankaratsug" +
- "inamikatagamiharuconnectashkentatamotors3-us-west-2xn--lesund-hu" +
- "axn--lgbbat1ad8jeonnamerikawauexn--lgrd-poaclintonoshoesarluxury" +
- "xn--lhppi-xqaxn--linds-pramericanartrvareserveblogspotrentinosue" +
- "dtirolxn--lns-qlapyatigorskypexn--loabt-0qaxn--lrdal-sraxn--lren" +
- "skog-54axn--lt-liaclothingdustkakamigaharaxn--lten-granexn--lury" +
- "-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddestorjdevclo" +
- "udfrontdoorxn--mgb9awbferraraxn--mgba3a3ejtrysiljanxn--mgba3a4f1" +
- "6axn--mgba3a4franamizuholdingsmilelverumisasaguris-into-gamessin" +
- "atsukigatakasagotembaixadaxn--mgba7c0bbn0axn--mgbaakc7dvferrarit" +
- "togoldpoint2thisamitsukexn--mgbaam7a8hakuis-a-personaltrainerxn-" +
- "-mgbab2bdxn--mgbai9a5eva00bbtatarantottoriiyamanouchikuhokuryuga" +
- "sakitaurayasudautoscanadaejeonbukaragandasnesoddenmarkhangelskja" +
- "kdnepropetrovskiervaapsteiermark12xn--mgbai9azgqp6jetztrentino-a" +
- "-adigexn--mgbayh7gpagespeedmobilizeroxn--mgbb9fbpobanazawaxn--mg" +
- "bbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgberp4a5d4a87gxn--mgbe" +
- "rp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2fhskodjejuegosh" +
- "ikiminokamoenairportland-4-salernoboribetsuckstpetersburgxn--mgb" +
- "qly7c0a67fbcnsarpsborgrossetouchijiwadegreexn--mgbqly7cvafranzis" +
- "kanerdpolicexn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2bbvacations" +
- "watch-and-clockerxn--mgbx4cd0abbottulanxessor-varangerxn--mix082" +
- "ferreroticanonoichinomiyakexn--mix891fetsundyroyrvikinguitarscho" +
- "larshipschoolxn--mjndalen-64axn--mk0axindustriesteamfamberkeleyx" +
- "n--mk1bu44cntkmaxxn--11b4c3dyndns-wikinkobayashikaoirminamibosog" +
- "ndaluzernxn--mkru45ixn--mlatvuopmi-s4axn--mli-tlaquilanciaxn--ml" +
- "selv-iuaxn--moreke-juaxn--mori-qsakuhokkaidoomdnsiskinkyotobetsu" +
- "midatlanticolognextdirectmparaglidingroundhandlingroznyxn--mosje" +
- "n-eyawaraxn--mot-tlarvikoseis-an-actresshirakofuefukihaboromskog" +
- "xn--mre-og-romsdal-qqbentleyoshiokaracoldwarmiamihamadaveroykeni" +
- "waizumiotsukuibestadds3-external-1xn--msy-ula0hakusandiegoodyear" +
- "xn--mtta-vrjjat-k7afamilycompanycolonialwilliamsburgrparisor-fro" +
- "nxn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn-" +
- "-3hcrj9cistrondheimmobilienxn--nit225kosherbrookegawaxn--nmesjev" +
- "uemie-tcbalestrandabergamoarekexn--nnx388axn--nodessakuragawaxn-" +
- "-nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery-bya" +
- "eservecounterstrikexn--nvuotna-hwaxn--nyqy26axn--o1achattanoogan" +
- "ordre-landxn--o3cw4haldenxn--o3cyx2axn--od0algxn--od0aq3beppubli" +
- "shproxyzgorzeleccollectionhlfanhs3-website-ap-northeast-1xn--ogb" +
- "pf8flekkefjordxn--oppegrd-ixaxn--ostery-fyawatahamaxn--osyro-wua" +
- "xn--p1acfgujolsterxn--p1aixn--pbt977coloradoplateaudioxn--pgbs0d" +
- "hlxn--porsgu-sta26fhvalerxn--pssu33lxn--pssy2uxn--q9jyb4columbus" +
- "heyxn--qcka1pmcdonaldstreamuneuesolutionsomaxn--qqqt11misconfuse" +
- "dxn--qxamusementunesorfoldxn--rady-iraxn--rdal-poaxn--rde-ulavag" +
- "iskexn--rdy-0nabarixn--rennesy-v1axn--rhkkervju-01aflakstadaokag" +
- "akibichuoxn--rholt-mragowoodsideltaitogliattirestudioxn--rhqv96g" +
- "xn--rht27zxn--rht3dxn--rht61exn--risa-5narusawaxn--risr-iraxn--r" +
- "land-uuaxn--rlingen-mxaxn--rmskog-byaxn--rny31halsaikitahatakama" +
- "tsukawaxn--rovu88bernuorockartuzyukinfinitintuitateshinanomachim" +
- "kentateyamavocatanzarowebspacebizenakanojohanamakinoharassnasaba" +
- "erobatickets3-ap-southeast-2xn--rros-granvindafjordxn--rskog-uua" +
- "xn--rst-0narutokyotangovtunkoninjamisonxn--rsta-francaiseharaxn-" +
- "-rvc1e0am3exn--ryken-vuaxn--ryrvik-byaxn--s-1faithruheredumbrell" +
- "ajollamericanexpressexyxn--s9brj9communitysnesarufutsunomiyawaka" +
- "saikaitakoelnxn--sandnessjen-ogbizxn--sandy-yuaxn--seral-lraxn--" +
- "ses554gxn--sgne-gratangenxn--skierv-utazaskoyabearalvahkijobserv" +
- "erisignieznoipifonymishimatsunoxn--skjervy-v1axn--skjk-soaxn--sk" +
- "nit-yqaxn--sknland-fxaxn--slat-5narviikamitondabayashiogamagoriz" +
- "iaxn--slt-elabbvieeexn--smla-hraxn--smna-gratis-a-bulls-fanxn--s" +
- "nase-nraxn--sndre-land-0cbremangerxn--snes-poaxn--snsa-roaxn--sr" +
- "-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbeski" +
- "dyn-o-saurlandes3-website-ap-southeast-1xn--srfold-byaxn--srreis" +
- "a-q1axn--srum-grazxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalse" +
- "n-sqbestbuyshouses3-website-ap-southeast-2xn--stre-toten-zcbstud" +
- "yndns-at-homedepotenzamamicrolightingxn--t60b56axn--tckweatherch" +
- "annelxn--tiq49xqyjevnakershuscountryestateofdelawarezzoologyxn--" +
- "tjme-hraxn--tn0agrinet-freakstuff-4-salexn--tnsberg-q1axn--tor13" +
- "1oxn--trany-yuaxn--trgstad-r1axn--trna-woaxn--troms-zuaxn--tysvr" +
- "-vraxn--uc0atvarggatrentoyokawaxn--uc0ay4axn--uist22hammarfeasta" +
- "fricapetownnews-stagingxn--uisz3gxn--unjrga-rtaobaokinawashirosa" +
- "tochiokinoshimalatvuopmiasakuchinotsuchiurakawalesundxn--unup4yx" +
- "n--uuwu58axn--vads-jraxn--vard-jraxn--vegrshei-c0axn--vermgensbe" +
- "rater-ctbetainaboxfusejnynysadodgeometre-experts-comptables3-web" +
- "site-eu-west-1xn--vermgensberatung-pwbieigersundray-dnsupdaterno" +
- "pilawavoues3-fips-us-gov-west-1xn--vestvgy-ixa6oxn--vg-yiabcgxn-" +
- "-vgan-qoaxn--vgsy-qoa0jewelryxn--vgu402comobilyxn--vhquvaroyxn--" +
- "vler-qoaxn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bi" +
- "elawalmartatsunoceanographiquevje-og-hornnes3-website-sa-east-1x" +
- "n--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1comparemarkerr" +
- "yhotelsasayamaxn--wgbl6axn--xhq521biellaakesvuemieleccexn--xkc2a" +
- "l3hye2axn--xkc2dl3a5ee0hamurakamigoris-a-photographerokuappfizer" +
- "xn--y9a3aquariumissilewismillerxn--yer-znarvikoshimizumakis-an-a" +
- "narchistoricalsocietyxn--yfro4i67oxn--ygarden-p1axn--ygbi2ammxn-" +
- "-3oq18vl8pn36axn--ystre-slidre-ujbieszczadygeyachimataikikuchiku" +
- "seikarugamvikareliancexn--zbx025dxn--zf0ao64axn--zf0avxn--3pxu8k" +
- "onyveloftrentino-aadigexn--zfr164bievatmallorcadaques3-website-u" +
- "s-east-1xperiaxz"
-
-// nodes is the list of nodes. Each node is represented as a uint32, which
-// encodes the node's children, wildcard bit and node type (as an index into
-// the children array), ICANN bit and text.
-//
-// If the table was generated with the -comments flag, there is a //-comment
-// after each node's data. In it is the nodes-array indexes of the children,
-// formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The
-// nodeType is printed as + for normal, ! for exception, and o for parent-only
-// nodes that have children but don't match a domain label in their own right.
-// An I denotes an ICANN domain.
-//
-// The layout within the uint32, from MSB to LSB, is:
-// [ 0 bits] unused
-// [10 bits] children index
-// [ 1 bits] ICANN bit
-// [15 bits] text index
-// [ 6 bits] text length
-var nodes = [...]uint32{
- 0x31fe83,
- 0x28e944,
- 0x2ed8c6,
- 0x380743,
- 0x380746,
- 0x3a5306,
- 0x3b5e43,
- 0x30a7c4,
- 0x20d0c7,
- 0x2ed508,
- 0x1a07102,
- 0x31f1c7,
- 0x368c09,
- 0x2d68ca,
- 0x2d68cb,
- 0x238503,
- 0x2dec46,
- 0x23d6c5,
- 0x1e07542,
- 0x21cf84,
- 0x266d03,
- 0x346145,
- 0x22035c2,
- 0x20a643,
- 0x271f944,
- 0x342285,
- 0x2a10042,
- 0x38a48e,
- 0x255083,
- 0x3affc6,
- 0x2e00142,
- 0x2d4207,
- 0x240d86,
- 0x3204f02,
- 0x22ee43,
- 0x256204,
- 0x32d106,
- 0x25b788,
- 0x2811c6,
- 0x378fc4,
- 0x3600242,
- 0x33b8c9,
- 0x212107,
- 0x2e6046,
- 0x341809,
- 0x2a0048,
- 0x33a904,
- 0x2a0f46,
- 0x21f886,
- 0x3a02d42,
- 0x3a014f,
- 0x28c84e,
- 0x21bfc4,
- 0x382c85,
- 0x30a6c5,
- 0x2e2109,
- 0x249089,
- 0x33b1c7,
- 0x23f8c6,
- 0x20ae43,
- 0x3e01d42,
- 0x2e3203,
- 0x225d0a,
- 0x20cac3,
- 0x242f85,
- 0x28e142,
- 0x28e149,
- 0x4200bc2,
- 0x209204,
- 0x28ad46,
- 0x2e5c05,
- 0x361644,
- 0x4a1a344,
- 0x203ec3,
- 0x218d04,
- 0x4e00702,
- 0x2f8e84,
- 0x52f5f04,
- 0x339bca,
- 0x5600f82,
- 0x28bc47,
- 0x281548,
- 0x6206502,
- 0x31d0c7,
- 0x2c6d44,
- 0x2c6d47,
- 0x393c45,
- 0x35e887,
- 0x33af86,
- 0x271dc4,
- 0x378385,
- 0x28ea47,
- 0x72001c2,
- 0x224143,
- 0x200c42,
- 0x200c43,
- 0x760b5c2,
- 0x20f4c5,
- 0x7a01d02,
- 0x357844,
- 0x27e405,
- 0x21bf07,
- 0x25aece,
- 0x2bf044,
- 0x23df04,
- 0x211c43,
- 0x28a4c9,
- 0x30eacb,
- 0x2ea6c8,
- 0x3415c8,
- 0x306208,
- 0x2b7288,
- 0x33a74a,
- 0x35e787,
- 0x321606,
- 0x7e8f282,
- 0x36a683,
- 0x377683,
- 0x37fd44,
- 0x3b5e83,
- 0x32c343,
- 0x1727e02,
- 0x8203302,
- 0x283f45,
- 0x29e006,
- 0x2da184,
- 0x388547,
- 0x2fa686,
- 0x389384,
- 0x3aa107,
- 0x223d43,
- 0x86cd5c2,
- 0x8a0d342,
- 0x8e1e642,
- 0x21e646,
- 0x9200002,
- 0x2501c5,
- 0x329343,
- 0x201684,
- 0x2efb04,
- 0x2efb05,
- 0x203c43,
- 0x979c783,
- 0x9a092c2,
- 0x291d85,
- 0x291d8b,
- 0x343c06,
- 0x21270b,
- 0x226544,
- 0x213a49,
- 0x2148c4,
- 0x9e14b02,
- 0x215943,
- 0x216283,
- 0x1616b42,
- 0x275fc3,
- 0x216b4a,
- 0xa201102,
- 0x21d205,
- 0x29a88a,
- 0x2e0544,
- 0x201103,
- 0x325384,
- 0x21ae03,
- 0x21ae04,
- 0x21ae07,
- 0x21b605,
- 0x21d685,
- 0x21dc46,
- 0x21dfc6,
- 0x21ea43,
- 0x222688,
- 0x206c03,
- 0xa60c702,
- 0x245848,
- 0x23614b,
- 0x228908,
- 0x228e06,
- 0x229dc7,
- 0x22da48,
- 0xb6024c2,
- 0xba430c2,
- 0x32da08,
- 0x233347,
- 0x2e7b45,
- 0x2e7b48,
- 0x2c3b08,
- 0x2be483,
- 0x232e04,
- 0x37fd82,
- 0xbe34382,
- 0xc23e102,
- 0xca37302,
- 0x237303,
- 0xce01382,
- 0x30a783,
- 0x300f44,
- 0x20a043,
- 0x322844,
- 0x20d7cb,
- 0x2322c3,
- 0x2e6a46,
- 0x245f44,
- 0x2982ce,
- 0x381245,
- 0x3b00c8,
- 0x263347,
- 0x26334a,
- 0x22e803,
- 0x317a07,
- 0x30ec85,
- 0x23a384,
- 0x272706,
- 0x272707,
- 0x330f44,
- 0x301f87,
- 0x25a184,
- 0x25b204,
- 0x25b206,
- 0x25f704,
- 0x36bdc6,
- 0x216983,
- 0x233108,
- 0x316ec8,
- 0x23dec3,
- 0x275f83,
- 0x3a6604,
- 0x3aae83,
- 0xd235f42,
- 0xd6df482,
- 0x207143,
- 0x203f86,
- 0x2a1043,
- 0x285184,
- 0xda165c2,
- 0x2165c3,
- 0x35f083,
- 0x21fe02,
- 0xde008c2,
- 0x2c9786,
- 0x23e347,
- 0x2fd645,
- 0x38fd04,
- 0x294d45,
- 0x2f8a47,
- 0x2add85,
- 0x2e4689,
- 0x2e9906,
- 0x2ef808,
- 0x2fd546,
- 0xe20e982,
- 0x2ddb08,
- 0x300d06,
- 0x219205,
- 0x316887,
- 0x316dc4,
- 0x316dc5,
- 0x281384,
- 0x345d88,
- 0xe6127c2,
- 0xea04882,
- 0x33ca06,
- 0x2cf588,
- 0x34d485,
- 0x351546,
- 0x356108,
- 0x371488,
- 0xee35dc5,
- 0xf214f44,
- 0x34e247,
- 0xf614602,
- 0xfa22902,
- 0x10e0f882,
- 0x28ae45,
- 0x2aaa45,
- 0x30af86,
- 0x350007,
- 0x386287,
- 0x11638543,
- 0x2b0307,
- 0x30e7c8,
- 0x3a0849,
- 0x38a647,
- 0x3b9c87,
- 0x238788,
- 0x238f86,
- 0x239e86,
- 0x23aacc,
- 0x23c08a,
- 0x23c407,
- 0x23d58b,
- 0x23e187,
- 0x23e18e,
- 0x19a3f304,
- 0x240244,
- 0x242547,
- 0x3ac747,
- 0x246d46,
- 0x246d47,
- 0x247407,
- 0x19e29682,
- 0x2495c6,
- 0x2495ca,
- 0x24a08b,
- 0x24ac87,
- 0x24b845,
- 0x24bb83,
- 0x24bdc6,
- 0x24bdc7,
- 0x20d283,
- 0x1a206e02,
- 0x24c78a,
- 0x1a769d02,
- 0x1aa4f282,
- 0x1ae4dd42,
- 0x1b240e82,
- 0x24e9c5,
- 0x24ef44,
- 0x1ba1a442,
- 0x2f8f05,
- 0x24a683,
- 0x2149c5,
- 0x2b7184,
- 0x205ec4,
- 0x25a486,
- 0x262586,
- 0x291f83,
- 0x204844,
- 0x3894c3,
- 0x1c204c82,
- 0x210ac4,
- 0x210ac6,
- 0x34e7c5,
- 0x37e946,
- 0x316988,
- 0x273544,
- 0x266ac8,
- 0x398785,
- 0x22bc88,
- 0x2b2dc6,
- 0x26d907,
- 0x233d84,
- 0x233d86,
- 0x242bc3,
- 0x393fc3,
- 0x211d08,
- 0x322004,
- 0x356747,
- 0x20c7c6,
- 0x2dedc9,
- 0x322a88,
- 0x325448,
- 0x331ac4,
- 0x35f103,
- 0x229942,
- 0x1d2234c2,
- 0x1d61a202,
- 0x36c083,
- 0x1da08e02,
- 0x20d204,
- 0x3521c6,
- 0x3b3745,
- 0x24fa83,
- 0x23cf44,
- 0x2b95c7,
- 0x25a783,
- 0x251208,
- 0x218405,
- 0x264143,
- 0x27e385,
- 0x27e4c4,
- 0x300a06,
- 0x218f84,
- 0x21ab86,
- 0x21be46,
- 0x210584,
- 0x23e543,
- 0x1de1a582,
- 0x23dd05,
- 0x20b9c3,
- 0x1e20c882,
- 0x23aa83,
- 0x2231c5,
- 0x23cac3,
- 0x23cac9,
- 0x1e606b82,
- 0x1ee07842,
- 0x2918c5,
- 0x2211c6,
- 0x2d9d46,
- 0x2bb248,
- 0x2bb24b,
- 0x203fcb,
- 0x220bc5,
- 0x2fd845,
- 0x2cdfc9,
- 0x1600302,
- 0x210748,
- 0x213d44,
- 0x1f601842,
- 0x326403,
- 0x1fecdd46,
- 0x348e08,
- 0x20208b42,
- 0x2bdec8,
- 0x2060c182,
- 0x2bf7ca,
- 0x20a3fd03,
- 0x203606,
- 0x36cc48,
- 0x209708,
- 0x3b3a46,
- 0x37c807,
- 0x3a0347,
- 0x34daca,
- 0x2e05c4,
- 0x354d44,
- 0x368649,
- 0x2139fb45,
- 0x28ca46,
- 0x210083,
- 0x253d44,
- 0x2160df44,
- 0x20df47,
- 0x22c507,
- 0x234404,
- 0x2df805,
- 0x30b048,
- 0x375e07,
- 0x381007,
- 0x21a07602,
- 0x32e984,
- 0x29b188,
- 0x2504c4,
- 0x251844,
- 0x251c45,
- 0x251d87,
- 0x222349,
- 0x252a04,
- 0x253149,
- 0x253388,
- 0x253ac4,
- 0x253ac7,
- 0x21e54003,
- 0x254187,
- 0x1609c42,
- 0x16b4a42,
- 0x254b86,
- 0x2550c7,
- 0x255584,
- 0x257687,
- 0x258d47,
- 0x259983,
- 0x2f6802,
- 0x207d82,
- 0x231683,
- 0x231684,
- 0x23168b,
- 0x3416c8,
- 0x263c84,
- 0x25c985,
- 0x25eb47,
- 0x260105,
- 0x2c8c0a,
- 0x263bc3,
- 0x22206b02,
- 0x206b04,
- 0x267189,
- 0x26a743,
- 0x26a807,
- 0x373089,
- 0x212508,
- 0x2db543,
- 0x282f07,
- 0x283649,
- 0x23d483,
- 0x289844,
- 0x28d209,
- 0x290146,
- 0x21c203,
- 0x200182,
- 0x264d83,
- 0x2b4847,
- 0x2c3e85,
- 0x3413c6,
- 0x259004,
- 0x374e05,
- 0x225cc3,
- 0x20e646,
- 0x213c42,
- 0x3a1784,
- 0x2260d382,
- 0x226603,
- 0x22a01802,
- 0x251743,
- 0x21e444,
- 0x21e447,
- 0x201986,
- 0x20df02,
- 0x22e0dec2,
- 0x2c4244,
- 0x23235182,
- 0x23601b82,
- 0x265704,
- 0x265705,
- 0x345105,
- 0x35c386,
- 0x23a074c2,
- 0x2074c5,
- 0x213005,
- 0x2157c3,
- 0x219d06,
- 0x21a645,
- 0x21e5c2,
- 0x34d0c5,
- 0x21e5c4,
- 0x228203,
- 0x22a443,
- 0x23e11442,
- 0x2dcf47,
- 0x376084,
- 0x376089,
- 0x253c44,
- 0x2357c3,
- 0x300589,
- 0x389e08,
- 0x242aa8c4,
- 0x2aa8c6,
- 0x219983,
- 0x25d3c3,
- 0x323043,
- 0x246eebc2,
- 0x379b82,
- 0x24a17202,
- 0x32af48,
- 0x358e08,
- 0x3a5a46,
- 0x2fd0c5,
- 0x317885,
- 0x333d07,
- 0x2247c5,
- 0x210642,
- 0x24e04742,
- 0x160a442,
- 0x2447c8,
- 0x2dda45,
- 0x2bfbc4,
- 0x2f2845,
- 0x381d87,
- 0x240944,
- 0x24c682,
- 0x25200582,
- 0x33ffc4,
- 0x21ca07,
- 0x292507,
- 0x35e844,
- 0x29a843,
- 0x23de04,
- 0x23de08,
- 0x23a1c6,
- 0x27258a,
- 0x222204,
- 0x29abc8,
- 0x290584,
- 0x229ec6,
- 0x29c484,
- 0x28b146,
- 0x376349,
- 0x274847,
- 0x241243,
- 0x256351c2,
- 0x2755c3,
- 0x214d02,
- 0x25a52e42,
- 0x313486,
- 0x374588,
- 0x2ac047,
- 0x3ab249,
- 0x299f49,
- 0x2acf05,
- 0x2adec9,
- 0x2ae685,
- 0x2ae7c9,
- 0x2afe45,
- 0x2b11c8,
- 0x25e0a104,
- 0x26259ac7,
- 0x2b13c3,
- 0x2b13c7,
- 0x3ba046,
- 0x2b1a47,
- 0x2a9b05,
- 0x2a2cc3,
- 0x26636d02,
- 0x339704,
- 0x26a42a42,
- 0x266603,
- 0x26e206c2,
- 0x30df06,
- 0x2814c5,
- 0x2b3cc7,
- 0x332043,
- 0x32c2c4,
- 0x217003,
- 0x342c43,
- 0x27205e82,
- 0x27a0c442,
- 0x3a5404,
- 0x2f67c3,
- 0x24e545,
- 0x27e01c82,
- 0x286007c2,
- 0x2c8286,
- 0x322144,
- 0x38c444,
- 0x38c44a,
- 0x28e00942,
- 0x38298a,
- 0x39b8c8,
- 0x29231604,
- 0x2046c3,
- 0x20d8c3,
- 0x306349,
- 0x25bd09,
- 0x364986,
- 0x29655783,
- 0x335d45,
- 0x30d2cd,
- 0x39ba86,
- 0x204f4b,
- 0x29a02b02,
- 0x225b48,
- 0x2be22782,
- 0x2c203e02,
- 0x2b1685,
- 0x2c604182,
- 0x266847,
- 0x21b987,
- 0x20bf43,
- 0x23b188,
- 0x2ca02542,
- 0x3780c4,
- 0x21a8c3,
- 0x348505,
- 0x364603,
- 0x33c406,
- 0x212a84,
- 0x275f43,
- 0x2b6443,
- 0x2ce09942,
- 0x2fd7c4,
- 0x379c85,
- 0x3b6587,
- 0x280003,
- 0x2b5103,
- 0x2b5c03,
- 0x1631182,
- 0x2b5cc3,
- 0x2b63c3,
- 0x2d2086c2,
- 0x3a2e44,
- 0x262786,
- 0x34ba83,
- 0x2086c3,
- 0x2d6b8042,
- 0x2b8048,
- 0x2b8304,
- 0x37ce46,
- 0x2b8bc7,
- 0x258346,
- 0x2a0304,
- 0x3b201702,
- 0x3b9f0b,
- 0x307c0e,
- 0x221d4f,
- 0x2ac5c3,
- 0x3ba64d42,
- 0x160b542,
- 0x3be00a82,
- 0x2e89c3,
- 0x2e4903,
- 0x2de046,
- 0x207986,
- 0x203007,
- 0x304704,
- 0x3c221302,
- 0x3c618742,
- 0x3a1205,
- 0x2e7007,
- 0x38c946,
- 0x3ca28142,
- 0x228144,
- 0x2bc743,
- 0x3ce09a02,
- 0x3d366443,
- 0x2bce04,
- 0x2c5409,
- 0x16cb602,
- 0x3d605242,
- 0x385d85,
- 0x3dacb882,
- 0x3de03582,
- 0x3541c7,
- 0x21b2c9,
- 0x368e8b,
- 0x3a0105,
- 0x2714c9,
- 0x384d06,
- 0x343c47,
- 0x3e206844,
- 0x341d89,
- 0x380907,
- 0x348ac7,
- 0x2122c3,
- 0x2122c6,
- 0x312247,
- 0x263a43,
- 0x263a46,
- 0x3ea01cc2,
- 0x3ee022c2,
- 0x22bf03,
- 0x32bec5,
- 0x25a007,
- 0x227906,
- 0x2c3e05,
- 0x207a84,
- 0x28ddc5,
- 0x2fae04,
- 0x3f204bc2,
- 0x337447,
- 0x2ca604,
- 0x24f3c4,
- 0x25bc0d,
- 0x25d749,
- 0x3ab748,
- 0x25e044,
- 0x234a85,
- 0x322907,
- 0x3329c4,
- 0x2fa747,
- 0x204bc5,
- 0x3f6ac504,
- 0x2b5e05,
- 0x269404,
- 0x256fc6,
- 0x34fe05,
- 0x3fa048c2,
- 0x2011c4,
- 0x2011c5,
- 0x3802c6,
- 0x206d85,
- 0x3c0144,
- 0x2cda83,
- 0x208d46,
- 0x222545,
- 0x22b605,
- 0x34ff04,
- 0x222283,
- 0x22228c,
- 0x3fe90a82,
- 0x40206702,
- 0x40600282,
- 0x211a83,
- 0x211a84,
- 0x40a02942,
- 0x2fba48,
- 0x341485,
- 0x34c984,
- 0x36ee86,
- 0x40e0d842,
- 0x41234502,
- 0x41601fc2,
- 0x2a6a85,
- 0x210446,
- 0x226144,
- 0x32d646,
- 0x28ba06,
- 0x215c83,
- 0x41b2770a,
- 0x2f6b05,
- 0x2f6fc3,
- 0x22a9c6,
- 0x30c989,
- 0x22a9c7,
- 0x29f648,
- 0x29ff09,
- 0x241b08,
- 0x22e546,
- 0x209b03,
- 0x41e0c202,
- 0x395343,
- 0x395349,
- 0x333608,
- 0x42253442,
- 0x42604a82,
- 0x229443,
- 0x2e4505,
- 0x25c404,
- 0x2c9ec9,
- 0x26eb44,
- 0x2e0908,
- 0x2050c3,
- 0x20dc44,
- 0x2acd03,
- 0x221208,
- 0x25bb47,
- 0x42e281c2,
- 0x270d02,
- 0x388b05,
- 0x272dc9,
- 0x28cac3,
- 0x284bc4,
- 0x335d04,
- 0x227543,
- 0x28580a,
- 0x43382842,
- 0x43601182,
- 0x2cd543,
- 0x384f83,
- 0x160dc02,
- 0x20ffc3,
- 0x43a14702,
- 0x43e00802,
- 0x4420f644,
- 0x20f646,
- 0x3b6a46,
- 0x248c44,
- 0x37d243,
- 0x200803,
- 0x2f60c3,
- 0x24a406,
- 0x30aa05,
- 0x2cd6c7,
- 0x343b09,
- 0x2d2d85,
- 0x2d3f46,
- 0x2d4908,
- 0x2d4b06,
- 0x260ec4,
- 0x2a1d8b,
- 0x2d8403,
- 0x2d8405,
- 0x2d8548,
- 0x22c2c2,
- 0x3544c2,
- 0x4464ea42,
- 0x44a14642,
- 0x221343,
- 0x44e745c2,
- 0x2745c3,
- 0x2d8844,
- 0x2d8e03,
- 0x45605902,
- 0x45a0c0c6,
- 0x2af186,
- 0x45edcac2,
- 0x462162c2,
- 0x4662a482,
- 0x46a00e82,
- 0x46e176c2,
- 0x47202ec2,
- 0x205383,
- 0x344905,
- 0x348206,
- 0x4761bf84,
- 0x34e5ca,
- 0x20bd46,
- 0x220e04,
- 0x28a483,
- 0x4820ea42,
- 0x204d42,
- 0x23d503,
- 0x48608e83,
- 0x2d8047,
- 0x34fd07,
- 0x49e31787,
- 0x23fcc7,
- 0x2309c3,
- 0x33188a,
- 0x263544,
- 0x3863c4,
- 0x3863ca,
- 0x24b685,
- 0x4a2190c2,
- 0x254b43,
- 0x4a601942,
- 0x21b543,
- 0x275583,
- 0x4ae02b82,
- 0x2b0284,
- 0x2256c4,
- 0x208105,
- 0x39e745,
- 0x2fc3c6,
- 0x2fc746,
- 0x4b206802,
- 0x4b600982,
- 0x3139c5,
- 0x2aee92,
- 0x259806,
- 0x231483,
- 0x315a06,
- 0x231485,
- 0x1616b82,
- 0x53a17102,
- 0x35fd43,
- 0x217103,
- 0x35d703,
- 0x53e02c82,
- 0x38a783,
- 0x54205b82,
- 0x20cc43,
- 0x3a2e88,
- 0x231e83,
- 0x231e86,
- 0x3b0c87,
- 0x26c286,
- 0x26c28b,
- 0x220d47,
- 0x339504,
- 0x54a00e42,
- 0x341305,
- 0x54e08e43,
- 0x2aec83,
- 0x32de85,
- 0x331783,
- 0x55331786,
- 0x2108ca,
- 0x2488c3,
- 0x240c44,
- 0x2cf4c6,
- 0x2364c6,
- 0x55601a03,
- 0x32c187,
- 0x364887,
- 0x2a3885,
- 0x251046,
- 0x222583,
- 0x57619f43,
- 0x57a0cb42,
- 0x34bd44,
- 0x22c24c,
- 0x232f09,
- 0x2445c7,
- 0x38ad45,
- 0x252c84,
- 0x25e6c8,
- 0x265d45,
- 0x57e6c505,
- 0x27b709,
- 0x2e6103,
- 0x24f204,
- 0x5821cc82,
- 0x221543,
- 0x5869bf42,
- 0x3bbe86,
- 0x16235c2,
- 0x58a35b42,
- 0x2a6988,
- 0x2ac343,
- 0x2b5d47,
- 0x2daa05,
- 0x2e5205,
- 0x2e520b,
- 0x2e58c6,
- 0x2e5406,
- 0x2e9006,
- 0x232b84,
- 0x2e9246,
- 0x58eeae88,
- 0x246003,
- 0x231a43,
- 0x231a44,
- 0x2ea484,
- 0x2eab87,
- 0x2ec3c5,
- 0x592ec502,
- 0x59607082,
- 0x207085,
- 0x295bc4,
- 0x2ef38b,
- 0x2efa08,
- 0x2998c4,
- 0x228182,
- 0x59e99842,
- 0x350e83,
- 0x2efec4,
- 0x2f0185,
- 0x2f0607,
- 0x2f2384,
- 0x220c04,
- 0x5a204102,
- 0x36f5c9,
- 0x2f3185,
- 0x3a03c5,
- 0x2f3e45,
- 0x5a621483,
- 0x2f4dc4,
- 0x2f4dcb,
- 0x2f5204,
- 0x2f5c0b,
- 0x2f6005,
- 0x221e8a,
- 0x2f7608,
- 0x2f780a,
- 0x2f7fc3,
- 0x2f7fca,
- 0x5aa33502,
- 0x5ae2fa42,
- 0x236903,
- 0x5b2f9f02,
- 0x2f9f03,
- 0x5b71c482,
- 0x5bb29ac2,
- 0x2fac84,
- 0x2227c6,
- 0x32d385,
- 0x2fd4c3,
- 0x320446,
- 0x317345,
- 0x262a84,
- 0x5be06b42,
- 0x2ba844,
- 0x2cdc4a,
- 0x22fd07,
- 0x2e5e86,
- 0x2612c7,
- 0x20c743,
- 0x2bce48,
- 0x39fd8b,
- 0x230305,
- 0x2f41c5,
- 0x2f41c6,
- 0x2ea004,
- 0x3bf388,
- 0x20e543,
- 0x21f784,
- 0x21f787,
- 0x355746,
- 0x344b06,
- 0x29810a,
- 0x250d44,
- 0x250d4a,
- 0x5c20c386,
- 0x20c387,
- 0x25ca07,
- 0x27b0c4,
- 0x27b0c9,
- 0x262445,
- 0x2439cb,
- 0x2eef43,
- 0x21ad43,
- 0x5c625b03,
- 0x23a584,
- 0x5ca00482,
- 0x2f70c6,
- 0x5cea2a45,
- 0x315c45,
- 0x258586,
- 0x352b04,
- 0x5d2044c2,
- 0x24bbc4,
- 0x5d60b282,
- 0x28b5c5,
- 0x236c84,
- 0x22cb43,
- 0x5de17142,
- 0x217143,
- 0x273e86,
- 0x5e204242,
- 0x2241c8,
- 0x22a844,
- 0x22a846,
- 0x204dc6,
- 0x25ec04,
- 0x208cc5,
- 0x214e48,
- 0x215647,
- 0x2159c7,
- 0x2159cf,
- 0x29b086,
- 0x22f483,
- 0x22f484,
- 0x36edc4,
- 0x213103,
- 0x22a004,
- 0x2494c4,
- 0x5e60fd02,
- 0x291cc3,
- 0x24bf43,
- 0x5ea0d2c2,
- 0x22f043,
- 0x20d2c3,
- 0x21d70a,
- 0x2e7d07,
- 0x381f0c,
- 0x3821c6,
- 0x2f5a86,
- 0x2f6447,
- 0x5ee0e947,
- 0x252d49,
- 0x245984,
- 0x253e04,
- 0x5f221382,
- 0x5f600a02,
- 0x2984c6,
- 0x32bf84,
- 0x2df606,
- 0x239048,
- 0x2bf2c4,
- 0x266886,
- 0x2d9d05,
- 0x26e488,
- 0x2041c3,
- 0x26fd85,
- 0x270b03,
- 0x3a04c3,
- 0x3a04c4,
- 0x206ac3,
- 0x5fa0e602,
- 0x5fe00742,
- 0x2eee09,
- 0x273885,
- 0x276bc4,
- 0x27ab05,
- 0x217e84,
- 0x2c62c7,
- 0x36ecc5,
- 0x231944,
- 0x231948,
- 0x2d6206,
- 0x2dac04,
- 0x2e0788,
- 0x2e1fc7,
- 0x60202502,
- 0x2e6f44,
- 0x2131c4,
- 0x348cc7,
- 0x60602504,
- 0x210f82,
- 0x60a06742,
- 0x227103,
- 0x2dfc84,
- 0x2b2143,
- 0x370645,
- 0x60e06d42,
- 0x2eeac5,
- 0x21b9c2,
- 0x35c7c5,
- 0x374745,
- 0x61204d02,
- 0x35f004,
- 0x61606182,
- 0x266d86,
- 0x2a7806,
- 0x272f08,
- 0x2c7588,
- 0x30de84,
- 0x2f97c5,
- 0x395809,
- 0x2fd8c4,
- 0x210884,
- 0x208483,
- 0x61a1f545,
- 0x2cb6c7,
- 0x28d004,
- 0x31288d,
- 0x332182,
- 0x33f203,
- 0x3479c3,
- 0x61e00d02,
- 0x397dc5,
- 0x212cc7,
- 0x23fd84,
- 0x23fd87,
- 0x2a0109,
- 0x2cdd89,
- 0x277e07,
- 0x20f803,
- 0x2ba348,
- 0x2522c9,
- 0x349c47,
- 0x355685,
- 0x395546,
- 0x398bc6,
- 0x3aaf05,
- 0x25d845,
- 0x62209142,
- 0x37da45,
- 0x2bad08,
- 0x2c9546,
- 0x626c0d47,
- 0x2f6244,
- 0x29bb07,
- 0x300246,
- 0x62a3b442,
- 0x37ffc6,
- 0x302d4a,
- 0x3035c5,
- 0x62ee6282,
- 0x63260a02,
- 0x312586,
- 0x2b36c8,
- 0x636926c7,
- 0x63a04502,
- 0x226783,
- 0x36a846,
- 0x22cf04,
- 0x3b0b46,
- 0x344e06,
- 0x36d78a,
- 0x377705,
- 0x208806,
- 0x2205c3,
- 0x2205c4,
- 0x203082,
- 0x314a43,
- 0x63e11ac2,
- 0x2f8483,
- 0x382c04,
- 0x2b3804,
- 0x2b380a,
- 0x22e603,
- 0x281288,
- 0x22e60a,
- 0x2b4247,
- 0x309306,
- 0x266c44,
- 0x220cc2,
- 0x228cc2,
- 0x64207002,
- 0x23ddc3,
- 0x25c7c7,
- 0x320707,
- 0x28e8c4,
- 0x39d147,
- 0x2f0706,
- 0x21e747,
- 0x233484,
- 0x398ac5,
- 0x2ce485,
- 0x6462be42,
- 0x231146,
- 0x327943,
- 0x371742,
- 0x383306,
- 0x64a08bc2,
- 0x64e05082,
- 0x3c0985,
- 0x6522a202,
- 0x65604782,
- 0x348085,
- 0x39e345,
- 0x2088c5,
- 0x26f003,
- 0x352285,
- 0x2e5987,
- 0x305cc5,
- 0x311985,
- 0x3b01c4,
- 0x24d486,
- 0x264544,
- 0x65a00d42,
- 0x666f2bc5,
- 0x2ab647,
- 0x3176c8,
- 0x29f806,
- 0x29f80d,
- 0x2aac09,
- 0x2aac12,
- 0x359f05,
- 0x36f8c3,
- 0x66a08882,
- 0x314544,
- 0x39bb03,
- 0x3963c5,
- 0x304a45,
- 0x66e1a902,
- 0x264183,
- 0x67231802,
- 0x67a43242,
- 0x67e1f342,
- 0x2ed385,
- 0x23fec3,
- 0x36d408,
- 0x68204382,
- 0x686000c2,
- 0x2b0246,
- 0x35f2ca,
- 0x205503,
- 0x209f43,
- 0x2ef103,
- 0x69202642,
- 0x77602cc2,
- 0x77e0d582,
- 0x206442,
- 0x37fdc9,
- 0x2caa44,
- 0x23b488,
- 0x782fd502,
- 0x78603642,
- 0x2f5e45,
- 0x23d9c8,
- 0x3a2fc8,
- 0x25920c,
- 0x22fac3,
- 0x78a68dc2,
- 0x78e0c402,
- 0x2d3206,
- 0x30a185,
- 0x2a7b83,
- 0x381c46,
- 0x30a2c6,
- 0x20d883,
- 0x30bc43,
- 0x30c146,
- 0x30cd84,
- 0x29d386,
- 0x2d85c5,
- 0x30d10a,
- 0x2397c4,
- 0x30e244,
- 0x30f08a,
- 0x79203442,
- 0x2413c5,
- 0x31018a,
- 0x310a85,
- 0x311344,
- 0x311446,
- 0x3115c4,
- 0x221806,
- 0x79611042,
- 0x33c0c6,
- 0x3b1b45,
- 0x3b80c7,
- 0x200206,
- 0x2de844,
- 0x2de847,
- 0x327646,
- 0x245345,
- 0x245347,
- 0x3abdc7,
- 0x3abdce,
- 0x232206,
- 0x2fa605,
- 0x202447,
- 0x216303,
- 0x3326c7,
- 0x2172c5,
- 0x21b0c4,
- 0x2343c2,
- 0x2432c7,
- 0x304784,
- 0x383884,
- 0x270b8b,
- 0x224e03,
- 0x2d4c47,
- 0x224e04,
- 0x2f11c7,
- 0x299543,
- 0x33dd4d,
- 0x398608,
- 0x224604,
- 0x231845,
- 0x312bc5,
- 0x313003,
- 0x79a0c4c2,
- 0x314a03,
- 0x314d43,
- 0x20f204,
- 0x283745,
- 0x22a4c7,
- 0x220646,
- 0x382943,
- 0x38344b,
- 0x259c8b,
- 0x2ac9cb,
- 0x2fbd4b,
- 0x2c578a,
- 0x30e48b,
- 0x32420b,
- 0x362f0c,
- 0x38bf4b,
- 0x3bdf51,
- 0x3bfd8a,
- 0x31604b,
- 0x31630c,
- 0x31660b,
- 0x316b8a,
- 0x317c8a,
- 0x318c8e,
- 0x31930b,
- 0x3195ca,
- 0x31a9d1,
- 0x31ae0a,
- 0x31b30b,
- 0x31b84e,
- 0x31c18c,
- 0x31c68b,
- 0x31c94e,
- 0x31cccc,
- 0x31d9ca,
- 0x31eccc,
- 0x79f1efca,
- 0x31f7c8,
- 0x320909,
- 0x3232ca,
- 0x32354a,
- 0x3237cb,
- 0x326d8e,
- 0x327111,
- 0x330189,
- 0x3303ca,
- 0x3313cb,
- 0x334a0a,
- 0x3354d6,
- 0x336e4b,
- 0x337b0a,
- 0x337f4a,
- 0x33a4cb,
- 0x33b749,
- 0x33e6c9,
- 0x33ec8d,
- 0x33f2cb,
- 0x34040b,
- 0x340dcb,
- 0x347049,
- 0x34768e,
- 0x347dca,
- 0x3494ca,
- 0x349a0a,
- 0x34a14b,
- 0x34a98b,
- 0x34ac4d,
- 0x34c50d,
- 0x34cd50,
- 0x34d20b,
- 0x35064c,
- 0x3512cb,
- 0x353ccb,
- 0x35528e,
- 0x355e0b,
- 0x355e0d,
- 0x35ae8b,
- 0x35b90f,
- 0x35bccb,
- 0x35c50a,
- 0x35cb49,
- 0x35de09,
- 0x35e18b,
- 0x35e44e,
- 0x36020b,
- 0x361acf,
- 0x36394b,
- 0x363c0b,
- 0x363ecb,
- 0x3643ca,
- 0x368a89,
- 0x36e04f,
- 0x372a8c,
- 0x3732cc,
- 0x37374e,
- 0x373ccf,
- 0x37408e,
- 0x375690,
- 0x375a8f,
- 0x37660e,
- 0x376f4c,
- 0x377252,
- 0x379891,
- 0x37a18e,
- 0x37a94e,
- 0x37ae8e,
- 0x37b20f,
- 0x37b5ce,
- 0x37b953,
- 0x37be11,
- 0x37c24c,
- 0x37c54e,
- 0x37c9cc,
- 0x37de53,
- 0x37ead0,
- 0x37f30c,
- 0x37f60c,
- 0x37facb,
- 0x38044e,
- 0x380d8b,
- 0x3816cb,
- 0x382fcc,
- 0x38b38a,
- 0x38b74c,
- 0x38ba4c,
- 0x38bd49,
- 0x38d7cb,
- 0x38da88,
- 0x38df49,
- 0x38df4f,
- 0x38f88b,
- 0x7a39028a,
- 0x391e4c,
- 0x393009,
- 0x393488,
- 0x39368b,
- 0x393d8b,
- 0x39490a,
- 0x394b8b,
- 0x3950cc,
- 0x396048,
- 0x398d4b,
- 0x39b1cb,
- 0x39ef4e,
- 0x3a05cb,
- 0x3a1f0b,
- 0x3ab94b,
- 0x3abc09,
- 0x3ac14d,
- 0x3b1d4a,
- 0x3b2c97,
- 0x3b4398,
- 0x3b6bc9,
- 0x3b7d0b,
- 0x3b8fd4,
- 0x3b94cb,
- 0x3b9a4a,
- 0x3ba38a,
- 0x3ba60b,
- 0x3badd0,
- 0x3bb1d1,
- 0x3bc00a,
- 0x3bd54d,
- 0x3bdc4d,
- 0x3c05cb,
- 0x3c1206,
- 0x231243,
- 0x7a791143,
- 0x26ed86,
- 0x248805,
- 0x22d287,
- 0x3240c6,
- 0x1608742,
- 0x2c1fc9,
- 0x320244,
- 0x2e4d48,
- 0x210943,
- 0x314487,
- 0x239202,
- 0x2b3d03,
- 0x7aa04542,
- 0x2d0d06,
- 0x2d2104,
- 0x37a844,
- 0x3443c3,
- 0x3443c5,
- 0x7b2cb8c2,
- 0x7b6aeb44,
- 0x27b007,
- 0x7ba43282,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x200e03,
- 0x207102,
- 0x16fb88,
- 0x20f882,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x215443,
- 0x32b7d6,
- 0x32ca13,
- 0x39cfc9,
- 0x34e148,
- 0x341189,
- 0x310306,
- 0x340010,
- 0x24c9d3,
- 0x355808,
- 0x2a0a87,
- 0x37d347,
- 0x28db0a,
- 0x232309,
- 0x3961c9,
- 0x28664b,
- 0x33af86,
- 0x20728a,
- 0x228e06,
- 0x31fe43,
- 0x2dce85,
- 0x233108,
- 0x266e4d,
- 0x28af0c,
- 0x218c87,
- 0x318fcd,
- 0x214f44,
- 0x23a84a,
- 0x23bbca,
- 0x23c08a,
- 0x24ccc7,
- 0x246b87,
- 0x24a904,
- 0x233d86,
- 0x209d44,
- 0x2c7ec8,
- 0x26eb89,
- 0x2bb246,
- 0x2bb248,
- 0x24d18d,
- 0x2cdfc9,
- 0x209708,
- 0x3a0347,
- 0x300fca,
- 0x2550c6,
- 0x2664c7,
- 0x2bd584,
- 0x292347,
- 0x35180a,
- 0x38690e,
- 0x2247c5,
- 0x29224b,
- 0x32f709,
- 0x25bd09,
- 0x21b7c7,
- 0x2936ca,
- 0x348c07,
- 0x307d49,
- 0x20b808,
- 0x33420b,
- 0x2e4505,
- 0x3ab60a,
- 0x2734c9,
- 0x331d0a,
- 0x2d2e0b,
- 0x38668b,
- 0x2863d5,
- 0x30be85,
- 0x3a03c5,
- 0x2f4dca,
- 0x364a8a,
- 0x32f487,
- 0x2252c3,
- 0x298448,
- 0x2db34a,
- 0x22a846,
- 0x252109,
- 0x26e488,
- 0x2dac04,
- 0x2b2149,
- 0x2c7588,
- 0x2b2d07,
- 0x2f2bc6,
- 0x2ab647,
- 0x376d87,
- 0x24a205,
- 0x22460c,
- 0x231845,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x20f882,
- 0x238543,
- 0x208e83,
- 0x200e03,
- 0x201a03,
- 0x238543,
- 0x208e83,
- 0xe03,
- 0x231e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x16fb88,
- 0x20f882,
- 0x201742,
- 0x23c2c2,
- 0x202542,
- 0x200542,
- 0x2e6dc2,
- 0x4638543,
- 0x23cac3,
- 0x21b583,
- 0x323043,
- 0x255783,
- 0x28cac3,
- 0x2dcd86,
- 0x208e83,
- 0x201a03,
- 0x20bdc3,
- 0x16fb88,
- 0x345b44,
- 0x20da07,
- 0x2112c3,
- 0x2b1684,
- 0x208543,
- 0x21b843,
- 0x323043,
- 0x36dc7,
- 0x145944,
- 0xf183,
- 0x145c05,
- 0x207102,
- 0x19c783,
- 0x5a0f882,
- 0x1490fc9,
- 0x9144d,
- 0x9178d,
- 0x23c2c2,
- 0x31604,
- 0x145c49,
- 0x200442,
- 0x5f4ed48,
- 0xf4544,
- 0x16fb88,
- 0x1409702,
- 0x1510cc6,
- 0x239283,
- 0x2bcc43,
- 0x6638543,
- 0x23a844,
- 0x6a3cac3,
- 0x6f23043,
- 0x205e82,
- 0x231604,
- 0x208e83,
- 0x301dc3,
- 0x2014c2,
- 0x201a03,
- 0x222dc2,
- 0x2fabc3,
- 0x204242,
- 0x205983,
- 0x26e543,
- 0x200202,
- 0x16fb88,
- 0x239283,
- 0x301dc3,
- 0x2014c2,
- 0x2fabc3,
- 0x204242,
- 0x205983,
- 0x26e543,
- 0x200202,
- 0x2fabc3,
- 0x204242,
- 0x205983,
- 0x26e543,
- 0x200202,
- 0x238543,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x20cb02,
- 0x221483,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x208e83,
- 0x201a03,
- 0x355685,
- 0x21a902,
- 0x207102,
- 0x16fb88,
- 0x1480cc8,
- 0x323043,
- 0x20fec1,
- 0x201641,
- 0x203c01,
- 0x201301,
- 0x267401,
- 0x2ae601,
- 0x211341,
- 0x28a0c1,
- 0x24dfc1,
- 0x2fbf81,
- 0x200141,
- 0x200001,
- 0x131645,
- 0x16fb88,
- 0x2008c1,
- 0x201781,
- 0x200301,
- 0x200081,
- 0x200181,
- 0x200401,
- 0x200041,
- 0x2086c1,
- 0x200101,
- 0x200281,
- 0x200801,
- 0x200981,
- 0x200441,
- 0x204101,
- 0x2227c1,
- 0x200341,
- 0x200741,
- 0x2002c1,
- 0x2000c1,
- 0x203441,
- 0x200201,
- 0x200c81,
- 0x2005c1,
- 0x204541,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x200442,
- 0x201a03,
- 0x36dc7,
- 0x8cbc7,
- 0x24386,
- 0x44f4a,
- 0x906c8,
- 0x5c288,
- 0x5c6c7,
- 0xffc6,
- 0xe1d45,
- 0x11205,
- 0x86286,
- 0x12cf06,
- 0x286644,
- 0x31cf87,
- 0x16fb88,
- 0x2de944,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x323043,
- 0x255783,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x21a902,
- 0x2ba8c3,
- 0x242043,
- 0x2cc103,
- 0x202d42,
- 0x33eb43,
- 0x203ec3,
- 0x20fc03,
- 0x200001,
- 0x2ed0c5,
- 0x203c43,
- 0x226544,
- 0x332083,
- 0x322103,
- 0x222903,
- 0x383283,
- 0xaa38543,
- 0x240244,
- 0x24ac83,
- 0x207583,
- 0x2228c3,
- 0x23aa83,
- 0x23cac3,
- 0x23c803,
- 0x202103,
- 0x2aab03,
- 0x322083,
- 0x2bdec3,
- 0x20df43,
- 0x255684,
- 0x257307,
- 0x2f6802,
- 0x25c003,
- 0x263783,
- 0x27e983,
- 0x20fe03,
- 0x20dec3,
- 0xaf23043,
- 0x209ac3,
- 0x204c03,
- 0x231603,
- 0x34bc85,
- 0x209c83,
- 0x304d43,
- 0xb207a83,
- 0x374803,
- 0x213643,
- 0x229443,
- 0x28cac3,
- 0x22c2c2,
- 0x20c0c3,
- 0x208e83,
- 0x1600e03,
- 0x22b1c3,
- 0x2014c3,
- 0x21a743,
- 0x201a03,
- 0x36ea03,
- 0x223583,
- 0x221483,
- 0x233503,
- 0x30bcc3,
- 0x2fad83,
- 0x317345,
- 0x20c843,
- 0x2df706,
- 0x2fadc3,
- 0x349703,
- 0x2205c4,
- 0x20c9c3,
- 0x386603,
- 0x2f1a03,
- 0x20bdc3,
- 0x21a902,
- 0x22fac3,
- 0x30e403,
- 0x30fac4,
- 0x383884,
- 0x21a5c3,
- 0x16fb88,
- 0x207102,
- 0x200242,
- 0x202d42,
- 0x20cac2,
- 0x201d02,
- 0x201442,
- 0x23de42,
- 0x201842,
- 0x207b02,
- 0x201fc2,
- 0x2281c2,
- 0x214642,
- 0x2745c2,
- 0x20cb42,
- 0x2e6dc2,
- 0x21cc82,
- 0x225b82,
- 0x204102,
- 0x2204c2,
- 0x205842,
- 0x200482,
- 0x221dc2,
- 0x2044c2,
- 0x20d2c2,
- 0x200a02,
- 0x21f542,
- 0x204782,
- 0x7102,
- 0x242,
- 0x2d42,
- 0xcac2,
- 0x1d02,
- 0x1442,
- 0x3de42,
- 0x1842,
- 0x7b02,
- 0x1fc2,
- 0x281c2,
- 0x14642,
- 0x745c2,
- 0xcb42,
- 0xe6dc2,
- 0x1cc82,
- 0x25b82,
- 0x4102,
- 0x204c2,
- 0x5842,
- 0x482,
- 0x21dc2,
- 0x44c2,
- 0xd2c2,
- 0xa02,
- 0x1f542,
- 0x4782,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x2442,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x20f882,
- 0x201a03,
- 0xc638543,
- 0x323043,
- 0x28cac3,
- 0x1a3443,
- 0x219302,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x4542,
- 0x201c02,
- 0x1442b45,
- 0x232282,
- 0x16fb88,
- 0xf882,
- 0x209d82,
- 0x209b02,
- 0x20ddc2,
- 0x2190c2,
- 0x206802,
- 0x11205,
- 0x201282,
- 0x2014c2,
- 0x202c82,
- 0x200dc2,
- 0x21cc82,
- 0x3951c2,
- 0x206742,
- 0x260a42,
- 0x36dc7,
- 0x1501cd,
- 0xe1dc9,
- 0x5900b,
- 0xe5848,
- 0x56809,
- 0x106046,
- 0x323043,
- 0x16fb88,
- 0x145944,
- 0xf183,
- 0x145c05,
- 0x16fb88,
- 0x5d3c6,
- 0x145c49,
- 0x126447,
- 0x207102,
- 0x286644,
- 0x20f882,
- 0x238543,
- 0x201742,
- 0x23cac3,
- 0x207b02,
- 0x2de944,
- 0x255783,
- 0x253442,
- 0x208e83,
- 0x200442,
- 0x201a03,
- 0x3a03c6,
- 0x323d8f,
- 0x7156c3,
- 0x16fb88,
- 0x20f882,
- 0x21b583,
- 0x323043,
- 0x28cac3,
- 0xe03,
- 0x152e1cb,
- 0xe2648,
- 0x14b7aca,
- 0x14f5907,
- 0x8dbcb,
- 0x149785,
- 0x36dc7,
- 0x20f882,
- 0x238543,
- 0x323043,
- 0x208e83,
- 0x207102,
- 0x200b42,
- 0x2092c2,
- 0xfe38543,
- 0x248582,
- 0x23cac3,
- 0x209c42,
- 0x20d382,
- 0x323043,
- 0x210642,
- 0x259c42,
- 0x2aeb02,
- 0x2006c2,
- 0x295e02,
- 0x203102,
- 0x200782,
- 0x2351c2,
- 0x2335c2,
- 0x252e42,
- 0x2b5102,
- 0x2d2942,
- 0x327982,
- 0x2111c2,
- 0x28cac3,
- 0x200802,
- 0x208e83,
- 0x24d382,
- 0x289e82,
- 0x201a03,
- 0x2485c2,
- 0x20d2c2,
- 0x221382,
- 0x200742,
- 0x204d02,
- 0x2e6282,
- 0x22be42,
- 0x231802,
- 0x2312c2,
- 0x3195ca,
- 0x35c50a,
- 0x39090a,
- 0x3c1382,
- 0x208a82,
- 0x212a42,
- 0x10223fc9,
- 0x1072c38a,
- 0x1438547,
- 0x10a02482,
- 0x1416dc3,
- 0x12c2,
- 0x12c38a,
- 0x252044,
- 0x11238543,
- 0x23cac3,
- 0x253384,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x28cac3,
- 0x208e83,
- 0xe3bc5,
- 0x200e03,
- 0x201a03,
- 0x20c843,
- 0x202443,
- 0x16fb88,
- 0x140ff44,
- 0x1441c5,
- 0x12620a,
- 0x11ec42,
- 0x1affc6,
- 0x35ad1,
- 0x11a23fc9,
- 0x144248,
- 0x10b388,
- 0x8cf47,
- 0xbc2,
- 0x13164b,
- 0x1b320a,
- 0x71ca,
- 0x26547,
- 0x16fb88,
- 0x114008,
- 0x14507,
- 0x17c2198b,
- 0x23087,
- 0xc702,
- 0x5b907,
- 0x1920a,
- 0x8cc4f,
- 0x4f70f,
- 0x22902,
- 0xf882,
- 0xaaa48,
- 0xe228a,
- 0x6a08,
- 0x64b88,
- 0xdfbc8,
- 0x4c82,
- 0x42bcf,
- 0xa670b,
- 0xf8d08,
- 0x3e607,
- 0x185b8a,
- 0x3af8b,
- 0x57f89,
- 0x185a87,
- 0x6908,
- 0x1089cc,
- 0x81a87,
- 0x1a800a,
- 0xdd088,
- 0x1aafce,
- 0x2438e,
- 0x2638b,
- 0x27bcb,
- 0x2920b,
- 0x2c049,
- 0x2ff8b,
- 0x31ccd,
- 0x329cb,
- 0x62b4d,
- 0x62ecd,
- 0xfa44a,
- 0x1836cb,
- 0x3b64b,
- 0x47085,
- 0x1802cc10,
- 0x12d40f,
- 0x12db4f,
- 0x37a4d,
- 0xbf490,
- 0xc182,
- 0x18623a08,
- 0x8ca48,
- 0x18af52c5,
- 0x52a0b,
- 0x11f3d0,
- 0x5ad08,
- 0x6b0a,
- 0x27d89,
- 0x6b307,
- 0x6b647,
- 0x6b807,
- 0x6bb87,
- 0x6ca87,
- 0x6d487,
- 0x6ddc7,
- 0x6e187,
- 0x6f187,
- 0x6f487,
- 0x70147,
- 0x70307,
- 0x704c7,
- 0x70687,
- 0x70987,
- 0x70e47,
- 0x71707,
- 0x72007,
- 0x72c87,
- 0x731c7,
- 0x73387,
- 0x73707,
- 0x74487,
- 0x74687,
- 0x750c7,
- 0x75287,
- 0x75447,
- 0x75dc7,
- 0x76087,
- 0x77a47,
- 0x78187,
- 0x78447,
- 0x78bc7,
- 0x78d87,
- 0x79187,
- 0x79687,
- 0x79907,
- 0x79d07,
- 0x79ec7,
- 0x7a087,
- 0x7ae07,
- 0x7c447,
- 0x7c987,
- 0x7cc87,
- 0x7ce47,
- 0x7d1c7,
- 0x7d787,
- 0x13c42,
- 0x64c8a,
- 0xe90c7,
- 0x287c5,
- 0x806d1,
- 0x157c6,
- 0x11318a,
- 0xaa8ca,
- 0x5d3c6,
- 0xb880b,
- 0x17202,
- 0x3a1d1,
- 0x1bbc89,
- 0x9c0c9,
- 0x351c2,
- 0xa808a,
- 0xac7c9,
- 0xacf0f,
- 0xada4e,
- 0xae208,
- 0x206c2,
- 0xb649,
- 0x1025ce,
- 0xe8b4c,
- 0xf328f,
- 0x1a5b4e,
- 0x1684c,
- 0x18009,
- 0x1c291,
- 0x1f108,
- 0x2ac92,
- 0x2bb4d,
- 0x33c4d,
- 0x15208b,
- 0x41cd5,
- 0x164ec9,
- 0xfcf8a,
- 0x40809,
- 0x4d650,
- 0x4e70b,
- 0x5898f,
- 0x6390b,
- 0x7298c,
- 0x77650,
- 0x8430a,
- 0x853cd,
- 0x894ce,
- 0x8ef4a,
- 0xede0c,
- 0x176a54,
- 0x1bb911,
- 0x95a8b,
- 0x97fcf,
- 0xa290d,
- 0xa76ce,
- 0xb2bcc,
- 0xb330c,
- 0x160b0b,
- 0x160e0e,
- 0xd6750,
- 0x11868b,
- 0x1876cd,
- 0x1bce4f,
- 0xba0cc,
- 0xbb0ce,
- 0xbc011,
- 0xc7c4c,
- 0xc9307,
- 0xc9c0d,
- 0x130d4c,
- 0x1605d0,
- 0x174c0d,
- 0xd1b47,
- 0xd7c10,
- 0xdd6c8,
- 0xf178b,
- 0x134c4f,
- 0x3ef48,
- 0x11338d,
- 0x15c750,
- 0x172e49,
- 0x18e086c6,
- 0xb8243,
- 0xbc445,
- 0x9a02,
- 0x143889,
- 0x5e04a,
- 0x10fb06,
- 0x2594a,
- 0x1900c949,
- 0x1c003,
- 0xdebd1,
- 0xdf009,
- 0xe0407,
- 0x35c4b,
- 0xe67d0,
- 0xe6c8c,
- 0xe8e48,
- 0xe9805,
- 0xb988,
- 0x1ad4ca,
- 0x1c0c7,
- 0x16bac7,
- 0x982,
- 0x12bcca,
- 0x12e7c9,
- 0x79545,
- 0x402ca,
- 0x9260f,
- 0x4b8cb,
- 0x14bd4c,
- 0x17a492,
- 0x94e45,
- 0xec1c8,
- 0x17618a,
- 0x196f3d05,
- 0x190ecc,
- 0x129ac3,
- 0x1951c2,
- 0xfb30a,
- 0x14fb70c,
- 0x14f508,
- 0x62d08,
- 0x36d47,
- 0xb282,
- 0x4242,
- 0x47590,
- 0xa02,
- 0x3904f,
- 0x86286,
- 0x7c0e,
- 0xebbcb,
- 0x8f148,
- 0xda049,
- 0x18f052,
- 0x95cd,
- 0x586c8,
- 0x58ec9,
- 0x5d50d,
- 0x5e4c9,
- 0x5e88b,
- 0x60648,
- 0x65808,
- 0x65b88,
- 0x65e49,
- 0x6604a,
- 0x6a98c,
- 0xeb04a,
- 0x10bd07,
- 0x1f54d,
- 0xfde8b,
- 0x12004c,
- 0x404c8,
- 0x4f049,
- 0x1b01d0,
- 0xc2,
- 0x2d3cd,
- 0x2642,
- 0x2cc2,
- 0x10bc4a,
- 0x11308a,
- 0x11438b,
- 0x3b80c,
- 0x113b0a,
- 0x113d8e,
- 0xf2cd,
- 0x11d708,
- 0x4542,
- 0x11f46c0e,
- 0x1260ee4e,
- 0x12f43f8a,
- 0x1373a14e,
- 0x13f9d38e,
- 0x1460138c,
- 0x1438547,
- 0x1438549,
- 0x1416dc3,
- 0x14e3700c,
- 0x15707789,
- 0x15f3b509,
- 0x12c2,
- 0x146b51,
- 0xed91,
- 0x143ecd,
- 0x13a091,
- 0x19d2d1,
- 0x12cf,
- 0x36f4f,
- 0x1076cc,
- 0x13b44c,
- 0x18954d,
- 0x1b5295,
- 0x10ed8c,
- 0xea88c,
- 0x122ed0,
- 0x158fcc,
- 0x16d9cc,
- 0x191819,
- 0x1a83d9,
- 0x1aa459,
- 0x1b3e94,
- 0x1b8ad4,
- 0x1c0d14,
- 0x2394,
- 0x3754,
- 0x1670ee49,
- 0x16dc0fc9,
- 0x176ea949,
- 0x1221f309,
- 0x12c2,
- 0x12a1f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x1321f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x13a1f309,
- 0x12c2,
- 0x1421f309,
- 0x12c2,
- 0x14a1f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x1521f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x15a1f309,
- 0x12c2,
- 0x1621f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x16a1f309,
- 0x12c2,
- 0x1721f309,
- 0x12c2,
- 0x17a1f309,
- 0x12c2,
- 0x238a,
- 0x12c2,
- 0x35ac5,
- 0x1b3204,
- 0x146c0e,
- 0xee4e,
- 0x143f8a,
- 0x13a14e,
- 0x19d38e,
- 0x138c,
- 0x3700c,
- 0x107789,
- 0x13b509,
- 0x10ee49,
- 0x1c0fc9,
- 0xea949,
- 0x122f8d,
- 0x2649,
- 0x3a09,
- 0x5bf04,
- 0x11d8c4,
- 0x126144,
- 0x15f784,
- 0x8de84,
- 0x4b744,
- 0x6e44,
- 0x67344,
- 0x8cf44,
- 0x157e2c3,
- 0xc182,
- 0xf2c3,
- 0x4c82,
- 0x207102,
- 0x20f882,
- 0x201742,
- 0x207602,
- 0x207b02,
- 0x200442,
- 0x204242,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231603,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x208e83,
- 0x201a03,
- 0x160c3,
- 0x323043,
- 0x31604,
- 0x207102,
- 0x39c783,
- 0x1b638543,
- 0x2bf347,
- 0x323043,
- 0x211a83,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x243d0a,
- 0x3a03c5,
- 0x221483,
- 0x205082,
- 0x16fb88,
- 0x16fb88,
- 0xf882,
- 0x127482,
- 0x1bf51b0b,
- 0x5ba45,
- 0x35dc5,
- 0x114b46,
- 0x145944,
- 0xf183,
- 0x145c05,
- 0x131645,
- 0x16fb88,
- 0x23087,
- 0x38543,
- 0x1c644d87,
- 0x1432c6,
- 0x1c93b345,
- 0x143387,
- 0x1b4d0a,
- 0x1b4bc8,
- 0x11887,
- 0x6df88,
- 0x99707,
- 0x152cf,
- 0x435c7,
- 0x150d86,
- 0x11f3d0,
- 0x12a58f,
- 0x20a89,
- 0x10fb84,
- 0x1cd4344e,
- 0xb098c,
- 0x5810a,
- 0xa7987,
- 0x3520a,
- 0xbb49,
- 0xb514c,
- 0x4304a,
- 0x5ec8a,
- 0x145c49,
- 0x10fb06,
- 0xa7a4a,
- 0xe8a,
- 0xa4e49,
- 0xde488,
- 0xde786,
- 0xe284d,
- 0xbc8c5,
- 0x126447,
- 0x1019c9,
- 0xf72c7,
- 0xb5ed4,
- 0x103acb,
- 0xf8b4a,
- 0xab10d,
- 0xd3c3,
- 0xd3c3,
- 0x24386,
- 0xd3c3,
- 0x19c783,
- 0x16fb88,
- 0xf882,
- 0x53384,
- 0x5f843,
- 0x155685,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x203ec3,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x29c283,
- 0x202443,
- 0x203ec3,
- 0x286644,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x206683,
- 0x238543,
- 0x23cac3,
- 0x207603,
- 0x21b583,
- 0x323043,
- 0x231604,
- 0x3797c3,
- 0x229443,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0x36a883,
- 0x1ea38543,
- 0x23cac3,
- 0x250ac3,
- 0x323043,
- 0x212143,
- 0x229443,
- 0x201a03,
- 0x204103,
- 0x35f584,
- 0x16fb88,
- 0x1f238543,
- 0x23cac3,
- 0x2ae2c3,
- 0x323043,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x20e943,
- 0x16fb88,
- 0x1fa38543,
- 0x23cac3,
- 0x21b583,
- 0x200e03,
- 0x201a03,
- 0x16fb88,
- 0x1438547,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x131645,
- 0x36dc7,
- 0xb610b,
- 0xdf404,
- 0xbc8c5,
- 0x1480cc8,
- 0xae90d,
- 0x20e6c505,
- 0x7bd44,
- 0x10c3,
- 0x172d45,
- 0x33b145,
- 0x16fb88,
- 0xd3c2,
- 0x2bc3,
- 0xf9306,
- 0x31f948,
- 0x3347c7,
- 0x286644,
- 0x39c286,
- 0x3b5146,
- 0x16fb88,
- 0x2ddac3,
- 0x342a49,
- 0x26d615,
- 0x6d61f,
- 0x238543,
- 0x3b3a52,
- 0xf6306,
- 0x114dc5,
- 0x6b0a,
- 0x27d89,
- 0x3b380f,
- 0x2de944,
- 0x3490c5,
- 0x304b10,
- 0x34e347,
- 0x200e03,
- 0x293408,
- 0x12ce46,
- 0x29630a,
- 0x230f04,
- 0x2f3743,
- 0x3a03c6,
- 0x205082,
- 0x22facb,
- 0xe03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x2f9a03,
- 0x20f882,
- 0x6ed43,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x211a83,
- 0x228243,
- 0x201a03,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x207102,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x35dc5,
- 0x286644,
- 0x238543,
- 0x23cac3,
- 0x20f644,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x204c03,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x210543,
- 0x707c3,
- 0x11a83,
- 0x208e83,
- 0x201a03,
- 0x3195ca,
- 0x335289,
- 0x35438b,
- 0x35490a,
- 0x35c50a,
- 0x369bcb,
- 0x38274a,
- 0x38b38a,
- 0x39090a,
- 0x390b8b,
- 0x3ad209,
- 0x3af10a,
- 0x3af7cb,
- 0x3b978b,
- 0x3bfb4a,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x35dcb,
- 0x651c8,
- 0x1174c9,
- 0x16fb88,
- 0x238543,
- 0x26b304,
- 0x20b342,
- 0x21bf84,
- 0x346145,
- 0x203ec3,
- 0x286644,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x253384,
- 0x2de944,
- 0x231604,
- 0x229443,
- 0x208e83,
- 0x201a03,
- 0x22d585,
- 0x206683,
- 0x221483,
- 0x20ec43,
- 0x231944,
- 0x20fe84,
- 0x2cc105,
- 0x16fb88,
- 0x30dc84,
- 0x36bdc6,
- 0x281384,
- 0x20f882,
- 0x381107,
- 0x254d87,
- 0x251844,
- 0x260105,
- 0x374e05,
- 0x2b13c5,
- 0x231604,
- 0x2cf6c8,
- 0x23eb46,
- 0x3bffc8,
- 0x257cc5,
- 0x2e4505,
- 0x263544,
- 0x201a03,
- 0x2f4544,
- 0x368dc6,
- 0x3a04c3,
- 0x231944,
- 0x280bc5,
- 0x2e4ac4,
- 0x34da44,
- 0x205082,
- 0x2669c6,
- 0x3a2906,
- 0x30a185,
- 0x207102,
- 0x39c783,
- 0x2760f882,
- 0x223b84,
- 0x207b02,
- 0x28cac3,
- 0x200e82,
- 0x208e83,
- 0x200442,
- 0x215443,
- 0x202443,
- 0x16fb88,
- 0x16fb88,
- 0x323043,
- 0x207102,
- 0x2820f882,
- 0x323043,
- 0x270443,
- 0x3797c3,
- 0x32e5c4,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x207102,
- 0x28a0f882,
- 0x238543,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x482,
- 0x208882,
- 0x21a902,
- 0x211a83,
- 0x2ef783,
- 0x207102,
- 0x131645,
- 0x16fb88,
- 0x36dc7,
- 0x20f882,
- 0x23cac3,
- 0x253384,
- 0x2020c3,
- 0x323043,
- 0x204c03,
- 0x28cac3,
- 0x208e83,
- 0x21eb43,
- 0x201a03,
- 0x2252c3,
- 0x122213,
- 0x124cd4,
- 0x36dc7,
- 0x139986,
- 0x5e24b,
- 0x24386,
- 0x5c0c7,
- 0x120589,
- 0xe838a,
- 0x9058d,
- 0x14fecc,
- 0x3954a,
- 0x11205,
- 0x1b4d48,
- 0x86286,
- 0x31586,
- 0x12cf06,
- 0x20c182,
- 0x10b14c,
- 0x1b33c7,
- 0x2a691,
- 0x238543,
- 0x6df05,
- 0x7588,
- 0x18ec4,
- 0x29cbe1c6,
- 0x806c6,
- 0xb9a06,
- 0x960ca,
- 0xb4003,
- 0x2a24c984,
- 0xe8345,
- 0x18e43,
- 0x2a63dc47,
- 0xe3bc5,
- 0xb88cc,
- 0xf7a88,
- 0xbd248,
- 0xa6589,
- 0x14dc08,
- 0x1425886,
- 0x2ab71549,
- 0x14978a,
- 0x16308,
- 0x114b48,
- 0x8cf44,
- 0xb5ac5,
- 0x2ae42bc3,
- 0x2b332106,
- 0x2b6f4dc4,
- 0x2bb39d87,
- 0x114b44,
- 0x114b44,
- 0x114b44,
- 0x114b44,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x207102,
- 0x20f882,
- 0x323043,
- 0x205e82,
- 0x208e83,
- 0x201a03,
- 0x215443,
- 0x373ccf,
- 0x37408e,
- 0x16fb88,
- 0x238543,
- 0x4db87,
- 0x23cac3,
- 0x323043,
- 0x255783,
- 0x208e83,
- 0x201a03,
- 0x20d4c3,
- 0x20d4c7,
- 0x200142,
- 0x2ce609,
- 0x200242,
- 0x24788b,
- 0x2c110a,
- 0x2c67c9,
- 0x201242,
- 0x2100c6,
- 0x26cd95,
- 0x2479d5,
- 0x275793,
- 0x247f53,
- 0x201d42,
- 0x212c45,
- 0x31d44c,
- 0x27c6cb,
- 0x29c705,
- 0x20cac2,
- 0x28e142,
- 0x384c06,
- 0x200bc2,
- 0x3acc46,
- 0x2dd20d,
- 0x26540c,
- 0x22cc84,
- 0x200f82,
- 0x203402,
- 0x22b048,
- 0x201d02,
- 0x20a746,
- 0x28bf04,
- 0x26cf55,
- 0x275913,
- 0x216d03,
- 0x33844a,
- 0x205407,
- 0x3145c9,
- 0x38d4c7,
- 0x20d342,
- 0x200002,
- 0x3ba886,
- 0x212702,
- 0x16fb88,
- 0x216b42,
- 0x201102,
- 0x27f847,
- 0x217387,
- 0x222d85,
- 0x20c702,
- 0x225287,
- 0x225448,
- 0x2024c2,
- 0x2430c2,
- 0x237302,
- 0x201382,
- 0x242688,
- 0x20a043,
- 0x25fa08,
- 0x2e9b0d,
- 0x2322c3,
- 0x32ec08,
- 0x245f4f,
- 0x24630e,
- 0x339a4a,
- 0x22e811,
- 0x22ec90,
- 0x2c34cd,
- 0x2c380c,
- 0x36a707,
- 0x3385c7,
- 0x39c349,
- 0x20d302,
- 0x201442,
- 0x25db0c,
- 0x25de0b,
- 0x2008c2,
- 0x360cc6,
- 0x20e982,
- 0x204882,
- 0x222902,
- 0x20f882,
- 0x3b69c4,
- 0x244387,
- 0x229682,
- 0x24a347,
- 0x24b547,
- 0x20d282,
- 0x20c8c2,
- 0x24da45,
- 0x21a442,
- 0x2f290e,
- 0x2ab3cd,
- 0x23cac3,
- 0x28d58e,
- 0x2c5c0d,
- 0x25ac43,
- 0x201482,
- 0x2891c4,
- 0x216582,
- 0x20fac2,
- 0x364145,
- 0x373587,
- 0x393202,
- 0x207602,
- 0x252f87,
- 0x255ac8,
- 0x2f6802,
- 0x294ec6,
- 0x25d98c,
- 0x25dccb,
- 0x206b02,
- 0x26764f,
- 0x267a10,
- 0x267e0f,
- 0x2681d5,
- 0x268714,
- 0x268c0e,
- 0x268f8e,
- 0x26930f,
- 0x2696ce,
- 0x269a54,
- 0x269f53,
- 0x26a40d,
- 0x27d949,
- 0x291ac3,
- 0x201802,
- 0x2b7505,
- 0x206346,
- 0x207b02,
- 0x3a4ec7,
- 0x323043,
- 0x217202,
- 0x37e548,
- 0x22ea51,
- 0x22ee90,
- 0x2007c2,
- 0x290e07,
- 0x204182,
- 0x332b07,
- 0x209a02,
- 0x342089,
- 0x384bc7,
- 0x27ac08,
- 0x2be006,
- 0x2ef683,
- 0x339205,
- 0x2022c2,
- 0x207a82,
- 0x3bac85,
- 0x391345,
- 0x204bc2,
- 0x231043,
- 0x2e4b47,
- 0x205747,
- 0x200502,
- 0x25f1c4,
- 0x211b83,
- 0x211b89,
- 0x215148,
- 0x200282,
- 0x202942,
- 0x242387,
- 0x263285,
- 0x2ad208,
- 0x215c87,
- 0x21a243,
- 0x294c86,
- 0x2c334d,
- 0x2c36cc,
- 0x2c8346,
- 0x209b02,
- 0x20c202,
- 0x204a82,
- 0x245dcf,
- 0x2461ce,
- 0x374e87,
- 0x20b302,
- 0x2c72c5,
- 0x2c72c6,
- 0x214702,
- 0x200802,
- 0x228246,
- 0x2b57c3,
- 0x332a46,
- 0x2d0285,
- 0x2d028d,
- 0x2d0855,
- 0x2d108c,
- 0x2d1e4d,
- 0x2d2212,
- 0x214642,
- 0x2745c2,
- 0x202ec2,
- 0x249386,
- 0x302486,
- 0x200982,
- 0x2063c6,
- 0x202c82,
- 0x39b505,
- 0x200542,
- 0x2ab4c9,
- 0x2e324c,
- 0x2e358b,
- 0x200442,
- 0x257708,
- 0x2052c2,
- 0x20cb42,
- 0x278ec6,
- 0x21f285,
- 0x36c107,
- 0x24bc85,
- 0x28ea05,
- 0x235d82,
- 0x219a42,
- 0x21cc82,
- 0x2f3587,
- 0x2613cd,
- 0x26174c,
- 0x317947,
- 0x2235c2,
- 0x225b82,
- 0x23f688,
- 0x343a08,
- 0x34c008,
- 0x313344,
- 0x361087,
- 0x2efc43,
- 0x299842,
- 0x206682,
- 0x2f2149,
- 0x3ab3c7,
- 0x204102,
- 0x2792c5,
- 0x22fa42,
- 0x236902,
- 0x35dc83,
- 0x35dc86,
- 0x2f9a02,
- 0x2fab42,
- 0x200c02,
- 0x281e06,
- 0x345607,
- 0x221282,
- 0x206b42,
- 0x25f84f,
- 0x28d3cd,
- 0x3029ce,
- 0x2c5a8c,
- 0x201a42,
- 0x204142,
- 0x2bde45,
- 0x317e46,
- 0x209002,
- 0x205842,
- 0x200482,
- 0x215c04,
- 0x2e9984,
- 0x2b8706,
- 0x204242,
- 0x37d6c7,
- 0x233803,
- 0x233808,
- 0x33cb48,
- 0x240687,
- 0x249286,
- 0x202502,
- 0x242603,
- 0x351107,
- 0x26ffc6,
- 0x2e2d05,
- 0x3136c8,
- 0x206182,
- 0x337547,
- 0x21f542,
- 0x332182,
- 0x207f02,
- 0x2e95c9,
- 0x23b442,
- 0x2018c2,
- 0x248383,
- 0x377787,
- 0x2002c2,
- 0x2e33cc,
- 0x2e36cb,
- 0x2c83c6,
- 0x218d85,
- 0x22a202,
- 0x204782,
- 0x2c1486,
- 0x237e83,
- 0x378407,
- 0x243cc2,
- 0x200d42,
- 0x26cc15,
- 0x247b95,
- 0x275653,
- 0x2480d3,
- 0x2955c7,
- 0x2c0ec8,
- 0x379d90,
- 0x3c020f,
- 0x2c0ed3,
- 0x2c6592,
- 0x2ce1d0,
- 0x2db58f,
- 0x2dc512,
- 0x2dffd1,
- 0x2e0cd3,
- 0x2e9392,
- 0x2ea0cf,
- 0x2f7c4e,
- 0x2f9a92,
- 0x2faed1,
- 0x303e4f,
- 0x347a4e,
- 0x3559d1,
- 0x2fee10,
- 0x32f912,
- 0x36fd51,
- 0x3af4c6,
- 0x30dd47,
- 0x382ac7,
- 0x203702,
- 0x286d05,
- 0x304887,
- 0x21a902,
- 0x218f42,
- 0x230d85,
- 0x226c43,
- 0x244c06,
- 0x26158d,
- 0x2618cc,
- 0x206442,
- 0x31d2cb,
- 0x27c58a,
- 0x212b0a,
- 0x2c04c9,
- 0x2f0c0b,
- 0x215dcd,
- 0x304f8c,
- 0x2f574a,
- 0x277bcc,
- 0x27d34b,
- 0x29c54c,
- 0x2b4c0b,
- 0x2e31c3,
- 0x36f946,
- 0x3061c2,
- 0x2fd502,
- 0x256d03,
- 0x203642,
- 0x203643,
- 0x260b86,
- 0x268387,
- 0x2c48c6,
- 0x2e2448,
- 0x343708,
- 0x2cc7c6,
- 0x20c402,
- 0x309b4d,
- 0x309e8c,
- 0x2dea07,
- 0x30db47,
- 0x2302c2,
- 0x221682,
- 0x260982,
- 0x255e82,
- 0x20f882,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x215443,
- 0x207102,
- 0x207542,
- 0x2da97d45,
- 0x2de97685,
- 0x2e320c86,
- 0x16fb88,
- 0x2e6b68c5,
- 0x20f882,
- 0x201742,
- 0x2ea34cc5,
- 0x2ee852c5,
- 0x2f285e07,
- 0x2f6f6e09,
- 0x2fa74084,
- 0x207b02,
- 0x217202,
- 0x2fe56a05,
- 0x302977c9,
- 0x30785908,
- 0x30ab3185,
- 0x30f3f5c7,
- 0x31227248,
- 0x316ec085,
- 0x31a00106,
- 0x31e41489,
- 0x323311c8,
- 0x326c8988,
- 0x32a9ef0a,
- 0x32e7e204,
- 0x332d99c5,
- 0x336c30c8,
- 0x33b85d85,
- 0x21a602,
- 0x33e11103,
- 0x342aa246,
- 0x3475d1c8,
- 0x34a8ab86,
- 0x34e8a688,
- 0x35348206,
- 0x356e2dc4,
- 0x204d42,
- 0x35addc87,
- 0x35eaf444,
- 0x36280087,
- 0x367b0c87,
- 0x200442,
- 0x36aa3885,
- 0x36e8f904,
- 0x372f1447,
- 0x37632c47,
- 0x37a89006,
- 0x37e38385,
- 0x3829d7c7,
- 0x386d5dc8,
- 0x38ab7887,
- 0x38ea6c89,
- 0x3939e345,
- 0x397778c7,
- 0x39a974c6,
- 0x39e102c8,
- 0x3279cd,
- 0x27a209,
- 0x28384b,
- 0x289ecb,
- 0x2ae3cb,
- 0x2e62cb,
- 0x31804b,
- 0x31830b,
- 0x318949,
- 0x31984b,
- 0x319b0b,
- 0x31a08b,
- 0x31b08a,
- 0x31b5ca,
- 0x31bbcc,
- 0x31e00b,
- 0x31ea4a,
- 0x33064a,
- 0x33c6ce,
- 0x33d1ce,
- 0x33d54a,
- 0x33efca,
- 0x33fa8b,
- 0x33fd4b,
- 0x340b0b,
- 0x36124b,
- 0x36184a,
- 0x36250b,
- 0x3627ca,
- 0x362a4a,
- 0x362cca,
- 0x38424b,
- 0x38c6cb,
- 0x38e64e,
- 0x38e9cb,
- 0x39464b,
- 0x395b0b,
- 0x39900a,
- 0x399289,
- 0x3994ca,
- 0x39a94a,
- 0x3addcb,
- 0x3afa8b,
- 0x3b05ca,
- 0x3b1fcb,
- 0x3b674b,
- 0x3bf58b,
- 0x3a287a88,
- 0x3a68fd09,
- 0x3aaa6409,
- 0x3aee4d48,
- 0x34b945,
- 0x202d43,
- 0x21b744,
- 0x345805,
- 0x273dc6,
- 0x274805,
- 0x28f584,
- 0x3a4dc8,
- 0x312ec5,
- 0x299a84,
- 0x211587,
- 0x2a550a,
- 0x3813ca,
- 0x308f07,
- 0x202c47,
- 0x303647,
- 0x271907,
- 0x2ff9c5,
- 0x204906,
- 0x22b9c7,
- 0x2c8684,
- 0x2db006,
- 0x2daf06,
- 0x208185,
- 0x331c04,
- 0x388bc6,
- 0x2a4707,
- 0x232646,
- 0x2bfa07,
- 0x232dc3,
- 0x26c7c6,
- 0x23cf85,
- 0x285f07,
- 0x27100a,
- 0x284e04,
- 0x220808,
- 0x2a2009,
- 0x2d0e47,
- 0x31e8c6,
- 0x257988,
- 0x28b2c9,
- 0x314784,
- 0x376004,
- 0x35d785,
- 0x22b6c8,
- 0x2ccc07,
- 0x29a3c9,
- 0x3af5c8,
- 0x353706,
- 0x24d486,
- 0x29fd88,
- 0x365bc6,
- 0x297685,
- 0x2890c6,
- 0x280ec8,
- 0x256286,
- 0x25cb8b,
- 0x2ac646,
- 0x2a224d,
- 0x208605,
- 0x2af306,
- 0x218a05,
- 0x35d949,
- 0x27a787,
- 0x36d148,
- 0x2969c6,
- 0x2a1509,
- 0x341046,
- 0x270f85,
- 0x2a7f06,
- 0x2d3586,
- 0x2d3b09,
- 0x333f06,
- 0x3529c7,
- 0x248c85,
- 0x201d83,
- 0x25cd05,
- 0x2a2507,
- 0x338d06,
- 0x208509,
- 0x320c86,
- 0x289306,
- 0x219fc9,
- 0x288ac9,
- 0x2a8747,
- 0x20cd08,
- 0x280509,
- 0x286988,
- 0x38b5c6,
- 0x2de245,
- 0x23fa4a,
- 0x289386,
- 0x2bf1c6,
- 0x2d7605,
- 0x272408,
- 0x2220c7,
- 0x239fca,
- 0x253b46,
- 0x27a645,
- 0x20a506,
- 0x236b47,
- 0x31e787,
- 0x24fc45,
- 0x271145,
- 0x2e79c6,
- 0x2fbfc6,
- 0x2be306,
- 0x2bb884,
- 0x287e09,
- 0x290bc6,
- 0x2d430a,
- 0x222b88,
- 0x3059c8,
- 0x3813ca,
- 0x205b45,
- 0x2a4645,
- 0x3575c8,
- 0x2b0fc8,
- 0x2b43c7,
- 0x295946,
- 0x329608,
- 0x30a447,
- 0x287088,
- 0x2bbec6,
- 0x289b88,
- 0x29cd06,
- 0x257e47,
- 0x2a27c6,
- 0x388bc6,
- 0x383d4a,
- 0x345506,
- 0x2de249,
- 0x36b086,
- 0x2b6c0a,
- 0x2e2dc9,
- 0x2fe406,
- 0x2bccc4,
- 0x2b75cd,
- 0x28ff87,
- 0x32df46,
- 0x2c8845,
- 0x3410c5,
- 0x204dc6,
- 0x2d4fc9,
- 0x3879c7,
- 0x2826c6,
- 0x2bd406,
- 0x28f609,
- 0x33f784,
- 0x3a1184,
- 0x39c0c8,
- 0x260f46,
- 0x279388,
- 0x30fec8,
- 0x378187,
- 0x3beb49,
- 0x2be507,
- 0x2b678a,
- 0x2fc88f,
- 0x25100a,
- 0x2bdc45,
- 0x281105,
- 0x220085,
- 0x28be47,
- 0x236703,
- 0x20cf08,
- 0x201e46,
- 0x201f49,
- 0x2e4806,
- 0x3a3607,
- 0x2a12c9,
- 0x36d048,
- 0x2d76c7,
- 0x315603,
- 0x34b9c5,
- 0x236685,
- 0x2bb6cb,
- 0x385e44,
- 0x30ad44,
- 0x27f006,
- 0x315e87,
- 0x392a4a,
- 0x251a87,
- 0x36a947,
- 0x2852c5,
- 0x2016c5,
- 0x253689,
- 0x388bc6,
- 0x25190d,
- 0x334145,
- 0x2a10c3,
- 0x200dc3,
- 0x39cf05,
- 0x3534c5,
- 0x257988,
- 0x283007,
- 0x3a0f06,
- 0x2a6086,
- 0x232545,
- 0x23cd87,
- 0x377c87,
- 0x23ea07,
- 0x2d9a4a,
- 0x26c888,
- 0x2bb884,
- 0x256007,
- 0x284707,
- 0x352846,
- 0x26f5c7,
- 0x2ece48,
- 0x2e8548,
- 0x276346,
- 0x374f88,
- 0x2d1704,
- 0x22b9c6,
- 0x239b86,
- 0x333b86,
- 0x2d0006,
- 0x233ac4,
- 0x2719c6,
- 0x2c7146,
- 0x29f406,
- 0x2381c6,
- 0x213ec6,
- 0x223f06,
- 0x3a0e08,
- 0x3bcc88,
- 0x2da288,
- 0x274a08,
- 0x357546,
- 0x217e05,
- 0x2dd4c6,
- 0x2b3205,
- 0x397f07,
- 0x27df05,
- 0x21ae83,
- 0x2058c5,
- 0x34cc44,
- 0x214005,
- 0x22dc83,
- 0x33d807,
- 0x374a48,
- 0x2bfac6,
- 0x2b0c4d,
- 0x2810c6,
- 0x29e985,
- 0x227603,
- 0x2c2a89,
- 0x33f906,
- 0x29dd86,
- 0x2a8004,
- 0x250f87,
- 0x334546,
- 0x387c85,
- 0x20b2c3,
- 0x209484,
- 0x2848c6,
- 0x204a04,
- 0x239c88,
- 0x2005c9,
- 0x325f49,
- 0x2a7e0a,
- 0x2a918d,
- 0x20abc7,
- 0x2bf046,
- 0x205ec4,
- 0x2f6e09,
- 0x28e688,
- 0x28fb86,
- 0x245246,
- 0x26f5c7,
- 0x2b9786,
- 0x22c986,
- 0x36aac6,
- 0x3b0d0a,
- 0x227248,
- 0x364dc5,
- 0x26fa09,
- 0x28758a,
- 0x2f1e88,
- 0x2a40c8,
- 0x29dd08,
- 0x2ad74c,
- 0x318585,
- 0x2a6308,
- 0x2e7546,
- 0x36d2c6,
- 0x3a34c7,
- 0x251985,
- 0x289245,
- 0x325e09,
- 0x219847,
- 0x201f05,
- 0x22d887,
- 0x200dc3,
- 0x2cd145,
- 0x214308,
- 0x25d087,
- 0x2a3f89,
- 0x2dac05,
- 0x395a04,
- 0x2a8e48,
- 0x2dddc7,
- 0x2d7888,
- 0x2508c8,
- 0x2d6645,
- 0x281906,
- 0x2a6186,
- 0x277449,
- 0x2b26c7,
- 0x2b3ac6,
- 0x2236c7,
- 0x20e743,
- 0x274084,
- 0x2d1805,
- 0x23cec4,
- 0x393244,
- 0x288547,
- 0x25b347,
- 0x234284,
- 0x2a3dd0,
- 0x234e47,
- 0x2016c5,
- 0x37178c,
- 0x250684,
- 0x2a9e48,
- 0x257d49,
- 0x36e646,
- 0x34dd48,
- 0x223384,
- 0x37d0c8,
- 0x23a5c6,
- 0x238048,
- 0x2a4cc6,
- 0x2cc8cb,
- 0x201d85,
- 0x2d1688,
- 0x200a04,
- 0x200a0a,
- 0x2a3f89,
- 0x357f06,
- 0x220148,
- 0x263805,
- 0x2b9044,
- 0x2a9d46,
- 0x23e8c8,
- 0x287a88,
- 0x329e86,
- 0x358b04,
- 0x23f9c6,
- 0x2be587,
- 0x27ff87,
- 0x26f5cf,
- 0x204187,
- 0x2fe4c7,
- 0x23d2c5,
- 0x35fcc5,
- 0x2a8409,
- 0x2ed806,
- 0x286045,
- 0x288dc7,
- 0x2c6188,
- 0x29f505,
- 0x2a27c6,
- 0x2229c8,
- 0x28ab8a,
- 0x39c888,
- 0x292f47,
- 0x2fccc6,
- 0x26f9c6,
- 0x20ca43,
- 0x2052c3,
- 0x287749,
- 0x280389,
- 0x2a6b86,
- 0x2dac05,
- 0x304588,
- 0x220148,
- 0x365d48,
- 0x36ab4b,
- 0x2b0e87,
- 0x315849,
- 0x26f848,
- 0x356284,
- 0x3886c8,
- 0x295089,
- 0x2b3dc5,
- 0x28bd47,
- 0x274105,
- 0x287988,
- 0x297bcb,
- 0x29d510,
- 0x2aec45,
- 0x21e20c,
- 0x3a10c5,
- 0x285343,
- 0x296706,
- 0x2c5a04,
- 0x28fa06,
- 0x2a4707,
- 0x222a44,
- 0x24c3c8,
- 0x20cdcd,
- 0x330a05,
- 0x20ac04,
- 0x241b84,
- 0x27bd89,
- 0x292bc8,
- 0x320b07,
- 0x23a648,
- 0x287ec8,
- 0x2829c5,
- 0x28c647,
- 0x282947,
- 0x342807,
- 0x271149,
- 0x223c49,
- 0x36c986,
- 0x2c3a06,
- 0x26f806,
- 0x33e9c5,
- 0x3b4944,
- 0x200006,
- 0x200386,
- 0x282a08,
- 0x23680b,
- 0x284cc7,
- 0x205ec4,
- 0x334486,
- 0x2ed187,
- 0x388f45,
- 0x210bc5,
- 0x21b484,
- 0x223bc6,
- 0x200088,
- 0x2f6e09,
- 0x259706,
- 0x28df88,
- 0x387d46,
- 0x355088,
- 0x2d6c8c,
- 0x282886,
- 0x29e64d,
- 0x29eacb,
- 0x352a85,
- 0x377dc7,
- 0x334006,
- 0x31e648,
- 0x36ca09,
- 0x276608,
- 0x2016c5,
- 0x2076c7,
- 0x286a88,
- 0x332489,
- 0x2a0986,
- 0x25960a,
- 0x31e3c8,
- 0x27644b,
- 0x2d964c,
- 0x37d1c8,
- 0x283e46,
- 0x28c048,
- 0x28a807,
- 0x2e4909,
- 0x2976cd,
- 0x2a26c6,
- 0x365308,
- 0x3bcb49,
- 0x2c4a48,
- 0x289c88,
- 0x2c798c,
- 0x2c8e87,
- 0x2c96c7,
- 0x270f85,
- 0x31a807,
- 0x2c6048,
- 0x2a9dc6,
- 0x26020c,
- 0x2f60c8,
- 0x2d5708,
- 0x262246,
- 0x236407,
- 0x36cb84,
- 0x274a08,
- 0x28d88c,
- 0x22834c,
- 0x2bdcc5,
- 0x2b85c7,
- 0x358a86,
- 0x236386,
- 0x35db08,
- 0x202b84,
- 0x23264b,
- 0x37d80b,
- 0x2fccc6,
- 0x20cc47,
- 0x339305,
- 0x278585,
- 0x232786,
- 0x2637c5,
- 0x385e05,
- 0x2e40c7,
- 0x27f609,
- 0x2fc184,
- 0x2feac5,
- 0x2ead45,
- 0x2b5448,
- 0x235685,
- 0x2c0b89,
- 0x2b16c7,
- 0x2b16cb,
- 0x261ac6,
- 0x3a0b49,
- 0x331b48,
- 0x272885,
- 0x342908,
- 0x223c88,
- 0x249b07,
- 0x383b47,
- 0x2885c9,
- 0x237f87,
- 0x27de09,
- 0x29b88c,
- 0x2a6b88,
- 0x331009,
- 0x360987,
- 0x287f89,
- 0x25b487,
- 0x2d9748,
- 0x3bed05,
- 0x22b946,
- 0x2c8888,
- 0x30cf08,
- 0x287449,
- 0x385e47,
- 0x278645,
- 0x21f949,
- 0x345306,
- 0x2440c4,
- 0x2440c6,
- 0x35d048,
- 0x254547,
- 0x236a08,
- 0x375049,
- 0x3b1a07,
- 0x2a56c6,
- 0x377e84,
- 0x205949,
- 0x28c4c8,
- 0x262107,
- 0x2b56c6,
- 0x236746,
- 0x2bf144,
- 0x241986,
- 0x202003,
- 0x34f109,
- 0x201d46,
- 0x3752c5,
- 0x2a6086,
- 0x2d79c5,
- 0x286f08,
- 0x37cf07,
- 0x261e06,
- 0x234d06,
- 0x3059c8,
- 0x2a8587,
- 0x2a2705,
- 0x2a3bc8,
- 0x3bb748,
- 0x31e3c8,
- 0x3a0f85,
- 0x22b9c6,
- 0x325d09,
- 0x2772c4,
- 0x351d8b,
- 0x22c68b,
- 0x364cc9,
- 0x200dc3,
- 0x25efc5,
- 0x21d306,
- 0x3ba188,
- 0x2fc804,
- 0x2bfac6,
- 0x2d9b89,
- 0x2bc9c5,
- 0x2e4006,
- 0x2dddc6,
- 0x220144,
- 0x2af4ca,
- 0x375208,
- 0x30cf06,
- 0x2cf245,
- 0x3b8247,
- 0x23d187,
- 0x281904,
- 0x22c8c7,
- 0x2b6784,
- 0x333b06,
- 0x20cf43,
- 0x271145,
- 0x334f05,
- 0x3beec8,
- 0x2561c5,
- 0x2825c9,
- 0x274847,
- 0x27484b,
- 0x2aa04c,
- 0x2aa64a,
- 0x33f5c7,
- 0x202e83,
- 0x202e88,
- 0x3a1145,
- 0x29f585,
- 0x2140c4,
- 0x2d9646,
- 0x257d46,
- 0x2419c7,
- 0x34d58b,
- 0x233ac4,
- 0x2e7644,
- 0x2cbd04,
- 0x2d3706,
- 0x222a44,
- 0x22b7c8,
- 0x34b885,
- 0x24fac5,
- 0x365c87,
- 0x377ec9,
- 0x3534c5,
- 0x38dcca,
- 0x248b89,
- 0x2911ca,
- 0x3b0e49,
- 0x310444,
- 0x2bd4c5,
- 0x2b9888,
- 0x2f150b,
- 0x35d785,
- 0x33be86,
- 0x236304,
- 0x282b06,
- 0x3b1889,
- 0x2ed287,
- 0x320e48,
- 0x2a9506,
- 0x2be507,
- 0x287a88,
- 0x3870c6,
- 0x39b804,
- 0x3743c7,
- 0x376945,
- 0x389b87,
- 0x200104,
- 0x333f86,
- 0x2d5f48,
- 0x29ec88,
- 0x2e7007,
- 0x27f988,
- 0x29cdc5,
- 0x213e44,
- 0x3812c8,
- 0x27fa84,
- 0x220005,
- 0x2ffbc4,
- 0x30a547,
- 0x290c87,
- 0x2880c8,
- 0x2d7a06,
- 0x256145,
- 0x2823c8,
- 0x39ca88,
- 0x2a7d49,
- 0x22c986,
- 0x23a048,
- 0x20088a,
- 0x388fc8,
- 0x2ec085,
- 0x349286,
- 0x248a48,
- 0x20778a,
- 0x226047,
- 0x28ee45,
- 0x29ad48,
- 0x2c2404,
- 0x272486,
- 0x2c9a48,
- 0x213ec6,
- 0x20b308,
- 0x296e87,
- 0x211486,
- 0x2bccc4,
- 0x364707,
- 0x2b8e84,
- 0x3b1847,
- 0x2a064d,
- 0x288805,
- 0x2d4dcb,
- 0x2285c6,
- 0x257808,
- 0x24c384,
- 0x357746,
- 0x2848c6,
- 0x28c387,
- 0x29e30d,
- 0x24e587,
- 0x2b93c8,
- 0x278705,
- 0x276e08,
- 0x2ccb86,
- 0x29ce48,
- 0x22ab46,
- 0x25a707,
- 0x39ae89,
- 0x36ebc7,
- 0x28fe48,
- 0x27af45,
- 0x222e08,
- 0x219405,
- 0x3ab545,
- 0x3b10c5,
- 0x23ef43,
- 0x289144,
- 0x26fa05,
- 0x241489,
- 0x3043c6,
- 0x2ecf48,
- 0x383905,
- 0x2bb507,
- 0x2ad54a,
- 0x2e3f49,
- 0x2d348a,
- 0x2da308,
- 0x22d6cc,
- 0x288e4d,
- 0x301bc3,
- 0x20b208,
- 0x209445,
- 0x28a946,
- 0x36cec6,
- 0x2ebb05,
- 0x2237c9,
- 0x20e1c5,
- 0x2823c8,
- 0x25fe06,
- 0x35e006,
- 0x2a8d09,
- 0x39ed87,
- 0x297e86,
- 0x2ad4c8,
- 0x333a88,
- 0x2e4f47,
- 0x2381ce,
- 0x2ccdc5,
- 0x332385,
- 0x213dc8,
- 0x20a247,
- 0x200842,
- 0x2c7504,
- 0x28f90a,
- 0x2621c8,
- 0x389206,
- 0x2a1408,
- 0x2a6186,
- 0x3337c8,
- 0x2b3ac8,
- 0x3ab504,
- 0x2bba45,
- 0x681384,
- 0x681384,
- 0x681384,
- 0x201e03,
- 0x2365c6,
- 0x282886,
- 0x2a508c,
- 0x200943,
- 0x223286,
- 0x20cf04,
- 0x33f888,
- 0x2d99c5,
- 0x28fa06,
- 0x2c31c8,
- 0x2db2c6,
- 0x261d86,
- 0x357d08,
- 0x2d1887,
- 0x237d49,
- 0x2fa8ca,
- 0x20a944,
- 0x27df05,
- 0x29a385,
- 0x2f6c06,
- 0x20ac06,
- 0x2a5ac6,
- 0x2ff206,
- 0x237e84,
- 0x237e8b,
- 0x23c584,
- 0x2a5245,
- 0x2b2ac5,
- 0x378246,
- 0x2090c8,
- 0x288d07,
- 0x320c04,
- 0x232fc3,
- 0x2c1f05,
- 0x311847,
- 0x288c0b,
- 0x3bedc7,
- 0x2c30c8,
- 0x2e7287,
- 0x23d406,
- 0x27a4c8,
- 0x2b004b,
- 0x345746,
- 0x21d449,
- 0x2b01c5,
- 0x315603,
- 0x2e4006,
- 0x296d88,
- 0x21f083,
- 0x271e03,
- 0x287a86,
- 0x2a6186,
- 0x36958a,
- 0x283e85,
- 0x28470b,
- 0x2a5fcb,
- 0x210a83,
- 0x20b943,
- 0x2b6704,
- 0x2af6c7,
- 0x296e04,
- 0x277344,
- 0x2e73c4,
- 0x223e88,
- 0x2cf188,
- 0x205249,
- 0x39e3c8,
- 0x28b487,
- 0x2381c6,
- 0x2ecb8f,
- 0x2ccf06,
- 0x2d9944,
- 0x2cefca,
- 0x311747,
- 0x208206,
- 0x297509,
- 0x2051c5,
- 0x3bf005,
- 0x205306,
- 0x222f43,
- 0x2c2449,
- 0x2273c6,
- 0x202d09,
- 0x392a46,
- 0x271145,
- 0x2be0c5,
- 0x204183,
- 0x2af808,
- 0x213887,
- 0x201e44,
- 0x33f708,
- 0x2ffe04,
- 0x2f0486,
- 0x296706,
- 0x248fc6,
- 0x2d1549,
- 0x29f505,
- 0x388bc6,
- 0x2666c9,
- 0x2cb906,
- 0x223f06,
- 0x397346,
- 0x21ce85,
- 0x2ffbc6,
- 0x25a704,
- 0x3bed05,
- 0x2c8884,
- 0x2b9f86,
- 0x334104,
- 0x2136c3,
- 0x28e745,
- 0x23dac8,
- 0x262987,
- 0x2c1ac9,
- 0x28ed48,
- 0x29fb51,
- 0x2dde4a,
- 0x2fcc07,
- 0x25a986,
- 0x20cf04,
- 0x2c8988,
- 0x233fc8,
- 0x29fd0a,
- 0x2c094d,
- 0x2a7f06,
- 0x357e06,
- 0x3647c6,
- 0x24fac7,
- 0x2b9485,
- 0x210187,
- 0x20cdc5,
- 0x2b1804,
- 0x2ae086,
- 0x241807,
- 0x2c214d,
- 0x248987,
- 0x3a4cc8,
- 0x2826c9,
- 0x349186,
- 0x2a0905,
- 0x22dcc4,
- 0x35d146,
- 0x281806,
- 0x262346,
- 0x2a1c88,
- 0x21cd43,
- 0x20aa83,
- 0x338e45,
- 0x207b06,
- 0x2b3a85,
- 0x2a9708,
- 0x2a48ca,
- 0x3a2dc4,
- 0x33f888,
- 0x29dd08,
- 0x378087,
- 0x3839c9,
- 0x2c2dc8,
- 0x2a6d07,
- 0x2957c6,
- 0x213eca,
- 0x35d1c8,
- 0x2f8589,
- 0x292c88,
- 0x229b89,
- 0x2e8747,
- 0x33bdc5,
- 0x36ad46,
- 0x2a9c48,
- 0x287c08,
- 0x29de88,
- 0x2fcdc8,
- 0x2a5245,
- 0x218944,
- 0x213588,
- 0x24b384,
- 0x3b0c44,
- 0x271145,
- 0x299ac7,
- 0x377c89,
- 0x28c187,
- 0x2008c5,
- 0x27f206,
- 0x363686,
- 0x200b84,
- 0x2a9046,
- 0x255f84,
- 0x276d06,
- 0x377a46,
- 0x21eec6,
- 0x2016c5,
- 0x2a95c7,
- 0x202e83,
- 0x21dd89,
- 0x3057c8,
- 0x2f6d04,
- 0x2f6d0d,
- 0x29ed88,
- 0x2d7248,
- 0x2f8506,
- 0x39af89,
- 0x2e3f49,
- 0x3b1585,
- 0x2a49ca,
- 0x2edbca,
- 0x2a5ccc,
- 0x2a5e46,
- 0x27fe06,
- 0x2cd086,
- 0x2c84c9,
- 0x28ab86,
- 0x2101c6,
- 0x20e286,
- 0x274a08,
- 0x27f986,
- 0x2d92cb,
- 0x299c45,
- 0x24fac5,
- 0x280085,
- 0x39be46,
- 0x213e83,
- 0x248f46,
- 0x248907,
- 0x2c8845,
- 0x24d545,
- 0x3410c5,
- 0x313846,
- 0x204dc4,
- 0x385806,
- 0x284049,
- 0x39bccc,
- 0x2b1548,
- 0x23e844,
- 0x2ff8c6,
- 0x2286c6,
- 0x296d88,
- 0x220148,
- 0x39bbc9,
- 0x3b8247,
- 0x260c89,
- 0x255806,
- 0x237404,
- 0x214944,
- 0x20a584,
- 0x287a88,
- 0x377aca,
- 0x353446,
- 0x35fb87,
- 0x37e787,
- 0x3a0c45,
- 0x29a344,
- 0x295046,
- 0x2b94c6,
- 0x202bc3,
- 0x305607,
- 0x2507c8,
- 0x3b16ca,
- 0x2d4708,
- 0x28a688,
- 0x334145,
- 0x352b85,
- 0x284dc5,
- 0x3a1006,
- 0x2393c6,
- 0x25b285,
- 0x34f349,
- 0x29a14c,
- 0x284e87,
- 0x29fd88,
- 0x24ee05,
- 0x681384,
- 0x240ac4,
- 0x25d1c4,
- 0x217946,
- 0x2a728e,
- 0x3bf087,
- 0x24fcc5,
- 0x27724c,
- 0x2ffcc7,
- 0x241787,
- 0x274e89,
- 0x2208c9,
- 0x28ee45,
- 0x3057c8,
- 0x325d09,
- 0x31e285,
- 0x2c8788,
- 0x227546,
- 0x381546,
- 0x2e2dc4,
- 0x25ff08,
- 0x248743,
- 0x235e44,
- 0x2c1f85,
- 0x204dc7,
- 0x21b4c5,
- 0x200749,
- 0x27e64d,
- 0x2935c6,
- 0x229b04,
- 0x2958c8,
- 0x27f44a,
- 0x21da87,
- 0x243905,
- 0x235e83,
- 0x2a618e,
- 0x2af90c,
- 0x2f1f87,
- 0x2a7447,
- 0x200143,
- 0x28abc5,
- 0x25d1c5,
- 0x2a17c8,
- 0x29db49,
- 0x23e746,
- 0x296e04,
- 0x2fcb46,
- 0x3650cb,
- 0x2e3ccc,
- 0x376447,
- 0x2d9585,
- 0x3bb648,
- 0x2e4d05,
- 0x2cefc7,
- 0x2ddc87,
- 0x248745,
- 0x213e83,
- 0x3b36c4,
- 0x21b705,
- 0x2fc085,
- 0x2fc086,
- 0x2821c8,
- 0x241807,
- 0x36d1c6,
- 0x25b686,
- 0x3b1006,
- 0x2f88c9,
- 0x28c747,
- 0x262606,
- 0x2e3e46,
- 0x27e106,
- 0x2af405,
- 0x21e8c6,
- 0x390e05,
- 0x235708,
- 0x2990cb,
- 0x294b86,
- 0x37e7c4,
- 0x2c8109,
- 0x274844,
- 0x2274c8,
- 0x2441c7,
- 0x289b84,
- 0x2c2688,
- 0x2c94c4,
- 0x2af444,
- 0x39ac45,
- 0x330a46,
- 0x223dc7,
- 0x20b3c3,
- 0x2a5785,
- 0x32a504,
- 0x3323c6,
- 0x3b1608,
- 0x39c785,
- 0x298d89,
- 0x21fb45,
- 0x223288,
- 0x22cfc7,
- 0x398048,
- 0x2c1907,
- 0x2fe589,
- 0x271846,
- 0x360486,
- 0x20e284,
- 0x295705,
- 0x3093cc,
- 0x280087,
- 0x280fc7,
- 0x37e648,
- 0x2935c6,
- 0x2794c4,
- 0x34bc04,
- 0x288449,
- 0x2cd186,
- 0x253707,
- 0x2cff84,
- 0x24ab06,
- 0x35f245,
- 0x2d7547,
- 0x2d9246,
- 0x2594c9,
- 0x2eda07,
- 0x26f5c7,
- 0x2a8b86,
- 0x24aa45,
- 0x285988,
- 0x227248,
- 0x2f6a46,
- 0x39c7c5,
- 0x344806,
- 0x202c03,
- 0x2a1649,
- 0x2a584e,
- 0x2c1608,
- 0x2fff08,
- 0x2f684b,
- 0x298fc6,
- 0x20a884,
- 0x261d84,
- 0x2a594a,
- 0x21e107,
- 0x2626c5,
- 0x21d449,
- 0x2c7205,
- 0x3b0c87,
- 0x250584,
- 0x27b907,
- 0x30fdc8,
- 0x2d0f06,
- 0x365489,
- 0x2c2eca,
- 0x21e086,
- 0x29e8c6,
- 0x2b2a45,
- 0x38ef85,
- 0x325647,
- 0x24ec48,
- 0x35f188,
- 0x3ab506,
- 0x2be145,
- 0x20a98e,
- 0x2bb884,
- 0x2a1745,
- 0x27eb89,
- 0x2ed608,
- 0x292e86,
- 0x2a36cc,
- 0x2a44d0,
- 0x2a6ecf,
- 0x2a8308,
- 0x33f5c7,
- 0x2016c5,
- 0x26fa05,
- 0x389089,
- 0x29af49,
- 0x23fac6,
- 0x35d807,
- 0x2b8545,
- 0x2b43c9,
- 0x3528c6,
- 0x28a9cd,
- 0x288789,
- 0x277344,
- 0x2c1388,
- 0x213649,
- 0x353606,
- 0x27f305,
- 0x360486,
- 0x320d09,
- 0x281688,
- 0x217e05,
- 0x200984,
- 0x2a388b,
- 0x3534c5,
- 0x2a39c6,
- 0x289186,
- 0x26e646,
- 0x27c18b,
- 0x298e89,
- 0x25b5c5,
- 0x397e07,
- 0x2dddc6,
- 0x34dec6,
- 0x25cf48,
- 0x330b49,
- 0x3a4a8c,
- 0x311648,
- 0x23c586,
- 0x329e83,
- 0x28bf46,
- 0x27bfc5,
- 0x284a48,
- 0x2bdb46,
- 0x2d7788,
- 0x251b05,
- 0x283245,
- 0x27a8c8,
- 0x333947,
- 0x36ce07,
- 0x2419c7,
- 0x34dd48,
- 0x39ad08,
- 0x31a706,
- 0x2b9dc7,
- 0x273f47,
- 0x27be8a,
- 0x20d703,
- 0x39be46,
- 0x23e985,
- 0x28f904,
- 0x2826c9,
- 0x2fe504,
- 0x262a04,
- 0x2a4d44,
- 0x2a744b,
- 0x2137c7,
- 0x20abc5,
- 0x29cac8,
- 0x27f206,
- 0x27f208,
- 0x283dc6,
- 0x293345,
- 0x293e85,
- 0x295f46,
- 0x296b48,
- 0x297448,
- 0x282886,
- 0x29c90f,
- 0x2a1110,
- 0x208605,
- 0x202e83,
- 0x2374c5,
- 0x315788,
- 0x29ae49,
- 0x31e3c8,
- 0x2f8748,
- 0x2bec08,
- 0x213887,
- 0x27eec9,
- 0x2d7988,
- 0x2730c4,
- 0x2a4bc8,
- 0x2b5509,
- 0x2babc7,
- 0x2a2644,
- 0x28c248,
- 0x2a938a,
- 0x3085c6,
- 0x2a7f06,
- 0x22c849,
- 0x2a4707,
- 0x2d4588,
- 0x2fdbc8,
- 0x2cfe08,
- 0x3690c5,
- 0x38ff05,
- 0x24fac5,
- 0x25d185,
- 0x38cb87,
- 0x213e85,
- 0x2c8845,
- 0x20ae06,
- 0x31e307,
- 0x2f1447,
- 0x2a9686,
- 0x2da845,
- 0x2a39c6,
- 0x202f45,
- 0x2b83c8,
- 0x2f1e04,
- 0x2cb986,
- 0x348084,
- 0x2b9048,
- 0x2cba8a,
- 0x28300c,
- 0x34d785,
- 0x24fb86,
- 0x3a4c46,
- 0x234b86,
- 0x23c604,
- 0x35f505,
- 0x283c07,
- 0x2a4789,
- 0x2d3c07,
- 0x681384,
- 0x681384,
- 0x320a85,
- 0x38d584,
- 0x2a308a,
- 0x27f086,
- 0x27a704,
- 0x208185,
- 0x3875c5,
- 0x2b93c4,
- 0x288dc7,
- 0x21fac7,
- 0x2d3708,
- 0x342348,
- 0x217e09,
- 0x2a5308,
- 0x2a324b,
- 0x251044,
- 0x375f45,
- 0x2860c5,
- 0x241949,
- 0x330b49,
- 0x2c8008,
- 0x243f48,
- 0x2df044,
- 0x228705,
- 0x202d43,
- 0x2f6bc5,
- 0x388c46,
- 0x29d98c,
- 0x2189c6,
- 0x37cfc6,
- 0x293105,
- 0x3138c8,
- 0x2c1786,
- 0x25ab06,
- 0x2a7f06,
- 0x22e2cc,
- 0x262504,
- 0x3b114a,
- 0x293048,
- 0x29d7c7,
- 0x32a406,
- 0x23e807,
- 0x2f2ec5,
- 0x2b56c6,
- 0x35c286,
- 0x367cc7,
- 0x262a44,
- 0x30a645,
- 0x27eb84,
- 0x2b1887,
- 0x27edc8,
- 0x27fc8a,
- 0x286907,
- 0x375387,
- 0x33f547,
- 0x2e4e49,
- 0x29d98a,
- 0x2373c3,
- 0x262945,
- 0x20b343,
- 0x2e7409,
- 0x254ec8,
- 0x23d2c7,
- 0x31e4c9,
- 0x227346,
- 0x2042c8,
- 0x33d785,
- 0x39cb8a,
- 0x2dbc89,
- 0x276209,
- 0x3a34c7,
- 0x2340c9,
- 0x21edc8,
- 0x367e86,
- 0x24fd48,
- 0x21ce87,
- 0x237f87,
- 0x248b87,
- 0x2d5dc8,
- 0x2ff746,
- 0x2a9145,
- 0x283c07,
- 0x29e3c8,
- 0x348004,
- 0x2d41c4,
- 0x297d87,
- 0x2b3e47,
- 0x325b8a,
- 0x367e06,
- 0x35854a,
- 0x2c7447,
- 0x2bb647,
- 0x358004,
- 0x27dec4,
- 0x2d7446,
- 0x281b84,
- 0x281b8c,
- 0x203185,
- 0x21ff89,
- 0x265684,
- 0x2b9485,
- 0x27f3c8,
- 0x22d245,
- 0x204dc6,
- 0x225f44,
- 0x28f30a,
- 0x2b25c6,
- 0x2a424a,
- 0x2b7887,
- 0x236b45,
- 0x222f45,
- 0x3a0c8a,
- 0x296cc5,
- 0x2a7e06,
- 0x24b384,
- 0x2b6886,
- 0x325705,
- 0x2bdc06,
- 0x2e700c,
- 0x2d388a,
- 0x2957c4,
- 0x2381c6,
- 0x2a4707,
- 0x2d91c4,
- 0x274a08,
- 0x39e246,
- 0x20a809,
- 0x2baec9,
- 0x2a6c89,
- 0x351f46,
- 0x21cf86,
- 0x24fe87,
- 0x34f288,
- 0x21cd89,
- 0x2137c7,
- 0x29cc46,
- 0x2be587,
- 0x364685,
- 0x2bb884,
- 0x24fa47,
- 0x274105,
- 0x28f845,
- 0x36c347,
- 0x248608,
- 0x3bb5c6,
- 0x29f24d,
- 0x2a19cf,
- 0x2a5fcd,
- 0x200904,
- 0x23dbc6,
- 0x2dc1c8,
- 0x20e245,
- 0x27c048,
- 0x2499ca,
- 0x277344,
- 0x365646,
- 0x33ae07,
- 0x233ac7,
- 0x2d1949,
- 0x24fd05,
- 0x2b93c4,
- 0x2bb98a,
- 0x2c2989,
- 0x2341c7,
- 0x272306,
- 0x353606,
- 0x228646,
- 0x374486,
- 0x2db94f,
- 0x2dc089,
- 0x27f986,
- 0x233ec6,
- 0x320289,
- 0x2b9ec7,
- 0x229403,
- 0x22e446,
- 0x2052c3,
- 0x2eb9c8,
- 0x2be3c7,
- 0x2a8509,
- 0x296588,
- 0x36cf48,
- 0x385f86,
- 0x218909,
- 0x398845,
- 0x2b9f84,
- 0x29a687,
- 0x2c8545,
- 0x200904,
- 0x20ac88,
- 0x202044,
- 0x2b9c07,
- 0x3749c6,
- 0x2e7a85,
- 0x292c88,
- 0x3534cb,
- 0x3778c7,
- 0x3a0f06,
- 0x2ccf84,
- 0x348186,
- 0x271145,
- 0x274105,
- 0x285709,
- 0x2889c9,
- 0x237fc4,
- 0x238005,
- 0x238205,
- 0x39ca06,
- 0x3058c8,
- 0x2c6b86,
- 0x25060b,
- 0x36e4ca,
- 0x2b8f85,
- 0x293f06,
- 0x3a2ac5,
- 0x2e9dc5,
- 0x2ad387,
- 0x39c0c8,
- 0x260c84,
- 0x26be86,
- 0x2974c6,
- 0x21ef87,
- 0x3155c4,
- 0x2848c6,
- 0x2427c5,
- 0x2427c9,
- 0x21b584,
- 0x29a4c9,
- 0x282886,
- 0x2c8f48,
- 0x238205,
- 0x37e885,
- 0x2bdc06,
- 0x3a4989,
- 0x2208c9,
- 0x37d046,
- 0x2ed708,
- 0x277348,
- 0x3a2a84,
- 0x2bbcc4,
- 0x2bbcc8,
- 0x32e048,
- 0x260d89,
- 0x388bc6,
- 0x2a7f06,
- 0x3294cd,
- 0x2bfac6,
- 0x2d6b49,
- 0x2dd5c5,
- 0x205306,
- 0x2102c8,
- 0x326885,
- 0x273f84,
- 0x271145,
- 0x2882c8,
- 0x2a2e49,
- 0x27ec44,
- 0x333f86,
- 0x22d10a,
- 0x2f1e88,
- 0x325d09,
- 0x261f0a,
- 0x31e446,
- 0x2a1b88,
- 0x2ced85,
- 0x2c5ec8,
- 0x2c1a05,
- 0x227209,
- 0x37ac49,
- 0x203282,
- 0x2b01c5,
- 0x2782c6,
- 0x2827c7,
- 0x34e085,
- 0x30ce06,
- 0x326948,
- 0x2935c6,
- 0x2b9749,
- 0x2810c6,
- 0x25cdc8,
- 0x2b0805,
- 0x264906,
- 0x25a808,
- 0x287a88,
- 0x2e8648,
- 0x353788,
- 0x21e8c4,
- 0x281943,
- 0x2b9984,
- 0x286b06,
- 0x3646c4,
- 0x2ffe47,
- 0x25aa09,
- 0x2cbd05,
- 0x2fdbc6,
- 0x22e446,
- 0x28200b,
- 0x2b8ec6,
- 0x2cf8c6,
- 0x2d13c8,
- 0x24d486,
- 0x236943,
- 0x2164c3,
- 0x2bb884,
- 0x239f45,
- 0x387b87,
- 0x27edc8,
- 0x27edcf,
- 0x283b0b,
- 0x3056c8,
- 0x334006,
- 0x3059ce,
- 0x251143,
- 0x387b04,
- 0x2b8e45,
- 0x2b9246,
- 0x29514b,
- 0x299b86,
- 0x222a49,
- 0x2e7a85,
- 0x3999c8,
- 0x216688,
- 0x22078c,
- 0x2a7486,
- 0x2f6c06,
- 0x2dac05,
- 0x28fc08,
- 0x25a805,
- 0x356288,
- 0x2a3a4a,
- 0x2a6409,
- 0x681384,
- 0x3b60f882,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x208e83,
- 0x201a03,
- 0x213083,
- 0x286644,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x2de944,
- 0x323043,
- 0x34e347,
- 0x28cac3,
- 0x200e03,
- 0x293408,
- 0x201a03,
- 0x29630b,
- 0x2f3743,
- 0x3a03c6,
- 0x205082,
- 0x22facb,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x201a03,
- 0x220b83,
- 0x201503,
- 0x207102,
- 0x16fb88,
- 0x32d1c5,
- 0x274188,
- 0x2f9f88,
- 0x20f882,
- 0x20a605,
- 0x3785c7,
- 0x201842,
- 0x24c5c7,
- 0x207b02,
- 0x2f6607,
- 0x2cc409,
- 0x2ce948,
- 0x2cfc89,
- 0x24b2c2,
- 0x2707c7,
- 0x37cdc4,
- 0x378687,
- 0x36e3c7,
- 0x264d42,
- 0x28cac3,
- 0x214642,
- 0x204d42,
- 0x200442,
- 0x21cc82,
- 0x206b42,
- 0x20d2c2,
- 0x2aff05,
- 0x240a05,
- 0xf882,
- 0x3cac3,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x170c3,
- 0x8c1,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x221f43,
- 0x3e4f5906,
- 0x42bc3,
- 0x873c5,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x84c2,
- 0x16fb88,
- 0xe03,
- 0x1a3443,
- 0x4ec04,
- 0xe5105,
- 0x207102,
- 0x39cdc4,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x38acc3,
- 0x2b13c5,
- 0x255783,
- 0x211a83,
- 0x208e83,
- 0x21b543,
- 0x201a03,
- 0x215443,
- 0x20e383,
- 0x202443,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x20f882,
- 0x201a03,
- 0x16fb88,
- 0x323043,
- 0x1a3443,
- 0x16fb88,
- 0x1a3443,
- 0x2bcc43,
- 0x238543,
- 0x23a844,
- 0x23cac3,
- 0x323043,
- 0x205e82,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x205e82,
- 0x229443,
- 0x208e83,
- 0x201a03,
- 0x2ef783,
- 0x215443,
- 0x207102,
- 0x20f882,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x3a03c5,
- 0xa4f06,
- 0x286644,
- 0x205082,
- 0x16fb88,
- 0x207102,
- 0x25088,
- 0x134943,
- 0x20f882,
- 0x42899306,
- 0x6a04,
- 0xb610b,
- 0x44e86,
- 0x8cbc7,
- 0x23cac3,
- 0x51648,
- 0x323043,
- 0x8b205,
- 0x1493c4,
- 0x227583,
- 0x556c7,
- 0xe06c4,
- 0x208e83,
- 0x1a3284,
- 0x1a3443,
- 0x201a03,
- 0x2f4544,
- 0xb5ec8,
- 0x12cf06,
- 0x16308,
- 0x1252c5,
- 0x9fc9,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x200e03,
- 0x201a03,
- 0x2f3743,
- 0x205082,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231603,
- 0x21bf84,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x2de944,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x3a03c6,
- 0x23cac3,
- 0x323043,
- 0x18a783,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x8cbc7,
- 0x16fb88,
- 0x323043,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x45238543,
- 0x23cac3,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x207102,
- 0x20f882,
- 0x238543,
- 0x323043,
- 0x208e83,
- 0x200442,
- 0x201a03,
- 0x31f1c7,
- 0x342b8b,
- 0x22fc83,
- 0x244708,
- 0x34f007,
- 0x348746,
- 0x382d45,
- 0x232309,
- 0x28c848,
- 0x346789,
- 0x346790,
- 0x36f64b,
- 0x2e2109,
- 0x205dc3,
- 0x20af09,
- 0x23bd86,
- 0x23bd8c,
- 0x32d288,
- 0x3bc208,
- 0x244a49,
- 0x29854e,
- 0x2cc1cb,
- 0x2e5c0c,
- 0x203ec3,
- 0x26ad0c,
- 0x203ec9,
- 0x30ae47,
- 0x23ca0c,
- 0x2b478a,
- 0x252044,
- 0x2768cd,
- 0x26abc8,
- 0x21308d,
- 0x26fec6,
- 0x28664b,
- 0x200cc9,
- 0x2cf787,
- 0x332c86,
- 0x3372c9,
- 0x34834a,
- 0x319108,
- 0x2f3204,
- 0x2fe987,
- 0x363787,
- 0x2d0184,
- 0x38d204,
- 0x2345c9,
- 0x28a4c9,
- 0x2b7288,
- 0x216d05,
- 0x339645,
- 0x213c86,
- 0x276789,
- 0x249c4d,
- 0x33bf88,
- 0x213b87,
- 0x382dc8,
- 0x2fa686,
- 0x39b444,
- 0x2501c5,
- 0x201c46,
- 0x202884,
- 0x203dc7,
- 0x206f4a,
- 0x219784,
- 0x21dfc6,
- 0x21ea49,
- 0x21ea4f,
- 0x21fc8d,
- 0x220f06,
- 0x224c90,
- 0x225086,
- 0x2257c7,
- 0x2269c7,
- 0x2269cf,
- 0x2276c9,
- 0x22cb06,
- 0x22da47,
- 0x22da48,
- 0x22f289,
- 0x358088,
- 0x2eb507,
- 0x212843,
- 0x394f46,
- 0x3c0b48,
- 0x29880a,
- 0x236089,
- 0x205d83,
- 0x3784c6,
- 0x26bcca,
- 0x28eb87,
- 0x30ac8a,
- 0x25a18e,
- 0x227806,
- 0x2b03c7,
- 0x217bc6,
- 0x203f86,
- 0x38fd0b,
- 0x31708a,
- 0x32138d,
- 0x21d047,
- 0x20e408,
- 0x20e409,
- 0x20e40f,
- 0x2c1c4c,
- 0x2b4089,
- 0x2d890e,
- 0x34e44a,
- 0x28b906,
- 0x314a86,
- 0x319d8c,
- 0x31be8c,
- 0x327508,
- 0x36eac7,
- 0x274d85,
- 0x3485c4,
- 0x20f88e,
- 0x299684,
- 0x388947,
- 0x39140a,
- 0x38a814,
- 0x39390f,
- 0x226b88,
- 0x394e08,
- 0x35eccd,
- 0x35ecce,
- 0x3a0849,
- 0x238788,
- 0x23878f,
- 0x23c70c,
- 0x23c70f,
- 0x23d907,
- 0x240c0a,
- 0x2459cb,
- 0x243788,
- 0x245c87,
- 0x3ac74d,
- 0x322b46,
- 0x276a86,
- 0x248dc9,
- 0x364b08,
- 0x24cf48,
- 0x24cf4e,
- 0x2f4087,
- 0x24e145,
- 0x24e9c5,
- 0x204b44,
- 0x348a06,
- 0x2b7188,
- 0x20db03,
- 0x2f948e,
- 0x3acb08,
- 0x2b588b,
- 0x378bc7,
- 0x3ab345,
- 0x233d86,
- 0x2b1f87,
- 0x32f2c8,
- 0x325449,
- 0x322dc5,
- 0x28e788,
- 0x21c946,
- 0x3afeca,
- 0x20f789,
- 0x23cac9,
- 0x23cacb,
- 0x346448,
- 0x2d0049,
- 0x216dc6,
- 0x23768a,
- 0x293c0a,
- 0x240e0c,
- 0x28e4c7,
- 0x2ce74a,
- 0x36b38b,
- 0x36b399,
- 0x312408,
- 0x3a0445,
- 0x2cdd46,
- 0x25c489,
- 0x3449c6,
- 0x2df8ca,
- 0x28ca46,
- 0x20df44,
- 0x2cdecd,
- 0x20df47,
- 0x218209,
- 0x250ac5,
- 0x250c08,
- 0x251409,
- 0x251844,
- 0x251f47,
- 0x251f48,
- 0x2526c7,
- 0x26e2c8,
- 0x255cc7,
- 0x25b845,
- 0x25f3cc,
- 0x25fc09,
- 0x2c8c0a,
- 0x39ec09,
- 0x20b009,
- 0x37ee4c,
- 0x264f0b,
- 0x2662c8,
- 0x267448,
- 0x26a804,
- 0x289848,
- 0x28d209,
- 0x2b4847,
- 0x20e646,
- 0x200f47,
- 0x2c4289,
- 0x32264b,
- 0x325147,
- 0x201a87,
- 0x2b79c7,
- 0x213004,
- 0x213005,
- 0x2a7c05,
- 0x34b1cb,
- 0x3a9384,
- 0x350448,
- 0x26e94a,
- 0x21ca07,
- 0x300687,
- 0x294712,
- 0x276c06,
- 0x23a1c6,
- 0x33888e,
- 0x27ab46,
- 0x29abc8,
- 0x29b38f,
- 0x213448,
- 0x302848,
- 0x3bd10a,
- 0x3bd111,
- 0x2a990e,
- 0x25654a,
- 0x25654c,
- 0x20bf07,
- 0x238990,
- 0x200408,
- 0x2a9b05,
- 0x2b238a,
- 0x2028cc,
- 0x29cf8d,
- 0x302346,
- 0x302347,
- 0x30234c,
- 0x30c80c,
- 0x335d4c,
- 0x2edfcb,
- 0x28e0c4,
- 0x22c9c4,
- 0x354609,
- 0x39e807,
- 0x229989,
- 0x293a49,
- 0x3b6587,
- 0x2b4606,
- 0x2b4609,
- 0x2b4a03,
- 0x21b7ca,
- 0x31fd07,
- 0x34304b,
- 0x32120a,
- 0x2f6744,
- 0x35f646,
- 0x286b89,
- 0x281a04,
- 0x20324a,
- 0x3a1205,
- 0x2c4d45,
- 0x2c4d4d,
- 0x2c508e,
- 0x2b9ac5,
- 0x32ab86,
- 0x39ffc7,
- 0x25f64a,
- 0x3a8286,
- 0x2eefc4,
- 0x2f9847,
- 0x3bc50b,
- 0x2fa747,
- 0x30b444,
- 0x256fc6,
- 0x256fcd,
- 0x2c3f4c,
- 0x208d46,
- 0x33c18a,
- 0x230206,
- 0x22ddc8,
- 0x285107,
- 0x34c98a,
- 0x3840c6,
- 0x210443,
- 0x210446,
- 0x3c09c8,
- 0x2a344a,
- 0x2801c7,
- 0x2801c8,
- 0x289e04,
- 0x256ac7,
- 0x283288,
- 0x345388,
- 0x284508,
- 0x35874a,
- 0x2e4505,
- 0x2e9a07,
- 0x256393,
- 0x343d86,
- 0x2e0908,
- 0x229f89,
- 0x24c488,
- 0x38600b,
- 0x2d3d48,
- 0x2bc644,
- 0x27a9c6,
- 0x317ec6,
- 0x330889,
- 0x3bc3c7,
- 0x25f4c8,
- 0x2931c6,
- 0x36c244,
- 0x30aa05,
- 0x2d4008,
- 0x2cd88a,
- 0x2cdb48,
- 0x2d4b06,
- 0x2a1d8a,
- 0x2fc208,
- 0x2d8fc8,
- 0x2d9ec8,
- 0x2da506,
- 0x2dc3c6,
- 0x20c0cc,
- 0x2dc990,
- 0x285505,
- 0x213248,
- 0x30d410,
- 0x213250,
- 0x34660e,
- 0x20bd4e,
- 0x20bd54,
- 0x20e78f,
- 0x20eb46,
- 0x3072d1,
- 0x332e13,
- 0x333288,
- 0x31d245,
- 0x2a0bc8,
- 0x395705,
- 0x23540c,
- 0x2309c9,
- 0x2994c9,
- 0x230e47,
- 0x263549,
- 0x261047,
- 0x2ffa46,
- 0x24ffc7,
- 0x20ef05,
- 0x217103,
- 0x20dcc9,
- 0x22a249,
- 0x38a783,
- 0x3b35c4,
- 0x358c8d,
- 0x3b83cf,
- 0x36c285,
- 0x331786,
- 0x21ac47,
- 0x32d007,
- 0x290806,
- 0x29080b,
- 0x2aa805,
- 0x263c06,
- 0x300b87,
- 0x257449,
- 0x345a06,
- 0x20cb45,
- 0x2248cb,
- 0x230786,
- 0x38ad45,
- 0x273988,
- 0x2a6988,
- 0x2ba50c,
- 0x2ba510,
- 0x2b64c9,
- 0x2c5607,
- 0x2e520b,
- 0x30be86,
- 0x2eb3ca,
- 0x2ec90b,
- 0x2ee70a,
- 0x2ee986,
- 0x2ef645,
- 0x31fa46,
- 0x37d408,
- 0x230f0a,
- 0x35e95c,
- 0x2f380c,
- 0x2f3b08,
- 0x3a03c5,
- 0x35cec7,
- 0x25b0c6,
- 0x27f7c5,
- 0x2227c6,
- 0x2909c8,
- 0x2c2c07,
- 0x298448,
- 0x2b04ca,
- 0x33764c,
- 0x3378c9,
- 0x39b5c7,
- 0x215c04,
- 0x24ea86,
- 0x2d518a,
- 0x293b45,
- 0x211ecc,
- 0x212e48,
- 0x389c88,
- 0x21904c,
- 0x2266cc,
- 0x229549,
- 0x229787,
- 0x23ff4c,
- 0x2454c4,
- 0x24718a,
- 0x23354c,
- 0x279a4b,
- 0x24bfcb,
- 0x3821c6,
- 0x2f7447,
- 0x20e947,
- 0x238bcf,
- 0x303191,
- 0x2e16d2,
- 0x314ecd,
- 0x314ece,
- 0x31520e,
- 0x20e948,
- 0x20e952,
- 0x253e08,
- 0x34ec47,
- 0x25430a,
- 0x208b08,
- 0x27ab05,
- 0x38c9ca,
- 0x2255c7,
- 0x2e6f44,
- 0x227103,
- 0x297185,
- 0x3bd387,
- 0x2fb547,
- 0x29d18e,
- 0x308c8d,
- 0x30d7c9,
- 0x21f545,
- 0x31c443,
- 0x326446,
- 0x264085,
- 0x27dc48,
- 0x2c0649,
- 0x2a0105,
- 0x3ac94f,
- 0x2b6207,
- 0x382bc5,
- 0x37958a,
- 0x358946,
- 0x2522c9,
- 0x37db4c,
- 0x2fec09,
- 0x2094c6,
- 0x26e74c,
- 0x329f86,
- 0x3017c8,
- 0x301c86,
- 0x312586,
- 0x2082c4,
- 0x266643,
- 0x2b380a,
- 0x32e411,
- 0x30650a,
- 0x265345,
- 0x271ac7,
- 0x25c7c7,
- 0x283384,
- 0x28338b,
- 0x2cfb08,
- 0x2c1486,
- 0x37e6c5,
- 0x3b01c4,
- 0x280ac9,
- 0x320804,
- 0x24cd87,
- 0x359f05,
- 0x359f07,
- 0x338ac5,
- 0x2affc3,
- 0x34eb08,
- 0x35f2ca,
- 0x20b3c3,
- 0x32d20a,
- 0x281ec6,
- 0x3ac6cf,
- 0x2f4009,
- 0x2f9410,
- 0x2ebe48,
- 0x2d5809,
- 0x29f087,
- 0x256f4f,
- 0x31e884,
- 0x2de9c4,
- 0x224f06,
- 0x317b06,
- 0x2e2aca,
- 0x381c46,
- 0x2ff587,
- 0x30c148,
- 0x30c347,
- 0x30cbc7,
- 0x30f08a,
- 0x310b4b,
- 0x3b1b45,
- 0x2e1308,
- 0x204443,
- 0x2045cc,
- 0x38000f,
- 0x274b8d,
- 0x2aefc7,
- 0x30d909,
- 0x2e8207,
- 0x24f2c8,
- 0x38aa0c,
- 0x2bc548,
- 0x231848,
- 0x321d0e,
- 0x336054,
- 0x336564,
- 0x354e4a,
- 0x37018b,
- 0x261104,
- 0x261109,
- 0x3656c8,
- 0x24ef85,
- 0x20d60a,
- 0x3acd47,
- 0x31f944,
- 0x39c783,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x28cac3,
- 0x20c0c6,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0x207102,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x323043,
- 0x255783,
- 0x20c0c6,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x207102,
- 0x242043,
- 0x20f882,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x201382,
- 0x235f42,
- 0x20f882,
- 0x238543,
- 0x206902,
- 0x200942,
- 0x231604,
- 0x20f644,
- 0x22a482,
- 0x21bf84,
- 0x200442,
- 0x201a03,
- 0x221483,
- 0x3821c6,
- 0x21a902,
- 0x202642,
- 0x20c4c2,
- 0x47a13443,
- 0x47e0bf03,
- 0x5d306,
- 0x5d306,
- 0x286644,
- 0x200e03,
- 0x14b700a,
- 0x12ea0c,
- 0xf4cc,
- 0x871cd,
- 0x131645,
- 0x26547,
- 0x1b1c6,
- 0x21088,
- 0x23087,
- 0x28b08,
- 0x1aa20a,
- 0x1397c7,
- 0x48adf485,
- 0x1359c9,
- 0x3e34b,
- 0x35dcb,
- 0x42e48,
- 0x172f4a,
- 0x9288e,
- 0x144c28b,
- 0x6a04,
- 0x63d46,
- 0x7588,
- 0xf8d08,
- 0x3e607,
- 0x1a787,
- 0x57f89,
- 0x81a87,
- 0xdd088,
- 0x12f5c9,
- 0x49804,
- 0x49f45,
- 0x12bfce,
- 0xb084d,
- 0x8ca48,
- 0x48e34406,
- 0x49834408,
- 0x7b548,
- 0x11f3d0,
- 0x5998c,
- 0x6b9c7,
- 0x6c647,
- 0x71387,
- 0x77fc7,
- 0x13c42,
- 0x144ec7,
- 0x11724c,
- 0x43b87,
- 0xac206,
- 0xac7c9,
- 0xae208,
- 0x206c2,
- 0x942,
- 0xbee8b,
- 0x1a3307,
- 0x18009,
- 0x164ec9,
- 0x3ef48,
- 0xb8042,
- 0x134649,
- 0xcc60a,
- 0xd2689,
- 0xdfdc9,
- 0xe0b08,
- 0xe1b87,
- 0xe4489,
- 0xe61c5,
- 0xe67d0,
- 0x191646,
- 0x11205,
- 0x31e8d,
- 0x235c6,
- 0xefd07,
- 0xf4558,
- 0x14f508,
- 0xc74a,
- 0xb282,
- 0x5524d,
- 0xa02,
- 0x86286,
- 0x95408,
- 0x8f148,
- 0x16fa49,
- 0x586c8,
- 0x6420e,
- 0x126447,
- 0x1051cd,
- 0xfb445,
- 0x144c48,
- 0x19fc08,
- 0x106046,
- 0xc2,
- 0x12cf06,
- 0x4542,
- 0x341,
- 0x65a07,
- 0xf6fc3,
- 0x492f4dc4,
- 0x4969c243,
- 0x141,
- 0x19d06,
- 0x141,
- 0x1,
- 0x19d06,
- 0xf6fc3,
- 0x1402285,
- 0x252044,
- 0x238543,
- 0x253384,
- 0x231604,
- 0x208e83,
- 0x229e45,
- 0x221f43,
- 0x20c843,
- 0x355685,
- 0x202443,
- 0x4aa38543,
- 0x23cac3,
- 0x323043,
- 0x200041,
- 0x28cac3,
- 0x20f644,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x215443,
- 0x16fb88,
- 0x207102,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x200942,
- 0x231604,
- 0x255783,
- 0x28cac3,
- 0x208e83,
- 0x200e03,
- 0x201a03,
- 0x202443,
- 0x16fb88,
- 0x37fd82,
- 0x18c1c7,
- 0xf882,
- 0x10a985,
- 0x1480cc8,
- 0x10c50e,
- 0x4ba0ab02,
- 0x31fec8,
- 0x2bdd86,
- 0x2ca186,
- 0x2bd707,
- 0x4be00b42,
- 0x4c3ac548,
- 0x21870a,
- 0x26b448,
- 0x200242,
- 0x31fb49,
- 0x3b1b87,
- 0x21ec06,
- 0x34e849,
- 0x2e9b44,
- 0x348646,
- 0x2ca584,
- 0x27f584,
- 0x25f009,
- 0x32d906,
- 0x240ac5,
- 0x297a85,
- 0x3b9d87,
- 0x2c76c7,
- 0x2979c4,
- 0x2bd946,
- 0x307b85,
- 0x30a3c5,
- 0x3a2a05,
- 0x339407,
- 0x378a05,
- 0x31ddc9,
- 0x234fc5,
- 0x32f404,
- 0x3a81c7,
- 0x341b0e,
- 0x306bc9,
- 0x338749,
- 0x388d86,
- 0x24a608,
- 0x36ae4b,
- 0x2b698c,
- 0x33ea46,
- 0x2e5ac7,
- 0x212245,
- 0x38d20a,
- 0x2b7389,
- 0x209b49,
- 0x259f06,
- 0x300945,
- 0x2edac5,
- 0x3570c9,
- 0x3a2b8b,
- 0x27e286,
- 0x3471c6,
- 0x20de04,
- 0x2943c6,
- 0x24e1c8,
- 0x3c0846,
- 0x215006,
- 0x205fc8,
- 0x2092c7,
- 0x209909,
- 0x211385,
- 0x16fb88,
- 0x21a704,
- 0x2394c4,
- 0x201105,
- 0x3a6649,
- 0x228f87,
- 0x228f8b,
- 0x22b3ca,
- 0x230905,
- 0x4c612842,
- 0x342f07,
- 0x4ca30c08,
- 0x3578c7,
- 0x2c3d45,
- 0x209dca,
- 0xf882,
- 0x2be6cb,
- 0x255e0a,
- 0x22a146,
- 0x216383,
- 0x2a038d,
- 0x3572cc,
- 0x357a4d,
- 0x250545,
- 0x334fc5,
- 0x20db47,
- 0x36c689,
- 0x218606,
- 0x381ac5,
- 0x2d2b88,
- 0x2942c3,
- 0x2fa288,
- 0x2942c8,
- 0x2cb287,
- 0x314808,
- 0x3b49c9,
- 0x374847,
- 0x342707,
- 0x202108,
- 0x2d1c84,
- 0x2d1c87,
- 0x26fdc8,
- 0x355546,
- 0x3b874f,
- 0x226207,
- 0x2eb686,
- 0x2298c5,
- 0x22a8c3,
- 0x381947,
- 0x37cc43,
- 0x252886,
- 0x254006,
- 0x254706,
- 0x298b85,
- 0x26e2c3,
- 0x397cc8,
- 0x37f889,
- 0x3920cb,
- 0x254888,
- 0x255985,
- 0x2584c5,
- 0x4cef6802,
- 0x250089,
- 0x34eec7,
- 0x263c85,
- 0x25ef07,
- 0x260506,
- 0x374345,
- 0x263ecb,
- 0x2662c4,
- 0x26b005,
- 0x26b147,
- 0x27db86,
- 0x27e045,
- 0x289a47,
- 0x28a187,
- 0x2d5104,
- 0x291b8a,
- 0x292048,
- 0x2cee09,
- 0x2a0f05,
- 0x3bf1c6,
- 0x24e38a,
- 0x2be906,
- 0x26f2c7,
- 0x2ceacd,
- 0x2aa349,
- 0x396fc5,
- 0x339f07,
- 0x333448,
- 0x25a5c8,
- 0x332847,
- 0x358246,
- 0x21cb87,
- 0x253c43,
- 0x34b1c4,
- 0x371cc5,
- 0x39d947,
- 0x3a2409,
- 0x231b08,
- 0x34cbc5,
- 0x23bac4,
- 0x254a45,
- 0x256c4d,
- 0x2006c2,
- 0x230386,
- 0x2861c6,
- 0x2e654a,
- 0x3904c6,
- 0x39ab85,
- 0x342445,
- 0x342447,
- 0x3afd0c,
- 0x27b3ca,
- 0x294086,
- 0x28ad05,
- 0x294206,
- 0x294547,
- 0x296886,
- 0x298a8c,
- 0x34e989,
- 0x4d21a187,
- 0x29b745,
- 0x29b746,
- 0x29bcc8,
- 0x246f85,
- 0x2ab085,
- 0x2ab808,
- 0x2aba0a,
- 0x4d6335c2,
- 0x4da14d02,
- 0x2e76c5,
- 0x2eb603,
- 0x243408,
- 0x252403,
- 0x2abc84,
- 0x25240b,
- 0x36b208,
- 0x2daa48,
- 0x4df3b049,
- 0x2afc09,
- 0x2b0746,
- 0x2b1c08,
- 0x2b1e09,
- 0x2b2886,
- 0x2b2a05,
- 0x3944c6,
- 0x2b2f49,
- 0x389347,
- 0x2647c6,
- 0x2de087,
- 0x218487,
- 0x2dd9c4,
- 0x4e34f809,
- 0x2d32c8,
- 0x3ac448,
- 0x3932c7,
- 0x2cd346,
- 0x36c489,
- 0x2ca847,
- 0x32598a,
- 0x358388,
- 0x208387,
- 0x208f86,
- 0x271d8a,
- 0x26fbc8,
- 0x2ed485,
- 0x230685,
- 0x2ef1c7,
- 0x311cc9,
- 0x30150b,
- 0x31a308,
- 0x235049,
- 0x254c87,
- 0x2bd04c,
- 0x2bfccc,
- 0x2bffca,
- 0x2c024c,
- 0x2ca108,
- 0x2ca308,
- 0x2ca504,
- 0x2caa09,
- 0x2cac49,
- 0x2cae8a,
- 0x2cb109,
- 0x2cb447,
- 0x3ba98c,
- 0x23f586,
- 0x2cbf88,
- 0x2be9c6,
- 0x387486,
- 0x396ec7,
- 0x306dc8,
- 0x3445cb,
- 0x28e307,
- 0x250289,
- 0x350b89,
- 0x253507,
- 0x2771c4,
- 0x271c07,
- 0x2fda46,
- 0x21d8c6,
- 0x33c345,
- 0x297248,
- 0x2993c4,
- 0x2993c6,
- 0x27b28b,
- 0x21bac9,
- 0x36c886,
- 0x204bc9,
- 0x339586,
- 0x25f1c8,
- 0x211b83,
- 0x300ac5,
- 0x219b09,
- 0x21da05,
- 0x2fba44,
- 0x27d046,
- 0x2fd385,
- 0x299906,
- 0x310ec7,
- 0x33a986,
- 0x3b134b,
- 0x237587,
- 0x241646,
- 0x354786,
- 0x3b9e46,
- 0x297989,
- 0x25384a,
- 0x2bbb85,
- 0x2202cd,
- 0x2abb06,
- 0x204a86,
- 0x2f3f06,
- 0x22dd45,
- 0x2e6ac7,
- 0x300087,
- 0x2e7dce,
- 0x28cac3,
- 0x2cd309,
- 0x210c89,
- 0x38d607,
- 0x364207,
- 0x2a5bc5,
- 0x2b57c5,
- 0x4e63470f,
- 0x2d5a47,
- 0x2d5c08,
- 0x2d6144,
- 0x2d7106,
- 0x4ea4ea42,
- 0x2da786,
- 0x20c0c6,
- 0x210e4e,
- 0x2fa0ca,
- 0x273b06,
- 0x23398a,
- 0x211689,
- 0x32b385,
- 0x3a4808,
- 0x3bca06,
- 0x306748,
- 0x33aac8,
- 0x2194cb,
- 0x2bd805,
- 0x378a88,
- 0x20610c,
- 0x2c3c07,
- 0x254246,
- 0x2fd1c8,
- 0x3488c8,
- 0x4ee06802,
- 0x23588b,
- 0x2123c9,
- 0x205549,
- 0x2174c7,
- 0x223408,
- 0x4f36bec8,
- 0x38ffcb,
- 0x23edc9,
- 0x338f0d,
- 0x27fa88,
- 0x22b1c8,
- 0x4f6014c2,
- 0x203cc4,
- 0x4fa19302,
- 0x2fe206,
- 0x4fe004c2,
- 0x261b8a,
- 0x2199c6,
- 0x232808,
- 0x2c6f48,
- 0x2b6f06,
- 0x22fe46,
- 0x2f9186,
- 0x2b5a45,
- 0x2443c4,
- 0x50206d04,
- 0x214106,
- 0x29c747,
- 0x50620c47,
- 0x2d644b,
- 0x341ec9,
- 0x33500a,
- 0x2106c4,
- 0x342588,
- 0x26458d,
- 0x2f2489,
- 0x2f26c8,
- 0x2f2d49,
- 0x2f4544,
- 0x245884,
- 0x285cc5,
- 0x320fcb,
- 0x36b186,
- 0x34b905,
- 0x2279c9,
- 0x2bda08,
- 0x210dc4,
- 0x38d389,
- 0x2064c5,
- 0x2c7708,
- 0x342dc7,
- 0x338b48,
- 0x286d86,
- 0x233207,
- 0x29a989,
- 0x224a49,
- 0x38adc5,
- 0x34dfc5,
- 0x50a08402,
- 0x32f1c4,
- 0x2fdd45,
- 0x2ce506,
- 0x33bd05,
- 0x387e47,
- 0x214205,
- 0x27dbc4,
- 0x388e46,
- 0x381b47,
- 0x23d046,
- 0x2c41c5,
- 0x207f48,
- 0x2bdf85,
- 0x211a07,
- 0x214689,
- 0x21bc0a,
- 0x2fc487,
- 0x2fc48c,
- 0x240a86,
- 0x37e349,
- 0x246a45,
- 0x246ec8,
- 0x207c03,
- 0x216d85,
- 0x2fd705,
- 0x282d47,
- 0x50e06ac2,
- 0x22f647,
- 0x2e56c6,
- 0x373b46,
- 0x30bfc6,
- 0x348806,
- 0x206748,
- 0x2a0d05,
- 0x2eb747,
- 0x2eb74d,
- 0x227103,
- 0x227105,
- 0x379347,
- 0x22f988,
- 0x378f05,
- 0x2216c8,
- 0x37ccc6,
- 0x335b87,
- 0x2cbec5,
- 0x2bd886,
- 0x39ce45,
- 0x21c70a,
- 0x2f1346,
- 0x383f47,
- 0x2bca85,
- 0x2f5047,
- 0x2f97c4,
- 0x2fb9c6,
- 0x2fe345,
- 0x32d70b,
- 0x2fd8c9,
- 0x24214a,
- 0x38ae48,
- 0x30e048,
- 0x380a8c,
- 0x3964c7,
- 0x3054c8,
- 0x307f48,
- 0x3084c5,
- 0x311a8a,
- 0x31c449,
- 0x51200d02,
- 0x201886,
- 0x216044,
- 0x216049,
- 0x27d549,
- 0x27e9c7,
- 0x2b4e07,
- 0x2938c9,
- 0x22df48,
- 0x22df4f,
- 0x2e3a06,
- 0x2df14b,
- 0x34b445,
- 0x34b447,
- 0x368849,
- 0x21aa46,
- 0x38d307,
- 0x2e1a45,
- 0x23ae84,
- 0x284fc6,
- 0x2262c4,
- 0x2db107,
- 0x2d6f08,
- 0x51700848,
- 0x301245,
- 0x301387,
- 0x260a09,
- 0x205304,
- 0x24b348,
- 0x51ab7cc8,
- 0x283384,
- 0x23c208,
- 0x332d44,
- 0x22be49,
- 0x351a45,
- 0x51e05082,
- 0x2e3a45,
- 0x310045,
- 0x20fc48,
- 0x23d747,
- 0x52200d42,
- 0x3322c5,
- 0x2d8e46,
- 0x27cb06,
- 0x32f188,
- 0x337d48,
- 0x33bcc6,
- 0x34bb06,
- 0x38c289,
- 0x373a86,
- 0x21a90b,
- 0x2e5f85,
- 0x208a46,
- 0x29e108,
- 0x3a0a06,
- 0x322c46,
- 0x221b8a,
- 0x23b30a,
- 0x2498c5,
- 0x2a0dc7,
- 0x313646,
- 0x52606442,
- 0x379487,
- 0x266cc5,
- 0x24e304,
- 0x24e305,
- 0x2105c6,
- 0x278fc7,
- 0x215dc5,
- 0x23b484,
- 0x2c4788,
- 0x322d05,
- 0x3af347,
- 0x3b6dc5,
- 0x21c645,
- 0x258f84,
- 0x2ee209,
- 0x3079c8,
- 0x263146,
- 0x2b5386,
- 0x345186,
- 0x52b08148,
- 0x308347,
- 0x30874d,
- 0x3090cc,
- 0x3096c9,
- 0x309909,
- 0x52f67742,
- 0x3b6343,
- 0x215ac3,
- 0x2fdb05,
- 0x39da4a,
- 0x32f046,
- 0x30e2c5,
- 0x311084,
- 0x31108b,
- 0x323a8c,
- 0x3244cc,
- 0x3247d5,
- 0x32660d,
- 0x327d0f,
- 0x3280d2,
- 0x32854f,
- 0x328912,
- 0x328d93,
- 0x32924d,
- 0x32980d,
- 0x329b8e,
- 0x32a10e,
- 0x32a94c,
- 0x32ad0c,
- 0x32b14b,
- 0x32b4ce,
- 0x32c612,
- 0x32ee0c,
- 0x32fd90,
- 0x33cd52,
- 0x33d9cc,
- 0x33e08d,
- 0x33e3cc,
- 0x3406d1,
- 0x34734d,
- 0x349e0d,
- 0x34a40a,
- 0x34a68c,
- 0x34af8c,
- 0x34b60c,
- 0x34c20c,
- 0x3523d3,
- 0x352cd0,
- 0x3530d0,
- 0x35398d,
- 0x353f8c,
- 0x354b89,
- 0x35690d,
- 0x356c53,
- 0x3595d1,
- 0x359a13,
- 0x35a0cf,
- 0x35a48c,
- 0x35a78f,
- 0x35ab4d,
- 0x35b14f,
- 0x35b510,
- 0x35bf8e,
- 0x35f88e,
- 0x35fe10,
- 0x36150d,
- 0x361e8e,
- 0x36220c,
- 0x363213,
- 0x3658ce,
- 0x365f50,
- 0x366351,
- 0x36678f,
- 0x366b53,
- 0x3672cd,
- 0x36760f,
- 0x3679ce,
- 0x368090,
- 0x368489,
- 0x369210,
- 0x36980f,
- 0x369e8f,
- 0x36a252,
- 0x36dcce,
- 0x36e7cd,
- 0x36f00d,
- 0x36f34d,
- 0x37078d,
- 0x370acd,
- 0x370e10,
- 0x37120b,
- 0x371a8c,
- 0x371e0c,
- 0x37240c,
- 0x37270e,
- 0x382350,
- 0x384512,
- 0x38498b,
- 0x384e8e,
- 0x38520e,
- 0x386dce,
- 0x38724b,
- 0x53388016,
- 0x38988d,
- 0x38a014,
- 0x38b04d,
- 0x38cd55,
- 0x38e30d,
- 0x38ec8f,
- 0x38f4cf,
- 0x39238f,
- 0x39274e,
- 0x392ccd,
- 0x394091,
- 0x39668c,
- 0x39698c,
- 0x396c8b,
- 0x39710c,
- 0x3974cf,
- 0x397892,
- 0x39824d,
- 0x39974c,
- 0x399bcc,
- 0x399ecd,
- 0x39a20f,
- 0x39a5ce,
- 0x39d70c,
- 0x39dccd,
- 0x39e00b,
- 0x39e9cc,
- 0x39f2cd,
- 0x39f60e,
- 0x39f989,
- 0x3a1353,
- 0x3a188d,
- 0x3a1bcd,
- 0x3a21cc,
- 0x3a264e,
- 0x3a37cf,
- 0x3a3b8c,
- 0x3a3e8d,
- 0x3a41cf,
- 0x3a458c,
- 0x3a508c,
- 0x3a550c,
- 0x3a580c,
- 0x3a5ecd,
- 0x3a6212,
- 0x3a688c,
- 0x3a6b8c,
- 0x3a6e91,
- 0x3a72cf,
- 0x3a768f,
- 0x3a7a53,
- 0x3a8a0e,
- 0x3a8d8f,
- 0x3a914c,
- 0x537a948e,
- 0x3a980f,
- 0x3a9bd6,
- 0x3aaa92,
- 0x3acf0c,
- 0x3ada0f,
- 0x3ae08d,
- 0x3ae3cf,
- 0x3ae78c,
- 0x3aea8d,
- 0x3aedcd,
- 0x3b084e,
- 0x3b228c,
- 0x3b258c,
- 0x3b2890,
- 0x3b57d1,
- 0x3b5c0b,
- 0x3b5f4c,
- 0x3b624e,
- 0x3b7211,
- 0x3b764e,
- 0x3b79cd,
- 0x3bc7cb,
- 0x3bd88f,
- 0x3be394,
- 0x210642,
- 0x210642,
- 0x204d43,
- 0x210642,
- 0x204d43,
- 0x210642,
- 0x2009c2,
- 0x394505,
- 0x3b6f0c,
- 0x210642,
- 0x210642,
- 0x2009c2,
- 0x210642,
- 0x29c345,
- 0x21bc05,
- 0x210642,
- 0x210642,
- 0x201102,
- 0x29c345,
- 0x326b49,
- 0x3592cc,
- 0x210642,
- 0x210642,
- 0x210642,
- 0x210642,
- 0x394505,
- 0x210642,
- 0x210642,
- 0x210642,
- 0x210642,
- 0x201102,
- 0x326b49,
- 0x210642,
- 0x210642,
- 0x210642,
- 0x21bc05,
- 0x210642,
- 0x21bc05,
- 0x3592cc,
- 0x3b6f0c,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x208e83,
- 0x201a03,
- 0xe008,
- 0x64344,
- 0xe03,
- 0xc63c8,
- 0x207102,
- 0x5460f882,
- 0x24ac83,
- 0x23f044,
- 0x2020c3,
- 0x39e544,
- 0x23a1c6,
- 0x216f83,
- 0x304704,
- 0x2d7b05,
- 0x28cac3,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0x243d0a,
- 0x3821c6,
- 0x38558c,
- 0x16fb88,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x229443,
- 0x20c0c6,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0xac408,
- 0x131645,
- 0x35f09,
- 0x35c2,
- 0x55b95645,
- 0x26547,
- 0xba9c8,
- 0x14b0e,
- 0x90212,
- 0x10a78b,
- 0x1398c6,
- 0x55edf485,
- 0x562df48c,
- 0x148f87,
- 0x36dc7,
- 0x15000a,
- 0x46690,
- 0x13b345,
- 0xb610b,
- 0xf8d08,
- 0x3e607,
- 0x3af8b,
- 0x57f89,
- 0x185a87,
- 0x81a87,
- 0x7e4c7,
- 0x3e546,
- 0xdd088,
- 0x56824386,
- 0xb084d,
- 0x14f9d0,
- 0x56c0c182,
- 0x8ca48,
- 0x4f450,
- 0x15090c,
- 0x5735cd4d,
- 0x64a88,
- 0x721c7,
- 0x76f09,
- 0x5d3c6,
- 0x9bec8,
- 0x351c2,
- 0xa808a,
- 0x293c7,
- 0x43b87,
- 0xac7c9,
- 0xae208,
- 0x8b205,
- 0xd538e,
- 0x5c4e,
- 0x17a8f,
- 0x18009,
- 0x164ec9,
- 0x15d38b,
- 0x7ba8f,
- 0xee40c,
- 0xa88cb,
- 0xc8b48,
- 0xd6347,
- 0xdbe88,
- 0xfe78b,
- 0xff34c,
- 0x10038c,
- 0x1037cc,
- 0x10b54d,
- 0x3ef48,
- 0xd2942,
- 0x134649,
- 0x195d8b,
- 0xcd546,
- 0x11f30b,
- 0xe118a,
- 0xe1d45,
- 0xe67d0,
- 0xe9f06,
- 0x16b986,
- 0x11205,
- 0x10fc48,
- 0xefd07,
- 0xeffc7,
- 0x8d047,
- 0xfe04a,
- 0xba84a,
- 0x86286,
- 0x99d0d,
- 0x8f148,
- 0x586c8,
- 0x58ec9,
- 0xbc8c5,
- 0x1ad70c,
- 0x10b74b,
- 0x19e604,
- 0x105e09,
- 0x106046,
- 0x16546,
- 0x2642,
- 0x12cf06,
- 0xc68b,
- 0x112707,
- 0x4542,
- 0xd1305,
- 0x2e604,
- 0x8c1,
- 0x52d03,
- 0x56764886,
- 0x9c243,
- 0x7b02,
- 0x293c4,
- 0x242,
- 0x86644,
- 0xf82,
- 0x6502,
- 0x3302,
- 0xd342,
- 0x1382,
- 0xdf482,
- 0x8c2,
- 0x22902,
- 0x40e82,
- 0x1a442,
- 0x4c82,
- 0x234c2,
- 0x3cac3,
- 0x6b82,
- 0x1842,
- 0x7602,
- 0x6b02,
- 0x17202,
- 0x36d02,
- 0x206c2,
- 0xc442,
- 0x1c82,
- 0x942,
- 0x55783,
- 0x4182,
- 0x2542,
- 0xb8042,
- 0x9a02,
- 0x282,
- 0x2942,
- 0xd842,
- 0xc202,
- 0x4a82,
- 0x182842,
- 0x745c2,
- 0xe82,
- 0x8e83,
- 0x1942,
- 0x6802,
- 0x982,
- 0x5b82,
- 0x18ad45,
- 0x7082,
- 0x2fa42,
- 0x13ebc3,
- 0x482,
- 0xb282,
- 0xa02,
- 0x2502,
- 0x6742,
- 0xd42,
- 0xc2,
- 0x2642,
- 0x35dc5,
- 0x17f087,
- 0x20d0c3,
- 0x207102,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x2046c3,
- 0x229443,
- 0x208e83,
- 0x200e03,
- 0x201a03,
- 0x29c283,
- 0x10c3,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x28cac3,
- 0x208e83,
- 0x200e03,
- 0x1a3443,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x200041,
- 0x28cac3,
- 0x208e83,
- 0x21b543,
- 0x201a03,
- 0x146f44,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x26eac3,
- 0x21b583,
- 0x207b03,
- 0x289303,
- 0x219983,
- 0x241503,
- 0x323043,
- 0x231604,
- 0x208e83,
- 0x201a03,
- 0x202443,
- 0x333cc4,
- 0x251183,
- 0x3ec3,
- 0x3c0943,
- 0x20a3c8,
- 0x271dc4,
- 0x2cf30a,
- 0x2bed86,
- 0x112384,
- 0x3a7ec7,
- 0x226cca,
- 0x2e38c9,
- 0x3b7f87,
- 0x3be84a,
- 0x39c783,
- 0x2e774b,
- 0x28b689,
- 0x345285,
- 0x2da5c7,
- 0xf882,
- 0x238543,
- 0x21a447,
- 0x2379c5,
- 0x2ca689,
- 0x23cac3,
- 0x2bd606,
- 0x2c9883,
- 0xe5743,
- 0x110646,
- 0xd386,
- 0x16f07,
- 0x21af86,
- 0x222985,
- 0x3a3147,
- 0x2de5c7,
- 0x59b23043,
- 0x33dc07,
- 0x374703,
- 0x3b5045,
- 0x231604,
- 0x231308,
- 0x366fcc,
- 0x2b4fc5,
- 0x2aa4c6,
- 0x21a307,
- 0x39b687,
- 0x23dfc7,
- 0x23f108,
- 0x30f50f,
- 0x2e3b05,
- 0x24ad87,
- 0x33acc7,
- 0x2abdca,
- 0x2d29c9,
- 0x39e6c5,
- 0x31078a,
- 0xc546,
- 0x2c9905,
- 0x3703c4,
- 0x2c6e86,
- 0x300e07,
- 0x2d2847,
- 0x306908,
- 0x217645,
- 0x2378c6,
- 0x214f85,
- 0x2e8105,
- 0x21ba04,
- 0x2b6e07,
- 0x20658a,
- 0x34d908,
- 0x367f06,
- 0x29443,
- 0x2e4505,
- 0x26bf86,
- 0x3babc6,
- 0x211106,
- 0x28cac3,
- 0x3984c7,
- 0x33ac45,
- 0x208e83,
- 0x2e144d,
- 0x200e03,
- 0x306a08,
- 0x3b3644,
- 0x310945,
- 0x2abcc6,
- 0x23f386,
- 0x208947,
- 0x2aed47,
- 0x26f045,
- 0x201a03,
- 0x20a147,
- 0x277089,
- 0x36bbc9,
- 0x227f4a,
- 0x235d82,
- 0x3b5004,
- 0x2eb2c4,
- 0x344487,
- 0x22f508,
- 0x2f0889,
- 0x226fc9,
- 0x2f1ac7,
- 0x28bb46,
- 0xf3006,
- 0x2f4544,
- 0x2f4b4a,
- 0x2f8248,
- 0x2f9049,
- 0x2c4bc6,
- 0x2b9545,
- 0x34d7c8,
- 0x2cdc4a,
- 0x20ec43,
- 0x333e46,
- 0x2f1bc7,
- 0x225f45,
- 0x3b3505,
- 0x3a04c3,
- 0x231944,
- 0x230645,
- 0x28a287,
- 0x307b05,
- 0x2ef086,
- 0x103d45,
- 0x273bc3,
- 0x273bc9,
- 0x26c04c,
- 0x2a2b4c,
- 0x2d8648,
- 0x284187,
- 0x301e08,
- 0x30214a,
- 0x302fcb,
- 0x28b7c8,
- 0x23ec48,
- 0x23f486,
- 0x345045,
- 0x34624a,
- 0x228cc5,
- 0x205082,
- 0x2cbd87,
- 0x29f806,
- 0x368d45,
- 0x304209,
- 0x281405,
- 0x3716c5,
- 0x218ac9,
- 0x388a46,
- 0x204448,
- 0x332643,
- 0x217186,
- 0x27cf86,
- 0x311f05,
- 0x311f09,
- 0x2f0fc9,
- 0x27a3c7,
- 0x114204,
- 0x314207,
- 0x226ec9,
- 0x23f805,
- 0x444c8,
- 0x39c485,
- 0x341a05,
- 0x3911c9,
- 0x20cac2,
- 0x2628c4,
- 0x200882,
- 0x204182,
- 0x30e985,
- 0x312108,
- 0x2bc805,
- 0x2cb603,
- 0x2cb605,
- 0x2da983,
- 0x2162c2,
- 0x383c84,
- 0x2fc183,
- 0x20cb42,
- 0x341504,
- 0x2ec043,
- 0x206682,
- 0x28cfc3,
- 0x295384,
- 0x2eae03,
- 0x2f6584,
- 0x204242,
- 0x221383,
- 0x219c43,
- 0x206182,
- 0x332182,
- 0x2f0e09,
- 0x204382,
- 0x290d84,
- 0x201f82,
- 0x34d644,
- 0x28bb04,
- 0x2c0d84,
- 0x202642,
- 0x23e882,
- 0x229703,
- 0x302d83,
- 0x24a9c4,
- 0x28a404,
- 0x2f1d44,
- 0x2f8404,
- 0x315743,
- 0x224183,
- 0x20c4c4,
- 0x315584,
- 0x315d86,
- 0x232ec2,
- 0x20f882,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x207102,
- 0x39c783,
- 0x238543,
- 0x23cac3,
- 0x201843,
- 0x323043,
- 0x231604,
- 0x2f10c4,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0x2f5204,
- 0x31fe83,
- 0x2c37c3,
- 0x359e44,
- 0x39c286,
- 0x211c43,
- 0x36dc7,
- 0x21f243,
- 0x202103,
- 0x2b8d83,
- 0x263a43,
- 0x229443,
- 0x3321c5,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x216403,
- 0x239043,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x255783,
- 0x208e83,
- 0x2464c4,
- 0x1a3443,
- 0x201a03,
- 0x25b0c4,
- 0x2c6c85,
- 0x36dc7,
- 0x20f882,
- 0x201742,
- 0x207b02,
- 0x204d42,
- 0xe03,
- 0x200442,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x215443,
- 0x286644,
- 0x16fb88,
- 0x238543,
- 0x200e03,
- 0x10c3,
- 0x13e8c4,
- 0x252044,
- 0x16fb88,
- 0x238543,
- 0x253384,
- 0x231604,
- 0x200e03,
- 0x2014c2,
- 0x201a03,
- 0x20c843,
- 0x31944,
- 0x355685,
- 0x205082,
- 0x3156c3,
- 0x145c49,
- 0xdfb46,
- 0x19c588,
- 0x207102,
- 0x16fb88,
- 0x20f882,
- 0x23cac3,
- 0x323043,
- 0x200942,
- 0xe03,
- 0x201a03,
- 0x207102,
- 0x1bea07,
- 0x1370c9,
- 0x3dc3,
- 0x16fb88,
- 0xd303,
- 0x5db4c807,
- 0x38543,
- 0x1788,
- 0x23cac3,
- 0x323043,
- 0x186c46,
- 0x255783,
- 0xe8888,
- 0xc9148,
- 0x3fbc6,
- 0x28cac3,
- 0xd30c8,
- 0x187ec3,
- 0xe8a85,
- 0x3ccc7,
- 0x8e83,
- 0x63c3,
- 0x1a03,
- 0xcb02,
- 0x17044a,
- 0x10ea43,
- 0x313e44,
- 0x10f30b,
- 0x10f8c8,
- 0x95e02,
- 0x207102,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x2de944,
- 0x323043,
- 0x255783,
- 0x28cac3,
- 0x208e83,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x229443,
- 0x208e83,
- 0x201a03,
- 0x236903,
- 0x215443,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x10c3,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x229443,
- 0x208e83,
- 0x201a03,
- 0x21a902,
- 0x200141,
- 0x207102,
- 0x200001,
- 0x327e02,
- 0x16fb88,
- 0x224c85,
- 0x2008c1,
- 0x38543,
- 0x201781,
- 0x200301,
- 0x200081,
- 0x2ac602,
- 0x37cc44,
- 0x394483,
- 0x200181,
- 0x200401,
- 0x200041,
- 0x200101,
- 0x2ea547,
- 0x2ec54f,
- 0x2fbc06,
- 0x200281,
- 0x33e906,
- 0x200801,
- 0x200981,
- 0x306f8e,
- 0x200441,
- 0x201a03,
- 0x204101,
- 0x258885,
- 0x20cb02,
- 0x3a03c5,
- 0x200341,
- 0x200741,
- 0x2002c1,
- 0x205082,
- 0x2000c1,
- 0x200201,
- 0x200c81,
- 0x2005c1,
- 0x204541,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x221f43,
- 0x238543,
- 0x323043,
- 0x95d48,
- 0x28cac3,
- 0x208e83,
- 0x31483,
- 0x201a03,
- 0x14eec08,
- 0x16308,
- 0x16fb88,
- 0xe03,
- 0x8e444,
- 0x4ec04,
- 0x14eec0a,
- 0x16fb88,
- 0x1a3443,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x208e83,
- 0x201a03,
- 0x203ec3,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x2de944,
- 0x201a03,
- 0x22d585,
- 0x35f2c4,
- 0x238543,
- 0x208e83,
- 0x201a03,
- 0x1f40a,
- 0xf1844,
- 0x118b06,
- 0x20f882,
- 0x238543,
- 0x23adc9,
- 0x23cac3,
- 0x375449,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x2f4348,
- 0x22dc07,
- 0x355685,
- 0xb4c8,
- 0x1bea07,
- 0x2f78a,
- 0x178ccb,
- 0x13c507,
- 0x4a4c8,
- 0x14f64a,
- 0x19dc8,
- 0x1370c9,
- 0x30507,
- 0x742c7,
- 0x19bf08,
- 0x1788,
- 0x4b04f,
- 0x1c045,
- 0x1a87,
- 0x186c46,
- 0x41287,
- 0x4a786,
- 0xe8888,
- 0x96fc6,
- 0x188847,
- 0x178809,
- 0x1bf307,
- 0xd81c9,
- 0xbcbc9,
- 0xc6a06,
- 0xc9148,
- 0xc7845,
- 0x57b0a,
- 0xd30c8,
- 0x187ec3,
- 0xdad48,
- 0x3ccc7,
- 0x131f45,
- 0x787d0,
- 0x63c3,
- 0x1a3443,
- 0x125807,
- 0x1cc85,
- 0xf02c8,
- 0xe385,
- 0x10ea43,
- 0x16d5c8,
- 0x12906,
- 0x198909,
- 0xb2007,
- 0x145f0b,
- 0x180884,
- 0x104f04,
- 0x10f30b,
- 0x10f8c8,
- 0x110547,
- 0x131645,
- 0x238543,
- 0x23cac3,
- 0x21b583,
- 0x201a03,
- 0x20c743,
- 0x323043,
- 0x1a3443,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x15d4cb,
- 0x207102,
- 0x20f882,
- 0x201a03,
- 0x16fb88,
- 0x207102,
- 0x20f882,
- 0x207b02,
- 0x200942,
- 0x20b302,
- 0x208e83,
- 0x200442,
- 0x207102,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x207b02,
- 0x323043,
- 0x255783,
- 0x28cac3,
- 0x21bf84,
- 0x208e83,
- 0x21eb43,
- 0x201a03,
- 0x313e44,
- 0x202443,
- 0x323043,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x200e03,
- 0x201a03,
- 0x3ad3c7,
- 0x238543,
- 0x282c07,
- 0x2d7f86,
- 0x20e583,
- 0x207603,
- 0x323043,
- 0x204c03,
- 0x231604,
- 0x2d5204,
- 0x30e706,
- 0x20bd43,
- 0x208e83,
- 0x201a03,
- 0x22d585,
- 0x321704,
- 0x350503,
- 0x39b4c3,
- 0x2cbd87,
- 0x342d45,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x99807,
- 0x203402,
- 0x28f283,
- 0x205403,
- 0x39c783,
- 0x65e38543,
- 0x206902,
- 0x23cac3,
- 0x2020c3,
- 0x323043,
- 0x231604,
- 0x3797c3,
- 0x2e3b03,
- 0x28cac3,
- 0x21bf84,
- 0x6620ea42,
- 0x208e83,
- 0x201a03,
- 0x206683,
- 0x22e603,
- 0x21a902,
- 0x202443,
- 0x16fb88,
- 0x323043,
- 0x10c3,
- 0x31f944,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x240244,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x3a2e44,
- 0x20f644,
- 0x20c0c6,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0x29f806,
- 0x4504b,
- 0x24386,
- 0x3204a,
- 0x112d0a,
- 0x16fb88,
- 0x214f44,
- 0x67638543,
- 0x39c744,
- 0x23cac3,
- 0x259004,
- 0x323043,
- 0x210543,
- 0x28cac3,
- 0x208e83,
- 0x1a3443,
- 0x201a03,
- 0xbac3,
- 0x3381cb,
- 0x3af10a,
- 0x3bf84c,
- 0xe4288,
- 0x207102,
- 0x20f882,
- 0x207b02,
- 0x2b13c5,
- 0x231604,
- 0x204a82,
- 0x28cac3,
- 0x20f644,
- 0x204d42,
- 0x200442,
- 0x20d2c2,
- 0x21a902,
- 0x19c783,
- 0x35f42,
- 0x2b3509,
- 0x2f7148,
- 0x351689,
- 0x2410c9,
- 0x350f0a,
- 0x26080a,
- 0x2127c2,
- 0x222902,
- 0xf882,
- 0x238543,
- 0x229682,
- 0x24af46,
- 0x369d02,
- 0x206a42,
- 0x37904e,
- 0x2213ce,
- 0x284b47,
- 0x208e07,
- 0x2ec8c2,
- 0x23cac3,
- 0x323043,
- 0x200042,
- 0x200942,
- 0x31603,
- 0x23980f,
- 0x20b542,
- 0x2dd887,
- 0x2b4a87,
- 0x2b7e87,
- 0x31a4cc,
- 0x2c448c,
- 0x223984,
- 0x285b0a,
- 0x221302,
- 0x209a02,
- 0x2c0884,
- 0x21f502,
- 0x2ca102,
- 0x2c46c4,
- 0x21a602,
- 0x200282,
- 0x11a83,
- 0x297047,
- 0x2beb05,
- 0x20d842,
- 0x239784,
- 0x382842,
- 0x2e3008,
- 0x208e83,
- 0x203488,
- 0x203cc2,
- 0x223b45,
- 0x38dbc6,
- 0x201a03,
- 0x207082,
- 0x2f0ac7,
- 0xcb02,
- 0x2797c5,
- 0x358b85,
- 0x209642,
- 0x20fd02,
- 0x2cf9ca,
- 0x26eeca,
- 0x21b9c2,
- 0x2a4dc4,
- 0x2002c2,
- 0x3b4ec8,
- 0x20d582,
- 0x315b08,
- 0x30ab47,
- 0x30ba09,
- 0x203442,
- 0x310e45,
- 0x3044c5,
- 0x21770b,
- 0x2d054c,
- 0x237348,
- 0x321b08,
- 0x232ec2,
- 0x208a02,
- 0x207102,
- 0x16fb88,
- 0x20f882,
- 0x238543,
- 0x207b02,
- 0x204d42,
- 0xe03,
- 0x200442,
- 0x201a03,
- 0x20d2c2,
- 0x207102,
- 0x68a0f882,
- 0x68f23043,
- 0x211a83,
- 0x204a82,
- 0x208e83,
- 0x391783,
- 0x201a03,
- 0x2ef783,
- 0x37f186,
- 0x1615443,
- 0x16fb88,
- 0x11205,
- 0xae90d,
- 0xacc8a,
- 0x6e487,
- 0x69601e02,
- 0x69a00242,
- 0x69e00bc2,
- 0x6a200702,
- 0x6a60b5c2,
- 0x6aa01382,
- 0x36dc7,
- 0x6ae0f882,
- 0x6b20c8c2,
- 0x6b604842,
- 0x6ba04c82,
- 0x2213c3,
- 0x18ec4,
- 0x2298c3,
- 0x6be1d882,
- 0x6c200182,
- 0x53c47,
- 0x6c60a442,
- 0x6ca00782,
- 0x6ce01bc2,
- 0x6d205e82,
- 0x6d601c82,
- 0x6da00942,
- 0xc2845,
- 0x23ef43,
- 0x281a04,
- 0x6de1f502,
- 0x6e205242,
- 0x6e603582,
- 0x17d50b,
- 0x6ea01fc2,
- 0x6f253442,
- 0x6f604a82,
- 0x6fa0b302,
- 0x6fe14702,
- 0x70200802,
- 0x70614642,
- 0x70a745c2,
- 0x70e0ea42,
- 0x71204802,
- 0x71604d42,
- 0x71a03382,
- 0x71e08682,
- 0x7224d382,
- 0x1a3284,
- 0x35efc3,
- 0x72604f82,
- 0x72a10902,
- 0x72e11542,
- 0x73201f02,
- 0x73600442,
- 0x73a0cb42,
- 0x15d647,
- 0x73e04102,
- 0x74204142,
- 0x7460d2c2,
- 0x74a21382,
- 0x1ad70c,
- 0x74e2a202,
- 0x75245542,
- 0x75605942,
- 0x75a06442,
- 0x75e0c402,
- 0x76260982,
- 0x76600202,
- 0x76a16fc2,
- 0x76e7d302,
- 0x772610c2,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x12143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x6ef797c3,
- 0x212143,
- 0x332244,
- 0x2f7046,
- 0x2f9a03,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x244949,
- 0x235f42,
- 0x26c783,
- 0x2bcec3,
- 0x20fbc5,
- 0x2020c3,
- 0x3797c3,
- 0x212143,
- 0x20c0c3,
- 0x248d43,
- 0x242989,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x235f42,
- 0x235f42,
- 0x3797c3,
- 0x212143,
- 0x77a38543,
- 0x23cac3,
- 0x20a6c3,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x16fb88,
- 0x20f882,
- 0x238543,
- 0x208e83,
- 0x201a03,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x28cac3,
- 0x208e83,
- 0xe03,
- 0x201a03,
- 0x252044,
- 0x20f882,
- 0x238543,
- 0x345903,
- 0x23cac3,
- 0x253384,
- 0x21b583,
- 0x323043,
- 0x231604,
- 0x255783,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x20c843,
- 0x355685,
- 0x248d43,
- 0x202443,
- 0xe03,
- 0x20f882,
- 0x238543,
- 0x3797c3,
- 0x208e83,
- 0x201a03,
- 0x207102,
- 0x39c783,
- 0x16fb88,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x23a1c6,
- 0x231604,
- 0x255783,
- 0x21bf84,
- 0x208e83,
- 0x201a03,
- 0x221483,
- 0x238543,
- 0x23cac3,
- 0x208e83,
- 0x201a03,
- 0x1442047,
- 0x238543,
- 0x24386,
- 0x23cac3,
- 0x323043,
- 0xe5586,
- 0x208e83,
- 0x201a03,
- 0x31dc48,
- 0x321949,
- 0x330189,
- 0x33bb08,
- 0x38fb48,
- 0x38fb49,
- 0x24558d,
- 0x24dd8f,
- 0x2f53d0,
- 0x35648d,
- 0x37210c,
- 0x39064b,
- 0xba9c8,
- 0xac605,
- 0x207102,
- 0x342b85,
- 0x200243,
- 0x7ae0f882,
- 0x23cac3,
- 0x323043,
- 0x2d8c47,
- 0x263a43,
- 0x28cac3,
- 0x208e83,
- 0x21b543,
- 0x217e03,
- 0x200e03,
- 0x201a03,
- 0x3821c6,
- 0x205082,
- 0x202443,
- 0x16fb88,
- 0x207102,
- 0x39c783,
- 0x20f882,
- 0x238543,
- 0x23cac3,
- 0x323043,
- 0x231604,
- 0x28cac3,
- 0x208e83,
- 0x201a03,
- 0x215443,
- 0x106904,
- 0x15217c6,
- 0x207102,
- 0x20f882,
- 0x323043,
- 0x28cac3,
- 0x201a03,
-}
-
-// children is the list of nodes' children, the parent's wildcard bit and the
-// parent's node type. If a node has no children then their children index
-// will be in the range [0, 6), depending on the wildcard bit and node type.
-//
-// The layout within the uint32, from MSB to LSB, is:
-// [ 1 bits] unused
-// [ 1 bits] wildcard bit
-// [ 2 bits] node type
-// [14 bits] high nodes index (exclusive) of children
-// [14 bits] low nodes index (inclusive) of children
-var children = [...]uint32{
- 0x0,
- 0x10000000,
- 0x20000000,
- 0x40000000,
- 0x50000000,
- 0x60000000,
- 0x186c615,
- 0x187061b,
- 0x189461c,
- 0x19f0625,
- 0x1a0467c,
- 0x1a18681,
- 0x1a2c686,
- 0x1a4c68b,
- 0x1a50693,
- 0x1a68694,
- 0x1a9069a,
- 0x1a946a4,
- 0x1aac6a5,
- 0x1ab06ab,
- 0x1ab46ac,
- 0x1af06ad,
- 0x1af46bc,
- 0x21afc6bd,
- 0x1b446bf,
- 0x1b486d1,
- 0x1b686d2,
- 0x1b7c6da,
- 0x1b806df,
- 0x1bb06e0,
- 0x1bcc6ec,
- 0x1bf46f3,
- 0x1c006fd,
- 0x1c04700,
- 0x1c9c701,
- 0x1cb0727,
- 0x1cc472c,
- 0x1cf4731,
- 0x1d0473d,
- 0x1d18741,
- 0x1d3c746,
- 0x1e7474f,
- 0x1e7879d,
- 0x1ee479e,
- 0x1f507b9,
- 0x1f687d4,
- 0x1f7c7da,
- 0x1f847df,
- 0x1f987e1,
- 0x1f9c7e6,
- 0x1fb87e7,
- 0x20047ee,
- 0x2020801,
- 0x2024808,
- 0x2028809,
- 0x204480a,
- 0x2080811,
- 0x62084820,
- 0x209c821,
- 0x20b4827,
- 0x20b882d,
- 0x20c882e,
- 0x2178832,
- 0x217c85e,
- 0x2218c85f,
- 0x22190863,
- 0x22194864,
- 0x21cc865,
- 0x21d0873,
- 0x2658874,
- 0x226f8996,
- 0x226fc9be,
- 0x227009bf,
- 0x2270c9c0,
- 0x227109c3,
- 0x2271c9c4,
- 0x227209c7,
- 0x227249c8,
- 0x227289c9,
- 0x2272c9ca,
- 0x227309cb,
- 0x2273c9cc,
- 0x227409cf,
- 0x2274c9d0,
- 0x227509d3,
- 0x227549d4,
- 0x227589d5,
- 0x227649d6,
- 0x227689d9,
- 0x2276c9da,
- 0x227709db,
- 0x27749dc,
- 0x227789dd,
- 0x227849de,
- 0x227889e1,
- 0x27909e2,
- 0x27cc9e4,
- 0x227ec9f3,
- 0x227f09fb,
- 0x227f49fc,
- 0x27f89fd,
- 0x227fc9fe,
- 0x28009ff,
- 0x281ca00,
- 0x2834a07,
- 0x2838a0d,
- 0x2848a0e,
- 0x2854a12,
- 0x2888a15,
- 0x288ca22,
- 0x28a0a23,
- 0x228a8a28,
- 0x2968a2a,
- 0x2296ca5a,
- 0x2974a5b,
- 0x2978a5d,
- 0x2990a5e,
- 0x29a4a64,
- 0x29cca69,
- 0x29eca73,
- 0x2a1ca7b,
- 0x2a44a87,
- 0x2a48a91,
- 0x2a6ca92,
- 0x2a70a9b,
- 0x2a84a9c,
- 0x2a88aa1,
- 0x2a8caa2,
- 0x2aacaa3,
- 0x2ac8aab,
- 0x2accab2,
- 0x22ad0ab3,
- 0x2ad4ab4,
- 0x2ad8ab5,
- 0x2ae8ab6,
- 0x2aecaba,
- 0x2b64abb,
- 0x2b68ad9,
- 0x2b84ada,
- 0x2b94ae1,
- 0x2ba8ae5,
- 0x2bc0aea,
- 0x2bd8af0,
- 0x2bf0af6,
- 0x2bf4afc,
- 0x2c0cafd,
- 0x2c28b03,
- 0x2c48b0a,
- 0x2c60b12,
- 0x2cc0b18,
- 0x2cdcb30,
- 0x2ce4b37,
- 0x2ce8b39,
- 0x2cfcb3a,
- 0x2d40b3f,
- 0x2dc0b50,
- 0x2decb70,
- 0x2df0b7b,
- 0x2df8b7c,
- 0x2e18b7e,
- 0x2e1cb86,
- 0x2e40b87,
- 0x2e48b90,
- 0x2e84b92,
- 0x2ec8ba1,
- 0x2eccbb2,
- 0x2f34bb3,
- 0x2f38bcd,
- 0x22f3cbce,
- 0x22f40bcf,
- 0x22f50bd0,
- 0x22f54bd4,
- 0x22f58bd5,
- 0x22f5cbd6,
- 0x22f60bd7,
- 0x2f78bd8,
- 0x2f9cbde,
- 0x2fbcbe7,
- 0x3580bef,
- 0x358cd60,
- 0x35acd63,
- 0x3768d6b,
- 0x3838dda,
- 0x38a8e0e,
- 0x3900e2a,
- 0x39e8e40,
- 0x3a40e7a,
- 0x3a7ce90,
- 0x3b78e9f,
- 0x3c44ede,
- 0x3cdcf11,
- 0x3d6cf37,
- 0x3dd0f5b,
- 0x4008f74,
- 0x40c1002,
- 0x418d030,
- 0x41d9063,
- 0x4261076,
- 0x429d098,
- 0x42ed0a7,
- 0x43650bb,
- 0x643690d9,
- 0x6436d0da,
- 0x643710db,
- 0x43ed0dc,
- 0x44490fb,
- 0x44c5112,
- 0x453d131,
- 0x45bd14f,
- 0x462916f,
- 0x475518a,
- 0x47ad1d5,
- 0x647b11eb,
- 0x48491ec,
- 0x48d1212,
- 0x491d234,
- 0x4985247,
- 0x4a2d261,
- 0x4af528b,
- 0x4b5d2bd,
- 0x4c712d7,
- 0x64c7531c,
- 0x64c7931d,
- 0x4cd531e,
- 0x4d31335,
- 0x4dc134c,
- 0x4e3d370,
- 0x4e8138f,
- 0x4f653a0,
- 0x4f993d9,
- 0x4ff93e6,
- 0x506d3fe,
- 0x50f541b,
- 0x513543d,
- 0x51a544d,
- 0x651a9469,
- 0x651ad46a,
- 0x251b146b,
- 0x51c946c,
- 0x51e5472,
- 0x5229479,
- 0x523948a,
- 0x525148e,
- 0x52c9494,
- 0x52d14b2,
- 0x52e54b4,
- 0x53014b9,
- 0x532d4c0,
- 0x53314cb,
- 0x53394cc,
- 0x534d4ce,
- 0x53694d3,
- 0x53754da,
- 0x537d4dd,
- 0x53b94df,
- 0x53cd4ee,
- 0x53d54f3,
- 0x53e14f5,
- 0x53e94f8,
- 0x540d4fa,
- 0x5431503,
- 0x544950c,
- 0x544d512,
- 0x5455513,
- 0x5459515,
- 0x54c1516,
- 0x54c5530,
- 0x54e9531,
- 0x550d53a,
- 0x5529543,
- 0x553954a,
- 0x554d54e,
- 0x5551553,
- 0x5559554,
- 0x556d556,
- 0x557d55b,
- 0x558155f,
- 0x559d560,
- 0x5e2d567,
- 0x5e6578b,
- 0x5e91799,
- 0x5ead7a4,
- 0x5ecd7ab,
- 0x5eed7b3,
- 0x5f317bb,
- 0x5f397cc,
- 0x25f3d7ce,
- 0x25f417cf,
- 0x5f497d0,
- 0x60c17d2,
- 0x260c5830,
- 0x260d5831,
- 0x260dd835,
- 0x260e9837,
- 0x60ed83a,
- 0x60f183b,
- 0x611983c,
- 0x6141846,
- 0x6145850,
- 0x617d851,
- 0x619985f,
- 0x6cf1866,
- 0x6cf5b3c,
- 0x6cf9b3d,
- 0x26cfdb3e,
- 0x6d01b3f,
- 0x26d05b40,
- 0x6d09b41,
- 0x26d15b42,
- 0x6d19b45,
- 0x6d1db46,
- 0x26d21b47,
- 0x6d25b48,
- 0x26d2db49,
- 0x6d31b4b,
- 0x6d35b4c,
- 0x26d45b4d,
- 0x6d49b51,
- 0x6d4db52,
- 0x6d51b53,
- 0x6d55b54,
- 0x26d59b55,
- 0x6d5db56,
- 0x6d61b57,
- 0x6d65b58,
- 0x6d69b59,
- 0x26d71b5a,
- 0x6d75b5c,
- 0x6d79b5d,
- 0x6d7db5e,
- 0x26d81b5f,
- 0x6d85b60,
- 0x26d8db61,
- 0x26d91b63,
- 0x6dadb64,
- 0x6dbdb6b,
- 0x6e01b6f,
- 0x6e05b80,
- 0x6e29b81,
- 0x6e2db8a,
- 0x6e31b8b,
- 0x6fbdb8c,
- 0x26fc1bef,
- 0x26fc9bf0,
- 0x26fcdbf2,
- 0x26fd1bf3,
- 0x6fd9bf4,
- 0x70b5bf6,
- 0x270b9c2d,
- 0x70bdc2e,
- 0x70e9c2f,
- 0x70edc3a,
- 0x7111c3b,
- 0x711dc44,
- 0x713dc47,
- 0x7141c4f,
- 0x7179c50,
- 0x7411c5e,
- 0x74cdd04,
- 0x74e1d33,
- 0x7515d38,
- 0x7545d45,
- 0x7561d51,
- 0x7589d58,
- 0x75a9d62,
- 0x75c5d6a,
- 0x75edd71,
- 0x75fdd7b,
- 0x7601d7f,
- 0x7605d80,
- 0x7639d81,
- 0x7645d8e,
- 0x7665d91,
- 0x76ddd99,
- 0x276e1db7,
- 0x7705db8,
- 0x7725dc1,
- 0x7739dc9,
- 0x774ddce,
- 0x7751dd3,
- 0x7771dd4,
- 0x7815ddc,
- 0x7831e05,
- 0x7855e0c,
- 0x785de15,
- 0x7869e17,
- 0x7871e1a,
- 0x7885e1c,
- 0x78a5e21,
- 0x78b1e29,
- 0x78bde2c,
- 0x78ede2f,
- 0x79c1e3b,
- 0x79c5e70,
- 0x79d9e71,
- 0x79e1e76,
- 0x79f9e78,
- 0x79fde7e,
- 0x7a09e7f,
- 0x7a0de82,
- 0x7a29e83,
- 0x7a65e8a,
- 0x7a69e99,
- 0x7a89e9a,
- 0x7ad9ea2,
- 0x7af5eb6,
- 0x7b49ebd,
- 0x7b4ded2,
- 0x7b51ed3,
- 0x7b55ed4,
- 0x7b99ed5,
- 0x7ba9ee6,
- 0x7be9eea,
- 0x7bedefa,
- 0x7c1defb,
- 0x7d65f07,
- 0x7d8df59,
- 0x7db9f63,
- 0x7dc5f6e,
- 0x7dcdf71,
- 0x7eddf73,
- 0x7ee9fb7,
- 0x7ef5fba,
- 0x7f01fbd,
- 0x7f0dfc0,
- 0x7f19fc3,
- 0x7f25fc6,
- 0x7f31fc9,
- 0x7f3dfcc,
- 0x7f49fcf,
- 0x7f55fd2,
- 0x7f61fd5,
- 0x7f6dfd8,
- 0x7f79fdb,
- 0x7f81fde,
- 0x7f8dfe0,
- 0x7f99fe3,
- 0x7fa5fe6,
- 0x7fb1fe9,
- 0x7fbdfec,
- 0x7fc9fef,
- 0x7fd5ff2,
- 0x7fe1ff5,
- 0x7fedff8,
- 0x7ff9ffb,
- 0x8005ffe,
- 0x8032001,
- 0x803e00c,
- 0x804a00f,
- 0x8056012,
- 0x8062015,
- 0x806e018,
- 0x807601b,
- 0x808201d,
- 0x808e020,
- 0x809a023,
- 0x80a6026,
- 0x80b2029,
- 0x80be02c,
- 0x80ca02f,
- 0x80d6032,
- 0x80e2035,
- 0x80ee038,
- 0x80fa03b,
- 0x810603e,
- 0x8112041,
- 0x811a044,
- 0x8126046,
- 0x8132049,
- 0x813e04c,
- 0x814a04f,
- 0x8156052,
- 0x8162055,
- 0x816e058,
- 0x817a05b,
- 0x817e05e,
- 0x818a05f,
- 0x81a6062,
- 0x81aa069,
- 0x81ba06a,
- 0x81d606e,
- 0x821a075,
- 0x821e086,
- 0x8232087,
- 0x826608c,
- 0x8276099,
- 0x829609d,
- 0x82ae0a5,
- 0x82c60ab,
- 0x82ce0b1,
- 0x283120b3,
- 0x83160c4,
- 0x83420c5,
- 0x834a0d0,
- 0x835e0d2,
-}
-
-// max children 494 (capacity 1023)
-// max text offset 28750 (capacity 32767)
-// max text length 36 (capacity 63)
-// max hi 8407 (capacity 16383)
-// max lo 8402 (capacity 16383)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table_test.go
deleted file mode 100644
index 62610185b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/publicsuffix/table_test.go
+++ /dev/null
@@ -1,16756 +0,0 @@
-// generated by go run gen.go; DO NOT EDIT
-
-package publicsuffix
-
-var rules = [...]string{
- "ac",
- "com.ac",
- "edu.ac",
- "gov.ac",
- "net.ac",
- "mil.ac",
- "org.ac",
- "ad",
- "nom.ad",
- "ae",
- "co.ae",
- "net.ae",
- "org.ae",
- "sch.ae",
- "ac.ae",
- "gov.ae",
- "mil.ae",
- "aero",
- "accident-investigation.aero",
- "accident-prevention.aero",
- "aerobatic.aero",
- "aeroclub.aero",
- "aerodrome.aero",
- "agents.aero",
- "aircraft.aero",
- "airline.aero",
- "airport.aero",
- "air-surveillance.aero",
- "airtraffic.aero",
- "air-traffic-control.aero",
- "ambulance.aero",
- "amusement.aero",
- "association.aero",
- "author.aero",
- "ballooning.aero",
- "broker.aero",
- "caa.aero",
- "cargo.aero",
- "catering.aero",
- "certification.aero",
- "championship.aero",
- "charter.aero",
- "civilaviation.aero",
- "club.aero",
- "conference.aero",
- "consultant.aero",
- "consulting.aero",
- "control.aero",
- "council.aero",
- "crew.aero",
- "design.aero",
- "dgca.aero",
- "educator.aero",
- "emergency.aero",
- "engine.aero",
- "engineer.aero",
- "entertainment.aero",
- "equipment.aero",
- "exchange.aero",
- "express.aero",
- "federation.aero",
- "flight.aero",
- "freight.aero",
- "fuel.aero",
- "gliding.aero",
- "government.aero",
- "groundhandling.aero",
- "group.aero",
- "hanggliding.aero",
- "homebuilt.aero",
- "insurance.aero",
- "journal.aero",
- "journalist.aero",
- "leasing.aero",
- "logistics.aero",
- "magazine.aero",
- "maintenance.aero",
- "media.aero",
- "microlight.aero",
- "modelling.aero",
- "navigation.aero",
- "parachuting.aero",
- "paragliding.aero",
- "passenger-association.aero",
- "pilot.aero",
- "press.aero",
- "production.aero",
- "recreation.aero",
- "repbody.aero",
- "res.aero",
- "research.aero",
- "rotorcraft.aero",
- "safety.aero",
- "scientist.aero",
- "services.aero",
- "show.aero",
- "skydiving.aero",
- "software.aero",
- "student.aero",
- "trader.aero",
- "trading.aero",
- "trainer.aero",
- "union.aero",
- "workinggroup.aero",
- "works.aero",
- "af",
- "gov.af",
- "com.af",
- "org.af",
- "net.af",
- "edu.af",
- "ag",
- "com.ag",
- "org.ag",
- "net.ag",
- "co.ag",
- "nom.ag",
- "ai",
- "off.ai",
- "com.ai",
- "net.ai",
- "org.ai",
- "al",
- "com.al",
- "edu.al",
- "gov.al",
- "mil.al",
- "net.al",
- "org.al",
- "am",
- "ao",
- "ed.ao",
- "gv.ao",
- "og.ao",
- "co.ao",
- "pb.ao",
- "it.ao",
- "aq",
- "ar",
- "com.ar",
- "edu.ar",
- "gob.ar",
- "gov.ar",
- "int.ar",
- "mil.ar",
- "musica.ar",
- "net.ar",
- "org.ar",
- "tur.ar",
- "arpa",
- "e164.arpa",
- "in-addr.arpa",
- "ip6.arpa",
- "iris.arpa",
- "uri.arpa",
- "urn.arpa",
- "as",
- "gov.as",
- "asia",
- "at",
- "ac.at",
- "co.at",
- "gv.at",
- "or.at",
- "au",
- "com.au",
- "net.au",
- "org.au",
- "edu.au",
- "gov.au",
- "asn.au",
- "id.au",
- "info.au",
- "conf.au",
- "oz.au",
- "act.au",
- "nsw.au",
- "nt.au",
- "qld.au",
- "sa.au",
- "tas.au",
- "vic.au",
- "wa.au",
- "act.edu.au",
- "nsw.edu.au",
- "nt.edu.au",
- "qld.edu.au",
- "sa.edu.au",
- "tas.edu.au",
- "vic.edu.au",
- "wa.edu.au",
- "qld.gov.au",
- "sa.gov.au",
- "tas.gov.au",
- "vic.gov.au",
- "wa.gov.au",
- "aw",
- "com.aw",
- "ax",
- "az",
- "com.az",
- "net.az",
- "int.az",
- "gov.az",
- "org.az",
- "edu.az",
- "info.az",
- "pp.az",
- "mil.az",
- "name.az",
- "pro.az",
- "biz.az",
- "ba",
- "com.ba",
- "edu.ba",
- "gov.ba",
- "mil.ba",
- "net.ba",
- "org.ba",
- "bb",
- "biz.bb",
- "co.bb",
- "com.bb",
- "edu.bb",
- "gov.bb",
- "info.bb",
- "net.bb",
- "org.bb",
- "store.bb",
- "tv.bb",
- "*.bd",
- "be",
- "ac.be",
- "bf",
- "gov.bf",
- "bg",
- "a.bg",
- "b.bg",
- "c.bg",
- "d.bg",
- "e.bg",
- "f.bg",
- "g.bg",
- "h.bg",
- "i.bg",
- "j.bg",
- "k.bg",
- "l.bg",
- "m.bg",
- "n.bg",
- "o.bg",
- "p.bg",
- "q.bg",
- "r.bg",
- "s.bg",
- "t.bg",
- "u.bg",
- "v.bg",
- "w.bg",
- "x.bg",
- "y.bg",
- "z.bg",
- "0.bg",
- "1.bg",
- "2.bg",
- "3.bg",
- "4.bg",
- "5.bg",
- "6.bg",
- "7.bg",
- "8.bg",
- "9.bg",
- "bh",
- "com.bh",
- "edu.bh",
- "net.bh",
- "org.bh",
- "gov.bh",
- "bi",
- "co.bi",
- "com.bi",
- "edu.bi",
- "or.bi",
- "org.bi",
- "biz",
- "bj",
- "asso.bj",
- "barreau.bj",
- "gouv.bj",
- "bm",
- "com.bm",
- "edu.bm",
- "gov.bm",
- "net.bm",
- "org.bm",
- "*.bn",
- "bo",
- "com.bo",
- "edu.bo",
- "gov.bo",
- "gob.bo",
- "int.bo",
- "org.bo",
- "net.bo",
- "mil.bo",
- "tv.bo",
- "br",
- "adm.br",
- "adv.br",
- "agr.br",
- "am.br",
- "arq.br",
- "art.br",
- "ato.br",
- "b.br",
- "belem.br",
- "bio.br",
- "blog.br",
- "bmd.br",
- "cim.br",
- "cng.br",
- "cnt.br",
- "com.br",
- "coop.br",
- "cri.br",
- "def.br",
- "ecn.br",
- "eco.br",
- "edu.br",
- "emp.br",
- "eng.br",
- "esp.br",
- "etc.br",
- "eti.br",
- "far.br",
- "flog.br",
- "floripa.br",
- "fm.br",
- "fnd.br",
- "fot.br",
- "fst.br",
- "g12.br",
- "ggf.br",
- "gov.br",
- "ac.gov.br",
- "al.gov.br",
- "am.gov.br",
- "ap.gov.br",
- "ba.gov.br",
- "ce.gov.br",
- "df.gov.br",
- "es.gov.br",
- "go.gov.br",
- "ma.gov.br",
- "mg.gov.br",
- "ms.gov.br",
- "mt.gov.br",
- "pa.gov.br",
- "pb.gov.br",
- "pe.gov.br",
- "pi.gov.br",
- "pr.gov.br",
- "rj.gov.br",
- "rn.gov.br",
- "ro.gov.br",
- "rr.gov.br",
- "rs.gov.br",
- "sc.gov.br",
- "se.gov.br",
- "sp.gov.br",
- "to.gov.br",
- "imb.br",
- "ind.br",
- "inf.br",
- "jampa.br",
- "jor.br",
- "jus.br",
- "leg.br",
- "lel.br",
- "mat.br",
- "med.br",
- "mil.br",
- "mp.br",
- "mus.br",
- "net.br",
- "*.nom.br",
- "not.br",
- "ntr.br",
- "odo.br",
- "org.br",
- "poa.br",
- "ppg.br",
- "pro.br",
- "psc.br",
- "psi.br",
- "qsl.br",
- "radio.br",
- "rec.br",
- "recife.br",
- "slg.br",
- "srv.br",
- "taxi.br",
- "teo.br",
- "tmp.br",
- "trd.br",
- "tur.br",
- "tv.br",
- "vet.br",
- "vix.br",
- "vlog.br",
- "wiki.br",
- "zlg.br",
- "bs",
- "com.bs",
- "net.bs",
- "org.bs",
- "edu.bs",
- "gov.bs",
- "bt",
- "com.bt",
- "edu.bt",
- "gov.bt",
- "net.bt",
- "org.bt",
- "bv",
- "bw",
- "co.bw",
- "org.bw",
- "by",
- "gov.by",
- "mil.by",
- "com.by",
- "of.by",
- "bz",
- "com.bz",
- "net.bz",
- "org.bz",
- "edu.bz",
- "gov.bz",
- "ca",
- "ab.ca",
- "bc.ca",
- "mb.ca",
- "nb.ca",
- "nf.ca",
- "nl.ca",
- "ns.ca",
- "nt.ca",
- "nu.ca",
- "on.ca",
- "pe.ca",
- "qc.ca",
- "sk.ca",
- "yk.ca",
- "gc.ca",
- "cat",
- "cc",
- "cd",
- "gov.cd",
- "cf",
- "cg",
- "ch",
- "ci",
- "org.ci",
- "or.ci",
- "com.ci",
- "co.ci",
- "edu.ci",
- "ed.ci",
- "ac.ci",
- "net.ci",
- "go.ci",
- "asso.ci",
- "xn--aroport-bya.ci",
- "int.ci",
- "presse.ci",
- "md.ci",
- "gouv.ci",
- "*.ck",
- "!www.ck",
- "cl",
- "gov.cl",
- "gob.cl",
- "co.cl",
- "mil.cl",
- "cm",
- "co.cm",
- "com.cm",
- "gov.cm",
- "net.cm",
- "cn",
- "ac.cn",
- "com.cn",
- "edu.cn",
- "gov.cn",
- "net.cn",
- "org.cn",
- "mil.cn",
- "xn--55qx5d.cn",
- "xn--io0a7i.cn",
- "xn--od0alg.cn",
- "ah.cn",
- "bj.cn",
- "cq.cn",
- "fj.cn",
- "gd.cn",
- "gs.cn",
- "gz.cn",
- "gx.cn",
- "ha.cn",
- "hb.cn",
- "he.cn",
- "hi.cn",
- "hl.cn",
- "hn.cn",
- "jl.cn",
- "js.cn",
- "jx.cn",
- "ln.cn",
- "nm.cn",
- "nx.cn",
- "qh.cn",
- "sc.cn",
- "sd.cn",
- "sh.cn",
- "sn.cn",
- "sx.cn",
- "tj.cn",
- "xj.cn",
- "xz.cn",
- "yn.cn",
- "zj.cn",
- "hk.cn",
- "mo.cn",
- "tw.cn",
- "co",
- "arts.co",
- "com.co",
- "edu.co",
- "firm.co",
- "gov.co",
- "info.co",
- "int.co",
- "mil.co",
- "net.co",
- "nom.co",
- "org.co",
- "rec.co",
- "web.co",
- "com",
- "coop",
- "cr",
- "ac.cr",
- "co.cr",
- "ed.cr",
- "fi.cr",
- "go.cr",
- "or.cr",
- "sa.cr",
- "cu",
- "com.cu",
- "edu.cu",
- "org.cu",
- "net.cu",
- "gov.cu",
- "inf.cu",
- "cv",
- "cw",
- "com.cw",
- "edu.cw",
- "net.cw",
- "org.cw",
- "cx",
- "gov.cx",
- "cy",
- "ac.cy",
- "biz.cy",
- "com.cy",
- "ekloges.cy",
- "gov.cy",
- "ltd.cy",
- "name.cy",
- "net.cy",
- "org.cy",
- "parliament.cy",
- "press.cy",
- "pro.cy",
- "tm.cy",
- "cz",
- "de",
- "dj",
- "dk",
- "dm",
- "com.dm",
- "net.dm",
- "org.dm",
- "edu.dm",
- "gov.dm",
- "do",
- "art.do",
- "com.do",
- "edu.do",
- "gob.do",
- "gov.do",
- "mil.do",
- "net.do",
- "org.do",
- "sld.do",
- "web.do",
- "dz",
- "com.dz",
- "org.dz",
- "net.dz",
- "gov.dz",
- "edu.dz",
- "asso.dz",
- "pol.dz",
- "art.dz",
- "ec",
- "com.ec",
- "info.ec",
- "net.ec",
- "fin.ec",
- "k12.ec",
- "med.ec",
- "pro.ec",
- "org.ec",
- "edu.ec",
- "gov.ec",
- "gob.ec",
- "mil.ec",
- "edu",
- "ee",
- "edu.ee",
- "gov.ee",
- "riik.ee",
- "lib.ee",
- "med.ee",
- "com.ee",
- "pri.ee",
- "aip.ee",
- "org.ee",
- "fie.ee",
- "eg",
- "com.eg",
- "edu.eg",
- "eun.eg",
- "gov.eg",
- "mil.eg",
- "name.eg",
- "net.eg",
- "org.eg",
- "sci.eg",
- "*.er",
- "es",
- "com.es",
- "nom.es",
- "org.es",
- "gob.es",
- "edu.es",
- "et",
- "com.et",
- "gov.et",
- "org.et",
- "edu.et",
- "biz.et",
- "name.et",
- "info.et",
- "net.et",
- "eu",
- "fi",
- "aland.fi",
- "*.fj",
- "*.fk",
- "fm",
- "fo",
- "fr",
- "com.fr",
- "asso.fr",
- "nom.fr",
- "prd.fr",
- "presse.fr",
- "tm.fr",
- "aeroport.fr",
- "assedic.fr",
- "avocat.fr",
- "avoues.fr",
- "cci.fr",
- "chambagri.fr",
- "chirurgiens-dentistes.fr",
- "experts-comptables.fr",
- "geometre-expert.fr",
- "gouv.fr",
- "greta.fr",
- "huissier-justice.fr",
- "medecin.fr",
- "notaires.fr",
- "pharmacien.fr",
- "port.fr",
- "veterinaire.fr",
- "ga",
- "gb",
- "gd",
- "ge",
- "com.ge",
- "edu.ge",
- "gov.ge",
- "org.ge",
- "mil.ge",
- "net.ge",
- "pvt.ge",
- "gf",
- "gg",
- "co.gg",
- "net.gg",
- "org.gg",
- "gh",
- "com.gh",
- "edu.gh",
- "gov.gh",
- "org.gh",
- "mil.gh",
- "gi",
- "com.gi",
- "ltd.gi",
- "gov.gi",
- "mod.gi",
- "edu.gi",
- "org.gi",
- "gl",
- "co.gl",
- "com.gl",
- "edu.gl",
- "net.gl",
- "org.gl",
- "gm",
- "gn",
- "ac.gn",
- "com.gn",
- "edu.gn",
- "gov.gn",
- "org.gn",
- "net.gn",
- "gov",
- "gp",
- "com.gp",
- "net.gp",
- "mobi.gp",
- "edu.gp",
- "org.gp",
- "asso.gp",
- "gq",
- "gr",
- "com.gr",
- "edu.gr",
- "net.gr",
- "org.gr",
- "gov.gr",
- "gs",
- "gt",
- "com.gt",
- "edu.gt",
- "gob.gt",
- "ind.gt",
- "mil.gt",
- "net.gt",
- "org.gt",
- "*.gu",
- "gw",
- "gy",
- "co.gy",
- "com.gy",
- "edu.gy",
- "gov.gy",
- "net.gy",
- "org.gy",
- "hk",
- "com.hk",
- "edu.hk",
- "gov.hk",
- "idv.hk",
- "net.hk",
- "org.hk",
- "xn--55qx5d.hk",
- "xn--wcvs22d.hk",
- "xn--lcvr32d.hk",
- "xn--mxtq1m.hk",
- "xn--gmqw5a.hk",
- "xn--ciqpn.hk",
- "xn--gmq050i.hk",
- "xn--zf0avx.hk",
- "xn--io0a7i.hk",
- "xn--mk0axi.hk",
- "xn--od0alg.hk",
- "xn--od0aq3b.hk",
- "xn--tn0ag.hk",
- "xn--uc0atv.hk",
- "xn--uc0ay4a.hk",
- "hm",
- "hn",
- "com.hn",
- "edu.hn",
- "org.hn",
- "net.hn",
- "mil.hn",
- "gob.hn",
- "hr",
- "iz.hr",
- "from.hr",
- "name.hr",
- "com.hr",
- "ht",
- "com.ht",
- "shop.ht",
- "firm.ht",
- "info.ht",
- "adult.ht",
- "net.ht",
- "pro.ht",
- "org.ht",
- "med.ht",
- "art.ht",
- "coop.ht",
- "pol.ht",
- "asso.ht",
- "edu.ht",
- "rel.ht",
- "gouv.ht",
- "perso.ht",
- "hu",
- "co.hu",
- "info.hu",
- "org.hu",
- "priv.hu",
- "sport.hu",
- "tm.hu",
- "2000.hu",
- "agrar.hu",
- "bolt.hu",
- "casino.hu",
- "city.hu",
- "erotica.hu",
- "erotika.hu",
- "film.hu",
- "forum.hu",
- "games.hu",
- "hotel.hu",
- "ingatlan.hu",
- "jogasz.hu",
- "konyvelo.hu",
- "lakas.hu",
- "media.hu",
- "news.hu",
- "reklam.hu",
- "sex.hu",
- "shop.hu",
- "suli.hu",
- "szex.hu",
- "tozsde.hu",
- "utazas.hu",
- "video.hu",
- "id",
- "ac.id",
- "biz.id",
- "co.id",
- "desa.id",
- "go.id",
- "mil.id",
- "my.id",
- "net.id",
- "or.id",
- "sch.id",
- "web.id",
- "ie",
- "gov.ie",
- "il",
- "ac.il",
- "co.il",
- "gov.il",
- "idf.il",
- "k12.il",
- "muni.il",
- "net.il",
- "org.il",
- "im",
- "ac.im",
- "co.im",
- "com.im",
- "ltd.co.im",
- "net.im",
- "org.im",
- "plc.co.im",
- "tt.im",
- "tv.im",
- "in",
- "co.in",
- "firm.in",
- "net.in",
- "org.in",
- "gen.in",
- "ind.in",
- "nic.in",
- "ac.in",
- "edu.in",
- "res.in",
- "gov.in",
- "mil.in",
- "info",
- "int",
- "eu.int",
- "io",
- "com.io",
- "iq",
- "gov.iq",
- "edu.iq",
- "mil.iq",
- "com.iq",
- "org.iq",
- "net.iq",
- "ir",
- "ac.ir",
- "co.ir",
- "gov.ir",
- "id.ir",
- "net.ir",
- "org.ir",
- "sch.ir",
- "xn--mgba3a4f16a.ir",
- "xn--mgba3a4fra.ir",
- "is",
- "net.is",
- "com.is",
- "edu.is",
- "gov.is",
- "org.is",
- "int.is",
- "it",
- "gov.it",
- "edu.it",
- "abr.it",
- "abruzzo.it",
- "aosta-valley.it",
- "aostavalley.it",
- "bas.it",
- "basilicata.it",
- "cal.it",
- "calabria.it",
- "cam.it",
- "campania.it",
- "emilia-romagna.it",
- "emiliaromagna.it",
- "emr.it",
- "friuli-v-giulia.it",
- "friuli-ve-giulia.it",
- "friuli-vegiulia.it",
- "friuli-venezia-giulia.it",
- "friuli-veneziagiulia.it",
- "friuli-vgiulia.it",
- "friuliv-giulia.it",
- "friulive-giulia.it",
- "friulivegiulia.it",
- "friulivenezia-giulia.it",
- "friuliveneziagiulia.it",
- "friulivgiulia.it",
- "fvg.it",
- "laz.it",
- "lazio.it",
- "lig.it",
- "liguria.it",
- "lom.it",
- "lombardia.it",
- "lombardy.it",
- "lucania.it",
- "mar.it",
- "marche.it",
- "mol.it",
- "molise.it",
- "piedmont.it",
- "piemonte.it",
- "pmn.it",
- "pug.it",
- "puglia.it",
- "sar.it",
- "sardegna.it",
- "sardinia.it",
- "sic.it",
- "sicilia.it",
- "sicily.it",
- "taa.it",
- "tos.it",
- "toscana.it",
- "trentino-a-adige.it",
- "trentino-aadige.it",
- "trentino-alto-adige.it",
- "trentino-altoadige.it",
- "trentino-s-tirol.it",
- "trentino-stirol.it",
- "trentino-sud-tirol.it",
- "trentino-sudtirol.it",
- "trentino-sued-tirol.it",
- "trentino-suedtirol.it",
- "trentinoa-adige.it",
- "trentinoaadige.it",
- "trentinoalto-adige.it",
- "trentinoaltoadige.it",
- "trentinos-tirol.it",
- "trentinostirol.it",
- "trentinosud-tirol.it",
- "trentinosudtirol.it",
- "trentinosued-tirol.it",
- "trentinosuedtirol.it",
- "tuscany.it",
- "umb.it",
- "umbria.it",
- "val-d-aosta.it",
- "val-daosta.it",
- "vald-aosta.it",
- "valdaosta.it",
- "valle-aosta.it",
- "valle-d-aosta.it",
- "valle-daosta.it",
- "valleaosta.it",
- "valled-aosta.it",
- "valledaosta.it",
- "vallee-aoste.it",
- "valleeaoste.it",
- "vao.it",
- "vda.it",
- "ven.it",
- "veneto.it",
- "ag.it",
- "agrigento.it",
- "al.it",
- "alessandria.it",
- "alto-adige.it",
- "altoadige.it",
- "an.it",
- "ancona.it",
- "andria-barletta-trani.it",
- "andria-trani-barletta.it",
- "andriabarlettatrani.it",
- "andriatranibarletta.it",
- "ao.it",
- "aosta.it",
- "aoste.it",
- "ap.it",
- "aq.it",
- "aquila.it",
- "ar.it",
- "arezzo.it",
- "ascoli-piceno.it",
- "ascolipiceno.it",
- "asti.it",
- "at.it",
- "av.it",
- "avellino.it",
- "ba.it",
- "balsan.it",
- "bari.it",
- "barletta-trani-andria.it",
- "barlettatraniandria.it",
- "belluno.it",
- "benevento.it",
- "bergamo.it",
- "bg.it",
- "bi.it",
- "biella.it",
- "bl.it",
- "bn.it",
- "bo.it",
- "bologna.it",
- "bolzano.it",
- "bozen.it",
- "br.it",
- "brescia.it",
- "brindisi.it",
- "bs.it",
- "bt.it",
- "bz.it",
- "ca.it",
- "cagliari.it",
- "caltanissetta.it",
- "campidano-medio.it",
- "campidanomedio.it",
- "campobasso.it",
- "carbonia-iglesias.it",
- "carboniaiglesias.it",
- "carrara-massa.it",
- "carraramassa.it",
- "caserta.it",
- "catania.it",
- "catanzaro.it",
- "cb.it",
- "ce.it",
- "cesena-forli.it",
- "cesenaforli.it",
- "ch.it",
- "chieti.it",
- "ci.it",
- "cl.it",
- "cn.it",
- "co.it",
- "como.it",
- "cosenza.it",
- "cr.it",
- "cremona.it",
- "crotone.it",
- "cs.it",
- "ct.it",
- "cuneo.it",
- "cz.it",
- "dell-ogliastra.it",
- "dellogliastra.it",
- "en.it",
- "enna.it",
- "fc.it",
- "fe.it",
- "fermo.it",
- "ferrara.it",
- "fg.it",
- "fi.it",
- "firenze.it",
- "florence.it",
- "fm.it",
- "foggia.it",
- "forli-cesena.it",
- "forlicesena.it",
- "fr.it",
- "frosinone.it",
- "ge.it",
- "genoa.it",
- "genova.it",
- "go.it",
- "gorizia.it",
- "gr.it",
- "grosseto.it",
- "iglesias-carbonia.it",
- "iglesiascarbonia.it",
- "im.it",
- "imperia.it",
- "is.it",
- "isernia.it",
- "kr.it",
- "la-spezia.it",
- "laquila.it",
- "laspezia.it",
- "latina.it",
- "lc.it",
- "le.it",
- "lecce.it",
- "lecco.it",
- "li.it",
- "livorno.it",
- "lo.it",
- "lodi.it",
- "lt.it",
- "lu.it",
- "lucca.it",
- "macerata.it",
- "mantova.it",
- "massa-carrara.it",
- "massacarrara.it",
- "matera.it",
- "mb.it",
- "mc.it",
- "me.it",
- "medio-campidano.it",
- "mediocampidano.it",
- "messina.it",
- "mi.it",
- "milan.it",
- "milano.it",
- "mn.it",
- "mo.it",
- "modena.it",
- "monza-brianza.it",
- "monza-e-della-brianza.it",
- "monza.it",
- "monzabrianza.it",
- "monzaebrianza.it",
- "monzaedellabrianza.it",
- "ms.it",
- "mt.it",
- "na.it",
- "naples.it",
- "napoli.it",
- "no.it",
- "novara.it",
- "nu.it",
- "nuoro.it",
- "og.it",
- "ogliastra.it",
- "olbia-tempio.it",
- "olbiatempio.it",
- "or.it",
- "oristano.it",
- "ot.it",
- "pa.it",
- "padova.it",
- "padua.it",
- "palermo.it",
- "parma.it",
- "pavia.it",
- "pc.it",
- "pd.it",
- "pe.it",
- "perugia.it",
- "pesaro-urbino.it",
- "pesarourbino.it",
- "pescara.it",
- "pg.it",
- "pi.it",
- "piacenza.it",
- "pisa.it",
- "pistoia.it",
- "pn.it",
- "po.it",
- "pordenone.it",
- "potenza.it",
- "pr.it",
- "prato.it",
- "pt.it",
- "pu.it",
- "pv.it",
- "pz.it",
- "ra.it",
- "ragusa.it",
- "ravenna.it",
- "rc.it",
- "re.it",
- "reggio-calabria.it",
- "reggio-emilia.it",
- "reggiocalabria.it",
- "reggioemilia.it",
- "rg.it",
- "ri.it",
- "rieti.it",
- "rimini.it",
- "rm.it",
- "rn.it",
- "ro.it",
- "roma.it",
- "rome.it",
- "rovigo.it",
- "sa.it",
- "salerno.it",
- "sassari.it",
- "savona.it",
- "si.it",
- "siena.it",
- "siracusa.it",
- "so.it",
- "sondrio.it",
- "sp.it",
- "sr.it",
- "ss.it",
- "suedtirol.it",
- "sv.it",
- "ta.it",
- "taranto.it",
- "te.it",
- "tempio-olbia.it",
- "tempioolbia.it",
- "teramo.it",
- "terni.it",
- "tn.it",
- "to.it",
- "torino.it",
- "tp.it",
- "tr.it",
- "trani-andria-barletta.it",
- "trani-barletta-andria.it",
- "traniandriabarletta.it",
- "tranibarlettaandria.it",
- "trapani.it",
- "trentino.it",
- "trento.it",
- "treviso.it",
- "trieste.it",
- "ts.it",
- "turin.it",
- "tv.it",
- "ud.it",
- "udine.it",
- "urbino-pesaro.it",
- "urbinopesaro.it",
- "va.it",
- "varese.it",
- "vb.it",
- "vc.it",
- "ve.it",
- "venezia.it",
- "venice.it",
- "verbania.it",
- "vercelli.it",
- "verona.it",
- "vi.it",
- "vibo-valentia.it",
- "vibovalentia.it",
- "vicenza.it",
- "viterbo.it",
- "vr.it",
- "vs.it",
- "vt.it",
- "vv.it",
- "je",
- "co.je",
- "net.je",
- "org.je",
- "*.jm",
- "jo",
- "com.jo",
- "org.jo",
- "net.jo",
- "edu.jo",
- "sch.jo",
- "gov.jo",
- "mil.jo",
- "name.jo",
- "jobs",
- "jp",
- "ac.jp",
- "ad.jp",
- "co.jp",
- "ed.jp",
- "go.jp",
- "gr.jp",
- "lg.jp",
- "ne.jp",
- "or.jp",
- "aichi.jp",
- "akita.jp",
- "aomori.jp",
- "chiba.jp",
- "ehime.jp",
- "fukui.jp",
- "fukuoka.jp",
- "fukushima.jp",
- "gifu.jp",
- "gunma.jp",
- "hiroshima.jp",
- "hokkaido.jp",
- "hyogo.jp",
- "ibaraki.jp",
- "ishikawa.jp",
- "iwate.jp",
- "kagawa.jp",
- "kagoshima.jp",
- "kanagawa.jp",
- "kochi.jp",
- "kumamoto.jp",
- "kyoto.jp",
- "mie.jp",
- "miyagi.jp",
- "miyazaki.jp",
- "nagano.jp",
- "nagasaki.jp",
- "nara.jp",
- "niigata.jp",
- "oita.jp",
- "okayama.jp",
- "okinawa.jp",
- "osaka.jp",
- "saga.jp",
- "saitama.jp",
- "shiga.jp",
- "shimane.jp",
- "shizuoka.jp",
- "tochigi.jp",
- "tokushima.jp",
- "tokyo.jp",
- "tottori.jp",
- "toyama.jp",
- "wakayama.jp",
- "yamagata.jp",
- "yamaguchi.jp",
- "yamanashi.jp",
- "xn--4pvxs.jp",
- "xn--vgu402c.jp",
- "xn--c3s14m.jp",
- "xn--f6qx53a.jp",
- "xn--8pvr4u.jp",
- "xn--uist22h.jp",
- "xn--djrs72d6uy.jp",
- "xn--mkru45i.jp",
- "xn--0trq7p7nn.jp",
- "xn--8ltr62k.jp",
- "xn--2m4a15e.jp",
- "xn--efvn9s.jp",
- "xn--32vp30h.jp",
- "xn--4it797k.jp",
- "xn--1lqs71d.jp",
- "xn--5rtp49c.jp",
- "xn--5js045d.jp",
- "xn--ehqz56n.jp",
- "xn--1lqs03n.jp",
- "xn--qqqt11m.jp",
- "xn--kbrq7o.jp",
- "xn--pssu33l.jp",
- "xn--ntsq17g.jp",
- "xn--uisz3g.jp",
- "xn--6btw5a.jp",
- "xn--1ctwo.jp",
- "xn--6orx2r.jp",
- "xn--rht61e.jp",
- "xn--rht27z.jp",
- "xn--djty4k.jp",
- "xn--nit225k.jp",
- "xn--rht3d.jp",
- "xn--klty5x.jp",
- "xn--kltx9a.jp",
- "xn--kltp7d.jp",
- "xn--uuwu58a.jp",
- "xn--zbx025d.jp",
- "xn--ntso0iqx3a.jp",
- "xn--elqq16h.jp",
- "xn--4it168d.jp",
- "xn--klt787d.jp",
- "xn--rny31h.jp",
- "xn--7t0a264c.jp",
- "xn--5rtq34k.jp",
- "xn--k7yn95e.jp",
- "xn--tor131o.jp",
- "xn--d5qv7z876c.jp",
- "*.kawasaki.jp",
- "*.kitakyushu.jp",
- "*.kobe.jp",
- "*.nagoya.jp",
- "*.sapporo.jp",
- "*.sendai.jp",
- "*.yokohama.jp",
- "!city.kawasaki.jp",
- "!city.kitakyushu.jp",
- "!city.kobe.jp",
- "!city.nagoya.jp",
- "!city.sapporo.jp",
- "!city.sendai.jp",
- "!city.yokohama.jp",
- "aisai.aichi.jp",
- "ama.aichi.jp",
- "anjo.aichi.jp",
- "asuke.aichi.jp",
- "chiryu.aichi.jp",
- "chita.aichi.jp",
- "fuso.aichi.jp",
- "gamagori.aichi.jp",
- "handa.aichi.jp",
- "hazu.aichi.jp",
- "hekinan.aichi.jp",
- "higashiura.aichi.jp",
- "ichinomiya.aichi.jp",
- "inazawa.aichi.jp",
- "inuyama.aichi.jp",
- "isshiki.aichi.jp",
- "iwakura.aichi.jp",
- "kanie.aichi.jp",
- "kariya.aichi.jp",
- "kasugai.aichi.jp",
- "kira.aichi.jp",
- "kiyosu.aichi.jp",
- "komaki.aichi.jp",
- "konan.aichi.jp",
- "kota.aichi.jp",
- "mihama.aichi.jp",
- "miyoshi.aichi.jp",
- "nishio.aichi.jp",
- "nisshin.aichi.jp",
- "obu.aichi.jp",
- "oguchi.aichi.jp",
- "oharu.aichi.jp",
- "okazaki.aichi.jp",
- "owariasahi.aichi.jp",
- "seto.aichi.jp",
- "shikatsu.aichi.jp",
- "shinshiro.aichi.jp",
- "shitara.aichi.jp",
- "tahara.aichi.jp",
- "takahama.aichi.jp",
- "tobishima.aichi.jp",
- "toei.aichi.jp",
- "togo.aichi.jp",
- "tokai.aichi.jp",
- "tokoname.aichi.jp",
- "toyoake.aichi.jp",
- "toyohashi.aichi.jp",
- "toyokawa.aichi.jp",
- "toyone.aichi.jp",
- "toyota.aichi.jp",
- "tsushima.aichi.jp",
- "yatomi.aichi.jp",
- "akita.akita.jp",
- "daisen.akita.jp",
- "fujisato.akita.jp",
- "gojome.akita.jp",
- "hachirogata.akita.jp",
- "happou.akita.jp",
- "higashinaruse.akita.jp",
- "honjo.akita.jp",
- "honjyo.akita.jp",
- "ikawa.akita.jp",
- "kamikoani.akita.jp",
- "kamioka.akita.jp",
- "katagami.akita.jp",
- "kazuno.akita.jp",
- "kitaakita.akita.jp",
- "kosaka.akita.jp",
- "kyowa.akita.jp",
- "misato.akita.jp",
- "mitane.akita.jp",
- "moriyoshi.akita.jp",
- "nikaho.akita.jp",
- "noshiro.akita.jp",
- "odate.akita.jp",
- "oga.akita.jp",
- "ogata.akita.jp",
- "semboku.akita.jp",
- "yokote.akita.jp",
- "yurihonjo.akita.jp",
- "aomori.aomori.jp",
- "gonohe.aomori.jp",
- "hachinohe.aomori.jp",
- "hashikami.aomori.jp",
- "hiranai.aomori.jp",
- "hirosaki.aomori.jp",
- "itayanagi.aomori.jp",
- "kuroishi.aomori.jp",
- "misawa.aomori.jp",
- "mutsu.aomori.jp",
- "nakadomari.aomori.jp",
- "noheji.aomori.jp",
- "oirase.aomori.jp",
- "owani.aomori.jp",
- "rokunohe.aomori.jp",
- "sannohe.aomori.jp",
- "shichinohe.aomori.jp",
- "shingo.aomori.jp",
- "takko.aomori.jp",
- "towada.aomori.jp",
- "tsugaru.aomori.jp",
- "tsuruta.aomori.jp",
- "abiko.chiba.jp",
- "asahi.chiba.jp",
- "chonan.chiba.jp",
- "chosei.chiba.jp",
- "choshi.chiba.jp",
- "chuo.chiba.jp",
- "funabashi.chiba.jp",
- "futtsu.chiba.jp",
- "hanamigawa.chiba.jp",
- "ichihara.chiba.jp",
- "ichikawa.chiba.jp",
- "ichinomiya.chiba.jp",
- "inzai.chiba.jp",
- "isumi.chiba.jp",
- "kamagaya.chiba.jp",
- "kamogawa.chiba.jp",
- "kashiwa.chiba.jp",
- "katori.chiba.jp",
- "katsuura.chiba.jp",
- "kimitsu.chiba.jp",
- "kisarazu.chiba.jp",
- "kozaki.chiba.jp",
- "kujukuri.chiba.jp",
- "kyonan.chiba.jp",
- "matsudo.chiba.jp",
- "midori.chiba.jp",
- "mihama.chiba.jp",
- "minamiboso.chiba.jp",
- "mobara.chiba.jp",
- "mutsuzawa.chiba.jp",
- "nagara.chiba.jp",
- "nagareyama.chiba.jp",
- "narashino.chiba.jp",
- "narita.chiba.jp",
- "noda.chiba.jp",
- "oamishirasato.chiba.jp",
- "omigawa.chiba.jp",
- "onjuku.chiba.jp",
- "otaki.chiba.jp",
- "sakae.chiba.jp",
- "sakura.chiba.jp",
- "shimofusa.chiba.jp",
- "shirako.chiba.jp",
- "shiroi.chiba.jp",
- "shisui.chiba.jp",
- "sodegaura.chiba.jp",
- "sosa.chiba.jp",
- "tako.chiba.jp",
- "tateyama.chiba.jp",
- "togane.chiba.jp",
- "tohnosho.chiba.jp",
- "tomisato.chiba.jp",
- "urayasu.chiba.jp",
- "yachimata.chiba.jp",
- "yachiyo.chiba.jp",
- "yokaichiba.chiba.jp",
- "yokoshibahikari.chiba.jp",
- "yotsukaido.chiba.jp",
- "ainan.ehime.jp",
- "honai.ehime.jp",
- "ikata.ehime.jp",
- "imabari.ehime.jp",
- "iyo.ehime.jp",
- "kamijima.ehime.jp",
- "kihoku.ehime.jp",
- "kumakogen.ehime.jp",
- "masaki.ehime.jp",
- "matsuno.ehime.jp",
- "matsuyama.ehime.jp",
- "namikata.ehime.jp",
- "niihama.ehime.jp",
- "ozu.ehime.jp",
- "saijo.ehime.jp",
- "seiyo.ehime.jp",
- "shikokuchuo.ehime.jp",
- "tobe.ehime.jp",
- "toon.ehime.jp",
- "uchiko.ehime.jp",
- "uwajima.ehime.jp",
- "yawatahama.ehime.jp",
- "echizen.fukui.jp",
- "eiheiji.fukui.jp",
- "fukui.fukui.jp",
- "ikeda.fukui.jp",
- "katsuyama.fukui.jp",
- "mihama.fukui.jp",
- "minamiechizen.fukui.jp",
- "obama.fukui.jp",
- "ohi.fukui.jp",
- "ono.fukui.jp",
- "sabae.fukui.jp",
- "sakai.fukui.jp",
- "takahama.fukui.jp",
- "tsuruga.fukui.jp",
- "wakasa.fukui.jp",
- "ashiya.fukuoka.jp",
- "buzen.fukuoka.jp",
- "chikugo.fukuoka.jp",
- "chikuho.fukuoka.jp",
- "chikujo.fukuoka.jp",
- "chikushino.fukuoka.jp",
- "chikuzen.fukuoka.jp",
- "chuo.fukuoka.jp",
- "dazaifu.fukuoka.jp",
- "fukuchi.fukuoka.jp",
- "hakata.fukuoka.jp",
- "higashi.fukuoka.jp",
- "hirokawa.fukuoka.jp",
- "hisayama.fukuoka.jp",
- "iizuka.fukuoka.jp",
- "inatsuki.fukuoka.jp",
- "kaho.fukuoka.jp",
- "kasuga.fukuoka.jp",
- "kasuya.fukuoka.jp",
- "kawara.fukuoka.jp",
- "keisen.fukuoka.jp",
- "koga.fukuoka.jp",
- "kurate.fukuoka.jp",
- "kurogi.fukuoka.jp",
- "kurume.fukuoka.jp",
- "minami.fukuoka.jp",
- "miyako.fukuoka.jp",
- "miyama.fukuoka.jp",
- "miyawaka.fukuoka.jp",
- "mizumaki.fukuoka.jp",
- "munakata.fukuoka.jp",
- "nakagawa.fukuoka.jp",
- "nakama.fukuoka.jp",
- "nishi.fukuoka.jp",
- "nogata.fukuoka.jp",
- "ogori.fukuoka.jp",
- "okagaki.fukuoka.jp",
- "okawa.fukuoka.jp",
- "oki.fukuoka.jp",
- "omuta.fukuoka.jp",
- "onga.fukuoka.jp",
- "onojo.fukuoka.jp",
- "oto.fukuoka.jp",
- "saigawa.fukuoka.jp",
- "sasaguri.fukuoka.jp",
- "shingu.fukuoka.jp",
- "shinyoshitomi.fukuoka.jp",
- "shonai.fukuoka.jp",
- "soeda.fukuoka.jp",
- "sue.fukuoka.jp",
- "tachiarai.fukuoka.jp",
- "tagawa.fukuoka.jp",
- "takata.fukuoka.jp",
- "toho.fukuoka.jp",
- "toyotsu.fukuoka.jp",
- "tsuiki.fukuoka.jp",
- "ukiha.fukuoka.jp",
- "umi.fukuoka.jp",
- "usui.fukuoka.jp",
- "yamada.fukuoka.jp",
- "yame.fukuoka.jp",
- "yanagawa.fukuoka.jp",
- "yukuhashi.fukuoka.jp",
- "aizubange.fukushima.jp",
- "aizumisato.fukushima.jp",
- "aizuwakamatsu.fukushima.jp",
- "asakawa.fukushima.jp",
- "bandai.fukushima.jp",
- "date.fukushima.jp",
- "fukushima.fukushima.jp",
- "furudono.fukushima.jp",
- "futaba.fukushima.jp",
- "hanawa.fukushima.jp",
- "higashi.fukushima.jp",
- "hirata.fukushima.jp",
- "hirono.fukushima.jp",
- "iitate.fukushima.jp",
- "inawashiro.fukushima.jp",
- "ishikawa.fukushima.jp",
- "iwaki.fukushima.jp",
- "izumizaki.fukushima.jp",
- "kagamiishi.fukushima.jp",
- "kaneyama.fukushima.jp",
- "kawamata.fukushima.jp",
- "kitakata.fukushima.jp",
- "kitashiobara.fukushima.jp",
- "koori.fukushima.jp",
- "koriyama.fukushima.jp",
- "kunimi.fukushima.jp",
- "miharu.fukushima.jp",
- "mishima.fukushima.jp",
- "namie.fukushima.jp",
- "nango.fukushima.jp",
- "nishiaizu.fukushima.jp",
- "nishigo.fukushima.jp",
- "okuma.fukushima.jp",
- "omotego.fukushima.jp",
- "ono.fukushima.jp",
- "otama.fukushima.jp",
- "samegawa.fukushima.jp",
- "shimogo.fukushima.jp",
- "shirakawa.fukushima.jp",
- "showa.fukushima.jp",
- "soma.fukushima.jp",
- "sukagawa.fukushima.jp",
- "taishin.fukushima.jp",
- "tamakawa.fukushima.jp",
- "tanagura.fukushima.jp",
- "tenei.fukushima.jp",
- "yabuki.fukushima.jp",
- "yamato.fukushima.jp",
- "yamatsuri.fukushima.jp",
- "yanaizu.fukushima.jp",
- "yugawa.fukushima.jp",
- "anpachi.gifu.jp",
- "ena.gifu.jp",
- "gifu.gifu.jp",
- "ginan.gifu.jp",
- "godo.gifu.jp",
- "gujo.gifu.jp",
- "hashima.gifu.jp",
- "hichiso.gifu.jp",
- "hida.gifu.jp",
- "higashishirakawa.gifu.jp",
- "ibigawa.gifu.jp",
- "ikeda.gifu.jp",
- "kakamigahara.gifu.jp",
- "kani.gifu.jp",
- "kasahara.gifu.jp",
- "kasamatsu.gifu.jp",
- "kawaue.gifu.jp",
- "kitagata.gifu.jp",
- "mino.gifu.jp",
- "minokamo.gifu.jp",
- "mitake.gifu.jp",
- "mizunami.gifu.jp",
- "motosu.gifu.jp",
- "nakatsugawa.gifu.jp",
- "ogaki.gifu.jp",
- "sakahogi.gifu.jp",
- "seki.gifu.jp",
- "sekigahara.gifu.jp",
- "shirakawa.gifu.jp",
- "tajimi.gifu.jp",
- "takayama.gifu.jp",
- "tarui.gifu.jp",
- "toki.gifu.jp",
- "tomika.gifu.jp",
- "wanouchi.gifu.jp",
- "yamagata.gifu.jp",
- "yaotsu.gifu.jp",
- "yoro.gifu.jp",
- "annaka.gunma.jp",
- "chiyoda.gunma.jp",
- "fujioka.gunma.jp",
- "higashiagatsuma.gunma.jp",
- "isesaki.gunma.jp",
- "itakura.gunma.jp",
- "kanna.gunma.jp",
- "kanra.gunma.jp",
- "katashina.gunma.jp",
- "kawaba.gunma.jp",
- "kiryu.gunma.jp",
- "kusatsu.gunma.jp",
- "maebashi.gunma.jp",
- "meiwa.gunma.jp",
- "midori.gunma.jp",
- "minakami.gunma.jp",
- "naganohara.gunma.jp",
- "nakanojo.gunma.jp",
- "nanmoku.gunma.jp",
- "numata.gunma.jp",
- "oizumi.gunma.jp",
- "ora.gunma.jp",
- "ota.gunma.jp",
- "shibukawa.gunma.jp",
- "shimonita.gunma.jp",
- "shinto.gunma.jp",
- "showa.gunma.jp",
- "takasaki.gunma.jp",
- "takayama.gunma.jp",
- "tamamura.gunma.jp",
- "tatebayashi.gunma.jp",
- "tomioka.gunma.jp",
- "tsukiyono.gunma.jp",
- "tsumagoi.gunma.jp",
- "ueno.gunma.jp",
- "yoshioka.gunma.jp",
- "asaminami.hiroshima.jp",
- "daiwa.hiroshima.jp",
- "etajima.hiroshima.jp",
- "fuchu.hiroshima.jp",
- "fukuyama.hiroshima.jp",
- "hatsukaichi.hiroshima.jp",
- "higashihiroshima.hiroshima.jp",
- "hongo.hiroshima.jp",
- "jinsekikogen.hiroshima.jp",
- "kaita.hiroshima.jp",
- "kui.hiroshima.jp",
- "kumano.hiroshima.jp",
- "kure.hiroshima.jp",
- "mihara.hiroshima.jp",
- "miyoshi.hiroshima.jp",
- "naka.hiroshima.jp",
- "onomichi.hiroshima.jp",
- "osakikamijima.hiroshima.jp",
- "otake.hiroshima.jp",
- "saka.hiroshima.jp",
- "sera.hiroshima.jp",
- "seranishi.hiroshima.jp",
- "shinichi.hiroshima.jp",
- "shobara.hiroshima.jp",
- "takehara.hiroshima.jp",
- "abashiri.hokkaido.jp",
- "abira.hokkaido.jp",
- "aibetsu.hokkaido.jp",
- "akabira.hokkaido.jp",
- "akkeshi.hokkaido.jp",
- "asahikawa.hokkaido.jp",
- "ashibetsu.hokkaido.jp",
- "ashoro.hokkaido.jp",
- "assabu.hokkaido.jp",
- "atsuma.hokkaido.jp",
- "bibai.hokkaido.jp",
- "biei.hokkaido.jp",
- "bifuka.hokkaido.jp",
- "bihoro.hokkaido.jp",
- "biratori.hokkaido.jp",
- "chippubetsu.hokkaido.jp",
- "chitose.hokkaido.jp",
- "date.hokkaido.jp",
- "ebetsu.hokkaido.jp",
- "embetsu.hokkaido.jp",
- "eniwa.hokkaido.jp",
- "erimo.hokkaido.jp",
- "esan.hokkaido.jp",
- "esashi.hokkaido.jp",
- "fukagawa.hokkaido.jp",
- "fukushima.hokkaido.jp",
- "furano.hokkaido.jp",
- "furubira.hokkaido.jp",
- "haboro.hokkaido.jp",
- "hakodate.hokkaido.jp",
- "hamatonbetsu.hokkaido.jp",
- "hidaka.hokkaido.jp",
- "higashikagura.hokkaido.jp",
- "higashikawa.hokkaido.jp",
- "hiroo.hokkaido.jp",
- "hokuryu.hokkaido.jp",
- "hokuto.hokkaido.jp",
- "honbetsu.hokkaido.jp",
- "horokanai.hokkaido.jp",
- "horonobe.hokkaido.jp",
- "ikeda.hokkaido.jp",
- "imakane.hokkaido.jp",
- "ishikari.hokkaido.jp",
- "iwamizawa.hokkaido.jp",
- "iwanai.hokkaido.jp",
- "kamifurano.hokkaido.jp",
- "kamikawa.hokkaido.jp",
- "kamishihoro.hokkaido.jp",
- "kamisunagawa.hokkaido.jp",
- "kamoenai.hokkaido.jp",
- "kayabe.hokkaido.jp",
- "kembuchi.hokkaido.jp",
- "kikonai.hokkaido.jp",
- "kimobetsu.hokkaido.jp",
- "kitahiroshima.hokkaido.jp",
- "kitami.hokkaido.jp",
- "kiyosato.hokkaido.jp",
- "koshimizu.hokkaido.jp",
- "kunneppu.hokkaido.jp",
- "kuriyama.hokkaido.jp",
- "kuromatsunai.hokkaido.jp",
- "kushiro.hokkaido.jp",
- "kutchan.hokkaido.jp",
- "kyowa.hokkaido.jp",
- "mashike.hokkaido.jp",
- "matsumae.hokkaido.jp",
- "mikasa.hokkaido.jp",
- "minamifurano.hokkaido.jp",
- "mombetsu.hokkaido.jp",
- "moseushi.hokkaido.jp",
- "mukawa.hokkaido.jp",
- "muroran.hokkaido.jp",
- "naie.hokkaido.jp",
- "nakagawa.hokkaido.jp",
- "nakasatsunai.hokkaido.jp",
- "nakatombetsu.hokkaido.jp",
- "nanae.hokkaido.jp",
- "nanporo.hokkaido.jp",
- "nayoro.hokkaido.jp",
- "nemuro.hokkaido.jp",
- "niikappu.hokkaido.jp",
- "niki.hokkaido.jp",
- "nishiokoppe.hokkaido.jp",
- "noboribetsu.hokkaido.jp",
- "numata.hokkaido.jp",
- "obihiro.hokkaido.jp",
- "obira.hokkaido.jp",
- "oketo.hokkaido.jp",
- "okoppe.hokkaido.jp",
- "otaru.hokkaido.jp",
- "otobe.hokkaido.jp",
- "otofuke.hokkaido.jp",
- "otoineppu.hokkaido.jp",
- "oumu.hokkaido.jp",
- "ozora.hokkaido.jp",
- "pippu.hokkaido.jp",
- "rankoshi.hokkaido.jp",
- "rebun.hokkaido.jp",
- "rikubetsu.hokkaido.jp",
- "rishiri.hokkaido.jp",
- "rishirifuji.hokkaido.jp",
- "saroma.hokkaido.jp",
- "sarufutsu.hokkaido.jp",
- "shakotan.hokkaido.jp",
- "shari.hokkaido.jp",
- "shibecha.hokkaido.jp",
- "shibetsu.hokkaido.jp",
- "shikabe.hokkaido.jp",
- "shikaoi.hokkaido.jp",
- "shimamaki.hokkaido.jp",
- "shimizu.hokkaido.jp",
- "shimokawa.hokkaido.jp",
- "shinshinotsu.hokkaido.jp",
- "shintoku.hokkaido.jp",
- "shiranuka.hokkaido.jp",
- "shiraoi.hokkaido.jp",
- "shiriuchi.hokkaido.jp",
- "sobetsu.hokkaido.jp",
- "sunagawa.hokkaido.jp",
- "taiki.hokkaido.jp",
- "takasu.hokkaido.jp",
- "takikawa.hokkaido.jp",
- "takinoue.hokkaido.jp",
- "teshikaga.hokkaido.jp",
- "tobetsu.hokkaido.jp",
- "tohma.hokkaido.jp",
- "tomakomai.hokkaido.jp",
- "tomari.hokkaido.jp",
- "toya.hokkaido.jp",
- "toyako.hokkaido.jp",
- "toyotomi.hokkaido.jp",
- "toyoura.hokkaido.jp",
- "tsubetsu.hokkaido.jp",
- "tsukigata.hokkaido.jp",
- "urakawa.hokkaido.jp",
- "urausu.hokkaido.jp",
- "uryu.hokkaido.jp",
- "utashinai.hokkaido.jp",
- "wakkanai.hokkaido.jp",
- "wassamu.hokkaido.jp",
- "yakumo.hokkaido.jp",
- "yoichi.hokkaido.jp",
- "aioi.hyogo.jp",
- "akashi.hyogo.jp",
- "ako.hyogo.jp",
- "amagasaki.hyogo.jp",
- "aogaki.hyogo.jp",
- "asago.hyogo.jp",
- "ashiya.hyogo.jp",
- "awaji.hyogo.jp",
- "fukusaki.hyogo.jp",
- "goshiki.hyogo.jp",
- "harima.hyogo.jp",
- "himeji.hyogo.jp",
- "ichikawa.hyogo.jp",
- "inagawa.hyogo.jp",
- "itami.hyogo.jp",
- "kakogawa.hyogo.jp",
- "kamigori.hyogo.jp",
- "kamikawa.hyogo.jp",
- "kasai.hyogo.jp",
- "kasuga.hyogo.jp",
- "kawanishi.hyogo.jp",
- "miki.hyogo.jp",
- "minamiawaji.hyogo.jp",
- "nishinomiya.hyogo.jp",
- "nishiwaki.hyogo.jp",
- "ono.hyogo.jp",
- "sanda.hyogo.jp",
- "sannan.hyogo.jp",
- "sasayama.hyogo.jp",
- "sayo.hyogo.jp",
- "shingu.hyogo.jp",
- "shinonsen.hyogo.jp",
- "shiso.hyogo.jp",
- "sumoto.hyogo.jp",
- "taishi.hyogo.jp",
- "taka.hyogo.jp",
- "takarazuka.hyogo.jp",
- "takasago.hyogo.jp",
- "takino.hyogo.jp",
- "tamba.hyogo.jp",
- "tatsuno.hyogo.jp",
- "toyooka.hyogo.jp",
- "yabu.hyogo.jp",
- "yashiro.hyogo.jp",
- "yoka.hyogo.jp",
- "yokawa.hyogo.jp",
- "ami.ibaraki.jp",
- "asahi.ibaraki.jp",
- "bando.ibaraki.jp",
- "chikusei.ibaraki.jp",
- "daigo.ibaraki.jp",
- "fujishiro.ibaraki.jp",
- "hitachi.ibaraki.jp",
- "hitachinaka.ibaraki.jp",
- "hitachiomiya.ibaraki.jp",
- "hitachiota.ibaraki.jp",
- "ibaraki.ibaraki.jp",
- "ina.ibaraki.jp",
- "inashiki.ibaraki.jp",
- "itako.ibaraki.jp",
- "iwama.ibaraki.jp",
- "joso.ibaraki.jp",
- "kamisu.ibaraki.jp",
- "kasama.ibaraki.jp",
- "kashima.ibaraki.jp",
- "kasumigaura.ibaraki.jp",
- "koga.ibaraki.jp",
- "miho.ibaraki.jp",
- "mito.ibaraki.jp",
- "moriya.ibaraki.jp",
- "naka.ibaraki.jp",
- "namegata.ibaraki.jp",
- "oarai.ibaraki.jp",
- "ogawa.ibaraki.jp",
- "omitama.ibaraki.jp",
- "ryugasaki.ibaraki.jp",
- "sakai.ibaraki.jp",
- "sakuragawa.ibaraki.jp",
- "shimodate.ibaraki.jp",
- "shimotsuma.ibaraki.jp",
- "shirosato.ibaraki.jp",
- "sowa.ibaraki.jp",
- "suifu.ibaraki.jp",
- "takahagi.ibaraki.jp",
- "tamatsukuri.ibaraki.jp",
- "tokai.ibaraki.jp",
- "tomobe.ibaraki.jp",
- "tone.ibaraki.jp",
- "toride.ibaraki.jp",
- "tsuchiura.ibaraki.jp",
- "tsukuba.ibaraki.jp",
- "uchihara.ibaraki.jp",
- "ushiku.ibaraki.jp",
- "yachiyo.ibaraki.jp",
- "yamagata.ibaraki.jp",
- "yawara.ibaraki.jp",
- "yuki.ibaraki.jp",
- "anamizu.ishikawa.jp",
- "hakui.ishikawa.jp",
- "hakusan.ishikawa.jp",
- "kaga.ishikawa.jp",
- "kahoku.ishikawa.jp",
- "kanazawa.ishikawa.jp",
- "kawakita.ishikawa.jp",
- "komatsu.ishikawa.jp",
- "nakanoto.ishikawa.jp",
- "nanao.ishikawa.jp",
- "nomi.ishikawa.jp",
- "nonoichi.ishikawa.jp",
- "noto.ishikawa.jp",
- "shika.ishikawa.jp",
- "suzu.ishikawa.jp",
- "tsubata.ishikawa.jp",
- "tsurugi.ishikawa.jp",
- "uchinada.ishikawa.jp",
- "wajima.ishikawa.jp",
- "fudai.iwate.jp",
- "fujisawa.iwate.jp",
- "hanamaki.iwate.jp",
- "hiraizumi.iwate.jp",
- "hirono.iwate.jp",
- "ichinohe.iwate.jp",
- "ichinoseki.iwate.jp",
- "iwaizumi.iwate.jp",
- "iwate.iwate.jp",
- "joboji.iwate.jp",
- "kamaishi.iwate.jp",
- "kanegasaki.iwate.jp",
- "karumai.iwate.jp",
- "kawai.iwate.jp",
- "kitakami.iwate.jp",
- "kuji.iwate.jp",
- "kunohe.iwate.jp",
- "kuzumaki.iwate.jp",
- "miyako.iwate.jp",
- "mizusawa.iwate.jp",
- "morioka.iwate.jp",
- "ninohe.iwate.jp",
- "noda.iwate.jp",
- "ofunato.iwate.jp",
- "oshu.iwate.jp",
- "otsuchi.iwate.jp",
- "rikuzentakata.iwate.jp",
- "shiwa.iwate.jp",
- "shizukuishi.iwate.jp",
- "sumita.iwate.jp",
- "tanohata.iwate.jp",
- "tono.iwate.jp",
- "yahaba.iwate.jp",
- "yamada.iwate.jp",
- "ayagawa.kagawa.jp",
- "higashikagawa.kagawa.jp",
- "kanonji.kagawa.jp",
- "kotohira.kagawa.jp",
- "manno.kagawa.jp",
- "marugame.kagawa.jp",
- "mitoyo.kagawa.jp",
- "naoshima.kagawa.jp",
- "sanuki.kagawa.jp",
- "tadotsu.kagawa.jp",
- "takamatsu.kagawa.jp",
- "tonosho.kagawa.jp",
- "uchinomi.kagawa.jp",
- "utazu.kagawa.jp",
- "zentsuji.kagawa.jp",
- "akune.kagoshima.jp",
- "amami.kagoshima.jp",
- "hioki.kagoshima.jp",
- "isa.kagoshima.jp",
- "isen.kagoshima.jp",
- "izumi.kagoshima.jp",
- "kagoshima.kagoshima.jp",
- "kanoya.kagoshima.jp",
- "kawanabe.kagoshima.jp",
- "kinko.kagoshima.jp",
- "kouyama.kagoshima.jp",
- "makurazaki.kagoshima.jp",
- "matsumoto.kagoshima.jp",
- "minamitane.kagoshima.jp",
- "nakatane.kagoshima.jp",
- "nishinoomote.kagoshima.jp",
- "satsumasendai.kagoshima.jp",
- "soo.kagoshima.jp",
- "tarumizu.kagoshima.jp",
- "yusui.kagoshima.jp",
- "aikawa.kanagawa.jp",
- "atsugi.kanagawa.jp",
- "ayase.kanagawa.jp",
- "chigasaki.kanagawa.jp",
- "ebina.kanagawa.jp",
- "fujisawa.kanagawa.jp",
- "hadano.kanagawa.jp",
- "hakone.kanagawa.jp",
- "hiratsuka.kanagawa.jp",
- "isehara.kanagawa.jp",
- "kaisei.kanagawa.jp",
- "kamakura.kanagawa.jp",
- "kiyokawa.kanagawa.jp",
- "matsuda.kanagawa.jp",
- "minamiashigara.kanagawa.jp",
- "miura.kanagawa.jp",
- "nakai.kanagawa.jp",
- "ninomiya.kanagawa.jp",
- "odawara.kanagawa.jp",
- "oi.kanagawa.jp",
- "oiso.kanagawa.jp",
- "sagamihara.kanagawa.jp",
- "samukawa.kanagawa.jp",
- "tsukui.kanagawa.jp",
- "yamakita.kanagawa.jp",
- "yamato.kanagawa.jp",
- "yokosuka.kanagawa.jp",
- "yugawara.kanagawa.jp",
- "zama.kanagawa.jp",
- "zushi.kanagawa.jp",
- "aki.kochi.jp",
- "geisei.kochi.jp",
- "hidaka.kochi.jp",
- "higashitsuno.kochi.jp",
- "ino.kochi.jp",
- "kagami.kochi.jp",
- "kami.kochi.jp",
- "kitagawa.kochi.jp",
- "kochi.kochi.jp",
- "mihara.kochi.jp",
- "motoyama.kochi.jp",
- "muroto.kochi.jp",
- "nahari.kochi.jp",
- "nakamura.kochi.jp",
- "nankoku.kochi.jp",
- "nishitosa.kochi.jp",
- "niyodogawa.kochi.jp",
- "ochi.kochi.jp",
- "okawa.kochi.jp",
- "otoyo.kochi.jp",
- "otsuki.kochi.jp",
- "sakawa.kochi.jp",
- "sukumo.kochi.jp",
- "susaki.kochi.jp",
- "tosa.kochi.jp",
- "tosashimizu.kochi.jp",
- "toyo.kochi.jp",
- "tsuno.kochi.jp",
- "umaji.kochi.jp",
- "yasuda.kochi.jp",
- "yusuhara.kochi.jp",
- "amakusa.kumamoto.jp",
- "arao.kumamoto.jp",
- "aso.kumamoto.jp",
- "choyo.kumamoto.jp",
- "gyokuto.kumamoto.jp",
- "kamiamakusa.kumamoto.jp",
- "kikuchi.kumamoto.jp",
- "kumamoto.kumamoto.jp",
- "mashiki.kumamoto.jp",
- "mifune.kumamoto.jp",
- "minamata.kumamoto.jp",
- "minamioguni.kumamoto.jp",
- "nagasu.kumamoto.jp",
- "nishihara.kumamoto.jp",
- "oguni.kumamoto.jp",
- "ozu.kumamoto.jp",
- "sumoto.kumamoto.jp",
- "takamori.kumamoto.jp",
- "uki.kumamoto.jp",
- "uto.kumamoto.jp",
- "yamaga.kumamoto.jp",
- "yamato.kumamoto.jp",
- "yatsushiro.kumamoto.jp",
- "ayabe.kyoto.jp",
- "fukuchiyama.kyoto.jp",
- "higashiyama.kyoto.jp",
- "ide.kyoto.jp",
- "ine.kyoto.jp",
- "joyo.kyoto.jp",
- "kameoka.kyoto.jp",
- "kamo.kyoto.jp",
- "kita.kyoto.jp",
- "kizu.kyoto.jp",
- "kumiyama.kyoto.jp",
- "kyotamba.kyoto.jp",
- "kyotanabe.kyoto.jp",
- "kyotango.kyoto.jp",
- "maizuru.kyoto.jp",
- "minami.kyoto.jp",
- "minamiyamashiro.kyoto.jp",
- "miyazu.kyoto.jp",
- "muko.kyoto.jp",
- "nagaokakyo.kyoto.jp",
- "nakagyo.kyoto.jp",
- "nantan.kyoto.jp",
- "oyamazaki.kyoto.jp",
- "sakyo.kyoto.jp",
- "seika.kyoto.jp",
- "tanabe.kyoto.jp",
- "uji.kyoto.jp",
- "ujitawara.kyoto.jp",
- "wazuka.kyoto.jp",
- "yamashina.kyoto.jp",
- "yawata.kyoto.jp",
- "asahi.mie.jp",
- "inabe.mie.jp",
- "ise.mie.jp",
- "kameyama.mie.jp",
- "kawagoe.mie.jp",
- "kiho.mie.jp",
- "kisosaki.mie.jp",
- "kiwa.mie.jp",
- "komono.mie.jp",
- "kumano.mie.jp",
- "kuwana.mie.jp",
- "matsusaka.mie.jp",
- "meiwa.mie.jp",
- "mihama.mie.jp",
- "minamiise.mie.jp",
- "misugi.mie.jp",
- "miyama.mie.jp",
- "nabari.mie.jp",
- "shima.mie.jp",
- "suzuka.mie.jp",
- "tado.mie.jp",
- "taiki.mie.jp",
- "taki.mie.jp",
- "tamaki.mie.jp",
- "toba.mie.jp",
- "tsu.mie.jp",
- "udono.mie.jp",
- "ureshino.mie.jp",
- "watarai.mie.jp",
- "yokkaichi.mie.jp",
- "furukawa.miyagi.jp",
- "higashimatsushima.miyagi.jp",
- "ishinomaki.miyagi.jp",
- "iwanuma.miyagi.jp",
- "kakuda.miyagi.jp",
- "kami.miyagi.jp",
- "kawasaki.miyagi.jp",
- "marumori.miyagi.jp",
- "matsushima.miyagi.jp",
- "minamisanriku.miyagi.jp",
- "misato.miyagi.jp",
- "murata.miyagi.jp",
- "natori.miyagi.jp",
- "ogawara.miyagi.jp",
- "ohira.miyagi.jp",
- "onagawa.miyagi.jp",
- "osaki.miyagi.jp",
- "rifu.miyagi.jp",
- "semine.miyagi.jp",
- "shibata.miyagi.jp",
- "shichikashuku.miyagi.jp",
- "shikama.miyagi.jp",
- "shiogama.miyagi.jp",
- "shiroishi.miyagi.jp",
- "tagajo.miyagi.jp",
- "taiwa.miyagi.jp",
- "tome.miyagi.jp",
- "tomiya.miyagi.jp",
- "wakuya.miyagi.jp",
- "watari.miyagi.jp",
- "yamamoto.miyagi.jp",
- "zao.miyagi.jp",
- "aya.miyazaki.jp",
- "ebino.miyazaki.jp",
- "gokase.miyazaki.jp",
- "hyuga.miyazaki.jp",
- "kadogawa.miyazaki.jp",
- "kawaminami.miyazaki.jp",
- "kijo.miyazaki.jp",
- "kitagawa.miyazaki.jp",
- "kitakata.miyazaki.jp",
- "kitaura.miyazaki.jp",
- "kobayashi.miyazaki.jp",
- "kunitomi.miyazaki.jp",
- "kushima.miyazaki.jp",
- "mimata.miyazaki.jp",
- "miyakonojo.miyazaki.jp",
- "miyazaki.miyazaki.jp",
- "morotsuka.miyazaki.jp",
- "nichinan.miyazaki.jp",
- "nishimera.miyazaki.jp",
- "nobeoka.miyazaki.jp",
- "saito.miyazaki.jp",
- "shiiba.miyazaki.jp",
- "shintomi.miyazaki.jp",
- "takaharu.miyazaki.jp",
- "takanabe.miyazaki.jp",
- "takazaki.miyazaki.jp",
- "tsuno.miyazaki.jp",
- "achi.nagano.jp",
- "agematsu.nagano.jp",
- "anan.nagano.jp",
- "aoki.nagano.jp",
- "asahi.nagano.jp",
- "azumino.nagano.jp",
- "chikuhoku.nagano.jp",
- "chikuma.nagano.jp",
- "chino.nagano.jp",
- "fujimi.nagano.jp",
- "hakuba.nagano.jp",
- "hara.nagano.jp",
- "hiraya.nagano.jp",
- "iida.nagano.jp",
- "iijima.nagano.jp",
- "iiyama.nagano.jp",
- "iizuna.nagano.jp",
- "ikeda.nagano.jp",
- "ikusaka.nagano.jp",
- "ina.nagano.jp",
- "karuizawa.nagano.jp",
- "kawakami.nagano.jp",
- "kiso.nagano.jp",
- "kisofukushima.nagano.jp",
- "kitaaiki.nagano.jp",
- "komagane.nagano.jp",
- "komoro.nagano.jp",
- "matsukawa.nagano.jp",
- "matsumoto.nagano.jp",
- "miasa.nagano.jp",
- "minamiaiki.nagano.jp",
- "minamimaki.nagano.jp",
- "minamiminowa.nagano.jp",
- "minowa.nagano.jp",
- "miyada.nagano.jp",
- "miyota.nagano.jp",
- "mochizuki.nagano.jp",
- "nagano.nagano.jp",
- "nagawa.nagano.jp",
- "nagiso.nagano.jp",
- "nakagawa.nagano.jp",
- "nakano.nagano.jp",
- "nozawaonsen.nagano.jp",
- "obuse.nagano.jp",
- "ogawa.nagano.jp",
- "okaya.nagano.jp",
- "omachi.nagano.jp",
- "omi.nagano.jp",
- "ookuwa.nagano.jp",
- "ooshika.nagano.jp",
- "otaki.nagano.jp",
- "otari.nagano.jp",
- "sakae.nagano.jp",
- "sakaki.nagano.jp",
- "saku.nagano.jp",
- "sakuho.nagano.jp",
- "shimosuwa.nagano.jp",
- "shinanomachi.nagano.jp",
- "shiojiri.nagano.jp",
- "suwa.nagano.jp",
- "suzaka.nagano.jp",
- "takagi.nagano.jp",
- "takamori.nagano.jp",
- "takayama.nagano.jp",
- "tateshina.nagano.jp",
- "tatsuno.nagano.jp",
- "togakushi.nagano.jp",
- "togura.nagano.jp",
- "tomi.nagano.jp",
- "ueda.nagano.jp",
- "wada.nagano.jp",
- "yamagata.nagano.jp",
- "yamanouchi.nagano.jp",
- "yasaka.nagano.jp",
- "yasuoka.nagano.jp",
- "chijiwa.nagasaki.jp",
- "futsu.nagasaki.jp",
- "goto.nagasaki.jp",
- "hasami.nagasaki.jp",
- "hirado.nagasaki.jp",
- "iki.nagasaki.jp",
- "isahaya.nagasaki.jp",
- "kawatana.nagasaki.jp",
- "kuchinotsu.nagasaki.jp",
- "matsuura.nagasaki.jp",
- "nagasaki.nagasaki.jp",
- "obama.nagasaki.jp",
- "omura.nagasaki.jp",
- "oseto.nagasaki.jp",
- "saikai.nagasaki.jp",
- "sasebo.nagasaki.jp",
- "seihi.nagasaki.jp",
- "shimabara.nagasaki.jp",
- "shinkamigoto.nagasaki.jp",
- "togitsu.nagasaki.jp",
- "tsushima.nagasaki.jp",
- "unzen.nagasaki.jp",
- "ando.nara.jp",
- "gose.nara.jp",
- "heguri.nara.jp",
- "higashiyoshino.nara.jp",
- "ikaruga.nara.jp",
- "ikoma.nara.jp",
- "kamikitayama.nara.jp",
- "kanmaki.nara.jp",
- "kashiba.nara.jp",
- "kashihara.nara.jp",
- "katsuragi.nara.jp",
- "kawai.nara.jp",
- "kawakami.nara.jp",
- "kawanishi.nara.jp",
- "koryo.nara.jp",
- "kurotaki.nara.jp",
- "mitsue.nara.jp",
- "miyake.nara.jp",
- "nara.nara.jp",
- "nosegawa.nara.jp",
- "oji.nara.jp",
- "ouda.nara.jp",
- "oyodo.nara.jp",
- "sakurai.nara.jp",
- "sango.nara.jp",
- "shimoichi.nara.jp",
- "shimokitayama.nara.jp",
- "shinjo.nara.jp",
- "soni.nara.jp",
- "takatori.nara.jp",
- "tawaramoto.nara.jp",
- "tenkawa.nara.jp",
- "tenri.nara.jp",
- "uda.nara.jp",
- "yamatokoriyama.nara.jp",
- "yamatotakada.nara.jp",
- "yamazoe.nara.jp",
- "yoshino.nara.jp",
- "aga.niigata.jp",
- "agano.niigata.jp",
- "gosen.niigata.jp",
- "itoigawa.niigata.jp",
- "izumozaki.niigata.jp",
- "joetsu.niigata.jp",
- "kamo.niigata.jp",
- "kariwa.niigata.jp",
- "kashiwazaki.niigata.jp",
- "minamiuonuma.niigata.jp",
- "mitsuke.niigata.jp",
- "muika.niigata.jp",
- "murakami.niigata.jp",
- "myoko.niigata.jp",
- "nagaoka.niigata.jp",
- "niigata.niigata.jp",
- "ojiya.niigata.jp",
- "omi.niigata.jp",
- "sado.niigata.jp",
- "sanjo.niigata.jp",
- "seiro.niigata.jp",
- "seirou.niigata.jp",
- "sekikawa.niigata.jp",
- "shibata.niigata.jp",
- "tagami.niigata.jp",
- "tainai.niigata.jp",
- "tochio.niigata.jp",
- "tokamachi.niigata.jp",
- "tsubame.niigata.jp",
- "tsunan.niigata.jp",
- "uonuma.niigata.jp",
- "yahiko.niigata.jp",
- "yoita.niigata.jp",
- "yuzawa.niigata.jp",
- "beppu.oita.jp",
- "bungoono.oita.jp",
- "bungotakada.oita.jp",
- "hasama.oita.jp",
- "hiji.oita.jp",
- "himeshima.oita.jp",
- "hita.oita.jp",
- "kamitsue.oita.jp",
- "kokonoe.oita.jp",
- "kuju.oita.jp",
- "kunisaki.oita.jp",
- "kusu.oita.jp",
- "oita.oita.jp",
- "saiki.oita.jp",
- "taketa.oita.jp",
- "tsukumi.oita.jp",
- "usa.oita.jp",
- "usuki.oita.jp",
- "yufu.oita.jp",
- "akaiwa.okayama.jp",
- "asakuchi.okayama.jp",
- "bizen.okayama.jp",
- "hayashima.okayama.jp",
- "ibara.okayama.jp",
- "kagamino.okayama.jp",
- "kasaoka.okayama.jp",
- "kibichuo.okayama.jp",
- "kumenan.okayama.jp",
- "kurashiki.okayama.jp",
- "maniwa.okayama.jp",
- "misaki.okayama.jp",
- "nagi.okayama.jp",
- "niimi.okayama.jp",
- "nishiawakura.okayama.jp",
- "okayama.okayama.jp",
- "satosho.okayama.jp",
- "setouchi.okayama.jp",
- "shinjo.okayama.jp",
- "shoo.okayama.jp",
- "soja.okayama.jp",
- "takahashi.okayama.jp",
- "tamano.okayama.jp",
- "tsuyama.okayama.jp",
- "wake.okayama.jp",
- "yakage.okayama.jp",
- "aguni.okinawa.jp",
- "ginowan.okinawa.jp",
- "ginoza.okinawa.jp",
- "gushikami.okinawa.jp",
- "haebaru.okinawa.jp",
- "higashi.okinawa.jp",
- "hirara.okinawa.jp",
- "iheya.okinawa.jp",
- "ishigaki.okinawa.jp",
- "ishikawa.okinawa.jp",
- "itoman.okinawa.jp",
- "izena.okinawa.jp",
- "kadena.okinawa.jp",
- "kin.okinawa.jp",
- "kitadaito.okinawa.jp",
- "kitanakagusuku.okinawa.jp",
- "kumejima.okinawa.jp",
- "kunigami.okinawa.jp",
- "minamidaito.okinawa.jp",
- "motobu.okinawa.jp",
- "nago.okinawa.jp",
- "naha.okinawa.jp",
- "nakagusuku.okinawa.jp",
- "nakijin.okinawa.jp",
- "nanjo.okinawa.jp",
- "nishihara.okinawa.jp",
- "ogimi.okinawa.jp",
- "okinawa.okinawa.jp",
- "onna.okinawa.jp",
- "shimoji.okinawa.jp",
- "taketomi.okinawa.jp",
- "tarama.okinawa.jp",
- "tokashiki.okinawa.jp",
- "tomigusuku.okinawa.jp",
- "tonaki.okinawa.jp",
- "urasoe.okinawa.jp",
- "uruma.okinawa.jp",
- "yaese.okinawa.jp",
- "yomitan.okinawa.jp",
- "yonabaru.okinawa.jp",
- "yonaguni.okinawa.jp",
- "zamami.okinawa.jp",
- "abeno.osaka.jp",
- "chihayaakasaka.osaka.jp",
- "chuo.osaka.jp",
- "daito.osaka.jp",
- "fujiidera.osaka.jp",
- "habikino.osaka.jp",
- "hannan.osaka.jp",
- "higashiosaka.osaka.jp",
- "higashisumiyoshi.osaka.jp",
- "higashiyodogawa.osaka.jp",
- "hirakata.osaka.jp",
- "ibaraki.osaka.jp",
- "ikeda.osaka.jp",
- "izumi.osaka.jp",
- "izumiotsu.osaka.jp",
- "izumisano.osaka.jp",
- "kadoma.osaka.jp",
- "kaizuka.osaka.jp",
- "kanan.osaka.jp",
- "kashiwara.osaka.jp",
- "katano.osaka.jp",
- "kawachinagano.osaka.jp",
- "kishiwada.osaka.jp",
- "kita.osaka.jp",
- "kumatori.osaka.jp",
- "matsubara.osaka.jp",
- "minato.osaka.jp",
- "minoh.osaka.jp",
- "misaki.osaka.jp",
- "moriguchi.osaka.jp",
- "neyagawa.osaka.jp",
- "nishi.osaka.jp",
- "nose.osaka.jp",
- "osakasayama.osaka.jp",
- "sakai.osaka.jp",
- "sayama.osaka.jp",
- "sennan.osaka.jp",
- "settsu.osaka.jp",
- "shijonawate.osaka.jp",
- "shimamoto.osaka.jp",
- "suita.osaka.jp",
- "tadaoka.osaka.jp",
- "taishi.osaka.jp",
- "tajiri.osaka.jp",
- "takaishi.osaka.jp",
- "takatsuki.osaka.jp",
- "tondabayashi.osaka.jp",
- "toyonaka.osaka.jp",
- "toyono.osaka.jp",
- "yao.osaka.jp",
- "ariake.saga.jp",
- "arita.saga.jp",
- "fukudomi.saga.jp",
- "genkai.saga.jp",
- "hamatama.saga.jp",
- "hizen.saga.jp",
- "imari.saga.jp",
- "kamimine.saga.jp",
- "kanzaki.saga.jp",
- "karatsu.saga.jp",
- "kashima.saga.jp",
- "kitagata.saga.jp",
- "kitahata.saga.jp",
- "kiyama.saga.jp",
- "kouhoku.saga.jp",
- "kyuragi.saga.jp",
- "nishiarita.saga.jp",
- "ogi.saga.jp",
- "omachi.saga.jp",
- "ouchi.saga.jp",
- "saga.saga.jp",
- "shiroishi.saga.jp",
- "taku.saga.jp",
- "tara.saga.jp",
- "tosu.saga.jp",
- "yoshinogari.saga.jp",
- "arakawa.saitama.jp",
- "asaka.saitama.jp",
- "chichibu.saitama.jp",
- "fujimi.saitama.jp",
- "fujimino.saitama.jp",
- "fukaya.saitama.jp",
- "hanno.saitama.jp",
- "hanyu.saitama.jp",
- "hasuda.saitama.jp",
- "hatogaya.saitama.jp",
- "hatoyama.saitama.jp",
- "hidaka.saitama.jp",
- "higashichichibu.saitama.jp",
- "higashimatsuyama.saitama.jp",
- "honjo.saitama.jp",
- "ina.saitama.jp",
- "iruma.saitama.jp",
- "iwatsuki.saitama.jp",
- "kamiizumi.saitama.jp",
- "kamikawa.saitama.jp",
- "kamisato.saitama.jp",
- "kasukabe.saitama.jp",
- "kawagoe.saitama.jp",
- "kawaguchi.saitama.jp",
- "kawajima.saitama.jp",
- "kazo.saitama.jp",
- "kitamoto.saitama.jp",
- "koshigaya.saitama.jp",
- "kounosu.saitama.jp",
- "kuki.saitama.jp",
- "kumagaya.saitama.jp",
- "matsubushi.saitama.jp",
- "minano.saitama.jp",
- "misato.saitama.jp",
- "miyashiro.saitama.jp",
- "miyoshi.saitama.jp",
- "moroyama.saitama.jp",
- "nagatoro.saitama.jp",
- "namegawa.saitama.jp",
- "niiza.saitama.jp",
- "ogano.saitama.jp",
- "ogawa.saitama.jp",
- "ogose.saitama.jp",
- "okegawa.saitama.jp",
- "omiya.saitama.jp",
- "otaki.saitama.jp",
- "ranzan.saitama.jp",
- "ryokami.saitama.jp",
- "saitama.saitama.jp",
- "sakado.saitama.jp",
- "satte.saitama.jp",
- "sayama.saitama.jp",
- "shiki.saitama.jp",
- "shiraoka.saitama.jp",
- "soka.saitama.jp",
- "sugito.saitama.jp",
- "toda.saitama.jp",
- "tokigawa.saitama.jp",
- "tokorozawa.saitama.jp",
- "tsurugashima.saitama.jp",
- "urawa.saitama.jp",
- "warabi.saitama.jp",
- "yashio.saitama.jp",
- "yokoze.saitama.jp",
- "yono.saitama.jp",
- "yorii.saitama.jp",
- "yoshida.saitama.jp",
- "yoshikawa.saitama.jp",
- "yoshimi.saitama.jp",
- "aisho.shiga.jp",
- "gamo.shiga.jp",
- "higashiomi.shiga.jp",
- "hikone.shiga.jp",
- "koka.shiga.jp",
- "konan.shiga.jp",
- "kosei.shiga.jp",
- "koto.shiga.jp",
- "kusatsu.shiga.jp",
- "maibara.shiga.jp",
- "moriyama.shiga.jp",
- "nagahama.shiga.jp",
- "nishiazai.shiga.jp",
- "notogawa.shiga.jp",
- "omihachiman.shiga.jp",
- "otsu.shiga.jp",
- "ritto.shiga.jp",
- "ryuoh.shiga.jp",
- "takashima.shiga.jp",
- "takatsuki.shiga.jp",
- "torahime.shiga.jp",
- "toyosato.shiga.jp",
- "yasu.shiga.jp",
- "akagi.shimane.jp",
- "ama.shimane.jp",
- "gotsu.shimane.jp",
- "hamada.shimane.jp",
- "higashiizumo.shimane.jp",
- "hikawa.shimane.jp",
- "hikimi.shimane.jp",
- "izumo.shimane.jp",
- "kakinoki.shimane.jp",
- "masuda.shimane.jp",
- "matsue.shimane.jp",
- "misato.shimane.jp",
- "nishinoshima.shimane.jp",
- "ohda.shimane.jp",
- "okinoshima.shimane.jp",
- "okuizumo.shimane.jp",
- "shimane.shimane.jp",
- "tamayu.shimane.jp",
- "tsuwano.shimane.jp",
- "unnan.shimane.jp",
- "yakumo.shimane.jp",
- "yasugi.shimane.jp",
- "yatsuka.shimane.jp",
- "arai.shizuoka.jp",
- "atami.shizuoka.jp",
- "fuji.shizuoka.jp",
- "fujieda.shizuoka.jp",
- "fujikawa.shizuoka.jp",
- "fujinomiya.shizuoka.jp",
- "fukuroi.shizuoka.jp",
- "gotemba.shizuoka.jp",
- "haibara.shizuoka.jp",
- "hamamatsu.shizuoka.jp",
- "higashiizu.shizuoka.jp",
- "ito.shizuoka.jp",
- "iwata.shizuoka.jp",
- "izu.shizuoka.jp",
- "izunokuni.shizuoka.jp",
- "kakegawa.shizuoka.jp",
- "kannami.shizuoka.jp",
- "kawanehon.shizuoka.jp",
- "kawazu.shizuoka.jp",
- "kikugawa.shizuoka.jp",
- "kosai.shizuoka.jp",
- "makinohara.shizuoka.jp",
- "matsuzaki.shizuoka.jp",
- "minamiizu.shizuoka.jp",
- "mishima.shizuoka.jp",
- "morimachi.shizuoka.jp",
- "nishiizu.shizuoka.jp",
- "numazu.shizuoka.jp",
- "omaezaki.shizuoka.jp",
- "shimada.shizuoka.jp",
- "shimizu.shizuoka.jp",
- "shimoda.shizuoka.jp",
- "shizuoka.shizuoka.jp",
- "susono.shizuoka.jp",
- "yaizu.shizuoka.jp",
- "yoshida.shizuoka.jp",
- "ashikaga.tochigi.jp",
- "bato.tochigi.jp",
- "haga.tochigi.jp",
- "ichikai.tochigi.jp",
- "iwafune.tochigi.jp",
- "kaminokawa.tochigi.jp",
- "kanuma.tochigi.jp",
- "karasuyama.tochigi.jp",
- "kuroiso.tochigi.jp",
- "mashiko.tochigi.jp",
- "mibu.tochigi.jp",
- "moka.tochigi.jp",
- "motegi.tochigi.jp",
- "nasu.tochigi.jp",
- "nasushiobara.tochigi.jp",
- "nikko.tochigi.jp",
- "nishikata.tochigi.jp",
- "nogi.tochigi.jp",
- "ohira.tochigi.jp",
- "ohtawara.tochigi.jp",
- "oyama.tochigi.jp",
- "sakura.tochigi.jp",
- "sano.tochigi.jp",
- "shimotsuke.tochigi.jp",
- "shioya.tochigi.jp",
- "takanezawa.tochigi.jp",
- "tochigi.tochigi.jp",
- "tsuga.tochigi.jp",
- "ujiie.tochigi.jp",
- "utsunomiya.tochigi.jp",
- "yaita.tochigi.jp",
- "aizumi.tokushima.jp",
- "anan.tokushima.jp",
- "ichiba.tokushima.jp",
- "itano.tokushima.jp",
- "kainan.tokushima.jp",
- "komatsushima.tokushima.jp",
- "matsushige.tokushima.jp",
- "mima.tokushima.jp",
- "minami.tokushima.jp",
- "miyoshi.tokushima.jp",
- "mugi.tokushima.jp",
- "nakagawa.tokushima.jp",
- "naruto.tokushima.jp",
- "sanagochi.tokushima.jp",
- "shishikui.tokushima.jp",
- "tokushima.tokushima.jp",
- "wajiki.tokushima.jp",
- "adachi.tokyo.jp",
- "akiruno.tokyo.jp",
- "akishima.tokyo.jp",
- "aogashima.tokyo.jp",
- "arakawa.tokyo.jp",
- "bunkyo.tokyo.jp",
- "chiyoda.tokyo.jp",
- "chofu.tokyo.jp",
- "chuo.tokyo.jp",
- "edogawa.tokyo.jp",
- "fuchu.tokyo.jp",
- "fussa.tokyo.jp",
- "hachijo.tokyo.jp",
- "hachioji.tokyo.jp",
- "hamura.tokyo.jp",
- "higashikurume.tokyo.jp",
- "higashimurayama.tokyo.jp",
- "higashiyamato.tokyo.jp",
- "hino.tokyo.jp",
- "hinode.tokyo.jp",
- "hinohara.tokyo.jp",
- "inagi.tokyo.jp",
- "itabashi.tokyo.jp",
- "katsushika.tokyo.jp",
- "kita.tokyo.jp",
- "kiyose.tokyo.jp",
- "kodaira.tokyo.jp",
- "koganei.tokyo.jp",
- "kokubunji.tokyo.jp",
- "komae.tokyo.jp",
- "koto.tokyo.jp",
- "kouzushima.tokyo.jp",
- "kunitachi.tokyo.jp",
- "machida.tokyo.jp",
- "meguro.tokyo.jp",
- "minato.tokyo.jp",
- "mitaka.tokyo.jp",
- "mizuho.tokyo.jp",
- "musashimurayama.tokyo.jp",
- "musashino.tokyo.jp",
- "nakano.tokyo.jp",
- "nerima.tokyo.jp",
- "ogasawara.tokyo.jp",
- "okutama.tokyo.jp",
- "ome.tokyo.jp",
- "oshima.tokyo.jp",
- "ota.tokyo.jp",
- "setagaya.tokyo.jp",
- "shibuya.tokyo.jp",
- "shinagawa.tokyo.jp",
- "shinjuku.tokyo.jp",
- "suginami.tokyo.jp",
- "sumida.tokyo.jp",
- "tachikawa.tokyo.jp",
- "taito.tokyo.jp",
- "tama.tokyo.jp",
- "toshima.tokyo.jp",
- "chizu.tottori.jp",
- "hino.tottori.jp",
- "kawahara.tottori.jp",
- "koge.tottori.jp",
- "kotoura.tottori.jp",
- "misasa.tottori.jp",
- "nanbu.tottori.jp",
- "nichinan.tottori.jp",
- "sakaiminato.tottori.jp",
- "tottori.tottori.jp",
- "wakasa.tottori.jp",
- "yazu.tottori.jp",
- "yonago.tottori.jp",
- "asahi.toyama.jp",
- "fuchu.toyama.jp",
- "fukumitsu.toyama.jp",
- "funahashi.toyama.jp",
- "himi.toyama.jp",
- "imizu.toyama.jp",
- "inami.toyama.jp",
- "johana.toyama.jp",
- "kamiichi.toyama.jp",
- "kurobe.toyama.jp",
- "nakaniikawa.toyama.jp",
- "namerikawa.toyama.jp",
- "nanto.toyama.jp",
- "nyuzen.toyama.jp",
- "oyabe.toyama.jp",
- "taira.toyama.jp",
- "takaoka.toyama.jp",
- "tateyama.toyama.jp",
- "toga.toyama.jp",
- "tonami.toyama.jp",
- "toyama.toyama.jp",
- "unazuki.toyama.jp",
- "uozu.toyama.jp",
- "yamada.toyama.jp",
- "arida.wakayama.jp",
- "aridagawa.wakayama.jp",
- "gobo.wakayama.jp",
- "hashimoto.wakayama.jp",
- "hidaka.wakayama.jp",
- "hirogawa.wakayama.jp",
- "inami.wakayama.jp",
- "iwade.wakayama.jp",
- "kainan.wakayama.jp",
- "kamitonda.wakayama.jp",
- "katsuragi.wakayama.jp",
- "kimino.wakayama.jp",
- "kinokawa.wakayama.jp",
- "kitayama.wakayama.jp",
- "koya.wakayama.jp",
- "koza.wakayama.jp",
- "kozagawa.wakayama.jp",
- "kudoyama.wakayama.jp",
- "kushimoto.wakayama.jp",
- "mihama.wakayama.jp",
- "misato.wakayama.jp",
- "nachikatsuura.wakayama.jp",
- "shingu.wakayama.jp",
- "shirahama.wakayama.jp",
- "taiji.wakayama.jp",
- "tanabe.wakayama.jp",
- "wakayama.wakayama.jp",
- "yuasa.wakayama.jp",
- "yura.wakayama.jp",
- "asahi.yamagata.jp",
- "funagata.yamagata.jp",
- "higashine.yamagata.jp",
- "iide.yamagata.jp",
- "kahoku.yamagata.jp",
- "kaminoyama.yamagata.jp",
- "kaneyama.yamagata.jp",
- "kawanishi.yamagata.jp",
- "mamurogawa.yamagata.jp",
- "mikawa.yamagata.jp",
- "murayama.yamagata.jp",
- "nagai.yamagata.jp",
- "nakayama.yamagata.jp",
- "nanyo.yamagata.jp",
- "nishikawa.yamagata.jp",
- "obanazawa.yamagata.jp",
- "oe.yamagata.jp",
- "oguni.yamagata.jp",
- "ohkura.yamagata.jp",
- "oishida.yamagata.jp",
- "sagae.yamagata.jp",
- "sakata.yamagata.jp",
- "sakegawa.yamagata.jp",
- "shinjo.yamagata.jp",
- "shirataka.yamagata.jp",
- "shonai.yamagata.jp",
- "takahata.yamagata.jp",
- "tendo.yamagata.jp",
- "tozawa.yamagata.jp",
- "tsuruoka.yamagata.jp",
- "yamagata.yamagata.jp",
- "yamanobe.yamagata.jp",
- "yonezawa.yamagata.jp",
- "yuza.yamagata.jp",
- "abu.yamaguchi.jp",
- "hagi.yamaguchi.jp",
- "hikari.yamaguchi.jp",
- "hofu.yamaguchi.jp",
- "iwakuni.yamaguchi.jp",
- "kudamatsu.yamaguchi.jp",
- "mitou.yamaguchi.jp",
- "nagato.yamaguchi.jp",
- "oshima.yamaguchi.jp",
- "shimonoseki.yamaguchi.jp",
- "shunan.yamaguchi.jp",
- "tabuse.yamaguchi.jp",
- "tokuyama.yamaguchi.jp",
- "toyota.yamaguchi.jp",
- "ube.yamaguchi.jp",
- "yuu.yamaguchi.jp",
- "chuo.yamanashi.jp",
- "doshi.yamanashi.jp",
- "fuefuki.yamanashi.jp",
- "fujikawa.yamanashi.jp",
- "fujikawaguchiko.yamanashi.jp",
- "fujiyoshida.yamanashi.jp",
- "hayakawa.yamanashi.jp",
- "hokuto.yamanashi.jp",
- "ichikawamisato.yamanashi.jp",
- "kai.yamanashi.jp",
- "kofu.yamanashi.jp",
- "koshu.yamanashi.jp",
- "kosuge.yamanashi.jp",
- "minami-alps.yamanashi.jp",
- "minobu.yamanashi.jp",
- "nakamichi.yamanashi.jp",
- "nanbu.yamanashi.jp",
- "narusawa.yamanashi.jp",
- "nirasaki.yamanashi.jp",
- "nishikatsura.yamanashi.jp",
- "oshino.yamanashi.jp",
- "otsuki.yamanashi.jp",
- "showa.yamanashi.jp",
- "tabayama.yamanashi.jp",
- "tsuru.yamanashi.jp",
- "uenohara.yamanashi.jp",
- "yamanakako.yamanashi.jp",
- "yamanashi.yamanashi.jp",
- "*.ke",
- "kg",
- "org.kg",
- "net.kg",
- "com.kg",
- "edu.kg",
- "gov.kg",
- "mil.kg",
- "*.kh",
- "ki",
- "edu.ki",
- "biz.ki",
- "net.ki",
- "org.ki",
- "gov.ki",
- "info.ki",
- "com.ki",
- "km",
- "org.km",
- "nom.km",
- "gov.km",
- "prd.km",
- "tm.km",
- "edu.km",
- "mil.km",
- "ass.km",
- "com.km",
- "coop.km",
- "asso.km",
- "presse.km",
- "medecin.km",
- "notaires.km",
- "pharmaciens.km",
- "veterinaire.km",
- "gouv.km",
- "kn",
- "net.kn",
- "org.kn",
- "edu.kn",
- "gov.kn",
- "kp",
- "com.kp",
- "edu.kp",
- "gov.kp",
- "org.kp",
- "rep.kp",
- "tra.kp",
- "kr",
- "ac.kr",
- "co.kr",
- "es.kr",
- "go.kr",
- "hs.kr",
- "kg.kr",
- "mil.kr",
- "ms.kr",
- "ne.kr",
- "or.kr",
- "pe.kr",
- "re.kr",
- "sc.kr",
- "busan.kr",
- "chungbuk.kr",
- "chungnam.kr",
- "daegu.kr",
- "daejeon.kr",
- "gangwon.kr",
- "gwangju.kr",
- "gyeongbuk.kr",
- "gyeonggi.kr",
- "gyeongnam.kr",
- "incheon.kr",
- "jeju.kr",
- "jeonbuk.kr",
- "jeonnam.kr",
- "seoul.kr",
- "ulsan.kr",
- "*.kw",
- "ky",
- "edu.ky",
- "gov.ky",
- "com.ky",
- "org.ky",
- "net.ky",
- "kz",
- "org.kz",
- "edu.kz",
- "net.kz",
- "gov.kz",
- "mil.kz",
- "com.kz",
- "la",
- "int.la",
- "net.la",
- "info.la",
- "edu.la",
- "gov.la",
- "per.la",
- "com.la",
- "org.la",
- "lb",
- "com.lb",
- "edu.lb",
- "gov.lb",
- "net.lb",
- "org.lb",
- "lc",
- "com.lc",
- "net.lc",
- "co.lc",
- "org.lc",
- "edu.lc",
- "gov.lc",
- "li",
- "lk",
- "gov.lk",
- "sch.lk",
- "net.lk",
- "int.lk",
- "com.lk",
- "org.lk",
- "edu.lk",
- "ngo.lk",
- "soc.lk",
- "web.lk",
- "ltd.lk",
- "assn.lk",
- "grp.lk",
- "hotel.lk",
- "ac.lk",
- "lr",
- "com.lr",
- "edu.lr",
- "gov.lr",
- "org.lr",
- "net.lr",
- "ls",
- "co.ls",
- "org.ls",
- "lt",
- "gov.lt",
- "lu",
- "lv",
- "com.lv",
- "edu.lv",
- "gov.lv",
- "org.lv",
- "mil.lv",
- "id.lv",
- "net.lv",
- "asn.lv",
- "conf.lv",
- "ly",
- "com.ly",
- "net.ly",
- "gov.ly",
- "plc.ly",
- "edu.ly",
- "sch.ly",
- "med.ly",
- "org.ly",
- "id.ly",
- "ma",
- "co.ma",
- "net.ma",
- "gov.ma",
- "org.ma",
- "ac.ma",
- "press.ma",
- "mc",
- "tm.mc",
- "asso.mc",
- "md",
- "me",
- "co.me",
- "net.me",
- "org.me",
- "edu.me",
- "ac.me",
- "gov.me",
- "its.me",
- "priv.me",
- "mg",
- "org.mg",
- "nom.mg",
- "gov.mg",
- "prd.mg",
- "tm.mg",
- "edu.mg",
- "mil.mg",
- "com.mg",
- "co.mg",
- "mh",
- "mil",
- "mk",
- "com.mk",
- "org.mk",
- "net.mk",
- "edu.mk",
- "gov.mk",
- "inf.mk",
- "name.mk",
- "ml",
- "com.ml",
- "edu.ml",
- "gouv.ml",
- "gov.ml",
- "net.ml",
- "org.ml",
- "presse.ml",
- "*.mm",
- "mn",
- "gov.mn",
- "edu.mn",
- "org.mn",
- "mo",
- "com.mo",
- "net.mo",
- "org.mo",
- "edu.mo",
- "gov.mo",
- "mobi",
- "mp",
- "mq",
- "mr",
- "gov.mr",
- "ms",
- "com.ms",
- "edu.ms",
- "gov.ms",
- "net.ms",
- "org.ms",
- "mt",
- "com.mt",
- "edu.mt",
- "net.mt",
- "org.mt",
- "mu",
- "com.mu",
- "net.mu",
- "org.mu",
- "gov.mu",
- "ac.mu",
- "co.mu",
- "or.mu",
- "museum",
- "academy.museum",
- "agriculture.museum",
- "air.museum",
- "airguard.museum",
- "alabama.museum",
- "alaska.museum",
- "amber.museum",
- "ambulance.museum",
- "american.museum",
- "americana.museum",
- "americanantiques.museum",
- "americanart.museum",
- "amsterdam.museum",
- "and.museum",
- "annefrank.museum",
- "anthro.museum",
- "anthropology.museum",
- "antiques.museum",
- "aquarium.museum",
- "arboretum.museum",
- "archaeological.museum",
- "archaeology.museum",
- "architecture.museum",
- "art.museum",
- "artanddesign.museum",
- "artcenter.museum",
- "artdeco.museum",
- "arteducation.museum",
- "artgallery.museum",
- "arts.museum",
- "artsandcrafts.museum",
- "asmatart.museum",
- "assassination.museum",
- "assisi.museum",
- "association.museum",
- "astronomy.museum",
- "atlanta.museum",
- "austin.museum",
- "australia.museum",
- "automotive.museum",
- "aviation.museum",
- "axis.museum",
- "badajoz.museum",
- "baghdad.museum",
- "bahn.museum",
- "bale.museum",
- "baltimore.museum",
- "barcelona.museum",
- "baseball.museum",
- "basel.museum",
- "baths.museum",
- "bauern.museum",
- "beauxarts.museum",
- "beeldengeluid.museum",
- "bellevue.museum",
- "bergbau.museum",
- "berkeley.museum",
- "berlin.museum",
- "bern.museum",
- "bible.museum",
- "bilbao.museum",
- "bill.museum",
- "birdart.museum",
- "birthplace.museum",
- "bonn.museum",
- "boston.museum",
- "botanical.museum",
- "botanicalgarden.museum",
- "botanicgarden.museum",
- "botany.museum",
- "brandywinevalley.museum",
- "brasil.museum",
- "bristol.museum",
- "british.museum",
- "britishcolumbia.museum",
- "broadcast.museum",
- "brunel.museum",
- "brussel.museum",
- "brussels.museum",
- "bruxelles.museum",
- "building.museum",
- "burghof.museum",
- "bus.museum",
- "bushey.museum",
- "cadaques.museum",
- "california.museum",
- "cambridge.museum",
- "can.museum",
- "canada.museum",
- "capebreton.museum",
- "carrier.museum",
- "cartoonart.museum",
- "casadelamoneda.museum",
- "castle.museum",
- "castres.museum",
- "celtic.museum",
- "center.museum",
- "chattanooga.museum",
- "cheltenham.museum",
- "chesapeakebay.museum",
- "chicago.museum",
- "children.museum",
- "childrens.museum",
- "childrensgarden.museum",
- "chiropractic.museum",
- "chocolate.museum",
- "christiansburg.museum",
- "cincinnati.museum",
- "cinema.museum",
- "circus.museum",
- "civilisation.museum",
- "civilization.museum",
- "civilwar.museum",
- "clinton.museum",
- "clock.museum",
- "coal.museum",
- "coastaldefence.museum",
- "cody.museum",
- "coldwar.museum",
- "collection.museum",
- "colonialwilliamsburg.museum",
- "coloradoplateau.museum",
- "columbia.museum",
- "columbus.museum",
- "communication.museum",
- "communications.museum",
- "community.museum",
- "computer.museum",
- "computerhistory.museum",
- "xn--comunicaes-v6a2o.museum",
- "contemporary.museum",
- "contemporaryart.museum",
- "convent.museum",
- "copenhagen.museum",
- "corporation.museum",
- "xn--correios-e-telecomunicaes-ghc29a.museum",
- "corvette.museum",
- "costume.museum",
- "countryestate.museum",
- "county.museum",
- "crafts.museum",
- "cranbrook.museum",
- "creation.museum",
- "cultural.museum",
- "culturalcenter.museum",
- "culture.museum",
- "cyber.museum",
- "cymru.museum",
- "dali.museum",
- "dallas.museum",
- "database.museum",
- "ddr.museum",
- "decorativearts.museum",
- "delaware.museum",
- "delmenhorst.museum",
- "denmark.museum",
- "depot.museum",
- "design.museum",
- "detroit.museum",
- "dinosaur.museum",
- "discovery.museum",
- "dolls.museum",
- "donostia.museum",
- "durham.museum",
- "eastafrica.museum",
- "eastcoast.museum",
- "education.museum",
- "educational.museum",
- "egyptian.museum",
- "eisenbahn.museum",
- "elburg.museum",
- "elvendrell.museum",
- "embroidery.museum",
- "encyclopedic.museum",
- "england.museum",
- "entomology.museum",
- "environment.museum",
- "environmentalconservation.museum",
- "epilepsy.museum",
- "essex.museum",
- "estate.museum",
- "ethnology.museum",
- "exeter.museum",
- "exhibition.museum",
- "family.museum",
- "farm.museum",
- "farmequipment.museum",
- "farmers.museum",
- "farmstead.museum",
- "field.museum",
- "figueres.museum",
- "filatelia.museum",
- "film.museum",
- "fineart.museum",
- "finearts.museum",
- "finland.museum",
- "flanders.museum",
- "florida.museum",
- "force.museum",
- "fortmissoula.museum",
- "fortworth.museum",
- "foundation.museum",
- "francaise.museum",
- "frankfurt.museum",
- "franziskaner.museum",
- "freemasonry.museum",
- "freiburg.museum",
- "fribourg.museum",
- "frog.museum",
- "fundacio.museum",
- "furniture.museum",
- "gallery.museum",
- "garden.museum",
- "gateway.museum",
- "geelvinck.museum",
- "gemological.museum",
- "geology.museum",
- "georgia.museum",
- "giessen.museum",
- "glas.museum",
- "glass.museum",
- "gorge.museum",
- "grandrapids.museum",
- "graz.museum",
- "guernsey.museum",
- "halloffame.museum",
- "hamburg.museum",
- "handson.museum",
- "harvestcelebration.museum",
- "hawaii.museum",
- "health.museum",
- "heimatunduhren.museum",
- "hellas.museum",
- "helsinki.museum",
- "hembygdsforbund.museum",
- "heritage.museum",
- "histoire.museum",
- "historical.museum",
- "historicalsociety.museum",
- "historichouses.museum",
- "historisch.museum",
- "historisches.museum",
- "history.museum",
- "historyofscience.museum",
- "horology.museum",
- "house.museum",
- "humanities.museum",
- "illustration.museum",
- "imageandsound.museum",
- "indian.museum",
- "indiana.museum",
- "indianapolis.museum",
- "indianmarket.museum",
- "intelligence.museum",
- "interactive.museum",
- "iraq.museum",
- "iron.museum",
- "isleofman.museum",
- "jamison.museum",
- "jefferson.museum",
- "jerusalem.museum",
- "jewelry.museum",
- "jewish.museum",
- "jewishart.museum",
- "jfk.museum",
- "journalism.museum",
- "judaica.museum",
- "judygarland.museum",
- "juedisches.museum",
- "juif.museum",
- "karate.museum",
- "karikatur.museum",
- "kids.museum",
- "koebenhavn.museum",
- "koeln.museum",
- "kunst.museum",
- "kunstsammlung.museum",
- "kunstunddesign.museum",
- "labor.museum",
- "labour.museum",
- "lajolla.museum",
- "lancashire.museum",
- "landes.museum",
- "lans.museum",
- "xn--lns-qla.museum",
- "larsson.museum",
- "lewismiller.museum",
- "lincoln.museum",
- "linz.museum",
- "living.museum",
- "livinghistory.museum",
- "localhistory.museum",
- "london.museum",
- "losangeles.museum",
- "louvre.museum",
- "loyalist.museum",
- "lucerne.museum",
- "luxembourg.museum",
- "luzern.museum",
- "mad.museum",
- "madrid.museum",
- "mallorca.museum",
- "manchester.museum",
- "mansion.museum",
- "mansions.museum",
- "manx.museum",
- "marburg.museum",
- "maritime.museum",
- "maritimo.museum",
- "maryland.museum",
- "marylhurst.museum",
- "media.museum",
- "medical.museum",
- "medizinhistorisches.museum",
- "meeres.museum",
- "memorial.museum",
- "mesaverde.museum",
- "michigan.museum",
- "midatlantic.museum",
- "military.museum",
- "mill.museum",
- "miners.museum",
- "mining.museum",
- "minnesota.museum",
- "missile.museum",
- "missoula.museum",
- "modern.museum",
- "moma.museum",
- "money.museum",
- "monmouth.museum",
- "monticello.museum",
- "montreal.museum",
- "moscow.museum",
- "motorcycle.museum",
- "muenchen.museum",
- "muenster.museum",
- "mulhouse.museum",
- "muncie.museum",
- "museet.museum",
- "museumcenter.museum",
- "museumvereniging.museum",
- "music.museum",
- "national.museum",
- "nationalfirearms.museum",
- "nationalheritage.museum",
- "nativeamerican.museum",
- "naturalhistory.museum",
- "naturalhistorymuseum.museum",
- "naturalsciences.museum",
- "nature.museum",
- "naturhistorisches.museum",
- "natuurwetenschappen.museum",
- "naumburg.museum",
- "naval.museum",
- "nebraska.museum",
- "neues.museum",
- "newhampshire.museum",
- "newjersey.museum",
- "newmexico.museum",
- "newport.museum",
- "newspaper.museum",
- "newyork.museum",
- "niepce.museum",
- "norfolk.museum",
- "north.museum",
- "nrw.museum",
- "nuernberg.museum",
- "nuremberg.museum",
- "nyc.museum",
- "nyny.museum",
- "oceanographic.museum",
- "oceanographique.museum",
- "omaha.museum",
- "online.museum",
- "ontario.museum",
- "openair.museum",
- "oregon.museum",
- "oregontrail.museum",
- "otago.museum",
- "oxford.museum",
- "pacific.museum",
- "paderborn.museum",
- "palace.museum",
- "paleo.museum",
- "palmsprings.museum",
- "panama.museum",
- "paris.museum",
- "pasadena.museum",
- "pharmacy.museum",
- "philadelphia.museum",
- "philadelphiaarea.museum",
- "philately.museum",
- "phoenix.museum",
- "photography.museum",
- "pilots.museum",
- "pittsburgh.museum",
- "planetarium.museum",
- "plantation.museum",
- "plants.museum",
- "plaza.museum",
- "portal.museum",
- "portland.museum",
- "portlligat.museum",
- "posts-and-telecommunications.museum",
- "preservation.museum",
- "presidio.museum",
- "press.museum",
- "project.museum",
- "public.museum",
- "pubol.museum",
- "quebec.museum",
- "railroad.museum",
- "railway.museum",
- "research.museum",
- "resistance.museum",
- "riodejaneiro.museum",
- "rochester.museum",
- "rockart.museum",
- "roma.museum",
- "russia.museum",
- "saintlouis.museum",
- "salem.museum",
- "salvadordali.museum",
- "salzburg.museum",
- "sandiego.museum",
- "sanfrancisco.museum",
- "santabarbara.museum",
- "santacruz.museum",
- "santafe.museum",
- "saskatchewan.museum",
- "satx.museum",
- "savannahga.museum",
- "schlesisches.museum",
- "schoenbrunn.museum",
- "schokoladen.museum",
- "school.museum",
- "schweiz.museum",
- "science.museum",
- "scienceandhistory.museum",
- "scienceandindustry.museum",
- "sciencecenter.museum",
- "sciencecenters.museum",
- "science-fiction.museum",
- "sciencehistory.museum",
- "sciences.museum",
- "sciencesnaturelles.museum",
- "scotland.museum",
- "seaport.museum",
- "settlement.museum",
- "settlers.museum",
- "shell.museum",
- "sherbrooke.museum",
- "sibenik.museum",
- "silk.museum",
- "ski.museum",
- "skole.museum",
- "society.museum",
- "sologne.museum",
- "soundandvision.museum",
- "southcarolina.museum",
- "southwest.museum",
- "space.museum",
- "spy.museum",
- "square.museum",
- "stadt.museum",
- "stalbans.museum",
- "starnberg.museum",
- "state.museum",
- "stateofdelaware.museum",
- "station.museum",
- "steam.museum",
- "steiermark.museum",
- "stjohn.museum",
- "stockholm.museum",
- "stpetersburg.museum",
- "stuttgart.museum",
- "suisse.museum",
- "surgeonshall.museum",
- "surrey.museum",
- "svizzera.museum",
- "sweden.museum",
- "sydney.museum",
- "tank.museum",
- "tcm.museum",
- "technology.museum",
- "telekommunikation.museum",
- "television.museum",
- "texas.museum",
- "textile.museum",
- "theater.museum",
- "time.museum",
- "timekeeping.museum",
- "topology.museum",
- "torino.museum",
- "touch.museum",
- "town.museum",
- "transport.museum",
- "tree.museum",
- "trolley.museum",
- "trust.museum",
- "trustee.museum",
- "uhren.museum",
- "ulm.museum",
- "undersea.museum",
- "university.museum",
- "usa.museum",
- "usantiques.museum",
- "usarts.museum",
- "uscountryestate.museum",
- "usculture.museum",
- "usdecorativearts.museum",
- "usgarden.museum",
- "ushistory.museum",
- "ushuaia.museum",
- "uslivinghistory.museum",
- "utah.museum",
- "uvic.museum",
- "valley.museum",
- "vantaa.museum",
- "versailles.museum",
- "viking.museum",
- "village.museum",
- "virginia.museum",
- "virtual.museum",
- "virtuel.museum",
- "vlaanderen.museum",
- "volkenkunde.museum",
- "wales.museum",
- "wallonie.museum",
- "war.museum",
- "washingtondc.museum",
- "watchandclock.museum",
- "watch-and-clock.museum",
- "western.museum",
- "westfalen.museum",
- "whaling.museum",
- "wildlife.museum",
- "williamsburg.museum",
- "windmill.museum",
- "workshop.museum",
- "york.museum",
- "yorkshire.museum",
- "yosemite.museum",
- "youth.museum",
- "zoological.museum",
- "zoology.museum",
- "xn--9dbhblg6di.museum",
- "xn--h1aegh.museum",
- "mv",
- "aero.mv",
- "biz.mv",
- "com.mv",
- "coop.mv",
- "edu.mv",
- "gov.mv",
- "info.mv",
- "int.mv",
- "mil.mv",
- "museum.mv",
- "name.mv",
- "net.mv",
- "org.mv",
- "pro.mv",
- "mw",
- "ac.mw",
- "biz.mw",
- "co.mw",
- "com.mw",
- "coop.mw",
- "edu.mw",
- "gov.mw",
- "int.mw",
- "museum.mw",
- "net.mw",
- "org.mw",
- "mx",
- "com.mx",
- "org.mx",
- "gob.mx",
- "edu.mx",
- "net.mx",
- "my",
- "com.my",
- "net.my",
- "org.my",
- "gov.my",
- "edu.my",
- "mil.my",
- "name.my",
- "mz",
- "ac.mz",
- "adv.mz",
- "co.mz",
- "edu.mz",
- "gov.mz",
- "mil.mz",
- "net.mz",
- "org.mz",
- "na",
- "info.na",
- "pro.na",
- "name.na",
- "school.na",
- "or.na",
- "dr.na",
- "us.na",
- "mx.na",
- "ca.na",
- "in.na",
- "cc.na",
- "tv.na",
- "ws.na",
- "mobi.na",
- "co.na",
- "com.na",
- "org.na",
- "name",
- "nc",
- "asso.nc",
- "nom.nc",
- "ne",
- "net",
- "nf",
- "com.nf",
- "net.nf",
- "per.nf",
- "rec.nf",
- "web.nf",
- "arts.nf",
- "firm.nf",
- "info.nf",
- "other.nf",
- "store.nf",
- "ng",
- "com.ng",
- "edu.ng",
- "gov.ng",
- "i.ng",
- "mil.ng",
- "mobi.ng",
- "name.ng",
- "net.ng",
- "org.ng",
- "sch.ng",
- "ni",
- "ac.ni",
- "biz.ni",
- "co.ni",
- "com.ni",
- "edu.ni",
- "gob.ni",
- "in.ni",
- "info.ni",
- "int.ni",
- "mil.ni",
- "net.ni",
- "nom.ni",
- "org.ni",
- "web.ni",
- "nl",
- "bv.nl",
- "no",
- "fhs.no",
- "vgs.no",
- "fylkesbibl.no",
- "folkebibl.no",
- "museum.no",
- "idrett.no",
- "priv.no",
- "mil.no",
- "stat.no",
- "dep.no",
- "kommune.no",
- "herad.no",
- "aa.no",
- "ah.no",
- "bu.no",
- "fm.no",
- "hl.no",
- "hm.no",
- "jan-mayen.no",
- "mr.no",
- "nl.no",
- "nt.no",
- "of.no",
- "ol.no",
- "oslo.no",
- "rl.no",
- "sf.no",
- "st.no",
- "svalbard.no",
- "tm.no",
- "tr.no",
- "va.no",
- "vf.no",
- "gs.aa.no",
- "gs.ah.no",
- "gs.bu.no",
- "gs.fm.no",
- "gs.hl.no",
- "gs.hm.no",
- "gs.jan-mayen.no",
- "gs.mr.no",
- "gs.nl.no",
- "gs.nt.no",
- "gs.of.no",
- "gs.ol.no",
- "gs.oslo.no",
- "gs.rl.no",
- "gs.sf.no",
- "gs.st.no",
- "gs.svalbard.no",
- "gs.tm.no",
- "gs.tr.no",
- "gs.va.no",
- "gs.vf.no",
- "akrehamn.no",
- "xn--krehamn-dxa.no",
- "algard.no",
- "xn--lgrd-poac.no",
- "arna.no",
- "brumunddal.no",
- "bryne.no",
- "bronnoysund.no",
- "xn--brnnysund-m8ac.no",
- "drobak.no",
- "xn--drbak-wua.no",
- "egersund.no",
- "fetsund.no",
- "floro.no",
- "xn--flor-jra.no",
- "fredrikstad.no",
- "hokksund.no",
- "honefoss.no",
- "xn--hnefoss-q1a.no",
- "jessheim.no",
- "jorpeland.no",
- "xn--jrpeland-54a.no",
- "kirkenes.no",
- "kopervik.no",
- "krokstadelva.no",
- "langevag.no",
- "xn--langevg-jxa.no",
- "leirvik.no",
- "mjondalen.no",
- "xn--mjndalen-64a.no",
- "mo-i-rana.no",
- "mosjoen.no",
- "xn--mosjen-eya.no",
- "nesoddtangen.no",
- "orkanger.no",
- "osoyro.no",
- "xn--osyro-wua.no",
- "raholt.no",
- "xn--rholt-mra.no",
- "sandnessjoen.no",
- "xn--sandnessjen-ogb.no",
- "skedsmokorset.no",
- "slattum.no",
- "spjelkavik.no",
- "stathelle.no",
- "stavern.no",
- "stjordalshalsen.no",
- "xn--stjrdalshalsen-sqb.no",
- "tananger.no",
- "tranby.no",
- "vossevangen.no",
- "afjord.no",
- "xn--fjord-lra.no",
- "agdenes.no",
- "al.no",
- "xn--l-1fa.no",
- "alesund.no",
- "xn--lesund-hua.no",
- "alstahaug.no",
- "alta.no",
- "xn--lt-liac.no",
- "alaheadju.no",
- "xn--laheadju-7ya.no",
- "alvdal.no",
- "amli.no",
- "xn--mli-tla.no",
- "amot.no",
- "xn--mot-tla.no",
- "andebu.no",
- "andoy.no",
- "xn--andy-ira.no",
- "andasuolo.no",
- "ardal.no",
- "xn--rdal-poa.no",
- "aremark.no",
- "arendal.no",
- "xn--s-1fa.no",
- "aseral.no",
- "xn--seral-lra.no",
- "asker.no",
- "askim.no",
- "askvoll.no",
- "askoy.no",
- "xn--asky-ira.no",
- "asnes.no",
- "xn--snes-poa.no",
- "audnedaln.no",
- "aukra.no",
- "aure.no",
- "aurland.no",
- "aurskog-holand.no",
- "xn--aurskog-hland-jnb.no",
- "austevoll.no",
- "austrheim.no",
- "averoy.no",
- "xn--avery-yua.no",
- "balestrand.no",
- "ballangen.no",
- "balat.no",
- "xn--blt-elab.no",
- "balsfjord.no",
- "bahccavuotna.no",
- "xn--bhccavuotna-k7a.no",
- "bamble.no",
- "bardu.no",
- "beardu.no",
- "beiarn.no",
- "bajddar.no",
- "xn--bjddar-pta.no",
- "baidar.no",
- "xn--bidr-5nac.no",
- "berg.no",
- "bergen.no",
- "berlevag.no",
- "xn--berlevg-jxa.no",
- "bearalvahki.no",
- "xn--bearalvhki-y4a.no",
- "bindal.no",
- "birkenes.no",
- "bjarkoy.no",
- "xn--bjarky-fya.no",
- "bjerkreim.no",
- "bjugn.no",
- "bodo.no",
- "xn--bod-2na.no",
- "badaddja.no",
- "xn--bdddj-mrabd.no",
- "budejju.no",
- "bokn.no",
- "bremanger.no",
- "bronnoy.no",
- "xn--brnny-wuac.no",
- "bygland.no",
- "bykle.no",
- "barum.no",
- "xn--brum-voa.no",
- "bo.telemark.no",
- "xn--b-5ga.telemark.no",
- "bo.nordland.no",
- "xn--b-5ga.nordland.no",
- "bievat.no",
- "xn--bievt-0qa.no",
- "bomlo.no",
- "xn--bmlo-gra.no",
- "batsfjord.no",
- "xn--btsfjord-9za.no",
- "bahcavuotna.no",
- "xn--bhcavuotna-s4a.no",
- "dovre.no",
- "drammen.no",
- "drangedal.no",
- "dyroy.no",
- "xn--dyry-ira.no",
- "donna.no",
- "xn--dnna-gra.no",
- "eid.no",
- "eidfjord.no",
- "eidsberg.no",
- "eidskog.no",
- "eidsvoll.no",
- "eigersund.no",
- "elverum.no",
- "enebakk.no",
- "engerdal.no",
- "etne.no",
- "etnedal.no",
- "evenes.no",
- "evenassi.no",
- "xn--eveni-0qa01ga.no",
- "evje-og-hornnes.no",
- "farsund.no",
- "fauske.no",
- "fuossko.no",
- "fuoisku.no",
- "fedje.no",
- "fet.no",
- "finnoy.no",
- "xn--finny-yua.no",
- "fitjar.no",
- "fjaler.no",
- "fjell.no",
- "flakstad.no",
- "flatanger.no",
- "flekkefjord.no",
- "flesberg.no",
- "flora.no",
- "fla.no",
- "xn--fl-zia.no",
- "folldal.no",
- "forsand.no",
- "fosnes.no",
- "frei.no",
- "frogn.no",
- "froland.no",
- "frosta.no",
- "frana.no",
- "xn--frna-woa.no",
- "froya.no",
- "xn--frya-hra.no",
- "fusa.no",
- "fyresdal.no",
- "forde.no",
- "xn--frde-gra.no",
- "gamvik.no",
- "gangaviika.no",
- "xn--ggaviika-8ya47h.no",
- "gaular.no",
- "gausdal.no",
- "gildeskal.no",
- "xn--gildeskl-g0a.no",
- "giske.no",
- "gjemnes.no",
- "gjerdrum.no",
- "gjerstad.no",
- "gjesdal.no",
- "gjovik.no",
- "xn--gjvik-wua.no",
- "gloppen.no",
- "gol.no",
- "gran.no",
- "grane.no",
- "granvin.no",
- "gratangen.no",
- "grimstad.no",
- "grong.no",
- "kraanghke.no",
- "xn--kranghke-b0a.no",
- "grue.no",
- "gulen.no",
- "hadsel.no",
- "halden.no",
- "halsa.no",
- "hamar.no",
- "hamaroy.no",
- "habmer.no",
- "xn--hbmer-xqa.no",
- "hapmir.no",
- "xn--hpmir-xqa.no",
- "hammerfest.no",
- "hammarfeasta.no",
- "xn--hmmrfeasta-s4ac.no",
- "haram.no",
- "hareid.no",
- "harstad.no",
- "hasvik.no",
- "aknoluokta.no",
- "xn--koluokta-7ya57h.no",
- "hattfjelldal.no",
- "aarborte.no",
- "haugesund.no",
- "hemne.no",
- "hemnes.no",
- "hemsedal.no",
- "heroy.more-og-romsdal.no",
- "xn--hery-ira.xn--mre-og-romsdal-qqb.no",
- "heroy.nordland.no",
- "xn--hery-ira.nordland.no",
- "hitra.no",
- "hjartdal.no",
- "hjelmeland.no",
- "hobol.no",
- "xn--hobl-ira.no",
- "hof.no",
- "hol.no",
- "hole.no",
- "holmestrand.no",
- "holtalen.no",
- "xn--holtlen-hxa.no",
- "hornindal.no",
- "horten.no",
- "hurdal.no",
- "hurum.no",
- "hvaler.no",
- "hyllestad.no",
- "hagebostad.no",
- "xn--hgebostad-g3a.no",
- "hoyanger.no",
- "xn--hyanger-q1a.no",
- "hoylandet.no",
- "xn--hylandet-54a.no",
- "ha.no",
- "xn--h-2fa.no",
- "ibestad.no",
- "inderoy.no",
- "xn--indery-fya.no",
- "iveland.no",
- "jevnaker.no",
- "jondal.no",
- "jolster.no",
- "xn--jlster-bya.no",
- "karasjok.no",
- "karasjohka.no",
- "xn--krjohka-hwab49j.no",
- "karlsoy.no",
- "galsa.no",
- "xn--gls-elac.no",
- "karmoy.no",
- "xn--karmy-yua.no",
- "kautokeino.no",
- "guovdageaidnu.no",
- "klepp.no",
- "klabu.no",
- "xn--klbu-woa.no",
- "kongsberg.no",
- "kongsvinger.no",
- "kragero.no",
- "xn--krager-gya.no",
- "kristiansand.no",
- "kristiansund.no",
- "krodsherad.no",
- "xn--krdsherad-m8a.no",
- "kvalsund.no",
- "rahkkeravju.no",
- "xn--rhkkervju-01af.no",
- "kvam.no",
- "kvinesdal.no",
- "kvinnherad.no",
- "kviteseid.no",
- "kvitsoy.no",
- "xn--kvitsy-fya.no",
- "kvafjord.no",
- "xn--kvfjord-nxa.no",
- "giehtavuoatna.no",
- "kvanangen.no",
- "xn--kvnangen-k0a.no",
- "navuotna.no",
- "xn--nvuotna-hwa.no",
- "kafjord.no",
- "xn--kfjord-iua.no",
- "gaivuotna.no",
- "xn--givuotna-8ya.no",
- "larvik.no",
- "lavangen.no",
- "lavagis.no",
- "loabat.no",
- "xn--loabt-0qa.no",
- "lebesby.no",
- "davvesiida.no",
- "leikanger.no",
- "leirfjord.no",
- "leka.no",
- "leksvik.no",
- "lenvik.no",
- "leangaviika.no",
- "xn--leagaviika-52b.no",
- "lesja.no",
- "levanger.no",
- "lier.no",
- "lierne.no",
- "lillehammer.no",
- "lillesand.no",
- "lindesnes.no",
- "lindas.no",
- "xn--linds-pra.no",
- "lom.no",
- "loppa.no",
- "lahppi.no",
- "xn--lhppi-xqa.no",
- "lund.no",
- "lunner.no",
- "luroy.no",
- "xn--lury-ira.no",
- "luster.no",
- "lyngdal.no",
- "lyngen.no",
- "ivgu.no",
- "lardal.no",
- "lerdal.no",
- "xn--lrdal-sra.no",
- "lodingen.no",
- "xn--ldingen-q1a.no",
- "lorenskog.no",
- "xn--lrenskog-54a.no",
- "loten.no",
- "xn--lten-gra.no",
- "malvik.no",
- "masoy.no",
- "xn--msy-ula0h.no",
- "muosat.no",
- "xn--muost-0qa.no",
- "mandal.no",
- "marker.no",
- "marnardal.no",
- "masfjorden.no",
- "meland.no",
- "meldal.no",
- "melhus.no",
- "meloy.no",
- "xn--mely-ira.no",
- "meraker.no",
- "xn--merker-kua.no",
- "moareke.no",
- "xn--moreke-jua.no",
- "midsund.no",
- "midtre-gauldal.no",
- "modalen.no",
- "modum.no",
- "molde.no",
- "moskenes.no",
- "moss.no",
- "mosvik.no",
- "malselv.no",
- "xn--mlselv-iua.no",
- "malatvuopmi.no",
- "xn--mlatvuopmi-s4a.no",
- "namdalseid.no",
- "aejrie.no",
- "namsos.no",
- "namsskogan.no",
- "naamesjevuemie.no",
- "xn--nmesjevuemie-tcba.no",
- "laakesvuemie.no",
- "nannestad.no",
- "narvik.no",
- "narviika.no",
- "naustdal.no",
- "nedre-eiker.no",
- "nes.akershus.no",
- "nes.buskerud.no",
- "nesna.no",
- "nesodden.no",
- "nesseby.no",
- "unjarga.no",
- "xn--unjrga-rta.no",
- "nesset.no",
- "nissedal.no",
- "nittedal.no",
- "nord-aurdal.no",
- "nord-fron.no",
- "nord-odal.no",
- "norddal.no",
- "nordkapp.no",
- "davvenjarga.no",
- "xn--davvenjrga-y4a.no",
- "nordre-land.no",
- "nordreisa.no",
- "raisa.no",
- "xn--risa-5na.no",
- "nore-og-uvdal.no",
- "notodden.no",
- "naroy.no",
- "xn--nry-yla5g.no",
- "notteroy.no",
- "xn--nttery-byae.no",
- "odda.no",
- "oksnes.no",
- "xn--ksnes-uua.no",
- "oppdal.no",
- "oppegard.no",
- "xn--oppegrd-ixa.no",
- "orkdal.no",
- "orland.no",
- "xn--rland-uua.no",
- "orskog.no",
- "xn--rskog-uua.no",
- "orsta.no",
- "xn--rsta-fra.no",
- "os.hedmark.no",
- "os.hordaland.no",
- "osen.no",
- "osteroy.no",
- "xn--ostery-fya.no",
- "ostre-toten.no",
- "xn--stre-toten-zcb.no",
- "overhalla.no",
- "ovre-eiker.no",
- "xn--vre-eiker-k8a.no",
- "oyer.no",
- "xn--yer-zna.no",
- "oygarden.no",
- "xn--ygarden-p1a.no",
- "oystre-slidre.no",
- "xn--ystre-slidre-ujb.no",
- "porsanger.no",
- "porsangu.no",
- "xn--porsgu-sta26f.no",
- "porsgrunn.no",
- "radoy.no",
- "xn--rady-ira.no",
- "rakkestad.no",
- "rana.no",
- "ruovat.no",
- "randaberg.no",
- "rauma.no",
- "rendalen.no",
- "rennebu.no",
- "rennesoy.no",
- "xn--rennesy-v1a.no",
- "rindal.no",
- "ringebu.no",
- "ringerike.no",
- "ringsaker.no",
- "rissa.no",
- "risor.no",
- "xn--risr-ira.no",
- "roan.no",
- "rollag.no",
- "rygge.no",
- "ralingen.no",
- "xn--rlingen-mxa.no",
- "rodoy.no",
- "xn--rdy-0nab.no",
- "romskog.no",
- "xn--rmskog-bya.no",
- "roros.no",
- "xn--rros-gra.no",
- "rost.no",
- "xn--rst-0na.no",
- "royken.no",
- "xn--ryken-vua.no",
- "royrvik.no",
- "xn--ryrvik-bya.no",
- "rade.no",
- "xn--rde-ula.no",
- "salangen.no",
- "siellak.no",
- "saltdal.no",
- "salat.no",
- "xn--slt-elab.no",
- "xn--slat-5na.no",
- "samnanger.no",
- "sande.more-og-romsdal.no",
- "sande.xn--mre-og-romsdal-qqb.no",
- "sande.vestfold.no",
- "sandefjord.no",
- "sandnes.no",
- "sandoy.no",
- "xn--sandy-yua.no",
- "sarpsborg.no",
- "sauda.no",
- "sauherad.no",
- "sel.no",
- "selbu.no",
- "selje.no",
- "seljord.no",
- "sigdal.no",
- "siljan.no",
- "sirdal.no",
- "skaun.no",
- "skedsmo.no",
- "ski.no",
- "skien.no",
- "skiptvet.no",
- "skjervoy.no",
- "xn--skjervy-v1a.no",
- "skierva.no",
- "xn--skierv-uta.no",
- "skjak.no",
- "xn--skjk-soa.no",
- "skodje.no",
- "skanland.no",
- "xn--sknland-fxa.no",
- "skanit.no",
- "xn--sknit-yqa.no",
- "smola.no",
- "xn--smla-hra.no",
- "snillfjord.no",
- "snasa.no",
- "xn--snsa-roa.no",
- "snoasa.no",
- "snaase.no",
- "xn--snase-nra.no",
- "sogndal.no",
- "sokndal.no",
- "sola.no",
- "solund.no",
- "songdalen.no",
- "sortland.no",
- "spydeberg.no",
- "stange.no",
- "stavanger.no",
- "steigen.no",
- "steinkjer.no",
- "stjordal.no",
- "xn--stjrdal-s1a.no",
- "stokke.no",
- "stor-elvdal.no",
- "stord.no",
- "stordal.no",
- "storfjord.no",
- "omasvuotna.no",
- "strand.no",
- "stranda.no",
- "stryn.no",
- "sula.no",
- "suldal.no",
- "sund.no",
- "sunndal.no",
- "surnadal.no",
- "sveio.no",
- "svelvik.no",
- "sykkylven.no",
- "sogne.no",
- "xn--sgne-gra.no",
- "somna.no",
- "xn--smna-gra.no",
- "sondre-land.no",
- "xn--sndre-land-0cb.no",
- "sor-aurdal.no",
- "xn--sr-aurdal-l8a.no",
- "sor-fron.no",
- "xn--sr-fron-q1a.no",
- "sor-odal.no",
- "xn--sr-odal-q1a.no",
- "sor-varanger.no",
- "xn--sr-varanger-ggb.no",
- "matta-varjjat.no",
- "xn--mtta-vrjjat-k7af.no",
- "sorfold.no",
- "xn--srfold-bya.no",
- "sorreisa.no",
- "xn--srreisa-q1a.no",
- "sorum.no",
- "xn--srum-gra.no",
- "tana.no",
- "deatnu.no",
- "time.no",
- "tingvoll.no",
- "tinn.no",
- "tjeldsund.no",
- "dielddanuorri.no",
- "tjome.no",
- "xn--tjme-hra.no",
- "tokke.no",
- "tolga.no",
- "torsken.no",
- "tranoy.no",
- "xn--trany-yua.no",
- "tromso.no",
- "xn--troms-zua.no",
- "tromsa.no",
- "romsa.no",
- "trondheim.no",
- "troandin.no",
- "trysil.no",
- "trana.no",
- "xn--trna-woa.no",
- "trogstad.no",
- "xn--trgstad-r1a.no",
- "tvedestrand.no",
- "tydal.no",
- "tynset.no",
- "tysfjord.no",
- "divtasvuodna.no",
- "divttasvuotna.no",
- "tysnes.no",
- "tysvar.no",
- "xn--tysvr-vra.no",
- "tonsberg.no",
- "xn--tnsberg-q1a.no",
- "ullensaker.no",
- "ullensvang.no",
- "ulvik.no",
- "utsira.no",
- "vadso.no",
- "xn--vads-jra.no",
- "cahcesuolo.no",
- "xn--hcesuolo-7ya35b.no",
- "vaksdal.no",
- "valle.no",
- "vang.no",
- "vanylven.no",
- "vardo.no",
- "xn--vard-jra.no",
- "varggat.no",
- "xn--vrggt-xqad.no",
- "vefsn.no",
- "vaapste.no",
- "vega.no",
- "vegarshei.no",
- "xn--vegrshei-c0a.no",
- "vennesla.no",
- "verdal.no",
- "verran.no",
- "vestby.no",
- "vestnes.no",
- "vestre-slidre.no",
- "vestre-toten.no",
- "vestvagoy.no",
- "xn--vestvgy-ixa6o.no",
- "vevelstad.no",
- "vik.no",
- "vikna.no",
- "vindafjord.no",
- "volda.no",
- "voss.no",
- "varoy.no",
- "xn--vry-yla5g.no",
- "vagan.no",
- "xn--vgan-qoa.no",
- "voagat.no",
- "vagsoy.no",
- "xn--vgsy-qoa0j.no",
- "vaga.no",
- "xn--vg-yiab.no",
- "valer.ostfold.no",
- "xn--vler-qoa.xn--stfold-9xa.no",
- "valer.hedmark.no",
- "xn--vler-qoa.hedmark.no",
- "*.np",
- "nr",
- "biz.nr",
- "info.nr",
- "gov.nr",
- "edu.nr",
- "org.nr",
- "net.nr",
- "com.nr",
- "nu",
- "nz",
- "ac.nz",
- "co.nz",
- "cri.nz",
- "geek.nz",
- "gen.nz",
- "govt.nz",
- "health.nz",
- "iwi.nz",
- "kiwi.nz",
- "maori.nz",
- "mil.nz",
- "xn--mori-qsa.nz",
- "net.nz",
- "org.nz",
- "parliament.nz",
- "school.nz",
- "om",
- "co.om",
- "com.om",
- "edu.om",
- "gov.om",
- "med.om",
- "museum.om",
- "net.om",
- "org.om",
- "pro.om",
- "onion",
- "org",
- "pa",
- "ac.pa",
- "gob.pa",
- "com.pa",
- "org.pa",
- "sld.pa",
- "edu.pa",
- "net.pa",
- "ing.pa",
- "abo.pa",
- "med.pa",
- "nom.pa",
- "pe",
- "edu.pe",
- "gob.pe",
- "nom.pe",
- "mil.pe",
- "org.pe",
- "com.pe",
- "net.pe",
- "pf",
- "com.pf",
- "org.pf",
- "edu.pf",
- "*.pg",
- "ph",
- "com.ph",
- "net.ph",
- "org.ph",
- "gov.ph",
- "edu.ph",
- "ngo.ph",
- "mil.ph",
- "i.ph",
- "pk",
- "com.pk",
- "net.pk",
- "edu.pk",
- "org.pk",
- "fam.pk",
- "biz.pk",
- "web.pk",
- "gov.pk",
- "gob.pk",
- "gok.pk",
- "gon.pk",
- "gop.pk",
- "gos.pk",
- "info.pk",
- "pl",
- "com.pl",
- "net.pl",
- "org.pl",
- "aid.pl",
- "agro.pl",
- "atm.pl",
- "auto.pl",
- "biz.pl",
- "edu.pl",
- "gmina.pl",
- "gsm.pl",
- "info.pl",
- "mail.pl",
- "miasta.pl",
- "media.pl",
- "mil.pl",
- "nieruchomosci.pl",
- "nom.pl",
- "pc.pl",
- "powiat.pl",
- "priv.pl",
- "realestate.pl",
- "rel.pl",
- "sex.pl",
- "shop.pl",
- "sklep.pl",
- "sos.pl",
- "szkola.pl",
- "targi.pl",
- "tm.pl",
- "tourism.pl",
- "travel.pl",
- "turystyka.pl",
- "gov.pl",
- "ap.gov.pl",
- "ic.gov.pl",
- "is.gov.pl",
- "us.gov.pl",
- "kmpsp.gov.pl",
- "kppsp.gov.pl",
- "kwpsp.gov.pl",
- "psp.gov.pl",
- "wskr.gov.pl",
- "kwp.gov.pl",
- "mw.gov.pl",
- "ug.gov.pl",
- "um.gov.pl",
- "umig.gov.pl",
- "ugim.gov.pl",
- "upow.gov.pl",
- "uw.gov.pl",
- "starostwo.gov.pl",
- "pa.gov.pl",
- "po.gov.pl",
- "psse.gov.pl",
- "pup.gov.pl",
- "rzgw.gov.pl",
- "sa.gov.pl",
- "so.gov.pl",
- "sr.gov.pl",
- "wsa.gov.pl",
- "sko.gov.pl",
- "uzs.gov.pl",
- "wiih.gov.pl",
- "winb.gov.pl",
- "pinb.gov.pl",
- "wios.gov.pl",
- "witd.gov.pl",
- "wzmiuw.gov.pl",
- "piw.gov.pl",
- "wiw.gov.pl",
- "griw.gov.pl",
- "wif.gov.pl",
- "oum.gov.pl",
- "sdn.gov.pl",
- "zp.gov.pl",
- "uppo.gov.pl",
- "mup.gov.pl",
- "wuoz.gov.pl",
- "konsulat.gov.pl",
- "oirm.gov.pl",
- "augustow.pl",
- "babia-gora.pl",
- "bedzin.pl",
- "beskidy.pl",
- "bialowieza.pl",
- "bialystok.pl",
- "bielawa.pl",
- "bieszczady.pl",
- "boleslawiec.pl",
- "bydgoszcz.pl",
- "bytom.pl",
- "cieszyn.pl",
- "czeladz.pl",
- "czest.pl",
- "dlugoleka.pl",
- "elblag.pl",
- "elk.pl",
- "glogow.pl",
- "gniezno.pl",
- "gorlice.pl",
- "grajewo.pl",
- "ilawa.pl",
- "jaworzno.pl",
- "jelenia-gora.pl",
- "jgora.pl",
- "kalisz.pl",
- "kazimierz-dolny.pl",
- "karpacz.pl",
- "kartuzy.pl",
- "kaszuby.pl",
- "katowice.pl",
- "kepno.pl",
- "ketrzyn.pl",
- "klodzko.pl",
- "kobierzyce.pl",
- "kolobrzeg.pl",
- "konin.pl",
- "konskowola.pl",
- "kutno.pl",
- "lapy.pl",
- "lebork.pl",
- "legnica.pl",
- "lezajsk.pl",
- "limanowa.pl",
- "lomza.pl",
- "lowicz.pl",
- "lubin.pl",
- "lukow.pl",
- "malbork.pl",
- "malopolska.pl",
- "mazowsze.pl",
- "mazury.pl",
- "mielec.pl",
- "mielno.pl",
- "mragowo.pl",
- "naklo.pl",
- "nowaruda.pl",
- "nysa.pl",
- "olawa.pl",
- "olecko.pl",
- "olkusz.pl",
- "olsztyn.pl",
- "opoczno.pl",
- "opole.pl",
- "ostroda.pl",
- "ostroleka.pl",
- "ostrowiec.pl",
- "ostrowwlkp.pl",
- "pila.pl",
- "pisz.pl",
- "podhale.pl",
- "podlasie.pl",
- "polkowice.pl",
- "pomorze.pl",
- "pomorskie.pl",
- "prochowice.pl",
- "pruszkow.pl",
- "przeworsk.pl",
- "pulawy.pl",
- "radom.pl",
- "rawa-maz.pl",
- "rybnik.pl",
- "rzeszow.pl",
- "sanok.pl",
- "sejny.pl",
- "slask.pl",
- "slupsk.pl",
- "sosnowiec.pl",
- "stalowa-wola.pl",
- "skoczow.pl",
- "starachowice.pl",
- "stargard.pl",
- "suwalki.pl",
- "swidnica.pl",
- "swiebodzin.pl",
- "swinoujscie.pl",
- "szczecin.pl",
- "szczytno.pl",
- "tarnobrzeg.pl",
- "tgory.pl",
- "turek.pl",
- "tychy.pl",
- "ustka.pl",
- "walbrzych.pl",
- "warmia.pl",
- "warszawa.pl",
- "waw.pl",
- "wegrow.pl",
- "wielun.pl",
- "wlocl.pl",
- "wloclawek.pl",
- "wodzislaw.pl",
- "wolomin.pl",
- "wroclaw.pl",
- "zachpomor.pl",
- "zagan.pl",
- "zarow.pl",
- "zgora.pl",
- "zgorzelec.pl",
- "pm",
- "pn",
- "gov.pn",
- "co.pn",
- "org.pn",
- "edu.pn",
- "net.pn",
- "post",
- "pr",
- "com.pr",
- "net.pr",
- "org.pr",
- "gov.pr",
- "edu.pr",
- "isla.pr",
- "pro.pr",
- "biz.pr",
- "info.pr",
- "name.pr",
- "est.pr",
- "prof.pr",
- "ac.pr",
- "pro",
- "aaa.pro",
- "aca.pro",
- "acct.pro",
- "avocat.pro",
- "bar.pro",
- "cpa.pro",
- "eng.pro",
- "jur.pro",
- "law.pro",
- "med.pro",
- "recht.pro",
- "ps",
- "edu.ps",
- "gov.ps",
- "sec.ps",
- "plo.ps",
- "com.ps",
- "org.ps",
- "net.ps",
- "pt",
- "net.pt",
- "gov.pt",
- "org.pt",
- "edu.pt",
- "int.pt",
- "publ.pt",
- "com.pt",
- "nome.pt",
- "pw",
- "co.pw",
- "ne.pw",
- "or.pw",
- "ed.pw",
- "go.pw",
- "belau.pw",
- "py",
- "com.py",
- "coop.py",
- "edu.py",
- "gov.py",
- "mil.py",
- "net.py",
- "org.py",
- "qa",
- "com.qa",
- "edu.qa",
- "gov.qa",
- "mil.qa",
- "name.qa",
- "net.qa",
- "org.qa",
- "sch.qa",
- "re",
- "asso.re",
- "com.re",
- "nom.re",
- "ro",
- "arts.ro",
- "com.ro",
- "firm.ro",
- "info.ro",
- "nom.ro",
- "nt.ro",
- "org.ro",
- "rec.ro",
- "store.ro",
- "tm.ro",
- "www.ro",
- "rs",
- "ac.rs",
- "co.rs",
- "edu.rs",
- "gov.rs",
- "in.rs",
- "org.rs",
- "ru",
- "ac.ru",
- "edu.ru",
- "gov.ru",
- "int.ru",
- "mil.ru",
- "test.ru",
- "rw",
- "gov.rw",
- "net.rw",
- "edu.rw",
- "ac.rw",
- "com.rw",
- "co.rw",
- "int.rw",
- "mil.rw",
- "gouv.rw",
- "sa",
- "com.sa",
- "net.sa",
- "org.sa",
- "gov.sa",
- "med.sa",
- "pub.sa",
- "edu.sa",
- "sch.sa",
- "sb",
- "com.sb",
- "edu.sb",
- "gov.sb",
- "net.sb",
- "org.sb",
- "sc",
- "com.sc",
- "gov.sc",
- "net.sc",
- "org.sc",
- "edu.sc",
- "sd",
- "com.sd",
- "net.sd",
- "org.sd",
- "edu.sd",
- "med.sd",
- "tv.sd",
- "gov.sd",
- "info.sd",
- "se",
- "a.se",
- "ac.se",
- "b.se",
- "bd.se",
- "brand.se",
- "c.se",
- "d.se",
- "e.se",
- "f.se",
- "fh.se",
- "fhsk.se",
- "fhv.se",
- "g.se",
- "h.se",
- "i.se",
- "k.se",
- "komforb.se",
- "kommunalforbund.se",
- "komvux.se",
- "l.se",
- "lanbib.se",
- "m.se",
- "n.se",
- "naturbruksgymn.se",
- "o.se",
- "org.se",
- "p.se",
- "parti.se",
- "pp.se",
- "press.se",
- "r.se",
- "s.se",
- "t.se",
- "tm.se",
- "u.se",
- "w.se",
- "x.se",
- "y.se",
- "z.se",
- "sg",
- "com.sg",
- "net.sg",
- "org.sg",
- "gov.sg",
- "edu.sg",
- "per.sg",
- "sh",
- "com.sh",
- "net.sh",
- "gov.sh",
- "org.sh",
- "mil.sh",
- "si",
- "sj",
- "sk",
- "sl",
- "com.sl",
- "net.sl",
- "edu.sl",
- "gov.sl",
- "org.sl",
- "sm",
- "sn",
- "art.sn",
- "com.sn",
- "edu.sn",
- "gouv.sn",
- "org.sn",
- "perso.sn",
- "univ.sn",
- "so",
- "com.so",
- "net.so",
- "org.so",
- "sr",
- "st",
- "co.st",
- "com.st",
- "consulado.st",
- "edu.st",
- "embaixada.st",
- "gov.st",
- "mil.st",
- "net.st",
- "org.st",
- "principe.st",
- "saotome.st",
- "store.st",
- "su",
- "sv",
- "com.sv",
- "edu.sv",
- "gob.sv",
- "org.sv",
- "red.sv",
- "sx",
- "gov.sx",
- "sy",
- "edu.sy",
- "gov.sy",
- "net.sy",
- "mil.sy",
- "com.sy",
- "org.sy",
- "sz",
- "co.sz",
- "ac.sz",
- "org.sz",
- "tc",
- "td",
- "tel",
- "tf",
- "tg",
- "th",
- "ac.th",
- "co.th",
- "go.th",
- "in.th",
- "mi.th",
- "net.th",
- "or.th",
- "tj",
- "ac.tj",
- "biz.tj",
- "co.tj",
- "com.tj",
- "edu.tj",
- "go.tj",
- "gov.tj",
- "int.tj",
- "mil.tj",
- "name.tj",
- "net.tj",
- "nic.tj",
- "org.tj",
- "test.tj",
- "web.tj",
- "tk",
- "tl",
- "gov.tl",
- "tm",
- "com.tm",
- "co.tm",
- "org.tm",
- "net.tm",
- "nom.tm",
- "gov.tm",
- "mil.tm",
- "edu.tm",
- "tn",
- "com.tn",
- "ens.tn",
- "fin.tn",
- "gov.tn",
- "ind.tn",
- "intl.tn",
- "nat.tn",
- "net.tn",
- "org.tn",
- "info.tn",
- "perso.tn",
- "tourism.tn",
- "edunet.tn",
- "rnrt.tn",
- "rns.tn",
- "rnu.tn",
- "mincom.tn",
- "agrinet.tn",
- "defense.tn",
- "turen.tn",
- "to",
- "com.to",
- "gov.to",
- "net.to",
- "org.to",
- "edu.to",
- "mil.to",
- "tr",
- "com.tr",
- "info.tr",
- "biz.tr",
- "net.tr",
- "org.tr",
- "web.tr",
- "gen.tr",
- "tv.tr",
- "av.tr",
- "dr.tr",
- "bbs.tr",
- "name.tr",
- "tel.tr",
- "gov.tr",
- "bel.tr",
- "pol.tr",
- "mil.tr",
- "k12.tr",
- "edu.tr",
- "kep.tr",
- "nc.tr",
- "gov.nc.tr",
- "travel",
- "tt",
- "co.tt",
- "com.tt",
- "org.tt",
- "net.tt",
- "biz.tt",
- "info.tt",
- "pro.tt",
- "int.tt",
- "coop.tt",
- "jobs.tt",
- "mobi.tt",
- "travel.tt",
- "museum.tt",
- "aero.tt",
- "name.tt",
- "gov.tt",
- "edu.tt",
- "tv",
- "tw",
- "edu.tw",
- "gov.tw",
- "mil.tw",
- "com.tw",
- "net.tw",
- "org.tw",
- "idv.tw",
- "game.tw",
- "ebiz.tw",
- "club.tw",
- "xn--zf0ao64a.tw",
- "xn--uc0atv.tw",
- "xn--czrw28b.tw",
- "tz",
- "ac.tz",
- "co.tz",
- "go.tz",
- "hotel.tz",
- "info.tz",
- "me.tz",
- "mil.tz",
- "mobi.tz",
- "ne.tz",
- "or.tz",
- "sc.tz",
- "tv.tz",
- "ua",
- "com.ua",
- "edu.ua",
- "gov.ua",
- "in.ua",
- "net.ua",
- "org.ua",
- "cherkassy.ua",
- "cherkasy.ua",
- "chernigov.ua",
- "chernihiv.ua",
- "chernivtsi.ua",
- "chernovtsy.ua",
- "ck.ua",
- "cn.ua",
- "cr.ua",
- "crimea.ua",
- "cv.ua",
- "dn.ua",
- "dnepropetrovsk.ua",
- "dnipropetrovsk.ua",
- "dominic.ua",
- "donetsk.ua",
- "dp.ua",
- "if.ua",
- "ivano-frankivsk.ua",
- "kh.ua",
- "kharkiv.ua",
- "kharkov.ua",
- "kherson.ua",
- "khmelnitskiy.ua",
- "khmelnytskyi.ua",
- "kiev.ua",
- "kirovograd.ua",
- "km.ua",
- "kr.ua",
- "krym.ua",
- "ks.ua",
- "kv.ua",
- "kyiv.ua",
- "lg.ua",
- "lt.ua",
- "lugansk.ua",
- "lutsk.ua",
- "lv.ua",
- "lviv.ua",
- "mk.ua",
- "mykolaiv.ua",
- "nikolaev.ua",
- "od.ua",
- "odesa.ua",
- "odessa.ua",
- "pl.ua",
- "poltava.ua",
- "rivne.ua",
- "rovno.ua",
- "rv.ua",
- "sb.ua",
- "sebastopol.ua",
- "sevastopol.ua",
- "sm.ua",
- "sumy.ua",
- "te.ua",
- "ternopil.ua",
- "uz.ua",
- "uzhgorod.ua",
- "vinnica.ua",
- "vinnytsia.ua",
- "vn.ua",
- "volyn.ua",
- "yalta.ua",
- "zaporizhzhe.ua",
- "zaporizhzhia.ua",
- "zhitomir.ua",
- "zhytomyr.ua",
- "zp.ua",
- "zt.ua",
- "ug",
- "co.ug",
- "or.ug",
- "ac.ug",
- "sc.ug",
- "go.ug",
- "ne.ug",
- "com.ug",
- "org.ug",
- "uk",
- "ac.uk",
- "co.uk",
- "gov.uk",
- "ltd.uk",
- "me.uk",
- "net.uk",
- "nhs.uk",
- "org.uk",
- "plc.uk",
- "police.uk",
- "*.sch.uk",
- "us",
- "dni.us",
- "fed.us",
- "isa.us",
- "kids.us",
- "nsn.us",
- "ak.us",
- "al.us",
- "ar.us",
- "as.us",
- "az.us",
- "ca.us",
- "co.us",
- "ct.us",
- "dc.us",
- "de.us",
- "fl.us",
- "ga.us",
- "gu.us",
- "hi.us",
- "ia.us",
- "id.us",
- "il.us",
- "in.us",
- "ks.us",
- "ky.us",
- "la.us",
- "ma.us",
- "md.us",
- "me.us",
- "mi.us",
- "mn.us",
- "mo.us",
- "ms.us",
- "mt.us",
- "nc.us",
- "nd.us",
- "ne.us",
- "nh.us",
- "nj.us",
- "nm.us",
- "nv.us",
- "ny.us",
- "oh.us",
- "ok.us",
- "or.us",
- "pa.us",
- "pr.us",
- "ri.us",
- "sc.us",
- "sd.us",
- "tn.us",
- "tx.us",
- "ut.us",
- "vi.us",
- "vt.us",
- "va.us",
- "wa.us",
- "wi.us",
- "wv.us",
- "wy.us",
- "k12.ak.us",
- "k12.al.us",
- "k12.ar.us",
- "k12.as.us",
- "k12.az.us",
- "k12.ca.us",
- "k12.co.us",
- "k12.ct.us",
- "k12.dc.us",
- "k12.de.us",
- "k12.fl.us",
- "k12.ga.us",
- "k12.gu.us",
- "k12.ia.us",
- "k12.id.us",
- "k12.il.us",
- "k12.in.us",
- "k12.ks.us",
- "k12.ky.us",
- "k12.la.us",
- "k12.ma.us",
- "k12.md.us",
- "k12.me.us",
- "k12.mi.us",
- "k12.mn.us",
- "k12.mo.us",
- "k12.ms.us",
- "k12.mt.us",
- "k12.nc.us",
- "k12.ne.us",
- "k12.nh.us",
- "k12.nj.us",
- "k12.nm.us",
- "k12.nv.us",
- "k12.ny.us",
- "k12.oh.us",
- "k12.ok.us",
- "k12.or.us",
- "k12.pa.us",
- "k12.pr.us",
- "k12.ri.us",
- "k12.sc.us",
- "k12.tn.us",
- "k12.tx.us",
- "k12.ut.us",
- "k12.vi.us",
- "k12.vt.us",
- "k12.va.us",
- "k12.wa.us",
- "k12.wi.us",
- "k12.wy.us",
- "cc.ak.us",
- "cc.al.us",
- "cc.ar.us",
- "cc.as.us",
- "cc.az.us",
- "cc.ca.us",
- "cc.co.us",
- "cc.ct.us",
- "cc.dc.us",
- "cc.de.us",
- "cc.fl.us",
- "cc.ga.us",
- "cc.gu.us",
- "cc.hi.us",
- "cc.ia.us",
- "cc.id.us",
- "cc.il.us",
- "cc.in.us",
- "cc.ks.us",
- "cc.ky.us",
- "cc.la.us",
- "cc.ma.us",
- "cc.md.us",
- "cc.me.us",
- "cc.mi.us",
- "cc.mn.us",
- "cc.mo.us",
- "cc.ms.us",
- "cc.mt.us",
- "cc.nc.us",
- "cc.nd.us",
- "cc.ne.us",
- "cc.nh.us",
- "cc.nj.us",
- "cc.nm.us",
- "cc.nv.us",
- "cc.ny.us",
- "cc.oh.us",
- "cc.ok.us",
- "cc.or.us",
- "cc.pa.us",
- "cc.pr.us",
- "cc.ri.us",
- "cc.sc.us",
- "cc.sd.us",
- "cc.tn.us",
- "cc.tx.us",
- "cc.ut.us",
- "cc.vi.us",
- "cc.vt.us",
- "cc.va.us",
- "cc.wa.us",
- "cc.wi.us",
- "cc.wv.us",
- "cc.wy.us",
- "lib.ak.us",
- "lib.al.us",
- "lib.ar.us",
- "lib.as.us",
- "lib.az.us",
- "lib.ca.us",
- "lib.co.us",
- "lib.ct.us",
- "lib.dc.us",
- "lib.fl.us",
- "lib.ga.us",
- "lib.gu.us",
- "lib.hi.us",
- "lib.ia.us",
- "lib.id.us",
- "lib.il.us",
- "lib.in.us",
- "lib.ks.us",
- "lib.ky.us",
- "lib.la.us",
- "lib.ma.us",
- "lib.md.us",
- "lib.me.us",
- "lib.mi.us",
- "lib.mn.us",
- "lib.mo.us",
- "lib.ms.us",
- "lib.mt.us",
- "lib.nc.us",
- "lib.nd.us",
- "lib.ne.us",
- "lib.nh.us",
- "lib.nj.us",
- "lib.nm.us",
- "lib.nv.us",
- "lib.ny.us",
- "lib.oh.us",
- "lib.ok.us",
- "lib.or.us",
- "lib.pa.us",
- "lib.pr.us",
- "lib.ri.us",
- "lib.sc.us",
- "lib.sd.us",
- "lib.tn.us",
- "lib.tx.us",
- "lib.ut.us",
- "lib.vi.us",
- "lib.vt.us",
- "lib.va.us",
- "lib.wa.us",
- "lib.wi.us",
- "lib.wy.us",
- "pvt.k12.ma.us",
- "chtr.k12.ma.us",
- "paroch.k12.ma.us",
- "ann-arbor.mi.us",
- "cog.mi.us",
- "dst.mi.us",
- "eaton.mi.us",
- "gen.mi.us",
- "mus.mi.us",
- "tec.mi.us",
- "washtenaw.mi.us",
- "uy",
- "com.uy",
- "edu.uy",
- "gub.uy",
- "mil.uy",
- "net.uy",
- "org.uy",
- "uz",
- "co.uz",
- "com.uz",
- "net.uz",
- "org.uz",
- "va",
- "vc",
- "com.vc",
- "net.vc",
- "org.vc",
- "gov.vc",
- "mil.vc",
- "edu.vc",
- "ve",
- "arts.ve",
- "co.ve",
- "com.ve",
- "e12.ve",
- "edu.ve",
- "firm.ve",
- "gob.ve",
- "gov.ve",
- "info.ve",
- "int.ve",
- "mil.ve",
- "net.ve",
- "org.ve",
- "rec.ve",
- "store.ve",
- "tec.ve",
- "web.ve",
- "vg",
- "vi",
- "co.vi",
- "com.vi",
- "k12.vi",
- "net.vi",
- "org.vi",
- "vn",
- "com.vn",
- "net.vn",
- "org.vn",
- "edu.vn",
- "gov.vn",
- "int.vn",
- "ac.vn",
- "biz.vn",
- "info.vn",
- "name.vn",
- "pro.vn",
- "health.vn",
- "vu",
- "com.vu",
- "edu.vu",
- "net.vu",
- "org.vu",
- "wf",
- "ws",
- "com.ws",
- "net.ws",
- "org.ws",
- "gov.ws",
- "edu.ws",
- "yt",
- "xn--mgbaam7a8h",
- "xn--y9a3aq",
- "xn--54b7fta0cc",
- "xn--90ae",
- "xn--90ais",
- "xn--fiqs8s",
- "xn--fiqz9s",
- "xn--lgbbat1ad8j",
- "xn--wgbh1c",
- "xn--e1a4c",
- "xn--node",
- "xn--qxam",
- "xn--j6w193g",
- "xn--2scrj9c",
- "xn--3hcrj9c",
- "xn--45br5cyl",
- "xn--h2breg3eve",
- "xn--h2brj9c8c",
- "xn--mgbgu82a",
- "xn--rvc1e0am3e",
- "xn--h2brj9c",
- "xn--mgbbh1a71e",
- "xn--fpcrj9c3d",
- "xn--gecrj9c",
- "xn--s9brj9c",
- "xn--45brj9c",
- "xn--xkc2dl3a5ee0h",
- "xn--mgba3a4f16a",
- "xn--mgba3a4fra",
- "xn--mgbtx2b",
- "xn--mgbayh7gpa",
- "xn--3e0b707e",
- "xn--80ao21a",
- "xn--fzc2c9e2c",
- "xn--xkc2al3hye2a",
- "xn--mgbc0a9azcg",
- "xn--d1alf",
- "xn--l1acc",
- "xn--mix891f",
- "xn--mix082f",
- "xn--mgbx4cd0ab",
- "xn--mgb9awbf",
- "xn--mgbai9azgqp6j",
- "xn--mgbai9a5eva00b",
- "xn--ygbi2ammx",
- "xn--90a3ac",
- "xn--o1ac.xn--90a3ac",
- "xn--c1avg.xn--90a3ac",
- "xn--90azh.xn--90a3ac",
- "xn--d1at.xn--90a3ac",
- "xn--o1ach.xn--90a3ac",
- "xn--80au.xn--90a3ac",
- "xn--p1ai",
- "xn--wgbl6a",
- "xn--mgberp4a5d4ar",
- "xn--mgberp4a5d4a87g",
- "xn--mgbqly7c0a67fbc",
- "xn--mgbqly7cvafr",
- "xn--mgbpl2fh",
- "xn--yfro4i67o",
- "xn--clchc0ea0b2g2a9gcd",
- "xn--ogbpf8fl",
- "xn--mgbtf8fl",
- "xn--o3cw4h",
- "xn--12c1fe0br.xn--o3cw4h",
- "xn--12co0c3b4eva.xn--o3cw4h",
- "xn--h3cuzk1di.xn--o3cw4h",
- "xn--o3cyx2a.xn--o3cw4h",
- "xn--m3ch0j3a.xn--o3cw4h",
- "xn--12cfi8ixb8l.xn--o3cw4h",
- "xn--pgbs0dh",
- "xn--kpry57d",
- "xn--kprw13d",
- "xn--nnx388a",
- "xn--j1amh",
- "xn--mgb2ddes",
- "xxx",
- "*.ye",
- "ac.za",
- "agric.za",
- "alt.za",
- "co.za",
- "edu.za",
- "gov.za",
- "grondar.za",
- "law.za",
- "mil.za",
- "net.za",
- "ngo.za",
- "nis.za",
- "nom.za",
- "org.za",
- "school.za",
- "tm.za",
- "web.za",
- "zm",
- "ac.zm",
- "biz.zm",
- "co.zm",
- "com.zm",
- "edu.zm",
- "gov.zm",
- "info.zm",
- "mil.zm",
- "net.zm",
- "org.zm",
- "sch.zm",
- "zw",
- "ac.zw",
- "co.zw",
- "gov.zw",
- "mil.zw",
- "org.zw",
- "aaa",
- "aarp",
- "abarth",
- "abb",
- "abbott",
- "abbvie",
- "abc",
- "able",
- "abogado",
- "abudhabi",
- "academy",
- "accenture",
- "accountant",
- "accountants",
- "aco",
- "active",
- "actor",
- "adac",
- "ads",
- "adult",
- "aeg",
- "aetna",
- "afamilycompany",
- "afl",
- "africa",
- "agakhan",
- "agency",
- "aig",
- "aigo",
- "airbus",
- "airforce",
- "airtel",
- "akdn",
- "alfaromeo",
- "alibaba",
- "alipay",
- "allfinanz",
- "allstate",
- "ally",
- "alsace",
- "alstom",
- "americanexpress",
- "americanfamily",
- "amex",
- "amfam",
- "amica",
- "amsterdam",
- "analytics",
- "android",
- "anquan",
- "anz",
- "aol",
- "apartments",
- "app",
- "apple",
- "aquarelle",
- "arab",
- "aramco",
- "archi",
- "army",
- "art",
- "arte",
- "asda",
- "associates",
- "athleta",
- "attorney",
- "auction",
- "audi",
- "audible",
- "audio",
- "auspost",
- "author",
- "auto",
- "autos",
- "avianca",
- "aws",
- "axa",
- "azure",
- "baby",
- "baidu",
- "banamex",
- "bananarepublic",
- "band",
- "bank",
- "bar",
- "barcelona",
- "barclaycard",
- "barclays",
- "barefoot",
- "bargains",
- "baseball",
- "basketball",
- "bauhaus",
- "bayern",
- "bbc",
- "bbt",
- "bbva",
- "bcg",
- "bcn",
- "beats",
- "beauty",
- "beer",
- "bentley",
- "berlin",
- "best",
- "bestbuy",
- "bet",
- "bharti",
- "bible",
- "bid",
- "bike",
- "bing",
- "bingo",
- "bio",
- "black",
- "blackfriday",
- "blanco",
- "blockbuster",
- "blog",
- "bloomberg",
- "blue",
- "bms",
- "bmw",
- "bnl",
- "bnpparibas",
- "boats",
- "boehringer",
- "bofa",
- "bom",
- "bond",
- "boo",
- "book",
- "booking",
- "boots",
- "bosch",
- "bostik",
- "boston",
- "bot",
- "boutique",
- "box",
- "bradesco",
- "bridgestone",
- "broadway",
- "broker",
- "brother",
- "brussels",
- "budapest",
- "bugatti",
- "build",
- "builders",
- "business",
- "buy",
- "buzz",
- "bzh",
- "cab",
- "cafe",
- "cal",
- "call",
- "calvinklein",
- "cam",
- "camera",
- "camp",
- "cancerresearch",
- "canon",
- "capetown",
- "capital",
- "capitalone",
- "car",
- "caravan",
- "cards",
- "care",
- "career",
- "careers",
- "cars",
- "cartier",
- "casa",
- "case",
- "caseih",
- "cash",
- "casino",
- "catering",
- "catholic",
- "cba",
- "cbn",
- "cbre",
- "cbs",
- "ceb",
- "center",
- "ceo",
- "cern",
- "cfa",
- "cfd",
- "chanel",
- "channel",
- "chase",
- "chat",
- "cheap",
- "chintai",
- "chloe",
- "christmas",
- "chrome",
- "chrysler",
- "church",
- "cipriani",
- "circle",
- "cisco",
- "citadel",
- "citi",
- "citic",
- "city",
- "cityeats",
- "claims",
- "cleaning",
- "click",
- "clinic",
- "clinique",
- "clothing",
- "cloud",
- "club",
- "clubmed",
- "coach",
- "codes",
- "coffee",
- "college",
- "cologne",
- "comcast",
- "commbank",
- "community",
- "company",
- "compare",
- "computer",
- "comsec",
- "condos",
- "construction",
- "consulting",
- "contact",
- "contractors",
- "cooking",
- "cookingchannel",
- "cool",
- "corsica",
- "country",
- "coupon",
- "coupons",
- "courses",
- "credit",
- "creditcard",
- "creditunion",
- "cricket",
- "crown",
- "crs",
- "cruise",
- "cruises",
- "csc",
- "cuisinella",
- "cymru",
- "cyou",
- "dabur",
- "dad",
- "dance",
- "data",
- "date",
- "dating",
- "datsun",
- "day",
- "dclk",
- "dds",
- "deal",
- "dealer",
- "deals",
- "degree",
- "delivery",
- "dell",
- "deloitte",
- "delta",
- "democrat",
- "dental",
- "dentist",
- "desi",
- "design",
- "dev",
- "dhl",
- "diamonds",
- "diet",
- "digital",
- "direct",
- "directory",
- "discount",
- "discover",
- "dish",
- "diy",
- "dnp",
- "docs",
- "doctor",
- "dodge",
- "dog",
- "doha",
- "domains",
- "dot",
- "download",
- "drive",
- "dtv",
- "dubai",
- "duck",
- "dunlop",
- "duns",
- "dupont",
- "durban",
- "dvag",
- "dvr",
- "earth",
- "eat",
- "eco",
- "edeka",
- "education",
- "email",
- "emerck",
- "energy",
- "engineer",
- "engineering",
- "enterprises",
- "epost",
- "epson",
- "equipment",
- "ericsson",
- "erni",
- "esq",
- "estate",
- "esurance",
- "etisalat",
- "eurovision",
- "eus",
- "events",
- "everbank",
- "exchange",
- "expert",
- "exposed",
- "express",
- "extraspace",
- "fage",
- "fail",
- "fairwinds",
- "faith",
- "family",
- "fan",
- "fans",
- "farm",
- "farmers",
- "fashion",
- "fast",
- "fedex",
- "feedback",
- "ferrari",
- "ferrero",
- "fiat",
- "fidelity",
- "fido",
- "film",
- "final",
- "finance",
- "financial",
- "fire",
- "firestone",
- "firmdale",
- "fish",
- "fishing",
- "fit",
- "fitness",
- "flickr",
- "flights",
- "flir",
- "florist",
- "flowers",
- "fly",
- "foo",
- "food",
- "foodnetwork",
- "football",
- "ford",
- "forex",
- "forsale",
- "forum",
- "foundation",
- "fox",
- "free",
- "fresenius",
- "frl",
- "frogans",
- "frontdoor",
- "frontier",
- "ftr",
- "fujitsu",
- "fujixerox",
- "fun",
- "fund",
- "furniture",
- "futbol",
- "fyi",
- "gal",
- "gallery",
- "gallo",
- "gallup",
- "game",
- "games",
- "gap",
- "garden",
- "gbiz",
- "gdn",
- "gea",
- "gent",
- "genting",
- "george",
- "ggee",
- "gift",
- "gifts",
- "gives",
- "giving",
- "glade",
- "glass",
- "gle",
- "global",
- "globo",
- "gmail",
- "gmbh",
- "gmo",
- "gmx",
- "godaddy",
- "gold",
- "goldpoint",
- "golf",
- "goo",
- "goodhands",
- "goodyear",
- "goog",
- "google",
- "gop",
- "got",
- "grainger",
- "graphics",
- "gratis",
- "green",
- "gripe",
- "grocery",
- "group",
- "guardian",
- "gucci",
- "guge",
- "guide",
- "guitars",
- "guru",
- "hair",
- "hamburg",
- "hangout",
- "haus",
- "hbo",
- "hdfc",
- "hdfcbank",
- "health",
- "healthcare",
- "help",
- "helsinki",
- "here",
- "hermes",
- "hgtv",
- "hiphop",
- "hisamitsu",
- "hitachi",
- "hiv",
- "hkt",
- "hockey",
- "holdings",
- "holiday",
- "homedepot",
- "homegoods",
- "homes",
- "homesense",
- "honda",
- "honeywell",
- "horse",
- "hospital",
- "host",
- "hosting",
- "hot",
- "hoteles",
- "hotels",
- "hotmail",
- "house",
- "how",
- "hsbc",
- "htc",
- "hughes",
- "hyatt",
- "hyundai",
- "ibm",
- "icbc",
- "ice",
- "icu",
- "ieee",
- "ifm",
- "ikano",
- "imamat",
- "imdb",
- "immo",
- "immobilien",
- "industries",
- "infiniti",
- "ing",
- "ink",
- "institute",
- "insurance",
- "insure",
- "intel",
- "international",
- "intuit",
- "investments",
- "ipiranga",
- "irish",
- "iselect",
- "ismaili",
- "ist",
- "istanbul",
- "itau",
- "itv",
- "iveco",
- "iwc",
- "jaguar",
- "java",
- "jcb",
- "jcp",
- "jeep",
- "jetzt",
- "jewelry",
- "jio",
- "jlc",
- "jll",
- "jmp",
- "jnj",
- "joburg",
- "jot",
- "joy",
- "jpmorgan",
- "jprs",
- "juegos",
- "juniper",
- "kaufen",
- "kddi",
- "kerryhotels",
- "kerrylogistics",
- "kerryproperties",
- "kfh",
- "kia",
- "kim",
- "kinder",
- "kindle",
- "kitchen",
- "kiwi",
- "koeln",
- "komatsu",
- "kosher",
- "kpmg",
- "kpn",
- "krd",
- "kred",
- "kuokgroup",
- "kyoto",
- "lacaixa",
- "ladbrokes",
- "lamborghini",
- "lamer",
- "lancaster",
- "lancia",
- "lancome",
- "land",
- "landrover",
- "lanxess",
- "lasalle",
- "lat",
- "latino",
- "latrobe",
- "law",
- "lawyer",
- "lds",
- "lease",
- "leclerc",
- "lefrak",
- "legal",
- "lego",
- "lexus",
- "lgbt",
- "liaison",
- "lidl",
- "life",
- "lifeinsurance",
- "lifestyle",
- "lighting",
- "like",
- "lilly",
- "limited",
- "limo",
- "lincoln",
- "linde",
- "link",
- "lipsy",
- "live",
- "living",
- "lixil",
- "loan",
- "loans",
- "locker",
- "locus",
- "loft",
- "lol",
- "london",
- "lotte",
- "lotto",
- "love",
- "lpl",
- "lplfinancial",
- "ltd",
- "ltda",
- "lundbeck",
- "lupin",
- "luxe",
- "luxury",
- "macys",
- "madrid",
- "maif",
- "maison",
- "makeup",
- "man",
- "management",
- "mango",
- "map",
- "market",
- "marketing",
- "markets",
- "marriott",
- "marshalls",
- "maserati",
- "mattel",
- "mba",
- "mcd",
- "mcdonalds",
- "mckinsey",
- "med",
- "media",
- "meet",
- "melbourne",
- "meme",
- "memorial",
- "men",
- "menu",
- "meo",
- "merckmsd",
- "metlife",
- "miami",
- "microsoft",
- "mini",
- "mint",
- "mit",
- "mitsubishi",
- "mlb",
- "mls",
- "mma",
- "mobile",
- "mobily",
- "moda",
- "moe",
- "moi",
- "mom",
- "monash",
- "money",
- "monster",
- "montblanc",
- "mopar",
- "mormon",
- "mortgage",
- "moscow",
- "moto",
- "motorcycles",
- "mov",
- "movie",
- "movistar",
- "msd",
- "mtn",
- "mtpc",
- "mtr",
- "mutual",
- "nab",
- "nadex",
- "nagoya",
- "nationwide",
- "natura",
- "navy",
- "nba",
- "nec",
- "netbank",
- "netflix",
- "network",
- "neustar",
- "new",
- "newholland",
- "news",
- "next",
- "nextdirect",
- "nexus",
- "nfl",
- "ngo",
- "nhk",
- "nico",
- "nike",
- "nikon",
- "ninja",
- "nissan",
- "nissay",
- "nokia",
- "northwesternmutual",
- "norton",
- "now",
- "nowruz",
- "nowtv",
- "nra",
- "nrw",
- "ntt",
- "nyc",
- "obi",
- "observer",
- "off",
- "office",
- "okinawa",
- "olayan",
- "olayangroup",
- "oldnavy",
- "ollo",
- "omega",
- "one",
- "ong",
- "onl",
- "online",
- "onyourside",
- "ooo",
- "open",
- "oracle",
- "orange",
- "organic",
- "origins",
- "osaka",
- "otsuka",
- "ott",
- "ovh",
- "page",
- "pamperedchef",
- "panasonic",
- "panerai",
- "paris",
- "pars",
- "partners",
- "parts",
- "party",
- "passagens",
- "pay",
- "pccw",
- "pet",
- "pfizer",
- "pharmacy",
- "phd",
- "philips",
- "phone",
- "photo",
- "photography",
- "photos",
- "physio",
- "piaget",
- "pics",
- "pictet",
- "pictures",
- "pid",
- "pin",
- "ping",
- "pink",
- "pioneer",
- "pizza",
- "place",
- "play",
- "playstation",
- "plumbing",
- "plus",
- "pnc",
- "pohl",
- "poker",
- "politie",
- "porn",
- "pramerica",
- "praxi",
- "press",
- "prime",
- "prod",
- "productions",
- "prof",
- "progressive",
- "promo",
- "properties",
- "property",
- "protection",
- "pru",
- "prudential",
- "pub",
- "pwc",
- "qpon",
- "quebec",
- "quest",
- "qvc",
- "racing",
- "radio",
- "raid",
- "read",
- "realestate",
- "realtor",
- "realty",
- "recipes",
- "red",
- "redstone",
- "redumbrella",
- "rehab",
- "reise",
- "reisen",
- "reit",
- "reliance",
- "ren",
- "rent",
- "rentals",
- "repair",
- "report",
- "republican",
- "rest",
- "restaurant",
- "review",
- "reviews",
- "rexroth",
- "rich",
- "richardli",
- "ricoh",
- "rightathome",
- "ril",
- "rio",
- "rip",
- "rmit",
- "rocher",
- "rocks",
- "rodeo",
- "rogers",
- "room",
- "rsvp",
- "rugby",
- "ruhr",
- "run",
- "rwe",
- "ryukyu",
- "saarland",
- "safe",
- "safety",
- "sakura",
- "sale",
- "salon",
- "samsclub",
- "samsung",
- "sandvik",
- "sandvikcoromant",
- "sanofi",
- "sap",
- "sapo",
- "sarl",
- "sas",
- "save",
- "saxo",
- "sbi",
- "sbs",
- "sca",
- "scb",
- "schaeffler",
- "schmidt",
- "scholarships",
- "school",
- "schule",
- "schwarz",
- "science",
- "scjohnson",
- "scor",
- "scot",
- "search",
- "seat",
- "secure",
- "security",
- "seek",
- "select",
- "sener",
- "services",
- "ses",
- "seven",
- "sew",
- "sex",
- "sexy",
- "sfr",
- "shangrila",
- "sharp",
- "shaw",
- "shell",
- "shia",
- "shiksha",
- "shoes",
- "shop",
- "shopping",
- "shouji",
- "show",
- "showtime",
- "shriram",
- "silk",
- "sina",
- "singles",
- "site",
- "ski",
- "skin",
- "sky",
- "skype",
- "sling",
- "smart",
- "smile",
- "sncf",
- "soccer",
- "social",
- "softbank",
- "software",
- "sohu",
- "solar",
- "solutions",
- "song",
- "sony",
- "soy",
- "space",
- "spiegel",
- "spot",
- "spreadbetting",
- "srl",
- "srt",
- "stada",
- "staples",
- "star",
- "starhub",
- "statebank",
- "statefarm",
- "statoil",
- "stc",
- "stcgroup",
- "stockholm",
- "storage",
- "store",
- "stream",
- "studio",
- "study",
- "style",
- "sucks",
- "supplies",
- "supply",
- "support",
- "surf",
- "surgery",
- "suzuki",
- "swatch",
- "swiftcover",
- "swiss",
- "sydney",
- "symantec",
- "systems",
- "tab",
- "taipei",
- "talk",
- "taobao",
- "target",
- "tatamotors",
- "tatar",
- "tattoo",
- "tax",
- "taxi",
- "tci",
- "tdk",
- "team",
- "tech",
- "technology",
- "telecity",
- "telefonica",
- "temasek",
- "tennis",
- "teva",
- "thd",
- "theater",
- "theatre",
- "tiaa",
- "tickets",
- "tienda",
- "tiffany",
- "tips",
- "tires",
- "tirol",
- "tjmaxx",
- "tjx",
- "tkmaxx",
- "tmall",
- "today",
- "tokyo",
- "tools",
- "top",
- "toray",
- "toshiba",
- "total",
- "tours",
- "town",
- "toyota",
- "toys",
- "trade",
- "trading",
- "training",
- "travelchannel",
- "travelers",
- "travelersinsurance",
- "trust",
- "trv",
- "tube",
- "tui",
- "tunes",
- "tushu",
- "tvs",
- "ubank",
- "ubs",
- "uconnect",
- "unicom",
- "university",
- "uno",
- "uol",
- "ups",
- "vacations",
- "vana",
- "vanguard",
- "vegas",
- "ventures",
- "verisign",
- "versicherung",
- "vet",
- "viajes",
- "video",
- "vig",
- "viking",
- "villas",
- "vin",
- "vip",
- "virgin",
- "visa",
- "vision",
- "vista",
- "vistaprint",
- "viva",
- "vivo",
- "vlaanderen",
- "vodka",
- "volkswagen",
- "volvo",
- "vote",
- "voting",
- "voto",
- "voyage",
- "vuelos",
- "wales",
- "walmart",
- "walter",
- "wang",
- "wanggou",
- "warman",
- "watch",
- "watches",
- "weather",
- "weatherchannel",
- "webcam",
- "weber",
- "website",
- "wed",
- "wedding",
- "weibo",
- "weir",
- "whoswho",
- "wien",
- "wiki",
- "williamhill",
- "win",
- "windows",
- "wine",
- "winners",
- "wme",
- "wolterskluwer",
- "woodside",
- "work",
- "works",
- "world",
- "wow",
- "wtc",
- "wtf",
- "xbox",
- "xerox",
- "xfinity",
- "xihuan",
- "xin",
- "xn--11b4c3d",
- "xn--1ck2e1b",
- "xn--1qqw23a",
- "xn--30rr7y",
- "xn--3bst00m",
- "xn--3ds443g",
- "xn--3oq18vl8pn36a",
- "xn--3pxu8k",
- "xn--42c2d9a",
- "xn--45q11c",
- "xn--4gbrim",
- "xn--55qw42g",
- "xn--55qx5d",
- "xn--5su34j936bgsg",
- "xn--5tzm5g",
- "xn--6frz82g",
- "xn--6qq986b3xl",
- "xn--80adxhks",
- "xn--80aqecdr1a",
- "xn--80asehdb",
- "xn--80aswg",
- "xn--8y0a063a",
- "xn--9dbq2a",
- "xn--9et52u",
- "xn--9krt00a",
- "xn--b4w605ferd",
- "xn--bck1b9a5dre4c",
- "xn--c1avg",
- "xn--c2br7g",
- "xn--cck2b3b",
- "xn--cg4bki",
- "xn--czr694b",
- "xn--czrs0t",
- "xn--czru2d",
- "xn--d1acj3b",
- "xn--eckvdtc9d",
- "xn--efvy88h",
- "xn--estv75g",
- "xn--fct429k",
- "xn--fhbei",
- "xn--fiq228c5hs",
- "xn--fiq64b",
- "xn--fjq720a",
- "xn--flw351e",
- "xn--fzys8d69uvgm",
- "xn--g2xx48c",
- "xn--gckr3f0f",
- "xn--gk3at1e",
- "xn--hxt814e",
- "xn--i1b6b1a6a2e",
- "xn--imr513n",
- "xn--io0a7i",
- "xn--j1aef",
- "xn--jlq61u9w7b",
- "xn--jvr189m",
- "xn--kcrx77d1x4a",
- "xn--kpu716f",
- "xn--kput3i",
- "xn--mgba3a3ejt",
- "xn--mgba7c0bbn0a",
- "xn--mgbaakc7dvf",
- "xn--mgbab2bd",
- "xn--mgbb9fbpob",
- "xn--mgbca7dzdo",
- "xn--mgbi4ecexp",
- "xn--mgbt3dhd",
- "xn--mk1bu44c",
- "xn--mxtq1m",
- "xn--ngbc5azd",
- "xn--ngbe9e0a",
- "xn--ngbrx",
- "xn--nqv7f",
- "xn--nqv7fs00ema",
- "xn--nyqy26a",
- "xn--p1acf",
- "xn--pbt977c",
- "xn--pssy2u",
- "xn--q9jyb4c",
- "xn--qcka1pmc",
- "xn--rhqv96g",
- "xn--rovu88b",
- "xn--ses554g",
- "xn--t60b56a",
- "xn--tckwe",
- "xn--tiq49xqyj",
- "xn--unup4y",
- "xn--vermgensberater-ctb",
- "xn--vermgensberatung-pwb",
- "xn--vhquv",
- "xn--vuq861b",
- "xn--w4r85el8fhu5dnra",
- "xn--w4rs40l",
- "xn--xhq521b",
- "xn--zfr164b",
- "xperia",
- "xyz",
- "yachts",
- "yahoo",
- "yamaxun",
- "yandex",
- "yodobashi",
- "yoga",
- "yokohama",
- "you",
- "youtube",
- "yun",
- "zappos",
- "zara",
- "zero",
- "zip",
- "zippo",
- "zone",
- "zuerich",
- "cc.ua",
- "inf.ua",
- "ltd.ua",
- "beep.pl",
- "*.compute.estate",
- "*.alces.network",
- "*.alwaysdata.net",
- "cloudfront.net",
- "*.compute.amazonaws.com",
- "*.compute-1.amazonaws.com",
- "*.compute.amazonaws.com.cn",
- "us-east-1.amazonaws.com",
- "cn-north-1.eb.amazonaws.com.cn",
- "elasticbeanstalk.com",
- "ap-northeast-1.elasticbeanstalk.com",
- "ap-northeast-2.elasticbeanstalk.com",
- "ap-south-1.elasticbeanstalk.com",
- "ap-southeast-1.elasticbeanstalk.com",
- "ap-southeast-2.elasticbeanstalk.com",
- "ca-central-1.elasticbeanstalk.com",
- "eu-central-1.elasticbeanstalk.com",
- "eu-west-1.elasticbeanstalk.com",
- "eu-west-2.elasticbeanstalk.com",
- "sa-east-1.elasticbeanstalk.com",
- "us-east-1.elasticbeanstalk.com",
- "us-east-2.elasticbeanstalk.com",
- "us-gov-west-1.elasticbeanstalk.com",
- "us-west-1.elasticbeanstalk.com",
- "us-west-2.elasticbeanstalk.com",
- "*.elb.amazonaws.com",
- "*.elb.amazonaws.com.cn",
- "s3.amazonaws.com",
- "s3-ap-northeast-1.amazonaws.com",
- "s3-ap-northeast-2.amazonaws.com",
- "s3-ap-south-1.amazonaws.com",
- "s3-ap-southeast-1.amazonaws.com",
- "s3-ap-southeast-2.amazonaws.com",
- "s3-ca-central-1.amazonaws.com",
- "s3-eu-central-1.amazonaws.com",
- "s3-eu-west-1.amazonaws.com",
- "s3-eu-west-2.amazonaws.com",
- "s3-external-1.amazonaws.com",
- "s3-fips-us-gov-west-1.amazonaws.com",
- "s3-sa-east-1.amazonaws.com",
- "s3-us-gov-west-1.amazonaws.com",
- "s3-us-east-2.amazonaws.com",
- "s3-us-west-1.amazonaws.com",
- "s3-us-west-2.amazonaws.com",
- "s3.ap-northeast-2.amazonaws.com",
- "s3.ap-south-1.amazonaws.com",
- "s3.cn-north-1.amazonaws.com.cn",
- "s3.ca-central-1.amazonaws.com",
- "s3.eu-central-1.amazonaws.com",
- "s3.eu-west-2.amazonaws.com",
- "s3.us-east-2.amazonaws.com",
- "s3.dualstack.ap-northeast-1.amazonaws.com",
- "s3.dualstack.ap-northeast-2.amazonaws.com",
- "s3.dualstack.ap-south-1.amazonaws.com",
- "s3.dualstack.ap-southeast-1.amazonaws.com",
- "s3.dualstack.ap-southeast-2.amazonaws.com",
- "s3.dualstack.ca-central-1.amazonaws.com",
- "s3.dualstack.eu-central-1.amazonaws.com",
- "s3.dualstack.eu-west-1.amazonaws.com",
- "s3.dualstack.eu-west-2.amazonaws.com",
- "s3.dualstack.sa-east-1.amazonaws.com",
- "s3.dualstack.us-east-1.amazonaws.com",
- "s3.dualstack.us-east-2.amazonaws.com",
- "s3-website-us-east-1.amazonaws.com",
- "s3-website-us-west-1.amazonaws.com",
- "s3-website-us-west-2.amazonaws.com",
- "s3-website-ap-northeast-1.amazonaws.com",
- "s3-website-ap-southeast-1.amazonaws.com",
- "s3-website-ap-southeast-2.amazonaws.com",
- "s3-website-eu-west-1.amazonaws.com",
- "s3-website-sa-east-1.amazonaws.com",
- "s3-website.ap-northeast-2.amazonaws.com",
- "s3-website.ap-south-1.amazonaws.com",
- "s3-website.ca-central-1.amazonaws.com",
- "s3-website.eu-central-1.amazonaws.com",
- "s3-website.eu-west-2.amazonaws.com",
- "s3-website.us-east-2.amazonaws.com",
- "t3l3p0rt.net",
- "tele.amune.org",
- "on-aptible.com",
- "user.party.eus",
- "pimienta.org",
- "poivron.org",
- "potager.org",
- "sweetpepper.org",
- "myasustor.com",
- "myfritz.net",
- "*.awdev.ca",
- "*.advisor.ws",
- "backplaneapp.io",
- "betainabox.com",
- "bnr.la",
- "boomla.net",
- "boxfuse.io",
- "square7.ch",
- "bplaced.com",
- "bplaced.de",
- "square7.de",
- "bplaced.net",
- "square7.net",
- "browsersafetymark.io",
- "mycd.eu",
- "ae.org",
- "ar.com",
- "br.com",
- "cn.com",
- "com.de",
- "com.se",
- "de.com",
- "eu.com",
- "gb.com",
- "gb.net",
- "hu.com",
- "hu.net",
- "jp.net",
- "jpn.com",
- "kr.com",
- "mex.com",
- "no.com",
- "qc.com",
- "ru.com",
- "sa.com",
- "se.com",
- "se.net",
- "uk.com",
- "uk.net",
- "us.com",
- "uy.com",
- "za.bz",
- "za.com",
- "africa.com",
- "gr.com",
- "in.net",
- "us.org",
- "co.com",
- "c.la",
- "certmgr.org",
- "xenapponazure.com",
- "virtueeldomein.nl",
- "c66.me",
- "jdevcloud.com",
- "wpdevcloud.com",
- "cloudaccess.host",
- "freesite.host",
- "cloudaccess.net",
- "cloudcontrolled.com",
- "cloudcontrolapp.com",
- "co.ca",
- "co.cz",
- "c.cdn77.org",
- "cdn77-ssl.net",
- "r.cdn77.net",
- "rsc.cdn77.org",
- "ssl.origin.cdn77-secure.org",
- "cloudns.asia",
- "cloudns.biz",
- "cloudns.club",
- "cloudns.cc",
- "cloudns.eu",
- "cloudns.in",
- "cloudns.info",
- "cloudns.org",
- "cloudns.pro",
- "cloudns.pw",
- "cloudns.us",
- "co.nl",
- "co.no",
- "dyn.cosidns.de",
- "dynamisches-dns.de",
- "dnsupdater.de",
- "internet-dns.de",
- "l-o-g-i-n.de",
- "dynamic-dns.info",
- "feste-ip.net",
- "knx-server.net",
- "static-access.net",
- "realm.cz",
- "*.cryptonomic.net",
- "cupcake.is",
- "cyon.link",
- "cyon.site",
- "daplie.me",
- "localhost.daplie.me",
- "biz.dk",
- "co.dk",
- "firm.dk",
- "reg.dk",
- "store.dk",
- "debian.net",
- "dedyn.io",
- "dnshome.de",
- "drayddns.com",
- "dreamhosters.com",
- "mydrobo.com",
- "drud.io",
- "drud.us",
- "duckdns.org",
- "dy.fi",
- "tunk.org",
- "dyndns-at-home.com",
- "dyndns-at-work.com",
- "dyndns-blog.com",
- "dyndns-free.com",
- "dyndns-home.com",
- "dyndns-ip.com",
- "dyndns-mail.com",
- "dyndns-office.com",
- "dyndns-pics.com",
- "dyndns-remote.com",
- "dyndns-server.com",
- "dyndns-web.com",
- "dyndns-wiki.com",
- "dyndns-work.com",
- "dyndns.biz",
- "dyndns.info",
- "dyndns.org",
- "dyndns.tv",
- "at-band-camp.net",
- "ath.cx",
- "barrel-of-knowledge.info",
- "barrell-of-knowledge.info",
- "better-than.tv",
- "blogdns.com",
- "blogdns.net",
- "blogdns.org",
- "blogsite.org",
- "boldlygoingnowhere.org",
- "broke-it.net",
- "buyshouses.net",
- "cechire.com",
- "dnsalias.com",
- "dnsalias.net",
- "dnsalias.org",
- "dnsdojo.com",
- "dnsdojo.net",
- "dnsdojo.org",
- "does-it.net",
- "doesntexist.com",
- "doesntexist.org",
- "dontexist.com",
- "dontexist.net",
- "dontexist.org",
- "doomdns.com",
- "doomdns.org",
- "dvrdns.org",
- "dyn-o-saur.com",
- "dynalias.com",
- "dynalias.net",
- "dynalias.org",
- "dynathome.net",
- "dyndns.ws",
- "endofinternet.net",
- "endofinternet.org",
- "endoftheinternet.org",
- "est-a-la-maison.com",
- "est-a-la-masion.com",
- "est-le-patron.com",
- "est-mon-blogueur.com",
- "for-better.biz",
- "for-more.biz",
- "for-our.info",
- "for-some.biz",
- "for-the.biz",
- "forgot.her.name",
- "forgot.his.name",
- "from-ak.com",
- "from-al.com",
- "from-ar.com",
- "from-az.net",
- "from-ca.com",
- "from-co.net",
- "from-ct.com",
- "from-dc.com",
- "from-de.com",
- "from-fl.com",
- "from-ga.com",
- "from-hi.com",
- "from-ia.com",
- "from-id.com",
- "from-il.com",
- "from-in.com",
- "from-ks.com",
- "from-ky.com",
- "from-la.net",
- "from-ma.com",
- "from-md.com",
- "from-me.org",
- "from-mi.com",
- "from-mn.com",
- "from-mo.com",
- "from-ms.com",
- "from-mt.com",
- "from-nc.com",
- "from-nd.com",
- "from-ne.com",
- "from-nh.com",
- "from-nj.com",
- "from-nm.com",
- "from-nv.com",
- "from-ny.net",
- "from-oh.com",
- "from-ok.com",
- "from-or.com",
- "from-pa.com",
- "from-pr.com",
- "from-ri.com",
- "from-sc.com",
- "from-sd.com",
- "from-tn.com",
- "from-tx.com",
- "from-ut.com",
- "from-va.com",
- "from-vt.com",
- "from-wa.com",
- "from-wi.com",
- "from-wv.com",
- "from-wy.com",
- "ftpaccess.cc",
- "fuettertdasnetz.de",
- "game-host.org",
- "game-server.cc",
- "getmyip.com",
- "gets-it.net",
- "go.dyndns.org",
- "gotdns.com",
- "gotdns.org",
- "groks-the.info",
- "groks-this.info",
- "ham-radio-op.net",
- "here-for-more.info",
- "hobby-site.com",
- "hobby-site.org",
- "home.dyndns.org",
- "homedns.org",
- "homeftp.net",
- "homeftp.org",
- "homeip.net",
- "homelinux.com",
- "homelinux.net",
- "homelinux.org",
- "homeunix.com",
- "homeunix.net",
- "homeunix.org",
- "iamallama.com",
- "in-the-band.net",
- "is-a-anarchist.com",
- "is-a-blogger.com",
- "is-a-bookkeeper.com",
- "is-a-bruinsfan.org",
- "is-a-bulls-fan.com",
- "is-a-candidate.org",
- "is-a-caterer.com",
- "is-a-celticsfan.org",
- "is-a-chef.com",
- "is-a-chef.net",
- "is-a-chef.org",
- "is-a-conservative.com",
- "is-a-cpa.com",
- "is-a-cubicle-slave.com",
- "is-a-democrat.com",
- "is-a-designer.com",
- "is-a-doctor.com",
- "is-a-financialadvisor.com",
- "is-a-geek.com",
- "is-a-geek.net",
- "is-a-geek.org",
- "is-a-green.com",
- "is-a-guru.com",
- "is-a-hard-worker.com",
- "is-a-hunter.com",
- "is-a-knight.org",
- "is-a-landscaper.com",
- "is-a-lawyer.com",
- "is-a-liberal.com",
- "is-a-libertarian.com",
- "is-a-linux-user.org",
- "is-a-llama.com",
- "is-a-musician.com",
- "is-a-nascarfan.com",
- "is-a-nurse.com",
- "is-a-painter.com",
- "is-a-patsfan.org",
- "is-a-personaltrainer.com",
- "is-a-photographer.com",
- "is-a-player.com",
- "is-a-republican.com",
- "is-a-rockstar.com",
- "is-a-socialist.com",
- "is-a-soxfan.org",
- "is-a-student.com",
- "is-a-teacher.com",
- "is-a-techie.com",
- "is-a-therapist.com",
- "is-an-accountant.com",
- "is-an-actor.com",
- "is-an-actress.com",
- "is-an-anarchist.com",
- "is-an-artist.com",
- "is-an-engineer.com",
- "is-an-entertainer.com",
- "is-by.us",
- "is-certified.com",
- "is-found.org",
- "is-gone.com",
- "is-into-anime.com",
- "is-into-cars.com",
- "is-into-cartoons.com",
- "is-into-games.com",
- "is-leet.com",
- "is-lost.org",
- "is-not-certified.com",
- "is-saved.org",
- "is-slick.com",
- "is-uberleet.com",
- "is-very-bad.org",
- "is-very-evil.org",
- "is-very-good.org",
- "is-very-nice.org",
- "is-very-sweet.org",
- "is-with-theband.com",
- "isa-geek.com",
- "isa-geek.net",
- "isa-geek.org",
- "isa-hockeynut.com",
- "issmarterthanyou.com",
- "isteingeek.de",
- "istmein.de",
- "kicks-ass.net",
- "kicks-ass.org",
- "knowsitall.info",
- "land-4-sale.us",
- "lebtimnetz.de",
- "leitungsen.de",
- "likes-pie.com",
- "likescandy.com",
- "merseine.nu",
- "mine.nu",
- "misconfused.org",
- "mypets.ws",
- "myphotos.cc",
- "neat-url.com",
- "office-on-the.net",
- "on-the-web.tv",
- "podzone.net",
- "podzone.org",
- "readmyblog.org",
- "saves-the-whales.com",
- "scrapper-site.net",
- "scrapping.cc",
- "selfip.biz",
- "selfip.com",
- "selfip.info",
- "selfip.net",
- "selfip.org",
- "sells-for-less.com",
- "sells-for-u.com",
- "sells-it.net",
- "sellsyourhome.org",
- "servebbs.com",
- "servebbs.net",
- "servebbs.org",
- "serveftp.net",
- "serveftp.org",
- "servegame.org",
- "shacknet.nu",
- "simple-url.com",
- "space-to-rent.com",
- "stuff-4-sale.org",
- "stuff-4-sale.us",
- "teaches-yoga.com",
- "thruhere.net",
- "traeumtgerade.de",
- "webhop.biz",
- "webhop.info",
- "webhop.net",
- "webhop.org",
- "worse-than.tv",
- "writesthisblog.com",
- "ddnss.de",
- "dyn.ddnss.de",
- "dyndns.ddnss.de",
- "dyndns1.de",
- "dyn-ip24.de",
- "home-webserver.de",
- "dyn.home-webserver.de",
- "myhome-server.de",
- "ddnss.org",
- "definima.net",
- "definima.io",
- "ddnsfree.com",
- "ddnsgeek.com",
- "giize.com",
- "gleeze.com",
- "kozow.com",
- "loseyourip.com",
- "ooguy.com",
- "theworkpc.com",
- "casacam.net",
- "dynu.net",
- "accesscam.org",
- "camdvr.org",
- "freeddns.org",
- "mywire.org",
- "webredirect.org",
- "myddns.rocks",
- "blogsite.xyz",
- "dynv6.net",
- "e4.cz",
- "mytuleap.com",
- "enonic.io",
- "customer.enonic.io",
- "eu.org",
- "al.eu.org",
- "asso.eu.org",
- "at.eu.org",
- "au.eu.org",
- "be.eu.org",
- "bg.eu.org",
- "ca.eu.org",
- "cd.eu.org",
- "ch.eu.org",
- "cn.eu.org",
- "cy.eu.org",
- "cz.eu.org",
- "de.eu.org",
- "dk.eu.org",
- "edu.eu.org",
- "ee.eu.org",
- "es.eu.org",
- "fi.eu.org",
- "fr.eu.org",
- "gr.eu.org",
- "hr.eu.org",
- "hu.eu.org",
- "ie.eu.org",
- "il.eu.org",
- "in.eu.org",
- "int.eu.org",
- "is.eu.org",
- "it.eu.org",
- "jp.eu.org",
- "kr.eu.org",
- "lt.eu.org",
- "lu.eu.org",
- "lv.eu.org",
- "mc.eu.org",
- "me.eu.org",
- "mk.eu.org",
- "mt.eu.org",
- "my.eu.org",
- "net.eu.org",
- "ng.eu.org",
- "nl.eu.org",
- "no.eu.org",
- "nz.eu.org",
- "paris.eu.org",
- "pl.eu.org",
- "pt.eu.org",
- "q-a.eu.org",
- "ro.eu.org",
- "ru.eu.org",
- "se.eu.org",
- "si.eu.org",
- "sk.eu.org",
- "tr.eu.org",
- "uk.eu.org",
- "us.eu.org",
- "eu-1.evennode.com",
- "eu-2.evennode.com",
- "eu-3.evennode.com",
- "eu-4.evennode.com",
- "us-1.evennode.com",
- "us-2.evennode.com",
- "us-3.evennode.com",
- "us-4.evennode.com",
- "twmail.cc",
- "twmail.net",
- "twmail.org",
- "mymailer.com.tw",
- "url.tw",
- "apps.fbsbx.com",
- "ru.net",
- "adygeya.ru",
- "bashkiria.ru",
- "bir.ru",
- "cbg.ru",
- "com.ru",
- "dagestan.ru",
- "grozny.ru",
- "kalmykia.ru",
- "kustanai.ru",
- "marine.ru",
- "mordovia.ru",
- "msk.ru",
- "mytis.ru",
- "nalchik.ru",
- "nov.ru",
- "pyatigorsk.ru",
- "spb.ru",
- "vladikavkaz.ru",
- "vladimir.ru",
- "abkhazia.su",
- "adygeya.su",
- "aktyubinsk.su",
- "arkhangelsk.su",
- "armenia.su",
- "ashgabad.su",
- "azerbaijan.su",
- "balashov.su",
- "bashkiria.su",
- "bryansk.su",
- "bukhara.su",
- "chimkent.su",
- "dagestan.su",
- "east-kazakhstan.su",
- "exnet.su",
- "georgia.su",
- "grozny.su",
- "ivanovo.su",
- "jambyl.su",
- "kalmykia.su",
- "kaluga.su",
- "karacol.su",
- "karaganda.su",
- "karelia.su",
- "khakassia.su",
- "krasnodar.su",
- "kurgan.su",
- "kustanai.su",
- "lenug.su",
- "mangyshlak.su",
- "mordovia.su",
- "msk.su",
- "murmansk.su",
- "nalchik.su",
- "navoi.su",
- "north-kazakhstan.su",
- "nov.su",
- "obninsk.su",
- "penza.su",
- "pokrovsk.su",
- "sochi.su",
- "spb.su",
- "tashkent.su",
- "termez.su",
- "togliatti.su",
- "troitsk.su",
- "tselinograd.su",
- "tula.su",
- "tuva.su",
- "vladikavkaz.su",
- "vladimir.su",
- "vologda.su",
- "channelsdvr.net",
- "fastlylb.net",
- "map.fastlylb.net",
- "freetls.fastly.net",
- "map.fastly.net",
- "a.prod.fastly.net",
- "global.prod.fastly.net",
- "a.ssl.fastly.net",
- "b.ssl.fastly.net",
- "global.ssl.fastly.net",
- "fhapp.xyz",
- "fedorainfracloud.org",
- "fedorapeople.org",
- "cloud.fedoraproject.org",
- "filegear.me",
- "firebaseapp.com",
- "flynnhub.com",
- "flynnhosting.net",
- "freebox-os.com",
- "freeboxos.com",
- "fbx-os.fr",
- "fbxos.fr",
- "freebox-os.fr",
- "freeboxos.fr",
- "myfusion.cloud",
- "*.futurecms.at",
- "futurehosting.at",
- "futuremailing.at",
- "*.ex.ortsinfo.at",
- "*.kunden.ortsinfo.at",
- "*.statics.cloud",
- "service.gov.uk",
- "github.io",
- "githubusercontent.com",
- "gitlab.io",
- "homeoffice.gov.uk",
- "ro.im",
- "shop.ro",
- "goip.de",
- "*.0emm.com",
- "appspot.com",
- "blogspot.ae",
- "blogspot.al",
- "blogspot.am",
- "blogspot.ba",
- "blogspot.be",
- "blogspot.bg",
- "blogspot.bj",
- "blogspot.ca",
- "blogspot.cf",
- "blogspot.ch",
- "blogspot.cl",
- "blogspot.co.at",
- "blogspot.co.id",
- "blogspot.co.il",
- "blogspot.co.ke",
- "blogspot.co.nz",
- "blogspot.co.uk",
- "blogspot.co.za",
- "blogspot.com",
- "blogspot.com.ar",
- "blogspot.com.au",
- "blogspot.com.br",
- "blogspot.com.by",
- "blogspot.com.co",
- "blogspot.com.cy",
- "blogspot.com.ee",
- "blogspot.com.eg",
- "blogspot.com.es",
- "blogspot.com.mt",
- "blogspot.com.ng",
- "blogspot.com.tr",
- "blogspot.com.uy",
- "blogspot.cv",
- "blogspot.cz",
- "blogspot.de",
- "blogspot.dk",
- "blogspot.fi",
- "blogspot.fr",
- "blogspot.gr",
- "blogspot.hk",
- "blogspot.hr",
- "blogspot.hu",
- "blogspot.ie",
- "blogspot.in",
- "blogspot.is",
- "blogspot.it",
- "blogspot.jp",
- "blogspot.kr",
- "blogspot.li",
- "blogspot.lt",
- "blogspot.lu",
- "blogspot.md",
- "blogspot.mk",
- "blogspot.mr",
- "blogspot.mx",
- "blogspot.my",
- "blogspot.nl",
- "blogspot.no",
- "blogspot.pe",
- "blogspot.pt",
- "blogspot.qa",
- "blogspot.re",
- "blogspot.ro",
- "blogspot.rs",
- "blogspot.ru",
- "blogspot.se",
- "blogspot.sg",
- "blogspot.si",
- "blogspot.sk",
- "blogspot.sn",
- "blogspot.td",
- "blogspot.tw",
- "blogspot.ug",
- "blogspot.vn",
- "cloudfunctions.net",
- "cloud.goog",
- "codespot.com",
- "googleapis.com",
- "googlecode.com",
- "pagespeedmobilizer.com",
- "publishproxy.com",
- "withgoogle.com",
- "withyoutube.com",
- "hashbang.sh",
- "hasura-app.io",
- "hepforge.org",
- "herokuapp.com",
- "herokussl.com",
- "moonscale.net",
- "iki.fi",
- "biz.at",
- "info.at",
- "info.cx",
- "ac.leg.br",
- "al.leg.br",
- "am.leg.br",
- "ap.leg.br",
- "ba.leg.br",
- "ce.leg.br",
- "df.leg.br",
- "es.leg.br",
- "go.leg.br",
- "ma.leg.br",
- "mg.leg.br",
- "ms.leg.br",
- "mt.leg.br",
- "pa.leg.br",
- "pb.leg.br",
- "pe.leg.br",
- "pi.leg.br",
- "pr.leg.br",
- "rj.leg.br",
- "rn.leg.br",
- "ro.leg.br",
- "rr.leg.br",
- "rs.leg.br",
- "sc.leg.br",
- "se.leg.br",
- "sp.leg.br",
- "to.leg.br",
- "pixolino.com",
- "ipifony.net",
- "*.triton.zone",
- "*.cns.joyent.com",
- "js.org",
- "keymachine.de",
- "knightpoint.systems",
- "co.krd",
- "edu.krd",
- "git-repos.de",
- "lcube-server.de",
- "svn-repos.de",
- "we.bs",
- "barsy.bg",
- "barsyonline.com",
- "barsy.de",
- "barsy.eu",
- "barsy.in",
- "barsy.net",
- "barsy.online",
- "barsy.support",
- "*.magentosite.cloud",
- "hb.cldmail.ru",
- "cloud.metacentrum.cz",
- "custom.metacentrum.cz",
- "meteorapp.com",
- "eu.meteorapp.com",
- "co.pl",
- "azurewebsites.net",
- "azure-mobile.net",
- "cloudapp.net",
- "bmoattachments.org",
- "net.ru",
- "org.ru",
- "pp.ru",
- "bitballoon.com",
- "netlify.com",
- "4u.com",
- "ngrok.io",
- "nfshost.com",
- "nsupdate.info",
- "nerdpol.ovh",
- "blogsyte.com",
- "brasilia.me",
- "cable-modem.org",
- "ciscofreak.com",
- "collegefan.org",
- "couchpotatofries.org",
- "damnserver.com",
- "ddns.me",
- "ditchyourip.com",
- "dnsfor.me",
- "dnsiskinky.com",
- "dvrcam.info",
- "dynns.com",
- "eating-organic.net",
- "fantasyleague.cc",
- "geekgalaxy.com",
- "golffan.us",
- "health-carereform.com",
- "homesecuritymac.com",
- "homesecuritypc.com",
- "hopto.me",
- "ilovecollege.info",
- "loginto.me",
- "mlbfan.org",
- "mmafan.biz",
- "myactivedirectory.com",
- "mydissent.net",
- "myeffect.net",
- "mymediapc.net",
- "mypsx.net",
- "mysecuritycamera.com",
- "mysecuritycamera.net",
- "mysecuritycamera.org",
- "net-freaks.com",
- "nflfan.org",
- "nhlfan.net",
- "no-ip.ca",
- "no-ip.co.uk",
- "no-ip.net",
- "noip.us",
- "onthewifi.com",
- "pgafan.net",
- "point2this.com",
- "pointto.us",
- "privatizehealthinsurance.net",
- "quicksytes.com",
- "read-books.org",
- "securitytactics.com",
- "serveexchange.com",
- "servehumour.com",
- "servep2p.com",
- "servesarcasm.com",
- "stufftoread.com",
- "ufcfan.org",
- "unusualperson.com",
- "workisboring.com",
- "3utilities.com",
- "bounceme.net",
- "ddns.net",
- "ddnsking.com",
- "gotdns.ch",
- "hopto.org",
- "myftp.biz",
- "myftp.org",
- "myvnc.com",
- "no-ip.biz",
- "no-ip.info",
- "no-ip.org",
- "noip.me",
- "redirectme.net",
- "servebeer.com",
- "serveblog.net",
- "servecounterstrike.com",
- "serveftp.com",
- "servegame.com",
- "servehalflife.com",
- "servehttp.com",
- "serveirc.com",
- "serveminecraft.net",
- "servemp3.com",
- "servepics.com",
- "servequake.com",
- "sytes.net",
- "webhop.me",
- "zapto.org",
- "stage.nodeart.io",
- "nodum.co",
- "nodum.io",
- "nyc.mn",
- "nom.ae",
- "nom.ai",
- "nom.al",
- "nym.by",
- "nym.bz",
- "nom.cl",
- "nom.gd",
- "nom.gl",
- "nym.gr",
- "nom.gt",
- "nom.hn",
- "nom.im",
- "nym.kz",
- "nym.la",
- "nom.li",
- "nym.li",
- "nym.lt",
- "nym.lu",
- "nym.me",
- "nom.mk",
- "nym.mx",
- "nom.nu",
- "nym.nz",
- "nym.pe",
- "nym.pt",
- "nom.pw",
- "nom.qa",
- "nom.rs",
- "nom.si",
- "nym.sk",
- "nym.su",
- "nym.sx",
- "nym.tw",
- "nom.ug",
- "nom.uy",
- "nom.vc",
- "nom.vg",
- "cya.gg",
- "nid.io",
- "opencraft.hosting",
- "operaunite.com",
- "outsystemscloud.com",
- "ownprovider.com",
- "oy.lc",
- "pgfog.com",
- "pagefrontapp.com",
- "art.pl",
- "gliwice.pl",
- "krakow.pl",
- "poznan.pl",
- "wroc.pl",
- "zakopane.pl",
- "pantheonsite.io",
- "gotpantheon.com",
- "mypep.link",
- "on-web.fr",
- "*.platform.sh",
- "*.platformsh.site",
- "xen.prgmr.com",
- "priv.at",
- "protonet.io",
- "chirurgiens-dentistes-en-france.fr",
- "byen.site",
- "qa2.com",
- "dev-myqnapcloud.com",
- "alpha-myqnapcloud.com",
- "myqnapcloud.com",
- "*.quipelements.com",
- "vapor.cloud",
- "vaporcloud.io",
- "rackmaze.com",
- "rackmaze.net",
- "rhcloud.com",
- "hzc.io",
- "wellbeingzone.eu",
- "ptplus.fit",
- "wellbeingzone.co.uk",
- "sandcats.io",
- "logoip.de",
- "logoip.com",
- "firewall-gateway.com",
- "firewall-gateway.de",
- "my-gateway.de",
- "my-router.de",
- "spdns.de",
- "spdns.eu",
- "firewall-gateway.net",
- "my-firewall.org",
- "myfirewall.org",
- "spdns.org",
- "*.sensiosite.cloud",
- "biz.ua",
- "co.ua",
- "pp.ua",
- "shiftedit.io",
- "myshopblocks.com",
- "1kapp.com",
- "appchizi.com",
- "applinzi.com",
- "sinaapp.com",
- "vipsinaapp.com",
- "bounty-full.com",
- "alpha.bounty-full.com",
- "beta.bounty-full.com",
- "static.land",
- "dev.static.land",
- "sites.static.land",
- "apps.lair.io",
- "*.stolos.io",
- "spacekit.io",
- "stackspace.space",
- "storj.farm",
- "temp-dns.com",
- "diskstation.me",
- "dscloud.biz",
- "dscloud.me",
- "dscloud.mobi",
- "dsmynas.com",
- "dsmynas.net",
- "dsmynas.org",
- "familyds.com",
- "familyds.net",
- "familyds.org",
- "i234.me",
- "myds.me",
- "synology.me",
- "vpnplus.to",
- "taifun-dns.de",
- "gda.pl",
- "gdansk.pl",
- "gdynia.pl",
- "med.pl",
- "sopot.pl",
- "cust.dev.thingdust.io",
- "cust.disrec.thingdust.io",
- "cust.prod.thingdust.io",
- "cust.testing.thingdust.io",
- "bloxcms.com",
- "townnews-staging.com",
- "12hp.at",
- "2ix.at",
- "4lima.at",
- "lima-city.at",
- "12hp.ch",
- "2ix.ch",
- "4lima.ch",
- "lima-city.ch",
- "trafficplex.cloud",
- "de.cool",
- "12hp.de",
- "2ix.de",
- "4lima.de",
- "lima-city.de",
- "1337.pictures",
- "clan.rip",
- "lima-city.rocks",
- "webspace.rocks",
- "lima.zone",
- "*.transurl.be",
- "*.transurl.eu",
- "*.transurl.nl",
- "tuxfamily.org",
- "dd-dns.de",
- "diskstation.eu",
- "diskstation.org",
- "dray-dns.de",
- "draydns.de",
- "dyn-vpn.de",
- "dynvpn.de",
- "mein-vigor.de",
- "my-vigor.de",
- "my-wan.de",
- "syno-ds.de",
- "synology-diskstation.de",
- "synology-ds.de",
- "uber.space",
- "hk.com",
- "hk.org",
- "ltd.hk",
- "inc.hk",
- "lib.de.us",
- "router.management",
- "v-info.info",
- "wedeploy.io",
- "wedeploy.me",
- "wedeploy.sh",
- "remotewd.com",
- "wmflabs.org",
- "cistron.nl",
- "demon.nl",
- "xs4all.space",
- "yolasite.com",
- "ybo.faith",
- "yombo.me",
- "homelink.one",
- "ybo.party",
- "ybo.review",
- "ybo.science",
- "ybo.trade",
- "za.net",
- "za.org",
- "now.sh",
-}
-
-var nodeLabels = [...]string{
- "aaa",
- "aarp",
- "abarth",
- "abb",
- "abbott",
- "abbvie",
- "abc",
- "able",
- "abogado",
- "abudhabi",
- "ac",
- "academy",
- "accenture",
- "accountant",
- "accountants",
- "aco",
- "active",
- "actor",
- "ad",
- "adac",
- "ads",
- "adult",
- "ae",
- "aeg",
- "aero",
- "aetna",
- "af",
- "afamilycompany",
- "afl",
- "africa",
- "ag",
- "agakhan",
- "agency",
- "ai",
- "aig",
- "aigo",
- "airbus",
- "airforce",
- "airtel",
- "akdn",
- "al",
- "alfaromeo",
- "alibaba",
- "alipay",
- "allfinanz",
- "allstate",
- "ally",
- "alsace",
- "alstom",
- "am",
- "americanexpress",
- "americanfamily",
- "amex",
- "amfam",
- "amica",
- "amsterdam",
- "analytics",
- "android",
- "anquan",
- "anz",
- "ao",
- "aol",
- "apartments",
- "app",
- "apple",
- "aq",
- "aquarelle",
- "ar",
- "arab",
- "aramco",
- "archi",
- "army",
- "arpa",
- "art",
- "arte",
- "as",
- "asda",
- "asia",
- "associates",
- "at",
- "athleta",
- "attorney",
- "au",
- "auction",
- "audi",
- "audible",
- "audio",
- "auspost",
- "author",
- "auto",
- "autos",
- "avianca",
- "aw",
- "aws",
- "ax",
- "axa",
- "az",
- "azure",
- "ba",
- "baby",
- "baidu",
- "banamex",
- "bananarepublic",
- "band",
- "bank",
- "bar",
- "barcelona",
- "barclaycard",
- "barclays",
- "barefoot",
- "bargains",
- "baseball",
- "basketball",
- "bauhaus",
- "bayern",
- "bb",
- "bbc",
- "bbt",
- "bbva",
- "bcg",
- "bcn",
- "bd",
- "be",
- "beats",
- "beauty",
- "beer",
- "bentley",
- "berlin",
- "best",
- "bestbuy",
- "bet",
- "bf",
- "bg",
- "bh",
- "bharti",
- "bi",
- "bible",
- "bid",
- "bike",
- "bing",
- "bingo",
- "bio",
- "biz",
- "bj",
- "black",
- "blackfriday",
- "blanco",
- "blockbuster",
- "blog",
- "bloomberg",
- "blue",
- "bm",
- "bms",
- "bmw",
- "bn",
- "bnl",
- "bnpparibas",
- "bo",
- "boats",
- "boehringer",
- "bofa",
- "bom",
- "bond",
- "boo",
- "book",
- "booking",
- "boots",
- "bosch",
- "bostik",
- "boston",
- "bot",
- "boutique",
- "box",
- "br",
- "bradesco",
- "bridgestone",
- "broadway",
- "broker",
- "brother",
- "brussels",
- "bs",
- "bt",
- "budapest",
- "bugatti",
- "build",
- "builders",
- "business",
- "buy",
- "buzz",
- "bv",
- "bw",
- "by",
- "bz",
- "bzh",
- "ca",
- "cab",
- "cafe",
- "cal",
- "call",
- "calvinklein",
- "cam",
- "camera",
- "camp",
- "cancerresearch",
- "canon",
- "capetown",
- "capital",
- "capitalone",
- "car",
- "caravan",
- "cards",
- "care",
- "career",
- "careers",
- "cars",
- "cartier",
- "casa",
- "case",
- "caseih",
- "cash",
- "casino",
- "cat",
- "catering",
- "catholic",
- "cba",
- "cbn",
- "cbre",
- "cbs",
- "cc",
- "cd",
- "ceb",
- "center",
- "ceo",
- "cern",
- "cf",
- "cfa",
- "cfd",
- "cg",
- "ch",
- "chanel",
- "channel",
- "chase",
- "chat",
- "cheap",
- "chintai",
- "chloe",
- "christmas",
- "chrome",
- "chrysler",
- "church",
- "ci",
- "cipriani",
- "circle",
- "cisco",
- "citadel",
- "citi",
- "citic",
- "city",
- "cityeats",
- "ck",
- "cl",
- "claims",
- "cleaning",
- "click",
- "clinic",
- "clinique",
- "clothing",
- "cloud",
- "club",
- "clubmed",
- "cm",
- "cn",
- "co",
- "coach",
- "codes",
- "coffee",
- "college",
- "cologne",
- "com",
- "comcast",
- "commbank",
- "community",
- "company",
- "compare",
- "computer",
- "comsec",
- "condos",
- "construction",
- "consulting",
- "contact",
- "contractors",
- "cooking",
- "cookingchannel",
- "cool",
- "coop",
- "corsica",
- "country",
- "coupon",
- "coupons",
- "courses",
- "cr",
- "credit",
- "creditcard",
- "creditunion",
- "cricket",
- "crown",
- "crs",
- "cruise",
- "cruises",
- "csc",
- "cu",
- "cuisinella",
- "cv",
- "cw",
- "cx",
- "cy",
- "cymru",
- "cyou",
- "cz",
- "dabur",
- "dad",
- "dance",
- "data",
- "date",
- "dating",
- "datsun",
- "day",
- "dclk",
- "dds",
- "de",
- "deal",
- "dealer",
- "deals",
- "degree",
- "delivery",
- "dell",
- "deloitte",
- "delta",
- "democrat",
- "dental",
- "dentist",
- "desi",
- "design",
- "dev",
- "dhl",
- "diamonds",
- "diet",
- "digital",
- "direct",
- "directory",
- "discount",
- "discover",
- "dish",
- "diy",
- "dj",
- "dk",
- "dm",
- "dnp",
- "do",
- "docs",
- "doctor",
- "dodge",
- "dog",
- "doha",
- "domains",
- "dot",
- "download",
- "drive",
- "dtv",
- "dubai",
- "duck",
- "dunlop",
- "duns",
- "dupont",
- "durban",
- "dvag",
- "dvr",
- "dz",
- "earth",
- "eat",
- "ec",
- "eco",
- "edeka",
- "edu",
- "education",
- "ee",
- "eg",
- "email",
- "emerck",
- "energy",
- "engineer",
- "engineering",
- "enterprises",
- "epost",
- "epson",
- "equipment",
- "er",
- "ericsson",
- "erni",
- "es",
- "esq",
- "estate",
- "esurance",
- "et",
- "etisalat",
- "eu",
- "eurovision",
- "eus",
- "events",
- "everbank",
- "exchange",
- "expert",
- "exposed",
- "express",
- "extraspace",
- "fage",
- "fail",
- "fairwinds",
- "faith",
- "family",
- "fan",
- "fans",
- "farm",
- "farmers",
- "fashion",
- "fast",
- "fedex",
- "feedback",
- "ferrari",
- "ferrero",
- "fi",
- "fiat",
- "fidelity",
- "fido",
- "film",
- "final",
- "finance",
- "financial",
- "fire",
- "firestone",
- "firmdale",
- "fish",
- "fishing",
- "fit",
- "fitness",
- "fj",
- "fk",
- "flickr",
- "flights",
- "flir",
- "florist",
- "flowers",
- "fly",
- "fm",
- "fo",
- "foo",
- "food",
- "foodnetwork",
- "football",
- "ford",
- "forex",
- "forsale",
- "forum",
- "foundation",
- "fox",
- "fr",
- "free",
- "fresenius",
- "frl",
- "frogans",
- "frontdoor",
- "frontier",
- "ftr",
- "fujitsu",
- "fujixerox",
- "fun",
- "fund",
- "furniture",
- "futbol",
- "fyi",
- "ga",
- "gal",
- "gallery",
- "gallo",
- "gallup",
- "game",
- "games",
- "gap",
- "garden",
- "gb",
- "gbiz",
- "gd",
- "gdn",
- "ge",
- "gea",
- "gent",
- "genting",
- "george",
- "gf",
- "gg",
- "ggee",
- "gh",
- "gi",
- "gift",
- "gifts",
- "gives",
- "giving",
- "gl",
- "glade",
- "glass",
- "gle",
- "global",
- "globo",
- "gm",
- "gmail",
- "gmbh",
- "gmo",
- "gmx",
- "gn",
- "godaddy",
- "gold",
- "goldpoint",
- "golf",
- "goo",
- "goodhands",
- "goodyear",
- "goog",
- "google",
- "gop",
- "got",
- "gov",
- "gp",
- "gq",
- "gr",
- "grainger",
- "graphics",
- "gratis",
- "green",
- "gripe",
- "grocery",
- "group",
- "gs",
- "gt",
- "gu",
- "guardian",
- "gucci",
- "guge",
- "guide",
- "guitars",
- "guru",
- "gw",
- "gy",
- "hair",
- "hamburg",
- "hangout",
- "haus",
- "hbo",
- "hdfc",
- "hdfcbank",
- "health",
- "healthcare",
- "help",
- "helsinki",
- "here",
- "hermes",
- "hgtv",
- "hiphop",
- "hisamitsu",
- "hitachi",
- "hiv",
- "hk",
- "hkt",
- "hm",
- "hn",
- "hockey",
- "holdings",
- "holiday",
- "homedepot",
- "homegoods",
- "homes",
- "homesense",
- "honda",
- "honeywell",
- "horse",
- "hospital",
- "host",
- "hosting",
- "hot",
- "hoteles",
- "hotels",
- "hotmail",
- "house",
- "how",
- "hr",
- "hsbc",
- "ht",
- "htc",
- "hu",
- "hughes",
- "hyatt",
- "hyundai",
- "ibm",
- "icbc",
- "ice",
- "icu",
- "id",
- "ie",
- "ieee",
- "ifm",
- "ikano",
- "il",
- "im",
- "imamat",
- "imdb",
- "immo",
- "immobilien",
- "in",
- "industries",
- "infiniti",
- "info",
- "ing",
- "ink",
- "institute",
- "insurance",
- "insure",
- "int",
- "intel",
- "international",
- "intuit",
- "investments",
- "io",
- "ipiranga",
- "iq",
- "ir",
- "irish",
- "is",
- "iselect",
- "ismaili",
- "ist",
- "istanbul",
- "it",
- "itau",
- "itv",
- "iveco",
- "iwc",
- "jaguar",
- "java",
- "jcb",
- "jcp",
- "je",
- "jeep",
- "jetzt",
- "jewelry",
- "jio",
- "jlc",
- "jll",
- "jm",
- "jmp",
- "jnj",
- "jo",
- "jobs",
- "joburg",
- "jot",
- "joy",
- "jp",
- "jpmorgan",
- "jprs",
- "juegos",
- "juniper",
- "kaufen",
- "kddi",
- "ke",
- "kerryhotels",
- "kerrylogistics",
- "kerryproperties",
- "kfh",
- "kg",
- "kh",
- "ki",
- "kia",
- "kim",
- "kinder",
- "kindle",
- "kitchen",
- "kiwi",
- "km",
- "kn",
- "koeln",
- "komatsu",
- "kosher",
- "kp",
- "kpmg",
- "kpn",
- "kr",
- "krd",
- "kred",
- "kuokgroup",
- "kw",
- "ky",
- "kyoto",
- "kz",
- "la",
- "lacaixa",
- "ladbrokes",
- "lamborghini",
- "lamer",
- "lancaster",
- "lancia",
- "lancome",
- "land",
- "landrover",
- "lanxess",
- "lasalle",
- "lat",
- "latino",
- "latrobe",
- "law",
- "lawyer",
- "lb",
- "lc",
- "lds",
- "lease",
- "leclerc",
- "lefrak",
- "legal",
- "lego",
- "lexus",
- "lgbt",
- "li",
- "liaison",
- "lidl",
- "life",
- "lifeinsurance",
- "lifestyle",
- "lighting",
- "like",
- "lilly",
- "limited",
- "limo",
- "lincoln",
- "linde",
- "link",
- "lipsy",
- "live",
- "living",
- "lixil",
- "lk",
- "loan",
- "loans",
- "locker",
- "locus",
- "loft",
- "lol",
- "london",
- "lotte",
- "lotto",
- "love",
- "lpl",
- "lplfinancial",
- "lr",
- "ls",
- "lt",
- "ltd",
- "ltda",
- "lu",
- "lundbeck",
- "lupin",
- "luxe",
- "luxury",
- "lv",
- "ly",
- "ma",
- "macys",
- "madrid",
- "maif",
- "maison",
- "makeup",
- "man",
- "management",
- "mango",
- "map",
- "market",
- "marketing",
- "markets",
- "marriott",
- "marshalls",
- "maserati",
- "mattel",
- "mba",
- "mc",
- "mcd",
- "mcdonalds",
- "mckinsey",
- "md",
- "me",
- "med",
- "media",
- "meet",
- "melbourne",
- "meme",
- "memorial",
- "men",
- "menu",
- "meo",
- "merckmsd",
- "metlife",
- "mg",
- "mh",
- "miami",
- "microsoft",
- "mil",
- "mini",
- "mint",
- "mit",
- "mitsubishi",
- "mk",
- "ml",
- "mlb",
- "mls",
- "mm",
- "mma",
- "mn",
- "mo",
- "mobi",
- "mobile",
- "mobily",
- "moda",
- "moe",
- "moi",
- "mom",
- "monash",
- "money",
- "monster",
- "montblanc",
- "mopar",
- "mormon",
- "mortgage",
- "moscow",
- "moto",
- "motorcycles",
- "mov",
- "movie",
- "movistar",
- "mp",
- "mq",
- "mr",
- "ms",
- "msd",
- "mt",
- "mtn",
- "mtpc",
- "mtr",
- "mu",
- "museum",
- "mutual",
- "mv",
- "mw",
- "mx",
- "my",
- "mz",
- "na",
- "nab",
- "nadex",
- "nagoya",
- "name",
- "nationwide",
- "natura",
- "navy",
- "nba",
- "nc",
- "ne",
- "nec",
- "net",
- "netbank",
- "netflix",
- "network",
- "neustar",
- "new",
- "newholland",
- "news",
- "next",
- "nextdirect",
- "nexus",
- "nf",
- "nfl",
- "ng",
- "ngo",
- "nhk",
- "ni",
- "nico",
- "nike",
- "nikon",
- "ninja",
- "nissan",
- "nissay",
- "nl",
- "no",
- "nokia",
- "northwesternmutual",
- "norton",
- "now",
- "nowruz",
- "nowtv",
- "np",
- "nr",
- "nra",
- "nrw",
- "ntt",
- "nu",
- "nyc",
- "nz",
- "obi",
- "observer",
- "off",
- "office",
- "okinawa",
- "olayan",
- "olayangroup",
- "oldnavy",
- "ollo",
- "om",
- "omega",
- "one",
- "ong",
- "onion",
- "onl",
- "online",
- "onyourside",
- "ooo",
- "open",
- "oracle",
- "orange",
- "org",
- "organic",
- "origins",
- "osaka",
- "otsuka",
- "ott",
- "ovh",
- "pa",
- "page",
- "pamperedchef",
- "panasonic",
- "panerai",
- "paris",
- "pars",
- "partners",
- "parts",
- "party",
- "passagens",
- "pay",
- "pccw",
- "pe",
- "pet",
- "pf",
- "pfizer",
- "pg",
- "ph",
- "pharmacy",
- "phd",
- "philips",
- "phone",
- "photo",
- "photography",
- "photos",
- "physio",
- "piaget",
- "pics",
- "pictet",
- "pictures",
- "pid",
- "pin",
- "ping",
- "pink",
- "pioneer",
- "pizza",
- "pk",
- "pl",
- "place",
- "play",
- "playstation",
- "plumbing",
- "plus",
- "pm",
- "pn",
- "pnc",
- "pohl",
- "poker",
- "politie",
- "porn",
- "post",
- "pr",
- "pramerica",
- "praxi",
- "press",
- "prime",
- "pro",
- "prod",
- "productions",
- "prof",
- "progressive",
- "promo",
- "properties",
- "property",
- "protection",
- "pru",
- "prudential",
- "ps",
- "pt",
- "pub",
- "pw",
- "pwc",
- "py",
- "qa",
- "qpon",
- "quebec",
- "quest",
- "qvc",
- "racing",
- "radio",
- "raid",
- "re",
- "read",
- "realestate",
- "realtor",
- "realty",
- "recipes",
- "red",
- "redstone",
- "redumbrella",
- "rehab",
- "reise",
- "reisen",
- "reit",
- "reliance",
- "ren",
- "rent",
- "rentals",
- "repair",
- "report",
- "republican",
- "rest",
- "restaurant",
- "review",
- "reviews",
- "rexroth",
- "rich",
- "richardli",
- "ricoh",
- "rightathome",
- "ril",
- "rio",
- "rip",
- "rmit",
- "ro",
- "rocher",
- "rocks",
- "rodeo",
- "rogers",
- "room",
- "rs",
- "rsvp",
- "ru",
- "rugby",
- "ruhr",
- "run",
- "rw",
- "rwe",
- "ryukyu",
- "sa",
- "saarland",
- "safe",
- "safety",
- "sakura",
- "sale",
- "salon",
- "samsclub",
- "samsung",
- "sandvik",
- "sandvikcoromant",
- "sanofi",
- "sap",
- "sapo",
- "sarl",
- "sas",
- "save",
- "saxo",
- "sb",
- "sbi",
- "sbs",
- "sc",
- "sca",
- "scb",
- "schaeffler",
- "schmidt",
- "scholarships",
- "school",
- "schule",
- "schwarz",
- "science",
- "scjohnson",
- "scor",
- "scot",
- "sd",
- "se",
- "search",
- "seat",
- "secure",
- "security",
- "seek",
- "select",
- "sener",
- "services",
- "ses",
- "seven",
- "sew",
- "sex",
- "sexy",
- "sfr",
- "sg",
- "sh",
- "shangrila",
- "sharp",
- "shaw",
- "shell",
- "shia",
- "shiksha",
- "shoes",
- "shop",
- "shopping",
- "shouji",
- "show",
- "showtime",
- "shriram",
- "si",
- "silk",
- "sina",
- "singles",
- "site",
- "sj",
- "sk",
- "ski",
- "skin",
- "sky",
- "skype",
- "sl",
- "sling",
- "sm",
- "smart",
- "smile",
- "sn",
- "sncf",
- "so",
- "soccer",
- "social",
- "softbank",
- "software",
- "sohu",
- "solar",
- "solutions",
- "song",
- "sony",
- "soy",
- "space",
- "spiegel",
- "spot",
- "spreadbetting",
- "sr",
- "srl",
- "srt",
- "st",
- "stada",
- "staples",
- "star",
- "starhub",
- "statebank",
- "statefarm",
- "statoil",
- "stc",
- "stcgroup",
- "stockholm",
- "storage",
- "store",
- "stream",
- "studio",
- "study",
- "style",
- "su",
- "sucks",
- "supplies",
- "supply",
- "support",
- "surf",
- "surgery",
- "suzuki",
- "sv",
- "swatch",
- "swiftcover",
- "swiss",
- "sx",
- "sy",
- "sydney",
- "symantec",
- "systems",
- "sz",
- "tab",
- "taipei",
- "talk",
- "taobao",
- "target",
- "tatamotors",
- "tatar",
- "tattoo",
- "tax",
- "taxi",
- "tc",
- "tci",
- "td",
- "tdk",
- "team",
- "tech",
- "technology",
- "tel",
- "telecity",
- "telefonica",
- "temasek",
- "tennis",
- "teva",
- "tf",
- "tg",
- "th",
- "thd",
- "theater",
- "theatre",
- "tiaa",
- "tickets",
- "tienda",
- "tiffany",
- "tips",
- "tires",
- "tirol",
- "tj",
- "tjmaxx",
- "tjx",
- "tk",
- "tkmaxx",
- "tl",
- "tm",
- "tmall",
- "tn",
- "to",
- "today",
- "tokyo",
- "tools",
- "top",
- "toray",
- "toshiba",
- "total",
- "tours",
- "town",
- "toyota",
- "toys",
- "tr",
- "trade",
- "trading",
- "training",
- "travel",
- "travelchannel",
- "travelers",
- "travelersinsurance",
- "trust",
- "trv",
- "tt",
- "tube",
- "tui",
- "tunes",
- "tushu",
- "tv",
- "tvs",
- "tw",
- "tz",
- "ua",
- "ubank",
- "ubs",
- "uconnect",
- "ug",
- "uk",
- "unicom",
- "university",
- "uno",
- "uol",
- "ups",
- "us",
- "uy",
- "uz",
- "va",
- "vacations",
- "vana",
- "vanguard",
- "vc",
- "ve",
- "vegas",
- "ventures",
- "verisign",
- "versicherung",
- "vet",
- "vg",
- "vi",
- "viajes",
- "video",
- "vig",
- "viking",
- "villas",
- "vin",
- "vip",
- "virgin",
- "visa",
- "vision",
- "vista",
- "vistaprint",
- "viva",
- "vivo",
- "vlaanderen",
- "vn",
- "vodka",
- "volkswagen",
- "volvo",
- "vote",
- "voting",
- "voto",
- "voyage",
- "vu",
- "vuelos",
- "wales",
- "walmart",
- "walter",
- "wang",
- "wanggou",
- "warman",
- "watch",
- "watches",
- "weather",
- "weatherchannel",
- "webcam",
- "weber",
- "website",
- "wed",
- "wedding",
- "weibo",
- "weir",
- "wf",
- "whoswho",
- "wien",
- "wiki",
- "williamhill",
- "win",
- "windows",
- "wine",
- "winners",
- "wme",
- "wolterskluwer",
- "woodside",
- "work",
- "works",
- "world",
- "wow",
- "ws",
- "wtc",
- "wtf",
- "xbox",
- "xerox",
- "xfinity",
- "xihuan",
- "xin",
- "xn--11b4c3d",
- "xn--1ck2e1b",
- "xn--1qqw23a",
- "xn--2scrj9c",
- "xn--30rr7y",
- "xn--3bst00m",
- "xn--3ds443g",
- "xn--3e0b707e",
- "xn--3hcrj9c",
- "xn--3oq18vl8pn36a",
- "xn--3pxu8k",
- "xn--42c2d9a",
- "xn--45br5cyl",
- "xn--45brj9c",
- "xn--45q11c",
- "xn--4gbrim",
- "xn--54b7fta0cc",
- "xn--55qw42g",
- "xn--55qx5d",
- "xn--5su34j936bgsg",
- "xn--5tzm5g",
- "xn--6frz82g",
- "xn--6qq986b3xl",
- "xn--80adxhks",
- "xn--80ao21a",
- "xn--80aqecdr1a",
- "xn--80asehdb",
- "xn--80aswg",
- "xn--8y0a063a",
- "xn--90a3ac",
- "xn--90ae",
- "xn--90ais",
- "xn--9dbq2a",
- "xn--9et52u",
- "xn--9krt00a",
- "xn--b4w605ferd",
- "xn--bck1b9a5dre4c",
- "xn--c1avg",
- "xn--c2br7g",
- "xn--cck2b3b",
- "xn--cg4bki",
- "xn--clchc0ea0b2g2a9gcd",
- "xn--czr694b",
- "xn--czrs0t",
- "xn--czru2d",
- "xn--d1acj3b",
- "xn--d1alf",
- "xn--e1a4c",
- "xn--eckvdtc9d",
- "xn--efvy88h",
- "xn--estv75g",
- "xn--fct429k",
- "xn--fhbei",
- "xn--fiq228c5hs",
- "xn--fiq64b",
- "xn--fiqs8s",
- "xn--fiqz9s",
- "xn--fjq720a",
- "xn--flw351e",
- "xn--fpcrj9c3d",
- "xn--fzc2c9e2c",
- "xn--fzys8d69uvgm",
- "xn--g2xx48c",
- "xn--gckr3f0f",
- "xn--gecrj9c",
- "xn--gk3at1e",
- "xn--h2breg3eve",
- "xn--h2brj9c",
- "xn--h2brj9c8c",
- "xn--hxt814e",
- "xn--i1b6b1a6a2e",
- "xn--imr513n",
- "xn--io0a7i",
- "xn--j1aef",
- "xn--j1amh",
- "xn--j6w193g",
- "xn--jlq61u9w7b",
- "xn--jvr189m",
- "xn--kcrx77d1x4a",
- "xn--kprw13d",
- "xn--kpry57d",
- "xn--kpu716f",
- "xn--kput3i",
- "xn--l1acc",
- "xn--lgbbat1ad8j",
- "xn--mgb2ddes",
- "xn--mgb9awbf",
- "xn--mgba3a3ejt",
- "xn--mgba3a4f16a",
- "xn--mgba3a4fra",
- "xn--mgba7c0bbn0a",
- "xn--mgbaakc7dvf",
- "xn--mgbaam7a8h",
- "xn--mgbab2bd",
- "xn--mgbai9a5eva00b",
- "xn--mgbai9azgqp6j",
- "xn--mgbayh7gpa",
- "xn--mgbb9fbpob",
- "xn--mgbbh1a71e",
- "xn--mgbc0a9azcg",
- "xn--mgbca7dzdo",
- "xn--mgberp4a5d4a87g",
- "xn--mgberp4a5d4ar",
- "xn--mgbgu82a",
- "xn--mgbi4ecexp",
- "xn--mgbpl2fh",
- "xn--mgbqly7c0a67fbc",
- "xn--mgbqly7cvafr",
- "xn--mgbt3dhd",
- "xn--mgbtf8fl",
- "xn--mgbtx2b",
- "xn--mgbx4cd0ab",
- "xn--mix082f",
- "xn--mix891f",
- "xn--mk1bu44c",
- "xn--mxtq1m",
- "xn--ngbc5azd",
- "xn--ngbe9e0a",
- "xn--ngbrx",
- "xn--nnx388a",
- "xn--node",
- "xn--nqv7f",
- "xn--nqv7fs00ema",
- "xn--nyqy26a",
- "xn--o3cw4h",
- "xn--ogbpf8fl",
- "xn--p1acf",
- "xn--p1ai",
- "xn--pbt977c",
- "xn--pgbs0dh",
- "xn--pssy2u",
- "xn--q9jyb4c",
- "xn--qcka1pmc",
- "xn--qxam",
- "xn--rhqv96g",
- "xn--rovu88b",
- "xn--rvc1e0am3e",
- "xn--s9brj9c",
- "xn--ses554g",
- "xn--t60b56a",
- "xn--tckwe",
- "xn--tiq49xqyj",
- "xn--unup4y",
- "xn--vermgensberater-ctb",
- "xn--vermgensberatung-pwb",
- "xn--vhquv",
- "xn--vuq861b",
- "xn--w4r85el8fhu5dnra",
- "xn--w4rs40l",
- "xn--wgbh1c",
- "xn--wgbl6a",
- "xn--xhq521b",
- "xn--xkc2al3hye2a",
- "xn--xkc2dl3a5ee0h",
- "xn--y9a3aq",
- "xn--yfro4i67o",
- "xn--ygbi2ammx",
- "xn--zfr164b",
- "xperia",
- "xxx",
- "xyz",
- "yachts",
- "yahoo",
- "yamaxun",
- "yandex",
- "ye",
- "yodobashi",
- "yoga",
- "yokohama",
- "you",
- "youtube",
- "yt",
- "yun",
- "za",
- "zappos",
- "zara",
- "zero",
- "zip",
- "zippo",
- "zm",
- "zone",
- "zuerich",
- "zw",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "nom",
- "ac",
- "blogspot",
- "co",
- "gov",
- "mil",
- "net",
- "nom",
- "org",
- "sch",
- "accident-investigation",
- "accident-prevention",
- "aerobatic",
- "aeroclub",
- "aerodrome",
- "agents",
- "air-surveillance",
- "air-traffic-control",
- "aircraft",
- "airline",
- "airport",
- "airtraffic",
- "ambulance",
- "amusement",
- "association",
- "author",
- "ballooning",
- "broker",
- "caa",
- "cargo",
- "catering",
- "certification",
- "championship",
- "charter",
- "civilaviation",
- "club",
- "conference",
- "consultant",
- "consulting",
- "control",
- "council",
- "crew",
- "design",
- "dgca",
- "educator",
- "emergency",
- "engine",
- "engineer",
- "entertainment",
- "equipment",
- "exchange",
- "express",
- "federation",
- "flight",
- "freight",
- "fuel",
- "gliding",
- "government",
- "groundhandling",
- "group",
- "hanggliding",
- "homebuilt",
- "insurance",
- "journal",
- "journalist",
- "leasing",
- "logistics",
- "magazine",
- "maintenance",
- "media",
- "microlight",
- "modelling",
- "navigation",
- "parachuting",
- "paragliding",
- "passenger-association",
- "pilot",
- "press",
- "production",
- "recreation",
- "repbody",
- "res",
- "research",
- "rotorcraft",
- "safety",
- "scientist",
- "services",
- "show",
- "skydiving",
- "software",
- "student",
- "trader",
- "trading",
- "trainer",
- "union",
- "workinggroup",
- "works",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "co",
- "com",
- "net",
- "nom",
- "org",
- "com",
- "net",
- "nom",
- "off",
- "org",
- "blogspot",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "nom",
- "org",
- "blogspot",
- "co",
- "ed",
- "gv",
- "it",
- "og",
- "pb",
- "com",
- "edu",
- "gob",
- "gov",
- "int",
- "mil",
- "musica",
- "net",
- "org",
- "tur",
- "blogspot",
- "e164",
- "in-addr",
- "ip6",
- "iris",
- "uri",
- "urn",
- "gov",
- "cloudns",
- "12hp",
- "2ix",
- "4lima",
- "ac",
- "biz",
- "co",
- "futurecms",
- "futurehosting",
- "futuremailing",
- "gv",
- "info",
- "lima-city",
- "or",
- "ortsinfo",
- "priv",
- "blogspot",
- "ex",
- "kunden",
- "act",
- "asn",
- "com",
- "conf",
- "edu",
- "gov",
- "id",
- "info",
- "net",
- "nsw",
- "nt",
- "org",
- "oz",
- "qld",
- "sa",
- "tas",
- "vic",
- "wa",
- "blogspot",
- "act",
- "nsw",
- "nt",
- "qld",
- "sa",
- "tas",
- "vic",
- "wa",
- "qld",
- "sa",
- "tas",
- "vic",
- "wa",
- "com",
- "biz",
- "com",
- "edu",
- "gov",
- "info",
- "int",
- "mil",
- "name",
- "net",
- "org",
- "pp",
- "pro",
- "blogspot",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "biz",
- "co",
- "com",
- "edu",
- "gov",
- "info",
- "net",
- "org",
- "store",
- "tv",
- "ac",
- "blogspot",
- "transurl",
- "gov",
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "a",
- "b",
- "barsy",
- "blogspot",
- "c",
- "d",
- "e",
- "f",
- "g",
- "h",
- "i",
- "j",
- "k",
- "l",
- "m",
- "n",
- "o",
- "p",
- "q",
- "r",
- "s",
- "t",
- "u",
- "v",
- "w",
- "x",
- "y",
- "z",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "co",
- "com",
- "edu",
- "or",
- "org",
- "cloudns",
- "dscloud",
- "dyndns",
- "for-better",
- "for-more",
- "for-some",
- "for-the",
- "mmafan",
- "myftp",
- "no-ip",
- "selfip",
- "webhop",
- "asso",
- "barreau",
- "blogspot",
- "gouv",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "com",
- "edu",
- "gob",
- "gov",
- "int",
- "mil",
- "net",
- "org",
- "tv",
- "adm",
- "adv",
- "agr",
- "am",
- "arq",
- "art",
- "ato",
- "b",
- "belem",
- "bio",
- "blog",
- "bmd",
- "cim",
- "cng",
- "cnt",
- "com",
- "coop",
- "cri",
- "def",
- "ecn",
- "eco",
- "edu",
- "emp",
- "eng",
- "esp",
- "etc",
- "eti",
- "far",
- "flog",
- "floripa",
- "fm",
- "fnd",
- "fot",
- "fst",
- "g12",
- "ggf",
- "gov",
- "imb",
- "ind",
- "inf",
- "jampa",
- "jor",
- "jus",
- "leg",
- "lel",
- "mat",
- "med",
- "mil",
- "mp",
- "mus",
- "net",
- "nom",
- "not",
- "ntr",
- "odo",
- "org",
- "poa",
- "ppg",
- "pro",
- "psc",
- "psi",
- "qsl",
- "radio",
- "rec",
- "recife",
- "slg",
- "srv",
- "taxi",
- "teo",
- "tmp",
- "trd",
- "tur",
- "tv",
- "vet",
- "vix",
- "vlog",
- "wiki",
- "zlg",
- "blogspot",
- "ac",
- "al",
- "am",
- "ap",
- "ba",
- "ce",
- "df",
- "es",
- "go",
- "ma",
- "mg",
- "ms",
- "mt",
- "pa",
- "pb",
- "pe",
- "pi",
- "pr",
- "rj",
- "rn",
- "ro",
- "rr",
- "rs",
- "sc",
- "se",
- "sp",
- "to",
- "ac",
- "al",
- "am",
- "ap",
- "ba",
- "ce",
- "df",
- "es",
- "go",
- "ma",
- "mg",
- "ms",
- "mt",
- "pa",
- "pb",
- "pe",
- "pi",
- "pr",
- "rj",
- "rn",
- "ro",
- "rr",
- "rs",
- "sc",
- "se",
- "sp",
- "to",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "we",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "co",
- "org",
- "com",
- "gov",
- "mil",
- "nym",
- "of",
- "blogspot",
- "com",
- "edu",
- "gov",
- "net",
- "nym",
- "org",
- "za",
- "ab",
- "awdev",
- "bc",
- "blogspot",
- "co",
- "gc",
- "mb",
- "nb",
- "nf",
- "nl",
- "no-ip",
- "ns",
- "nt",
- "nu",
- "on",
- "pe",
- "qc",
- "sk",
- "yk",
- "cloudns",
- "fantasyleague",
- "ftpaccess",
- "game-server",
- "myphotos",
- "scrapping",
- "twmail",
- "gov",
- "blogspot",
- "12hp",
- "2ix",
- "4lima",
- "blogspot",
- "gotdns",
- "lima-city",
- "square7",
- "ac",
- "asso",
- "co",
- "com",
- "ed",
- "edu",
- "go",
- "gouv",
- "int",
- "md",
- "net",
- "or",
- "org",
- "presse",
- "xn--aroport-bya",
- "www",
- "blogspot",
- "co",
- "gob",
- "gov",
- "mil",
- "nom",
- "magentosite",
- "myfusion",
- "sensiosite",
- "statics",
- "trafficplex",
- "vapor",
- "cloudns",
- "co",
- "com",
- "gov",
- "net",
- "ac",
- "ah",
- "bj",
- "com",
- "cq",
- "edu",
- "fj",
- "gd",
- "gov",
- "gs",
- "gx",
- "gz",
- "ha",
- "hb",
- "he",
- "hi",
- "hk",
- "hl",
- "hn",
- "jl",
- "js",
- "jx",
- "ln",
- "mil",
- "mo",
- "net",
- "nm",
- "nx",
- "org",
- "qh",
- "sc",
- "sd",
- "sh",
- "sn",
- "sx",
- "tj",
- "tw",
- "xj",
- "xn--55qx5d",
- "xn--io0a7i",
- "xn--od0alg",
- "xz",
- "yn",
- "zj",
- "amazonaws",
- "cn-north-1",
- "compute",
- "eb",
- "elb",
- "s3",
- "cn-north-1",
- "arts",
- "com",
- "edu",
- "firm",
- "gov",
- "info",
- "int",
- "mil",
- "net",
- "nodum",
- "nom",
- "org",
- "rec",
- "web",
- "blogspot",
- "0emm",
- "1kapp",
- "3utilities",
- "4u",
- "africa",
- "alpha-myqnapcloud",
- "amazonaws",
- "appchizi",
- "applinzi",
- "appspot",
- "ar",
- "barsyonline",
- "betainabox",
- "bitballoon",
- "blogdns",
- "blogspot",
- "blogsyte",
- "bloxcms",
- "bounty-full",
- "bplaced",
- "br",
- "cechire",
- "ciscofreak",
- "cloudcontrolapp",
- "cloudcontrolled",
- "cn",
- "co",
- "codespot",
- "damnserver",
- "ddnsfree",
- "ddnsgeek",
- "ddnsking",
- "de",
- "dev-myqnapcloud",
- "ditchyourip",
- "dnsalias",
- "dnsdojo",
- "dnsiskinky",
- "doesntexist",
- "dontexist",
- "doomdns",
- "drayddns",
- "dreamhosters",
- "dsmynas",
- "dyn-o-saur",
- "dynalias",
- "dyndns-at-home",
- "dyndns-at-work",
- "dyndns-blog",
- "dyndns-free",
- "dyndns-home",
- "dyndns-ip",
- "dyndns-mail",
- "dyndns-office",
- "dyndns-pics",
- "dyndns-remote",
- "dyndns-server",
- "dyndns-web",
- "dyndns-wiki",
- "dyndns-work",
- "dynns",
- "elasticbeanstalk",
- "est-a-la-maison",
- "est-a-la-masion",
- "est-le-patron",
- "est-mon-blogueur",
- "eu",
- "evennode",
- "familyds",
- "fbsbx",
- "firebaseapp",
- "firewall-gateway",
- "flynnhub",
- "freebox-os",
- "freeboxos",
- "from-ak",
- "from-al",
- "from-ar",
- "from-ca",
- "from-ct",
- "from-dc",
- "from-de",
- "from-fl",
- "from-ga",
- "from-hi",
- "from-ia",
- "from-id",
- "from-il",
- "from-in",
- "from-ks",
- "from-ky",
- "from-ma",
- "from-md",
- "from-mi",
- "from-mn",
- "from-mo",
- "from-ms",
- "from-mt",
- "from-nc",
- "from-nd",
- "from-ne",
- "from-nh",
- "from-nj",
- "from-nm",
- "from-nv",
- "from-oh",
- "from-ok",
- "from-or",
- "from-pa",
- "from-pr",
- "from-ri",
- "from-sc",
- "from-sd",
- "from-tn",
- "from-tx",
- "from-ut",
- "from-va",
- "from-vt",
- "from-wa",
- "from-wi",
- "from-wv",
- "from-wy",
- "gb",
- "geekgalaxy",
- "getmyip",
- "giize",
- "githubusercontent",
- "gleeze",
- "googleapis",
- "googlecode",
- "gotdns",
- "gotpantheon",
- "gr",
- "health-carereform",
- "herokuapp",
- "herokussl",
- "hk",
- "hobby-site",
- "homelinux",
- "homesecuritymac",
- "homesecuritypc",
- "homeunix",
- "hu",
- "iamallama",
- "is-a-anarchist",
- "is-a-blogger",
- "is-a-bookkeeper",
- "is-a-bulls-fan",
- "is-a-caterer",
- "is-a-chef",
- "is-a-conservative",
- "is-a-cpa",
- "is-a-cubicle-slave",
- "is-a-democrat",
- "is-a-designer",
- "is-a-doctor",
- "is-a-financialadvisor",
- "is-a-geek",
- "is-a-green",
- "is-a-guru",
- "is-a-hard-worker",
- "is-a-hunter",
- "is-a-landscaper",
- "is-a-lawyer",
- "is-a-liberal",
- "is-a-libertarian",
- "is-a-llama",
- "is-a-musician",
- "is-a-nascarfan",
- "is-a-nurse",
- "is-a-painter",
- "is-a-personaltrainer",
- "is-a-photographer",
- "is-a-player",
- "is-a-republican",
- "is-a-rockstar",
- "is-a-socialist",
- "is-a-student",
- "is-a-teacher",
- "is-a-techie",
- "is-a-therapist",
- "is-an-accountant",
- "is-an-actor",
- "is-an-actress",
- "is-an-anarchist",
- "is-an-artist",
- "is-an-engineer",
- "is-an-entertainer",
- "is-certified",
- "is-gone",
- "is-into-anime",
- "is-into-cars",
- "is-into-cartoons",
- "is-into-games",
- "is-leet",
- "is-not-certified",
- "is-slick",
- "is-uberleet",
- "is-with-theband",
- "isa-geek",
- "isa-hockeynut",
- "issmarterthanyou",
- "jdevcloud",
- "joyent",
- "jpn",
- "kozow",
- "kr",
- "likes-pie",
- "likescandy",
- "logoip",
- "loseyourip",
- "meteorapp",
- "mex",
- "myactivedirectory",
- "myasustor",
- "mydrobo",
- "myqnapcloud",
- "mysecuritycamera",
- "myshopblocks",
- "mytuleap",
- "myvnc",
- "neat-url",
- "net-freaks",
- "netlify",
- "nfshost",
- "no",
- "on-aptible",
- "onthewifi",
- "ooguy",
- "operaunite",
- "outsystemscloud",
- "ownprovider",
- "pagefrontapp",
- "pagespeedmobilizer",
- "pgfog",
- "pixolino",
- "point2this",
- "prgmr",
- "publishproxy",
- "qa2",
- "qc",
- "quicksytes",
- "quipelements",
- "rackmaze",
- "remotewd",
- "rhcloud",
- "ru",
- "sa",
- "saves-the-whales",
- "se",
- "securitytactics",
- "selfip",
- "sells-for-less",
- "sells-for-u",
- "servebbs",
- "servebeer",
- "servecounterstrike",
- "serveexchange",
- "serveftp",
- "servegame",
- "servehalflife",
- "servehttp",
- "servehumour",
- "serveirc",
- "servemp3",
- "servep2p",
- "servepics",
- "servequake",
- "servesarcasm",
- "simple-url",
- "sinaapp",
- "space-to-rent",
- "stufftoread",
- "teaches-yoga",
- "temp-dns",
- "theworkpc",
- "townnews-staging",
- "uk",
- "unusualperson",
- "us",
- "uy",
- "vipsinaapp",
- "withgoogle",
- "withyoutube",
- "workisboring",
- "wpdevcloud",
- "writesthisblog",
- "xenapponazure",
- "yolasite",
- "za",
- "ap-northeast-1",
- "ap-northeast-2",
- "ap-south-1",
- "ap-southeast-1",
- "ap-southeast-2",
- "ca-central-1",
- "compute",
- "compute-1",
- "elb",
- "eu-central-1",
- "eu-west-1",
- "eu-west-2",
- "s3",
- "s3-ap-northeast-1",
- "s3-ap-northeast-2",
- "s3-ap-south-1",
- "s3-ap-southeast-1",
- "s3-ap-southeast-2",
- "s3-ca-central-1",
- "s3-eu-central-1",
- "s3-eu-west-1",
- "s3-eu-west-2",
- "s3-external-1",
- "s3-fips-us-gov-west-1",
- "s3-sa-east-1",
- "s3-us-east-2",
- "s3-us-gov-west-1",
- "s3-us-west-1",
- "s3-us-west-2",
- "s3-website-ap-northeast-1",
- "s3-website-ap-southeast-1",
- "s3-website-ap-southeast-2",
- "s3-website-eu-west-1",
- "s3-website-sa-east-1",
- "s3-website-us-east-1",
- "s3-website-us-west-1",
- "s3-website-us-west-2",
- "sa-east-1",
- "us-east-1",
- "us-east-2",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "dualstack",
- "s3",
- "s3-website",
- "s3",
- "alpha",
- "beta",
- "ap-northeast-1",
- "ap-northeast-2",
- "ap-south-1",
- "ap-southeast-1",
- "ap-southeast-2",
- "ca-central-1",
- "eu-central-1",
- "eu-west-1",
- "eu-west-2",
- "sa-east-1",
- "us-east-1",
- "us-east-2",
- "us-gov-west-1",
- "us-west-1",
- "us-west-2",
- "eu-1",
- "eu-2",
- "eu-3",
- "eu-4",
- "us-1",
- "us-2",
- "us-3",
- "us-4",
- "apps",
- "cns",
- "eu",
- "xen",
- "de",
- "ac",
- "co",
- "ed",
- "fi",
- "go",
- "or",
- "sa",
- "com",
- "edu",
- "gov",
- "inf",
- "net",
- "org",
- "blogspot",
- "com",
- "edu",
- "net",
- "org",
- "ath",
- "gov",
- "info",
- "ac",
- "biz",
- "com",
- "ekloges",
- "gov",
- "ltd",
- "name",
- "net",
- "org",
- "parliament",
- "press",
- "pro",
- "tm",
- "blogspot",
- "blogspot",
- "co",
- "e4",
- "metacentrum",
- "realm",
- "cloud",
- "custom",
- "12hp",
- "2ix",
- "4lima",
- "barsy",
- "blogspot",
- "bplaced",
- "com",
- "cosidns",
- "dd-dns",
- "ddnss",
- "dnshome",
- "dnsupdater",
- "dray-dns",
- "draydns",
- "dyn-ip24",
- "dyn-vpn",
- "dynamisches-dns",
- "dyndns1",
- "dynvpn",
- "firewall-gateway",
- "fuettertdasnetz",
- "git-repos",
- "goip",
- "home-webserver",
- "internet-dns",
- "isteingeek",
- "istmein",
- "keymachine",
- "l-o-g-i-n",
- "lcube-server",
- "lebtimnetz",
- "leitungsen",
- "lima-city",
- "logoip",
- "mein-vigor",
- "my-gateway",
- "my-router",
- "my-vigor",
- "my-wan",
- "myhome-server",
- "spdns",
- "square7",
- "svn-repos",
- "syno-ds",
- "synology-diskstation",
- "synology-ds",
- "taifun-dns",
- "traeumtgerade",
- "dyn",
- "dyn",
- "dyndns",
- "dyn",
- "biz",
- "blogspot",
- "co",
- "firm",
- "reg",
- "store",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "art",
- "com",
- "edu",
- "gob",
- "gov",
- "mil",
- "net",
- "org",
- "sld",
- "web",
- "art",
- "asso",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "pol",
- "com",
- "edu",
- "fin",
- "gob",
- "gov",
- "info",
- "k12",
- "med",
- "mil",
- "net",
- "org",
- "pro",
- "aip",
- "com",
- "edu",
- "fie",
- "gov",
- "lib",
- "med",
- "org",
- "pri",
- "riik",
- "blogspot",
- "com",
- "edu",
- "eun",
- "gov",
- "mil",
- "name",
- "net",
- "org",
- "sci",
- "blogspot",
- "com",
- "edu",
- "gob",
- "nom",
- "org",
- "blogspot",
- "compute",
- "biz",
- "com",
- "edu",
- "gov",
- "info",
- "name",
- "net",
- "org",
- "barsy",
- "cloudns",
- "diskstation",
- "mycd",
- "spdns",
- "transurl",
- "wellbeingzone",
- "party",
- "user",
- "ybo",
- "storj",
- "aland",
- "blogspot",
- "dy",
- "iki",
- "ptplus",
- "aeroport",
- "assedic",
- "asso",
- "avocat",
- "avoues",
- "blogspot",
- "cci",
- "chambagri",
- "chirurgiens-dentistes",
- "chirurgiens-dentistes-en-france",
- "com",
- "experts-comptables",
- "fbx-os",
- "fbxos",
- "freebox-os",
- "freeboxos",
- "geometre-expert",
- "gouv",
- "greta",
- "huissier-justice",
- "medecin",
- "nom",
- "notaires",
- "on-web",
- "pharmacien",
- "port",
- "prd",
- "presse",
- "tm",
- "veterinaire",
- "nom",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "pvt",
- "co",
- "cya",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "mil",
- "org",
- "com",
- "edu",
- "gov",
- "ltd",
- "mod",
- "org",
- "co",
- "com",
- "edu",
- "net",
- "nom",
- "org",
- "ac",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "cloud",
- "asso",
- "com",
- "edu",
- "mobi",
- "net",
- "org",
- "blogspot",
- "com",
- "edu",
- "gov",
- "net",
- "nym",
- "org",
- "com",
- "edu",
- "gob",
- "ind",
- "mil",
- "net",
- "nom",
- "org",
- "co",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "blogspot",
- "com",
- "edu",
- "gov",
- "idv",
- "inc",
- "ltd",
- "net",
- "org",
- "xn--55qx5d",
- "xn--ciqpn",
- "xn--gmq050i",
- "xn--gmqw5a",
- "xn--io0a7i",
- "xn--lcvr32d",
- "xn--mk0axi",
- "xn--mxtq1m",
- "xn--od0alg",
- "xn--od0aq3b",
- "xn--tn0ag",
- "xn--uc0atv",
- "xn--uc0ay4a",
- "xn--wcvs22d",
- "xn--zf0avx",
- "com",
- "edu",
- "gob",
- "mil",
- "net",
- "nom",
- "org",
- "cloudaccess",
- "freesite",
- "opencraft",
- "blogspot",
- "com",
- "from",
- "iz",
- "name",
- "adult",
- "art",
- "asso",
- "com",
- "coop",
- "edu",
- "firm",
- "gouv",
- "info",
- "med",
- "net",
- "org",
- "perso",
- "pol",
- "pro",
- "rel",
- "shop",
- "2000",
- "agrar",
- "blogspot",
- "bolt",
- "casino",
- "city",
- "co",
- "erotica",
- "erotika",
- "film",
- "forum",
- "games",
- "hotel",
- "info",
- "ingatlan",
- "jogasz",
- "konyvelo",
- "lakas",
- "media",
- "news",
- "org",
- "priv",
- "reklam",
- "sex",
- "shop",
- "sport",
- "suli",
- "szex",
- "tm",
- "tozsde",
- "utazas",
- "video",
- "ac",
- "biz",
- "co",
- "desa",
- "go",
- "mil",
- "my",
- "net",
- "or",
- "sch",
- "web",
- "blogspot",
- "blogspot",
- "gov",
- "ac",
- "co",
- "gov",
- "idf",
- "k12",
- "muni",
- "net",
- "org",
- "blogspot",
- "ac",
- "co",
- "com",
- "net",
- "nom",
- "org",
- "ro",
- "tt",
- "tv",
- "ltd",
- "plc",
- "ac",
- "barsy",
- "blogspot",
- "cloudns",
- "co",
- "edu",
- "firm",
- "gen",
- "gov",
- "ind",
- "mil",
- "net",
- "nic",
- "org",
- "res",
- "barrel-of-knowledge",
- "barrell-of-knowledge",
- "cloudns",
- "dvrcam",
- "dynamic-dns",
- "dyndns",
- "for-our",
- "groks-the",
- "groks-this",
- "here-for-more",
- "ilovecollege",
- "knowsitall",
- "no-ip",
- "nsupdate",
- "selfip",
- "v-info",
- "webhop",
- "eu",
- "backplaneapp",
- "boxfuse",
- "browsersafetymark",
- "com",
- "dedyn",
- "definima",
- "drud",
- "enonic",
- "github",
- "gitlab",
- "hasura-app",
- "hzc",
- "lair",
- "ngrok",
- "nid",
- "nodeart",
- "nodum",
- "pantheonsite",
- "protonet",
- "sandcats",
- "shiftedit",
- "spacekit",
- "stolos",
- "thingdust",
- "vaporcloud",
- "wedeploy",
- "customer",
- "apps",
- "stage",
- "dev",
- "disrec",
- "prod",
- "testing",
- "cust",
- "cust",
- "cust",
- "cust",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "ac",
- "co",
- "gov",
- "id",
- "net",
- "org",
- "sch",
- "xn--mgba3a4f16a",
- "xn--mgba3a4fra",
- "blogspot",
- "com",
- "cupcake",
- "edu",
- "gov",
- "int",
- "net",
- "org",
- "abr",
- "abruzzo",
- "ag",
- "agrigento",
- "al",
- "alessandria",
- "alto-adige",
- "altoadige",
- "an",
- "ancona",
- "andria-barletta-trani",
- "andria-trani-barletta",
- "andriabarlettatrani",
- "andriatranibarletta",
- "ao",
- "aosta",
- "aosta-valley",
- "aostavalley",
- "aoste",
- "ap",
- "aq",
- "aquila",
- "ar",
- "arezzo",
- "ascoli-piceno",
- "ascolipiceno",
- "asti",
- "at",
- "av",
- "avellino",
- "ba",
- "balsan",
- "bari",
- "barletta-trani-andria",
- "barlettatraniandria",
- "bas",
- "basilicata",
- "belluno",
- "benevento",
- "bergamo",
- "bg",
- "bi",
- "biella",
- "bl",
- "blogspot",
- "bn",
- "bo",
- "bologna",
- "bolzano",
- "bozen",
- "br",
- "brescia",
- "brindisi",
- "bs",
- "bt",
- "bz",
- "ca",
- "cagliari",
- "cal",
- "calabria",
- "caltanissetta",
- "cam",
- "campania",
- "campidano-medio",
- "campidanomedio",
- "campobasso",
- "carbonia-iglesias",
- "carboniaiglesias",
- "carrara-massa",
- "carraramassa",
- "caserta",
- "catania",
- "catanzaro",
- "cb",
- "ce",
- "cesena-forli",
- "cesenaforli",
- "ch",
- "chieti",
- "ci",
- "cl",
- "cn",
- "co",
- "como",
- "cosenza",
- "cr",
- "cremona",
- "crotone",
- "cs",
- "ct",
- "cuneo",
- "cz",
- "dell-ogliastra",
- "dellogliastra",
- "edu",
- "emilia-romagna",
- "emiliaromagna",
- "emr",
- "en",
- "enna",
- "fc",
- "fe",
- "fermo",
- "ferrara",
- "fg",
- "fi",
- "firenze",
- "florence",
- "fm",
- "foggia",
- "forli-cesena",
- "forlicesena",
- "fr",
- "friuli-v-giulia",
- "friuli-ve-giulia",
- "friuli-vegiulia",
- "friuli-venezia-giulia",
- "friuli-veneziagiulia",
- "friuli-vgiulia",
- "friuliv-giulia",
- "friulive-giulia",
- "friulivegiulia",
- "friulivenezia-giulia",
- "friuliveneziagiulia",
- "friulivgiulia",
- "frosinone",
- "fvg",
- "ge",
- "genoa",
- "genova",
- "go",
- "gorizia",
- "gov",
- "gr",
- "grosseto",
- "iglesias-carbonia",
- "iglesiascarbonia",
- "im",
- "imperia",
- "is",
- "isernia",
- "kr",
- "la-spezia",
- "laquila",
- "laspezia",
- "latina",
- "laz",
- "lazio",
- "lc",
- "le",
- "lecce",
- "lecco",
- "li",
- "lig",
- "liguria",
- "livorno",
- "lo",
- "lodi",
- "lom",
- "lombardia",
- "lombardy",
- "lt",
- "lu",
- "lucania",
- "lucca",
- "macerata",
- "mantova",
- "mar",
- "marche",
- "massa-carrara",
- "massacarrara",
- "matera",
- "mb",
- "mc",
- "me",
- "medio-campidano",
- "mediocampidano",
- "messina",
- "mi",
- "milan",
- "milano",
- "mn",
- "mo",
- "modena",
- "mol",
- "molise",
- "monza",
- "monza-brianza",
- "monza-e-della-brianza",
- "monzabrianza",
- "monzaebrianza",
- "monzaedellabrianza",
- "ms",
- "mt",
- "na",
- "naples",
- "napoli",
- "no",
- "novara",
- "nu",
- "nuoro",
- "og",
- "ogliastra",
- "olbia-tempio",
- "olbiatempio",
- "or",
- "oristano",
- "ot",
- "pa",
- "padova",
- "padua",
- "palermo",
- "parma",
- "pavia",
- "pc",
- "pd",
- "pe",
- "perugia",
- "pesaro-urbino",
- "pesarourbino",
- "pescara",
- "pg",
- "pi",
- "piacenza",
- "piedmont",
- "piemonte",
- "pisa",
- "pistoia",
- "pmn",
- "pn",
- "po",
- "pordenone",
- "potenza",
- "pr",
- "prato",
- "pt",
- "pu",
- "pug",
- "puglia",
- "pv",
- "pz",
- "ra",
- "ragusa",
- "ravenna",
- "rc",
- "re",
- "reggio-calabria",
- "reggio-emilia",
- "reggiocalabria",
- "reggioemilia",
- "rg",
- "ri",
- "rieti",
- "rimini",
- "rm",
- "rn",
- "ro",
- "roma",
- "rome",
- "rovigo",
- "sa",
- "salerno",
- "sar",
- "sardegna",
- "sardinia",
- "sassari",
- "savona",
- "si",
- "sic",
- "sicilia",
- "sicily",
- "siena",
- "siracusa",
- "so",
- "sondrio",
- "sp",
- "sr",
- "ss",
- "suedtirol",
- "sv",
- "ta",
- "taa",
- "taranto",
- "te",
- "tempio-olbia",
- "tempioolbia",
- "teramo",
- "terni",
- "tn",
- "to",
- "torino",
- "tos",
- "toscana",
- "tp",
- "tr",
- "trani-andria-barletta",
- "trani-barletta-andria",
- "traniandriabarletta",
- "tranibarlettaandria",
- "trapani",
- "trentino",
- "trentino-a-adige",
- "trentino-aadige",
- "trentino-alto-adige",
- "trentino-altoadige",
- "trentino-s-tirol",
- "trentino-stirol",
- "trentino-sud-tirol",
- "trentino-sudtirol",
- "trentino-sued-tirol",
- "trentino-suedtirol",
- "trentinoa-adige",
- "trentinoaadige",
- "trentinoalto-adige",
- "trentinoaltoadige",
- "trentinos-tirol",
- "trentinostirol",
- "trentinosud-tirol",
- "trentinosudtirol",
- "trentinosued-tirol",
- "trentinosuedtirol",
- "trento",
- "treviso",
- "trieste",
- "ts",
- "turin",
- "tuscany",
- "tv",
- "ud",
- "udine",
- "umb",
- "umbria",
- "urbino-pesaro",
- "urbinopesaro",
- "va",
- "val-d-aosta",
- "val-daosta",
- "vald-aosta",
- "valdaosta",
- "valle-aosta",
- "valle-d-aosta",
- "valle-daosta",
- "valleaosta",
- "valled-aosta",
- "valledaosta",
- "vallee-aoste",
- "valleeaoste",
- "vao",
- "varese",
- "vb",
- "vc",
- "vda",
- "ve",
- "ven",
- "veneto",
- "venezia",
- "venice",
- "verbania",
- "vercelli",
- "verona",
- "vi",
- "vibo-valentia",
- "vibovalentia",
- "vicenza",
- "viterbo",
- "vr",
- "vs",
- "vt",
- "vv",
- "co",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "mil",
- "name",
- "net",
- "org",
- "sch",
- "ac",
- "ad",
- "aichi",
- "akita",
- "aomori",
- "blogspot",
- "chiba",
- "co",
- "ed",
- "ehime",
- "fukui",
- "fukuoka",
- "fukushima",
- "gifu",
- "go",
- "gr",
- "gunma",
- "hiroshima",
- "hokkaido",
- "hyogo",
- "ibaraki",
- "ishikawa",
- "iwate",
- "kagawa",
- "kagoshima",
- "kanagawa",
- "kawasaki",
- "kitakyushu",
- "kobe",
- "kochi",
- "kumamoto",
- "kyoto",
- "lg",
- "mie",
- "miyagi",
- "miyazaki",
- "nagano",
- "nagasaki",
- "nagoya",
- "nara",
- "ne",
- "niigata",
- "oita",
- "okayama",
- "okinawa",
- "or",
- "osaka",
- "saga",
- "saitama",
- "sapporo",
- "sendai",
- "shiga",
- "shimane",
- "shizuoka",
- "tochigi",
- "tokushima",
- "tokyo",
- "tottori",
- "toyama",
- "wakayama",
- "xn--0trq7p7nn",
- "xn--1ctwo",
- "xn--1lqs03n",
- "xn--1lqs71d",
- "xn--2m4a15e",
- "xn--32vp30h",
- "xn--4it168d",
- "xn--4it797k",
- "xn--4pvxs",
- "xn--5js045d",
- "xn--5rtp49c",
- "xn--5rtq34k",
- "xn--6btw5a",
- "xn--6orx2r",
- "xn--7t0a264c",
- "xn--8ltr62k",
- "xn--8pvr4u",
- "xn--c3s14m",
- "xn--d5qv7z876c",
- "xn--djrs72d6uy",
- "xn--djty4k",
- "xn--efvn9s",
- "xn--ehqz56n",
- "xn--elqq16h",
- "xn--f6qx53a",
- "xn--k7yn95e",
- "xn--kbrq7o",
- "xn--klt787d",
- "xn--kltp7d",
- "xn--kltx9a",
- "xn--klty5x",
- "xn--mkru45i",
- "xn--nit225k",
- "xn--ntso0iqx3a",
- "xn--ntsq17g",
- "xn--pssu33l",
- "xn--qqqt11m",
- "xn--rht27z",
- "xn--rht3d",
- "xn--rht61e",
- "xn--rny31h",
- "xn--tor131o",
- "xn--uist22h",
- "xn--uisz3g",
- "xn--uuwu58a",
- "xn--vgu402c",
- "xn--zbx025d",
- "yamagata",
- "yamaguchi",
- "yamanashi",
- "yokohama",
- "aisai",
- "ama",
- "anjo",
- "asuke",
- "chiryu",
- "chita",
- "fuso",
- "gamagori",
- "handa",
- "hazu",
- "hekinan",
- "higashiura",
- "ichinomiya",
- "inazawa",
- "inuyama",
- "isshiki",
- "iwakura",
- "kanie",
- "kariya",
- "kasugai",
- "kira",
- "kiyosu",
- "komaki",
- "konan",
- "kota",
- "mihama",
- "miyoshi",
- "nishio",
- "nisshin",
- "obu",
- "oguchi",
- "oharu",
- "okazaki",
- "owariasahi",
- "seto",
- "shikatsu",
- "shinshiro",
- "shitara",
- "tahara",
- "takahama",
- "tobishima",
- "toei",
- "togo",
- "tokai",
- "tokoname",
- "toyoake",
- "toyohashi",
- "toyokawa",
- "toyone",
- "toyota",
- "tsushima",
- "yatomi",
- "akita",
- "daisen",
- "fujisato",
- "gojome",
- "hachirogata",
- "happou",
- "higashinaruse",
- "honjo",
- "honjyo",
- "ikawa",
- "kamikoani",
- "kamioka",
- "katagami",
- "kazuno",
- "kitaakita",
- "kosaka",
- "kyowa",
- "misato",
- "mitane",
- "moriyoshi",
- "nikaho",
- "noshiro",
- "odate",
- "oga",
- "ogata",
- "semboku",
- "yokote",
- "yurihonjo",
- "aomori",
- "gonohe",
- "hachinohe",
- "hashikami",
- "hiranai",
- "hirosaki",
- "itayanagi",
- "kuroishi",
- "misawa",
- "mutsu",
- "nakadomari",
- "noheji",
- "oirase",
- "owani",
- "rokunohe",
- "sannohe",
- "shichinohe",
- "shingo",
- "takko",
- "towada",
- "tsugaru",
- "tsuruta",
- "abiko",
- "asahi",
- "chonan",
- "chosei",
- "choshi",
- "chuo",
- "funabashi",
- "futtsu",
- "hanamigawa",
- "ichihara",
- "ichikawa",
- "ichinomiya",
- "inzai",
- "isumi",
- "kamagaya",
- "kamogawa",
- "kashiwa",
- "katori",
- "katsuura",
- "kimitsu",
- "kisarazu",
- "kozaki",
- "kujukuri",
- "kyonan",
- "matsudo",
- "midori",
- "mihama",
- "minamiboso",
- "mobara",
- "mutsuzawa",
- "nagara",
- "nagareyama",
- "narashino",
- "narita",
- "noda",
- "oamishirasato",
- "omigawa",
- "onjuku",
- "otaki",
- "sakae",
- "sakura",
- "shimofusa",
- "shirako",
- "shiroi",
- "shisui",
- "sodegaura",
- "sosa",
- "tako",
- "tateyama",
- "togane",
- "tohnosho",
- "tomisato",
- "urayasu",
- "yachimata",
- "yachiyo",
- "yokaichiba",
- "yokoshibahikari",
- "yotsukaido",
- "ainan",
- "honai",
- "ikata",
- "imabari",
- "iyo",
- "kamijima",
- "kihoku",
- "kumakogen",
- "masaki",
- "matsuno",
- "matsuyama",
- "namikata",
- "niihama",
- "ozu",
- "saijo",
- "seiyo",
- "shikokuchuo",
- "tobe",
- "toon",
- "uchiko",
- "uwajima",
- "yawatahama",
- "echizen",
- "eiheiji",
- "fukui",
- "ikeda",
- "katsuyama",
- "mihama",
- "minamiechizen",
- "obama",
- "ohi",
- "ono",
- "sabae",
- "sakai",
- "takahama",
- "tsuruga",
- "wakasa",
- "ashiya",
- "buzen",
- "chikugo",
- "chikuho",
- "chikujo",
- "chikushino",
- "chikuzen",
- "chuo",
- "dazaifu",
- "fukuchi",
- "hakata",
- "higashi",
- "hirokawa",
- "hisayama",
- "iizuka",
- "inatsuki",
- "kaho",
- "kasuga",
- "kasuya",
- "kawara",
- "keisen",
- "koga",
- "kurate",
- "kurogi",
- "kurume",
- "minami",
- "miyako",
- "miyama",
- "miyawaka",
- "mizumaki",
- "munakata",
- "nakagawa",
- "nakama",
- "nishi",
- "nogata",
- "ogori",
- "okagaki",
- "okawa",
- "oki",
- "omuta",
- "onga",
- "onojo",
- "oto",
- "saigawa",
- "sasaguri",
- "shingu",
- "shinyoshitomi",
- "shonai",
- "soeda",
- "sue",
- "tachiarai",
- "tagawa",
- "takata",
- "toho",
- "toyotsu",
- "tsuiki",
- "ukiha",
- "umi",
- "usui",
- "yamada",
- "yame",
- "yanagawa",
- "yukuhashi",
- "aizubange",
- "aizumisato",
- "aizuwakamatsu",
- "asakawa",
- "bandai",
- "date",
- "fukushima",
- "furudono",
- "futaba",
- "hanawa",
- "higashi",
- "hirata",
- "hirono",
- "iitate",
- "inawashiro",
- "ishikawa",
- "iwaki",
- "izumizaki",
- "kagamiishi",
- "kaneyama",
- "kawamata",
- "kitakata",
- "kitashiobara",
- "koori",
- "koriyama",
- "kunimi",
- "miharu",
- "mishima",
- "namie",
- "nango",
- "nishiaizu",
- "nishigo",
- "okuma",
- "omotego",
- "ono",
- "otama",
- "samegawa",
- "shimogo",
- "shirakawa",
- "showa",
- "soma",
- "sukagawa",
- "taishin",
- "tamakawa",
- "tanagura",
- "tenei",
- "yabuki",
- "yamato",
- "yamatsuri",
- "yanaizu",
- "yugawa",
- "anpachi",
- "ena",
- "gifu",
- "ginan",
- "godo",
- "gujo",
- "hashima",
- "hichiso",
- "hida",
- "higashishirakawa",
- "ibigawa",
- "ikeda",
- "kakamigahara",
- "kani",
- "kasahara",
- "kasamatsu",
- "kawaue",
- "kitagata",
- "mino",
- "minokamo",
- "mitake",
- "mizunami",
- "motosu",
- "nakatsugawa",
- "ogaki",
- "sakahogi",
- "seki",
- "sekigahara",
- "shirakawa",
- "tajimi",
- "takayama",
- "tarui",
- "toki",
- "tomika",
- "wanouchi",
- "yamagata",
- "yaotsu",
- "yoro",
- "annaka",
- "chiyoda",
- "fujioka",
- "higashiagatsuma",
- "isesaki",
- "itakura",
- "kanna",
- "kanra",
- "katashina",
- "kawaba",
- "kiryu",
- "kusatsu",
- "maebashi",
- "meiwa",
- "midori",
- "minakami",
- "naganohara",
- "nakanojo",
- "nanmoku",
- "numata",
- "oizumi",
- "ora",
- "ota",
- "shibukawa",
- "shimonita",
- "shinto",
- "showa",
- "takasaki",
- "takayama",
- "tamamura",
- "tatebayashi",
- "tomioka",
- "tsukiyono",
- "tsumagoi",
- "ueno",
- "yoshioka",
- "asaminami",
- "daiwa",
- "etajima",
- "fuchu",
- "fukuyama",
- "hatsukaichi",
- "higashihiroshima",
- "hongo",
- "jinsekikogen",
- "kaita",
- "kui",
- "kumano",
- "kure",
- "mihara",
- "miyoshi",
- "naka",
- "onomichi",
- "osakikamijima",
- "otake",
- "saka",
- "sera",
- "seranishi",
- "shinichi",
- "shobara",
- "takehara",
- "abashiri",
- "abira",
- "aibetsu",
- "akabira",
- "akkeshi",
- "asahikawa",
- "ashibetsu",
- "ashoro",
- "assabu",
- "atsuma",
- "bibai",
- "biei",
- "bifuka",
- "bihoro",
- "biratori",
- "chippubetsu",
- "chitose",
- "date",
- "ebetsu",
- "embetsu",
- "eniwa",
- "erimo",
- "esan",
- "esashi",
- "fukagawa",
- "fukushima",
- "furano",
- "furubira",
- "haboro",
- "hakodate",
- "hamatonbetsu",
- "hidaka",
- "higashikagura",
- "higashikawa",
- "hiroo",
- "hokuryu",
- "hokuto",
- "honbetsu",
- "horokanai",
- "horonobe",
- "ikeda",
- "imakane",
- "ishikari",
- "iwamizawa",
- "iwanai",
- "kamifurano",
- "kamikawa",
- "kamishihoro",
- "kamisunagawa",
- "kamoenai",
- "kayabe",
- "kembuchi",
- "kikonai",
- "kimobetsu",
- "kitahiroshima",
- "kitami",
- "kiyosato",
- "koshimizu",
- "kunneppu",
- "kuriyama",
- "kuromatsunai",
- "kushiro",
- "kutchan",
- "kyowa",
- "mashike",
- "matsumae",
- "mikasa",
- "minamifurano",
- "mombetsu",
- "moseushi",
- "mukawa",
- "muroran",
- "naie",
- "nakagawa",
- "nakasatsunai",
- "nakatombetsu",
- "nanae",
- "nanporo",
- "nayoro",
- "nemuro",
- "niikappu",
- "niki",
- "nishiokoppe",
- "noboribetsu",
- "numata",
- "obihiro",
- "obira",
- "oketo",
- "okoppe",
- "otaru",
- "otobe",
- "otofuke",
- "otoineppu",
- "oumu",
- "ozora",
- "pippu",
- "rankoshi",
- "rebun",
- "rikubetsu",
- "rishiri",
- "rishirifuji",
- "saroma",
- "sarufutsu",
- "shakotan",
- "shari",
- "shibecha",
- "shibetsu",
- "shikabe",
- "shikaoi",
- "shimamaki",
- "shimizu",
- "shimokawa",
- "shinshinotsu",
- "shintoku",
- "shiranuka",
- "shiraoi",
- "shiriuchi",
- "sobetsu",
- "sunagawa",
- "taiki",
- "takasu",
- "takikawa",
- "takinoue",
- "teshikaga",
- "tobetsu",
- "tohma",
- "tomakomai",
- "tomari",
- "toya",
- "toyako",
- "toyotomi",
- "toyoura",
- "tsubetsu",
- "tsukigata",
- "urakawa",
- "urausu",
- "uryu",
- "utashinai",
- "wakkanai",
- "wassamu",
- "yakumo",
- "yoichi",
- "aioi",
- "akashi",
- "ako",
- "amagasaki",
- "aogaki",
- "asago",
- "ashiya",
- "awaji",
- "fukusaki",
- "goshiki",
- "harima",
- "himeji",
- "ichikawa",
- "inagawa",
- "itami",
- "kakogawa",
- "kamigori",
- "kamikawa",
- "kasai",
- "kasuga",
- "kawanishi",
- "miki",
- "minamiawaji",
- "nishinomiya",
- "nishiwaki",
- "ono",
- "sanda",
- "sannan",
- "sasayama",
- "sayo",
- "shingu",
- "shinonsen",
- "shiso",
- "sumoto",
- "taishi",
- "taka",
- "takarazuka",
- "takasago",
- "takino",
- "tamba",
- "tatsuno",
- "toyooka",
- "yabu",
- "yashiro",
- "yoka",
- "yokawa",
- "ami",
- "asahi",
- "bando",
- "chikusei",
- "daigo",
- "fujishiro",
- "hitachi",
- "hitachinaka",
- "hitachiomiya",
- "hitachiota",
- "ibaraki",
- "ina",
- "inashiki",
- "itako",
- "iwama",
- "joso",
- "kamisu",
- "kasama",
- "kashima",
- "kasumigaura",
- "koga",
- "miho",
- "mito",
- "moriya",
- "naka",
- "namegata",
- "oarai",
- "ogawa",
- "omitama",
- "ryugasaki",
- "sakai",
- "sakuragawa",
- "shimodate",
- "shimotsuma",
- "shirosato",
- "sowa",
- "suifu",
- "takahagi",
- "tamatsukuri",
- "tokai",
- "tomobe",
- "tone",
- "toride",
- "tsuchiura",
- "tsukuba",
- "uchihara",
- "ushiku",
- "yachiyo",
- "yamagata",
- "yawara",
- "yuki",
- "anamizu",
- "hakui",
- "hakusan",
- "kaga",
- "kahoku",
- "kanazawa",
- "kawakita",
- "komatsu",
- "nakanoto",
- "nanao",
- "nomi",
- "nonoichi",
- "noto",
- "shika",
- "suzu",
- "tsubata",
- "tsurugi",
- "uchinada",
- "wajima",
- "fudai",
- "fujisawa",
- "hanamaki",
- "hiraizumi",
- "hirono",
- "ichinohe",
- "ichinoseki",
- "iwaizumi",
- "iwate",
- "joboji",
- "kamaishi",
- "kanegasaki",
- "karumai",
- "kawai",
- "kitakami",
- "kuji",
- "kunohe",
- "kuzumaki",
- "miyako",
- "mizusawa",
- "morioka",
- "ninohe",
- "noda",
- "ofunato",
- "oshu",
- "otsuchi",
- "rikuzentakata",
- "shiwa",
- "shizukuishi",
- "sumita",
- "tanohata",
- "tono",
- "yahaba",
- "yamada",
- "ayagawa",
- "higashikagawa",
- "kanonji",
- "kotohira",
- "manno",
- "marugame",
- "mitoyo",
- "naoshima",
- "sanuki",
- "tadotsu",
- "takamatsu",
- "tonosho",
- "uchinomi",
- "utazu",
- "zentsuji",
- "akune",
- "amami",
- "hioki",
- "isa",
- "isen",
- "izumi",
- "kagoshima",
- "kanoya",
- "kawanabe",
- "kinko",
- "kouyama",
- "makurazaki",
- "matsumoto",
- "minamitane",
- "nakatane",
- "nishinoomote",
- "satsumasendai",
- "soo",
- "tarumizu",
- "yusui",
- "aikawa",
- "atsugi",
- "ayase",
- "chigasaki",
- "ebina",
- "fujisawa",
- "hadano",
- "hakone",
- "hiratsuka",
- "isehara",
- "kaisei",
- "kamakura",
- "kiyokawa",
- "matsuda",
- "minamiashigara",
- "miura",
- "nakai",
- "ninomiya",
- "odawara",
- "oi",
- "oiso",
- "sagamihara",
- "samukawa",
- "tsukui",
- "yamakita",
- "yamato",
- "yokosuka",
- "yugawara",
- "zama",
- "zushi",
- "city",
- "city",
- "city",
- "aki",
- "geisei",
- "hidaka",
- "higashitsuno",
- "ino",
- "kagami",
- "kami",
- "kitagawa",
- "kochi",
- "mihara",
- "motoyama",
- "muroto",
- "nahari",
- "nakamura",
- "nankoku",
- "nishitosa",
- "niyodogawa",
- "ochi",
- "okawa",
- "otoyo",
- "otsuki",
- "sakawa",
- "sukumo",
- "susaki",
- "tosa",
- "tosashimizu",
- "toyo",
- "tsuno",
- "umaji",
- "yasuda",
- "yusuhara",
- "amakusa",
- "arao",
- "aso",
- "choyo",
- "gyokuto",
- "kamiamakusa",
- "kikuchi",
- "kumamoto",
- "mashiki",
- "mifune",
- "minamata",
- "minamioguni",
- "nagasu",
- "nishihara",
- "oguni",
- "ozu",
- "sumoto",
- "takamori",
- "uki",
- "uto",
- "yamaga",
- "yamato",
- "yatsushiro",
- "ayabe",
- "fukuchiyama",
- "higashiyama",
- "ide",
- "ine",
- "joyo",
- "kameoka",
- "kamo",
- "kita",
- "kizu",
- "kumiyama",
- "kyotamba",
- "kyotanabe",
- "kyotango",
- "maizuru",
- "minami",
- "minamiyamashiro",
- "miyazu",
- "muko",
- "nagaokakyo",
- "nakagyo",
- "nantan",
- "oyamazaki",
- "sakyo",
- "seika",
- "tanabe",
- "uji",
- "ujitawara",
- "wazuka",
- "yamashina",
- "yawata",
- "asahi",
- "inabe",
- "ise",
- "kameyama",
- "kawagoe",
- "kiho",
- "kisosaki",
- "kiwa",
- "komono",
- "kumano",
- "kuwana",
- "matsusaka",
- "meiwa",
- "mihama",
- "minamiise",
- "misugi",
- "miyama",
- "nabari",
- "shima",
- "suzuka",
- "tado",
- "taiki",
- "taki",
- "tamaki",
- "toba",
- "tsu",
- "udono",
- "ureshino",
- "watarai",
- "yokkaichi",
- "furukawa",
- "higashimatsushima",
- "ishinomaki",
- "iwanuma",
- "kakuda",
- "kami",
- "kawasaki",
- "marumori",
- "matsushima",
- "minamisanriku",
- "misato",
- "murata",
- "natori",
- "ogawara",
- "ohira",
- "onagawa",
- "osaki",
- "rifu",
- "semine",
- "shibata",
- "shichikashuku",
- "shikama",
- "shiogama",
- "shiroishi",
- "tagajo",
- "taiwa",
- "tome",
- "tomiya",
- "wakuya",
- "watari",
- "yamamoto",
- "zao",
- "aya",
- "ebino",
- "gokase",
- "hyuga",
- "kadogawa",
- "kawaminami",
- "kijo",
- "kitagawa",
- "kitakata",
- "kitaura",
- "kobayashi",
- "kunitomi",
- "kushima",
- "mimata",
- "miyakonojo",
- "miyazaki",
- "morotsuka",
- "nichinan",
- "nishimera",
- "nobeoka",
- "saito",
- "shiiba",
- "shintomi",
- "takaharu",
- "takanabe",
- "takazaki",
- "tsuno",
- "achi",
- "agematsu",
- "anan",
- "aoki",
- "asahi",
- "azumino",
- "chikuhoku",
- "chikuma",
- "chino",
- "fujimi",
- "hakuba",
- "hara",
- "hiraya",
- "iida",
- "iijima",
- "iiyama",
- "iizuna",
- "ikeda",
- "ikusaka",
- "ina",
- "karuizawa",
- "kawakami",
- "kiso",
- "kisofukushima",
- "kitaaiki",
- "komagane",
- "komoro",
- "matsukawa",
- "matsumoto",
- "miasa",
- "minamiaiki",
- "minamimaki",
- "minamiminowa",
- "minowa",
- "miyada",
- "miyota",
- "mochizuki",
- "nagano",
- "nagawa",
- "nagiso",
- "nakagawa",
- "nakano",
- "nozawaonsen",
- "obuse",
- "ogawa",
- "okaya",
- "omachi",
- "omi",
- "ookuwa",
- "ooshika",
- "otaki",
- "otari",
- "sakae",
- "sakaki",
- "saku",
- "sakuho",
- "shimosuwa",
- "shinanomachi",
- "shiojiri",
- "suwa",
- "suzaka",
- "takagi",
- "takamori",
- "takayama",
- "tateshina",
- "tatsuno",
- "togakushi",
- "togura",
- "tomi",
- "ueda",
- "wada",
- "yamagata",
- "yamanouchi",
- "yasaka",
- "yasuoka",
- "chijiwa",
- "futsu",
- "goto",
- "hasami",
- "hirado",
- "iki",
- "isahaya",
- "kawatana",
- "kuchinotsu",
- "matsuura",
- "nagasaki",
- "obama",
- "omura",
- "oseto",
- "saikai",
- "sasebo",
- "seihi",
- "shimabara",
- "shinkamigoto",
- "togitsu",
- "tsushima",
- "unzen",
- "city",
- "ando",
- "gose",
- "heguri",
- "higashiyoshino",
- "ikaruga",
- "ikoma",
- "kamikitayama",
- "kanmaki",
- "kashiba",
- "kashihara",
- "katsuragi",
- "kawai",
- "kawakami",
- "kawanishi",
- "koryo",
- "kurotaki",
- "mitsue",
- "miyake",
- "nara",
- "nosegawa",
- "oji",
- "ouda",
- "oyodo",
- "sakurai",
- "sango",
- "shimoichi",
- "shimokitayama",
- "shinjo",
- "soni",
- "takatori",
- "tawaramoto",
- "tenkawa",
- "tenri",
- "uda",
- "yamatokoriyama",
- "yamatotakada",
- "yamazoe",
- "yoshino",
- "aga",
- "agano",
- "gosen",
- "itoigawa",
- "izumozaki",
- "joetsu",
- "kamo",
- "kariwa",
- "kashiwazaki",
- "minamiuonuma",
- "mitsuke",
- "muika",
- "murakami",
- "myoko",
- "nagaoka",
- "niigata",
- "ojiya",
- "omi",
- "sado",
- "sanjo",
- "seiro",
- "seirou",
- "sekikawa",
- "shibata",
- "tagami",
- "tainai",
- "tochio",
- "tokamachi",
- "tsubame",
- "tsunan",
- "uonuma",
- "yahiko",
- "yoita",
- "yuzawa",
- "beppu",
- "bungoono",
- "bungotakada",
- "hasama",
- "hiji",
- "himeshima",
- "hita",
- "kamitsue",
- "kokonoe",
- "kuju",
- "kunisaki",
- "kusu",
- "oita",
- "saiki",
- "taketa",
- "tsukumi",
- "usa",
- "usuki",
- "yufu",
- "akaiwa",
- "asakuchi",
- "bizen",
- "hayashima",
- "ibara",
- "kagamino",
- "kasaoka",
- "kibichuo",
- "kumenan",
- "kurashiki",
- "maniwa",
- "misaki",
- "nagi",
- "niimi",
- "nishiawakura",
- "okayama",
- "satosho",
- "setouchi",
- "shinjo",
- "shoo",
- "soja",
- "takahashi",
- "tamano",
- "tsuyama",
- "wake",
- "yakage",
- "aguni",
- "ginowan",
- "ginoza",
- "gushikami",
- "haebaru",
- "higashi",
- "hirara",
- "iheya",
- "ishigaki",
- "ishikawa",
- "itoman",
- "izena",
- "kadena",
- "kin",
- "kitadaito",
- "kitanakagusuku",
- "kumejima",
- "kunigami",
- "minamidaito",
- "motobu",
- "nago",
- "naha",
- "nakagusuku",
- "nakijin",
- "nanjo",
- "nishihara",
- "ogimi",
- "okinawa",
- "onna",
- "shimoji",
- "taketomi",
- "tarama",
- "tokashiki",
- "tomigusuku",
- "tonaki",
- "urasoe",
- "uruma",
- "yaese",
- "yomitan",
- "yonabaru",
- "yonaguni",
- "zamami",
- "abeno",
- "chihayaakasaka",
- "chuo",
- "daito",
- "fujiidera",
- "habikino",
- "hannan",
- "higashiosaka",
- "higashisumiyoshi",
- "higashiyodogawa",
- "hirakata",
- "ibaraki",
- "ikeda",
- "izumi",
- "izumiotsu",
- "izumisano",
- "kadoma",
- "kaizuka",
- "kanan",
- "kashiwara",
- "katano",
- "kawachinagano",
- "kishiwada",
- "kita",
- "kumatori",
- "matsubara",
- "minato",
- "minoh",
- "misaki",
- "moriguchi",
- "neyagawa",
- "nishi",
- "nose",
- "osakasayama",
- "sakai",
- "sayama",
- "sennan",
- "settsu",
- "shijonawate",
- "shimamoto",
- "suita",
- "tadaoka",
- "taishi",
- "tajiri",
- "takaishi",
- "takatsuki",
- "tondabayashi",
- "toyonaka",
- "toyono",
- "yao",
- "ariake",
- "arita",
- "fukudomi",
- "genkai",
- "hamatama",
- "hizen",
- "imari",
- "kamimine",
- "kanzaki",
- "karatsu",
- "kashima",
- "kitagata",
- "kitahata",
- "kiyama",
- "kouhoku",
- "kyuragi",
- "nishiarita",
- "ogi",
- "omachi",
- "ouchi",
- "saga",
- "shiroishi",
- "taku",
- "tara",
- "tosu",
- "yoshinogari",
- "arakawa",
- "asaka",
- "chichibu",
- "fujimi",
- "fujimino",
- "fukaya",
- "hanno",
- "hanyu",
- "hasuda",
- "hatogaya",
- "hatoyama",
- "hidaka",
- "higashichichibu",
- "higashimatsuyama",
- "honjo",
- "ina",
- "iruma",
- "iwatsuki",
- "kamiizumi",
- "kamikawa",
- "kamisato",
- "kasukabe",
- "kawagoe",
- "kawaguchi",
- "kawajima",
- "kazo",
- "kitamoto",
- "koshigaya",
- "kounosu",
- "kuki",
- "kumagaya",
- "matsubushi",
- "minano",
- "misato",
- "miyashiro",
- "miyoshi",
- "moroyama",
- "nagatoro",
- "namegawa",
- "niiza",
- "ogano",
- "ogawa",
- "ogose",
- "okegawa",
- "omiya",
- "otaki",
- "ranzan",
- "ryokami",
- "saitama",
- "sakado",
- "satte",
- "sayama",
- "shiki",
- "shiraoka",
- "soka",
- "sugito",
- "toda",
- "tokigawa",
- "tokorozawa",
- "tsurugashima",
- "urawa",
- "warabi",
- "yashio",
- "yokoze",
- "yono",
- "yorii",
- "yoshida",
- "yoshikawa",
- "yoshimi",
- "city",
- "city",
- "aisho",
- "gamo",
- "higashiomi",
- "hikone",
- "koka",
- "konan",
- "kosei",
- "koto",
- "kusatsu",
- "maibara",
- "moriyama",
- "nagahama",
- "nishiazai",
- "notogawa",
- "omihachiman",
- "otsu",
- "ritto",
- "ryuoh",
- "takashima",
- "takatsuki",
- "torahime",
- "toyosato",
- "yasu",
- "akagi",
- "ama",
- "gotsu",
- "hamada",
- "higashiizumo",
- "hikawa",
- "hikimi",
- "izumo",
- "kakinoki",
- "masuda",
- "matsue",
- "misato",
- "nishinoshima",
- "ohda",
- "okinoshima",
- "okuizumo",
- "shimane",
- "tamayu",
- "tsuwano",
- "unnan",
- "yakumo",
- "yasugi",
- "yatsuka",
- "arai",
- "atami",
- "fuji",
- "fujieda",
- "fujikawa",
- "fujinomiya",
- "fukuroi",
- "gotemba",
- "haibara",
- "hamamatsu",
- "higashiizu",
- "ito",
- "iwata",
- "izu",
- "izunokuni",
- "kakegawa",
- "kannami",
- "kawanehon",
- "kawazu",
- "kikugawa",
- "kosai",
- "makinohara",
- "matsuzaki",
- "minamiizu",
- "mishima",
- "morimachi",
- "nishiizu",
- "numazu",
- "omaezaki",
- "shimada",
- "shimizu",
- "shimoda",
- "shizuoka",
- "susono",
- "yaizu",
- "yoshida",
- "ashikaga",
- "bato",
- "haga",
- "ichikai",
- "iwafune",
- "kaminokawa",
- "kanuma",
- "karasuyama",
- "kuroiso",
- "mashiko",
- "mibu",
- "moka",
- "motegi",
- "nasu",
- "nasushiobara",
- "nikko",
- "nishikata",
- "nogi",
- "ohira",
- "ohtawara",
- "oyama",
- "sakura",
- "sano",
- "shimotsuke",
- "shioya",
- "takanezawa",
- "tochigi",
- "tsuga",
- "ujiie",
- "utsunomiya",
- "yaita",
- "aizumi",
- "anan",
- "ichiba",
- "itano",
- "kainan",
- "komatsushima",
- "matsushige",
- "mima",
- "minami",
- "miyoshi",
- "mugi",
- "nakagawa",
- "naruto",
- "sanagochi",
- "shishikui",
- "tokushima",
- "wajiki",
- "adachi",
- "akiruno",
- "akishima",
- "aogashima",
- "arakawa",
- "bunkyo",
- "chiyoda",
- "chofu",
- "chuo",
- "edogawa",
- "fuchu",
- "fussa",
- "hachijo",
- "hachioji",
- "hamura",
- "higashikurume",
- "higashimurayama",
- "higashiyamato",
- "hino",
- "hinode",
- "hinohara",
- "inagi",
- "itabashi",
- "katsushika",
- "kita",
- "kiyose",
- "kodaira",
- "koganei",
- "kokubunji",
- "komae",
- "koto",
- "kouzushima",
- "kunitachi",
- "machida",
- "meguro",
- "minato",
- "mitaka",
- "mizuho",
- "musashimurayama",
- "musashino",
- "nakano",
- "nerima",
- "ogasawara",
- "okutama",
- "ome",
- "oshima",
- "ota",
- "setagaya",
- "shibuya",
- "shinagawa",
- "shinjuku",
- "suginami",
- "sumida",
- "tachikawa",
- "taito",
- "tama",
- "toshima",
- "chizu",
- "hino",
- "kawahara",
- "koge",
- "kotoura",
- "misasa",
- "nanbu",
- "nichinan",
- "sakaiminato",
- "tottori",
- "wakasa",
- "yazu",
- "yonago",
- "asahi",
- "fuchu",
- "fukumitsu",
- "funahashi",
- "himi",
- "imizu",
- "inami",
- "johana",
- "kamiichi",
- "kurobe",
- "nakaniikawa",
- "namerikawa",
- "nanto",
- "nyuzen",
- "oyabe",
- "taira",
- "takaoka",
- "tateyama",
- "toga",
- "tonami",
- "toyama",
- "unazuki",
- "uozu",
- "yamada",
- "arida",
- "aridagawa",
- "gobo",
- "hashimoto",
- "hidaka",
- "hirogawa",
- "inami",
- "iwade",
- "kainan",
- "kamitonda",
- "katsuragi",
- "kimino",
- "kinokawa",
- "kitayama",
- "koya",
- "koza",
- "kozagawa",
- "kudoyama",
- "kushimoto",
- "mihama",
- "misato",
- "nachikatsuura",
- "shingu",
- "shirahama",
- "taiji",
- "tanabe",
- "wakayama",
- "yuasa",
- "yura",
- "asahi",
- "funagata",
- "higashine",
- "iide",
- "kahoku",
- "kaminoyama",
- "kaneyama",
- "kawanishi",
- "mamurogawa",
- "mikawa",
- "murayama",
- "nagai",
- "nakayama",
- "nanyo",
- "nishikawa",
- "obanazawa",
- "oe",
- "oguni",
- "ohkura",
- "oishida",
- "sagae",
- "sakata",
- "sakegawa",
- "shinjo",
- "shirataka",
- "shonai",
- "takahata",
- "tendo",
- "tozawa",
- "tsuruoka",
- "yamagata",
- "yamanobe",
- "yonezawa",
- "yuza",
- "abu",
- "hagi",
- "hikari",
- "hofu",
- "iwakuni",
- "kudamatsu",
- "mitou",
- "nagato",
- "oshima",
- "shimonoseki",
- "shunan",
- "tabuse",
- "tokuyama",
- "toyota",
- "ube",
- "yuu",
- "chuo",
- "doshi",
- "fuefuki",
- "fujikawa",
- "fujikawaguchiko",
- "fujiyoshida",
- "hayakawa",
- "hokuto",
- "ichikawamisato",
- "kai",
- "kofu",
- "koshu",
- "kosuge",
- "minami-alps",
- "minobu",
- "nakamichi",
- "nanbu",
- "narusawa",
- "nirasaki",
- "nishikatsura",
- "oshino",
- "otsuki",
- "showa",
- "tabayama",
- "tsuru",
- "uenohara",
- "yamanakako",
- "yamanashi",
- "city",
- "co",
- "blogspot",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "biz",
- "com",
- "edu",
- "gov",
- "info",
- "net",
- "org",
- "ass",
- "asso",
- "com",
- "coop",
- "edu",
- "gouv",
- "gov",
- "medecin",
- "mil",
- "nom",
- "notaires",
- "org",
- "pharmaciens",
- "prd",
- "presse",
- "tm",
- "veterinaire",
- "edu",
- "gov",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "org",
- "rep",
- "tra",
- "ac",
- "blogspot",
- "busan",
- "chungbuk",
- "chungnam",
- "co",
- "daegu",
- "daejeon",
- "es",
- "gangwon",
- "go",
- "gwangju",
- "gyeongbuk",
- "gyeonggi",
- "gyeongnam",
- "hs",
- "incheon",
- "jeju",
- "jeonbuk",
- "jeonnam",
- "kg",
- "mil",
- "ms",
- "ne",
- "or",
- "pe",
- "re",
- "sc",
- "seoul",
- "ulsan",
- "co",
- "edu",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "nym",
- "org",
- "bnr",
- "c",
- "com",
- "edu",
- "gov",
- "info",
- "int",
- "net",
- "nym",
- "org",
- "per",
- "static",
- "dev",
- "sites",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "co",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "oy",
- "blogspot",
- "nom",
- "nym",
- "cyon",
- "mypep",
- "ac",
- "assn",
- "com",
- "edu",
- "gov",
- "grp",
- "hotel",
- "int",
- "ltd",
- "net",
- "ngo",
- "org",
- "sch",
- "soc",
- "web",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "co",
- "org",
- "blogspot",
- "gov",
- "nym",
- "blogspot",
- "nym",
- "asn",
- "com",
- "conf",
- "edu",
- "gov",
- "id",
- "mil",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "id",
- "med",
- "net",
- "org",
- "plc",
- "sch",
- "ac",
- "co",
- "gov",
- "net",
- "org",
- "press",
- "router",
- "asso",
- "tm",
- "blogspot",
- "ac",
- "brasilia",
- "c66",
- "co",
- "daplie",
- "ddns",
- "diskstation",
- "dnsfor",
- "dscloud",
- "edu",
- "filegear",
- "gov",
- "hopto",
- "i234",
- "its",
- "loginto",
- "myds",
- "net",
- "noip",
- "nym",
- "org",
- "priv",
- "synology",
- "webhop",
- "wedeploy",
- "yombo",
- "localhost",
- "co",
- "com",
- "edu",
- "gov",
- "mil",
- "nom",
- "org",
- "prd",
- "tm",
- "blogspot",
- "com",
- "edu",
- "gov",
- "inf",
- "name",
- "net",
- "nom",
- "org",
- "com",
- "edu",
- "gouv",
- "gov",
- "net",
- "org",
- "presse",
- "edu",
- "gov",
- "nyc",
- "org",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "dscloud",
- "blogspot",
- "gov",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "com",
- "edu",
- "net",
- "org",
- "blogspot",
- "ac",
- "co",
- "com",
- "gov",
- "net",
- "or",
- "org",
- "academy",
- "agriculture",
- "air",
- "airguard",
- "alabama",
- "alaska",
- "amber",
- "ambulance",
- "american",
- "americana",
- "americanantiques",
- "americanart",
- "amsterdam",
- "and",
- "annefrank",
- "anthro",
- "anthropology",
- "antiques",
- "aquarium",
- "arboretum",
- "archaeological",
- "archaeology",
- "architecture",
- "art",
- "artanddesign",
- "artcenter",
- "artdeco",
- "arteducation",
- "artgallery",
- "arts",
- "artsandcrafts",
- "asmatart",
- "assassination",
- "assisi",
- "association",
- "astronomy",
- "atlanta",
- "austin",
- "australia",
- "automotive",
- "aviation",
- "axis",
- "badajoz",
- "baghdad",
- "bahn",
- "bale",
- "baltimore",
- "barcelona",
- "baseball",
- "basel",
- "baths",
- "bauern",
- "beauxarts",
- "beeldengeluid",
- "bellevue",
- "bergbau",
- "berkeley",
- "berlin",
- "bern",
- "bible",
- "bilbao",
- "bill",
- "birdart",
- "birthplace",
- "bonn",
- "boston",
- "botanical",
- "botanicalgarden",
- "botanicgarden",
- "botany",
- "brandywinevalley",
- "brasil",
- "bristol",
- "british",
- "britishcolumbia",
- "broadcast",
- "brunel",
- "brussel",
- "brussels",
- "bruxelles",
- "building",
- "burghof",
- "bus",
- "bushey",
- "cadaques",
- "california",
- "cambridge",
- "can",
- "canada",
- "capebreton",
- "carrier",
- "cartoonart",
- "casadelamoneda",
- "castle",
- "castres",
- "celtic",
- "center",
- "chattanooga",
- "cheltenham",
- "chesapeakebay",
- "chicago",
- "children",
- "childrens",
- "childrensgarden",
- "chiropractic",
- "chocolate",
- "christiansburg",
- "cincinnati",
- "cinema",
- "circus",
- "civilisation",
- "civilization",
- "civilwar",
- "clinton",
- "clock",
- "coal",
- "coastaldefence",
- "cody",
- "coldwar",
- "collection",
- "colonialwilliamsburg",
- "coloradoplateau",
- "columbia",
- "columbus",
- "communication",
- "communications",
- "community",
- "computer",
- "computerhistory",
- "contemporary",
- "contemporaryart",
- "convent",
- "copenhagen",
- "corporation",
- "corvette",
- "costume",
- "countryestate",
- "county",
- "crafts",
- "cranbrook",
- "creation",
- "cultural",
- "culturalcenter",
- "culture",
- "cyber",
- "cymru",
- "dali",
- "dallas",
- "database",
- "ddr",
- "decorativearts",
- "delaware",
- "delmenhorst",
- "denmark",
- "depot",
- "design",
- "detroit",
- "dinosaur",
- "discovery",
- "dolls",
- "donostia",
- "durham",
- "eastafrica",
- "eastcoast",
- "education",
- "educational",
- "egyptian",
- "eisenbahn",
- "elburg",
- "elvendrell",
- "embroidery",
- "encyclopedic",
- "england",
- "entomology",
- "environment",
- "environmentalconservation",
- "epilepsy",
- "essex",
- "estate",
- "ethnology",
- "exeter",
- "exhibition",
- "family",
- "farm",
- "farmequipment",
- "farmers",
- "farmstead",
- "field",
- "figueres",
- "filatelia",
- "film",
- "fineart",
- "finearts",
- "finland",
- "flanders",
- "florida",
- "force",
- "fortmissoula",
- "fortworth",
- "foundation",
- "francaise",
- "frankfurt",
- "franziskaner",
- "freemasonry",
- "freiburg",
- "fribourg",
- "frog",
- "fundacio",
- "furniture",
- "gallery",
- "garden",
- "gateway",
- "geelvinck",
- "gemological",
- "geology",
- "georgia",
- "giessen",
- "glas",
- "glass",
- "gorge",
- "grandrapids",
- "graz",
- "guernsey",
- "halloffame",
- "hamburg",
- "handson",
- "harvestcelebration",
- "hawaii",
- "health",
- "heimatunduhren",
- "hellas",
- "helsinki",
- "hembygdsforbund",
- "heritage",
- "histoire",
- "historical",
- "historicalsociety",
- "historichouses",
- "historisch",
- "historisches",
- "history",
- "historyofscience",
- "horology",
- "house",
- "humanities",
- "illustration",
- "imageandsound",
- "indian",
- "indiana",
- "indianapolis",
- "indianmarket",
- "intelligence",
- "interactive",
- "iraq",
- "iron",
- "isleofman",
- "jamison",
- "jefferson",
- "jerusalem",
- "jewelry",
- "jewish",
- "jewishart",
- "jfk",
- "journalism",
- "judaica",
- "judygarland",
- "juedisches",
- "juif",
- "karate",
- "karikatur",
- "kids",
- "koebenhavn",
- "koeln",
- "kunst",
- "kunstsammlung",
- "kunstunddesign",
- "labor",
- "labour",
- "lajolla",
- "lancashire",
- "landes",
- "lans",
- "larsson",
- "lewismiller",
- "lincoln",
- "linz",
- "living",
- "livinghistory",
- "localhistory",
- "london",
- "losangeles",
- "louvre",
- "loyalist",
- "lucerne",
- "luxembourg",
- "luzern",
- "mad",
- "madrid",
- "mallorca",
- "manchester",
- "mansion",
- "mansions",
- "manx",
- "marburg",
- "maritime",
- "maritimo",
- "maryland",
- "marylhurst",
- "media",
- "medical",
- "medizinhistorisches",
- "meeres",
- "memorial",
- "mesaverde",
- "michigan",
- "midatlantic",
- "military",
- "mill",
- "miners",
- "mining",
- "minnesota",
- "missile",
- "missoula",
- "modern",
- "moma",
- "money",
- "monmouth",
- "monticello",
- "montreal",
- "moscow",
- "motorcycle",
- "muenchen",
- "muenster",
- "mulhouse",
- "muncie",
- "museet",
- "museumcenter",
- "museumvereniging",
- "music",
- "national",
- "nationalfirearms",
- "nationalheritage",
- "nativeamerican",
- "naturalhistory",
- "naturalhistorymuseum",
- "naturalsciences",
- "nature",
- "naturhistorisches",
- "natuurwetenschappen",
- "naumburg",
- "naval",
- "nebraska",
- "neues",
- "newhampshire",
- "newjersey",
- "newmexico",
- "newport",
- "newspaper",
- "newyork",
- "niepce",
- "norfolk",
- "north",
- "nrw",
- "nuernberg",
- "nuremberg",
- "nyc",
- "nyny",
- "oceanographic",
- "oceanographique",
- "omaha",
- "online",
- "ontario",
- "openair",
- "oregon",
- "oregontrail",
- "otago",
- "oxford",
- "pacific",
- "paderborn",
- "palace",
- "paleo",
- "palmsprings",
- "panama",
- "paris",
- "pasadena",
- "pharmacy",
- "philadelphia",
- "philadelphiaarea",
- "philately",
- "phoenix",
- "photography",
- "pilots",
- "pittsburgh",
- "planetarium",
- "plantation",
- "plants",
- "plaza",
- "portal",
- "portland",
- "portlligat",
- "posts-and-telecommunications",
- "preservation",
- "presidio",
- "press",
- "project",
- "public",
- "pubol",
- "quebec",
- "railroad",
- "railway",
- "research",
- "resistance",
- "riodejaneiro",
- "rochester",
- "rockart",
- "roma",
- "russia",
- "saintlouis",
- "salem",
- "salvadordali",
- "salzburg",
- "sandiego",
- "sanfrancisco",
- "santabarbara",
- "santacruz",
- "santafe",
- "saskatchewan",
- "satx",
- "savannahga",
- "schlesisches",
- "schoenbrunn",
- "schokoladen",
- "school",
- "schweiz",
- "science",
- "science-fiction",
- "scienceandhistory",
- "scienceandindustry",
- "sciencecenter",
- "sciencecenters",
- "sciencehistory",
- "sciences",
- "sciencesnaturelles",
- "scotland",
- "seaport",
- "settlement",
- "settlers",
- "shell",
- "sherbrooke",
- "sibenik",
- "silk",
- "ski",
- "skole",
- "society",
- "sologne",
- "soundandvision",
- "southcarolina",
- "southwest",
- "space",
- "spy",
- "square",
- "stadt",
- "stalbans",
- "starnberg",
- "state",
- "stateofdelaware",
- "station",
- "steam",
- "steiermark",
- "stjohn",
- "stockholm",
- "stpetersburg",
- "stuttgart",
- "suisse",
- "surgeonshall",
- "surrey",
- "svizzera",
- "sweden",
- "sydney",
- "tank",
- "tcm",
- "technology",
- "telekommunikation",
- "television",
- "texas",
- "textile",
- "theater",
- "time",
- "timekeeping",
- "topology",
- "torino",
- "touch",
- "town",
- "transport",
- "tree",
- "trolley",
- "trust",
- "trustee",
- "uhren",
- "ulm",
- "undersea",
- "university",
- "usa",
- "usantiques",
- "usarts",
- "uscountryestate",
- "usculture",
- "usdecorativearts",
- "usgarden",
- "ushistory",
- "ushuaia",
- "uslivinghistory",
- "utah",
- "uvic",
- "valley",
- "vantaa",
- "versailles",
- "viking",
- "village",
- "virginia",
- "virtual",
- "virtuel",
- "vlaanderen",
- "volkenkunde",
- "wales",
- "wallonie",
- "war",
- "washingtondc",
- "watch-and-clock",
- "watchandclock",
- "western",
- "westfalen",
- "whaling",
- "wildlife",
- "williamsburg",
- "windmill",
- "workshop",
- "xn--9dbhblg6di",
- "xn--comunicaes-v6a2o",
- "xn--correios-e-telecomunicaes-ghc29a",
- "xn--h1aegh",
- "xn--lns-qla",
- "york",
- "yorkshire",
- "yosemite",
- "youth",
- "zoological",
- "zoology",
- "aero",
- "biz",
- "com",
- "coop",
- "edu",
- "gov",
- "info",
- "int",
- "mil",
- "museum",
- "name",
- "net",
- "org",
- "pro",
- "ac",
- "biz",
- "co",
- "com",
- "coop",
- "edu",
- "gov",
- "int",
- "museum",
- "net",
- "org",
- "blogspot",
- "com",
- "edu",
- "gob",
- "net",
- "nym",
- "org",
- "blogspot",
- "com",
- "edu",
- "gov",
- "mil",
- "name",
- "net",
- "org",
- "ac",
- "adv",
- "co",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "ca",
- "cc",
- "co",
- "com",
- "dr",
- "in",
- "info",
- "mobi",
- "mx",
- "name",
- "or",
- "org",
- "pro",
- "school",
- "tv",
- "us",
- "ws",
- "her",
- "his",
- "forgot",
- "forgot",
- "asso",
- "nom",
- "alwaysdata",
- "at-band-camp",
- "azure-mobile",
- "azurewebsites",
- "barsy",
- "blogdns",
- "boomla",
- "bounceme",
- "bplaced",
- "broke-it",
- "buyshouses",
- "casacam",
- "cdn77",
- "cdn77-ssl",
- "channelsdvr",
- "cloudaccess",
- "cloudapp",
- "cloudfront",
- "cloudfunctions",
- "cryptonomic",
- "ddns",
- "debian",
- "definima",
- "dnsalias",
- "dnsdojo",
- "does-it",
- "dontexist",
- "dsmynas",
- "dynalias",
- "dynathome",
- "dynu",
- "dynv6",
- "eating-organic",
- "endofinternet",
- "familyds",
- "fastly",
- "fastlylb",
- "feste-ip",
- "firewall-gateway",
- "flynnhosting",
- "from-az",
- "from-co",
- "from-la",
- "from-ny",
- "gb",
- "gets-it",
- "ham-radio-op",
- "homeftp",
- "homeip",
- "homelinux",
- "homeunix",
- "hu",
- "in",
- "in-the-band",
- "ipifony",
- "is-a-chef",
- "is-a-geek",
- "isa-geek",
- "jp",
- "kicks-ass",
- "knx-server",
- "moonscale",
- "mydissent",
- "myeffect",
- "myfritz",
- "mymediapc",
- "mypsx",
- "mysecuritycamera",
- "nhlfan",
- "no-ip",
- "office-on-the",
- "pgafan",
- "podzone",
- "privatizehealthinsurance",
- "rackmaze",
- "redirectme",
- "ru",
- "scrapper-site",
- "se",
- "selfip",
- "sells-it",
- "servebbs",
- "serveblog",
- "serveftp",
- "serveminecraft",
- "square7",
- "static-access",
- "sytes",
- "t3l3p0rt",
- "thruhere",
- "twmail",
- "uk",
- "webhop",
- "za",
- "r",
- "freetls",
- "map",
- "prod",
- "ssl",
- "a",
- "global",
- "a",
- "b",
- "global",
- "map",
- "alces",
- "arts",
- "com",
- "firm",
- "info",
- "net",
- "other",
- "per",
- "rec",
- "store",
- "web",
- "com",
- "edu",
- "gov",
- "i",
- "mil",
- "mobi",
- "name",
- "net",
- "org",
- "sch",
- "blogspot",
- "ac",
- "biz",
- "co",
- "com",
- "edu",
- "gob",
- "in",
- "info",
- "int",
- "mil",
- "net",
- "nom",
- "org",
- "web",
- "blogspot",
- "bv",
- "cistron",
- "co",
- "demon",
- "transurl",
- "virtueeldomein",
- "aa",
- "aarborte",
- "aejrie",
- "afjord",
- "agdenes",
- "ah",
- "akershus",
- "aknoluokta",
- "akrehamn",
- "al",
- "alaheadju",
- "alesund",
- "algard",
- "alstahaug",
- "alta",
- "alvdal",
- "amli",
- "amot",
- "andasuolo",
- "andebu",
- "andoy",
- "ardal",
- "aremark",
- "arendal",
- "arna",
- "aseral",
- "asker",
- "askim",
- "askoy",
- "askvoll",
- "asnes",
- "audnedaln",
- "aukra",
- "aure",
- "aurland",
- "aurskog-holand",
- "austevoll",
- "austrheim",
- "averoy",
- "badaddja",
- "bahcavuotna",
- "bahccavuotna",
- "baidar",
- "bajddar",
- "balat",
- "balestrand",
- "ballangen",
- "balsfjord",
- "bamble",
- "bardu",
- "barum",
- "batsfjord",
- "bearalvahki",
- "beardu",
- "beiarn",
- "berg",
- "bergen",
- "berlevag",
- "bievat",
- "bindal",
- "birkenes",
- "bjarkoy",
- "bjerkreim",
- "bjugn",
- "blogspot",
- "bodo",
- "bokn",
- "bomlo",
- "bremanger",
- "bronnoy",
- "bronnoysund",
- "brumunddal",
- "bryne",
- "bu",
- "budejju",
- "buskerud",
- "bygland",
- "bykle",
- "cahcesuolo",
- "co",
- "davvenjarga",
- "davvesiida",
- "deatnu",
- "dep",
- "dielddanuorri",
- "divtasvuodna",
- "divttasvuotna",
- "donna",
- "dovre",
- "drammen",
- "drangedal",
- "drobak",
- "dyroy",
- "egersund",
- "eid",
- "eidfjord",
- "eidsberg",
- "eidskog",
- "eidsvoll",
- "eigersund",
- "elverum",
- "enebakk",
- "engerdal",
- "etne",
- "etnedal",
- "evenassi",
- "evenes",
- "evje-og-hornnes",
- "farsund",
- "fauske",
- "fedje",
- "fet",
- "fetsund",
- "fhs",
- "finnoy",
- "fitjar",
- "fjaler",
- "fjell",
- "fla",
- "flakstad",
- "flatanger",
- "flekkefjord",
- "flesberg",
- "flora",
- "floro",
- "fm",
- "folkebibl",
- "folldal",
- "forde",
- "forsand",
- "fosnes",
- "frana",
- "fredrikstad",
- "frei",
- "frogn",
- "froland",
- "frosta",
- "froya",
- "fuoisku",
- "fuossko",
- "fusa",
- "fylkesbibl",
- "fyresdal",
- "gaivuotna",
- "galsa",
- "gamvik",
- "gangaviika",
- "gaular",
- "gausdal",
- "giehtavuoatna",
- "gildeskal",
- "giske",
- "gjemnes",
- "gjerdrum",
- "gjerstad",
- "gjesdal",
- "gjovik",
- "gloppen",
- "gol",
- "gran",
- "grane",
- "granvin",
- "gratangen",
- "grimstad",
- "grong",
- "grue",
- "gulen",
- "guovdageaidnu",
- "ha",
- "habmer",
- "hadsel",
- "hagebostad",
- "halden",
- "halsa",
- "hamar",
- "hamaroy",
- "hammarfeasta",
- "hammerfest",
- "hapmir",
- "haram",
- "hareid",
- "harstad",
- "hasvik",
- "hattfjelldal",
- "haugesund",
- "hedmark",
- "hemne",
- "hemnes",
- "hemsedal",
- "herad",
- "hitra",
- "hjartdal",
- "hjelmeland",
- "hl",
- "hm",
- "hobol",
- "hof",
- "hokksund",
- "hol",
- "hole",
- "holmestrand",
- "holtalen",
- "honefoss",
- "hordaland",
- "hornindal",
- "horten",
- "hoyanger",
- "hoylandet",
- "hurdal",
- "hurum",
- "hvaler",
- "hyllestad",
- "ibestad",
- "idrett",
- "inderoy",
- "iveland",
- "ivgu",
- "jan-mayen",
- "jessheim",
- "jevnaker",
- "jolster",
- "jondal",
- "jorpeland",
- "kafjord",
- "karasjohka",
- "karasjok",
- "karlsoy",
- "karmoy",
- "kautokeino",
- "kirkenes",
- "klabu",
- "klepp",
- "kommune",
- "kongsberg",
- "kongsvinger",
- "kopervik",
- "kraanghke",
- "kragero",
- "kristiansand",
- "kristiansund",
- "krodsherad",
- "krokstadelva",
- "kvafjord",
- "kvalsund",
- "kvam",
- "kvanangen",
- "kvinesdal",
- "kvinnherad",
- "kviteseid",
- "kvitsoy",
- "laakesvuemie",
- "lahppi",
- "langevag",
- "lardal",
- "larvik",
- "lavagis",
- "lavangen",
- "leangaviika",
- "lebesby",
- "leikanger",
- "leirfjord",
- "leirvik",
- "leka",
- "leksvik",
- "lenvik",
- "lerdal",
- "lesja",
- "levanger",
- "lier",
- "lierne",
- "lillehammer",
- "lillesand",
- "lindas",
- "lindesnes",
- "loabat",
- "lodingen",
- "lom",
- "loppa",
- "lorenskog",
- "loten",
- "lund",
- "lunner",
- "luroy",
- "luster",
- "lyngdal",
- "lyngen",
- "malatvuopmi",
- "malselv",
- "malvik",
- "mandal",
- "marker",
- "marnardal",
- "masfjorden",
- "masoy",
- "matta-varjjat",
- "meland",
- "meldal",
- "melhus",
- "meloy",
- "meraker",
- "midsund",
- "midtre-gauldal",
- "mil",
- "mjondalen",
- "mo-i-rana",
- "moareke",
- "modalen",
- "modum",
- "molde",
- "more-og-romsdal",
- "mosjoen",
- "moskenes",
- "moss",
- "mosvik",
- "mr",
- "muosat",
- "museum",
- "naamesjevuemie",
- "namdalseid",
- "namsos",
- "namsskogan",
- "nannestad",
- "naroy",
- "narviika",
- "narvik",
- "naustdal",
- "navuotna",
- "nedre-eiker",
- "nesna",
- "nesodden",
- "nesoddtangen",
- "nesseby",
- "nesset",
- "nissedal",
- "nittedal",
- "nl",
- "nord-aurdal",
- "nord-fron",
- "nord-odal",
- "norddal",
- "nordkapp",
- "nordland",
- "nordre-land",
- "nordreisa",
- "nore-og-uvdal",
- "notodden",
- "notteroy",
- "nt",
- "odda",
- "of",
- "oksnes",
- "ol",
- "omasvuotna",
- "oppdal",
- "oppegard",
- "orkanger",
- "orkdal",
- "orland",
- "orskog",
- "orsta",
- "osen",
- "oslo",
- "osoyro",
- "osteroy",
- "ostfold",
- "ostre-toten",
- "overhalla",
- "ovre-eiker",
- "oyer",
- "oygarden",
- "oystre-slidre",
- "porsanger",
- "porsangu",
- "porsgrunn",
- "priv",
- "rade",
- "radoy",
- "rahkkeravju",
- "raholt",
- "raisa",
- "rakkestad",
- "ralingen",
- "rana",
- "randaberg",
- "rauma",
- "rendalen",
- "rennebu",
- "rennesoy",
- "rindal",
- "ringebu",
- "ringerike",
- "ringsaker",
- "risor",
- "rissa",
- "rl",
- "roan",
- "rodoy",
- "rollag",
- "romsa",
- "romskog",
- "roros",
- "rost",
- "royken",
- "royrvik",
- "ruovat",
- "rygge",
- "salangen",
- "salat",
- "saltdal",
- "samnanger",
- "sandefjord",
- "sandnes",
- "sandnessjoen",
- "sandoy",
- "sarpsborg",
- "sauda",
- "sauherad",
- "sel",
- "selbu",
- "selje",
- "seljord",
- "sf",
- "siellak",
- "sigdal",
- "siljan",
- "sirdal",
- "skanit",
- "skanland",
- "skaun",
- "skedsmo",
- "skedsmokorset",
- "ski",
- "skien",
- "skierva",
- "skiptvet",
- "skjak",
- "skjervoy",
- "skodje",
- "slattum",
- "smola",
- "snaase",
- "snasa",
- "snillfjord",
- "snoasa",
- "sogndal",
- "sogne",
- "sokndal",
- "sola",
- "solund",
- "somna",
- "sondre-land",
- "songdalen",
- "sor-aurdal",
- "sor-fron",
- "sor-odal",
- "sor-varanger",
- "sorfold",
- "sorreisa",
- "sortland",
- "sorum",
- "spjelkavik",
- "spydeberg",
- "st",
- "stange",
- "stat",
- "stathelle",
- "stavanger",
- "stavern",
- "steigen",
- "steinkjer",
- "stjordal",
- "stjordalshalsen",
- "stokke",
- "stor-elvdal",
- "stord",
- "stordal",
- "storfjord",
- "strand",
- "stranda",
- "stryn",
- "sula",
- "suldal",
- "sund",
- "sunndal",
- "surnadal",
- "svalbard",
- "sveio",
- "svelvik",
- "sykkylven",
- "tana",
- "tananger",
- "telemark",
- "time",
- "tingvoll",
- "tinn",
- "tjeldsund",
- "tjome",
- "tm",
- "tokke",
- "tolga",
- "tonsberg",
- "torsken",
- "tr",
- "trana",
- "tranby",
- "tranoy",
- "troandin",
- "trogstad",
- "tromsa",
- "tromso",
- "trondheim",
- "trysil",
- "tvedestrand",
- "tydal",
- "tynset",
- "tysfjord",
- "tysnes",
- "tysvar",
- "ullensaker",
- "ullensvang",
- "ulvik",
- "unjarga",
- "utsira",
- "va",
- "vaapste",
- "vadso",
- "vaga",
- "vagan",
- "vagsoy",
- "vaksdal",
- "valle",
- "vang",
- "vanylven",
- "vardo",
- "varggat",
- "varoy",
- "vefsn",
- "vega",
- "vegarshei",
- "vennesla",
- "verdal",
- "verran",
- "vestby",
- "vestfold",
- "vestnes",
- "vestre-slidre",
- "vestre-toten",
- "vestvagoy",
- "vevelstad",
- "vf",
- "vgs",
- "vik",
- "vikna",
- "vindafjord",
- "voagat",
- "volda",
- "voss",
- "vossevangen",
- "xn--andy-ira",
- "xn--asky-ira",
- "xn--aurskog-hland-jnb",
- "xn--avery-yua",
- "xn--bdddj-mrabd",
- "xn--bearalvhki-y4a",
- "xn--berlevg-jxa",
- "xn--bhcavuotna-s4a",
- "xn--bhccavuotna-k7a",
- "xn--bidr-5nac",
- "xn--bievt-0qa",
- "xn--bjarky-fya",
- "xn--bjddar-pta",
- "xn--blt-elab",
- "xn--bmlo-gra",
- "xn--bod-2na",
- "xn--brnny-wuac",
- "xn--brnnysund-m8ac",
- "xn--brum-voa",
- "xn--btsfjord-9za",
- "xn--davvenjrga-y4a",
- "xn--dnna-gra",
- "xn--drbak-wua",
- "xn--dyry-ira",
- "xn--eveni-0qa01ga",
- "xn--finny-yua",
- "xn--fjord-lra",
- "xn--fl-zia",
- "xn--flor-jra",
- "xn--frde-gra",
- "xn--frna-woa",
- "xn--frya-hra",
- "xn--ggaviika-8ya47h",
- "xn--gildeskl-g0a",
- "xn--givuotna-8ya",
- "xn--gjvik-wua",
- "xn--gls-elac",
- "xn--h-2fa",
- "xn--hbmer-xqa",
- "xn--hcesuolo-7ya35b",
- "xn--hgebostad-g3a",
- "xn--hmmrfeasta-s4ac",
- "xn--hnefoss-q1a",
- "xn--hobl-ira",
- "xn--holtlen-hxa",
- "xn--hpmir-xqa",
- "xn--hyanger-q1a",
- "xn--hylandet-54a",
- "xn--indery-fya",
- "xn--jlster-bya",
- "xn--jrpeland-54a",
- "xn--karmy-yua",
- "xn--kfjord-iua",
- "xn--klbu-woa",
- "xn--koluokta-7ya57h",
- "xn--krager-gya",
- "xn--kranghke-b0a",
- "xn--krdsherad-m8a",
- "xn--krehamn-dxa",
- "xn--krjohka-hwab49j",
- "xn--ksnes-uua",
- "xn--kvfjord-nxa",
- "xn--kvitsy-fya",
- "xn--kvnangen-k0a",
- "xn--l-1fa",
- "xn--laheadju-7ya",
- "xn--langevg-jxa",
- "xn--ldingen-q1a",
- "xn--leagaviika-52b",
- "xn--lesund-hua",
- "xn--lgrd-poac",
- "xn--lhppi-xqa",
- "xn--linds-pra",
- "xn--loabt-0qa",
- "xn--lrdal-sra",
- "xn--lrenskog-54a",
- "xn--lt-liac",
- "xn--lten-gra",
- "xn--lury-ira",
- "xn--mely-ira",
- "xn--merker-kua",
- "xn--mjndalen-64a",
- "xn--mlatvuopmi-s4a",
- "xn--mli-tla",
- "xn--mlselv-iua",
- "xn--moreke-jua",
- "xn--mosjen-eya",
- "xn--mot-tla",
- "xn--mre-og-romsdal-qqb",
- "xn--msy-ula0h",
- "xn--mtta-vrjjat-k7af",
- "xn--muost-0qa",
- "xn--nmesjevuemie-tcba",
- "xn--nry-yla5g",
- "xn--nttery-byae",
- "xn--nvuotna-hwa",
- "xn--oppegrd-ixa",
- "xn--ostery-fya",
- "xn--osyro-wua",
- "xn--porsgu-sta26f",
- "xn--rady-ira",
- "xn--rdal-poa",
- "xn--rde-ula",
- "xn--rdy-0nab",
- "xn--rennesy-v1a",
- "xn--rhkkervju-01af",
- "xn--rholt-mra",
- "xn--risa-5na",
- "xn--risr-ira",
- "xn--rland-uua",
- "xn--rlingen-mxa",
- "xn--rmskog-bya",
- "xn--rros-gra",
- "xn--rskog-uua",
- "xn--rst-0na",
- "xn--rsta-fra",
- "xn--ryken-vua",
- "xn--ryrvik-bya",
- "xn--s-1fa",
- "xn--sandnessjen-ogb",
- "xn--sandy-yua",
- "xn--seral-lra",
- "xn--sgne-gra",
- "xn--skierv-uta",
- "xn--skjervy-v1a",
- "xn--skjk-soa",
- "xn--sknit-yqa",
- "xn--sknland-fxa",
- "xn--slat-5na",
- "xn--slt-elab",
- "xn--smla-hra",
- "xn--smna-gra",
- "xn--snase-nra",
- "xn--sndre-land-0cb",
- "xn--snes-poa",
- "xn--snsa-roa",
- "xn--sr-aurdal-l8a",
- "xn--sr-fron-q1a",
- "xn--sr-odal-q1a",
- "xn--sr-varanger-ggb",
- "xn--srfold-bya",
- "xn--srreisa-q1a",
- "xn--srum-gra",
- "xn--stfold-9xa",
- "xn--stjrdal-s1a",
- "xn--stjrdalshalsen-sqb",
- "xn--stre-toten-zcb",
- "xn--tjme-hra",
- "xn--tnsberg-q1a",
- "xn--trany-yua",
- "xn--trgstad-r1a",
- "xn--trna-woa",
- "xn--troms-zua",
- "xn--tysvr-vra",
- "xn--unjrga-rta",
- "xn--vads-jra",
- "xn--vard-jra",
- "xn--vegrshei-c0a",
- "xn--vestvgy-ixa6o",
- "xn--vg-yiab",
- "xn--vgan-qoa",
- "xn--vgsy-qoa0j",
- "xn--vre-eiker-k8a",
- "xn--vrggt-xqad",
- "xn--vry-yla5g",
- "xn--yer-zna",
- "xn--ygarden-p1a",
- "xn--ystre-slidre-ujb",
- "gs",
- "gs",
- "nes",
- "gs",
- "nes",
- "gs",
- "os",
- "valer",
- "xn--vler-qoa",
- "gs",
- "gs",
- "os",
- "gs",
- "heroy",
- "sande",
- "gs",
- "gs",
- "bo",
- "heroy",
- "xn--b-5ga",
- "xn--hery-ira",
- "gs",
- "gs",
- "gs",
- "gs",
- "valer",
- "gs",
- "gs",
- "gs",
- "gs",
- "bo",
- "xn--b-5ga",
- "gs",
- "gs",
- "gs",
- "sande",
- "gs",
- "sande",
- "xn--hery-ira",
- "xn--vler-qoa",
- "biz",
- "com",
- "edu",
- "gov",
- "info",
- "net",
- "org",
- "merseine",
- "mine",
- "nom",
- "shacknet",
- "ac",
- "co",
- "cri",
- "geek",
- "gen",
- "govt",
- "health",
- "iwi",
- "kiwi",
- "maori",
- "mil",
- "net",
- "nym",
- "org",
- "parliament",
- "school",
- "xn--mori-qsa",
- "blogspot",
- "co",
- "com",
- "edu",
- "gov",
- "med",
- "museum",
- "net",
- "org",
- "pro",
- "homelink",
- "barsy",
- "accesscam",
- "ae",
- "amune",
- "blogdns",
- "blogsite",
- "bmoattachments",
- "boldlygoingnowhere",
- "cable-modem",
- "camdvr",
- "cdn77",
- "cdn77-secure",
- "certmgr",
- "cloudns",
- "collegefan",
- "couchpotatofries",
- "ddnss",
- "diskstation",
- "dnsalias",
- "dnsdojo",
- "doesntexist",
- "dontexist",
- "doomdns",
- "dsmynas",
- "duckdns",
- "dvrdns",
- "dynalias",
- "dyndns",
- "endofinternet",
- "endoftheinternet",
- "eu",
- "familyds",
- "fedorainfracloud",
- "fedorapeople",
- "fedoraproject",
- "freeddns",
- "from-me",
- "game-host",
- "gotdns",
- "hepforge",
- "hk",
- "hobby-site",
- "homedns",
- "homeftp",
- "homelinux",
- "homeunix",
- "hopto",
- "is-a-bruinsfan",
- "is-a-candidate",
- "is-a-celticsfan",
- "is-a-chef",
- "is-a-geek",
- "is-a-knight",
- "is-a-linux-user",
- "is-a-patsfan",
- "is-a-soxfan",
- "is-found",
- "is-lost",
- "is-saved",
- "is-very-bad",
- "is-very-evil",
- "is-very-good",
- "is-very-nice",
- "is-very-sweet",
- "isa-geek",
- "js",
- "kicks-ass",
- "misconfused",
- "mlbfan",
- "my-firewall",
- "myfirewall",
- "myftp",
- "mysecuritycamera",
- "mywire",
- "nflfan",
- "no-ip",
- "pimienta",
- "podzone",
- "poivron",
- "potager",
- "read-books",
- "readmyblog",
- "selfip",
- "sellsyourhome",
- "servebbs",
- "serveftp",
- "servegame",
- "spdns",
- "stuff-4-sale",
- "sweetpepper",
- "tunk",
- "tuxfamily",
- "twmail",
- "ufcfan",
- "us",
- "webhop",
- "webredirect",
- "wmflabs",
- "za",
- "zapto",
- "tele",
- "c",
- "rsc",
- "origin",
- "ssl",
- "go",
- "home",
- "al",
- "asso",
- "at",
- "au",
- "be",
- "bg",
- "ca",
- "cd",
- "ch",
- "cn",
- "cy",
- "cz",
- "de",
- "dk",
- "edu",
- "ee",
- "es",
- "fi",
- "fr",
- "gr",
- "hr",
- "hu",
- "ie",
- "il",
- "in",
- "int",
- "is",
- "it",
- "jp",
- "kr",
- "lt",
- "lu",
- "lv",
- "mc",
- "me",
- "mk",
- "mt",
- "my",
- "net",
- "ng",
- "nl",
- "no",
- "nz",
- "paris",
- "pl",
- "pt",
- "q-a",
- "ro",
- "ru",
- "se",
- "si",
- "sk",
- "tr",
- "uk",
- "us",
- "cloud",
- "nerdpol",
- "abo",
- "ac",
- "com",
- "edu",
- "gob",
- "ing",
- "med",
- "net",
- "nom",
- "org",
- "sld",
- "ybo",
- "blogspot",
- "com",
- "edu",
- "gob",
- "mil",
- "net",
- "nom",
- "nym",
- "org",
- "com",
- "edu",
- "org",
- "com",
- "edu",
- "gov",
- "i",
- "mil",
- "net",
- "ngo",
- "org",
- "1337",
- "biz",
- "com",
- "edu",
- "fam",
- "gob",
- "gok",
- "gon",
- "gop",
- "gos",
- "gov",
- "info",
- "net",
- "org",
- "web",
- "agro",
- "aid",
- "art",
- "atm",
- "augustow",
- "auto",
- "babia-gora",
- "bedzin",
- "beep",
- "beskidy",
- "bialowieza",
- "bialystok",
- "bielawa",
- "bieszczady",
- "biz",
- "boleslawiec",
- "bydgoszcz",
- "bytom",
- "cieszyn",
- "co",
- "com",
- "czeladz",
- "czest",
- "dlugoleka",
- "edu",
- "elblag",
- "elk",
- "gda",
- "gdansk",
- "gdynia",
- "gliwice",
- "glogow",
- "gmina",
- "gniezno",
- "gorlice",
- "gov",
- "grajewo",
- "gsm",
- "ilawa",
- "info",
- "jaworzno",
- "jelenia-gora",
- "jgora",
- "kalisz",
- "karpacz",
- "kartuzy",
- "kaszuby",
- "katowice",
- "kazimierz-dolny",
- "kepno",
- "ketrzyn",
- "klodzko",
- "kobierzyce",
- "kolobrzeg",
- "konin",
- "konskowola",
- "krakow",
- "kutno",
- "lapy",
- "lebork",
- "legnica",
- "lezajsk",
- "limanowa",
- "lomza",
- "lowicz",
- "lubin",
- "lukow",
- "mail",
- "malbork",
- "malopolska",
- "mazowsze",
- "mazury",
- "med",
- "media",
- "miasta",
- "mielec",
- "mielno",
- "mil",
- "mragowo",
- "naklo",
- "net",
- "nieruchomosci",
- "nom",
- "nowaruda",
- "nysa",
- "olawa",
- "olecko",
- "olkusz",
- "olsztyn",
- "opoczno",
- "opole",
- "org",
- "ostroda",
- "ostroleka",
- "ostrowiec",
- "ostrowwlkp",
- "pc",
- "pila",
- "pisz",
- "podhale",
- "podlasie",
- "polkowice",
- "pomorskie",
- "pomorze",
- "powiat",
- "poznan",
- "priv",
- "prochowice",
- "pruszkow",
- "przeworsk",
- "pulawy",
- "radom",
- "rawa-maz",
- "realestate",
- "rel",
- "rybnik",
- "rzeszow",
- "sanok",
- "sejny",
- "sex",
- "shop",
- "sklep",
- "skoczow",
- "slask",
- "slupsk",
- "sopot",
- "sos",
- "sosnowiec",
- "stalowa-wola",
- "starachowice",
- "stargard",
- "suwalki",
- "swidnica",
- "swiebodzin",
- "swinoujscie",
- "szczecin",
- "szczytno",
- "szkola",
- "targi",
- "tarnobrzeg",
- "tgory",
- "tm",
- "tourism",
- "travel",
- "turek",
- "turystyka",
- "tychy",
- "ustka",
- "walbrzych",
- "warmia",
- "warszawa",
- "waw",
- "wegrow",
- "wielun",
- "wlocl",
- "wloclawek",
- "wodzislaw",
- "wolomin",
- "wroc",
- "wroclaw",
- "zachpomor",
- "zagan",
- "zakopane",
- "zarow",
- "zgora",
- "zgorzelec",
- "ap",
- "griw",
- "ic",
- "is",
- "kmpsp",
- "konsulat",
- "kppsp",
- "kwp",
- "kwpsp",
- "mup",
- "mw",
- "oirm",
- "oum",
- "pa",
- "pinb",
- "piw",
- "po",
- "psp",
- "psse",
- "pup",
- "rzgw",
- "sa",
- "sdn",
- "sko",
- "so",
- "sr",
- "starostwo",
- "ug",
- "ugim",
- "um",
- "umig",
- "upow",
- "uppo",
- "us",
- "uw",
- "uzs",
- "wif",
- "wiih",
- "winb",
- "wios",
- "witd",
- "wiw",
- "wsa",
- "wskr",
- "wuoz",
- "wzmiuw",
- "zp",
- "co",
- "edu",
- "gov",
- "net",
- "org",
- "ac",
- "biz",
- "com",
- "edu",
- "est",
- "gov",
- "info",
- "isla",
- "name",
- "net",
- "org",
- "pro",
- "prof",
- "aaa",
- "aca",
- "acct",
- "avocat",
- "bar",
- "cloudns",
- "cpa",
- "eng",
- "jur",
- "law",
- "med",
- "recht",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "plo",
- "sec",
- "blogspot",
- "com",
- "edu",
- "gov",
- "int",
- "net",
- "nome",
- "nym",
- "org",
- "publ",
- "belau",
- "cloudns",
- "co",
- "ed",
- "go",
- "ne",
- "nom",
- "or",
- "com",
- "coop",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "blogspot",
- "com",
- "edu",
- "gov",
- "mil",
- "name",
- "net",
- "nom",
- "org",
- "sch",
- "asso",
- "blogspot",
- "com",
- "nom",
- "ybo",
- "clan",
- "arts",
- "blogspot",
- "com",
- "firm",
- "info",
- "nom",
- "nt",
- "org",
- "rec",
- "shop",
- "store",
- "tm",
- "www",
- "lima-city",
- "myddns",
- "webspace",
- "ac",
- "blogspot",
- "co",
- "edu",
- "gov",
- "in",
- "nom",
- "org",
- "ac",
- "adygeya",
- "bashkiria",
- "bir",
- "blogspot",
- "cbg",
- "cldmail",
- "com",
- "dagestan",
- "edu",
- "gov",
- "grozny",
- "int",
- "kalmykia",
- "kustanai",
- "marine",
- "mil",
- "mordovia",
- "msk",
- "mytis",
- "nalchik",
- "net",
- "nov",
- "org",
- "pp",
- "pyatigorsk",
- "spb",
- "test",
- "vladikavkaz",
- "vladimir",
- "hb",
- "ac",
- "co",
- "com",
- "edu",
- "gouv",
- "gov",
- "int",
- "mil",
- "net",
- "com",
- "edu",
- "gov",
- "med",
- "net",
- "org",
- "pub",
- "sch",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "ybo",
- "com",
- "edu",
- "gov",
- "info",
- "med",
- "net",
- "org",
- "tv",
- "a",
- "ac",
- "b",
- "bd",
- "blogspot",
- "brand",
- "c",
- "com",
- "d",
- "e",
- "f",
- "fh",
- "fhsk",
- "fhv",
- "g",
- "h",
- "i",
- "k",
- "komforb",
- "kommunalforbund",
- "komvux",
- "l",
- "lanbib",
- "m",
- "n",
- "naturbruksgymn",
- "o",
- "org",
- "p",
- "parti",
- "pp",
- "press",
- "r",
- "s",
- "t",
- "tm",
- "u",
- "w",
- "x",
- "y",
- "z",
- "blogspot",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "per",
- "com",
- "gov",
- "hashbang",
- "mil",
- "net",
- "now",
- "org",
- "platform",
- "wedeploy",
- "blogspot",
- "nom",
- "byen",
- "cyon",
- "platformsh",
- "blogspot",
- "nym",
- "com",
- "edu",
- "gov",
- "net",
- "org",
- "art",
- "blogspot",
- "com",
- "edu",
- "gouv",
- "org",
- "perso",
- "univ",
- "com",
- "net",
- "org",
- "stackspace",
- "uber",
- "xs4all",
- "co",
- "com",
- "consulado",
- "edu",
- "embaixada",
- "gov",
- "mil",
- "net",
- "org",
- "principe",
- "saotome",
- "store",
- "abkhazia",
- "adygeya",
- "aktyubinsk",
- "arkhangelsk",
- "armenia",
- "ashgabad",
- "azerbaijan",
- "balashov",
- "bashkiria",
- "bryansk",
- "bukhara",
- "chimkent",
- "dagestan",
- "east-kazakhstan",
- "exnet",
- "georgia",
- "grozny",
- "ivanovo",
- "jambyl",
- "kalmykia",
- "kaluga",
- "karacol",
- "karaganda",
- "karelia",
- "khakassia",
- "krasnodar",
- "kurgan",
- "kustanai",
- "lenug",
- "mangyshlak",
- "mordovia",
- "msk",
- "murmansk",
- "nalchik",
- "navoi",
- "north-kazakhstan",
- "nov",
- "nym",
- "obninsk",
- "penza",
- "pokrovsk",
- "sochi",
- "spb",
- "tashkent",
- "termez",
- "togliatti",
- "troitsk",
- "tselinograd",
- "tula",
- "tuva",
- "vladikavkaz",
- "vladimir",
- "vologda",
- "barsy",
- "com",
- "edu",
- "gob",
- "org",
- "red",
- "gov",
- "nym",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "knightpoint",
- "ac",
- "co",
- "org",
- "blogspot",
- "ac",
- "co",
- "go",
- "in",
- "mi",
- "net",
- "or",
- "ac",
- "biz",
- "co",
- "com",
- "edu",
- "go",
- "gov",
- "int",
- "mil",
- "name",
- "net",
- "nic",
- "org",
- "test",
- "web",
- "gov",
- "co",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "nom",
- "org",
- "agrinet",
- "com",
- "defense",
- "edunet",
- "ens",
- "fin",
- "gov",
- "ind",
- "info",
- "intl",
- "mincom",
- "nat",
- "net",
- "org",
- "perso",
- "rnrt",
- "rns",
- "rnu",
- "tourism",
- "turen",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "org",
- "vpnplus",
- "av",
- "bbs",
- "bel",
- "biz",
- "com",
- "dr",
- "edu",
- "gen",
- "gov",
- "info",
- "k12",
- "kep",
- "mil",
- "name",
- "nc",
- "net",
- "org",
- "pol",
- "tel",
- "tv",
- "web",
- "blogspot",
- "gov",
- "ybo",
- "aero",
- "biz",
- "co",
- "com",
- "coop",
- "edu",
- "gov",
- "info",
- "int",
- "jobs",
- "mobi",
- "museum",
- "name",
- "net",
- "org",
- "pro",
- "travel",
- "better-than",
- "dyndns",
- "on-the-web",
- "worse-than",
- "blogspot",
- "club",
- "com",
- "ebiz",
- "edu",
- "game",
- "gov",
- "idv",
- "mil",
- "net",
- "nym",
- "org",
- "url",
- "xn--czrw28b",
- "xn--uc0atv",
- "xn--zf0ao64a",
- "mymailer",
- "ac",
- "co",
- "go",
- "hotel",
- "info",
- "me",
- "mil",
- "mobi",
- "ne",
- "or",
- "sc",
- "tv",
- "biz",
- "cc",
- "cherkassy",
- "cherkasy",
- "chernigov",
- "chernihiv",
- "chernivtsi",
- "chernovtsy",
- "ck",
- "cn",
- "co",
- "com",
- "cr",
- "crimea",
- "cv",
- "dn",
- "dnepropetrovsk",
- "dnipropetrovsk",
- "dominic",
- "donetsk",
- "dp",
- "edu",
- "gov",
- "if",
- "in",
- "inf",
- "ivano-frankivsk",
- "kh",
- "kharkiv",
- "kharkov",
- "kherson",
- "khmelnitskiy",
- "khmelnytskyi",
- "kiev",
- "kirovograd",
- "km",
- "kr",
- "krym",
- "ks",
- "kv",
- "kyiv",
- "lg",
- "lt",
- "ltd",
- "lugansk",
- "lutsk",
- "lv",
- "lviv",
- "mk",
- "mykolaiv",
- "net",
- "nikolaev",
- "od",
- "odesa",
- "odessa",
- "org",
- "pl",
- "poltava",
- "pp",
- "rivne",
- "rovno",
- "rv",
- "sb",
- "sebastopol",
- "sevastopol",
- "sm",
- "sumy",
- "te",
- "ternopil",
- "uz",
- "uzhgorod",
- "vinnica",
- "vinnytsia",
- "vn",
- "volyn",
- "yalta",
- "zaporizhzhe",
- "zaporizhzhia",
- "zhitomir",
- "zhytomyr",
- "zp",
- "zt",
- "ac",
- "blogspot",
- "co",
- "com",
- "go",
- "ne",
- "nom",
- "or",
- "org",
- "sc",
- "ac",
- "co",
- "gov",
- "ltd",
- "me",
- "net",
- "nhs",
- "org",
- "plc",
- "police",
- "sch",
- "blogspot",
- "no-ip",
- "wellbeingzone",
- "homeoffice",
- "service",
- "ak",
- "al",
- "ar",
- "as",
- "az",
- "ca",
- "cloudns",
- "co",
- "ct",
- "dc",
- "de",
- "dni",
- "drud",
- "fed",
- "fl",
- "ga",
- "golffan",
- "gu",
- "hi",
- "ia",
- "id",
- "il",
- "in",
- "is-by",
- "isa",
- "kids",
- "ks",
- "ky",
- "la",
- "land-4-sale",
- "ma",
- "md",
- "me",
- "mi",
- "mn",
- "mo",
- "ms",
- "mt",
- "nc",
- "nd",
- "ne",
- "nh",
- "nj",
- "nm",
- "noip",
- "nsn",
- "nv",
- "ny",
- "oh",
- "ok",
- "or",
- "pa",
- "pointto",
- "pr",
- "ri",
- "sc",
- "sd",
- "stuff-4-sale",
- "tn",
- "tx",
- "ut",
- "va",
- "vi",
- "vt",
- "wa",
- "wi",
- "wv",
- "wy",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "chtr",
- "paroch",
- "pvt",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "ann-arbor",
- "cc",
- "cog",
- "dst",
- "eaton",
- "gen",
- "k12",
- "lib",
- "mus",
- "tec",
- "washtenaw",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "k12",
- "lib",
- "cc",
- "cc",
- "k12",
- "lib",
- "com",
- "edu",
- "gub",
- "mil",
- "net",
- "nom",
- "org",
- "blogspot",
- "co",
- "com",
- "net",
- "org",
- "com",
- "edu",
- "gov",
- "mil",
- "net",
- "nom",
- "org",
- "arts",
- "co",
- "com",
- "e12",
- "edu",
- "firm",
- "gob",
- "gov",
- "info",
- "int",
- "mil",
- "net",
- "org",
- "rec",
- "store",
- "tec",
- "web",
- "nom",
- "co",
- "com",
- "k12",
- "net",
- "org",
- "ac",
- "biz",
- "blogspot",
- "com",
- "edu",
- "gov",
- "health",
- "info",
- "int",
- "name",
- "net",
- "org",
- "pro",
- "com",
- "edu",
- "net",
- "org",
- "advisor",
- "com",
- "dyndns",
- "edu",
- "gov",
- "mypets",
- "net",
- "org",
- "xn--80au",
- "xn--90azh",
- "xn--c1avg",
- "xn--d1at",
- "xn--o1ac",
- "xn--o1ach",
- "xn--12c1fe0br",
- "xn--12cfi8ixb8l",
- "xn--12co0c3b4eva",
- "xn--h3cuzk1di",
- "xn--m3ch0j3a",
- "xn--o3cyx2a",
- "blogsite",
- "fhapp",
- "ac",
- "agric",
- "alt",
- "co",
- "edu",
- "gov",
- "grondar",
- "law",
- "mil",
- "net",
- "ngo",
- "nis",
- "nom",
- "org",
- "school",
- "tm",
- "web",
- "blogspot",
- "ac",
- "biz",
- "co",
- "com",
- "edu",
- "gov",
- "info",
- "mil",
- "net",
- "org",
- "sch",
- "lima",
- "triton",
- "ac",
- "co",
- "gov",
- "mil",
- "org",
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address.go
deleted file mode 100644
index e6bfa39e9..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address.go
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import "runtime"
-
-// An Addr represents an address associated with packet routing.
-type Addr interface {
- // Family returns an address family.
- Family() int
-}
-
-// A LinkAddr represents a link-layer address.
-type LinkAddr struct {
- Index int // interface index when attached
- Name string // interface name when attached
- Addr []byte // link-layer address when attached
-}
-
-// Family implements the Family method of Addr interface.
-func (a *LinkAddr) Family() int { return sysAF_LINK }
-
-func (a *LinkAddr) lenAndSpace() (int, int) {
- l := 8 + len(a.Name) + len(a.Addr)
- return l, roundup(l)
-}
-
-func (a *LinkAddr) marshal(b []byte) (int, error) {
- l, ll := a.lenAndSpace()
- if len(b) < ll {
- return 0, errShortBuffer
- }
- nlen, alen := len(a.Name), len(a.Addr)
- if nlen > 255 || alen > 255 {
- return 0, errInvalidAddr
- }
- b[0] = byte(l)
- b[1] = sysAF_LINK
- if a.Index > 0 {
- nativeEndian.PutUint16(b[2:4], uint16(a.Index))
- }
- data := b[8:]
- if nlen > 0 {
- b[5] = byte(nlen)
- copy(data[:nlen], a.Addr)
- data = data[nlen:]
- }
- if alen > 0 {
- b[6] = byte(alen)
- copy(data[:alen], a.Name)
- data = data[alen:]
- }
- return ll, nil
-}
-
-func parseLinkAddr(b []byte) (Addr, error) {
- if len(b) < 8 {
- return nil, errInvalidAddr
- }
- _, a, err := parseKernelLinkAddr(sysAF_LINK, b[4:])
- if err != nil {
- return nil, err
- }
- a.(*LinkAddr).Index = int(nativeEndian.Uint16(b[2:4]))
- return a, nil
-}
-
-// parseKernelLinkAddr parses b as a link-layer address in
-// conventional BSD kernel form.
-func parseKernelLinkAddr(_ int, b []byte) (int, Addr, error) {
- // The encoding looks like the following:
- // +----------------------------+
- // | Type (1 octet) |
- // +----------------------------+
- // | Name length (1 octet) |
- // +----------------------------+
- // | Address length (1 octet) |
- // +----------------------------+
- // | Selector length (1 octet) |
- // +----------------------------+
- // | Data (variable) |
- // +----------------------------+
- //
- // On some platforms, all-bit-one of length field means "don't
- // care".
- nlen, alen, slen := int(b[1]), int(b[2]), int(b[3])
- if nlen == 0xff {
- nlen = 0
- }
- if alen == 0xff {
- alen = 0
- }
- if slen == 0xff {
- slen = 0
- }
- l := 4 + nlen + alen + slen
- if len(b) < l {
- return 0, nil, errInvalidAddr
- }
- data := b[4:]
- var name string
- var addr []byte
- if nlen > 0 {
- name = string(data[:nlen])
- data = data[nlen:]
- }
- if alen > 0 {
- addr = data[:alen]
- data = data[alen:]
- }
- return l, &LinkAddr{Name: name, Addr: addr}, nil
-}
-
-// An Inet4Addr represents an internet address for IPv4.
-type Inet4Addr struct {
- IP [4]byte // IP address
-}
-
-// Family implements the Family method of Addr interface.
-func (a *Inet4Addr) Family() int { return sysAF_INET }
-
-func (a *Inet4Addr) lenAndSpace() (int, int) {
- return sizeofSockaddrInet, roundup(sizeofSockaddrInet)
-}
-
-func (a *Inet4Addr) marshal(b []byte) (int, error) {
- l, ll := a.lenAndSpace()
- if len(b) < ll {
- return 0, errShortBuffer
- }
- b[0] = byte(l)
- b[1] = sysAF_INET
- copy(b[4:8], a.IP[:])
- return ll, nil
-}
-
-// An Inet6Addr represents an internet address for IPv6.
-type Inet6Addr struct {
- IP [16]byte // IP address
- ZoneID int // zone identifier
-}
-
-// Family implements the Family method of Addr interface.
-func (a *Inet6Addr) Family() int { return sysAF_INET6 }
-
-func (a *Inet6Addr) lenAndSpace() (int, int) {
- return sizeofSockaddrInet6, roundup(sizeofSockaddrInet6)
-}
-
-func (a *Inet6Addr) marshal(b []byte) (int, error) {
- l, ll := a.lenAndSpace()
- if len(b) < ll {
- return 0, errShortBuffer
- }
- b[0] = byte(l)
- b[1] = sysAF_INET6
- copy(b[8:24], a.IP[:])
- if a.ZoneID > 0 {
- nativeEndian.PutUint32(b[24:28], uint32(a.ZoneID))
- }
- return ll, nil
-}
-
-// parseInetAddr parses b as an internet address for IPv4 or IPv6.
-func parseInetAddr(af int, b []byte) (Addr, error) {
- switch af {
- case sysAF_INET:
- if len(b) < sizeofSockaddrInet {
- return nil, errInvalidAddr
- }
- a := &Inet4Addr{}
- copy(a.IP[:], b[4:8])
- return a, nil
- case sysAF_INET6:
- if len(b) < sizeofSockaddrInet6 {
- return nil, errInvalidAddr
- }
- a := &Inet6Addr{ZoneID: int(nativeEndian.Uint32(b[24:28]))}
- copy(a.IP[:], b[8:24])
- if a.IP[0] == 0xfe && a.IP[1]&0xc0 == 0x80 || a.IP[0] == 0xff && (a.IP[1]&0x0f == 0x01 || a.IP[1]&0x0f == 0x02) {
- // KAME based IPv6 protocol stack usually
- // embeds the interface index in the
- // interface-local or link-local address as
- // the kernel-internal form.
- id := int(bigEndian.Uint16(a.IP[2:4]))
- if id != 0 {
- a.ZoneID = id
- a.IP[2], a.IP[3] = 0, 0
- }
- }
- return a, nil
- default:
- return nil, errInvalidAddr
- }
-}
-
-// parseKernelInetAddr parses b as an internet address in conventional
-// BSD kernel form.
-func parseKernelInetAddr(af int, b []byte) (int, Addr, error) {
- // The encoding looks similar to the NLRI encoding.
- // +----------------------------+
- // | Length (1 octet) |
- // +----------------------------+
- // | Address prefix (variable) |
- // +----------------------------+
- //
- // The differences between the kernel form and the NLRI
- // encoding are:
- //
- // - The length field of the kernel form indicates the prefix
- // length in bytes, not in bits
- //
- // - In the kernel form, zero value of the length field
- // doesn't mean 0.0.0.0/0 or ::/0
- //
- // - The kernel form appends leading bytes to the prefix field
- // to make the <length, prefix> tuple to be conformed with
- // the routing message boundary
- l := int(b[0])
- if runtime.GOOS == "darwin" {
- // On Darwn, an address in the kernel form is also
- // used as a message filler.
- if l == 0 || len(b) > roundup(l) {
- l = roundup(l)
- }
- } else {
- l = roundup(l)
- }
- if len(b) < l {
- return 0, nil, errInvalidAddr
- }
- // Don't reorder case expressions.
- // The case expressions for IPv6 must come first.
- const (
- off4 = 4 // offset of in_addr
- off6 = 8 // offset of in6_addr
- )
- switch {
- case b[0] == sizeofSockaddrInet6:
- a := &Inet6Addr{}
- copy(a.IP[:], b[off6:off6+16])
- return int(b[0]), a, nil
- case af == sysAF_INET6:
- a := &Inet6Addr{}
- if l-1 < off6 {
- copy(a.IP[:], b[1:l])
- } else {
- copy(a.IP[:], b[l-off6:l])
- }
- return int(b[0]), a, nil
- case b[0] == sizeofSockaddrInet:
- a := &Inet4Addr{}
- copy(a.IP[:], b[off4:off4+4])
- return int(b[0]), a, nil
- default: // an old fashion, AF_UNSPEC or unknown means AF_INET
- a := &Inet4Addr{}
- if l-1 < off4 {
- copy(a.IP[:], b[1:l])
- } else {
- copy(a.IP[:], b[l-off4:l])
- }
- return int(b[0]), a, nil
- }
-}
-
-// A DefaultAddr represents an address of various operating
-// system-specific features.
-type DefaultAddr struct {
- af int
- Raw []byte // raw format of address
-}
-
-// Family implements the Family method of Addr interface.
-func (a *DefaultAddr) Family() int { return a.af }
-
-func (a *DefaultAddr) lenAndSpace() (int, int) {
- l := len(a.Raw)
- return l, roundup(l)
-}
-
-func (a *DefaultAddr) marshal(b []byte) (int, error) {
- l, ll := a.lenAndSpace()
- if len(b) < ll {
- return 0, errShortBuffer
- }
- if l > 255 {
- return 0, errInvalidAddr
- }
- b[1] = byte(l)
- copy(b[:l], a.Raw)
- return ll, nil
-}
-
-func parseDefaultAddr(b []byte) (Addr, error) {
- if len(b) < 2 || len(b) < int(b[0]) {
- return nil, errInvalidAddr
- }
- a := &DefaultAddr{af: int(b[1]), Raw: b[:b[0]]}
- return a, nil
-}
-
-func addrsSpace(as []Addr) int {
- var l int
- for _, a := range as {
- switch a := a.(type) {
- case *LinkAddr:
- _, ll := a.lenAndSpace()
- l += ll
- case *Inet4Addr:
- _, ll := a.lenAndSpace()
- l += ll
- case *Inet6Addr:
- _, ll := a.lenAndSpace()
- l += ll
- case *DefaultAddr:
- _, ll := a.lenAndSpace()
- l += ll
- }
- }
- return l
-}
-
-// marshalAddrs marshals as and returns a bitmap indicating which
-// address is stored in b.
-func marshalAddrs(b []byte, as []Addr) (uint, error) {
- var attrs uint
- for i, a := range as {
- switch a := a.(type) {
- case *LinkAddr:
- l, err := a.marshal(b)
- if err != nil {
- return 0, err
- }
- b = b[l:]
- attrs |= 1 << uint(i)
- case *Inet4Addr:
- l, err := a.marshal(b)
- if err != nil {
- return 0, err
- }
- b = b[l:]
- attrs |= 1 << uint(i)
- case *Inet6Addr:
- l, err := a.marshal(b)
- if err != nil {
- return 0, err
- }
- b = b[l:]
- attrs |= 1 << uint(i)
- case *DefaultAddr:
- l, err := a.marshal(b)
- if err != nil {
- return 0, err
- }
- b = b[l:]
- attrs |= 1 << uint(i)
- }
- }
- return attrs, nil
-}
-
-func parseAddrs(attrs uint, fn func(int, []byte) (int, Addr, error), b []byte) ([]Addr, error) {
- var as [sysRTAX_MAX]Addr
- af := int(sysAF_UNSPEC)
- for i := uint(0); i < sysRTAX_MAX && len(b) >= roundup(0); i++ {
- if attrs&(1<<i) == 0 {
- continue
- }
- if i <= sysRTAX_BRD {
- switch b[1] {
- case sysAF_LINK:
- a, err := parseLinkAddr(b)
- if err != nil {
- return nil, err
- }
- as[i] = a
- l := roundup(int(b[0]))
- if len(b) < l {
- return nil, errMessageTooShort
- }
- b = b[l:]
- case sysAF_INET, sysAF_INET6:
- af = int(b[1])
- a, err := parseInetAddr(af, b)
- if err != nil {
- return nil, err
- }
- as[i] = a
- l := roundup(int(b[0]))
- if len(b) < l {
- return nil, errMessageTooShort
- }
- b = b[l:]
- default:
- l, a, err := fn(af, b)
- if err != nil {
- return nil, err
- }
- as[i] = a
- ll := roundup(l)
- if len(b) < ll {
- b = b[l:]
- } else {
- b = b[ll:]
- }
- }
- } else {
- a, err := parseDefaultAddr(b)
- if err != nil {
- return nil, err
- }
- as[i] = a
- l := roundup(int(b[0]))
- if len(b) < l {
- return nil, errMessageTooShort
- }
- b = b[l:]
- }
- }
- return as[:], nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_darwin_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_darwin_test.go
deleted file mode 100644
index b86bd3df1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_darwin_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import (
- "reflect"
- "testing"
-)
-
-type parseAddrsOnDarwinTest struct {
- attrs uint
- fn func(int, []byte) (int, Addr, error)
- b []byte
- as []Addr
-}
-
-var parseAddrsOnDarwinLittleEndianTests = []parseAddrsOnDarwinTest{
- {
- sysRTA_DST | sysRTA_GATEWAY | sysRTA_NETMASK,
- parseKernelInetAddr,
- []byte{
- 0x10, 0x2, 0x0, 0x0, 0xc0, 0xa8, 0x56, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- 0x14, 0x12, 0x4, 0x0, 0x6, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
-
- 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
- []Addr{
- &Inet4Addr{IP: [4]byte{192, 168, 86, 0}},
- &LinkAddr{Index: 4},
- &Inet4Addr{IP: [4]byte{255, 255, 255, 255}},
- nil,
- nil,
- nil,
- nil,
- nil,
- },
- },
-}
-
-func TestParseAddrsOnDarwin(t *testing.T) {
- tests := parseAddrsOnDarwinLittleEndianTests
- if nativeEndian != littleEndian {
- t.Skip("no test for non-little endian machine yet")
- }
-
- for i, tt := range tests {
- as, err := parseAddrs(tt.attrs, tt.fn, tt.b)
- if err != nil {
- t.Error(i, err)
- continue
- }
- if !reflect.DeepEqual(as, tt.as) {
- t.Errorf("#%d: got %+v; want %+v", i, as, tt.as)
- continue
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_test.go
deleted file mode 100644
index 2005ef7c2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/address_test.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import (
- "reflect"
- "testing"
-)
-
-type parseAddrsTest struct {
- attrs uint
- fn func(int, []byte) (int, Addr, error)
- b []byte
- as []Addr
-}
-
-var parseAddrsLittleEndianTests = []parseAddrsTest{
- {
- sysRTA_DST | sysRTA_GATEWAY | sysRTA_NETMASK | sysRTA_BRD,
- parseKernelInetAddr,
- []byte{
- 0x38, 0x12, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- 0x38, 0x12, 0x2, 0x0, 0x6, 0x3, 0x6, 0x0,
- 0x65, 0x6d, 0x31, 0x0, 0xc, 0x29, 0x66, 0x2c,
- 0xdc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- 0x10, 0x2, 0x0, 0x0, 0xac, 0x10, 0xdc, 0xb4,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- 0x10, 0x2, 0x0, 0x0, 0xac, 0x10, 0xdc, 0xff,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- },
- []Addr{
- &LinkAddr{Index: 0},
- &LinkAddr{Index: 2, Name: "em1", Addr: []byte{0x00, 0x0c, 0x29, 0x66, 0x2c, 0xdc}},
- &Inet4Addr{IP: [4]byte{172, 16, 220, 180}},
- nil,
- nil,
- nil,
- nil,
- &Inet4Addr{IP: [4]byte{172, 16, 220, 255}},
- },
- },
- {
- sysRTA_NETMASK | sysRTA_IFP | sysRTA_IFA,
- parseKernelInetAddr,
- []byte{
- 0x7, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0,
-
- 0x18, 0x12, 0xa, 0x0, 0x87, 0x8, 0x0, 0x0,
- 0x76, 0x6c, 0x61, 0x6e, 0x35, 0x36, 0x38, 0x32,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- 0x10, 0x2, 0x0, 0x0, 0xa9, 0xfe, 0x0, 0x1,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- },
- []Addr{
- nil,
- nil,
- &Inet4Addr{IP: [4]byte{255, 255, 255, 0}},
- nil,
- &LinkAddr{Index: 10, Name: "vlan5682"},
- &Inet4Addr{IP: [4]byte{169, 254, 0, 1}},
- nil,
- nil,
- },
- },
-}
-
-func TestParseAddrs(t *testing.T) {
- tests := parseAddrsLittleEndianTests
- if nativeEndian != littleEndian {
- t.Skip("no test for non-little endian machine yet")
- }
-
- for i, tt := range tests {
- as, err := parseAddrs(tt.attrs, tt.fn, tt.b)
- if err != nil {
- t.Error(i, err)
- continue
- }
- as = as[:8] // the list varies between operating systems
- if !reflect.DeepEqual(as, tt.as) {
- t.Errorf("#%d: got %+v; want %+v", i, as, tt.as)
- continue
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/binary.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/binary.go
deleted file mode 100644
index 6910520ec..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/binary.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-// This file contains duplicates of encoding/binary package.
-//
-// This package is supposed to be used by the net package of standard
-// library. Therefore the package set used in the package must be the
-// same as net package.
-
-var (
- littleEndian binaryLittleEndian
- bigEndian binaryBigEndian
-)
-
-type binaryByteOrder interface {
- Uint16([]byte) uint16
- Uint32([]byte) uint32
- PutUint16([]byte, uint16)
- PutUint32([]byte, uint32)
- Uint64([]byte) uint64
-}
-
-type binaryLittleEndian struct{}
-
-func (binaryLittleEndian) Uint16(b []byte) uint16 {
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint16(b[0]) | uint16(b[1])<<8
-}
-
-func (binaryLittleEndian) PutUint16(b []byte, v uint16) {
- _ = b[1] // early bounds check to guarantee safety of writes below
- b[0] = byte(v)
- b[1] = byte(v >> 8)
-}
-
-func (binaryLittleEndian) Uint32(b []byte) uint32 {
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func (binaryLittleEndian) PutUint32(b []byte, v uint32) {
- _ = b[3] // early bounds check to guarantee safety of writes below
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
-}
-
-func (binaryLittleEndian) Uint64(b []byte) uint64 {
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
- uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
-}
-
-type binaryBigEndian struct{}
-
-func (binaryBigEndian) Uint16(b []byte) uint16 {
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint16(b[1]) | uint16(b[0])<<8
-}
-
-func (binaryBigEndian) PutUint16(b []byte, v uint16) {
- _ = b[1] // early bounds check to guarantee safety of writes below
- b[0] = byte(v >> 8)
- b[1] = byte(v)
-}
-
-func (binaryBigEndian) Uint32(b []byte) uint32 {
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24
-}
-
-func (binaryBigEndian) PutUint32(b []byte, v uint32) {
- _ = b[3] // early bounds check to guarantee safety of writes below
- b[0] = byte(v >> 24)
- b[1] = byte(v >> 16)
- b[2] = byte(v >> 8)
- b[3] = byte(v)
-}
-
-func (binaryBigEndian) Uint64(b []byte) uint64 {
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
- uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_darwin.go
deleted file mode 100644
index e7716442d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_darwin.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-package route
-
-/*
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_ROUTE = C.AF_ROUTE
- sysAF_LINK = C.AF_LINK
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-
- sysNET_RT_DUMP = C.NET_RT_DUMP
- sysNET_RT_FLAGS = C.NET_RT_FLAGS
- sysNET_RT_IFLIST = C.NET_RT_IFLIST
- sysNET_RT_STAT = C.NET_RT_STAT
- sysNET_RT_TRASH = C.NET_RT_TRASH
- sysNET_RT_IFLIST2 = C.NET_RT_IFLIST2
- sysNET_RT_DUMP2 = C.NET_RT_DUMP2
- sysNET_RT_MAXID = C.NET_RT_MAXID
-)
-
-const (
- sysCTL_MAXNAME = C.CTL_MAXNAME
-
- sysCTL_UNSPEC = C.CTL_UNSPEC
- sysCTL_KERN = C.CTL_KERN
- sysCTL_VM = C.CTL_VM
- sysCTL_VFS = C.CTL_VFS
- sysCTL_NET = C.CTL_NET
- sysCTL_DEBUG = C.CTL_DEBUG
- sysCTL_HW = C.CTL_HW
- sysCTL_MACHDEP = C.CTL_MACHDEP
- sysCTL_USER = C.CTL_USER
- sysCTL_MAXID = C.CTL_MAXID
-)
-
-const (
- sysRTM_VERSION = C.RTM_VERSION
-
- sysRTM_ADD = C.RTM_ADD
- sysRTM_DELETE = C.RTM_DELETE
- sysRTM_CHANGE = C.RTM_CHANGE
- sysRTM_GET = C.RTM_GET
- sysRTM_LOSING = C.RTM_LOSING
- sysRTM_REDIRECT = C.RTM_REDIRECT
- sysRTM_MISS = C.RTM_MISS
- sysRTM_LOCK = C.RTM_LOCK
- sysRTM_OLDADD = C.RTM_OLDADD
- sysRTM_OLDDEL = C.RTM_OLDDEL
- sysRTM_RESOLVE = C.RTM_RESOLVE
- sysRTM_NEWADDR = C.RTM_NEWADDR
- sysRTM_DELADDR = C.RTM_DELADDR
- sysRTM_IFINFO = C.RTM_IFINFO
- sysRTM_NEWMADDR = C.RTM_NEWMADDR
- sysRTM_DELMADDR = C.RTM_DELMADDR
- sysRTM_IFINFO2 = C.RTM_IFINFO2
- sysRTM_NEWMADDR2 = C.RTM_NEWMADDR2
- sysRTM_GET2 = C.RTM_GET2
-
- sysRTA_DST = C.RTA_DST
- sysRTA_GATEWAY = C.RTA_GATEWAY
- sysRTA_NETMASK = C.RTA_NETMASK
- sysRTA_GENMASK = C.RTA_GENMASK
- sysRTA_IFP = C.RTA_IFP
- sysRTA_IFA = C.RTA_IFA
- sysRTA_AUTHOR = C.RTA_AUTHOR
- sysRTA_BRD = C.RTA_BRD
-
- sysRTAX_DST = C.RTAX_DST
- sysRTAX_GATEWAY = C.RTAX_GATEWAY
- sysRTAX_NETMASK = C.RTAX_NETMASK
- sysRTAX_GENMASK = C.RTAX_GENMASK
- sysRTAX_IFP = C.RTAX_IFP
- sysRTAX_IFA = C.RTAX_IFA
- sysRTAX_AUTHOR = C.RTAX_AUTHOR
- sysRTAX_BRD = C.RTAX_BRD
- sysRTAX_MAX = C.RTAX_MAX
-)
-
-const (
- sizeofIfMsghdrDarwin15 = C.sizeof_struct_if_msghdr
- sizeofIfaMsghdrDarwin15 = C.sizeof_struct_ifa_msghdr
- sizeofIfmaMsghdrDarwin15 = C.sizeof_struct_ifma_msghdr
- sizeofIfMsghdr2Darwin15 = C.sizeof_struct_if_msghdr2
- sizeofIfmaMsghdr2Darwin15 = C.sizeof_struct_ifma_msghdr2
- sizeofIfDataDarwin15 = C.sizeof_struct_if_data
- sizeofIfData64Darwin15 = C.sizeof_struct_if_data64
-
- sizeofRtMsghdrDarwin15 = C.sizeof_struct_rt_msghdr
- sizeofRtMsghdr2Darwin15 = C.sizeof_struct_rt_msghdr2
- sizeofRtMetricsDarwin15 = C.sizeof_struct_rt_metrics
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_dragonfly.go
deleted file mode 100644
index dd31de269..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_dragonfly.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-package route
-
-/*
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_ROUTE = C.AF_ROUTE
- sysAF_LINK = C.AF_LINK
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-
- sysNET_RT_DUMP = C.NET_RT_DUMP
- sysNET_RT_FLAGS = C.NET_RT_FLAGS
- sysNET_RT_IFLIST = C.NET_RT_IFLIST
- sysNET_RT_MAXID = C.NET_RT_MAXID
-)
-
-const (
- sysCTL_MAXNAME = C.CTL_MAXNAME
-
- sysCTL_UNSPEC = C.CTL_UNSPEC
- sysCTL_KERN = C.CTL_KERN
- sysCTL_VM = C.CTL_VM
- sysCTL_VFS = C.CTL_VFS
- sysCTL_NET = C.CTL_NET
- sysCTL_DEBUG = C.CTL_DEBUG
- sysCTL_HW = C.CTL_HW
- sysCTL_MACHDEP = C.CTL_MACHDEP
- sysCTL_USER = C.CTL_USER
- sysCTL_P1003_1B = C.CTL_P1003_1B
- sysCTL_LWKT = C.CTL_LWKT
- sysCTL_MAXID = C.CTL_MAXID
-)
-
-const (
- sysRTM_VERSION = C.RTM_VERSION
-
- sysRTM_ADD = C.RTM_ADD
- sysRTM_DELETE = C.RTM_DELETE
- sysRTM_CHANGE = C.RTM_CHANGE
- sysRTM_GET = C.RTM_GET
- sysRTM_LOSING = C.RTM_LOSING
- sysRTM_REDIRECT = C.RTM_REDIRECT
- sysRTM_MISS = C.RTM_MISS
- sysRTM_LOCK = C.RTM_LOCK
- sysRTM_OLDADD = C.RTM_OLDADD
- sysRTM_OLDDEL = C.RTM_OLDDEL
- sysRTM_RESOLVE = C.RTM_RESOLVE
- sysRTM_NEWADDR = C.RTM_NEWADDR
- sysRTM_DELADDR = C.RTM_DELADDR
- sysRTM_IFINFO = C.RTM_IFINFO
- sysRTM_NEWMADDR = C.RTM_NEWMADDR
- sysRTM_DELMADDR = C.RTM_DELMADDR
- sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
- sysRTM_IEEE80211 = C.RTM_IEEE80211
-
- sysRTA_DST = C.RTA_DST
- sysRTA_GATEWAY = C.RTA_GATEWAY
- sysRTA_NETMASK = C.RTA_NETMASK
- sysRTA_GENMASK = C.RTA_GENMASK
- sysRTA_IFP = C.RTA_IFP
- sysRTA_IFA = C.RTA_IFA
- sysRTA_AUTHOR = C.RTA_AUTHOR
- sysRTA_BRD = C.RTA_BRD
- sysRTA_MPLS1 = C.RTA_MPLS1
- sysRTA_MPLS2 = C.RTA_MPLS2
- sysRTA_MPLS3 = C.RTA_MPLS3
-
- sysRTAX_DST = C.RTAX_DST
- sysRTAX_GATEWAY = C.RTAX_GATEWAY
- sysRTAX_NETMASK = C.RTAX_NETMASK
- sysRTAX_GENMASK = C.RTAX_GENMASK
- sysRTAX_IFP = C.RTAX_IFP
- sysRTAX_IFA = C.RTAX_IFA
- sysRTAX_AUTHOR = C.RTAX_AUTHOR
- sysRTAX_BRD = C.RTAX_BRD
- sysRTAX_MPLS1 = C.RTAX_MPLS1
- sysRTAX_MPLS2 = C.RTAX_MPLS2
- sysRTAX_MPLS3 = C.RTAX_MPLS3
- sysRTAX_MAX = C.RTAX_MAX
-)
-
-const (
- sizeofIfMsghdrDragonFlyBSD4 = C.sizeof_struct_if_msghdr
- sizeofIfaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifa_msghdr
- sizeofIfmaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifma_msghdr
- sizeofIfAnnouncemsghdrDragonFlyBSD4 = C.sizeof_struct_if_announcemsghdr
-
- sizeofRtMsghdrDragonFlyBSD4 = C.sizeof_struct_rt_msghdr
- sizeofRtMetricsDragonFlyBSD4 = C.sizeof_struct_rt_metrics
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_freebsd.go
deleted file mode 100644
index d95594d8e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_freebsd.go
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-package route
-
-/*
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-
-struct if_data_freebsd7 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t __ifi_epoch;
- struct timeval __ifi_lastchange;
-};
-
-struct if_data_freebsd8 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t __ifi_epoch;
- struct timeval __ifi_lastchange;
-};
-
-struct if_data_freebsd9 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t __ifi_epoch;
- struct timeval __ifi_lastchange;
-};
-
-struct if_data_freebsd10 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_vhid;
- u_char ifi_baudrate_pf;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- uint64_t ifi_hwassist;
- time_t __ifi_epoch;
- struct timeval __ifi_lastchange;
-};
-
-struct if_data_freebsd11 {
- uint8_t ifi_type;
- uint8_t ifi_physical;
- uint8_t ifi_addrlen;
- uint8_t ifi_hdrlen;
- uint8_t ifi_link_state;
- uint8_t ifi_vhid;
- uint16_t ifi_datalen;
- uint32_t ifi_mtu;
- uint32_t ifi_metric;
- uint64_t ifi_baudrate;
- uint64_t ifi_ipackets;
- uint64_t ifi_ierrors;
- uint64_t ifi_opackets;
- uint64_t ifi_oerrors;
- uint64_t ifi_collisions;
- uint64_t ifi_ibytes;
- uint64_t ifi_obytes;
- uint64_t ifi_imcasts;
- uint64_t ifi_omcasts;
- uint64_t ifi_iqdrops;
- uint64_t ifi_oqdrops;
- uint64_t ifi_noproto;
- uint64_t ifi_hwassist;
- union {
- time_t tt;
- uint64_t ph;
- } __ifi_epoch;
- union {
- struct timeval tv;
- struct {
- uint64_t ph1;
- uint64_t ph2;
- } ph;
- } __ifi_lastchange;
-};
-
-struct if_msghdr_freebsd7 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data_freebsd7 ifm_data;
-};
-
-struct if_msghdr_freebsd8 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data_freebsd8 ifm_data;
-};
-
-struct if_msghdr_freebsd9 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data_freebsd9 ifm_data;
-};
-
-struct if_msghdr_freebsd10 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data_freebsd10 ifm_data;
-};
-
-struct if_msghdr_freebsd11 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data_freebsd11 ifm_data;
-};
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_ROUTE = C.AF_ROUTE
- sysAF_LINK = C.AF_LINK
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-
- sysNET_RT_DUMP = C.NET_RT_DUMP
- sysNET_RT_FLAGS = C.NET_RT_FLAGS
- sysNET_RT_IFLIST = C.NET_RT_IFLIST
- sysNET_RT_IFMALIST = C.NET_RT_IFMALIST
- sysNET_RT_IFLISTL = C.NET_RT_IFLISTL
-)
-
-const (
- sysCTL_MAXNAME = C.CTL_MAXNAME
-
- sysCTL_UNSPEC = C.CTL_UNSPEC
- sysCTL_KERN = C.CTL_KERN
- sysCTL_VM = C.CTL_VM
- sysCTL_VFS = C.CTL_VFS
- sysCTL_NET = C.CTL_NET
- sysCTL_DEBUG = C.CTL_DEBUG
- sysCTL_HW = C.CTL_HW
- sysCTL_MACHDEP = C.CTL_MACHDEP
- sysCTL_USER = C.CTL_USER
- sysCTL_P1003_1B = C.CTL_P1003_1B
-)
-
-const (
- sysRTM_VERSION = C.RTM_VERSION
-
- sysRTM_ADD = C.RTM_ADD
- sysRTM_DELETE = C.RTM_DELETE
- sysRTM_CHANGE = C.RTM_CHANGE
- sysRTM_GET = C.RTM_GET
- sysRTM_LOSING = C.RTM_LOSING
- sysRTM_REDIRECT = C.RTM_REDIRECT
- sysRTM_MISS = C.RTM_MISS
- sysRTM_LOCK = C.RTM_LOCK
- sysRTM_RESOLVE = C.RTM_RESOLVE
- sysRTM_NEWADDR = C.RTM_NEWADDR
- sysRTM_DELADDR = C.RTM_DELADDR
- sysRTM_IFINFO = C.RTM_IFINFO
- sysRTM_NEWMADDR = C.RTM_NEWMADDR
- sysRTM_DELMADDR = C.RTM_DELMADDR
- sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
- sysRTM_IEEE80211 = C.RTM_IEEE80211
-
- sysRTA_DST = C.RTA_DST
- sysRTA_GATEWAY = C.RTA_GATEWAY
- sysRTA_NETMASK = C.RTA_NETMASK
- sysRTA_GENMASK = C.RTA_GENMASK
- sysRTA_IFP = C.RTA_IFP
- sysRTA_IFA = C.RTA_IFA
- sysRTA_AUTHOR = C.RTA_AUTHOR
- sysRTA_BRD = C.RTA_BRD
-
- sysRTAX_DST = C.RTAX_DST
- sysRTAX_GATEWAY = C.RTAX_GATEWAY
- sysRTAX_NETMASK = C.RTAX_NETMASK
- sysRTAX_GENMASK = C.RTAX_GENMASK
- sysRTAX_IFP = C.RTAX_IFP
- sysRTAX_IFA = C.RTAX_IFA
- sysRTAX_AUTHOR = C.RTAX_AUTHOR
- sysRTAX_BRD = C.RTAX_BRD
- sysRTAX_MAX = C.RTAX_MAX
-)
-
-const (
- sizeofIfMsghdrlFreeBSD10 = C.sizeof_struct_if_msghdrl
- sizeofIfaMsghdrFreeBSD10 = C.sizeof_struct_ifa_msghdr
- sizeofIfaMsghdrlFreeBSD10 = C.sizeof_struct_ifa_msghdrl
- sizeofIfmaMsghdrFreeBSD10 = C.sizeof_struct_ifma_msghdr
- sizeofIfAnnouncemsghdrFreeBSD10 = C.sizeof_struct_if_announcemsghdr
-
- sizeofRtMsghdrFreeBSD10 = C.sizeof_struct_rt_msghdr
- sizeofRtMetricsFreeBSD10 = C.sizeof_struct_rt_metrics
-
- sizeofIfMsghdrFreeBSD7 = C.sizeof_struct_if_msghdr_freebsd7
- sizeofIfMsghdrFreeBSD8 = C.sizeof_struct_if_msghdr_freebsd8
- sizeofIfMsghdrFreeBSD9 = C.sizeof_struct_if_msghdr_freebsd9
- sizeofIfMsghdrFreeBSD10 = C.sizeof_struct_if_msghdr_freebsd10
- sizeofIfMsghdrFreeBSD11 = C.sizeof_struct_if_msghdr_freebsd11
-
- sizeofIfDataFreeBSD7 = C.sizeof_struct_if_data_freebsd7
- sizeofIfDataFreeBSD8 = C.sizeof_struct_if_data_freebsd8
- sizeofIfDataFreeBSD9 = C.sizeof_struct_if_data_freebsd9
- sizeofIfDataFreeBSD10 = C.sizeof_struct_if_data_freebsd10
- sizeofIfDataFreeBSD11 = C.sizeof_struct_if_data_freebsd11
-
- sizeofIfMsghdrlFreeBSD10Emu = C.sizeof_struct_if_msghdrl
- sizeofIfaMsghdrFreeBSD10Emu = C.sizeof_struct_ifa_msghdr
- sizeofIfaMsghdrlFreeBSD10Emu = C.sizeof_struct_ifa_msghdrl
- sizeofIfmaMsghdrFreeBSD10Emu = C.sizeof_struct_ifma_msghdr
- sizeofIfAnnouncemsghdrFreeBSD10Emu = C.sizeof_struct_if_announcemsghdr
-
- sizeofRtMsghdrFreeBSD10Emu = C.sizeof_struct_rt_msghdr
- sizeofRtMetricsFreeBSD10Emu = C.sizeof_struct_rt_metrics
-
- sizeofIfMsghdrFreeBSD7Emu = C.sizeof_struct_if_msghdr_freebsd7
- sizeofIfMsghdrFreeBSD8Emu = C.sizeof_struct_if_msghdr_freebsd8
- sizeofIfMsghdrFreeBSD9Emu = C.sizeof_struct_if_msghdr_freebsd9
- sizeofIfMsghdrFreeBSD10Emu = C.sizeof_struct_if_msghdr_freebsd10
- sizeofIfMsghdrFreeBSD11Emu = C.sizeof_struct_if_msghdr_freebsd11
-
- sizeofIfDataFreeBSD7Emu = C.sizeof_struct_if_data_freebsd7
- sizeofIfDataFreeBSD8Emu = C.sizeof_struct_if_data_freebsd8
- sizeofIfDataFreeBSD9Emu = C.sizeof_struct_if_data_freebsd9
- sizeofIfDataFreeBSD10Emu = C.sizeof_struct_if_data_freebsd10
- sizeofIfDataFreeBSD11Emu = C.sizeof_struct_if_data_freebsd11
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_netbsd.go
deleted file mode 100644
index b0abd549a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_netbsd.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-package route
-
-/*
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_ROUTE = C.AF_ROUTE
- sysAF_LINK = C.AF_LINK
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-
- sysNET_RT_DUMP = C.NET_RT_DUMP
- sysNET_RT_FLAGS = C.NET_RT_FLAGS
- sysNET_RT_IFLIST = C.NET_RT_IFLIST
- sysNET_RT_MAXID = C.NET_RT_MAXID
-)
-
-const (
- sysCTL_MAXNAME = C.CTL_MAXNAME
-
- sysCTL_UNSPEC = C.CTL_UNSPEC
- sysCTL_KERN = C.CTL_KERN
- sysCTL_VM = C.CTL_VM
- sysCTL_VFS = C.CTL_VFS
- sysCTL_NET = C.CTL_NET
- sysCTL_DEBUG = C.CTL_DEBUG
- sysCTL_HW = C.CTL_HW
- sysCTL_MACHDEP = C.CTL_MACHDEP
- sysCTL_USER = C.CTL_USER
- sysCTL_DDB = C.CTL_DDB
- sysCTL_PROC = C.CTL_PROC
- sysCTL_VENDOR = C.CTL_VENDOR
- sysCTL_EMUL = C.CTL_EMUL
- sysCTL_SECURITY = C.CTL_SECURITY
- sysCTL_MAXID = C.CTL_MAXID
-)
-
-const (
- sysRTM_VERSION = C.RTM_VERSION
-
- sysRTM_ADD = C.RTM_ADD
- sysRTM_DELETE = C.RTM_DELETE
- sysRTM_CHANGE = C.RTM_CHANGE
- sysRTM_GET = C.RTM_GET
- sysRTM_LOSING = C.RTM_LOSING
- sysRTM_REDIRECT = C.RTM_REDIRECT
- sysRTM_MISS = C.RTM_MISS
- sysRTM_LOCK = C.RTM_LOCK
- sysRTM_OLDADD = C.RTM_OLDADD
- sysRTM_OLDDEL = C.RTM_OLDDEL
- sysRTM_RESOLVE = C.RTM_RESOLVE
- sysRTM_NEWADDR = C.RTM_NEWADDR
- sysRTM_DELADDR = C.RTM_DELADDR
- sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
- sysRTM_IEEE80211 = C.RTM_IEEE80211
- sysRTM_SETGATE = C.RTM_SETGATE
- sysRTM_LLINFO_UPD = C.RTM_LLINFO_UPD
- sysRTM_IFINFO = C.RTM_IFINFO
- sysRTM_CHGADDR = C.RTM_CHGADDR
-
- sysRTA_DST = C.RTA_DST
- sysRTA_GATEWAY = C.RTA_GATEWAY
- sysRTA_NETMASK = C.RTA_NETMASK
- sysRTA_GENMASK = C.RTA_GENMASK
- sysRTA_IFP = C.RTA_IFP
- sysRTA_IFA = C.RTA_IFA
- sysRTA_AUTHOR = C.RTA_AUTHOR
- sysRTA_BRD = C.RTA_BRD
- sysRTA_TAG = C.RTA_TAG
-
- sysRTAX_DST = C.RTAX_DST
- sysRTAX_GATEWAY = C.RTAX_GATEWAY
- sysRTAX_NETMASK = C.RTAX_NETMASK
- sysRTAX_GENMASK = C.RTAX_GENMASK
- sysRTAX_IFP = C.RTAX_IFP
- sysRTAX_IFA = C.RTAX_IFA
- sysRTAX_AUTHOR = C.RTAX_AUTHOR
- sysRTAX_BRD = C.RTAX_BRD
- sysRTAX_TAG = C.RTAX_TAG
- sysRTAX_MAX = C.RTAX_MAX
-)
-
-const (
- sizeofIfMsghdrNetBSD7 = C.sizeof_struct_if_msghdr
- sizeofIfaMsghdrNetBSD7 = C.sizeof_struct_ifa_msghdr
- sizeofIfAnnouncemsghdrNetBSD7 = C.sizeof_struct_if_announcemsghdr
-
- sizeofRtMsghdrNetBSD7 = C.sizeof_struct_rt_msghdr
- sizeofRtMetricsNetBSD7 = C.sizeof_struct_rt_metrics
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_openbsd.go
deleted file mode 100644
index 173bb5d51..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/defs_openbsd.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build ignore
-
-package route
-
-/*
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_ROUTE = C.AF_ROUTE
- sysAF_LINK = C.AF_LINK
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-
- sysNET_RT_DUMP = C.NET_RT_DUMP
- sysNET_RT_FLAGS = C.NET_RT_FLAGS
- sysNET_RT_IFLIST = C.NET_RT_IFLIST
- sysNET_RT_STATS = C.NET_RT_STATS
- sysNET_RT_TABLE = C.NET_RT_TABLE
- sysNET_RT_IFNAMES = C.NET_RT_IFNAMES
- sysNET_RT_MAXID = C.NET_RT_MAXID
-)
-
-const (
- sysCTL_MAXNAME = C.CTL_MAXNAME
-
- sysCTL_UNSPEC = C.CTL_UNSPEC
- sysCTL_KERN = C.CTL_KERN
- sysCTL_VM = C.CTL_VM
- sysCTL_FS = C.CTL_FS
- sysCTL_NET = C.CTL_NET
- sysCTL_DEBUG = C.CTL_DEBUG
- sysCTL_HW = C.CTL_HW
- sysCTL_MACHDEP = C.CTL_MACHDEP
- sysCTL_DDB = C.CTL_DDB
- sysCTL_VFS = C.CTL_VFS
- sysCTL_MAXID = C.CTL_MAXID
-)
-
-const (
- sysRTM_VERSION = C.RTM_VERSION
-
- sysRTM_ADD = C.RTM_ADD
- sysRTM_DELETE = C.RTM_DELETE
- sysRTM_CHANGE = C.RTM_CHANGE
- sysRTM_GET = C.RTM_GET
- sysRTM_LOSING = C.RTM_LOSING
- sysRTM_REDIRECT = C.RTM_REDIRECT
- sysRTM_MISS = C.RTM_MISS
- sysRTM_LOCK = C.RTM_LOCK
- sysRTM_RESOLVE = C.RTM_RESOLVE
- sysRTM_NEWADDR = C.RTM_NEWADDR
- sysRTM_DELADDR = C.RTM_DELADDR
- sysRTM_IFINFO = C.RTM_IFINFO
- sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
- sysRTM_DESYNC = C.RTM_DESYNC
- sysRTM_INVALIDATE = C.RTM_INVALIDATE
- sysRTM_BFD = C.RTM_BFD
- sysRTM_PROPOSAL = C.RTM_PROPOSAL
-
- sysRTA_DST = C.RTA_DST
- sysRTA_GATEWAY = C.RTA_GATEWAY
- sysRTA_NETMASK = C.RTA_NETMASK
- sysRTA_GENMASK = C.RTA_GENMASK
- sysRTA_IFP = C.RTA_IFP
- sysRTA_IFA = C.RTA_IFA
- sysRTA_AUTHOR = C.RTA_AUTHOR
- sysRTA_BRD = C.RTA_BRD
- sysRTA_SRC = C.RTA_SRC
- sysRTA_SRCMASK = C.RTA_SRCMASK
- sysRTA_LABEL = C.RTA_LABEL
- sysRTA_BFD = C.RTA_BFD
- sysRTA_DNS = C.RTA_DNS
- sysRTA_STATIC = C.RTA_STATIC
- sysRTA_SEARCH = C.RTA_SEARCH
-
- sysRTAX_DST = C.RTAX_DST
- sysRTAX_GATEWAY = C.RTAX_GATEWAY
- sysRTAX_NETMASK = C.RTAX_NETMASK
- sysRTAX_GENMASK = C.RTAX_GENMASK
- sysRTAX_IFP = C.RTAX_IFP
- sysRTAX_IFA = C.RTAX_IFA
- sysRTAX_AUTHOR = C.RTAX_AUTHOR
- sysRTAX_BRD = C.RTAX_BRD
- sysRTAX_SRC = C.RTAX_SRC
- sysRTAX_SRCMASK = C.RTAX_SRCMASK
- sysRTAX_LABEL = C.RTAX_LABEL
- sysRTAX_BFD = C.RTAX_BFD
- sysRTAX_DNS = C.RTAX_DNS
- sysRTAX_STATIC = C.RTAX_STATIC
- sysRTAX_SEARCH = C.RTAX_SEARCH
- sysRTAX_MAX = C.RTAX_MAX
-)
-
-const (
- sizeofRtMsghdr = C.sizeof_struct_rt_msghdr
-
- sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface.go
deleted file mode 100644
index 854906d9c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-// An InterfaceMessage represents an interface message.
-type InterfaceMessage struct {
- Version int // message version
- Type int // message type
- Flags int // interface flags
- Index int // interface index
- Name string // interface name
- Addrs []Addr // addresses
-
- extOff int // offset of header extension
- raw []byte // raw message
-}
-
-// An InterfaceAddrMessage represents an interface address message.
-type InterfaceAddrMessage struct {
- Version int // message version
- Type int // message type
- Flags int // interface flags
- Index int // interface index
- Addrs []Addr // addresses
-
- raw []byte // raw message
-}
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceAddrMessage) Sys() []Sys { return nil }
-
-// An InterfaceMulticastAddrMessage represents an interface multicast
-// address message.
-type InterfaceMulticastAddrMessage struct {
- Version int // message version
- Type int // messsage type
- Flags int // interface flags
- Index int // interface index
- Addrs []Addr // addresses
-
- raw []byte // raw message
-}
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil }
-
-// An InterfaceAnnounceMessage represents an interface announcement
-// message.
-type InterfaceAnnounceMessage struct {
- Version int // message version
- Type int // message type
- Index int // interface index
- Name string // interface name
- What int // what type of announcement
-
- raw []byte // raw message
-}
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_announce.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_announce.go
deleted file mode 100644
index 520d657b5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_announce.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build dragonfly freebsd netbsd
-
-package route
-
-func (w *wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < w.bodyOff {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &InterfaceAnnounceMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Index: int(nativeEndian.Uint16(b[4:6])),
- What: int(nativeEndian.Uint16(b[22:24])),
- raw: b[:l],
- }
- for i := 0; i < 16; i++ {
- if b[6+i] != 0 {
- continue
- }
- m.Name = string(b[6 : 6+i])
- break
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_classic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_classic.go
deleted file mode 100644
index ac4e7a680..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_classic.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly netbsd
-
-package route
-
-import "runtime"
-
-func (w *wireFormat) parseInterfaceMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < w.bodyOff {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- attrs := uint(nativeEndian.Uint32(b[4:8]))
- if attrs&sysRTA_IFP == 0 {
- return nil, nil
- }
- m := &InterfaceMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Addrs: make([]Addr, sysRTAX_MAX),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- Index: int(nativeEndian.Uint16(b[12:14])),
- extOff: w.extOff,
- raw: b[:l],
- }
- a, err := parseLinkAddr(b[w.bodyOff:])
- if err != nil {
- return nil, err
- }
- m.Addrs[sysRTAX_IFP] = a
- m.Name = a.(*LinkAddr).Name
- return m, nil
-}
-
-func (w *wireFormat) parseInterfaceAddrMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < w.bodyOff {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &InterfaceAddrMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- raw: b[:l],
- }
- if runtime.GOOS == "netbsd" {
- m.Index = int(nativeEndian.Uint16(b[16:18]))
- } else {
- m.Index = int(nativeEndian.Uint16(b[12:14]))
- }
- var err error
- m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[w.bodyOff:])
- if err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_freebsd.go
deleted file mode 100644
index 9f6f50c00..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_freebsd.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-func (w *wireFormat) parseInterfaceMessage(typ RIBType, b []byte) (Message, error) {
- var extOff, bodyOff int
- if typ == sysNET_RT_IFLISTL {
- if len(b) < 20 {
- return nil, errMessageTooShort
- }
- extOff = int(nativeEndian.Uint16(b[18:20]))
- bodyOff = int(nativeEndian.Uint16(b[16:18]))
- } else {
- extOff = w.extOff
- bodyOff = w.bodyOff
- }
- if len(b) < extOff || len(b) < bodyOff {
- return nil, errInvalidMessage
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- attrs := uint(nativeEndian.Uint32(b[4:8]))
- if attrs&sysRTA_IFP == 0 {
- return nil, nil
- }
- m := &InterfaceMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- Index: int(nativeEndian.Uint16(b[12:14])),
- Addrs: make([]Addr, sysRTAX_MAX),
- extOff: extOff,
- raw: b[:l],
- }
- a, err := parseLinkAddr(b[bodyOff:])
- if err != nil {
- return nil, err
- }
- m.Addrs[sysRTAX_IFP] = a
- m.Name = a.(*LinkAddr).Name
- return m, nil
-}
-
-func (w *wireFormat) parseInterfaceAddrMessage(typ RIBType, b []byte) (Message, error) {
- var bodyOff int
- if typ == sysNET_RT_IFLISTL {
- if len(b) < 24 {
- return nil, errMessageTooShort
- }
- bodyOff = int(nativeEndian.Uint16(b[16:18]))
- } else {
- bodyOff = w.bodyOff
- }
- if len(b) < bodyOff {
- return nil, errInvalidMessage
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &InterfaceAddrMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- Index: int(nativeEndian.Uint16(b[12:14])),
- raw: b[:l],
- }
- var err error
- m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[bodyOff:])
- if err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_multicast.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_multicast.go
deleted file mode 100644
index 1e99a9cc6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_multicast.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd
-
-package route
-
-func (w *wireFormat) parseInterfaceMulticastAddrMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < w.bodyOff {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &InterfaceMulticastAddrMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- Index: int(nativeEndian.Uint16(b[12:14])),
- raw: b[:l],
- }
- var err error
- m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[w.bodyOff:])
- if err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_openbsd.go
deleted file mode 100644
index e4a143c1c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/interface_openbsd.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-func (*wireFormat) parseInterfaceMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < 32 {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- attrs := uint(nativeEndian.Uint32(b[12:16]))
- if attrs&sysRTA_IFP == 0 {
- return nil, nil
- }
- m := &InterfaceMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[16:20])),
- Index: int(nativeEndian.Uint16(b[6:8])),
- Addrs: make([]Addr, sysRTAX_MAX),
- raw: b[:l],
- }
- ll := int(nativeEndian.Uint16(b[4:6]))
- if len(b) < ll {
- return nil, errInvalidMessage
- }
- a, err := parseLinkAddr(b[ll:])
- if err != nil {
- return nil, err
- }
- m.Addrs[sysRTAX_IFP] = a
- m.Name = a.(*LinkAddr).Name
- return m, nil
-}
-
-func (*wireFormat) parseInterfaceAddrMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < 24 {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- bodyOff := int(nativeEndian.Uint16(b[4:6]))
- if len(b) < bodyOff {
- return nil, errInvalidMessage
- }
- m := &InterfaceAddrMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[12:16])),
- Index: int(nativeEndian.Uint16(b[6:8])),
- raw: b[:l],
- }
- var err error
- m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[bodyOff:])
- if err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (*wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < 26 {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &InterfaceAnnounceMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Index: int(nativeEndian.Uint16(b[6:8])),
- What: int(nativeEndian.Uint16(b[8:10])),
- raw: b[:l],
- }
- for i := 0; i < 16; i++ {
- if b[10+i] != 0 {
- continue
- }
- m.Name = string(b[10 : 10+i])
- break
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message.go
deleted file mode 100644
index 0fa7e09f4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-// A Message represents a routing message.
-type Message interface {
- // Sys returns operating system-specific information.
- Sys() []Sys
-}
-
-// A Sys reprensents operating system-specific information.
-type Sys interface {
- // SysType returns a type of operating system-specific
- // information.
- SysType() SysType
-}
-
-// A SysType represents a type of operating system-specific
-// information.
-type SysType int
-
-const (
- SysMetrics SysType = iota
- SysStats
-)
-
-// ParseRIB parses b as a routing information base and returns a list
-// of routing messages.
-func ParseRIB(typ RIBType, b []byte) ([]Message, error) {
- if !typ.parseable() {
- return nil, errUnsupportedMessage
- }
- var msgs []Message
- nmsgs, nskips := 0, 0
- for len(b) > 4 {
- nmsgs++
- l := int(nativeEndian.Uint16(b[:2]))
- if l == 0 {
- return nil, errInvalidMessage
- }
- if len(b) < l {
- return nil, errMessageTooShort
- }
- if b[2] != sysRTM_VERSION {
- b = b[l:]
- continue
- }
- if w, ok := wireFormats[int(b[3])]; !ok {
- nskips++
- } else {
- m, err := w.parse(typ, b)
- if err != nil {
- return nil, err
- }
- if m == nil {
- nskips++
- } else {
- msgs = append(msgs, m)
- }
- }
- b = b[l:]
- }
- // We failed to parse any of the messages - version mismatch?
- if nmsgs != len(msgs)+nskips {
- return nil, errMessageMismatch
- }
- return msgs, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_darwin_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_darwin_test.go
deleted file mode 100644
index 316aa7507..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_darwin_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import "testing"
-
-func TestFetchAndParseRIBOnDarwin(t *testing.T) {
- for _, typ := range []RIBType{sysNET_RT_FLAGS, sysNET_RT_DUMP2, sysNET_RT_IFLIST2} {
- var lastErr error
- var ms []Message
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- rs, err := fetchAndParseRIB(af, typ)
- if err != nil {
- lastErr = err
- continue
- }
- ms = append(ms, rs...)
- }
- if len(ms) == 0 && lastErr != nil {
- t.Error(typ, lastErr)
- continue
- }
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Error(typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_freebsd_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_freebsd_test.go
deleted file mode 100644
index db4b56752..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_freebsd_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import (
- "testing"
- "unsafe"
-)
-
-func TestFetchAndParseRIBOnFreeBSD(t *testing.T) {
- for _, typ := range []RIBType{sysNET_RT_IFMALIST} {
- var lastErr error
- var ms []Message
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- rs, err := fetchAndParseRIB(af, typ)
- if err != nil {
- lastErr = err
- continue
- }
- ms = append(ms, rs...)
- }
- if len(ms) == 0 && lastErr != nil {
- t.Error(typ, lastErr)
- continue
- }
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Error(typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(s)
- }
- }
-}
-
-func TestFetchAndParseRIBOnFreeBSD10AndAbove(t *testing.T) {
- if _, err := FetchRIB(sysAF_UNSPEC, sysNET_RT_IFLISTL, 0); err != nil {
- t.Skip("NET_RT_IFLISTL not supported")
- }
- var p uintptr
- if kernelAlign != int(unsafe.Sizeof(p)) {
- t.Skip("NET_RT_IFLIST vs. NET_RT_IFLISTL doesn't work for 386 emulation on amd64")
- }
-
- var tests = [2]struct {
- typ RIBType
- b []byte
- msgs []Message
- ss []string
- }{
- {typ: sysNET_RT_IFLIST},
- {typ: sysNET_RT_IFLISTL},
- }
- for i := range tests {
- var lastErr error
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- rs, err := fetchAndParseRIB(af, tests[i].typ)
- if err != nil {
- lastErr = err
- continue
- }
- tests[i].msgs = append(tests[i].msgs, rs...)
- }
- if len(tests[i].msgs) == 0 && lastErr != nil {
- t.Error(tests[i].typ, lastErr)
- continue
- }
- tests[i].ss, lastErr = msgs(tests[i].msgs).validate()
- if lastErr != nil {
- t.Error(tests[i].typ, lastErr)
- continue
- }
- for _, s := range tests[i].ss {
- t.Log(s)
- }
- }
- for i := len(tests) - 1; i > 0; i-- {
- if len(tests[i].ss) != len(tests[i-1].ss) {
- t.Errorf("got %v; want %v", tests[i].ss, tests[i-1].ss)
- continue
- }
- for j, s1 := range tests[i].ss {
- s0 := tests[i-1].ss[j]
- if s1 != s0 {
- t.Errorf("got %s; want %s", s1, s0)
- }
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_test.go
deleted file mode 100644
index e848dabf4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/message_test.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import (
- "os"
- "syscall"
- "testing"
- "time"
-)
-
-func TestFetchAndParseRIB(t *testing.T) {
- for _, typ := range []RIBType{sysNET_RT_DUMP, sysNET_RT_IFLIST} {
- var lastErr error
- var ms []Message
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- rs, err := fetchAndParseRIB(af, typ)
- if err != nil {
- lastErr = err
- continue
- }
- ms = append(ms, rs...)
- }
- if len(ms) == 0 && lastErr != nil {
- t.Error(typ, lastErr)
- continue
- }
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Error(typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(typ, s)
- }
- }
-}
-
-var (
- rtmonSock int
- rtmonErr error
-)
-
-func init() {
- // We need to keep rtmonSock alive to avoid treading on
- // recycled socket descriptors.
- rtmonSock, rtmonErr = syscall.Socket(sysAF_ROUTE, sysSOCK_RAW, sysAF_UNSPEC)
-}
-
-// TestMonitorAndParseRIB leaks a worker goroutine and a socket
-// descriptor but that's intentional.
-func TestMonitorAndParseRIB(t *testing.T) {
- if testing.Short() || os.Getuid() != 0 {
- t.Skip("must be root")
- }
-
- if rtmonErr != nil {
- t.Fatal(rtmonErr)
- }
-
- // We suppose that using an IPv4 link-local address and the
- // dot1Q ID for Token Ring and FDDI doesn't harm anyone.
- pv := &propVirtual{addr: "169.254.0.1", mask: "255.255.255.0"}
- if err := pv.configure(1002); err != nil {
- t.Skip(err)
- }
- if err := pv.setup(); err != nil {
- t.Skip(err)
- }
- pv.teardown()
-
- go func() {
- b := make([]byte, os.Getpagesize())
- for {
- // There's no easy way to unblock this read
- // call because the routing message exchange
- // over routing socket is a connectionless
- // message-oriented protocol, no control plane
- // for signaling connectivity, and we cannot
- // use the net package of standard library due
- // to the lack of support for routing socket
- // and circular dependency.
- n, err := syscall.Read(rtmonSock, b)
- if err != nil {
- return
- }
- ms, err := ParseRIB(0, b[:n])
- if err != nil {
- t.Error(err)
- return
- }
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Error(err)
- return
- }
- for _, s := range ss {
- t.Log(s)
- }
- }
- }()
-
- for _, vid := range []int{1002, 1003, 1004, 1005} {
- pv := &propVirtual{addr: "169.254.0.1", mask: "255.255.255.0"}
- if err := pv.configure(vid); err != nil {
- t.Fatal(err)
- }
- if err := pv.setup(); err != nil {
- t.Fatal(err)
- }
- time.Sleep(200 * time.Millisecond)
- if err := pv.teardown(); err != nil {
- t.Fatal(err)
- }
- time.Sleep(200 * time.Millisecond)
- }
-}
-
-func TestParseRIBWithFuzz(t *testing.T) {
- for _, fuzz := range []string{
- "0\x00\x05\x050000000000000000" +
- "00000000000000000000" +
- "00000000000000000000" +
- "00000000000000000000" +
- "0000000000000\x02000000" +
- "00000000",
- "\x02\x00\x05\f0000000000000000" +
- "0\x0200000000000000",
- "\x02\x00\x05\x100000000000000\x1200" +
- "0\x00\xff\x00",
- "\x02\x00\x05\f0000000000000000" +
- "0\x12000\x00\x02\x0000",
- "\x00\x00\x00\x01\x00",
- "00000",
- } {
- for typ := RIBType(0); typ < 256; typ++ {
- ParseRIB(typ, []byte(fuzz))
- }
- }
-}
-
-func TestRouteMessage(t *testing.T) {
- s, err := syscall.Socket(sysAF_ROUTE, sysSOCK_RAW, sysAF_UNSPEC)
- if err != nil {
- t.Fatal(err)
- }
- defer syscall.Close(s)
-
- var ms []RouteMessage
- for _, af := range []int{sysAF_INET, sysAF_INET6} {
- if _, err := fetchAndParseRIB(af, sysNET_RT_DUMP); err != nil {
- t.Log(err)
- continue
- }
- switch af {
- case sysAF_INET:
- ms = append(ms, []RouteMessage{
- {
- Type: sysRTM_GET,
- Addrs: []Addr{
- &Inet4Addr{IP: [4]byte{127, 0, 0, 1}},
- nil,
- nil,
- nil,
- &LinkAddr{},
- &Inet4Addr{},
- nil,
- &Inet4Addr{},
- },
- },
- {
- Type: sysRTM_GET,
- Addrs: []Addr{
- &Inet4Addr{IP: [4]byte{127, 0, 0, 1}},
- },
- },
- }...)
- case sysAF_INET6:
- ms = append(ms, []RouteMessage{
- {
- Type: sysRTM_GET,
- Addrs: []Addr{
- &Inet6Addr{IP: [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}},
- nil,
- nil,
- nil,
- &LinkAddr{},
- &Inet6Addr{},
- nil,
- &Inet6Addr{},
- },
- },
- {
- Type: sysRTM_GET,
- Addrs: []Addr{
- &Inet6Addr{IP: [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}},
- },
- },
- }...)
- }
- }
- for i, m := range ms {
- m.ID = uintptr(os.Getpid())
- m.Seq = i + 1
- wb, err := m.Marshal()
- if err != nil {
- t.Fatalf("%v: %v", m, err)
- }
- if _, err := syscall.Write(s, wb); err != nil {
- t.Fatalf("%v: %v", m, err)
- }
- rb := make([]byte, os.Getpagesize())
- n, err := syscall.Read(s, rb)
- if err != nil {
- t.Fatalf("%v: %v", m, err)
- }
- rms, err := ParseRIB(0, rb[:n])
- if err != nil {
- t.Fatalf("%v: %v", m, err)
- }
- for _, rm := range rms {
- err := rm.(*RouteMessage).Err
- if err != nil {
- t.Errorf("%v: %v", m, err)
- }
- }
- ss, err := msgs(rms).validate()
- if err != nil {
- t.Fatalf("%v: %v", m, err)
- }
- for _, s := range ss {
- t.Log(s)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route.go
deleted file mode 100644
index 081da0d5c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// Package route provides basic functions for the manipulation of
-// packet routing facilities on BSD variants.
-//
-// The package supports any version of Darwin, any version of
-// DragonFly BSD, FreeBSD 7 through 11, NetBSD 6 and above, and
-// OpenBSD 5.6 and above.
-package route
-
-import (
- "errors"
- "os"
- "syscall"
-)
-
-var (
- errUnsupportedMessage = errors.New("unsupported message")
- errMessageMismatch = errors.New("message mismatch")
- errMessageTooShort = errors.New("message too short")
- errInvalidMessage = errors.New("invalid message")
- errInvalidAddr = errors.New("invalid address")
- errShortBuffer = errors.New("short buffer")
-)
-
-// A RouteMessage represents a message conveying an address prefix, a
-// nexthop address and an output interface.
-//
-// Unlike other messages, this message can be used to query adjacency
-// information for the given address prefix, to add a new route, and
-// to delete or modify the existing route from the routing information
-// base inside the kernel by writing and reading route messages on a
-// routing socket.
-//
-// For the manipulation of routing information, the route message must
-// contain appropriate fields that include:
-//
-// Version = <must be specified>
-// Type = <must be specified>
-// Flags = <must be specified>
-// Index = <must be specified if necessary>
-// ID = <must be specified>
-// Seq = <must be specified>
-// Addrs = <must be specified>
-//
-// The Type field specifies a type of manipulation, the Flags field
-// specifies a class of target information and the Addrs field
-// specifies target information like the following:
-//
-// route.RouteMessage{
-// Version: RTM_VERSION,
-// Type: RTM_GET,
-// Flags: RTF_UP | RTF_HOST,
-// ID: uintptr(os.Getpid()),
-// Seq: 1,
-// Addrs: []route.Addrs{
-// RTAX_DST: &route.Inet4Addr{ ... },
-// RTAX_IFP: &route.LinkAddr{ ... },
-// RTAX_BRD: &route.Inet4Addr{ ... },
-// },
-// }
-//
-// The values for the above fields depend on the implementation of
-// each operating system.
-//
-// The Err field on a response message contains an error value on the
-// requested operation. If non-nil, the requested operation is failed.
-type RouteMessage struct {
- Version int // message version
- Type int // message type
- Flags int // route flags
- Index int // interface index when atatched
- ID uintptr // sender's identifier; usually process ID
- Seq int // sequence number
- Err error // error on requested operation
- Addrs []Addr // addresses
-
- extOff int // offset of header extension
- raw []byte // raw message
-}
-
-// Marshal returns the binary encoding of m.
-func (m *RouteMessage) Marshal() ([]byte, error) {
- return m.marshal()
-}
-
-// A RIBType reprensents a type of routing information base.
-type RIBType int
-
-const (
- RIBTypeRoute RIBType = syscall.NET_RT_DUMP
- RIBTypeInterface RIBType = syscall.NET_RT_IFLIST
-)
-
-// FetchRIB fetches a routing information base from the operating
-// system.
-//
-// The provided af must be an address family.
-//
-// The provided arg must be a RIBType-specific argument.
-// When RIBType is related to routes, arg might be a set of route
-// flags. When RIBType is related to network interfaces, arg might be
-// an interface index or a set of interface flags. In most cases, zero
-// means a wildcard.
-func FetchRIB(af int, typ RIBType, arg int) ([]byte, error) {
- mib := [6]int32{sysCTL_NET, sysAF_ROUTE, 0, int32(af), int32(typ), int32(arg)}
- n := uintptr(0)
- if err := sysctl(mib[:], nil, &n, nil, 0); err != nil {
- return nil, os.NewSyscallError("sysctl", err)
- }
- if n == 0 {
- return nil, nil
- }
- b := make([]byte, n)
- if err := sysctl(mib[:], &b[0], &n, nil, 0); err != nil {
- return nil, os.NewSyscallError("sysctl", err)
- }
- return b[:n], nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_classic.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_classic.go
deleted file mode 100644
index 02fa68830..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_classic.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd
-
-package route
-
-import (
- "runtime"
- "syscall"
-)
-
-func (m *RouteMessage) marshal() ([]byte, error) {
- w, ok := wireFormats[m.Type]
- if !ok {
- return nil, errUnsupportedMessage
- }
- l := w.bodyOff + addrsSpace(m.Addrs)
- if runtime.GOOS == "darwin" {
- // Fix stray pointer writes on macOS.
- // See golang.org/issue/22456.
- l += 1024
- }
- b := make([]byte, l)
- nativeEndian.PutUint16(b[:2], uint16(l))
- if m.Version == 0 {
- b[2] = sysRTM_VERSION
- } else {
- b[2] = byte(m.Version)
- }
- b[3] = byte(m.Type)
- nativeEndian.PutUint32(b[8:12], uint32(m.Flags))
- nativeEndian.PutUint16(b[4:6], uint16(m.Index))
- nativeEndian.PutUint32(b[16:20], uint32(m.ID))
- nativeEndian.PutUint32(b[20:24], uint32(m.Seq))
- attrs, err := marshalAddrs(b[w.bodyOff:], m.Addrs)
- if err != nil {
- return nil, err
- }
- if attrs > 0 {
- nativeEndian.PutUint32(b[12:16], uint32(attrs))
- }
- return b, nil
-}
-
-func (w *wireFormat) parseRouteMessage(typ RIBType, b []byte) (Message, error) {
- if len(b) < w.bodyOff {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &RouteMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[8:12])),
- Index: int(nativeEndian.Uint16(b[4:6])),
- ID: uintptr(nativeEndian.Uint32(b[16:20])),
- Seq: int(nativeEndian.Uint32(b[20:24])),
- extOff: w.extOff,
- raw: b[:l],
- }
- errno := syscall.Errno(nativeEndian.Uint32(b[28:32]))
- if errno != 0 {
- m.Err = errno
- }
- var err error
- m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[w.bodyOff:])
- if err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_openbsd.go
deleted file mode 100644
index daf2e90c4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_openbsd.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import "syscall"
-
-func (m *RouteMessage) marshal() ([]byte, error) {
- l := sizeofRtMsghdr + addrsSpace(m.Addrs)
- b := make([]byte, l)
- nativeEndian.PutUint16(b[:2], uint16(l))
- if m.Version == 0 {
- b[2] = sysRTM_VERSION
- } else {
- b[2] = byte(m.Version)
- }
- b[3] = byte(m.Type)
- nativeEndian.PutUint16(b[4:6], uint16(sizeofRtMsghdr))
- nativeEndian.PutUint32(b[16:20], uint32(m.Flags))
- nativeEndian.PutUint16(b[6:8], uint16(m.Index))
- nativeEndian.PutUint32(b[24:28], uint32(m.ID))
- nativeEndian.PutUint32(b[28:32], uint32(m.Seq))
- attrs, err := marshalAddrs(b[sizeofRtMsghdr:], m.Addrs)
- if err != nil {
- return nil, err
- }
- if attrs > 0 {
- nativeEndian.PutUint32(b[12:16], uint32(attrs))
- }
- return b, nil
-}
-
-func (*wireFormat) parseRouteMessage(_ RIBType, b []byte) (Message, error) {
- if len(b) < sizeofRtMsghdr {
- return nil, errMessageTooShort
- }
- l := int(nativeEndian.Uint16(b[:2]))
- if len(b) < l {
- return nil, errInvalidMessage
- }
- m := &RouteMessage{
- Version: int(b[2]),
- Type: int(b[3]),
- Flags: int(nativeEndian.Uint32(b[16:20])),
- Index: int(nativeEndian.Uint16(b[6:8])),
- ID: uintptr(nativeEndian.Uint32(b[24:28])),
- Seq: int(nativeEndian.Uint32(b[28:32])),
- raw: b[:l],
- }
- ll := int(nativeEndian.Uint16(b[4:6]))
- if len(b) < ll {
- return nil, errInvalidMessage
- }
- errno := syscall.Errno(nativeEndian.Uint32(b[32:36]))
- if errno != 0 {
- m.Err = errno
- }
- as, err := parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[ll:])
- if err != nil {
- return nil, err
- }
- m.Addrs = as
- return m, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_test.go
deleted file mode 100644
index 61bd17454..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/route_test.go
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import (
- "fmt"
- "os/exec"
- "runtime"
- "time"
-)
-
-func (m *RouteMessage) String() string {
- return fmt.Sprintf("%s", addrAttrs(nativeEndian.Uint32(m.raw[12:16])))
-}
-
-func (m *InterfaceMessage) String() string {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- return fmt.Sprintf("%s", attrs)
-}
-
-func (m *InterfaceAddrMessage) String() string {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- return fmt.Sprintf("%s", attrs)
-}
-
-func (m *InterfaceMulticastAddrMessage) String() string {
- return fmt.Sprintf("%s", addrAttrs(nativeEndian.Uint32(m.raw[4:8])))
-}
-
-func (m *InterfaceAnnounceMessage) String() string {
- what := "<nil>"
- switch m.What {
- case 0:
- what = "arrival"
- case 1:
- what = "departure"
- }
- return fmt.Sprintf("(%d %s %s)", m.Index, m.Name, what)
-}
-
-func (m *InterfaceMetrics) String() string {
- return fmt.Sprintf("(type=%d mtu=%d)", m.Type, m.MTU)
-}
-
-func (m *RouteMetrics) String() string {
- return fmt.Sprintf("(pmtu=%d)", m.PathMTU)
-}
-
-type addrAttrs uint
-
-var addrAttrNames = [...]string{
- "dst",
- "gateway",
- "netmask",
- "genmask",
- "ifp",
- "ifa",
- "author",
- "brd",
- "df:mpls1-n:tag-o:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd
- "df:mpls2-o:srcmask", // mpls2 for dragonfly, srcmask for openbsd
- "df:mpls3-o:label", // mpls3 for dragonfly, label for openbsd
- "o:bfd", // bfd for openbsd
- "o:dns", // dns for openbsd
- "o:static", // static for openbsd
- "o:search", // search for openbsd
-}
-
-func (attrs addrAttrs) String() string {
- var s string
- for i, name := range addrAttrNames {
- if attrs&(1<<uint(i)) != 0 {
- if s != "" {
- s += "|"
- }
- s += name
- }
- }
- if s == "" {
- return "<nil>"
- }
- return s
-}
-
-type msgs []Message
-
-func (ms msgs) validate() ([]string, error) {
- var ss []string
- for _, m := range ms {
- switch m := m.(type) {
- case *RouteMessage:
- if err := addrs(m.Addrs).match(addrAttrs(nativeEndian.Uint32(m.raw[12:16]))); err != nil {
- return nil, err
- }
- sys := m.Sys()
- if sys == nil {
- return nil, fmt.Errorf("no sys for %s", m.String())
- }
- ss = append(ss, m.String()+" "+syss(sys).String()+" "+addrs(m.Addrs).String())
- case *InterfaceMessage:
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- if err := addrs(m.Addrs).match(attrs); err != nil {
- return nil, err
- }
- sys := m.Sys()
- if sys == nil {
- return nil, fmt.Errorf("no sys for %s", m.String())
- }
- ss = append(ss, m.String()+" "+syss(sys).String()+" "+addrs(m.Addrs).String())
- case *InterfaceAddrMessage:
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- if err := addrs(m.Addrs).match(attrs); err != nil {
- return nil, err
- }
- ss = append(ss, m.String()+" "+addrs(m.Addrs).String())
- case *InterfaceMulticastAddrMessage:
- if err := addrs(m.Addrs).match(addrAttrs(nativeEndian.Uint32(m.raw[4:8]))); err != nil {
- return nil, err
- }
- ss = append(ss, m.String()+" "+addrs(m.Addrs).String())
- case *InterfaceAnnounceMessage:
- ss = append(ss, m.String())
- default:
- ss = append(ss, fmt.Sprintf("%+v", m))
- }
- }
- return ss, nil
-}
-
-type syss []Sys
-
-func (sys syss) String() string {
- var s string
- for _, sy := range sys {
- switch sy := sy.(type) {
- case *InterfaceMetrics:
- if len(s) > 0 {
- s += " "
- }
- s += sy.String()
- case *RouteMetrics:
- if len(s) > 0 {
- s += " "
- }
- s += sy.String()
- }
- }
- return s
-}
-
-type addrFamily int
-
-func (af addrFamily) String() string {
- switch af {
- case sysAF_UNSPEC:
- return "unspec"
- case sysAF_LINK:
- return "link"
- case sysAF_INET:
- return "inet4"
- case sysAF_INET6:
- return "inet6"
- default:
- return fmt.Sprintf("%d", af)
- }
-}
-
-const hexDigit = "0123456789abcdef"
-
-type llAddr []byte
-
-func (a llAddr) String() string {
- if len(a) == 0 {
- return ""
- }
- buf := make([]byte, 0, len(a)*3-1)
- for i, b := range a {
- if i > 0 {
- buf = append(buf, ':')
- }
- buf = append(buf, hexDigit[b>>4])
- buf = append(buf, hexDigit[b&0xF])
- }
- return string(buf)
-}
-
-type ipAddr []byte
-
-func (a ipAddr) String() string {
- if len(a) == 0 {
- return "<nil>"
- }
- if len(a) == 4 {
- return fmt.Sprintf("%d.%d.%d.%d", a[0], a[1], a[2], a[3])
- }
- if len(a) == 16 {
- return fmt.Sprintf("%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15])
- }
- s := make([]byte, len(a)*2)
- for i, tn := range a {
- s[i*2], s[i*2+1] = hexDigit[tn>>4], hexDigit[tn&0xf]
- }
- return string(s)
-}
-
-func (a *LinkAddr) String() string {
- name := a.Name
- if name == "" {
- name = "<nil>"
- }
- lla := llAddr(a.Addr).String()
- if lla == "" {
- lla = "<nil>"
- }
- return fmt.Sprintf("(%v %d %s %s)", addrFamily(a.Family()), a.Index, name, lla)
-}
-
-func (a *Inet4Addr) String() string {
- return fmt.Sprintf("(%v %v)", addrFamily(a.Family()), ipAddr(a.IP[:]))
-}
-
-func (a *Inet6Addr) String() string {
- return fmt.Sprintf("(%v %v %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.ZoneID)
-}
-
-func (a *DefaultAddr) String() string {
- return fmt.Sprintf("(%v %s)", addrFamily(a.Family()), ipAddr(a.Raw[2:]).String())
-}
-
-type addrs []Addr
-
-func (as addrs) String() string {
- var s string
- for _, a := range as {
- if a == nil {
- continue
- }
- if len(s) > 0 {
- s += " "
- }
- switch a := a.(type) {
- case *LinkAddr:
- s += a.String()
- case *Inet4Addr:
- s += a.String()
- case *Inet6Addr:
- s += a.String()
- case *DefaultAddr:
- s += a.String()
- }
- }
- if s == "" {
- return "<nil>"
- }
- return s
-}
-
-func (as addrs) match(attrs addrAttrs) error {
- var ts addrAttrs
- af := sysAF_UNSPEC
- for i := range as {
- if as[i] != nil {
- ts |= 1 << uint(i)
- }
- switch as[i].(type) {
- case *Inet4Addr:
- if af == sysAF_UNSPEC {
- af = sysAF_INET
- }
- if af != sysAF_INET {
- return fmt.Errorf("got %v; want %v", addrs(as), addrFamily(af))
- }
- case *Inet6Addr:
- if af == sysAF_UNSPEC {
- af = sysAF_INET6
- }
- if af != sysAF_INET6 {
- return fmt.Errorf("got %v; want %v", addrs(as), addrFamily(af))
- }
- }
- }
- if ts != attrs && ts > attrs {
- return fmt.Errorf("%v not included in %v", ts, attrs)
- }
- return nil
-}
-
-func fetchAndParseRIB(af int, typ RIBType) ([]Message, error) {
- var err error
- var b []byte
- for i := 0; i < 3; i++ {
- if b, err = FetchRIB(af, typ, 0); err != nil {
- time.Sleep(10 * time.Millisecond)
- continue
- }
- break
- }
- if err != nil {
- return nil, fmt.Errorf("%v %d %v", addrFamily(af), typ, err)
- }
- ms, err := ParseRIB(typ, b)
- if err != nil {
- return nil, fmt.Errorf("%v %d %v", addrFamily(af), typ, err)
- }
- return ms, nil
-}
-
-// propVirtual is a proprietary virtual network interface.
-type propVirtual struct {
- name string
- addr, mask string
- setupCmds []*exec.Cmd
- teardownCmds []*exec.Cmd
-}
-
-func (pv *propVirtual) setup() error {
- for _, cmd := range pv.setupCmds {
- if err := cmd.Run(); err != nil {
- pv.teardown()
- return err
- }
- }
- return nil
-}
-
-func (pv *propVirtual) teardown() error {
- for _, cmd := range pv.teardownCmds {
- if err := cmd.Run(); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (pv *propVirtual) configure(suffix int) error {
- if runtime.GOOS == "openbsd" {
- pv.name = fmt.Sprintf("vether%d", suffix)
- } else {
- pv.name = fmt.Sprintf("vlan%d", suffix)
- }
- xname, err := exec.LookPath("ifconfig")
- if err != nil {
- return err
- }
- pv.setupCmds = append(pv.setupCmds, &exec.Cmd{
- Path: xname,
- Args: []string{"ifconfig", pv.name, "create"},
- })
- if runtime.GOOS == "netbsd" {
- // NetBSD requires an underlying dot1Q-capable network
- // interface.
- pv.setupCmds = append(pv.setupCmds, &exec.Cmd{
- Path: xname,
- Args: []string{"ifconfig", pv.name, "vlan", fmt.Sprintf("%d", suffix&0xfff), "vlanif", "wm0"},
- })
- }
- pv.setupCmds = append(pv.setupCmds, &exec.Cmd{
- Path: xname,
- Args: []string{"ifconfig", pv.name, "inet", pv.addr, "netmask", pv.mask},
- })
- pv.teardownCmds = append(pv.teardownCmds, &exec.Cmd{
- Path: xname,
- Args: []string{"ifconfig", pv.name, "destroy"},
- })
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys.go
deleted file mode 100644
index 3d0ee9b14..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import "unsafe"
-
-var (
- nativeEndian binaryByteOrder
- kernelAlign int
- wireFormats map[int]*wireFormat
-)
-
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- nativeEndian = littleEndian
- } else {
- nativeEndian = bigEndian
- }
- kernelAlign, wireFormats = probeRoutingStack()
-}
-
-func roundup(l int) int {
- if l == 0 {
- return kernelAlign
- }
- return (l + kernelAlign - 1) & ^(kernelAlign - 1)
-}
-
-type wireFormat struct {
- extOff int // offset of header extension
- bodyOff int // offset of message body
- parse func(RIBType, []byte) (Message, error)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_darwin.go
deleted file mode 100644
index d2daf5c05..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_darwin.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-func (typ RIBType) parseable() bool {
- switch typ {
- case sysNET_RT_STAT, sysNET_RT_TRASH:
- return false
- default:
- return true
- }
-}
-
-// RouteMetrics represents route metrics.
-type RouteMetrics struct {
- PathMTU int // path maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *RouteMessage) Sys() []Sys {
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint32(m.raw[m.extOff+4 : m.extOff+8])),
- },
- }
-}
-
-// InterfaceMetrics represents interface metrics.
-type InterfaceMetrics struct {
- Type int // interface type
- MTU int // maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMessage) Sys() []Sys {
- return []Sys{
- &InterfaceMetrics{
- Type: int(m.raw[m.extOff]),
- MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])),
- },
- }
-}
-
-func probeRoutingStack() (int, map[int]*wireFormat) {
- rtm := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdrDarwin15}
- rtm.parse = rtm.parseRouteMessage
- rtm2 := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdr2Darwin15}
- rtm2.parse = rtm2.parseRouteMessage
- ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrDarwin15}
- ifm.parse = ifm.parseInterfaceMessage
- ifm2 := &wireFormat{extOff: 32, bodyOff: sizeofIfMsghdr2Darwin15}
- ifm2.parse = ifm2.parseInterfaceMessage
- ifam := &wireFormat{extOff: sizeofIfaMsghdrDarwin15, bodyOff: sizeofIfaMsghdrDarwin15}
- ifam.parse = ifam.parseInterfaceAddrMessage
- ifmam := &wireFormat{extOff: sizeofIfmaMsghdrDarwin15, bodyOff: sizeofIfmaMsghdrDarwin15}
- ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage
- ifmam2 := &wireFormat{extOff: sizeofIfmaMsghdr2Darwin15, bodyOff: sizeofIfmaMsghdr2Darwin15}
- ifmam2.parse = ifmam2.parseInterfaceMulticastAddrMessage
- // Darwin kernels require 32-bit aligned access to routing facilities.
- return 4, map[int]*wireFormat{
- sysRTM_ADD: rtm,
- sysRTM_DELETE: rtm,
- sysRTM_CHANGE: rtm,
- sysRTM_GET: rtm,
- sysRTM_LOSING: rtm,
- sysRTM_REDIRECT: rtm,
- sysRTM_MISS: rtm,
- sysRTM_LOCK: rtm,
- sysRTM_RESOLVE: rtm,
- sysRTM_NEWADDR: ifam,
- sysRTM_DELADDR: ifam,
- sysRTM_IFINFO: ifm,
- sysRTM_NEWMADDR: ifmam,
- sysRTM_DELMADDR: ifmam,
- sysRTM_IFINFO2: ifm2,
- sysRTM_NEWMADDR2: ifmam2,
- sysRTM_GET2: rtm2,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_dragonfly.go
deleted file mode 100644
index 0c14bc2b4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_dragonfly.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import "unsafe"
-
-func (typ RIBType) parseable() bool { return true }
-
-// RouteMetrics represents route metrics.
-type RouteMetrics struct {
- PathMTU int // path maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *RouteMessage) Sys() []Sys {
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])),
- },
- }
-}
-
-// InterfaceMetrics represents interface metrics.
-type InterfaceMetrics struct {
- Type int // interface type
- MTU int // maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMessage) Sys() []Sys {
- return []Sys{
- &InterfaceMetrics{
- Type: int(m.raw[m.extOff]),
- MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])),
- },
- }
-}
-
-func probeRoutingStack() (int, map[int]*wireFormat) {
- var p uintptr
- rtm := &wireFormat{extOff: 40, bodyOff: sizeofRtMsghdrDragonFlyBSD4}
- rtm.parse = rtm.parseRouteMessage
- ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrDragonFlyBSD4}
- ifm.parse = ifm.parseInterfaceMessage
- ifam := &wireFormat{extOff: sizeofIfaMsghdrDragonFlyBSD4, bodyOff: sizeofIfaMsghdrDragonFlyBSD4}
- ifam.parse = ifam.parseInterfaceAddrMessage
- ifmam := &wireFormat{extOff: sizeofIfmaMsghdrDragonFlyBSD4, bodyOff: sizeofIfmaMsghdrDragonFlyBSD4}
- ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage
- ifanm := &wireFormat{extOff: sizeofIfAnnouncemsghdrDragonFlyBSD4, bodyOff: sizeofIfAnnouncemsghdrDragonFlyBSD4}
- ifanm.parse = ifanm.parseInterfaceAnnounceMessage
- return int(unsafe.Sizeof(p)), map[int]*wireFormat{
- sysRTM_ADD: rtm,
- sysRTM_DELETE: rtm,
- sysRTM_CHANGE: rtm,
- sysRTM_GET: rtm,
- sysRTM_LOSING: rtm,
- sysRTM_REDIRECT: rtm,
- sysRTM_MISS: rtm,
- sysRTM_LOCK: rtm,
- sysRTM_RESOLVE: rtm,
- sysRTM_NEWADDR: ifam,
- sysRTM_DELADDR: ifam,
- sysRTM_IFINFO: ifm,
- sysRTM_NEWMADDR: ifmam,
- sysRTM_DELMADDR: ifmam,
- sysRTM_IFANNOUNCE: ifanm,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_freebsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_freebsd.go
deleted file mode 100644
index 89ba1c4e2..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_freebsd.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import (
- "syscall"
- "unsafe"
-)
-
-func (typ RIBType) parseable() bool { return true }
-
-// RouteMetrics represents route metrics.
-type RouteMetrics struct {
- PathMTU int // path maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *RouteMessage) Sys() []Sys {
- if kernelAlign == 8 {
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])),
- },
- }
- }
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint32(m.raw[m.extOff+4 : m.extOff+8])),
- },
- }
-}
-
-// InterfaceMetrics represents interface metrics.
-type InterfaceMetrics struct {
- Type int // interface type
- MTU int // maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMessage) Sys() []Sys {
- return []Sys{
- &InterfaceMetrics{
- Type: int(m.raw[m.extOff]),
- MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])),
- },
- }
-}
-
-func probeRoutingStack() (int, map[int]*wireFormat) {
- var p uintptr
- wordSize := int(unsafe.Sizeof(p))
- align := int(unsafe.Sizeof(p))
- // In the case of kern.supported_archs="amd64 i386", we need
- // to know the underlying kernel's architecture because the
- // alignment for routing facilities are set at the build time
- // of the kernel.
- conf, _ := syscall.Sysctl("kern.conftxt")
- for i, j := 0, 0; j < len(conf); j++ {
- if conf[j] != '\n' {
- continue
- }
- s := conf[i:j]
- i = j + 1
- if len(s) > len("machine") && s[:len("machine")] == "machine" {
- s = s[len("machine"):]
- for k := 0; k < len(s); k++ {
- if s[k] == ' ' || s[k] == '\t' {
- s = s[1:]
- }
- break
- }
- if s == "amd64" {
- align = 8
- }
- break
- }
- }
- var rtm, ifm, ifam, ifmam, ifanm *wireFormat
- if align != wordSize { // 386 emulation on amd64
- rtm = &wireFormat{extOff: sizeofRtMsghdrFreeBSD10Emu - sizeofRtMetricsFreeBSD10Emu, bodyOff: sizeofRtMsghdrFreeBSD10Emu}
- ifm = &wireFormat{extOff: 16}
- ifam = &wireFormat{extOff: sizeofIfaMsghdrFreeBSD10Emu, bodyOff: sizeofIfaMsghdrFreeBSD10Emu}
- ifmam = &wireFormat{extOff: sizeofIfmaMsghdrFreeBSD10Emu, bodyOff: sizeofIfmaMsghdrFreeBSD10Emu}
- ifanm = &wireFormat{extOff: sizeofIfAnnouncemsghdrFreeBSD10Emu, bodyOff: sizeofIfAnnouncemsghdrFreeBSD10Emu}
- } else {
- rtm = &wireFormat{extOff: sizeofRtMsghdrFreeBSD10 - sizeofRtMetricsFreeBSD10, bodyOff: sizeofRtMsghdrFreeBSD10}
- ifm = &wireFormat{extOff: 16}
- ifam = &wireFormat{extOff: sizeofIfaMsghdrFreeBSD10, bodyOff: sizeofIfaMsghdrFreeBSD10}
- ifmam = &wireFormat{extOff: sizeofIfmaMsghdrFreeBSD10, bodyOff: sizeofIfmaMsghdrFreeBSD10}
- ifanm = &wireFormat{extOff: sizeofIfAnnouncemsghdrFreeBSD10, bodyOff: sizeofIfAnnouncemsghdrFreeBSD10}
- }
- rel, _ := syscall.SysctlUint32("kern.osreldate")
- switch {
- case rel < 800000:
- if align != wordSize { // 386 emulation on amd64
- ifm.bodyOff = sizeofIfMsghdrFreeBSD7Emu
- } else {
- ifm.bodyOff = sizeofIfMsghdrFreeBSD7
- }
- case 800000 <= rel && rel < 900000:
- if align != wordSize { // 386 emulation on amd64
- ifm.bodyOff = sizeofIfMsghdrFreeBSD8Emu
- } else {
- ifm.bodyOff = sizeofIfMsghdrFreeBSD8
- }
- case 900000 <= rel && rel < 1000000:
- if align != wordSize { // 386 emulation on amd64
- ifm.bodyOff = sizeofIfMsghdrFreeBSD9Emu
- } else {
- ifm.bodyOff = sizeofIfMsghdrFreeBSD9
- }
- case 1000000 <= rel && rel < 1100000:
- if align != wordSize { // 386 emulation on amd64
- ifm.bodyOff = sizeofIfMsghdrFreeBSD10Emu
- } else {
- ifm.bodyOff = sizeofIfMsghdrFreeBSD10
- }
- default:
- if align != wordSize { // 386 emulation on amd64
- ifm.bodyOff = sizeofIfMsghdrFreeBSD11Emu
- } else {
- ifm.bodyOff = sizeofIfMsghdrFreeBSD11
- }
- }
- rtm.parse = rtm.parseRouteMessage
- ifm.parse = ifm.parseInterfaceMessage
- ifam.parse = ifam.parseInterfaceAddrMessage
- ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage
- ifanm.parse = ifanm.parseInterfaceAnnounceMessage
- return align, map[int]*wireFormat{
- sysRTM_ADD: rtm,
- sysRTM_DELETE: rtm,
- sysRTM_CHANGE: rtm,
- sysRTM_GET: rtm,
- sysRTM_LOSING: rtm,
- sysRTM_REDIRECT: rtm,
- sysRTM_MISS: rtm,
- sysRTM_LOCK: rtm,
- sysRTM_RESOLVE: rtm,
- sysRTM_NEWADDR: ifam,
- sysRTM_DELADDR: ifam,
- sysRTM_IFINFO: ifm,
- sysRTM_NEWMADDR: ifmam,
- sysRTM_DELMADDR: ifmam,
- sysRTM_IFANNOUNCE: ifanm,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_netbsd.go
deleted file mode 100644
index 02f71d54b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_netbsd.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-func (typ RIBType) parseable() bool { return true }
-
-// RouteMetrics represents route metrics.
-type RouteMetrics struct {
- PathMTU int // path maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *RouteMessage) Sys() []Sys {
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])),
- },
- }
-}
-
-// RouteMetrics represents route metrics.
-type InterfaceMetrics struct {
- Type int // interface type
- MTU int // maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMessage) Sys() []Sys {
- return []Sys{
- &InterfaceMetrics{
- Type: int(m.raw[m.extOff]),
- MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])),
- },
- }
-}
-
-func probeRoutingStack() (int, map[int]*wireFormat) {
- rtm := &wireFormat{extOff: 40, bodyOff: sizeofRtMsghdrNetBSD7}
- rtm.parse = rtm.parseRouteMessage
- ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrNetBSD7}
- ifm.parse = ifm.parseInterfaceMessage
- ifam := &wireFormat{extOff: sizeofIfaMsghdrNetBSD7, bodyOff: sizeofIfaMsghdrNetBSD7}
- ifam.parse = ifam.parseInterfaceAddrMessage
- ifanm := &wireFormat{extOff: sizeofIfAnnouncemsghdrNetBSD7, bodyOff: sizeofIfAnnouncemsghdrNetBSD7}
- ifanm.parse = ifanm.parseInterfaceAnnounceMessage
- // NetBSD 6 and above kernels require 64-bit aligned access to
- // routing facilities.
- return 8, map[int]*wireFormat{
- sysRTM_ADD: rtm,
- sysRTM_DELETE: rtm,
- sysRTM_CHANGE: rtm,
- sysRTM_GET: rtm,
- sysRTM_LOSING: rtm,
- sysRTM_REDIRECT: rtm,
- sysRTM_MISS: rtm,
- sysRTM_LOCK: rtm,
- sysRTM_RESOLVE: rtm,
- sysRTM_NEWADDR: ifam,
- sysRTM_DELADDR: ifam,
- sysRTM_IFANNOUNCE: ifanm,
- sysRTM_IFINFO: ifm,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_openbsd.go
deleted file mode 100644
index c5674e83d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/sys_openbsd.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2016 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 file.
-
-package route
-
-import "unsafe"
-
-func (typ RIBType) parseable() bool {
- switch typ {
- case sysNET_RT_STATS, sysNET_RT_TABLE:
- return false
- default:
- return true
- }
-}
-
-// RouteMetrics represents route metrics.
-type RouteMetrics struct {
- PathMTU int // path maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *RouteMessage) Sys() []Sys {
- return []Sys{
- &RouteMetrics{
- PathMTU: int(nativeEndian.Uint32(m.raw[60:64])),
- },
- }
-}
-
-// InterfaceMetrics represents interface metrics.
-type InterfaceMetrics struct {
- Type int // interface type
- MTU int // maximum transmission unit
-}
-
-// SysType implements the SysType method of Sys interface.
-func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
-
-// Sys implements the Sys method of Message interface.
-func (m *InterfaceMessage) Sys() []Sys {
- return []Sys{
- &InterfaceMetrics{
- Type: int(m.raw[24]),
- MTU: int(nativeEndian.Uint32(m.raw[28:32])),
- },
- }
-}
-
-func probeRoutingStack() (int, map[int]*wireFormat) {
- var p uintptr
- rtm := &wireFormat{extOff: -1, bodyOff: -1}
- rtm.parse = rtm.parseRouteMessage
- ifm := &wireFormat{extOff: -1, bodyOff: -1}
- ifm.parse = ifm.parseInterfaceMessage
- ifam := &wireFormat{extOff: -1, bodyOff: -1}
- ifam.parse = ifam.parseInterfaceAddrMessage
- ifanm := &wireFormat{extOff: -1, bodyOff: -1}
- ifanm.parse = ifanm.parseInterfaceAnnounceMessage
- return int(unsafe.Sizeof(p)), map[int]*wireFormat{
- sysRTM_ADD: rtm,
- sysRTM_DELETE: rtm,
- sysRTM_CHANGE: rtm,
- sysRTM_GET: rtm,
- sysRTM_LOSING: rtm,
- sysRTM_REDIRECT: rtm,
- sysRTM_MISS: rtm,
- sysRTM_LOCK: rtm,
- sysRTM_RESOLVE: rtm,
- sysRTM_NEWADDR: ifam,
- sysRTM_DELADDR: ifam,
- sysRTM_IFINFO: ifm,
- sysRTM_IFANNOUNCE: ifanm,
- sysRTM_DESYNC: rtm,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/syscall.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/syscall.go
deleted file mode 100644
index c211188b1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/syscall.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package route
-
-import (
- "syscall"
- "unsafe"
-)
-
-var zero uintptr
-
-func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
- var p unsafe.Pointer
- if len(mib) > 0 {
- p = unsafe.Pointer(&mib[0])
- } else {
- p = unsafe.Pointer(&zero)
- }
- _, _, errno := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(p), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_darwin.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_darwin.go
deleted file mode 100644
index 4e2e1ab09..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_darwin.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_darwin.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_STAT = 0x4
- sysNET_RT_TRASH = 0x5
- sysNET_RT_IFLIST2 = 0x6
- sysNET_RT_DUMP2 = 0x7
- sysNET_RT_MAXID = 0xa
-)
-
-const (
- sysCTL_MAXNAME = 0xc
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_MAXID = 0x9
-)
-
-const (
- sysRTM_VERSION = 0x5
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_OLDADD = 0x9
- sysRTM_OLDDEL = 0xa
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_NEWMADDR = 0xf
- sysRTM_DELMADDR = 0x10
- sysRTM_IFINFO2 = 0x12
- sysRTM_NEWMADDR2 = 0x13
- sysRTM_GET2 = 0x14
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_MAX = 0x8
-)
-
-const (
- sizeofIfMsghdrDarwin15 = 0x70
- sizeofIfaMsghdrDarwin15 = 0x14
- sizeofIfmaMsghdrDarwin15 = 0x10
- sizeofIfMsghdr2Darwin15 = 0xa0
- sizeofIfmaMsghdr2Darwin15 = 0x14
- sizeofIfDataDarwin15 = 0x60
- sizeofIfData64Darwin15 = 0x80
-
- sizeofRtMsghdrDarwin15 = 0x5c
- sizeofRtMsghdr2Darwin15 = 0x5c
- sizeofRtMetricsDarwin15 = 0x38
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_dragonfly.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_dragonfly.go
deleted file mode 100644
index 719c88d11..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_dragonfly.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_dragonfly.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_MAXID = 0x4
-)
-
-const (
- sysCTL_MAXNAME = 0xc
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_P1003_1B = 0x9
- sysCTL_LWKT = 0xa
- sysCTL_MAXID = 0xb
-)
-
-const (
- sysRTM_VERSION = 0x6
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_OLDADD = 0x9
- sysRTM_OLDDEL = 0xa
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_NEWMADDR = 0xf
- sysRTM_DELMADDR = 0x10
- sysRTM_IFANNOUNCE = 0x11
- sysRTM_IEEE80211 = 0x12
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
- sysRTA_MPLS1 = 0x100
- sysRTA_MPLS2 = 0x200
- sysRTA_MPLS3 = 0x400
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_MPLS1 = 0x8
- sysRTAX_MPLS2 = 0x9
- sysRTAX_MPLS3 = 0xa
- sysRTAX_MAX = 0xb
-)
-
-const (
- sizeofIfMsghdrDragonFlyBSD4 = 0xb0
- sizeofIfaMsghdrDragonFlyBSD4 = 0x14
- sizeofIfmaMsghdrDragonFlyBSD4 = 0x10
- sizeofIfAnnouncemsghdrDragonFlyBSD4 = 0x18
-
- sizeofRtMsghdrDragonFlyBSD4 = 0x98
- sizeofRtMetricsDragonFlyBSD4 = 0x70
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_386.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_386.go
deleted file mode 100644
index b03bc01f6..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_386.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_IFMALIST = 0x4
- sysNET_RT_IFLISTL = 0x5
-)
-
-const (
- sysCTL_MAXNAME = 0x18
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_P1003_1B = 0x9
-)
-
-const (
- sysRTM_VERSION = 0x5
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_NEWMADDR = 0xf
- sysRTM_DELMADDR = 0x10
- sysRTM_IFANNOUNCE = 0x11
- sysRTM_IEEE80211 = 0x12
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_MAX = 0x8
-)
-
-const (
- sizeofIfMsghdrlFreeBSD10 = 0x68
- sizeofIfaMsghdrFreeBSD10 = 0x14
- sizeofIfaMsghdrlFreeBSD10 = 0x6c
- sizeofIfmaMsghdrFreeBSD10 = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10 = 0x18
-
- sizeofRtMsghdrFreeBSD10 = 0x5c
- sizeofRtMetricsFreeBSD10 = 0x38
-
- sizeofIfMsghdrFreeBSD7 = 0x60
- sizeofIfMsghdrFreeBSD8 = 0x60
- sizeofIfMsghdrFreeBSD9 = 0x60
- sizeofIfMsghdrFreeBSD10 = 0x64
- sizeofIfMsghdrFreeBSD11 = 0xa8
-
- sizeofIfDataFreeBSD7 = 0x50
- sizeofIfDataFreeBSD8 = 0x50
- sizeofIfDataFreeBSD9 = 0x50
- sizeofIfDataFreeBSD10 = 0x54
- sizeofIfDataFreeBSD11 = 0x98
-
- // MODIFIED BY HAND FOR 386 EMULATION ON AMD64
- // 386 EMULATION USES THE UNDERLYING RAW DATA LAYOUT
-
- sizeofIfMsghdrlFreeBSD10Emu = 0xb0
- sizeofIfaMsghdrFreeBSD10Emu = 0x14
- sizeofIfaMsghdrlFreeBSD10Emu = 0xb0
- sizeofIfmaMsghdrFreeBSD10Emu = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18
-
- sizeofRtMsghdrFreeBSD10Emu = 0x98
- sizeofRtMetricsFreeBSD10Emu = 0x70
-
- sizeofIfMsghdrFreeBSD7Emu = 0xa8
- sizeofIfMsghdrFreeBSD8Emu = 0xa8
- sizeofIfMsghdrFreeBSD9Emu = 0xa8
- sizeofIfMsghdrFreeBSD10Emu = 0xa8
- sizeofIfMsghdrFreeBSD11Emu = 0xa8
-
- sizeofIfDataFreeBSD7Emu = 0x98
- sizeofIfDataFreeBSD8Emu = 0x98
- sizeofIfDataFreeBSD9Emu = 0x98
- sizeofIfDataFreeBSD10Emu = 0x98
- sizeofIfDataFreeBSD11Emu = 0x98
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go
deleted file mode 100644
index 0b675b3d3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_IFMALIST = 0x4
- sysNET_RT_IFLISTL = 0x5
-)
-
-const (
- sysCTL_MAXNAME = 0x18
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_P1003_1B = 0x9
-)
-
-const (
- sysRTM_VERSION = 0x5
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_NEWMADDR = 0xf
- sysRTM_DELMADDR = 0x10
- sysRTM_IFANNOUNCE = 0x11
- sysRTM_IEEE80211 = 0x12
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_MAX = 0x8
-)
-
-const (
- sizeofIfMsghdrlFreeBSD10 = 0xb0
- sizeofIfaMsghdrFreeBSD10 = 0x14
- sizeofIfaMsghdrlFreeBSD10 = 0xb0
- sizeofIfmaMsghdrFreeBSD10 = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10 = 0x18
-
- sizeofRtMsghdrFreeBSD10 = 0x98
- sizeofRtMetricsFreeBSD10 = 0x70
-
- sizeofIfMsghdrFreeBSD7 = 0xa8
- sizeofIfMsghdrFreeBSD8 = 0xa8
- sizeofIfMsghdrFreeBSD9 = 0xa8
- sizeofIfMsghdrFreeBSD10 = 0xa8
- sizeofIfMsghdrFreeBSD11 = 0xa8
-
- sizeofIfDataFreeBSD7 = 0x98
- sizeofIfDataFreeBSD8 = 0x98
- sizeofIfDataFreeBSD9 = 0x98
- sizeofIfDataFreeBSD10 = 0x98
- sizeofIfDataFreeBSD11 = 0x98
-
- sizeofIfMsghdrlFreeBSD10Emu = 0xb0
- sizeofIfaMsghdrFreeBSD10Emu = 0x14
- sizeofIfaMsghdrlFreeBSD10Emu = 0xb0
- sizeofIfmaMsghdrFreeBSD10Emu = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18
-
- sizeofRtMsghdrFreeBSD10Emu = 0x98
- sizeofRtMetricsFreeBSD10Emu = 0x70
-
- sizeofIfMsghdrFreeBSD7Emu = 0xa8
- sizeofIfMsghdrFreeBSD8Emu = 0xa8
- sizeofIfMsghdrFreeBSD9Emu = 0xa8
- sizeofIfMsghdrFreeBSD10Emu = 0xa8
- sizeofIfMsghdrFreeBSD11Emu = 0xa8
-
- sizeofIfDataFreeBSD7Emu = 0x98
- sizeofIfDataFreeBSD8Emu = 0x98
- sizeofIfDataFreeBSD9Emu = 0x98
- sizeofIfDataFreeBSD10Emu = 0x98
- sizeofIfDataFreeBSD11Emu = 0x98
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_arm.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_arm.go
deleted file mode 100644
index 58f8ea16f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_freebsd_arm.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_freebsd.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_IFMALIST = 0x4
- sysNET_RT_IFLISTL = 0x5
-)
-
-const (
- sysCTL_MAXNAME = 0x18
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_P1003_1B = 0x9
-)
-
-const (
- sysRTM_VERSION = 0x5
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_NEWMADDR = 0xf
- sysRTM_DELMADDR = 0x10
- sysRTM_IFANNOUNCE = 0x11
- sysRTM_IEEE80211 = 0x12
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_MAX = 0x8
-)
-
-const (
- sizeofIfMsghdrlFreeBSD10 = 0x68
- sizeofIfaMsghdrFreeBSD10 = 0x14
- sizeofIfaMsghdrlFreeBSD10 = 0x6c
- sizeofIfmaMsghdrFreeBSD10 = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10 = 0x18
-
- sizeofRtMsghdrFreeBSD10 = 0x5c
- sizeofRtMetricsFreeBSD10 = 0x38
-
- sizeofIfMsghdrFreeBSD7 = 0x70
- sizeofIfMsghdrFreeBSD8 = 0x70
- sizeofIfMsghdrFreeBSD9 = 0x70
- sizeofIfMsghdrFreeBSD10 = 0x70
- sizeofIfMsghdrFreeBSD11 = 0xa8
-
- sizeofIfDataFreeBSD7 = 0x60
- sizeofIfDataFreeBSD8 = 0x60
- sizeofIfDataFreeBSD9 = 0x60
- sizeofIfDataFreeBSD10 = 0x60
- sizeofIfDataFreeBSD11 = 0x98
-
- sizeofIfMsghdrlFreeBSD10Emu = 0x68
- sizeofIfaMsghdrFreeBSD10Emu = 0x14
- sizeofIfaMsghdrlFreeBSD10Emu = 0x6c
- sizeofIfmaMsghdrFreeBSD10Emu = 0x10
- sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18
-
- sizeofRtMsghdrFreeBSD10Emu = 0x5c
- sizeofRtMetricsFreeBSD10Emu = 0x38
-
- sizeofIfMsghdrFreeBSD7Emu = 0x70
- sizeofIfMsghdrFreeBSD8Emu = 0x70
- sizeofIfMsghdrFreeBSD9Emu = 0x70
- sizeofIfMsghdrFreeBSD10Emu = 0x70
- sizeofIfMsghdrFreeBSD11Emu = 0xa8
-
- sizeofIfDataFreeBSD7Emu = 0x60
- sizeofIfDataFreeBSD8Emu = 0x60
- sizeofIfDataFreeBSD9Emu = 0x60
- sizeofIfDataFreeBSD10Emu = 0x60
- sizeofIfDataFreeBSD11Emu = 0x98
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_netbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_netbsd.go
deleted file mode 100644
index e0df45e8b..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_netbsd.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_netbsd.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x22
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x5
- sysNET_RT_MAXID = 0x6
-)
-
-const (
- sysCTL_MAXNAME = 0xc
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_VFS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_USER = 0x8
- sysCTL_DDB = 0x9
- sysCTL_PROC = 0xa
- sysCTL_VENDOR = 0xb
- sysCTL_EMUL = 0xc
- sysCTL_SECURITY = 0xd
- sysCTL_MAXID = 0xe
-)
-
-const (
- sysRTM_VERSION = 0x4
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_OLDADD = 0x9
- sysRTM_OLDDEL = 0xa
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFANNOUNCE = 0x10
- sysRTM_IEEE80211 = 0x11
- sysRTM_SETGATE = 0x12
- sysRTM_LLINFO_UPD = 0x13
- sysRTM_IFINFO = 0x14
- sysRTM_CHGADDR = 0x15
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
- sysRTA_TAG = 0x100
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_TAG = 0x8
- sysRTAX_MAX = 0x9
-)
-
-const (
- sizeofIfMsghdrNetBSD7 = 0x98
- sizeofIfaMsghdrNetBSD7 = 0x18
- sizeofIfAnnouncemsghdrNetBSD7 = 0x18
-
- sizeofRtMsghdrNetBSD7 = 0x78
- sizeofRtMetricsNetBSD7 = 0x50
-
- sizeofSockaddrStorage = 0x80
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_openbsd.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_openbsd.go
deleted file mode 100644
index db8c8efb4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/route/zsys_openbsd.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs defs_openbsd.go
-
-package route
-
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_ROUTE = 0x11
- sysAF_LINK = 0x12
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-
- sysNET_RT_DUMP = 0x1
- sysNET_RT_FLAGS = 0x2
- sysNET_RT_IFLIST = 0x3
- sysNET_RT_STATS = 0x4
- sysNET_RT_TABLE = 0x5
- sysNET_RT_IFNAMES = 0x6
- sysNET_RT_MAXID = 0x7
-)
-
-const (
- sysCTL_MAXNAME = 0xc
-
- sysCTL_UNSPEC = 0x0
- sysCTL_KERN = 0x1
- sysCTL_VM = 0x2
- sysCTL_FS = 0x3
- sysCTL_NET = 0x4
- sysCTL_DEBUG = 0x5
- sysCTL_HW = 0x6
- sysCTL_MACHDEP = 0x7
- sysCTL_DDB = 0x9
- sysCTL_VFS = 0xa
- sysCTL_MAXID = 0xb
-)
-
-const (
- sysRTM_VERSION = 0x5
-
- sysRTM_ADD = 0x1
- sysRTM_DELETE = 0x2
- sysRTM_CHANGE = 0x3
- sysRTM_GET = 0x4
- sysRTM_LOSING = 0x5
- sysRTM_REDIRECT = 0x6
- sysRTM_MISS = 0x7
- sysRTM_LOCK = 0x8
- sysRTM_RESOLVE = 0xb
- sysRTM_NEWADDR = 0xc
- sysRTM_DELADDR = 0xd
- sysRTM_IFINFO = 0xe
- sysRTM_IFANNOUNCE = 0xf
- sysRTM_DESYNC = 0x10
- sysRTM_INVALIDATE = 0x11
- sysRTM_BFD = 0x12
- sysRTM_PROPOSAL = 0x13
-
- sysRTA_DST = 0x1
- sysRTA_GATEWAY = 0x2
- sysRTA_NETMASK = 0x4
- sysRTA_GENMASK = 0x8
- sysRTA_IFP = 0x10
- sysRTA_IFA = 0x20
- sysRTA_AUTHOR = 0x40
- sysRTA_BRD = 0x80
- sysRTA_SRC = 0x100
- sysRTA_SRCMASK = 0x200
- sysRTA_LABEL = 0x400
- sysRTA_BFD = 0x800
- sysRTA_DNS = 0x1000
- sysRTA_STATIC = 0x2000
- sysRTA_SEARCH = 0x4000
-
- sysRTAX_DST = 0x0
- sysRTAX_GATEWAY = 0x1
- sysRTAX_NETMASK = 0x2
- sysRTAX_GENMASK = 0x3
- sysRTAX_IFP = 0x4
- sysRTAX_IFA = 0x5
- sysRTAX_AUTHOR = 0x6
- sysRTAX_BRD = 0x7
- sysRTAX_SRC = 0x8
- sysRTAX_SRCMASK = 0x9
- sysRTAX_LABEL = 0xa
- sysRTAX_BFD = 0xb
- sysRTAX_DNS = 0xc
- sysRTAX_STATIC = 0xd
- sysRTAX_SEARCH = 0xe
- sysRTAX_MAX = 0xf
-)
-
-const (
- sizeofRtMsghdr = 0x60
-
- sizeofSockaddrStorage = 0x100
- sizeofSockaddrInet = 0x10
- sizeofSockaddrInet6 = 0x1c
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/events.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/events.go
deleted file mode 100644
index c646a6952..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/events.go
+++ /dev/null
@@ -1,532 +0,0 @@
-// Copyright 2015 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 file.
-
-package trace
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "io"
- "log"
- "net/http"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "text/tabwriter"
- "time"
-)
-
-const maxEventsPerLog = 100
-
-type bucket struct {
- MaxErrAge time.Duration
- String string
-}
-
-var buckets = []bucket{
- {0, "total"},
- {10 * time.Second, "errs<10s"},
- {1 * time.Minute, "errs<1m"},
- {10 * time.Minute, "errs<10m"},
- {1 * time.Hour, "errs<1h"},
- {10 * time.Hour, "errs<10h"},
- {24000 * time.Hour, "errors"},
-}
-
-// RenderEvents renders the HTML page typically served at /debug/events.
-// It does not do any auth checking. The request may be nil.
-//
-// Most users will use the Events handler.
-func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) {
- now := time.Now()
- data := &struct {
- Families []string // family names
- Buckets []bucket
- Counts [][]int // eventLog count per family/bucket
-
- // Set when a bucket has been selected.
- Family string
- Bucket int
- EventLogs eventLogs
- Expanded bool
- }{
- Buckets: buckets,
- }
-
- data.Families = make([]string, 0, len(families))
- famMu.RLock()
- for name := range families {
- data.Families = append(data.Families, name)
- }
- famMu.RUnlock()
- sort.Strings(data.Families)
-
- // Count the number of eventLogs in each family for each error age.
- data.Counts = make([][]int, len(data.Families))
- for i, name := range data.Families {
- // TODO(sameer): move this loop under the family lock.
- f := getEventFamily(name)
- data.Counts[i] = make([]int, len(data.Buckets))
- for j, b := range data.Buckets {
- data.Counts[i][j] = f.Count(now, b.MaxErrAge)
- }
- }
-
- if req != nil {
- var ok bool
- data.Family, data.Bucket, ok = parseEventsArgs(req)
- if !ok {
- // No-op
- } else {
- data.EventLogs = getEventFamily(data.Family).Copy(now, buckets[data.Bucket].MaxErrAge)
- }
- if data.EventLogs != nil {
- defer data.EventLogs.Free()
- sort.Sort(data.EventLogs)
- }
- if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil {
- data.Expanded = exp
- }
- }
-
- famMu.RLock()
- defer famMu.RUnlock()
- if err := eventsTmpl().Execute(w, data); err != nil {
- log.Printf("net/trace: Failed executing template: %v", err)
- }
-}
-
-func parseEventsArgs(req *http.Request) (fam string, b int, ok bool) {
- fam, bStr := req.FormValue("fam"), req.FormValue("b")
- if fam == "" || bStr == "" {
- return "", 0, false
- }
- b, err := strconv.Atoi(bStr)
- if err != nil || b < 0 || b >= len(buckets) {
- return "", 0, false
- }
- return fam, b, true
-}
-
-// An EventLog provides a log of events associated with a specific object.
-type EventLog interface {
- // Printf formats its arguments with fmt.Sprintf and adds the
- // result to the event log.
- Printf(format string, a ...interface{})
-
- // Errorf is like Printf, but it marks this event as an error.
- Errorf(format string, a ...interface{})
-
- // Finish declares that this event log is complete.
- // The event log should not be used after calling this method.
- Finish()
-}
-
-// NewEventLog returns a new EventLog with the specified family name
-// and title.
-func NewEventLog(family, title string) EventLog {
- el := newEventLog()
- el.ref()
- el.Family, el.Title = family, title
- el.Start = time.Now()
- el.events = make([]logEntry, 0, maxEventsPerLog)
- el.stack = make([]uintptr, 32)
- n := runtime.Callers(2, el.stack)
- el.stack = el.stack[:n]
-
- getEventFamily(family).add(el)
- return el
-}
-
-func (el *eventLog) Finish() {
- getEventFamily(el.Family).remove(el)
- el.unref() // matches ref in New
-}
-
-var (
- famMu sync.RWMutex
- families = make(map[string]*eventFamily) // family name => family
-)
-
-func getEventFamily(fam string) *eventFamily {
- famMu.Lock()
- defer famMu.Unlock()
- f := families[fam]
- if f == nil {
- f = &eventFamily{}
- families[fam] = f
- }
- return f
-}
-
-type eventFamily struct {
- mu sync.RWMutex
- eventLogs eventLogs
-}
-
-func (f *eventFamily) add(el *eventLog) {
- f.mu.Lock()
- f.eventLogs = append(f.eventLogs, el)
- f.mu.Unlock()
-}
-
-func (f *eventFamily) remove(el *eventLog) {
- f.mu.Lock()
- defer f.mu.Unlock()
- for i, el0 := range f.eventLogs {
- if el == el0 {
- copy(f.eventLogs[i:], f.eventLogs[i+1:])
- f.eventLogs = f.eventLogs[:len(f.eventLogs)-1]
- return
- }
- }
-}
-
-func (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) {
- f.mu.RLock()
- defer f.mu.RUnlock()
- for _, el := range f.eventLogs {
- if el.hasRecentError(now, maxErrAge) {
- n++
- }
- }
- return
-}
-
-func (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) {
- f.mu.RLock()
- defer f.mu.RUnlock()
- els = make(eventLogs, 0, len(f.eventLogs))
- for _, el := range f.eventLogs {
- if el.hasRecentError(now, maxErrAge) {
- el.ref()
- els = append(els, el)
- }
- }
- return
-}
-
-type eventLogs []*eventLog
-
-// Free calls unref on each element of the list.
-func (els eventLogs) Free() {
- for _, el := range els {
- el.unref()
- }
-}
-
-// eventLogs may be sorted in reverse chronological order.
-func (els eventLogs) Len() int { return len(els) }
-func (els eventLogs) Less(i, j int) bool { return els[i].Start.After(els[j].Start) }
-func (els eventLogs) Swap(i, j int) { els[i], els[j] = els[j], els[i] }
-
-// A logEntry is a timestamped log entry in an event log.
-type logEntry struct {
- When time.Time
- Elapsed time.Duration // since previous event in log
- NewDay bool // whether this event is on a different day to the previous event
- What string
- IsErr bool
-}
-
-// WhenString returns a string representation of the elapsed time of the event.
-// It will include the date if midnight was crossed.
-func (e logEntry) WhenString() string {
- if e.NewDay {
- return e.When.Format("2006/01/02 15:04:05.000000")
- }
- return e.When.Format("15:04:05.000000")
-}
-
-// An eventLog represents an active event log.
-type eventLog struct {
- // Family is the top-level grouping of event logs to which this belongs.
- Family string
-
- // Title is the title of this event log.
- Title string
-
- // Timing information.
- Start time.Time
-
- // Call stack where this event log was created.
- stack []uintptr
-
- // Append-only sequence of events.
- //
- // TODO(sameer): change this to a ring buffer to avoid the array copy
- // when we hit maxEventsPerLog.
- mu sync.RWMutex
- events []logEntry
- LastErrorTime time.Time
- discarded int
-
- refs int32 // how many buckets this is in
-}
-
-func (el *eventLog) reset() {
- // Clear all but the mutex. Mutexes may not be copied, even when unlocked.
- el.Family = ""
- el.Title = ""
- el.Start = time.Time{}
- el.stack = nil
- el.events = nil
- el.LastErrorTime = time.Time{}
- el.discarded = 0
- el.refs = 0
-}
-
-func (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool {
- if maxErrAge == 0 {
- return true
- }
- el.mu.RLock()
- defer el.mu.RUnlock()
- return now.Sub(el.LastErrorTime) < maxErrAge
-}
-
-// delta returns the elapsed time since the last event or the log start,
-// and whether it spans midnight.
-// L >= el.mu
-func (el *eventLog) delta(t time.Time) (time.Duration, bool) {
- if len(el.events) == 0 {
- return t.Sub(el.Start), false
- }
- prev := el.events[len(el.events)-1].When
- return t.Sub(prev), prev.Day() != t.Day()
-
-}
-
-func (el *eventLog) Printf(format string, a ...interface{}) {
- el.printf(false, format, a...)
-}
-
-func (el *eventLog) Errorf(format string, a ...interface{}) {
- el.printf(true, format, a...)
-}
-
-func (el *eventLog) printf(isErr bool, format string, a ...interface{}) {
- e := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)}
- el.mu.Lock()
- e.Elapsed, e.NewDay = el.delta(e.When)
- if len(el.events) < maxEventsPerLog {
- el.events = append(el.events, e)
- } else {
- // Discard the oldest event.
- if el.discarded == 0 {
- // el.discarded starts at two to count for the event it
- // is replacing, plus the next one that we are about to
- // drop.
- el.discarded = 2
- } else {
- el.discarded++
- }
- // TODO(sameer): if this causes allocations on a critical path,
- // change eventLog.What to be a fmt.Stringer, as in trace.go.
- el.events[0].What = fmt.Sprintf("(%d events discarded)", el.discarded)
- // The timestamp of the discarded meta-event should be
- // the time of the last event it is representing.
- el.events[0].When = el.events[1].When
- copy(el.events[1:], el.events[2:])
- el.events[maxEventsPerLog-1] = e
- }
- if e.IsErr {
- el.LastErrorTime = e.When
- }
- el.mu.Unlock()
-}
-
-func (el *eventLog) ref() {
- atomic.AddInt32(&el.refs, 1)
-}
-
-func (el *eventLog) unref() {
- if atomic.AddInt32(&el.refs, -1) == 0 {
- freeEventLog(el)
- }
-}
-
-func (el *eventLog) When() string {
- return el.Start.Format("2006/01/02 15:04:05.000000")
-}
-
-func (el *eventLog) ElapsedTime() string {
- elapsed := time.Since(el.Start)
- return fmt.Sprintf("%.6f", elapsed.Seconds())
-}
-
-func (el *eventLog) Stack() string {
- buf := new(bytes.Buffer)
- tw := tabwriter.NewWriter(buf, 1, 8, 1, '\t', 0)
- printStackRecord(tw, el.stack)
- tw.Flush()
- return buf.String()
-}
-
-// printStackRecord prints the function + source line information
-// for a single stack trace.
-// Adapted from runtime/pprof/pprof.go.
-func printStackRecord(w io.Writer, stk []uintptr) {
- for _, pc := range stk {
- f := runtime.FuncForPC(pc)
- if f == nil {
- continue
- }
- file, line := f.FileLine(pc)
- name := f.Name()
- // Hide runtime.goexit and any runtime functions at the beginning.
- if strings.HasPrefix(name, "runtime.") {
- continue
- }
- fmt.Fprintf(w, "# %s\t%s:%d\n", name, file, line)
- }
-}
-
-func (el *eventLog) Events() []logEntry {
- el.mu.RLock()
- defer el.mu.RUnlock()
- return el.events
-}
-
-// freeEventLogs is a freelist of *eventLog
-var freeEventLogs = make(chan *eventLog, 1000)
-
-// newEventLog returns a event log ready to use.
-func newEventLog() *eventLog {
- select {
- case el := <-freeEventLogs:
- return el
- default:
- return new(eventLog)
- }
-}
-
-// freeEventLog adds el to freeEventLogs if there's room.
-// This is non-blocking.
-func freeEventLog(el *eventLog) {
- el.reset()
- select {
- case freeEventLogs <- el:
- default:
- }
-}
-
-var eventsTmplCache *template.Template
-var eventsTmplOnce sync.Once
-
-func eventsTmpl() *template.Template {
- eventsTmplOnce.Do(func() {
- eventsTmplCache = template.Must(template.New("events").Funcs(template.FuncMap{
- "elapsed": elapsed,
- "trimSpace": strings.TrimSpace,
- }).Parse(eventsHTML))
- })
- return eventsTmplCache
-}
-
-const eventsHTML = `
-<html>
- <head>
- <title>events</title>
- </head>
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
- table#req-status td.family {
- padding-right: 2em;
- }
- table#req-status td.active {
- padding-right: 1em;
- }
- table#req-status td.empty {
- color: #aaa;
- }
- table#reqs {
- margin-top: 1em;
- }
- table#reqs tr.first {
- {{if $.Expanded}}font-weight: bold;{{end}}
- }
- table#reqs td {
- font-family: monospace;
- }
- table#reqs td.when {
- text-align: right;
- white-space: nowrap;
- }
- table#reqs td.elapsed {
- padding: 0 0.5em;
- text-align: right;
- white-space: pre;
- width: 10em;
- }
- address {
- font-size: smaller;
- margin-top: 5em;
- }
- </style>
- <body>
-
-<h1>/debug/events</h1>
-
-<table id="req-status">
- {{range $i, $fam := .Families}}
- <tr>
- <td class="family">{{$fam}}</td>
-
- {{range $j, $bucket := $.Buckets}}
- {{$n := index $.Counts $i $j}}
- <td class="{{if not $bucket.MaxErrAge}}active{{end}}{{if not $n}}empty{{end}}">
- {{if $n}}<a href="?fam={{$fam}}&b={{$j}}{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{$n}} {{$bucket.String}}]
- {{if $n}}</a>{{end}}
- </td>
- {{end}}
-
- </tr>{{end}}
-</table>
-
-{{if $.EventLogs}}
-<hr />
-<h3>Family: {{$.Family}}</h3>
-
-{{if $.Expanded}}<a href="?fam={{$.Family}}&b={{$.Bucket}}">{{end}}
-[Summary]{{if $.Expanded}}</a>{{end}}
-
-{{if not $.Expanded}}<a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1">{{end}}
-[Expanded]{{if not $.Expanded}}</a>{{end}}
-
-<table id="reqs">
- <tr><th>When</th><th>Elapsed</th></tr>
- {{range $el := $.EventLogs}}
- <tr class="first">
- <td class="when">{{$el.When}}</td>
- <td class="elapsed">{{$el.ElapsedTime}}</td>
- <td>{{$el.Title}}
- </tr>
- {{if $.Expanded}}
- <tr>
- <td class="when"></td>
- <td class="elapsed"></td>
- <td><pre>{{$el.Stack|trimSpace}}</pre></td>
- </tr>
- {{range $el.Events}}
- <tr>
- <td class="when">{{.WhenString}}</td>
- <td class="elapsed">{{elapsed .Elapsed}}</td>
- <td>.{{if .IsErr}}E{{else}}.{{end}}. {{.What}}</td>
- </tr>
- {{end}}
- {{end}}
- {{end}}
-</table>
-{{end}}
- </body>
-</html>
-`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram.go
deleted file mode 100644
index 9bf4286c7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Copyright 2015 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 file.
-
-package trace
-
-// This file implements histogramming for RPC statistics collection.
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "log"
- "math"
- "sync"
-
- "golang.org/x/net/internal/timeseries"
-)
-
-const (
- bucketCount = 38
-)
-
-// histogram keeps counts of values in buckets that are spaced
-// out in powers of 2: 0-1, 2-3, 4-7...
-// histogram implements timeseries.Observable
-type histogram struct {
- sum int64 // running total of measurements
- sumOfSquares float64 // square of running total
- buckets []int64 // bucketed values for histogram
- value int // holds a single value as an optimization
- valueCount int64 // number of values recorded for single value
-}
-
-// AddMeasurement records a value measurement observation to the histogram.
-func (h *histogram) addMeasurement(value int64) {
- // TODO: assert invariant
- h.sum += value
- h.sumOfSquares += float64(value) * float64(value)
-
- bucketIndex := getBucket(value)
-
- if h.valueCount == 0 || (h.valueCount > 0 && h.value == bucketIndex) {
- h.value = bucketIndex
- h.valueCount++
- } else {
- h.allocateBuckets()
- h.buckets[bucketIndex]++
- }
-}
-
-func (h *histogram) allocateBuckets() {
- if h.buckets == nil {
- h.buckets = make([]int64, bucketCount)
- h.buckets[h.value] = h.valueCount
- h.value = 0
- h.valueCount = -1
- }
-}
-
-func log2(i int64) int {
- n := 0
- for ; i >= 0x100; i >>= 8 {
- n += 8
- }
- for ; i > 0; i >>= 1 {
- n += 1
- }
- return n
-}
-
-func getBucket(i int64) (index int) {
- index = log2(i) - 1
- if index < 0 {
- index = 0
- }
- if index >= bucketCount {
- index = bucketCount - 1
- }
- return
-}
-
-// Total returns the number of recorded observations.
-func (h *histogram) total() (total int64) {
- if h.valueCount >= 0 {
- total = h.valueCount
- }
- for _, val := range h.buckets {
- total += int64(val)
- }
- return
-}
-
-// Average returns the average value of recorded observations.
-func (h *histogram) average() float64 {
- t := h.total()
- if t == 0 {
- return 0
- }
- return float64(h.sum) / float64(t)
-}
-
-// Variance returns the variance of recorded observations.
-func (h *histogram) variance() float64 {
- t := float64(h.total())
- if t == 0 {
- return 0
- }
- s := float64(h.sum) / t
- return h.sumOfSquares/t - s*s
-}
-
-// StandardDeviation returns the standard deviation of recorded observations.
-func (h *histogram) standardDeviation() float64 {
- return math.Sqrt(h.variance())
-}
-
-// PercentileBoundary estimates the value that the given fraction of recorded
-// observations are less than.
-func (h *histogram) percentileBoundary(percentile float64) int64 {
- total := h.total()
-
- // Corner cases (make sure result is strictly less than Total())
- if total == 0 {
- return 0
- } else if total == 1 {
- return int64(h.average())
- }
-
- percentOfTotal := round(float64(total) * percentile)
- var runningTotal int64
-
- for i := range h.buckets {
- value := h.buckets[i]
- runningTotal += value
- if runningTotal == percentOfTotal {
- // We hit an exact bucket boundary. If the next bucket has data, it is a
- // good estimate of the value. If the bucket is empty, we interpolate the
- // midpoint between the next bucket's boundary and the next non-zero
- // bucket. If the remaining buckets are all empty, then we use the
- // boundary for the next bucket as the estimate.
- j := uint8(i + 1)
- min := bucketBoundary(j)
- if runningTotal < total {
- for h.buckets[j] == 0 {
- j++
- }
- }
- max := bucketBoundary(j)
- return min + round(float64(max-min)/2)
- } else if runningTotal > percentOfTotal {
- // The value is in this bucket. Interpolate the value.
- delta := runningTotal - percentOfTotal
- percentBucket := float64(value-delta) / float64(value)
- bucketMin := bucketBoundary(uint8(i))
- nextBucketMin := bucketBoundary(uint8(i + 1))
- bucketSize := nextBucketMin - bucketMin
- return bucketMin + round(percentBucket*float64(bucketSize))
- }
- }
- return bucketBoundary(bucketCount - 1)
-}
-
-// Median returns the estimated median of the observed values.
-func (h *histogram) median() int64 {
- return h.percentileBoundary(0.5)
-}
-
-// Add adds other to h.
-func (h *histogram) Add(other timeseries.Observable) {
- o := other.(*histogram)
- if o.valueCount == 0 {
- // Other histogram is empty
- } else if h.valueCount >= 0 && o.valueCount > 0 && h.value == o.value {
- // Both have a single bucketed value, aggregate them
- h.valueCount += o.valueCount
- } else {
- // Two different values necessitate buckets in this histogram
- h.allocateBuckets()
- if o.valueCount >= 0 {
- h.buckets[o.value] += o.valueCount
- } else {
- for i := range h.buckets {
- h.buckets[i] += o.buckets[i]
- }
- }
- }
- h.sumOfSquares += o.sumOfSquares
- h.sum += o.sum
-}
-
-// Clear resets the histogram to an empty state, removing all observed values.
-func (h *histogram) Clear() {
- h.buckets = nil
- h.value = 0
- h.valueCount = 0
- h.sum = 0
- h.sumOfSquares = 0
-}
-
-// CopyFrom copies from other, which must be a *histogram, into h.
-func (h *histogram) CopyFrom(other timeseries.Observable) {
- o := other.(*histogram)
- if o.valueCount == -1 {
- h.allocateBuckets()
- copy(h.buckets, o.buckets)
- }
- h.sum = o.sum
- h.sumOfSquares = o.sumOfSquares
- h.value = o.value
- h.valueCount = o.valueCount
-}
-
-// Multiply scales the histogram by the specified ratio.
-func (h *histogram) Multiply(ratio float64) {
- if h.valueCount == -1 {
- for i := range h.buckets {
- h.buckets[i] = int64(float64(h.buckets[i]) * ratio)
- }
- } else {
- h.valueCount = int64(float64(h.valueCount) * ratio)
- }
- h.sum = int64(float64(h.sum) * ratio)
- h.sumOfSquares = h.sumOfSquares * ratio
-}
-
-// New creates a new histogram.
-func (h *histogram) New() timeseries.Observable {
- r := new(histogram)
- r.Clear()
- return r
-}
-
-func (h *histogram) String() string {
- return fmt.Sprintf("%d, %f, %d, %d, %v",
- h.sum, h.sumOfSquares, h.value, h.valueCount, h.buckets)
-}
-
-// round returns the closest int64 to the argument
-func round(in float64) int64 {
- return int64(math.Floor(in + 0.5))
-}
-
-// bucketBoundary returns the first value in the bucket.
-func bucketBoundary(bucket uint8) int64 {
- if bucket == 0 {
- return 0
- }
- return 1 << bucket
-}
-
-// bucketData holds data about a specific bucket for use in distTmpl.
-type bucketData struct {
- Lower, Upper int64
- N int64
- Pct, CumulativePct float64
- GraphWidth int
-}
-
-// data holds data about a Distribution for use in distTmpl.
-type data struct {
- Buckets []*bucketData
- Count, Median int64
- Mean, StandardDeviation float64
-}
-
-// maxHTMLBarWidth is the maximum width of the HTML bar for visualizing buckets.
-const maxHTMLBarWidth = 350.0
-
-// newData returns data representing h for use in distTmpl.
-func (h *histogram) newData() *data {
- // Force the allocation of buckets to simplify the rendering implementation
- h.allocateBuckets()
- // We scale the bars on the right so that the largest bar is
- // maxHTMLBarWidth pixels in width.
- maxBucket := int64(0)
- for _, n := range h.buckets {
- if n > maxBucket {
- maxBucket = n
- }
- }
- total := h.total()
- barsizeMult := maxHTMLBarWidth / float64(maxBucket)
- var pctMult float64
- if total == 0 {
- pctMult = 1.0
- } else {
- pctMult = 100.0 / float64(total)
- }
-
- buckets := make([]*bucketData, len(h.buckets))
- runningTotal := int64(0)
- for i, n := range h.buckets {
- if n == 0 {
- continue
- }
- runningTotal += n
- var upperBound int64
- if i < bucketCount-1 {
- upperBound = bucketBoundary(uint8(i + 1))
- } else {
- upperBound = math.MaxInt64
- }
- buckets[i] = &bucketData{
- Lower: bucketBoundary(uint8(i)),
- Upper: upperBound,
- N: n,
- Pct: float64(n) * pctMult,
- CumulativePct: float64(runningTotal) * pctMult,
- GraphWidth: int(float64(n) * barsizeMult),
- }
- }
- return &data{
- Buckets: buckets,
- Count: total,
- Median: h.median(),
- Mean: h.average(),
- StandardDeviation: h.standardDeviation(),
- }
-}
-
-func (h *histogram) html() template.HTML {
- buf := new(bytes.Buffer)
- if err := distTmpl().Execute(buf, h.newData()); err != nil {
- buf.Reset()
- log.Printf("net/trace: couldn't execute template: %v", err)
- }
- return template.HTML(buf.String())
-}
-
-var distTmplCache *template.Template
-var distTmplOnce sync.Once
-
-func distTmpl() *template.Template {
- distTmplOnce.Do(func() {
- // Input: data
- distTmplCache = template.Must(template.New("distTmpl").Parse(`
-<table>
-<tr>
- <td style="padding:0.25em">Count: {{.Count}}</td>
- <td style="padding:0.25em">Mean: {{printf "%.0f" .Mean}}</td>
- <td style="padding:0.25em">StdDev: {{printf "%.0f" .StandardDeviation}}</td>
- <td style="padding:0.25em">Median: {{.Median}}</td>
-</tr>
-</table>
-<hr>
-<table>
-{{range $b := .Buckets}}
-{{if $b}}
- <tr>
- <td style="padding:0 0 0 0.25em">[</td>
- <td style="text-align:right;padding:0 0.25em">{{.Lower}},</td>
- <td style="text-align:right;padding:0 0.25em">{{.Upper}})</td>
- <td style="text-align:right;padding:0 0.25em">{{.N}}</td>
- <td style="text-align:right;padding:0 0.25em">{{printf "%#.3f" .Pct}}%</td>
- <td style="text-align:right;padding:0 0.25em">{{printf "%#.3f" .CumulativePct}}%</td>
- <td><div style="background-color: blue; height: 1em; width: {{.GraphWidth}};"></div></td>
- </tr>
-{{end}}
-{{end}}
-</table>
-`))
- })
- return distTmplCache
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram_test.go
deleted file mode 100644
index d384b9332..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/histogram_test.go
+++ /dev/null
@@ -1,325 +0,0 @@
-// Copyright 2015 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 file.
-
-package trace
-
-import (
- "math"
- "testing"
-)
-
-type sumTest struct {
- value int64
- sum int64
- sumOfSquares float64
- total int64
-}
-
-var sumTests = []sumTest{
- {100, 100, 10000, 1},
- {50, 150, 12500, 2},
- {50, 200, 15000, 3},
- {50, 250, 17500, 4},
-}
-
-type bucketingTest struct {
- in int64
- log int
- bucket int
-}
-
-var bucketingTests = []bucketingTest{
- {0, 0, 0},
- {1, 1, 0},
- {2, 2, 1},
- {3, 2, 1},
- {4, 3, 2},
- {1000, 10, 9},
- {1023, 10, 9},
- {1024, 11, 10},
- {1000000, 20, 19},
-}
-
-type multiplyTest struct {
- in int64
- ratio float64
- expectedSum int64
- expectedTotal int64
- expectedSumOfSquares float64
-}
-
-var multiplyTests = []multiplyTest{
- {15, 2.5, 37, 2, 562.5},
- {128, 4.6, 758, 13, 77953.9},
-}
-
-type percentileTest struct {
- fraction float64
- expected int64
-}
-
-var percentileTests = []percentileTest{
- {0.25, 48},
- {0.5, 96},
- {0.6, 109},
- {0.75, 128},
- {0.90, 205},
- {0.95, 230},
- {0.99, 256},
-}
-
-func TestSum(t *testing.T) {
- var h histogram
-
- for _, test := range sumTests {
- h.addMeasurement(test.value)
- sum := h.sum
- if sum != test.sum {
- t.Errorf("h.Sum = %v WANT: %v", sum, test.sum)
- }
-
- sumOfSquares := h.sumOfSquares
- if sumOfSquares != test.sumOfSquares {
- t.Errorf("h.SumOfSquares = %v WANT: %v", sumOfSquares, test.sumOfSquares)
- }
-
- total := h.total()
- if total != test.total {
- t.Errorf("h.Total = %v WANT: %v", total, test.total)
- }
- }
-}
-
-func TestMultiply(t *testing.T) {
- var h histogram
- for i, test := range multiplyTests {
- h.addMeasurement(test.in)
- h.Multiply(test.ratio)
- if h.sum != test.expectedSum {
- t.Errorf("#%v: h.sum = %v WANT: %v", i, h.sum, test.expectedSum)
- }
- if h.total() != test.expectedTotal {
- t.Errorf("#%v: h.total = %v WANT: %v", i, h.total(), test.expectedTotal)
- }
- if h.sumOfSquares != test.expectedSumOfSquares {
- t.Errorf("#%v: h.SumOfSquares = %v WANT: %v", i, test.expectedSumOfSquares, h.sumOfSquares)
- }
- }
-}
-
-func TestBucketingFunctions(t *testing.T) {
- for _, test := range bucketingTests {
- log := log2(test.in)
- if log != test.log {
- t.Errorf("log2 = %v WANT: %v", log, test.log)
- }
-
- bucket := getBucket(test.in)
- if bucket != test.bucket {
- t.Errorf("getBucket = %v WANT: %v", bucket, test.bucket)
- }
- }
-}
-
-func TestAverage(t *testing.T) {
- a := new(histogram)
- average := a.average()
- if average != 0 {
- t.Errorf("Average of empty histogram was %v WANT: 0", average)
- }
-
- a.addMeasurement(1)
- a.addMeasurement(1)
- a.addMeasurement(3)
- const expected = float64(5) / float64(3)
- average = a.average()
-
- if !isApproximate(average, expected) {
- t.Errorf("Average = %g WANT: %v", average, expected)
- }
-}
-
-func TestStandardDeviation(t *testing.T) {
- a := new(histogram)
- add(a, 10, 1<<4)
- add(a, 10, 1<<5)
- add(a, 10, 1<<6)
- stdDev := a.standardDeviation()
- const expected = 19.95
-
- if !isApproximate(stdDev, expected) {
- t.Errorf("StandardDeviation = %v WANT: %v", stdDev, expected)
- }
-
- // No values
- a = new(histogram)
- stdDev = a.standardDeviation()
-
- if !isApproximate(stdDev, 0) {
- t.Errorf("StandardDeviation = %v WANT: 0", stdDev)
- }
-
- add(a, 1, 1<<4)
- if !isApproximate(stdDev, 0) {
- t.Errorf("StandardDeviation = %v WANT: 0", stdDev)
- }
-
- add(a, 10, 1<<4)
- if !isApproximate(stdDev, 0) {
- t.Errorf("StandardDeviation = %v WANT: 0", stdDev)
- }
-}
-
-func TestPercentileBoundary(t *testing.T) {
- a := new(histogram)
- add(a, 5, 1<<4)
- add(a, 10, 1<<6)
- add(a, 5, 1<<7)
-
- for _, test := range percentileTests {
- percentile := a.percentileBoundary(test.fraction)
- if percentile != test.expected {
- t.Errorf("h.PercentileBoundary (fraction=%v) = %v WANT: %v", test.fraction, percentile, test.expected)
- }
- }
-}
-
-func TestCopyFrom(t *testing.T) {
- a := histogram{5, 25, []int64{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, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1}
- b := histogram{6, 36, []int64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}, 5, -1}
-
- a.CopyFrom(&b)
-
- if a.String() != b.String() {
- t.Errorf("a.String = %s WANT: %s", a.String(), b.String())
- }
-}
-
-func TestClear(t *testing.T) {
- a := histogram{5, 25, []int64{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, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1}
-
- a.Clear()
-
- expected := "0, 0.000000, 0, 0, []"
- if a.String() != expected {
- t.Errorf("a.String = %s WANT %s", a.String(), expected)
- }
-}
-
-func TestNew(t *testing.T) {
- a := histogram{5, 25, []int64{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, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1}
- b := a.New()
-
- expected := "0, 0.000000, 0, 0, []"
- if b.(*histogram).String() != expected {
- t.Errorf("b.(*histogram).String = %s WANT: %s", b.(*histogram).String(), expected)
- }
-}
-
-func TestAdd(t *testing.T) {
- // The tests here depend on the associativity of addMeasurement and Add.
- // Add empty observation
- a := histogram{5, 25, []int64{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, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1}
- b := a.New()
-
- expected := a.String()
- a.Add(b)
- if a.String() != expected {
- t.Errorf("a.String = %s WANT: %s", a.String(), expected)
- }
-
- // Add same bucketed value, no new buckets
- c := new(histogram)
- d := new(histogram)
- e := new(histogram)
- c.addMeasurement(12)
- d.addMeasurement(11)
- e.addMeasurement(12)
- e.addMeasurement(11)
- c.Add(d)
- if c.String() != e.String() {
- t.Errorf("c.String = %s WANT: %s", c.String(), e.String())
- }
-
- // Add bucketed values
- f := new(histogram)
- g := new(histogram)
- h := new(histogram)
- f.addMeasurement(4)
- f.addMeasurement(12)
- f.addMeasurement(100)
- g.addMeasurement(18)
- g.addMeasurement(36)
- g.addMeasurement(255)
- h.addMeasurement(4)
- h.addMeasurement(12)
- h.addMeasurement(100)
- h.addMeasurement(18)
- h.addMeasurement(36)
- h.addMeasurement(255)
- f.Add(g)
- if f.String() != h.String() {
- t.Errorf("f.String = %q WANT: %q", f.String(), h.String())
- }
-
- // add buckets to no buckets
- i := new(histogram)
- j := new(histogram)
- k := new(histogram)
- j.addMeasurement(18)
- j.addMeasurement(36)
- j.addMeasurement(255)
- k.addMeasurement(18)
- k.addMeasurement(36)
- k.addMeasurement(255)
- i.Add(j)
- if i.String() != k.String() {
- t.Errorf("i.String = %q WANT: %q", i.String(), k.String())
- }
-
- // add buckets to single value (no overlap)
- l := new(histogram)
- m := new(histogram)
- n := new(histogram)
- l.addMeasurement(0)
- m.addMeasurement(18)
- m.addMeasurement(36)
- m.addMeasurement(255)
- n.addMeasurement(0)
- n.addMeasurement(18)
- n.addMeasurement(36)
- n.addMeasurement(255)
- l.Add(m)
- if l.String() != n.String() {
- t.Errorf("l.String = %q WANT: %q", l.String(), n.String())
- }
-
- // mixed order
- o := new(histogram)
- p := new(histogram)
- o.addMeasurement(0)
- o.addMeasurement(2)
- o.addMeasurement(0)
- p.addMeasurement(0)
- p.addMeasurement(0)
- p.addMeasurement(2)
- if o.String() != p.String() {
- t.Errorf("o.String = %q WANT: %q", o.String(), p.String())
- }
-}
-
-func add(h *histogram, times int, val int64) {
- for i := 0; i < times; i++ {
- h.addMeasurement(val)
- }
-}
-
-func isApproximate(x, y float64) bool {
- return math.Abs(x-y) < 1e-2
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace.go
deleted file mode 100644
index bb72a527e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace.go
+++ /dev/null
@@ -1,1082 +0,0 @@
-// Copyright 2015 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 file.
-
-/*
-Package trace implements tracing of requests and long-lived objects.
-It exports HTTP interfaces on /debug/requests and /debug/events.
-
-A trace.Trace provides tracing for short-lived objects, usually requests.
-A request handler might be implemented like this:
-
- func fooHandler(w http.ResponseWriter, req *http.Request) {
- tr := trace.New("mypkg.Foo", req.URL.Path)
- defer tr.Finish()
- ...
- tr.LazyPrintf("some event %q happened", str)
- ...
- if err := somethingImportant(); err != nil {
- tr.LazyPrintf("somethingImportant failed: %v", err)
- tr.SetError()
- }
- }
-
-The /debug/requests HTTP endpoint organizes the traces by family,
-errors, and duration. It also provides histogram of request duration
-for each family.
-
-A trace.EventLog provides tracing for long-lived objects, such as RPC
-connections.
-
- // A Fetcher fetches URL paths for a single domain.
- type Fetcher struct {
- domain string
- events trace.EventLog
- }
-
- func NewFetcher(domain string) *Fetcher {
- return &Fetcher{
- domain,
- trace.NewEventLog("mypkg.Fetcher", domain),
- }
- }
-
- func (f *Fetcher) Fetch(path string) (string, error) {
- resp, err := http.Get("http://" + f.domain + "/" + path)
- if err != nil {
- f.events.Errorf("Get(%q) = %v", path, err)
- return "", err
- }
- f.events.Printf("Get(%q) = %s", path, resp.Status)
- ...
- }
-
- func (f *Fetcher) Close() error {
- f.events.Finish()
- return nil
- }
-
-The /debug/events HTTP endpoint organizes the event logs by family and
-by time since the last error. The expanded view displays recent log
-entries and the log's call stack.
-*/
-package trace // import "golang.org/x/net/trace"
-
-import (
- "bytes"
- "fmt"
- "html/template"
- "io"
- "log"
- "net"
- "net/http"
- "runtime"
- "sort"
- "strconv"
- "sync"
- "sync/atomic"
- "time"
-
- "golang.org/x/net/internal/timeseries"
-)
-
-// DebugUseAfterFinish controls whether to debug uses of Trace values after finishing.
-// FOR DEBUGGING ONLY. This will slow down the program.
-var DebugUseAfterFinish = false
-
-// AuthRequest determines whether a specific request is permitted to load the
-// /debug/requests or /debug/events pages.
-//
-// It returns two bools; the first indicates whether the page may be viewed at all,
-// and the second indicates whether sensitive events will be shown.
-//
-// AuthRequest may be replaced by a program to customize its authorization requirements.
-//
-// The default AuthRequest function returns (true, true) if and only if the request
-// comes from localhost/127.0.0.1/[::1].
-var AuthRequest = func(req *http.Request) (any, sensitive bool) {
- // RemoteAddr is commonly in the form "IP" or "IP:port".
- // If it is in the form "IP:port", split off the port.
- host, _, err := net.SplitHostPort(req.RemoteAddr)
- if err != nil {
- host = req.RemoteAddr
- }
- switch host {
- case "localhost", "127.0.0.1", "::1":
- return true, true
- default:
- return false, false
- }
-}
-
-func init() {
- // TODO(jbd): Serve Traces from /debug/traces in the future?
- // There is no requirement for a request to be present to have traces.
- http.HandleFunc("/debug/requests", Traces)
- http.HandleFunc("/debug/events", Events)
-}
-
-// Traces responds with traces from the program.
-// The package initialization registers it in http.DefaultServeMux
-// at /debug/requests.
-//
-// It performs authorization by running AuthRequest.
-func Traces(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- Render(w, req, sensitive)
-}
-
-// Events responds with a page of events collected by EventLogs.
-// The package initialization registers it in http.DefaultServeMux
-// at /debug/events.
-//
-// It performs authorization by running AuthRequest.
-func Events(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- RenderEvents(w, req, sensitive)
-}
-
-// Render renders the HTML page typically served at /debug/requests.
-// It does not do any auth checking. The request may be nil.
-//
-// Most users will use the Traces handler.
-func Render(w io.Writer, req *http.Request, sensitive bool) {
- data := &struct {
- Families []string
- ActiveTraceCount map[string]int
- CompletedTraces map[string]*family
-
- // Set when a bucket has been selected.
- Traces traceList
- Family string
- Bucket int
- Expanded bool
- Traced bool
- Active bool
- ShowSensitive bool // whether to show sensitive events
-
- Histogram template.HTML
- HistogramWindow string // e.g. "last minute", "last hour", "all time"
-
- // If non-zero, the set of traces is a partial set,
- // and this is the total number.
- Total int
- }{
- CompletedTraces: completedTraces,
- }
-
- data.ShowSensitive = sensitive
- if req != nil {
- // Allow show_sensitive=0 to force hiding of sensitive data for testing.
- // This only goes one way; you can't use show_sensitive=1 to see things.
- if req.FormValue("show_sensitive") == "0" {
- data.ShowSensitive = false
- }
-
- if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil {
- data.Expanded = exp
- }
- if exp, err := strconv.ParseBool(req.FormValue("rtraced")); err == nil {
- data.Traced = exp
- }
- }
-
- completedMu.RLock()
- data.Families = make([]string, 0, len(completedTraces))
- for fam := range completedTraces {
- data.Families = append(data.Families, fam)
- }
- completedMu.RUnlock()
- sort.Strings(data.Families)
-
- // We are careful here to minimize the time spent locking activeMu,
- // since that lock is required every time an RPC starts and finishes.
- data.ActiveTraceCount = make(map[string]int, len(data.Families))
- activeMu.RLock()
- for fam, s := range activeTraces {
- data.ActiveTraceCount[fam] = s.Len()
- }
- activeMu.RUnlock()
-
- var ok bool
- data.Family, data.Bucket, ok = parseArgs(req)
- switch {
- case !ok:
- // No-op
- case data.Bucket == -1:
- data.Active = true
- n := data.ActiveTraceCount[data.Family]
- data.Traces = getActiveTraces(data.Family)
- if len(data.Traces) < n {
- data.Total = n
- }
- case data.Bucket < bucketsPerFamily:
- if b := lookupBucket(data.Family, data.Bucket); b != nil {
- data.Traces = b.Copy(data.Traced)
- }
- default:
- if f := getFamily(data.Family, false); f != nil {
- var obs timeseries.Observable
- f.LatencyMu.RLock()
- switch o := data.Bucket - bucketsPerFamily; o {
- case 0:
- obs = f.Latency.Minute()
- data.HistogramWindow = "last minute"
- case 1:
- obs = f.Latency.Hour()
- data.HistogramWindow = "last hour"
- case 2:
- obs = f.Latency.Total()
- data.HistogramWindow = "all time"
- }
- f.LatencyMu.RUnlock()
- if obs != nil {
- data.Histogram = obs.(*histogram).html()
- }
- }
- }
-
- if data.Traces != nil {
- defer data.Traces.Free()
- sort.Sort(data.Traces)
- }
-
- completedMu.RLock()
- defer completedMu.RUnlock()
- if err := pageTmpl().ExecuteTemplate(w, "Page", data); err != nil {
- log.Printf("net/trace: Failed executing template: %v", err)
- }
-}
-
-func parseArgs(req *http.Request) (fam string, b int, ok bool) {
- if req == nil {
- return "", 0, false
- }
- fam, bStr := req.FormValue("fam"), req.FormValue("b")
- if fam == "" || bStr == "" {
- return "", 0, false
- }
- b, err := strconv.Atoi(bStr)
- if err != nil || b < -1 {
- return "", 0, false
- }
-
- return fam, b, true
-}
-
-func lookupBucket(fam string, b int) *traceBucket {
- f := getFamily(fam, false)
- if f == nil || b < 0 || b >= len(f.Buckets) {
- return nil
- }
- return f.Buckets[b]
-}
-
-type contextKeyT string
-
-var contextKey = contextKeyT("golang.org/x/net/trace.Trace")
-
-// Trace represents an active request.
-type Trace interface {
- // LazyLog adds x to the event log. It will be evaluated each time the
- // /debug/requests page is rendered. Any memory referenced by x will be
- // pinned until the trace is finished and later discarded.
- LazyLog(x fmt.Stringer, sensitive bool)
-
- // LazyPrintf evaluates its arguments with fmt.Sprintf each time the
- // /debug/requests page is rendered. Any memory referenced by a will be
- // pinned until the trace is finished and later discarded.
- LazyPrintf(format string, a ...interface{})
-
- // SetError declares that this trace resulted in an error.
- SetError()
-
- // SetRecycler sets a recycler for the trace.
- // f will be called for each event passed to LazyLog at a time when
- // it is no longer required, whether while the trace is still active
- // and the event is discarded, or when a completed trace is discarded.
- SetRecycler(f func(interface{}))
-
- // SetTraceInfo sets the trace info for the trace.
- // This is currently unused.
- SetTraceInfo(traceID, spanID uint64)
-
- // SetMaxEvents sets the maximum number of events that will be stored
- // in the trace. This has no effect if any events have already been
- // added to the trace.
- SetMaxEvents(m int)
-
- // Finish declares that this trace is complete.
- // The trace should not be used after calling this method.
- Finish()
-}
-
-type lazySprintf struct {
- format string
- a []interface{}
-}
-
-func (l *lazySprintf) String() string {
- return fmt.Sprintf(l.format, l.a...)
-}
-
-// New returns a new Trace with the specified family and title.
-func New(family, title string) Trace {
- tr := newTrace()
- tr.ref()
- tr.Family, tr.Title = family, title
- tr.Start = time.Now()
- tr.maxEvents = maxEventsPerTrace
- tr.events = tr.eventsBuf[:0]
-
- activeMu.RLock()
- s := activeTraces[tr.Family]
- activeMu.RUnlock()
- if s == nil {
- activeMu.Lock()
- s = activeTraces[tr.Family] // check again
- if s == nil {
- s = new(traceSet)
- activeTraces[tr.Family] = s
- }
- activeMu.Unlock()
- }
- s.Add(tr)
-
- // Trigger allocation of the completed trace structure for this family.
- // This will cause the family to be present in the request page during
- // the first trace of this family. We don't care about the return value,
- // nor is there any need for this to run inline, so we execute it in its
- // own goroutine, but only if the family isn't allocated yet.
- completedMu.RLock()
- if _, ok := completedTraces[tr.Family]; !ok {
- go allocFamily(tr.Family)
- }
- completedMu.RUnlock()
-
- return tr
-}
-
-func (tr *trace) Finish() {
- tr.Elapsed = time.Now().Sub(tr.Start)
- if DebugUseAfterFinish {
- buf := make([]byte, 4<<10) // 4 KB should be enough
- n := runtime.Stack(buf, false)
- tr.finishStack = buf[:n]
- }
-
- activeMu.RLock()
- m := activeTraces[tr.Family]
- activeMu.RUnlock()
- m.Remove(tr)
-
- f := getFamily(tr.Family, true)
- for _, b := range f.Buckets {
- if b.Cond.match(tr) {
- b.Add(tr)
- }
- }
- // Add a sample of elapsed time as microseconds to the family's timeseries
- h := new(histogram)
- h.addMeasurement(tr.Elapsed.Nanoseconds() / 1e3)
- f.LatencyMu.Lock()
- f.Latency.Add(h)
- f.LatencyMu.Unlock()
-
- tr.unref() // matches ref in New
-}
-
-const (
- bucketsPerFamily = 9
- tracesPerBucket = 10
- maxActiveTraces = 20 // Maximum number of active traces to show.
- maxEventsPerTrace = 10
- numHistogramBuckets = 38
-)
-
-var (
- // The active traces.
- activeMu sync.RWMutex
- activeTraces = make(map[string]*traceSet) // family -> traces
-
- // Families of completed traces.
- completedMu sync.RWMutex
- completedTraces = make(map[string]*family) // family -> traces
-)
-
-type traceSet struct {
- mu sync.RWMutex
- m map[*trace]bool
-
- // We could avoid the entire map scan in FirstN by having a slice of all the traces
- // ordered by start time, and an index into that from the trace struct, with a periodic
- // repack of the slice after enough traces finish; we could also use a skip list or similar.
- // However, that would shift some of the expense from /debug/requests time to RPC time,
- // which is probably the wrong trade-off.
-}
-
-func (ts *traceSet) Len() int {
- ts.mu.RLock()
- defer ts.mu.RUnlock()
- return len(ts.m)
-}
-
-func (ts *traceSet) Add(tr *trace) {
- ts.mu.Lock()
- if ts.m == nil {
- ts.m = make(map[*trace]bool)
- }
- ts.m[tr] = true
- ts.mu.Unlock()
-}
-
-func (ts *traceSet) Remove(tr *trace) {
- ts.mu.Lock()
- delete(ts.m, tr)
- ts.mu.Unlock()
-}
-
-// FirstN returns the first n traces ordered by time.
-func (ts *traceSet) FirstN(n int) traceList {
- ts.mu.RLock()
- defer ts.mu.RUnlock()
-
- if n > len(ts.m) {
- n = len(ts.m)
- }
- trl := make(traceList, 0, n)
-
- // Fast path for when no selectivity is needed.
- if n == len(ts.m) {
- for tr := range ts.m {
- tr.ref()
- trl = append(trl, tr)
- }
- sort.Sort(trl)
- return trl
- }
-
- // Pick the oldest n traces.
- // This is inefficient. See the comment in the traceSet struct.
- for tr := range ts.m {
- // Put the first n traces into trl in the order they occur.
- // When we have n, sort trl, and thereafter maintain its order.
- if len(trl) < n {
- tr.ref()
- trl = append(trl, tr)
- if len(trl) == n {
- // This is guaranteed to happen exactly once during this loop.
- sort.Sort(trl)
- }
- continue
- }
- if tr.Start.After(trl[n-1].Start) {
- continue
- }
-
- // Find where to insert this one.
- tr.ref()
- i := sort.Search(n, func(i int) bool { return trl[i].Start.After(tr.Start) })
- trl[n-1].unref()
- copy(trl[i+1:], trl[i:])
- trl[i] = tr
- }
-
- return trl
-}
-
-func getActiveTraces(fam string) traceList {
- activeMu.RLock()
- s := activeTraces[fam]
- activeMu.RUnlock()
- if s == nil {
- return nil
- }
- return s.FirstN(maxActiveTraces)
-}
-
-func getFamily(fam string, allocNew bool) *family {
- completedMu.RLock()
- f := completedTraces[fam]
- completedMu.RUnlock()
- if f == nil && allocNew {
- f = allocFamily(fam)
- }
- return f
-}
-
-func allocFamily(fam string) *family {
- completedMu.Lock()
- defer completedMu.Unlock()
- f := completedTraces[fam]
- if f == nil {
- f = newFamily()
- completedTraces[fam] = f
- }
- return f
-}
-
-// family represents a set of trace buckets and associated latency information.
-type family struct {
- // traces may occur in multiple buckets.
- Buckets [bucketsPerFamily]*traceBucket
-
- // latency time series
- LatencyMu sync.RWMutex
- Latency *timeseries.MinuteHourSeries
-}
-
-func newFamily() *family {
- return &family{
- Buckets: [bucketsPerFamily]*traceBucket{
- {Cond: minCond(0)},
- {Cond: minCond(50 * time.Millisecond)},
- {Cond: minCond(100 * time.Millisecond)},
- {Cond: minCond(200 * time.Millisecond)},
- {Cond: minCond(500 * time.Millisecond)},
- {Cond: minCond(1 * time.Second)},
- {Cond: minCond(10 * time.Second)},
- {Cond: minCond(100 * time.Second)},
- {Cond: errorCond{}},
- },
- Latency: timeseries.NewMinuteHourSeries(func() timeseries.Observable { return new(histogram) }),
- }
-}
-
-// traceBucket represents a size-capped bucket of historic traces,
-// along with a condition for a trace to belong to the bucket.
-type traceBucket struct {
- Cond cond
-
- // Ring buffer implementation of a fixed-size FIFO queue.
- mu sync.RWMutex
- buf [tracesPerBucket]*trace
- start int // < tracesPerBucket
- length int // <= tracesPerBucket
-}
-
-func (b *traceBucket) Add(tr *trace) {
- b.mu.Lock()
- defer b.mu.Unlock()
-
- i := b.start + b.length
- if i >= tracesPerBucket {
- i -= tracesPerBucket
- }
- if b.length == tracesPerBucket {
- // "Remove" an element from the bucket.
- b.buf[i].unref()
- b.start++
- if b.start == tracesPerBucket {
- b.start = 0
- }
- }
- b.buf[i] = tr
- if b.length < tracesPerBucket {
- b.length++
- }
- tr.ref()
-}
-
-// Copy returns a copy of the traces in the bucket.
-// If tracedOnly is true, only the traces with trace information will be returned.
-// The logs will be ref'd before returning; the caller should call
-// the Free method when it is done with them.
-// TODO(dsymonds): keep track of traced requests in separate buckets.
-func (b *traceBucket) Copy(tracedOnly bool) traceList {
- b.mu.RLock()
- defer b.mu.RUnlock()
-
- trl := make(traceList, 0, b.length)
- for i, x := 0, b.start; i < b.length; i++ {
- tr := b.buf[x]
- if !tracedOnly || tr.spanID != 0 {
- tr.ref()
- trl = append(trl, tr)
- }
- x++
- if x == b.length {
- x = 0
- }
- }
- return trl
-}
-
-func (b *traceBucket) Empty() bool {
- b.mu.RLock()
- defer b.mu.RUnlock()
- return b.length == 0
-}
-
-// cond represents a condition on a trace.
-type cond interface {
- match(t *trace) bool
- String() string
-}
-
-type minCond time.Duration
-
-func (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) }
-func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) }
-
-type errorCond struct{}
-
-func (e errorCond) match(t *trace) bool { return t.IsError }
-func (e errorCond) String() string { return "errors" }
-
-type traceList []*trace
-
-// Free calls unref on each element of the list.
-func (trl traceList) Free() {
- for _, t := range trl {
- t.unref()
- }
-}
-
-// traceList may be sorted in reverse chronological order.
-func (trl traceList) Len() int { return len(trl) }
-func (trl traceList) Less(i, j int) bool { return trl[i].Start.After(trl[j].Start) }
-func (trl traceList) Swap(i, j int) { trl[i], trl[j] = trl[j], trl[i] }
-
-// An event is a timestamped log entry in a trace.
-type event struct {
- When time.Time
- Elapsed time.Duration // since previous event in trace
- NewDay bool // whether this event is on a different day to the previous event
- Recyclable bool // whether this event was passed via LazyLog
- Sensitive bool // whether this event contains sensitive information
- What interface{} // string or fmt.Stringer
-}
-
-// WhenString returns a string representation of the elapsed time of the event.
-// It will include the date if midnight was crossed.
-func (e event) WhenString() string {
- if e.NewDay {
- return e.When.Format("2006/01/02 15:04:05.000000")
- }
- return e.When.Format("15:04:05.000000")
-}
-
-// discarded represents a number of discarded events.
-// It is stored as *discarded to make it easier to update in-place.
-type discarded int
-
-func (d *discarded) String() string {
- return fmt.Sprintf("(%d events discarded)", int(*d))
-}
-
-// trace represents an active or complete request,
-// either sent or received by this program.
-type trace struct {
- // Family is the top-level grouping of traces to which this belongs.
- Family string
-
- // Title is the title of this trace.
- Title string
-
- // Timing information.
- Start time.Time
- Elapsed time.Duration // zero while active
-
- // Trace information if non-zero.
- traceID uint64
- spanID uint64
-
- // Whether this trace resulted in an error.
- IsError bool
-
- // Append-only sequence of events (modulo discards).
- mu sync.RWMutex
- events []event
- maxEvents int
-
- refs int32 // how many buckets this is in
- recycler func(interface{})
- disc discarded // scratch space to avoid allocation
-
- finishStack []byte // where finish was called, if DebugUseAfterFinish is set
-
- eventsBuf [4]event // preallocated buffer in case we only log a few events
-}
-
-func (tr *trace) reset() {
- // Clear all but the mutex. Mutexes may not be copied, even when unlocked.
- tr.Family = ""
- tr.Title = ""
- tr.Start = time.Time{}
- tr.Elapsed = 0
- tr.traceID = 0
- tr.spanID = 0
- tr.IsError = false
- tr.maxEvents = 0
- tr.events = nil
- tr.refs = 0
- tr.recycler = nil
- tr.disc = 0
- tr.finishStack = nil
- for i := range tr.eventsBuf {
- tr.eventsBuf[i] = event{}
- }
-}
-
-// delta returns the elapsed time since the last event or the trace start,
-// and whether it spans midnight.
-// L >= tr.mu
-func (tr *trace) delta(t time.Time) (time.Duration, bool) {
- if len(tr.events) == 0 {
- return t.Sub(tr.Start), false
- }
- prev := tr.events[len(tr.events)-1].When
- return t.Sub(prev), prev.Day() != t.Day()
-}
-
-func (tr *trace) addEvent(x interface{}, recyclable, sensitive bool) {
- if DebugUseAfterFinish && tr.finishStack != nil {
- buf := make([]byte, 4<<10) // 4 KB should be enough
- n := runtime.Stack(buf, false)
- log.Printf("net/trace: trace used after finish:\nFinished at:\n%s\nUsed at:\n%s", tr.finishStack, buf[:n])
- }
-
- /*
- NOTE TO DEBUGGERS
-
- If you are here because your program panicked in this code,
- it is almost definitely the fault of code using this package,
- and very unlikely to be the fault of this code.
-
- The most likely scenario is that some code elsewhere is using
- a trace.Trace after its Finish method is called.
- You can temporarily set the DebugUseAfterFinish var
- to help discover where that is; do not leave that var set,
- since it makes this package much less efficient.
- */
-
- e := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive}
- tr.mu.Lock()
- e.Elapsed, e.NewDay = tr.delta(e.When)
- if len(tr.events) < tr.maxEvents {
- tr.events = append(tr.events, e)
- } else {
- // Discard the middle events.
- di := int((tr.maxEvents - 1) / 2)
- if d, ok := tr.events[di].What.(*discarded); ok {
- (*d)++
- } else {
- // disc starts at two to count for the event it is replacing,
- // plus the next one that we are about to drop.
- tr.disc = 2
- if tr.recycler != nil && tr.events[di].Recyclable {
- go tr.recycler(tr.events[di].What)
- }
- tr.events[di].What = &tr.disc
- }
- // The timestamp of the discarded meta-event should be
- // the time of the last event it is representing.
- tr.events[di].When = tr.events[di+1].When
-
- if tr.recycler != nil && tr.events[di+1].Recyclable {
- go tr.recycler(tr.events[di+1].What)
- }
- copy(tr.events[di+1:], tr.events[di+2:])
- tr.events[tr.maxEvents-1] = e
- }
- tr.mu.Unlock()
-}
-
-func (tr *trace) LazyLog(x fmt.Stringer, sensitive bool) {
- tr.addEvent(x, true, sensitive)
-}
-
-func (tr *trace) LazyPrintf(format string, a ...interface{}) {
- tr.addEvent(&lazySprintf{format, a}, false, false)
-}
-
-func (tr *trace) SetError() { tr.IsError = true }
-
-func (tr *trace) SetRecycler(f func(interface{})) {
- tr.recycler = f
-}
-
-func (tr *trace) SetTraceInfo(traceID, spanID uint64) {
- tr.traceID, tr.spanID = traceID, spanID
-}
-
-func (tr *trace) SetMaxEvents(m int) {
- // Always keep at least three events: first, discarded count, last.
- if len(tr.events) == 0 && m > 3 {
- tr.maxEvents = m
- }
-}
-
-func (tr *trace) ref() {
- atomic.AddInt32(&tr.refs, 1)
-}
-
-func (tr *trace) unref() {
- if atomic.AddInt32(&tr.refs, -1) == 0 {
- if tr.recycler != nil {
- // freeTrace clears tr, so we hold tr.recycler and tr.events here.
- go func(f func(interface{}), es []event) {
- for _, e := range es {
- if e.Recyclable {
- f(e.What)
- }
- }
- }(tr.recycler, tr.events)
- }
-
- freeTrace(tr)
- }
-}
-
-func (tr *trace) When() string {
- return tr.Start.Format("2006/01/02 15:04:05.000000")
-}
-
-func (tr *trace) ElapsedTime() string {
- t := tr.Elapsed
- if t == 0 {
- // Active trace.
- t = time.Since(tr.Start)
- }
- return fmt.Sprintf("%.6f", t.Seconds())
-}
-
-func (tr *trace) Events() []event {
- tr.mu.RLock()
- defer tr.mu.RUnlock()
- return tr.events
-}
-
-var traceFreeList = make(chan *trace, 1000) // TODO(dsymonds): Use sync.Pool?
-
-// newTrace returns a trace ready to use.
-func newTrace() *trace {
- select {
- case tr := <-traceFreeList:
- return tr
- default:
- return new(trace)
- }
-}
-
-// freeTrace adds tr to traceFreeList if there's room.
-// This is non-blocking.
-func freeTrace(tr *trace) {
- if DebugUseAfterFinish {
- return // never reuse
- }
- tr.reset()
- select {
- case traceFreeList <- tr:
- default:
- }
-}
-
-func elapsed(d time.Duration) string {
- b := []byte(fmt.Sprintf("%.6f", d.Seconds()))
-
- // For subsecond durations, blank all zeros before decimal point,
- // and all zeros between the decimal point and the first non-zero digit.
- if d < time.Second {
- dot := bytes.IndexByte(b, '.')
- for i := 0; i < dot; i++ {
- b[i] = ' '
- }
- for i := dot + 1; i < len(b); i++ {
- if b[i] == '0' {
- b[i] = ' '
- } else {
- break
- }
- }
- }
-
- return string(b)
-}
-
-var pageTmplCache *template.Template
-var pageTmplOnce sync.Once
-
-func pageTmpl() *template.Template {
- pageTmplOnce.Do(func() {
- pageTmplCache = template.Must(template.New("Page").Funcs(template.FuncMap{
- "elapsed": elapsed,
- "add": func(a, b int) int { return a + b },
- }).Parse(pageHTML))
- })
- return pageTmplCache
-}
-
-const pageHTML = `
-{{template "Prolog" .}}
-{{template "StatusTable" .}}
-{{template "Epilog" .}}
-
-{{define "Prolog"}}
-<html>
- <head>
- <title>/debug/requests</title>
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
- table#tr-status td.family {
- padding-right: 2em;
- }
- table#tr-status td.active {
- padding-right: 1em;
- }
- table#tr-status td.latency-first {
- padding-left: 1em;
- }
- table#tr-status td.empty {
- color: #aaa;
- }
- table#reqs {
- margin-top: 1em;
- }
- table#reqs tr.first {
- {{if $.Expanded}}font-weight: bold;{{end}}
- }
- table#reqs td {
- font-family: monospace;
- }
- table#reqs td.when {
- text-align: right;
- white-space: nowrap;
- }
- table#reqs td.elapsed {
- padding: 0 0.5em;
- text-align: right;
- white-space: pre;
- width: 10em;
- }
- address {
- font-size: smaller;
- margin-top: 5em;
- }
- </style>
- </head>
- <body>
-
-<h1>/debug/requests</h1>
-{{end}} {{/* end of Prolog */}}
-
-{{define "StatusTable"}}
-<table id="tr-status">
- {{range $fam := .Families}}
- <tr>
- <td class="family">{{$fam}}</td>
-
- {{$n := index $.ActiveTraceCount $fam}}
- <td class="active {{if not $n}}empty{{end}}">
- {{if $n}}<a href="?fam={{$fam}}&b=-1{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{$n}} active]
- {{if $n}}</a>{{end}}
- </td>
-
- {{$f := index $.CompletedTraces $fam}}
- {{range $i, $b := $f.Buckets}}
- {{$empty := $b.Empty}}
- <td {{if $empty}}class="empty"{{end}}>
- {{if not $empty}}<a href="?fam={{$fam}}&b={{$i}}{{if $.Expanded}}&exp=1{{end}}">{{end}}
- [{{.Cond}}]
- {{if not $empty}}</a>{{end}}
- </td>
- {{end}}
-
- {{$nb := len $f.Buckets}}
- <td class="latency-first">
- <a href="?fam={{$fam}}&b={{$nb}}">[minute]</a>
- </td>
- <td>
- <a href="?fam={{$fam}}&b={{add $nb 1}}">[hour]</a>
- </td>
- <td>
- <a href="?fam={{$fam}}&b={{add $nb 2}}">[total]</a>
- </td>
-
- </tr>
- {{end}}
-</table>
-{{end}} {{/* end of StatusTable */}}
-
-{{define "Epilog"}}
-{{if $.Traces}}
-<hr />
-<h3>Family: {{$.Family}}</h3>
-
-{{if or $.Expanded $.Traced}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}">[Normal/Summary]</a>
-{{else}}
- [Normal/Summary]
-{{end}}
-
-{{if or (not $.Expanded) $.Traced}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1">[Normal/Expanded]</a>
-{{else}}
- [Normal/Expanded]
-{{end}}
-
-{{if not $.Active}}
- {{if or $.Expanded (not $.Traced)}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&rtraced=1">[Traced/Summary]</a>
- {{else}}
- [Traced/Summary]
- {{end}}
- {{if or (not $.Expanded) (not $.Traced)}}
- <a href="?fam={{$.Family}}&b={{$.Bucket}}&exp=1&rtraced=1">[Traced/Expanded]</a>
- {{else}}
- [Traced/Expanded]
- {{end}}
-{{end}}
-
-{{if $.Total}}
-<p><em>Showing <b>{{len $.Traces}}</b> of <b>{{$.Total}}</b> traces.</em></p>
-{{end}}
-
-<table id="reqs">
- <caption>
- {{if $.Active}}Active{{else}}Completed{{end}} Requests
- </caption>
- <tr><th>When</th><th>Elapsed&nbsp;(s)</th></tr>
- {{range $tr := $.Traces}}
- <tr class="first">
- <td class="when">{{$tr.When}}</td>
- <td class="elapsed">{{$tr.ElapsedTime}}</td>
- <td>{{$tr.Title}}</td>
- {{/* TODO: include traceID/spanID */}}
- </tr>
- {{if $.Expanded}}
- {{range $tr.Events}}
- <tr>
- <td class="when">{{.WhenString}}</td>
- <td class="elapsed">{{elapsed .Elapsed}}</td>
- <td>{{if or $.ShowSensitive (not .Sensitive)}}... {{.What}}{{else}}<em>[redacted]</em>{{end}}</td>
- </tr>
- {{end}}
- {{end}}
- {{end}}
-</table>
-{{end}} {{/* if $.Traces */}}
-
-{{if $.Histogram}}
-<h4>Latency (&micro;s) of {{$.Family}} over {{$.HistogramWindow}}</h4>
-{{$.Histogram}}
-{{end}} {{/* if $.Histogram */}}
-
- </body>
-</html>
-{{end}} {{/* end of Epilog */}}
-`
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go16.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go16.go
deleted file mode 100644
index d60819118..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go16.go
+++ /dev/null
@@ -1,21 +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 file.
-
-// +build !go1.7
-
-package trace
-
-import "golang.org/x/net/context"
-
-// NewContext returns a copy of the parent context
-// and associates it with a Trace.
-func NewContext(ctx context.Context, tr Trace) context.Context {
- return context.WithValue(ctx, contextKey, tr)
-}
-
-// FromContext returns the Trace bound to the context, if any.
-func FromContext(ctx context.Context) (tr Trace, ok bool) {
- tr, ok = ctx.Value(contextKey).(Trace)
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go17.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go17.go
deleted file mode 100644
index df6e1fba7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_go17.go
+++ /dev/null
@@ -1,21 +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 file.
-
-// +build go1.7
-
-package trace
-
-import "context"
-
-// NewContext returns a copy of the parent context
-// and associates it with a Trace.
-func NewContext(ctx context.Context, tr Trace) context.Context {
- return context.WithValue(ctx, contextKey, tr)
-}
-
-// FromContext returns the Trace bound to the context, if any.
-func FromContext(ctx context.Context) (tr Trace, ok bool) {
- tr, ok = ctx.Value(contextKey).(Trace)
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_test.go
deleted file mode 100644
index bfd9dfe94..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/trace/trace_test.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2015 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 file.
-
-package trace
-
-import (
- "net/http"
- "reflect"
- "testing"
-)
-
-type s struct{}
-
-func (s) String() string { return "lazy string" }
-
-// TestReset checks whether all the fields are zeroed after reset.
-func TestReset(t *testing.T) {
- tr := New("foo", "bar")
- tr.LazyLog(s{}, false)
- tr.LazyPrintf("%d", 1)
- tr.SetRecycler(func(_ interface{}) {})
- tr.SetTraceInfo(3, 4)
- tr.SetMaxEvents(100)
- tr.SetError()
- tr.Finish()
-
- tr.(*trace).reset()
-
- if !reflect.DeepEqual(tr, new(trace)) {
- t.Errorf("reset didn't clear all fields: %+v", tr)
- }
-}
-
-// TestResetLog checks whether all the fields are zeroed after reset.
-func TestResetLog(t *testing.T) {
- el := NewEventLog("foo", "bar")
- el.Printf("message")
- el.Errorf("error")
- el.Finish()
-
- el.(*eventLog).reset()
-
- if !reflect.DeepEqual(el, new(eventLog)) {
- t.Errorf("reset didn't clear all fields: %+v", el)
- }
-}
-
-func TestAuthRequest(t *testing.T) {
- testCases := []struct {
- host string
- want bool
- }{
- {host: "192.168.23.1", want: false},
- {host: "192.168.23.1:8080", want: false},
- {host: "malformed remote addr", want: false},
- {host: "localhost", want: true},
- {host: "localhost:8080", want: true},
- {host: "127.0.0.1", want: true},
- {host: "127.0.0.1:8080", want: true},
- {host: "::1", want: true},
- {host: "[::1]:8080", want: true},
- }
- for _, tt := range testCases {
- req := &http.Request{RemoteAddr: tt.host}
- any, sensitive := AuthRequest(req)
- if any != tt.want || sensitive != tt.want {
- t.Errorf("AuthRequest(%q) = %t, %t; want %t, %t", tt.host, any, sensitive, tt.want, tt.want)
- }
- }
-}
-
-// TestParseTemplate checks that all templates used by this package are valid
-// as they are parsed on first usage
-func TestParseTemplate(t *testing.T) {
- if tmpl := distTmpl(); tmpl == nil {
- t.Error("invalid template returned from distTmpl()")
- }
- if tmpl := pageTmpl(); tmpl == nil {
- t.Error("invalid template returned from pageTmpl()")
- }
- if tmpl := eventsTmpl(); tmpl == nil {
- t.Error("invalid template returned from eventsTmpl()")
- }
-}
-
-func benchmarkTrace(b *testing.B, maxEvents, numEvents int) {
- numSpans := (b.N + numEvents + 1) / numEvents
-
- for i := 0; i < numSpans; i++ {
- tr := New("test", "test")
- tr.SetMaxEvents(maxEvents)
- for j := 0; j < numEvents; j++ {
- tr.LazyPrintf("%d", j)
- }
- tr.Finish()
- }
-}
-
-func BenchmarkTrace_Default_2(b *testing.B) {
- benchmarkTrace(b, 0, 2)
-}
-
-func BenchmarkTrace_Default_10(b *testing.B) {
- benchmarkTrace(b, 0, 10)
-}
-
-func BenchmarkTrace_Default_100(b *testing.B) {
- benchmarkTrace(b, 0, 100)
-}
-
-func BenchmarkTrace_Default_1000(b *testing.B) {
- benchmarkTrace(b, 0, 1000)
-}
-
-func BenchmarkTrace_Default_10000(b *testing.B) {
- benchmarkTrace(b, 0, 10000)
-}
-
-func BenchmarkTrace_10_2(b *testing.B) {
- benchmarkTrace(b, 10, 2)
-}
-
-func BenchmarkTrace_10_10(b *testing.B) {
- benchmarkTrace(b, 10, 10)
-}
-
-func BenchmarkTrace_10_100(b *testing.B) {
- benchmarkTrace(b, 10, 100)
-}
-
-func BenchmarkTrace_10_1000(b *testing.B) {
- benchmarkTrace(b, 10, 1000)
-}
-
-func BenchmarkTrace_10_10000(b *testing.B) {
- benchmarkTrace(b, 10, 10000)
-}
-
-func BenchmarkTrace_100_2(b *testing.B) {
- benchmarkTrace(b, 100, 2)
-}
-
-func BenchmarkTrace_100_10(b *testing.B) {
- benchmarkTrace(b, 100, 10)
-}
-
-func BenchmarkTrace_100_100(b *testing.B) {
- benchmarkTrace(b, 100, 100)
-}
-
-func BenchmarkTrace_100_1000(b *testing.B) {
- benchmarkTrace(b, 100, 1000)
-}
-
-func BenchmarkTrace_100_10000(b *testing.B) {
- benchmarkTrace(b, 100, 10000)
-}
-
-func BenchmarkTrace_1000_2(b *testing.B) {
- benchmarkTrace(b, 1000, 2)
-}
-
-func BenchmarkTrace_1000_10(b *testing.B) {
- benchmarkTrace(b, 1000, 10)
-}
-
-func BenchmarkTrace_1000_100(b *testing.B) {
- benchmarkTrace(b, 1000, 100)
-}
-
-func BenchmarkTrace_1000_1000(b *testing.B) {
- benchmarkTrace(b, 1000, 1000)
-}
-
-func BenchmarkTrace_1000_10000(b *testing.B) {
- benchmarkTrace(b, 1000, 10000)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file.go
deleted file mode 100644
index 748118dd3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file.go
+++ /dev/null
@@ -1,796 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "encoding/xml"
- "io"
- "net/http"
- "os"
- "path"
- "path/filepath"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/net/context"
-)
-
-// slashClean is equivalent to but slightly more efficient than
-// path.Clean("/" + name).
-func slashClean(name string) string {
- if name == "" || name[0] != '/' {
- name = "/" + name
- }
- return path.Clean(name)
-}
-
-// A FileSystem implements access to a collection of named files. The elements
-// in a file path are separated by slash ('/', U+002F) characters, regardless
-// of host operating system convention.
-//
-// Each method has the same semantics as the os package's function of the same
-// name.
-//
-// Note that the os.Rename documentation says that "OS-specific restrictions
-// might apply". In particular, whether or not renaming a file or directory
-// overwriting another existing file or directory is an error is OS-dependent.
-type FileSystem interface {
- Mkdir(ctx context.Context, name string, perm os.FileMode) error
- OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error)
- RemoveAll(ctx context.Context, name string) error
- Rename(ctx context.Context, oldName, newName string) error
- Stat(ctx context.Context, name string) (os.FileInfo, error)
-}
-
-// A File is returned by a FileSystem's OpenFile method and can be served by a
-// Handler.
-//
-// A File may optionally implement the DeadPropsHolder interface, if it can
-// load and save dead properties.
-type File interface {
- http.File
- io.Writer
-}
-
-// A Dir implements FileSystem using the native file system restricted to a
-// specific directory tree.
-//
-// While the FileSystem.OpenFile method takes '/'-separated paths, a Dir's
-// string value is a filename on the native file system, not a URL, so it is
-// separated by filepath.Separator, which isn't necessarily '/'.
-//
-// An empty Dir is treated as ".".
-type Dir string
-
-func (d Dir) resolve(name string) string {
- // This implementation is based on Dir.Open's code in the standard net/http package.
- if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 ||
- strings.Contains(name, "\x00") {
- return ""
- }
- dir := string(d)
- if dir == "" {
- dir = "."
- }
- return filepath.Join(dir, filepath.FromSlash(slashClean(name)))
-}
-
-func (d Dir) Mkdir(ctx context.Context, name string, perm os.FileMode) error {
- if name = d.resolve(name); name == "" {
- return os.ErrNotExist
- }
- return os.Mkdir(name, perm)
-}
-
-func (d Dir) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) {
- if name = d.resolve(name); name == "" {
- return nil, os.ErrNotExist
- }
- f, err := os.OpenFile(name, flag, perm)
- if err != nil {
- return nil, err
- }
- return f, nil
-}
-
-func (d Dir) RemoveAll(ctx context.Context, name string) error {
- if name = d.resolve(name); name == "" {
- return os.ErrNotExist
- }
- if name == filepath.Clean(string(d)) {
- // Prohibit removing the virtual root directory.
- return os.ErrInvalid
- }
- return os.RemoveAll(name)
-}
-
-func (d Dir) Rename(ctx context.Context, oldName, newName string) error {
- if oldName = d.resolve(oldName); oldName == "" {
- return os.ErrNotExist
- }
- if newName = d.resolve(newName); newName == "" {
- return os.ErrNotExist
- }
- if root := filepath.Clean(string(d)); root == oldName || root == newName {
- // Prohibit renaming from or to the virtual root directory.
- return os.ErrInvalid
- }
- return os.Rename(oldName, newName)
-}
-
-func (d Dir) Stat(ctx context.Context, name string) (os.FileInfo, error) {
- if name = d.resolve(name); name == "" {
- return nil, os.ErrNotExist
- }
- return os.Stat(name)
-}
-
-// NewMemFS returns a new in-memory FileSystem implementation.
-func NewMemFS() FileSystem {
- return &memFS{
- root: memFSNode{
- children: make(map[string]*memFSNode),
- mode: 0660 | os.ModeDir,
- modTime: time.Now(),
- },
- }
-}
-
-// A memFS implements FileSystem, storing all metadata and actual file data
-// in-memory. No limits on filesystem size are used, so it is not recommended
-// this be used where the clients are untrusted.
-//
-// Concurrent access is permitted. The tree structure is protected by a mutex,
-// and each node's contents and metadata are protected by a per-node mutex.
-//
-// TODO: Enforce file permissions.
-type memFS struct {
- mu sync.Mutex
- root memFSNode
-}
-
-// TODO: clean up and rationalize the walk/find code.
-
-// walk walks the directory tree for the fullname, calling f at each step. If f
-// returns an error, the walk will be aborted and return that same error.
-//
-// dir is the directory at that step, frag is the name fragment, and final is
-// whether it is the final step. For example, walking "/foo/bar/x" will result
-// in 3 calls to f:
-// - "/", "foo", false
-// - "/foo/", "bar", false
-// - "/foo/bar/", "x", true
-// The frag argument will be empty only if dir is the root node and the walk
-// ends at that root node.
-func (fs *memFS) walk(op, fullname string, f func(dir *memFSNode, frag string, final bool) error) error {
- original := fullname
- fullname = slashClean(fullname)
-
- // Strip any leading "/"s to make fullname a relative path, as the walk
- // starts at fs.root.
- if fullname[0] == '/' {
- fullname = fullname[1:]
- }
- dir := &fs.root
-
- for {
- frag, remaining := fullname, ""
- i := strings.IndexRune(fullname, '/')
- final := i < 0
- if !final {
- frag, remaining = fullname[:i], fullname[i+1:]
- }
- if frag == "" && dir != &fs.root {
- panic("webdav: empty path fragment for a clean path")
- }
- if err := f(dir, frag, final); err != nil {
- return &os.PathError{
- Op: op,
- Path: original,
- Err: err,
- }
- }
- if final {
- break
- }
- child := dir.children[frag]
- if child == nil {
- return &os.PathError{
- Op: op,
- Path: original,
- Err: os.ErrNotExist,
- }
- }
- if !child.mode.IsDir() {
- return &os.PathError{
- Op: op,
- Path: original,
- Err: os.ErrInvalid,
- }
- }
- dir, fullname = child, remaining
- }
- return nil
-}
-
-// find returns the parent of the named node and the relative name fragment
-// from the parent to the child. For example, if finding "/foo/bar/baz" then
-// parent will be the node for "/foo/bar" and frag will be "baz".
-//
-// If the fullname names the root node, then parent, frag and err will be zero.
-//
-// find returns an error if the parent does not already exist or the parent
-// isn't a directory, but it will not return an error per se if the child does
-// not already exist. The error returned is either nil or an *os.PathError
-// whose Op is op.
-func (fs *memFS) find(op, fullname string) (parent *memFSNode, frag string, err error) {
- err = fs.walk(op, fullname, func(parent0 *memFSNode, frag0 string, final bool) error {
- if !final {
- return nil
- }
- if frag0 != "" {
- parent, frag = parent0, frag0
- }
- return nil
- })
- return parent, frag, err
-}
-
-func (fs *memFS) Mkdir(ctx context.Context, name string, perm os.FileMode) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
-
- dir, frag, err := fs.find("mkdir", name)
- if err != nil {
- return err
- }
- if dir == nil {
- // We can't create the root.
- return os.ErrInvalid
- }
- if _, ok := dir.children[frag]; ok {
- return os.ErrExist
- }
- dir.children[frag] = &memFSNode{
- children: make(map[string]*memFSNode),
- mode: perm.Perm() | os.ModeDir,
- modTime: time.Now(),
- }
- return nil
-}
-
-func (fs *memFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) {
- fs.mu.Lock()
- defer fs.mu.Unlock()
-
- dir, frag, err := fs.find("open", name)
- if err != nil {
- return nil, err
- }
- var n *memFSNode
- if dir == nil {
- // We're opening the root.
- if flag&(os.O_WRONLY|os.O_RDWR) != 0 {
- return nil, os.ErrPermission
- }
- n, frag = &fs.root, "/"
-
- } else {
- n = dir.children[frag]
- if flag&(os.O_SYNC|os.O_APPEND) != 0 {
- // memFile doesn't support these flags yet.
- return nil, os.ErrInvalid
- }
- if flag&os.O_CREATE != 0 {
- if flag&os.O_EXCL != 0 && n != nil {
- return nil, os.ErrExist
- }
- if n == nil {
- n = &memFSNode{
- mode: perm.Perm(),
- }
- dir.children[frag] = n
- }
- }
- if n == nil {
- return nil, os.ErrNotExist
- }
- if flag&(os.O_WRONLY|os.O_RDWR) != 0 && flag&os.O_TRUNC != 0 {
- n.mu.Lock()
- n.data = nil
- n.mu.Unlock()
- }
- }
-
- children := make([]os.FileInfo, 0, len(n.children))
- for cName, c := range n.children {
- children = append(children, c.stat(cName))
- }
- return &memFile{
- n: n,
- nameSnapshot: frag,
- childrenSnapshot: children,
- }, nil
-}
-
-func (fs *memFS) RemoveAll(ctx context.Context, name string) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
-
- dir, frag, err := fs.find("remove", name)
- if err != nil {
- return err
- }
- if dir == nil {
- // We can't remove the root.
- return os.ErrInvalid
- }
- delete(dir.children, frag)
- return nil
-}
-
-func (fs *memFS) Rename(ctx context.Context, oldName, newName string) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
-
- oldName = slashClean(oldName)
- newName = slashClean(newName)
- if oldName == newName {
- return nil
- }
- if strings.HasPrefix(newName, oldName+"/") {
- // We can't rename oldName to be a sub-directory of itself.
- return os.ErrInvalid
- }
-
- oDir, oFrag, err := fs.find("rename", oldName)
- if err != nil {
- return err
- }
- if oDir == nil {
- // We can't rename from the root.
- return os.ErrInvalid
- }
-
- nDir, nFrag, err := fs.find("rename", newName)
- if err != nil {
- return err
- }
- if nDir == nil {
- // We can't rename to the root.
- return os.ErrInvalid
- }
-
- oNode, ok := oDir.children[oFrag]
- if !ok {
- return os.ErrNotExist
- }
- if oNode.children != nil {
- if nNode, ok := nDir.children[nFrag]; ok {
- if nNode.children == nil {
- return errNotADirectory
- }
- if len(nNode.children) != 0 {
- return errDirectoryNotEmpty
- }
- }
- }
- delete(oDir.children, oFrag)
- nDir.children[nFrag] = oNode
- return nil
-}
-
-func (fs *memFS) Stat(ctx context.Context, name string) (os.FileInfo, error) {
- fs.mu.Lock()
- defer fs.mu.Unlock()
-
- dir, frag, err := fs.find("stat", name)
- if err != nil {
- return nil, err
- }
- if dir == nil {
- // We're stat'ting the root.
- return fs.root.stat("/"), nil
- }
- if n, ok := dir.children[frag]; ok {
- return n.stat(path.Base(name)), nil
- }
- return nil, os.ErrNotExist
-}
-
-// A memFSNode represents a single entry in the in-memory filesystem and also
-// implements os.FileInfo.
-type memFSNode struct {
- // children is protected by memFS.mu.
- children map[string]*memFSNode
-
- mu sync.Mutex
- data []byte
- mode os.FileMode
- modTime time.Time
- deadProps map[xml.Name]Property
-}
-
-func (n *memFSNode) stat(name string) *memFileInfo {
- n.mu.Lock()
- defer n.mu.Unlock()
- return &memFileInfo{
- name: name,
- size: int64(len(n.data)),
- mode: n.mode,
- modTime: n.modTime,
- }
-}
-
-func (n *memFSNode) DeadProps() (map[xml.Name]Property, error) {
- n.mu.Lock()
- defer n.mu.Unlock()
- if len(n.deadProps) == 0 {
- return nil, nil
- }
- ret := make(map[xml.Name]Property, len(n.deadProps))
- for k, v := range n.deadProps {
- ret[k] = v
- }
- return ret, nil
-}
-
-func (n *memFSNode) Patch(patches []Proppatch) ([]Propstat, error) {
- n.mu.Lock()
- defer n.mu.Unlock()
- pstat := Propstat{Status: http.StatusOK}
- for _, patch := range patches {
- for _, p := range patch.Props {
- pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName})
- if patch.Remove {
- delete(n.deadProps, p.XMLName)
- continue
- }
- if n.deadProps == nil {
- n.deadProps = map[xml.Name]Property{}
- }
- n.deadProps[p.XMLName] = p
- }
- }
- return []Propstat{pstat}, nil
-}
-
-type memFileInfo struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
-}
-
-func (f *memFileInfo) Name() string { return f.name }
-func (f *memFileInfo) Size() int64 { return f.size }
-func (f *memFileInfo) Mode() os.FileMode { return f.mode }
-func (f *memFileInfo) ModTime() time.Time { return f.modTime }
-func (f *memFileInfo) IsDir() bool { return f.mode.IsDir() }
-func (f *memFileInfo) Sys() interface{} { return nil }
-
-// A memFile is a File implementation for a memFSNode. It is a per-file (not
-// per-node) read/write position, and a snapshot of the memFS' tree structure
-// (a node's name and children) for that node.
-type memFile struct {
- n *memFSNode
- nameSnapshot string
- childrenSnapshot []os.FileInfo
- // pos is protected by n.mu.
- pos int
-}
-
-// A *memFile implements the optional DeadPropsHolder interface.
-var _ DeadPropsHolder = (*memFile)(nil)
-
-func (f *memFile) DeadProps() (map[xml.Name]Property, error) { return f.n.DeadProps() }
-func (f *memFile) Patch(patches []Proppatch) ([]Propstat, error) { return f.n.Patch(patches) }
-
-func (f *memFile) Close() error {
- return nil
-}
-
-func (f *memFile) Read(p []byte) (int, error) {
- f.n.mu.Lock()
- defer f.n.mu.Unlock()
- if f.n.mode.IsDir() {
- return 0, os.ErrInvalid
- }
- if f.pos >= len(f.n.data) {
- return 0, io.EOF
- }
- n := copy(p, f.n.data[f.pos:])
- f.pos += n
- return n, nil
-}
-
-func (f *memFile) Readdir(count int) ([]os.FileInfo, error) {
- f.n.mu.Lock()
- defer f.n.mu.Unlock()
- if !f.n.mode.IsDir() {
- return nil, os.ErrInvalid
- }
- old := f.pos
- if old >= len(f.childrenSnapshot) {
- // The os.File Readdir docs say that at the end of a directory,
- // the error is io.EOF if count > 0 and nil if count <= 0.
- if count > 0 {
- return nil, io.EOF
- }
- return nil, nil
- }
- if count > 0 {
- f.pos += count
- if f.pos > len(f.childrenSnapshot) {
- f.pos = len(f.childrenSnapshot)
- }
- } else {
- f.pos = len(f.childrenSnapshot)
- old = 0
- }
- return f.childrenSnapshot[old:f.pos], nil
-}
-
-func (f *memFile) Seek(offset int64, whence int) (int64, error) {
- f.n.mu.Lock()
- defer f.n.mu.Unlock()
- npos := f.pos
- // TODO: How to handle offsets greater than the size of system int?
- switch whence {
- case os.SEEK_SET:
- npos = int(offset)
- case os.SEEK_CUR:
- npos += int(offset)
- case os.SEEK_END:
- npos = len(f.n.data) + int(offset)
- default:
- npos = -1
- }
- if npos < 0 {
- return 0, os.ErrInvalid
- }
- f.pos = npos
- return int64(f.pos), nil
-}
-
-func (f *memFile) Stat() (os.FileInfo, error) {
- return f.n.stat(f.nameSnapshot), nil
-}
-
-func (f *memFile) Write(p []byte) (int, error) {
- lenp := len(p)
- f.n.mu.Lock()
- defer f.n.mu.Unlock()
-
- if f.n.mode.IsDir() {
- return 0, os.ErrInvalid
- }
- if f.pos < len(f.n.data) {
- n := copy(f.n.data[f.pos:], p)
- f.pos += n
- p = p[n:]
- } else if f.pos > len(f.n.data) {
- // Write permits the creation of holes, if we've seek'ed past the
- // existing end of file.
- if f.pos <= cap(f.n.data) {
- oldLen := len(f.n.data)
- f.n.data = f.n.data[:f.pos]
- hole := f.n.data[oldLen:]
- for i := range hole {
- hole[i] = 0
- }
- } else {
- d := make([]byte, f.pos, f.pos+len(p))
- copy(d, f.n.data)
- f.n.data = d
- }
- }
-
- if len(p) > 0 {
- // We should only get here if f.pos == len(f.n.data).
- f.n.data = append(f.n.data, p...)
- f.pos = len(f.n.data)
- }
- f.n.modTime = time.Now()
- return lenp, nil
-}
-
-// moveFiles moves files and/or directories from src to dst.
-//
-// See section 9.9.4 for when various HTTP status codes apply.
-func moveFiles(ctx context.Context, fs FileSystem, src, dst string, overwrite bool) (status int, err error) {
- created := false
- if _, err := fs.Stat(ctx, dst); err != nil {
- if !os.IsNotExist(err) {
- return http.StatusForbidden, err
- }
- created = true
- } else if overwrite {
- // Section 9.9.3 says that "If a resource exists at the destination
- // and the Overwrite header is "T", then prior to performing the move,
- // the server must perform a DELETE with "Depth: infinity" on the
- // destination resource.
- if err := fs.RemoveAll(ctx, dst); err != nil {
- return http.StatusForbidden, err
- }
- } else {
- return http.StatusPreconditionFailed, os.ErrExist
- }
- if err := fs.Rename(ctx, src, dst); err != nil {
- return http.StatusForbidden, err
- }
- if created {
- return http.StatusCreated, nil
- }
- return http.StatusNoContent, nil
-}
-
-func copyProps(dst, src File) error {
- d, ok := dst.(DeadPropsHolder)
- if !ok {
- return nil
- }
- s, ok := src.(DeadPropsHolder)
- if !ok {
- return nil
- }
- m, err := s.DeadProps()
- if err != nil {
- return err
- }
- props := make([]Property, 0, len(m))
- for _, prop := range m {
- props = append(props, prop)
- }
- _, err = d.Patch([]Proppatch{{Props: props}})
- return err
-}
-
-// copyFiles copies files and/or directories from src to dst.
-//
-// See section 9.8.5 for when various HTTP status codes apply.
-func copyFiles(ctx context.Context, fs FileSystem, src, dst string, overwrite bool, depth int, recursion int) (status int, err error) {
- if recursion == 1000 {
- return http.StatusInternalServerError, errRecursionTooDeep
- }
- recursion++
-
- // TODO: section 9.8.3 says that "Note that an infinite-depth COPY of /A/
- // into /A/B/ could lead to infinite recursion if not handled correctly."
-
- srcFile, err := fs.OpenFile(ctx, src, os.O_RDONLY, 0)
- if err != nil {
- if os.IsNotExist(err) {
- return http.StatusNotFound, err
- }
- return http.StatusInternalServerError, err
- }
- defer srcFile.Close()
- srcStat, err := srcFile.Stat()
- if err != nil {
- if os.IsNotExist(err) {
- return http.StatusNotFound, err
- }
- return http.StatusInternalServerError, err
- }
- srcPerm := srcStat.Mode() & os.ModePerm
-
- created := false
- if _, err := fs.Stat(ctx, dst); err != nil {
- if os.IsNotExist(err) {
- created = true
- } else {
- return http.StatusForbidden, err
- }
- } else {
- if !overwrite {
- return http.StatusPreconditionFailed, os.ErrExist
- }
- if err := fs.RemoveAll(ctx, dst); err != nil && !os.IsNotExist(err) {
- return http.StatusForbidden, err
- }
- }
-
- if srcStat.IsDir() {
- if err := fs.Mkdir(ctx, dst, srcPerm); err != nil {
- return http.StatusForbidden, err
- }
- if depth == infiniteDepth {
- children, err := srcFile.Readdir(-1)
- if err != nil {
- return http.StatusForbidden, err
- }
- for _, c := range children {
- name := c.Name()
- s := path.Join(src, name)
- d := path.Join(dst, name)
- cStatus, cErr := copyFiles(ctx, fs, s, d, overwrite, depth, recursion)
- if cErr != nil {
- // TODO: MultiStatus.
- return cStatus, cErr
- }
- }
- }
-
- } else {
- dstFile, err := fs.OpenFile(ctx, dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, srcPerm)
- if err != nil {
- if os.IsNotExist(err) {
- return http.StatusConflict, err
- }
- return http.StatusForbidden, err
-
- }
- _, copyErr := io.Copy(dstFile, srcFile)
- propsErr := copyProps(dstFile, srcFile)
- closeErr := dstFile.Close()
- if copyErr != nil {
- return http.StatusInternalServerError, copyErr
- }
- if propsErr != nil {
- return http.StatusInternalServerError, propsErr
- }
- if closeErr != nil {
- return http.StatusInternalServerError, closeErr
- }
- }
-
- if created {
- return http.StatusCreated, nil
- }
- return http.StatusNoContent, nil
-}
-
-// walkFS traverses filesystem fs starting at name up to depth levels.
-//
-// Allowed values for depth are 0, 1 or infiniteDepth. For each visited node,
-// walkFS calls walkFn. If a visited file system node is a directory and
-// walkFn returns filepath.SkipDir, walkFS will skip traversal of this node.
-func walkFS(ctx context.Context, fs FileSystem, depth int, name string, info os.FileInfo, walkFn filepath.WalkFunc) error {
- // This implementation is based on Walk's code in the standard path/filepath package.
- err := walkFn(name, info, nil)
- if err != nil {
- if info.IsDir() && err == filepath.SkipDir {
- return nil
- }
- return err
- }
- if !info.IsDir() || depth == 0 {
- return nil
- }
- if depth == 1 {
- depth = 0
- }
-
- // Read directory names.
- f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
- if err != nil {
- return walkFn(name, info, err)
- }
- fileInfos, err := f.Readdir(0)
- f.Close()
- if err != nil {
- return walkFn(name, info, err)
- }
-
- for _, fileInfo := range fileInfos {
- filename := path.Join(name, fileInfo.Name())
- fileInfo, err := fs.Stat(ctx, filename)
- if err != nil {
- if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir {
- return err
- }
- } else {
- err = walkFS(ctx, fs, depth, filename, fileInfo, walkFn)
- if err != nil {
- if !fileInfo.IsDir() || err != filepath.SkipDir {
- return err
- }
- }
- }
- }
- return nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.6.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.6.go
deleted file mode 100644
index fa387700d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.6.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build !go1.7
-
-package webdav
-
-import (
- "net/http"
-
- "golang.org/x/net/context"
-)
-
-func getContext(r *http.Request) context.Context {
- return context.Background()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.7.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.7.go
deleted file mode 100644
index d1c3de832..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_go1.7.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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 file.
-
-// +build go1.7
-
-package webdav
-
-import (
- "context"
- "net/http"
-)
-
-func getContext(r *http.Request) context.Context {
- return r.Context()
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_test.go
deleted file mode 100644
index bfd96e193..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/file_test.go
+++ /dev/null
@@ -1,1184 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "encoding/xml"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path"
- "path/filepath"
- "reflect"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "testing"
-
- "golang.org/x/net/context"
-)
-
-func TestSlashClean(t *testing.T) {
- testCases := []string{
- "",
- ".",
- "/",
- "/./",
- "//",
- "//.",
- "//a",
- "/a",
- "/a/b/c",
- "/a//b/./../c/d/",
- "a",
- "a/b/c",
- }
- for _, tc := range testCases {
- got := slashClean(tc)
- want := path.Clean("/" + tc)
- if got != want {
- t.Errorf("tc=%q: got %q, want %q", tc, got, want)
- }
- }
-}
-
-func TestDirResolve(t *testing.T) {
- testCases := []struct {
- dir, name, want string
- }{
- {"/", "", "/"},
- {"/", "/", "/"},
- {"/", ".", "/"},
- {"/", "./a", "/a"},
- {"/", "..", "/"},
- {"/", "..", "/"},
- {"/", "../", "/"},
- {"/", "../.", "/"},
- {"/", "../a", "/a"},
- {"/", "../..", "/"},
- {"/", "../bar/a", "/bar/a"},
- {"/", "../baz/a", "/baz/a"},
- {"/", "...", "/..."},
- {"/", ".../a", "/.../a"},
- {"/", ".../..", "/"},
- {"/", "a", "/a"},
- {"/", "a/./b", "/a/b"},
- {"/", "a/../../b", "/b"},
- {"/", "a/../b", "/b"},
- {"/", "a/b", "/a/b"},
- {"/", "a/b/c/../../d", "/a/d"},
- {"/", "a/b/c/../../../d", "/d"},
- {"/", "a/b/c/../../../../d", "/d"},
- {"/", "a/b/c/d", "/a/b/c/d"},
-
- {"/foo/bar", "", "/foo/bar"},
- {"/foo/bar", "/", "/foo/bar"},
- {"/foo/bar", ".", "/foo/bar"},
- {"/foo/bar", "./a", "/foo/bar/a"},
- {"/foo/bar", "..", "/foo/bar"},
- {"/foo/bar", "../", "/foo/bar"},
- {"/foo/bar", "../.", "/foo/bar"},
- {"/foo/bar", "../a", "/foo/bar/a"},
- {"/foo/bar", "../..", "/foo/bar"},
- {"/foo/bar", "../bar/a", "/foo/bar/bar/a"},
- {"/foo/bar", "../baz/a", "/foo/bar/baz/a"},
- {"/foo/bar", "...", "/foo/bar/..."},
- {"/foo/bar", ".../a", "/foo/bar/.../a"},
- {"/foo/bar", ".../..", "/foo/bar"},
- {"/foo/bar", "a", "/foo/bar/a"},
- {"/foo/bar", "a/./b", "/foo/bar/a/b"},
- {"/foo/bar", "a/../../b", "/foo/bar/b"},
- {"/foo/bar", "a/../b", "/foo/bar/b"},
- {"/foo/bar", "a/b", "/foo/bar/a/b"},
- {"/foo/bar", "a/b/c/../../d", "/foo/bar/a/d"},
- {"/foo/bar", "a/b/c/../../../d", "/foo/bar/d"},
- {"/foo/bar", "a/b/c/../../../../d", "/foo/bar/d"},
- {"/foo/bar", "a/b/c/d", "/foo/bar/a/b/c/d"},
-
- {"/foo/bar/", "", "/foo/bar"},
- {"/foo/bar/", "/", "/foo/bar"},
- {"/foo/bar/", ".", "/foo/bar"},
- {"/foo/bar/", "./a", "/foo/bar/a"},
- {"/foo/bar/", "..", "/foo/bar"},
-
- {"/foo//bar///", "", "/foo/bar"},
- {"/foo//bar///", "/", "/foo/bar"},
- {"/foo//bar///", ".", "/foo/bar"},
- {"/foo//bar///", "./a", "/foo/bar/a"},
- {"/foo//bar///", "..", "/foo/bar"},
-
- {"/x/y/z", "ab/c\x00d/ef", ""},
-
- {".", "", "."},
- {".", "/", "."},
- {".", ".", "."},
- {".", "./a", "a"},
- {".", "..", "."},
- {".", "..", "."},
- {".", "../", "."},
- {".", "../.", "."},
- {".", "../a", "a"},
- {".", "../..", "."},
- {".", "../bar/a", "bar/a"},
- {".", "../baz/a", "baz/a"},
- {".", "...", "..."},
- {".", ".../a", ".../a"},
- {".", ".../..", "."},
- {".", "a", "a"},
- {".", "a/./b", "a/b"},
- {".", "a/../../b", "b"},
- {".", "a/../b", "b"},
- {".", "a/b", "a/b"},
- {".", "a/b/c/../../d", "a/d"},
- {".", "a/b/c/../../../d", "d"},
- {".", "a/b/c/../../../../d", "d"},
- {".", "a/b/c/d", "a/b/c/d"},
-
- {"", "", "."},
- {"", "/", "."},
- {"", ".", "."},
- {"", "./a", "a"},
- {"", "..", "."},
- }
-
- for _, tc := range testCases {
- d := Dir(filepath.FromSlash(tc.dir))
- if got := filepath.ToSlash(d.resolve(tc.name)); got != tc.want {
- t.Errorf("dir=%q, name=%q: got %q, want %q", tc.dir, tc.name, got, tc.want)
- }
- }
-}
-
-func TestWalk(t *testing.T) {
- type walkStep struct {
- name, frag string
- final bool
- }
-
- testCases := []struct {
- dir string
- want []walkStep
- }{
- {"", []walkStep{
- {"", "", true},
- }},
- {"/", []walkStep{
- {"", "", true},
- }},
- {"/a", []walkStep{
- {"", "a", true},
- }},
- {"/a/", []walkStep{
- {"", "a", true},
- }},
- {"/a/b", []walkStep{
- {"", "a", false},
- {"a", "b", true},
- }},
- {"/a/b/", []walkStep{
- {"", "a", false},
- {"a", "b", true},
- }},
- {"/a/b/c", []walkStep{
- {"", "a", false},
- {"a", "b", false},
- {"b", "c", true},
- }},
- // The following test case is the one mentioned explicitly
- // in the method description.
- {"/foo/bar/x", []walkStep{
- {"", "foo", false},
- {"foo", "bar", false},
- {"bar", "x", true},
- }},
- }
-
- ctx := context.Background()
-
- for _, tc := range testCases {
- fs := NewMemFS().(*memFS)
-
- parts := strings.Split(tc.dir, "/")
- for p := 2; p < len(parts); p++ {
- d := strings.Join(parts[:p], "/")
- if err := fs.Mkdir(ctx, d, 0666); err != nil {
- t.Errorf("tc.dir=%q: mkdir: %q: %v", tc.dir, d, err)
- }
- }
-
- i, prevFrag := 0, ""
- err := fs.walk("test", tc.dir, func(dir *memFSNode, frag string, final bool) error {
- got := walkStep{
- name: prevFrag,
- frag: frag,
- final: final,
- }
- want := tc.want[i]
-
- if got != want {
- return fmt.Errorf("got %+v, want %+v", got, want)
- }
- i, prevFrag = i+1, frag
- return nil
- })
- if err != nil {
- t.Errorf("tc.dir=%q: %v", tc.dir, err)
- }
- }
-}
-
-// find appends to ss the names of the named file and its children. It is
-// analogous to the Unix find command.
-//
-// The returned strings are not guaranteed to be in any particular order.
-func find(ctx context.Context, ss []string, fs FileSystem, name string) ([]string, error) {
- stat, err := fs.Stat(ctx, name)
- if err != nil {
- return nil, err
- }
- ss = append(ss, name)
- if stat.IsDir() {
- f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- children, err := f.Readdir(-1)
- if err != nil {
- return nil, err
- }
- for _, c := range children {
- ss, err = find(ctx, ss, fs, path.Join(name, c.Name()))
- if err != nil {
- return nil, err
- }
- }
- }
- return ss, nil
-}
-
-func testFS(t *testing.T, fs FileSystem) {
- errStr := func(err error) string {
- switch {
- case os.IsExist(err):
- return "errExist"
- case os.IsNotExist(err):
- return "errNotExist"
- case err != nil:
- return "err"
- }
- return "ok"
- }
-
- // The non-"find" non-"stat" test cases should change the file system state. The
- // indentation of the "find"s and "stat"s helps distinguish such test cases.
- testCases := []string{
- " stat / want dir",
- " stat /a want errNotExist",
- " stat /d want errNotExist",
- " stat /d/e want errNotExist",
- "create /a A want ok",
- " stat /a want 1",
- "create /d/e EEE want errNotExist",
- "mk-dir /a want errExist",
- "mk-dir /d/m want errNotExist",
- "mk-dir /d want ok",
- " stat /d want dir",
- "create /d/e EEE want ok",
- " stat /d/e want 3",
- " find / /a /d /d/e",
- "create /d/f FFFF want ok",
- "create /d/g GGGGGGG want ok",
- "mk-dir /d/m want ok",
- "mk-dir /d/m want errExist",
- "create /d/m/p PPPPP want ok",
- " stat /d/e want 3",
- " stat /d/f want 4",
- " stat /d/g want 7",
- " stat /d/h want errNotExist",
- " stat /d/m want dir",
- " stat /d/m/p want 5",
- " find / /a /d /d/e /d/f /d/g /d/m /d/m/p",
- "rm-all /d want ok",
- " stat /a want 1",
- " stat /d want errNotExist",
- " stat /d/e want errNotExist",
- " stat /d/f want errNotExist",
- " stat /d/g want errNotExist",
- " stat /d/m want errNotExist",
- " stat /d/m/p want errNotExist",
- " find / /a",
- "mk-dir /d/m want errNotExist",
- "mk-dir /d want ok",
- "create /d/f FFFF want ok",
- "rm-all /d/f want ok",
- "mk-dir /d/m want ok",
- "rm-all /z want ok",
- "rm-all / want err",
- "create /b BB want ok",
- " stat / want dir",
- " stat /a want 1",
- " stat /b want 2",
- " stat /c want errNotExist",
- " stat /d want dir",
- " stat /d/m want dir",
- " find / /a /b /d /d/m",
- "move__ o=F /b /c want ok",
- " stat /b want errNotExist",
- " stat /c want 2",
- " stat /d/m want dir",
- " stat /d/n want errNotExist",
- " find / /a /c /d /d/m",
- "move__ o=F /d/m /d/n want ok",
- "create /d/n/q QQQQ want ok",
- " stat /d/m want errNotExist",
- " stat /d/n want dir",
- " stat /d/n/q want 4",
- "move__ o=F /d /d/n/z want err",
- "move__ o=T /c /d/n/q want ok",
- " stat /c want errNotExist",
- " stat /d/n/q want 2",
- " find / /a /d /d/n /d/n/q",
- "create /d/n/r RRRRR want ok",
- "mk-dir /u want ok",
- "mk-dir /u/v want ok",
- "move__ o=F /d/n /u want errExist",
- "create /t TTTTTT want ok",
- "move__ o=F /d/n /t want errExist",
- "rm-all /t want ok",
- "move__ o=F /d/n /t want ok",
- " stat /d want dir",
- " stat /d/n want errNotExist",
- " stat /d/n/r want errNotExist",
- " stat /t want dir",
- " stat /t/q want 2",
- " stat /t/r want 5",
- " find / /a /d /t /t/q /t/r /u /u/v",
- "move__ o=F /t / want errExist",
- "move__ o=T /t /u/v want ok",
- " stat /u/v/r want 5",
- "move__ o=F / /z want err",
- " find / /a /d /u /u/v /u/v/q /u/v/r",
- " stat /a want 1",
- " stat /b want errNotExist",
- " stat /c want errNotExist",
- " stat /u/v/r want 5",
- "copy__ o=F d=0 /a /b want ok",
- "copy__ o=T d=0 /a /c want ok",
- " stat /a want 1",
- " stat /b want 1",
- " stat /c want 1",
- " stat /u/v/r want 5",
- "copy__ o=F d=0 /u/v/r /b want errExist",
- " stat /b want 1",
- "copy__ o=T d=0 /u/v/r /b want ok",
- " stat /a want 1",
- " stat /b want 5",
- " stat /u/v/r want 5",
- "rm-all /a want ok",
- "rm-all /b want ok",
- "mk-dir /u/v/w want ok",
- "create /u/v/w/s SSSSSSSS want ok",
- " stat /d want dir",
- " stat /d/x want errNotExist",
- " stat /d/y want errNotExist",
- " stat /u/v/r want 5",
- " stat /u/v/w/s want 8",
- " find / /c /d /u /u/v /u/v/q /u/v/r /u/v/w /u/v/w/s",
- "copy__ o=T d=0 /u/v /d/x want ok",
- "copy__ o=T d=∞ /u/v /d/y want ok",
- "rm-all /u want ok",
- " stat /d/x want dir",
- " stat /d/x/q want errNotExist",
- " stat /d/x/r want errNotExist",
- " stat /d/x/w want errNotExist",
- " stat /d/x/w/s want errNotExist",
- " stat /d/y want dir",
- " stat /d/y/q want 2",
- " stat /d/y/r want 5",
- " stat /d/y/w want dir",
- " stat /d/y/w/s want 8",
- " stat /u want errNotExist",
- " find / /c /d /d/x /d/y /d/y/q /d/y/r /d/y/w /d/y/w/s",
- "copy__ o=F d=∞ /d/y /d/x want errExist",
- }
-
- ctx := context.Background()
-
- for i, tc := range testCases {
- tc = strings.TrimSpace(tc)
- j := strings.IndexByte(tc, ' ')
- if j < 0 {
- t.Fatalf("test case #%d %q: invalid command", i, tc)
- }
- op, arg := tc[:j], tc[j+1:]
-
- switch op {
- default:
- t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op)
-
- case "create":
- parts := strings.Split(arg, " ")
- if len(parts) != 4 || parts[2] != "want" {
- t.Fatalf("test case #%d %q: invalid write", i, tc)
- }
- f, opErr := fs.OpenFile(ctx, parts[0], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if got := errStr(opErr); got != parts[3] {
- t.Fatalf("test case #%d %q: OpenFile: got %q (%v), want %q", i, tc, got, opErr, parts[3])
- }
- if f != nil {
- if _, err := f.Write([]byte(parts[1])); err != nil {
- t.Fatalf("test case #%d %q: Write: %v", i, tc, err)
- }
- if err := f.Close(); err != nil {
- t.Fatalf("test case #%d %q: Close: %v", i, tc, err)
- }
- }
-
- case "find":
- got, err := find(ctx, nil, fs, "/")
- if err != nil {
- t.Fatalf("test case #%d %q: find: %v", i, tc, err)
- }
- sort.Strings(got)
- want := strings.Split(arg, " ")
- if !reflect.DeepEqual(got, want) {
- t.Fatalf("test case #%d %q:\ngot %s\nwant %s", i, tc, got, want)
- }
-
- case "copy__", "mk-dir", "move__", "rm-all", "stat":
- nParts := 3
- switch op {
- case "copy__":
- nParts = 6
- case "move__":
- nParts = 5
- }
- parts := strings.Split(arg, " ")
- if len(parts) != nParts {
- t.Fatalf("test case #%d %q: invalid %s", i, tc, op)
- }
-
- got, opErr := "", error(nil)
- switch op {
- case "copy__":
- depth := 0
- if parts[1] == "d=∞" {
- depth = infiniteDepth
- }
- _, opErr = copyFiles(ctx, fs, parts[2], parts[3], parts[0] == "o=T", depth, 0)
- case "mk-dir":
- opErr = fs.Mkdir(ctx, parts[0], 0777)
- case "move__":
- _, opErr = moveFiles(ctx, fs, parts[1], parts[2], parts[0] == "o=T")
- case "rm-all":
- opErr = fs.RemoveAll(ctx, parts[0])
- case "stat":
- var stat os.FileInfo
- fileName := parts[0]
- if stat, opErr = fs.Stat(ctx, fileName); opErr == nil {
- if stat.IsDir() {
- got = "dir"
- } else {
- got = strconv.Itoa(int(stat.Size()))
- }
-
- if fileName == "/" {
- // For a Dir FileSystem, the virtual file system root maps to a
- // real file system name like "/tmp/webdav-test012345", which does
- // not end with "/". We skip such cases.
- } else if statName := stat.Name(); path.Base(fileName) != statName {
- t.Fatalf("test case #%d %q: file name %q inconsistent with stat name %q",
- i, tc, fileName, statName)
- }
- }
- }
- if got == "" {
- got = errStr(opErr)
- }
-
- if parts[len(parts)-2] != "want" {
- t.Fatalf("test case #%d %q: invalid %s", i, tc, op)
- }
- if want := parts[len(parts)-1]; got != want {
- t.Fatalf("test case #%d %q: got %q (%v), want %q", i, tc, got, opErr, want)
- }
- }
- }
-}
-
-func TestDir(t *testing.T) {
- switch runtime.GOOS {
- case "nacl":
- t.Skip("see golang.org/issue/12004")
- case "plan9":
- t.Skip("see golang.org/issue/11453")
- }
-
- td, err := ioutil.TempDir("", "webdav-test")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(td)
- testFS(t, Dir(td))
-}
-
-func TestMemFS(t *testing.T) {
- testFS(t, NewMemFS())
-}
-
-func TestMemFSRoot(t *testing.T) {
- ctx := context.Background()
- fs := NewMemFS()
- for i := 0; i < 5; i++ {
- stat, err := fs.Stat(ctx, "/")
- if err != nil {
- t.Fatalf("i=%d: Stat: %v", i, err)
- }
- if !stat.IsDir() {
- t.Fatalf("i=%d: Stat.IsDir is false, want true", i)
- }
-
- f, err := fs.OpenFile(ctx, "/", os.O_RDONLY, 0)
- if err != nil {
- t.Fatalf("i=%d: OpenFile: %v", i, err)
- }
- defer f.Close()
- children, err := f.Readdir(-1)
- if err != nil {
- t.Fatalf("i=%d: Readdir: %v", i, err)
- }
- if len(children) != i {
- t.Fatalf("i=%d: got %d children, want %d", i, len(children), i)
- }
-
- if _, err := f.Write(make([]byte, 1)); err == nil {
- t.Fatalf("i=%d: Write: got nil error, want non-nil", i)
- }
-
- if err := fs.Mkdir(ctx, fmt.Sprintf("/dir%d", i), 0777); err != nil {
- t.Fatalf("i=%d: Mkdir: %v", i, err)
- }
- }
-}
-
-func TestMemFileReaddir(t *testing.T) {
- ctx := context.Background()
- fs := NewMemFS()
- if err := fs.Mkdir(ctx, "/foo", 0777); err != nil {
- t.Fatalf("Mkdir: %v", err)
- }
- readdir := func(count int) ([]os.FileInfo, error) {
- f, err := fs.OpenFile(ctx, "/foo", os.O_RDONLY, 0)
- if err != nil {
- t.Fatalf("OpenFile: %v", err)
- }
- defer f.Close()
- return f.Readdir(count)
- }
- if got, err := readdir(-1); len(got) != 0 || err != nil {
- t.Fatalf("readdir(-1): got %d fileInfos with err=%v, want 0, <nil>", len(got), err)
- }
- if got, err := readdir(+1); len(got) != 0 || err != io.EOF {
- t.Fatalf("readdir(+1): got %d fileInfos with err=%v, want 0, EOF", len(got), err)
- }
-}
-
-func TestMemFile(t *testing.T) {
- testCases := []string{
- "wantData ",
- "wantSize 0",
- "write abc",
- "wantData abc",
- "write de",
- "wantData abcde",
- "wantSize 5",
- "write 5*x",
- "write 4*y+2*z",
- "write 3*st",
- "wantData abcdexxxxxyyyyzzststst",
- "wantSize 22",
- "seek set 4 want 4",
- "write EFG",
- "wantData abcdEFGxxxyyyyzzststst",
- "wantSize 22",
- "seek set 2 want 2",
- "read cdEF",
- "read Gx",
- "seek cur 0 want 8",
- "seek cur 2 want 10",
- "seek cur -1 want 9",
- "write J",
- "wantData abcdEFGxxJyyyyzzststst",
- "wantSize 22",
- "seek cur -4 want 6",
- "write ghijk",
- "wantData abcdEFghijkyyyzzststst",
- "wantSize 22",
- "read yyyz",
- "seek cur 0 want 15",
- "write ",
- "seek cur 0 want 15",
- "read ",
- "seek cur 0 want 15",
- "seek end -3 want 19",
- "write ZZ",
- "wantData abcdEFghijkyyyzzstsZZt",
- "wantSize 22",
- "write 4*A",
- "wantData abcdEFghijkyyyzzstsZZAAAA",
- "wantSize 25",
- "seek end 0 want 25",
- "seek end -5 want 20",
- "read Z+4*A",
- "write 5*B",
- "wantData abcdEFghijkyyyzzstsZZAAAABBBBB",
- "wantSize 30",
- "seek end 10 want 40",
- "write C",
- "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........C",
- "wantSize 41",
- "write D",
- "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD",
- "wantSize 42",
- "seek set 43 want 43",
- "write E",
- "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD.E",
- "wantSize 44",
- "seek set 0 want 0",
- "write 5*123456789_",
- "wantData 123456789_123456789_123456789_123456789_123456789_",
- "wantSize 50",
- "seek cur 0 want 50",
- "seek cur -99 want err",
- }
-
- ctx := context.Background()
-
- const filename = "/foo"
- fs := NewMemFS()
- f, err := fs.OpenFile(ctx, filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- t.Fatalf("OpenFile: %v", err)
- }
- defer f.Close()
-
- for i, tc := range testCases {
- j := strings.IndexByte(tc, ' ')
- if j < 0 {
- t.Fatalf("test case #%d %q: invalid command", i, tc)
- }
- op, arg := tc[:j], tc[j+1:]
-
- // Expand an arg like "3*a+2*b" to "aaabb".
- parts := strings.Split(arg, "+")
- for j, part := range parts {
- if k := strings.IndexByte(part, '*'); k >= 0 {
- repeatCount, repeatStr := part[:k], part[k+1:]
- n, err := strconv.Atoi(repeatCount)
- if err != nil {
- t.Fatalf("test case #%d %q: invalid repeat count %q", i, tc, repeatCount)
- }
- parts[j] = strings.Repeat(repeatStr, n)
- }
- }
- arg = strings.Join(parts, "")
-
- switch op {
- default:
- t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op)
-
- case "read":
- buf := make([]byte, len(arg))
- if _, err := io.ReadFull(f, buf); err != nil {
- t.Fatalf("test case #%d %q: ReadFull: %v", i, tc, err)
- }
- if got := string(buf); got != arg {
- t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg)
- }
-
- case "seek":
- parts := strings.Split(arg, " ")
- if len(parts) != 4 {
- t.Fatalf("test case #%d %q: invalid seek", i, tc)
- }
-
- whence := 0
- switch parts[0] {
- default:
- t.Fatalf("test case #%d %q: invalid seek whence", i, tc)
- case "set":
- whence = os.SEEK_SET
- case "cur":
- whence = os.SEEK_CUR
- case "end":
- whence = os.SEEK_END
- }
- offset, err := strconv.Atoi(parts[1])
- if err != nil {
- t.Fatalf("test case #%d %q: invalid offset %q", i, tc, parts[1])
- }
-
- if parts[2] != "want" {
- t.Fatalf("test case #%d %q: invalid seek", i, tc)
- }
- if parts[3] == "err" {
- _, err := f.Seek(int64(offset), whence)
- if err == nil {
- t.Fatalf("test case #%d %q: Seek returned nil error, want non-nil", i, tc)
- }
- } else {
- got, err := f.Seek(int64(offset), whence)
- if err != nil {
- t.Fatalf("test case #%d %q: Seek: %v", i, tc, err)
- }
- want, err := strconv.Atoi(parts[3])
- if err != nil {
- t.Fatalf("test case #%d %q: invalid want %q", i, tc, parts[3])
- }
- if got != int64(want) {
- t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want)
- }
- }
-
- case "write":
- n, err := f.Write([]byte(arg))
- if err != nil {
- t.Fatalf("test case #%d %q: write: %v", i, tc, err)
- }
- if n != len(arg) {
- t.Fatalf("test case #%d %q: write returned %d bytes, want %d", i, tc, n, len(arg))
- }
-
- case "wantData":
- g, err := fs.OpenFile(ctx, filename, os.O_RDONLY, 0666)
- if err != nil {
- t.Fatalf("test case #%d %q: OpenFile: %v", i, tc, err)
- }
- gotBytes, err := ioutil.ReadAll(g)
- if err != nil {
- t.Fatalf("test case #%d %q: ReadAll: %v", i, tc, err)
- }
- for i, c := range gotBytes {
- if c == '\x00' {
- gotBytes[i] = '.'
- }
- }
- got := string(gotBytes)
- if got != arg {
- t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg)
- }
- if err := g.Close(); err != nil {
- t.Fatalf("test case #%d %q: Close: %v", i, tc, err)
- }
-
- case "wantSize":
- n, err := strconv.Atoi(arg)
- if err != nil {
- t.Fatalf("test case #%d %q: invalid size %q", i, tc, arg)
- }
- fi, err := fs.Stat(ctx, filename)
- if err != nil {
- t.Fatalf("test case #%d %q: Stat: %v", i, tc, err)
- }
- if got, want := fi.Size(), int64(n); got != want {
- t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want)
- }
- }
- }
-}
-
-// TestMemFileWriteAllocs tests that writing N consecutive 1KiB chunks to a
-// memFile doesn't allocate a new buffer for each of those N times. Otherwise,
-// calling io.Copy(aMemFile, src) is likely to have quadratic complexity.
-func TestMemFileWriteAllocs(t *testing.T) {
- if runtime.Compiler == "gccgo" {
- t.Skip("gccgo allocates here")
- }
- ctx := context.Background()
- fs := NewMemFS()
- f, err := fs.OpenFile(ctx, "/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- t.Fatalf("OpenFile: %v", err)
- }
- defer f.Close()
-
- xxx := make([]byte, 1024)
- for i := range xxx {
- xxx[i] = 'x'
- }
-
- a := testing.AllocsPerRun(100, func() {
- f.Write(xxx)
- })
- // AllocsPerRun returns an integral value, so we compare the rounded-down
- // number to zero.
- if a > 0 {
- t.Fatalf("%v allocs per run, want 0", a)
- }
-}
-
-func BenchmarkMemFileWrite(b *testing.B) {
- ctx := context.Background()
- fs := NewMemFS()
- xxx := make([]byte, 1024)
- for i := range xxx {
- xxx[i] = 'x'
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- f, err := fs.OpenFile(ctx, "/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- b.Fatalf("OpenFile: %v", err)
- }
- for j := 0; j < 100; j++ {
- f.Write(xxx)
- }
- if err := f.Close(); err != nil {
- b.Fatalf("Close: %v", err)
- }
- if err := fs.RemoveAll(ctx, "/xxx"); err != nil {
- b.Fatalf("RemoveAll: %v", err)
- }
- }
-}
-
-func TestCopyMoveProps(t *testing.T) {
- ctx := context.Background()
- fs := NewMemFS()
- create := func(name string) error {
- f, err := fs.OpenFile(ctx, name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- return err
- }
- _, wErr := f.Write([]byte("contents"))
- cErr := f.Close()
- if wErr != nil {
- return wErr
- }
- return cErr
- }
- patch := func(name string, patches ...Proppatch) error {
- f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0666)
- if err != nil {
- return err
- }
- _, pErr := f.(DeadPropsHolder).Patch(patches)
- cErr := f.Close()
- if pErr != nil {
- return pErr
- }
- return cErr
- }
- props := func(name string) (map[xml.Name]Property, error) {
- f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0666)
- if err != nil {
- return nil, err
- }
- m, pErr := f.(DeadPropsHolder).DeadProps()
- cErr := f.Close()
- if pErr != nil {
- return nil, pErr
- }
- if cErr != nil {
- return nil, cErr
- }
- return m, nil
- }
-
- p0 := Property{
- XMLName: xml.Name{Space: "x:", Local: "boat"},
- InnerXML: []byte("pea-green"),
- }
- p1 := Property{
- XMLName: xml.Name{Space: "x:", Local: "ring"},
- InnerXML: []byte("1 shilling"),
- }
- p2 := Property{
- XMLName: xml.Name{Space: "x:", Local: "spoon"},
- InnerXML: []byte("runcible"),
- }
- p3 := Property{
- XMLName: xml.Name{Space: "x:", Local: "moon"},
- InnerXML: []byte("light"),
- }
-
- if err := create("/src"); err != nil {
- t.Fatalf("create /src: %v", err)
- }
- if err := patch("/src", Proppatch{Props: []Property{p0, p1}}); err != nil {
- t.Fatalf("patch /src +p0 +p1: %v", err)
- }
- if _, err := copyFiles(ctx, fs, "/src", "/tmp", true, infiniteDepth, 0); err != nil {
- t.Fatalf("copyFiles /src /tmp: %v", err)
- }
- if _, err := moveFiles(ctx, fs, "/tmp", "/dst", true); err != nil {
- t.Fatalf("moveFiles /tmp /dst: %v", err)
- }
- if err := patch("/src", Proppatch{Props: []Property{p0}, Remove: true}); err != nil {
- t.Fatalf("patch /src -p0: %v", err)
- }
- if err := patch("/src", Proppatch{Props: []Property{p2}}); err != nil {
- t.Fatalf("patch /src +p2: %v", err)
- }
- if err := patch("/dst", Proppatch{Props: []Property{p1}, Remove: true}); err != nil {
- t.Fatalf("patch /dst -p1: %v", err)
- }
- if err := patch("/dst", Proppatch{Props: []Property{p3}}); err != nil {
- t.Fatalf("patch /dst +p3: %v", err)
- }
-
- gotSrc, err := props("/src")
- if err != nil {
- t.Fatalf("props /src: %v", err)
- }
- wantSrc := map[xml.Name]Property{
- p1.XMLName: p1,
- p2.XMLName: p2,
- }
- if !reflect.DeepEqual(gotSrc, wantSrc) {
- t.Fatalf("props /src:\ngot %v\nwant %v", gotSrc, wantSrc)
- }
-
- gotDst, err := props("/dst")
- if err != nil {
- t.Fatalf("props /dst: %v", err)
- }
- wantDst := map[xml.Name]Property{
- p0.XMLName: p0,
- p3.XMLName: p3,
- }
- if !reflect.DeepEqual(gotDst, wantDst) {
- t.Fatalf("props /dst:\ngot %v\nwant %v", gotDst, wantDst)
- }
-}
-
-func TestWalkFS(t *testing.T) {
- testCases := []struct {
- desc string
- buildfs []string
- startAt string
- depth int
- walkFn filepath.WalkFunc
- want []string
- }{{
- "just root",
- []string{},
- "/",
- infiniteDepth,
- nil,
- []string{
- "/",
- },
- }, {
- "infinite walk from root",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/d",
- "mkdir /e",
- "touch /f",
- },
- "/",
- infiniteDepth,
- nil,
- []string{
- "/",
- "/a",
- "/a/b",
- "/a/b/c",
- "/a/d",
- "/e",
- "/f",
- },
- }, {
- "infinite walk from subdir",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/d",
- "mkdir /e",
- "touch /f",
- },
- "/a",
- infiniteDepth,
- nil,
- []string{
- "/a",
- "/a/b",
- "/a/b/c",
- "/a/d",
- },
- }, {
- "depth 1 walk from root",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/d",
- "mkdir /e",
- "touch /f",
- },
- "/",
- 1,
- nil,
- []string{
- "/",
- "/a",
- "/e",
- "/f",
- },
- }, {
- "depth 1 walk from subdir",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/b/g",
- "mkdir /a/b/g/h",
- "touch /a/b/g/i",
- "touch /a/b/g/h/j",
- },
- "/a/b",
- 1,
- nil,
- []string{
- "/a/b",
- "/a/b/c",
- "/a/b/g",
- },
- }, {
- "depth 0 walk from subdir",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/b/g",
- "mkdir /a/b/g/h",
- "touch /a/b/g/i",
- "touch /a/b/g/h/j",
- },
- "/a/b",
- 0,
- nil,
- []string{
- "/a/b",
- },
- }, {
- "infinite walk from file",
- []string{
- "mkdir /a",
- "touch /a/b",
- "touch /a/c",
- },
- "/a/b",
- 0,
- nil,
- []string{
- "/a/b",
- },
- }, {
- "infinite walk with skipped subdir",
- []string{
- "mkdir /a",
- "mkdir /a/b",
- "touch /a/b/c",
- "mkdir /a/b/g",
- "mkdir /a/b/g/h",
- "touch /a/b/g/i",
- "touch /a/b/g/h/j",
- "touch /a/b/z",
- },
- "/",
- infiniteDepth,
- func(path string, info os.FileInfo, err error) error {
- if path == "/a/b/g" {
- return filepath.SkipDir
- }
- return nil
- },
- []string{
- "/",
- "/a",
- "/a/b",
- "/a/b/c",
- "/a/b/z",
- },
- }}
- ctx := context.Background()
- for _, tc := range testCases {
- fs, err := buildTestFS(tc.buildfs)
- if err != nil {
- t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err)
- }
- var got []string
- traceFn := func(path string, info os.FileInfo, err error) error {
- if tc.walkFn != nil {
- err = tc.walkFn(path, info, err)
- if err != nil {
- return err
- }
- }
- got = append(got, path)
- return nil
- }
- fi, err := fs.Stat(ctx, tc.startAt)
- if err != nil {
- t.Fatalf("%s: cannot stat: %v", tc.desc, err)
- }
- err = walkFS(ctx, fs, tc.depth, tc.startAt, fi, traceFn)
- if err != nil {
- t.Errorf("%s:\ngot error %v, want nil", tc.desc, err)
- continue
- }
- sort.Strings(got)
- sort.Strings(tc.want)
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("%s:\ngot %q\nwant %q", tc.desc, got, tc.want)
- continue
- }
- }
-}
-
-func buildTestFS(buildfs []string) (FileSystem, error) {
- // TODO: Could this be merged with the build logic in TestFS?
-
- ctx := context.Background()
- fs := NewMemFS()
- for _, b := range buildfs {
- op := strings.Split(b, " ")
- switch op[0] {
- case "mkdir":
- err := fs.Mkdir(ctx, op[1], os.ModeDir|0777)
- if err != nil {
- return nil, err
- }
- case "touch":
- f, err := fs.OpenFile(ctx, op[1], os.O_RDWR|os.O_CREATE, 0666)
- if err != nil {
- return nil, err
- }
- f.Close()
- case "write":
- f, err := fs.OpenFile(ctx, op[1], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- return nil, err
- }
- _, err = f.Write([]byte(op[2]))
- f.Close()
- if err != nil {
- return nil, err
- }
- default:
- return nil, fmt.Errorf("unknown file operation %q", op[0])
- }
- }
- return fs, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if.go
deleted file mode 100644
index 416e81cdf..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-// The If header is covered by Section 10.4.
-// http://www.webdav.org/specs/rfc4918.html#HEADER_If
-
-import (
- "strings"
-)
-
-// ifHeader is a disjunction (OR) of ifLists.
-type ifHeader struct {
- lists []ifList
-}
-
-// ifList is a conjunction (AND) of Conditions, and an optional resource tag.
-type ifList struct {
- resourceTag string
- conditions []Condition
-}
-
-// parseIfHeader parses the "If: foo bar" HTTP header. The httpHeader string
-// should omit the "If:" prefix and have any "\r\n"s collapsed to a " ", as is
-// returned by req.Header.Get("If") for a http.Request req.
-func parseIfHeader(httpHeader string) (h ifHeader, ok bool) {
- s := strings.TrimSpace(httpHeader)
- switch tokenType, _, _ := lex(s); tokenType {
- case '(':
- return parseNoTagLists(s)
- case angleTokenType:
- return parseTaggedLists(s)
- default:
- return ifHeader{}, false
- }
-}
-
-func parseNoTagLists(s string) (h ifHeader, ok bool) {
- for {
- l, remaining, ok := parseList(s)
- if !ok {
- return ifHeader{}, false
- }
- h.lists = append(h.lists, l)
- if remaining == "" {
- return h, true
- }
- s = remaining
- }
-}
-
-func parseTaggedLists(s string) (h ifHeader, ok bool) {
- resourceTag, n := "", 0
- for first := true; ; first = false {
- tokenType, tokenStr, remaining := lex(s)
- switch tokenType {
- case angleTokenType:
- if !first && n == 0 {
- return ifHeader{}, false
- }
- resourceTag, n = tokenStr, 0
- s = remaining
- case '(':
- n++
- l, remaining, ok := parseList(s)
- if !ok {
- return ifHeader{}, false
- }
- l.resourceTag = resourceTag
- h.lists = append(h.lists, l)
- if remaining == "" {
- return h, true
- }
- s = remaining
- default:
- return ifHeader{}, false
- }
- }
-}
-
-func parseList(s string) (l ifList, remaining string, ok bool) {
- tokenType, _, s := lex(s)
- if tokenType != '(' {
- return ifList{}, "", false
- }
- for {
- tokenType, _, remaining = lex(s)
- if tokenType == ')' {
- if len(l.conditions) == 0 {
- return ifList{}, "", false
- }
- return l, remaining, true
- }
- c, remaining, ok := parseCondition(s)
- if !ok {
- return ifList{}, "", false
- }
- l.conditions = append(l.conditions, c)
- s = remaining
- }
-}
-
-func parseCondition(s string) (c Condition, remaining string, ok bool) {
- tokenType, tokenStr, s := lex(s)
- if tokenType == notTokenType {
- c.Not = true
- tokenType, tokenStr, s = lex(s)
- }
- switch tokenType {
- case strTokenType, angleTokenType:
- c.Token = tokenStr
- case squareTokenType:
- c.ETag = tokenStr
- default:
- return Condition{}, "", false
- }
- return c, s, true
-}
-
-// Single-rune tokens like '(' or ')' have a token type equal to their rune.
-// All other tokens have a negative token type.
-const (
- errTokenType = rune(-1)
- eofTokenType = rune(-2)
- strTokenType = rune(-3)
- notTokenType = rune(-4)
- angleTokenType = rune(-5)
- squareTokenType = rune(-6)
-)
-
-func lex(s string) (tokenType rune, tokenStr string, remaining string) {
- // The net/textproto Reader that parses the HTTP header will collapse
- // Linear White Space that spans multiple "\r\n" lines to a single " ",
- // so we don't need to look for '\r' or '\n'.
- for len(s) > 0 && (s[0] == '\t' || s[0] == ' ') {
- s = s[1:]
- }
- if len(s) == 0 {
- return eofTokenType, "", ""
- }
- i := 0
-loop:
- for ; i < len(s); i++ {
- switch s[i] {
- case '\t', ' ', '(', ')', '<', '>', '[', ']':
- break loop
- }
- }
-
- if i != 0 {
- tokenStr, remaining = s[:i], s[i:]
- if tokenStr == "Not" {
- return notTokenType, "", remaining
- }
- return strTokenType, tokenStr, remaining
- }
-
- j := 0
- switch s[0] {
- case '<':
- j, tokenType = strings.IndexByte(s, '>'), angleTokenType
- case '[':
- j, tokenType = strings.IndexByte(s, ']'), squareTokenType
- default:
- return rune(s[0]), "", s[1:]
- }
- if j < 0 {
- return errTokenType, "", ""
- }
- return tokenType, s[1:j], s[j+1:]
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if_test.go
deleted file mode 100644
index aad61a401..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/if_test.go
+++ /dev/null
@@ -1,322 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "reflect"
- "strings"
- "testing"
-)
-
-func TestParseIfHeader(t *testing.T) {
- // The "section x.y.z" test cases come from section x.y.z of the spec at
- // http://www.webdav.org/specs/rfc4918.html
- testCases := []struct {
- desc string
- input string
- want ifHeader
- }{{
- "bad: empty",
- ``,
- ifHeader{},
- }, {
- "bad: no parens",
- `foobar`,
- ifHeader{},
- }, {
- "bad: empty list #1",
- `()`,
- ifHeader{},
- }, {
- "bad: empty list #2",
- `(a) (b c) () (d)`,
- ifHeader{},
- }, {
- "bad: no list after resource #1",
- `<foo>`,
- ifHeader{},
- }, {
- "bad: no list after resource #2",
- `<foo> <bar> (a)`,
- ifHeader{},
- }, {
- "bad: no list after resource #3",
- `<foo> (a) (b) <bar>`,
- ifHeader{},
- }, {
- "bad: no-tag-list followed by tagged-list",
- `(a) (b) <foo> (c)`,
- ifHeader{},
- }, {
- "bad: unfinished list",
- `(a`,
- ifHeader{},
- }, {
- "bad: unfinished ETag",
- `([b`,
- ifHeader{},
- }, {
- "bad: unfinished Notted list",
- `(Not a`,
- ifHeader{},
- }, {
- "bad: double Not",
- `(Not Not a)`,
- ifHeader{},
- }, {
- "good: one list with a Token",
- `(a)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `a`,
- }},
- }},
- },
- }, {
- "good: one list with an ETag",
- `([a])`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- ETag: `a`,
- }},
- }},
- },
- }, {
- "good: one list with three Nots",
- `(Not a Not b Not [d])`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Not: true,
- Token: `a`,
- }, {
- Not: true,
- Token: `b`,
- }, {
- Not: true,
- ETag: `d`,
- }},
- }},
- },
- }, {
- "good: two lists",
- `(a) (b)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `a`,
- }},
- }, {
- conditions: []Condition{{
- Token: `b`,
- }},
- }},
- },
- }, {
- "good: two Notted lists",
- `(Not a) (Not b)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Not: true,
- Token: `a`,
- }},
- }, {
- conditions: []Condition{{
- Not: true,
- Token: `b`,
- }},
- }},
- },
- }, {
- "section 7.5.1",
- `<http://www.example.com/users/f/fielding/index.html>
- (<urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6>)`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `http://www.example.com/users/f/fielding/index.html`,
- conditions: []Condition{{
- Token: `urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6`,
- }},
- }},
- },
- }, {
- "section 7.5.2 #1",
- `(<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`,
- }},
- }},
- },
- }, {
- "section 7.5.2 #2",
- `<http://example.com/locked/>
- (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `http://example.com/locked/`,
- conditions: []Condition{{
- Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`,
- }},
- }},
- },
- }, {
- "section 7.5.2 #3",
- `<http://example.com/locked/member>
- (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `http://example.com/locked/member`,
- conditions: []Condition{{
- Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`,
- }},
- }},
- },
- }, {
- "section 9.9.6",
- `(<urn:uuid:fe184f2e-6eec-41d0-c765-01adc56e6bb4>)
- (<urn:uuid:e454f3f3-acdc-452a-56c7-00a5c91e4b77>)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `urn:uuid:fe184f2e-6eec-41d0-c765-01adc56e6bb4`,
- }},
- }, {
- conditions: []Condition{{
- Token: `urn:uuid:e454f3f3-acdc-452a-56c7-00a5c91e4b77`,
- }},
- }},
- },
- }, {
- "section 9.10.8",
- `(<urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4>)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4`,
- }},
- }},
- },
- }, {
- "section 10.4.6",
- `(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
- ["I am an ETag"])
- (["I am another ETag"])`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`,
- }, {
- ETag: `"I am an ETag"`,
- }},
- }, {
- conditions: []Condition{{
- ETag: `"I am another ETag"`,
- }},
- }},
- },
- }, {
- "section 10.4.7",
- `(Not <urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
- <urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092>)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Not: true,
- Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`,
- }, {
- Token: `urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092`,
- }},
- }},
- },
- }, {
- "section 10.4.8",
- `(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>)
- (Not <DAV:no-lock>)`,
- ifHeader{
- lists: []ifList{{
- conditions: []Condition{{
- Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`,
- }},
- }, {
- conditions: []Condition{{
- Not: true,
- Token: `DAV:no-lock`,
- }},
- }},
- },
- }, {
- "section 10.4.9",
- `</resource1>
- (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
- [W/"A weak ETag"]) (["strong ETag"])`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `/resource1`,
- conditions: []Condition{{
- Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`,
- }, {
- ETag: `W/"A weak ETag"`,
- }},
- }, {
- resourceTag: `/resource1`,
- conditions: []Condition{{
- ETag: `"strong ETag"`,
- }},
- }},
- },
- }, {
- "section 10.4.10",
- `<http://www.example.com/specs/>
- (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>)`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `http://www.example.com/specs/`,
- conditions: []Condition{{
- Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`,
- }},
- }},
- },
- }, {
- "section 10.4.11 #1",
- `</specs/rfc2518.doc> (["4217"])`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `/specs/rfc2518.doc`,
- conditions: []Condition{{
- ETag: `"4217"`,
- }},
- }},
- },
- }, {
- "section 10.4.11 #2",
- `</specs/rfc2518.doc> (Not ["4217"])`,
- ifHeader{
- lists: []ifList{{
- resourceTag: `/specs/rfc2518.doc`,
- conditions: []Condition{{
- Not: true,
- ETag: `"4217"`,
- }},
- }},
- },
- }}
-
- for _, tc := range testCases {
- got, ok := parseIfHeader(strings.Replace(tc.input, "\n", "", -1))
- if gotEmpty := reflect.DeepEqual(got, ifHeader{}); gotEmpty == ok {
- t.Errorf("%s: should be different: empty header == %t, ok == %t", tc.desc, gotEmpty, ok)
- continue
- }
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("%s:\ngot %v\nwant %v", tc.desc, got, tc.want)
- continue
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/README b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/README
deleted file mode 100644
index 89656f489..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This is a fork of the encoding/xml package at ca1d6c4, the last commit before
-https://go.googlesource.com/go/+/c0d6d33 "encoding/xml: restore Go 1.4 name
-space behavior" made late in the lead-up to the Go 1.5 release.
-
-The list of encoding/xml changes is at
-https://go.googlesource.com/go/+log/master/src/encoding/xml
-
-This fork is temporary, and I (nigeltao) expect to revert it after Go 1.6 is
-released.
-
-See http://golang.org/issue/11841
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go
deleted file mode 100644
index a71284312..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2011 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 file.
-
-package xml
-
-import "time"
-
-var atomValue = &Feed{
- XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
- Title: "Example Feed",
- Link: []Link{{Href: "http://example.org/"}},
- Updated: ParseTime("2003-12-13T18:30:02Z"),
- Author: Person{Name: "John Doe"},
- Id: "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6",
-
- Entry: []Entry{
- {
- Title: "Atom-Powered Robots Run Amok",
- Link: []Link{{Href: "http://example.org/2003/12/13/atom03"}},
- Id: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",
- Updated: ParseTime("2003-12-13T18:30:02Z"),
- Summary: NewText("Some text."),
- },
- },
-}
-
-var atomXml = `` +
- `<feed xmlns="http://www.w3.org/2005/Atom" updated="2003-12-13T18:30:02Z">` +
- `<title>Example Feed</title>` +
- `<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>` +
- `<link href="http://example.org/"></link>` +
- `<author><name>John Doe</name><uri></uri><email></email></author>` +
- `<entry>` +
- `<title>Atom-Powered Robots Run Amok</title>` +
- `<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>` +
- `<link href="http://example.org/2003/12/13/atom03"></link>` +
- `<updated>2003-12-13T18:30:02Z</updated>` +
- `<author><name></name><uri></uri><email></email></author>` +
- `<summary>Some text.</summary>` +
- `</entry>` +
- `</feed>`
-
-func ParseTime(str string) time.Time {
- t, err := time.Parse(time.RFC3339, str)
- if err != nil {
- panic(err)
- }
- return t
-}
-
-func NewText(text string) Text {
- return Text{
- Body: text,
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/example_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/example_test.go
deleted file mode 100644
index 21b48dea5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/example_test.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright 2012 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 file.
-
-package xml_test
-
-import (
- "encoding/xml"
- "fmt"
- "os"
-)
-
-func ExampleMarshalIndent() {
- type Address struct {
- City, State string
- }
- type Person struct {
- XMLName xml.Name `xml:"person"`
- Id int `xml:"id,attr"`
- FirstName string `xml:"name>first"`
- LastName string `xml:"name>last"`
- Age int `xml:"age"`
- Height float32 `xml:"height,omitempty"`
- Married bool
- Address
- Comment string `xml:",comment"`
- }
-
- v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42}
- v.Comment = " Need more details. "
- v.Address = Address{"Hanga Roa", "Easter Island"}
-
- output, err := xml.MarshalIndent(v, " ", " ")
- if err != nil {
- fmt.Printf("error: %v\n", err)
- }
-
- os.Stdout.Write(output)
- // Output:
- // <person id="13">
- // <name>
- // <first>John</first>
- // <last>Doe</last>
- // </name>
- // <age>42</age>
- // <Married>false</Married>
- // <City>Hanga Roa</City>
- // <State>Easter Island</State>
- // <!-- Need more details. -->
- // </person>
-}
-
-func ExampleEncoder() {
- type Address struct {
- City, State string
- }
- type Person struct {
- XMLName xml.Name `xml:"person"`
- Id int `xml:"id,attr"`
- FirstName string `xml:"name>first"`
- LastName string `xml:"name>last"`
- Age int `xml:"age"`
- Height float32 `xml:"height,omitempty"`
- Married bool
- Address
- Comment string `xml:",comment"`
- }
-
- v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42}
- v.Comment = " Need more details. "
- v.Address = Address{"Hanga Roa", "Easter Island"}
-
- enc := xml.NewEncoder(os.Stdout)
- enc.Indent(" ", " ")
- if err := enc.Encode(v); err != nil {
- fmt.Printf("error: %v\n", err)
- }
-
- // Output:
- // <person id="13">
- // <name>
- // <first>John</first>
- // <last>Doe</last>
- // </name>
- // <age>42</age>
- // <Married>false</Married>
- // <City>Hanga Roa</City>
- // <State>Easter Island</State>
- // <!-- Need more details. -->
- // </person>
-}
-
-// This example demonstrates unmarshaling an XML excerpt into a value with
-// some preset fields. Note that the Phone field isn't modified and that
-// the XML <Company> element is ignored. Also, the Groups field is assigned
-// considering the element path provided in its tag.
-func ExampleUnmarshal() {
- type Email struct {
- Where string `xml:"where,attr"`
- Addr string
- }
- type Address struct {
- City, State string
- }
- type Result struct {
- XMLName xml.Name `xml:"Person"`
- Name string `xml:"FullName"`
- Phone string
- Email []Email
- Groups []string `xml:"Group>Value"`
- Address
- }
- v := Result{Name: "none", Phone: "none"}
-
- data := `
- <Person>
- <FullName>Grace R. Emlin</FullName>
- <Company>Example Inc.</Company>
- <Email where="home">
- <Addr>gre@example.com</Addr>
- </Email>
- <Email where='work'>
- <Addr>gre@work.com</Addr>
- </Email>
- <Group>
- <Value>Friends</Value>
- <Value>Squash</Value>
- </Group>
- <City>Hanga Roa</City>
- <State>Easter Island</State>
- </Person>
- `
- err := xml.Unmarshal([]byte(data), &v)
- if err != nil {
- fmt.Printf("error: %v", err)
- return
- }
- fmt.Printf("XMLName: %#v\n", v.XMLName)
- fmt.Printf("Name: %q\n", v.Name)
- fmt.Printf("Phone: %q\n", v.Phone)
- fmt.Printf("Email: %v\n", v.Email)
- fmt.Printf("Groups: %v\n", v.Groups)
- fmt.Printf("Address: %v\n", v.Address)
- // Output:
- // XMLName: xml.Name{Space:"", Local:"Person"}
- // Name: "Grace R. Emlin"
- // Phone: "none"
- // Email: [{home gre@example.com} {work gre@work.com}]
- // Groups: [Friends Squash]
- // Address: {Hanga Roa Easter Island}
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal.go
deleted file mode 100644
index cb82ec214..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal.go
+++ /dev/null
@@ -1,1223 +0,0 @@
-// Copyright 2011 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 file.
-
-package xml
-
-import (
- "bufio"
- "bytes"
- "encoding"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "strings"
-)
-
-const (
- // A generic XML header suitable for use with the output of Marshal.
- // This is not automatically added to any output of this package,
- // it is provided as a convenience.
- Header = `<?xml version="1.0" encoding="UTF-8"?>` + "\n"
-)
-
-// Marshal returns the XML encoding of v.
-//
-// Marshal handles an array or slice by marshalling each of the elements.
-// Marshal handles a pointer by marshalling the value it points at or, if the
-// pointer is nil, by writing nothing. Marshal handles an interface value by
-// marshalling the value it contains or, if the interface value is nil, by
-// writing nothing. Marshal handles all other data by writing one or more XML
-// elements containing the data.
-//
-// The name for the XML elements is taken from, in order of preference:
-// - the tag on the XMLName field, if the data is a struct
-// - the value of the XMLName field of type xml.Name
-// - the tag of the struct field used to obtain the data
-// - the name of the struct field used to obtain the data
-// - the name of the marshalled type
-//
-// The XML element for a struct contains marshalled elements for each of the
-// exported fields of the struct, with these exceptions:
-// - the XMLName field, described above, is omitted.
-// - a field with tag "-" is omitted.
-// - a field with tag "name,attr" becomes an attribute with
-// the given name in the XML element.
-// - a field with tag ",attr" becomes an attribute with the
-// field name in the XML element.
-// - a field with tag ",chardata" is written as character data,
-// not as an XML element.
-// - a field with tag ",innerxml" is written verbatim, not subject
-// to the usual marshalling procedure.
-// - a field with tag ",comment" is written as an XML comment, not
-// subject to the usual marshalling procedure. It must not contain
-// the "--" string within it.
-// - a field with a tag including the "omitempty" option is omitted
-// if the field value is empty. The empty values are false, 0, any
-// nil pointer or interface value, and any array, slice, map, or
-// string of length zero.
-// - an anonymous struct field is handled as if the fields of its
-// value were part of the outer struct.
-//
-// If a field uses a tag "a>b>c", then the element c will be nested inside
-// parent elements a and b. Fields that appear next to each other that name
-// the same parent will be enclosed in one XML element.
-//
-// See MarshalIndent for an example.
-//
-// Marshal will return an error if asked to marshal a channel, function, or map.
-func Marshal(v interface{}) ([]byte, error) {
- var b bytes.Buffer
- if err := NewEncoder(&b).Encode(v); err != nil {
- return nil, err
- }
- return b.Bytes(), nil
-}
-
-// Marshaler is the interface implemented by objects that can marshal
-// themselves into valid XML elements.
-//
-// MarshalXML encodes the receiver as zero or more XML elements.
-// By convention, arrays or slices are typically encoded as a sequence
-// of elements, one per entry.
-// Using start as the element tag is not required, but doing so
-// will enable Unmarshal to match the XML elements to the correct
-// struct field.
-// One common implementation strategy is to construct a separate
-// value with a layout corresponding to the desired XML and then
-// to encode it using e.EncodeElement.
-// Another common strategy is to use repeated calls to e.EncodeToken
-// to generate the XML output one token at a time.
-// The sequence of encoded tokens must make up zero or more valid
-// XML elements.
-type Marshaler interface {
- MarshalXML(e *Encoder, start StartElement) error
-}
-
-// MarshalerAttr is the interface implemented by objects that can marshal
-// themselves into valid XML attributes.
-//
-// MarshalXMLAttr returns an XML attribute with the encoded value of the receiver.
-// Using name as the attribute name is not required, but doing so
-// will enable Unmarshal to match the attribute to the correct
-// struct field.
-// If MarshalXMLAttr returns the zero attribute Attr{}, no attribute
-// will be generated in the output.
-// MarshalXMLAttr is used only for struct fields with the
-// "attr" option in the field tag.
-type MarshalerAttr interface {
- MarshalXMLAttr(name Name) (Attr, error)
-}
-
-// MarshalIndent works like Marshal, but each XML element begins on a new
-// indented line that starts with prefix and is followed by one or more
-// copies of indent according to the nesting depth.
-func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
- var b bytes.Buffer
- enc := NewEncoder(&b)
- enc.Indent(prefix, indent)
- if err := enc.Encode(v); err != nil {
- return nil, err
- }
- return b.Bytes(), nil
-}
-
-// An Encoder writes XML data to an output stream.
-type Encoder struct {
- p printer
-}
-
-// NewEncoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
- e := &Encoder{printer{Writer: bufio.NewWriter(w)}}
- e.p.encoder = e
- return e
-}
-
-// Indent sets the encoder to generate XML in which each element
-// begins on a new indented line that starts with prefix and is followed by
-// one or more copies of indent according to the nesting depth.
-func (enc *Encoder) Indent(prefix, indent string) {
- enc.p.prefix = prefix
- enc.p.indent = indent
-}
-
-// Encode writes the XML encoding of v to the stream.
-//
-// See the documentation for Marshal for details about the conversion
-// of Go values to XML.
-//
-// Encode calls Flush before returning.
-func (enc *Encoder) Encode(v interface{}) error {
- err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil)
- if err != nil {
- return err
- }
- return enc.p.Flush()
-}
-
-// EncodeElement writes the XML encoding of v to the stream,
-// using start as the outermost tag in the encoding.
-//
-// See the documentation for Marshal for details about the conversion
-// of Go values to XML.
-//
-// EncodeElement calls Flush before returning.
-func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error {
- err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start)
- if err != nil {
- return err
- }
- return enc.p.Flush()
-}
-
-var (
- begComment = []byte("<!--")
- endComment = []byte("-->")
- endProcInst = []byte("?>")
- endDirective = []byte(">")
-)
-
-// EncodeToken writes the given XML token to the stream.
-// It returns an error if StartElement and EndElement tokens are not
-// properly matched.
-//
-// EncodeToken does not call Flush, because usually it is part of a
-// larger operation such as Encode or EncodeElement (or a custom
-// Marshaler's MarshalXML invoked during those), and those will call
-// Flush when finished. Callers that create an Encoder and then invoke
-// EncodeToken directly, without using Encode or EncodeElement, need to
-// call Flush when finished to ensure that the XML is written to the
-// underlying writer.
-//
-// EncodeToken allows writing a ProcInst with Target set to "xml" only
-// as the first token in the stream.
-//
-// When encoding a StartElement holding an XML namespace prefix
-// declaration for a prefix that is not already declared, contained
-// elements (including the StartElement itself) will use the declared
-// prefix when encoding names with matching namespace URIs.
-func (enc *Encoder) EncodeToken(t Token) error {
-
- p := &enc.p
- switch t := t.(type) {
- case StartElement:
- if err := p.writeStart(&t); err != nil {
- return err
- }
- case EndElement:
- if err := p.writeEnd(t.Name); err != nil {
- return err
- }
- case CharData:
- escapeText(p, t, false)
- case Comment:
- if bytes.Contains(t, endComment) {
- return fmt.Errorf("xml: EncodeToken of Comment containing --> marker")
- }
- p.WriteString("<!--")
- p.Write(t)
- p.WriteString("-->")
- return p.cachedWriteError()
- case ProcInst:
- // First token to be encoded which is also a ProcInst with target of xml
- // is the xml declaration. The only ProcInst where target of xml is allowed.
- if t.Target == "xml" && p.Buffered() != 0 {
- return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded")
- }
- if !isNameString(t.Target) {
- return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target")
- }
- if bytes.Contains(t.Inst, endProcInst) {
- return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker")
- }
- p.WriteString("<?")
- p.WriteString(t.Target)
- if len(t.Inst) > 0 {
- p.WriteByte(' ')
- p.Write(t.Inst)
- }
- p.WriteString("?>")
- case Directive:
- if !isValidDirective(t) {
- return fmt.Errorf("xml: EncodeToken of Directive containing wrong < or > markers")
- }
- p.WriteString("<!")
- p.Write(t)
- p.WriteString(">")
- default:
- return fmt.Errorf("xml: EncodeToken of invalid token type")
-
- }
- return p.cachedWriteError()
-}
-
-// isValidDirective reports whether dir is a valid directive text,
-// meaning angle brackets are matched, ignoring comments and strings.
-func isValidDirective(dir Directive) bool {
- var (
- depth int
- inquote uint8
- incomment bool
- )
- for i, c := range dir {
- switch {
- case incomment:
- if c == '>' {
- if n := 1 + i - len(endComment); n >= 0 && bytes.Equal(dir[n:i+1], endComment) {
- incomment = false
- }
- }
- // Just ignore anything in comment
- case inquote != 0:
- if c == inquote {
- inquote = 0
- }
- // Just ignore anything within quotes
- case c == '\'' || c == '"':
- inquote = c
- case c == '<':
- if i+len(begComment) < len(dir) && bytes.Equal(dir[i:i+len(begComment)], begComment) {
- incomment = true
- } else {
- depth++
- }
- case c == '>':
- if depth == 0 {
- return false
- }
- depth--
- }
- }
- return depth == 0 && inquote == 0 && !incomment
-}
-
-// Flush flushes any buffered XML to the underlying writer.
-// See the EncodeToken documentation for details about when it is necessary.
-func (enc *Encoder) Flush() error {
- return enc.p.Flush()
-}
-
-type printer struct {
- *bufio.Writer
- encoder *Encoder
- seq int
- indent string
- prefix string
- depth int
- indentedIn bool
- putNewline bool
- defaultNS string
- attrNS map[string]string // map prefix -> name space
- attrPrefix map[string]string // map name space -> prefix
- prefixes []printerPrefix
- tags []Name
-}
-
-// printerPrefix holds a namespace undo record.
-// When an element is popped, the prefix record
-// is set back to the recorded URL. The empty
-// prefix records the URL for the default name space.
-//
-// The start of an element is recorded with an element
-// that has mark=true.
-type printerPrefix struct {
- prefix string
- url string
- mark bool
-}
-
-func (p *printer) prefixForNS(url string, isAttr bool) string {
- // The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml"
- // and must be referred to that way.
- // (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns",
- // but users should not be trying to use that one directly - that's our job.)
- if url == xmlURL {
- return "xml"
- }
- if !isAttr && url == p.defaultNS {
- // We can use the default name space.
- return ""
- }
- return p.attrPrefix[url]
-}
-
-// defineNS pushes any namespace definition found in the given attribute.
-// If ignoreNonEmptyDefault is true, an xmlns="nonempty"
-// attribute will be ignored.
-func (p *printer) defineNS(attr Attr, ignoreNonEmptyDefault bool) error {
- var prefix string
- if attr.Name.Local == "xmlns" {
- if attr.Name.Space != "" && attr.Name.Space != "xml" && attr.Name.Space != xmlURL {
- return fmt.Errorf("xml: cannot redefine xmlns attribute prefix")
- }
- } else if attr.Name.Space == "xmlns" && attr.Name.Local != "" {
- prefix = attr.Name.Local
- if attr.Value == "" {
- // Technically, an empty XML namespace is allowed for an attribute.
- // From http://www.w3.org/TR/xml-names11/#scoping-defaulting:
- //
- // The attribute value in a namespace declaration for a prefix may be
- // empty. This has the effect, within the scope of the declaration, of removing
- // any association of the prefix with a namespace name.
- //
- // However our namespace prefixes here are used only as hints. There's
- // no need to respect the removal of a namespace prefix, so we ignore it.
- return nil
- }
- } else {
- // Ignore: it's not a namespace definition
- return nil
- }
- if prefix == "" {
- if attr.Value == p.defaultNS {
- // No need for redefinition.
- return nil
- }
- if attr.Value != "" && ignoreNonEmptyDefault {
- // We have an xmlns="..." value but
- // it can't define a name space in this context,
- // probably because the element has an empty
- // name space. In this case, we just ignore
- // the name space declaration.
- return nil
- }
- } else if _, ok := p.attrPrefix[attr.Value]; ok {
- // There's already a prefix for the given name space,
- // so use that. This prevents us from
- // having two prefixes for the same name space
- // so attrNS and attrPrefix can remain bijective.
- return nil
- }
- p.pushPrefix(prefix, attr.Value)
- return nil
-}
-
-// createNSPrefix creates a name space prefix attribute
-// to use for the given name space, defining a new prefix
-// if necessary.
-// If isAttr is true, the prefix is to be created for an attribute
-// prefix, which means that the default name space cannot
-// be used.
-func (p *printer) createNSPrefix(url string, isAttr bool) {
- if _, ok := p.attrPrefix[url]; ok {
- // We already have a prefix for the given URL.
- return
- }
- switch {
- case !isAttr && url == p.defaultNS:
- // We can use the default name space.
- return
- case url == "":
- // The only way we can encode names in the empty
- // name space is by using the default name space,
- // so we must use that.
- if p.defaultNS != "" {
- // The default namespace is non-empty, so we
- // need to set it to empty.
- p.pushPrefix("", "")
- }
- return
- case url == xmlURL:
- return
- }
- // TODO If the URL is an existing prefix, we could
- // use it as is. That would enable the
- // marshaling of elements that had been unmarshaled
- // and with a name space prefix that was not found.
- // although technically it would be incorrect.
-
- // Pick a name. We try to use the final element of the path
- // but fall back to _.
- prefix := strings.TrimRight(url, "/")
- if i := strings.LastIndex(prefix, "/"); i >= 0 {
- prefix = prefix[i+1:]
- }
- if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") {
- prefix = "_"
- }
- if strings.HasPrefix(prefix, "xml") {
- // xmlanything is reserved.
- prefix = "_" + prefix
- }
- if p.attrNS[prefix] != "" {
- // Name is taken. Find a better one.
- for p.seq++; ; p.seq++ {
- if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" {
- prefix = id
- break
- }
- }
- }
-
- p.pushPrefix(prefix, url)
-}
-
-// writeNamespaces writes xmlns attributes for all the
-// namespace prefixes that have been defined in
-// the current element.
-func (p *printer) writeNamespaces() {
- for i := len(p.prefixes) - 1; i >= 0; i-- {
- prefix := p.prefixes[i]
- if prefix.mark {
- return
- }
- p.WriteString(" ")
- if prefix.prefix == "" {
- // Default name space.
- p.WriteString(`xmlns="`)
- } else {
- p.WriteString("xmlns:")
- p.WriteString(prefix.prefix)
- p.WriteString(`="`)
- }
- EscapeText(p, []byte(p.nsForPrefix(prefix.prefix)))
- p.WriteString(`"`)
- }
-}
-
-// pushPrefix pushes a new prefix on the prefix stack
-// without checking to see if it is already defined.
-func (p *printer) pushPrefix(prefix, url string) {
- p.prefixes = append(p.prefixes, printerPrefix{
- prefix: prefix,
- url: p.nsForPrefix(prefix),
- })
- p.setAttrPrefix(prefix, url)
-}
-
-// nsForPrefix returns the name space for the given
-// prefix. Note that this is not valid for the
-// empty attribute prefix, which always has an empty
-// name space.
-func (p *printer) nsForPrefix(prefix string) string {
- if prefix == "" {
- return p.defaultNS
- }
- return p.attrNS[prefix]
-}
-
-// markPrefix marks the start of an element on the prefix
-// stack.
-func (p *printer) markPrefix() {
- p.prefixes = append(p.prefixes, printerPrefix{
- mark: true,
- })
-}
-
-// popPrefix pops all defined prefixes for the current
-// element.
-func (p *printer) popPrefix() {
- for len(p.prefixes) > 0 {
- prefix := p.prefixes[len(p.prefixes)-1]
- p.prefixes = p.prefixes[:len(p.prefixes)-1]
- if prefix.mark {
- break
- }
- p.setAttrPrefix(prefix.prefix, prefix.url)
- }
-}
-
-// setAttrPrefix sets an attribute name space prefix.
-// If url is empty, the attribute is removed.
-// If prefix is empty, the default name space is set.
-func (p *printer) setAttrPrefix(prefix, url string) {
- if prefix == "" {
- p.defaultNS = url
- return
- }
- if url == "" {
- delete(p.attrPrefix, p.attrNS[prefix])
- delete(p.attrNS, prefix)
- return
- }
- if p.attrPrefix == nil {
- // Need to define a new name space.
- p.attrPrefix = make(map[string]string)
- p.attrNS = make(map[string]string)
- }
- // Remove any old prefix value. This is OK because we maintain a
- // strict one-to-one mapping between prefix and URL (see
- // defineNS)
- delete(p.attrPrefix, p.attrNS[prefix])
- p.attrPrefix[url] = prefix
- p.attrNS[prefix] = url
-}
-
-var (
- marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
- marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem()
- textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
-)
-
-// marshalValue writes one or more XML elements representing val.
-// If val was obtained from a struct field, finfo must have its details.
-func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error {
- if startTemplate != nil && startTemplate.Name.Local == "" {
- return fmt.Errorf("xml: EncodeElement of StartElement with missing name")
- }
-
- if !val.IsValid() {
- return nil
- }
- if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) {
- return nil
- }
-
- // Drill into interfaces and pointers.
- // This can turn into an infinite loop given a cyclic chain,
- // but it matches the Go 1 behavior.
- for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr {
- if val.IsNil() {
- return nil
- }
- val = val.Elem()
- }
-
- kind := val.Kind()
- typ := val.Type()
-
- // Check for marshaler.
- if val.CanInterface() && typ.Implements(marshalerType) {
- return p.marshalInterface(val.Interface().(Marshaler), p.defaultStart(typ, finfo, startTemplate))
- }
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(marshalerType) {
- return p.marshalInterface(pv.Interface().(Marshaler), p.defaultStart(pv.Type(), finfo, startTemplate))
- }
- }
-
- // Check for text marshaler.
- if val.CanInterface() && typ.Implements(textMarshalerType) {
- return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), p.defaultStart(typ, finfo, startTemplate))
- }
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
- return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), p.defaultStart(pv.Type(), finfo, startTemplate))
- }
- }
-
- // Slices and arrays iterate over the elements. They do not have an enclosing tag.
- if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 {
- for i, n := 0, val.Len(); i < n; i++ {
- if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil {
- return err
- }
- }
- return nil
- }
-
- tinfo, err := getTypeInfo(typ)
- if err != nil {
- return err
- }
-
- // Create start element.
- // Precedence for the XML element name is:
- // 0. startTemplate
- // 1. XMLName field in underlying struct;
- // 2. field name/tag in the struct field; and
- // 3. type name
- var start StartElement
-
- // explicitNS records whether the element's name space has been
- // explicitly set (for example an XMLName field).
- explicitNS := false
-
- if startTemplate != nil {
- start.Name = startTemplate.Name
- explicitNS = true
- start.Attr = append(start.Attr, startTemplate.Attr...)
- } else if tinfo.xmlname != nil {
- xmlname := tinfo.xmlname
- if xmlname.name != "" {
- start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name
- } else if v, ok := xmlname.value(val).Interface().(Name); ok && v.Local != "" {
- start.Name = v
- }
- explicitNS = true
- }
- if start.Name.Local == "" && finfo != nil {
- start.Name.Local = finfo.name
- if finfo.xmlns != "" {
- start.Name.Space = finfo.xmlns
- explicitNS = true
- }
- }
- if start.Name.Local == "" {
- name := typ.Name()
- if name == "" {
- return &UnsupportedTypeError{typ}
- }
- start.Name.Local = name
- }
-
- // defaultNS records the default name space as set by a xmlns="..."
- // attribute. We don't set p.defaultNS because we want to let
- // the attribute writing code (in p.defineNS) be solely responsible
- // for maintaining that.
- defaultNS := p.defaultNS
-
- // Attributes
- for i := range tinfo.fields {
- finfo := &tinfo.fields[i]
- if finfo.flags&fAttr == 0 {
- continue
- }
- attr, err := p.fieldAttr(finfo, val)
- if err != nil {
- return err
- }
- if attr.Name.Local == "" {
- continue
- }
- start.Attr = append(start.Attr, attr)
- if attr.Name.Space == "" && attr.Name.Local == "xmlns" {
- defaultNS = attr.Value
- }
- }
- if !explicitNS {
- // Historic behavior: elements use the default name space
- // they are contained in by default.
- start.Name.Space = defaultNS
- }
- // Historic behaviour: an element that's in a namespace sets
- // the default namespace for all elements contained within it.
- start.setDefaultNamespace()
-
- if err := p.writeStart(&start); err != nil {
- return err
- }
-
- if val.Kind() == reflect.Struct {
- err = p.marshalStruct(tinfo, val)
- } else {
- s, b, err1 := p.marshalSimple(typ, val)
- if err1 != nil {
- err = err1
- } else if b != nil {
- EscapeText(p, b)
- } else {
- p.EscapeString(s)
- }
- }
- if err != nil {
- return err
- }
-
- if err := p.writeEnd(start.Name); err != nil {
- return err
- }
-
- return p.cachedWriteError()
-}
-
-// fieldAttr returns the attribute of the given field.
-// If the returned attribute has an empty Name.Local,
-// it should not be used.
-// The given value holds the value containing the field.
-func (p *printer) fieldAttr(finfo *fieldInfo, val reflect.Value) (Attr, error) {
- fv := finfo.value(val)
- name := Name{Space: finfo.xmlns, Local: finfo.name}
- if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) {
- return Attr{}, nil
- }
- if fv.Kind() == reflect.Interface && fv.IsNil() {
- return Attr{}, nil
- }
- if fv.CanInterface() && fv.Type().Implements(marshalerAttrType) {
- attr, err := fv.Interface().(MarshalerAttr).MarshalXMLAttr(name)
- return attr, err
- }
- if fv.CanAddr() {
- pv := fv.Addr()
- if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) {
- attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name)
- return attr, err
- }
- }
- if fv.CanInterface() && fv.Type().Implements(textMarshalerType) {
- text, err := fv.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return Attr{}, err
- }
- return Attr{name, string(text)}, nil
- }
- if fv.CanAddr() {
- pv := fv.Addr()
- if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
- text, err := pv.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return Attr{}, err
- }
- return Attr{name, string(text)}, nil
- }
- }
- // Dereference or skip nil pointer, interface values.
- switch fv.Kind() {
- case reflect.Ptr, reflect.Interface:
- if fv.IsNil() {
- return Attr{}, nil
- }
- fv = fv.Elem()
- }
- s, b, err := p.marshalSimple(fv.Type(), fv)
- if err != nil {
- return Attr{}, err
- }
- if b != nil {
- s = string(b)
- }
- return Attr{name, s}, nil
-}
-
-// defaultStart returns the default start element to use,
-// given the reflect type, field info, and start template.
-func (p *printer) defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement {
- var start StartElement
- // Precedence for the XML element name is as above,
- // except that we do not look inside structs for the first field.
- if startTemplate != nil {
- start.Name = startTemplate.Name
- start.Attr = append(start.Attr, startTemplate.Attr...)
- } else if finfo != nil && finfo.name != "" {
- start.Name.Local = finfo.name
- start.Name.Space = finfo.xmlns
- } else if typ.Name() != "" {
- start.Name.Local = typ.Name()
- } else {
- // Must be a pointer to a named type,
- // since it has the Marshaler methods.
- start.Name.Local = typ.Elem().Name()
- }
- // Historic behaviour: elements use the name space of
- // the element they are contained in by default.
- if start.Name.Space == "" {
- start.Name.Space = p.defaultNS
- }
- start.setDefaultNamespace()
- return start
-}
-
-// marshalInterface marshals a Marshaler interface value.
-func (p *printer) marshalInterface(val Marshaler, start StartElement) error {
- // Push a marker onto the tag stack so that MarshalXML
- // cannot close the XML tags that it did not open.
- p.tags = append(p.tags, Name{})
- n := len(p.tags)
-
- err := val.MarshalXML(p.encoder, start)
- if err != nil {
- return err
- }
-
- // Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark.
- if len(p.tags) > n {
- return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local)
- }
- p.tags = p.tags[:n-1]
- return nil
-}
-
-// marshalTextInterface marshals a TextMarshaler interface value.
-func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error {
- if err := p.writeStart(&start); err != nil {
- return err
- }
- text, err := val.MarshalText()
- if err != nil {
- return err
- }
- EscapeText(p, text)
- return p.writeEnd(start.Name)
-}
-
-// writeStart writes the given start element.
-func (p *printer) writeStart(start *StartElement) error {
- if start.Name.Local == "" {
- return fmt.Errorf("xml: start tag with no name")
- }
-
- p.tags = append(p.tags, start.Name)
- p.markPrefix()
- // Define any name spaces explicitly declared in the attributes.
- // We do this as a separate pass so that explicitly declared prefixes
- // will take precedence over implicitly declared prefixes
- // regardless of the order of the attributes.
- ignoreNonEmptyDefault := start.Name.Space == ""
- for _, attr := range start.Attr {
- if err := p.defineNS(attr, ignoreNonEmptyDefault); err != nil {
- return err
- }
- }
- // Define any new name spaces implied by the attributes.
- for _, attr := range start.Attr {
- name := attr.Name
- // From http://www.w3.org/TR/xml-names11/#defaulting
- // "Default namespace declarations do not apply directly
- // to attribute names; the interpretation of unprefixed
- // attributes is determined by the element on which they
- // appear."
- // This means we don't need to create a new namespace
- // when an attribute name space is empty.
- if name.Space != "" && !name.isNamespace() {
- p.createNSPrefix(name.Space, true)
- }
- }
- p.createNSPrefix(start.Name.Space, false)
-
- p.writeIndent(1)
- p.WriteByte('<')
- p.writeName(start.Name, false)
- p.writeNamespaces()
- for _, attr := range start.Attr {
- name := attr.Name
- if name.Local == "" || name.isNamespace() {
- // Namespaces have already been written by writeNamespaces above.
- continue
- }
- p.WriteByte(' ')
- p.writeName(name, true)
- p.WriteString(`="`)
- p.EscapeString(attr.Value)
- p.WriteByte('"')
- }
- p.WriteByte('>')
- return nil
-}
-
-// writeName writes the given name. It assumes
-// that p.createNSPrefix(name) has already been called.
-func (p *printer) writeName(name Name, isAttr bool) {
- if prefix := p.prefixForNS(name.Space, isAttr); prefix != "" {
- p.WriteString(prefix)
- p.WriteByte(':')
- }
- p.WriteString(name.Local)
-}
-
-func (p *printer) writeEnd(name Name) error {
- if name.Local == "" {
- return fmt.Errorf("xml: end tag with no name")
- }
- if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" {
- return fmt.Errorf("xml: end tag </%s> without start tag", name.Local)
- }
- if top := p.tags[len(p.tags)-1]; top != name {
- if top.Local != name.Local {
- return fmt.Errorf("xml: end tag </%s> does not match start tag <%s>", name.Local, top.Local)
- }
- return fmt.Errorf("xml: end tag </%s> in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space)
- }
- p.tags = p.tags[:len(p.tags)-1]
-
- p.writeIndent(-1)
- p.WriteByte('<')
- p.WriteByte('/')
- p.writeName(name, false)
- p.WriteByte('>')
- p.popPrefix()
- return nil
-}
-
-func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) {
- switch val.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return strconv.FormatInt(val.Int(), 10), nil, nil
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return strconv.FormatUint(val.Uint(), 10), nil, nil
- case reflect.Float32, reflect.Float64:
- return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil
- case reflect.String:
- return val.String(), nil, nil
- case reflect.Bool:
- return strconv.FormatBool(val.Bool()), nil, nil
- case reflect.Array:
- if typ.Elem().Kind() != reflect.Uint8 {
- break
- }
- // [...]byte
- var bytes []byte
- if val.CanAddr() {
- bytes = val.Slice(0, val.Len()).Bytes()
- } else {
- bytes = make([]byte, val.Len())
- reflect.Copy(reflect.ValueOf(bytes), val)
- }
- return "", bytes, nil
- case reflect.Slice:
- if typ.Elem().Kind() != reflect.Uint8 {
- break
- }
- // []byte
- return "", val.Bytes(), nil
- }
- return "", nil, &UnsupportedTypeError{typ}
-}
-
-var ddBytes = []byte("--")
-
-func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error {
- s := parentStack{p: p}
- for i := range tinfo.fields {
- finfo := &tinfo.fields[i]
- if finfo.flags&fAttr != 0 {
- continue
- }
- vf := finfo.value(val)
-
- // Dereference or skip nil pointer, interface values.
- switch vf.Kind() {
- case reflect.Ptr, reflect.Interface:
- if !vf.IsNil() {
- vf = vf.Elem()
- }
- }
-
- switch finfo.flags & fMode {
- case fCharData:
- if err := s.setParents(&noField, reflect.Value{}); err != nil {
- return err
- }
- if vf.CanInterface() && vf.Type().Implements(textMarshalerType) {
- data, err := vf.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return err
- }
- Escape(p, data)
- continue
- }
- if vf.CanAddr() {
- pv := vf.Addr()
- if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
- data, err := pv.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return err
- }
- Escape(p, data)
- continue
- }
- }
- var scratch [64]byte
- switch vf.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- Escape(p, strconv.AppendInt(scratch[:0], vf.Int(), 10))
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- Escape(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10))
- case reflect.Float32, reflect.Float64:
- Escape(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits()))
- case reflect.Bool:
- Escape(p, strconv.AppendBool(scratch[:0], vf.Bool()))
- case reflect.String:
- if err := EscapeText(p, []byte(vf.String())); err != nil {
- return err
- }
- case reflect.Slice:
- if elem, ok := vf.Interface().([]byte); ok {
- if err := EscapeText(p, elem); err != nil {
- return err
- }
- }
- }
- continue
-
- case fComment:
- if err := s.setParents(&noField, reflect.Value{}); err != nil {
- return err
- }
- k := vf.Kind()
- if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) {
- return fmt.Errorf("xml: bad type for comment field of %s", val.Type())
- }
- if vf.Len() == 0 {
- continue
- }
- p.writeIndent(0)
- p.WriteString("<!--")
- dashDash := false
- dashLast := false
- switch k {
- case reflect.String:
- s := vf.String()
- dashDash = strings.Index(s, "--") >= 0
- dashLast = s[len(s)-1] == '-'
- if !dashDash {
- p.WriteString(s)
- }
- case reflect.Slice:
- b := vf.Bytes()
- dashDash = bytes.Index(b, ddBytes) >= 0
- dashLast = b[len(b)-1] == '-'
- if !dashDash {
- p.Write(b)
- }
- default:
- panic("can't happen")
- }
- if dashDash {
- return fmt.Errorf(`xml: comments must not contain "--"`)
- }
- if dashLast {
- // "--->" is invalid grammar. Make it "- -->"
- p.WriteByte(' ')
- }
- p.WriteString("-->")
- continue
-
- case fInnerXml:
- iface := vf.Interface()
- switch raw := iface.(type) {
- case []byte:
- p.Write(raw)
- continue
- case string:
- p.WriteString(raw)
- continue
- }
-
- case fElement, fElement | fAny:
- if err := s.setParents(finfo, vf); err != nil {
- return err
- }
- }
- if err := p.marshalValue(vf, finfo, nil); err != nil {
- return err
- }
- }
- if err := s.setParents(&noField, reflect.Value{}); err != nil {
- return err
- }
- return p.cachedWriteError()
-}
-
-var noField fieldInfo
-
-// return the bufio Writer's cached write error
-func (p *printer) cachedWriteError() error {
- _, err := p.Write(nil)
- return err
-}
-
-func (p *printer) writeIndent(depthDelta int) {
- if len(p.prefix) == 0 && len(p.indent) == 0 {
- return
- }
- if depthDelta < 0 {
- p.depth--
- if p.indentedIn {
- p.indentedIn = false
- return
- }
- p.indentedIn = false
- }
- if p.putNewline {
- p.WriteByte('\n')
- } else {
- p.putNewline = true
- }
- if len(p.prefix) > 0 {
- p.WriteString(p.prefix)
- }
- if len(p.indent) > 0 {
- for i := 0; i < p.depth; i++ {
- p.WriteString(p.indent)
- }
- }
- if depthDelta > 0 {
- p.depth++
- p.indentedIn = true
- }
-}
-
-type parentStack struct {
- p *printer
- xmlns string
- parents []string
-}
-
-// setParents sets the stack of current parents to those found in finfo.
-// It only writes the start elements if vf holds a non-nil value.
-// If finfo is &noField, it pops all elements.
-func (s *parentStack) setParents(finfo *fieldInfo, vf reflect.Value) error {
- xmlns := s.p.defaultNS
- if finfo.xmlns != "" {
- xmlns = finfo.xmlns
- }
- commonParents := 0
- if xmlns == s.xmlns {
- for ; commonParents < len(finfo.parents) && commonParents < len(s.parents); commonParents++ {
- if finfo.parents[commonParents] != s.parents[commonParents] {
- break
- }
- }
- }
- // Pop off any parents that aren't in common with the previous field.
- for i := len(s.parents) - 1; i >= commonParents; i-- {
- if err := s.p.writeEnd(Name{
- Space: s.xmlns,
- Local: s.parents[i],
- }); err != nil {
- return err
- }
- }
- s.parents = finfo.parents
- s.xmlns = xmlns
- if commonParents >= len(s.parents) {
- // No new elements to push.
- return nil
- }
- if (vf.Kind() == reflect.Ptr || vf.Kind() == reflect.Interface) && vf.IsNil() {
- // The element is nil, so no need for the start elements.
- s.parents = s.parents[:commonParents]
- return nil
- }
- // Push any new parents required.
- for _, name := range s.parents[commonParents:] {
- start := &StartElement{
- Name: Name{
- Space: s.xmlns,
- Local: name,
- },
- }
- // Set the default name space for parent elements
- // to match what we do with other elements.
- if s.xmlns != s.p.defaultNS {
- start.setDefaultNamespace()
- }
- if err := s.p.writeStart(start); err != nil {
- return err
- }
- }
- return nil
-}
-
-// A MarshalXMLError is returned when Marshal encounters a type
-// that cannot be converted into XML.
-type UnsupportedTypeError struct {
- Type reflect.Type
-}
-
-func (e *UnsupportedTypeError) Error() string {
- return "xml: unsupported type: " + e.Type.String()
-}
-
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- return v.Len() == 0
- 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.Interface, reflect.Ptr:
- return v.IsNil()
- }
- return false
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go
deleted file mode 100644
index 226cfd013..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go
+++ /dev/null
@@ -1,1939 +0,0 @@
-// Copyright 2011 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 file.
-
-package xml
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "strings"
- "sync"
- "testing"
- "time"
-)
-
-type DriveType int
-
-const (
- HyperDrive DriveType = iota
- ImprobabilityDrive
-)
-
-type Passenger struct {
- Name []string `xml:"name"`
- Weight float32 `xml:"weight"`
-}
-
-type Ship struct {
- XMLName struct{} `xml:"spaceship"`
-
- Name string `xml:"name,attr"`
- Pilot string `xml:"pilot,attr"`
- Drive DriveType `xml:"drive"`
- Age uint `xml:"age"`
- Passenger []*Passenger `xml:"passenger"`
- secret string
-}
-
-type NamedType string
-
-type Port struct {
- XMLName struct{} `xml:"port"`
- Type string `xml:"type,attr,omitempty"`
- Comment string `xml:",comment"`
- Number string `xml:",chardata"`
-}
-
-type Domain struct {
- XMLName struct{} `xml:"domain"`
- Country string `xml:",attr,omitempty"`
- Name []byte `xml:",chardata"`
- Comment []byte `xml:",comment"`
-}
-
-type Book struct {
- XMLName struct{} `xml:"book"`
- Title string `xml:",chardata"`
-}
-
-type Event struct {
- XMLName struct{} `xml:"event"`
- Year int `xml:",chardata"`
-}
-
-type Movie struct {
- XMLName struct{} `xml:"movie"`
- Length uint `xml:",chardata"`
-}
-
-type Pi struct {
- XMLName struct{} `xml:"pi"`
- Approximation float32 `xml:",chardata"`
-}
-
-type Universe struct {
- XMLName struct{} `xml:"universe"`
- Visible float64 `xml:",chardata"`
-}
-
-type Particle struct {
- XMLName struct{} `xml:"particle"`
- HasMass bool `xml:",chardata"`
-}
-
-type Departure struct {
- XMLName struct{} `xml:"departure"`
- When time.Time `xml:",chardata"`
-}
-
-type SecretAgent struct {
- XMLName struct{} `xml:"agent"`
- Handle string `xml:"handle,attr"`
- Identity string
- Obfuscate string `xml:",innerxml"`
-}
-
-type NestedItems struct {
- XMLName struct{} `xml:"result"`
- Items []string `xml:">item"`
- Item1 []string `xml:"Items>item1"`
-}
-
-type NestedOrder struct {
- XMLName struct{} `xml:"result"`
- Field1 string `xml:"parent>c"`
- Field2 string `xml:"parent>b"`
- Field3 string `xml:"parent>a"`
-}
-
-type MixedNested struct {
- XMLName struct{} `xml:"result"`
- A string `xml:"parent1>a"`
- B string `xml:"b"`
- C string `xml:"parent1>parent2>c"`
- D string `xml:"parent1>d"`
-}
-
-type NilTest struct {
- A interface{} `xml:"parent1>parent2>a"`
- B interface{} `xml:"parent1>b"`
- C interface{} `xml:"parent1>parent2>c"`
-}
-
-type Service struct {
- XMLName struct{} `xml:"service"`
- Domain *Domain `xml:"host>domain"`
- Port *Port `xml:"host>port"`
- Extra1 interface{}
- Extra2 interface{} `xml:"host>extra2"`
-}
-
-var nilStruct *Ship
-
-type EmbedA struct {
- EmbedC
- EmbedB EmbedB
- FieldA string
-}
-
-type EmbedB struct {
- FieldB string
- *EmbedC
-}
-
-type EmbedC struct {
- FieldA1 string `xml:"FieldA>A1"`
- FieldA2 string `xml:"FieldA>A2"`
- FieldB string
- FieldC string
-}
-
-type NameCasing struct {
- XMLName struct{} `xml:"casing"`
- Xy string
- XY string
- XyA string `xml:"Xy,attr"`
- XYA string `xml:"XY,attr"`
-}
-
-type NamePrecedence struct {
- XMLName Name `xml:"Parent"`
- FromTag XMLNameWithoutTag `xml:"InTag"`
- FromNameVal XMLNameWithoutTag
- FromNameTag XMLNameWithTag
- InFieldName string
-}
-
-type XMLNameWithTag struct {
- XMLName Name `xml:"InXMLNameTag"`
- Value string `xml:",chardata"`
-}
-
-type XMLNameWithNSTag struct {
- XMLName Name `xml:"ns InXMLNameWithNSTag"`
- Value string `xml:",chardata"`
-}
-
-type XMLNameWithoutTag struct {
- XMLName Name
- Value string `xml:",chardata"`
-}
-
-type NameInField struct {
- Foo Name `xml:"ns foo"`
-}
-
-type AttrTest struct {
- Int int `xml:",attr"`
- Named int `xml:"int,attr"`
- Float float64 `xml:",attr"`
- Uint8 uint8 `xml:",attr"`
- Bool bool `xml:",attr"`
- Str string `xml:",attr"`
- Bytes []byte `xml:",attr"`
-}
-
-type OmitAttrTest struct {
- Int int `xml:",attr,omitempty"`
- Named int `xml:"int,attr,omitempty"`
- Float float64 `xml:",attr,omitempty"`
- Uint8 uint8 `xml:",attr,omitempty"`
- Bool bool `xml:",attr,omitempty"`
- Str string `xml:",attr,omitempty"`
- Bytes []byte `xml:",attr,omitempty"`
-}
-
-type OmitFieldTest struct {
- Int int `xml:",omitempty"`
- Named int `xml:"int,omitempty"`
- Float float64 `xml:",omitempty"`
- Uint8 uint8 `xml:",omitempty"`
- Bool bool `xml:",omitempty"`
- Str string `xml:",omitempty"`
- Bytes []byte `xml:",omitempty"`
- Ptr *PresenceTest `xml:",omitempty"`
-}
-
-type AnyTest struct {
- XMLName struct{} `xml:"a"`
- Nested string `xml:"nested>value"`
- AnyField AnyHolder `xml:",any"`
-}
-
-type AnyOmitTest struct {
- XMLName struct{} `xml:"a"`
- Nested string `xml:"nested>value"`
- AnyField *AnyHolder `xml:",any,omitempty"`
-}
-
-type AnySliceTest struct {
- XMLName struct{} `xml:"a"`
- Nested string `xml:"nested>value"`
- AnyField []AnyHolder `xml:",any"`
-}
-
-type AnyHolder struct {
- XMLName Name
- XML string `xml:",innerxml"`
-}
-
-type RecurseA struct {
- A string
- B *RecurseB
-}
-
-type RecurseB struct {
- A *RecurseA
- B string
-}
-
-type PresenceTest struct {
- Exists *struct{}
-}
-
-type IgnoreTest struct {
- PublicSecret string `xml:"-"`
-}
-
-type MyBytes []byte
-
-type Data struct {
- Bytes []byte
- Attr []byte `xml:",attr"`
- Custom MyBytes
-}
-
-type Plain struct {
- V interface{}
-}
-
-type MyInt int
-
-type EmbedInt struct {
- MyInt
-}
-
-type Strings struct {
- X []string `xml:"A>B,omitempty"`
-}
-
-type PointerFieldsTest struct {
- XMLName Name `xml:"dummy"`
- Name *string `xml:"name,attr"`
- Age *uint `xml:"age,attr"`
- Empty *string `xml:"empty,attr"`
- Contents *string `xml:",chardata"`
-}
-
-type ChardataEmptyTest struct {
- XMLName Name `xml:"test"`
- Contents *string `xml:",chardata"`
-}
-
-type MyMarshalerTest struct {
-}
-
-var _ Marshaler = (*MyMarshalerTest)(nil)
-
-func (m *MyMarshalerTest) MarshalXML(e *Encoder, start StartElement) error {
- e.EncodeToken(start)
- e.EncodeToken(CharData([]byte("hello world")))
- e.EncodeToken(EndElement{start.Name})
- return nil
-}
-
-type MyMarshalerAttrTest struct{}
-
-var _ MarshalerAttr = (*MyMarshalerAttrTest)(nil)
-
-func (m *MyMarshalerAttrTest) MarshalXMLAttr(name Name) (Attr, error) {
- return Attr{name, "hello world"}, nil
-}
-
-type MyMarshalerValueAttrTest struct{}
-
-var _ MarshalerAttr = MyMarshalerValueAttrTest{}
-
-func (m MyMarshalerValueAttrTest) MarshalXMLAttr(name Name) (Attr, error) {
- return Attr{name, "hello world"}, nil
-}
-
-type MarshalerStruct struct {
- Foo MyMarshalerAttrTest `xml:",attr"`
-}
-
-type MarshalerValueStruct struct {
- Foo MyMarshalerValueAttrTest `xml:",attr"`
-}
-
-type InnerStruct struct {
- XMLName Name `xml:"testns outer"`
-}
-
-type OuterStruct struct {
- InnerStruct
- IntAttr int `xml:"int,attr"`
-}
-
-type OuterNamedStruct struct {
- InnerStruct
- XMLName Name `xml:"outerns test"`
- IntAttr int `xml:"int,attr"`
-}
-
-type OuterNamedOrderedStruct struct {
- XMLName Name `xml:"outerns test"`
- InnerStruct
- IntAttr int `xml:"int,attr"`
-}
-
-type OuterOuterStruct struct {
- OuterStruct
-}
-
-type NestedAndChardata struct {
- AB []string `xml:"A>B"`
- Chardata string `xml:",chardata"`
-}
-
-type NestedAndComment struct {
- AB []string `xml:"A>B"`
- Comment string `xml:",comment"`
-}
-
-type XMLNSFieldStruct struct {
- Ns string `xml:"xmlns,attr"`
- Body string
-}
-
-type NamedXMLNSFieldStruct struct {
- XMLName struct{} `xml:"testns test"`
- Ns string `xml:"xmlns,attr"`
- Body string
-}
-
-type XMLNSFieldStructWithOmitEmpty struct {
- Ns string `xml:"xmlns,attr,omitempty"`
- Body string
-}
-
-type NamedXMLNSFieldStructWithEmptyNamespace struct {
- XMLName struct{} `xml:"test"`
- Ns string `xml:"xmlns,attr"`
- Body string
-}
-
-type RecursiveXMLNSFieldStruct struct {
- Ns string `xml:"xmlns,attr"`
- Body *RecursiveXMLNSFieldStruct `xml:",omitempty"`
- Text string `xml:",omitempty"`
-}
-
-func ifaceptr(x interface{}) interface{} {
- return &x
-}
-
-var (
- nameAttr = "Sarah"
- ageAttr = uint(12)
- contentsAttr = "lorem ipsum"
-)
-
-// Unless explicitly stated as such (or *Plain), all of the
-// tests below are two-way tests. When introducing new tests,
-// please try to make them two-way as well to ensure that
-// marshalling and unmarshalling are as symmetrical as feasible.
-var marshalTests = []struct {
- Value interface{}
- ExpectXML string
- MarshalOnly bool
- UnmarshalOnly bool
-}{
- // Test nil marshals to nothing
- {Value: nil, ExpectXML: ``, MarshalOnly: true},
- {Value: nilStruct, ExpectXML: ``, MarshalOnly: true},
-
- // Test value types
- {Value: &Plain{true}, ExpectXML: `<Plain><V>true</V></Plain>`},
- {Value: &Plain{false}, ExpectXML: `<Plain><V>false</V></Plain>`},
- {Value: &Plain{int(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{int8(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{int16(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{int32(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{uint(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{uint8(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{uint16(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{uint32(42)}, ExpectXML: `<Plain><V>42</V></Plain>`},
- {Value: &Plain{float32(1.25)}, ExpectXML: `<Plain><V>1.25</V></Plain>`},
- {Value: &Plain{float64(1.25)}, ExpectXML: `<Plain><V>1.25</V></Plain>`},
- {Value: &Plain{uintptr(0xFFDD)}, ExpectXML: `<Plain><V>65501</V></Plain>`},
- {Value: &Plain{"gopher"}, ExpectXML: `<Plain><V>gopher</V></Plain>`},
- {Value: &Plain{[]byte("gopher")}, ExpectXML: `<Plain><V>gopher</V></Plain>`},
- {Value: &Plain{"</>"}, ExpectXML: `<Plain><V>&lt;/&gt;</V></Plain>`},
- {Value: &Plain{[]byte("</>")}, ExpectXML: `<Plain><V>&lt;/&gt;</V></Plain>`},
- {Value: &Plain{[3]byte{'<', '/', '>'}}, ExpectXML: `<Plain><V>&lt;/&gt;</V></Plain>`},
- {Value: &Plain{NamedType("potato")}, ExpectXML: `<Plain><V>potato</V></Plain>`},
- {Value: &Plain{[]int{1, 2, 3}}, ExpectXML: `<Plain><V>1</V><V>2</V><V>3</V></Plain>`},
- {Value: &Plain{[3]int{1, 2, 3}}, ExpectXML: `<Plain><V>1</V><V>2</V><V>3</V></Plain>`},
- {Value: ifaceptr(true), MarshalOnly: true, ExpectXML: `<bool>true</bool>`},
-
- // Test time.
- {
- Value: &Plain{time.Unix(1e9, 123456789).UTC()},
- ExpectXML: `<Plain><V>2001-09-09T01:46:40.123456789Z</V></Plain>`,
- },
-
- // A pointer to struct{} may be used to test for an element's presence.
- {
- Value: &PresenceTest{new(struct{})},
- ExpectXML: `<PresenceTest><Exists></Exists></PresenceTest>`,
- },
- {
- Value: &PresenceTest{},
- ExpectXML: `<PresenceTest></PresenceTest>`,
- },
-
- // A pointer to struct{} may be used to test for an element's presence.
- {
- Value: &PresenceTest{new(struct{})},
- ExpectXML: `<PresenceTest><Exists></Exists></PresenceTest>`,
- },
- {
- Value: &PresenceTest{},
- ExpectXML: `<PresenceTest></PresenceTest>`,
- },
-
- // A []byte field is only nil if the element was not found.
- {
- Value: &Data{},
- ExpectXML: `<Data></Data>`,
- UnmarshalOnly: true,
- },
- {
- Value: &Data{Bytes: []byte{}, Custom: MyBytes{}, Attr: []byte{}},
- ExpectXML: `<Data Attr=""><Bytes></Bytes><Custom></Custom></Data>`,
- UnmarshalOnly: true,
- },
-
- // Check that []byte works, including named []byte types.
- {
- Value: &Data{Bytes: []byte("ab"), Custom: MyBytes("cd"), Attr: []byte{'v'}},
- ExpectXML: `<Data Attr="v"><Bytes>ab</Bytes><Custom>cd</Custom></Data>`,
- },
-
- // Test innerxml
- {
- Value: &SecretAgent{
- Handle: "007",
- Identity: "James Bond",
- Obfuscate: "<redacted/>",
- },
- ExpectXML: `<agent handle="007"><Identity>James Bond</Identity><redacted/></agent>`,
- MarshalOnly: true,
- },
- {
- Value: &SecretAgent{
- Handle: "007",
- Identity: "James Bond",
- Obfuscate: "<Identity>James Bond</Identity><redacted/>",
- },
- ExpectXML: `<agent handle="007"><Identity>James Bond</Identity><redacted/></agent>`,
- UnmarshalOnly: true,
- },
-
- // Test structs
- {Value: &Port{Type: "ssl", Number: "443"}, ExpectXML: `<port type="ssl">443</port>`},
- {Value: &Port{Number: "443"}, ExpectXML: `<port>443</port>`},
- {Value: &Port{Type: "<unix>"}, ExpectXML: `<port type="&lt;unix&gt;"></port>`},
- {Value: &Port{Number: "443", Comment: "https"}, ExpectXML: `<port><!--https-->443</port>`},
- {Value: &Port{Number: "443", Comment: "add space-"}, ExpectXML: `<port><!--add space- -->443</port>`, MarshalOnly: true},
- {Value: &Domain{Name: []byte("google.com&friends")}, ExpectXML: `<domain>google.com&amp;friends</domain>`},
- {Value: &Domain{Name: []byte("google.com"), Comment: []byte(" &friends ")}, ExpectXML: `<domain>google.com<!-- &friends --></domain>`},
- {Value: &Book{Title: "Pride & Prejudice"}, ExpectXML: `<book>Pride &amp; Prejudice</book>`},
- {Value: &Event{Year: -3114}, ExpectXML: `<event>-3114</event>`},
- {Value: &Movie{Length: 13440}, ExpectXML: `<movie>13440</movie>`},
- {Value: &Pi{Approximation: 3.14159265}, ExpectXML: `<pi>3.1415927</pi>`},
- {Value: &Universe{Visible: 9.3e13}, ExpectXML: `<universe>9.3e+13</universe>`},
- {Value: &Particle{HasMass: true}, ExpectXML: `<particle>true</particle>`},
- {Value: &Departure{When: ParseTime("2013-01-09T00:15:00-09:00")}, ExpectXML: `<departure>2013-01-09T00:15:00-09:00</departure>`},
- {Value: atomValue, ExpectXML: atomXml},
- {
- Value: &Ship{
- Name: "Heart of Gold",
- Pilot: "Computer",
- Age: 1,
- Drive: ImprobabilityDrive,
- Passenger: []*Passenger{
- {
- Name: []string{"Zaphod", "Beeblebrox"},
- Weight: 7.25,
- },
- {
- Name: []string{"Trisha", "McMillen"},
- Weight: 5.5,
- },
- {
- Name: []string{"Ford", "Prefect"},
- Weight: 7,
- },
- {
- Name: []string{"Arthur", "Dent"},
- Weight: 6.75,
- },
- },
- },
- ExpectXML: `<spaceship name="Heart of Gold" pilot="Computer">` +
- `<drive>` + strconv.Itoa(int(ImprobabilityDrive)) + `</drive>` +
- `<age>1</age>` +
- `<passenger>` +
- `<name>Zaphod</name>` +
- `<name>Beeblebrox</name>` +
- `<weight>7.25</weight>` +
- `</passenger>` +
- `<passenger>` +
- `<name>Trisha</name>` +
- `<name>McMillen</name>` +
- `<weight>5.5</weight>` +
- `</passenger>` +
- `<passenger>` +
- `<name>Ford</name>` +
- `<name>Prefect</name>` +
- `<weight>7</weight>` +
- `</passenger>` +
- `<passenger>` +
- `<name>Arthur</name>` +
- `<name>Dent</name>` +
- `<weight>6.75</weight>` +
- `</passenger>` +
- `</spaceship>`,
- },
-
- // Test a>b
- {
- Value: &NestedItems{Items: nil, Item1: nil},
- ExpectXML: `<result>` +
- `<Items>` +
- `</Items>` +
- `</result>`,
- },
- {
- Value: &NestedItems{Items: []string{}, Item1: []string{}},
- ExpectXML: `<result>` +
- `<Items>` +
- `</Items>` +
- `</result>`,
- MarshalOnly: true,
- },
- {
- Value: &NestedItems{Items: nil, Item1: []string{"A"}},
- ExpectXML: `<result>` +
- `<Items>` +
- `<item1>A</item1>` +
- `</Items>` +
- `</result>`,
- },
- {
- Value: &NestedItems{Items: []string{"A", "B"}, Item1: nil},
- ExpectXML: `<result>` +
- `<Items>` +
- `<item>A</item>` +
- `<item>B</item>` +
- `</Items>` +
- `</result>`,
- },
- {
- Value: &NestedItems{Items: []string{"A", "B"}, Item1: []string{"C"}},
- ExpectXML: `<result>` +
- `<Items>` +
- `<item>A</item>` +
- `<item>B</item>` +
- `<item1>C</item1>` +
- `</Items>` +
- `</result>`,
- },
- {
- Value: &NestedOrder{Field1: "C", Field2: "B", Field3: "A"},
- ExpectXML: `<result>` +
- `<parent>` +
- `<c>C</c>` +
- `<b>B</b>` +
- `<a>A</a>` +
- `</parent>` +
- `</result>`,
- },
- {
- Value: &NilTest{A: "A", B: nil, C: "C"},
- ExpectXML: `<NilTest>` +
- `<parent1>` +
- `<parent2><a>A</a></parent2>` +
- `<parent2><c>C</c></parent2>` +
- `</parent1>` +
- `</NilTest>`,
- MarshalOnly: true, // Uses interface{}
- },
- {
- Value: &MixedNested{A: "A", B: "B", C: "C", D: "D"},
- ExpectXML: `<result>` +
- `<parent1><a>A</a></parent1>` +
- `<b>B</b>` +
- `<parent1>` +
- `<parent2><c>C</c></parent2>` +
- `<d>D</d>` +
- `</parent1>` +
- `</result>`,
- },
- {
- Value: &Service{Port: &Port{Number: "80"}},
- ExpectXML: `<service><host><port>80</port></host></service>`,
- },
- {
- Value: &Service{},
- ExpectXML: `<service></service>`,
- },
- {
- Value: &Service{Port: &Port{Number: "80"}, Extra1: "A", Extra2: "B"},
- ExpectXML: `<service>` +
- `<host><port>80</port></host>` +
- `<Extra1>A</Extra1>` +
- `<host><extra2>B</extra2></host>` +
- `</service>`,
- MarshalOnly: true,
- },
- {
- Value: &Service{Port: &Port{Number: "80"}, Extra2: "example"},
- ExpectXML: `<service>` +
- `<host><port>80</port></host>` +
- `<host><extra2>example</extra2></host>` +
- `</service>`,
- MarshalOnly: true,
- },
- {
- Value: &struct {
- XMLName struct{} `xml:"space top"`
- A string `xml:"x>a"`
- B string `xml:"x>b"`
- C string `xml:"space x>c"`
- C1 string `xml:"space1 x>c"`
- D1 string `xml:"space1 x>d"`
- E1 string `xml:"x>e"`
- }{
- A: "a",
- B: "b",
- C: "c",
- C1: "c1",
- D1: "d1",
- E1: "e1",
- },
- ExpectXML: `<top xmlns="space">` +
- `<x><a>a</a><b>b</b><c>c</c></x>` +
- `<x xmlns="space1">` +
- `<c>c1</c>` +
- `<d>d1</d>` +
- `</x>` +
- `<x>` +
- `<e>e1</e>` +
- `</x>` +
- `</top>`,
- },
- {
- Value: &struct {
- XMLName Name
- A string `xml:"x>a"`
- B string `xml:"x>b"`
- C string `xml:"space x>c"`
- C1 string `xml:"space1 x>c"`
- D1 string `xml:"space1 x>d"`
- }{
- XMLName: Name{
- Space: "space0",
- Local: "top",
- },
- A: "a",
- B: "b",
- C: "c",
- C1: "c1",
- D1: "d1",
- },
- ExpectXML: `<top xmlns="space0">` +
- `<x><a>a</a><b>b</b></x>` +
- `<x xmlns="space"><c>c</c></x>` +
- `<x xmlns="space1">` +
- `<c>c1</c>` +
- `<d>d1</d>` +
- `</x>` +
- `</top>`,
- },
- {
- Value: &struct {
- XMLName struct{} `xml:"top"`
- B string `xml:"space x>b"`
- B1 string `xml:"space1 x>b"`
- }{
- B: "b",
- B1: "b1",
- },
- ExpectXML: `<top>` +
- `<x xmlns="space"><b>b</b></x>` +
- `<x xmlns="space1"><b>b1</b></x>` +
- `</top>`,
- },
-
- // Test struct embedding
- {
- Value: &EmbedA{
- EmbedC: EmbedC{
- FieldA1: "", // Shadowed by A.A
- FieldA2: "", // Shadowed by A.A
- FieldB: "A.C.B",
- FieldC: "A.C.C",
- },
- EmbedB: EmbedB{
- FieldB: "A.B.B",
- EmbedC: &EmbedC{
- FieldA1: "A.B.C.A1",
- FieldA2: "A.B.C.A2",
- FieldB: "", // Shadowed by A.B.B
- FieldC: "A.B.C.C",
- },
- },
- FieldA: "A.A",
- },
- ExpectXML: `<EmbedA>` +
- `<FieldB>A.C.B</FieldB>` +
- `<FieldC>A.C.C</FieldC>` +
- `<EmbedB>` +
- `<FieldB>A.B.B</FieldB>` +
- `<FieldA>` +
- `<A1>A.B.C.A1</A1>` +
- `<A2>A.B.C.A2</A2>` +
- `</FieldA>` +
- `<FieldC>A.B.C.C</FieldC>` +
- `</EmbedB>` +
- `<FieldA>A.A</FieldA>` +
- `</EmbedA>`,
- },
-
- // Test that name casing matters
- {
- Value: &NameCasing{Xy: "mixed", XY: "upper", XyA: "mixedA", XYA: "upperA"},
- ExpectXML: `<casing Xy="mixedA" XY="upperA"><Xy>mixed</Xy><XY>upper</XY></casing>`,
- },
-
- // Test the order in which the XML element name is chosen
- {
- Value: &NamePrecedence{
- FromTag: XMLNameWithoutTag{Value: "A"},
- FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "InXMLName"}, Value: "B"},
- FromNameTag: XMLNameWithTag{Value: "C"},
- InFieldName: "D",
- },
- ExpectXML: `<Parent>` +
- `<InTag>A</InTag>` +
- `<InXMLName>B</InXMLName>` +
- `<InXMLNameTag>C</InXMLNameTag>` +
- `<InFieldName>D</InFieldName>` +
- `</Parent>`,
- MarshalOnly: true,
- },
- {
- Value: &NamePrecedence{
- XMLName: Name{Local: "Parent"},
- FromTag: XMLNameWithoutTag{XMLName: Name{Local: "InTag"}, Value: "A"},
- FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "FromNameVal"}, Value: "B"},
- FromNameTag: XMLNameWithTag{XMLName: Name{Local: "InXMLNameTag"}, Value: "C"},
- InFieldName: "D",
- },
- ExpectXML: `<Parent>` +
- `<InTag>A</InTag>` +
- `<FromNameVal>B</FromNameVal>` +
- `<InXMLNameTag>C</InXMLNameTag>` +
- `<InFieldName>D</InFieldName>` +
- `</Parent>`,
- UnmarshalOnly: true,
- },
-
- // xml.Name works in a plain field as well.
- {
- Value: &NameInField{Name{Space: "ns", Local: "foo"}},
- ExpectXML: `<NameInField><foo xmlns="ns"></foo></NameInField>`,
- },
- {
- Value: &NameInField{Name{Space: "ns", Local: "foo"}},
- ExpectXML: `<NameInField><foo xmlns="ns"><ignore></ignore></foo></NameInField>`,
- UnmarshalOnly: true,
- },
-
- // Marshaling zero xml.Name uses the tag or field name.
- {
- Value: &NameInField{},
- ExpectXML: `<NameInField><foo xmlns="ns"></foo></NameInField>`,
- MarshalOnly: true,
- },
-
- // Test attributes
- {
- Value: &AttrTest{
- Int: 8,
- Named: 9,
- Float: 23.5,
- Uint8: 255,
- Bool: true,
- Str: "str",
- Bytes: []byte("byt"),
- },
- ExpectXML: `<AttrTest Int="8" int="9" Float="23.5" Uint8="255"` +
- ` Bool="true" Str="str" Bytes="byt"></AttrTest>`,
- },
- {
- Value: &AttrTest{Bytes: []byte{}},
- ExpectXML: `<AttrTest Int="0" int="0" Float="0" Uint8="0"` +
- ` Bool="false" Str="" Bytes=""></AttrTest>`,
- },
- {
- Value: &OmitAttrTest{
- Int: 8,
- Named: 9,
- Float: 23.5,
- Uint8: 255,
- Bool: true,
- Str: "str",
- Bytes: []byte("byt"),
- },
- ExpectXML: `<OmitAttrTest Int="8" int="9" Float="23.5" Uint8="255"` +
- ` Bool="true" Str="str" Bytes="byt"></OmitAttrTest>`,
- },
- {
- Value: &OmitAttrTest{},
- ExpectXML: `<OmitAttrTest></OmitAttrTest>`,
- },
-
- // pointer fields
- {
- Value: &PointerFieldsTest{Name: &nameAttr, Age: &ageAttr, Contents: &contentsAttr},
- ExpectXML: `<dummy name="Sarah" age="12">lorem ipsum</dummy>`,
- MarshalOnly: true,
- },
-
- // empty chardata pointer field
- {
- Value: &ChardataEmptyTest{},
- ExpectXML: `<test></test>`,
- MarshalOnly: true,
- },
-
- // omitempty on fields
- {
- Value: &OmitFieldTest{
- Int: 8,
- Named: 9,
- Float: 23.5,
- Uint8: 255,
- Bool: true,
- Str: "str",
- Bytes: []byte("byt"),
- Ptr: &PresenceTest{},
- },
- ExpectXML: `<OmitFieldTest>` +
- `<Int>8</Int>` +
- `<int>9</int>` +
- `<Float>23.5</Float>` +
- `<Uint8>255</Uint8>` +
- `<Bool>true</Bool>` +
- `<Str>str</Str>` +
- `<Bytes>byt</Bytes>` +
- `<Ptr></Ptr>` +
- `</OmitFieldTest>`,
- },
- {
- Value: &OmitFieldTest{},
- ExpectXML: `<OmitFieldTest></OmitFieldTest>`,
- },
-
- // Test ",any"
- {
- ExpectXML: `<a><nested><value>known</value></nested><other><sub>unknown</sub></other></a>`,
- Value: &AnyTest{
- Nested: "known",
- AnyField: AnyHolder{
- XMLName: Name{Local: "other"},
- XML: "<sub>unknown</sub>",
- },
- },
- },
- {
- Value: &AnyTest{Nested: "known",
- AnyField: AnyHolder{
- XML: "<unknown/>",
- XMLName: Name{Local: "AnyField"},
- },
- },
- ExpectXML: `<a><nested><value>known</value></nested><AnyField><unknown/></AnyField></a>`,
- },
- {
- ExpectXML: `<a><nested><value>b</value></nested></a>`,
- Value: &AnyOmitTest{
- Nested: "b",
- },
- },
- {
- ExpectXML: `<a><nested><value>b</value></nested><c><d>e</d></c><g xmlns="f"><h>i</h></g></a>`,
- Value: &AnySliceTest{
- Nested: "b",
- AnyField: []AnyHolder{
- {
- XMLName: Name{Local: "c"},
- XML: "<d>e</d>",
- },
- {
- XMLName: Name{Space: "f", Local: "g"},
- XML: "<h>i</h>",
- },
- },
- },
- },
- {
- ExpectXML: `<a><nested><value>b</value></nested></a>`,
- Value: &AnySliceTest{
- Nested: "b",
- },
- },
-
- // Test recursive types.
- {
- Value: &RecurseA{
- A: "a1",
- B: &RecurseB{
- A: &RecurseA{"a2", nil},
- B: "b1",
- },
- },
- ExpectXML: `<RecurseA><A>a1</A><B><A><A>a2</A></A><B>b1</B></B></RecurseA>`,
- },
-
- // Test ignoring fields via "-" tag
- {
- ExpectXML: `<IgnoreTest></IgnoreTest>`,
- Value: &IgnoreTest{},
- },
- {
- ExpectXML: `<IgnoreTest></IgnoreTest>`,
- Value: &IgnoreTest{PublicSecret: "can't tell"},
- MarshalOnly: true,
- },
- {
- ExpectXML: `<IgnoreTest><PublicSecret>ignore me</PublicSecret></IgnoreTest>`,
- Value: &IgnoreTest{},
- UnmarshalOnly: true,
- },
-
- // Test escaping.
- {
- ExpectXML: `<a><nested><value>dquote: &#34;; squote: &#39;; ampersand: &amp;; less: &lt;; greater: &gt;;</value></nested><empty></empty></a>`,
- Value: &AnyTest{
- Nested: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`,
- AnyField: AnyHolder{XMLName: Name{Local: "empty"}},
- },
- },
- {
- ExpectXML: `<a><nested><value>newline: &#xA;; cr: &#xD;; tab: &#x9;;</value></nested><AnyField></AnyField></a>`,
- Value: &AnyTest{
- Nested: "newline: \n; cr: \r; tab: \t;",
- AnyField: AnyHolder{XMLName: Name{Local: "AnyField"}},
- },
- },
- {
- ExpectXML: "<a><nested><value>1\r2\r\n3\n\r4\n5</value></nested></a>",
- Value: &AnyTest{
- Nested: "1\n2\n3\n\n4\n5",
- },
- UnmarshalOnly: true,
- },
- {
- ExpectXML: `<EmbedInt><MyInt>42</MyInt></EmbedInt>`,
- Value: &EmbedInt{
- MyInt: 42,
- },
- },
- // Test omitempty with parent chain; see golang.org/issue/4168.
- {
- ExpectXML: `<Strings><A></A></Strings>`,
- Value: &Strings{},
- },
- // Custom marshalers.
- {
- ExpectXML: `<MyMarshalerTest>hello world</MyMarshalerTest>`,
- Value: &MyMarshalerTest{},
- },
- {
- ExpectXML: `<MarshalerStruct Foo="hello world"></MarshalerStruct>`,
- Value: &MarshalerStruct{},
- },
- {
- ExpectXML: `<MarshalerValueStruct Foo="hello world"></MarshalerValueStruct>`,
- Value: &MarshalerValueStruct{},
- },
- {
- ExpectXML: `<outer xmlns="testns" int="10"></outer>`,
- Value: &OuterStruct{IntAttr: 10},
- },
- {
- ExpectXML: `<test xmlns="outerns" int="10"></test>`,
- Value: &OuterNamedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10},
- },
- {
- ExpectXML: `<test xmlns="outerns" int="10"></test>`,
- Value: &OuterNamedOrderedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10},
- },
- {
- ExpectXML: `<outer xmlns="testns" int="10"></outer>`,
- Value: &OuterOuterStruct{OuterStruct{IntAttr: 10}},
- },
- {
- ExpectXML: `<NestedAndChardata><A><B></B><B></B></A>test</NestedAndChardata>`,
- Value: &NestedAndChardata{AB: make([]string, 2), Chardata: "test"},
- },
- {
- ExpectXML: `<NestedAndComment><A><B></B><B></B></A><!--test--></NestedAndComment>`,
- Value: &NestedAndComment{AB: make([]string, 2), Comment: "test"},
- },
- {
- ExpectXML: `<XMLNSFieldStruct xmlns="http://example.com/ns"><Body>hello world</Body></XMLNSFieldStruct>`,
- Value: &XMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"},
- },
- {
- ExpectXML: `<testns:test xmlns:testns="testns" xmlns="http://example.com/ns"><Body>hello world</Body></testns:test>`,
- Value: &NamedXMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"},
- },
- {
- ExpectXML: `<testns:test xmlns:testns="testns"><Body>hello world</Body></testns:test>`,
- Value: &NamedXMLNSFieldStruct{Ns: "", Body: "hello world"},
- },
- {
- ExpectXML: `<XMLNSFieldStructWithOmitEmpty><Body>hello world</Body></XMLNSFieldStructWithOmitEmpty>`,
- Value: &XMLNSFieldStructWithOmitEmpty{Body: "hello world"},
- },
- {
- // The xmlns attribute must be ignored because the <test>
- // element is in the empty namespace, so it's not possible
- // to set the default namespace to something non-empty.
- ExpectXML: `<test><Body>hello world</Body></test>`,
- Value: &NamedXMLNSFieldStructWithEmptyNamespace{Ns: "foo", Body: "hello world"},
- MarshalOnly: true,
- },
- {
- ExpectXML: `<RecursiveXMLNSFieldStruct xmlns="foo"><Body xmlns=""><Text>hello world</Text></Body></RecursiveXMLNSFieldStruct>`,
- Value: &RecursiveXMLNSFieldStruct{
- Ns: "foo",
- Body: &RecursiveXMLNSFieldStruct{
- Text: "hello world",
- },
- },
- },
-}
-
-func TestMarshal(t *testing.T) {
- for idx, test := range marshalTests {
- if test.UnmarshalOnly {
- continue
- }
- data, err := Marshal(test.Value)
- if err != nil {
- t.Errorf("#%d: marshal(%#v): %s", idx, test.Value, err)
- continue
- }
- if got, want := string(data), test.ExpectXML; got != want {
- if strings.Contains(want, "\n") {
- t.Errorf("#%d: marshal(%#v):\nHAVE:\n%s\nWANT:\n%s", idx, test.Value, got, want)
- } else {
- t.Errorf("#%d: marshal(%#v):\nhave %#q\nwant %#q", idx, test.Value, got, want)
- }
- }
- }
-}
-
-type AttrParent struct {
- X string `xml:"X>Y,attr"`
-}
-
-type BadAttr struct {
- Name []string `xml:"name,attr"`
-}
-
-var marshalErrorTests = []struct {
- Value interface{}
- Err string
- Kind reflect.Kind
-}{
- {
- Value: make(chan bool),
- Err: "xml: unsupported type: chan bool",
- Kind: reflect.Chan,
- },
- {
- Value: map[string]string{
- "question": "What do you get when you multiply six by nine?",
- "answer": "42",
- },
- Err: "xml: unsupported type: map[string]string",
- Kind: reflect.Map,
- },
- {
- Value: map[*Ship]bool{nil: false},
- Err: "xml: unsupported type: map[*xml.Ship]bool",
- Kind: reflect.Map,
- },
- {
- Value: &Domain{Comment: []byte("f--bar")},
- Err: `xml: comments must not contain "--"`,
- },
- // Reject parent chain with attr, never worked; see golang.org/issue/5033.
- {
- Value: &AttrParent{},
- Err: `xml: X>Y chain not valid with attr flag`,
- },
- {
- Value: BadAttr{[]string{"X", "Y"}},
- Err: `xml: unsupported type: []string`,
- },
-}
-
-var marshalIndentTests = []struct {
- Value interface{}
- Prefix string
- Indent string
- ExpectXML string
-}{
- {
- Value: &SecretAgent{
- Handle: "007",
- Identity: "James Bond",
- Obfuscate: "<redacted/>",
- },
- Prefix: "",
- Indent: "\t",
- ExpectXML: fmt.Sprintf("<agent handle=\"007\">\n\t<Identity>James Bond</Identity><redacted/>\n</agent>"),
- },
-}
-
-func TestMarshalErrors(t *testing.T) {
- for idx, test := range marshalErrorTests {
- data, err := Marshal(test.Value)
- if err == nil {
- t.Errorf("#%d: marshal(%#v) = [success] %q, want error %v", idx, test.Value, data, test.Err)
- continue
- }
- if err.Error() != test.Err {
- t.Errorf("#%d: marshal(%#v) = [error] %v, want %v", idx, test.Value, err, test.Err)
- }
- if test.Kind != reflect.Invalid {
- if kind := err.(*UnsupportedTypeError).Type.Kind(); kind != test.Kind {
- t.Errorf("#%d: marshal(%#v) = [error kind] %s, want %s", idx, test.Value, kind, test.Kind)
- }
- }
- }
-}
-
-// Do invertibility testing on the various structures that we test
-func TestUnmarshal(t *testing.T) {
- for i, test := range marshalTests {
- if test.MarshalOnly {
- continue
- }
- if _, ok := test.Value.(*Plain); ok {
- continue
- }
- vt := reflect.TypeOf(test.Value)
- dest := reflect.New(vt.Elem()).Interface()
- err := Unmarshal([]byte(test.ExpectXML), dest)
-
- switch fix := dest.(type) {
- case *Feed:
- fix.Author.InnerXML = ""
- for i := range fix.Entry {
- fix.Entry[i].Author.InnerXML = ""
- }
- }
-
- if err != nil {
- t.Errorf("#%d: unexpected error: %#v", i, err)
- } else if got, want := dest, test.Value; !reflect.DeepEqual(got, want) {
- t.Errorf("#%d: unmarshal(%q):\nhave %#v\nwant %#v", i, test.ExpectXML, got, want)
- }
- }
-}
-
-func TestMarshalIndent(t *testing.T) {
- for i, test := range marshalIndentTests {
- data, err := MarshalIndent(test.Value, test.Prefix, test.Indent)
- if err != nil {
- t.Errorf("#%d: Error: %s", i, err)
- continue
- }
- if got, want := string(data), test.ExpectXML; got != want {
- t.Errorf("#%d: MarshalIndent:\nGot:%s\nWant:\n%s", i, got, want)
- }
- }
-}
-
-type limitedBytesWriter struct {
- w io.Writer
- remain int // until writes fail
-}
-
-func (lw *limitedBytesWriter) Write(p []byte) (n int, err error) {
- if lw.remain <= 0 {
- println("error")
- return 0, errors.New("write limit hit")
- }
- if len(p) > lw.remain {
- p = p[:lw.remain]
- n, _ = lw.w.Write(p)
- lw.remain = 0
- return n, errors.New("write limit hit")
- }
- n, err = lw.w.Write(p)
- lw.remain -= n
- return n, err
-}
-
-func TestMarshalWriteErrors(t *testing.T) {
- var buf bytes.Buffer
- const writeCap = 1024
- w := &limitedBytesWriter{&buf, writeCap}
- enc := NewEncoder(w)
- var err error
- var i int
- const n = 4000
- for i = 1; i <= n; i++ {
- err = enc.Encode(&Passenger{
- Name: []string{"Alice", "Bob"},
- Weight: 5,
- })
- if err != nil {
- break
- }
- }
- if err == nil {
- t.Error("expected an error")
- }
- if i == n {
- t.Errorf("expected to fail before the end")
- }
- if buf.Len() != writeCap {
- t.Errorf("buf.Len() = %d; want %d", buf.Len(), writeCap)
- }
-}
-
-func TestMarshalWriteIOErrors(t *testing.T) {
- enc := NewEncoder(errWriter{})
-
- expectErr := "unwritable"
- err := enc.Encode(&Passenger{})
- if err == nil || err.Error() != expectErr {
- t.Errorf("EscapeTest = [error] %v, want %v", err, expectErr)
- }
-}
-
-func TestMarshalFlush(t *testing.T) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- if err := enc.EncodeToken(CharData("hello world")); err != nil {
- t.Fatalf("enc.EncodeToken: %v", err)
- }
- if buf.Len() > 0 {
- t.Fatalf("enc.EncodeToken caused actual write: %q", buf.Bytes())
- }
- if err := enc.Flush(); err != nil {
- t.Fatalf("enc.Flush: %v", err)
- }
- if buf.String() != "hello world" {
- t.Fatalf("after enc.Flush, buf.String() = %q, want %q", buf.String(), "hello world")
- }
-}
-
-var encodeElementTests = []struct {
- desc string
- value interface{}
- start StartElement
- expectXML string
-}{{
- desc: "simple string",
- value: "hello",
- start: StartElement{
- Name: Name{Local: "a"},
- },
- expectXML: `<a>hello</a>`,
-}, {
- desc: "string with added attributes",
- value: "hello",
- start: StartElement{
- Name: Name{Local: "a"},
- Attr: []Attr{{
- Name: Name{Local: "x"},
- Value: "y",
- }, {
- Name: Name{Local: "foo"},
- Value: "bar",
- }},
- },
- expectXML: `<a x="y" foo="bar">hello</a>`,
-}, {
- desc: "start element with default name space",
- value: struct {
- Foo XMLNameWithNSTag
- }{
- Foo: XMLNameWithNSTag{
- Value: "hello",
- },
- },
- start: StartElement{
- Name: Name{Space: "ns", Local: "a"},
- Attr: []Attr{{
- Name: Name{Local: "xmlns"},
- // "ns" is the name space defined in XMLNameWithNSTag
- Value: "ns",
- }},
- },
- expectXML: `<a xmlns="ns"><InXMLNameWithNSTag>hello</InXMLNameWithNSTag></a>`,
-}, {
- desc: "start element in name space with different default name space",
- value: struct {
- Foo XMLNameWithNSTag
- }{
- Foo: XMLNameWithNSTag{
- Value: "hello",
- },
- },
- start: StartElement{
- Name: Name{Space: "ns2", Local: "a"},
- Attr: []Attr{{
- Name: Name{Local: "xmlns"},
- // "ns" is the name space defined in XMLNameWithNSTag
- Value: "ns",
- }},
- },
- expectXML: `<ns2:a xmlns:ns2="ns2" xmlns="ns"><InXMLNameWithNSTag>hello</InXMLNameWithNSTag></ns2:a>`,
-}, {
- desc: "XMLMarshaler with start element with default name space",
- value: &MyMarshalerTest{},
- start: StartElement{
- Name: Name{Space: "ns2", Local: "a"},
- Attr: []Attr{{
- Name: Name{Local: "xmlns"},
- // "ns" is the name space defined in XMLNameWithNSTag
- Value: "ns",
- }},
- },
- expectXML: `<ns2:a xmlns:ns2="ns2" xmlns="ns">hello world</ns2:a>`,
-}}
-
-func TestEncodeElement(t *testing.T) {
- for idx, test := range encodeElementTests {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- err := enc.EncodeElement(test.value, test.start)
- if err != nil {
- t.Fatalf("enc.EncodeElement: %v", err)
- }
- err = enc.Flush()
- if err != nil {
- t.Fatalf("enc.Flush: %v", err)
- }
- if got, want := buf.String(), test.expectXML; got != want {
- t.Errorf("#%d(%s): EncodeElement(%#v, %#v):\nhave %#q\nwant %#q", idx, test.desc, test.value, test.start, got, want)
- }
- }
-}
-
-func BenchmarkMarshal(b *testing.B) {
- b.ReportAllocs()
- for i := 0; i < b.N; i++ {
- Marshal(atomValue)
- }
-}
-
-func BenchmarkUnmarshal(b *testing.B) {
- b.ReportAllocs()
- xml := []byte(atomXml)
- for i := 0; i < b.N; i++ {
- Unmarshal(xml, &Feed{})
- }
-}
-
-// golang.org/issue/6556
-func TestStructPointerMarshal(t *testing.T) {
- type A struct {
- XMLName string `xml:"a"`
- B []interface{}
- }
- type C struct {
- XMLName Name
- Value string `xml:"value"`
- }
-
- a := new(A)
- a.B = append(a.B, &C{
- XMLName: Name{Local: "c"},
- Value: "x",
- })
-
- b, err := Marshal(a)
- if err != nil {
- t.Fatal(err)
- }
- if x := string(b); x != "<a><c><value>x</value></c></a>" {
- t.Fatal(x)
- }
- var v A
- err = Unmarshal(b, &v)
- if err != nil {
- t.Fatal(err)
- }
-}
-
-var encodeTokenTests = []struct {
- desc string
- toks []Token
- want string
- err string
-}{{
- desc: "start element with name space",
- toks: []Token{
- StartElement{Name{"space", "local"}, nil},
- },
- want: `<space:local xmlns:space="space">`,
-}, {
- desc: "start element with no name",
- toks: []Token{
- StartElement{Name{"space", ""}, nil},
- },
- err: "xml: start tag with no name",
-}, {
- desc: "end element with no name",
- toks: []Token{
- EndElement{Name{"space", ""}},
- },
- err: "xml: end tag with no name",
-}, {
- desc: "char data",
- toks: []Token{
- CharData("foo"),
- },
- want: `foo`,
-}, {
- desc: "char data with escaped chars",
- toks: []Token{
- CharData(" \t\n"),
- },
- want: " &#x9;\n",
-}, {
- desc: "comment",
- toks: []Token{
- Comment("foo"),
- },
- want: `<!--foo-->`,
-}, {
- desc: "comment with invalid content",
- toks: []Token{
- Comment("foo-->"),
- },
- err: "xml: EncodeToken of Comment containing --> marker",
-}, {
- desc: "proc instruction",
- toks: []Token{
- ProcInst{"Target", []byte("Instruction")},
- },
- want: `<?Target Instruction?>`,
-}, {
- desc: "proc instruction with empty target",
- toks: []Token{
- ProcInst{"", []byte("Instruction")},
- },
- err: "xml: EncodeToken of ProcInst with invalid Target",
-}, {
- desc: "proc instruction with bad content",
- toks: []Token{
- ProcInst{"", []byte("Instruction?>")},
- },
- err: "xml: EncodeToken of ProcInst with invalid Target",
-}, {
- desc: "directive",
- toks: []Token{
- Directive("foo"),
- },
- want: `<!foo>`,
-}, {
- desc: "more complex directive",
- toks: []Token{
- Directive("DOCTYPE doc [ <!ELEMENT doc '>'> <!-- com>ment --> ]"),
- },
- want: `<!DOCTYPE doc [ <!ELEMENT doc '>'> <!-- com>ment --> ]>`,
-}, {
- desc: "directive instruction with bad name",
- toks: []Token{
- Directive("foo>"),
- },
- err: "xml: EncodeToken of Directive containing wrong < or > markers",
-}, {
- desc: "end tag without start tag",
- toks: []Token{
- EndElement{Name{"foo", "bar"}},
- },
- err: "xml: end tag </bar> without start tag",
-}, {
- desc: "mismatching end tag local name",
- toks: []Token{
- StartElement{Name{"", "foo"}, nil},
- EndElement{Name{"", "bar"}},
- },
- err: "xml: end tag </bar> does not match start tag <foo>",
- want: `<foo>`,
-}, {
- desc: "mismatching end tag namespace",
- toks: []Token{
- StartElement{Name{"space", "foo"}, nil},
- EndElement{Name{"another", "foo"}},
- },
- err: "xml: end tag </foo> in namespace another does not match start tag <foo> in namespace space",
- want: `<space:foo xmlns:space="space">`,
-}, {
- desc: "start element with explicit namespace",
- toks: []Token{
- StartElement{Name{"space", "local"}, []Attr{
- {Name{"xmlns", "x"}, "space"},
- {Name{"space", "foo"}, "value"},
- }},
- },
- want: `<x:local xmlns:x="space" x:foo="value">`,
-}, {
- desc: "start element with explicit namespace and colliding prefix",
- toks: []Token{
- StartElement{Name{"space", "local"}, []Attr{
- {Name{"xmlns", "x"}, "space"},
- {Name{"space", "foo"}, "value"},
- {Name{"x", "bar"}, "other"},
- }},
- },
- want: `<x:local xmlns:x_1="x" xmlns:x="space" x:foo="value" x_1:bar="other">`,
-}, {
- desc: "start element using previously defined namespace",
- toks: []Token{
- StartElement{Name{"", "local"}, []Attr{
- {Name{"xmlns", "x"}, "space"},
- }},
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"space", "x"}, "y"},
- }},
- },
- want: `<local xmlns:x="space"><x:foo x:x="y">`,
-}, {
- desc: "nested name space with same prefix",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"xmlns", "x"}, "space1"},
- }},
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"xmlns", "x"}, "space2"},
- }},
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"space1", "a"}, "space1 value"},
- {Name{"space2", "b"}, "space2 value"},
- }},
- EndElement{Name{"", "foo"}},
- EndElement{Name{"", "foo"}},
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"space1", "a"}, "space1 value"},
- {Name{"space2", "b"}, "space2 value"},
- }},
- },
- want: `<foo xmlns:x="space1"><foo xmlns:x="space2"><foo xmlns:space1="space1" space1:a="space1 value" x:b="space2 value"></foo></foo><foo xmlns:space2="space2" x:a="space1 value" space2:b="space2 value">`,
-}, {
- desc: "start element defining several prefixes for the same name space",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"xmlns", "a"}, "space"},
- {Name{"xmlns", "b"}, "space"},
- {Name{"space", "x"}, "value"},
- }},
- },
- want: `<a:foo xmlns:a="space" a:x="value">`,
-}, {
- desc: "nested element redefines name space",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"xmlns", "x"}, "space"},
- }},
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"xmlns", "y"}, "space"},
- {Name{"space", "a"}, "value"},
- }},
- },
- want: `<foo xmlns:x="space"><x:foo x:a="value">`,
-}, {
- desc: "nested element creates alias for default name space",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- }},
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"xmlns", "y"}, "space"},
- {Name{"space", "a"}, "value"},
- }},
- },
- want: `<foo xmlns="space"><foo xmlns:y="space" y:a="value">`,
-}, {
- desc: "nested element defines default name space with existing prefix",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"xmlns", "x"}, "space"},
- }},
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- {Name{"space", "a"}, "value"},
- }},
- },
- want: `<foo xmlns:x="space"><foo xmlns="space" x:a="value">`,
-}, {
- desc: "nested element uses empty attribute name space when default ns defined",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- }},
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "attr"}, "value"},
- }},
- },
- want: `<foo xmlns="space"><foo attr="value">`,
-}, {
- desc: "redefine xmlns",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"foo", "xmlns"}, "space"},
- }},
- },
- err: `xml: cannot redefine xmlns attribute prefix`,
-}, {
- desc: "xmlns with explicit name space #1",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"xml", "xmlns"}, "space"},
- }},
- },
- want: `<foo xmlns="space">`,
-}, {
- desc: "xmlns with explicit name space #2",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{xmlURL, "xmlns"}, "space"},
- }},
- },
- want: `<foo xmlns="space">`,
-}, {
- desc: "empty name space declaration is ignored",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"xmlns", "foo"}, ""},
- }},
- },
- want: `<foo>`,
-}, {
- desc: "attribute with no name is ignored",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"", ""}, "value"},
- }},
- },
- want: `<foo>`,
-}, {
- desc: "namespace URL with non-valid name",
- toks: []Token{
- StartElement{Name{"/34", "foo"}, []Attr{
- {Name{"/34", "x"}, "value"},
- }},
- },
- want: `<_:foo xmlns:_="/34" _:x="value">`,
-}, {
- desc: "nested element resets default namespace to empty",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- }},
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"", "xmlns"}, ""},
- {Name{"", "x"}, "value"},
- {Name{"space", "x"}, "value"},
- }},
- },
- want: `<foo xmlns="space"><foo xmlns:space="space" xmlns="" x="value" space:x="value">`,
-}, {
- desc: "nested element requires empty default name space",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- }},
- StartElement{Name{"", "foo"}, nil},
- },
- want: `<foo xmlns="space"><foo xmlns="">`,
-}, {
- desc: "attribute uses name space from xmlns",
- toks: []Token{
- StartElement{Name{"some/space", "foo"}, []Attr{
- {Name{"", "attr"}, "value"},
- {Name{"some/space", "other"}, "other value"},
- }},
- },
- want: `<space:foo xmlns:space="some/space" attr="value" space:other="other value">`,
-}, {
- desc: "default name space should not be used by attributes",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- {Name{"xmlns", "bar"}, "space"},
- {Name{"space", "baz"}, "foo"},
- }},
- StartElement{Name{"space", "baz"}, nil},
- EndElement{Name{"space", "baz"}},
- EndElement{Name{"space", "foo"}},
- },
- want: `<foo xmlns:bar="space" xmlns="space" bar:baz="foo"><baz></baz></foo>`,
-}, {
- desc: "default name space not used by attributes, not explicitly defined",
- toks: []Token{
- StartElement{Name{"space", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- {Name{"space", "baz"}, "foo"},
- }},
- StartElement{Name{"space", "baz"}, nil},
- EndElement{Name{"space", "baz"}},
- EndElement{Name{"space", "foo"}},
- },
- want: `<foo xmlns:space="space" xmlns="space" space:baz="foo"><baz></baz></foo>`,
-}, {
- desc: "impossible xmlns declaration",
- toks: []Token{
- StartElement{Name{"", "foo"}, []Attr{
- {Name{"", "xmlns"}, "space"},
- }},
- StartElement{Name{"space", "bar"}, []Attr{
- {Name{"space", "attr"}, "value"},
- }},
- },
- want: `<foo><space:bar xmlns:space="space" space:attr="value">`,
-}}
-
-func TestEncodeToken(t *testing.T) {
-loop:
- for i, tt := range encodeTokenTests {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- var err error
- for j, tok := range tt.toks {
- err = enc.EncodeToken(tok)
- if err != nil && j < len(tt.toks)-1 {
- t.Errorf("#%d %s token #%d: %v", i, tt.desc, j, err)
- continue loop
- }
- }
- errorf := func(f string, a ...interface{}) {
- t.Errorf("#%d %s token #%d:%s", i, tt.desc, len(tt.toks)-1, fmt.Sprintf(f, a...))
- }
- switch {
- case tt.err != "" && err == nil:
- errorf(" expected error; got none")
- continue
- case tt.err == "" && err != nil:
- errorf(" got error: %v", err)
- continue
- case tt.err != "" && err != nil && tt.err != err.Error():
- errorf(" error mismatch; got %v, want %v", err, tt.err)
- continue
- }
- if err := enc.Flush(); err != nil {
- errorf(" %v", err)
- continue
- }
- if got := buf.String(); got != tt.want {
- errorf("\ngot %v\nwant %v", got, tt.want)
- continue
- }
- }
-}
-
-func TestProcInstEncodeToken(t *testing.T) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
-
- if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err != nil {
- t.Fatalf("enc.EncodeToken: expected to be able to encode xml target ProcInst as first token, %s", err)
- }
-
- if err := enc.EncodeToken(ProcInst{"Target", []byte("Instruction")}); err != nil {
- t.Fatalf("enc.EncodeToken: expected to be able to add non-xml target ProcInst")
- }
-
- if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err == nil {
- t.Fatalf("enc.EncodeToken: expected to not be allowed to encode xml target ProcInst when not first token")
- }
-}
-
-func TestDecodeEncode(t *testing.T) {
- var in, out bytes.Buffer
- in.WriteString(`<?xml version="1.0" encoding="UTF-8"?>
-<?Target Instruction?>
-<root>
-</root>
-`)
- dec := NewDecoder(&in)
- enc := NewEncoder(&out)
- for tok, err := dec.Token(); err == nil; tok, err = dec.Token() {
- err = enc.EncodeToken(tok)
- if err != nil {
- t.Fatalf("enc.EncodeToken: Unable to encode token (%#v), %v", tok, err)
- }
- }
-}
-
-// Issue 9796. Used to fail with GORACE="halt_on_error=1" -race.
-func TestRace9796(t *testing.T) {
- type A struct{}
- type B struct {
- C []A `xml:"X>Y"`
- }
- var wg sync.WaitGroup
- for i := 0; i < 2; i++ {
- wg.Add(1)
- go func() {
- Marshal(B{[]A{{}}})
- wg.Done()
- }()
- }
- wg.Wait()
-}
-
-func TestIsValidDirective(t *testing.T) {
- testOK := []string{
- "<>",
- "< < > >",
- "<!DOCTYPE '<' '>' '>' <!--nothing-->>",
- "<!DOCTYPE doc [ <!ELEMENT doc ANY> <!ELEMENT doc ANY> ]>",
- "<!DOCTYPE doc [ <!ELEMENT doc \"ANY> '<' <!E\" LEMENT '>' doc ANY> ]>",
- "<!DOCTYPE doc <!-- just>>>> a < comment --> [ <!ITEM anything> ] >",
- }
- testKO := []string{
- "<",
- ">",
- "<!--",
- "-->",
- "< > > < < >",
- "<!dummy <!-- > -->",
- "<!DOCTYPE doc '>",
- "<!DOCTYPE doc '>'",
- "<!DOCTYPE doc <!--comment>",
- }
- for _, s := range testOK {
- if !isValidDirective(Directive(s)) {
- t.Errorf("Directive %q is expected to be valid", s)
- }
- }
- for _, s := range testKO {
- if isValidDirective(Directive(s)) {
- t.Errorf("Directive %q is expected to be invalid", s)
- }
- }
-}
-
-// Issue 11719. EncodeToken used to silently eat tokens with an invalid type.
-func TestSimpleUseOfEncodeToken(t *testing.T) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- if err := enc.EncodeToken(&StartElement{Name: Name{"", "object1"}}); err == nil {
- t.Errorf("enc.EncodeToken: pointer type should be rejected")
- }
- if err := enc.EncodeToken(&EndElement{Name: Name{"", "object1"}}); err == nil {
- t.Errorf("enc.EncodeToken: pointer type should be rejected")
- }
- if err := enc.EncodeToken(StartElement{Name: Name{"", "object2"}}); err != nil {
- t.Errorf("enc.EncodeToken: StartElement %s", err)
- }
- if err := enc.EncodeToken(EndElement{Name: Name{"", "object2"}}); err != nil {
- t.Errorf("enc.EncodeToken: EndElement %s", err)
- }
- if err := enc.EncodeToken(Universe{}); err == nil {
- t.Errorf("enc.EncodeToken: invalid type not caught")
- }
- if err := enc.Flush(); err != nil {
- t.Errorf("enc.Flush: %s", err)
- }
- if buf.Len() == 0 {
- t.Errorf("enc.EncodeToken: empty buffer")
- }
- want := "<object2></object2>"
- if buf.String() != want {
- t.Errorf("enc.EncodeToken: expected %q; got %q", want, buf.String())
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read.go
deleted file mode 100644
index 4089056a1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read.go
+++ /dev/null
@@ -1,692 +0,0 @@
-// Copyright 2009 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 file.
-
-package xml
-
-import (
- "bytes"
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-)
-
-// BUG(rsc): Mapping between XML elements and data structures is inherently flawed:
-// an XML element is an order-dependent collection of anonymous
-// values, while a data structure is an order-independent collection
-// of named values.
-// See package json for a textual representation more suitable
-// to data structures.
-
-// Unmarshal parses the XML-encoded data and stores the result in
-// the value pointed to by v, which must be an arbitrary struct,
-// slice, or string. Well-formed data that does not fit into v is
-// discarded.
-//
-// Because Unmarshal uses the reflect package, it can only assign
-// to exported (upper case) fields. Unmarshal uses a case-sensitive
-// comparison to match XML element names to tag values and struct
-// field names.
-//
-// Unmarshal maps an XML element to a struct using the following rules.
-// In the rules, the tag of a field refers to the value associated with the
-// key 'xml' in the struct field's tag (see the example above).
-//
-// * If the struct has a field of type []byte or string with tag
-// ",innerxml", Unmarshal accumulates the raw XML nested inside the
-// element in that field. The rest of the rules still apply.
-//
-// * If the struct has a field named XMLName of type xml.Name,
-// Unmarshal records the element name in that field.
-//
-// * If the XMLName field has an associated tag of the form
-// "name" or "namespace-URL name", the XML element must have
-// the given name (and, optionally, name space) or else Unmarshal
-// returns an error.
-//
-// * If the XML element has an attribute whose name matches a
-// struct field name with an associated tag containing ",attr" or
-// the explicit name in a struct field tag of the form "name,attr",
-// Unmarshal records the attribute value in that field.
-//
-// * If the XML element contains character data, that data is
-// accumulated in the first struct field that has tag ",chardata".
-// The struct field may have type []byte or string.
-// If there is no such field, the character data is discarded.
-//
-// * If the XML element contains comments, they are accumulated in
-// the first struct field that has tag ",comment". The struct
-// field may have type []byte or string. If there is no such
-// field, the comments are discarded.
-//
-// * If the XML element contains a sub-element whose name matches
-// the prefix of a tag formatted as "a" or "a>b>c", unmarshal
-// will descend into the XML structure looking for elements with the
-// given names, and will map the innermost elements to that struct
-// field. A tag starting with ">" is equivalent to one starting
-// with the field name followed by ">".
-//
-// * If the XML element contains a sub-element whose name matches
-// a struct field's XMLName tag and the struct field has no
-// explicit name tag as per the previous rule, unmarshal maps
-// the sub-element to that struct field.
-//
-// * If the XML element contains a sub-element whose name matches a
-// field without any mode flags (",attr", ",chardata", etc), Unmarshal
-// maps the sub-element to that struct field.
-//
-// * If the XML element contains a sub-element that hasn't matched any
-// of the above rules and the struct has a field with tag ",any",
-// unmarshal maps the sub-element to that struct field.
-//
-// * An anonymous struct field is handled as if the fields of its
-// value were part of the outer struct.
-//
-// * A struct field with tag "-" is never unmarshalled into.
-//
-// Unmarshal maps an XML element to a string or []byte by saving the
-// concatenation of that element's character data in the string or
-// []byte. The saved []byte is never nil.
-//
-// Unmarshal maps an attribute value to a string or []byte by saving
-// the value in the string or slice.
-//
-// Unmarshal maps an XML element to a slice by extending the length of
-// the slice and mapping the element to the newly created value.
-//
-// Unmarshal maps an XML element or attribute value to a bool by
-// setting it to the boolean value represented by the string.
-//
-// Unmarshal maps an XML element or attribute value to an integer or
-// floating-point field by setting the field to the result of
-// interpreting the string value in decimal. There is no check for
-// overflow.
-//
-// Unmarshal maps an XML element to an xml.Name by recording the
-// element name.
-//
-// Unmarshal maps an XML element to a pointer by setting the pointer
-// to a freshly allocated value and then mapping the element to that value.
-//
-func Unmarshal(data []byte, v interface{}) error {
- return NewDecoder(bytes.NewReader(data)).Decode(v)
-}
-
-// Decode works like xml.Unmarshal, except it reads the decoder
-// stream to find the start element.
-func (d *Decoder) Decode(v interface{}) error {
- return d.DecodeElement(v, nil)
-}
-
-// DecodeElement works like xml.Unmarshal except that it takes
-// a pointer to the start XML element to decode into v.
-// It is useful when a client reads some raw XML tokens itself
-// but also wants to defer to Unmarshal for some elements.
-func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error {
- val := reflect.ValueOf(v)
- if val.Kind() != reflect.Ptr {
- return errors.New("non-pointer passed to Unmarshal")
- }
- return d.unmarshal(val.Elem(), start)
-}
-
-// An UnmarshalError represents an error in the unmarshalling process.
-type UnmarshalError string
-
-func (e UnmarshalError) Error() string { return string(e) }
-
-// Unmarshaler is the interface implemented by objects that can unmarshal
-// an XML element description of themselves.
-//
-// UnmarshalXML decodes a single XML element
-// beginning with the given start element.
-// If it returns an error, the outer call to Unmarshal stops and
-// returns that error.
-// UnmarshalXML must consume exactly one XML element.
-// One common implementation strategy is to unmarshal into
-// a separate value with a layout matching the expected XML
-// using d.DecodeElement, and then to copy the data from
-// that value into the receiver.
-// Another common strategy is to use d.Token to process the
-// XML object one token at a time.
-// UnmarshalXML may not use d.RawToken.
-type Unmarshaler interface {
- UnmarshalXML(d *Decoder, start StartElement) error
-}
-
-// UnmarshalerAttr is the interface implemented by objects that can unmarshal
-// an XML attribute description of themselves.
-//
-// UnmarshalXMLAttr decodes a single XML attribute.
-// If it returns an error, the outer call to Unmarshal stops and
-// returns that error.
-// UnmarshalXMLAttr is used only for struct fields with the
-// "attr" option in the field tag.
-type UnmarshalerAttr interface {
- UnmarshalXMLAttr(attr Attr) error
-}
-
-// receiverType returns the receiver type to use in an expression like "%s.MethodName".
-func receiverType(val interface{}) string {
- t := reflect.TypeOf(val)
- if t.Name() != "" {
- return t.String()
- }
- return "(" + t.String() + ")"
-}
-
-// unmarshalInterface unmarshals a single XML element into val.
-// start is the opening tag of the element.
-func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error {
- // Record that decoder must stop at end tag corresponding to start.
- p.pushEOF()
-
- p.unmarshalDepth++
- err := val.UnmarshalXML(p, *start)
- p.unmarshalDepth--
- if err != nil {
- p.popEOF()
- return err
- }
-
- if !p.popEOF() {
- return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local)
- }
-
- return nil
-}
-
-// unmarshalTextInterface unmarshals a single XML element into val.
-// The chardata contained in the element (but not its children)
-// is passed to the text unmarshaler.
-func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error {
- var buf []byte
- depth := 1
- for depth > 0 {
- t, err := p.Token()
- if err != nil {
- return err
- }
- switch t := t.(type) {
- case CharData:
- if depth == 1 {
- buf = append(buf, t...)
- }
- case StartElement:
- depth++
- case EndElement:
- depth--
- }
- }
- return val.UnmarshalText(buf)
-}
-
-// unmarshalAttr unmarshals a single XML attribute into val.
-func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error {
- if val.Kind() == reflect.Ptr {
- if val.IsNil() {
- val.Set(reflect.New(val.Type().Elem()))
- }
- val = val.Elem()
- }
-
- if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) {
- // This is an unmarshaler with a non-pointer receiver,
- // so it's likely to be incorrect, but we do what we're told.
- return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr)
- }
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) {
- return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr)
- }
- }
-
- // Not an UnmarshalerAttr; try encoding.TextUnmarshaler.
- if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
- // This is an unmarshaler with a non-pointer receiver,
- // so it's likely to be incorrect, but we do what we're told.
- return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value))
- }
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
- return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value))
- }
- }
-
- copyValue(val, []byte(attr.Value))
- return nil
-}
-
-var (
- unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
- unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem()
- textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
-)
-
-// Unmarshal a single XML element into val.
-func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error {
- // Find start element if we need it.
- if start == nil {
- for {
- tok, err := p.Token()
- if err != nil {
- return err
- }
- if t, ok := tok.(StartElement); ok {
- start = &t
- break
- }
- }
- }
-
- // Load value from interface, but only if the result will be
- // usefully addressable.
- if val.Kind() == reflect.Interface && !val.IsNil() {
- e := val.Elem()
- if e.Kind() == reflect.Ptr && !e.IsNil() {
- val = e
- }
- }
-
- if val.Kind() == reflect.Ptr {
- if val.IsNil() {
- val.Set(reflect.New(val.Type().Elem()))
- }
- val = val.Elem()
- }
-
- if val.CanInterface() && val.Type().Implements(unmarshalerType) {
- // This is an unmarshaler with a non-pointer receiver,
- // so it's likely to be incorrect, but we do what we're told.
- return p.unmarshalInterface(val.Interface().(Unmarshaler), start)
- }
-
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(unmarshalerType) {
- return p.unmarshalInterface(pv.Interface().(Unmarshaler), start)
- }
- }
-
- if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
- return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start)
- }
-
- if val.CanAddr() {
- pv := val.Addr()
- if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
- return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start)
- }
- }
-
- var (
- data []byte
- saveData reflect.Value
- comment []byte
- saveComment reflect.Value
- saveXML reflect.Value
- saveXMLIndex int
- saveXMLData []byte
- saveAny reflect.Value
- sv reflect.Value
- tinfo *typeInfo
- err error
- )
-
- switch v := val; v.Kind() {
- default:
- return errors.New("unknown type " + v.Type().String())
-
- case reflect.Interface:
- // TODO: For now, simply ignore the field. In the near
- // future we may choose to unmarshal the start
- // element on it, if not nil.
- return p.Skip()
-
- case reflect.Slice:
- typ := v.Type()
- if typ.Elem().Kind() == reflect.Uint8 {
- // []byte
- saveData = v
- break
- }
-
- // Slice of element values.
- // Grow slice.
- n := v.Len()
- if n >= v.Cap() {
- ncap := 2 * n
- if ncap < 4 {
- ncap = 4
- }
- new := reflect.MakeSlice(typ, n, ncap)
- reflect.Copy(new, v)
- v.Set(new)
- }
- v.SetLen(n + 1)
-
- // Recur to read element into slice.
- if err := p.unmarshal(v.Index(n), start); err != nil {
- v.SetLen(n)
- return err
- }
- return nil
-
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String:
- saveData = v
-
- case reflect.Struct:
- typ := v.Type()
- if typ == nameType {
- v.Set(reflect.ValueOf(start.Name))
- break
- }
-
- sv = v
- tinfo, err = getTypeInfo(typ)
- if err != nil {
- return err
- }
-
- // Validate and assign element name.
- if tinfo.xmlname != nil {
- finfo := tinfo.xmlname
- if finfo.name != "" && finfo.name != start.Name.Local {
- return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">")
- }
- if finfo.xmlns != "" && finfo.xmlns != start.Name.Space {
- e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have "
- if start.Name.Space == "" {
- e += "no name space"
- } else {
- e += start.Name.Space
- }
- return UnmarshalError(e)
- }
- fv := finfo.value(sv)
- if _, ok := fv.Interface().(Name); ok {
- fv.Set(reflect.ValueOf(start.Name))
- }
- }
-
- // Assign attributes.
- // Also, determine whether we need to save character data or comments.
- for i := range tinfo.fields {
- finfo := &tinfo.fields[i]
- switch finfo.flags & fMode {
- case fAttr:
- strv := finfo.value(sv)
- // Look for attribute.
- for _, a := range start.Attr {
- if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) {
- if err := p.unmarshalAttr(strv, a); err != nil {
- return err
- }
- break
- }
- }
-
- case fCharData:
- if !saveData.IsValid() {
- saveData = finfo.value(sv)
- }
-
- case fComment:
- if !saveComment.IsValid() {
- saveComment = finfo.value(sv)
- }
-
- case fAny, fAny | fElement:
- if !saveAny.IsValid() {
- saveAny = finfo.value(sv)
- }
-
- case fInnerXml:
- if !saveXML.IsValid() {
- saveXML = finfo.value(sv)
- if p.saved == nil {
- saveXMLIndex = 0
- p.saved = new(bytes.Buffer)
- } else {
- saveXMLIndex = p.savedOffset()
- }
- }
- }
- }
- }
-
- // Find end element.
- // Process sub-elements along the way.
-Loop:
- for {
- var savedOffset int
- if saveXML.IsValid() {
- savedOffset = p.savedOffset()
- }
- tok, err := p.Token()
- if err != nil {
- return err
- }
- switch t := tok.(type) {
- case StartElement:
- consumed := false
- if sv.IsValid() {
- consumed, err = p.unmarshalPath(tinfo, sv, nil, &t)
- if err != nil {
- return err
- }
- if !consumed && saveAny.IsValid() {
- consumed = true
- if err := p.unmarshal(saveAny, &t); err != nil {
- return err
- }
- }
- }
- if !consumed {
- if err := p.Skip(); err != nil {
- return err
- }
- }
-
- case EndElement:
- if saveXML.IsValid() {
- saveXMLData = p.saved.Bytes()[saveXMLIndex:savedOffset]
- if saveXMLIndex == 0 {
- p.saved = nil
- }
- }
- break Loop
-
- case CharData:
- if saveData.IsValid() {
- data = append(data, t...)
- }
-
- case Comment:
- if saveComment.IsValid() {
- comment = append(comment, t...)
- }
- }
- }
-
- if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) {
- if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
- return err
- }
- saveData = reflect.Value{}
- }
-
- if saveData.IsValid() && saveData.CanAddr() {
- pv := saveData.Addr()
- if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) {
- if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
- return err
- }
- saveData = reflect.Value{}
- }
- }
-
- if err := copyValue(saveData, data); err != nil {
- return err
- }
-
- switch t := saveComment; t.Kind() {
- case reflect.String:
- t.SetString(string(comment))
- case reflect.Slice:
- t.Set(reflect.ValueOf(comment))
- }
-
- switch t := saveXML; t.Kind() {
- case reflect.String:
- t.SetString(string(saveXMLData))
- case reflect.Slice:
- t.Set(reflect.ValueOf(saveXMLData))
- }
-
- return nil
-}
-
-func copyValue(dst reflect.Value, src []byte) (err error) {
- dst0 := dst
-
- if dst.Kind() == reflect.Ptr {
- if dst.IsNil() {
- dst.Set(reflect.New(dst.Type().Elem()))
- }
- dst = dst.Elem()
- }
-
- // Save accumulated data.
- switch dst.Kind() {
- case reflect.Invalid:
- // Probably a comment.
- default:
- return errors.New("cannot unmarshal into " + dst0.Type().String())
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits())
- if err != nil {
- return err
- }
- dst.SetInt(itmp)
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- utmp, err := strconv.ParseUint(string(src), 10, dst.Type().Bits())
- if err != nil {
- return err
- }
- dst.SetUint(utmp)
- case reflect.Float32, reflect.Float64:
- ftmp, err := strconv.ParseFloat(string(src), dst.Type().Bits())
- if err != nil {
- return err
- }
- dst.SetFloat(ftmp)
- case reflect.Bool:
- value, err := strconv.ParseBool(strings.TrimSpace(string(src)))
- if err != nil {
- return err
- }
- dst.SetBool(value)
- case reflect.String:
- dst.SetString(string(src))
- case reflect.Slice:
- if len(src) == 0 {
- // non-nil to flag presence
- src = []byte{}
- }
- dst.SetBytes(src)
- }
- return nil
-}
-
-// unmarshalPath walks down an XML structure looking for wanted
-// paths, and calls unmarshal on them.
-// The consumed result tells whether XML elements have been consumed
-// from the Decoder until start's matching end element, or if it's
-// still untouched because start is uninteresting for sv's fields.
-func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) {
- recurse := false
-Loop:
- for i := range tinfo.fields {
- finfo := &tinfo.fields[i]
- if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space {
- continue
- }
- for j := range parents {
- if parents[j] != finfo.parents[j] {
- continue Loop
- }
- }
- if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local {
- // It's a perfect match, unmarshal the field.
- return true, p.unmarshal(finfo.value(sv), start)
- }
- if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local {
- // It's a prefix for the field. Break and recurse
- // since it's not ok for one field path to be itself
- // the prefix for another field path.
- recurse = true
-
- // We can reuse the same slice as long as we
- // don't try to append to it.
- parents = finfo.parents[:len(parents)+1]
- break
- }
- }
- if !recurse {
- // We have no business with this element.
- return false, nil
- }
- // The element is not a perfect match for any field, but one
- // or more fields have the path to this element as a parent
- // prefix. Recurse and attempt to match these.
- for {
- var tok Token
- tok, err = p.Token()
- if err != nil {
- return true, err
- }
- switch t := tok.(type) {
- case StartElement:
- consumed2, err := p.unmarshalPath(tinfo, sv, parents, &t)
- if err != nil {
- return true, err
- }
- if !consumed2 {
- if err := p.Skip(); err != nil {
- return true, err
- }
- }
- case EndElement:
- return true, nil
- }
- }
-}
-
-// Skip reads tokens until it has consumed the end element
-// matching the most recent start element already consumed.
-// It recurs if it encounters a start element, so it can be used to
-// skip nested structures.
-// It returns nil if it finds an end element matching the start
-// element; otherwise it returns an error describing the problem.
-func (d *Decoder) Skip() error {
- for {
- tok, err := d.Token()
- if err != nil {
- return err
- }
- switch tok.(type) {
- case StartElement:
- if err := d.Skip(); err != nil {
- return err
- }
- case EndElement:
- return nil
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read_test.go
deleted file mode 100644
index 02f1e10c3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/read_test.go
+++ /dev/null
@@ -1,744 +0,0 @@
-// Copyright 2009 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 file.
-
-package xml
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-// Stripped down Atom feed data structures.
-
-func TestUnmarshalFeed(t *testing.T) {
- var f Feed
- if err := Unmarshal([]byte(atomFeedString), &f); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if !reflect.DeepEqual(f, atomFeed) {
- t.Fatalf("have %#v\nwant %#v", f, atomFeed)
- }
-}
-
-// hget http://codereview.appspot.com/rss/mine/rsc
-const atomFeedString = `
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us" updated="2009-10-04T01:35:58+00:00"><title>Code Review - My issues</title><link href="http://codereview.appspot.com/" rel="alternate"></link><link href="http://codereview.appspot.com/rss/mine/rsc" rel="self"></link><id>http://codereview.appspot.com/</id><author><name>rietveld&lt;&gt;</name></author><entry><title>rietveld: an attempt at pubsubhubbub
-</title><link href="http://codereview.appspot.com/126085" rel="alternate"></link><updated>2009-10-04T01:35:58+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:134d9179c41f806be79b3a5f7877d19a</id><summary type="html">
- An attempt at adding pubsubhubbub support to Rietveld.
-http://code.google.com/p/pubsubhubbub
-http://code.google.com/p/rietveld/issues/detail?id=155
-
-The server side of the protocol is trivial:
- 1. add a &amp;lt;link rel=&amp;quot;hub&amp;quot; href=&amp;quot;hub-server&amp;quot;&amp;gt; tag to all
- feeds that will be pubsubhubbubbed.
- 2. every time one of those feeds changes, tell the hub
- with a simple POST request.
-
-I have tested this by adding debug prints to a local hub
-server and checking that the server got the right publish
-requests.
-
-I can&amp;#39;t quite get the server to work, but I think the bug
-is not in my code. I think that the server expects to be
-able to grab the feed and see the feed&amp;#39;s actual URL in
-the link rel=&amp;quot;self&amp;quot;, but the default value for that drops
-the :port from the URL, and I cannot for the life of me
-figure out how to get the Atom generator deep inside
-django not to do that, or even where it is doing that,
-or even what code is running to generate the Atom feed.
-(I thought I knew but I added some assert False statements
-and it kept running!)
-
-Ignoring that particular problem, I would appreciate
-feedback on the right way to get the two values at
-the top of feeds.py marked NOTE(rsc).
-
-
-</summary></entry><entry><title>rietveld: correct tab handling
-</title><link href="http://codereview.appspot.com/124106" rel="alternate"></link><updated>2009-10-03T23:02:17+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:0a2a4f19bb815101f0ba2904aed7c35a</id><summary type="html">
- This fixes the buggy tab rendering that can be seen at
-http://codereview.appspot.com/116075/diff/1/2
-
-The fundamental problem was that the tab code was
-not being told what column the text began in, so it
-didn&amp;#39;t know where to put the tab stops. Another problem
-was that some of the code assumed that string byte
-offsets were the same as column offsets, which is only
-true if there are no tabs.
-
-In the process of fixing this, I cleaned up the arguments
-to Fold and ExpandTabs and renamed them Break and
-_ExpandTabs so that I could be sure that I found all the
-call sites. I also wanted to verify that ExpandTabs was
-not being used from outside intra_region_diff.py.
-
-
-</summary></entry></feed> `
-
-type Feed struct {
- XMLName Name `xml:"http://www.w3.org/2005/Atom feed"`
- Title string `xml:"title"`
- Id string `xml:"id"`
- Link []Link `xml:"link"`
- Updated time.Time `xml:"updated,attr"`
- Author Person `xml:"author"`
- Entry []Entry `xml:"entry"`
-}
-
-type Entry struct {
- Title string `xml:"title"`
- Id string `xml:"id"`
- Link []Link `xml:"link"`
- Updated time.Time `xml:"updated"`
- Author Person `xml:"author"`
- Summary Text `xml:"summary"`
-}
-
-type Link struct {
- Rel string `xml:"rel,attr,omitempty"`
- Href string `xml:"href,attr"`
-}
-
-type Person struct {
- Name string `xml:"name"`
- URI string `xml:"uri"`
- Email string `xml:"email"`
- InnerXML string `xml:",innerxml"`
-}
-
-type Text struct {
- Type string `xml:"type,attr,omitempty"`
- Body string `xml:",chardata"`
-}
-
-var atomFeed = Feed{
- XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
- Title: "Code Review - My issues",
- Link: []Link{
- {Rel: "alternate", Href: "http://codereview.appspot.com/"},
- {Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"},
- },
- Id: "http://codereview.appspot.com/",
- Updated: ParseTime("2009-10-04T01:35:58+00:00"),
- Author: Person{
- Name: "rietveld<>",
- InnerXML: "<name>rietveld&lt;&gt;</name>",
- },
- Entry: []Entry{
- {
- Title: "rietveld: an attempt at pubsubhubbub\n",
- Link: []Link{
- {Rel: "alternate", Href: "http://codereview.appspot.com/126085"},
- },
- Updated: ParseTime("2009-10-04T01:35:58+00:00"),
- Author: Person{
- Name: "email-address-removed",
- InnerXML: "<name>email-address-removed</name>",
- },
- Id: "urn:md5:134d9179c41f806be79b3a5f7877d19a",
- Summary: Text{
- Type: "html",
- Body: `
- An attempt at adding pubsubhubbub support to Rietveld.
-http://code.google.com/p/pubsubhubbub
-http://code.google.com/p/rietveld/issues/detail?id=155
-
-The server side of the protocol is trivial:
- 1. add a &lt;link rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all
- feeds that will be pubsubhubbubbed.
- 2. every time one of those feeds changes, tell the hub
- with a simple POST request.
-
-I have tested this by adding debug prints to a local hub
-server and checking that the server got the right publish
-requests.
-
-I can&#39;t quite get the server to work, but I think the bug
-is not in my code. I think that the server expects to be
-able to grab the feed and see the feed&#39;s actual URL in
-the link rel=&quot;self&quot;, but the default value for that drops
-the :port from the URL, and I cannot for the life of me
-figure out how to get the Atom generator deep inside
-django not to do that, or even where it is doing that,
-or even what code is running to generate the Atom feed.
-(I thought I knew but I added some assert False statements
-and it kept running!)
-
-Ignoring that particular problem, I would appreciate
-feedback on the right way to get the two values at
-the top of feeds.py marked NOTE(rsc).
-
-
-`,
- },
- },
- {
- Title: "rietveld: correct tab handling\n",
- Link: []Link{
- {Rel: "alternate", Href: "http://codereview.appspot.com/124106"},
- },
- Updated: ParseTime("2009-10-03T23:02:17+00:00"),
- Author: Person{
- Name: "email-address-removed",
- InnerXML: "<name>email-address-removed</name>",
- },
- Id: "urn:md5:0a2a4f19bb815101f0ba2904aed7c35a",
- Summary: Text{
- Type: "html",
- Body: `
- This fixes the buggy tab rendering that can be seen at
-http://codereview.appspot.com/116075/diff/1/2
-
-The fundamental problem was that the tab code was
-not being told what column the text began in, so it
-didn&#39;t know where to put the tab stops. Another problem
-was that some of the code assumed that string byte
-offsets were the same as column offsets, which is only
-true if there are no tabs.
-
-In the process of fixing this, I cleaned up the arguments
-to Fold and ExpandTabs and renamed them Break and
-_ExpandTabs so that I could be sure that I found all the
-call sites. I also wanted to verify that ExpandTabs was
-not being used from outside intra_region_diff.py.
-
-
-`,
- },
- },
- },
-}
-
-const pathTestString = `
-<Result>
- <Before>1</Before>
- <Items>
- <Item1>
- <Value>A</Value>
- </Item1>
- <Item2>
- <Value>B</Value>
- </Item2>
- <Item1>
- <Value>C</Value>
- <Value>D</Value>
- </Item1>
- <_>
- <Value>E</Value>
- </_>
- </Items>
- <After>2</After>
-</Result>
-`
-
-type PathTestItem struct {
- Value string
-}
-
-type PathTestA struct {
- Items []PathTestItem `xml:">Item1"`
- Before, After string
-}
-
-type PathTestB struct {
- Other []PathTestItem `xml:"Items>Item1"`
- Before, After string
-}
-
-type PathTestC struct {
- Values1 []string `xml:"Items>Item1>Value"`
- Values2 []string `xml:"Items>Item2>Value"`
- Before, After string
-}
-
-type PathTestSet struct {
- Item1 []PathTestItem
-}
-
-type PathTestD struct {
- Other PathTestSet `xml:"Items"`
- Before, After string
-}
-
-type PathTestE struct {
- Underline string `xml:"Items>_>Value"`
- Before, After string
-}
-
-var pathTests = []interface{}{
- &PathTestA{Items: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"},
- &PathTestB{Other: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"},
- &PathTestC{Values1: []string{"A", "C", "D"}, Values2: []string{"B"}, Before: "1", After: "2"},
- &PathTestD{Other: PathTestSet{Item1: []PathTestItem{{"A"}, {"D"}}}, Before: "1", After: "2"},
- &PathTestE{Underline: "E", Before: "1", After: "2"},
-}
-
-func TestUnmarshalPaths(t *testing.T) {
- for _, pt := range pathTests {
- v := reflect.New(reflect.TypeOf(pt).Elem()).Interface()
- if err := Unmarshal([]byte(pathTestString), v); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if !reflect.DeepEqual(v, pt) {
- t.Fatalf("have %#v\nwant %#v", v, pt)
- }
- }
-}
-
-type BadPathTestA struct {
- First string `xml:"items>item1"`
- Other string `xml:"items>item2"`
- Second string `xml:"items"`
-}
-
-type BadPathTestB struct {
- Other string `xml:"items>item2>value"`
- First string `xml:"items>item1"`
- Second string `xml:"items>item1>value"`
-}
-
-type BadPathTestC struct {
- First string
- Second string `xml:"First"`
-}
-
-type BadPathTestD struct {
- BadPathEmbeddedA
- BadPathEmbeddedB
-}
-
-type BadPathEmbeddedA struct {
- First string
-}
-
-type BadPathEmbeddedB struct {
- Second string `xml:"First"`
-}
-
-var badPathTests = []struct {
- v, e interface{}
-}{
- {&BadPathTestA{}, &TagPathError{reflect.TypeOf(BadPathTestA{}), "First", "items>item1", "Second", "items"}},
- {&BadPathTestB{}, &TagPathError{reflect.TypeOf(BadPathTestB{}), "First", "items>item1", "Second", "items>item1>value"}},
- {&BadPathTestC{}, &TagPathError{reflect.TypeOf(BadPathTestC{}), "First", "", "Second", "First"}},
- {&BadPathTestD{}, &TagPathError{reflect.TypeOf(BadPathTestD{}), "First", "", "Second", "First"}},
-}
-
-func TestUnmarshalBadPaths(t *testing.T) {
- for _, tt := range badPathTests {
- err := Unmarshal([]byte(pathTestString), tt.v)
- if !reflect.DeepEqual(err, tt.e) {
- t.Fatalf("Unmarshal with %#v didn't fail properly:\nhave %#v,\nwant %#v", tt.v, err, tt.e)
- }
- }
-}
-
-const OK = "OK"
-const withoutNameTypeData = `
-<?xml version="1.0" charset="utf-8"?>
-<Test3 Attr="OK" />`
-
-type TestThree struct {
- XMLName Name `xml:"Test3"`
- Attr string `xml:",attr"`
-}
-
-func TestUnmarshalWithoutNameType(t *testing.T) {
- var x TestThree
- if err := Unmarshal([]byte(withoutNameTypeData), &x); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if x.Attr != OK {
- t.Fatalf("have %v\nwant %v", x.Attr, OK)
- }
-}
-
-func TestUnmarshalAttr(t *testing.T) {
- type ParamVal struct {
- Int int `xml:"int,attr"`
- }
-
- type ParamPtr struct {
- Int *int `xml:"int,attr"`
- }
-
- type ParamStringPtr struct {
- Int *string `xml:"int,attr"`
- }
-
- x := []byte(`<Param int="1" />`)
-
- p1 := &ParamPtr{}
- if err := Unmarshal(x, p1); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if p1.Int == nil {
- t.Fatalf("Unmarshal failed in to *int field")
- } else if *p1.Int != 1 {
- t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p1.Int, 1)
- }
-
- p2 := &ParamVal{}
- if err := Unmarshal(x, p2); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if p2.Int != 1 {
- t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p2.Int, 1)
- }
-
- p3 := &ParamStringPtr{}
- if err := Unmarshal(x, p3); err != nil {
- t.Fatalf("Unmarshal: %s", err)
- }
- if p3.Int == nil {
- t.Fatalf("Unmarshal failed in to *string field")
- } else if *p3.Int != "1" {
- t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p3.Int, 1)
- }
-}
-
-type Tables struct {
- HTable string `xml:"http://www.w3.org/TR/html4/ table"`
- FTable string `xml:"http://www.w3schools.com/furniture table"`
-}
-
-var tables = []struct {
- xml string
- tab Tables
- ns string
-}{
- {
- xml: `<Tables>` +
- `<table xmlns="http://www.w3.org/TR/html4/">hello</table>` +
- `<table xmlns="http://www.w3schools.com/furniture">world</table>` +
- `</Tables>`,
- tab: Tables{"hello", "world"},
- },
- {
- xml: `<Tables>` +
- `<table xmlns="http://www.w3schools.com/furniture">world</table>` +
- `<table xmlns="http://www.w3.org/TR/html4/">hello</table>` +
- `</Tables>`,
- tab: Tables{"hello", "world"},
- },
- {
- xml: `<Tables xmlns:f="http://www.w3schools.com/furniture" xmlns:h="http://www.w3.org/TR/html4/">` +
- `<f:table>world</f:table>` +
- `<h:table>hello</h:table>` +
- `</Tables>`,
- tab: Tables{"hello", "world"},
- },
- {
- xml: `<Tables>` +
- `<table>bogus</table>` +
- `</Tables>`,
- tab: Tables{},
- },
- {
- xml: `<Tables>` +
- `<table>only</table>` +
- `</Tables>`,
- tab: Tables{HTable: "only"},
- ns: "http://www.w3.org/TR/html4/",
- },
- {
- xml: `<Tables>` +
- `<table>only</table>` +
- `</Tables>`,
- tab: Tables{FTable: "only"},
- ns: "http://www.w3schools.com/furniture",
- },
- {
- xml: `<Tables>` +
- `<table>only</table>` +
- `</Tables>`,
- tab: Tables{},
- ns: "something else entirely",
- },
-}
-
-func TestUnmarshalNS(t *testing.T) {
- for i, tt := range tables {
- var dst Tables
- var err error
- if tt.ns != "" {
- d := NewDecoder(strings.NewReader(tt.xml))
- d.DefaultSpace = tt.ns
- err = d.Decode(&dst)
- } else {
- err = Unmarshal([]byte(tt.xml), &dst)
- }
- if err != nil {
- t.Errorf("#%d: Unmarshal: %v", i, err)
- continue
- }
- want := tt.tab
- if dst != want {
- t.Errorf("#%d: dst=%+v, want %+v", i, dst, want)
- }
- }
-}
-
-func TestRoundTrip(t *testing.T) {
- // From issue 7535
- const s = `<ex:element xmlns:ex="http://example.com/schema"></ex:element>`
- in := bytes.NewBufferString(s)
- for i := 0; i < 10; i++ {
- out := &bytes.Buffer{}
- d := NewDecoder(in)
- e := NewEncoder(out)
-
- for {
- t, err := d.Token()
- if err == io.EOF {
- break
- }
- if err != nil {
- fmt.Println("failed:", err)
- return
- }
- e.EncodeToken(t)
- }
- e.Flush()
- in = out
- }
- if got := in.String(); got != s {
- t.Errorf("have: %q\nwant: %q\n", got, s)
- }
-}
-
-func TestMarshalNS(t *testing.T) {
- dst := Tables{"hello", "world"}
- data, err := Marshal(&dst)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- want := `<Tables><table xmlns="http://www.w3.org/TR/html4/">hello</table><table xmlns="http://www.w3schools.com/furniture">world</table></Tables>`
- str := string(data)
- if str != want {
- t.Errorf("have: %q\nwant: %q\n", str, want)
- }
-}
-
-type TableAttrs struct {
- TAttr TAttr
-}
-
-type TAttr struct {
- HTable string `xml:"http://www.w3.org/TR/html4/ table,attr"`
- FTable string `xml:"http://www.w3schools.com/furniture table,attr"`
- Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"`
- Other1 string `xml:"http://golang.org/xml/ other,attr,omitempty"`
- Other2 string `xml:"http://golang.org/xmlfoo/ other,attr,omitempty"`
- Other3 string `xml:"http://golang.org/json/ other,attr,omitempty"`
- Other4 string `xml:"http://golang.org/2/json/ other,attr,omitempty"`
-}
-
-var tableAttrs = []struct {
- xml string
- tab TableAttrs
- ns string
-}{
- {
- xml: `<TableAttrs xmlns:f="http://www.w3schools.com/furniture" xmlns:h="http://www.w3.org/TR/html4/"><TAttr ` +
- `h:table="hello" f:table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}},
- },
- {
- xml: `<TableAttrs><TAttr xmlns:f="http://www.w3schools.com/furniture" xmlns:h="http://www.w3.org/TR/html4/" ` +
- `h:table="hello" f:table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}},
- },
- {
- xml: `<TableAttrs><TAttr ` +
- `h:table="hello" f:table="world" xmlns:f="http://www.w3schools.com/furniture" xmlns:h="http://www.w3.org/TR/html4/" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}},
- },
- {
- // Default space does not apply to attribute names.
- xml: `<TableAttrs xmlns="http://www.w3schools.com/furniture" xmlns:h="http://www.w3.org/TR/html4/"><TAttr ` +
- `h:table="hello" table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}},
- },
- {
- // Default space does not apply to attribute names.
- xml: `<TableAttrs xmlns:f="http://www.w3schools.com/furniture"><TAttr xmlns="http://www.w3.org/TR/html4/" ` +
- `table="hello" f:table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "", FTable: "world"}},
- },
- {
- xml: `<TableAttrs><TAttr ` +
- `table="bogus" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{},
- },
- {
- // Default space does not apply to attribute names.
- xml: `<TableAttrs xmlns:h="http://www.w3.org/TR/html4/"><TAttr ` +
- `h:table="hello" table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}},
- ns: "http://www.w3schools.com/furniture",
- },
- {
- // Default space does not apply to attribute names.
- xml: `<TableAttrs xmlns:f="http://www.w3schools.com/furniture"><TAttr ` +
- `table="hello" f:table="world" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{TAttr{HTable: "", FTable: "world"}},
- ns: "http://www.w3.org/TR/html4/",
- },
- {
- xml: `<TableAttrs><TAttr ` +
- `table="bogus" ` +
- `/></TableAttrs>`,
- tab: TableAttrs{},
- ns: "something else entirely",
- },
-}
-
-func TestUnmarshalNSAttr(t *testing.T) {
- for i, tt := range tableAttrs {
- var dst TableAttrs
- var err error
- if tt.ns != "" {
- d := NewDecoder(strings.NewReader(tt.xml))
- d.DefaultSpace = tt.ns
- err = d.Decode(&dst)
- } else {
- err = Unmarshal([]byte(tt.xml), &dst)
- }
- if err != nil {
- t.Errorf("#%d: Unmarshal: %v", i, err)
- continue
- }
- want := tt.tab
- if dst != want {
- t.Errorf("#%d: dst=%+v, want %+v", i, dst, want)
- }
- }
-}
-
-func TestMarshalNSAttr(t *testing.T) {
- src := TableAttrs{TAttr{"hello", "world", "en_US", "other1", "other2", "other3", "other4"}}
- data, err := Marshal(&src)
- if err != nil {
- t.Fatalf("Marshal: %v", err)
- }
- want := `<TableAttrs><TAttr xmlns:json_1="http://golang.org/2/json/" xmlns:json="http://golang.org/json/" xmlns:_xmlfoo="http://golang.org/xmlfoo/" xmlns:_xml="http://golang.org/xml/" xmlns:furniture="http://www.w3schools.com/furniture" xmlns:html4="http://www.w3.org/TR/html4/" html4:table="hello" furniture:table="world" xml:lang="en_US" _xml:other="other1" _xmlfoo:other="other2" json:other="other3" json_1:other="other4"></TAttr></TableAttrs>`
- str := string(data)
- if str != want {
- t.Errorf("Marshal:\nhave: %#q\nwant: %#q\n", str, want)
- }
-
- var dst TableAttrs
- if err := Unmarshal(data, &dst); err != nil {
- t.Errorf("Unmarshal: %v", err)
- }
-
- if dst != src {
- t.Errorf("Unmarshal = %q, want %q", dst, src)
- }
-}
-
-type MyCharData struct {
- body string
-}
-
-func (m *MyCharData) UnmarshalXML(d *Decoder, start StartElement) error {
- for {
- t, err := d.Token()
- if err == io.EOF { // found end of element
- break
- }
- if err != nil {
- return err
- }
- if char, ok := t.(CharData); ok {
- m.body += string(char)
- }
- }
- return nil
-}
-
-var _ Unmarshaler = (*MyCharData)(nil)
-
-func (m *MyCharData) UnmarshalXMLAttr(attr Attr) error {
- panic("must not call")
-}
-
-type MyAttr struct {
- attr string
-}
-
-func (m *MyAttr) UnmarshalXMLAttr(attr Attr) error {
- m.attr = attr.Value
- return nil
-}
-
-var _ UnmarshalerAttr = (*MyAttr)(nil)
-
-type MyStruct struct {
- Data *MyCharData
- Attr *MyAttr `xml:",attr"`
-
- Data2 MyCharData
- Attr2 MyAttr `xml:",attr"`
-}
-
-func TestUnmarshaler(t *testing.T) {
- xml := `<?xml version="1.0" encoding="utf-8"?>
- <MyStruct Attr="attr1" Attr2="attr2">
- <Data>hello <!-- comment -->world</Data>
- <Data2>howdy <!-- comment -->world</Data2>
- </MyStruct>
- `
-
- var m MyStruct
- if err := Unmarshal([]byte(xml), &m); err != nil {
- t.Fatal(err)
- }
-
- if m.Data == nil || m.Attr == nil || m.Data.body != "hello world" || m.Attr.attr != "attr1" || m.Data2.body != "howdy world" || m.Attr2.attr != "attr2" {
- t.Errorf("m=%#+v\n", m)
- }
-}
-
-type Pea struct {
- Cotelydon string
-}
-
-type Pod struct {
- Pea interface{} `xml:"Pea"`
-}
-
-// https://golang.org/issue/6836
-func TestUnmarshalIntoInterface(t *testing.T) {
- pod := new(Pod)
- pod.Pea = new(Pea)
- xml := `<Pod><Pea><Cotelydon>Green stuff</Cotelydon></Pea></Pod>`
- err := Unmarshal([]byte(xml), pod)
- if err != nil {
- t.Fatalf("failed to unmarshal %q: %v", xml, err)
- }
- pea, ok := pod.Pea.(*Pea)
- if !ok {
- t.Fatalf("unmarshalled into wrong type: have %T want *Pea", pod.Pea)
- }
- have, want := pea.Cotelydon, "Green stuff"
- if have != want {
- t.Errorf("failed to unmarshal into interface, have %q want %q", have, want)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go
deleted file mode 100644
index fdde288bc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go
+++ /dev/null
@@ -1,371 +0,0 @@
-// Copyright 2011 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 file.
-
-package xml
-
-import (
- "fmt"
- "reflect"
- "strings"
- "sync"
-)
-
-// typeInfo holds details for the xml representation of a type.
-type typeInfo struct {
- xmlname *fieldInfo
- fields []fieldInfo
-}
-
-// fieldInfo holds details for the xml representation of a single field.
-type fieldInfo struct {
- idx []int
- name string
- xmlns string
- flags fieldFlags
- parents []string
-}
-
-type fieldFlags int
-
-const (
- fElement fieldFlags = 1 << iota
- fAttr
- fCharData
- fInnerXml
- fComment
- fAny
-
- fOmitEmpty
-
- fMode = fElement | fAttr | fCharData | fInnerXml | fComment | fAny
-)
-
-var tinfoMap = make(map[reflect.Type]*typeInfo)
-var tinfoLock sync.RWMutex
-
-var nameType = reflect.TypeOf(Name{})
-
-// getTypeInfo returns the typeInfo structure with details necessary
-// for marshalling and unmarshalling typ.
-func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
- tinfoLock.RLock()
- tinfo, ok := tinfoMap[typ]
- tinfoLock.RUnlock()
- if ok {
- return tinfo, nil
- }
- tinfo = &typeInfo{}
- if typ.Kind() == reflect.Struct && typ != nameType {
- n := typ.NumField()
- for i := 0; i < n; i++ {
- f := typ.Field(i)
- if f.PkgPath != "" || f.Tag.Get("xml") == "-" {
- continue // Private field
- }
-
- // For embedded structs, embed its fields.
- if f.Anonymous {
- t := f.Type
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
- if t.Kind() == reflect.Struct {
- inner, err := getTypeInfo(t)
- if err != nil {
- return nil, err
- }
- if tinfo.xmlname == nil {
- tinfo.xmlname = inner.xmlname
- }
- for _, finfo := range inner.fields {
- finfo.idx = append([]int{i}, finfo.idx...)
- if err := addFieldInfo(typ, tinfo, &finfo); err != nil {
- return nil, err
- }
- }
- continue
- }
- }
-
- finfo, err := structFieldInfo(typ, &f)
- if err != nil {
- return nil, err
- }
-
- if f.Name == "XMLName" {
- tinfo.xmlname = finfo
- continue
- }
-
- // Add the field if it doesn't conflict with other fields.
- if err := addFieldInfo(typ, tinfo, finfo); err != nil {
- return nil, err
- }
- }
- }
- tinfoLock.Lock()
- tinfoMap[typ] = tinfo
- tinfoLock.Unlock()
- return tinfo, nil
-}
-
-// structFieldInfo builds and returns a fieldInfo for f.
-func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) {
- finfo := &fieldInfo{idx: f.Index}
-
- // Split the tag from the xml namespace if necessary.
- tag := f.Tag.Get("xml")
- if i := strings.Index(tag, " "); i >= 0 {
- finfo.xmlns, tag = tag[:i], tag[i+1:]
- }
-
- // Parse flags.
- tokens := strings.Split(tag, ",")
- if len(tokens) == 1 {
- finfo.flags = fElement
- } else {
- tag = tokens[0]
- for _, flag := range tokens[1:] {
- switch flag {
- case "attr":
- finfo.flags |= fAttr
- case "chardata":
- finfo.flags |= fCharData
- case "innerxml":
- finfo.flags |= fInnerXml
- case "comment":
- finfo.flags |= fComment
- case "any":
- finfo.flags |= fAny
- case "omitempty":
- finfo.flags |= fOmitEmpty
- }
- }
-
- // Validate the flags used.
- valid := true
- switch mode := finfo.flags & fMode; mode {
- case 0:
- finfo.flags |= fElement
- case fAttr, fCharData, fInnerXml, fComment, fAny:
- if f.Name == "XMLName" || tag != "" && mode != fAttr {
- valid = false
- }
- default:
- // This will also catch multiple modes in a single field.
- valid = false
- }
- if finfo.flags&fMode == fAny {
- finfo.flags |= fElement
- }
- if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 {
- valid = false
- }
- if !valid {
- return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q",
- f.Name, typ, f.Tag.Get("xml"))
- }
- }
-
- // Use of xmlns without a name is not allowed.
- if finfo.xmlns != "" && tag == "" {
- return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q",
- f.Name, typ, f.Tag.Get("xml"))
- }
-
- if f.Name == "XMLName" {
- // The XMLName field records the XML element name. Don't
- // process it as usual because its name should default to
- // empty rather than to the field name.
- finfo.name = tag
- return finfo, nil
- }
-
- if tag == "" {
- // If the name part of the tag is completely empty, get
- // default from XMLName of underlying struct if feasible,
- // or field name otherwise.
- if xmlname := lookupXMLName(f.Type); xmlname != nil {
- finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name
- } else {
- finfo.name = f.Name
- }
- return finfo, nil
- }
-
- if finfo.xmlns == "" && finfo.flags&fAttr == 0 {
- // If it's an element no namespace specified, get the default
- // from the XMLName of enclosing struct if possible.
- if xmlname := lookupXMLName(typ); xmlname != nil {
- finfo.xmlns = xmlname.xmlns
- }
- }
-
- // Prepare field name and parents.
- parents := strings.Split(tag, ">")
- if parents[0] == "" {
- parents[0] = f.Name
- }
- if parents[len(parents)-1] == "" {
- return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ)
- }
- finfo.name = parents[len(parents)-1]
- if len(parents) > 1 {
- if (finfo.flags & fElement) == 0 {
- return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ","))
- }
- finfo.parents = parents[:len(parents)-1]
- }
-
- // If the field type has an XMLName field, the names must match
- // so that the behavior of both marshalling and unmarshalling
- // is straightforward and unambiguous.
- if finfo.flags&fElement != 0 {
- ftyp := f.Type
- xmlname := lookupXMLName(ftyp)
- if xmlname != nil && xmlname.name != finfo.name {
- return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName",
- finfo.name, typ, f.Name, xmlname.name, ftyp)
- }
- }
- return finfo, nil
-}
-
-// lookupXMLName returns the fieldInfo for typ's XMLName field
-// in case it exists and has a valid xml field tag, otherwise
-// it returns nil.
-func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) {
- for typ.Kind() == reflect.Ptr {
- typ = typ.Elem()
- }
- if typ.Kind() != reflect.Struct {
- return nil
- }
- for i, n := 0, typ.NumField(); i < n; i++ {
- f := typ.Field(i)
- if f.Name != "XMLName" {
- continue
- }
- finfo, err := structFieldInfo(typ, &f)
- if finfo.name != "" && err == nil {
- return finfo
- }
- // Also consider errors as a non-existent field tag
- // and let getTypeInfo itself report the error.
- break
- }
- return nil
-}
-
-func min(a, b int) int {
- if a <= b {
- return a
- }
- return b
-}
-
-// addFieldInfo adds finfo to tinfo.fields if there are no
-// conflicts, or if conflicts arise from previous fields that were
-// obtained from deeper embedded structures than finfo. In the latter
-// case, the conflicting entries are dropped.
-// A conflict occurs when the path (parent + name) to a field is
-// itself a prefix of another path, or when two paths match exactly.
-// It is okay for field paths to share a common, shorter prefix.
-func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error {
- var conflicts []int
-Loop:
- // First, figure all conflicts. Most working code will have none.
- for i := range tinfo.fields {
- oldf := &tinfo.fields[i]
- if oldf.flags&fMode != newf.flags&fMode {
- continue
- }
- if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns {
- continue
- }
- minl := min(len(newf.parents), len(oldf.parents))
- for p := 0; p < minl; p++ {
- if oldf.parents[p] != newf.parents[p] {
- continue Loop
- }
- }
- if len(oldf.parents) > len(newf.parents) {
- if oldf.parents[len(newf.parents)] == newf.name {
- conflicts = append(conflicts, i)
- }
- } else if len(oldf.parents) < len(newf.parents) {
- if newf.parents[len(oldf.parents)] == oldf.name {
- conflicts = append(conflicts, i)
- }
- } else {
- if newf.name == oldf.name {
- conflicts = append(conflicts, i)
- }
- }
- }
- // Without conflicts, add the new field and return.
- if conflicts == nil {
- tinfo.fields = append(tinfo.fields, *newf)
- return nil
- }
-
- // If any conflict is shallower, ignore the new field.
- // This matches the Go field resolution on embedding.
- for _, i := range conflicts {
- if len(tinfo.fields[i].idx) < len(newf.idx) {
- return nil
- }
- }
-
- // Otherwise, if any of them is at the same depth level, it's an error.
- for _, i := range conflicts {
- oldf := &tinfo.fields[i]
- if len(oldf.idx) == len(newf.idx) {
- f1 := typ.FieldByIndex(oldf.idx)
- f2 := typ.FieldByIndex(newf.idx)
- return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")}
- }
- }
-
- // Otherwise, the new field is shallower, and thus takes precedence,
- // so drop the conflicting fields from tinfo and append the new one.
- for c := len(conflicts) - 1; c >= 0; c-- {
- i := conflicts[c]
- copy(tinfo.fields[i:], tinfo.fields[i+1:])
- tinfo.fields = tinfo.fields[:len(tinfo.fields)-1]
- }
- tinfo.fields = append(tinfo.fields, *newf)
- return nil
-}
-
-// A TagPathError represents an error in the unmarshalling process
-// caused by the use of field tags with conflicting paths.
-type TagPathError struct {
- Struct reflect.Type
- Field1, Tag1 string
- Field2, Tag2 string
-}
-
-func (e *TagPathError) Error() string {
- return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2)
-}
-
-// value returns v's field value corresponding to finfo.
-// It's equivalent to v.FieldByIndex(finfo.idx), but initializes
-// and dereferences pointers as necessary.
-func (finfo *fieldInfo) value(v reflect.Value) reflect.Value {
- for i, x := range finfo.idx {
- if i > 0 {
- t := v.Type()
- if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct {
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- v = v.Elem()
- }
- }
- v = v.Field(x)
- }
- return v
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml.go
deleted file mode 100644
index 5b79cbecb..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml.go
+++ /dev/null
@@ -1,1998 +0,0 @@
-// Copyright 2009 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 file.
-
-// Package xml implements a simple XML 1.0 parser that
-// understands XML name spaces.
-package xml
-
-// References:
-// Annotated XML spec: http://www.xml.com/axml/testaxml.htm
-// XML name spaces: http://www.w3.org/TR/REC-xml-names/
-
-// TODO(rsc):
-// Test error handling.
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "io"
- "strconv"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-// A SyntaxError represents a syntax error in the XML input stream.
-type SyntaxError struct {
- Msg string
- Line int
-}
-
-func (e *SyntaxError) Error() string {
- return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg
-}
-
-// A Name represents an XML name (Local) annotated with a name space
-// identifier (Space). In tokens returned by Decoder.Token, the Space
-// identifier is given as a canonical URL, not the short prefix used in
-// the document being parsed.
-//
-// As a special case, XML namespace declarations will use the literal
-// string "xmlns" for the Space field instead of the fully resolved URL.
-// See Encoder.EncodeToken for more information on namespace encoding
-// behaviour.
-type Name struct {
- Space, Local string
-}
-
-// isNamespace reports whether the name is a namespace-defining name.
-func (name Name) isNamespace() bool {
- return name.Local == "xmlns" || name.Space == "xmlns"
-}
-
-// An Attr represents an attribute in an XML element (Name=Value).
-type Attr struct {
- Name Name
- Value string
-}
-
-// A Token is an interface holding one of the token types:
-// StartElement, EndElement, CharData, Comment, ProcInst, or Directive.
-type Token interface{}
-
-// A StartElement represents an XML start element.
-type StartElement struct {
- Name Name
- Attr []Attr
-}
-
-func (e StartElement) Copy() StartElement {
- attrs := make([]Attr, len(e.Attr))
- copy(attrs, e.Attr)
- e.Attr = attrs
- return e
-}
-
-// End returns the corresponding XML end element.
-func (e StartElement) End() EndElement {
- return EndElement{e.Name}
-}
-
-// setDefaultNamespace sets the namespace of the element
-// as the default for all elements contained within it.
-func (e *StartElement) setDefaultNamespace() {
- if e.Name.Space == "" {
- // If there's no namespace on the element, don't
- // set the default. Strictly speaking this might be wrong, as
- // we can't tell if the element had no namespace set
- // or was just using the default namespace.
- return
- }
- // Don't add a default name space if there's already one set.
- for _, attr := range e.Attr {
- if attr.Name.Space == "" && attr.Name.Local == "xmlns" {
- return
- }
- }
- e.Attr = append(e.Attr, Attr{
- Name: Name{
- Local: "xmlns",
- },
- Value: e.Name.Space,
- })
-}
-
-// An EndElement represents an XML end element.
-type EndElement struct {
- Name Name
-}
-
-// A CharData represents XML character data (raw text),
-// in which XML escape sequences have been replaced by
-// the characters they represent.
-type CharData []byte
-
-func makeCopy(b []byte) []byte {
- b1 := make([]byte, len(b))
- copy(b1, b)
- return b1
-}
-
-func (c CharData) Copy() CharData { return CharData(makeCopy(c)) }
-
-// A Comment represents an XML comment of the form <!--comment-->.
-// The bytes do not include the <!-- and --> comment markers.
-type Comment []byte
-
-func (c Comment) Copy() Comment { return Comment(makeCopy(c)) }
-
-// A ProcInst represents an XML processing instruction of the form <?target inst?>
-type ProcInst struct {
- Target string
- Inst []byte
-}
-
-func (p ProcInst) Copy() ProcInst {
- p.Inst = makeCopy(p.Inst)
- return p
-}
-
-// A Directive represents an XML directive of the form <!text>.
-// The bytes do not include the <! and > markers.
-type Directive []byte
-
-func (d Directive) Copy() Directive { return Directive(makeCopy(d)) }
-
-// CopyToken returns a copy of a Token.
-func CopyToken(t Token) Token {
- switch v := t.(type) {
- case CharData:
- return v.Copy()
- case Comment:
- return v.Copy()
- case Directive:
- return v.Copy()
- case ProcInst:
- return v.Copy()
- case StartElement:
- return v.Copy()
- }
- return t
-}
-
-// A Decoder represents an XML parser reading a particular input stream.
-// The parser assumes that its input is encoded in UTF-8.
-type Decoder struct {
- // Strict defaults to true, enforcing the requirements
- // of the XML specification.
- // If set to false, the parser allows input containing common
- // mistakes:
- // * If an element is missing an end tag, the parser invents
- // end tags as necessary to keep the return values from Token
- // properly balanced.
- // * In attribute values and character data, unknown or malformed
- // character entities (sequences beginning with &) are left alone.
- //
- // Setting:
- //
- // d.Strict = false;
- // d.AutoClose = HTMLAutoClose;
- // d.Entity = HTMLEntity
- //
- // creates a parser that can handle typical HTML.
- //
- // Strict mode does not enforce the requirements of the XML name spaces TR.
- // In particular it does not reject name space tags using undefined prefixes.
- // Such tags are recorded with the unknown prefix as the name space URL.
- Strict bool
-
- // When Strict == false, AutoClose indicates a set of elements to
- // consider closed immediately after they are opened, regardless
- // of whether an end element is present.
- AutoClose []string
-
- // Entity can be used to map non-standard entity names to string replacements.
- // The parser behaves as if these standard mappings are present in the map,
- // regardless of the actual map content:
- //
- // "lt": "<",
- // "gt": ">",
- // "amp": "&",
- // "apos": "'",
- // "quot": `"`,
- Entity map[string]string
-
- // CharsetReader, if non-nil, defines a function to generate
- // charset-conversion readers, converting from the provided
- // non-UTF-8 charset into UTF-8. If CharsetReader is nil or
- // returns an error, parsing stops with an error. One of the
- // the CharsetReader's result values must be non-nil.
- CharsetReader func(charset string, input io.Reader) (io.Reader, error)
-
- // DefaultSpace sets the default name space used for unadorned tags,
- // as if the entire XML stream were wrapped in an element containing
- // the attribute xmlns="DefaultSpace".
- DefaultSpace string
-
- r io.ByteReader
- buf bytes.Buffer
- saved *bytes.Buffer
- stk *stack
- free *stack
- needClose bool
- toClose Name
- nextToken Token
- nextByte int
- ns map[string]string
- err error
- line int
- offset int64
- unmarshalDepth int
-}
-
-// NewDecoder creates a new XML parser reading from r.
-// If r does not implement io.ByteReader, NewDecoder will
-// do its own buffering.
-func NewDecoder(r io.Reader) *Decoder {
- d := &Decoder{
- ns: make(map[string]string),
- nextByte: -1,
- line: 1,
- Strict: true,
- }
- d.switchToReader(r)
- return d
-}
-
-// Token returns the next XML token in the input stream.
-// At the end of the input stream, Token returns nil, io.EOF.
-//
-// Slices of bytes in the returned token data refer to the
-// parser's internal buffer and remain valid only until the next
-// call to Token. To acquire a copy of the bytes, call CopyToken
-// or the token's Copy method.
-//
-// Token expands self-closing elements such as <br/>
-// into separate start and end elements returned by successive calls.
-//
-// Token guarantees that the StartElement and EndElement
-// tokens it returns are properly nested and matched:
-// if Token encounters an unexpected end element,
-// it will return an error.
-//
-// Token implements XML name spaces as described by
-// http://www.w3.org/TR/REC-xml-names/. Each of the
-// Name structures contained in the Token has the Space
-// set to the URL identifying its name space when known.
-// If Token encounters an unrecognized name space prefix,
-// it uses the prefix as the Space rather than report an error.
-func (d *Decoder) Token() (t Token, err error) {
- if d.stk != nil && d.stk.kind == stkEOF {
- err = io.EOF
- return
- }
- if d.nextToken != nil {
- t = d.nextToken
- d.nextToken = nil
- } else if t, err = d.rawToken(); err != nil {
- return
- }
-
- if !d.Strict {
- if t1, ok := d.autoClose(t); ok {
- d.nextToken = t
- t = t1
- }
- }
- switch t1 := t.(type) {
- case StartElement:
- // In XML name spaces, the translations listed in the
- // attributes apply to the element name and
- // to the other attribute names, so process
- // the translations first.
- for _, a := range t1.Attr {
- if a.Name.Space == "xmlns" {
- v, ok := d.ns[a.Name.Local]
- d.pushNs(a.Name.Local, v, ok)
- d.ns[a.Name.Local] = a.Value
- }
- if a.Name.Space == "" && a.Name.Local == "xmlns" {
- // Default space for untagged names
- v, ok := d.ns[""]
- d.pushNs("", v, ok)
- d.ns[""] = a.Value
- }
- }
-
- d.translate(&t1.Name, true)
- for i := range t1.Attr {
- d.translate(&t1.Attr[i].Name, false)
- }
- d.pushElement(t1.Name)
- t = t1
-
- case EndElement:
- d.translate(&t1.Name, true)
- if !d.popElement(&t1) {
- return nil, d.err
- }
- t = t1
- }
- return
-}
-
-const xmlURL = "http://www.w3.org/XML/1998/namespace"
-
-// Apply name space translation to name n.
-// The default name space (for Space=="")
-// applies only to element names, not to attribute names.
-func (d *Decoder) translate(n *Name, isElementName bool) {
- switch {
- case n.Space == "xmlns":
- return
- case n.Space == "" && !isElementName:
- return
- case n.Space == "xml":
- n.Space = xmlURL
- case n.Space == "" && n.Local == "xmlns":
- return
- }
- if v, ok := d.ns[n.Space]; ok {
- n.Space = v
- } else if n.Space == "" {
- n.Space = d.DefaultSpace
- }
-}
-
-func (d *Decoder) switchToReader(r io.Reader) {
- // Get efficient byte at a time reader.
- // Assume that if reader has its own
- // ReadByte, it's efficient enough.
- // Otherwise, use bufio.
- if rb, ok := r.(io.ByteReader); ok {
- d.r = rb
- } else {
- d.r = bufio.NewReader(r)
- }
-}
-
-// Parsing state - stack holds old name space translations
-// and the current set of open elements. The translations to pop when
-// ending a given tag are *below* it on the stack, which is
-// more work but forced on us by XML.
-type stack struct {
- next *stack
- kind int
- name Name
- ok bool
-}
-
-const (
- stkStart = iota
- stkNs
- stkEOF
-)
-
-func (d *Decoder) push(kind int) *stack {
- s := d.free
- if s != nil {
- d.free = s.next
- } else {
- s = new(stack)
- }
- s.next = d.stk
- s.kind = kind
- d.stk = s
- return s
-}
-
-func (d *Decoder) pop() *stack {
- s := d.stk
- if s != nil {
- d.stk = s.next
- s.next = d.free
- d.free = s
- }
- return s
-}
-
-// Record that after the current element is finished
-// (that element is already pushed on the stack)
-// Token should return EOF until popEOF is called.
-func (d *Decoder) pushEOF() {
- // Walk down stack to find Start.
- // It might not be the top, because there might be stkNs
- // entries above it.
- start := d.stk
- for start.kind != stkStart {
- start = start.next
- }
- // The stkNs entries below a start are associated with that
- // element too; skip over them.
- for start.next != nil && start.next.kind == stkNs {
- start = start.next
- }
- s := d.free
- if s != nil {
- d.free = s.next
- } else {
- s = new(stack)
- }
- s.kind = stkEOF
- s.next = start.next
- start.next = s
-}
-
-// Undo a pushEOF.
-// The element must have been finished, so the EOF should be at the top of the stack.
-func (d *Decoder) popEOF() bool {
- if d.stk == nil || d.stk.kind != stkEOF {
- return false
- }
- d.pop()
- return true
-}
-
-// Record that we are starting an element with the given name.
-func (d *Decoder) pushElement(name Name) {
- s := d.push(stkStart)
- s.name = name
-}
-
-// Record that we are changing the value of ns[local].
-// The old value is url, ok.
-func (d *Decoder) pushNs(local string, url string, ok bool) {
- s := d.push(stkNs)
- s.name.Local = local
- s.name.Space = url
- s.ok = ok
-}
-
-// Creates a SyntaxError with the current line number.
-func (d *Decoder) syntaxError(msg string) error {
- return &SyntaxError{Msg: msg, Line: d.line}
-}
-
-// Record that we are ending an element with the given name.
-// The name must match the record at the top of the stack,
-// which must be a pushElement record.
-// After popping the element, apply any undo records from
-// the stack to restore the name translations that existed
-// before we saw this element.
-func (d *Decoder) popElement(t *EndElement) bool {
- s := d.pop()
- name := t.Name
- switch {
- case s == nil || s.kind != stkStart:
- d.err = d.syntaxError("unexpected end element </" + name.Local + ">")
- return false
- case s.name.Local != name.Local:
- if !d.Strict {
- d.needClose = true
- d.toClose = t.Name
- t.Name = s.name
- return true
- }
- d.err = d.syntaxError("element <" + s.name.Local + "> closed by </" + name.Local + ">")
- return false
- case s.name.Space != name.Space:
- d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space +
- "closed by </" + name.Local + "> in space " + name.Space)
- return false
- }
-
- // Pop stack until a Start or EOF is on the top, undoing the
- // translations that were associated with the element we just closed.
- for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF {
- s := d.pop()
- if s.ok {
- d.ns[s.name.Local] = s.name.Space
- } else {
- delete(d.ns, s.name.Local)
- }
- }
-
- return true
-}
-
-// If the top element on the stack is autoclosing and
-// t is not the end tag, invent the end tag.
-func (d *Decoder) autoClose(t Token) (Token, bool) {
- if d.stk == nil || d.stk.kind != stkStart {
- return nil, false
- }
- name := strings.ToLower(d.stk.name.Local)
- for _, s := range d.AutoClose {
- if strings.ToLower(s) == name {
- // This one should be auto closed if t doesn't close it.
- et, ok := t.(EndElement)
- if !ok || et.Name.Local != name {
- return EndElement{d.stk.name}, true
- }
- break
- }
- }
- return nil, false
-}
-
-var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method")
-
-// RawToken is like Token but does not verify that
-// start and end elements match and does not translate
-// name space prefixes to their corresponding URLs.
-func (d *Decoder) RawToken() (Token, error) {
- if d.unmarshalDepth > 0 {
- return nil, errRawToken
- }
- return d.rawToken()
-}
-
-func (d *Decoder) rawToken() (Token, error) {
- if d.err != nil {
- return nil, d.err
- }
- if d.needClose {
- // The last element we read was self-closing and
- // we returned just the StartElement half.
- // Return the EndElement half now.
- d.needClose = false
- return EndElement{d.toClose}, nil
- }
-
- b, ok := d.getc()
- if !ok {
- return nil, d.err
- }
-
- if b != '<' {
- // Text section.
- d.ungetc(b)
- data := d.text(-1, false)
- if data == nil {
- return nil, d.err
- }
- return CharData(data), nil
- }
-
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- switch b {
- case '/':
- // </: End element
- var name Name
- if name, ok = d.nsname(); !ok {
- if d.err == nil {
- d.err = d.syntaxError("expected element name after </")
- }
- return nil, d.err
- }
- d.space()
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != '>' {
- d.err = d.syntaxError("invalid characters between </" + name.Local + " and >")
- return nil, d.err
- }
- return EndElement{name}, nil
-
- case '?':
- // <?: Processing instruction.
- var target string
- if target, ok = d.name(); !ok {
- if d.err == nil {
- d.err = d.syntaxError("expected target name after <?")
- }
- return nil, d.err
- }
- d.space()
- d.buf.Reset()
- var b0 byte
- for {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- d.buf.WriteByte(b)
- if b0 == '?' && b == '>' {
- break
- }
- b0 = b
- }
- data := d.buf.Bytes()
- data = data[0 : len(data)-2] // chop ?>
-
- if target == "xml" {
- content := string(data)
- ver := procInst("version", content)
- if ver != "" && ver != "1.0" {
- d.err = fmt.Errorf("xml: unsupported version %q; only version 1.0 is supported", ver)
- return nil, d.err
- }
- enc := procInst("encoding", content)
- if enc != "" && enc != "utf-8" && enc != "UTF-8" {
- if d.CharsetReader == nil {
- d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc)
- return nil, d.err
- }
- newr, err := d.CharsetReader(enc, d.r.(io.Reader))
- if err != nil {
- d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err)
- return nil, d.err
- }
- if newr == nil {
- panic("CharsetReader returned a nil Reader for charset " + enc)
- }
- d.switchToReader(newr)
- }
- }
- return ProcInst{target, data}, nil
-
- case '!':
- // <!: Maybe comment, maybe CDATA.
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- switch b {
- case '-': // <!-
- // Probably <!-- for a comment.
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != '-' {
- d.err = d.syntaxError("invalid sequence <!- not part of <!--")
- return nil, d.err
- }
- // Look for terminator.
- d.buf.Reset()
- var b0, b1 byte
- for {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- d.buf.WriteByte(b)
- if b0 == '-' && b1 == '-' && b == '>' {
- break
- }
- b0, b1 = b1, b
- }
- data := d.buf.Bytes()
- data = data[0 : len(data)-3] // chop -->
- return Comment(data), nil
-
- case '[': // <![
- // Probably <![CDATA[.
- for i := 0; i < 6; i++ {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != "CDATA["[i] {
- d.err = d.syntaxError("invalid <![ sequence")
- return nil, d.err
- }
- }
- // Have <![CDATA[. Read text until ]]>.
- data := d.text(-1, true)
- if data == nil {
- return nil, d.err
- }
- return CharData(data), nil
- }
-
- // Probably a directive: <!DOCTYPE ...>, <!ENTITY ...>, etc.
- // We don't care, but accumulate for caller. Quoted angle
- // brackets do not count for nesting.
- d.buf.Reset()
- d.buf.WriteByte(b)
- inquote := uint8(0)
- depth := 0
- for {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if inquote == 0 && b == '>' && depth == 0 {
- break
- }
- HandleB:
- d.buf.WriteByte(b)
- switch {
- case b == inquote:
- inquote = 0
-
- case inquote != 0:
- // in quotes, no special action
-
- case b == '\'' || b == '"':
- inquote = b
-
- case b == '>' && inquote == 0:
- depth--
-
- case b == '<' && inquote == 0:
- // Look for <!-- to begin comment.
- s := "!--"
- for i := 0; i < len(s); i++ {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != s[i] {
- for j := 0; j < i; j++ {
- d.buf.WriteByte(s[j])
- }
- depth++
- goto HandleB
- }
- }
-
- // Remove < that was written above.
- d.buf.Truncate(d.buf.Len() - 1)
-
- // Look for terminator.
- var b0, b1 byte
- for {
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b0 == '-' && b1 == '-' && b == '>' {
- break
- }
- b0, b1 = b1, b
- }
- }
- }
- return Directive(d.buf.Bytes()), nil
- }
-
- // Must be an open element like <a href="foo">
- d.ungetc(b)
-
- var (
- name Name
- empty bool
- attr []Attr
- )
- if name, ok = d.nsname(); !ok {
- if d.err == nil {
- d.err = d.syntaxError("expected element name after <")
- }
- return nil, d.err
- }
-
- attr = []Attr{}
- for {
- d.space()
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b == '/' {
- empty = true
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != '>' {
- d.err = d.syntaxError("expected /> in element")
- return nil, d.err
- }
- break
- }
- if b == '>' {
- break
- }
- d.ungetc(b)
-
- n := len(attr)
- if n >= cap(attr) {
- nCap := 2 * cap(attr)
- if nCap == 0 {
- nCap = 4
- }
- nattr := make([]Attr, n, nCap)
- copy(nattr, attr)
- attr = nattr
- }
- attr = attr[0 : n+1]
- a := &attr[n]
- if a.Name, ok = d.nsname(); !ok {
- if d.err == nil {
- d.err = d.syntaxError("expected attribute name in element")
- }
- return nil, d.err
- }
- d.space()
- if b, ok = d.mustgetc(); !ok {
- return nil, d.err
- }
- if b != '=' {
- if d.Strict {
- d.err = d.syntaxError("attribute name without = in element")
- return nil, d.err
- } else {
- d.ungetc(b)
- a.Value = a.Name.Local
- }
- } else {
- d.space()
- data := d.attrval()
- if data == nil {
- return nil, d.err
- }
- a.Value = string(data)
- }
- }
- if empty {
- d.needClose = true
- d.toClose = name
- }
- return StartElement{name, attr}, nil
-}
-
-func (d *Decoder) attrval() []byte {
- b, ok := d.mustgetc()
- if !ok {
- return nil
- }
- // Handle quoted attribute values
- if b == '"' || b == '\'' {
- return d.text(int(b), false)
- }
- // Handle unquoted attribute values for strict parsers
- if d.Strict {
- d.err = d.syntaxError("unquoted or missing attribute value in element")
- return nil
- }
- // Handle unquoted attribute values for unstrict parsers
- d.ungetc(b)
- d.buf.Reset()
- for {
- b, ok = d.mustgetc()
- if !ok {
- return nil
- }
- // http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2
- if 'a' <= b && b <= 'z' || 'A' <= b && b <= 'Z' ||
- '0' <= b && b <= '9' || b == '_' || b == ':' || b == '-' {
- d.buf.WriteByte(b)
- } else {
- d.ungetc(b)
- break
- }
- }
- return d.buf.Bytes()
-}
-
-// Skip spaces if any
-func (d *Decoder) space() {
- for {
- b, ok := d.getc()
- if !ok {
- return
- }
- switch b {
- case ' ', '\r', '\n', '\t':
- default:
- d.ungetc(b)
- return
- }
- }
-}
-
-// Read a single byte.
-// If there is no byte to read, return ok==false
-// and leave the error in d.err.
-// Maintain line number.
-func (d *Decoder) getc() (b byte, ok bool) {
- if d.err != nil {
- return 0, false
- }
- if d.nextByte >= 0 {
- b = byte(d.nextByte)
- d.nextByte = -1
- } else {
- b, d.err = d.r.ReadByte()
- if d.err != nil {
- return 0, false
- }
- if d.saved != nil {
- d.saved.WriteByte(b)
- }
- }
- if b == '\n' {
- d.line++
- }
- d.offset++
- return b, true
-}
-
-// InputOffset returns the input stream byte offset of the current decoder position.
-// The offset gives the location of the end of the most recently returned token
-// and the beginning of the next token.
-func (d *Decoder) InputOffset() int64 {
- return d.offset
-}
-
-// Return saved offset.
-// If we did ungetc (nextByte >= 0), have to back up one.
-func (d *Decoder) savedOffset() int {
- n := d.saved.Len()
- if d.nextByte >= 0 {
- n--
- }
- return n
-}
-
-// Must read a single byte.
-// If there is no byte to read,
-// set d.err to SyntaxError("unexpected EOF")
-// and return ok==false
-func (d *Decoder) mustgetc() (b byte, ok bool) {
- if b, ok = d.getc(); !ok {
- if d.err == io.EOF {
- d.err = d.syntaxError("unexpected EOF")
- }
- }
- return
-}
-
-// Unread a single byte.
-func (d *Decoder) ungetc(b byte) {
- if b == '\n' {
- d.line--
- }
- d.nextByte = int(b)
- d.offset--
-}
-
-var entity = map[string]int{
- "lt": '<',
- "gt": '>',
- "amp": '&',
- "apos": '\'',
- "quot": '"',
-}
-
-// Read plain text section (XML calls it character data).
-// If quote >= 0, we are in a quoted string and need to find the matching quote.
-// If cdata == true, we are in a <![CDATA[ section and need to find ]]>.
-// On failure return nil and leave the error in d.err.
-func (d *Decoder) text(quote int, cdata bool) []byte {
- var b0, b1 byte
- var trunc int
- d.buf.Reset()
-Input:
- for {
- b, ok := d.getc()
- if !ok {
- if cdata {
- if d.err == io.EOF {
- d.err = d.syntaxError("unexpected EOF in CDATA section")
- }
- return nil
- }
- break Input
- }
-
- // <![CDATA[ section ends with ]]>.
- // It is an error for ]]> to appear in ordinary text.
- if b0 == ']' && b1 == ']' && b == '>' {
- if cdata {
- trunc = 2
- break Input
- }
- d.err = d.syntaxError("unescaped ]]> not in CDATA section")
- return nil
- }
-
- // Stop reading text if we see a <.
- if b == '<' && !cdata {
- if quote >= 0 {
- d.err = d.syntaxError("unescaped < inside quoted string")
- return nil
- }
- d.ungetc('<')
- break Input
- }
- if quote >= 0 && b == byte(quote) {
- break Input
- }
- if b == '&' && !cdata {
- // Read escaped character expression up to semicolon.
- // XML in all its glory allows a document to define and use
- // its own character names with <!ENTITY ...> directives.
- // Parsers are required to recognize lt, gt, amp, apos, and quot
- // even if they have not been declared.
- before := d.buf.Len()
- d.buf.WriteByte('&')
- var ok bool
- var text string
- var haveText bool
- if b, ok = d.mustgetc(); !ok {
- return nil
- }
- if b == '#' {
- d.buf.WriteByte(b)
- if b, ok = d.mustgetc(); !ok {
- return nil
- }
- base := 10
- if b == 'x' {
- base = 16
- d.buf.WriteByte(b)
- if b, ok = d.mustgetc(); !ok {
- return nil
- }
- }
- start := d.buf.Len()
- for '0' <= b && b <= '9' ||
- base == 16 && 'a' <= b && b <= 'f' ||
- base == 16 && 'A' <= b && b <= 'F' {
- d.buf.WriteByte(b)
- if b, ok = d.mustgetc(); !ok {
- return nil
- }
- }
- if b != ';' {
- d.ungetc(b)
- } else {
- s := string(d.buf.Bytes()[start:])
- d.buf.WriteByte(';')
- n, err := strconv.ParseUint(s, base, 64)
- if err == nil && n <= unicode.MaxRune {
- text = string(n)
- haveText = true
- }
- }
- } else {
- d.ungetc(b)
- if !d.readName() {
- if d.err != nil {
- return nil
- }
- ok = false
- }
- if b, ok = d.mustgetc(); !ok {
- return nil
- }
- if b != ';' {
- d.ungetc(b)
- } else {
- name := d.buf.Bytes()[before+1:]
- d.buf.WriteByte(';')
- if isName(name) {
- s := string(name)
- if r, ok := entity[s]; ok {
- text = string(r)
- haveText = true
- } else if d.Entity != nil {
- text, haveText = d.Entity[s]
- }
- }
- }
- }
-
- if haveText {
- d.buf.Truncate(before)
- d.buf.Write([]byte(text))
- b0, b1 = 0, 0
- continue Input
- }
- if !d.Strict {
- b0, b1 = 0, 0
- continue Input
- }
- ent := string(d.buf.Bytes()[before:])
- if ent[len(ent)-1] != ';' {
- ent += " (no semicolon)"
- }
- d.err = d.syntaxError("invalid character entity " + ent)
- return nil
- }
-
- // We must rewrite unescaped \r and \r\n into \n.
- if b == '\r' {
- d.buf.WriteByte('\n')
- } else if b1 == '\r' && b == '\n' {
- // Skip \r\n--we already wrote \n.
- } else {
- d.buf.WriteByte(b)
- }
-
- b0, b1 = b1, b
- }
- data := d.buf.Bytes()
- data = data[0 : len(data)-trunc]
-
- // Inspect each rune for being a disallowed character.
- buf := data
- for len(buf) > 0 {
- r, size := utf8.DecodeRune(buf)
- if r == utf8.RuneError && size == 1 {
- d.err = d.syntaxError("invalid UTF-8")
- return nil
- }
- buf = buf[size:]
- if !isInCharacterRange(r) {
- d.err = d.syntaxError(fmt.Sprintf("illegal character code %U", r))
- return nil
- }
- }
-
- return data
-}
-
-// Decide whether the given rune is in the XML Character Range, per
-// the Char production of http://www.xml.com/axml/testaxml.htm,
-// Section 2.2 Characters.
-func isInCharacterRange(r rune) (inrange bool) {
- return r == 0x09 ||
- r == 0x0A ||
- r == 0x0D ||
- r >= 0x20 && r <= 0xDF77 ||
- r >= 0xE000 && r <= 0xFFFD ||
- r >= 0x10000 && r <= 0x10FFFF
-}
-
-// Get name space name: name with a : stuck in the middle.
-// The part before the : is the name space identifier.
-func (d *Decoder) nsname() (name Name, ok bool) {
- s, ok := d.name()
- if !ok {
- return
- }
- i := strings.Index(s, ":")
- if i < 0 {
- name.Local = s
- } else {
- name.Space = s[0:i]
- name.Local = s[i+1:]
- }
- return name, true
-}
-
-// Get name: /first(first|second)*/
-// Do not set d.err if the name is missing (unless unexpected EOF is received):
-// let the caller provide better context.
-func (d *Decoder) name() (s string, ok bool) {
- d.buf.Reset()
- if !d.readName() {
- return "", false
- }
-
- // Now we check the characters.
- b := d.buf.Bytes()
- if !isName(b) {
- d.err = d.syntaxError("invalid XML name: " + string(b))
- return "", false
- }
- return string(b), true
-}
-
-// Read a name and append its bytes to d.buf.
-// The name is delimited by any single-byte character not valid in names.
-// All multi-byte characters are accepted; the caller must check their validity.
-func (d *Decoder) readName() (ok bool) {
- var b byte
- if b, ok = d.mustgetc(); !ok {
- return
- }
- if b < utf8.RuneSelf && !isNameByte(b) {
- d.ungetc(b)
- return false
- }
- d.buf.WriteByte(b)
-
- for {
- if b, ok = d.mustgetc(); !ok {
- return
- }
- if b < utf8.RuneSelf && !isNameByte(b) {
- d.ungetc(b)
- break
- }
- d.buf.WriteByte(b)
- }
- return true
-}
-
-func isNameByte(c byte) bool {
- return 'A' <= c && c <= 'Z' ||
- 'a' <= c && c <= 'z' ||
- '0' <= c && c <= '9' ||
- c == '_' || c == ':' || c == '.' || c == '-'
-}
-
-func isName(s []byte) bool {
- if len(s) == 0 {
- return false
- }
- c, n := utf8.DecodeRune(s)
- if c == utf8.RuneError && n == 1 {
- return false
- }
- if !unicode.Is(first, c) {
- return false
- }
- for n < len(s) {
- s = s[n:]
- c, n = utf8.DecodeRune(s)
- if c == utf8.RuneError && n == 1 {
- return false
- }
- if !unicode.Is(first, c) && !unicode.Is(second, c) {
- return false
- }
- }
- return true
-}
-
-func isNameString(s string) bool {
- if len(s) == 0 {
- return false
- }
- c, n := utf8.DecodeRuneInString(s)
- if c == utf8.RuneError && n == 1 {
- return false
- }
- if !unicode.Is(first, c) {
- return false
- }
- for n < len(s) {
- s = s[n:]
- c, n = utf8.DecodeRuneInString(s)
- if c == utf8.RuneError && n == 1 {
- return false
- }
- if !unicode.Is(first, c) && !unicode.Is(second, c) {
- return false
- }
- }
- return true
-}
-
-// These tables were generated by cut and paste from Appendix B of
-// the XML spec at http://www.xml.com/axml/testaxml.htm
-// and then reformatting. First corresponds to (Letter | '_' | ':')
-// and second corresponds to NameChar.
-
-var first = &unicode.RangeTable{
- R16: []unicode.Range16{
- {0x003A, 0x003A, 1},
- {0x0041, 0x005A, 1},
- {0x005F, 0x005F, 1},
- {0x0061, 0x007A, 1},
- {0x00C0, 0x00D6, 1},
- {0x00D8, 0x00F6, 1},
- {0x00F8, 0x00FF, 1},
- {0x0100, 0x0131, 1},
- {0x0134, 0x013E, 1},
- {0x0141, 0x0148, 1},
- {0x014A, 0x017E, 1},
- {0x0180, 0x01C3, 1},
- {0x01CD, 0x01F0, 1},
- {0x01F4, 0x01F5, 1},
- {0x01FA, 0x0217, 1},
- {0x0250, 0x02A8, 1},
- {0x02BB, 0x02C1, 1},
- {0x0386, 0x0386, 1},
- {0x0388, 0x038A, 1},
- {0x038C, 0x038C, 1},
- {0x038E, 0x03A1, 1},
- {0x03A3, 0x03CE, 1},
- {0x03D0, 0x03D6, 1},
- {0x03DA, 0x03E0, 2},
- {0x03E2, 0x03F3, 1},
- {0x0401, 0x040C, 1},
- {0x040E, 0x044F, 1},
- {0x0451, 0x045C, 1},
- {0x045E, 0x0481, 1},
- {0x0490, 0x04C4, 1},
- {0x04C7, 0x04C8, 1},
- {0x04CB, 0x04CC, 1},
- {0x04D0, 0x04EB, 1},
- {0x04EE, 0x04F5, 1},
- {0x04F8, 0x04F9, 1},
- {0x0531, 0x0556, 1},
- {0x0559, 0x0559, 1},
- {0x0561, 0x0586, 1},
- {0x05D0, 0x05EA, 1},
- {0x05F0, 0x05F2, 1},
- {0x0621, 0x063A, 1},
- {0x0641, 0x064A, 1},
- {0x0671, 0x06B7, 1},
- {0x06BA, 0x06BE, 1},
- {0x06C0, 0x06CE, 1},
- {0x06D0, 0x06D3, 1},
- {0x06D5, 0x06D5, 1},
- {0x06E5, 0x06E6, 1},
- {0x0905, 0x0939, 1},
- {0x093D, 0x093D, 1},
- {0x0958, 0x0961, 1},
- {0x0985, 0x098C, 1},
- {0x098F, 0x0990, 1},
- {0x0993, 0x09A8, 1},
- {0x09AA, 0x09B0, 1},
- {0x09B2, 0x09B2, 1},
- {0x09B6, 0x09B9, 1},
- {0x09DC, 0x09DD, 1},
- {0x09DF, 0x09E1, 1},
- {0x09F0, 0x09F1, 1},
- {0x0A05, 0x0A0A, 1},
- {0x0A0F, 0x0A10, 1},
- {0x0A13, 0x0A28, 1},
- {0x0A2A, 0x0A30, 1},
- {0x0A32, 0x0A33, 1},
- {0x0A35, 0x0A36, 1},
- {0x0A38, 0x0A39, 1},
- {0x0A59, 0x0A5C, 1},
- {0x0A5E, 0x0A5E, 1},
- {0x0A72, 0x0A74, 1},
- {0x0A85, 0x0A8B, 1},
- {0x0A8D, 0x0A8D, 1},
- {0x0A8F, 0x0A91, 1},
- {0x0A93, 0x0AA8, 1},
- {0x0AAA, 0x0AB0, 1},
- {0x0AB2, 0x0AB3, 1},
- {0x0AB5, 0x0AB9, 1},
- {0x0ABD, 0x0AE0, 0x23},
- {0x0B05, 0x0B0C, 1},
- {0x0B0F, 0x0B10, 1},
- {0x0B13, 0x0B28, 1},
- {0x0B2A, 0x0B30, 1},
- {0x0B32, 0x0B33, 1},
- {0x0B36, 0x0B39, 1},
- {0x0B3D, 0x0B3D, 1},
- {0x0B5C, 0x0B5D, 1},
- {0x0B5F, 0x0B61, 1},
- {0x0B85, 0x0B8A, 1},
- {0x0B8E, 0x0B90, 1},
- {0x0B92, 0x0B95, 1},
- {0x0B99, 0x0B9A, 1},
- {0x0B9C, 0x0B9C, 1},
- {0x0B9E, 0x0B9F, 1},
- {0x0BA3, 0x0BA4, 1},
- {0x0BA8, 0x0BAA, 1},
- {0x0BAE, 0x0BB5, 1},
- {0x0BB7, 0x0BB9, 1},
- {0x0C05, 0x0C0C, 1},
- {0x0C0E, 0x0C10, 1},
- {0x0C12, 0x0C28, 1},
- {0x0C2A, 0x0C33, 1},
- {0x0C35, 0x0C39, 1},
- {0x0C60, 0x0C61, 1},
- {0x0C85, 0x0C8C, 1},
- {0x0C8E, 0x0C90, 1},
- {0x0C92, 0x0CA8, 1},
- {0x0CAA, 0x0CB3, 1},
- {0x0CB5, 0x0CB9, 1},
- {0x0CDE, 0x0CDE, 1},
- {0x0CE0, 0x0CE1, 1},
- {0x0D05, 0x0D0C, 1},
- {0x0D0E, 0x0D10, 1},
- {0x0D12, 0x0D28, 1},
- {0x0D2A, 0x0D39, 1},
- {0x0D60, 0x0D61, 1},
- {0x0E01, 0x0E2E, 1},
- {0x0E30, 0x0E30, 1},
- {0x0E32, 0x0E33, 1},
- {0x0E40, 0x0E45, 1},
- {0x0E81, 0x0E82, 1},
- {0x0E84, 0x0E84, 1},
- {0x0E87, 0x0E88, 1},
- {0x0E8A, 0x0E8D, 3},
- {0x0E94, 0x0E97, 1},
- {0x0E99, 0x0E9F, 1},
- {0x0EA1, 0x0EA3, 1},
- {0x0EA5, 0x0EA7, 2},
- {0x0EAA, 0x0EAB, 1},
- {0x0EAD, 0x0EAE, 1},
- {0x0EB0, 0x0EB0, 1},
- {0x0EB2, 0x0EB3, 1},
- {0x0EBD, 0x0EBD, 1},
- {0x0EC0, 0x0EC4, 1},
- {0x0F40, 0x0F47, 1},
- {0x0F49, 0x0F69, 1},
- {0x10A0, 0x10C5, 1},
- {0x10D0, 0x10F6, 1},
- {0x1100, 0x1100, 1},
- {0x1102, 0x1103, 1},
- {0x1105, 0x1107, 1},
- {0x1109, 0x1109, 1},
- {0x110B, 0x110C, 1},
- {0x110E, 0x1112, 1},
- {0x113C, 0x1140, 2},
- {0x114C, 0x1150, 2},
- {0x1154, 0x1155, 1},
- {0x1159, 0x1159, 1},
- {0x115F, 0x1161, 1},
- {0x1163, 0x1169, 2},
- {0x116D, 0x116E, 1},
- {0x1172, 0x1173, 1},
- {0x1175, 0x119E, 0x119E - 0x1175},
- {0x11A8, 0x11AB, 0x11AB - 0x11A8},
- {0x11AE, 0x11AF, 1},
- {0x11B7, 0x11B8, 1},
- {0x11BA, 0x11BA, 1},
- {0x11BC, 0x11C2, 1},
- {0x11EB, 0x11F0, 0x11F0 - 0x11EB},
- {0x11F9, 0x11F9, 1},
- {0x1E00, 0x1E9B, 1},
- {0x1EA0, 0x1EF9, 1},
- {0x1F00, 0x1F15, 1},
- {0x1F18, 0x1F1D, 1},
- {0x1F20, 0x1F45, 1},
- {0x1F48, 0x1F4D, 1},
- {0x1F50, 0x1F57, 1},
- {0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
- {0x1F5D, 0x1F5D, 1},
- {0x1F5F, 0x1F7D, 1},
- {0x1F80, 0x1FB4, 1},
- {0x1FB6, 0x1FBC, 1},
- {0x1FBE, 0x1FBE, 1},
- {0x1FC2, 0x1FC4, 1},
- {0x1FC6, 0x1FCC, 1},
- {0x1FD0, 0x1FD3, 1},
- {0x1FD6, 0x1FDB, 1},
- {0x1FE0, 0x1FEC, 1},
- {0x1FF2, 0x1FF4, 1},
- {0x1FF6, 0x1FFC, 1},
- {0x2126, 0x2126, 1},
- {0x212A, 0x212B, 1},
- {0x212E, 0x212E, 1},
- {0x2180, 0x2182, 1},
- {0x3007, 0x3007, 1},
- {0x3021, 0x3029, 1},
- {0x3041, 0x3094, 1},
- {0x30A1, 0x30FA, 1},
- {0x3105, 0x312C, 1},
- {0x4E00, 0x9FA5, 1},
- {0xAC00, 0xD7A3, 1},
- },
-}
-
-var second = &unicode.RangeTable{
- R16: []unicode.Range16{
- {0x002D, 0x002E, 1},
- {0x0030, 0x0039, 1},
- {0x00B7, 0x00B7, 1},
- {0x02D0, 0x02D1, 1},
- {0x0300, 0x0345, 1},
- {0x0360, 0x0361, 1},
- {0x0387, 0x0387, 1},
- {0x0483, 0x0486, 1},
- {0x0591, 0x05A1, 1},
- {0x05A3, 0x05B9, 1},
- {0x05BB, 0x05BD, 1},
- {0x05BF, 0x05BF, 1},
- {0x05C1, 0x05C2, 1},
- {0x05C4, 0x0640, 0x0640 - 0x05C4},
- {0x064B, 0x0652, 1},
- {0x0660, 0x0669, 1},
- {0x0670, 0x0670, 1},
- {0x06D6, 0x06DC, 1},
- {0x06DD, 0x06DF, 1},
- {0x06E0, 0x06E4, 1},
- {0x06E7, 0x06E8, 1},
- {0x06EA, 0x06ED, 1},
- {0x06F0, 0x06F9, 1},
- {0x0901, 0x0903, 1},
- {0x093C, 0x093C, 1},
- {0x093E, 0x094C, 1},
- {0x094D, 0x094D, 1},
- {0x0951, 0x0954, 1},
- {0x0962, 0x0963, 1},
- {0x0966, 0x096F, 1},
- {0x0981, 0x0983, 1},
- {0x09BC, 0x09BC, 1},
- {0x09BE, 0x09BF, 1},
- {0x09C0, 0x09C4, 1},
- {0x09C7, 0x09C8, 1},
- {0x09CB, 0x09CD, 1},
- {0x09D7, 0x09D7, 1},
- {0x09E2, 0x09E3, 1},
- {0x09E6, 0x09EF, 1},
- {0x0A02, 0x0A3C, 0x3A},
- {0x0A3E, 0x0A3F, 1},
- {0x0A40, 0x0A42, 1},
- {0x0A47, 0x0A48, 1},
- {0x0A4B, 0x0A4D, 1},
- {0x0A66, 0x0A6F, 1},
- {0x0A70, 0x0A71, 1},
- {0x0A81, 0x0A83, 1},
- {0x0ABC, 0x0ABC, 1},
- {0x0ABE, 0x0AC5, 1},
- {0x0AC7, 0x0AC9, 1},
- {0x0ACB, 0x0ACD, 1},
- {0x0AE6, 0x0AEF, 1},
- {0x0B01, 0x0B03, 1},
- {0x0B3C, 0x0B3C, 1},
- {0x0B3E, 0x0B43, 1},
- {0x0B47, 0x0B48, 1},
- {0x0B4B, 0x0B4D, 1},
- {0x0B56, 0x0B57, 1},
- {0x0B66, 0x0B6F, 1},
- {0x0B82, 0x0B83, 1},
- {0x0BBE, 0x0BC2, 1},
- {0x0BC6, 0x0BC8, 1},
- {0x0BCA, 0x0BCD, 1},
- {0x0BD7, 0x0BD7, 1},
- {0x0BE7, 0x0BEF, 1},
- {0x0C01, 0x0C03, 1},
- {0x0C3E, 0x0C44, 1},
- {0x0C46, 0x0C48, 1},
- {0x0C4A, 0x0C4D, 1},
- {0x0C55, 0x0C56, 1},
- {0x0C66, 0x0C6F, 1},
- {0x0C82, 0x0C83, 1},
- {0x0CBE, 0x0CC4, 1},
- {0x0CC6, 0x0CC8, 1},
- {0x0CCA, 0x0CCD, 1},
- {0x0CD5, 0x0CD6, 1},
- {0x0CE6, 0x0CEF, 1},
- {0x0D02, 0x0D03, 1},
- {0x0D3E, 0x0D43, 1},
- {0x0D46, 0x0D48, 1},
- {0x0D4A, 0x0D4D, 1},
- {0x0D57, 0x0D57, 1},
- {0x0D66, 0x0D6F, 1},
- {0x0E31, 0x0E31, 1},
- {0x0E34, 0x0E3A, 1},
- {0x0E46, 0x0E46, 1},
- {0x0E47, 0x0E4E, 1},
- {0x0E50, 0x0E59, 1},
- {0x0EB1, 0x0EB1, 1},
- {0x0EB4, 0x0EB9, 1},
- {0x0EBB, 0x0EBC, 1},
- {0x0EC6, 0x0EC6, 1},
- {0x0EC8, 0x0ECD, 1},
- {0x0ED0, 0x0ED9, 1},
- {0x0F18, 0x0F19, 1},
- {0x0F20, 0x0F29, 1},
- {0x0F35, 0x0F39, 2},
- {0x0F3E, 0x0F3F, 1},
- {0x0F71, 0x0F84, 1},
- {0x0F86, 0x0F8B, 1},
- {0x0F90, 0x0F95, 1},
- {0x0F97, 0x0F97, 1},
- {0x0F99, 0x0FAD, 1},
- {0x0FB1, 0x0FB7, 1},
- {0x0FB9, 0x0FB9, 1},
- {0x20D0, 0x20DC, 1},
- {0x20E1, 0x3005, 0x3005 - 0x20E1},
- {0x302A, 0x302F, 1},
- {0x3031, 0x3035, 1},
- {0x3099, 0x309A, 1},
- {0x309D, 0x309E, 1},
- {0x30FC, 0x30FE, 1},
- },
-}
-
-// HTMLEntity is an entity map containing translations for the
-// standard HTML entity characters.
-var HTMLEntity = htmlEntity
-
-var htmlEntity = map[string]string{
- /*
- hget http://www.w3.org/TR/html4/sgml/entities.html |
- ssam '
- ,y /\&gt;/ x/\&lt;(.|\n)+/ s/\n/ /g
- ,x v/^\&lt;!ENTITY/d
- ,s/\&lt;!ENTITY ([^ ]+) .*U\+([0-9A-F][0-9A-F][0-9A-F][0-9A-F]) .+/ "\1": "\\u\2",/g
- '
- */
- "nbsp": "\u00A0",
- "iexcl": "\u00A1",
- "cent": "\u00A2",
- "pound": "\u00A3",
- "curren": "\u00A4",
- "yen": "\u00A5",
- "brvbar": "\u00A6",
- "sect": "\u00A7",
- "uml": "\u00A8",
- "copy": "\u00A9",
- "ordf": "\u00AA",
- "laquo": "\u00AB",
- "not": "\u00AC",
- "shy": "\u00AD",
- "reg": "\u00AE",
- "macr": "\u00AF",
- "deg": "\u00B0",
- "plusmn": "\u00B1",
- "sup2": "\u00B2",
- "sup3": "\u00B3",
- "acute": "\u00B4",
- "micro": "\u00B5",
- "para": "\u00B6",
- "middot": "\u00B7",
- "cedil": "\u00B8",
- "sup1": "\u00B9",
- "ordm": "\u00BA",
- "raquo": "\u00BB",
- "frac14": "\u00BC",
- "frac12": "\u00BD",
- "frac34": "\u00BE",
- "iquest": "\u00BF",
- "Agrave": "\u00C0",
- "Aacute": "\u00C1",
- "Acirc": "\u00C2",
- "Atilde": "\u00C3",
- "Auml": "\u00C4",
- "Aring": "\u00C5",
- "AElig": "\u00C6",
- "Ccedil": "\u00C7",
- "Egrave": "\u00C8",
- "Eacute": "\u00C9",
- "Ecirc": "\u00CA",
- "Euml": "\u00CB",
- "Igrave": "\u00CC",
- "Iacute": "\u00CD",
- "Icirc": "\u00CE",
- "Iuml": "\u00CF",
- "ETH": "\u00D0",
- "Ntilde": "\u00D1",
- "Ograve": "\u00D2",
- "Oacute": "\u00D3",
- "Ocirc": "\u00D4",
- "Otilde": "\u00D5",
- "Ouml": "\u00D6",
- "times": "\u00D7",
- "Oslash": "\u00D8",
- "Ugrave": "\u00D9",
- "Uacute": "\u00DA",
- "Ucirc": "\u00DB",
- "Uuml": "\u00DC",
- "Yacute": "\u00DD",
- "THORN": "\u00DE",
- "szlig": "\u00DF",
- "agrave": "\u00E0",
- "aacute": "\u00E1",
- "acirc": "\u00E2",
- "atilde": "\u00E3",
- "auml": "\u00E4",
- "aring": "\u00E5",
- "aelig": "\u00E6",
- "ccedil": "\u00E7",
- "egrave": "\u00E8",
- "eacute": "\u00E9",
- "ecirc": "\u00EA",
- "euml": "\u00EB",
- "igrave": "\u00EC",
- "iacute": "\u00ED",
- "icirc": "\u00EE",
- "iuml": "\u00EF",
- "eth": "\u00F0",
- "ntilde": "\u00F1",
- "ograve": "\u00F2",
- "oacute": "\u00F3",
- "ocirc": "\u00F4",
- "otilde": "\u00F5",
- "ouml": "\u00F6",
- "divide": "\u00F7",
- "oslash": "\u00F8",
- "ugrave": "\u00F9",
- "uacute": "\u00FA",
- "ucirc": "\u00FB",
- "uuml": "\u00FC",
- "yacute": "\u00FD",
- "thorn": "\u00FE",
- "yuml": "\u00FF",
- "fnof": "\u0192",
- "Alpha": "\u0391",
- "Beta": "\u0392",
- "Gamma": "\u0393",
- "Delta": "\u0394",
- "Epsilon": "\u0395",
- "Zeta": "\u0396",
- "Eta": "\u0397",
- "Theta": "\u0398",
- "Iota": "\u0399",
- "Kappa": "\u039A",
- "Lambda": "\u039B",
- "Mu": "\u039C",
- "Nu": "\u039D",
- "Xi": "\u039E",
- "Omicron": "\u039F",
- "Pi": "\u03A0",
- "Rho": "\u03A1",
- "Sigma": "\u03A3",
- "Tau": "\u03A4",
- "Upsilon": "\u03A5",
- "Phi": "\u03A6",
- "Chi": "\u03A7",
- "Psi": "\u03A8",
- "Omega": "\u03A9",
- "alpha": "\u03B1",
- "beta": "\u03B2",
- "gamma": "\u03B3",
- "delta": "\u03B4",
- "epsilon": "\u03B5",
- "zeta": "\u03B6",
- "eta": "\u03B7",
- "theta": "\u03B8",
- "iota": "\u03B9",
- "kappa": "\u03BA",
- "lambda": "\u03BB",
- "mu": "\u03BC",
- "nu": "\u03BD",
- "xi": "\u03BE",
- "omicron": "\u03BF",
- "pi": "\u03C0",
- "rho": "\u03C1",
- "sigmaf": "\u03C2",
- "sigma": "\u03C3",
- "tau": "\u03C4",
- "upsilon": "\u03C5",
- "phi": "\u03C6",
- "chi": "\u03C7",
- "psi": "\u03C8",
- "omega": "\u03C9",
- "thetasym": "\u03D1",
- "upsih": "\u03D2",
- "piv": "\u03D6",
- "bull": "\u2022",
- "hellip": "\u2026",
- "prime": "\u2032",
- "Prime": "\u2033",
- "oline": "\u203E",
- "frasl": "\u2044",
- "weierp": "\u2118",
- "image": "\u2111",
- "real": "\u211C",
- "trade": "\u2122",
- "alefsym": "\u2135",
- "larr": "\u2190",
- "uarr": "\u2191",
- "rarr": "\u2192",
- "darr": "\u2193",
- "harr": "\u2194",
- "crarr": "\u21B5",
- "lArr": "\u21D0",
- "uArr": "\u21D1",
- "rArr": "\u21D2",
- "dArr": "\u21D3",
- "hArr": "\u21D4",
- "forall": "\u2200",
- "part": "\u2202",
- "exist": "\u2203",
- "empty": "\u2205",
- "nabla": "\u2207",
- "isin": "\u2208",
- "notin": "\u2209",
- "ni": "\u220B",
- "prod": "\u220F",
- "sum": "\u2211",
- "minus": "\u2212",
- "lowast": "\u2217",
- "radic": "\u221A",
- "prop": "\u221D",
- "infin": "\u221E",
- "ang": "\u2220",
- "and": "\u2227",
- "or": "\u2228",
- "cap": "\u2229",
- "cup": "\u222A",
- "int": "\u222B",
- "there4": "\u2234",
- "sim": "\u223C",
- "cong": "\u2245",
- "asymp": "\u2248",
- "ne": "\u2260",
- "equiv": "\u2261",
- "le": "\u2264",
- "ge": "\u2265",
- "sub": "\u2282",
- "sup": "\u2283",
- "nsub": "\u2284",
- "sube": "\u2286",
- "supe": "\u2287",
- "oplus": "\u2295",
- "otimes": "\u2297",
- "perp": "\u22A5",
- "sdot": "\u22C5",
- "lceil": "\u2308",
- "rceil": "\u2309",
- "lfloor": "\u230A",
- "rfloor": "\u230B",
- "lang": "\u2329",
- "rang": "\u232A",
- "loz": "\u25CA",
- "spades": "\u2660",
- "clubs": "\u2663",
- "hearts": "\u2665",
- "diams": "\u2666",
- "quot": "\u0022",
- "amp": "\u0026",
- "lt": "\u003C",
- "gt": "\u003E",
- "OElig": "\u0152",
- "oelig": "\u0153",
- "Scaron": "\u0160",
- "scaron": "\u0161",
- "Yuml": "\u0178",
- "circ": "\u02C6",
- "tilde": "\u02DC",
- "ensp": "\u2002",
- "emsp": "\u2003",
- "thinsp": "\u2009",
- "zwnj": "\u200C",
- "zwj": "\u200D",
- "lrm": "\u200E",
- "rlm": "\u200F",
- "ndash": "\u2013",
- "mdash": "\u2014",
- "lsquo": "\u2018",
- "rsquo": "\u2019",
- "sbquo": "\u201A",
- "ldquo": "\u201C",
- "rdquo": "\u201D",
- "bdquo": "\u201E",
- "dagger": "\u2020",
- "Dagger": "\u2021",
- "permil": "\u2030",
- "lsaquo": "\u2039",
- "rsaquo": "\u203A",
- "euro": "\u20AC",
-}
-
-// HTMLAutoClose is the set of HTML elements that
-// should be considered to close automatically.
-var HTMLAutoClose = htmlAutoClose
-
-var htmlAutoClose = []string{
- /*
- hget http://www.w3.org/TR/html4/loose.dtd |
- 9 sed -n 's/<!ELEMENT ([^ ]*) +- O EMPTY.+/ "\1",/p' | tr A-Z a-z
- */
- "basefont",
- "br",
- "area",
- "link",
- "img",
- "param",
- "hr",
- "input",
- "col",
- "frame",
- "isindex",
- "base",
- "meta",
-}
-
-var (
- esc_quot = []byte("&#34;") // shorter than "&quot;"
- esc_apos = []byte("&#39;") // shorter than "&apos;"
- esc_amp = []byte("&amp;")
- esc_lt = []byte("&lt;")
- esc_gt = []byte("&gt;")
- esc_tab = []byte("&#x9;")
- esc_nl = []byte("&#xA;")
- esc_cr = []byte("&#xD;")
- esc_fffd = []byte("\uFFFD") // Unicode replacement character
-)
-
-// EscapeText writes to w the properly escaped XML equivalent
-// of the plain text data s.
-func EscapeText(w io.Writer, s []byte) error {
- return escapeText(w, s, true)
-}
-
-// escapeText writes to w the properly escaped XML equivalent
-// of the plain text data s. If escapeNewline is true, newline
-// characters will be escaped.
-func escapeText(w io.Writer, s []byte, escapeNewline bool) error {
- var esc []byte
- last := 0
- for i := 0; i < len(s); {
- r, width := utf8.DecodeRune(s[i:])
- i += width
- switch r {
- case '"':
- esc = esc_quot
- case '\'':
- esc = esc_apos
- case '&':
- esc = esc_amp
- case '<':
- esc = esc_lt
- case '>':
- esc = esc_gt
- case '\t':
- esc = esc_tab
- case '\n':
- if !escapeNewline {
- continue
- }
- esc = esc_nl
- case '\r':
- esc = esc_cr
- default:
- if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) {
- esc = esc_fffd
- break
- }
- continue
- }
- if _, err := w.Write(s[last : i-width]); err != nil {
- return err
- }
- if _, err := w.Write(esc); err != nil {
- return err
- }
- last = i
- }
- if _, err := w.Write(s[last:]); err != nil {
- return err
- }
- return nil
-}
-
-// EscapeString writes to p the properly escaped XML equivalent
-// of the plain text data s.
-func (p *printer) EscapeString(s string) {
- var esc []byte
- last := 0
- for i := 0; i < len(s); {
- r, width := utf8.DecodeRuneInString(s[i:])
- i += width
- switch r {
- case '"':
- esc = esc_quot
- case '\'':
- esc = esc_apos
- case '&':
- esc = esc_amp
- case '<':
- esc = esc_lt
- case '>':
- esc = esc_gt
- case '\t':
- esc = esc_tab
- case '\n':
- esc = esc_nl
- case '\r':
- esc = esc_cr
- default:
- if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) {
- esc = esc_fffd
- break
- }
- continue
- }
- p.WriteString(s[last : i-width])
- p.Write(esc)
- last = i
- }
- p.WriteString(s[last:])
-}
-
-// Escape is like EscapeText but omits the error return value.
-// It is provided for backwards compatibility with Go 1.0.
-// Code targeting Go 1.1 or later should use EscapeText.
-func Escape(w io.Writer, s []byte) {
- EscapeText(w, s)
-}
-
-// procInst parses the `param="..."` or `param='...'`
-// value out of the provided string, returning "" if not found.
-func procInst(param, s string) string {
- // TODO: this parsing is somewhat lame and not exact.
- // It works for all actual cases, though.
- param = param + "="
- idx := strings.Index(s, param)
- if idx == -1 {
- return ""
- }
- v := s[idx+len(param):]
- if v == "" {
- return ""
- }
- if v[0] != '\'' && v[0] != '"' {
- return ""
- }
- idx = strings.IndexRune(v[1:], rune(v[0]))
- if idx == -1 {
- return ""
- }
- return v[1 : idx+1]
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml_test.go
deleted file mode 100644
index af4cf8ea8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/internal/xml/xml_test.go
+++ /dev/null
@@ -1,752 +0,0 @@
-// Copyright 2009 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 file.
-
-package xml
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "strings"
- "testing"
- "unicode/utf8"
-)
-
-const testInput = `
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<body xmlns:foo="ns1" xmlns="ns2" xmlns:tag="ns3" ` +
- "\r\n\t" + ` >
- <hello lang="en">World &lt;&gt;&apos;&quot; &#x767d;&#40300;ç¿”</hello>
- <query>&何; &is-it;</query>
- <goodbye />
- <outer foo:attr="value" xmlns:tag="ns4">
- <inner/>
- </outer>
- <tag:name>
- <![CDATA[Some text here.]]>
- </tag:name>
-</body><!-- missing final newline -->`
-
-var testEntity = map[string]string{"何": "What", "is-it": "is it?"}
-
-var rawTokens = []Token{
- CharData("\n"),
- ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)},
- CharData("\n"),
- Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`),
- CharData("\n"),
- StartElement{Name{"", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}},
- CharData("\n "),
- StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}},
- CharData("World <>'\" 白鵬翔"),
- EndElement{Name{"", "hello"}},
- CharData("\n "),
- StartElement{Name{"", "query"}, []Attr{}},
- CharData("What is it?"),
- EndElement{Name{"", "query"}},
- CharData("\n "),
- StartElement{Name{"", "goodbye"}, []Attr{}},
- EndElement{Name{"", "goodbye"}},
- CharData("\n "),
- StartElement{Name{"", "outer"}, []Attr{{Name{"foo", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}},
- CharData("\n "),
- StartElement{Name{"", "inner"}, []Attr{}},
- EndElement{Name{"", "inner"}},
- CharData("\n "),
- EndElement{Name{"", "outer"}},
- CharData("\n "),
- StartElement{Name{"tag", "name"}, []Attr{}},
- CharData("\n "),
- CharData("Some text here."),
- CharData("\n "),
- EndElement{Name{"tag", "name"}},
- CharData("\n"),
- EndElement{Name{"", "body"}},
- Comment(" missing final newline "),
-}
-
-var cookedTokens = []Token{
- CharData("\n"),
- ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)},
- CharData("\n"),
- Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`),
- CharData("\n"),
- StartElement{Name{"ns2", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}},
- CharData("\n "),
- StartElement{Name{"ns2", "hello"}, []Attr{{Name{"", "lang"}, "en"}}},
- CharData("World <>'\" 白鵬翔"),
- EndElement{Name{"ns2", "hello"}},
- CharData("\n "),
- StartElement{Name{"ns2", "query"}, []Attr{}},
- CharData("What is it?"),
- EndElement{Name{"ns2", "query"}},
- CharData("\n "),
- StartElement{Name{"ns2", "goodbye"}, []Attr{}},
- EndElement{Name{"ns2", "goodbye"}},
- CharData("\n "),
- StartElement{Name{"ns2", "outer"}, []Attr{{Name{"ns1", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}},
- CharData("\n "),
- StartElement{Name{"ns2", "inner"}, []Attr{}},
- EndElement{Name{"ns2", "inner"}},
- CharData("\n "),
- EndElement{Name{"ns2", "outer"}},
- CharData("\n "),
- StartElement{Name{"ns3", "name"}, []Attr{}},
- CharData("\n "),
- CharData("Some text here."),
- CharData("\n "),
- EndElement{Name{"ns3", "name"}},
- CharData("\n"),
- EndElement{Name{"ns2", "body"}},
- Comment(" missing final newline "),
-}
-
-const testInputAltEncoding = `
-<?xml version="1.0" encoding="x-testing-uppercase"?>
-<TAG>VALUE</TAG>`
-
-var rawTokensAltEncoding = []Token{
- CharData("\n"),
- ProcInst{"xml", []byte(`version="1.0" encoding="x-testing-uppercase"`)},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("value"),
- EndElement{Name{"", "tag"}},
-}
-
-var xmlInput = []string{
- // unexpected EOF cases
- "<",
- "<t",
- "<t ",
- "<t/",
- "<!",
- "<!-",
- "<!--",
- "<!--c-",
- "<!--c--",
- "<!d",
- "<t></",
- "<t></t",
- "<?",
- "<?p",
- "<t a",
- "<t a=",
- "<t a='",
- "<t a=''",
- "<t/><![",
- "<t/><![C",
- "<t/><![CDATA[d",
- "<t/><![CDATA[d]",
- "<t/><![CDATA[d]]",
-
- // other Syntax errors
- "<>",
- "<t/a",
- "<0 />",
- "<?0 >",
- // "<!0 >", // let the Token() caller handle
- "</0>",
- "<t 0=''>",
- "<t a='&'>",
- "<t a='<'>",
- "<t>&nbspc;</t>",
- "<t a>",
- "<t a=>",
- "<t a=v>",
- // "<![CDATA[d]]>", // let the Token() caller handle
- "<t></e>",
- "<t></>",
- "<t></t!",
- "<t>cdata]]></t>",
-}
-
-func TestRawToken(t *testing.T) {
- d := NewDecoder(strings.NewReader(testInput))
- d.Entity = testEntity
- testRawToken(t, d, testInput, rawTokens)
-}
-
-const nonStrictInput = `
-<tag>non&entity</tag>
-<tag>&unknown;entity</tag>
-<tag>&#123</tag>
-<tag>&#zzz;</tag>
-<tag>&ãªã¾ãˆ3;</tag>
-<tag>&lt-gt;</tag>
-<tag>&;</tag>
-<tag>&0a;</tag>
-`
-
-var nonStringEntity = map[string]string{"": "oops!", "0a": "oops!"}
-
-var nonStrictTokens = []Token{
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("non&entity"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&unknown;entity"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&#123"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&#zzz;"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&ãªã¾ãˆ3;"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&lt-gt;"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&;"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
- StartElement{Name{"", "tag"}, []Attr{}},
- CharData("&0a;"),
- EndElement{Name{"", "tag"}},
- CharData("\n"),
-}
-
-func TestNonStrictRawToken(t *testing.T) {
- d := NewDecoder(strings.NewReader(nonStrictInput))
- d.Strict = false
- testRawToken(t, d, nonStrictInput, nonStrictTokens)
-}
-
-type downCaser struct {
- t *testing.T
- r io.ByteReader
-}
-
-func (d *downCaser) ReadByte() (c byte, err error) {
- c, err = d.r.ReadByte()
- if c >= 'A' && c <= 'Z' {
- c += 'a' - 'A'
- }
- return
-}
-
-func (d *downCaser) Read(p []byte) (int, error) {
- d.t.Fatalf("unexpected Read call on downCaser reader")
- panic("unreachable")
-}
-
-func TestRawTokenAltEncoding(t *testing.T) {
- d := NewDecoder(strings.NewReader(testInputAltEncoding))
- d.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) {
- if charset != "x-testing-uppercase" {
- t.Fatalf("unexpected charset %q", charset)
- }
- return &downCaser{t, input.(io.ByteReader)}, nil
- }
- testRawToken(t, d, testInputAltEncoding, rawTokensAltEncoding)
-}
-
-func TestRawTokenAltEncodingNoConverter(t *testing.T) {
- d := NewDecoder(strings.NewReader(testInputAltEncoding))
- token, err := d.RawToken()
- if token == nil {
- t.Fatalf("expected a token on first RawToken call")
- }
- if err != nil {
- t.Fatal(err)
- }
- token, err = d.RawToken()
- if token != nil {
- t.Errorf("expected a nil token; got %#v", token)
- }
- if err == nil {
- t.Fatalf("expected an error on second RawToken call")
- }
- const encoding = "x-testing-uppercase"
- if !strings.Contains(err.Error(), encoding) {
- t.Errorf("expected error to contain %q; got error: %v",
- encoding, err)
- }
-}
-
-func testRawToken(t *testing.T, d *Decoder, raw string, rawTokens []Token) {
- lastEnd := int64(0)
- for i, want := range rawTokens {
- start := d.InputOffset()
- have, err := d.RawToken()
- end := d.InputOffset()
- if err != nil {
- t.Fatalf("token %d: unexpected error: %s", i, err)
- }
- if !reflect.DeepEqual(have, want) {
- var shave, swant string
- if _, ok := have.(CharData); ok {
- shave = fmt.Sprintf("CharData(%q)", have)
- } else {
- shave = fmt.Sprintf("%#v", have)
- }
- if _, ok := want.(CharData); ok {
- swant = fmt.Sprintf("CharData(%q)", want)
- } else {
- swant = fmt.Sprintf("%#v", want)
- }
- t.Errorf("token %d = %s, want %s", i, shave, swant)
- }
-
- // Check that InputOffset returned actual token.
- switch {
- case start < lastEnd:
- t.Errorf("token %d: position [%d,%d) for %T is before previous token", i, start, end, have)
- case start >= end:
- // Special case: EndElement can be synthesized.
- if start == end && end == lastEnd {
- break
- }
- t.Errorf("token %d: position [%d,%d) for %T is empty", i, start, end, have)
- case end > int64(len(raw)):
- t.Errorf("token %d: position [%d,%d) for %T extends beyond input", i, start, end, have)
- default:
- text := raw[start:end]
- if strings.ContainsAny(text, "<>") && (!strings.HasPrefix(text, "<") || !strings.HasSuffix(text, ">")) {
- t.Errorf("token %d: misaligned raw token %#q for %T", i, text, have)
- }
- }
- lastEnd = end
- }
-}
-
-// Ensure that directives (specifically !DOCTYPE) include the complete
-// text of any nested directives, noting that < and > do not change
-// nesting depth if they are in single or double quotes.
-
-var nestedDirectivesInput = `
-<!DOCTYPE [<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">]>
-<!DOCTYPE [<!ENTITY xlt ">">]>
-<!DOCTYPE [<!ENTITY xlt "<">]>
-<!DOCTYPE [<!ENTITY xlt '>'>]>
-<!DOCTYPE [<!ENTITY xlt '<'>]>
-<!DOCTYPE [<!ENTITY xlt '">'>]>
-<!DOCTYPE [<!ENTITY xlt "'<">]>
-`
-
-var nestedDirectivesTokens = []Token{
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt ">">]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt "<">]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt '>'>]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt '<'>]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt '">'>]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY xlt "'<">]`),
- CharData("\n"),
-}
-
-func TestNestedDirectives(t *testing.T) {
- d := NewDecoder(strings.NewReader(nestedDirectivesInput))
-
- for i, want := range nestedDirectivesTokens {
- have, err := d.Token()
- if err != nil {
- t.Fatalf("token %d: unexpected error: %s", i, err)
- }
- if !reflect.DeepEqual(have, want) {
- t.Errorf("token %d = %#v want %#v", i, have, want)
- }
- }
-}
-
-func TestToken(t *testing.T) {
- d := NewDecoder(strings.NewReader(testInput))
- d.Entity = testEntity
-
- for i, want := range cookedTokens {
- have, err := d.Token()
- if err != nil {
- t.Fatalf("token %d: unexpected error: %s", i, err)
- }
- if !reflect.DeepEqual(have, want) {
- t.Errorf("token %d = %#v want %#v", i, have, want)
- }
- }
-}
-
-func TestSyntax(t *testing.T) {
- for i := range xmlInput {
- d := NewDecoder(strings.NewReader(xmlInput[i]))
- var err error
- for _, err = d.Token(); err == nil; _, err = d.Token() {
- }
- if _, ok := err.(*SyntaxError); !ok {
- t.Fatalf(`xmlInput "%s": expected SyntaxError not received`, xmlInput[i])
- }
- }
-}
-
-type allScalars struct {
- True1 bool
- True2 bool
- False1 bool
- False2 bool
- Int int
- Int8 int8
- Int16 int16
- Int32 int32
- Int64 int64
- Uint int
- Uint8 uint8
- Uint16 uint16
- Uint32 uint32
- Uint64 uint64
- Uintptr uintptr
- Float32 float32
- Float64 float64
- String string
- PtrString *string
-}
-
-var all = allScalars{
- True1: true,
- True2: true,
- False1: false,
- False2: false,
- Int: 1,
- Int8: -2,
- Int16: 3,
- Int32: -4,
- Int64: 5,
- Uint: 6,
- Uint8: 7,
- Uint16: 8,
- Uint32: 9,
- Uint64: 10,
- Uintptr: 11,
- Float32: 13.0,
- Float64: 14.0,
- String: "15",
- PtrString: &sixteen,
-}
-
-var sixteen = "16"
-
-const testScalarsInput = `<allscalars>
- <True1>true</True1>
- <True2>1</True2>
- <False1>false</False1>
- <False2>0</False2>
- <Int>1</Int>
- <Int8>-2</Int8>
- <Int16>3</Int16>
- <Int32>-4</Int32>
- <Int64>5</Int64>
- <Uint>6</Uint>
- <Uint8>7</Uint8>
- <Uint16>8</Uint16>
- <Uint32>9</Uint32>
- <Uint64>10</Uint64>
- <Uintptr>11</Uintptr>
- <Float>12.0</Float>
- <Float32>13.0</Float32>
- <Float64>14.0</Float64>
- <String>15</String>
- <PtrString>16</PtrString>
-</allscalars>`
-
-func TestAllScalars(t *testing.T) {
- var a allScalars
- err := Unmarshal([]byte(testScalarsInput), &a)
-
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(a, all) {
- t.Errorf("have %+v want %+v", a, all)
- }
-}
-
-type item struct {
- Field_a string
-}
-
-func TestIssue569(t *testing.T) {
- data := `<item><Field_a>abcd</Field_a></item>`
- var i item
- err := Unmarshal([]byte(data), &i)
-
- if err != nil || i.Field_a != "abcd" {
- t.Fatal("Expecting abcd")
- }
-}
-
-func TestUnquotedAttrs(t *testing.T) {
- data := "<tag attr=azAZ09:-_\t>"
- d := NewDecoder(strings.NewReader(data))
- d.Strict = false
- token, err := d.Token()
- if _, ok := err.(*SyntaxError); ok {
- t.Errorf("Unexpected error: %v", err)
- }
- if token.(StartElement).Name.Local != "tag" {
- t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local)
- }
- attr := token.(StartElement).Attr[0]
- if attr.Value != "azAZ09:-_" {
- t.Errorf("Unexpected attribute value: %v", attr.Value)
- }
- if attr.Name.Local != "attr" {
- t.Errorf("Unexpected attribute name: %v", attr.Name.Local)
- }
-}
-
-func TestValuelessAttrs(t *testing.T) {
- tests := [][3]string{
- {"<p nowrap>", "p", "nowrap"},
- {"<p nowrap >", "p", "nowrap"},
- {"<input checked/>", "input", "checked"},
- {"<input checked />", "input", "checked"},
- }
- for _, test := range tests {
- d := NewDecoder(strings.NewReader(test[0]))
- d.Strict = false
- token, err := d.Token()
- if _, ok := err.(*SyntaxError); ok {
- t.Errorf("Unexpected error: %v", err)
- }
- if token.(StartElement).Name.Local != test[1] {
- t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local)
- }
- attr := token.(StartElement).Attr[0]
- if attr.Value != test[2] {
- t.Errorf("Unexpected attribute value: %v", attr.Value)
- }
- if attr.Name.Local != test[2] {
- t.Errorf("Unexpected attribute name: %v", attr.Name.Local)
- }
- }
-}
-
-func TestCopyTokenCharData(t *testing.T) {
- data := []byte("same data")
- var tok1 Token = CharData(data)
- tok2 := CopyToken(tok1)
- if !reflect.DeepEqual(tok1, tok2) {
- t.Error("CopyToken(CharData) != CharData")
- }
- data[1] = 'o'
- if reflect.DeepEqual(tok1, tok2) {
- t.Error("CopyToken(CharData) uses same buffer.")
- }
-}
-
-func TestCopyTokenStartElement(t *testing.T) {
- elt := StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}
- var tok1 Token = elt
- tok2 := CopyToken(tok1)
- if tok1.(StartElement).Attr[0].Value != "en" {
- t.Error("CopyToken overwrote Attr[0]")
- }
- if !reflect.DeepEqual(tok1, tok2) {
- t.Error("CopyToken(StartElement) != StartElement")
- }
- tok1.(StartElement).Attr[0] = Attr{Name{"", "lang"}, "de"}
- if reflect.DeepEqual(tok1, tok2) {
- t.Error("CopyToken(CharData) uses same buffer.")
- }
-}
-
-func TestSyntaxErrorLineNum(t *testing.T) {
- testInput := "<P>Foo<P>\n\n<P>Bar</>\n"
- d := NewDecoder(strings.NewReader(testInput))
- var err error
- for _, err = d.Token(); err == nil; _, err = d.Token() {
- }
- synerr, ok := err.(*SyntaxError)
- if !ok {
- t.Error("Expected SyntaxError.")
- }
- if synerr.Line != 3 {
- t.Error("SyntaxError didn't have correct line number.")
- }
-}
-
-func TestTrailingRawToken(t *testing.T) {
- input := `<FOO></FOO> `
- d := NewDecoder(strings.NewReader(input))
- var err error
- for _, err = d.RawToken(); err == nil; _, err = d.RawToken() {
- }
- if err != io.EOF {
- t.Fatalf("d.RawToken() = _, %v, want _, io.EOF", err)
- }
-}
-
-func TestTrailingToken(t *testing.T) {
- input := `<FOO></FOO> `
- d := NewDecoder(strings.NewReader(input))
- var err error
- for _, err = d.Token(); err == nil; _, err = d.Token() {
- }
- if err != io.EOF {
- t.Fatalf("d.Token() = _, %v, want _, io.EOF", err)
- }
-}
-
-func TestEntityInsideCDATA(t *testing.T) {
- input := `<test><![CDATA[ &val=foo ]]></test>`
- d := NewDecoder(strings.NewReader(input))
- var err error
- for _, err = d.Token(); err == nil; _, err = d.Token() {
- }
- if err != io.EOF {
- t.Fatalf("d.Token() = _, %v, want _, io.EOF", err)
- }
-}
-
-var characterTests = []struct {
- in string
- err string
-}{
- {"\x12<doc/>", "illegal character code U+0012"},
- {"<?xml version=\"1.0\"?>\x0b<doc/>", "illegal character code U+000B"},
- {"\xef\xbf\xbe<doc/>", "illegal character code U+FFFE"},
- {"<?xml version=\"1.0\"?><doc>\r\n<hiya/>\x07<toots/></doc>", "illegal character code U+0007"},
- {"<?xml version=\"1.0\"?><doc \x12='value'>what's up</doc>", "expected attribute name in element"},
- {"<doc>&abc\x01;</doc>", "invalid character entity &abc (no semicolon)"},
- {"<doc>&\x01;</doc>", "invalid character entity & (no semicolon)"},
- {"<doc>&\xef\xbf\xbe;</doc>", "invalid character entity &\uFFFE;"},
- {"<doc>&hello;</doc>", "invalid character entity &hello;"},
-}
-
-func TestDisallowedCharacters(t *testing.T) {
-
- for i, tt := range characterTests {
- d := NewDecoder(strings.NewReader(tt.in))
- var err error
-
- for err == nil {
- _, err = d.Token()
- }
- synerr, ok := err.(*SyntaxError)
- if !ok {
- t.Fatalf("input %d d.Token() = _, %v, want _, *SyntaxError", i, err)
- }
- if synerr.Msg != tt.err {
- t.Fatalf("input %d synerr.Msg wrong: want %q, got %q", i, tt.err, synerr.Msg)
- }
- }
-}
-
-type procInstEncodingTest struct {
- expect, got string
-}
-
-var procInstTests = []struct {
- input string
- expect [2]string
-}{
- {`version="1.0" encoding="utf-8"`, [2]string{"1.0", "utf-8"}},
- {`version="1.0" encoding='utf-8'`, [2]string{"1.0", "utf-8"}},
- {`version="1.0" encoding='utf-8' `, [2]string{"1.0", "utf-8"}},
- {`version="1.0" encoding=utf-8`, [2]string{"1.0", ""}},
- {`encoding="FOO" `, [2]string{"", "FOO"}},
-}
-
-func TestProcInstEncoding(t *testing.T) {
- for _, test := range procInstTests {
- if got := procInst("version", test.input); got != test.expect[0] {
- t.Errorf("procInst(version, %q) = %q; want %q", test.input, got, test.expect[0])
- }
- if got := procInst("encoding", test.input); got != test.expect[1] {
- t.Errorf("procInst(encoding, %q) = %q; want %q", test.input, got, test.expect[1])
- }
- }
-}
-
-// Ensure that directives with comments include the complete
-// text of any nested directives.
-
-var directivesWithCommentsInput = `
-<!DOCTYPE [<!-- a comment --><!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">]>
-<!DOCTYPE [<!ENTITY go "Golang"><!-- a comment-->]>
-<!DOCTYPE <!-> <!> <!----> <!-->--> <!--->--> [<!ENTITY go "Golang"><!-- a comment-->]>
-`
-
-var directivesWithCommentsTokens = []Token{
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">]`),
- CharData("\n"),
- Directive(`DOCTYPE [<!ENTITY go "Golang">]`),
- CharData("\n"),
- Directive(`DOCTYPE <!-> <!> [<!ENTITY go "Golang">]`),
- CharData("\n"),
-}
-
-func TestDirectivesWithComments(t *testing.T) {
- d := NewDecoder(strings.NewReader(directivesWithCommentsInput))
-
- for i, want := range directivesWithCommentsTokens {
- have, err := d.Token()
- if err != nil {
- t.Fatalf("token %d: unexpected error: %s", i, err)
- }
- if !reflect.DeepEqual(have, want) {
- t.Errorf("token %d = %#v want %#v", i, have, want)
- }
- }
-}
-
-// Writer whose Write method always returns an error.
-type errWriter struct{}
-
-func (errWriter) Write(p []byte) (n int, err error) { return 0, fmt.Errorf("unwritable") }
-
-func TestEscapeTextIOErrors(t *testing.T) {
- expectErr := "unwritable"
- err := EscapeText(errWriter{}, []byte{'A'})
-
- if err == nil || err.Error() != expectErr {
- t.Errorf("have %v, want %v", err, expectErr)
- }
-}
-
-func TestEscapeTextInvalidChar(t *testing.T) {
- input := []byte("A \x00 terminated string.")
- expected := "A \uFFFD terminated string."
-
- buff := new(bytes.Buffer)
- if err := EscapeText(buff, input); err != nil {
- t.Fatalf("have %v, want nil", err)
- }
- text := buff.String()
-
- if text != expected {
- t.Errorf("have %v, want %v", text, expected)
- }
-}
-
-func TestIssue5880(t *testing.T) {
- type T []byte
- data, err := Marshal(T{192, 168, 0, 1})
- if err != nil {
- t.Errorf("Marshal error: %v", err)
- }
- if !utf8.Valid(data) {
- t.Errorf("Marshal generated invalid UTF-8: %x", data)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/litmus_test_server.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/litmus_test_server.go
deleted file mode 100644
index 514db5dd1..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/litmus_test_server.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2015 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 file.
-
-// +build ignore
-
-/*
-This program is a server for the WebDAV 'litmus' compliance test at
-http://www.webdav.org/neon/litmus/
-To run the test:
-
-go run litmus_test_server.go
-
-and separately, from the downloaded litmus-xxx directory:
-
-make URL=http://localhost:9999/ check
-*/
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "net/http"
- "net/url"
-
- "golang.org/x/net/webdav"
-)
-
-var port = flag.Int("port", 9999, "server port")
-
-func main() {
- flag.Parse()
- log.SetFlags(0)
- h := &webdav.Handler{
- FileSystem: webdav.NewMemFS(),
- LockSystem: webdav.NewMemLS(),
- Logger: func(r *http.Request, err error) {
- litmus := r.Header.Get("X-Litmus")
- if len(litmus) > 19 {
- litmus = litmus[:16] + "..."
- }
-
- switch r.Method {
- case "COPY", "MOVE":
- dst := ""
- if u, err := url.Parse(r.Header.Get("Destination")); err == nil {
- dst = u.Path
- }
- o := r.Header.Get("Overwrite")
- log.Printf("%-20s%-10s%-30s%-30so=%-2s%v", litmus, r.Method, r.URL.Path, dst, o, err)
- default:
- log.Printf("%-20s%-10s%-30s%v", litmus, r.Method, r.URL.Path, err)
- }
- },
- }
-
- // The next line would normally be:
- // http.Handle("/", h)
- // but we wrap that HTTP handler h to cater for a special case.
- //
- // The propfind_invalid2 litmus test case expects an empty namespace prefix
- // declaration to be an error. The FAQ in the webdav litmus test says:
- //
- // "What does the "propfind_invalid2" test check for?...
- //
- // If a request was sent with an XML body which included an empty namespace
- // prefix declaration (xmlns:ns1=""), then the server must reject that with
- // a "400 Bad Request" response, as it is invalid according to the XML
- // Namespace specification."
- //
- // On the other hand, the Go standard library's encoding/xml package
- // accepts an empty xmlns namespace, as per the discussion at
- // https://github.com/golang/go/issues/8068
- //
- // Empty namespaces seem disallowed in the second (2006) edition of the XML
- // standard, but allowed in a later edition. The grammar differs between
- // http://www.w3.org/TR/2006/REC-xml-names-20060816/#ns-decl and
- // http://www.w3.org/TR/REC-xml-names/#dt-prefix
- //
- // Thus, we assume that the propfind_invalid2 test is obsolete, and
- // hard-code the 400 Bad Request response that the test expects.
- http.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Header.Get("X-Litmus") == "props: 3 (propfind_invalid2)" {
- http.Error(w, "400 Bad Request", http.StatusBadRequest)
- return
- }
- h.ServeHTTP(w, r)
- }))
-
- addr := fmt.Sprintf(":%d", *port)
- log.Printf("Serving %v", addr)
- log.Fatal(http.ListenAndServe(addr, nil))
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock.go
deleted file mode 100644
index 344ac5cea..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock.go
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "container/heap"
- "errors"
- "strconv"
- "strings"
- "sync"
- "time"
-)
-
-var (
- // ErrConfirmationFailed is returned by a LockSystem's Confirm method.
- ErrConfirmationFailed = errors.New("webdav: confirmation failed")
- // ErrForbidden is returned by a LockSystem's Unlock method.
- ErrForbidden = errors.New("webdav: forbidden")
- // ErrLocked is returned by a LockSystem's Create, Refresh and Unlock methods.
- ErrLocked = errors.New("webdav: locked")
- // ErrNoSuchLock is returned by a LockSystem's Refresh and Unlock methods.
- ErrNoSuchLock = errors.New("webdav: no such lock")
-)
-
-// Condition can match a WebDAV resource, based on a token or ETag.
-// Exactly one of Token and ETag should be non-empty.
-type Condition struct {
- Not bool
- Token string
- ETag string
-}
-
-// LockSystem manages access to a collection of named resources. The elements
-// in a lock name are separated by slash ('/', U+002F) characters, regardless
-// of host operating system convention.
-type LockSystem interface {
- // Confirm confirms that the caller can claim all of the locks specified by
- // the given conditions, and that holding the union of all of those locks
- // gives exclusive access to all of the named resources. Up to two resources
- // can be named. Empty names are ignored.
- //
- // Exactly one of release and err will be non-nil. If release is non-nil,
- // all of the requested locks are held until release is called. Calling
- // release does not unlock the lock, in the WebDAV UNLOCK sense, but once
- // Confirm has confirmed that a lock claim is valid, that lock cannot be
- // Confirmed again until it has been released.
- //
- // If Confirm returns ErrConfirmationFailed then the Handler will continue
- // to try any other set of locks presented (a WebDAV HTTP request can
- // present more than one set of locks). If it returns any other non-nil
- // error, the Handler will write a "500 Internal Server Error" HTTP status.
- Confirm(now time.Time, name0, name1 string, conditions ...Condition) (release func(), err error)
-
- // Create creates a lock with the given depth, duration, owner and root
- // (name). The depth will either be negative (meaning infinite) or zero.
- //
- // If Create returns ErrLocked then the Handler will write a "423 Locked"
- // HTTP status. If it returns any other non-nil error, the Handler will
- // write a "500 Internal Server Error" HTTP status.
- //
- // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for
- // when to use each error.
- //
- // The token returned identifies the created lock. It should be an absolute
- // URI as defined by RFC 3986, Section 4.3. In particular, it should not
- // contain whitespace.
- Create(now time.Time, details LockDetails) (token string, err error)
-
- // Refresh refreshes the lock with the given token.
- //
- // If Refresh returns ErrLocked then the Handler will write a "423 Locked"
- // HTTP Status. If Refresh returns ErrNoSuchLock then the Handler will write
- // a "412 Precondition Failed" HTTP Status. If it returns any other non-nil
- // error, the Handler will write a "500 Internal Server Error" HTTP status.
- //
- // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for
- // when to use each error.
- Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error)
-
- // Unlock unlocks the lock with the given token.
- //
- // If Unlock returns ErrForbidden then the Handler will write a "403
- // Forbidden" HTTP Status. If Unlock returns ErrLocked then the Handler
- // will write a "423 Locked" HTTP status. If Unlock returns ErrNoSuchLock
- // then the Handler will write a "409 Conflict" HTTP Status. If it returns
- // any other non-nil error, the Handler will write a "500 Internal Server
- // Error" HTTP status.
- //
- // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.11.1 for
- // when to use each error.
- Unlock(now time.Time, token string) error
-}
-
-// LockDetails are a lock's metadata.
-type LockDetails struct {
- // Root is the root resource name being locked. For a zero-depth lock, the
- // root is the only resource being locked.
- Root string
- // Duration is the lock timeout. A negative duration means infinite.
- Duration time.Duration
- // OwnerXML is the verbatim <owner> XML given in a LOCK HTTP request.
- //
- // TODO: does the "verbatim" nature play well with XML namespaces?
- // Does the OwnerXML field need to have more structure? See
- // https://codereview.appspot.com/175140043/#msg2
- OwnerXML string
- // ZeroDepth is whether the lock has zero depth. If it does not have zero
- // depth, it has infinite depth.
- ZeroDepth bool
-}
-
-// NewMemLS returns a new in-memory LockSystem.
-func NewMemLS() LockSystem {
- return &memLS{
- byName: make(map[string]*memLSNode),
- byToken: make(map[string]*memLSNode),
- gen: uint64(time.Now().Unix()),
- }
-}
-
-type memLS struct {
- mu sync.Mutex
- byName map[string]*memLSNode
- byToken map[string]*memLSNode
- gen uint64
- // byExpiry only contains those nodes whose LockDetails have a finite
- // Duration and are yet to expire.
- byExpiry byExpiry
-}
-
-func (m *memLS) nextToken() string {
- m.gen++
- return strconv.FormatUint(m.gen, 10)
-}
-
-func (m *memLS) collectExpiredNodes(now time.Time) {
- for len(m.byExpiry) > 0 {
- if now.Before(m.byExpiry[0].expiry) {
- break
- }
- m.remove(m.byExpiry[0])
- }
-}
-
-func (m *memLS) Confirm(now time.Time, name0, name1 string, conditions ...Condition) (func(), error) {
- m.mu.Lock()
- defer m.mu.Unlock()
- m.collectExpiredNodes(now)
-
- var n0, n1 *memLSNode
- if name0 != "" {
- if n0 = m.lookup(slashClean(name0), conditions...); n0 == nil {
- return nil, ErrConfirmationFailed
- }
- }
- if name1 != "" {
- if n1 = m.lookup(slashClean(name1), conditions...); n1 == nil {
- return nil, ErrConfirmationFailed
- }
- }
-
- // Don't hold the same node twice.
- if n1 == n0 {
- n1 = nil
- }
-
- if n0 != nil {
- m.hold(n0)
- }
- if n1 != nil {
- m.hold(n1)
- }
- return func() {
- m.mu.Lock()
- defer m.mu.Unlock()
- if n1 != nil {
- m.unhold(n1)
- }
- if n0 != nil {
- m.unhold(n0)
- }
- }, nil
-}
-
-// lookup returns the node n that locks the named resource, provided that n
-// matches at least one of the given conditions and that lock isn't held by
-// another party. Otherwise, it returns nil.
-//
-// n may be a parent of the named resource, if n is an infinite depth lock.
-func (m *memLS) lookup(name string, conditions ...Condition) (n *memLSNode) {
- // TODO: support Condition.Not and Condition.ETag.
- for _, c := range conditions {
- n = m.byToken[c.Token]
- if n == nil || n.held {
- continue
- }
- if name == n.details.Root {
- return n
- }
- if n.details.ZeroDepth {
- continue
- }
- if n.details.Root == "/" || strings.HasPrefix(name, n.details.Root+"/") {
- return n
- }
- }
- return nil
-}
-
-func (m *memLS) hold(n *memLSNode) {
- if n.held {
- panic("webdav: memLS inconsistent held state")
- }
- n.held = true
- if n.details.Duration >= 0 && n.byExpiryIndex >= 0 {
- heap.Remove(&m.byExpiry, n.byExpiryIndex)
- }
-}
-
-func (m *memLS) unhold(n *memLSNode) {
- if !n.held {
- panic("webdav: memLS inconsistent held state")
- }
- n.held = false
- if n.details.Duration >= 0 {
- heap.Push(&m.byExpiry, n)
- }
-}
-
-func (m *memLS) Create(now time.Time, details LockDetails) (string, error) {
- m.mu.Lock()
- defer m.mu.Unlock()
- m.collectExpiredNodes(now)
- details.Root = slashClean(details.Root)
-
- if !m.canCreate(details.Root, details.ZeroDepth) {
- return "", ErrLocked
- }
- n := m.create(details.Root)
- n.token = m.nextToken()
- m.byToken[n.token] = n
- n.details = details
- if n.details.Duration >= 0 {
- n.expiry = now.Add(n.details.Duration)
- heap.Push(&m.byExpiry, n)
- }
- return n.token, nil
-}
-
-func (m *memLS) Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error) {
- m.mu.Lock()
- defer m.mu.Unlock()
- m.collectExpiredNodes(now)
-
- n := m.byToken[token]
- if n == nil {
- return LockDetails{}, ErrNoSuchLock
- }
- if n.held {
- return LockDetails{}, ErrLocked
- }
- if n.byExpiryIndex >= 0 {
- heap.Remove(&m.byExpiry, n.byExpiryIndex)
- }
- n.details.Duration = duration
- if n.details.Duration >= 0 {
- n.expiry = now.Add(n.details.Duration)
- heap.Push(&m.byExpiry, n)
- }
- return n.details, nil
-}
-
-func (m *memLS) Unlock(now time.Time, token string) error {
- m.mu.Lock()
- defer m.mu.Unlock()
- m.collectExpiredNodes(now)
-
- n := m.byToken[token]
- if n == nil {
- return ErrNoSuchLock
- }
- if n.held {
- return ErrLocked
- }
- m.remove(n)
- return nil
-}
-
-func (m *memLS) canCreate(name string, zeroDepth bool) bool {
- return walkToRoot(name, func(name0 string, first bool) bool {
- n := m.byName[name0]
- if n == nil {
- return true
- }
- if first {
- if n.token != "" {
- // The target node is already locked.
- return false
- }
- if !zeroDepth {
- // The requested lock depth is infinite, and the fact that n exists
- // (n != nil) means that a descendent of the target node is locked.
- return false
- }
- } else if n.token != "" && !n.details.ZeroDepth {
- // An ancestor of the target node is locked with infinite depth.
- return false
- }
- return true
- })
-}
-
-func (m *memLS) create(name string) (ret *memLSNode) {
- walkToRoot(name, func(name0 string, first bool) bool {
- n := m.byName[name0]
- if n == nil {
- n = &memLSNode{
- details: LockDetails{
- Root: name0,
- },
- byExpiryIndex: -1,
- }
- m.byName[name0] = n
- }
- n.refCount++
- if first {
- ret = n
- }
- return true
- })
- return ret
-}
-
-func (m *memLS) remove(n *memLSNode) {
- delete(m.byToken, n.token)
- n.token = ""
- walkToRoot(n.details.Root, func(name0 string, first bool) bool {
- x := m.byName[name0]
- x.refCount--
- if x.refCount == 0 {
- delete(m.byName, name0)
- }
- return true
- })
- if n.byExpiryIndex >= 0 {
- heap.Remove(&m.byExpiry, n.byExpiryIndex)
- }
-}
-
-func walkToRoot(name string, f func(name0 string, first bool) bool) bool {
- for first := true; ; first = false {
- if !f(name, first) {
- return false
- }
- if name == "/" {
- break
- }
- name = name[:strings.LastIndex(name, "/")]
- if name == "" {
- name = "/"
- }
- }
- return true
-}
-
-type memLSNode struct {
- // details are the lock metadata. Even if this node's name is not explicitly locked,
- // details.Root will still equal the node's name.
- details LockDetails
- // token is the unique identifier for this node's lock. An empty token means that
- // this node is not explicitly locked.
- token string
- // refCount is the number of self-or-descendent nodes that are explicitly locked.
- refCount int
- // expiry is when this node's lock expires.
- expiry time.Time
- // byExpiryIndex is the index of this node in memLS.byExpiry. It is -1
- // if this node does not expire, or has expired.
- byExpiryIndex int
- // held is whether this node's lock is actively held by a Confirm call.
- held bool
-}
-
-type byExpiry []*memLSNode
-
-func (b *byExpiry) Len() int {
- return len(*b)
-}
-
-func (b *byExpiry) Less(i, j int) bool {
- return (*b)[i].expiry.Before((*b)[j].expiry)
-}
-
-func (b *byExpiry) Swap(i, j int) {
- (*b)[i], (*b)[j] = (*b)[j], (*b)[i]
- (*b)[i].byExpiryIndex = i
- (*b)[j].byExpiryIndex = j
-}
-
-func (b *byExpiry) Push(x interface{}) {
- n := x.(*memLSNode)
- n.byExpiryIndex = len(*b)
- *b = append(*b, n)
-}
-
-func (b *byExpiry) Pop() interface{} {
- i := len(*b) - 1
- n := (*b)[i]
- (*b)[i] = nil
- n.byExpiryIndex = -1
- *b = (*b)[:i]
- return n
-}
-
-const infiniteTimeout = -1
-
-// parseTimeout parses the Timeout HTTP header, as per section 10.7. If s is
-// empty, an infiniteTimeout is returned.
-func parseTimeout(s string) (time.Duration, error) {
- if s == "" {
- return infiniteTimeout, nil
- }
- if i := strings.IndexByte(s, ','); i >= 0 {
- s = s[:i]
- }
- s = strings.TrimSpace(s)
- if s == "Infinite" {
- return infiniteTimeout, nil
- }
- const pre = "Second-"
- if !strings.HasPrefix(s, pre) {
- return 0, errInvalidTimeout
- }
- s = s[len(pre):]
- if s == "" || s[0] < '0' || '9' < s[0] {
- return 0, errInvalidTimeout
- }
- n, err := strconv.ParseInt(s, 10, 64)
- if err != nil || 1<<32-1 < n {
- return 0, errInvalidTimeout
- }
- return time.Duration(n) * time.Second, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock_test.go
deleted file mode 100644
index 5cf14cda4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/lock_test.go
+++ /dev/null
@@ -1,731 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "fmt"
- "math/rand"
- "path"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "testing"
- "time"
-)
-
-func TestWalkToRoot(t *testing.T) {
- testCases := []struct {
- name string
- want []string
- }{{
- "/a/b/c/d",
- []string{
- "/a/b/c/d",
- "/a/b/c",
- "/a/b",
- "/a",
- "/",
- },
- }, {
- "/a",
- []string{
- "/a",
- "/",
- },
- }, {
- "/",
- []string{
- "/",
- },
- }}
-
- for _, tc := range testCases {
- var got []string
- if !walkToRoot(tc.name, func(name0 string, first bool) bool {
- if first != (len(got) == 0) {
- t.Errorf("name=%q: first=%t but len(got)==%d", tc.name, first, len(got))
- return false
- }
- got = append(got, name0)
- return true
- }) {
- continue
- }
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("name=%q:\ngot %q\nwant %q", tc.name, got, tc.want)
- }
- }
-}
-
-var lockTestDurations = []time.Duration{
- infiniteTimeout, // infiniteTimeout means to never expire.
- 0, // A zero duration means to expire immediately.
- 100 * time.Hour, // A very large duration will not expire in these tests.
-}
-
-// lockTestNames are the names of a set of mutually compatible locks. For each
-// name fragment:
-// - _ means no explicit lock.
-// - i means an infinite-depth lock,
-// - z means a zero-depth lock,
-var lockTestNames = []string{
- "/_/_/_/_/z",
- "/_/_/i",
- "/_/z",
- "/_/z/i",
- "/_/z/z",
- "/_/z/_/i",
- "/_/z/_/z",
- "/i",
- "/z",
- "/z/_/i",
- "/z/_/z",
-}
-
-func lockTestZeroDepth(name string) bool {
- switch name[len(name)-1] {
- case 'i':
- return false
- case 'z':
- return true
- }
- panic(fmt.Sprintf("lock name %q did not end with 'i' or 'z'", name))
-}
-
-func TestMemLSCanCreate(t *testing.T) {
- now := time.Unix(0, 0)
- m := NewMemLS().(*memLS)
-
- for _, name := range lockTestNames {
- _, err := m.Create(now, LockDetails{
- Root: name,
- Duration: infiniteTimeout,
- ZeroDepth: lockTestZeroDepth(name),
- })
- if err != nil {
- t.Fatalf("creating lock for %q: %v", name, err)
- }
- }
-
- wantCanCreate := func(name string, zeroDepth bool) bool {
- for _, n := range lockTestNames {
- switch {
- case n == name:
- // An existing lock has the same name as the proposed lock.
- return false
- case strings.HasPrefix(n, name):
- // An existing lock would be a child of the proposed lock,
- // which conflicts if the proposed lock has infinite depth.
- if !zeroDepth {
- return false
- }
- case strings.HasPrefix(name, n):
- // An existing lock would be an ancestor of the proposed lock,
- // which conflicts if the ancestor has infinite depth.
- if n[len(n)-1] == 'i' {
- return false
- }
- }
- }
- return true
- }
-
- var check func(int, string)
- check = func(recursion int, name string) {
- for _, zeroDepth := range []bool{false, true} {
- got := m.canCreate(name, zeroDepth)
- want := wantCanCreate(name, zeroDepth)
- if got != want {
- t.Errorf("canCreate name=%q zeroDepth=%t: got %t, want %t", name, zeroDepth, got, want)
- }
- }
- if recursion == 6 {
- return
- }
- if name != "/" {
- name += "/"
- }
- for _, c := range "_iz" {
- check(recursion+1, name+string(c))
- }
- }
- check(0, "/")
-}
-
-func TestMemLSLookup(t *testing.T) {
- now := time.Unix(0, 0)
- m := NewMemLS().(*memLS)
-
- badToken := m.nextToken()
- t.Logf("badToken=%q", badToken)
-
- for _, name := range lockTestNames {
- token, err := m.Create(now, LockDetails{
- Root: name,
- Duration: infiniteTimeout,
- ZeroDepth: lockTestZeroDepth(name),
- })
- if err != nil {
- t.Fatalf("creating lock for %q: %v", name, err)
- }
- t.Logf("%-15q -> node=%p token=%q", name, m.byName[name], token)
- }
-
- baseNames := append([]string{"/a", "/b/c"}, lockTestNames...)
- for _, baseName := range baseNames {
- for _, suffix := range []string{"", "/0", "/1/2/3"} {
- name := baseName + suffix
-
- goodToken := ""
- base := m.byName[baseName]
- if base != nil && (suffix == "" || !lockTestZeroDepth(baseName)) {
- goodToken = base.token
- }
-
- for _, token := range []string{badToken, goodToken} {
- if token == "" {
- continue
- }
-
- got := m.lookup(name, Condition{Token: token})
- want := base
- if token == badToken {
- want = nil
- }
- if got != want {
- t.Errorf("name=%-20qtoken=%q (bad=%t): got %p, want %p",
- name, token, token == badToken, got, want)
- }
- }
- }
- }
-}
-
-func TestMemLSConfirm(t *testing.T) {
- now := time.Unix(0, 0)
- m := NewMemLS().(*memLS)
- alice, err := m.Create(now, LockDetails{
- Root: "/alice",
- Duration: infiniteTimeout,
- ZeroDepth: false,
- })
- tweedle, err := m.Create(now, LockDetails{
- Root: "/tweedle",
- Duration: infiniteTimeout,
- ZeroDepth: false,
- })
- if err != nil {
- t.Fatalf("Create: %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Create: inconsistent state: %v", err)
- }
-
- // Test a mismatch between name and condition.
- _, err = m.Confirm(now, "/tweedle/dee", "", Condition{Token: alice})
- if err != ErrConfirmationFailed {
- t.Fatalf("Confirm (mismatch): got %v, want ErrConfirmationFailed", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Confirm (mismatch): inconsistent state: %v", err)
- }
-
- // Test two names (that fall under the same lock) in the one Confirm call.
- release, err := m.Confirm(now, "/tweedle/dee", "/tweedle/dum", Condition{Token: tweedle})
- if err != nil {
- t.Fatalf("Confirm (twins): %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Confirm (twins): inconsistent state: %v", err)
- }
- release()
- if err := m.consistent(); err != nil {
- t.Fatalf("release (twins): inconsistent state: %v", err)
- }
-
- // Test the same two names in overlapping Confirm / release calls.
- releaseDee, err := m.Confirm(now, "/tweedle/dee", "", Condition{Token: tweedle})
- if err != nil {
- t.Fatalf("Confirm (sequence #0): %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Confirm (sequence #0): inconsistent state: %v", err)
- }
-
- _, err = m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle})
- if err != ErrConfirmationFailed {
- t.Fatalf("Confirm (sequence #1): got %v, want ErrConfirmationFailed", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Confirm (sequence #1): inconsistent state: %v", err)
- }
-
- releaseDee()
- if err := m.consistent(); err != nil {
- t.Fatalf("release (sequence #2): inconsistent state: %v", err)
- }
-
- releaseDum, err := m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle})
- if err != nil {
- t.Fatalf("Confirm (sequence #3): %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Confirm (sequence #3): inconsistent state: %v", err)
- }
-
- // Test that you can't unlock a held lock.
- err = m.Unlock(now, tweedle)
- if err != ErrLocked {
- t.Fatalf("Unlock (sequence #4): got %v, want ErrLocked", err)
- }
-
- releaseDum()
- if err := m.consistent(); err != nil {
- t.Fatalf("release (sequence #5): inconsistent state: %v", err)
- }
-
- err = m.Unlock(now, tweedle)
- if err != nil {
- t.Fatalf("Unlock (sequence #6): %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Unlock (sequence #6): inconsistent state: %v", err)
- }
-}
-
-func TestMemLSNonCanonicalRoot(t *testing.T) {
- now := time.Unix(0, 0)
- m := NewMemLS().(*memLS)
- token, err := m.Create(now, LockDetails{
- Root: "/foo/./bar//",
- Duration: 1 * time.Second,
- })
- if err != nil {
- t.Fatalf("Create: %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Create: inconsistent state: %v", err)
- }
- if err := m.Unlock(now, token); err != nil {
- t.Fatalf("Unlock: %v", err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("Unlock: inconsistent state: %v", err)
- }
-}
-
-func TestMemLSExpiry(t *testing.T) {
- m := NewMemLS().(*memLS)
- testCases := []string{
- "setNow 0",
- "create /a.5",
- "want /a.5",
- "create /c.6",
- "want /a.5 /c.6",
- "create /a/b.7",
- "want /a.5 /a/b.7 /c.6",
- "setNow 4",
- "want /a.5 /a/b.7 /c.6",
- "setNow 5",
- "want /a/b.7 /c.6",
- "setNow 6",
- "want /a/b.7",
- "setNow 7",
- "want ",
- "setNow 8",
- "want ",
- "create /a.12",
- "create /b.13",
- "create /c.15",
- "create /a/d.16",
- "want /a.12 /a/d.16 /b.13 /c.15",
- "refresh /a.14",
- "want /a.14 /a/d.16 /b.13 /c.15",
- "setNow 12",
- "want /a.14 /a/d.16 /b.13 /c.15",
- "setNow 13",
- "want /a.14 /a/d.16 /c.15",
- "setNow 14",
- "want /a/d.16 /c.15",
- "refresh /a/d.20",
- "refresh /c.20",
- "want /a/d.20 /c.20",
- "setNow 20",
- "want ",
- }
-
- tokens := map[string]string{}
- zTime := time.Unix(0, 0)
- now := zTime
- for i, tc := range testCases {
- j := strings.IndexByte(tc, ' ')
- if j < 0 {
- t.Fatalf("test case #%d %q: invalid command", i, tc)
- }
- op, arg := tc[:j], tc[j+1:]
- switch op {
- default:
- t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op)
-
- case "create", "refresh":
- parts := strings.Split(arg, ".")
- if len(parts) != 2 {
- t.Fatalf("test case #%d %q: invalid create", i, tc)
- }
- root := parts[0]
- d, err := strconv.Atoi(parts[1])
- if err != nil {
- t.Fatalf("test case #%d %q: invalid duration", i, tc)
- }
- dur := time.Unix(0, 0).Add(time.Duration(d) * time.Second).Sub(now)
-
- switch op {
- case "create":
- token, err := m.Create(now, LockDetails{
- Root: root,
- Duration: dur,
- ZeroDepth: true,
- })
- if err != nil {
- t.Fatalf("test case #%d %q: Create: %v", i, tc, err)
- }
- tokens[root] = token
-
- case "refresh":
- token := tokens[root]
- if token == "" {
- t.Fatalf("test case #%d %q: no token for %q", i, tc, root)
- }
- got, err := m.Refresh(now, token, dur)
- if err != nil {
- t.Fatalf("test case #%d %q: Refresh: %v", i, tc, err)
- }
- want := LockDetails{
- Root: root,
- Duration: dur,
- ZeroDepth: true,
- }
- if got != want {
- t.Fatalf("test case #%d %q:\ngot %v\nwant %v", i, tc, got, want)
- }
- }
-
- case "setNow":
- d, err := strconv.Atoi(arg)
- if err != nil {
- t.Fatalf("test case #%d %q: invalid duration", i, tc)
- }
- now = time.Unix(0, 0).Add(time.Duration(d) * time.Second)
-
- case "want":
- m.mu.Lock()
- m.collectExpiredNodes(now)
- got := make([]string, 0, len(m.byToken))
- for _, n := range m.byToken {
- got = append(got, fmt.Sprintf("%s.%d",
- n.details.Root, n.expiry.Sub(zTime)/time.Second))
- }
- m.mu.Unlock()
- sort.Strings(got)
- want := []string{}
- if arg != "" {
- want = strings.Split(arg, " ")
- }
- if !reflect.DeepEqual(got, want) {
- t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, want)
- }
- }
-
- if err := m.consistent(); err != nil {
- t.Fatalf("test case #%d %q: inconsistent state: %v", i, tc, err)
- }
- }
-}
-
-func TestMemLS(t *testing.T) {
- now := time.Unix(0, 0)
- m := NewMemLS().(*memLS)
- rng := rand.New(rand.NewSource(0))
- tokens := map[string]string{}
- nConfirm, nCreate, nRefresh, nUnlock := 0, 0, 0, 0
- const N = 2000
-
- for i := 0; i < N; i++ {
- name := lockTestNames[rng.Intn(len(lockTestNames))]
- duration := lockTestDurations[rng.Intn(len(lockTestDurations))]
- confirmed, unlocked := false, false
-
- // If the name was already locked, we randomly confirm/release, refresh
- // or unlock it. Otherwise, we create a lock.
- token := tokens[name]
- if token != "" {
- switch rng.Intn(3) {
- case 0:
- confirmed = true
- nConfirm++
- release, err := m.Confirm(now, name, "", Condition{Token: token})
- if err != nil {
- t.Fatalf("iteration #%d: Confirm %q: %v", i, name, err)
- }
- if err := m.consistent(); err != nil {
- t.Fatalf("iteration #%d: inconsistent state: %v", i, err)
- }
- release()
-
- case 1:
- nRefresh++
- if _, err := m.Refresh(now, token, duration); err != nil {
- t.Fatalf("iteration #%d: Refresh %q: %v", i, name, err)
- }
-
- case 2:
- unlocked = true
- nUnlock++
- if err := m.Unlock(now, token); err != nil {
- t.Fatalf("iteration #%d: Unlock %q: %v", i, name, err)
- }
- }
-
- } else {
- nCreate++
- var err error
- token, err = m.Create(now, LockDetails{
- Root: name,
- Duration: duration,
- ZeroDepth: lockTestZeroDepth(name),
- })
- if err != nil {
- t.Fatalf("iteration #%d: Create %q: %v", i, name, err)
- }
- }
-
- if !confirmed {
- if duration == 0 || unlocked {
- // A zero-duration lock should expire immediately and is
- // effectively equivalent to being unlocked.
- tokens[name] = ""
- } else {
- tokens[name] = token
- }
- }
-
- if err := m.consistent(); err != nil {
- t.Fatalf("iteration #%d: inconsistent state: %v", i, err)
- }
- }
-
- if nConfirm < N/10 {
- t.Fatalf("too few Confirm calls: got %d, want >= %d", nConfirm, N/10)
- }
- if nCreate < N/10 {
- t.Fatalf("too few Create calls: got %d, want >= %d", nCreate, N/10)
- }
- if nRefresh < N/10 {
- t.Fatalf("too few Refresh calls: got %d, want >= %d", nRefresh, N/10)
- }
- if nUnlock < N/10 {
- t.Fatalf("too few Unlock calls: got %d, want >= %d", nUnlock, N/10)
- }
-}
-
-func (m *memLS) consistent() error {
- m.mu.Lock()
- defer m.mu.Unlock()
-
- // If m.byName is non-empty, then it must contain an entry for the root "/",
- // and its refCount should equal the number of locked nodes.
- if len(m.byName) > 0 {
- n := m.byName["/"]
- if n == nil {
- return fmt.Errorf(`non-empty m.byName does not contain the root "/"`)
- }
- if n.refCount != len(m.byToken) {
- return fmt.Errorf("root node refCount=%d, differs from len(m.byToken)=%d", n.refCount, len(m.byToken))
- }
- }
-
- for name, n := range m.byName {
- // The map keys should be consistent with the node's copy of the key.
- if n.details.Root != name {
- return fmt.Errorf("node name %q != byName map key %q", n.details.Root, name)
- }
-
- // A name must be clean, and start with a "/".
- if len(name) == 0 || name[0] != '/' {
- return fmt.Errorf(`node name %q does not start with "/"`, name)
- }
- if name != path.Clean(name) {
- return fmt.Errorf(`node name %q is not clean`, name)
- }
-
- // A node's refCount should be positive.
- if n.refCount <= 0 {
- return fmt.Errorf("non-positive refCount for node at name %q", name)
- }
-
- // A node's refCount should be the number of self-or-descendents that
- // are locked (i.e. have a non-empty token).
- var list []string
- for name0, n0 := range m.byName {
- // All of lockTestNames' name fragments are one byte long: '_', 'i' or 'z',
- // so strings.HasPrefix is equivalent to self-or-descendent name match.
- // We don't have to worry about "/foo/bar" being a false positive match
- // for "/foo/b".
- if strings.HasPrefix(name0, name) && n0.token != "" {
- list = append(list, name0)
- }
- }
- if n.refCount != len(list) {
- sort.Strings(list)
- return fmt.Errorf("node at name %q has refCount %d but locked self-or-descendents are %q (len=%d)",
- name, n.refCount, list, len(list))
- }
-
- // A node n is in m.byToken if it has a non-empty token.
- if n.token != "" {
- if _, ok := m.byToken[n.token]; !ok {
- return fmt.Errorf("node at name %q has token %q but not in m.byToken", name, n.token)
- }
- }
-
- // A node n is in m.byExpiry if it has a non-negative byExpiryIndex.
- if n.byExpiryIndex >= 0 {
- if n.byExpiryIndex >= len(m.byExpiry) {
- return fmt.Errorf("node at name %q has byExpiryIndex %d but m.byExpiry has length %d", name, n.byExpiryIndex, len(m.byExpiry))
- }
- if n != m.byExpiry[n.byExpiryIndex] {
- return fmt.Errorf("node at name %q has byExpiryIndex %d but that indexes a different node", name, n.byExpiryIndex)
- }
- }
- }
-
- for token, n := range m.byToken {
- // The map keys should be consistent with the node's copy of the key.
- if n.token != token {
- return fmt.Errorf("node token %q != byToken map key %q", n.token, token)
- }
-
- // Every node in m.byToken is in m.byName.
- if _, ok := m.byName[n.details.Root]; !ok {
- return fmt.Errorf("node at name %q in m.byToken but not in m.byName", n.details.Root)
- }
- }
-
- for i, n := range m.byExpiry {
- // The slice indices should be consistent with the node's copy of the index.
- if n.byExpiryIndex != i {
- return fmt.Errorf("node byExpiryIndex %d != byExpiry slice index %d", n.byExpiryIndex, i)
- }
-
- // Every node in m.byExpiry is in m.byName.
- if _, ok := m.byName[n.details.Root]; !ok {
- return fmt.Errorf("node at name %q in m.byExpiry but not in m.byName", n.details.Root)
- }
-
- // No node in m.byExpiry should be held.
- if n.held {
- return fmt.Errorf("node at name %q in m.byExpiry is held", n.details.Root)
- }
- }
- return nil
-}
-
-func TestParseTimeout(t *testing.T) {
- testCases := []struct {
- s string
- want time.Duration
- wantErr error
- }{{
- "",
- infiniteTimeout,
- nil,
- }, {
- "Infinite",
- infiniteTimeout,
- nil,
- }, {
- "Infinitesimal",
- 0,
- errInvalidTimeout,
- }, {
- "infinite",
- 0,
- errInvalidTimeout,
- }, {
- "Second-0",
- 0 * time.Second,
- nil,
- }, {
- "Second-123",
- 123 * time.Second,
- nil,
- }, {
- " Second-456 ",
- 456 * time.Second,
- nil,
- }, {
- "Second-4100000000",
- 4100000000 * time.Second,
- nil,
- }, {
- "junk",
- 0,
- errInvalidTimeout,
- }, {
- "Second-",
- 0,
- errInvalidTimeout,
- }, {
- "Second--1",
- 0,
- errInvalidTimeout,
- }, {
- "Second--123",
- 0,
- errInvalidTimeout,
- }, {
- "Second-+123",
- 0,
- errInvalidTimeout,
- }, {
- "Second-0x123",
- 0,
- errInvalidTimeout,
- }, {
- "second-123",
- 0,
- errInvalidTimeout,
- }, {
- "Second-4294967295",
- 4294967295 * time.Second,
- nil,
- }, {
- // Section 10.7 says that "The timeout value for TimeType "Second"
- // must not be greater than 2^32-1."
- "Second-4294967296",
- 0,
- errInvalidTimeout,
- }, {
- // This test case comes from section 9.10.9 of the spec. It says,
- //
- // "In this request, the client has specified that it desires an
- // infinite-length lock, if available, otherwise a timeout of 4.1
- // billion seconds, if available."
- //
- // The Go WebDAV package always supports infinite length locks,
- // and ignores the fallback after the comma.
- "Infinite, Second-4100000000",
- infiniteTimeout,
- nil,
- }}
-
- for _, tc := range testCases {
- got, gotErr := parseTimeout(tc.s)
- if got != tc.want || gotErr != tc.wantErr {
- t.Errorf("parsing %q:\ngot %v, %v\nwant %v, %v", tc.s, got, gotErr, tc.want, tc.wantErr)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop.go
deleted file mode 100644
index e36a3b31d..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop.go
+++ /dev/null
@@ -1,418 +0,0 @@
-// Copyright 2015 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 file.
-
-package webdav
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io"
- "mime"
- "net/http"
- "os"
- "path/filepath"
- "strconv"
-
- "golang.org/x/net/context"
-)
-
-// Proppatch describes a property update instruction as defined in RFC 4918.
-// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH
-type Proppatch struct {
- // Remove specifies whether this patch removes properties. If it does not
- // remove them, it sets them.
- Remove bool
- // Props contains the properties to be set or removed.
- Props []Property
-}
-
-// Propstat describes a XML propstat element as defined in RFC 4918.
-// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat
-type Propstat struct {
- // Props contains the properties for which Status applies.
- Props []Property
-
- // Status defines the HTTP status code of the properties in Prop.
- // Allowed values include, but are not limited to the WebDAV status
- // code extensions for HTTP/1.1.
- // http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11
- Status int
-
- // XMLError contains the XML representation of the optional error element.
- // XML content within this field must not rely on any predefined
- // namespace declarations or prefixes. If empty, the XML error element
- // is omitted.
- XMLError string
-
- // ResponseDescription contains the contents of the optional
- // responsedescription field. If empty, the XML element is omitted.
- ResponseDescription string
-}
-
-// makePropstats returns a slice containing those of x and y whose Props slice
-// is non-empty. If both are empty, it returns a slice containing an otherwise
-// zero Propstat whose HTTP status code is 200 OK.
-func makePropstats(x, y Propstat) []Propstat {
- pstats := make([]Propstat, 0, 2)
- if len(x.Props) != 0 {
- pstats = append(pstats, x)
- }
- if len(y.Props) != 0 {
- pstats = append(pstats, y)
- }
- if len(pstats) == 0 {
- pstats = append(pstats, Propstat{
- Status: http.StatusOK,
- })
- }
- return pstats
-}
-
-// DeadPropsHolder holds the dead properties of a resource.
-//
-// Dead properties are those properties that are explicitly defined. In
-// comparison, live properties, such as DAV:getcontentlength, are implicitly
-// defined by the underlying resource, and cannot be explicitly overridden or
-// removed. See the Terminology section of
-// http://www.webdav.org/specs/rfc4918.html#rfc.section.3
-//
-// There is a whitelist of the names of live properties. This package handles
-// all live properties, and will only pass non-whitelisted names to the Patch
-// method of DeadPropsHolder implementations.
-type DeadPropsHolder interface {
- // DeadProps returns a copy of the dead properties held.
- DeadProps() (map[xml.Name]Property, error)
-
- // Patch patches the dead properties held.
- //
- // Patching is atomic; either all or no patches succeed. It returns (nil,
- // non-nil) if an internal server error occurred, otherwise the Propstats
- // collectively contain one Property for each proposed patch Property. If
- // all patches succeed, Patch returns a slice of length one and a Propstat
- // element with a 200 OK HTTP status code. If none succeed, for reasons
- // other than an internal server error, no Propstat has status 200 OK.
- //
- // For more details on when various HTTP status codes apply, see
- // http://www.webdav.org/specs/rfc4918.html#PROPPATCH-status
- Patch([]Proppatch) ([]Propstat, error)
-}
-
-// liveProps contains all supported, protected DAV: properties.
-var liveProps = map[xml.Name]struct {
- // findFn implements the propfind function of this property. If nil,
- // it indicates a hidden property.
- findFn func(context.Context, FileSystem, LockSystem, string, os.FileInfo) (string, error)
- // dir is true if the property applies to directories.
- dir bool
-}{
- {Space: "DAV:", Local: "resourcetype"}: {
- findFn: findResourceType,
- dir: true,
- },
- {Space: "DAV:", Local: "displayname"}: {
- findFn: findDisplayName,
- dir: true,
- },
- {Space: "DAV:", Local: "getcontentlength"}: {
- findFn: findContentLength,
- dir: false,
- },
- {Space: "DAV:", Local: "getlastmodified"}: {
- findFn: findLastModified,
- // http://webdav.org/specs/rfc4918.html#PROPERTY_getlastmodified
- // suggests that getlastmodified should only apply to GETable
- // resources, and this package does not support GET on directories.
- //
- // Nonetheless, some WebDAV clients expect child directories to be
- // sortable by getlastmodified date, so this value is true, not false.
- // See golang.org/issue/15334.
- dir: true,
- },
- {Space: "DAV:", Local: "creationdate"}: {
- findFn: nil,
- dir: false,
- },
- {Space: "DAV:", Local: "getcontentlanguage"}: {
- findFn: nil,
- dir: false,
- },
- {Space: "DAV:", Local: "getcontenttype"}: {
- findFn: findContentType,
- dir: false,
- },
- {Space: "DAV:", Local: "getetag"}: {
- findFn: findETag,
- // findETag implements ETag as the concatenated hex values of a file's
- // modification time and size. This is not a reliable synchronization
- // mechanism for directories, so we do not advertise getetag for DAV
- // collections.
- dir: false,
- },
-
- // TODO: The lockdiscovery property requires LockSystem to list the
- // active locks on a resource.
- {Space: "DAV:", Local: "lockdiscovery"}: {},
- {Space: "DAV:", Local: "supportedlock"}: {
- findFn: findSupportedLock,
- dir: true,
- },
-}
-
-// TODO(nigeltao) merge props and allprop?
-
-// Props returns the status of the properties named pnames for resource name.
-//
-// Each Propstat has a unique status and each property name will only be part
-// of one Propstat element.
-func props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pnames []xml.Name) ([]Propstat, error) {
- f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- fi, err := f.Stat()
- if err != nil {
- return nil, err
- }
- isDir := fi.IsDir()
-
- var deadProps map[xml.Name]Property
- if dph, ok := f.(DeadPropsHolder); ok {
- deadProps, err = dph.DeadProps()
- if err != nil {
- return nil, err
- }
- }
-
- pstatOK := Propstat{Status: http.StatusOK}
- pstatNotFound := Propstat{Status: http.StatusNotFound}
- for _, pn := range pnames {
- // If this file has dead properties, check if they contain pn.
- if dp, ok := deadProps[pn]; ok {
- pstatOK.Props = append(pstatOK.Props, dp)
- continue
- }
- // Otherwise, it must either be a live property or we don't know it.
- if prop := liveProps[pn]; prop.findFn != nil && (prop.dir || !isDir) {
- innerXML, err := prop.findFn(ctx, fs, ls, name, fi)
- if err != nil {
- return nil, err
- }
- pstatOK.Props = append(pstatOK.Props, Property{
- XMLName: pn,
- InnerXML: []byte(innerXML),
- })
- } else {
- pstatNotFound.Props = append(pstatNotFound.Props, Property{
- XMLName: pn,
- })
- }
- }
- return makePropstats(pstatOK, pstatNotFound), nil
-}
-
-// Propnames returns the property names defined for resource name.
-func propnames(ctx context.Context, fs FileSystem, ls LockSystem, name string) ([]xml.Name, error) {
- f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- fi, err := f.Stat()
- if err != nil {
- return nil, err
- }
- isDir := fi.IsDir()
-
- var deadProps map[xml.Name]Property
- if dph, ok := f.(DeadPropsHolder); ok {
- deadProps, err = dph.DeadProps()
- if err != nil {
- return nil, err
- }
- }
-
- pnames := make([]xml.Name, 0, len(liveProps)+len(deadProps))
- for pn, prop := range liveProps {
- if prop.findFn != nil && (prop.dir || !isDir) {
- pnames = append(pnames, pn)
- }
- }
- for pn := range deadProps {
- pnames = append(pnames, pn)
- }
- return pnames, nil
-}
-
-// Allprop returns the properties defined for resource name and the properties
-// named in include.
-//
-// Note that RFC 4918 defines 'allprop' to return the DAV: properties defined
-// within the RFC plus dead properties. Other live properties should only be
-// returned if they are named in 'include'.
-//
-// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND
-func allprop(ctx context.Context, fs FileSystem, ls LockSystem, name string, include []xml.Name) ([]Propstat, error) {
- pnames, err := propnames(ctx, fs, ls, name)
- if err != nil {
- return nil, err
- }
- // Add names from include if they are not already covered in pnames.
- nameset := make(map[xml.Name]bool)
- for _, pn := range pnames {
- nameset[pn] = true
- }
- for _, pn := range include {
- if !nameset[pn] {
- pnames = append(pnames, pn)
- }
- }
- return props(ctx, fs, ls, name, pnames)
-}
-
-// Patch patches the properties of resource name. The return values are
-// constrained in the same manner as DeadPropsHolder.Patch.
-func patch(ctx context.Context, fs FileSystem, ls LockSystem, name string, patches []Proppatch) ([]Propstat, error) {
- conflict := false
-loop:
- for _, patch := range patches {
- for _, p := range patch.Props {
- if _, ok := liveProps[p.XMLName]; ok {
- conflict = true
- break loop
- }
- }
- }
- if conflict {
- pstatForbidden := Propstat{
- Status: http.StatusForbidden,
- XMLError: `<D:cannot-modify-protected-property xmlns:D="DAV:"/>`,
- }
- pstatFailedDep := Propstat{
- Status: StatusFailedDependency,
- }
- for _, patch := range patches {
- for _, p := range patch.Props {
- if _, ok := liveProps[p.XMLName]; ok {
- pstatForbidden.Props = append(pstatForbidden.Props, Property{XMLName: p.XMLName})
- } else {
- pstatFailedDep.Props = append(pstatFailedDep.Props, Property{XMLName: p.XMLName})
- }
- }
- }
- return makePropstats(pstatForbidden, pstatFailedDep), nil
- }
-
- f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- if dph, ok := f.(DeadPropsHolder); ok {
- ret, err := dph.Patch(patches)
- if err != nil {
- return nil, err
- }
- // http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat says that
- // "The contents of the prop XML element must only list the names of
- // properties to which the result in the status element applies."
- for _, pstat := range ret {
- for i, p := range pstat.Props {
- pstat.Props[i] = Property{XMLName: p.XMLName}
- }
- }
- return ret, nil
- }
- // The file doesn't implement the optional DeadPropsHolder interface, so
- // all patches are forbidden.
- pstat := Propstat{Status: http.StatusForbidden}
- for _, patch := range patches {
- for _, p := range patch.Props {
- pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName})
- }
- }
- return []Propstat{pstat}, nil
-}
-
-func escapeXML(s string) string {
- for i := 0; i < len(s); i++ {
- // As an optimization, if s contains only ASCII letters, digits or a
- // few special characters, the escaped value is s itself and we don't
- // need to allocate a buffer and convert between string and []byte.
- switch c := s[i]; {
- case c == ' ' || c == '_' ||
- ('+' <= c && c <= '9') || // Digits as well as + , - . and /
- ('A' <= c && c <= 'Z') ||
- ('a' <= c && c <= 'z'):
- continue
- }
- // Otherwise, go through the full escaping process.
- var buf bytes.Buffer
- xml.EscapeText(&buf, []byte(s))
- return buf.String()
- }
- return s
-}
-
-func findResourceType(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- if fi.IsDir() {
- return `<D:collection xmlns:D="DAV:"/>`, nil
- }
- return "", nil
-}
-
-func findDisplayName(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- if slashClean(name) == "/" {
- // Hide the real name of a possibly prefixed root directory.
- return "", nil
- }
- return escapeXML(fi.Name()), nil
-}
-
-func findContentLength(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- return strconv.FormatInt(fi.Size(), 10), nil
-}
-
-func findLastModified(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- return fi.ModTime().Format(http.TimeFormat), nil
-}
-
-func findContentType(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
- if err != nil {
- return "", err
- }
- defer f.Close()
- // This implementation is based on serveContent's code in the standard net/http package.
- ctype := mime.TypeByExtension(filepath.Ext(name))
- if ctype != "" {
- return ctype, nil
- }
- // Read a chunk to decide between utf-8 text and binary.
- var buf [512]byte
- n, err := io.ReadFull(f, buf[:])
- if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
- return "", err
- }
- ctype = http.DetectContentType(buf[:n])
- // Rewind file.
- _, err = f.Seek(0, os.SEEK_SET)
- return ctype, err
-}
-
-func findETag(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- // The Apache http 2.4 web server by default concatenates the
- // modification time and size of a file. We replicate the heuristic
- // with nanosecond granularity.
- return fmt.Sprintf(`"%x%x"`, fi.ModTime().UnixNano(), fi.Size()), nil
-}
-
-func findSupportedLock(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
- return `` +
- `<D:lockentry xmlns:D="DAV:">` +
- `<D:lockscope><D:exclusive/></D:lockscope>` +
- `<D:locktype><D:write/></D:locktype>` +
- `</D:lockentry>`, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop_test.go
deleted file mode 100644
index 57d0e826f..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/prop_test.go
+++ /dev/null
@@ -1,613 +0,0 @@
-// Copyright 2015 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 file.
-
-package webdav
-
-import (
- "encoding/xml"
- "fmt"
- "net/http"
- "os"
- "reflect"
- "sort"
- "testing"
-
- "golang.org/x/net/context"
-)
-
-func TestMemPS(t *testing.T) {
- ctx := context.Background()
- // calcProps calculates the getlastmodified and getetag DAV: property
- // values in pstats for resource name in file-system fs.
- calcProps := func(name string, fs FileSystem, ls LockSystem, pstats []Propstat) error {
- fi, err := fs.Stat(ctx, name)
- if err != nil {
- return err
- }
- for _, pst := range pstats {
- for i, p := range pst.Props {
- switch p.XMLName {
- case xml.Name{Space: "DAV:", Local: "getlastmodified"}:
- p.InnerXML = []byte(fi.ModTime().Format(http.TimeFormat))
- pst.Props[i] = p
- case xml.Name{Space: "DAV:", Local: "getetag"}:
- if fi.IsDir() {
- continue
- }
- etag, err := findETag(ctx, fs, ls, name, fi)
- if err != nil {
- return err
- }
- p.InnerXML = []byte(etag)
- pst.Props[i] = p
- }
- }
- }
- return nil
- }
-
- const (
- lockEntry = `` +
- `<D:lockentry xmlns:D="DAV:">` +
- `<D:lockscope><D:exclusive/></D:lockscope>` +
- `<D:locktype><D:write/></D:locktype>` +
- `</D:lockentry>`
- statForbiddenError = `<D:cannot-modify-protected-property xmlns:D="DAV:"/>`
- )
-
- type propOp struct {
- op string
- name string
- pnames []xml.Name
- patches []Proppatch
- wantPnames []xml.Name
- wantPropstats []Propstat
- }
-
- testCases := []struct {
- desc string
- noDeadProps bool
- buildfs []string
- propOp []propOp
- }{{
- desc: "propname",
- buildfs: []string{"mkdir /dir", "touch /file"},
- propOp: []propOp{{
- op: "propname",
- name: "/dir",
- wantPnames: []xml.Name{
- {Space: "DAV:", Local: "resourcetype"},
- {Space: "DAV:", Local: "displayname"},
- {Space: "DAV:", Local: "supportedlock"},
- {Space: "DAV:", Local: "getlastmodified"},
- },
- }, {
- op: "propname",
- name: "/file",
- wantPnames: []xml.Name{
- {Space: "DAV:", Local: "resourcetype"},
- {Space: "DAV:", Local: "displayname"},
- {Space: "DAV:", Local: "getcontentlength"},
- {Space: "DAV:", Local: "getlastmodified"},
- {Space: "DAV:", Local: "getcontenttype"},
- {Space: "DAV:", Local: "getetag"},
- {Space: "DAV:", Local: "supportedlock"},
- },
- }},
- }, {
- desc: "allprop dir and file",
- buildfs: []string{"mkdir /dir", "write /file foobarbaz"},
- propOp: []propOp{{
- op: "allprop",
- name: "/dir",
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"},
- InnerXML: []byte(`<D:collection xmlns:D="DAV:"/>`),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "displayname"},
- InnerXML: []byte("dir"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"},
- InnerXML: nil, // Calculated during test.
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"},
- InnerXML: []byte(lockEntry),
- }},
- }},
- }, {
- op: "allprop",
- name: "/file",
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"},
- InnerXML: []byte(""),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "displayname"},
- InnerXML: []byte("file"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"},
- InnerXML: []byte("9"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"},
- InnerXML: nil, // Calculated during test.
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"},
- InnerXML: []byte("text/plain; charset=utf-8"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- InnerXML: nil, // Calculated during test.
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"},
- InnerXML: []byte(lockEntry),
- }},
- }},
- }, {
- op: "allprop",
- name: "/file",
- pnames: []xml.Name{
- {"DAV:", "resourcetype"},
- {"foo", "bar"},
- },
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"},
- InnerXML: []byte(""),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "displayname"},
- InnerXML: []byte("file"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"},
- InnerXML: []byte("9"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"},
- InnerXML: nil, // Calculated during test.
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"},
- InnerXML: []byte("text/plain; charset=utf-8"),
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- InnerXML: nil, // Calculated during test.
- }, {
- XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"},
- InnerXML: []byte(lockEntry),
- }}}, {
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }}},
- },
- }},
- }, {
- desc: "propfind DAV:resourcetype",
- buildfs: []string{"mkdir /dir", "touch /file"},
- propOp: []propOp{{
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{"DAV:", "resourcetype"}},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"},
- InnerXML: []byte(`<D:collection xmlns:D="DAV:"/>`),
- }},
- }},
- }, {
- op: "propfind",
- name: "/file",
- pnames: []xml.Name{{"DAV:", "resourcetype"}},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"},
- InnerXML: []byte(""),
- }},
- }},
- }},
- }, {
- desc: "propfind unsupported DAV properties",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{"DAV:", "getcontentlanguage"}},
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "getcontentlanguage"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{"DAV:", "creationdate"}},
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "creationdate"},
- }},
- }},
- }},
- }, {
- desc: "propfind getetag for files but not for directories",
- buildfs: []string{"mkdir /dir", "touch /file"},
- propOp: []propOp{{
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{"DAV:", "getetag"}},
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/file",
- pnames: []xml.Name{{"DAV:", "getetag"}},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- InnerXML: nil, // Calculated during test.
- }},
- }},
- }},
- }, {
- desc: "proppatch property on no-dead-properties file system",
- buildfs: []string{"mkdir /dir"},
- noDeadProps: true,
- propOp: []propOp{{
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusForbidden,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }, {
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusForbidden,
- XMLError: statForbiddenError,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "getetag"},
- }},
- }},
- }},
- }, {
- desc: "proppatch dead property",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{Space: "foo", Local: "bar"}},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }},
- }},
- }},
- }, {
- desc: "proppatch dead property with failed dependency",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }},
- }, {
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "displayname"},
- InnerXML: []byte("xxx"),
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusForbidden,
- XMLError: statForbiddenError,
- Props: []Property{{
- XMLName: xml.Name{Space: "DAV:", Local: "displayname"},
- }},
- }, {
- Status: StatusFailedDependency,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{Space: "foo", Local: "bar"}},
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }},
- }, {
- desc: "proppatch remove dead property",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }, {
- XMLName: xml.Name{Space: "spam", Local: "ham"},
- InnerXML: []byte("eggs"),
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }, {
- XMLName: xml.Name{Space: "spam", Local: "ham"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{
- {Space: "foo", Local: "bar"},
- {Space: "spam", Local: "ham"},
- },
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }, {
- XMLName: xml.Name{Space: "spam", Local: "ham"},
- InnerXML: []byte("eggs"),
- }},
- }},
- }, {
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Remove: true,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }, {
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{
- {Space: "foo", Local: "bar"},
- {Space: "spam", Local: "ham"},
- },
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }, {
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "spam", Local: "ham"},
- InnerXML: []byte("eggs"),
- }},
- }},
- }},
- }, {
- desc: "propname with dead property",
- buildfs: []string{"touch /file"},
- propOp: []propOp{{
- op: "proppatch",
- name: "/file",
- patches: []Proppatch{{
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- InnerXML: []byte("baz"),
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }, {
- op: "propname",
- name: "/file",
- wantPnames: []xml.Name{
- {Space: "DAV:", Local: "resourcetype"},
- {Space: "DAV:", Local: "displayname"},
- {Space: "DAV:", Local: "getcontentlength"},
- {Space: "DAV:", Local: "getlastmodified"},
- {Space: "DAV:", Local: "getcontenttype"},
- {Space: "DAV:", Local: "getetag"},
- {Space: "DAV:", Local: "supportedlock"},
- {Space: "foo", Local: "bar"},
- },
- }},
- }, {
- desc: "proppatch remove unknown dead property",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "proppatch",
- name: "/dir",
- patches: []Proppatch{{
- Remove: true,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- wantPropstats: []Propstat{{
- Status: http.StatusOK,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo", Local: "bar"},
- }},
- }},
- }},
- }, {
- desc: "bad: propfind unknown property",
- buildfs: []string{"mkdir /dir"},
- propOp: []propOp{{
- op: "propfind",
- name: "/dir",
- pnames: []xml.Name{{"foo:", "bar"}},
- wantPropstats: []Propstat{{
- Status: http.StatusNotFound,
- Props: []Property{{
- XMLName: xml.Name{Space: "foo:", Local: "bar"},
- }},
- }},
- }},
- }}
-
- for _, tc := range testCases {
- fs, err := buildTestFS(tc.buildfs)
- if err != nil {
- t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err)
- }
- if tc.noDeadProps {
- fs = noDeadPropsFS{fs}
- }
- ls := NewMemLS()
- for _, op := range tc.propOp {
- desc := fmt.Sprintf("%s: %s %s", tc.desc, op.op, op.name)
- if err = calcProps(op.name, fs, ls, op.wantPropstats); err != nil {
- t.Fatalf("%s: calcProps: %v", desc, err)
- }
-
- // Call property system.
- var propstats []Propstat
- switch op.op {
- case "propname":
- pnames, err := propnames(ctx, fs, ls, op.name)
- if err != nil {
- t.Errorf("%s: got error %v, want nil", desc, err)
- continue
- }
- sort.Sort(byXMLName(pnames))
- sort.Sort(byXMLName(op.wantPnames))
- if !reflect.DeepEqual(pnames, op.wantPnames) {
- t.Errorf("%s: pnames\ngot %q\nwant %q", desc, pnames, op.wantPnames)
- }
- continue
- case "allprop":
- propstats, err = allprop(ctx, fs, ls, op.name, op.pnames)
- case "propfind":
- propstats, err = props(ctx, fs, ls, op.name, op.pnames)
- case "proppatch":
- propstats, err = patch(ctx, fs, ls, op.name, op.patches)
- default:
- t.Fatalf("%s: %s not implemented", desc, op.op)
- }
- if err != nil {
- t.Errorf("%s: got error %v, want nil", desc, err)
- continue
- }
- // Compare return values from allprop, propfind or proppatch.
- for _, pst := range propstats {
- sort.Sort(byPropname(pst.Props))
- }
- for _, pst := range op.wantPropstats {
- sort.Sort(byPropname(pst.Props))
- }
- sort.Sort(byStatus(propstats))
- sort.Sort(byStatus(op.wantPropstats))
- if !reflect.DeepEqual(propstats, op.wantPropstats) {
- t.Errorf("%s: propstat\ngot %q\nwant %q", desc, propstats, op.wantPropstats)
- }
- }
- }
-}
-
-func cmpXMLName(a, b xml.Name) bool {
- if a.Space != b.Space {
- return a.Space < b.Space
- }
- return a.Local < b.Local
-}
-
-type byXMLName []xml.Name
-
-func (b byXMLName) Len() int { return len(b) }
-func (b byXMLName) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b byXMLName) Less(i, j int) bool { return cmpXMLName(b[i], b[j]) }
-
-type byPropname []Property
-
-func (b byPropname) Len() int { return len(b) }
-func (b byPropname) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b byPropname) Less(i, j int) bool { return cmpXMLName(b[i].XMLName, b[j].XMLName) }
-
-type byStatus []Propstat
-
-func (b byStatus) Len() int { return len(b) }
-func (b byStatus) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b byStatus) Less(i, j int) bool { return b[i].Status < b[j].Status }
-
-type noDeadPropsFS struct {
- FileSystem
-}
-
-func (fs noDeadPropsFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) {
- f, err := fs.FileSystem.OpenFile(ctx, name, flag, perm)
- if err != nil {
- return nil, err
- }
- return noDeadPropsFile{f}, nil
-}
-
-// noDeadPropsFile wraps a File but strips any optional DeadPropsHolder methods
-// provided by the underlying File implementation.
-type noDeadPropsFile struct {
- f File
-}
-
-func (f noDeadPropsFile) Close() error { return f.f.Close() }
-func (f noDeadPropsFile) Read(p []byte) (int, error) { return f.f.Read(p) }
-func (f noDeadPropsFile) Readdir(count int) ([]os.FileInfo, error) { return f.f.Readdir(count) }
-func (f noDeadPropsFile) Seek(off int64, whence int) (int64, error) { return f.f.Seek(off, whence) }
-func (f noDeadPropsFile) Stat() (os.FileInfo, error) { return f.f.Stat() }
-func (f noDeadPropsFile) Write(p []byte) (int, error) { return f.f.Write(p) }
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav.go
deleted file mode 100644
index 7b56687fc..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav.go
+++ /dev/null
@@ -1,702 +0,0 @@
-// Copyright 2014 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 file.
-
-// Package webdav provides a WebDAV server implementation.
-package webdav // import "golang.org/x/net/webdav"
-
-import (
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "os"
- "path"
- "strings"
- "time"
-)
-
-type Handler struct {
- // Prefix is the URL path prefix to strip from WebDAV resource paths.
- Prefix string
- // FileSystem is the virtual file system.
- FileSystem FileSystem
- // LockSystem is the lock management system.
- LockSystem LockSystem
- // Logger is an optional error logger. If non-nil, it will be called
- // for all HTTP requests.
- Logger func(*http.Request, error)
-}
-
-func (h *Handler) stripPrefix(p string) (string, int, error) {
- if h.Prefix == "" {
- return p, http.StatusOK, nil
- }
- if r := strings.TrimPrefix(p, h.Prefix); len(r) < len(p) {
- return r, http.StatusOK, nil
- }
- return p, http.StatusNotFound, errPrefixMismatch
-}
-
-func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- status, err := http.StatusBadRequest, errUnsupportedMethod
- if h.FileSystem == nil {
- status, err = http.StatusInternalServerError, errNoFileSystem
- } else if h.LockSystem == nil {
- status, err = http.StatusInternalServerError, errNoLockSystem
- } else {
- switch r.Method {
- case "OPTIONS":
- status, err = h.handleOptions(w, r)
- case "GET", "HEAD", "POST":
- status, err = h.handleGetHeadPost(w, r)
- case "DELETE":
- status, err = h.handleDelete(w, r)
- case "PUT":
- status, err = h.handlePut(w, r)
- case "MKCOL":
- status, err = h.handleMkcol(w, r)
- case "COPY", "MOVE":
- status, err = h.handleCopyMove(w, r)
- case "LOCK":
- status, err = h.handleLock(w, r)
- case "UNLOCK":
- status, err = h.handleUnlock(w, r)
- case "PROPFIND":
- status, err = h.handlePropfind(w, r)
- case "PROPPATCH":
- status, err = h.handleProppatch(w, r)
- }
- }
-
- if status != 0 {
- w.WriteHeader(status)
- if status != http.StatusNoContent {
- w.Write([]byte(StatusText(status)))
- }
- }
- if h.Logger != nil {
- h.Logger(r, err)
- }
-}
-
-func (h *Handler) lock(now time.Time, root string) (token string, status int, err error) {
- token, err = h.LockSystem.Create(now, LockDetails{
- Root: root,
- Duration: infiniteTimeout,
- ZeroDepth: true,
- })
- if err != nil {
- if err == ErrLocked {
- return "", StatusLocked, err
- }
- return "", http.StatusInternalServerError, err
- }
- return token, 0, nil
-}
-
-func (h *Handler) confirmLocks(r *http.Request, src, dst string) (release func(), status int, err error) {
- hdr := r.Header.Get("If")
- if hdr == "" {
- // An empty If header means that the client hasn't previously created locks.
- // Even if this client doesn't care about locks, we still need to check that
- // the resources aren't locked by another client, so we create temporary
- // locks that would conflict with another client's locks. These temporary
- // locks are unlocked at the end of the HTTP request.
- now, srcToken, dstToken := time.Now(), "", ""
- if src != "" {
- srcToken, status, err = h.lock(now, src)
- if err != nil {
- return nil, status, err
- }
- }
- if dst != "" {
- dstToken, status, err = h.lock(now, dst)
- if err != nil {
- if srcToken != "" {
- h.LockSystem.Unlock(now, srcToken)
- }
- return nil, status, err
- }
- }
-
- return func() {
- if dstToken != "" {
- h.LockSystem.Unlock(now, dstToken)
- }
- if srcToken != "" {
- h.LockSystem.Unlock(now, srcToken)
- }
- }, 0, nil
- }
-
- ih, ok := parseIfHeader(hdr)
- if !ok {
- return nil, http.StatusBadRequest, errInvalidIfHeader
- }
- // ih is a disjunction (OR) of ifLists, so any ifList will do.
- for _, l := range ih.lists {
- lsrc := l.resourceTag
- if lsrc == "" {
- lsrc = src
- } else {
- u, err := url.Parse(lsrc)
- if err != nil {
- continue
- }
- if u.Host != r.Host {
- continue
- }
- lsrc, status, err = h.stripPrefix(u.Path)
- if err != nil {
- return nil, status, err
- }
- }
- release, err = h.LockSystem.Confirm(time.Now(), lsrc, dst, l.conditions...)
- if err == ErrConfirmationFailed {
- continue
- }
- if err != nil {
- return nil, http.StatusInternalServerError, err
- }
- return release, 0, nil
- }
- // Section 10.4.1 says that "If this header is evaluated and all state lists
- // fail, then the request must fail with a 412 (Precondition Failed) status."
- // We follow the spec even though the cond_put_corrupt_token test case from
- // the litmus test warns on seeing a 412 instead of a 423 (Locked).
- return nil, http.StatusPreconditionFailed, ErrLocked
-}
-
-func (h *Handler) handleOptions(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- ctx := getContext(r)
- allow := "OPTIONS, LOCK, PUT, MKCOL"
- if fi, err := h.FileSystem.Stat(ctx, reqPath); err == nil {
- if fi.IsDir() {
- allow = "OPTIONS, LOCK, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND"
- } else {
- allow = "OPTIONS, LOCK, GET, HEAD, POST, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND, PUT"
- }
- }
- w.Header().Set("Allow", allow)
- // http://www.webdav.org/specs/rfc4918.html#dav.compliance.classes
- w.Header().Set("DAV", "1, 2")
- // http://msdn.microsoft.com/en-au/library/cc250217.aspx
- w.Header().Set("MS-Author-Via", "DAV")
- return 0, nil
-}
-
-func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- // TODO: check locks for read-only access??
- ctx := getContext(r)
- f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDONLY, 0)
- if err != nil {
- return http.StatusNotFound, err
- }
- defer f.Close()
- fi, err := f.Stat()
- if err != nil {
- return http.StatusNotFound, err
- }
- if fi.IsDir() {
- return http.StatusMethodNotAllowed, nil
- }
- etag, err := findETag(ctx, h.FileSystem, h.LockSystem, reqPath, fi)
- if err != nil {
- return http.StatusInternalServerError, err
- }
- w.Header().Set("ETag", etag)
- // Let ServeContent determine the Content-Type header.
- http.ServeContent(w, r, reqPath, fi.ModTime(), f)
- return 0, nil
-}
-
-func (h *Handler) handleDelete(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- release, status, err := h.confirmLocks(r, reqPath, "")
- if err != nil {
- return status, err
- }
- defer release()
-
- ctx := getContext(r)
-
- // TODO: return MultiStatus where appropriate.
-
- // "godoc os RemoveAll" says that "If the path does not exist, RemoveAll
- // returns nil (no error)." WebDAV semantics are that it should return a
- // "404 Not Found". We therefore have to Stat before we RemoveAll.
- if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil {
- if os.IsNotExist(err) {
- return http.StatusNotFound, err
- }
- return http.StatusMethodNotAllowed, err
- }
- if err := h.FileSystem.RemoveAll(ctx, reqPath); err != nil {
- return http.StatusMethodNotAllowed, err
- }
- return http.StatusNoContent, nil
-}
-
-func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- release, status, err := h.confirmLocks(r, reqPath, "")
- if err != nil {
- return status, err
- }
- defer release()
- // TODO(rost): Support the If-Match, If-None-Match headers? See bradfitz'
- // comments in http.checkEtag.
- ctx := getContext(r)
-
- f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- return http.StatusNotFound, err
- }
- _, copyErr := io.Copy(f, r.Body)
- fi, statErr := f.Stat()
- closeErr := f.Close()
- // TODO(rost): Returning 405 Method Not Allowed might not be appropriate.
- if copyErr != nil {
- return http.StatusMethodNotAllowed, copyErr
- }
- if statErr != nil {
- return http.StatusMethodNotAllowed, statErr
- }
- if closeErr != nil {
- return http.StatusMethodNotAllowed, closeErr
- }
- etag, err := findETag(ctx, h.FileSystem, h.LockSystem, reqPath, fi)
- if err != nil {
- return http.StatusInternalServerError, err
- }
- w.Header().Set("ETag", etag)
- return http.StatusCreated, nil
-}
-
-func (h *Handler) handleMkcol(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- release, status, err := h.confirmLocks(r, reqPath, "")
- if err != nil {
- return status, err
- }
- defer release()
-
- ctx := getContext(r)
-
- if r.ContentLength > 0 {
- return http.StatusUnsupportedMediaType, nil
- }
- if err := h.FileSystem.Mkdir(ctx, reqPath, 0777); err != nil {
- if os.IsNotExist(err) {
- return http.StatusConflict, err
- }
- return http.StatusMethodNotAllowed, err
- }
- return http.StatusCreated, nil
-}
-
-func (h *Handler) handleCopyMove(w http.ResponseWriter, r *http.Request) (status int, err error) {
- hdr := r.Header.Get("Destination")
- if hdr == "" {
- return http.StatusBadRequest, errInvalidDestination
- }
- u, err := url.Parse(hdr)
- if err != nil {
- return http.StatusBadRequest, errInvalidDestination
- }
- if u.Host != r.Host {
- return http.StatusBadGateway, errInvalidDestination
- }
-
- src, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
-
- dst, status, err := h.stripPrefix(u.Path)
- if err != nil {
- return status, err
- }
-
- if dst == "" {
- return http.StatusBadGateway, errInvalidDestination
- }
- if dst == src {
- return http.StatusForbidden, errDestinationEqualsSource
- }
-
- ctx := getContext(r)
-
- if r.Method == "COPY" {
- // Section 7.5.1 says that a COPY only needs to lock the destination,
- // not both destination and source. Strictly speaking, this is racy,
- // even though a COPY doesn't modify the source, if a concurrent
- // operation modifies the source. However, the litmus test explicitly
- // checks that COPYing a locked-by-another source is OK.
- release, status, err := h.confirmLocks(r, "", dst)
- if err != nil {
- return status, err
- }
- defer release()
-
- // Section 9.8.3 says that "The COPY method on a collection without a Depth
- // header must act as if a Depth header with value "infinity" was included".
- depth := infiniteDepth
- if hdr := r.Header.Get("Depth"); hdr != "" {
- depth = parseDepth(hdr)
- if depth != 0 && depth != infiniteDepth {
- // Section 9.8.3 says that "A client may submit a Depth header on a
- // COPY on a collection with a value of "0" or "infinity"."
- return http.StatusBadRequest, errInvalidDepth
- }
- }
- return copyFiles(ctx, h.FileSystem, src, dst, r.Header.Get("Overwrite") != "F", depth, 0)
- }
-
- release, status, err := h.confirmLocks(r, src, dst)
- if err != nil {
- return status, err
- }
- defer release()
-
- // Section 9.9.2 says that "The MOVE method on a collection must act as if
- // a "Depth: infinity" header was used on it. A client must not submit a
- // Depth header on a MOVE on a collection with any value but "infinity"."
- if hdr := r.Header.Get("Depth"); hdr != "" {
- if parseDepth(hdr) != infiniteDepth {
- return http.StatusBadRequest, errInvalidDepth
- }
- }
- return moveFiles(ctx, h.FileSystem, src, dst, r.Header.Get("Overwrite") == "T")
-}
-
-func (h *Handler) handleLock(w http.ResponseWriter, r *http.Request) (retStatus int, retErr error) {
- duration, err := parseTimeout(r.Header.Get("Timeout"))
- if err != nil {
- return http.StatusBadRequest, err
- }
- li, status, err := readLockInfo(r.Body)
- if err != nil {
- return status, err
- }
-
- ctx := getContext(r)
- token, ld, now, created := "", LockDetails{}, time.Now(), false
- if li == (lockInfo{}) {
- // An empty lockInfo means to refresh the lock.
- ih, ok := parseIfHeader(r.Header.Get("If"))
- if !ok {
- return http.StatusBadRequest, errInvalidIfHeader
- }
- if len(ih.lists) == 1 && len(ih.lists[0].conditions) == 1 {
- token = ih.lists[0].conditions[0].Token
- }
- if token == "" {
- return http.StatusBadRequest, errInvalidLockToken
- }
- ld, err = h.LockSystem.Refresh(now, token, duration)
- if err != nil {
- if err == ErrNoSuchLock {
- return http.StatusPreconditionFailed, err
- }
- return http.StatusInternalServerError, err
- }
-
- } else {
- // Section 9.10.3 says that "If no Depth header is submitted on a LOCK request,
- // then the request MUST act as if a "Depth:infinity" had been submitted."
- depth := infiniteDepth
- if hdr := r.Header.Get("Depth"); hdr != "" {
- depth = parseDepth(hdr)
- if depth != 0 && depth != infiniteDepth {
- // Section 9.10.3 says that "Values other than 0 or infinity must not be
- // used with the Depth header on a LOCK method".
- return http.StatusBadRequest, errInvalidDepth
- }
- }
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- ld = LockDetails{
- Root: reqPath,
- Duration: duration,
- OwnerXML: li.Owner.InnerXML,
- ZeroDepth: depth == 0,
- }
- token, err = h.LockSystem.Create(now, ld)
- if err != nil {
- if err == ErrLocked {
- return StatusLocked, err
- }
- return http.StatusInternalServerError, err
- }
- defer func() {
- if retErr != nil {
- h.LockSystem.Unlock(now, token)
- }
- }()
-
- // Create the resource if it didn't previously exist.
- if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil {
- f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
- if err != nil {
- // TODO: detect missing intermediate dirs and return http.StatusConflict?
- return http.StatusInternalServerError, err
- }
- f.Close()
- created = true
- }
-
- // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the
- // Lock-Token value is a Coded-URL. We add angle brackets.
- w.Header().Set("Lock-Token", "<"+token+">")
- }
-
- w.Header().Set("Content-Type", "application/xml; charset=utf-8")
- if created {
- // This is "w.WriteHeader(http.StatusCreated)" and not "return
- // http.StatusCreated, nil" because we write our own (XML) response to w
- // and Handler.ServeHTTP would otherwise write "Created".
- w.WriteHeader(http.StatusCreated)
- }
- writeLockInfo(w, token, ld)
- return 0, nil
-}
-
-func (h *Handler) handleUnlock(w http.ResponseWriter, r *http.Request) (status int, err error) {
- // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the
- // Lock-Token value is a Coded-URL. We strip its angle brackets.
- t := r.Header.Get("Lock-Token")
- if len(t) < 2 || t[0] != '<' || t[len(t)-1] != '>' {
- return http.StatusBadRequest, errInvalidLockToken
- }
- t = t[1 : len(t)-1]
-
- switch err = h.LockSystem.Unlock(time.Now(), t); err {
- case nil:
- return http.StatusNoContent, err
- case ErrForbidden:
- return http.StatusForbidden, err
- case ErrLocked:
- return StatusLocked, err
- case ErrNoSuchLock:
- return http.StatusConflict, err
- default:
- return http.StatusInternalServerError, err
- }
-}
-
-func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- ctx := getContext(r)
- fi, err := h.FileSystem.Stat(ctx, reqPath)
- if err != nil {
- if os.IsNotExist(err) {
- return http.StatusNotFound, err
- }
- return http.StatusMethodNotAllowed, err
- }
- depth := infiniteDepth
- if hdr := r.Header.Get("Depth"); hdr != "" {
- depth = parseDepth(hdr)
- if depth == invalidDepth {
- return http.StatusBadRequest, errInvalidDepth
- }
- }
- pf, status, err := readPropfind(r.Body)
- if err != nil {
- return status, err
- }
-
- mw := multistatusWriter{w: w}
-
- walkFn := func(reqPath string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
- var pstats []Propstat
- if pf.Propname != nil {
- pnames, err := propnames(ctx, h.FileSystem, h.LockSystem, reqPath)
- if err != nil {
- return err
- }
- pstat := Propstat{Status: http.StatusOK}
- for _, xmlname := range pnames {
- pstat.Props = append(pstat.Props, Property{XMLName: xmlname})
- }
- pstats = append(pstats, pstat)
- } else if pf.Allprop != nil {
- pstats, err = allprop(ctx, h.FileSystem, h.LockSystem, reqPath, pf.Prop)
- } else {
- pstats, err = props(ctx, h.FileSystem, h.LockSystem, reqPath, pf.Prop)
- }
- if err != nil {
- return err
- }
- return mw.write(makePropstatResponse(path.Join(h.Prefix, reqPath), pstats))
- }
-
- walkErr := walkFS(ctx, h.FileSystem, depth, reqPath, fi, walkFn)
- closeErr := mw.close()
- if walkErr != nil {
- return http.StatusInternalServerError, walkErr
- }
- if closeErr != nil {
- return http.StatusInternalServerError, closeErr
- }
- return 0, nil
-}
-
-func (h *Handler) handleProppatch(w http.ResponseWriter, r *http.Request) (status int, err error) {
- reqPath, status, err := h.stripPrefix(r.URL.Path)
- if err != nil {
- return status, err
- }
- release, status, err := h.confirmLocks(r, reqPath, "")
- if err != nil {
- return status, err
- }
- defer release()
-
- ctx := getContext(r)
-
- if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil {
- if os.IsNotExist(err) {
- return http.StatusNotFound, err
- }
- return http.StatusMethodNotAllowed, err
- }
- patches, status, err := readProppatch(r.Body)
- if err != nil {
- return status, err
- }
- pstats, err := patch(ctx, h.FileSystem, h.LockSystem, reqPath, patches)
- if err != nil {
- return http.StatusInternalServerError, err
- }
- mw := multistatusWriter{w: w}
- writeErr := mw.write(makePropstatResponse(r.URL.Path, pstats))
- closeErr := mw.close()
- if writeErr != nil {
- return http.StatusInternalServerError, writeErr
- }
- if closeErr != nil {
- return http.StatusInternalServerError, closeErr
- }
- return 0, nil
-}
-
-func makePropstatResponse(href string, pstats []Propstat) *response {
- resp := response{
- Href: []string{(&url.URL{Path: href}).EscapedPath()},
- Propstat: make([]propstat, 0, len(pstats)),
- }
- for _, p := range pstats {
- var xmlErr *xmlError
- if p.XMLError != "" {
- xmlErr = &xmlError{InnerXML: []byte(p.XMLError)}
- }
- resp.Propstat = append(resp.Propstat, propstat{
- Status: fmt.Sprintf("HTTP/1.1 %d %s", p.Status, StatusText(p.Status)),
- Prop: p.Props,
- ResponseDescription: p.ResponseDescription,
- Error: xmlErr,
- })
- }
- return &resp
-}
-
-const (
- infiniteDepth = -1
- invalidDepth = -2
-)
-
-// parseDepth maps the strings "0", "1" and "infinity" to 0, 1 and
-// infiniteDepth. Parsing any other string returns invalidDepth.
-//
-// Different WebDAV methods have further constraints on valid depths:
-// - PROPFIND has no further restrictions, as per section 9.1.
-// - COPY accepts only "0" or "infinity", as per section 9.8.3.
-// - MOVE accepts only "infinity", as per section 9.9.2.
-// - LOCK accepts only "0" or "infinity", as per section 9.10.3.
-// These constraints are enforced by the handleXxx methods.
-func parseDepth(s string) int {
- switch s {
- case "0":
- return 0
- case "1":
- return 1
- case "infinity":
- return infiniteDepth
- }
- return invalidDepth
-}
-
-// http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11
-const (
- StatusMulti = 207
- StatusUnprocessableEntity = 422
- StatusLocked = 423
- StatusFailedDependency = 424
- StatusInsufficientStorage = 507
-)
-
-func StatusText(code int) string {
- switch code {
- case StatusMulti:
- return "Multi-Status"
- case StatusUnprocessableEntity:
- return "Unprocessable Entity"
- case StatusLocked:
- return "Locked"
- case StatusFailedDependency:
- return "Failed Dependency"
- case StatusInsufficientStorage:
- return "Insufficient Storage"
- }
- return http.StatusText(code)
-}
-
-var (
- errDestinationEqualsSource = errors.New("webdav: destination equals source")
- errDirectoryNotEmpty = errors.New("webdav: directory not empty")
- errInvalidDepth = errors.New("webdav: invalid depth")
- errInvalidDestination = errors.New("webdav: invalid destination")
- errInvalidIfHeader = errors.New("webdav: invalid If header")
- errInvalidLockInfo = errors.New("webdav: invalid lock info")
- errInvalidLockToken = errors.New("webdav: invalid lock token")
- errInvalidPropfind = errors.New("webdav: invalid propfind")
- errInvalidProppatch = errors.New("webdav: invalid proppatch")
- errInvalidResponse = errors.New("webdav: invalid response")
- errInvalidTimeout = errors.New("webdav: invalid timeout")
- errNoFileSystem = errors.New("webdav: no file system")
- errNoLockSystem = errors.New("webdav: no lock system")
- errNotADirectory = errors.New("webdav: not a directory")
- errPrefixMismatch = errors.New("webdav: prefix mismatch")
- errRecursionTooDeep = errors.New("webdav: recursion too deep")
- errUnsupportedLockInfo = errors.New("webdav: unsupported lock info")
- errUnsupportedMethod = errors.New("webdav: unsupported method")
-)
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav_test.go
deleted file mode 100644
index 25e0d5421..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/webdav_test.go
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright 2015 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 file.
-
-package webdav
-
-import (
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "net/url"
- "os"
- "reflect"
- "regexp"
- "sort"
- "strings"
- "testing"
-
- "golang.org/x/net/context"
-)
-
-// TODO: add tests to check XML responses with the expected prefix path
-func TestPrefix(t *testing.T) {
- const dst, blah = "Destination", "blah blah blah"
-
- // createLockBody comes from the example in Section 9.10.7.
- const createLockBody = `<?xml version="1.0" encoding="utf-8" ?>
- <D:lockinfo xmlns:D='DAV:'>
- <D:lockscope><D:exclusive/></D:lockscope>
- <D:locktype><D:write/></D:locktype>
- <D:owner>
- <D:href>http://example.org/~ejw/contact.html</D:href>
- </D:owner>
- </D:lockinfo>
- `
-
- do := func(method, urlStr string, body string, wantStatusCode int, headers ...string) (http.Header, error) {
- var bodyReader io.Reader
- if body != "" {
- bodyReader = strings.NewReader(body)
- }
- req, err := http.NewRequest(method, urlStr, bodyReader)
- if err != nil {
- return nil, err
- }
- for len(headers) >= 2 {
- req.Header.Add(headers[0], headers[1])
- headers = headers[2:]
- }
- res, err := http.DefaultTransport.RoundTrip(req)
- if err != nil {
- return nil, err
- }
- defer res.Body.Close()
- if res.StatusCode != wantStatusCode {
- return nil, fmt.Errorf("got status code %d, want %d", res.StatusCode, wantStatusCode)
- }
- return res.Header, nil
- }
-
- prefixes := []string{
- "/",
- "/a/",
- "/a/b/",
- "/a/b/c/",
- }
- ctx := context.Background()
- for _, prefix := range prefixes {
- fs := NewMemFS()
- h := &Handler{
- FileSystem: fs,
- LockSystem: NewMemLS(),
- }
- mux := http.NewServeMux()
- if prefix != "/" {
- h.Prefix = prefix
- }
- mux.Handle(prefix, h)
- srv := httptest.NewServer(mux)
- defer srv.Close()
-
- // The script is:
- // MKCOL /a
- // MKCOL /a/b
- // PUT /a/b/c
- // COPY /a/b/c /a/b/d
- // MKCOL /a/b/e
- // MOVE /a/b/d /a/b/e/f
- // LOCK /a/b/e/g
- // PUT /a/b/e/g
- // which should yield the (possibly stripped) filenames /a/b/c,
- // /a/b/e/f and /a/b/e/g, plus their parent directories.
-
- wantA := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusMovedPermanently,
- "/a/b/": http.StatusNotFound,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if _, err := do("MKCOL", srv.URL+"/a", "", wantA); err != nil {
- t.Errorf("prefix=%-9q MKCOL /a: %v", prefix, err)
- continue
- }
-
- wantB := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusMovedPermanently,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if _, err := do("MKCOL", srv.URL+"/a/b", "", wantB); err != nil {
- t.Errorf("prefix=%-9q MKCOL /a/b: %v", prefix, err)
- continue
- }
-
- wantC := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusMovedPermanently,
- }[prefix]
- if _, err := do("PUT", srv.URL+"/a/b/c", blah, wantC); err != nil {
- t.Errorf("prefix=%-9q PUT /a/b/c: %v", prefix, err)
- continue
- }
-
- wantD := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusMovedPermanently,
- }[prefix]
- if _, err := do("COPY", srv.URL+"/a/b/c", "", wantD, dst, srv.URL+"/a/b/d"); err != nil {
- t.Errorf("prefix=%-9q COPY /a/b/c /a/b/d: %v", prefix, err)
- continue
- }
-
- wantE := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if _, err := do("MKCOL", srv.URL+"/a/b/e", "", wantE); err != nil {
- t.Errorf("prefix=%-9q MKCOL /a/b/e: %v", prefix, err)
- continue
- }
-
- wantF := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if _, err := do("MOVE", srv.URL+"/a/b/d", "", wantF, dst, srv.URL+"/a/b/e/f"); err != nil {
- t.Errorf("prefix=%-9q MOVE /a/b/d /a/b/e/f: %v", prefix, err)
- continue
- }
-
- var lockToken string
- wantG := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if h, err := do("LOCK", srv.URL+"/a/b/e/g", createLockBody, wantG); err != nil {
- t.Errorf("prefix=%-9q LOCK /a/b/e/g: %v", prefix, err)
- continue
- } else {
- lockToken = h.Get("Lock-Token")
- }
-
- ifHeader := fmt.Sprintf("<%s/a/b/e/g> (%s)", srv.URL, lockToken)
- wantH := map[string]int{
- "/": http.StatusCreated,
- "/a/": http.StatusCreated,
- "/a/b/": http.StatusCreated,
- "/a/b/c/": http.StatusNotFound,
- }[prefix]
- if _, err := do("PUT", srv.URL+"/a/b/e/g", blah, wantH, "If", ifHeader); err != nil {
- t.Errorf("prefix=%-9q PUT /a/b/e/g: %v", prefix, err)
- continue
- }
-
- got, err := find(ctx, nil, fs, "/")
- if err != nil {
- t.Errorf("prefix=%-9q find: %v", prefix, err)
- continue
- }
- sort.Strings(got)
- want := map[string][]string{
- "/": {"/", "/a", "/a/b", "/a/b/c", "/a/b/e", "/a/b/e/f", "/a/b/e/g"},
- "/a/": {"/", "/b", "/b/c", "/b/e", "/b/e/f", "/b/e/g"},
- "/a/b/": {"/", "/c", "/e", "/e/f", "/e/g"},
- "/a/b/c/": {"/"},
- }[prefix]
- if !reflect.DeepEqual(got, want) {
- t.Errorf("prefix=%-9q find:\ngot %v\nwant %v", prefix, got, want)
- continue
- }
- }
-}
-
-func TestEscapeXML(t *testing.T) {
- // These test cases aren't exhaustive, and there is more than one way to
- // escape e.g. a quot (as "&#34;" or "&quot;") or an apos. We presume that
- // the encoding/xml package tests xml.EscapeText more thoroughly. This test
- // here is just a sanity check for this package's escapeXML function, and
- // its attempt to provide a fast path (and avoid a bytes.Buffer allocation)
- // when escaping filenames is obviously a no-op.
- testCases := map[string]string{
- "": "",
- " ": " ",
- "&": "&amp;",
- "*": "*",
- "+": "+",
- ",": ",",
- "-": "-",
- ".": ".",
- "/": "/",
- "0": "0",
- "9": "9",
- ":": ":",
- "<": "&lt;",
- ">": "&gt;",
- "A": "A",
- "_": "_",
- "a": "a",
- "~": "~",
- "\u0201": "\u0201",
- "&amp;": "&amp;amp;",
- "foo&<b/ar>baz": "foo&amp;&lt;b/ar&gt;baz",
- }
-
- for in, want := range testCases {
- if got := escapeXML(in); got != want {
- t.Errorf("in=%q: got %q, want %q", in, got, want)
- }
- }
-}
-
-func TestFilenameEscape(t *testing.T) {
- hrefRe := regexp.MustCompile(`<D:href>([^<]*)</D:href>`)
- displayNameRe := regexp.MustCompile(`<D:displayname>([^<]*)</D:displayname>`)
- do := func(method, urlStr string) (string, string, error) {
- req, err := http.NewRequest(method, urlStr, nil)
- if err != nil {
- return "", "", err
- }
- res, err := http.DefaultClient.Do(req)
- if err != nil {
- return "", "", err
- }
- defer res.Body.Close()
-
- b, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return "", "", err
- }
- hrefMatch := hrefRe.FindStringSubmatch(string(b))
- if len(hrefMatch) != 2 {
- return "", "", errors.New("D:href not found")
- }
- displayNameMatch := displayNameRe.FindStringSubmatch(string(b))
- if len(displayNameMatch) != 2 {
- return "", "", errors.New("D:displayname not found")
- }
-
- return hrefMatch[1], displayNameMatch[1], nil
- }
-
- testCases := []struct {
- name, wantHref, wantDisplayName string
- }{{
- name: `/foo%bar`,
- wantHref: `/foo%25bar`,
- wantDisplayName: `foo%bar`,
- }, {
- name: `/ã“ã‚“ã«ã¡ã‚世界`,
- wantHref: `/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%82%8F%E4%B8%96%E7%95%8C`,
- wantDisplayName: `ã“ã‚“ã«ã¡ã‚世界`,
- }, {
- name: `/Program Files/`,
- wantHref: `/Program%20Files`,
- wantDisplayName: `Program Files`,
- }, {
- name: `/go+lang`,
- wantHref: `/go+lang`,
- wantDisplayName: `go+lang`,
- }, {
- name: `/go&lang`,
- wantHref: `/go&amp;lang`,
- wantDisplayName: `go&amp;lang`,
- }, {
- name: `/go<lang`,
- wantHref: `/go%3Clang`,
- wantDisplayName: `go&lt;lang`,
- }}
- ctx := context.Background()
- fs := NewMemFS()
- for _, tc := range testCases {
- if strings.HasSuffix(tc.name, "/") {
- if err := fs.Mkdir(ctx, tc.name, 0755); err != nil {
- t.Fatalf("name=%q: Mkdir: %v", tc.name, err)
- }
- } else {
- f, err := fs.OpenFile(ctx, tc.name, os.O_CREATE, 0644)
- if err != nil {
- t.Fatalf("name=%q: OpenFile: %v", tc.name, err)
- }
- f.Close()
- }
- }
-
- srv := httptest.NewServer(&Handler{
- FileSystem: fs,
- LockSystem: NewMemLS(),
- })
- defer srv.Close()
-
- u, err := url.Parse(srv.URL)
- if err != nil {
- t.Fatal(err)
- }
-
- for _, tc := range testCases {
- u.Path = tc.name
- gotHref, gotDisplayName, err := do("PROPFIND", u.String())
- if err != nil {
- t.Errorf("name=%q: PROPFIND: %v", tc.name, err)
- continue
- }
- if gotHref != tc.wantHref {
- t.Errorf("name=%q: got href %q, want %q", tc.name, gotHref, tc.wantHref)
- }
- if gotDisplayName != tc.wantDisplayName {
- t.Errorf("name=%q: got dispayname %q, want %q", tc.name, gotDisplayName, tc.wantDisplayName)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml.go
deleted file mode 100644
index 790dc8169..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml.go
+++ /dev/null
@@ -1,519 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-// The XML encoding is covered by Section 14.
-// http://www.webdav.org/specs/rfc4918.html#xml.element.definitions
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io"
- "net/http"
- "time"
-
- // As of https://go-review.googlesource.com/#/c/12772/ which was submitted
- // in July 2015, this package uses an internal fork of the standard
- // library's encoding/xml package, due to changes in the way namespaces
- // were encoded. Such changes were introduced in the Go 1.5 cycle, but were
- // rolled back in response to https://github.com/golang/go/issues/11841
- //
- // However, this package's exported API, specifically the Property and
- // DeadPropsHolder types, need to refer to the standard library's version
- // of the xml.Name type, as code that imports this package cannot refer to
- // the internal version.
- //
- // This file therefore imports both the internal and external versions, as
- // ixml and xml, and converts between them.
- //
- // In the long term, this package should use the standard library's version
- // only, and the internal fork deleted, once
- // https://github.com/golang/go/issues/13400 is resolved.
- ixml "golang.org/x/net/webdav/internal/xml"
-)
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_lockinfo
-type lockInfo struct {
- XMLName ixml.Name `xml:"lockinfo"`
- Exclusive *struct{} `xml:"lockscope>exclusive"`
- Shared *struct{} `xml:"lockscope>shared"`
- Write *struct{} `xml:"locktype>write"`
- Owner owner `xml:"owner"`
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_owner
-type owner struct {
- InnerXML string `xml:",innerxml"`
-}
-
-func readLockInfo(r io.Reader) (li lockInfo, status int, err error) {
- c := &countingReader{r: r}
- if err = ixml.NewDecoder(c).Decode(&li); err != nil {
- if err == io.EOF {
- if c.n == 0 {
- // An empty body means to refresh the lock.
- // http://www.webdav.org/specs/rfc4918.html#refreshing-locks
- return lockInfo{}, 0, nil
- }
- err = errInvalidLockInfo
- }
- return lockInfo{}, http.StatusBadRequest, err
- }
- // We only support exclusive (non-shared) write locks. In practice, these are
- // the only types of locks that seem to matter.
- if li.Exclusive == nil || li.Shared != nil || li.Write == nil {
- return lockInfo{}, http.StatusNotImplemented, errUnsupportedLockInfo
- }
- return li, 0, nil
-}
-
-type countingReader struct {
- n int
- r io.Reader
-}
-
-func (c *countingReader) Read(p []byte) (int, error) {
- n, err := c.r.Read(p)
- c.n += n
- return n, err
-}
-
-func writeLockInfo(w io.Writer, token string, ld LockDetails) (int, error) {
- depth := "infinity"
- if ld.ZeroDepth {
- depth = "0"
- }
- timeout := ld.Duration / time.Second
- return fmt.Fprintf(w, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"+
- "<D:prop xmlns:D=\"DAV:\"><D:lockdiscovery><D:activelock>\n"+
- " <D:locktype><D:write/></D:locktype>\n"+
- " <D:lockscope><D:exclusive/></D:lockscope>\n"+
- " <D:depth>%s</D:depth>\n"+
- " <D:owner>%s</D:owner>\n"+
- " <D:timeout>Second-%d</D:timeout>\n"+
- " <D:locktoken><D:href>%s</D:href></D:locktoken>\n"+
- " <D:lockroot><D:href>%s</D:href></D:lockroot>\n"+
- "</D:activelock></D:lockdiscovery></D:prop>",
- depth, ld.OwnerXML, timeout, escape(token), escape(ld.Root),
- )
-}
-
-func escape(s string) string {
- for i := 0; i < len(s); i++ {
- switch s[i] {
- case '"', '&', '\'', '<', '>':
- b := bytes.NewBuffer(nil)
- ixml.EscapeText(b, []byte(s))
- return b.String()
- }
- }
- return s
-}
-
-// Next returns the next token, if any, in the XML stream of d.
-// RFC 4918 requires to ignore comments, processing instructions
-// and directives.
-// http://www.webdav.org/specs/rfc4918.html#property_values
-// http://www.webdav.org/specs/rfc4918.html#xml-extensibility
-func next(d *ixml.Decoder) (ixml.Token, error) {
- for {
- t, err := d.Token()
- if err != nil {
- return t, err
- }
- switch t.(type) {
- case ixml.Comment, ixml.Directive, ixml.ProcInst:
- continue
- default:
- return t, nil
- }
- }
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for propfind)
-type propfindProps []xml.Name
-
-// UnmarshalXML appends the property names enclosed within start to pn.
-//
-// It returns an error if start does not contain any properties or if
-// properties contain values. Character data between properties is ignored.
-func (pn *propfindProps) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error {
- for {
- t, err := next(d)
- if err != nil {
- return err
- }
- switch t.(type) {
- case ixml.EndElement:
- if len(*pn) == 0 {
- return fmt.Errorf("%s must not be empty", start.Name.Local)
- }
- return nil
- case ixml.StartElement:
- name := t.(ixml.StartElement).Name
- t, err = next(d)
- if err != nil {
- return err
- }
- if _, ok := t.(ixml.EndElement); !ok {
- return fmt.Errorf("unexpected token %T", t)
- }
- *pn = append(*pn, xml.Name(name))
- }
- }
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propfind
-type propfind struct {
- XMLName ixml.Name `xml:"DAV: propfind"`
- Allprop *struct{} `xml:"DAV: allprop"`
- Propname *struct{} `xml:"DAV: propname"`
- Prop propfindProps `xml:"DAV: prop"`
- Include propfindProps `xml:"DAV: include"`
-}
-
-func readPropfind(r io.Reader) (pf propfind, status int, err error) {
- c := countingReader{r: r}
- if err = ixml.NewDecoder(&c).Decode(&pf); err != nil {
- if err == io.EOF {
- if c.n == 0 {
- // An empty body means to propfind allprop.
- // http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND
- return propfind{Allprop: new(struct{})}, 0, nil
- }
- err = errInvalidPropfind
- }
- return propfind{}, http.StatusBadRequest, err
- }
-
- if pf.Allprop == nil && pf.Include != nil {
- return propfind{}, http.StatusBadRequest, errInvalidPropfind
- }
- if pf.Allprop != nil && (pf.Prop != nil || pf.Propname != nil) {
- return propfind{}, http.StatusBadRequest, errInvalidPropfind
- }
- if pf.Prop != nil && pf.Propname != nil {
- return propfind{}, http.StatusBadRequest, errInvalidPropfind
- }
- if pf.Propname == nil && pf.Allprop == nil && pf.Prop == nil {
- return propfind{}, http.StatusBadRequest, errInvalidPropfind
- }
- return pf, 0, nil
-}
-
-// Property represents a single DAV resource property as defined in RFC 4918.
-// See http://www.webdav.org/specs/rfc4918.html#data.model.for.resource.properties
-type Property struct {
- // XMLName is the fully qualified name that identifies this property.
- XMLName xml.Name
-
- // Lang is an optional xml:lang attribute.
- Lang string `xml:"xml:lang,attr,omitempty"`
-
- // InnerXML contains the XML representation of the property value.
- // See http://www.webdav.org/specs/rfc4918.html#property_values
- //
- // Property values of complex type or mixed-content must have fully
- // expanded XML namespaces or be self-contained with according
- // XML namespace declarations. They must not rely on any XML
- // namespace declarations within the scope of the XML document,
- // even including the DAV: namespace.
- InnerXML []byte `xml:",innerxml"`
-}
-
-// ixmlProperty is the same as the Property type except it holds an ixml.Name
-// instead of an xml.Name.
-type ixmlProperty struct {
- XMLName ixml.Name
- Lang string `xml:"xml:lang,attr,omitempty"`
- InnerXML []byte `xml:",innerxml"`
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_error
-// See multistatusWriter for the "D:" namespace prefix.
-type xmlError struct {
- XMLName ixml.Name `xml:"D:error"`
- InnerXML []byte `xml:",innerxml"`
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat
-// See multistatusWriter for the "D:" namespace prefix.
-type propstat struct {
- Prop []Property `xml:"D:prop>_ignored_"`
- Status string `xml:"D:status"`
- Error *xmlError `xml:"D:error"`
- ResponseDescription string `xml:"D:responsedescription,omitempty"`
-}
-
-// ixmlPropstat is the same as the propstat type except it holds an ixml.Name
-// instead of an xml.Name.
-type ixmlPropstat struct {
- Prop []ixmlProperty `xml:"D:prop>_ignored_"`
- Status string `xml:"D:status"`
- Error *xmlError `xml:"D:error"`
- ResponseDescription string `xml:"D:responsedescription,omitempty"`
-}
-
-// MarshalXML prepends the "D:" namespace prefix on properties in the DAV: namespace
-// before encoding. See multistatusWriter.
-func (ps propstat) MarshalXML(e *ixml.Encoder, start ixml.StartElement) error {
- // Convert from a propstat to an ixmlPropstat.
- ixmlPs := ixmlPropstat{
- Prop: make([]ixmlProperty, len(ps.Prop)),
- Status: ps.Status,
- Error: ps.Error,
- ResponseDescription: ps.ResponseDescription,
- }
- for k, prop := range ps.Prop {
- ixmlPs.Prop[k] = ixmlProperty{
- XMLName: ixml.Name(prop.XMLName),
- Lang: prop.Lang,
- InnerXML: prop.InnerXML,
- }
- }
-
- for k, prop := range ixmlPs.Prop {
- if prop.XMLName.Space == "DAV:" {
- prop.XMLName = ixml.Name{Space: "", Local: "D:" + prop.XMLName.Local}
- ixmlPs.Prop[k] = prop
- }
- }
- // Distinct type to avoid infinite recursion of MarshalXML.
- type newpropstat ixmlPropstat
- return e.EncodeElement(newpropstat(ixmlPs), start)
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_response
-// See multistatusWriter for the "D:" namespace prefix.
-type response struct {
- XMLName ixml.Name `xml:"D:response"`
- Href []string `xml:"D:href"`
- Propstat []propstat `xml:"D:propstat"`
- Status string `xml:"D:status,omitempty"`
- Error *xmlError `xml:"D:error"`
- ResponseDescription string `xml:"D:responsedescription,omitempty"`
-}
-
-// MultistatusWriter marshals one or more Responses into a XML
-// multistatus response.
-// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_multistatus
-// TODO(rsto, mpl): As a workaround, the "D:" namespace prefix, defined as
-// "DAV:" on this element, is prepended on the nested response, as well as on all
-// its nested elements. All property names in the DAV: namespace are prefixed as
-// well. This is because some versions of Mini-Redirector (on windows 7) ignore
-// elements with a default namespace (no prefixed namespace). A less intrusive fix
-// should be possible after golang.org/cl/11074. See https://golang.org/issue/11177
-type multistatusWriter struct {
- // ResponseDescription contains the optional responsedescription
- // of the multistatus XML element. Only the latest content before
- // close will be emitted. Empty response descriptions are not
- // written.
- responseDescription string
-
- w http.ResponseWriter
- enc *ixml.Encoder
-}
-
-// Write validates and emits a DAV response as part of a multistatus response
-// element.
-//
-// It sets the HTTP status code of its underlying http.ResponseWriter to 207
-// (Multi-Status) and populates the Content-Type header. If r is the
-// first, valid response to be written, Write prepends the XML representation
-// of r with a multistatus tag. Callers must call close after the last response
-// has been written.
-func (w *multistatusWriter) write(r *response) error {
- switch len(r.Href) {
- case 0:
- return errInvalidResponse
- case 1:
- if len(r.Propstat) > 0 != (r.Status == "") {
- return errInvalidResponse
- }
- default:
- if len(r.Propstat) > 0 || r.Status == "" {
- return errInvalidResponse
- }
- }
- err := w.writeHeader()
- if err != nil {
- return err
- }
- return w.enc.Encode(r)
-}
-
-// writeHeader writes a XML multistatus start element on w's underlying
-// http.ResponseWriter and returns the result of the write operation.
-// After the first write attempt, writeHeader becomes a no-op.
-func (w *multistatusWriter) writeHeader() error {
- if w.enc != nil {
- return nil
- }
- w.w.Header().Add("Content-Type", "text/xml; charset=utf-8")
- w.w.WriteHeader(StatusMulti)
- _, err := fmt.Fprintf(w.w, `<?xml version="1.0" encoding="UTF-8"?>`)
- if err != nil {
- return err
- }
- w.enc = ixml.NewEncoder(w.w)
- return w.enc.EncodeToken(ixml.StartElement{
- Name: ixml.Name{
- Space: "DAV:",
- Local: "multistatus",
- },
- Attr: []ixml.Attr{{
- Name: ixml.Name{Space: "xmlns", Local: "D"},
- Value: "DAV:",
- }},
- })
-}
-
-// Close completes the marshalling of the multistatus response. It returns
-// an error if the multistatus response could not be completed. If both the
-// return value and field enc of w are nil, then no multistatus response has
-// been written.
-func (w *multistatusWriter) close() error {
- if w.enc == nil {
- return nil
- }
- var end []ixml.Token
- if w.responseDescription != "" {
- name := ixml.Name{Space: "DAV:", Local: "responsedescription"}
- end = append(end,
- ixml.StartElement{Name: name},
- ixml.CharData(w.responseDescription),
- ixml.EndElement{Name: name},
- )
- }
- end = append(end, ixml.EndElement{
- Name: ixml.Name{Space: "DAV:", Local: "multistatus"},
- })
- for _, t := range end {
- err := w.enc.EncodeToken(t)
- if err != nil {
- return err
- }
- }
- return w.enc.Flush()
-}
-
-var xmlLangName = ixml.Name{Space: "http://www.w3.org/XML/1998/namespace", Local: "lang"}
-
-func xmlLang(s ixml.StartElement, d string) string {
- for _, attr := range s.Attr {
- if attr.Name == xmlLangName {
- return attr.Value
- }
- }
- return d
-}
-
-type xmlValue []byte
-
-func (v *xmlValue) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error {
- // The XML value of a property can be arbitrary, mixed-content XML.
- // To make sure that the unmarshalled value contains all required
- // namespaces, we encode all the property value XML tokens into a
- // buffer. This forces the encoder to redeclare any used namespaces.
- var b bytes.Buffer
- e := ixml.NewEncoder(&b)
- for {
- t, err := next(d)
- if err != nil {
- return err
- }
- if e, ok := t.(ixml.EndElement); ok && e.Name == start.Name {
- break
- }
- if err = e.EncodeToken(t); err != nil {
- return err
- }
- }
- err := e.Flush()
- if err != nil {
- return err
- }
- *v = b.Bytes()
- return nil
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for proppatch)
-type proppatchProps []Property
-
-// UnmarshalXML appends the property names and values enclosed within start
-// to ps.
-//
-// An xml:lang attribute that is defined either on the DAV:prop or property
-// name XML element is propagated to the property's Lang field.
-//
-// UnmarshalXML returns an error if start does not contain any properties or if
-// property values contain syntactically incorrect XML.
-func (ps *proppatchProps) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error {
- lang := xmlLang(start, "")
- for {
- t, err := next(d)
- if err != nil {
- return err
- }
- switch elem := t.(type) {
- case ixml.EndElement:
- if len(*ps) == 0 {
- return fmt.Errorf("%s must not be empty", start.Name.Local)
- }
- return nil
- case ixml.StartElement:
- p := Property{
- XMLName: xml.Name(t.(ixml.StartElement).Name),
- Lang: xmlLang(t.(ixml.StartElement), lang),
- }
- err = d.DecodeElement(((*xmlValue)(&p.InnerXML)), &elem)
- if err != nil {
- return err
- }
- *ps = append(*ps, p)
- }
- }
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_set
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_remove
-type setRemove struct {
- XMLName ixml.Name
- Lang string `xml:"xml:lang,attr,omitempty"`
- Prop proppatchProps `xml:"DAV: prop"`
-}
-
-// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propertyupdate
-type propertyupdate struct {
- XMLName ixml.Name `xml:"DAV: propertyupdate"`
- Lang string `xml:"xml:lang,attr,omitempty"`
- SetRemove []setRemove `xml:",any"`
-}
-
-func readProppatch(r io.Reader) (patches []Proppatch, status int, err error) {
- var pu propertyupdate
- if err = ixml.NewDecoder(r).Decode(&pu); err != nil {
- return nil, http.StatusBadRequest, err
- }
- for _, op := range pu.SetRemove {
- remove := false
- switch op.XMLName {
- case ixml.Name{Space: "DAV:", Local: "set"}:
- // No-op.
- case ixml.Name{Space: "DAV:", Local: "remove"}:
- for _, p := range op.Prop {
- if len(p.InnerXML) > 0 {
- return nil, http.StatusBadRequest, errInvalidProppatch
- }
- }
- remove = true
- default:
- return nil, http.StatusBadRequest, errInvalidProppatch
- }
- patches = append(patches, Proppatch{Remove: remove, Props: op.Prop})
- }
- return patches, 0, nil
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml_test.go
deleted file mode 100644
index a3d9e1ed8..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/webdav/xml_test.go
+++ /dev/null
@@ -1,906 +0,0 @@
-// Copyright 2014 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 file.
-
-package webdav
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io"
- "net/http"
- "net/http/httptest"
- "reflect"
- "sort"
- "strings"
- "testing"
-
- ixml "golang.org/x/net/webdav/internal/xml"
-)
-
-func TestReadLockInfo(t *testing.T) {
- // The "section x.y.z" test cases come from section x.y.z of the spec at
- // http://www.webdav.org/specs/rfc4918.html
- testCases := []struct {
- desc string
- input string
- wantLI lockInfo
- wantStatus int
- }{{
- "bad: junk",
- "xxx",
- lockInfo{},
- http.StatusBadRequest,
- }, {
- "bad: invalid owner XML",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n" +
- " <D:owner>\n" +
- " <D:href> no end tag \n" +
- " </D:owner>\n" +
- "</D:lockinfo>",
- lockInfo{},
- http.StatusBadRequest,
- }, {
- "bad: invalid UTF-8",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n" +
- " <D:owner>\n" +
- " <D:href> \xff </D:href>\n" +
- " </D:owner>\n" +
- "</D:lockinfo>",
- lockInfo{},
- http.StatusBadRequest,
- }, {
- "bad: unfinished XML #1",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n",
- lockInfo{},
- http.StatusBadRequest,
- }, {
- "bad: unfinished XML #2",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n" +
- " <D:owner>\n",
- lockInfo{},
- http.StatusBadRequest,
- }, {
- "good: empty",
- "",
- lockInfo{},
- 0,
- }, {
- "good: plain-text owner",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n" +
- " <D:owner>gopher</D:owner>\n" +
- "</D:lockinfo>",
- lockInfo{
- XMLName: ixml.Name{Space: "DAV:", Local: "lockinfo"},
- Exclusive: new(struct{}),
- Write: new(struct{}),
- Owner: owner{
- InnerXML: "gopher",
- },
- },
- 0,
- }, {
- "section 9.10.7",
- "" +
- "<D:lockinfo xmlns:D='DAV:'>\n" +
- " <D:lockscope><D:exclusive/></D:lockscope>\n" +
- " <D:locktype><D:write/></D:locktype>\n" +
- " <D:owner>\n" +
- " <D:href>http://example.org/~ejw/contact.html</D:href>\n" +
- " </D:owner>\n" +
- "</D:lockinfo>",
- lockInfo{
- XMLName: ixml.Name{Space: "DAV:", Local: "lockinfo"},
- Exclusive: new(struct{}),
- Write: new(struct{}),
- Owner: owner{
- InnerXML: "\n <D:href>http://example.org/~ejw/contact.html</D:href>\n ",
- },
- },
- 0,
- }}
-
- for _, tc := range testCases {
- li, status, err := readLockInfo(strings.NewReader(tc.input))
- if tc.wantStatus != 0 {
- if err == nil {
- t.Errorf("%s: got nil error, want non-nil", tc.desc)
- continue
- }
- } else if err != nil {
- t.Errorf("%s: %v", tc.desc, err)
- continue
- }
- if !reflect.DeepEqual(li, tc.wantLI) || status != tc.wantStatus {
- t.Errorf("%s:\ngot lockInfo=%v, status=%v\nwant lockInfo=%v, status=%v",
- tc.desc, li, status, tc.wantLI, tc.wantStatus)
- continue
- }
- }
-}
-
-func TestReadPropfind(t *testing.T) {
- testCases := []struct {
- desc string
- input string
- wantPF propfind
- wantStatus int
- }{{
- desc: "propfind: propname",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:propname/>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Propname: new(struct{}),
- },
- }, {
- desc: "propfind: empty body means allprop",
- input: "",
- wantPF: propfind{
- Allprop: new(struct{}),
- },
- }, {
- desc: "propfind: allprop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:allprop/>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Allprop: new(struct{}),
- },
- }, {
- desc: "propfind: allprop followed by include",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:allprop/>\n" +
- " <A:include><A:displayname/></A:include>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Allprop: new(struct{}),
- Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: include followed by allprop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:include><A:displayname/></A:include>\n" +
- " <A:allprop/>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Allprop: new(struct{}),
- Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: propfind",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:displayname/></A:prop>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: prop with ignored comments",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop>\n" +
- " <!-- ignore -->\n" +
- " <A:displayname><!-- ignore --></A:displayname>\n" +
- " </A:prop>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: propfind with ignored whitespace",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop> <A:displayname/></A:prop>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: propfind with ignored mixed-content",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop>foo<A:displayname/>bar</A:prop>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}},
- },
- }, {
- desc: "propfind: propname with ignored element (section A.4)",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:propname/>\n" +
- " <E:leave-out xmlns:E='E:'>*boss*</E:leave-out>\n" +
- "</A:propfind>",
- wantPF: propfind{
- XMLName: ixml.Name{Space: "DAV:", Local: "propfind"},
- Propname: new(struct{}),
- },
- }, {
- desc: "propfind: bad: junk",
- input: "xxx",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: propname and allprop (section A.3)",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:propname/>" +
- " <A:allprop/>" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: propname and prop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:displayname/></A:prop>\n" +
- " <A:propname/>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: allprop and prop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:allprop/>\n" +
- " <A:prop><A:foo/><A:/prop>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: empty propfind with ignored element (section A.4)",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <E:expired-props/>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: empty prop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop/>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: prop with just chardata",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop>foo</A:prop>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "bad: interrupted prop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:foo></A:prop>\n",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "bad: malformed end element prop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:foo/></A:bar></A:prop>\n",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: property with chardata value",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:foo>bar</A:foo></A:prop>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: property with whitespace value",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:prop><A:foo> </A:foo></A:prop>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "propfind: bad: include without allprop",
- input: "" +
- "<A:propfind xmlns:A='DAV:'>\n" +
- " <A:include><A:foo/></A:include>\n" +
- "</A:propfind>",
- wantStatus: http.StatusBadRequest,
- }}
-
- for _, tc := range testCases {
- pf, status, err := readPropfind(strings.NewReader(tc.input))
- if tc.wantStatus != 0 {
- if err == nil {
- t.Errorf("%s: got nil error, want non-nil", tc.desc)
- continue
- }
- } else if err != nil {
- t.Errorf("%s: %v", tc.desc, err)
- continue
- }
- if !reflect.DeepEqual(pf, tc.wantPF) || status != tc.wantStatus {
- t.Errorf("%s:\ngot propfind=%v, status=%v\nwant propfind=%v, status=%v",
- tc.desc, pf, status, tc.wantPF, tc.wantStatus)
- continue
- }
- }
-}
-
-func TestMultistatusWriter(t *testing.T) {
- ///The "section x.y.z" test cases come from section x.y.z of the spec at
- // http://www.webdav.org/specs/rfc4918.html
- testCases := []struct {
- desc string
- responses []response
- respdesc string
- writeHeader bool
- wantXML string
- wantCode int
- wantErr error
- }{{
- desc: "section 9.2.2 (failed dependency)",
- responses: []response{{
- Href: []string{"http://example.com/foo"},
- Propstat: []propstat{{
- Prop: []Property{{
- XMLName: xml.Name{
- Space: "http://ns.example.com/",
- Local: "Authors",
- },
- }},
- Status: "HTTP/1.1 424 Failed Dependency",
- }, {
- Prop: []Property{{
- XMLName: xml.Name{
- Space: "http://ns.example.com/",
- Local: "Copyright-Owner",
- },
- }},
- Status: "HTTP/1.1 409 Conflict",
- }},
- ResponseDescription: "Copyright Owner cannot be deleted or altered.",
- }},
- wantXML: `` +
- `<?xml version="1.0" encoding="UTF-8"?>` +
- `<multistatus xmlns="DAV:">` +
- ` <response>` +
- ` <href>http://example.com/foo</href>` +
- ` <propstat>` +
- ` <prop>` +
- ` <Authors xmlns="http://ns.example.com/"></Authors>` +
- ` </prop>` +
- ` <status>HTTP/1.1 424 Failed Dependency</status>` +
- ` </propstat>` +
- ` <propstat xmlns="DAV:">` +
- ` <prop>` +
- ` <Copyright-Owner xmlns="http://ns.example.com/"></Copyright-Owner>` +
- ` </prop>` +
- ` <status>HTTP/1.1 409 Conflict</status>` +
- ` </propstat>` +
- ` <responsedescription>Copyright Owner cannot be deleted or altered.</responsedescription>` +
- `</response>` +
- `</multistatus>`,
- wantCode: StatusMulti,
- }, {
- desc: "section 9.6.2 (lock-token-submitted)",
- responses: []response{{
- Href: []string{"http://example.com/foo"},
- Status: "HTTP/1.1 423 Locked",
- Error: &xmlError{
- InnerXML: []byte(`<lock-token-submitted xmlns="DAV:"/>`),
- },
- }},
- wantXML: `` +
- `<?xml version="1.0" encoding="UTF-8"?>` +
- `<multistatus xmlns="DAV:">` +
- ` <response>` +
- ` <href>http://example.com/foo</href>` +
- ` <status>HTTP/1.1 423 Locked</status>` +
- ` <error><lock-token-submitted xmlns="DAV:"/></error>` +
- ` </response>` +
- `</multistatus>`,
- wantCode: StatusMulti,
- }, {
- desc: "section 9.1.3",
- responses: []response{{
- Href: []string{"http://example.com/foo"},
- Propstat: []propstat{{
- Prop: []Property{{
- XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "bigbox"},
- InnerXML: []byte(`` +
- `<BoxType xmlns="http://ns.example.com/boxschema/">` +
- `Box type A` +
- `</BoxType>`),
- }, {
- XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "author"},
- InnerXML: []byte(`` +
- `<Name xmlns="http://ns.example.com/boxschema/">` +
- `J.J. Johnson` +
- `</Name>`),
- }},
- Status: "HTTP/1.1 200 OK",
- }, {
- Prop: []Property{{
- XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "DingALing"},
- }, {
- XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "Random"},
- }},
- Status: "HTTP/1.1 403 Forbidden",
- ResponseDescription: "The user does not have access to the DingALing property.",
- }},
- }},
- respdesc: "There has been an access violation error.",
- wantXML: `` +
- `<?xml version="1.0" encoding="UTF-8"?>` +
- `<multistatus xmlns="DAV:" xmlns:B="http://ns.example.com/boxschema/">` +
- ` <response>` +
- ` <href>http://example.com/foo</href>` +
- ` <propstat>` +
- ` <prop>` +
- ` <B:bigbox><B:BoxType>Box type A</B:BoxType></B:bigbox>` +
- ` <B:author><B:Name>J.J. Johnson</B:Name></B:author>` +
- ` </prop>` +
- ` <status>HTTP/1.1 200 OK</status>` +
- ` </propstat>` +
- ` <propstat>` +
- ` <prop>` +
- ` <B:DingALing/>` +
- ` <B:Random/>` +
- ` </prop>` +
- ` <status>HTTP/1.1 403 Forbidden</status>` +
- ` <responsedescription>The user does not have access to the DingALing property.</responsedescription>` +
- ` </propstat>` +
- ` </response>` +
- ` <responsedescription>There has been an access violation error.</responsedescription>` +
- `</multistatus>`,
- wantCode: StatusMulti,
- }, {
- desc: "no response written",
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "no response written (with description)",
- respdesc: "too bad",
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "empty multistatus with header",
- writeHeader: true,
- wantXML: `<multistatus xmlns="DAV:"></multistatus>`,
- wantCode: StatusMulti,
- }, {
- desc: "bad: no href",
- responses: []response{{
- Propstat: []propstat{{
- Prop: []Property{{
- XMLName: xml.Name{
- Space: "http://example.com/",
- Local: "foo",
- },
- }},
- Status: "HTTP/1.1 200 OK",
- }},
- }},
- wantErr: errInvalidResponse,
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "bad: multiple hrefs and no status",
- responses: []response{{
- Href: []string{"http://example.com/foo", "http://example.com/bar"},
- }},
- wantErr: errInvalidResponse,
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "bad: one href and no propstat",
- responses: []response{{
- Href: []string{"http://example.com/foo"},
- }},
- wantErr: errInvalidResponse,
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "bad: status with one href and propstat",
- responses: []response{{
- Href: []string{"http://example.com/foo"},
- Propstat: []propstat{{
- Prop: []Property{{
- XMLName: xml.Name{
- Space: "http://example.com/",
- Local: "foo",
- },
- }},
- Status: "HTTP/1.1 200 OK",
- }},
- Status: "HTTP/1.1 200 OK",
- }},
- wantErr: errInvalidResponse,
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }, {
- desc: "bad: multiple hrefs and propstat",
- responses: []response{{
- Href: []string{
- "http://example.com/foo",
- "http://example.com/bar",
- },
- Propstat: []propstat{{
- Prop: []Property{{
- XMLName: xml.Name{
- Space: "http://example.com/",
- Local: "foo",
- },
- }},
- Status: "HTTP/1.1 200 OK",
- }},
- }},
- wantErr: errInvalidResponse,
- // default of http.responseWriter
- wantCode: http.StatusOK,
- }}
-
- n := xmlNormalizer{omitWhitespace: true}
-loop:
- for _, tc := range testCases {
- rec := httptest.NewRecorder()
- w := multistatusWriter{w: rec, responseDescription: tc.respdesc}
- if tc.writeHeader {
- if err := w.writeHeader(); err != nil {
- t.Errorf("%s: got writeHeader error %v, want nil", tc.desc, err)
- continue
- }
- }
- for _, r := range tc.responses {
- if err := w.write(&r); err != nil {
- if err != tc.wantErr {
- t.Errorf("%s: got write error %v, want %v",
- tc.desc, err, tc.wantErr)
- }
- continue loop
- }
- }
- if err := w.close(); err != tc.wantErr {
- t.Errorf("%s: got close error %v, want %v",
- tc.desc, err, tc.wantErr)
- continue
- }
- if rec.Code != tc.wantCode {
- t.Errorf("%s: got HTTP status code %d, want %d\n",
- tc.desc, rec.Code, tc.wantCode)
- continue
- }
- gotXML := rec.Body.String()
- eq, err := n.equalXML(strings.NewReader(gotXML), strings.NewReader(tc.wantXML))
- if err != nil {
- t.Errorf("%s: equalXML: %v", tc.desc, err)
- continue
- }
- if !eq {
- t.Errorf("%s: XML body\ngot %s\nwant %s", tc.desc, gotXML, tc.wantXML)
- }
- }
-}
-
-func TestReadProppatch(t *testing.T) {
- ppStr := func(pps []Proppatch) string {
- var outer []string
- for _, pp := range pps {
- var inner []string
- for _, p := range pp.Props {
- inner = append(inner, fmt.Sprintf("{XMLName: %q, Lang: %q, InnerXML: %q}",
- p.XMLName, p.Lang, p.InnerXML))
- }
- outer = append(outer, fmt.Sprintf("{Remove: %t, Props: [%s]}",
- pp.Remove, strings.Join(inner, ", ")))
- }
- return "[" + strings.Join(outer, ", ") + "]"
- }
-
- testCases := []struct {
- desc string
- input string
- wantPP []Proppatch
- wantStatus int
- }{{
- desc: "proppatch: section 9.2 (with simple property value)",
- input: `` +
- `<?xml version="1.0" encoding="utf-8" ?>` +
- `<D:propertyupdate xmlns:D="DAV:"` +
- ` xmlns:Z="http://ns.example.com/z/">` +
- ` <D:set>` +
- ` <D:prop><Z:Authors>somevalue</Z:Authors></D:prop>` +
- ` </D:set>` +
- ` <D:remove>` +
- ` <D:prop><Z:Copyright-Owner/></D:prop>` +
- ` </D:remove>` +
- `</D:propertyupdate>`,
- wantPP: []Proppatch{{
- Props: []Property{{
- xml.Name{Space: "http://ns.example.com/z/", Local: "Authors"},
- "",
- []byte(`somevalue`),
- }},
- }, {
- Remove: true,
- Props: []Property{{
- xml.Name{Space: "http://ns.example.com/z/", Local: "Copyright-Owner"},
- "",
- nil,
- }},
- }},
- }, {
- desc: "proppatch: lang attribute on prop",
- input: `` +
- `<?xml version="1.0" encoding="utf-8" ?>` +
- `<D:propertyupdate xmlns:D="DAV:">` +
- ` <D:set>` +
- ` <D:prop xml:lang="en">` +
- ` <foo xmlns="http://example.com/ns"/>` +
- ` </D:prop>` +
- ` </D:set>` +
- `</D:propertyupdate>`,
- wantPP: []Proppatch{{
- Props: []Property{{
- xml.Name{Space: "http://example.com/ns", Local: "foo"},
- "en",
- nil,
- }},
- }},
- }, {
- desc: "bad: remove with value",
- input: `` +
- `<?xml version="1.0" encoding="utf-8" ?>` +
- `<D:propertyupdate xmlns:D="DAV:"` +
- ` xmlns:Z="http://ns.example.com/z/">` +
- ` <D:remove>` +
- ` <D:prop>` +
- ` <Z:Authors>` +
- ` <Z:Author>Jim Whitehead</Z:Author>` +
- ` </Z:Authors>` +
- ` </D:prop>` +
- ` </D:remove>` +
- `</D:propertyupdate>`,
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "bad: empty propertyupdate",
- input: `` +
- `<?xml version="1.0" encoding="utf-8" ?>` +
- `<D:propertyupdate xmlns:D="DAV:"` +
- `</D:propertyupdate>`,
- wantStatus: http.StatusBadRequest,
- }, {
- desc: "bad: empty prop",
- input: `` +
- `<?xml version="1.0" encoding="utf-8" ?>` +
- `<D:propertyupdate xmlns:D="DAV:"` +
- ` xmlns:Z="http://ns.example.com/z/">` +
- ` <D:remove>` +
- ` <D:prop/>` +
- ` </D:remove>` +
- `</D:propertyupdate>`,
- wantStatus: http.StatusBadRequest,
- }}
-
- for _, tc := range testCases {
- pp, status, err := readProppatch(strings.NewReader(tc.input))
- if tc.wantStatus != 0 {
- if err == nil {
- t.Errorf("%s: got nil error, want non-nil", tc.desc)
- continue
- }
- } else if err != nil {
- t.Errorf("%s: %v", tc.desc, err)
- continue
- }
- if status != tc.wantStatus {
- t.Errorf("%s: got status %d, want %d", tc.desc, status, tc.wantStatus)
- continue
- }
- if !reflect.DeepEqual(pp, tc.wantPP) || status != tc.wantStatus {
- t.Errorf("%s: proppatch\ngot %v\nwant %v", tc.desc, ppStr(pp), ppStr(tc.wantPP))
- }
- }
-}
-
-func TestUnmarshalXMLValue(t *testing.T) {
- testCases := []struct {
- desc string
- input string
- wantVal string
- }{{
- desc: "simple char data",
- input: "<root>foo</root>",
- wantVal: "foo",
- }, {
- desc: "empty element",
- input: "<root><foo/></root>",
- wantVal: "<foo/>",
- }, {
- desc: "preserve namespace",
- input: `<root><foo xmlns="bar"/></root>`,
- wantVal: `<foo xmlns="bar"/>`,
- }, {
- desc: "preserve root element namespace",
- input: `<root xmlns:bar="bar"><bar:foo/></root>`,
- wantVal: `<foo xmlns="bar"/>`,
- }, {
- desc: "preserve whitespace",
- input: "<root> \t </root>",
- wantVal: " \t ",
- }, {
- desc: "preserve mixed content",
- input: `<root xmlns="bar"> <foo>a<bam xmlns="baz"/> </foo> </root>`,
- wantVal: ` <foo xmlns="bar">a<bam xmlns="baz"/> </foo> `,
- }, {
- desc: "section 9.2",
- input: `` +
- `<Z:Authors xmlns:Z="http://ns.example.com/z/">` +
- ` <Z:Author>Jim Whitehead</Z:Author>` +
- ` <Z:Author>Roy Fielding</Z:Author>` +
- `</Z:Authors>`,
- wantVal: `` +
- ` <Author xmlns="http://ns.example.com/z/">Jim Whitehead</Author>` +
- ` <Author xmlns="http://ns.example.com/z/">Roy Fielding</Author>`,
- }, {
- desc: "section 4.3.1 (mixed content)",
- input: `` +
- `<x:author ` +
- ` xmlns:x='http://example.com/ns' ` +
- ` xmlns:D="DAV:">` +
- ` <x:name>Jane Doe</x:name>` +
- ` <!-- Jane's contact info -->` +
- ` <x:uri type='email'` +
- ` added='2005-11-26'>mailto:jane.doe@example.com</x:uri>` +
- ` <x:uri type='web'` +
- ` added='2005-11-27'>http://www.example.com</x:uri>` +
- ` <x:notes xmlns:h='http://www.w3.org/1999/xhtml'>` +
- ` Jane has been working way <h:em>too</h:em> long on the` +
- ` long-awaited revision of <![CDATA[<RFC2518>]]>.` +
- ` </x:notes>` +
- `</x:author>`,
- wantVal: `` +
- ` <name xmlns="http://example.com/ns">Jane Doe</name>` +
- ` ` +
- ` <uri type='email'` +
- ` xmlns="http://example.com/ns" ` +
- ` added='2005-11-26'>mailto:jane.doe@example.com</uri>` +
- ` <uri added='2005-11-27'` +
- ` type='web'` +
- ` xmlns="http://example.com/ns">http://www.example.com</uri>` +
- ` <notes xmlns="http://example.com/ns" ` +
- ` xmlns:h="http://www.w3.org/1999/xhtml">` +
- ` Jane has been working way <h:em>too</h:em> long on the` +
- ` long-awaited revision of &lt;RFC2518&gt;.` +
- ` </notes>`,
- }}
-
- var n xmlNormalizer
- for _, tc := range testCases {
- d := ixml.NewDecoder(strings.NewReader(tc.input))
- var v xmlValue
- if err := d.Decode(&v); err != nil {
- t.Errorf("%s: got error %v, want nil", tc.desc, err)
- continue
- }
- eq, err := n.equalXML(bytes.NewReader(v), strings.NewReader(tc.wantVal))
- if err != nil {
- t.Errorf("%s: equalXML: %v", tc.desc, err)
- continue
- }
- if !eq {
- t.Errorf("%s:\ngot %s\nwant %s", tc.desc, string(v), tc.wantVal)
- }
- }
-}
-
-// xmlNormalizer normalizes XML.
-type xmlNormalizer struct {
- // omitWhitespace instructs to ignore whitespace between element tags.
- omitWhitespace bool
- // omitComments instructs to ignore XML comments.
- omitComments bool
-}
-
-// normalize writes the normalized XML content of r to w. It applies the
-// following rules
-//
-// * Rename namespace prefixes according to an internal heuristic.
-// * Remove unnecessary namespace declarations.
-// * Sort attributes in XML start elements in lexical order of their
-// fully qualified name.
-// * Remove XML directives and processing instructions.
-// * Remove CDATA between XML tags that only contains whitespace, if
-// instructed to do so.
-// * Remove comments, if instructed to do so.
-//
-func (n *xmlNormalizer) normalize(w io.Writer, r io.Reader) error {
- d := ixml.NewDecoder(r)
- e := ixml.NewEncoder(w)
- for {
- t, err := d.Token()
- if err != nil {
- if t == nil && err == io.EOF {
- break
- }
- return err
- }
- switch val := t.(type) {
- case ixml.Directive, ixml.ProcInst:
- continue
- case ixml.Comment:
- if n.omitComments {
- continue
- }
- case ixml.CharData:
- if n.omitWhitespace && len(bytes.TrimSpace(val)) == 0 {
- continue
- }
- case ixml.StartElement:
- start, _ := ixml.CopyToken(val).(ixml.StartElement)
- attr := start.Attr[:0]
- for _, a := range start.Attr {
- if a.Name.Space == "xmlns" || a.Name.Local == "xmlns" {
- continue
- }
- attr = append(attr, a)
- }
- sort.Sort(byName(attr))
- start.Attr = attr
- t = start
- }
- err = e.EncodeToken(t)
- if err != nil {
- return err
- }
- }
- return e.Flush()
-}
-
-// equalXML tests for equality of the normalized XML contents of a and b.
-func (n *xmlNormalizer) equalXML(a, b io.Reader) (bool, error) {
- var buf bytes.Buffer
- if err := n.normalize(&buf, a); err != nil {
- return false, err
- }
- normA := buf.String()
- buf.Reset()
- if err := n.normalize(&buf, b); err != nil {
- return false, err
- }
- normB := buf.String()
- return normA == normB, nil
-}
-
-type byName []ixml.Attr
-
-func (a byName) Len() int { return len(a) }
-func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a byName) Less(i, j int) bool {
- if a[i].Name.Space != a[j].Name.Space {
- return a[i].Name.Space < a[j].Name.Space
- }
- return a[i].Name.Local < a[j].Name.Local
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/client.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/client.go
deleted file mode 100644
index 69a4ac7ee..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/client.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2009 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 file.
-
-package websocket
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
- "net/url"
-)
-
-// DialError is an error that occurs while dialling a websocket server.
-type DialError struct {
- *Config
- Err error
-}
-
-func (e *DialError) Error() string {
- return "websocket.Dial " + e.Config.Location.String() + ": " + e.Err.Error()
-}
-
-// NewConfig creates a new WebSocket config for client connection.
-func NewConfig(server, origin string) (config *Config, err error) {
- config = new(Config)
- config.Version = ProtocolVersionHybi13
- config.Location, err = url.ParseRequestURI(server)
- if err != nil {
- return
- }
- config.Origin, err = url.ParseRequestURI(origin)
- if err != nil {
- return
- }
- config.Header = http.Header(make(map[string][]string))
- return
-}
-
-// NewClient creates a new WebSocket client connection over rwc.
-func NewClient(config *Config, rwc io.ReadWriteCloser) (ws *Conn, err error) {
- br := bufio.NewReader(rwc)
- bw := bufio.NewWriter(rwc)
- err = hybiClientHandshake(config, br, bw)
- if err != nil {
- return
- }
- buf := bufio.NewReadWriter(br, bw)
- ws = newHybiClientConn(config, buf, rwc)
- return
-}
-
-// Dial opens a new client connection to a WebSocket.
-func Dial(url_, protocol, origin string) (ws *Conn, err error) {
- config, err := NewConfig(url_, origin)
- if err != nil {
- return nil, err
- }
- if protocol != "" {
- config.Protocol = []string{protocol}
- }
- return DialConfig(config)
-}
-
-var portMap = map[string]string{
- "ws": "80",
- "wss": "443",
-}
-
-func parseAuthority(location *url.URL) string {
- if _, ok := portMap[location.Scheme]; ok {
- if _, _, err := net.SplitHostPort(location.Host); err != nil {
- return net.JoinHostPort(location.Host, portMap[location.Scheme])
- }
- }
- return location.Host
-}
-
-// DialConfig opens a new client connection to a WebSocket with a config.
-func DialConfig(config *Config) (ws *Conn, err error) {
- var client net.Conn
- if config.Location == nil {
- return nil, &DialError{config, ErrBadWebSocketLocation}
- }
- if config.Origin == nil {
- return nil, &DialError{config, ErrBadWebSocketOrigin}
- }
- dialer := config.Dialer
- if dialer == nil {
- dialer = &net.Dialer{}
- }
- client, err = dialWithDialer(dialer, config)
- if err != nil {
- goto Error
- }
- ws, err = NewClient(config, client)
- if err != nil {
- client.Close()
- goto Error
- }
- return
-
-Error:
- return nil, &DialError{config, err}
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial.go
deleted file mode 100644
index 2dab943a4..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 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 file.
-
-package websocket
-
-import (
- "crypto/tls"
- "net"
-)
-
-func dialWithDialer(dialer *net.Dialer, config *Config) (conn net.Conn, err error) {
- switch config.Location.Scheme {
- case "ws":
- conn, err = dialer.Dial("tcp", parseAuthority(config.Location))
-
- case "wss":
- conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)
-
- default:
- err = ErrBadScheme
- }
- return
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial_test.go
deleted file mode 100644
index aa03e30dd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/dial_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 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 file.
-
-package websocket
-
-import (
- "crypto/tls"
- "fmt"
- "log"
- "net"
- "net/http/httptest"
- "testing"
- "time"
-)
-
-// This test depend on Go 1.3+ because in earlier versions the Dialer won't be
-// used in TLS connections and a timeout won't be triggered.
-func TestDialConfigTLSWithDialer(t *testing.T) {
- tlsServer := httptest.NewTLSServer(nil)
- tlsServerAddr := tlsServer.Listener.Addr().String()
- log.Print("Test TLS WebSocket server listening on ", tlsServerAddr)
- defer tlsServer.Close()
- config, _ := NewConfig(fmt.Sprintf("wss://%s/echo", tlsServerAddr), "http://localhost")
- config.Dialer = &net.Dialer{
- Deadline: time.Now().Add(-time.Minute),
- }
- config.TlsConfig = &tls.Config{
- InsecureSkipVerify: true,
- }
- _, err := DialConfig(config)
- dialerr, ok := err.(*DialError)
- if !ok {
- t.Fatalf("DialError expected, got %#v", err)
- }
- neterr, ok := dialerr.Err.(*net.OpError)
- if !ok {
- t.Fatalf("net.OpError error expected, got %#v", dialerr.Err)
- }
- if !neterr.Timeout() {
- t.Fatalf("expected timeout error, got %#v", neterr)
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/exampledial_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/exampledial_test.go
deleted file mode 100644
index 72bb9d48e..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/exampledial_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012 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 file.
-
-package websocket_test
-
-import (
- "fmt"
- "log"
-
- "golang.org/x/net/websocket"
-)
-
-// This example demonstrates a trivial client.
-func ExampleDial() {
- origin := "http://localhost/"
- url := "ws://localhost:12345/ws"
- ws, err := websocket.Dial(url, "", origin)
- if err != nil {
- log.Fatal(err)
- }
- if _, err := ws.Write([]byte("hello, world!\n")); err != nil {
- log.Fatal(err)
- }
- var msg = make([]byte, 512)
- var n int
- if n, err = ws.Read(msg); err != nil {
- log.Fatal(err)
- }
- fmt.Printf("Received: %s.\n", msg[:n])
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/examplehandler_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/examplehandler_test.go
deleted file mode 100644
index f22a98fcd..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/examplehandler_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 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 file.
-
-package websocket_test
-
-import (
- "io"
- "net/http"
-
- "golang.org/x/net/websocket"
-)
-
-// Echo the data received on the WebSocket.
-func EchoServer(ws *websocket.Conn) {
- io.Copy(ws, ws)
-}
-
-// This example demonstrates a trivial echo server.
-func ExampleHandler() {
- http.Handle("/echo", websocket.Handler(EchoServer))
- err := http.ListenAndServe(":12345", nil)
- if err != nil {
- panic("ListenAndServe: " + err.Error())
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi.go
deleted file mode 100644
index 8cffdd16c..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi.go
+++ /dev/null
@@ -1,583 +0,0 @@
-// Copyright 2011 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 file.
-
-package websocket
-
-// This file implements a protocol of hybi draft.
-// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
-
-import (
- "bufio"
- "bytes"
- "crypto/rand"
- "crypto/sha1"
- "encoding/base64"
- "encoding/binary"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "strings"
-)
-
-const (
- websocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
-
- closeStatusNormal = 1000
- closeStatusGoingAway = 1001
- closeStatusProtocolError = 1002
- closeStatusUnsupportedData = 1003
- closeStatusFrameTooLarge = 1004
- closeStatusNoStatusRcvd = 1005
- closeStatusAbnormalClosure = 1006
- closeStatusBadMessageData = 1007
- closeStatusPolicyViolation = 1008
- closeStatusTooBigData = 1009
- closeStatusExtensionMismatch = 1010
-
- maxControlFramePayloadLength = 125
-)
-
-var (
- ErrBadMaskingKey = &ProtocolError{"bad masking key"}
- ErrBadPongMessage = &ProtocolError{"bad pong message"}
- ErrBadClosingStatus = &ProtocolError{"bad closing status"}
- ErrUnsupportedExtensions = &ProtocolError{"unsupported extensions"}
- ErrNotImplemented = &ProtocolError{"not implemented"}
-
- handshakeHeader = map[string]bool{
- "Host": true,
- "Upgrade": true,
- "Connection": true,
- "Sec-Websocket-Key": true,
- "Sec-Websocket-Origin": true,
- "Sec-Websocket-Version": true,
- "Sec-Websocket-Protocol": true,
- "Sec-Websocket-Accept": true,
- }
-)
-
-// A hybiFrameHeader is a frame header as defined in hybi draft.
-type hybiFrameHeader struct {
- Fin bool
- Rsv [3]bool
- OpCode byte
- Length int64
- MaskingKey []byte
-
- data *bytes.Buffer
-}
-
-// A hybiFrameReader is a reader for hybi frame.
-type hybiFrameReader struct {
- reader io.Reader
-
- header hybiFrameHeader
- pos int64
- length int
-}
-
-func (frame *hybiFrameReader) Read(msg []byte) (n int, err error) {
- n, err = frame.reader.Read(msg)
- if frame.header.MaskingKey != nil {
- for i := 0; i < n; i++ {
- msg[i] = msg[i] ^ frame.header.MaskingKey[frame.pos%4]
- frame.pos++
- }
- }
- return n, err
-}
-
-func (frame *hybiFrameReader) PayloadType() byte { return frame.header.OpCode }
-
-func (frame *hybiFrameReader) HeaderReader() io.Reader {
- if frame.header.data == nil {
- return nil
- }
- if frame.header.data.Len() == 0 {
- return nil
- }
- return frame.header.data
-}
-
-func (frame *hybiFrameReader) TrailerReader() io.Reader { return nil }
-
-func (frame *hybiFrameReader) Len() (n int) { return frame.length }
-
-// A hybiFrameReaderFactory creates new frame reader based on its frame type.
-type hybiFrameReaderFactory struct {
- *bufio.Reader
-}
-
-// NewFrameReader reads a frame header from the connection, and creates new reader for the frame.
-// See Section 5.2 Base Framing protocol for detail.
-// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#section-5.2
-func (buf hybiFrameReaderFactory) NewFrameReader() (frame frameReader, err error) {
- hybiFrame := new(hybiFrameReader)
- frame = hybiFrame
- var header []byte
- var b byte
- // First byte. FIN/RSV1/RSV2/RSV3/OpCode(4bits)
- b, err = buf.ReadByte()
- if err != nil {
- return
- }
- header = append(header, b)
- hybiFrame.header.Fin = ((header[0] >> 7) & 1) != 0
- for i := 0; i < 3; i++ {
- j := uint(6 - i)
- hybiFrame.header.Rsv[i] = ((header[0] >> j) & 1) != 0
- }
- hybiFrame.header.OpCode = header[0] & 0x0f
-
- // Second byte. Mask/Payload len(7bits)
- b, err = buf.ReadByte()
- if err != nil {
- return
- }
- header = append(header, b)
- mask := (b & 0x80) != 0
- b &= 0x7f
- lengthFields := 0
- switch {
- case b <= 125: // Payload length 7bits.
- hybiFrame.header.Length = int64(b)
- case b == 126: // Payload length 7+16bits
- lengthFields = 2
- case b == 127: // Payload length 7+64bits
- lengthFields = 8
- }
- for i := 0; i < lengthFields; i++ {
- b, err = buf.ReadByte()
- if err != nil {
- return
- }
- if lengthFields == 8 && i == 0 { // MSB must be zero when 7+64 bits
- b &= 0x7f
- }
- header = append(header, b)
- hybiFrame.header.Length = hybiFrame.header.Length*256 + int64(b)
- }
- if mask {
- // Masking key. 4 bytes.
- for i := 0; i < 4; i++ {
- b, err = buf.ReadByte()
- if err != nil {
- return
- }
- header = append(header, b)
- hybiFrame.header.MaskingKey = append(hybiFrame.header.MaskingKey, b)
- }
- }
- hybiFrame.reader = io.LimitReader(buf.Reader, hybiFrame.header.Length)
- hybiFrame.header.data = bytes.NewBuffer(header)
- hybiFrame.length = len(header) + int(hybiFrame.header.Length)
- return
-}
-
-// A HybiFrameWriter is a writer for hybi frame.
-type hybiFrameWriter struct {
- writer *bufio.Writer
-
- header *hybiFrameHeader
-}
-
-func (frame *hybiFrameWriter) Write(msg []byte) (n int, err error) {
- var header []byte
- var b byte
- if frame.header.Fin {
- b |= 0x80
- }
- for i := 0; i < 3; i++ {
- if frame.header.Rsv[i] {
- j := uint(6 - i)
- b |= 1 << j
- }
- }
- b |= frame.header.OpCode
- header = append(header, b)
- if frame.header.MaskingKey != nil {
- b = 0x80
- } else {
- b = 0
- }
- lengthFields := 0
- length := len(msg)
- switch {
- case length <= 125:
- b |= byte(length)
- case length < 65536:
- b |= 126
- lengthFields = 2
- default:
- b |= 127
- lengthFields = 8
- }
- header = append(header, b)
- for i := 0; i < lengthFields; i++ {
- j := uint((lengthFields - i - 1) * 8)
- b = byte((length >> j) & 0xff)
- header = append(header, b)
- }
- if frame.header.MaskingKey != nil {
- if len(frame.header.MaskingKey) != 4 {
- return 0, ErrBadMaskingKey
- }
- header = append(header, frame.header.MaskingKey...)
- frame.writer.Write(header)
- data := make([]byte, length)
- for i := range data {
- data[i] = msg[i] ^ frame.header.MaskingKey[i%4]
- }
- frame.writer.Write(data)
- err = frame.writer.Flush()
- return length, err
- }
- frame.writer.Write(header)
- frame.writer.Write(msg)
- err = frame.writer.Flush()
- return length, err
-}
-
-func (frame *hybiFrameWriter) Close() error { return nil }
-
-type hybiFrameWriterFactory struct {
- *bufio.Writer
- needMaskingKey bool
-}
-
-func (buf hybiFrameWriterFactory) NewFrameWriter(payloadType byte) (frame frameWriter, err error) {
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: payloadType}
- if buf.needMaskingKey {
- frameHeader.MaskingKey, err = generateMaskingKey()
- if err != nil {
- return nil, err
- }
- }
- return &hybiFrameWriter{writer: buf.Writer, header: frameHeader}, nil
-}
-
-type hybiFrameHandler struct {
- conn *Conn
- payloadType byte
-}
-
-func (handler *hybiFrameHandler) HandleFrame(frame frameReader) (frameReader, error) {
- if handler.conn.IsServerConn() {
- // The client MUST mask all frames sent to the server.
- if frame.(*hybiFrameReader).header.MaskingKey == nil {
- handler.WriteClose(closeStatusProtocolError)
- return nil, io.EOF
- }
- } else {
- // The server MUST NOT mask all frames.
- if frame.(*hybiFrameReader).header.MaskingKey != nil {
- handler.WriteClose(closeStatusProtocolError)
- return nil, io.EOF
- }
- }
- if header := frame.HeaderReader(); header != nil {
- io.Copy(ioutil.Discard, header)
- }
- switch frame.PayloadType() {
- case ContinuationFrame:
- frame.(*hybiFrameReader).header.OpCode = handler.payloadType
- case TextFrame, BinaryFrame:
- handler.payloadType = frame.PayloadType()
- case CloseFrame:
- return nil, io.EOF
- case PingFrame, PongFrame:
- b := make([]byte, maxControlFramePayloadLength)
- n, err := io.ReadFull(frame, b)
- if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
- return nil, err
- }
- io.Copy(ioutil.Discard, frame)
- if frame.PayloadType() == PingFrame {
- if _, err := handler.WritePong(b[:n]); err != nil {
- return nil, err
- }
- }
- return nil, nil
- }
- return frame, nil
-}
-
-func (handler *hybiFrameHandler) WriteClose(status int) (err error) {
- handler.conn.wio.Lock()
- defer handler.conn.wio.Unlock()
- w, err := handler.conn.frameWriterFactory.NewFrameWriter(CloseFrame)
- if err != nil {
- return err
- }
- msg := make([]byte, 2)
- binary.BigEndian.PutUint16(msg, uint16(status))
- _, err = w.Write(msg)
- w.Close()
- return err
-}
-
-func (handler *hybiFrameHandler) WritePong(msg []byte) (n int, err error) {
- handler.conn.wio.Lock()
- defer handler.conn.wio.Unlock()
- w, err := handler.conn.frameWriterFactory.NewFrameWriter(PongFrame)
- if err != nil {
- return 0, err
- }
- n, err = w.Write(msg)
- w.Close()
- return n, err
-}
-
-// newHybiConn creates a new WebSocket connection speaking hybi draft protocol.
-func newHybiConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn {
- if buf == nil {
- br := bufio.NewReader(rwc)
- bw := bufio.NewWriter(rwc)
- buf = bufio.NewReadWriter(br, bw)
- }
- ws := &Conn{config: config, request: request, buf: buf, rwc: rwc,
- frameReaderFactory: hybiFrameReaderFactory{buf.Reader},
- frameWriterFactory: hybiFrameWriterFactory{
- buf.Writer, request == nil},
- PayloadType: TextFrame,
- defaultCloseStatus: closeStatusNormal}
- ws.frameHandler = &hybiFrameHandler{conn: ws}
- return ws
-}
-
-// generateMaskingKey generates a masking key for a frame.
-func generateMaskingKey() (maskingKey []byte, err error) {
- maskingKey = make([]byte, 4)
- if _, err = io.ReadFull(rand.Reader, maskingKey); err != nil {
- return
- }
- return
-}
-
-// generateNonce generates a nonce consisting of a randomly selected 16-byte
-// value that has been base64-encoded.
-func generateNonce() (nonce []byte) {
- key := make([]byte, 16)
- if _, err := io.ReadFull(rand.Reader, key); err != nil {
- panic(err)
- }
- nonce = make([]byte, 24)
- base64.StdEncoding.Encode(nonce, key)
- return
-}
-
-// removeZone removes IPv6 zone identifer from host.
-// E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080"
-func removeZone(host string) string {
- if !strings.HasPrefix(host, "[") {
- return host
- }
- i := strings.LastIndex(host, "]")
- if i < 0 {
- return host
- }
- j := strings.LastIndex(host[:i], "%")
- if j < 0 {
- return host
- }
- return host[:j] + host[i:]
-}
-
-// getNonceAccept computes the base64-encoded SHA-1 of the concatenation of
-// the nonce ("Sec-WebSocket-Key" value) with the websocket GUID string.
-func getNonceAccept(nonce []byte) (expected []byte, err error) {
- h := sha1.New()
- if _, err = h.Write(nonce); err != nil {
- return
- }
- if _, err = h.Write([]byte(websocketGUID)); err != nil {
- return
- }
- expected = make([]byte, 28)
- base64.StdEncoding.Encode(expected, h.Sum(nil))
- return
-}
-
-// Client handshake described in draft-ietf-hybi-thewebsocket-protocol-17
-func hybiClientHandshake(config *Config, br *bufio.Reader, bw *bufio.Writer) (err error) {
- bw.WriteString("GET " + config.Location.RequestURI() + " HTTP/1.1\r\n")
-
- // According to RFC 6874, an HTTP client, proxy, or other
- // intermediary must remove any IPv6 zone identifier attached
- // to an outgoing URI.
- bw.WriteString("Host: " + removeZone(config.Location.Host) + "\r\n")
- bw.WriteString("Upgrade: websocket\r\n")
- bw.WriteString("Connection: Upgrade\r\n")
- nonce := generateNonce()
- if config.handshakeData != nil {
- nonce = []byte(config.handshakeData["key"])
- }
- bw.WriteString("Sec-WebSocket-Key: " + string(nonce) + "\r\n")
- bw.WriteString("Origin: " + strings.ToLower(config.Origin.String()) + "\r\n")
-
- if config.Version != ProtocolVersionHybi13 {
- return ErrBadProtocolVersion
- }
-
- bw.WriteString("Sec-WebSocket-Version: " + fmt.Sprintf("%d", config.Version) + "\r\n")
- if len(config.Protocol) > 0 {
- bw.WriteString("Sec-WebSocket-Protocol: " + strings.Join(config.Protocol, ", ") + "\r\n")
- }
- // TODO(ukai): send Sec-WebSocket-Extensions.
- err = config.Header.WriteSubset(bw, handshakeHeader)
- if err != nil {
- return err
- }
-
- bw.WriteString("\r\n")
- if err = bw.Flush(); err != nil {
- return err
- }
-
- resp, err := http.ReadResponse(br, &http.Request{Method: "GET"})
- if err != nil {
- return err
- }
- if resp.StatusCode != 101 {
- return ErrBadStatus
- }
- if strings.ToLower(resp.Header.Get("Upgrade")) != "websocket" ||
- strings.ToLower(resp.Header.Get("Connection")) != "upgrade" {
- return ErrBadUpgrade
- }
- expectedAccept, err := getNonceAccept(nonce)
- if err != nil {
- return err
- }
- if resp.Header.Get("Sec-WebSocket-Accept") != string(expectedAccept) {
- return ErrChallengeResponse
- }
- if resp.Header.Get("Sec-WebSocket-Extensions") != "" {
- return ErrUnsupportedExtensions
- }
- offeredProtocol := resp.Header.Get("Sec-WebSocket-Protocol")
- if offeredProtocol != "" {
- protocolMatched := false
- for i := 0; i < len(config.Protocol); i++ {
- if config.Protocol[i] == offeredProtocol {
- protocolMatched = true
- break
- }
- }
- if !protocolMatched {
- return ErrBadWebSocketProtocol
- }
- config.Protocol = []string{offeredProtocol}
- }
-
- return nil
-}
-
-// newHybiClientConn creates a client WebSocket connection after handshake.
-func newHybiClientConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser) *Conn {
- return newHybiConn(config, buf, rwc, nil)
-}
-
-// A HybiServerHandshaker performs a server handshake using hybi draft protocol.
-type hybiServerHandshaker struct {
- *Config
- accept []byte
-}
-
-func (c *hybiServerHandshaker) ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error) {
- c.Version = ProtocolVersionHybi13
- if req.Method != "GET" {
- return http.StatusMethodNotAllowed, ErrBadRequestMethod
- }
- // HTTP version can be safely ignored.
-
- if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" ||
- !strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") {
- return http.StatusBadRequest, ErrNotWebSocket
- }
-
- key := req.Header.Get("Sec-Websocket-Key")
- if key == "" {
- return http.StatusBadRequest, ErrChallengeResponse
- }
- version := req.Header.Get("Sec-Websocket-Version")
- switch version {
- case "13":
- c.Version = ProtocolVersionHybi13
- default:
- return http.StatusBadRequest, ErrBadWebSocketVersion
- }
- var scheme string
- if req.TLS != nil {
- scheme = "wss"
- } else {
- scheme = "ws"
- }
- c.Location, err = url.ParseRequestURI(scheme + "://" + req.Host + req.URL.RequestURI())
- if err != nil {
- return http.StatusBadRequest, err
- }
- protocol := strings.TrimSpace(req.Header.Get("Sec-Websocket-Protocol"))
- if protocol != "" {
- protocols := strings.Split(protocol, ",")
- for i := 0; i < len(protocols); i++ {
- c.Protocol = append(c.Protocol, strings.TrimSpace(protocols[i]))
- }
- }
- c.accept, err = getNonceAccept([]byte(key))
- if err != nil {
- return http.StatusInternalServerError, err
- }
- return http.StatusSwitchingProtocols, nil
-}
-
-// Origin parses the Origin header in req.
-// If the Origin header is not set, it returns nil and nil.
-func Origin(config *Config, req *http.Request) (*url.URL, error) {
- var origin string
- switch config.Version {
- case ProtocolVersionHybi13:
- origin = req.Header.Get("Origin")
- }
- if origin == "" {
- return nil, nil
- }
- return url.ParseRequestURI(origin)
-}
-
-func (c *hybiServerHandshaker) AcceptHandshake(buf *bufio.Writer) (err error) {
- if len(c.Protocol) > 0 {
- if len(c.Protocol) != 1 {
- // You need choose a Protocol in Handshake func in Server.
- return ErrBadWebSocketProtocol
- }
- }
- buf.WriteString("HTTP/1.1 101 Switching Protocols\r\n")
- buf.WriteString("Upgrade: websocket\r\n")
- buf.WriteString("Connection: Upgrade\r\n")
- buf.WriteString("Sec-WebSocket-Accept: " + string(c.accept) + "\r\n")
- if len(c.Protocol) > 0 {
- buf.WriteString("Sec-WebSocket-Protocol: " + c.Protocol[0] + "\r\n")
- }
- // TODO(ukai): send Sec-WebSocket-Extensions.
- if c.Header != nil {
- err := c.Header.WriteSubset(buf, handshakeHeader)
- if err != nil {
- return err
- }
- }
- buf.WriteString("\r\n")
- return buf.Flush()
-}
-
-func (c *hybiServerHandshaker) NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn {
- return newHybiServerConn(c.Config, buf, rwc, request)
-}
-
-// newHybiServerConn returns a new WebSocket connection speaking hybi draft protocol.
-func newHybiServerConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn {
- return newHybiConn(config, buf, rwc, request)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi_test.go
deleted file mode 100644
index 9504aa2d3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/hybi_test.go
+++ /dev/null
@@ -1,608 +0,0 @@
-// Copyright 2011 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 file.
-
-package websocket
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strings"
- "testing"
-)
-
-// Test the getNonceAccept function with values in
-// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
-func TestSecWebSocketAccept(t *testing.T) {
- nonce := []byte("dGhlIHNhbXBsZSBub25jZQ==")
- expected := []byte("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")
- accept, err := getNonceAccept(nonce)
- if err != nil {
- t.Errorf("getNonceAccept: returned error %v", err)
- return
- }
- if !bytes.Equal(expected, accept) {
- t.Errorf("getNonceAccept: expected %q got %q", expected, accept)
- }
-}
-
-func TestHybiClientHandshake(t *testing.T) {
- type test struct {
- url, host string
- }
- tests := []test{
- {"ws://server.example.com/chat", "server.example.com"},
- {"ws://127.0.0.1/chat", "127.0.0.1"},
- }
- if _, err := url.ParseRequestURI("http://[fe80::1%25lo0]"); err == nil {
- tests = append(tests, test{"ws://[fe80::1%25lo0]/chat", "[fe80::1]"})
- }
-
- for _, tt := range tests {
- var b bytes.Buffer
- bw := bufio.NewWriter(&b)
- br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols
-Upgrade: websocket
-Connection: Upgrade
-Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
-Sec-WebSocket-Protocol: chat
-
-`))
- var err error
- var config Config
- config.Location, err = url.ParseRequestURI(tt.url)
- if err != nil {
- t.Fatal("location url", err)
- }
- config.Origin, err = url.ParseRequestURI("http://example.com")
- if err != nil {
- t.Fatal("origin url", err)
- }
- config.Protocol = append(config.Protocol, "chat")
- config.Protocol = append(config.Protocol, "superchat")
- config.Version = ProtocolVersionHybi13
- config.handshakeData = map[string]string{
- "key": "dGhlIHNhbXBsZSBub25jZQ==",
- }
- if err := hybiClientHandshake(&config, br, bw); err != nil {
- t.Fatal("handshake", err)
- }
- req, err := http.ReadRequest(bufio.NewReader(&b))
- if err != nil {
- t.Fatal("read request", err)
- }
- if req.Method != "GET" {
- t.Errorf("request method expected GET, but got %s", req.Method)
- }
- if req.URL.Path != "/chat" {
- t.Errorf("request path expected /chat, but got %s", req.URL.Path)
- }
- if req.Proto != "HTTP/1.1" {
- t.Errorf("request proto expected HTTP/1.1, but got %s", req.Proto)
- }
- if req.Host != tt.host {
- t.Errorf("request host expected %s, but got %s", tt.host, req.Host)
- }
- var expectedHeader = map[string]string{
- "Connection": "Upgrade",
- "Upgrade": "websocket",
- "Sec-Websocket-Key": config.handshakeData["key"],
- "Origin": config.Origin.String(),
- "Sec-Websocket-Protocol": "chat, superchat",
- "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13),
- }
- for k, v := range expectedHeader {
- if req.Header.Get(k) != v {
- t.Errorf("%s expected %s, but got %v", k, v, req.Header.Get(k))
- }
- }
- }
-}
-
-func TestHybiClientHandshakeWithHeader(t *testing.T) {
- b := bytes.NewBuffer([]byte{})
- bw := bufio.NewWriter(b)
- br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols
-Upgrade: websocket
-Connection: Upgrade
-Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
-Sec-WebSocket-Protocol: chat
-
-`))
- var err error
- config := new(Config)
- config.Location, err = url.ParseRequestURI("ws://server.example.com/chat")
- if err != nil {
- t.Fatal("location url", err)
- }
- config.Origin, err = url.ParseRequestURI("http://example.com")
- if err != nil {
- t.Fatal("origin url", err)
- }
- config.Protocol = append(config.Protocol, "chat")
- config.Protocol = append(config.Protocol, "superchat")
- config.Version = ProtocolVersionHybi13
- config.Header = http.Header(make(map[string][]string))
- config.Header.Add("User-Agent", "test")
-
- config.handshakeData = map[string]string{
- "key": "dGhlIHNhbXBsZSBub25jZQ==",
- }
- err = hybiClientHandshake(config, br, bw)
- if err != nil {
- t.Errorf("handshake failed: %v", err)
- }
- req, err := http.ReadRequest(bufio.NewReader(b))
- if err != nil {
- t.Fatalf("read request: %v", err)
- }
- if req.Method != "GET" {
- t.Errorf("request method expected GET, but got %q", req.Method)
- }
- if req.URL.Path != "/chat" {
- t.Errorf("request path expected /chat, but got %q", req.URL.Path)
- }
- if req.Proto != "HTTP/1.1" {
- t.Errorf("request proto expected HTTP/1.1, but got %q", req.Proto)
- }
- if req.Host != "server.example.com" {
- t.Errorf("request Host expected server.example.com, but got %v", req.Host)
- }
- var expectedHeader = map[string]string{
- "Connection": "Upgrade",
- "Upgrade": "websocket",
- "Sec-Websocket-Key": config.handshakeData["key"],
- "Origin": config.Origin.String(),
- "Sec-Websocket-Protocol": "chat, superchat",
- "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13),
- "User-Agent": "test",
- }
- for k, v := range expectedHeader {
- if req.Header.Get(k) != v {
- t.Errorf(fmt.Sprintf("%s expected %q but got %q", k, v, req.Header.Get(k)))
- }
- }
-}
-
-func TestHybiServerHandshake(t *testing.T) {
- config := new(Config)
- handshaker := &hybiServerHandshaker{Config: config}
- br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1
-Host: server.example.com
-Upgrade: websocket
-Connection: Upgrade
-Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
-Origin: http://example.com
-Sec-WebSocket-Protocol: chat, superchat
-Sec-WebSocket-Version: 13
-
-`))
- req, err := http.ReadRequest(br)
- if err != nil {
- t.Fatal("request", err)
- }
- code, err := handshaker.ReadHandshake(br, req)
- if err != nil {
- t.Errorf("handshake failed: %v", err)
- }
- if code != http.StatusSwitchingProtocols {
- t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code)
- }
- expectedProtocols := []string{"chat", "superchat"}
- if fmt.Sprintf("%v", config.Protocol) != fmt.Sprintf("%v", expectedProtocols) {
- t.Errorf("protocol expected %q but got %q", expectedProtocols, config.Protocol)
- }
- b := bytes.NewBuffer([]byte{})
- bw := bufio.NewWriter(b)
-
- config.Protocol = config.Protocol[:1]
-
- err = handshaker.AcceptHandshake(bw)
- if err != nil {
- t.Errorf("handshake response failed: %v", err)
- }
- expectedResponse := strings.Join([]string{
- "HTTP/1.1 101 Switching Protocols",
- "Upgrade: websocket",
- "Connection: Upgrade",
- "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=",
- "Sec-WebSocket-Protocol: chat",
- "", ""}, "\r\n")
-
- if b.String() != expectedResponse {
- t.Errorf("handshake expected %q but got %q", expectedResponse, b.String())
- }
-}
-
-func TestHybiServerHandshakeNoSubProtocol(t *testing.T) {
- config := new(Config)
- handshaker := &hybiServerHandshaker{Config: config}
- br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1
-Host: server.example.com
-Upgrade: websocket
-Connection: Upgrade
-Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
-Origin: http://example.com
-Sec-WebSocket-Version: 13
-
-`))
- req, err := http.ReadRequest(br)
- if err != nil {
- t.Fatal("request", err)
- }
- code, err := handshaker.ReadHandshake(br, req)
- if err != nil {
- t.Errorf("handshake failed: %v", err)
- }
- if code != http.StatusSwitchingProtocols {
- t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code)
- }
- if len(config.Protocol) != 0 {
- t.Errorf("len(config.Protocol) expected 0, but got %q", len(config.Protocol))
- }
- b := bytes.NewBuffer([]byte{})
- bw := bufio.NewWriter(b)
-
- err = handshaker.AcceptHandshake(bw)
- if err != nil {
- t.Errorf("handshake response failed: %v", err)
- }
- expectedResponse := strings.Join([]string{
- "HTTP/1.1 101 Switching Protocols",
- "Upgrade: websocket",
- "Connection: Upgrade",
- "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=",
- "", ""}, "\r\n")
-
- if b.String() != expectedResponse {
- t.Errorf("handshake expected %q but got %q", expectedResponse, b.String())
- }
-}
-
-func TestHybiServerHandshakeHybiBadVersion(t *testing.T) {
- config := new(Config)
- handshaker := &hybiServerHandshaker{Config: config}
- br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1
-Host: server.example.com
-Upgrade: websocket
-Connection: Upgrade
-Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
-Sec-WebSocket-Origin: http://example.com
-Sec-WebSocket-Protocol: chat, superchat
-Sec-WebSocket-Version: 9
-
-`))
- req, err := http.ReadRequest(br)
- if err != nil {
- t.Fatal("request", err)
- }
- code, err := handshaker.ReadHandshake(br, req)
- if err != ErrBadWebSocketVersion {
- t.Errorf("handshake expected err %q but got %q", ErrBadWebSocketVersion, err)
- }
- if code != http.StatusBadRequest {
- t.Errorf("status expected %q but got %q", http.StatusBadRequest, code)
- }
-}
-
-func testHybiFrame(t *testing.T, testHeader, testPayload, testMaskedPayload []byte, frameHeader *hybiFrameHeader) {
- b := bytes.NewBuffer([]byte{})
- frameWriterFactory := &hybiFrameWriterFactory{bufio.NewWriter(b), false}
- w, _ := frameWriterFactory.NewFrameWriter(TextFrame)
- w.(*hybiFrameWriter).header = frameHeader
- _, err := w.Write(testPayload)
- w.Close()
- if err != nil {
- t.Errorf("Write error %q", err)
- }
- var expectedFrame []byte
- expectedFrame = append(expectedFrame, testHeader...)
- expectedFrame = append(expectedFrame, testMaskedPayload...)
- if !bytes.Equal(expectedFrame, b.Bytes()) {
- t.Errorf("frame expected %q got %q", expectedFrame, b.Bytes())
- }
- frameReaderFactory := &hybiFrameReaderFactory{bufio.NewReader(b)}
- r, err := frameReaderFactory.NewFrameReader()
- if err != nil {
- t.Errorf("Read error %q", err)
- }
- if header := r.HeaderReader(); header == nil {
- t.Errorf("no header")
- } else {
- actualHeader := make([]byte, r.Len())
- n, err := header.Read(actualHeader)
- if err != nil {
- t.Errorf("Read header error %q", err)
- } else {
- if n < len(testHeader) {
- t.Errorf("header too short %q got %q", testHeader, actualHeader[:n])
- }
- if !bytes.Equal(testHeader, actualHeader[:n]) {
- t.Errorf("header expected %q got %q", testHeader, actualHeader[:n])
- }
- }
- }
- if trailer := r.TrailerReader(); trailer != nil {
- t.Errorf("unexpected trailer %q", trailer)
- }
- frame := r.(*hybiFrameReader)
- if frameHeader.Fin != frame.header.Fin ||
- frameHeader.OpCode != frame.header.OpCode ||
- len(testPayload) != int(frame.header.Length) {
- t.Errorf("mismatch %v (%d) vs %v", frameHeader, len(testPayload), frame)
- }
- payload := make([]byte, len(testPayload))
- _, err = r.Read(payload)
- if err != nil && err != io.EOF {
- t.Errorf("read %v", err)
- }
- if !bytes.Equal(testPayload, payload) {
- t.Errorf("payload %q vs %q", testPayload, payload)
- }
-}
-
-func TestHybiShortTextFrame(t *testing.T) {
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame}
- payload := []byte("hello")
- testHybiFrame(t, []byte{0x81, 0x05}, payload, payload, frameHeader)
-
- payload = make([]byte, 125)
- testHybiFrame(t, []byte{0x81, 125}, payload, payload, frameHeader)
-}
-
-func TestHybiShortMaskedTextFrame(t *testing.T) {
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame,
- MaskingKey: []byte{0xcc, 0x55, 0x80, 0x20}}
- payload := []byte("hello")
- maskedPayload := []byte{0xa4, 0x30, 0xec, 0x4c, 0xa3}
- header := []byte{0x81, 0x85}
- header = append(header, frameHeader.MaskingKey...)
- testHybiFrame(t, header, payload, maskedPayload, frameHeader)
-}
-
-func TestHybiShortBinaryFrame(t *testing.T) {
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: BinaryFrame}
- payload := []byte("hello")
- testHybiFrame(t, []byte{0x82, 0x05}, payload, payload, frameHeader)
-
- payload = make([]byte, 125)
- testHybiFrame(t, []byte{0x82, 125}, payload, payload, frameHeader)
-}
-
-func TestHybiControlFrame(t *testing.T) {
- payload := []byte("hello")
-
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: PingFrame}
- testHybiFrame(t, []byte{0x89, 0x05}, payload, payload, frameHeader)
-
- frameHeader = &hybiFrameHeader{Fin: true, OpCode: PingFrame}
- testHybiFrame(t, []byte{0x89, 0x00}, nil, nil, frameHeader)
-
- frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame}
- testHybiFrame(t, []byte{0x8A, 0x05}, payload, payload, frameHeader)
-
- frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame}
- testHybiFrame(t, []byte{0x8A, 0x00}, nil, nil, frameHeader)
-
- frameHeader = &hybiFrameHeader{Fin: true, OpCode: CloseFrame}
- payload = []byte{0x03, 0xe8} // 1000
- testHybiFrame(t, []byte{0x88, 0x02}, payload, payload, frameHeader)
-}
-
-func TestHybiLongFrame(t *testing.T) {
- frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame}
- payload := make([]byte, 126)
- testHybiFrame(t, []byte{0x81, 126, 0x00, 126}, payload, payload, frameHeader)
-
- payload = make([]byte, 65535)
- testHybiFrame(t, []byte{0x81, 126, 0xff, 0xff}, payload, payload, frameHeader)
-
- payload = make([]byte, 65536)
- testHybiFrame(t, []byte{0x81, 127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}, payload, payload, frameHeader)
-}
-
-func TestHybiClientRead(t *testing.T) {
- wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o',
- 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping
- 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'}
- br := bufio.NewReader(bytes.NewBuffer(wireData))
- bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
- conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil)
-
- msg := make([]byte, 512)
- n, err := conn.Read(msg)
- if err != nil {
- t.Errorf("read 1st frame, error %q", err)
- }
- if n != 5 {
- t.Errorf("read 1st frame, expect 5, got %d", n)
- }
- if !bytes.Equal(wireData[2:7], msg[:n]) {
- t.Errorf("read 1st frame %v, got %v", wireData[2:7], msg[:n])
- }
- n, err = conn.Read(msg)
- if err != nil {
- t.Errorf("read 2nd frame, error %q", err)
- }
- if n != 5 {
- t.Errorf("read 2nd frame, expect 5, got %d", n)
- }
- if !bytes.Equal(wireData[16:21], msg[:n]) {
- t.Errorf("read 2nd frame %v, got %v", wireData[16:21], msg[:n])
- }
- n, err = conn.Read(msg)
- if err == nil {
- t.Errorf("read not EOF")
- }
- if n != 0 {
- t.Errorf("expect read 0, got %d", n)
- }
-}
-
-func TestHybiShortRead(t *testing.T) {
- wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o',
- 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping
- 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'}
- br := bufio.NewReader(bytes.NewBuffer(wireData))
- bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
- conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil)
-
- step := 0
- pos := 0
- expectedPos := []int{2, 5, 16, 19}
- expectedLen := []int{3, 2, 3, 2}
- for {
- msg := make([]byte, 3)
- n, err := conn.Read(msg)
- if step >= len(expectedPos) {
- if err == nil {
- t.Errorf("read not EOF")
- }
- if n != 0 {
- t.Errorf("expect read 0, got %d", n)
- }
- return
- }
- pos = expectedPos[step]
- endPos := pos + expectedLen[step]
- if err != nil {
- t.Errorf("read from %d, got error %q", pos, err)
- return
- }
- if n != endPos-pos {
- t.Errorf("read from %d, expect %d, got %d", pos, endPos-pos, n)
- }
- if !bytes.Equal(wireData[pos:endPos], msg[:n]) {
- t.Errorf("read from %d, frame %v, got %v", pos, wireData[pos:endPos], msg[:n])
- }
- step++
- }
-}
-
-func TestHybiServerRead(t *testing.T) {
- wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20,
- 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello
- 0x89, 0x85, 0xcc, 0x55, 0x80, 0x20,
- 0xa4, 0x30, 0xec, 0x4c, 0xa3, // ping: hello
- 0x81, 0x85, 0xed, 0x83, 0xb4, 0x24,
- 0x9a, 0xec, 0xc6, 0x48, 0x89, // world
- }
- br := bufio.NewReader(bytes.NewBuffer(wireData))
- bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
- conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request))
-
- expected := [][]byte{[]byte("hello"), []byte("world")}
-
- msg := make([]byte, 512)
- n, err := conn.Read(msg)
- if err != nil {
- t.Errorf("read 1st frame, error %q", err)
- }
- if n != 5 {
- t.Errorf("read 1st frame, expect 5, got %d", n)
- }
- if !bytes.Equal(expected[0], msg[:n]) {
- t.Errorf("read 1st frame %q, got %q", expected[0], msg[:n])
- }
-
- n, err = conn.Read(msg)
- if err != nil {
- t.Errorf("read 2nd frame, error %q", err)
- }
- if n != 5 {
- t.Errorf("read 2nd frame, expect 5, got %d", n)
- }
- if !bytes.Equal(expected[1], msg[:n]) {
- t.Errorf("read 2nd frame %q, got %q", expected[1], msg[:n])
- }
-
- n, err = conn.Read(msg)
- if err == nil {
- t.Errorf("read not EOF")
- }
- if n != 0 {
- t.Errorf("expect read 0, got %d", n)
- }
-}
-
-func TestHybiServerReadWithoutMasking(t *testing.T) {
- wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o'}
- br := bufio.NewReader(bytes.NewBuffer(wireData))
- bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
- conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request))
- // server MUST close the connection upon receiving a non-masked frame.
- msg := make([]byte, 512)
- _, err := conn.Read(msg)
- if err != io.EOF {
- t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err)
- }
-}
-
-func TestHybiClientReadWithMasking(t *testing.T) {
- wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20,
- 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello
- }
- br := bufio.NewReader(bytes.NewBuffer(wireData))
- bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
- conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil)
-
- // client MUST close the connection upon receiving a masked frame.
- msg := make([]byte, 512)
- _, err := conn.Read(msg)
- if err != io.EOF {
- t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err)
- }
-}
-
-// Test the hybiServerHandshaker supports firefox implementation and
-// checks Connection request header include (but it's not necessary
-// equal to) "upgrade"
-func TestHybiServerFirefoxHandshake(t *testing.T) {
- config := new(Config)
- handshaker := &hybiServerHandshaker{Config: config}
- br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1
-Host: server.example.com
-Upgrade: websocket
-Connection: keep-alive, upgrade
-Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
-Origin: http://example.com
-Sec-WebSocket-Protocol: chat, superchat
-Sec-WebSocket-Version: 13
-
-`))
- req, err := http.ReadRequest(br)
- if err != nil {
- t.Fatal("request", err)
- }
- code, err := handshaker.ReadHandshake(br, req)
- if err != nil {
- t.Errorf("handshake failed: %v", err)
- }
- if code != http.StatusSwitchingProtocols {
- t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code)
- }
- b := bytes.NewBuffer([]byte{})
- bw := bufio.NewWriter(b)
-
- config.Protocol = []string{"chat"}
-
- err = handshaker.AcceptHandshake(bw)
- if err != nil {
- t.Errorf("handshake response failed: %v", err)
- }
- expectedResponse := strings.Join([]string{
- "HTTP/1.1 101 Switching Protocols",
- "Upgrade: websocket",
- "Connection: Upgrade",
- "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=",
- "Sec-WebSocket-Protocol: chat",
- "", ""}, "\r\n")
-
- if b.String() != expectedResponse {
- t.Errorf("handshake expected %q but got %q", expectedResponse, b.String())
- }
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/server.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/server.go
deleted file mode 100644
index 0895dea19..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/server.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2009 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 file.
-
-package websocket
-
-import (
- "bufio"
- "fmt"
- "io"
- "net/http"
-)
-
-func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request, config *Config, handshake func(*Config, *http.Request) error) (conn *Conn, err error) {
- var hs serverHandshaker = &hybiServerHandshaker{Config: config}
- code, err := hs.ReadHandshake(buf.Reader, req)
- if err == ErrBadWebSocketVersion {
- fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code))
- fmt.Fprintf(buf, "Sec-WebSocket-Version: %s\r\n", SupportedProtocolVersion)
- buf.WriteString("\r\n")
- buf.WriteString(err.Error())
- buf.Flush()
- return
- }
- if err != nil {
- fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code))
- buf.WriteString("\r\n")
- buf.WriteString(err.Error())
- buf.Flush()
- return
- }
- if handshake != nil {
- err = handshake(config, req)
- if err != nil {
- code = http.StatusForbidden
- fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code))
- buf.WriteString("\r\n")
- buf.Flush()
- return
- }
- }
- err = hs.AcceptHandshake(buf.Writer)
- if err != nil {
- code = http.StatusBadRequest
- fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code))
- buf.WriteString("\r\n")
- buf.Flush()
- return
- }
- conn = hs.NewServerConn(buf, rwc, req)
- return
-}
-
-// Server represents a server of a WebSocket.
-type Server struct {
- // Config is a WebSocket configuration for new WebSocket connection.
- Config
-
- // Handshake is an optional function in WebSocket handshake.
- // For example, you can check, or don't check Origin header.
- // Another example, you can select config.Protocol.
- Handshake func(*Config, *http.Request) error
-
- // Handler handles a WebSocket connection.
- Handler
-}
-
-// ServeHTTP implements the http.Handler interface for a WebSocket
-func (s Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- s.serveWebSocket(w, req)
-}
-
-func (s Server) serveWebSocket(w http.ResponseWriter, req *http.Request) {
- rwc, buf, err := w.(http.Hijacker).Hijack()
- if err != nil {
- panic("Hijack failed: " + err.Error())
- }
- // The server should abort the WebSocket connection if it finds
- // the client did not send a handshake that matches with protocol
- // specification.
- defer rwc.Close()
- conn, err := newServerConn(rwc, buf, req, &s.Config, s.Handshake)
- if err != nil {
- return
- }
- if conn == nil {
- panic("unexpected nil conn")
- }
- s.Handler(conn)
-}
-
-// Handler is a simple interface to a WebSocket browser client.
-// It checks if Origin header is valid URL by default.
-// You might want to verify websocket.Conn.Config().Origin in the func.
-// If you use Server instead of Handler, you could call websocket.Origin and
-// check the origin in your Handshake func. So, if you want to accept
-// non-browser clients, which do not send an Origin header, set a
-// Server.Handshake that does not check the origin.
-type Handler func(*Conn)
-
-func checkOrigin(config *Config, req *http.Request) (err error) {
- config.Origin, err = Origin(config, req)
- if err == nil && config.Origin == nil {
- return fmt.Errorf("null origin")
- }
- return err
-}
-
-// ServeHTTP implements the http.Handler interface for a WebSocket
-func (h Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- s := Server{Handler: h, Handshake: checkOrigin}
- s.serveWebSocket(w, req)
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket.go
deleted file mode 100644
index e242c89a7..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket.go
+++ /dev/null
@@ -1,448 +0,0 @@
-// Copyright 2009 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 file.
-
-// Package websocket implements a client and server for the WebSocket protocol
-// as specified in RFC 6455.
-//
-// This package currently lacks some features found in an alternative
-// and more actively maintained WebSocket package:
-//
-// https://godoc.org/github.com/gorilla/websocket
-//
-package websocket // import "golang.org/x/net/websocket"
-
-import (
- "bufio"
- "crypto/tls"
- "encoding/json"
- "errors"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "net/url"
- "sync"
- "time"
-)
-
-const (
- ProtocolVersionHybi13 = 13
- ProtocolVersionHybi = ProtocolVersionHybi13
- SupportedProtocolVersion = "13"
-
- ContinuationFrame = 0
- TextFrame = 1
- BinaryFrame = 2
- CloseFrame = 8
- PingFrame = 9
- PongFrame = 10
- UnknownFrame = 255
-
- DefaultMaxPayloadBytes = 32 << 20 // 32MB
-)
-
-// ProtocolError represents WebSocket protocol errors.
-type ProtocolError struct {
- ErrorString string
-}
-
-func (err *ProtocolError) Error() string { return err.ErrorString }
-
-var (
- ErrBadProtocolVersion = &ProtocolError{"bad protocol version"}
- ErrBadScheme = &ProtocolError{"bad scheme"}
- ErrBadStatus = &ProtocolError{"bad status"}
- ErrBadUpgrade = &ProtocolError{"missing or bad upgrade"}
- ErrBadWebSocketOrigin = &ProtocolError{"missing or bad WebSocket-Origin"}
- ErrBadWebSocketLocation = &ProtocolError{"missing or bad WebSocket-Location"}
- ErrBadWebSocketProtocol = &ProtocolError{"missing or bad WebSocket-Protocol"}
- ErrBadWebSocketVersion = &ProtocolError{"missing or bad WebSocket Version"}
- ErrChallengeResponse = &ProtocolError{"mismatch challenge/response"}
- ErrBadFrame = &ProtocolError{"bad frame"}
- ErrBadFrameBoundary = &ProtocolError{"not on frame boundary"}
- ErrNotWebSocket = &ProtocolError{"not websocket protocol"}
- ErrBadRequestMethod = &ProtocolError{"bad method"}
- ErrNotSupported = &ProtocolError{"not supported"}
-)
-
-// ErrFrameTooLarge is returned by Codec's Receive method if payload size
-// exceeds limit set by Conn.MaxPayloadBytes
-var ErrFrameTooLarge = errors.New("websocket: frame payload size exceeds limit")
-
-// Addr is an implementation of net.Addr for WebSocket.
-type Addr struct {
- *url.URL
-}
-
-// Network returns the network type for a WebSocket, "websocket".
-func (addr *Addr) Network() string { return "websocket" }
-
-// Config is a WebSocket configuration
-type Config struct {
- // A WebSocket server address.
- Location *url.URL
-
- // A Websocket client origin.
- Origin *url.URL
-
- // WebSocket subprotocols.
- Protocol []string
-
- // WebSocket protocol version.
- Version int
-
- // TLS config for secure WebSocket (wss).
- TlsConfig *tls.Config
-
- // Additional header fields to be sent in WebSocket opening handshake.
- Header http.Header
-
- // Dialer used when opening websocket connections.
- Dialer *net.Dialer
-
- handshakeData map[string]string
-}
-
-// serverHandshaker is an interface to handle WebSocket server side handshake.
-type serverHandshaker interface {
- // ReadHandshake reads handshake request message from client.
- // Returns http response code and error if any.
- ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error)
-
- // AcceptHandshake accepts the client handshake request and sends
- // handshake response back to client.
- AcceptHandshake(buf *bufio.Writer) (err error)
-
- // NewServerConn creates a new WebSocket connection.
- NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) (conn *Conn)
-}
-
-// frameReader is an interface to read a WebSocket frame.
-type frameReader interface {
- // Reader is to read payload of the frame.
- io.Reader
-
- // PayloadType returns payload type.
- PayloadType() byte
-
- // HeaderReader returns a reader to read header of the frame.
- HeaderReader() io.Reader
-
- // TrailerReader returns a reader to read trailer of the frame.
- // If it returns nil, there is no trailer in the frame.
- TrailerReader() io.Reader
-
- // Len returns total length of the frame, including header and trailer.
- Len() int
-}
-
-// frameReaderFactory is an interface to creates new frame reader.
-type frameReaderFactory interface {
- NewFrameReader() (r frameReader, err error)
-}
-
-// frameWriter is an interface to write a WebSocket frame.
-type frameWriter interface {
- // Writer is to write payload of the frame.
- io.WriteCloser
-}
-
-// frameWriterFactory is an interface to create new frame writer.
-type frameWriterFactory interface {
- NewFrameWriter(payloadType byte) (w frameWriter, err error)
-}
-
-type frameHandler interface {
- HandleFrame(frame frameReader) (r frameReader, err error)
- WriteClose(status int) (err error)
-}
-
-// Conn represents a WebSocket connection.
-//
-// Multiple goroutines may invoke methods on a Conn simultaneously.
-type Conn struct {
- config *Config
- request *http.Request
-
- buf *bufio.ReadWriter
- rwc io.ReadWriteCloser
-
- rio sync.Mutex
- frameReaderFactory
- frameReader
-
- wio sync.Mutex
- frameWriterFactory
-
- frameHandler
- PayloadType byte
- defaultCloseStatus int
-
- // MaxPayloadBytes limits the size of frame payload received over Conn
- // by Codec's Receive method. If zero, DefaultMaxPayloadBytes is used.
- MaxPayloadBytes int
-}
-
-// Read implements the io.Reader interface:
-// it reads data of a frame from the WebSocket connection.
-// if msg is not large enough for the frame data, it fills the msg and next Read
-// will read the rest of the frame data.
-// it reads Text frame or Binary frame.
-func (ws *Conn) Read(msg []byte) (n int, err error) {
- ws.rio.Lock()
- defer ws.rio.Unlock()
-again:
- if ws.frameReader == nil {
- frame, err := ws.frameReaderFactory.NewFrameReader()
- if err != nil {
- return 0, err
- }
- ws.frameReader, err = ws.frameHandler.HandleFrame(frame)
- if err != nil {
- return 0, err
- }
- if ws.frameReader == nil {
- goto again
- }
- }
- n, err = ws.frameReader.Read(msg)
- if err == io.EOF {
- if trailer := ws.frameReader.TrailerReader(); trailer != nil {
- io.Copy(ioutil.Discard, trailer)
- }
- ws.frameReader = nil
- goto again
- }
- return n, err
-}
-
-// Write implements the io.Writer interface:
-// it writes data as a frame to the WebSocket connection.
-func (ws *Conn) Write(msg []byte) (n int, err error) {
- ws.wio.Lock()
- defer ws.wio.Unlock()
- w, err := ws.frameWriterFactory.NewFrameWriter(ws.PayloadType)
- if err != nil {
- return 0, err
- }
- n, err = w.Write(msg)
- w.Close()
- return n, err
-}
-
-// Close implements the io.Closer interface.
-func (ws *Conn) Close() error {
- err := ws.frameHandler.WriteClose(ws.defaultCloseStatus)
- err1 := ws.rwc.Close()
- if err != nil {
- return err
- }
- return err1
-}
-
-func (ws *Conn) IsClientConn() bool { return ws.request == nil }
-func (ws *Conn) IsServerConn() bool { return ws.request != nil }
-
-// LocalAddr returns the WebSocket Origin for the connection for client, or
-// the WebSocket location for server.
-func (ws *Conn) LocalAddr() net.Addr {
- if ws.IsClientConn() {
- return &Addr{ws.config.Origin}
- }
- return &Addr{ws.config.Location}
-}
-
-// RemoteAddr returns the WebSocket location for the connection for client, or
-// the Websocket Origin for server.
-func (ws *Conn) RemoteAddr() net.Addr {
- if ws.IsClientConn() {
- return &Addr{ws.config.Location}
- }
- return &Addr{ws.config.Origin}
-}
-
-var errSetDeadline = errors.New("websocket: cannot set deadline: not using a net.Conn")
-
-// SetDeadline sets the connection's network read & write deadlines.
-func (ws *Conn) SetDeadline(t time.Time) error {
- if conn, ok := ws.rwc.(net.Conn); ok {
- return conn.SetDeadline(t)
- }
- return errSetDeadline
-}
-
-// SetReadDeadline sets the connection's network read deadline.
-func (ws *Conn) SetReadDeadline(t time.Time) error {
- if conn, ok := ws.rwc.(net.Conn); ok {
- return conn.SetReadDeadline(t)
- }
- return errSetDeadline
-}
-
-// SetWriteDeadline sets the connection's network write deadline.
-func (ws *Conn) SetWriteDeadline(t time.Time) error {
- if conn, ok := ws.rwc.(net.Conn); ok {
- return conn.SetWriteDeadline(t)
- }
- return errSetDeadline
-}
-
-// Config returns the WebSocket config.
-func (ws *Conn) Config() *Config { return ws.config }
-
-// Request returns the http request upgraded to the WebSocket.
-// It is nil for client side.
-func (ws *Conn) Request() *http.Request { return ws.request }
-
-// Codec represents a symmetric pair of functions that implement a codec.
-type Codec struct {
- Marshal func(v interface{}) (data []byte, payloadType byte, err error)
- Unmarshal func(data []byte, payloadType byte, v interface{}) (err error)
-}
-
-// Send sends v marshaled by cd.Marshal as single frame to ws.
-func (cd Codec) Send(ws *Conn, v interface{}) (err error) {
- data, payloadType, err := cd.Marshal(v)
- if err != nil {
- return err
- }
- ws.wio.Lock()
- defer ws.wio.Unlock()
- w, err := ws.frameWriterFactory.NewFrameWriter(payloadType)
- if err != nil {
- return err
- }
- _, err = w.Write(data)
- w.Close()
- return err
-}
-
-// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores
-// in v. The whole frame payload is read to an in-memory buffer; max size of
-// payload is defined by ws.MaxPayloadBytes. If frame payload size exceeds
-// limit, ErrFrameTooLarge is returned; in this case frame is not read off wire
-// completely. The next call to Receive would read and discard leftover data of
-// previous oversized frame before processing next frame.
-func (cd Codec) Receive(ws *Conn, v interface{}) (err error) {
- ws.rio.Lock()
- defer ws.rio.Unlock()
- if ws.frameReader != nil {
- _, err = io.Copy(ioutil.Discard, ws.frameReader)
- if err != nil {
- return err
- }
- ws.frameReader = nil
- }
-again:
- frame, err := ws.frameReaderFactory.NewFrameReader()
- if err != nil {
- return err
- }
- frame, err = ws.frameHandler.HandleFrame(frame)
- if err != nil {
- return err
- }
- if frame == nil {
- goto again
- }
- maxPayloadBytes := ws.MaxPayloadBytes
- if maxPayloadBytes == 0 {
- maxPayloadBytes = DefaultMaxPayloadBytes
- }
- if hf, ok := frame.(*hybiFrameReader); ok && hf.header.Length > int64(maxPayloadBytes) {
- // payload size exceeds limit, no need to call Unmarshal
- //
- // set frameReader to current oversized frame so that
- // the next call to this function can drain leftover
- // data before processing the next frame
- ws.frameReader = frame
- return ErrFrameTooLarge
- }
- payloadType := frame.PayloadType()
- data, err := ioutil.ReadAll(frame)
- if err != nil {
- return err
- }
- return cd.Unmarshal(data, payloadType, v)
-}
-
-func marshal(v interface{}) (msg []byte, payloadType byte, err error) {
- switch data := v.(type) {
- case string:
- return []byte(data), TextFrame, nil
- case []byte:
- return data, BinaryFrame, nil
- }
- return nil, UnknownFrame, ErrNotSupported
-}
-
-func unmarshal(msg []byte, payloadType byte, v interface{}) (err error) {
- switch data := v.(type) {
- case *string:
- *data = string(msg)
- return nil
- case *[]byte:
- *data = msg
- return nil
- }
- return ErrNotSupported
-}
-
-/*
-Message is a codec to send/receive text/binary data in a frame on WebSocket connection.
-To send/receive text frame, use string type.
-To send/receive binary frame, use []byte type.
-
-Trivial usage:
-
- import "websocket"
-
- // receive text frame
- var message string
- websocket.Message.Receive(ws, &message)
-
- // send text frame
- message = "hello"
- websocket.Message.Send(ws, message)
-
- // receive binary frame
- var data []byte
- websocket.Message.Receive(ws, &data)
-
- // send binary frame
- data = []byte{0, 1, 2}
- websocket.Message.Send(ws, data)
-
-*/
-var Message = Codec{marshal, unmarshal}
-
-func jsonMarshal(v interface{}) (msg []byte, payloadType byte, err error) {
- msg, err = json.Marshal(v)
- return msg, TextFrame, err
-}
-
-func jsonUnmarshal(msg []byte, payloadType byte, v interface{}) (err error) {
- return json.Unmarshal(msg, v)
-}
-
-/*
-JSON is a codec to send/receive JSON data in a frame from a WebSocket connection.
-
-Trivial usage:
-
- import "websocket"
-
- type T struct {
- Msg string
- Count int
- }
-
- // receive JSON type T
- var data T
- websocket.JSON.Receive(ws, &data)
-
- // send JSON type T
- websocket.JSON.Send(ws, data)
-*/
-var JSON = Codec{jsonMarshal, jsonUnmarshal}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket_test.go
deleted file mode 100644
index 2054ce85a..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/websocket/websocket_test.go
+++ /dev/null
@@ -1,665 +0,0 @@
-// Copyright 2009 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 file.
-
-package websocket
-
-import (
- "bytes"
- "crypto/rand"
- "fmt"
- "io"
- "log"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "reflect"
- "runtime"
- "strings"
- "sync"
- "testing"
- "time"
-)
-
-var serverAddr string
-var once sync.Once
-
-func echoServer(ws *Conn) {
- defer ws.Close()
- io.Copy(ws, ws)
-}
-
-type Count struct {
- S string
- N int
-}
-
-func countServer(ws *Conn) {
- defer ws.Close()
- for {
- var count Count
- err := JSON.Receive(ws, &count)
- if err != nil {
- return
- }
- count.N++
- count.S = strings.Repeat(count.S, count.N)
- err = JSON.Send(ws, count)
- if err != nil {
- return
- }
- }
-}
-
-type testCtrlAndDataHandler struct {
- hybiFrameHandler
-}
-
-func (h *testCtrlAndDataHandler) WritePing(b []byte) (int, error) {
- h.hybiFrameHandler.conn.wio.Lock()
- defer h.hybiFrameHandler.conn.wio.Unlock()
- w, err := h.hybiFrameHandler.conn.frameWriterFactory.NewFrameWriter(PingFrame)
- if err != nil {
- return 0, err
- }
- n, err := w.Write(b)
- w.Close()
- return n, err
-}
-
-func ctrlAndDataServer(ws *Conn) {
- defer ws.Close()
- h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}}
- ws.frameHandler = h
-
- go func() {
- for i := 0; ; i++ {
- var b []byte
- if i%2 != 0 { // with or without payload
- b = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-SERVER", i))
- }
- if _, err := h.WritePing(b); err != nil {
- break
- }
- if _, err := h.WritePong(b); err != nil { // unsolicited pong
- break
- }
- time.Sleep(10 * time.Millisecond)
- }
- }()
-
- b := make([]byte, 128)
- for {
- n, err := ws.Read(b)
- if err != nil {
- break
- }
- if _, err := ws.Write(b[:n]); err != nil {
- break
- }
- }
-}
-
-func subProtocolHandshake(config *Config, req *http.Request) error {
- for _, proto := range config.Protocol {
- if proto == "chat" {
- config.Protocol = []string{proto}
- return nil
- }
- }
- return ErrBadWebSocketProtocol
-}
-
-func subProtoServer(ws *Conn) {
- for _, proto := range ws.Config().Protocol {
- io.WriteString(ws, proto)
- }
-}
-
-func startServer() {
- http.Handle("/echo", Handler(echoServer))
- http.Handle("/count", Handler(countServer))
- http.Handle("/ctrldata", Handler(ctrlAndDataServer))
- subproto := Server{
- Handshake: subProtocolHandshake,
- Handler: Handler(subProtoServer),
- }
- http.Handle("/subproto", subproto)
- server := httptest.NewServer(nil)
- serverAddr = server.Listener.Addr().String()
- log.Print("Test WebSocket server listening on ", serverAddr)
-}
-
-func newConfig(t *testing.T, path string) *Config {
- config, _ := NewConfig(fmt.Sprintf("ws://%s%s", serverAddr, path), "http://localhost")
- return config
-}
-
-func TestEcho(t *testing.T) {
- once.Do(startServer)
-
- // websocket.Dial()
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
- conn, err := NewClient(newConfig(t, "/echo"), client)
- if err != nil {
- t.Errorf("WebSocket handshake error: %v", err)
- return
- }
-
- msg := []byte("hello, world\n")
- if _, err := conn.Write(msg); err != nil {
- t.Errorf("Write: %v", err)
- }
- var actual_msg = make([]byte, 512)
- n, err := conn.Read(actual_msg)
- if err != nil {
- t.Errorf("Read: %v", err)
- }
- actual_msg = actual_msg[0:n]
- if !bytes.Equal(msg, actual_msg) {
- t.Errorf("Echo: expected %q got %q", msg, actual_msg)
- }
- conn.Close()
-}
-
-func TestAddr(t *testing.T) {
- once.Do(startServer)
-
- // websocket.Dial()
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
- conn, err := NewClient(newConfig(t, "/echo"), client)
- if err != nil {
- t.Errorf("WebSocket handshake error: %v", err)
- return
- }
-
- ra := conn.RemoteAddr().String()
- if !strings.HasPrefix(ra, "ws://") || !strings.HasSuffix(ra, "/echo") {
- t.Errorf("Bad remote addr: %v", ra)
- }
- la := conn.LocalAddr().String()
- if !strings.HasPrefix(la, "http://") {
- t.Errorf("Bad local addr: %v", la)
- }
- conn.Close()
-}
-
-func TestCount(t *testing.T) {
- once.Do(startServer)
-
- // websocket.Dial()
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
- conn, err := NewClient(newConfig(t, "/count"), client)
- if err != nil {
- t.Errorf("WebSocket handshake error: %v", err)
- return
- }
-
- var count Count
- count.S = "hello"
- if err := JSON.Send(conn, count); err != nil {
- t.Errorf("Write: %v", err)
- }
- if err := JSON.Receive(conn, &count); err != nil {
- t.Errorf("Read: %v", err)
- }
- if count.N != 1 {
- t.Errorf("count: expected %d got %d", 1, count.N)
- }
- if count.S != "hello" {
- t.Errorf("count: expected %q got %q", "hello", count.S)
- }
- if err := JSON.Send(conn, count); err != nil {
- t.Errorf("Write: %v", err)
- }
- if err := JSON.Receive(conn, &count); err != nil {
- t.Errorf("Read: %v", err)
- }
- if count.N != 2 {
- t.Errorf("count: expected %d got %d", 2, count.N)
- }
- if count.S != "hellohello" {
- t.Errorf("count: expected %q got %q", "hellohello", count.S)
- }
- conn.Close()
-}
-
-func TestWithQuery(t *testing.T) {
- once.Do(startServer)
-
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
-
- config := newConfig(t, "/echo")
- config.Location, err = url.ParseRequestURI(fmt.Sprintf("ws://%s/echo?q=v", serverAddr))
- if err != nil {
- t.Fatal("location url", err)
- }
-
- ws, err := NewClient(config, client)
- if err != nil {
- t.Errorf("WebSocket handshake: %v", err)
- return
- }
- ws.Close()
-}
-
-func testWithProtocol(t *testing.T, subproto []string) (string, error) {
- once.Do(startServer)
-
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
-
- config := newConfig(t, "/subproto")
- config.Protocol = subproto
-
- ws, err := NewClient(config, client)
- if err != nil {
- return "", err
- }
- msg := make([]byte, 16)
- n, err := ws.Read(msg)
- if err != nil {
- return "", err
- }
- ws.Close()
- return string(msg[:n]), nil
-}
-
-func TestWithProtocol(t *testing.T) {
- proto, err := testWithProtocol(t, []string{"chat"})
- if err != nil {
- t.Errorf("SubProto: unexpected error: %v", err)
- }
- if proto != "chat" {
- t.Errorf("SubProto: expected %q, got %q", "chat", proto)
- }
-}
-
-func TestWithTwoProtocol(t *testing.T) {
- proto, err := testWithProtocol(t, []string{"test", "chat"})
- if err != nil {
- t.Errorf("SubProto: unexpected error: %v", err)
- }
- if proto != "chat" {
- t.Errorf("SubProto: expected %q, got %q", "chat", proto)
- }
-}
-
-func TestWithBadProtocol(t *testing.T) {
- _, err := testWithProtocol(t, []string{"test"})
- if err != ErrBadStatus {
- t.Errorf("SubProto: expected %v, got %v", ErrBadStatus, err)
- }
-}
-
-func TestHTTP(t *testing.T) {
- once.Do(startServer)
-
- // If the client did not send a handshake that matches the protocol
- // specification, the server MUST return an HTTP response with an
- // appropriate error code (such as 400 Bad Request)
- resp, err := http.Get(fmt.Sprintf("http://%s/echo", serverAddr))
- if err != nil {
- t.Errorf("Get: error %#v", err)
- return
- }
- if resp == nil {
- t.Error("Get: resp is null")
- return
- }
- if resp.StatusCode != http.StatusBadRequest {
- t.Errorf("Get: expected %q got %q", http.StatusBadRequest, resp.StatusCode)
- }
-}
-
-func TestTrailingSpaces(t *testing.T) {
- // http://code.google.com/p/go/issues/detail?id=955
- // The last runs of this create keys with trailing spaces that should not be
- // generated by the client.
- once.Do(startServer)
- config := newConfig(t, "/echo")
- for i := 0; i < 30; i++ {
- // body
- ws, err := DialConfig(config)
- if err != nil {
- t.Errorf("Dial #%d failed: %v", i, err)
- break
- }
- ws.Close()
- }
-}
-
-func TestDialConfigBadVersion(t *testing.T) {
- once.Do(startServer)
- config := newConfig(t, "/echo")
- config.Version = 1234
-
- _, err := DialConfig(config)
-
- if dialerr, ok := err.(*DialError); ok {
- if dialerr.Err != ErrBadProtocolVersion {
- t.Errorf("dial expected err %q but got %q", ErrBadProtocolVersion, dialerr.Err)
- }
- }
-}
-
-func TestDialConfigWithDialer(t *testing.T) {
- once.Do(startServer)
- config := newConfig(t, "/echo")
- config.Dialer = &net.Dialer{
- Deadline: time.Now().Add(-time.Minute),
- }
- _, err := DialConfig(config)
- dialerr, ok := err.(*DialError)
- if !ok {
- t.Fatalf("DialError expected, got %#v", err)
- }
- neterr, ok := dialerr.Err.(*net.OpError)
- if !ok {
- t.Fatalf("net.OpError error expected, got %#v", dialerr.Err)
- }
- if !neterr.Timeout() {
- t.Fatalf("expected timeout error, got %#v", neterr)
- }
-}
-
-func TestSmallBuffer(t *testing.T) {
- // http://code.google.com/p/go/issues/detail?id=1145
- // Read should be able to handle reading a fragment of a frame.
- once.Do(startServer)
-
- // websocket.Dial()
- client, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
- conn, err := NewClient(newConfig(t, "/echo"), client)
- if err != nil {
- t.Errorf("WebSocket handshake error: %v", err)
- return
- }
-
- msg := []byte("hello, world\n")
- if _, err := conn.Write(msg); err != nil {
- t.Errorf("Write: %v", err)
- }
- var small_msg = make([]byte, 8)
- n, err := conn.Read(small_msg)
- if err != nil {
- t.Errorf("Read: %v", err)
- }
- if !bytes.Equal(msg[:len(small_msg)], small_msg) {
- t.Errorf("Echo: expected %q got %q", msg[:len(small_msg)], small_msg)
- }
- var second_msg = make([]byte, len(msg))
- n, err = conn.Read(second_msg)
- if err != nil {
- t.Errorf("Read: %v", err)
- }
- second_msg = second_msg[0:n]
- if !bytes.Equal(msg[len(small_msg):], second_msg) {
- t.Errorf("Echo: expected %q got %q", msg[len(small_msg):], second_msg)
- }
- conn.Close()
-}
-
-var parseAuthorityTests = []struct {
- in *url.URL
- out string
-}{
- {
- &url.URL{
- Scheme: "ws",
- Host: "www.google.com",
- },
- "www.google.com:80",
- },
- {
- &url.URL{
- Scheme: "wss",
- Host: "www.google.com",
- },
- "www.google.com:443",
- },
- {
- &url.URL{
- Scheme: "ws",
- Host: "www.google.com:80",
- },
- "www.google.com:80",
- },
- {
- &url.URL{
- Scheme: "wss",
- Host: "www.google.com:443",
- },
- "www.google.com:443",
- },
- // some invalid ones for parseAuthority. parseAuthority doesn't
- // concern itself with the scheme unless it actually knows about it
- {
- &url.URL{
- Scheme: "http",
- Host: "www.google.com",
- },
- "www.google.com",
- },
- {
- &url.URL{
- Scheme: "http",
- Host: "www.google.com:80",
- },
- "www.google.com:80",
- },
- {
- &url.URL{
- Scheme: "asdf",
- Host: "127.0.0.1",
- },
- "127.0.0.1",
- },
- {
- &url.URL{
- Scheme: "asdf",
- Host: "www.google.com",
- },
- "www.google.com",
- },
-}
-
-func TestParseAuthority(t *testing.T) {
- for _, tt := range parseAuthorityTests {
- out := parseAuthority(tt.in)
- if out != tt.out {
- t.Errorf("got %v; want %v", out, tt.out)
- }
- }
-}
-
-type closerConn struct {
- net.Conn
- closed int // count of the number of times Close was called
-}
-
-func (c *closerConn) Close() error {
- c.closed++
- return c.Conn.Close()
-}
-
-func TestClose(t *testing.T) {
- if runtime.GOOS == "plan9" {
- t.Skip("see golang.org/issue/11454")
- }
-
- once.Do(startServer)
-
- conn, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal("dialing", err)
- }
-
- cc := closerConn{Conn: conn}
-
- client, err := NewClient(newConfig(t, "/echo"), &cc)
- if err != nil {
- t.Fatalf("WebSocket handshake: %v", err)
- }
-
- // set the deadline to ten minutes ago, which will have expired by the time
- // client.Close sends the close status frame.
- conn.SetDeadline(time.Now().Add(-10 * time.Minute))
-
- if err := client.Close(); err == nil {
- t.Errorf("ws.Close(): expected error, got %v", err)
- }
- if cc.closed < 1 {
- t.Fatalf("ws.Close(): expected underlying ws.rwc.Close to be called > 0 times, got: %v", cc.closed)
- }
-}
-
-var originTests = []struct {
- req *http.Request
- origin *url.URL
-}{
- {
- req: &http.Request{
- Header: http.Header{
- "Origin": []string{"http://www.example.com"},
- },
- },
- origin: &url.URL{
- Scheme: "http",
- Host: "www.example.com",
- },
- },
- {
- req: &http.Request{},
- },
-}
-
-func TestOrigin(t *testing.T) {
- conf := newConfig(t, "/echo")
- conf.Version = ProtocolVersionHybi13
- for i, tt := range originTests {
- origin, err := Origin(conf, tt.req)
- if err != nil {
- t.Error(err)
- continue
- }
- if !reflect.DeepEqual(origin, tt.origin) {
- t.Errorf("#%d: got origin %v; want %v", i, origin, tt.origin)
- continue
- }
- }
-}
-
-func TestCtrlAndData(t *testing.T) {
- once.Do(startServer)
-
- c, err := net.Dial("tcp", serverAddr)
- if err != nil {
- t.Fatal(err)
- }
- ws, err := NewClient(newConfig(t, "/ctrldata"), c)
- if err != nil {
- t.Fatal(err)
- }
- defer ws.Close()
-
- h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}}
- ws.frameHandler = h
-
- b := make([]byte, 128)
- for i := 0; i < 2; i++ {
- data := []byte(fmt.Sprintf("#%d-DATA-FRAME-FROM-CLIENT", i))
- if _, err := ws.Write(data); err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- var ctrl []byte
- if i%2 != 0 { // with or without payload
- ctrl = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-CLIENT", i))
- }
- if _, err := h.WritePing(ctrl); err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- n, err := ws.Read(b)
- if err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- if !bytes.Equal(b[:n], data) {
- t.Fatalf("#%d: got %v; want %v", i, b[:n], data)
- }
- }
-}
-
-func TestCodec_ReceiveLimited(t *testing.T) {
- const limit = 2048
- var payloads [][]byte
- for _, size := range []int{
- 1024,
- 2048,
- 4096, // receive of this message would be interrupted due to limit
- 2048, // this one is to make sure next receive recovers discarding leftovers
- } {
- b := make([]byte, size)
- rand.Read(b)
- payloads = append(payloads, b)
- }
- handlerDone := make(chan struct{})
- limitedHandler := func(ws *Conn) {
- defer close(handlerDone)
- ws.MaxPayloadBytes = limit
- defer ws.Close()
- for i, p := range payloads {
- t.Logf("payload #%d (size %d, exceeds limit: %v)", i, len(p), len(p) > limit)
- var recv []byte
- err := Message.Receive(ws, &recv)
- switch err {
- case nil:
- case ErrFrameTooLarge:
- if len(p) <= limit {
- t.Fatalf("unexpected frame size limit: expected %d bytes of payload having limit at %d", len(p), limit)
- }
- continue
- default:
- t.Fatalf("unexpected error: %v (want either nil or ErrFrameTooLarge)", err)
- }
- if len(recv) > limit {
- t.Fatalf("received %d bytes of payload having limit at %d", len(recv), limit)
- }
- if !bytes.Equal(p, recv) {
- t.Fatalf("received payload differs:\ngot:\t%v\nwant:\t%v", recv, p)
- }
- }
- }
- server := httptest.NewServer(Handler(limitedHandler))
- defer server.CloseClientConnections()
- defer server.Close()
- addr := server.Listener.Addr().String()
- ws, err := Dial("ws://"+addr+"/", "", "http://localhost/")
- if err != nil {
- t.Fatal(err)
- }
- defer ws.Close()
- for i, p := range payloads {
- if err := Message.Send(ws, p); err != nil {
- t.Fatalf("payload #%d (size %d): %v", i, len(p), err)
- }
- }
- <-handlerDone
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf.go
deleted file mode 100644
index bc861e1f3..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2012 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 file.
-
-// Package xsrftoken provides methods for generating and validating secure XSRF tokens.
-package xsrftoken // import "golang.org/x/net/xsrftoken"
-
-import (
- "crypto/hmac"
- "crypto/sha1"
- "crypto/subtle"
- "encoding/base64"
- "fmt"
- "strconv"
- "strings"
- "time"
-)
-
-// Timeout is the duration for which XSRF tokens are valid.
-// It is exported so clients may set cookie timeouts that match generated tokens.
-const Timeout = 24 * time.Hour
-
-// clean sanitizes a string for inclusion in a token by replacing all ":"s.
-func clean(s string) string {
- return strings.Replace(s, ":", "_", -1)
-}
-
-// Generate returns a URL-safe secure XSRF token that expires in 24 hours.
-//
-// key is a secret key for your application; it must be non-empty.
-// userID is an optional unique identifier for the user.
-// actionID is an optional action the user is taking (e.g. POSTing to a particular path).
-func Generate(key, userID, actionID string) string {
- return generateTokenAtTime(key, userID, actionID, time.Now())
-}
-
-// generateTokenAtTime is like Generate, but returns a token that expires 24 hours from now.
-func generateTokenAtTime(key, userID, actionID string, now time.Time) string {
- if len(key) == 0 {
- panic("zero length xsrf secret key")
- }
- // Round time up and convert to milliseconds.
- milliTime := (now.UnixNano() + 1e6 - 1) / 1e6
-
- h := hmac.New(sha1.New, []byte(key))
- fmt.Fprintf(h, "%s:%s:%d", clean(userID), clean(actionID), milliTime)
-
- // Get the padded base64 string then removing the padding.
- tok := string(h.Sum(nil))
- tok = base64.URLEncoding.EncodeToString([]byte(tok))
- tok = strings.TrimRight(tok, "=")
-
- return fmt.Sprintf("%s:%d", tok, milliTime)
-}
-
-// Valid reports whether a token is a valid, unexpired token returned by Generate.
-func Valid(token, key, userID, actionID string) bool {
- return validTokenAtTime(token, key, userID, actionID, time.Now())
-}
-
-// validTokenAtTime reports whether a token is valid at the given time.
-func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool {
- if len(key) == 0 {
- panic("zero length xsrf secret key")
- }
- // Extract the issue time of the token.
- sep := strings.LastIndex(token, ":")
- if sep < 0 {
- return false
- }
- millis, err := strconv.ParseInt(token[sep+1:], 10, 64)
- if err != nil {
- return false
- }
- issueTime := time.Unix(0, millis*1e6)
-
- // Check that the token is not expired.
- if now.Sub(issueTime) >= Timeout {
- return false
- }
-
- // Check that the token is not from the future.
- // Allow 1 minute grace period in case the token is being verified on a
- // machine whose clock is behind the machine that issued the token.
- if issueTime.After(now.Add(1 * time.Minute)) {
- return false
- }
-
- expected := generateTokenAtTime(key, userID, actionID, issueTime)
-
- // Check that the token matches the expected value.
- // Use constant time comparison to avoid timing attacks.
- return subtle.ConstantTimeCompare([]byte(token), []byte(expected)) == 1
-}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf_test.go b/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf_test.go
deleted file mode 100644
index 6c8e7d9b5..000000000
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/net/xsrftoken/xsrf_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2012 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 file.
-
-package xsrftoken
-
-import (
- "encoding/base64"
- "testing"
- "time"
-)
-
-const (
- key = "quay"
- userID = "12345678"
- actionID = "POST /form"
-)
-
-var (
- now = time.Now()
- oneMinuteFromNow = now.Add(1 * time.Minute)
-)
-
-func TestValidToken(t *testing.T) {
- tok := generateTokenAtTime(key, userID, actionID, now)
- if !validTokenAtTime(tok, key, userID, actionID, oneMinuteFromNow) {
- t.Error("One second later: Expected token to be valid")
- }
- if !validTokenAtTime(tok, key, userID, actionID, now.Add(Timeout-1*time.Nanosecond)) {
- t.Error("Just before timeout: Expected token to be valid")
- }
- if !validTokenAtTime(tok, key, userID, actionID, now.Add(-1*time.Minute+1*time.Millisecond)) {
- t.Error("One minute in the past: Expected token to be valid")
- }
-}
-
-// TestSeparatorReplacement tests that separators are being correctly substituted
-func TestSeparatorReplacement(t *testing.T) {
- tok := generateTokenAtTime("foo:bar", "baz", "wah", now)
- tok2 := generateTokenAtTime("foo", "bar:baz", "wah", now)
- if tok == tok2 {
- t.Errorf("Expected generated tokens to be different")
- }
-}
-
-func TestInvalidToken(t *testing.T) {
- invalidTokenTests := []struct {
- name, key, userID, actionID string
- t time.Time
- }{
- {"Bad key", "foobar", userID, actionID, oneMinuteFromNow},
- {"Bad userID", key, "foobar", actionID, oneMinuteFromNow},
- {"Bad actionID", key, userID, "foobar", oneMinuteFromNow},
- {"Expired", key, userID, actionID, now.Add(Timeout + 1*time.Millisecond)},
- {"More than 1 minute from the future", key, userID, actionID, now.Add(-1*time.Nanosecond - 1*time.Minute)},
- }
-
- tok := generateTokenAtTime(key, userID, actionID, now)
- for _, itt := range invalidTokenTests {
- if validTokenAtTime(tok, itt.key, itt.userID, itt.actionID, itt.t) {
- t.Errorf("%v: Expected token to be invalid", itt.name)
- }
- }
-}
-
-// TestValidateBadData primarily tests that no unexpected panics are triggered
-// during parsing
-func TestValidateBadData(t *testing.T) {
- badDataTests := []struct {
- name, tok string
- }{
- {"Invalid Base64", "ASDab24(@)$*=="},
- {"No delimiter", base64.URLEncoding.EncodeToString([]byte("foobar12345678"))},
- {"Invalid time", base64.URLEncoding.EncodeToString([]byte("foobar:foobar"))},
- {"Wrong length", "1234" + generateTokenAtTime(key, userID, actionID, now)},
- }
-
- for _, bdt := range badDataTests {
- if validTokenAtTime(bdt.tok, key, userID, actionID, oneMinuteFromNow) {
- t.Errorf("%v: Expected token to be invalid", bdt.name)
- }
- }
-}
diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go
index e41d2b3ca..e746fee5b 100644
--- a/vendor/github.com/miekg/dns/version.go
+++ b/vendor/github.com/miekg/dns/version.go
@@ -3,7 +3,7 @@ package dns
import "fmt"
// Version is current version of this library.
-var Version = V{1, 0, 4}
+var Version = V{1, 0, 5}
// V holds the version of this library.
type V struct {
diff --git a/vendor/github.com/miekg/dns/version_test.go b/vendor/github.com/miekg/dns/version_test.go
deleted file mode 100644
index 61c404848..000000000
--- a/vendor/github.com/miekg/dns/version_test.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package dns
-
-import "testing"
-
-func TestVersion(t *testing.T) {
- v := V{1, 0, 0}
- if x := v.String(); x != "1.0.0" {
- t.Fatalf("Failed to convert version %v, got: %s", v, x)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/api-compose-object_test.go b/vendor/github.com/minio/minio-go/api-compose-object_test.go
deleted file mode 100644
index 0f22a960b..000000000
--- a/vendor/github.com/minio/minio-go/api-compose-object_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-package minio
-
-import (
- "reflect"
- "testing"
-)
-
-const (
- gb1 = 1024 * 1024 * 1024
- gb5 = 5 * gb1
- gb5p1 = gb5 + 1
- gb10p1 = 2*gb5 + 1
- gb10p2 = 2*gb5 + 2
-)
-
-func TestPartsRequired(t *testing.T) {
- testCases := []struct {
- size, ref int64
- }{
- {0, 0},
- {1, 1},
- {gb5, 1},
- {2 * gb5, 2},
- {gb10p1, 3},
- {gb10p2, 3},
- }
-
- for i, testCase := range testCases {
- res := partsRequired(testCase.size)
- if res != testCase.ref {
- t.Errorf("Test %d - output did not match with reference results", i+1)
- }
- }
-}
-
-func TestCalculateEvenSplits(t *testing.T) {
-
- testCases := []struct {
- // input size and source object
- size int64
- src SourceInfo
-
- // output part-indexes
- starts, ends []int64
- }{
- {0, SourceInfo{start: -1}, nil, nil},
- {1, SourceInfo{start: -1}, []int64{0}, []int64{0}},
- {1, SourceInfo{start: 0}, []int64{0}, []int64{0}},
-
- {gb1, SourceInfo{start: -1}, []int64{0}, []int64{gb1 - 1}},
- {gb5, SourceInfo{start: -1}, []int64{0}, []int64{gb5 - 1}},
-
- // 2 part splits
- {gb5p1, SourceInfo{start: -1}, []int64{0, gb5/2 + 1}, []int64{gb5 / 2, gb5}},
- {gb5p1, SourceInfo{start: -1}, []int64{0, gb5/2 + 1}, []int64{gb5 / 2, gb5}},
-
- // 3 part splits
- {gb10p1, SourceInfo{start: -1},
- []int64{0, gb10p1/3 + 1, 2*gb10p1/3 + 1},
- []int64{gb10p1 / 3, 2 * gb10p1 / 3, gb10p1 - 1}},
-
- {gb10p2, SourceInfo{start: -1},
- []int64{0, gb10p2 / 3, 2 * gb10p2 / 3},
- []int64{gb10p2/3 - 1, 2*gb10p2/3 - 1, gb10p2 - 1}},
- }
-
- for i, testCase := range testCases {
- resStart, resEnd := calculateEvenSplits(testCase.size, testCase.src)
- if !reflect.DeepEqual(testCase.starts, resStart) || !reflect.DeepEqual(testCase.ends, resEnd) {
- t.Errorf("Test %d - output did not match with reference results", i+1)
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/api-error-response_test.go b/vendor/github.com/minio/minio-go/api-error-response_test.go
deleted file mode 100644
index bf10941b4..000000000
--- a/vendor/github.com/minio/minio-go/api-error-response_test.go
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io/ioutil"
- "net/http"
- "reflect"
- "strconv"
- "testing"
-)
-
-// Tests validate the Error generator function for http response with error.
-func TestHttpRespToErrorResponse(t *testing.T) {
- // 'genAPIErrorResponse' generates ErrorResponse for given APIError.
- // provides a encodable populated response values.
- genAPIErrorResponse := func(err APIError, bucketName string) ErrorResponse {
- return ErrorResponse{
- Code: err.Code,
- Message: err.Description,
- BucketName: bucketName,
- }
- }
-
- // Encodes the response headers into XML format.
- encodeErr := func(response ErrorResponse) []byte {
- buf := &bytes.Buffer{}
- buf.WriteString(xml.Header)
- encoder := xml.NewEncoder(buf)
- err := encoder.Encode(response)
- if err != nil {
- t.Fatalf("error encoding response: %v", err)
- }
- return buf.Bytes()
- }
-
- // `createAPIErrorResponse` Mocks XML error response from the server.
- createAPIErrorResponse := func(APIErr APIError, bucketName string) *http.Response {
- // generate error response.
- // response body contains the XML error message.
- resp := &http.Response{}
- errorResponse := genAPIErrorResponse(APIErr, bucketName)
- encodedErrorResponse := encodeErr(errorResponse)
- // write Header.
- resp.StatusCode = APIErr.HTTPStatusCode
- resp.Body = ioutil.NopCloser(bytes.NewBuffer(encodedErrorResponse))
-
- return resp
- }
-
- // 'genErrResponse' contructs error response based http Status Code
- genErrResponse := func(resp *http.Response, code, message, bucketName, objectName string) ErrorResponse {
- errResp := ErrorResponse{
- StatusCode: resp.StatusCode,
- Code: code,
- Message: message,
- BucketName: bucketName,
- Key: objectName,
- RequestID: resp.Header.Get("x-amz-request-id"),
- HostID: resp.Header.Get("x-amz-id-2"),
- Region: resp.Header.Get("x-amz-bucket-region"),
- Headers: resp.Header,
- }
- return errResp
- }
-
- // Generate invalid argument error.
- genInvalidError := func(message string) error {
- errResp := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "InvalidArgument",
- Message: message,
- RequestID: "minio",
- }
- return errResp
- }
-
- // Set common http response headers.
- setCommonHeaders := func(resp *http.Response) *http.Response {
- // set headers.
- resp.Header = make(http.Header)
- resp.Header.Set("x-amz-request-id", "xyz")
- resp.Header.Set("x-amz-id-2", "abc")
- resp.Header.Set("x-amz-bucket-region", "us-east-1")
- return resp
- }
-
- // Generate http response with empty body.
- // Set the StatusCode to the argument supplied.
- // Sets common headers.
- genEmptyBodyResponse := func(statusCode int) *http.Response {
- resp := &http.Response{
- StatusCode: statusCode,
- Body: ioutil.NopCloser(bytes.NewReader(nil)),
- }
- setCommonHeaders(resp)
- return resp
- }
-
- // Decode XML error message from the http response body.
- decodeXMLError := func(resp *http.Response) error {
- errResp := ErrorResponse{
- StatusCode: resp.StatusCode,
- }
- err := xmlDecoder(resp.Body, &errResp)
- if err != nil {
- t.Fatalf("XML decoding of response body failed: %v", err)
- }
- return errResp
- }
-
- // List of APIErrors used to generate/mock server side XML error response.
- APIErrors := []APIError{
- {
- Code: "NoSuchBucketPolicy",
- Description: "The specified bucket does not have a bucket policy.",
- HTTPStatusCode: http.StatusNotFound,
- },
- }
-
- // List of expected response.
- // Used for asserting the actual response.
- expectedErrResponse := []error{
- genInvalidError("Response is empty. " + "Please report this issue at https://github.com/minio/minio-go/issues."),
- decodeXMLError(createAPIErrorResponse(APIErrors[0], "minio-bucket")),
- genErrResponse(setCommonHeaders(&http.Response{StatusCode: http.StatusNotFound}), "NoSuchBucket", "The specified bucket does not exist.", "minio-bucket", ""),
- genErrResponse(setCommonHeaders(&http.Response{StatusCode: http.StatusNotFound}), "NoSuchKey", "The specified key does not exist.", "minio-bucket", "Asia/"),
- genErrResponse(setCommonHeaders(&http.Response{StatusCode: http.StatusForbidden}), "AccessDenied", "Access Denied.", "minio-bucket", ""),
- genErrResponse(setCommonHeaders(&http.Response{StatusCode: http.StatusConflict}), "Conflict", "Bucket not empty.", "minio-bucket", ""),
- genErrResponse(setCommonHeaders(&http.Response{StatusCode: http.StatusBadRequest}), "Bad Request", "Bad Request", "minio-bucket", ""),
- }
-
- // List of http response to be used as input.
- inputResponses := []*http.Response{
- nil,
- createAPIErrorResponse(APIErrors[0], "minio-bucket"),
- genEmptyBodyResponse(http.StatusNotFound),
- genEmptyBodyResponse(http.StatusNotFound),
- genEmptyBodyResponse(http.StatusForbidden),
- genEmptyBodyResponse(http.StatusConflict),
- genEmptyBodyResponse(http.StatusBadRequest),
- }
-
- testCases := []struct {
- bucketName string
- objectName string
- inputHTTPResp *http.Response
- // expected results.
- expectedResult error
- // flag indicating whether tests should pass.
-
- }{
- {"minio-bucket", "", inputResponses[0], expectedErrResponse[0]},
- {"minio-bucket", "", inputResponses[1], expectedErrResponse[1]},
- {"minio-bucket", "", inputResponses[2], expectedErrResponse[2]},
- {"minio-bucket", "Asia/", inputResponses[3], expectedErrResponse[3]},
- {"minio-bucket", "", inputResponses[4], expectedErrResponse[4]},
- {"minio-bucket", "", inputResponses[5], expectedErrResponse[5]},
- }
-
- for i, testCase := range testCases {
- actualResult := httpRespToErrorResponse(testCase.inputHTTPResp, testCase.bucketName, testCase.objectName)
- if !reflect.DeepEqual(testCase.expectedResult, actualResult) {
- t.Errorf("Test %d: Expected result to be '%#v', but instead got '%#v'", i+1, testCase.expectedResult, actualResult)
- }
- }
-}
-
-// Test validates 'ErrEntityTooLarge' error response.
-func TestErrEntityTooLarge(t *testing.T) {
- msg := fmt.Sprintf("Your proposed upload size ‘%d’ exceeds the maximum allowed object size ‘%d’ for single PUT operation.", 1000000, 99999)
- expectedResult := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "EntityTooLarge",
- Message: msg,
- BucketName: "minio-bucket",
- Key: "Asia/",
- }
- actualResult := ErrEntityTooLarge(1000000, 99999, "minio-bucket", "Asia/")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Test validates 'ErrEntityTooSmall' error response.
-func TestErrEntityTooSmall(t *testing.T) {
- msg := fmt.Sprintf("Your proposed upload size ‘%d’ is below the minimum allowed object size ‘0B’ for single PUT operation.", -1)
- expectedResult := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "EntityTooSmall",
- Message: msg,
- BucketName: "minio-bucket",
- Key: "Asia/",
- }
- actualResult := ErrEntityTooSmall(-1, "minio-bucket", "Asia/")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Test validates 'ErrUnexpectedEOF' error response.
-func TestErrUnexpectedEOF(t *testing.T) {
- msg := fmt.Sprintf("Data read ‘%s’ is not equal to the size ‘%s’ of the input Reader.",
- strconv.FormatInt(100, 10), strconv.FormatInt(101, 10))
- expectedResult := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "UnexpectedEOF",
- Message: msg,
- BucketName: "minio-bucket",
- Key: "Asia/",
- }
- actualResult := ErrUnexpectedEOF(100, 101, "minio-bucket", "Asia/")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Test validates 'ErrInvalidBucketName' error response.
-func TestErrInvalidBucketName(t *testing.T) {
- expectedResult := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "InvalidBucketName",
- Message: "Invalid Bucket name",
- RequestID: "minio",
- }
- actualResult := ErrInvalidBucketName("Invalid Bucket name")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Test validates 'ErrInvalidObjectName' error response.
-func TestErrInvalidObjectName(t *testing.T) {
- expectedResult := ErrorResponse{
- StatusCode: http.StatusNotFound,
- Code: "NoSuchKey",
- Message: "Invalid Object Key",
- RequestID: "minio",
- }
- actualResult := ErrInvalidObjectName("Invalid Object Key")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Test validates 'ErrInvalidArgument' response.
-func TestErrInvalidArgument(t *testing.T) {
- expectedResult := ErrorResponse{
- StatusCode: http.StatusBadRequest,
- Code: "InvalidArgument",
- Message: "Invalid Argument",
- RequestID: "minio",
- }
- actualResult := ErrInvalidArgument("Invalid Argument")
- if !reflect.DeepEqual(expectedResult, actualResult) {
- t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult)
- }
-}
-
-// Tests if the Message field is missing.
-func TestErrWithoutMessage(t *testing.T) {
- errResp := ErrorResponse{
- Code: "AccessDenied",
- RequestID: "minio",
- }
- if errResp.Error() != "Access Denied." {
- t.Errorf("Expected \"Access Denied.\", got %s", errResp)
- }
- errResp = ErrorResponse{
- Code: "InvalidArgument",
- RequestID: "minio",
- }
- if errResp.Error() != "Error response code InvalidArgument." {
- t.Errorf("Expected \"Error response code InvalidArgument.\", got %s", errResp)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/api-put-object_test.go b/vendor/github.com/minio/minio-go/api-put-object_test.go
deleted file mode 100644
index 2b8c1e2bb..000000000
--- a/vendor/github.com/minio/minio-go/api-put-object_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-package minio
-
-import (
- "testing"
-)
-
-func TestPutObjectOptionsValidate(t *testing.T) {
- testCases := []struct {
- name, value string
- shouldPass bool
- }{
- // Invalid cases.
- {"X-Amz-Matdesc", "blah", false},
- {"x-amz-meta-X-Amz-Iv", "blah", false},
- {"x-amz-meta-X-Amz-Key", "blah", false},
- {"x-amz-meta-X-Amz-Matdesc", "blah", false},
- {"It has spaces", "v", false},
- {"It,has@illegal=characters", "v", false},
- {"X-Amz-Iv", "blah", false},
- {"X-Amz-Key", "blah", false},
- {"X-Amz-Key-prefixed-header", "blah", false},
- {"Content-Type", "custom/content-type", false},
- {"content-type", "custom/content-type", false},
- {"Content-Encoding", "gzip", false},
- {"Cache-Control", "blah", false},
- {"Content-Disposition", "something", false},
-
- // Valid metadata names.
- {"my-custom-header", "blah", true},
- {"custom-X-Amz-Key-middle", "blah", true},
- {"my-custom-header-X-Amz-Key", "blah", true},
- {"blah-X-Amz-Matdesc", "blah", true},
- {"X-Amz-MatDesc-suffix", "blah", true},
- {"It-Is-Fine", "v", true},
- {"Numbers-098987987-Should-Work", "v", true},
- {"Crazy-!#$%&'*+-.^_`|~-Should-193832-Be-Fine", "v", true},
- }
- for i, testCase := range testCases {
- err := PutObjectOptions{UserMetadata: map[string]string{
- testCase.name: testCase.value,
- }}.validate()
- if testCase.shouldPass && err != nil {
- t.Errorf("Test %d - output did not match with reference results, %s", i+1, err)
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/api_unit_test.go b/vendor/github.com/minio/minio-go/api_unit_test.go
deleted file mode 100644
index ee0b54f5c..000000000
--- a/vendor/github.com/minio/minio-go/api_unit_test.go
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "net/http"
- "net/url"
- "testing"
-
- "github.com/minio/minio-go/pkg/credentials"
- "github.com/minio/minio-go/pkg/policy"
-)
-
-type customReader struct{}
-
-func (c *customReader) Read(p []byte) (n int, err error) {
- return 0, nil
-}
-
-func (c *customReader) Size() (n int64) {
- return 10
-}
-
-// Tests valid hosts for location.
-func TestValidBucketLocation(t *testing.T) {
- s3Hosts := []struct {
- bucketLocation string
- endpoint string
- }{
- {"us-east-1", "s3.amazonaws.com"},
- {"unknown", "s3.amazonaws.com"},
- {"ap-southeast-1", "s3-ap-southeast-1.amazonaws.com"},
- }
- for _, s3Host := range s3Hosts {
- endpoint := getS3Endpoint(s3Host.bucketLocation)
- if endpoint != s3Host.endpoint {
- t.Fatal("Error: invalid bucket location", endpoint)
- }
- }
-}
-
-// Tests error response structure.
-func TestErrorResponse(t *testing.T) {
- var err error
- err = ErrorResponse{
- Code: "Testing",
- }
- errResp := ToErrorResponse(err)
- if errResp.Code != "Testing" {
- t.Fatal("Type conversion failed, we have an empty struct.")
- }
-
- // Test http response decoding.
- var httpResponse *http.Response
- // Set empty variables
- httpResponse = nil
- var bucketName, objectName string
-
- // Should fail with invalid argument.
- err = httpRespToErrorResponse(httpResponse, bucketName, objectName)
- errResp = ToErrorResponse(err)
- if errResp.Code != "InvalidArgument" {
- t.Fatal("Empty response input should return invalid argument.")
- }
-}
-
-// Tests signature type.
-func TestSignatureType(t *testing.T) {
- clnt := Client{}
- if !clnt.overrideSignerType.IsV4() {
- t.Fatal("Error")
- }
- clnt.overrideSignerType = credentials.SignatureV2
- if !clnt.overrideSignerType.IsV2() {
- t.Fatal("Error")
- }
- if clnt.overrideSignerType.IsV4() {
- t.Fatal("Error")
- }
- clnt.overrideSignerType = credentials.SignatureV4
- if !clnt.overrideSignerType.IsV4() {
- t.Fatal("Error")
- }
-}
-
-// Tests bucket policy types.
-func TestBucketPolicyTypes(t *testing.T) {
- want := map[string]bool{
- "none": true,
- "readonly": true,
- "writeonly": true,
- "readwrite": true,
- "invalid": false,
- }
- for bucketPolicy, ok := range want {
- if policy.BucketPolicy(bucketPolicy).IsValidBucketPolicy() != ok {
- t.Fatal("Error")
- }
- }
-}
-
-// Tests optimal part size.
-func TestPartSize(t *testing.T) {
- _, _, _, err := optimalPartInfo(5000000000000000000)
- if err == nil {
- t.Fatal("Error: should fail")
- }
- totalPartsCount, partSize, lastPartSize, err := optimalPartInfo(5497558138880)
- if err != nil {
- t.Fatal("Error: ", err)
- }
- if totalPartsCount != 9103 {
- t.Fatalf("Error: expecting total parts count of 9987: got %v instead", totalPartsCount)
- }
- if partSize != 603979776 {
- t.Fatalf("Error: expecting part size of 550502400: got %v instead", partSize)
- }
- if lastPartSize != 134217728 {
- t.Fatalf("Error: expecting last part size of 241172480: got %v instead", lastPartSize)
- }
- _, partSize, _, err = optimalPartInfo(5000000000)
- if err != nil {
- t.Fatal("Error:", err)
- }
- if partSize != minPartSize {
- t.Fatalf("Error: expecting part size of %v: got %v instead", minPartSize, partSize)
- }
- totalPartsCount, partSize, lastPartSize, err = optimalPartInfo(-1)
- if err != nil {
- t.Fatal("Error:", err)
- }
- if totalPartsCount != 9103 {
- t.Fatalf("Error: expecting total parts count of 9987: got %v instead", totalPartsCount)
- }
- if partSize != 603979776 {
- t.Fatalf("Error: expecting part size of 550502400: got %v instead", partSize)
- }
- if lastPartSize != 134217728 {
- t.Fatalf("Error: expecting last part size of 241172480: got %v instead", lastPartSize)
- }
-}
-
-// TestMakeTargetURL - testing makeTargetURL()
-func TestMakeTargetURL(t *testing.T) {
- testCases := []struct {
- addr string
- secure bool
- bucketName string
- objectName string
- bucketLocation string
- queryValues map[string][]string
- expectedURL url.URL
- expectedErr error
- }{
- // Test 1
- {"localhost:9000", false, "", "", "", nil, url.URL{Host: "localhost:9000", Scheme: "http", Path: "/"}, nil},
- // Test 2
- {"localhost", true, "", "", "", nil, url.URL{Host: "localhost", Scheme: "https", Path: "/"}, nil},
- // Test 3
- {"localhost:9000", true, "mybucket", "", "", nil, url.URL{Host: "localhost:9000", Scheme: "https", Path: "/mybucket/"}, nil},
- // Test 4, testing against google storage API
- {"storage.googleapis.com", true, "mybucket", "", "", nil, url.URL{Host: "mybucket.storage.googleapis.com", Scheme: "https", Path: "/"}, nil},
- // Test 5, testing against AWS S3 API
- {"s3.amazonaws.com", true, "mybucket", "myobject", "", nil, url.URL{Host: "mybucket.s3.amazonaws.com", Scheme: "https", Path: "/myobject"}, nil},
- // Test 6
- {"localhost:9000", false, "mybucket", "myobject", "", nil, url.URL{Host: "localhost:9000", Scheme: "http", Path: "/mybucket/myobject"}, nil},
- // Test 7, testing with query
- {"localhost:9000", false, "mybucket", "myobject", "", map[string][]string{"param": {"val"}}, url.URL{Host: "localhost:9000", Scheme: "http", Path: "/mybucket/myobject", RawQuery: "param=val"}, nil},
- // Test 8, testing with port 80
- {"localhost:80", false, "mybucket", "myobject", "", nil, url.URL{Host: "localhost", Scheme: "http", Path: "/mybucket/myobject"}, nil},
- // Test 9, testing with port 443
- {"localhost:443", true, "mybucket", "myobject", "", nil, url.URL{Host: "localhost", Scheme: "https", Path: "/mybucket/myobject"}, nil},
- }
-
- for i, testCase := range testCases {
- // Initialize a Minio client
- c, _ := New(testCase.addr, "foo", "bar", testCase.secure)
- u, err := c.makeTargetURL(testCase.bucketName, testCase.objectName, testCase.bucketLocation, testCase.queryValues)
- // Check the returned error
- if testCase.expectedErr == nil && err != nil {
- t.Fatalf("Test %d: Should succeed but failed with err = %v", i+1, err)
- }
- if testCase.expectedErr != nil && err == nil {
- t.Fatalf("Test %d: Should fail but succeeded", i+1)
- }
- if err == nil {
- // Check if the returned url is equal to what we expect
- if u.String() != testCase.expectedURL.String() {
- t.Fatalf("Test %d: Mismatched target url: expected = `%v`, found = `%v`",
- i+1, testCase.expectedURL.String(), u.String())
- }
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/bucket-cache_test.go b/vendor/github.com/minio/minio-go/bucket-cache_test.go
deleted file mode 100644
index fd7e7f344..000000000
--- a/vendor/github.com/minio/minio-go/bucket-cache_test.go
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright
- * 2015, 2016, 2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "bytes"
- "encoding/xml"
- "io/ioutil"
- "net/http"
- "net/url"
- "path"
- "reflect"
- "testing"
-
- "github.com/minio/minio-go/pkg/credentials"
- "github.com/minio/minio-go/pkg/s3signer"
-)
-
-// Test validates `newBucketLocationCache`.
-func TestNewBucketLocationCache(t *testing.T) {
- expectedBucketLocationcache := &bucketLocationCache{
- items: make(map[string]string),
- }
- actualBucketLocationCache := newBucketLocationCache()
-
- if !reflect.DeepEqual(actualBucketLocationCache, expectedBucketLocationcache) {
- t.Errorf("Unexpected return value")
- }
-}
-
-// Tests validate bucketLocationCache operations.
-func TestBucketLocationCacheOps(t *testing.T) {
- testBucketLocationCache := newBucketLocationCache()
- expectedBucketName := "minio-bucket"
- expectedLocation := "us-east-1"
- testBucketLocationCache.Set(expectedBucketName, expectedLocation)
- actualLocation, ok := testBucketLocationCache.Get(expectedBucketName)
- if !ok {
- t.Errorf("Bucket location cache not set")
- }
- if expectedLocation != actualLocation {
- t.Errorf("Bucket location cache not set to expected value")
- }
- testBucketLocationCache.Delete(expectedBucketName)
- _, ok = testBucketLocationCache.Get(expectedBucketName)
- if ok {
- t.Errorf("Bucket location cache not deleted as expected")
- }
-}
-
-// Tests validate http request generation for 'getBucketLocation'.
-func TestGetBucketLocationRequest(t *testing.T) {
- // Generates expected http request for getBucketLocation.
- // Used for asserting with the actual request generated.
- createExpectedRequest := func(c *Client, bucketName string, req *http.Request) (*http.Request, error) {
- // Set location query.
- urlValues := make(url.Values)
- urlValues.Set("location", "")
-
- // Set get bucket location always as path style.
- targetURL := c.endpointURL
- targetURL.Path = path.Join(bucketName, "") + "/"
- targetURL.RawQuery = urlValues.Encode()
-
- // Get a new HTTP request for the method.
- var err error
- req, err = http.NewRequest("GET", targetURL.String(), nil)
- if err != nil {
- return nil, err
- }
-
- // Set UserAgent for the request.
- c.setUserAgent(req)
-
- // Get credentials from the configured credentials provider.
- value, err := c.credsProvider.Get()
- if err != nil {
- return nil, err
- }
-
- var (
- signerType = value.SignerType
- accessKeyID = value.AccessKeyID
- secretAccessKey = value.SecretAccessKey
- sessionToken = value.SessionToken
- )
-
- // Custom signer set then override the behavior.
- if c.overrideSignerType != credentials.SignatureDefault {
- signerType = c.overrideSignerType
- }
-
- // If signerType returned by credentials helper is anonymous,
- // then do not sign regardless of signerType override.
- if value.SignerType == credentials.SignatureAnonymous {
- signerType = credentials.SignatureAnonymous
- }
-
- // Set sha256 sum for signature calculation only
- // with signature version '4'.
- switch {
- case signerType.IsV4():
- contentSha256 := emptySHA256Hex
- if c.secure {
- contentSha256 = unsignedPayload
- }
- req.Header.Set("X-Amz-Content-Sha256", contentSha256)
- req = s3signer.SignV4(*req, accessKeyID, secretAccessKey, sessionToken, "us-east-1")
- case signerType.IsV2():
- req = s3signer.SignV2(*req, accessKeyID, secretAccessKey)
- }
-
- return req, nil
-
- }
- // Info for 'Client' creation.
- // Will be used as arguments for 'NewClient'.
- type infoForClient struct {
- endPoint string
- accessKey string
- secretKey string
- enableInsecure bool
- }
- // dataset for 'NewClient' call.
- info := []infoForClient{
- // endpoint localhost.
- // both access-key and secret-key are empty.
- {"localhost:9000", "", "", false},
- // both access-key are secret-key exists.
- {"localhost:9000", "my-access-key", "my-secret-key", false},
- // one of acess-key and secret-key are empty.
- {"localhost:9000", "", "my-secret-key", false},
-
- // endpoint amazon s3.
- {"s3.amazonaws.com", "", "", false},
- {"s3.amazonaws.com", "my-access-key", "my-secret-key", false},
- {"s3.amazonaws.com", "my-acess-key", "", false},
-
- // endpoint google cloud storage.
- {"storage.googleapis.com", "", "", false},
- {"storage.googleapis.com", "my-access-key", "my-secret-key", false},
- {"storage.googleapis.com", "", "my-secret-key", false},
-
- // endpoint custom domain running Minio server.
- {"play.minio.io", "", "", false},
- {"play.minio.io", "my-access-key", "my-secret-key", false},
- {"play.minio.io", "my-acess-key", "", false},
- }
- testCases := []struct {
- bucketName string
- // data for new client creation.
- info infoForClient
- // error in the output.
- err error
- // flag indicating whether tests should pass.
- shouldPass bool
- }{
- // Client is constructed using the info struct.
- // case with empty location.
- {"my-bucket", info[0], nil, true},
- // case with location set to standard 'us-east-1'.
- {"my-bucket", info[0], nil, true},
- // case with location set to a value different from 'us-east-1'.
- {"my-bucket", info[0], nil, true},
-
- {"my-bucket", info[1], nil, true},
- {"my-bucket", info[1], nil, true},
- {"my-bucket", info[1], nil, true},
-
- {"my-bucket", info[2], nil, true},
- {"my-bucket", info[2], nil, true},
- {"my-bucket", info[2], nil, true},
-
- {"my-bucket", info[3], nil, true},
- {"my-bucket", info[3], nil, true},
- {"my-bucket", info[3], nil, true},
-
- {"my-bucket", info[4], nil, true},
- {"my-bucket", info[4], nil, true},
- {"my-bucket", info[4], nil, true},
-
- {"my-bucket", info[5], nil, true},
- {"my-bucket", info[5], nil, true},
- {"my-bucket", info[5], nil, true},
-
- {"my-bucket", info[6], nil, true},
- {"my-bucket", info[6], nil, true},
- {"my-bucket", info[6], nil, true},
-
- {"my-bucket", info[7], nil, true},
- {"my-bucket", info[7], nil, true},
- {"my-bucket", info[7], nil, true},
-
- {"my-bucket", info[8], nil, true},
- {"my-bucket", info[8], nil, true},
- {"my-bucket", info[8], nil, true},
-
- {"my-bucket", info[9], nil, true},
- {"my-bucket", info[9], nil, true},
- {"my-bucket", info[9], nil, true},
-
- {"my-bucket", info[10], nil, true},
- {"my-bucket", info[10], nil, true},
- {"my-bucket", info[10], nil, true},
-
- {"my-bucket", info[11], nil, true},
- {"my-bucket", info[11], nil, true},
- {"my-bucket", info[11], nil, true},
- }
- for i, testCase := range testCases {
- // cannot create a newclient with empty endPoint value.
- // validates and creates a new client only if the endPoint value is not empty.
- client := &Client{}
- var err error
- if testCase.info.endPoint != "" {
-
- client, err = New(testCase.info.endPoint, testCase.info.accessKey, testCase.info.secretKey, testCase.info.enableInsecure)
- if err != nil {
- t.Fatalf("Test %d: Failed to create new Client: %s", i+1, err.Error())
- }
- }
-
- actualReq, err := client.getBucketLocationRequest(testCase.bucketName)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- // Test passes as expected, but the output values are verified for correctness here.
- if err == nil && testCase.shouldPass {
- expectedReq := &http.Request{}
- expectedReq, err = createExpectedRequest(client, testCase.bucketName, expectedReq)
- if err != nil {
- t.Fatalf("Test %d: Expected request Creation failed", i+1)
- }
- if expectedReq.Method != actualReq.Method {
- t.Errorf("Test %d: The expected Request method doesn't match with the actual one", i+1)
- }
- if expectedReq.URL.String() != actualReq.URL.String() {
- t.Errorf("Test %d: Expected the request URL to be '%s', but instead found '%s'", i+1, expectedReq.URL.String(), actualReq.URL.String())
- }
- if expectedReq.ContentLength != actualReq.ContentLength {
- t.Errorf("Test %d: Expected the request body Content-Length to be '%d', but found '%d' instead", i+1, expectedReq.ContentLength, actualReq.ContentLength)
- }
-
- if expectedReq.Header.Get("X-Amz-Content-Sha256") != actualReq.Header.Get("X-Amz-Content-Sha256") {
- t.Errorf("Test %d: 'X-Amz-Content-Sha256' header of the expected request doesn't match with that of the actual request", i+1)
- }
- if expectedReq.Header.Get("User-Agent") != actualReq.Header.Get("User-Agent") {
- t.Errorf("Test %d: Expected 'User-Agent' header to be \"%s\",but found \"%s\" instead", i+1, expectedReq.Header.Get("User-Agent"), actualReq.Header.Get("User-Agent"))
- }
- }
- }
-}
-
-// generates http response with bucket location set in the body.
-func generateLocationResponse(resp *http.Response, bodyContent []byte) (*http.Response, error) {
- resp.StatusCode = http.StatusOK
- resp.Body = ioutil.NopCloser(bytes.NewBuffer(bodyContent))
- return resp, nil
-}
-
-// Tests the processing of GetPolicy response from server.
-func TestProcessBucketLocationResponse(t *testing.T) {
- // LocationResponse - format for location response.
- type LocationResponse struct {
- XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LocationConstraint" json:"-"`
- Location string `xml:",chardata"`
- }
-
- APIErrors := []APIError{
- {
- Code: "AccessDenied",
- Description: "Access Denied",
- HTTPStatusCode: http.StatusUnauthorized,
- },
- }
- testCases := []struct {
- bucketName string
- inputLocation string
- isAPIError bool
- apiErr APIError
- // expected results.
- expectedResult string
- err error
- // flag indicating whether tests should pass.
- shouldPass bool
- }{
- {"my-bucket", "", true, APIErrors[0], "us-east-1", nil, true},
- {"my-bucket", "", false, APIError{}, "us-east-1", nil, true},
- {"my-bucket", "EU", false, APIError{}, "eu-west-1", nil, true},
- {"my-bucket", "eu-central-1", false, APIError{}, "eu-central-1", nil, true},
- {"my-bucket", "us-east-1", false, APIError{}, "us-east-1", nil, true},
- }
-
- for i, testCase := range testCases {
- inputResponse := &http.Response{}
- var err error
- if testCase.isAPIError {
- inputResponse = generateErrorResponse(inputResponse, testCase.apiErr, testCase.bucketName)
- } else {
- inputResponse, err = generateLocationResponse(inputResponse, encodeResponse(LocationResponse{
- Location: testCase.inputLocation,
- }))
- if err != nil {
- t.Fatalf("Test %d: Creation of valid response failed", i+1)
- }
- }
- actualResult, err := processBucketLocationResponse(inputResponse, "my-bucket")
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
- if err == nil && testCase.shouldPass {
- if !reflect.DeepEqual(testCase.expectedResult, actualResult) {
- t.Errorf("Test %d: The expected BucketPolicy doesn't match the actual BucketPolicy", i+1)
- }
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/core_test.go b/vendor/github.com/minio/minio-go/core_test.go
deleted file mode 100644
index 8cf810465..000000000
--- a/vendor/github.com/minio/minio-go/core_test.go
+++ /dev/null
@@ -1,771 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "bytes"
- "io"
- "log"
- "os"
- "reflect"
- "testing"
- "time"
-
- "math/rand"
-)
-
-const (
- serverEndpoint = "SERVER_ENDPOINT"
- accessKey = "ACCESS_KEY"
- secretKey = "SECRET_KEY"
- enableSecurity = "ENABLE_HTTPS"
-)
-
-// Minimum part size
-const MinPartSize = 1024 * 1024 * 64
-const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569"
-const (
- letterIdxBits = 6 // 6 bits to represent a letter index
- letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits
- letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
-)
-
-// randString generates random names and prepends them with a known prefix.
-func randString(n int, src rand.Source, prefix string) string {
- b := make([]byte, n)
- // A rand.Int63() generates 63 random bits, enough for letterIdxMax letters!
- for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
- if remain == 0 {
- cache, remain = src.Int63(), letterIdxMax
- }
- if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
- b[i] = letterBytes[idx]
- i--
- }
- cache >>= letterIdxBits
- remain--
- }
- return prefix + string(b[0:30-len(prefix)])
-}
-
-// Tests for Core GetObject() function.
-func TestGetObjectCore(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for the short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio core client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable tracing, write to stderr.
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- // Generate data more than 32K
- buf := bytes.Repeat([]byte("3"), rand.Intn(1<<20)+32*1024)
-
- // Save the data
- objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- n, err := c.Client.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), PutObjectOptions{
- ContentType: "binary/octet-stream",
- })
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if n != int64(len(buf)) {
- t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n)
- }
-
- offset := int64(2048)
-
- // read directly
- buf1 := make([]byte, 512)
- buf2 := make([]byte, 512)
- buf3 := make([]byte, n)
- buf4 := make([]byte, 1)
-
- opts := GetObjectOptions{}
- opts.SetRange(offset, offset+int64(len(buf1))-1)
- reader, objectInfo, err := c.GetObject(bucketName, objectName, opts)
- if err != nil {
- t.Fatal(err)
- }
- m, err := io.ReadFull(reader, buf1)
- reader.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if objectInfo.Size != int64(m) {
- t.Fatalf("Error: GetObject read shorter bytes before reaching EOF, want %v, got %v\n", objectInfo.Size, m)
- }
- if !bytes.Equal(buf1, buf[offset:offset+512]) {
- t.Fatal("Error: Incorrect read between two GetObject from same offset.")
- }
- offset += 512
-
- opts.SetRange(offset, offset+int64(len(buf2))-1)
- reader, objectInfo, err = c.GetObject(bucketName, objectName, opts)
- if err != nil {
- t.Fatal(err)
- }
-
- m, err = io.ReadFull(reader, buf2)
- reader.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if objectInfo.Size != int64(m) {
- t.Fatalf("Error: GetObject read shorter bytes before reaching EOF, want %v, got %v\n", objectInfo.Size, m)
- }
- if !bytes.Equal(buf2, buf[offset:offset+512]) {
- t.Fatal("Error: Incorrect read between two GetObject from same offset.")
- }
-
- opts.SetRange(0, int64(len(buf3)))
- reader, objectInfo, err = c.GetObject(bucketName, objectName, opts)
- if err != nil {
- t.Fatal(err)
- }
-
- m, err = io.ReadFull(reader, buf3)
- if err != nil {
- reader.Close()
- t.Fatal(err)
- }
- reader.Close()
-
- if objectInfo.Size != int64(m) {
- t.Fatalf("Error: GetObject read shorter bytes before reaching EOF, want %v, got %v\n", objectInfo.Size, m)
- }
- if !bytes.Equal(buf3, buf) {
- t.Fatal("Error: Incorrect data read in GetObject, than what was previously upoaded.")
- }
-
- opts = GetObjectOptions{}
- opts.SetMatchETag("etag")
- _, _, err = c.GetObject(bucketName, objectName, opts)
- if err == nil {
- t.Fatal("Unexpected GetObject should fail with mismatching etags")
- }
- if errResp := ToErrorResponse(err); errResp.Code != "PreconditionFailed" {
- t.Fatalf("Expected \"PreconditionFailed\" as code, got %s instead", errResp.Code)
- }
-
- opts = GetObjectOptions{}
- opts.SetMatchETagExcept("etag")
- reader, objectInfo, err = c.GetObject(bucketName, objectName, opts)
- if err != nil {
- t.Fatal(err)
- }
-
- m, err = io.ReadFull(reader, buf3)
- reader.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if objectInfo.Size != int64(m) {
- t.Fatalf("Error: GetObject read shorter bytes before reaching EOF, want %v, got %v\n", objectInfo.Size, m)
- }
- if !bytes.Equal(buf3, buf) {
- t.Fatal("Error: Incorrect data read in GetObject, than what was previously upoaded.")
- }
-
- opts = GetObjectOptions{}
- opts.SetRange(0, 0)
- reader, objectInfo, err = c.GetObject(bucketName, objectName, opts)
- if err != nil {
- t.Fatal(err)
- }
-
- m, err = io.ReadFull(reader, buf4)
- reader.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if objectInfo.Size != int64(m) {
- t.Fatalf("Error: GetObject read shorter bytes before reaching EOF, want %v, got %v\n", objectInfo.Size, m)
- }
-
- err = c.RemoveObject(bucketName, objectName)
- if err != nil {
- t.Fatal("Error: ", err)
- }
- err = c.RemoveBucket(bucketName)
- if err != nil {
- t.Fatal("Error:", err)
- }
-}
-
-// Tests GetObject to return Content-Encoding properly set
-// and overrides any auto decoding.
-func TestGetObjectContentEncoding(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for the short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio core client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable tracing, write to stderr.
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- // Generate data more than 32K
- buf := bytes.Repeat([]byte("3"), rand.Intn(1<<20)+32*1024)
-
- // Save the data
- objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- n, err := c.Client.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), PutObjectOptions{
- ContentEncoding: "gzip",
- })
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if n != int64(len(buf)) {
- t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n)
- }
-
- rwc, objInfo, err := c.GetObject(bucketName, objectName, GetObjectOptions{})
- if err != nil {
- t.Fatalf("Error: %v", err)
- }
- rwc.Close()
- if objInfo.Size <= 0 {
- t.Fatalf("Unexpected size of the object %v, expected %v", objInfo.Size, n)
- }
- value, ok := objInfo.Metadata["Content-Encoding"]
- if !ok {
- t.Fatalf("Expected Content-Encoding metadata to be set.")
- }
- if value[0] != "gzip" {
- t.Fatalf("Unexpected content-encoding found, want gzip, got %v", value)
- }
-}
-
-// Tests get bucket policy core API.
-func TestGetBucketPolicy(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable to debug
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- // Verify if bucket exits and you have access.
- var exists bool
- exists, err = c.BucketExists(bucketName)
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
- if !exists {
- t.Fatal("Error: could not find ", bucketName)
- }
-
- // Asserting the default bucket policy.
- bucketPolicy, err := c.GetBucketPolicy(bucketName)
- if err != nil {
- errResp := ToErrorResponse(err)
- if errResp.Code != "NoSuchBucketPolicy" {
- t.Error("Error:", err, bucketName)
- }
- }
- if !reflect.DeepEqual(bucketPolicy, emptyBucketAccessPolicy) {
- t.Errorf("Bucket policy expected %#v, got %#v", emptyBucketAccessPolicy, bucketPolicy)
- }
-
- err = c.RemoveBucket(bucketName)
- if err != nil {
- t.Fatal("Error:", err)
- }
-}
-
-// Tests Core CopyObject API implementation.
-func TestCoreCopyObject(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable tracing, write to stderr.
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- buf := bytes.Repeat([]byte("a"), 32*1024)
-
- // Save the data
- objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- objInfo, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", map[string]string{
- "Content-Type": "binary/octet-stream",
- })
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if objInfo.Size != int64(len(buf)) {
- t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), objInfo.Size)
- }
-
- destBucketName := bucketName
- destObjectName := objectName + "-dest"
-
- cobjInfo, err := c.CopyObject(bucketName, objectName, destBucketName, destObjectName, map[string]string{
- "X-Amz-Metadata-Directive": "REPLACE",
- "Content-Type": "application/javascript",
- })
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName, destBucketName, destObjectName)
- }
- if cobjInfo.ETag != objInfo.ETag {
- t.Fatalf("Error: expected etag to be same as source object %s, but found different etag :%s", objInfo.ETag, cobjInfo.ETag)
- }
-
- // Attempt to read from destBucketName and object name.
- r, err := c.Client.GetObject(destBucketName, destObjectName, GetObjectOptions{})
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- st, err := r.Stat()
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if st.Size != int64(len(buf)) {
- t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n",
- len(buf), st.Size)
- }
-
- if st.ContentType != "application/javascript" {
- t.Fatalf("Error: Content types don't match, expected: application/javascript, found: %+v\n", st.ContentType)
- }
-
- if st.ETag != objInfo.ETag {
- t.Fatalf("Error: expected etag to be same as source object %s, but found different etag :%s", objInfo.ETag, st.ETag)
- }
-
- if err := r.Close(); err != nil {
- t.Fatal("Error:", err)
- }
-
- if err := r.Close(); err == nil {
- t.Fatal("Error: object is already closed, should return error")
- }
-
- err = c.RemoveObject(bucketName, objectName)
- if err != nil {
- t.Fatal("Error: ", err)
- }
-
- err = c.RemoveObject(destBucketName, destObjectName)
- if err != nil {
- t.Fatal("Error: ", err)
- }
-
- err = c.RemoveBucket(bucketName)
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Do not need to remove destBucketName its same as bucketName.
-}
-
-// Test Core CopyObjectPart implementation
-func TestCoreCopyObjectPart(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable tracing, write to stderr.
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- // Make a buffer with 5MB of data
- buf := bytes.Repeat([]byte("abcde"), 1024*1024)
-
- // Save the data
- objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- objInfo, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", map[string]string{
- "Content-Type": "binary/octet-stream",
- })
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if objInfo.Size != int64(len(buf)) {
- t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), objInfo.Size)
- }
-
- destBucketName := bucketName
- destObjectName := objectName + "-dest"
-
- uploadID, err := c.NewMultipartUpload(destBucketName, destObjectName, PutObjectOptions{})
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- // Content of the destination object will be two copies of
- // `objectName` concatenated, followed by first byte of
- // `objectName`.
-
- // First of three parts
- fstPart, err := c.CopyObjectPart(bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, nil)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
-
- // Second of three parts
- sndPart, err := c.CopyObjectPart(bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, nil)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
-
- // Last of three parts
- lstPart, err := c.CopyObjectPart(bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, nil)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
-
- // Complete the multipart upload
- err = c.CompleteMultipartUpload(destBucketName, destObjectName, uploadID, []CompletePart{fstPart, sndPart, lstPart})
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
-
- // Stat the object and check its length matches
- objInfo, err = c.StatObject(destBucketName, destObjectName, StatObjectOptions{})
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
-
- if objInfo.Size != (5*1024*1024)*2+1 {
- t.Fatal("Destination object has incorrect size!")
- }
-
- // Now we read the data back
- getOpts := GetObjectOptions{}
- getOpts.SetRange(0, 5*1024*1024-1)
- r, _, err := c.GetObject(destBucketName, destObjectName, getOpts)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
- getBuf := make([]byte, 5*1024*1024)
- _, err = io.ReadFull(r, getBuf)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
- if !bytes.Equal(getBuf, buf) {
- t.Fatal("Got unexpected data in first 5MB")
- }
-
- getOpts.SetRange(5*1024*1024, 0)
- r, _, err = c.GetObject(destBucketName, destObjectName, getOpts)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
- getBuf = make([]byte, 5*1024*1024+1)
- _, err = io.ReadFull(r, getBuf)
- if err != nil {
- t.Fatal("Error:", err, destBucketName, destObjectName)
- }
- if !bytes.Equal(getBuf[:5*1024*1024], buf) {
- t.Fatal("Got unexpected data in second 5MB")
- }
- if getBuf[5*1024*1024] != buf[0] {
- t.Fatal("Got unexpected data in last byte of copied object!")
- }
-
- if err := c.RemoveObject(destBucketName, destObjectName); err != nil {
- t.Fatal("Error: ", err)
- }
-
- if err := c.RemoveObject(bucketName, objectName); err != nil {
- t.Fatal("Error: ", err)
- }
-
- if err := c.RemoveBucket(bucketName); err != nil {
- t.Fatal("Error: ", err)
- }
-
- // Do not need to remove destBucketName its same as bucketName.
-}
-
-// Test Core PutObject.
-func TestCorePutObject(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for short runs")
- }
-
- // Seed random based on current time.
- rand.Seed(time.Now().Unix())
-
- // Instantiate new minio client object.
- c, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)),
- )
- if err != nil {
- t.Fatal("Error:", err)
- }
-
- // Enable tracing, write to stderr.
- // c.TraceOn(os.Stderr)
-
- // Set user agent.
- c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = c.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- buf := bytes.Repeat([]byte("a"), 32*1024)
-
- // Save the data
- objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- // Object content type
- objectContentType := "binary/octet-stream"
- metadata := make(map[string]string)
- metadata["Content-Type"] = objectContentType
-
- objInfo, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "1B2M2Y8AsgTpgAmY7PhCfg==", "", metadata)
- if err == nil {
- t.Fatal("Error expected: error, got: nil(success)")
- }
-
- objInfo, err = c.PutObject(bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", metadata)
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if objInfo.Size != int64(len(buf)) {
- t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), objInfo.Size)
- }
-
- // Read the data back
- r, err := c.Client.GetObject(bucketName, objectName, GetObjectOptions{})
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- st, err := r.Stat()
- if err != nil {
- t.Fatal("Error:", err, bucketName, objectName)
- }
-
- if st.Size != int64(len(buf)) {
- t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n",
- len(buf), st.Size)
- }
-
- if st.ContentType != objectContentType {
- t.Fatalf("Error: Content types don't match, expected: %+v, found: %+v\n", objectContentType, st.ContentType)
- }
-
- if err := r.Close(); err != nil {
- t.Fatal("Error:", err)
- }
-
- if err := r.Close(); err == nil {
- t.Fatal("Error: object is already closed, should return error")
- }
-
- err = c.RemoveObject(bucketName, objectName)
- if err != nil {
- t.Fatal("Error: ", err)
- }
-
- err = c.RemoveBucket(bucketName)
- if err != nil {
- t.Fatal("Error:", err)
- }
-}
-
-func TestCoreGetObjectMetadata(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping functional tests for the short runs")
- }
-
- core, err := NewCore(
- os.Getenv(serverEndpoint),
- os.Getenv(accessKey),
- os.Getenv(secretKey),
- mustParseBool(os.Getenv(enableSecurity)))
- if err != nil {
- log.Fatalln(err)
- }
-
- // Generate a new random bucket name.
- bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test")
-
- // Make a new bucket.
- err = core.MakeBucket(bucketName, "us-east-1")
- if err != nil {
- t.Fatal("Error:", err, bucketName)
- }
-
- metadata := map[string]string{
- "X-Amz-Meta-Key-1": "Val-1",
- }
-
- _, err = core.PutObject(bucketName, "my-objectname",
- bytes.NewReader([]byte("hello")), 5, "", "", metadata)
- if err != nil {
- log.Fatalln(err)
- }
-
- reader, objInfo, err := core.GetObject(bucketName, "my-objectname", GetObjectOptions{})
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- if objInfo.Metadata.Get("X-Amz-Meta-Key-1") != "Val-1" {
- log.Fatalln("Expected metadata to be available but wasn't")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/docs/API.md b/vendor/github.com/minio/minio-go/docs/API.md
deleted file mode 100644
index cc59375f6..000000000
--- a/vendor/github.com/minio/minio-go/docs/API.md
+++ /dev/null
@@ -1,1831 +0,0 @@
-# Minio Go Client API Reference [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io)
-
-## Initialize Minio Client object.
-
-## Minio
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Use a secure connection.
- ssl := true
-
- // Initialize minio client object.
- minioClient, err := minio.New("play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", ssl)
- if err != nil {
- fmt.Println(err)
- return
- }
-}
-```
-
-## AWS S3
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Use a secure connection.
- ssl := true
-
- // Initialize minio client object.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", ssl)
- if err != nil {
- fmt.Println(err)
- return
- }
-}
-```
-
-| Bucket operations | Object operations | Encrypted Object operations | Presigned operations | Bucket Policy/Notification Operations | Client custom settings |
-| :--- | :--- | :--- | :--- | :--- | :--- |
-| [`MakeBucket`](#MakeBucket) | [`GetObject`](#GetObject) | [`NewSymmetricKey`](#NewSymmetricKey) | [`PresignedGetObject`](#PresignedGetObject) | [`SetBucketPolicy`](#SetBucketPolicy) | [`SetAppInfo`](#SetAppInfo) |
-| [`ListBuckets`](#ListBuckets) | [`PutObject`](#PutObject) | [`NewAsymmetricKey`](#NewAsymmetricKey) | [`PresignedPutObject`](#PresignedPutObject) | [`GetBucketPolicy`](#GetBucketPolicy) | [`SetCustomTransport`](#SetCustomTransport) |
-| [`BucketExists`](#BucketExists) | [`CopyObject`](#CopyObject) | [`GetEncryptedObject`](#GetEncryptedObject) | [`PresignedPostPolicy`](#PresignedPostPolicy) | [`ListBucketPolicies`](#ListBucketPolicies) | [`TraceOn`](#TraceOn) |
-| [`RemoveBucket`](#RemoveBucket) | [`StatObject`](#StatObject) | [`PutEncryptedObject`](#PutEncryptedObject) | | [`SetBucketNotification`](#SetBucketNotification) | [`TraceOff`](#TraceOff) |
-| [`ListObjects`](#ListObjects) | [`RemoveObject`](#RemoveObject) | [`NewSSEInfo`](#NewSSEInfo) | | [`GetBucketNotification`](#GetBucketNotification) | [`SetS3TransferAccelerate`](#SetS3TransferAccelerate) |
-| [`ListObjectsV2`](#ListObjectsV2) | [`RemoveObjects`](#RemoveObjects) | [`FPutEncryptedObject`](#FPutEncryptedObject) | | [`RemoveAllBucketNotification`](#RemoveAllBucketNotification) | |
-| [`ListIncompleteUploads`](#ListIncompleteUploads) | [`RemoveIncompleteUpload`](#RemoveIncompleteUpload) | | | [`ListenBucketNotification`](#ListenBucketNotification) | |
-| | [`FPutObject`](#FPutObject) | | | | |
-| | [`FGetObject`](#FGetObject) | | | | |
-| | [`ComposeObject`](#ComposeObject) | | | | |
-| | [`NewSourceInfo`](#NewSourceInfo) | | | | |
-| | [`NewDestinationInfo`](#NewDestinationInfo) | | | | |
-| | [`PutObjectWithContext`](#PutObjectWithContext) | | | |
-| | [`GetObjectWithContext`](#GetObjectWithContext) | | | |
-| | [`FPutObjectWithContext`](#FPutObjectWithContext) | | | |
-| | [`FGetObjectWithContext`](#FGetObjectWithContext) | | | |
-## 1. Constructor
-<a name="Minio"></a>
-
-### New(endpoint, accessKeyID, secretAccessKey string, ssl bool) (*Client, error)
-Initializes a new client object.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`endpoint` | _string_ |S3 compatible object storage endpoint |
-|`accessKeyID` |_string_ |Access key for the object storage |
-|`secretAccessKey` | _string_ |Secret key for the object storage |
-|`ssl` | _bool_ | If 'true' API requests will be secure (HTTPS), and insecure (HTTP) otherwise |
-
-### NewWithRegion(endpoint, accessKeyID, secretAccessKey string, ssl bool, region string) (*Client, error)
-Initializes minio client, with region configured. Unlike New(), NewWithRegion avoids bucket-location lookup operations and it is slightly faster. Use this function when your application deals with a single region.
-
-### NewWithOptions(endpoint string, options *Options) (*Client, error)
-Initializes minio client with options configured.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`endpoint` | _string_ |S3 compatible object storage endpoint |
-|`opts` |_minio.Options_ | Options for constructing a new client|
-
-__minio.Options__
-
-|Field | Type | Description |
-|:--- |:--- | :--- |
-| `opts.Creds` | _*credentials.Credentials_ | Access Credentials|
-| `opts.Secure` | _bool_ | If 'true' API requests will be secure (HTTPS), and insecure (HTTP) otherwise |
-| `opts.Region` | _string_ | region |
-| `opts.BucketLookup` | _BucketLookupType_ | Bucket lookup type can be one of the following values |
-| | | _minio.BucketLookupDNS_ |
-| | | _minio.BucketLookupPath_ |
-| | | _minio.BucketLookupAuto_ |
-## 2. Bucket operations
-
-<a name="MakeBucket"></a>
-### MakeBucket(bucketName, location string) error
-Creates a new bucket.
-
-__Parameters__
-
-| Param | Type | Description |
-|---|---|---|
-|`bucketName` | _string_ | Name of the bucket |
-| `location` | _string_ | Region where the bucket is to be created. Default value is us-east-1. Other valid values are listed below. Note: When used with minio server, use the region specified in its config file (defaults to us-east-1).|
-| | |us-east-1 |
-| | |us-west-1 |
-| | |us-west-2 |
-| | |eu-west-1 |
-| | | eu-central-1|
-| | | ap-southeast-1|
-| | | ap-northeast-1|
-| | | ap-southeast-2|
-| | | sa-east-1|
-
-
-__Example__
-
-
-```go
-err = minioClient.MakeBucket("mybucket", "us-east-1")
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully created mybucket.")
-```
-
-<a name="ListBuckets"></a>
-### ListBuckets() ([]BucketInfo, error)
-Lists all buckets.
-
-| Param | Type | Description |
-|---|---|---|
-|`bucketList` | _[]minio.BucketInfo_ | Lists of all buckets |
-
-
-__minio.BucketInfo__
-
-| Field | Type | Description |
-|---|---|---|
-|`bucket.Name` | _string_ | Name of the bucket |
-|`bucket.CreationDate` | _time.Time_ | Date of bucket creation |
-
-
-__Example__
-
-
-```go
-buckets, err := minioClient.ListBuckets()
-if err != nil {
- fmt.Println(err)
- return
-}
-for _, bucket := range buckets {
- fmt.Println(bucket)
-}
-```
-
-<a name="BucketExists"></a>
-### BucketExists(bucketName string) (found bool, err error)
-Checks if a bucket exists.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-
-
-__Return Values__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`found` | _bool_ | Indicates whether bucket exists or not |
-|`err` | _error_ | Standard Error |
-
-
-__Example__
-
-
-```go
-found, err := minioClient.BucketExists("mybucket")
-if err != nil {
- fmt.Println(err)
- return
-}
-if found {
- fmt.Println("Bucket found")
-}
-```
-
-<a name="RemoveBucket"></a>
-### RemoveBucket(bucketName string) error
-Removes a bucket, bucket should be empty to be successfully removed.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-
-__Example__
-
-
-```go
-err = minioClient.RemoveBucket("mybucket")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="ListObjects"></a>
-### ListObjects(bucketName, prefix string, recursive bool, doneCh chan struct{}) <-chan ObjectInfo
-Lists objects in a bucket.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectPrefix` |_string_ | Prefix of objects to be listed |
-|`recursive` | _bool_ |`true` indicates recursive style listing and `false` indicates directory style listing delimited by '/'. |
-|`doneCh` | _chan struct{}_ | A message on this channel ends the ListObjects iterator. |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`objectInfo` | _chan minio.ObjectInfo_ |Read channel for all objects in the bucket, the object is of the format listed below: |
-
-__minio.ObjectInfo__
-
-|Field |Type |Description |
-|:---|:---| :---|
-|`objectInfo.Key` | _string_ |Name of the object |
-|`objectInfo.Size` | _int64_ |Size of the object |
-|`objectInfo.ETag` | _string_ |MD5 checksum of the object |
-|`objectInfo.LastModified` | _time.Time_ |Time when object was last modified |
-
-
-```go
-// Create a done channel to control 'ListObjects' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true
-objectCh := minioClient.ListObjects("mybucket", "myprefix", isRecursive, doneCh)
-for object := range objectCh {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
-}
-```
-
-
-<a name="ListObjectsV2"></a>
-### ListObjectsV2(bucketName, prefix string, recursive bool, doneCh chan struct{}) <-chan ObjectInfo
-Lists objects in a bucket using the recommended listing API v2
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-| `objectPrefix` |_string_ | Prefix of objects to be listed |
-| `recursive` | _bool_ |`true` indicates recursive style listing and `false` indicates directory style listing delimited by '/'. |
-|`doneCh` | _chan struct{}_ | A message on this channel ends the ListObjectsV2 iterator. |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`objectInfo` | _chan minio.ObjectInfo_ |Read channel for all the objects in the bucket, the object is of the format listed below: |
-
-
-```go
-// Create a done channel to control 'ListObjectsV2' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true
-objectCh := minioClient.ListObjectsV2("mybucket", "myprefix", isRecursive, doneCh)
-for object := range objectCh {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
-}
-```
-
-<a name="ListIncompleteUploads"></a>
-### ListIncompleteUploads(bucketName, prefix string, recursive bool, doneCh chan struct{}) <- chan ObjectMultipartInfo
-Lists partially uploaded objects in a bucket.
-
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-| `prefix` |_string_ | Prefix of objects that are partially uploaded |
-| `recursive` | _bool_ |`true` indicates recursive style listing and `false` indicates directory style listing delimited by '/'. |
-|`doneCh` | _chan struct{}_ | A message on this channel ends the ListenIncompleteUploads iterator. |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`multiPartInfo` | _chan minio.ObjectMultipartInfo_ |Emits multipart objects of the format listed below: |
-
-__minio.ObjectMultipartInfo__
-
-|Field |Type |Description |
-|:---|:---| :---|
-|`multiPartObjInfo.Key` | _string_ |Name of incompletely uploaded object |
-|`multiPartObjInfo.UploadID` | _string_ |Upload ID of incompletely uploaded object |
-|`multiPartObjInfo.Size` | _int64_ |Size of incompletely uploaded object |
-
-__Example__
-
-
-```go
-// Create a done channel to control 'ListObjects' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true // Recursively list everything at 'myprefix'
-multiPartObjectCh := minioClient.ListIncompleteUploads("mybucket", "myprefix", isRecursive, doneCh)
-for multiPartObject := range multiPartObjectCh {
- if multiPartObject.Err != nil {
- fmt.Println(multiPartObject.Err)
- return
- }
- fmt.Println(multiPartObject)
-}
-```
-
-## 3. Object operations
-
-<a name="GetObject"></a>
-### GetObject(bucketName, objectName string, opts GetObjectOptions) (*Object, error)
-Returns a stream of the object data. Most of the common errors occur when reading the stream.
-
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`opts` | _minio.GetObjectOptions_ | Options for GET requests specifying additional options like encryption, If-Match |
-
-
-__minio.GetObjectOptions__
-
-|Field | Type | Description |
-|:---|:---|:---|
-| `opts.Materials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go) |
-
-__Return Value__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`object` | _*minio.Object_ |_minio.Object_ represents object reader. It implements io.Reader, io.Seeker, io.ReaderAt and io.Closer interfaces. |
-
-
-__Example__
-
-
-```go
-object, err := minioClient.GetObject("mybucket", "myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetObject"></a>
-### FGetObject(bucketName, objectName, filePath string, opts GetObjectOptions) error
-Downloads and saves the object as a file in the local filesystem.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to download object to |
-|`opts` | _minio.GetObjectOptions_ | Options for GET requests specifying additional options like encryption, If-Match |
-
-
-__Example__
-
-
-```go
-err = minioClient.FGetObject("mybucket", "myobject", "/tmp/myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-<a name="GetObjectWithContext"></a>
-### GetObjectWithContext(ctx context.Context, bucketName, objectName string, opts GetObjectOptions) (*Object, error)
-Identical to GetObject operation, but accepts a context for request cancellation.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |Request context |
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`opts` | _minio.GetObjectOptions_ | Options for GET requests specifying additional options like encryption, If-Match |
-
-
-__Return Value__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`object` | _*minio.Object_ |_minio.Object_ represents object reader. It implements io.Reader, io.Seeker, io.ReaderAt and io.Closer interfaces. |
-
-
-__Example__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-object, err := minioClient.GetObjectWithContext(ctx, "mybucket", "myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetObjectWithContext"></a>
-### FGetObjectWithContext(ctx context.Context, bucketName, objectName, filePath string, opts GetObjectOptions) error
-Identical to FGetObject operation, but allows request cancellation.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |Request context |
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to download object to |
-|`opts` | _minio.GetObjectOptions_ | Options for GET requests specifying additional options like encryption, If-Match |
-
-
-__Example__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-err = minioClient.FGetObjectWithContext(ctx, "mybucket", "myobject", "/tmp/myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetEncryptedObject"></a>
-### FGetEncryptedObject(bucketName, objectName, filePath string, materials encrypt.Materials) error
-Identical to FGetObject operation, but decrypts an encrypted request
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to download object to |
-|`materials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go) |
-
-
-__Example__
-
-
-```go
-// Generate a master symmetric key
-key := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-err = minioClient.FGetEncryptedObject("mybucket", "myobject", "/tmp/myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="PutObject"></a>
-### PutObject(bucketName, objectName string, reader io.Reader, objectSize int64,opts PutObjectOptions) (n int, err error)
-Uploads objects that are less than 64MiB in a single PUT operation. For objects that are greater than 64MiB in size, PutObject seamlessly uploads the object as parts of 64MiB or more depending on the actual file size. The max upload size for an object is 5TB.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`reader` | _io.Reader_ |Any Go type that implements io.Reader |
-|`objectSize`| _int64_ |Size of the object being uploaded. Pass -1 if stream size is unknown |
-|`opts` | _minio.PutObjectOptions_ | Allows user to set optional custom metadata, content headers, encryption keys and number of threads for multipart upload operation. |
-
-__minio.PutObjectOptions__
-
-|Field | Type | Description |
-|:--- |:--- | :--- |
-| `opts.UserMetadata` | _map[string]string_ | Map of user metadata|
-| `opts.Progress` | _io.Reader_ | Reader to fetch progress of an upload |
-| `opts.ContentType` | _string_ | Content type of object, e.g "application/text" |
-| `opts.ContentEncoding` | _string_ | Content encoding of object, e.g "gzip" |
-| `opts.ContentDisposition` | _string_ | Content disposition of object, "inline" |
-| `opts.CacheControl` | _string_ | Used to specify directives for caching mechanisms in both requests and responses e.g "max-age=600"|
-| `opts.EncryptMaterials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go) |
-| `opts.StorageClass` | _string_ | Specify storage class for the object. Supported values for Minio server are `REDUCED_REDUNDANCY` and `STANDARD` |
-
-__Example__
-
-
-```go
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-fileStat, err := file.Stat()
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.PutObject("mybucket", "myobject", file, fileStat.Size(), minio.PutObjectOptions{ContentType:"application/octet-stream"})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-API methods PutObjectWithSize, PutObjectWithMetadata, PutObjectStreaming, and PutObjectWithProgress available in minio-go SDK release v3.0.3 are replaced by the new PutObject call variant that accepts a pointer to PutObjectOptions struct.
-
-<a name="PutObjectWithContext"></a>
-### PutObjectWithContext(ctx context.Context, bucketName, objectName string, reader io.Reader, objectSize int64, opts PutObjectOptions) (n int, err error)
-Identical to PutObject operation, but allows request cancellation.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |Request context |
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`reader` | _io.Reader_ |Any Go type that implements io.Reader |
-|`objectSize`| _int64_ | size of the object being uploaded. Pass -1 if stream size is unknown |
-|`opts` | _minio.PutObjectOptions_ |Pointer to struct that allows user to set optional custom metadata, content-type, content-encoding,content-disposition and cache-control headers, pass encryption module for encrypting objects, and optionally configure number of threads for multipart put operation. |
-
-
-__Example__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 10 * time.Second)
-defer cancel()
-
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-fileStat, err := file.Stat()
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.PutObjectWithContext(ctx, "my-bucketname", "my-objectname", file, fileStat.Size(), minio.PutObjectOptions{
- ContentType: "application/octet-stream",
-})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="CopyObject"></a>
-### CopyObject(dst DestinationInfo, src SourceInfo) error
-Create or replace an object through server-side copying of an existing object. It supports conditional copying, copying a part of an object and server-side encryption of destination and decryption of source. See the `SourceInfo` and `DestinationInfo` types for further details.
-
-To copy multiple source objects into a single destination object see the `ComposeObject` API.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`dst` | _minio.DestinationInfo_ |Argument describing the destination object |
-|`src` | _minio.SourceInfo_ |Argument describing the source object |
-
-
-__Example__
-
-
-```go
-// Use-case 1: Simple copy object with no conditions.
-// Source object
-src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-// Use-case 2:
-// Copy object with copy-conditions, and copying only part of the source object.
-// 1. that matches a given ETag
-// 2. and modified after 1st April 2014
-// 3. but unmodified since 23rd April 2014
-// 4. copy only first 1MiB of object.
-
-// Source object
-src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil)
-
-// Set matching ETag condition, copy object which matches the following ETag.
-src.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
-// Set modified condition, copy object modified since 2014 April 1.
-src.SetModifiedSinceCond(time.Date(2014, time.April, 1, 0, 0, 0, 0, time.UTC))
-
-// Set unmodified condition, copy object unmodified since 2014 April 23.
-src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 23, 0, 0, 0, 0, time.UTC))
-
-// Set copy-range of only first 1MiB of file.
-src.SetRange(0, 1024*1024-1)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="ComposeObject"></a>
-### ComposeObject(dst minio.DestinationInfo, srcs []minio.SourceInfo) error
-Create an object by concatenating a list of source objects using server-side copying.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---|:---|
-|`dst` | _minio.DestinationInfo_ |Struct with info about the object to be created. |
-|`srcs` | _[]minio.SourceInfo_ |Slice of struct with info about source objects to be concatenated in order. |
-
-
-__Example__
-
-
-```go
-// Prepare source decryption key (here we assume same key to
-// decrypt all source objects.)
-decKey := minio.NewSSEInfo([]byte{1, 2, 3}, "")
-
-// Source objects to concatenate. We also specify decryption
-// key for each
-src1 := minio.NewSourceInfo("bucket1", "object1", &decKey)
-src1.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
-src2 := minio.NewSourceInfo("bucket2", "object2", &decKey)
-src2.SetMatchETagCond("f8ef9c385918b653a31624deb84149d2")
-
-src3 := minio.NewSourceInfo("bucket3", "object3", &decKey)
-src3.SetMatchETagCond("5918b653a31624deb84149d2f8ef9c38")
-
-// Create slice of sources.
-srcs := []minio.SourceInfo{src1, src2, src3}
-
-// Prepare destination encryption key
-encKey := minio.NewSSEInfo([]byte{8, 9, 0}, "")
-
-// Create destination info
-dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Compose object call by concatenating multiple source files.
-err = minioClient.ComposeObject(dst, srcs)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-fmt.Println("Composed object successfully.")
-```
-
-<a name="NewSourceInfo"></a>
-### NewSourceInfo(bucket, object string, decryptSSEC *SSEInfo) SourceInfo
-Construct a `SourceInfo` object that can be used as the source for server-side copying operations like `CopyObject` and `ComposeObject`. This object can be used to set copy-conditions on the source.
-
-__Parameters__
-
-| Param | Type | Description |
-| :--- | :--- | :--- |
-| `bucket` | _string_ | Name of the source bucket |
-| `object` | _string_ | Name of the source object |
-| `decryptSSEC` | _*minio.SSEInfo_ | Decryption info for the source object (`nil` without encryption) |
-
-__Example__
-
-```go
-// No decryption parameter.
-src := minio.NewSourceInfo("bucket", "object", nil)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-// With decryption parameter.
-decKey := minio.NewSSEInfo([]byte{1,2,3}, "")
-src := minio.NewSourceInfo("bucket", "object", &decKey)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="NewDestinationInfo"></a>
-### NewDestinationInfo(bucket, object string, encryptSSEC *SSEInfo, userMeta map[string]string) (DestinationInfo, error)
-Construct a `DestinationInfo` object that can be used as the destination object for server-side copying operations like `CopyObject` and `ComposeObject`.
-
-__Parameters__
-
-| Param | Type | Description |
-| :--- | :--- | :--- |
-| `bucket` | _string_ | Name of the destination bucket |
-| `object` | _string_ | Name of the destination object |
-| `encryptSSEC` | _*minio.SSEInfo_ | Encryption info for the source object (`nil` without encryption) |
-| `userMeta` | _map[string]string_ | User metadata to be set on the destination. If nil, with only one source, user-metadata is copied from source. |
-
-__Example__
-
-```go
-// No encryption parameter.
-src := minio.NewSourceInfo("bucket", "object", nil)
-dst, err := minio.NewDestinationInfo("bucket", "object", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-src := minio.NewSourceInfo("bucket", "object", nil)
-
-// With encryption parameter.
-encKey := minio.NewSSEInfo([]byte{1,2,3}, "")
-dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FPutObject"></a>
-### FPutObject(bucketName, objectName, filePath, opts PutObjectOptions) (length int64, err error)
-Uploads contents from a file to objectName.
-
-FPutObject uploads objects that are less than 64MiB in a single PUT operation. For objects that are greater than the 64MiB in size, FPutObject seamlessly uploads the object in chunks of 64MiB or more depending on the actual file size. The max upload size for an object is 5TB.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to file to be uploaded |
-|`opts` | _minio.PutObjectOptions_ |Pointer to struct that allows user to set optional custom metadata, content-type, content-encoding,content-disposition and cache-control headers, pass encryption module for encrypting objects, and optionally configure number of threads for multipart put operation. |
-
-
-__Example__
-
-
-```go
-n, err := minioClient.FPutObject("my-bucketname", "my-objectname", "my-filename.csv", minio.PutObjectOptions{
- ContentType: "application/csv",
-});
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="FPutObjectWithContext"></a>
-### FPutObjectWithContext(ctx context.Context, bucketName, objectName, filePath, opts PutObjectOptions) (length int64, err error)
-Identical to FPutObject operation, but allows request cancellation.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |Request context |
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to file to be uploaded |
-|`opts` | _minio.PutObjectOptions_ |Pointer to struct that allows user to set optional custom metadata, content-type, content-encoding,content-disposition and cache-control headers, pass encryption module for encrypting objects, and optionally configure number of threads for multipart put operation. |
-
-__Example__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-n, err := minioClient.FPutObjectWithContext(ctx, "mybucket", "myobject.csv", "/tmp/otherobject.csv", minio.PutObjectOptions{ContentType:"application/csv"})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="StatObject"></a>
-### StatObject(bucketName, objectName string, opts StatObjectOptions) (ObjectInfo, error)
-Fetch metadata of an object.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`opts` | _minio.StatObjectOptions_ | Options for GET info/stat requests specifying additional options like encryption, If-Match |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`objInfo` | _minio.ObjectInfo_ |Object stat information |
-
-
-__minio.ObjectInfo__
-
-|Field |Type |Description |
-|:---|:---| :---|
-|`objInfo.LastModified` | _time.Time_ |Time when object was last modified |
-|`objInfo.ETag` | _string_ |MD5 checksum of the object|
-|`objInfo.ContentType` | _string_ |Content type of the object|
-|`objInfo.Size` | _int64_ |Size of the object|
-
-
-__Example__
-
-
-```go
-objInfo, err := minioClient.StatObject("mybucket", "myobject", minio.StatObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println(objInfo)
-```
-
-<a name="RemoveObject"></a>
-### RemoveObject(bucketName, objectName string) error
-Removes an object.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-
-
-```go
-err = minioClient.RemoveObject("mybucket", "myobject")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="RemoveObjects"></a>
-### RemoveObjects(bucketName string, objectsCh chan string) (errorCh <-chan RemoveObjectError)
-Removes a list of objects obtained from an input channel. The call sends a delete request to the server up to 1000 objects at a time. The errors observed are sent over the error channel.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectsCh` | _chan string_ | Channel of objects to be removed |
-
-
-__Return Values__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`errorCh` | _<-chan minio.RemoveObjectError_ | Receive-only channel of errors observed during deletion. |
-
-
-```go
-objectsCh := make(chan string)
-
-// Send object names that are needed to be removed to objectsCh
-go func() {
- defer close(objectsCh)
- // List all objects from a bucket-name with a matching prefix.
- for object := range minioClient.ListObjects("my-bucketname", "my-prefixname", true, nil) {
- if object.Err != nil {
- log.Fatalln(object.Err)
- }
- objectsCh <- object.Key
- }
-}()
-
-for rErr := range minioClient.RemoveObjects("mybucket", objectsCh) {
- fmt.Println("Error detected during deletion: ", rErr)
-}
-```
-
-<a name="RemoveIncompleteUpload"></a>
-### RemoveIncompleteUpload(bucketName, objectName string) error
-Removes a partially uploaded object.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-
-__Example__
-
-
-```go
-err = minioClient.RemoveIncompleteUpload("mybucket", "myobject")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-## 4. Encrypted object operations
-
-<a name="NewSymmetricKey"></a>
-### NewSymmetricKey(key []byte) *encrypt.SymmetricKey
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`key` | _string_ |Name of the bucket |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`symmetricKey` | _*encrypt.SymmetricKey_ | represents a symmetric key structure which can be used to encrypt and decrypt data |
-
-```go
-symKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material with symmetric key.
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(symKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully initialized Symmetric key CBC materials", cbcMaterials)
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-```
-
-<a name="NewAsymmetricKey"></a>
-### NewAsymmetricKey(privateKey []byte, publicKey[]byte) (*encrypt.AsymmetricKey, error)
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`privateKey` | _[]byte_ | Private key data |
-|`publicKey` | _[]byte_ | Public key data |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`asymmetricKey` | _*encrypt.AsymmetricKey_ | represents an asymmetric key structure which can be used to encrypt and decrypt data |
-|`err` | _error_ | Standard Error |
-
-
-```go
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Initialize the asymmetric key
-asymmetricKey, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption material for asymmetric key.
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(asymmetricKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully initialized Asymmetric key CBC materials", cbcMaterials)
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-```
-
-<a name="GetEncryptedObject"></a>
-### GetEncryptedObject(bucketName, objectName string, encryptMaterials encrypt.Materials) (io.ReadCloser, error)
-
-Returns the decrypted stream of the object data based of the given encryption materials. Most of the common errors occur when reading the stream.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ | Name of the bucket |
-|`objectName` | _string_ | Name of the object |
-|`encryptMaterials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go) |
-
-
-__Return Value__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`stream` | _io.ReadCloser_ | Returns the deciphered object reader, caller should close after reading. |
-|`err` | _error | Returns errors. |
-
-
-__Example__
-
-
-```go
-// Generate a master symmetric key
-key := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer localFile.Close()
-
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="PutEncryptedObject"></a>
-
-### PutEncryptedObject(bucketName, objectName string, reader io.Reader, encryptMaterials encrypt.Materials) (n int, err error)
-Encrypt and upload an object.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`reader` | _io.Reader_ |Any Go type that implements io.Reader |
-|`encryptMaterials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go) |
-
-__Example__
-
-```go
-// Load a private key
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Load a public key
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build an asymmetric key
-key, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption module
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Open a file to upload
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-// Upload the encrypted form of the file
-n, err := minioClient.PutEncryptedObject("mybucket", "myobject", file, cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded encrypted bytes: ", n)
-```
-
-<a name="FPutEncryptedObject"></a>
-### FPutEncryptedObject(bucketName, objectName, filePath, encryptMaterials encrypt.Materials) (n int, err error)
-Encrypt and upload an object from a file.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`filePath` | _string_ |Path to file to be uploaded |
-|`encryptMaterials` | _encrypt.Materials_ | Interface provided by `encrypt` package to encrypt a stream of data (For more information see https://godoc.org/github.com/minio/minio-go)The module that encrypts data |
-
-__Example__
-
-
-```go
-// Load a private key
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Load a public key
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build an asymmetric key
-key, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption module
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.FPutEncryptedObject("mybucket", "myobject.csv", "/tmp/otherobject.csv", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded encrypted bytes: ", n)
-```
-
-<a name="NewSSEInfo"></a>
-
-### NewSSEInfo(key []byte, algo string) SSEInfo
-Create a key object for use as encryption or decryption parameter in operations involving server-side-encryption with customer provided key (SSE-C).
-
-__Parameters__
-
-| Param | Type | Description |
-| :--- | :--- | :--- |
-| `key` | _[]byte_ | Byte-slice of the raw, un-encoded binary key |
-| `algo` | _string_ | Algorithm to use in encryption or decryption with the given key. Can be empty (defaults to `AES256`) |
-
-
-## 5. Presigned operations
-
-<a name="PresignedGetObject"></a>
-### PresignedGetObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (*url.URL, error)
-Generates a presigned URL for HTTP GET operations. Browsers/Mobile clients may point to this URL to directly download objects even if the bucket is private. This presigned URL can have an associated expiration time in seconds after which it is no longer operational. The default expiry is set to 7 days.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`expiry` | _time.Duration_ |Expiry of presigned URL in seconds |
-|`reqParams` | _url.Values_ |Additional response header overrides supports _response-expires_, _response-content-type_, _response-cache-control_, _response-content-disposition_. |
-
-
-__Example__
-
-
-```go
-// Set request parameters for content-disposition.
-reqParams := make(url.Values)
-reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
-// Generates a presigned url which expires in a day.
-presignedURL, err := minioClient.PresignedGetObject("mybucket", "myobject", time.Second * 24 * 60 * 60, reqParams)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedPutObject"></a>
-### PresignedPutObject(bucketName, objectName string, expiry time.Duration) (*url.URL, error)
-Generates a presigned URL for HTTP PUT operations. Browsers/Mobile clients may point to this URL to upload objects directly to a bucket even if it is private. This presigned URL can have an associated expiration time in seconds after which it is no longer operational. The default expiry is set to 7 days.
-
-NOTE: you can upload to S3 only with specified object name.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`expiry` | _time.Duration_ |Expiry of presigned URL in seconds |
-
-
-__Example__
-
-
-```go
-// Generates a url which expires in a day.
-expiry := time.Second * 24 * 60 * 60 // 1 day.
-presignedURL, err := minioClient.PresignedPutObject("mybucket", "myobject", expiry)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedHeadObject"></a>
-### PresignedHeadObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (*url.URL, error)
-Generates a presigned URL for HTTP HEAD operations. Browsers/Mobile clients may point to this URL to directly get metadata from objects even if the bucket is private. This presigned URL can have an associated expiration time in seconds after which it is no longer operational. The default expiry is set to 7 days.
-
-__Parameters__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectName` | _string_ |Name of the object |
-|`expiry` | _time.Duration_ |Expiry of presigned URL in seconds |
-|`reqParams` | _url.Values_ |Additional response header overrides supports _response-expires_, _response-content-type_, _response-cache-control_, _response-content-disposition_. |
-
-
-__Example__
-
-
-```go
-// Set request parameters for content-disposition.
-reqParams := make(url.Values)
-reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
-// Generates a presigned url which expires in a day.
-presignedURL, err := minioClient.PresignedHeadObject("mybucket", "myobject", time.Second * 24 * 60 * 60, reqParams)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedPostPolicy"></a>
-### PresignedPostPolicy(PostPolicy) (*url.URL, map[string]string, error)
-Allows setting policy conditions to a presigned URL for POST operations. Policies such as bucket name to receive object uploads, key name prefixes, expiry policy may be set.
-
-```go
-// Initialize policy condition config.
-policy := minio.NewPostPolicy()
-
-// Apply upload policy restrictions:
-policy.SetBucket("mybucket")
-policy.SetKey("myobject")
-policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10)) // expires in 10 days
-
-// Only allow 'png' images.
-policy.SetContentType("image/png")
-
-// Only allow content size in range 1KB to 1MB.
-policy.SetContentLengthRange(1024, 1024*1024)
-
-// Add a user metadata using the key "custom" and value "user"
-policy.SetUserMetadata("custom", "user")
-
-// Get the POST form key/value object:
-url, formData, err := minioClient.PresignedPostPolicy(policy)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// POST your content from the command line using `curl`
-fmt.Printf("curl ")
-for k, v := range formData {
- fmt.Printf("-F %s=%s ", k, v)
-}
-fmt.Printf("-F file=@/etc/bash.bashrc ")
-fmt.Printf("%s\n", url)
-```
-
-## 6. Bucket policy/notification operations
-
-<a name="SetBucketPolicy"></a>
-### SetBucketPolicy(bucketname, objectPrefix string, policy policy.BucketPolicy) error
-Set access permissions on bucket or an object prefix.
-
-Importing `github.com/minio/minio-go/pkg/policy` package is needed.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket|
-|`objectPrefix` | _string_ |Name of the object prefix|
-|`policy` | _policy.BucketPolicy_ |Policy can be one of the following, |
-| | | _policy.BucketPolicyNone_ |
-| | | _policy.BucketPolicyReadOnly_ |
-| | | _policy.BucketPolicyReadWrite_ |
-| | | _policy.BucketPolicyWriteOnly_ |
-
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`err` | _error_ |Standard Error |
-
-
-__Example__
-
-
-```go
-// Sets 'mybucket' with a sub-directory 'myprefix' to be anonymously accessible for
-// both read and write operations.
-err = minioClient.SetBucketPolicy("mybucket", "myprefix", policy.BucketPolicyReadWrite)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="GetBucketPolicy"></a>
-### GetBucketPolicy(bucketName, objectPrefix string) (policy.BucketPolicy, error)
-Get access permissions on a bucket or a prefix.
-
-Importing `github.com/minio/minio-go/pkg/policy` package is needed.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectPrefix` | _string_ |Prefix matching objects under the bucket |
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketPolicy` | _policy.BucketPolicy_ |string that contains: `none`, `readonly`, `readwrite`, or `writeonly` |
-|`err` | _error_ |Standard Error |
-
-__Example__
-
-
-```go
-bucketPolicy, err := minioClient.GetBucketPolicy("mybucket", "")
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Access permissions for mybucket is", bucketPolicy)
-```
-
-<a name="ListBucketPolicies"></a>
-### ListBucketPolicies(bucketName, objectPrefix string) (map[string]BucketPolicy, error)
-Get access permissions rules associated to the specified bucket and prefix.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`objectPrefix` | _string_ |Prefix matching objects under the bucket |
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketPolicies` | _map[string]minio.BucketPolicy_ |Map of object resource paths and their permissions |
-|`err` | _error_ |Standard Error |
-
-__Example__
-
-
-```go
-bucketPolicies, err := minioClient.ListBucketPolicies("mybucket", "")
-if err != nil {
- fmt.Println(err)
- return
-}
-for resource, permission := range bucketPolicies {
- fmt.Println(resource, " => ", permission)
-}
-```
-
-<a name="GetBucketNotification"></a>
-### GetBucketNotification(bucketName string) (BucketNotification, error)
-Get notification configuration on a bucket.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketNotification` | _minio.BucketNotification_ |structure which holds all notification configurations|
-|`err` | _error_ |Standard Error |
-
-__Example__
-
-
-```go
-bucketNotification, err := minioClient.GetBucketNotification("mybucket")
-if err != nil {
- fmt.Println("Failed to get bucket notification configurations for mybucket", err)
- return
-}
-
-for _, queueConfig := range bucketNotification.QueueConfigs {
- for _, e := range queueConfig.Events {
- fmt.Println(e + " event is enabled")
- }
-}
-```
-
-<a name="SetBucketNotification"></a>
-### SetBucketNotification(bucketName string, bucketNotification BucketNotification) error
-Set a new bucket notification on a bucket.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-|`bucketNotification` | _minio.BucketNotification_ |Represents the XML to be sent to the configured web service |
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`err` | _error_ |Standard Error |
-
-__Example__
-
-
-```go
-queueArn := minio.NewArn("aws", "sqs", "us-east-1", "804605494417", "PhotoUpdate")
-
-queueConfig := minio.NewNotificationConfig(queueArn)
-queueConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll)
-queueConfig.AddFilterPrefix("photos/")
-queueConfig.AddFilterSuffix(".jpg")
-
-bucketNotification := minio.BucketNotification{}
-bucketNotification.AddQueue(queueConfig)
-
-err = minioClient.SetBucketNotification("mybucket", bucketNotification)
-if err != nil {
- fmt.Println("Unable to set the bucket notification: ", err)
- return
-}
-```
-
-<a name="RemoveAllBucketNotification"></a>
-### RemoveAllBucketNotification(bucketName string) error
-Remove all configured bucket notifications on a bucket.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ |Name of the bucket |
-
-__Return Values__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`err` | _error_ |Standard Error |
-
-__Example__
-
-
-```go
-err = minioClient.RemoveAllBucketNotification("mybucket")
-if err != nil {
- fmt.Println("Unable to remove bucket notifications.", err)
- return
-}
-```
-
-<a name="ListenBucketNotification"></a>
-### ListenBucketNotification(bucketName, prefix, suffix string, events []string, doneCh <-chan struct{}) <-chan NotificationInfo
-ListenBucketNotification API receives bucket notification events through the notification channel. The returned notification channel has two fields 'Records' and 'Err'.
-
-- 'Records' holds the notifications received from the server.
-- 'Err' indicates any error while processing the received notifications.
-
-NOTE: Notification channel is closed at the first occurrence of an error.
-
-__Parameters__
-
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`bucketName` | _string_ | Bucket to listen notifications on |
-|`prefix` | _string_ | Object key prefix to filter notifications for |
-|`suffix` | _string_ | Object key suffix to filter notifications for |
-|`events` | _[]string_ | Enables notifications for specific event types |
-|`doneCh` | _chan struct{}_ | A message on this channel ends the ListenBucketNotification iterator |
-
-__Return Values__
-
-|Param |Type |Description |
-|:---|:---| :---|
-|`notificationInfo` | _chan minio.NotificationInfo_ | Channel of bucket notifications |
-
-__minio.NotificationInfo__
-
-|Field |Type |Description |
-|`notificationInfo.Records` | _[]minio.NotificationEvent_ | Collection of notification events |
-|`notificationInfo.Err` | _error_ | Carries any error occurred during the operation (Standard Error) |
-
-
-__Example__
-
-
-```go
-// Create a done channel to control 'ListenBucketNotification' go routine.
-doneCh := make(chan struct{})
-
-// Indicate a background go-routine to exit cleanly upon return.
-defer close(doneCh)
-
-// Listen for bucket notifications on "mybucket" filtered by prefix, suffix and events.
-for notificationInfo := range minioClient.ListenBucketNotification("mybucket", "myprefix/", ".mysuffix", []string{
- "s3:ObjectCreated:*",
- "s3:ObjectAccessed:*",
- "s3:ObjectRemoved:*",
- }, doneCh) {
- if notificationInfo.Err != nil {
- fmt.Println(notificationInfo.Err)
- }
- fmt.Println(notificationInfo)
-}
-```
-
-## 7. Client custom settings
-
-<a name="SetAppInfo"></a>
-### SetAppInfo(appName, appVersion string)
-Add custom application details to User-Agent.
-
-__Parameters__
-
-| Param | Type | Description |
-|---|---|---|
-|`appName` | _string_ | Name of the application performing the API requests. |
-| `appVersion`| _string_ | Version of the application performing the API requests. |
-
-
-__Example__
-
-
-```go
-// Set Application name and version to be used in subsequent API requests.
-minioClient.SetAppInfo("myCloudApp", "1.0.0")
-```
-
-<a name="SetCustomTransport"></a>
-### SetCustomTransport(customHTTPTransport http.RoundTripper)
-Overrides default HTTP transport. This is usually needed for debugging or for adding custom TLS certificates.
-
-__Parameters__
-
-| Param | Type | Description |
-|---|---|---|
-|`customHTTPTransport` | _http.RoundTripper_ | Custom transport e.g, to trace API requests and responses for debugging purposes.|
-
-
-<a name="TraceOn"></a>
-### TraceOn(outputStream io.Writer)
-Enables HTTP tracing. The trace is written to the io.Writer provided. If outputStream is nil, trace is written to os.Stdout.
-
-__Parameters__
-
-| Param | Type | Description |
-|---|---|---|
-|`outputStream` | _io.Writer_ | HTTP trace is written into outputStream.|
-
-
-<a name="TraceOff"></a>
-### TraceOff()
-Disables HTTP tracing.
-
-<a name="SetS3TransferAccelerate"></a>
-### SetS3TransferAccelerate(acceleratedEndpoint string)
-Set AWS S3 transfer acceleration endpoint for all API requests hereafter.
-NOTE: This API applies only to AWS S3 and is a no operation for S3 compatible object storage services.
-
-__Parameters__
-
-| Param | Type | Description |
-|---|---|---|
-|`acceleratedEndpoint` | _string_ | Set to new S3 transfer acceleration endpoint.|
-
-
-## 8. Explore Further
-
-- [Build your own Go Music Player App example](https://docs.minio.io/docs/go-music-player-app)
diff --git a/vendor/github.com/minio/minio-go/docs/checker.go.template b/vendor/github.com/minio/minio-go/docs/checker.go.template
deleted file mode 100644
index 2e0f13a53..000000000
--- a/vendor/github.com/minio/minio-go/docs/checker.go.template
+++ /dev/null
@@ -1,21 +0,0 @@
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Use a secure connection.
- ssl := true
-
- // Initialize minio client object.
- minioClient, err := minio.New("play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", ssl)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- {{.Text}}
-}
diff --git a/vendor/github.com/minio/minio-go/docs/validator.go b/vendor/github.com/minio/minio-go/docs/validator.go
deleted file mode 100644
index 7d5cbaaab..000000000
--- a/vendor/github.com/minio/minio-go/docs/validator.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "text/template"
-
- "github.com/a8m/mark"
- "github.com/gernest/wow"
- "github.com/gernest/wow/spin"
- "github.com/minio/cli"
-)
-
-func init() {
- // Validate go binary.
- if _, err := exec.LookPath("go"); err != nil {
- panic(err)
- }
-}
-
-var globalFlags = []cli.Flag{
- cli.StringFlag{
- Name: "m",
- Value: "API.md",
- Usage: "Path to markdown api documentation.",
- },
- cli.StringFlag{
- Name: "t",
- Value: "checker.go.template",
- Usage: "Template used for generating the programs.",
- },
- cli.IntFlag{
- Name: "skip",
- Value: 2,
- Usage: "Skip entries before validating the code.",
- },
-}
-
-func runGofmt(path string) (msg string, err error) {
- cmdArgs := []string{"-s", "-w", "-l", path}
- cmd := exec.Command("gofmt", cmdArgs...)
- stdoutStderr, err := cmd.CombinedOutput()
- if err != nil {
- return "", err
- }
- return string(stdoutStderr), nil
-}
-
-func runGoImports(path string) (msg string, err error) {
- cmdArgs := []string{"-w", path}
- cmd := exec.Command("goimports", cmdArgs...)
- stdoutStderr, err := cmd.CombinedOutput()
- if err != nil {
- return string(stdoutStderr), err
- }
- return string(stdoutStderr), nil
-}
-
-func runGoBuild(path string) (msg string, err error) {
- // Go build the path.
- cmdArgs := []string{"build", "-o", "/dev/null", path}
- cmd := exec.Command("go", cmdArgs...)
- stdoutStderr, err := cmd.CombinedOutput()
- if err != nil {
- return string(stdoutStderr), err
- }
- return string(stdoutStderr), nil
-}
-
-func validatorAction(ctx *cli.Context) error {
- if !ctx.IsSet("m") || !ctx.IsSet("t") {
- return nil
- }
- docPath := ctx.String("m")
- var err error
- docPath, err = filepath.Abs(docPath)
- if err != nil {
- return err
- }
- data, err := ioutil.ReadFile(docPath)
- if err != nil {
- return err
- }
-
- templatePath := ctx.String("t")
- templatePath, err = filepath.Abs(templatePath)
- if err != nil {
- return err
- }
-
- skipEntries := ctx.Int("skip")
- m := mark.New(string(data), &mark.Options{
- Gfm: true, // Github markdown support is enabled by default.
- })
-
- t, err := template.ParseFiles(templatePath)
- if err != nil {
- return err
- }
-
- tmpDir, err := ioutil.TempDir("", "md-verifier")
- if err != nil {
- return err
- }
- defer os.RemoveAll(tmpDir)
-
- entryN := 1
- for i := mark.NodeText; i < mark.NodeCheckbox; i++ {
- if mark.NodeCode != mark.NodeType(i) {
- m.AddRenderFn(mark.NodeType(i), func(node mark.Node) (s string) {
- return ""
- })
- continue
- }
- m.AddRenderFn(mark.NodeCode, func(node mark.Node) (s string) {
- p, ok := node.(*mark.CodeNode)
- if !ok {
- return
- }
- p.Text = strings.NewReplacer("&lt;", "<", "&gt;", ">", "&quot;", `"`, "&amp;", "&").Replace(p.Text)
- if skipEntries > 0 {
- skipEntries--
- return
- }
-
- testFilePath := filepath.Join(tmpDir, "example.go")
- w, werr := os.Create(testFilePath)
- if werr != nil {
- panic(werr)
- }
- t.Execute(w, p)
- w.Sync()
- w.Close()
- entryN++
-
- msg, err := runGofmt(testFilePath)
- if err != nil {
- fmt.Printf("Failed running gofmt on %s, with (%s):(%s)\n", testFilePath, msg, err)
- os.Exit(-1)
- }
-
- msg, err = runGoImports(testFilePath)
- if err != nil {
- fmt.Printf("Failed running gofmt on %s, with (%s):(%s)\n", testFilePath, msg, err)
- os.Exit(-1)
- }
-
- msg, err = runGoBuild(testFilePath)
- if err != nil {
- fmt.Printf("Failed running gobuild on %s, with (%s):(%s)\n", testFilePath, msg, err)
- fmt.Printf("Code with possible issue in %s:\n%s", docPath, p.Text)
- fmt.Printf("To test `go build %s`\n", testFilePath)
- os.Exit(-1)
- }
-
- // Once successfully built remove the test file
- os.Remove(testFilePath)
- return
- })
- }
-
- w := wow.New(os.Stdout, spin.Get(spin.Moon), fmt.Sprintf(" Running validation tests in %s", tmpDir))
-
- w.Start()
- // Render markdown executes our checker on each code blocks.
- _ = m.Render()
- w.PersistWith(spin.Get(spin.Runner), " Successfully finished tests")
- w.Stop()
-
- return nil
-}
-
-func main() {
- app := cli.NewApp()
- app.Action = validatorAction
- app.HideVersion = true
- app.HideHelpCommand = true
- app.Usage = "Validates code block sections inside API.md"
- app.Author = "Minio.io"
- app.Flags = globalFlags
- // Help template for validator
- app.CustomAppHelpTemplate = `NAME:
- {{.Name}} - {{.Usage}}
-
-USAGE:
- {{.Name}} {{if .VisibleFlags}}[FLAGS] {{end}}COMMAND{{if .VisibleFlags}} [COMMAND FLAGS | -h]{{end}} [ARGUMENTS...]
-
-COMMANDS:
- {{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
- {{end}}{{if .VisibleFlags}}
-FLAGS:
- {{range .VisibleFlags}}{{.}}
- {{end}}{{end}}
-TEMPLATE:
- Validator uses Go's 'text/template' formatting so you need to ensure
- your template is formatted correctly, check 'docs/checker.go.template'
-
-USAGE:
- go run docs/validator.go -m docs/API.md -t /tmp/mycode.go.template
-
-`
- app.Run(os.Args)
-
-}
diff --git a/vendor/github.com/minio/minio-go/docs/zh_CN/API.md b/vendor/github.com/minio/minio-go/docs/zh_CN/API.md
deleted file mode 100644
index d20ca102a..000000000
--- a/vendor/github.com/minio/minio-go/docs/zh_CN/API.md
+++ /dev/null
@@ -1,1820 +0,0 @@
-# Minio Go Client API文档 [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io)
-
-## åˆä½¿åŒ–Minio Client对象。
-
-## Minio
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // 使用ssl
- ssl := true
-
- // åˆä½¿åŒ–minio client对象。
- minioClient, err := minio.New("play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", ssl)
- if err != nil {
- fmt.Println(err)
- return
- }
-}
-```
-
-## AWS S3
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // 使用ssl
- ssl := true
-
- // åˆä½¿åŒ–minio client对象。
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", ssl)
- if err != nil {
- fmt.Println(err)
- return
- }
-}
-```
-
-| æ“作存储桶 | æ“作对象 | æ“作加密对象 | Presignedæ“作 | 存储桶策略/通知 | 客户端自定义设置 |
-| :--- | :--- | :--- | :--- | :--- | :--- |
-| [`MakeBucket`](#MakeBucket) | [`GetObject`](#GetObject) | [`NewSymmetricKey`](#NewSymmetricKey) | [`PresignedGetObject`](#PresignedGetObject) | [`SetBucketPolicy`](#SetBucketPolicy) | [`SetAppInfo`](#SetAppInfo) |
-| [`ListBuckets`](#ListBuckets) | [`PutObject`](#PutObject) | [`NewAsymmetricKey`](#NewAsymmetricKey) | [`PresignedPutObject`](#PresignedPutObject) | [`GetBucketPolicy`](#GetBucketPolicy) | [`SetCustomTransport`](#SetCustomTransport) |
-| [`BucketExists`](#BucketExists) | [`CopyObject`](#CopyObject) | [`GetEncryptedObject`](#GetEncryptedObject) | [`PresignedPostPolicy`](#PresignedPostPolicy) | [`ListBucketPolicies`](#ListBucketPolicies) | [`TraceOn`](#TraceOn) |
-| [`RemoveBucket`](#RemoveBucket) | [`StatObject`](#StatObject) | [`PutEncryptedObject`](#PutEncryptedObject) | | [`SetBucketNotification`](#SetBucketNotification) | [`TraceOff`](#TraceOff) |
-| [`ListObjects`](#ListObjects) | [`RemoveObject`](#RemoveObject) | [`NewSSEInfo`](#NewSSEInfo) | | [`GetBucketNotification`](#GetBucketNotification) | [`SetS3TransferAccelerate`](#SetS3TransferAccelerate) |
-| [`ListObjectsV2`](#ListObjectsV2) | [`RemoveObjects`](#RemoveObjects) | [`FPutEncryptedObject`](#FPutEncryptedObject) | | [`RemoveAllBucketNotification`](#RemoveAllBucketNotification) | |
-| [`ListIncompleteUploads`](#ListIncompleteUploads) | [`RemoveIncompleteUpload`](#RemoveIncompleteUpload) | | | [`ListenBucketNotification`](#ListenBucketNotification) | |
-| | [`FPutObject`](#FPutObject) | | | | |
-| | [`FGetObject`](#FGetObject) | | | | |
-| | [`ComposeObject`](#ComposeObject) | | | | |
-| | [`NewSourceInfo`](#NewSourceInfo) | | | | |
-| | [`NewDestinationInfo`](#NewDestinationInfo) | | | | |
-| | [`PutObjectWithContext`](#PutObjectWithContext) | | | |
-| | [`GetObjectWithContext`](#GetObjectWithContext) | | | |
-| | [`FPutObjectWithContext`](#FPutObjectWithContext) | | | |
-| | [`FGetObjectWithContext`](#FGetObjectWithContext) | | | |
-## 1. 构造函数
-<a name="Minio"></a>
-
-### New(endpoint, accessKeyID, secretAccessKey string, ssl bool) (*Client, error)
-åˆä½¿åŒ–一个新的client对象。
-
-__å‚æ•°__
-
-|å‚æ•° | 类型 |æè¿° |
-|:---|:---| :---|
-|`endpoint` | _string_ |S3兼容对象存储æœåŠ¡endpoint |
-|`accessKeyID` |_string_ |对象存储的Access key |
-|`secretAccessKey` | _string_ |对象存储的Secret key |
-|`ssl` | _bool_ |true代表使用HTTPS |
-
-### NewWithRegion(endpoint, accessKeyID, secretAccessKey string, ssl bool, region string) (*Client, error)
-åˆä½¿åŒ–minio client,带有regioné…置。和New()ä¸åŒçš„是,NewWithRegioné¿å…了bucket-locationæ“作,所以会快那么一丢丢。如果你的应用åªä½¿ç”¨ä¸€ä¸ªregionçš„è¯å¯ä»¥ç”¨è¿™ä¸ªæ–¹æ³•ã€‚
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`endpoint` | _string_ |S3兼容对象存储æœåŠ¡endpoint |
-|`accessKeyID` |_string_ |对象存储的Access key |
-|`secretAccessKey` | _string_ |对象存储的Secret key |
-|`ssl` | _bool_ |true代表使用HTTPS |
-|`region`| _string_ | 对象存储的region |
-
-## 2. æ“作存储桶
-
-<a name="MakeBucket"></a>
-### MakeBucket(bucketName, location string) error
-创建一个存储桶。
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`bucketName` | _string_ | 存储桶å称 |
-| `location` | _string_ | 存储桶被创建的region(地区),默认是us-east-1(美国东一区),下é¢åˆ—举的是其它åˆæ³•çš„值。注æ„:如果用的是minioæœåŠ¡çš„è¯ï¼Œresion是在它的é…置文件中,(默认是us-east-1)。|
-| | |us-east-1 |
-| | |us-west-1 |
-| | |us-west-2 |
-| | |eu-west-1 |
-| | | eu-central-1|
-| | | ap-southeast-1|
-| | | ap-northeast-1|
-| | | ap-southeast-2|
-| | | sa-east-1|
-
-
-__示例__
-
-
-```go
-err = minioClient.MakeBucket("mybucket", "us-east-1")
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully created mybucket.")
-```
-
-<a name="ListBuckets"></a>
-### ListBuckets() ([]BucketInfo, error)
-列出所有的存储桶。
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`bucketList` | _[]minio.BucketInfo_ | 所有存储桶的list。 |
-
-
-__minio.BucketInfo__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`bucket.Name` | _string_ | 存储桶å称 |
-|`bucket.CreationDate` | _time.Time_ | 存储桶的创建时间 |
-
-
-__示例__
-
-
-```go
-buckets, err := minioClient.ListBuckets()
-if err != nil {
- fmt.Println(err)
- return
-}
-for _, bucket := range buckets {
- fmt.Println(bucket)
-}
-```
-
-<a name="BucketExists"></a>
-### BucketExists(bucketName string) (found bool, err error)
-检查存储桶是å¦å­˜åœ¨ã€‚
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`found` | _bool_ | 存储桶是å¦å­˜åœ¨ |
-|`err` | _error_ | 标准Error |
-
-
-__示例__
-
-
-```go
-found, err := minioClient.BucketExists("mybucket")
-if err != nil {
- fmt.Println(err)
- return
-}
-if found {
- fmt.Println("Bucket found")
-}
-```
-
-<a name="RemoveBucket"></a>
-### RemoveBucket(bucketName string) error
-删除一个存储桶,存储桶必须为空æ‰èƒ½è¢«æˆåŠŸåˆ é™¤ã€‚
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-
-__示例__
-
-
-```go
-err = minioClient.RemoveBucket("mybucket")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="ListObjects"></a>
-### ListObjects(bucketName, prefix string, recursive bool, doneCh chan struct{}) <-chan ObjectInfo
-列举存储桶里的对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectPrefix` |_string_ | è¦åˆ—举的对象å‰ç¼€ |
-|`recursive` | _bool_ |`true`代表递归查找,`false`代表类似文件夹查找,以'/'分隔,ä¸æŸ¥å­æ–‡ä»¶å¤¹ã€‚ |
-|`doneCh` | _chan struct{}_ | 在该channel上结æŸListObjects iterator的一个message。 |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`objectInfo` | _chan minio.ObjectInfo_ |存储桶中所有对象的read channel,对象的格å¼å¦‚下: |
-
-__minio.ObjectInfo__
-
-|属性 |类型 |æè¿° |
-|:---|:---| :---|
-|`objectInfo.Key` | _string_ |对象的å称 |
-|`objectInfo.Size` | _int64_ |å¯¹è±¡çš„å¤§å° |
-|`objectInfo.ETag` | _string_ |对象的MD5æ ¡éªŒç  |
-|`objectInfo.LastModified` | _time.Time_ |对象的最åŽä¿®æ”¹æ—¶é—´ |
-
-
-```go
-// Create a done channel to control 'ListObjects' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true
-objectCh := minioClient.ListObjects("mybucket", "myprefix", isRecursive, doneCh)
-for object := range objectCh {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
-}
-```
-
-
-<a name="ListObjectsV2"></a>
-### ListObjectsV2(bucketName, prefix string, recursive bool, doneCh chan struct{}) <-chan ObjectInfo
-使用listing API v2版本列举存储桶中的对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-| `objectPrefix` |_string_ | è¦åˆ—举的对象å‰ç¼€ |
-| `recursive` | _bool_ |`true`代表递归查找,`false`代表类似文件夹查找,以'/'分隔,ä¸æŸ¥å­æ–‡ä»¶å¤¹ã€‚ |
-|`doneCh` | _chan struct{}_ | 在该channel上结æŸListObjects iterator的一个message。 |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`objectInfo` | _chan minio.ObjectInfo_ |存储桶中所有对象的read channel |
-
-
-```go
-// Create a done channel to control 'ListObjectsV2' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true
-objectCh := minioClient.ListObjectsV2("mybucket", "myprefix", isRecursive, doneCh)
-for object := range objectCh {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
-}
-```
-
-<a name="ListIncompleteUploads"></a>
-### ListIncompleteUploads(bucketName, prefix string, recursive bool, doneCh chan struct{}) <- chan ObjectMultipartInfo
-列举存储桶中未完整上传的对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-| `prefix` |_string_ | ä¸å®Œæ•´ä¸Šä¼ çš„对象的å‰ç¼€ |
-| `recursive` | _bool_ |`true`代表递归查找,`false`代表类似文件夹查找,以'/'分隔,ä¸æŸ¥å­æ–‡ä»¶å¤¹ã€‚ |
-|`doneCh` | _chan struct{}_ | 在该channel上结æŸListIncompleteUploads iterator的一个message。 |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`multiPartInfo` | _chan minio.ObjectMultipartInfo_ |multipart对象格å¼å¦‚下: |
-
-__minio.ObjectMultipartInfo__
-
-|属性 |类型 |æè¿° |
-|:---|:---| :---|
-|`multiPartObjInfo.Key` | _string_ |未完整上传的对象的å称 |
-|`multiPartObjInfo.UploadID` | _string_ |未完整上传的对象的Upload ID |
-|`multiPartObjInfo.Size` | _int64_ |æœªå®Œæ•´ä¸Šä¼ çš„å¯¹è±¡çš„å¤§å° |
-
-__示例__
-
-
-```go
-// Create a done channel to control 'ListObjects' go routine.
-doneCh := make(chan struct{})
-
-// Indicate to our routine to exit cleanly upon return.
-defer close(doneCh)
-
-isRecursive := true // Recursively list everything at 'myprefix'
-multiPartObjectCh := minioClient.ListIncompleteUploads("mybucket", "myprefix", isRecursive, doneCh)
-for multiPartObject := range multiPartObjectCh {
- if multiPartObject.Err != nil {
- fmt.Println(multiPartObject.Err)
- return
- }
- fmt.Println(multiPartObject)
-}
-```
-
-## 3. æ“作对象
-
-<a name="GetObject"></a>
-### GetObject(bucketName, objectName string, opts GetObjectOptions) (*Object, error)
-返回对象数æ®çš„æµï¼Œerror是读æµæ—¶ç»å¸¸æŠ›çš„那些错。
-
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`opts` | _minio.GetObjectOptions_ | GET请求的一些é¢å¤–å‚数,åƒencryption,If-Match |
-
-
-__minio.GetObjectOptions__
-
-|å‚æ•° | 类型 | æè¿° |
-|:---|:---|:---|
-| `opts.Materials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`object` | _*minio.Object_ |_minio.Object_代表了一个object reader。它实现了io.Reader, io.Seeker, io.ReaderAt and io.Closer接å£ã€‚ |
-
-
-__示例__
-
-
-```go
-object, err := minioClient.GetObject("mybucket", "myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetObject"></a>
-### FGetObject(bucketName, objectName, filePath string, opts GetObjectOptions) error
-下载并将文件ä¿å­˜åˆ°æœ¬åœ°æ–‡ä»¶ç³»ç»Ÿã€‚
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |下载åŽä¿å­˜çš„路径 |
-|`opts` | _minio.GetObjectOptions_ | GET请求的一些é¢å¤–å‚数,åƒencryption,If-Match |
-
-
-__示例__
-
-
-```go
-err = minioClient.FGetObject("mybucket", "myobject", "/tmp/myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-<a name="GetObjectWithContext"></a>
-### GetObjectWithContext(ctx context.Context, bucketName, objectName string, opts GetObjectOptions) (*Object, error)
-å’ŒGetObjectæ“作是一样的,ä¸è¿‡ä¼ å…¥äº†å–消请求的context。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |请求上下文(Request context) |
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`opts` | _minio.GetObjectOptions_ | GET请求的一些é¢å¤–å‚数,åƒencryption,If-Match |
-
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`object` | _*minio.Object_ |_minio.Object_代表了一个object reader。它实现了io.Reader, io.Seeker, io.ReaderAt and io.Closer接å£ã€‚ |
-
-
-__示例__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-object, err := minioClient.GetObjectWithContext(ctx, "mybucket", "myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetObjectWithContext"></a>
-### FGetObjectWithContext(ctx context.Context, bucketName, objectName, filePath string, opts GetObjectOptions) error
-å’ŒFGetObjectæ“作是一样的,ä¸è¿‡å…许å–消请求。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |请求上下文 |
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |下载åŽä¿å­˜çš„路径 |
-|`opts` | _minio.GetObjectOptions_ | GET请求的一些é¢å¤–å‚数,åƒencryption,If-Match |
-
-
-__示例__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-err = minioClient.FGetObjectWithContext(ctx, "mybucket", "myobject", "/tmp/myobject", minio.GetObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FGetEncryptedObject"></a>
-### FGetEncryptedObject(bucketName, objectName, filePath string, materials encrypt.Materials) error
-å’ŒFGetObjectæ“作是一样的,ä¸è¿‡ä¼šå¯¹åŠ å¯†è¯·æ±‚进行解密。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |下载åŽä¿å­˜çš„路径|
-|`materials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-
-__示例__
-
-
-```go
-// Generate a master symmetric key
-key := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-err = minioClient.FGetEncryptedObject("mybucket", "myobject", "/tmp/myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="PutObject"></a>
-### PutObject(bucketName, objectName string, reader io.Reader, objectSize int64,opts PutObjectOptions) (n int, err error)
-当对象å°äºŽ64MiB时,直接在一次PUT请求里进行上传。当大于64MiB时,根æ®æ–‡ä»¶çš„实际大å°ï¼ŒPutObject会自动地将对象进行拆分æˆ64MiB一å—或更大一些进行上传。对象的最大大å°æ˜¯5TB。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`reader` | _io.Reader_ |ä»»æ„实现了io.Readerçš„GO类型 |
-|`objectSize`| _int64_ |上传的对象的大å°ï¼Œ-1代表未知。 |
-|`opts` | _minio.PutObjectOptions_ | å…许用户设置å¯é€‰çš„自定义元数æ®ï¼Œå†…容标题,加密密钥和用于分段上传æ“作的线程数é‡ã€‚ |
-
-__minio.PutObjectOptions__
-
-|属性 | 类型 | æè¿° |
-|:--- |:--- | :--- |
-| `opts.UserMetadata` | _map[string]string_ | 用户元数æ®çš„Map|
-| `opts.Progress` | _io.Reader_ | 获å–上传进度的Reader |
-| `opts.ContentType` | _string_ | 对象的Content type, 例如"application/text" |
-| `opts.ContentEncoding` | _string_ | 对象的Content encoding,例如"gzip" |
-| `opts.ContentDisposition` | _string_ | 对象的Content disposition, "inline" |
-| `opts.CacheControl` | _string_ | 指定针对请求和å“应的缓存机制,例如"max-age=600"|
-| `opts.EncryptMaterials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-
-__示例__
-
-
-```go
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-fileStat, err := file.Stat()
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.PutObject("mybucket", "myobject", file, fileStat.Size(), minio.PutObjectOptions{ContentType:"application/octet-stream"})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-API方法在minio-go SDK版本v3.0.3中æ供的PutObjectWithSize,PutObjectWithMetadata,PutObjectStreamingå’ŒPutObjectWithProgress被替æ¢ä¸ºæŽ¥å—指å‘PutObjectOptions struct的指针的新的PutObject调用å˜ä½“。
-
-<a name="PutObjectWithContext"></a>
-### PutObjectWithContext(ctx context.Context, bucketName, objectName string, reader io.Reader, objectSize int64, opts PutObjectOptions) (n int, err error)
-å’ŒPutObject是一样的,ä¸è¿‡å…许å–消请求。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |请求上下文 |
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`reader` | _io.Reader_ |任何实现io.Reader的Go类型 |
-|`objectSize`| _int64_ | 上传的对象的大å°ï¼Œ-1代表未知 |
-|`opts` | _minio.PutObjectOptions_ |å…许用户设置å¯é€‰çš„自定义元数æ®ï¼Œcontent-type,content-encoding,content-disposition以åŠcache-control headers,传递加密模å—以加密对象,并å¯é€‰åœ°è®¾ç½®multipart putæ“作的线程数é‡ã€‚|
-
-
-__示例__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 10 * time.Second)
-defer cancel()
-
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-fileStat, err := file.Stat()
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.PutObjectWithContext(ctx, "my-bucketname", "my-objectname", file, fileStat.Size(), minio.PutObjectOptions{
- ContentType: "application/octet-stream",
-})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="CopyObject"></a>
-### CopyObject(dst DestinationInfo, src SourceInfo) error
-通过在æœåŠ¡ç«¯å¯¹å·²å­˜åœ¨çš„对象进行拷è´ï¼Œå®žçŽ°æ–°å»ºæˆ–者替æ¢å¯¹è±¡ã€‚它支æŒæœ‰æ¡ä»¶çš„æ‹·è´ï¼Œæ‹·è´å¯¹è±¡çš„一部分,以åŠåœ¨æœåŠ¡ç«¯çš„加解密。请查看`SourceInfo`å’Œ`DestinationInfo`两个类型æ¥äº†è§£æ›´å¤šç»†èŠ‚。
-
-æ‹·è´å¤šä¸ªæºæ–‡ä»¶åˆ°ä¸€ä¸ªç›®æ ‡å¯¹è±¡ï¼Œè¯·æŸ¥çœ‹`ComposeObject` API。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`dst` | _minio.DestinationInfo_ |目标对象 |
-|`src` | _minio.SourceInfo_ |æºå¯¹è±¡ |
-
-
-__示例__
-
-
-```go
-// Use-case 1: Simple copy object with no conditions.
-// Source object
-src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-// Use-case 2:
-// Copy object with copy-conditions, and copying only part of the source object.
-// 1. that matches a given ETag
-// 2. and modified after 1st April 2014
-// 3. but unmodified since 23rd April 2014
-// 4. copy only first 1MiB of object.
-
-// Source object
-src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil)
-
-// Set matching ETag condition, copy object which matches the following ETag.
-src.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
-// Set modified condition, copy object modified since 2014 April 1.
-src.SetModifiedSinceCond(time.Date(2014, time.April, 1, 0, 0, 0, 0, time.UTC))
-
-// Set unmodified condition, copy object unmodified since 2014 April 23.
-src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 23, 0, 0, 0, 0, time.UTC))
-
-// Set copy-range of only first 1MiB of file.
-src.SetRange(0, 1024*1024-1)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="ComposeObject"></a>
-### ComposeObject(dst minio.DestinationInfo, srcs []minio.SourceInfo) error
-通过使用æœåŠ¡ç«¯æ‹·è´å®žçŽ°é’­å¤šä¸ªæºå¯¹è±¡åˆå¹¶åˆ›å»ºæˆä¸€ä¸ªæ–°çš„对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---|:---|
-|`dst` | _minio.DestinationInfo_ |è¦è¢«åˆ›å»ºçš„目标对象 |
-|`srcs` | _[]minio.SourceInfo_ |è¦åˆå¹¶çš„多个æºå¯¹è±¡ |
-
-
-__示例__
-
-
-```go
-// Prepare source decryption key (here we assume same key to
-// decrypt all source objects.)
-decKey := minio.NewSSEInfo([]byte{1, 2, 3}, "")
-
-// Source objects to concatenate. We also specify decryption
-// key for each
-src1 := minio.NewSourceInfo("bucket1", "object1", &decKey)
-src1.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
-src2 := minio.NewSourceInfo("bucket2", "object2", &decKey)
-src2.SetMatchETagCond("f8ef9c385918b653a31624deb84149d2")
-
-src3 := minio.NewSourceInfo("bucket3", "object3", &decKey)
-src3.SetMatchETagCond("5918b653a31624deb84149d2f8ef9c38")
-
-// Create slice of sources.
-srcs := []minio.SourceInfo{src1, src2, src3}
-
-// Prepare destination encryption key
-encKey := minio.NewSSEInfo([]byte{8, 9, 0}, "")
-
-// Create destination info
-dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Compose object call by concatenating multiple source files.
-err = minioClient.ComposeObject(dst, srcs)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-fmt.Println("Composed object successfully.")
-```
-
-<a name="NewSourceInfo"></a>
-### NewSourceInfo(bucket, object string, decryptSSEC *SSEInfo) SourceInfo
-构建一个å¯ç”¨äºŽæœåŠ¡ç«¯æ‹·è´æ“作(åƒ`CopyObject`å’Œ`ComposeObject`)的`SourceInfo`对象。该对象å¯ç”¨äºŽç»™æºå¯¹è±¡è®¾ç½®æ‹·è´æ¡ä»¶ã€‚
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-| :--- | :--- | :--- |
-| `bucket` | _string_ | æºå­˜å‚¨æ¡¶ |
-| `object` | _string_ | æºå¯¹è±¡ |
-| `decryptSSEC` | _*minio.SSEInfo_ | æºå¯¹è±¡çš„è§£å¯†ä¿¡æ¯ (`nil`代表ä¸ç”¨è§£å¯†) |
-
-__示例__
-
-```go
-// No decryption parameter.
-src := minio.NewSourceInfo("bucket", "object", nil)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-// With decryption parameter.
-decKey := minio.NewSSEInfo([]byte{1,2,3}, "")
-src := minio.NewSourceInfo("bucket", "object", &decKey)
-
-// Destination object
-dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="NewDestinationInfo"></a>
-### NewDestinationInfo(bucket, object string, encryptSSEC *SSEInfo, userMeta map[string]string) (DestinationInfo, error)
-构建一个用于æœåŠ¡ç«¯æ‹·è´æ“作(åƒ`CopyObject`å’Œ`ComposeObject`)的用作目标对象的`DestinationInfo`。
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-| :--- | :--- | :--- |
-| `bucket` | _string_ | 目标存储桶å称 |
-| `object` | _string_ | 目标对象å称 |
-| `encryptSSEC` | _*minio.SSEInfo_ | æºå¯¹è±¡çš„åŠ å¯†ä¿¡æ¯ (`nil`代表ä¸ç”¨åŠ å¯†) |
-| `userMeta` | _map[string]string_ | 给目标对象的用户元数æ®ï¼Œå¦‚果是nil,并åªæœ‰ä¸€ä¸ªæºå¯¹è±¡ï¼Œåˆ™å°†æºå¯¹è±¡çš„用户元数æ®æ‹·è´ç»™ç›®æ ‡å¯¹è±¡ã€‚|
-
-__示例__
-
-```go
-// No encryption parameter.
-src := minio.NewSourceInfo("bucket", "object", nil)
-dst, err := minio.NewDestinationInfo("bucket", "object", nil, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-```go
-src := minio.NewSourceInfo("bucket", "object", nil)
-
-// With encryption parameter.
-encKey := minio.NewSSEInfo([]byte{1,2,3}, "")
-dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Copy object call
-err = minioClient.CopyObject(dst, src)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="FPutObject"></a>
-### FPutObject(bucketName, objectName, filePath, opts PutObjectOptions) (length int64, err error)
-将filePath对应的文件内容上传到一个对象中。
-
-当对象å°äºŽ64MiB时,FPutObject直接在一次PUT请求里进行上传。当大于64MiB时,根æ®æ–‡ä»¶çš„实际大å°ï¼ŒFPutObject会自动地将对象进行拆分æˆ64MiB一å—或更大一些进行上传。对象的最大大å°æ˜¯5TB。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |è¦ä¸Šä¼ çš„文件的路径 |
-|`opts` | _minio.PutObjectOptions_ |å…许用户设置å¯é€‰çš„自定义元数æ®ï¼Œcontent-type,content-encoding,content-disposition以åŠcache-control headers,传递加密模å—以加密对象,并å¯é€‰åœ°è®¾ç½®multipart putæ“作的线程数é‡ã€‚ |
-
-
-__示例__
-
-
-```go
-n, err := minioClient.FPutObject("my-bucketname", "my-objectname", "my-filename.csv", minio.PutObjectOptions{
- ContentType: "application/csv",
-});
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="FPutObjectWithContext"></a>
-### FPutObjectWithContext(ctx context.Context, bucketName, objectName, filePath, opts PutObjectOptions) (length int64, err error)
-å’ŒFPutObjectæ“作是一样的,ä¸è¿‡å…许å–消请求。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`ctx` | _context.Context_ |请求上下文 |
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |è¦ä¸Šä¼ çš„文件的路径 |
-|`opts` | _minio.PutObjectOptions_ |å…许用户设置å¯é€‰çš„自定义元数æ®ï¼Œcontent-type,content-encoding,content-disposition以åŠcache-control headers,传递加密模å—以加密对象,并å¯é€‰åœ°è®¾ç½®multipart putæ“作的线程数é‡ã€‚ |
-
-__示例__
-
-
-```go
-ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Second)
-defer cancel()
-
-n, err := minioClient.FPutObjectWithContext(ctx, "mybucket", "myobject.csv", "/tmp/otherobject.csv", minio.PutObjectOptions{ContentType:"application/csv"})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded bytes: ", n)
-```
-
-<a name="StatObject"></a>
-### StatObject(bucketName, objectName string, opts StatObjectOptions) (ObjectInfo, error)
-获å–对象的元数æ®ã€‚
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`opts` | _minio.StatObjectOptions_ | GET info/stat请求的一些é¢å¤–å‚数,åƒencryption,If-Match |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`objInfo` | _minio.ObjectInfo_ |对象statä¿¡æ¯ |
-
-
-__minio.ObjectInfo__
-
-|属性 |类型 |æè¿° |
-|:---|:---| :---|
-|`objInfo.LastModified` | _time.Time_ |对象的最åŽä¿®æ”¹æ—¶é—´ |
-|`objInfo.ETag` | _string_ |对象的MD5校验ç |
-|`objInfo.ContentType` | _string_ |对象的Content type|
-|`objInfo.Size` | _int64_ |对象的大å°|
-
-
-__示例__
-
-
-```go
-objInfo, err := minioClient.StatObject("mybucket", "myobject", minio.StatObjectOptions{})
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println(objInfo)
-```
-
-<a name="RemoveObject"></a>
-### RemoveObject(bucketName, objectName string) error
-删除一个对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-
-
-```go
-err = minioClient.RemoveObject("mybucket", "myobject")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="RemoveObjects"></a>
-### RemoveObjects(bucketName string, objectsCh chan string) (errorCh <-chan RemoveObjectError)
-
-从一个input channel里删除一个对象集åˆã€‚一次å‘é€åˆ°æœåŠ¡ç«¯çš„删除请求最多å¯åˆ é™¤1000个对象。通过error channel返回的错误信æ¯ã€‚
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectsCh` | _chan string_ | è¦åˆ é™¤çš„对象的channel |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`errorCh` | _<-chan minio.RemoveObjectError_ | 删除时观察到的错误的Receive-only channel。 |
-
-
-```go
-objectsCh := make(chan string)
-
-// Send object names that are needed to be removed to objectsCh
-go func() {
- defer close(objectsCh)
- // List all objects from a bucket-name with a matching prefix.
- for object := range minioClient.ListObjects("my-bucketname", "my-prefixname", true, nil) {
- if object.Err != nil {
- log.Fatalln(object.Err)
- }
- objectsCh <- object.Key
- }
-}()
-
-for rErr := range minioClient.RemoveObjects("mybucket", objectsCh) {
- fmt.Println("Error detected during deletion: ", rErr)
-}
-```
-
-<a name="RemoveIncompleteUpload"></a>
-### RemoveIncompleteUpload(bucketName, objectName string) error
-删除一个未完整上传的对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-
-__示例__
-
-
-```go
-err = minioClient.RemoveIncompleteUpload("mybucket", "myobject")
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-## 4. æ“作加密对象
-
-<a name="NewSymmetricKey"></a>
-### NewSymmetricKey(key []byte) *encrypt.SymmetricKey
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`key` | _string_ |存储桶å称 |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`symmetricKey` | _*encrypt.SymmetricKey_ | 加密解密的对称秘钥 |
-
-```go
-symKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material with symmetric key.
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(symKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully initialized Symmetric key CBC materials", cbcMaterials)
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-```
-
-<a name="NewAsymmetricKey"></a>
-### NewAsymmetricKey(privateKey []byte, publicKey[]byte) (*encrypt.AsymmetricKey, error)
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`privateKey` | _[]byte_ | Private keyæ•°æ® |
-|`publicKey` | _[]byte_ | Public keyæ•°æ® |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`asymmetricKey` | _*encrypt.AsymmetricKey_ | 加密解密的éžå¯¹ç§°ç§˜é’¥ |
-|`err` | _error_ | 标准Error |
-
-
-```go
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Initialize the asymmetric key
-asymmetricKey, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption material for asymmetric key.
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(asymmetricKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully initialized Asymmetric key CBC materials", cbcMaterials)
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-```
-
-<a name="GetEncryptedObject"></a>
-### GetEncryptedObject(bucketName, objectName string, encryptMaterials encrypt.Materials) (io.ReadCloser, error)
-
-返回对象的解密æµã€‚读æµæ—¶çš„常è§é”™è¯¯ã€‚
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ | 存储桶å称 |
-|`objectName` | _string_ | 对象的å称 |
-|`encryptMaterials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`stream` | _io.ReadCloser_ | 返回对象的reader,调用者需è¦åœ¨è¯»å–之åŽè¿›è¡Œå…³é—­ã€‚ |
-|`err` | _error | é”™è¯¯ä¿¡æ¯ |
-
-
-__示例__
-
-
-```go
-// Generate a master symmetric key
-key := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
-// Build the CBC encryption material
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-object, err := minioClient.GetEncryptedObject("mybucket", "myobject", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-defer object.Close()
-
-localFile, err := os.Create("/tmp/local-file.jpg")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer localFile.Close()
-
-if _, err = io.Copy(localFile, object); err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="PutEncryptedObject"></a>
-
-### PutEncryptedObject(bucketName, objectName string, reader io.Reader, encryptMaterials encrypt.Materials) (n int, err error)
-加密并上传对象。
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`reader` | _io.Reader_ |任何实现io.Reader的Go类型 |
-|`encryptMaterials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-__示例__
-
-```go
-// Load a private key
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Load a public key
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build an asymmetric key
-key, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption module
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Open a file to upload
-file, err := os.Open("my-testfile")
-if err != nil {
- fmt.Println(err)
- return
-}
-defer file.Close()
-
-// Upload the encrypted form of the file
-n, err := minioClient.PutEncryptedObject("mybucket", "myobject", file, cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded encrypted bytes: ", n)
-```
-
-<a name="FPutEncryptedObject"></a>
-### FPutEncryptedObject(bucketName, objectName, filePath, encryptMaterials encrypt.Materials) (n int, err error)
-通过一个文件进行加密并上传到对象。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`filePath` | _string_ |è¦ä¸Šä¼ çš„文件的路径 |
-|`encryptMaterials` | _encrypt.Materials_ | `encrypt`包æ供的对æµåŠ å¯†çš„接å£ï¼Œ(更多信æ¯ï¼Œè¯·çœ‹https://godoc.org/github.com/minio/minio-go) |
-
-__示例__
-
-
-```go
-// Load a private key
-privateKey, err := ioutil.ReadFile("private.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Load a public key
-publicKey, err := ioutil.ReadFile("public.key")
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build an asymmetric key
-key, err := encrypt.NewAsymmetricKey(privateKey, publicKey)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// Build the CBC encryption module
-cbcMaterials, err := encrypt.NewCBCSecureMaterials(key)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-n, err := minioClient.FPutEncryptedObject("mybucket", "myobject.csv", "/tmp/otherobject.csv", cbcMaterials)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully uploaded encrypted bytes: ", n)
-```
-
-<a name="NewSSEInfo"></a>
-
-### NewSSEInfo(key []byte, algo string) SSEInfo
-创建一个通过用户æ供的key(SSE-C),进行æœåŠ¡ç«¯åŠ è§£å¯†æ“作的key对象。
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-| :--- | :--- | :--- |
-| `key` | _[]byte_ | 未编ç çš„二进制key数组 |
-| `algo` | _string_ | 加密算法,å¯ä»¥ä¸ºç©ºï¼ˆé»˜è®¤æ˜¯`AES256`) |
-
-
-## 5. Presignedæ“作
-
-<a name="PresignedGetObject"></a>
-### PresignedGetObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (*url.URL, error)
-生æˆä¸€ä¸ªç”¨äºŽHTTP GETæ“作的presigned URL。æµè§ˆå™¨/移动客户端å¯ä»¥åœ¨å³ä½¿å­˜å‚¨æ¡¶ä¸ºç§æœ‰çš„情况下也å¯ä»¥é€šè¿‡è¿™ä¸ªURL进行下载。这个presigned URLå¯ä»¥æœ‰ä¸€ä¸ªè¿‡æœŸæ—¶é—´ï¼Œé»˜è®¤æ˜¯7天。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`expiry` | _time.Duration_ |presigned URL的过期时间,å•ä½æ˜¯ç§’ |
-|`reqParams` | _url.Values_ |é¢å¤–çš„å“应头,支æŒ_response-expires_, _response-content-type_, _response-cache-control_, _response-content-disposition_。 |
-
-
-__示例__
-
-
-```go
-// Set request parameters for content-disposition.
-reqParams := make(url.Values)
-reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
-// Generates a presigned url which expires in a day.
-presignedURL, err := minioClient.PresignedGetObject("mybucket", "myobject", time.Second * 24 * 60 * 60, reqParams)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedPutObject"></a>
-### PresignedPutObject(bucketName, objectName string, expiry time.Duration) (*url.URL, error)
-生æˆä¸€ä¸ªç”¨äºŽHTTP GETæ“作的presigned URL。æµè§ˆå™¨/移动客户端å¯ä»¥åœ¨å³ä½¿å­˜å‚¨æ¡¶ä¸ºç§æœ‰çš„情况下也å¯ä»¥é€šè¿‡è¿™ä¸ªURL进行下载。这个presigned URLå¯ä»¥æœ‰ä¸€ä¸ªè¿‡æœŸæ—¶é—´ï¼Œé»˜è®¤æ˜¯7天。
-
-注æ„:你å¯ä»¥é€šè¿‡åªæŒ‡å®šå¯¹è±¡å称上传到S3。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`expiry` | _time.Duration_ |presigned URL的过期时间,å•ä½æ˜¯ç§’ |
-
-
-__示例__
-
-
-```go
-// Generates a url which expires in a day.
-expiry := time.Second * 24 * 60 * 60 // 1 day.
-presignedURL, err := minioClient.PresignedPutObject("mybucket", "myobject", expiry)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedHeadObject"></a>
-### PresignedHeadObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (*url.URL, error)
-生æˆä¸€ä¸ªç”¨äºŽHTTP GETæ“作的presigned URL。æµè§ˆå™¨/移动客户端å¯ä»¥åœ¨å³ä½¿å­˜å‚¨æ¡¶ä¸ºç§æœ‰çš„情况下也å¯ä»¥é€šè¿‡è¿™ä¸ªURL进行下载。这个presigned URLå¯ä»¥æœ‰ä¸€ä¸ªè¿‡æœŸæ—¶é—´ï¼Œé»˜è®¤æ˜¯7天。
-
-__å‚æ•°__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectName` | _string_ |对象的å称 |
-|`expiry` | _time.Duration_ |presigned URL的过期时间,å•ä½æ˜¯ç§’ |
-|`reqParams` | _url.Values_ |é¢å¤–çš„å“应头,支æŒ_response-expires_, _response-content-type_, _response-cache-control_, _response-content-disposition_。 |
-
-
-__示例__
-
-
-```go
-// Set request parameters for content-disposition.
-reqParams := make(url.Values)
-reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
-// Generates a presigned url which expires in a day.
-presignedURL, err := minioClient.PresignedHeadObject("mybucket", "myobject", time.Second * 24 * 60 * 60, reqParams)
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Successfully generated presigned URL", presignedURL)
-```
-
-<a name="PresignedPostPolicy"></a>
-### PresignedPostPolicy(PostPolicy) (*url.URL, map[string]string, error)
-å…许给POSTæ“作的presigned URL设置策略æ¡ä»¶ã€‚这些策略包括比如,接收对象上传的存储桶å称,å称å‰ç¼€ï¼Œè¿‡æœŸç­–略。
-
-```go
-// Initialize policy condition config.
-policy := minio.NewPostPolicy()
-
-// Apply upload policy restrictions:
-policy.SetBucket("mybucket")
-policy.SetKey("myobject")
-policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10)) // expires in 10 days
-
-// Only allow 'png' images.
-policy.SetContentType("image/png")
-
-// Only allow content size in range 1KB to 1MB.
-policy.SetContentLengthRange(1024, 1024*1024)
-
-// Add a user metadata using the key "custom" and value "user"
-policy.SetUserMetadata("custom", "user")
-
-// Get the POST form key/value object:
-url, formData, err := minioClient.PresignedPostPolicy(policy)
-if err != nil {
- fmt.Println(err)
- return
-}
-
-// POST your content from the command line using `curl`
-fmt.Printf("curl ")
-for k, v := range formData {
- fmt.Printf("-F %s=%s ", k, v)
-}
-fmt.Printf("-F file=@/etc/bash.bashrc ")
-fmt.Printf("%s\n", url)
-```
-
-## 6. 存储桶策略/通知
-
-<a name="SetBucketPolicy"></a>
-### SetBucketPolicy(bucketname, objectPrefix string, policy policy.BucketPolicy) error
-给存储桶或者对象å‰ç¼€è®¾ç½®è®¿é—®æƒé™ã€‚
-
-必须引入`github.com/minio/minio-go/pkg/policy`包。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称|
-|`objectPrefix` | _string_ |对象的å称å‰ç¼€|
-|`policy` | _policy.BucketPolicy_ |Policyçš„å–值如下: |
-| | | _policy.BucketPolicyNone_ |
-| | | _policy.BucketPolicyReadOnly_ |
-| | | _policy.BucketPolicyReadWrite_ |
-| | | _policy.BucketPolicyWriteOnly_ |
-
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`err` | _error_ |标准Error |
-
-
-__示例__
-
-
-```go
-// Sets 'mybucket' with a sub-directory 'myprefix' to be anonymously accessible for
-// both read and write operations.
-err = minioClient.SetBucketPolicy("mybucket", "myprefix", policy.BucketPolicyReadWrite)
-if err != nil {
- fmt.Println(err)
- return
-}
-```
-
-<a name="GetBucketPolicy"></a>
-### GetBucketPolicy(bucketName, objectPrefix string) (policy.BucketPolicy, error)
-获å–存储桶或者对象å‰ç¼€çš„访问æƒé™ã€‚
-
-必须引入`github.com/minio/minio-go/pkg/policy`包。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectPrefix` | _string_ |该存储桶下的对象å‰ç¼€ |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketPolicy` | _policy.BucketPolicy_ |å–值如下: `none`, `readonly`, `readwrite`,或者`writeonly` |
-|`err` | _error_ |标准Error |
-
-__示例__
-
-
-```go
-bucketPolicy, err := minioClient.GetBucketPolicy("mybucket", "")
-if err != nil {
- fmt.Println(err)
- return
-}
-fmt.Println("Access permissions for mybucket is", bucketPolicy)
-```
-
-<a name="ListBucketPolicies"></a>
-### ListBucketPolicies(bucketName, objectPrefix string) (map[string]BucketPolicy, error)
-获å–指定的存储桶和å‰ç¼€çš„访问策略。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`objectPrefix` | _string_ |该存储桶下的对象å‰ç¼€ |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketPolicies` | _map[string]minio.BucketPolicy_ |对象以åŠå®ƒä»¬çš„æƒé™çš„Map |
-|`err` | _error_ |标准Error |
-
-__示例__
-
-
-```go
-bucketPolicies, err := minioClient.ListBucketPolicies("mybucket", "")
-if err != nil {
- fmt.Println(err)
- return
-}
-for resource, permission := range bucketPolicies {
- fmt.Println(resource, " => ", permission)
-}
-```
-
-<a name="GetBucketNotification"></a>
-### GetBucketNotification(bucketName string) (BucketNotification, error)
-获å–存储桶的通知é…ç½®
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketNotification` | _minio.BucketNotification_ |å«æœ‰æ‰€æœ‰é€šçŸ¥é…置的数æ®ç»“æž„|
-|`err` | _error_ |标准Error |
-
-__示例__
-
-
-```go
-bucketNotification, err := minioClient.GetBucketNotification("mybucket")
-if err != nil {
- fmt.Println("Failed to get bucket notification configurations for mybucket", err)
- return
-}
-
-for _, queueConfig := range bucketNotification.QueueConfigs {
- for _, e := range queueConfig.Events {
- fmt.Println(e + " event is enabled")
- }
-}
-```
-
-<a name="SetBucketNotification"></a>
-### SetBucketNotification(bucketName string, bucketNotification BucketNotification) error
-给存储桶设置新的通知
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-|`bucketNotification` | _minio.BucketNotification_ |å‘é€ç»™é…置的web serviceçš„XML |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`err` | _error_ |标准Error |
-
-__示例__
-
-
-```go
-queueArn := minio.NewArn("aws", "sqs", "us-east-1", "804605494417", "PhotoUpdate")
-
-queueConfig := minio.NewNotificationConfig(queueArn)
-queueConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll)
-queueConfig.AddFilterPrefix("photos/")
-queueConfig.AddFilterSuffix(".jpg")
-
-bucketNotification := minio.BucketNotification{}
-bucketNotification.AddQueue(queueConfig)
-
-err = minioClient.SetBucketNotification("mybucket", bucketNotification)
-if err != nil {
- fmt.Println("Unable to set the bucket notification: ", err)
- return
-}
-```
-
-<a name="RemoveAllBucketNotification"></a>
-### RemoveAllBucketNotification(bucketName string) error
-删除存储桶上所有é…置的通知
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ |存储桶å称 |
-
-__返回值__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`err` | _error_ |标准Error |
-
-__示例__
-
-
-```go
-err = minioClient.RemoveAllBucketNotification("mybucket")
-if err != nil {
- fmt.Println("Unable to remove bucket notifications.", err)
- return
-}
-```
-
-<a name="ListenBucketNotification"></a>
-### ListenBucketNotification(bucketName, prefix, suffix string, events []string, doneCh <-chan struct{}) <-chan NotificationInfo
-ListenBucketNotification API通过notification channel接收存储桶通知事件。返回的notification channel有两个属性,'Records'和'Err'。
-
-- 'Records'æŒæœ‰ä»ŽæœåŠ¡å™¨è¿”回的通知信æ¯ã€‚
-- 'Err'表示的是处ç†æŽ¥æ”¶åˆ°çš„通知时报的任何错误。
-
-注æ„:一旦报错,notification channel就会关闭。
-
-__å‚æ•°__
-
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`bucketName` | _string_ | 被监å¬é€šçŸ¥çš„存储桶 |
-|`prefix` | _string_ | 过滤通知的对象å‰ç¼€ |
-|`suffix` | _string_ | 过滤通知的对象åŽç¼€ |
-|`events` | _[]string_ | å¼€å¯æŒ‡å®šäº‹ä»¶ç±»åž‹çš„通知 |
-|`doneCh` | _chan struct{}_ | 在该channel上结æŸListenBucketNotification iterator的一个message。 |
-
-__返回值__
-
-|å‚æ•° |类型 |æè¿° |
-|:---|:---| :---|
-|`notificationInfo` | _chan minio.NotificationInfo_ | 存储桶通知的channel |
-
-__minio.NotificationInfo__
-
-|属性 |类型 |æè¿° |
-|`notificationInfo.Records` | _[]minio.NotificationEvent_ | é€šçŸ¥äº‹ä»¶çš„é›†åˆ |
-|`notificationInfo.Err` | _error_ | æ“作时报的任何错误(标准Error) |
-
-
-__示例__
-
-
-```go
-// Create a done channel to control 'ListenBucketNotification' go routine.
-doneCh := make(chan struct{})
-
-// Indicate a background go-routine to exit cleanly upon return.
-defer close(doneCh)
-
-// Listen for bucket notifications on "mybucket" filtered by prefix, suffix and events.
-for notificationInfo := range minioClient.ListenBucketNotification("mybucket", "myprefix/", ".mysuffix", []string{
- "s3:ObjectCreated:*",
- "s3:ObjectAccessed:*",
- "s3:ObjectRemoved:*",
- }, doneCh) {
- if notificationInfo.Err != nil {
- fmt.Println(notificationInfo.Err)
- }
- fmt.Println(notificationInfo)
-}
-```
-
-## 7. 客户端自定义设置
-
-<a name="SetAppInfo"></a>
-### SetAppInfo(appName, appVersion string)
-ç»™User-Agent添加的自定义应用信æ¯ã€‚
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`appName` | _string_ | å‘请求的应用å称 |
-| `appVersion`| _string_ | å‘请求的应用版本 |
-
-
-__示例__
-
-
-```go
-// Set Application name and version to be used in subsequent API requests.
-minioClient.SetAppInfo("myCloudApp", "1.0.0")
-```
-
-<a name="SetCustomTransport"></a>
-### SetCustomTransport(customHTTPTransport http.RoundTripper)
-é‡å†™é»˜è®¤çš„HTTP transport,通常用于调试或者添加自定义的TLSè¯ä¹¦ã€‚
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`customHTTPTransport` | _http.RoundTripper_ | 自定义的transport,例如:为了调试对API请求å“应进行追踪。|
-
-
-<a name="TraceOn"></a>
-### TraceOn(outputStream io.Writer)
-å¼€å¯HTTP tracing。追踪信æ¯è¾“出到io.Writer,如果outputstream为nil,则trace写入到os.Stdout标准输出。
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`outputStream` | _io.Writer_ | HTTP trace写入到outputStream |
-
-
-<a name="TraceOff"></a>
-### TraceOff()
-关闭HTTP tracing。
-
-<a name="SetS3TransferAccelerate"></a>
-### SetS3TransferAccelerate(acceleratedEndpoint string)
-ç»™åŽç»­æ‰€æœ‰API请求设置ASW S3传输加速endpoint。
-注æ„:此API仅对AWS S3有效,对其它S3兼容的对象存储æœåŠ¡ä¸ç”Ÿæ•ˆã€‚
-
-__å‚æ•°__
-
-| å‚æ•° | 类型 | æè¿° |
-|---|---|---|
-|`acceleratedEndpoint` | _string_ | 设置新的S3传输加速endpoint。|
-
-
-## 8. 了解更多
-
-- [用Go语言创建属于你的音ä¹æ’­æ”¾å™¨APP示例](https://docs.minio.io/docs/go-music-player-app)
diff --git a/vendor/github.com/minio/minio-go/docs/zh_CN/CONTRIBUTING.md b/vendor/github.com/minio/minio-go/docs/zh_CN/CONTRIBUTING.md
deleted file mode 100644
index bc408c611..000000000
--- a/vendor/github.com/minio/minio-go/docs/zh_CN/CONTRIBUTING.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-### å¼€å‘者指å—
-
-``minio-go``欢迎你的贡献。为了让大家é…åˆæ›´åŠ é»˜å¥‘,我们åšå‡ºå¦‚下约定:
-
-* fork项目并修改,我们鼓励大家使用pull requests进行代ç ç›¸å…³çš„讨论。
- - Fork项目
- - 创建你的特性分支 (git checkout -b my-new-feature)
- - Commit你的修改(git commit -am 'Add some feature')
- - Push到远程分支(git push origin my-new-feature)
- - 创建一个Pull Request
-
-* 当你准备创建pull request时,请确ä¿ï¼š
- - 写å•å…ƒæµ‹è¯•ï¼Œå¦‚果你有什么疑问,请在pull request中æ出æ¥ã€‚
- - è¿è¡Œ`go fmt`
- - 将你的多个æ交åˆå¹¶æˆä¸€ä¸ªæ交: `git rebase -i`。你å¯ä»¥å¼ºåˆ¶updateä½ çš„pull request。
- - ç¡®ä¿`go test -race ./...`å’Œ`go build`完æˆã€‚
- 注æ„:go test会进行功能测试,这需è¦ä½ æœ‰ä¸€ä¸ªAWS S3è´¦å·ã€‚将账户信æ¯è®¾ä¸º``ACCESS_KEY``å’Œ``SECRET_KEY``环境å˜é‡ã€‚如果想è¿è¡Œç®€ç‰ˆæµ‹è¯•ï¼Œè¯·ä½¿ç”¨``go test -short -race ./...``。
-
-* 请阅读 [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments)
- - `minio-go`项目严格符åˆGolang风格
- - 如果您看到代ç æœ‰é—®é¢˜ï¼Œè¯·éšæ—¶å‘一个pull request
diff --git a/vendor/github.com/minio/minio-go/examples/minio/listenbucketnotification.go b/vendor/github.com/minio/minio-go/examples/minio/listenbucketnotification.go
deleted file mode 100644
index 4c48510da..000000000
--- a/vendor/github.com/minio/minio-go/examples/minio/listenbucketnotification.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- minioClient, err := minio.New("play.minio.io:9000", "YOUR-ACCESS", "YOUR-SECRET", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- // Create a done channel to control 'ListenBucketNotification' go routine.
- doneCh := make(chan struct{})
-
- // Indicate to our routine to exit cleanly upon return.
- defer close(doneCh)
-
- // Listen for bucket notifications on "mybucket" filtered by prefix, suffix and events.
- for notificationInfo := range minioClient.ListenBucketNotification("YOUR-BUCKET", "PREFIX", "SUFFIX", []string{
- "s3:ObjectCreated:*",
- "s3:ObjectAccessed:*",
- "s3:ObjectRemoved:*",
- }, doneCh) {
- if notificationInfo.Err != nil {
- log.Fatalln(notificationInfo.Err)
- }
- log.Println(notificationInfo)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/bucketexists.go b/vendor/github.com/minio/minio-go/examples/s3/bucketexists.go
deleted file mode 100644
index 20dea30a3..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/bucketexists.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- found, err := s3Client.BucketExists("my-bucketname")
- if err != nil {
- log.Fatalln(err)
- }
-
- if found {
- log.Println("Bucket found.")
- } else {
- log.Println("Bucket not found.")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/composeobject.go b/vendor/github.com/minio/minio-go/examples/s3/composeobject.go
deleted file mode 100644
index 2f76ff053..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/composeobject.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- minio "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Enable trace.
- // s3Client.TraceOn(os.Stderr)
-
- // Prepare source decryption key (here we assume same key to
- // decrypt all source objects.)
- decKey := minio.NewSSEInfo([]byte{1, 2, 3}, "")
-
- // Source objects to concatenate. We also specify decryption
- // key for each
- src1 := minio.NewSourceInfo("bucket1", "object1", &decKey)
- src1.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
- src2 := minio.NewSourceInfo("bucket2", "object2", &decKey)
- src2.SetMatchETagCond("f8ef9c385918b653a31624deb84149d2")
-
- src3 := minio.NewSourceInfo("bucket3", "object3", &decKey)
- src3.SetMatchETagCond("5918b653a31624deb84149d2f8ef9c38")
-
- // Create slice of sources.
- srcs := []minio.SourceInfo{src1, src2, src3}
-
- // Prepare destination encryption key
- encKey := minio.NewSSEInfo([]byte{8, 9, 0}, "")
-
- // Create destination info
- dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil)
- if err != nil {
- log.Fatalln(err)
- }
-
- err = s3Client.ComposeObject(dst, srcs)
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Composed object successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/copyobject.go b/vendor/github.com/minio/minio-go/examples/s3/copyobject.go
deleted file mode 100644
index a7c3eca45..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/copyobject.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "time"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Enable trace.
- // s3Client.TraceOn(os.Stderr)
-
- // Source object
- src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil)
-
- // All following conditions are allowed and can be combined together.
-
- // Set modified condition, copy object modified since 2014 April.
- src.SetModifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC))
-
- // Set unmodified condition, copy object unmodified since 2014 April.
- // src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC))
-
- // Set matching ETag condition, copy object which matches the following ETag.
- // src.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a")
-
- // Set matching ETag except condition, copy object which does not match the following ETag.
- // src.SetMatchETagExceptCond("31624deb84149d2f8ef9c385918b653a")
-
- // Destination object
- dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Initiate copy object.
- err = s3Client.CopyObject(dst, src)
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Copied source object /my-sourcebucketname/my-sourceobjectname to destination /my-bucketname/my-objectname Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/fgetobject-context.go b/vendor/github.com/minio/minio-go/examples/s3/fgetobject-context.go
deleted file mode 100644
index 6004baa14..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/fgetobject-context.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "time"
-
- "context"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname
- // and my-filename.csv are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
-
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
- defer cancel()
-
- if err := s3Client.FGetObjectWithContext(ctx, "my-bucketname", "my-objectname", "my-filename.csv", minio.GetObjectOptions{}); err != nil {
- log.Fatalln(err)
- }
- log.Println("Successfully saved my-filename.csv")
-
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/fgetobject.go b/vendor/github.com/minio/minio-go/examples/s3/fgetobject.go
deleted file mode 100644
index 819a34f91..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/fgetobject.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname
- // and my-filename.csv are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- if err := s3Client.FGetObject("my-bucketname", "my-objectname", "my-filename.csv", minio.GetObjectOptions{}); err != nil {
- log.Fatalln(err)
- }
- log.Println("Successfully saved my-filename.csv")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/fputencrypted-object.go b/vendor/github.com/minio/minio-go/examples/s3/fputencrypted-object.go
deleted file mode 100644
index 96eec7e8f..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/fputencrypted-object.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
- "github.com/minio/minio-go/pkg/encrypt"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Specify a local file that we will upload
- filePath := "my-testfile"
-
- //// Build an asymmetric key from private and public files
- //
- // privateKey, err := ioutil.ReadFile("private.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // publicKey, err := ioutil.ReadFile("public.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // asymmetricKey, err := NewAsymmetricKey(privateKey, publicKey)
- // if err != nil {
- // t.Fatal(err)
- // }
- ////
-
- // Build a symmetric key
- symmetricKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
- // Build encryption materials which will encrypt uploaded data
- cbcMaterials, err := encrypt.NewCBCSecureMaterials(symmetricKey)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Encrypt file content and upload to the server
- n, err := s3Client.FPutEncryptedObject("my-bucketname", "my-objectname", filePath, cbcMaterials)
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/fputobject-context.go b/vendor/github.com/minio/minio-go/examples/s3/fputobject-context.go
deleted file mode 100644
index d7c941c2b..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/fputobject-context.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "time"
-
- "context"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname
- // and my-filename.csv are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
-
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
- defer cancel()
-
- if _, err := s3Client.FPutObjectWithContext(ctx, "my-bucketname", "my-objectname", "my-filename.csv", minio.PutObjectOptions{ContentType: "application/csv"}); err != nil {
- log.Fatalln(err)
- }
- log.Println("Successfully uploaded my-filename.csv")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/fputobject.go b/vendor/github.com/minio/minio-go/examples/s3/fputobject.go
deleted file mode 100644
index 34d876804..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/fputobject.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname
- // and my-filename.csv are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- if _, err := s3Client.FPutObject("my-bucketname", "my-objectname", "my-filename.csv", minio.PutObjectOptions{
- ContentType: "application/csv",
- }); err != nil {
- log.Fatalln(err)
- }
- log.Println("Successfully uploaded my-filename.csv")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/get-encrypted-object.go b/vendor/github.com/minio/minio-go/examples/s3/get-encrypted-object.go
deleted file mode 100644
index 9783bebe8..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/get-encrypted-object.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "io"
- "log"
- "os"
-
- "github.com/minio/minio-go"
- "github.com/minio/minio-go/pkg/encrypt"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname and
- // my-testfile are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESS-KEY-HERE", "YOUR-SECRET-KEY-HERE", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- //// Build an asymmetric key from private and public files
- //
- // privateKey, err := ioutil.ReadFile("private.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // publicKey, err := ioutil.ReadFile("public.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // asymmetricKey, err := NewAsymmetricKey(privateKey, publicKey)
- // if err != nil {
- // t.Fatal(err)
- // }
- ////
-
- // Build a symmetric key
- symmetricKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
- // Build encryption materials which will encrypt uploaded data
- cbcMaterials, err := encrypt.NewCBCSecureMaterials(symmetricKey)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Get a deciphered data from the server, deciphering is assured by cbcMaterials
- reader, err := s3Client.GetEncryptedObject("my-bucketname", "my-objectname", cbcMaterials)
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- // Local file which holds plain data
- localFile, err := os.Create("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer localFile.Close()
-
- if _, err := io.Copy(localFile, reader); err != nil {
- log.Fatalln(err)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/getbucketnotification.go b/vendor/github.com/minio/minio-go/examples/s3/getbucketnotification.go
deleted file mode 100644
index 19349baaf..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/getbucketnotification.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- notifications, err := s3Client.GetBucketNotification("my-bucketname")
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Bucket notification are successfully retrieved.")
-
- for _, topicConfig := range notifications.TopicConfigs {
- for _, e := range topicConfig.Events {
- log.Println(e + " event is enabled.")
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/getbucketpolicy.go b/vendor/github.com/minio/minio-go/examples/s3/getbucketpolicy.go
deleted file mode 100644
index f9ac89b61..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/getbucketpolicy.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- // Fetch the policy at 'my-objectprefix'.
- policy, err := s3Client.GetBucketPolicy("my-bucketname", "my-objectprefix")
- if err != nil {
- log.Fatalln(err)
- }
-
- // Description of policy output.
- // "none" - The specified bucket does not have a bucket policy.
- // "readonly" - Read only operations are allowed.
- // "writeonly" - Write only operations are allowed.
- // "readwrite" - both read and write operations are allowed, the bucket is public.
- log.Println("Success - ", policy)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/getobject-context.go b/vendor/github.com/minio/minio-go/examples/s3/getobject-context.go
deleted file mode 100644
index c7d41707a..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/getobject-context.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "io"
- "log"
- "os"
- "time"
-
- "context"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname and
- // my-testfile are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
-
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESS-KEY-HERE", "YOUR-SECRET-KEY-HERE", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
- defer cancel()
-
- opts := minio.GetObjectOptions{}
- opts.SetModified(time.Now().Round(10 * time.Minute)) // get object if was modified within the last 10 minutes
- reader, err := s3Client.GetObjectWithContext(ctx, "my-bucketname", "my-objectname", opts)
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- localFile, err := os.Create("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer localFile.Close()
-
- stat, err := reader.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- if _, err := io.CopyN(localFile, reader, stat.Size); err != nil {
- log.Fatalln(err)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/getobject.go b/vendor/github.com/minio/minio-go/examples/s3/getobject.go
deleted file mode 100644
index e17ef8172..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/getobject.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "io"
- "log"
- "os"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname, my-objectname and
- // my-testfile are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESS-KEY-HERE", "YOUR-SECRET-KEY-HERE", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- reader, err := s3Client.GetObject("my-bucketname", "my-objectname", minio.GetObjectOptions{})
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- localFile, err := os.Create("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer localFile.Close()
-
- stat, err := reader.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- if _, err := io.CopyN(localFile, reader, stat.Size); err != nil {
- log.Fatalln(err)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listbucketpolicies.go b/vendor/github.com/minio/minio-go/examples/s3/listbucketpolicies.go
deleted file mode 100644
index 43edd0c3d..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listbucketpolicies.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- // Fetch the policy at 'my-objectprefix'.
- policies, err := s3Client.ListBucketPolicies("my-bucketname", "my-objectprefix")
- if err != nil {
- log.Fatalln(err)
- }
-
- // ListBucketPolicies returns a map of objects policy rules and their associated permissions
- // e.g. mybucket/downloadfolder/* => readonly
- // mybucket/shared/* => readwrite
-
- for resource, permission := range policies {
- log.Println(resource, " => ", permission)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listbuckets.go b/vendor/github.com/minio/minio-go/examples/s3/listbuckets.go
deleted file mode 100644
index 5eae587b4..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listbuckets.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID and YOUR-SECRETACCESSKEY are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- buckets, err := s3Client.ListBuckets()
- if err != nil {
- log.Fatalln(err)
- }
- for _, bucket := range buckets {
- log.Println(bucket)
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listincompleteuploads.go b/vendor/github.com/minio/minio-go/examples/s3/listincompleteuploads.go
deleted file mode 100644
index a5a79b603..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listincompleteuploads.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-prefixname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Create a done channel to control 'ListObjects' go routine.
- doneCh := make(chan struct{})
-
- // Indicate to our routine to exit cleanly upon return.
- defer close(doneCh)
-
- // List all multipart uploads from a bucket-name with a matching prefix.
- for multipartObject := range s3Client.ListIncompleteUploads("my-bucketname", "my-prefixname", true, doneCh) {
- if multipartObject.Err != nil {
- fmt.Println(multipartObject.Err)
- return
- }
- fmt.Println(multipartObject)
- }
- return
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listobjects-N.go b/vendor/github.com/minio/minio-go/examples/s3/listobjects-N.go
deleted file mode 100644
index 55bceb470..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listobjects-N.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-prefixname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- // List 'N' number of objects from a bucket-name with a matching prefix.
- listObjectsN := func(bucket, prefix string, recursive bool, N int) (objsInfo []minio.ObjectInfo, err error) {
- // Create a done channel to control 'ListObjects' go routine.
- doneCh := make(chan struct{}, 1)
-
- // Free the channel upon return.
- defer close(doneCh)
-
- i := 1
- for object := range s3Client.ListObjects(bucket, prefix, recursive, doneCh) {
- if object.Err != nil {
- return nil, object.Err
- }
- i++
- // Verify if we have printed N objects.
- if i == N {
- // Indicate ListObjects go-routine to exit and stop
- // feeding the objectInfo channel.
- doneCh <- struct{}{}
- }
- objsInfo = append(objsInfo, object)
- }
- return objsInfo, nil
- }
-
- // List recursively first 100 entries for prefix 'my-prefixname'.
- recursive := true
- objsInfo, err := listObjectsN("my-bucketname", "my-prefixname", recursive, 100)
- if err != nil {
- fmt.Println(err)
- }
-
- // Print all the entries.
- fmt.Println(objsInfo)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listobjects.go b/vendor/github.com/minio/minio-go/examples/s3/listobjects.go
deleted file mode 100644
index 1da2e3faa..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listobjects.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-prefixname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- // Create a done channel to control 'ListObjects' go routine.
- doneCh := make(chan struct{})
-
- // Indicate to our routine to exit cleanly upon return.
- defer close(doneCh)
-
- // List all objects from a bucket-name with a matching prefix.
- for object := range s3Client.ListObjects("my-bucketname", "my-prefixname", true, doneCh) {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
- }
- return
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/listobjectsV2.go b/vendor/github.com/minio/minio-go/examples/s3/listobjectsV2.go
deleted file mode 100644
index 190aec36b..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/listobjectsV2.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-prefixname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- // Create a done channel to control 'ListObjects' go routine.
- doneCh := make(chan struct{})
-
- // Indicate to our routine to exit cleanly upon return.
- defer close(doneCh)
-
- // List all objects from a bucket-name with a matching prefix.
- for object := range s3Client.ListObjectsV2("my-bucketname", "my-prefixname", true, doneCh) {
- if object.Err != nil {
- fmt.Println(object.Err)
- return
- }
- fmt.Println(object)
- }
- return
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/makebucket.go b/vendor/github.com/minio/minio-go/examples/s3/makebucket.go
deleted file mode 100644
index 419c96cf2..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/makebucket.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- err = s3Client.MakeBucket("my-bucketname", "us-east-1")
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/presignedgetobject.go b/vendor/github.com/minio/minio-go/examples/s3/presignedgetobject.go
deleted file mode 100644
index fd7fb9e8d..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/presignedgetobject.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "net/url"
- "time"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Set request parameters
- reqParams := make(url.Values)
- reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
- // Gernerate presigned get object url.
- presignedURL, err := s3Client.PresignedGetObject("my-bucketname", "my-objectname", time.Duration(1000)*time.Second, reqParams)
- if err != nil {
- log.Fatalln(err)
- }
- log.Println(presignedURL)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go b/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go
deleted file mode 100644
index 8dbc0a4b7..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "net/url"
- "time"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Set request parameters
- reqParams := make(url.Values)
- reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"")
-
- // Gernerate presigned get object url.
- presignedURL, err := s3Client.PresignedHeadObject("my-bucketname", "my-objectname", time.Duration(1000)*time.Second, reqParams)
- if err != nil {
- log.Fatalln(err)
- }
- log.Println(presignedURL)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/presignedpostpolicy.go b/vendor/github.com/minio/minio-go/examples/s3/presignedpostpolicy.go
deleted file mode 100644
index 205ac95a3..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/presignedpostpolicy.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "fmt"
- "log"
- "time"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- policy := minio.NewPostPolicy()
- policy.SetBucket("my-bucketname")
- policy.SetKey("my-objectname")
- // Expires in 10 days.
- policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10))
- // Returns form data for POST form request.
- url, formData, err := s3Client.PresignedPostPolicy(policy)
- if err != nil {
- log.Fatalln(err)
- }
- fmt.Printf("curl ")
- for k, v := range formData {
- fmt.Printf("-F %s=%s ", k, v)
- }
- fmt.Printf("-F file=@/etc/bash.bashrc ")
- fmt.Printf("%s\n", url)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/presignedputobject.go b/vendor/github.com/minio/minio-go/examples/s3/presignedputobject.go
deleted file mode 100644
index b2f8b4f82..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/presignedputobject.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "time"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- presignedURL, err := s3Client.PresignedPutObject("my-bucketname", "my-objectname", time.Duration(1000)*time.Second)
- if err != nil {
- log.Fatalln(err)
- }
- log.Println(presignedURL)
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/put-encrypted-object.go b/vendor/github.com/minio/minio-go/examples/s3/put-encrypted-object.go
deleted file mode 100644
index cdf09ac53..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/put-encrypted-object.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "os"
-
- "github.com/minio/minio-go"
- "github.com/minio/minio-go/pkg/encrypt"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Open a local file that we will upload
- file, err := os.Open("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer file.Close()
-
- //// Build an asymmetric key from private and public files
- //
- // privateKey, err := ioutil.ReadFile("private.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // publicKey, err := ioutil.ReadFile("public.key")
- // if err != nil {
- // t.Fatal(err)
- // }
- //
- // asymmetricKey, err := NewAsymmetricKey(privateKey, publicKey)
- // if err != nil {
- // t.Fatal(err)
- // }
- ////
-
- // Build a symmetric key
- symmetricKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00"))
-
- // Build encryption materials which will encrypt uploaded data
- cbcMaterials, err := encrypt.NewCBCSecureMaterials(symmetricKey)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Encrypt file content and upload to the server
- n, err := s3Client.PutEncryptedObject("my-bucketname", "my-objectname", file, cbcMaterials)
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-context.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-context.go
deleted file mode 100644
index acc923f7e..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject-context.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "os"
- "time"
-
- "context"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
-
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
- defer cancel()
-
- object, err := os.Open("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer object.Close()
-
- objectStat, err := object.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- n, err := s3Client.PutObjectWithContext(ctx, "my-bucketname", "my-objectname", object, objectStat.Size(), minio.PutObjectOptions{
- ContentType: "application/octet-stream",
- })
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-getobject-sse.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-getobject-sse.go
deleted file mode 100644
index 3d3b2fd2d..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject-getobject-sse.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "bytes"
- "crypto/md5"
- "encoding/base64"
- "io/ioutil"
- "log"
-
- minio "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- minioClient, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- content := bytes.NewReader([]byte("Hello again"))
- key := []byte("32byteslongsecretkeymustprovided")
- h := md5.New()
- h.Write(key)
- encryptionKey := base64.StdEncoding.EncodeToString(key)
- encryptionKeyMD5 := base64.StdEncoding.EncodeToString(h.Sum(nil))
-
- // Amazon S3 does not store the encryption key you provide.
- // Instead S3 stores a randomly salted HMAC value of the
- // encryption key in order to validate future requests.
- // The salted HMAC value cannot be used to derive the value
- // of the encryption key or to decrypt the contents of the
- // encrypted object. That means, if you lose the encryption
- // key, you lose the object.
- var metadata = map[string]string{
- "x-amz-server-side-encryption-customer-algorithm": "AES256",
- "x-amz-server-side-encryption-customer-key": encryptionKey,
- "x-amz-server-side-encryption-customer-key-MD5": encryptionKeyMD5,
- }
-
- // minioClient.TraceOn(os.Stderr) // Enable to debug.
- _, err = minioClient.PutObject("mybucket", "my-encrypted-object.txt", content, 11, minio.PutObjectOptions{UserMetadata: metadata})
- if err != nil {
- log.Fatalln(err)
- }
-
- opts := minio.GetObjectOptions{}
- for k, v := range metadata {
- opts.Set(k, v)
- }
- coreClient := minio.Core{minioClient}
- reader, _, err := coreClient.GetObject("mybucket", "my-encrypted-object.txt", opts)
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- decBytes, err := ioutil.ReadAll(reader)
- if err != nil {
- log.Fatalln(err)
- }
- if !bytes.Equal(decBytes, []byte("Hello again")) {
- log.Fatalln("Expected \"Hello, world\", got %s", string(decBytes))
- }
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go
deleted file mode 100644
index 0e92dd65e..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/cheggaaa/pb"
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- reader, err := s3Client.GetObject("my-bucketname", "my-objectname", minio.GetObjectOptions{})
- if err != nil {
- log.Fatalln(err)
- }
- defer reader.Close()
-
- objectInfo, err := reader.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- // Progress reader is notified as PutObject makes progress with
- // the Reads inside.
- progress := pb.New64(objectInfo.Size)
- progress.Start()
- n, err := s3Client.PutObject("my-bucketname", "my-objectname-progress", reader, objectInfo.Size, minio.PutObjectOptions{ContentType: "application/octet-stream", Progress: progress})
-
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go
deleted file mode 100644
index 06345cd87..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "os"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // Enable S3 transfer accelerate endpoint.
- s3Client.SetS3TransferAccelerate("s3-accelerate.amazonaws.com")
-
- object, err := os.Open("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer object.Close()
-
- objectStat, err := object.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- n, err := s3Client.PutObject("my-bucketname", "my-objectname", object, objectStat.Size(), minio.PutObjectOptions{ContentType: "application/octet-stream"})
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-streaming.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-streaming.go
deleted file mode 100644
index 85b78dd45..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject-streaming.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "os"
-
- minio "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- object, err := os.Open("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer object.Close()
-
- n, err := s3Client.PutObject("my-bucketname", "my-objectname", object, -1, minio.PutObjectOptions{})
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject.go b/vendor/github.com/minio/minio-go/examples/s3/putobject.go
deleted file mode 100644
index b9e4ff16c..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/putobject.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
- "os"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-testfile, my-bucketname and
- // my-objectname are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- object, err := os.Open("my-testfile")
- if err != nil {
- log.Fatalln(err)
- }
- defer object.Close()
- objectStat, err := object.Stat()
- if err != nil {
- log.Fatalln(err)
- }
-
- n, err := s3Client.PutObject("my-bucketname", "my-objectname", object, objectStat.Size(), minio.PutObjectOptions{ContentType: "application/octet-stream"})
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Uploaded", "my-objectname", " of size: ", n, "Successfully.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/removeallbucketnotification.go b/vendor/github.com/minio/minio-go/examples/s3/removeallbucketnotification.go
deleted file mode 100644
index 1186afad8..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/removeallbucketnotification.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- err = s3Client.RemoveAllBucketNotification("my-bucketname")
- if err != nil {
- log.Fatalln(err)
- }
-
- log.Println("Bucket notification are successfully removed.")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/removebucket.go b/vendor/github.com/minio/minio-go/examples/s3/removebucket.go
deleted file mode 100644
index 7a7737ee0..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/removebucket.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // This operation will only work if your bucket is empty.
- err = s3Client.RemoveBucket("my-bucketname")
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Success")
-
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/removeincompleteupload.go b/vendor/github.com/minio/minio-go/examples/s3/removeincompleteupload.go
deleted file mode 100644
index 31cc8790b..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/removeincompleteupload.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- err = s3Client.RemoveIncompleteUpload("my-bucketname", "my-objectname")
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/removeobject.go b/vendor/github.com/minio/minio-go/examples/s3/removeobject.go
deleted file mode 100644
index 7e5848576..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/removeobject.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
- err = s3Client.RemoveObject("my-bucketname", "my-objectname")
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/removeobjects.go b/vendor/github.com/minio/minio-go/examples/s3/removeobjects.go
deleted file mode 100644
index b912bc85d..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/removeobjects.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- objectsCh := make(chan string)
-
- // Send object names that are needed to be removed to objectsCh
- go func() {
- defer close(objectsCh)
- // List all objects from a bucket-name with a matching prefix.
- for object := range s3Client.ListObjects("my-bucketname", "my-prefixname", true, doneCh) {
- if object.Err != nil {
- log.Fatalln(object.Err)
- }
- objectsCh <- object.Key
- }
- }()
-
- // Call RemoveObjects API
- errorCh := s3Client.RemoveObjects("my-bucketname", objectsCh)
-
- // Print errors received from RemoveObjects API
- for e := range errorCh {
- log.Fatalln("Failed to remove " + e.ObjectName + ", error: " + e.Err.Error())
- }
-
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/setbucketnotification.go b/vendor/github.com/minio/minio-go/examples/s3/setbucketnotification.go
deleted file mode 100644
index b5af30f06..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/setbucketnotification.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- // ARN represents a notification channel that needs to be created in your S3 provider
- // (e.g. http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
-
- // An example of an ARN:
- // arn:aws:sns:us-east-1:804064459714:UploadPhoto
- // ^ ^ ^ ^ ^
- // Provider __| | | | |
- // | Region Account ID |_ Notification Name
- // Service _|
- //
- // You should replace YOUR-PROVIDER, YOUR-SERVICE, YOUR-REGION, YOUR-ACCOUNT-ID and YOUR-RESOURCE
- // with actual values that you receive from the S3 provider
-
- // Here you create a new Topic notification
- topicArn := minio.NewArn("YOUR-PROVIDER", "YOUR-SERVICE", "YOUR-REGION", "YOUR-ACCOUNT-ID", "YOUR-RESOURCE")
- topicConfig := minio.NewNotificationConfig(topicArn)
- topicConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll)
- topicConfig.AddFilterPrefix("photos/")
- topicConfig.AddFilterSuffix(".jpg")
-
- // Create a new Queue notification
- queueArn := minio.NewArn("YOUR-PROVIDER", "YOUR-SERVICE", "YOUR-REGION", "YOUR-ACCOUNT-ID", "YOUR-RESOURCE")
- queueConfig := minio.NewNotificationConfig(queueArn)
- queueConfig.AddEvents(minio.ObjectRemovedAll)
-
- // Create a new Lambda (CloudFunction)
- lambdaArn := minio.NewArn("YOUR-PROVIDER", "YOUR-SERVICE", "YOUR-REGION", "YOUR-ACCOUNT-ID", "YOUR-RESOURCE")
- lambdaConfig := minio.NewNotificationConfig(lambdaArn)
- lambdaConfig.AddEvents(minio.ObjectRemovedAll)
- lambdaConfig.AddFilterSuffix(".swp")
-
- // Now, set all previously created notification configs
- bucketNotification := minio.BucketNotification{}
- bucketNotification.AddTopic(topicConfig)
- bucketNotification.AddQueue(queueConfig)
- bucketNotification.AddLambda(lambdaConfig)
-
- err = s3Client.SetBucketNotification("YOUR-BUCKET", bucketNotification)
- if err != nil {
- log.Fatalln("Error: " + err.Error())
- }
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/setbucketpolicy.go b/vendor/github.com/minio/minio-go/examples/s3/setbucketpolicy.go
deleted file mode 100644
index c81fb5050..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/setbucketpolicy.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
- "github.com/minio/minio-go/pkg/policy"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
- // dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
-
- // s3Client.TraceOn(os.Stderr)
-
- // Description of policy input.
- // policy.BucketPolicyNone - Remove any previously applied bucket policy at a prefix.
- // policy.BucketPolicyReadOnly - Set read-only operations at a prefix.
- // policy.BucketPolicyWriteOnly - Set write-only operations at a prefix.
- // policy.BucketPolicyReadWrite - Set read-write operations at a prefix.
- err = s3Client.SetBucketPolicy("my-bucketname", "my-objectprefix", policy.BucketPolicyReadWrite)
- if err != nil {
- log.Fatalln(err)
- }
- log.Println("Success")
-}
diff --git a/vendor/github.com/minio/minio-go/examples/s3/statobject.go b/vendor/github.com/minio/minio-go/examples/s3/statobject.go
deleted file mode 100644
index 0b27a83b3..000000000
--- a/vendor/github.com/minio/minio-go/examples/s3/statobject.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build ignore
-
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package main
-
-import (
- "log"
-
- "github.com/minio/minio-go"
-)
-
-func main() {
- // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname
- // are dummy values, please replace them with original values.
-
- // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
- // This boolean value is the last argument for New().
-
- // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
- // determined based on the Endpoint value.
- s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true)
- if err != nil {
- log.Fatalln(err)
- }
- stat, err := s3Client.StatObject("my-bucketname", "my-objectname", minio.StatObjectOptions{})
- if err != nil {
- log.Fatalln(err)
- }
- log.Println(stat)
-}
diff --git a/vendor/github.com/minio/minio-go/get-options_test.go b/vendor/github.com/minio/minio-go/get-options_test.go
deleted file mode 100644
index c5344a0c6..000000000
--- a/vendor/github.com/minio/minio-go/get-options_test.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "fmt"
- "testing"
-)
-
-func TestSetHeader(t *testing.T) {
- testCases := []struct {
- start int64
- end int64
- errVal error
- expected string
- }{
- {0, 10, nil, "bytes=0-10"},
- {1, 10, nil, "bytes=1-10"},
- {5, 0, nil, "bytes=5-"},
- {0, -5, nil, "bytes=-5"},
- {0, 0, nil, "bytes=0-0"},
- {11, 10, fmt.Errorf("Invalid range specified: start=11 end=10"),
- ""},
- {-1, 10, fmt.Errorf("Invalid range specified: start=-1 end=10"), ""},
- {-1, 0, fmt.Errorf("Invalid range specified: start=-1 end=0"), ""},
- {1, -5, fmt.Errorf("Invalid range specified: start=1 end=-5"), ""},
- }
- for i, testCase := range testCases {
- opts := GetObjectOptions{}
- err := opts.SetRange(testCase.start, testCase.end)
- if err == nil && testCase.errVal != nil {
- t.Errorf("Test %d: Expected to fail with '%v' but it passed",
- i+1, testCase.errVal)
- } else if err != nil && testCase.errVal.Error() != err.Error() {
- t.Errorf("Test %d: Expected error '%v' but got error '%v'",
- i+1, testCase.errVal, err)
- } else if err == nil && opts.headers["Range"] != testCase.expected {
- t.Errorf("Test %d: Expected range header '%s', but got '%s'",
- i+1, testCase.expected, opts.headers["Range"])
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/chain_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/chain_test.go
deleted file mode 100644
index d26e376ff..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/chain_test.go
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import (
- "errors"
- "testing"
-)
-
-type testCredProvider struct {
- creds Value
- expired bool
- err error
-}
-
-func (s *testCredProvider) Retrieve() (Value, error) {
- s.expired = false
- return s.creds, s.err
-}
-func (s *testCredProvider) IsExpired() bool {
- return s.expired
-}
-
-func TestChainGet(t *testing.T) {
- p := &Chain{
- Providers: []Provider{
- &credProvider{err: errors.New("FirstError")},
- &credProvider{err: errors.New("SecondError")},
- &testCredProvider{
- creds: Value{
- AccessKeyID: "AKIF",
- SecretAccessKey: "NOSECRET",
- SessionToken: "",
- },
- },
- &credProvider{
- creds: Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "",
- },
- },
- },
- }
-
- creds, err := p.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- // Also check credentials
- if creds.AccessKeyID != "AKIF" {
- t.Fatalf("Expected 'AKIF', got %s", creds.AccessKeyID)
- }
- if creds.SecretAccessKey != "NOSECRET" {
- t.Fatalf("Expected 'NOSECRET', got %s", creds.SecretAccessKey)
- }
- if creds.SessionToken != "" {
- t.Fatalf("Expected empty token, got %s", creds.SessionToken)
- }
-}
-
-func TestChainIsExpired(t *testing.T) {
- credProvider := &credProvider{
- creds: Value{
- AccessKeyID: "UXHW",
- SecretAccessKey: "MYSECRET",
- SessionToken: "",
- },
- expired: true,
- }
- p := &Chain{
- Providers: []Provider{
- credProvider,
- },
- }
-
- if !p.IsExpired() {
- t.Fatal("Expected expired to be true before any Retrieve")
- }
-
- _, err := p.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- if p.IsExpired() {
- t.Fatal("Expected to be not expired after Retrieve")
- }
-}
-
-func TestChainWithNoProvider(t *testing.T) {
- p := &Chain{
- Providers: []Provider{},
- }
- if !p.IsExpired() {
- t.Fatal("Expected to be expired with no providers")
- }
- _, err := p.Retrieve()
- if err != nil {
- if err.Error() != "No valid providers found []" {
- t.Error(err)
- }
- }
-}
-
-func TestChainProviderWithNoValidProvider(t *testing.T) {
- errs := []error{
- errors.New("FirstError"),
- errors.New("SecondError"),
- }
- p := &Chain{
- Providers: []Provider{
- &credProvider{err: errs[0]},
- &credProvider{err: errs[1]},
- },
- }
-
- if !p.IsExpired() {
- t.Fatal("Expected to be expired with no providers")
- }
-
- _, err := p.Retrieve()
- if err != nil {
- if err.Error() != "No valid providers found [FirstError SecondError]" {
- t.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/credentials_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/credentials_test.go
deleted file mode 100644
index 92c77c4cb..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/credentials_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import (
- "errors"
- "testing"
-)
-
-type credProvider struct {
- creds Value
- expired bool
- err error
-}
-
-func (s *credProvider) Retrieve() (Value, error) {
- s.expired = false
- return s.creds, s.err
-}
-func (s *credProvider) IsExpired() bool {
- return s.expired
-}
-
-func TestCredentialsGet(t *testing.T) {
- c := New(&credProvider{
- creds: Value{
- AccessKeyID: "UXHW",
- SecretAccessKey: "MYSECRET",
- SessionToken: "",
- },
- expired: true,
- })
-
- creds, err := c.Get()
- if err != nil {
- t.Fatal(err)
- }
- if "UXHW" != creds.AccessKeyID {
- t.Errorf("Expected \"UXHW\", got %s", creds.AccessKeyID)
- }
- if "MYSECRET" != creds.SecretAccessKey {
- t.Errorf("Expected \"MYSECRET\", got %s", creds.SecretAccessKey)
- }
- if creds.SessionToken != "" {
- t.Errorf("Expected session token to be empty, got %s", creds.SessionToken)
- }
-}
-
-func TestCredentialsGetWithError(t *testing.T) {
- c := New(&credProvider{err: errors.New("Custom error")})
-
- _, err := c.Get()
- if err != nil {
- if err.Error() != "Custom error" {
- t.Errorf("Expected \"Custom error\", got %s", err.Error())
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/env_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/env_test.go
deleted file mode 100644
index 09cd77f7a..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/env_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import (
- "os"
- "reflect"
- "testing"
-)
-
-func TestEnvAWSRetrieve(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
- os.Setenv("AWS_SESSION_TOKEN", "token")
-
- e := EnvAWS{}
- if !e.IsExpired() {
- t.Error("Expect creds to be expired before retrieve.")
- }
-
- creds, err := e.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- expectedCreds := Value{
- AccessKeyID: "access",
- SecretAccessKey: "secret",
- SessionToken: "token",
- SignerType: SignatureV4,
- }
- if !reflect.DeepEqual(creds, expectedCreds) {
- t.Errorf("Expected %v, got %v", expectedCreds, creds)
- }
-
- if e.IsExpired() {
- t.Error("Expect creds to not be expired after retrieve.")
- }
-
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY", "access")
- os.Setenv("AWS_SECRET_KEY", "secret")
-
- expectedCreds = Value{
- AccessKeyID: "access",
- SecretAccessKey: "secret",
- SignerType: SignatureV4,
- }
-
- creds, err = e.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- if !reflect.DeepEqual(creds, expectedCreds) {
- t.Errorf("Expected %v, got %v", expectedCreds, creds)
- }
-
-}
-
-func TestEnvMinioRetrieve(t *testing.T) {
- os.Clearenv()
-
- os.Setenv("MINIO_ACCESS_KEY", "access")
- os.Setenv("MINIO_SECRET_KEY", "secret")
-
- e := EnvMinio{}
- if !e.IsExpired() {
- t.Error("Expect creds to be expired before retrieve.")
- }
-
- creds, err := e.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- expectedCreds := Value{
- AccessKeyID: "access",
- SecretAccessKey: "secret",
- SignerType: SignatureV4,
- }
- if !reflect.DeepEqual(creds, expectedCreds) {
- t.Errorf("Expected %v, got %v", expectedCreds, creds)
- }
-
- if e.IsExpired() {
- t.Error("Expect creds to not be expired after retrieve.")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/file_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/file_test.go
deleted file mode 100644
index c85c10494..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/file_test.go
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import (
- "os"
- "path/filepath"
- "testing"
-)
-
-func TestFileAWS(t *testing.T) {
- os.Clearenv()
-
- creds := NewFileAWSCredentials("credentials.sample", "")
- credValues, err := creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SessionToken != "token" {
- t.Errorf("Expected 'token', got %s'", credValues.SessionToken)
- }
-
- os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "credentials.sample")
- creds = NewFileAWSCredentials("", "")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SessionToken != "token" {
- t.Errorf("Expected 'token', got %s'", credValues.SessionToken)
- }
-
- wd, err := os.Getwd()
- if err != nil {
- t.Fatal(err)
- }
-
- os.Setenv("AWS_SHARED_CREDENTIALS_FILE", filepath.Join(wd, "credentials.sample"))
- creds = NewFileAWSCredentials("", "")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SessionToken != "token" {
- t.Errorf("Expected 'token', got %s'", credValues.SessionToken)
- }
-
- os.Clearenv()
- os.Setenv("AWS_PROFILE", "no_token")
-
- creds = NewFileAWSCredentials("credentials.sample", "")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
-
- os.Clearenv()
-
- creds = NewFileAWSCredentials("credentials.sample", "no_token")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
-
- creds = NewFileAWSCredentials("credentials-non-existent.sample", "no_token")
- _, err = creds.Get()
- if !os.IsNotExist(err) {
- t.Errorf("Expected open non-existent.json: no such file or directory, got %s", err)
- }
- if !creds.IsExpired() {
- t.Error("Should be expired if not loaded")
- }
-}
-
-func TestFileMinioClient(t *testing.T) {
- os.Clearenv()
-
- creds := NewFileMinioClient("config.json.sample", "")
- credValues, err := creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "accessKey" {
- t.Errorf("Expected 'accessKey', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "secret" {
- t.Errorf("Expected 'secret', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SignerType != SignatureV4 {
- t.Errorf("Expected 'S3v4', got %s'", credValues.SignerType)
- }
-
- os.Clearenv()
- os.Setenv("MINIO_ALIAS", "play")
-
- creds = NewFileMinioClient("config.json.sample", "")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "Q3AM3UQ867SPQQA43P2F" {
- t.Errorf("Expected 'Q3AM3UQ867SPQQA43P2F', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" {
- t.Errorf("Expected 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SignerType != SignatureV2 {
- t.Errorf("Expected 'S3v2', got %s'", credValues.SignerType)
- }
-
- os.Clearenv()
-
- creds = NewFileMinioClient("config.json.sample", "play")
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if credValues.AccessKeyID != "Q3AM3UQ867SPQQA43P2F" {
- t.Errorf("Expected 'Q3AM3UQ867SPQQA43P2F', got %s'", credValues.AccessKeyID)
- }
- if credValues.SecretAccessKey != "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" {
- t.Errorf("Expected 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', got %s'", credValues.SecretAccessKey)
- }
- if credValues.SignerType != SignatureV2 {
- t.Errorf("Expected 'S3v2', got %s'", credValues.SignerType)
- }
-
- creds = NewFileMinioClient("non-existent.json", "play")
- _, err = creds.Get()
- if !os.IsNotExist(err) {
- t.Errorf("Expected open non-existent.json: no such file or directory, got %s", err)
- }
- if !creds.IsExpired() {
- t.Error("Should be expired if not loaded")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/iam_aws_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/iam_aws_test.go
deleted file mode 100644
index 86ea66bf6..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/iam_aws_test.go
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-)
-
-const credsRespTmpl = `{
- "Code": "Success",
- "Type": "AWS-HMAC",
- "AccessKeyId" : "accessKey",
- "SecretAccessKey" : "secret",
- "Token" : "token",
- "Expiration" : "%s",
- "LastUpdated" : "2009-11-23T0:00:00Z"
-}`
-
-const credsFailRespTmpl = `{
- "Code": "ErrorCode",
- "Message": "ErrorMsg",
- "LastUpdated": "2009-11-23T0:00:00Z"
-}`
-
-func initTestFailServer() *httptest.Server {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- http.Error(w, "Not allowed", http.StatusBadRequest)
- }))
- return server
-}
-
-func initTestServerNoRoles() *httptest.Server {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte(""))
- }))
- return server
-}
-
-func initTestServer(expireOn string, failAssume bool) *httptest.Server {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path == "/latest/meta-data/iam/security-credentials" {
- fmt.Fprintln(w, "RoleName")
- } else if r.URL.Path == "/latest/meta-data/iam/security-credentials/RoleName" {
- if failAssume {
- fmt.Fprintf(w, credsFailRespTmpl)
- } else {
- fmt.Fprintf(w, credsRespTmpl, expireOn)
- }
- } else {
- http.Error(w, "bad request", http.StatusBadRequest)
- }
- }))
-
- return server
-}
-
-func TestIAMMalformedEndpoint(t *testing.T) {
- creds := NewIAM("%%%%")
- _, err := creds.Get()
- if err == nil {
- t.Fatal("Unexpected should fail here")
- }
- if err.Error() != `parse %%%%: invalid URL escape "%%%"` {
- t.Fatalf("Expected parse %%%%%%%%: invalid URL escape \"%%%%%%\", got %s", err)
- }
-}
-
-func TestIAMFailServer(t *testing.T) {
- server := initTestFailServer()
- defer server.Close()
-
- creds := NewIAM(server.URL)
-
- _, err := creds.Get()
- if err == nil {
- t.Fatal("Unexpected should fail here")
- }
- if err.Error() != "400 Bad Request" {
- t.Fatalf("Expected '400 Bad Request', got %s", err)
- }
-}
-
-func TestIAMNoRoles(t *testing.T) {
- server := initTestServerNoRoles()
- defer server.Close()
-
- creds := NewIAM(server.URL)
- _, err := creds.Get()
- if err == nil {
- t.Fatal("Unexpected should fail here")
- }
- if err.Error() != "No IAM roles attached to this EC2 service" {
- t.Fatalf("Expected 'No IAM roles attached to this EC2 service', got %s", err)
- }
-}
-
-func TestIAM(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &IAM{
- Client: http.DefaultClient,
- endpoint: server.URL,
- }
-
- creds, err := p.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- if "accessKey" != creds.AccessKeyID {
- t.Errorf("Expected \"accessKey\", got %s", creds.AccessKeyID)
- }
-
- if "secret" != creds.SecretAccessKey {
- t.Errorf("Expected \"secret\", got %s", creds.SecretAccessKey)
- }
-
- if "token" != creds.SessionToken {
- t.Errorf("Expected \"token\", got %s", creds.SessionToken)
- }
-
- if !p.IsExpired() {
- t.Error("Expected creds to be expired.")
- }
-}
-
-func TestIAMFailAssume(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", true)
- defer server.Close()
-
- p := &IAM{
- Client: http.DefaultClient,
- endpoint: server.URL,
- }
-
- _, err := p.Retrieve()
- if err == nil {
- t.Fatal("Unexpected success, should fail")
- }
- if err.Error() != "ErrorMsg" {
- t.Errorf("Expected \"ErrorMsg\", got %s", err)
- }
-}
-
-func TestIAMIsExpired(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &IAM{
- Client: http.DefaultClient,
- endpoint: server.URL,
- }
- p.CurrentTime = func() time.Time {
- return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- if !p.IsExpired() {
- t.Error("Expected creds to be expired before retrieve.")
- }
-
- _, err := p.Retrieve()
- if err != nil {
- t.Fatal(err)
- }
-
- if p.IsExpired() {
- t.Error("Expected creds to not be expired after retrieve.")
- }
-
- p.CurrentTime = func() time.Time {
- return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- if !p.IsExpired() {
- t.Error("Expected creds to be expired when curren time has changed")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/static_test.go b/vendor/github.com/minio/minio-go/pkg/credentials/static_test.go
deleted file mode 100644
index f1d2d856c..000000000
--- a/vendor/github.com/minio/minio-go/pkg/credentials/static_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package credentials
-
-import "testing"
-
-func TestStaticGet(t *testing.T) {
- creds := NewStatic("UXHW", "SECRET", "", SignatureV4)
- credValues, err := creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if "UXHW" != credValues.AccessKeyID {
- t.Errorf("Expected access key ID to match \"UXHW\", got %s", credValues.AccessKeyID)
- }
- if "SECRET" != credValues.SecretAccessKey {
- t.Errorf("Expected secret access key to match \"SECRET\", got %s", credValues.SecretAccessKey)
- }
-
- if credValues.SessionToken != "" {
- t.Error("Expected session token to match")
- }
-
- if credValues.SignerType != SignatureV4 {
- t.Errorf("Expected 'S3v4', got %s", credValues.SignerType)
- }
-
- if creds.IsExpired() {
- t.Error("Static credentials should never expire")
- }
-
- creds = NewStatic("", "", "", SignatureDefault)
- credValues, err = creds.Get()
- if err != nil {
- t.Fatal(err)
- }
-
- if "" != credValues.AccessKeyID {
- t.Errorf("Expected access key ID to match empty string, got %s", credValues.AccessKeyID)
- }
- if "" != credValues.SecretAccessKey {
- t.Errorf("Expected secret access key to match empty string, got %s", credValues.SecretAccessKey)
- }
-
- if !credValues.SignerType.IsAnonymous() {
- t.Errorf("Expected 'Anonymous', got %s", credValues.SignerType)
- }
-
- if creds.IsExpired() {
- t.Error("Static credentials should never expire")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy-condition_test.go b/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy-condition_test.go
deleted file mode 100644
index 9e4aa8fb6..000000000
--- a/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy-condition_test.go
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package policy
-
-import (
- "encoding/json"
- "testing"
-
- "github.com/minio/minio-go/pkg/set"
-)
-
-// ConditionKeyMap.Add() is called and the result is validated.
-func TestConditionKeyMapAdd(t *testing.T) {
- condKeyMap := make(ConditionKeyMap)
- testCases := []struct {
- key string
- value set.StringSet
- expectedResult string
- }{
- // Add new key and value.
- {"s3:prefix", set.CreateStringSet("hello"), `{"s3:prefix":["hello"]}`},
- // Add existing key and value.
- {"s3:prefix", set.CreateStringSet("hello"), `{"s3:prefix":["hello"]}`},
- // Add existing key and not value.
- {"s3:prefix", set.CreateStringSet("world"), `{"s3:prefix":["hello","world"]}`},
- }
-
- for _, testCase := range testCases {
- condKeyMap.Add(testCase.key, testCase.value)
- if data, err := json.Marshal(condKeyMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// ConditionKeyMap.Remove() is called and the result is validated.
-func TestConditionKeyMapRemove(t *testing.T) {
- condKeyMap := make(ConditionKeyMap)
- condKeyMap.Add("s3:prefix", set.CreateStringSet("hello", "world"))
-
- testCases := []struct {
- key string
- value set.StringSet
- expectedResult string
- }{
- // Remove non-existent key and value.
- {"s3:myprefix", set.CreateStringSet("hello"), `{"s3:prefix":["hello","world"]}`},
- // Remove existing key and value.
- {"s3:prefix", set.CreateStringSet("hello"), `{"s3:prefix":["world"]}`},
- // Remove existing key to make the key also removed.
- {"s3:prefix", set.CreateStringSet("world"), `{}`},
- }
-
- for _, testCase := range testCases {
- condKeyMap.Remove(testCase.key, testCase.value)
- if data, err := json.Marshal(condKeyMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// ConditionKeyMap.RemoveKey() is called and the result is validated.
-func TestConditionKeyMapRemoveKey(t *testing.T) {
- condKeyMap := make(ConditionKeyMap)
- condKeyMap.Add("s3:prefix", set.CreateStringSet("hello", "world"))
-
- testCases := []struct {
- key string
- expectedResult string
- }{
- // Remove non-existent key.
- {"s3:myprefix", `{"s3:prefix":["hello","world"]}`},
- // Remove existing key.
- {"s3:prefix", `{}`},
- }
-
- for _, testCase := range testCases {
- condKeyMap.RemoveKey(testCase.key)
- if data, err := json.Marshal(condKeyMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// CopyConditionKeyMap() is called and the result is validated.
-func TestCopyConditionKeyMap(t *testing.T) {
- emptyCondKeyMap := make(ConditionKeyMap)
- nonEmptyCondKeyMap := make(ConditionKeyMap)
- nonEmptyCondKeyMap.Add("s3:prefix", set.CreateStringSet("hello", "world"))
-
- testCases := []struct {
- condKeyMap ConditionKeyMap
- expectedResult string
- }{
- // To test empty ConditionKeyMap.
- {emptyCondKeyMap, `{}`},
- // To test non-empty ConditionKeyMap.
- {nonEmptyCondKeyMap, `{"s3:prefix":["hello","world"]}`},
- }
-
- for _, testCase := range testCases {
- condKeyMap := CopyConditionKeyMap(testCase.condKeyMap)
- if data, err := json.Marshal(condKeyMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// mergeConditionKeyMap() is called and the result is validated.
-func TestMergeConditionKeyMap(t *testing.T) {
- condKeyMap1 := make(ConditionKeyMap)
- condKeyMap1.Add("s3:prefix", set.CreateStringSet("hello"))
-
- condKeyMap2 := make(ConditionKeyMap)
- condKeyMap2.Add("s3:prefix", set.CreateStringSet("world"))
-
- condKeyMap3 := make(ConditionKeyMap)
- condKeyMap3.Add("s3:myprefix", set.CreateStringSet("world"))
-
- testCases := []struct {
- condKeyMap1 ConditionKeyMap
- condKeyMap2 ConditionKeyMap
- expectedResult string
- }{
- // Both arguments are empty.
- {make(ConditionKeyMap), make(ConditionKeyMap), `{}`},
- // First argument is empty.
- {make(ConditionKeyMap), condKeyMap1, `{"s3:prefix":["hello"]}`},
- // Second argument is empty.
- {condKeyMap1, make(ConditionKeyMap), `{"s3:prefix":["hello"]}`},
- // Both arguments are same value.
- {condKeyMap1, condKeyMap1, `{"s3:prefix":["hello"]}`},
- // Value of second argument will be merged.
- {condKeyMap1, condKeyMap2, `{"s3:prefix":["hello","world"]}`},
- // second argument will be added.
- {condKeyMap1, condKeyMap3, `{"s3:myprefix":["world"],"s3:prefix":["hello"]}`},
- }
-
- for _, testCase := range testCases {
- condKeyMap := mergeConditionKeyMap(testCase.condKeyMap1, testCase.condKeyMap2)
- if data, err := json.Marshal(condKeyMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// ConditionMap.Add() is called and the result is validated.
-func TestConditionMapAdd(t *testing.T) {
- condMap := make(ConditionMap)
-
- condKeyMap1 := make(ConditionKeyMap)
- condKeyMap1.Add("s3:prefix", set.CreateStringSet("hello"))
-
- condKeyMap2 := make(ConditionKeyMap)
- condKeyMap2.Add("s3:prefix", set.CreateStringSet("hello", "world"))
-
- testCases := []struct {
- key string
- value ConditionKeyMap
- expectedResult string
- }{
- // Add new key and value.
- {"StringEquals", condKeyMap1, `{"StringEquals":{"s3:prefix":["hello"]}}`},
- // Add existing key and value.
- {"StringEquals", condKeyMap1, `{"StringEquals":{"s3:prefix":["hello"]}}`},
- // Add existing key and not value.
- {"StringEquals", condKeyMap2, `{"StringEquals":{"s3:prefix":["hello","world"]}}`},
- }
-
- for _, testCase := range testCases {
- condMap.Add(testCase.key, testCase.value)
- if data, err := json.Marshal(condMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// ConditionMap.Remove() is called and the result is validated.
-func TestConditionMapRemove(t *testing.T) {
- condMap := make(ConditionMap)
- condKeyMap := make(ConditionKeyMap)
- condKeyMap.Add("s3:prefix", set.CreateStringSet("hello", "world"))
- condMap.Add("StringEquals", condKeyMap)
-
- testCases := []struct {
- key string
- expectedResult string
- }{
- // Remove non-existent key.
- {"StringNotEquals", `{"StringEquals":{"s3:prefix":["hello","world"]}}`},
- // Remove existing key.
- {"StringEquals", `{}`},
- }
-
- for _, testCase := range testCases {
- condMap.Remove(testCase.key)
- if data, err := json.Marshal(condMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// mergeConditionMap() is called and the result is validated.
-func TestMergeConditionMap(t *testing.T) {
- condKeyMap1 := make(ConditionKeyMap)
- condKeyMap1.Add("s3:prefix", set.CreateStringSet("hello"))
- condMap1 := make(ConditionMap)
- condMap1.Add("StringEquals", condKeyMap1)
-
- condKeyMap2 := make(ConditionKeyMap)
- condKeyMap2.Add("s3:prefix", set.CreateStringSet("world"))
- condMap2 := make(ConditionMap)
- condMap2.Add("StringEquals", condKeyMap2)
-
- condMap3 := make(ConditionMap)
- condMap3.Add("StringNotEquals", condKeyMap2)
-
- testCases := []struct {
- condMap1 ConditionMap
- condMap2 ConditionMap
- expectedResult string
- }{
- // Both arguments are empty.
- {make(ConditionMap), make(ConditionMap), `{}`},
- // First argument is empty.
- {make(ConditionMap), condMap1, `{"StringEquals":{"s3:prefix":["hello"]}}`},
- // Second argument is empty.
- {condMap1, make(ConditionMap), `{"StringEquals":{"s3:prefix":["hello"]}}`},
- // Both arguments are same value.
- {condMap1, condMap1, `{"StringEquals":{"s3:prefix":["hello"]}}`},
- // Value of second argument will be merged.
- {condMap1, condMap2, `{"StringEquals":{"s3:prefix":["hello","world"]}}`},
- // second argument will be added.
- {condMap1, condMap3, `{"StringEquals":{"s3:prefix":["hello"]},"StringNotEquals":{"s3:prefix":["world"]}}`},
- }
-
- for _, testCase := range testCases {
- condMap := mergeConditionMap(testCase.condMap1, testCase.condMap2)
- if data, err := json.Marshal(condMap); err != nil {
- t.Fatalf("Unable to marshal ConditionKeyMap to JSON, %s", err)
- } else {
- if string(data) != testCase.expectedResult {
- t.Fatalf("case: %+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy_test.go b/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy_test.go
deleted file mode 100644
index 1e5196f7c..000000000
--- a/vendor/github.com/minio/minio-go/pkg/policy/bucket-policy_test.go
+++ /dev/null
@@ -1,1823 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package policy
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "testing"
-
- "github.com/minio/minio-go/pkg/set"
-)
-
-// isValidStatement() is called and the result is validated.
-func TestIsValidStatement(t *testing.T) {
- testCases := []struct {
- statement Statement
- bucketName string
- expectedResult bool
- }{
- // Empty statement and bucket name.
- {Statement{}, "", false},
- // Empty statement.
- {Statement{}, "mybucket", false},
- // Empty bucket name.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false},
- // Statement with unknown actions.
- {Statement{
- Actions: set.CreateStringSet("s3:ListBucketVersions"),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "mybucket", false},
- // Statement with unknown effect.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "mybucket", false},
- // Statement with nil Principal.AWS.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "mybucket", false},
- // Statement with unknown Principal.AWS.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "mybucket", false},
- // Statement with different bucket name.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }, "mybucket", false},
- // Statement with bucket name with suffixed string.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybuckettest/myobject"),
- }, "mybucket", false},
- // Statement with bucket name and object name.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/myobject"),
- }, "mybucket", true},
- // Statement with condition, bucket name and object name.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/myobject"),
- }, "mybucket", true},
- }
-
- for _, testCase := range testCases {
- if result := isValidStatement(testCase.statement, testCase.bucketName); result != testCase.expectedResult {
- t.Fatalf("%+v: expected: %t, got: %t", testCase, testCase.expectedResult, result)
- }
- }
-}
-
-// newStatements() is called and the result is validated.
-func TestNewStatements(t *testing.T) {
- testCases := []struct {
- policy BucketPolicy
- bucketName string
- prefix string
- expectedResult string
- }{
- // BucketPolicyNone: with empty bucket name and prefix.
- {BucketPolicyNone, "", "", `[]`},
- // BucketPolicyNone: with bucket name and empty prefix.
- {BucketPolicyNone, "mybucket", "", `[]`},
- // BucketPolicyNone: with empty bucket name empty prefix.
- {BucketPolicyNone, "", "hello", `[]`},
- // BucketPolicyNone: with bucket name prefix.
- {BucketPolicyNone, "mybucket", "hello", `[]`},
- // BucketPolicyReadOnly: with empty bucket name and prefix.
- {BucketPolicyReadOnly, "", "", `[]`},
- // BucketPolicyReadOnly: with bucket name and empty prefix.
- {BucketPolicyReadOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyReadOnly: with empty bucket name empty prefix.
- {BucketPolicyReadOnly, "", "hello", `[]`},
- // BucketPolicyReadOnly: with bucket name prefix.
- {BucketPolicyReadOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // BucketPolicyReadWrite: with empty bucket name and prefix.
- {BucketPolicyReadWrite, "", "", `[]`},
- // BucketPolicyReadWrite: with bucket name and empty prefix.
- {BucketPolicyReadWrite, "mybucket", "", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyReadWrite: with empty bucket name empty prefix.
- {BucketPolicyReadWrite, "", "hello", `[]`},
- // BucketPolicyReadWrite: with bucket name prefix.
- {BucketPolicyReadWrite, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // BucketPolicyWriteOnly: with empty bucket name and prefix.
- {BucketPolicyWriteOnly, "", "", `[]`},
- // BucketPolicyWriteOnly: with bucket name and empty prefix.
- {BucketPolicyWriteOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyWriteOnly: with empty bucket name empty prefix.
- {BucketPolicyWriteOnly, "", "hello", `[]`},
- // BucketPolicyWriteOnly: with bucket name prefix.
- {BucketPolicyWriteOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- }
-
- for _, testCase := range testCases {
- statements := newStatements(testCase.policy, testCase.bucketName, testCase.prefix)
- if data, err := json.Marshal(statements); err == nil {
- if string(data) != testCase.expectedResult {
- t.Fatalf("%+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
- }
-}
-
-// getInUsePolicy() is called and the result is validated.
-func TestGetInUsePolicy(t *testing.T) {
- testCases := []struct {
- statements []Statement
- bucketName string
- prefix string
- expectedResult1 bool
- expectedResult2 bool
- }{
- // All empty statements, bucket name and prefix.
- {[]Statement{}, "", "", false, false},
- // Non-empty statements, empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "", false, false},
- // Non-empty statements, non-empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", false, false},
- // Non-empty statements, empty bucket name and non-empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "hello", false, false},
- // Empty statements, non-empty bucket name and empty prefix.
- {[]Statement{}, "mybucket", "", false, false},
- // Empty statements, non-empty bucket name non-empty prefix.
- {[]Statement{}, "mybucket", "hello", false, false},
- // Empty statements, empty bucket name and non-empty prefix.
- {[]Statement{}, "", "hello", false, false},
- // Non-empty statements, non-empty bucket name, non-empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", false, false},
- // different bucket statements and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "", false, false},
- // different bucket statements.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "hello", false, false},
- // different bucket multi-statements and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }, {
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket/world"),
- }}, "mybucket", "", false, false},
- // different bucket multi-statements.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }, {
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket/world"),
- }}, "mybucket", "hello", false, false},
- // read-only in use.
- {[]Statement{{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", true, false},
- // write-only in use.
- {[]Statement{{
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", false, true},
- // read-write in use.
- {[]Statement{{
- Actions: readWriteObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", true, true},
- // read-write multi-statements.
- {[]Statement{{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/ground"),
- }}, "mybucket", "hello", true, true},
- }
-
- for _, testCase := range testCases {
- result1, result2 := getInUsePolicy(testCase.statements, testCase.bucketName, testCase.prefix)
- if !(result1 == testCase.expectedResult1 && result2 == testCase.expectedResult2) {
- t.Fatalf("%+v: expected: [%t,%t], got: [%t,%t]", testCase,
- testCase.expectedResult1, testCase.expectedResult2,
- result1, result2)
- }
- }
-}
-
-// removeStatements() is called and the result is validated.
-func TestRemoveStatements(t *testing.T) {
- unknownCondMap1 := make(ConditionMap)
- unknownCondKeyMap1 := make(ConditionKeyMap)
- unknownCondKeyMap1.Add("s3:prefix", set.CreateStringSet("hello"))
- unknownCondMap1.Add("StringNotEquals", unknownCondKeyMap1)
-
- unknownCondMap11 := make(ConditionMap)
- unknownCondKeyMap11 := make(ConditionKeyMap)
- unknownCondKeyMap11.Add("s3:prefix", set.CreateStringSet("hello"))
- unknownCondMap11.Add("StringNotEquals", unknownCondKeyMap11)
-
- unknownCondMap12 := make(ConditionMap)
- unknownCondKeyMap12 := make(ConditionKeyMap)
- unknownCondKeyMap12.Add("s3:prefix", set.CreateStringSet("hello"))
- unknownCondMap12.Add("StringNotEquals", unknownCondKeyMap12)
-
- knownCondMap1 := make(ConditionMap)
- knownCondKeyMap1 := make(ConditionKeyMap)
- knownCondKeyMap1.Add("s3:prefix", set.CreateStringSet("hello"))
- knownCondMap1.Add("StringEquals", knownCondKeyMap1)
-
- knownCondMap11 := make(ConditionMap)
- knownCondKeyMap11 := make(ConditionKeyMap)
- knownCondKeyMap11.Add("s3:prefix", set.CreateStringSet("hello"))
- knownCondMap11.Add("StringEquals", knownCondKeyMap11)
-
- knownCondMap12 := make(ConditionMap)
- knownCondKeyMap12 := make(ConditionKeyMap)
- knownCondKeyMap12.Add("s3:prefix", set.CreateStringSet("hello"))
- knownCondMap12.Add("StringEquals", knownCondKeyMap12)
-
- knownCondMap13 := make(ConditionMap)
- knownCondKeyMap13 := make(ConditionKeyMap)
- knownCondKeyMap13.Add("s3:prefix", set.CreateStringSet("hello"))
- knownCondMap13.Add("StringEquals", knownCondKeyMap13)
-
- knownCondMap14 := make(ConditionMap)
- knownCondKeyMap14 := make(ConditionKeyMap)
- knownCondKeyMap14.Add("s3:prefix", set.CreateStringSet("hello"))
- knownCondMap14.Add("StringEquals", knownCondKeyMap14)
-
- knownCondMap2 := make(ConditionMap)
- knownCondKeyMap2 := make(ConditionKeyMap)
- knownCondKeyMap2.Add("s3:prefix", set.CreateStringSet("hello", "world"))
- knownCondMap2.Add("StringEquals", knownCondKeyMap2)
-
- testCases := []struct {
- statements []Statement
- bucketName string
- prefix string
- expectedResult string
- }{
- // All empty statements, bucket name and prefix.
- {[]Statement{}, "", "", `[]`},
- // Non-empty statements, empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Non-empty statements, non-empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Non-empty statements, empty bucket name and non-empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Empty statements, non-empty bucket name and empty prefix.
- {[]Statement{}, "mybucket", "", `[]`},
- // Empty statements, non-empty bucket name non-empty prefix.
- {[]Statement{}, "mybucket", "hello", `[]`},
- // Empty statements, empty bucket name and non-empty prefix.
- {[]Statement{}, "", "hello", `[]`},
- // Statement with unknown Actions with empty prefix.
- {[]Statement{{
- Actions: set.CreateStringSet("s3:ListBucketVersions", "s3:ListAllMyBuckets"),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListAllMyBuckets","s3:ListBucketVersions"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Actions.
- {[]Statement{{
- Actions: set.CreateStringSet("s3:ListBucketVersions", "s3:ListAllMyBuckets"),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListAllMyBuckets","s3:ListBucketVersions"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Effect with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Deny","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Effect.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Deny","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Principal.User.AWS with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["arn:aws:iam::AccountNumberWithoutHyphens:root"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Principal.User.AWS.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["arn:aws:iam::AccountNumberWithoutHyphens:root"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Principal.User.CanonicalUser with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{CanonicalUser: set.CreateStringSet("649262f44b8145cb")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"CanonicalUser":["649262f44b8145cb"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Principal.User.CanonicalUser.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{CanonicalUser: set.CreateStringSet("649262f44b8145cb")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"CanonicalUser":["649262f44b8145cb"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Conditions with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Conditions.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statement with unknown Resource and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::testbucket"],"Sid":""}]`},
- // Statement with unknown Resource.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::testbucket"],"Sid":""}]`},
- // Statement with known Actions with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[]`},
- // Statement with known Actions.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[]`},
- // Statement with known multiple Actions with empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions).Union(commonBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", `[]`},
- // Statement with known multiple Actions.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions).Union(commonBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", `[]`},
- // RemoveBucketActions with readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readWriteObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readWriteObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with known Conditions, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, known Conditions, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, known Conditions contains other object prefix, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap2,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["world"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with unknown Conditions, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, unknown Conditions, readOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with known Conditions, writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap11,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, known Conditions, writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap11,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with unknown Conditions, writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap11,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, unknown Conditions, writeOnlyInUse.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap11,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with known Conditions, readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap12,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, known Conditions, readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap12,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with unknown Conditions, readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap12,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // RemoveBucketActions with prefix, unknown Conditions, readOnlyInUse and writeOnlyInUse.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap12,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/world"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/world"],"Sid":""}]`},
- // readOnlyObjectActions - RemoveObjectActions with known condition.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // readOnlyObjectActions - RemoveObjectActions with prefix, known condition.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[]`},
- // readOnlyObjectActions - RemoveObjectActions with unknown condition.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // readOnlyObjectActions - RemoveObjectActions with prefix, unknown condition.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // writeOnlyObjectActions - RemoveObjectActions with known condition.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap13,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // writeOnlyObjectActions - RemoveObjectActions with prefix, known condition.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap13,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // writeOnlyObjectActions - RemoveObjectActions with unknown condition.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // writeOnlyObjectActions - RemoveObjectActions with prefix, unknown condition.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // readWriteObjectActions - RemoveObjectActions with known condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap14,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // readWriteObjectActions - RemoveObjectActions with prefix, known condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: knownCondMap13,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[]`},
- // readWriteObjectActions - RemoveObjectActions with unknown condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // readWriteObjectActions - RemoveObjectActions with prefix, unknown condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, {
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }}, "mybucket", "hello", `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringNotEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- }
-
- for _, testCase := range testCases {
- statements := removeStatements(testCase.statements, testCase.bucketName, testCase.prefix)
- if data, err := json.Marshal(statements); err != nil {
- t.Fatalf("unable encoding to json, %s", err)
- } else if string(data) != testCase.expectedResult {
- t.Fatalf("%+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
-}
-
-// appendStatement() is called and the result is validated.
-func TestAppendStatement(t *testing.T) {
- condMap := make(ConditionMap)
- condKeyMap := make(ConditionKeyMap)
- condKeyMap.Add("s3:prefix", set.CreateStringSet("hello"))
- condMap.Add("StringEquals", condKeyMap)
-
- condMap1 := make(ConditionMap)
- condKeyMap1 := make(ConditionKeyMap)
- condKeyMap1.Add("s3:prefix", set.CreateStringSet("world"))
- condMap1.Add("StringEquals", condKeyMap1)
-
- unknownCondMap1 := make(ConditionMap)
- unknownCondKeyMap1 := make(ConditionKeyMap)
- unknownCondKeyMap1.Add("s3:prefix", set.CreateStringSet("world"))
- unknownCondMap1.Add("StringNotEquals", unknownCondKeyMap1)
-
- testCases := []struct {
- statements []Statement
- statement Statement
- expectedResult string
- }{
- // Empty statements and empty new statement.
- {[]Statement{}, Statement{}, `[]`},
- // Non-empty statements and empty new statement.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{}, `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Empty statements and non-empty new statement.
- {[]Statement{}, Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Append existing statement.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Append same statement with different resource.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }, `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""}]`},
- // Append same statement with different actions.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Elements of new statement contains elements in statements.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket", "arn:aws:s3:::testbucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""}]`},
- // Elements of new statement with conditions contains elements in statements.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket", "arn:aws:s3:::testbucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""}]`},
- // Statements with condition and new statement with condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket", "arn:aws:s3:::testbucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["world"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statements with condition and same resources, and new statement with condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello","world"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statements with unknown condition and same resources, and new statement with known condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: unknownCondMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap1,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["world"]},"StringNotEquals":{"s3:prefix":["world"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statements without condition and new statement with condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket", "arn:aws:s3:::testbucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statements with condition and new statement without condition.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: condMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket", "arn:aws:s3:::testbucket"),
- }}, Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, `[{"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket","arn:aws:s3:::testbucket"],"Sid":""},{"Action":["s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // Statements and new statement are different.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, Statement{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- }
-
- for _, testCase := range testCases {
- statements := appendStatement(testCase.statements, testCase.statement)
- if data, err := json.Marshal(statements); err != nil {
- t.Fatalf("unable encoding to json, %s", err)
- } else if string(data) != testCase.expectedResult {
- t.Fatalf("%+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
-}
-
-// getBucketPolicy() is called and the result is validated.
-func TestGetBucketPolicy(t *testing.T) {
- helloCondMap := make(ConditionMap)
- helloCondKeyMap := make(ConditionKeyMap)
- helloCondKeyMap.Add("s3:prefix", set.CreateStringSet("hello"))
- helloCondMap.Add("StringEquals", helloCondKeyMap)
-
- worldCondMap := make(ConditionMap)
- worldCondKeyMap := make(ConditionKeyMap)
- worldCondKeyMap.Add("s3:prefix", set.CreateStringSet("world"))
- worldCondMap.Add("StringEquals", worldCondKeyMap)
-
- notHelloCondMap := make(ConditionMap)
- notHelloCondMap.Add("StringNotEquals", worldCondKeyMap)
-
- testCases := []struct {
- statement Statement
- prefix string
- expectedResult1 bool
- expectedResult2 bool
- expectedResult3 bool
- }{
- // Statement with invalid Effect.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with invalid Effect with prefix.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
- // Statement with invalid Principal.AWS.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with invalid Principal.AWS with prefix.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
-
- // Statement with commonBucketActions.
- {Statement{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", true, false, false},
- // Statement with commonBucketActions.
- {Statement{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", true, false, false},
-
- // Statement with commonBucketActions and condition.
- {Statement{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with commonBucketActions and condition.
- {Statement{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
- // Statement with writeOnlyBucketActions.
- {Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, true},
- // Statement with writeOnlyBucketActions.
- {Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, true},
- // Statement with writeOnlyBucketActions and condition
- {Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with writeOnlyBucketActions and condition.
- {Statement{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
- // Statement with readOnlyBucketActions.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, true, false},
- // Statement with readOnlyBucketActions.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, true, false},
- // Statement with readOnlyBucketActions with empty condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with readOnlyBucketActions with empty condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
- // Statement with readOnlyBucketActions with matching condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with readOnlyBucketActions with matching condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, true, false},
-
- // Statement with readOnlyBucketActions with different condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: worldCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with readOnlyBucketActions with different condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: worldCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, false, false},
-
- // Statement with readOnlyBucketActions with StringNotEquals condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: notHelloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "", false, false, false},
- // Statement with readOnlyBucketActions with StringNotEquals condition.
- {Statement{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: notHelloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }, "hello", false, true, false},
- }
-
- for _, testCase := range testCases {
- commonFound, readOnly, writeOnly := getBucketPolicy(testCase.statement, testCase.prefix)
- if !(testCase.expectedResult1 == commonFound && testCase.expectedResult2 == readOnly && testCase.expectedResult3 == writeOnly) {
- t.Fatalf("%+v: expected: [%t,%t,%t], got: [%t,%t,%t]", testCase,
- testCase.expectedResult1, testCase.expectedResult2, testCase.expectedResult3,
- commonFound, readOnly, writeOnly)
- }
- }
-}
-
-// getObjectPolicy() is called and the result is validated.
-func TestGetObjectPolicy(t *testing.T) {
- testCases := []struct {
- statement Statement
- expectedResult1 bool
- expectedResult2 bool
- }{
- // Statement with invalid Effect.
- {Statement{
- Actions: readOnlyObjectActions,
- Effect: "Deny",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, false, false},
- // Statement with invalid Principal.AWS.
- {Statement{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("arn:aws:iam::AccountNumberWithoutHyphens:root")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, false, false},
- // Statement with condition.
- {Statement{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: make(ConditionMap),
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, false, false},
- // Statement with readOnlyObjectActions.
- {Statement{
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, true, false},
- // Statement with writeOnlyObjectActions.
- {Statement{
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, false, true},
- // Statement with readOnlyObjectActions and writeOnlyObjectActions.
- {Statement{
- Actions: readOnlyObjectActions.Union(writeOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/hello*"),
- }, true, true},
- }
-
- for _, testCase := range testCases {
- readOnly, writeOnly := getObjectPolicy(testCase.statement)
- if !(testCase.expectedResult1 == readOnly && testCase.expectedResult2 == writeOnly) {
- t.Fatalf("%+v: expected: [%t,%t], got: [%t,%t]", testCase,
- testCase.expectedResult1, testCase.expectedResult2,
- readOnly, writeOnly)
- }
- }
-}
-
-// GetPolicyRules is called and the result is validated
-func TestListBucketPolicies(t *testing.T) {
-
- // Condition for read objects
- downloadCondMap := make(ConditionMap)
- downloadCondKeyMap := make(ConditionKeyMap)
- downloadCondKeyMap.Add("s3:prefix", set.CreateStringSet("download"))
- downloadCondMap.Add("StringEquals", downloadCondKeyMap)
-
- // Condition for readwrite objects
- downloadUploadCondMap := make(ConditionMap)
- downloadUploadCondKeyMap := make(ConditionKeyMap)
- downloadUploadCondKeyMap.Add("s3:prefix", set.CreateStringSet("both"))
- downloadUploadCondMap.Add("StringEquals", downloadUploadCondKeyMap)
-
- testCases := []struct {
- statements []Statement
- bucketName string
- prefix string
- expectedResult map[string]BucketPolicy
- }{
- // Empty statements, bucket name and prefix.
- {[]Statement{}, "", "", map[string]BucketPolicy{}},
- // Non-empty statements, empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "", map[string]BucketPolicy{}},
- // Empty statements, non-empty bucket name and empty prefix.
- {[]Statement{}, "mybucket", "", map[string]BucketPolicy{}},
- // Readonly object statement
- {[]Statement{
- {
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- },
- {
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: downloadCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- },
- {
- Actions: readOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/download*"),
- }}, "mybucket", "", map[string]BucketPolicy{"mybucket/download*": BucketPolicyReadOnly}},
- // Write Only
- {[]Statement{
- {
- Actions: commonBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- },
- {
- Actions: writeOnlyObjectActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/upload*"),
- }}, "mybucket", "", map[string]BucketPolicy{"mybucket/upload*": BucketPolicyWriteOnly}},
- // Readwrite
- {[]Statement{
- {
- Actions: commonBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- },
- {
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: downloadUploadCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- },
- {
- Actions: writeOnlyObjectActions.Union(readOnlyObjectActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket/both*"),
- }}, "mybucket", "", map[string]BucketPolicy{"mybucket/both*": BucketPolicyReadWrite}},
- }
-
- for _, testCase := range testCases {
- policyRules := GetPolicies(testCase.statements, testCase.bucketName)
- if !reflect.DeepEqual(testCase.expectedResult, policyRules) {
- t.Fatalf("%+v:\n expected: %+v, got: %+v", testCase, testCase.expectedResult, policyRules)
- }
- }
-}
-
-// GetPolicy() is called and the result is validated.
-func TestGetPolicy(t *testing.T) {
- helloCondMap := make(ConditionMap)
- helloCondKeyMap := make(ConditionKeyMap)
- helloCondKeyMap.Add("s3:prefix", set.CreateStringSet("hello"))
- helloCondMap.Add("StringEquals", helloCondKeyMap)
-
- testCases := []struct {
- statements []Statement
- bucketName string
- prefix string
- expectedResult BucketPolicy
- }{
- // Empty statements, bucket name and prefix.
- {[]Statement{}, "", "", BucketPolicyNone},
- // Non-empty statements, empty bucket name and empty prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "", "", BucketPolicyNone},
- // Empty statements, non-empty bucket name and empty prefix.
- {[]Statement{}, "mybucket", "", BucketPolicyNone},
- // not-matching Statements.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // not-matching Statements with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only commonBucketActions.
- {[]Statement{{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only commonBucketActions with prefix.
- {[]Statement{{
- Actions: commonBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only readOnlyBucketActions.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only readOnlyBucketActions with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only readOnlyBucketActions with conditions.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only readOnlyBucketActions with prefix with conditons.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only writeOnlyBucketActions.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only writeOnlyBucketActions with prefix.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only readOnlyBucketActions + writeOnlyBucketActions.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only readOnlyBucketActions + writeOnlyBucketActions with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- // Statements with only readOnlyBucketActions + writeOnlyBucketActions and conditions.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "", BucketPolicyNone},
- // Statements with only readOnlyBucketActions + writeOnlyBucketActions and conditions with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions.Union(writeOnlyBucketActions),
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, "mybucket", "hello", BucketPolicyNone},
- }
-
- for _, testCase := range testCases {
- policy := GetPolicy(testCase.statements, testCase.bucketName, testCase.prefix)
- if testCase.expectedResult != policy {
- t.Fatalf("%+v: expected: %s, got: %s", testCase, testCase.expectedResult, policy)
- }
- }
-}
-
-// SetPolicy() is called and the result is validated.
-func TestSetPolicy(t *testing.T) {
- helloCondMap := make(ConditionMap)
- helloCondKeyMap := make(ConditionKeyMap)
- helloCondKeyMap.Add("s3:prefix", set.CreateStringSet("hello"))
- helloCondMap.Add("StringEquals", helloCondKeyMap)
-
- testCases := []struct {
- statements []Statement
- policy BucketPolicy
- bucketName string
- prefix string
- expectedResult string
- }{
- // BucketPolicyNone - empty statements, bucket name and prefix.
- {[]Statement{}, BucketPolicyNone, "", "", `[]`},
- // BucketPolicyNone - non-empty statements, bucket name and prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyNone, "", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""}]`},
- // BucketPolicyNone - empty statements, non-empty bucket name and prefix.
- {[]Statement{}, BucketPolicyNone, "mybucket", "", `[]`},
- // BucketPolicyNone - empty statements, bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyNone, "", "hello", `[]`},
- // BucketPolicyReadOnly - empty statements, bucket name and prefix.
- {[]Statement{}, BucketPolicyReadOnly, "", "", `[]`},
- // BucketPolicyReadOnly - non-empty statements, bucket name and prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, BucketPolicyReadOnly, "", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::testbucket"],"Sid":""}]`},
- // BucketPolicyReadOnly - empty statements, non-empty bucket name and prefix.
- {[]Statement{}, BucketPolicyReadOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyReadOnly - empty statements, bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyReadOnly, "", "hello", `[]`},
- // BucketPolicyReadOnly - empty statements, non-empty bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyReadOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // BucketPolicyWriteOnly - empty statements, bucket name and prefix.
- {[]Statement{}, BucketPolicyReadOnly, "", "", `[]`},
- // BucketPolicyWriteOnly - non-empty statements, bucket name and prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, BucketPolicyWriteOnly, "", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::testbucket"],"Sid":""}]`},
- // BucketPolicyWriteOnly - empty statements, non-empty bucket name and prefix.
- {[]Statement{}, BucketPolicyWriteOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyWriteOnly - empty statements, bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyWriteOnly, "", "hello", `[]`},
- // BucketPolicyWriteOnly - empty statements, non-empty bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyWriteOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // BucketPolicyReadWrite - empty statements, bucket name and prefix.
- {[]Statement{}, BucketPolicyReadWrite, "", "", `[]`},
- // BucketPolicyReadWrite - non-empty statements, bucket name and prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::testbucket"),
- }}, BucketPolicyReadWrite, "", "", `[{"Action":["s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::testbucket"],"Sid":""}]`},
- // BucketPolicyReadWrite - empty statements, non-empty bucket name and prefix.
- {[]Statement{}, BucketPolicyReadWrite, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // BucketPolicyReadWrite - empty statements, bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyReadWrite, "", "hello", `[]`},
- // BucketPolicyReadWrite - empty statements, non-empty bucket name and non-empty prefix.
- {[]Statement{}, BucketPolicyReadWrite, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // Set readonly.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyReadOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // Set readonly with prefix.
- {[]Statement{{
- Actions: writeOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyReadOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- // Set writeonly.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyWriteOnly, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // Set writeonly with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyWriteOnly, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
-
- // Set readwrite.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyReadWrite, "mybucket", "", `[{"Action":["s3:GetBucketLocation","s3:ListBucket","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/*"],"Sid":""}]`},
- // Set readwrite with prefix.
- {[]Statement{{
- Actions: readOnlyBucketActions,
- Effect: "Allow",
- Principal: User{AWS: set.CreateStringSet("*")},
- Conditions: helloCondMap,
- Resources: set.CreateStringSet("arn:aws:s3:::mybucket"),
- }}, BucketPolicyReadWrite, "mybucket", "hello", `[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["hello"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::mybucket/hello*"],"Sid":""}]`},
- }
-
- for _, testCase := range testCases {
- statements := SetPolicy(testCase.statements, testCase.policy, testCase.bucketName, testCase.prefix)
- if data, err := json.Marshal(statements); err != nil {
- t.Fatalf("unable encoding to json, %s", err)
- } else if string(data) != testCase.expectedResult {
- t.Fatalf("%+v: expected: %s, got: %s", testCase, testCase.expectedResult, string(data))
- }
- }
-}
-
-// Validates bucket policy string.
-func TestIsValidBucketPolicy(t *testing.T) {
- testCases := []struct {
- inputPolicy BucketPolicy
- expectedResult bool
- }{
- // valid inputs.
- {BucketPolicy("none"), true},
- {BucketPolicy("readonly"), true},
- {BucketPolicy("readwrite"), true},
- {BucketPolicy("writeonly"), true},
- // invalid input.
- {BucketPolicy("readwriteonly"), false},
- {BucketPolicy("writeread"), false},
- }
-
- for i, testCase := range testCases {
- actualResult := testCase.inputPolicy.IsValidBucketPolicy()
- if testCase.expectedResult != actualResult {
- t.Errorf("Test %d: Expected IsValidBucket policy to be '%v' for policy \"%s\", but instead found it to be '%v'", i+1, testCase.expectedResult, testCase.inputPolicy, actualResult)
- }
- }
-}
-
-// Tests validate Bucket policy resource matcher.
-func TestBucketPolicyResourceMatch(t *testing.T) {
-
- // generates\ statement with given resource..
- generateStatement := func(resource string) Statement {
- statement := Statement{}
- statement.Resources = set.CreateStringSet(resource)
- return statement
- }
-
- // generates resource prefix.
- generateResource := func(bucketName, objectName string) string {
- return awsResourcePrefix + bucketName + "/" + objectName
- }
-
- testCases := []struct {
- resourceToMatch string
- statement Statement
- expectedResourceMatch bool
- }{
- // Test case 1-4.
- // Policy with resource ending with bucket/* allows access to all objects inside the given bucket.
- {generateResource("minio-bucket", ""), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/*")), true},
- {generateResource("minio-bucket", ""), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/*")), true},
- {generateResource("minio-bucket", ""), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/*")), true},
- {generateResource("minio-bucket", ""), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/*")), true},
- // Test case - 5.
- // Policy with resource ending with bucket/oo* should not allow access to bucket/output.txt.
- {generateResource("minio-bucket", "output.txt"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/oo*")), false},
- // Test case - 6.
- // Policy with resource ending with bucket/oo* should allow access to bucket/ootput.txt.
- {generateResource("minio-bucket", "ootput.txt"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/oo*")), true},
- // Test case - 7.
- // Policy with resource ending with bucket/oo* allows access to all subfolders starting with "oo" inside given bucket.
- {generateResource("minio-bucket", "oop-bucket/my-file"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/oo*")), true},
- // Test case - 8.
- {generateResource("minio-bucket", "Asia/India/1.pjg"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/Asia/Japan/*")), false},
- // Test case - 9.
- {generateResource("minio-bucket", "Asia/India/1.pjg"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix, "minio-bucket"+"/Asia/Japan/*")), false},
- // Test case - 10.
- // Proves that the name space is flat.
- {generateResource("minio-bucket", "Africa/Bihar/India/design_info.doc/Bihar"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix,
- "minio-bucket"+"/*/India/*/Bihar")), true},
- // Test case - 11.
- // Proves that the name space is flat.
- {generateResource("minio-bucket", "Asia/China/India/States/Bihar/output.txt"), generateStatement(fmt.Sprintf("%s%s", awsResourcePrefix,
- "minio-bucket"+"/*/India/*/Bihar/*")), true},
- }
- for i, testCase := range testCases {
- resources := testCase.statement.Resources.FuncMatch(resourceMatch, testCase.resourceToMatch)
- actualResourceMatch := resources.Equals(testCase.statement.Resources)
- if testCase.expectedResourceMatch != actualResourceMatch {
- t.Errorf("Test %d: Expected Resource match to be `%v`, but instead found it to be `%v`", i+1, testCase.expectedResourceMatch, actualResourceMatch)
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming_test.go
deleted file mode 100644
index 297ab97be..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "bytes"
- "io/ioutil"
- "testing"
- "time"
-)
-
-func TestGetSeedSignature(t *testing.T) {
- accessKeyID := "AKIAIOSFODNN7EXAMPLE"
- secretAccessKeyID := "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- dataLen := 66560
- data := bytes.Repeat([]byte("a"), dataLen)
- body := ioutil.NopCloser(bytes.NewReader(data))
-
- req := NewRequest("PUT", "/examplebucket/chunkObject.txt", body)
- req.Header.Set("x-amz-storage-class", "REDUCED_REDUNDANCY")
- req.Host = "s3.amazonaws.com"
-
- reqTime, err := time.Parse("20060102T150405Z", "20130524T000000Z")
- if err != nil {
- t.Fatalf("Failed to parse time - %v", err)
- }
-
- req = StreamingSignV4(req, accessKeyID, secretAccessKeyID, "", "us-east-1", int64(dataLen), reqTime)
- actualSeedSignature := req.Body.(*StreamingReader).seedSignature
-
- expectedSeedSignature := "38cab3af09aa15ddf29e26e36236f60fb6bfb6243a20797ae9a8183674526079"
- if actualSeedSignature != expectedSeedSignature {
- t.Errorf("Expected %s but received %s", expectedSeedSignature, actualSeedSignature)
- }
-}
-
-func TestChunkSignature(t *testing.T) {
- chunkData := bytes.Repeat([]byte("a"), 65536)
- reqTime, _ := time.Parse(iso8601DateFormat, "20130524T000000Z")
- previousSignature := "4f232c4386841ef735655705268965c44a0e4690baa4adea153f7db9fa80a0a9"
- location := "us-east-1"
- secretAccessKeyID := "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- expectedSignature := "ad80c730a21e5b8d04586a2213dd63b9a0e99e0e2307b0ade35a65485a288648"
- actualSignature := buildChunkSignature(chunkData, reqTime, location, previousSignature, secretAccessKeyID)
- if actualSignature != expectedSignature {
- t.Errorf("Expected %s but received %s", expectedSignature, actualSignature)
- }
-}
-
-func TestSetStreamingAuthorization(t *testing.T) {
- location := "us-east-1"
- secretAccessKeyID := "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- accessKeyID := "AKIAIOSFODNN7EXAMPLE"
-
- req := NewRequest("PUT", "/examplebucket/chunkObject.txt", nil)
- req.Header.Set("x-amz-storage-class", "REDUCED_REDUNDANCY")
- req.Host = ""
- req.URL.Host = "s3.amazonaws.com"
-
- dataLen := int64(65 * 1024)
- reqTime, _ := time.Parse(iso8601DateFormat, "20130524T000000Z")
- req = StreamingSignV4(req, accessKeyID, secretAccessKeyID, "", location, dataLen, reqTime)
-
- expectedAuthorization := "AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20130524/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-storage-class,Signature=38cab3af09aa15ddf29e26e36236f60fb6bfb6243a20797ae9a8183674526079"
-
- actualAuthorization := req.Header.Get("Authorization")
- if actualAuthorization != expectedAuthorization {
- t.Errorf("Expected %s but received %s", expectedAuthorization, actualAuthorization)
- }
-}
-
-func TestStreamingReader(t *testing.T) {
- reqTime, _ := time.Parse("20060102T150405Z", "20130524T000000Z")
- location := "us-east-1"
- secretAccessKeyID := "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- accessKeyID := "AKIAIOSFODNN7EXAMPLE"
- dataLen := int64(65 * 1024)
-
- req := NewRequest("PUT", "/examplebucket/chunkObject.txt", nil)
- req.Header.Set("x-amz-storage-class", "REDUCED_REDUNDANCY")
- req.ContentLength = 65 * 1024
- req.Host = ""
- req.URL.Host = "s3.amazonaws.com"
-
- baseReader := ioutil.NopCloser(bytes.NewReader(bytes.Repeat([]byte("a"), 65*1024)))
- req.Body = baseReader
- req = StreamingSignV4(req, accessKeyID, secretAccessKeyID, "", location, dataLen, reqTime)
-
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- t.Errorf("Expected no error but received %v %d", err, len(b))
- }
- req.Body.Close()
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2_test.go
deleted file mode 100644
index 042b6e65c..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "sort"
- "testing"
-)
-
-// Tests for 'func TestResourceListSorting(t *testing.T)'.
-func TestResourceListSorting(t *testing.T) {
- sortedResourceList := make([]string, len(resourceList))
- copy(sortedResourceList, resourceList)
- sort.Strings(sortedResourceList)
- for i := 0; i < len(resourceList); i++ {
- if resourceList[i] != sortedResourceList[i] {
- t.Errorf("Expected resourceList[%d] = \"%s\", resourceList is not correctly sorted.", i, sortedResourceList[i])
- break
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v4_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v4_test.go
deleted file mode 100644
index a109a4f2a..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v4_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "io"
- "net/http"
- "strings"
- "testing"
-)
-
-func TestRequestHost(t *testing.T) {
- req, _ := buildRequest("dynamodb", "us-east-1", "{}")
- req.URL.RawQuery = "Foo=z&Foo=o&Foo=m&Foo=a"
- req.Host = "myhost"
- canonicalHeaders := getCanonicalHeaders(*req, v4IgnoredHeaders)
-
- if !strings.Contains(canonicalHeaders, "host:"+req.Host) {
- t.Errorf("canonical host header invalid")
- }
-}
-
-func buildRequest(serviceName, region, body string) (*http.Request, io.ReadSeeker) {
- endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
- reader := strings.NewReader(body)
- req, _ := http.NewRequest("POST", endpoint, reader)
- req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()"
- req.Header.Add("X-Amz-Target", "prefix.Operation")
- req.Header.Add("Content-Type", "application/x-amz-json-1.0")
- req.Header.Add("Content-Length", string(len(body)))
- req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)")
- req.Header.Add("X-Amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)")
- req.Header.Add("X-amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)")
- return req, reader
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature_test.go
deleted file mode 100644
index d53483e4e..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature_test.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "net/http"
- "strings"
- "testing"
-)
-
-// Tests signature calculation.
-func TestSignatureCalculation(t *testing.T) {
- req, err := http.NewRequest("GET", "https://s3.amazonaws.com", nil)
- if err != nil {
- t.Fatal("Error:", err)
- }
- req = SignV4(*req, "", "", "", "us-east-1")
- if req.Header.Get("Authorization") != "" {
- t.Fatal("Error: anonymous credentials should not have Authorization header.")
- }
-
- req = PreSignV4(*req, "", "", "", "us-east-1", 0)
- if strings.Contains(req.URL.RawQuery, "X-Amz-Signature") {
- t.Fatal("Error: anonymous credentials should not have Signature query resource.")
- }
-
- req = SignV2(*req, "", "")
- if req.Header.Get("Authorization") != "" {
- t.Fatal("Error: anonymous credentials should not have Authorization header.")
- }
-
- req = PreSignV2(*req, "", "", 0)
- if strings.Contains(req.URL.RawQuery, "Signature") {
- t.Fatal("Error: anonymous credentials should not have Signature query resource.")
- }
-
- req = SignV4(*req, "ACCESS-KEY", "SECRET-KEY", "", "us-east-1")
- if req.Header.Get("Authorization") == "" {
- t.Fatal("Error: normal credentials should have Authorization header.")
- }
-
- req = PreSignV4(*req, "ACCESS-KEY", "SECRET-KEY", "", "us-east-1", 0)
- if !strings.Contains(req.URL.RawQuery, "X-Amz-Signature") {
- t.Fatal("Error: normal credentials should have Signature query resource.")
- }
-
- req = SignV2(*req, "ACCESS-KEY", "SECRET-KEY")
- if req.Header.Get("Authorization") == "" {
- t.Fatal("Error: normal credentials should have Authorization header.")
- }
-
- req = PreSignV2(*req, "ACCESS-KEY", "SECRET-KEY", 0)
- if !strings.Contains(req.URL.RawQuery, "Signature") {
- t.Fatal("Error: normal credentials should not have Signature query resource.")
- }
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/test-utils_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/test-utils_test.go
deleted file mode 100644
index cf96d66c8..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/test-utils_test.go
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
-)
-
-// N B minio-go should compile on go1.5.3 onwards and httptest package is
-// available only from go.1.7.x. The following function is taken from
-// Go httptest package to be able to build on older versions of Go.
-
-// NewRequest returns a new incoming server Request, suitable
-// for passing to an http.Handler for testing.
-//
-// The target is the RFC 7230 "request-target": it may be either a
-// path or an absolute URL. If target is an absolute URL, the host name
-// from the URL is used. Otherwise, "example.com" is used.
-//
-// The TLS field is set to a non-nil dummy value if target has scheme
-// "https".
-//
-// The Request.Proto is always HTTP/1.1.
-//
-// An empty method means "GET".
-//
-// The provided body may be nil. If the body is of type *bytes.Reader,
-// *strings.Reader, or *bytes.Buffer, the Request.ContentLength is
-// set.
-//
-// NewRequest panics on error for ease of use in testing, where a
-// panic is acceptable.
-func NewRequest(method, target string, body io.Reader) *http.Request {
- if method == "" {
- method = "GET"
- }
- req, err := http.ReadRequest(bufio.NewReader(strings.NewReader(method + " " + target + " HTTP/1.0\r\n\r\n")))
- if err != nil {
- panic("invalid NewRequest arguments; " + err.Error())
- }
-
- // HTTP/1.0 was used above to avoid needing a Host field. Change it to 1.1 here.
- req.Proto = "HTTP/1.1"
- req.ProtoMinor = 1
- req.Close = false
-
- if body != nil {
- switch v := body.(type) {
- case *bytes.Buffer:
- req.ContentLength = int64(v.Len())
- case *bytes.Reader:
- req.ContentLength = int64(v.Len())
- case *strings.Reader:
- req.ContentLength = int64(v.Len())
- default:
- req.ContentLength = -1
- }
- if rc, ok := body.(io.ReadCloser); ok {
- req.Body = rc
- } else {
- req.Body = ioutil.NopCloser(body)
- }
- }
-
- // 192.0.2.0/24 is "TEST-NET" in RFC 5737 for use solely in
- // documentation and example source code and should not be
- // used publicly.
- req.RemoteAddr = "192.0.2.1:1234"
-
- if req.Host == "" {
- req.Host = "example.com"
- }
-
- if strings.HasPrefix(target, "https://") {
- req.TLS = &tls.ConnectionState{
- Version: tls.VersionTLS12,
- HandshakeComplete: true,
- ServerName: req.Host,
- }
- }
-
- return req
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go
deleted file mode 100644
index 407eddab3..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3signer
-
-import (
- "fmt"
- "net/http"
- "net/url"
- "testing"
-)
-
-// Tests url encoding.
-func TestEncodeURL2Path(t *testing.T) {
- type urlStrings struct {
- bucketName string
- objName string
- encodedObjName string
- }
-
- bucketName := "bucketName"
- want := []urlStrings{
- {
- bucketName: "bucketName",
- objName: "本語",
- encodedObjName: "%E6%9C%AC%E8%AA%9E",
- },
- {
- bucketName: "bucketName",
- objName: "本語.1",
- encodedObjName: "%E6%9C%AC%E8%AA%9E.1",
- },
- {
- objName: ">123>3123123",
- bucketName: "bucketName",
- encodedObjName: "%3E123%3E3123123",
- },
- {
- bucketName: "bucketName",
- objName: "test 1 2.txt",
- encodedObjName: "test%201%202.txt",
- },
- {
- bucketName: "test.bucketName",
- objName: "test++ 1.txt",
- encodedObjName: "test%2B%2B%201.txt",
- },
- }
-
- for _, o := range want {
- u, err := url.Parse(fmt.Sprintf("https://%s.s3.amazonaws.com/%s", bucketName, o.objName))
- if err != nil {
- t.Fatal("Error:", err)
- }
- urlPath := "/" + bucketName + "/" + o.encodedObjName
- if urlPath != encodeURL2Path(&http.Request{URL: u}) {
- t.Fatal("Error")
- }
- }
-
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go b/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go
deleted file mode 100644
index 55eaaeacf..000000000
--- a/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package s3utils
-
-import (
- "errors"
- "net/url"
- "testing"
-)
-
-// Tests get region from host URL.
-func TestGetRegionFromURL(t *testing.T) {
- testCases := []struct {
- u url.URL
- expectedRegion string
- }{
- {
- u: url.URL{Host: "storage.googleapis.com"},
- expectedRegion: "",
- },
- {
- u: url.URL{Host: "s3.cn-north-1.amazonaws.com.cn"},
- expectedRegion: "cn-north-1",
- },
- {
- u: url.URL{Host: "s3.cn-northwest-1.amazonaws.com.cn"},
- expectedRegion: "cn-northwest-1",
- },
- {
- u: url.URL{Host: "s3-fips-us-gov-west-1.amazonaws.com"},
- expectedRegion: "us-gov-west-1",
- },
- {
- u: url.URL{Host: "s3-us-gov-west-1.amazonaws.com"},
- expectedRegion: "us-gov-west-1",
- },
- {
- u: url.URL{Host: "192.168.1.1"},
- expectedRegion: "",
- },
- {
- u: url.URL{Host: "s3-eu-west-1.amazonaws.com"},
- expectedRegion: "eu-west-1",
- },
- {
- u: url.URL{Host: "s3.eu-west-1.amazonaws.com"},
- expectedRegion: "eu-west-1",
- },
- {
- u: url.URL{Host: "s3.dualstack.eu-west-1.amazonaws.com"},
- expectedRegion: "eu-west-1",
- },
- {
- u: url.URL{Host: "s3.amazonaws.com"},
- expectedRegion: "",
- },
- {
- u: url.URL{Host: "s3-external-1.amazonaws.com"},
- expectedRegion: "",
- },
- }
-
- for i, testCase := range testCases {
- region := GetRegionFromURL(testCase.u)
- if testCase.expectedRegion != region {
- t.Errorf("Test %d: Expected region %s, got %s", i+1, testCase.expectedRegion, region)
- }
- }
-}
-
-// Tests for 'isValidDomain(host string) bool'.
-func TestIsValidDomain(t *testing.T) {
- testCases := []struct {
- // Input.
- host string
- // Expected result.
- result bool
- }{
- {"s3.amazonaws.com", true},
- {"s3.cn-north-1.amazonaws.com.cn", true},
- {"s3.cn-northwest-1.amazonaws.com.cn", true},
- {"s3.amazonaws.com_", false},
- {"%$$$", false},
- {"s3.amz.test.com", true},
- {"s3.%%", false},
- {"localhost", true},
- {"-localhost", false},
- {"", false},
- {"\n \t", false},
- {" ", false},
- }
-
- for i, testCase := range testCases {
- result := IsValidDomain(testCase.host)
- if testCase.result != result {
- t.Errorf("Test %d: Expected isValidDomain test to be '%v', but found '%v' instead", i+1, testCase.result, result)
- }
- }
-}
-
-// Tests validate IP address validator.
-func TestIsValidIP(t *testing.T) {
- testCases := []struct {
- // Input.
- ip string
- // Expected result.
- result bool
- }{
- {"192.168.1.1", true},
- {"192.168.1", false},
- {"192.168.1.1.1", false},
- {"-192.168.1.1", false},
- {"260.192.1.1", false},
- }
-
- for i, testCase := range testCases {
- result := IsValidIP(testCase.ip)
- if testCase.result != result {
- t.Errorf("Test %d: Expected isValidIP to be '%v' for input \"%s\", but found it to be '%v' instead", i+1, testCase.result, testCase.ip, result)
- }
- }
-
-}
-
-// Tests validate virtual host validator.
-func TestIsVirtualHostSupported(t *testing.T) {
- testCases := []struct {
- url string
- bucket string
- // Expeceted result.
- result bool
- }{
- {"https://s3.amazonaws.com", "my-bucket", true},
- {"https://s3.cn-north-1.amazonaws.com.cn", "my-bucket", true},
- {"https://s3.amazonaws.com", "my-bucket.", false},
- {"https://amazons3.amazonaws.com", "my-bucket.", false},
- {"https://storage.googleapis.com/", "my-bucket", true},
- {"https://mystorage.googleapis.com/", "my-bucket", false},
- }
-
- for i, testCase := range testCases {
- u, err := url.Parse(testCase.url)
- if err != nil {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err)
- }
- result := IsVirtualHostSupported(*u, testCase.bucket)
- if testCase.result != result {
- t.Errorf("Test %d: Expected isVirtualHostSupported to be '%v' for input url \"%s\" and bucket \"%s\", but found it to be '%v' instead", i+1, testCase.result, testCase.url, testCase.bucket, result)
- }
- }
-}
-
-// Tests validate Amazon endpoint validator.
-func TestIsAmazonEndpoint(t *testing.T) {
- testCases := []struct {
- url string
- // Expected result.
- result bool
- }{
- {"https://192.168.1.1", false},
- {"192.168.1.1", false},
- {"http://storage.googleapis.com", false},
- {"https://storage.googleapis.com", false},
- {"storage.googleapis.com", false},
- {"s3.amazonaws.com", false},
- {"https://amazons3.amazonaws.com", false},
- {"-192.168.1.1", false},
- {"260.192.1.1", false},
- {"https://s3-.amazonaws.com", false},
- {"https://s3..amazonaws.com", false},
- {"https://s3.dualstack.us-west-1.amazonaws.com.cn", false},
- {"https://s3..us-west-1.amazonaws.com.cn", false},
- // valid inputs.
- {"https://s3.amazonaws.com", true},
- {"https://s3-external-1.amazonaws.com", true},
- {"https://s3.cn-north-1.amazonaws.com.cn", true},
- {"https://s3-us-west-1.amazonaws.com", true},
- {"https://s3.us-west-1.amazonaws.com", true},
- {"https://s3.dualstack.us-west-1.amazonaws.com", true},
- }
-
- for i, testCase := range testCases {
- u, err := url.Parse(testCase.url)
- if err != nil {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err)
- }
- result := IsAmazonEndpoint(*u)
- if testCase.result != result {
- t.Errorf("Test %d: Expected isAmazonEndpoint to be '%v' for input \"%s\", but found it to be '%v' instead", i+1, testCase.result, testCase.url, result)
- }
- }
-
-}
-
-// Tests validate Google Cloud end point validator.
-func TestIsGoogleEndpoint(t *testing.T) {
- testCases := []struct {
- url string
- // Expected result.
- result bool
- }{
- {"192.168.1.1", false},
- {"https://192.168.1.1", false},
- {"s3.amazonaws.com", false},
- {"http://s3.amazonaws.com", false},
- {"https://s3.amazonaws.com", false},
- {"https://s3.cn-north-1.amazonaws.com.cn", false},
- {"-192.168.1.1", false},
- {"260.192.1.1", false},
- // valid inputs.
- {"http://storage.googleapis.com", true},
- {"https://storage.googleapis.com", true},
- }
-
- for i, testCase := range testCases {
- u, err := url.Parse(testCase.url)
- if err != nil {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err)
- }
- result := IsGoogleEndpoint(*u)
- if testCase.result != result {
- t.Errorf("Test %d: Expected isGoogleEndpoint to be '%v' for input \"%s\", but found it to be '%v' instead", i+1, testCase.result, testCase.url, result)
- }
- }
-
-}
-
-func TestPercentEncodeSlash(t *testing.T) {
- testCases := []struct {
- input string
- output string
- }{
- {"test123", "test123"},
- {"abc,+_1", "abc,+_1"},
- {"%40prefix=test%40123", "%40prefix=test%40123"},
- {"key1=val1/val2", "key1=val1%2Fval2"},
- {"%40prefix=test%40123/", "%40prefix=test%40123%2F"},
- }
-
- for i, testCase := range testCases {
- receivedOutput := percentEncodeSlash(testCase.input)
- if testCase.output != receivedOutput {
- t.Errorf(
- "Test %d: Input: \"%s\" --> Expected percentEncodeSlash to return \"%s\", but it returned \"%s\" instead!",
- i+1, testCase.input, testCase.output,
- receivedOutput,
- )
-
- }
- }
-}
-
-// Tests validate the query encoder.
-func TestQueryEncode(t *testing.T) {
- testCases := []struct {
- queryKey string
- valueToEncode []string
- // Expected result.
- result string
- }{
- {"prefix", []string{"test@123", "test@456"}, "prefix=test%40123&prefix=test%40456"},
- {"@prefix", []string{"test@123"}, "%40prefix=test%40123"},
- {"@prefix", []string{"a/b/c/"}, "%40prefix=a%2Fb%2Fc%2F"},
- {"prefix", []string{"test#123"}, "prefix=test%23123"},
- {"prefix#", []string{"test#123"}, "prefix%23=test%23123"},
- {"prefix", []string{"test123"}, "prefix=test123"},
- {"prefix", []string{"test本語123", "test123"}, "prefix=test%E6%9C%AC%E8%AA%9E123&prefix=test123"},
- }
-
- for i, testCase := range testCases {
- urlValues := make(url.Values)
- for _, valueToEncode := range testCase.valueToEncode {
- urlValues.Add(testCase.queryKey, valueToEncode)
- }
- result := QueryEncode(urlValues)
- if testCase.result != result {
- t.Errorf("Test %d: Expected queryEncode result to be \"%s\", but found it to be \"%s\" instead", i+1, testCase.result, result)
- }
- }
-}
-
-// Tests validate the URL path encoder.
-func TestEncodePath(t *testing.T) {
- testCases := []struct {
- // Input.
- inputStr string
- // Expected result.
- result string
- }{
- {"thisisthe%url", "thisisthe%25url"},
- {"本語", "%E6%9C%AC%E8%AA%9E"},
- {"本語.1", "%E6%9C%AC%E8%AA%9E.1"},
- {">123", "%3E123"},
- {"myurl#link", "myurl%23link"},
- {"space in url", "space%20in%20url"},
- {"url+path", "url%2Bpath"},
- }
-
- for i, testCase := range testCases {
- result := EncodePath(testCase.inputStr)
- if testCase.result != result {
- t.Errorf("Test %d: Expected queryEncode result to be \"%s\", but found it to be \"%s\" instead", i+1, testCase.result, result)
- }
- }
-}
-
-// Tests validate the bucket name validator.
-func TestIsValidBucketName(t *testing.T) {
- testCases := []struct {
- // Input.
- bucketName string
- // Expected result.
- err error
- // Flag to indicate whether test should Pass.
- shouldPass bool
- }{
- {".mybucket", errors.New("Bucket name contains invalid characters"), false},
- {"$mybucket", errors.New("Bucket name contains invalid characters"), false},
- {"mybucket-", errors.New("Bucket name contains invalid characters"), false},
- {"my", errors.New("Bucket name cannot be smaller than 3 characters"), false},
- {"", errors.New("Bucket name cannot be empty"), false},
- {"my..bucket", errors.New("Bucket name contains invalid characters"), false},
- {"192.168.1.168", errors.New("Bucket name cannot be an ip address"), false},
- {":bucketname", errors.New("Bucket name contains invalid characters"), false},
- {"_bucketName", errors.New("Bucket name contains invalid characters"), false},
- {"my.bucket.com", nil, true},
- {"my-bucket", nil, true},
- {"123my-bucket", nil, true},
- {"Mybucket", nil, true},
- {"My_bucket", nil, true},
- {"My:bucket", nil, true},
- }
-
- for i, testCase := range testCases {
- err := CheckValidBucketName(testCase.bucketName)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- }
-
-}
-
-// Tests validate the bucket name validator stricter.
-func TestIsValidBucketNameStrict(t *testing.T) {
- testCases := []struct {
- // Input.
- bucketName string
- // Expected result.
- err error
- // Flag to indicate whether test should Pass.
- shouldPass bool
- }{
- {".mybucket", errors.New("Bucket name contains invalid characters"), false},
- {"$mybucket", errors.New("Bucket name contains invalid characters"), false},
- {"mybucket-", errors.New("Bucket name contains invalid characters"), false},
- {"my", errors.New("Bucket name cannot be smaller than 3 characters"), false},
- {"", errors.New("Bucket name cannot be empty"), false},
- {"my..bucket", errors.New("Bucket name contains invalid characters"), false},
- {"192.168.1.168", errors.New("Bucket name cannot be an ip address"), false},
- {"Mybucket", errors.New("Bucket name contains invalid characters"), false},
- {"my.bucket.com", nil, true},
- {"my-bucket", nil, true},
- {"123my-bucket", nil, true},
- }
-
- for i, testCase := range testCases {
- err := CheckValidBucketNameStrict(testCase.bucketName)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- }
-
-}
diff --git a/vendor/github.com/minio/minio-go/pkg/set/stringset_test.go b/vendor/github.com/minio/minio-go/pkg/set/stringset_test.go
deleted file mode 100644
index d7e6aa799..000000000
--- a/vendor/github.com/minio/minio-go/pkg/set/stringset_test.go
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package set
-
-import (
- "fmt"
- "strings"
- "testing"
-)
-
-// NewStringSet() is called and the result is validated.
-func TestNewStringSet(t *testing.T) {
- if ss := NewStringSet(); !ss.IsEmpty() {
- t.Fatalf("expected: true, got: false")
- }
-}
-
-// CreateStringSet() is called and the result is validated.
-func TestCreateStringSet(t *testing.T) {
- ss := CreateStringSet("foo")
- if str := ss.String(); str != `[foo]` {
- t.Fatalf("expected: %s, got: %s", `["foo"]`, str)
- }
-}
-
-// CopyStringSet() is called and the result is validated.
-func TestCopyStringSet(t *testing.T) {
- ss := CreateStringSet("foo")
- sscopy := CopyStringSet(ss)
- if !ss.Equals(sscopy) {
- t.Fatalf("expected: %s, got: %s", ss, sscopy)
- }
-}
-
-// StringSet.Add() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetAdd(t *testing.T) {
- testCases := []struct {
- value string
- expectedResult string
- }{
- // Test first addition.
- {"foo", `[foo]`},
- // Test duplicate addition.
- {"foo", `[foo]`},
- // Test new addition.
- {"bar", `[bar foo]`},
- }
-
- ss := NewStringSet()
- for _, testCase := range testCases {
- ss.Add(testCase.value)
- if str := ss.String(); str != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, str)
- }
- }
-}
-
-// StringSet.Remove() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetRemove(t *testing.T) {
- ss := CreateStringSet("foo", "bar")
- testCases := []struct {
- value string
- expectedResult string
- }{
- // Test removing non-existen item.
- {"baz", `[bar foo]`},
- // Test remove existing item.
- {"foo", `[bar]`},
- // Test remove existing item again.
- {"foo", `[bar]`},
- // Test remove to make set to empty.
- {"bar", `[]`},
- }
-
- for _, testCase := range testCases {
- ss.Remove(testCase.value)
- if str := ss.String(); str != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, str)
- }
- }
-}
-
-// StringSet.Contains() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetContains(t *testing.T) {
- ss := CreateStringSet("foo")
- testCases := []struct {
- value string
- expectedResult bool
- }{
- // Test to check non-existent item.
- {"bar", false},
- // Test to check existent item.
- {"foo", true},
- // Test to verify case sensitivity.
- {"Foo", false},
- }
-
- for _, testCase := range testCases {
- if result := ss.Contains(testCase.value); result != testCase.expectedResult {
- t.Fatalf("expected: %t, got: %t", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.FuncMatch() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetFuncMatch(t *testing.T) {
- ss := CreateStringSet("foo", "bar")
- testCases := []struct {
- matchFn func(string, string) bool
- value string
- expectedResult string
- }{
- // Test to check match function doing case insensive compare.
- {func(setValue string, compareValue string) bool {
- return strings.ToUpper(setValue) == strings.ToUpper(compareValue)
- }, "Bar", `[bar]`},
- // Test to check match function doing prefix check.
- {func(setValue string, compareValue string) bool {
- return strings.HasPrefix(compareValue, setValue)
- }, "foobar", `[foo]`},
- }
-
- for _, testCase := range testCases {
- s := ss.FuncMatch(testCase.matchFn, testCase.value)
- if result := s.String(); result != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.ApplyFunc() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetApplyFunc(t *testing.T) {
- ss := CreateStringSet("foo", "bar")
- testCases := []struct {
- applyFn func(string) string
- expectedResult string
- }{
- // Test to apply function prepending a known string.
- {func(setValue string) string { return "mybucket/" + setValue }, `[mybucket/bar mybucket/foo]`},
- // Test to apply function modifying values.
- {func(setValue string) string { return setValue[1:] }, `[ar oo]`},
- }
-
- for _, testCase := range testCases {
- s := ss.ApplyFunc(testCase.applyFn)
- if result := s.String(); result != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.Equals() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetEquals(t *testing.T) {
- testCases := []struct {
- set1 StringSet
- set2 StringSet
- expectedResult bool
- }{
- // Test equal set
- {CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar"), true},
- // Test second set with more items
- {CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar", "baz"), false},
- // Test second set with less items
- {CreateStringSet("foo", "bar"), CreateStringSet("bar"), false},
- }
-
- for _, testCase := range testCases {
- if result := testCase.set1.Equals(testCase.set2); result != testCase.expectedResult {
- t.Fatalf("expected: %t, got: %t", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.Intersection() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetIntersection(t *testing.T) {
- testCases := []struct {
- set1 StringSet
- set2 StringSet
- expectedResult StringSet
- }{
- // Test intersecting all values.
- {CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar")},
- // Test intersecting all values in second set.
- {CreateStringSet("foo", "bar", "baz"), CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar")},
- // Test intersecting different values in second set.
- {CreateStringSet("foo", "baz"), CreateStringSet("baz", "bar"), CreateStringSet("baz")},
- // Test intersecting none.
- {CreateStringSet("foo", "baz"), CreateStringSet("poo", "bar"), NewStringSet()},
- }
-
- for _, testCase := range testCases {
- if result := testCase.set1.Intersection(testCase.set2); !result.Equals(testCase.expectedResult) {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.Difference() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetDifference(t *testing.T) {
- testCases := []struct {
- set1 StringSet
- set2 StringSet
- expectedResult StringSet
- }{
- // Test differing none.
- {CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar"), NewStringSet()},
- // Test differing in first set.
- {CreateStringSet("foo", "bar", "baz"), CreateStringSet("foo", "bar"), CreateStringSet("baz")},
- // Test differing values in both set.
- {CreateStringSet("foo", "baz"), CreateStringSet("baz", "bar"), CreateStringSet("foo")},
- // Test differing all values.
- {CreateStringSet("foo", "baz"), CreateStringSet("poo", "bar"), CreateStringSet("foo", "baz")},
- }
-
- for _, testCase := range testCases {
- if result := testCase.set1.Difference(testCase.set2); !result.Equals(testCase.expectedResult) {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.Union() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetUnion(t *testing.T) {
- testCases := []struct {
- set1 StringSet
- set2 StringSet
- expectedResult StringSet
- }{
- // Test union same values.
- {CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar")},
- // Test union same values in second set.
- {CreateStringSet("foo", "bar", "baz"), CreateStringSet("foo", "bar"), CreateStringSet("foo", "bar", "baz")},
- // Test union different values in both set.
- {CreateStringSet("foo", "baz"), CreateStringSet("baz", "bar"), CreateStringSet("foo", "baz", "bar")},
- // Test union all different values.
- {CreateStringSet("foo", "baz"), CreateStringSet("poo", "bar"), CreateStringSet("foo", "baz", "poo", "bar")},
- }
-
- for _, testCase := range testCases {
- if result := testCase.set1.Union(testCase.set2); !result.Equals(testCase.expectedResult) {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.MarshalJSON() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetMarshalJSON(t *testing.T) {
- testCases := []struct {
- set StringSet
- expectedResult string
- }{
- // Test set with values.
- {CreateStringSet("foo", "bar"), `["bar","foo"]`},
- // Test empty set.
- {NewStringSet(), "[]"},
- }
-
- for _, testCase := range testCases {
- if result, _ := testCase.set.MarshalJSON(); string(result) != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, string(result))
- }
- }
-}
-
-// StringSet.UnmarshalJSON() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetUnmarshalJSON(t *testing.T) {
- testCases := []struct {
- data []byte
- expectedResult string
- }{
- // Test to convert JSON array to set.
- {[]byte(`["bar","foo"]`), `[bar foo]`},
- // Test to convert JSON string to set.
- {[]byte(`"bar"`), `[bar]`},
- // Test to convert JSON empty array to set.
- {[]byte(`[]`), `[]`},
- // Test to convert JSON empty string to set.
- {[]byte(`""`), `[]`},
- }
-
- for _, testCase := range testCases {
- var set StringSet
- set.UnmarshalJSON(testCase.data)
- if result := set.String(); result != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, result)
- }
- }
-}
-
-// StringSet.String() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetString(t *testing.T) {
- testCases := []struct {
- set StringSet
- expectedResult string
- }{
- // Test empty set.
- {NewStringSet(), `[]`},
- // Test set with empty value.
- {CreateStringSet(""), `[]`},
- // Test set with value.
- {CreateStringSet("foo"), `[foo]`},
- }
-
- for _, testCase := range testCases {
- if str := testCase.set.String(); str != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, str)
- }
- }
-}
-
-// StringSet.ToSlice() is called with series of cases for valid and erroneous inputs and the result is validated.
-func TestStringSetToSlice(t *testing.T) {
- testCases := []struct {
- set StringSet
- expectedResult string
- }{
- // Test empty set.
- {NewStringSet(), `[]`},
- // Test set with empty value.
- {CreateStringSet(""), `[]`},
- // Test set with value.
- {CreateStringSet("foo"), `[foo]`},
- // Test set with value.
- {CreateStringSet("foo", "bar"), `[bar foo]`},
- }
-
- for _, testCase := range testCases {
- sslice := testCase.set.ToSlice()
- if str := fmt.Sprintf("%s", sslice); str != testCase.expectedResult {
- t.Fatalf("expected: %s, got: %s", testCase.expectedResult, str)
- }
- }
-}
diff --git a/vendor/github.com/minio/minio-go/test-utils_test.go b/vendor/github.com/minio/minio-go/test-utils_test.go
deleted file mode 100644
index 6f6443ccf..000000000
--- a/vendor/github.com/minio/minio-go/test-utils_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "bytes"
- "encoding/xml"
- "io/ioutil"
- "net/http"
- "strconv"
-)
-
-// Contains common used utilities for tests.
-
-// APIError Used for mocking error response from server.
-type APIError struct {
- Code string
- Description string
- HTTPStatusCode int
-}
-
-// Mocks XML error response from the server.
-func generateErrorResponse(resp *http.Response, APIErr APIError, bucketName string) *http.Response {
- // generate error response.
- errorResponse := getAPIErrorResponse(APIErr, bucketName)
- encodedErrorResponse := encodeResponse(errorResponse)
- // write Header.
- resp.StatusCode = APIErr.HTTPStatusCode
- resp.Body = ioutil.NopCloser(bytes.NewBuffer(encodedErrorResponse))
-
- return resp
-}
-
-// getErrorResponse gets in standard error and resource value and
-// provides a encodable populated response values.
-func getAPIErrorResponse(err APIError, bucketName string) ErrorResponse {
- var errResp = ErrorResponse{}
- errResp.Code = err.Code
- errResp.Message = err.Description
- errResp.BucketName = bucketName
- return errResp
-}
-
-// Encodes the response headers into XML format.
-func encodeResponse(response interface{}) []byte {
- var bytesBuffer bytes.Buffer
- bytesBuffer.WriteString(xml.Header)
- encode := xml.NewEncoder(&bytesBuffer)
- encode.Encode(response)
- return bytesBuffer.Bytes()
-}
-
-// Convert string to bool and always return false if any error
-func mustParseBool(str string) bool {
- b, err := strconv.ParseBool(str)
- if err != nil {
- return false
- }
- return b
-}
diff --git a/vendor/github.com/minio/minio-go/utils_test.go b/vendor/github.com/minio/minio-go/utils_test.go
deleted file mode 100644
index 5411cc91a..000000000
--- a/vendor/github.com/minio/minio-go/utils_test.go
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Minio Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2015-2017 Minio, Inc.
- *
- * 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.
- */
-
-package minio
-
-import (
- "fmt"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/minio/minio-go/pkg/s3utils"
-)
-
-// Tests signature redacting function used
-// in filtering on-wire Authorization header.
-func TestRedactSignature(t *testing.T) {
- testCases := []struct {
- authValue string
- expectedRedactedAuthValue string
- }{
- {
- authValue: "AWS 1231313:888x000231==",
- expectedRedactedAuthValue: "AWS **REDACTED**:**REDACTED**",
- },
- {
- authValue: "AWS4-HMAC-SHA256 Credential=12312313/20170613/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=02131231312313213",
- expectedRedactedAuthValue: "AWS4-HMAC-SHA256 Credential=**REDACTED**/20170613/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED**",
- },
- }
-
- for i, testCase := range testCases {
- redactedAuthValue := redactSignature(testCase.authValue)
- if redactedAuthValue != testCase.expectedRedactedAuthValue {
- t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.expectedRedactedAuthValue, redactedAuthValue)
- }
- }
-}
-
-// Tests filter header function by filtering out
-// some custom header keys.
-func TestFilterHeader(t *testing.T) {
- header := http.Header{}
- header.Set("Content-Type", "binary/octet-stream")
- header.Set("Content-Encoding", "gzip")
- newHeader := filterHeader(header, []string{"Content-Type"})
- if len(newHeader) > 1 {
- t.Fatalf("Unexpected size of the returned header, should be 1, got %d", len(newHeader))
- }
- if newHeader.Get("Content-Encoding") != "gzip" {
- t.Fatalf("Unexpected content-encoding value, expected 'gzip', got %s", newHeader.Get("Content-Encoding"))
- }
-}
-
-// Tests for 'getEndpointURL(endpoint string, inSecure bool)'.
-func TestGetEndpointURL(t *testing.T) {
- testCases := []struct {
- // Inputs.
- endPoint string
- secure bool
-
- // Expected result.
- result string
- err error
- // Flag indicating whether the test is expected to pass or not.
- shouldPass bool
- }{
- {"s3.amazonaws.com", true, "https://s3.amazonaws.com", nil, true},
- {"s3.cn-north-1.amazonaws.com.cn", true, "https://s3.cn-north-1.amazonaws.com.cn", nil, true},
- {"s3.cn-northwest-1.amazonaws.com.cn", true, "https://s3.cn-northwest-1.amazonaws.com.cn", nil, true},
- {"s3.amazonaws.com", false, "http://s3.amazonaws.com", nil, true},
- {"s3.cn-north-1.amazonaws.com.cn", false, "http://s3.cn-north-1.amazonaws.com.cn", nil, true},
- {"s3.cn-northwest-1.amazonaws.com.cn", false, "http://s3.cn-northwest-1.amazonaws.com.cn", nil, true},
- {"192.168.1.1:9000", false, "http://192.168.1.1:9000", nil, true},
- {"192.168.1.1:9000", true, "https://192.168.1.1:9000", nil, true},
- {"s3.amazonaws.com:443", true, "https://s3.amazonaws.com:443", nil, true},
- {"13333.123123.-", true, "", ErrInvalidArgument(fmt.Sprintf("Endpoint: %s does not follow ip address or domain name standards.", "13333.123123.-")), false},
- {"13333.123123.-", true, "", ErrInvalidArgument(fmt.Sprintf("Endpoint: %s does not follow ip address or domain name standards.", "13333.123123.-")), false},
- {"storage.googleapis.com:4000", true, "", ErrInvalidArgument("Google Cloud Storage endpoint should be 'storage.googleapis.com'."), false},
- {"s3.aamzza.-", true, "", ErrInvalidArgument(fmt.Sprintf("Endpoint: %s does not follow ip address or domain name standards.", "s3.aamzza.-")), false},
- {"", true, "", ErrInvalidArgument("Endpoint: does not follow ip address or domain name standards."), false},
- }
-
- for i, testCase := range testCases {
- result, err := getEndpointURL(testCase.endPoint, testCase.secure)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- // Test passes as expected, but the output values are verified for correctness here.
- if err == nil && testCase.shouldPass {
- if testCase.result != result.String() {
- t.Errorf("Test %d: Expected the result Url to be \"%s\", but found \"%s\" instead", i+1, testCase.result, result.String())
- }
- }
- }
-}
-
-// Tests validate end point validator.
-func TestIsValidEndpointURL(t *testing.T) {
- testCases := []struct {
- url string
- err error
- // Flag indicating whether the test is expected to pass or not.
- shouldPass bool
- }{
- {"", ErrInvalidArgument("Endpoint url cannot be empty."), false},
- {"/", nil, true},
- {"https://s3.amazonaws.com", nil, true},
- {"https://s3.cn-north-1.amazonaws.com.cn", nil, true},
- {"https://s3-us-gov-west-1.amazonaws.com", nil, true},
- {"https://s3-fips-us-gov-west-1.amazonaws.com", nil, true},
- {"https://s3.amazonaws.com/", nil, true},
- {"https://storage.googleapis.com/", nil, true},
- {"https://z3.amazonaws.com", nil, true},
- {"https://mybalancer.us-east-1.elb.amazonaws.com", nil, true},
- {"192.168.1.1", ErrInvalidArgument("Endpoint url cannot have fully qualified paths."), false},
- {"https://amazon.googleapis.com/", ErrInvalidArgument("Google Cloud Storage endpoint should be 'storage.googleapis.com'."), false},
- {"https://storage.googleapis.com/bucket/", ErrInvalidArgument("Endpoint url cannot have fully qualified paths."), false},
- {"https://s3.amazonaws.com/bucket/object", ErrInvalidArgument("Endpoint url cannot have fully qualified paths."), false},
- }
-
- for i, testCase := range testCases {
- var u url.URL
- if testCase.url == "" {
- u = sentinelURL
- } else {
- u1, err := url.Parse(testCase.url)
- if err != nil {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err)
- }
- u = *u1
- }
- err := isValidEndpointURL(u)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err)
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err)
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err, err)
- }
- }
-
- }
-}
-
-func TestDefaultBucketLocation(t *testing.T) {
- testCases := []struct {
- endpointURL url.URL
- regionOverride string
- expectedLocation string
- }{
- // Region override is set URL is ignored. - Test 1.
- {
- endpointURL: url.URL{Host: "s3-fips-us-gov-west-1.amazonaws.com"},
- regionOverride: "us-west-1",
- expectedLocation: "us-west-1",
- },
- // No region override, url based preferenced is honored - Test 2.
- {
- endpointURL: url.URL{Host: "s3-fips-us-gov-west-1.amazonaws.com"},
- regionOverride: "",
- expectedLocation: "us-gov-west-1",
- },
- // Region override is honored - Test 3.
- {
- endpointURL: url.URL{Host: "s3.amazonaws.com"},
- regionOverride: "us-west-1",
- expectedLocation: "us-west-1",
- },
- // China region should be honored, region override not provided. - Test 4.
- {
- endpointURL: url.URL{Host: "s3.cn-north-1.amazonaws.com.cn"},
- regionOverride: "",
- expectedLocation: "cn-north-1",
- },
- // China region should be honored, region override not provided. - Test 5.
- {
- endpointURL: url.URL{Host: "s3.cn-northwest-1.amazonaws.com.cn"},
- regionOverride: "",
- expectedLocation: "cn-northwest-1",
- },
- // No region provided, no standard region strings provided as well. - Test 6.
- {
- endpointURL: url.URL{Host: "s3.amazonaws.com"},
- regionOverride: "",
- expectedLocation: "us-east-1",
- },
- }
-
- for i, testCase := range testCases {
- retLocation := getDefaultLocation(testCase.endpointURL, testCase.regionOverride)
- if testCase.expectedLocation != retLocation {
- t.Errorf("Test %d: Expected location %s, got %s", i+1, testCase.expectedLocation, retLocation)
- }
- }
-}
-
-// Tests validate the expiry time validator.
-func TestIsValidExpiry(t *testing.T) {
- testCases := []struct {
- // Input.
- duration time.Duration
- // Expected result.
- err error
- // Flag to indicate whether the test should pass.
- shouldPass bool
- }{
- {100 * time.Millisecond, ErrInvalidArgument("Expires cannot be lesser than 1 second."), false},
- {604801 * time.Second, ErrInvalidArgument("Expires cannot be greater than 7 days."), false},
- {0 * time.Second, ErrInvalidArgument("Expires cannot be lesser than 1 second."), false},
- {1 * time.Second, nil, true},
- {10000 * time.Second, nil, true},
- {999 * time.Second, nil, true},
- }
-
- for i, testCase := range testCases {
- err := isValidExpiry(testCase.duration)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- }
-}
-
-// Tests validate the bucket name validator.
-func TestIsValidBucketName(t *testing.T) {
- testCases := []struct {
- // Input.
- bucketName string
- // Expected result.
- err error
- // Flag to indicate whether test should Pass.
- shouldPass bool
- }{
- {".mybucket", ErrInvalidBucketName("Bucket name contains invalid characters"), false},
- {"mybucket.", ErrInvalidBucketName("Bucket name contains invalid characters"), false},
- {"mybucket-", ErrInvalidBucketName("Bucket name contains invalid characters"), false},
- {"my", ErrInvalidBucketName("Bucket name cannot be smaller than 3 characters"), false},
- {"", ErrInvalidBucketName("Bucket name cannot be empty"), false},
- {"my..bucket", ErrInvalidBucketName("Bucket name contains invalid characters"), false},
- {"my.bucket.com", nil, true},
- {"my-bucket", nil, true},
- {"123my-bucket", nil, true},
- }
-
- for i, testCase := range testCases {
- err := s3utils.CheckValidBucketName(testCase.bucketName)
- if err != nil && testCase.shouldPass {
- t.Errorf("Test %d: Expected to pass, but failed with: <ERROR> %s", i+1, err.Error())
- }
- if err == nil && !testCase.shouldPass {
- t.Errorf("Test %d: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, testCase.err.Error())
- }
- // Failed as expected, but does it fail for the expected reason.
- if err != nil && !testCase.shouldPass {
- if err.Error() != testCase.err.Error() {
- t.Errorf("Test %d: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, testCase.err.Error(), err.Error())
- }
- }
-
- }
-
-}
-
-// Tests if header is standard supported header
-func TestIsStandardHeader(t *testing.T) {
- testCases := []struct {
- // Input.
- header string
- // Expected result.
- expectedValue bool
- }{
- {"content-encoding", true},
- {"content-type", true},
- {"cache-control", true},
- {"content-disposition", true},
- {"random-header", false},
- }
-
- for i, testCase := range testCases {
- actual := isStandardHeader(testCase.header)
- if actual != testCase.expectedValue {
- t.Errorf("Test %d: Expected to pass, but failed", i+1)
- }
- }
-
-}
-
-// Tests if header is server encryption header
-func TestIsSSEHeader(t *testing.T) {
- testCases := []struct {
- // Input.
- header string
- // Expected result.
- expectedValue bool
- }{
- {"x-amz-server-side-encryption", true},
- {"x-amz-server-side-encryption-aws-kms-key-id", true},
- {"x-amz-server-side-encryption-context", true},
- {"x-amz-server-side-encryption-customer-algorithm", true},
- {"x-amz-server-side-encryption-customer-key", true},
- {"x-amz-server-side-encryption-customer-key-MD5", true},
- {"random-header", false},
- }
-
- for i, testCase := range testCases {
- actual := isSSEHeader(testCase.header)
- if actual != testCase.expectedValue {
- t.Errorf("Test %d: Expected to pass, but failed", i+1)
- }
- }
-}
-
-// Tests if header is client encryption header
-func TestIsCSEHeader(t *testing.T) {
- testCases := []struct {
- // Input.
- header string
- // Expected result.
- expectedValue bool
- }{
- {"x-amz-iv", true},
- {"x-amz-key", true},
- {"x-amz-matdesc", true},
- {"x-amz-meta-x-amz-iv", true},
- {"x-amz-meta-x-amz-key", true},
- {"x-amz-meta-x-amz-matdesc", true},
- {"random-header", false},
- }
-
- for i, testCase := range testCases {
- actual := isCSEHeader(testCase.header)
- if actual != testCase.expectedValue {
- t.Errorf("Test %d: Expected to pass, but failed", i+1)
- }
- }
-
-}
-
-// Tests if header is x-amz-meta or x-amz-acl
-func TestIsAmzHeader(t *testing.T) {
- testCases := []struct {
- // Input.
- header string
- // Expected result.
- expectedValue bool
- }{
- {"x-amz-iv", false},
- {"x-amz-key", false},
- {"x-amz-matdesc", false},
- {"x-amz-meta-x-amz-iv", true},
- {"x-amz-meta-x-amz-key", true},
- {"x-amz-meta-x-amz-matdesc", true},
- {"x-amz-acl", true},
- {"random-header", false},
- }
-
- for i, testCase := range testCases {
- actual := isAmzHeader(testCase.header)
- if actual != testCase.expectedValue {
- t.Errorf("Test %d: Expected to pass, but failed", i+1)
- }
- }
-
-}
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir_test.go b/vendor/github.com/mitchellh/go-homedir/homedir_test.go
deleted file mode 100644
index e4054e72a..000000000
--- a/vendor/github.com/mitchellh/go-homedir/homedir_test.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package homedir
-
-import (
- "os"
- "os/user"
- "path/filepath"
- "testing"
-)
-
-func patchEnv(key, value string) func() {
- bck := os.Getenv(key)
- deferFunc := func() {
- os.Setenv(key, bck)
- }
-
- os.Setenv(key, value)
- return deferFunc
-}
-
-func BenchmarkDir(b *testing.B) {
- // We do this for any "warmups"
- for i := 0; i < 10; i++ {
- Dir()
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Dir()
- }
-}
-
-func TestDir(t *testing.T) {
- u, err := user.Current()
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- dir, err := Dir()
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if u.HomeDir != dir {
- t.Fatalf("%#v != %#v", u.HomeDir, dir)
- }
-}
-
-func TestExpand(t *testing.T) {
- u, err := user.Current()
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- cases := []struct {
- Input string
- Output string
- Err bool
- }{
- {
- "/foo",
- "/foo",
- false,
- },
-
- {
- "~/foo",
- filepath.Join(u.HomeDir, "foo"),
- false,
- },
-
- {
- "",
- "",
- false,
- },
-
- {
- "~",
- u.HomeDir,
- false,
- },
-
- {
- "~foo/foo",
- "",
- true,
- },
- }
-
- for _, tc := range cases {
- actual, err := Expand(tc.Input)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %#v\n\nErr: %s", tc.Input, err)
- }
-
- if actual != tc.Output {
- t.Fatalf("Input: %#v\n\nOutput: %#v", tc.Input, actual)
- }
- }
-
- DisableCache = true
- defer func() { DisableCache = false }()
- defer patchEnv("HOME", "/custom/path/")()
- expected := filepath.Join("/", "custom", "path", "foo/bar")
- actual, err := Expand("~/foo/bar")
-
- if err != nil {
- t.Errorf("No error is expected, got: %v", err)
- } else if actual != expected {
- t.Errorf("Expected: %v; actual: %v", expected, actual)
- }
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go
deleted file mode 100644
index a81728e74..000000000
--- a/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go
+++ /dev/null
@@ -1,259 +0,0 @@
-package mapstructure
-
-import (
- "errors"
- "reflect"
- "testing"
- "time"
-)
-
-func TestComposeDecodeHookFunc(t *testing.T) {
- f1 := func(
- f reflect.Kind,
- t reflect.Kind,
- data interface{}) (interface{}, error) {
- return data.(string) + "foo", nil
- }
-
- f2 := func(
- f reflect.Kind,
- t reflect.Kind,
- data interface{}) (interface{}, error) {
- return data.(string) + "bar", nil
- }
-
- f := ComposeDecodeHookFunc(f1, f2)
-
- result, err := DecodeHookExec(
- f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), "")
- if err != nil {
- t.Fatalf("bad: %s", err)
- }
- if result.(string) != "foobar" {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-func TestComposeDecodeHookFunc_err(t *testing.T) {
- f1 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) {
- return nil, errors.New("foo")
- }
-
- f2 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) {
- panic("NOPE")
- }
-
- f := ComposeDecodeHookFunc(f1, f2)
-
- _, err := DecodeHookExec(
- f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), 42)
- if err.Error() != "foo" {
- t.Fatalf("bad: %s", err)
- }
-}
-
-func TestComposeDecodeHookFunc_kinds(t *testing.T) {
- var f2From reflect.Kind
-
- f1 := func(
- f reflect.Kind,
- t reflect.Kind,
- data interface{}) (interface{}, error) {
- return int(42), nil
- }
-
- f2 := func(
- f reflect.Kind,
- t reflect.Kind,
- data interface{}) (interface{}, error) {
- f2From = f
- return data, nil
- }
-
- f := ComposeDecodeHookFunc(f1, f2)
-
- _, err := DecodeHookExec(
- f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), "")
- if err != nil {
- t.Fatalf("bad: %s", err)
- }
- if f2From != reflect.Int {
- t.Fatalf("bad: %#v", f2From)
- }
-}
-
-func TestStringToSliceHookFunc(t *testing.T) {
- f := StringToSliceHookFunc(",")
-
- strType := reflect.TypeOf("")
- sliceType := reflect.TypeOf([]byte(""))
- cases := []struct {
- f, t reflect.Type
- data interface{}
- result interface{}
- err bool
- }{
- {sliceType, sliceType, 42, 42, false},
- {strType, strType, 42, 42, false},
- {
- strType,
- sliceType,
- "foo,bar,baz",
- []string{"foo", "bar", "baz"},
- false,
- },
- {
- strType,
- sliceType,
- "",
- []string{},
- false,
- },
- }
-
- for i, tc := range cases {
- actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data)
- if tc.err != (err != nil) {
- t.Fatalf("case %d: expected err %#v", i, tc.err)
- }
- if !reflect.DeepEqual(actual, tc.result) {
- t.Fatalf(
- "case %d: expected %#v, got %#v",
- i, tc.result, actual)
- }
- }
-}
-
-func TestStringToTimeDurationHookFunc(t *testing.T) {
- f := StringToTimeDurationHookFunc()
-
- strType := reflect.TypeOf("")
- timeType := reflect.TypeOf(time.Duration(5))
- cases := []struct {
- f, t reflect.Type
- data interface{}
- result interface{}
- err bool
- }{
- {strType, timeType, "5s", 5 * time.Second, false},
- {strType, timeType, "5", time.Duration(0), true},
- {strType, strType, "5", "5", false},
- }
-
- for i, tc := range cases {
- actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data)
- if tc.err != (err != nil) {
- t.Fatalf("case %d: expected err %#v", i, tc.err)
- }
- if !reflect.DeepEqual(actual, tc.result) {
- t.Fatalf(
- "case %d: expected %#v, got %#v",
- i, tc.result, actual)
- }
- }
-}
-
-func TestStringToTimeHookFunc(t *testing.T) {
- strType := reflect.TypeOf("")
- timeType := reflect.TypeOf(time.Time{})
- cases := []struct {
- f, t reflect.Type
- layout string
- data interface{}
- result interface{}
- err bool
- }{
- {strType, timeType, time.RFC3339, "2006-01-02T15:04:05Z",
- time.Date(2006, 1, 2, 15, 4, 5, 0, time.UTC), false},
- {strType, timeType, time.RFC3339, "5", time.Time{}, true},
- {strType, strType, time.RFC3339, "5", "5", false},
- }
-
- for i, tc := range cases {
- f := StringToTimeHookFunc(tc.layout)
- actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data)
- if tc.err != (err != nil) {
- t.Fatalf("case %d: expected err %#v", i, tc.err)
- }
- if !reflect.DeepEqual(actual, tc.result) {
- t.Fatalf(
- "case %d: expected %#v, got %#v",
- i, tc.result, actual)
- }
- }
-}
-
-func TestWeaklyTypedHook(t *testing.T) {
- var f DecodeHookFunc = WeaklyTypedHook
-
- boolType := reflect.TypeOf(true)
- strType := reflect.TypeOf("")
- sliceType := reflect.TypeOf([]byte(""))
- cases := []struct {
- f, t reflect.Type
- data interface{}
- result interface{}
- err bool
- }{
- // TO STRING
- {
- boolType,
- strType,
- false,
- "0",
- false,
- },
-
- {
- boolType,
- strType,
- true,
- "1",
- false,
- },
-
- {
- reflect.TypeOf(float32(1)),
- strType,
- float32(7),
- "7",
- false,
- },
-
- {
- reflect.TypeOf(int(1)),
- strType,
- int(7),
- "7",
- false,
- },
-
- {
- sliceType,
- strType,
- []uint8("foo"),
- "foo",
- false,
- },
-
- {
- reflect.TypeOf(uint(1)),
- strType,
- uint(7),
- "7",
- false,
- },
- }
-
- for i, tc := range cases {
- actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data)
- if tc.err != (err != nil) {
- t.Fatalf("case %d: expected err %#v", i, tc.err)
- }
- if !reflect.DeepEqual(actual, tc.result) {
- t.Fatalf(
- "case %d: expected %#v, got %#v",
- i, tc.result, actual)
- }
- }
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
index 65977b654..aaf12a295 100644
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go
+++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
@@ -225,7 +225,15 @@ func (d *Decoder) Decode(input interface{}) error {
// Decodes an unknown data type into a specific reflection value.
func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error {
if input == nil {
- // If the input is nil, then we don't set anything.
+ // If the data is nil, then we don't set anything, unless ZeroFields is set
+ // to true.
+ if d.config.ZeroFields {
+ outVal.Set(reflect.Zero(outVal.Type()))
+
+ if d.config.Metadata != nil && name != "" {
+ d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
+ }
+ }
return nil
}
@@ -234,6 +242,9 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e
// If the input value is invalid, then we just set the value
// to be the zero value.
outVal.Set(reflect.Zero(outVal.Type()))
+ if d.config.Metadata != nil && name != "" {
+ d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
+ }
return nil
}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go
deleted file mode 100644
index 41d2a41f7..000000000
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package mapstructure
-
-import (
- "encoding/json"
- "testing"
-)
-
-func Benchmark_Decode(b *testing.B) {
- type Person struct {
- Name string
- Age int
- Emails []string
- Extra map[string]string
- }
-
- input := map[string]interface{}{
- "name": "Mitchell",
- "age": 91,
- "emails": []string{"one", "two", "three"},
- "extra": map[string]string{
- "twitter": "mitchellh",
- },
- }
-
- var result Person
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-// decodeViaJSON takes the map data and passes it through encoding/json to convert it into the
-// given Go native structure pointed to by v. v must be a pointer to a struct.
-func decodeViaJSON(data interface{}, v interface{}) error {
- // Perform the task by simply marshalling the input into JSON,
- // then unmarshalling it into target native Go struct.
- b, err := json.Marshal(data)
- if err != nil {
- return err
- }
- return json.Unmarshal(b, v)
-}
-
-func Benchmark_DecodeViaJSON(b *testing.B) {
- type Person struct {
- Name string
- Age int
- Emails []string
- Extra map[string]string
- }
-
- input := map[string]interface{}{
- "name": "Mitchell",
- "age": 91,
- "emails": []string{"one", "two", "three"},
- "extra": map[string]string{
- "twitter": "mitchellh",
- },
- }
-
- var result Person
- for i := 0; i < b.N; i++ {
- decodeViaJSON(input, &result)
- }
-}
-
-func Benchmark_DecodeBasic(b *testing.B) {
- input := map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "Vuint": 42,
- "vbool": true,
- "Vfloat": 42.42,
- "vsilent": true,
- "vdata": 42,
- }
-
- var result Basic
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeEmbedded(b *testing.B) {
- input := map[string]interface{}{
- "vstring": "foo",
- "Basic": map[string]interface{}{
- "vstring": "innerfoo",
- },
- "vunique": "bar",
- }
-
- var result Embedded
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeTypeConversion(b *testing.B) {
- input := map[string]interface{}{
- "IntToFloat": 42,
- "IntToUint": 42,
- "IntToBool": 1,
- "IntToString": 42,
- "UintToInt": 42,
- "UintToFloat": 42,
- "UintToBool": 42,
- "UintToString": 42,
- "BoolToInt": true,
- "BoolToUint": true,
- "BoolToFloat": true,
- "BoolToString": true,
- "FloatToInt": 42.42,
- "FloatToUint": 42.42,
- "FloatToBool": 42.42,
- "FloatToString": 42.42,
- "StringToInt": "42",
- "StringToUint": "42",
- "StringToBool": "1",
- "StringToFloat": "42.42",
- "SliceToMap": []interface{}{},
- "MapToSlice": map[string]interface{}{},
- }
-
- var resultStrict TypeConversionResult
- for i := 0; i < b.N; i++ {
- Decode(input, &resultStrict)
- }
-}
-
-func Benchmark_DecodeMap(b *testing.B) {
- input := map[string]interface{}{
- "vfoo": "foo",
- "vother": map[interface{}]interface{}{
- "foo": "foo",
- "bar": "bar",
- },
- }
-
- var result Map
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeMapOfStruct(b *testing.B) {
- input := map[string]interface{}{
- "value": map[string]interface{}{
- "foo": map[string]string{"vstring": "one"},
- "bar": map[string]string{"vstring": "two"},
- },
- }
-
- var result MapOfStruct
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeSlice(b *testing.B) {
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": []string{"foo", "bar", "baz"},
- }
-
- var result Slice
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeSliceOfStruct(b *testing.B) {
- input := map[string]interface{}{
- "value": []map[string]interface{}{
- {"vstring": "one"},
- {"vstring": "two"},
- },
- }
-
- var result SliceOfStruct
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
-
-func Benchmark_DecodeWeaklyTypedInput(b *testing.B) {
- type Person struct {
- Name string
- Age int
- Emails []string
- }
-
- // This input can come from anywhere, but typically comes from
- // something like decoding JSON, generated by a weakly typed language
- // such as PHP.
- input := map[string]interface{}{
- "name": 123, // number => string
- "age": "42", // string => number
- "emails": map[string]interface{}{}, // empty map => empty array
- }
-
- var result Person
- config := &DecoderConfig{
- WeaklyTypedInput: true,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- panic(err)
- }
-
- for i := 0; i < b.N; i++ {
- decoder.Decode(input)
- }
-}
-
-func Benchmark_DecodeMetadata(b *testing.B) {
- type Person struct {
- Name string
- Age int
- }
-
- input := map[string]interface{}{
- "name": "Mitchell",
- "age": 91,
- "email": "foo@bar.com",
- }
-
- var md Metadata
- var result Person
- config := &DecoderConfig{
- Metadata: &md,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- panic(err)
- }
-
- for i := 0; i < b.N; i++ {
- decoder.Decode(input)
- }
-}
-
-func Benchmark_DecodeMetadataEmbedded(b *testing.B) {
- input := map[string]interface{}{
- "vstring": "foo",
- "vunique": "bar",
- }
-
- var md Metadata
- var result EmbeddedSquash
- config := &DecoderConfig{
- Metadata: &md,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- b.Fatalf("err: %s", err)
- }
-
- for i := 0; i < b.N; i++ {
- decoder.Decode(input)
- }
-}
-
-func Benchmark_DecodeTagged(b *testing.B) {
- input := map[string]interface{}{
- "foo": "bar",
- "bar": "value",
- }
-
- var result Tagged
- for i := 0; i < b.N; i++ {
- Decode(input, &result)
- }
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go
deleted file mode 100644
index ecfb76987..000000000
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package mapstructure
-
-import "testing"
-
-// GH-1
-func TestDecode_NilValue(t *testing.T) {
- input := map[string]interface{}{
- "vfoo": nil,
- "vother": nil,
- }
-
- var result Map
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("should not error: %s", err)
- }
-
- if result.Vfoo != "" {
- t.Fatalf("value should be default: %s", result.Vfoo)
- }
-
- if result.Vother != nil {
- t.Fatalf("Vother should be nil: %s", result.Vother)
- }
-}
-
-// GH-10
-func TestDecode_mapInterfaceInterface(t *testing.T) {
- input := map[interface{}]interface{}{
- "vfoo": nil,
- "vother": nil,
- }
-
- var result Map
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("should not error: %s", err)
- }
-
- if result.Vfoo != "" {
- t.Fatalf("value should be default: %s", result.Vfoo)
- }
-
- if result.Vother != nil {
- t.Fatalf("Vother should be nil: %s", result.Vother)
- }
-}
-
-// #48
-func TestNestedTypePointerWithDefaults(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "vbool": true,
- },
- }
-
- result := NestedPointer{
- Vbar: &Basic{
- Vuint: 42,
- },
- }
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
- }
-
- if result.Vbar.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
- }
-
- if result.Vbar.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
- }
-
- if result.Vbar.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
- }
-
- // this is the error
- if result.Vbar.Vuint != 42 {
- t.Errorf("vuint value should be 42: %#v", result.Vbar.Vuint)
- }
-
-}
-
-type NestedSlice struct {
- Vfoo string
- Vbars []Basic
- Vempty []Basic
-}
-
-// #48
-func TestNestedTypeSliceWithDefaults(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbars": []map[string]interface{}{
- {"vstring": "foo", "vint": 42, "vbool": true},
- {"vint": 42, "vbool": true},
- },
- "vempty": []map[string]interface{}{
- {"vstring": "foo", "vint": 42, "vbool": true},
- {"vint": 42, "vbool": true},
- },
- }
-
- result := NestedSlice{
- Vbars: []Basic{
- {Vuint: 42},
- {Vstring: "foo"},
- },
- }
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbars[0].Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbars[0].Vstring)
- }
- // this is the error
- if result.Vbars[0].Vuint != 42 {
- t.Errorf("vuint value should be 42: %#v", result.Vbars[0].Vuint)
- }
-}
-
-// #48 workaround
-func TestNestedTypeWithDefaults(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "vbool": true,
- },
- }
-
- result := Nested{
- Vbar: Basic{
- Vuint: 42,
- },
- }
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
- }
-
- if result.Vbar.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
- }
-
- if result.Vbar.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
- }
-
- if result.Vbar.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
- }
-
- // this is the error
- if result.Vbar.Vuint != 42 {
- t.Errorf("vuint value should be 42: %#v", result.Vbar.Vuint)
- }
-
-}
-
-// #67 panic() on extending slices (decodeSlice with disabled ZeroValues)
-func TestDecodeSliceToEmptySliceWOZeroing(t *testing.T) {
- t.Parallel()
-
- type TestStruct struct {
- Vfoo []string
- }
-
- decode := func(m interface{}, rawVal interface{}) error {
- config := &DecoderConfig{
- Metadata: nil,
- Result: rawVal,
- ZeroFields: false,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- return err
- }
-
- return decoder.Decode(m)
- }
-
- {
- input := map[string]interface{}{
- "vfoo": []string{"1"},
- }
-
- result := &TestStruct{}
-
- err := decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
- }
-
- {
- input := map[string]interface{}{
- "vfoo": []string{"1"},
- }
-
- result := &TestStruct{
- Vfoo: []string{},
- }
-
- err := decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
- }
-
- {
- input := map[string]interface{}{
- "vfoo": []string{"2", "3"},
- }
-
- result := &TestStruct{
- Vfoo: []string{"1"},
- }
-
- err := decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
- }
-}
-
-// #70
-func TestNextSquashMapstructure(t *testing.T) {
- data := &struct {
- Level1 struct {
- Level2 struct {
- Foo string
- } `mapstructure:",squash"`
- } `mapstructure:",squash"`
- }{}
- err := Decode(map[interface{}]interface{}{"foo": "baz"}, &data)
- if err != nil {
- t.Fatalf("should not error: %s", err)
- }
- if data.Level1.Level2.Foo != "baz" {
- t.Fatal("value should be baz")
- }
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go
deleted file mode 100644
index f17c214a8..000000000
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go
+++ /dev/null
@@ -1,203 +0,0 @@
-package mapstructure
-
-import (
- "fmt"
-)
-
-func ExampleDecode() {
- type Person struct {
- Name string
- Age int
- Emails []string
- Extra map[string]string
- }
-
- // This input can come from anywhere, but typically comes from
- // something like decoding JSON where we're not quite sure of the
- // struct initially.
- input := map[string]interface{}{
- "name": "Mitchell",
- "age": 91,
- "emails": []string{"one", "two", "three"},
- "extra": map[string]string{
- "twitter": "mitchellh",
- },
- }
-
- var result Person
- err := Decode(input, &result)
- if err != nil {
- panic(err)
- }
-
- fmt.Printf("%#v", result)
- // Output:
- // mapstructure.Person{Name:"Mitchell", Age:91, Emails:[]string{"one", "two", "three"}, Extra:map[string]string{"twitter":"mitchellh"}}
-}
-
-func ExampleDecode_errors() {
- type Person struct {
- Name string
- Age int
- Emails []string
- Extra map[string]string
- }
-
- // This input can come from anywhere, but typically comes from
- // something like decoding JSON where we're not quite sure of the
- // struct initially.
- input := map[string]interface{}{
- "name": 123,
- "age": "bad value",
- "emails": []int{1, 2, 3},
- }
-
- var result Person
- err := Decode(input, &result)
- if err == nil {
- panic("should have an error")
- }
-
- fmt.Println(err.Error())
- // Output:
- // 5 error(s) decoding:
- //
- // * 'Age' expected type 'int', got unconvertible type 'string'
- // * 'Emails[0]' expected type 'string', got unconvertible type 'int'
- // * 'Emails[1]' expected type 'string', got unconvertible type 'int'
- // * 'Emails[2]' expected type 'string', got unconvertible type 'int'
- // * 'Name' expected type 'string', got unconvertible type 'int'
-}
-
-func ExampleDecode_metadata() {
- type Person struct {
- Name string
- Age int
- }
-
- // This input can come from anywhere, but typically comes from
- // something like decoding JSON where we're not quite sure of the
- // struct initially.
- input := map[string]interface{}{
- "name": "Mitchell",
- "age": 91,
- "email": "foo@bar.com",
- }
-
- // For metadata, we make a more advanced DecoderConfig so we can
- // more finely configure the decoder that is used. In this case, we
- // just tell the decoder we want to track metadata.
- var md Metadata
- var result Person
- config := &DecoderConfig{
- Metadata: &md,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- panic(err)
- }
-
- if err := decoder.Decode(input); err != nil {
- panic(err)
- }
-
- fmt.Printf("Unused keys: %#v", md.Unused)
- // Output:
- // Unused keys: []string{"email"}
-}
-
-func ExampleDecode_weaklyTypedInput() {
- type Person struct {
- Name string
- Age int
- Emails []string
- }
-
- // This input can come from anywhere, but typically comes from
- // something like decoding JSON, generated by a weakly typed language
- // such as PHP.
- input := map[string]interface{}{
- "name": 123, // number => string
- "age": "42", // string => number
- "emails": map[string]interface{}{}, // empty map => empty array
- }
-
- var result Person
- config := &DecoderConfig{
- WeaklyTypedInput: true,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- panic(err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- panic(err)
- }
-
- fmt.Printf("%#v", result)
- // Output: mapstructure.Person{Name:"123", Age:42, Emails:[]string{}}
-}
-
-func ExampleDecode_tags() {
- // Note that the mapstructure tags defined in the struct type
- // can indicate which fields the values are mapped to.
- type Person struct {
- Name string `mapstructure:"person_name"`
- Age int `mapstructure:"person_age"`
- }
-
- input := map[string]interface{}{
- "person_name": "Mitchell",
- "person_age": 91,
- }
-
- var result Person
- err := Decode(input, &result)
- if err != nil {
- panic(err)
- }
-
- fmt.Printf("%#v", result)
- // Output:
- // mapstructure.Person{Name:"Mitchell", Age:91}
-}
-
-func ExampleDecode_embeddedStruct() {
- // Squashing multiple embedded structs is allowed using the squash tag.
- // This is demonstrated by creating a composite struct of multiple types
- // and decoding into it. In this case, a person can carry with it both
- // a Family and a Location, as well as their own FirstName.
- type Family struct {
- LastName string
- }
- type Location struct {
- City string
- }
- type Person struct {
- Family `mapstructure:",squash"`
- Location `mapstructure:",squash"`
- FirstName string
- }
-
- input := map[string]interface{}{
- "FirstName": "Mitchell",
- "LastName": "Hashimoto",
- "City": "San Francisco",
- }
-
- var result Person
- err := Decode(input, &result)
- if err != nil {
- panic(err)
- }
-
- fmt.Printf("%s %s, %s", result.FirstName, result.LastName, result.City)
- // Output:
- // Mitchell Hashimoto, San Francisco
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go
deleted file mode 100644
index 64b122a9d..000000000
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go
+++ /dev/null
@@ -1,1708 +0,0 @@
-package mapstructure
-
-import (
- "encoding/json"
- "io"
- "reflect"
- "sort"
- "strings"
- "testing"
-)
-
-type Basic struct {
- Vstring string
- Vint int
- Vuint uint
- Vbool bool
- Vfloat float64
- Vextra string
- vsilent bool
- Vdata interface{}
- VjsonInt int
- VjsonFloat float64
- VjsonNumber json.Number
-}
-
-type BasicSquash struct {
- Test Basic `mapstructure:",squash"`
-}
-
-type Embedded struct {
- Basic
- Vunique string
-}
-
-type EmbeddedPointer struct {
- *Basic
- Vunique string
-}
-
-type EmbeddedSquash struct {
- Basic `mapstructure:",squash"`
- Vunique string
-}
-
-type SliceAlias []string
-
-type EmbeddedSlice struct {
- SliceAlias `mapstructure:"slice_alias"`
- Vunique string
-}
-
-type ArrayAlias [2]string
-
-type EmbeddedArray struct {
- ArrayAlias `mapstructure:"array_alias"`
- Vunique string
-}
-
-type SquashOnNonStructType struct {
- InvalidSquashType int `mapstructure:",squash"`
-}
-
-type Map struct {
- Vfoo string
- Vother map[string]string
-}
-
-type MapOfStruct struct {
- Value map[string]Basic
-}
-
-type Nested struct {
- Vfoo string
- Vbar Basic
-}
-
-type NestedPointer struct {
- Vfoo string
- Vbar *Basic
-}
-
-type NilInterface struct {
- W io.Writer
-}
-
-type Slice struct {
- Vfoo string
- Vbar []string
-}
-
-type SliceOfStruct struct {
- Value []Basic
-}
-
-type Array struct {
- Vfoo string
- Vbar [2]string
-}
-
-type ArrayOfStruct struct {
- Value [2]Basic
-}
-
-type Func struct {
- Foo func() string
-}
-
-type Tagged struct {
- Extra string `mapstructure:"bar,what,what"`
- Value string `mapstructure:"foo"`
-}
-
-type TypeConversionResult struct {
- IntToFloat float32
- IntToUint uint
- IntToBool bool
- IntToString string
- UintToInt int
- UintToFloat float32
- UintToBool bool
- UintToString string
- BoolToInt int
- BoolToUint uint
- BoolToFloat float32
- BoolToString string
- FloatToInt int
- FloatToUint uint
- FloatToBool bool
- FloatToString string
- SliceUint8ToString string
- StringToSliceUint8 []byte
- ArrayUint8ToString string
- StringToInt int
- StringToUint uint
- StringToBool bool
- StringToFloat float32
- StringToStrSlice []string
- StringToIntSlice []int
- StringToStrArray [1]string
- StringToIntArray [1]int
- SliceToMap map[string]interface{}
- MapToSlice []interface{}
- ArrayToMap map[string]interface{}
- MapToArray [1]interface{}
-}
-
-func TestBasicTypes(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "Vuint": 42,
- "vbool": true,
- "Vfloat": 42.42,
- "vsilent": true,
- "vdata": 42,
- "vjsonInt": json.Number("1234"),
- "vjsonFloat": json.Number("1234.5"),
- "vjsonNumber": json.Number("1234.5"),
- }
-
- var result Basic
- err := Decode(input, &result)
- if err != nil {
- t.Errorf("got an err: %s", err.Error())
- t.FailNow()
- }
-
- if result.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vstring)
- }
-
- if result.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vint)
- }
-
- if result.Vuint != 42 {
- t.Errorf("vuint value should be 42: %#v", result.Vuint)
- }
-
- if result.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbool)
- }
-
- if result.Vfloat != 42.42 {
- t.Errorf("vfloat value should be 42.42: %#v", result.Vfloat)
- }
-
- if result.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vextra)
- }
-
- if result.vsilent != false {
- t.Error("vsilent should not be set, it is unexported")
- }
-
- if result.Vdata != 42 {
- t.Error("vdata should be valid")
- }
-
- if result.VjsonInt != 1234 {
- t.Errorf("vjsonint value should be 1234: %#v", result.VjsonInt)
- }
-
- if result.VjsonFloat != 1234.5 {
- t.Errorf("vjsonfloat value should be 1234.5: %#v", result.VjsonFloat)
- }
-
- if !reflect.DeepEqual(result.VjsonNumber, json.Number("1234.5")) {
- t.Errorf("vjsonnumber value should be '1234.5': %T, %#v", result.VjsonNumber, result.VjsonNumber)
- }
-}
-
-func TestBasic_IntWithFloat(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vint": float64(42),
- }
-
- var result Basic
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-}
-
-func TestBasic_Merge(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vint": 42,
- }
-
- var result Basic
- result.Vuint = 100
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- expected := Basic{
- Vint: 42,
- Vuint: 100,
- }
- if !reflect.DeepEqual(result, expected) {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-// Test for issue #46.
-func TestBasic_Struct(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vdata": map[string]interface{}{
- "vstring": "foo",
- },
- }
-
- var result, inner Basic
- result.Vdata = &inner
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
- expected := Basic{
- Vdata: &Basic{
- Vstring: "foo",
- },
- }
- if !reflect.DeepEqual(result, expected) {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-func TestDecode_BasicSquash(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- }
-
- var result BasicSquash
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Test.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Test.Vstring)
- }
-}
-
-func TestDecode_Embedded(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- "Basic": map[string]interface{}{
- "vstring": "innerfoo",
- },
- "vunique": "bar",
- }
-
- var result Embedded
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vstring != "innerfoo" {
- t.Errorf("vstring value should be 'innerfoo': %#v", result.Vstring)
- }
-
- if result.Vunique != "bar" {
- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
- }
-}
-
-func TestDecode_EmbeddedPointer(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- "Basic": map[string]interface{}{
- "vstring": "innerfoo",
- },
- "vunique": "bar",
- }
-
- var result EmbeddedPointer
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- expected := EmbeddedPointer{
- Basic: &Basic{
- Vstring: "innerfoo",
- },
- Vunique: "bar",
- }
- if !reflect.DeepEqual(result, expected) {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-func TestDecode_EmbeddedSlice(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "slice_alias": []string{"foo", "bar"},
- "vunique": "bar",
- }
-
- var result EmbeddedSlice
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if !reflect.DeepEqual(result.SliceAlias, SliceAlias([]string{"foo", "bar"})) {
- t.Errorf("slice value: %#v", result.SliceAlias)
- }
-
- if result.Vunique != "bar" {
- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
- }
-}
-
-func TestDecode_EmbeddedArray(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "array_alias": [2]string{"foo", "bar"},
- "vunique": "bar",
- }
-
- var result EmbeddedArray
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if !reflect.DeepEqual(result.ArrayAlias, ArrayAlias([2]string{"foo", "bar"})) {
- t.Errorf("array value: %#v", result.ArrayAlias)
- }
-
- if result.Vunique != "bar" {
- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
- }
-}
-
-func TestDecode_EmbeddedSquash(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- "vunique": "bar",
- }
-
- var result EmbeddedSquash
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vstring)
- }
-
- if result.Vunique != "bar" {
- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
- }
-}
-
-func TestDecode_SquashOnNonStructType(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "InvalidSquashType": 42,
- }
-
- var result SquashOnNonStructType
- err := Decode(input, &result)
- if err == nil {
- t.Fatal("unexpected success decoding invalid squash field type")
- } else if !strings.Contains(err.Error(), "unsupported type for squash") {
- t.Fatalf("unexpected error message for invalid squash field type: %s", err)
- }
-}
-
-func TestDecode_DecodeHook(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vint": "WHAT",
- }
-
- decodeHook := func(from reflect.Kind, to reflect.Kind, v interface{}) (interface{}, error) {
- if from == reflect.String && to != reflect.String {
- return 5, nil
- }
-
- return v, nil
- }
-
- var result Basic
- config := &DecoderConfig{
- DecodeHook: decodeHook,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if result.Vint != 5 {
- t.Errorf("vint should be 5: %#v", result.Vint)
- }
-}
-
-func TestDecode_DecodeHookType(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vint": "WHAT",
- }
-
- decodeHook := func(from reflect.Type, to reflect.Type, v interface{}) (interface{}, error) {
- if from.Kind() == reflect.String &&
- to.Kind() != reflect.String {
- return 5, nil
- }
-
- return v, nil
- }
-
- var result Basic
- config := &DecoderConfig{
- DecodeHook: decodeHook,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if result.Vint != 5 {
- t.Errorf("vint should be 5: %#v", result.Vint)
- }
-}
-
-func TestDecode_Nil(t *testing.T) {
- t.Parallel()
-
- var input interface{}
- result := Basic{
- Vstring: "foo",
- }
-
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if result.Vstring != "foo" {
- t.Fatalf("bad: %#v", result.Vstring)
- }
-}
-
-func TestDecode_NilInterfaceHook(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "w": "",
- }
-
- decodeHook := func(f, t reflect.Type, v interface{}) (interface{}, error) {
- if t.String() == "io.Writer" {
- return nil, nil
- }
-
- return v, nil
- }
-
- var result NilInterface
- config := &DecoderConfig{
- DecodeHook: decodeHook,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if result.W != nil {
- t.Errorf("W should be nil: %#v", result.W)
- }
-}
-
-func TestDecode_FuncHook(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "foo": "baz",
- }
-
- decodeHook := func(f, t reflect.Type, v interface{}) (interface{}, error) {
- if t.Kind() != reflect.Func {
- return v, nil
- }
- val := v.(string)
- return func() string { return val }, nil
- }
-
- var result Func
- config := &DecoderConfig{
- DecodeHook: decodeHook,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if result.Foo() != "baz" {
- t.Errorf("Foo call result should be 'baz': %s", result.Foo())
- }
-}
-
-func TestDecode_NonStruct(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "foo": "bar",
- "bar": "baz",
- }
-
- var result map[string]string
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- if result["foo"] != "bar" {
- t.Fatal("foo is not bar")
- }
-}
-
-func TestDecode_StructMatch(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vbar": Basic{
- Vstring: "foo",
- },
- }
-
- var result Nested
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("bad: %#v", result)
- }
-}
-
-func TestDecode_TypeConversion(t *testing.T) {
- input := map[string]interface{}{
- "IntToFloat": 42,
- "IntToUint": 42,
- "IntToBool": 1,
- "IntToString": 42,
- "UintToInt": 42,
- "UintToFloat": 42,
- "UintToBool": 42,
- "UintToString": 42,
- "BoolToInt": true,
- "BoolToUint": true,
- "BoolToFloat": true,
- "BoolToString": true,
- "FloatToInt": 42.42,
- "FloatToUint": 42.42,
- "FloatToBool": 42.42,
- "FloatToString": 42.42,
- "SliceUint8ToString": []uint8("foo"),
- "StringToSliceUint8": "foo",
- "ArrayUint8ToString": [3]uint8{'f', 'o', 'o'},
- "StringToInt": "42",
- "StringToUint": "42",
- "StringToBool": "1",
- "StringToFloat": "42.42",
- "StringToStrSlice": "A",
- "StringToIntSlice": "42",
- "StringToStrArray": "A",
- "StringToIntArray": "42",
- "SliceToMap": []interface{}{},
- "MapToSlice": map[string]interface{}{},
- "ArrayToMap": []interface{}{},
- "MapToArray": map[string]interface{}{},
- }
-
- expectedResultStrict := TypeConversionResult{
- IntToFloat: 42.0,
- IntToUint: 42,
- UintToInt: 42,
- UintToFloat: 42,
- BoolToInt: 0,
- BoolToUint: 0,
- BoolToFloat: 0,
- FloatToInt: 42,
- FloatToUint: 42,
- }
-
- expectedResultWeak := TypeConversionResult{
- IntToFloat: 42.0,
- IntToUint: 42,
- IntToBool: true,
- IntToString: "42",
- UintToInt: 42,
- UintToFloat: 42,
- UintToBool: true,
- UintToString: "42",
- BoolToInt: 1,
- BoolToUint: 1,
- BoolToFloat: 1,
- BoolToString: "1",
- FloatToInt: 42,
- FloatToUint: 42,
- FloatToBool: true,
- FloatToString: "42.42",
- SliceUint8ToString: "foo",
- StringToSliceUint8: []byte("foo"),
- ArrayUint8ToString: "foo",
- StringToInt: 42,
- StringToUint: 42,
- StringToBool: true,
- StringToFloat: 42.42,
- StringToStrSlice: []string{"A"},
- StringToIntSlice: []int{42},
- StringToStrArray: [1]string{"A"},
- StringToIntArray: [1]int{42},
- SliceToMap: map[string]interface{}{},
- MapToSlice: []interface{}{},
- ArrayToMap: map[string]interface{}{},
- MapToArray: [1]interface{}{},
- }
-
- // Test strict type conversion
- var resultStrict TypeConversionResult
- err := Decode(input, &resultStrict)
- if err == nil {
- t.Errorf("should return an error")
- }
- if !reflect.DeepEqual(resultStrict, expectedResultStrict) {
- t.Errorf("expected %v, got: %v", expectedResultStrict, resultStrict)
- }
-
- // Test weak type conversion
- var decoder *Decoder
- var resultWeak TypeConversionResult
-
- config := &DecoderConfig{
- WeaklyTypedInput: true,
- Result: &resultWeak,
- }
-
- decoder, err = NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if !reflect.DeepEqual(resultWeak, expectedResultWeak) {
- t.Errorf("expected \n%#v, got: \n%#v", expectedResultWeak, resultWeak)
- }
-}
-
-func TestDecoder_ErrorUnused(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "hello",
- "foo": "bar",
- }
-
- var result Basic
- config := &DecoderConfig{
- ErrorUnused: true,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err == nil {
- t.Fatal("expected error")
- }
-}
-
-func TestMap(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vother": map[interface{}]interface{}{
- "foo": "foo",
- "bar": "bar",
- },
- }
-
- var result Map
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an error: %s", err)
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vother == nil {
- t.Fatal("vother should not be nil")
- }
-
- if len(result.Vother) != 2 {
- t.Error("vother should have two items")
- }
-
- if result.Vother["foo"] != "foo" {
- t.Errorf("'foo' key should be foo, got: %#v", result.Vother["foo"])
- }
-
- if result.Vother["bar"] != "bar" {
- t.Errorf("'bar' key should be bar, got: %#v", result.Vother["bar"])
- }
-}
-
-func TestMapMerge(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vother": map[interface{}]interface{}{
- "foo": "foo",
- "bar": "bar",
- },
- }
-
- var result Map
- result.Vother = map[string]string{"hello": "world"}
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an error: %s", err)
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- expected := map[string]string{
- "foo": "foo",
- "bar": "bar",
- "hello": "world",
- }
- if !reflect.DeepEqual(result.Vother, expected) {
- t.Errorf("bad: %#v", result.Vother)
- }
-}
-
-func TestMapOfStruct(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "value": map[string]interface{}{
- "foo": map[string]string{"vstring": "one"},
- "bar": map[string]string{"vstring": "two"},
- },
- }
-
- var result MapOfStruct
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err)
- }
-
- if result.Value == nil {
- t.Fatal("value should not be nil")
- }
-
- if len(result.Value) != 2 {
- t.Error("value should have two items")
- }
-
- if result.Value["foo"].Vstring != "one" {
- t.Errorf("foo value should be 'one', got: %s", result.Value["foo"].Vstring)
- }
-
- if result.Value["bar"].Vstring != "two" {
- t.Errorf("bar value should be 'two', got: %s", result.Value["bar"].Vstring)
- }
-}
-
-func TestNestedType(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "vbool": true,
- },
- }
-
- var result Nested
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
- }
-
- if result.Vbar.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
- }
-
- if result.Vbar.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
- }
-
- if result.Vbar.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
- }
-}
-
-func TestNestedTypePointer(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": &map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "vbool": true,
- },
- }
-
- var result NestedPointer
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
- }
-
- if result.Vbar.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
- }
-
- if result.Vbar.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
- }
-
- if result.Vbar.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
- }
-}
-
-// Test for issue #46.
-func TestNestedTypeInterface(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": &map[string]interface{}{
- "vstring": "foo",
- "vint": 42,
- "vbool": true,
-
- "vdata": map[string]interface{}{
- "vstring": "bar",
- },
- },
- }
-
- var result NestedPointer
- result.Vbar = new(Basic)
- result.Vbar.Vdata = new(Basic)
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got an err: %s", err.Error())
- }
-
- if result.Vfoo != "foo" {
- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
- }
-
- if result.Vbar.Vstring != "foo" {
- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
- }
-
- if result.Vbar.Vint != 42 {
- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
- }
-
- if result.Vbar.Vbool != true {
- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
- }
-
- if result.Vbar.Vextra != "" {
- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
- }
-
- if result.Vbar.Vdata.(*Basic).Vstring != "bar" {
- t.Errorf("vstring value should be 'bar': %#v", result.Vbar.Vdata.(*Basic).Vstring)
- }
-}
-
-func TestSlice(t *testing.T) {
- t.Parallel()
-
- inputStringSlice := map[string]interface{}{
- "vfoo": "foo",
- "vbar": []string{"foo", "bar", "baz"},
- }
-
- inputStringSlicePointer := map[string]interface{}{
- "vfoo": "foo",
- "vbar": &[]string{"foo", "bar", "baz"},
- }
-
- outputStringSlice := &Slice{
- "foo",
- []string{"foo", "bar", "baz"},
- }
-
- testSliceInput(t, inputStringSlice, outputStringSlice)
- testSliceInput(t, inputStringSlicePointer, outputStringSlice)
-}
-
-func TestInvalidSlice(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": 42,
- }
-
- result := Slice{}
- err := Decode(input, &result)
- if err == nil {
- t.Errorf("expected failure")
- }
-}
-
-func TestSliceOfStruct(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "value": []map[string]interface{}{
- {"vstring": "one"},
- {"vstring": "two"},
- },
- }
-
- var result SliceOfStruct
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got unexpected error: %s", err)
- }
-
- if len(result.Value) != 2 {
- t.Fatalf("expected two values, got %d", len(result.Value))
- }
-
- if result.Value[0].Vstring != "one" {
- t.Errorf("first value should be 'one', got: %s", result.Value[0].Vstring)
- }
-
- if result.Value[1].Vstring != "two" {
- t.Errorf("second value should be 'two', got: %s", result.Value[1].Vstring)
- }
-}
-
-func TestSliceToMap(t *testing.T) {
- t.Parallel()
-
- input := []map[string]interface{}{
- {
- "foo": "bar",
- },
- {
- "bar": "baz",
- },
- }
-
- var result map[string]interface{}
- err := WeakDecode(input, &result)
- if err != nil {
- t.Fatalf("got an error: %s", err)
- }
-
- expected := map[string]interface{}{
- "foo": "bar",
- "bar": "baz",
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("bad: %#v", result)
- }
-}
-
-func TestArray(t *testing.T) {
- t.Parallel()
-
- inputStringArray := map[string]interface{}{
- "vfoo": "foo",
- "vbar": [2]string{"foo", "bar"},
- }
-
- inputStringArrayPointer := map[string]interface{}{
- "vfoo": "foo",
- "vbar": &[2]string{"foo", "bar"},
- }
-
- outputStringArray := &Array{
- "foo",
- [2]string{"foo", "bar"},
- }
-
- testArrayInput(t, inputStringArray, outputStringArray)
- testArrayInput(t, inputStringArrayPointer, outputStringArray)
-}
-
-func TestInvalidArray(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": 42,
- }
-
- result := Array{}
- err := Decode(input, &result)
- if err == nil {
- t.Errorf("expected failure")
- }
-}
-
-func TestArrayOfStruct(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "value": []map[string]interface{}{
- {"vstring": "one"},
- {"vstring": "two"},
- },
- }
-
- var result ArrayOfStruct
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got unexpected error: %s", err)
- }
-
- if len(result.Value) != 2 {
- t.Fatalf("expected two values, got %d", len(result.Value))
- }
-
- if result.Value[0].Vstring != "one" {
- t.Errorf("first value should be 'one', got: %s", result.Value[0].Vstring)
- }
-
- if result.Value[1].Vstring != "two" {
- t.Errorf("second value should be 'two', got: %s", result.Value[1].Vstring)
- }
-}
-
-func TestArrayToMap(t *testing.T) {
- t.Parallel()
-
- input := []map[string]interface{}{
- {
- "foo": "bar",
- },
- {
- "bar": "baz",
- },
- }
-
- var result map[string]interface{}
- err := WeakDecode(input, &result)
- if err != nil {
- t.Fatalf("got an error: %s", err)
- }
-
- expected := map[string]interface{}{
- "foo": "bar",
- "bar": "baz",
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("bad: %#v", result)
- }
-}
-
-func TestMapOutputForStructuredInputs(t *testing.T) {
- t.Parallel()
-
- tests := []struct {
- name string
- in interface{}
- target interface{}
- out interface{}
- wantErr bool
- }{
- {
- "basic struct input",
- &Basic{
- Vstring: "vstring",
- Vint: 2,
- Vuint: 3,
- Vbool: true,
- Vfloat: 4.56,
- Vextra: "vextra",
- vsilent: true,
- Vdata: []byte("data"),
- },
- &map[string]interface{}{},
- &map[string]interface{}{
- "Vstring": "vstring",
- "Vint": 2,
- "Vuint": uint(3),
- "Vbool": true,
- "Vfloat": 4.56,
- "Vextra": "vextra",
- "Vdata": []byte("data"),
- "VjsonInt": 0,
- "VjsonFloat": 0.0,
- "VjsonNumber": json.Number(""),
- },
- false,
- },
- {
- "embedded struct input",
- &Embedded{
- Vunique: "vunique",
- Basic: Basic{
- Vstring: "vstring",
- Vint: 2,
- Vuint: 3,
- Vbool: true,
- Vfloat: 4.56,
- Vextra: "vextra",
- vsilent: true,
- Vdata: []byte("data"),
- },
- },
- &map[string]interface{}{},
- &map[string]interface{}{
- "Vunique": "vunique",
- "Basic": map[string]interface{}{
- "Vstring": "vstring",
- "Vint": 2,
- "Vuint": uint(3),
- "Vbool": true,
- "Vfloat": 4.56,
- "Vextra": "vextra",
- "Vdata": []byte("data"),
- "VjsonInt": 0,
- "VjsonFloat": 0.0,
- "VjsonNumber": json.Number(""),
- },
- },
- false,
- },
- {
- "slice input - should error",
- []string{"foo", "bar"},
- &map[string]interface{}{},
- &map[string]interface{}{},
- true,
- },
- {
- "struct with slice property",
- &Slice{
- Vfoo: "vfoo",
- Vbar: []string{"foo", "bar"},
- },
- &map[string]interface{}{},
- &map[string]interface{}{
- "Vfoo": "vfoo",
- "Vbar": []string{"foo", "bar"},
- },
- false,
- },
- {
- "struct with slice of struct property",
- &SliceOfStruct{
- Value: []Basic{
- Basic{
- Vstring: "vstring",
- Vint: 2,
- Vuint: 3,
- Vbool: true,
- Vfloat: 4.56,
- Vextra: "vextra",
- vsilent: true,
- Vdata: []byte("data"),
- },
- },
- },
- &map[string]interface{}{},
- &map[string]interface{}{
- "Value": []Basic{
- Basic{
- Vstring: "vstring",
- Vint: 2,
- Vuint: 3,
- Vbool: true,
- Vfloat: 4.56,
- Vextra: "vextra",
- vsilent: true,
- Vdata: []byte("data"),
- },
- },
- },
- false,
- },
- {
- "struct with map property",
- &Map{
- Vfoo: "vfoo",
- Vother: map[string]string{"vother": "vother"},
- },
- &map[string]interface{}{},
- &map[string]interface{}{
- "Vfoo": "vfoo",
- "Vother": map[string]string{
- "vother": "vother",
- }},
- false,
- },
- {
- "tagged struct",
- &Tagged{
- Extra: "extra",
- Value: "value",
- },
- &map[string]string{},
- &map[string]string{
- "bar": "extra",
- "foo": "value",
- },
- false,
- },
- {
- "omit tag struct",
- &struct {
- Value string `mapstructure:"value"`
- Omit string `mapstructure:"-"`
- }{
- Value: "value",
- Omit: "omit",
- },
- &map[string]string{},
- &map[string]string{
- "value": "value",
- },
- false,
- },
- {
- "decode to wrong map type",
- &struct {
- Value string
- }{
- Value: "string",
- },
- &map[string]int{},
- &map[string]int{},
- true,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if err := Decode(tt.in, tt.target); (err != nil) != tt.wantErr {
- t.Fatalf("%q: TestMapOutputForStructuredInputs() unexpected error: %s", tt.name, err)
- }
-
- if !reflect.DeepEqual(tt.out, tt.target) {
- t.Fatalf("%q: TestMapOutputForStructuredInputs() expected: %#v, got: %#v", tt.name, tt.out, tt.target)
- }
- })
- }
-}
-
-func TestInvalidType(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": 42,
- }
-
- var result Basic
- err := Decode(input, &result)
- if err == nil {
- t.Fatal("error should exist")
- }
-
- derr, ok := err.(*Error)
- if !ok {
- t.Fatalf("error should be kind of Error, instead: %#v", err)
- }
-
- if derr.Errors[0] != "'Vstring' expected type 'string', got unconvertible type 'int'" {
- t.Errorf("got unexpected error: %s", err)
- }
-
- inputNegIntUint := map[string]interface{}{
- "vuint": -42,
- }
-
- err = Decode(inputNegIntUint, &result)
- if err == nil {
- t.Fatal("error should exist")
- }
-
- derr, ok = err.(*Error)
- if !ok {
- t.Fatalf("error should be kind of Error, instead: %#v", err)
- }
-
- if derr.Errors[0] != "cannot parse 'Vuint', -42 overflows uint" {
- t.Errorf("got unexpected error: %s", err)
- }
-
- inputNegFloatUint := map[string]interface{}{
- "vuint": -42.0,
- }
-
- err = Decode(inputNegFloatUint, &result)
- if err == nil {
- t.Fatal("error should exist")
- }
-
- derr, ok = err.(*Error)
- if !ok {
- t.Fatalf("error should be kind of Error, instead: %#v", err)
- }
-
- if derr.Errors[0] != "cannot parse 'Vuint', -42.000000 overflows uint" {
- t.Errorf("got unexpected error: %s", err)
- }
-}
-
-func TestDecodeMetadata(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": map[string]interface{}{
- "vstring": "foo",
- "Vuint": 42,
- "foo": "bar",
- },
- "bar": "nil",
- }
-
- var md Metadata
- var result Nested
-
- err := DecodeMetadata(input, &result, &md)
- if err != nil {
- t.Fatalf("err: %s", err.Error())
- }
-
- expectedKeys := []string{"Vbar", "Vbar.Vstring", "Vbar.Vuint", "Vfoo"}
- sort.Strings(md.Keys)
- if !reflect.DeepEqual(md.Keys, expectedKeys) {
- t.Fatalf("bad keys: %#v", md.Keys)
- }
-
- expectedUnused := []string{"Vbar.foo", "bar"}
- if !reflect.DeepEqual(md.Unused, expectedUnused) {
- t.Fatalf("bad unused: %#v", md.Unused)
- }
-}
-
-func TestMetadata(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vfoo": "foo",
- "vbar": map[string]interface{}{
- "vstring": "foo",
- "Vuint": 42,
- "foo": "bar",
- },
- "bar": "nil",
- }
-
- var md Metadata
- var result Nested
- config := &DecoderConfig{
- Metadata: &md,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("err: %s", err.Error())
- }
-
- expectedKeys := []string{"Vbar", "Vbar.Vstring", "Vbar.Vuint", "Vfoo"}
- sort.Strings(md.Keys)
- if !reflect.DeepEqual(md.Keys, expectedKeys) {
- t.Fatalf("bad keys: %#v", md.Keys)
- }
-
- expectedUnused := []string{"Vbar.foo", "bar"}
- if !reflect.DeepEqual(md.Unused, expectedUnused) {
- t.Fatalf("bad unused: %#v", md.Unused)
- }
-}
-
-func TestMetadata_Embedded(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "vstring": "foo",
- "vunique": "bar",
- }
-
- var md Metadata
- var result EmbeddedSquash
- config := &DecoderConfig{
- Metadata: &md,
- Result: &result,
- }
-
- decoder, err := NewDecoder(config)
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- err = decoder.Decode(input)
- if err != nil {
- t.Fatalf("err: %s", err.Error())
- }
-
- expectedKeys := []string{"Vstring", "Vunique"}
-
- sort.Strings(md.Keys)
- if !reflect.DeepEqual(md.Keys, expectedKeys) {
- t.Fatalf("bad keys: %#v", md.Keys)
- }
-
- expectedUnused := []string{}
- if !reflect.DeepEqual(md.Unused, expectedUnused) {
- t.Fatalf("bad unused: %#v", md.Unused)
- }
-}
-
-func TestNonPtrValue(t *testing.T) {
- t.Parallel()
-
- err := Decode(map[string]interface{}{}, Basic{})
- if err == nil {
- t.Fatal("error should exist")
- }
-
- if err.Error() != "result must be a pointer" {
- t.Errorf("got unexpected error: %s", err)
- }
-}
-
-func TestTagged(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "foo": "bar",
- "bar": "value",
- }
-
- var result Tagged
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("unexpected error: %s", err)
- }
-
- if result.Value != "bar" {
- t.Errorf("value should be 'bar', got: %#v", result.Value)
- }
-
- if result.Extra != "value" {
- t.Errorf("extra should be 'value', got: %#v", result.Extra)
- }
-}
-
-func TestWeakDecode(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "foo": "4",
- "bar": "value",
- }
-
- var result struct {
- Foo int
- Bar string
- }
-
- if err := WeakDecode(input, &result); err != nil {
- t.Fatalf("err: %s", err)
- }
- if result.Foo != 4 {
- t.Fatalf("bad: %#v", result)
- }
- if result.Bar != "value" {
- t.Fatalf("bad: %#v", result)
- }
-}
-
-func TestWeakDecodeMetadata(t *testing.T) {
- t.Parallel()
-
- input := map[string]interface{}{
- "foo": "4",
- "bar": "value",
- "unused": "value",
- }
-
- var md Metadata
- var result struct {
- Foo int
- Bar string
- }
-
- if err := WeakDecodeMetadata(input, &result, &md); err != nil {
- t.Fatalf("err: %s", err)
- }
- if result.Foo != 4 {
- t.Fatalf("bad: %#v", result)
- }
- if result.Bar != "value" {
- t.Fatalf("bad: %#v", result)
- }
-
- expectedKeys := []string{"Bar", "Foo"}
- sort.Strings(md.Keys)
- if !reflect.DeepEqual(md.Keys, expectedKeys) {
- t.Fatalf("bad keys: %#v", md.Keys)
- }
-
- expectedUnused := []string{"unused"}
- if !reflect.DeepEqual(md.Unused, expectedUnused) {
- t.Fatalf("bad unused: %#v", md.Unused)
- }
-}
-
-func testSliceInput(t *testing.T, input map[string]interface{}, expected *Slice) {
- var result Slice
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got error: %s", err)
- }
-
- if result.Vfoo != expected.Vfoo {
- t.Errorf("Vfoo expected '%s', got '%s'", expected.Vfoo, result.Vfoo)
- }
-
- if result.Vbar == nil {
- t.Fatalf("Vbar a slice, got '%#v'", result.Vbar)
- }
-
- if len(result.Vbar) != len(expected.Vbar) {
- t.Errorf("Vbar length should be %d, got %d", len(expected.Vbar), len(result.Vbar))
- }
-
- for i, v := range result.Vbar {
- if v != expected.Vbar[i] {
- t.Errorf(
- "Vbar[%d] should be '%#v', got '%#v'",
- i, expected.Vbar[i], v)
- }
- }
-}
-
-func testArrayInput(t *testing.T, input map[string]interface{}, expected *Array) {
- var result Array
- err := Decode(input, &result)
- if err != nil {
- t.Fatalf("got error: %s", err)
- }
-
- if result.Vfoo != expected.Vfoo {
- t.Errorf("Vfoo expected '%s', got '%s'", expected.Vfoo, result.Vfoo)
- }
-
- if result.Vbar == [2]string{} {
- t.Fatalf("Vbar a slice, got '%#v'", result.Vbar)
- }
-
- if len(result.Vbar) != len(expected.Vbar) {
- t.Errorf("Vbar length should be %d, got %d", len(expected.Vbar), len(result.Vbar))
- }
-
- for i, v := range result.Vbar {
- if v != expected.Vbar[i] {
- t.Errorf(
- "Vbar[%d] should be '%#v', got '%#v'",
- i, expected.Vbar[i], v)
- }
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/.gitignore b/vendor/github.com/nicksnyder/go-i18n/.gitignore
deleted file mode 100644
index 20e1aa8ff..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-*.a
-_*
-output/
-.DS_Store
-*.test
-*.swp
diff --git a/vendor/github.com/nicksnyder/go-i18n/.travis.yml b/vendor/github.com/nicksnyder/go-i18n/.travis.yml
deleted file mode 100644
index 8937ab6bf..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: go
-sudo: false
-go:
- - 1.2
- - 1.3
- - 1.4
- - 1.5
- - 1.6
- - 1.7
- - 1.8
- - 1.9
diff --git a/vendor/github.com/nicksnyder/go-i18n/CHANGELOG b/vendor/github.com/nicksnyder/go-i18n/CHANGELOG
deleted file mode 100644
index c7949b143..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/CHANGELOG
+++ /dev/null
@@ -1,5 +0,0 @@
-Feb 24, 2015
-- Add Korean
-
-Feb 18, 2015
-- Added ParseTranslationFileBytes so translation files may be loaded from an arbitrary serialization format, such as go-bindata.
diff --git a/vendor/github.com/nicksnyder/go-i18n/README.md b/vendor/github.com/nicksnyder/go-i18n/README.md
deleted file mode 100644
index 7136dc823..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/README.md
+++ /dev/null
@@ -1,186 +0,0 @@
-go-i18n [![Build Status](https://travis-ci.org/nicksnyder/go-i18n.svg?branch=master)](http://travis-ci.org/nicksnyder/go-i18n) [![Sourcegraph](https://sourcegraph.com/github.com/nicksnyder/go-i18n/-/badge.svg)](https://sourcegraph.com/github.com/nicksnyder/go-i18n?badge)
-=======
-
-go-i18n is a Go [package](#i18n-package) and a [command](#goi18n-command) that helps you translate Go programs into multiple languages.
-* Supports [pluralized strings](http://cldr.unicode.org/index/cldr-spec/plural-rules) for all 200+ languages in the [Unicode Common Locale Data Repository (CLDR)](http://www.unicode.org/cldr/charts/28/supplemental/language_plural_rules.html).
- * Code and tests are [automatically generated](https://github.com/nicksnyder/go-i18n/tree/master/i18n/language/codegen) from [CLDR data](http://cldr.unicode.org/index/downloads)
-* Supports strings with named variables using [text/template](http://golang.org/pkg/text/template/) syntax.
-* Translation files are simple JSON, TOML or YAML.
-* [Documented](http://godoc.org/github.com/nicksnyder/go-i18n) and [tested](https://travis-ci.org/nicksnyder/go-i18n)!
-
-Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/i18n)
-------------
-
-The i18n package provides runtime APIs for fetching translated strings.
-
-Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/goi18n)
---------------
-
-The goi18n command provides functionality for managing the translation process.
-
-Installation
-------------
-
-Make sure you have [setup GOPATH](http://golang.org/doc/code.html#GOPATH).
-
- go get -u github.com/nicksnyder/go-i18n/goi18n
- goi18n -help
-
-Workflow
---------
-
-A typical workflow looks like this:
-
-1. Add a new string to your source code.
-
- ```go
- T("settings_title")
- ```
-
-2. Add the string to en-US.all.json
-
- ```json
- [
- {
- "id": "settings_title",
- "translation": "Settings"
- }
- ]
- ```
-
-3. Run goi18n
-
- ```
- goi18n path/to/*.all.json
- ```
-
-4. Send `path/to/*.untranslated.json` to get translated.
-5. Run goi18n again to merge the translations
-
- ```sh
- goi18n path/to/*.all.json path/to/*.untranslated.json
- ```
-
-Translation files
------------------
-
-A translation file stores translated and untranslated strings.
-
-Here is an example of the default file format that go-i18n supports:
-
-```json
-[
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
- }
-]
-```
-
-To use a different file format, write a parser for the format and add the parsed translations using [AddTranslation](https://godoc.org/github.com/nicksnyder/go-i18n/i18n#AddTranslation).
-
-Note that TOML only supports the flat format, which is described below.
-
-More examples of translation files: [JSON](https://github.com/nicksnyder/go-i18n/tree/master/goi18n/testdata/input), [TOML](https://github.com/nicksnyder/go-i18n/blob/master/goi18n/testdata/input/flat/ar-ar.one.toml), [YAML](https://github.com/nicksnyder/go-i18n/blob/master/goi18n/testdata/input/yaml/en-us.one.yaml).
-
-Flat Format
--------------
-
-You can also write shorter translation files with flat format.
-E.g the example above can be written in this way:
-
-```json
-{
- "d_days": {
- "one": "{{.Count}} day.",
- "other": "{{.Count}} days."
- },
-
- "my_height_in_meters": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- },
-
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
-
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
-
- "person_unread_email_count_timeframe": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
-
- "program_greeting": {
- "other": "Hello world"
- },
-
- "your_unread_email_count": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
-}
-```
-
-The logic of flat format is, what it is structure of structures
-and name of substructures (ids) should be always a string.
-If there is only one key in substructure and it is "other", then it's non-plural
-translation, else plural.
-
-More examples of flat format translation files can be found in [goi18n/testdata/input/flat](https://github.com/nicksnyder/go-i18n/tree/master/goi18n/testdata/input/flat).
-
-Contributions
--------------
-
-If you would like to submit a pull request, please
-
-1. Write tests
-2. Format code with [goimports](https://github.com/bradfitz/goimports).
-3. Read the [common code review comments](https://github.com/golang/go/wiki/CodeReviewComments).
-
-License
--------
-go-i18n is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command.go
deleted file mode 100644
index d877add32..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command.go
+++ /dev/null
@@ -1,229 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "os"
- "path/filepath"
- "reflect"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "text/template"
- "unicode"
-
- "github.com/nicksnyder/go-i18n/i18n/bundle"
- "github.com/nicksnyder/go-i18n/i18n/language"
- "github.com/nicksnyder/go-i18n/i18n/translation"
-)
-
-type constantsCommand struct {
- translationFiles []string
- packageName string
- outdir string
-}
-
-type templateConstants struct {
- ID string
- Name string
- Comments []string
-}
-
-type templateHeader struct {
- PackageName string
- Constants []templateConstants
-}
-
-var constTemplate = template.Must(template.New("").Parse(`// DON'T CHANGE THIS FILE MANUALLY
-// This file was generated using the command:
-// $ goi18n constants
-
-package {{.PackageName}}
-{{range .Constants}}
-// {{.Name}} is the identifier for the following localizable string template(s):{{range .Comments}}
-// {{.}}{{end}}
-const {{.Name}} = "{{.ID}}"
-{{end}}`))
-
-func (cc *constantsCommand) execute() error {
- if len(cc.translationFiles) != 1 {
- return fmt.Errorf("need one translation file")
- }
-
- bundle := bundle.New()
-
- if err := bundle.LoadTranslationFile(cc.translationFiles[0]); err != nil {
- return fmt.Errorf("failed to load translation file %s because %s\n", cc.translationFiles[0], err)
- }
-
- translations := bundle.Translations()
- lang := translations[bundle.LanguageTags()[0]]
-
- // create an array of id to organize
- keys := make([]string, len(lang))
- i := 0
-
- for id := range lang {
- keys[i] = id
- i++
- }
- sort.Strings(keys)
-
- tmpl := &templateHeader{
- PackageName: cc.packageName,
- Constants: make([]templateConstants, len(keys)),
- }
-
- for i, id := range keys {
- tmpl.Constants[i].ID = id
- tmpl.Constants[i].Name = toCamelCase(id)
- tmpl.Constants[i].Comments = toComments(lang[id])
- }
-
- filename := filepath.Join(cc.outdir, cc.packageName+".go")
- f, err := os.Create(filename)
- if err != nil {
- return fmt.Errorf("failed to create file %s because %s", filename, err)
- }
-
- defer f.Close()
-
- if err = constTemplate.Execute(f, tmpl); err != nil {
- return fmt.Errorf("failed to write file %s because %s", filename, err)
- }
-
- return nil
-}
-
-func (cc *constantsCommand) parse(arguments []string) {
- flags := flag.NewFlagSet("constants", flag.ExitOnError)
- flags.Usage = usageConstants
-
- packageName := flags.String("package", "R", "")
- outdir := flags.String("outdir", ".", "")
-
- flags.Parse(arguments)
-
- cc.translationFiles = flags.Args()
- cc.packageName = *packageName
- cc.outdir = *outdir
-}
-
-func (cc *constantsCommand) SetArgs(args []string) {
- cc.translationFiles = args
-}
-
-func usageConstants() {
- fmt.Printf(`Generate constant file from translation file.
-
-Usage:
-
- goi18n constants [options] [file]
-
-Translation files:
-
- A translation file contains the strings and translations for a single language.
-
- Translation file names must have a suffix of a supported format (e.g. .json) and
- contain a valid language tag as defined by RFC 5646 (e.g. en-us, fr, zh-hant, etc.).
-
-Options:
-
- -package name
- goi18n generates the constant file under the package name.
- Default: R
-
- -outdir directory
- goi18n writes the constant file to this directory.
- Default: .
-
-`)
-}
-
-// commonInitialisms is a set of common initialisms.
-// Only add entries that are highly unlikely to be non-initialisms.
-// For instance, "ID" is fine (Freudian code is rare), but "AND" is not.
-// https://github.com/golang/lint/blob/master/lint.go
-var commonInitialisms = map[string]bool{
- "API": true,
- "ASCII": true,
- "CPU": true,
- "CSS": true,
- "DNS": true,
- "EOF": true,
- "GUID": true,
- "HTML": true,
- "HTTP": true,
- "HTTPS": true,
- "ID": true,
- "IP": true,
- "JSON": true,
- "LHS": true,
- "QPS": true,
- "RAM": true,
- "RHS": true,
- "RPC": true,
- "SLA": true,
- "SMTP": true,
- "SQL": true,
- "SSH": true,
- "TCP": true,
- "TLS": true,
- "TTL": true,
- "UDP": true,
- "UI": true,
- "UID": true,
- "UUID": true,
- "URI": true,
- "URL": true,
- "UTF8": true,
- "VM": true,
- "XML": true,
- "XSRF": true,
- "XSS": true,
-}
-
-func toCamelCase(id string) string {
- var result string
-
- r := regexp.MustCompile(`[\-\.\_\s]`)
- words := r.Split(id, -1)
-
- for _, w := range words {
- upper := strings.ToUpper(w)
- if commonInitialisms[upper] {
- result += upper
- continue
- }
-
- if len(w) > 0 {
- u := []rune(w)
- u[0] = unicode.ToUpper(u[0])
- result += string(u)
- }
- }
- return result
-}
-
-func toComments(trans translation.Translation) []string {
- var result []string
- data := trans.MarshalInterface().(map[string]interface{})
-
- t := data["translation"]
-
- switch v := reflect.ValueOf(t); v.Kind() {
- case reflect.Map:
- for _, k := range []language.Plural{"zero", "one", "two", "few", "many", "other"} {
- vt := v.MapIndex(reflect.ValueOf(k))
- if !vt.IsValid() {
- continue
- }
- result = append(result, string(k)+": "+strconv.Quote(fmt.Sprint(vt.Interface())))
- }
- default:
- result = append(result, strconv.Quote(fmt.Sprint(t)))
- }
-
- return result
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command_test.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command_test.go
deleted file mode 100644
index 43dea3f38..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/constants_command_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package main
-
-import "testing"
-
-func TestConstantsExecute(t *testing.T) {
- resetDir(t, "testdata/output")
-
- cc := &constantsCommand{
- translationFiles: []string{"testdata/input/en-us.constants.json"},
- packageName: "R",
- outdir: "testdata/output",
- }
-
- if err := cc.execute(); err != nil {
- t.Fatal(err)
- }
-
- expectEqualFiles(t, "testdata/output/R.go", "testdata/expected/R.go")
-}
-
-func TestToCamelCase(t *testing.T) {
- expectEqual := func(test, expected string) {
- result := toCamelCase(test)
- if result != expected {
- t.Fatalf("failed toCamelCase the test %s was expected %s but the result was %s", test, expected, result)
- }
- }
-
- expectEqual("", "")
- expectEqual("a", "A")
- expectEqual("_", "")
- expectEqual("__code__", "Code")
- expectEqual("test", "Test")
- expectEqual("test_one", "TestOne")
- expectEqual("test.two", "TestTwo")
- expectEqual("test_alpha_beta", "TestAlphaBeta")
- expectEqual("word word", "WordWord")
- expectEqual("test_id", "TestID")
- expectEqual("tcp_name", "TCPName")
- expectEqual("ã“ã‚“ã«ã¡ã¯", "ã“ã‚“ã«ã¡ã¯")
- expectEqual("test_a", "TestA")
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/doc.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/doc.go
deleted file mode 100644
index 97c7a7fb6..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/doc.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// The goi18n command formats and merges translation files.
-//
-// go get -u github.com/nicksnyder/go-i18n/goi18n
-// goi18n -help
-//
-// Help documentation:
-//
-// goi18n manages translation files.
-//
-// Usage:
-//
-// goi18n merge Merge translation files
-// goi18n constants Generate constant file from translation file
-//
-// For more details execute:
-//
-// goi18n [command] -help
-//
-// Merge translation files.
-//
-// Usage:
-//
-// goi18n merge [options] [files...]
-//
-// Translation files:
-//
-// A translation file contains the strings and translations for a single language.
-//
-// Translation file names must have a suffix of a supported format (e.g. .json) and
-// contain a valid language tag as defined by RFC 5646 (e.g. en-us, fr, zh-hant, etc.).
-//
-// For each language represented by at least one input translation file, goi18n will produce 2 output files:
-//
-// xx-yy.all.format
-// This file contains all strings for the language (translated and untranslated).
-// Use this file when loading strings at runtime.
-//
-// xx-yy.untranslated.format
-// This file contains the strings that have not been translated for this language.
-// The translations for the strings in this file will be extracted from the source language.
-// After they are translated, merge them back into xx-yy.all.format using goi18n.
-//
-// Merging:
-//
-// goi18n will merge multiple translation files for the same language.
-// Duplicate translations will be merged into the existing translation.
-// Non-empty fields in the duplicate translation will overwrite those fields in the existing translation.
-// Empty fields in the duplicate translation are ignored.
-//
-// Adding a new language:
-//
-// To produce translation files for a new language, create an empty translation file with the
-// appropriate name and pass it in to goi18n.
-//
-// Options:
-//
-// -sourceLanguage tag
-// goi18n uses the strings from this language to seed the translations for other languages.
-// Default: en-us
-//
-// -outdir directory
-// goi18n writes the output translation files to this directory.
-// Default: .
-//
-// -format format
-// goi18n encodes the output translation files in this format.
-// Supported formats: json, yaml
-// Default: json
-//
-// Generate constant file from translation file.
-//
-// Usage:
-//
-// goi18n constants [options] [file]
-//
-// Translation files:
-//
-// A translation file contains the strings and translations for a single language.
-//
-// Translation file names must have a suffix of a supported format (e.g. .json) and
-// contain a valid language tag as defined by RFC 5646 (e.g. en-us, fr, zh-hant, etc.).
-//
-// Options:
-//
-// -package name
-// goi18n generates the constant file under the package name.
-// Default: R
-//
-// -outdir directory
-// goi18n writes the constant file to this directory.
-// Default: .
-//
-package main
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/gendoc.sh b/vendor/github.com/nicksnyder/go-i18n/goi18n/gendoc.sh
deleted file mode 100644
index f30df34e6..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/gendoc.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-go install
-echo "// The goi18n command formats and merges translation files." > doc.go
-echo "//" >> doc.go
-echo "// go get -u github.com/nicksnyder/go-i18n/goi18n" >> doc.go
-echo "// goi18n -help" >> doc.go
-echo "//" >> doc.go
-echo "// Help documentation:" >> doc.go
-echo "//" >> doc.go
-goi18n | sed -e 's/^/\/\/ /' >> doc.go
-goi18n merge -help | sed -e 's/^/\/\/ /' >> doc.go
-goi18n constants -help | sed -e 's/^/\/\/ /' >> doc.go
-echo "package main" >> doc.go
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/goi18n.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/goi18n.go
deleted file mode 100644
index 3bd763f47..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/goi18n.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "os"
-)
-
-type command interface {
- execute() error
- parse(arguments []string)
-}
-
-func main() {
- flag.Usage = usage
-
- if len(os.Args) == 1 {
- usage()
- }
-
- var cmd command
-
- switch os.Args[1] {
- case "merge":
- cmd = &mergeCommand{}
- cmd.parse(os.Args[2:])
- case "constants":
- cmd = &constantsCommand{}
- cmd.parse(os.Args[2:])
- default:
- cmd = &mergeCommand{}
- cmd.parse(os.Args[1:])
- }
-
- if err := cmd.execute(); err != nil {
- fmt.Println(err.Error())
- os.Exit(1)
- }
-}
-
-func usage() {
- fmt.Printf(`goi18n manages translation files.
-
-Usage:
-
- goi18n merge Merge translation files
- goi18n constants Generate constant file from translation file
-
-For more details execute:
-
- goi18n [command] -help
-
-`)
- os.Exit(1)
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command.go
deleted file mode 100644
index 1b9d04fd3..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command.go
+++ /dev/null
@@ -1,239 +0,0 @@
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "reflect"
- "sort"
-
- "gopkg.in/yaml.v2"
-
- "github.com/nicksnyder/go-i18n/i18n/bundle"
- "github.com/nicksnyder/go-i18n/i18n/language"
- "github.com/nicksnyder/go-i18n/i18n/translation"
- toml "github.com/pelletier/go-toml"
-)
-
-type mergeCommand struct {
- translationFiles []string
- sourceLanguage string
- outdir string
- format string
- flat bool
-}
-
-func (mc *mergeCommand) execute() error {
- if len(mc.translationFiles) < 1 {
- return fmt.Errorf("need at least one translation file to parse")
- }
-
- if lang := language.Parse(mc.sourceLanguage); lang == nil {
- return fmt.Errorf("invalid source locale: %s", mc.sourceLanguage)
- }
-
- bundle := bundle.New()
- for _, tf := range mc.translationFiles {
- if err := bundle.LoadTranslationFile(tf); err != nil {
- return fmt.Errorf("failed to load translation file %s: %s\n", tf, err)
- }
- }
-
- translations := bundle.Translations()
- sourceLanguageTag := language.NormalizeTag(mc.sourceLanguage)
- sourceTranslations := translations[sourceLanguageTag]
- if sourceTranslations == nil {
- return fmt.Errorf("no translations found for source locale %s", sourceLanguageTag)
- }
- for translationID, src := range sourceTranslations {
- for _, localeTranslations := range translations {
- if dst := localeTranslations[translationID]; dst == nil || reflect.TypeOf(src) != reflect.TypeOf(dst) {
- localeTranslations[translationID] = src.UntranslatedCopy()
- }
- }
- }
-
- for localeID, localeTranslations := range translations {
- lang := language.MustParse(localeID)[0]
- all := filter(localeTranslations, func(t translation.Translation) translation.Translation {
- return t.Normalize(lang)
- })
- if err := mc.writeFile("all", all, localeID); err != nil {
- return err
- }
-
- untranslated := filter(localeTranslations, func(t translation.Translation) translation.Translation {
- if t.Incomplete(lang) {
- return t.Normalize(lang).Backfill(sourceTranslations[t.ID()])
- }
- return nil
- })
- if err := mc.writeFile("untranslated", untranslated, localeID); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (mc *mergeCommand) parse(arguments []string) {
- flags := flag.NewFlagSet("merge", flag.ExitOnError)
- flags.Usage = usageMerge
-
- sourceLanguage := flags.String("sourceLanguage", "en-us", "")
- outdir := flags.String("outdir", ".", "")
- format := flags.String("format", "json", "")
- flat := flags.Bool("flat", true, "")
-
- flags.Parse(arguments)
-
- mc.translationFiles = flags.Args()
- mc.sourceLanguage = *sourceLanguage
- mc.outdir = *outdir
- mc.format = *format
- if *format == "toml" {
- mc.flat = true
- } else {
- mc.flat = *flat
- }
-}
-
-func (mc *mergeCommand) SetArgs(args []string) {
- mc.translationFiles = args
-}
-
-func (mc *mergeCommand) writeFile(label string, translations []translation.Translation, localeID string) error {
- sort.Sort(translation.SortableByID(translations))
-
- var convert func([]translation.Translation) interface{}
- if mc.flat {
- convert = marshalFlatInterface
- } else {
- convert = marshalInterface
- }
-
- buf, err := mc.marshal(convert(translations))
- if err != nil {
- return fmt.Errorf("failed to marshal %s strings to %s: %s", localeID, mc.format, err)
- }
-
- filename := filepath.Join(mc.outdir, fmt.Sprintf("%s.%s.%s", localeID, label, mc.format))
-
- if err := ioutil.WriteFile(filename, buf, 0666); err != nil {
- return fmt.Errorf("failed to write %s: %s", filename, err)
- }
- return nil
-}
-
-func filter(translations map[string]translation.Translation, f func(translation.Translation) translation.Translation) []translation.Translation {
- filtered := make([]translation.Translation, 0, len(translations))
- for _, translation := range translations {
- if t := f(translation); t != nil {
- filtered = append(filtered, t)
- }
- }
- return filtered
-
-}
-
-func marshalFlatInterface(translations []translation.Translation) interface{} {
- mi := make(map[string]interface{}, len(translations))
- for _, translation := range translations {
- mi[translation.ID()] = translation.MarshalFlatInterface()
- }
- return mi
-}
-
-func marshalInterface(translations []translation.Translation) interface{} {
- mi := make([]interface{}, len(translations))
- for i, translation := range translations {
- mi[i] = translation.MarshalInterface()
- }
- return mi
-}
-
-func (mc mergeCommand) marshal(v interface{}) ([]byte, error) {
- switch mc.format {
- case "json":
- return json.MarshalIndent(v, "", " ")
- case "toml":
- return marshalTOML(v)
- case "yaml":
- return yaml.Marshal(v)
- }
- return nil, fmt.Errorf("unsupported format: %s\n", mc.format)
-}
-
-func marshalTOML(v interface{}) ([]byte, error) {
- m, ok := v.(map[string]interface{})
- if !ok {
- return nil, fmt.Errorf("invalid format for marshaling to TOML")
- }
- tree, err := toml.TreeFromMap(m)
- if err != nil {
- return nil, err
- }
- s, err := tree.ToTomlString()
- return []byte(s), err
-}
-
-func usageMerge() {
- fmt.Printf(`Merge translation files.
-
-Usage:
-
- goi18n merge [options] [files...]
-
-Translation files:
-
- A translation file contains the strings and translations for a single language.
-
- Translation file names must have a suffix of a supported format (e.g. .json) and
- contain a valid language tag as defined by RFC 5646 (e.g. en-us, fr, zh-hant, etc.).
-
- For each language represented by at least one input translation file, goi18n will produce 2 output files:
-
- xx-yy.all.format
- This file contains all strings for the language (translated and untranslated).
- Use this file when loading strings at runtime.
-
- xx-yy.untranslated.format
- This file contains the strings that have not been translated for this language.
- The translations for the strings in this file will be extracted from the source language.
- After they are translated, merge them back into xx-yy.all.format using goi18n.
-
-Merging:
-
- goi18n will merge multiple translation files for the same language.
- Duplicate translations will be merged into the existing translation.
- Non-empty fields in the duplicate translation will overwrite those fields in the existing translation.
- Empty fields in the duplicate translation are ignored.
-
-Adding a new language:
-
- To produce translation files for a new language, create an empty translation file with the
- appropriate name and pass it in to goi18n.
-
-Options:
-
- -sourceLanguage tag
- goi18n uses the strings from this language to seed the translations for other languages.
- Default: en-us
-
- -outdir directory
- goi18n writes the output translation files to this directory.
- Default: .
-
- -format format
- goi18n encodes the output translation files in this format.
- Supported formats: json, toml, yaml
- Default: json
-
- -flat
- goi18n writes the output translation files in flat format.
- Usage of '-format toml' automitically sets this flag.
- Default: true
-
-`)
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_flat_test.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_flat_test.go
deleted file mode 100644
index caa892d29..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_flat_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package main
-
-import "testing"
-
-func TestMergeExecuteFlat(t *testing.T) {
- files := []string{
- "testdata/input/flat/en-us.one.yaml",
- "testdata/input/flat/en-us.two.json",
- "testdata/input/flat/fr-fr.json",
- "testdata/input/flat/ar-ar.one.toml",
- "testdata/input/flat/ar-ar.two.json",
- }
- testFlatMergeExecute(t, files)
-}
-
-func testFlatMergeExecute(t *testing.T, files []string) {
- resetDir(t, "testdata/output/flat")
-
- mc := &mergeCommand{
- translationFiles: files,
- sourceLanguage: "en-us",
- outdir: "testdata/output/flat",
- format: "json",
- flat: true,
- }
- if err := mc.execute(); err != nil {
- t.Fatal(err)
- }
-
- expectEqualFiles(t, "testdata/output/flat/en-us.all.json", "testdata/expected/flat/en-us.all.json")
- expectEqualFiles(t, "testdata/output/flat/ar-ar.all.json", "testdata/expected/flat/ar-ar.all.json")
- expectEqualFiles(t, "testdata/output/flat/fr-fr.all.json", "testdata/expected/flat/fr-fr.all.json")
- expectEqualFiles(t, "testdata/output/flat/en-us.untranslated.json", "testdata/expected/flat/en-us.untranslated.json")
- expectEqualFiles(t, "testdata/output/flat/ar-ar.untranslated.json", "testdata/expected/flat/ar-ar.untranslated.json")
- expectEqualFiles(t, "testdata/output/flat/fr-fr.untranslated.json", "testdata/expected/flat/fr-fr.untranslated.json")
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_test.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_test.go
deleted file mode 100644
index 425a6b62d..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package main
-
-import (
- "bytes"
- "io/ioutil"
- "os"
- "testing"
-)
-
-func TestMergeExecuteJSON(t *testing.T) {
- files := []string{
- "testdata/input/en-us.one.json",
- "testdata/input/en-us.two.json",
- "testdata/input/fr-fr.json",
- "testdata/input/ar-ar.one.json",
- "testdata/input/ar-ar.two.json",
- }
- testMergeExecute(t, files)
-}
-
-func TestMergeExecuteYAML(t *testing.T) {
- files := []string{
- "testdata/input/yaml/en-us.one.yaml",
- "testdata/input/yaml/en-us.two.json",
- "testdata/input/yaml/fr-fr.json",
- "testdata/input/yaml/ar-ar.one.json",
- "testdata/input/yaml/ar-ar.two.json",
- }
- testMergeExecute(t, files)
-}
-
-func testMergeExecute(t *testing.T, files []string) {
- resetDir(t, "testdata/output")
-
- mc := &mergeCommand{
- translationFiles: files,
- sourceLanguage: "en-us",
- outdir: "testdata/output",
- format: "json",
- flat: false,
- }
- if err := mc.execute(); err != nil {
- t.Fatal(err)
- }
-
- expectEqualFiles(t, "testdata/output/en-us.all.json", "testdata/expected/en-us.all.json")
- expectEqualFiles(t, "testdata/output/ar-ar.all.json", "testdata/expected/ar-ar.all.json")
- expectEqualFiles(t, "testdata/output/fr-fr.all.json", "testdata/expected/fr-fr.all.json")
- expectEqualFiles(t, "testdata/output/en-us.untranslated.json", "testdata/expected/en-us.untranslated.json")
- expectEqualFiles(t, "testdata/output/ar-ar.untranslated.json", "testdata/expected/ar-ar.untranslated.json")
- expectEqualFiles(t, "testdata/output/fr-fr.untranslated.json", "testdata/expected/fr-fr.untranslated.json")
-}
-
-func resetDir(t *testing.T, dir string) {
- if err := os.RemoveAll(dir); err != nil {
- t.Fatal(err)
- }
- if err := os.Mkdir(dir, 0777); err != nil {
- t.Fatal(err)
- }
-}
-
-func expectEqualFiles(t *testing.T, expectedName, actualName string) {
- actual, err := ioutil.ReadFile(actualName)
- if err != nil {
- t.Fatal(err)
- }
- expected, err := ioutil.ReadFile(expectedName)
- if err != nil {
- t.Fatal(err)
- }
- if !bytes.Equal(actual, expected) {
- t.Errorf("contents of files did not match: %s, %s", expectedName, actualName)
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.json
deleted file mode 100644
index f67d21cac..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "program_greeting": {
- "other": "Hello world"
- },
-
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
-
- "my_height_in_meters": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- },
-
- "your_unread_email_count": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- },
-
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
-
- "person_unread_email_count_timeframe": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
-
- "d_days": {
- "one": "{{.Count}} day.",
- "other": "{{.Count}} days."
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.toml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.toml
deleted file mode 100644
index 5623a6c2e..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[program_greeting]
-other = "Hello world"
-
-[person_greeting]
-other = "Hello {{.Person}}"
-
-[my_height_in_meters]
-one = "I am {{.Count}} meter tall."
-other = "I am {{.Count}} meters tall."
-
-[your_unread_email_count]
-one = "You have {{.Count}} unread email."
-other = "You have {{.Count}} unread emails."
-
-[person_unread_email_count]
-one = "{{.Person}} has {{.Count}} unread email."
-other = "{{.Person}} has {{.Count}} unread emails."
-
-[person_unread_email_count_timeframe]
-one = "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
-other = "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
-
-[d_days]
-one = "{{.Count}} day"
-other = "{{.Count}} days"
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.yaml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.yaml
deleted file mode 100644
index 664128907..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-# Comment
-# Comment
-program_greeting:
- other: "Hello world"
-
-person_greeting:
- other: "Hello {{.Person}}"
-
-my_height_in_meters:
- one: "I am {{.Count}} meter tall."
- other: "I am {{.Count}} meters tall."
-
-your_unread_email_count:
- one: "You have {{.Count}} unread email."
- other: "You have {{.Count}} unread emails."
-
-person_unread_email_count:
- one: "{{.Person}} has {{.Count}} unread email."
- other: "{{.Person}} has {{.Count}} unread emails."
-
-person_unread_email_count_timeframe:
- one: "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
- other: "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
-
-d_days:
- one: "{{.Count}} day"
- other: "{{.Count}} days"
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.yaml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.yaml
deleted file mode 100644
index a8f5ed9be..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-# Comment
-# Comment
-- id: program_greeting
- translation: "Hello world"
-
-- id: person_greeting
- translation: "Hello {{.Person}}"
-
-- id: my_height_in_meters
- translation:
- one: "I am {{.Count}} meter tall."
- other: "I am {{.Count}} meters tall."
-
-- id: your_unread_email_count
- translation:
- one: "You have {{.Count}} unread email."
- other: "You have {{.Count}} unread emails."
-
-- id: person_unread_email_count
- translation:
- one: "{{.Person}} has {{.Count}} unread email."
- other: "{{.Person}} has {{.Count}} unread emails."
-
-- id: person_unread_email_count_timeframe
- translation:
- one: "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
- other: "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
-
-- id: d_days
- translation:
- one: "{{.Count}} day"
- other: "{{.Count}} days"
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/R.go b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/R.go
deleted file mode 100644
index 9b5334a7e..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/R.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// DON'T CHANGE THIS FILE MANUALLY
-// This file was generated using the command:
-// $ goi18n constants
-
-package R
-
-// DDays is the identifier for the following localizable string template(s):
-// one: "{{.Count}} day"
-// other: "{{.Count}} days"
-const DDays = "d_days"
-
-// MyHeightInMeters is the identifier for the following localizable string template(s):
-// one: "I am {{.Count}} meter tall."
-// other: "I am {{.Count}} meters tall."
-const MyHeightInMeters = "my_height_in_meters"
-
-// PersonGreeting is the identifier for the following localizable string template(s):
-// "Hello {{.Person}}"
-const PersonGreeting = "person_greeting"
-
-// PersonUnreadEmailCount is the identifier for the following localizable string template(s):
-// one: "{{.Person}} has {{.Count}} unread email."
-// other: "{{.Person}} has {{.Count}} unread emails."
-const PersonUnreadEmailCount = "person_unread_email_count"
-
-// PersonUnreadEmailCountTimeframe is the identifier for the following localizable string template(s):
-// one: "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
-// other: "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
-const PersonUnreadEmailCountTimeframe = "person_unread_email_count_timeframe"
-
-// ProgramGreeting is the identifier for the following localizable string template(s):
-// "Hello world"
-const ProgramGreeting = "program_greeting"
-
-// YourUnreadEmailCount is the identifier for the following localizable string template(s):
-// one: "You have {{.Count}} unread email."
-// other: "You have {{.Count}} unread emails."
-const YourUnreadEmailCount = "your_unread_email_count"
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.all.json
deleted file mode 100644
index 26a72ff30..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.all.json
+++ /dev/null
@@ -1,65 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "new arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "arabic one translation of d_days",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": "new arabic translation of person_greeting"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "few": "arabic few translation of person_unread_email_count",
- "many": "arabic many translation of person_unread_email_count",
- "one": "arabic one translation of person_unread_email_count",
- "other": "arabic other translation of person_unread_email_count",
- "two": "arabic two translation of person_unread_email_count",
- "zero": "arabic zero translation of person_unread_email_count"
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.untranslated.json
deleted file mode 100644
index a19fa0bee..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/ar-ar.untranslated.json
+++ /dev/null
@@ -1,50 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "new arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "arabic one translation of d_days",
- "other": "{{.Count}} days",
- "two": "{{.Count}} days",
- "zero": "{{.Count}} days"
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "few": "I am {{.Count}} meters tall.",
- "many": "I am {{.Count}} meters tall.",
- "one": "I am {{.Count}} meters tall.",
- "other": "I am {{.Count}} meters tall.",
- "two": "I am {{.Count}} meters tall.",
- "zero": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "many": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "one": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "two": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "zero": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "You have {{.Count}} unread emails.",
- "many": "You have {{.Count}} unread emails.",
- "one": "You have {{.Count}} unread emails.",
- "other": "You have {{.Count}} unread emails.",
- "two": "You have {{.Count}} unread emails.",
- "zero": "You have {{.Count}} unread emails."
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.all.json
deleted file mode 100644
index 5aedc235a..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.all.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.untranslated.json
deleted file mode 100644
index 0637a088a..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/en-us.untranslated.json
+++ /dev/null
@@ -1 +0,0 @@
-[] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.all.json
deleted file mode 100644
index 1adb99ca9..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.all.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "d_days": {
- "few": "new arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "arabic one translation of d_days",
- "other": "",
- "two": "",
- "zero": ""
- },
- "my_height_in_meters": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- },
- "person_greeting": {
- "other": "new arabic translation of person_greeting"
- },
- "person_unread_email_count": {
- "few": "arabic few translation of person_unread_email_count",
- "many": "arabic many translation of person_unread_email_count",
- "one": "arabic one translation of person_unread_email_count",
- "other": "arabic other translation of person_unread_email_count",
- "two": "arabic two translation of person_unread_email_count",
- "zero": "arabic zero translation of person_unread_email_count"
- },
- "person_unread_email_count_timeframe": {
- "other": ""
- },
- "program_greeting": {
- "other": ""
- },
- "your_unread_email_count": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
-} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.untranslated.json
deleted file mode 100644
index ea7aa7d19..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.untranslated.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "d_days": {
- "few": "new arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "arabic one translation of d_days",
- "other": "{{.Count}} days",
- "two": "{{.Count}} days",
- "zero": "{{.Count}} days"
- },
- "my_height_in_meters": {
- "few": "I am {{.Count}} meters tall.",
- "many": "I am {{.Count}} meters tall.",
- "one": "I am {{.Count}} meters tall.",
- "other": "I am {{.Count}} meters tall.",
- "two": "I am {{.Count}} meters tall.",
- "zero": "I am {{.Count}} meters tall."
- },
- "person_unread_email_count_timeframe": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
- "program_greeting": {
- "other": "Hello world"
- },
- "your_unread_email_count": {
- "few": "You have {{.Count}} unread emails.",
- "many": "You have {{.Count}} unread emails.",
- "one": "You have {{.Count}} unread emails.",
- "other": "You have {{.Count}} unread emails.",
- "two": "You have {{.Count}} unread emails.",
- "zero": "You have {{.Count}} unread emails."
- }
-} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.all.json
deleted file mode 100644
index 766b2a77c..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.all.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "d_days": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- },
- "my_height_in_meters": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- },
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
- "person_unread_email_count_timeframe": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
- "program_greeting": {
- "other": "Hello world"
- },
- "your_unread_email_count": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
-} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json
deleted file mode 100644
index 9e26dfeeb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json
+++ /dev/null
@@ -1 +0,0 @@
-{} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json.json
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json.json
+++ /dev/null
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.all.json
deleted file mode 100644
index b0ee0311f..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.all.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "d_days": {
- "one": "",
- "other": ""
- },
- "my_height_in_meters": {
- "one": "",
- "other": ""
- },
- "person_greeting": {
- "other": ""
- },
- "person_unread_email_count": {
- "one": "",
- "other": ""
- },
- "person_unread_email_count_timeframe": {
- "other": ""
- },
- "program_greeting": {
- "other": ""
- },
- "your_unread_email_count": {
- "one": "",
- "other": ""
- }
-} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.untranslated.json
deleted file mode 100644
index e6d5c4fb6..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.untranslated.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "d_days": {
- "one": "{{.Count}} days",
- "other": "{{.Count}} days"
- },
- "my_height_in_meters": {
- "one": "I am {{.Count}} meters tall.",
- "other": "I am {{.Count}} meters tall."
- },
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread emails.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
- "person_unread_email_count_timeframe": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
- "program_greeting": {
- "other": "Hello world"
- },
- "your_unread_email_count": {
- "one": "You have {{.Count}} unread emails.",
- "other": "You have {{.Count}} unread emails."
- }
-} \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.all.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.all.json
deleted file mode 100644
index 20e0b8736..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.all.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "one": "",
- "other": ""
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "",
- "other": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": ""
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "",
- "other": ""
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "",
- "other": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "",
- "other": ""
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.untranslated.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.untranslated.json
deleted file mode 100644
index e2d3967c5..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/fr-fr.untranslated.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} days",
- "other": "{{.Count}} days"
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "I am {{.Count}} meters tall.",
- "other": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread emails.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "You have {{.Count}} unread emails.",
- "other": "You have {{.Count}} unread emails."
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.one.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.one.json
deleted file mode 100644
index f5af1d6f4..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.one.json
+++ /dev/null
@@ -1,54 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": "arabic translation of person_greeting"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "few": "arabic few translation of person_unread_email_count",
- "many": "arabic many translation of person_unread_email_count",
- "one": "arabic one translation of person_unread_email_count",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.two.json
deleted file mode 100644
index e98d7e9b2..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/ar-ar.two.json
+++ /dev/null
@@ -1,54 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "new arabic few translation of d_days",
- "many": "",
- "one": "arabic one translation of d_days",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": "new arabic translation of person_greeting"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "arabic other translation of person_unread_email_count",
- "two": "arabic two translation of person_unread_email_count",
- "zero": "arabic zero translation of person_unread_email_count"
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.constants.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.constants.json
deleted file mode 100644
index 5aedc235a..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.constants.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
- }
-] \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.one.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.one.json
deleted file mode 100644
index 63a9d6ffb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.one.json
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "id": "program_greeting",
- "translation": "Hello world"
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
- },
- {
- "id": "my_height_in_meters",
- "translation": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
- }
- },
- {
- "id": "d_days",
- "translation": "this should get overwritten"
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.two.json
deleted file mode 100644
index dcc715c43..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/en-us.two.json
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.one.toml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.one.toml
deleted file mode 100644
index 364a62cfe..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.one.toml
+++ /dev/null
@@ -1,37 +0,0 @@
-[d_days]
-few = "arabic few translation of d_days"
-many = "arabic many translation of d_days"
-one = ""
-other = ""
-two = ""
-zero = ""
-
-[person_greeting]
-other = "arabic translation of person_greeting"
-
-[person_unread_email_count]
-few = "arabic few translation of person_unread_email_count"
-many = "arabic many translation of person_unread_email_count"
-one = "arabic one translation of person_unread_email_count"
-other = ""
-two = ""
-zero = ""
-
-[person_unread_email_count_timeframe]
-few = ""
-many = ""
-one = ""
-other = ""
-two = ""
-zero = ""
-
-[program_greeting]
-other = ""
-
-[your_unread_email_count]
-few = ""
-many = ""
-one = ""
-other = ""
-two = ""
-zero = ""
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.two.json
deleted file mode 100644
index 5e6fba41b..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.two.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "d_days": {
- "few": "new arabic few translation of d_days",
- "many": "",
- "one": "arabic one translation of d_days",
- "other": "",
- "two": "",
- "zero": ""
- },
-
- "person_greeting": {
- "other": "new arabic translation of person_greeting"
- },
-
- "person_unread_email_count": {
- "few": "",
- "many": "",
- "one": "",
- "other": "arabic other translation of person_unread_email_count",
- "two": "arabic two translation of person_unread_email_count",
- "zero": "arabic zero translation of person_unread_email_count"
- },
-
- "person_unread_email_count_timeframe": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- },
-
- "program_greeting": {
- "other": ""
- },
-
- "your_unread_email_count": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.constants.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.constants.json
deleted file mode 100644
index c41b2b97f..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.constants.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "d_days": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- },
-
- "my_height_in_meters": {
- "one": "I am {{.Count}} meter tall.",
- "other": "I am {{.Count}} meters tall."
- },
-
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
-
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
-
- "person_unread_email_count_timeframe": {
- "one": "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}.",
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
-
- "program_greeting": {
- "other": "Hello world"
- },
-
- "your_unread_email_count": {
- "one": "You have {{.Count}} unread email.",
- "other": "You have {{.Count}} unread emails."
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.one.yaml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.one.yaml
deleted file mode 100644
index 02ae0011b..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.one.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-program_greeting:
- other: "Hello world"
-
-your_unread_email_count:
- one: "You have {{.Count}} unread email."
- other: "You have {{.Count}} unread emails."
-
-my_height_in_meters:
- one: "I am {{.Count}} meter tall."
- other: "I am {{.Count}} meters tall."
-
-person_unread_email_count_timeframe:
- other: "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
-
-d_days:
- other: "this should get overwritten"
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.two.json
deleted file mode 100644
index 06bd28dcd..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.two.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "person_greeting": {
- "other": "Hello {{.Person}}"
- },
-
- "person_unread_email_count": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- },
-
- "person_unread_email_count_timeframe": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- },
-
- "d_days": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/fr-fr.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/fr-fr.json
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/fr-fr.json
+++ /dev/null
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/fr-fr.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/fr-fr.json
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/fr-fr.json
+++ /dev/null
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.one.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.one.json
deleted file mode 100644
index f5af1d6f4..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.one.json
+++ /dev/null
@@ -1,54 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "arabic few translation of d_days",
- "many": "arabic many translation of d_days",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": "arabic translation of person_greeting"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "few": "arabic few translation of person_unread_email_count",
- "many": "arabic many translation of person_unread_email_count",
- "one": "arabic one translation of person_unread_email_count",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.two.json
deleted file mode 100644
index e98d7e9b2..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/ar-ar.two.json
+++ /dev/null
@@ -1,54 +0,0 @@
-[
- {
- "id": "d_days",
- "translation": {
- "few": "new arabic few translation of d_days",
- "many": "",
- "one": "arabic one translation of d_days",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "person_greeting",
- "translation": "new arabic translation of person_greeting"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "arabic other translation of person_unread_email_count",
- "two": "arabic two translation of person_unread_email_count",
- "zero": "arabic zero translation of person_unread_email_count"
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- },
- {
- "id": "program_greeting",
- "translation": ""
- },
- {
- "id": "your_unread_email_count",
- "translation": {
- "few": "",
- "many": "",
- "one": "",
- "other": "",
- "two": "",
- "zero": ""
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.one.yaml b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.one.yaml
deleted file mode 100644
index 3ca8e380d..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.one.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-- id: program_greeting
- translation: Hello world
-
-- id: your_unread_email_count
- translation:
- one: You have {{.Count}} unread email.
- other: You have {{.Count}} unread emails.
-
-- id: my_height_in_meters
- translation:
- one: I am {{.Count}} meter tall.
- other: I am {{.Count}} meters tall.
-
-- id: person_unread_email_count_timeframe
- translation:
- one: "{{.Person}} has {{.Count}} unread email in the past {{.Timeframe}}."
-
-- id: d_days
- translation: this should get overwritten \ No newline at end of file
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.two.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.two.json
deleted file mode 100644
index dcc715c43..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/en-us.two.json
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "id": "person_greeting",
- "translation": "Hello {{.Person}}"
- },
- {
- "id": "person_unread_email_count",
- "translation": {
- "one": "{{.Person}} has {{.Count}} unread email.",
- "other": "{{.Person}} has {{.Count}} unread emails."
- }
- },
- {
- "id": "person_unread_email_count_timeframe",
- "translation": {
- "other": "{{.Person}} has {{.Count}} unread emails in the past {{.Timeframe}}."
- }
- },
- {
- "id": "d_days",
- "translation": {
- "one": "{{.Count}} day",
- "other": "{{.Count}} days"
- }
- }
-]
diff --git a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/fr-fr.json b/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/fr-fr.json
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/yaml/fr-fr.json
+++ /dev/null
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/bundle/bundle_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/bundle/bundle_test.go
deleted file mode 100644
index da3830a79..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/bundle/bundle_test.go
+++ /dev/null
@@ -1,364 +0,0 @@
-package bundle
-
-import (
- "fmt"
- "strconv"
- "sync"
- "testing"
-
- "reflect"
- "sort"
-
- "github.com/nicksnyder/go-i18n/i18n/language"
- "github.com/nicksnyder/go-i18n/i18n/translation"
-)
-
-func TestMustLoadTranslationFile(t *testing.T) {
- t.Skipf("not implemented")
-}
-
-func TestLoadTranslationFile(t *testing.T) {
- t.Skipf("not implemented")
-}
-
-func TestParseTranslationFileBytes(t *testing.T) {
- t.Skipf("not implemented")
-}
-
-func TestAddTranslation(t *testing.T) {
- t.Skipf("not implemented")
-}
-
-func TestMustTfunc(t *testing.T) {
- defer func() {
- if r := recover(); r == nil {
- t.Errorf("expected MustTfunc to panic")
- }
- }()
- New().MustTfunc("invalid")
-}
-
-func TestLanguageTagsAndTranslationIDs(t *testing.T) {
- b := New()
- translationID := "translation_id"
- englishLanguage := languageWithTag("en-US")
- frenchLanguage := languageWithTag("fr-FR")
- spanishLanguage := languageWithTag("es")
- addFakeTranslation(t, b, englishLanguage, "English"+translationID)
- addFakeTranslation(t, b, frenchLanguage, translationID)
- addFakeTranslation(t, b, spanishLanguage, translationID)
-
- tags := b.LanguageTags()
- sort.Strings(tags)
- compareTo := []string{englishLanguage.Tag, spanishLanguage.Tag, frenchLanguage.Tag}
- if !reflect.DeepEqual(tags, compareTo) {
- t.Errorf("LanguageTags() = %#v; expected: %#v", tags, compareTo)
- }
-
- ids := b.LanguageTranslationIDs(englishLanguage.Tag)
- sort.Strings(ids)
- compareTo = []string{"English" + translationID}
- if !reflect.DeepEqual(ids, compareTo) {
- t.Errorf("LanguageTranslationIDs() = %#v; expected: %#v", ids, compareTo)
- }
-}
-
-func TestTfuncAndLanguage(t *testing.T) {
- b := New()
- translationID := "translation_id"
- englishLanguage := languageWithTag("en-US")
- frenchLanguage := languageWithTag("fr-FR")
- spanishLanguage := languageWithTag("es")
- chineseLanguage := languageWithTag("zh-hans-cn")
- englishTranslation := addFakeTranslation(t, b, englishLanguage, translationID)
- frenchTranslation := addFakeTranslation(t, b, frenchLanguage, translationID)
- spanishTranslation := addFakeTranslation(t, b, spanishLanguage, translationID)
- chineseTranslation := addFakeTranslation(t, b, chineseLanguage, translationID)
-
- tests := []struct {
- languageIDs []string
- result string
- expectedLanguage *language.Language
- }{
- {
- []string{"invalid"},
- translationID,
- nil,
- },
- {
- []string{"invalid", "invalid2"},
- translationID,
- nil,
- },
- {
- []string{"invalid", "en-US"},
- englishTranslation,
- englishLanguage,
- },
- {
- []string{"en-US", "invalid"},
- englishTranslation,
- englishLanguage,
- },
- {
- []string{"en-US", "fr-FR"},
- englishTranslation,
- englishLanguage,
- },
- {
- []string{"invalid", "es"},
- spanishTranslation,
- spanishLanguage,
- },
- {
- []string{"zh-CN,fr-XX,es"},
- spanishTranslation,
- spanishLanguage,
- },
- {
- []string{"fr"},
- frenchTranslation,
-
- // The language is still "fr" even though the translation is provided by "fr-FR"
- languageWithTag("fr"),
- },
- {
- []string{"zh"},
- chineseTranslation,
-
- // The language is still "zh" even though the translation is provided by "zh-hans-cn"
- languageWithTag("zh"),
- },
- {
- []string{"zh-hans"},
- chineseTranslation,
-
- // The language is still "zh-hans" even though the translation is provided by "zh-hans-cn"
- languageWithTag("zh-hans"),
- },
- {
- []string{"zh-hans-cn"},
- chineseTranslation,
- languageWithTag("zh-hans-cn"),
- },
- }
-
- for i, test := range tests {
- tf, lang, err := b.TfuncAndLanguage(test.languageIDs[0], test.languageIDs[1:]...)
- if err != nil && test.expectedLanguage != nil {
- t.Errorf("Tfunc(%v) = error{%q}; expected no error", test.languageIDs, err)
- }
- if err == nil && test.expectedLanguage == nil {
- t.Errorf("Tfunc(%v) = nil error; expected error", test.languageIDs)
- }
- if result := tf(translationID); result != test.result {
- t.Errorf("translation %d was %s; expected %s", i, result, test.result)
- }
- if (lang == nil && test.expectedLanguage != nil) ||
- (lang != nil && test.expectedLanguage == nil) ||
- (lang != nil && test.expectedLanguage != nil && lang.String() != test.expectedLanguage.String()) {
- t.Errorf("lang %d was %s; expected %s", i, lang, test.expectedLanguage)
- }
- }
-}
-
-func TestConcurrent(t *testing.T) {
- b := New()
- // bootstrap bundle
- translationID := "translation_id" // +1
- englishLanguage := languageWithTag("en-US")
- addFakeTranslation(t, b, englishLanguage, translationID)
-
- tf, err := b.Tfunc(englishLanguage.Tag)
- if err != nil {
- t.Errorf("Tfunc(%v) = error{%q}; expected no error", []string{englishLanguage.Tag}, err)
- }
-
- const iterations = 1000
- var wg sync.WaitGroup
- wg.Add(iterations)
-
- // Using go routines insert 1000 ints into our map.
- go func() {
- for i := 0; i < iterations/2; i++ {
- // Add item to map.
- translationID := strconv.FormatInt(int64(i), 10)
- addFakeTranslation(t, b, englishLanguage, translationID)
-
- // Retrieve item from map.
- tf(translationID)
-
- wg.Done()
- } // Call go routine with current index.
- }()
-
- go func() {
- for i := iterations / 2; i < iterations; i++ {
- // Add item to map.
- translationID := strconv.FormatInt(int64(i), 10)
- addFakeTranslation(t, b, englishLanguage, translationID)
-
- // Retrieve item from map.
- tf(translationID)
-
- wg.Done()
- } // Call go routine with current index.
- }()
-
- // Wait for all go routines to finish.
- wg.Wait()
-
- // Make sure map contains 1000+1 elements.
- count := len(b.Translations()[englishLanguage.Tag])
- if count != iterations+1 {
- t.Error("Expecting 1001 elements, got", count)
- }
-}
-
-func addFakeTranslation(t *testing.T, b *Bundle, lang *language.Language, translationID string) string {
- translation := fakeTranslation(lang, translationID)
- b.AddTranslation(lang, testNewTranslation(t, map[string]interface{}{
- "id": translationID,
- "translation": translation,
- }))
- return translation
-}
-
-func fakeTranslation(lang *language.Language, translationID string) string {
- return fmt.Sprintf("%s(%s)", lang.Tag, translationID)
-}
-
-func testNewTranslation(t *testing.T, data map[string]interface{}) translation.Translation {
- translation, err := translation.NewTranslation(data)
- if err != nil {
- t.Fatal(err)
- }
- return translation
-}
-
-func languageWithTag(tag string) *language.Language {
- return language.MustParse(tag)[0]
-}
-
-func createBenchmarkTranslateFunc(b *testing.B, translationTemplate interface{}, count interface{}, expected string) func(data interface{}) {
- bundle := New()
- lang := "en-US"
- translationID := "translation_id"
- translation, err := translation.NewTranslation(map[string]interface{}{
- "id": translationID,
- "translation": translationTemplate,
- })
- if err != nil {
- b.Fatal(err)
- }
- bundle.AddTranslation(languageWithTag(lang), translation)
- tf, err := bundle.Tfunc(lang)
- if err != nil {
- b.Fatal(err)
- }
- return func(data interface{}) {
- var result string
- if count == nil {
- result = tf(translationID, data)
- } else {
- result = tf(translationID, count, data)
- }
- if result != expected {
- b.Fatalf("expected %q, got %q", expected, result)
- }
- }
-}
-
-func createBenchmarkPluralTranslateFunc(b *testing.B) func(data interface{}) {
- translationTemplate := map[string]interface{}{
- "one": "{{.Person}} is {{.Count}} year old.",
- "other": "{{.Person}} is {{.Count}} years old.",
- }
- count := 26
- expected := "Bob is 26 years old."
- return createBenchmarkTranslateFunc(b, translationTemplate, count, expected)
-}
-
-func createBenchmarkNonPluralTranslateFunc(b *testing.B) func(data interface{}) {
- translationTemplate := "Hi {{.Person}}!"
- expected := "Hi Bob!"
- return createBenchmarkTranslateFunc(b, translationTemplate, nil, expected)
-}
-
-func BenchmarkTranslateNonPluralWithMap(b *testing.B) {
- data := map[string]interface{}{
- "Person": "Bob",
- }
- tf := createBenchmarkNonPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslateNonPluralWithStruct(b *testing.B) {
- data := struct{ Person string }{Person: "Bob"}
- tf := createBenchmarkNonPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslateNonPluralWithStructPointer(b *testing.B) {
- data := &struct{ Person string }{Person: "Bob"}
- tf := createBenchmarkNonPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslatePluralWithMap(b *testing.B) {
- data := map[string]interface{}{
- "Person": "Bob",
- }
- tf := createBenchmarkPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslatePluralWithMapAndCountField(b *testing.B) {
- data := map[string]interface{}{
- "Person": "Bob",
- "Count": 26,
- }
-
- translationTemplate := map[string]interface{}{
- "one": "{{.Person}} is {{.Count}} year old.",
- "other": "{{.Person}} is {{.Count}} years old.",
- }
- expected := "Bob is 26 years old."
-
- tf := createBenchmarkTranslateFunc(b, translationTemplate, nil, expected)
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslatePluralWithStruct(b *testing.B) {
- data := struct{ Person string }{Person: "Bob"}
- tf := createBenchmarkPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
-
-func BenchmarkTranslatePluralWithStructPointer(b *testing.B) {
- data := &struct{ Person string }{Person: "Bob"}
- tf := createBenchmarkPluralTranslateFunc(b)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- tf(data)
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/example_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/example_test.go
deleted file mode 100644
index 305c5b3df..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/example_test.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package i18n_test
-
-import (
- "fmt"
-
- "github.com/nicksnyder/go-i18n/i18n"
-)
-
-func Example() {
- i18n.MustLoadTranslationFile("../goi18n/testdata/expected/en-us.all.json")
-
- T, _ := i18n.Tfunc("en-US")
-
- bobMap := map[string]interface{}{"Person": "Bob"}
- bobStruct := struct{ Person string }{Person: "Bob"}
-
- fmt.Println(T("program_greeting"))
- fmt.Println(T("person_greeting", bobMap))
- fmt.Println(T("person_greeting", bobStruct))
-
- fmt.Println(T("your_unread_email_count", 0))
- fmt.Println(T("your_unread_email_count", 1))
- fmt.Println(T("your_unread_email_count", 2))
- fmt.Println(T("my_height_in_meters", "1.7"))
-
- fmt.Println(T("person_unread_email_count", 0, bobMap))
- fmt.Println(T("person_unread_email_count", 1, bobMap))
- fmt.Println(T("person_unread_email_count", 2, bobMap))
- fmt.Println(T("person_unread_email_count", 0, bobStruct))
- fmt.Println(T("person_unread_email_count", 1, bobStruct))
- fmt.Println(T("person_unread_email_count", 2, bobStruct))
-
- type Count struct{ Count int }
- fmt.Println(T("your_unread_email_count", Count{0}))
- fmt.Println(T("your_unread_email_count", Count{1}))
- fmt.Println(T("your_unread_email_count", Count{2}))
-
- fmt.Println(T("your_unread_email_count", map[string]interface{}{"Count": 0}))
- fmt.Println(T("your_unread_email_count", map[string]interface{}{"Count": "1"}))
- fmt.Println(T("your_unread_email_count", map[string]interface{}{"Count": "3.14"}))
-
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 0),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 1),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 2),
- }))
-
- fmt.Println(T("person_unread_email_count_timeframe", 1, map[string]interface{}{
- "Count": 30,
- "Person": "Bob",
- "Timeframe": T("d_days", 0),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 2, map[string]interface{}{
- "Count": 20,
- "Person": "Bob",
- "Timeframe": T("d_days", 1),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Count": 10,
- "Person": "Bob",
- "Timeframe": T("d_days", 2),
- }))
-
- // Output:
- // Hello world
- // Hello Bob
- // Hello Bob
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 2 unread emails.
- // I am 1.7 meters tall.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 2 unread emails.
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 3.14 unread emails.
- // Bob has 3 unread emails in the past 0 days.
- // Bob has 3 unread emails in the past 1 day.
- // Bob has 3 unread emails in the past 2 days.
- // Bob has 1 unread email in the past 0 days.
- // Bob has 2 unread emails in the past 1 day.
- // Bob has 3 unread emails in the past 2 days.
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/exampletemplate_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/exampletemplate_test.go
deleted file mode 100644
index 962936610..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/exampletemplate_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package i18n_test
-
-import (
- "github.com/nicksnyder/go-i18n/i18n"
- "os"
- "text/template"
-)
-
-var funcMap = map[string]interface{}{
- "T": i18n.IdentityTfunc,
-}
-
-var tmpl = template.Must(template.New("").Funcs(funcMap).Parse(`
-{{T "program_greeting"}}
-{{T "person_greeting" .}}
-{{T "your_unread_email_count" 0}}
-{{T "your_unread_email_count" 1}}
-{{T "your_unread_email_count" 2}}
-{{T "person_unread_email_count" 0 .}}
-{{T "person_unread_email_count" 1 .}}
-{{T "person_unread_email_count" 2 .}}
-`))
-
-func Example_template() {
- i18n.MustLoadTranslationFile("../goi18n/testdata/expected/en-us.all.json")
-
- T, _ := i18n.Tfunc("en-US")
- tmpl.Funcs(map[string]interface{}{
- "T": T,
- })
-
- tmpl.Execute(os.Stdout, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 1),
- })
-
- tmpl.Execute(os.Stdout, struct {
- Person string
- Timeframe string
- }{
- Person: "Bob",
- Timeframe: T("d_days", 1),
- })
-
- // Output:
- // Hello world
- // Hello Bob
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 2 unread emails.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
- //
- // Hello world
- // Hello Bob
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 2 unread emails.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/exampleyaml_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/exampleyaml_test.go
deleted file mode 100644
index b2e7bdcfe..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/exampleyaml_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package i18n_test
-
-import (
- "fmt"
- "github.com/nicksnyder/go-i18n/i18n"
-)
-
-func ExampleYAML() {
- i18n.MustLoadTranslationFile("../goi18n/testdata/en-us.yaml")
-
- T, _ := i18n.Tfunc("en-US")
-
- bobMap := map[string]interface{}{"Person": "Bob"}
- bobStruct := struct{ Person string }{Person: "Bob"}
-
- fmt.Println(T("program_greeting"))
- fmt.Println(T("person_greeting", bobMap))
- fmt.Println(T("person_greeting", bobStruct))
-
- fmt.Println(T("your_unread_email_count", 0))
- fmt.Println(T("your_unread_email_count", 1))
- fmt.Println(T("your_unread_email_count", 2))
- fmt.Println(T("my_height_in_meters", "1.7"))
-
- fmt.Println(T("person_unread_email_count", 0, bobMap))
- fmt.Println(T("person_unread_email_count", 1, bobMap))
- fmt.Println(T("person_unread_email_count", 2, bobMap))
- fmt.Println(T("person_unread_email_count", 0, bobStruct))
- fmt.Println(T("person_unread_email_count", 1, bobStruct))
- fmt.Println(T("person_unread_email_count", 2, bobStruct))
-
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 0),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 1),
- }))
- fmt.Println(T("person_unread_email_count_timeframe", 3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": T("d_days", 2),
- }))
-
- // Output:
- // Hello world
- // Hello Bob
- // Hello Bob
- // You have 0 unread emails.
- // You have 1 unread email.
- // You have 2 unread emails.
- // I am 1.7 meters tall.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
- // Bob has 0 unread emails.
- // Bob has 1 unread email.
- // Bob has 2 unread emails.
- // Bob has 3 unread emails in the past 0 days.
- // Bob has 3 unread emails in the past 1 day.
- // Bob has 3 unread emails in the past 2 days.
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/generate.sh b/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/generate.sh
deleted file mode 100644
index a9fae846a..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/generate.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-go build && ./codegen -cout ../pluralspec_gen.go -tout ../pluralspec_gen_test.go && \
- gofmt -w=true ../pluralspec_gen.go && \
- gofmt -w=true ../pluralspec_gen_test.go && \
- rm codegen
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/main.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/main.go
deleted file mode 100644
index 58971033f..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/main.go
+++ /dev/null
@@ -1,132 +0,0 @@
-package main
-
-import (
- "encoding/xml"
- "flag"
- "fmt"
- "io/ioutil"
- "os"
- "text/template"
-)
-
-var usage = `%[1]s generates Go code to support CLDR plural rules.
-
-Usage: %[1]s [options]
-
-Options:
-
-`
-
-func main() {
- flag.Usage = func() {
- fmt.Fprintf(os.Stderr, usage, os.Args[0])
- flag.PrintDefaults()
- }
- var in, cout, tout string
- flag.StringVar(&in, "i", "plurals.xml", "the input XML file containing CLDR plural rules")
- flag.StringVar(&cout, "cout", "", "the code output file")
- flag.StringVar(&tout, "tout", "", "the test output file")
- flag.BoolVar(&verbose, "v", false, "verbose output")
- flag.Parse()
-
- buf, err := ioutil.ReadFile(in)
- if err != nil {
- fatalf("failed to read file: %s", err)
- }
-
- var data SupplementalData
- if err := xml.Unmarshal(buf, &data); err != nil {
- fatalf("failed to unmarshal xml: %s", err)
- }
-
- count := 0
- for _, pg := range data.PluralGroups {
- count += len(pg.SplitLocales())
- }
- infof("parsed %d locales", count)
-
- if cout != "" {
- file := openWritableFile(cout)
- if err := codeTemplate.Execute(file, data); err != nil {
- fatalf("unable to execute code template because %s", err)
- } else {
- infof("generated %s", cout)
- }
- } else {
- infof("not generating code file (use -cout)")
- }
-
- if tout != "" {
- file := openWritableFile(tout)
- if err := testTemplate.Execute(file, data); err != nil {
- fatalf("unable to execute test template because %s", err)
- } else {
- infof("generated %s", tout)
- }
- } else {
- infof("not generating test file (use -tout)")
- }
-}
-
-func openWritableFile(name string) *os.File {
- file, err := os.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
- if err != nil {
- fatalf("failed to write file %s because %s", name, err)
- }
- return file
-}
-
-var codeTemplate = template.Must(template.New("spec").Parse(`package language
-// This file is generated by i18n/language/codegen/generate.sh
-
-func init() {
-{{range .PluralGroups}}
- RegisterPluralSpec({{printf "%#v" .SplitLocales}}, &PluralSpec{
- Plurals: newPluralSet({{range $i, $e := .PluralRules}}{{if $i}}, {{end}}{{$e.CountTitle}}{{end}}),
- PluralFunc: func(ops *Operands) Plural { {{range .PluralRules}}{{if .GoCondition}}
- // {{.Condition}}
- if {{.GoCondition}} {
- return {{.CountTitle}}
- }{{end}}{{end}}
- return Other
- },
- }){{end}}
-}
-`))
-
-var testTemplate = template.Must(template.New("spec").Parse(`package language
-// This file is generated by i18n/language/codegen/generate.sh
-
-import "testing"
-
-{{range .PluralGroups}}
-func Test{{.Name}}(t *testing.T) {
- var tests []pluralTest
- {{range .PluralRules}}
- {{if .IntegerExamples}}tests = appendIntegerTests(tests, {{.CountTitle}}, {{printf "%#v" .IntegerExamples}}){{end}}
- {{if .DecimalExamples}}tests = appendDecimalTests(tests, {{.CountTitle}}, {{printf "%#v" .DecimalExamples}}){{end}}
- {{end}}
- locales := {{printf "%#v" .SplitLocales}}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-{{end}}
-`))
-
-func infof(format string, args ...interface{}) {
- fmt.Fprintf(os.Stderr, format+"\n", args...)
-}
-
-var verbose bool
-
-func verbosef(format string, args ...interface{}) {
- if verbose {
- infof(format, args...)
- }
-}
-
-func fatalf(format string, args ...interface{}) {
- infof("fatal: "+format+"\n", args...)
- os.Exit(1)
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/plurals.xml b/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/plurals.xml
deleted file mode 100644
index 3310c8ee2..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/plurals.xml
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd">
-<!--
-Copyright © 1991-2015 Unicode, Inc.
-CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
-For terms of use, see http://www.unicode.org/copyright.html
--->
-<supplementalData>
- <version number="$Revision: 13253 $"/>
- <plurals type="cardinal">
- <!-- For a canonicalized list, use GeneratedPluralSamples -->
-
- <!-- 1: other -->
-
- <pluralRules locales="bm bo dz id ig ii in ja jbo jv jw kde kea km ko lkt lo ms my nqo root sah ses sg th to vi wo yo yue zh">
- <pluralRule count="other"> @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 2: one,other -->
-
- <pluralRules locales="am as bn fa gu hi kn mr zu">
- <pluralRule count="one">i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ff fr hy kab">
- <pluralRule count="one">i = 0,1 @integer 0, 1 @decimal 0.0~1.5</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="pt">
- <pluralRule count="one">i = 0..1 @integer 0, 1 @decimal 0.0~1.5</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ast ca de en et fi fy gl it ji nl sv sw ur yi">
- <pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
- <pluralRule count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="si">
- <pluralRule count="one">n = 0,1 or i = 0 and f = 1 @integer 0, 1 @decimal 0.0, 0.1, 1.0, 0.00, 0.01, 1.00, 0.000, 0.001, 1.000, 0.0000, 0.0001, 1.0000</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.2~0.9, 1.1~1.8, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ak bh guw ln mg nso pa ti wa">
- <pluralRule count="one">n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="tzm">
- <pluralRule count="one">n = 0..1 or n = 11..99 @integer 0, 1, 11~24 @decimal 0.0, 1.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0</pluralRule>
- <pluralRule count="other"> @integer 2~10, 100~106, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="af asa az bem bez bg brx ce cgg chr ckb dv ee el eo es eu fo fur gsw ha haw hu jgo jmc ka kaj kcg kk kkj kl ks ksb ku ky lb lg mas mgo ml mn nah nb nd ne nn nnh no nr ny nyn om or os pap ps rm rof rwk saq sdh seh sn so sq ss ssy st syr ta te teo tig tk tn tr ts ug uz ve vo vun wae xh xog">
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="da">
- <pluralRule count="one">n = 1 or t != 0 and i = 0,1 @integer 1 @decimal 0.1~1.6</pluralRule>
- <pluralRule count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 2.0~3.4, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="is">
- <pluralRule count="one">t = 0 and i % 10 = 1 and i % 100 != 11 or t != 0 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="mk">
- <pluralRule count="one">v = 0 and i % 10 = 1 or f % 10 = 1 @integer 1, 11, 21, 31, 41, 51, 61, 71, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="other"> @integer 0, 2~10, 12~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.2~1.0, 1.2~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="fil tl">
- <pluralRule count="one">v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9 @integer 0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1.3, 1.5, 1.7, 1.8, 2.0, 2.1, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0.6, 0.9, 1.4, 1.6, 1.9, 2.4, 2.6, 10.4, 100.4, 1000.4, …</pluralRule>
- </pluralRules>
-
- <!-- 3: zero,one,other -->
-
- <pluralRules locales="lv prg">
- <pluralRule count="zero">n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19 @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="one">n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="other"> @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, 100.2, 1000.2, …</pluralRule>
- </pluralRules>
- <pluralRules locales="lag">
- <pluralRule count="zero">n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000</pluralRule>
- <pluralRule count="one">i = 0,1 and n != 0 @integer 1 @decimal 0.1~1.6</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ksh">
- <pluralRule count="zero">n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000</pluralRule>
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 3: one,two,other -->
-
- <pluralRules locales="iu kw naq se sma smi smj smn sms">
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="two">n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000</pluralRule>
- <pluralRule count="other"> @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 3: one,few,other -->
-
- <pluralRules locales="shi">
- <pluralRule count="one">i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04</pluralRule>
- <pluralRule count="few">n = 2..10 @integer 2~10 @decimal 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00</pluralRule>
- <pluralRule count="other"> @integer 11~26, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~1.9, 2.1~2.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="mo ro">
- <pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
- <pluralRule count="few">v != 0 or n = 0 or n != 1 and n % 100 = 1..19 @integer 0, 2~16, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @integer 20~35, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- </pluralRules>
- <pluralRules locales="bs hr sh sr">
- <pluralRule count="one">v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="few">v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …</pluralRule>
- <pluralRule count="other"> @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 4: one,two,few,other -->
-
- <pluralRules locales="gd">
- <pluralRule count="one">n = 1,11 @integer 1, 11 @decimal 1.0, 11.0, 1.00, 11.00, 1.000, 11.000, 1.0000</pluralRule>
- <pluralRule count="two">n = 2,12 @integer 2, 12 @decimal 2.0, 12.0, 2.00, 12.00, 2.000, 12.000, 2.0000</pluralRule>
- <pluralRule count="few">n = 3..10,13..19 @integer 3~10, 13~19 @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 3.00</pluralRule>
- <pluralRule count="other"> @integer 0, 20~34, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="sl">
- <pluralRule count="one">v = 0 and i % 100 = 1 @integer 1, 101, 201, 301, 401, 501, 601, 701, 1001, …</pluralRule>
- <pluralRule count="two">v = 0 and i % 100 = 2 @integer 2, 102, 202, 302, 402, 502, 602, 702, 1002, …</pluralRule>
- <pluralRule count="few">v = 0 and i % 100 = 3..4 or v != 0 @integer 3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- </pluralRules>
- <pluralRules locales="dsb hsb">
- <pluralRule count="one">v = 0 and i % 100 = 1 or f % 100 = 1 @integer 1, 101, 201, 301, 401, 501, 601, 701, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="two">v = 0 and i % 100 = 2 or f % 100 = 2 @integer 2, 102, 202, 302, 402, 502, 602, 702, 1002, … @decimal 0.2, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 10.2, 100.2, 1000.2, …</pluralRule>
- <pluralRule count="few">v = 0 and i % 100 = 3..4 or f % 100 = 3..4 @integer 3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, … @decimal 0.3, 0.4, 1.3, 1.4, 2.3, 2.4, 3.3, 3.4, 4.3, 4.4, 5.3, 5.4, 6.3, 6.4, 7.3, 7.4, 10.3, 100.3, 1000.3, …</pluralRule>
- <pluralRule count="other"> @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 4: one,two,many,other -->
-
- <pluralRules locales="he iw">
- <pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
- <pluralRule count="two">i = 2 and v = 0 @integer 2</pluralRule>
- <pluralRule count="many">v = 0 and n != 0..10 and n % 10 = 0 @integer 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- <pluralRule count="other"> @integer 0, 3~17, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 4: one,few,many,other -->
-
- <pluralRules locales="cs sk">
- <pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
- <pluralRule count="few">i = 2..4 and v = 0 @integer 2~4</pluralRule>
- <pluralRule count="many">v != 0 @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- </pluralRules>
- <pluralRules locales="pl">
- <pluralRule count="one">i = 1 and v = 0 @integer 1</pluralRule>
- <pluralRule count="few">v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …</pluralRule>
- <pluralRule count="many">v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- <pluralRule count="other"> @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="be">
- <pluralRule count="one">n % 10 = 1 and n % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …</pluralRule>
- <pluralRule count="few">n % 10 = 2..4 and n % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 2.0, 3.0, 4.0, 22.0, 23.0, 24.0, 32.0, 33.0, 102.0, 1002.0, …</pluralRule>
- <pluralRule count="many">n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.1, 1000.1, …</pluralRule>
- </pluralRules>
- <pluralRules locales="lt">
- <pluralRule count="one">n % 10 = 1 and n % 100 != 11..19 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …</pluralRule>
- <pluralRule count="few">n % 10 = 2..9 and n % 100 != 11..19 @integer 2~9, 22~29, 102, 1002, … @decimal 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 22.0, 102.0, 1002.0, …</pluralRule>
- <pluralRule count="many">f != 0 @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.1, 1000.1, …</pluralRule>
- <pluralRule count="other"> @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="mt">
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="few">n = 0 or n % 100 = 2..10 @integer 0, 2~10, 102~107, 1002, … @decimal 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 10.0, 102.0, 1002.0, …</pluralRule>
- <pluralRule count="many">n % 100 = 11..19 @integer 11~19, 111~117, 1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, …</pluralRule>
- <pluralRule count="other"> @integer 20~35, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ru uk">
- <pluralRule count="one">v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …</pluralRule>
- <pluralRule count="few">v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …</pluralRule>
- <pluralRule count="many">v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
- <pluralRule count="other"> @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
-
- <!-- 5: one,two,few,many,other -->
-
- <pluralRules locales="br">
- <pluralRule count="one">n % 10 = 1 and n % 100 != 11,71,91 @integer 1, 21, 31, 41, 51, 61, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 81.0, 101.0, 1001.0, …</pluralRule>
- <pluralRule count="two">n % 10 = 2 and n % 100 != 12,72,92 @integer 2, 22, 32, 42, 52, 62, 82, 102, 1002, … @decimal 2.0, 22.0, 32.0, 42.0, 52.0, 62.0, 82.0, 102.0, 1002.0, …</pluralRule>
- <pluralRule count="few">n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99 @integer 3, 4, 9, 23, 24, 29, 33, 34, 39, 43, 44, 49, 103, 1003, … @decimal 3.0, 4.0, 9.0, 23.0, 24.0, 29.0, 33.0, 34.0, 103.0, 1003.0, …</pluralRule>
- <pluralRule count="many">n != 0 and n % 1000000 = 0 @integer 1000000, … @decimal 1000000.0, 1000000.00, 1000000.000, …</pluralRule>
- <pluralRule count="other"> @integer 0, 5~8, 10~20, 100, 1000, 10000, 100000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="ga">
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="two">n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000</pluralRule>
- <pluralRule count="few">n = 3..6 @integer 3~6 @decimal 3.0, 4.0, 5.0, 6.0, 3.00, 4.00, 5.00, 6.00, 3.000, 4.000, 5.000, 6.000, 3.0000, 4.0000, 5.0000, 6.0000</pluralRule>
- <pluralRule count="many">n = 7..10 @integer 7~10 @decimal 7.0, 8.0, 9.0, 10.0, 7.00, 8.00, 9.00, 10.00, 7.000, 8.000, 9.000, 10.000, 7.0000, 8.0000, 9.0000, 10.0000</pluralRule>
- <pluralRule count="other"> @integer 0, 11~25, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="gv">
- <pluralRule count="one">v = 0 and i % 10 = 1 @integer 1, 11, 21, 31, 41, 51, 61, 71, 101, 1001, …</pluralRule>
- <pluralRule count="two">v = 0 and i % 10 = 2 @integer 2, 12, 22, 32, 42, 52, 62, 72, 102, 1002, …</pluralRule>
- <pluralRule count="few">v = 0 and i % 100 = 0,20,40,60,80 @integer 0, 20, 40, 60, 80, 100, 120, 140, 1000, 10000, 100000, 1000000, …</pluralRule>
- <pluralRule count="many">v != 0 @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- <pluralRule count="other"> @integer 3~10, 13~19, 23, 103, 1003, …</pluralRule>
- </pluralRules>
-
- <!-- 6: zero,one,two,few,many,other -->
-
- <pluralRules locales="ar ars">
- <pluralRule count="zero">n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000</pluralRule>
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="two">n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000</pluralRule>
- <pluralRule count="few">n % 100 = 3..10 @integer 3~10, 103~110, 1003, … @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 103.0, 1003.0, …</pluralRule>
- <pluralRule count="many">n % 100 = 11..99 @integer 11~26, 111, 1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, …</pluralRule>
- <pluralRule count="other"> @integer 100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- <pluralRules locales="cy">
- <pluralRule count="zero">n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000</pluralRule>
- <pluralRule count="one">n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000</pluralRule>
- <pluralRule count="two">n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000</pluralRule>
- <pluralRule count="few">n = 3 @integer 3 @decimal 3.0, 3.00, 3.000, 3.0000</pluralRule>
- <pluralRule count="many">n = 6 @integer 6 @decimal 6.0, 6.00, 6.000, 6.0000</pluralRule>
- <pluralRule count="other"> @integer 4, 5, 7~20, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
- </pluralRules>
- </plurals>
-</supplementalData>
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/xml.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/xml.go
deleted file mode 100644
index 9d39053c2..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/codegen/xml.go
+++ /dev/null
@@ -1,143 +0,0 @@
-package main
-
-import (
- "encoding/xml"
- "fmt"
- "regexp"
- "strings"
-)
-
-// SupplementalData is the top level struct of plural.xml
-type SupplementalData struct {
- XMLName xml.Name `xml:"supplementalData"`
- PluralGroups []PluralGroup `xml:"plurals>pluralRules"`
-}
-
-// PluralGroup is a group of locales with the same plural rules.
-type PluralGroup struct {
- Locales string `xml:"locales,attr"`
- PluralRules []PluralRule `xml:"pluralRule"`
-}
-
-// Name returns a unique name for this plural group.
-func (pg *PluralGroup) Name() string {
- n := strings.Title(pg.Locales)
- return strings.Replace(n, " ", "", -1)
-}
-
-// SplitLocales returns all the locales in the PluralGroup as a slice.
-func (pg *PluralGroup) SplitLocales() []string {
- return strings.Split(pg.Locales, " ")
-}
-
-// PluralRule is the rule for a single plural form.
-type PluralRule struct {
- Count string `xml:"count,attr"`
- Rule string `xml:",innerxml"`
-}
-
-// CountTitle returns the title case of the PluralRule's count.
-func (pr *PluralRule) CountTitle() string {
- return strings.Title(pr.Count)
-}
-
-// Condition returns the condition where the PluralRule applies.
-func (pr *PluralRule) Condition() string {
- i := strings.Index(pr.Rule, "@")
- return pr.Rule[:i]
-}
-
-// Examples returns the integer and decimal exmaples for the PLuralRule.
-func (pr *PluralRule) Examples() (integer []string, decimal []string) {
- ex := strings.Replace(pr.Rule, ", …", "", -1)
- ddelim := "@decimal"
- if i := strings.Index(ex, ddelim); i > 0 {
- dex := strings.TrimSpace(ex[i+len(ddelim):])
- decimal = strings.Split(dex, ", ")
- ex = ex[:i]
- }
- idelim := "@integer"
- if i := strings.Index(ex, idelim); i > 0 {
- iex := strings.TrimSpace(ex[i+len(idelim):])
- integer = strings.Split(iex, ", ")
- }
- return integer, decimal
-}
-
-// IntegerExamples returns the integer exmaples for the PLuralRule.
-func (pr *PluralRule) IntegerExamples() []string {
- integer, _ := pr.Examples()
- return integer
-}
-
-// DecimalExamples returns the decimal exmaples for the PLuralRule.
-func (pr *PluralRule) DecimalExamples() []string {
- _, decimal := pr.Examples()
- return decimal
-}
-
-var relationRegexp = regexp.MustCompile("([niftvw])(?: % ([0-9]+))? (!=|=)(.*)")
-
-// GoCondition converts the XML condition to valid Go code.
-func (pr *PluralRule) GoCondition() string {
- var ors []string
- for _, and := range strings.Split(pr.Condition(), "or") {
- var ands []string
- for _, relation := range strings.Split(and, "and") {
- parts := relationRegexp.FindStringSubmatch(relation)
- if parts == nil {
- continue
- }
- lvar, lmod, op, rhs := strings.Title(parts[1]), parts[2], parts[3], strings.TrimSpace(parts[4])
- if op == "=" {
- op = "=="
- }
- lvar = "ops." + lvar
- var rhor []string
- var rany []string
- for _, rh := range strings.Split(rhs, ",") {
- if parts := strings.Split(rh, ".."); len(parts) == 2 {
- from, to := parts[0], parts[1]
- if lvar == "ops.N" {
- if lmod != "" {
- rhor = append(rhor, fmt.Sprintf("ops.NmodInRange(%s, %s, %s)", lmod, from, to))
- } else {
- rhor = append(rhor, fmt.Sprintf("ops.NinRange(%s, %s)", from, to))
- }
- } else if lmod != "" {
- rhor = append(rhor, fmt.Sprintf("intInRange(%s %% %s, %s, %s)", lvar, lmod, from, to))
- } else {
- rhor = append(rhor, fmt.Sprintf("intInRange(%s, %s, %s)", lvar, from, to))
- }
- } else {
- rany = append(rany, rh)
- }
- }
-
- if len(rany) > 0 {
- rh := strings.Join(rany, ",")
- if lvar == "ops.N" {
- if lmod != "" {
- rhor = append(rhor, fmt.Sprintf("ops.NmodEqualsAny(%s, %s)", lmod, rh))
- } else {
- rhor = append(rhor, fmt.Sprintf("ops.NequalsAny(%s)", rh))
- }
- } else if lmod != "" {
- rhor = append(rhor, fmt.Sprintf("intEqualsAny(%s %% %s, %s)", lvar, lmod, rh))
- } else {
- rhor = append(rhor, fmt.Sprintf("intEqualsAny(%s, %s)", lvar, rh))
- }
- }
- r := strings.Join(rhor, " || ")
- if len(rhor) > 1 {
- r = "(" + r + ")"
- }
- if op == "!=" {
- r = "!" + r
- }
- ands = append(ands, r)
- }
- ors = append(ors, strings.Join(ands, " && "))
- }
- return strings.Join(ors, " ||\n")
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/language_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/language_test.go
deleted file mode 100644
index 1ab3314d6..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/language_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package language
-
-import (
- "reflect"
- "testing"
-)
-
-func TestParse(t *testing.T) {
- tests := []struct {
- src string
- lang []*Language
- }{
- {"en", []*Language{{"en", pluralSpecs["en"]}}},
- {"en-US", []*Language{{"en-us", pluralSpecs["en"]}}},
- {"en_US", []*Language{{"en-us", pluralSpecs["en"]}}},
- {"en-GB", []*Language{{"en-gb", pluralSpecs["en"]}}},
- {"zh-CN", []*Language{{"zh-cn", pluralSpecs["zh"]}}},
- {"zh-TW", []*Language{{"zh-tw", pluralSpecs["zh"]}}},
- {"pt-BR", []*Language{{"pt-br", pluralSpecs["pt"]}}},
- {"pt_BR", []*Language{{"pt-br", pluralSpecs["pt"]}}},
- {"pt-PT", []*Language{{"pt-pt", pluralSpecs["pt"]}}},
- {"pt_PT", []*Language{{"pt-pt", pluralSpecs["pt"]}}},
- {"zh-Hans-CN", []*Language{{"zh-hans-cn", pluralSpecs["zh"]}}},
- {"zh-Hant-TW", []*Language{{"zh-hant-tw", pluralSpecs["zh"]}}},
- {"en-US-en-US", []*Language{{"en-us-en-us", pluralSpecs["en"]}}},
- {".en-US..en-US.", []*Language{{"en-us", pluralSpecs["en"]}}},
- {
- "it, xx-zz, xx-ZZ, zh, en-gb;q=0.8, en;q=0.7, es-ES;q=0.6, de-xx",
- []*Language{
- {"it", pluralSpecs["it"]},
- {"zh", pluralSpecs["zh"]},
- {"en-gb", pluralSpecs["en"]},
- {"en", pluralSpecs["en"]},
- {"es-es", pluralSpecs["es"]},
- {"de-xx", pluralSpecs["de"]},
- },
- },
- {
- "it-qq,xx,xx-zz,xx-ZZ,zh,en-gb;q=0.8,en;q=0.7,es-ES;q=0.6,de-xx",
- []*Language{
- {"it-qq", pluralSpecs["it"]},
- {"zh", pluralSpecs["zh"]},
- {"en-gb", pluralSpecs["en"]},
- {"en", pluralSpecs["en"]},
- {"es-es", pluralSpecs["es"]},
- {"de-xx", pluralSpecs["de"]},
- },
- },
- {"en.json", []*Language{{"en", pluralSpecs["en"]}}},
- {"en-US.json", []*Language{{"en-us", pluralSpecs["en"]}}},
- {"en-us.json", []*Language{{"en-us", pluralSpecs["en"]}}},
- {"en-xx.json", []*Language{{"en-xx", pluralSpecs["en"]}}},
- {"xx-Yyen-US", nil},
- {"en US", nil},
- {"", nil},
- {"-", nil},
- {"_", nil},
- {"-en", nil},
- {"_en", nil},
- {"-en-", nil},
- {"_en_", nil},
- {"xx", nil},
- }
- for _, test := range tests {
- lang := Parse(test.src)
- if !reflect.DeepEqual(lang, test.lang) {
- t.Errorf("Parse(%q) = %s expected %s", test.src, lang, test.lang)
- }
- }
-}
-
-func TestMatchingTags(t *testing.T) {
- tests := []struct {
- lang *Language
- matches []string
- }{
- {&Language{"zh-hans-cn", nil}, []string{"zh", "zh-hans", "zh-hans-cn"}},
- {&Language{"foo", nil}, []string{"foo"}},
- }
- for _, test := range tests {
- if actual := test.lang.MatchingTags(); !reflect.DeepEqual(test.matches, actual) {
- t.Errorf("matchingTags(%q) = %q expected %q", test.lang.Tag, actual, test.matches)
- }
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/operands_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/operands_test.go
deleted file mode 100644
index e4f33902b..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/operands_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package language
-
-import (
- "reflect"
- "testing"
-)
-
-func TestNewOperands(t *testing.T) {
- tests := []struct {
- input interface{}
- ops *Operands
- err bool
- }{
- {int64(0), &Operands{0.0, 0, 0, 0, 0, 0}, false},
- {int64(1), &Operands{1.0, 1, 0, 0, 0, 0}, false},
- {"0", &Operands{0.0, 0, 0, 0, 0, 0}, false},
- {"1", &Operands{1.0, 1, 0, 0, 0, 0}, false},
- {"1.0", &Operands{1.0, 1, 1, 0, 0, 0}, false},
- {"1.00", &Operands{1.0, 1, 2, 0, 0, 0}, false},
- {"1.3", &Operands{1.3, 1, 1, 1, 3, 3}, false},
- {"1.30", &Operands{1.3, 1, 2, 1, 30, 3}, false},
- {"1.03", &Operands{1.03, 1, 2, 2, 3, 3}, false},
- {"1.230", &Operands{1.23, 1, 3, 2, 230, 23}, false},
- {"20.0230", &Operands{20.023, 20, 4, 3, 230, 23}, false},
- {20.0230, nil, true},
- }
- for _, test := range tests {
- ops, err := newOperands(test.input)
- if err != nil && !test.err {
- t.Errorf("newOperands(%#v) unexpected error: %s", test.input, err)
- } else if err == nil && test.err {
- t.Errorf("newOperands(%#v) returned %#v; expected error", test.input, ops)
- } else if !reflect.DeepEqual(ops, test.ops) {
- t.Errorf("newOperands(%#v) returned %#v; expected %#v", test.input, ops, test.ops)
- }
- }
-}
-
-func BenchmarkNewOperand(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if _, err := newOperands("1234.56780000"); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural_test.go
deleted file mode 100644
index 6336d29b2..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package language
-
-import (
- "testing"
-)
-
-func TestNewPlural(t *testing.T) {
- tests := []struct {
- src string
- plural Plural
- err bool
- }{
- {"zero", Zero, false},
- {"one", One, false},
- {"two", Two, false},
- {"few", Few, false},
- {"many", Many, false},
- {"other", Other, false},
- {"asdf", Invalid, true},
- }
- for _, test := range tests {
- plural, err := NewPlural(test.src)
- wrongErr := (err != nil && !test.err) || (err == nil && test.err)
- if plural != test.plural || wrongErr {
- t.Errorf("NewPlural(%#v) returned %#v,%#v; expected %#v", test.src, plural, err, test.plural)
- }
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_gen_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_gen_test.go
deleted file mode 100644
index 4cfa97bdf..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_gen_test.go
+++ /dev/null
@@ -1,631 +0,0 @@
-package language
-
-// This file is generated by i18n/language/codegen/generate.sh
-
-import "testing"
-
-func TestBmBoDzIdIgIiInJaJboJvJwKdeKeaKmKoLktLoMsMyNqoRootSahSesSgThToViWoYoYueZh(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Other, []string{"0~15", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"bm", "bo", "dz", "id", "ig", "ii", "in", "ja", "jbo", "jv", "jw", "kde", "kea", "km", "ko", "lkt", "lo", "ms", "my", "nqo", "root", "sah", "ses", "sg", "th", "to", "vi", "wo", "yo", "yue", "zh"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestAmAsBnFaGuHiKnMrZu(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0~1.0", "0.00~0.04"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"1.1~2.6", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"am", "as", "bn", "fa", "gu", "hi", "kn", "mr", "zu"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestFfFrHyKab(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0~1.5"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"2.0~3.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ff", "fr", "hy", "kab"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestPt(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0~1.5"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"2.0~3.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"pt"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestAstCaDeEnEtFiFyGlItJiNlSvSwUrYi(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "2~16", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ast", "ca", "de", "en", "et", "fi", "fy", "gl", "it", "ji", "nl", "sv", "sw", "ur", "yi"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestSi(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0", "0.1", "1.0", "0.00", "0.01", "1.00", "0.000", "0.001", "1.000", "0.0000", "0.0001", "1.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.2~0.9", "1.1~1.8", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"si"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestAkBhGuwLnMgNsoPaTiWa(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0", "1.0", "0.00", "1.00", "0.000", "1.000", "0.0000", "1.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ak", "bh", "guw", "ln", "mg", "nso", "pa", "ti", "wa"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestTzm(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1", "11~24"})
- tests = appendDecimalTests(tests, One, []string{"0.0", "1.0", "11.0", "12.0", "13.0", "14.0", "15.0", "16.0", "17.0", "18.0", "19.0", "20.0", "21.0", "22.0", "23.0", "24.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~10", "100~106", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"tzm"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestAfAsaAzBemBezBgBrxCeCggChrCkbDvEeElEoEsEuFoFurGswHaHawHuJgoJmcKaKajKcgKkKkjKlKsKsbKuKyLbLgMasMgoMlMnNahNbNdNeNnNnhNoNrNyNynOmOrOsPapPsRmRofRwkSaqSdhSehSnSoSqSsSsyStSyrTaTeTeoTigTkTnTrTsUgUzVeVoVunWaeXhXog(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "2~16", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~0.9", "1.1~1.6", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"af", "asa", "az", "bem", "bez", "bg", "brx", "ce", "cgg", "chr", "ckb", "dv", "ee", "el", "eo", "es", "eu", "fo", "fur", "gsw", "ha", "haw", "hu", "jgo", "jmc", "ka", "kaj", "kcg", "kk", "kkj", "kl", "ks", "ksb", "ku", "ky", "lb", "lg", "mas", "mgo", "ml", "mn", "nah", "nb", "nd", "ne", "nn", "nnh", "no", "nr", "ny", "nyn", "om", "or", "os", "pap", "ps", "rm", "rof", "rwk", "saq", "sdh", "seh", "sn", "so", "sq", "ss", "ssy", "st", "syr", "ta", "te", "teo", "tig", "tk", "tn", "tr", "ts", "ug", "uz", "ve", "vo", "vun", "wae", "xh", "xog"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestDa(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"0.1~1.6"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "2~16", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "2.0~3.4", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"da"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestIs(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"0.1~1.6", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "2~16", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "2.0", "3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"is"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestMk(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "11", "21", "31", "41", "51", "61", "71", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"0.1", "1.1", "2.1", "3.1", "4.1", "5.1", "6.1", "7.1", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "2~10", "12~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "0.2~1.0", "1.2~1.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"mk"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestFilTl(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0~3", "5", "7", "8", "10~13", "15", "17", "18", "20", "21", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, One, []string{"0.0~0.3", "0.5", "0.7", "0.8", "1.0~1.3", "1.5", "1.7", "1.8", "2.0", "2.1", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"4", "6", "9", "14", "16", "19", "24", "26", "104", "1004"})
- tests = appendDecimalTests(tests, Other, []string{"0.4", "0.6", "0.9", "1.4", "1.6", "1.9", "2.4", "2.6", "10.4", "100.4", "1000.4"})
-
- locales := []string{"fil", "tl"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestLvPrg(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Zero, []string{"0", "10~20", "30", "40", "50", "60", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Zero, []string{"0.0", "10.0", "11.0", "12.0", "13.0", "14.0", "15.0", "16.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"0.1", "1.0", "1.1", "2.1", "3.1", "4.1", "5.1", "6.1", "7.1", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~9", "22~29", "102", "1002"})
- tests = appendDecimalTests(tests, Other, []string{"0.2~0.9", "1.2~1.9", "10.2", "100.2", "1000.2"})
-
- locales := []string{"lv", "prg"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestLag(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Zero, []string{"0"})
- tests = appendDecimalTests(tests, Zero, []string{"0.0", "0.00", "0.000", "0.0000"})
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"0.1~1.6"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"2.0~3.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"lag"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestKsh(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Zero, []string{"0"})
- tests = appendDecimalTests(tests, Zero, []string{"0.0", "0.00", "0.000", "0.0000"})
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"2~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ksh"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestIuKwNaqSeSmaSmiSmjSmnSms(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Two, []string{"2"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "2.00", "2.000", "2.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "3~17", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~0.9", "1.1~1.6", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"iu", "kw", "naq", "se", "sma", "smi", "smj", "smn", "sms"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestShi(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"0", "1"})
- tests = appendDecimalTests(tests, One, []string{"0.0~1.0", "0.00~0.04"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~10"})
- tests = appendDecimalTests(tests, Few, []string{"2.0", "3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "2.00", "3.00", "4.00", "5.00", "6.00", "7.00", "8.00"})
-
- tests = appendIntegerTests(tests, Other, []string{"11~26", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"1.1~1.9", "2.1~2.7", "10.1", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"shi"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestMoRo(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
-
- tests = appendIntegerTests(tests, Few, []string{"0", "2~16", "101", "1001"})
- tests = appendDecimalTests(tests, Few, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"20~35", "100", "1000", "10000", "100000", "1000000"})
-
- locales := []string{"mo", "ro"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestBsHrShSr(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"0.1", "1.1", "2.1", "3.1", "4.1", "5.1", "6.1", "7.1", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~4", "22~24", "32~34", "42~44", "52~54", "62", "102", "1002"})
- tests = appendDecimalTests(tests, Few, []string{"0.2~0.4", "1.2~1.4", "2.2~2.4", "3.2~3.4", "4.2~4.4", "5.2", "10.2", "100.2", "1000.2"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "0.5~1.0", "1.5~2.0", "2.5~2.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"bs", "hr", "sh", "sr"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestGd(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "11"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "11.0", "1.00", "11.00", "1.000", "11.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Two, []string{"2", "12"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "12.0", "2.00", "12.00", "2.000", "12.000", "2.0000"})
-
- tests = appendIntegerTests(tests, Few, []string{"3~10", "13~19"})
- tests = appendDecimalTests(tests, Few, []string{"3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "13.0", "14.0", "15.0", "16.0", "17.0", "18.0", "19.0", "3.00"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "20~34", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~0.9", "1.1~1.6", "10.1", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"gd"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestSl(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "101", "201", "301", "401", "501", "601", "701", "1001"})
-
- tests = appendIntegerTests(tests, Two, []string{"2", "102", "202", "302", "402", "502", "602", "702", "1002"})
-
- tests = appendIntegerTests(tests, Few, []string{"3", "4", "103", "104", "203", "204", "303", "304", "403", "404", "503", "504", "603", "604", "703", "704", "1003"})
- tests = appendDecimalTests(tests, Few, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
-
- locales := []string{"sl"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestDsbHsb(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "101", "201", "301", "401", "501", "601", "701", "1001"})
- tests = appendDecimalTests(tests, One, []string{"0.1", "1.1", "2.1", "3.1", "4.1", "5.1", "6.1", "7.1", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Two, []string{"2", "102", "202", "302", "402", "502", "602", "702", "1002"})
- tests = appendDecimalTests(tests, Two, []string{"0.2", "1.2", "2.2", "3.2", "4.2", "5.2", "6.2", "7.2", "10.2", "100.2", "1000.2"})
-
- tests = appendIntegerTests(tests, Few, []string{"3", "4", "103", "104", "203", "204", "303", "304", "403", "404", "503", "504", "603", "604", "703", "704", "1003"})
- tests = appendDecimalTests(tests, Few, []string{"0.3", "0.4", "1.3", "1.4", "2.3", "2.4", "3.3", "3.4", "4.3", "4.4", "5.3", "5.4", "6.3", "6.4", "7.3", "7.4", "10.3", "100.3", "1000.3"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "0.5~1.0", "1.5~2.0", "2.5~2.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"dsb", "hsb"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestHeIw(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
-
- tests = appendIntegerTests(tests, Two, []string{"2"})
-
- tests = appendIntegerTests(tests, Many, []string{"20", "30", "40", "50", "60", "70", "80", "90", "100", "1000", "10000", "100000", "1000000"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "3~17", "101", "1001"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"he", "iw"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestCsSk(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~4"})
-
- tests = appendDecimalTests(tests, Many, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
-
- locales := []string{"cs", "sk"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestPl(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~4", "22~24", "32~34", "42~44", "52~54", "62", "102", "1002"})
-
- tests = appendIntegerTests(tests, Many, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
-
- tests = appendDecimalTests(tests, Other, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"pl"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestBe(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "21.0", "31.0", "41.0", "51.0", "61.0", "71.0", "81.0", "101.0", "1001.0"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~4", "22~24", "32~34", "42~44", "52~54", "62", "102", "1002"})
- tests = appendDecimalTests(tests, Few, []string{"2.0", "3.0", "4.0", "22.0", "23.0", "24.0", "32.0", "33.0", "102.0", "1002.0"})
-
- tests = appendIntegerTests(tests, Many, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Many, []string{"0.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "11.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.1", "100.1", "1000.1"})
-
- locales := []string{"be"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestLt(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "21.0", "31.0", "41.0", "51.0", "61.0", "71.0", "81.0", "101.0", "1001.0"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~9", "22~29", "102", "1002"})
- tests = appendDecimalTests(tests, Few, []string{"2.0", "3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "9.0", "22.0", "102.0", "1002.0"})
-
- tests = appendDecimalTests(tests, Many, []string{"0.1~0.9", "1.1~1.7", "10.1", "100.1", "1000.1"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "10~20", "30", "40", "50", "60", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0", "10.0", "11.0", "12.0", "13.0", "14.0", "15.0", "16.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"lt"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestMt(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Few, []string{"0", "2~10", "102~107", "1002"})
- tests = appendDecimalTests(tests, Few, []string{"0.0", "2.0", "3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "10.0", "102.0", "1002.0"})
-
- tests = appendIntegerTests(tests, Many, []string{"11~19", "111~117", "1011"})
- tests = appendDecimalTests(tests, Many, []string{"11.0", "12.0", "13.0", "14.0", "15.0", "16.0", "17.0", "18.0", "111.0", "1011.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"20~35", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.1", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"mt"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestRuUk(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "71", "81", "101", "1001"})
-
- tests = appendIntegerTests(tests, Few, []string{"2~4", "22~24", "32~34", "42~44", "52~54", "62", "102", "1002"})
-
- tests = appendIntegerTests(tests, Many, []string{"0", "5~19", "100", "1000", "10000", "100000", "1000000"})
-
- tests = appendDecimalTests(tests, Other, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ru", "uk"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestBr(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "21", "31", "41", "51", "61", "81", "101", "1001"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "21.0", "31.0", "41.0", "51.0", "61.0", "81.0", "101.0", "1001.0"})
-
- tests = appendIntegerTests(tests, Two, []string{"2", "22", "32", "42", "52", "62", "82", "102", "1002"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "22.0", "32.0", "42.0", "52.0", "62.0", "82.0", "102.0", "1002.0"})
-
- tests = appendIntegerTests(tests, Few, []string{"3", "4", "9", "23", "24", "29", "33", "34", "39", "43", "44", "49", "103", "1003"})
- tests = appendDecimalTests(tests, Few, []string{"3.0", "4.0", "9.0", "23.0", "24.0", "29.0", "33.0", "34.0", "103.0", "1003.0"})
-
- tests = appendIntegerTests(tests, Many, []string{"1000000"})
- tests = appendDecimalTests(tests, Many, []string{"1000000.0", "1000000.00", "1000000.000"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "5~8", "10~20", "100", "1000", "10000", "100000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~0.9", "1.1~1.6", "10.0", "100.0", "1000.0", "10000.0", "100000.0"})
-
- locales := []string{"br"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestGa(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Two, []string{"2"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "2.00", "2.000", "2.0000"})
-
- tests = appendIntegerTests(tests, Few, []string{"3~6"})
- tests = appendDecimalTests(tests, Few, []string{"3.0", "4.0", "5.0", "6.0", "3.00", "4.00", "5.00", "6.00", "3.000", "4.000", "5.000", "6.000", "3.0000", "4.0000", "5.0000", "6.0000"})
-
- tests = appendIntegerTests(tests, Many, []string{"7~10"})
- tests = appendDecimalTests(tests, Many, []string{"7.0", "8.0", "9.0", "10.0", "7.00", "8.00", "9.00", "10.00", "7.000", "8.000", "9.000", "10.000", "7.0000", "8.0000", "9.0000", "10.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"0", "11~25", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.0~0.9", "1.1~1.6", "10.1", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ga"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestGv(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, One, []string{"1", "11", "21", "31", "41", "51", "61", "71", "101", "1001"})
-
- tests = appendIntegerTests(tests, Two, []string{"2", "12", "22", "32", "42", "52", "62", "72", "102", "1002"})
-
- tests = appendIntegerTests(tests, Few, []string{"0", "20", "40", "60", "80", "100", "120", "140", "1000", "10000", "100000", "1000000"})
-
- tests = appendDecimalTests(tests, Many, []string{"0.0~1.5", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"3~10", "13~19", "23", "103", "1003"})
-
- locales := []string{"gv"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestArArs(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Zero, []string{"0"})
- tests = appendDecimalTests(tests, Zero, []string{"0.0", "0.00", "0.000", "0.0000"})
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Two, []string{"2"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "2.00", "2.000", "2.0000"})
-
- tests = appendIntegerTests(tests, Few, []string{"3~10", "103~110", "1003"})
- tests = appendDecimalTests(tests, Few, []string{"3.0", "4.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "103.0", "1003.0"})
-
- tests = appendIntegerTests(tests, Many, []string{"11~26", "111", "1011"})
- tests = appendDecimalTests(tests, Many, []string{"11.0", "12.0", "13.0", "14.0", "15.0", "16.0", "17.0", "18.0", "111.0", "1011.0"})
-
- tests = appendIntegerTests(tests, Other, []string{"100~102", "200~202", "300~302", "400~402", "500~502", "600", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.1", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"ar", "ars"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
-
-func TestCy(t *testing.T) {
- var tests []pluralTest
-
- tests = appendIntegerTests(tests, Zero, []string{"0"})
- tests = appendDecimalTests(tests, Zero, []string{"0.0", "0.00", "0.000", "0.0000"})
-
- tests = appendIntegerTests(tests, One, []string{"1"})
- tests = appendDecimalTests(tests, One, []string{"1.0", "1.00", "1.000", "1.0000"})
-
- tests = appendIntegerTests(tests, Two, []string{"2"})
- tests = appendDecimalTests(tests, Two, []string{"2.0", "2.00", "2.000", "2.0000"})
-
- tests = appendIntegerTests(tests, Few, []string{"3"})
- tests = appendDecimalTests(tests, Few, []string{"3.0", "3.00", "3.000", "3.0000"})
-
- tests = appendIntegerTests(tests, Many, []string{"6"})
- tests = appendDecimalTests(tests, Many, []string{"6.0", "6.00", "6.000", "6.0000"})
-
- tests = appendIntegerTests(tests, Other, []string{"4", "5", "7~20", "100", "1000", "10000", "100000", "1000000"})
- tests = appendDecimalTests(tests, Other, []string{"0.1~0.9", "1.1~1.7", "10.0", "100.0", "1000.0", "10000.0", "100000.0", "1000000.0"})
-
- locales := []string{"cy"}
- for _, locale := range locales {
- runTests(t, locale, tests)
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_test.go
deleted file mode 100644
index 51c1685ad..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/pluralspec_test.go
+++ /dev/null
@@ -1,716 +0,0 @@
-package language
-
-import (
- "fmt"
- "strconv"
- "strings"
- "testing"
-)
-
-const onePlusEpsilon = "1.00000000000000000000000000000001"
-
-func TestGetPluralSpec(t *testing.T) {
- tests := []struct {
- src string
- spec *PluralSpec
- }{
- {"pl", pluralSpecs["pl"]},
- {"en", pluralSpecs["en"]},
- {"en-US", pluralSpecs["en"]},
- {"en_US", pluralSpecs["en"]},
- {"en-GB", pluralSpecs["en"]},
- {"zh-CN", pluralSpecs["zh"]},
- {"zh-TW", pluralSpecs["zh"]},
- {"pt-BR", pluralSpecs["pt"]},
- {"pt_BR", pluralSpecs["pt"]},
- {"pt-PT", pluralSpecs["pt"]},
- {"pt_PT", pluralSpecs["pt"]},
- {"zh-Hans-CN", pluralSpecs["zh"]},
- {"zh-Hant-TW", pluralSpecs["zh"]},
- {"zh-CN", pluralSpecs["zh"]},
- {"zh-TW", pluralSpecs["zh"]},
- {"zh-Hans", pluralSpecs["zh"]},
- {"zh-Hant", pluralSpecs["zh"]},
- {"ko-KR", pluralSpecs["ko"]},
- {"ko_KR", pluralSpecs["ko"]},
- {"ko-KP", pluralSpecs["ko"]},
- {"ko_KP", pluralSpecs["ko"]},
- {"en-US-en-US", pluralSpecs["en"]},
- {"th", pluralSpecs["th"]},
- {"th-TH", pluralSpecs["th"]},
- {"hr", pluralSpecs["hr"]},
- {"bs", pluralSpecs["bs"]},
- {"sr", pluralSpecs["sr"]},
- {"ti", pluralSpecs["ti"]},
- {"vi", pluralSpecs["vi"]},
- {"vi-VN", pluralSpecs["vi"]},
- {"mk", pluralSpecs["mk"]},
- {"mk-MK", pluralSpecs["mk"]},
- {"lv", pluralSpecs["lv"]},
- {"lv-LV", pluralSpecs["lv"]},
- {".en-US..en-US.", nil},
- {"zh, en-gb;q=0.8, en;q=0.7", nil},
- {"zh,en-gb;q=0.8,en;q=0.7", nil},
- {"xx, en-gb;q=0.8, en;q=0.7", nil},
- {"xx,en-gb;q=0.8,en;q=0.7", nil},
- {"xx-YY,xx;q=0.8,en-US,en;q=0.8,de;q=0.6,nl;q=0.4", nil},
- {"/foo/es/en.json", nil},
- {"xx-Yyen-US", nil},
- {"en US", nil},
- {"", nil},
- {"-", nil},
- {"_", nil},
- {".", nil},
- {"-en", nil},
- {"_en", nil},
- {"-en-", nil},
- {"_en_", nil},
- {"xx", nil},
- }
- for _, test := range tests {
- spec := GetPluralSpec(test.src)
- if spec != test.spec {
- t.Errorf("getPluralSpec(%q) = %q expected %q", test.src, spec, test.spec)
- }
- }
-}
-
-type pluralTest struct {
- num interface{}
- plural Plural
-}
-
-func appendIntegerTests(tests []pluralTest, plural Plural, examples []string) []pluralTest {
- for _, ex := range expandExamples(examples) {
- i, err := strconv.ParseInt(ex, 10, 64)
- if err != nil {
- panic(err)
- }
- tests = append(tests, pluralTest{ex, plural}, pluralTest{i, plural})
- }
- return tests
-}
-
-func appendDecimalTests(tests []pluralTest, plural Plural, examples []string) []pluralTest {
- for _, ex := range expandExamples(examples) {
- tests = append(tests, pluralTest{ex, plural})
- }
- return tests
-}
-
-func expandExamples(examples []string) []string {
- var expanded []string
- for _, ex := range examples {
- if parts := strings.Split(ex, "~"); len(parts) == 2 {
- for ex := parts[0]; ; ex = increment(ex) {
- expanded = append(expanded, ex)
- if ex == parts[1] {
- break
- }
- }
- } else {
- expanded = append(expanded, ex)
- }
- }
- return expanded
-}
-
-func increment(dec string) string {
- runes := []rune(dec)
- carry := true
- for i := len(runes) - 1; carry && i >= 0; i-- {
- switch runes[i] {
- case '.':
- continue
- case '9':
- runes[i] = '0'
- default:
- runes[i]++
- carry = false
- }
- }
- if carry {
- runes = append([]rune{'1'}, runes...)
- }
- return string(runes)
-}
-
-//
-// Below here are tests that were manually written before tests were automatically generated.
-// These are kept around as sanity checks for our code generation.
-//
-
-func TestArabic(t *testing.T) {
- tests := []pluralTest{
- {0, Zero},
- {"0", Zero},
- {"0.0", Zero},
- {"0.00", Zero},
- {1, One},
- {"1", One},
- {"1.0", One},
- {"1.00", One},
- {onePlusEpsilon, Other},
- {2, Two},
- {"2", Two},
- {"2.0", Two},
- {"2.00", Two},
- {3, Few},
- {"3", Few},
- {"3.0", Few},
- {"3.00", Few},
- {10, Few},
- {"10", Few},
- {"10.0", Few},
- {"10.00", Few},
- {103, Few},
- {"103", Few},
- {"103.0", Few},
- {"103.00", Few},
- {110, Few},
- {"110", Few},
- {"110.0", Few},
- {"110.00", Few},
- {11, Many},
- {"11", Many},
- {"11.0", Many},
- {"11.00", Many},
- {99, Many},
- {"99", Many},
- {"99.0", Many},
- {"99.00", Many},
- {111, Many},
- {"111", Many},
- {"111.0", Many},
- {"111.00", Many},
- {199, Many},
- {"199", Many},
- {"199.0", Many},
- {"199.00", Many},
- {100, Other},
- {"100", Other},
- {"100.0", Other},
- {"100.00", Other},
- {102, Other},
- {"102", Other},
- {"102.0", Other},
- {"102.00", Other},
- {200, Other},
- {"200", Other},
- {"200.0", Other},
- {"200.00", Other},
- {202, Other},
- {"202", Other},
- {"202.0", Other},
- {"202.00", Other},
- }
- tests = appendFloatTests(tests, 0.1, 0.9, Other)
- tests = appendFloatTests(tests, 1.1, 1.9, Other)
- tests = appendFloatTests(tests, 2.1, 2.9, Other)
- tests = appendFloatTests(tests, 3.1, 3.9, Other)
- tests = appendFloatTests(tests, 4.1, 4.9, Other)
- runTests(t, "ar", tests)
-}
-
-func TestBelarusian(t *testing.T) {
- tests := []pluralTest{
- {0, Many},
- {1, One},
- {2, Few},
- {3, Few},
- {4, Few},
- {5, Many},
- {19, Many},
- {20, Many},
- {21, One},
- {11, Many},
- {52, Few},
- {101, One},
- {"0.1", Other},
- {"0.7", Other},
- {"1.5", Other},
- {"1.0", One},
- {onePlusEpsilon, Other},
- {"2.0", Few},
- {"10.0", Many},
- }
- runTests(t, "be", tests)
-}
-
-func TestBurmese(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "my", tests)
-}
-
-func TestCatalan(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {"0", Other},
- {1, One},
- {"1", One},
- {"1.0", Other},
- {onePlusEpsilon, Other},
- {2, Other},
- {"2", Other},
- }
- tests = appendIntTests(tests, 2, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "ca", tests)
-}
-
-func TestChinese(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "zh", tests)
-}
-
-func TestCzech(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {"0", Other},
- {1, One},
- {"1", One},
- {onePlusEpsilon, Many},
- {2, Few},
- {"2", Few},
- {3, Few},
- {"3", Few},
- {4, Few},
- {"4", Few},
- {5, Other},
- {"5", Other},
- }
- tests = appendFloatTests(tests, 0, 10, Many)
- runTests(t, "cs", tests)
-}
-
-func TestDanish(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, One},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.1, 1.9, One)
- tests = appendFloatTests(tests, 2.0, 10.0, Other)
- runTests(t, "da", tests)
-}
-
-func TestDutch(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 10.0, Other)
- runTests(t, "nl", tests)
-}
-
-func TestEnglish(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 10.0, Other)
- runTests(t, "en", tests)
-}
-
-func TestFrench(t *testing.T) {
- tests := []pluralTest{
- {0, One},
- {1, One},
- {onePlusEpsilon, One},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 1.9, One)
- tests = appendFloatTests(tests, 2.0, 10.0, Other)
- runTests(t, "fr", tests)
-}
-
-func TestGerman(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 10.0, Other)
- runTests(t, "de", tests)
-}
-
-func TestIcelandic(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {2, Other},
- {11, Other},
- {21, One},
- {111, Other},
- {"0.0", Other},
- {"0.1", One},
- {"2.0", Other},
- }
- runTests(t, "is", tests)
-}
-
-func TestIndonesian(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "id", tests)
-}
-
-func TestItalian(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 10.0, Other)
- runTests(t, "it", tests)
-}
-
-func TestKorean(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "ko", tests)
-}
-
-func TestLatvian(t *testing.T) {
- tests := []pluralTest{
- {0, Zero},
- {"0", Zero},
- {"0.1", One},
- {1, One},
- {"1", One},
- {onePlusEpsilon, One},
- {"10.0", Zero},
- {"10.1", One},
- {"10.2", Other},
- {21, One},
- }
- tests = appendFloatTests(tests, 0.2, 0.9, Other)
- tests = appendFloatTests(tests, 1.2, 1.9, Other)
- tests = appendIntTests(tests, 2, 9, Other)
- tests = appendIntTests(tests, 10, 20, Zero)
- tests = appendIntTests(tests, 22, 29, Other)
- runTests(t, "lv", tests)
-}
-
-func TestJapanese(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "ja", tests)
-}
-
-func TestLithuanian(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {2, Few},
- {3, Few},
- {9, Few},
- {10, Other},
- {11, Other},
- {"0.1", Many},
- {"0.7", Many},
- {"1.0", One},
- {onePlusEpsilon, Many},
- {"2.0", Few},
- {"10.0", Other},
- }
- runTests(t, "lt", tests)
-}
-
-func TestMalay(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "ms", tests)
-}
-
-func TestPolish(t *testing.T) {
- tests := []pluralTest{
- {0, Many},
- {1, One},
- {2, Few},
- {3, Few},
- {4, Few},
- {5, Many},
- {19, Many},
- {20, Many},
- {10, Many},
- {11, Many},
- {52, Few},
- {"0.1", Other},
- {"0.7", Other},
- {"1.5", Other},
- {"1.0", Other},
- {onePlusEpsilon, Other},
- {"2.0", Other},
- {"10.0", Other},
- }
- runTests(t, "pl", tests)
-}
-
-func TestPortuguese(t *testing.T) {
- tests := []pluralTest{
- {0, One},
- {"0.0", One},
- {1, One},
- {"1.0", One},
- {onePlusEpsilon, One},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0, 1.5, One)
- tests = appendFloatTests(tests, 2, 10.0, Other)
- runTests(t, "pt", tests)
-}
-
-func TestMacedonian(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {"1.1", One},
- {"2.1", One},
- {onePlusEpsilon, One},
- {2, Other},
- {"2.2", Other},
- {11, One},
- }
- runTests(t, "mk", tests)
-}
-
-func TestRussian(t *testing.T) {
- tests := []pluralTest{
- {0, Many},
- {1, One},
- {2, Few},
- {3, Few},
- {4, Few},
- {5, Many},
- {19, Many},
- {20, Many},
- {21, One},
- {11, Many},
- {52, Few},
- {101, One},
- {"0.1", Other},
- {"0.7", Other},
- {"1.5", Other},
- {"1.0", Other},
- {onePlusEpsilon, Other},
- {"2.0", Other},
- {"10.0", Other},
- }
- runTests(t, "ru", tests)
-}
-
-func TestSpanish(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {"1", One},
- {"1.0", One},
- {"1.00", One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 0.9, Other)
- tests = appendFloatTests(tests, 1.1, 10.0, Other)
- runTests(t, "es", tests)
-}
-
-func TestNorweigan(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {"1", One},
- {"1.0", One},
- {"1.00", One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 0.9, Other)
- tests = appendFloatTests(tests, 1.1, 10.0, Other)
- runTests(t, "no", tests)
-}
-
-func TestBulgarian(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {2, Other},
- {3, Other},
- {9, Other},
- {10, Other},
- {11, Other},
- {"0.1", Other},
- {"0.7", Other},
- {"1.0", One},
- {"1.001", Other},
- {onePlusEpsilon, Other},
- {"1.1", Other},
- {"2.0", Other},
- {"10.0", Other},
- }
- runTests(t, "bg", tests)
-}
-
-func TestSwedish(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {onePlusEpsilon, Other},
- {2, Other},
- }
- tests = appendFloatTests(tests, 0.0, 10.0, Other)
- runTests(t, "sv", tests)
-}
-
-func TestThai(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "th", tests)
-}
-
-func TestVietnamese(t *testing.T) {
- tests := appendIntTests(nil, 0, 10, Other)
- tests = appendFloatTests(tests, 0, 10, Other)
- runTests(t, "vi", tests)
-}
-
-func TestTurkish(t *testing.T) {
- tests := []pluralTest{
- {0, Other},
- {1, One},
- {"1", One},
- {"1.0", One},
- {"1.00", One},
- {"1.001", Other},
- {"1.100", Other},
- {"1.101", Other},
- {onePlusEpsilon, Other},
- {2, Other},
- {"0.7", Other},
- {"2.0", Other},
- }
- runTests(t, "tr", tests)
-}
-
-func TestUkrainian(t *testing.T) {
- tests := []pluralTest{
- {0, Many},
- {1, One},
- {2, Few},
- {3, Few},
- {4, Few},
- {5, Many},
- {19, Many},
- {20, Many},
- {21, One},
- {11, Many},
- {52, Few},
- {101, One},
- {"0.1", Other},
- {"0.7", Other},
- {"1.5", Other},
- {"1.0", Other},
- {onePlusEpsilon, Other},
- {"2.0", Other},
- {"10.0", Other},
- }
- runTests(t, "uk", tests)
-}
-
-func TestCroatian(t *testing.T) {
- tests := makeCroatianBosnianSerbianTests()
- runTests(t, "hr", tests)
-}
-
-func TestBosnian(t *testing.T) {
- tests := makeCroatianBosnianSerbianTests()
- runTests(t, "bs", tests)
-}
-
-func TestSerbian(t *testing.T) {
- tests := makeCroatianBosnianSerbianTests()
- runTests(t, "sr", tests)
-}
-
-func makeCroatianBosnianSerbianTests() []pluralTest {
- return []pluralTest{
- {1, One},
- {"0.1", One},
- {21, One},
- {101, One},
- {1001, One},
- {51, One},
- {"1.1", One},
- {"5.1", One},
- {"100.1", One},
- {"1000.1", One},
- {2, Few},
- {"0.2", Few},
- {22, Few},
- {"1.2", Few},
- {24, Few},
- {"2.4", Few},
- {102, Few},
- {"100.2", Few},
- {1002, Few},
- {"1000.2", Few},
- {5, Other},
- {"0.5", Other},
- {0, Other},
- {100, Other},
- {19, Other},
- {"0.0", Other},
- {"100.0", Other},
- {"1000.0", Other},
- }
-}
-
-func TestTigrinya(t *testing.T) {
- tests := []pluralTest{
- {0, One},
- {1, One},
- }
- tests = appendIntTests(tests, 2, 10, Other)
- tests = appendFloatTests(tests, 1.1, 10.0, Other)
- runTests(t, "ti", tests)
-}
-
-func appendIntTests(tests []pluralTest, from, to int, p Plural) []pluralTest {
- for i := from; i <= to; i++ {
- tests = append(tests, pluralTest{i, p})
- }
- return tests
-}
-
-func appendFloatTests(tests []pluralTest, from, to float64, p Plural) []pluralTest {
- stride := 0.1
- format := "%.1f"
- for f := from; f < to; f += stride {
- tests = append(tests, pluralTest{fmt.Sprintf(format, f), p})
- }
- tests = append(tests, pluralTest{fmt.Sprintf(format, to), p})
- return tests
-}
-
-func runTests(t *testing.T, pluralSpecID string, tests []pluralTest) {
- pluralSpecID = normalizePluralSpecID(pluralSpecID)
- if spec := pluralSpecs[pluralSpecID]; spec != nil {
- for _, test := range tests {
- if plural, err := spec.Plural(test.num); plural != test.plural {
- t.Errorf("%s: PluralCategory(%#v) returned %s, %v; expected %s", pluralSpecID, test.num, plural, err, test.plural)
- }
- }
- } else {
- t.Errorf("could not find plural spec for locale %s", pluralSpecID)
- }
-
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/plural_translation_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/translation/plural_translation_test.go
deleted file mode 100644
index ea7de7fd9..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/plural_translation_test.go
+++ /dev/null
@@ -1,308 +0,0 @@
-package translation
-
-import (
- "reflect"
- "testing"
-
- "github.com/nicksnyder/go-i18n/i18n/language"
-)
-
-func mustTemplate(t *testing.T, src string) *template {
- tmpl, err := newTemplate(src)
- if err != nil {
- t.Fatal(err)
- }
- return tmpl
-}
-
-func pluralTranslationFixture(t *testing.T, id string, pluralCategories ...language.Plural) *pluralTranslation {
- templates := make(map[language.Plural]*template, len(pluralCategories))
- for _, pc := range pluralCategories {
- templates[pc] = mustTemplate(t, string(pc))
- }
- return &pluralTranslation{id, templates}
-}
-
-func verifyDeepEqual(t *testing.T, actual, expected interface{}) {
- if !reflect.DeepEqual(actual, expected) {
- t.Fatalf("\n%#v\nnot equal to expected value\n%#v", actual, expected)
- }
-}
-
-func TestPluralTranslationMerge(t *testing.T) {
- pt := pluralTranslationFixture(t, "id", language.One, language.Other)
- oneTemplate, otherTemplate := pt.templates[language.One], pt.templates[language.Other]
-
- pt.Merge(pluralTranslationFixture(t, "id"))
- verifyDeepEqual(t, pt.templates, map[language.Plural]*template{
- language.One: oneTemplate,
- language.Other: otherTemplate,
- })
-
- pt2 := pluralTranslationFixture(t, "id", language.One, language.Two)
- pt.Merge(pt2)
- verifyDeepEqual(t, pt.templates, map[language.Plural]*template{
- language.One: pt2.templates[language.One],
- language.Two: pt2.templates[language.Two],
- language.Other: otherTemplate,
- })
-}
-
-/* Test implementations from old idea
-
-func TestCopy(t *testing.T) {
- ls := &LocalizedString{
- ID: "id",
- Translation: testingTemplate(t, "translation {{.Hello}}"),
- Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, "plural {{.One}}"),
- language.Other: testingTemplate(t, "plural {{.Other}}"),
- },
- }
-
- c := ls.Copy()
- delete(c.Translations, language.One)
- if _, ok := ls.Translations[language.One]; !ok {
- t.Errorf("deleting plural translation from copy deleted it from the original")
- }
- c.Translations[language.Two] = testingTemplate(t, "plural {{.Two}}")
- if _, ok := ls.Translations[language.Two]; ok {
- t.Errorf("adding plural translation to copy added it to the original")
- }
-}
-
-func TestNormalize(t *testing.T) {
- oneTemplate := testingTemplate(t, "one {{.One}}")
- ls := &LocalizedString{
- Translation: testingTemplate(t, "single {{.Single}}"),
- Translations: map[language.Plural]*template{
- language.One: oneTemplate,
- language.Two: testingTemplate(t, "two {{.Two}}"),
- },
- }
- ls.Normalize(LanguageWithCode("en"))
- if ls.Translation != nil {
- t.Errorf("ls.Translation is %#v; expected nil", ls.Translation)
- }
- if actual := ls.Translations[language.Two]; actual != nil {
- t.Errorf("ls.Translation[language.Two] is %#v; expected nil", actual)
- }
- if actual := ls.Translations[language.One]; actual != oneTemplate {
- t.Errorf("ls.Translations[language.One] is %#v; expected %#v", actual, oneTemplate)
- }
- if _, ok := ls.Translations[language.Other]; !ok {
- t.Errorf("ls.Translations[language.Other] shouldn't be empty")
- }
-}
-
-func TestMergeTranslation(t *testing.T) {
- ls := &LocalizedString{}
-
- translation := testingTemplate(t, "one {{.Hello}}")
- ls.Merge(&LocalizedString{
- Translation: translation,
- })
- if ls.Translation != translation {
- t.Errorf("expected %#v; got %#v", translation, ls.Translation)
- }
-
- ls.Merge(&LocalizedString{})
- if ls.Translation != translation {
- t.Errorf("expected %#v; got %#v", translation, ls.Translation)
- }
-
- translation = testingTemplate(t, "two {{.Hello}}")
- ls.Merge(&LocalizedString{
- Translation: translation,
- })
- if ls.Translation != translation {
- t.Errorf("expected %#v; got %#v", translation, ls.Translation)
- }
-}
-
-func TestMergeTranslations(t *testing.T) {
- ls := &LocalizedString{}
-
- oneTemplate := testingTemplate(t, "one {{.One}}")
- otherTemplate := testingTemplate(t, "other {{.Other}}")
- ls.Merge(&LocalizedString{
- Translations: map[language.Plural]*template{
- language.One: oneTemplate,
- language.Other: otherTemplate,
- },
- })
- if actual := ls.Translations[language.One]; actual != oneTemplate {
- t.Errorf("ls.Translations[language.One] expected %#v; got %#v", oneTemplate, actual)
- }
- if actual := ls.Translations[language.Other]; actual != otherTemplate {
- t.Errorf("ls.Translations[language.Other] expected %#v; got %#v", otherTemplate, actual)
- }
-
- ls.Merge(&LocalizedString{
- Translations: map[language.Plural]*template{},
- })
- if actual := ls.Translations[language.One]; actual != oneTemplate {
- t.Errorf("ls.Translations[language.One] expected %#v; got %#v", oneTemplate, actual)
- }
- if actual := ls.Translations[language.Other]; actual != otherTemplate {
- t.Errorf("ls.Translations[language.Other] expected %#v; got %#v", otherTemplate, actual)
- }
-
- twoTemplate := testingTemplate(t, "two {{.Two}}")
- otherTemplate = testingTemplate(t, "second other {{.Other}}")
- ls.Merge(&LocalizedString{
- Translations: map[language.Plural]*template{
- language.Two: twoTemplate,
- language.Other: otherTemplate,
- },
- })
- if actual := ls.Translations[language.One]; actual != oneTemplate {
- t.Errorf("ls.Translations[language.One] expected %#v; got %#v", oneTemplate, actual)
- }
- if actual := ls.Translations[language.Two]; actual != twoTemplate {
- t.Errorf("ls.Translations[language.Two] expected %#v; got %#v", twoTemplate, actual)
- }
- if actual := ls.Translations[language.Other]; actual != otherTemplate {
- t.Errorf("ls.Translations[language.Other] expected %#v; got %#v", otherTemplate, actual)
- }
-}
-
-func TestMissingTranslations(t *testing.T) {
- en := LanguageWithCode("en")
-
- tests := []struct {
- localizedString *LocalizedString
- language *Language
- expected bool
- }{
- {
- &LocalizedString{},
- en,
- true,
- },
- {
- &LocalizedString{Translation: testingTemplate(t, "single {{.Single}}")},
- en,
- false,
- },
- {
- &LocalizedString{
- Translation: testingTemplate(t, "single {{.Single}}"),
- Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, "one {{.One}}"),
- }},
- en,
- true,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, "one {{.One}}"),
- }},
- en,
- true,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: nil,
- language.Other: nil,
- }},
- en,
- true,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, ""),
- language.Other: testingTemplate(t, ""),
- }},
- en,
- true,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, "one {{.One}}"),
- language.Other: testingTemplate(t, "other {{.Other}}"),
- }},
- en,
- false,
- },
- }
-
- for _, tt := range tests {
- if actual := tt.localizedString.MissingTranslations(tt.language); actual != tt.expected {
- t.Errorf("expected %t got %t for %s, %#v",
- tt.expected, actual, tt.language.code, tt.localizedString)
- }
- }
-}
-
-func TestHasTranslations(t *testing.T) {
- en := LanguageWithCode("en")
-
- tests := []struct {
- localizedString *LocalizedString
- language *Language
- expected bool
- }{
- {
- &LocalizedString{},
- en,
- false,
- },
- {
- &LocalizedString{Translation: testingTemplate(t, "single {{.Single}}")},
- en,
- true,
- },
- {
- &LocalizedString{
- Translation: testingTemplate(t, "single {{.Single}}"),
- Translations: map[language.Plural]*template{}},
- en,
- false,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, "one {{.One}}"),
- }},
- en,
- true,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.Two: testingTemplate(t, "two {{.Two}}"),
- }},
- en,
- false,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: nil,
- }},
- en,
- false,
- },
- {
- &LocalizedString{Translations: map[language.Plural]*template{
- language.One: testingTemplate(t, ""),
- }},
- en,
- false,
- },
- }
-
- for _, tt := range tests {
- if actual := tt.localizedString.HasTranslations(tt.language); actual != tt.expected {
- t.Errorf("expected %t got %t for %s, %#v",
- tt.expected, actual, tt.language.code, tt.localizedString)
- }
- }
-}
-
-func testingTemplate(t *testing.T, src string) *template {
- tmpl, err := newTemplate(src)
- if err != nil {
- t.Fatal(err)
- }
- return tmpl
-}
-*/
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/template_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/translation/template_test.go
deleted file mode 100644
index 73a923404..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/template_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package translation
-
-import (
- "bytes"
- "fmt"
- //"launchpad.net/goyaml"
- "testing"
- gotemplate "text/template"
-)
-
-func TestNilTemplate(t *testing.T) {
- expected := "hello"
- tmpl := &template{
- tmpl: nil,
- src: expected,
- }
- if actual := tmpl.Execute(nil); actual != expected {
- t.Errorf("Execute(nil) returned %s; expected %s", actual, expected)
- }
-}
-
-func TestMarshalText(t *testing.T) {
- tmpl := &template{
- tmpl: gotemplate.Must(gotemplate.New("id").Parse("this is a {{.foo}} template")),
- src: "boom",
- }
- expectedBuf := []byte(tmpl.src)
- if buf, err := tmpl.MarshalText(); !bytes.Equal(buf, expectedBuf) || err != nil {
- t.Errorf("MarshalText() returned %#v, %#v; expected %#v, nil", buf, err, expectedBuf)
- }
-}
-
-func TestUnmarshalText(t *testing.T) {
- tmpl := &template{}
- tmpl.UnmarshalText([]byte("hello {{.World}}"))
- result := tmpl.Execute(map[string]string{
- "World": "world!",
- })
- expected := "hello world!"
- if result != expected {
- t.Errorf("expected %#v; got %#v", expected, result)
- }
-}
-
-/*
-func TestYAMLMarshal(t *testing.T) {
- src := "hello {{.World}}"
- tmpl, err := newTemplate(src)
- if err != nil {
- t.Fatal(err)
- }
- buf, err := goyaml.Marshal(tmpl)
- if err != nil {
- t.Fatal(err)
- }
- if !bytes.Equal(buf, []byte(src)) {
- t.Fatalf(`expected "%s"; got "%s"`, src, buf)
- }
-}
-
-func TestYAMLUnmarshal(t *testing.T) {
- buf := []byte(`Tmpl: "hello"`)
-
- var out struct {
- Tmpl *template
- }
- var foo map[string]string
- if err := goyaml.Unmarshal(buf, &foo); err != nil {
- t.Fatal(err)
- }
- if out.Tmpl == nil {
- t.Fatalf("out.Tmpl was nil")
- }
- if out.Tmpl.tmpl == nil {
- t.Fatalf("out.Tmpl.tmpl was nil")
- }
- if expected := "hello {{.World}}"; out.Tmpl.src != expected {
- t.Fatalf("expected %s; got %s", expected, out.Tmpl.src)
- }
-}
-
-func TestGetYAML(t *testing.T) {
- src := "hello"
- tmpl := &template{
- tmpl: nil,
- src: src,
- }
- if tag, value := tmpl.GetYAML(); tag != "" || value != src {
- t.Errorf("GetYAML() returned (%#v, %#v); expected (%#v, %#v)", tag, value, "", src)
- }
-}
-
-func TestSetYAML(t *testing.T) {
- tmpl := &template{}
- tmpl.SetYAML("tagDoesntMatter", "hello {{.World}}")
- result := tmpl.Execute(map[string]string{
- "World": "world!",
- })
- expected := "hello world!"
- if result != expected {
- t.Errorf("expected %#v; got %#v", expected, result)
- }
-}
-*/
-
-func BenchmarkExecuteNilTemplate(b *testing.B) {
- template := &template{src: "hello world"}
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- template.Execute(nil)
- }
-}
-
-func BenchmarkExecuteHelloWorldTemplate(b *testing.B) {
- template, err := newTemplate("hello world")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- template.Execute(nil)
- }
-}
-
-// Executing a simple template like this is ~6x slower than Sprintf
-// but it is still only a few microseconds which should be sufficiently fast.
-// The benefit is that we have nice semantic tags in the translation.
-func BenchmarkExecuteHelloNameTemplate(b *testing.B) {
- template, err := newTemplate("hello {{.Name}}")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- template.Execute(map[string]string{
- "Name": "Nick",
- })
- }
-}
-
-func BenchmarkSprintf(b *testing.B) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- fmt.Sprintf("hello %s", "nick")
- }
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/translation_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/translation/translation_test.go
deleted file mode 100644
index 7380d5a6f..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/translation/translation_test.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package translation
-
-import (
- "sort"
- "testing"
-)
-
-// Check this here to avoid unnecessary import of sort package.
-var _ = sort.Interface(make(SortableByID, 0, 0))
-
-func TestNewSingleTranslation(t *testing.T) {
- t.Skipf("not implemented")
-}
-
-func TestNewPluralTranslation(t *testing.T) {
- t.Skipf("not implemented")
-}
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/translations_test.go b/vendor/github.com/nicksnyder/go-i18n/i18n/translations_test.go
deleted file mode 100644
index 86c580833..000000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/translations_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package i18n
-
-import (
- "testing"
-
- "github.com/nicksnyder/go-i18n/i18n/bundle"
-)
-
-var bobMap = map[string]interface{}{"Person": "Bob"}
-var bobStruct = struct{ Person string }{Person: "Bob"}
-
-var testCases = []struct {
- id string
- arg interface{}
- want string
-}{
- {"program_greeting", nil, "Hello world"},
- {"person_greeting", bobMap, "Hello Bob"},
- {"person_greeting", bobStruct, "Hello Bob"},
-
- {"your_unread_email_count", 0, "You have 0 unread emails."},
- {"your_unread_email_count", 1, "You have 1 unread email."},
- {"your_unread_email_count", 2, "You have 2 unread emails."},
- {"my_height_in_meters", "1.7", "I am 1.7 meters tall."},
-
- {"person_unread_email_count", []interface{}{0, bobMap}, "Bob has 0 unread emails."},
- {"person_unread_email_count", []interface{}{1, bobMap}, "Bob has 1 unread email."},
- {"person_unread_email_count", []interface{}{2, bobMap}, "Bob has 2 unread emails."},
- {"person_unread_email_count", []interface{}{0, bobStruct}, "Bob has 0 unread emails."},
- {"person_unread_email_count", []interface{}{1, bobStruct}, "Bob has 1 unread email."},
- {"person_unread_email_count", []interface{}{2, bobStruct}, "Bob has 2 unread emails."},
-
- {"person_unread_email_count_timeframe", []interface{}{3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": "0 days",
- }}, "Bob has 3 unread emails in the past 0 days."},
- {"person_unread_email_count_timeframe", []interface{}{3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": "1 day",
- }}, "Bob has 3 unread emails in the past 1 day."},
- {"person_unread_email_count_timeframe", []interface{}{3, map[string]interface{}{
- "Person": "Bob",
- "Timeframe": "2 days",
- }}, "Bob has 3 unread emails in the past 2 days."},
-}
-
-func testFile(t *testing.T, path string) {
- b := bundle.New()
- b.MustLoadTranslationFile(path)
-
- T, err := b.Tfunc("en-US")
- if err != nil {
- t.Fatal(err)
- }
-
- for _, tc := range testCases {
- var args []interface{}
- if _, ok := tc.arg.([]interface{}); ok {
- args = tc.arg.([]interface{})
- } else {
- args = []interface{}{tc.arg}
- }
-
- got := T(tc.id, args...)
- if got != tc.want {
- t.Error("got: %v; want: %v", got, tc.want)
- }
- }
-}
-
-func TestJSONParse(t *testing.T) {
- testFile(t, "../goi18n/testdata/expected/en-us.all.json")
-}
-
-func TestYAMLParse(t *testing.T) {
- testFile(t, "../goi18n/testdata/en-us.yaml")
-}
-
-func TestJSONFlatParse(t *testing.T) {
- testFile(t, "../goi18n/testdata/en-us.flat.json")
-}
-
-func TestYAMLFlatParse(t *testing.T) {
- testFile(t, "../goi18n/testdata/en-us.flat.yaml")
-}
-
-func TestTOMLFlatParse(t *testing.T) {
- testFile(t, "../goi18n/testdata/en-us.flat.toml")
-}
diff --git a/vendor/github.com/olivere/elastic/.gitignore b/vendor/github.com/olivere/elastic/.gitignore
deleted file mode 100644
index 306ffbd83..000000000
--- a/vendor/github.com/olivere/elastic/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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
-
-/.vscode/
-/debug.test
-/generator
-/cluster-test/cluster-test
-/cluster-test/*.log
-/cluster-test/es-chaos-monkey
-/spec
-/tmp
-/CHANGELOG-3.0.html
-
diff --git a/vendor/github.com/olivere/elastic/.travis.yml b/vendor/github.com/olivere/elastic/.travis.yml
deleted file mode 100644
index 9658f873a..000000000
--- a/vendor/github.com/olivere/elastic/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: required
-language: go
-script: go test -race -v . ./config
-go:
- - 1.8.x
- - 1.9.x
- # - tip
-matrix:
- allow_failures:
- - go: tip
-services:
- - docker
-before_install:
- - sudo sysctl -w vm.max_map_count=262144
- - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.1 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
diff --git a/vendor/github.com/olivere/elastic/CHANGELOG-3.0.md b/vendor/github.com/olivere/elastic/CHANGELOG-3.0.md
deleted file mode 100644
index 07f3e66bf..000000000
--- a/vendor/github.com/olivere/elastic/CHANGELOG-3.0.md
+++ /dev/null
@@ -1,363 +0,0 @@
-# Elastic 3.0
-
-Elasticsearch 2.0 comes with some [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking-changes-2.0.html). You will probably need to upgrade your application and/or rewrite part of it due to those changes.
-
-We use that window of opportunity to also update Elastic (the Go client) from version 2.0 to 3.0. This will introduce both changes due to the Elasticsearch 2.0 update as well as changes that make Elastic cleaner by removing some old cruft.
-
-So, to summarize:
-
-1. Elastic 2.0 is compatible with Elasticsearch 1.7+ and is still actively maintained.
-2. Elastic 3.0 is compatible with Elasticsearch 2.0+ and will soon become the new master branch.
-
-The rest of the document is a list of all changes in Elastic 3.0.
-
-## Pointer types
-
-All types have changed to be pointer types, not value types. This not only is cleaner but also simplifies the API as illustrated by the following example:
-
-Example for Elastic 2.0 (old):
-
-```go
-q := elastic.NewMatchAllQuery()
-res, err := elastic.Search("one").Query(&q).Do() // notice the & here
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-q := elastic.NewMatchAllQuery()
-res, err := elastic.Search("one").Query(q).Do() // no more &
-// ... which can be simplified as:
-res, err := elastic.Search("one").Query(elastic.NewMatchAllQuery()).Do()
-```
-
-It also helps to prevent [subtle issues](https://github.com/olivere/elastic/issues/115#issuecomment-130753046).
-
-## Query/filter merge
-
-One of the biggest changes in Elasticsearch 2.0 is the [merge of queries and filters](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_queries_and_filters_merged). In Elasticsearch 1.x, you had a whole range of queries and filters that were basically identical (e.g. `term_query` and `term_filter`).
-
-The practical aspect of the merge is that you can now basically use queries where once you had to use filters instead. For Elastic 3.0 this means: We could remove a whole bunch of files. Yay!
-
-Notice that some methods still come by "filter", e.g. `PostFilter`. However, they accept a `Query` now when they used to accept a `Filter` before.
-
-Example for Elastic 2.0 (old):
-
-```go
-q := elastic.NewMatchAllQuery()
-f := elastic.NewTermFilter("tag", "important")
-res, err := elastic.Search().Index("one").Query(&q).PostFilter(f)
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-q := elastic.NewMatchAllQuery()
-f := elastic.NewTermQuery("tag", "important") // it's a query now!
-res, err := elastic.Search().Index("one").Query(q).PostFilter(f)
-```
-
-## Facets are removed
-
-[Facets have been removed](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_removed_features.html#_facets_have_been_removed) in Elasticsearch 2.0. You need to use aggregations now.
-
-## Errors
-
-Elasticsearch 2.0 returns more information about an error in the HTTP response body. Elastic 3.0 now reads this information and makes it accessible by the consumer.
-
-Errors and all its details are now returned in [`Error`](https://github.com/olivere/elastic/blob/release-branch.v3/errors.go#L59).
-
-### HTTP Status 404 (Not Found)
-
-When Elasticsearch does not find an entity or an index, it generally returns HTTP status code 404. In Elastic 2.0 this was a valid result and didn't raise an error from the `Do` functions. This has now changed in Elastic 3.0.
-
-Starting with Elastic 3.0, there are only two types of responses considered successful. First, responses with HTTP status codes [200..299]. Second, HEAD requests which return HTTP status 404. The latter is used by Elasticsearch to e.g. check for existence of indices or documents. All other responses will return an error.
-
-To check for HTTP Status 404 (with non-HEAD requests), e.g. when trying to get or delete a missing document, you can use the [`IsNotFound`](https://github.com/olivere/elastic/blob/release-branch.v3/errors.go#L84) helper (see below).
-
-The following example illustrates how to check for a missing document in Elastic 2.0 and what has changed in 3.0.
-
-Example for Elastic 2.0 (old):
-
-```go
-res, err = client.Get().Index("one").Type("tweet").Id("no-such-id").Do()
-if err != nil {
- // Something else went wrong (but 404 is NOT an error in Elastic 2.0)
-}
-if !res.Found {
- // Document has not been found
-}
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-res, err = client.Get().Index("one").Type("tweet").Id("no-such-id").Do()
-if err != nil {
- if elastic.IsNotFound(err) {
- // Document has not been found
- } else {
- // Something else went wrong
- }
-}
-```
-
-### HTTP Status 408 (Timeouts)
-
-Elasticsearch now responds with HTTP status code 408 (Timeout) when a request fails due to a timeout. E.g. if you specify a timeout with the Cluster Health API, the HTTP response status will be 408 if the timeout is raised. See [here](https://github.com/elastic/elasticsearch/commit/fe3179d9cccb569784434b2135ca9ae13d5158d3) for the specific commit to the Cluster Health API.
-
-To check for HTTP Status 408, we introduced the [`IsTimeout`](https://github.com/olivere/elastic/blob/release-branch.v3/errors.go#L101) helper.
-
-Example for Elastic 2.0 (old):
-
-```go
-health, err := client.ClusterHealth().WaitForStatus("yellow").Timeout("1s").Do()
-if err != nil {
- // ...
-}
-if health.TimedOut {
- // We have a timeout
-}
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-health, err := client.ClusterHealth().WaitForStatus("yellow").Timeout("1s").Do()
-if elastic.IsTimeout(err) {
- // We have a timeout
-}
-```
-
-### Bulk Errors
-
-The error response of a bulk operation used to be a simple string in Elasticsearch 1.x.
-In Elasticsearch 2.0, it returns a structured JSON object with a lot more details about the error.
-These errors are now captured in an object of type [`ErrorDetails`](https://github.com/olivere/elastic/blob/release-branch.v3/errors.go#L59) which is used in [`BulkResponseItem`](https://github.com/olivere/elastic/blob/release-branch.v3/bulk.go#L206).
-
-### Removed specific Elastic errors
-
-The specific error types `ErrMissingIndex`, `ErrMissingType`, and `ErrMissingId` have been removed. They were only used by `DeleteService` and are replaced by a generic error message.
-
-## Numeric types
-
-Elastic 3.0 has settled to use `float64` everywhere. It used to be a mix of `float32` and `float64` in Elastic 2.0. E.g. all boostable queries in Elastic 3.0 now have a boost type of `float64` where it used to be `float32`.
-
-## Pluralization
-
-Some services accept zero, one or more indices or types to operate on.
-E.g. in the `SearchService` accepts a list of zero, one, or more indices to
-search and therefor had a func called `Index(index string)` and a func
-called `Indices(indices ...string)`.
-
-Elastic 3.0 now only uses the singular form that, when applicable, accepts a
-variadic type. E.g. in the case of the `SearchService`, you now only have
-one func with the following signature: `Index(indices ...string)`.
-
-Notice this is only limited to `Index(...)` and `Type(...)`. There are other
-services with variadic functions. These have not been changed.
-
-## Multiple calls to variadic functions
-
-Some services with variadic functions have cleared the underlying slice when
-called while other services just add to the existing slice. This has now been
-normalized to always add to the underlying slice.
-
-Example for Elastic 2.0 (old):
-
-```go
-// Would only cleared scroll id "two"
-// because ScrollId cleared the values when called multiple times
-client.ClearScroll().ScrollId("one").ScrollId("two").Do()
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-// Now (correctly) clears both scroll id "one" and "two"
-// because ScrollId no longer clears the values when called multiple times
-client.ClearScroll().ScrollId("one").ScrollId("two").Do()
-```
-
-## Ping service requires URL
-
-The `Ping` service raised some issues because it is different from all
-other services. If not explicitly given a URL, it always pings `127.0.0.1:9200`.
-
-Users expected to ping the cluster, but that is not possible as the cluster
-can be a set of many nodes: So which node do we ping then?
-
-To make it more clear, the `Ping` function on the client now requires users
-to explicitly set the URL of the node to ping.
-
-## Meta fields
-
-Many of the meta fields e.g. `_parent` or `_routing` are now
-[part of the top-level of a document](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_mapping_changes.html#migration-meta-fields)
-and are no longer returned as parts of the `fields` object. We had to change
-larger parts of e.g. the `Reindexer` to get it to work seamlessly with Elasticsearch 2.0.
-
-Notice that all stored meta-fields are now [returned by default](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_crud_and_routing_changes.html#_all_stored_meta_fields_returned_by_default).
-
-## HasParentQuery / HasChildQuery
-
-`NewHasParentQuery` and `NewHasChildQuery` must now include both parent/child type and query. It is now in line with the Java API.
-
-Example for Elastic 2.0 (old):
-
-```go
-allQ := elastic.NewMatchAllQuery()
-q := elastic.NewHasChildFilter("tweet").Query(&allQ)
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-q := elastic.NewHasChildQuery("tweet", elastic.NewMatchAllQuery())
-```
-
-## SetBasicAuth client option
-
-You can now tell Elastic to pass HTTP Basic Auth credentials with each request. In previous versions of Elastic you had to set up your own `http.Transport` to do this. This should make it more convenient to use Elastic in combination with [Shield](https://www.elastic.co/products/shield) in its [basic setup](https://www.elastic.co/guide/en/shield/current/enable-basic-auth.html).
-
-Example:
-
-```go
-client, err := elastic.NewClient(elastic.SetBasicAuth("user", "secret"))
-if err != nil {
- log.Fatal(err)
-}
-```
-
-## Delete-by-Query API
-
-The Delete-by-Query API is [a plugin now](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_removed_features.html#_delete_by_query_is_now_a_plugin). It is no longer core part of Elasticsearch. You can [install it as a plugin as described here](https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/plugins-delete-by-query.html).
-
-Elastic 3.0 still contains the `DeleteByQueryService`, but you need to install the plugin first. If you don't install it and use `DeleteByQueryService` you will most probably get a 404.
-
-An older version of this document stated the following:
-
-> Elastic 3.0 still contains the `DeleteByQueryService` but it will fail with `ErrPluginNotFound` when the plugin is not installed.
->
-> Example for Elastic 3.0 (new):
->
-> ```go
-> _, err := client.DeleteByQuery().Query(elastic.NewTermQuery("client", "1")).Do()
-> if err == elastic.ErrPluginNotFound {
-> // Delete By Query API is not available
-> }
-> ```
-
-I have decided that this is not a good way to handle the case of a missing plugin. The main reason is that with this logic, you'd always have to check if the plugin is missing in case of an error. This is not only slow, but it also puts logic into a service where it should really be just opaque and return the response of Elasticsearch.
-
-If you rely on certain plugins to be installed, you should check on startup. That's where the following two helpers come into play.
-
-## HasPlugin and SetRequiredPlugins
-
-Some of the core functionality of Elasticsearch has now been moved into plugins. E.g. the Delete-by-Query API is [a plugin now](https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/plugins-delete-by-query.html).
-
-You need to make sure to add these plugins to your Elasticsearch installation to still be able to use the `DeleteByQueryService`. You can test this now with the `HasPlugin(name string)` helper in the client.
-
-Example for Elastic 3.0 (new):
-
-```go
-err, found := client.HasPlugin("delete-by-query")
-if err == nil && found {
- // ... Delete By Query API is available
-}
-```
-
-To simplify this process, there is now a `SetRequiredPlugins` helper that can be passed as an option func when creating a new client. If the plugin is not installed, the client wouldn't be created in the first place.
-
-```go
-// Will raise an error if the "delete-by-query" plugin is NOT installed
-client, err := elastic.NewClient(elastic.SetRequiredPlugins("delete-by-query"))
-if err != nil {
- log.Fatal(err)
-}
-```
-
-Notice that there also is a way to define [mandatory plugins](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-plugins.html#_mandatory_plugins) in the Elasticsearch configuration file.
-
-## Common Query has been renamed to Common Terms Query
-
-The `CommonQuery` has been renamed to `CommonTermsQuery` to be in line with the [Java API](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_java_api_changes.html#_query_filter_refactoring).
-
-## Remove `MoreLikeThis` and `MoreLikeThisField`
-
-The More Like This API and the More Like This Field query [have been removed](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_more_like_this) and replaced with the `MoreLikeThisQuery`.
-
-## Remove Filtered Query
-
-With the merge of queries and filters, the [filtered query became deprecated](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_literal_filtered_literal_query_and_literal_query_literal_filter_deprecated). While it is only deprecated and therefore still available in Elasticsearch 2.0, we have decided to remove it from Elastic 3.0. Why? Because we think that when you're already forced to rewrite many of your application code, it might be a good chance to get rid of things that are deprecated as well. So you might simply change your filtered query with a boolean query as [described here](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_literal_filtered_literal_query_and_literal_query_literal_filter_deprecated).
-
-## Remove FuzzyLikeThis and FuzzyLikeThisField
-
-Both have been removed from Elasticsearch 2.0 as well.
-
-## Remove LimitFilter
-
-The `limit` filter is [deprecated in Elasticsearch 2.0](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_literal_limit_literal_filter_deprecated) and becomes a no-op. Now is a good chance to remove it from your application as well. Use the `terminate_after` parameter in your search [as described here](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-body.html) to achieve similar effects.
-
-## Remove `_cache` and `_cache_key` from filters
-
-Both have been [removed from Elasticsearch 2.0 as well](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_query_dsl_changes.html#_filter_auto_caching).
-
-## Partial fields are gone
-
-Partial fields are [removed in Elasticsearch 2.0](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/_search_changes.html#_partial_fields) in favor of [source filtering](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-source-filtering.html).
-
-## Scripting
-
-A [`Script`](https://github.com/olivere/elastic/blob/release-branch.v3/script.go) type has been added to Elastic 3.0. In Elastic 2.0, there were various places (e.g. aggregations) where you could just add the script as a string, specify the scripting language, add parameters etc. With Elastic 3.0, you should now always use the `Script` type.
-
-Example for Elastic 2.0 (old):
-
-```go
-update, err := client.Update().Index("twitter").Type("tweet").Id("1").
- Script("ctx._source.retweets += num").
- ScriptParams(map[string]interface{}{"num": 1}).
- Upsert(map[string]interface{}{"retweets": 0}).
- Do()
-```
-
-Example for Elastic 3.0 (new):
-
-```go
-update, err := client.Update().Index("twitter").Type("tweet").Id("1").
- Script(elastic.NewScript("ctx._source.retweets += num").Param("num", 1)).
- Upsert(map[string]interface{}{"retweets": 0}).
- Do()
-```
-
-## Cluster State
-
-The combination of `Metric(string)` and `Metrics(...string)` has been replaced by a single func with the signature `Metric(...string)`.
-
-## Unexported structs in response
-
-Services generally return a typed response from a `Do` func. Those structs are exported so that they can be passed around in your own application. In Elastic 3.0 however, we changed that (most) sub-structs are now unexported, meaning: You can only pass around the whole response, not sub-structures of it. This makes it easier for restructuring responses according to the Elasticsearch API. See [`ClusterStateResponse`](https://github.com/olivere/elastic/blob/release-branch.v3/cluster_state.go#L182) as an example.
-
-## Add offset to Histogram aggregation
-
-Histogram aggregations now have an [offset](https://github.com/elastic/elasticsearch/pull/9505) option.
-
-## Services
-
-### REST API specification
-
-As you might know, Elasticsearch comes with a REST API specification. The specification describes the endpoints in a JSON structure.
-
-Most services in Elastic predated the REST API specification. We are in the process of bringing all these services in line with the specification. Services can be generated by `go generate` (not 100% automatic though). This is an ongoing process.
-
-This probably doesn't mean a lot to you. However, you can now be more confident that Elastic supports all features that the REST API specification describes.
-
-At the same time, the file names of the services are renamed to match the REST API specification naming.
-
-### REST API Test Suite
-
-The REST API specification of Elasticsearch comes along with a test suite that official clients typically use to test for conformance. Up until now, Elastic didn't run this test suite. However, we are in the process of setting up infrastructure and tests to match this suite as well.
-
-This process in not completed though.
-
-
diff --git a/vendor/github.com/olivere/elastic/CHANGELOG-5.0.md b/vendor/github.com/olivere/elastic/CHANGELOG-5.0.md
deleted file mode 100644
index 161c6a1ce..000000000
--- a/vendor/github.com/olivere/elastic/CHANGELOG-5.0.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# Changes in Elastic 5.0
-
-## Enforce context.Context in PerformRequest and Do
-
-We enforce the usage of `context.Context` everywhere you execute a request.
-You need to change all your `Do()` calls to pass a context: `Do(ctx)`.
-This enables automatic request cancelation and many other patterns.
-
-If you don't need this, simply pass `context.TODO()` or `context.Background()`.
-
-## Warmers removed
-
-Warmers are no longer necessary and have been [removed in ES 5.0](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_index_apis.html#_warmers).
-
-## Optimize removed
-
-Optimize was deprecated in ES 2.0 and has been [removed in ES 5.0](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_rest_api_changes.html#_literal__optimize_literal_endpoint_removed).
-Use [Force Merge](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) instead.
-
-## Missing Query removed
-
-The `missing` query has been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-exists-query.html#_literal_missing_literal_query).
-Use `exists` query with `must_not` in `bool` query instead.
-
-## And Query removed
-
-The `and` query has been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_search_changes.html#_deprecated_queries_removed).
-Use `must` clauses in a `bool` query instead.
-
-## Not Query removed
-
-TODO Is it removed?
-
-## Or Query removed
-
-The `or` query has been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_search_changes.html#_deprecated_queries_removed).
-Use `should` clauses in a `bool` query instead.
-
-## Filtered Query removed
-
-The `filtered` query has been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_search_changes.html#_deprecated_queries_removed).
-Use `bool` query instead, which supports `filter` clauses too.
-
-## Limit Query removed
-
-The `limit` query has been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_search_changes.html#_deprecated_queries_removed).
-Use the `terminate_after` parameter instead.
-
-# Template Query removed
-
-The `template` query has been [deprecated](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/query-dsl-template-query.html). You should use
-Search Templates instead.
-
-We remove it from Elastic 5.0 as the 5.0 update is already a good opportunity
-to get rid of old stuff.
-
-## `_timestamp` and `_ttl` removed
-
-Both of these fields were deprecated and are now [removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_mapping_changes.html#_literal__timestamp_literal_and_literal__ttl_literal).
-
-## Search template Put/Delete API returns `acknowledged` only
-
-The response type for Put/Delete search templates has changed.
-It only returns a single `acknowledged` flag now.
-
-## Fields has been renamed to Stored Fields
-
-The `fields` parameter has been renamed to `stored_fields`.
-See [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/breaking_50_search_changes.html#_literal_fields_literal_parameter).
-
-## Fielddatafields has been renamed to Docvaluefields
-
-The `fielddata_fields` parameter [has been renamed](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/breaking_50_search_changes.html#_literal_fielddata_fields_literal_parameter)
-to `docvalue_fields`.
-
-## Type exists endpoint changed
-
-The endpoint for checking whether a type exists has been changed from
-`HEAD {index}/{type}` to `HEAD {index}/_mapping/{type}`.
-See [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_rest_api_changes.html#_literal_head_index_type_literal_replaced_with_literal_head_index__mapping_type_literal).
-
-## Refresh parameter changed
-
-The `?refresh` parameter previously could be a boolean value. It indicated
-whether changes made by a request (e.g. by the Bulk API) should be immediately
-visible in search, or not. Using `refresh=true` had the positive effect of
-immediately seeing the changes when searching; the negative effect is that
-it is a rather big performance hit.
-
-With 5.0, you now have the choice between these 3 values.
-
-* `"true"` - Refresh immediately
-* `"false"` - Do not refresh (the default value)
-* `"wait_for"` - Wait until ES made the document visible in search
-
-See [?refresh](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-refresh.html) in the documentation.
-
-Notice that `true` and `false` (the boolean values) are no longer available
-now in Elastic. You must use a string instead, with one of the above values.
-
-## ReindexerService removed
-
-The `ReindexerService` was a custom solution that was started in the ES 1.x era
-to automate reindexing data, from one index to another or even between clusters.
-
-ES 2.3 introduced its own [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html)
-so we're going to remove our custom solution and ask you to use the native reindexer.
-
-The `ReindexService` is available via `client.Reindex()` (which used to point
-to the custom reindexer).
-
-## Delete By Query back in core
-
-The [Delete By Query API](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html)
-was moved into a plugin in 2.0. Now its back in core with a complete rewrite based on the Bulk API.
-
-It has it's own endpoint at `/_delete_by_query`.
-
-Delete By Query, Reindex, and Update By Query are very similar under the hood.
-
-## Reindex, Delete By Query, and Update By Query response changed
-
-The response from the above APIs changed a bit. E.g. the `retries` value
-used to be an `int64` and returns separate values for `bulk` and `search` now:
-
-```
-// Old
-{
- ...
- "retries": 123,
- ...
-}
-```
-
-```
-// New
-{
- ...
- "retries": {
- "bulk": 123,
- "search": 0
- },
- ...
-}
-```
-
-## ScanService removed
-
-The `ScanService` is removed. Use the (new) `ScrollService` instead.
-
-## New ScrollService
-
-There was confusion around `ScanService` and `ScrollService` doing basically
-the same. One was returning slices and didn't support all query details, the
-other returned one document after another and wasn't safe for concurrent use.
-So we merged the two and merged it into a new `ScrollService` that
-removes all the problems with the older services.
-
-In other words:
-If you used `ScanService`, switch to `ScrollService`.
-If you used the old `ScrollService`, you might need to fix some things but
-overall it should just work.
-
-Changes:
-- We replaced `elastic.EOS` with `io.EOF` to indicate the "end of scroll".
-
-TODO Not implemented yet
-
-## Suggesters
-
-They have been [completely rewritten in ES 5.0](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_suggester.html).
-
-Some changes:
-- Suggesters no longer have an [output](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_suggester.html#_simpler_completion_indexing).
-
-TODO Fix all structural changes in suggesters
-
-## Percolator
-
-Percolator has [changed considerably](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/breaking_50_percolator.html).
-
-Elastic 5.0 adds the new
-[Percolator Query](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/query-dsl-percolate-query.html)
-which can be used in combination with the new
-[Percolator type](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/percolator.html).
-
-The Percolate service is removed from Elastic 5.0.
-
-## Remove Consistency, add WaitForActiveShards
-
-The `consistency` parameter has been removed in a lot of places, e.g. the Bulk,
-Index, Delete, Delete-by-Query, Reindex, Update, and Update-by-Query API.
-
-It has been replaced by a somewhat similar `wait_for_active_shards` parameter.
-See https://github.com/elastic/elasticsearch/pull/19454.
diff --git a/vendor/github.com/olivere/elastic/CHANGELOG-6.0.md b/vendor/github.com/olivere/elastic/CHANGELOG-6.0.md
deleted file mode 100644
index 277925929..000000000
--- a/vendor/github.com/olivere/elastic/CHANGELOG-6.0.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Changes from 5.0 to 6.0
-
-See [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-6.0.html).
-
-## _all removed
-
-6.0 has removed support for the `_all` field.
-
-## Boolean values coerced
-
-Only use `true` or `false` for boolean values, not `0` or `1` or `on` or `off`.
-
-## Single Type Indices
-
-Notice that 6.0 and future versions will default to single type indices, i.e. you may not use multiple types when e.g. adding an index with a mapping.
-
-See [here for details](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html#_what_are_mapping_types).
-
diff --git a/vendor/github.com/olivere/elastic/CODE_OF_CONDUCT.md b/vendor/github.com/olivere/elastic/CODE_OF_CONDUCT.md
deleted file mode 100644
index acefecee5..000000000
--- a/vendor/github.com/olivere/elastic/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at oliver@eilhard.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/olivere/elastic/CONTRIBUTING.md b/vendor/github.com/olivere/elastic/CONTRIBUTING.md
deleted file mode 100644
index 4fbc79dd0..000000000
--- a/vendor/github.com/olivere/elastic/CONTRIBUTING.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# How to contribute
-
-Elastic is an open-source project and we are looking forward to each
-contribution.
-
-Notice that while the [official Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) is rather good, it is a high-level
-overview of the features of Elasticsearch. However, Elastic tries to resemble
-the Java API of Elasticsearch which you can find [on GitHub](https://github.com/elastic/elasticsearch).
-
-This explains why you might think that some options are strange or missing
-in Elastic, while often they're just different. Please check the Java API first.
-
-Having said that: Elasticsearch is moving fast and it might be very likely
-that we missed some features or changes. Feel free to change that.
-
-## Your Pull Request
-
-To make it easy to review and understand your changes, please keep the
-following things in mind before submitting your pull request:
-
-* You compared the existing implemenation with the Java API, did you?
-* Please work on the latest possible state of `olivere/elastic`.
- Use `release-branch.v2` for targeting Elasticsearch 1.x and
- `release-branch.v3` for targeting 2.x.
-* Create a branch dedicated to your change.
-* If possible, write a test case which confirms your change.
-* Make sure your changes and your tests work with all recent versions of
- Elasticsearch. We currently support Elasticsearch 1.7.x in the
- release-branch.v2 and Elasticsearch 2.x in the release-branch.v3.
-* Test your changes before creating a pull request (`go test ./...`).
-* Don't mix several features or bug fixes in one pull request.
-* Create a meaningful commit message.
-* Explain your change, e.g. provide a link to the issue you are fixing and
- probably a link to the Elasticsearch documentation and/or source code.
-* Format your source with `go fmt`.
-
-## Additional Resources
-
-* [GitHub documentation](http://help.github.com/)
-* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
diff --git a/vendor/github.com/olivere/elastic/CONTRIBUTORS b/vendor/github.com/olivere/elastic/CONTRIBUTORS
deleted file mode 100644
index ba06dac29..000000000
--- a/vendor/github.com/olivere/elastic/CONTRIBUTORS
+++ /dev/null
@@ -1,128 +0,0 @@
-# This is a list of people who have contributed code
-# to the Elastic repository.
-#
-# It is just my small "thank you" to all those that helped
-# making Elastic what it is.
-#
-# Please keep this list sorted.
-
-0x6875790d0a [@huydx](https://github.com/huydx)
-Adam Alix [@adamalix](https://github.com/adamalix)
-Adam Weiner [@adamweiner](https://github.com/adamweiner)
-Adrian Lungu [@AdrianLungu](https://github.com/AdrianLungu)
-alehano [@alehano](https://github.com/alehano)
-Alex [@akotlar](https://github.com/akotlar)
-Alexander Sack [@asac](https://github.com/asac)
-Alexandre Olivier [@aliphen](https://github.com/aliphen)
-Alexey Sharov [@nizsheanez](https://github.com/nizsheanez)
-AndreKR [@AndreKR](https://github.com/AndreKR)
-André Bierlein [@ligustah](https://github.com/ligustah)
-Andrew Dunham [@andrew-d](https://github.com/andrew-d)
-Andrew Gaul [@andrewgaul](https://github.com/andrewgaul)
-Andy Walker [@alaska](https://github.com/alaska)
-Arquivei [@arquivei](https://github.com/arquivei)
-arthurgustin [@arthurgustin](https://github.com/arthurgustin)
-Benjamin Fernandes [@LotharSee](https://github.com/LotharSee)
-Benjamin Zarzycki [@kf6nux](https://github.com/kf6nux)
-Braden Bassingthwaite [@bbassingthwaite-va](https://github.com/bbassingthwaite-va)
-Brady Love [@bradylove](https://github.com/bradylove)
-Bryan Conklin [@bmconklin](https://github.com/bmconklin)
-Bruce Zhou [@brucez-isell](https://github.com/brucez-isell)
-cforbes [@cforbes](https://github.com/cforbes)
-Chris M [@tebriel](https://github.com/tebriel)
-Chris Rice [@donutmonger](https://github.com/donutmonger)
-Claudiu Olteanu [@claudiuolteanu](https://github.com/claudiuolteanu)
-Christophe Courtaut [@kri5](https://github.com/kri5)
-Connor Peet [@connor4312](https://github.com/connor4312)
-Conrad Pankoff [@deoxxa](https://github.com/deoxxa)
-Corey Scott [@corsc](https://github.com/corsc)
-Daniel Barrett [@shendaras](https://github.com/shendaras)
-Daniel Heckrath [@DanielHeckrath](https://github.com/DanielHeckrath)
-Daniel Imfeld [@dimfeld](https://github.com/dimfeld)
-Dwayne Schultz [@myshkin5](https://github.com/myshkin5)
-Ellison Leão [@ellisonleao](https://github.com/ellisonleao)
-Erwin [@eticzon](https://github.com/eticzon)
-Eugene Egorov [@EugeneEgorov](https://github.com/EugeneEgorov)
-Evan Shaw [@edsrzf](https://github.com/edsrzf)
-Fanfan [@wenpos](https://github.com/wenpos)
-Faolan C-P [@fcheslack](https://github.com/fcheslack)
-Filip Tepper [@filiptepper](https://github.com/filiptepper)
-Gaylord Aulke [@blafasel42](https://github.com/blafasel42)
-Gerhard Häring [@ghaering](https://github.com/ghaering)
-Guilherme Silveira [@guilherme-santos](https://github.com/guilherme-santos)
-Guillaume J. Charmes [@creack](https://github.com/creack)
-Guiseppe [@gm42](https://github.com/gm42)
-Han Yu [@MoonighT](https://github.com/MoonighT)
-Harmen [@alicebob](https://github.com/alicebob)
-Harrison Wright [@wright8191](https://github.com/wright8191)
-Henry Clifford [@hcliff](https://github.com/hcliff)
-Igor Dubinskiy [@idubinskiy](https://github.com/idubinskiy)
-initialcontext [@initialcontext](https://github.com/initialcontext)
-Isaac Saldana [@isaldana](https://github.com/isaldana)
-Jack Lindamood [@cep21](https://github.com/cep21)
-Jacob [@jdelgad](https://github.com/jdelgad)
-Jayme Rotsaert [@jrots](https://github.com/jrots)
-Jeremy Canady [@jrmycanady](https://github.com/jrmycanady)
-Jim Berlage [@jimberlage](https://github.com/jimberlage)
-Joe Buck [@four2five](https://github.com/four2five)
-John Barker [@j16r](https://github.com/j16r)
-John Goodall [@jgoodall](https://github.com/jgoodall)
-John Stanford [@jxstanford](https://github.com/jxstanford)
-Jonas Groenaas Drange [@semafor](https://github.com/semafor)
-Josh Chorlton [@jchorl](https://github.com/jchorl)
-jun [@coseyo](https://github.com/coseyo)
-Junpei Tsuji [@jun06t](https://github.com/jun06t)
-kartlee [@kartlee](https://github.com/kartlee)
-Keith Hatton [@khatton-ft](https://github.com/khatton-ft)
-kel [@liketic](https://github.com/liketic)
-Kenta SUZUKI [@suzuken](https://github.com/suzuken)
-Kevin Mulvey [@kmulvey](https://github.com/kmulvey)
-Kyle Brandt [@kylebrandt](https://github.com/kylebrandt)
-Leandro Piccilli [@lpic10](https://github.com/lpic10)
-M. Zulfa Achsani [@misterciput](https://github.com/misterciput)
-Maciej Lisiewski [@c2h5oh](https://github.com/c2h5oh)
-Mara Kim [@autochthe](https://github.com/autochthe)
-Marcy Buccellato [@marcybuccellato](https://github.com/marcybuccellato)
-Mark Costello [@mcos](https://github.com/mcos)
-Martin Häger [@protomouse](https://github.com/protomouse)
-Medhi Bechina [@mdzor](https://github.com/mdzor)
-mnpritula [@mnpritula](https://github.com/mnpritula)
-mosa [@mosasiru](https://github.com/mosasiru)
-naimulhaider [@naimulhaider](https://github.com/naimulhaider)
-Naoya Yoshizawa [@azihsoyn](https://github.com/azihsoyn)
-navins [@ishare](https://github.com/ishare)
-Naoya Tsutsumi [@tutuming](https://github.com/tutuming)
-Nicholas Wolff [@nwolff](https://github.com/nwolff)
-Nick K [@utrack](https://github.com/utrack)
-Nick Whyte [@nickw444](https://github.com/nickw444)
-Nicolae Vartolomei [@nvartolomei](https://github.com/nvartolomei)
-Orne Brocaar [@brocaar](https://github.com/brocaar)
-Paul [@eyeamera](https://github.com/eyeamera)
-Pete C [@peteclark-ft](https://github.com/peteclark-ft)
-Radoslaw Wesolowski [r--w](https://github.com/r--w)
-Roman Colohanin [@zuzmic](https://github.com/zuzmic)
-Ryan Schmukler [@rschmukler](https://github.com/rschmukler)
-Ryan Wynn [@rwynn](https://github.com/rwynn)
-Sacheendra talluri [@sacheendra](https://github.com/sacheendra)
-Sean DuBois [@Sean-Der](https://github.com/Sean-Der)
-Shalin LK [@shalinlk](https://github.com/shalinlk)
-singham [@zhaochenxiao90](https://github.com/zhaochenxiao90)
-Stephen Kubovic [@stephenkubovic](https://github.com/stephenkubovic)
-Stuart Warren [@Woz](https://github.com/stuart-warren)
-Sulaiman [@salajlan](https://github.com/salajlan)
-Sundar [@sundarv85](https://github.com/sundarv85)
-Swarlston [@Swarlston](https://github.com/Swarlston)
-Take [ww24](https://github.com/ww24)
-Tetsuya Morimoto [@t2y](https://github.com/t2y)
-TimeEmit [@TimeEmit](https://github.com/timeemit)
-TusharM [@tusharm](https://github.com/tusharm)
-wangtuo [@wangtuo](https://github.com/wangtuo)
-Wédney Yuri [@wedneyyuri](https://github.com/wedneyyuri)
-wolfkdy [@wolfkdy](https://github.com/wolfkdy)
-Wyndham Blanton [@wyndhblb](https://github.com/wyndhblb)
-Yarden Bar [@ayashjorden](https://github.com/ayashjorden)
-zakthomas [@zakthomas](https://github.com/zakthomas)
-Yuya Kusakabe [@higebu](https://github.com/higebu)
-Zach [@snowzach](https://github.com/snowzach)
-zhangxin [@visaxin](https://github.com/visaxin)
-@æž— [@zplzpl](https://github.com/zplzpl)
diff --git a/vendor/github.com/olivere/elastic/ISSUE_TEMPLATE.md b/vendor/github.com/olivere/elastic/ISSUE_TEMPLATE.md
deleted file mode 100644
index 88d66cc83..000000000
--- a/vendor/github.com/olivere/elastic/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Please use the following questions as a guideline to help me answer
-your issue/question without further inquiry. Thank you.
-
-### Which version of Elastic are you using?
-
-[ ] elastic.v2 (for Elasticsearch 1.x)
-[ ] elastic.v3 (for Elasticsearch 2.x)
-[ ] elastic.v5 (for Elasticsearch 5.x)
-[ ] elastic.v6 (for Elasticsearch 6.x)
-
-### Please describe the expected behavior
-
-
-### Please describe the actual behavior
-
-
-### Any steps to reproduce the behavior?
-
diff --git a/vendor/github.com/olivere/elastic/README.md b/vendor/github.com/olivere/elastic/README.md
deleted file mode 100644
index d0cdd7821..000000000
--- a/vendor/github.com/olivere/elastic/README.md
+++ /dev/null
@@ -1,393 +0,0 @@
-# Elastic
-
-**This is a development branch that is actively being worked on. DO NOT USE IN PRODUCTION!**
-
-Elastic is an [Elasticsearch](http://www.elasticsearch.org/) client for the
-[Go](http://www.golang.org/) programming language.
-
-[![Build Status](https://travis-ci.org/olivere/elastic.svg?branch=release-branch.v6)](https://travis-ci.org/olivere/elastic)
-[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](http://godoc.org/github.com/olivere/elastic)
-[![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/olivere/elastic/master/LICENSE)
-
-See the [wiki](https://github.com/olivere/elastic/wiki) for additional information about Elastic.
-
-
-## Releases
-
-**The release branches (e.g. [`release-branch.v6`](https://github.com/olivere/elastic/tree/release-branch.v6))
-are actively being worked on and can break at any time.
-If you want to use stable versions of Elastic, please use a dependency manager like [dep](https://github.com/golang/dep).**
-
-Here's the version matrix:
-
-Elasticsearch version | Elastic version | Package URL | Remarks |
-----------------------|------------------|-------------|---------|
-6.x                   | 6.0             | [`github.com/olivere/elastic`](https://github.com/olivere/elastic) ([source](https://github.com/olivere/elastic/tree/release-branch.v6) [doc](http://godoc.org/github.com/olivere/elastic)) | Use a dependency manager (see below).
-5.x | 5.0 | [`gopkg.in/olivere/elastic.v5`](https://gopkg.in/olivere/elastic.v5) ([source](https://github.com/olivere/elastic/tree/release-branch.v5) [doc](http://godoc.org/gopkg.in/olivere/elastic.v5)) | Actively maintained.
-2.x | 3.0 | [`gopkg.in/olivere/elastic.v3`](https://gopkg.in/olivere/elastic.v3) ([source](https://github.com/olivere/elastic/tree/release-branch.v3) [doc](http://godoc.org/gopkg.in/olivere/elastic.v3)) | Deprecated. Please update.
-1.x | 2.0 | [`gopkg.in/olivere/elastic.v2`](https://gopkg.in/olivere/elastic.v2) ([source](https://github.com/olivere/elastic/tree/release-branch.v2) [doc](http://godoc.org/gopkg.in/olivere/elastic.v2)) | Deprecated. Please update.
-0.9-1.3 | 1.0 | [`gopkg.in/olivere/elastic.v1`](https://gopkg.in/olivere/elastic.v1) ([source](https://github.com/olivere/elastic/tree/release-branch.v1) [doc](http://godoc.org/gopkg.in/olivere/elastic.v1)) | Deprecated. Please update.
-
-**Example:**
-
-You have installed Elasticsearch 6.0.0 and want to use Elastic.
-As listed above, you should use Elastic 6.0.
-
-To use the required version of Elastic in your application, it is strongly
-advised to use a tool like
-[dep](https://github.com/golang/dep)
-or
-[Glide](https://glide.sh/)
-to manage that dependency. Make sure to use a version such as `^6.0.0`.
-
-To use Elastic, simply import:
-
-```go
-import "github.com/olivere/elastic"
-```
-
-### Elastic 6.0
-
-Elastic 6.0 targets Elasticsearch 6.x which was [released on 14th November 2017](https://www.elastic.co/blog/elasticsearch-6-0-0-released).
-
-Notice that there are will be a lot of [breaking changes in Elasticsearch 6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking-changes-6.0.html)
-and we used this as an opportunity to [clean up and refactor Elastic](https://github.com/olivere/elastic/blob/release-branch.v6/CHANGELOG-6.0.md)
-as we did in the transition from earlier versions of Elastic.
-
-### Elastic 5.0
-
-Elastic 5.0 targets Elasticsearch 5.0.0 and later. Elasticsearch 5.0.0 was
-[released on 26th October 2016](https://www.elastic.co/blog/elasticsearch-5-0-0-released).
-
-Notice that there are will be a lot of [breaking changes in Elasticsearch 5.0](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking-changes-5.0.html)
-and we used this as an opportunity to [clean up and refactor Elastic](https://github.com/olivere/elastic/blob/release-branch.v5/CHANGELOG-5.0.md)
-as we did in the transition from Elastic 2.0 (for Elasticsearch 1.x) to Elastic 3.0 (for Elasticsearch 2.x).
-
-Furthermore, the jump in version numbers will give us a chance to be in sync with the Elastic Stack.
-
-### Elastic 3.0
-
-Elastic 3.0 targets Elasticsearch 2.x and is published via [`gopkg.in/olivere/elastic.v3`](https://gopkg.in/olivere/elastic.v3).
-
-Elastic 3.0 will only get critical bug fixes. You should update to a recent version.
-
-### Elastic 2.0
-
-Elastic 2.0 targets Elasticsearch 1.x and is published via [`gopkg.in/olivere/elastic.v2`](https://gopkg.in/olivere/elastic.v2).
-
-Elastic 2.0 will only get critical bug fixes. You should update to a recent version.
-
-### Elastic 1.0
-
-Elastic 1.0 is deprecated. You should really update Elasticsearch and Elastic
-to a recent version.
-
-However, if you cannot update for some reason, don't worry. Version 1.0 is
-still available. All you need to do is go-get it and change your import path
-as described above.
-
-
-## Status
-
-We use Elastic in production since 2012. Elastic is stable but the API changes
-now and then. We strive for API compatibility.
-However, Elasticsearch sometimes introduces [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes.html)
-and we sometimes have to adapt.
-
-Having said that, there have been no big API changes that required you
-to rewrite your application big time. More often than not it's renaming APIs
-and adding/removing features so that Elastic is in sync with Elasticsearch.
-
-Elastic has been used in production with the following Elasticsearch versions:
-0.90, 1.0-1.7, and 2.0-2.4.1. Furthermore, we use [Travis CI](https://travis-ci.org/)
-to test Elastic with the most recent versions of Elasticsearch and Go.
-See the [.travis.yml](https://github.com/olivere/elastic/blob/master/.travis.yml)
-file for the exact matrix and [Travis](https://travis-ci.org/olivere/elastic)
-for the results.
-
-Elasticsearch has quite a few features. Most of them are implemented
-by Elastic. I add features and APIs as required. It's straightforward
-to implement missing pieces. I'm accepting pull requests :-)
-
-Having said that, I hope you find the project useful.
-
-
-## Getting Started
-
-The first thing you do is to create a [Client](https://github.com/olivere/elastic/blob/master/client.go).
-The client connects to Elasticsearch on `http://127.0.0.1:9200` by default.
-
-You typically create one client for your app. Here's a complete example of
-creating a client, creating an index, adding a document, executing a search etc.
-
-An example is available [here](https://olivere.github.io/elastic/).
-
-Here's a [link to a complete working example for v3](https://gist.github.com/olivere/114347ff9d9cfdca7bdc0ecea8b82263).
-
-See the [wiki](https://github.com/olivere/elastic/wiki) for more details.
-
-
-## API Status
-
-### Document APIs
-
-- [x] Index API
-- [x] Get API
-- [x] Delete API
-- [x] Delete By Query API
-- [x] Update API
-- [x] Update By Query API
-- [x] Multi Get API
-- [x] Bulk API
-- [x] Reindex API
-- [x] Term Vectors
-- [x] Multi termvectors API
-
-### Search APIs
-
-- [x] Search
-- [x] Search Template
-- [ ] Multi Search Template
-- [ ] Search Shards API
-- [x] Suggesters
- - [x] Term Suggester
- - [x] Phrase Suggester
- - [x] Completion Suggester
- - [x] Context Suggester
-- [x] Multi Search API
-- [x] Count API
-- [ ] Validate API
-- [x] Explain API
-- [x] Profile API
-- [x] Field Capabilities API
-
-### Aggregations
-
-- Metrics Aggregations
- - [x] Avg
- - [x] Cardinality
- - [x] Extended Stats
- - [x] Geo Bounds
- - [ ] Geo Centroid
- - [x] Max
- - [x] Min
- - [x] Percentiles
- - [x] Percentile Ranks
- - [ ] Scripted Metric
- - [x] Stats
- - [x] Sum
- - [x] Top Hits
- - [x] Value Count
-- Bucket Aggregations
- - [ ] Adjacency Matrix
- - [x] Children
- - [x] Date Histogram
- - [x] Date Range
- - [ ] Diversified Sampler
- - [x] Filter
- - [x] Filters
- - [x] Geo Distance
- - [ ] GeoHash Grid
- - [x] Global
- - [x] Histogram
- - [x] IP Range
- - [x] Missing
- - [x] Nested
- - [x] Range
- - [x] Reverse Nested
- - [x] Sampler
- - [x] Significant Terms
- - [x] Significant Text
- - [x] Terms
- - [x] Composite
-- Pipeline Aggregations
- - [x] Avg Bucket
- - [x] Derivative
- - [x] Max Bucket
- - [x] Min Bucket
- - [x] Sum Bucket
- - [x] Stats Bucket
- - [ ] Extended Stats Bucket
- - [x] Percentiles Bucket
- - [x] Moving Average
- - [x] Cumulative Sum
- - [x] Bucket Script
- - [x] Bucket Selector
- - [ ] Bucket Sort
- - [x] Serial Differencing
-- [x] Matrix Aggregations
- - [x] Matrix Stats
-- [x] Aggregation Metadata
-
-### Indices APIs
-
-- [x] Create Index
-- [x] Delete Index
-- [x] Get Index
-- [x] Indices Exists
-- [x] Open / Close Index
-- [x] Shrink Index
-- [x] Rollover Index
-- [x] Put Mapping
-- [x] Get Mapping
-- [x] Get Field Mapping
-- [x] Types Exists
-- [x] Index Aliases
-- [x] Update Indices Settings
-- [x] Get Settings
-- [x] Analyze
- - [x] Explain Analyze
-- [x] Index Templates
-- [x] Indices Stats
-- [x] Indices Segments
-- [ ] Indices Recovery
-- [ ] Indices Shard Stores
-- [ ] Clear Cache
-- [x] Flush
- - [x] Synced Flush
-- [x] Refresh
-- [x] Force Merge
-
-### cat APIs
-
-The cat APIs are not implemented as of now. We think they are better suited for operating with Elasticsearch on the command line.
-
-- [ ] cat aliases
-- [ ] cat allocation
-- [ ] cat count
-- [ ] cat fielddata
-- [ ] cat health
-- [ ] cat indices
-- [ ] cat master
-- [ ] cat nodeattrs
-- [ ] cat nodes
-- [ ] cat pending tasks
-- [ ] cat plugins
-- [ ] cat recovery
-- [ ] cat repositories
-- [ ] cat thread pool
-- [ ] cat shards
-- [ ] cat segments
-- [ ] cat snapshots
-- [ ] cat templates
-
-### Cluster APIs
-
-- [x] Cluster Health
-- [x] Cluster State
-- [x] Cluster Stats
-- [ ] Pending Cluster Tasks
-- [ ] Cluster Reroute
-- [ ] Cluster Update Settings
-- [x] Nodes Stats
-- [x] Nodes Info
-- [ ] Nodes Feature Usage
-- [ ] Remote Cluster Info
-- [x] Task Management API
-- [ ] Nodes hot_threads
-- [ ] Cluster Allocation Explain API
-
-### Query DSL
-
-- [x] Match All Query
-- [x] Inner hits
-- Full text queries
- - [x] Match Query
- - [x] Match Phrase Query
- - [x] Match Phrase Prefix Query
- - [x] Multi Match Query
- - [x] Common Terms Query
- - [x] Query String Query
- - [x] Simple Query String Query
-- Term level queries
- - [x] Term Query
- - [x] Terms Query
- - [x] Terms Set Query
- - [x] Range Query
- - [x] Exists Query
- - [x] Prefix Query
- - [x] Wildcard Query
- - [x] Regexp Query
- - [x] Fuzzy Query
- - [x] Type Query
- - [x] Ids Query
-- Compound queries
- - [x] Constant Score Query
- - [x] Bool Query
- - [x] Dis Max Query
- - [x] Function Score Query
- - [x] Boosting Query
-- Joining queries
- - [x] Nested Query
- - [x] Has Child Query
- - [x] Has Parent Query
- - [x] Parent Id Query
-- Geo queries
- - [ ] GeoShape Query
- - [x] Geo Bounding Box Query
- - [x] Geo Distance Query
- - [x] Geo Polygon Query
-- Specialized queries
- - [x] More Like This Query
- - [x] Script Query
- - [x] Percolate Query
-- Span queries
- - [ ] Span Term Query
- - [ ] Span Multi Term Query
- - [ ] Span First Query
- - [ ] Span Near Query
- - [ ] Span Or Query
- - [ ] Span Not Query
- - [ ] Span Containing Query
- - [ ] Span Within Query
- - [ ] Span Field Masking Query
-- [ ] Minimum Should Match
-- [ ] Multi Term Query Rewrite
-
-### Modules
-
-- Snapshot and Restore
- - [x] Repositories
- - [x] Snapshot
- - [ ] Restore
- - [ ] Snapshot status
- - [ ] Monitoring snapshot/restore status
- - [ ] Stopping currently running snapshot and restore
-
-### Sorting
-
-- [x] Sort by score
-- [x] Sort by field
-- [x] Sort by geo distance
-- [x] Sort by script
-- [x] Sort by doc
-
-### Scrolling
-
-Scrolling is supported via a `ScrollService`. It supports an iterator-like interface.
-The `ClearScroll` API is implemented as well.
-
-A pattern for [efficiently scrolling in parallel](https://github.com/olivere/elastic/wiki/ScrollParallel)
-is described in the [Wiki](https://github.com/olivere/elastic/wiki).
-
-## How to contribute
-
-Read [the contribution guidelines](https://github.com/olivere/elastic/blob/master/CONTRIBUTING.md).
-
-## Credits
-
-Thanks a lot for the great folks working hard on
-[Elasticsearch](https://www.elastic.co/products/elasticsearch)
-and
-[Go](https://golang.org/).
-
-Elastic uses portions of the
-[uritemplates](https://github.com/jtacoma/uritemplates) library
-by Joshua Tacoma,
-[backoff](https://github.com/cenkalti/backoff) by Cenk Altı and
-[leaktest](https://github.com/fortytw2/leaktest) by Ian Chiles.
-
-## LICENSE
-
-MIT-LICENSE. See [LICENSE](http://olivere.mit-license.org/)
-or the LICENSE file provided in the repository for details.
diff --git a/vendor/github.com/olivere/elastic/acknowledged_response.go b/vendor/github.com/olivere/elastic/acknowledged_response.go
deleted file mode 100644
index 2045ab85e..000000000
--- a/vendor/github.com/olivere/elastic/acknowledged_response.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// AcknowledgedResponse is returned from various APIs. It simply indicates
-// whether the operation is ack'd or not.
-type AcknowledgedResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/backoff.go b/vendor/github.com/olivere/elastic/backoff.go
deleted file mode 100644
index 736959f6d..000000000
--- a/vendor/github.com/olivere/elastic/backoff.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "math"
- "math/rand"
- "sync"
- "time"
-)
-
-// BackoffFunc specifies the signature of a function that returns the
-// time to wait before the next call to a resource. To stop retrying
-// return false in the 2nd return value.
-type BackoffFunc func(retry int) (time.Duration, bool)
-
-// Backoff allows callers to implement their own Backoff strategy.
-type Backoff interface {
- // Next implements a BackoffFunc.
- Next(retry int) (time.Duration, bool)
-}
-
-// -- ZeroBackoff --
-
-// ZeroBackoff is a fixed backoff policy whose backoff time is always zero,
-// meaning that the operation is retried immediately without waiting,
-// indefinitely.
-type ZeroBackoff struct{}
-
-// Next implements BackoffFunc for ZeroBackoff.
-func (b ZeroBackoff) Next(retry int) (time.Duration, bool) {
- return 0, true
-}
-
-// -- StopBackoff --
-
-// StopBackoff is a fixed backoff policy that always returns false for
-// Next(), meaning that the operation should never be retried.
-type StopBackoff struct{}
-
-// Next implements BackoffFunc for StopBackoff.
-func (b StopBackoff) Next(retry int) (time.Duration, bool) {
- return 0, false
-}
-
-// -- ConstantBackoff --
-
-// ConstantBackoff is a backoff policy that always returns the same delay.
-type ConstantBackoff struct {
- interval time.Duration
-}
-
-// NewConstantBackoff returns a new ConstantBackoff.
-func NewConstantBackoff(interval time.Duration) *ConstantBackoff {
- return &ConstantBackoff{interval: interval}
-}
-
-// Next implements BackoffFunc for ConstantBackoff.
-func (b *ConstantBackoff) Next(retry int) (time.Duration, bool) {
- return b.interval, true
-}
-
-// -- Exponential --
-
-// ExponentialBackoff implements the simple exponential backoff described by
-// Douglas Thain at http://dthain.blogspot.de/2009/02/exponential-backoff-in-distributed.html.
-type ExponentialBackoff struct {
- t float64 // initial timeout (in msec)
- f float64 // exponential factor (e.g. 2)
- m float64 // maximum timeout (in msec)
-}
-
-// NewExponentialBackoff returns a ExponentialBackoff backoff policy.
-// Use initialTimeout to set the first/minimal interval
-// and maxTimeout to set the maximum wait interval.
-func NewExponentialBackoff(initialTimeout, maxTimeout time.Duration) *ExponentialBackoff {
- return &ExponentialBackoff{
- t: float64(int64(initialTimeout / time.Millisecond)),
- f: 2.0,
- m: float64(int64(maxTimeout / time.Millisecond)),
- }
-}
-
-// Next implements BackoffFunc for ExponentialBackoff.
-func (b *ExponentialBackoff) Next(retry int) (time.Duration, bool) {
- r := 1.0 + rand.Float64() // random number in [1..2]
- m := math.Min(r*b.t*math.Pow(b.f, float64(retry)), b.m)
- if m >= b.m {
- return 0, false
- }
- d := time.Duration(int64(m)) * time.Millisecond
- return d, true
-}
-
-// -- Simple Backoff --
-
-// SimpleBackoff takes a list of fixed values for backoff intervals.
-// Each call to Next returns the next value from that fixed list.
-// After each value is returned, subsequent calls to Next will only return
-// the last element. The values are optionally "jittered" (off by default).
-type SimpleBackoff struct {
- sync.Mutex
- ticks []int
- jitter bool
-}
-
-// NewSimpleBackoff creates a SimpleBackoff algorithm with the specified
-// list of fixed intervals in milliseconds.
-func NewSimpleBackoff(ticks ...int) *SimpleBackoff {
- return &SimpleBackoff{
- ticks: ticks,
- jitter: false,
- }
-}
-
-// Jitter enables or disables jittering values.
-func (b *SimpleBackoff) Jitter(flag bool) *SimpleBackoff {
- b.Lock()
- b.jitter = flag
- b.Unlock()
- return b
-}
-
-// jitter randomizes the interval to return a value of [0.5*millis .. 1.5*millis].
-func jitter(millis int) int {
- if millis <= 0 {
- return 0
- }
- return millis/2 + rand.Intn(millis)
-}
-
-// Next implements BackoffFunc for SimpleBackoff.
-func (b *SimpleBackoff) Next(retry int) (time.Duration, bool) {
- b.Lock()
- defer b.Unlock()
-
- if retry >= len(b.ticks) {
- return 0, false
- }
-
- ms := b.ticks[retry]
- if b.jitter {
- ms = jitter(ms)
- }
- return time.Duration(ms) * time.Millisecond, true
-}
diff --git a/vendor/github.com/olivere/elastic/backoff_test.go b/vendor/github.com/olivere/elastic/backoff_test.go
deleted file mode 100644
index eae168a12..000000000
--- a/vendor/github.com/olivere/elastic/backoff_test.go
+++ /dev/null
@@ -1,140 +0,0 @@
-package elastic
-
-import (
- "math/rand"
- "testing"
- "time"
-)
-
-func TestZeroBackoff(t *testing.T) {
- b := ZeroBackoff{}
- _, ok := b.Next(0)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
-}
-
-func TestStopBackoff(t *testing.T) {
- b := StopBackoff{}
- _, ok := b.Next(0)
- if ok {
- t.Fatalf("expected %v, got %v", false, ok)
- }
-}
-
-func TestConstantBackoff(t *testing.T) {
- b := NewConstantBackoff(time.Second)
- d, ok := b.Next(0)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if d != time.Second {
- t.Fatalf("expected %v, got %v", time.Second, d)
- }
-}
-
-func TestSimpleBackoff(t *testing.T) {
- var tests = []struct {
- Duration time.Duration
- Continue bool
- }{
- // #0
- {
- Duration: 1 * time.Millisecond,
- Continue: true,
- },
- // #1
- {
- Duration: 2 * time.Millisecond,
- Continue: true,
- },
- // #2
- {
- Duration: 7 * time.Millisecond,
- Continue: true,
- },
- // #3
- {
- Duration: 0,
- Continue: false,
- },
- // #4
- {
- Duration: 0,
- Continue: false,
- },
- }
-
- b := NewSimpleBackoff(1, 2, 7)
-
- for i, tt := range tests {
- d, ok := b.Next(i)
- if got, want := ok, tt.Continue; got != want {
- t.Fatalf("#%d: expected %v, got %v", i, want, got)
- }
- if got, want := d, tt.Duration; got != want {
- t.Fatalf("#%d: expected %v, got %v", i, want, got)
- }
- }
-}
-
-func TestExponentialBackoff(t *testing.T) {
- rand.Seed(time.Now().UnixNano())
-
- min := time.Duration(8) * time.Millisecond
- max := time.Duration(256) * time.Millisecond
- b := NewExponentialBackoff(min, max)
-
- between := func(value time.Duration, a, b int) bool {
- x := int(value / time.Millisecond)
- return a <= x && x <= b
- }
-
- got, ok := b.Next(0)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if !between(got, 8, 256) {
- t.Errorf("expected [%v..%v], got %v", 8, 256, got)
- }
-
- got, ok = b.Next(1)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if !between(got, 8, 256) {
- t.Errorf("expected [%v..%v], got %v", 8, 256, got)
- }
-
- got, ok = b.Next(2)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if !between(got, 8, 256) {
- t.Errorf("expected [%v..%v], got %v", 8, 256, got)
- }
-
- got, ok = b.Next(3)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if !between(got, 8, 256) {
- t.Errorf("expected [%v..%v], got %v", 8, 256, got)
- }
-
- got, ok = b.Next(4)
- if !ok {
- t.Fatalf("expected %v, got %v", true, ok)
- }
- if !between(got, 8, 256) {
- t.Errorf("expected [%v..%v], got %v", 8, 256, got)
- }
-
- if _, ok := b.Next(5); ok {
- t.Fatalf("expected %v, got %v", false, ok)
- }
-
- if _, ok = b.Next(6); ok {
- t.Fatalf("expected %v, got %v", false, ok)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/bulk.go b/vendor/github.com/olivere/elastic/bulk.go
deleted file mode 100644
index f4228294f..000000000
--- a/vendor/github.com/olivere/elastic/bulk.go
+++ /dev/null
@@ -1,417 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "context"
- "errors"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// BulkService allows for batching bulk requests and sending them to
-// Elasticsearch in one roundtrip. Use the Add method with BulkIndexRequest,
-// BulkUpdateRequest, and BulkDeleteRequest to add bulk requests to a batch,
-// then use Do to send them to Elasticsearch.
-//
-// BulkService will be reset after each Do call. In other words, you can
-// reuse BulkService to send many batches. You do not have to create a new
-// BulkService for each batch.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for more details.
-type BulkService struct {
- client *Client
- retrier Retrier
-
- index string
- typ string
- requests []BulkableRequest
- pipeline string
- timeout string
- refresh string
- routing string
- waitForActiveShards string
- pretty bool
-
- // estimated bulk size in bytes, up to the request index sizeInBytesCursor
- sizeInBytes int64
- sizeInBytesCursor int
-}
-
-// NewBulkService initializes a new BulkService.
-func NewBulkService(client *Client) *BulkService {
- builder := &BulkService{
- client: client,
- }
- return builder
-}
-
-func (s *BulkService) reset() {
- s.requests = make([]BulkableRequest, 0)
- s.sizeInBytes = 0
- s.sizeInBytesCursor = 0
-}
-
-// Retrier allows to set specific retry logic for this BulkService.
-// If not specified, it will use the client's default retrier.
-func (s *BulkService) Retrier(retrier Retrier) *BulkService {
- s.retrier = retrier
- return s
-}
-
-// Index specifies the index to use for all batches. You may also leave
-// this blank and specify the index in the individual bulk requests.
-func (s *BulkService) Index(index string) *BulkService {
- s.index = index
- return s
-}
-
-// Type specifies the type to use for all batches. You may also leave
-// this blank and specify the type in the individual bulk requests.
-func (s *BulkService) Type(typ string) *BulkService {
- s.typ = typ
- return s
-}
-
-// Timeout is a global timeout for processing bulk requests. This is a
-// server-side timeout, i.e. it tells Elasticsearch the time after which
-// it should stop processing.
-func (s *BulkService) Timeout(timeout string) *BulkService {
- s.timeout = timeout
- return s
-}
-
-// Refresh controls when changes made by this request are made visible
-// to search. The allowed values are: "true" (refresh the relevant
-// primary and replica shards immediately), "wait_for" (wait for the
-// changes to be made visible by a refresh before applying), or "false"
-// (no refresh related actions).
-func (s *BulkService) Refresh(refresh string) *BulkService {
- s.refresh = refresh
- return s
-}
-
-// Routing specifies the routing value.
-func (s *BulkService) Routing(routing string) *BulkService {
- s.routing = routing
- return s
-}
-
-// Pipeline specifies the pipeline id to preprocess incoming documents with.
-func (s *BulkService) Pipeline(pipeline string) *BulkService {
- s.pipeline = pipeline
- return s
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active
-// before proceeding with the bulk operation. Defaults to 1, meaning the
-// primary shard only. Set to `all` for all shard copies, otherwise set to
-// any non-negative value less than or equal to the total number of copies
-// for the shard (number of replicas + 1).
-func (s *BulkService) WaitForActiveShards(waitForActiveShards string) *BulkService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// Pretty tells Elasticsearch whether to return a formatted JSON response.
-func (s *BulkService) Pretty(pretty bool) *BulkService {
- s.pretty = pretty
- return s
-}
-
-// Add adds bulkable requests, i.e. BulkIndexRequest, BulkUpdateRequest,
-// and/or BulkDeleteRequest.
-func (s *BulkService) Add(requests ...BulkableRequest) *BulkService {
- for _, r := range requests {
- s.requests = append(s.requests, r)
- }
- return s
-}
-
-// EstimatedSizeInBytes returns the estimated size of all bulkable
-// requests added via Add.
-func (s *BulkService) EstimatedSizeInBytes() int64 {
- if s.sizeInBytesCursor == len(s.requests) {
- return s.sizeInBytes
- }
- for _, r := range s.requests[s.sizeInBytesCursor:] {
- s.sizeInBytes += s.estimateSizeInBytes(r)
- s.sizeInBytesCursor++
- }
- return s.sizeInBytes
-}
-
-// estimateSizeInBytes returns the estimates size of the given
-// bulkable request, i.e. BulkIndexRequest, BulkUpdateRequest, and
-// BulkDeleteRequest.
-func (s *BulkService) estimateSizeInBytes(r BulkableRequest) int64 {
- lines, _ := r.Source()
- size := 0
- for _, line := range lines {
- // +1 for the \n
- size += len(line) + 1
- }
- return int64(size)
-}
-
-// NumberOfActions returns the number of bulkable requests that need to
-// be sent to Elasticsearch on the next batch.
-func (s *BulkService) NumberOfActions() int {
- return len(s.requests)
-}
-
-func (s *BulkService) bodyAsString() (string, error) {
- // Pre-allocate to reduce allocs
- buf := bytes.NewBuffer(make([]byte, 0, s.EstimatedSizeInBytes()))
-
- for _, req := range s.requests {
- source, err := req.Source()
- if err != nil {
- return "", err
- }
- for _, line := range source {
- buf.WriteString(line)
- buf.WriteByte('\n')
- }
- }
-
- return buf.String(), nil
-}
-
-// Do sends the batched requests to Elasticsearch. Note that, when successful,
-// you can reuse the BulkService for the next batch as the list of bulk
-// requests is cleared on success.
-func (s *BulkService) Do(ctx context.Context) (*BulkResponse, error) {
- // No actions?
- if s.NumberOfActions() == 0 {
- return nil, errors.New("elastic: No bulk actions to commit")
- }
-
- // Get body
- body, err := s.bodyAsString()
- if err != nil {
- return nil, err
- }
-
- // Build url
- path := "/"
- if len(s.index) > 0 {
- index, err := uritemplates.Expand("{index}", map[string]string{
- "index": s.index,
- })
- if err != nil {
- return nil, err
- }
- path += index + "/"
- }
- if len(s.typ) > 0 {
- typ, err := uritemplates.Expand("{type}", map[string]string{
- "type": s.typ,
- })
- if err != nil {
- return nil, err
- }
- path += typ + "/"
- }
- path += "_bulk"
-
- // Parameters
- params := make(url.Values)
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- if s.pipeline != "" {
- params.Set("pipeline", s.pipeline)
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- ContentType: "application/x-ndjson",
- Retrier: s.retrier,
- })
- if err != nil {
- return nil, err
- }
-
- // Return results
- ret := new(BulkResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
-
- // Reset so the request can be reused
- s.reset()
-
- return ret, nil
-}
-
-// BulkResponse is a response to a bulk execution.
-//
-// Example:
-// {
-// "took":3,
-// "errors":false,
-// "items":[{
-// "index":{
-// "_index":"index1",
-// "_type":"tweet",
-// "_id":"1",
-// "_version":3,
-// "status":201
-// }
-// },{
-// "index":{
-// "_index":"index2",
-// "_type":"tweet",
-// "_id":"2",
-// "_version":3,
-// "status":200
-// }
-// },{
-// "delete":{
-// "_index":"index1",
-// "_type":"tweet",
-// "_id":"1",
-// "_version":4,
-// "status":200,
-// "found":true
-// }
-// },{
-// "update":{
-// "_index":"index2",
-// "_type":"tweet",
-// "_id":"2",
-// "_version":4,
-// "status":200
-// }
-// }]
-// }
-type BulkResponse struct {
- Took int `json:"took,omitempty"`
- Errors bool `json:"errors,omitempty"`
- Items []map[string]*BulkResponseItem `json:"items,omitempty"`
-}
-
-// BulkResponseItem is the result of a single bulk request.
-type BulkResponseItem struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Version int64 `json:"_version,omitempty"`
- Result string `json:"result,omitempty"`
- Shards *shardsInfo `json:"_shards,omitempty"`
- SeqNo int64 `json:"_seq_no,omitempty"`
- PrimaryTerm int64 `json:"_primary_term,omitempty"`
- Status int `json:"status,omitempty"`
- ForcedRefresh bool `json:"forced_refresh,omitempty"`
- Error *ErrorDetails `json:"error,omitempty"`
- GetResult *GetResult `json:"get,omitempty"`
-}
-
-// Indexed returns all bulk request results of "index" actions.
-func (r *BulkResponse) Indexed() []*BulkResponseItem {
- return r.ByAction("index")
-}
-
-// Created returns all bulk request results of "create" actions.
-func (r *BulkResponse) Created() []*BulkResponseItem {
- return r.ByAction("create")
-}
-
-// Updated returns all bulk request results of "update" actions.
-func (r *BulkResponse) Updated() []*BulkResponseItem {
- return r.ByAction("update")
-}
-
-// Deleted returns all bulk request results of "delete" actions.
-func (r *BulkResponse) Deleted() []*BulkResponseItem {
- return r.ByAction("delete")
-}
-
-// ByAction returns all bulk request results of a certain action,
-// e.g. "index" or "delete".
-func (r *BulkResponse) ByAction(action string) []*BulkResponseItem {
- if r.Items == nil {
- return nil
- }
- var items []*BulkResponseItem
- for _, item := range r.Items {
- if result, found := item[action]; found {
- items = append(items, result)
- }
- }
- return items
-}
-
-// ById returns all bulk request results of a given document id,
-// regardless of the action ("index", "delete" etc.).
-func (r *BulkResponse) ById(id string) []*BulkResponseItem {
- if r.Items == nil {
- return nil
- }
- var items []*BulkResponseItem
- for _, item := range r.Items {
- for _, result := range item {
- if result.Id == id {
- items = append(items, result)
- }
- }
- }
- return items
-}
-
-// Failed returns those items of a bulk response that have errors,
-// i.e. those that don't have a status code between 200 and 299.
-func (r *BulkResponse) Failed() []*BulkResponseItem {
- if r.Items == nil {
- return nil
- }
- var errors []*BulkResponseItem
- for _, item := range r.Items {
- for _, result := range item {
- if !(result.Status >= 200 && result.Status <= 299) {
- errors = append(errors, result)
- }
- }
- }
- return errors
-}
-
-// Succeeded returns those items of a bulk response that have no errors,
-// i.e. those have a status code between 200 and 299.
-func (r *BulkResponse) Succeeded() []*BulkResponseItem {
- if r.Items == nil {
- return nil
- }
- var succeeded []*BulkResponseItem
- for _, item := range r.Items {
- for _, result := range item {
- if result.Status >= 200 && result.Status <= 299 {
- succeeded = append(succeeded, result)
- }
- }
- }
- return succeeded
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_delete_request.go b/vendor/github.com/olivere/elastic/bulk_delete_request.go
deleted file mode 100644
index e6c98c553..000000000
--- a/vendor/github.com/olivere/elastic/bulk_delete_request.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-//go:generate easyjson bulk_delete_request.go
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// -- Bulk delete request --
-
-// BulkDeleteRequest is a request to remove a document from Elasticsearch.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-type BulkDeleteRequest struct {
- BulkableRequest
- index string
- typ string
- id string
- parent string
- routing string
- version int64 // default is MATCH_ANY
- versionType string // default is "internal"
-
- source []string
-
- useEasyJSON bool
-}
-
-//easyjson:json
-type bulkDeleteRequestCommand map[string]bulkDeleteRequestCommandOp
-
-//easyjson:json
-type bulkDeleteRequestCommandOp struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Parent string `json:"parent,omitempty"`
- Routing string `json:"routing,omitempty"`
- Version int64 `json:"version,omitempty"`
- VersionType string `json:"version_type,omitempty"`
-}
-
-// NewBulkDeleteRequest returns a new BulkDeleteRequest.
-func NewBulkDeleteRequest() *BulkDeleteRequest {
- return &BulkDeleteRequest{}
-}
-
-// UseEasyJSON is an experimental setting that enables serialization
-// with github.com/mailru/easyjson, which should in faster serialization
-// time and less allocations, but removed compatibility with encoding/json,
-// usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations
-// for details. This setting is disabled by default.
-func (r *BulkDeleteRequest) UseEasyJSON(enable bool) *BulkDeleteRequest {
- r.useEasyJSON = enable
- return r
-}
-
-// Index specifies the Elasticsearch index to use for this delete request.
-// If unspecified, the index set on the BulkService will be used.
-func (r *BulkDeleteRequest) Index(index string) *BulkDeleteRequest {
- r.index = index
- r.source = nil
- return r
-}
-
-// Type specifies the Elasticsearch type to use for this delete request.
-// If unspecified, the type set on the BulkService will be used.
-func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest {
- r.typ = typ
- r.source = nil
- return r
-}
-
-// Id specifies the identifier of the document to delete.
-func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest {
- r.id = id
- r.source = nil
- return r
-}
-
-// Parent specifies the parent of the request, which is used in parent/child
-// mappings.
-func (r *BulkDeleteRequest) Parent(parent string) *BulkDeleteRequest {
- r.parent = parent
- r.source = nil
- return r
-}
-
-// Routing specifies a routing value for the request.
-func (r *BulkDeleteRequest) Routing(routing string) *BulkDeleteRequest {
- r.routing = routing
- r.source = nil
- return r
-}
-
-// Version indicates the version to be deleted as part of an optimistic
-// concurrency model.
-func (r *BulkDeleteRequest) Version(version int64) *BulkDeleteRequest {
- r.version = version
- r.source = nil
- return r
-}
-
-// VersionType can be "internal" (default), "external", "external_gte",
-// or "external_gt".
-func (r *BulkDeleteRequest) VersionType(versionType string) *BulkDeleteRequest {
- r.versionType = versionType
- r.source = nil
- return r
-}
-
-// String returns the on-wire representation of the delete request,
-// concatenated as a single string.
-func (r *BulkDeleteRequest) String() string {
- lines, err := r.Source()
- if err != nil {
- return fmt.Sprintf("error: %v", err)
- }
- return strings.Join(lines, "\n")
-}
-
-// Source returns the on-wire representation of the delete request,
-// split into an action-and-meta-data line and an (optional) source line.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-func (r *BulkDeleteRequest) Source() ([]string, error) {
- if r.source != nil {
- return r.source, nil
- }
- command := bulkDeleteRequestCommand{
- "delete": bulkDeleteRequestCommandOp{
- Index: r.index,
- Type: r.typ,
- Id: r.id,
- Routing: r.routing,
- Parent: r.parent,
- Version: r.version,
- VersionType: r.versionType,
- },
- }
-
- var err error
- var body []byte
- if r.useEasyJSON {
- // easyjson
- body, err = command.MarshalJSON()
- } else {
- // encoding/json
- body, err = json.Marshal(command)
- }
- if err != nil {
- return nil, err
- }
-
- lines := []string{string(body)}
- r.source = lines
-
- return lines, nil
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_delete_request_easyjson.go b/vendor/github.com/olivere/elastic/bulk_delete_request_easyjson.go
deleted file mode 100644
index df3452ce6..000000000
--- a/vendor/github.com/olivere/elastic/bulk_delete_request_easyjson.go
+++ /dev/null
@@ -1,230 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package elastic
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjson8092efb6DecodeGithubComOlivereElastic(in *jlexer.Lexer, out *bulkDeleteRequestCommandOp) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeString()
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "_index":
- out.Index = string(in.String())
- case "_type":
- out.Type = string(in.String())
- case "_id":
- out.Id = string(in.String())
- case "parent":
- out.Parent = string(in.String())
- case "routing":
- out.Routing = string(in.String())
- case "version":
- out.Version = int64(in.Int64())
- case "version_type":
- out.VersionType = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson8092efb6EncodeGithubComOlivereElastic(out *jwriter.Writer, in bulkDeleteRequestCommandOp) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Index != "" {
- const prefix string = ",\"_index\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Index))
- }
- if in.Type != "" {
- const prefix string = ",\"_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Type))
- }
- if in.Id != "" {
- const prefix string = ",\"_id\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Id))
- }
- if in.Parent != "" {
- const prefix string = ",\"parent\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Parent))
- }
- if in.Routing != "" {
- const prefix string = ",\"routing\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Routing))
- }
- if in.Version != 0 {
- const prefix string = ",\"version\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Version))
- }
- if in.VersionType != "" {
- const prefix string = ",\"version_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.VersionType))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkDeleteRequestCommandOp) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson8092efb6EncodeGithubComOlivereElastic(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkDeleteRequestCommandOp) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson8092efb6EncodeGithubComOlivereElastic(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkDeleteRequestCommandOp) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson8092efb6DecodeGithubComOlivereElastic(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkDeleteRequestCommandOp) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson8092efb6DecodeGithubComOlivereElastic(l, v)
-}
-func easyjson8092efb6DecodeGithubComOlivereElastic1(in *jlexer.Lexer, out *bulkDeleteRequestCommand) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- *out = make(bulkDeleteRequestCommand)
- } else {
- *out = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v1 bulkDeleteRequestCommandOp
- (v1).UnmarshalEasyJSON(in)
- (*out)[key] = v1
- in.WantComma()
- }
- in.Delim('}')
- }
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson8092efb6EncodeGithubComOlivereElastic1(out *jwriter.Writer, in bulkDeleteRequestCommand) {
- if in == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v2First := true
- for v2Name, v2Value := range in {
- if v2First {
- v2First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v2Name))
- out.RawByte(':')
- (v2Value).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkDeleteRequestCommand) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson8092efb6EncodeGithubComOlivereElastic1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkDeleteRequestCommand) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson8092efb6EncodeGithubComOlivereElastic1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkDeleteRequestCommand) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson8092efb6DecodeGithubComOlivereElastic1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkDeleteRequestCommand) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson8092efb6DecodeGithubComOlivereElastic1(l, v)
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_delete_request_test.go b/vendor/github.com/olivere/elastic/bulk_delete_request_test.go
deleted file mode 100644
index 8635e34d1..000000000
--- a/vendor/github.com/olivere/elastic/bulk_delete_request_test.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestBulkDeleteRequestSerialization(t *testing.T) {
- tests := []struct {
- Request BulkableRequest
- Expected []string
- }{
- // #0
- {
- Request: NewBulkDeleteRequest().Index("index1").Type("doc").Id("1"),
- Expected: []string{
- `{"delete":{"_index":"index1","_type":"doc","_id":"1"}}`,
- },
- },
- // #1
- {
- Request: NewBulkDeleteRequest().Index("index1").Type("doc").Id("1").Parent("2"),
- Expected: []string{
- `{"delete":{"_index":"index1","_type":"doc","_id":"1","parent":"2"}}`,
- },
- },
- // #2
- {
- Request: NewBulkDeleteRequest().Index("index1").Type("doc").Id("1").Routing("3"),
- Expected: []string{
- `{"delete":{"_index":"index1","_type":"doc","_id":"1","routing":"3"}}`,
- },
- },
- }
-
- for i, test := range tests {
- lines, err := test.Request.Source()
- if err != nil {
- t.Fatalf("case #%d: expected no error, got: %v", i, err)
- }
- if lines == nil {
- t.Fatalf("case #%d: expected lines, got nil", i)
- }
- if len(lines) != len(test.Expected) {
- t.Fatalf("case #%d: expected %d lines, got %d", i, len(test.Expected), len(lines))
- }
- for j, line := range lines {
- if line != test.Expected[j] {
- t.Errorf("case #%d: expected line #%d to be %s, got: %s", i, j, test.Expected[j], line)
- }
- }
- }
-}
-
-var bulkDeleteRequestSerializationResult string
-
-func BenchmarkBulkDeleteRequestSerialization(b *testing.B) {
- b.Run("stdlib", func(b *testing.B) {
- r := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
- benchmarkBulkDeleteRequestSerialization(b, r.UseEasyJSON(false))
- })
- b.Run("easyjson", func(b *testing.B) {
- r := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
- benchmarkBulkDeleteRequestSerialization(b, r.UseEasyJSON(true))
- })
-}
-
-func benchmarkBulkDeleteRequestSerialization(b *testing.B, r *BulkDeleteRequest) {
- var s string
- for n := 0; n < b.N; n++ {
- s = r.String()
- r.source = nil // Don't let caching spoil the benchmark
- }
- bulkDeleteRequestSerializationResult = s // ensure the compiler doesn't optimize
- b.ReportAllocs()
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_index_request.go b/vendor/github.com/olivere/elastic/bulk_index_request.go
deleted file mode 100644
index 321d2e25a..000000000
--- a/vendor/github.com/olivere/elastic/bulk_index_request.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-//go:generate easyjson bulk_index_request.go
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// BulkIndexRequest is a request to add a document to Elasticsearch.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-type BulkIndexRequest struct {
- BulkableRequest
- index string
- typ string
- id string
- opType string
- routing string
- parent string
- version int64 // default is MATCH_ANY
- versionType string // default is "internal"
- doc interface{}
- pipeline string
- retryOnConflict *int
-
- source []string
-
- useEasyJSON bool
-}
-
-//easyjson:json
-type bulkIndexRequestCommand map[string]bulkIndexRequestCommandOp
-
-//easyjson:json
-type bulkIndexRequestCommandOp struct {
- Index string `json:"_index,omitempty"`
- Id string `json:"_id,omitempty"`
- Type string `json:"_type,omitempty"`
- Parent string `json:"parent,omitempty"`
- // RetryOnConflict is "_retry_on_conflict" for 6.0 and "retry_on_conflict" for 6.1+.
- RetryOnConflict *int `json:"retry_on_conflict,omitempty"`
- Routing string `json:"routing,omitempty"`
- Version int64 `json:"version,omitempty"`
- VersionType string `json:"version_type,omitempty"`
- Pipeline string `json:"pipeline,omitempty"`
-}
-
-// NewBulkIndexRequest returns a new BulkIndexRequest.
-// The operation type is "index" by default.
-func NewBulkIndexRequest() *BulkIndexRequest {
- return &BulkIndexRequest{
- opType: "index",
- }
-}
-
-// UseEasyJSON is an experimental setting that enables serialization
-// with github.com/mailru/easyjson, which should in faster serialization
-// time and less allocations, but removed compatibility with encoding/json,
-// usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations
-// for details. This setting is disabled by default.
-func (r *BulkIndexRequest) UseEasyJSON(enable bool) *BulkIndexRequest {
- r.useEasyJSON = enable
- return r
-}
-
-// Index specifies the Elasticsearch index to use for this index request.
-// If unspecified, the index set on the BulkService will be used.
-func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest {
- r.index = index
- r.source = nil
- return r
-}
-
-// Type specifies the Elasticsearch type to use for this index request.
-// If unspecified, the type set on the BulkService will be used.
-func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest {
- r.typ = typ
- r.source = nil
- return r
-}
-
-// Id specifies the identifier of the document to index.
-func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest {
- r.id = id
- r.source = nil
- return r
-}
-
-// OpType specifies if this request should follow create-only or upsert
-// behavior. This follows the OpType of the standard document index API.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-index_.html#operation-type
-// for details.
-func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest {
- r.opType = opType
- r.source = nil
- return r
-}
-
-// Routing specifies a routing value for the request.
-func (r *BulkIndexRequest) Routing(routing string) *BulkIndexRequest {
- r.routing = routing
- r.source = nil
- return r
-}
-
-// Parent specifies the identifier of the parent document (if available).
-func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest {
- r.parent = parent
- r.source = nil
- return r
-}
-
-// Version indicates the version of the document as part of an optimistic
-// concurrency model.
-func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest {
- r.version = version
- r.source = nil
- return r
-}
-
-// VersionType specifies how versions are created. It can be e.g. internal,
-// external, external_gte, or force.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-index_.html#index-versioning
-// for details.
-func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest {
- r.versionType = versionType
- r.source = nil
- return r
-}
-
-// Doc specifies the document to index.
-func (r *BulkIndexRequest) Doc(doc interface{}) *BulkIndexRequest {
- r.doc = doc
- r.source = nil
- return r
-}
-
-// RetryOnConflict specifies how often to retry in case of a version conflict.
-func (r *BulkIndexRequest) RetryOnConflict(retryOnConflict int) *BulkIndexRequest {
- r.retryOnConflict = &retryOnConflict
- r.source = nil
- return r
-}
-
-// Pipeline to use while processing the request.
-func (r *BulkIndexRequest) Pipeline(pipeline string) *BulkIndexRequest {
- r.pipeline = pipeline
- r.source = nil
- return r
-}
-
-// String returns the on-wire representation of the index request,
-// concatenated as a single string.
-func (r *BulkIndexRequest) String() string {
- lines, err := r.Source()
- if err != nil {
- return fmt.Sprintf("error: %v", err)
- }
- return strings.Join(lines, "\n")
-}
-
-// Source returns the on-wire representation of the index request,
-// split into an action-and-meta-data line and an (optional) source line.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-func (r *BulkIndexRequest) Source() ([]string, error) {
- // { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
- // { "field1" : "value1" }
-
- if r.source != nil {
- return r.source, nil
- }
-
- lines := make([]string, 2)
-
- // "index" ...
- indexCommand := bulkIndexRequestCommandOp{
- Index: r.index,
- Type: r.typ,
- Id: r.id,
- Routing: r.routing,
- Parent: r.parent,
- Version: r.version,
- VersionType: r.versionType,
- RetryOnConflict: r.retryOnConflict,
- Pipeline: r.pipeline,
- }
- command := bulkIndexRequestCommand{
- r.opType: indexCommand,
- }
-
- var err error
- var body []byte
- if r.useEasyJSON {
- // easyjson
- body, err = command.MarshalJSON()
- } else {
- // encoding/json
- body, err = json.Marshal(command)
- }
- if err != nil {
- return nil, err
- }
-
- lines[0] = string(body)
-
- // "field1" ...
- if r.doc != nil {
- switch t := r.doc.(type) {
- default:
- body, err := json.Marshal(r.doc)
- if err != nil {
- return nil, err
- }
- lines[1] = string(body)
- case json.RawMessage:
- lines[1] = string(t)
- case *json.RawMessage:
- lines[1] = string(*t)
- case string:
- lines[1] = t
- case *string:
- lines[1] = *t
- }
- } else {
- lines[1] = "{}"
- }
-
- r.source = lines
- return lines, nil
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_index_request_easyjson.go b/vendor/github.com/olivere/elastic/bulk_index_request_easyjson.go
deleted file mode 100644
index f8792978f..000000000
--- a/vendor/github.com/olivere/elastic/bulk_index_request_easyjson.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package elastic
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjson9de0fcbfDecodeGithubComOlivereElastic(in *jlexer.Lexer, out *bulkIndexRequestCommandOp) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeString()
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "_index":
- out.Index = string(in.String())
- case "_id":
- out.Id = string(in.String())
- case "_type":
- out.Type = string(in.String())
- case "parent":
- out.Parent = string(in.String())
- case "retry_on_conflict":
- if in.IsNull() {
- in.Skip()
- out.RetryOnConflict = nil
- } else {
- if out.RetryOnConflict == nil {
- out.RetryOnConflict = new(int)
- }
- *out.RetryOnConflict = int(in.Int())
- }
- case "routing":
- out.Routing = string(in.String())
- case "version":
- out.Version = int64(in.Int64())
- case "version_type":
- out.VersionType = string(in.String())
- case "pipeline":
- out.Pipeline = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson9de0fcbfEncodeGithubComOlivereElastic(out *jwriter.Writer, in bulkIndexRequestCommandOp) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Index != "" {
- const prefix string = ",\"_index\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Index))
- }
- if in.Id != "" {
- const prefix string = ",\"_id\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Id))
- }
- if in.Type != "" {
- const prefix string = ",\"_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Type))
- }
- if in.Parent != "" {
- const prefix string = ",\"parent\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Parent))
- }
- if in.RetryOnConflict != nil {
- const prefix string = ",\"retry_on_conflict\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int(int(*in.RetryOnConflict))
- }
- if in.Routing != "" {
- const prefix string = ",\"routing\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Routing))
- }
- if in.Version != 0 {
- const prefix string = ",\"version\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Version))
- }
- if in.VersionType != "" {
- const prefix string = ",\"version_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.VersionType))
- }
- if in.Pipeline != "" {
- const prefix string = ",\"pipeline\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Pipeline))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkIndexRequestCommandOp) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson9de0fcbfEncodeGithubComOlivereElastic(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkIndexRequestCommandOp) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson9de0fcbfEncodeGithubComOlivereElastic(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkIndexRequestCommandOp) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson9de0fcbfDecodeGithubComOlivereElastic(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkIndexRequestCommandOp) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson9de0fcbfDecodeGithubComOlivereElastic(l, v)
-}
-func easyjson9de0fcbfDecodeGithubComOlivereElastic1(in *jlexer.Lexer, out *bulkIndexRequestCommand) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- *out = make(bulkIndexRequestCommand)
- } else {
- *out = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v1 bulkIndexRequestCommandOp
- (v1).UnmarshalEasyJSON(in)
- (*out)[key] = v1
- in.WantComma()
- }
- in.Delim('}')
- }
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson9de0fcbfEncodeGithubComOlivereElastic1(out *jwriter.Writer, in bulkIndexRequestCommand) {
- if in == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v2First := true
- for v2Name, v2Value := range in {
- if v2First {
- v2First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v2Name))
- out.RawByte(':')
- (v2Value).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkIndexRequestCommand) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson9de0fcbfEncodeGithubComOlivereElastic1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkIndexRequestCommand) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson9de0fcbfEncodeGithubComOlivereElastic1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkIndexRequestCommand) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson9de0fcbfDecodeGithubComOlivereElastic1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkIndexRequestCommand) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson9de0fcbfDecodeGithubComOlivereElastic1(l, v)
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_index_request_test.go b/vendor/github.com/olivere/elastic/bulk_index_request_test.go
deleted file mode 100644
index 79baf51fb..000000000
--- a/vendor/github.com/olivere/elastic/bulk_index_request_test.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
- "time"
-)
-
-func TestBulkIndexRequestSerialization(t *testing.T) {
- tests := []struct {
- Request BulkableRequest
- Expected []string
- }{
- // #0
- {
- Request: NewBulkIndexRequest().Index("index1").Type("doc").Id("1").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"index":{"_index":"index1","_id":"1","_type":"doc"}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- // #1
- {
- Request: NewBulkIndexRequest().OpType("create").Index("index1").Type("doc").Id("1").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"create":{"_index":"index1","_id":"1","_type":"doc"}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- // #2
- {
- Request: NewBulkIndexRequest().OpType("index").Index("index1").Type("doc").Id("1").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"index":{"_index":"index1","_id":"1","_type":"doc"}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- // #3
- {
- Request: NewBulkIndexRequest().OpType("index").Index("index1").Type("doc").Id("1").RetryOnConflict(42).
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"index":{"_index":"index1","_id":"1","_type":"doc","retry_on_conflict":42}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- // #4
- {
- Request: NewBulkIndexRequest().OpType("index").Index("index1").Type("doc").Id("1").Pipeline("my_pipeline").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"index":{"_index":"index1","_id":"1","_type":"doc","pipeline":"my_pipeline"}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- // #5
- {
- Request: NewBulkIndexRequest().OpType("index").Index("index1").Type("doc").Id("1").
- Routing("123").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)}),
- Expected: []string{
- `{"index":{"_index":"index1","_id":"1","_type":"doc","routing":"123"}}`,
- `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}`,
- },
- },
- }
-
- for i, test := range tests {
- lines, err := test.Request.Source()
- if err != nil {
- t.Fatalf("case #%d: expected no error, got: %v", i, err)
- }
- if lines == nil {
- t.Fatalf("case #%d: expected lines, got nil", i)
- }
- if len(lines) != len(test.Expected) {
- t.Fatalf("case #%d: expected %d lines, got %d", i, len(test.Expected), len(lines))
- }
- for j, line := range lines {
- if line != test.Expected[j] {
- t.Errorf("case #%d: expected line #%d to be %s, got: %s", i, j, test.Expected[j], line)
- }
- }
- }
-}
-
-var bulkIndexRequestSerializationResult string
-
-func BenchmarkBulkIndexRequestSerialization(b *testing.B) {
- b.Run("stdlib", func(b *testing.B) {
- r := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)})
- benchmarkBulkIndexRequestSerialization(b, r.UseEasyJSON(false))
- })
- b.Run("easyjson", func(b *testing.B) {
- r := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").
- Doc(tweet{User: "olivere", Created: time.Date(2014, 1, 18, 23, 59, 58, 0, time.UTC)})
- benchmarkBulkIndexRequestSerialization(b, r.UseEasyJSON(true))
- })
-}
-
-func benchmarkBulkIndexRequestSerialization(b *testing.B, r *BulkIndexRequest) {
- var s string
- for n := 0; n < b.N; n++ {
- s = r.String()
- r.source = nil // Don't let caching spoil the benchmark
- }
- bulkIndexRequestSerializationResult = s // ensure the compiler doesn't optimize
- b.ReportAllocs()
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_processor.go b/vendor/github.com/olivere/elastic/bulk_processor.go
deleted file mode 100644
index 6ee8a3dee..000000000
--- a/vendor/github.com/olivere/elastic/bulk_processor.go
+++ /dev/null
@@ -1,600 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net"
- "sync"
- "sync/atomic"
- "time"
-)
-
-// BulkProcessorService allows to easily process bulk requests. It allows setting
-// policies when to flush new bulk requests, e.g. based on a number of actions,
-// on the size of the actions, and/or to flush periodically. It also allows
-// to control the number of concurrent bulk requests allowed to be executed
-// in parallel.
-//
-// BulkProcessorService, by default, commits either every 1000 requests or when the
-// (estimated) size of the bulk requests exceeds 5 MB. However, it does not
-// commit periodically. BulkProcessorService also does retry by default, using
-// an exponential backoff algorithm.
-//
-// The caller is responsible for setting the index and type on every
-// bulk request added to BulkProcessorService.
-//
-// BulkProcessorService takes ideas from the BulkProcessor of the
-// Elasticsearch Java API as documented in
-// https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-bulk-processor.html.
-type BulkProcessorService struct {
- c *Client
- beforeFn BulkBeforeFunc
- afterFn BulkAfterFunc
- name string // name of processor
- numWorkers int // # of workers (>= 1)
- bulkActions int // # of requests after which to commit
- bulkSize int // # of bytes after which to commit
- flushInterval time.Duration // periodic flush interval
- wantStats bool // indicates whether to gather statistics
- backoff Backoff // a custom Backoff to use for errors
-}
-
-// NewBulkProcessorService creates a new BulkProcessorService.
-func NewBulkProcessorService(client *Client) *BulkProcessorService {
- return &BulkProcessorService{
- c: client,
- numWorkers: 1,
- bulkActions: 1000,
- bulkSize: 5 << 20, // 5 MB
- backoff: NewExponentialBackoff(
- time.Duration(200)*time.Millisecond,
- time.Duration(10000)*time.Millisecond,
- ),
- }
-}
-
-// BulkBeforeFunc defines the signature of callbacks that are executed
-// before a commit to Elasticsearch.
-type BulkBeforeFunc func(executionId int64, requests []BulkableRequest)
-
-// BulkAfterFunc defines the signature of callbacks that are executed
-// after a commit to Elasticsearch. The err parameter signals an error.
-type BulkAfterFunc func(executionId int64, requests []BulkableRequest, response *BulkResponse, err error)
-
-// Before specifies a function to be executed before bulk requests get comitted
-// to Elasticsearch.
-func (s *BulkProcessorService) Before(fn BulkBeforeFunc) *BulkProcessorService {
- s.beforeFn = fn
- return s
-}
-
-// After specifies a function to be executed when bulk requests have been
-// comitted to Elasticsearch. The After callback executes both when the
-// commit was successful as well as on failures.
-func (s *BulkProcessorService) After(fn BulkAfterFunc) *BulkProcessorService {
- s.afterFn = fn
- return s
-}
-
-// Name is an optional name to identify this bulk processor.
-func (s *BulkProcessorService) Name(name string) *BulkProcessorService {
- s.name = name
- return s
-}
-
-// Workers is the number of concurrent workers allowed to be
-// executed. Defaults to 1 and must be greater or equal to 1.
-func (s *BulkProcessorService) Workers(num int) *BulkProcessorService {
- s.numWorkers = num
- return s
-}
-
-// BulkActions specifies when to flush based on the number of actions
-// currently added. Defaults to 1000 and can be set to -1 to be disabled.
-func (s *BulkProcessorService) BulkActions(bulkActions int) *BulkProcessorService {
- s.bulkActions = bulkActions
- return s
-}
-
-// BulkSize specifies when to flush based on the size (in bytes) of the actions
-// currently added. Defaults to 5 MB and can be set to -1 to be disabled.
-func (s *BulkProcessorService) BulkSize(bulkSize int) *BulkProcessorService {
- s.bulkSize = bulkSize
- return s
-}
-
-// FlushInterval specifies when to flush at the end of the given interval.
-// This is disabled by default. If you want the bulk processor to
-// operate completely asynchronously, set both BulkActions and BulkSize to
-// -1 and set the FlushInterval to a meaningful interval.
-func (s *BulkProcessorService) FlushInterval(interval time.Duration) *BulkProcessorService {
- s.flushInterval = interval
- return s
-}
-
-// Stats tells bulk processor to gather stats while running.
-// Use Stats to return the stats. This is disabled by default.
-func (s *BulkProcessorService) Stats(wantStats bool) *BulkProcessorService {
- s.wantStats = wantStats
- return s
-}
-
-// Backoff sets the backoff strategy to use for errors.
-func (s *BulkProcessorService) Backoff(backoff Backoff) *BulkProcessorService {
- s.backoff = backoff
- return s
-}
-
-// Do creates a new BulkProcessor and starts it.
-// Consider the BulkProcessor as a running instance that accepts bulk requests
-// and commits them to Elasticsearch, spreading the work across one or more
-// workers.
-//
-// You can interoperate with the BulkProcessor returned by Do, e.g. Start and
-// Stop (or Close) it.
-//
-// Context is an optional context that is passed into the bulk request
-// service calls. In contrast to other operations, this context is used in
-// a long running process. You could use it to pass e.g. loggers, but you
-// shouldn't use it for cancellation.
-//
-// Calling Do several times returns new BulkProcessors. You probably don't
-// want to do this. BulkProcessorService implements just a builder pattern.
-func (s *BulkProcessorService) Do(ctx context.Context) (*BulkProcessor, error) {
- p := newBulkProcessor(
- s.c,
- s.beforeFn,
- s.afterFn,
- s.name,
- s.numWorkers,
- s.bulkActions,
- s.bulkSize,
- s.flushInterval,
- s.wantStats,
- s.backoff)
-
- err := p.Start(ctx)
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-// -- Bulk Processor Statistics --
-
-// BulkProcessorStats contains various statistics of a bulk processor
-// while it is running. Use the Stats func to return it while running.
-type BulkProcessorStats struct {
- Flushed int64 // number of times the flush interval has been invoked
- Committed int64 // # of times workers committed bulk requests
- Indexed int64 // # of requests indexed
- Created int64 // # of requests that ES reported as creates (201)
- Updated int64 // # of requests that ES reported as updates
- Deleted int64 // # of requests that ES reported as deletes
- Succeeded int64 // # of requests that ES reported as successful
- Failed int64 // # of requests that ES reported as failed
-
- Workers []*BulkProcessorWorkerStats // stats for each worker
-}
-
-// BulkProcessorWorkerStats represents per-worker statistics.
-type BulkProcessorWorkerStats struct {
- Queued int64 // # of requests queued in this worker
- LastDuration time.Duration // duration of last commit
-}
-
-// newBulkProcessorStats initializes and returns a BulkProcessorStats struct.
-func newBulkProcessorStats(workers int) *BulkProcessorStats {
- stats := &BulkProcessorStats{
- Workers: make([]*BulkProcessorWorkerStats, workers),
- }
- for i := 0; i < workers; i++ {
- stats.Workers[i] = &BulkProcessorWorkerStats{}
- }
- return stats
-}
-
-func (st *BulkProcessorStats) dup() *BulkProcessorStats {
- dst := new(BulkProcessorStats)
- dst.Flushed = st.Flushed
- dst.Committed = st.Committed
- dst.Indexed = st.Indexed
- dst.Created = st.Created
- dst.Updated = st.Updated
- dst.Deleted = st.Deleted
- dst.Succeeded = st.Succeeded
- dst.Failed = st.Failed
- for _, src := range st.Workers {
- dst.Workers = append(dst.Workers, src.dup())
- }
- return dst
-}
-
-func (st *BulkProcessorWorkerStats) dup() *BulkProcessorWorkerStats {
- dst := new(BulkProcessorWorkerStats)
- dst.Queued = st.Queued
- dst.LastDuration = st.LastDuration
- return dst
-}
-
-// -- Bulk Processor --
-
-// BulkProcessor encapsulates a task that accepts bulk requests and
-// orchestrates committing them to Elasticsearch via one or more workers.
-//
-// BulkProcessor is returned by setting up a BulkProcessorService and
-// calling the Do method.
-type BulkProcessor struct {
- c *Client
- beforeFn BulkBeforeFunc
- afterFn BulkAfterFunc
- name string
- bulkActions int
- bulkSize int
- numWorkers int
- executionId int64
- requestsC chan BulkableRequest
- workerWg sync.WaitGroup
- workers []*bulkWorker
- flushInterval time.Duration
- flusherStopC chan struct{}
- wantStats bool
- backoff Backoff
-
- startedMu sync.Mutex // guards the following block
- started bool
-
- statsMu sync.Mutex // guards the following block
- stats *BulkProcessorStats
-
- stopReconnC chan struct{} // channel to signal stop reconnection attempts
-}
-
-func newBulkProcessor(
- client *Client,
- beforeFn BulkBeforeFunc,
- afterFn BulkAfterFunc,
- name string,
- numWorkers int,
- bulkActions int,
- bulkSize int,
- flushInterval time.Duration,
- wantStats bool,
- backoff Backoff) *BulkProcessor {
- return &BulkProcessor{
- c: client,
- beforeFn: beforeFn,
- afterFn: afterFn,
- name: name,
- numWorkers: numWorkers,
- bulkActions: bulkActions,
- bulkSize: bulkSize,
- flushInterval: flushInterval,
- wantStats: wantStats,
- backoff: backoff,
- }
-}
-
-// Start starts the bulk processor. If the processor is already started,
-// nil is returned.
-func (p *BulkProcessor) Start(ctx context.Context) error {
- p.startedMu.Lock()
- defer p.startedMu.Unlock()
-
- if p.started {
- return nil
- }
-
- // We must have at least one worker.
- if p.numWorkers < 1 {
- p.numWorkers = 1
- }
-
- p.requestsC = make(chan BulkableRequest)
- p.executionId = 0
- p.stats = newBulkProcessorStats(p.numWorkers)
- p.stopReconnC = make(chan struct{})
-
- // Create and start up workers.
- p.workers = make([]*bulkWorker, p.numWorkers)
- for i := 0; i < p.numWorkers; i++ {
- p.workerWg.Add(1)
- p.workers[i] = newBulkWorker(p, i)
- go p.workers[i].work(ctx)
- }
-
- // Start the ticker for flush (if enabled)
- if int64(p.flushInterval) > 0 {
- p.flusherStopC = make(chan struct{})
- go p.flusher(p.flushInterval)
- }
-
- p.started = true
-
- return nil
-}
-
-// Stop is an alias for Close.
-func (p *BulkProcessor) Stop() error {
- return p.Close()
-}
-
-// Close stops the bulk processor previously started with Do.
-// If it is already stopped, this is a no-op and nil is returned.
-//
-// By implementing Close, BulkProcessor implements the io.Closer interface.
-func (p *BulkProcessor) Close() error {
- p.startedMu.Lock()
- defer p.startedMu.Unlock()
-
- // Already stopped? Do nothing.
- if !p.started {
- return nil
- }
-
- // Tell connection checkers to stop
- if p.stopReconnC != nil {
- close(p.stopReconnC)
- p.stopReconnC = nil
- }
-
- // Stop flusher (if enabled)
- if p.flusherStopC != nil {
- p.flusherStopC <- struct{}{}
- <-p.flusherStopC
- close(p.flusherStopC)
- p.flusherStopC = nil
- }
-
- // Stop all workers.
- close(p.requestsC)
- p.workerWg.Wait()
-
- p.started = false
-
- return nil
-}
-
-// Stats returns the latest bulk processor statistics.
-// Collecting stats must be enabled first by calling Stats(true) on
-// the service that created this processor.
-func (p *BulkProcessor) Stats() BulkProcessorStats {
- p.statsMu.Lock()
- defer p.statsMu.Unlock()
- return *p.stats.dup()
-}
-
-// Add adds a single request to commit by the BulkProcessorService.
-//
-// The caller is responsible for setting the index and type on the request.
-func (p *BulkProcessor) Add(request BulkableRequest) {
- p.requestsC <- request
-}
-
-// Flush manually asks all workers to commit their outstanding requests.
-// It returns only when all workers acknowledge completion.
-func (p *BulkProcessor) Flush() error {
- p.statsMu.Lock()
- p.stats.Flushed++
- p.statsMu.Unlock()
-
- for _, w := range p.workers {
- w.flushC <- struct{}{}
- <-w.flushAckC // wait for completion
- }
- return nil
-}
-
-// flusher is a single goroutine that periodically asks all workers to
-// commit their outstanding bulk requests. It is only started if
-// FlushInterval is greater than 0.
-func (p *BulkProcessor) flusher(interval time.Duration) {
- ticker := time.NewTicker(interval)
- defer ticker.Stop()
-
- for {
- select {
- case <-ticker.C: // Periodic flush
- p.Flush() // TODO swallow errors here?
-
- case <-p.flusherStopC:
- p.flusherStopC <- struct{}{}
- return
- }
- }
-}
-
-// -- Bulk Worker --
-
-// bulkWorker encapsulates a single worker, running in a goroutine,
-// receiving bulk requests and eventually committing them to Elasticsearch.
-// It is strongly bound to a BulkProcessor.
-type bulkWorker struct {
- p *BulkProcessor
- i int
- bulkActions int
- bulkSize int
- service *BulkService
- flushC chan struct{}
- flushAckC chan struct{}
-}
-
-// newBulkWorker creates a new bulkWorker instance.
-func newBulkWorker(p *BulkProcessor, i int) *bulkWorker {
- return &bulkWorker{
- p: p,
- i: i,
- bulkActions: p.bulkActions,
- bulkSize: p.bulkSize,
- service: NewBulkService(p.c),
- flushC: make(chan struct{}),
- flushAckC: make(chan struct{}),
- }
-}
-
-// work waits for bulk requests and manual flush calls on the respective
-// channels and is invoked as a goroutine when the bulk processor is started.
-func (w *bulkWorker) work(ctx context.Context) {
- defer func() {
- w.p.workerWg.Done()
- close(w.flushAckC)
- close(w.flushC)
- }()
-
- var stop bool
- for !stop {
- var err error
- select {
- case req, open := <-w.p.requestsC:
- if open {
- // Received a new request
- w.service.Add(req)
- if w.commitRequired() {
- err = w.commit(ctx)
- }
- } else {
- // Channel closed: Stop.
- stop = true
- if w.service.NumberOfActions() > 0 {
- err = w.commit(ctx)
- }
- }
-
- case <-w.flushC:
- // Commit outstanding requests
- if w.service.NumberOfActions() > 0 {
- err = w.commit(ctx)
- }
- w.flushAckC <- struct{}{}
- }
- if !stop && err != nil {
- waitForActive := func() {
- // Add back pressure to prevent Add calls from filling up the request queue
- ready := make(chan struct{})
- go w.waitForActiveConnection(ready)
- <-ready
- }
- if _, ok := err.(net.Error); ok {
- waitForActive()
- } else if IsConnErr(err) {
- waitForActive()
- }
- }
- }
-}
-
-// commit commits the bulk requests in the given service,
-// invoking callbacks as specified.
-func (w *bulkWorker) commit(ctx context.Context) error {
- var res *BulkResponse
-
- // commitFunc will commit bulk requests and, on failure, be retried
- // via exponential backoff
- commitFunc := func() error {
- var err error
- res, err = w.service.Do(ctx)
- return err
- }
- // notifyFunc will be called if retry fails
- notifyFunc := func(err error) {
- w.p.c.errorf("elastic: bulk processor %q failed but may retry: %v", w.p.name, err)
- }
-
- id := atomic.AddInt64(&w.p.executionId, 1)
-
- // Update # documents in queue before eventual retries
- w.p.statsMu.Lock()
- if w.p.wantStats {
- w.p.stats.Workers[w.i].Queued = int64(len(w.service.requests))
- }
- w.p.statsMu.Unlock()
-
- // Save requests because they will be reset in commitFunc
- reqs := w.service.requests
-
- // Invoke before callback
- if w.p.beforeFn != nil {
- w.p.beforeFn(id, reqs)
- }
-
- // Commit bulk requests
- err := RetryNotify(commitFunc, w.p.backoff, notifyFunc)
- w.updateStats(res)
- if err != nil {
- w.p.c.errorf("elastic: bulk processor %q failed: %v", w.p.name, err)
- }
-
- // Invoke after callback
- if w.p.afterFn != nil {
- w.p.afterFn(id, reqs, res, err)
- }
-
- return err
-}
-
-func (w *bulkWorker) waitForActiveConnection(ready chan<- struct{}) {
- defer close(ready)
-
- t := time.NewTicker(5 * time.Second)
- defer t.Stop()
-
- client := w.p.c
- stopReconnC := w.p.stopReconnC
- w.p.c.errorf("elastic: bulk processor %q is waiting for an active connection", w.p.name)
-
- // loop until a health check finds at least 1 active connection or the reconnection channel is closed
- for {
- select {
- case _, ok := <-stopReconnC:
- if !ok {
- w.p.c.errorf("elastic: bulk processor %q active connection check interrupted", w.p.name)
- return
- }
- case <-t.C:
- client.healthcheck(time.Duration(3)*time.Second, true)
- if client.mustActiveConn() == nil {
- // found an active connection
- // exit and signal done to the WaitGroup
- return
- }
- }
- }
-}
-
-func (w *bulkWorker) updateStats(res *BulkResponse) {
- // Update stats
- if res != nil {
- w.p.statsMu.Lock()
- if w.p.wantStats {
- w.p.stats.Committed++
- if res != nil {
- w.p.stats.Indexed += int64(len(res.Indexed()))
- w.p.stats.Created += int64(len(res.Created()))
- w.p.stats.Updated += int64(len(res.Updated()))
- w.p.stats.Deleted += int64(len(res.Deleted()))
- w.p.stats.Succeeded += int64(len(res.Succeeded()))
- w.p.stats.Failed += int64(len(res.Failed()))
- }
- w.p.stats.Workers[w.i].Queued = int64(len(w.service.requests))
- w.p.stats.Workers[w.i].LastDuration = time.Duration(int64(res.Took)) * time.Millisecond
- }
- w.p.statsMu.Unlock()
- }
-}
-
-// commitRequired returns true if the service has to commit its
-// bulk requests. This can be either because the number of actions
-// or the estimated size in bytes is larger than specified in the
-// BulkProcessorService.
-func (w *bulkWorker) commitRequired() bool {
- if w.bulkActions >= 0 && w.service.NumberOfActions() >= w.bulkActions {
- return true
- }
- if w.bulkSize >= 0 && w.service.EstimatedSizeInBytes() >= int64(w.bulkSize) {
- return true
- }
- return false
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_processor_test.go b/vendor/github.com/olivere/elastic/bulk_processor_test.go
deleted file mode 100644
index bb97ca217..000000000
--- a/vendor/github.com/olivere/elastic/bulk_processor_test.go
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "math/rand"
- "sync/atomic"
- "testing"
- "time"
-)
-
-func TestBulkProcessorDefaults(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- p := client.BulkProcessor()
- if p == nil {
- t.Fatalf("expected BulkProcessorService; got: %v", p)
- }
- if got, want := p.name, ""; got != want {
- t.Errorf("expected %q; got: %q", want, got)
- }
- if got, want := p.numWorkers, 1; got != want {
- t.Errorf("expected %d; got: %d", want, got)
- }
- if got, want := p.bulkActions, 1000; got != want {
- t.Errorf("expected %d; got: %d", want, got)
- }
- if got, want := p.bulkSize, 5*1024*1024; got != want {
- t.Errorf("expected %d; got: %d", want, got)
- }
- if got, want := p.flushInterval, time.Duration(0); got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := p.wantStats, false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if p.backoff == nil {
- t.Fatalf("expected non-nill backoff; got: %v", p.backoff)
- }
-}
-
-func TestBulkProcessorCommitOnBulkActions(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- testBulkProcessor(t,
- 10000,
- client.BulkProcessor().
- Name("Actions-1").
- Workers(1).
- BulkActions(100).
- BulkSize(-1),
- )
-
- testBulkProcessor(t,
- 10000,
- client.BulkProcessor().
- Name("Actions-2").
- Workers(2).
- BulkActions(100).
- BulkSize(-1),
- )
-}
-
-func TestBulkProcessorCommitOnBulkSize(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- testBulkProcessor(t,
- 10000,
- client.BulkProcessor().
- Name("Size-1").
- Workers(1).
- BulkActions(-1).
- BulkSize(64*1024),
- )
-
- testBulkProcessor(t,
- 10000,
- client.BulkProcessor().
- Name("Size-2").
- Workers(2).
- BulkActions(-1).
- BulkSize(64*1024),
- )
-}
-
-func TestBulkProcessorBasedOnFlushInterval(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- var beforeRequests int64
- var befores int64
- var afters int64
- var failures int64
- var afterRequests int64
-
- beforeFn := func(executionId int64, requests []BulkableRequest) {
- atomic.AddInt64(&beforeRequests, int64(len(requests)))
- atomic.AddInt64(&befores, 1)
- }
- afterFn := func(executionId int64, requests []BulkableRequest, response *BulkResponse, err error) {
- atomic.AddInt64(&afters, 1)
- if err != nil {
- atomic.AddInt64(&failures, 1)
- }
- atomic.AddInt64(&afterRequests, int64(len(requests)))
- }
-
- svc := client.BulkProcessor().
- Name("FlushInterval-1").
- Workers(2).
- BulkActions(-1).
- BulkSize(-1).
- FlushInterval(1 * time.Second).
- Before(beforeFn).
- After(afterFn)
-
- p, err := svc.Do(context.Background())
- if err != nil {
- t.Fatal(err)
- }
-
- const numDocs = 1000 // low-enough number that flush should be invoked
-
- for i := 1; i <= numDocs; i++ {
- tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))}
- request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet)
- p.Add(request)
- }
-
- // Should flush at least once
- time.Sleep(2 * time.Second)
-
- err = p.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if p.stats.Flushed == 0 {
- t.Errorf("expected at least 1 flush; got: %d", p.stats.Flushed)
- }
- if got, want := beforeRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to before callback; got: %d", want, got)
- }
- if got, want := afterRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to after callback; got: %d", want, got)
- }
- if befores == 0 {
- t.Error("expected at least 1 call to before callback")
- }
- if afters == 0 {
- t.Error("expected at least 1 call to after callback")
- }
- if failures != 0 {
- t.Errorf("expected 0 calls to failure callback; got: %d", failures)
- }
-
- // Check number of documents that were bulk indexed
- _, err = p.c.Flush(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err := p.c.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != int64(numDocs) {
- t.Fatalf("expected %d documents; got: %d", numDocs, count)
- }
-}
-
-func TestBulkProcessorClose(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- var beforeRequests int64
- var befores int64
- var afters int64
- var failures int64
- var afterRequests int64
-
- beforeFn := func(executionId int64, requests []BulkableRequest) {
- atomic.AddInt64(&beforeRequests, int64(len(requests)))
- atomic.AddInt64(&befores, 1)
- }
- afterFn := func(executionId int64, requests []BulkableRequest, response *BulkResponse, err error) {
- atomic.AddInt64(&afters, 1)
- if err != nil {
- atomic.AddInt64(&failures, 1)
- }
- atomic.AddInt64(&afterRequests, int64(len(requests)))
- }
-
- p, err := client.BulkProcessor().
- Name("FlushInterval-1").
- Workers(2).
- BulkActions(-1).
- BulkSize(-1).
- FlushInterval(30 * time.Second). // 30 seconds to flush
- Before(beforeFn).After(afterFn).
- Do(context.Background())
- if err != nil {
- t.Fatal(err)
- }
-
- const numDocs = 1000 // low-enough number that flush should be invoked
-
- for i := 1; i <= numDocs; i++ {
- tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))}
- request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet)
- p.Add(request)
- }
-
- // Should not flush because 30s > 1s
- time.Sleep(1 * time.Second)
-
- // Close should flush
- err = p.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- if p.stats.Flushed != 0 {
- t.Errorf("expected no flush; got: %d", p.stats.Flushed)
- }
- if got, want := beforeRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to before callback; got: %d", want, got)
- }
- if got, want := afterRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to after callback; got: %d", want, got)
- }
- if befores == 0 {
- t.Error("expected at least 1 call to before callback")
- }
- if afters == 0 {
- t.Error("expected at least 1 call to after callback")
- }
- if failures != 0 {
- t.Errorf("expected 0 calls to failure callback; got: %d", failures)
- }
-
- // Check number of documents that were bulk indexed
- _, err = p.c.Flush(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err := p.c.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != int64(numDocs) {
- t.Fatalf("expected %d documents; got: %d", numDocs, count)
- }
-}
-
-func TestBulkProcessorFlush(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- p, err := client.BulkProcessor().
- Name("ManualFlush").
- Workers(10).
- BulkActions(-1).
- BulkSize(-1).
- FlushInterval(30 * time.Second). // 30 seconds to flush
- Stats(true).
- Do(context.Background())
- if err != nil {
- t.Fatal(err)
- }
-
- const numDocs = 100
-
- for i := 1; i <= numDocs; i++ {
- tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))}
- request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet)
- p.Add(request)
- }
-
- // Should not flush because 30s > 1s
- time.Sleep(1 * time.Second)
-
- // No flush yet
- stats := p.Stats()
- if stats.Flushed != 0 {
- t.Errorf("expected no flush; got: %d", p.stats.Flushed)
- }
-
- // Manual flush
- err = p.Flush()
- if err != nil {
- t.Fatal(err)
- }
-
- time.Sleep(1 * time.Second)
-
- // Now flushed
- stats = p.Stats()
- if got, want := p.stats.Flushed, int64(1); got != want {
- t.Errorf("expected %d flush; got: %d", want, got)
- }
-
- // Close should not start another flush
- err = p.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- // Still 1 flush
- stats = p.Stats()
- if got, want := p.stats.Flushed, int64(1); got != want {
- t.Errorf("expected %d flush; got: %d", want, got)
- }
-
- // Check number of documents that were bulk indexed
- _, err = p.c.Flush(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err := p.c.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != int64(numDocs) {
- t.Fatalf("expected %d documents; got: %d", numDocs, count)
- }
-}
-
-// -- Helper --
-
-func testBulkProcessor(t *testing.T, numDocs int, svc *BulkProcessorService) {
- var beforeRequests int64
- var befores int64
- var afters int64
- var failures int64
- var afterRequests int64
-
- beforeFn := func(executionId int64, requests []BulkableRequest) {
- atomic.AddInt64(&beforeRequests, int64(len(requests)))
- atomic.AddInt64(&befores, 1)
- }
- afterFn := func(executionId int64, requests []BulkableRequest, response *BulkResponse, err error) {
- atomic.AddInt64(&afters, 1)
- if err != nil {
- atomic.AddInt64(&failures, 1)
- }
- atomic.AddInt64(&afterRequests, int64(len(requests)))
- }
-
- p, err := svc.Before(beforeFn).After(afterFn).Stats(true).Do(context.Background())
- if err != nil {
- t.Fatal(err)
- }
-
- for i := 1; i <= numDocs; i++ {
- tweet := tweet{User: "olivere", Message: fmt.Sprintf("%07d. %s", i, randomString(1+rand.Intn(63)))}
- request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet)
- p.Add(request)
- }
-
- err = p.Close()
- if err != nil {
- t.Fatal(err)
- }
-
- stats := p.Stats()
-
- if stats.Flushed != 0 {
- t.Errorf("expected no flush; got: %d", stats.Flushed)
- }
- if stats.Committed <= 0 {
- t.Errorf("expected committed > %d; got: %d", 0, stats.Committed)
- }
- if got, want := stats.Indexed, int64(numDocs); got != want {
- t.Errorf("expected indexed = %d; got: %d", want, got)
- }
- if got, want := stats.Created, int64(0); got != want {
- t.Errorf("expected created = %d; got: %d", want, got)
- }
- if got, want := stats.Updated, int64(0); got != want {
- t.Errorf("expected updated = %d; got: %d", want, got)
- }
- if got, want := stats.Deleted, int64(0); got != want {
- t.Errorf("expected deleted = %d; got: %d", want, got)
- }
- if got, want := stats.Succeeded, int64(numDocs); got != want {
- t.Errorf("expected succeeded = %d; got: %d", want, got)
- }
- if got, want := stats.Failed, int64(0); got != want {
- t.Errorf("expected failed = %d; got: %d", want, got)
- }
- if got, want := beforeRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to before callback; got: %d", want, got)
- }
- if got, want := afterRequests, int64(numDocs); got != want {
- t.Errorf("expected %d requests to after callback; got: %d", want, got)
- }
- if befores == 0 {
- t.Error("expected at least 1 call to before callback")
- }
- if afters == 0 {
- t.Error("expected at least 1 call to after callback")
- }
- if failures != 0 {
- t.Errorf("expected 0 calls to failure callback; got: %d", failures)
- }
-
- // Check number of documents that were bulk indexed
- _, err = p.c.Flush(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err := p.c.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != int64(numDocs) {
- t.Fatalf("expected %d documents; got: %d", numDocs, count)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_request.go b/vendor/github.com/olivere/elastic/bulk_request.go
deleted file mode 100644
index ce3bf0768..000000000
--- a/vendor/github.com/olivere/elastic/bulk_request.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
-)
-
-// -- Bulkable request (index/update/delete) --
-
-// BulkableRequest is a generic interface to bulkable requests.
-type BulkableRequest interface {
- fmt.Stringer
- Source() ([]string, error)
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_test.go b/vendor/github.com/olivere/elastic/bulk_test.go
deleted file mode 100644
index f31ed6613..000000000
--- a/vendor/github.com/olivere/elastic/bulk_test.go
+++ /dev/null
@@ -1,600 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "math/rand"
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-func TestBulk(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Dancing all night long. Yeah."}
-
- index1Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(tweet1)
- index2Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("2").Doc(tweet2)
- delete1Req := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
-
- bulkRequest := client.Bulk()
- bulkRequest = bulkRequest.Add(index1Req)
- bulkRequest = bulkRequest.Add(index2Req)
- bulkRequest = bulkRequest.Add(delete1Req)
-
- if bulkRequest.NumberOfActions() != 3 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 3, bulkRequest.NumberOfActions())
- }
-
- bulkResponse, err := bulkRequest.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if bulkResponse == nil {
- t.Errorf("expected bulkResponse to be != nil; got nil")
- }
-
- if bulkRequest.NumberOfActions() != 0 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 0, bulkRequest.NumberOfActions())
- }
-
- // Document with Id="1" should not exist
- exists, err := client.Exists().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if exists {
- t.Errorf("expected exists %v; got %v", false, exists)
- }
-
- // Document with Id="2" should exist
- exists, err = client.Exists().Index(testIndexName).Type("doc").Id("2").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Errorf("expected exists %v; got %v", true, exists)
- }
-
- // Update
- updateDoc := struct {
- Retweets int `json:"retweets"`
- }{
- 42,
- }
- update1Req := NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("2").Doc(&updateDoc)
- bulkRequest = client.Bulk()
- bulkRequest = bulkRequest.Add(update1Req)
-
- if bulkRequest.NumberOfActions() != 1 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 1, bulkRequest.NumberOfActions())
- }
-
- bulkResponse, err = bulkRequest.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if bulkResponse == nil {
- t.Errorf("expected bulkResponse to be != nil; got nil")
- }
-
- if bulkRequest.NumberOfActions() != 0 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 0, bulkRequest.NumberOfActions())
- }
-
- // Document with Id="1" should have a retweets count of 42
- doc, err := client.Get().Index(testIndexName).Type("doc").Id("2").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if doc == nil {
- t.Fatal("expected doc to be != nil; got nil")
- }
- if !doc.Found {
- t.Fatalf("expected doc to be found; got found = %v", doc.Found)
- }
- if doc.Source == nil {
- t.Fatal("expected doc source to be != nil; got nil")
- }
- var updatedTweet tweet
- err = json.Unmarshal(*doc.Source, &updatedTweet)
- if err != nil {
- t.Fatal(err)
- }
- if updatedTweet.Retweets != 42 {
- t.Errorf("expected updated tweet retweets = %v; got %v", 42, updatedTweet.Retweets)
- }
-
- // Update with script
- update2Req := NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("2").
- RetryOnConflict(3).
- Script(NewScript("ctx._source.retweets += params.v").Param("v", 1))
- bulkRequest = client.Bulk()
- bulkRequest = bulkRequest.Add(update2Req)
- if bulkRequest.NumberOfActions() != 1 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 1, bulkRequest.NumberOfActions())
- }
- bulkResponse, err = bulkRequest.Refresh("wait_for").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if bulkResponse == nil {
- t.Errorf("expected bulkResponse to be != nil; got nil")
- }
-
- if bulkRequest.NumberOfActions() != 0 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 0, bulkRequest.NumberOfActions())
- }
-
- // Document with Id="1" should have a retweets count of 43
- doc, err = client.Get().Index(testIndexName).Type("doc").Id("2").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if doc == nil {
- t.Fatal("expected doc to be != nil; got nil")
- }
- if !doc.Found {
- t.Fatalf("expected doc to be found; got found = %v", doc.Found)
- }
- if doc.Source == nil {
- t.Fatal("expected doc source to be != nil; got nil")
- }
- err = json.Unmarshal(*doc.Source, &updatedTweet)
- if err != nil {
- t.Fatal(err)
- }
- if updatedTweet.Retweets != 43 {
- t.Errorf("expected updated tweet retweets = %v; got %v", 43, updatedTweet.Retweets)
- }
-}
-
-func TestBulkWithIndexSetOnClient(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Dancing all night long. Yeah."}
-
- index1Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(tweet1).Routing("1")
- index2Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("2").Doc(tweet2)
- delete1Req := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
-
- bulkRequest := client.Bulk().Index(testIndexName).Type("doc")
- bulkRequest = bulkRequest.Add(index1Req)
- bulkRequest = bulkRequest.Add(index2Req)
- bulkRequest = bulkRequest.Add(delete1Req)
-
- if bulkRequest.NumberOfActions() != 3 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 3, bulkRequest.NumberOfActions())
- }
-
- bulkResponse, err := bulkRequest.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if bulkResponse == nil {
- t.Errorf("expected bulkResponse to be != nil; got nil")
- }
-
- // Document with Id="1" should not exist
- exists, err := client.Exists().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if exists {
- t.Errorf("expected exists %v; got %v", false, exists)
- }
-
- // Document with Id="2" should exist
- exists, err = client.Exists().Index(testIndexName).Type("doc").Id("2").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Errorf("expected exists %v; got %v", true, exists)
- }
-}
-
-func TestBulkIndexDeleteUpdate(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- //client := setupTestClientAndCreateIndexAndLog(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Dancing all night long. Yeah."}
-
- index1Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(tweet1)
- index2Req := NewBulkIndexRequest().OpType("create").Index(testIndexName).Type("doc").Id("2").Doc(tweet2)
- delete1Req := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
- update2Req := NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("2").
- ReturnSource(true).
- Doc(struct {
- Retweets int `json:"retweets"`
- }{
- Retweets: 42,
- })
-
- bulkRequest := client.Bulk()
- bulkRequest = bulkRequest.Add(index1Req)
- bulkRequest = bulkRequest.Add(index2Req)
- bulkRequest = bulkRequest.Add(delete1Req)
- bulkRequest = bulkRequest.Add(update2Req)
-
- if bulkRequest.NumberOfActions() != 4 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 4, bulkRequest.NumberOfActions())
- }
-
- expected := `{"index":{"_index":"` + testIndexName + `","_id":"1","_type":"doc"}}
-{"user":"olivere","message":"Welcome to Golang and Elasticsearch.","retweets":0,"created":"0001-01-01T00:00:00Z"}
-{"create":{"_index":"` + testIndexName + `","_id":"2","_type":"doc"}}
-{"user":"sandrae","message":"Dancing all night long. Yeah.","retweets":0,"created":"0001-01-01T00:00:00Z"}
-{"delete":{"_index":"` + testIndexName + `","_type":"doc","_id":"1"}}
-{"update":{"_index":"` + testIndexName + `","_type":"doc","_id":"2"}}
-{"doc":{"retweets":42},"_source":true}
-`
- got, err := bulkRequest.bodyAsString()
- if err != nil {
- t.Fatalf("expected no error, got: %v", err)
- }
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-
- // Run the bulk request
- bulkResponse, err := bulkRequest.Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if bulkResponse == nil {
- t.Errorf("expected bulkResponse to be != nil; got nil")
- }
- if bulkResponse.Took == 0 {
- t.Errorf("expected took to be > 0; got %d", bulkResponse.Took)
- }
- if bulkResponse.Errors {
- t.Errorf("expected errors to be %v; got %v", false, bulkResponse.Errors)
- }
- if len(bulkResponse.Items) != 4 {
- t.Fatalf("expected 4 result items; got %d", len(bulkResponse.Items))
- }
-
- // Indexed actions
- indexed := bulkResponse.Indexed()
- if indexed == nil {
- t.Fatal("expected indexed to be != nil; got nil")
- }
- if len(indexed) != 1 {
- t.Fatalf("expected len(indexed) == %d; got %d", 1, len(indexed))
- }
- if indexed[0].Id != "1" {
- t.Errorf("expected indexed[0].Id == %s; got %s", "1", indexed[0].Id)
- }
- if indexed[0].Status != 201 {
- t.Errorf("expected indexed[0].Status == %d; got %d", 201, indexed[0].Status)
- }
-
- // Created actions
- created := bulkResponse.Created()
- if created == nil {
- t.Fatal("expected created to be != nil; got nil")
- }
- if len(created) != 1 {
- t.Fatalf("expected len(created) == %d; got %d", 1, len(created))
- }
- if created[0].Id != "2" {
- t.Errorf("expected created[0].Id == %s; got %s", "2", created[0].Id)
- }
- if created[0].Status != 201 {
- t.Errorf("expected created[0].Status == %d; got %d", 201, created[0].Status)
- }
- if want, have := "created", created[0].Result; want != have {
- t.Errorf("expected created[0].Result == %q; got %q", want, have)
- }
-
- // Deleted actions
- deleted := bulkResponse.Deleted()
- if deleted == nil {
- t.Fatal("expected deleted to be != nil; got nil")
- }
- if len(deleted) != 1 {
- t.Fatalf("expected len(deleted) == %d; got %d", 1, len(deleted))
- }
- if deleted[0].Id != "1" {
- t.Errorf("expected deleted[0].Id == %s; got %s", "1", deleted[0].Id)
- }
- if deleted[0].Status != 200 {
- t.Errorf("expected deleted[0].Status == %d; got %d", 200, deleted[0].Status)
- }
- if want, have := "deleted", deleted[0].Result; want != have {
- t.Errorf("expected deleted[0].Result == %q; got %q", want, have)
- }
-
- // Updated actions
- updated := bulkResponse.Updated()
- if updated == nil {
- t.Fatal("expected updated to be != nil; got nil")
- }
- if len(updated) != 1 {
- t.Fatalf("expected len(updated) == %d; got %d", 1, len(updated))
- }
- if updated[0].Id != "2" {
- t.Errorf("expected updated[0].Id == %s; got %s", "2", updated[0].Id)
- }
- if updated[0].Status != 200 {
- t.Errorf("expected updated[0].Status == %d; got %d", 200, updated[0].Status)
- }
- if updated[0].Version != 2 {
- t.Errorf("expected updated[0].Version == %d; got %d", 2, updated[0].Version)
- }
- if want, have := "updated", updated[0].Result; want != have {
- t.Errorf("expected updated[0].Result == %q; got %q", want, have)
- }
- if updated[0].GetResult == nil {
- t.Fatalf("expected updated[0].GetResult to be != nil; got nil")
- }
- if updated[0].GetResult.Source == nil {
- t.Fatalf("expected updated[0].GetResult.Source to be != nil; got nil")
- }
- if want, have := true, updated[0].GetResult.Found; want != have {
- t.Fatalf("expected updated[0].GetResult.Found to be != %v; got %v", want, have)
- }
- var doc tweet
- if err := json.Unmarshal(*updated[0].GetResult.Source, &doc); err != nil {
- t.Fatalf("expected to unmarshal updated[0].GetResult.Source; got %v", err)
- }
- if want, have := 42, doc.Retweets; want != have {
- t.Fatalf("expected updated tweet to have Retweets = %v; got %v", want, have)
- }
-
- // Succeeded actions
- succeeded := bulkResponse.Succeeded()
- if succeeded == nil {
- t.Fatal("expected succeeded to be != nil; got nil")
- }
- if len(succeeded) != 4 {
- t.Fatalf("expected len(succeeded) == %d; got %d", 4, len(succeeded))
- }
-
- // ById
- id1Results := bulkResponse.ById("1")
- if id1Results == nil {
- t.Fatal("expected id1Results to be != nil; got nil")
- }
- if len(id1Results) != 2 {
- t.Fatalf("expected len(id1Results) == %d; got %d", 2, len(id1Results))
- }
- if id1Results[0].Id != "1" {
- t.Errorf("expected id1Results[0].Id == %s; got %s", "1", id1Results[0].Id)
- }
- if id1Results[0].Status != 201 {
- t.Errorf("expected id1Results[0].Status == %d; got %d", 201, id1Results[0].Status)
- }
- if id1Results[0].Version != 1 {
- t.Errorf("expected id1Results[0].Version == %d; got %d", 1, id1Results[0].Version)
- }
- if id1Results[1].Id != "1" {
- t.Errorf("expected id1Results[1].Id == %s; got %s", "1", id1Results[1].Id)
- }
- if id1Results[1].Status != 200 {
- t.Errorf("expected id1Results[1].Status == %d; got %d", 200, id1Results[1].Status)
- }
- if id1Results[1].Version != 2 {
- t.Errorf("expected id1Results[1].Version == %d; got %d", 2, id1Results[1].Version)
- }
-}
-
-func TestFailedBulkRequests(t *testing.T) {
- js := `{
- "took" : 2,
- "errors" : true,
- "items" : [ {
- "index" : {
- "_index" : "elastic-test",
- "_type" : "doc",
- "_id" : "1",
- "_version" : 1,
- "status" : 201
- }
- }, {
- "create" : {
- "_index" : "elastic-test",
- "_type" : "doc",
- "_id" : "2",
- "_version" : 1,
- "status" : 423,
- "error" : {
- "type":"routing_missing_exception",
- "reason":"routing is required for [elastic-test2]/[comment]/[1]"
- }
- }
- }, {
- "delete" : {
- "_index" : "elastic-test",
- "_type" : "doc",
- "_id" : "1",
- "_version" : 2,
- "status" : 404,
- "found" : false
- }
- }, {
- "update" : {
- "_index" : "elastic-test",
- "_type" : "doc",
- "_id" : "2",
- "_version" : 2,
- "status" : 200
- }
- } ]
-}`
-
- var resp BulkResponse
- err := json.Unmarshal([]byte(js), &resp)
- if err != nil {
- t.Fatal(err)
- }
- failed := resp.Failed()
- if len(failed) != 2 {
- t.Errorf("expected %d failed items; got: %d", 2, len(failed))
- }
-}
-
-func TestBulkEstimatedSizeInBytes(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Dancing all night long. Yeah."}
-
- index1Req := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(tweet1)
- index2Req := NewBulkIndexRequest().OpType("create").Index(testIndexName).Type("doc").Id("2").Doc(tweet2)
- delete1Req := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
- update2Req := NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("2").
- Doc(struct {
- Retweets int `json:"retweets"`
- }{
- Retweets: 42,
- })
-
- bulkRequest := client.Bulk()
- bulkRequest = bulkRequest.Add(index1Req)
- bulkRequest = bulkRequest.Add(index2Req)
- bulkRequest = bulkRequest.Add(delete1Req)
- bulkRequest = bulkRequest.Add(update2Req)
-
- if bulkRequest.NumberOfActions() != 4 {
- t.Errorf("expected bulkRequest.NumberOfActions %d; got %d", 4, bulkRequest.NumberOfActions())
- }
-
- // The estimated size of the bulk request in bytes must be at least
- // the length of the body request.
- raw, err := bulkRequest.bodyAsString()
- if err != nil {
- t.Fatal(err)
- }
- rawlen := int64(len([]byte(raw)))
-
- if got, want := bulkRequest.EstimatedSizeInBytes(), rawlen; got < want {
- t.Errorf("expected an EstimatedSizeInBytes = %d; got: %v", want, got)
- }
-
- // Reset should also reset the calculated estimated byte size
- bulkRequest.reset()
-
- if got, want := bulkRequest.EstimatedSizeInBytes(), int64(0); got != want {
- t.Errorf("expected an EstimatedSizeInBytes = %d; got: %v", want, got)
- }
-}
-
-func TestBulkEstimateSizeInBytesLength(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- s := client.Bulk()
- r := NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1")
- s = s.Add(r)
- if got, want := s.estimateSizeInBytes(r), int64(1+len(r.String())); got != want {
- t.Fatalf("expected %d; got: %d", want, got)
- }
-}
-
-func TestBulkContentType(t *testing.T) {
- var header http.Header
- ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- header = r.Header
- fmt.Fprintln(w, `{}`)
- }))
- defer ts.Close()
-
- client, err := NewSimpleClient(SetURL(ts.URL))
- if err != nil {
- t.Fatal(err)
- }
- indexReq := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."})
- if _, err := client.Bulk().Add(indexReq).Do(context.Background()); err != nil {
- t.Fatal(err)
- }
- if header == nil {
- t.Fatalf("expected header, got %v", header)
- }
- if want, have := "application/x-ndjson", header.Get("Content-Type"); want != have {
- t.Fatalf("Content-Type: want %q, have %q", want, have)
- }
-}
-
-// -- Benchmarks --
-
-var benchmarkBulkEstimatedSizeInBytes int64
-
-func BenchmarkBulkEstimatedSizeInBytesWith1Request(b *testing.B) {
- client := setupTestClientAndCreateIndex(b)
- s := client.Bulk()
- var result int64
- for n := 0; n < b.N; n++ {
- s = s.Add(NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(struct{ A string }{"1"}))
- s = s.Add(NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("1").Doc(struct{ A string }{"2"}))
- s = s.Add(NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1"))
- result = s.EstimatedSizeInBytes()
- s.reset()
- }
- b.ReportAllocs()
- benchmarkBulkEstimatedSizeInBytes = result // ensure the compiler doesn't optimize
-}
-
-func BenchmarkBulkEstimatedSizeInBytesWith100Requests(b *testing.B) {
- client := setupTestClientAndCreateIndex(b)
- s := client.Bulk()
- var result int64
- for n := 0; n < b.N; n++ {
- for i := 0; i < 100; i++ {
- s = s.Add(NewBulkIndexRequest().Index(testIndexName).Type("doc").Id("1").Doc(struct{ A string }{"1"}))
- s = s.Add(NewBulkUpdateRequest().Index(testIndexName).Type("doc").Id("1").Doc(struct{ A string }{"2"}))
- s = s.Add(NewBulkDeleteRequest().Index(testIndexName).Type("doc").Id("1"))
- }
- result = s.EstimatedSizeInBytes()
- s.reset()
- }
- b.ReportAllocs()
- benchmarkBulkEstimatedSizeInBytes = result // ensure the compiler doesn't optimize
-}
-
-func BenchmarkBulkAllocs(b *testing.B) {
- b.Run("1000 docs with 64 byte", func(b *testing.B) { benchmarkBulkAllocs(b, 64, 1000) })
- b.Run("1000 docs with 1 KiB", func(b *testing.B) { benchmarkBulkAllocs(b, 1024, 1000) })
- b.Run("1000 docs with 4 KiB", func(b *testing.B) { benchmarkBulkAllocs(b, 4096, 1000) })
- b.Run("1000 docs with 16 KiB", func(b *testing.B) { benchmarkBulkAllocs(b, 16*1024, 1000) })
- b.Run("1000 docs with 64 KiB", func(b *testing.B) { benchmarkBulkAllocs(b, 64*1024, 1000) })
- b.Run("1000 docs with 256 KiB", func(b *testing.B) { benchmarkBulkAllocs(b, 256*1024, 1000) })
- b.Run("1000 docs with 1 MiB", func(b *testing.B) { benchmarkBulkAllocs(b, 1024*1024, 1000) })
-}
-
-const (
- charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"
-)
-
-func benchmarkBulkAllocs(b *testing.B, size, num int) {
- buf := make([]byte, size)
- for i := range buf {
- buf[i] = charset[rand.Intn(len(charset))]
- }
-
- s := &BulkService{}
- n := 0
- for {
- n++
- s = s.Add(NewBulkIndexRequest().Index("test").Type("doc").Id("1").Doc(struct {
- S string `json:"s"`
- }{
- S: string(buf),
- }))
- if n >= num {
- break
- }
- }
- for i := 0; i < b.N; i++ {
- s.bodyAsString()
- }
- b.ReportAllocs()
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_update_request.go b/vendor/github.com/olivere/elastic/bulk_update_request.go
deleted file mode 100644
index 50e5adb8f..000000000
--- a/vendor/github.com/olivere/elastic/bulk_update_request.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-//go:generate easyjson bulk_update_request.go
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// BulkUpdateRequest is a request to update a document in Elasticsearch.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-type BulkUpdateRequest struct {
- BulkableRequest
- index string
- typ string
- id string
-
- routing string
- parent string
- script *Script
- scriptedUpsert *bool
- version int64 // default is MATCH_ANY
- versionType string // default is "internal"
- retryOnConflict *int
- upsert interface{}
- docAsUpsert *bool
- detectNoop *bool
- doc interface{}
- returnSource *bool
-
- source []string
-
- useEasyJSON bool
-}
-
-//easyjson:json
-type bulkUpdateRequestCommand map[string]bulkUpdateRequestCommandOp
-
-//easyjson:json
-type bulkUpdateRequestCommandOp struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Parent string `json:"parent,omitempty"`
- // RetryOnConflict is "_retry_on_conflict" for 6.0 and "retry_on_conflict" for 6.1+.
- RetryOnConflict *int `json:"retry_on_conflict,omitempty"`
- Routing string `json:"routing,omitempty"`
- Version int64 `json:"version,omitempty"`
- VersionType string `json:"version_type,omitempty"`
-}
-
-//easyjson:json
-type bulkUpdateRequestCommandData struct {
- DetectNoop *bool `json:"detect_noop,omitempty"`
- Doc interface{} `json:"doc,omitempty"`
- DocAsUpsert *bool `json:"doc_as_upsert,omitempty"`
- Script interface{} `json:"script,omitempty"`
- ScriptedUpsert *bool `json:"scripted_upsert,omitempty"`
- Upsert interface{} `json:"upsert,omitempty"`
- Source *bool `json:"_source,omitempty"`
-}
-
-// NewBulkUpdateRequest returns a new BulkUpdateRequest.
-func NewBulkUpdateRequest() *BulkUpdateRequest {
- return &BulkUpdateRequest{}
-}
-
-// UseEasyJSON is an experimental setting that enables serialization
-// with github.com/mailru/easyjson, which should in faster serialization
-// time and less allocations, but removed compatibility with encoding/json,
-// usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations
-// for details. This setting is disabled by default.
-func (r *BulkUpdateRequest) UseEasyJSON(enable bool) *BulkUpdateRequest {
- r.useEasyJSON = enable
- return r
-}
-
-// Index specifies the Elasticsearch index to use for this update request.
-// If unspecified, the index set on the BulkService will be used.
-func (r *BulkUpdateRequest) Index(index string) *BulkUpdateRequest {
- r.index = index
- r.source = nil
- return r
-}
-
-// Type specifies the Elasticsearch type to use for this update request.
-// If unspecified, the type set on the BulkService will be used.
-func (r *BulkUpdateRequest) Type(typ string) *BulkUpdateRequest {
- r.typ = typ
- r.source = nil
- return r
-}
-
-// Id specifies the identifier of the document to update.
-func (r *BulkUpdateRequest) Id(id string) *BulkUpdateRequest {
- r.id = id
- r.source = nil
- return r
-}
-
-// Routing specifies a routing value for the request.
-func (r *BulkUpdateRequest) Routing(routing string) *BulkUpdateRequest {
- r.routing = routing
- r.source = nil
- return r
-}
-
-// Parent specifies the identifier of the parent document (if available).
-func (r *BulkUpdateRequest) Parent(parent string) *BulkUpdateRequest {
- r.parent = parent
- r.source = nil
- return r
-}
-
-// Script specifies an update script.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html#bulk-update
-// and https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-scripting.html
-// for details.
-func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest {
- r.script = script
- r.source = nil
- return r
-}
-
-// ScripedUpsert specifies if your script will run regardless of
-// whether the document exists or not.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-update.html#_literal_scripted_upsert_literal
-func (r *BulkUpdateRequest) ScriptedUpsert(upsert bool) *BulkUpdateRequest {
- r.scriptedUpsert = &upsert
- r.source = nil
- return r
-}
-
-// RetryOnConflict specifies how often to retry in case of a version conflict.
-func (r *BulkUpdateRequest) RetryOnConflict(retryOnConflict int) *BulkUpdateRequest {
- r.retryOnConflict = &retryOnConflict
- r.source = nil
- return r
-}
-
-// Version indicates the version of the document as part of an optimistic
-// concurrency model.
-func (r *BulkUpdateRequest) Version(version int64) *BulkUpdateRequest {
- r.version = version
- r.source = nil
- return r
-}
-
-// VersionType can be "internal" (default), "external", "external_gte",
-// or "external_gt".
-func (r *BulkUpdateRequest) VersionType(versionType string) *BulkUpdateRequest {
- r.versionType = versionType
- r.source = nil
- return r
-}
-
-// Doc specifies the updated document.
-func (r *BulkUpdateRequest) Doc(doc interface{}) *BulkUpdateRequest {
- r.doc = doc
- r.source = nil
- return r
-}
-
-// DocAsUpsert indicates whether the contents of Doc should be used as
-// the Upsert value.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-update.html#_literal_doc_as_upsert_literal
-// for details.
-func (r *BulkUpdateRequest) DocAsUpsert(docAsUpsert bool) *BulkUpdateRequest {
- r.docAsUpsert = &docAsUpsert
- r.source = nil
- return r
-}
-
-// DetectNoop specifies whether changes that don't affect the document
-// should be ignored (true) or unignored (false). This is enabled by default
-// in Elasticsearch.
-func (r *BulkUpdateRequest) DetectNoop(detectNoop bool) *BulkUpdateRequest {
- r.detectNoop = &detectNoop
- r.source = nil
- return r
-}
-
-// Upsert specifies the document to use for upserts. It will be used for
-// create if the original document does not exist.
-func (r *BulkUpdateRequest) Upsert(doc interface{}) *BulkUpdateRequest {
- r.upsert = doc
- r.source = nil
- return r
-}
-
-// ReturnSource specifies whether Elasticsearch should return the source
-// after the update. In the request, this responds to the `_source` field.
-// It is false by default.
-func (r *BulkUpdateRequest) ReturnSource(source bool) *BulkUpdateRequest {
- r.returnSource = &source
- r.source = nil
- return r
-}
-
-// String returns the on-wire representation of the update request,
-// concatenated as a single string.
-func (r *BulkUpdateRequest) String() string {
- lines, err := r.Source()
- if err != nil {
- return fmt.Sprintf("error: %v", err)
- }
- return strings.Join(lines, "\n")
-}
-
-// Source returns the on-wire representation of the update request,
-// split into an action-and-meta-data line and an (optional) source line.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details.
-func (r *BulkUpdateRequest) Source() ([]string, error) {
- // { "update" : { "_index" : "test", "_type" : "type1", "_id" : "1", ... } }
- // { "doc" : { "field1" : "value1", ... } }
- // or
- // { "update" : { "_index" : "test", "_type" : "type1", "_id" : "1", ... } }
- // { "script" : { ... } }
-
- if r.source != nil {
- return r.source, nil
- }
-
- lines := make([]string, 2)
-
- // "update" ...
- updateCommand := bulkUpdateRequestCommandOp{
- Index: r.index,
- Type: r.typ,
- Id: r.id,
- Routing: r.routing,
- Parent: r.parent,
- Version: r.version,
- VersionType: r.versionType,
- RetryOnConflict: r.retryOnConflict,
- }
- command := bulkUpdateRequestCommand{
- "update": updateCommand,
- }
-
- var err error
- var body []byte
- if r.useEasyJSON {
- // easyjson
- body, err = command.MarshalJSON()
- } else {
- // encoding/json
- body, err = json.Marshal(command)
- }
- if err != nil {
- return nil, err
- }
-
- lines[0] = string(body)
-
- // 2nd line: {"doc" : { ... }} or {"script": {...}}
- data := bulkUpdateRequestCommandData{
- DocAsUpsert: r.docAsUpsert,
- DetectNoop: r.detectNoop,
- Upsert: r.upsert,
- ScriptedUpsert: r.scriptedUpsert,
- Doc: r.doc,
- Source: r.returnSource,
- }
- if r.script != nil {
- script, err := r.script.Source()
- if err != nil {
- return nil, err
- }
- data.Script = script
- }
-
- if r.useEasyJSON {
- // easyjson
- body, err = data.MarshalJSON()
- } else {
- // encoding/json
- body, err = json.Marshal(data)
- }
- if err != nil {
- return nil, err
- }
-
- lines[1] = string(body)
-
- r.source = lines
- return lines, nil
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_update_request_easyjson.go b/vendor/github.com/olivere/elastic/bulk_update_request_easyjson.go
deleted file mode 100644
index d2c2cbfc7..000000000
--- a/vendor/github.com/olivere/elastic/bulk_update_request_easyjson.go
+++ /dev/null
@@ -1,461 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package elastic
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjson1ed00e60DecodeGithubComOlivereElastic(in *jlexer.Lexer, out *bulkUpdateRequestCommandOp) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeString()
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "_index":
- out.Index = string(in.String())
- case "_type":
- out.Type = string(in.String())
- case "_id":
- out.Id = string(in.String())
- case "parent":
- out.Parent = string(in.String())
- case "retry_on_conflict":
- if in.IsNull() {
- in.Skip()
- out.RetryOnConflict = nil
- } else {
- if out.RetryOnConflict == nil {
- out.RetryOnConflict = new(int)
- }
- *out.RetryOnConflict = int(in.Int())
- }
- case "routing":
- out.Routing = string(in.String())
- case "version":
- out.Version = int64(in.Int64())
- case "version_type":
- out.VersionType = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson1ed00e60EncodeGithubComOlivereElastic(out *jwriter.Writer, in bulkUpdateRequestCommandOp) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Index != "" {
- const prefix string = ",\"_index\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Index))
- }
- if in.Type != "" {
- const prefix string = ",\"_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Type))
- }
- if in.Id != "" {
- const prefix string = ",\"_id\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Id))
- }
- if in.Parent != "" {
- const prefix string = ",\"parent\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Parent))
- }
- if in.RetryOnConflict != nil {
- const prefix string = ",\"retry_on_conflict\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int(int(*in.RetryOnConflict))
- }
- if in.Routing != "" {
- const prefix string = ",\"routing\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Routing))
- }
- if in.Version != 0 {
- const prefix string = ",\"version\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Version))
- }
- if in.VersionType != "" {
- const prefix string = ",\"version_type\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.VersionType))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkUpdateRequestCommandOp) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson1ed00e60EncodeGithubComOlivereElastic(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkUpdateRequestCommandOp) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson1ed00e60EncodeGithubComOlivereElastic(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkUpdateRequestCommandOp) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson1ed00e60DecodeGithubComOlivereElastic(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkUpdateRequestCommandOp) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson1ed00e60DecodeGithubComOlivereElastic(l, v)
-}
-func easyjson1ed00e60DecodeGithubComOlivereElastic1(in *jlexer.Lexer, out *bulkUpdateRequestCommandData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeString()
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "detect_noop":
- if in.IsNull() {
- in.Skip()
- out.DetectNoop = nil
- } else {
- if out.DetectNoop == nil {
- out.DetectNoop = new(bool)
- }
- *out.DetectNoop = bool(in.Bool())
- }
- case "doc":
- if m, ok := out.Doc.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := out.Doc.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- out.Doc = in.Interface()
- }
- case "doc_as_upsert":
- if in.IsNull() {
- in.Skip()
- out.DocAsUpsert = nil
- } else {
- if out.DocAsUpsert == nil {
- out.DocAsUpsert = new(bool)
- }
- *out.DocAsUpsert = bool(in.Bool())
- }
- case "script":
- if m, ok := out.Script.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := out.Script.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- out.Script = in.Interface()
- }
- case "scripted_upsert":
- if in.IsNull() {
- in.Skip()
- out.ScriptedUpsert = nil
- } else {
- if out.ScriptedUpsert == nil {
- out.ScriptedUpsert = new(bool)
- }
- *out.ScriptedUpsert = bool(in.Bool())
- }
- case "upsert":
- if m, ok := out.Upsert.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := out.Upsert.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- out.Upsert = in.Interface()
- }
- case "_source":
- if in.IsNull() {
- in.Skip()
- out.Source = nil
- } else {
- if out.Source == nil {
- out.Source = new(bool)
- }
- *out.Source = bool(in.Bool())
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson1ed00e60EncodeGithubComOlivereElastic1(out *jwriter.Writer, in bulkUpdateRequestCommandData) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DetectNoop != nil {
- const prefix string = ",\"detect_noop\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(*in.DetectNoop))
- }
- if in.Doc != nil {
- const prefix string = ",\"doc\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if m, ok := in.Doc.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := in.Doc.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(in.Doc))
- }
- }
- if in.DocAsUpsert != nil {
- const prefix string = ",\"doc_as_upsert\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(*in.DocAsUpsert))
- }
- if in.Script != nil {
- const prefix string = ",\"script\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if m, ok := in.Script.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := in.Script.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(in.Script))
- }
- }
- if in.ScriptedUpsert != nil {
- const prefix string = ",\"scripted_upsert\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(*in.ScriptedUpsert))
- }
- if in.Upsert != nil {
- const prefix string = ",\"upsert\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if m, ok := in.Upsert.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := in.Upsert.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(in.Upsert))
- }
- }
- if in.Source != nil {
- const prefix string = ",\"_source\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(*in.Source))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkUpdateRequestCommandData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson1ed00e60EncodeGithubComOlivereElastic1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkUpdateRequestCommandData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson1ed00e60EncodeGithubComOlivereElastic1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkUpdateRequestCommandData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson1ed00e60DecodeGithubComOlivereElastic1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkUpdateRequestCommandData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson1ed00e60DecodeGithubComOlivereElastic1(l, v)
-}
-func easyjson1ed00e60DecodeGithubComOlivereElastic2(in *jlexer.Lexer, out *bulkUpdateRequestCommand) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- *out = make(bulkUpdateRequestCommand)
- } else {
- *out = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v1 bulkUpdateRequestCommandOp
- (v1).UnmarshalEasyJSON(in)
- (*out)[key] = v1
- in.WantComma()
- }
- in.Delim('}')
- }
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjson1ed00e60EncodeGithubComOlivereElastic2(out *jwriter.Writer, in bulkUpdateRequestCommand) {
- if in == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v2First := true
- for v2Name, v2Value := range in {
- if v2First {
- v2First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v2Name))
- out.RawByte(':')
- (v2Value).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v bulkUpdateRequestCommand) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjson1ed00e60EncodeGithubComOlivereElastic2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v bulkUpdateRequestCommand) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson1ed00e60EncodeGithubComOlivereElastic2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *bulkUpdateRequestCommand) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson1ed00e60DecodeGithubComOlivereElastic2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *bulkUpdateRequestCommand) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson1ed00e60DecodeGithubComOlivereElastic2(l, v)
-}
diff --git a/vendor/github.com/olivere/elastic/bulk_update_request_test.go b/vendor/github.com/olivere/elastic/bulk_update_request_test.go
deleted file mode 100644
index 53e73bd40..000000000
--- a/vendor/github.com/olivere/elastic/bulk_update_request_test.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestBulkUpdateRequestSerialization(t *testing.T) {
- tests := []struct {
- Request BulkableRequest
- Expected []string
- }{
- // #0
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"1"}}`,
- `{"doc":{"counter":42}}`,
- },
- },
- // #1
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").
- Routing("123").
- RetryOnConflict(3).
- DocAsUpsert(true).
- Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"1","retry_on_conflict":3,"routing":"123"}}`,
- `{"doc":{"counter":42},"doc_as_upsert":true}`,
- },
- },
- // #2
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").
- RetryOnConflict(3).
- Script(NewScript(`ctx._source.retweets += param1`).Lang("javascript").Param("param1", 42)).
- Upsert(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"1","retry_on_conflict":3}}`,
- `{"script":{"lang":"javascript","params":{"param1":42},"source":"ctx._source.retweets += param1"},"upsert":{"counter":42}}`,
- },
- },
- // #3
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").DetectNoop(true).Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"1"}}`,
- `{"detect_noop":true,"doc":{"counter":42}}`,
- },
- },
- // #4
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").
- RetryOnConflict(3).
- ScriptedUpsert(true).
- Script(NewScript(`ctx._source.retweets += param1`).Lang("javascript").Param("param1", 42)).
- Upsert(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"1","retry_on_conflict":3}}`,
- `{"script":{"lang":"javascript","params":{"param1":42},"source":"ctx._source.retweets += param1"},"scripted_upsert":true,"upsert":{"counter":42}}`,
- },
- },
- // #5
- {
- Request: NewBulkUpdateRequest().Index("index1").Type("doc").Id("4").ReturnSource(true).Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }),
- Expected: []string{
- `{"update":{"_index":"index1","_type":"doc","_id":"4"}}`,
- `{"doc":{"counter":42},"_source":true}`,
- },
- },
- }
-
- for i, test := range tests {
- lines, err := test.Request.Source()
- if err != nil {
- t.Fatalf("#%d: expected no error, got: %v", i, err)
- }
- if lines == nil {
- t.Fatalf("#%d: expected lines, got nil", i)
- }
- if len(lines) != len(test.Expected) {
- t.Fatalf("#%d: expected %d lines, got %d", i, len(test.Expected), len(lines))
- }
- for j, line := range lines {
- if line != test.Expected[j] {
- t.Errorf("#%d: expected line #%d to be\n%s\nbut got:\n%s", i, j, test.Expected[j], line)
- }
- }
- }
-}
-
-var bulkUpdateRequestSerializationResult string
-
-func BenchmarkBulkUpdateRequestSerialization(b *testing.B) {
- b.Run("stdlib", func(b *testing.B) {
- r := NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- })
- benchmarkBulkUpdateRequestSerialization(b, r.UseEasyJSON(false))
- })
- b.Run("easyjson", func(b *testing.B) {
- r := NewBulkUpdateRequest().Index("index1").Type("doc").Id("1").Doc(struct {
- Counter int64 `json:"counter"`
- }{
- Counter: 42,
- }).UseEasyJSON(false)
- benchmarkBulkUpdateRequestSerialization(b, r.UseEasyJSON(true))
- })
-}
-
-func benchmarkBulkUpdateRequestSerialization(b *testing.B, r *BulkUpdateRequest) {
- var s string
- for n := 0; n < b.N; n++ {
- s = r.String()
- r.source = nil // Don't let caching spoil the benchmark
- }
- bulkUpdateRequestSerializationResult = s // ensure the compiler doesn't optimize
- b.ReportAllocs()
-}
diff --git a/vendor/github.com/olivere/elastic/canonicalize.go b/vendor/github.com/olivere/elastic/canonicalize.go
deleted file mode 100644
index a436f03b6..000000000
--- a/vendor/github.com/olivere/elastic/canonicalize.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "net/url"
-
-// canonicalize takes a list of URLs and returns its canonicalized form, i.e.
-// remove anything but scheme, userinfo, host, path, and port.
-// It also removes all trailing slashes. Invalid URLs or URLs that do not
-// use protocol http or https are skipped.
-//
-// Example:
-// http://127.0.0.1:9200/?query=1 -> http://127.0.0.1:9200
-// http://127.0.0.1:9200/db1/ -> http://127.0.0.1:9200/db1
-func canonicalize(rawurls ...string) []string {
- var canonicalized []string
- for _, rawurl := range rawurls {
- u, err := url.Parse(rawurl)
- if err == nil {
- if u.Scheme == "http" || u.Scheme == "https" {
- // Trim trailing slashes
- for len(u.Path) > 0 && u.Path[len(u.Path)-1] == '/' {
- u.Path = u.Path[0 : len(u.Path)-1]
- }
- u.Fragment = ""
- u.RawQuery = ""
- canonicalized = append(canonicalized, u.String())
- }
- }
- }
- return canonicalized
-}
diff --git a/vendor/github.com/olivere/elastic/canonicalize_test.go b/vendor/github.com/olivere/elastic/canonicalize_test.go
deleted file mode 100644
index 86b62d498..000000000
--- a/vendor/github.com/olivere/elastic/canonicalize_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestCanonicalize(t *testing.T) {
- tests := []struct {
- Input []string
- Output []string
- }{
- // #0
- {
- Input: []string{"http://127.0.0.1/"},
- Output: []string{"http://127.0.0.1"},
- },
- // #1
- {
- Input: []string{"http://127.0.0.1:9200/", "gopher://golang.org/", "http://127.0.0.1:9201"},
- Output: []string{"http://127.0.0.1:9200", "http://127.0.0.1:9201"},
- },
- // #2
- {
- Input: []string{"http://user:secret@127.0.0.1/path?query=1#fragment"},
- Output: []string{"http://user:secret@127.0.0.1/path"},
- },
- // #3
- {
- Input: []string{"https://somewhere.on.mars:9999/path?query=1#fragment"},
- Output: []string{"https://somewhere.on.mars:9999/path"},
- },
- // #4
- {
- Input: []string{"https://prod1:9999/one?query=1#fragment", "https://prod2:9998/two?query=1#fragment"},
- Output: []string{"https://prod1:9999/one", "https://prod2:9998/two"},
- },
- // #5
- {
- Input: []string{"http://127.0.0.1/one/"},
- Output: []string{"http://127.0.0.1/one"},
- },
- // #6
- {
- Input: []string{"http://127.0.0.1/one///"},
- Output: []string{"http://127.0.0.1/one"},
- },
- // #7: Invalid URL
- {
- Input: []string{"127.0.0.1/"},
- Output: []string{},
- },
- // #8: Invalid URL
- {
- Input: []string{"127.0.0.1:9200"},
- Output: []string{},
- },
- }
-
- for i, test := range tests {
- got := canonicalize(test.Input...)
- if want, have := len(test.Output), len(got); want != have {
- t.Fatalf("#%d: expected %d elements; got: %d", i, want, have)
- }
- for i := 0; i < len(got); i++ {
- if want, have := test.Output[i], got[i]; want != have {
- t.Errorf("#%d: expected %q; got: %q", i, want, have)
- }
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/clear_scroll.go b/vendor/github.com/olivere/elastic/clear_scroll.go
deleted file mode 100644
index 4f449504c..000000000
--- a/vendor/github.com/olivere/elastic/clear_scroll.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-)
-
-// ClearScrollService clears one or more scroll contexts by their ids.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html#_clear_scroll_api
-// for details.
-type ClearScrollService struct {
- client *Client
- pretty bool
- scrollId []string
-}
-
-// NewClearScrollService creates a new ClearScrollService.
-func NewClearScrollService(client *Client) *ClearScrollService {
- return &ClearScrollService{
- client: client,
- scrollId: make([]string, 0),
- }
-}
-
-// ScrollId is a list of scroll IDs to clear.
-// Use _all to clear all search contexts.
-func (s *ClearScrollService) ScrollId(scrollIds ...string) *ClearScrollService {
- s.scrollId = append(s.scrollId, scrollIds...)
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ClearScrollService) Pretty(pretty bool) *ClearScrollService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ClearScrollService) buildURL() (string, url.Values, error) {
- // Build URL
- path := "/_search/scroll/"
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ClearScrollService) Validate() error {
- var invalid []string
- if len(s.scrollId) == 0 {
- invalid = append(invalid, "ScrollId")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *ClearScrollService) Do(ctx context.Context) (*ClearScrollResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body := map[string][]string{
- "scroll_id": s.scrollId,
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(ClearScrollResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// ClearScrollResponse is the response of ClearScrollService.Do.
-type ClearScrollResponse struct {
-}
diff --git a/vendor/github.com/olivere/elastic/clear_scroll_test.go b/vendor/github.com/olivere/elastic/clear_scroll_test.go
deleted file mode 100644
index 4037d3cd6..000000000
--- a/vendor/github.com/olivere/elastic/clear_scroll_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- _ "net/http"
- "testing"
-)
-
-func TestClearScroll(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- // client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- res, err := client.Scroll(testIndexName).Size(1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected results != nil; got nil")
- }
- if res.ScrollId == "" {
- t.Fatalf("expected scrollId in results; got %q", res.ScrollId)
- }
-
- // Search should succeed
- _, err = client.Scroll(testIndexName).Size(1).ScrollId(res.ScrollId).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Clear scroll id
- clearScrollRes, err := client.ClearScroll().ScrollId(res.ScrollId).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if clearScrollRes == nil {
- t.Fatal("expected results != nil; got nil")
- }
-
- // Search result should fail
- _, err = client.Scroll(testIndexName).Size(1).ScrollId(res.ScrollId).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected scroll to fail")
- }
-}
-
-func TestClearScrollValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No scroll id -> fail with error
- res, err := NewClearScrollService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected ClearScroll to fail without scroll ids")
- }
- if res != nil {
- t.Fatalf("expected result to be nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/client.go b/vendor/github.com/olivere/elastic/client.go
deleted file mode 100644
index 165a30526..000000000
--- a/vendor/github.com/olivere/elastic/client.go
+++ /dev/null
@@ -1,1780 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "log"
- "net/http"
- "net/http/httputil"
- "net/url"
- "os"
- "regexp"
- "strings"
- "sync"
- "time"
-
- "github.com/pkg/errors"
-
- "github.com/olivere/elastic/config"
-)
-
-const (
- // Version is the current version of Elastic.
- Version = "6.1.7"
-
- // DefaultURL is the default endpoint of Elasticsearch on the local machine.
- // It is used e.g. when initializing a new Client without a specific URL.
- DefaultURL = "http://127.0.0.1:9200"
-
- // DefaultScheme is the default protocol scheme to use when sniffing
- // the Elasticsearch cluster.
- DefaultScheme = "http"
-
- // DefaultHealthcheckEnabled specifies if healthchecks are enabled by default.
- DefaultHealthcheckEnabled = true
-
- // DefaultHealthcheckTimeoutStartup is the time the healthcheck waits
- // for a response from Elasticsearch on startup, i.e. when creating a
- // client. After the client is started, a shorter timeout is commonly used
- // (its default is specified in DefaultHealthcheckTimeout).
- DefaultHealthcheckTimeoutStartup = 5 * time.Second
-
- // DefaultHealthcheckTimeout specifies the time a running client waits for
- // a response from Elasticsearch. Notice that the healthcheck timeout
- // when a client is created is larger by default (see DefaultHealthcheckTimeoutStartup).
- DefaultHealthcheckTimeout = 1 * time.Second
-
- // DefaultHealthcheckInterval is the default interval between
- // two health checks of the nodes in the cluster.
- DefaultHealthcheckInterval = 60 * time.Second
-
- // DefaultSnifferEnabled specifies if the sniffer is enabled by default.
- DefaultSnifferEnabled = true
-
- // DefaultSnifferInterval is the interval between two sniffing procedures,
- // i.e. the lookup of all nodes in the cluster and their addition/removal
- // from the list of actual connections.
- DefaultSnifferInterval = 15 * time.Minute
-
- // DefaultSnifferTimeoutStartup is the default timeout for the sniffing
- // process that is initiated while creating a new client. For subsequent
- // sniffing processes, DefaultSnifferTimeout is used (by default).
- DefaultSnifferTimeoutStartup = 5 * time.Second
-
- // DefaultSnifferTimeout is the default timeout after which the
- // sniffing process times out. Notice that for the initial sniffing
- // process, DefaultSnifferTimeoutStartup is used.
- DefaultSnifferTimeout = 2 * time.Second
-
- // DefaultSendGetBodyAs is the HTTP method to use when elastic is sending
- // a GET request with a body.
- DefaultSendGetBodyAs = "GET"
-
- // off is used to disable timeouts.
- off = -1 * time.Second
-)
-
-var (
- // ErrNoClient is raised when no Elasticsearch node is available.
- ErrNoClient = errors.New("no Elasticsearch node available")
-
- // ErrRetry is raised when a request cannot be executed after the configured
- // number of retries.
- ErrRetry = errors.New("cannot connect after several retries")
-
- // ErrTimeout is raised when a request timed out, e.g. when WaitForStatus
- // didn't return in time.
- ErrTimeout = errors.New("timeout")
-
- // noRetries is a retrier that does not retry.
- noRetries = NewStopRetrier()
-)
-
-// ClientOptionFunc is a function that configures a Client.
-// It is used in NewClient.
-type ClientOptionFunc func(*Client) error
-
-// Client is an Elasticsearch client. Create one by calling NewClient.
-type Client struct {
- c *http.Client // net/http Client to use for requests
-
- connsMu sync.RWMutex // connsMu guards the next block
- conns []*conn // all connections
- cindex int // index into conns
-
- mu sync.RWMutex // guards the next block
- urls []string // set of URLs passed initially to the client
- running bool // true if the client's background processes are running
- errorlog Logger // error log for critical messages
- infolog Logger // information log for e.g. response times
- tracelog Logger // trace log for debugging
- scheme string // http or https
- healthcheckEnabled bool // healthchecks enabled or disabled
- healthcheckTimeoutStartup time.Duration // time the healthcheck waits for a response from Elasticsearch on startup
- healthcheckTimeout time.Duration // time the healthcheck waits for a response from Elasticsearch
- healthcheckInterval time.Duration // interval between healthchecks
- healthcheckStop chan bool // notify healthchecker to stop, and notify back
- snifferEnabled bool // sniffer enabled or disabled
- snifferTimeoutStartup time.Duration // time the sniffer waits for a response from nodes info API on startup
- snifferTimeout time.Duration // time the sniffer waits for a response from nodes info API
- snifferInterval time.Duration // interval between sniffing
- snifferCallback SnifferCallback // callback to modify the sniffing decision
- snifferStop chan bool // notify sniffer to stop, and notify back
- decoder Decoder // used to decode data sent from Elasticsearch
- basicAuth bool // indicates whether to send HTTP Basic Auth credentials
- basicAuthUsername string // username for HTTP Basic Auth
- basicAuthPassword string // password for HTTP Basic Auth
- sendGetBodyAs string // override for when sending a GET with a body
- requiredPlugins []string // list of required plugins
- retrier Retrier // strategy for retries
-}
-
-// NewClient creates a new client to work with Elasticsearch.
-//
-// NewClient, by default, is meant to be long-lived and shared across
-// your application. If you need a short-lived client, e.g. for request-scope,
-// consider using NewSimpleClient instead.
-//
-// The caller can configure the new client by passing configuration options
-// to the func.
-//
-// Example:
-//
-// client, err := elastic.NewClient(
-// elastic.SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"),
-// elastic.SetBasicAuth("user", "secret"))
-//
-// If no URL is configured, Elastic uses DefaultURL by default.
-//
-// If the sniffer is enabled (the default), the new client then sniffes
-// the cluster via the Nodes Info API
-// (see https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-nodes-info.html#cluster-nodes-info).
-// It uses the URLs specified by the caller. The caller is responsible
-// to only pass a list of URLs of nodes that belong to the same cluster.
-// This sniffing process is run on startup and periodically.
-// Use SnifferInterval to set the interval between two sniffs (default is
-// 15 minutes). In other words: By default, the client will find new nodes
-// in the cluster and remove those that are no longer available every
-// 15 minutes. Disable the sniffer by passing SetSniff(false) to NewClient.
-//
-// The list of nodes found in the sniffing process will be used to make
-// connections to the REST API of Elasticsearch. These nodes are also
-// periodically checked in a shorter time frame. This process is called
-// a health check. By default, a health check is done every 60 seconds.
-// You can set a shorter or longer interval by SetHealthcheckInterval.
-// Disabling health checks is not recommended, but can be done by
-// SetHealthcheck(false).
-//
-// Connections are automatically marked as dead or healthy while
-// making requests to Elasticsearch. When a request fails, Elastic will
-// call into the Retry strategy which can be specified with SetRetry.
-// The Retry strategy is also responsible for handling backoff i.e. the time
-// to wait before starting the next request. There are various standard
-// backoff implementations, e.g. ExponentialBackoff or SimpleBackoff.
-// Retries are disabled by default.
-//
-// If no HttpClient is configured, then http.DefaultClient is used.
-// You can use your own http.Client with some http.Transport for
-// advanced scenarios.
-//
-// An error is also returned when some configuration option is invalid or
-// the new client cannot sniff the cluster (if enabled).
-func NewClient(options ...ClientOptionFunc) (*Client, error) {
- // Set up the client
- c := &Client{
- c: http.DefaultClient,
- conns: make([]*conn, 0),
- cindex: -1,
- scheme: DefaultScheme,
- decoder: &DefaultDecoder{},
- healthcheckEnabled: DefaultHealthcheckEnabled,
- healthcheckTimeoutStartup: DefaultHealthcheckTimeoutStartup,
- healthcheckTimeout: DefaultHealthcheckTimeout,
- healthcheckInterval: DefaultHealthcheckInterval,
- healthcheckStop: make(chan bool),
- snifferEnabled: DefaultSnifferEnabled,
- snifferTimeoutStartup: DefaultSnifferTimeoutStartup,
- snifferTimeout: DefaultSnifferTimeout,
- snifferInterval: DefaultSnifferInterval,
- snifferCallback: nopSnifferCallback,
- snifferStop: make(chan bool),
- sendGetBodyAs: DefaultSendGetBodyAs,
- retrier: noRetries, // no retries by default
- }
-
- // Run the options on it
- for _, option := range options {
- if err := option(c); err != nil {
- return nil, err
- }
- }
-
- // Use a default URL and normalize them
- if len(c.urls) == 0 {
- c.urls = []string{DefaultURL}
- }
- c.urls = canonicalize(c.urls...)
-
- // If the URLs have auth info, use them here as an alternative to SetBasicAuth
- if !c.basicAuth {
- for _, urlStr := range c.urls {
- u, err := url.Parse(urlStr)
- if err == nil && u.User != nil {
- c.basicAuth = true
- c.basicAuthUsername = u.User.Username()
- c.basicAuthPassword, _ = u.User.Password()
- break
- }
- }
- }
-
- // Check if we can make a request to any of the specified URLs
- if c.healthcheckEnabled {
- if err := c.startupHealthcheck(c.healthcheckTimeoutStartup); err != nil {
- return nil, err
- }
- }
-
- if c.snifferEnabled {
- // Sniff the cluster initially
- if err := c.sniff(c.snifferTimeoutStartup); err != nil {
- return nil, err
- }
- } else {
- // Do not sniff the cluster initially. Use the provided URLs instead.
- for _, url := range c.urls {
- c.conns = append(c.conns, newConn(url, url))
- }
- }
-
- if c.healthcheckEnabled {
- // Perform an initial health check
- c.healthcheck(c.healthcheckTimeoutStartup, true)
- }
- // Ensure that we have at least one connection available
- if err := c.mustActiveConn(); err != nil {
- return nil, err
- }
-
- // Check the required plugins
- for _, plugin := range c.requiredPlugins {
- found, err := c.HasPlugin(plugin)
- if err != nil {
- return nil, err
- }
- if !found {
- return nil, fmt.Errorf("elastic: plugin %s not found", plugin)
- }
- }
-
- if c.snifferEnabled {
- go c.sniffer() // periodically update cluster information
- }
- if c.healthcheckEnabled {
- go c.healthchecker() // start goroutine periodically ping all nodes of the cluster
- }
-
- c.mu.Lock()
- c.running = true
- c.mu.Unlock()
-
- return c, nil
-}
-
-// NewClientFromConfig initializes a client from a configuration.
-func NewClientFromConfig(cfg *config.Config) (*Client, error) {
- var options []ClientOptionFunc
- if cfg != nil {
- if cfg.URL != "" {
- options = append(options, SetURL(cfg.URL))
- }
- if cfg.Errorlog != "" {
- f, err := os.OpenFile(cfg.Errorlog, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
- if err != nil {
- return nil, errors.Wrap(err, "unable to initialize error log")
- }
- l := log.New(f, "", 0)
- options = append(options, SetErrorLog(l))
- }
- if cfg.Tracelog != "" {
- f, err := os.OpenFile(cfg.Tracelog, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
- if err != nil {
- return nil, errors.Wrap(err, "unable to initialize trace log")
- }
- l := log.New(f, "", 0)
- options = append(options, SetTraceLog(l))
- }
- if cfg.Infolog != "" {
- f, err := os.OpenFile(cfg.Infolog, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
- if err != nil {
- return nil, errors.Wrap(err, "unable to initialize info log")
- }
- l := log.New(f, "", 0)
- options = append(options, SetInfoLog(l))
- }
- if cfg.Username != "" || cfg.Password != "" {
- options = append(options, SetBasicAuth(cfg.Username, cfg.Password))
- }
- if cfg.Sniff != nil {
- options = append(options, SetSniff(*cfg.Sniff))
- }
- }
- return NewClient(options...)
-}
-
-// NewSimpleClient creates a new short-lived Client that can be used in
-// use cases where you need e.g. one client per request.
-//
-// While NewClient by default sets up e.g. periodic health checks
-// and sniffing for new nodes in separate goroutines, NewSimpleClient does
-// not and is meant as a simple replacement where you don't need all the
-// heavy lifting of NewClient.
-//
-// NewSimpleClient does the following by default: First, all health checks
-// are disabled, including timeouts and periodic checks. Second, sniffing
-// is disabled, including timeouts and periodic checks. The number of retries
-// is set to 1. NewSimpleClient also does not start any goroutines.
-//
-// Notice that you can still override settings by passing additional options,
-// just like with NewClient.
-func NewSimpleClient(options ...ClientOptionFunc) (*Client, error) {
- c := &Client{
- c: http.DefaultClient,
- conns: make([]*conn, 0),
- cindex: -1,
- scheme: DefaultScheme,
- decoder: &DefaultDecoder{},
- healthcheckEnabled: false,
- healthcheckTimeoutStartup: off,
- healthcheckTimeout: off,
- healthcheckInterval: off,
- healthcheckStop: make(chan bool),
- snifferEnabled: false,
- snifferTimeoutStartup: off,
- snifferTimeout: off,
- snifferInterval: off,
- snifferCallback: nopSnifferCallback,
- snifferStop: make(chan bool),
- sendGetBodyAs: DefaultSendGetBodyAs,
- retrier: noRetries, // no retries by default
- }
-
- // Run the options on it
- for _, option := range options {
- if err := option(c); err != nil {
- return nil, err
- }
- }
-
- // Use a default URL and normalize them
- if len(c.urls) == 0 {
- c.urls = []string{DefaultURL}
- }
- c.urls = canonicalize(c.urls...)
-
- // If the URLs have auth info, use them here as an alternative to SetBasicAuth
- if !c.basicAuth {
- for _, urlStr := range c.urls {
- u, err := url.Parse(urlStr)
- if err == nil && u.User != nil {
- c.basicAuth = true
- c.basicAuthUsername = u.User.Username()
- c.basicAuthPassword, _ = u.User.Password()
- break
- }
- }
- }
-
- for _, url := range c.urls {
- c.conns = append(c.conns, newConn(url, url))
- }
-
- // Ensure that we have at least one connection available
- if err := c.mustActiveConn(); err != nil {
- return nil, err
- }
-
- // Check the required plugins
- for _, plugin := range c.requiredPlugins {
- found, err := c.HasPlugin(plugin)
- if err != nil {
- return nil, err
- }
- if !found {
- return nil, fmt.Errorf("elastic: plugin %s not found", plugin)
- }
- }
-
- c.mu.Lock()
- c.running = true
- c.mu.Unlock()
-
- return c, nil
-}
-
-// SetHttpClient can be used to specify the http.Client to use when making
-// HTTP requests to Elasticsearch.
-func SetHttpClient(httpClient *http.Client) ClientOptionFunc {
- return func(c *Client) error {
- if httpClient != nil {
- c.c = httpClient
- } else {
- c.c = http.DefaultClient
- }
- return nil
- }
-}
-
-// SetBasicAuth can be used to specify the HTTP Basic Auth credentials to
-// use when making HTTP requests to Elasticsearch.
-func SetBasicAuth(username, password string) ClientOptionFunc {
- return func(c *Client) error {
- c.basicAuthUsername = username
- c.basicAuthPassword = password
- c.basicAuth = c.basicAuthUsername != "" || c.basicAuthPassword != ""
- return nil
- }
-}
-
-// SetURL defines the URL endpoints of the Elasticsearch nodes. Notice that
-// when sniffing is enabled, these URLs are used to initially sniff the
-// cluster on startup.
-func SetURL(urls ...string) ClientOptionFunc {
- return func(c *Client) error {
- switch len(urls) {
- case 0:
- c.urls = []string{DefaultURL}
- default:
- c.urls = urls
- }
- return nil
- }
-}
-
-// SetScheme sets the HTTP scheme to look for when sniffing (http or https).
-// This is http by default.
-func SetScheme(scheme string) ClientOptionFunc {
- return func(c *Client) error {
- c.scheme = scheme
- return nil
- }
-}
-
-// SetSniff enables or disables the sniffer (enabled by default).
-func SetSniff(enabled bool) ClientOptionFunc {
- return func(c *Client) error {
- c.snifferEnabled = enabled
- return nil
- }
-}
-
-// SetSnifferTimeoutStartup sets the timeout for the sniffer that is used
-// when creating a new client. The default is 5 seconds. Notice that the
-// timeout being used for subsequent sniffing processes is set with
-// SetSnifferTimeout.
-func SetSnifferTimeoutStartup(timeout time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.snifferTimeoutStartup = timeout
- return nil
- }
-}
-
-// SetSnifferTimeout sets the timeout for the sniffer that finds the
-// nodes in a cluster. The default is 2 seconds. Notice that the timeout
-// used when creating a new client on startup is usually greater and can
-// be set with SetSnifferTimeoutStartup.
-func SetSnifferTimeout(timeout time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.snifferTimeout = timeout
- return nil
- }
-}
-
-// SetSnifferInterval sets the interval between two sniffing processes.
-// The default interval is 15 minutes.
-func SetSnifferInterval(interval time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.snifferInterval = interval
- return nil
- }
-}
-
-// SnifferCallback defines the protocol for sniffing decisions.
-type SnifferCallback func(*NodesInfoNode) bool
-
-// nopSnifferCallback is the default sniffer callback: It accepts
-// all nodes the sniffer finds.
-var nopSnifferCallback = func(*NodesInfoNode) bool { return true }
-
-// SetSnifferCallback allows the caller to modify sniffer decisions.
-// When setting the callback, the given SnifferCallback is called for
-// each (healthy) node found during the sniffing process.
-// If the callback returns false, the node is ignored: No requests
-// are routed to it.
-func SetSnifferCallback(f SnifferCallback) ClientOptionFunc {
- return func(c *Client) error {
- if f != nil {
- c.snifferCallback = f
- }
- return nil
- }
-}
-
-// SetHealthcheck enables or disables healthchecks (enabled by default).
-func SetHealthcheck(enabled bool) ClientOptionFunc {
- return func(c *Client) error {
- c.healthcheckEnabled = enabled
- return nil
- }
-}
-
-// SetHealthcheckTimeoutStartup sets the timeout for the initial health check.
-// The default timeout is 5 seconds (see DefaultHealthcheckTimeoutStartup).
-// Notice that timeouts for subsequent health checks can be modified with
-// SetHealthcheckTimeout.
-func SetHealthcheckTimeoutStartup(timeout time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.healthcheckTimeoutStartup = timeout
- return nil
- }
-}
-
-// SetHealthcheckTimeout sets the timeout for periodic health checks.
-// The default timeout is 1 second (see DefaultHealthcheckTimeout).
-// Notice that a different (usually larger) timeout is used for the initial
-// healthcheck, which is initiated while creating a new client.
-// The startup timeout can be modified with SetHealthcheckTimeoutStartup.
-func SetHealthcheckTimeout(timeout time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.healthcheckTimeout = timeout
- return nil
- }
-}
-
-// SetHealthcheckInterval sets the interval between two health checks.
-// The default interval is 60 seconds.
-func SetHealthcheckInterval(interval time.Duration) ClientOptionFunc {
- return func(c *Client) error {
- c.healthcheckInterval = interval
- return nil
- }
-}
-
-// SetMaxRetries sets the maximum number of retries before giving up when
-// performing a HTTP request to Elasticsearch.
-//
-// Deprecated: Replace with a Retry implementation.
-func SetMaxRetries(maxRetries int) ClientOptionFunc {
- return func(c *Client) error {
- if maxRetries < 0 {
- return errors.New("MaxRetries must be greater than or equal to 0")
- } else if maxRetries == 0 {
- c.retrier = noRetries
- } else {
- // Create a Retrier that will wait for 100ms (+/- jitter) between requests.
- // This resembles the old behavior with maxRetries.
- ticks := make([]int, maxRetries)
- for i := 0; i < len(ticks); i++ {
- ticks[i] = 100
- }
- backoff := NewSimpleBackoff(ticks...)
- c.retrier = NewBackoffRetrier(backoff)
- }
- return nil
- }
-}
-
-// SetDecoder sets the Decoder to use when decoding data from Elasticsearch.
-// DefaultDecoder is used by default.
-func SetDecoder(decoder Decoder) ClientOptionFunc {
- return func(c *Client) error {
- if decoder != nil {
- c.decoder = decoder
- } else {
- c.decoder = &DefaultDecoder{}
- }
- return nil
- }
-}
-
-// SetRequiredPlugins can be used to indicate that some plugins are required
-// before a Client will be created.
-func SetRequiredPlugins(plugins ...string) ClientOptionFunc {
- return func(c *Client) error {
- if c.requiredPlugins == nil {
- c.requiredPlugins = make([]string, 0)
- }
- c.requiredPlugins = append(c.requiredPlugins, plugins...)
- return nil
- }
-}
-
-// SetErrorLog sets the logger for critical messages like nodes joining
-// or leaving the cluster or failing requests. It is nil by default.
-func SetErrorLog(logger Logger) ClientOptionFunc {
- return func(c *Client) error {
- c.errorlog = logger
- return nil
- }
-}
-
-// SetInfoLog sets the logger for informational messages, e.g. requests
-// and their response times. It is nil by default.
-func SetInfoLog(logger Logger) ClientOptionFunc {
- return func(c *Client) error {
- c.infolog = logger
- return nil
- }
-}
-
-// SetTraceLog specifies the log.Logger to use for output of HTTP requests
-// and responses which is helpful during debugging. It is nil by default.
-func SetTraceLog(logger Logger) ClientOptionFunc {
- return func(c *Client) error {
- c.tracelog = logger
- return nil
- }
-}
-
-// SetSendGetBodyAs specifies the HTTP method to use when sending a GET request
-// with a body. It is GET by default.
-func SetSendGetBodyAs(httpMethod string) ClientOptionFunc {
- return func(c *Client) error {
- c.sendGetBodyAs = httpMethod
- return nil
- }
-}
-
-// SetRetrier specifies the retry strategy that handles errors during
-// HTTP request/response with Elasticsearch.
-func SetRetrier(retrier Retrier) ClientOptionFunc {
- return func(c *Client) error {
- if retrier == nil {
- retrier = noRetries // no retries by default
- }
- c.retrier = retrier
- return nil
- }
-}
-
-// String returns a string representation of the client status.
-func (c *Client) String() string {
- c.connsMu.Lock()
- conns := c.conns
- c.connsMu.Unlock()
-
- var buf bytes.Buffer
- for i, conn := range conns {
- if i > 0 {
- buf.WriteString(", ")
- }
- buf.WriteString(conn.String())
- }
- return buf.String()
-}
-
-// IsRunning returns true if the background processes of the client are
-// running, false otherwise.
-func (c *Client) IsRunning() bool {
- c.mu.RLock()
- defer c.mu.RUnlock()
- return c.running
-}
-
-// Start starts the background processes like sniffing the cluster and
-// periodic health checks. You don't need to run Start when creating a
-// client with NewClient; the background processes are run by default.
-//
-// If the background processes are already running, this is a no-op.
-func (c *Client) Start() {
- c.mu.RLock()
- if c.running {
- c.mu.RUnlock()
- return
- }
- c.mu.RUnlock()
-
- if c.snifferEnabled {
- go c.sniffer()
- }
- if c.healthcheckEnabled {
- go c.healthchecker()
- }
-
- c.mu.Lock()
- c.running = true
- c.mu.Unlock()
-
- c.infof("elastic: client started")
-}
-
-// Stop stops the background processes that the client is running,
-// i.e. sniffing the cluster periodically and running health checks
-// on the nodes.
-//
-// If the background processes are not running, this is a no-op.
-func (c *Client) Stop() {
- c.mu.RLock()
- if !c.running {
- c.mu.RUnlock()
- return
- }
- c.mu.RUnlock()
-
- if c.healthcheckEnabled {
- c.healthcheckStop <- true
- <-c.healthcheckStop
- }
-
- if c.snifferEnabled {
- c.snifferStop <- true
- <-c.snifferStop
- }
-
- c.mu.Lock()
- c.running = false
- c.mu.Unlock()
-
- c.infof("elastic: client stopped")
-}
-
-// errorf logs to the error log.
-func (c *Client) errorf(format string, args ...interface{}) {
- if c.errorlog != nil {
- c.errorlog.Printf(format, args...)
- }
-}
-
-// infof logs informational messages.
-func (c *Client) infof(format string, args ...interface{}) {
- if c.infolog != nil {
- c.infolog.Printf(format, args...)
- }
-}
-
-// tracef logs to the trace log.
-func (c *Client) tracef(format string, args ...interface{}) {
- if c.tracelog != nil {
- c.tracelog.Printf(format, args...)
- }
-}
-
-// dumpRequest dumps the given HTTP request to the trace log.
-func (c *Client) dumpRequest(r *http.Request) {
- if c.tracelog != nil {
- out, err := httputil.DumpRequestOut(r, true)
- if err == nil {
- c.tracef("%s\n", string(out))
- }
- }
-}
-
-// dumpResponse dumps the given HTTP response to the trace log.
-func (c *Client) dumpResponse(resp *http.Response) {
- if c.tracelog != nil {
- out, err := httputil.DumpResponse(resp, true)
- if err == nil {
- c.tracef("%s\n", string(out))
- }
- }
-}
-
-// sniffer periodically runs sniff.
-func (c *Client) sniffer() {
- c.mu.RLock()
- timeout := c.snifferTimeout
- interval := c.snifferInterval
- c.mu.RUnlock()
-
- ticker := time.NewTicker(interval)
- defer ticker.Stop()
-
- for {
- select {
- case <-c.snifferStop:
- // we are asked to stop, so we signal back that we're stopping now
- c.snifferStop <- true
- return
- case <-ticker.C:
- c.sniff(timeout)
- }
- }
-}
-
-// sniff uses the Node Info API to return the list of nodes in the cluster.
-// It uses the list of URLs passed on startup plus the list of URLs found
-// by the preceding sniffing process (if sniffing is enabled).
-//
-// If sniffing is disabled, this is a no-op.
-func (c *Client) sniff(timeout time.Duration) error {
- c.mu.RLock()
- if !c.snifferEnabled {
- c.mu.RUnlock()
- return nil
- }
-
- // Use all available URLs provided to sniff the cluster.
- var urls []string
- urlsMap := make(map[string]bool)
-
- // Add all URLs provided on startup
- for _, url := range c.urls {
- urlsMap[url] = true
- urls = append(urls, url)
- }
- c.mu.RUnlock()
-
- // Add all URLs found by sniffing
- c.connsMu.RLock()
- for _, conn := range c.conns {
- if !conn.IsDead() {
- url := conn.URL()
- if _, found := urlsMap[url]; !found {
- urls = append(urls, url)
- }
- }
- }
- c.connsMu.RUnlock()
-
- if len(urls) == 0 {
- return errors.Wrap(ErrNoClient, "no URLs found")
- }
-
- // Start sniffing on all found URLs
- ch := make(chan []*conn, len(urls))
-
- ctx, cancel := context.WithTimeout(context.Background(), timeout)
- defer cancel()
-
- for _, url := range urls {
- go func(url string) { ch <- c.sniffNode(ctx, url) }(url)
- }
-
- // Wait for the results to come back, or the process times out.
- for {
- select {
- case conns := <-ch:
- if len(conns) > 0 {
- c.updateConns(conns)
- return nil
- }
- case <-ctx.Done():
- // We get here if no cluster responds in time
- return errors.Wrap(ErrNoClient, "sniff timeout")
- }
- }
-}
-
-// sniffNode sniffs a single node. This method is run as a goroutine
-// in sniff. If successful, it returns the list of node URLs extracted
-// from the result of calling Nodes Info API. Otherwise, an empty array
-// is returned.
-func (c *Client) sniffNode(ctx context.Context, url string) []*conn {
- var nodes []*conn
-
- // Call the Nodes Info API at /_nodes/http
- req, err := NewRequest("GET", url+"/_nodes/http")
- if err != nil {
- return nodes
- }
-
- c.mu.RLock()
- if c.basicAuth {
- req.SetBasicAuth(c.basicAuthUsername, c.basicAuthPassword)
- }
- c.mu.RUnlock()
-
- res, err := c.c.Do((*http.Request)(req).WithContext(ctx))
- if err != nil {
- return nodes
- }
- if res == nil {
- return nodes
- }
-
- if res.Body != nil {
- defer res.Body.Close()
- }
-
- var info NodesInfoResponse
- if err := json.NewDecoder(res.Body).Decode(&info); err == nil {
- if len(info.Nodes) > 0 {
- for nodeID, node := range info.Nodes {
- if c.snifferCallback(node) {
- if node.HTTP != nil && len(node.HTTP.PublishAddress) > 0 {
- url := c.extractHostname(c.scheme, node.HTTP.PublishAddress)
- if url != "" {
- nodes = append(nodes, newConn(nodeID, url))
- }
- }
- }
- }
- }
- }
- return nodes
-}
-
-// reSniffHostAndPort is used to extract hostname and port from a result
-// from a Nodes Info API (example: "inet[/127.0.0.1:9200]").
-var reSniffHostAndPort = regexp.MustCompile(`\/([^:]*):([0-9]+)\]`)
-
-func (c *Client) extractHostname(scheme, address string) string {
- if strings.HasPrefix(address, "inet") {
- m := reSniffHostAndPort.FindStringSubmatch(address)
- if len(m) == 3 {
- return fmt.Sprintf("%s://%s:%s", scheme, m[1], m[2])
- }
- }
- s := address
- if idx := strings.Index(s, "/"); idx >= 0 {
- s = s[idx+1:]
- }
- if strings.Index(s, ":") < 0 {
- return ""
- }
- return fmt.Sprintf("%s://%s", scheme, s)
-}
-
-// updateConns updates the clients' connections with new information
-// gather by a sniff operation.
-func (c *Client) updateConns(conns []*conn) {
- c.connsMu.Lock()
-
- // Build up new connections:
- // If we find an existing connection, use that (including no. of failures etc.).
- // If we find a new connection, add it.
- var newConns []*conn
- for _, conn := range conns {
- var found bool
- for _, oldConn := range c.conns {
- if oldConn.NodeID() == conn.NodeID() {
- // Take over the old connection
- newConns = append(newConns, oldConn)
- found = true
- break
- }
- }
- if !found {
- // New connection didn't exist, so add it to our list of new conns.
- c.infof("elastic: %s joined the cluster", conn.URL())
- newConns = append(newConns, conn)
- }
- }
-
- c.conns = newConns
- c.cindex = -1
- c.connsMu.Unlock()
-}
-
-// healthchecker periodically runs healthcheck.
-func (c *Client) healthchecker() {
- c.mu.RLock()
- timeout := c.healthcheckTimeout
- interval := c.healthcheckInterval
- c.mu.RUnlock()
-
- ticker := time.NewTicker(interval)
- defer ticker.Stop()
-
- for {
- select {
- case <-c.healthcheckStop:
- // we are asked to stop, so we signal back that we're stopping now
- c.healthcheckStop <- true
- return
- case <-ticker.C:
- c.healthcheck(timeout, false)
- }
- }
-}
-
-// healthcheck does a health check on all nodes in the cluster. Depending on
-// the node state, it marks connections as dead, sets them alive etc.
-// If healthchecks are disabled and force is false, this is a no-op.
-// The timeout specifies how long to wait for a response from Elasticsearch.
-func (c *Client) healthcheck(timeout time.Duration, force bool) {
- c.mu.RLock()
- if !c.healthcheckEnabled && !force {
- c.mu.RUnlock()
- return
- }
- basicAuth := c.basicAuth
- basicAuthUsername := c.basicAuthUsername
- basicAuthPassword := c.basicAuthPassword
- c.mu.RUnlock()
-
- c.connsMu.RLock()
- conns := c.conns
- c.connsMu.RUnlock()
-
- for _, conn := range conns {
- // Run the HEAD request against ES with a timeout
- ctx, cancel := context.WithTimeout(context.Background(), timeout)
- defer cancel()
-
- // Goroutine executes the HTTP request, returns an error and sets status
- var status int
- errc := make(chan error, 1)
- go func(url string) {
- req, err := NewRequest("HEAD", url)
- if err != nil {
- errc <- err
- return
- }
- if basicAuth {
- req.SetBasicAuth(basicAuthUsername, basicAuthPassword)
- }
- res, err := c.c.Do((*http.Request)(req).WithContext(ctx))
- if res != nil {
- status = res.StatusCode
- if res.Body != nil {
- res.Body.Close()
- }
- }
- errc <- err
- }(conn.URL())
-
- // Wait for the Goroutine (or its timeout)
- select {
- case <-ctx.Done(): // timeout
- c.errorf("elastic: %s is dead", conn.URL())
- conn.MarkAsDead()
- case err := <-errc:
- if err != nil {
- c.errorf("elastic: %s is dead", conn.URL())
- conn.MarkAsDead()
- break
- }
- if status >= 200 && status < 300 {
- conn.MarkAsAlive()
- } else {
- conn.MarkAsDead()
- c.errorf("elastic: %s is dead [status=%d]", conn.URL(), status)
- }
- }
- }
-}
-
-// startupHealthcheck is used at startup to check if the server is available
-// at all.
-func (c *Client) startupHealthcheck(timeout time.Duration) error {
- c.mu.Lock()
- urls := c.urls
- basicAuth := c.basicAuth
- basicAuthUsername := c.basicAuthUsername
- basicAuthPassword := c.basicAuthPassword
- c.mu.Unlock()
-
- // If we don't get a connection after "timeout", we bail.
- var lastErr error
- start := time.Now()
- for {
- // Make a copy of the HTTP client provided via options to respect
- // settings like Basic Auth or a user-specified http.Transport.
- cl := new(http.Client)
- *cl = *c.c
- cl.Timeout = timeout
- for _, url := range urls {
- req, err := http.NewRequest("HEAD", url, nil)
- if err != nil {
- return err
- }
- if basicAuth {
- req.SetBasicAuth(basicAuthUsername, basicAuthPassword)
- }
- res, err := cl.Do(req)
- if err == nil && res != nil && res.StatusCode >= 200 && res.StatusCode < 300 {
- return nil
- } else if err != nil {
- lastErr = err
- }
- }
- time.Sleep(1 * time.Second)
- if time.Now().Sub(start) > timeout {
- break
- }
- }
- if lastErr != nil {
- return errors.Wrapf(ErrNoClient, "health check timeout: %v", lastErr)
- }
- return errors.Wrap(ErrNoClient, "health check timeout")
-}
-
-// next returns the next available connection, or ErrNoClient.
-func (c *Client) next() (*conn, error) {
- // We do round-robin here.
- // TODO(oe) This should be a pluggable strategy, like the Selector in the official clients.
- c.connsMu.Lock()
- defer c.connsMu.Unlock()
-
- i := 0
- numConns := len(c.conns)
- for {
- i++
- if i > numConns {
- break // we visited all conns: they all seem to be dead
- }
- c.cindex++
- if c.cindex >= numConns {
- c.cindex = 0
- }
- conn := c.conns[c.cindex]
- if !conn.IsDead() {
- return conn, nil
- }
- }
-
- // We have a deadlock here: All nodes are marked as dead.
- // If sniffing is disabled, connections will never be marked alive again.
- // So we are marking them as alive--if sniffing is disabled.
- // They'll then be picked up in the next call to PerformRequest.
- if !c.snifferEnabled {
- c.errorf("elastic: all %d nodes marked as dead; resurrecting them to prevent deadlock", len(c.conns))
- for _, conn := range c.conns {
- conn.MarkAsAlive()
- }
- }
-
- // We tried hard, but there is no node available
- return nil, errors.Wrap(ErrNoClient, "no available connection")
-}
-
-// mustActiveConn returns nil if there is an active connection,
-// otherwise ErrNoClient is returned.
-func (c *Client) mustActiveConn() error {
- c.connsMu.Lock()
- defer c.connsMu.Unlock()
-
- for _, c := range c.conns {
- if !c.IsDead() {
- return nil
- }
- }
- return errors.Wrap(ErrNoClient, "no active connection found")
-}
-
-// -- PerformRequest --
-
-// PerformRequestOptions must be passed into PerformRequest.
-type PerformRequestOptions struct {
- Method string
- Path string
- Params url.Values
- Body interface{}
- ContentType string
- IgnoreErrors []int
- Retrier Retrier
-}
-
-// PerformRequest does a HTTP request to Elasticsearch.
-// It returns a response (which might be nil) and an error on failure.
-//
-// Optionally, a list of HTTP error codes to ignore can be passed.
-// This is necessary for services that expect e.g. HTTP status 404 as a
-// valid outcome (Exists, IndicesExists, IndicesTypeExists).
-func (c *Client) PerformRequest(ctx context.Context, opt PerformRequestOptions) (*Response, error) {
- start := time.Now().UTC()
-
- c.mu.RLock()
- timeout := c.healthcheckTimeout
- basicAuth := c.basicAuth
- basicAuthUsername := c.basicAuthUsername
- basicAuthPassword := c.basicAuthPassword
- sendGetBodyAs := c.sendGetBodyAs
- retrier := c.retrier
- if opt.Retrier != nil {
- retrier = opt.Retrier
- }
- c.mu.RUnlock()
-
- var err error
- var conn *conn
- var req *Request
- var resp *Response
- var retried bool
- var n int
-
- // Change method if sendGetBodyAs is specified.
- if opt.Method == "GET" && opt.Body != nil && sendGetBodyAs != "GET" {
- opt.Method = sendGetBodyAs
- }
-
- for {
- pathWithParams := opt.Path
- if len(opt.Params) > 0 {
- pathWithParams += "?" + opt.Params.Encode()
- }
-
- // Get a connection
- conn, err = c.next()
- if errors.Cause(err) == ErrNoClient {
- n++
- if !retried {
- // Force a healtcheck as all connections seem to be dead.
- c.healthcheck(timeout, false)
- }
- wait, ok, rerr := retrier.Retry(ctx, n, nil, nil, err)
- if rerr != nil {
- return nil, rerr
- }
- if !ok {
- return nil, err
- }
- retried = true
- time.Sleep(wait)
- continue // try again
- }
- if err != nil {
- c.errorf("elastic: cannot get connection from pool")
- return nil, err
- }
-
- req, err = NewRequest(opt.Method, conn.URL()+pathWithParams)
- if err != nil {
- c.errorf("elastic: cannot create request for %s %s: %v", strings.ToUpper(opt.Method), conn.URL()+pathWithParams, err)
- return nil, err
- }
-
- if basicAuth {
- req.SetBasicAuth(basicAuthUsername, basicAuthPassword)
- }
- if opt.ContentType != "" {
- req.Header.Set("Content-Type", opt.ContentType)
- }
-
- // Set body
- if opt.Body != nil {
- err = req.SetBody(opt.Body)
- if err != nil {
- c.errorf("elastic: couldn't set body %+v for request: %v", opt.Body, err)
- return nil, err
- }
- }
-
- // Tracing
- c.dumpRequest((*http.Request)(req))
-
- // Get response
- res, err := c.c.Do((*http.Request)(req).WithContext(ctx))
- if err == context.Canceled || err == context.DeadlineExceeded {
- // Proceed, but don't mark the node as dead
- return nil, err
- }
- if ue, ok := err.(*url.Error); ok {
- // This happens e.g. on redirect errors, see https://golang.org/src/net/http/client_test.go#L329
- if ue.Err == context.Canceled || ue.Err == context.DeadlineExceeded {
- // Proceed, but don't mark the node as dead
- return nil, err
- }
- }
- if err != nil {
- n++
- wait, ok, rerr := retrier.Retry(ctx, n, (*http.Request)(req), res, err)
- if rerr != nil {
- c.errorf("elastic: %s is dead", conn.URL())
- conn.MarkAsDead()
- return nil, rerr
- }
- if !ok {
- c.errorf("elastic: %s is dead", conn.URL())
- conn.MarkAsDead()
- return nil, err
- }
- retried = true
- time.Sleep(wait)
- continue // try again
- }
- if res.Body != nil {
- defer res.Body.Close()
- }
-
- // Tracing
- c.dumpResponse(res)
-
- // Log deprecation warnings as errors
- if s := res.Header.Get("Warning"); s != "" {
- c.errorf(s)
- }
-
- // Check for errors
- if err := checkResponse((*http.Request)(req), res, opt.IgnoreErrors...); err != nil {
- // No retry if request succeeded
- // We still try to return a response.
- resp, _ = c.newResponse(res)
- return resp, err
- }
-
- // We successfully made a request with this connection
- conn.MarkAsHealthy()
-
- resp, err = c.newResponse(res)
- if err != nil {
- return nil, err
- }
-
- break
- }
-
- duration := time.Now().UTC().Sub(start)
- c.infof("%s %s [status:%d, request:%.3fs]",
- strings.ToUpper(opt.Method),
- req.URL,
- resp.StatusCode,
- float64(int64(duration/time.Millisecond))/1000)
-
- return resp, nil
-}
-
-// -- Document APIs --
-
-// Index a document.
-func (c *Client) Index() *IndexService {
- return NewIndexService(c)
-}
-
-// Get a document.
-func (c *Client) Get() *GetService {
- return NewGetService(c)
-}
-
-// MultiGet retrieves multiple documents in one roundtrip.
-func (c *Client) MultiGet() *MgetService {
- return NewMgetService(c)
-}
-
-// Mget retrieves multiple documents in one roundtrip.
-func (c *Client) Mget() *MgetService {
- return NewMgetService(c)
-}
-
-// Delete a document.
-func (c *Client) Delete() *DeleteService {
- return NewDeleteService(c)
-}
-
-// DeleteByQuery deletes documents as found by a query.
-func (c *Client) DeleteByQuery(indices ...string) *DeleteByQueryService {
- return NewDeleteByQueryService(c).Index(indices...)
-}
-
-// Update a document.
-func (c *Client) Update() *UpdateService {
- return NewUpdateService(c)
-}
-
-// UpdateByQuery performs an update on a set of documents.
-func (c *Client) UpdateByQuery(indices ...string) *UpdateByQueryService {
- return NewUpdateByQueryService(c).Index(indices...)
-}
-
-// Bulk is the entry point to mass insert/update/delete documents.
-func (c *Client) Bulk() *BulkService {
- return NewBulkService(c)
-}
-
-// BulkProcessor allows setting up a concurrent processor of bulk requests.
-func (c *Client) BulkProcessor() *BulkProcessorService {
- return NewBulkProcessorService(c)
-}
-
-// Reindex copies data from a source index into a destination index.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-reindex.html
-// for details on the Reindex API.
-func (c *Client) Reindex() *ReindexService {
- return NewReindexService(c)
-}
-
-// TermVectors returns information and statistics on terms in the fields
-// of a particular document.
-func (c *Client) TermVectors(index, typ string) *TermvectorsService {
- builder := NewTermvectorsService(c)
- builder = builder.Index(index).Type(typ)
- return builder
-}
-
-// MultiTermVectors returns information and statistics on terms in the fields
-// of multiple documents.
-func (c *Client) MultiTermVectors() *MultiTermvectorService {
- return NewMultiTermvectorService(c)
-}
-
-// -- Search APIs --
-
-// Search is the entry point for searches.
-func (c *Client) Search(indices ...string) *SearchService {
- return NewSearchService(c).Index(indices...)
-}
-
-// MultiSearch is the entry point for multi searches.
-func (c *Client) MultiSearch() *MultiSearchService {
- return NewMultiSearchService(c)
-}
-
-// Count documents.
-func (c *Client) Count(indices ...string) *CountService {
- return NewCountService(c).Index(indices...)
-}
-
-// Explain computes a score explanation for a query and a specific document.
-func (c *Client) Explain(index, typ, id string) *ExplainService {
- return NewExplainService(c).Index(index).Type(typ).Id(id)
-}
-
-// TODO Search Template
-// TODO Search Shards API
-// TODO Search Exists API
-// TODO Validate API
-
-// FieldCaps returns statistical information about fields in indices.
-func (c *Client) FieldCaps(indices ...string) *FieldCapsService {
- return NewFieldCapsService(c).Index(indices...)
-}
-
-// Exists checks if a document exists.
-func (c *Client) Exists() *ExistsService {
- return NewExistsService(c)
-}
-
-// Scroll through documents. Use this to efficiently scroll through results
-// while returning the results to a client.
-func (c *Client) Scroll(indices ...string) *ScrollService {
- return NewScrollService(c).Index(indices...)
-}
-
-// ClearScroll can be used to clear search contexts manually.
-func (c *Client) ClearScroll(scrollIds ...string) *ClearScrollService {
- return NewClearScrollService(c).ScrollId(scrollIds...)
-}
-
-// -- Indices APIs --
-
-// CreateIndex returns a service to create a new index.
-func (c *Client) CreateIndex(name string) *IndicesCreateService {
- return NewIndicesCreateService(c).Index(name)
-}
-
-// DeleteIndex returns a service to delete an index.
-func (c *Client) DeleteIndex(indices ...string) *IndicesDeleteService {
- return NewIndicesDeleteService(c).Index(indices)
-}
-
-// IndexExists allows to check if an index exists.
-func (c *Client) IndexExists(indices ...string) *IndicesExistsService {
- return NewIndicesExistsService(c).Index(indices)
-}
-
-// ShrinkIndex returns a service to shrink one index into another.
-func (c *Client) ShrinkIndex(source, target string) *IndicesShrinkService {
- return NewIndicesShrinkService(c).Source(source).Target(target)
-}
-
-// RolloverIndex rolls an alias over to a new index when the existing index
-// is considered to be too large or too old.
-func (c *Client) RolloverIndex(alias string) *IndicesRolloverService {
- return NewIndicesRolloverService(c).Alias(alias)
-}
-
-// TypeExists allows to check if one or more types exist in one or more indices.
-func (c *Client) TypeExists() *IndicesExistsTypeService {
- return NewIndicesExistsTypeService(c)
-}
-
-// IndexStats provides statistics on different operations happining
-// in one or more indices.
-func (c *Client) IndexStats(indices ...string) *IndicesStatsService {
- return NewIndicesStatsService(c).Index(indices...)
-}
-
-// OpenIndex opens an index.
-func (c *Client) OpenIndex(name string) *IndicesOpenService {
- return NewIndicesOpenService(c).Index(name)
-}
-
-// CloseIndex closes an index.
-func (c *Client) CloseIndex(name string) *IndicesCloseService {
- return NewIndicesCloseService(c).Index(name)
-}
-
-// IndexGet retrieves information about one or more indices.
-// IndexGet is only available for Elasticsearch 1.4 or later.
-func (c *Client) IndexGet(indices ...string) *IndicesGetService {
- return NewIndicesGetService(c).Index(indices...)
-}
-
-// IndexGetSettings retrieves settings of all, one or more indices.
-func (c *Client) IndexGetSettings(indices ...string) *IndicesGetSettingsService {
- return NewIndicesGetSettingsService(c).Index(indices...)
-}
-
-// IndexPutSettings sets settings for all, one or more indices.
-func (c *Client) IndexPutSettings(indices ...string) *IndicesPutSettingsService {
- return NewIndicesPutSettingsService(c).Index(indices...)
-}
-
-// IndexSegments retrieves low level segment information for all, one or more indices.
-func (c *Client) IndexSegments(indices ...string) *IndicesSegmentsService {
- return NewIndicesSegmentsService(c).Index(indices...)
-}
-
-// IndexAnalyze performs the analysis process on a text and returns the
-// token breakdown of the text.
-func (c *Client) IndexAnalyze() *IndicesAnalyzeService {
- return NewIndicesAnalyzeService(c)
-}
-
-// Forcemerge optimizes one or more indices.
-// It replaces the deprecated Optimize API.
-func (c *Client) Forcemerge(indices ...string) *IndicesForcemergeService {
- return NewIndicesForcemergeService(c).Index(indices...)
-}
-
-// Refresh asks Elasticsearch to refresh one or more indices.
-func (c *Client) Refresh(indices ...string) *RefreshService {
- return NewRefreshService(c).Index(indices...)
-}
-
-// Flush asks Elasticsearch to free memory from the index and
-// flush data to disk.
-func (c *Client) Flush(indices ...string) *IndicesFlushService {
- return NewIndicesFlushService(c).Index(indices...)
-}
-
-// Alias enables the caller to add and/or remove aliases.
-func (c *Client) Alias() *AliasService {
- return NewAliasService(c)
-}
-
-// Aliases returns aliases by index name(s).
-func (c *Client) Aliases() *AliasesService {
- return NewAliasesService(c)
-}
-
-// IndexGetTemplate gets an index template.
-// Use XXXTemplate funcs to manage search templates.
-func (c *Client) IndexGetTemplate(names ...string) *IndicesGetTemplateService {
- return NewIndicesGetTemplateService(c).Name(names...)
-}
-
-// IndexTemplateExists gets check if an index template exists.
-// Use XXXTemplate funcs to manage search templates.
-func (c *Client) IndexTemplateExists(name string) *IndicesExistsTemplateService {
- return NewIndicesExistsTemplateService(c).Name(name)
-}
-
-// IndexPutTemplate creates or updates an index template.
-// Use XXXTemplate funcs to manage search templates.
-func (c *Client) IndexPutTemplate(name string) *IndicesPutTemplateService {
- return NewIndicesPutTemplateService(c).Name(name)
-}
-
-// IndexDeleteTemplate deletes an index template.
-// Use XXXTemplate funcs to manage search templates.
-func (c *Client) IndexDeleteTemplate(name string) *IndicesDeleteTemplateService {
- return NewIndicesDeleteTemplateService(c).Name(name)
-}
-
-// GetMapping gets a mapping.
-func (c *Client) GetMapping() *IndicesGetMappingService {
- return NewIndicesGetMappingService(c)
-}
-
-// PutMapping registers a mapping.
-func (c *Client) PutMapping() *IndicesPutMappingService {
- return NewIndicesPutMappingService(c)
-}
-
-// GetFieldMapping gets mapping for fields.
-func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService {
- return NewIndicesGetFieldMappingService(c)
-}
-
-// -- cat APIs --
-
-// TODO cat aliases
-// TODO cat allocation
-// TODO cat count
-// TODO cat fielddata
-// TODO cat health
-// TODO cat indices
-// TODO cat master
-// TODO cat nodes
-// TODO cat pending tasks
-// TODO cat plugins
-// TODO cat recovery
-// TODO cat thread pool
-// TODO cat shards
-// TODO cat segments
-
-// -- Ingest APIs --
-
-// IngestPutPipeline adds pipelines and updates existing pipelines in
-// the cluster.
-func (c *Client) IngestPutPipeline(id string) *IngestPutPipelineService {
- return NewIngestPutPipelineService(c).Id(id)
-}
-
-// IngestGetPipeline returns pipelines based on ID.
-func (c *Client) IngestGetPipeline(ids ...string) *IngestGetPipelineService {
- return NewIngestGetPipelineService(c).Id(ids...)
-}
-
-// IngestDeletePipeline deletes a pipeline by ID.
-func (c *Client) IngestDeletePipeline(id string) *IngestDeletePipelineService {
- return NewIngestDeletePipelineService(c).Id(id)
-}
-
-// IngestSimulatePipeline executes a specific pipeline against the set of
-// documents provided in the body of the request.
-func (c *Client) IngestSimulatePipeline() *IngestSimulatePipelineService {
- return NewIngestSimulatePipelineService(c)
-}
-
-// -- Cluster APIs --
-
-// ClusterHealth retrieves the health of the cluster.
-func (c *Client) ClusterHealth() *ClusterHealthService {
- return NewClusterHealthService(c)
-}
-
-// ClusterState retrieves the state of the cluster.
-func (c *Client) ClusterState() *ClusterStateService {
- return NewClusterStateService(c)
-}
-
-// ClusterStats retrieves cluster statistics.
-func (c *Client) ClusterStats() *ClusterStatsService {
- return NewClusterStatsService(c)
-}
-
-// NodesInfo retrieves one or more or all of the cluster nodes information.
-func (c *Client) NodesInfo() *NodesInfoService {
- return NewNodesInfoService(c)
-}
-
-// NodesStats retrieves one or more or all of the cluster nodes statistics.
-func (c *Client) NodesStats() *NodesStatsService {
- return NewNodesStatsService(c)
-}
-
-// TasksCancel cancels tasks running on the specified nodes.
-func (c *Client) TasksCancel() *TasksCancelService {
- return NewTasksCancelService(c)
-}
-
-// TasksList retrieves the list of tasks running on the specified nodes.
-func (c *Client) TasksList() *TasksListService {
- return NewTasksListService(c)
-}
-
-// TasksGetTask retrieves a task running on the cluster.
-func (c *Client) TasksGetTask() *TasksGetTaskService {
- return NewTasksGetTaskService(c)
-}
-
-// TODO Pending cluster tasks
-// TODO Cluster Reroute
-// TODO Cluster Update Settings
-// TODO Nodes Stats
-// TODO Nodes hot_threads
-
-// -- Snapshot and Restore --
-
-// TODO Snapshot Delete
-// TODO Snapshot Get
-// TODO Snapshot Restore
-// TODO Snapshot Status
-
-// SnapshotCreate creates a snapshot.
-func (c *Client) SnapshotCreate(repository string, snapshot string) *SnapshotCreateService {
- return NewSnapshotCreateService(c).Repository(repository).Snapshot(snapshot)
-}
-
-// SnapshotCreateRepository creates or updates a snapshot repository.
-func (c *Client) SnapshotCreateRepository(repository string) *SnapshotCreateRepositoryService {
- return NewSnapshotCreateRepositoryService(c).Repository(repository)
-}
-
-// SnapshotDeleteRepository deletes a snapshot repository.
-func (c *Client) SnapshotDeleteRepository(repositories ...string) *SnapshotDeleteRepositoryService {
- return NewSnapshotDeleteRepositoryService(c).Repository(repositories...)
-}
-
-// SnapshotGetRepository gets a snapshot repository.
-func (c *Client) SnapshotGetRepository(repositories ...string) *SnapshotGetRepositoryService {
- return NewSnapshotGetRepositoryService(c).Repository(repositories...)
-}
-
-// SnapshotVerifyRepository verifies a snapshot repository.
-func (c *Client) SnapshotVerifyRepository(repository string) *SnapshotVerifyRepositoryService {
- return NewSnapshotVerifyRepositoryService(c).Repository(repository)
-}
-
-// -- Helpers and shortcuts --
-
-// ElasticsearchVersion returns the version number of Elasticsearch
-// running on the given URL.
-func (c *Client) ElasticsearchVersion(url string) (string, error) {
- res, _, err := c.Ping(url).Do(context.Background())
- if err != nil {
- return "", err
- }
- return res.Version.Number, nil
-}
-
-// IndexNames returns the names of all indices in the cluster.
-func (c *Client) IndexNames() ([]string, error) {
- res, err := c.IndexGetSettings().Index("_all").Do(context.Background())
- if err != nil {
- return nil, err
- }
- var names []string
- for name := range res {
- names = append(names, name)
- }
- return names, nil
-}
-
-// Ping checks if a given node in a cluster exists and (optionally)
-// returns some basic information about the Elasticsearch server,
-// e.g. the Elasticsearch version number.
-//
-// Notice that you need to specify a URL here explicitly.
-func (c *Client) Ping(url string) *PingService {
- return NewPingService(c).URL(url)
-}
-
-// WaitForStatus waits for the cluster to have the given status.
-// This is a shortcut method for the ClusterHealth service.
-//
-// WaitForStatus waits for the specified timeout, e.g. "10s".
-// If the cluster will have the given state within the timeout, nil is returned.
-// If the request timed out, ErrTimeout is returned.
-func (c *Client) WaitForStatus(status string, timeout string) error {
- health, err := c.ClusterHealth().WaitForStatus(status).Timeout(timeout).Do(context.Background())
- if err != nil {
- return err
- }
- if health.TimedOut {
- return ErrTimeout
- }
- return nil
-}
-
-// WaitForGreenStatus waits for the cluster to have the "green" status.
-// See WaitForStatus for more details.
-func (c *Client) WaitForGreenStatus(timeout string) error {
- return c.WaitForStatus("green", timeout)
-}
-
-// WaitForYellowStatus waits for the cluster to have the "yellow" status.
-// See WaitForStatus for more details.
-func (c *Client) WaitForYellowStatus(timeout string) error {
- return c.WaitForStatus("yellow", timeout)
-}
diff --git a/vendor/github.com/olivere/elastic/client_test.go b/vendor/github.com/olivere/elastic/client_test.go
deleted file mode 100644
index 4d0440ee0..000000000
--- a/vendor/github.com/olivere/elastic/client_test.go
+++ /dev/null
@@ -1,1319 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "log"
- "net"
- "net/http"
- "reflect"
- "regexp"
- "strings"
- "sync"
- "testing"
- "time"
-
- "github.com/fortytw2/leaktest"
-)
-
-func findConn(s string, slice ...*conn) (int, bool) {
- for i, t := range slice {
- if s == t.URL() {
- return i, true
- }
- }
- return -1, false
-}
-
-// -- NewClient --
-
-func TestClientDefaults(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- if client.healthcheckEnabled != true {
- t.Errorf("expected health checks to be enabled, got: %v", client.healthcheckEnabled)
- }
- if client.healthcheckTimeoutStartup != DefaultHealthcheckTimeoutStartup {
- t.Errorf("expected health checks timeout on startup = %v, got: %v", DefaultHealthcheckTimeoutStartup, client.healthcheckTimeoutStartup)
- }
- if client.healthcheckTimeout != DefaultHealthcheckTimeout {
- t.Errorf("expected health checks timeout = %v, got: %v", DefaultHealthcheckTimeout, client.healthcheckTimeout)
- }
- if client.healthcheckInterval != DefaultHealthcheckInterval {
- t.Errorf("expected health checks interval = %v, got: %v", DefaultHealthcheckInterval, client.healthcheckInterval)
- }
- if client.snifferEnabled != true {
- t.Errorf("expected sniffing to be enabled, got: %v", client.snifferEnabled)
- }
- if client.snifferTimeoutStartup != DefaultSnifferTimeoutStartup {
- t.Errorf("expected sniffer timeout on startup = %v, got: %v", DefaultSnifferTimeoutStartup, client.snifferTimeoutStartup)
- }
- if client.snifferTimeout != DefaultSnifferTimeout {
- t.Errorf("expected sniffer timeout = %v, got: %v", DefaultSnifferTimeout, client.snifferTimeout)
- }
- if client.snifferInterval != DefaultSnifferInterval {
- t.Errorf("expected sniffer interval = %v, got: %v", DefaultSnifferInterval, client.snifferInterval)
- }
- if client.basicAuth != false {
- t.Errorf("expected no basic auth; got: %v", client.basicAuth)
- }
- if client.basicAuthUsername != "" {
- t.Errorf("expected no basic auth username; got: %q", client.basicAuthUsername)
- }
- if client.basicAuthPassword != "" {
- t.Errorf("expected no basic auth password; got: %q", client.basicAuthUsername)
- }
- if client.sendGetBodyAs != "GET" {
- t.Errorf("expected sendGetBodyAs to be GET; got: %q", client.sendGetBodyAs)
- }
-}
-
-func TestClientWithoutURL(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- // Two things should happen here:
- // 1. The client starts sniffing the cluster on DefaultURL
- // 2. The sniffing process should find (at least) one node in the cluster, i.e. the DefaultURL
- if len(client.conns) == 0 {
- t.Fatalf("expected at least 1 node in the cluster, got: %d (%v)", len(client.conns), client.conns)
- }
- if !isTravis() {
- if _, found := findConn(DefaultURL, client.conns...); !found {
- t.Errorf("expected to find node with default URL of %s in %v", DefaultURL, client.conns)
- }
- }
-}
-
-func TestClientWithSingleURL(t *testing.T) {
- client, err := NewClient(SetURL("http://127.0.0.1:9200"))
- if err != nil {
- t.Fatal(err)
- }
- // Two things should happen here:
- // 1. The client starts sniffing the cluster on DefaultURL
- // 2. The sniffing process should find (at least) one node in the cluster, i.e. the DefaultURL
- if len(client.conns) == 0 {
- t.Fatalf("expected at least 1 node in the cluster, got: %d (%v)", len(client.conns), client.conns)
- }
- if !isTravis() {
- if _, found := findConn(DefaultURL, client.conns...); !found {
- t.Errorf("expected to find node with default URL of %s in %v", DefaultURL, client.conns)
- }
- }
-}
-
-func TestClientWithMultipleURLs(t *testing.T) {
- client, err := NewClient(SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
- // The client should sniff both URLs, but only 127.0.0.1:9200 should return nodes.
- if len(client.conns) != 1 {
- t.Fatalf("expected exactly 1 node in the local cluster, got: %d (%v)", len(client.conns), client.conns)
- }
- if !isTravis() {
- if client.conns[0].URL() != DefaultURL {
- t.Errorf("expected to find node with default URL of %s in %v", DefaultURL, client.conns)
- }
- }
-}
-
-func TestClientWithBasicAuth(t *testing.T) {
- client, err := NewClient(SetBasicAuth("user", "secret"))
- if err != nil {
- t.Fatal(err)
- }
- if client.basicAuth != true {
- t.Errorf("expected basic auth; got: %v", client.basicAuth)
- }
- if got, want := client.basicAuthUsername, "user"; got != want {
- t.Errorf("expected basic auth username %q; got: %q", want, got)
- }
- if got, want := client.basicAuthPassword, "secret"; got != want {
- t.Errorf("expected basic auth password %q; got: %q", want, got)
- }
-}
-
-func TestClientWithBasicAuthInUserInfo(t *testing.T) {
- client, err := NewClient(SetURL("http://user1:secret1@localhost:9200", "http://user2:secret2@localhost:9200"))
- if err != nil {
- t.Fatal(err)
- }
- if client.basicAuth != true {
- t.Errorf("expected basic auth; got: %v", client.basicAuth)
- }
- if got, want := client.basicAuthUsername, "user1"; got != want {
- t.Errorf("expected basic auth username %q; got: %q", want, got)
- }
- if got, want := client.basicAuthPassword, "secret1"; got != want {
- t.Errorf("expected basic auth password %q; got: %q", want, got)
- }
-}
-
-func TestClientSniffSuccess(t *testing.T) {
- client, err := NewClient(SetURL("http://127.0.0.1:19200", "http://127.0.0.1:9200"))
- if err != nil {
- t.Fatal(err)
- }
- // The client should sniff both URLs, but only 127.0.0.1:9200 should return nodes.
- if len(client.conns) != 1 {
- t.Fatalf("expected exactly 1 node in the local cluster, got: %d (%v)", len(client.conns), client.conns)
- }
-}
-
-func TestClientSniffFailure(t *testing.T) {
- _, err := NewClient(SetURL("http://127.0.0.1:19200", "http://127.0.0.1:19201"))
- if err == nil {
- t.Fatalf("expected cluster to fail with no nodes found")
- }
-}
-
-func TestClientSnifferCallback(t *testing.T) {
- var calls int
- cb := func(node *NodesInfoNode) bool {
- calls++
- return false
- }
- _, err := NewClient(
- SetURL("http://127.0.0.1:19200", "http://127.0.0.1:9200"),
- SetSnifferCallback(cb))
- if err == nil {
- t.Fatalf("expected cluster to fail with no nodes found")
- }
- if calls != 1 {
- t.Fatalf("expected 1 call to the sniffer callback, got %d", calls)
- }
-}
-
-func TestClientSniffDisabled(t *testing.T) {
- client, err := NewClient(SetSniff(false), SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
- // The client should not sniff, so it should have two connections.
- if len(client.conns) != 2 {
- t.Fatalf("expected 2 nodes, got: %d (%v)", len(client.conns), client.conns)
- }
- // Make two requests, so that both connections are being used
- for i := 0; i < len(client.conns); i++ {
- client.Flush().Do(context.TODO())
- }
- // The first connection (127.0.0.1:9200) should now be okay.
- if i, found := findConn("http://127.0.0.1:9200", client.conns...); !found {
- t.Fatalf("expected connection to %q to be found", "http://127.0.0.1:9200")
- } else {
- if conn := client.conns[i]; conn.IsDead() {
- t.Fatal("expected connection to be alive, but it is dead")
- }
- }
- // The second connection (127.0.0.1:9201) should now be marked as dead.
- if i, found := findConn("http://127.0.0.1:9201", client.conns...); !found {
- t.Fatalf("expected connection to %q to be found", "http://127.0.0.1:9201")
- } else {
- if conn := client.conns[i]; !conn.IsDead() {
- t.Fatal("expected connection to be dead, but it is alive")
- }
- }
-}
-
-func TestClientWillMarkConnectionsAsAliveWhenAllAreDead(t *testing.T) {
- client, err := NewClient(SetURL("http://127.0.0.1:9201"),
- SetSniff(false), SetHealthcheck(false), SetMaxRetries(0))
- if err != nil {
- t.Fatal(err)
- }
- // We should have a connection.
- if len(client.conns) != 1 {
- t.Fatalf("expected 1 node, got: %d (%v)", len(client.conns), client.conns)
- }
-
- // Make a request, so that the connections is marked as dead.
- client.Flush().Do(context.TODO())
-
- // The connection should now be marked as dead.
- if i, found := findConn("http://127.0.0.1:9201", client.conns...); !found {
- t.Fatalf("expected connection to %q to be found", "http://127.0.0.1:9201")
- } else {
- if conn := client.conns[i]; !conn.IsDead() {
- t.Fatalf("expected connection to be dead, got: %v", conn)
- }
- }
-
- // Now send another request and the connection should be marked as alive again.
- client.Flush().Do(context.TODO())
-
- if i, found := findConn("http://127.0.0.1:9201", client.conns...); !found {
- t.Fatalf("expected connection to %q to be found", "http://127.0.0.1:9201")
- } else {
- if conn := client.conns[i]; conn.IsDead() {
- t.Fatalf("expected connection to be alive, got: %v", conn)
- }
- }
-}
-
-func TestClientWithRequiredPlugins(t *testing.T) {
- _, err := NewClient(SetRequiredPlugins("no-such-plugin"))
- if err == nil {
- t.Fatal("expected error when creating client")
- }
- if got, want := err.Error(), "elastic: plugin no-such-plugin not found"; got != want {
- t.Fatalf("expected error %q; got: %q", want, got)
- }
-}
-
-func TestClientHealthcheckStartupTimeout(t *testing.T) {
- start := time.Now()
- _, err := NewClient(SetURL("http://localhost:9299"), SetHealthcheckTimeoutStartup(5*time.Second))
- duration := time.Now().Sub(start)
- if !IsConnErr(err) {
- t.Fatal(err)
- }
- if !strings.Contains(err.Error(), "connection refused") {
- t.Fatalf("expected error to contain %q, have %q", "connection refused", err.Error())
- }
- if duration < 5*time.Second {
- t.Fatalf("expected a timeout in more than 5 seconds; got: %v", duration)
- }
-}
-
-func TestClientHealthcheckTimeoutLeak(t *testing.T) {
- // This test test checks if healthcheck requests are canceled
- // after timeout.
- // It contains couple of hacks which won't be needed once we
- // stop supporting Go1.7.
- // On Go1.7 it uses server side effects to monitor if connection
- // was closed,
- // and on Go 1.8+ we're additionally honestly monitoring routine
- // leaks via leaktest.
- mux := http.NewServeMux()
-
- var reqDoneMu sync.Mutex
- var reqDone bool
- mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- cn, ok := w.(http.CloseNotifier)
- if !ok {
- t.Fatalf("Writer is not CloseNotifier, but %v", reflect.TypeOf(w).Name())
- }
- <-cn.CloseNotify()
- reqDoneMu.Lock()
- reqDone = true
- reqDoneMu.Unlock()
- })
-
- lis, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("Couldn't setup listener: %v", err)
- }
- addr := lis.Addr().String()
-
- srv := &http.Server{
- Handler: mux,
- }
- go srv.Serve(lis)
-
- cli := &Client{
- c: &http.Client{},
- conns: []*conn{
- &conn{
- url: "http://" + addr + "/",
- },
- },
- }
-
- type closer interface {
- Shutdown(context.Context) error
- }
-
- // pre-Go1.8 Server can't Shutdown
- cl, isServerCloseable := (interface{}(srv)).(closer)
-
- // Since Go1.7 can't Shutdown() - there will be leak from server
- // Monitor leaks on Go 1.8+
- if isServerCloseable {
- defer leaktest.CheckTimeout(t, time.Second*10)()
- }
-
- cli.healthcheck(time.Millisecond*500, true)
-
- if isServerCloseable {
- ctx, cancel := context.WithTimeout(context.Background(), time.Second)
- defer cancel()
- cl.Shutdown(ctx)
- }
-
- <-time.After(time.Second)
- reqDoneMu.Lock()
- if !reqDone {
- reqDoneMu.Unlock()
- t.Fatal("Request wasn't canceled or stopped")
- }
- reqDoneMu.Unlock()
-}
-
-// -- NewSimpleClient --
-
-func TestSimpleClientDefaults(t *testing.T) {
- client, err := NewSimpleClient()
- if err != nil {
- t.Fatal(err)
- }
- if client.healthcheckEnabled != false {
- t.Errorf("expected health checks to be disabled, got: %v", client.healthcheckEnabled)
- }
- if client.healthcheckTimeoutStartup != off {
- t.Errorf("expected health checks timeout on startup = %v, got: %v", off, client.healthcheckTimeoutStartup)
- }
- if client.healthcheckTimeout != off {
- t.Errorf("expected health checks timeout = %v, got: %v", off, client.healthcheckTimeout)
- }
- if client.healthcheckInterval != off {
- t.Errorf("expected health checks interval = %v, got: %v", off, client.healthcheckInterval)
- }
- if client.snifferEnabled != false {
- t.Errorf("expected sniffing to be disabled, got: %v", client.snifferEnabled)
- }
- if client.snifferTimeoutStartup != off {
- t.Errorf("expected sniffer timeout on startup = %v, got: %v", off, client.snifferTimeoutStartup)
- }
- if client.snifferTimeout != off {
- t.Errorf("expected sniffer timeout = %v, got: %v", off, client.snifferTimeout)
- }
- if client.snifferInterval != off {
- t.Errorf("expected sniffer interval = %v, got: %v", off, client.snifferInterval)
- }
- if client.basicAuth != false {
- t.Errorf("expected no basic auth; got: %v", client.basicAuth)
- }
- if client.basicAuthUsername != "" {
- t.Errorf("expected no basic auth username; got: %q", client.basicAuthUsername)
- }
- if client.basicAuthPassword != "" {
- t.Errorf("expected no basic auth password; got: %q", client.basicAuthUsername)
- }
- if client.sendGetBodyAs != "GET" {
- t.Errorf("expected sendGetBodyAs to be GET; got: %q", client.sendGetBodyAs)
- }
-}
-
-// -- Start and stop --
-
-func TestClientStartAndStop(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
-
- running := client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-
- // Stop
- client.Stop()
- running = client.IsRunning()
- if running {
- t.Fatalf("expected background processes to be stopped; got: %v", running)
- }
-
- // Stop again => no-op
- client.Stop()
- running = client.IsRunning()
- if running {
- t.Fatalf("expected background processes to be stopped; got: %v", running)
- }
-
- // Start
- client.Start()
- running = client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-
- // Start again => no-op
- client.Start()
- running = client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-}
-
-func TestClientStartAndStopWithSnifferAndHealthchecksDisabled(t *testing.T) {
- client, err := NewClient(SetSniff(false), SetHealthcheck(false))
- if err != nil {
- t.Fatal(err)
- }
-
- running := client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-
- // Stop
- client.Stop()
- running = client.IsRunning()
- if running {
- t.Fatalf("expected background processes to be stopped; got: %v", running)
- }
-
- // Stop again => no-op
- client.Stop()
- running = client.IsRunning()
- if running {
- t.Fatalf("expected background processes to be stopped; got: %v", running)
- }
-
- // Start
- client.Start()
- running = client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-
- // Start again => no-op
- client.Start()
- running = client.IsRunning()
- if !running {
- t.Fatalf("expected background processes to run; got: %v", running)
- }
-}
-
-// -- Sniffing --
-
-func TestClientSniffNode(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
-
- ch := make(chan []*conn)
- go func() { ch <- client.sniffNode(context.Background(), DefaultURL) }()
-
- select {
- case nodes := <-ch:
- if len(nodes) != 1 {
- t.Fatalf("expected %d nodes; got: %d", 1, len(nodes))
- }
- pattern := `http:\/\/[\d\.]+:9200`
- matched, err := regexp.MatchString(pattern, nodes[0].URL())
- if err != nil {
- t.Fatal(err)
- }
- if !matched {
- t.Fatalf("expected node URL pattern %q; got: %q", pattern, nodes[0].URL())
- }
- case <-time.After(2 * time.Second):
- t.Fatal("expected no timeout in sniff node")
- break
- }
-}
-
-func TestClientSniffOnDefaultURL(t *testing.T) {
- client, _ := NewClient()
- if client == nil {
- t.Fatal("no client returned")
- }
-
- ch := make(chan error, 1)
- go func() {
- ch <- client.sniff(DefaultSnifferTimeoutStartup)
- }()
-
- select {
- case err := <-ch:
- if err != nil {
- t.Fatalf("expected sniff to succeed; got: %v", err)
- }
- if len(client.conns) != 1 {
- t.Fatalf("expected %d nodes; got: %d", 1, len(client.conns))
- }
- pattern := `http:\/\/[\d\.]+:9200`
- matched, err := regexp.MatchString(pattern, client.conns[0].URL())
- if err != nil {
- t.Fatal(err)
- }
- if !matched {
- t.Fatalf("expected node URL pattern %q; got: %q", pattern, client.conns[0].URL())
- }
- case <-time.After(2 * time.Second):
- t.Fatal("expected no timeout in sniff")
- break
- }
-}
-
-func TestClientSniffTimeoutLeak(t *testing.T) {
- // This test test checks if sniff requests are canceled
- // after timeout.
- // It contains couple of hacks which won't be needed once we
- // stop supporting Go1.7.
- // On Go1.7 it uses server side effects to monitor if connection
- // was closed,
- // and on Go 1.8+ we're additionally honestly monitoring routine
- // leaks via leaktest.
- mux := http.NewServeMux()
-
- var reqDoneMu sync.Mutex
- var reqDone bool
- mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- cn, ok := w.(http.CloseNotifier)
- if !ok {
- t.Fatalf("Writer is not CloseNotifier, but %v", reflect.TypeOf(w).Name())
- }
- <-cn.CloseNotify()
- reqDoneMu.Lock()
- reqDone = true
- reqDoneMu.Unlock()
- })
-
- lis, err := net.Listen("tcp", "127.0.0.1:0")
- if err != nil {
- t.Fatalf("Couldn't setup listener: %v", err)
- }
- addr := lis.Addr().String()
-
- srv := &http.Server{
- Handler: mux,
- }
- go srv.Serve(lis)
-
- cli := &Client{
- c: &http.Client{},
- conns: []*conn{
- &conn{
- url: "http://" + addr + "/",
- },
- },
- snifferEnabled: true,
- }
-
- type closer interface {
- Shutdown(context.Context) error
- }
-
- // pre-Go1.8 Server can't Shutdown
- cl, isServerCloseable := (interface{}(srv)).(closer)
-
- // Since Go1.7 can't Shutdown() - there will be leak from server
- // Monitor leaks on Go 1.8+
- if isServerCloseable {
- defer leaktest.CheckTimeout(t, time.Second*10)()
- }
-
- cli.sniff(time.Millisecond * 500)
-
- if isServerCloseable {
- ctx, cancel := context.WithTimeout(context.Background(), time.Second)
- defer cancel()
- cl.Shutdown(ctx)
- }
-
- <-time.After(time.Second)
- reqDoneMu.Lock()
- if !reqDone {
- reqDoneMu.Unlock()
- t.Fatal("Request wasn't canceled or stopped")
- }
- reqDoneMu.Unlock()
-}
-
-func TestClientExtractHostname(t *testing.T) {
- tests := []struct {
- Scheme string
- Address string
- Output string
- }{
- {
- Scheme: "http",
- Address: "",
- Output: "",
- },
- {
- Scheme: "https",
- Address: "abc",
- Output: "",
- },
- {
- Scheme: "http",
- Address: "127.0.0.1:19200",
- Output: "http://127.0.0.1:19200",
- },
- {
- Scheme: "https",
- Address: "127.0.0.1:9200",
- Output: "https://127.0.0.1:9200",
- },
- {
- Scheme: "http",
- Address: "myelk.local/10.1.0.24:9200",
- Output: "http://10.1.0.24:9200",
- },
- }
-
- client, err := NewClient(SetSniff(false), SetHealthcheck(false))
- if err != nil {
- t.Fatal(err)
- }
- for _, test := range tests {
- got := client.extractHostname(test.Scheme, test.Address)
- if want := test.Output; want != got {
- t.Errorf("expected %q; got: %q", want, got)
- }
- }
-}
-
-// -- Selector --
-
-func TestClientSelectConnHealthy(t *testing.T) {
- client, err := NewClient(
- SetSniff(false),
- SetHealthcheck(false),
- SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
-
- // Both are healthy, so we should get both URLs in round-robin
- client.conns[0].MarkAsHealthy()
- client.conns[1].MarkAsHealthy()
-
- // #1: Return 1st
- c, err := client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[0].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[0].URL())
- }
- // #2: Return 2nd
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[1].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[1].URL())
- }
- // #3: Return 1st
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[0].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[0].URL())
- }
-}
-
-func TestClientSelectConnHealthyAndDead(t *testing.T) {
- client, err := NewClient(
- SetSniff(false),
- SetHealthcheck(false),
- SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
-
- // 1st is healthy, second is dead
- client.conns[0].MarkAsHealthy()
- client.conns[1].MarkAsDead()
-
- // #1: Return 1st
- c, err := client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[0].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[0].URL())
- }
- // #2: Return 1st again
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[0].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[0].URL())
- }
- // #3: Return 1st again and again
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[0].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[0].URL())
- }
-}
-
-func TestClientSelectConnDeadAndHealthy(t *testing.T) {
- client, err := NewClient(
- SetSniff(false),
- SetHealthcheck(false),
- SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
-
- // 1st is dead, 2nd is healthy
- client.conns[0].MarkAsDead()
- client.conns[1].MarkAsHealthy()
-
- // #1: Return 2nd
- c, err := client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[1].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[1].URL())
- }
- // #2: Return 2nd again
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[1].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[1].URL())
- }
- // #3: Return 2nd again and again
- c, err = client.next()
- if err != nil {
- t.Fatal(err)
- }
- if c.URL() != client.conns[1].URL() {
- t.Fatalf("expected %s; got: %s", c.URL(), client.conns[1].URL())
- }
-}
-
-func TestClientSelectConnAllDead(t *testing.T) {
- client, err := NewClient(
- SetSniff(false),
- SetHealthcheck(false),
- SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
- if err != nil {
- t.Fatal(err)
- }
-
- // Both are dead
- client.conns[0].MarkAsDead()
- client.conns[1].MarkAsDead()
-
- // If all connections are dead, next should make them alive again, but
- // still return an error when it first finds out.
- c, err := client.next()
- if !IsConnErr(err) {
- t.Fatal(err)
- }
- if c != nil {
- t.Fatalf("expected no connection; got: %v", c)
- }
- // Return a connection
- c, err = client.next()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if c == nil {
- t.Fatalf("expected connection; got: %v", c)
- }
- // Return a connection
- c, err = client.next()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if c == nil {
- t.Fatalf("expected connection; got: %v", c)
- }
-}
-
-// -- ElasticsearchVersion --
-
-func TestElasticsearchVersion(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- version, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if version == "" {
- t.Errorf("expected a version number, got: %q", version)
- }
-}
-
-// -- IndexNames --
-
-func TestIndexNames(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- names, err := client.IndexNames()
- if err != nil {
- t.Fatal(err)
- }
- if len(names) == 0 {
- t.Fatalf("expected some index names, got: %d", len(names))
- }
- var found bool
- for _, name := range names {
- if name == testIndexName {
- found = true
- break
- }
- }
- if !found {
- t.Fatalf("expected to find index %q; got: %v", testIndexName, found)
- }
-}
-
-// -- PerformRequest --
-
-func TestPerformRequest(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-}
-
-func TestPerformRequestWithSimpleClient(t *testing.T) {
- client, err := NewSimpleClient()
- if err != nil {
- t.Fatal(err)
- }
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-}
-
-func TestPerformRequestWithLogger(t *testing.T) {
- var w bytes.Buffer
- out := log.New(&w, "LOGGER ", log.LstdFlags)
-
- client, err := NewClient(SetInfoLog(out), SetSniff(false))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-
- got := w.String()
- pattern := `^LOGGER \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} GET http://.*/ \[status:200, request:\d+\.\d{3}s\]\n`
- matched, err := regexp.MatchString(pattern, got)
- if err != nil {
- t.Fatalf("expected log line to match %q; got: %v", pattern, err)
- }
- if !matched {
- t.Errorf("expected log line to match %q; got: %v", pattern, got)
- }
-}
-
-func TestPerformRequestWithLoggerAndTracer(t *testing.T) {
- var lw bytes.Buffer
- lout := log.New(&lw, "LOGGER ", log.LstdFlags)
-
- var tw bytes.Buffer
- tout := log.New(&tw, "TRACER ", log.LstdFlags)
-
- client, err := NewClient(SetInfoLog(lout), SetTraceLog(tout), SetSniff(false))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-
- lgot := lw.String()
- if lgot == "" {
- t.Errorf("expected logger output; got: %q", lgot)
- }
-
- tgot := tw.String()
- if tgot == "" {
- t.Errorf("expected tracer output; got: %q", tgot)
- }
-}
-func TestPerformRequestWithTracerOnError(t *testing.T) {
- var tw bytes.Buffer
- tout := log.New(&tw, "TRACER ", log.LstdFlags)
-
- client, err := NewClient(SetTraceLog(tout), SetSniff(false))
- if err != nil {
- t.Fatal(err)
- }
-
- client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/no-such-index",
- })
-
- tgot := tw.String()
- if tgot == "" {
- t.Errorf("expected tracer output; got: %q", tgot)
- }
-}
-
-type customLogger struct {
- out bytes.Buffer
-}
-
-func (l *customLogger) Printf(format string, v ...interface{}) {
- l.out.WriteString(fmt.Sprintf(format, v...) + "\n")
-}
-
-func TestPerformRequestWithCustomLogger(t *testing.T) {
- logger := &customLogger{}
-
- client, err := NewClient(SetInfoLog(logger), SetSniff(false))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-
- got := logger.out.String()
- pattern := `^GET http://.*/ \[status:200, request:\d+\.\d{3}s\]\n`
- matched, err := regexp.MatchString(pattern, got)
- if err != nil {
- t.Fatalf("expected log line to match %q; got: %v", pattern, err)
- }
- if !matched {
- t.Errorf("expected log line to match %q; got: %v", pattern, got)
- }
-}
-
-// failingTransport will run a fail callback if it sees a given URL path prefix.
-type failingTransport struct {
- path string // path prefix to look for
- fail func(*http.Request) (*http.Response, error) // call when path prefix is found
- next http.RoundTripper // next round-tripper (use http.DefaultTransport if nil)
-}
-
-// RoundTrip implements a failing transport.
-func (tr *failingTransport) RoundTrip(r *http.Request) (*http.Response, error) {
- if strings.HasPrefix(r.URL.Path, tr.path) && tr.fail != nil {
- return tr.fail(r)
- }
- if tr.next != nil {
- return tr.next.RoundTrip(r)
- }
- return http.DefaultTransport.RoundTrip(r)
-}
-
-func TestPerformRequestRetryOnHttpError(t *testing.T) {
- var numFailedReqs int
- fail := func(r *http.Request) (*http.Response, error) {
- numFailedReqs += 1
- //return &http.Response{Request: r, StatusCode: 400}, nil
- return nil, errors.New("request failed")
- }
-
- // Run against a failing endpoint and see if PerformRequest
- // retries correctly.
- tr := &failingTransport{path: "/fail", fail: fail}
- httpClient := &http.Client{Transport: tr}
-
- client, err := NewClient(SetHttpClient(httpClient), SetMaxRetries(5), SetHealthcheck(false))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/fail",
- })
- if err == nil {
- t.Fatal("expected error")
- }
- if res != nil {
- t.Fatal("expected no response")
- }
- // Connection should be marked as dead after it failed
- if numFailedReqs != 5 {
- t.Errorf("expected %d failed requests; got: %d", 5, numFailedReqs)
- }
-}
-
-func TestPerformRequestNoRetryOnValidButUnsuccessfulHttpStatus(t *testing.T) {
- var numFailedReqs int
- fail := func(r *http.Request) (*http.Response, error) {
- numFailedReqs += 1
- return &http.Response{Request: r, StatusCode: 500}, nil
- }
-
- // Run against a failing endpoint and see if PerformRequest
- // retries correctly.
- tr := &failingTransport{path: "/fail", fail: fail}
- httpClient := &http.Client{Transport: tr}
-
- client, err := NewClient(SetHttpClient(httpClient), SetMaxRetries(5), SetHealthcheck(false))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/fail",
- })
- if err == nil {
- t.Fatal("expected error")
- }
- if res == nil {
- t.Fatal("expected response, got nil")
- }
- if want, got := 500, res.StatusCode; want != got {
- t.Fatalf("expected status code = %d, got %d", want, got)
- }
- // Retry should not have triggered additional requests because
- if numFailedReqs != 1 {
- t.Errorf("expected %d failed requests; got: %d", 1, numFailedReqs)
- }
-}
-
-// failingBody will return an error when json.Marshal is called on it.
-type failingBody struct{}
-
-// MarshalJSON implements the json.Marshaler interface and always returns an error.
-func (fb failingBody) MarshalJSON() ([]byte, error) {
- return nil, errors.New("failing to marshal")
-}
-
-func TestPerformRequestWithSetBodyError(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- Body: failingBody{},
- })
- if err == nil {
- t.Fatal("expected error")
- }
- if res != nil {
- t.Fatal("expected no response")
- }
-}
-
-// sleepingTransport will sleep before doing a request.
-type sleepingTransport struct {
- timeout time.Duration
-}
-
-// RoundTrip implements a "sleepy" transport.
-func (tr *sleepingTransport) RoundTrip(r *http.Request) (*http.Response, error) {
- time.Sleep(tr.timeout)
- return http.DefaultTransport.RoundTrip(r)
-}
-
-func TestPerformRequestWithCancel(t *testing.T) {
- tr := &sleepingTransport{timeout: 3 * time.Second}
- httpClient := &http.Client{Transport: tr}
-
- client, err := NewSimpleClient(SetHttpClient(httpClient), SetMaxRetries(0))
- if err != nil {
- t.Fatal(err)
- }
-
- type result struct {
- res *Response
- err error
- }
- ctx, cancel := context.WithCancel(context.Background())
-
- resc := make(chan result, 1)
- go func() {
- res, err := client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- resc <- result{res: res, err: err}
- }()
- select {
- case <-time.After(1 * time.Second):
- cancel()
- case res := <-resc:
- t.Fatalf("expected response before cancel, got %v", res)
- case <-ctx.Done():
- t.Fatalf("expected no early termination, got ctx.Done(): %v", ctx.Err())
- }
- err = ctx.Err()
- if err != context.Canceled {
- t.Fatalf("expected error context.Canceled, got: %v", err)
- }
-}
-
-func TestPerformRequestWithTimeout(t *testing.T) {
- tr := &sleepingTransport{timeout: 3 * time.Second}
- httpClient := &http.Client{Transport: tr}
-
- client, err := NewSimpleClient(SetHttpClient(httpClient), SetMaxRetries(0))
- if err != nil {
- t.Fatal(err)
- }
-
- type result struct {
- res *Response
- err error
- }
- ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
- defer cancel()
-
- resc := make(chan result, 1)
- go func() {
- res, err := client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- resc <- result{res: res, err: err}
- }()
- select {
- case res := <-resc:
- t.Fatalf("expected timeout before response, got %v", res)
- case <-ctx.Done():
- err := ctx.Err()
- if err != context.DeadlineExceeded {
- t.Fatalf("expected error context.DeadlineExceeded, got: %v", err)
- }
- }
-}
-
-// -- Compression --
-
-// Notice that the trace log does always print "Accept-Encoding: gzip"
-// regardless of whether compression is enabled or not. This is because
-// of the underlying "httputil.DumpRequestOut".
-//
-// Use a real HTTP proxy/recorder to convince yourself that
-// "Accept-Encoding: gzip" is NOT sent when DisableCompression
-// is set to true.
-//
-// See also:
-// https://groups.google.com/forum/#!topic/golang-nuts/ms8QNCzew8Q
-
-func TestPerformRequestWithCompressionEnabled(t *testing.T) {
- testPerformRequestWithCompression(t, &http.Client{
- Transport: &http.Transport{
- DisableCompression: true,
- },
- })
-}
-
-func TestPerformRequestWithCompressionDisabled(t *testing.T) {
- testPerformRequestWithCompression(t, &http.Client{
- Transport: &http.Transport{
- DisableCompression: false,
- },
- })
-}
-
-func testPerformRequestWithCompression(t *testing.T, hc *http.Client) {
- client, err := NewClient(SetHttpClient(hc), SetSniff(false))
- if err != nil {
- t.Fatal(err)
- }
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/",
- })
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response to be != nil")
- }
-
- ret := new(PingResult)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- t.Fatalf("expected no error on decode; got: %v", err)
- }
- if ret.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", ret.ClusterName)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/cluster-test/Makefile b/vendor/github.com/olivere/elastic/cluster-test/Makefile
deleted file mode 100644
index cc6261db5..000000000
--- a/vendor/github.com/olivere/elastic/cluster-test/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-.PHONY: build run-omega-cluster-test
-
-default: build
-
-build:
- go build cluster-test.go
-
-run-omega-cluster-test:
- go run -race cluster-test.go \
- -nodes=http://192.168.2.65:8200,http://192.168.2.64:8200 \
- -n=5 \
- -retries=5 \
- -sniff=true -sniffer=10s \
- -healthcheck=true -healthchecker=5s \
- -errorlog=errors.log
-
diff --git a/vendor/github.com/olivere/elastic/cluster-test/README.md b/vendor/github.com/olivere/elastic/cluster-test/README.md
deleted file mode 100644
index f10748cc2..000000000
--- a/vendor/github.com/olivere/elastic/cluster-test/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Cluster Test
-
-This directory contains a program you can use to test a cluster.
-
-Here's how:
-
-First, install a cluster of Elasticsearch nodes. You can install them on
-different computers, or start several nodes on a single machine.
-
-Build cluster-test by `go build cluster-test.go` (or build with `make`).
-
-Run `./cluster-test -h` to get a list of flags:
-
-```sh
-$ ./cluster-test -h
-Usage of ./cluster-test:
- -errorlog="": error log file
- -healthcheck=true: enable or disable healthchecks
- -healthchecker=1m0s: healthcheck interval
- -index="twitter": name of ES index to use
- -infolog="": info log file
- -n=5: number of goroutines that run searches
- -nodes="": comma-separated list of ES URLs (e.g. 'http://192.168.2.10:9200,http://192.168.2.11:9200')
- -retries=0: number of retries
- -sniff=true: enable or disable sniffer
- -sniffer=15m0s: sniffer interval
- -tracelog="": trace log file
-```
-
-Example:
-
-```sh
-$ ./cluster-test -nodes=http://127.0.0.1:9200,http://127.0.0.1:9201,http://127.0.0.1:9202 -n=5 -index=twitter -retries=5 -sniff=true -sniffer=10s -healthcheck=true -healthchecker=5s -errorlog=error.log
-```
-
-The above example will create an index and start some search jobs on the
-cluster defined by http://127.0.0.1:9200, http://127.0.0.1:9201,
-and http://127.0.0.1:9202.
-
-* It will create an index called `twitter` on the cluster (`-index=twitter`)
-* It will run 5 search jobs in parallel (`-n=5`).
-* It will retry failed requests 5 times (`-retries=5`).
-* It will sniff the cluster periodically (`-sniff=true`).
-* It will sniff the cluster every 10 seconds (`-sniffer=10s`).
-* It will perform health checks periodically (`-healthcheck=true`).
-* It will perform health checks on the nodes every 5 seconds (`-healthchecker=5s`).
-* It will write an error log file (`-errorlog=error.log`).
-
-If you want to test Elastic with nodes going up and down, you can use a
-chaos monkey script like this and run it on the nodes of your cluster:
-
-```sh
-#!/bin/bash
-while true
-do
- echo "Starting ES node"
- elasticsearch -d -Xmx4g -Xms1g -Des.config=elasticsearch.yml -p es.pid
- sleep `jot -r 1 10 300` # wait for 10-300s
- echo "Stopping ES node"
- kill -TERM `cat es.pid`
- sleep `jot -r 1 10 60` # wait for 10-60s
-done
-```
diff --git a/vendor/github.com/olivere/elastic/cluster-test/cluster-test.go b/vendor/github.com/olivere/elastic/cluster-test/cluster-test.go
deleted file mode 100644
index 96b0c5d9b..000000000
--- a/vendor/github.com/olivere/elastic/cluster-test/cluster-test.go
+++ /dev/null
@@ -1,361 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package main
-
-import (
- "context"
- "encoding/json"
- "errors"
- "flag"
- "fmt"
- "log"
- "math/rand"
- "os"
- "runtime"
- "strings"
- "sync/atomic"
- "time"
-
- elastic "github.com/olivere/elastic"
-)
-
-type Tweet struct {
- User string `json:"user"`
- Message string `json:"message"`
- Retweets int `json:"retweets"`
- Image string `json:"image,omitempty"`
- Created time.Time `json:"created,omitempty"`
- Tags []string `json:"tags,omitempty"`
- Location string `json:"location,omitempty"`
- Suggest *elastic.SuggestField `json:"suggest_field,omitempty"`
-}
-
-var (
- nodes = flag.String("nodes", "", "comma-separated list of ES URLs (e.g. 'http://192.168.2.10:9200,http://192.168.2.11:9200')")
- n = flag.Int("n", 5, "number of goroutines that run searches")
- index = flag.String("index", "twitter", "name of ES index to use")
- errorlogfile = flag.String("errorlog", "", "error log file")
- infologfile = flag.String("infolog", "", "info log file")
- tracelogfile = flag.String("tracelog", "", "trace log file")
- retries = flag.Int("retries", 0, "number of retries")
- sniff = flag.Bool("sniff", elastic.DefaultSnifferEnabled, "enable or disable sniffer")
- sniffer = flag.Duration("sniffer", elastic.DefaultSnifferInterval, "sniffer interval")
- healthcheck = flag.Bool("healthcheck", elastic.DefaultHealthcheckEnabled, "enable or disable healthchecks")
- healthchecker = flag.Duration("healthchecker", elastic.DefaultHealthcheckInterval, "healthcheck interval")
-)
-
-func main() {
- flag.Parse()
-
- runtime.GOMAXPROCS(runtime.NumCPU())
-
- if *nodes == "" {
- log.Fatal("no nodes specified")
- }
- urls := strings.SplitN(*nodes, ",", -1)
-
- testcase, err := NewTestCase(*index, urls)
- if err != nil {
- log.Fatal(err)
- }
-
- testcase.SetErrorLogFile(*errorlogfile)
- testcase.SetInfoLogFile(*infologfile)
- testcase.SetTraceLogFile(*tracelogfile)
- testcase.SetMaxRetries(*retries)
- testcase.SetHealthcheck(*healthcheck)
- testcase.SetHealthcheckInterval(*healthchecker)
- testcase.SetSniff(*sniff)
- testcase.SetSnifferInterval(*sniffer)
-
- if err := testcase.Run(*n); err != nil {
- log.Fatal(err)
- }
-
- select {}
-}
-
-type RunInfo struct {
- Success bool
-}
-
-type TestCase struct {
- nodes []string
- client *elastic.Client
- runs int64
- failures int64
- runCh chan RunInfo
- index string
- errorlogfile string
- infologfile string
- tracelogfile string
- maxRetries int
- healthcheck bool
- healthcheckInterval time.Duration
- sniff bool
- snifferInterval time.Duration
-}
-
-func NewTestCase(index string, nodes []string) (*TestCase, error) {
- if index == "" {
- return nil, errors.New("no index name specified")
- }
-
- return &TestCase{
- index: index,
- nodes: nodes,
- runCh: make(chan RunInfo),
- }, nil
-}
-
-func (t *TestCase) SetIndex(name string) {
- t.index = name
-}
-
-func (t *TestCase) SetErrorLogFile(name string) {
- t.errorlogfile = name
-}
-
-func (t *TestCase) SetInfoLogFile(name string) {
- t.infologfile = name
-}
-
-func (t *TestCase) SetTraceLogFile(name string) {
- t.tracelogfile = name
-}
-
-func (t *TestCase) SetMaxRetries(n int) {
- t.maxRetries = n
-}
-
-func (t *TestCase) SetSniff(enabled bool) {
- t.sniff = enabled
-}
-
-func (t *TestCase) SetSnifferInterval(d time.Duration) {
- t.snifferInterval = d
-}
-
-func (t *TestCase) SetHealthcheck(enabled bool) {
- t.healthcheck = enabled
-}
-
-func (t *TestCase) SetHealthcheckInterval(d time.Duration) {
- t.healthcheckInterval = d
-}
-
-func (t *TestCase) Run(n int) error {
- if err := t.setup(); err != nil {
- return err
- }
-
- for i := 1; i < n; i++ {
- go t.search()
- }
-
- go t.monitor()
-
- return nil
-}
-
-func (t *TestCase) monitor() {
- print := func() {
- fmt.Printf("\033[32m%5d\033[0m; \033[31m%5d\033[0m: %s%s\r", t.runs, t.failures, t.client.String(), " ")
- }
-
- for {
- select {
- case run := <-t.runCh:
- atomic.AddInt64(&t.runs, 1)
- if !run.Success {
- atomic.AddInt64(&t.failures, 1)
- fmt.Println()
- }
- print()
- case <-time.After(5 * time.Second):
- // Print stats after some inactivity
- print()
- break
- }
- }
-}
-
-func (t *TestCase) setup() error {
- var errorlogger *log.Logger
- if t.errorlogfile != "" {
- f, err := os.OpenFile(t.errorlogfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0664)
- if err != nil {
- return err
- }
- errorlogger = log.New(f, "", log.Ltime|log.Lmicroseconds|log.Lshortfile)
- }
-
- var infologger *log.Logger
- if t.infologfile != "" {
- f, err := os.OpenFile(t.infologfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0664)
- if err != nil {
- return err
- }
- infologger = log.New(f, "", log.LstdFlags)
- }
-
- // Trace request and response details like this
- var tracelogger *log.Logger
- if t.tracelogfile != "" {
- f, err := os.OpenFile(t.tracelogfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0664)
- if err != nil {
- return err
- }
- tracelogger = log.New(f, "", log.LstdFlags)
- }
-
- client, err := elastic.NewClient(
- elastic.SetURL(t.nodes...),
- elastic.SetErrorLog(errorlogger),
- elastic.SetInfoLog(infologger),
- elastic.SetTraceLog(tracelogger),
- elastic.SetMaxRetries(t.maxRetries),
- elastic.SetSniff(t.sniff),
- elastic.SetSnifferInterval(t.snifferInterval),
- elastic.SetHealthcheck(t.healthcheck),
- elastic.SetHealthcheckInterval(t.healthcheckInterval))
- if err != nil {
- // Handle error
- return err
- }
- t.client = client
-
- ctx := context.Background()
-
- // Use the IndexExists service to check if a specified index exists.
- exists, err := t.client.IndexExists(t.index).Do(ctx)
- if err != nil {
- return err
- }
- if exists {
- deleteIndex, err := t.client.DeleteIndex(t.index).Do(ctx)
- if err != nil {
- return err
- }
- if !deleteIndex.Acknowledged {
- return errors.New("delete index not acknowledged")
- }
- }
-
- // Create a new index.
- createIndex, err := t.client.CreateIndex(t.index).Do(ctx)
- if err != nil {
- return err
- }
- if !createIndex.Acknowledged {
- return errors.New("create index not acknowledged")
- }
-
- // Index a tweet (using JSON serialization)
- tweet1 := Tweet{User: "olivere", Message: "Take Five", Retweets: 0}
- _, err = t.client.Index().
- Index(t.index).
- Type("tweet").
- Id("1").
- BodyJson(tweet1).
- Do(ctx)
- if err != nil {
- return err
- }
-
- // Index a second tweet (by string)
- tweet2 := `{"user" : "olivere", "message" : "It's a Raggy Waltz"}`
- _, err = t.client.Index().
- Index(t.index).
- Type("tweet").
- Id("2").
- BodyString(tweet2).
- Do(ctx)
- if err != nil {
- return err
- }
-
- // Flush to make sure the documents got written.
- _, err = t.client.Flush().Index(t.index).Do(ctx)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (t *TestCase) search() {
- ctx := context.Background()
-
- // Loop forever to check for connection issues
- for {
- // Get tweet with specified ID
- get1, err := t.client.Get().
- Index(t.index).
- Type("tweet").
- Id("1").
- Do(ctx)
- if err != nil {
- //failf("Get failed: %v", err)
- t.runCh <- RunInfo{Success: false}
- continue
- }
- if !get1.Found {
- //log.Printf("Document %s not found\n", "1")
- //fmt.Printf("Got document %s in version %d from index %s, type %s\n", get1.Id, get1.Version, get1.Index, get1.Type)
- t.runCh <- RunInfo{Success: false}
- continue
- }
-
- // Search with a term query
- searchResult, err := t.client.Search().
- Index(t.index). // search in index t.index
- Query(elastic.NewTermQuery("user", "olivere")). // specify the query
- Sort("user", true). // sort by "user" field, ascending
- From(0).Size(10). // take documents 0-9
- Pretty(true). // pretty print request and response JSON
- Do(ctx) // execute
- if err != nil {
- //failf("Search failed: %v\n", err)
- t.runCh <- RunInfo{Success: false}
- continue
- }
-
- // searchResult is of type SearchResult and returns hits, suggestions,
- // and all kinds of other information from Elasticsearch.
- //fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis)
-
- // Number of hits
- if searchResult.Hits.TotalHits > 0 {
- //fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits)
-
- // Iterate through results
- for _, hit := range searchResult.Hits.Hits {
- // hit.Index contains the name of the index
-
- // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}).
- var tweet Tweet
- err := json.Unmarshal(*hit.Source, &tweet)
- if err != nil {
- // Deserialization failed
- //failf("Deserialize failed: %v\n", err)
- t.runCh <- RunInfo{Success: false}
- continue
- }
-
- // Work with tweet
- //fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- } else {
- // No hits
- //fmt.Print("Found no tweets\n")
- }
-
- t.runCh <- RunInfo{Success: true}
-
- // Sleep some time
- time.Sleep(time.Duration(rand.Intn(500)) * time.Millisecond)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_health.go b/vendor/github.com/olivere/elastic/cluster_health.go
deleted file mode 100644
index f960cfe8e..000000000
--- a/vendor/github.com/olivere/elastic/cluster_health.go
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// ClusterHealthService allows to get a very simple status on the health of the cluster.
-//
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-health.html
-// for details.
-type ClusterHealthService struct {
- client *Client
- pretty bool
- indices []string
- level string
- local *bool
- masterTimeout string
- timeout string
- waitForActiveShards *int
- waitForNodes string
- waitForNoRelocatingShards *bool
- waitForStatus string
-}
-
-// NewClusterHealthService creates a new ClusterHealthService.
-func NewClusterHealthService(client *Client) *ClusterHealthService {
- return &ClusterHealthService{
- client: client,
- indices: make([]string, 0),
- }
-}
-
-// Index limits the information returned to specific indices.
-func (s *ClusterHealthService) Index(indices ...string) *ClusterHealthService {
- s.indices = append(s.indices, indices...)
- return s
-}
-
-// Level specifies the level of detail for returned information.
-func (s *ClusterHealthService) Level(level string) *ClusterHealthService {
- s.level = level
- return s
-}
-
-// Local indicates whether to return local information. If it is true,
-// we do not retrieve the state from master node (default: false).
-func (s *ClusterHealthService) Local(local bool) *ClusterHealthService {
- s.local = &local
- return s
-}
-
-// MasterTimeout specifies an explicit operation timeout for connection to master node.
-func (s *ClusterHealthService) MasterTimeout(masterTimeout string) *ClusterHealthService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout specifies an explicit operation timeout.
-func (s *ClusterHealthService) Timeout(timeout string) *ClusterHealthService {
- s.timeout = timeout
- return s
-}
-
-// WaitForActiveShards can be used to wait until the specified number of shards are active.
-func (s *ClusterHealthService) WaitForActiveShards(waitForActiveShards int) *ClusterHealthService {
- s.waitForActiveShards = &waitForActiveShards
- return s
-}
-
-// WaitForNodes can be used to wait until the specified number of nodes are available.
-// Example: "12" to wait for exact values, ">12" and "<12" for ranges.
-func (s *ClusterHealthService) WaitForNodes(waitForNodes string) *ClusterHealthService {
- s.waitForNodes = waitForNodes
- return s
-}
-
-// WaitForNoRelocatingShards can be used to wait until all shard relocations are finished.
-func (s *ClusterHealthService) WaitForNoRelocatingShards(waitForNoRelocatingShards bool) *ClusterHealthService {
- s.waitForNoRelocatingShards = &waitForNoRelocatingShards
- return s
-}
-
-// WaitForStatus can be used to wait until the cluster is in a specific state.
-// Valid values are: green, yellow, or red.
-func (s *ClusterHealthService) WaitForStatus(waitForStatus string) *ClusterHealthService {
- s.waitForStatus = waitForStatus
- return s
-}
-
-// WaitForGreenStatus will wait for the "green" state.
-func (s *ClusterHealthService) WaitForGreenStatus() *ClusterHealthService {
- return s.WaitForStatus("green")
-}
-
-// WaitForYellowStatus will wait for the "yellow" state.
-func (s *ClusterHealthService) WaitForYellowStatus() *ClusterHealthService {
- return s.WaitForStatus("yellow")
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ClusterHealthService) Pretty(pretty bool) *ClusterHealthService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ClusterHealthService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.indices) > 0 {
- path, err = uritemplates.Expand("/_cluster/health/{index}", map[string]string{
- "index": strings.Join(s.indices, ","),
- })
- } else {
- path = "/_cluster/health"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.level != "" {
- params.Set("level", s.level)
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.waitForActiveShards != nil {
- params.Set("wait_for_active_shards", fmt.Sprintf("%v", s.waitForActiveShards))
- }
- if s.waitForNodes != "" {
- params.Set("wait_for_nodes", s.waitForNodes)
- }
- if s.waitForNoRelocatingShards != nil {
- params.Set("wait_for_no_relocating_shards", fmt.Sprintf("%v", *s.waitForNoRelocatingShards))
- }
- if s.waitForStatus != "" {
- params.Set("wait_for_status", s.waitForStatus)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ClusterHealthService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *ClusterHealthService) Do(ctx context.Context) (*ClusterHealthResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(ClusterHealthResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// ClusterHealthResponse is the response of ClusterHealthService.Do.
-type ClusterHealthResponse struct {
- ClusterName string `json:"cluster_name"`
- Status string `json:"status"`
- TimedOut bool `json:"timed_out"`
- NumberOfNodes int `json:"number_of_nodes"`
- NumberOfDataNodes int `json:"number_of_data_nodes"`
- ActivePrimaryShards int `json:"active_primary_shards"`
- ActiveShards int `json:"active_shards"`
- RelocatingShards int `json:"relocating_shards"`
- InitializingShards int `json:"initializing_shards"`
- UnassignedShards int `json:"unassigned_shards"`
- DelayedUnassignedShards int `json:"delayed_unassigned_shards"`
- NumberOfPendingTasks int `json:"number_of_pending_tasks"`
- NumberOfInFlightFetch int `json:"number_of_in_flight_fetch"`
- TaskMaxWaitTimeInQueueInMillis int `json:"task_max_waiting_in_queue_millis"`
- ActiveShardsPercentAsNumber float64 `json:"active_shards_percent_as_number"`
-
- // Validation failures -> index name -> array of validation failures
- ValidationFailures []map[string][]string `json:"validation_failures"`
-
- // Index name -> index health
- Indices map[string]*ClusterIndexHealth `json:"indices"`
-}
-
-// ClusterIndexHealth will be returned as part of ClusterHealthResponse.
-type ClusterIndexHealth struct {
- Status string `json:"status"`
- NumberOfShards int `json:"number_of_shards"`
- NumberOfReplicas int `json:"number_of_replicas"`
- ActivePrimaryShards int `json:"active_primary_shards"`
- ActiveShards int `json:"active_shards"`
- RelocatingShards int `json:"relocating_shards"`
- InitializingShards int `json:"initializing_shards"`
- UnassignedShards int `json:"unassigned_shards"`
- // Validation failures
- ValidationFailures []string `json:"validation_failures"`
- // Shards by id, e.g. "0" or "1"
- Shards map[string]*ClusterShardHealth `json:"shards"`
-}
-
-// ClusterShardHealth will be returned as part of ClusterHealthResponse.
-type ClusterShardHealth struct {
- Status string `json:"status"`
- PrimaryActive bool `json:"primary_active"`
- ActiveShards int `json:"active_shards"`
- RelocatingShards int `json:"relocating_shards"`
- InitializingShards int `json:"initializing_shards"`
- UnassignedShards int `json:"unassigned_shards"`
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_health_test.go b/vendor/github.com/olivere/elastic/cluster_health_test.go
deleted file mode 100644
index c2caee985..000000000
--- a/vendor/github.com/olivere/elastic/cluster_health_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net/url"
- "testing"
-)
-
-func TestClusterHealth(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Get cluster health
- res, err := client.ClusterHealth().Index(testIndexName).Level("shards").Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected res to be != nil; got: %v", res)
- }
- if res.Status != "green" && res.Status != "red" && res.Status != "yellow" {
- t.Fatalf("expected status \"green\", \"red\", or \"yellow\"; got: %q", res.Status)
- }
-}
-
-func TestClusterHealthURLs(t *testing.T) {
- tests := []struct {
- Service *ClusterHealthService
- ExpectedPath string
- ExpectedParams url.Values
- }{
- {
- Service: &ClusterHealthService{
- indices: []string{},
- },
- ExpectedPath: "/_cluster/health",
- },
- {
- Service: &ClusterHealthService{
- indices: []string{"twitter"},
- },
- ExpectedPath: "/_cluster/health/twitter",
- },
- {
- Service: &ClusterHealthService{
- indices: []string{"twitter", "gplus"},
- },
- ExpectedPath: "/_cluster/health/twitter%2Cgplus",
- },
- {
- Service: &ClusterHealthService{
- indices: []string{"twitter"},
- waitForStatus: "yellow",
- },
- ExpectedPath: "/_cluster/health/twitter",
- ExpectedParams: url.Values{"wait_for_status": []string{"yellow"}},
- },
- }
-
- for _, test := range tests {
- gotPath, gotParams, err := test.Service.buildURL()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if gotPath != test.ExpectedPath {
- t.Errorf("expected URL path = %q; got: %q", test.ExpectedPath, gotPath)
- }
- if gotParams.Encode() != test.ExpectedParams.Encode() {
- t.Errorf("expected URL params = %v; got: %v", test.ExpectedParams, gotParams)
- }
- }
-}
-
-func TestClusterHealthWaitForStatus(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- // Ensure preconditions are met: A green cluster.
- health, err := client.ClusterHealth().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if got, want := health.Status, "green"; got != want {
- t.Skipf("precondition failed: expected cluster to be %q, not %q", want, got)
- }
-
- // Cluster health on an index that does not exist should never get to yellow
- health, err = client.ClusterHealth().Index("no-such-index").WaitForStatus("yellow").Timeout("1s").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected timeout error; got: %v", err)
- }
- if !IsTimeout(err) {
- t.Fatalf("expected timeout error; got: %v", err)
- }
- if health != nil {
- t.Fatalf("expected no response; got: %v", health)
- }
-
- // Cluster wide health
- health, err = client.ClusterHealth().WaitForGreenStatus().Timeout("10s").Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if health.TimedOut != false {
- t.Fatalf("expected no timeout; got: %v "+
- "(does your local cluster contain unassigned shards?)", health.TimedOut)
- }
- if health.Status != "green" {
- t.Fatalf("expected health = %q; got: %q", "green", health.Status)
- }
-
- // Cluster wide health via shortcut on client
- err = client.WaitForGreenStatus("10s")
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_state.go b/vendor/github.com/olivere/elastic/cluster_state.go
deleted file mode 100644
index 54e9aa428..000000000
--- a/vendor/github.com/olivere/elastic/cluster_state.go
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// ClusterStateService allows to get a comprehensive state information of the whole cluster.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-state.html
-// for details.
-type ClusterStateService struct {
- client *Client
- pretty bool
- indices []string
- metrics []string
- allowNoIndices *bool
- expandWildcards string
- flatSettings *bool
- ignoreUnavailable *bool
- local *bool
- masterTimeout string
-}
-
-// NewClusterStateService creates a new ClusterStateService.
-func NewClusterStateService(client *Client) *ClusterStateService {
- return &ClusterStateService{
- client: client,
- indices: make([]string, 0),
- metrics: make([]string, 0),
- }
-}
-
-// Index is a list of index names. Use _all or an empty string to
-// perform the operation on all indices.
-func (s *ClusterStateService) Index(indices ...string) *ClusterStateService {
- s.indices = append(s.indices, indices...)
- return s
-}
-
-// Metric limits the information returned to the specified metric.
-// It can be one of: version, master_node, nodes, routing_table, metadata,
-// blocks, or customs.
-func (s *ClusterStateService) Metric(metrics ...string) *ClusterStateService {
- s.metrics = append(s.metrics, metrics...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *ClusterStateService) AllowNoIndices(allowNoIndices bool) *ClusterStateService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *ClusterStateService) ExpandWildcards(expandWildcards string) *ClusterStateService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// FlatSettings, when set, returns settings in flat format (default: false).
-func (s *ClusterStateService) FlatSettings(flatSettings bool) *ClusterStateService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *ClusterStateService) IgnoreUnavailable(ignoreUnavailable bool) *ClusterStateService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Local indicates whether to return local information. When set, it does not
-// retrieve the state from master node (default: false).
-func (s *ClusterStateService) Local(local bool) *ClusterStateService {
- s.local = &local
- return s
-}
-
-// MasterTimeout specifies timeout for connection to master.
-func (s *ClusterStateService) MasterTimeout(masterTimeout string) *ClusterStateService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ClusterStateService) Pretty(pretty bool) *ClusterStateService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ClusterStateService) buildURL() (string, url.Values, error) {
- // Build URL
- metrics := strings.Join(s.metrics, ",")
- if metrics == "" {
- metrics = "_all"
- }
- indices := strings.Join(s.indices, ",")
- if indices == "" {
- indices = "_all"
- }
- path, err := uritemplates.Expand("/_cluster/state/{metrics}/{indices}", map[string]string{
- "metrics": metrics,
- "indices": indices,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ClusterStateService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *ClusterStateService) Do(ctx context.Context) (*ClusterStateResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(ClusterStateResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// ClusterStateResponse is the response of ClusterStateService.Do.
-type ClusterStateResponse struct {
- ClusterName string `json:"cluster_name"`
- Version int64 `json:"version"`
- StateUUID string `json:"state_uuid"`
- MasterNode string `json:"master_node"`
- Blocks map[string]*clusterBlocks `json:"blocks"`
- Nodes map[string]*discoveryNode `json:"nodes"`
- Metadata *clusterStateMetadata `json:"metadata"`
- RoutingTable map[string]*clusterStateRoutingTable `json:"routing_table"`
- RoutingNodes *clusterStateRoutingNode `json:"routing_nodes"`
- Customs map[string]interface{} `json:"customs"`
-}
-
-type clusterBlocks struct {
- Global map[string]*clusterBlock `json:"global"` // id -> cluster block
- Indices map[string]*clusterBlock `json:"indices"` // index name -> cluster block
-}
-
-type clusterBlock struct {
- Description string `json:"description"`
- Retryable bool `json:"retryable"`
- DisableStatePersistence bool `json:"disable_state_persistence"`
- Levels []string `json:"levels"`
-}
-
-type clusterStateMetadata struct {
- ClusterUUID string `json:"cluster_uuid"`
- Templates map[string]*indexTemplateMetaData `json:"templates"` // template name -> index template metadata
- Indices map[string]*indexMetaData `json:"indices"` // index name _> meta data
- RoutingTable struct {
- Indices map[string]*indexRoutingTable `json:"indices"` // index name -> routing table
- } `json:"routing_table"`
- RoutingNodes struct {
- Unassigned []*shardRouting `json:"unassigned"`
- Nodes []*shardRouting `json:"nodes"`
- } `json:"routing_nodes"`
- Customs map[string]interface{} `json:"customs"`
-}
-
-type discoveryNode struct {
- Name string `json:"name"` // server name, e.g. "es1"
- TransportAddress string `json:"transport_address"` // e.g. inet[/1.2.3.4:9300]
- Attributes map[string]interface{} `json:"attributes"` // e.g. { "data": true, "master": true }
-}
-
-type clusterStateRoutingTable struct {
- Indices map[string]interface{} `json:"indices"`
-}
-
-type clusterStateRoutingNode struct {
- Unassigned []*shardRouting `json:"unassigned"`
- // Node Id -> shardRouting
- Nodes map[string][]*shardRouting `json:"nodes"`
-}
-
-type indexTemplateMetaData struct {
- IndexPatterns []string `json:"index_patterns"` // e.g. ["store-*"]
- Order int `json:"order"`
- Settings map[string]interface{} `json:"settings"` // index settings
- Mappings map[string]interface{} `json:"mappings"` // type name -> mapping
-}
-
-type indexMetaData struct {
- State string `json:"state"`
- Settings map[string]interface{} `json:"settings"`
- Mappings map[string]interface{} `json:"mappings"`
- Aliases []string `json:"aliases"` // e.g. [ "alias1", "alias2" ]
-}
-
-type indexRoutingTable struct {
- Shards map[string]*shardRouting `json:"shards"`
-}
-
-type shardRouting struct {
- State string `json:"state"`
- Primary bool `json:"primary"`
- Node string `json:"node"`
- RelocatingNode string `json:"relocating_node"`
- Shard int `json:"shard"`
- Index string `json:"index"`
- Version int64 `json:"version"`
- RestoreSource *RestoreSource `json:"restore_source"`
- AllocationId *allocationId `json:"allocation_id"`
- UnassignedInfo *unassignedInfo `json:"unassigned_info"`
-}
-
-type RestoreSource struct {
- Repository string `json:"repository"`
- Snapshot string `json:"snapshot"`
- Version string `json:"version"`
- Index string `json:"index"`
-}
-
-type allocationId struct {
- Id string `json:"id"`
- RelocationId string `json:"relocation_id"`
-}
-
-type unassignedInfo struct {
- Reason string `json:"reason"`
- At string `json:"at"`
- Details string `json:"details"`
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_state_test.go b/vendor/github.com/olivere/elastic/cluster_state_test.go
deleted file mode 100644
index 6eedb0c1b..000000000
--- a/vendor/github.com/olivere/elastic/cluster_state_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net/url"
- "testing"
-)
-
-func TestClusterState(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Get cluster state
- res, err := client.ClusterState().Index("_all").Metric("_all").Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected res to be != nil; got: %v", res)
- }
- if res.ClusterName == "" {
- t.Fatalf("expected a cluster name; got: %q", res.ClusterName)
- }
-}
-
-func TestClusterStateURLs(t *testing.T) {
- tests := []struct {
- Service *ClusterStateService
- ExpectedPath string
- ExpectedParams url.Values
- }{
- {
- Service: &ClusterStateService{
- indices: []string{},
- metrics: []string{},
- },
- ExpectedPath: "/_cluster/state/_all/_all",
- },
- {
- Service: &ClusterStateService{
- indices: []string{"twitter"},
- metrics: []string{},
- },
- ExpectedPath: "/_cluster/state/_all/twitter",
- },
- {
- Service: &ClusterStateService{
- indices: []string{"twitter", "gplus"},
- metrics: []string{},
- },
- ExpectedPath: "/_cluster/state/_all/twitter%2Cgplus",
- },
- {
- Service: &ClusterStateService{
- indices: []string{},
- metrics: []string{"nodes"},
- },
- ExpectedPath: "/_cluster/state/nodes/_all",
- },
- {
- Service: &ClusterStateService{
- indices: []string{"twitter"},
- metrics: []string{"nodes"},
- },
- ExpectedPath: "/_cluster/state/nodes/twitter",
- },
- {
- Service: &ClusterStateService{
- indices: []string{"twitter"},
- metrics: []string{"nodes"},
- masterTimeout: "1s",
- },
- ExpectedPath: "/_cluster/state/nodes/twitter",
- ExpectedParams: url.Values{"master_timeout": []string{"1s"}},
- },
- }
-
- for _, test := range tests {
- gotPath, gotParams, err := test.Service.buildURL()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if gotPath != test.ExpectedPath {
- t.Errorf("expected URL path = %q; got: %q", test.ExpectedPath, gotPath)
- }
- if gotParams.Encode() != test.ExpectedParams.Encode() {
- t.Errorf("expected URL params = %v; got: %v", test.ExpectedParams, gotParams)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_stats.go b/vendor/github.com/olivere/elastic/cluster_stats.go
deleted file mode 100644
index 4d05c2e97..000000000
--- a/vendor/github.com/olivere/elastic/cluster_stats.go
+++ /dev/null
@@ -1,352 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// ClusterStatsService is documented at
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-stats.html.
-type ClusterStatsService struct {
- client *Client
- pretty bool
- nodeId []string
- flatSettings *bool
- human *bool
-}
-
-// NewClusterStatsService creates a new ClusterStatsService.
-func NewClusterStatsService(client *Client) *ClusterStatsService {
- return &ClusterStatsService{
- client: client,
- nodeId: make([]string, 0),
- }
-}
-
-// NodeId is documented as: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
-func (s *ClusterStatsService) NodeId(nodeId []string) *ClusterStatsService {
- s.nodeId = nodeId
- return s
-}
-
-// FlatSettings is documented as: Return settings in flat format (default: false).
-func (s *ClusterStatsService) FlatSettings(flatSettings bool) *ClusterStatsService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// Human is documented as: Whether to return time and byte values in human-readable format..
-func (s *ClusterStatsService) Human(human bool) *ClusterStatsService {
- s.human = &human
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ClusterStatsService) Pretty(pretty bool) *ClusterStatsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ClusterStatsService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
-
- if len(s.nodeId) > 0 {
- path, err = uritemplates.Expand("/_cluster/stats/nodes/{node_id}", map[string]string{
- "node_id": strings.Join(s.nodeId, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
- } else {
- path, err = uritemplates.Expand("/_cluster/stats", map[string]string{})
- if err != nil {
- return "", url.Values{}, err
- }
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ClusterStatsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *ClusterStatsService) Do(ctx context.Context) (*ClusterStatsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(ClusterStatsResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// ClusterStatsResponse is the response of ClusterStatsService.Do.
-type ClusterStatsResponse struct {
- Timestamp int64 `json:"timestamp"`
- ClusterName string `json:"cluster_name"`
- ClusterUUID string `json:"uuid"`
- Status string `json:"status"`
- Indices *ClusterStatsIndices `json:"indices"`
- Nodes *ClusterStatsNodes `json:"nodes"`
-}
-
-type ClusterStatsIndices struct {
- Count int `json:"count"`
- Shards *ClusterStatsIndicesShards `json:"shards"`
- Docs *ClusterStatsIndicesDocs `json:"docs"`
- Store *ClusterStatsIndicesStore `json:"store"`
- FieldData *ClusterStatsIndicesFieldData `json:"fielddata"`
- FilterCache *ClusterStatsIndicesFilterCache `json:"filter_cache"`
- IdCache *ClusterStatsIndicesIdCache `json:"id_cache"`
- Completion *ClusterStatsIndicesCompletion `json:"completion"`
- Segments *ClusterStatsIndicesSegments `json:"segments"`
- Percolate *ClusterStatsIndicesPercolate `json:"percolate"`
-}
-
-type ClusterStatsIndicesShards struct {
- Total int `json:"total"`
- Primaries int `json:"primaries"`
- Replication float64 `json:"replication"`
- Index *ClusterStatsIndicesShardsIndex `json:"index"`
-}
-
-type ClusterStatsIndicesShardsIndex struct {
- Shards *ClusterStatsIndicesShardsIndexIntMinMax `json:"shards"`
- Primaries *ClusterStatsIndicesShardsIndexIntMinMax `json:"primaries"`
- Replication *ClusterStatsIndicesShardsIndexFloat64MinMax `json:"replication"`
-}
-
-type ClusterStatsIndicesShardsIndexIntMinMax struct {
- Min int `json:"min"`
- Max int `json:"max"`
- Avg float64 `json:"avg"`
-}
-
-type ClusterStatsIndicesShardsIndexFloat64MinMax struct {
- Min float64 `json:"min"`
- Max float64 `json:"max"`
- Avg float64 `json:"avg"`
-}
-
-type ClusterStatsIndicesDocs struct {
- Count int `json:"count"`
- Deleted int `json:"deleted"`
-}
-
-type ClusterStatsIndicesStore struct {
- Size string `json:"size"` // e.g. "5.3gb"
- SizeInBytes int64 `json:"size_in_bytes"`
-}
-
-type ClusterStatsIndicesFieldData struct {
- MemorySize string `json:"memory_size"` // e.g. "61.3kb"
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- Evictions int64 `json:"evictions"`
- Fields map[string]struct {
- MemorySize string `json:"memory_size"` // e.g. "61.3kb"
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- } `json:"fields"`
-}
-
-type ClusterStatsIndicesFilterCache struct {
- MemorySize string `json:"memory_size"` // e.g. "61.3kb"
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- Evictions int64 `json:"evictions"`
-}
-
-type ClusterStatsIndicesIdCache struct {
- MemorySize string `json:"memory_size"` // e.g. "61.3kb"
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
-}
-
-type ClusterStatsIndicesCompletion struct {
- Size string `json:"size"` // e.g. "61.3kb"
- SizeInBytes int64 `json:"size_in_bytes"`
- Fields map[string]struct {
- Size string `json:"size"` // e.g. "61.3kb"
- SizeInBytes int64 `json:"size_in_bytes"`
- } `json:"fields"`
-}
-
-type ClusterStatsIndicesSegments struct {
- Count int64 `json:"count"`
- Memory string `json:"memory"` // e.g. "61.3kb"
- MemoryInBytes int64 `json:"memory_in_bytes"`
- IndexWriterMemory string `json:"index_writer_memory"` // e.g. "61.3kb"
- IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"`
- IndexWriterMaxMemory string `json:"index_writer_max_memory"` // e.g. "61.3kb"
- IndexWriterMaxMemoryInBytes int64 `json:"index_writer_max_memory_in_bytes"`
- VersionMapMemory string `json:"version_map_memory"` // e.g. "61.3kb"
- VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"`
- FixedBitSet string `json:"fixed_bit_set"` // e.g. "61.3kb"
- FixedBitSetInBytes int64 `json:"fixed_bit_set_memory_in_bytes"`
-}
-
-type ClusterStatsIndicesPercolate struct {
- Total int64 `json:"total"`
- // TODO(oe) The JSON tag here is wrong as of ES 1.5.2 it seems
- Time string `json:"get_time"` // e.g. "1s"
- TimeInBytes int64 `json:"time_in_millis"`
- Current int64 `json:"current"`
- MemorySize string `json:"memory_size"` // e.g. "61.3kb"
- MemorySizeInBytes int64 `json:"memory_sitze_in_bytes"`
- Queries int64 `json:"queries"`
-}
-
-// ---
-
-type ClusterStatsNodes struct {
- Count *ClusterStatsNodesCount `json:"count"`
- Versions []string `json:"versions"`
- OS *ClusterStatsNodesOsStats `json:"os"`
- Process *ClusterStatsNodesProcessStats `json:"process"`
- JVM *ClusterStatsNodesJvmStats `json:"jvm"`
- FS *ClusterStatsNodesFsStats `json:"fs"`
- Plugins []*ClusterStatsNodesPlugin `json:"plugins"`
-}
-
-type ClusterStatsNodesCount struct {
- Total int `json:"total"`
- Data int `json:"data"`
- CoordinatingOnly int `json:"coordinating_only"`
- Master int `json:"master"`
- Ingest int `json:"ingest"`
-}
-
-type ClusterStatsNodesOsStats struct {
- AvailableProcessors int `json:"available_processors"`
- Mem *ClusterStatsNodesOsStatsMem `json:"mem"`
- CPU []*ClusterStatsNodesOsStatsCPU `json:"cpu"`
-}
-
-type ClusterStatsNodesOsStatsMem struct {
- Total string `json:"total"` // e.g. "16gb"
- TotalInBytes int64 `json:"total_in_bytes"`
-}
-
-type ClusterStatsNodesOsStatsCPU struct {
- Vendor string `json:"vendor"`
- Model string `json:"model"`
- MHz int `json:"mhz"`
- TotalCores int `json:"total_cores"`
- TotalSockets int `json:"total_sockets"`
- CoresPerSocket int `json:"cores_per_socket"`
- CacheSize string `json:"cache_size"` // e.g. "256b"
- CacheSizeInBytes int64 `json:"cache_size_in_bytes"`
- Count int `json:"count"`
-}
-
-type ClusterStatsNodesProcessStats struct {
- CPU *ClusterStatsNodesProcessStatsCPU `json:"cpu"`
- OpenFileDescriptors *ClusterStatsNodesProcessStatsOpenFileDescriptors `json:"open_file_descriptors"`
-}
-
-type ClusterStatsNodesProcessStatsCPU struct {
- Percent float64 `json:"percent"`
-}
-
-type ClusterStatsNodesProcessStatsOpenFileDescriptors struct {
- Min int64 `json:"min"`
- Max int64 `json:"max"`
- Avg int64 `json:"avg"`
-}
-
-type ClusterStatsNodesJvmStats struct {
- MaxUptime string `json:"max_uptime"` // e.g. "5h"
- MaxUptimeInMillis int64 `json:"max_uptime_in_millis"`
- Versions []*ClusterStatsNodesJvmStatsVersion `json:"versions"`
- Mem *ClusterStatsNodesJvmStatsMem `json:"mem"`
- Threads int64 `json:"threads"`
-}
-
-type ClusterStatsNodesJvmStatsVersion struct {
- Version string `json:"version"` // e.g. "1.8.0_45"
- VMName string `json:"vm_name"` // e.g. "Java HotSpot(TM) 64-Bit Server VM"
- VMVersion string `json:"vm_version"` // e.g. "25.45-b02"
- VMVendor string `json:"vm_vendor"` // e.g. "Oracle Corporation"
- Count int `json:"count"`
-}
-
-type ClusterStatsNodesJvmStatsMem struct {
- HeapUsed string `json:"heap_used"`
- HeapUsedInBytes int64 `json:"heap_used_in_bytes"`
- HeapMax string `json:"heap_max"`
- HeapMaxInBytes int64 `json:"heap_max_in_bytes"`
-}
-
-type ClusterStatsNodesFsStats struct {
- Path string `json:"path"`
- Mount string `json:"mount"`
- Dev string `json:"dev"`
- Total string `json:"total"` // e.g. "930.7gb"`
- TotalInBytes int64 `json:"total_in_bytes"`
- Free string `json:"free"` // e.g. "930.7gb"`
- FreeInBytes int64 `json:"free_in_bytes"`
- Available string `json:"available"` // e.g. "930.7gb"`
- AvailableInBytes int64 `json:"available_in_bytes"`
- DiskReads int64 `json:"disk_reads"`
- DiskWrites int64 `json:"disk_writes"`
- DiskIOOp int64 `json:"disk_io_op"`
- DiskReadSize string `json:"disk_read_size"` // e.g. "0b"`
- DiskReadSizeInBytes int64 `json:"disk_read_size_in_bytes"`
- DiskWriteSize string `json:"disk_write_size"` // e.g. "0b"`
- DiskWriteSizeInBytes int64 `json:"disk_write_size_in_bytes"`
- DiskIOSize string `json:"disk_io_size"` // e.g. "0b"`
- DiskIOSizeInBytes int64 `json:"disk_io_size_in_bytes"`
- DiskQueue string `json:"disk_queue"`
- DiskServiceTime string `json:"disk_service_time"`
-}
-
-type ClusterStatsNodesPlugin struct {
- Name string `json:"name"`
- Version string `json:"version"`
- Description string `json:"description"`
- URL string `json:"url"`
- JVM bool `json:"jvm"`
- Site bool `json:"site"`
-}
diff --git a/vendor/github.com/olivere/elastic/cluster_stats_test.go b/vendor/github.com/olivere/elastic/cluster_stats_test.go
deleted file mode 100644
index fe6da4704..000000000
--- a/vendor/github.com/olivere/elastic/cluster_stats_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net/url"
- "testing"
-)
-
-func TestClusterStats(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Get cluster stats
- res, err := client.ClusterStats().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected res to be != nil; got: %v", res)
- }
- if res.ClusterName == "" {
- t.Fatalf("expected a cluster name; got: %q", res.ClusterName)
- }
- if res.Nodes == nil {
- t.Fatalf("expected nodes; got: %v", res.Nodes)
- }
- if res.Nodes.Count == nil {
- t.Fatalf("expected nodes count; got: %v", res.Nodes.Count)
- }
-}
-
-func TestClusterStatsURLs(t *testing.T) {
- fFlag := false
- tFlag := true
-
- tests := []struct {
- Service *ClusterStatsService
- ExpectedPath string
- ExpectedParams url.Values
- }{
- {
- Service: &ClusterStatsService{
- nodeId: []string{},
- },
- ExpectedPath: "/_cluster/stats",
- },
- {
- Service: &ClusterStatsService{
- nodeId: []string{"node1"},
- },
- ExpectedPath: "/_cluster/stats/nodes/node1",
- },
- {
- Service: &ClusterStatsService{
- nodeId: []string{"node1", "node2"},
- },
- ExpectedPath: "/_cluster/stats/nodes/node1%2Cnode2",
- },
- {
- Service: &ClusterStatsService{
- nodeId: []string{},
- flatSettings: &tFlag,
- },
- ExpectedPath: "/_cluster/stats",
- ExpectedParams: url.Values{"flat_settings": []string{"true"}},
- },
- {
- Service: &ClusterStatsService{
- nodeId: []string{"node1"},
- flatSettings: &fFlag,
- },
- ExpectedPath: "/_cluster/stats/nodes/node1",
- ExpectedParams: url.Values{"flat_settings": []string{"false"}},
- },
- }
-
- for _, test := range tests {
- gotPath, gotParams, err := test.Service.buildURL()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if gotPath != test.ExpectedPath {
- t.Errorf("expected URL path = %q; got: %q", test.ExpectedPath, gotPath)
- }
- if gotParams.Encode() != test.ExpectedParams.Encode() {
- t.Errorf("expected URL params = %v; got: %v", test.ExpectedParams, gotParams)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/config/config.go b/vendor/github.com/olivere/elastic/config/config.go
deleted file mode 100644
index a511c4157..000000000
--- a/vendor/github.com/olivere/elastic/config/config.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package config
-
-import (
- "fmt"
- "net/url"
- "strconv"
- "strings"
-)
-
-// Config represents an Elasticsearch configuration.
-type Config struct {
- URL string
- Index string
- Username string
- Password string
- Shards int
- Replicas int
- Sniff *bool
- Infolog string
- Errorlog string
- Tracelog string
-}
-
-// Parse returns the Elasticsearch configuration by extracting it
-// from the URL, its path, and its query string.
-//
-// Example:
-// http://127.0.0.1:9200/store-blobs?shards=1&replicas=0&sniff=false&tracelog=elastic.trace.log
-//
-// The code above will return a URL of http://127.0.0.1:9200, an index name
-// of store-blobs, and the related settings from the query string.
-func Parse(elasticURL string) (*Config, error) {
- cfg := &Config{
- Shards: 1,
- Replicas: 0,
- Sniff: nil,
- }
-
- uri, err := url.Parse(elasticURL)
- if err != nil {
- return nil, fmt.Errorf("error parsing elastic parameter %q: %v", elasticURL, err)
- }
- index := uri.Path
- if strings.HasPrefix(index, "/") {
- index = index[1:]
- }
- if strings.HasSuffix(index, "/") {
- index = index[:len(index)-1]
- }
- if index == "" {
- return nil, fmt.Errorf("missing index in elastic parameter %q", elasticURL)
- }
- if uri.User != nil {
- cfg.Username = uri.User.Username()
- cfg.Password, _ = uri.User.Password()
- }
- uri.User = nil
-
- if i, err := strconv.Atoi(uri.Query().Get("shards")); err == nil {
- cfg.Shards = i
- }
- if i, err := strconv.Atoi(uri.Query().Get("replicas")); err == nil {
- cfg.Replicas = i
- }
- if s := uri.Query().Get("sniff"); s != "" {
- if b, err := strconv.ParseBool(s); err == nil {
- cfg.Sniff = &b
- }
- }
- if s := uri.Query().Get("infolog"); s != "" {
- cfg.Infolog = s
- }
- if s := uri.Query().Get("errorlog"); s != "" {
- cfg.Errorlog = s
- }
- if s := uri.Query().Get("tracelog"); s != "" {
- cfg.Tracelog = s
- }
-
- uri.Path = ""
- uri.RawQuery = ""
- cfg.URL = uri.String()
- cfg.Index = index
-
- return cfg, nil
-}
diff --git a/vendor/github.com/olivere/elastic/config/config_test.go b/vendor/github.com/olivere/elastic/config/config_test.go
deleted file mode 100644
index caa3bbadb..000000000
--- a/vendor/github.com/olivere/elastic/config/config_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package config
-
-import "testing"
-
-func TestParse(t *testing.T) {
- urls := "http://user:pwd@elastic:19220/store-blobs?shards=5&replicas=2&sniff=true&errorlog=elastic.error.log&infolog=elastic.info.log&tracelog=elastic.trace.log"
- cfg, err := Parse(urls)
- if err != nil {
- t.Fatal(err)
- }
- if want, got := "http://elastic:19220", cfg.URL; want != got {
- t.Fatalf("expected URL = %q, got %q", want, got)
- }
- if want, got := "store-blobs", cfg.Index; want != got {
- t.Fatalf("expected Index = %q, got %q", want, got)
- }
- if want, got := "user", cfg.Username; want != got {
- t.Fatalf("expected Username = %q, got %q", want, got)
- }
- if want, got := "pwd", cfg.Password; want != got {
- t.Fatalf("expected Password = %q, got %q", want, got)
- }
- if want, got := 5, cfg.Shards; want != got {
- t.Fatalf("expected Shards = %v, got %v", want, got)
- }
- if want, got := 2, cfg.Replicas; want != got {
- t.Fatalf("expected Replicas = %v, got %v", want, got)
- }
- if want, got := true, *cfg.Sniff; want != got {
- t.Fatalf("expected Sniff = %v, got %v", want, got)
- }
- if want, got := "elastic.error.log", cfg.Errorlog; want != got {
- t.Fatalf("expected Errorlog = %q, got %q", want, got)
- }
- if want, got := "elastic.info.log", cfg.Infolog; want != got {
- t.Fatalf("expected Infolog = %q, got %q", want, got)
- }
- if want, got := "elastic.trace.log", cfg.Tracelog; want != got {
- t.Fatalf("expected Tracelog = %q, got %q", want, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/config/doc.go b/vendor/github.com/olivere/elastic/config/doc.go
deleted file mode 100644
index c9acd5ff1..000000000
--- a/vendor/github.com/olivere/elastic/config/doc.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-/*
-Package config allows parsing a configuration for Elasticsearch
-from a URL.
-*/
-package config
diff --git a/vendor/github.com/olivere/elastic/connection.go b/vendor/github.com/olivere/elastic/connection.go
deleted file mode 100644
index 0f27a8756..000000000
--- a/vendor/github.com/olivere/elastic/connection.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
- "sync"
- "time"
-)
-
-// conn represents a single connection to a node in a cluster.
-type conn struct {
- sync.RWMutex
- nodeID string // node ID
- url string
- failures int
- dead bool
- deadSince *time.Time
-}
-
-// newConn creates a new connection to the given URL.
-func newConn(nodeID, url string) *conn {
- c := &conn{
- nodeID: nodeID,
- url: url,
- }
- return c
-}
-
-// String returns a representation of the connection status.
-func (c *conn) String() string {
- c.RLock()
- defer c.RUnlock()
- return fmt.Sprintf("%s [dead=%v,failures=%d,deadSince=%v]", c.url, c.dead, c.failures, c.deadSince)
-}
-
-// NodeID returns the ID of the node of this connection.
-func (c *conn) NodeID() string {
- c.RLock()
- defer c.RUnlock()
- return c.nodeID
-}
-
-// URL returns the URL of this connection.
-func (c *conn) URL() string {
- c.RLock()
- defer c.RUnlock()
- return c.url
-}
-
-// IsDead returns true if this connection is marked as dead, i.e. a previous
-// request to the URL has been unsuccessful.
-func (c *conn) IsDead() bool {
- c.RLock()
- defer c.RUnlock()
- return c.dead
-}
-
-// MarkAsDead marks this connection as dead, increments the failures
-// counter and stores the current time in dead since.
-func (c *conn) MarkAsDead() {
- c.Lock()
- c.dead = true
- if c.deadSince == nil {
- utcNow := time.Now().UTC()
- c.deadSince = &utcNow
- }
- c.failures += 1
- c.Unlock()
-}
-
-// MarkAsAlive marks this connection as eligible to be returned from the
-// pool of connections by the selector.
-func (c *conn) MarkAsAlive() {
- c.Lock()
- c.dead = false
- c.Unlock()
-}
-
-// MarkAsHealthy marks this connection as healthy, i.e. a request has been
-// successfully performed with it.
-func (c *conn) MarkAsHealthy() {
- c.Lock()
- c.dead = false
- c.deadSince = nil
- c.failures = 0
- c.Unlock()
-}
diff --git a/vendor/github.com/olivere/elastic/count.go b/vendor/github.com/olivere/elastic/count.go
deleted file mode 100644
index 44416fab0..000000000
--- a/vendor/github.com/olivere/elastic/count.go
+++ /dev/null
@@ -1,315 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// CountService is a convenient service for determining the
-// number of documents in an index. Use SearchService with
-// a SearchType of count for counting with queries etc.
-type CountService struct {
- client *Client
- pretty bool
- index []string
- typ []string
- allowNoIndices *bool
- analyzeWildcard *bool
- analyzer string
- defaultOperator string
- df string
- expandWildcards string
- ignoreUnavailable *bool
- lenient *bool
- lowercaseExpandedTerms *bool
- minScore interface{}
- preference string
- q string
- query Query
- routing string
- bodyJson interface{}
- bodyString string
-}
-
-// NewCountService creates a new CountService.
-func NewCountService(client *Client) *CountService {
- return &CountService{
- client: client,
- }
-}
-
-// Index sets the names of the indices to restrict the results.
-func (s *CountService) Index(index ...string) *CountService {
- if s.index == nil {
- s.index = make([]string, 0)
- }
- s.index = append(s.index, index...)
- return s
-}
-
-// Type sets the types to use to restrict the results.
-func (s *CountService) Type(typ ...string) *CountService {
- if s.typ == nil {
- s.typ = make([]string, 0)
- }
- s.typ = append(s.typ, typ...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes "_all" string
-// or when no indices have been specified).
-func (s *CountService) AllowNoIndices(allowNoIndices bool) *CountService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// AnalyzeWildcard specifies whether wildcard and prefix queries should be
-// analyzed (default: false).
-func (s *CountService) AnalyzeWildcard(analyzeWildcard bool) *CountService {
- s.analyzeWildcard = &analyzeWildcard
- return s
-}
-
-// Analyzer specifies the analyzer to use for the query string.
-func (s *CountService) Analyzer(analyzer string) *CountService {
- s.analyzer = analyzer
- return s
-}
-
-// DefaultOperator specifies the default operator for query string query (AND or OR).
-func (s *CountService) DefaultOperator(defaultOperator string) *CountService {
- s.defaultOperator = defaultOperator
- return s
-}
-
-// Df specifies the field to use as default where no field prefix is given
-// in the query string.
-func (s *CountService) Df(df string) *CountService {
- s.df = df
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *CountService) ExpandWildcards(expandWildcards string) *CountService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *CountService) IgnoreUnavailable(ignoreUnavailable bool) *CountService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Lenient specifies whether format-based query failures (such as
-// providing text to a numeric field) should be ignored.
-func (s *CountService) Lenient(lenient bool) *CountService {
- s.lenient = &lenient
- return s
-}
-
-// LowercaseExpandedTerms specifies whether query terms should be lowercased.
-func (s *CountService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *CountService {
- s.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return s
-}
-
-// MinScore indicates to include only documents with a specific `_score`
-// value in the result.
-func (s *CountService) MinScore(minScore interface{}) *CountService {
- s.minScore = minScore
- return s
-}
-
-// Preference specifies the node or shard the operation should be
-// performed on (default: random).
-func (s *CountService) Preference(preference string) *CountService {
- s.preference = preference
- return s
-}
-
-// Q in the Lucene query string syntax. You can also use Query to pass
-// a Query struct.
-func (s *CountService) Q(q string) *CountService {
- s.q = q
- return s
-}
-
-// Query specifies the query to pass. You can also pass a query string with Q.
-func (s *CountService) Query(query Query) *CountService {
- s.query = query
- return s
-}
-
-// Routing specifies the routing value.
-func (s *CountService) Routing(routing string) *CountService {
- s.routing = routing
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *CountService) Pretty(pretty bool) *CountService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson specifies the query to restrict the results specified with the
-// Query DSL (optional). The interface{} will be serialized to a JSON document,
-// so use a map[string]interface{}.
-func (s *CountService) BodyJson(body interface{}) *CountService {
- s.bodyJson = body
- return s
-}
-
-// Body specifies a query to restrict the results specified with
-// the Query DSL (optional).
-func (s *CountService) BodyString(body string) *CountService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *CountService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.index) > 0 && len(s.typ) > 0 {
- path, err = uritemplates.Expand("/{index}/{type}/_count", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": strings.Join(s.typ, ","),
- })
- } else if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_count", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else if len(s.typ) > 0 {
- path, err = uritemplates.Expand("/_all/{type}/_count", map[string]string{
- "type": strings.Join(s.typ, ","),
- })
- } else {
- path = "/_all/_count"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.analyzeWildcard != nil {
- params.Set("analyze_wildcard", fmt.Sprintf("%v", *s.analyzeWildcard))
- }
- if s.analyzer != "" {
- params.Set("analyzer", s.analyzer)
- }
- if s.defaultOperator != "" {
- params.Set("default_operator", s.defaultOperator)
- }
- if s.df != "" {
- params.Set("df", s.df)
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.lenient != nil {
- params.Set("lenient", fmt.Sprintf("%v", *s.lenient))
- }
- if s.lowercaseExpandedTerms != nil {
- params.Set("lowercase_expanded_terms", fmt.Sprintf("%v", *s.lowercaseExpandedTerms))
- }
- if s.minScore != nil {
- params.Set("min_score", fmt.Sprintf("%v", s.minScore))
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.q != "" {
- params.Set("q", s.q)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *CountService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *CountService) Do(ctx context.Context) (int64, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return 0, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return 0, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.query != nil {
- src, err := s.query.Source()
- if err != nil {
- return 0, err
- }
- query := make(map[string]interface{})
- query["query"] = src
- body = query
- } else if s.bodyJson != nil {
- body = s.bodyJson
- } else if s.bodyString != "" {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return 0, err
- }
-
- // Return result
- ret := new(CountResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return 0, err
- }
- if ret != nil {
- return ret.Count, nil
- }
-
- return int64(0), nil
-}
-
-// CountResponse is the response of using the Count API.
-type CountResponse struct {
- Count int64 `json:"count"`
- Shards shardsInfo `json:"_shards,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/count_test.go b/vendor/github.com/olivere/elastic/count_test.go
deleted file mode 100644
index a0ee52112..000000000
--- a/vendor/github.com/olivere/elastic/count_test.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestCountURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_all/_count",
- },
- {
- []string{},
- []string{"tweet"},
- "/_all/tweet/_count",
- },
- {
- []string{"twitter-*"},
- []string{"tweet", "follower"},
- "/twitter-%2A/tweet%2Cfollower/_count",
- },
- {
- []string{"twitter-2014", "twitter-2015"},
- []string{"tweet", "follower"},
- "/twitter-2014%2Ctwitter-2015/tweet%2Cfollower/_count",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.Count().Index(test.Indices...).Type(test.Types...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestCount(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Count documents
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Errorf("expected Count = %d; got %d", 3, count)
- }
-
- // Count documents
- count, err = client.Count(testIndexName).Type("doc").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Errorf("expected Count = %d; got %d", 3, count)
- }
-
- // Count documents
- count, err = client.Count(testIndexName).Type("gezwitscher").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 0 {
- t.Errorf("expected Count = %d; got %d", 0, count)
- }
-
- // Count with query
- query := NewTermQuery("user", "olivere")
- count, err = client.Count(testIndexName).Query(query).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 2 {
- t.Errorf("expected Count = %d; got %d", 2, count)
- }
-
- // Count with query and type
- query = NewTermQuery("user", "olivere")
- count, err = client.Count(testIndexName).Type("doc").Query(query).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 2 {
- t.Errorf("expected Count = %d; got %d", 2, count)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/decoder.go b/vendor/github.com/olivere/elastic/decoder.go
deleted file mode 100644
index 9cd2cf720..000000000
--- a/vendor/github.com/olivere/elastic/decoder.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
-)
-
-// Decoder is used to decode responses from Elasticsearch.
-// Users of elastic can implement their own marshaler for advanced purposes
-// and set them per Client (see SetDecoder). If none is specified,
-// DefaultDecoder is used.
-type Decoder interface {
- Decode(data []byte, v interface{}) error
-}
-
-// DefaultDecoder uses json.Unmarshal from the Go standard library
-// to decode JSON data.
-type DefaultDecoder struct{}
-
-// Decode decodes with json.Unmarshal from the Go standard library.
-func (u *DefaultDecoder) Decode(data []byte, v interface{}) error {
- return json.Unmarshal(data, v)
-}
diff --git a/vendor/github.com/olivere/elastic/decoder_test.go b/vendor/github.com/olivere/elastic/decoder_test.go
deleted file mode 100644
index 2c3dde8ca..000000000
--- a/vendor/github.com/olivere/elastic/decoder_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "sync/atomic"
- "testing"
-)
-
-type decoder struct {
- dec json.Decoder
-
- N int64
-}
-
-func (d *decoder) Decode(data []byte, v interface{}) error {
- atomic.AddInt64(&d.N, 1)
- dec := json.NewDecoder(bytes.NewReader(data))
- dec.UseNumber()
- return dec.Decode(v)
-}
-
-func TestDecoder(t *testing.T) {
- dec := &decoder{}
- client := setupTestClientAndCreateIndex(t, SetDecoder(dec), SetMaxRetries(0))
-
- tweet := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // Add a document
- indexResult, err := client.Index().
- Index(testIndexName).
- Type("doc").
- Id("1").
- BodyJson(&tweet).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexResult == nil {
- t.Errorf("expected result to be != nil; got: %v", indexResult)
- }
- if dec.N == 0 {
- t.Errorf("expected at least 1 call of decoder; got: %d", dec.N)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/delete.go b/vendor/github.com/olivere/elastic/delete.go
deleted file mode 100644
index 1e20de11f..000000000
--- a/vendor/github.com/olivere/elastic/delete.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// DeleteService allows to delete a typed JSON document from a specified
-// index based on its id.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-delete.html
-// for details.
-type DeleteService struct {
- client *Client
- pretty bool
- id string
- index string
- typ string
- routing string
- timeout string
- version interface{}
- versionType string
- waitForActiveShards string
- parent string
- refresh string
-}
-
-// NewDeleteService creates a new DeleteService.
-func NewDeleteService(client *Client) *DeleteService {
- return &DeleteService{
- client: client,
- }
-}
-
-// Type is the type of the document.
-func (s *DeleteService) Type(typ string) *DeleteService {
- s.typ = typ
- return s
-}
-
-// Id is the document ID.
-func (s *DeleteService) Id(id string) *DeleteService {
- s.id = id
- return s
-}
-
-// Index is the name of the index.
-func (s *DeleteService) Index(index string) *DeleteService {
- s.index = index
- return s
-}
-
-// Routing is a specific routing value.
-func (s *DeleteService) Routing(routing string) *DeleteService {
- s.routing = routing
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *DeleteService) Timeout(timeout string) *DeleteService {
- s.timeout = timeout
- return s
-}
-
-// Version is an explicit version number for concurrency control.
-func (s *DeleteService) Version(version interface{}) *DeleteService {
- s.version = version
- return s
-}
-
-// VersionType is a specific version type.
-func (s *DeleteService) VersionType(versionType string) *DeleteService {
- s.versionType = versionType
- return s
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active
-// before proceeding with the delete operation. Defaults to 1, meaning the
-// primary shard only. Set to `all` for all shard copies, otherwise set to
-// any non-negative value less than or equal to the total number of copies
-// for the shard (number of replicas + 1).
-func (s *DeleteService) WaitForActiveShards(waitForActiveShards string) *DeleteService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// Parent is the ID of parent document.
-func (s *DeleteService) Parent(parent string) *DeleteService {
- s.parent = parent
- return s
-}
-
-// Refresh the index after performing the operation.
-func (s *DeleteService) Refresh(refresh string) *DeleteService {
- s.refresh = refresh
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *DeleteService) Pretty(pretty bool) *DeleteService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *DeleteService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
- "index": s.index,
- "type": s.typ,
- "id": s.id,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", s.version))
- }
- if s.versionType != "" {
- params.Set("version_type", s.versionType)
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *DeleteService) Validate() error {
- var invalid []string
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation. If the document is not found (404), Elasticsearch will
-// still return a response. This response is serialized and returned as well. In other
-// words, for HTTP status code 404, both an error and a response might be returned.
-func (s *DeleteService) Do(ctx context.Context) (*DeleteResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- IgnoreErrors: []int{http.StatusNotFound},
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(DeleteResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
-
- // If we have a 404, we return both a result and an error, just like ES does
- if res.StatusCode == http.StatusNotFound {
- return ret, &Error{Status: http.StatusNotFound}
- }
-
- return ret, nil
-}
-
-// -- Result of a delete request.
-
-// DeleteResponse is the outcome of running DeleteService.Do.
-type DeleteResponse struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Version int64 `json:"_version,omitempty"`
- Result string `json:"result,omitempty"`
- Shards *shardsInfo `json:"_shards,omitempty"`
- SeqNo int64 `json:"_seq_no,omitempty"`
- PrimaryTerm int64 `json:"_primary_term,omitempty"`
- Status int `json:"status,omitempty"`
- ForcedRefresh bool `json:"forced_refresh,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/delete_by_query.go b/vendor/github.com/olivere/elastic/delete_by_query.go
deleted file mode 100644
index 694d81c2a..000000000
--- a/vendor/github.com/olivere/elastic/delete_by_query.go
+++ /dev/null
@@ -1,654 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// DeleteByQueryService deletes documents that match a query.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-delete-by-query.html.
-type DeleteByQueryService struct {
- client *Client
- index []string
- typ []string
- query Query
- body interface{}
- xSource []string
- xSourceExclude []string
- xSourceInclude []string
- analyzer string
- analyzeWildcard *bool
- allowNoIndices *bool
- conflicts string
- defaultOperator string
- df string
- docvalueFields []string
- expandWildcards string
- explain *bool
- from *int
- ignoreUnavailable *bool
- lenient *bool
- lowercaseExpandedTerms *bool
- preference string
- q string
- refresh string
- requestCache *bool
- requestsPerSecond *int
- routing []string
- scroll string
- scrollSize *int
- searchTimeout string
- searchType string
- size *int
- sort []string
- stats []string
- storedFields []string
- suggestField string
- suggestMode string
- suggestSize *int
- suggestText string
- terminateAfter *int
- timeout string
- trackScores *bool
- version *bool
- waitForActiveShards string
- waitForCompletion *bool
- pretty bool
-}
-
-// NewDeleteByQueryService creates a new DeleteByQueryService.
-// You typically use the client's DeleteByQuery to get a reference to
-// the service.
-func NewDeleteByQueryService(client *Client) *DeleteByQueryService {
- builder := &DeleteByQueryService{
- client: client,
- }
- return builder
-}
-
-// Index sets the indices on which to perform the delete operation.
-func (s *DeleteByQueryService) Index(index ...string) *DeleteByQueryService {
- s.index = append(s.index, index...)
- return s
-}
-
-// Type limits the delete operation to the given types.
-func (s *DeleteByQueryService) Type(typ ...string) *DeleteByQueryService {
- s.typ = append(s.typ, typ...)
- return s
-}
-
-// XSource is true or false to return the _source field or not,
-// or a list of fields to return.
-func (s *DeleteByQueryService) XSource(xSource ...string) *DeleteByQueryService {
- s.xSource = append(s.xSource, xSource...)
- return s
-}
-
-// XSourceExclude represents a list of fields to exclude from the returned _source field.
-func (s *DeleteByQueryService) XSourceExclude(xSourceExclude ...string) *DeleteByQueryService {
- s.xSourceExclude = append(s.xSourceExclude, xSourceExclude...)
- return s
-}
-
-// XSourceInclude represents a list of fields to extract and return from the _source field.
-func (s *DeleteByQueryService) XSourceInclude(xSourceInclude ...string) *DeleteByQueryService {
- s.xSourceInclude = append(s.xSourceInclude, xSourceInclude...)
- return s
-}
-
-// Analyzer to use for the query string.
-func (s *DeleteByQueryService) Analyzer(analyzer string) *DeleteByQueryService {
- s.analyzer = analyzer
- return s
-}
-
-// AnalyzeWildcard specifies whether wildcard and prefix queries should be
-// analyzed (default: false).
-func (s *DeleteByQueryService) AnalyzeWildcard(analyzeWildcard bool) *DeleteByQueryService {
- s.analyzeWildcard = &analyzeWildcard
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices (including the _all string
-// or when no indices have been specified).
-func (s *DeleteByQueryService) AllowNoIndices(allow bool) *DeleteByQueryService {
- s.allowNoIndices = &allow
- return s
-}
-
-// Conflicts indicates what to do when the process detects version conflicts.
-// Possible values are "proceed" and "abort".
-func (s *DeleteByQueryService) Conflicts(conflicts string) *DeleteByQueryService {
- s.conflicts = conflicts
- return s
-}
-
-// AbortOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("abort").
-func (s *DeleteByQueryService) AbortOnVersionConflict() *DeleteByQueryService {
- s.conflicts = "abort"
- return s
-}
-
-// ProceedOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("proceed").
-func (s *DeleteByQueryService) ProceedOnVersionConflict() *DeleteByQueryService {
- s.conflicts = "proceed"
- return s
-}
-
-// DefaultOperator for query string query (AND or OR).
-func (s *DeleteByQueryService) DefaultOperator(defaultOperator string) *DeleteByQueryService {
- s.defaultOperator = defaultOperator
- return s
-}
-
-// DF is the field to use as default where no field prefix is given in the query string.
-func (s *DeleteByQueryService) DF(defaultField string) *DeleteByQueryService {
- s.df = defaultField
- return s
-}
-
-// DefaultField is the field to use as default where no field prefix is given in the query string.
-// It is an alias to the DF func.
-func (s *DeleteByQueryService) DefaultField(defaultField string) *DeleteByQueryService {
- s.df = defaultField
- return s
-}
-
-// DocvalueFields specifies the list of fields to return as the docvalue representation of a field for each hit.
-func (s *DeleteByQueryService) DocvalueFields(docvalueFields ...string) *DeleteByQueryService {
- s.docvalueFields = docvalueFields
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both. It can be "open" or "closed".
-func (s *DeleteByQueryService) ExpandWildcards(expand string) *DeleteByQueryService {
- s.expandWildcards = expand
- return s
-}
-
-// Explain specifies whether to return detailed information about score
-// computation as part of a hit.
-func (s *DeleteByQueryService) Explain(explain bool) *DeleteByQueryService {
- s.explain = &explain
- return s
-}
-
-// From is the starting offset (default: 0).
-func (s *DeleteByQueryService) From(from int) *DeleteByQueryService {
- s.from = &from
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *DeleteByQueryService) IgnoreUnavailable(ignore bool) *DeleteByQueryService {
- s.ignoreUnavailable = &ignore
- return s
-}
-
-// Lenient specifies whether format-based query failures
-// (such as providing text to a numeric field) should be ignored.
-func (s *DeleteByQueryService) Lenient(lenient bool) *DeleteByQueryService {
- s.lenient = &lenient
- return s
-}
-
-// LowercaseExpandedTerms specifies whether query terms should be lowercased.
-func (s *DeleteByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *DeleteByQueryService {
- s.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on
-// (default: random).
-func (s *DeleteByQueryService) Preference(preference string) *DeleteByQueryService {
- s.preference = preference
- return s
-}
-
-// Q specifies the query in Lucene query string syntax. You can also use
-// Query to programmatically specify the query.
-func (s *DeleteByQueryService) Q(query string) *DeleteByQueryService {
- s.q = query
- return s
-}
-
-// QueryString is an alias to Q. Notice that you can also use Query to
-// programmatically set the query.
-func (s *DeleteByQueryService) QueryString(query string) *DeleteByQueryService {
- s.q = query
- return s
-}
-
-// Query sets the query programmatically.
-func (s *DeleteByQueryService) Query(query Query) *DeleteByQueryService {
- s.query = query
- return s
-}
-
-// Refresh indicates whether the effected indexes should be refreshed.
-func (s *DeleteByQueryService) Refresh(refresh string) *DeleteByQueryService {
- s.refresh = refresh
- return s
-}
-
-// RequestCache specifies if request cache should be used for this request
-// or not, defaults to index level setting.
-func (s *DeleteByQueryService) RequestCache(requestCache bool) *DeleteByQueryService {
- s.requestCache = &requestCache
- return s
-}
-
-// RequestsPerSecond sets the throttle on this request in sub-requests per second.
-// -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
-func (s *DeleteByQueryService) RequestsPerSecond(requestsPerSecond int) *DeleteByQueryService {
- s.requestsPerSecond = &requestsPerSecond
- return s
-}
-
-// Routing is a list of specific routing values.
-func (s *DeleteByQueryService) Routing(routing ...string) *DeleteByQueryService {
- s.routing = append(s.routing, routing...)
- return s
-}
-
-// Scroll specifies how long a consistent view of the index should be maintained
-// for scrolled search.
-func (s *DeleteByQueryService) Scroll(scroll string) *DeleteByQueryService {
- s.scroll = scroll
- return s
-}
-
-// ScrollSize is the size on the scroll request powering the update_by_query.
-func (s *DeleteByQueryService) ScrollSize(scrollSize int) *DeleteByQueryService {
- s.scrollSize = &scrollSize
- return s
-}
-
-// SearchTimeout defines an explicit timeout for each search request.
-// Defaults to no timeout.
-func (s *DeleteByQueryService) SearchTimeout(searchTimeout string) *DeleteByQueryService {
- s.searchTimeout = searchTimeout
- return s
-}
-
-// SearchType is the search operation type. Possible values are
-// "query_then_fetch" and "dfs_query_then_fetch".
-func (s *DeleteByQueryService) SearchType(searchType string) *DeleteByQueryService {
- s.searchType = searchType
- return s
-}
-
-// Size represents the number of hits to return (default: 10).
-func (s *DeleteByQueryService) Size(size int) *DeleteByQueryService {
- s.size = &size
- return s
-}
-
-// Sort is a list of <field>:<direction> pairs.
-func (s *DeleteByQueryService) Sort(sort ...string) *DeleteByQueryService {
- s.sort = append(s.sort, sort...)
- return s
-}
-
-// SortByField adds a sort order.
-func (s *DeleteByQueryService) SortByField(field string, ascending bool) *DeleteByQueryService {
- if ascending {
- s.sort = append(s.sort, fmt.Sprintf("%s:asc", field))
- } else {
- s.sort = append(s.sort, fmt.Sprintf("%s:desc", field))
- }
- return s
-}
-
-// Stats specifies specific tag(s) of the request for logging and statistical purposes.
-func (s *DeleteByQueryService) Stats(stats ...string) *DeleteByQueryService {
- s.stats = append(s.stats, stats...)
- return s
-}
-
-// StoredFields specifies the list of stored fields to return as part of a hit.
-func (s *DeleteByQueryService) StoredFields(storedFields ...string) *DeleteByQueryService {
- s.storedFields = storedFields
- return s
-}
-
-// SuggestField specifies which field to use for suggestions.
-func (s *DeleteByQueryService) SuggestField(suggestField string) *DeleteByQueryService {
- s.suggestField = suggestField
- return s
-}
-
-// SuggestMode specifies the suggest mode. Possible values are
-// "missing", "popular", and "always".
-func (s *DeleteByQueryService) SuggestMode(suggestMode string) *DeleteByQueryService {
- s.suggestMode = suggestMode
- return s
-}
-
-// SuggestSize specifies how many suggestions to return in response.
-func (s *DeleteByQueryService) SuggestSize(suggestSize int) *DeleteByQueryService {
- s.suggestSize = &suggestSize
- return s
-}
-
-// SuggestText specifies the source text for which the suggestions should be returned.
-func (s *DeleteByQueryService) SuggestText(suggestText string) *DeleteByQueryService {
- s.suggestText = suggestText
- return s
-}
-
-// TerminateAfter indicates the maximum number of documents to collect
-// for each shard, upon reaching which the query execution will terminate early.
-func (s *DeleteByQueryService) TerminateAfter(terminateAfter int) *DeleteByQueryService {
- s.terminateAfter = &terminateAfter
- return s
-}
-
-// Timeout is the time each individual bulk request should wait for shards
-// that are unavailable.
-func (s *DeleteByQueryService) Timeout(timeout string) *DeleteByQueryService {
- s.timeout = timeout
- return s
-}
-
-// TimeoutInMillis sets the timeout in milliseconds.
-func (s *DeleteByQueryService) TimeoutInMillis(timeoutInMillis int) *DeleteByQueryService {
- s.timeout = fmt.Sprintf("%dms", timeoutInMillis)
- return s
-}
-
-// TrackScores indicates whether to calculate and return scores even if
-// they are not used for sorting.
-func (s *DeleteByQueryService) TrackScores(trackScores bool) *DeleteByQueryService {
- s.trackScores = &trackScores
- return s
-}
-
-// Version specifies whether to return document version as part of a hit.
-func (s *DeleteByQueryService) Version(version bool) *DeleteByQueryService {
- s.version = &version
- return s
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active before proceeding
-// with the update by query operation. Defaults to 1, meaning the primary shard only.
-// Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal
-// to the total number of copies for the shard (number of replicas + 1).
-func (s *DeleteByQueryService) WaitForActiveShards(waitForActiveShards string) *DeleteByQueryService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// WaitForCompletion indicates if the request should block until the reindex is complete.
-func (s *DeleteByQueryService) WaitForCompletion(waitForCompletion bool) *DeleteByQueryService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// Pretty indents the JSON output from Elasticsearch.
-func (s *DeleteByQueryService) Pretty(pretty bool) *DeleteByQueryService {
- s.pretty = pretty
- return s
-}
-
-// Body specifies the body of the request. It overrides data being specified via SearchService.
-func (s *DeleteByQueryService) Body(body string) *DeleteByQueryService {
- s.body = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *DeleteByQueryService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.typ) > 0 {
- path, err = uritemplates.Expand("/{index}/{type}/_delete_by_query", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": strings.Join(s.typ, ","),
- })
- } else {
- path, err = uritemplates.Expand("/{index}/_delete_by_query", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if len(s.xSource) > 0 {
- params.Set("_source", strings.Join(s.xSource, ","))
- }
- if len(s.xSourceExclude) > 0 {
- params.Set("_source_exclude", strings.Join(s.xSourceExclude, ","))
- }
- if len(s.xSourceInclude) > 0 {
- params.Set("_source_include", strings.Join(s.xSourceInclude, ","))
- }
- if s.analyzer != "" {
- params.Set("analyzer", s.analyzer)
- }
- if s.analyzeWildcard != nil {
- params.Set("analyze_wildcard", fmt.Sprintf("%v", *s.analyzeWildcard))
- }
- if s.defaultOperator != "" {
- params.Set("default_operator", s.defaultOperator)
- }
- if s.df != "" {
- params.Set("df", s.df)
- }
- if s.explain != nil {
- params.Set("explain", fmt.Sprintf("%v", *s.explain))
- }
- if len(s.storedFields) > 0 {
- params.Set("stored_fields", strings.Join(s.storedFields, ","))
- }
- if len(s.docvalueFields) > 0 {
- params.Set("docvalue_fields", strings.Join(s.docvalueFields, ","))
- }
- if s.from != nil {
- params.Set("from", fmt.Sprintf("%d", *s.from))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.conflicts != "" {
- params.Set("conflicts", s.conflicts)
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.lenient != nil {
- params.Set("lenient", fmt.Sprintf("%v", *s.lenient))
- }
- if s.lowercaseExpandedTerms != nil {
- params.Set("lowercase_expanded_terms", fmt.Sprintf("%v", *s.lowercaseExpandedTerms))
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.q != "" {
- params.Set("q", s.q)
- }
- if len(s.routing) > 0 {
- params.Set("routing", strings.Join(s.routing, ","))
- }
- if s.scroll != "" {
- params.Set("scroll", s.scroll)
- }
- if s.searchType != "" {
- params.Set("search_type", s.searchType)
- }
- if s.searchTimeout != "" {
- params.Set("search_timeout", s.searchTimeout)
- }
- if s.size != nil {
- params.Set("size", fmt.Sprintf("%d", *s.size))
- }
- if len(s.sort) > 0 {
- params.Set("sort", strings.Join(s.sort, ","))
- }
- if s.terminateAfter != nil {
- params.Set("terminate_after", fmt.Sprintf("%v", *s.terminateAfter))
- }
- if len(s.stats) > 0 {
- params.Set("stats", strings.Join(s.stats, ","))
- }
- if s.suggestField != "" {
- params.Set("suggest_field", s.suggestField)
- }
- if s.suggestMode != "" {
- params.Set("suggest_mode", s.suggestMode)
- }
- if s.suggestSize != nil {
- params.Set("suggest_size", fmt.Sprintf("%v", *s.suggestSize))
- }
- if s.suggestText != "" {
- params.Set("suggest_text", s.suggestText)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.trackScores != nil {
- params.Set("track_scores", fmt.Sprintf("%v", *s.trackScores))
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", *s.version))
- }
- if s.requestCache != nil {
- params.Set("request_cache", fmt.Sprintf("%v", *s.requestCache))
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- if s.scrollSize != nil {
- params.Set("scroll_size", fmt.Sprintf("%d", *s.scrollSize))
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- if s.requestsPerSecond != nil {
- params.Set("requests_per_second", fmt.Sprintf("%v", *s.requestsPerSecond))
- }
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *DeleteByQueryService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the delete-by-query operation.
-func (s *DeleteByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Set body if there is a query set
- var body interface{}
- if s.body != nil {
- body = s.body
- } else if s.query != nil {
- src, err := s.query.Source()
- if err != nil {
- return nil, err
- }
- body = map[string]interface{}{
- "query": src,
- }
- }
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return result
- ret := new(BulkIndexByScrollResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// BulkIndexByScrollResponse is the outcome of executing Do with
-// DeleteByQueryService and UpdateByQueryService.
-type BulkIndexByScrollResponse struct {
- Took int64 `json:"took"`
- SliceId *int64 `json:"slice_id,omitempty"`
- TimedOut bool `json:"timed_out"`
- Total int64 `json:"total"`
- Updated int64 `json:"updated,omitempty"`
- Created int64 `json:"created,omitempty"`
- Deleted int64 `json:"deleted"`
- Batches int64 `json:"batches"`
- VersionConflicts int64 `json:"version_conflicts"`
- Noops int64 `json:"noops"`
- Retries struct {
- Bulk int64 `json:"bulk"`
- Search int64 `json:"search"`
- } `json:"retries,omitempty"`
- Throttled string `json:"throttled"`
- ThrottledMillis int64 `json:"throttled_millis"`
- RequestsPerSecond float64 `json:"requests_per_second"`
- Canceled string `json:"canceled,omitempty"`
- ThrottledUntil string `json:"throttled_until"`
- ThrottledUntilMillis int64 `json:"throttled_until_millis"`
- Failures []bulkIndexByScrollResponseFailure `json:"failures"`
-}
-
-type bulkIndexByScrollResponseFailure struct {
- Index string `json:"index,omitempty"`
- Type string `json:"type,omitempty"`
- Id string `json:"id,omitempty"`
- Status int `json:"status,omitempty"`
- Shard int `json:"shard,omitempty"`
- Node int `json:"node,omitempty"`
- // TOOD "cause" contains exception details
- // TOOD "reason" contains exception details
-}
diff --git a/vendor/github.com/olivere/elastic/delete_by_query_test.go b/vendor/github.com/olivere/elastic/delete_by_query_test.go
deleted file mode 100644
index 40e45b871..000000000
--- a/vendor/github.com/olivere/elastic/delete_by_query_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestDeleteByQueryBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- ExpectErr bool
- }{
- {
- []string{},
- []string{},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{},
- "/index1/_delete_by_query",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{},
- "/index1%2Cindex2/_delete_by_query",
- false,
- },
- {
- []string{},
- []string{"type1"},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{"type1"},
- "/index1/type1/_delete_by_query",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{"type1", "type2"},
- "/index1%2Cindex2/type1%2Ctype2/_delete_by_query",
- false,
- },
- }
-
- for i, test := range tests {
- builder := client.DeleteByQuery().Index(test.Indices...).Type(test.Types...)
- err := builder.Validate()
- if err != nil {
- if !test.ExpectErr {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- } else {
- // err == nil
- if test.ExpectErr {
- t.Errorf("case #%d: expected error", i+1)
- continue
- }
- path, _, _ := builder.buildURL()
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
- }
-}
-
-func TestDeleteByQuery(t *testing.T) {
- // client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Count documents
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Fatalf("expected count = %d; got: %d", 3, count)
- }
-
- // Delete all documents by sandrae
- q := NewTermQuery("user", "sandrae")
- res, err := client.DeleteByQuery().
- Index(testIndexName).
- Type("doc").
- Query(q).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected response != nil; got: %v", res)
- }
-
- // Flush and check count
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err = client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 2 {
- t.Fatalf("expected Count = %d; got: %d", 2, count)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/delete_test.go b/vendor/github.com/olivere/elastic/delete_test.go
deleted file mode 100644
index 571fcf589..000000000
--- a/vendor/github.com/olivere/elastic/delete_test.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestDelete(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Count documents
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Errorf("expected Count = %d; got %d", 3, count)
- }
-
- // Delete document 1
- res, err := client.Delete().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if want, have := "deleted", res.Result; want != have {
- t.Errorf("expected Result = %q; got %q", want, have)
- }
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- count, err = client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 2 {
- t.Errorf("expected Count = %d; got %d", 2, count)
- }
-
- // Delete non existent document 99
- res, err = client.Delete().Index(testIndexName).Type("doc").Id("99").Refresh("true").Do(context.TODO())
- if err == nil {
- t.Fatal("expected error")
- }
- if !IsNotFound(err) {
- t.Fatalf("expected 404, got: %v", err)
- }
- if _, ok := err.(*Error); !ok {
- t.Fatalf("expected error type *Error, got: %T", err)
- }
- if res == nil {
- t.Fatal("expected response")
- }
- if have, want := res.Id, "99"; have != want {
- t.Errorf("expected _id = %q, got %q", have, want)
- }
- if have, want := res.Index, testIndexName; have != want {
- t.Errorf("expected _index = %q, got %q", have, want)
- }
- if have, want := res.Type, "doc"; have != want {
- t.Errorf("expected _type = %q, got %q", have, want)
- }
- if have, want := res.Result, "not_found"; have != want {
- t.Errorf("expected Result = %q, got %q", have, want)
- }
-
- count, err = client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 2 {
- t.Errorf("expected Count = %d; got %d", 2, count)
- }
-}
-
-func TestDeleteValidate(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // No index name -> fail with error
- res, err := NewDeleteService(client).Type("doc").Id("1").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-
- // No type -> fail with error
- res, err = NewDeleteService(client).Index(testIndexName).Id("1").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without type")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-
- // No id -> fail with error
- res, err = NewDeleteService(client).Index(testIndexName).Type("doc").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without id")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/doc.go b/vendor/github.com/olivere/elastic/doc.go
deleted file mode 100644
index ea16d6698..000000000
--- a/vendor/github.com/olivere/elastic/doc.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-/*
-Package elastic provides an interface to the Elasticsearch server
-(https://www.elastic.co/products/elasticsearch).
-
-The first thing you do is to create a Client. If you have Elasticsearch
-installed and running with its default settings
-(i.e. available at http://127.0.0.1:9200), all you need to do is:
-
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- }
-
-If your Elasticsearch server is running on a different IP and/or port,
-just provide a URL to NewClient:
-
- // Create a client and connect to http://192.168.2.10:9201
- client, err := elastic.NewClient(elastic.SetURL("http://192.168.2.10:9201"))
- if err != nil {
- // Handle error
- }
-
-You can pass many more configuration parameters to NewClient. Review the
-documentation of NewClient for more information.
-
-If no Elasticsearch server is available, services will fail when creating
-a new request and will return ErrNoClient.
-
-A Client provides services. The services usually come with a variety of
-methods to prepare the query and a Do function to execute it against the
-Elasticsearch REST interface and return a response. Here is an example
-of the IndexExists service that checks if a given index already exists.
-
- exists, err := client.IndexExists("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- }
- if !exists {
- // Index does not exist yet.
- }
-
-Look up the documentation for Client to get an idea of the services provided
-and what kinds of responses you get when executing the Do function of a service.
-Also see the wiki on Github for more details.
-
-*/
-package elastic
diff --git a/vendor/github.com/olivere/elastic/errors.go b/vendor/github.com/olivere/elastic/errors.go
deleted file mode 100644
index e40cda845..000000000
--- a/vendor/github.com/olivere/elastic/errors.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "fmt"
- "io/ioutil"
- "net/http"
-
- "github.com/pkg/errors"
-)
-
-// checkResponse will return an error if the request/response indicates
-// an error returned from Elasticsearch.
-//
-// HTTP status codes between in the range [200..299] are considered successful.
-// All other errors are considered errors except they are specified in
-// ignoreErrors. This is necessary because for some services, HTTP status 404
-// is a valid response from Elasticsearch (e.g. the Exists service).
-//
-// The func tries to parse error details as returned from Elasticsearch
-// and encapsulates them in type elastic.Error.
-func checkResponse(req *http.Request, res *http.Response, ignoreErrors ...int) error {
- // 200-299 are valid status codes
- if res.StatusCode >= 200 && res.StatusCode <= 299 {
- return nil
- }
- // Ignore certain errors?
- for _, code := range ignoreErrors {
- if code == res.StatusCode {
- return nil
- }
- }
- return createResponseError(res)
-}
-
-// createResponseError creates an Error structure from the HTTP response,
-// its status code and the error information sent by Elasticsearch.
-func createResponseError(res *http.Response) error {
- if res.Body == nil {
- return &Error{Status: res.StatusCode}
- }
- data, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return &Error{Status: res.StatusCode}
- }
- errReply := new(Error)
- err = json.Unmarshal(data, errReply)
- if err != nil {
- return &Error{Status: res.StatusCode}
- }
- if errReply != nil {
- if errReply.Status == 0 {
- errReply.Status = res.StatusCode
- }
- return errReply
- }
- return &Error{Status: res.StatusCode}
-}
-
-// Error encapsulates error details as returned from Elasticsearch.
-type Error struct {
- Status int `json:"status"`
- Details *ErrorDetails `json:"error,omitempty"`
-}
-
-// ErrorDetails encapsulate error details from Elasticsearch.
-// It is used in e.g. elastic.Error and elastic.BulkResponseItem.
-type ErrorDetails struct {
- Type string `json:"type"`
- Reason string `json:"reason"`
- ResourceType string `json:"resource.type,omitempty"`
- ResourceId string `json:"resource.id,omitempty"`
- Index string `json:"index,omitempty"`
- Phase string `json:"phase,omitempty"`
- Grouped bool `json:"grouped,omitempty"`
- CausedBy map[string]interface{} `json:"caused_by,omitempty"`
- RootCause []*ErrorDetails `json:"root_cause,omitempty"`
- FailedShards []map[string]interface{} `json:"failed_shards,omitempty"`
-}
-
-// Error returns a string representation of the error.
-func (e *Error) Error() string {
- if e.Details != nil && e.Details.Reason != "" {
- return fmt.Sprintf("elastic: Error %d (%s): %s [type=%s]", e.Status, http.StatusText(e.Status), e.Details.Reason, e.Details.Type)
- } else {
- return fmt.Sprintf("elastic: Error %d (%s)", e.Status, http.StatusText(e.Status))
- }
-}
-
-// IsConnErr returns true if the error indicates that Elastic could not
-// find an Elasticsearch host to connect to.
-func IsConnErr(err error) bool {
- return err == ErrNoClient || errors.Cause(err) == ErrNoClient
-}
-
-// IsNotFound returns true if the given error indicates that Elasticsearch
-// returned HTTP status 404. The err parameter can be of type *elastic.Error,
-// elastic.Error, *http.Response or int (indicating the HTTP status code).
-func IsNotFound(err interface{}) bool {
- return IsStatusCode(err, http.StatusNotFound)
-}
-
-// IsTimeout returns true if the given error indicates that Elasticsearch
-// returned HTTP status 408. The err parameter can be of type *elastic.Error,
-// elastic.Error, *http.Response or int (indicating the HTTP status code).
-func IsTimeout(err interface{}) bool {
- return IsStatusCode(err, http.StatusRequestTimeout)
-}
-
-// IsConflict returns true if the given error indicates that the Elasticsearch
-// operation resulted in a version conflict. This can occur in operations like
-// `update` or `index` with `op_type=create`. The err parameter can be of
-// type *elastic.Error, elastic.Error, *http.Response or int (indicating the
-// HTTP status code).
-func IsConflict(err interface{}) bool {
- return IsStatusCode(err, http.StatusConflict)
-}
-
-// IsStatusCode returns true if the given error indicates that the Elasticsearch
-// operation returned the specified HTTP status code. The err parameter can be of
-// type *http.Response, *Error, Error, or int (indicating the HTTP status code).
-func IsStatusCode(err interface{}, code int) bool {
- switch e := err.(type) {
- case *http.Response:
- return e.StatusCode == code
- case *Error:
- return e.Status == code
- case Error:
- return e.Status == code
- case int:
- return e == code
- }
- return false
-}
-
-// -- General errors --
-
-// shardsInfo represents information from a shard.
-type shardsInfo struct {
- Total int `json:"total"`
- Successful int `json:"successful"`
- Failed int `json:"failed"`
-}
-
-// shardOperationFailure represents a shard failure.
-type shardOperationFailure struct {
- Shard int `json:"shard"`
- Index string `json:"index"`
- Status string `json:"status"`
- // "reason"
-}
diff --git a/vendor/github.com/olivere/elastic/errors_test.go b/vendor/github.com/olivere/elastic/errors_test.go
deleted file mode 100644
index 75d3949e5..000000000
--- a/vendor/github.com/olivere/elastic/errors_test.go
+++ /dev/null
@@ -1,295 +0,0 @@
-package elastic
-
-import (
- "bufio"
- "fmt"
- "net/http"
- "strings"
- "testing"
-)
-
-func TestResponseError(t *testing.T) {
- raw := "HTTP/1.1 404 Not Found\r\n" +
- "\r\n" +
- `{"error":{"root_cause":[{"type":"index_missing_exception","reason":"no such index","index":"elastic-test"}],"type":"index_missing_exception","reason":"no such index","index":"elastic-test"},"status":404}` + "\r\n"
- r := bufio.NewReader(strings.NewReader(raw))
-
- req, err := http.NewRequest("GET", "/", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := http.ReadResponse(r, nil)
- if err != nil {
- t.Fatal(err)
- }
- err = checkResponse(req, resp)
- if err == nil {
- t.Fatalf("expected error; got: %v", err)
- }
-
- // Check for correct error message
- expected := fmt.Sprintf("elastic: Error %d (%s): no such index [type=index_missing_exception]", resp.StatusCode, http.StatusText(resp.StatusCode))
- got := err.Error()
- if got != expected {
- t.Fatalf("expected %q; got: %q", expected, got)
- }
-
- // Check that error is of type *elastic.Error, which contains additional information
- e, ok := err.(*Error)
- if !ok {
- t.Fatal("expected error to be of type *elastic.Error")
- }
- if e.Status != resp.StatusCode {
- t.Fatalf("expected status code %d; got: %d", resp.StatusCode, e.Status)
- }
- if e.Details == nil {
- t.Fatalf("expected error details; got: %v", e.Details)
- }
- if got, want := e.Details.Index, "elastic-test"; got != want {
- t.Fatalf("expected error details index %q; got: %q", want, got)
- }
- if got, want := e.Details.Type, "index_missing_exception"; got != want {
- t.Fatalf("expected error details type %q; got: %q", want, got)
- }
- if got, want := e.Details.Reason, "no such index"; got != want {
- t.Fatalf("expected error details reason %q; got: %q", want, got)
- }
- if got, want := len(e.Details.RootCause), 1; got != want {
- t.Fatalf("expected %d error details root causes; got: %d", want, got)
- }
-
- if got, want := e.Details.RootCause[0].Index, "elastic-test"; got != want {
- t.Fatalf("expected root cause index %q; got: %q", want, got)
- }
- if got, want := e.Details.RootCause[0].Type, "index_missing_exception"; got != want {
- t.Fatalf("expected root cause type %q; got: %q", want, got)
- }
- if got, want := e.Details.RootCause[0].Reason, "no such index"; got != want {
- t.Fatalf("expected root cause reason %q; got: %q", want, got)
- }
-}
-
-func TestResponseErrorHTML(t *testing.T) {
- raw := "HTTP/1.1 413 Request Entity Too Large\r\n" +
- "\r\n" +
- `<html>
-<head><title>413 Request Entity Too Large</title></head>
-<body bgcolor="white">
-<center><h1>413 Request Entity Too Large</h1></center>
-<hr><center>nginx/1.6.2</center>
-</body>
-</html>` + "\r\n"
- r := bufio.NewReader(strings.NewReader(raw))
-
- req, err := http.NewRequest("GET", "/", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := http.ReadResponse(r, nil)
- if err != nil {
- t.Fatal(err)
- }
- err = checkResponse(req, resp)
- if err == nil {
- t.Fatalf("expected error; got: %v", err)
- }
-
- // Check for correct error message
- expected := fmt.Sprintf("elastic: Error %d (%s)", http.StatusRequestEntityTooLarge, http.StatusText(http.StatusRequestEntityTooLarge))
- got := err.Error()
- if got != expected {
- t.Fatalf("expected %q; got: %q", expected, got)
- }
-}
-
-func TestResponseErrorWithIgnore(t *testing.T) {
- raw := "HTTP/1.1 404 Not Found\r\n" +
- "\r\n" +
- `{"some":"response"}` + "\r\n"
- r := bufio.NewReader(strings.NewReader(raw))
-
- req, err := http.NewRequest("HEAD", "/", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := http.ReadResponse(r, nil)
- if err != nil {
- t.Fatal(err)
- }
- err = checkResponse(req, resp)
- if err == nil {
- t.Fatalf("expected error; got: %v", err)
- }
- err = checkResponse(req, resp, 404) // ignore 404 errors
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
-}
-
-func TestIsNotFound(t *testing.T) {
- if got, want := IsNotFound(nil), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(""), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(200), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(404), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsNotFound(&Error{Status: 404}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(&Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsNotFound(Error{Status: 404}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsNotFound(&http.Response{StatusCode: 404}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsNotFound(&http.Response{StatusCode: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-}
-
-func TestIsTimeout(t *testing.T) {
- if got, want := IsTimeout(nil), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(""), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(200), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(408), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsTimeout(&Error{Status: 408}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(&Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsTimeout(Error{Status: 408}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsTimeout(&http.Response{StatusCode: 408}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsTimeout(&http.Response{StatusCode: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-}
-
-func TestIsConflict(t *testing.T) {
- if got, want := IsConflict(nil), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(""), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(200), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(http.StatusConflict), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsConflict(&Error{Status: 409}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(&Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsConflict(Error{Status: 409}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(Error{Status: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-
- if got, want := IsConflict(&http.Response{StatusCode: 409}), true; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
- if got, want := IsConflict(&http.Response{StatusCode: 200}), false; got != want {
- t.Errorf("expected %v; got: %v", want, got)
- }
-}
-
-func TestIsStatusCode(t *testing.T) {
- tests := []struct {
- Error interface{}
- Code int
- Want bool
- }{
- // #0
- {
- Error: nil,
- Code: 200,
- Want: false,
- },
- // #1
- {
- Error: "",
- Code: 200,
- Want: false,
- },
- // #2
- {
- Error: http.StatusConflict,
- Code: 409,
- Want: true,
- },
- // #3
- {
- Error: http.StatusConflict,
- Code: http.StatusInternalServerError,
- Want: false,
- },
- // #4
- {
- Error: &Error{Status: http.StatusConflict},
- Code: 409,
- Want: true,
- },
- // #5
- {
- Error: Error{Status: http.StatusConflict},
- Code: 409,
- Want: true,
- },
- // #6
- {
- Error: &http.Response{StatusCode: http.StatusConflict},
- Code: 409,
- Want: true,
- },
- }
-
- for i, tt := range tests {
- if have, want := IsStatusCode(tt.Error, tt.Code), tt.Want; have != want {
- t.Errorf("#%d: have %v, want %v", i, have, want)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/etc/elasticsearch.yml b/vendor/github.com/olivere/elastic/etc/elasticsearch.yml
deleted file mode 100644
index 9923cfe4f..000000000
--- a/vendor/github.com/olivere/elastic/etc/elasticsearch.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-# bootstrap.ignore_system_bootstrap_checks: true
-
-discovery.zen.minimum_master_nodes: 1
-
-network.host:
-- _local_
-- _site_
-
-network.publish_host: _local_
-
-
-# Enable scripting as described here: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
-script.inline: true
-script.stored: true
-script.file: true
diff --git a/vendor/github.com/olivere/elastic/etc/ingest-geoip/.gitkeep b/vendor/github.com/olivere/elastic/etc/ingest-geoip/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/olivere/elastic/etc/ingest-geoip/.gitkeep
+++ /dev/null
diff --git a/vendor/github.com/olivere/elastic/etc/jvm.options b/vendor/github.com/olivere/elastic/etc/jvm.options
deleted file mode 100644
index d97fbc9ec..000000000
--- a/vendor/github.com/olivere/elastic/etc/jvm.options
+++ /dev/null
@@ -1,100 +0,0 @@
-## JVM configuration
-
-################################################################
-## IMPORTANT: JVM heap size
-################################################################
-##
-## You should always set the min and max JVM heap
-## size to the same value. For example, to set
-## the heap to 4 GB, set:
-##
-## -Xms4g
-## -Xmx4g
-##
-## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
-## for more information
-##
-################################################################
-
-# Xms represents the initial size of total heap space
-# Xmx represents the maximum size of total heap space
-
--Xms2g
--Xmx2g
-
-################################################################
-## Expert settings
-################################################################
-##
-## All settings below this section are considered
-## expert settings. Don't tamper with them unless
-## you understand what you are doing
-##
-################################################################
-
-## GC configuration
--XX:+UseConcMarkSweepGC
--XX:CMSInitiatingOccupancyFraction=75
--XX:+UseCMSInitiatingOccupancyOnly
-
-## optimizations
-
-# disable calls to System#gc
--XX:+DisableExplicitGC
-
-# pre-touch memory pages used by the JVM during initialization
--XX:+AlwaysPreTouch
-
-## basic
-
-# force the server VM
--server
-
-# set to headless, just in case
--Djava.awt.headless=true
-
-# ensure UTF-8 encoding by default (e.g. filenames)
--Dfile.encoding=UTF-8
-
-# use our provided JNA always versus the system one
--Djna.nosys=true
-
-# flags to keep Netty from being unsafe
--Dio.netty.noUnsafe=true
--Dio.netty.noKeySetOptimization=true
-
-# log4j 2
--Dlog4j.shutdownHookEnabled=false
--Dlog4j2.disable.jmx=true
--Dlog4j.skipJansi=true
-
-## heap dumps
-
-# generate a heap dump when an allocation from the Java heap fails
-# heap dumps are created in the working directory of the JVM
--XX:+HeapDumpOnOutOfMemoryError
-
-# specify an alternative path for heap dumps
-# ensure the directory exists and has sufficient space
-#-XX:HeapDumpPath=${heap.dump.path}
-
-## GC logging
-
-#-XX:+PrintGCDetails
-#-XX:+PrintGCTimeStamps
-#-XX:+PrintGCDateStamps
-#-XX:+PrintClassHistogram
-#-XX:+PrintTenuringDistribution
-#-XX:+PrintGCApplicationStoppedTime
-
-# log GC status to a file with time stamps
-# ensure the directory exists
-#-Xloggc:${loggc}
-
-# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
-# If documents were already indexed with unquoted fields in a previous version
-# of Elasticsearch, some operations may throw errors.
-#
-# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
-# only for migration purposes.
-#-Delasticsearch.json.allow_unquoted_field_names=true
diff --git a/vendor/github.com/olivere/elastic/etc/log4j2.properties b/vendor/github.com/olivere/elastic/etc/log4j2.properties
deleted file mode 100644
index 9a3147f5a..000000000
--- a/vendor/github.com/olivere/elastic/etc/log4j2.properties
+++ /dev/null
@@ -1,74 +0,0 @@
-status = error
-
-# log action execution errors for easier debugging
-logger.action.name = org.elasticsearch.action
-logger.action.level = debug
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
-
-appender.rolling.type = RollingFile
-appender.rolling.name = rolling
-appender.rolling.fileName = ${sys:es.logs}.log
-appender.rolling.layout.type = PatternLayout
-appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.10000m%n
-appender.rolling.filePattern = ${sys:es.logs}-%d{yyyy-MM-dd}.log
-appender.rolling.policies.type = Policies
-appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
-appender.rolling.policies.time.interval = 1
-appender.rolling.policies.time.modulate = true
-
-rootLogger.level = info
-rootLogger.appenderRef.console.ref = console
-rootLogger.appenderRef.rolling.ref = rolling
-
-appender.deprecation_rolling.type = RollingFile
-appender.deprecation_rolling.name = deprecation_rolling
-appender.deprecation_rolling.fileName = ${sys:es.logs}_deprecation.log
-appender.deprecation_rolling.layout.type = PatternLayout
-appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.10000m%n
-appender.deprecation_rolling.filePattern = ${sys:es.logs}_deprecation-%i.log.gz
-appender.deprecation_rolling.policies.type = Policies
-appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
-appender.deprecation_rolling.policies.size.size = 1GB
-appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
-appender.deprecation_rolling.strategy.max = 4
-
-logger.deprecation.name = org.elasticsearch.deprecation
-logger.deprecation.level = warn
-logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
-logger.deprecation.additivity = false
-
-appender.index_search_slowlog_rolling.type = RollingFile
-appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
-appender.index_search_slowlog_rolling.fileName = ${sys:es.logs}_index_search_slowlog.log
-appender.index_search_slowlog_rolling.layout.type = PatternLayout
-appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.10000m%n
-appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs}_index_search_slowlog-%d{yyyy-MM-dd}.log
-appender.index_search_slowlog_rolling.policies.type = Policies
-appender.index_search_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
-appender.index_search_slowlog_rolling.policies.time.interval = 1
-appender.index_search_slowlog_rolling.policies.time.modulate = true
-
-logger.index_search_slowlog_rolling.name = index.search.slowlog
-logger.index_search_slowlog_rolling.level = trace
-logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
-logger.index_search_slowlog_rolling.additivity = false
-
-appender.index_indexing_slowlog_rolling.type = RollingFile
-appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
-appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs}_index_indexing_slowlog.log
-appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
-appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.10000m%n
-appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
-appender.index_indexing_slowlog_rolling.policies.type = Policies
-appender.index_indexing_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
-appender.index_indexing_slowlog_rolling.policies.time.interval = 1
-appender.index_indexing_slowlog_rolling.policies.time.modulate = true
-
-logger.index_indexing_slowlog.name = index.indexing.slowlog.index
-logger.index_indexing_slowlog.level = trace
-logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
-logger.index_indexing_slowlog.additivity = false
diff --git a/vendor/github.com/olivere/elastic/etc/scripts/.gitkeep b/vendor/github.com/olivere/elastic/etc/scripts/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/olivere/elastic/etc/scripts/.gitkeep
+++ /dev/null
diff --git a/vendor/github.com/olivere/elastic/example_test.go b/vendor/github.com/olivere/elastic/example_test.go
deleted file mode 100644
index 62dc15d89..000000000
--- a/vendor/github.com/olivere/elastic/example_test.go
+++ /dev/null
@@ -1,530 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic_test
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "log"
- "os"
- "reflect"
- "time"
-
- elastic "github.com/olivere/elastic"
-)
-
-type Tweet struct {
- User string `json:"user"`
- Message string `json:"message"`
- Retweets int `json:"retweets"`
- Image string `json:"image,omitempty"`
- Created time.Time `json:"created,omitempty"`
- Tags []string `json:"tags,omitempty"`
- Location string `json:"location,omitempty"`
- Suggest *elastic.SuggestField `json:"suggest_field,omitempty"`
-}
-
-func Example() {
- errorlog := log.New(os.Stdout, "APP ", log.LstdFlags)
-
- // Obtain a client. You can also provide your own HTTP client here.
- client, err := elastic.NewClient(elastic.SetErrorLog(errorlog))
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Trace request and response details like this
- //client.SetTracer(log.New(os.Stdout, "", 0))
-
- // Ping the Elasticsearch server to get e.g. the version number
- info, code, err := client.Ping("http://127.0.0.1:9200").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- fmt.Printf("Elasticsearch returned with code %d and version %s\n", code, info.Version.Number)
-
- // Getting the ES version number is quite common, so there's a shortcut
- esversion, err := client.ElasticsearchVersion("http://127.0.0.1:9200")
- if err != nil {
- // Handle error
- panic(err)
- }
- fmt.Printf("Elasticsearch version %s\n", esversion)
-
- // Use the IndexExists service to check if a specified index exists.
- exists, err := client.IndexExists("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if !exists {
- // Create a new index.
- mapping := `
-{
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "user":{
- "type":"keyword"
- },
- "message":{
- "type":"text",
- "store": true,
- "fielddata": true
- },
- "retweets":{
- "type":"long"
- },
- "tags":{
- "type":"keyword"
- },
- "location":{
- "type":"geo_point"
- },
- "suggest_field":{
- "type":"completion"
- }
- }
- }
- }
-}
-`
- createIndex, err := client.CreateIndex("twitter").Body(mapping).Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if !createIndex.Acknowledged {
- // Not acknowledged
- }
- }
-
- // Index a tweet (using JSON serialization)
- tweet1 := Tweet{User: "olivere", Message: "Take Five", Retweets: 0}
- put1, err := client.Index().
- Index("twitter").
- Type("doc").
- Id("1").
- BodyJson(tweet1).
- Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- fmt.Printf("Indexed tweet %s to index %s, type %s\n", put1.Id, put1.Index, put1.Type)
-
- // Index a second tweet (by string)
- tweet2 := `{"user" : "olivere", "message" : "It's a Raggy Waltz"}`
- put2, err := client.Index().
- Index("twitter").
- Type("doc").
- Id("2").
- BodyString(tweet2).
- Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- fmt.Printf("Indexed tweet %s to index %s, type %s\n", put2.Id, put2.Index, put2.Type)
-
- // Get tweet with specified ID
- get1, err := client.Get().
- Index("twitter").
- Type("doc").
- Id("1").
- Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if get1.Found {
- fmt.Printf("Got document %s in version %d from index %s, type %s\n", get1.Id, get1.Version, get1.Index, get1.Type)
- }
-
- // Flush to make sure the documents got written.
- _, err = client.Flush().Index("twitter").Do(context.Background())
- if err != nil {
- panic(err)
- }
-
- // Search with a term query
- termQuery := elastic.NewTermQuery("user", "olivere")
- searchResult, err := client.Search().
- Index("twitter"). // search in index "twitter"
- Query(termQuery). // specify the query
- Sort("user", true). // sort by "user" field, ascending
- From(0).Size(10). // take documents 0-9
- Pretty(true). // pretty print request and response JSON
- Do(context.Background()) // execute
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // searchResult is of type SearchResult and returns hits, suggestions,
- // and all kinds of other information from Elasticsearch.
- fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis)
-
- // Each is a convenience function that iterates over hits in a search result.
- // It makes sure you don't need to check for nil values in the response.
- // However, it ignores errors in serialization. If you want full control
- // over iterating the hits, see below.
- var ttyp Tweet
- for _, item := range searchResult.Each(reflect.TypeOf(ttyp)) {
- t := item.(Tweet)
- fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- // TotalHits is another convenience function that works even when something goes wrong.
- fmt.Printf("Found a total of %d tweets\n", searchResult.TotalHits())
-
- // Here's how you iterate through results with full control over each step.
- if searchResult.Hits.TotalHits > 0 {
- fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits)
-
- // Iterate through results
- for _, hit := range searchResult.Hits.Hits {
- // hit.Index contains the name of the index
-
- // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}).
- var t Tweet
- err := json.Unmarshal(*hit.Source, &t)
- if err != nil {
- // Deserialization failed
- }
-
- // Work with tweet
- fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- } else {
- // No hits
- fmt.Print("Found no tweets\n")
- }
-
- // Update a tweet by the update API of Elasticsearch.
- // We just increment the number of retweets.
- script := elastic.NewScript("ctx._source.retweets += params.num").Param("num", 1)
- update, err := client.Update().Index("twitter").Type("doc").Id("1").
- Script(script).
- Upsert(map[string]interface{}{"retweets": 0}).
- Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- fmt.Printf("New version of tweet %q is now %d", update.Id, update.Version)
-
- // ...
-
- // Delete an index.
- deleteIndex, err := client.DeleteIndex("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if !deleteIndex.Acknowledged {
- // Not acknowledged
- }
-}
-
-func ExampleClient_NewClient_default() {
- // Obtain a client to the Elasticsearch instance on http://127.0.0.1:9200.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- fmt.Printf("connection failed: %v\n", err)
- } else {
- fmt.Println("connected")
- }
- _ = client
- // Output:
- // connected
-}
-
-func ExampleClient_NewClient_cluster() {
- // Obtain a client for an Elasticsearch cluster of two nodes,
- // running on 10.0.1.1 and 10.0.1.2.
- client, err := elastic.NewClient(elastic.SetURL("http://10.0.1.1:9200", "http://10.0.1.2:9200"))
- if err != nil {
- // Handle error
- panic(err)
- }
- _ = client
-}
-
-func ExampleClient_NewClient_manyOptions() {
- // Obtain a client for an Elasticsearch cluster of two nodes,
- // running on 10.0.1.1 and 10.0.1.2. Do not run the sniffer.
- // Set the healthcheck interval to 10s. When requests fail,
- // retry 5 times. Print error messages to os.Stderr and informational
- // messages to os.Stdout.
- client, err := elastic.NewClient(
- elastic.SetURL("http://10.0.1.1:9200", "http://10.0.1.2:9200"),
- elastic.SetSniff(false),
- elastic.SetHealthcheckInterval(10*time.Second),
- elastic.SetMaxRetries(5),
- elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC ", log.LstdFlags)),
- elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags)))
- if err != nil {
- // Handle error
- panic(err)
- }
- _ = client
-}
-
-func ExampleIndexExistsService() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
- // Use the IndexExists service to check if the index "twitter" exists.
- exists, err := client.IndexExists("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if exists {
- // ...
- }
-}
-
-func ExampleCreateIndexService() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
- // Create a new index.
- createIndex, err := client.CreateIndex("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if !createIndex.Acknowledged {
- // Not acknowledged
- }
-}
-
-func ExampleDeleteIndexService() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
- // Delete an index.
- deleteIndex, err := client.DeleteIndex("twitter").Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- if !deleteIndex.Acknowledged {
- // Not acknowledged
- }
-}
-
-func ExampleSearchService() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Search with a term query
- termQuery := elastic.NewTermQuery("user", "olivere")
- searchResult, err := client.Search().
- Index("twitter"). // search in index "twitter"
- Query(termQuery). // specify the query
- Sort("user", true). // sort by "user" field, ascending
- From(0).Size(10). // take documents 0-9
- Pretty(true). // pretty print request and response JSON
- Do(context.Background()) // execute
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // searchResult is of type SearchResult and returns hits, suggestions,
- // and all kinds of other information from Elasticsearch.
- fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis)
-
- // Number of hits
- if searchResult.Hits.TotalHits > 0 {
- fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits)
-
- // Iterate through results
- for _, hit := range searchResult.Hits.Hits {
- // hit.Index contains the name of the index
-
- // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}).
- var t Tweet
- err := json.Unmarshal(*hit.Source, &t)
- if err != nil {
- // Deserialization failed
- }
-
- // Work with tweet
- fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- } else {
- // No hits
- fmt.Print("Found no tweets\n")
- }
-}
-
-func ExampleAggregations() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Create an aggregation for users and a sub-aggregation for a date histogram of tweets (per year).
- timeline := elastic.NewTermsAggregation().Field("user").Size(10).OrderByCountDesc()
- histogram := elastic.NewDateHistogramAggregation().Field("created").Interval("year")
- timeline = timeline.SubAggregation("history", histogram)
-
- // Search with a term query
- searchResult, err := client.Search().
- Index("twitter"). // search in index "twitter"
- Query(elastic.NewMatchAllQuery()). // return all results, but ...
- SearchType("count"). // ... do not return hits, just the count
- Aggregation("timeline", timeline). // add our aggregation to the query
- Pretty(true). // pretty print request and response JSON
- Do(context.Background()) // execute
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Access "timeline" aggregate in search result.
- agg, found := searchResult.Aggregations.Terms("timeline")
- if !found {
- log.Fatalf("we should have a terms aggregation called %q", "timeline")
- }
- for _, userBucket := range agg.Buckets {
- // Every bucket should have the user field as key.
- user := userBucket.Key
-
- // The sub-aggregation history should have the number of tweets per year.
- histogram, found := userBucket.DateHistogram("history")
- if found {
- for _, year := range histogram.Buckets {
- fmt.Printf("user %q has %d tweets in %q\n", user, year.DocCount, year.KeyAsString)
- }
- }
- }
-}
-
-func ExampleSearchResult() {
- client, err := elastic.NewClient()
- if err != nil {
- panic(err)
- }
-
- // Do a search
- searchResult, err := client.Search().Index("twitter").Query(elastic.NewMatchAllQuery()).Do(context.Background())
- if err != nil {
- panic(err)
- }
-
- // searchResult is of type SearchResult and returns hits, suggestions,
- // and all kinds of other information from Elasticsearch.
- fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis)
-
- // Each is a utility function that iterates over hits in a search result.
- // It makes sure you don't need to check for nil values in the response.
- // However, it ignores errors in serialization. If you want full control
- // over iterating the hits, see below.
- var ttyp Tweet
- for _, item := range searchResult.Each(reflect.TypeOf(ttyp)) {
- t := item.(Tweet)
- fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- fmt.Printf("Found a total of %d tweets\n", searchResult.TotalHits())
-
- // Here's how you iterate hits with full control.
- if searchResult.Hits.TotalHits > 0 {
- fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits)
-
- // Iterate through results
- for _, hit := range searchResult.Hits.Hits {
- // hit.Index contains the name of the index
-
- // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}).
- var t Tweet
- err := json.Unmarshal(*hit.Source, &t)
- if err != nil {
- // Deserialization failed
- }
-
- // Work with tweet
- fmt.Printf("Tweet by %s: %s\n", t.User, t.Message)
- }
- } else {
- // No hits
- fmt.Print("Found no tweets\n")
- }
-}
-
-func ExampleClusterHealthService() {
- client, err := elastic.NewClient()
- if err != nil {
- panic(err)
- }
-
- // Get cluster health
- res, err := client.ClusterHealth().Index("twitter").Do(context.Background())
- if err != nil {
- panic(err)
- }
- if res == nil {
- panic(err)
- }
- fmt.Printf("Cluster status is %q\n", res.Status)
-}
-
-func ExampleClusterHealthService_WaitForGreen() {
- client, err := elastic.NewClient()
- if err != nil {
- panic(err)
- }
-
- // Wait for status green
- res, err := client.ClusterHealth().WaitForStatus("green").Timeout("15s").Do(context.Background())
- if err != nil {
- panic(err)
- }
- if res.TimedOut {
- fmt.Printf("time out waiting for cluster status %q\n", "green")
- } else {
- fmt.Printf("cluster status is %q\n", res.Status)
- }
-}
-
-func ExampleClusterStateService() {
- client, err := elastic.NewClient()
- if err != nil {
- panic(err)
- }
-
- // Get cluster state
- res, err := client.ClusterState().Metric("version").Do(context.Background())
- if err != nil {
- panic(err)
- }
- fmt.Printf("Cluster %q has version %d", res.ClusterName, res.Version)
-}
diff --git a/vendor/github.com/olivere/elastic/exists.go b/vendor/github.com/olivere/elastic/exists.go
deleted file mode 100644
index ae5a88fa7..000000000
--- a/vendor/github.com/olivere/elastic/exists.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// ExistsService checks for the existence of a document using HEAD.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-get.html
-// for details.
-type ExistsService struct {
- client *Client
- pretty bool
- id string
- index string
- typ string
- preference string
- realtime *bool
- refresh string
- routing string
- parent string
-}
-
-// NewExistsService creates a new ExistsService.
-func NewExistsService(client *Client) *ExistsService {
- return &ExistsService{
- client: client,
- }
-}
-
-// Id is the document ID.
-func (s *ExistsService) Id(id string) *ExistsService {
- s.id = id
- return s
-}
-
-// Index is the name of the index.
-func (s *ExistsService) Index(index string) *ExistsService {
- s.index = index
- return s
-}
-
-// Type is the type of the document (use `_all` to fetch the first document
-// matching the ID across all types).
-func (s *ExistsService) Type(typ string) *ExistsService {
- s.typ = typ
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on (default: random).
-func (s *ExistsService) Preference(preference string) *ExistsService {
- s.preference = preference
- return s
-}
-
-// Realtime specifies whether to perform the operation in realtime or search mode.
-func (s *ExistsService) Realtime(realtime bool) *ExistsService {
- s.realtime = &realtime
- return s
-}
-
-// Refresh the shard containing the document before performing the operation.
-func (s *ExistsService) Refresh(refresh string) *ExistsService {
- s.refresh = refresh
- return s
-}
-
-// Routing is a specific routing value.
-func (s *ExistsService) Routing(routing string) *ExistsService {
- s.routing = routing
- return s
-}
-
-// Parent is the ID of the parent document.
-func (s *ExistsService) Parent(parent string) *ExistsService {
- s.parent = parent
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ExistsService) Pretty(pretty bool) *ExistsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ExistsService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
- "id": s.id,
- "index": s.index,
- "type": s.typ,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.realtime != nil {
- params.Set("realtime", fmt.Sprintf("%v", *s.realtime))
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ExistsService) Validate() error {
- var invalid []string
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *ExistsService) Do(ctx context.Context) (bool, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return false, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return false, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "HEAD",
- Path: path,
- Params: params,
- IgnoreErrors: []int{404},
- })
- if err != nil {
- return false, err
- }
-
- // Return operation response
- switch res.StatusCode {
- case http.StatusOK:
- return true, nil
- case http.StatusNotFound:
- return false, nil
- default:
- return false, fmt.Errorf("elastic: got HTTP code %d when it should have been either 200 or 404", res.StatusCode)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/exists_test.go b/vendor/github.com/olivere/elastic/exists_test.go
deleted file mode 100644
index 9b834223d..000000000
--- a/vendor/github.com/olivere/elastic/exists_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestExists(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- exists, err := client.Exists().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Fatal("expected document to exist")
- }
-}
-
-func TestExistsValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index -> fail with error
- res, err := NewExistsService(client).Type("doc").Id("1").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without index name")
- }
- if res != false {
- t.Fatalf("expected result to be false; got: %v", res)
- }
-
- // No type -> fail with error
- res, err = NewExistsService(client).Index(testIndexName).Id("1").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without index name")
- }
- if res != false {
- t.Fatalf("expected result to be false; got: %v", res)
- }
-
- // No id -> fail with error
- res, err = NewExistsService(client).Index(testIndexName).Type("doc").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Delete to fail without index name")
- }
- if res != false {
- t.Fatalf("expected result to be false; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/explain.go b/vendor/github.com/olivere/elastic/explain.go
deleted file mode 100644
index 2b975ad5d..000000000
--- a/vendor/github.com/olivere/elastic/explain.go
+++ /dev/null
@@ -1,326 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// ExplainService computes a score explanation for a query and
-// a specific document.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-explain.html.
-type ExplainService struct {
- client *Client
- pretty bool
- id string
- index string
- typ string
- q string
- routing string
- lenient *bool
- analyzer string
- df string
- fields []string
- lowercaseExpandedTerms *bool
- xSourceInclude []string
- analyzeWildcard *bool
- parent string
- preference string
- xSource []string
- defaultOperator string
- xSourceExclude []string
- source string
- bodyJson interface{}
- bodyString string
-}
-
-// NewExplainService creates a new ExplainService.
-func NewExplainService(client *Client) *ExplainService {
- return &ExplainService{
- client: client,
- xSource: make([]string, 0),
- xSourceExclude: make([]string, 0),
- fields: make([]string, 0),
- xSourceInclude: make([]string, 0),
- }
-}
-
-// Id is the document ID.
-func (s *ExplainService) Id(id string) *ExplainService {
- s.id = id
- return s
-}
-
-// Index is the name of the index.
-func (s *ExplainService) Index(index string) *ExplainService {
- s.index = index
- return s
-}
-
-// Type is the type of the document.
-func (s *ExplainService) Type(typ string) *ExplainService {
- s.typ = typ
- return s
-}
-
-// Source is the URL-encoded query definition (instead of using the request body).
-func (s *ExplainService) Source(source string) *ExplainService {
- s.source = source
- return s
-}
-
-// XSourceExclude is a list of fields to exclude from the returned _source field.
-func (s *ExplainService) XSourceExclude(xSourceExclude ...string) *ExplainService {
- s.xSourceExclude = append(s.xSourceExclude, xSourceExclude...)
- return s
-}
-
-// Lenient specifies whether format-based query failures
-// (such as providing text to a numeric field) should be ignored.
-func (s *ExplainService) Lenient(lenient bool) *ExplainService {
- s.lenient = &lenient
- return s
-}
-
-// Query in the Lucene query string syntax.
-func (s *ExplainService) Q(q string) *ExplainService {
- s.q = q
- return s
-}
-
-// Routing sets a specific routing value.
-func (s *ExplainService) Routing(routing string) *ExplainService {
- s.routing = routing
- return s
-}
-
-// AnalyzeWildcard specifies whether wildcards and prefix queries
-// in the query string query should be analyzed (default: false).
-func (s *ExplainService) AnalyzeWildcard(analyzeWildcard bool) *ExplainService {
- s.analyzeWildcard = &analyzeWildcard
- return s
-}
-
-// Analyzer is the analyzer for the query string query.
-func (s *ExplainService) Analyzer(analyzer string) *ExplainService {
- s.analyzer = analyzer
- return s
-}
-
-// Df is the default field for query string query (default: _all).
-func (s *ExplainService) Df(df string) *ExplainService {
- s.df = df
- return s
-}
-
-// Fields is a list of fields to return in the response.
-func (s *ExplainService) Fields(fields ...string) *ExplainService {
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// LowercaseExpandedTerms specifies whether query terms should be lowercased.
-func (s *ExplainService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *ExplainService {
- s.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return s
-}
-
-// XSourceInclude is a list of fields to extract and return from the _source field.
-func (s *ExplainService) XSourceInclude(xSourceInclude ...string) *ExplainService {
- s.xSourceInclude = append(s.xSourceInclude, xSourceInclude...)
- return s
-}
-
-// DefaultOperator is the default operator for query string query (AND or OR).
-func (s *ExplainService) DefaultOperator(defaultOperator string) *ExplainService {
- s.defaultOperator = defaultOperator
- return s
-}
-
-// Parent is the ID of the parent document.
-func (s *ExplainService) Parent(parent string) *ExplainService {
- s.parent = parent
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on (default: random).
-func (s *ExplainService) Preference(preference string) *ExplainService {
- s.preference = preference
- return s
-}
-
-// XSource is true or false to return the _source field or not, or a list of fields to return.
-func (s *ExplainService) XSource(xSource ...string) *ExplainService {
- s.xSource = append(s.xSource, xSource...)
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ExplainService) Pretty(pretty bool) *ExplainService {
- s.pretty = pretty
- return s
-}
-
-// Query sets a query definition using the Query DSL.
-func (s *ExplainService) Query(query Query) *ExplainService {
- src, err := query.Source()
- if err != nil {
- // Do nothing in case of an error
- return s
- }
- body := make(map[string]interface{})
- body["query"] = src
- s.bodyJson = body
- return s
-}
-
-// BodyJson sets the query definition using the Query DSL.
-func (s *ExplainService) BodyJson(body interface{}) *ExplainService {
- s.bodyJson = body
- return s
-}
-
-// BodyString sets the query definition using the Query DSL as a string.
-func (s *ExplainService) BodyString(body string) *ExplainService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ExplainService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/{type}/{id}/_explain", map[string]string{
- "id": s.id,
- "index": s.index,
- "type": s.typ,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.xSource) > 0 {
- params.Set("_source", strings.Join(s.xSource, ","))
- }
- if s.defaultOperator != "" {
- params.Set("default_operator", s.defaultOperator)
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.source != "" {
- params.Set("source", s.source)
- }
- if len(s.xSourceExclude) > 0 {
- params.Set("_source_exclude", strings.Join(s.xSourceExclude, ","))
- }
- if s.lenient != nil {
- params.Set("lenient", fmt.Sprintf("%v", *s.lenient))
- }
- if s.q != "" {
- params.Set("q", s.q)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- if s.lowercaseExpandedTerms != nil {
- params.Set("lowercase_expanded_terms", fmt.Sprintf("%v", *s.lowercaseExpandedTerms))
- }
- if len(s.xSourceInclude) > 0 {
- params.Set("_source_include", strings.Join(s.xSourceInclude, ","))
- }
- if s.analyzeWildcard != nil {
- params.Set("analyze_wildcard", fmt.Sprintf("%v", *s.analyzeWildcard))
- }
- if s.analyzer != "" {
- params.Set("analyzer", s.analyzer)
- }
- if s.df != "" {
- params.Set("df", s.df)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ExplainService) Validate() error {
- var invalid []string
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *ExplainService) Do(ctx context.Context) (*ExplainResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(ExplainResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// ExplainResponse is the response of ExplainService.Do.
-type ExplainResponse struct {
- Index string `json:"_index"`
- Type string `json:"_type"`
- Id string `json:"_id"`
- Matched bool `json:"matched"`
- Explanation map[string]interface{} `json:"explanation"`
-}
diff --git a/vendor/github.com/olivere/elastic/explain_test.go b/vendor/github.com/olivere/elastic/explain_test.go
deleted file mode 100644
index 22cb9668a..000000000
--- a/vendor/github.com/olivere/elastic/explain_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestExplain(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // Add a document
- indexResult, err := client.Index().
- Index(testIndexName).
- Type("doc").
- Id("1").
- BodyJson(&tweet1).
- Refresh("true").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexResult == nil {
- t.Errorf("expected result to be != nil; got: %v", indexResult)
- }
-
- // Explain
- query := NewTermQuery("user", "olivere")
- expl, err := client.Explain(testIndexName, "doc", "1").Query(query).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if expl == nil {
- t.Fatal("expected to return an explanation")
- }
- if !expl.Matched {
- t.Errorf("expected matched to be %v; got: %v", true, expl.Matched)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/fetch_source_context.go b/vendor/github.com/olivere/elastic/fetch_source_context.go
deleted file mode 100644
index 874c4c1da..000000000
--- a/vendor/github.com/olivere/elastic/fetch_source_context.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "net/url"
- "strings"
-)
-
-// FetchSourceContext enables source filtering, i.e. it allows control
-// over how the _source field is returned with every hit. It is used
-// with various endpoints, e.g. when searching for documents, retrieving
-// individual documents, or even updating documents.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-source-filtering.html
-// for details.
-type FetchSourceContext struct {
- fetchSource bool
- includes []string
- excludes []string
-}
-
-// NewFetchSourceContext returns a new FetchSourceContext.
-func NewFetchSourceContext(fetchSource bool) *FetchSourceContext {
- return &FetchSourceContext{
- fetchSource: fetchSource,
- includes: make([]string, 0),
- excludes: make([]string, 0),
- }
-}
-
-// FetchSource indicates whether to return the _source.
-func (fsc *FetchSourceContext) FetchSource() bool {
- return fsc.fetchSource
-}
-
-// SetFetchSource specifies whether to return the _source.
-func (fsc *FetchSourceContext) SetFetchSource(fetchSource bool) {
- fsc.fetchSource = fetchSource
-}
-
-// Include indicates to return specific parts of the _source.
-// Wildcards are allowed here.
-func (fsc *FetchSourceContext) Include(includes ...string) *FetchSourceContext {
- fsc.includes = append(fsc.includes, includes...)
- return fsc
-}
-
-// Exclude indicates to exclude specific parts of the _source.
-// Wildcards are allowed here.
-func (fsc *FetchSourceContext) Exclude(excludes ...string) *FetchSourceContext {
- fsc.excludes = append(fsc.excludes, excludes...)
- return fsc
-}
-
-// Source returns the JSON-serializable data to be used in a body.
-func (fsc *FetchSourceContext) Source() (interface{}, error) {
- if !fsc.fetchSource {
- return false, nil
- }
- if len(fsc.includes) == 0 && len(fsc.excludes) == 0 {
- return true, nil
- }
- src := make(map[string]interface{})
- if len(fsc.includes) > 0 {
- src["includes"] = fsc.includes
- }
- if len(fsc.excludes) > 0 {
- src["excludes"] = fsc.excludes
- }
- return src, nil
-}
-
-// Query returns the parameters in a form suitable for a URL query string.
-func (fsc *FetchSourceContext) Query() url.Values {
- params := url.Values{}
- if fsc.fetchSource {
- if len(fsc.includes) > 0 {
- params.Add("_source_include", strings.Join(fsc.includes, ","))
- }
- if len(fsc.excludes) > 0 {
- params.Add("_source_exclude", strings.Join(fsc.excludes, ","))
- }
- } else {
- params.Add("_source", "false")
- }
- return params
-}
diff --git a/vendor/github.com/olivere/elastic/fetch_source_context_test.go b/vendor/github.com/olivere/elastic/fetch_source_context_test.go
deleted file mode 100644
index b98549036..000000000
--- a/vendor/github.com/olivere/elastic/fetch_source_context_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestFetchSourceContextNoFetchSource(t *testing.T) {
- builder := NewFetchSourceContext(false)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `false`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFetchSourceContextNoFetchSourceIgnoreIncludesAndExcludes(t *testing.T) {
- builder := NewFetchSourceContext(false).Include("a", "b").Exclude("c")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `false`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFetchSourceContextFetchSource(t *testing.T) {
- builder := NewFetchSourceContext(true)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `true`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFetchSourceContextFetchSourceWithIncludesOnly(t *testing.T) {
- builder := NewFetchSourceContext(true).Include("a", "b")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"includes":["a","b"]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFetchSourceContextFetchSourceWithIncludesAndExcludes(t *testing.T) {
- builder := NewFetchSourceContext(true).Include("a", "b").Exclude("c")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"excludes":["c"],"includes":["a","b"]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFetchSourceContextQueryDefaults(t *testing.T) {
- builder := NewFetchSourceContext(true)
- values := builder.Query()
- got := values.Encode()
- expected := ""
- if got != expected {
- t.Errorf("expected %q; got: %q", expected, got)
- }
-}
-
-func TestFetchSourceContextQueryNoFetchSource(t *testing.T) {
- builder := NewFetchSourceContext(false)
- values := builder.Query()
- got := values.Encode()
- expected := "_source=false"
- if got != expected {
- t.Errorf("expected %q; got: %q", expected, got)
- }
-}
-
-func TestFetchSourceContextQueryFetchSourceWithIncludesAndExcludes(t *testing.T) {
- builder := NewFetchSourceContext(true).Include("a", "b").Exclude("c")
- values := builder.Query()
- got := values.Encode()
- expected := "_source_exclude=c&_source_include=a%2Cb"
- if got != expected {
- t.Errorf("expected %q; got: %q", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/field_caps.go b/vendor/github.com/olivere/elastic/field_caps.go
deleted file mode 100644
index 393cd3ce8..000000000
--- a/vendor/github.com/olivere/elastic/field_caps.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// FieldCapsService allows retrieving the capabilities of fields among multiple indices.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-field-caps.html
-// for details
-type FieldCapsService struct {
- client *Client
- pretty bool
- index []string
- allowNoIndices *bool
- expandWildcards string
- fields []string
- ignoreUnavailable *bool
- bodyJson interface{}
- bodyString string
-}
-
-// NewFieldCapsService creates a new FieldCapsService
-func NewFieldCapsService(client *Client) *FieldCapsService {
- return &FieldCapsService{
- client: client,
- }
-}
-
-// Index is a list of index names; use `_all` or empty string to perform
-// the operation on all indices.
-func (s *FieldCapsService) Index(index ...string) *FieldCapsService {
- s.index = append(s.index, index...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices expression
-// resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *FieldCapsService) AllowNoIndices(allowNoIndices bool) *FieldCapsService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *FieldCapsService) ExpandWildcards(expandWildcards string) *FieldCapsService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Fields is a list of fields for to get field capabilities.
-func (s *FieldCapsService) Fields(fields ...string) *FieldCapsService {
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// IgnoreUnavailable is documented as: Whether specified concrete indices should be ignored when unavailable (missing or closed).
-func (s *FieldCapsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldCapsService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *FieldCapsService) Pretty(pretty bool) *FieldCapsService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is documented as: Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds.
-func (s *FieldCapsService) BodyJson(body interface{}) *FieldCapsService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds.
-func (s *FieldCapsService) BodyString(body string) *FieldCapsService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *FieldCapsService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_field_caps", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_field_caps"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *FieldCapsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *FieldCapsService) Do(ctx context.Context) (*FieldCapsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- IgnoreErrors: []int{http.StatusNotFound},
- })
- if err != nil {
- return nil, err
- }
-
- // TODO(oe): Is 404 really a valid response here?
- if res.StatusCode == http.StatusNotFound {
- return &FieldCapsResponse{}, nil
- }
-
- // Return operation response
- ret := new(FieldCapsResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Request --
-
-// FieldCapsRequest can be used to set up the body to be used in the
-// Field Capabilities API.
-type FieldCapsRequest struct {
- Fields []string `json:"fields"`
-}
-
-// -- Response --
-
-// FieldCapsResponse contains field capabilities.
-type FieldCapsResponse struct {
- Fields map[string]FieldCaps `json:"fields,omitempty"`
-}
-
-// FieldCaps contains capabilities of an individual field.
-type FieldCaps struct {
- Type string `json:"type"`
- Searchable bool `json:"searchable"`
- Aggregatable bool `json:"aggregatable"`
- Indices []string `json:"indices,omitempty"`
- NonSearchableIndices []string `json:"non_searchable_indices,omitempty"`
- NonAggregatableIndices []string `json:"non_aggregatable_indices,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/field_caps_test.go b/vendor/github.com/olivere/elastic/field_caps_test.go
deleted file mode 100644
index e299fd516..000000000
--- a/vendor/github.com/olivere/elastic/field_caps_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "net/url"
- "reflect"
- "sort"
- "testing"
-)
-
-func TestFieldCapsURLs(t *testing.T) {
- tests := []struct {
- Service *FieldCapsService
- ExpectedPath string
- ExpectedParams url.Values
- }{
- {
- Service: &FieldCapsService{},
- ExpectedPath: "/_field_caps",
- ExpectedParams: url.Values{},
- },
- {
- Service: &FieldCapsService{
- index: []string{"index1", "index2"},
- },
- ExpectedPath: "/index1%2Cindex2/_field_caps",
- ExpectedParams: url.Values{},
- },
- {
- Service: &FieldCapsService{
- index: []string{"index_*"},
- pretty: true,
- },
- ExpectedPath: "/index_%2A/_field_caps",
- ExpectedParams: url.Values{"pretty": []string{"true"}},
- },
- }
-
- for _, test := range tests {
- gotPath, gotParams, err := test.Service.buildURL()
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if gotPath != test.ExpectedPath {
- t.Errorf("expected URL path = %q; got: %q", test.ExpectedPath, gotPath)
- }
- if gotParams.Encode() != test.ExpectedParams.Encode() {
- t.Errorf("expected URL params = %v; got: %v", test.ExpectedParams, gotParams)
- }
- }
-}
-
-func TestFieldCapsRequestSerialize(t *testing.T) {
- req := &FieldCapsRequest{
- Fields: []string{"creation_date", "answer_count"},
- }
- data, err := json.Marshal(req)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fields":["creation_date","answer_count"]}`
- if got != expected {
- t.Fatalf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldCapsRequestDeserialize(t *testing.T) {
- body := `{
- "fields" : ["creation_date", "answer_count"]
- }`
-
- var request FieldCapsRequest
- if err := json.Unmarshal([]byte(body), &request); err != nil {
- t.Fatalf("unexpected error during unmarshalling: %v", err)
- }
-
- sort.Sort(lexicographically{request.Fields})
-
- expectedFields := []string{"answer_count", "creation_date"}
- if !reflect.DeepEqual(request.Fields, expectedFields) {
- t.Fatalf("expected fields to be %v, got %v", expectedFields, request.Fields)
- }
-}
-
-func TestFieldCapsResponseUnmarshalling(t *testing.T) {
- clusterStats := `{
- "_shards": {
- "total": 1,
- "successful": 1,
- "failed": 0
- },
- "fields": {
- "creation_date": {
- "type": "date",
- "searchable": true,
- "aggregatable": true,
- "indices": ["index1", "index2"],
- "non_searchable_indices": null,
- "non_aggregatable_indices": null
- },
- "answer": {
- "type": "keyword",
- "searchable": true,
- "aggregatable": true
- }
- }
- }`
-
- var resp FieldCapsResponse
- if err := json.Unmarshal([]byte(clusterStats), &resp); err != nil {
- t.Errorf("unexpected error during unmarshalling: %v", err)
- }
-
- caps, ok := resp.Fields["creation_date"]
- if !ok {
- t.Errorf("expected creation_date to be in the fields map, didn't find it")
- }
- if want, have := true, caps.Searchable; want != have {
- t.Errorf("expected creation_date searchable to be %v, got %v", want, have)
- }
- if want, have := true, caps.Aggregatable; want != have {
- t.Errorf("expected creation_date aggregatable to be %v, got %v", want, have)
- }
- if want, have := []string{"index1", "index2"}, caps.Indices; !reflect.DeepEqual(want, have) {
- t.Errorf("expected creation_date indices to be %v, got %v", want, have)
- }
-}
-
-func TestFieldCaps123(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
- // client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- res, err := client.FieldCaps("_all").Fields("user", "message", "retweets", "created").Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if res == nil {
- t.Fatalf("expected response; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/geo_point.go b/vendor/github.com/olivere/elastic/geo_point.go
deleted file mode 100644
index fb243671d..000000000
--- a/vendor/github.com/olivere/elastic/geo_point.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
- "strconv"
- "strings"
-)
-
-// GeoPoint is a geographic position described via latitude and longitude.
-type GeoPoint struct {
- Lat float64 `json:"lat"`
- Lon float64 `json:"lon"`
-}
-
-// Source returns the object to be serialized in Elasticsearch DSL.
-func (pt *GeoPoint) Source() map[string]float64 {
- return map[string]float64{
- "lat": pt.Lat,
- "lon": pt.Lon,
- }
-}
-
-// GeoPointFromLatLon initializes a new GeoPoint by latitude and longitude.
-func GeoPointFromLatLon(lat, lon float64) *GeoPoint {
- return &GeoPoint{Lat: lat, Lon: lon}
-}
-
-// GeoPointFromString initializes a new GeoPoint by a string that is
-// formatted as "{latitude},{longitude}", e.g. "40.10210,-70.12091".
-func GeoPointFromString(latLon string) (*GeoPoint, error) {
- latlon := strings.SplitN(latLon, ",", 2)
- if len(latlon) != 2 {
- return nil, fmt.Errorf("elastic: %s is not a valid geo point string", latLon)
- }
- lat, err := strconv.ParseFloat(latlon[0], 64)
- if err != nil {
- return nil, err
- }
- lon, err := strconv.ParseFloat(latlon[1], 64)
- if err != nil {
- return nil, err
- }
- return &GeoPoint{Lat: lat, Lon: lon}, nil
-}
diff --git a/vendor/github.com/olivere/elastic/geo_point_test.go b/vendor/github.com/olivere/elastic/geo_point_test.go
deleted file mode 100644
index 1d085cd38..000000000
--- a/vendor/github.com/olivere/elastic/geo_point_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoPointSource(t *testing.T) {
- pt := GeoPoint{Lat: 40, Lon: -70}
-
- data, err := json.Marshal(pt.Source())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"lat":40,"lon":-70}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/get.go b/vendor/github.com/olivere/elastic/get.go
deleted file mode 100644
index efcc748bb..000000000
--- a/vendor/github.com/olivere/elastic/get.go
+++ /dev/null
@@ -1,260 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// GetService allows to get a typed JSON document from the index based
-// on its id.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-get.html
-// for details.
-type GetService struct {
- client *Client
- pretty bool
- index string
- typ string
- id string
- routing string
- preference string
- storedFields []string
- refresh string
- realtime *bool
- fsc *FetchSourceContext
- version interface{}
- versionType string
- parent string
- ignoreErrorsOnGeneratedFields *bool
-}
-
-// NewGetService creates a new GetService.
-func NewGetService(client *Client) *GetService {
- return &GetService{
- client: client,
- typ: "_all",
- }
-}
-
-// Index is the name of the index.
-func (s *GetService) Index(index string) *GetService {
- s.index = index
- return s
-}
-
-// Type is the type of the document (use `_all` to fetch the first document
-// matching the ID across all types).
-func (s *GetService) Type(typ string) *GetService {
- s.typ = typ
- return s
-}
-
-// Id is the document ID.
-func (s *GetService) Id(id string) *GetService {
- s.id = id
- return s
-}
-
-// Parent is the ID of the parent document.
-func (s *GetService) Parent(parent string) *GetService {
- s.parent = parent
- return s
-}
-
-// Routing is the specific routing value.
-func (s *GetService) Routing(routing string) *GetService {
- s.routing = routing
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on (default: random).
-func (s *GetService) Preference(preference string) *GetService {
- s.preference = preference
- return s
-}
-
-// StoredFields is a list of fields to return in the response.
-func (s *GetService) StoredFields(storedFields ...string) *GetService {
- s.storedFields = append(s.storedFields, storedFields...)
- return s
-}
-
-func (s *GetService) FetchSource(fetchSource bool) *GetService {
- if s.fsc == nil {
- s.fsc = NewFetchSourceContext(fetchSource)
- } else {
- s.fsc.SetFetchSource(fetchSource)
- }
- return s
-}
-
-func (s *GetService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *GetService {
- s.fsc = fetchSourceContext
- return s
-}
-
-// Refresh the shard containing the document before performing the operation.
-func (s *GetService) Refresh(refresh string) *GetService {
- s.refresh = refresh
- return s
-}
-
-// Realtime specifies whether to perform the operation in realtime or search mode.
-func (s *GetService) Realtime(realtime bool) *GetService {
- s.realtime = &realtime
- return s
-}
-
-// VersionType is the specific version type.
-func (s *GetService) VersionType(versionType string) *GetService {
- s.versionType = versionType
- return s
-}
-
-// Version is an explicit version number for concurrency control.
-func (s *GetService) Version(version interface{}) *GetService {
- s.version = version
- return s
-}
-
-// IgnoreErrorsOnGeneratedFields indicates whether to ignore fields that
-// are generated if the transaction log is accessed.
-func (s *GetService) IgnoreErrorsOnGeneratedFields(ignore bool) *GetService {
- s.ignoreErrorsOnGeneratedFields = &ignore
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *GetService) Pretty(pretty bool) *GetService {
- s.pretty = pretty
- return s
-}
-
-// Validate checks if the operation is valid.
-func (s *GetService) Validate() error {
- var invalid []string
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// buildURL builds the URL for the operation.
-func (s *GetService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
- "id": s.id,
- "index": s.index,
- "type": s.typ,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if len(s.storedFields) > 0 {
- params.Set("stored_fields", strings.Join(s.storedFields, ","))
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", s.version))
- }
- if s.versionType != "" {
- params.Set("version_type", s.versionType)
- }
- if s.realtime != nil {
- params.Set("realtime", fmt.Sprintf("%v", *s.realtime))
- }
- if s.ignoreErrorsOnGeneratedFields != nil {
- params.Add("ignore_errors_on_generated_fields", fmt.Sprintf("%v", *s.ignoreErrorsOnGeneratedFields))
- }
- if s.fsc != nil {
- for k, values := range s.fsc.Query() {
- params.Add(k, strings.Join(values, ","))
- }
- }
- return path, params, nil
-}
-
-// Do executes the operation.
-func (s *GetService) Do(ctx context.Context) (*GetResult, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(GetResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of a get request.
-
-// GetResult is the outcome of GetService.Do.
-type GetResult struct {
- Index string `json:"_index"` // index meta field
- Type string `json:"_type"` // type meta field
- Id string `json:"_id"` // id meta field
- Uid string `json:"_uid"` // uid meta field (see MapperService.java for all meta fields)
- Routing string `json:"_routing"` // routing meta field
- Parent string `json:"_parent"` // parent meta field
- Version *int64 `json:"_version"` // version number, when Version is set to true in SearchService
- Source *json.RawMessage `json:"_source,omitempty"`
- Found bool `json:"found,omitempty"`
- Fields map[string]interface{} `json:"fields,omitempty"`
- //Error string `json:"error,omitempty"` // used only in MultiGet
- // TODO double-check that MultiGet now returns details error information
- Error *ErrorDetails `json:"error,omitempty"` // only used in MultiGet
-}
diff --git a/vendor/github.com/olivere/elastic/get_test.go b/vendor/github.com/olivere/elastic/get_test.go
deleted file mode 100644
index f9504bdbf..000000000
--- a/vendor/github.com/olivere/elastic/get_test.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestGet(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Get document 1
- res, err := client.Get().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Found != true {
- t.Errorf("expected Found = true; got %v", res.Found)
- }
- if res.Source == nil {
- t.Errorf("expected Source != nil; got %v", res.Source)
- }
-
- // Get non existent document 99
- res, err = client.Get().Index(testIndexName).Type("doc").Id("99").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected error; got: %v", err)
- }
- if !IsNotFound(err) {
- t.Errorf("expected NotFound error; got: %v", err)
- }
- if res != nil {
- t.Errorf("expected no response; got: %v", res)
- }
-}
-
-func TestGetWithSourceFiltering(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Get document 1, without source
- res, err := client.Get().Index(testIndexName).Type("doc").Id("1").FetchSource(false).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Found != true {
- t.Errorf("expected Found = true; got %v", res.Found)
- }
- if res.Source != nil {
- t.Errorf("expected Source == nil; got %v", res.Source)
- }
-
- // Get document 1, exclude Message field
- fsc := NewFetchSourceContext(true).Exclude("message")
- res, err = client.Get().Index(testIndexName).Type("doc").Id("1").FetchSourceContext(fsc).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Found != true {
- t.Errorf("expected Found = true; got %v", res.Found)
- }
- if res.Source == nil {
- t.Errorf("expected Source != nil; got %v", res.Source)
- }
- var tw tweet
- err = json.Unmarshal(*res.Source, &tw)
- if err != nil {
- t.Fatal(err)
- }
- if tw.User != "olivere" {
- t.Errorf("expected user %q; got: %q", "olivere", tw.User)
- }
- if tw.Message != "" {
- t.Errorf("expected message %q; got: %q", "", tw.Message)
- }
-}
-
-func TestGetWithFields(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Get document 1, specifying fields
- res, err := client.Get().Index(testIndexName).Type("doc").Id("1").StoredFields("message").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Found != true {
- t.Errorf("expected Found = true; got: %v", res.Found)
- }
-
- // We must NOT have the "user" field
- _, ok := res.Fields["user"]
- if ok {
- t.Fatalf("expected no field %q in document", "user")
- }
-
- // We must have the "message" field
- messageField, ok := res.Fields["message"]
- if !ok {
- t.Fatalf("expected field %q in document", "message")
- }
-
- // Depending on the version of elasticsearch the message field will be returned
- // as a string or a slice of strings. This test works in both cases.
-
- messageString, ok := messageField.(string)
- if !ok {
- messageArray, ok := messageField.([]interface{})
- if !ok {
- t.Fatalf("expected field %q to be a string or a slice of strings; got: %T", "message", messageField)
- } else {
- messageString, ok = messageArray[0].(string)
- if !ok {
- t.Fatalf("expected field %q to be a string or a slice of strings; got: %T", "message", messageField)
- }
- }
- }
-
- if messageString != tweet1.Message {
- t.Errorf("expected message %q; got: %q", tweet1.Message, messageString)
- }
-}
-
-func TestGetValidate(t *testing.T) {
- // Mitigate against http://stackoverflow.com/questions/27491738/elasticsearch-go-index-failures-no-feature-for-name
- client := setupTestClientAndCreateIndex(t)
-
- if _, err := client.Get().Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
- if _, err := client.Get().Index(testIndexName).Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
- if _, err := client.Get().Type("doc").Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
- if _, err := client.Get().Id("1").Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
- if _, err := client.Get().Index(testIndexName).Type("doc").Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
- if _, err := client.Get().Type("doc").Id("1").Do(context.TODO()); err == nil {
- t.Fatal("expected Get to fail")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/highlight.go b/vendor/github.com/olivere/elastic/highlight.go
deleted file mode 100644
index 6d8d2ba63..000000000
--- a/vendor/github.com/olivere/elastic/highlight.go
+++ /dev/null
@@ -1,469 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// Highlight allows highlighting search results on one or more fields.
-// For details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-highlighting.html
-type Highlight struct {
- fields []*HighlighterField
- tagsSchema *string
- highlightFilter *bool
- fragmentSize *int
- numOfFragments *int
- preTags []string
- postTags []string
- order *string
- encoder *string
- requireFieldMatch *bool
- boundaryMaxScan *int
- boundaryChars *string
- boundaryScannerType *string
- boundaryScannerLocale *string
- highlighterType *string
- fragmenter *string
- highlightQuery Query
- noMatchSize *int
- phraseLimit *int
- options map[string]interface{}
- forceSource *bool
- useExplicitFieldOrder bool
-}
-
-func NewHighlight() *Highlight {
- hl := &Highlight{
- options: make(map[string]interface{}),
- }
- return hl
-}
-
-func (hl *Highlight) Fields(fields ...*HighlighterField) *Highlight {
- hl.fields = append(hl.fields, fields...)
- return hl
-}
-
-func (hl *Highlight) Field(name string) *Highlight {
- field := NewHighlighterField(name)
- hl.fields = append(hl.fields, field)
- return hl
-}
-
-func (hl *Highlight) TagsSchema(schemaName string) *Highlight {
- hl.tagsSchema = &schemaName
- return hl
-}
-
-func (hl *Highlight) HighlightFilter(highlightFilter bool) *Highlight {
- hl.highlightFilter = &highlightFilter
- return hl
-}
-
-func (hl *Highlight) FragmentSize(fragmentSize int) *Highlight {
- hl.fragmentSize = &fragmentSize
- return hl
-}
-
-func (hl *Highlight) NumOfFragments(numOfFragments int) *Highlight {
- hl.numOfFragments = &numOfFragments
- return hl
-}
-
-func (hl *Highlight) Encoder(encoder string) *Highlight {
- hl.encoder = &encoder
- return hl
-}
-
-func (hl *Highlight) PreTags(preTags ...string) *Highlight {
- hl.preTags = append(hl.preTags, preTags...)
- return hl
-}
-
-func (hl *Highlight) PostTags(postTags ...string) *Highlight {
- hl.postTags = append(hl.postTags, postTags...)
- return hl
-}
-
-func (hl *Highlight) Order(order string) *Highlight {
- hl.order = &order
- return hl
-}
-
-func (hl *Highlight) RequireFieldMatch(requireFieldMatch bool) *Highlight {
- hl.requireFieldMatch = &requireFieldMatch
- return hl
-}
-
-func (hl *Highlight) BoundaryMaxScan(boundaryMaxScan int) *Highlight {
- hl.boundaryMaxScan = &boundaryMaxScan
- return hl
-}
-
-func (hl *Highlight) BoundaryChars(boundaryChars string) *Highlight {
- hl.boundaryChars = &boundaryChars
- return hl
-}
-
-func (hl *Highlight) BoundaryScannerType(boundaryScannerType string) *Highlight {
- hl.boundaryScannerType = &boundaryScannerType
- return hl
-}
-
-func (hl *Highlight) BoundaryScannerLocale(boundaryScannerLocale string) *Highlight {
- hl.boundaryScannerLocale = &boundaryScannerLocale
- return hl
-}
-
-func (hl *Highlight) HighlighterType(highlighterType string) *Highlight {
- hl.highlighterType = &highlighterType
- return hl
-}
-
-func (hl *Highlight) Fragmenter(fragmenter string) *Highlight {
- hl.fragmenter = &fragmenter
- return hl
-}
-
-func (hl *Highlight) HighlighQuery(highlightQuery Query) *Highlight {
- hl.highlightQuery = highlightQuery
- return hl
-}
-
-func (hl *Highlight) NoMatchSize(noMatchSize int) *Highlight {
- hl.noMatchSize = &noMatchSize
- return hl
-}
-
-func (hl *Highlight) Options(options map[string]interface{}) *Highlight {
- hl.options = options
- return hl
-}
-
-func (hl *Highlight) ForceSource(forceSource bool) *Highlight {
- hl.forceSource = &forceSource
- return hl
-}
-
-func (hl *Highlight) UseExplicitFieldOrder(useExplicitFieldOrder bool) *Highlight {
- hl.useExplicitFieldOrder = useExplicitFieldOrder
- return hl
-}
-
-// Creates the query source for the bool query.
-func (hl *Highlight) Source() (interface{}, error) {
- // Returns the map inside of "highlight":
- // "highlight":{
- // ... this ...
- // }
- source := make(map[string]interface{})
- if hl.tagsSchema != nil {
- source["tags_schema"] = *hl.tagsSchema
- }
- if hl.preTags != nil && len(hl.preTags) > 0 {
- source["pre_tags"] = hl.preTags
- }
- if hl.postTags != nil && len(hl.postTags) > 0 {
- source["post_tags"] = hl.postTags
- }
- if hl.order != nil {
- source["order"] = *hl.order
- }
- if hl.highlightFilter != nil {
- source["highlight_filter"] = *hl.highlightFilter
- }
- if hl.fragmentSize != nil {
- source["fragment_size"] = *hl.fragmentSize
- }
- if hl.numOfFragments != nil {
- source["number_of_fragments"] = *hl.numOfFragments
- }
- if hl.encoder != nil {
- source["encoder"] = *hl.encoder
- }
- if hl.requireFieldMatch != nil {
- source["require_field_match"] = *hl.requireFieldMatch
- }
- if hl.boundaryMaxScan != nil {
- source["boundary_max_scan"] = *hl.boundaryMaxScan
- }
- if hl.boundaryChars != nil {
- source["boundary_chars"] = *hl.boundaryChars
- }
- if hl.boundaryScannerType != nil {
- source["boundary_scanner"] = *hl.boundaryScannerType
- }
- if hl.boundaryScannerLocale != nil {
- source["boundary_scanner_locale"] = *hl.boundaryScannerLocale
- }
- if hl.highlighterType != nil {
- source["type"] = *hl.highlighterType
- }
- if hl.fragmenter != nil {
- source["fragmenter"] = *hl.fragmenter
- }
- if hl.highlightQuery != nil {
- src, err := hl.highlightQuery.Source()
- if err != nil {
- return nil, err
- }
- source["highlight_query"] = src
- }
- if hl.noMatchSize != nil {
- source["no_match_size"] = *hl.noMatchSize
- }
- if hl.phraseLimit != nil {
- source["phrase_limit"] = *hl.phraseLimit
- }
- if hl.options != nil && len(hl.options) > 0 {
- source["options"] = hl.options
- }
- if hl.forceSource != nil {
- source["force_source"] = *hl.forceSource
- }
-
- if hl.fields != nil && len(hl.fields) > 0 {
- if hl.useExplicitFieldOrder {
- // Use a slice for the fields
- var fields []map[string]interface{}
- for _, field := range hl.fields {
- src, err := field.Source()
- if err != nil {
- return nil, err
- }
- fmap := make(map[string]interface{})
- fmap[field.Name] = src
- fields = append(fields, fmap)
- }
- source["fields"] = fields
- } else {
- // Use a map for the fields
- fields := make(map[string]interface{}, 0)
- for _, field := range hl.fields {
- src, err := field.Source()
- if err != nil {
- return nil, err
- }
- fields[field.Name] = src
- }
- source["fields"] = fields
- }
- }
-
- return source, nil
-}
-
-// HighlighterField specifies a highlighted field.
-type HighlighterField struct {
- Name string
-
- preTags []string
- postTags []string
- fragmentSize int
- fragmentOffset int
- numOfFragments int
- highlightFilter *bool
- order *string
- requireFieldMatch *bool
- boundaryMaxScan int
- boundaryChars []rune
- highlighterType *string
- fragmenter *string
- highlightQuery Query
- noMatchSize *int
- matchedFields []string
- phraseLimit *int
- options map[string]interface{}
- forceSource *bool
-
- /*
- Name string
- preTags []string
- postTags []string
- fragmentSize int
- numOfFragments int
- fragmentOffset int
- highlightFilter *bool
- order string
- requireFieldMatch *bool
- boundaryMaxScan int
- boundaryChars []rune
- highlighterType string
- fragmenter string
- highlightQuery Query
- noMatchSize *int
- matchedFields []string
- options map[string]interface{}
- forceSource *bool
- */
-}
-
-func NewHighlighterField(name string) *HighlighterField {
- return &HighlighterField{
- Name: name,
- preTags: make([]string, 0),
- postTags: make([]string, 0),
- fragmentSize: -1,
- fragmentOffset: -1,
- numOfFragments: -1,
- boundaryMaxScan: -1,
- boundaryChars: make([]rune, 0),
- matchedFields: make([]string, 0),
- options: make(map[string]interface{}),
- }
-}
-
-func (f *HighlighterField) PreTags(preTags ...string) *HighlighterField {
- f.preTags = append(f.preTags, preTags...)
- return f
-}
-
-func (f *HighlighterField) PostTags(postTags ...string) *HighlighterField {
- f.postTags = append(f.postTags, postTags...)
- return f
-}
-
-func (f *HighlighterField) FragmentSize(fragmentSize int) *HighlighterField {
- f.fragmentSize = fragmentSize
- return f
-}
-
-func (f *HighlighterField) FragmentOffset(fragmentOffset int) *HighlighterField {
- f.fragmentOffset = fragmentOffset
- return f
-}
-
-func (f *HighlighterField) NumOfFragments(numOfFragments int) *HighlighterField {
- f.numOfFragments = numOfFragments
- return f
-}
-
-func (f *HighlighterField) HighlightFilter(highlightFilter bool) *HighlighterField {
- f.highlightFilter = &highlightFilter
- return f
-}
-
-func (f *HighlighterField) Order(order string) *HighlighterField {
- f.order = &order
- return f
-}
-
-func (f *HighlighterField) RequireFieldMatch(requireFieldMatch bool) *HighlighterField {
- f.requireFieldMatch = &requireFieldMatch
- return f
-}
-
-func (f *HighlighterField) BoundaryMaxScan(boundaryMaxScan int) *HighlighterField {
- f.boundaryMaxScan = boundaryMaxScan
- return f
-}
-
-func (f *HighlighterField) BoundaryChars(boundaryChars ...rune) *HighlighterField {
- f.boundaryChars = append(f.boundaryChars, boundaryChars...)
- return f
-}
-
-func (f *HighlighterField) HighlighterType(highlighterType string) *HighlighterField {
- f.highlighterType = &highlighterType
- return f
-}
-
-func (f *HighlighterField) Fragmenter(fragmenter string) *HighlighterField {
- f.fragmenter = &fragmenter
- return f
-}
-
-func (f *HighlighterField) HighlightQuery(highlightQuery Query) *HighlighterField {
- f.highlightQuery = highlightQuery
- return f
-}
-
-func (f *HighlighterField) NoMatchSize(noMatchSize int) *HighlighterField {
- f.noMatchSize = &noMatchSize
- return f
-}
-
-func (f *HighlighterField) Options(options map[string]interface{}) *HighlighterField {
- f.options = options
- return f
-}
-
-func (f *HighlighterField) MatchedFields(matchedFields ...string) *HighlighterField {
- f.matchedFields = append(f.matchedFields, matchedFields...)
- return f
-}
-
-func (f *HighlighterField) PhraseLimit(phraseLimit int) *HighlighterField {
- f.phraseLimit = &phraseLimit
- return f
-}
-
-func (f *HighlighterField) ForceSource(forceSource bool) *HighlighterField {
- f.forceSource = &forceSource
- return f
-}
-
-func (f *HighlighterField) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- if f.preTags != nil && len(f.preTags) > 0 {
- source["pre_tags"] = f.preTags
- }
- if f.postTags != nil && len(f.postTags) > 0 {
- source["post_tags"] = f.postTags
- }
- if f.fragmentSize != -1 {
- source["fragment_size"] = f.fragmentSize
- }
- if f.numOfFragments != -1 {
- source["number_of_fragments"] = f.numOfFragments
- }
- if f.fragmentOffset != -1 {
- source["fragment_offset"] = f.fragmentOffset
- }
- if f.highlightFilter != nil {
- source["highlight_filter"] = *f.highlightFilter
- }
- if f.order != nil {
- source["order"] = *f.order
- }
- if f.requireFieldMatch != nil {
- source["require_field_match"] = *f.requireFieldMatch
- }
- if f.boundaryMaxScan != -1 {
- source["boundary_max_scan"] = f.boundaryMaxScan
- }
- if f.boundaryChars != nil && len(f.boundaryChars) > 0 {
- source["boundary_chars"] = f.boundaryChars
- }
- if f.highlighterType != nil {
- source["type"] = *f.highlighterType
- }
- if f.fragmenter != nil {
- source["fragmenter"] = *f.fragmenter
- }
- if f.highlightQuery != nil {
- src, err := f.highlightQuery.Source()
- if err != nil {
- return nil, err
- }
- source["highlight_query"] = src
- }
- if f.noMatchSize != nil {
- source["no_match_size"] = *f.noMatchSize
- }
- if f.matchedFields != nil && len(f.matchedFields) > 0 {
- source["matched_fields"] = f.matchedFields
- }
- if f.phraseLimit != nil {
- source["phrase_limit"] = *f.phraseLimit
- }
- if f.options != nil && len(f.options) > 0 {
- source["options"] = f.options
- }
- if f.forceSource != nil {
- source["force_source"] = *f.forceSource
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/highlight_test.go b/vendor/github.com/olivere/elastic/highlight_test.go
deleted file mode 100644
index c7b972c44..000000000
--- a/vendor/github.com/olivere/elastic/highlight_test.go
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestHighlighterField(t *testing.T) {
- field := NewHighlighterField("grade")
- src, err := field.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlighterFieldWithOptions(t *testing.T) {
- field := NewHighlighterField("grade").FragmentSize(2).NumOfFragments(1)
- src, err := field.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fragment_size":2,"number_of_fragments":1}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlightWithStringField(t *testing.T) {
- builder := NewHighlight().Field("grade")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fields":{"grade":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlightWithFields(t *testing.T) {
- gradeField := NewHighlighterField("grade")
- builder := NewHighlight().Fields(gradeField)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fields":{"grade":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlightWithMultipleFields(t *testing.T) {
- gradeField := NewHighlighterField("grade")
- colorField := NewHighlighterField("color")
- builder := NewHighlight().Fields(gradeField, colorField)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fields":{"color":{},"grade":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlighterWithExplicitFieldOrder(t *testing.T) {
- gradeField := NewHighlighterField("grade").FragmentSize(2)
- colorField := NewHighlighterField("color").FragmentSize(2).NumOfFragments(1)
- builder := NewHighlight().Fields(gradeField, colorField).UseExplicitFieldOrder(true)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fields":[{"grade":{"fragment_size":2}},{"color":{"fragment_size":2,"number_of_fragments":1}}]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlightWithBoundarySettings(t *testing.T) {
- builder := NewHighlight().
- BoundaryChars(" \t\r").
- BoundaryScannerType("word")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"boundary_chars":" \t\r","boundary_scanner":"word"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHighlightWithTermQuery(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun to do."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Specify highlighter
- hl := NewHighlight()
- hl = hl.Fields(NewHighlighterField("message"))
- hl = hl.PreTags("<em>").PostTags("</em>")
-
- // Match all should return all documents
- query := NewPrefixQuery("message", "golang")
- searchResult, err := client.Search().
- Index(testIndexName).
- Highlight(hl).
- Query(query).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Fatalf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 1 {
- t.Fatalf("expected SearchResult.Hits.TotalHits = %d; got %d", 1, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 1 {
- t.Fatalf("expected len(SearchResult.Hits.Hits) = %d; got %d", 1, len(searchResult.Hits.Hits))
- }
-
- hit := searchResult.Hits.Hits[0]
- var tw tweet
- if err := json.Unmarshal(*hit.Source, &tw); err != nil {
- t.Fatal(err)
- }
- if hit.Highlight == nil || len(hit.Highlight) == 0 {
- t.Fatal("expected hit to have a highlight; got nil")
- }
- if hl, found := hit.Highlight["message"]; found {
- if len(hl) != 1 {
- t.Fatalf("expected to have one highlight for field \"message\"; got %d", len(hl))
- }
- expected := "Welcome to <em>Golang</em> and Elasticsearch."
- if hl[0] != expected {
- t.Errorf("expected to have highlight \"%s\"; got \"%s\"", expected, hl[0])
- }
- } else {
- t.Fatal("expected to have a highlight on field \"message\"; got none")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/index.go b/vendor/github.com/olivere/elastic/index.go
deleted file mode 100644
index 4a4c3278e..000000000
--- a/vendor/github.com/olivere/elastic/index.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndexService adds or updates a typed JSON document in a specified index,
-// making it searchable.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-index_.html
-// for details.
-type IndexService struct {
- client *Client
- pretty bool
- id string
- index string
- typ string
- parent string
- routing string
- timeout string
- timestamp string
- ttl string
- version interface{}
- opType string
- versionType string
- refresh string
- waitForActiveShards string
- pipeline string
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndexService creates a new IndexService.
-func NewIndexService(client *Client) *IndexService {
- return &IndexService{
- client: client,
- }
-}
-
-// Id is the document ID.
-func (s *IndexService) Id(id string) *IndexService {
- s.id = id
- return s
-}
-
-// Index is the name of the index.
-func (s *IndexService) Index(index string) *IndexService {
- s.index = index
- return s
-}
-
-// Type is the type of the document.
-func (s *IndexService) Type(typ string) *IndexService {
- s.typ = typ
- return s
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active
-// before proceeding with the index operation. Defaults to 1, meaning the
-// primary shard only. Set to `all` for all shard copies, otherwise set to
-// any non-negative value less than or equal to the total number of copies
-// for the shard (number of replicas + 1).
-func (s *IndexService) WaitForActiveShards(waitForActiveShards string) *IndexService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// Pipeline specifies the pipeline id to preprocess incoming documents with.
-func (s *IndexService) Pipeline(pipeline string) *IndexService {
- s.pipeline = pipeline
- return s
-}
-
-// Refresh the index after performing the operation.
-func (s *IndexService) Refresh(refresh string) *IndexService {
- s.refresh = refresh
- return s
-}
-
-// Ttl is an expiration time for the document.
-func (s *IndexService) Ttl(ttl string) *IndexService {
- s.ttl = ttl
- return s
-}
-
-// TTL is an expiration time for the document (alias for Ttl).
-func (s *IndexService) TTL(ttl string) *IndexService {
- s.ttl = ttl
- return s
-}
-
-// Version is an explicit version number for concurrency control.
-func (s *IndexService) Version(version interface{}) *IndexService {
- s.version = version
- return s
-}
-
-// OpType is an explicit operation type, i.e. "create" or "index" (default).
-func (s *IndexService) OpType(opType string) *IndexService {
- s.opType = opType
- return s
-}
-
-// Parent is the ID of the parent document.
-func (s *IndexService) Parent(parent string) *IndexService {
- s.parent = parent
- return s
-}
-
-// Routing is a specific routing value.
-func (s *IndexService) Routing(routing string) *IndexService {
- s.routing = routing
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndexService) Timeout(timeout string) *IndexService {
- s.timeout = timeout
- return s
-}
-
-// Timestamp is an explicit timestamp for the document.
-func (s *IndexService) Timestamp(timestamp string) *IndexService {
- s.timestamp = timestamp
- return s
-}
-
-// VersionType is a specific version type.
-func (s *IndexService) VersionType(versionType string) *IndexService {
- s.versionType = versionType
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndexService) Pretty(pretty bool) *IndexService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is the document as a serializable JSON interface.
-func (s *IndexService) BodyJson(body interface{}) *IndexService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is the document encoded as a string.
-func (s *IndexService) BodyString(body string) *IndexService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndexService) buildURL() (string, string, url.Values, error) {
- var err error
- var method, path string
-
- if s.id != "" {
- // Create document with manual id
- method = "PUT"
- path, err = uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
- "id": s.id,
- "index": s.index,
- "type": s.typ,
- })
- } else {
- // Automatic ID generation
- // See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-index_.html#index-creation
- method = "POST"
- path, err = uritemplates.Expand("/{index}/{type}/", map[string]string{
- "index": s.index,
- "type": s.typ,
- })
- }
- if err != nil {
- return "", "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.opType != "" {
- params.Set("op_type", s.opType)
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.pipeline != "" {
- params.Set("pipeline", s.pipeline)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.timestamp != "" {
- params.Set("timestamp", s.timestamp)
- }
- if s.ttl != "" {
- params.Set("ttl", s.ttl)
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", s.version))
- }
- if s.versionType != "" {
- params.Set("version_type", s.versionType)
- }
- return method, path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndexService) Validate() error {
- var invalid []string
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndexService) Do(ctx context.Context) (*IndexResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- method, path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: method,
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndexResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndexResponse is the result of indexing a document in Elasticsearch.
-type IndexResponse struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Version int64 `json:"_version,omitempty"`
- Result string `json:"result,omitempty"`
- Shards *shardsInfo `json:"_shards,omitempty"`
- SeqNo int64 `json:"_seq_no,omitempty"`
- PrimaryTerm int64 `json:"_primary_term,omitempty"`
- Status int `json:"status,omitempty"`
- ForcedRefresh bool `json:"forced_refresh,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/index_test.go b/vendor/github.com/olivere/elastic/index_test.go
deleted file mode 100644
index 1a0c38576..000000000
--- a/vendor/github.com/olivere/elastic/index_test.go
+++ /dev/null
@@ -1,280 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestIndexLifecycle(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // Add a document
- indexResult, err := client.Index().
- Index(testIndexName).
- Type("doc").
- Id("1").
- BodyJson(&tweet1).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexResult == nil {
- t.Errorf("expected result to be != nil; got: %v", indexResult)
- }
-
- // Exists
- exists, err := client.Exists().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Errorf("expected exists %v; got %v", true, exists)
- }
-
- // Get document
- getResult, err := client.Get().
- Index(testIndexName).
- Type("doc").
- Id("1").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if getResult.Index != testIndexName {
- t.Errorf("expected GetResult.Index %q; got %q", testIndexName, getResult.Index)
- }
- if getResult.Type != "doc" {
- t.Errorf("expected GetResult.Type %q; got %q", "doc", getResult.Type)
- }
- if getResult.Id != "1" {
- t.Errorf("expected GetResult.Id %q; got %q", "1", getResult.Id)
- }
- if getResult.Source == nil {
- t.Errorf("expected GetResult.Source to be != nil; got nil")
- }
-
- // Decode the Source field
- var tweetGot tweet
- err = json.Unmarshal(*getResult.Source, &tweetGot)
- if err != nil {
- t.Fatal(err)
- }
- if tweetGot.User != tweet1.User {
- t.Errorf("expected Tweet.User to be %q; got %q", tweet1.User, tweetGot.User)
- }
- if tweetGot.Message != tweet1.Message {
- t.Errorf("expected Tweet.Message to be %q; got %q", tweet1.Message, tweetGot.Message)
- }
-
- // Delete document again
- deleteResult, err := client.Delete().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if deleteResult == nil {
- t.Errorf("expected result to be != nil; got: %v", deleteResult)
- }
-
- // Exists
- exists, err = client.Exists().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if exists {
- t.Errorf("expected exists %v; got %v", false, exists)
- }
-}
-
-func TestIndexLifecycleWithAutomaticIDGeneration(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // Add a document
- indexResult, err := client.Index().
- Index(testIndexName).
- Type("doc").
- BodyJson(&tweet1).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexResult == nil {
- t.Errorf("expected result to be != nil; got: %v", indexResult)
- }
- if indexResult.Id == "" {
- t.Fatalf("expected Es to generate an automatic ID, got: %v", indexResult.Id)
- }
- id := indexResult.Id
-
- // Exists
- exists, err := client.Exists().Index(testIndexName).Type("doc").Id(id).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Errorf("expected exists %v; got %v", true, exists)
- }
-
- // Get document
- getResult, err := client.Get().
- Index(testIndexName).
- Type("doc").
- Id(id).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if getResult.Index != testIndexName {
- t.Errorf("expected GetResult.Index %q; got %q", testIndexName, getResult.Index)
- }
- if getResult.Type != "doc" {
- t.Errorf("expected GetResult.Type %q; got %q", "doc", getResult.Type)
- }
- if getResult.Id != id {
- t.Errorf("expected GetResult.Id %q; got %q", id, getResult.Id)
- }
- if getResult.Source == nil {
- t.Errorf("expected GetResult.Source to be != nil; got nil")
- }
-
- // Decode the Source field
- var tweetGot tweet
- err = json.Unmarshal(*getResult.Source, &tweetGot)
- if err != nil {
- t.Fatal(err)
- }
- if tweetGot.User != tweet1.User {
- t.Errorf("expected Tweet.User to be %q; got %q", tweet1.User, tweetGot.User)
- }
- if tweetGot.Message != tweet1.Message {
- t.Errorf("expected Tweet.Message to be %q; got %q", tweet1.Message, tweetGot.Message)
- }
-
- // Delete document again
- deleteResult, err := client.Delete().Index(testIndexName).Type("doc").Id(id).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if deleteResult == nil {
- t.Errorf("expected result to be != nil; got: %v", deleteResult)
- }
-
- // Exists
- exists, err = client.Exists().Index(testIndexName).Type("doc").Id(id).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if exists {
- t.Errorf("expected exists %v; got %v", false, exists)
- }
-}
-
-func TestIndexValidate(t *testing.T) {
- client := setupTestClient(t)
-
- tweet := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // No index name -> fail with error
- res, err := NewIndexService(client).Type("doc").Id("1").BodyJson(&tweet).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Index to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-
- // No index name -> fail with error
- res, err = NewIndexService(client).Index(testIndexName).Id("1").BodyJson(&tweet).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected Index to fail without type")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
-
-func TestIndexCreateExistsOpenCloseDelete(t *testing.T) {
- // TODO: Find out how to make these test robust
- t.Skip("test fails regularly with 409 (Conflict): " +
- "IndexPrimaryShardNotAllocatedException[[elastic-test] " +
- "primary not allocated post api... skipping")
-
- client := setupTestClient(t)
-
- // Create index
- createIndex, err := client.CreateIndex(testIndexName).Body(testMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Fatalf("expected response; got: %v", createIndex)
- }
- if !createIndex.Acknowledged {
- t.Errorf("expected ack for creating index; got: %v", createIndex.Acknowledged)
- }
-
- // Exists
- indexExists, err := client.IndexExists(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !indexExists {
- t.Fatalf("expected index exists=%v; got %v", true, indexExists)
- }
-
- // Flush
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Close index
- closeIndex, err := client.CloseIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if closeIndex == nil {
- t.Fatalf("expected response; got: %v", closeIndex)
- }
- if !closeIndex.Acknowledged {
- t.Errorf("expected ack for closing index; got: %v", closeIndex.Acknowledged)
- }
-
- // Open index
- openIndex, err := client.OpenIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if openIndex == nil {
- t.Fatalf("expected response; got: %v", openIndex)
- }
- if !openIndex.Acknowledged {
- t.Errorf("expected ack for opening index; got: %v", openIndex.Acknowledged)
- }
-
- // Flush
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Delete index
- deleteIndex, err := client.DeleteIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if deleteIndex == nil {
- t.Fatalf("expected response; got: %v", deleteIndex)
- }
- if !deleteIndex.Acknowledged {
- t.Errorf("expected ack for deleting index; got %v", deleteIndex.Acknowledged)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_analyze.go b/vendor/github.com/olivere/elastic/indices_analyze.go
deleted file mode 100644
index fb3a91234..000000000
--- a/vendor/github.com/olivere/elastic/indices_analyze.go
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesAnalyzeService performs the analysis process on a text and returns
-// the tokens breakdown of the text.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-analyze.html
-// for detail.
-type IndicesAnalyzeService struct {
- client *Client
- pretty bool
- index string
- request *IndicesAnalyzeRequest
- format string
- preferLocal *bool
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesAnalyzeService creates a new IndicesAnalyzeService.
-func NewIndicesAnalyzeService(client *Client) *IndicesAnalyzeService {
- return &IndicesAnalyzeService{
- client: client,
- request: new(IndicesAnalyzeRequest),
- }
-}
-
-// Index is the name of the index to scope the operation.
-func (s *IndicesAnalyzeService) Index(index string) *IndicesAnalyzeService {
- s.index = index
- return s
-}
-
-// Format of the output.
-func (s *IndicesAnalyzeService) Format(format string) *IndicesAnalyzeService {
- s.format = format
- return s
-}
-
-// PreferLocal, when true, specifies that a local shard should be used
-// if available. When false, a random shard is used (default: true).
-func (s *IndicesAnalyzeService) PreferLocal(preferLocal bool) *IndicesAnalyzeService {
- s.preferLocal = &preferLocal
- return s
-}
-
-// Request passes the analyze request to use.
-func (s *IndicesAnalyzeService) Request(request *IndicesAnalyzeRequest) *IndicesAnalyzeService {
- if request == nil {
- s.request = new(IndicesAnalyzeRequest)
- } else {
- s.request = request
- }
- return s
-}
-
-// Analyzer is the name of the analyzer to use.
-func (s *IndicesAnalyzeService) Analyzer(analyzer string) *IndicesAnalyzeService {
- s.request.Analyzer = analyzer
- return s
-}
-
-// Attributes is a list of token attributes to output; this parameter works
-// only with explain=true.
-func (s *IndicesAnalyzeService) Attributes(attributes ...string) *IndicesAnalyzeService {
- s.request.Attributes = attributes
- return s
-}
-
-// CharFilter is a list of character filters to use for the analysis.
-func (s *IndicesAnalyzeService) CharFilter(charFilter ...string) *IndicesAnalyzeService {
- s.request.CharFilter = charFilter
- return s
-}
-
-// Explain, when true, outputs more advanced details (default: false).
-func (s *IndicesAnalyzeService) Explain(explain bool) *IndicesAnalyzeService {
- s.request.Explain = explain
- return s
-}
-
-// Field specifies to use a specific analyzer configured for this field (instead of passing the analyzer name).
-func (s *IndicesAnalyzeService) Field(field string) *IndicesAnalyzeService {
- s.request.Field = field
- return s
-}
-
-// Filter is a list of filters to use for the analysis.
-func (s *IndicesAnalyzeService) Filter(filter ...string) *IndicesAnalyzeService {
- s.request.Filter = filter
- return s
-}
-
-// Text is the text on which the analysis should be performed (when request body is not used).
-func (s *IndicesAnalyzeService) Text(text ...string) *IndicesAnalyzeService {
- s.request.Text = text
- return s
-}
-
-// Tokenizer is the name of the tokenizer to use for the analysis.
-func (s *IndicesAnalyzeService) Tokenizer(tokenizer string) *IndicesAnalyzeService {
- s.request.Tokenizer = tokenizer
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesAnalyzeService) Pretty(pretty bool) *IndicesAnalyzeService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is the text on which the analysis should be performed.
-func (s *IndicesAnalyzeService) BodyJson(body interface{}) *IndicesAnalyzeService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is the text on which the analysis should be performed.
-func (s *IndicesAnalyzeService) BodyString(body string) *IndicesAnalyzeService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesAnalyzeService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
-
- if s.index == "" {
- path = "/_analyze"
- } else {
- path, err = uritemplates.Expand("/{index}/_analyze", map[string]string{
- "index": s.index,
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.format != "" {
- params.Set("format", s.format)
- }
- if s.preferLocal != nil {
- params.Set("prefer_local", fmt.Sprintf("%v", *s.preferLocal))
- }
-
- return path, params, nil
-}
-
-// Do will execute the request with the given context.
-func (s *IndicesAnalyzeService) Do(ctx context.Context) (*IndicesAnalyzeResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else if s.bodyString != "" {
- body = s.bodyString
- } else {
- // Request parameters are deprecated in 5.1.1, and we must use a JSON
- // structure in the body to pass the parameters.
- // See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-analyze.html
- body = s.request
- }
-
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- ret := new(IndicesAnalyzeResponse)
- if err = s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
-
- return ret, nil
-}
-
-func (s *IndicesAnalyzeService) Validate() error {
- var invalid []string
- if s.bodyJson == nil && s.bodyString == "" {
- if len(s.request.Text) == 0 {
- invalid = append(invalid, "Text")
- }
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// IndicesAnalyzeRequest specifies the parameters of the analyze request.
-type IndicesAnalyzeRequest struct {
- Text []string `json:"text,omitempty"`
- Analyzer string `json:"analyzer,omitempty"`
- Tokenizer string `json:"tokenizer,omitempty"`
- Filter []string `json:"filter,omitempty"`
- CharFilter []string `json:"char_filter,omitempty"`
- Field string `json:"field,omitempty"`
- Explain bool `json:"explain,omitempty"`
- Attributes []string `json:"attributes,omitempty"`
-}
-
-type IndicesAnalyzeResponse struct {
- Tokens []IndicesAnalyzeResponseToken `json:"tokens"` // json part for normal message
- Detail IndicesAnalyzeResponseDetail `json:"detail"` // json part for verbose message of explain request
-}
-
-type IndicesAnalyzeResponseToken struct {
- Token string `json:"token"`
- StartOffset int `json:"start_offset"`
- EndOffset int `json:"end_offset"`
- Type string `json:"type"`
- Position int `json:"position"`
-}
-
-type IndicesAnalyzeResponseDetail struct {
- CustomAnalyzer bool `json:"custom_analyzer"`
- Charfilters []interface{} `json:"charfilters"`
- Analyzer struct {
- Name string `json:"name"`
- Tokens []struct {
- Token string `json:"token"`
- StartOffset int `json:"start_offset"`
- EndOffset int `json:"end_offset"`
- Type string `json:"type"`
- Position int `json:"position"`
- Bytes string `json:"bytes"`
- PositionLength int `json:"positionLength"`
- } `json:"tokens"`
- } `json:"analyzer"`
- Tokenizer struct {
- Name string `json:"name"`
- Tokens []struct {
- Token string `json:"token"`
- StartOffset int `json:"start_offset"`
- EndOffset int `json:"end_offset"`
- Type string `json:"type"`
- Position int `json:"position"`
- } `json:"tokens"`
- } `json:"tokenizer"`
- Tokenfilters []struct {
- Name string `json:"name"`
- Tokens []struct {
- Token string `json:"token"`
- StartOffset int `json:"start_offset"`
- EndOffset int `json:"end_offset"`
- Type string `json:"type"`
- Position int `json:"position"`
- Keyword bool `json:"keyword"`
- } `json:"tokens"`
- } `json:"tokenfilters"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_analyze_test.go b/vendor/github.com/olivere/elastic/indices_analyze_test.go
deleted file mode 100644
index 90dbf1e73..000000000
--- a/vendor/github.com/olivere/elastic/indices_analyze_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesAnalyzeURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Index string
- Expected string
- }{
- {
- "",
- "/_analyze",
- },
- {
- "tweets",
- "/tweets/_analyze",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IndexAnalyze().Index(test.Index).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestIndicesAnalyze(t *testing.T) {
- client := setupTestClient(t)
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- res, err := client.IndexAnalyze().Text("hello hi guy").Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error, got %v", err)
- }
- if len(res.Tokens) != 3 {
- t.Fatalf("expected %d, got %d (%+v)", 3, len(res.Tokens), res.Tokens)
- }
-}
-
-func TestIndicesAnalyzeDetail(t *testing.T) {
- client := setupTestClient(t)
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- res, err := client.IndexAnalyze().Text("hello hi guy").Explain(true).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error, got %v", err)
- }
-
- if len(res.Detail.Analyzer.Tokens) != 3 {
- t.Fatalf("expected %d tokens, got %d (%+v)", 3, len(res.Detail.Tokenizer.Tokens), res.Detail.Tokenizer.Tokens)
- }
-}
-
-func TestIndicesAnalyzeWithIndex(t *testing.T) {
- client := setupTestClient(t)
-
- _, err := client.IndexAnalyze().Index("foo").Text("hello hi guy").Do(context.TODO())
- if err == nil {
- t.Fatal("expected error, got nil")
- }
- if want, have := "elastic: Error 404 (Not Found): no such index [type=index_not_found_exception]", err.Error(); want != have {
- t.Fatalf("expected error %q, got %q", want, have)
- }
-}
-
-func TestIndicesAnalyzeValidate(t *testing.T) {
- client := setupTestClient(t)
-
- _, err := client.IndexAnalyze().Do(context.TODO())
- if err == nil {
- t.Fatal("expected error, got nil")
- }
- if want, have := "missing required fields: [Text]", err.Error(); want != have {
- t.Fatalf("expected error %q, got %q", want, have)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_close.go b/vendor/github.com/olivere/elastic/indices_close.go
deleted file mode 100644
index 00ecdf966..000000000
--- a/vendor/github.com/olivere/elastic/indices_close.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesCloseService closes an index.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-open-close.html
-// for details.
-type IndicesCloseService struct {
- client *Client
- pretty bool
- index string
- timeout string
- masterTimeout string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewIndicesCloseService creates and initializes a new IndicesCloseService.
-func NewIndicesCloseService(client *Client) *IndicesCloseService {
- return &IndicesCloseService{client: client}
-}
-
-// Index is the name of the index to close.
-func (s *IndicesCloseService) Index(index string) *IndicesCloseService {
- s.index = index
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesCloseService) Timeout(timeout string) *IndicesCloseService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesCloseService) MasterTimeout(masterTimeout string) *IndicesCloseService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesCloseService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesCloseService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
-func (s *IndicesCloseService) AllowNoIndices(allowNoIndices bool) *IndicesCloseService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *IndicesCloseService) ExpandWildcards(expandWildcards string) *IndicesCloseService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesCloseService) Pretty(pretty bool) *IndicesCloseService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesCloseService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/_close", map[string]string{
- "index": s.index,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
-
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesCloseService) Validate() error {
- var invalid []string
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesCloseService) Do(ctx context.Context) (*IndicesCloseResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesCloseResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesCloseResponse is the response of IndicesCloseService.Do.
-type IndicesCloseResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_close_test.go b/vendor/github.com/olivere/elastic/indices_close_test.go
deleted file mode 100644
index e7a4d9e05..000000000
--- a/vendor/github.com/olivere/elastic/indices_close_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-// TODO(oe): Find out why this test fails on Travis CI.
-/*
-func TestIndicesOpenAndClose(t *testing.T) {
- client := setupTestClient(t)
-
- // Create index
- createIndex, err := client.CreateIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !createIndex.Acknowledged {
- t.Errorf("expected CreateIndexResult.Acknowledged %v; got %v", true, createIndex.Acknowledged)
- }
- defer func() {
- // Delete index
- deleteIndex, err := client.DeleteIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !deleteIndex.Acknowledged {
- t.Errorf("expected DeleteIndexResult.Acknowledged %v; got %v", true, deleteIndex.Acknowledged)
- }
- }()
-
- waitForYellow := func() {
- // Wait for status yellow
- res, err := client.ClusterHealth().WaitForStatus("yellow").Timeout("15s").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res != nil && res.TimedOut {
- t.Fatalf("cluster time out waiting for status %q", "yellow")
- }
- }
-
- // Wait for cluster
- waitForYellow()
-
- // Close index
- cresp, err := client.CloseIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !cresp.Acknowledged {
- t.Fatalf("expected close index of %q to be acknowledged\n", testIndexName)
- }
-
- // Wait for cluster
- waitForYellow()
-
- // Open index again
- oresp, err := client.OpenIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !oresp.Acknowledged {
- t.Fatalf("expected open index of %q to be acknowledged\n", testIndexName)
- }
-}
-*/
-
-func TestIndicesCloseValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesCloseService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesClose to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_create.go b/vendor/github.com/olivere/elastic/indices_create.go
deleted file mode 100644
index 8d8e0c25e..000000000
--- a/vendor/github.com/olivere/elastic/indices_create.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "errors"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesCreateService creates a new index.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-create-index.html
-// for details.
-type IndicesCreateService struct {
- client *Client
- pretty bool
- index string
- timeout string
- masterTimeout string
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesCreateService returns a new IndicesCreateService.
-func NewIndicesCreateService(client *Client) *IndicesCreateService {
- return &IndicesCreateService{client: client}
-}
-
-// Index is the name of the index to create.
-func (b *IndicesCreateService) Index(index string) *IndicesCreateService {
- b.index = index
- return b
-}
-
-// Timeout the explicit operation timeout, e.g. "5s".
-func (s *IndicesCreateService) Timeout(timeout string) *IndicesCreateService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesCreateService) MasterTimeout(masterTimeout string) *IndicesCreateService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Body specifies the configuration of the index as a string.
-// It is an alias for BodyString.
-func (b *IndicesCreateService) Body(body string) *IndicesCreateService {
- b.bodyString = body
- return b
-}
-
-// BodyString specifies the configuration of the index as a string.
-func (b *IndicesCreateService) BodyString(body string) *IndicesCreateService {
- b.bodyString = body
- return b
-}
-
-// BodyJson specifies the configuration of the index. The interface{} will
-// be serializes as a JSON document, so use a map[string]interface{}.
-func (b *IndicesCreateService) BodyJson(body interface{}) *IndicesCreateService {
- b.bodyJson = body
- return b
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (b *IndicesCreateService) Pretty(pretty bool) *IndicesCreateService {
- b.pretty = pretty
- return b
-}
-
-// Do executes the operation.
-func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, error) {
- if b.index == "" {
- return nil, errors.New("missing index name")
- }
-
- // Build url
- path, err := uritemplates.Expand("/{index}", map[string]string{
- "index": b.index,
- })
- if err != nil {
- return nil, err
- }
-
- params := make(url.Values)
- if b.pretty {
- params.Set("pretty", "true")
- }
- if b.masterTimeout != "" {
- params.Set("master_timeout", b.masterTimeout)
- }
- if b.timeout != "" {
- params.Set("timeout", b.timeout)
- }
-
- // Setup HTTP request body
- var body interface{}
- if b.bodyJson != nil {
- body = b.bodyJson
- } else {
- body = b.bodyString
- }
-
- // Get response
- res, err := b.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- ret := new(IndicesCreateResult)
- if err := b.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of a create index request.
-
-// IndicesCreateResult is the outcome of creating a new index.
-type IndicesCreateResult struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_create_test.go b/vendor/github.com/olivere/elastic/indices_create_test.go
deleted file mode 100644
index f37df1c54..000000000
--- a/vendor/github.com/olivere/elastic/indices_create_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesLifecycle(t *testing.T) {
- client := setupTestClient(t)
-
- // Create index
- createIndex, err := client.CreateIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !createIndex.Acknowledged {
- t.Errorf("expected IndicesCreateResult.Acknowledged %v; got %v", true, createIndex.Acknowledged)
- }
-
- // Check if index exists
- indexExists, err := client.IndexExists(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !indexExists {
- t.Fatalf("index %s should exist, but doesn't\n", testIndexName)
- }
-
- // Delete index
- deleteIndex, err := client.DeleteIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !deleteIndex.Acknowledged {
- t.Errorf("expected DeleteIndexResult.Acknowledged %v; got %v", true, deleteIndex.Acknowledged)
- }
-
- // Check if index exists
- indexExists, err = client.IndexExists(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexExists {
- t.Fatalf("index %s should not exist, but does\n", testIndexName)
- }
-}
-
-func TestIndicesCreateValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesCreateService(client).Body(testMapping).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesCreate to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_delete.go b/vendor/github.com/olivere/elastic/indices_delete.go
deleted file mode 100644
index 2afeca978..000000000
--- a/vendor/github.com/olivere/elastic/indices_delete.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesDeleteService allows to delete existing indices.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-delete-index.html
-// for details.
-type IndicesDeleteService struct {
- client *Client
- pretty bool
- index []string
- timeout string
- masterTimeout string
-}
-
-// NewIndicesDeleteService creates and initializes a new IndicesDeleteService.
-func NewIndicesDeleteService(client *Client) *IndicesDeleteService {
- return &IndicesDeleteService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index adds the list of indices to delete.
-// Use `_all` or `*` string to delete all indices.
-func (s *IndicesDeleteService) Index(index []string) *IndicesDeleteService {
- s.index = index
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesDeleteService) Timeout(timeout string) *IndicesDeleteService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesDeleteService) MasterTimeout(masterTimeout string) *IndicesDeleteService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesDeleteService) Pretty(pretty bool) *IndicesDeleteService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesDeleteService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesDeleteService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesDeleteService) Do(ctx context.Context) (*IndicesDeleteResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesDeleteResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of a delete index request.
-
-// IndicesDeleteResponse is the response of IndicesDeleteService.Do.
-type IndicesDeleteResponse struct {
- Acknowledged bool `json:"acknowledged"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_delete_template.go b/vendor/github.com/olivere/elastic/indices_delete_template.go
deleted file mode 100644
index 0ea34cf89..000000000
--- a/vendor/github.com/olivere/elastic/indices_delete_template.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesDeleteTemplateService deletes index templates.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html.
-type IndicesDeleteTemplateService struct {
- client *Client
- pretty bool
- name string
- timeout string
- masterTimeout string
-}
-
-// NewIndicesDeleteTemplateService creates a new IndicesDeleteTemplateService.
-func NewIndicesDeleteTemplateService(client *Client) *IndicesDeleteTemplateService {
- return &IndicesDeleteTemplateService{
- client: client,
- }
-}
-
-// Name is the name of the template.
-func (s *IndicesDeleteTemplateService) Name(name string) *IndicesDeleteTemplateService {
- s.name = name
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesDeleteTemplateService) Timeout(timeout string) *IndicesDeleteTemplateService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesDeleteTemplateService) MasterTimeout(masterTimeout string) *IndicesDeleteTemplateService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesDeleteTemplateService) Pretty(pretty bool) *IndicesDeleteTemplateService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesDeleteTemplateService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_template/{name}", map[string]string{
- "name": s.name,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesDeleteTemplateService) Validate() error {
- var invalid []string
- if s.name == "" {
- invalid = append(invalid, "Name")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesDeleteTemplateService) Do(ctx context.Context) (*IndicesDeleteTemplateResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesDeleteTemplateResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesDeleteTemplateResponse is the response of IndicesDeleteTemplateService.Do.
-type IndicesDeleteTemplateResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_delete_test.go b/vendor/github.com/olivere/elastic/indices_delete_test.go
deleted file mode 100644
index db77c7a25..000000000
--- a/vendor/github.com/olivere/elastic/indices_delete_test.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesDeleteValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesDeleteService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesDelete to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists.go b/vendor/github.com/olivere/elastic/indices_exists.go
deleted file mode 100644
index aa9391039..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesExistsService checks if an index or indices exist or not.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-exists.html
-// for details.
-type IndicesExistsService struct {
- client *Client
- pretty bool
- index []string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
- local *bool
-}
-
-// NewIndicesExistsService creates and initializes a new IndicesExistsService.
-func NewIndicesExistsService(client *Client) *IndicesExistsService {
- return &IndicesExistsService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index is a list of one or more indices to check.
-func (s *IndicesExistsService) Index(index []string) *IndicesExistsService {
- s.index = index
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices expression
-// resolves into no concrete indices. (This includes `_all` string or
-// when no indices have been specified).
-func (s *IndicesExistsService) AllowNoIndices(allowNoIndices bool) *IndicesExistsService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *IndicesExistsService) ExpandWildcards(expandWildcards string) *IndicesExistsService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Local, when set, returns local information and does not retrieve the state
-// from master node (default: false).
-func (s *IndicesExistsService) Local(local bool) *IndicesExistsService {
- s.local = &local
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesExistsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesExistsService) Pretty(pretty bool) *IndicesExistsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesExistsService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesExistsService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesExistsService) Do(ctx context.Context) (bool, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return false, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return false, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "HEAD",
- Path: path,
- Params: params,
- IgnoreErrors: []int{404},
- })
- if err != nil {
- return false, err
- }
-
- // Return operation response
- switch res.StatusCode {
- case http.StatusOK:
- return true, nil
- case http.StatusNotFound:
- return false, nil
- default:
- return false, fmt.Errorf("elastic: got HTTP code %d when it should have been either 200 or 404", res.StatusCode)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists_template.go b/vendor/github.com/olivere/elastic/indices_exists_template.go
deleted file mode 100644
index 40b06e895..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists_template.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesExistsTemplateService checks if a given template exists.
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-templates.html#indices-templates-exists
-// for documentation.
-type IndicesExistsTemplateService struct {
- client *Client
- pretty bool
- name string
- local *bool
-}
-
-// NewIndicesExistsTemplateService creates a new IndicesExistsTemplateService.
-func NewIndicesExistsTemplateService(client *Client) *IndicesExistsTemplateService {
- return &IndicesExistsTemplateService{
- client: client,
- }
-}
-
-// Name is the name of the template.
-func (s *IndicesExistsTemplateService) Name(name string) *IndicesExistsTemplateService {
- s.name = name
- return s
-}
-
-// Local indicates whether to return local information, i.e. do not retrieve
-// the state from master node (default: false).
-func (s *IndicesExistsTemplateService) Local(local bool) *IndicesExistsTemplateService {
- s.local = &local
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesExistsTemplateService) Pretty(pretty bool) *IndicesExistsTemplateService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesExistsTemplateService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_template/{name}", map[string]string{
- "name": s.name,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesExistsTemplateService) Validate() error {
- var invalid []string
- if s.name == "" {
- invalid = append(invalid, "Name")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesExistsTemplateService) Do(ctx context.Context) (bool, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return false, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return false, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "HEAD",
- Path: path,
- Params: params,
- IgnoreErrors: []int{404},
- })
- if err != nil {
- return false, err
- }
-
- // Return operation response
- switch res.StatusCode {
- case http.StatusOK:
- return true, nil
- case http.StatusNotFound:
- return false, nil
- default:
- return false, fmt.Errorf("elastic: got HTTP code %d when it should have been either 200 or 404", res.StatusCode)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists_template_test.go b/vendor/github.com/olivere/elastic/indices_exists_template_test.go
deleted file mode 100644
index a97442971..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists_template_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndexExistsTemplate(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tmpl := `{
- "index_patterns":["elastic-test*"],
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "tags":{
- "type":"keyword"
- },
- "location":{
- "type":"geo_point"
- },
- "suggest_field":{
- "type":"completion"
- }
- }
- }
- }
-}`
- putres, err := client.IndexPutTemplate("elastic-template").BodyString(tmpl).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if putres == nil {
- t.Fatalf("expected response; got: %v", putres)
- }
- if !putres.Acknowledged {
- t.Fatalf("expected index template to be ack'd; got: %v", putres.Acknowledged)
- }
-
- // Always delete template
- defer client.IndexDeleteTemplate("elastic-template").Do(context.TODO())
-
- // Check if template exists
- exists, err := client.IndexTemplateExists("elastic-template").Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if !exists {
- t.Fatalf("expected index template %q to exist; got: %v", "elastic-template", exists)
- }
-
- // Get template
- getres, err := client.IndexGetTemplate("elastic-template").Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if getres == nil {
- t.Fatalf("expected to get index template %q; got: %v", "elastic-template", getres)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists_test.go b/vendor/github.com/olivere/elastic/indices_exists_test.go
deleted file mode 100644
index 07e3eb518..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists_test.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesExistsWithoutIndex(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesExistsService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesExists to fail without index name")
- }
- if res != false {
- t.Fatalf("expected result to be false; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists_type.go b/vendor/github.com/olivere/elastic/indices_exists_type.go
deleted file mode 100644
index a4d1ff610..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists_type.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesExistsTypeService checks if one or more types exist in one or more indices.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-types-exists.html
-// for details.
-type IndicesExistsTypeService struct {
- client *Client
- pretty bool
- typ []string
- index []string
- expandWildcards string
- local *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
-}
-
-// NewIndicesExistsTypeService creates a new IndicesExistsTypeService.
-func NewIndicesExistsTypeService(client *Client) *IndicesExistsTypeService {
- return &IndicesExistsTypeService{
- client: client,
- }
-}
-
-// Index is a list of index names; use `_all` to check the types across all indices.
-func (s *IndicesExistsTypeService) Index(indices ...string) *IndicesExistsTypeService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Type is a list of document types to check.
-func (s *IndicesExistsTypeService) Type(types ...string) *IndicesExistsTypeService {
- s.typ = append(s.typ, types...)
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesExistsTypeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsTypeService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *IndicesExistsTypeService) AllowNoIndices(allowNoIndices bool) *IndicesExistsTypeService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *IndicesExistsTypeService) ExpandWildcards(expandWildcards string) *IndicesExistsTypeService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Local specifies whether to return local information, i.e. do not retrieve
-// the state from master node (default: false).
-func (s *IndicesExistsTypeService) Local(local bool) *IndicesExistsTypeService {
- s.local = &local
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesExistsTypeService) Pretty(pretty bool) *IndicesExistsTypeService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesExistsTypeService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/_mapping/{type}", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": strings.Join(s.typ, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesExistsTypeService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(s.typ) == 0 {
- invalid = append(invalid, "Type")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesExistsTypeService) Do(ctx context.Context) (bool, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return false, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return false, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "HEAD",
- Path: path,
- Params: params,
- IgnoreErrors: []int{404},
- })
- if err != nil {
- return false, err
- }
-
- // Return operation response
- switch res.StatusCode {
- case http.StatusOK:
- return true, nil
- case http.StatusNotFound:
- return false, nil
- default:
- return false, fmt.Errorf("elastic: got HTTP code %d when it should have been either 200 or 404", res.StatusCode)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_exists_type_test.go b/vendor/github.com/olivere/elastic/indices_exists_type_test.go
deleted file mode 100644
index 3795bd042..000000000
--- a/vendor/github.com/olivere/elastic/indices_exists_type_test.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesExistsTypeBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- ExpectValidateFailure bool
- }{
- {
- []string{},
- []string{},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{},
- "",
- true,
- },
- {
- []string{},
- []string{"type1"},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{"type1"},
- "/index1/_mapping/type1",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{"type1"},
- "/index1%2Cindex2/_mapping/type1",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{"type1", "type2"},
- "/index1%2Cindex2/_mapping/type1%2Ctype2",
- false,
- },
- }
-
- for i, test := range tests {
- err := client.TypeExists().Index(test.Indices...).Type(test.Types...).Validate()
- if err == nil && test.ExpectValidateFailure {
- t.Errorf("#%d: expected validate to fail", i+1)
- continue
- }
- if err != nil && !test.ExpectValidateFailure {
- t.Errorf("#%d: expected validate to succeed", i+1)
- continue
- }
- if !test.ExpectValidateFailure {
- path, _, err := client.TypeExists().Index(test.Indices...).Type(test.Types...).buildURL()
- if err != nil {
- t.Fatalf("#%d: %v", i+1, err)
- }
- if path != test.Expected {
- t.Errorf("#%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
- }
-}
-
-func TestIndicesExistsType(t *testing.T) {
- client := setupTestClient(t)
-
- // Create index with tweet type
- createIndex, err := client.CreateIndex(testIndexName).Body(testMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex)
- }
- if !createIndex.Acknowledged {
- t.Errorf("expected CreateIndexResult.Acknowledged %v; got %v", true, createIndex.Acknowledged)
- }
-
- // Check if type exists
- exists, err := client.TypeExists().Index(testIndexName).Type("doc").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !exists {
- t.Fatalf("type %s should exist in index %s, but doesn't\n", "doc", testIndexName)
- }
-
- // Delete index
- deleteIndex, err := client.DeleteIndex(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !deleteIndex.Acknowledged {
- t.Errorf("expected DeleteIndexResult.Acknowledged %v; got %v", true, deleteIndex.Acknowledged)
- }
-
- // Check if type exists
- exists, err = client.TypeExists().Index(testIndexName).Type("doc").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if exists {
- t.Fatalf("type %s should not exist in index %s, but it does\n", "doc", testIndexName)
- }
-}
-
-func TestIndicesExistsTypeValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesExistsTypeService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesExistsType to fail without index name")
- }
- if res != false {
- t.Fatalf("expected result to be false; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_flush.go b/vendor/github.com/olivere/elastic/indices_flush.go
deleted file mode 100644
index 113e53803..000000000
--- a/vendor/github.com/olivere/elastic/indices_flush.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// Flush allows to flush one or more indices. The flush process of an index
-// basically frees memory from the index by flushing data to the index
-// storage and clearing the internal transaction log.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-flush.html
-// for details.
-type IndicesFlushService struct {
- client *Client
- pretty bool
- index []string
- force *bool
- waitIfOngoing *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewIndicesFlushService creates a new IndicesFlushService.
-func NewIndicesFlushService(client *Client) *IndicesFlushService {
- return &IndicesFlushService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index is a list of index names; use `_all` or empty string for all indices.
-func (s *IndicesFlushService) Index(indices ...string) *IndicesFlushService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Force indicates whether a flush should be forced even if it is not
-// necessarily needed ie. if no changes will be committed to the index.
-// This is useful if transaction log IDs should be incremented even if
-// no uncommitted changes are present. (This setting can be considered as internal).
-func (s *IndicesFlushService) Force(force bool) *IndicesFlushService {
- s.force = &force
- return s
-}
-
-// WaitIfOngoing, if set to true, indicates that the flush operation will
-// block until the flush can be executed if another flush operation is
-// already executing. The default is false and will cause an exception
-// to be thrown on the shard level if another flush operation is already running..
-func (s *IndicesFlushService) WaitIfOngoing(waitIfOngoing bool) *IndicesFlushService {
- s.waitIfOngoing = &waitIfOngoing
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesFlushService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices expression
-// resolves into no concrete indices. (This includes `_all` string or when
-// no indices have been specified).
-func (s *IndicesFlushService) AllowNoIndices(allowNoIndices bool) *IndicesFlushService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards specifies whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *IndicesFlushService) ExpandWildcards(expandWildcards string) *IndicesFlushService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesFlushService) Pretty(pretty bool) *IndicesFlushService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesFlushService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
-
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_flush", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_flush"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.force != nil {
- params.Set("force", fmt.Sprintf("%v", *s.force))
- }
- if s.waitIfOngoing != nil {
- params.Set("wait_if_ongoing", fmt.Sprintf("%v", *s.waitIfOngoing))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesFlushService) Validate() error {
- return nil
-}
-
-// Do executes the service.
-func (s *IndicesFlushService) Do(ctx context.Context) (*IndicesFlushResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesFlushResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of a flush request.
-
-type IndicesFlushResponse struct {
- Shards shardsInfo `json:"_shards"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_flush_test.go b/vendor/github.com/olivere/elastic/indices_flush_test.go
deleted file mode 100644
index afefd1251..000000000
--- a/vendor/github.com/olivere/elastic/indices_flush_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestFlush(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Flush all indices
- res, err := client.Flush().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Errorf("expected res to be != nil; got: %v", res)
- }
-}
-
-func TestFlushBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Expected string
- ExpectValidateFailure bool
- }{
- {
- []string{},
- "/_flush",
- false,
- },
- {
- []string{"index1"},
- "/index1/_flush",
- false,
- },
- {
- []string{"index1", "index2"},
- "/index1%2Cindex2/_flush",
- false,
- },
- }
-
- for i, test := range tests {
- err := NewIndicesFlushService(client).Index(test.Indices...).Validate()
- if err == nil && test.ExpectValidateFailure {
- t.Errorf("case #%d: expected validate to fail", i+1)
- continue
- }
- if err != nil && !test.ExpectValidateFailure {
- t.Errorf("case #%d: expected validate to succeed", i+1)
- continue
- }
- if !test.ExpectValidateFailure {
- path, _, err := NewIndicesFlushService(client).Index(test.Indices...).buildURL()
- if err != nil {
- t.Fatalf("case #%d: %v", i+1, err)
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_forcemerge.go b/vendor/github.com/olivere/elastic/indices_forcemerge.go
deleted file mode 100644
index 0e999cf19..000000000
--- a/vendor/github.com/olivere/elastic/indices_forcemerge.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesForcemergeService allows to force merging of one or more indices.
-// The merge relates to the number of segments a Lucene index holds
-// within each shard. The force merge operation allows to reduce the number
-// of segments by merging them.
-//
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-forcemerge.html
-// for more information.
-type IndicesForcemergeService struct {
- client *Client
- pretty bool
- index []string
- allowNoIndices *bool
- expandWildcards string
- flush *bool
- ignoreUnavailable *bool
- maxNumSegments interface{}
- onlyExpungeDeletes *bool
- operationThreading interface{}
-}
-
-// NewIndicesForcemergeService creates a new IndicesForcemergeService.
-func NewIndicesForcemergeService(client *Client) *IndicesForcemergeService {
- return &IndicesForcemergeService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index is a list of index names; use `_all` or empty string to perform
-// the operation on all indices.
-func (s *IndicesForcemergeService) Index(index ...string) *IndicesForcemergeService {
- if s.index == nil {
- s.index = make([]string, 0)
- }
- s.index = append(s.index, index...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *IndicesForcemergeService) AllowNoIndices(allowNoIndices bool) *IndicesForcemergeService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *IndicesForcemergeService) ExpandWildcards(expandWildcards string) *IndicesForcemergeService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Flush specifies whether the index should be flushed after performing
-// the operation (default: true).
-func (s *IndicesForcemergeService) Flush(flush bool) *IndicesForcemergeService {
- s.flush = &flush
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should
-// be ignored when unavailable (missing or closed).
-func (s *IndicesForcemergeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesForcemergeService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// MaxNumSegments specifies the number of segments the index should be
-// merged into (default: dynamic).
-func (s *IndicesForcemergeService) MaxNumSegments(maxNumSegments interface{}) *IndicesForcemergeService {
- s.maxNumSegments = maxNumSegments
- return s
-}
-
-// OnlyExpungeDeletes specifies whether the operation should only expunge
-// deleted documents.
-func (s *IndicesForcemergeService) OnlyExpungeDeletes(onlyExpungeDeletes bool) *IndicesForcemergeService {
- s.onlyExpungeDeletes = &onlyExpungeDeletes
- return s
-}
-
-func (s *IndicesForcemergeService) OperationThreading(operationThreading interface{}) *IndicesForcemergeService {
- s.operationThreading = operationThreading
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesForcemergeService) Pretty(pretty bool) *IndicesForcemergeService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesForcemergeService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- // Build URL
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_forcemerge", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_forcemerge"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.flush != nil {
- params.Set("flush", fmt.Sprintf("%v", *s.flush))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.maxNumSegments != nil {
- params.Set("max_num_segments", fmt.Sprintf("%v", s.maxNumSegments))
- }
- if s.onlyExpungeDeletes != nil {
- params.Set("only_expunge_deletes", fmt.Sprintf("%v", *s.onlyExpungeDeletes))
- }
- if s.operationThreading != nil {
- params.Set("operation_threading", fmt.Sprintf("%v", s.operationThreading))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesForcemergeService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesForcemergeService) Do(ctx context.Context) (*IndicesForcemergeResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesForcemergeResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesForcemergeResponse is the response of IndicesForcemergeService.Do.
-type IndicesForcemergeResponse struct {
- Shards shardsInfo `json:"_shards"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_forcemerge_test.go b/vendor/github.com/olivere/elastic/indices_forcemerge_test.go
deleted file mode 100644
index 6615d4dc6..000000000
--- a/vendor/github.com/olivere/elastic/indices_forcemerge_test.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesForcemergeBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Expected string
- }{
- {
- []string{},
- "/_forcemerge",
- },
- {
- []string{"index1"},
- "/index1/_forcemerge",
- },
- {
- []string{"index1", "index2"},
- "/index1%2Cindex2/_forcemerge",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.Forcemerge().Index(test.Indices...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestIndicesForcemerge(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- _, err := client.Forcemerge(testIndexName).MaxNumSegments(1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- /*
- if !ok {
- t.Fatalf("expected forcemerge to succeed; got: %v", ok)
- }
- */
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get.go b/vendor/github.com/olivere/elastic/indices_get.go
deleted file mode 100644
index cb4e449d5..000000000
--- a/vendor/github.com/olivere/elastic/indices_get.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesGetService retrieves information about one or more indices.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-get-index.html
-// for more details.
-type IndicesGetService struct {
- client *Client
- pretty bool
- index []string
- feature []string
- local *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
- flatSettings *bool
- human *bool
-}
-
-// NewIndicesGetService creates a new IndicesGetService.
-func NewIndicesGetService(client *Client) *IndicesGetService {
- return &IndicesGetService{
- client: client,
- index: make([]string, 0),
- feature: make([]string, 0),
- }
-}
-
-// Index is a list of index names.
-func (s *IndicesGetService) Index(indices ...string) *IndicesGetService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Feature is a list of features.
-func (s *IndicesGetService) Feature(features ...string) *IndicesGetService {
- s.feature = append(s.feature, features...)
- return s
-}
-
-// Local indicates whether to return local information, i.e. do not retrieve
-// the state from master node (default: false).
-func (s *IndicesGetService) Local(local bool) *IndicesGetService {
- s.local = &local
- return s
-}
-
-// IgnoreUnavailable indicates whether to ignore unavailable indexes (default: false).
-func (s *IndicesGetService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard expression
-// resolves to no concrete indices (default: false).
-func (s *IndicesGetService) AllowNoIndices(allowNoIndices bool) *IndicesGetService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether wildcard expressions should get
-// expanded to open or closed indices (default: open).
-func (s *IndicesGetService) ExpandWildcards(expandWildcards string) *IndicesGetService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-/* Disabled because serialization would fail in that case. */
-/*
-// FlatSettings make the service return settings in flat format (default: false).
-func (s *IndicesGetService) FlatSettings(flatSettings bool) *IndicesGetService {
- s.flatSettings = &flatSettings
- return s
-}
-*/
-
-// Human indicates whether to return version and creation date values
-// in human-readable format (default: false).
-func (s *IndicesGetService) Human(human bool) *IndicesGetService {
- s.human = &human
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesGetService) Pretty(pretty bool) *IndicesGetService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesGetService) buildURL() (string, url.Values, error) {
- var err error
- var path string
- var index []string
-
- if len(s.index) > 0 {
- index = s.index
- } else {
- index = []string{"_all"}
- }
-
- if len(s.feature) > 0 {
- // Build URL
- path, err = uritemplates.Expand("/{index}/{feature}", map[string]string{
- "index": strings.Join(index, ","),
- "feature": strings.Join(s.feature, ","),
- })
- } else {
- // Build URL
- path, err = uritemplates.Expand("/{index}", map[string]string{
- "index": strings.Join(index, ","),
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesGetService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesGetService) Do(ctx context.Context) (map[string]*IndicesGetResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret map[string]*IndicesGetResponse
- if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesGetResponse is part of the response of IndicesGetService.Do.
-type IndicesGetResponse struct {
- Aliases map[string]interface{} `json:"aliases"`
- Mappings map[string]interface{} `json:"mappings"`
- Settings map[string]interface{} `json:"settings"`
- Warmers map[string]interface{} `json:"warmers"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_aliases.go b/vendor/github.com/olivere/elastic/indices_get_aliases.go
deleted file mode 100644
index 68b186358..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_aliases.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// AliasesService returns the aliases associated with one or more indices.
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-aliases.html.
-type AliasesService struct {
- client *Client
- index []string
- pretty bool
-}
-
-// NewAliasesService instantiates a new AliasesService.
-func NewAliasesService(client *Client) *AliasesService {
- builder := &AliasesService{
- client: client,
- }
- return builder
-}
-
-// Pretty asks Elasticsearch to indent the returned JSON.
-func (s *AliasesService) Pretty(pretty bool) *AliasesService {
- s.pretty = pretty
- return s
-}
-
-// Index adds one or more indices.
-func (s *AliasesService) Index(index ...string) *AliasesService {
- s.index = append(s.index, index...)
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *AliasesService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_alias", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_alias"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- return path, params, nil
-}
-
-func (s *AliasesService) Do(ctx context.Context) (*AliasesResult, error) {
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // {
- // "indexName" : {
- // "aliases" : {
- // "alias1" : { },
- // "alias2" : { }
- // }
- // },
- // "indexName2" : {
- // ...
- // },
- // }
- indexMap := make(map[string]interface{})
- if err := s.client.decoder.Decode(res.Body, &indexMap); err != nil {
- return nil, err
- }
-
- // Each (indexName, _)
- ret := &AliasesResult{
- Indices: make(map[string]indexResult),
- }
- for indexName, indexData := range indexMap {
- indexOut, found := ret.Indices[indexName]
- if !found {
- indexOut = indexResult{Aliases: make([]aliasResult, 0)}
- }
-
- // { "aliases" : { ... } }
- indexDataMap, ok := indexData.(map[string]interface{})
- if ok {
- aliasesData, ok := indexDataMap["aliases"].(map[string]interface{})
- if ok {
- for aliasName, _ := range aliasesData {
- aliasRes := aliasResult{AliasName: aliasName}
- indexOut.Aliases = append(indexOut.Aliases, aliasRes)
- }
- }
- }
-
- ret.Indices[indexName] = indexOut
- }
-
- return ret, nil
-}
-
-// -- Result of an alias request.
-
-type AliasesResult struct {
- Indices map[string]indexResult
-}
-
-type indexResult struct {
- Aliases []aliasResult
-}
-
-type aliasResult struct {
- AliasName string
-}
-
-func (ar AliasesResult) IndicesByAlias(aliasName string) []string {
- var indices []string
- for indexName, indexInfo := range ar.Indices {
- for _, aliasInfo := range indexInfo.Aliases {
- if aliasInfo.AliasName == aliasName {
- indices = append(indices, indexName)
- }
- }
- }
- return indices
-}
-
-func (ir indexResult) HasAlias(aliasName string) bool {
- for _, alias := range ir.Aliases {
- if alias.AliasName == aliasName {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_aliases_test.go b/vendor/github.com/olivere/elastic/indices_get_aliases_test.go
deleted file mode 100644
index 2c8da9b7f..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_aliases_test.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestAliasesBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Expected string
- }{
- {
- []string{},
- "/_alias",
- },
- {
- []string{"index1"},
- "/index1/_alias",
- },
- {
- []string{"index1", "index2"},
- "/index1%2Cindex2/_alias",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.Aliases().Index(test.Indices...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestAliases(t *testing.T) {
- var err error
-
- //client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- // Some tweets
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Cycling is fun."}
- tweet3 := tweet{User: "olivere", Message: "Another unrelated topic."}
-
- // Add tweets to first index
- _, err = client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- // Add tweets to second index
- _, err = client.Index().Index(testIndexName2).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Flush
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Flush().Index(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Alias should not yet exist
- aliasesResult1, err := client.Aliases().
- Index(testIndexName, testIndexName2).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if len(aliasesResult1.Indices) != 2 {
- t.Errorf("expected len(AliasesResult.Indices) = %d; got %d", 2, len(aliasesResult1.Indices))
- }
- for indexName, indexDetails := range aliasesResult1.Indices {
- if len(indexDetails.Aliases) != 0 {
- t.Errorf("expected len(AliasesResult.Indices[%s].Aliases) = %d; got %d", indexName, 0, len(indexDetails.Aliases))
- }
- }
-
- // Add both indices to a new alias
- aliasCreate, err := client.Alias().
- Add(testIndexName, testAliasName).
- Add(testIndexName2, testAliasName).
- //Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !aliasCreate.Acknowledged {
- t.Errorf("expected AliasResult.Acknowledged %v; got %v", true, aliasCreate.Acknowledged)
- }
-
- // Alias should now exist
- aliasesResult2, err := client.Aliases().
- Index(testIndexName, testIndexName2).
- //Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if len(aliasesResult2.Indices) != 2 {
- t.Errorf("expected len(AliasesResult.Indices) = %d; got %d", 2, len(aliasesResult2.Indices))
- }
- for indexName, indexDetails := range aliasesResult2.Indices {
- if len(indexDetails.Aliases) != 1 {
- t.Errorf("expected len(AliasesResult.Indices[%s].Aliases) = %d; got %d", indexName, 1, len(indexDetails.Aliases))
- }
- }
-
- // Check the reverse function:
- indexInfo1, found := aliasesResult2.Indices[testIndexName]
- if !found {
- t.Errorf("expected info about index %s = %v; got %v", testIndexName, true, found)
- }
- aliasFound := indexInfo1.HasAlias(testAliasName)
- if !aliasFound {
- t.Errorf("expected alias %s to include index %s; got %v", testAliasName, testIndexName, aliasFound)
- }
-
- // Check the reverse function:
- indexInfo2, found := aliasesResult2.Indices[testIndexName2]
- if !found {
- t.Errorf("expected info about index %s = %v; got %v", testIndexName, true, found)
- }
- aliasFound = indexInfo2.HasAlias(testAliasName)
- if !aliasFound {
- t.Errorf("expected alias %s to include index %s; got %v", testAliasName, testIndexName2, aliasFound)
- }
-
- // Remove first index should remove two tweets, so should only yield 1
- aliasRemove1, err := client.Alias().
- Remove(testIndexName, testAliasName).
- //Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !aliasRemove1.Acknowledged {
- t.Errorf("expected AliasResult.Acknowledged %v; got %v", true, aliasRemove1.Acknowledged)
- }
-
- // Alias should now exist only for index 2
- aliasesResult3, err := client.Aliases().Index(testIndexName, testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if len(aliasesResult3.Indices) != 2 {
- t.Errorf("expected len(AliasesResult.Indices) = %d; got %d", 2, len(aliasesResult3.Indices))
- }
- for indexName, indexDetails := range aliasesResult3.Indices {
- if indexName == testIndexName {
- if len(indexDetails.Aliases) != 0 {
- t.Errorf("expected len(AliasesResult.Indices[%s].Aliases) = %d; got %d", indexName, 0, len(indexDetails.Aliases))
- }
- } else if indexName == testIndexName2 {
- if len(indexDetails.Aliases) != 1 {
- t.Errorf("expected len(AliasesResult.Indices[%s].Aliases) = %d; got %d", indexName, 1, len(indexDetails.Aliases))
- }
- } else {
- t.Errorf("got index %s", indexName)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_field_mapping.go b/vendor/github.com/olivere/elastic/indices_get_field_mapping.go
deleted file mode 100644
index e3b7eac07..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_field_mapping.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesGetFieldMappingService retrieves the mapping definitions for the fields in an index
-// or index/type.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-get-field-mapping.html
-// for details.
-type IndicesGetFieldMappingService struct {
- client *Client
- pretty bool
- index []string
- typ []string
- field []string
- local *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewGetFieldMappingService is an alias for NewIndicesGetFieldMappingService.
-// Use NewIndicesGetFieldMappingService.
-func NewGetFieldMappingService(client *Client) *IndicesGetFieldMappingService {
- return NewIndicesGetFieldMappingService(client)
-}
-
-// NewIndicesGetFieldMappingService creates a new IndicesGetFieldMappingService.
-func NewIndicesGetFieldMappingService(client *Client) *IndicesGetFieldMappingService {
- return &IndicesGetFieldMappingService{
- client: client,
- }
-}
-
-// Index is a list of index names.
-func (s *IndicesGetFieldMappingService) Index(indices ...string) *IndicesGetFieldMappingService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Type is a list of document types.
-func (s *IndicesGetFieldMappingService) Type(types ...string) *IndicesGetFieldMappingService {
- s.typ = append(s.typ, types...)
- return s
-}
-
-// Field is a list of fields.
-func (s *IndicesGetFieldMappingService) Field(fields ...string) *IndicesGetFieldMappingService {
- s.field = append(s.field, fields...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// This includes `_all` string or when no indices have been specified.
-func (s *IndicesGetFieldMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetFieldMappingService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *IndicesGetFieldMappingService) ExpandWildcards(expandWildcards string) *IndicesGetFieldMappingService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Local indicates whether to return local information, do not retrieve
-// the state from master node (default: false).
-func (s *IndicesGetFieldMappingService) Local(local bool) *IndicesGetFieldMappingService {
- s.local = &local
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesGetFieldMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetFieldMappingService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesGetFieldMappingService) Pretty(pretty bool) *IndicesGetFieldMappingService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesGetFieldMappingService) buildURL() (string, url.Values, error) {
- var index, typ, field []string
-
- if len(s.index) > 0 {
- index = s.index
- } else {
- index = []string{"_all"}
- }
-
- if len(s.typ) > 0 {
- typ = s.typ
- } else {
- typ = []string{"_all"}
- }
-
- if len(s.field) > 0 {
- field = s.field
- } else {
- field = []string{"*"}
- }
-
- // Build URL
- path, err := uritemplates.Expand("/{index}/_mapping/{type}/field/{field}", map[string]string{
- "index": strings.Join(index, ","),
- "type": strings.Join(typ, ","),
- "field": strings.Join(field, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesGetFieldMappingService) Validate() error {
- return nil
-}
-
-// Do executes the operation. It returns mapping definitions for an index
-// or index/type.
-func (s *IndicesGetFieldMappingService) Do(ctx context.Context) (map[string]interface{}, error) {
- var ret map[string]interface{}
-
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_field_mapping_test.go b/vendor/github.com/olivere/elastic/indices_get_field_mapping_test.go
deleted file mode 100644
index 62770e030..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_field_mapping_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestIndicesGetFieldMappingURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Fields []string
- Expected string
- }{
- {
- []string{},
- []string{},
- []string{},
- "/_all/_mapping/_all/field/%2A",
- },
- {
- []string{},
- []string{"tweet"},
- []string{"message"},
- "/_all/_mapping/tweet/field/message",
- },
- {
- []string{"twitter"},
- []string{"tweet"},
- []string{"*.id"},
- "/twitter/_mapping/tweet/field/%2A.id",
- },
- {
- []string{"store-1", "store-2"},
- []string{"tweet", "user"},
- []string{"message", "*.id"},
- "/store-1%2Cstore-2/_mapping/tweet%2Cuser/field/message%2C%2A.id",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.GetFieldMapping().Index(test.Indices...).Type(test.Types...).Field(test.Fields...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_mapping.go b/vendor/github.com/olivere/elastic/indices_get_mapping.go
deleted file mode 100644
index 7f9c9cb22..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_mapping.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesGetMappingService retrieves the mapping definitions for an index or
-// index/type.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-get-mapping.html
-// for details.
-type IndicesGetMappingService struct {
- client *Client
- pretty bool
- index []string
- typ []string
- local *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewGetMappingService is an alias for NewIndicesGetMappingService.
-// Use NewIndicesGetMappingService.
-func NewGetMappingService(client *Client) *IndicesGetMappingService {
- return NewIndicesGetMappingService(client)
-}
-
-// NewIndicesGetMappingService creates a new IndicesGetMappingService.
-func NewIndicesGetMappingService(client *Client) *IndicesGetMappingService {
- return &IndicesGetMappingService{
- client: client,
- index: make([]string, 0),
- typ: make([]string, 0),
- }
-}
-
-// Index is a list of index names.
-func (s *IndicesGetMappingService) Index(indices ...string) *IndicesGetMappingService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Type is a list of document types.
-func (s *IndicesGetMappingService) Type(types ...string) *IndicesGetMappingService {
- s.typ = append(s.typ, types...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// This includes `_all` string or when no indices have been specified.
-func (s *IndicesGetMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetMappingService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *IndicesGetMappingService) ExpandWildcards(expandWildcards string) *IndicesGetMappingService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Local indicates whether to return local information, do not retrieve
-// the state from master node (default: false).
-func (s *IndicesGetMappingService) Local(local bool) *IndicesGetMappingService {
- s.local = &local
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesGetMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetMappingService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesGetMappingService) Pretty(pretty bool) *IndicesGetMappingService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesGetMappingService) buildURL() (string, url.Values, error) {
- var index, typ []string
-
- if len(s.index) > 0 {
- index = s.index
- } else {
- index = []string{"_all"}
- }
-
- if len(s.typ) > 0 {
- typ = s.typ
- } else {
- typ = []string{"_all"}
- }
-
- // Build URL
- path, err := uritemplates.Expand("/{index}/_mapping/{type}", map[string]string{
- "index": strings.Join(index, ","),
- "type": strings.Join(typ, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesGetMappingService) Validate() error {
- return nil
-}
-
-// Do executes the operation. It returns mapping definitions for an index
-// or index/type.
-func (s *IndicesGetMappingService) Do(ctx context.Context) (map[string]interface{}, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret map[string]interface{}
- if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_mapping_test.go b/vendor/github.com/olivere/elastic/indices_get_mapping_test.go
deleted file mode 100644
index 5ec54e7fb..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_mapping_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestIndicesGetMappingURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_all/_mapping/_all",
- },
- {
- []string{},
- []string{"tweet"},
- "/_all/_mapping/tweet",
- },
- {
- []string{"twitter"},
- []string{"tweet"},
- "/twitter/_mapping/tweet",
- },
- {
- []string{"store-1", "store-2"},
- []string{"tweet", "user"},
- "/store-1%2Cstore-2/_mapping/tweet%2Cuser",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.GetMapping().Index(test.Indices...).Type(test.Types...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_settings.go b/vendor/github.com/olivere/elastic/indices_get_settings.go
deleted file mode 100644
index 06fce0dfa..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_settings.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesGetSettingsService allows to retrieve settings of one
-// or more indices.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-get-settings.html
-// for more details.
-type IndicesGetSettingsService struct {
- client *Client
- pretty bool
- index []string
- name []string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
- flatSettings *bool
- local *bool
-}
-
-// NewIndicesGetSettingsService creates a new IndicesGetSettingsService.
-func NewIndicesGetSettingsService(client *Client) *IndicesGetSettingsService {
- return &IndicesGetSettingsService{
- client: client,
- index: make([]string, 0),
- name: make([]string, 0),
- }
-}
-
-// Index is a list of index names; use `_all` or empty string to perform
-// the operation on all indices.
-func (s *IndicesGetSettingsService) Index(indices ...string) *IndicesGetSettingsService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Name are the names of the settings that should be included.
-func (s *IndicesGetSettingsService) Name(name ...string) *IndicesGetSettingsService {
- s.name = append(s.name, name...)
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should
-// be ignored when unavailable (missing or closed).
-func (s *IndicesGetSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetSettingsService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *IndicesGetSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesGetSettingsService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression
-// to concrete indices that are open, closed or both.
-// Options: open, closed, none, all. Default: open,closed.
-func (s *IndicesGetSettingsService) ExpandWildcards(expandWildcards string) *IndicesGetSettingsService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// FlatSettings indicates whether to return settings in flat format (default: false).
-func (s *IndicesGetSettingsService) FlatSettings(flatSettings bool) *IndicesGetSettingsService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// Local indicates whether to return local information, do not retrieve
-// the state from master node (default: false).
-func (s *IndicesGetSettingsService) Local(local bool) *IndicesGetSettingsService {
- s.local = &local
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesGetSettingsService) Pretty(pretty bool) *IndicesGetSettingsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesGetSettingsService) buildURL() (string, url.Values, error) {
- var err error
- var path string
- var index []string
-
- if len(s.index) > 0 {
- index = s.index
- } else {
- index = []string{"_all"}
- }
-
- if len(s.name) > 0 {
- // Build URL
- path, err = uritemplates.Expand("/{index}/_settings/{name}", map[string]string{
- "index": strings.Join(index, ","),
- "name": strings.Join(s.name, ","),
- })
- } else {
- // Build URL
- path, err = uritemplates.Expand("/{index}/_settings", map[string]string{
- "index": strings.Join(index, ","),
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesGetSettingsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesGetSettingsService) Do(ctx context.Context) (map[string]*IndicesGetSettingsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret map[string]*IndicesGetSettingsResponse
- if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesGetSettingsResponse is the response of IndicesGetSettingsService.Do.
-type IndicesGetSettingsResponse struct {
- Settings map[string]interface{} `json:"settings"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_settings_test.go b/vendor/github.com/olivere/elastic/indices_get_settings_test.go
deleted file mode 100644
index 7c6995a28..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_settings_test.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndexGetSettingsURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Names []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_all/_settings",
- },
- {
- []string{},
- []string{"index.merge.*"},
- "/_all/_settings/index.merge.%2A",
- },
- {
- []string{"twitter-*"},
- []string{"index.merge.*", "_settings"},
- "/twitter-%2A/_settings/index.merge.%2A%2C_settings",
- },
- {
- []string{"store-1", "store-2"},
- []string{"index.merge.*", "_settings"},
- "/store-1%2Cstore-2/_settings/index.merge.%2A%2C_settings",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IndexGetSettings().Index(test.Indices...).Name(test.Names...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestIndexGetSettingsService(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "1.4.0" {
- t.Skip("Index Get API is available since 1.4")
- return
- }
-
- res, err := client.IndexGetSettings().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected result; got: %v", res)
- }
- info, found := res[testIndexName]
- if !found {
- t.Fatalf("expected index %q to be found; got: %v", testIndexName, found)
- }
- if info == nil {
- t.Fatalf("expected index %q to be != nil; got: %v", testIndexName, info)
- }
- if info.Settings == nil {
- t.Fatalf("expected index settings of %q to be != nil; got: %v", testIndexName, info.Settings)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_template.go b/vendor/github.com/olivere/elastic/indices_get_template.go
deleted file mode 100644
index ad3a091a0..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_template.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesGetTemplateService returns an index template.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html.
-type IndicesGetTemplateService struct {
- client *Client
- pretty bool
- name []string
- flatSettings *bool
- local *bool
-}
-
-// NewIndicesGetTemplateService creates a new IndicesGetTemplateService.
-func NewIndicesGetTemplateService(client *Client) *IndicesGetTemplateService {
- return &IndicesGetTemplateService{
- client: client,
- name: make([]string, 0),
- }
-}
-
-// Name is the name of the index template.
-func (s *IndicesGetTemplateService) Name(name ...string) *IndicesGetTemplateService {
- s.name = append(s.name, name...)
- return s
-}
-
-// FlatSettings is returns settings in flat format (default: false).
-func (s *IndicesGetTemplateService) FlatSettings(flatSettings bool) *IndicesGetTemplateService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// Local indicates whether to return local information, i.e. do not retrieve
-// the state from master node (default: false).
-func (s *IndicesGetTemplateService) Local(local bool) *IndicesGetTemplateService {
- s.local = &local
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesGetTemplateService) Pretty(pretty bool) *IndicesGetTemplateService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesGetTemplateService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.name) > 0 {
- path, err = uritemplates.Expand("/_template/{name}", map[string]string{
- "name": strings.Join(s.name, ","),
- })
- } else {
- path = "/_template"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesGetTemplateService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesGetTemplateService) Do(ctx context.Context) (map[string]*IndicesGetTemplateResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret map[string]*IndicesGetTemplateResponse
- if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesGetTemplateResponse is the response of IndicesGetTemplateService.Do.
-type IndicesGetTemplateResponse struct {
- Order int `json:"order,omitempty"`
- Version int `json:"version,omitempty"`
- Template string `json:"template,omitempty"`
- Settings map[string]interface{} `json:"settings,omitempty"`
- Mappings map[string]interface{} `json:"mappings,omitempty"`
- Aliases map[string]interface{} `json:"aliases,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_template_test.go b/vendor/github.com/olivere/elastic/indices_get_template_test.go
deleted file mode 100644
index c884ec1cb..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_template_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestIndexGetTemplateURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Names []string
- Expected string
- }{
- {
- []string{},
- "/_template",
- },
- {
- []string{"index1"},
- "/_template/index1",
- },
- {
- []string{"index1", "index2"},
- "/_template/index1%2Cindex2",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IndexGetTemplate().Name(test.Names...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_get_test.go b/vendor/github.com/olivere/elastic/indices_get_test.go
deleted file mode 100644
index 6d37fca6e..000000000
--- a/vendor/github.com/olivere/elastic/indices_get_test.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesGetValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesGetService(client).Index("").Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesGet to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
-
-func TestIndicesGetURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Features []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_all",
- },
- {
- []string{},
- []string{"_mappings"},
- "/_all/_mappings",
- },
- {
- []string{"twitter"},
- []string{"_mappings", "_settings"},
- "/twitter/_mappings%2C_settings",
- },
- {
- []string{"store-1", "store-2"},
- []string{"_mappings", "_settings"},
- "/store-1%2Cstore-2/_mappings%2C_settings",
- },
- }
-
- for _, test := range tests {
- path, _, err := NewIndicesGetService(client).Index(test.Indices...).Feature(test.Features...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestIndicesGetService(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "1.4.0" {
- t.Skip("Index Get API is available since 1.4")
- return
- }
-
- res, err := client.IndexGet().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("expected result; got: %v", res)
- }
- info, found := res[testIndexName]
- if !found {
- t.Fatalf("expected index %q to be found; got: %v", testIndexName, found)
- }
- if info == nil {
- t.Fatalf("expected index %q to be != nil; got: %v", testIndexName, info)
- }
- if info.Mappings == nil {
- t.Errorf("expected mappings to be != nil; got: %v", info.Mappings)
- }
- if info.Settings == nil {
- t.Errorf("expected settings to be != nil; got: %v", info.Settings)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_open.go b/vendor/github.com/olivere/elastic/indices_open.go
deleted file mode 100644
index 1b58c5721..000000000
--- a/vendor/github.com/olivere/elastic/indices_open.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesOpenService opens an index.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-open-close.html
-// for details.
-type IndicesOpenService struct {
- client *Client
- pretty bool
- index string
- timeout string
- masterTimeout string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewIndicesOpenService creates and initializes a new IndicesOpenService.
-func NewIndicesOpenService(client *Client) *IndicesOpenService {
- return &IndicesOpenService{client: client}
-}
-
-// Index is the name of the index to open.
-func (s *IndicesOpenService) Index(index string) *IndicesOpenService {
- s.index = index
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesOpenService) Timeout(timeout string) *IndicesOpenService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesOpenService) MasterTimeout(masterTimeout string) *IndicesOpenService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should
-// be ignored when unavailable (missing or closed).
-func (s *IndicesOpenService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesOpenService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// (This includes `_all` string or when no indices have been specified).
-func (s *IndicesOpenService) AllowNoIndices(allowNoIndices bool) *IndicesOpenService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both..
-func (s *IndicesOpenService) ExpandWildcards(expandWildcards string) *IndicesOpenService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesOpenService) Pretty(pretty bool) *IndicesOpenService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesOpenService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{index}/_open", map[string]string{
- "index": s.index,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
-
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesOpenService) Validate() error {
- var invalid []string
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesOpenService) Do(ctx context.Context) (*IndicesOpenResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesOpenResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesOpenResponse is the response of IndicesOpenService.Do.
-type IndicesOpenResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_open_test.go b/vendor/github.com/olivere/elastic/indices_open_test.go
deleted file mode 100644
index aab6c5c19..000000000
--- a/vendor/github.com/olivere/elastic/indices_open_test.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesOpenValidate(t *testing.T) {
- client := setupTestClient(t)
-
- // No index name -> fail with error
- res, err := NewIndicesOpenService(client).Do(context.TODO())
- if err == nil {
- t.Fatalf("expected IndicesOpen to fail without index name")
- }
- if res != nil {
- t.Fatalf("expected result to be == nil; got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_alias.go b/vendor/github.com/olivere/elastic/indices_put_alias.go
deleted file mode 100644
index 12f8e1bd5..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_alias.go
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-)
-
-// -- Actions --
-
-// AliasAction is an action to apply to an alias, e.g. "add" or "remove".
-type AliasAction interface {
- Source() (interface{}, error)
-}
-
-// AliasAddAction is an action to add to an alias.
-type AliasAddAction struct {
- index []string // index name(s)
- alias string // alias name
- filter Query
- routing string
- searchRouting string
- indexRouting string
-}
-
-// NewAliasAddAction returns an action to add an alias.
-func NewAliasAddAction(alias string) *AliasAddAction {
- return &AliasAddAction{
- alias: alias,
- }
-}
-
-// Index associates one or more indices to the alias.
-func (a *AliasAddAction) Index(index ...string) *AliasAddAction {
- a.index = append(a.index, index...)
- return a
-}
-
-func (a *AliasAddAction) removeBlankIndexNames() {
- var indices []string
- for _, index := range a.index {
- if len(index) > 0 {
- indices = append(indices, index)
- }
- }
- a.index = indices
-}
-
-// Filter associates a filter to the alias.
-func (a *AliasAddAction) Filter(filter Query) *AliasAddAction {
- a.filter = filter
- return a
-}
-
-// Routing associates a routing value to the alias.
-// This basically sets index and search routing to the same value.
-func (a *AliasAddAction) Routing(routing string) *AliasAddAction {
- a.routing = routing
- return a
-}
-
-// IndexRouting associates an index routing value to the alias.
-func (a *AliasAddAction) IndexRouting(routing string) *AliasAddAction {
- a.indexRouting = routing
- return a
-}
-
-// SearchRouting associates a search routing value to the alias.
-func (a *AliasAddAction) SearchRouting(routing ...string) *AliasAddAction {
- a.searchRouting = strings.Join(routing, ",")
- return a
-}
-
-// Validate checks if the operation is valid.
-func (a *AliasAddAction) Validate() error {
- var invalid []string
- if len(a.alias) == 0 {
- invalid = append(invalid, "Alias")
- }
- if len(a.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Source returns the JSON-serializable data.
-func (a *AliasAddAction) Source() (interface{}, error) {
- a.removeBlankIndexNames()
- if err := a.Validate(); err != nil {
- return nil, err
- }
- src := make(map[string]interface{})
- act := make(map[string]interface{})
- src["add"] = act
- act["alias"] = a.alias
- switch len(a.index) {
- case 1:
- act["index"] = a.index[0]
- default:
- act["indices"] = a.index
- }
- if a.filter != nil {
- f, err := a.filter.Source()
- if err != nil {
- return nil, err
- }
- act["filter"] = f
- }
- if len(a.routing) > 0 {
- act["routing"] = a.routing
- }
- if len(a.indexRouting) > 0 {
- act["index_routing"] = a.indexRouting
- }
- if len(a.searchRouting) > 0 {
- act["search_routing"] = a.searchRouting
- }
- return src, nil
-}
-
-// AliasRemoveAction is an action to remove an alias.
-type AliasRemoveAction struct {
- index []string // index name(s)
- alias string // alias name
-}
-
-// NewAliasRemoveAction returns an action to remove an alias.
-func NewAliasRemoveAction(alias string) *AliasRemoveAction {
- return &AliasRemoveAction{
- alias: alias,
- }
-}
-
-// Index associates one or more indices to the alias.
-func (a *AliasRemoveAction) Index(index ...string) *AliasRemoveAction {
- a.index = append(a.index, index...)
- return a
-}
-
-func (a *AliasRemoveAction) removeBlankIndexNames() {
- var indices []string
- for _, index := range a.index {
- if len(index) > 0 {
- indices = append(indices, index)
- }
- }
- a.index = indices
-}
-
-// Validate checks if the operation is valid.
-func (a *AliasRemoveAction) Validate() error {
- var invalid []string
- if len(a.alias) == 0 {
- invalid = append(invalid, "Alias")
- }
- if len(a.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Source returns the JSON-serializable data.
-func (a *AliasRemoveAction) Source() (interface{}, error) {
- a.removeBlankIndexNames()
- if err := a.Validate(); err != nil {
- return nil, err
- }
- src := make(map[string]interface{})
- act := make(map[string]interface{})
- src["remove"] = act
- act["alias"] = a.alias
- switch len(a.index) {
- case 1:
- act["index"] = a.index[0]
- default:
- act["indices"] = a.index
- }
- return src, nil
-}
-
-// -- Service --
-
-// AliasService enables users to add or remove an alias.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-aliases.html
-// for details.
-type AliasService struct {
- client *Client
- actions []AliasAction
- pretty bool
-}
-
-// NewAliasService implements a service to manage aliases.
-func NewAliasService(client *Client) *AliasService {
- builder := &AliasService{
- client: client,
- }
- return builder
-}
-
-// Pretty asks Elasticsearch to indent the HTTP response.
-func (s *AliasService) Pretty(pretty bool) *AliasService {
- s.pretty = pretty
- return s
-}
-
-// Add adds an alias to an index.
-func (s *AliasService) Add(indexName string, aliasName string) *AliasService {
- action := NewAliasAddAction(aliasName).Index(indexName)
- s.actions = append(s.actions, action)
- return s
-}
-
-// Add adds an alias to an index and associates a filter to the alias.
-func (s *AliasService) AddWithFilter(indexName string, aliasName string, filter Query) *AliasService {
- action := NewAliasAddAction(aliasName).Index(indexName).Filter(filter)
- s.actions = append(s.actions, action)
- return s
-}
-
-// Remove removes an alias.
-func (s *AliasService) Remove(indexName string, aliasName string) *AliasService {
- action := NewAliasRemoveAction(aliasName).Index(indexName)
- s.actions = append(s.actions, action)
- return s
-}
-
-// Action accepts one or more AliasAction instances which can be
-// of type AliasAddAction or AliasRemoveAction.
-func (s *AliasService) Action(action ...AliasAction) *AliasService {
- s.actions = append(s.actions, action...)
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *AliasService) buildURL() (string, url.Values, error) {
- path := "/_aliases"
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- return path, params, nil
-}
-
-// Do executes the command.
-func (s *AliasService) Do(ctx context.Context) (*AliasResult, error) {
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Body with actions
- body := make(map[string]interface{})
- var actions []interface{}
- for _, action := range s.actions {
- src, err := action.Source()
- if err != nil {
- return nil, err
- }
- actions = append(actions, src)
- }
- body["actions"] = actions
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return results
- ret := new(AliasResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of an alias request.
-
-// AliasResult is the outcome of calling Do on AliasService.
-type AliasResult struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_alias_test.go b/vendor/github.com/olivere/elastic/indices_put_alias_test.go
deleted file mode 100644
index ada1dfdef..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_alias_test.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-const (
- testAliasName = "elastic-test-alias"
-)
-
-func TestAliasLifecycle(t *testing.T) {
- var err error
-
- client := setupTestClientAndCreateIndex(t)
-
- // Some tweets
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "sandrae", Message: "Cycling is fun."}
- tweet3 := tweet{User: "olivere", Message: "Another unrelated topic."}
-
- // Add tweets to first index
- _, err = client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Add tweets to second index
- _, err = client.Index().Index(testIndexName2).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Flush
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Flush().Index(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Add both indices to a new alias
- aliasCreate, err := client.Alias().
- Add(testIndexName, testAliasName).
- Action(NewAliasAddAction(testAliasName).Index(testIndexName2)).
- //Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !aliasCreate.Acknowledged {
- t.Errorf("expected AliasResult.Acknowledged %v; got %v", true, aliasCreate.Acknowledged)
- }
-
- // Search should return all 3 tweets
- matchAll := NewMatchAllQuery()
- searchResult1, err := client.Search().Index(testAliasName).Query(matchAll).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult1.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult1.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult1.Hits.TotalHits)
- }
-
- // Remove first index should remove two tweets, so should only yield 1
- aliasRemove1, err := client.Alias().
- Remove(testIndexName, testAliasName).
- //Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if !aliasRemove1.Acknowledged {
- t.Errorf("expected AliasResult.Acknowledged %v; got %v", true, aliasRemove1.Acknowledged)
- }
-
- searchResult2, err := client.Search().Index(testAliasName).Query(matchAll).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult2.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult2.Hits.TotalHits != 1 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 1, searchResult2.Hits.TotalHits)
- }
-}
-
-func TestAliasAddAction(t *testing.T) {
- var tests = []struct {
- Action *AliasAddAction
- Expected string
- Invalid bool
- }{
- {
- Action: NewAliasAddAction("").Index(""),
- Invalid: true,
- },
- {
- Action: NewAliasAddAction("alias1").Index(""),
- Invalid: true,
- },
- {
- Action: NewAliasAddAction("").Index("index1"),
- Invalid: true,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1"),
- Expected: `{"add":{"alias":"alias1","index":"index1"}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1", "index2"),
- Expected: `{"add":{"alias":"alias1","indices":["index1","index2"]}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1").Routing("routing1"),
- Expected: `{"add":{"alias":"alias1","index":"index1","routing":"routing1"}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1").Routing("routing1").IndexRouting("indexRouting1"),
- Expected: `{"add":{"alias":"alias1","index":"index1","index_routing":"indexRouting1","routing":"routing1"}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1").Routing("routing1").SearchRouting("searchRouting1"),
- Expected: `{"add":{"alias":"alias1","index":"index1","routing":"routing1","search_routing":"searchRouting1"}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1").Routing("routing1").SearchRouting("searchRouting1", "searchRouting2"),
- Expected: `{"add":{"alias":"alias1","index":"index1","routing":"routing1","search_routing":"searchRouting1,searchRouting2"}}`,
- },
- {
- Action: NewAliasAddAction("alias1").Index("index1").Filter(NewTermQuery("user", "olivere")),
- Expected: `{"add":{"alias":"alias1","filter":{"term":{"user":"olivere"}},"index":"index1"}}`,
- },
- }
-
- for i, tt := range tests {
- src, err := tt.Action.Source()
- if err != nil {
- if !tt.Invalid {
- t.Errorf("#%d: expected to succeed", i)
- }
- } else {
- if tt.Invalid {
- t.Errorf("#%d: expected to fail", i)
- } else {
- dst, err := json.Marshal(src)
- if err != nil {
- t.Fatal(err)
- }
- if want, have := tt.Expected, string(dst); want != have {
- t.Errorf("#%d: expected %s, got %s", i, want, have)
- }
- }
- }
- }
-}
-
-func TestAliasRemoveAction(t *testing.T) {
- var tests = []struct {
- Action *AliasRemoveAction
- Expected string
- Invalid bool
- }{
- {
- Action: NewAliasRemoveAction(""),
- Invalid: true,
- },
- {
- Action: NewAliasRemoveAction("alias1"),
- Invalid: true,
- },
- {
- Action: NewAliasRemoveAction("").Index("index1"),
- Invalid: true,
- },
- {
- Action: NewAliasRemoveAction("alias1").Index("index1"),
- Expected: `{"remove":{"alias":"alias1","index":"index1"}}`,
- },
- {
- Action: NewAliasRemoveAction("alias1").Index("index1", "index2"),
- Expected: `{"remove":{"alias":"alias1","indices":["index1","index2"]}}`,
- },
- }
-
- for i, tt := range tests {
- src, err := tt.Action.Source()
- if err != nil {
- if !tt.Invalid {
- t.Errorf("#%d: expected to succeed", i)
- }
- } else {
- if tt.Invalid {
- t.Errorf("#%d: expected to fail", i)
- } else {
- dst, err := json.Marshal(src)
- if err != nil {
- t.Fatal(err)
- }
- if want, have := tt.Expected, string(dst); want != have {
- t.Errorf("#%d: expected %s, got %s", i, want, have)
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_mapping.go b/vendor/github.com/olivere/elastic/indices_put_mapping.go
deleted file mode 100644
index 2f8a35e4c..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_mapping.go
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesPutMappingService allows to register specific mapping definition
-// for a specific type.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-put-mapping.html
-// for details.
-type IndicesPutMappingService struct {
- client *Client
- pretty bool
- typ string
- index []string
- masterTimeout string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
- updateAllTypes *bool
- timeout string
- bodyJson map[string]interface{}
- bodyString string
-}
-
-// NewPutMappingService is an alias for NewIndicesPutMappingService.
-// Use NewIndicesPutMappingService.
-func NewPutMappingService(client *Client) *IndicesPutMappingService {
- return NewIndicesPutMappingService(client)
-}
-
-// NewIndicesPutMappingService creates a new IndicesPutMappingService.
-func NewIndicesPutMappingService(client *Client) *IndicesPutMappingService {
- return &IndicesPutMappingService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index is a list of index names the mapping should be added to
-// (supports wildcards); use `_all` or omit to add the mapping on all indices.
-func (s *IndicesPutMappingService) Index(indices ...string) *IndicesPutMappingService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Type is the name of the document type.
-func (s *IndicesPutMappingService) Type(typ string) *IndicesPutMappingService {
- s.typ = typ
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesPutMappingService) Timeout(timeout string) *IndicesPutMappingService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesPutMappingService) MasterTimeout(masterTimeout string) *IndicesPutMappingService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesPutMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutMappingService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices.
-// This includes `_all` string or when no indices have been specified.
-func (s *IndicesPutMappingService) AllowNoIndices(allowNoIndices bool) *IndicesPutMappingService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *IndicesPutMappingService) ExpandWildcards(expandWildcards string) *IndicesPutMappingService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// UpdateAllTypes, if true, indicates that all fields that span multiple indices
-// should be updated (default: false).
-func (s *IndicesPutMappingService) UpdateAllTypes(updateAllTypes bool) *IndicesPutMappingService {
- s.updateAllTypes = &updateAllTypes
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesPutMappingService) Pretty(pretty bool) *IndicesPutMappingService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson contains the mapping definition.
-func (s *IndicesPutMappingService) BodyJson(mapping map[string]interface{}) *IndicesPutMappingService {
- s.bodyJson = mapping
- return s
-}
-
-// BodyString is the mapping definition serialized as a string.
-func (s *IndicesPutMappingService) BodyString(mapping string) *IndicesPutMappingService {
- s.bodyString = mapping
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesPutMappingService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- // Build URL: Typ MUST be specified and is verified in Validate.
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_mapping/{type}", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": s.typ,
- })
- } else {
- path, err = uritemplates.Expand("/_mapping/{type}", map[string]string{
- "type": s.typ,
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.updateAllTypes != nil {
- params.Set("update_all_types", fmt.Sprintf("%v", *s.updateAllTypes))
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesPutMappingService) Validate() error {
- var invalid []string
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesPutMappingService) Do(ctx context.Context) (*PutMappingResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(PutMappingResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// PutMappingResponse is the response of IndicesPutMappingService.Do.
-type PutMappingResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_mapping_test.go b/vendor/github.com/olivere/elastic/indices_put_mapping_test.go
deleted file mode 100644
index 644e1187a..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_mapping_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestPutMappingURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Type string
- Expected string
- }{
- {
- []string{},
- "doc",
- "/_mapping/doc",
- },
- {
- []string{"*"},
- "doc",
- "/%2A/_mapping/doc",
- },
- {
- []string{"store-1", "store-2"},
- "doc",
- "/store-1%2Cstore-2/_mapping/doc",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.PutMapping().Index(test.Indices...).Type(test.Type).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestMappingLifecycle(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- //client := setupTestClientAndCreateIndexAndLog(t)
-
- // Create index
- createIndex, err := client.CreateIndex(testIndexName3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex)
- }
-
- mapping := `{
- "doc":{
- "properties":{
- "field":{
- "type":"keyword"
- }
- }
- }
- }`
-
- putresp, err := client.PutMapping().Index(testIndexName3).Type("doc").BodyString(mapping).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected put mapping to succeed; got: %v", err)
- }
- if putresp == nil {
- t.Fatalf("expected put mapping response; got: %v", putresp)
- }
- if !putresp.Acknowledged {
- t.Fatalf("expected put mapping ack; got: %v", putresp.Acknowledged)
- }
-
- getresp, err := client.GetMapping().Index(testIndexName3).Type("doc").Do(context.TODO())
- if err != nil {
- t.Fatalf("expected get mapping to succeed; got: %v", err)
- }
- if getresp == nil {
- t.Fatalf("expected get mapping response; got: %v", getresp)
- }
- props, ok := getresp[testIndexName3]
- if !ok {
- t.Fatalf("expected JSON root to be of type map[string]interface{}; got: %#v", props)
- }
-
- // NOTE There is no Delete Mapping API in Elasticsearch 2.0
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_settings.go b/vendor/github.com/olivere/elastic/indices_put_settings.go
deleted file mode 100644
index 1283eb669..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_settings.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesPutSettingsService changes specific index level settings in
-// real time.
-//
-// See the documentation at
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-update-settings.html.
-type IndicesPutSettingsService struct {
- client *Client
- pretty bool
- index []string
- allowNoIndices *bool
- expandWildcards string
- flatSettings *bool
- ignoreUnavailable *bool
- masterTimeout string
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesPutSettingsService creates a new IndicesPutSettingsService.
-func NewIndicesPutSettingsService(client *Client) *IndicesPutSettingsService {
- return &IndicesPutSettingsService{
- client: client,
- index: make([]string, 0),
- }
-}
-
-// Index is a list of index names the mapping should be added to
-// (supports wildcards); use `_all` or omit to add the mapping on all indices.
-func (s *IndicesPutSettingsService) Index(indices ...string) *IndicesPutSettingsService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes `_all`
-// string or when no indices have been specified).
-func (s *IndicesPutSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesPutSettingsService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards specifies whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *IndicesPutSettingsService) ExpandWildcards(expandWildcards string) *IndicesPutSettingsService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// FlatSettings indicates whether to return settings in flat format (default: false).
-func (s *IndicesPutSettingsService) FlatSettings(flatSettings bool) *IndicesPutSettingsService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// IgnoreUnavailable specifies whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesPutSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutSettingsService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// MasterTimeout is the timeout for connection to master.
-func (s *IndicesPutSettingsService) MasterTimeout(masterTimeout string) *IndicesPutSettingsService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesPutSettingsService) Pretty(pretty bool) *IndicesPutSettingsService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is documented as: The index settings to be updated.
-func (s *IndicesPutSettingsService) BodyJson(body interface{}) *IndicesPutSettingsService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: The index settings to be updated.
-func (s *IndicesPutSettingsService) BodyString(body string) *IndicesPutSettingsService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesPutSettingsService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
-
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_settings", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_settings"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesPutSettingsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesPutSettingsService) Do(ctx context.Context) (*IndicesPutSettingsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesPutSettingsResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesPutSettingsResponse is the response of IndicesPutSettingsService.Do.
-type IndicesPutSettingsResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_settings_test.go b/vendor/github.com/olivere/elastic/indices_put_settings_test.go
deleted file mode 100644
index 0ceea3ef8..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_settings_test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesPutSettingsBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Expected string
- }{
- {
- []string{},
- "/_settings",
- },
- {
- []string{"*"},
- "/%2A/_settings",
- },
- {
- []string{"store-1", "store-2"},
- "/store-1%2Cstore-2/_settings",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IndexPutSettings().Index(test.Indices...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestIndicesSettingsLifecycle(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- body := `{
- "index":{
- "refresh_interval":"-1"
- }
- }`
-
- // Put settings
- putres, err := client.IndexPutSettings().Index(testIndexName).BodyString(body).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected put settings to succeed; got: %v", err)
- }
- if putres == nil {
- t.Fatalf("expected put settings response; got: %v", putres)
- }
- if !putres.Acknowledged {
- t.Fatalf("expected put settings ack; got: %v", putres.Acknowledged)
- }
-
- // Read settings
- getres, err := client.IndexGetSettings().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected get mapping to succeed; got: %v", err)
- }
- if getres == nil {
- t.Fatalf("expected get mapping response; got: %v", getres)
- }
-
- // Check settings
- index, found := getres[testIndexName]
- if !found {
- t.Fatalf("expected to return settings for index %q; got: %#v", testIndexName, getres)
- }
- // Retrieve "index" section of the settings for index testIndexName
- sectionIntf, ok := index.Settings["index"]
- if !ok {
- t.Fatalf("expected settings to have %q field; got: %#v", "index", getres)
- }
- section, ok := sectionIntf.(map[string]interface{})
- if !ok {
- t.Fatalf("expected settings to be of type map[string]interface{}; got: %#v", getres)
- }
- refintv, ok := section["refresh_interval"]
- if !ok {
- t.Fatalf(`expected JSON to include "refresh_interval" field; got: %#v`, getres)
- }
- if got, want := refintv, "-1"; got != want {
- t.Fatalf("expected refresh_interval = %v; got: %v", want, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_put_template.go b/vendor/github.com/olivere/elastic/indices_put_template.go
deleted file mode 100644
index c0b959647..000000000
--- a/vendor/github.com/olivere/elastic/indices_put_template.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesPutTemplateService creates or updates index mappings.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html.
-type IndicesPutTemplateService struct {
- client *Client
- pretty bool
- name string
- cause string
- order interface{}
- version *int
- create *bool
- timeout string
- masterTimeout string
- flatSettings *bool
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesPutTemplateService creates a new IndicesPutTemplateService.
-func NewIndicesPutTemplateService(client *Client) *IndicesPutTemplateService {
- return &IndicesPutTemplateService{
- client: client,
- }
-}
-
-// Name is the name of the index template.
-func (s *IndicesPutTemplateService) Name(name string) *IndicesPutTemplateService {
- s.name = name
- return s
-}
-
-// Cause describes the cause for this index template creation. This is currently
-// undocumented, but part of the Java source.
-func (s *IndicesPutTemplateService) Cause(cause string) *IndicesPutTemplateService {
- s.cause = cause
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesPutTemplateService) Timeout(timeout string) *IndicesPutTemplateService {
- s.timeout = timeout
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesPutTemplateService) MasterTimeout(masterTimeout string) *IndicesPutTemplateService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// FlatSettings indicates whether to return settings in flat format (default: false).
-func (s *IndicesPutTemplateService) FlatSettings(flatSettings bool) *IndicesPutTemplateService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// Order is the order for this template when merging multiple matching ones
-// (higher numbers are merged later, overriding the lower numbers).
-func (s *IndicesPutTemplateService) Order(order interface{}) *IndicesPutTemplateService {
- s.order = order
- return s
-}
-
-// Version sets the version number for this template.
-func (s *IndicesPutTemplateService) Version(version int) *IndicesPutTemplateService {
- s.version = &version
- return s
-}
-
-// Create indicates whether the index template should only be added if
-// new or can also replace an existing one.
-func (s *IndicesPutTemplateService) Create(create bool) *IndicesPutTemplateService {
- s.create = &create
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesPutTemplateService) Pretty(pretty bool) *IndicesPutTemplateService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is documented as: The template definition.
-func (s *IndicesPutTemplateService) BodyJson(body interface{}) *IndicesPutTemplateService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: The template definition.
-func (s *IndicesPutTemplateService) BodyString(body string) *IndicesPutTemplateService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesPutTemplateService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_template/{name}", map[string]string{
- "name": s.name,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.order != nil {
- params.Set("order", fmt.Sprintf("%v", s.order))
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", *s.version))
- }
- if s.create != nil {
- params.Set("create", fmt.Sprintf("%v", *s.create))
- }
- if s.cause != "" {
- params.Set("cause", s.cause)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesPutTemplateService) Validate() error {
- var invalid []string
- if s.name == "" {
- invalid = append(invalid, "Name")
- }
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesPutTemplateService) Do(ctx context.Context) (*IndicesPutTemplateResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesPutTemplateResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesPutTemplateResponse is the response of IndicesPutTemplateService.Do.
-type IndicesPutTemplateResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_refresh.go b/vendor/github.com/olivere/elastic/indices_refresh.go
deleted file mode 100644
index f6c7f165e..000000000
--- a/vendor/github.com/olivere/elastic/indices_refresh.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// RefreshService explicitly refreshes one or more indices.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-refresh.html.
-type RefreshService struct {
- client *Client
- index []string
- pretty bool
-}
-
-// NewRefreshService creates a new instance of RefreshService.
-func NewRefreshService(client *Client) *RefreshService {
- builder := &RefreshService{
- client: client,
- }
- return builder
-}
-
-// Index specifies the indices to refresh.
-func (s *RefreshService) Index(index ...string) *RefreshService {
- s.index = append(s.index, index...)
- return s
-}
-
-// Pretty asks Elasticsearch to return indented JSON.
-func (s *RefreshService) Pretty(pretty bool) *RefreshService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *RefreshService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_refresh", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_refresh"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- return path, params, nil
-}
-
-// Do executes the request.
-func (s *RefreshService) Do(ctx context.Context) (*RefreshResult, error) {
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return result
- ret := new(RefreshResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Result of a refresh request.
-
-// RefreshResult is the outcome of RefreshService.Do.
-type RefreshResult struct {
- Shards shardsInfo `json:"_shards,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_refresh_test.go b/vendor/github.com/olivere/elastic/indices_refresh_test.go
deleted file mode 100644
index 8640fb602..000000000
--- a/vendor/github.com/olivere/elastic/indices_refresh_test.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestRefreshBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Expected string
- }{
- {
- []string{},
- "/_refresh",
- },
- {
- []string{"index1"},
- "/index1/_refresh",
- },
- {
- []string{"index1", "index2"},
- "/index1%2Cindex2/_refresh",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.Refresh().Index(test.Indices...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestRefresh(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add some documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Refresh indices
- res, err := client.Refresh(testIndexName, testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected result; got nil")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_rollover.go b/vendor/github.com/olivere/elastic/indices_rollover.go
deleted file mode 100644
index 841b3836f..000000000
--- a/vendor/github.com/olivere/elastic/indices_rollover.go
+++ /dev/null
@@ -1,272 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesRolloverService rolls an alias over to a new index when the
-// existing index is considered to be too large or too old.
-//
-// It is documented at
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-rollover-index.html.
-type IndicesRolloverService struct {
- client *Client
- pretty bool
- dryRun bool
- newIndex string
- alias string
- masterTimeout string
- timeout string
- waitForActiveShards string
- conditions map[string]interface{}
- settings map[string]interface{}
- mappings map[string]interface{}
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesRolloverService creates a new IndicesRolloverService.
-func NewIndicesRolloverService(client *Client) *IndicesRolloverService {
- return &IndicesRolloverService{
- client: client,
- conditions: make(map[string]interface{}),
- settings: make(map[string]interface{}),
- mappings: make(map[string]interface{}),
- }
-}
-
-// Alias is the name of the alias to rollover.
-func (s *IndicesRolloverService) Alias(alias string) *IndicesRolloverService {
- s.alias = alias
- return s
-}
-
-// NewIndex is the name of the rollover index.
-func (s *IndicesRolloverService) NewIndex(newIndex string) *IndicesRolloverService {
- s.newIndex = newIndex
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesRolloverService) MasterTimeout(masterTimeout string) *IndicesRolloverService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout sets an explicit operation timeout.
-func (s *IndicesRolloverService) Timeout(timeout string) *IndicesRolloverService {
- s.timeout = timeout
- return s
-}
-
-// WaitForActiveShards sets the number of active shards to wait for on the
-// newly created rollover index before the operation returns.
-func (s *IndicesRolloverService) WaitForActiveShards(waitForActiveShards string) *IndicesRolloverService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesRolloverService) Pretty(pretty bool) *IndicesRolloverService {
- s.pretty = pretty
- return s
-}
-
-// DryRun, when set, specifies that only conditions are checked without
-// performing the actual rollover.
-func (s *IndicesRolloverService) DryRun(dryRun bool) *IndicesRolloverService {
- s.dryRun = dryRun
- return s
-}
-
-// Conditions allows to specify all conditions as a dictionary.
-func (s *IndicesRolloverService) Conditions(conditions map[string]interface{}) *IndicesRolloverService {
- s.conditions = conditions
- return s
-}
-
-// AddCondition adds a condition to the rollover decision.
-func (s *IndicesRolloverService) AddCondition(name string, value interface{}) *IndicesRolloverService {
- s.conditions[name] = value
- return s
-}
-
-// AddMaxIndexAgeCondition adds a condition to set the max index age.
-func (s *IndicesRolloverService) AddMaxIndexAgeCondition(time string) *IndicesRolloverService {
- s.conditions["max_age"] = time
- return s
-}
-
-// AddMaxIndexDocsCondition adds a condition to set the max documents in the index.
-func (s *IndicesRolloverService) AddMaxIndexDocsCondition(docs int64) *IndicesRolloverService {
- s.conditions["max_docs"] = docs
- return s
-}
-
-// Settings adds the index settings.
-func (s *IndicesRolloverService) Settings(settings map[string]interface{}) *IndicesRolloverService {
- s.settings = settings
- return s
-}
-
-// AddSetting adds an index setting.
-func (s *IndicesRolloverService) AddSetting(name string, value interface{}) *IndicesRolloverService {
- s.settings[name] = value
- return s
-}
-
-// Mappings adds the index mappings.
-func (s *IndicesRolloverService) Mappings(mappings map[string]interface{}) *IndicesRolloverService {
- s.mappings = mappings
- return s
-}
-
-// AddMapping adds a mapping for the given type.
-func (s *IndicesRolloverService) AddMapping(typ string, mapping interface{}) *IndicesRolloverService {
- s.mappings[typ] = mapping
- return s
-}
-
-// BodyJson sets the conditions that needs to be met for executing rollover,
-// specified as a serializable JSON instance which is sent as the body of
-// the request.
-func (s *IndicesRolloverService) BodyJson(body interface{}) *IndicesRolloverService {
- s.bodyJson = body
- return s
-}
-
-// BodyString sets the conditions that needs to be met for executing rollover,
-// specified as a string which is sent as the body of the request.
-func (s *IndicesRolloverService) BodyString(body string) *IndicesRolloverService {
- s.bodyString = body
- return s
-}
-
-// getBody returns the body of the request, if not explicitly set via
-// BodyJson or BodyString.
-func (s *IndicesRolloverService) getBody() interface{} {
- body := make(map[string]interface{})
- if len(s.conditions) > 0 {
- body["conditions"] = s.conditions
- }
- if len(s.settings) > 0 {
- body["settings"] = s.settings
- }
- if len(s.mappings) > 0 {
- body["mappings"] = s.mappings
- }
- return body
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesRolloverService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if s.newIndex != "" {
- path, err = uritemplates.Expand("/{alias}/_rollover/{new_index}", map[string]string{
- "alias": s.alias,
- "new_index": s.newIndex,
- })
- } else {
- path, err = uritemplates.Expand("/{alias}/_rollover", map[string]string{
- "alias": s.alias,
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.dryRun {
- params.Set("dry_run", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesRolloverService) Validate() error {
- var invalid []string
- if s.alias == "" {
- invalid = append(invalid, "Alias")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesRolloverService) Do(ctx context.Context) (*IndicesRolloverResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else if s.bodyString != "" {
- body = s.bodyString
- } else {
- body = s.getBody()
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesRolloverResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesRolloverResponse is the response of IndicesRolloverService.Do.
-type IndicesRolloverResponse struct {
- OldIndex string `json:"old_index"`
- NewIndex string `json:"new_index"`
- RolledOver bool `json:"rolled_over"`
- DryRun bool `json:"dry_run"`
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Conditions map[string]bool `json:"conditions"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_rollover_test.go b/vendor/github.com/olivere/elastic/indices_rollover_test.go
deleted file mode 100644
index 81d7099e0..000000000
--- a/vendor/github.com/olivere/elastic/indices_rollover_test.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestIndicesRolloverBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Alias string
- NewIndex string
- Expected string
- }{
- {
- "logs_write",
- "",
- "/logs_write/_rollover",
- },
- {
- "logs_write",
- "my_new_index_name",
- "/logs_write/_rollover/my_new_index_name",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.RolloverIndex(test.Alias).NewIndex(test.NewIndex).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestIndicesRolloverBodyConditions(t *testing.T) {
- client := setupTestClient(t)
- svc := NewIndicesRolloverService(client).
- Conditions(map[string]interface{}{
- "max_age": "7d",
- "max_docs": 1000,
- })
- data, err := json.Marshal(svc.getBody())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"conditions":{"max_age":"7d","max_docs":1000}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIndicesRolloverBodyAddCondition(t *testing.T) {
- client := setupTestClient(t)
- svc := NewIndicesRolloverService(client).
- AddCondition("max_age", "7d").
- AddCondition("max_docs", 1000)
- data, err := json.Marshal(svc.getBody())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"conditions":{"max_age":"7d","max_docs":1000}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIndicesRolloverBodyAddPredefinedConditions(t *testing.T) {
- client := setupTestClient(t)
- svc := NewIndicesRolloverService(client).
- AddMaxIndexAgeCondition("2d").
- AddMaxIndexDocsCondition(1000000)
- data, err := json.Marshal(svc.getBody())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"conditions":{"max_age":"2d","max_docs":1000000}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIndicesRolloverBodyComplex(t *testing.T) {
- client := setupTestClient(t)
- svc := NewIndicesRolloverService(client).
- AddMaxIndexAgeCondition("2d").
- AddMaxIndexDocsCondition(1000000).
- AddSetting("index.number_of_shards", 2).
- AddMapping("doc", map[string]interface{}{
- "properties": map[string]interface{}{
- "user": map[string]interface{}{
- "type": "keyword",
- },
- },
- })
- data, err := json.Marshal(svc.getBody())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"conditions":{"max_age":"2d","max_docs":1000000},"mappings":{"doc":{"properties":{"user":{"type":"keyword"}}}},"settings":{"index.number_of_shards":2}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_segments.go b/vendor/github.com/olivere/elastic/indices_segments.go
deleted file mode 100644
index 133d1101e..000000000
--- a/vendor/github.com/olivere/elastic/indices_segments.go
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesSegmentsService provides low level segments information that a
-// Lucene index (shard level) is built with. Allows to be used to provide
-// more information on the state of a shard and an index, possibly
-// optimization information, data "wasted" on deletes, and so on.
-//
-// Find further documentation at
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.1/indices-segments.html.
-type IndicesSegmentsService struct {
- client *Client
- pretty bool
- index []string
- allowNoIndices *bool
- expandWildcards string
- ignoreUnavailable *bool
- human *bool
- operationThreading interface{}
- verbose *bool
-}
-
-// NewIndicesSegmentsService creates a new IndicesSegmentsService.
-func NewIndicesSegmentsService(client *Client) *IndicesSegmentsService {
- return &IndicesSegmentsService{
- client: client,
- }
-}
-
-// Index is a comma-separated list of index names; use `_all` or empty string
-// to perform the operation on all indices.
-func (s *IndicesSegmentsService) Index(indices ...string) *IndicesSegmentsService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices expression
-// resolves into no concrete indices. (This includes `_all` string or when
-// no indices have been specified).
-func (s *IndicesSegmentsService) AllowNoIndices(allowNoIndices bool) *IndicesSegmentsService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to concrete indices
-// that are open, closed or both.
-func (s *IndicesSegmentsService) ExpandWildcards(expandWildcards string) *IndicesSegmentsService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *IndicesSegmentsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSegmentsService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Human, when set to true, returns time and byte-values in human-readable format.
-func (s *IndicesSegmentsService) Human(human bool) *IndicesSegmentsService {
- s.human = &human
- return s
-}
-
-// OperationThreading is undocumented in Elasticsearch as of now.
-func (s *IndicesSegmentsService) OperationThreading(operationThreading interface{}) *IndicesSegmentsService {
- s.operationThreading = operationThreading
- return s
-}
-
-// Verbose, when set to true, includes detailed memory usage by Lucene.
-func (s *IndicesSegmentsService) Verbose(verbose bool) *IndicesSegmentsService {
- s.verbose = &verbose
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesSegmentsService) Pretty(pretty bool) *IndicesSegmentsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesSegmentsService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_segments", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else {
- path = "/_segments"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- if s.operationThreading != nil {
- params.Set("operation_threading", fmt.Sprintf("%v", s.operationThreading))
- }
- if s.verbose != nil {
- params.Set("verbose", fmt.Sprintf("%v", *s.verbose))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesSegmentsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesSegmentsService) Do(ctx context.Context) (*IndicesSegmentsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesSegmentsResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesSegmentsResponse is the response of IndicesSegmentsService.Do.
-type IndicesSegmentsResponse struct {
- // Shards provides information returned from shards.
- Shards shardsInfo `json:"_shards"`
-
- // Indices provides a map into the stats of an index.
- // The key of the map is the index name.
- Indices map[string]*IndexSegments `json:"indices,omitempty"`
-}
-
-type IndexSegments struct {
- // Shards provides a map into the shard related information of an index.
- // The key of the map is the number of a specific shard.
- Shards map[string][]*IndexSegmentsShards `json:"shards,omitempty"`
-}
-
-type IndexSegmentsShards struct {
- Routing *IndexSegmentsRouting `json:"routing,omitempty"`
- NumCommittedSegments int64 `json:"num_committed_segments,omitempty"`
- NumSearchSegments int64 `json:"num_search_segments"`
-
- // Segments provides a map into the segment related information of a shard.
- // The key of the map is the specific lucene segment id.
- Segments map[string]*IndexSegmentsDetails `json:"segments,omitempty"`
-}
-
-type IndexSegmentsRouting struct {
- State string `json:"state,omitempty"`
- Primary bool `json:"primary,omitempty"`
- Node string `json:"node,omitempty"`
- RelocatingNode string `json:"relocating_node,omitempty"`
-}
-
-type IndexSegmentsDetails struct {
- Generation int64 `json:"generation,omitempty"`
- NumDocs int64 `json:"num_docs,omitempty"`
- DeletedDocs int64 `json:"deleted_docs,omitempty"`
- Size string `json:"size,omitempty"`
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
- Memory string `json:"memory,omitempty"`
- MemoryInBytes int64 `json:"memory_in_bytes,omitempty"`
- Committed bool `json:"committed,omitempty"`
- Search bool `json:"search,omitempty"`
- Version string `json:"version,omitempty"`
- Compound bool `json:"compound,omitempty"`
- MergeId string `json:"merge_id,omitempty"`
- Sort []*IndexSegmentsSort `json:"sort,omitempty"`
- RAMTree []*IndexSegmentsRamTree `json:"ram_tree,omitempty"`
- Attributes map[string]string `json:"attributes,omitempty"`
-}
-
-type IndexSegmentsSort struct {
- Field string `json:"field,omitempty"`
- Mode string `json:"mode,omitempty"`
- Missing interface{} `json:"missing,omitempty"`
- Reverse bool `json:"reverse,omitempty"`
-}
-
-type IndexSegmentsRamTree struct {
- Description string `json:"description,omitempty"`
- Size string `json:"size,omitempty"`
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
- Children []*IndexSegmentsRamTree `json:"children,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_segments_test.go b/vendor/github.com/olivere/elastic/indices_segments_test.go
deleted file mode 100644
index 2ec181cc1..000000000
--- a/vendor/github.com/olivere/elastic/indices_segments_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndicesSegments(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Expected string
- }{
- {
- []string{},
- "/_segments",
- },
- {
- []string{"index1"},
- "/index1/_segments",
- },
- {
- []string{"index1", "index2"},
- "/index1%2Cindex2/_segments",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.IndexSegments().Index(test.Indices...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestIndexSegments(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- segments, err := client.IndexSegments(testIndexName).Pretty(true).Human(true).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if segments == nil {
- t.Fatalf("expected response; got: %v", segments)
- }
- indices, found := segments.Indices[testIndexName]
- if !found {
- t.Fatalf("expected index information about index %v; got: %v", testIndexName, found)
- }
- shards, found := indices.Shards["0"]
- if !found {
- t.Fatalf("expected shard information about index %v", testIndexName)
- }
- if shards == nil {
- t.Fatalf("expected shard information to be != nil for index %v", testIndexName)
- }
- shard := shards[0]
- if shard == nil {
- t.Fatalf("expected shard information to be != nil for shard 0 in index %v", testIndexName)
- }
- if shard.Routing == nil {
- t.Fatalf("expected shard routing information to be != nil for index %v", testIndexName)
- }
- segmentDetail, found := shard.Segments["_0"]
- if !found {
- t.Fatalf("expected segment detail to be != nil for index %v", testIndexName)
- }
- if segmentDetail == nil {
- t.Fatalf("expected segment detail to be != nil for index %v", testIndexName)
- }
- if segmentDetail.NumDocs == 0 {
- t.Fatal("expected segment to contain >= 1 docs")
- }
- if len(segmentDetail.Attributes) == 0 {
- t.Fatalf("expected segment attributes map to contain at least one key, value pair for index %v", testIndexName)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_shrink.go b/vendor/github.com/olivere/elastic/indices_shrink.go
deleted file mode 100644
index 6ea72b281..000000000
--- a/vendor/github.com/olivere/elastic/indices_shrink.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesShrinkService allows you to shrink an existing index into a
-// new index with fewer primary shards.
-//
-// For further details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-shrink-index.html.
-type IndicesShrinkService struct {
- client *Client
- pretty bool
- source string
- target string
- masterTimeout string
- timeout string
- waitForActiveShards string
- bodyJson interface{}
- bodyString string
-}
-
-// NewIndicesShrinkService creates a new IndicesShrinkService.
-func NewIndicesShrinkService(client *Client) *IndicesShrinkService {
- return &IndicesShrinkService{
- client: client,
- }
-}
-
-// Source is the name of the source index to shrink.
-func (s *IndicesShrinkService) Source(source string) *IndicesShrinkService {
- s.source = source
- return s
-}
-
-// Target is the name of the target index to shrink into.
-func (s *IndicesShrinkService) Target(target string) *IndicesShrinkService {
- s.target = target
- return s
-}
-
-// MasterTimeout specifies the timeout for connection to master.
-func (s *IndicesShrinkService) MasterTimeout(masterTimeout string) *IndicesShrinkService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *IndicesShrinkService) Timeout(timeout string) *IndicesShrinkService {
- s.timeout = timeout
- return s
-}
-
-// WaitForActiveShards sets the number of active shards to wait for on
-// the shrunken index before the operation returns.
-func (s *IndicesShrinkService) WaitForActiveShards(waitForActiveShards string) *IndicesShrinkService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesShrinkService) Pretty(pretty bool) *IndicesShrinkService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is the configuration for the target index (`settings` and `aliases`)
-// defined as a JSON-serializable instance to be sent as the request body.
-func (s *IndicesShrinkService) BodyJson(body interface{}) *IndicesShrinkService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is the configuration for the target index (`settings` and `aliases`)
-// defined as a string to send as the request body.
-func (s *IndicesShrinkService) BodyString(body string) *IndicesShrinkService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesShrinkService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/{source}/_shrink/{target}", map[string]string{
- "source": s.source,
- "target": s.target,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesShrinkService) Validate() error {
- var invalid []string
- if s.source == "" {
- invalid = append(invalid, "Source")
- }
- if s.target == "" {
- invalid = append(invalid, "Target")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesShrinkService) Do(ctx context.Context) (*IndicesShrinkResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else if s.bodyString != "" {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesShrinkResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesShrinkResponse is the response of IndicesShrinkService.Do.
-type IndicesShrinkResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_shrink_test.go b/vendor/github.com/olivere/elastic/indices_shrink_test.go
deleted file mode 100644
index 06ab7d923..000000000
--- a/vendor/github.com/olivere/elastic/indices_shrink_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestIndicesShrinkBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Source string
- Target string
- Expected string
- }{
- {
- "my_source_index",
- "my_target_index",
- "/my_source_index/_shrink/my_target_index",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.ShrinkIndex(test.Source, test.Target).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/indices_stats.go b/vendor/github.com/olivere/elastic/indices_stats.go
deleted file mode 100644
index 20d35a6d4..000000000
--- a/vendor/github.com/olivere/elastic/indices_stats.go
+++ /dev/null
@@ -1,384 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IndicesStatsService provides stats on various metrics of one or more
-// indices. See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-stats.html.
-type IndicesStatsService struct {
- client *Client
- pretty bool
- metric []string
- index []string
- level string
- types []string
- completionFields []string
- fielddataFields []string
- fields []string
- groups []string
- human *bool
-}
-
-// NewIndicesStatsService creates a new IndicesStatsService.
-func NewIndicesStatsService(client *Client) *IndicesStatsService {
- return &IndicesStatsService{
- client: client,
- index: make([]string, 0),
- metric: make([]string, 0),
- completionFields: make([]string, 0),
- fielddataFields: make([]string, 0),
- fields: make([]string, 0),
- groups: make([]string, 0),
- types: make([]string, 0),
- }
-}
-
-// Metric limits the information returned the specific metrics. Options are:
-// docs, store, indexing, get, search, completion, fielddata, flush, merge,
-// query_cache, refresh, suggest, and warmer.
-func (s *IndicesStatsService) Metric(metric ...string) *IndicesStatsService {
- s.metric = append(s.metric, metric...)
- return s
-}
-
-// Index is the list of index names; use `_all` or empty string to perform
-// the operation on all indices.
-func (s *IndicesStatsService) Index(indices ...string) *IndicesStatsService {
- s.index = append(s.index, indices...)
- return s
-}
-
-// Type is a list of document types for the `indexing` index metric.
-func (s *IndicesStatsService) Type(types ...string) *IndicesStatsService {
- s.types = append(s.types, types...)
- return s
-}
-
-// Level returns stats aggregated at cluster, index or shard level.
-func (s *IndicesStatsService) Level(level string) *IndicesStatsService {
- s.level = level
- return s
-}
-
-// CompletionFields is a list of fields for `fielddata` and `suggest`
-// index metric (supports wildcards).
-func (s *IndicesStatsService) CompletionFields(completionFields ...string) *IndicesStatsService {
- s.completionFields = append(s.completionFields, completionFields...)
- return s
-}
-
-// FielddataFields is a list of fields for `fielddata` index metric (supports wildcards).
-func (s *IndicesStatsService) FielddataFields(fielddataFields ...string) *IndicesStatsService {
- s.fielddataFields = append(s.fielddataFields, fielddataFields...)
- return s
-}
-
-// Fields is a list of fields for `fielddata` and `completion` index metric
-// (supports wildcards).
-func (s *IndicesStatsService) Fields(fields ...string) *IndicesStatsService {
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// Groups is a list of search groups for `search` index metric.
-func (s *IndicesStatsService) Groups(groups ...string) *IndicesStatsService {
- s.groups = append(s.groups, groups...)
- return s
-}
-
-// Human indicates whether to return time and byte values in human-readable format..
-func (s *IndicesStatsService) Human(human bool) *IndicesStatsService {
- s.human = &human
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IndicesStatsService) Pretty(pretty bool) *IndicesStatsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IndicesStatsService) buildURL() (string, url.Values, error) {
- var err error
- var path string
- if len(s.index) > 0 && len(s.metric) > 0 {
- path, err = uritemplates.Expand("/{index}/_stats/{metric}", map[string]string{
- "index": strings.Join(s.index, ","),
- "metric": strings.Join(s.metric, ","),
- })
- } else if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_stats", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else if len(s.metric) > 0 {
- path, err = uritemplates.Expand("/_stats/{metric}", map[string]string{
- "metric": strings.Join(s.metric, ","),
- })
- } else {
- path = "/_stats"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.groups) > 0 {
- params.Set("groups", strings.Join(s.groups, ","))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- if s.level != "" {
- params.Set("level", s.level)
- }
- if len(s.types) > 0 {
- params.Set("types", strings.Join(s.types, ","))
- }
- if len(s.completionFields) > 0 {
- params.Set("completion_fields", strings.Join(s.completionFields, ","))
- }
- if len(s.fielddataFields) > 0 {
- params.Set("fielddata_fields", strings.Join(s.fielddataFields, ","))
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IndicesStatsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IndicesStatsService) Do(ctx context.Context) (*IndicesStatsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IndicesStatsResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IndicesStatsResponse is the response of IndicesStatsService.Do.
-type IndicesStatsResponse struct {
- // Shards provides information returned from shards.
- Shards shardsInfo `json:"_shards"`
-
- // All provides summary stats about all indices.
- All *IndexStats `json:"_all,omitempty"`
-
- // Indices provides a map into the stats of an index. The key of the
- // map is the index name.
- Indices map[string]*IndexStats `json:"indices,omitempty"`
-}
-
-// IndexStats is index stats for a specific index.
-type IndexStats struct {
- Primaries *IndexStatsDetails `json:"primaries,omitempty"`
- Total *IndexStatsDetails `json:"total,omitempty"`
-}
-
-type IndexStatsDetails struct {
- Docs *IndexStatsDocs `json:"docs,omitempty"`
- Store *IndexStatsStore `json:"store,omitempty"`
- Indexing *IndexStatsIndexing `json:"indexing,omitempty"`
- Get *IndexStatsGet `json:"get,omitempty"`
- Search *IndexStatsSearch `json:"search,omitempty"`
- Merges *IndexStatsMerges `json:"merges,omitempty"`
- Refresh *IndexStatsRefresh `json:"refresh,omitempty"`
- Flush *IndexStatsFlush `json:"flush,omitempty"`
- Warmer *IndexStatsWarmer `json:"warmer,omitempty"`
- FilterCache *IndexStatsFilterCache `json:"filter_cache,omitempty"`
- IdCache *IndexStatsIdCache `json:"id_cache,omitempty"`
- Fielddata *IndexStatsFielddata `json:"fielddata,omitempty"`
- Percolate *IndexStatsPercolate `json:"percolate,omitempty"`
- Completion *IndexStatsCompletion `json:"completion,omitempty"`
- Segments *IndexStatsSegments `json:"segments,omitempty"`
- Translog *IndexStatsTranslog `json:"translog,omitempty"`
- Suggest *IndexStatsSuggest `json:"suggest,omitempty"`
- QueryCache *IndexStatsQueryCache `json:"query_cache,omitempty"`
-}
-
-type IndexStatsDocs struct {
- Count int64 `json:"count,omitempty"`
- Deleted int64 `json:"deleted,omitempty"`
-}
-
-type IndexStatsStore struct {
- Size string `json:"size,omitempty"` // human size, e.g. 119.3mb
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
-}
-
-type IndexStatsIndexing struct {
- IndexTotal int64 `json:"index_total,omitempty"`
- IndexTime string `json:"index_time,omitempty"`
- IndexTimeInMillis int64 `json:"index_time_in_millis,omitempty"`
- IndexCurrent int64 `json:"index_current,omitempty"`
- DeleteTotal int64 `json:"delete_total,omitempty"`
- DeleteTime string `json:"delete_time,omitempty"`
- DeleteTimeInMillis int64 `json:"delete_time_in_millis,omitempty"`
- DeleteCurrent int64 `json:"delete_current,omitempty"`
- NoopUpdateTotal int64 `json:"noop_update_total,omitempty"`
-}
-
-type IndexStatsGet struct {
- Total int64 `json:"total,omitempty"`
- GetTime string `json:"get_time,omitempty"`
- TimeInMillis int64 `json:"time_in_millis,omitempty"`
- ExistsTotal int64 `json:"exists_total,omitempty"`
- ExistsTime string `json:"exists_time,omitempty"`
- ExistsTimeInMillis int64 `json:"exists_time_in_millis,omitempty"`
- MissingTotal int64 `json:"missing_total,omitempty"`
- MissingTime string `json:"missing_time,omitempty"`
- MissingTimeInMillis int64 `json:"missing_time_in_millis,omitempty"`
- Current int64 `json:"current,omitempty"`
-}
-
-type IndexStatsSearch struct {
- OpenContexts int64 `json:"open_contexts,omitempty"`
- QueryTotal int64 `json:"query_total,omitempty"`
- QueryTime string `json:"query_time,omitempty"`
- QueryTimeInMillis int64 `json:"query_time_in_millis,omitempty"`
- QueryCurrent int64 `json:"query_current,omitempty"`
- FetchTotal int64 `json:"fetch_total,omitempty"`
- FetchTime string `json:"fetch_time,omitempty"`
- FetchTimeInMillis int64 `json:"fetch_time_in_millis,omitempty"`
- FetchCurrent int64 `json:"fetch_current,omitempty"`
-}
-
-type IndexStatsMerges struct {
- Current int64 `json:"current,omitempty"`
- CurrentDocs int64 `json:"current_docs,omitempty"`
- CurrentSize string `json:"current_size,omitempty"`
- CurrentSizeInBytes int64 `json:"current_size_in_bytes,omitempty"`
- Total int64 `json:"total,omitempty"`
- TotalTime string `json:"total_time,omitempty"`
- TotalTimeInMillis int64 `json:"total_time_in_millis,omitempty"`
- TotalDocs int64 `json:"total_docs,omitempty"`
- TotalSize string `json:"total_size,omitempty"`
- TotalSizeInBytes int64 `json:"total_size_in_bytes,omitempty"`
-}
-
-type IndexStatsRefresh struct {
- Total int64 `json:"total,omitempty"`
- TotalTime string `json:"total_time,omitempty"`
- TotalTimeInMillis int64 `json:"total_time_in_millis,omitempty"`
-}
-
-type IndexStatsFlush struct {
- Total int64 `json:"total,omitempty"`
- TotalTime string `json:"total_time,omitempty"`
- TotalTimeInMillis int64 `json:"total_time_in_millis,omitempty"`
-}
-
-type IndexStatsWarmer struct {
- Current int64 `json:"current,omitempty"`
- Total int64 `json:"total,omitempty"`
- TotalTime string `json:"total_time,omitempty"`
- TotalTimeInMillis int64 `json:"total_time_in_millis,omitempty"`
-}
-
-type IndexStatsFilterCache struct {
- MemorySize string `json:"memory_size,omitempty"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"`
- Evictions int64 `json:"evictions,omitempty"`
-}
-
-type IndexStatsIdCache struct {
- MemorySize string `json:"memory_size,omitempty"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"`
-}
-
-type IndexStatsFielddata struct {
- MemorySize string `json:"memory_size,omitempty"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"`
- Evictions int64 `json:"evictions,omitempty"`
-}
-
-type IndexStatsPercolate struct {
- Total int64 `json:"total,omitempty"`
- GetTime string `json:"get_time,omitempty"`
- TimeInMillis int64 `json:"time_in_millis,omitempty"`
- Current int64 `json:"current,omitempty"`
- MemorySize string `json:"memory_size,omitempty"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"`
- Queries int64 `json:"queries,omitempty"`
-}
-
-type IndexStatsCompletion struct {
- Size string `json:"size,omitempty"`
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
-}
-
-type IndexStatsSegments struct {
- Count int64 `json:"count,omitempty"`
- Memory string `json:"memory,omitempty"`
- MemoryInBytes int64 `json:"memory_in_bytes,omitempty"`
- IndexWriterMemory string `json:"index_writer_memory,omitempty"`
- IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes,omitempty"`
- IndexWriterMaxMemory string `json:"index_writer_max_memory,omitempty"`
- IndexWriterMaxMemoryInBytes int64 `json:"index_writer_max_memory_in_bytes,omitempty"`
- VersionMapMemory string `json:"version_map_memory,omitempty"`
- VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes,omitempty"`
- FixedBitSetMemory string `json:"fixed_bit_set,omitempty"`
- FixedBitSetMemoryInBytes int64 `json:"fixed_bit_set_memory_in_bytes,omitempty"`
-}
-
-type IndexStatsTranslog struct {
- Operations int64 `json:"operations,omitempty"`
- Size string `json:"size,omitempty"`
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
-}
-
-type IndexStatsSuggest struct {
- Total int64 `json:"total,omitempty"`
- Time string `json:"time,omitempty"`
- TimeInMillis int64 `json:"time_in_millis,omitempty"`
- Current int64 `json:"current,omitempty"`
-}
-
-type IndexStatsQueryCache struct {
- MemorySize string `json:"memory_size,omitempty"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"`
- Evictions int64 `json:"evictions,omitempty"`
- HitCount int64 `json:"hit_count,omitempty"`
- MissCount int64 `json:"miss_count,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/indices_stats_test.go b/vendor/github.com/olivere/elastic/indices_stats_test.go
deleted file mode 100644
index a3392c97a..000000000
--- a/vendor/github.com/olivere/elastic/indices_stats_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIndexStatsBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Indices []string
- Metrics []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_stats",
- },
- {
- []string{"index1"},
- []string{},
- "/index1/_stats",
- },
- {
- []string{},
- []string{"metric1"},
- "/_stats/metric1",
- },
- {
- []string{"index1"},
- []string{"metric1"},
- "/index1/_stats/metric1",
- },
- {
- []string{"index1", "index2"},
- []string{"metric1"},
- "/index1%2Cindex2/_stats/metric1",
- },
- {
- []string{"index1", "index2"},
- []string{"metric1", "metric2"},
- "/index1%2Cindex2/_stats/metric1%2Cmetric2",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.IndexStats().Index(test.Indices...).Metric(test.Metrics...).buildURL()
- if err != nil {
- t.Fatalf("case #%d: %v", i+1, err)
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestIndexStats(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- stats, err := client.IndexStats(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if stats == nil {
- t.Fatalf("expected response; got: %v", stats)
- }
- stat, found := stats.Indices[testIndexName]
- if !found {
- t.Fatalf("expected stats about index %q; got: %v", testIndexName, found)
- }
- if stat.Total == nil {
- t.Fatalf("expected total to be != nil; got: %v", stat.Total)
- }
- if stat.Total.Docs == nil {
- t.Fatalf("expected total docs to be != nil; got: %v", stat.Total.Docs)
- }
- if stat.Total.Docs.Count == 0 {
- t.Fatalf("expected total docs count to be > 0; got: %d", stat.Total.Docs.Count)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_delete_pipeline.go b/vendor/github.com/olivere/elastic/ingest_delete_pipeline.go
deleted file mode 100644
index 78b6d04f2..000000000
--- a/vendor/github.com/olivere/elastic/ingest_delete_pipeline.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IngestDeletePipelineService deletes pipelines by ID.
-// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/delete-pipeline-api.html.
-type IngestDeletePipelineService struct {
- client *Client
- pretty bool
- id string
- masterTimeout string
- timeout string
-}
-
-// NewIngestDeletePipelineService creates a new IngestDeletePipelineService.
-func NewIngestDeletePipelineService(client *Client) *IngestDeletePipelineService {
- return &IngestDeletePipelineService{
- client: client,
- }
-}
-
-// Id is documented as: Pipeline ID.
-func (s *IngestDeletePipelineService) Id(id string) *IngestDeletePipelineService {
- s.id = id
- return s
-}
-
-// MasterTimeout is documented as: Explicit operation timeout for connection to master node.
-func (s *IngestDeletePipelineService) MasterTimeout(masterTimeout string) *IngestDeletePipelineService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout is documented as: Explicit operation timeout.
-func (s *IngestDeletePipelineService) Timeout(timeout string) *IngestDeletePipelineService {
- s.timeout = timeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IngestDeletePipelineService) Pretty(pretty bool) *IngestDeletePipelineService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IngestDeletePipelineService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_ingest/pipeline/{id}", map[string]string{
- "id": s.id,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IngestDeletePipelineService) Validate() error {
- var invalid []string
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IngestDeletePipelineService) Do(ctx context.Context) (*IngestDeletePipelineResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IngestDeletePipelineResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IngestDeletePipelineResponse is the response of IngestDeletePipelineService.Do.
-type IngestDeletePipelineResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_delete_pipeline_test.go b/vendor/github.com/olivere/elastic/ingest_delete_pipeline_test.go
deleted file mode 100644
index 1163e0f17..000000000
--- a/vendor/github.com/olivere/elastic/ingest_delete_pipeline_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestIngestDeletePipelineURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Id string
- Expected string
- }{
- {
- "my-pipeline-id",
- "/_ingest/pipeline/my-pipeline-id",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IngestDeletePipeline(test.Id).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_get_pipeline.go b/vendor/github.com/olivere/elastic/ingest_get_pipeline.go
deleted file mode 100644
index 16a683261..000000000
--- a/vendor/github.com/olivere/elastic/ingest_get_pipeline.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IngestGetPipelineService returns pipelines based on ID.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/get-pipeline-api.html
-// for documentation.
-type IngestGetPipelineService struct {
- client *Client
- pretty bool
- id []string
- masterTimeout string
-}
-
-// NewIngestGetPipelineService creates a new IngestGetPipelineService.
-func NewIngestGetPipelineService(client *Client) *IngestGetPipelineService {
- return &IngestGetPipelineService{
- client: client,
- }
-}
-
-// Id is a list of pipeline ids. Wildcards supported.
-func (s *IngestGetPipelineService) Id(id ...string) *IngestGetPipelineService {
- s.id = append(s.id, id...)
- return s
-}
-
-// MasterTimeout is an explicit operation timeout for connection to master node.
-func (s *IngestGetPipelineService) MasterTimeout(masterTimeout string) *IngestGetPipelineService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IngestGetPipelineService) Pretty(pretty bool) *IngestGetPipelineService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IngestGetPipelineService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- // Build URL
- if len(s.id) > 0 {
- path, err = uritemplates.Expand("/_ingest/pipeline/{id}", map[string]string{
- "id": strings.Join(s.id, ","),
- })
- } else {
- path = "/_ingest/pipeline"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IngestGetPipelineService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *IngestGetPipelineService) Do(ctx context.Context) (IngestGetPipelineResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret IngestGetPipelineResponse
- if err := json.Unmarshal(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IngestGetPipelineResponse is the response of IngestGetPipelineService.Do.
-type IngestGetPipelineResponse map[string]*IngestGetPipeline
-
-type IngestGetPipeline struct {
- ID string `json:"id"`
- Config map[string]interface{} `json:"config"`
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_get_pipeline_test.go b/vendor/github.com/olivere/elastic/ingest_get_pipeline_test.go
deleted file mode 100644
index 009b717ca..000000000
--- a/vendor/github.com/olivere/elastic/ingest_get_pipeline_test.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestIngestGetPipelineURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Id []string
- Expected string
- }{
- {
- nil,
- "/_ingest/pipeline",
- },
- {
- []string{"my-pipeline-id"},
- "/_ingest/pipeline/my-pipeline-id",
- },
- {
- []string{"*"},
- "/_ingest/pipeline/%2A",
- },
- {
- []string{"pipeline-1", "pipeline-2"},
- "/_ingest/pipeline/pipeline-1%2Cpipeline-2",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IngestGetPipeline(test.Id...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestIngestLifecycle(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- // With the new ES Docker images, XPack is already installed and returns a pipeline. So we cannot test for "no pipelines". Skipping for now.
- /*
- // Get all pipelines (returns 404 that indicates an error)
- getres, err := client.IngestGetPipeline().Do(context.TODO())
- if err == nil {
- t.Fatal(err)
- }
- if getres != nil {
- t.Fatalf("expected no response, got %v", getres)
- }
- //*/
-
- // Add a pipeline
- pipelineDef := `{
- "description" : "reset retweets",
- "processors" : [
- {
- "set" : {
- "field": "retweets",
- "value": 0
- }
- }
- ]
-}`
- putres, err := client.IngestPutPipeline("my-pipeline").BodyString(pipelineDef).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if putres == nil {
- t.Fatal("expected response, got nil")
- }
- if want, have := true, putres.Acknowledged; want != have {
- t.Fatalf("expected ack = %v, got %v", want, have)
- }
-
- // Get all pipelines again
- getres, err := client.IngestGetPipeline().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if have := len(getres); have == 0 {
- t.Fatalf("expected at least 1 pipeline, got %d", have)
- }
- if _, found := getres["my-pipeline"]; !found {
- t.Fatalf("expected to find pipline with id %q", "my-pipeline")
- }
-
- // Get pipeline by ID
- getres, err = client.IngestGetPipeline("my-pipeline").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if want, have := 1, len(getres); want != have {
- t.Fatalf("expected %d pipelines, got %d", want, have)
- }
- if _, found := getres["my-pipeline"]; !found {
- t.Fatalf("expected to find pipline with id %q", "my-pipeline")
- }
-
- // Delete pipeline
- delres, err := client.IngestDeletePipeline("my-pipeline").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if delres == nil {
- t.Fatal("expected response, got nil")
- }
- if want, have := true, delres.Acknowledged; want != have {
- t.Fatalf("expected ack = %v, got %v", want, have)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_put_pipeline.go b/vendor/github.com/olivere/elastic/ingest_put_pipeline.go
deleted file mode 100644
index 5781e7072..000000000
--- a/vendor/github.com/olivere/elastic/ingest_put_pipeline.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IngestPutPipelineService adds pipelines and updates existing pipelines in
-// the cluster.
-//
-// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/put-pipeline-api.html.
-type IngestPutPipelineService struct {
- client *Client
- pretty bool
- id string
- masterTimeout string
- timeout string
- bodyJson interface{}
- bodyString string
-}
-
-// NewIngestPutPipelineService creates a new IngestPutPipelineService.
-func NewIngestPutPipelineService(client *Client) *IngestPutPipelineService {
- return &IngestPutPipelineService{
- client: client,
- }
-}
-
-// Id is the pipeline ID.
-func (s *IngestPutPipelineService) Id(id string) *IngestPutPipelineService {
- s.id = id
- return s
-}
-
-// MasterTimeout is an explicit operation timeout for connection to master node.
-func (s *IngestPutPipelineService) MasterTimeout(masterTimeout string) *IngestPutPipelineService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout specifies an explicit operation timeout.
-func (s *IngestPutPipelineService) Timeout(timeout string) *IngestPutPipelineService {
- s.timeout = timeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IngestPutPipelineService) Pretty(pretty bool) *IngestPutPipelineService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is the ingest definition, defined as a JSON-serializable document.
-// Use e.g. a map[string]interface{} here.
-func (s *IngestPutPipelineService) BodyJson(body interface{}) *IngestPutPipelineService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is the ingest definition, specified as a string.
-func (s *IngestPutPipelineService) BodyString(body string) *IngestPutPipelineService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IngestPutPipelineService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_ingest/pipeline/{id}", map[string]string{
- "id": s.id,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IngestPutPipelineService) Validate() error {
- var invalid []string
- if s.id == "" {
- invalid = append(invalid, "Id")
- }
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IngestPutPipelineService) Do(ctx context.Context) (*IngestPutPipelineResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IngestPutPipelineResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IngestPutPipelineResponse is the response of IngestPutPipelineService.Do.
-type IngestPutPipelineResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_put_pipeline_test.go b/vendor/github.com/olivere/elastic/ingest_put_pipeline_test.go
deleted file mode 100644
index 9609f2f53..000000000
--- a/vendor/github.com/olivere/elastic/ingest_put_pipeline_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestIngestPutPipelineURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Id string
- Expected string
- }{
- {
- "my-pipeline-id",
- "/_ingest/pipeline/my-pipeline-id",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IngestPutPipeline(test.Id).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_simulate_pipeline.go b/vendor/github.com/olivere/elastic/ingest_simulate_pipeline.go
deleted file mode 100644
index 213f97bbb..000000000
--- a/vendor/github.com/olivere/elastic/ingest_simulate_pipeline.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// IngestSimulatePipelineService executes a specific pipeline against the set of
-// documents provided in the body of the request.
-//
-// The API is documented at
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/simulate-pipeline-api.html.
-type IngestSimulatePipelineService struct {
- client *Client
- pretty bool
- id string
- verbose *bool
- bodyJson interface{}
- bodyString string
-}
-
-// NewIngestSimulatePipelineService creates a new IngestSimulatePipeline.
-func NewIngestSimulatePipelineService(client *Client) *IngestSimulatePipelineService {
- return &IngestSimulatePipelineService{
- client: client,
- }
-}
-
-// Id specifies the pipeline ID.
-func (s *IngestSimulatePipelineService) Id(id string) *IngestSimulatePipelineService {
- s.id = id
- return s
-}
-
-// Verbose mode. Display data output for each processor in executed pipeline.
-func (s *IngestSimulatePipelineService) Verbose(verbose bool) *IngestSimulatePipelineService {
- s.verbose = &verbose
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *IngestSimulatePipelineService) Pretty(pretty bool) *IngestSimulatePipelineService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is the ingest definition, defined as a JSON-serializable simulate
-// definition. Use e.g. a map[string]interface{} here.
-func (s *IngestSimulatePipelineService) BodyJson(body interface{}) *IngestSimulatePipelineService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is the simulate definition, defined as a string.
-func (s *IngestSimulatePipelineService) BodyString(body string) *IngestSimulatePipelineService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *IngestSimulatePipelineService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- // Build URL
- if s.id != "" {
- path, err = uritemplates.Expand("/_ingest/pipeline/{id}/_simulate", map[string]string{
- "id": s.id,
- })
- } else {
- path = "/_ingest/pipeline/_simulate"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.verbose != nil {
- params.Set("verbose", fmt.Sprintf("%v", *s.verbose))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *IngestSimulatePipelineService) Validate() error {
- var invalid []string
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *IngestSimulatePipelineService) Do(ctx context.Context) (*IngestSimulatePipelineResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(IngestSimulatePipelineResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// IngestSimulatePipelineResponse is the response of IngestSimulatePipeline.Do.
-type IngestSimulatePipelineResponse struct {
- Docs []*IngestSimulateDocumentResult `json:"docs"`
-}
-
-type IngestSimulateDocumentResult struct {
- Doc map[string]interface{} `json:"doc"`
- ProcessorResults []*IngestSimulateProcessorResult `json:"processor_results"`
-}
-
-type IngestSimulateProcessorResult struct {
- ProcessorTag string `json:"tag"`
- Doc map[string]interface{} `json:"doc"`
-}
diff --git a/vendor/github.com/olivere/elastic/ingest_simulate_pipeline_test.go b/vendor/github.com/olivere/elastic/ingest_simulate_pipeline_test.go
deleted file mode 100644
index a254f85ff..000000000
--- a/vendor/github.com/olivere/elastic/ingest_simulate_pipeline_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestIngestSimulatePipelineURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Id string
- Expected string
- }{
- {
- "",
- "/_ingest/pipeline/_simulate",
- },
- {
- "my-pipeline-id",
- "/_ingest/pipeline/my-pipeline-id/_simulate",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.IngestSimulatePipeline().Id(test.Id).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/inner_hit.go b/vendor/github.com/olivere/elastic/inner_hit.go
deleted file mode 100644
index c371fbf79..000000000
--- a/vendor/github.com/olivere/elastic/inner_hit.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// InnerHit implements a simple join for parent/child, nested, and even
-// top-level documents in Elasticsearch.
-// It is an experimental feature for Elasticsearch versions 1.5 (or greater).
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-inner-hits.html
-// for documentation.
-//
-// See the tests for SearchSource, HasChildFilter, HasChildQuery,
-// HasParentFilter, HasParentQuery, NestedFilter, and NestedQuery
-// for usage examples.
-type InnerHit struct {
- source *SearchSource
- path string
- typ string
-
- name string
-}
-
-// NewInnerHit creates a new InnerHit.
-func NewInnerHit() *InnerHit {
- return &InnerHit{source: NewSearchSource()}
-}
-
-func (hit *InnerHit) Path(path string) *InnerHit {
- hit.path = path
- return hit
-}
-
-func (hit *InnerHit) Type(typ string) *InnerHit {
- hit.typ = typ
- return hit
-}
-
-func (hit *InnerHit) Query(query Query) *InnerHit {
- hit.source.Query(query)
- return hit
-}
-
-func (hit *InnerHit) From(from int) *InnerHit {
- hit.source.From(from)
- return hit
-}
-
-func (hit *InnerHit) Size(size int) *InnerHit {
- hit.source.Size(size)
- return hit
-}
-
-func (hit *InnerHit) TrackScores(trackScores bool) *InnerHit {
- hit.source.TrackScores(trackScores)
- return hit
-}
-
-func (hit *InnerHit) Explain(explain bool) *InnerHit {
- hit.source.Explain(explain)
- return hit
-}
-
-func (hit *InnerHit) Version(version bool) *InnerHit {
- hit.source.Version(version)
- return hit
-}
-
-func (hit *InnerHit) StoredField(storedFieldName string) *InnerHit {
- hit.source.StoredField(storedFieldName)
- return hit
-}
-
-func (hit *InnerHit) StoredFields(storedFieldNames ...string) *InnerHit {
- hit.source.StoredFields(storedFieldNames...)
- return hit
-}
-
-func (hit *InnerHit) NoStoredFields() *InnerHit {
- hit.source.NoStoredFields()
- return hit
-}
-
-func (hit *InnerHit) FetchSource(fetchSource bool) *InnerHit {
- hit.source.FetchSource(fetchSource)
- return hit
-}
-
-func (hit *InnerHit) FetchSourceContext(fetchSourceContext *FetchSourceContext) *InnerHit {
- hit.source.FetchSourceContext(fetchSourceContext)
- return hit
-}
-
-func (hit *InnerHit) DocvalueFields(docvalueFields ...string) *InnerHit {
- hit.source.DocvalueFields(docvalueFields...)
- return hit
-}
-
-func (hit *InnerHit) DocvalueField(docvalueField string) *InnerHit {
- hit.source.DocvalueField(docvalueField)
- return hit
-}
-
-func (hit *InnerHit) ScriptFields(scriptFields ...*ScriptField) *InnerHit {
- hit.source.ScriptFields(scriptFields...)
- return hit
-}
-
-func (hit *InnerHit) ScriptField(scriptField *ScriptField) *InnerHit {
- hit.source.ScriptField(scriptField)
- return hit
-}
-
-func (hit *InnerHit) Sort(field string, ascending bool) *InnerHit {
- hit.source.Sort(field, ascending)
- return hit
-}
-
-func (hit *InnerHit) SortWithInfo(info SortInfo) *InnerHit {
- hit.source.SortWithInfo(info)
- return hit
-}
-
-func (hit *InnerHit) SortBy(sorter ...Sorter) *InnerHit {
- hit.source.SortBy(sorter...)
- return hit
-}
-
-func (hit *InnerHit) Highlight(highlight *Highlight) *InnerHit {
- hit.source.Highlight(highlight)
- return hit
-}
-
-func (hit *InnerHit) Highlighter() *Highlight {
- return hit.source.Highlighter()
-}
-
-func (hit *InnerHit) Name(name string) *InnerHit {
- hit.name = name
- return hit
-}
-
-func (hit *InnerHit) Source() (interface{}, error) {
- src, err := hit.source.Source()
- if err != nil {
- return nil, err
- }
- source, ok := src.(map[string]interface{})
- if !ok {
- return nil, nil
- }
-
- // Notice that hit.typ and hit.path are not exported here.
- // They are only used with SearchSource and serialized there.
-
- if hit.name != "" {
- source["name"] = hit.name
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/inner_hit_test.go b/vendor/github.com/olivere/elastic/inner_hit_test.go
deleted file mode 100644
index fd9bd2e8a..000000000
--- a/vendor/github.com/olivere/elastic/inner_hit_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestInnerHitEmpty(t *testing.T) {
- hit := NewInnerHit()
- src, err := hit.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestInnerHitWithName(t *testing.T) {
- hit := NewInnerHit().Name("comments")
- src, err := hit.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"name":"comments"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/logger.go b/vendor/github.com/olivere/elastic/logger.go
deleted file mode 100644
index 095eb4cd4..000000000
--- a/vendor/github.com/olivere/elastic/logger.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// Logger specifies the interface for all log operations.
-type Logger interface {
- Printf(format string, v ...interface{})
-}
diff --git a/vendor/github.com/olivere/elastic/mget.go b/vendor/github.com/olivere/elastic/mget.go
deleted file mode 100644
index 5202a9603..000000000
--- a/vendor/github.com/olivere/elastic/mget.go
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-)
-
-// MgetService allows to get multiple documents based on an index,
-// type (optional) and id (possibly routing). The response includes
-// a docs array with all the fetched documents, each element similar
-// in structure to a document provided by the Get API.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-multi-get.html
-// for details.
-type MgetService struct {
- client *Client
- pretty bool
- preference string
- realtime *bool
- refresh string
- routing string
- storedFields []string
- items []*MultiGetItem
-}
-
-// NewMgetService initializes a new Multi GET API request call.
-func NewMgetService(client *Client) *MgetService {
- builder := &MgetService{
- client: client,
- }
- return builder
-}
-
-// Preference specifies the node or shard the operation should be performed
-// on (default: random).
-func (s *MgetService) Preference(preference string) *MgetService {
- s.preference = preference
- return s
-}
-
-// Refresh the shard containing the document before performing the operation.
-func (s *MgetService) Refresh(refresh string) *MgetService {
- s.refresh = refresh
- return s
-}
-
-// Realtime specifies whether to perform the operation in realtime or search mode.
-func (s *MgetService) Realtime(realtime bool) *MgetService {
- s.realtime = &realtime
- return s
-}
-
-// Routing is the specific routing value.
-func (s *MgetService) Routing(routing string) *MgetService {
- s.routing = routing
- return s
-}
-
-// StoredFields is a list of fields to return in the response.
-func (s *MgetService) StoredFields(storedFields ...string) *MgetService {
- s.storedFields = append(s.storedFields, storedFields...)
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *MgetService) Pretty(pretty bool) *MgetService {
- s.pretty = pretty
- return s
-}
-
-// Add an item to the request.
-func (s *MgetService) Add(items ...*MultiGetItem) *MgetService {
- s.items = append(s.items, items...)
- return s
-}
-
-// Source returns the request body, which will be serialized into JSON.
-func (s *MgetService) Source() (interface{}, error) {
- source := make(map[string]interface{})
- items := make([]interface{}, len(s.items))
- for i, item := range s.items {
- src, err := item.Source()
- if err != nil {
- return nil, err
- }
- items[i] = src
- }
- source["docs"] = items
- return source, nil
-}
-
-// Do executes the request.
-func (s *MgetService) Do(ctx context.Context) (*MgetResponse, error) {
- // Build url
- path := "/_mget"
-
- params := make(url.Values)
- if s.realtime != nil {
- params.Add("realtime", fmt.Sprintf("%v", *s.realtime))
- }
- if s.preference != "" {
- params.Add("preference", s.preference)
- }
- if s.refresh != "" {
- params.Add("refresh", s.refresh)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if len(s.storedFields) > 0 {
- params.Set("stored_fields", strings.Join(s.storedFields, ","))
- }
-
- // Set body
- body, err := s.Source()
- if err != nil {
- return nil, err
- }
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return result
- ret := new(MgetResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Multi Get Item --
-
-// MultiGetItem is a single document to retrieve via the MgetService.
-type MultiGetItem struct {
- index string
- typ string
- id string
- routing string
- storedFields []string
- version *int64 // see org.elasticsearch.common.lucene.uid.Versions
- versionType string // see org.elasticsearch.index.VersionType
- fsc *FetchSourceContext
-}
-
-// NewMultiGetItem initializes a new, single item for a Multi GET request.
-func NewMultiGetItem() *MultiGetItem {
- return &MultiGetItem{}
-}
-
-// Index specifies the index name.
-func (item *MultiGetItem) Index(index string) *MultiGetItem {
- item.index = index
- return item
-}
-
-// Type specifies the type name.
-func (item *MultiGetItem) Type(typ string) *MultiGetItem {
- item.typ = typ
- return item
-}
-
-// Id specifies the identifier of the document.
-func (item *MultiGetItem) Id(id string) *MultiGetItem {
- item.id = id
- return item
-}
-
-// Routing is the specific routing value.
-func (item *MultiGetItem) Routing(routing string) *MultiGetItem {
- item.routing = routing
- return item
-}
-
-// StoredFields is a list of fields to return in the response.
-func (item *MultiGetItem) StoredFields(storedFields ...string) *MultiGetItem {
- item.storedFields = append(item.storedFields, storedFields...)
- return item
-}
-
-// Version can be MatchAny (-3), MatchAnyPre120 (0), NotFound (-1),
-// or NotSet (-2). These are specified in org.elasticsearch.common.lucene.uid.Versions.
-// The default in Elasticsearch is MatchAny (-3).
-func (item *MultiGetItem) Version(version int64) *MultiGetItem {
- item.version = &version
- return item
-}
-
-// VersionType can be "internal", "external", "external_gt", or "external_gte".
-// See org.elasticsearch.index.VersionType in Elasticsearch source.
-// It is "internal" by default.
-func (item *MultiGetItem) VersionType(versionType string) *MultiGetItem {
- item.versionType = versionType
- return item
-}
-
-// FetchSource allows to specify source filtering.
-func (item *MultiGetItem) FetchSource(fetchSourceContext *FetchSourceContext) *MultiGetItem {
- item.fsc = fetchSourceContext
- return item
-}
-
-// Source returns the serialized JSON to be sent to Elasticsearch as
-// part of a MultiGet search.
-func (item *MultiGetItem) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- source["_id"] = item.id
-
- if item.index != "" {
- source["_index"] = item.index
- }
- if item.typ != "" {
- source["_type"] = item.typ
- }
- if item.fsc != nil {
- src, err := item.fsc.Source()
- if err != nil {
- return nil, err
- }
- source["_source"] = src
- }
- if item.routing != "" {
- source["_routing"] = item.routing
- }
- if len(item.storedFields) > 0 {
- source["stored_fields"] = strings.Join(item.storedFields, ",")
- }
- if item.version != nil {
- source["version"] = fmt.Sprintf("%d", *item.version)
- }
- if item.versionType != "" {
- source["version_type"] = item.versionType
- }
-
- return source, nil
-}
-
-// -- Result of a Multi Get request.
-
-// MgetResponse is the outcome of a Multi GET API request.
-type MgetResponse struct {
- Docs []*GetResult `json:"docs,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/mget_test.go b/vendor/github.com/olivere/elastic/mget_test.go
deleted file mode 100644
index 6b3ecd9f6..000000000
--- a/vendor/github.com/olivere/elastic/mget_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestMultiGet(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add some documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Count documents
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Errorf("expected Count = %d; got %d", 3, count)
- }
-
- // Get documents 1 and 3
- res, err := client.MultiGet().
- Add(NewMultiGetItem().Index(testIndexName).Type("doc").Id("1")).
- Add(NewMultiGetItem().Index(testIndexName).Type("doc").Id("3")).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected result to be != nil; got nil")
- }
- if res.Docs == nil {
- t.Fatal("expected result docs to be != nil; got nil")
- }
- if len(res.Docs) != 2 {
- t.Fatalf("expected to have 2 docs; got %d", len(res.Docs))
- }
-
- item := res.Docs[0]
- if item.Error != nil {
- t.Errorf("expected no error on item 0; got %v", item.Error)
- }
- if item.Source == nil {
- t.Errorf("expected Source != nil; got %v", item.Source)
- }
- var doc tweet
- if err := json.Unmarshal(*item.Source, &doc); err != nil {
- t.Fatalf("expected to unmarshal item Source; got %v", err)
- }
- if doc.Message != tweet1.Message {
- t.Errorf("expected Message of first tweet to be %q; got %q", tweet1.Message, doc.Message)
- }
-
- item = res.Docs[1]
- if item.Error != nil {
- t.Errorf("expected no error on item 1; got %v", item.Error)
- }
- if item.Source == nil {
- t.Errorf("expected Source != nil; got %v", item.Source)
- }
- if err := json.Unmarshal(*item.Source, &doc); err != nil {
- t.Fatalf("expected to unmarshal item Source; got %v", err)
- }
- if doc.Message != tweet3.Message {
- t.Errorf("expected Message of second tweet to be %q; got %q", tweet3.Message, doc.Message)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/msearch.go b/vendor/github.com/olivere/elastic/msearch.go
deleted file mode 100644
index c1a589a97..000000000
--- a/vendor/github.com/olivere/elastic/msearch.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-)
-
-// MultiSearch executes one or more searches in one roundtrip.
-type MultiSearchService struct {
- client *Client
- requests []*SearchRequest
- indices []string
- pretty bool
- maxConcurrentRequests *int
- preFilterShardSize *int
-}
-
-func NewMultiSearchService(client *Client) *MultiSearchService {
- builder := &MultiSearchService{
- client: client,
- }
- return builder
-}
-
-func (s *MultiSearchService) Add(requests ...*SearchRequest) *MultiSearchService {
- s.requests = append(s.requests, requests...)
- return s
-}
-
-func (s *MultiSearchService) Index(indices ...string) *MultiSearchService {
- s.indices = append(s.indices, indices...)
- return s
-}
-
-func (s *MultiSearchService) Pretty(pretty bool) *MultiSearchService {
- s.pretty = pretty
- return s
-}
-
-func (s *MultiSearchService) MaxConcurrentSearches(max int) *MultiSearchService {
- s.maxConcurrentRequests = &max
- return s
-}
-
-func (s *MultiSearchService) PreFilterShardSize(size int) *MultiSearchService {
- s.preFilterShardSize = &size
- return s
-}
-
-func (s *MultiSearchService) Do(ctx context.Context) (*MultiSearchResult, error) {
- // Build url
- path := "/_msearch"
-
- // Parameters
- params := make(url.Values)
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- if v := s.maxConcurrentRequests; v != nil {
- params.Set("max_concurrent_searches", fmt.Sprintf("%v", *v))
- }
- if v := s.preFilterShardSize; v != nil {
- params.Set("pre_filter_shard_size", fmt.Sprintf("%v", *v))
- }
-
- // Set body
- var lines []string
- for _, sr := range s.requests {
- // Set default indices if not specified in the request
- if !sr.HasIndices() && len(s.indices) > 0 {
- sr = sr.Index(s.indices...)
- }
-
- header, err := json.Marshal(sr.header())
- if err != nil {
- return nil, err
- }
- body, err := sr.Body()
- if err != nil {
- return nil, err
- }
- lines = append(lines, string(header))
- lines = append(lines, body)
- }
- body := strings.Join(lines, "\n") + "\n" // add trailing \n
-
- // Get response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return result
- ret := new(MultiSearchResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// MultiSearchResult is the outcome of running a multi-search operation.
-type MultiSearchResult struct {
- Responses []*SearchResult `json:"responses,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/msearch_test.go b/vendor/github.com/olivere/elastic/msearch_test.go
deleted file mode 100644
index d25e2cc28..000000000
--- a/vendor/github.com/olivere/elastic/msearch_test.go
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- _ "net/http"
- "testing"
-)
-
-func TestMultiSearch(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- // client := setupTestClientAndCreateIndexAndLog(t)
-
- tweet1 := tweet{
- User: "olivere",
- Message: "Welcome to Golang and Elasticsearch.",
- Tags: []string{"golang", "elasticsearch"},
- }
- tweet2 := tweet{
- User: "olivere",
- Message: "Another unrelated topic.",
- Tags: []string{"golang"},
- }
- tweet3 := tweet{
- User: "sandrae",
- Message: "Cycling is fun.",
- Tags: []string{"sports", "cycling"},
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Spawn two search queries with one roundtrip
- q1 := NewMatchAllQuery()
- q2 := NewTermQuery("tags", "golang")
-
- sreq1 := NewSearchRequest().Index(testIndexName, testIndexName2).
- Source(NewSearchSource().Query(q1).Size(10))
- sreq2 := NewSearchRequest().Index(testIndexName).Type("doc").
- Source(NewSearchSource().Query(q2))
-
- searchResult, err := client.MultiSearch().
- Add(sreq1, sreq2).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Responses == nil {
- t.Fatal("expected responses != nil; got nil")
- }
- if len(searchResult.Responses) != 2 {
- t.Fatalf("expected 2 responses; got %d", len(searchResult.Responses))
- }
-
- sres := searchResult.Responses[0]
- if sres.Hits == nil {
- t.Errorf("expected Hits != nil; got nil")
- }
- if sres.Hits.TotalHits != 3 {
- t.Errorf("expected Hits.TotalHits = %d; got %d", 3, sres.Hits.TotalHits)
- }
- if len(sres.Hits.Hits) != 3 {
- t.Errorf("expected len(Hits.Hits) = %d; got %d", 3, len(sres.Hits.Hits))
- }
- for _, hit := range sres.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-
- sres = searchResult.Responses[1]
- if sres.Hits == nil {
- t.Errorf("expected Hits != nil; got nil")
- }
- if sres.Hits.TotalHits != 2 {
- t.Errorf("expected Hits.TotalHits = %d; got %d", 2, sres.Hits.TotalHits)
- }
- if len(sres.Hits.Hits) != 2 {
- t.Errorf("expected len(Hits.Hits) = %d; got %d", 2, len(sres.Hits.Hits))
- }
- for _, hit := range sres.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestMultiSearchWithStrings(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- // client := setupTestClientAndCreateIndexAndLog(t)
-
- tweet1 := tweet{
- User: "olivere",
- Message: "Welcome to Golang and Elasticsearch.",
- Tags: []string{"golang", "elasticsearch"},
- }
- tweet2 := tweet{
- User: "olivere",
- Message: "Another unrelated topic.",
- Tags: []string{"golang"},
- }
- tweet3 := tweet{
- User: "sandrae",
- Message: "Cycling is fun.",
- Tags: []string{"sports", "cycling"},
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Spawn two search queries with one roundtrip
- sreq1 := NewSearchRequest().Index(testIndexName, testIndexName2).
- Source(`{"query":{"match_all":{}}}`)
- sreq2 := NewSearchRequest().Index(testIndexName).Type("doc").
- Source(`{"query":{"term":{"tags":"golang"}}}`)
-
- searchResult, err := client.MultiSearch().
- Add(sreq1, sreq2).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Responses == nil {
- t.Fatal("expected responses != nil; got nil")
- }
- if len(searchResult.Responses) != 2 {
- t.Fatalf("expected 2 responses; got %d", len(searchResult.Responses))
- }
-
- sres := searchResult.Responses[0]
- if sres.Hits == nil {
- t.Errorf("expected Hits != nil; got nil")
- }
- if sres.Hits.TotalHits != 3 {
- t.Errorf("expected Hits.TotalHits = %d; got %d", 3, sres.Hits.TotalHits)
- }
- if len(sres.Hits.Hits) != 3 {
- t.Errorf("expected len(Hits.Hits) = %d; got %d", 3, len(sres.Hits.Hits))
- }
- for _, hit := range sres.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-
- sres = searchResult.Responses[1]
- if sres.Hits == nil {
- t.Errorf("expected Hits != nil; got nil")
- }
- if sres.Hits.TotalHits != 2 {
- t.Errorf("expected Hits.TotalHits = %d; got %d", 2, sres.Hits.TotalHits)
- }
- if len(sres.Hits.Hits) != 2 {
- t.Errorf("expected len(Hits.Hits) = %d; got %d", 2, len(sres.Hits.Hits))
- }
- for _, hit := range sres.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestMultiSearchWithOneRequest(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere",
- Message: "Welcome to Golang and Elasticsearch.",
- Tags: []string{"golang", "elasticsearch"},
- }
- tweet2 := tweet{
- User: "olivere",
- Message: "Another unrelated topic.",
- Tags: []string{"golang"},
- }
- tweet3 := tweet{
- User: "sandrae",
- Message: "Cycling is fun.",
- Tags: []string{"sports", "cycling"},
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Spawn two search queries with one roundtrip
- query := NewMatchAllQuery()
- source := NewSearchSource().Query(query).Size(10)
- sreq := NewSearchRequest().Source(source)
-
- searchResult, err := client.MultiSearch().
- Index(testIndexName).
- Add(sreq).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Responses == nil {
- t.Fatal("expected responses != nil; got nil")
- }
- if len(searchResult.Responses) != 1 {
- t.Fatalf("expected 1 responses; got %d", len(searchResult.Responses))
- }
-
- sres := searchResult.Responses[0]
- if sres.Hits == nil {
- t.Errorf("expected Hits != nil; got nil")
- }
- if sres.Hits.TotalHits != 3 {
- t.Errorf("expected Hits.TotalHits = %d; got %d", 3, sres.Hits.TotalHits)
- }
- if len(sres.Hits.Hits) != 3 {
- t.Errorf("expected len(Hits.Hits) = %d; got %d", 3, len(sres.Hits.Hits))
- }
- for _, hit := range sres.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/mtermvectors.go b/vendor/github.com/olivere/elastic/mtermvectors.go
deleted file mode 100644
index 755718e67..000000000
--- a/vendor/github.com/olivere/elastic/mtermvectors.go
+++ /dev/null
@@ -1,475 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// MultiTermvectorService returns information and statistics on terms in the
-// fields of a particular document. The document could be stored in the
-// index or artificially provided by the user.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-multi-termvectors.html
-// for documentation.
-type MultiTermvectorService struct {
- client *Client
- pretty bool
- index string
- typ string
- fieldStatistics *bool
- fields []string
- ids []string
- offsets *bool
- parent string
- payloads *bool
- positions *bool
- preference string
- realtime *bool
- routing string
- termStatistics *bool
- version interface{}
- versionType string
- bodyJson interface{}
- bodyString string
- docs []*MultiTermvectorItem
-}
-
-// NewMultiTermvectorService creates a new MultiTermvectorService.
-func NewMultiTermvectorService(client *Client) *MultiTermvectorService {
- return &MultiTermvectorService{
- client: client,
- }
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *MultiTermvectorService) Pretty(pretty bool) *MultiTermvectorService {
- s.pretty = pretty
- return s
-}
-
-// Add adds documents to MultiTermvectors service.
-func (s *MultiTermvectorService) Add(docs ...*MultiTermvectorItem) *MultiTermvectorService {
- s.docs = append(s.docs, docs...)
- return s
-}
-
-// Index in which the document resides.
-func (s *MultiTermvectorService) Index(index string) *MultiTermvectorService {
- s.index = index
- return s
-}
-
-// Type of the document.
-func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService {
- s.typ = typ
- return s
-}
-
-// FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) FieldStatistics(fieldStatistics bool) *MultiTermvectorService {
- s.fieldStatistics = &fieldStatistics
- return s
-}
-
-// Fields is a comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Fields(fields []string) *MultiTermvectorService {
- s.fields = fields
- return s
-}
-
-// Ids is a comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body.
-func (s *MultiTermvectorService) Ids(ids []string) *MultiTermvectorService {
- s.ids = ids
- return s
-}
-
-// Offsets specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Offsets(offsets bool) *MultiTermvectorService {
- s.offsets = &offsets
- return s
-}
-
-// Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Parent(parent string) *MultiTermvectorService {
- s.parent = parent
- return s
-}
-
-// Payloads specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Payloads(payloads bool) *MultiTermvectorService {
- s.payloads = &payloads
- return s
-}
-
-// Positions specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Positions(positions bool) *MultiTermvectorService {
- s.positions = &positions
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on (default: random). Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Preference(preference string) *MultiTermvectorService {
- s.preference = preference
- return s
-}
-
-// Realtime specifies if requests are real-time as opposed to near-real-time (default: true).
-func (s *MultiTermvectorService) Realtime(realtime bool) *MultiTermvectorService {
- s.realtime = &realtime
- return s
-}
-
-// Routing specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) Routing(routing string) *MultiTermvectorService {
- s.routing = routing
- return s
-}
-
-// TermStatistics specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
-func (s *MultiTermvectorService) TermStatistics(termStatistics bool) *MultiTermvectorService {
- s.termStatistics = &termStatistics
- return s
-}
-
-// Version is explicit version number for concurrency control.
-func (s *MultiTermvectorService) Version(version interface{}) *MultiTermvectorService {
- s.version = version
- return s
-}
-
-// VersionType is specific version type.
-func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService {
- s.versionType = versionType
- return s
-}
-
-// BodyJson is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
-func (s *MultiTermvectorService) BodyJson(body interface{}) *MultiTermvectorService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
-func (s *MultiTermvectorService) BodyString(body string) *MultiTermvectorService {
- s.bodyString = body
- return s
-}
-
-func (s *MultiTermvectorService) Source() interface{} {
- source := make(map[string]interface{})
- docs := make([]interface{}, len(s.docs))
- for i, doc := range s.docs {
- docs[i] = doc.Source()
- }
- source["docs"] = docs
- return source
-}
-
-// buildURL builds the URL for the operation.
-func (s *MultiTermvectorService) buildURL() (string, url.Values, error) {
- var path string
- var err error
-
- if s.index != "" && s.typ != "" {
- path, err = uritemplates.Expand("/{index}/{type}/_mtermvectors", map[string]string{
- "index": s.index,
- "type": s.typ,
- })
- } else if s.index != "" && s.typ == "" {
- path, err = uritemplates.Expand("/{index}/_mtermvectors", map[string]string{
- "index": s.index,
- })
- } else {
- path = "/_mtermvectors"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.fieldStatistics != nil {
- params.Set("field_statistics", fmt.Sprintf("%v", *s.fieldStatistics))
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- if len(s.ids) > 0 {
- params.Set("ids", strings.Join(s.ids, ","))
- }
- if s.offsets != nil {
- params.Set("offsets", fmt.Sprintf("%v", *s.offsets))
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.payloads != nil {
- params.Set("payloads", fmt.Sprintf("%v", *s.payloads))
- }
- if s.positions != nil {
- params.Set("positions", fmt.Sprintf("%v", *s.positions))
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.realtime != nil {
- params.Set("realtime", fmt.Sprintf("%v", *s.realtime))
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.termStatistics != nil {
- params.Set("term_statistics", fmt.Sprintf("%v", *s.termStatistics))
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", s.version))
- }
- if s.versionType != "" {
- params.Set("version_type", s.versionType)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *MultiTermvectorService) Validate() error {
- var invalid []string
- if s.index == "" && s.typ != "" {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *MultiTermvectorService) Do(ctx context.Context) (*MultiTermvectorResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else if len(s.bodyString) > 0 {
- body = s.bodyString
- } else {
- body = s.Source()
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(MultiTermvectorResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// MultiTermvectorResponse is the response of MultiTermvectorService.Do.
-type MultiTermvectorResponse struct {
- Docs []*TermvectorsResponse `json:"docs"`
-}
-
-// -- MultiTermvectorItem --
-
-// MultiTermvectorItem is a single document to retrieve via MultiTermvectorService.
-type MultiTermvectorItem struct {
- index string
- typ string
- id string
- doc interface{}
- fieldStatistics *bool
- fields []string
- perFieldAnalyzer map[string]string
- offsets *bool
- parent string
- payloads *bool
- positions *bool
- preference string
- realtime *bool
- routing string
- termStatistics *bool
-}
-
-func NewMultiTermvectorItem() *MultiTermvectorItem {
- return &MultiTermvectorItem{}
-}
-
-func (s *MultiTermvectorItem) Index(index string) *MultiTermvectorItem {
- s.index = index
- return s
-}
-
-func (s *MultiTermvectorItem) Type(typ string) *MultiTermvectorItem {
- s.typ = typ
- return s
-}
-
-func (s *MultiTermvectorItem) Id(id string) *MultiTermvectorItem {
- s.id = id
- return s
-}
-
-// Doc is the document to analyze.
-func (s *MultiTermvectorItem) Doc(doc interface{}) *MultiTermvectorItem {
- s.doc = doc
- return s
-}
-
-// FieldStatistics specifies if document count, sum of document frequencies
-// and sum of total term frequencies should be returned.
-func (s *MultiTermvectorItem) FieldStatistics(fieldStatistics bool) *MultiTermvectorItem {
- s.fieldStatistics = &fieldStatistics
- return s
-}
-
-// Fields a list of fields to return.
-func (s *MultiTermvectorItem) Fields(fields ...string) *MultiTermvectorItem {
- if s.fields == nil {
- s.fields = make([]string, 0)
- }
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// PerFieldAnalyzer allows to specify a different analyzer than the one
-// at the field.
-func (s *MultiTermvectorItem) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *MultiTermvectorItem {
- s.perFieldAnalyzer = perFieldAnalyzer
- return s
-}
-
-// Offsets specifies if term offsets should be returned.
-func (s *MultiTermvectorItem) Offsets(offsets bool) *MultiTermvectorItem {
- s.offsets = &offsets
- return s
-}
-
-// Parent id of documents.
-func (s *MultiTermvectorItem) Parent(parent string) *MultiTermvectorItem {
- s.parent = parent
- return s
-}
-
-// Payloads specifies if term payloads should be returned.
-func (s *MultiTermvectorItem) Payloads(payloads bool) *MultiTermvectorItem {
- s.payloads = &payloads
- return s
-}
-
-// Positions specifies if term positions should be returned.
-func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem {
- s.positions = &positions
- return s
-}
-
-// Preference specify the node or shard the operation
-// should be performed on (default: random).
-func (s *MultiTermvectorItem) Preference(preference string) *MultiTermvectorItem {
- s.preference = preference
- return s
-}
-
-// Realtime specifies if request is real-time as opposed to
-// near-real-time (default: true).
-func (s *MultiTermvectorItem) Realtime(realtime bool) *MultiTermvectorItem {
- s.realtime = &realtime
- return s
-}
-
-// Routing is a specific routing value.
-func (s *MultiTermvectorItem) Routing(routing string) *MultiTermvectorItem {
- s.routing = routing
- return s
-}
-
-// TermStatistics specifies if total term frequency and document frequency
-// should be returned.
-func (s *MultiTermvectorItem) TermStatistics(termStatistics bool) *MultiTermvectorItem {
- s.termStatistics = &termStatistics
- return s
-}
-
-// Source returns the serialized JSON to be sent to Elasticsearch as
-// part of a MultiTermvector.
-func (s *MultiTermvectorItem) Source() interface{} {
- source := make(map[string]interface{})
-
- source["_id"] = s.id
-
- if s.index != "" {
- source["_index"] = s.index
- }
- if s.typ != "" {
- source["_type"] = s.typ
- }
- if s.fields != nil {
- source["fields"] = s.fields
- }
- if s.fieldStatistics != nil {
- source["field_statistics"] = fmt.Sprintf("%v", *s.fieldStatistics)
- }
- if s.offsets != nil {
- source["offsets"] = s.offsets
- }
- if s.parent != "" {
- source["parent"] = s.parent
- }
- if s.payloads != nil {
- source["payloads"] = fmt.Sprintf("%v", *s.payloads)
- }
- if s.positions != nil {
- source["positions"] = fmt.Sprintf("%v", *s.positions)
- }
- if s.preference != "" {
- source["preference"] = s.preference
- }
- if s.realtime != nil {
- source["realtime"] = fmt.Sprintf("%v", *s.realtime)
- }
- if s.routing != "" {
- source["routing"] = s.routing
- }
- if s.termStatistics != nil {
- source["term_statistics"] = fmt.Sprintf("%v", *s.termStatistics)
- }
- if s.doc != nil {
- source["doc"] = s.doc
- }
- if s.perFieldAnalyzer != nil && len(s.perFieldAnalyzer) > 0 {
- source["per_field_analyzer"] = s.perFieldAnalyzer
- }
-
- return source
-}
diff --git a/vendor/github.com/olivere/elastic/mtermvectors_test.go b/vendor/github.com/olivere/elastic/mtermvectors_test.go
deleted file mode 100644
index 5f90cd5e2..000000000
--- a/vendor/github.com/olivere/elastic/mtermvectors_test.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestMultiTermVectorsValidateAndBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Index string
- Type string
- Expected string
- ExpectValidateFailure bool
- }{
- // #0: No index, no type
- {
- "",
- "",
- "/_mtermvectors",
- false,
- },
- // #1: Index only
- {
- "twitter",
- "",
- "/twitter/_mtermvectors",
- false,
- },
- // #2: Type without index
- {
- "",
- "doc",
- "",
- true,
- },
- // #3: Both index and type
- {
- "twitter",
- "doc",
- "/twitter/doc/_mtermvectors",
- false,
- },
- }
-
- for i, test := range tests {
- builder := client.MultiTermVectors().Index(test.Index).Type(test.Type)
- // Validate
- err := builder.Validate()
- if err != nil {
- if !test.ExpectValidateFailure {
- t.Errorf("#%d: expected no error, got: %v", i, err)
- continue
- }
- } else {
- if test.ExpectValidateFailure {
- t.Errorf("#%d: expected error, got: nil", i)
- continue
- }
- // Build
- path, _, err := builder.buildURL()
- if err != nil {
- t.Errorf("#%d: expected no error, got: %v", i, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("#%d: expected %q; got: %q", i, test.Expected, path)
- }
- }
- }
-}
-
-func TestMultiTermVectorsWithIds(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Count documents
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if count != 3 {
- t.Errorf("expected Count = %d; got %d", 3, count)
- }
-
- // MultiTermVectors by specifying ID by 1 and 3
- field := "Message"
- res, err := client.MultiTermVectors().
- Index(testIndexName).
- Type("doc").
- Add(NewMultiTermvectorItem().Index(testIndexName).Type("doc").Id("1").Fields(field)).
- Add(NewMultiTermvectorItem().Index(testIndexName).Type("doc").Id("3").Fields(field)).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected to return information and statistics")
- }
- if res.Docs == nil {
- t.Fatal("expected result docs to be != nil; got nil")
- }
- if len(res.Docs) != 2 {
- t.Fatalf("expected to have 2 docs; got %d", len(res.Docs))
- }
-}
diff --git a/vendor/github.com/olivere/elastic/nodes_info.go b/vendor/github.com/olivere/elastic/nodes_info.go
deleted file mode 100644
index 9f1422a69..000000000
--- a/vendor/github.com/olivere/elastic/nodes_info.go
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
- "time"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// NodesInfoService allows to retrieve one or more or all of the
-// cluster nodes information.
-// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-nodes-info.html.
-type NodesInfoService struct {
- client *Client
- pretty bool
- nodeId []string
- metric []string
- flatSettings *bool
- human *bool
-}
-
-// NewNodesInfoService creates a new NodesInfoService.
-func NewNodesInfoService(client *Client) *NodesInfoService {
- return &NodesInfoService{
- client: client,
- nodeId: []string{"_all"},
- metric: []string{"_all"},
- }
-}
-
-// NodeId is a list of node IDs or names to limit the returned information.
-// Use "_local" to return information from the node you're connecting to,
-// leave empty to get information from all nodes.
-func (s *NodesInfoService) NodeId(nodeId ...string) *NodesInfoService {
- s.nodeId = append(s.nodeId, nodeId...)
- return s
-}
-
-// Metric is a list of metrics you wish returned. Leave empty to return all.
-// Valid metrics are: settings, os, process, jvm, thread_pool, network,
-// transport, http, and plugins.
-func (s *NodesInfoService) Metric(metric ...string) *NodesInfoService {
- s.metric = append(s.metric, metric...)
- return s
-}
-
-// FlatSettings returns settings in flat format (default: false).
-func (s *NodesInfoService) FlatSettings(flatSettings bool) *NodesInfoService {
- s.flatSettings = &flatSettings
- return s
-}
-
-// Human indicates whether to return time and byte values in human-readable format.
-func (s *NodesInfoService) Human(human bool) *NodesInfoService {
- s.human = &human
- return s
-}
-
-// Pretty indicates whether to indent the returned JSON.
-func (s *NodesInfoService) Pretty(pretty bool) *NodesInfoService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *NodesInfoService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_nodes/{node_id}/{metric}", map[string]string{
- "node_id": strings.Join(s.nodeId, ","),
- "metric": strings.Join(s.metric, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.flatSettings != nil {
- params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- if s.pretty {
- params.Set("pretty", "true")
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *NodesInfoService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *NodesInfoService) Do(ctx context.Context) (*NodesInfoResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(NodesInfoResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// NodesInfoResponse is the response of NodesInfoService.Do.
-type NodesInfoResponse struct {
- ClusterName string `json:"cluster_name"`
- Nodes map[string]*NodesInfoNode `json:"nodes"`
-}
-
-type NodesInfoNode struct {
- // Name of the node, e.g. "Mister Fear"
- Name string `json:"name"`
- // TransportAddress, e.g. "127.0.0.1:9300"
- TransportAddress string `json:"transport_address"`
- // Host is the host name, e.g. "macbookair"
- Host string `json:"host"`
- // IP is the IP address, e.g. "192.168.1.2"
- IP string `json:"ip"`
- // Version is the Elasticsearch version running on the node, e.g. "1.4.3"
- Version string `json:"version"`
- // Build is the Elasticsearch build, e.g. "36a29a7"
- Build string `json:"build"`
- // HTTPAddress, e.g. "127.0.0.1:9200"
- HTTPAddress string `json:"http_address"`
- // HTTPSAddress, e.g. "127.0.0.1:9200"
- HTTPSAddress string `json:"https_address"`
-
- // Attributes of the node.
- Attributes map[string]interface{} `json:"attributes"`
-
- // Settings of the node, e.g. paths and pidfile.
- Settings map[string]interface{} `json:"settings"`
-
- // OS information, e.g. CPU and memory.
- OS *NodesInfoNodeOS `json:"os"`
-
- // Process information, e.g. max file descriptors.
- Process *NodesInfoNodeProcess `json:"process"`
-
- // JVM information, e.g. VM version.
- JVM *NodesInfoNodeJVM `json:"jvm"`
-
- // ThreadPool information.
- ThreadPool *NodesInfoNodeThreadPool `json:"thread_pool"`
-
- // Network information.
- Network *NodesInfoNodeNetwork `json:"network"`
-
- // Network information.
- Transport *NodesInfoNodeTransport `json:"transport"`
-
- // HTTP information.
- HTTP *NodesInfoNodeHTTP `json:"http"`
-
- // Plugins information.
- Plugins []*NodesInfoNodePlugin `json:"plugins"`
-}
-
-type NodesInfoNodeOS struct {
- RefreshInterval string `json:"refresh_interval"` // e.g. 1s
- RefreshIntervalInMillis int `json:"refresh_interval_in_millis"` // e.g. 1000
- AvailableProcessors int `json:"available_processors"` // e.g. 4
-
- // CPU information
- CPU struct {
- Vendor string `json:"vendor"` // e.g. Intel
- Model string `json:"model"` // e.g. iMac15,1
- MHz int `json:"mhz"` // e.g. 3500
- TotalCores int `json:"total_cores"` // e.g. 4
- TotalSockets int `json:"total_sockets"` // e.g. 4
- CoresPerSocket int `json:"cores_per_socket"` // e.g. 16
- CacheSizeInBytes int `json:"cache_size_in_bytes"` // e.g. 256
- } `json:"cpu"`
-
- // Mem information
- Mem struct {
- Total string `json:"total"` // e.g. 16gb
- TotalInBytes int `json:"total_in_bytes"` // e.g. 17179869184
- } `json:"mem"`
-
- // Swap information
- Swap struct {
- Total string `json:"total"` // e.g. 1gb
- TotalInBytes int `json:"total_in_bytes"` // e.g. 1073741824
- } `json:"swap"`
-}
-
-type NodesInfoNodeProcess struct {
- RefreshInterval string `json:"refresh_interval"` // e.g. 1s
- RefreshIntervalInMillis int `json:"refresh_interval_in_millis"` // e.g. 1000
- ID int `json:"id"` // process id, e.g. 87079
- MaxFileDescriptors int `json:"max_file_descriptors"` // e.g. 32768
- Mlockall bool `json:"mlockall"` // e.g. false
-}
-
-type NodesInfoNodeJVM struct {
- PID int `json:"pid"` // process id, e.g. 87079
- Version string `json:"version"` // e.g. "1.8.0_25"
- VMName string `json:"vm_name"` // e.g. "Java HotSpot(TM) 64-Bit Server VM"
- VMVersion string `json:"vm_version"` // e.g. "25.25-b02"
- VMVendor string `json:"vm_vendor"` // e.g. "Oracle Corporation"
- StartTime time.Time `json:"start_time"` // e.g. "2015-01-03T15:18:30.982Z"
- StartTimeInMillis int64 `json:"start_time_in_millis"`
-
- // Mem information
- Mem struct {
- HeapInit string `json:"heap_init"` // e.g. 1gb
- HeapInitInBytes int `json:"heap_init_in_bytes"`
- HeapMax string `json:"heap_max"` // e.g. 4gb
- HeapMaxInBytes int `json:"heap_max_in_bytes"`
- NonHeapInit string `json:"non_heap_init"` // e.g. 2.4mb
- NonHeapInitInBytes int `json:"non_heap_init_in_bytes"`
- NonHeapMax string `json:"non_heap_max"` // e.g. 0b
- NonHeapMaxInBytes int `json:"non_heap_max_in_bytes"`
- DirectMax string `json:"direct_max"` // e.g. 4gb
- DirectMaxInBytes int `json:"direct_max_in_bytes"`
- } `json:"mem"`
-
- GCCollectors []string `json:"gc_collectors"` // e.g. ["ParNew"]
- MemoryPools []string `json:"memory_pools"` // e.g. ["Code Cache", "Metaspace"]
-}
-
-type NodesInfoNodeThreadPool struct {
- Percolate *NodesInfoNodeThreadPoolSection `json:"percolate"`
- Bench *NodesInfoNodeThreadPoolSection `json:"bench"`
- Listener *NodesInfoNodeThreadPoolSection `json:"listener"`
- Index *NodesInfoNodeThreadPoolSection `json:"index"`
- Refresh *NodesInfoNodeThreadPoolSection `json:"refresh"`
- Suggest *NodesInfoNodeThreadPoolSection `json:"suggest"`
- Generic *NodesInfoNodeThreadPoolSection `json:"generic"`
- Warmer *NodesInfoNodeThreadPoolSection `json:"warmer"`
- Search *NodesInfoNodeThreadPoolSection `json:"search"`
- Flush *NodesInfoNodeThreadPoolSection `json:"flush"`
- Optimize *NodesInfoNodeThreadPoolSection `json:"optimize"`
- Management *NodesInfoNodeThreadPoolSection `json:"management"`
- Get *NodesInfoNodeThreadPoolSection `json:"get"`
- Merge *NodesInfoNodeThreadPoolSection `json:"merge"`
- Bulk *NodesInfoNodeThreadPoolSection `json:"bulk"`
- Snapshot *NodesInfoNodeThreadPoolSection `json:"snapshot"`
-}
-
-type NodesInfoNodeThreadPoolSection struct {
- Type string `json:"type"` // e.g. fixed
- Min int `json:"min"` // e.g. 4
- Max int `json:"max"` // e.g. 4
- KeepAlive string `json:"keep_alive"` // e.g. "5m"
- QueueSize interface{} `json:"queue_size"` // e.g. "1k" or -1
-}
-
-type NodesInfoNodeNetwork struct {
- RefreshInterval string `json:"refresh_interval"` // e.g. 1s
- RefreshIntervalInMillis int `json:"refresh_interval_in_millis"` // e.g. 1000
- PrimaryInterface struct {
- Address string `json:"address"` // e.g. 192.168.1.2
- Name string `json:"name"` // e.g. en0
- MACAddress string `json:"mac_address"` // e.g. 11:22:33:44:55:66
- } `json:"primary_interface"`
-}
-
-type NodesInfoNodeTransport struct {
- BoundAddress []string `json:"bound_address"`
- PublishAddress string `json:"publish_address"`
- Profiles map[string]*NodesInfoNodeTransportProfile `json:"profiles"`
-}
-
-type NodesInfoNodeTransportProfile struct {
- BoundAddress []string `json:"bound_address"`
- PublishAddress string `json:"publish_address"`
-}
-
-type NodesInfoNodeHTTP struct {
- BoundAddress []string `json:"bound_address"` // e.g. ["127.0.0.1:9200", "[fe80::1]:9200", "[::1]:9200"]
- PublishAddress string `json:"publish_address"` // e.g. "127.0.0.1:9300"
- MaxContentLength string `json:"max_content_length"` // e.g. "100mb"
- MaxContentLengthInBytes int64 `json:"max_content_length_in_bytes"`
-}
-
-type NodesInfoNodePlugin struct {
- Name string `json:"name"`
- Description string `json:"description"`
- Site bool `json:"site"`
- JVM bool `json:"jvm"`
- URL string `json:"url"` // e.g. /_plugin/dummy/
-}
diff --git a/vendor/github.com/olivere/elastic/nodes_info_test.go b/vendor/github.com/olivere/elastic/nodes_info_test.go
deleted file mode 100644
index 41d997584..000000000
--- a/vendor/github.com/olivere/elastic/nodes_info_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestNodesInfo(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
-
- info, err := client.NodesInfo().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if info == nil {
- t.Fatal("expected nodes info")
- }
-
- if info.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", info.ClusterName)
- }
- if len(info.Nodes) == 0 {
- t.Errorf("expected some nodes; got: %d", len(info.Nodes))
- }
- for id, node := range info.Nodes {
- if id == "" {
- t.Errorf("expected node id; got: %q", id)
- }
- if node == nil {
- t.Fatalf("expected node info; got: %v", node)
- }
- if node.IP == "" {
- t.Errorf("expected node IP; got: %q", node.IP)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/nodes_stats.go b/vendor/github.com/olivere/elastic/nodes_stats.go
deleted file mode 100644
index 7c5f0c9d6..000000000
--- a/vendor/github.com/olivere/elastic/nodes_stats.go
+++ /dev/null
@@ -1,703 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// NodesStatsService returns node statistics.
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-nodes-stats.html
-// for details.
-type NodesStatsService struct {
- client *Client
- pretty bool
- metric []string
- indexMetric []string
- nodeId []string
- completionFields []string
- fielddataFields []string
- fields []string
- groups *bool
- human *bool
- level string
- timeout string
- types []string
-}
-
-// NewNodesStatsService creates a new NodesStatsService.
-func NewNodesStatsService(client *Client) *NodesStatsService {
- return &NodesStatsService{
- client: client,
- }
-}
-
-// Metric limits the information returned to the specified metrics.
-func (s *NodesStatsService) Metric(metric ...string) *NodesStatsService {
- s.metric = append(s.metric, metric...)
- return s
-}
-
-// IndexMetric limits the information returned for `indices` metric
-// to the specific index metrics. Isn't used if `indices` (or `all`)
-// metric isn't specified..
-func (s *NodesStatsService) IndexMetric(indexMetric ...string) *NodesStatsService {
- s.indexMetric = append(s.indexMetric, indexMetric...)
- return s
-}
-
-// NodeId is a list of node IDs or names to limit the returned information;
-// use `_local` to return information from the node you're connecting to,
-// leave empty to get information from all nodes.
-func (s *NodesStatsService) NodeId(nodeId ...string) *NodesStatsService {
- s.nodeId = append(s.nodeId, nodeId...)
- return s
-}
-
-// CompletionFields is a list of fields for `fielddata` and `suggest`
-// index metric (supports wildcards).
-func (s *NodesStatsService) CompletionFields(completionFields ...string) *NodesStatsService {
- s.completionFields = append(s.completionFields, completionFields...)
- return s
-}
-
-// FielddataFields is a list of fields for `fielddata` index metric (supports wildcards).
-func (s *NodesStatsService) FielddataFields(fielddataFields ...string) *NodesStatsService {
- s.fielddataFields = append(s.fielddataFields, fielddataFields...)
- return s
-}
-
-// Fields is a list of fields for `fielddata` and `completion` index metric (supports wildcards).
-func (s *NodesStatsService) Fields(fields ...string) *NodesStatsService {
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// Groups is a list of search groups for `search` index metric.
-func (s *NodesStatsService) Groups(groups bool) *NodesStatsService {
- s.groups = &groups
- return s
-}
-
-// Human indicates whether to return time and byte values in human-readable format.
-func (s *NodesStatsService) Human(human bool) *NodesStatsService {
- s.human = &human
- return s
-}
-
-// Level specifies whether to return indices stats aggregated at node, index or shard level.
-func (s *NodesStatsService) Level(level string) *NodesStatsService {
- s.level = level
- return s
-}
-
-// Timeout specifies an explicit operation timeout.
-func (s *NodesStatsService) Timeout(timeout string) *NodesStatsService {
- s.timeout = timeout
- return s
-}
-
-// Types a list of document types for the `indexing` index metric.
-func (s *NodesStatsService) Types(types ...string) *NodesStatsService {
- s.types = append(s.types, types...)
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *NodesStatsService) Pretty(pretty bool) *NodesStatsService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *NodesStatsService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.nodeId) > 0 && len(s.metric) > 0 && len(s.indexMetric) > 0 {
- path, err = uritemplates.Expand("/_nodes/{node_id}/stats/{metric}/{index_metric}", map[string]string{
- "index_metric": strings.Join(s.indexMetric, ","),
- "node_id": strings.Join(s.nodeId, ","),
- "metric": strings.Join(s.metric, ","),
- })
- } else if len(s.nodeId) > 0 && len(s.metric) > 0 && len(s.indexMetric) == 0 {
- path, err = uritemplates.Expand("/_nodes/{node_id}/stats/{metric}", map[string]string{
- "node_id": strings.Join(s.nodeId, ","),
- "metric": strings.Join(s.metric, ","),
- })
- } else if len(s.nodeId) > 0 && len(s.metric) == 0 && len(s.indexMetric) > 0 {
- path, err = uritemplates.Expand("/_nodes/{node_id}/stats/_all/{index_metric}", map[string]string{
- "index_metric": strings.Join(s.indexMetric, ","),
- "node_id": strings.Join(s.nodeId, ","),
- })
- } else if len(s.nodeId) > 0 && len(s.metric) == 0 && len(s.indexMetric) == 0 {
- path, err = uritemplates.Expand("/_nodes/{node_id}/stats", map[string]string{
- "node_id": strings.Join(s.nodeId, ","),
- })
- } else if len(s.nodeId) == 0 && len(s.metric) > 0 && len(s.indexMetric) > 0 {
- path, err = uritemplates.Expand("/_nodes/stats/{metric}/{index_metric}", map[string]string{
- "index_metric": strings.Join(s.indexMetric, ","),
- "metric": strings.Join(s.metric, ","),
- })
- } else if len(s.nodeId) == 0 && len(s.metric) > 0 && len(s.indexMetric) == 0 {
- path, err = uritemplates.Expand("/_nodes/stats/{metric}", map[string]string{
- "metric": strings.Join(s.metric, ","),
- })
- } else if len(s.nodeId) == 0 && len(s.metric) == 0 && len(s.indexMetric) > 0 {
- path, err = uritemplates.Expand("/_nodes/stats/_all/{index_metric}", map[string]string{
- "index_metric": strings.Join(s.indexMetric, ","),
- })
- } else { // if len(s.nodeId) == 0 && len(s.metric) == 0 && len(s.indexMetric) == 0 {
- path = "/_nodes/stats"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.completionFields) > 0 {
- params.Set("completion_fields", strings.Join(s.completionFields, ","))
- }
- if len(s.fielddataFields) > 0 {
- params.Set("fielddata_fields", strings.Join(s.fielddataFields, ","))
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- if s.groups != nil {
- params.Set("groups", fmt.Sprintf("%v", *s.groups))
- }
- if s.human != nil {
- params.Set("human", fmt.Sprintf("%v", *s.human))
- }
- if s.level != "" {
- params.Set("level", s.level)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if len(s.types) > 0 {
- params.Set("types", strings.Join(s.types, ","))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *NodesStatsService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *NodesStatsService) Do(ctx context.Context) (*NodesStatsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(NodesStatsResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// NodesStatsResponse is the response of NodesStatsService.Do.
-type NodesStatsResponse struct {
- ClusterName string `json:"cluster_name"`
- Nodes map[string]*NodesStatsNode `json:"nodes"`
-}
-
-type NodesStatsNode struct {
- // Timestamp when these stats we're gathered.
- Timestamp int64 `json:"timestamp"`
- // Name of the node, e.g. "Mister Fear"
- Name string `json:"name"`
- // TransportAddress, e.g. "127.0.0.1:9300"
- TransportAddress string `json:"transport_address"`
- // Host is the host name, e.g. "macbookair"
- Host string `json:"host"`
- // IP is an IP address, e.g. "192.168.1.2"
- IP string `json:"ip"`
- // Roles is a list of the roles of the node, e.g. master, data, ingest.
- Roles []string `json:"roles"`
-
- // Attributes of the node.
- Attributes map[string]interface{} `json:"attributes"`
-
- // Indices returns index information.
- Indices *NodesStatsIndex `json:"indices"`
-
- // OS information, e.g. CPU and memory.
- OS *NodesStatsNodeOS `json:"os"`
-
- // Process information, e.g. max file descriptors.
- Process *NodesStatsNodeProcess `json:"process"`
-
- // JVM information, e.g. VM version.
- JVM *NodesStatsNodeJVM `json:"jvm"`
-
- // ThreadPool information.
- ThreadPool map[string]*NodesStatsNodeThreadPool `json:"thread_pool"`
-
- // FS returns information about the filesystem.
- FS *NodesStatsNodeFS `json:"fs"`
-
- // Network information.
- Transport *NodesStatsNodeTransport `json:"transport"`
-
- // HTTP information.
- HTTP *NodesStatsNodeHTTP `json:"http"`
-
- // Breaker contains information about circuit breakers.
- Breaker map[string]*NodesStatsBreaker `json:"breakers"`
-
- // ScriptStats information.
- ScriptStats *NodesStatsScriptStats `json:"script"`
-
- // Discovery information.
- Discovery *NodesStatsDiscovery `json:"discovery"`
-
- // Ingest information
- Ingest *NodesStatsIngest `json:"ingest"`
-}
-
-type NodesStatsIndex struct {
- Docs *NodesStatsDocsStats `json:"docs"`
- Store *NodesStatsStoreStats `json:"store"`
- Indexing *NodesStatsIndexingStats `json:"indexing"`
- Get *NodesStatsGetStats `json:"get"`
- Search *NodesStatsSearchStats `json:"search"`
- Merges *NodesStatsMergeStats `json:"merges"`
- Refresh *NodesStatsRefreshStats `json:"refresh"`
- Flush *NodesStatsFlushStats `json:"flush"`
- Warmer *NodesStatsWarmerStats `json:"warmer"`
- QueryCache *NodesStatsQueryCacheStats `json:"query_cache"`
- Fielddata *NodesStatsFielddataStats `json:"fielddata"`
- Percolate *NodesStatsPercolateStats `json:"percolate"`
- Completion *NodesStatsCompletionStats `json:"completion"`
- Segments *NodesStatsSegmentsStats `json:"segments"`
- Translog *NodesStatsTranslogStats `json:"translog"`
- Suggest *NodesStatsSuggestStats `json:"suggest"`
- RequestCache *NodesStatsRequestCacheStats `json:"request_cache"`
- Recovery NodesStatsRecoveryStats `json:"recovery"`
-
- Indices map[string]*NodesStatsIndex `json:"indices"` // for level=indices
- Shards map[string]*NodesStatsIndex `json:"shards"` // for level=shards
-}
-
-type NodesStatsDocsStats struct {
- Count int64 `json:"count"`
- Deleted int64 `json:"deleted"`
-}
-
-type NodesStatsStoreStats struct {
- Size string `json:"size"`
- SizeInBytes int64 `json:"size_in_bytes"`
-}
-
-type NodesStatsIndexingStats struct {
- IndexTotal int64 `json:"index_total"`
- IndexTime string `json:"index_time"`
- IndexTimeInMillis int64 `json:"index_time_in_millis"`
- IndexCurrent int64 `json:"index_current"`
- IndexFailed int64 `json:"index_failed"`
- DeleteTotal int64 `json:"delete_total"`
- DeleteTime string `json:"delete_time"`
- DeleteTimeInMillis int64 `json:"delete_time_in_millis"`
- DeleteCurrent int64 `json:"delete_current"`
- NoopUpdateTotal int64 `json:"noop_update_total"`
-
- Types map[string]*NodesStatsIndexingStats `json:"types"` // stats for individual types
-}
-
-type NodesStatsGetStats struct {
- Total int64 `json:"total"`
- Time string `json:"get_time"`
- TimeInMillis int64 `json:"time_in_millis"`
- Exists int64 `json:"exists"`
- ExistsTime string `json:"exists_time"`
- ExistsTimeInMillis int64 `json:"exists_in_millis"`
- Missing int64 `json:"missing"`
- MissingTime string `json:"missing_time"`
- MissingTimeInMillis int64 `json:"missing_in_millis"`
- Current int64 `json:"current"`
-}
-
-type NodesStatsSearchStats struct {
- OpenContexts int64 `json:"open_contexts"`
- QueryTotal int64 `json:"query_total"`
- QueryTime string `json:"query_time"`
- QueryTimeInMillis int64 `json:"query_time_in_millis"`
- QueryCurrent int64 `json:"query_current"`
- FetchTotal int64 `json:"fetch_total"`
- FetchTime string `json:"fetch_time"`
- FetchTimeInMillis int64 `json:"fetch_time_in_millis"`
- FetchCurrent int64 `json:"fetch_current"`
- ScrollTotal int64 `json:"scroll_total"`
- ScrollTime string `json:"scroll_time"`
- ScrollTimeInMillis int64 `json:"scroll_time_in_millis"`
- ScrollCurrent int64 `json:"scroll_current"`
-
- Groups map[string]*NodesStatsSearchStats `json:"groups"` // stats for individual groups
-}
-
-type NodesStatsMergeStats struct {
- Current int64 `json:"current"`
- CurrentDocs int64 `json:"current_docs"`
- CurrentSize string `json:"current_size"`
- CurrentSizeInBytes int64 `json:"current_size_in_bytes"`
- Total int64 `json:"total"`
- TotalTime string `json:"total_time"`
- TotalTimeInMillis int64 `json:"total_time_in_millis"`
- TotalDocs int64 `json:"total_docs"`
- TotalSize string `json:"total_size"`
- TotalSizeInBytes int64 `json:"total_size_in_bytes"`
- TotalStoppedTime string `json:"total_stopped_time"`
- TotalStoppedTimeInMillis int64 `json:"total_stopped_time_in_millis"`
- TotalThrottledTime string `json:"total_throttled_time"`
- TotalThrottledTimeInMillis int64 `json:"total_throttled_time_in_millis"`
- TotalThrottleBytes string `json:"total_auto_throttle"`
- TotalThrottleBytesInBytes int64 `json:"total_auto_throttle_in_bytes"`
-}
-
-type NodesStatsRefreshStats struct {
- Total int64 `json:"total"`
- TotalTime string `json:"total_time"`
- TotalTimeInMillis int64 `json:"total_time_in_millis"`
-}
-
-type NodesStatsFlushStats struct {
- Total int64 `json:"total"`
- TotalTime string `json:"total_time"`
- TotalTimeInMillis int64 `json:"total_time_in_millis"`
-}
-
-type NodesStatsWarmerStats struct {
- Current int64 `json:"current"`
- Total int64 `json:"total"`
- TotalTime string `json:"total_time"`
- TotalTimeInMillis int64 `json:"total_time_in_millis"`
-}
-
-type NodesStatsQueryCacheStats struct {
- MemorySize string `json:"memory_size"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- TotalCount int64 `json:"total_count"`
- HitCount int64 `json:"hit_count"`
- MissCount int64 `json:"miss_count"`
- CacheSize int64 `json:"cache_size"`
- CacheCount int64 `json:"cache_count"`
- Evictions int64 `json:"evictions"`
-}
-
-type NodesStatsFielddataStats struct {
- MemorySize string `json:"memory_size"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- Evictions int64 `json:"evictions"`
- Fields map[string]struct {
- MemorySize string `json:"memory_size"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- } `json:"fields"`
-}
-
-type NodesStatsPercolateStats struct {
- Total int64 `json:"total"`
- Time string `json:"time"`
- TimeInMillis int64 `json:"time_in_millis"`
- Current int64 `json:"current"`
- MemorySize string `json:"memory_size"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- Queries int64 `json:"queries"`
-}
-
-type NodesStatsCompletionStats struct {
- Size string `json:"size"`
- SizeInBytes int64 `json:"size_in_bytes"`
- Fields map[string]struct {
- Size string `json:"size"`
- SizeInBytes int64 `json:"size_in_bytes"`
- } `json:"fields"`
-}
-
-type NodesStatsSegmentsStats struct {
- Count int64 `json:"count"`
- Memory string `json:"memory"`
- MemoryInBytes int64 `json:"memory_in_bytes"`
- TermsMemory string `json:"terms_memory"`
- TermsMemoryInBytes int64 `json:"terms_memory_in_bytes"`
- StoredFieldsMemory string `json:"stored_fields_memory"`
- StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"`
- TermVectorsMemory string `json:"term_vectors_memory"`
- TermVectorsMemoryInBytes int64 `json:"term_vectors_memory_in_bytes"`
- NormsMemory string `json:"norms_memory"`
- NormsMemoryInBytes int64 `json:"norms_memory_in_bytes"`
- DocValuesMemory string `json:"doc_values_memory"`
- DocValuesMemoryInBytes int64 `json:"doc_values_memory_in_bytes"`
- IndexWriterMemory string `json:"index_writer_memory"`
- IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"`
- IndexWriterMaxMemory string `json:"index_writer_max_memory"`
- IndexWriterMaxMemoryInBytes int64 `json:"index_writer_max_memory_in_bytes"`
- VersionMapMemory string `json:"version_map_memory"`
- VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"`
- FixedBitSetMemory string `json:"fixed_bit_set"` // not a typo
- FixedBitSetMemoryInBytes int64 `json:"fixed_bit_set_memory_in_bytes"`
-}
-
-type NodesStatsTranslogStats struct {
- Operations int64 `json:"operations"`
- Size string `json:"size"`
- SizeInBytes int64 `json:"size_in_bytes"`
-}
-
-type NodesStatsSuggestStats struct {
- Total int64 `json:"total"`
- TotalTime string `json:"total_time"`
- TotalTimeInMillis int64 `json:"total_time_in_millis"`
- Current int64 `json:"current"`
-}
-
-type NodesStatsRequestCacheStats struct {
- MemorySize string `json:"memory_size"`
- MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
- Evictions int64 `json:"evictions"`
- HitCount int64 `json:"hit_count"`
- MissCount int64 `json:"miss_count"`
-}
-
-type NodesStatsRecoveryStats struct {
- CurrentAsSource int `json:"current_as_source"`
- CurrentAsTarget int `json:"current_as_target"`
-}
-
-type NodesStatsNodeOS struct {
- Timestamp int64 `json:"timestamp"`
- CPU *NodesStatsNodeOSCPU `json:"cpu"`
- Mem *NodesStatsNodeOSMem `json:"mem"`
- Swap *NodesStatsNodeOSSwap `json:"swap"`
-}
-
-type NodesStatsNodeOSCPU struct {
- Percent int `json:"percent"`
- LoadAverage map[string]float64 `json:"load_average"` // keys are: 1m, 5m, and 15m
-}
-
-type NodesStatsNodeOSMem struct {
- Total string `json:"total"`
- TotalInBytes int64 `json:"total_in_bytes"`
- Free string `json:"free"`
- FreeInBytes int64 `json:"free_in_bytes"`
- Used string `json:"used"`
- UsedInBytes int64 `json:"used_in_bytes"`
- FreePercent int `json:"free_percent"`
- UsedPercent int `json:"used_percent"`
-}
-
-type NodesStatsNodeOSSwap struct {
- Total string `json:"total"`
- TotalInBytes int64 `json:"total_in_bytes"`
- Free string `json:"free"`
- FreeInBytes int64 `json:"free_in_bytes"`
- Used string `json:"used"`
- UsedInBytes int64 `json:"used_in_bytes"`
-}
-
-type NodesStatsNodeProcess struct {
- Timestamp int64 `json:"timestamp"`
- OpenFileDescriptors int64 `json:"open_file_descriptors"`
- MaxFileDescriptors int64 `json:"max_file_descriptors"`
- CPU struct {
- Percent int `json:"percent"`
- Total string `json:"total"`
- TotalInMillis int64 `json:"total_in_millis"`
- } `json:"cpu"`
- Mem struct {
- TotalVirtual string `json:"total_virtual"`
- TotalVirtualInBytes int64 `json:"total_virtual_in_bytes"`
- } `json:"mem"`
-}
-
-type NodesStatsNodeJVM struct {
- Timestamp int64 `json:"timestamp"`
- Uptime string `json:"uptime"`
- UptimeInMillis int64 `json:"uptime_in_millis"`
- Mem *NodesStatsNodeJVMMem `json:"mem"`
- Threads *NodesStatsNodeJVMThreads `json:"threads"`
- GC *NodesStatsNodeJVMGC `json:"gc"`
- BufferPools map[string]*NodesStatsNodeJVMBufferPool `json:"buffer_pools"`
- Classes *NodesStatsNodeJVMClasses `json:"classes"`
-}
-
-type NodesStatsNodeJVMMem struct {
- HeapUsed string `json:"heap_used"`
- HeapUsedInBytes int64 `json:"heap_used_in_bytes"`
- HeapUsedPercent int `json:"heap_used_percent"`
- HeapCommitted string `json:"heap_committed"`
- HeapCommittedInBytes int64 `json:"heap_committed_in_bytes"`
- HeapMax string `json:"heap_max"`
- HeapMaxInBytes int64 `json:"heap_max_in_bytes"`
- NonHeapUsed string `json:"non_heap_used"`
- NonHeapUsedInBytes int64 `json:"non_heap_used_in_bytes"`
- NonHeapCommitted string `json:"non_heap_committed"`
- NonHeapCommittedInBytes int64 `json:"non_heap_committed_in_bytes"`
- Pools map[string]struct {
- Used string `json:"used"`
- UsedInBytes int64 `json:"used_in_bytes"`
- Max string `json:"max"`
- MaxInBytes int64 `json:"max_in_bytes"`
- PeakUsed string `json:"peak_used"`
- PeakUsedInBytes int64 `json:"peak_used_in_bytes"`
- PeakMax string `json:"peak_max"`
- PeakMaxInBytes int64 `json:"peak_max_in_bytes"`
- } `json:"pools"`
-}
-
-type NodesStatsNodeJVMThreads struct {
- Count int64 `json:"count"`
- PeakCount int64 `json:"peak_count"`
-}
-
-type NodesStatsNodeJVMGC struct {
- Collectors map[string]*NodesStatsNodeJVMGCCollector `json:"collectors"`
-}
-
-type NodesStatsNodeJVMGCCollector struct {
- CollectionCount int64 `json:"collection_count"`
- CollectionTime string `json:"collection_time"`
- CollectionTimeInMillis int64 `json:"collection_time_in_millis"`
-}
-
-type NodesStatsNodeJVMBufferPool struct {
- Count int64 `json:"count"`
- TotalCapacity string `json:"total_capacity"`
- TotalCapacityInBytes int64 `json:"total_capacity_in_bytes"`
-}
-
-type NodesStatsNodeJVMClasses struct {
- CurrentLoadedCount int64 `json:"current_loaded_count"`
- TotalLoadedCount int64 `json:"total_loaded_count"`
- TotalUnloadedCount int64 `json:"total_unloaded_count"`
-}
-
-type NodesStatsNodeThreadPool struct {
- Threads int `json:"threads"`
- Queue int `json:"queue"`
- Active int `json:"active"`
- Rejected int64 `json:"rejected"`
- Largest int `json:"largest"`
- Completed int64 `json:"completed"`
-}
-
-type NodesStatsNodeFS struct {
- Timestamp int64 `json:"timestamp"`
- Total *NodesStatsNodeFSEntry `json:"total"`
- Data []*NodesStatsNodeFSEntry `json:"data"`
- IOStats *NodesStatsNodeFSIOStats `json:"io_stats"`
-}
-
-type NodesStatsNodeFSEntry struct {
- Path string `json:"path"`
- Mount string `json:"mount"`
- Type string `json:"type"`
- Total string `json:"total"`
- TotalInBytes int64 `json:"total_in_bytes"`
- Free string `json:"free"`
- FreeInBytes int64 `json:"free_in_bytes"`
- Available string `json:"available"`
- AvailableInBytes int64 `json:"available_in_bytes"`
- Spins string `json:"spins"`
-}
-
-type NodesStatsNodeFSIOStats struct {
- Devices []*NodesStatsNodeFSIOStatsEntry `json:"devices"`
- Total *NodesStatsNodeFSIOStatsEntry `json:"total"`
-}
-
-type NodesStatsNodeFSIOStatsEntry struct {
- DeviceName string `json:"device_name"`
- Operations int64 `json:"operations"`
- ReadOperations int64 `json:"read_operations"`
- WriteOperations int64 `json:"write_operations"`
- ReadKilobytes int64 `json:"read_kilobytes"`
- WriteKilobytes int64 `json:"write_kilobytes"`
-}
-
-type NodesStatsNodeTransport struct {
- ServerOpen int `json:"server_open"`
- RxCount int64 `json:"rx_count"`
- RxSize string `json:"rx_size"`
- RxSizeInBytes int64 `json:"rx_size_in_bytes"`
- TxCount int64 `json:"tx_count"`
- TxSize string `json:"tx_size"`
- TxSizeInBytes int64 `json:"tx_size_in_bytes"`
-}
-
-type NodesStatsNodeHTTP struct {
- CurrentOpen int `json:"current_open"`
- TotalOpened int `json:"total_opened"`
-}
-
-type NodesStatsBreaker struct {
- LimitSize string `json:"limit_size"`
- LimitSizeInBytes int64 `json:"limit_size_in_bytes"`
- EstimatedSize string `json:"estimated_size"`
- EstimatedSizeInBytes int64 `json:"estimated_size_in_bytes"`
- Overhead float64 `json:"overhead"`
- Tripped int64 `json:"tripped"`
-}
-
-type NodesStatsScriptStats struct {
- Compilations int64 `json:"compilations"`
- CacheEvictions int64 `json:"cache_evictions"`
-}
-
-type NodesStatsDiscovery struct {
- ClusterStateQueue *NodesStatsDiscoveryStats `json:"cluster_state_queue"`
-}
-
-type NodesStatsDiscoveryStats struct {
- Total int64 `json:"total"`
- Pending int64 `json:"pending"`
- Committed int64 `json:"committed"`
-}
-
-type NodesStatsIngest struct {
- Total *NodesStatsIngestStats `json:"total"`
- Pipelines interface{} `json:"pipelines"`
-}
-
-type NodesStatsIngestStats struct {
- Count int64 `json:"count"`
- Time string `json:"time"`
- TimeInMillis int64 `json:"time_in_millis"`
- Current int64 `json:"current"`
- Failed int64 `json:"failed"`
-}
diff --git a/vendor/github.com/olivere/elastic/nodes_stats_test.go b/vendor/github.com/olivere/elastic/nodes_stats_test.go
deleted file mode 100644
index 4b249a2f4..000000000
--- a/vendor/github.com/olivere/elastic/nodes_stats_test.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestNodesStats(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
-
- info, err := client.NodesStats().Human(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if info == nil {
- t.Fatal("expected nodes stats")
- }
-
- if info.ClusterName == "" {
- t.Errorf("expected cluster name; got: %q", info.ClusterName)
- }
- if len(info.Nodes) == 0 {
- t.Errorf("expected some nodes; got: %d", len(info.Nodes))
- }
- for id, node := range info.Nodes {
- if id == "" {
- t.Errorf("expected node id; got: %q", id)
- }
- if node == nil {
- t.Fatalf("expected node info; got: %v", node)
- }
- if len(node.Name) == 0 {
- t.Errorf("expected node name; got: %q", node.Name)
- }
- if node.Timestamp == 0 {
- t.Errorf("expected timestamp; got: %q", node.Timestamp)
- }
- }
-}
-
-func TestNodesStatsBuildURL(t *testing.T) {
- tests := []struct {
- NodeIds []string
- Metrics []string
- IndexMetrics []string
- Expected string
- }{
- {
- NodeIds: nil,
- Metrics: nil,
- IndexMetrics: nil,
- Expected: "/_nodes/stats",
- },
- {
- NodeIds: []string{"node1"},
- Metrics: nil,
- IndexMetrics: nil,
- Expected: "/_nodes/node1/stats",
- },
- {
- NodeIds: []string{"node1", "node2"},
- Metrics: nil,
- IndexMetrics: nil,
- Expected: "/_nodes/node1%2Cnode2/stats",
- },
- {
- NodeIds: nil,
- Metrics: []string{"indices"},
- IndexMetrics: nil,
- Expected: "/_nodes/stats/indices",
- },
- {
- NodeIds: nil,
- Metrics: []string{"indices", "jvm"},
- IndexMetrics: nil,
- Expected: "/_nodes/stats/indices%2Cjvm",
- },
- {
- NodeIds: []string{"node1"},
- Metrics: []string{"indices", "jvm"},
- IndexMetrics: nil,
- Expected: "/_nodes/node1/stats/indices%2Cjvm",
- },
- {
- NodeIds: nil,
- Metrics: nil,
- IndexMetrics: []string{"fielddata"},
- Expected: "/_nodes/stats/_all/fielddata",
- },
- {
- NodeIds: []string{"node1"},
- Metrics: nil,
- IndexMetrics: []string{"fielddata"},
- Expected: "/_nodes/node1/stats/_all/fielddata",
- },
- {
- NodeIds: nil,
- Metrics: []string{"indices"},
- IndexMetrics: []string{"fielddata"},
- Expected: "/_nodes/stats/indices/fielddata",
- },
- {
- NodeIds: []string{"node1"},
- Metrics: []string{"indices"},
- IndexMetrics: []string{"fielddata"},
- Expected: "/_nodes/node1/stats/indices/fielddata",
- },
- {
- NodeIds: []string{"node1", "node2"},
- Metrics: []string{"indices", "jvm"},
- IndexMetrics: []string{"fielddata", "docs"},
- Expected: "/_nodes/node1%2Cnode2/stats/indices%2Cjvm/fielddata%2Cdocs",
- },
- }
-
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- for i, tt := range tests {
- svc := client.NodesStats().NodeId(tt.NodeIds...).Metric(tt.Metrics...).IndexMetric(tt.IndexMetrics...)
- path, _, err := svc.buildURL()
- if err != nil {
- t.Errorf("#%d: expected no error, got %v", i, err)
- } else {
- if want, have := tt.Expected, path; want != have {
- t.Errorf("#%d: expected %q, got %q", i, want, have)
- }
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/percolate_test.go b/vendor/github.com/olivere/elastic/percolate_test.go
deleted file mode 100644
index 3b3b2efb7..000000000
--- a/vendor/github.com/olivere/elastic/percolate_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestPercolate(t *testing.T) {
- //client := setupTestClientAndCreateIndex(t, SetErrorLog(log.New(os.Stdout, "", 0)))
- //client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- // Create query index
- createQueryIndex, err := client.CreateIndex(testQueryIndex).Body(testQueryMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createQueryIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createQueryIndex)
- }
-
- // Add a document
- _, err = client.Index().
- Index(testQueryIndex).
- Type("doc").
- Id("1").
- BodyJson(`{"query":{"match":{"message":"bonsai tree"}}}`).
- Refresh("wait_for").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Percolate should return our registered query
- pq := NewPercolatorQuery().
- Field("query").
- DocumentType("doc").
- Document(doctype{Message: "A new bonsai tree in the office"})
- res, err := client.Search(testQueryIndex).Type("doc").Query(pq).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected results != nil; got nil")
- }
- if res.Hits == nil {
- t.Fatal("expected SearchResult.Hits != nil; got nil")
- }
- if got, want := res.Hits.TotalHits, int64(1); got != want {
- t.Fatalf("expected SearchResult.Hits.TotalHits = %d; got %d", want, got)
- }
- if got, want := len(res.Hits.Hits), 1; got != want {
- t.Fatalf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, got)
- }
- hit := res.Hits.Hits[0]
- if hit.Index != testQueryIndex {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testQueryIndex, hit.Index)
- }
- got := string(*hit.Source)
- expected := `{"query":{"match":{"message":"bonsai tree"}}}`
- if got != expected {
- t.Fatalf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/ping.go b/vendor/github.com/olivere/elastic/ping.go
deleted file mode 100644
index 5c2d34f00..000000000
--- a/vendor/github.com/olivere/elastic/ping.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "net/http"
- "net/url"
-)
-
-// PingService checks if an Elasticsearch server on a given URL is alive.
-// When asked for, it can also return various information about the
-// Elasticsearch server, e.g. the Elasticsearch version number.
-//
-// Ping simply starts a HTTP GET request to the URL of the server.
-// If the server responds with HTTP Status code 200 OK, the server is alive.
-type PingService struct {
- client *Client
- url string
- timeout string
- httpHeadOnly bool
- pretty bool
-}
-
-// PingResult is the result returned from querying the Elasticsearch server.
-type PingResult struct {
- Name string `json:"name"`
- ClusterName string `json:"cluster_name"`
- Version struct {
- Number string `json:"number"`
- BuildHash string `json:"build_hash"`
- BuildTimestamp string `json:"build_timestamp"`
- BuildSnapshot bool `json:"build_snapshot"`
- LuceneVersion string `json:"lucene_version"`
- } `json:"version"`
- TagLine string `json:"tagline"`
-}
-
-func NewPingService(client *Client) *PingService {
- return &PingService{
- client: client,
- url: DefaultURL,
- httpHeadOnly: false,
- pretty: false,
- }
-}
-
-func (s *PingService) URL(url string) *PingService {
- s.url = url
- return s
-}
-
-func (s *PingService) Timeout(timeout string) *PingService {
- s.timeout = timeout
- return s
-}
-
-// HeadOnly makes the service to only return the status code in Do;
-// the PingResult will be nil.
-func (s *PingService) HttpHeadOnly(httpHeadOnly bool) *PingService {
- s.httpHeadOnly = httpHeadOnly
- return s
-}
-
-func (s *PingService) Pretty(pretty bool) *PingService {
- s.pretty = pretty
- return s
-}
-
-// Do returns the PingResult, the HTTP status code of the Elasticsearch
-// server, and an error.
-func (s *PingService) Do(ctx context.Context) (*PingResult, int, error) {
- s.client.mu.RLock()
- basicAuth := s.client.basicAuth
- basicAuthUsername := s.client.basicAuthUsername
- basicAuthPassword := s.client.basicAuthPassword
- s.client.mu.RUnlock()
-
- url_ := s.url + "/"
-
- params := make(url.Values)
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(params) > 0 {
- url_ += "?" + params.Encode()
- }
-
- var method string
- if s.httpHeadOnly {
- method = "HEAD"
- } else {
- method = "GET"
- }
-
- // Notice: This service must NOT use PerformRequest!
- req, err := NewRequest(method, url_)
- if err != nil {
- return nil, 0, err
- }
-
- if basicAuth {
- req.SetBasicAuth(basicAuthUsername, basicAuthPassword)
- }
-
- res, err := s.client.c.Do((*http.Request)(req).WithContext(ctx))
- if err != nil {
- return nil, 0, err
- }
- defer res.Body.Close()
-
- var ret *PingResult
- if !s.httpHeadOnly {
- ret = new(PingResult)
- if err := json.NewDecoder(res.Body).Decode(ret); err != nil {
- return nil, res.StatusCode, err
- }
- }
-
- return ret, res.StatusCode, nil
-}
diff --git a/vendor/github.com/olivere/elastic/ping_test.go b/vendor/github.com/olivere/elastic/ping_test.go
deleted file mode 100644
index 273913803..000000000
--- a/vendor/github.com/olivere/elastic/ping_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net/http"
- "testing"
-)
-
-func TestPingGet(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- res, code, err := client.Ping(DefaultURL).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if code != http.StatusOK {
- t.Errorf("expected status code = %d; got %d", http.StatusOK, code)
- }
- if res == nil {
- t.Fatalf("expected to return result, got: %v", res)
- }
- if res.Name == "" {
- t.Errorf("expected Name != \"\"; got %q", res.Name)
- }
- if res.Version.Number == "" {
- t.Errorf("expected Version.Number != \"\"; got %q", res.Version.Number)
- }
-}
-
-func TestPingHead(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- res, code, err := client.Ping(DefaultURL).HttpHeadOnly(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if code != http.StatusOK {
- t.Errorf("expected status code = %d; got %d", http.StatusOK, code)
- }
- if res != nil {
- t.Errorf("expected not to return result, got: %v", res)
- }
-}
-
-func TestPingHeadFailure(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- res, code, err := client.
- Ping("http://127.0.0.1:9299").
- HttpHeadOnly(true).
- Do(context.TODO())
- if err == nil {
- t.Error("expected error, got nil")
- }
- if code == http.StatusOK {
- t.Errorf("expected status code != %d; got %d", http.StatusOK, code)
- }
- if res != nil {
- t.Errorf("expected not to return result, got: %v", res)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/plugins.go b/vendor/github.com/olivere/elastic/plugins.go
deleted file mode 100644
index 60bda7552..000000000
--- a/vendor/github.com/olivere/elastic/plugins.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "context"
-
-// HasPlugin indicates whether the cluster has the named plugin.
-func (c *Client) HasPlugin(name string) (bool, error) {
- plugins, err := c.Plugins()
- if err != nil {
- return false, nil
- }
- for _, plugin := range plugins {
- if plugin == name {
- return true, nil
- }
- }
- return false, nil
-}
-
-// Plugins returns the list of all registered plugins.
-func (c *Client) Plugins() ([]string, error) {
- stats, err := c.ClusterStats().Do(context.Background())
- if err != nil {
- return nil, err
- }
- if stats == nil {
- return nil, err
- }
- if stats.Nodes == nil {
- return nil, err
- }
- var plugins []string
- for _, plugin := range stats.Nodes.Plugins {
- plugins = append(plugins, plugin.Name)
- }
- return plugins, nil
-}
diff --git a/vendor/github.com/olivere/elastic/plugins_test.go b/vendor/github.com/olivere/elastic/plugins_test.go
deleted file mode 100644
index 969f0b0e5..000000000
--- a/vendor/github.com/olivere/elastic/plugins_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestClientPlugins(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Plugins()
- if err != nil {
- t.Fatal(err)
- }
-}
-
-func TestClientHasPlugin(t *testing.T) {
- client, err := NewClient()
- if err != nil {
- t.Fatal(err)
- }
- found, err := client.HasPlugin("no-such-plugin")
- if err != nil {
- t.Fatal(err)
- }
- if found {
- t.Fatalf("expected to not find plugin %q", "no-such-plugin")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/query.go b/vendor/github.com/olivere/elastic/query.go
deleted file mode 100644
index ad01354a0..000000000
--- a/vendor/github.com/olivere/elastic/query.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// Query represents the generic query interface. A query's sole purpose
-// is to return the source of the query as a JSON-serializable object.
-// Returning map[string]interface{} is the norm for queries.
-type Query interface {
- // Source returns the JSON-serializable query request.
- Source() (interface{}, error)
-}
diff --git a/vendor/github.com/olivere/elastic/recipes/bulk_insert/bulk_insert.go b/vendor/github.com/olivere/elastic/recipes/bulk_insert/bulk_insert.go
deleted file mode 100644
index 5a8ab39d0..000000000
--- a/vendor/github.com/olivere/elastic/recipes/bulk_insert/bulk_insert.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// BulkInsert illustrates how to bulk insert documents into Elasticsearch.
-//
-// It uses two goroutines to do so. The first creates a simple document
-// and sends it to the second via a channel. The second goroutine collects
-// those documents, creates a bulk request that is added to a Bulk service
-// and committed to Elasticsearch after reaching a number of documents.
-// The number of documents after which a commit happens can be specified
-// via the "bulk-size" flag.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-bulk.html
-// for details on the Bulk API in Elasticsearch.
-//
-// Example
-//
-// Bulk index 100.000 documents into the index "warehouse", type "product",
-// committing every set of 1.000 documents.
-//
-// bulk_insert -index=warehouse -type=product -n=100000 -bulk-size=1000
-//
-package main
-
-import (
- "context"
- "encoding/base64"
- "errors"
- "flag"
- "fmt"
- "log"
- "math/rand"
- "sync/atomic"
- "time"
-
- "golang.org/x/sync/errgroup"
- "github.com/olivere/elastic"
-)
-
-func main() {
- var (
- url = flag.String("url", "http://localhost:9200", "Elasticsearch URL")
- index = flag.String("index", "", "Elasticsearch index name")
- typ = flag.String("type", "", "Elasticsearch type name")
- sniff = flag.Bool("sniff", true, "Enable or disable sniffing")
- n = flag.Int("n", 0, "Number of documents to bulk insert")
- bulkSize = flag.Int("bulk-size", 0, "Number of documents to collect before committing")
- )
- flag.Parse()
- log.SetFlags(0)
- rand.Seed(time.Now().UnixNano())
-
- if *url == "" {
- log.Fatal("missing url parameter")
- }
- if *index == "" {
- log.Fatal("missing index parameter")
- }
- if *typ == "" {
- log.Fatal("missing type parameter")
- }
- if *n <= 0 {
- log.Fatal("n must be a positive number")
- }
- if *bulkSize <= 0 {
- log.Fatal("bulk-size must be a positive number")
- }
-
- // Create an Elasticsearch client
- client, err := elastic.NewClient(elastic.SetURL(*url), elastic.SetSniff(*sniff))
- if err != nil {
- log.Fatal(err)
- }
-
- // Setup a group of goroutines from the excellent errgroup package
- g, ctx := errgroup.WithContext(context.TODO())
-
- // The first goroutine will emit documents and send it to the second goroutine
- // via the docsc channel.
- // The second Goroutine will simply bulk insert the documents.
- type doc struct {
- ID string `json:"id"`
- Timestamp time.Time `json:"@timestamp"`
- }
- docsc := make(chan doc)
-
- begin := time.Now()
-
- // Goroutine to create documents
- g.Go(func() error {
- defer close(docsc)
-
- buf := make([]byte, 32)
- for i := 0; i < *n; i++ {
- // Generate a random ID
- _, err := rand.Read(buf)
- if err != nil {
- return err
- }
- id := base64.URLEncoding.EncodeToString(buf)
-
- // Construct the document
- d := doc{
- ID: id,
- Timestamp: time.Now(),
- }
-
- // Send over to 2nd goroutine, or cancel
- select {
- case docsc <- d:
- case <-ctx.Done():
- return ctx.Err()
- }
- }
- return nil
- })
-
- // Second goroutine will consume the documents sent from the first and bulk insert into ES
- var total uint64
- g.Go(func() error {
- bulk := client.Bulk().Index(*index).Type(*typ)
- for d := range docsc {
- // Simple progress
- current := atomic.AddUint64(&total, 1)
- dur := time.Since(begin).Seconds()
- sec := int(dur)
- pps := int64(float64(current) / dur)
- fmt.Printf("%10d | %6d req/s | %02d:%02d\r", current, pps, sec/60, sec%60)
-
- // Enqueue the document
- bulk.Add(elastic.NewBulkIndexRequest().Id(d.ID).Doc(d))
- if bulk.NumberOfActions() >= *bulkSize {
- // Commit
- res, err := bulk.Do(ctx)
- if err != nil {
- return err
- }
- if res.Errors {
- // Look up the failed documents with res.Failed(), and e.g. recommit
- return errors.New("bulk commit failed")
- }
- // "bulk" is reset after Do, so you can reuse it
- }
-
- select {
- default:
- case <-ctx.Done():
- return ctx.Err()
- }
- }
-
- // Commit the final batch before exiting
- if bulk.NumberOfActions() > 0 {
- _, err = bulk.Do(ctx)
- if err != nil {
- return err
- }
- }
- return nil
- })
-
- // Wait until all goroutines are finished
- if err := g.Wait(); err != nil {
- log.Fatal(err)
- }
-
- // Final results
- dur := time.Since(begin).Seconds()
- sec := int(dur)
- pps := int64(float64(total) / dur)
- fmt.Printf("%10d | %6d req/s | %02d:%02d\n", total, pps, sec/60, sec%60)
-}
diff --git a/vendor/github.com/olivere/elastic/recipes/bulk_processor/main.go b/vendor/github.com/olivere/elastic/recipes/bulk_processor/main.go
deleted file mode 100644
index f13243297..000000000
--- a/vendor/github.com/olivere/elastic/recipes/bulk_processor/main.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// BulkProcessor runs a bulk processing job that fills an index
-// given certain criteria like flush interval etc.
-//
-// Example
-//
-// bulk_processor -url=http://127.0.0.1:9200/bulk-processor-test?sniff=false -n=100000 -flush-interval=1s
-//
-package main
-
-import (
- "context"
- "flag"
- "fmt"
- "log"
- "math/rand"
- "os"
- "os/signal"
- "sync/atomic"
- "syscall"
- "time"
-
- "github.com/google/uuid"
-
- "github.com/olivere/elastic"
- "github.com/olivere/elastic/config"
-)
-
-func main() {
- var (
- url = flag.String("url", "http://localhost:9200/bulk-processor-test", "Elasticsearch URL")
- numWorkers = flag.Int("num-workers", 4, "Number of workers")
- n = flag.Int64("n", -1, "Number of documents to process (-1 for unlimited)")
- flushInterval = flag.Duration("flush-interval", 1*time.Second, "Flush interval")
- bulkActions = flag.Int("bulk-actions", 0, "Number of bulk actions before committing")
- bulkSize = flag.Int("bulk-size", 0, "Size of bulk requests before committing")
- )
- flag.Parse()
- log.SetFlags(0)
-
- rand.Seed(time.Now().UnixNano())
-
- // Parse configuration from URL
- cfg, err := config.Parse(*url)
- if err != nil {
- log.Fatal(err)
- }
-
- // Create an Elasticsearch client from the parsed config
- client, err := elastic.NewClientFromConfig(cfg)
- if err != nil {
- log.Fatal(err)
- }
-
- // Drop old index
- exists, err := client.IndexExists(cfg.Index).Do(context.Background())
- if err != nil {
- log.Fatal(err)
- }
- if exists {
- _, err = client.DeleteIndex(cfg.Index).Do(context.Background())
- if err != nil {
- log.Fatal(err)
- }
- }
-
- // Create processor
- bulkp := elastic.NewBulkProcessorService(client).
- Name("bulk-test-processor").
- Stats(true).
- Backoff(elastic.StopBackoff{}).
- FlushInterval(*flushInterval).
- Workers(*numWorkers)
- if *bulkActions > 0 {
- bulkp = bulkp.BulkActions(*bulkActions)
- }
- if *bulkSize > 0 {
- bulkp = bulkp.BulkSize(*bulkSize)
- }
- p, err := bulkp.Do(context.Background())
- if err != nil {
- log.Fatal(err)
- }
-
- var created int64
- errc := make(chan error, 1)
- go func() {
- c := make(chan os.Signal, 1)
- signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
- <-c
- errc <- nil
- }()
-
- go func() {
- defer func() {
- if err := p.Close(); err != nil {
- errc <- err
- }
- }()
-
- type Doc struct {
- Timestamp time.Time `json:"@timestamp"`
- }
-
- for {
- current := atomic.AddInt64(&created, 1)
- if *n > 0 && current >= *n {
- errc <- nil
- return
- }
- r := elastic.NewBulkIndexRequest().
- Index(cfg.Index).
- Type("doc").
- Id(uuid.New().String()).
- Doc(Doc{Timestamp: time.Now()})
- p.Add(r)
-
- time.Sleep(time.Duration(rand.Intn(1000)) * time.Microsecond)
- }
- }()
-
- go func() {
- t := time.NewTicker(1 * time.Second)
- defer t.Stop()
- for range t.C {
- stats := p.Stats()
- written := atomic.LoadInt64(&created)
- var queued int64
- for _, w := range stats.Workers {
- queued += w.Queued
- }
- fmt.Printf("Queued=%5d Written=%8d Succeeded=%8d Failed=%8d Comitted=%6d Flushed=%6d\n",
- queued,
- written,
- stats.Succeeded,
- stats.Failed,
- stats.Committed,
- stats.Flushed,
- )
- }
- }()
-
- if err := <-errc; err != nil {
- log.Fatal(err)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/recipes/connect/connect.go b/vendor/github.com/olivere/elastic/recipes/connect/connect.go
deleted file mode 100644
index baff6c114..000000000
--- a/vendor/github.com/olivere/elastic/recipes/connect/connect.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// Connect simply connects to Elasticsearch.
-//
-// Example
-//
-//
-// connect -url=http://127.0.0.1:9200 -sniff=false
-//
-package main
-
-import (
- "flag"
- "fmt"
- "log"
-
- "github.com/olivere/elastic"
-)
-
-func main() {
- var (
- url = flag.String("url", "http://localhost:9200", "Elasticsearch URL")
- sniff = flag.Bool("sniff", true, "Enable or disable sniffing")
- )
- flag.Parse()
- log.SetFlags(0)
-
- if *url == "" {
- *url = "http://127.0.0.1:9200"
- }
-
- // Create an Elasticsearch client
- client, err := elastic.NewClient(elastic.SetURL(*url), elastic.SetSniff(*sniff))
- if err != nil {
- log.Fatal(err)
- }
- _ = client
-
- // Just a status message
- fmt.Println("Connection succeeded")
-}
diff --git a/vendor/github.com/olivere/elastic/recipes/sliced_scroll/sliced_scroll.go b/vendor/github.com/olivere/elastic/recipes/sliced_scroll/sliced_scroll.go
deleted file mode 100644
index d753a61cb..000000000
--- a/vendor/github.com/olivere/elastic/recipes/sliced_scroll/sliced_scroll.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// SlicedScroll illustrates scrolling through a set of documents
-// in parallel. It uses the sliced scrolling feature introduced
-// in Elasticsearch 5.0 to create a number of Goroutines, each
-// scrolling through a slice of the total results. A second goroutine
-// receives the hits from the set of goroutines scrolling through
-// the slices and simply counts the total number and the number of
-// documents received per slice.
-//
-// The speedup of sliced scrolling can be significant but is very
-// dependent on the specific use case.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html#sliced-scroll
-// for details on sliced scrolling in Elasticsearch.
-//
-// Example
-//
-// Scroll with 4 parallel slices through an index called "products".
-// Use "_uid" as the default field:
-//
-// sliced_scroll -index=products -n=4
-//
-package main
-
-import (
- "context"
- "flag"
- "fmt"
- "io"
- "log"
- "sync"
- "sync/atomic"
- "time"
-
- "golang.org/x/sync/errgroup"
- "github.com/olivere/elastic"
-)
-
-func main() {
- var (
- url = flag.String("url", "http://localhost:9200", "Elasticsearch URL")
- index = flag.String("index", "", "Elasticsearch index name")
- typ = flag.String("type", "", "Elasticsearch type name")
- field = flag.String("field", "", "Slice field (must be numeric)")
- numSlices = flag.Int("n", 2, "Number of slices to use in parallel")
- sniff = flag.Bool("sniff", true, "Enable or disable sniffing")
- )
- flag.Parse()
- log.SetFlags(0)
-
- if *url == "" {
- log.Fatal("missing url parameter")
- }
- if *index == "" {
- log.Fatal("missing index parameter")
- }
- if *numSlices <= 0 {
- log.Fatal("n must be greater than zero")
- }
-
- // Create an Elasticsearch client
- client, err := elastic.NewClient(elastic.SetURL(*url), elastic.SetSniff(*sniff))
- if err != nil {
- log.Fatal(err)
- }
-
- // Setup a group of goroutines from the excellent errgroup package
- g, ctx := errgroup.WithContext(context.TODO())
-
- // Hits channel will be sent to from the first set of goroutines and consumed by the second
- type hit struct {
- Slice int
- Hit elastic.SearchHit
- }
- hitsc := make(chan hit)
-
- begin := time.Now()
-
- // Start a number of goroutines to parallelize scrolling
- var wg sync.WaitGroup
- for i := 0; i < *numSlices; i++ {
- wg.Add(1)
-
- slice := i
-
- // Prepare the query
- var query elastic.Query
- if *typ == "" {
- query = elastic.NewMatchAllQuery()
- } else {
- query = elastic.NewTypeQuery(*typ)
- }
-
- // Prepare the slice
- sliceQuery := elastic.NewSliceQuery().Id(i).Max(*numSlices)
- if *field != "" {
- sliceQuery = sliceQuery.Field(*field)
- }
-
- // Start goroutine for this sliced scroll
- g.Go(func() error {
- defer wg.Done()
- svc := client.Scroll(*index).Query(query).Slice(sliceQuery)
- for {
- res, err := svc.Do(ctx)
- if err == io.EOF {
- break
- }
- if err != nil {
- return err
- }
- for _, searchHit := range res.Hits.Hits {
- // Pass the hit to the hits channel, which will be consumed below
- select {
- case hitsc <- hit{Slice: slice, Hit: *searchHit}:
- case <-ctx.Done():
- return ctx.Err()
- }
- }
- }
- return nil
- })
- }
- go func() {
- // Wait until all scrolling is done
- wg.Wait()
- close(hitsc)
- }()
-
- // Second goroutine will consume the hits sent from the workers in first set of goroutines
- var total uint64
- totals := make([]uint64, *numSlices)
- g.Go(func() error {
- for hit := range hitsc {
- // We simply count the hits here.
- atomic.AddUint64(&totals[hit.Slice], 1)
- current := atomic.AddUint64(&total, 1)
- sec := int(time.Since(begin).Seconds())
- fmt.Printf("%8d | %02d:%02d\r", current, sec/60, sec%60)
- select {
- default:
- case <-ctx.Done():
- return ctx.Err()
- }
- }
- return nil
- })
-
- // Wait until all goroutines are finished
- if err := g.Wait(); err != nil {
- log.Fatal(err)
- }
-
- fmt.Printf("Scrolled through a total of %d documents in %v\n", total, time.Since(begin))
- for i := 0; i < *numSlices; i++ {
- fmt.Printf("Slice %2d received %d documents\n", i, totals[i])
- }
-}
diff --git a/vendor/github.com/olivere/elastic/reindex.go b/vendor/github.com/olivere/elastic/reindex.go
deleted file mode 100644
index 9cdd50a68..000000000
--- a/vendor/github.com/olivere/elastic/reindex.go
+++ /dev/null
@@ -1,695 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-)
-
-// ReindexService is a method to copy documents from one index to another.
-// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-reindex.html.
-type ReindexService struct {
- client *Client
- pretty bool
- refresh string
- timeout string
- waitForActiveShards string
- waitForCompletion *bool
- requestsPerSecond *int
- slices *int
- body interface{}
- source *ReindexSource
- destination *ReindexDestination
- conflicts string
- size *int
- script *Script
-}
-
-// NewReindexService creates a new ReindexService.
-func NewReindexService(client *Client) *ReindexService {
- return &ReindexService{
- client: client,
- }
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active before
-// proceeding with the reindex operation. Defaults to 1, meaning the primary shard only.
-// Set to `all` for all shard copies, otherwise set to any non-negative value less than or
-// equal to the total number of copies for the shard (number of replicas + 1).
-func (s *ReindexService) WaitForActiveShards(waitForActiveShards string) *ReindexService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// RequestsPerSecond specifies the throttle to set on this request in sub-requests per second.
-// -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
-func (s *ReindexService) RequestsPerSecond(requestsPerSecond int) *ReindexService {
- s.requestsPerSecond = &requestsPerSecond
- return s
-}
-
-// Slices specifies the number of slices this task should be divided into. Defaults to 1.
-func (s *ReindexService) Slices(slices int) *ReindexService {
- s.slices = &slices
- return s
-}
-
-// Refresh indicates whether Elasticsearch should refresh the effected indexes
-// immediately.
-func (s *ReindexService) Refresh(refresh string) *ReindexService {
- s.refresh = refresh
- return s
-}
-
-// Timeout is the time each individual bulk request should wait for shards
-// that are unavailable.
-func (s *ReindexService) Timeout(timeout string) *ReindexService {
- s.timeout = timeout
- return s
-}
-
-// WaitForCompletion indicates whether Elasticsearch should block until the
-// reindex is complete.
-func (s *ReindexService) WaitForCompletion(waitForCompletion bool) *ReindexService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *ReindexService) Pretty(pretty bool) *ReindexService {
- s.pretty = pretty
- return s
-}
-
-// Source specifies the source of the reindexing process.
-func (s *ReindexService) Source(source *ReindexSource) *ReindexService {
- s.source = source
- return s
-}
-
-// SourceIndex specifies the source index of the reindexing process.
-func (s *ReindexService) SourceIndex(index string) *ReindexService {
- if s.source == nil {
- s.source = NewReindexSource()
- }
- s.source = s.source.Index(index)
- return s
-}
-
-// Destination specifies the destination of the reindexing process.
-func (s *ReindexService) Destination(destination *ReindexDestination) *ReindexService {
- s.destination = destination
- return s
-}
-
-// DestinationIndex specifies the destination index of the reindexing process.
-func (s *ReindexService) DestinationIndex(index string) *ReindexService {
- if s.destination == nil {
- s.destination = NewReindexDestination()
- }
- s.destination = s.destination.Index(index)
- return s
-}
-
-// DestinationIndexAndType specifies both the destination index and type
-// of the reindexing process.
-func (s *ReindexService) DestinationIndexAndType(index, typ string) *ReindexService {
- if s.destination == nil {
- s.destination = NewReindexDestination()
- }
- s.destination = s.destination.Index(index)
- s.destination = s.destination.Type(typ)
- return s
-}
-
-// Conflicts indicates what to do when the process detects version conflicts.
-// Possible values are "proceed" and "abort".
-func (s *ReindexService) Conflicts(conflicts string) *ReindexService {
- s.conflicts = conflicts
- return s
-}
-
-// AbortOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("abort").
-func (s *ReindexService) AbortOnVersionConflict() *ReindexService {
- s.conflicts = "abort"
- return s
-}
-
-// ProceedOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("proceed").
-func (s *ReindexService) ProceedOnVersionConflict() *ReindexService {
- s.conflicts = "proceed"
- return s
-}
-
-// Size sets an upper limit for the number of processed documents.
-func (s *ReindexService) Size(size int) *ReindexService {
- s.size = &size
- return s
-}
-
-// Script allows for modification of the documents as they are reindexed
-// from source to destination.
-func (s *ReindexService) Script(script *Script) *ReindexService {
- s.script = script
- return s
-}
-
-// Body specifies the body of the request to send to Elasticsearch.
-// It overrides settings specified with other setters, e.g. Query.
-func (s *ReindexService) Body(body interface{}) *ReindexService {
- s.body = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *ReindexService) buildURL() (string, url.Values, error) {
- // Build URL path
- path := "/_reindex"
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.requestsPerSecond != nil {
- params.Set("requests_per_second", fmt.Sprintf("%v", *s.requestsPerSecond))
- }
- if s.slices != nil {
- params.Set("slices", fmt.Sprintf("%v", *s.slices))
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *ReindexService) Validate() error {
- var invalid []string
- if s.body != nil {
- return nil
- }
- if s.source == nil {
- invalid = append(invalid, "Source")
- } else {
- if len(s.source.indices) == 0 {
- invalid = append(invalid, "Source.Index")
- }
- }
- if s.destination == nil {
- invalid = append(invalid, "Destination")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// getBody returns the body part of the document request.
-func (s *ReindexService) getBody() (interface{}, error) {
- if s.body != nil {
- return s.body, nil
- }
-
- body := make(map[string]interface{})
-
- if s.conflicts != "" {
- body["conflicts"] = s.conflicts
- }
- if s.size != nil {
- body["size"] = *s.size
- }
- if s.script != nil {
- out, err := s.script.Source()
- if err != nil {
- return nil, err
- }
- body["script"] = out
- }
-
- src, err := s.source.Source()
- if err != nil {
- return nil, err
- }
- body["source"] = src
-
- dst, err := s.destination.Source()
- if err != nil {
- return nil, err
- }
- body["dest"] = dst
-
- return body, nil
-}
-
-// Do executes the operation.
-func (s *ReindexService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body, err := s.getBody()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(BulkIndexByScrollResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// DoAsync executes the reindexing operation asynchronously by starting a new task.
-// Callers need to use the Task Management API to watch the outcome of the reindexing
-// operation.
-func (s *ReindexService) DoAsync(ctx context.Context) (*StartTaskResult, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // DoAsync only makes sense with WaitForCompletion set to true
- if s.waitForCompletion != nil && *s.waitForCompletion {
- return nil, fmt.Errorf("cannot start a task with WaitForCompletion set to true")
- }
- f := false
- s.waitForCompletion = &f
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body, err := s.getBody()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(StartTaskResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Source of Reindex --
-
-// ReindexSource specifies the source of a Reindex process.
-type ReindexSource struct {
- searchType string // default in ES is "query_then_fetch"
- indices []string
- types []string
- routing *string
- preference *string
- requestCache *bool
- scroll string
- query Query
- sorts []SortInfo
- sorters []Sorter
- searchSource *SearchSource
- remoteInfo *ReindexRemoteInfo
-}
-
-// NewReindexSource creates a new ReindexSource.
-func NewReindexSource() *ReindexSource {
- return &ReindexSource{}
-}
-
-// SearchType is the search operation type. Possible values are
-// "query_then_fetch" and "dfs_query_then_fetch".
-func (r *ReindexSource) SearchType(searchType string) *ReindexSource {
- r.searchType = searchType
- return r
-}
-
-func (r *ReindexSource) SearchTypeDfsQueryThenFetch() *ReindexSource {
- return r.SearchType("dfs_query_then_fetch")
-}
-
-func (r *ReindexSource) SearchTypeQueryThenFetch() *ReindexSource {
- return r.SearchType("query_then_fetch")
-}
-
-func (r *ReindexSource) Index(indices ...string) *ReindexSource {
- r.indices = append(r.indices, indices...)
- return r
-}
-
-func (r *ReindexSource) Type(types ...string) *ReindexSource {
- r.types = append(r.types, types...)
- return r
-}
-
-func (r *ReindexSource) Preference(preference string) *ReindexSource {
- r.preference = &preference
- return r
-}
-
-func (r *ReindexSource) RequestCache(requestCache bool) *ReindexSource {
- r.requestCache = &requestCache
- return r
-}
-
-func (r *ReindexSource) Scroll(scroll string) *ReindexSource {
- r.scroll = scroll
- return r
-}
-
-func (r *ReindexSource) Query(query Query) *ReindexSource {
- r.query = query
- return r
-}
-
-// Sort adds a sort order.
-func (s *ReindexSource) Sort(field string, ascending bool) *ReindexSource {
- s.sorts = append(s.sorts, SortInfo{Field: field, Ascending: ascending})
- return s
-}
-
-// SortWithInfo adds a sort order.
-func (s *ReindexSource) SortWithInfo(info SortInfo) *ReindexSource {
- s.sorts = append(s.sorts, info)
- return s
-}
-
-// SortBy adds a sort order.
-func (s *ReindexSource) SortBy(sorter ...Sorter) *ReindexSource {
- s.sorters = append(s.sorters, sorter...)
- return s
-}
-
-// RemoteInfo sets up reindexing from a remote cluster.
-func (s *ReindexSource) RemoteInfo(ri *ReindexRemoteInfo) *ReindexSource {
- s.remoteInfo = ri
- return s
-}
-
-// Source returns a serializable JSON request for the request.
-func (r *ReindexSource) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- if r.query != nil {
- src, err := r.query.Source()
- if err != nil {
- return nil, err
- }
- source["query"] = src
- } else if r.searchSource != nil {
- src, err := r.searchSource.Source()
- if err != nil {
- return nil, err
- }
- source["source"] = src
- }
-
- if r.searchType != "" {
- source["search_type"] = r.searchType
- }
-
- switch len(r.indices) {
- case 0:
- case 1:
- source["index"] = r.indices[0]
- default:
- source["index"] = r.indices
- }
-
- switch len(r.types) {
- case 0:
- case 1:
- source["type"] = r.types[0]
- default:
- source["type"] = r.types
- }
-
- if r.preference != nil && *r.preference != "" {
- source["preference"] = *r.preference
- }
-
- if r.requestCache != nil {
- source["request_cache"] = fmt.Sprintf("%v", *r.requestCache)
- }
-
- if r.scroll != "" {
- source["scroll"] = r.scroll
- }
-
- if r.remoteInfo != nil {
- src, err := r.remoteInfo.Source()
- if err != nil {
- return nil, err
- }
- source["remote"] = src
- }
-
- if len(r.sorters) > 0 {
- var sortarr []interface{}
- for _, sorter := range r.sorters {
- src, err := sorter.Source()
- if err != nil {
- return nil, err
- }
- sortarr = append(sortarr, src)
- }
- source["sort"] = sortarr
- } else if len(r.sorts) > 0 {
- var sortarr []interface{}
- for _, sort := range r.sorts {
- src, err := sort.Source()
- if err != nil {
- return nil, err
- }
- sortarr = append(sortarr, src)
- }
- source["sort"] = sortarr
- }
-
- return source, nil
-}
-
-// ReindexRemoteInfo contains information for reindexing from a remote cluster.
-type ReindexRemoteInfo struct {
- host string
- username string
- password string
- socketTimeout string // e.g. "1m" or "30s"
- connectTimeout string // e.g. "1m" or "30s"
-}
-
-// NewReindexRemoteInfo creates a new ReindexRemoteInfo.
-func NewReindexRemoteInfo() *ReindexRemoteInfo {
- return &ReindexRemoteInfo{}
-}
-
-// Host sets the host information of the remote cluster.
-// It must be of the form "http(s)://<hostname>:<port>"
-func (ri *ReindexRemoteInfo) Host(host string) *ReindexRemoteInfo {
- ri.host = host
- return ri
-}
-
-// Username sets the username to authenticate with the remote cluster.
-func (ri *ReindexRemoteInfo) Username(username string) *ReindexRemoteInfo {
- ri.username = username
- return ri
-}
-
-// Password sets the password to authenticate with the remote cluster.
-func (ri *ReindexRemoteInfo) Password(password string) *ReindexRemoteInfo {
- ri.password = password
- return ri
-}
-
-// SocketTimeout sets the socket timeout to connect with the remote cluster.
-// Use ES compatible values like e.g. "30s" or "1m".
-func (ri *ReindexRemoteInfo) SocketTimeout(timeout string) *ReindexRemoteInfo {
- ri.socketTimeout = timeout
- return ri
-}
-
-// ConnectTimeout sets the connection timeout to connect with the remote cluster.
-// Use ES compatible values like e.g. "30s" or "1m".
-func (ri *ReindexRemoteInfo) ConnectTimeout(timeout string) *ReindexRemoteInfo {
- ri.connectTimeout = timeout
- return ri
-}
-
-// Source returns the serializable JSON data for the request.
-func (ri *ReindexRemoteInfo) Source() (interface{}, error) {
- res := make(map[string]interface{})
- res["host"] = ri.host
- if len(ri.username) > 0 {
- res["username"] = ri.username
- }
- if len(ri.password) > 0 {
- res["password"] = ri.password
- }
- if len(ri.socketTimeout) > 0 {
- res["socket_timeout"] = ri.socketTimeout
- }
- if len(ri.connectTimeout) > 0 {
- res["connect_timeout"] = ri.connectTimeout
- }
- return res, nil
-}
-
-// -source Destination of Reindex --
-
-// ReindexDestination is the destination of a Reindex API call.
-// It is basically the meta data of a BulkIndexRequest.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-reindex.html
-// fsourcer details.
-type ReindexDestination struct {
- index string
- typ string
- routing string
- parent string
- opType string
- version int64 // default is MATCH_ANY
- versionType string // default is "internal"
-}
-
-// NewReindexDestination returns a new ReindexDestination.
-func NewReindexDestination() *ReindexDestination {
- return &ReindexDestination{}
-}
-
-// Index specifies name of the Elasticsearch index to use as the destination
-// of a reindexing process.
-func (r *ReindexDestination) Index(index string) *ReindexDestination {
- r.index = index
- return r
-}
-
-// Type specifies the Elasticsearch type to use for reindexing.
-func (r *ReindexDestination) Type(typ string) *ReindexDestination {
- r.typ = typ
- return r
-}
-
-// Routing specifies a routing value for the reindexing request.
-// It can be "keep", "discard", or start with "=". The latter specifies
-// the routing on the bulk request.
-func (r *ReindexDestination) Routing(routing string) *ReindexDestination {
- r.routing = routing
- return r
-}
-
-// Keep sets the routing on the bulk request sent for each match to the routing
-// of the match (the default).
-func (r *ReindexDestination) Keep() *ReindexDestination {
- r.routing = "keep"
- return r
-}
-
-// Discard sets the routing on the bulk request sent for each match to null.
-func (r *ReindexDestination) Discard() *ReindexDestination {
- r.routing = "discard"
- return r
-}
-
-// Parent specifies the identifier of the parent document (if available).
-func (r *ReindexDestination) Parent(parent string) *ReindexDestination {
- r.parent = parent
- return r
-}
-
-// OpType specifies if this request should follow create-only or upsert
-// behavior. This follows the OpType of the standard document index API.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-index_.html#operation-type
-// for details.
-func (r *ReindexDestination) OpType(opType string) *ReindexDestination {
- r.opType = opType
- return r
-}
-
-// Version indicates the version of the document as part of an optimistic
-// concurrency model.
-func (r *ReindexDestination) Version(version int64) *ReindexDestination {
- r.version = version
- return r
-}
-
-// VersionType specifies how versions are created.
-func (r *ReindexDestination) VersionType(versionType string) *ReindexDestination {
- r.versionType = versionType
- return r
-}
-
-// Source returns a serializable JSON request for the request.
-func (r *ReindexDestination) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if r.index != "" {
- source["index"] = r.index
- }
- if r.typ != "" {
- source["type"] = r.typ
- }
- if r.routing != "" {
- source["routing"] = r.routing
- }
- if r.opType != "" {
- source["op_type"] = r.opType
- }
- if r.parent != "" {
- source["parent"] = r.parent
- }
- if r.version > 0 {
- source["version"] = r.version
- }
- if r.versionType != "" {
- source["version_type"] = r.versionType
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/reindex_test.go b/vendor/github.com/olivere/elastic/reindex_test.go
deleted file mode 100644
index fadf4bfc7..000000000
--- a/vendor/github.com/olivere/elastic/reindex_test.go
+++ /dev/null
@@ -1,401 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestReindexSourceWithBodyMap(t *testing.T) {
- client := setupTestClient(t)
- out, err := client.Reindex().Body(map[string]interface{}{
- "source": map[string]interface{}{
- "index": "twitter",
- },
- "dest": map[string]interface{}{
- "index": "new_twitter",
- },
- }).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithBodyString(t *testing.T) {
- client := setupTestClient(t)
- got, err := client.Reindex().Body(`{"source":{"index":"twitter"},"dest":{"index":"new_twitter"}}`).getBody()
- if err != nil {
- t.Fatal(err)
- }
- want := `{"source":{"index":"twitter"},"dest":{"index":"new_twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithSourceIndexAndDestinationIndex(t *testing.T) {
- client := setupTestClient(t)
- out, err := client.Reindex().SourceIndex("twitter").DestinationIndex("new_twitter").getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithSourceAndDestinationAndVersionType(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter")
- dst := NewReindexDestination().Index("new_twitter").VersionType("external")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter","version_type":"external"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithSourceAndRemoteAndDestination(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter").RemoteInfo(
- NewReindexRemoteInfo().Host("http://otherhost:9200").
- Username("alice").
- Password("secret").
- ConnectTimeout("10s").
- SocketTimeout("1m"),
- )
- dst := NewReindexDestination().Index("new_twitter")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter","remote":{"connect_timeout":"10s","host":"http://otherhost:9200","password":"secret","socket_timeout":"1m","username":"alice"}}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithSourceAndDestinationAndOpType(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter")
- dst := NewReindexDestination().Index("new_twitter").OpType("create")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter","op_type":"create"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithConflictsProceed(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter")
- dst := NewReindexDestination().Index("new_twitter").OpType("create")
- out, err := client.Reindex().Conflicts("proceed").Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"conflicts":"proceed","dest":{"index":"new_twitter","op_type":"create"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithProceedOnVersionConflict(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter")
- dst := NewReindexDestination().Index("new_twitter").OpType("create")
- out, err := client.Reindex().ProceedOnVersionConflict().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"conflicts":"proceed","dest":{"index":"new_twitter","op_type":"create"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithQuery(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter").Type("doc").Query(NewTermQuery("user", "olivere"))
- dst := NewReindexDestination().Index("new_twitter")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter","query":{"term":{"user":"olivere"}},"type":"doc"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithMultipleSourceIndicesAndTypes(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter", "blog").Type("doc", "post")
- dst := NewReindexDestination().Index("all_together")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"all_together"},"source":{"index":["twitter","blog"],"type":["doc","post"]}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithSourceAndSize(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter").Sort("date", false)
- dst := NewReindexDestination().Index("new_twitter")
- out, err := client.Reindex().Size(10000).Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter"},"size":10000,"source":{"index":"twitter","sort":[{"date":{"order":"desc"}}]}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithScript(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("twitter")
- dst := NewReindexDestination().Index("new_twitter").VersionType("external")
- scr := NewScriptInline("if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}")
- out, err := client.Reindex().Source(src).Destination(dst).Script(scr).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"new_twitter","version_type":"external"},"script":{"source":"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}"},"source":{"index":"twitter"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindexSourceWithRouting(t *testing.T) {
- client := setupTestClient(t)
- src := NewReindexSource().Index("source").Query(NewMatchQuery("company", "cat"))
- dst := NewReindexDestination().Index("dest").Routing("=cat")
- out, err := client.Reindex().Source(src).Destination(dst).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"dest":{"index":"dest","routing":"=cat"},"source":{"index":"source","query":{"match":{"company":{"query":"cat"}}}}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestReindex(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Reindex API yet", esversion)
- }
-
- sourceCount, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if sourceCount <= 0 {
- t.Fatalf("expected more than %d documents; got: %d", 0, sourceCount)
- }
-
- targetCount, err := client.Count(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if targetCount != 0 {
- t.Fatalf("expected %d documents; got: %d", 0, targetCount)
- }
-
- // Simple copying
- src := NewReindexSource().Index(testIndexName)
- dst := NewReindexDestination().Index(testIndexName2)
- res, err := client.Reindex().Source(src).Destination(dst).Refresh("true").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected result != nil")
- }
- if res.Total != sourceCount {
- t.Errorf("expected %d, got %d", sourceCount, res.Total)
- }
- if res.Updated != 0 {
- t.Errorf("expected %d, got %d", 0, res.Updated)
- }
- if res.Created != sourceCount {
- t.Errorf("expected %d, got %d", sourceCount, res.Created)
- }
-
- targetCount, err = client.Count(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if targetCount != sourceCount {
- t.Fatalf("expected %d documents; got: %d", sourceCount, targetCount)
- }
-}
-
-func TestReindexAsync(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Reindex API yet", esversion)
- }
-
- sourceCount, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if sourceCount <= 0 {
- t.Fatalf("expected more than %d documents; got: %d", 0, sourceCount)
- }
-
- targetCount, err := client.Count(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if targetCount != 0 {
- t.Fatalf("expected %d documents; got: %d", 0, targetCount)
- }
-
- // Simple copying
- src := NewReindexSource().Index(testIndexName)
- dst := NewReindexDestination().Index(testIndexName2)
- res, err := client.Reindex().Source(src).Destination(dst).DoAsync(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected result != nil")
- }
- if res.TaskId == "" {
- t.Errorf("expected a task id, got %+v", res)
- }
-
- tasksGetTask := client.TasksGetTask()
- taskStatus, err := tasksGetTask.TaskId(res.TaskId).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if taskStatus == nil {
- t.Fatal("expected task status result != nil")
- }
-}
-
-func TestReindexWithWaitForCompletionTrueCannotBeStarted(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Reindex API yet", esversion)
- }
-
- sourceCount, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if sourceCount <= 0 {
- t.Fatalf("expected more than %d documents; got: %d", 0, sourceCount)
- }
-
- targetCount, err := client.Count(testIndexName2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if targetCount != 0 {
- t.Fatalf("expected %d documents; got: %d", 0, targetCount)
- }
-
- // DoAsync should fail when WaitForCompletion is true
- src := NewReindexSource().Index(testIndexName)
- dst := NewReindexDestination().Index(testIndexName2)
- _, err = client.Reindex().Source(src).Destination(dst).WaitForCompletion(true).DoAsync(context.TODO())
- if err == nil {
- t.Fatal("error should have been returned")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/request.go b/vendor/github.com/olivere/elastic/request.go
deleted file mode 100644
index 87d191965..000000000
--- a/vendor/github.com/olivere/elastic/request.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "encoding/json"
- "io"
- "io/ioutil"
- "net/http"
- "runtime"
- "strings"
-)
-
-// Elasticsearch-specific HTTP request
-type Request http.Request
-
-// NewRequest is a http.Request and adds features such as encoding the body.
-func NewRequest(method, url string) (*Request, error) {
- req, err := http.NewRequest(method, url, nil)
- if err != nil {
- return nil, err
- }
- req.Header.Add("User-Agent", "elastic/"+Version+" ("+runtime.GOOS+"-"+runtime.GOARCH+")")
- req.Header.Add("Accept", "application/json")
- req.Header.Set("Content-Type", "application/json")
- return (*Request)(req), nil
-}
-
-// SetBasicAuth wraps http.Request's SetBasicAuth.
-func (r *Request) SetBasicAuth(username, password string) {
- ((*http.Request)(r)).SetBasicAuth(username, password)
-}
-
-// SetBody encodes the body in the request.
-func (r *Request) SetBody(body interface{}) error {
- switch b := body.(type) {
- case string:
- return r.setBodyString(b)
- default:
- return r.setBodyJson(body)
- }
-}
-
-// setBodyJson encodes the body as a struct to be marshaled via json.Marshal.
-func (r *Request) setBodyJson(data interface{}) error {
- body, err := json.Marshal(data)
- if err != nil {
- return err
- }
- r.Header.Set("Content-Type", "application/json")
- r.setBodyReader(bytes.NewReader(body))
- return nil
-}
-
-// setBodyString encodes the body as a string.
-func (r *Request) setBodyString(body string) error {
- return r.setBodyReader(strings.NewReader(body))
-}
-
-// setBodyReader writes the body from an io.Reader.
-func (r *Request) setBodyReader(body io.Reader) error {
- rc, ok := body.(io.ReadCloser)
- if !ok && body != nil {
- rc = ioutil.NopCloser(body)
- }
- r.Body = rc
- if body != nil {
- switch v := body.(type) {
- case *strings.Reader:
- r.ContentLength = int64(v.Len())
- case *bytes.Buffer:
- r.ContentLength = int64(v.Len())
- }
- }
- return nil
-}
diff --git a/vendor/github.com/olivere/elastic/request_test.go b/vendor/github.com/olivere/elastic/request_test.go
deleted file mode 100644
index 04fbecbab..000000000
--- a/vendor/github.com/olivere/elastic/request_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-var testReq *Request // used as a temporary variable to avoid compiler optimizations in tests/benchmarks
-
-func TestRequestSetContentType(t *testing.T) {
- req, err := NewRequest("GET", "/")
- if err != nil {
- t.Fatal(err)
- }
- if want, have := "application/json", req.Header.Get("Content-Type"); want != have {
- t.Fatalf("want %q, have %q", want, have)
- }
- req.Header.Set("Content-Type", "application/x-ndjson")
- if want, have := "application/x-ndjson", req.Header.Get("Content-Type"); want != have {
- t.Fatalf("want %q, have %q", want, have)
- }
-}
-
-func BenchmarkRequestSetBodyString(b *testing.B) {
- req, err := NewRequest("GET", "/")
- if err != nil {
- b.Fatal(err)
- }
- for i := 0; i < b.N; i++ {
- body := `{"query":{"match_all":{}}}`
- err = req.SetBody(body)
- if err != nil {
- b.Fatal(err)
- }
- }
- testReq = req
-}
-
-func BenchmarkRequestSetBodyBytes(b *testing.B) {
- req, err := NewRequest("GET", "/")
- if err != nil {
- b.Fatal(err)
- }
- for i := 0; i < b.N; i++ {
- body := []byte(`{"query":{"match_all":{}}}`)
- err = req.SetBody(body)
- if err != nil {
- b.Fatal(err)
- }
- }
- testReq = req
-}
-
-func BenchmarkRequestSetBodyMap(b *testing.B) {
- req, err := NewRequest("GET", "/")
- if err != nil {
- b.Fatal(err)
- }
- for i := 0; i < b.N; i++ {
- body := map[string]interface{}{
- "query": map[string]interface{}{
- "match_all": map[string]interface{}{},
- },
- }
- err = req.SetBody(body)
- if err != nil {
- b.Fatal(err)
- }
- }
- testReq = req
-}
diff --git a/vendor/github.com/olivere/elastic/rescore.go b/vendor/github.com/olivere/elastic/rescore.go
deleted file mode 100644
index 9b7eaee1d..000000000
--- a/vendor/github.com/olivere/elastic/rescore.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-type Rescore struct {
- rescorer Rescorer
- windowSize *int
- defaultRescoreWindowSize *int
-}
-
-func NewRescore() *Rescore {
- return &Rescore{}
-}
-
-func (r *Rescore) WindowSize(windowSize int) *Rescore {
- r.windowSize = &windowSize
- return r
-}
-
-func (r *Rescore) IsEmpty() bool {
- return r.rescorer == nil
-}
-
-func (r *Rescore) Rescorer(rescorer Rescorer) *Rescore {
- r.rescorer = rescorer
- return r
-}
-
-func (r *Rescore) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if r.windowSize != nil {
- source["window_size"] = *r.windowSize
- } else if r.defaultRescoreWindowSize != nil {
- source["window_size"] = *r.defaultRescoreWindowSize
- }
- rescorerSrc, err := r.rescorer.Source()
- if err != nil {
- return nil, err
- }
- source[r.rescorer.Name()] = rescorerSrc
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/rescorer.go b/vendor/github.com/olivere/elastic/rescorer.go
deleted file mode 100644
index ccd4bb854..000000000
--- a/vendor/github.com/olivere/elastic/rescorer.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-type Rescorer interface {
- Name() string
- Source() (interface{}, error)
-}
-
-// -- Query Rescorer --
-
-type QueryRescorer struct {
- query Query
- rescoreQueryWeight *float64
- queryWeight *float64
- scoreMode string
-}
-
-func NewQueryRescorer(query Query) *QueryRescorer {
- return &QueryRescorer{
- query: query,
- }
-}
-
-func (r *QueryRescorer) Name() string {
- return "query"
-}
-
-func (r *QueryRescorer) RescoreQueryWeight(rescoreQueryWeight float64) *QueryRescorer {
- r.rescoreQueryWeight = &rescoreQueryWeight
- return r
-}
-
-func (r *QueryRescorer) QueryWeight(queryWeight float64) *QueryRescorer {
- r.queryWeight = &queryWeight
- return r
-}
-
-func (r *QueryRescorer) ScoreMode(scoreMode string) *QueryRescorer {
- r.scoreMode = scoreMode
- return r
-}
-
-func (r *QueryRescorer) Source() (interface{}, error) {
- rescoreQuery, err := r.query.Source()
- if err != nil {
- return nil, err
- }
-
- source := make(map[string]interface{})
- source["rescore_query"] = rescoreQuery
- if r.queryWeight != nil {
- source["query_weight"] = *r.queryWeight
- }
- if r.rescoreQueryWeight != nil {
- source["rescore_query_weight"] = *r.rescoreQueryWeight
- }
- if r.scoreMode != "" {
- source["score_mode"] = r.scoreMode
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/response.go b/vendor/github.com/olivere/elastic/response.go
deleted file mode 100644
index 4fcdc32d6..000000000
--- a/vendor/github.com/olivere/elastic/response.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-// Response represents a response from Elasticsearch.
-type Response struct {
- // StatusCode is the HTTP status code, e.g. 200.
- StatusCode int
- // Header is the HTTP header from the HTTP response.
- // Keys in the map are canonicalized (see http.CanonicalHeaderKey).
- Header http.Header
- // Body is the deserialized response body.
- Body json.RawMessage
-}
-
-// newResponse creates a new response from the HTTP response.
-func (c *Client) newResponse(res *http.Response) (*Response, error) {
- r := &Response{
- StatusCode: res.StatusCode,
- Header: res.Header,
- }
- if res.Body != nil {
- slurp, err := ioutil.ReadAll(res.Body)
- if err != nil {
- return nil, err
- }
- // HEAD requests return a body but no content
- if len(slurp) > 0 {
- r.Body = json.RawMessage(slurp)
- }
- }
- return r, nil
-}
diff --git a/vendor/github.com/olivere/elastic/response_test.go b/vendor/github.com/olivere/elastic/response_test.go
deleted file mode 100644
index e62773403..000000000
--- a/vendor/github.com/olivere/elastic/response_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "testing"
-)
-
-func BenchmarkResponse(b *testing.B) {
- c := &Client{
- decoder: &DefaultDecoder{},
- }
-
- var resp *Response
- for n := 0; n < b.N; n++ {
- iteration := fmt.Sprint(n)
- body := fmt.Sprintf(`{"n":%d}`, n)
- res := &http.Response{
- Header: http.Header{
- "X-Iteration": []string{iteration},
- },
- Body: ioutil.NopCloser(bytes.NewBufferString(body)),
- StatusCode: http.StatusOK,
- }
- var err error
- resp, err = c.newResponse(res)
- if err != nil {
- b.Fatal(err)
- }
- /*
- if want, have := body, string(resp.Body); want != have {
- b.Fatalf("want %q, have %q", want, have)
- }
- //*/
- /*
- if want, have := iteration, resp.Header.Get("X-Iteration"); want != have {
- b.Fatalf("want %q, have %q", want, have)
- }
- //*/
- }
- _ = resp
-}
diff --git a/vendor/github.com/olivere/elastic/retrier.go b/vendor/github.com/olivere/elastic/retrier.go
deleted file mode 100644
index 46d3adfcb..000000000
--- a/vendor/github.com/olivere/elastic/retrier.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "net/http"
- "time"
-)
-
-// RetrierFunc specifies the signature of a Retry function.
-type RetrierFunc func(context.Context, int, *http.Request, *http.Response, error) (time.Duration, bool, error)
-
-// Retrier decides whether to retry a failed HTTP request with Elasticsearch.
-type Retrier interface {
- // Retry is called when a request has failed. It decides whether to retry
- // the call, how long to wait for the next call, or whether to return an
- // error (which will be returned to the service that started the HTTP
- // request in the first place).
- //
- // Callers may also use this to inspect the HTTP request/response and
- // the error that happened. Additional data can be passed through via
- // the context.
- Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error)
-}
-
-// -- StopRetrier --
-
-// StopRetrier is an implementation that does no retries.
-type StopRetrier struct {
-}
-
-// NewStopRetrier returns a retrier that does no retries.
-func NewStopRetrier() *StopRetrier {
- return &StopRetrier{}
-}
-
-// Retry does not retry.
-func (r *StopRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error) {
- return 0, false, nil
-}
-
-// -- BackoffRetrier --
-
-// BackoffRetrier is an implementation that does nothing but return nil on Retry.
-type BackoffRetrier struct {
- backoff Backoff
-}
-
-// NewBackoffRetrier returns a retrier that uses the given backoff strategy.
-func NewBackoffRetrier(backoff Backoff) *BackoffRetrier {
- return &BackoffRetrier{backoff: backoff}
-}
-
-// Retry calls into the backoff strategy and its wait interval.
-func (r *BackoffRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error) {
- wait, goahead := r.backoff.Next(retry)
- return wait, goahead, nil
-}
diff --git a/vendor/github.com/olivere/elastic/retrier_test.go b/vendor/github.com/olivere/elastic/retrier_test.go
deleted file mode 100644
index c1c5ff524..000000000
--- a/vendor/github.com/olivere/elastic/retrier_test.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "errors"
- "net/http"
- "sync/atomic"
- "testing"
- "time"
-)
-
-type testRetrier struct {
- Retrier
- N int64
- Err error
-}
-
-func (r *testRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error) {
- atomic.AddInt64(&r.N, 1)
- if r.Err != nil {
- return 0, false, r.Err
- }
- return r.Retrier.Retry(ctx, retry, req, resp, err)
-}
-
-func TestStopRetrier(t *testing.T) {
- r := NewStopRetrier()
- wait, ok, err := r.Retry(context.TODO(), 1, nil, nil, nil)
- if want, got := 0*time.Second, wait; want != got {
- t.Fatalf("expected %v, got %v", want, got)
- }
- if want, got := false, ok; want != got {
- t.Fatalf("expected %v, got %v", want, got)
- }
- if err != nil {
- t.Fatalf("expected nil, got %v", err)
- }
-}
-
-func TestRetrier(t *testing.T) {
- var numFailedReqs int
- fail := func(r *http.Request) (*http.Response, error) {
- numFailedReqs += 1
- //return &http.Response{Request: r, StatusCode: 400}, nil
- return nil, errors.New("request failed")
- }
-
- tr := &failingTransport{path: "/fail", fail: fail}
- httpClient := &http.Client{Transport: tr}
-
- retrier := &testRetrier{
- Retrier: NewBackoffRetrier(NewSimpleBackoff(100, 100, 100, 100, 100)),
- }
-
- client, err := NewClient(
- SetHttpClient(httpClient),
- SetMaxRetries(5),
- SetHealthcheck(false),
- SetRetrier(retrier))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/fail",
- })
- if err == nil {
- t.Fatal("expected error")
- }
- if res != nil {
- t.Fatal("expected no response")
- }
- // Connection should be marked as dead after it failed
- if numFailedReqs != 5 {
- t.Errorf("expected %d failed requests; got: %d", 5, numFailedReqs)
- }
- if retrier.N != 5 {
- t.Errorf("expected %d Retrier calls; got: %d", 5, retrier.N)
- }
-}
-
-func TestRetrierWithError(t *testing.T) {
- var numFailedReqs int
- fail := func(r *http.Request) (*http.Response, error) {
- numFailedReqs += 1
- //return &http.Response{Request: r, StatusCode: 400}, nil
- return nil, errors.New("request failed")
- }
-
- tr := &failingTransport{path: "/fail", fail: fail}
- httpClient := &http.Client{Transport: tr}
-
- kaboom := errors.New("kaboom")
- retrier := &testRetrier{
- Err: kaboom,
- Retrier: NewBackoffRetrier(NewSimpleBackoff(100, 100, 100, 100, 100)),
- }
-
- client, err := NewClient(
- SetHttpClient(httpClient),
- SetMaxRetries(5),
- SetHealthcheck(false),
- SetRetrier(retrier))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/fail",
- })
- if err != kaboom {
- t.Fatalf("expected %v, got %v", kaboom, err)
- }
- if res != nil {
- t.Fatal("expected no response")
- }
- if numFailedReqs != 1 {
- t.Errorf("expected %d failed requests; got: %d", 1, numFailedReqs)
- }
- if retrier.N != 1 {
- t.Errorf("expected %d Retrier calls; got: %d", 1, retrier.N)
- }
-}
-
-func TestRetrierOnPerformRequest(t *testing.T) {
- var numFailedReqs int
- fail := func(r *http.Request) (*http.Response, error) {
- numFailedReqs += 1
- //return &http.Response{Request: r, StatusCode: 400}, nil
- return nil, errors.New("request failed")
- }
-
- tr := &failingTransport{path: "/fail", fail: fail}
- httpClient := &http.Client{Transport: tr}
-
- defaultRetrier := &testRetrier{
- Retrier: NewStopRetrier(),
- }
- requestRetrier := &testRetrier{
- Retrier: NewStopRetrier(),
- }
-
- client, err := NewClient(
- SetHttpClient(httpClient),
- SetHealthcheck(false),
- SetRetrier(defaultRetrier))
- if err != nil {
- t.Fatal(err)
- }
-
- res, err := client.PerformRequest(context.TODO(), PerformRequestOptions{
- Method: "GET",
- Path: "/fail",
- Retrier: requestRetrier,
- })
- if err == nil {
- t.Fatal("expected error")
- }
- if res != nil {
- t.Fatal("expected no response")
- }
- if want, have := int64(0), defaultRetrier.N; want != have {
- t.Errorf("defaultRetrier: expected %d calls; got: %d", want, have)
- }
- if want, have := int64(1), requestRetrier.N; want != have {
- t.Errorf("requestRetrier: expected %d calls; got: %d", want, have)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/retry.go b/vendor/github.com/olivere/elastic/retry.go
deleted file mode 100644
index 3571a3b7a..000000000
--- a/vendor/github.com/olivere/elastic/retry.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// This file is based on code (c) 2014 Cenk Altı and governed by the MIT license.
-// See https://github.com/cenkalti/backoff for original source.
-
-package elastic
-
-import "time"
-
-// An Operation is executing by Retry() or RetryNotify().
-// The operation will be retried using a backoff policy if it returns an error.
-type Operation func() error
-
-// Notify is a notify-on-error function. It receives error returned
-// from an operation.
-//
-// Notice that if the backoff policy stated to stop retrying,
-// the notify function isn't called.
-type Notify func(error)
-
-// Retry the function f until it does not return error or BackOff stops.
-// f is guaranteed to be run at least once.
-// It is the caller's responsibility to reset b after Retry returns.
-//
-// Retry sleeps the goroutine for the duration returned by BackOff after a
-// failed operation returns.
-func Retry(o Operation, b Backoff) error { return RetryNotify(o, b, nil) }
-
-// RetryNotify calls notify function with the error and wait duration
-// for each failed attempt before sleep.
-func RetryNotify(operation Operation, b Backoff, notify Notify) error {
- var err error
- var wait time.Duration
- var retry bool
- var n int
-
- for {
- if err = operation(); err == nil {
- return nil
- }
-
- n++
- wait, retry = b.Next(n)
- if !retry {
- return err
- }
-
- if notify != nil {
- notify(err)
- }
-
- time.Sleep(wait)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/retry_test.go b/vendor/github.com/olivere/elastic/retry_test.go
deleted file mode 100644
index 804313095..000000000
--- a/vendor/github.com/olivere/elastic/retry_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-// This file is based on code that is (c) 2014 Cenk Altı and governed
-// by the MIT license.
-// See https://github.com/cenkalti/backoff for original source.
-
-package elastic
-
-import (
- "errors"
- "testing"
- "time"
-)
-
-func TestRetry(t *testing.T) {
- const successOn = 3
- var i = 0
-
- // This function is successfull on "successOn" calls.
- f := func() error {
- i++
- // t.Logf("function is called %d. time\n", i)
-
- if i == successOn {
- // t.Log("OK")
- return nil
- }
-
- // t.Log("error")
- return errors.New("error")
- }
-
- min := time.Duration(8) * time.Millisecond
- max := time.Duration(256) * time.Millisecond
- err := Retry(f, NewExponentialBackoff(min, max))
- if err != nil {
- t.Errorf("unexpected error: %s", err.Error())
- }
- if i != successOn {
- t.Errorf("invalid number of retries: %d", i)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/run-es.sh b/vendor/github.com/olivere/elastic/run-es.sh
deleted file mode 100755
index 624a864ed..000000000
--- a/vendor/github.com/olivere/elastic/run-es.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-VERSION=${VERSION:=6.2.1}
-docker run --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch-oss:$VERSION elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
diff --git a/vendor/github.com/olivere/elastic/script.go b/vendor/github.com/olivere/elastic/script.go
deleted file mode 100644
index 273473950..000000000
--- a/vendor/github.com/olivere/elastic/script.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// Script holds all the paramaters necessary to compile or find in cache
-// and then execute a script.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-scripting.html
-// for details of scripting.
-type Script struct {
- script string
- typ string
- lang string
- params map[string]interface{}
-}
-
-// NewScript creates and initializes a new Script.
-func NewScript(script string) *Script {
- return &Script{
- script: script,
- typ: "inline",
- params: make(map[string]interface{}),
- }
-}
-
-// NewScriptInline creates and initializes a new inline script, i.e. code.
-func NewScriptInline(script string) *Script {
- return NewScript(script).Type("inline")
-}
-
-// NewScriptStored creates and initializes a new stored script.
-func NewScriptStored(script string) *Script {
- return NewScript(script).Type("id")
-}
-
-// Script is either the cache key of the script to be compiled/executed
-// or the actual script source code for inline scripts. For indexed
-// scripts this is the id used in the request. For file scripts this is
-// the file name.
-func (s *Script) Script(script string) *Script {
- s.script = script
- return s
-}
-
-// Type sets the type of script: "inline" or "id".
-func (s *Script) Type(typ string) *Script {
- s.typ = typ
- return s
-}
-
-// Lang sets the language of the script. Permitted values are "groovy",
-// "expression", "mustache", "mvel" (default), "javascript", "python".
-// To use certain languages, you need to configure your server and/or
-// add plugins. See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-scripting.html
-// for details.
-func (s *Script) Lang(lang string) *Script {
- s.lang = lang
- return s
-}
-
-// Param adds a key/value pair to the parameters that this script will be executed with.
-func (s *Script) Param(name string, value interface{}) *Script {
- if s.params == nil {
- s.params = make(map[string]interface{})
- }
- s.params[name] = value
- return s
-}
-
-// Params sets the map of parameters this script will be executed with.
-func (s *Script) Params(params map[string]interface{}) *Script {
- s.params = params
- return s
-}
-
-// Source returns the JSON serializable data for this Script.
-func (s *Script) Source() (interface{}, error) {
- if s.typ == "" && s.lang == "" && len(s.params) == 0 {
- return s.script, nil
- }
- source := make(map[string]interface{})
- // Beginning with 6.0, the type can only be "source" or "id"
- if s.typ == "" || s.typ == "inline" {
- source["source"] = s.script
- } else {
- source["id"] = s.script
- }
- if s.lang != "" {
- source["lang"] = s.lang
- }
- if len(s.params) > 0 {
- source["params"] = s.params
- }
- return source, nil
-}
-
-// -- Script Field --
-
-// ScriptField is a single script field.
-type ScriptField struct {
- FieldName string // name of the field
-
- script *Script
-}
-
-// NewScriptField creates and initializes a new ScriptField.
-func NewScriptField(fieldName string, script *Script) *ScriptField {
- return &ScriptField{FieldName: fieldName, script: script}
-}
-
-// Source returns the serializable JSON for the ScriptField.
-func (f *ScriptField) Source() (interface{}, error) {
- if f.script == nil {
- return nil, errors.New("ScriptField expects script")
- }
- source := make(map[string]interface{})
- src, err := f.script.Source()
- if err != nil {
- return nil, err
- }
- source["script"] = src
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/script_test.go b/vendor/github.com/olivere/elastic/script_test.go
deleted file mode 100644
index aa475d7eb..000000000
--- a/vendor/github.com/olivere/elastic/script_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestScriptingDefault(t *testing.T) {
- builder := NewScript("doc['field'].value * 2")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"source":"doc['field'].value * 2"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScriptingInline(t *testing.T) {
- builder := NewScriptInline("doc['field'].value * factor").Param("factor", 2.0)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"params":{"factor":2},"source":"doc['field'].value * factor"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScriptingStored(t *testing.T) {
- builder := NewScriptStored("script-with-id").Param("factor", 2.0)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"id":"script-with-id","params":{"factor":2}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/scroll.go b/vendor/github.com/olivere/elastic/scroll.go
deleted file mode 100644
index ac51a8c00..000000000
--- a/vendor/github.com/olivere/elastic/scroll.go
+++ /dev/null
@@ -1,470 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "io"
- "net/url"
- "strings"
- "sync"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-const (
- // DefaultScrollKeepAlive is the default time a scroll cursor will be kept alive.
- DefaultScrollKeepAlive = "5m"
-)
-
-// ScrollService iterates over pages of search results from Elasticsearch.
-type ScrollService struct {
- client *Client
- retrier Retrier
- indices []string
- types []string
- keepAlive string
- body interface{}
- ss *SearchSource
- size *int
- pretty bool
- routing string
- preference string
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-
- mu sync.RWMutex
- scrollId string
-}
-
-// NewScrollService initializes and returns a new ScrollService.
-func NewScrollService(client *Client) *ScrollService {
- builder := &ScrollService{
- client: client,
- ss: NewSearchSource(),
- keepAlive: DefaultScrollKeepAlive,
- }
- return builder
-}
-
-// Retrier allows to set specific retry logic for this ScrollService.
-// If not specified, it will use the client's default retrier.
-func (s *ScrollService) Retrier(retrier Retrier) *ScrollService {
- s.retrier = retrier
- return s
-}
-
-// Index sets the name of one or more indices to iterate over.
-func (s *ScrollService) Index(indices ...string) *ScrollService {
- if s.indices == nil {
- s.indices = make([]string, 0)
- }
- s.indices = append(s.indices, indices...)
- return s
-}
-
-// Type sets the name of one or more types to iterate over.
-func (s *ScrollService) Type(types ...string) *ScrollService {
- if s.types == nil {
- s.types = make([]string, 0)
- }
- s.types = append(s.types, types...)
- return s
-}
-
-// Scroll is an alias for KeepAlive, the time to keep
-// the cursor alive (e.g. "5m" for 5 minutes).
-func (s *ScrollService) Scroll(keepAlive string) *ScrollService {
- s.keepAlive = keepAlive
- return s
-}
-
-// KeepAlive sets the maximum time after which the cursor will expire.
-// It is "2m" by default.
-func (s *ScrollService) KeepAlive(keepAlive string) *ScrollService {
- s.keepAlive = keepAlive
- return s
-}
-
-// Size specifies the number of documents Elasticsearch should return
-// from each shard, per page.
-func (s *ScrollService) Size(size int) *ScrollService {
- s.size = &size
- return s
-}
-
-// Body sets the raw body to send to Elasticsearch. This can be e.g. a string,
-// a map[string]interface{} or anything that can be serialized into JSON.
-// Notice that setting the body disables the use of SearchSource and many
-// other properties of the ScanService.
-func (s *ScrollService) Body(body interface{}) *ScrollService {
- s.body = body
- return s
-}
-
-// SearchSource sets the search source builder to use with this iterator.
-// Notice that only a certain number of properties can be used when scrolling,
-// e.g. query and sorting.
-func (s *ScrollService) SearchSource(searchSource *SearchSource) *ScrollService {
- s.ss = searchSource
- if s.ss == nil {
- s.ss = NewSearchSource()
- }
- return s
-}
-
-// Query sets the query to perform, e.g. a MatchAllQuery.
-func (s *ScrollService) Query(query Query) *ScrollService {
- s.ss = s.ss.Query(query)
- return s
-}
-
-// PostFilter is executed as the last filter. It only affects the
-// search hits but not facets. See
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-post-filter.html
-// for details.
-func (s *ScrollService) PostFilter(postFilter Query) *ScrollService {
- s.ss = s.ss.PostFilter(postFilter)
- return s
-}
-
-// Slice allows slicing the scroll request into several batches.
-// This is supported in Elasticsearch 5.0 or later.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html#sliced-scroll
-// for details.
-func (s *ScrollService) Slice(sliceQuery Query) *ScrollService {
- s.ss = s.ss.Slice(sliceQuery)
- return s
-}
-
-// FetchSource indicates whether the response should contain the stored
-// _source for every hit.
-func (s *ScrollService) FetchSource(fetchSource bool) *ScrollService {
- s.ss = s.ss.FetchSource(fetchSource)
- return s
-}
-
-// FetchSourceContext indicates how the _source should be fetched.
-func (s *ScrollService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *ScrollService {
- s.ss = s.ss.FetchSourceContext(fetchSourceContext)
- return s
-}
-
-// Version can be set to true to return a version for each search hit.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-version.html.
-func (s *ScrollService) Version(version bool) *ScrollService {
- s.ss = s.ss.Version(version)
- return s
-}
-
-// Sort adds a sort order. This can have negative effects on the performance
-// of the scroll operation as Elasticsearch needs to sort first.
-func (s *ScrollService) Sort(field string, ascending bool) *ScrollService {
- s.ss = s.ss.Sort(field, ascending)
- return s
-}
-
-// SortWithInfo specifies a sort order. Notice that sorting can have a
-// negative impact on scroll performance.
-func (s *ScrollService) SortWithInfo(info SortInfo) *ScrollService {
- s.ss = s.ss.SortWithInfo(info)
- return s
-}
-
-// SortBy specifies a sort order. Notice that sorting can have a
-// negative impact on scroll performance.
-func (s *ScrollService) SortBy(sorter ...Sorter) *ScrollService {
- s.ss = s.ss.SortBy(sorter...)
- return s
-}
-
-// Pretty asks Elasticsearch to pretty-print the returned JSON.
-func (s *ScrollService) Pretty(pretty bool) *ScrollService {
- s.pretty = pretty
- return s
-}
-
-// Routing is a list of specific routing values to control the shards
-// the search will be executed on.
-func (s *ScrollService) Routing(routings ...string) *ScrollService {
- s.routing = strings.Join(routings, ",")
- return s
-}
-
-// Preference sets the preference to execute the search. Defaults to
-// randomize across shards ("random"). Can be set to "_local" to prefer
-// local shards, "_primary" to execute on primary shards only,
-// or a custom value which guarantees that the same order will be used
-// across different requests.
-func (s *ScrollService) Preference(preference string) *ScrollService {
- s.preference = preference
- return s
-}
-
-// IgnoreUnavailable indicates whether the specified concrete indices
-// should be ignored when unavailable (missing or closed).
-func (s *ScrollService) IgnoreUnavailable(ignoreUnavailable bool) *ScrollService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes `_all` string
-// or when no indices have been specified).
-func (s *ScrollService) AllowNoIndices(allowNoIndices bool) *ScrollService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *ScrollService) ExpandWildcards(expandWildcards string) *ScrollService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// ScrollId specifies the identifier of a scroll in action.
-func (s *ScrollService) ScrollId(scrollId string) *ScrollService {
- s.mu.Lock()
- s.scrollId = scrollId
- s.mu.Unlock()
- return s
-}
-
-// Do returns the next search result. It will return io.EOF as error if there
-// are no more search results.
-func (s *ScrollService) Do(ctx context.Context) (*SearchResult, error) {
- s.mu.RLock()
- nextScrollId := s.scrollId
- s.mu.RUnlock()
- if len(nextScrollId) == 0 {
- return s.first(ctx)
- }
- return s.next(ctx)
-}
-
-// Clear cancels the current scroll operation. If you don't do this manually,
-// the scroll will be expired automatically by Elasticsearch. You can control
-// how long a scroll cursor is kept alive with the KeepAlive func.
-func (s *ScrollService) Clear(ctx context.Context) error {
- s.mu.RLock()
- scrollId := s.scrollId
- s.mu.RUnlock()
- if len(scrollId) == 0 {
- return nil
- }
-
- path := "/_search/scroll"
- params := url.Values{}
- body := struct {
- ScrollId []string `json:"scroll_id,omitempty"`
- }{
- ScrollId: []string{scrollId},
- }
-
- _, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- Body: body,
- Retrier: s.retrier,
- })
- if err != nil {
- return err
- }
-
- return nil
-}
-
-// -- First --
-
-// first takes the first page of search results.
-func (s *ScrollService) first(ctx context.Context) (*SearchResult, error) {
- // Get URL and parameters for request
- path, params, err := s.buildFirstURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP request body
- body, err := s.bodyFirst()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- Retrier: s.retrier,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SearchResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- s.mu.Lock()
- s.scrollId = ret.ScrollId
- s.mu.Unlock()
- if ret.Hits == nil || len(ret.Hits.Hits) == 0 {
- return nil, io.EOF
- }
- return ret, nil
-}
-
-// buildFirstURL builds the URL for retrieving the first page.
-func (s *ScrollService) buildFirstURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.indices) == 0 && len(s.types) == 0 {
- path = "/_search"
- } else if len(s.indices) > 0 && len(s.types) == 0 {
- path, err = uritemplates.Expand("/{index}/_search", map[string]string{
- "index": strings.Join(s.indices, ","),
- })
- } else if len(s.indices) == 0 && len(s.types) > 0 {
- path, err = uritemplates.Expand("/_all/{typ}/_search", map[string]string{
- "typ": strings.Join(s.types, ","),
- })
- } else {
- path, err = uritemplates.Expand("/{index}/{typ}/_search", map[string]string{
- "index": strings.Join(s.indices, ","),
- "typ": strings.Join(s.types, ","),
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.size != nil && *s.size > 0 {
- params.Set("size", fmt.Sprintf("%d", *s.size))
- }
- if len(s.keepAlive) > 0 {
- params.Set("scroll", s.keepAlive)
- }
- if len(s.routing) > 0 {
- params.Set("routing", s.routing)
- }
- if len(s.preference) > 0 {
- params.Set("preference", s.preference)
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if len(s.expandWildcards) > 0 {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
-
- return path, params, nil
-}
-
-// bodyFirst returns the request to fetch the first batch of results.
-func (s *ScrollService) bodyFirst() (interface{}, error) {
- var err error
- var body interface{}
-
- if s.body != nil {
- body = s.body
- } else {
- // Use _doc sort by default if none is specified
- if !s.ss.hasSort() {
- // Use efficient sorting when no user-defined query/body is specified
- s.ss = s.ss.SortBy(SortByDoc{})
- }
-
- // Body from search source
- body, err = s.ss.Source()
- if err != nil {
- return nil, err
- }
- }
-
- return body, nil
-}
-
-// -- Next --
-
-func (s *ScrollService) next(ctx context.Context) (*SearchResult, error) {
- // Get URL for request
- path, params, err := s.buildNextURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body, err := s.bodyNext()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- Retrier: s.retrier,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SearchResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- s.mu.Lock()
- s.scrollId = ret.ScrollId
- s.mu.Unlock()
- if ret.Hits == nil || len(ret.Hits.Hits) == 0 {
- return nil, io.EOF
- }
- return ret, nil
-}
-
-// buildNextURL builds the URL for the operation.
-func (s *ScrollService) buildNextURL() (string, url.Values, error) {
- path := "/_search/scroll"
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
-
- return path, params, nil
-}
-
-// body returns the request to fetch the next batch of results.
-func (s *ScrollService) bodyNext() (interface{}, error) {
- s.mu.RLock()
- body := struct {
- Scroll string `json:"scroll"`
- ScrollId string `json:"scroll_id,omitempty"`
- }{
- Scroll: s.keepAlive,
- ScrollId: s.scrollId,
- }
- s.mu.RUnlock()
- return body, nil
-}
diff --git a/vendor/github.com/olivere/elastic/scroll_test.go b/vendor/github.com/olivere/elastic/scroll_test.go
deleted file mode 100644
index c94e5f92f..000000000
--- a/vendor/github.com/olivere/elastic/scroll_test.go
+++ /dev/null
@@ -1,387 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "io"
- _ "net/http"
- "testing"
-)
-
-func TestScroll(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Should return all documents. Just don't call Do yet!
- svc := client.Scroll(testIndexName).Size(1)
-
- pages := 0
- docs := 0
-
- for {
- res, err := svc.Do(context.TODO())
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected results != nil; got nil")
- }
- if res.Hits == nil {
- t.Fatal("expected results.Hits != nil; got nil")
- }
- if want, have := int64(3), res.Hits.TotalHits; want != have {
- t.Fatalf("expected results.Hits.TotalHits = %d; got %d", want, have)
- }
- if want, have := 1, len(res.Hits.Hits); want != have {
- t.Fatalf("expected len(results.Hits.Hits) = %d; got %d", want, have)
- }
-
- pages++
-
- for _, hit := range res.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- docs++
- }
-
- if len(res.ScrollId) == 0 {
- t.Fatalf("expected scrollId in results; got %q", res.ScrollId)
- }
- }
-
- if want, have := 3, pages; want != have {
- t.Fatalf("expected to retrieve %d pages; got %d", want, have)
- }
- if want, have := 3, docs; want != have {
- t.Fatalf("expected to retrieve %d hits; got %d", want, have)
- }
-
- err = svc.Clear(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = svc.Do(context.TODO())
- if err == nil {
- t.Fatal("expected to fail")
- }
-}
-
-func TestScrollWithQueryAndSort(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- // client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Create a scroll service that returns tweets from user olivere
- // and returns them sorted by "message", in reverse order.
- //
- // Just don't call Do yet!
- svc := client.Scroll(testIndexName).
- Query(NewTermQuery("user", "olivere")).
- Sort("message", false).
- Size(1)
-
- docs := 0
- pages := 0
- for {
- res, err := svc.Do(context.TODO())
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected results != nil; got nil")
- }
- if res.Hits == nil {
- t.Fatal("expected results.Hits != nil; got nil")
- }
- if want, have := int64(2), res.Hits.TotalHits; want != have {
- t.Fatalf("expected results.Hits.TotalHits = %d; got %d", want, have)
- }
- if want, have := 1, len(res.Hits.Hits); want != have {
- t.Fatalf("expected len(results.Hits.Hits) = %d; got %d", want, have)
- }
-
- pages++
-
- for _, hit := range res.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- docs++
- }
- }
-
- if want, have := 2, pages; want != have {
- t.Fatalf("expected to retrieve %d pages; got %d", want, have)
- }
- if want, have := 2, docs; want != have {
- t.Fatalf("expected to retrieve %d hits; got %d", want, have)
- }
-}
-
-func TestScrollWithBody(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndLog(t)
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch.", Retweets: 4}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic.", Retweets: 10}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun.", Retweets: 3}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Test with simple strings and a map
- var tests = []struct {
- Body interface{}
- ExpectedTotalHits int64
- ExpectedDocs int
- ExpectedPages int
- }{
- {
- Body: `{"query":{"match_all":{}}}`,
- ExpectedTotalHits: 3,
- ExpectedDocs: 3,
- ExpectedPages: 3,
- },
- {
- Body: `{"query":{"term":{"user":"olivere"}},"sort":["_doc"]}`,
- ExpectedTotalHits: 2,
- ExpectedDocs: 2,
- ExpectedPages: 2,
- },
- {
- Body: `{"query":{"term":{"user":"olivere"}},"sort":[{"retweets":"desc"}]}`,
- ExpectedTotalHits: 2,
- ExpectedDocs: 2,
- ExpectedPages: 2,
- },
- {
- Body: map[string]interface{}{
- "query": map[string]interface{}{
- "term": map[string]interface{}{
- "user": "olivere",
- },
- },
- "sort": []interface{}{"_doc"},
- },
- ExpectedTotalHits: 2,
- ExpectedDocs: 2,
- ExpectedPages: 2,
- },
- }
-
- for i, tt := range tests {
- // Should return all documents. Just don't call Do yet!
- svc := client.Scroll(testIndexName).Size(1).Body(tt.Body)
-
- pages := 0
- docs := 0
-
- for {
- res, err := svc.Do(context.TODO())
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatalf("#%d: expected results != nil; got nil", i)
- }
- if res.Hits == nil {
- t.Fatalf("#%d: expected results.Hits != nil; got nil", i)
- }
- if want, have := tt.ExpectedTotalHits, res.Hits.TotalHits; want != have {
- t.Fatalf("#%d: expected results.Hits.TotalHits = %d; got %d", i, want, have)
- }
- if want, have := 1, len(res.Hits.Hits); want != have {
- t.Fatalf("#%d: expected len(results.Hits.Hits) = %d; got %d", i, want, have)
- }
-
- pages++
-
- for _, hit := range res.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("#%d: expected SearchResult.Hits.Hit.Index = %q; got %q", i, testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatalf("#%d: %v", i, err)
- }
- docs++
- }
-
- if len(res.ScrollId) == 0 {
- t.Fatalf("#%d: expected scrollId in results; got %q", i, res.ScrollId)
- }
- }
-
- if want, have := tt.ExpectedPages, pages; want != have {
- t.Fatalf("#%d: expected to retrieve %d pages; got %d", i, want, have)
- }
- if want, have := tt.ExpectedDocs, docs; want != have {
- t.Fatalf("#%d: expected to retrieve %d hits; got %d", i, want, have)
- }
-
- err = svc.Clear(context.TODO())
- if err != nil {
- t.Fatalf("#%d: failed to clear scroll context: %v", i, err)
- }
-
- _, err = svc.Do(context.TODO())
- if err == nil {
- t.Fatalf("#%d: expected to fail", i)
- }
- }
-}
-
-func TestScrollWithSlice(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- // Should return all documents. Just don't call Do yet!
- sliceQuery := NewSliceQuery().Id(0).Max(2)
- svc := client.Scroll(testIndexName).Slice(sliceQuery).Size(1)
-
- pages := 0
- docs := 0
-
- for {
- res, err := svc.Do(context.TODO())
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected results != nil; got nil")
- }
- if res.Hits == nil {
- t.Fatal("expected results.Hits != nil; got nil")
- }
-
- pages++
-
- for _, hit := range res.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- docs++
- }
-
- if len(res.ScrollId) == 0 {
- t.Fatalf("expected scrollId in results; got %q", res.ScrollId)
- }
- }
-
- if pages == 0 {
- t.Fatal("expected to retrieve some pages")
- }
- if docs == 0 {
- t.Fatal("expected to retrieve some hits")
- }
-
- if err := svc.Clear(context.TODO()); err != nil {
- t.Fatal(err)
- }
-
- if _, err := svc.Do(context.TODO()); err == nil {
- t.Fatal("expected to fail")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search.go b/vendor/github.com/olivere/elastic/search.go
deleted file mode 100644
index 034b12096..000000000
--- a/vendor/github.com/olivere/elastic/search.go
+++ /dev/null
@@ -1,580 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "reflect"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// Search for documents in Elasticsearch.
-type SearchService struct {
- client *Client
- searchSource *SearchSource
- source interface{}
- pretty bool
- filterPath []string
- searchType string
- index []string
- typ []string
- routing string
- preference string
- requestCache *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
-}
-
-// NewSearchService creates a new service for searching in Elasticsearch.
-func NewSearchService(client *Client) *SearchService {
- builder := &SearchService{
- client: client,
- searchSource: NewSearchSource(),
- }
- return builder
-}
-
-// SearchSource sets the search source builder to use with this service.
-func (s *SearchService) SearchSource(searchSource *SearchSource) *SearchService {
- s.searchSource = searchSource
- if s.searchSource == nil {
- s.searchSource = NewSearchSource()
- }
- return s
-}
-
-// Source allows the user to set the request body manually without using
-// any of the structs and interfaces in Elastic.
-func (s *SearchService) Source(source interface{}) *SearchService {
- s.source = source
- return s
-}
-
-// FilterPath allows reducing the response, a mechanism known as
-// response filtering and described here:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/common-options.html#common-options-response-filtering.
-func (s *SearchService) FilterPath(filterPath ...string) *SearchService {
- s.filterPath = append(s.filterPath, filterPath...)
- return s
-}
-
-// Index sets the names of the indices to use for search.
-func (s *SearchService) Index(index ...string) *SearchService {
- s.index = append(s.index, index...)
- return s
-}
-
-// Types adds search restrictions for a list of types.
-func (s *SearchService) Type(typ ...string) *SearchService {
- s.typ = append(s.typ, typ...)
- return s
-}
-
-// Pretty enables the caller to indent the JSON output.
-func (s *SearchService) Pretty(pretty bool) *SearchService {
- s.pretty = pretty
- return s
-}
-
-// Timeout sets the timeout to use, e.g. "1s" or "1000ms".
-func (s *SearchService) Timeout(timeout string) *SearchService {
- s.searchSource = s.searchSource.Timeout(timeout)
- return s
-}
-
-// Profile sets the Profile API flag on the search source.
-// When enabled, a search executed by this service will return query
-// profiling data.
-func (s *SearchService) Profile(profile bool) *SearchService {
- s.searchSource = s.searchSource.Profile(profile)
- return s
-}
-
-// Collapse adds field collapsing.
-func (s *SearchService) Collapse(collapse *CollapseBuilder) *SearchService {
- s.searchSource = s.searchSource.Collapse(collapse)
- return s
-}
-
-// TimeoutInMillis sets the timeout in milliseconds.
-func (s *SearchService) TimeoutInMillis(timeoutInMillis int) *SearchService {
- s.searchSource = s.searchSource.TimeoutInMillis(timeoutInMillis)
- return s
-}
-
-// SearchType sets the search operation type. Valid values are:
-// "dfs_query_then_fetch" and "query_then_fetch".
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-search-type.html
-// for details.
-func (s *SearchService) SearchType(searchType string) *SearchService {
- s.searchType = searchType
- return s
-}
-
-// Routing is a list of specific routing values to control the shards
-// the search will be executed on.
-func (s *SearchService) Routing(routings ...string) *SearchService {
- s.routing = strings.Join(routings, ",")
- return s
-}
-
-// Preference sets the preference to execute the search. Defaults to
-// randomize across shards ("random"). Can be set to "_local" to prefer
-// local shards, "_primary" to execute on primary shards only,
-// or a custom value which guarantees that the same order will be used
-// across different requests.
-func (s *SearchService) Preference(preference string) *SearchService {
- s.preference = preference
- return s
-}
-
-// RequestCache indicates whether the cache should be used for this
-// request or not, defaults to index level setting.
-func (s *SearchService) RequestCache(requestCache bool) *SearchService {
- s.requestCache = &requestCache
- return s
-}
-
-// Query sets the query to perform, e.g. MatchAllQuery.
-func (s *SearchService) Query(query Query) *SearchService {
- s.searchSource = s.searchSource.Query(query)
- return s
-}
-
-// PostFilter will be executed after the query has been executed and
-// only affects the search hits, not the aggregations.
-// This filter is always executed as the last filtering mechanism.
-func (s *SearchService) PostFilter(postFilter Query) *SearchService {
- s.searchSource = s.searchSource.PostFilter(postFilter)
- return s
-}
-
-// FetchSource indicates whether the response should contain the stored
-// _source for every hit.
-func (s *SearchService) FetchSource(fetchSource bool) *SearchService {
- s.searchSource = s.searchSource.FetchSource(fetchSource)
- return s
-}
-
-// FetchSourceContext indicates how the _source should be fetched.
-func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService {
- s.searchSource = s.searchSource.FetchSourceContext(fetchSourceContext)
- return s
-}
-
-// Highlight adds highlighting to the search.
-func (s *SearchService) Highlight(highlight *Highlight) *SearchService {
- s.searchSource = s.searchSource.Highlight(highlight)
- return s
-}
-
-// GlobalSuggestText defines the global text to use with all suggesters.
-// This avoids repetition.
-func (s *SearchService) GlobalSuggestText(globalText string) *SearchService {
- s.searchSource = s.searchSource.GlobalSuggestText(globalText)
- return s
-}
-
-// Suggester adds a suggester to the search.
-func (s *SearchService) Suggester(suggester Suggester) *SearchService {
- s.searchSource = s.searchSource.Suggester(suggester)
- return s
-}
-
-// Aggregation adds an aggreation to perform as part of the search.
-func (s *SearchService) Aggregation(name string, aggregation Aggregation) *SearchService {
- s.searchSource = s.searchSource.Aggregation(name, aggregation)
- return s
-}
-
-// MinScore sets the minimum score below which docs will be filtered out.
-func (s *SearchService) MinScore(minScore float64) *SearchService {
- s.searchSource = s.searchSource.MinScore(minScore)
- return s
-}
-
-// From index to start the search from. Defaults to 0.
-func (s *SearchService) From(from int) *SearchService {
- s.searchSource = s.searchSource.From(from)
- return s
-}
-
-// Size is the number of search hits to return. Defaults to 10.
-func (s *SearchService) Size(size int) *SearchService {
- s.searchSource = s.searchSource.Size(size)
- return s
-}
-
-// Explain indicates whether each search hit should be returned with
-// an explanation of the hit (ranking).
-func (s *SearchService) Explain(explain bool) *SearchService {
- s.searchSource = s.searchSource.Explain(explain)
- return s
-}
-
-// Version indicates whether each search hit should be returned with
-// a version associated to it.
-func (s *SearchService) Version(version bool) *SearchService {
- s.searchSource = s.searchSource.Version(version)
- return s
-}
-
-// Sort adds a sort order.
-func (s *SearchService) Sort(field string, ascending bool) *SearchService {
- s.searchSource = s.searchSource.Sort(field, ascending)
- return s
-}
-
-// SortWithInfo adds a sort order.
-func (s *SearchService) SortWithInfo(info SortInfo) *SearchService {
- s.searchSource = s.searchSource.SortWithInfo(info)
- return s
-}
-
-// SortBy adds a sort order.
-func (s *SearchService) SortBy(sorter ...Sorter) *SearchService {
- s.searchSource = s.searchSource.SortBy(sorter...)
- return s
-}
-
-// NoStoredFields indicates that no stored fields should be loaded, resulting in only
-// id and type to be returned per field.
-func (s *SearchService) NoStoredFields() *SearchService {
- s.searchSource = s.searchSource.NoStoredFields()
- return s
-}
-
-// StoredField adds a single field to load and return (note, must be stored) as
-// part of the search request. If none are specified, the source of the
-// document will be returned.
-func (s *SearchService) StoredField(fieldName string) *SearchService {
- s.searchSource = s.searchSource.StoredField(fieldName)
- return s
-}
-
-// StoredFields sets the fields to load and return as part of the search request.
-// If none are specified, the source of the document will be returned.
-func (s *SearchService) StoredFields(fields ...string) *SearchService {
- s.searchSource = s.searchSource.StoredFields(fields...)
- return s
-}
-
-// TrackScores is applied when sorting and controls if scores will be
-// tracked as well. Defaults to false.
-func (s *SearchService) TrackScores(trackScores bool) *SearchService {
- s.searchSource = s.searchSource.TrackScores(trackScores)
- return s
-}
-
-// SearchAfter allows a different form of pagination by using a live cursor,
-// using the results of the previous page to help the retrieval of the next.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-search-after.html
-func (s *SearchService) SearchAfter(sortValues ...interface{}) *SearchService {
- s.searchSource = s.searchSource.SearchAfter(sortValues...)
- return s
-}
-
-// IgnoreUnavailable indicates whether the specified concrete indices
-// should be ignored when unavailable (missing or closed).
-func (s *SearchService) IgnoreUnavailable(ignoreUnavailable bool) *SearchService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes `_all` string
-// or when no indices have been specified).
-func (s *SearchService) AllowNoIndices(allowNoIndices bool) *SearchService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *SearchService) ExpandWildcards(expandWildcards string) *SearchService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SearchService) buildURL() (string, url.Values, error) {
- var err error
- var path string
-
- if len(s.index) > 0 && len(s.typ) > 0 {
- path, err = uritemplates.Expand("/{index}/{type}/_search", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": strings.Join(s.typ, ","),
- })
- } else if len(s.index) > 0 {
- path, err = uritemplates.Expand("/{index}/_search", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- } else if len(s.typ) > 0 {
- path, err = uritemplates.Expand("/_all/{type}/_search", map[string]string{
- "type": strings.Join(s.typ, ","),
- })
- } else {
- path = "/_search"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", fmt.Sprintf("%v", s.pretty))
- }
- if s.searchType != "" {
- params.Set("search_type", s.searchType)
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.requestCache != nil {
- params.Set("request_cache", fmt.Sprintf("%v", *s.requestCache))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if len(s.filterPath) > 0 {
- params.Set("filter_path", strings.Join(s.filterPath, ","))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SearchService) Validate() error {
- return nil
-}
-
-// Do executes the search and returns a SearchResult.
-func (s *SearchService) Do(ctx context.Context) (*SearchResult, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Perform request
- var body interface{}
- if s.source != nil {
- body = s.source
- } else {
- src, err := s.searchSource.Source()
- if err != nil {
- return nil, err
- }
- body = src
- }
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return search results
- ret := new(SearchResult)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SearchResult is the result of a search in Elasticsearch.
-type SearchResult struct {
- TookInMillis int64 `json:"took"` // search time in milliseconds
- ScrollId string `json:"_scroll_id"` // only used with Scroll and Scan operations
- Hits *SearchHits `json:"hits"` // the actual search hits
- Suggest SearchSuggest `json:"suggest"` // results from suggesters
- Aggregations Aggregations `json:"aggregations"` // results from aggregations
- TimedOut bool `json:"timed_out"` // true if the search timed out
- Error *ErrorDetails `json:"error,omitempty"` // only used in MultiGet
- Profile *SearchProfile `json:"profile,omitempty"` // profiling results, if optional Profile API was active for this search
- Shards *shardsInfo `json:"_shards,omitempty"` // shard information
-}
-
-// TotalHits is a convenience function to return the number of hits for
-// a search result.
-func (r *SearchResult) TotalHits() int64 {
- if r.Hits != nil {
- return r.Hits.TotalHits
- }
- return 0
-}
-
-// Each is a utility function to iterate over all hits. It saves you from
-// checking for nil values. Notice that Each will ignore errors in
-// serializing JSON and hits with empty/nil _source will get an empty
-// value
-func (r *SearchResult) Each(typ reflect.Type) []interface{} {
- if r.Hits == nil || r.Hits.Hits == nil || len(r.Hits.Hits) == 0 {
- return nil
- }
- var slice []interface{}
- for _, hit := range r.Hits.Hits {
- v := reflect.New(typ).Elem()
- if hit.Source == nil {
- slice = append(slice, v.Interface())
- continue
- }
- if err := json.Unmarshal(*hit.Source, v.Addr().Interface()); err == nil {
- slice = append(slice, v.Interface())
- }
- }
- return slice
-}
-
-// SearchHits specifies the list of search hits.
-type SearchHits struct {
- TotalHits int64 `json:"total"` // total number of hits found
- MaxScore *float64 `json:"max_score"` // maximum score of all hits
- Hits []*SearchHit `json:"hits"` // the actual hits returned
-}
-
-// SearchHit is a single hit.
-type SearchHit struct {
- Score *float64 `json:"_score"` // computed score
- Index string `json:"_index"` // index name
- Type string `json:"_type"` // type meta field
- Id string `json:"_id"` // external or internal
- Uid string `json:"_uid"` // uid meta field (see MapperService.java for all meta fields)
- Routing string `json:"_routing"` // routing meta field
- Parent string `json:"_parent"` // parent meta field
- Version *int64 `json:"_version"` // version number, when Version is set to true in SearchService
- Sort []interface{} `json:"sort"` // sort information
- Highlight SearchHitHighlight `json:"highlight"` // highlighter information
- Source *json.RawMessage `json:"_source"` // stored document source
- Fields map[string]interface{} `json:"fields"` // returned (stored) fields
- Explanation *SearchExplanation `json:"_explanation"` // explains how the score was computed
- MatchedQueries []string `json:"matched_queries"` // matched queries
- InnerHits map[string]*SearchHitInnerHits `json:"inner_hits"` // inner hits with ES >= 1.5.0
-
- // Shard
- // HighlightFields
- // SortValues
- // MatchedFilters
-}
-
-type SearchHitInnerHits struct {
- Hits *SearchHits `json:"hits"`
-}
-
-// SearchExplanation explains how the score for a hit was computed.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-explain.html.
-type SearchExplanation struct {
- Value float64 `json:"value"` // e.g. 1.0
- Description string `json:"description"` // e.g. "boost" or "ConstantScore(*:*), product of:"
- Details []SearchExplanation `json:"details,omitempty"` // recursive details
-}
-
-// Suggest
-
-// SearchSuggest is a map of suggestions.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters.html.
-type SearchSuggest map[string][]SearchSuggestion
-
-// SearchSuggestion is a single search suggestion.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters.html.
-type SearchSuggestion struct {
- Text string `json:"text"`
- Offset int `json:"offset"`
- Length int `json:"length"`
- Options []SearchSuggestionOption `json:"options"`
-}
-
-// SearchSuggestionOption is an option of a SearchSuggestion.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters.html.
-type SearchSuggestionOption struct {
- Text string `json:"text"`
- Index string `json:"_index"`
- Type string `json:"_type"`
- Id string `json:"_id"`
- Score float64 `json:"score"`
- Highlighted string `json:"highlighted"`
- CollateMatch bool `json:"collate_match"`
- Freq int `json:"freq"` // from TermSuggestion.Option in Java API
- Source *json.RawMessage `json:"_source"`
-}
-
-// SearchProfile is a list of shard profiling data collected during
-// query execution in the "profile" section of a SearchResult
-type SearchProfile struct {
- Shards []SearchProfileShardResult `json:"shards"`
-}
-
-// SearchProfileShardResult returns the profiling data for a single shard
-// accessed during the search query or aggregation.
-type SearchProfileShardResult struct {
- ID string `json:"id"`
- Searches []QueryProfileShardResult `json:"searches"`
- Aggregations []ProfileResult `json:"aggregations"`
-}
-
-// QueryProfileShardResult is a container class to hold the profile results
-// for a single shard in the request. It comtains a list of query profiles,
-// a collector tree and a total rewrite tree.
-type QueryProfileShardResult struct {
- Query []ProfileResult `json:"query,omitempty"`
- RewriteTime int64 `json:"rewrite_time,omitempty"`
- Collector []interface{} `json:"collector,omitempty"`
-}
-
-// CollectorResult holds the profile timings of the collectors used in the
-// search. Children's CollectorResults may be embedded inside of a parent
-// CollectorResult.
-type CollectorResult struct {
- Name string `json:"name,omitempty"`
- Reason string `json:"reason,omitempty"`
- Time string `json:"time,omitempty"`
- TimeNanos int64 `json:"time_in_nanos,omitempty"`
- Children []CollectorResult `json:"children,omitempty"`
-}
-
-// ProfileResult is the internal representation of a profiled query,
-// corresponding to a single node in the query tree.
-type ProfileResult struct {
- Type string `json:"type"`
- Description string `json:"description,omitempty"`
- NodeTime string `json:"time,omitempty"`
- NodeTimeNanos int64 `json:"time_in_nanos,omitempty"`
- Breakdown map[string]int64 `json:"breakdown,omitempty"`
- Children []ProfileResult `json:"children,omitempty"`
-}
-
-// Aggregations (see search_aggs.go)
-
-// Highlighting
-
-// SearchHitHighlight is the highlight information of a search hit.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-highlighting.html
-// for a general discussion of highlighting.
-type SearchHitHighlight map[string][]string
diff --git a/vendor/github.com/olivere/elastic/search_aggs.go b/vendor/github.com/olivere/elastic/search_aggs.go
deleted file mode 100644
index 6359611b1..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs.go
+++ /dev/null
@@ -1,1520 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "bytes"
- "encoding/json"
-)
-
-// Aggregations can be seen as a unit-of-work that build
-// analytic information over a set of documents. It is
-// (in many senses) the follow-up of facets in Elasticsearch.
-// For more details about aggregations, visit:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations.html
-type Aggregation interface {
- // Source returns a JSON-serializable aggregation that is a fragment
- // of the request sent to Elasticsearch.
- Source() (interface{}, error)
-}
-
-// Aggregations is a list of aggregations that are part of a search result.
-type Aggregations map[string]*json.RawMessage
-
-// Min returns min aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-min-aggregation.html
-func (a Aggregations) Min(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Max returns max aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-max-aggregation.html
-func (a Aggregations) Max(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Sum returns sum aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-sum-aggregation.html
-func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Avg returns average aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-avg-aggregation.html
-func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// ValueCount returns value-count aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-valuecount-aggregation.html
-func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Cardinality returns cardinality aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-cardinality-aggregation.html
-func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationValueMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Stats returns stats aggregation results.
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-stats-aggregation.html
-func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationStatsMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// ExtendedStats returns extended stats aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-extendedstats-aggregation.html
-func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationExtendedStatsMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// MatrixStats returns matrix stats aggregation results.
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-matrix-stats-aggregation.html
-func (a Aggregations) MatrixStats(name string) (*AggregationMatrixStats, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationMatrixStats)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Percentiles returns percentiles results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-percentile-aggregation.html
-func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPercentilesMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// PercentileRanks returns percentile ranks results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-percentile-rank-aggregation.html
-func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPercentilesMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// TopHits returns top-hits aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-top-hits-aggregation.html
-func (a Aggregations) TopHits(name string) (*AggregationTopHitsMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationTopHitsMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Global returns global results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-global-aggregation.html
-func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Filter returns filter results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-filter-aggregation.html
-func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Filters returns filters results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-filters-aggregation.html
-func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketFilters)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Missing returns missing results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-missing-aggregation.html
-func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Nested returns nested results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-nested-aggregation.html
-func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// ReverseNested returns reverse-nested results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-reverse-nested-aggregation.html
-func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Children returns children results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-children-aggregation.html
-func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Terms returns terms aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-terms-aggregation.html
-func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketKeyItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// SignificantTerms returns significant terms aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html
-func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketSignificantTerms)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Sampler returns sampler aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-sampler-aggregation.html
-func (a Aggregations) Sampler(name string) (*AggregationSingleBucket, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationSingleBucket)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Range returns range aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-range-aggregation.html
-func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketRangeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// KeyedRange returns keyed range aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-range-aggregation.html.
-func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketKeyedRangeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// DateRange returns date range aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-daterange-aggregation.html
-func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketRangeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// IPRange returns IP range aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-iprange-aggregation.html
-func (a Aggregations) IPRange(name string) (*AggregationBucketRangeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketRangeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Histogram returns histogram aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-histogram-aggregation.html
-func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketHistogramItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// DateHistogram returns date histogram aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-datehistogram-aggregation.html
-func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketHistogramItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// GeoBounds returns geo-bounds aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-geobounds-aggregation.html
-func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationGeoBoundsMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// GeoHash returns geo-hash aggregation results.
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-geohashgrid-aggregation.html
-func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketKeyItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// GeoDistance returns geo distance aggregation results.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-geodistance-aggregation.html
-func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketRangeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// AvgBucket returns average bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-avg-bucket-aggregation.html
-func (a Aggregations) AvgBucket(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// SumBucket returns sum bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-sum-bucket-aggregation.html
-func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// StatsBucket returns stats bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-stats-bucket-aggregation.html
-func (a Aggregations) StatsBucket(name string) (*AggregationPipelineStatsMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineStatsMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// PercentilesBucket returns stats bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
-func (a Aggregations) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelinePercentilesMetric)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// MaxBucket returns maximum bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-max-bucket-aggregation.html
-func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineBucketMetricValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// MinBucket returns minimum bucket pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-min-bucket-aggregation.html
-func (a Aggregations) MinBucket(name string) (*AggregationPipelineBucketMetricValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineBucketMetricValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// MovAvg returns moving average pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html
-func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Derivative returns derivative pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-derivative-aggregation.html
-func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineDerivative)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// CumulativeSum returns a cumulative sum pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
-func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// BucketScript returns bucket script pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-script-aggregation.html
-func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// SerialDiff returns serial differencing pipeline aggregation results.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-serialdiff-aggregation.html
-func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationPipelineSimpleValue)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// Composite returns composite bucket aggregation results.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html
-// for details.
-func (a Aggregations) Composite(name string) (*AggregationBucketCompositeItems, bool) {
- if raw, found := a[name]; found {
- agg := new(AggregationBucketCompositeItems)
- if raw == nil {
- return agg, true
- }
- if err := json.Unmarshal(*raw, agg); err == nil {
- return agg, true
- }
- }
- return nil, false
-}
-
-// -- Single value metric --
-
-// AggregationValueMetric is a single-value metric, returned e.g. by a
-// Min or Max aggregation.
-type AggregationValueMetric struct {
- Aggregations
-
- Value *float64 //`json:"value"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationValueMetric structure.
-func (a *AggregationValueMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["value"]; ok && v != nil {
- json.Unmarshal(*v, &a.Value)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Stats metric --
-
-// AggregationStatsMetric is a multi-value metric, returned by a Stats aggregation.
-type AggregationStatsMetric struct {
- Aggregations
-
- Count int64 // `json:"count"`
- Min *float64 //`json:"min,omitempty"`
- Max *float64 //`json:"max,omitempty"`
- Avg *float64 //`json:"avg,omitempty"`
- Sum *float64 //`json:"sum,omitempty"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationStatsMetric structure.
-func (a *AggregationStatsMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["count"]; ok && v != nil {
- json.Unmarshal(*v, &a.Count)
- }
- if v, ok := aggs["min"]; ok && v != nil {
- json.Unmarshal(*v, &a.Min)
- }
- if v, ok := aggs["max"]; ok && v != nil {
- json.Unmarshal(*v, &a.Max)
- }
- if v, ok := aggs["avg"]; ok && v != nil {
- json.Unmarshal(*v, &a.Avg)
- }
- if v, ok := aggs["sum"]; ok && v != nil {
- json.Unmarshal(*v, &a.Sum)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Extended stats metric --
-
-// AggregationExtendedStatsMetric is a multi-value metric, returned by an ExtendedStats aggregation.
-type AggregationExtendedStatsMetric struct {
- Aggregations
-
- Count int64 // `json:"count"`
- Min *float64 //`json:"min,omitempty"`
- Max *float64 //`json:"max,omitempty"`
- Avg *float64 //`json:"avg,omitempty"`
- Sum *float64 //`json:"sum,omitempty"`
- SumOfSquares *float64 //`json:"sum_of_squares,omitempty"`
- Variance *float64 //`json:"variance,omitempty"`
- StdDeviation *float64 //`json:"std_deviation,omitempty"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationExtendedStatsMetric structure.
-func (a *AggregationExtendedStatsMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["count"]; ok && v != nil {
- json.Unmarshal(*v, &a.Count)
- }
- if v, ok := aggs["min"]; ok && v != nil {
- json.Unmarshal(*v, &a.Min)
- }
- if v, ok := aggs["max"]; ok && v != nil {
- json.Unmarshal(*v, &a.Max)
- }
- if v, ok := aggs["avg"]; ok && v != nil {
- json.Unmarshal(*v, &a.Avg)
- }
- if v, ok := aggs["sum"]; ok && v != nil {
- json.Unmarshal(*v, &a.Sum)
- }
- if v, ok := aggs["sum_of_squares"]; ok && v != nil {
- json.Unmarshal(*v, &a.SumOfSquares)
- }
- if v, ok := aggs["variance"]; ok && v != nil {
- json.Unmarshal(*v, &a.Variance)
- }
- if v, ok := aggs["std_deviation"]; ok && v != nil {
- json.Unmarshal(*v, &a.StdDeviation)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Matrix Stats --
-
-// AggregationMatrixStats is returned by a MatrixStats aggregation.
-type AggregationMatrixStats struct {
- Aggregations
-
- Fields []*AggregationMatrixStatsField // `json:"field,omitempty"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// AggregationMatrixStatsField represents running stats of a single field
-// returned from MatrixStats aggregation.
-type AggregationMatrixStatsField struct {
- Name string `json:"name"`
- Count int64 `json:"count"`
- Mean float64 `json:"mean,omitempty"`
- Variance float64 `json:"variance,omitempty"`
- Skewness float64 `json:"skewness,omitempty"`
- Kurtosis float64 `json:"kurtosis,omitempty"`
- Covariance map[string]float64 `json:"covariance,omitempty"`
- Correlation map[string]float64 `json:"correlation,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationMatrixStats structure.
-func (a *AggregationMatrixStats) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["fields"]; ok && v != nil {
- // RunningStats for every field
- json.Unmarshal(*v, &a.Fields)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Percentiles metric --
-
-// AggregationPercentilesMetric is a multi-value metric, returned by a Percentiles aggregation.
-type AggregationPercentilesMetric struct {
- Aggregations
-
- Values map[string]float64 // `json:"values"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPercentilesMetric structure.
-func (a *AggregationPercentilesMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["values"]; ok && v != nil {
- json.Unmarshal(*v, &a.Values)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Top-hits metric --
-
-// AggregationTopHitsMetric is a metric returned by a TopHits aggregation.
-type AggregationTopHitsMetric struct {
- Aggregations
-
- Hits *SearchHits //`json:"hits"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationTopHitsMetric structure.
-func (a *AggregationTopHitsMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- a.Aggregations = aggs
- a.Hits = new(SearchHits)
- if v, ok := aggs["hits"]; ok && v != nil {
- json.Unmarshal(*v, &a.Hits)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- return nil
-}
-
-// -- Geo-bounds metric --
-
-// AggregationGeoBoundsMetric is a metric as returned by a GeoBounds aggregation.
-type AggregationGeoBoundsMetric struct {
- Aggregations
-
- Bounds struct {
- TopLeft struct {
- Latitude float64 `json:"lat"`
- Longitude float64 `json:"lon"`
- } `json:"top_left"`
- BottomRight struct {
- Latitude float64 `json:"lat"`
- Longitude float64 `json:"lon"`
- } `json:"bottom_right"`
- } `json:"bounds"`
-
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationGeoBoundsMetric structure.
-func (a *AggregationGeoBoundsMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["bounds"]; ok && v != nil {
- json.Unmarshal(*v, &a.Bounds)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Single bucket --
-
-// AggregationSingleBucket is a single bucket, returned e.g. via an aggregation of type Global.
-type AggregationSingleBucket struct {
- Aggregations
-
- DocCount int64 // `json:"doc_count"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationSingleBucket structure.
-func (a *AggregationSingleBucket) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Bucket range items --
-
-// AggregationBucketRangeItems is a bucket aggregation that is e.g. returned
-// with a range aggregation.
-type AggregationBucketRangeItems struct {
- Aggregations
-
- DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"`
- SumOfOtherDocCount int64 //`json:"sum_other_doc_count"`
- Buckets []*AggregationBucketRangeItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
-func (a *AggregationBucketRangeItems) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["doc_count_error_upper_bound"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCountErrorUpperBound)
- }
- if v, ok := aggs["sum_other_doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.SumOfOtherDocCount)
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketKeyedRangeItems is a bucket aggregation that is e.g. returned
-// with a keyed range aggregation.
-type AggregationBucketKeyedRangeItems struct {
- Aggregations
-
- DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"`
- SumOfOtherDocCount int64 //`json:"sum_other_doc_count"`
- Buckets map[string]*AggregationBucketRangeItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
-func (a *AggregationBucketKeyedRangeItems) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["doc_count_error_upper_bound"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCountErrorUpperBound)
- }
- if v, ok := aggs["sum_other_doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.SumOfOtherDocCount)
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketRangeItem is a single bucket of an AggregationBucketRangeItems structure.
-type AggregationBucketRangeItem struct {
- Aggregations
-
- Key string //`json:"key"`
- DocCount int64 //`json:"doc_count"`
- From *float64 //`json:"from"`
- FromAsString string //`json:"from_as_string"`
- To *float64 //`json:"to"`
- ToAsString string //`json:"to_as_string"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItem structure.
-func (a *AggregationBucketRangeItem) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["key"]; ok && v != nil {
- json.Unmarshal(*v, &a.Key)
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- if v, ok := aggs["from"]; ok && v != nil {
- json.Unmarshal(*v, &a.From)
- }
- if v, ok := aggs["from_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.FromAsString)
- }
- if v, ok := aggs["to"]; ok && v != nil {
- json.Unmarshal(*v, &a.To)
- }
- if v, ok := aggs["to_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.ToAsString)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Bucket key items --
-
-// AggregationBucketKeyItems is a bucket aggregation that is e.g. returned
-// with a terms aggregation.
-type AggregationBucketKeyItems struct {
- Aggregations
-
- DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"`
- SumOfOtherDocCount int64 //`json:"sum_other_doc_count"`
- Buckets []*AggregationBucketKeyItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItems structure.
-func (a *AggregationBucketKeyItems) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["doc_count_error_upper_bound"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCountErrorUpperBound)
- }
- if v, ok := aggs["sum_other_doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.SumOfOtherDocCount)
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketKeyItem is a single bucket of an AggregationBucketKeyItems structure.
-type AggregationBucketKeyItem struct {
- Aggregations
-
- Key interface{} //`json:"key"`
- KeyAsString *string //`json:"key_as_string"`
- KeyNumber json.Number
- DocCount int64 //`json:"doc_count"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItem structure.
-func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- dec := json.NewDecoder(bytes.NewReader(data))
- dec.UseNumber()
- if err := dec.Decode(&aggs); err != nil {
- return err
- }
- if v, ok := aggs["key"]; ok && v != nil {
- json.Unmarshal(*v, &a.Key)
- json.Unmarshal(*v, &a.KeyNumber)
- }
- if v, ok := aggs["key_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.KeyAsString)
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Bucket types for significant terms --
-
-// AggregationBucketSignificantTerms is a bucket aggregation returned
-// with a significant terms aggregation.
-type AggregationBucketSignificantTerms struct {
- Aggregations
-
- DocCount int64 //`json:"doc_count"`
- Buckets []*AggregationBucketSignificantTerm //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerms structure.
-func (a *AggregationBucketSignificantTerms) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketSignificantTerm is a single bucket of an AggregationBucketSignificantTerms structure.
-type AggregationBucketSignificantTerm struct {
- Aggregations
-
- Key string //`json:"key"`
- DocCount int64 //`json:"doc_count"`
- BgCount int64 //`json:"bg_count"`
- Score float64 //`json:"score"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerm structure.
-func (a *AggregationBucketSignificantTerm) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["key"]; ok && v != nil {
- json.Unmarshal(*v, &a.Key)
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- if v, ok := aggs["bg_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.BgCount)
- }
- if v, ok := aggs["score"]; ok && v != nil {
- json.Unmarshal(*v, &a.Score)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Bucket filters --
-
-// AggregationBucketFilters is a multi-bucket aggregation that is returned
-// with a filters aggregation.
-type AggregationBucketFilters struct {
- Aggregations
-
- Buckets []*AggregationBucketKeyItem //`json:"buckets"`
- NamedBuckets map[string]*AggregationBucketKeyItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketFilters structure.
-func (a *AggregationBucketFilters) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- json.Unmarshal(*v, &a.NamedBuckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Bucket histogram items --
-
-// AggregationBucketHistogramItems is a bucket aggregation that is returned
-// with a date histogram aggregation.
-type AggregationBucketHistogramItems struct {
- Aggregations
-
- Buckets []*AggregationBucketHistogramItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItems structure.
-func (a *AggregationBucketHistogramItems) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.
-type AggregationBucketHistogramItem struct {
- Aggregations
-
- Key float64 //`json:"key"`
- KeyAsString *string //`json:"key_as_string"`
- DocCount int64 //`json:"doc_count"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItem structure.
-func (a *AggregationBucketHistogramItem) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["key"]; ok && v != nil {
- json.Unmarshal(*v, &a.Key)
- }
- if v, ok := aggs["key_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.KeyAsString)
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Pipeline simple value --
-
-// AggregationPipelineSimpleValue is a simple value, returned e.g. by a
-// MovAvg aggregation.
-type AggregationPipelineSimpleValue struct {
- Aggregations
-
- Value *float64 // `json:"value"`
- ValueAsString string // `json:"value_as_string"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPipelineSimpleValue structure.
-func (a *AggregationPipelineSimpleValue) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["value"]; ok && v != nil {
- json.Unmarshal(*v, &a.Value)
- }
- if v, ok := aggs["value_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.ValueAsString)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Pipeline simple value --
-
-// AggregationPipelineBucketMetricValue is a value returned e.g. by a
-// MaxBucket aggregation.
-type AggregationPipelineBucketMetricValue struct {
- Aggregations
-
- Keys []interface{} // `json:"keys"`
- Value *float64 // `json:"value"`
- ValueAsString string // `json:"value_as_string"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPipelineBucketMetricValue structure.
-func (a *AggregationPipelineBucketMetricValue) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["keys"]; ok && v != nil {
- json.Unmarshal(*v, &a.Keys)
- }
- if v, ok := aggs["value"]; ok && v != nil {
- json.Unmarshal(*v, &a.Value)
- }
- if v, ok := aggs["value_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.ValueAsString)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Pipeline derivative --
-
-// AggregationPipelineDerivative is the value returned by a
-// Derivative aggregation.
-type AggregationPipelineDerivative struct {
- Aggregations
-
- Value *float64 // `json:"value"`
- ValueAsString string // `json:"value_as_string"`
- NormalizedValue *float64 // `json:"normalized_value"`
- NormalizedValueAsString string // `json:"normalized_value_as_string"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPipelineDerivative structure.
-func (a *AggregationPipelineDerivative) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["value"]; ok && v != nil {
- json.Unmarshal(*v, &a.Value)
- }
- if v, ok := aggs["value_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.ValueAsString)
- }
- if v, ok := aggs["normalized_value"]; ok && v != nil {
- json.Unmarshal(*v, &a.NormalizedValue)
- }
- if v, ok := aggs["normalized_value_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.NormalizedValueAsString)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Pipeline stats metric --
-
-// AggregationPipelineStatsMetric is a simple value, returned e.g. by a
-// MovAvg aggregation.
-type AggregationPipelineStatsMetric struct {
- Aggregations
-
- Count int64 // `json:"count"`
- CountAsString string // `json:"count_as_string"`
- Min *float64 // `json:"min"`
- MinAsString string // `json:"min_as_string"`
- Max *float64 // `json:"max"`
- MaxAsString string // `json:"max_as_string"`
- Avg *float64 // `json:"avg"`
- AvgAsString string // `json:"avg_as_string"`
- Sum *float64 // `json:"sum"`
- SumAsString string // `json:"sum_as_string"`
-
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPipelineStatsMetric structure.
-func (a *AggregationPipelineStatsMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["count"]; ok && v != nil {
- json.Unmarshal(*v, &a.Count)
- }
- if v, ok := aggs["count_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.CountAsString)
- }
- if v, ok := aggs["min"]; ok && v != nil {
- json.Unmarshal(*v, &a.Min)
- }
- if v, ok := aggs["min_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.MinAsString)
- }
- if v, ok := aggs["max"]; ok && v != nil {
- json.Unmarshal(*v, &a.Max)
- }
- if v, ok := aggs["max_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.MaxAsString)
- }
- if v, ok := aggs["avg"]; ok && v != nil {
- json.Unmarshal(*v, &a.Avg)
- }
- if v, ok := aggs["avg_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.AvgAsString)
- }
- if v, ok := aggs["sum"]; ok && v != nil {
- json.Unmarshal(*v, &a.Sum)
- }
- if v, ok := aggs["sum_as_string"]; ok && v != nil {
- json.Unmarshal(*v, &a.SumAsString)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Pipeline percentiles
-
-// AggregationPipelinePercentilesMetric is the value returned by a pipeline
-// percentiles Metric aggregation
-type AggregationPipelinePercentilesMetric struct {
- Aggregations
-
- Values map[string]float64 // `json:"values"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationPipelinePercentilesMetric structure.
-func (a *AggregationPipelinePercentilesMetric) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["values"]; ok && v != nil {
- json.Unmarshal(*v, &a.Values)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// -- Composite key items --
-
-// AggregationBucketCompositeItems implements the response structure
-// for a bucket aggregation of type composite.
-type AggregationBucketCompositeItems struct {
- Aggregations
-
- Buckets []*AggregationBucketCompositeItem //`json:"buckets"`
- Meta map[string]interface{} // `json:"meta,omitempty"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItems structure.
-func (a *AggregationBucketCompositeItems) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- if err := json.Unmarshal(data, &aggs); err != nil {
- return err
- }
- if v, ok := aggs["buckets"]; ok && v != nil {
- json.Unmarshal(*v, &a.Buckets)
- }
- if v, ok := aggs["meta"]; ok && v != nil {
- json.Unmarshal(*v, &a.Meta)
- }
- a.Aggregations = aggs
- return nil
-}
-
-// AggregationBucketCompositeItem is a single bucket of an AggregationBucketCompositeItems structure.
-type AggregationBucketCompositeItem struct {
- Aggregations
-
- Key map[string]interface{} //`json:"key"`
- DocCount int64 //`json:"doc_count"`
-}
-
-// UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItem structure.
-func (a *AggregationBucketCompositeItem) UnmarshalJSON(data []byte) error {
- var aggs map[string]*json.RawMessage
- dec := json.NewDecoder(bytes.NewReader(data))
- dec.UseNumber()
- if err := dec.Decode(&aggs); err != nil {
- return err
- }
- if v, ok := aggs["key"]; ok && v != nil {
- json.Unmarshal(*v, &a.Key)
- }
- if v, ok := aggs["doc_count"]; ok && v != nil {
- json.Unmarshal(*v, &a.DocCount)
- }
- a.Aggregations = aggs
- return nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_children.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_children.go
deleted file mode 100644
index 08623a58e..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_children.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ChildrenAggregation is a special single bucket aggregation that enables
-// aggregating from buckets on parent document types to buckets on child documents.
-// It is available from 1.4.0.Beta1 upwards.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-children-aggregation.html
-type ChildrenAggregation struct {
- typ string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewChildrenAggregation() *ChildrenAggregation {
- return &ChildrenAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *ChildrenAggregation) Type(typ string) *ChildrenAggregation {
- a.typ = typ
- return a
-}
-
-func (a *ChildrenAggregation) SubAggregation(name string, subAggregation Aggregation) *ChildrenAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *ChildrenAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "to-answers" : {
- // "children": {
- // "type" : "answer"
- // }
- // }
- // }
- // }
- // This method returns only the { "type" : ... } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["children"] = opts
- opts["type"] = a.typ
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_children_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_children_test.go
deleted file mode 100644
index 0486079a9..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_children_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestChildrenAggregation(t *testing.T) {
- agg := NewChildrenAggregation().Type("answer")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"children":{"type":"answer"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestChildrenAggregationWithSubAggregation(t *testing.T) {
- subAgg := NewTermsAggregation().Field("owner.display_name").Size(10)
- agg := NewChildrenAggregation().Type("answer")
- agg = agg.SubAggregation("top-names", subAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"top-names":{"terms":{"field":"owner.display_name","size":10}}},"children":{"type":"answer"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_composite.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_composite.go
deleted file mode 100644
index 1d9132d2d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_composite.go
+++ /dev/null
@@ -1,498 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// CompositeAggregation is a multi-bucket values source based aggregation
-// that can be used to calculate unique composite values from source documents.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html
-// for details.
-type CompositeAggregation struct {
- after map[string]interface{}
- size *int
- sources []CompositeAggregationValuesSource
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-// NewCompositeAggregation creates a new CompositeAggregation.
-func NewCompositeAggregation() *CompositeAggregation {
- return &CompositeAggregation{
- sources: make([]CompositeAggregationValuesSource, 0),
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-// Size represents the number of composite buckets to return.
-// Defaults to 10 as of Elasticsearch 6.1.
-func (a *CompositeAggregation) Size(size int) *CompositeAggregation {
- a.size = &size
- return a
-}
-
-// AggregateAfter sets the values that indicate which composite bucket this
-// request should "aggregate after".
-func (a *CompositeAggregation) AggregateAfter(after map[string]interface{}) *CompositeAggregation {
- a.after = after
- return a
-}
-
-// Sources specifies the list of CompositeAggregationValuesSource instances to
-// use in the aggregation.
-func (a *CompositeAggregation) Sources(sources ...CompositeAggregationValuesSource) *CompositeAggregation {
- a.sources = append(a.sources, sources...)
- return a
-}
-
-// SubAggregations of this aggregation.
-func (a *CompositeAggregation) SubAggregation(name string, subAggregation Aggregation) *CompositeAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *CompositeAggregation) Meta(metaData map[string]interface{}) *CompositeAggregation {
- a.meta = metaData
- return a
-}
-
-// Source returns the serializable JSON for this aggregation.
-func (a *CompositeAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "my_composite_agg" : {
- // "composite" : {
- // "sources": [
- // {"my_term": { "terms": { "field": "product" }}},
- // {"my_histo": { "histogram": { "field": "price", "interval": 5 }}},
- // {"my_date": { "date_histogram": { "field": "timestamp", "interval": "1d" }}},
- // ],
- // "size" : 10,
- // "after" : ["a", 2, "c"]
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "histogram" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["composite"] = opts
-
- sources := make([]interface{}, len(a.sources))
- for i, s := range a.sources {
- src, err := s.Source()
- if err != nil {
- return nil, err
- }
- sources[i] = src
- }
- opts["sources"] = sources
-
- if a.size != nil {
- opts["size"] = *a.size
- }
-
- if a.after != nil {
- opts["after"] = a.after
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
-
-// -- Generic interface for CompositeAggregationValues --
-
-// CompositeAggregationValuesSource specifies the interface that
-// all implementations for CompositeAggregation's Sources method
-// need to implement.
-//
-// The different implementations are described in
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html#_values_source_2.
-type CompositeAggregationValuesSource interface {
- Source() (interface{}, error)
-}
-
-// -- CompositeAggregationTermsValuesSource --
-
-// CompositeAggregationTermsValuesSource is a source for the CompositeAggregation that handles terms
-// it works very similar to a terms aggregation with slightly different syntax
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html#_terms
-// for details.
-type CompositeAggregationTermsValuesSource struct {
- name string
- field string
- script *Script
- valueType string
- missing interface{}
- order string
-}
-
-// NewCompositeAggregationTermsValuesSource creates and initializes
-// a new CompositeAggregationTermsValuesSource.
-func NewCompositeAggregationTermsValuesSource(name string) *CompositeAggregationTermsValuesSource {
- return &CompositeAggregationTermsValuesSource{
- name: name,
- }
-}
-
-// Field to use for this source.
-func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource {
- a.field = field
- return a
-}
-
-// Script to use for this source.
-func (a *CompositeAggregationTermsValuesSource) Script(script *Script) *CompositeAggregationTermsValuesSource {
- a.script = script
- return a
-}
-
-// ValueType specifies the type of values produced by this source,
-// e.g. "string" or "date".
-func (a *CompositeAggregationTermsValuesSource) ValueType(valueType string) *CompositeAggregationTermsValuesSource {
- a.valueType = valueType
- return a
-}
-
-// Order specifies the order in the values produced by this source.
-// It can be either "asc" or "desc".
-func (a *CompositeAggregationTermsValuesSource) Order(order string) *CompositeAggregationTermsValuesSource {
- a.order = order
- return a
-}
-
-// Asc ensures the order of the values produced is ascending.
-func (a *CompositeAggregationTermsValuesSource) Asc() *CompositeAggregationTermsValuesSource {
- a.order = "asc"
- return a
-}
-
-// Desc ensures the order of the values produced is descending.
-func (a *CompositeAggregationTermsValuesSource) Desc() *CompositeAggregationTermsValuesSource {
- a.order = "desc"
- return a
-}
-
-// Missing specifies the value to use when the source finds a missing
-// value in a document.
-func (a *CompositeAggregationTermsValuesSource) Missing(missing interface{}) *CompositeAggregationTermsValuesSource {
- a.missing = missing
- return a
-}
-
-// Source returns the serializable JSON for this values source.
-func (a *CompositeAggregationTermsValuesSource) Source() (interface{}, error) {
- source := make(map[string]interface{})
- name := make(map[string]interface{})
- source[a.name] = name
- values := make(map[string]interface{})
- name["terms"] = values
-
- // field
- if a.field != "" {
- values["field"] = a.field
- }
-
- // script
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- values["script"] = src
- }
-
- // missing
- if a.missing != nil {
- values["missing"] = a.missing
- }
-
- // value_type
- if a.valueType != "" {
- values["value_type"] = a.valueType
- }
-
- // order
- if a.order != "" {
- values["order"] = a.order
- }
-
- return source, nil
-
-}
-
-// -- CompositeAggregationHistogramValuesSource --
-
-// CompositeAggregationHistogramValuesSource is a source for the CompositeAggregation that handles histograms
-// it works very similar to a terms histogram with slightly different syntax
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html#_histogram
-// for details.
-type CompositeAggregationHistogramValuesSource struct {
- name string
- field string
- script *Script
- valueType string
- missing interface{}
- order string
- interval float64
-}
-
-// NewCompositeAggregationHistogramValuesSource creates and initializes
-// a new CompositeAggregationHistogramValuesSource.
-func NewCompositeAggregationHistogramValuesSource(name string, interval float64) *CompositeAggregationHistogramValuesSource {
- return &CompositeAggregationHistogramValuesSource{
- name: name,
- interval: interval,
- }
-}
-
-// Field to use for this source.
-func (a *CompositeAggregationHistogramValuesSource) Field(field string) *CompositeAggregationHistogramValuesSource {
- a.field = field
- return a
-}
-
-// Script to use for this source.
-func (a *CompositeAggregationHistogramValuesSource) Script(script *Script) *CompositeAggregationHistogramValuesSource {
- a.script = script
- return a
-}
-
-// ValueType specifies the type of values produced by this source,
-// e.g. "string" or "date".
-func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource {
- a.valueType = valueType
- return a
-}
-
-// Missing specifies the value to use when the source finds a missing
-// value in a document.
-func (a *CompositeAggregationHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationHistogramValuesSource {
- a.missing = missing
- return a
-}
-
-// Order specifies the order in the values produced by this source.
-// It can be either "asc" or "desc".
-func (a *CompositeAggregationHistogramValuesSource) Order(order string) *CompositeAggregationHistogramValuesSource {
- a.order = order
- return a
-}
-
-// Asc ensures the order of the values produced is ascending.
-func (a *CompositeAggregationHistogramValuesSource) Asc() *CompositeAggregationHistogramValuesSource {
- a.order = "asc"
- return a
-}
-
-// Desc ensures the order of the values produced is descending.
-func (a *CompositeAggregationHistogramValuesSource) Desc() *CompositeAggregationHistogramValuesSource {
- a.order = "desc"
- return a
-}
-
-// Interval specifies the interval to use.
-func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource {
- a.interval = interval
- return a
-}
-
-// Source returns the serializable JSON for this values source.
-func (a *CompositeAggregationHistogramValuesSource) Source() (interface{}, error) {
- source := make(map[string]interface{})
- name := make(map[string]interface{})
- source[a.name] = name
- values := make(map[string]interface{})
- name["histogram"] = values
-
- // field
- if a.field != "" {
- values["field"] = a.field
- }
-
- // script
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- values["script"] = src
- }
-
- // missing
- if a.missing != nil {
- values["missing"] = a.missing
- }
-
- // value_type
- if a.valueType != "" {
- values["value_type"] = a.valueType
- }
-
- // order
- if a.order != "" {
- values["order"] = a.order
- }
-
- // Histogram-related properties
- values["interval"] = a.interval
-
- return source, nil
-
-}
-
-// -- CompositeAggregationDateHistogramValuesSource --
-
-// CompositeAggregationDateHistogramValuesSource is a source for the CompositeAggregation that handles date histograms
-// it works very similar to a date histogram aggregation with slightly different syntax
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-bucket-composite-aggregation.html#_date_histogram
-// for details.
-type CompositeAggregationDateHistogramValuesSource struct {
- name string
- field string
- script *Script
- valueType string
- missing interface{}
- order string
- interval interface{}
- timeZone string
-}
-
-// NewCompositeAggregationDateHistogramValuesSource creates and initializes
-// a new CompositeAggregationDateHistogramValuesSource.
-func NewCompositeAggregationDateHistogramValuesSource(name string, interval interface{}) *CompositeAggregationDateHistogramValuesSource {
- return &CompositeAggregationDateHistogramValuesSource{
- name: name,
- interval: interval,
- }
-}
-
-// Field to use for this source.
-func (a *CompositeAggregationDateHistogramValuesSource) Field(field string) *CompositeAggregationDateHistogramValuesSource {
- a.field = field
- return a
-}
-
-// Script to use for this source.
-func (a *CompositeAggregationDateHistogramValuesSource) Script(script *Script) *CompositeAggregationDateHistogramValuesSource {
- a.script = script
- return a
-}
-
-// ValueType specifies the type of values produced by this source,
-// e.g. "string" or "date".
-func (a *CompositeAggregationDateHistogramValuesSource) ValueType(valueType string) *CompositeAggregationDateHistogramValuesSource {
- a.valueType = valueType
- return a
-}
-
-// Missing specifies the value to use when the source finds a missing
-// value in a document.
-func (a *CompositeAggregationDateHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationDateHistogramValuesSource {
- a.missing = missing
- return a
-}
-
-// Order specifies the order in the values produced by this source.
-// It can be either "asc" or "desc".
-func (a *CompositeAggregationDateHistogramValuesSource) Order(order string) *CompositeAggregationDateHistogramValuesSource {
- a.order = order
- return a
-}
-
-// Asc ensures the order of the values produced is ascending.
-func (a *CompositeAggregationDateHistogramValuesSource) Asc() *CompositeAggregationDateHistogramValuesSource {
- a.order = "asc"
- return a
-}
-
-// Desc ensures the order of the values produced is descending.
-func (a *CompositeAggregationDateHistogramValuesSource) Desc() *CompositeAggregationDateHistogramValuesSource {
- a.order = "desc"
- return a
-}
-
-// Interval to use for the date histogram, e.g. "1d" or a numeric value like "60".
-func (a *CompositeAggregationDateHistogramValuesSource) Interval(interval interface{}) *CompositeAggregationDateHistogramValuesSource {
- a.interval = interval
- return a
-}
-
-// TimeZone to use for the dates.
-func (a *CompositeAggregationDateHistogramValuesSource) TimeZone(timeZone string) *CompositeAggregationDateHistogramValuesSource {
- a.timeZone = timeZone
- return a
-}
-
-// Source returns the serializable JSON for this values source.
-func (a *CompositeAggregationDateHistogramValuesSource) Source() (interface{}, error) {
- source := make(map[string]interface{})
- name := make(map[string]interface{})
- source[a.name] = name
- values := make(map[string]interface{})
- name["date_histogram"] = values
-
- // field
- if a.field != "" {
- values["field"] = a.field
- }
-
- // script
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- values["script"] = src
- }
-
- // missing
- if a.missing != nil {
- values["missing"] = a.missing
- }
-
- // value_type
- if a.valueType != "" {
- values["value_type"] = a.valueType
- }
-
- // order
- if a.order != "" {
- values["order"] = a.order
- }
-
- // DateHistogram-related properties
- values["interval"] = a.interval
-
- // timeZone
- if a.timeZone != "" {
- values["time_zone"] = a.timeZone
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_composite_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_composite_test.go
deleted file mode 100644
index 91d84dbdb..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_composite_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestCompositeAggregation(t *testing.T) {
- agg := NewCompositeAggregation().
- Sources(
- NewCompositeAggregationTermsValuesSource("my_terms").Field("a_term").Missing("N/A").Order("asc"),
- NewCompositeAggregationHistogramValuesSource("my_histogram", 5).Field("price").Asc(),
- NewCompositeAggregationDateHistogramValuesSource("my_date_histogram", "1d").Field("purchase_date").Desc(),
- ).
- Size(10).
- AggregateAfter(map[string]interface{}{
- "my_terms": "1",
- "my_histogram": 2,
- "my_date_histogram": "3",
- })
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"composite":{"after":{"my_date_histogram":"3","my_histogram":2,"my_terms":"1"},"size":10,"sources":[{"my_terms":{"terms":{"field":"a_term","missing":"N/A","order":"asc"}}},{"my_histogram":{"histogram":{"field":"price","interval":5,"order":"asc"}}},{"my_date_histogram":{"date_histogram":{"field":"purchase_date","interval":"1d","order":"desc"}}}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompositeAggregationTermsValuesSource(t *testing.T) {
- in := NewCompositeAggregationTermsValuesSource("products").
- Script(NewScript("doc['product'].value").Lang("painless"))
- src, err := in.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"products":{"terms":{"script":{"lang":"painless","source":"doc['product'].value"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompositeAggregationHistogramValuesSource(t *testing.T) {
- in := NewCompositeAggregationHistogramValuesSource("histo", 5).
- Field("price")
- src, err := in.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"histo":{"histogram":{"field":"price","interval":5}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompositeAggregationDateHistogramValuesSource(t *testing.T) {
- in := NewCompositeAggregationDateHistogramValuesSource("date", "1d").
- Field("timestamp")
- src, err := in.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date":{"date_histogram":{"field":"timestamp","interval":"1d"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_count_thresholds.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_count_thresholds.go
deleted file mode 100644
index 53efdaf5f..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_count_thresholds.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// BucketCountThresholds is used in e.g. terms and significant text aggregations.
-type BucketCountThresholds struct {
- MinDocCount *int64
- ShardMinDocCount *int64
- RequiredSize *int
- ShardSize *int
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram.go
deleted file mode 100644
index 1e7a1246c..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// DateHistogramAggregation is a multi-bucket aggregation similar to the
-// histogram except it can only be applied on date values.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-datehistogram-aggregation.html
-type DateHistogramAggregation struct {
- field string
- script *Script
- missing interface{}
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- interval string
- order string
- orderAsc bool
- minDocCount *int64
- extendedBoundsMin interface{}
- extendedBoundsMax interface{}
- timeZone string
- format string
- offset string
-}
-
-// NewDateHistogramAggregation creates a new DateHistogramAggregation.
-func NewDateHistogramAggregation() *DateHistogramAggregation {
- return &DateHistogramAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-// Field on which the aggregation is processed.
-func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation {
- a.field = field
- return a
-}
-
-func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation {
- a.script = script
- return a
-}
-
-// Missing configures the value to use when documents miss a value.
-func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation {
- a.missing = missing
- return a
-}
-
-func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation {
- a.meta = metaData
- return a
-}
-
-// Interval by which the aggregation gets processed.
-// Allowed values are: "year", "quarter", "month", "week", "day",
-// "hour", "minute". It also supports time settings like "1.5h"
-// (up to "w" for weeks).
-func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregation {
- a.interval = interval
- return a
-}
-
-// Order specifies the sort order. Valid values for order are:
-// "_key", "_count", a sub-aggregation name, or a sub-aggregation name
-// with a metric.
-func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation {
- a.order = order
- a.orderAsc = asc
- return a
-}
-
-func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation {
- // "order" : { "_count" : "asc" }
- a.order = "_count"
- a.orderAsc = asc
- return a
-}
-
-func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation {
- return a.OrderByCount(true)
-}
-
-func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation {
- return a.OrderByCount(false)
-}
-
-func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation {
- // "order" : { "_key" : "asc" }
- a.order = "_key"
- a.orderAsc = asc
- return a
-}
-
-func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation {
- return a.OrderByKey(true)
-}
-
-func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation {
- return a.OrderByKey(false)
-}
-
-// OrderByAggregation creates a bucket ordering strategy which sorts buckets
-// based on a single-valued calc get.
-func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "avg_height" : "desc" }
- // },
- // "aggs" : {
- // "avg_height" : { "avg" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = aggName
- a.orderAsc = asc
- return a
-}
-
-// OrderByAggregationAndMetric creates a bucket ordering strategy which
-// sorts buckets based on a multi-valued calc get.
-func (a *DateHistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *DateHistogramAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "height_stats.avg" : "desc" }
- // },
- // "aggs" : {
- // "height_stats" : { "stats" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = aggName + "." + metric
- a.orderAsc = asc
- return a
-}
-
-// MinDocCount sets the minimum document count per bucket.
-// Buckets with less documents than this min value will not be returned.
-func (a *DateHistogramAggregation) MinDocCount(minDocCount int64) *DateHistogramAggregation {
- a.minDocCount = &minDocCount
- return a
-}
-
-// TimeZone sets the timezone in which to translate dates before computing buckets.
-func (a *DateHistogramAggregation) TimeZone(timeZone string) *DateHistogramAggregation {
- a.timeZone = timeZone
- return a
-}
-
-// Format sets the format to use for dates.
-func (a *DateHistogramAggregation) Format(format string) *DateHistogramAggregation {
- a.format = format
- return a
-}
-
-// Offset sets the offset of time intervals in the histogram, e.g. "+6h".
-func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation {
- a.offset = offset
- return a
-}
-
-// ExtendedBounds accepts int, int64, string, or time.Time values.
-// In case the lower value in the histogram would be greater than min or the
-// upper value would be less than max, empty buckets will be generated.
-func (a *DateHistogramAggregation) ExtendedBounds(min, max interface{}) *DateHistogramAggregation {
- a.extendedBoundsMin = min
- a.extendedBoundsMax = max
- return a
-}
-
-// ExtendedBoundsMin accepts int, int64, string, or time.Time values.
-func (a *DateHistogramAggregation) ExtendedBoundsMin(min interface{}) *DateHistogramAggregation {
- a.extendedBoundsMin = min
- return a
-}
-
-// ExtendedBoundsMax accepts int, int64, string, or time.Time values.
-func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHistogramAggregation {
- a.extendedBoundsMax = max
- return a
-}
-
-func (a *DateHistogramAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "articles_over_time" : {
- // "date_histogram" : {
- // "field" : "date",
- // "interval" : "month"
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "date_histogram" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["date_histogram"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.missing != nil {
- opts["missing"] = a.missing
- }
-
- opts["interval"] = a.interval
- if a.minDocCount != nil {
- opts["min_doc_count"] = *a.minDocCount
- }
- if a.order != "" {
- o := make(map[string]interface{})
- if a.orderAsc {
- o[a.order] = "asc"
- } else {
- o[a.order] = "desc"
- }
- opts["order"] = o
- }
- if a.timeZone != "" {
- opts["time_zone"] = a.timeZone
- }
- if a.offset != "" {
- opts["offset"] = a.offset
- }
- if a.format != "" {
- opts["format"] = a.format
- }
- if a.extendedBoundsMin != nil || a.extendedBoundsMax != nil {
- bounds := make(map[string]interface{})
- if a.extendedBoundsMin != nil {
- bounds["min"] = a.extendedBoundsMin
- }
- if a.extendedBoundsMax != nil {
- bounds["max"] = a.extendedBoundsMax
- }
- opts["extended_bounds"] = bounds
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram_test.go
deleted file mode 100644
index ddf790834..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_histogram_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestDateHistogramAggregation(t *testing.T) {
- agg := NewDateHistogramAggregation().
- Field("date").
- Interval("month").
- Format("YYYY-MM").
- TimeZone("UTC").
- Offset("+6h")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_histogram":{"field":"date","format":"YYYY-MM","interval":"month","offset":"+6h","time_zone":"UTC"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateHistogramAggregationWithMissing(t *testing.T) {
- agg := NewDateHistogramAggregation().Field("date").Interval("year").Missing("1900")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_histogram":{"field":"date","interval":"year","missing":"1900"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
deleted file mode 100644
index 714fd3e11..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range.go
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "time"
-)
-
-// DateRangeAggregation is a range aggregation that is dedicated for
-// date values. The main difference between this aggregation and the
-// normal range aggregation is that the from and to values can be expressed
-// in Date Math expressions, and it is also possible to specify a
-// date format by which the from and to response fields will be returned.
-// Note that this aggregration includes the from value and excludes the to
-// value for each range.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-daterange-aggregation.html
-type DateRangeAggregation struct {
- field string
- script *Script
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- keyed *bool
- unmapped *bool
- timeZone string
- format string
- entries []DateRangeAggregationEntry
-}
-
-type DateRangeAggregationEntry struct {
- Key string
- From interface{}
- To interface{}
-}
-
-func NewDateRangeAggregation() *DateRangeAggregation {
- return &DateRangeAggregation{
- subAggregations: make(map[string]Aggregation),
- entries: make([]DateRangeAggregationEntry, 0),
- }
-}
-
-func (a *DateRangeAggregation) Field(field string) *DateRangeAggregation {
- a.field = field
- return a
-}
-
-func (a *DateRangeAggregation) Script(script *Script) *DateRangeAggregation {
- a.script = script
- return a
-}
-
-func (a *DateRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *DateRangeAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *DateRangeAggregation) Meta(metaData map[string]interface{}) *DateRangeAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *DateRangeAggregation) Keyed(keyed bool) *DateRangeAggregation {
- a.keyed = &keyed
- return a
-}
-
-func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation {
- a.unmapped = &unmapped
- return a
-}
-
-func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation {
- a.timeZone = timeZone
- return a
-}
-
-func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation {
- a.format = format
- return a
-}
-
-func (a *DateRangeAggregation) AddRange(from, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) AddRangeWithKey(key string, from, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) AddUnboundedTo(from interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: from, To: nil})
- return a
-}
-
-func (a *DateRangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: from, To: nil})
- return a
-}
-
-func (a *DateRangeAggregation) AddUnboundedFrom(to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: nil, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: nil, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) Lt(to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: nil, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) LtWithKey(key string, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: nil, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) Between(from, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) BetweenWithKey(key string, from, to interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *DateRangeAggregation) Gt(from interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{From: from, To: nil})
- return a
-}
-
-func (a *DateRangeAggregation) GtWithKey(key string, from interface{}) *DateRangeAggregation {
- a.entries = append(a.entries, DateRangeAggregationEntry{Key: key, From: from, To: nil})
- return a
-}
-
-func (a *DateRangeAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "range" : {
- // "date_range": {
- // "field": "date",
- // "format": "MM-yyy",
- // "ranges": [
- // { "to": "now-10M/M" },
- // { "from": "now-10M/M" }
- // ]
- // }
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "date_range" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["date_range"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
-
- if a.keyed != nil {
- opts["keyed"] = *a.keyed
- }
- if a.unmapped != nil {
- opts["unmapped"] = *a.unmapped
- }
- if a.timeZone != "" {
- opts["time_zone"] = a.timeZone
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- var ranges []interface{}
- for _, ent := range a.entries {
- r := make(map[string]interface{})
- if ent.Key != "" {
- r["key"] = ent.Key
- }
- if ent.From != nil {
- switch from := ent.From.(type) {
- case int, int16, int32, int64, float32, float64:
- r["from"] = from
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["from"] = from
- case time.Time:
- r["from"] = from.Format(time.RFC3339)
- case *time.Time:
- r["from"] = from.Format(time.RFC3339)
- case string:
- r["from"] = from
- case *string:
- r["from"] = from
- }
- }
- if ent.To != nil {
- switch to := ent.To.(type) {
- case int, int16, int32, int64, float32, float64:
- r["to"] = to
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["to"] = to
- case time.Time:
- r["to"] = to.Format(time.RFC3339)
- case *time.Time:
- r["to"] = to.Format(time.RFC3339)
- case string:
- r["to"] = to
- case *string:
- r["to"] = to
- }
- }
- ranges = append(ranges, r)
- }
- opts["ranges"] = ranges
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range_test.go
deleted file mode 100644
index 89ed495f3..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_date_range_test.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestDateRangeAggregation(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").TimeZone("UTC")
- agg = agg.AddRange(nil, "2012-12-31")
- agg = agg.AddRange("2013-01-01", "2013-12-31")
- agg = agg.AddRange("2014-01-01", nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","ranges":[{"to":"2012-12-31"},{"from":"2013-01-01","to":"2013-12-31"},{"from":"2014-01-01"}],"time_zone":"UTC"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithPointers(t *testing.T) {
- d1 := "2012-12-31"
- d2 := "2013-01-01"
- d3 := "2013-12-31"
- d4 := "2014-01-01"
-
- agg := NewDateRangeAggregation().Field("created_at")
- agg = agg.AddRange(nil, &d1)
- agg = agg.AddRange(d2, &d3)
- agg = agg.AddRange(d4, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","ranges":[{"to":"2012-12-31"},{"from":"2013-01-01","to":"2013-12-31"},{"from":"2014-01-01"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithUnbounded(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").
- AddUnboundedFrom("2012-12-31").
- AddRange("2013-01-01", "2013-12-31").
- AddUnboundedTo("2014-01-01")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","ranges":[{"to":"2012-12-31"},{"from":"2013-01-01","to":"2013-12-31"},{"from":"2014-01-01"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithLtAndCo(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").
- Lt("2012-12-31").
- Between("2013-01-01", "2013-12-31").
- Gt("2014-01-01")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","ranges":[{"to":"2012-12-31"},{"from":"2013-01-01","to":"2013-12-31"},{"from":"2014-01-01"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithKeyedFlag(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").
- Keyed(true).
- Lt("2012-12-31").
- Between("2013-01-01", "2013-12-31").
- Gt("2014-01-01")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","keyed":true,"ranges":[{"to":"2012-12-31"},{"from":"2013-01-01","to":"2013-12-31"},{"from":"2014-01-01"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithKeys(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").
- Keyed(true).
- LtWithKey("pre-2012", "2012-12-31").
- BetweenWithKey("2013", "2013-01-01", "2013-12-31").
- GtWithKey("post-2013", "2014-01-01")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","keyed":true,"ranges":[{"key":"pre-2012","to":"2012-12-31"},{"from":"2013-01-01","key":"2013","to":"2013-12-31"},{"from":"2014-01-01","key":"post-2013"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestDateRangeAggregationWithSpecialNames(t *testing.T) {
- agg := NewDateRangeAggregation().Field("created_at").
- AddRange("now-10M/M", "now+10M/M")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"date_range":{"field":"created_at","ranges":[{"from":"now-10M/M","to":"now+10M/M"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_filter.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_filter.go
deleted file mode 100644
index e4fbc67da..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_filter.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// FilterAggregation defines a single bucket of all the documents
-// in the current document set context that match a specified filter.
-// Often this will be used to narrow down the current aggregation context
-// to a specific set of documents.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-filter-aggregation.html
-type FilterAggregation struct {
- filter Query
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewFilterAggregation() *FilterAggregation {
- return &FilterAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *FilterAggregation) SubAggregation(name string, subAggregation Aggregation) *FilterAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *FilterAggregation) Filter(filter Query) *FilterAggregation {
- a.filter = filter
- return a
-}
-
-func (a *FilterAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "in_stock_products" : {
- // "filter" : { "range" : { "stock" : { "gt" : 0 } } }
- // }
- // }
- // }
- // This method returns only the { "filter" : {} } part.
-
- src, err := a.filter.Source()
- if err != nil {
- return nil, err
- }
- source := make(map[string]interface{})
- source["filter"] = src
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_filter_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_filter_test.go
deleted file mode 100644
index 6aa4fbb7c..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_filter_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestFilterAggregation(t *testing.T) {
- filter := NewRangeQuery("stock").Gt(0)
- agg := NewFilterAggregation().Filter(filter)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filter":{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFilterAggregationWithSubAggregation(t *testing.T) {
- avgPriceAgg := NewAvgAggregation().Field("price")
- filter := NewRangeQuery("stock").Gt(0)
- agg := NewFilterAggregation().Filter(filter).
- SubAggregation("avg_price", avgPriceAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_price":{"avg":{"field":"price"}}},"filter":{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFilterAggregationWithMeta(t *testing.T) {
- filter := NewRangeQuery("stock").Gt(0)
- agg := NewFilterAggregation().Filter(filter).Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filter":{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_filters.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_filters.go
deleted file mode 100644
index 0d128ca17..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_filters.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// FiltersAggregation defines a multi bucket aggregations where each bucket
-// is associated with a filter. Each bucket will collect all documents that
-// match its associated filter.
-//
-// Notice that the caller has to decide whether to add filters by name
-// (using FilterWithName) or unnamed filters (using Filter or Filters). One cannot
-// use both named and unnamed filters.
-//
-// For details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-filters-aggregation.html
-type FiltersAggregation struct {
- unnamedFilters []Query
- namedFilters map[string]Query
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-// NewFiltersAggregation initializes a new FiltersAggregation.
-func NewFiltersAggregation() *FiltersAggregation {
- return &FiltersAggregation{
- unnamedFilters: make([]Query, 0),
- namedFilters: make(map[string]Query),
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-// Filter adds an unnamed filter. Notice that you can
-// either use named or unnamed filters, but not both.
-func (a *FiltersAggregation) Filter(filter Query) *FiltersAggregation {
- a.unnamedFilters = append(a.unnamedFilters, filter)
- return a
-}
-
-// Filters adds one or more unnamed filters. Notice that you can
-// either use named or unnamed filters, but not both.
-func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation {
- if len(filters) > 0 {
- a.unnamedFilters = append(a.unnamedFilters, filters...)
- }
- return a
-}
-
-// FilterWithName adds a filter with a specific name. Notice that you can
-// either use named or unnamed filters, but not both.
-func (a *FiltersAggregation) FilterWithName(name string, filter Query) *FiltersAggregation {
- a.namedFilters[name] = filter
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *FiltersAggregation) SubAggregation(name string, subAggregation Aggregation) *FiltersAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *FiltersAggregation) Meta(metaData map[string]interface{}) *FiltersAggregation {
- a.meta = metaData
- return a
-}
-
-// Source returns the a JSON-serializable interface.
-// If the aggregation is invalid, an error is returned. This may e.g. happen
-// if you mixed named and unnamed filters.
-func (a *FiltersAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "messages" : {
- // "filters" : {
- // "filters" : {
- // "errors" : { "term" : { "body" : "error" }},
- // "warnings" : { "term" : { "body" : "warning" }}
- // }
- // }
- // }
- // }
- // }
- // This method returns only the (outer) { "filters" : {} } part.
-
- source := make(map[string]interface{})
- filters := make(map[string]interface{})
- source["filters"] = filters
-
- if len(a.unnamedFilters) > 0 && len(a.namedFilters) > 0 {
- return nil, errors.New("elastic: use either named or unnamed filters with FiltersAggregation but not both")
- }
-
- if len(a.unnamedFilters) > 0 {
- arr := make([]interface{}, len(a.unnamedFilters))
- for i, filter := range a.unnamedFilters {
- src, err := filter.Source()
- if err != nil {
- return nil, err
- }
- arr[i] = src
- }
- filters["filters"] = arr
- } else {
- dict := make(map[string]interface{})
- for key, filter := range a.namedFilters {
- src, err := filter.Source()
- if err != nil {
- return nil, err
- }
- dict[key] = src
- }
- filters["filters"] = dict
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_filters_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_filters_test.go
deleted file mode 100644
index 95cc8d7c3..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_filters_test.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestFiltersAggregationFilters(t *testing.T) {
- f1 := NewRangeQuery("stock").Gt(0)
- f2 := NewTermQuery("symbol", "GOOG")
- agg := NewFiltersAggregation().Filters(f1, f2)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filters":{"filters":[{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}},{"term":{"symbol":"GOOG"}}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFiltersAggregationFilterWithName(t *testing.T) {
- f1 := NewRangeQuery("stock").Gt(0)
- f2 := NewTermQuery("symbol", "GOOG")
- agg := NewFiltersAggregation().
- FilterWithName("f1", f1).
- FilterWithName("f2", f2)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filters":{"filters":{"f1":{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}},"f2":{"term":{"symbol":"GOOG"}}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFiltersAggregationWithKeyedAndNonKeyedFilters(t *testing.T) {
- agg := NewFiltersAggregation().
- Filter(NewTermQuery("symbol", "MSFT")). // unnamed
- FilterWithName("one", NewTermQuery("symbol", "GOOG")) // named filter
- _, err := agg.Source()
- if err == nil {
- t.Fatal("expected error, got nil")
- }
-}
-
-func TestFiltersAggregationWithSubAggregation(t *testing.T) {
- avgPriceAgg := NewAvgAggregation().Field("price")
- f1 := NewRangeQuery("stock").Gt(0)
- f2 := NewTermQuery("symbol", "GOOG")
- agg := NewFiltersAggregation().Filters(f1, f2).SubAggregation("avg_price", avgPriceAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_price":{"avg":{"field":"price"}}},"filters":{"filters":[{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}},{"term":{"symbol":"GOOG"}}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFiltersAggregationWithMetaData(t *testing.T) {
- f1 := NewRangeQuery("stock").Gt(0)
- f2 := NewTermQuery("symbol", "GOOG")
- agg := NewFiltersAggregation().Filters(f1, f2).Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filters":{"filters":[{"range":{"stock":{"from":0,"include_lower":false,"include_upper":true,"to":null}}},{"term":{"symbol":"GOOG"}}]},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance.go
deleted file mode 100644
index c082fb3f2..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance.go
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// GeoDistanceAggregation is a multi-bucket aggregation that works on geo_point fields
-// and conceptually works very similar to the range aggregation.
-// The user can define a point of origin and a set of distance range buckets.
-// The aggregation evaluate the distance of each document value from
-// the origin point and determines the buckets it belongs to based on
-// the ranges (a document belongs to a bucket if the distance between the
-// document and the origin falls within the distance range of the bucket).
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-geodistance-aggregation.html
-type GeoDistanceAggregation struct {
- field string
- unit string
- distanceType string
- point string
- ranges []geoDistAggRange
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-type geoDistAggRange struct {
- Key string
- From interface{}
- To interface{}
-}
-
-func NewGeoDistanceAggregation() *GeoDistanceAggregation {
- return &GeoDistanceAggregation{
- subAggregations: make(map[string]Aggregation),
- ranges: make([]geoDistAggRange, 0),
- }
-}
-
-func (a *GeoDistanceAggregation) Field(field string) *GeoDistanceAggregation {
- a.field = field
- return a
-}
-
-func (a *GeoDistanceAggregation) Unit(unit string) *GeoDistanceAggregation {
- a.unit = unit
- return a
-}
-
-func (a *GeoDistanceAggregation) DistanceType(distanceType string) *GeoDistanceAggregation {
- a.distanceType = distanceType
- return a
-}
-
-func (a *GeoDistanceAggregation) Point(latLon string) *GeoDistanceAggregation {
- a.point = latLon
- return a
-}
-
-func (a *GeoDistanceAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoDistanceAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *GeoDistanceAggregation) Meta(metaData map[string]interface{}) *GeoDistanceAggregation {
- a.meta = metaData
- return a
-}
-func (a *GeoDistanceAggregation) AddRange(from, to interface{}) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{From: from, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) AddRangeWithKey(key string, from, to interface{}) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{Key: key, From: from, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) AddUnboundedTo(from float64) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{From: from, To: nil})
- return a
-}
-
-func (a *GeoDistanceAggregation) AddUnboundedToWithKey(key string, from float64) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{Key: key, From: from, To: nil})
- return a
-}
-
-func (a *GeoDistanceAggregation) AddUnboundedFrom(to float64) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{From: nil, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) AddUnboundedFromWithKey(key string, to float64) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{Key: key, From: nil, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) Between(from, to interface{}) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{From: from, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) BetweenWithKey(key string, from, to interface{}) *GeoDistanceAggregation {
- a.ranges = append(a.ranges, geoDistAggRange{Key: key, From: from, To: to})
- return a
-}
-
-func (a *GeoDistanceAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "rings_around_amsterdam" : {
- // "geo_distance" : {
- // "field" : "location",
- // "origin" : "52.3760, 4.894",
- // "ranges" : [
- // { "to" : 100 },
- // { "from" : 100, "to" : 300 },
- // { "from" : 300 }
- // ]
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "range" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["geo_distance"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.unit != "" {
- opts["unit"] = a.unit
- }
- if a.distanceType != "" {
- opts["distance_type"] = a.distanceType
- }
- if a.point != "" {
- opts["origin"] = a.point
- }
-
- var ranges []interface{}
- for _, ent := range a.ranges {
- r := make(map[string]interface{})
- if ent.Key != "" {
- r["key"] = ent.Key
- }
- if ent.From != nil {
- switch from := ent.From.(type) {
- case int, int16, int32, int64, float32, float64:
- r["from"] = from
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["from"] = from
- case string:
- r["from"] = from
- case *string:
- r["from"] = from
- }
- }
- if ent.To != nil {
- switch to := ent.To.(type) {
- case int, int16, int32, int64, float32, float64:
- r["to"] = to
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["to"] = to
- case string:
- r["to"] = to
- case *string:
- r["to"] = to
- }
- }
- ranges = append(ranges, r)
- }
- opts["ranges"] = ranges
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance_test.go
deleted file mode 100644
index 3918b9dd2..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_geo_distance_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoDistanceAggregation(t *testing.T) {
- agg := NewGeoDistanceAggregation().Field("location").Point("52.3760, 4.894")
- agg = agg.AddRange(nil, 100)
- agg = agg.AddRange(100, 300)
- agg = agg.AddRange(300, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"field":"location","origin":"52.3760, 4.894","ranges":[{"to":100},{"from":100,"to":300},{"from":300}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceAggregationWithPointers(t *testing.T) {
- hundred := 100
- threeHundred := 300
- agg := NewGeoDistanceAggregation().Field("location").Point("52.3760, 4.894")
- agg = agg.AddRange(nil, &hundred)
- agg = agg.AddRange(hundred, &threeHundred)
- agg = agg.AddRange(threeHundred, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"field":"location","origin":"52.3760, 4.894","ranges":[{"to":100},{"from":100,"to":300},{"from":300}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceAggregationWithUnbounded(t *testing.T) {
- agg := NewGeoDistanceAggregation().Field("location").Point("52.3760, 4.894")
- agg = agg.AddUnboundedFrom(100)
- agg = agg.AddRange(100, 300)
- agg = agg.AddUnboundedTo(300)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"field":"location","origin":"52.3760, 4.894","ranges":[{"to":100},{"from":100,"to":300},{"from":300}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceAggregationWithMetaData(t *testing.T) {
- agg := NewGeoDistanceAggregation().Field("location").Point("52.3760, 4.894")
- agg = agg.AddRange(nil, 100)
- agg = agg.AddRange(100, 300)
- agg = agg.AddRange(300, nil)
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"field":"location","origin":"52.3760, 4.894","ranges":[{"to":100},{"from":100,"to":300},{"from":300}]},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid.go
deleted file mode 100644
index 07f61b331..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package elastic
-
-type GeoHashGridAggregation struct {
- field string
- precision int
- size int
- shardSize int
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewGeoHashGridAggregation() *GeoHashGridAggregation {
- return &GeoHashGridAggregation{
- subAggregations: make(map[string]Aggregation),
- precision: -1,
- size: -1,
- shardSize: -1,
- }
-}
-
-func (a *GeoHashGridAggregation) Field(field string) *GeoHashGridAggregation {
- a.field = field
- return a
-}
-
-func (a *GeoHashGridAggregation) Precision(precision int) *GeoHashGridAggregation {
- a.precision = precision
- return a
-}
-
-func (a *GeoHashGridAggregation) Size(size int) *GeoHashGridAggregation {
- a.size = size
- return a
-}
-
-func (a *GeoHashGridAggregation) ShardSize(shardSize int) *GeoHashGridAggregation {
- a.shardSize = shardSize
- return a
-}
-
-func (a *GeoHashGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoHashGridAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-func (a *GeoHashGridAggregation) Meta(metaData map[string]interface{}) *GeoHashGridAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *GeoHashGridAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs": {
- // "new_york": {
- // "geohash_grid": {
- // "field": "location",
- // "precision": 5
- // }
- // }
- // }
- // }
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["geohash_grid"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
-
- if a.precision != -1 {
- opts["precision"] = a.precision
- }
-
- if a.size != -1 {
- opts["size"] = a.size
- }
-
- if a.shardSize != -1 {
- opts["shard_size"] = a.shardSize
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid_test.go
deleted file mode 100644
index 044e211eb..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_geohash_grid_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoHashGridAggregation(t *testing.T) {
- agg := NewGeoHashGridAggregation().Field("location").Precision(5)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
-
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("Marshalling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geohash_grid":{"field":"location","precision":5}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoHashGridAggregationWithMetaData(t *testing.T) {
- agg := NewGeoHashGridAggregation().Field("location").Precision(5)
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
-
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("Marshalling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geohash_grid":{"field":"location","precision":5},"meta":{"name":"Oliver"}}`
-
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoHashGridAggregationWithSize(t *testing.T) {
- agg := NewGeoHashGridAggregation().Field("location").Precision(5).Size(5)
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
-
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("Marshalling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geohash_grid":{"field":"location","precision":5,"size":5},"meta":{"name":"Oliver"}}`
-
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoHashGridAggregationWithShardSize(t *testing.T) {
- agg := NewGeoHashGridAggregation().Field("location").Precision(5).ShardSize(5)
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
-
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("Marshalling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geohash_grid":{"field":"location","precision":5,"shard_size":5},"meta":{"name":"Oliver"}}`
-
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_global.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_global.go
deleted file mode 100644
index 4bf2a63f8..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_global.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// GlobalAggregation defines a single bucket of all the documents within
-// the search execution context. This context is defined by the indices
-// and the document types you’re searching on, but is not influenced
-// by the search query itself.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-global-aggregation.html
-type GlobalAggregation struct {
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewGlobalAggregation() *GlobalAggregation {
- return &GlobalAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *GlobalAggregation) SubAggregation(name string, subAggregation Aggregation) *GlobalAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *GlobalAggregation) Meta(metaData map[string]interface{}) *GlobalAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *GlobalAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "all_products" : {
- // "global" : {},
- // "aggs" : {
- // "avg_price" : { "avg" : { "field" : "price" } }
- // }
- // }
- // }
- // }
- // This method returns only the { "global" : {} } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["global"] = opts
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_global_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_global_test.go
deleted file mode 100644
index 5f1e5e6cb..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_global_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGlobalAggregation(t *testing.T) {
- agg := NewGlobalAggregation()
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"global":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGlobalAggregationWithMetaData(t *testing.T) {
- agg := NewGlobalAggregation().Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"global":{},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram.go
deleted file mode 100644
index 8b698cff5..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram.go
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// HistogramAggregation is a multi-bucket values source based aggregation
-// that can be applied on numeric values extracted from the documents.
-// It dynamically builds fixed size (a.k.a. interval) buckets over the
-// values.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-histogram-aggregation.html
-type HistogramAggregation struct {
- field string
- script *Script
- missing interface{}
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- interval float64
- order string
- orderAsc bool
- minDocCount *int64
- minBounds *float64
- maxBounds *float64
- offset *float64
-}
-
-func NewHistogramAggregation() *HistogramAggregation {
- return &HistogramAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *HistogramAggregation) Field(field string) *HistogramAggregation {
- a.field = field
- return a
-}
-
-func (a *HistogramAggregation) Script(script *Script) *HistogramAggregation {
- a.script = script
- return a
-}
-
-// Missing configures the value to use when documents miss a value.
-func (a *HistogramAggregation) Missing(missing interface{}) *HistogramAggregation {
- a.missing = missing
- return a
-}
-
-func (a *HistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *HistogramAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation {
- a.meta = metaData
- return a
-}
-
-// Interval for this builder, must be greater than 0.
-func (a *HistogramAggregation) Interval(interval float64) *HistogramAggregation {
- a.interval = interval
- return a
-}
-
-// Order specifies the sort order. Valid values for order are:
-// "_key", "_count", a sub-aggregation name, or a sub-aggregation name
-// with a metric.
-func (a *HistogramAggregation) Order(order string, asc bool) *HistogramAggregation {
- a.order = order
- a.orderAsc = asc
- return a
-}
-
-func (a *HistogramAggregation) OrderByCount(asc bool) *HistogramAggregation {
- // "order" : { "_count" : "asc" }
- a.order = "_count"
- a.orderAsc = asc
- return a
-}
-
-func (a *HistogramAggregation) OrderByCountAsc() *HistogramAggregation {
- return a.OrderByCount(true)
-}
-
-func (a *HistogramAggregation) OrderByCountDesc() *HistogramAggregation {
- return a.OrderByCount(false)
-}
-
-func (a *HistogramAggregation) OrderByKey(asc bool) *HistogramAggregation {
- // "order" : { "_key" : "asc" }
- a.order = "_key"
- a.orderAsc = asc
- return a
-}
-
-func (a *HistogramAggregation) OrderByKeyAsc() *HistogramAggregation {
- return a.OrderByKey(true)
-}
-
-func (a *HistogramAggregation) OrderByKeyDesc() *HistogramAggregation {
- return a.OrderByKey(false)
-}
-
-// OrderByAggregation creates a bucket ordering strategy which sorts buckets
-// based on a single-valued calc get.
-func (a *HistogramAggregation) OrderByAggregation(aggName string, asc bool) *HistogramAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "avg_height" : "desc" }
- // },
- // "aggs" : {
- // "avg_height" : { "avg" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = aggName
- a.orderAsc = asc
- return a
-}
-
-// OrderByAggregationAndMetric creates a bucket ordering strategy which
-// sorts buckets based on a multi-valued calc get.
-func (a *HistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *HistogramAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "height_stats.avg" : "desc" }
- // },
- // "aggs" : {
- // "height_stats" : { "stats" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = aggName + "." + metric
- a.orderAsc = asc
- return a
-}
-
-func (a *HistogramAggregation) MinDocCount(minDocCount int64) *HistogramAggregation {
- a.minDocCount = &minDocCount
- return a
-}
-
-func (a *HistogramAggregation) ExtendedBounds(min, max float64) *HistogramAggregation {
- a.minBounds = &min
- a.maxBounds = &max
- return a
-}
-
-func (a *HistogramAggregation) ExtendedBoundsMin(min float64) *HistogramAggregation {
- a.minBounds = &min
- return a
-}
-
-func (a *HistogramAggregation) MinBounds(min float64) *HistogramAggregation {
- a.minBounds = &min
- return a
-}
-
-func (a *HistogramAggregation) ExtendedBoundsMax(max float64) *HistogramAggregation {
- a.maxBounds = &max
- return a
-}
-
-func (a *HistogramAggregation) MaxBounds(max float64) *HistogramAggregation {
- a.maxBounds = &max
- return a
-}
-
-// Offset into the histogram
-func (a *HistogramAggregation) Offset(offset float64) *HistogramAggregation {
- a.offset = &offset
- return a
-}
-
-func (a *HistogramAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "prices" : {
- // "histogram" : {
- // "field" : "price",
- // "interval" : 50
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "histogram" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["histogram"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.missing != nil {
- opts["missing"] = a.missing
- }
-
- opts["interval"] = a.interval
- if a.order != "" {
- o := make(map[string]interface{})
- if a.orderAsc {
- o[a.order] = "asc"
- } else {
- o[a.order] = "desc"
- }
- opts["order"] = o
- }
- if a.offset != nil {
- opts["offset"] = *a.offset
- }
- if a.minDocCount != nil {
- opts["min_doc_count"] = *a.minDocCount
- }
- if a.minBounds != nil || a.maxBounds != nil {
- bounds := make(map[string]interface{})
- if a.minBounds != nil {
- bounds["min"] = a.minBounds
- }
- if a.maxBounds != nil {
- bounds["max"] = a.maxBounds
- }
- opts["extended_bounds"] = bounds
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram_test.go
deleted file mode 100644
index aeb7eec54..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_histogram_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestHistogramAggregation(t *testing.T) {
- agg := NewHistogramAggregation().Field("price").Interval(50)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"histogram":{"field":"price","interval":50}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHistogramAggregationWithMetaData(t *testing.T) {
- agg := NewHistogramAggregation().Field("price").Offset(10).Interval(50).Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"histogram":{"field":"price","interval":50,"offset":10},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHistogramAggregationWithMissing(t *testing.T) {
- agg := NewHistogramAggregation().Field("price").Interval(50).Missing("n/a")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"histogram":{"field":"price","interval":50,"missing":"n/a"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range.go
deleted file mode 100644
index 3615e29c3..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// IPRangeAggregation is a range aggregation that is dedicated for
-// IP addresses.
-//
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-iprange-aggregation.html
-type IPRangeAggregation struct {
- field string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- keyed *bool
- entries []IPRangeAggregationEntry
-}
-
-type IPRangeAggregationEntry struct {
- Key string
- Mask string
- From string
- To string
-}
-
-func NewIPRangeAggregation() *IPRangeAggregation {
- return &IPRangeAggregation{
- subAggregations: make(map[string]Aggregation),
- entries: make([]IPRangeAggregationEntry, 0),
- }
-}
-
-func (a *IPRangeAggregation) Field(field string) *IPRangeAggregation {
- a.field = field
- return a
-}
-
-func (a *IPRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *IPRangeAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *IPRangeAggregation) Meta(metaData map[string]interface{}) *IPRangeAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *IPRangeAggregation) Keyed(keyed bool) *IPRangeAggregation {
- a.keyed = &keyed
- return a
-}
-
-func (a *IPRangeAggregation) AddMaskRange(mask string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Mask: mask})
- return a
-}
-
-func (a *IPRangeAggregation) AddMaskRangeWithKey(key, mask string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, Mask: mask})
- return a
-}
-
-func (a *IPRangeAggregation) AddRange(from, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *IPRangeAggregation) AddRangeWithKey(key, from, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *IPRangeAggregation) AddUnboundedTo(from string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: from, To: ""})
- return a
-}
-
-func (a *IPRangeAggregation) AddUnboundedToWithKey(key, from string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: from, To: ""})
- return a
-}
-
-func (a *IPRangeAggregation) AddUnboundedFrom(to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: "", To: to})
- return a
-}
-
-func (a *IPRangeAggregation) AddUnboundedFromWithKey(key, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: "", To: to})
- return a
-}
-
-func (a *IPRangeAggregation) Lt(to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: "", To: to})
- return a
-}
-
-func (a *IPRangeAggregation) LtWithKey(key, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: "", To: to})
- return a
-}
-
-func (a *IPRangeAggregation) Between(from, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *IPRangeAggregation) BetweenWithKey(key, from, to string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *IPRangeAggregation) Gt(from string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{From: from, To: ""})
- return a
-}
-
-func (a *IPRangeAggregation) GtWithKey(key, from string) *IPRangeAggregation {
- a.entries = append(a.entries, IPRangeAggregationEntry{Key: key, From: from, To: ""})
- return a
-}
-
-func (a *IPRangeAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "range" : {
- // "ip_range": {
- // "field": "ip",
- // "ranges": [
- // { "to": "10.0.0.5" },
- // { "from": "10.0.0.5" }
- // ]
- // }
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "ip_range" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["ip_range"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
-
- if a.keyed != nil {
- opts["keyed"] = *a.keyed
- }
-
- var ranges []interface{}
- for _, ent := range a.entries {
- r := make(map[string]interface{})
- if ent.Key != "" {
- r["key"] = ent.Key
- }
- if ent.Mask != "" {
- r["mask"] = ent.Mask
- } else {
- if ent.From != "" {
- r["from"] = ent.From
- }
- if ent.To != "" {
- r["to"] = ent.To
- }
- }
- ranges = append(ranges, r)
- }
- opts["ranges"] = ranges
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range_test.go
deleted file mode 100644
index 7a2b49f4c..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_ip_range_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestIPRangeAggregation(t *testing.T) {
- agg := NewIPRangeAggregation().Field("remote_ip")
- agg = agg.AddRange("", "10.0.0.0")
- agg = agg.AddRange("10.1.0.0", "10.1.255.255")
- agg = agg.AddRange("10.2.0.0", "")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ip_range":{"field":"remote_ip","ranges":[{"to":"10.0.0.0"},{"from":"10.1.0.0","to":"10.1.255.255"},{"from":"10.2.0.0"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIPRangeAggregationMask(t *testing.T) {
- agg := NewIPRangeAggregation().Field("remote_ip")
- agg = agg.AddMaskRange("10.0.0.0/25")
- agg = agg.AddMaskRange("10.0.0.127/25")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ip_range":{"field":"remote_ip","ranges":[{"mask":"10.0.0.0/25"},{"mask":"10.0.0.127/25"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIPRangeAggregationWithKeyedFlag(t *testing.T) {
- agg := NewIPRangeAggregation().Field("remote_ip")
- agg = agg.Keyed(true)
- agg = agg.AddRange("", "10.0.0.0")
- agg = agg.AddRange("10.1.0.0", "10.1.255.255")
- agg = agg.AddRange("10.2.0.0", "")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ip_range":{"field":"remote_ip","keyed":true,"ranges":[{"to":"10.0.0.0"},{"from":"10.1.0.0","to":"10.1.255.255"},{"from":"10.2.0.0"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestIPRangeAggregationWithKeys(t *testing.T) {
- agg := NewIPRangeAggregation().Field("remote_ip")
- agg = agg.Keyed(true)
- agg = agg.LtWithKey("infinity", "10.0.0.5")
- agg = agg.GtWithKey("and-beyond", "10.0.0.5")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ip_range":{"field":"remote_ip","keyed":true,"ranges":[{"key":"infinity","to":"10.0.0.5"},{"from":"10.0.0.5","key":"and-beyond"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_missing.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_missing.go
deleted file mode 100644
index 7ba3cb636..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_missing.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MissingAggregation is a field data based single bucket aggregation,
-// that creates a bucket of all documents in the current document set context
-// that are missing a field value (effectively, missing a field or having
-// the configured NULL value set). This aggregator will often be used in
-// conjunction with other field data bucket aggregators (such as ranges)
-// to return information for all the documents that could not be placed
-// in any of the other buckets due to missing field data values.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-missing-aggregation.html
-type MissingAggregation struct {
- field string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewMissingAggregation() *MissingAggregation {
- return &MissingAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *MissingAggregation) Field(field string) *MissingAggregation {
- a.field = field
- return a
-}
-
-func (a *MissingAggregation) SubAggregation(name string, subAggregation Aggregation) *MissingAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *MissingAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "products_without_a_price" : {
- // "missing" : { "field" : "price" }
- // }
- // }
- // }
- // This method returns only the { "missing" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["missing"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_missing_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_missing_test.go
deleted file mode 100644
index 179c3084f..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_missing_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMissingAggregation(t *testing.T) {
- agg := NewMissingAggregation().Field("price")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"missing":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMissingAggregationWithMetaData(t *testing.T) {
- agg := NewMissingAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"missing":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_nested.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_nested.go
deleted file mode 100644
index 926d493a1..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_nested.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// NestedAggregation is a special single bucket aggregation that enables
-// aggregating nested documents.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-nested-aggregation.html
-type NestedAggregation struct {
- path string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewNestedAggregation() *NestedAggregation {
- return &NestedAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *NestedAggregation) SubAggregation(name string, subAggregation Aggregation) *NestedAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *NestedAggregation) Path(path string) *NestedAggregation {
- a.path = path
- return a
-}
-
-func (a *NestedAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "query" : {
- // "match" : { "name" : "led tv" }
- // }
- // "aggs" : {
- // "resellers" : {
- // "nested" : {
- // "path" : "resellers"
- // },
- // "aggs" : {
- // "min_price" : { "min" : { "field" : "resellers.price" } }
- // }
- // }
- // }
- // }
- // This method returns only the { "nested" : {} } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["nested"] = opts
-
- opts["path"] = a.path
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_nested_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_nested_test.go
deleted file mode 100644
index 219943e3d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_nested_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestNestedAggregation(t *testing.T) {
- agg := NewNestedAggregation().Path("resellers")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"nested":{"path":"resellers"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNestedAggregationWithSubAggregation(t *testing.T) {
- minPriceAgg := NewMinAggregation().Field("resellers.price")
- agg := NewNestedAggregation().Path("resellers").SubAggregation("min_price", minPriceAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"min_price":{"min":{"field":"resellers.price"}}},"nested":{"path":"resellers"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNestedAggregationWithMetaData(t *testing.T) {
- agg := NewNestedAggregation().Path("resellers").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"nested":{"path":"resellers"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_range.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_range.go
deleted file mode 100644
index 28c3df78e..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_range.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "time"
-)
-
-// RangeAggregation is a multi-bucket value source based aggregation that
-// enables the user to define a set of ranges - each representing a bucket.
-// During the aggregation process, the values extracted from each document
-// will be checked against each bucket range and "bucket" the
-// relevant/matching document. Note that this aggregration includes the
-// from value and excludes the to value for each range.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-range-aggregation.html
-type RangeAggregation struct {
- field string
- script *Script
- missing interface{}
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- keyed *bool
- unmapped *bool
- entries []rangeAggregationEntry
-}
-
-type rangeAggregationEntry struct {
- Key string
- From interface{}
- To interface{}
-}
-
-func NewRangeAggregation() *RangeAggregation {
- return &RangeAggregation{
- subAggregations: make(map[string]Aggregation),
- entries: make([]rangeAggregationEntry, 0),
- }
-}
-
-func (a *RangeAggregation) Field(field string) *RangeAggregation {
- a.field = field
- return a
-}
-
-func (a *RangeAggregation) Script(script *Script) *RangeAggregation {
- a.script = script
- return a
-}
-
-// Missing configures the value to use when documents miss a value.
-func (a *RangeAggregation) Missing(missing interface{}) *RangeAggregation {
- a.missing = missing
- return a
-}
-
-func (a *RangeAggregation) SubAggregation(name string, subAggregation Aggregation) *RangeAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *RangeAggregation) Meta(metaData map[string]interface{}) *RangeAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *RangeAggregation) Keyed(keyed bool) *RangeAggregation {
- a.keyed = &keyed
- return a
-}
-
-func (a *RangeAggregation) Unmapped(unmapped bool) *RangeAggregation {
- a.unmapped = &unmapped
- return a
-}
-
-func (a *RangeAggregation) AddRange(from, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *RangeAggregation) AddRangeWithKey(key string, from, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *RangeAggregation) AddUnboundedTo(from interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: from, To: nil})
- return a
-}
-
-func (a *RangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: from, To: nil})
- return a
-}
-
-func (a *RangeAggregation) AddUnboundedFrom(to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: nil, To: to})
- return a
-}
-
-func (a *RangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: nil, To: to})
- return a
-}
-
-func (a *RangeAggregation) Lt(to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: nil, To: to})
- return a
-}
-
-func (a *RangeAggregation) LtWithKey(key string, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: nil, To: to})
- return a
-}
-
-func (a *RangeAggregation) Between(from, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: from, To: to})
- return a
-}
-
-func (a *RangeAggregation) BetweenWithKey(key string, from, to interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: from, To: to})
- return a
-}
-
-func (a *RangeAggregation) Gt(from interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{From: from, To: nil})
- return a
-}
-
-func (a *RangeAggregation) GtWithKey(key string, from interface{}) *RangeAggregation {
- a.entries = append(a.entries, rangeAggregationEntry{Key: key, From: from, To: nil})
- return a
-}
-
-func (a *RangeAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "price_ranges" : {
- // "range" : {
- // "field" : "price",
- // "ranges" : [
- // { "to" : 50 },
- // { "from" : 50, "to" : 100 },
- // { "from" : 100 }
- // ]
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "range" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["range"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.missing != nil {
- opts["missing"] = a.missing
- }
-
- if a.keyed != nil {
- opts["keyed"] = *a.keyed
- }
- if a.unmapped != nil {
- opts["unmapped"] = *a.unmapped
- }
-
- var ranges []interface{}
- for _, ent := range a.entries {
- r := make(map[string]interface{})
- if ent.Key != "" {
- r["key"] = ent.Key
- }
- if ent.From != nil {
- switch from := ent.From.(type) {
- case int, int16, int32, int64, float32, float64:
- r["from"] = from
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["from"] = from
- case time.Time:
- r["from"] = from.Format(time.RFC3339)
- case *time.Time:
- r["from"] = from.Format(time.RFC3339)
- case string:
- r["from"] = from
- case *string:
- r["from"] = from
- }
- }
- if ent.To != nil {
- switch to := ent.To.(type) {
- case int, int16, int32, int64, float32, float64:
- r["to"] = to
- case *int, *int16, *int32, *int64, *float32, *float64:
- r["to"] = to
- case time.Time:
- r["to"] = to.Format(time.RFC3339)
- case *time.Time:
- r["to"] = to.Format(time.RFC3339)
- case string:
- r["to"] = to
- case *string:
- r["to"] = to
- }
- }
- ranges = append(ranges, r)
- }
- opts["ranges"] = ranges
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_range_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_range_test.go
deleted file mode 100644
index 17fbcecf3..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_range_test.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestRangeAggregation(t *testing.T) {
- agg := NewRangeAggregation().Field("price")
- agg = agg.AddRange(nil, 50)
- agg = agg.AddRange(50, 100)
- agg = agg.AddRange(100, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"price","ranges":[{"to":50},{"from":50,"to":100},{"from":100}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithPointers(t *testing.T) {
- fifty := 50
- hundred := 100
- agg := NewRangeAggregation().Field("price")
- agg = agg.AddRange(nil, &fifty)
- agg = agg.AddRange(fifty, &hundred)
- agg = agg.AddRange(hundred, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"price","ranges":[{"to":50},{"from":50,"to":100},{"from":100}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithUnbounded(t *testing.T) {
- agg := NewRangeAggregation().Field("field_name").
- AddUnboundedFrom(50).
- AddRange(20, 70).
- AddRange(70, 120).
- AddUnboundedTo(150)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"field_name","ranges":[{"to":50},{"from":20,"to":70},{"from":70,"to":120},{"from":150}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithLtAndCo(t *testing.T) {
- agg := NewRangeAggregation().Field("field_name").
- Lt(50).
- Between(20, 70).
- Between(70, 120).
- Gt(150)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"field_name","ranges":[{"to":50},{"from":20,"to":70},{"from":70,"to":120},{"from":150}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithKeyedFlag(t *testing.T) {
- agg := NewRangeAggregation().Field("field_name").
- Keyed(true).
- Lt(50).
- Between(20, 70).
- Between(70, 120).
- Gt(150)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"field_name","keyed":true,"ranges":[{"to":50},{"from":20,"to":70},{"from":70,"to":120},{"from":150}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithKeys(t *testing.T) {
- agg := NewRangeAggregation().Field("field_name").
- Keyed(true).
- LtWithKey("cheap", 50).
- BetweenWithKey("affordable", 20, 70).
- BetweenWithKey("average", 70, 120).
- GtWithKey("expensive", 150)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"field_name","keyed":true,"ranges":[{"key":"cheap","to":50},{"from":20,"key":"affordable","to":70},{"from":70,"key":"average","to":120},{"from":150,"key":"expensive"}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithMetaData(t *testing.T) {
- agg := NewRangeAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- agg = agg.AddRange(nil, 50)
- agg = agg.AddRange(50, 100)
- agg = agg.AddRange(100, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"range":{"field":"price","ranges":[{"to":50},{"from":50,"to":100},{"from":100}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeAggregationWithMissing(t *testing.T) {
- agg := NewRangeAggregation().Field("price").Missing(0)
- agg = agg.AddRange(nil, 50)
- agg = agg.AddRange(50, 100)
- agg = agg.AddRange(100, nil)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"field":"price","missing":0,"ranges":[{"to":50},{"from":50,"to":100},{"from":100}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested.go
deleted file mode 100644
index 9e4680195..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ReverseNestedAggregation defines a special single bucket aggregation
-// that enables aggregating on parent docs from nested documents.
-// Effectively this aggregation can break out of the nested block
-// structure and link to other nested structures or the root document,
-// which allows nesting other aggregations that aren’t part of
-// the nested object in a nested aggregation.
-//
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-reverse-nested-aggregation.html
-type ReverseNestedAggregation struct {
- path string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-// NewReverseNestedAggregation initializes a new ReverseNestedAggregation
-// bucket aggregation.
-func NewReverseNestedAggregation() *ReverseNestedAggregation {
- return &ReverseNestedAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-// Path set the path to use for this nested aggregation. The path must match
-// the path to a nested object in the mappings. If it is not specified
-// then this aggregation will go back to the root document.
-func (a *ReverseNestedAggregation) Path(path string) *ReverseNestedAggregation {
- a.path = path
- return a
-}
-
-func (a *ReverseNestedAggregation) SubAggregation(name string, subAggregation Aggregation) *ReverseNestedAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *ReverseNestedAggregation) Meta(metaData map[string]interface{}) *ReverseNestedAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *ReverseNestedAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "reverse_nested" : {
- // "path": "..."
- // }
- // }
- // }
- // This method returns only the { "reverse_nested" : {} } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["reverse_nested"] = opts
-
- if a.path != "" {
- opts["path"] = a.path
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested_test.go
deleted file mode 100644
index dc50bbc28..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_reverse_nested_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestReverseNestedAggregation(t *testing.T) {
- agg := NewReverseNestedAggregation()
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"reverse_nested":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestReverseNestedAggregationWithPath(t *testing.T) {
- agg := NewReverseNestedAggregation().Path("comments")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"reverse_nested":{"path":"comments"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestReverseNestedAggregationWithSubAggregation(t *testing.T) {
- avgPriceAgg := NewAvgAggregation().Field("price")
- agg := NewReverseNestedAggregation().
- Path("a_path").
- SubAggregation("avg_price", avgPriceAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_price":{"avg":{"field":"price"}}},"reverse_nested":{"path":"a_path"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestReverseNestedAggregationWithMeta(t *testing.T) {
- agg := NewReverseNestedAggregation().
- Path("a_path").
- Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"reverse_nested":{"path":"a_path"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler.go
deleted file mode 100644
index 0fd729dfd..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SamplerAggregation is a filtering aggregation used to limit any
-// sub aggregations' processing to a sample of the top-scoring documents.
-// Optionally, diversity settings can be used to limit the number of matches
-// that share a common value such as an "author".
-//
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-sampler-aggregation.html
-type SamplerAggregation struct {
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- shardSize int
- maxDocsPerValue int
- executionHint string
-}
-
-func NewSamplerAggregation() *SamplerAggregation {
- return &SamplerAggregation{
- shardSize: -1,
- maxDocsPerValue: -1,
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *SamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *SamplerAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SamplerAggregation) Meta(metaData map[string]interface{}) *SamplerAggregation {
- a.meta = metaData
- return a
-}
-
-// ShardSize sets the maximum number of docs returned from each shard.
-func (a *SamplerAggregation) ShardSize(shardSize int) *SamplerAggregation {
- a.shardSize = shardSize
- return a
-}
-
-func (a *SamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *SamplerAggregation {
- a.maxDocsPerValue = maxDocsPerValue
- return a
-}
-
-func (a *SamplerAggregation) ExecutionHint(hint string) *SamplerAggregation {
- a.executionHint = hint
- return a
-}
-
-func (a *SamplerAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "sample" : {
- // "sampler" : {
- // "shard_size" : 200
- // },
- // "aggs": {
- // "keywords": {
- // "significant_terms": {
- // "field": "text"
- // }
- // }
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "sampler" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["sampler"] = opts
-
- if a.shardSize >= 0 {
- opts["shard_size"] = a.shardSize
- }
- if a.maxDocsPerValue >= 0 {
- opts["max_docs_per_value"] = a.maxDocsPerValue
- }
- if a.executionHint != "" {
- opts["execution_hint"] = a.executionHint
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler_test.go
deleted file mode 100644
index c4dc1c7cc..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_sampler_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSamplerAggregation(t *testing.T) {
- keywordsAgg := NewSignificantTermsAggregation().Field("text")
- agg := NewSamplerAggregation().
- ShardSize(200).
- SubAggregation("keywords", keywordsAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"keywords":{"significant_terms":{"field":"text"}}},"sampler":{"shard_size":200}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms.go
deleted file mode 100644
index 571a91217..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms.go
+++ /dev/null
@@ -1,389 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SignificantTermsAggregation is an aggregation that returns interesting
-// or unusual occurrences of terms in a set.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html
-type SignificantTermsAggregation struct {
- field string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- minDocCount *int
- shardMinDocCount *int
- requiredSize *int
- shardSize *int
- filter Query
- executionHint string
- significanceHeuristic SignificanceHeuristic
-}
-
-func NewSignificantTermsAggregation() *SignificantTermsAggregation {
- return &SignificantTermsAggregation{
- subAggregations: make(map[string]Aggregation, 0),
- }
-}
-
-func (a *SignificantTermsAggregation) Field(field string) *SignificantTermsAggregation {
- a.field = field
- return a
-}
-
-func (a *SignificantTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTermsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SignificantTermsAggregation) Meta(metaData map[string]interface{}) *SignificantTermsAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *SignificantTermsAggregation) MinDocCount(minDocCount int) *SignificantTermsAggregation {
- a.minDocCount = &minDocCount
- return a
-}
-
-func (a *SignificantTermsAggregation) ShardMinDocCount(shardMinDocCount int) *SignificantTermsAggregation {
- a.shardMinDocCount = &shardMinDocCount
- return a
-}
-
-func (a *SignificantTermsAggregation) RequiredSize(requiredSize int) *SignificantTermsAggregation {
- a.requiredSize = &requiredSize
- return a
-}
-
-func (a *SignificantTermsAggregation) ShardSize(shardSize int) *SignificantTermsAggregation {
- a.shardSize = &shardSize
- return a
-}
-
-func (a *SignificantTermsAggregation) BackgroundFilter(filter Query) *SignificantTermsAggregation {
- a.filter = filter
- return a
-}
-
-func (a *SignificantTermsAggregation) ExecutionHint(hint string) *SignificantTermsAggregation {
- a.executionHint = hint
- return a
-}
-
-func (a *SignificantTermsAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTermsAggregation {
- a.significanceHeuristic = heuristic
- return a
-}
-
-func (a *SignificantTermsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "query" : {
- // "terms" : {"force" : [ "British Transport Police" ]}
- // },
- // "aggregations" : {
- // "significantCrimeTypes" : {
- // "significant_terms" : { "field" : "crime_type" }
- // }
- // }
- // }
- //
- // This method returns only the
- // { "significant_terms" : { "field" : "crime_type" }
- // part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["significant_terms"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.requiredSize != nil {
- opts["size"] = *a.requiredSize // not a typo!
- }
- if a.shardSize != nil {
- opts["shard_size"] = *a.shardSize
- }
- if a.minDocCount != nil {
- opts["min_doc_count"] = *a.minDocCount
- }
- if a.shardMinDocCount != nil {
- opts["shard_min_doc_count"] = *a.shardMinDocCount
- }
- if a.executionHint != "" {
- opts["execution_hint"] = a.executionHint
- }
- if a.filter != nil {
- src, err := a.filter.Source()
- if err != nil {
- return nil, err
- }
- opts["background_filter"] = src
- }
- if a.significanceHeuristic != nil {
- name := a.significanceHeuristic.Name()
- src, err := a.significanceHeuristic.Source()
- if err != nil {
- return nil, err
- }
- opts[name] = src
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
-
-// -- Significance heuristics --
-
-type SignificanceHeuristic interface {
- Name() string
- Source() (interface{}, error)
-}
-
-// -- Chi Square --
-
-// ChiSquareSignificanceHeuristic implements Chi square as described
-// in "Information Retrieval", Manning et al., Chapter 13.5.2.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_chi_square
-// for details.
-type ChiSquareSignificanceHeuristic struct {
- backgroundIsSuperset *bool
- includeNegatives *bool
-}
-
-// NewChiSquareSignificanceHeuristic initializes a new ChiSquareSignificanceHeuristic.
-func NewChiSquareSignificanceHeuristic() *ChiSquareSignificanceHeuristic {
- return &ChiSquareSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *ChiSquareSignificanceHeuristic) Name() string {
- return "chi_square"
-}
-
-// BackgroundIsSuperset indicates whether you defined a custom background
-// filter that represents a difference set of documents that you want to
-// compare to.
-func (sh *ChiSquareSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *ChiSquareSignificanceHeuristic {
- sh.backgroundIsSuperset = &backgroundIsSuperset
- return sh
-}
-
-// IncludeNegatives indicates whether to filter out the terms that appear
-// much less in the subset than in the background without the subset.
-func (sh *ChiSquareSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *ChiSquareSignificanceHeuristic {
- sh.includeNegatives = &includeNegatives
- return sh
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *ChiSquareSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if sh.backgroundIsSuperset != nil {
- source["background_is_superset"] = *sh.backgroundIsSuperset
- }
- if sh.includeNegatives != nil {
- source["include_negatives"] = *sh.includeNegatives
- }
- return source, nil
-}
-
-// -- GND --
-
-// GNDSignificanceHeuristic implements the "Google Normalized Distance"
-// as described in "The Google Similarity Distance", Cilibrasi and Vitanyi,
-// 2007.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_google_normalized_distance
-// for details.
-type GNDSignificanceHeuristic struct {
- backgroundIsSuperset *bool
-}
-
-// NewGNDSignificanceHeuristic implements a new GNDSignificanceHeuristic.
-func NewGNDSignificanceHeuristic() *GNDSignificanceHeuristic {
- return &GNDSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *GNDSignificanceHeuristic) Name() string {
- return "gnd"
-}
-
-// BackgroundIsSuperset indicates whether you defined a custom background
-// filter that represents a difference set of documents that you want to
-// compare to.
-func (sh *GNDSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *GNDSignificanceHeuristic {
- sh.backgroundIsSuperset = &backgroundIsSuperset
- return sh
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *GNDSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if sh.backgroundIsSuperset != nil {
- source["background_is_superset"] = *sh.backgroundIsSuperset
- }
- return source, nil
-}
-
-// -- JLH Score --
-
-// JLHScoreSignificanceHeuristic implements the JLH score as described in
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_jlh_score.
-type JLHScoreSignificanceHeuristic struct{}
-
-// NewJLHScoreSignificanceHeuristic initializes a new JLHScoreSignificanceHeuristic.
-func NewJLHScoreSignificanceHeuristic() *JLHScoreSignificanceHeuristic {
- return &JLHScoreSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *JLHScoreSignificanceHeuristic) Name() string {
- return "jlh"
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *JLHScoreSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- return source, nil
-}
-
-// -- Mutual Information --
-
-// MutualInformationSignificanceHeuristic implements Mutual information
-// as described in "Information Retrieval", Manning et al., Chapter 13.5.1.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_mutual_information
-// for details.
-type MutualInformationSignificanceHeuristic struct {
- backgroundIsSuperset *bool
- includeNegatives *bool
-}
-
-// NewMutualInformationSignificanceHeuristic initializes a new instance of
-// MutualInformationSignificanceHeuristic.
-func NewMutualInformationSignificanceHeuristic() *MutualInformationSignificanceHeuristic {
- return &MutualInformationSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *MutualInformationSignificanceHeuristic) Name() string {
- return "mutual_information"
-}
-
-// BackgroundIsSuperset indicates whether you defined a custom background
-// filter that represents a difference set of documents that you want to
-// compare to.
-func (sh *MutualInformationSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *MutualInformationSignificanceHeuristic {
- sh.backgroundIsSuperset = &backgroundIsSuperset
- return sh
-}
-
-// IncludeNegatives indicates whether to filter out the terms that appear
-// much less in the subset than in the background without the subset.
-func (sh *MutualInformationSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *MutualInformationSignificanceHeuristic {
- sh.includeNegatives = &includeNegatives
- return sh
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *MutualInformationSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if sh.backgroundIsSuperset != nil {
- source["background_is_superset"] = *sh.backgroundIsSuperset
- }
- if sh.includeNegatives != nil {
- source["include_negatives"] = *sh.includeNegatives
- }
- return source, nil
-}
-
-// -- Percentage Score --
-
-// PercentageScoreSignificanceHeuristic implements the algorithm described
-// in https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
-type PercentageScoreSignificanceHeuristic struct{}
-
-// NewPercentageScoreSignificanceHeuristic initializes a new instance of
-// PercentageScoreSignificanceHeuristic.
-func NewPercentageScoreSignificanceHeuristic() *PercentageScoreSignificanceHeuristic {
- return &PercentageScoreSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *PercentageScoreSignificanceHeuristic) Name() string {
- return "percentage"
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *PercentageScoreSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- return source, nil
-}
-
-// -- Script --
-
-// ScriptSignificanceHeuristic implements a scripted significance heuristic.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_scripted
-// for details.
-type ScriptSignificanceHeuristic struct {
- script *Script
-}
-
-// NewScriptSignificanceHeuristic initializes a new instance of
-// ScriptSignificanceHeuristic.
-func NewScriptSignificanceHeuristic() *ScriptSignificanceHeuristic {
- return &ScriptSignificanceHeuristic{}
-}
-
-// Name returns the name of the heuristic in the REST interface.
-func (sh *ScriptSignificanceHeuristic) Name() string {
- return "script_heuristic"
-}
-
-// Script specifies the script to use to get custom scores. The following
-// parameters are available in the script: `_subset_freq`, `_superset_freq`,
-// `_subset_size`, and `_superset_size`.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significantterms-aggregation.html#_scripted
-// for details.
-func (sh *ScriptSignificanceHeuristic) Script(script *Script) *ScriptSignificanceHeuristic {
- sh.script = script
- return sh
-}
-
-// Source returns the parameters that need to be added to the REST parameters.
-func (sh *ScriptSignificanceHeuristic) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if sh.script != nil {
- src, err := sh.script.Source()
- if err != nil {
- return nil, err
- }
- source["script"] = src
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms_test.go
deleted file mode 100644
index a5b269671..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_terms_test.go
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSignificantTermsAggregation(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithArgs(t *testing.T) {
- agg := NewSignificantTermsAggregation().
- Field("crime_type").
- ExecutionHint("map").
- ShardSize(5).
- MinDocCount(10).
- BackgroundFilter(NewTermQuery("city", "London"))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"background_filter":{"term":{"city":"London"}},"execution_hint":"map","field":"crime_type","min_doc_count":10,"shard_size":5}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationSubAggregation(t *testing.T) {
- crimeTypesAgg := NewSignificantTermsAggregation().Field("crime_type")
- agg := NewTermsAggregation().Field("force")
- agg = agg.SubAggregation("significantCrimeTypes", crimeTypesAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"significantCrimeTypes":{"significant_terms":{"field":"crime_type"}}},"terms":{"field":"force"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithMetaData(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"significant_terms":{"field":"crime_type"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithChiSquare(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewChiSquareSignificanceHeuristic().
- BackgroundIsSuperset(true).
- IncludeNegatives(false),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"chi_square":{"background_is_superset":true,"include_negatives":false},"field":"crime_type"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithGND(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewGNDSignificanceHeuristic(),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type","gnd":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithJLH(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewJLHScoreSignificanceHeuristic(),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type","jlh":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithMutualInformation(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewMutualInformationSignificanceHeuristic().
- BackgroundIsSuperset(false).
- IncludeNegatives(true),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type","mutual_information":{"background_is_superset":false,"include_negatives":true}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithPercentageScore(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewPercentageScoreSignificanceHeuristic(),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type","percentage":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTermsAggregationWithScript(t *testing.T) {
- agg := NewSignificantTermsAggregation().Field("crime_type")
- agg = agg.SignificanceHeuristic(
- NewScriptSignificanceHeuristic().
- Script(NewScript("_subset_freq/(_superset_freq - _subset_freq + 1)")),
- )
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_terms":{"field":"crime_type","script_heuristic":{"script":{"source":"_subset_freq/(_superset_freq - _subset_freq + 1)"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text.go
deleted file mode 100644
index de761613c..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SignificantTextAggregation returns interesting or unusual occurrences
-// of free-text terms in a set.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-significanttext-aggregation.html
-type SignificantTextAggregation struct {
- field string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- sourceFieldNames []string
- filterDuplicateText *bool
- includeExclude *TermsAggregationIncludeExclude
- filter Query
- bucketCountThresholds *BucketCountThresholds
- significanceHeuristic SignificanceHeuristic
-}
-
-func NewSignificantTextAggregation() *SignificantTextAggregation {
- return &SignificantTextAggregation{
- subAggregations: make(map[string]Aggregation, 0),
- }
-}
-
-func (a *SignificantTextAggregation) Field(field string) *SignificantTextAggregation {
- a.field = field
- return a
-}
-
-func (a *SignificantTextAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTextAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *SignificantTextAggregation) SourceFieldNames(names ...string) *SignificantTextAggregation {
- a.sourceFieldNames = names
- return a
-}
-
-func (a *SignificantTextAggregation) FilterDuplicateText(filter bool) *SignificantTextAggregation {
- a.filterDuplicateText = &filter
- return a
-}
-
-func (a *SignificantTextAggregation) MinDocCount(minDocCount int64) *SignificantTextAggregation {
- if a.bucketCountThresholds == nil {
- a.bucketCountThresholds = &BucketCountThresholds{}
- }
- a.bucketCountThresholds.MinDocCount = &minDocCount
- return a
-}
-
-func (a *SignificantTextAggregation) ShardMinDocCount(shardMinDocCount int64) *SignificantTextAggregation {
- if a.bucketCountThresholds == nil {
- a.bucketCountThresholds = &BucketCountThresholds{}
- }
- a.bucketCountThresholds.ShardMinDocCount = &shardMinDocCount
- return a
-}
-
-func (a *SignificantTextAggregation) Size(size int) *SignificantTextAggregation {
- if a.bucketCountThresholds == nil {
- a.bucketCountThresholds = &BucketCountThresholds{}
- }
- a.bucketCountThresholds.RequiredSize = &size
- return a
-}
-
-func (a *SignificantTextAggregation) ShardSize(shardSize int) *SignificantTextAggregation {
- if a.bucketCountThresholds == nil {
- a.bucketCountThresholds = &BucketCountThresholds{}
- }
- a.bucketCountThresholds.ShardSize = &shardSize
- return a
-}
-
-func (a *SignificantTextAggregation) BackgroundFilter(filter Query) *SignificantTextAggregation {
- a.filter = filter
- return a
-}
-
-func (a *SignificantTextAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTextAggregation {
- a.significanceHeuristic = heuristic
- return a
-}
-
-func (a *SignificantTextAggregation) Include(regexp string) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Include = regexp
- return a
-}
-
-func (a *SignificantTextAggregation) IncludeValues(values ...interface{}) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.IncludeValues = append(a.includeExclude.IncludeValues, values...)
- return a
-}
-
-func (a *SignificantTextAggregation) Exclude(regexp string) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Exclude = regexp
- return a
-}
-
-func (a *SignificantTextAggregation) ExcludeValues(values ...interface{}) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.ExcludeValues = append(a.includeExclude.ExcludeValues, values...)
- return a
-}
-
-func (a *SignificantTextAggregation) Partition(p int) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Partition = p
- return a
-}
-
-func (a *SignificantTextAggregation) NumPartitions(n int) *SignificantTextAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.NumPartitions = n
- return a
-}
-
-func (a *SignificantTextAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "query" : {
- // "match" : {"content" : "Bird flu"}
- // },
- // "aggregations" : {
- // "my_sample" : {
- // "sampler": {
- // "shard_size" : 100
- // },
- // "aggregations": {
- // "keywords" : {
- // "significant_text" : { "field" : "content" }
- // }
- // }
- // }
- // }
- // }
- //
- // This method returns only the
- // { "significant_text" : { "field" : "content" }
- // part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["significant_text"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.bucketCountThresholds != nil {
- if a.bucketCountThresholds.RequiredSize != nil {
- opts["size"] = (*a.bucketCountThresholds).RequiredSize
- }
- if a.bucketCountThresholds.ShardSize != nil {
- opts["shard_size"] = (*a.bucketCountThresholds).ShardSize
- }
- if a.bucketCountThresholds.MinDocCount != nil {
- opts["min_doc_count"] = (*a.bucketCountThresholds).MinDocCount
- }
- if a.bucketCountThresholds.ShardMinDocCount != nil {
- opts["shard_min_doc_count"] = (*a.bucketCountThresholds).ShardMinDocCount
- }
- }
- if a.filter != nil {
- src, err := a.filter.Source()
- if err != nil {
- return nil, err
- }
- opts["background_filter"] = src
- }
- if a.significanceHeuristic != nil {
- name := a.significanceHeuristic.Name()
- src, err := a.significanceHeuristic.Source()
- if err != nil {
- return nil, err
- }
- opts[name] = src
- }
- // Include/Exclude
- if ie := a.includeExclude; ie != nil {
- // Include
- if ie.Include != "" {
- opts["include"] = ie.Include
- } else if len(ie.IncludeValues) > 0 {
- opts["include"] = ie.IncludeValues
- } else if ie.NumPartitions > 0 {
- inc := make(map[string]interface{})
- inc["partition"] = ie.Partition
- inc["num_partitions"] = ie.NumPartitions
- opts["include"] = inc
- }
- // Exclude
- if ie.Exclude != "" {
- opts["exclude"] = ie.Exclude
- } else if len(ie.ExcludeValues) > 0 {
- opts["exclude"] = ie.ExcludeValues
- }
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text_test.go
deleted file mode 100644
index 53ac4461d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_significant_text_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSignificantTextAggregation(t *testing.T) {
- agg := NewSignificantTextAggregation().Field("content")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_text":{"field":"content"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTextAggregationWithArgs(t *testing.T) {
- agg := NewSignificantTextAggregation().
- Field("content").
- ShardSize(5).
- MinDocCount(10).
- BackgroundFilter(NewTermQuery("city", "London"))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"significant_text":{"background_filter":{"term":{"city":"London"}},"field":"content","min_doc_count":10,"shard_size":5}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSignificantTextAggregationWithMetaData(t *testing.T) {
- agg := NewSignificantTextAggregation().Field("content")
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"significant_text":{"field":"content"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_terms.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_terms.go
deleted file mode 100644
index 6bcc322d0..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_terms.go
+++ /dev/null
@@ -1,368 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermsAggregation is a multi-bucket value source based aggregation
-// where buckets are dynamically built - one per unique value.
-// See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html
-type TermsAggregation struct {
- field string
- script *Script
- missing interface{}
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-
- size *int
- shardSize *int
- requiredSize *int
- minDocCount *int
- shardMinDocCount *int
- valueType string
- includeExclude *TermsAggregationIncludeExclude
- executionHint string
- collectionMode string
- showTermDocCountError *bool
- order []TermsOrder
-}
-
-func NewTermsAggregation() *TermsAggregation {
- return &TermsAggregation{
- subAggregations: make(map[string]Aggregation, 0),
- }
-}
-
-func (a *TermsAggregation) Field(field string) *TermsAggregation {
- a.field = field
- return a
-}
-
-func (a *TermsAggregation) Script(script *Script) *TermsAggregation {
- a.script = script
- return a
-}
-
-// Missing configures the value to use when documents miss a value.
-func (a *TermsAggregation) Missing(missing interface{}) *TermsAggregation {
- a.missing = missing
- return a
-}
-
-func (a *TermsAggregation) SubAggregation(name string, subAggregation Aggregation) *TermsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *TermsAggregation) Size(size int) *TermsAggregation {
- a.size = &size
- return a
-}
-
-func (a *TermsAggregation) RequiredSize(requiredSize int) *TermsAggregation {
- a.requiredSize = &requiredSize
- return a
-}
-
-func (a *TermsAggregation) ShardSize(shardSize int) *TermsAggregation {
- a.shardSize = &shardSize
- return a
-}
-
-func (a *TermsAggregation) MinDocCount(minDocCount int) *TermsAggregation {
- a.minDocCount = &minDocCount
- return a
-}
-
-func (a *TermsAggregation) ShardMinDocCount(shardMinDocCount int) *TermsAggregation {
- a.shardMinDocCount = &shardMinDocCount
- return a
-}
-
-func (a *TermsAggregation) Include(regexp string) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Include = regexp
- return a
-}
-
-func (a *TermsAggregation) IncludeValues(values ...interface{}) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.IncludeValues = append(a.includeExclude.IncludeValues, values...)
- return a
-}
-
-func (a *TermsAggregation) Exclude(regexp string) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Exclude = regexp
- return a
-}
-
-func (a *TermsAggregation) ExcludeValues(values ...interface{}) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.ExcludeValues = append(a.includeExclude.ExcludeValues, values...)
- return a
-}
-
-func (a *TermsAggregation) Partition(p int) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.Partition = p
- return a
-}
-
-func (a *TermsAggregation) NumPartitions(n int) *TermsAggregation {
- if a.includeExclude == nil {
- a.includeExclude = &TermsAggregationIncludeExclude{}
- }
- a.includeExclude.NumPartitions = n
- return a
-}
-
-// ValueType can be string, long, or double.
-func (a *TermsAggregation) ValueType(valueType string) *TermsAggregation {
- a.valueType = valueType
- return a
-}
-
-func (a *TermsAggregation) Order(order string, asc bool) *TermsAggregation {
- a.order = append(a.order, TermsOrder{Field: order, Ascending: asc})
- return a
-}
-
-func (a *TermsAggregation) OrderByCount(asc bool) *TermsAggregation {
- // "order" : { "_count" : "asc" }
- a.order = append(a.order, TermsOrder{Field: "_count", Ascending: asc})
- return a
-}
-
-func (a *TermsAggregation) OrderByCountAsc() *TermsAggregation {
- return a.OrderByCount(true)
-}
-
-func (a *TermsAggregation) OrderByCountDesc() *TermsAggregation {
- return a.OrderByCount(false)
-}
-
-func (a *TermsAggregation) OrderByTerm(asc bool) *TermsAggregation {
- // "order" : { "_term" : "asc" }
- a.order = append(a.order, TermsOrder{Field: "_term", Ascending: asc})
- return a
-}
-
-func (a *TermsAggregation) OrderByTermAsc() *TermsAggregation {
- return a.OrderByTerm(true)
-}
-
-func (a *TermsAggregation) OrderByTermDesc() *TermsAggregation {
- return a.OrderByTerm(false)
-}
-
-// OrderByAggregation creates a bucket ordering strategy which sorts buckets
-// based on a single-valued calc get.
-func (a *TermsAggregation) OrderByAggregation(aggName string, asc bool) *TermsAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "avg_height" : "desc" }
- // },
- // "aggs" : {
- // "avg_height" : { "avg" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = append(a.order, TermsOrder{Field: aggName, Ascending: asc})
- return a
-}
-
-// OrderByAggregationAndMetric creates a bucket ordering strategy which
-// sorts buckets based on a multi-valued calc get.
-func (a *TermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *TermsAggregation {
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : {
- // "field" : "gender",
- // "order" : { "height_stats.avg" : "desc" }
- // },
- // "aggs" : {
- // "height_stats" : { "stats" : { "field" : "height" } }
- // }
- // }
- // }
- // }
- a.order = append(a.order, TermsOrder{Field: aggName + "." + metric, Ascending: asc})
- return a
-}
-
-func (a *TermsAggregation) ExecutionHint(hint string) *TermsAggregation {
- a.executionHint = hint
- return a
-}
-
-// Collection mode can be depth_first or breadth_first as of 1.4.0.
-func (a *TermsAggregation) CollectionMode(collectionMode string) *TermsAggregation {
- a.collectionMode = collectionMode
- return a
-}
-
-func (a *TermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *TermsAggregation {
- a.showTermDocCountError = &showTermDocCountError
- return a
-}
-
-func (a *TermsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "genders" : {
- // "terms" : { "field" : "gender" }
- // }
- // }
- // }
- // This method returns only the { "terms" : { "field" : "gender" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["terms"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.missing != nil {
- opts["missing"] = a.missing
- }
-
- // TermsBuilder
- if a.size != nil && *a.size >= 0 {
- opts["size"] = *a.size
- }
- if a.shardSize != nil && *a.shardSize >= 0 {
- opts["shard_size"] = *a.shardSize
- }
- if a.requiredSize != nil && *a.requiredSize >= 0 {
- opts["required_size"] = *a.requiredSize
- }
- if a.minDocCount != nil && *a.minDocCount >= 0 {
- opts["min_doc_count"] = *a.minDocCount
- }
- if a.shardMinDocCount != nil && *a.shardMinDocCount >= 0 {
- opts["shard_min_doc_count"] = *a.shardMinDocCount
- }
- if a.showTermDocCountError != nil {
- opts["show_term_doc_count_error"] = *a.showTermDocCountError
- }
- if a.collectionMode != "" {
- opts["collect_mode"] = a.collectionMode
- }
- if a.valueType != "" {
- opts["value_type"] = a.valueType
- }
- if len(a.order) > 0 {
- var orderSlice []interface{}
- for _, order := range a.order {
- src, err := order.Source()
- if err != nil {
- return nil, err
- }
- orderSlice = append(orderSlice, src)
- }
- opts["order"] = orderSlice
- }
- // Include/Exclude
- if ie := a.includeExclude; ie != nil {
- // Include
- if ie.Include != "" {
- opts["include"] = ie.Include
- } else if len(ie.IncludeValues) > 0 {
- opts["include"] = ie.IncludeValues
- } else if ie.NumPartitions > 0 {
- inc := make(map[string]interface{})
- inc["partition"] = ie.Partition
- inc["num_partitions"] = ie.NumPartitions
- opts["include"] = inc
- }
- // Exclude
- if ie.Exclude != "" {
- opts["exclude"] = ie.Exclude
- } else if len(ie.ExcludeValues) > 0 {
- opts["exclude"] = ie.ExcludeValues
- }
- }
-
- if a.executionHint != "" {
- opts["execution_hint"] = a.executionHint
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
-
-// TermsAggregationIncludeExclude allows for include/exclude in a TermsAggregation.
-type TermsAggregationIncludeExclude struct {
- Include string
- Exclude string
- IncludeValues []interface{}
- ExcludeValues []interface{}
- Partition int
- NumPartitions int
-}
-
-// TermsOrder specifies a single order field for a terms aggregation.
-type TermsOrder struct {
- Field string
- Ascending bool
-}
-
-// Source returns serializable JSON of the TermsOrder.
-func (order *TermsOrder) Source() (interface{}, error) {
- source := make(map[string]string)
- if order.Ascending {
- source[order.Field] = "asc"
- } else {
- source[order.Field] = "desc"
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_bucket_terms_test.go b/vendor/github.com/olivere/elastic/search_aggs_bucket_terms_test.go
deleted file mode 100644
index 351cbf63b..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_bucket_terms_test.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTermsAggregation(t *testing.T) {
- agg := NewTermsAggregation().Field("gender").Size(10).OrderByTermDesc()
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"field":"gender","order":[{"_term":"desc"}],"size":10}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithSubAggregation(t *testing.T) {
- subAgg := NewAvgAggregation().Field("height")
- agg := NewTermsAggregation().Field("gender").Size(10).
- OrderByAggregation("avg_height", false)
- agg = agg.SubAggregation("avg_height", subAgg)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_height":{"avg":{"field":"height"}}},"terms":{"field":"gender","order":[{"avg_height":"desc"}],"size":10}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithMultipleSubAggregation(t *testing.T) {
- subAgg1 := NewAvgAggregation().Field("height")
- subAgg2 := NewAvgAggregation().Field("width")
- agg := NewTermsAggregation().Field("gender").Size(10).
- OrderByAggregation("avg_height", false)
- agg = agg.SubAggregation("avg_height", subAgg1)
- agg = agg.SubAggregation("avg_width", subAgg2)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_height":{"avg":{"field":"height"}},"avg_width":{"avg":{"field":"width"}}},"terms":{"field":"gender","order":[{"avg_height":"desc"}],"size":10}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithMetaData(t *testing.T) {
- agg := NewTermsAggregation().Field("gender").Size(10).OrderByTermDesc()
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"terms":{"field":"gender","order":[{"_term":"desc"}],"size":10}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithMissing(t *testing.T) {
- agg := NewTermsAggregation().Field("gender").Size(10).Missing("n/a")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"field":"gender","missing":"n/a","size":10}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithIncludeExclude(t *testing.T) {
- agg := NewTermsAggregation().Field("tags").Include(".*sport.*").Exclude("water_.*")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"exclude":"water_.*","field":"tags","include":".*sport.*"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithIncludeExcludeValues(t *testing.T) {
- agg := NewTermsAggregation().Field("make").IncludeValues("mazda", "honda").ExcludeValues("rover", "jensen")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"exclude":["rover","jensen"],"field":"make","include":["mazda","honda"]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsAggregationWithPartitions(t *testing.T) {
- agg := NewTermsAggregation().Field("account_id").Partition(0).NumPartitions(20)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"field":"account_id","include":{"num_partitions":20,"partition":0}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_matrix_stats.go b/vendor/github.com/olivere/elastic/search_aggs_matrix_stats.go
deleted file mode 100644
index 785f392b6..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_matrix_stats.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatrixMatrixStatsAggregation ...
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-stats-aggregation.html
-// for details.
-type MatrixStatsAggregation struct {
- fields []string
- missing interface{}
- format string
- valueType interface{}
- mode string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-// NewMatrixStatsAggregation initializes a new MatrixStatsAggregation.
-func NewMatrixStatsAggregation() *MatrixStatsAggregation {
- return &MatrixStatsAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *MatrixStatsAggregation) Fields(fields ...string) *MatrixStatsAggregation {
- a.fields = append(a.fields, fields...)
- return a
-}
-
-// Missing configures the value to use when documents miss a value.
-func (a *MatrixStatsAggregation) Missing(missing interface{}) *MatrixStatsAggregation {
- a.missing = missing
- return a
-}
-
-// Mode specifies how to operate. Valid values are: sum, avg, median, min, or max.
-func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation {
- a.mode = mode
- return a
-}
-
-func (a *MatrixStatsAggregation) Format(format string) *MatrixStatsAggregation {
- a.format = format
- return a
-}
-
-func (a *MatrixStatsAggregation) ValueType(valueType interface{}) *MatrixStatsAggregation {
- a.valueType = valueType
- return a
-}
-
-func (a *MatrixStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *MatrixStatsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation {
- a.meta = metaData
- return a
-}
-
-// Source returns the JSON to serialize into the request, or an error.
-func (a *MatrixStatsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "matrixstats" : {
- // "matrix_stats" : {
- // "fields" : ["poverty", "income"],
- // "missing": {"income": 50000},
- // "mode": "avg",
- // ...
- // }
- // }
- // }
- // }
- // This method returns only the { "matrix_stats" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["matrix_stats"] = opts
-
- // MatrixStatsAggregationBuilder
- opts["fields"] = a.fields
- if a.missing != nil {
- opts["missing"] = a.missing
- }
- if a.format != "" {
- opts["format"] = a.format
- }
- if a.valueType != nil {
- opts["value_type"] = a.valueType
- }
- if a.mode != "" {
- opts["mode"] = a.mode
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_matrix_stats_test.go b/vendor/github.com/olivere/elastic/search_aggs_matrix_stats_test.go
deleted file mode 100644
index 28138fe02..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_matrix_stats_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatrixStatsAggregation(t *testing.T) {
- agg := NewMatrixStatsAggregation().
- Fields("poverty", "income").
- Missing(map[string]interface{}{
- "income": 50000,
- }).
- Mode("avg").
- Format("0000.0").
- ValueType("double")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"matrix_stats":{"fields":["poverty","income"],"format":"0000.0","missing":{"income":50000},"mode":"avg","value_type":"double"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMatrixStatsAggregationWithMetaData(t *testing.T) {
- agg := NewMatrixStatsAggregation().
- Fields("poverty", "income").
- Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"matrix_stats":{"fields":["poverty","income"]},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_avg.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_avg.go
deleted file mode 100644
index 2b764e065..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_avg.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// AvgAggregation is a single-value metrics aggregation that computes
-// the average of numeric values that are extracted from the
-// aggregated documents. These values can be extracted either from
-// specific numeric fields in the documents, or be generated by
-// a provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-avg-aggregation.html
-type AvgAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewAvgAggregation() *AvgAggregation {
- return &AvgAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *AvgAggregation) Field(field string) *AvgAggregation {
- a.field = field
- return a
-}
-
-func (a *AvgAggregation) Script(script *Script) *AvgAggregation {
- a.script = script
- return a
-}
-
-func (a *AvgAggregation) Format(format string) *AvgAggregation {
- a.format = format
- return a
-}
-
-func (a *AvgAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *AvgAggregation) Meta(metaData map[string]interface{}) *AvgAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *AvgAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "avg_grade" : { "avg" : { "field" : "grade" } }
- // }
- // }
- // This method returns only the { "avg" : { "field" : "grade" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["avg"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
-
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_avg_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_avg_test.go
deleted file mode 100644
index 784ff45dd..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_avg_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestAvgAggregation(t *testing.T) {
- agg := NewAvgAggregation().Field("grade")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"avg":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestAvgAggregationWithFormat(t *testing.T) {
- agg := NewAvgAggregation().Field("grade").Format("000.0")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"avg":{"field":"grade","format":"000.0"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestAvgAggregationWithMetaData(t *testing.T) {
- agg := NewAvgAggregation().Field("grade").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"avg":{"field":"grade"},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality.go
deleted file mode 100644
index 3b999c849..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// CardinalityAggregation is a single-value metrics aggregation that
-// calculates an approximate count of distinct values.
-// Values can be extracted either from specific fields in the document
-// or generated by a script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-cardinality-aggregation.html
-type CardinalityAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- precisionThreshold *int64
- rehash *bool
-}
-
-func NewCardinalityAggregation() *CardinalityAggregation {
- return &CardinalityAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *CardinalityAggregation) Field(field string) *CardinalityAggregation {
- a.field = field
- return a
-}
-
-func (a *CardinalityAggregation) Script(script *Script) *CardinalityAggregation {
- a.script = script
- return a
-}
-
-func (a *CardinalityAggregation) Format(format string) *CardinalityAggregation {
- a.format = format
- return a
-}
-
-func (a *CardinalityAggregation) SubAggregation(name string, subAggregation Aggregation) *CardinalityAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *CardinalityAggregation) Meta(metaData map[string]interface{}) *CardinalityAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *CardinalityAggregation) PrecisionThreshold(threshold int64) *CardinalityAggregation {
- a.precisionThreshold = &threshold
- return a
-}
-
-func (a *CardinalityAggregation) Rehash(rehash bool) *CardinalityAggregation {
- a.rehash = &rehash
- return a
-}
-
-func (a *CardinalityAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "author_count" : {
- // "cardinality" : { "field" : "author" }
- // }
- // }
- // }
- // This method returns only the "cardinality" : { "field" : "author" } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["cardinality"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
-
- if a.format != "" {
- opts["format"] = a.format
- }
- if a.precisionThreshold != nil {
- opts["precision_threshold"] = *a.precisionThreshold
- }
- if a.rehash != nil {
- opts["rehash"] = *a.rehash
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality_test.go
deleted file mode 100644
index b5f8490b5..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_cardinality_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestCardinalityAggregation(t *testing.T) {
- agg := NewCardinalityAggregation().Field("author.hash")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"cardinality":{"field":"author.hash"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCardinalityAggregationWithOptions(t *testing.T) {
- agg := NewCardinalityAggregation().Field("author.hash").PrecisionThreshold(100).Rehash(true)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"cardinality":{"field":"author.hash","precision_threshold":100,"rehash":true}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCardinalityAggregationWithFormat(t *testing.T) {
- agg := NewCardinalityAggregation().Field("author.hash").Format("00000")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"cardinality":{"field":"author.hash","format":"00000"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCardinalityAggregationWithMetaData(t *testing.T) {
- agg := NewCardinalityAggregation().Field("author.hash").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"cardinality":{"field":"author.hash"},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats.go
deleted file mode 100644
index 4e0bbe65a..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ExtendedExtendedStatsAggregation is a multi-value metrics aggregation that
-// computes stats over numeric values extracted from the aggregated documents.
-// These values can be extracted either from specific numeric fields
-// in the documents, or be generated by a provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-extendedstats-aggregation.html
-type ExtendedStatsAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewExtendedStatsAggregation() *ExtendedStatsAggregation {
- return &ExtendedStatsAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *ExtendedStatsAggregation) Field(field string) *ExtendedStatsAggregation {
- a.field = field
- return a
-}
-
-func (a *ExtendedStatsAggregation) Script(script *Script) *ExtendedStatsAggregation {
- a.script = script
- return a
-}
-
-func (a *ExtendedStatsAggregation) Format(format string) *ExtendedStatsAggregation {
- a.format = format
- return a
-}
-
-func (a *ExtendedStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *ExtendedStatsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *ExtendedStatsAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *ExtendedStatsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "grades_stats" : { "extended_stats" : { "field" : "grade" } }
- // }
- // }
- // This method returns only the { "extended_stats" : { "field" : "grade" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["extended_stats"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats_test.go
deleted file mode 100644
index 76489630d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_extended_stats_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestExtendedStatsAggregation(t *testing.T) {
- agg := NewExtendedStatsAggregation().Field("grade")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"extended_stats":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestExtendedStatsAggregationWithFormat(t *testing.T) {
- agg := NewExtendedStatsAggregation().Field("grade").Format("000.0")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"extended_stats":{"field":"grade","format":"000.0"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds.go
deleted file mode 100644
index 406f2d000..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// GeoBoundsAggregation is a metric aggregation that computes the
-// bounding box containing all geo_point values for a field.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-geobounds-aggregation.html
-type GeoBoundsAggregation struct {
- field string
- script *Script
- wrapLongitude *bool
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewGeoBoundsAggregation() *GeoBoundsAggregation {
- return &GeoBoundsAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *GeoBoundsAggregation) Field(field string) *GeoBoundsAggregation {
- a.field = field
- return a
-}
-
-func (a *GeoBoundsAggregation) Script(script *Script) *GeoBoundsAggregation {
- a.script = script
- return a
-}
-
-func (a *GeoBoundsAggregation) WrapLongitude(wrapLongitude bool) *GeoBoundsAggregation {
- a.wrapLongitude = &wrapLongitude
- return a
-}
-
-func (a *GeoBoundsAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoBoundsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *GeoBoundsAggregation) Meta(metaData map[string]interface{}) *GeoBoundsAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *GeoBoundsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "query" : {
- // "match" : { "business_type" : "shop" }
- // },
- // "aggs" : {
- // "viewport" : {
- // "geo_bounds" : {
- // "field" : "location"
- // "wrap_longitude" : "true"
- // }
- // }
- // }
- // }
- //
- // This method returns only the { "geo_bounds" : { ... } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["geo_bounds"] = opts
-
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.wrapLongitude != nil {
- opts["wrap_longitude"] = *a.wrapLongitude
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds_test.go
deleted file mode 100644
index ea713c604..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_geo_bounds_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoBoundsAggregation(t *testing.T) {
- agg := NewGeoBoundsAggregation().Field("location")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_bounds":{"field":"location"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoBoundsAggregationWithWrapLongitude(t *testing.T) {
- agg := NewGeoBoundsAggregation().Field("location").WrapLongitude(true)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_bounds":{"field":"location","wrap_longitude":true}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoBoundsAggregationWithMetaData(t *testing.T) {
- agg := NewGeoBoundsAggregation().Field("location").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_bounds":{"field":"location"},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_max.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_max.go
deleted file mode 100644
index acdfa14a8..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_max.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MaxAggregation is a single-value metrics aggregation that keeps track and
-// returns the maximum value among the numeric values extracted from
-// the aggregated documents. These values can be extracted either from
-// specific numeric fields in the documents, or be generated by
-// a provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-max-aggregation.html
-type MaxAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewMaxAggregation() *MaxAggregation {
- return &MaxAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *MaxAggregation) Field(field string) *MaxAggregation {
- a.field = field
- return a
-}
-
-func (a *MaxAggregation) Script(script *Script) *MaxAggregation {
- a.script = script
- return a
-}
-
-func (a *MaxAggregation) Format(format string) *MaxAggregation {
- a.format = format
- return a
-}
-
-func (a *MaxAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MaxAggregation) Meta(metaData map[string]interface{}) *MaxAggregation {
- a.meta = metaData
- return a
-}
-func (a *MaxAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "max_price" : { "max" : { "field" : "price" } }
- // }
- // }
- // This method returns only the { "max" : { "field" : "price" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["max"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_max_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_max_test.go
deleted file mode 100644
index 773cc2e4b..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_max_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMaxAggregation(t *testing.T) {
- agg := NewMaxAggregation().Field("price")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"max":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMaxAggregationWithFormat(t *testing.T) {
- agg := NewMaxAggregation().Field("price").Format("00000.00")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"max":{"field":"price","format":"00000.00"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMaxAggregationWithMetaData(t *testing.T) {
- agg := NewMaxAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"max":{"field":"price"},"meta":{"name":"Oliver"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_min.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_min.go
deleted file mode 100644
index af63585da..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_min.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MinAggregation is a single-value metrics aggregation that keeps track and
-// returns the minimum value among numeric values extracted from the
-// aggregated documents. These values can be extracted either from
-// specific numeric fields in the documents, or be generated by a
-// provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-min-aggregation.html
-type MinAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewMinAggregation() *MinAggregation {
- return &MinAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *MinAggregation) Field(field string) *MinAggregation {
- a.field = field
- return a
-}
-
-func (a *MinAggregation) Script(script *Script) *MinAggregation {
- a.script = script
- return a
-}
-
-func (a *MinAggregation) Format(format string) *MinAggregation {
- a.format = format
- return a
-}
-
-func (a *MinAggregation) SubAggregation(name string, subAggregation Aggregation) *MinAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MinAggregation) Meta(metaData map[string]interface{}) *MinAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *MinAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "min_price" : { "min" : { "field" : "price" } }
- // }
- // }
- // This method returns only the { "min" : { "field" : "price" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["min"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_min_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_min_test.go
deleted file mode 100644
index fcde3817c..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_min_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMinAggregation(t *testing.T) {
- agg := NewMinAggregation().Field("price")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"min":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMinAggregationWithFormat(t *testing.T) {
- agg := NewMinAggregation().Field("price").Format("00000.00")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"min":{"field":"price","format":"00000.00"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMinAggregationWithMetaData(t *testing.T) {
- agg := NewMinAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"min":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks.go
deleted file mode 100644
index 674fc41f9..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// PercentileRanksAggregation
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-percentile-rank-aggregation.html
-type PercentileRanksAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- values []float64
- compression *float64
- estimator string
-}
-
-func NewPercentileRanksAggregation() *PercentileRanksAggregation {
- return &PercentileRanksAggregation{
- subAggregations: make(map[string]Aggregation),
- values: make([]float64, 0),
- }
-}
-
-func (a *PercentileRanksAggregation) Field(field string) *PercentileRanksAggregation {
- a.field = field
- return a
-}
-
-func (a *PercentileRanksAggregation) Script(script *Script) *PercentileRanksAggregation {
- a.script = script
- return a
-}
-
-func (a *PercentileRanksAggregation) Format(format string) *PercentileRanksAggregation {
- a.format = format
- return a
-}
-
-func (a *PercentileRanksAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentileRanksAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *PercentileRanksAggregation) Meta(metaData map[string]interface{}) *PercentileRanksAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *PercentileRanksAggregation) Values(values ...float64) *PercentileRanksAggregation {
- a.values = append(a.values, values...)
- return a
-}
-
-func (a *PercentileRanksAggregation) Compression(compression float64) *PercentileRanksAggregation {
- a.compression = &compression
- return a
-}
-
-func (a *PercentileRanksAggregation) Estimator(estimator string) *PercentileRanksAggregation {
- a.estimator = estimator
- return a
-}
-
-func (a *PercentileRanksAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "load_time_outlier" : {
- // "percentile_ranks" : {
- // "field" : "load_time"
- // "values" : [15, 30]
- // }
- // }
- // }
- // }
- // This method returns only the
- // { "percentile_ranks" : { "field" : "load_time", "values" : [15, 30] } }
- // part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["percentile_ranks"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
- if len(a.values) > 0 {
- opts["values"] = a.values
- }
- if a.compression != nil {
- opts["compression"] = *a.compression
- }
- if a.estimator != "" {
- opts["estimator"] = a.estimator
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks_test.go
deleted file mode 100644
index a4bac02b5..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentile_ranks_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPercentileRanksAggregation(t *testing.T) {
- agg := NewPercentileRanksAggregation().Field("load_time")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentile_ranks":{"field":"load_time"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentileRanksAggregationWithCustomValues(t *testing.T) {
- agg := NewPercentileRanksAggregation().Field("load_time").Values(15, 30)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentile_ranks":{"field":"load_time","values":[15,30]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentileRanksAggregationWithFormat(t *testing.T) {
- agg := NewPercentileRanksAggregation().Field("load_time").Format("000.0")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentile_ranks":{"field":"load_time","format":"000.0"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentileRanksAggregationWithMetaData(t *testing.T) {
- agg := NewPercentileRanksAggregation().Field("load_time").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"percentile_ranks":{"field":"load_time"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles.go
deleted file mode 100644
index a1d78c8f2..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// PercentilesAggregation
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-percentile-aggregation.html
-type PercentilesAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- percentiles []float64
- compression *float64
- estimator string
-}
-
-func NewPercentilesAggregation() *PercentilesAggregation {
- return &PercentilesAggregation{
- subAggregations: make(map[string]Aggregation),
- percentiles: make([]float64, 0),
- }
-}
-
-func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation {
- a.field = field
- return a
-}
-
-func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation {
- a.script = script
- return a
-}
-
-func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation {
- a.format = format
- return a
-}
-
-func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation {
- a.percentiles = append(a.percentiles, percentiles...)
- return a
-}
-
-func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation {
- a.compression = &compression
- return a
-}
-
-func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation {
- a.estimator = estimator
- return a
-}
-
-func (a *PercentilesAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "load_time_outlier" : {
- // "percentiles" : {
- // "field" : "load_time"
- // }
- // }
- // }
- // }
- // This method returns only the
- // { "percentiles" : { "field" : "load_time" } }
- // part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["percentiles"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
- if len(a.percentiles) > 0 {
- opts["percents"] = a.percentiles
- }
- if a.compression != nil {
- opts["compression"] = *a.compression
- }
- if a.estimator != "" {
- opts["estimator"] = a.estimator
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles_test.go
deleted file mode 100644
index 93df1dd29..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_percentiles_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPercentilesAggregation(t *testing.T) {
- agg := NewPercentilesAggregation().Field("price")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentiles":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentilesAggregationWithCustomPercents(t *testing.T) {
- agg := NewPercentilesAggregation().Field("price").Percentiles(0.2, 0.5, 0.9)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentiles":{"field":"price","percents":[0.2,0.5,0.9]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentilesAggregationWithFormat(t *testing.T) {
- agg := NewPercentilesAggregation().Field("price").Format("00000.00")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentiles":{"field":"price","format":"00000.00"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentilesAggregationWithMetaData(t *testing.T) {
- agg := NewPercentilesAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"percentiles":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_stats.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_stats.go
deleted file mode 100644
index b9bbe7cff..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_stats.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// StatsAggregation is a multi-value metrics aggregation that computes stats
-// over numeric values extracted from the aggregated documents.
-// These values can be extracted either from specific numeric fields
-// in the documents, or be generated by a provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-stats-aggregation.html
-type StatsAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewStatsAggregation() *StatsAggregation {
- return &StatsAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *StatsAggregation) Field(field string) *StatsAggregation {
- a.field = field
- return a
-}
-
-func (a *StatsAggregation) Script(script *Script) *StatsAggregation {
- a.script = script
- return a
-}
-
-func (a *StatsAggregation) Format(format string) *StatsAggregation {
- a.format = format
- return a
-}
-
-func (a *StatsAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *StatsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "grades_stats" : { "stats" : { "field" : "grade" } }
- // }
- // }
- // This method returns only the { "stats" : { "field" : "grade" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["stats"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_stats_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_stats_test.go
deleted file mode 100644
index 5cff372d4..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_stats_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestStatsAggregation(t *testing.T) {
- agg := NewStatsAggregation().Field("grade")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"stats":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestStatsAggregationWithFormat(t *testing.T) {
- agg := NewStatsAggregation().Field("grade").Format("0000.0")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"stats":{"field":"grade","format":"0000.0"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestStatsAggregationWithMetaData(t *testing.T) {
- agg := NewStatsAggregation().Field("grade").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"stats":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_sum.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_sum.go
deleted file mode 100644
index e1c07c9c1..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_sum.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SumAggregation is a single-value metrics aggregation that sums up
-// numeric values that are extracted from the aggregated documents.
-// These values can be extracted either from specific numeric fields
-// in the documents, or be generated by a provided script.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-sum-aggregation.html
-type SumAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewSumAggregation() *SumAggregation {
- return &SumAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *SumAggregation) Field(field string) *SumAggregation {
- a.field = field
- return a
-}
-
-func (a *SumAggregation) Script(script *Script) *SumAggregation {
- a.script = script
- return a
-}
-
-func (a *SumAggregation) Format(format string) *SumAggregation {
- a.format = format
- return a
-}
-
-func (a *SumAggregation) SubAggregation(name string, subAggregation Aggregation) *SumAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *SumAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "intraday_return" : { "sum" : { "field" : "change" } }
- // }
- // }
- // This method returns only the { "sum" : { "field" : "change" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["sum"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_sum_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_sum_test.go
deleted file mode 100644
index ff0e42545..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_sum_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSumAggregation(t *testing.T) {
- agg := NewSumAggregation().Field("price")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"sum":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSumAggregationWithFormat(t *testing.T) {
- agg := NewSumAggregation().Field("price").Format("00000.00")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"sum":{"field":"price","format":"00000.00"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSumAggregationWithMetaData(t *testing.T) {
- agg := NewSumAggregation().Field("price").Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"sum":{"field":"price"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits.go
deleted file mode 100644
index 2b181895e..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TopHitsAggregation keeps track of the most relevant document
-// being aggregated. This aggregator is intended to be used as a
-// sub aggregator, so that the top matching documents
-// can be aggregated per bucket.
-//
-// It can effectively be used to group result sets by certain fields via
-// a bucket aggregator. One or more bucket aggregators determines by
-// which properties a result set get sliced into.
-//
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-top-hits-aggregation.html
-type TopHitsAggregation struct {
- searchSource *SearchSource
-}
-
-func NewTopHitsAggregation() *TopHitsAggregation {
- return &TopHitsAggregation{
- searchSource: NewSearchSource(),
- }
-}
-
-func (a *TopHitsAggregation) From(from int) *TopHitsAggregation {
- a.searchSource = a.searchSource.From(from)
- return a
-}
-
-func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation {
- a.searchSource = a.searchSource.Size(size)
- return a
-}
-
-func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation {
- a.searchSource = a.searchSource.TrackScores(trackScores)
- return a
-}
-
-func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation {
- a.searchSource = a.searchSource.Explain(explain)
- return a
-}
-
-func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation {
- a.searchSource = a.searchSource.Version(version)
- return a
-}
-
-func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation {
- a.searchSource = a.searchSource.NoStoredFields()
- return a
-}
-
-func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation {
- a.searchSource = a.searchSource.FetchSource(fetchSource)
- return a
-}
-
-func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation {
- a.searchSource = a.searchSource.FetchSourceContext(fetchSourceContext)
- return a
-}
-
-func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation {
- a.searchSource = a.searchSource.DocvalueFields(docvalueFields...)
- return a
-}
-
-func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation {
- a.searchSource = a.searchSource.DocvalueField(docvalueField)
- return a
-}
-
-func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation {
- a.searchSource = a.searchSource.ScriptFields(scriptFields...)
- return a
-}
-
-func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation {
- a.searchSource = a.searchSource.ScriptField(scriptField)
- return a
-}
-
-func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation {
- a.searchSource = a.searchSource.Sort(field, ascending)
- return a
-}
-
-func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation {
- a.searchSource = a.searchSource.SortWithInfo(info)
- return a
-}
-
-func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation {
- a.searchSource = a.searchSource.SortBy(sorter...)
- return a
-}
-
-func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation {
- a.searchSource = a.searchSource.Highlight(highlight)
- return a
-}
-
-func (a *TopHitsAggregation) Highlighter() *Highlight {
- return a.searchSource.Highlighter()
-}
-
-func (a *TopHitsAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs": {
- // "top_tag_hits": {
- // "top_hits": {
- // "sort": [
- // {
- // "last_activity_date": {
- // "order": "desc"
- // }
- // }
- // ],
- // "_source": {
- // "include": [
- // "title"
- // ]
- // },
- // "size" : 1
- // }
- // }
- // }
- // }
- // This method returns only the { "top_hits" : { ... } } part.
-
- source := make(map[string]interface{})
- src, err := a.searchSource.Source()
- if err != nil {
- return nil, err
- }
- source["top_hits"] = src
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits_test.go
deleted file mode 100644
index 861f079fe..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_top_hits_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTopHitsAggregation(t *testing.T) {
- fsc := NewFetchSourceContext(true).Include("title")
- agg := NewTopHitsAggregation().
- Sort("last_activity_date", false).
- FetchSourceContext(fsc).
- Size(1)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"top_hits":{"_source":{"includes":["title"]},"size":1,"sort":[{"last_activity_date":{"order":"desc"}}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count.go
deleted file mode 100644
index d56f1f873..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ValueCountAggregation is a single-value metrics aggregation that counts
-// the number of values that are extracted from the aggregated documents.
-// These values can be extracted either from specific fields in the documents,
-// or be generated by a provided script. Typically, this aggregator will be
-// used in conjunction with other single-value aggregations.
-// For example, when computing the avg one might be interested in the
-// number of values the average is computed over.
-// See: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-valuecount-aggregation.html
-type ValueCountAggregation struct {
- field string
- script *Script
- format string
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-func NewValueCountAggregation() *ValueCountAggregation {
- return &ValueCountAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-func (a *ValueCountAggregation) Field(field string) *ValueCountAggregation {
- a.field = field
- return a
-}
-
-func (a *ValueCountAggregation) Script(script *Script) *ValueCountAggregation {
- a.script = script
- return a
-}
-
-func (a *ValueCountAggregation) Format(format string) *ValueCountAggregation {
- a.format = format
- return a
-}
-
-func (a *ValueCountAggregation) SubAggregation(name string, subAggregation Aggregation) *ValueCountAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *ValueCountAggregation) Meta(metaData map[string]interface{}) *ValueCountAggregation {
- a.meta = metaData
- return a
-}
-
-func (a *ValueCountAggregation) Source() (interface{}, error) {
- // Example:
- // {
- // "aggs" : {
- // "grades_count" : { "value_count" : { "field" : "grade" } }
- // }
- // }
- // This method returns only the { "value_count" : { "field" : "grade" } } part.
-
- source := make(map[string]interface{})
- opts := make(map[string]interface{})
- source["value_count"] = opts
-
- // ValuesSourceAggregationBuilder
- if a.field != "" {
- opts["field"] = a.field
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- opts["script"] = src
- }
- if a.format != "" {
- opts["format"] = a.format
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count_test.go b/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count_test.go
deleted file mode 100644
index 18d2ba119..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_metrics_value_count_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestValueCountAggregation(t *testing.T) {
- agg := NewValueCountAggregation().Field("grade")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"value_count":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestValueCountAggregationWithFormat(t *testing.T) {
- // Format comes with 1.5.0+
- agg := NewValueCountAggregation().Field("grade").Format("0000.0")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"value_count":{"field":"grade","format":"0000.0"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestValueCountAggregationWithMetaData(t *testing.T) {
- agg := NewValueCountAggregation().Field("grade")
- agg = agg.Meta(map[string]interface{}{"name": "Oliver"})
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"meta":{"name":"Oliver"},"value_count":{"field":"grade"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket.go
deleted file mode 100644
index f37a9bdb8..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// AvgBucketAggregation is a sibling pipeline aggregation which calculates
-// the (mean) average value of a specified metric in a sibling aggregation.
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-avg-bucket-aggregation.html
-type AvgBucketAggregation struct {
- format string
- gapPolicy string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewAvgBucketAggregation creates and initializes a new AvgBucketAggregation.
-func NewAvgBucketAggregation() *AvgBucketAggregation {
- return &AvgBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *AvgBucketAggregation) GapPolicy(gapPolicy string) *AvgBucketAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *AvgBucketAggregation) GapInsertZeros() *AvgBucketAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *AvgBucketAggregation) GapSkip() *AvgBucketAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *AvgBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgBucketAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *AvgBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["avg_bucket"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket_test.go
deleted file mode 100644
index 019b8f1ad..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_avg_bucket_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestAvgBucketAggregation(t *testing.T) {
- agg := NewAvgBucketAggregation().BucketsPath("the_sum").GapPolicy("skip")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"avg_bucket":{"buckets_path":"the_sum","gap_policy":"skip"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script.go
deleted file mode 100644
index 34e356964..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// BucketScriptAggregation is a parent pipeline aggregation which executes
-// a script which can perform per bucket computations on specified metrics
-// in the parent multi-bucket aggregation. The specified metric must be
-// numeric and the script must return a numeric value.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-script-aggregation.html
-type BucketScriptAggregation struct {
- format string
- gapPolicy string
- script *Script
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPathsMap map[string]string
-}
-
-// NewBucketScriptAggregation creates and initializes a new BucketScriptAggregation.
-func NewBucketScriptAggregation() *BucketScriptAggregation {
- return &BucketScriptAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPathsMap: make(map[string]string),
- }
-}
-
-func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *BucketScriptAggregation) GapPolicy(gapPolicy string) *BucketScriptAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *BucketScriptAggregation) GapInsertZeros() *BucketScriptAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *BucketScriptAggregation) GapSkip() *BucketScriptAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// Script is the script to run.
-func (a *BucketScriptAggregation) Script(script *Script) *BucketScriptAggregation {
- a.script = script
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *BucketScriptAggregation) SubAggregation(name string, subAggregation Aggregation) *BucketScriptAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *BucketScriptAggregation) Meta(metaData map[string]interface{}) *BucketScriptAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
-func (a *BucketScriptAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketScriptAggregation {
- a.bucketsPathsMap = bucketsPathsMap
- return a
-}
-
-// AddBucketsPath adds a bucket path to use for this pipeline aggregator.
-func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScriptAggregation {
- if a.bucketsPathsMap == nil {
- a.bucketsPathsMap = make(map[string]string)
- }
- a.bucketsPathsMap[name] = path
- return a
-}
-
-func (a *BucketScriptAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["bucket_script"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- params["script"] = src
- }
-
- // Add buckets paths
- if len(a.bucketsPathsMap) > 0 {
- params["buckets_path"] = a.bucketsPathsMap
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script_test.go
deleted file mode 100644
index 3c101c706..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_script_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestBucketScriptAggregation(t *testing.T) {
- agg := NewBucketScriptAggregation().
- AddBucketsPath("tShirtSales", "t-shirts>sales").
- AddBucketsPath("totalSales", "total_sales").
- Script(NewScript("tShirtSales / totalSales * 100"))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"bucket_script":{"buckets_path":{"tShirtSales":"t-shirts\u003esales","totalSales":"total_sales"},"script":{"source":"tShirtSales / totalSales * 100"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector.go
deleted file mode 100644
index 233414d70..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// BucketSelectorAggregation is a parent pipeline aggregation which
-// determines whether the current bucket will be retained in the parent
-// multi-bucket aggregation. The specific metric must be numeric and
-// the script must return a boolean value. If the script language is
-// expression then a numeric return value is permitted. In this case 0.0
-// will be evaluated as false and all other values will evaluate to true.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-selector-aggregation.html
-type BucketSelectorAggregation struct {
- format string
- gapPolicy string
- script *Script
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPathsMap map[string]string
-}
-
-// NewBucketSelectorAggregation creates and initializes a new BucketSelectorAggregation.
-func NewBucketSelectorAggregation() *BucketSelectorAggregation {
- return &BucketSelectorAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPathsMap: make(map[string]string),
- }
-}
-
-func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *BucketSelectorAggregation) GapPolicy(gapPolicy string) *BucketSelectorAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *BucketSelectorAggregation) GapInsertZeros() *BucketSelectorAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *BucketSelectorAggregation) GapSkip() *BucketSelectorAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// Script is the script to run.
-func (a *BucketSelectorAggregation) Script(script *Script) *BucketSelectorAggregation {
- a.script = script
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *BucketSelectorAggregation) SubAggregation(name string, subAggregation Aggregation) *BucketSelectorAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *BucketSelectorAggregation) Meta(metaData map[string]interface{}) *BucketSelectorAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
-func (a *BucketSelectorAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketSelectorAggregation {
- a.bucketsPathsMap = bucketsPathsMap
- return a
-}
-
-// AddBucketsPath adds a bucket path to use for this pipeline aggregator.
-func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSelectorAggregation {
- if a.bucketsPathsMap == nil {
- a.bucketsPathsMap = make(map[string]string)
- }
- a.bucketsPathsMap[name] = path
- return a
-}
-
-func (a *BucketSelectorAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["bucket_selector"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
- if a.script != nil {
- src, err := a.script.Source()
- if err != nil {
- return nil, err
- }
- params["script"] = src
- }
-
- // Add buckets paths
- if len(a.bucketsPathsMap) > 0 {
- params["buckets_path"] = a.bucketsPathsMap
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector_test.go
deleted file mode 100644
index e378c2832..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_bucket_selector_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestBucketSelectorAggregation(t *testing.T) {
- agg := NewBucketSelectorAggregation().
- AddBucketsPath("totalSales", "total_sales").
- Script(NewScript("totalSales >= 1000"))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"bucket_selector":{"buckets_path":{"totalSales":"total_sales"},"script":{"source":"totalSales \u003e= 1000"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum.go
deleted file mode 100644
index 80a1db42d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// CumulativeSumAggregation is a parent pipeline aggregation which calculates
-// the cumulative sum of a specified metric in a parent histogram (or date_histogram)
-// aggregation. The specified metric must be numeric and the enclosing
-// histogram must have min_doc_count set to 0 (default for histogram aggregations).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
-type CumulativeSumAggregation struct {
- format string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewCumulativeSumAggregation creates and initializes a new CumulativeSumAggregation.
-func NewCumulativeSumAggregation() *CumulativeSumAggregation {
- return &CumulativeSumAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation {
- a.format = format
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *CumulativeSumAggregation) SubAggregation(name string, subAggregation Aggregation) *CumulativeSumAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *CumulativeSumAggregation) Meta(metaData map[string]interface{}) *CumulativeSumAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *CumulativeSumAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *CumulativeSumAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["cumulative_sum"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum_test.go
deleted file mode 100644
index 69a215d43..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_cumulative_sum_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestCumulativeSumAggregation(t *testing.T) {
- agg := NewCumulativeSumAggregation().BucketsPath("sales")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"cumulative_sum":{"buckets_path":"sales"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative.go
deleted file mode 100644
index ee7114e25..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// DerivativeAggregation is a parent pipeline aggregation which calculates
-// the derivative of a specified metric in a parent histogram (or date_histogram)
-// aggregation. The specified metric must be numeric and the enclosing
-// histogram must have min_doc_count set to 0 (default for histogram aggregations).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-derivative-aggregation.html
-type DerivativeAggregation struct {
- format string
- gapPolicy string
- unit string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewDerivativeAggregation creates and initializes a new DerivativeAggregation.
-func NewDerivativeAggregation() *DerivativeAggregation {
- return &DerivativeAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *DerivativeAggregation) GapPolicy(gapPolicy string) *DerivativeAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *DerivativeAggregation) GapInsertZeros() *DerivativeAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *DerivativeAggregation) GapSkip() *DerivativeAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// Unit sets the unit provided, e.g. "1d" or "1y".
-// It is only useful when calculating the derivative using a date_histogram.
-func (a *DerivativeAggregation) Unit(unit string) *DerivativeAggregation {
- a.unit = unit
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *DerivativeAggregation) SubAggregation(name string, subAggregation Aggregation) *DerivativeAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *DerivativeAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["derivative"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
- if a.unit != "" {
- params["unit"] = a.unit
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative_test.go
deleted file mode 100644
index 7e7b26749..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_derivative_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestDerivativeAggregation(t *testing.T) {
- agg := NewDerivativeAggregation().BucketsPath("sales")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"derivative":{"buckets_path":"sales"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket.go
deleted file mode 100644
index 5da049561..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MaxBucketAggregation is a sibling pipeline aggregation which identifies
-// the bucket(s) with the maximum value of a specified metric in a sibling
-// aggregation and outputs both the value and the key(s) of the bucket(s).
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-max-bucket-aggregation.html
-type MaxBucketAggregation struct {
- format string
- gapPolicy string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewMaxBucketAggregation creates and initializes a new MaxBucketAggregation.
-func NewMaxBucketAggregation() *MaxBucketAggregation {
- return &MaxBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *MaxBucketAggregation) GapPolicy(gapPolicy string) *MaxBucketAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *MaxBucketAggregation) GapInsertZeros() *MaxBucketAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *MaxBucketAggregation) GapSkip() *MaxBucketAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *MaxBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxBucketAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MaxBucketAggregation) Meta(metaData map[string]interface{}) *MaxBucketAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *MaxBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["max_bucket"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket_test.go
deleted file mode 100644
index aa9bf2f6d..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_max_bucket_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMaxBucketAggregation(t *testing.T) {
- agg := NewMaxBucketAggregation().BucketsPath("the_sum").GapPolicy("skip")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"max_bucket":{"buckets_path":"the_sum","gap_policy":"skip"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket.go
deleted file mode 100644
index 463bb919e..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MinBucketAggregation is a sibling pipeline aggregation which identifies
-// the bucket(s) with the maximum value of a specified metric in a sibling
-// aggregation and outputs both the value and the key(s) of the bucket(s).
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-min-bucket-aggregation.html
-type MinBucketAggregation struct {
- format string
- gapPolicy string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewMinBucketAggregation creates and initializes a new MinBucketAggregation.
-func NewMinBucketAggregation() *MinBucketAggregation {
- return &MinBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *MinBucketAggregation) GapPolicy(gapPolicy string) *MinBucketAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *MinBucketAggregation) GapInsertZeros() *MinBucketAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *MinBucketAggregation) GapSkip() *MinBucketAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *MinBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *MinBucketAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MinBucketAggregation) Meta(metaData map[string]interface{}) *MinBucketAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *MinBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["min_bucket"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket_test.go
deleted file mode 100644
index ff4abf2b2..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_min_bucket_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMinBucketAggregation(t *testing.T) {
- agg := NewMinBucketAggregation().BucketsPath("sales_per_month>sales").GapPolicy("skip")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"min_bucket":{"buckets_path":"sales_per_month\u003esales","gap_policy":"skip"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg.go
deleted file mode 100644
index 821d73842..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MovAvgAggregation operates on a series of data. It will slide a window
-// across the data and emit the average value of that window.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html
-type MovAvgAggregation struct {
- format string
- gapPolicy string
- model MovAvgModel
- window *int
- predict *int
- minimize *bool
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewMovAvgAggregation creates and initializes a new MovAvgAggregation.
-func NewMovAvgAggregation() *MovAvgAggregation {
- return &MovAvgAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *MovAvgAggregation) GapPolicy(gapPolicy string) *MovAvgAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *MovAvgAggregation) GapInsertZeros() *MovAvgAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *MovAvgAggregation) GapSkip() *MovAvgAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// Model is used to define what type of moving average you want to use
-// in the series.
-func (a *MovAvgAggregation) Model(model MovAvgModel) *MovAvgAggregation {
- a.model = model
- return a
-}
-
-// Window sets the window size for the moving average. This window will
-// "slide" across the series, and the values inside that window will
-// be used to calculate the moving avg value.
-func (a *MovAvgAggregation) Window(window int) *MovAvgAggregation {
- a.window = &window
- return a
-}
-
-// Predict sets the number of predictions that should be returned.
-// Each prediction will be spaced at the intervals in the histogram.
-// E.g. a predict of 2 will return two new buckets at the end of the
-// histogram with the predicted values.
-func (a *MovAvgAggregation) Predict(numPredictions int) *MovAvgAggregation {
- a.predict = &numPredictions
- return a
-}
-
-// Minimize determines if the model should be fit to the data using a
-// cost minimizing algorithm.
-func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation {
- a.minimize = &minimize
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *MovAvgAggregation) SubAggregation(name string, subAggregation Aggregation) *MovAvgAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *MovAvgAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["moving_avg"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
- if a.model != nil {
- params["model"] = a.model.Name()
- settings := a.model.Settings()
- if len(settings) > 0 {
- params["settings"] = settings
- }
- }
- if a.window != nil {
- params["window"] = *a.window
- }
- if a.predict != nil {
- params["predict"] = *a.predict
- }
- if a.minimize != nil {
- params["minimize"] = *a.minimize
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
-
-// -- Models for moving averages --
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_models
-
-// MovAvgModel specifies the model to use with the MovAvgAggregation.
-type MovAvgModel interface {
- Name() string
- Settings() map[string]interface{}
-}
-
-// -- EWMA --
-
-// EWMAMovAvgModel calculates an exponentially weighted moving average.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_ewma_exponentially_weighted
-type EWMAMovAvgModel struct {
- alpha *float64
-}
-
-// NewEWMAMovAvgModel creates and initializes a new EWMAMovAvgModel.
-func NewEWMAMovAvgModel() *EWMAMovAvgModel {
- return &EWMAMovAvgModel{}
-}
-
-// Alpha controls the smoothing of the data. Alpha = 1 retains no memory
-// of past values (e.g. a random walk), while alpha = 0 retains infinite
-// memory of past values (e.g. the series mean). Useful values are somewhere
-// in between. Defaults to 0.5.
-func (m *EWMAMovAvgModel) Alpha(alpha float64) *EWMAMovAvgModel {
- m.alpha = &alpha
- return m
-}
-
-// Name of the model.
-func (m *EWMAMovAvgModel) Name() string {
- return "ewma"
-}
-
-// Settings of the model.
-func (m *EWMAMovAvgModel) Settings() map[string]interface{} {
- settings := make(map[string]interface{})
- if m.alpha != nil {
- settings["alpha"] = *m.alpha
- }
- return settings
-}
-
-// -- Holt linear --
-
-// HoltLinearMovAvgModel calculates a doubly exponential weighted moving average.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_holt_linear
-type HoltLinearMovAvgModel struct {
- alpha *float64
- beta *float64
-}
-
-// NewHoltLinearMovAvgModel creates and initializes a new HoltLinearMovAvgModel.
-func NewHoltLinearMovAvgModel() *HoltLinearMovAvgModel {
- return &HoltLinearMovAvgModel{}
-}
-
-// Alpha controls the smoothing of the data. Alpha = 1 retains no memory
-// of past values (e.g. a random walk), while alpha = 0 retains infinite
-// memory of past values (e.g. the series mean). Useful values are somewhere
-// in between. Defaults to 0.5.
-func (m *HoltLinearMovAvgModel) Alpha(alpha float64) *HoltLinearMovAvgModel {
- m.alpha = &alpha
- return m
-}
-
-// Beta is equivalent to Alpha but controls the smoothing of the trend
-// instead of the data.
-func (m *HoltLinearMovAvgModel) Beta(beta float64) *HoltLinearMovAvgModel {
- m.beta = &beta
- return m
-}
-
-// Name of the model.
-func (m *HoltLinearMovAvgModel) Name() string {
- return "holt"
-}
-
-// Settings of the model.
-func (m *HoltLinearMovAvgModel) Settings() map[string]interface{} {
- settings := make(map[string]interface{})
- if m.alpha != nil {
- settings["alpha"] = *m.alpha
- }
- if m.beta != nil {
- settings["beta"] = *m.beta
- }
- return settings
-}
-
-// -- Holt Winters --
-
-// HoltWintersMovAvgModel calculates a triple exponential weighted moving average.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_holt_winters
-type HoltWintersMovAvgModel struct {
- alpha *float64
- beta *float64
- gamma *float64
- period *int
- seasonalityType string
- pad *bool
-}
-
-// NewHoltWintersMovAvgModel creates and initializes a new HoltWintersMovAvgModel.
-func NewHoltWintersMovAvgModel() *HoltWintersMovAvgModel {
- return &HoltWintersMovAvgModel{}
-}
-
-// Alpha controls the smoothing of the data. Alpha = 1 retains no memory
-// of past values (e.g. a random walk), while alpha = 0 retains infinite
-// memory of past values (e.g. the series mean). Useful values are somewhere
-// in between. Defaults to 0.5.
-func (m *HoltWintersMovAvgModel) Alpha(alpha float64) *HoltWintersMovAvgModel {
- m.alpha = &alpha
- return m
-}
-
-// Beta is equivalent to Alpha but controls the smoothing of the trend
-// instead of the data.
-func (m *HoltWintersMovAvgModel) Beta(beta float64) *HoltWintersMovAvgModel {
- m.beta = &beta
- return m
-}
-
-func (m *HoltWintersMovAvgModel) Gamma(gamma float64) *HoltWintersMovAvgModel {
- m.gamma = &gamma
- return m
-}
-
-func (m *HoltWintersMovAvgModel) Period(period int) *HoltWintersMovAvgModel {
- m.period = &period
- return m
-}
-
-func (m *HoltWintersMovAvgModel) SeasonalityType(typ string) *HoltWintersMovAvgModel {
- m.seasonalityType = typ
- return m
-}
-
-func (m *HoltWintersMovAvgModel) Pad(pad bool) *HoltWintersMovAvgModel {
- m.pad = &pad
- return m
-}
-
-// Name of the model.
-func (m *HoltWintersMovAvgModel) Name() string {
- return "holt_winters"
-}
-
-// Settings of the model.
-func (m *HoltWintersMovAvgModel) Settings() map[string]interface{} {
- settings := make(map[string]interface{})
- if m.alpha != nil {
- settings["alpha"] = *m.alpha
- }
- if m.beta != nil {
- settings["beta"] = *m.beta
- }
- if m.gamma != nil {
- settings["gamma"] = *m.gamma
- }
- if m.period != nil {
- settings["period"] = *m.period
- }
- if m.pad != nil {
- settings["pad"] = *m.pad
- }
- if m.seasonalityType != "" {
- settings["type"] = m.seasonalityType
- }
- return settings
-}
-
-// -- Linear --
-
-// LinearMovAvgModel calculates a linearly weighted moving average, such
-// that older values are linearly less important. "Time" is determined
-// by position in collection.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_linear
-type LinearMovAvgModel struct {
-}
-
-// NewLinearMovAvgModel creates and initializes a new LinearMovAvgModel.
-func NewLinearMovAvgModel() *LinearMovAvgModel {
- return &LinearMovAvgModel{}
-}
-
-// Name of the model.
-func (m *LinearMovAvgModel) Name() string {
- return "linear"
-}
-
-// Settings of the model.
-func (m *LinearMovAvgModel) Settings() map[string]interface{} {
- return nil
-}
-
-// -- Simple --
-
-// SimpleMovAvgModel calculates a simple unweighted (arithmetic) moving average.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html#_simple
-type SimpleMovAvgModel struct {
-}
-
-// NewSimpleMovAvgModel creates and initializes a new SimpleMovAvgModel.
-func NewSimpleMovAvgModel() *SimpleMovAvgModel {
- return &SimpleMovAvgModel{}
-}
-
-// Name of the model.
-func (m *SimpleMovAvgModel) Name() string {
- return "simple"
-}
-
-// Settings of the model.
-func (m *SimpleMovAvgModel) Settings() map[string]interface{} {
- return nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg_test.go
deleted file mode 100644
index af2fc7c27..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_mov_avg_test.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMovAvgAggregation(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithSimpleModel(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum").Window(30).Model(NewSimpleMovAvgModel())
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum","model":"simple","window":30}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithLinearModel(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum").Window(30).Model(NewLinearMovAvgModel())
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum","model":"linear","window":30}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithEWMAModel(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum").Window(30).Model(NewEWMAMovAvgModel().Alpha(0.5))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum","model":"ewma","settings":{"alpha":0.5},"window":30}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithHoltLinearModel(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum").Window(30).
- Model(NewHoltLinearMovAvgModel().Alpha(0.5).Beta(0.4))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum","model":"holt","settings":{"alpha":0.5,"beta":0.4},"window":30}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithHoltWintersModel(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum").Window(30).Predict(10).Minimize(true).
- Model(NewHoltWintersMovAvgModel().Alpha(0.5).Beta(0.4).Gamma(0.3).Period(7).Pad(true))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"moving_avg":{"buckets_path":"the_sum","minimize":true,"model":"holt_winters","predict":10,"settings":{"alpha":0.5,"beta":0.4,"gamma":0.3,"pad":true,"period":7},"window":30}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMovAvgAggregationWithSubAggs(t *testing.T) {
- agg := NewMovAvgAggregation().BucketsPath("the_sum")
- agg = agg.SubAggregation("avg_sum", NewAvgAggregation().Field("height"))
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"aggregations":{"avg_sum":{"avg":{"field":"height"}}},"moving_avg":{"buckets_path":"the_sum"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket.go
deleted file mode 100644
index 9a3556269..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2012-2015 Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// PercentilesBucketAggregation is a sibling pipeline aggregation which calculates
-// percentiles across all bucket of a specified metric in a sibling aggregation.
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
-type PercentilesBucketAggregation struct {
- format string
- gapPolicy string
- percents []float64
- bucketsPaths []string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
-}
-
-// NewPercentilesBucketAggregation creates and initializes a new PercentilesBucketAggregation.
-func NewPercentilesBucketAggregation() *PercentilesBucketAggregation {
- return &PercentilesBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- }
-}
-
-// Format to apply the output value of this aggregation.
-func (p *PercentilesBucketAggregation) Format(format string) *PercentilesBucketAggregation {
- p.format = format
- return p
-}
-
-// Percents to calculate percentiles for in this aggregation.
-func (p *PercentilesBucketAggregation) Percents(percents ...float64) *PercentilesBucketAggregation {
- p.percents = percents
- return p
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (p *PercentilesBucketAggregation) GapPolicy(gapPolicy string) *PercentilesBucketAggregation {
- p.gapPolicy = gapPolicy
- return p
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (p *PercentilesBucketAggregation) GapInsertZeros() *PercentilesBucketAggregation {
- p.gapPolicy = "insert_zeros"
- return p
-}
-
-// GapSkip skips gaps in the series.
-func (p *PercentilesBucketAggregation) GapSkip() *PercentilesBucketAggregation {
- p.gapPolicy = "skip"
- return p
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (p *PercentilesBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesBucketAggregation {
- p.subAggregations[name] = subAggregation
- return p
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation {
- p.meta = metaData
- return p
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *PercentilesBucketAggregation {
- p.bucketsPaths = append(p.bucketsPaths, bucketsPaths...)
- return p
-}
-
-func (p *PercentilesBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["percentiles_bucket"] = params
-
- if p.format != "" {
- params["format"] = p.format
- }
- if p.gapPolicy != "" {
- params["gap_policy"] = p.gapPolicy
- }
-
- // Add buckets paths
- switch len(p.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = p.bucketsPaths[0]
- default:
- params["buckets_path"] = p.bucketsPaths
- }
-
- // Add percents
- if len(p.percents) > 0 {
- params["percents"] = p.percents
- }
-
- // AggregationBuilder (SubAggregations)
- if len(p.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range p.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(p.meta) > 0 {
- source["meta"] = p.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket_test.go
deleted file mode 100644
index 5fa2639de..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_percentiles_bucket_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPercentilesBucketAggregation(t *testing.T) {
- agg := NewPercentilesBucketAggregation().BucketsPath("the_sum").GapPolicy("skip")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentiles_bucket":{"buckets_path":"the_sum","gap_policy":"skip"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercentilesBucketAggregationWithPercents(t *testing.T) {
- agg := NewPercentilesBucketAggregation().BucketsPath("the_sum").Percents(0.1, 1.0, 5.0, 25, 50)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percentiles_bucket":{"buckets_path":"the_sum","percents":[0.1,1,5,25,50]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff.go
deleted file mode 100644
index e13b94ea9..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SerialDiffAggregation implements serial differencing.
-// Serial differencing is a technique where values in a time series are
-// subtracted from itself at different time lags or periods.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-serialdiff-aggregation.html
-type SerialDiffAggregation struct {
- format string
- gapPolicy string
- lag *int
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewSerialDiffAggregation creates and initializes a new SerialDiffAggregation.
-func NewSerialDiffAggregation() *SerialDiffAggregation {
- return &SerialDiffAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *SerialDiffAggregation) GapPolicy(gapPolicy string) *SerialDiffAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *SerialDiffAggregation) GapInsertZeros() *SerialDiffAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *SerialDiffAggregation) GapSkip() *SerialDiffAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// Lag specifies the historical bucket to subtract from the current value.
-// E.g. a lag of 7 will subtract the current value from the value 7 buckets
-// ago. Lag must be a positive, non-zero integer.
-func (a *SerialDiffAggregation) Lag(lag int) *SerialDiffAggregation {
- a.lag = &lag
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *SerialDiffAggregation) SubAggregation(name string, subAggregation Aggregation) *SerialDiffAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SerialDiffAggregation) Meta(metaData map[string]interface{}) *SerialDiffAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *SerialDiffAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["serial_diff"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
- if a.lag != nil {
- params["lag"] = *a.lag
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff_test.go
deleted file mode 100644
index 6d336a2ee..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_serial_diff_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSerialDiffAggregation(t *testing.T) {
- agg := NewSerialDiffAggregation().BucketsPath("the_sum").Lag(7)
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"serial_diff":{"buckets_path":"the_sum","lag":7}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket.go
deleted file mode 100644
index e68a420f2..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// StatsBucketAggregation is a sibling pipeline aggregation which calculates
-// a variety of stats across all bucket of a specified metric in a sibling aggregation.
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-stats-bucket-aggregation.html
-type StatsBucketAggregation struct {
- format string
- gapPolicy string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewStatsBucketAggregation creates and initializes a new StatsBucketAggregation.
-func NewStatsBucketAggregation() *StatsBucketAggregation {
- return &StatsBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation {
- s.format = format
- return s
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (s *StatsBucketAggregation) GapPolicy(gapPolicy string) *StatsBucketAggregation {
- s.gapPolicy = gapPolicy
- return s
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (s *StatsBucketAggregation) GapInsertZeros() *StatsBucketAggregation {
- s.gapPolicy = "insert_zeros"
- return s
-}
-
-// GapSkip skips gaps in the series.
-func (s *StatsBucketAggregation) GapSkip() *StatsBucketAggregation {
- s.gapPolicy = "skip"
- return s
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (s *StatsBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsBucketAggregation {
- s.subAggregations[name] = subAggregation
- return s
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (s *StatsBucketAggregation) Meta(metaData map[string]interface{}) *StatsBucketAggregation {
- s.meta = metaData
- return s
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucketAggregation {
- s.bucketsPaths = append(s.bucketsPaths, bucketsPaths...)
- return s
-}
-
-func (s *StatsBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["stats_bucket"] = params
-
- if s.format != "" {
- params["format"] = s.format
- }
- if s.gapPolicy != "" {
- params["gap_policy"] = s.gapPolicy
- }
-
- // Add buckets paths
- switch len(s.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = s.bucketsPaths[0]
- default:
- params["buckets_path"] = s.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(s.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range s.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(s.meta) > 0 {
- source["meta"] = s.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket_test.go
deleted file mode 100644
index 117a73885..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_stats_bucket_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestStatsBucketAggregation(t *testing.T) {
- agg := NewStatsBucketAggregation().BucketsPath("the_sum").GapPolicy("skip")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"stats_bucket":{"buckets_path":"the_sum","gap_policy":"skip"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket.go
deleted file mode 100644
index c22ae8f50..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SumBucketAggregation is a sibling pipeline aggregation which calculates
-// the sum across all buckets of a specified metric in a sibling aggregation.
-// The specified metric must be numeric and the sibling aggregation must
-// be a multi-bucket aggregation.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-sum-bucket-aggregation.html
-type SumBucketAggregation struct {
- format string
- gapPolicy string
-
- subAggregations map[string]Aggregation
- meta map[string]interface{}
- bucketsPaths []string
-}
-
-// NewSumBucketAggregation creates and initializes a new SumBucketAggregation.
-func NewSumBucketAggregation() *SumBucketAggregation {
- return &SumBucketAggregation{
- subAggregations: make(map[string]Aggregation),
- bucketsPaths: make([]string, 0),
- }
-}
-
-func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation {
- a.format = format
- return a
-}
-
-// GapPolicy defines what should be done when a gap in the series is discovered.
-// Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
-func (a *SumBucketAggregation) GapPolicy(gapPolicy string) *SumBucketAggregation {
- a.gapPolicy = gapPolicy
- return a
-}
-
-// GapInsertZeros inserts zeros for gaps in the series.
-func (a *SumBucketAggregation) GapInsertZeros() *SumBucketAggregation {
- a.gapPolicy = "insert_zeros"
- return a
-}
-
-// GapSkip skips gaps in the series.
-func (a *SumBucketAggregation) GapSkip() *SumBucketAggregation {
- a.gapPolicy = "skip"
- return a
-}
-
-// SubAggregation adds a sub-aggregation to this aggregation.
-func (a *SumBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *SumBucketAggregation {
- a.subAggregations[name] = subAggregation
- return a
-}
-
-// Meta sets the meta data to be included in the aggregation response.
-func (a *SumBucketAggregation) Meta(metaData map[string]interface{}) *SumBucketAggregation {
- a.meta = metaData
- return a
-}
-
-// BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
-func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAggregation {
- a.bucketsPaths = append(a.bucketsPaths, bucketsPaths...)
- return a
-}
-
-func (a *SumBucketAggregation) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["sum_bucket"] = params
-
- if a.format != "" {
- params["format"] = a.format
- }
- if a.gapPolicy != "" {
- params["gap_policy"] = a.gapPolicy
- }
-
- // Add buckets paths
- switch len(a.bucketsPaths) {
- case 0:
- case 1:
- params["buckets_path"] = a.bucketsPaths[0]
- default:
- params["buckets_path"] = a.bucketsPaths
- }
-
- // AggregationBuilder (SubAggregations)
- if len(a.subAggregations) > 0 {
- aggsMap := make(map[string]interface{})
- source["aggregations"] = aggsMap
- for name, aggregate := range a.subAggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- }
-
- // Add Meta data if available
- if len(a.meta) > 0 {
- source["meta"] = a.meta
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket_test.go
deleted file mode 100644
index be8275c81..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_sum_bucket_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSumBucketAggregation(t *testing.T) {
- agg := NewSumBucketAggregation().BucketsPath("the_sum")
- src, err := agg.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"sum_bucket":{"buckets_path":"the_sum"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_pipeline_test.go b/vendor/github.com/olivere/elastic/search_aggs_pipeline_test.go
deleted file mode 100644
index 24dd4eb0f..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_pipeline_test.go
+++ /dev/null
@@ -1,903 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestAggsIntegrationAvgBucket(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- builder = builder.Aggregation("sales_per_month", h)
- builder = builder.Aggregation("avg_monthly_sales", NewAvgBucketAggregation().BucketsPath("sales_per_month>sales"))
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.AvgBucket("avg_monthly_sales")
- if !found {
- t.Fatal("expected avg_monthly_sales aggregation")
- }
- if agg == nil {
- t.Fatal("expected avg_monthly_sales aggregation")
- }
- if agg.Value == nil {
- t.Fatal("expected avg_monthly_sales.value != nil")
- }
- if got, want := *agg.Value, float64(939.2); got != want {
- t.Fatalf("expected avg_monthly_sales.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationDerivative(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- h = h.SubAggregation("sales_deriv", NewDerivativeAggregation().BucketsPath("sales"))
- builder = builder.Aggregation("sales_per_month", h)
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("sales_per_month")
- if !found {
- t.Fatal("expected sales_per_month aggregation")
- }
- if agg == nil {
- t.Fatal("expected sales_per_month aggregation")
- }
- if got, want := len(agg.Buckets), 6; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- if got, want := agg.Buckets[0].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[1].DocCount, int64(0); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[2].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[3].DocCount, int64(3); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[4].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[5].DocCount, int64(2); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
-
- d, found := agg.Buckets[0].Derivative("sales_deriv")
- if found {
- t.Fatal("expected no sales_deriv aggregation")
- }
- if d != nil {
- t.Fatal("expected no sales_deriv aggregation")
- }
-
- d, found = agg.Buckets[1].Derivative("sales_deriv")
- if !found {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d == nil {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d.Value != nil {
- t.Fatal("expected sales_deriv value == nil")
- }
-
- d, found = agg.Buckets[2].Derivative("sales_deriv")
- if !found {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d == nil {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d.Value != nil {
- t.Fatal("expected sales_deriv value == nil")
- }
-
- d, found = agg.Buckets[3].Derivative("sales_deriv")
- if !found {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d == nil {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected sales_deriv value != nil")
- }
- if got, want := *d.Value, float64(2348.0); got != want {
- t.Fatalf("expected sales_deriv.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[4].Derivative("sales_deriv")
- if !found {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d == nil {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected sales_deriv value != nil")
- }
- if got, want := *d.Value, float64(-1658.0); got != want {
- t.Fatalf("expected sales_deriv.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[5].Derivative("sales_deriv")
- if !found {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d == nil {
- t.Fatal("expected sales_deriv aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected sales_deriv value != nil")
- }
- if got, want := *d.Value, float64(-722.0); got != want {
- t.Fatalf("expected sales_deriv.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationMaxBucket(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- builder = builder.Aggregation("sales_per_month", h)
- builder = builder.Aggregation("max_monthly_sales", NewMaxBucketAggregation().BucketsPath("sales_per_month>sales"))
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.MaxBucket("max_monthly_sales")
- if !found {
- t.Fatal("expected max_monthly_sales aggregation")
- }
- if agg == nil {
- t.Fatal("expected max_monthly_sales aggregation")
- }
- if got, want := len(agg.Keys), 1; got != want {
- t.Fatalf("expected len(max_monthly_sales.keys)=%d; got: %d", want, got)
- }
- if got, want := agg.Keys[0], "2015-04-01"; got != want {
- t.Fatalf("expected max_monthly_sales.keys[0]=%v; got: %v", want, got)
- }
- if agg.Value == nil {
- t.Fatal("expected max_monthly_sales.value != nil")
- }
- if got, want := *agg.Value, float64(2448); got != want {
- t.Fatalf("expected max_monthly_sales.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationMinBucket(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- builder = builder.Aggregation("sales_per_month", h)
- builder = builder.Aggregation("min_monthly_sales", NewMinBucketAggregation().BucketsPath("sales_per_month>sales"))
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.MinBucket("min_monthly_sales")
- if !found {
- t.Fatal("expected min_monthly_sales aggregation")
- }
- if agg == nil {
- t.Fatal("expected min_monthly_sales aggregation")
- }
- if got, want := len(agg.Keys), 1; got != want {
- t.Fatalf("expected len(min_monthly_sales.keys)=%d; got: %d", want, got)
- }
- if got, want := agg.Keys[0], "2015-06-01"; got != want {
- t.Fatalf("expected min_monthly_sales.keys[0]=%v; got: %v", want, got)
- }
- if agg.Value == nil {
- t.Fatal("expected min_monthly_sales.value != nil")
- }
- if got, want := *agg.Value, float64(68); got != want {
- t.Fatalf("expected min_monthly_sales.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationSumBucket(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- builder = builder.Aggregation("sales_per_month", h)
- builder = builder.Aggregation("sum_monthly_sales", NewSumBucketAggregation().BucketsPath("sales_per_month>sales"))
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.SumBucket("sum_monthly_sales")
- if !found {
- t.Fatal("expected sum_monthly_sales aggregation")
- }
- if agg == nil {
- t.Fatal("expected sum_monthly_sales aggregation")
- }
- if agg.Value == nil {
- t.Fatal("expected sum_monthly_sales.value != nil")
- }
- if got, want := *agg.Value, float64(4696.0); got != want {
- t.Fatalf("expected sum_monthly_sales.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationMovAvg(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("the_sum", NewSumAggregation().Field("price"))
- h = h.SubAggregation("the_movavg", NewMovAvgAggregation().BucketsPath("the_sum"))
- builder = builder.Aggregation("my_date_histo", h)
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("my_date_histo")
- if !found {
- t.Fatal("expected sum_monthly_sales aggregation")
- }
- if agg == nil {
- t.Fatal("expected sum_monthly_sales aggregation")
- }
- if got, want := len(agg.Buckets), 6; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- d, found := agg.Buckets[0].MovAvg("the_movavg")
- if found {
- t.Fatal("expected no the_movavg aggregation")
- }
- if d != nil {
- t.Fatal("expected no the_movavg aggregation")
- }
-
- d, found = agg.Buckets[1].MovAvg("the_movavg")
- if found {
- t.Fatal("expected no the_movavg aggregation")
- }
- if d != nil {
- t.Fatal("expected no the_movavg aggregation")
- }
-
- d, found = agg.Buckets[2].MovAvg("the_movavg")
- if !found {
- t.Fatal("expected the_movavg aggregation")
- }
- if d == nil {
- t.Fatal("expected the_movavg aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_movavg value")
- }
- if got, want := *d.Value, float64(1290.0); got != want {
- t.Fatalf("expected %v buckets; got: %v", want, got)
- }
-
- d, found = agg.Buckets[3].MovAvg("the_movavg")
- if !found {
- t.Fatal("expected the_movavg aggregation")
- }
- if d == nil {
- t.Fatal("expected the_movavg aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_movavg value")
- }
- if got, want := *d.Value, float64(695.0); got != want {
- t.Fatalf("expected %v buckets; got: %v", want, got)
- }
-
- d, found = agg.Buckets[4].MovAvg("the_movavg")
- if !found {
- t.Fatal("expected the_movavg aggregation")
- }
- if d == nil {
- t.Fatal("expected the_movavg aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_movavg value")
- }
- if got, want := *d.Value, float64(1279.3333333333333); got != want {
- t.Fatalf("expected %v buckets; got: %v", want, got)
- }
-
- d, found = agg.Buckets[5].MovAvg("the_movavg")
- if !found {
- t.Fatal("expected the_movavg aggregation")
- }
- if d == nil {
- t.Fatal("expected the_movavg aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_movavg value")
- }
- if got, want := *d.Value, float64(1157.0); got != want {
- t.Fatalf("expected %v buckets; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationCumulativeSum(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- h = h.SubAggregation("cumulative_sales", NewCumulativeSumAggregation().BucketsPath("sales"))
- builder = builder.Aggregation("sales_per_month", h)
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("sales_per_month")
- if !found {
- t.Fatal("expected sales_per_month aggregation")
- }
- if agg == nil {
- t.Fatal("expected sales_per_month aggregation")
- }
- if got, want := len(agg.Buckets), 6; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- if got, want := agg.Buckets[0].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[1].DocCount, int64(0); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[2].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[3].DocCount, int64(3); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[4].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[5].DocCount, int64(2); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
-
- d, found := agg.Buckets[0].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(1290.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[1].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(1290.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[2].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(1390.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[3].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(3838.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[4].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(4628.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[5].CumulativeSum("cumulative_sales")
- if !found {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d == nil {
- t.Fatal("expected cumulative_sales aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected cumulative_sales value != nil")
- }
- if got, want := *d.Value, float64(4696.0); got != want {
- t.Fatalf("expected cumulative_sales.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationBucketScript(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("total_sales", NewSumAggregation().Field("price"))
- appleFilter := NewFilterAggregation().Filter(NewTermQuery("manufacturer", "Apple"))
- appleFilter = appleFilter.SubAggregation("sales", NewSumAggregation().Field("price"))
- h = h.SubAggregation("apple_sales", appleFilter)
- h = h.SubAggregation("apple_percentage",
- NewBucketScriptAggregation().
- GapPolicy("insert_zeros").
- AddBucketsPath("appleSales", "apple_sales>sales").
- AddBucketsPath("totalSales", "total_sales").
- Script(NewScript("params.appleSales / params.totalSales * 100")))
- builder = builder.Aggregation("sales_per_month", h)
-
- res, err := builder.Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatalf("%v (maybe scripting is disabled?)", err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("sales_per_month")
- if !found {
- t.Fatal("expected sales_per_month aggregation")
- }
- if agg == nil {
- t.Fatal("expected sales_per_month aggregation")
- }
- if got, want := len(agg.Buckets), 6; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- if got, want := agg.Buckets[0].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[1].DocCount, int64(0); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[2].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[3].DocCount, int64(3); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[4].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[5].DocCount, int64(2); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
-
- d, found := agg.Buckets[0].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected apple_percentage value != nil")
- }
- if got, want := *d.Value, float64(100.0); got != want {
- t.Fatalf("expected apple_percentage.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[1].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value != nil {
- t.Fatal("expected apple_percentage value == nil")
- }
-
- d, found = agg.Buckets[2].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected apple_percentage value != nil")
- }
- if got, want := *d.Value, float64(0.0); got != want {
- t.Fatalf("expected apple_percentage.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[3].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected apple_percentage value != nil")
- }
- if got, want := *d.Value, float64(34.64052287581699); got != want {
- t.Fatalf("expected apple_percentage.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[4].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected apple_percentage value != nil")
- }
- if got, want := *d.Value, float64(0.0); got != want {
- t.Fatalf("expected apple_percentage.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[5].BucketScript("apple_percentage")
- if !found {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d == nil {
- t.Fatal("expected apple_percentage aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected apple_percentage value != nil")
- }
- if got, want := *d.Value, float64(0.0); got != want {
- t.Fatalf("expected apple_percentage.value=%v; got: %v", want, got)
- }
-}
-
-func TestAggsIntegrationBucketSelector(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("total_sales", NewSumAggregation().Field("price"))
- h = h.SubAggregation("sales_bucket_filter",
- NewBucketSelectorAggregation().
- AddBucketsPath("totalSales", "total_sales").
- Script(NewScript("params.totalSales <= 100")))
- builder = builder.Aggregation("sales_per_month", h)
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatalf("%v (maybe scripting is disabled?)", err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("sales_per_month")
- if !found {
- t.Fatal("expected sales_per_month aggregation")
- }
- if agg == nil {
- t.Fatal("expected sales_per_month aggregation")
- }
- if got, want := len(agg.Buckets), 2; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- if got, want := agg.Buckets[0].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[1].DocCount, int64(2); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
-}
-
-func TestAggsIntegrationSerialDiff(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- builder := client.Search().
- Index(testOrderIndex).
- Type("doc").
- Query(NewMatchAllQuery()).
- Pretty(true)
- h := NewDateHistogramAggregation().Field("time").Interval("month")
- h = h.SubAggregation("sales", NewSumAggregation().Field("price"))
- h = h.SubAggregation("the_diff", NewSerialDiffAggregation().BucketsPath("sales").Lag(1))
- builder = builder.Aggregation("sales_per_month", h)
-
- res, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
-
- aggs := res.Aggregations
- if aggs == nil {
- t.Fatal("expected aggregations != nil; got: nil")
- }
-
- agg, found := aggs.DateHistogram("sales_per_month")
- if !found {
- t.Fatal("expected sales_per_month aggregation")
- }
- if agg == nil {
- t.Fatal("expected sales_per_month aggregation")
- }
- if got, want := len(agg.Buckets), 6; got != want {
- t.Fatalf("expected %d buckets; got: %d", want, got)
- }
-
- if got, want := agg.Buckets[0].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[1].DocCount, int64(0); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[2].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[3].DocCount, int64(3); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[4].DocCount, int64(1); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
- if got, want := agg.Buckets[5].DocCount, int64(2); got != want {
- t.Fatalf("expected DocCount=%d; got: %d", want, got)
- }
-
- d, found := agg.Buckets[0].SerialDiff("the_diff")
- if found {
- t.Fatal("expected no the_diff aggregation")
- }
- if d != nil {
- t.Fatal("expected no the_diff aggregation")
- }
-
- d, found = agg.Buckets[1].SerialDiff("the_diff")
- if found {
- t.Fatal("expected no the_diff aggregation")
- }
- if d != nil {
- t.Fatal("expected no the_diff aggregation")
- }
-
- d, found = agg.Buckets[2].SerialDiff("the_diff")
- if found {
- t.Fatal("expected no the_diff aggregation")
- }
- if d != nil {
- t.Fatal("expected no the_diff aggregation")
- }
-
- d, found = agg.Buckets[3].SerialDiff("the_diff")
- if !found {
- t.Fatal("expected the_diff aggregation")
- }
- if d == nil {
- t.Fatal("expected the_diff aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_diff value != nil")
- }
- if got, want := *d.Value, float64(2348.0); got != want {
- t.Fatalf("expected the_diff.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[4].SerialDiff("the_diff")
- if !found {
- t.Fatal("expected the_diff aggregation")
- }
- if d == nil {
- t.Fatal("expected the_diff aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_diff value != nil")
- }
- if got, want := *d.Value, float64(-1658.0); got != want {
- t.Fatalf("expected the_diff.value=%v; got: %v", want, got)
- }
-
- d, found = agg.Buckets[5].SerialDiff("the_diff")
- if !found {
- t.Fatal("expected the_diff aggregation")
- }
- if d == nil {
- t.Fatal("expected the_diff aggregation")
- }
- if d.Value == nil {
- t.Fatal("expected the_diff value != nil")
- }
- if got, want := *d.Value, float64(-722.0); got != want {
- t.Fatalf("expected the_diff.value=%v; got: %v", want, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_aggs_test.go b/vendor/github.com/olivere/elastic/search_aggs_test.go
deleted file mode 100644
index f1b6347b3..000000000
--- a/vendor/github.com/olivere/elastic/search_aggs_test.go
+++ /dev/null
@@ -1,3416 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "strings"
- "testing"
- "time"
-)
-
-func TestAggs(t *testing.T) {
- //client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndex(t)
-
- /*
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- */
-
- tweet1 := tweet{
- User: "olivere",
- Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Image: "http://golang.org/doc/gopher/gophercolor.png",
- Tags: []string{"golang", "elasticsearch"},
- Location: "48.1333,11.5667", // lat,lon
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere",
- Retweets: 0,
- Message: "Another unrelated topic.",
- Tags: []string{"golang"},
- Location: "48.1189,11.4289", // lat,lon
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae",
- Retweets: 12,
- Message: "Cycling is fun.",
- Tags: []string{"sports", "cycling"},
- Location: "47.7167,11.7167", // lat,lon
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
-
- // Terms Aggregate by user name
- globalAgg := NewGlobalAggregation()
- usersAgg := NewTermsAggregation().Field("user").Size(10).OrderByCountDesc()
- retweetsAgg := NewTermsAggregation().Field("retweets").Size(10)
- avgRetweetsAgg := NewAvgAggregation().Field("retweets")
- avgRetweetsWithMetaAgg := NewAvgAggregation().Field("retweetsMeta").Meta(map[string]interface{}{"meta": true})
- minRetweetsAgg := NewMinAggregation().Field("retweets")
- maxRetweetsAgg := NewMaxAggregation().Field("retweets")
- sumRetweetsAgg := NewSumAggregation().Field("retweets")
- statsRetweetsAgg := NewStatsAggregation().Field("retweets")
- extstatsRetweetsAgg := NewExtendedStatsAggregation().Field("retweets")
- valueCountRetweetsAgg := NewValueCountAggregation().Field("retweets")
- percentilesRetweetsAgg := NewPercentilesAggregation().Field("retweets")
- percentileRanksRetweetsAgg := NewPercentileRanksAggregation().Field("retweets").Values(25, 50, 75)
- cardinalityAgg := NewCardinalityAggregation().Field("user")
- significantTermsAgg := NewSignificantTermsAggregation().Field("message")
- samplerAgg := NewSamplerAggregation().SubAggregation("tagged_with", NewTermsAggregation().Field("tags"))
- retweetsRangeAgg := NewRangeAggregation().Field("retweets").Lt(10).Between(10, 100).Gt(100)
- retweetsKeyedRangeAgg := NewRangeAggregation().Field("retweets").Keyed(true).Lt(10).Between(10, 100).Gt(100)
- dateRangeAgg := NewDateRangeAggregation().Field("created").Lt("2012-01-01").Between("2012-01-01", "2013-01-01").Gt("2013-01-01")
- missingTagsAgg := NewMissingAggregation().Field("tags")
- retweetsHistoAgg := NewHistogramAggregation().Field("retweets").Interval(100)
- dateHistoAgg := NewDateHistogramAggregation().Field("created").Interval("year")
- retweetsFilterAgg := NewFilterAggregation().Filter(
- NewRangeQuery("created").Gte("2012-01-01").Lte("2012-12-31")).
- SubAggregation("avgRetweetsSub", NewAvgAggregation().Field("retweets"))
- queryFilterAgg := NewFilterAggregation().Filter(NewTermQuery("tags", "golang"))
- topTagsHitsAgg := NewTopHitsAggregation().Sort("created", false).Size(5).FetchSource(true)
- topTagsAgg := NewTermsAggregation().Field("tags").Size(3).SubAggregation("top_tag_hits", topTagsHitsAgg)
- geoBoundsAgg := NewGeoBoundsAggregation().Field("location")
- geoHashAgg := NewGeoHashGridAggregation().Field("location").Precision(5)
- composite := NewCompositeAggregation().Sources(
- NewCompositeAggregationTermsValuesSource("composite_users").Field("user"),
- NewCompositeAggregationHistogramValuesSource("composite_retweets", 1).Field("retweets"),
- NewCompositeAggregationDateHistogramValuesSource("composite_created", "1m").Field("created"),
- )
-
- // Run query
- builder := client.Search().Index(testIndexName).Query(all).Pretty(true)
- builder = builder.Aggregation("global", globalAgg)
- builder = builder.Aggregation("users", usersAgg)
- builder = builder.Aggregation("retweets", retweetsAgg)
- builder = builder.Aggregation("avgRetweets", avgRetweetsAgg)
- builder = builder.Aggregation("avgRetweetsWithMeta", avgRetweetsWithMetaAgg)
- builder = builder.Aggregation("minRetweets", minRetweetsAgg)
- builder = builder.Aggregation("maxRetweets", maxRetweetsAgg)
- builder = builder.Aggregation("sumRetweets", sumRetweetsAgg)
- builder = builder.Aggregation("statsRetweets", statsRetweetsAgg)
- builder = builder.Aggregation("extstatsRetweets", extstatsRetweetsAgg)
- builder = builder.Aggregation("valueCountRetweets", valueCountRetweetsAgg)
- builder = builder.Aggregation("percentilesRetweets", percentilesRetweetsAgg)
- builder = builder.Aggregation("percentileRanksRetweets", percentileRanksRetweetsAgg)
- builder = builder.Aggregation("usersCardinality", cardinalityAgg)
- builder = builder.Aggregation("significantTerms", significantTermsAgg)
- builder = builder.Aggregation("sample", samplerAgg)
- builder = builder.Aggregation("retweetsRange", retweetsRangeAgg)
- builder = builder.Aggregation("retweetsKeyedRange", retweetsKeyedRangeAgg)
- builder = builder.Aggregation("dateRange", dateRangeAgg)
- builder = builder.Aggregation("missingTags", missingTagsAgg)
- builder = builder.Aggregation("retweetsHisto", retweetsHistoAgg)
- builder = builder.Aggregation("dateHisto", dateHistoAgg)
- builder = builder.Aggregation("retweetsFilter", retweetsFilterAgg)
- builder = builder.Aggregation("queryFilter", queryFilterAgg)
- builder = builder.Aggregation("top-tags", topTagsAgg)
- builder = builder.Aggregation("viewport", geoBoundsAgg)
- builder = builder.Aggregation("geohashed", geoHashAgg)
- // Unnamed filters
- countByUserAgg := NewFiltersAggregation().
- Filters(NewTermQuery("user", "olivere"), NewTermQuery("user", "sandrae"))
- builder = builder.Aggregation("countByUser", countByUserAgg)
- // Named filters
- countByUserAgg2 := NewFiltersAggregation().
- FilterWithName("olivere", NewTermQuery("user", "olivere")).
- FilterWithName("sandrae", NewTermQuery("user", "sandrae"))
- builder = builder.Aggregation("countByUser2", countByUserAgg2)
- // AvgBucket
- dateHisto := NewDateHistogramAggregation().Field("created").Interval("year")
- dateHisto = dateHisto.SubAggregation("sumOfRetweets", NewSumAggregation().Field("retweets"))
- builder = builder.Aggregation("avgBucketDateHisto", dateHisto)
- builder = builder.Aggregation("avgSumOfRetweets", NewAvgBucketAggregation().BucketsPath("avgBucketDateHisto>sumOfRetweets"))
- // MinBucket
- dateHisto = NewDateHistogramAggregation().Field("created").Interval("year")
- dateHisto = dateHisto.SubAggregation("sumOfRetweets", NewSumAggregation().Field("retweets"))
- builder = builder.Aggregation("minBucketDateHisto", dateHisto)
- builder = builder.Aggregation("minBucketSumOfRetweets", NewMinBucketAggregation().BucketsPath("minBucketDateHisto>sumOfRetweets"))
- // MaxBucket
- dateHisto = NewDateHistogramAggregation().Field("created").Interval("year")
- dateHisto = dateHisto.SubAggregation("sumOfRetweets", NewSumAggregation().Field("retweets"))
- builder = builder.Aggregation("maxBucketDateHisto", dateHisto)
- builder = builder.Aggregation("maxBucketSumOfRetweets", NewMaxBucketAggregation().BucketsPath("maxBucketDateHisto>sumOfRetweets"))
- // SumBucket
- dateHisto = NewDateHistogramAggregation().Field("created").Interval("year")
- dateHisto = dateHisto.SubAggregation("sumOfRetweets", NewSumAggregation().Field("retweets"))
- builder = builder.Aggregation("sumBucketDateHisto", dateHisto)
- builder = builder.Aggregation("sumBucketSumOfRetweets", NewSumBucketAggregation().BucketsPath("sumBucketDateHisto>sumOfRetweets"))
- // MovAvg
- dateHisto = NewDateHistogramAggregation().Field("created").Interval("year")
- dateHisto = dateHisto.SubAggregation("sumOfRetweets", NewSumAggregation().Field("retweets"))
- dateHisto = dateHisto.SubAggregation("movingAvg", NewMovAvgAggregation().BucketsPath("sumOfRetweets"))
- builder = builder.Aggregation("movingAvgDateHisto", dateHisto)
- builder = builder.Aggregation("composite", composite)
- searchResult, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected Hits != nil; got: nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected Hits.TotalHits = %d; got: %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 3 {
- t.Errorf("expected len(Hits.Hits) = %d; got: %d", 3, len(searchResult.Hits.Hits))
- }
- agg := searchResult.Aggregations
- if agg == nil {
- t.Fatalf("expected Aggregations != nil; got: nil")
- }
-
- // Search for non-existent aggregate should return (nil, false)
- unknownAgg, found := agg.Terms("no-such-aggregate")
- if found {
- t.Errorf("expected unknown aggregation to not be found; got: %v", found)
- }
- if unknownAgg != nil {
- t.Errorf("expected unknown aggregation to return %v; got %v", nil, unknownAgg)
- }
-
- // Global
- globalAggRes, found := agg.Global("global")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if globalAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if globalAggRes.DocCount != 3 {
- t.Errorf("expected DocCount = %d; got: %d", 3, globalAggRes.DocCount)
- }
-
- // Search for existent aggregate (by name) should return (aggregate, true)
- termsAggRes, found := agg.Terms("users")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if termsAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(termsAggRes.Buckets) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(termsAggRes.Buckets))
- }
- if termsAggRes.Buckets[0].Key != "olivere" {
- t.Errorf("expected %q; got: %q", "olivere", termsAggRes.Buckets[0].Key)
- }
- if termsAggRes.Buckets[0].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, termsAggRes.Buckets[0].DocCount)
- }
- if termsAggRes.Buckets[1].Key != "sandrae" {
- t.Errorf("expected %q; got: %q", "sandrae", termsAggRes.Buckets[1].Key)
- }
- if termsAggRes.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, termsAggRes.Buckets[1].DocCount)
- }
-
- // A terms aggregate with keys that are not strings
- retweetsAggRes, found := agg.Terms("retweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if retweetsAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(retweetsAggRes.Buckets) != 3 {
- t.Fatalf("expected %d; got: %d", 3, len(retweetsAggRes.Buckets))
- }
-
- if retweetsAggRes.Buckets[0].Key != float64(0) {
- t.Errorf("expected %v; got: %v", float64(0), retweetsAggRes.Buckets[0].Key)
- }
- if got, err := retweetsAggRes.Buckets[0].KeyNumber.Int64(); err != nil {
- t.Errorf("expected %d; got: %v", 0, retweetsAggRes.Buckets[0].Key)
- } else if got != 0 {
- t.Errorf("expected %d; got: %d", 0, got)
- }
- if retweetsAggRes.Buckets[0].KeyNumber != "0" {
- t.Errorf("expected %q; got: %q", "0", retweetsAggRes.Buckets[0].KeyNumber)
- }
- if retweetsAggRes.Buckets[0].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, retweetsAggRes.Buckets[0].DocCount)
- }
-
- if retweetsAggRes.Buckets[1].Key != float64(12) {
- t.Errorf("expected %v; got: %v", float64(12), retweetsAggRes.Buckets[1].Key)
- }
- if got, err := retweetsAggRes.Buckets[1].KeyNumber.Int64(); err != nil {
- t.Errorf("expected %d; got: %v", 0, retweetsAggRes.Buckets[1].KeyNumber)
- } else if got != 12 {
- t.Errorf("expected %d; got: %d", 12, got)
- }
- if retweetsAggRes.Buckets[1].KeyNumber != "12" {
- t.Errorf("expected %q; got: %q", "12", retweetsAggRes.Buckets[1].KeyNumber)
- }
- if retweetsAggRes.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, retweetsAggRes.Buckets[1].DocCount)
- }
-
- if retweetsAggRes.Buckets[2].Key != float64(108) {
- t.Errorf("expected %v; got: %v", float64(108), retweetsAggRes.Buckets[2].Key)
- }
- if got, err := retweetsAggRes.Buckets[2].KeyNumber.Int64(); err != nil {
- t.Errorf("expected %d; got: %v", 108, retweetsAggRes.Buckets[2].KeyNumber)
- } else if got != 108 {
- t.Errorf("expected %d; got: %d", 108, got)
- }
- if retweetsAggRes.Buckets[2].KeyNumber != "108" {
- t.Errorf("expected %q; got: %q", "108", retweetsAggRes.Buckets[2].KeyNumber)
- }
- if retweetsAggRes.Buckets[2].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, retweetsAggRes.Buckets[2].DocCount)
- }
-
- // avgRetweets
- avgAggRes, found := agg.Avg("avgRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if avgAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if avgAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *avgAggRes.Value)
- }
- if *avgAggRes.Value != 40.0 {
- t.Errorf("expected %v; got: %v", 40.0, *avgAggRes.Value)
- }
-
- // avgRetweetsWithMeta
- avgMetaAggRes, found := agg.Avg("avgRetweetsWithMeta")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if avgMetaAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if avgMetaAggRes.Meta == nil {
- t.Fatalf("expected != nil; got: %v", avgMetaAggRes.Meta)
- }
- metaDataValue, found := avgMetaAggRes.Meta["meta"]
- if !found {
- t.Fatalf("expected to return meta data key %q; got: %v", "meta", found)
- }
- if flag, ok := metaDataValue.(bool); !ok {
- t.Fatalf("expected to return meta data key type %T; got: %T", true, metaDataValue)
- } else if flag != true {
- t.Fatalf("expected to return meta data key value %v; got: %v", true, flag)
- }
-
- // minRetweets
- minAggRes, found := agg.Min("minRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if minAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if minAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *minAggRes.Value)
- }
- if *minAggRes.Value != 0.0 {
- t.Errorf("expected %v; got: %v", 0.0, *minAggRes.Value)
- }
-
- // maxRetweets
- maxAggRes, found := agg.Max("maxRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if maxAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if maxAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *maxAggRes.Value)
- }
- if *maxAggRes.Value != 108.0 {
- t.Errorf("expected %v; got: %v", 108.0, *maxAggRes.Value)
- }
-
- // sumRetweets
- sumAggRes, found := agg.Sum("sumRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if sumAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if sumAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *sumAggRes.Value)
- }
- if *sumAggRes.Value != 120.0 {
- t.Errorf("expected %v; got: %v", 120.0, *sumAggRes.Value)
- }
-
- // statsRetweets
- statsAggRes, found := agg.Stats("statsRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if statsAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if statsAggRes.Count != 3 {
- t.Errorf("expected %d; got: %d", 3, statsAggRes.Count)
- }
- if statsAggRes.Min == nil {
- t.Fatalf("expected != nil; got: %v", *statsAggRes.Min)
- }
- if *statsAggRes.Min != 0.0 {
- t.Errorf("expected %v; got: %v", 0.0, *statsAggRes.Min)
- }
- if statsAggRes.Max == nil {
- t.Fatalf("expected != nil; got: %v", *statsAggRes.Max)
- }
- if *statsAggRes.Max != 108.0 {
- t.Errorf("expected %v; got: %v", 108.0, *statsAggRes.Max)
- }
- if statsAggRes.Avg == nil {
- t.Fatalf("expected != nil; got: %v", *statsAggRes.Avg)
- }
- if *statsAggRes.Avg != 40.0 {
- t.Errorf("expected %v; got: %v", 40.0, *statsAggRes.Avg)
- }
- if statsAggRes.Sum == nil {
- t.Fatalf("expected != nil; got: %v", *statsAggRes.Sum)
- }
- if *statsAggRes.Sum != 120.0 {
- t.Errorf("expected %v; got: %v", 120.0, *statsAggRes.Sum)
- }
-
- // extstatsRetweets
- extStatsAggRes, found := agg.ExtendedStats("extstatsRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if extStatsAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if extStatsAggRes.Count != 3 {
- t.Errorf("expected %d; got: %d", 3, extStatsAggRes.Count)
- }
- if extStatsAggRes.Min == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.Min)
- }
- if *extStatsAggRes.Min != 0.0 {
- t.Errorf("expected %v; got: %v", 0.0, *extStatsAggRes.Min)
- }
- if extStatsAggRes.Max == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.Max)
- }
- if *extStatsAggRes.Max != 108.0 {
- t.Errorf("expected %v; got: %v", 108.0, *extStatsAggRes.Max)
- }
- if extStatsAggRes.Avg == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.Avg)
- }
- if *extStatsAggRes.Avg != 40.0 {
- t.Errorf("expected %v; got: %v", 40.0, *extStatsAggRes.Avg)
- }
- if extStatsAggRes.Sum == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.Sum)
- }
- if *extStatsAggRes.Sum != 120.0 {
- t.Errorf("expected %v; got: %v", 120.0, *extStatsAggRes.Sum)
- }
- if extStatsAggRes.SumOfSquares == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.SumOfSquares)
- }
- if *extStatsAggRes.SumOfSquares != 11808.0 {
- t.Errorf("expected %v; got: %v", 11808.0, *extStatsAggRes.SumOfSquares)
- }
- if extStatsAggRes.Variance == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.Variance)
- }
- if *extStatsAggRes.Variance != 2336.0 {
- t.Errorf("expected %v; got: %v", 2336.0, *extStatsAggRes.Variance)
- }
- if extStatsAggRes.StdDeviation == nil {
- t.Fatalf("expected != nil; got: %v", *extStatsAggRes.StdDeviation)
- }
- if *extStatsAggRes.StdDeviation != 48.33218389437829 {
- t.Errorf("expected %v; got: %v", 48.33218389437829, *extStatsAggRes.StdDeviation)
- }
-
- // valueCountRetweets
- valueCountAggRes, found := agg.ValueCount("valueCountRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if valueCountAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if valueCountAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *valueCountAggRes.Value)
- }
- if *valueCountAggRes.Value != 3.0 {
- t.Errorf("expected %v; got: %v", 3.0, *valueCountAggRes.Value)
- }
-
- // percentilesRetweets
- percentilesAggRes, found := agg.Percentiles("percentilesRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if percentilesAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- // ES 1.4.x returns 7: {"1.0":...}
- // ES 1.5.0 returns 14: {"1.0":..., "1.0_as_string":...}
- // So we're relaxing the test here.
- if len(percentilesAggRes.Values) == 0 {
- t.Errorf("expected at least %d value; got: %d\nValues are: %#v", 1, len(percentilesAggRes.Values), percentilesAggRes.Values)
- }
- if _, found := percentilesAggRes.Values["0.0"]; found {
- t.Errorf("expected %v; got: %v", false, found)
- }
- if percentilesAggRes.Values["1.0"] != 0.24 {
- t.Errorf("expected %v; got: %v", 0.24, percentilesAggRes.Values["1.0"])
- }
- if percentilesAggRes.Values["25.0"] != 6.0 {
- t.Errorf("expected %v; got: %v", 6.0, percentilesAggRes.Values["25.0"])
- }
- if percentilesAggRes.Values["99.0"] != 106.08 {
- t.Errorf("expected %v; got: %v", 106.08, percentilesAggRes.Values["99.0"])
- }
-
- // percentileRanksRetweets
- percentileRanksAggRes, found := agg.PercentileRanks("percentileRanksRetweets")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if percentileRanksAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(percentileRanksAggRes.Values) == 0 {
- t.Errorf("expected at least %d value; got %d\nValues are: %#v", 1, len(percentileRanksAggRes.Values), percentileRanksAggRes.Values)
- }
- if _, found := percentileRanksAggRes.Values["0.0"]; found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if percentileRanksAggRes.Values["25.0"] != 21.180555555555557 {
- t.Errorf("expected %v; got: %v", 21.180555555555557, percentileRanksAggRes.Values["25.0"])
- }
- if percentileRanksAggRes.Values["50.0"] != 29.86111111111111 {
- t.Errorf("expected %v; got: %v", 29.86111111111111, percentileRanksAggRes.Values["50.0"])
- }
- if percentileRanksAggRes.Values["75.0"] != 38.54166666666667 {
- t.Errorf("expected %v; got: %v", 38.54166666666667, percentileRanksAggRes.Values["75.0"])
- }
-
- // usersCardinality
- cardAggRes, found := agg.Cardinality("usersCardinality")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if cardAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if cardAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", *cardAggRes.Value)
- }
- if *cardAggRes.Value != 2 {
- t.Errorf("expected %v; got: %v", 2, *cardAggRes.Value)
- }
-
- // retweetsFilter
- filterAggRes, found := agg.Filter("retweetsFilter")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if filterAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if filterAggRes.DocCount != 2 {
- t.Fatalf("expected %v; got: %v", 2, filterAggRes.DocCount)
- }
-
- // Retrieve sub-aggregation
- avgRetweetsAggRes, found := filterAggRes.Avg("avgRetweetsSub")
- if !found {
- t.Error("expected sub-aggregation \"avgRetweets\" to be found; got false")
- }
- if avgRetweetsAggRes == nil {
- t.Fatal("expected sub-aggregation \"avgRetweets\"; got nil")
- }
- if avgRetweetsAggRes.Value == nil {
- t.Fatalf("expected != nil; got: %v", avgRetweetsAggRes.Value)
- }
- if *avgRetweetsAggRes.Value != 54.0 {
- t.Errorf("expected %v; got: %v", 54.0, *avgRetweetsAggRes.Value)
- }
-
- // queryFilter
- queryFilterAggRes, found := agg.Filter("queryFilter")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if queryFilterAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if queryFilterAggRes.DocCount != 2 {
- t.Fatalf("expected %v; got: %v", 2, queryFilterAggRes.DocCount)
- }
-
- // significantTerms
- stAggRes, found := agg.SignificantTerms("significantTerms")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if stAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if stAggRes.DocCount != 3 {
- t.Errorf("expected %v; got: %v", 3, stAggRes.DocCount)
- }
- if len(stAggRes.Buckets) != 0 {
- t.Errorf("expected %v; got: %v", 0, len(stAggRes.Buckets))
- }
-
- // sampler
- samplerAggRes, found := agg.Sampler("sample")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if samplerAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if samplerAggRes.DocCount != 3 {
- t.Errorf("expected %v; got: %v", 3, samplerAggRes.DocCount)
- }
- sub, found := samplerAggRes.Aggregations["tagged_with"]
- if !found {
- t.Fatalf("expected sub aggregation %q", "tagged_with")
- }
- if sub == nil {
- t.Fatalf("expected sub aggregation %q; got: %v", "tagged_with", sub)
- }
-
- // retweetsRange
- rangeAggRes, found := agg.Range("retweetsRange")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if rangeAggRes == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if len(rangeAggRes.Buckets) != 3 {
- t.Fatalf("expected %d; got: %d", 3, len(rangeAggRes.Buckets))
- }
- if rangeAggRes.Buckets[0].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, rangeAggRes.Buckets[0].DocCount)
- }
- if rangeAggRes.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, rangeAggRes.Buckets[1].DocCount)
- }
- if rangeAggRes.Buckets[2].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, rangeAggRes.Buckets[2].DocCount)
- }
-
- // retweetsKeyedRange
- keyedRangeAggRes, found := agg.KeyedRange("retweetsKeyedRange")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if keyedRangeAggRes == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if len(keyedRangeAggRes.Buckets) != 3 {
- t.Fatalf("expected %d; got: %d", 3, len(keyedRangeAggRes.Buckets))
- }
- _, found = keyedRangeAggRes.Buckets["no-such-key"]
- if found {
- t.Fatalf("expected bucket to not be found; got: %v", found)
- }
- bucket, found := keyedRangeAggRes.Buckets["*-10.0"]
- if !found {
- t.Fatalf("expected bucket to be found; got: %v", found)
- }
- if bucket.DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, bucket.DocCount)
- }
- bucket, found = keyedRangeAggRes.Buckets["10.0-100.0"]
- if !found {
- t.Fatalf("expected bucket to be found; got: %v", found)
- }
- if bucket.DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, bucket.DocCount)
- }
- bucket, found = keyedRangeAggRes.Buckets["100.0-*"]
- if !found {
- t.Fatalf("expected bucket to be found; got: %v", found)
- }
- if bucket.DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, bucket.DocCount)
- }
-
- // dateRange
- dateRangeRes, found := agg.DateRange("dateRange")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if dateRangeRes == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if dateRangeRes.Buckets[0].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, dateRangeRes.Buckets[0].DocCount)
- }
- if dateRangeRes.Buckets[0].From != nil {
- t.Fatal("expected From to be nil")
- }
- if dateRangeRes.Buckets[0].To == nil {
- t.Fatal("expected To to be != nil")
- }
- if *dateRangeRes.Buckets[0].To != 1.325376e+12 {
- t.Errorf("expected %v; got: %v", 1.325376e+12, *dateRangeRes.Buckets[0].To)
- }
- if dateRangeRes.Buckets[0].ToAsString != "2012-01-01T00:00:00.000Z" {
- t.Errorf("expected %q; got: %q", "2012-01-01T00:00:00.000Z", dateRangeRes.Buckets[0].ToAsString)
- }
- if dateRangeRes.Buckets[1].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, dateRangeRes.Buckets[1].DocCount)
- }
- if dateRangeRes.Buckets[1].From == nil {
- t.Fatal("expected From to be != nil")
- }
- if *dateRangeRes.Buckets[1].From != 1.325376e+12 {
- t.Errorf("expected From = %v; got: %v", 1.325376e+12, *dateRangeRes.Buckets[1].From)
- }
- if dateRangeRes.Buckets[1].FromAsString != "2012-01-01T00:00:00.000Z" {
- t.Errorf("expected FromAsString = %q; got: %q", "2012-01-01T00:00:00.000Z", dateRangeRes.Buckets[1].FromAsString)
- }
- if dateRangeRes.Buckets[1].To == nil {
- t.Fatal("expected To to be != nil")
- }
- if *dateRangeRes.Buckets[1].To != 1.3569984e+12 {
- t.Errorf("expected To = %v; got: %v", 1.3569984e+12, *dateRangeRes.Buckets[1].To)
- }
- if dateRangeRes.Buckets[1].ToAsString != "2013-01-01T00:00:00.000Z" {
- t.Errorf("expected ToAsString = %q; got: %q", "2013-01-01T00:00:00.000Z", dateRangeRes.Buckets[1].ToAsString)
- }
- if dateRangeRes.Buckets[2].DocCount != 0 {
- t.Errorf("expected %d; got: %d", 0, dateRangeRes.Buckets[2].DocCount)
- }
- if dateRangeRes.Buckets[2].To != nil {
- t.Fatal("expected To to be nil")
- }
- if dateRangeRes.Buckets[2].From == nil {
- t.Fatal("expected From to be != nil")
- }
- if *dateRangeRes.Buckets[2].From != 1.3569984e+12 {
- t.Errorf("expected %v; got: %v", 1.3569984e+12, *dateRangeRes.Buckets[2].From)
- }
- if dateRangeRes.Buckets[2].FromAsString != "2013-01-01T00:00:00.000Z" {
- t.Errorf("expected %q; got: %q", "2013-01-01T00:00:00.000Z", dateRangeRes.Buckets[2].FromAsString)
- }
-
- // missingTags
- missingRes, found := agg.Missing("missingTags")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if missingRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if missingRes.DocCount != 0 {
- t.Errorf("expected searchResult.Aggregations[\"missingTags\"].DocCount = %v; got %v", 0, missingRes.DocCount)
- }
-
- // retweetsHisto
- histoRes, found := agg.Histogram("retweetsHisto")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if histoRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(histoRes.Buckets) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(histoRes.Buckets))
- }
- if histoRes.Buckets[0].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, histoRes.Buckets[0].DocCount)
- }
- if histoRes.Buckets[0].Key != 0.0 {
- t.Errorf("expected %v; got: %v", 0.0, histoRes.Buckets[0].Key)
- }
- if histoRes.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, histoRes.Buckets[1].DocCount)
- }
- if histoRes.Buckets[1].Key != 100.0 {
- t.Errorf("expected %v; got: %+v", 100.0, histoRes.Buckets[1].Key)
- }
-
- // dateHisto
- dateHistoRes, found := agg.DateHistogram("dateHisto")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if dateHistoRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(dateHistoRes.Buckets) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(dateHistoRes.Buckets))
- }
- if dateHistoRes.Buckets[0].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, dateHistoRes.Buckets[0].DocCount)
- }
- if dateHistoRes.Buckets[0].Key != 1.29384e+12 {
- t.Errorf("expected %v; got: %v", 1.29384e+12, dateHistoRes.Buckets[0].Key)
- }
- if dateHistoRes.Buckets[0].KeyAsString == nil {
- t.Fatalf("expected != nil; got: %q", dateHistoRes.Buckets[0].KeyAsString)
- }
- if *dateHistoRes.Buckets[0].KeyAsString != "2011-01-01T00:00:00.000Z" {
- t.Errorf("expected %q; got: %q", "2011-01-01T00:00:00.000Z", *dateHistoRes.Buckets[0].KeyAsString)
- }
- if dateHistoRes.Buckets[1].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, dateHistoRes.Buckets[1].DocCount)
- }
- if dateHistoRes.Buckets[1].Key != 1.325376e+12 {
- t.Errorf("expected %v; got: %v", 1.325376e+12, dateHistoRes.Buckets[1].Key)
- }
- if dateHistoRes.Buckets[1].KeyAsString == nil {
- t.Fatalf("expected != nil; got: %q", dateHistoRes.Buckets[1].KeyAsString)
- }
- if *dateHistoRes.Buckets[1].KeyAsString != "2012-01-01T00:00:00.000Z" {
- t.Errorf("expected %q; got: %q", "2012-01-01T00:00:00.000Z", *dateHistoRes.Buckets[1].KeyAsString)
- }
-
- // topHits
- topTags, found := agg.Terms("top-tags")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if topTags == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if topTags.DocCountErrorUpperBound != 0 {
- t.Errorf("expected %v; got: %v", 0, topTags.DocCountErrorUpperBound)
- }
- if topTags.SumOfOtherDocCount != 1 {
- t.Errorf("expected %v; got: %v", 1, topTags.SumOfOtherDocCount)
- }
- if len(topTags.Buckets) != 3 {
- t.Fatalf("expected %d; got: %d", 3, len(topTags.Buckets))
- }
- if topTags.Buckets[0].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, topTags.Buckets[0].DocCount)
- }
- if topTags.Buckets[0].Key != "golang" {
- t.Errorf("expected %v; got: %v", "golang", topTags.Buckets[0].Key)
- }
- topHits, found := topTags.Buckets[0].TopHits("top_tag_hits")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if topHits == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if topHits.Hits == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if topHits.Hits.TotalHits != 2 {
- t.Errorf("expected %d; got: %d", 2, topHits.Hits.TotalHits)
- }
- if topHits.Hits.Hits == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(topHits.Hits.Hits) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(topHits.Hits.Hits))
- }
- hit := topHits.Hits.Hits[0]
- if !found {
- t.Fatalf("expected %v; got: %v", true, found)
- }
- if hit == nil {
- t.Fatal("expected != nil; got: nil")
- }
- var tw tweet
- if err := json.Unmarshal(*hit.Source, &tw); err != nil {
- t.Fatalf("expected no error; got: %v", err)
- }
- if tw.Message != "Welcome to Golang and Elasticsearch." {
- t.Errorf("expected %q; got: %q", "Welcome to Golang and Elasticsearch.", tw.Message)
- }
- if topTags.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, topTags.Buckets[1].DocCount)
- }
- if topTags.Buckets[1].Key != "cycling" {
- t.Errorf("expected %v; got: %v", "cycling", topTags.Buckets[1].Key)
- }
- topHits, found = topTags.Buckets[1].TopHits("top_tag_hits")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if topHits == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if topHits.Hits == nil {
- t.Fatal("expected != nil; got nil")
- }
- if topHits.Hits.TotalHits != 1 {
- t.Errorf("expected %d; got: %d", 1, topHits.Hits.TotalHits)
- }
- if topTags.Buckets[2].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, topTags.Buckets[2].DocCount)
- }
- if topTags.Buckets[2].Key != "elasticsearch" {
- t.Errorf("expected %v; got: %v", "elasticsearch", topTags.Buckets[2].Key)
- }
- topHits, found = topTags.Buckets[2].TopHits("top_tag_hits")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if topHits == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if topHits.Hits == nil {
- t.Fatal("expected != nil; got: nil")
- }
- if topHits.Hits.TotalHits != 1 {
- t.Errorf("expected %d; got: %d", 1, topHits.Hits.TotalHits)
- }
-
- // viewport via geo_bounds (1.3.0 has an error in that it doesn't output the aggregation name)
- geoBoundsRes, found := agg.GeoBounds("viewport")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if geoBoundsRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
-
- // geohashed via geohash
- geoHashRes, found := agg.GeoHash("geohashed")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if geoHashRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
-
- // Filters agg "countByUser" (unnamed)
- countByUserAggRes, found := agg.Filters("countByUser")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if countByUserAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(countByUserAggRes.Buckets) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(countByUserAggRes.Buckets))
- }
- if len(countByUserAggRes.NamedBuckets) != 0 {
- t.Fatalf("expected %d; got: %d", 0, len(countByUserAggRes.NamedBuckets))
- }
- if countByUserAggRes.Buckets[0].DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, countByUserAggRes.Buckets[0].DocCount)
- }
- if countByUserAggRes.Buckets[1].DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, countByUserAggRes.Buckets[1].DocCount)
- }
-
- // Filters agg "countByUser2" (named)
- countByUser2AggRes, found := agg.Filters("countByUser2")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if countByUser2AggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if len(countByUser2AggRes.Buckets) != 0 {
- t.Fatalf("expected %d; got: %d", 0, len(countByUser2AggRes.Buckets))
- }
- if len(countByUser2AggRes.NamedBuckets) != 2 {
- t.Fatalf("expected %d; got: %d", 2, len(countByUser2AggRes.NamedBuckets))
- }
- b, found := countByUser2AggRes.NamedBuckets["olivere"]
- if !found {
- t.Fatalf("expected bucket %q; got: %v", "olivere", found)
- }
- if b == nil {
- t.Fatalf("expected bucket %q; got: %v", "olivere", b)
- }
- if b.DocCount != 2 {
- t.Errorf("expected %d; got: %d", 2, b.DocCount)
- }
- b, found = countByUser2AggRes.NamedBuckets["sandrae"]
- if !found {
- t.Fatalf("expected bucket %q; got: %v", "sandrae", found)
- }
- if b == nil {
- t.Fatalf("expected bucket %q; got: %v", "sandrae", b)
- }
- if b.DocCount != 1 {
- t.Errorf("expected %d; got: %d", 1, b.DocCount)
- }
-
- compositeAggRes, found := agg.Composite("composite")
- if !found {
- t.Errorf("expected %v; got: %v", true, found)
- }
- if compositeAggRes == nil {
- t.Fatalf("expected != nil; got: nil")
- }
- if want, have := 3, len(compositeAggRes.Buckets); want != have {
- t.Fatalf("expected %d; got: %d", want, have)
- }
-}
-
-// TestAggsMarshal ensures that marshaling aggregations back into a string
-// does not yield base64 encoded data. See https://github.com/olivere/elastic/issues/51
-// and https://groups.google.com/forum/#!topic/Golang-Nuts/38ShOlhxAYY for details.
-func TestAggsMarshal(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere",
- Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Image: "http://golang.org/doc/gopher/gophercolor.png",
- Tags: []string{"golang", "elasticsearch"},
- Location: "48.1333,11.5667", // lat,lon
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- dhagg := NewDateHistogramAggregation().Field("created").Interval("year")
-
- // Run query
- builder := client.Search().Index(testIndexName).Query(all)
- builder = builder.Aggregation("dhagg", dhagg)
- searchResult, err := builder.Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.TotalHits() != 1 {
- t.Errorf("expected Hits.TotalHits = %d; got: %d", 1, searchResult.TotalHits())
- }
- if _, found := searchResult.Aggregations["dhagg"]; !found {
- t.Fatalf("expected aggregation %q", "dhagg")
- }
- buf, err := json.Marshal(searchResult)
- if err != nil {
- t.Fatal(err)
- }
- s := string(buf)
- if i := strings.Index(s, `{"dhagg":{"buckets":[{"key_as_string":"2012-01-01`); i < 0 {
- t.Errorf("expected to serialize aggregation into string; got: %v", s)
- }
-}
-
-func TestAggsMetricsMin(t *testing.T) {
- s := `{
- "min_price": {
- "value": 10
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Min("min_price")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(10) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(10), *agg.Value)
- }
-}
-
-func TestAggsMetricsMax(t *testing.T) {
- s := `{
- "max_price": {
- "value": 35
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Max("max_price")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(35) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(35), *agg.Value)
- }
-}
-
-func TestAggsMetricsSum(t *testing.T) {
- s := `{
- "intraday_return": {
- "value": 2.18
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Sum("intraday_return")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(2.18) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(2.18), *agg.Value)
- }
-}
-
-func TestAggsMetricsAvg(t *testing.T) {
- s := `{
- "avg_grade": {
- "value": 75
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Avg("avg_grade")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(75) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(75), *agg.Value)
- }
-}
-
-func TestAggsMetricsValueCount(t *testing.T) {
- s := `{
- "grades_count": {
- "value": 10
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.ValueCount("grades_count")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(10) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(10), *agg.Value)
- }
-}
-
-func TestAggsMetricsCardinality(t *testing.T) {
- s := `{
- "author_count": {
- "value": 12
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Cardinality("author_count")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(12) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(12), *agg.Value)
- }
-}
-
-func TestAggsMetricsStats(t *testing.T) {
- s := `{
- "grades_stats": {
- "count": 6,
- "min": 60,
- "max": 98,
- "avg": 78.5,
- "sum": 471
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Stats("grades_stats")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Count != int64(6) {
- t.Fatalf("expected aggregation Count = %v; got: %v", int64(6), agg.Count)
- }
- if agg.Min == nil {
- t.Fatalf("expected aggregation Min != nil; got: %v", agg.Min)
- }
- if *agg.Min != float64(60) {
- t.Fatalf("expected aggregation Min = %v; got: %v", float64(60), *agg.Min)
- }
- if agg.Max == nil {
- t.Fatalf("expected aggregation Max != nil; got: %v", agg.Max)
- }
- if *agg.Max != float64(98) {
- t.Fatalf("expected aggregation Max = %v; got: %v", float64(98), *agg.Max)
- }
- if agg.Avg == nil {
- t.Fatalf("expected aggregation Avg != nil; got: %v", agg.Avg)
- }
- if *agg.Avg != float64(78.5) {
- t.Fatalf("expected aggregation Avg = %v; got: %v", float64(78.5), *agg.Avg)
- }
- if agg.Sum == nil {
- t.Fatalf("expected aggregation Sum != nil; got: %v", agg.Sum)
- }
- if *agg.Sum != float64(471) {
- t.Fatalf("expected aggregation Sum = %v; got: %v", float64(471), *agg.Sum)
- }
-}
-
-func TestAggsMetricsExtendedStats(t *testing.T) {
- s := `{
- "grades_stats": {
- "count": 6,
- "min": 72,
- "max": 117.6,
- "avg": 94.2,
- "sum": 565.2,
- "sum_of_squares": 54551.51999999999,
- "variance": 218.2799999999976,
- "std_deviation": 14.774302013969987
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.ExtendedStats("grades_stats")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Count != int64(6) {
- t.Fatalf("expected aggregation Count = %v; got: %v", int64(6), agg.Count)
- }
- if agg.Min == nil {
- t.Fatalf("expected aggregation Min != nil; got: %v", agg.Min)
- }
- if *agg.Min != float64(72) {
- t.Fatalf("expected aggregation Min = %v; got: %v", float64(72), *agg.Min)
- }
- if agg.Max == nil {
- t.Fatalf("expected aggregation Max != nil; got: %v", agg.Max)
- }
- if *agg.Max != float64(117.6) {
- t.Fatalf("expected aggregation Max = %v; got: %v", float64(117.6), *agg.Max)
- }
- if agg.Avg == nil {
- t.Fatalf("expected aggregation Avg != nil; got: %v", agg.Avg)
- }
- if *agg.Avg != float64(94.2) {
- t.Fatalf("expected aggregation Avg = %v; got: %v", float64(94.2), *agg.Avg)
- }
- if agg.Sum == nil {
- t.Fatalf("expected aggregation Sum != nil; got: %v", agg.Sum)
- }
- if *agg.Sum != float64(565.2) {
- t.Fatalf("expected aggregation Sum = %v; got: %v", float64(565.2), *agg.Sum)
- }
- if agg.SumOfSquares == nil {
- t.Fatalf("expected aggregation sum_of_squares != nil; got: %v", agg.SumOfSquares)
- }
- if *agg.SumOfSquares != float64(54551.51999999999) {
- t.Fatalf("expected aggregation sum_of_squares = %v; got: %v", float64(54551.51999999999), *agg.SumOfSquares)
- }
- if agg.Variance == nil {
- t.Fatalf("expected aggregation Variance != nil; got: %v", agg.Variance)
- }
- if *agg.Variance != float64(218.2799999999976) {
- t.Fatalf("expected aggregation Variance = %v; got: %v", float64(218.2799999999976), *agg.Variance)
- }
- if agg.StdDeviation == nil {
- t.Fatalf("expected aggregation StdDeviation != nil; got: %v", agg.StdDeviation)
- }
- if *agg.StdDeviation != float64(14.774302013969987) {
- t.Fatalf("expected aggregation StdDeviation = %v; got: %v", float64(14.774302013969987), *agg.StdDeviation)
- }
-}
-
-func TestAggsMatrixStats(t *testing.T) {
- s := `{
- "matrixstats": {
- "fields": [{
- "name": "income",
- "count": 50,
- "mean": 51985.1,
- "variance": 7.383377037755103E7,
- "skewness": 0.5595114003506483,
- "kurtosis": 2.5692365287787124,
- "covariance": {
- "income": 7.383377037755103E7,
- "poverty": -21093.65836734694
- },
- "correlation": {
- "income": 1.0,
- "poverty": -0.8352655256272504
- }
- }, {
- "name": "poverty",
- "count": 51,
- "mean": 12.732000000000001,
- "variance": 8.637730612244896,
- "skewness": 0.4516049811903419,
- "kurtosis": 2.8615929677997767,
- "covariance": {
- "income": -21093.65836734694,
- "poverty": 8.637730612244896
- },
- "correlation": {
- "income": -0.8352655256272504,
- "poverty": 1.0
- }
- }]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.MatrixStats("matrixstats")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if want, got := 2, len(agg.Fields); want != got {
- t.Fatalf("expected aggregaton len(Fields) = %v; got: %v", want, got)
- }
- field := agg.Fields[0]
- if want, got := "income", field.Name; want != got {
- t.Fatalf("expected aggregation field name == %q; got: %q", want, got)
- }
- if want, got := int64(50), field.Count; want != got {
- t.Fatalf("expected aggregation field count == %v; got: %v", want, got)
- }
- if want, got := 51985.1, field.Mean; want != got {
- t.Fatalf("expected aggregation field mean == %v; got: %v", want, got)
- }
- if want, got := 7.383377037755103e7, field.Variance; want != got {
- t.Fatalf("expected aggregation field variance == %v; got: %v", want, got)
- }
- if want, got := 0.5595114003506483, field.Skewness; want != got {
- t.Fatalf("expected aggregation field skewness == %v; got: %v", want, got)
- }
- if want, got := 2.5692365287787124, field.Kurtosis; want != got {
- t.Fatalf("expected aggregation field kurtosis == %v; got: %v", want, got)
- }
- if field.Covariance == nil {
- t.Fatalf("expected aggregation field covariance != nil; got: %v", nil)
- }
- if want, got := 7.383377037755103e7, field.Covariance["income"]; want != got {
- t.Fatalf("expected aggregation field covariance == %v; got: %v", want, got)
- }
- if want, got := -21093.65836734694, field.Covariance["poverty"]; want != got {
- t.Fatalf("expected aggregation field covariance == %v; got: %v", want, got)
- }
- if field.Correlation == nil {
- t.Fatalf("expected aggregation field correlation != nil; got: %v", nil)
- }
- if want, got := 1.0, field.Correlation["income"]; want != got {
- t.Fatalf("expected aggregation field correlation == %v; got: %v", want, got)
- }
- if want, got := -0.8352655256272504, field.Correlation["poverty"]; want != got {
- t.Fatalf("expected aggregation field correlation == %v; got: %v", want, got)
- }
- field = agg.Fields[1]
- if want, got := "poverty", field.Name; want != got {
- t.Fatalf("expected aggregation field name == %q; got: %q", want, got)
- }
- if want, got := int64(51), field.Count; want != got {
- t.Fatalf("expected aggregation field count == %v; got: %v", want, got)
- }
-}
-
-func TestAggsMetricsPercentiles(t *testing.T) {
- s := `{
- "load_time_outlier": {
- "values" : {
- "1.0": 15,
- "5.0": 20,
- "25.0": 23,
- "50.0": 25,
- "75.0": 29,
- "95.0": 60,
- "99.0": 150
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Percentiles("load_time_outlier")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Values == nil {
- t.Fatalf("expected aggregation Values != nil; got: %v", agg.Values)
- }
- if len(agg.Values) != 7 {
- t.Fatalf("expected %d aggregation Values; got: %d", 7, len(agg.Values))
- }
- if agg.Values["1.0"] != float64(15) {
- t.Errorf("expected aggregation value for \"1.0\" = %v; got: %v", float64(15), agg.Values["1.0"])
- }
- if agg.Values["5.0"] != float64(20) {
- t.Errorf("expected aggregation value for \"5.0\" = %v; got: %v", float64(20), agg.Values["5.0"])
- }
- if agg.Values["25.0"] != float64(23) {
- t.Errorf("expected aggregation value for \"25.0\" = %v; got: %v", float64(23), agg.Values["25.0"])
- }
- if agg.Values["50.0"] != float64(25) {
- t.Errorf("expected aggregation value for \"50.0\" = %v; got: %v", float64(25), agg.Values["50.0"])
- }
- if agg.Values["75.0"] != float64(29) {
- t.Errorf("expected aggregation value for \"75.0\" = %v; got: %v", float64(29), agg.Values["75.0"])
- }
- if agg.Values["95.0"] != float64(60) {
- t.Errorf("expected aggregation value for \"95.0\" = %v; got: %v", float64(60), agg.Values["95.0"])
- }
- if agg.Values["99.0"] != float64(150) {
- t.Errorf("expected aggregation value for \"99.0\" = %v; got: %v", float64(150), agg.Values["99.0"])
- }
-}
-
-func TestAggsMetricsPercentileRanks(t *testing.T) {
- s := `{
- "load_time_outlier": {
- "values" : {
- "15": 92,
- "30": 100
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.PercentileRanks("load_time_outlier")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Values == nil {
- t.Fatalf("expected aggregation Values != nil; got: %v", agg.Values)
- }
- if len(agg.Values) != 2 {
- t.Fatalf("expected %d aggregation Values; got: %d", 7, len(agg.Values))
- }
- if agg.Values["15"] != float64(92) {
- t.Errorf("expected aggregation value for \"15\" = %v; got: %v", float64(92), agg.Values["15"])
- }
- if agg.Values["30"] != float64(100) {
- t.Errorf("expected aggregation value for \"30\" = %v; got: %v", float64(100), agg.Values["30"])
- }
-}
-
-func TestAggsMetricsTopHits(t *testing.T) {
- s := `{
- "top-tags": {
- "buckets": [
- {
- "key": "windows-7",
- "doc_count": 25365,
- "top_tags_hits": {
- "hits": {
- "total": 25365,
- "max_score": 1,
- "hits": [
- {
- "_index": "stack",
- "_type": "question",
- "_id": "602679",
- "_score": 1,
- "_source": {
- "title": "Windows port opening"
- },
- "sort": [
- 1370143231177
- ]
- }
- ]
- }
- }
- },
- {
- "key": "linux",
- "doc_count": 18342,
- "top_tags_hits": {
- "hits": {
- "total": 18342,
- "max_score": 1,
- "hits": [
- {
- "_index": "stack",
- "_type": "question",
- "_id": "602672",
- "_score": 1,
- "_source": {
- "title": "Ubuntu RFID Screensaver lock-unlock"
- },
- "sort": [
- 1370143379747
- ]
- }
- ]
- }
- }
- },
- {
- "key": "windows",
- "doc_count": 18119,
- "top_tags_hits": {
- "hits": {
- "total": 18119,
- "max_score": 1,
- "hits": [
- {
- "_index": "stack",
- "_type": "question",
- "_id": "602678",
- "_score": 1,
- "_source": {
- "title": "If I change my computers date / time, what could be affected?"
- },
- "sort": [
- 1370142868283
- ]
- }
- ]
- }
- }
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Terms("top-tags")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 3 {
- t.Errorf("expected %d bucket entries; got: %d", 3, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != "windows-7" {
- t.Errorf("expected bucket key = %q; got: %q", "windows-7", agg.Buckets[0].Key)
- }
- if agg.Buckets[1].Key != "linux" {
- t.Errorf("expected bucket key = %q; got: %q", "linux", agg.Buckets[1].Key)
- }
- if agg.Buckets[2].Key != "windows" {
- t.Errorf("expected bucket key = %q; got: %q", "windows", agg.Buckets[2].Key)
- }
-
- // Sub-aggregation of top-hits
- subAgg, found := agg.Buckets[0].TopHits("top_tags_hits")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Hits == nil {
- t.Fatalf("expected sub aggregation Hits != nil; got: %v", subAgg.Hits)
- }
- if subAgg.Hits.TotalHits != 25365 {
- t.Fatalf("expected sub aggregation Hits.TotalHits = %d; got: %d", 25365, subAgg.Hits.TotalHits)
- }
- if subAgg.Hits.MaxScore == nil {
- t.Fatalf("expected sub aggregation Hits.MaxScore != %v; got: %v", nil, *subAgg.Hits.MaxScore)
- }
- if *subAgg.Hits.MaxScore != float64(1.0) {
- t.Fatalf("expected sub aggregation Hits.MaxScore = %v; got: %v", float64(1.0), *subAgg.Hits.MaxScore)
- }
-
- subAgg, found = agg.Buckets[1].TopHits("top_tags_hits")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Hits == nil {
- t.Fatalf("expected sub aggregation Hits != nil; got: %v", subAgg.Hits)
- }
- if subAgg.Hits.TotalHits != 18342 {
- t.Fatalf("expected sub aggregation Hits.TotalHits = %d; got: %d", 18342, subAgg.Hits.TotalHits)
- }
- if subAgg.Hits.MaxScore == nil {
- t.Fatalf("expected sub aggregation Hits.MaxScore != %v; got: %v", nil, *subAgg.Hits.MaxScore)
- }
- if *subAgg.Hits.MaxScore != float64(1.0) {
- t.Fatalf("expected sub aggregation Hits.MaxScore = %v; got: %v", float64(1.0), *subAgg.Hits.MaxScore)
- }
-
- subAgg, found = agg.Buckets[2].TopHits("top_tags_hits")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Hits == nil {
- t.Fatalf("expected sub aggregation Hits != nil; got: %v", subAgg.Hits)
- }
- if subAgg.Hits.TotalHits != 18119 {
- t.Fatalf("expected sub aggregation Hits.TotalHits = %d; got: %d", 18119, subAgg.Hits.TotalHits)
- }
- if subAgg.Hits.MaxScore == nil {
- t.Fatalf("expected sub aggregation Hits.MaxScore != %v; got: %v", nil, *subAgg.Hits.MaxScore)
- }
- if *subAgg.Hits.MaxScore != float64(1.0) {
- t.Fatalf("expected sub aggregation Hits.MaxScore = %v; got: %v", float64(1.0), *subAgg.Hits.MaxScore)
- }
-}
-
-func TestAggsBucketGlobal(t *testing.T) {
- s := `{
- "all_products" : {
- "doc_count" : 100,
- "avg_price" : {
- "value" : 56.3
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Global("all_products")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 100 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 100, agg.DocCount)
- }
-
- // Sub-aggregation
- subAgg, found := agg.Avg("avg_price")
- if !found {
- t.Fatalf("expected sub-aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub-aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Value == nil {
- t.Fatalf("expected sub-aggregation value != nil; got: %v", subAgg.Value)
- }
- if *subAgg.Value != float64(56.3) {
- t.Fatalf("expected sub-aggregation value = %v; got: %v", float64(56.3), *subAgg.Value)
- }
-}
-
-func TestAggsBucketFilter(t *testing.T) {
- s := `{
- "in_stock_products" : {
- "doc_count" : 100,
- "avg_price" : { "value" : 56.3 }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Filter("in_stock_products")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 100 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 100, agg.DocCount)
- }
-
- // Sub-aggregation
- subAgg, found := agg.Avg("avg_price")
- if !found {
- t.Fatalf("expected sub-aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub-aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Value == nil {
- t.Fatalf("expected sub-aggregation value != nil; got: %v", subAgg.Value)
- }
- if *subAgg.Value != float64(56.3) {
- t.Fatalf("expected sub-aggregation value = %v; got: %v", float64(56.3), *subAgg.Value)
- }
-}
-
-func TestAggsBucketFiltersWithBuckets(t *testing.T) {
- s := `{
- "messages" : {
- "buckets" : [
- {
- "doc_count" : 34,
- "monthly" : {
- "buckets" : []
- }
- },
- {
- "doc_count" : 439,
- "monthly" : {
- "buckets" : []
- }
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Filters("messages")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != %v; got: %v", nil, agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Fatalf("expected %d buckets; got: %d", 2, len(agg.Buckets))
- }
-
- if agg.Buckets[0].DocCount != 34 {
- t.Fatalf("expected DocCount = %d; got: %d", 34, agg.Buckets[0].DocCount)
- }
- subAgg, found := agg.Buckets[0].Histogram("monthly")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != %v; got: %v", nil, subAgg)
- }
-
- if agg.Buckets[1].DocCount != 439 {
- t.Fatalf("expected DocCount = %d; got: %d", 439, agg.Buckets[1].DocCount)
- }
- subAgg, found = agg.Buckets[1].Histogram("monthly")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != %v; got: %v", nil, subAgg)
- }
-}
-
-func TestAggsBucketFiltersWithNamedBuckets(t *testing.T) {
- s := `{
- "messages" : {
- "buckets" : {
- "errors" : {
- "doc_count" : 34,
- "monthly" : {
- "buckets" : []
- }
- },
- "warnings" : {
- "doc_count" : 439,
- "monthly" : {
- "buckets" : []
- }
- }
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Filters("messages")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.NamedBuckets == nil {
- t.Fatalf("expected aggregation buckets != %v; got: %v", nil, agg.NamedBuckets)
- }
- if len(agg.NamedBuckets) != 2 {
- t.Fatalf("expected %d buckets; got: %d", 2, len(agg.NamedBuckets))
- }
-
- if agg.NamedBuckets["errors"].DocCount != 34 {
- t.Fatalf("expected DocCount = %d; got: %d", 34, agg.NamedBuckets["errors"].DocCount)
- }
- subAgg, found := agg.NamedBuckets["errors"].Histogram("monthly")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != %v; got: %v", nil, subAgg)
- }
-
- if agg.NamedBuckets["warnings"].DocCount != 439 {
- t.Fatalf("expected DocCount = %d; got: %d", 439, agg.NamedBuckets["warnings"].DocCount)
- }
- subAgg, found = agg.NamedBuckets["warnings"].Histogram("monthly")
- if !found {
- t.Fatalf("expected sub aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub aggregation != %v; got: %v", nil, subAgg)
- }
-}
-
-func TestAggsBucketMissing(t *testing.T) {
- s := `{
- "products_without_a_price" : {
- "doc_count" : 10
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Missing("products_without_a_price")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 10 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 10, agg.DocCount)
- }
-}
-
-func TestAggsBucketNested(t *testing.T) {
- s := `{
- "resellers": {
- "min_price": {
- "value" : 350
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Nested("resellers")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 0 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 0, agg.DocCount)
- }
-
- // Sub-aggregation
- subAgg, found := agg.Avg("min_price")
- if !found {
- t.Fatalf("expected sub-aggregation to be found; got: %v", found)
- }
- if subAgg == nil {
- t.Fatalf("expected sub-aggregation != nil; got: %v", subAgg)
- }
- if subAgg.Value == nil {
- t.Fatalf("expected sub-aggregation value != nil; got: %v", subAgg.Value)
- }
- if *subAgg.Value != float64(350) {
- t.Fatalf("expected sub-aggregation value = %v; got: %v", float64(350), *subAgg.Value)
- }
-}
-
-func TestAggsBucketReverseNested(t *testing.T) {
- s := `{
- "comment_to_issue": {
- "doc_count" : 10
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.ReverseNested("comment_to_issue")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 10 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 10, agg.DocCount)
- }
-}
-
-func TestAggsBucketChildren(t *testing.T) {
- s := `{
- "to-answers": {
- "doc_count" : 10
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Children("to-answers")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 10 {
- t.Fatalf("expected aggregation DocCount = %d; got: %d", 10, agg.DocCount)
- }
-}
-
-func TestAggsBucketTerms(t *testing.T) {
- s := `{
- "users" : {
- "doc_count_error_upper_bound" : 1,
- "sum_other_doc_count" : 2,
- "buckets" : [ {
- "key" : "olivere",
- "doc_count" : 2
- }, {
- "key" : "sandrae",
- "doc_count" : 1
- } ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Terms("users")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != "olivere" {
- t.Errorf("expected key %q; got: %q", "olivere", agg.Buckets[0].Key)
- }
- if agg.Buckets[0].DocCount != 2 {
- t.Errorf("expected doc count %d; got: %d", 2, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != "sandrae" {
- t.Errorf("expected key %q; got: %q", "sandrae", agg.Buckets[1].Key)
- }
- if agg.Buckets[1].DocCount != 1 {
- t.Errorf("expected doc count %d; got: %d", 1, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketTermsWithNumericKeys(t *testing.T) {
- s := `{
- "users" : {
- "doc_count_error_upper_bound" : 1,
- "sum_other_doc_count" : 2,
- "buckets" : [ {
- "key" : 17,
- "doc_count" : 2
- }, {
- "key" : 21,
- "doc_count" : 1
- } ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Terms("users")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != float64(17) {
- t.Errorf("expected key %v; got: %v", 17, agg.Buckets[0].Key)
- }
- if got, err := agg.Buckets[0].KeyNumber.Int64(); err != nil {
- t.Errorf("expected to convert key to int64; got: %v", err)
- } else if got != 17 {
- t.Errorf("expected key %v; got: %v", 17, agg.Buckets[0].Key)
- }
- if agg.Buckets[0].DocCount != 2 {
- t.Errorf("expected doc count %d; got: %d", 2, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != float64(21) {
- t.Errorf("expected key %v; got: %v", 21, agg.Buckets[1].Key)
- }
- if got, err := agg.Buckets[1].KeyNumber.Int64(); err != nil {
- t.Errorf("expected to convert key to int64; got: %v", err)
- } else if got != 21 {
- t.Errorf("expected key %v; got: %v", 21, agg.Buckets[1].Key)
- }
- if agg.Buckets[1].DocCount != 1 {
- t.Errorf("expected doc count %d; got: %d", 1, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketTermsWithBoolKeys(t *testing.T) {
- s := `{
- "users" : {
- "doc_count_error_upper_bound" : 1,
- "sum_other_doc_count" : 2,
- "buckets" : [ {
- "key" : true,
- "doc_count" : 2
- }, {
- "key" : false,
- "doc_count" : 1
- } ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Terms("users")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != true {
- t.Errorf("expected key %v; got: %v", true, agg.Buckets[0].Key)
- }
- if agg.Buckets[0].DocCount != 2 {
- t.Errorf("expected doc count %d; got: %d", 2, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != false {
- t.Errorf("expected key %v; got: %v", false, agg.Buckets[1].Key)
- }
- if agg.Buckets[1].DocCount != 1 {
- t.Errorf("expected doc count %d; got: %d", 1, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketSignificantTerms(t *testing.T) {
- s := `{
- "significantCrimeTypes" : {
- "doc_count": 47347,
- "buckets" : [
- {
- "key": "Bicycle theft",
- "doc_count": 3640,
- "score": 0.371235374214817,
- "bg_count": 66799
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.SignificantTerms("significantCrimeTypes")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 47347 {
- t.Fatalf("expected aggregation DocCount != %d; got: %d", 47347, agg.DocCount)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 1 {
- t.Errorf("expected %d bucket entries; got: %d", 1, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != "Bicycle theft" {
- t.Errorf("expected key = %q; got: %q", "Bicycle theft", agg.Buckets[0].Key)
- }
- if agg.Buckets[0].DocCount != 3640 {
- t.Errorf("expected doc count = %d; got: %d", 3640, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[0].Score != float64(0.371235374214817) {
- t.Errorf("expected score = %v; got: %v", float64(0.371235374214817), agg.Buckets[0].Score)
- }
- if agg.Buckets[0].BgCount != 66799 {
- t.Errorf("expected BgCount = %d; got: %d", 66799, agg.Buckets[0].BgCount)
- }
-}
-
-func TestAggsBucketSampler(t *testing.T) {
- s := `{
- "sample" : {
- "doc_count": 1000,
- "keywords": {
- "doc_count": 1000,
- "buckets" : [
- {
- "key": "bend",
- "doc_count": 58,
- "score": 37.982536582524276,
- "bg_count": 103
- }
- ]
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Sampler("sample")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.DocCount != 1000 {
- t.Fatalf("expected aggregation DocCount != %d; got: %d", 1000, agg.DocCount)
- }
- sub, found := agg.Aggregations["keywords"]
- if !found {
- t.Fatalf("expected sub aggregation %q", "keywords")
- }
- if sub == nil {
- t.Fatalf("expected sub aggregation %q; got: %v", "keywords", sub)
- }
-}
-
-func TestAggsBucketRange(t *testing.T) {
- s := `{
- "price_ranges" : {
- "buckets": [
- {
- "to": 50,
- "doc_count": 2
- },
- {
- "from": 50,
- "to": 100,
- "doc_count": 4
- },
- {
- "from": 100,
- "doc_count": 4
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Range("price_ranges")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 3 {
- t.Errorf("expected %d bucket entries; got: %d", 3, len(agg.Buckets))
- }
- if agg.Buckets[0].From != nil {
- t.Errorf("expected From = %v; got: %v", nil, agg.Buckets[0].From)
- }
- if agg.Buckets[0].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[0].To)
- }
- if *agg.Buckets[0].To != float64(50) {
- t.Errorf("expected To = %v; got: %v", float64(50), *agg.Buckets[0].To)
- }
- if agg.Buckets[0].DocCount != 2 {
- t.Errorf("expected DocCount = %d; got: %d", 2, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[1].From)
- }
- if *agg.Buckets[1].From != float64(50) {
- t.Errorf("expected From = %v; got: %v", float64(50), *agg.Buckets[1].From)
- }
- if agg.Buckets[1].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[1].To)
- }
- if *agg.Buckets[1].To != float64(100) {
- t.Errorf("expected To = %v; got: %v", float64(100), *agg.Buckets[1].To)
- }
- if agg.Buckets[1].DocCount != 4 {
- t.Errorf("expected DocCount = %d; got: %d", 4, agg.Buckets[1].DocCount)
- }
- if agg.Buckets[2].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[2].From)
- }
- if *agg.Buckets[2].From != float64(100) {
- t.Errorf("expected From = %v; got: %v", float64(100), *agg.Buckets[2].From)
- }
- if agg.Buckets[2].To != nil {
- t.Errorf("expected To = %v; got: %v", nil, agg.Buckets[2].To)
- }
- if agg.Buckets[2].DocCount != 4 {
- t.Errorf("expected DocCount = %d; got: %d", 4, agg.Buckets[2].DocCount)
- }
-}
-
-func TestAggsBucketDateRange(t *testing.T) {
- s := `{
- "range": {
- "buckets": [
- {
- "to": 1.3437792E+12,
- "to_as_string": "08-2012",
- "doc_count": 7
- },
- {
- "from": 1.3437792E+12,
- "from_as_string": "08-2012",
- "doc_count": 2
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.DateRange("range")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].From != nil {
- t.Errorf("expected From = %v; got: %v", nil, agg.Buckets[0].From)
- }
- if agg.Buckets[0].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[0].To)
- }
- if *agg.Buckets[0].To != float64(1.3437792E+12) {
- t.Errorf("expected To = %v; got: %v", float64(1.3437792E+12), *agg.Buckets[0].To)
- }
- if agg.Buckets[0].ToAsString != "08-2012" {
- t.Errorf("expected ToAsString = %q; got: %q", "08-2012", agg.Buckets[0].ToAsString)
- }
- if agg.Buckets[0].DocCount != 7 {
- t.Errorf("expected DocCount = %d; got: %d", 7, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[1].From)
- }
- if *agg.Buckets[1].From != float64(1.3437792E+12) {
- t.Errorf("expected From = %v; got: %v", float64(1.3437792E+12), *agg.Buckets[1].From)
- }
- if agg.Buckets[1].FromAsString != "08-2012" {
- t.Errorf("expected FromAsString = %q; got: %q", "08-2012", agg.Buckets[1].FromAsString)
- }
- if agg.Buckets[1].To != nil {
- t.Errorf("expected To = %v; got: %v", nil, agg.Buckets[1].To)
- }
- if agg.Buckets[1].DocCount != 2 {
- t.Errorf("expected DocCount = %d; got: %d", 2, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketIPRange(t *testing.T) {
- s := `{
- "ip_ranges": {
- "buckets" : [
- {
- "to": 167772165,
- "to_as_string": "10.0.0.5",
- "doc_count": 4
- },
- {
- "from": 167772165,
- "from_as_string": "10.0.0.5",
- "doc_count": 6
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.IPRange("ip_ranges")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].From != nil {
- t.Errorf("expected From = %v; got: %v", nil, agg.Buckets[0].From)
- }
- if agg.Buckets[0].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[0].To)
- }
- if *agg.Buckets[0].To != float64(167772165) {
- t.Errorf("expected To = %v; got: %v", float64(167772165), *agg.Buckets[0].To)
- }
- if agg.Buckets[0].ToAsString != "10.0.0.5" {
- t.Errorf("expected ToAsString = %q; got: %q", "10.0.0.5", agg.Buckets[0].ToAsString)
- }
- if agg.Buckets[0].DocCount != 4 {
- t.Errorf("expected DocCount = %d; got: %d", 4, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[1].From)
- }
- if *agg.Buckets[1].From != float64(167772165) {
- t.Errorf("expected From = %v; got: %v", float64(167772165), *agg.Buckets[1].From)
- }
- if agg.Buckets[1].FromAsString != "10.0.0.5" {
- t.Errorf("expected FromAsString = %q; got: %q", "10.0.0.5", agg.Buckets[1].FromAsString)
- }
- if agg.Buckets[1].To != nil {
- t.Errorf("expected To = %v; got: %v", nil, agg.Buckets[1].To)
- }
- if agg.Buckets[1].DocCount != 6 {
- t.Errorf("expected DocCount = %d; got: %d", 6, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketHistogram(t *testing.T) {
- s := `{
- "prices" : {
- "buckets": [
- {
- "key": 0,
- "doc_count": 2
- },
- {
- "key": 50,
- "doc_count": 4
- },
- {
- "key": 150,
- "doc_count": 3
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Histogram("prices")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 3 {
- t.Errorf("expected %d buckets; got: %d", 3, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != 0 {
- t.Errorf("expected key = %v; got: %v", 0, agg.Buckets[0].Key)
- }
- if agg.Buckets[0].KeyAsString != nil {
- t.Fatalf("expected key_as_string = %v; got: %q", nil, *agg.Buckets[0].KeyAsString)
- }
- if agg.Buckets[0].DocCount != 2 {
- t.Errorf("expected doc count = %d; got: %d", 2, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != 50 {
- t.Errorf("expected key = %v; got: %v", 50, agg.Buckets[1].Key)
- }
- if agg.Buckets[1].KeyAsString != nil {
- t.Fatalf("expected key_as_string = %v; got: %q", nil, *agg.Buckets[1].KeyAsString)
- }
- if agg.Buckets[1].DocCount != 4 {
- t.Errorf("expected doc count = %d; got: %d", 4, agg.Buckets[1].DocCount)
- }
- if agg.Buckets[2].Key != 150 {
- t.Errorf("expected key = %v; got: %v", 150, agg.Buckets[2].Key)
- }
- if agg.Buckets[2].KeyAsString != nil {
- t.Fatalf("expected key_as_string = %v; got: %q", nil, *agg.Buckets[2].KeyAsString)
- }
- if agg.Buckets[2].DocCount != 3 {
- t.Errorf("expected doc count = %d; got: %d", 3, agg.Buckets[2].DocCount)
- }
-}
-
-func TestAggsBucketDateHistogram(t *testing.T) {
- s := `{
- "articles_over_time": {
- "buckets": [
- {
- "key_as_string": "2013-02-02",
- "key": 1328140800000,
- "doc_count": 1
- },
- {
- "key_as_string": "2013-03-02",
- "key": 1330646400000,
- "doc_count": 2
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.DateHistogram("articles_over_time")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != 1328140800000 {
- t.Errorf("expected key %v; got: %v", 1328140800000, agg.Buckets[0].Key)
- }
- if agg.Buckets[0].KeyAsString == nil {
- t.Fatalf("expected key_as_string != nil; got: %v", agg.Buckets[0].KeyAsString)
- }
- if *agg.Buckets[0].KeyAsString != "2013-02-02" {
- t.Errorf("expected key_as_string %q; got: %q", "2013-02-02", *agg.Buckets[0].KeyAsString)
- }
- if agg.Buckets[0].DocCount != 1 {
- t.Errorf("expected doc count %d; got: %d", 1, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != 1330646400000 {
- t.Errorf("expected key %v; got: %v", 1330646400000, agg.Buckets[1].Key)
- }
- if agg.Buckets[1].KeyAsString == nil {
- t.Fatalf("expected key_as_string != nil; got: %v", agg.Buckets[1].KeyAsString)
- }
- if *agg.Buckets[1].KeyAsString != "2013-03-02" {
- t.Errorf("expected key_as_string %q; got: %q", "2013-03-02", *agg.Buckets[1].KeyAsString)
- }
- if agg.Buckets[1].DocCount != 2 {
- t.Errorf("expected doc count %d; got: %d", 2, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsMetricsGeoBounds(t *testing.T) {
- s := `{
- "viewport": {
- "bounds": {
- "top_left": {
- "lat": 80.45,
- "lon": -160.22
- },
- "bottom_right": {
- "lat": 40.65,
- "lon": 42.57
- }
- }
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.GeoBounds("viewport")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Bounds.TopLeft.Latitude != float64(80.45) {
- t.Fatalf("expected Bounds.TopLeft.Latitude != %v; got: %v", float64(80.45), agg.Bounds.TopLeft.Latitude)
- }
- if agg.Bounds.TopLeft.Longitude != float64(-160.22) {
- t.Fatalf("expected Bounds.TopLeft.Longitude != %v; got: %v", float64(-160.22), agg.Bounds.TopLeft.Longitude)
- }
- if agg.Bounds.BottomRight.Latitude != float64(40.65) {
- t.Fatalf("expected Bounds.BottomRight.Latitude != %v; got: %v", float64(40.65), agg.Bounds.BottomRight.Latitude)
- }
- if agg.Bounds.BottomRight.Longitude != float64(42.57) {
- t.Fatalf("expected Bounds.BottomRight.Longitude != %v; got: %v", float64(42.57), agg.Bounds.BottomRight.Longitude)
- }
-}
-
-func TestAggsBucketGeoHash(t *testing.T) {
- s := `{
- "myLarge-GrainGeoHashGrid": {
- "buckets": [
- {
- "key": "svz",
- "doc_count": 10964
- },
- {
- "key": "sv8",
- "doc_count": 3198
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.GeoHash("myLarge-GrainGeoHashGrid")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(agg.Buckets))
- }
- if agg.Buckets[0].Key != "svz" {
- t.Errorf("expected key %q; got: %q", "svz", agg.Buckets[0].Key)
- }
- if agg.Buckets[0].DocCount != 10964 {
- t.Errorf("expected doc count %d; got: %d", 10964, agg.Buckets[0].DocCount)
- }
- if agg.Buckets[1].Key != "sv8" {
- t.Errorf("expected key %q; got: %q", "sv8", agg.Buckets[1].Key)
- }
- if agg.Buckets[1].DocCount != 3198 {
- t.Errorf("expected doc count %d; got: %d", 3198, agg.Buckets[1].DocCount)
- }
-}
-
-func TestAggsBucketGeoDistance(t *testing.T) {
- s := `{
- "rings" : {
- "buckets": [
- {
- "unit": "km",
- "to": 100.0,
- "doc_count": 3
- },
- {
- "unit": "km",
- "from": 100.0,
- "to": 300.0,
- "doc_count": 1
- },
- {
- "unit": "km",
- "from": 300.0,
- "doc_count": 7
- }
- ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.GeoDistance("rings")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Buckets == nil {
- t.Fatalf("expected aggregation buckets != nil; got: %v", agg.Buckets)
- }
- if len(agg.Buckets) != 3 {
- t.Errorf("expected %d bucket entries; got: %d", 3, len(agg.Buckets))
- }
- if agg.Buckets[0].From != nil {
- t.Errorf("expected From = %v; got: %v", nil, agg.Buckets[0].From)
- }
- if agg.Buckets[0].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[0].To)
- }
- if *agg.Buckets[0].To != float64(100.0) {
- t.Errorf("expected To = %v; got: %v", float64(100.0), *agg.Buckets[0].To)
- }
- if agg.Buckets[0].DocCount != 3 {
- t.Errorf("expected DocCount = %d; got: %d", 4, agg.Buckets[0].DocCount)
- }
-
- if agg.Buckets[1].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[1].From)
- }
- if *agg.Buckets[1].From != float64(100.0) {
- t.Errorf("expected From = %v; got: %v", float64(100.0), *agg.Buckets[1].From)
- }
- if agg.Buckets[1].To == nil {
- t.Errorf("expected To != %v; got: %v", nil, agg.Buckets[1].To)
- }
- if *agg.Buckets[1].To != float64(300.0) {
- t.Errorf("expected From = %v; got: %v", float64(300.0), *agg.Buckets[1].To)
- }
- if agg.Buckets[1].DocCount != 1 {
- t.Errorf("expected DocCount = %d; got: %d", 1, agg.Buckets[1].DocCount)
- }
-
- if agg.Buckets[2].From == nil {
- t.Errorf("expected From != %v; got: %v", nil, agg.Buckets[2].From)
- }
- if *agg.Buckets[2].From != float64(300.0) {
- t.Errorf("expected From = %v; got: %v", float64(300.0), *agg.Buckets[2].From)
- }
- if agg.Buckets[2].To != nil {
- t.Errorf("expected To = %v; got: %v", nil, agg.Buckets[2].To)
- }
- if agg.Buckets[2].DocCount != 7 {
- t.Errorf("expected DocCount = %d; got: %d", 7, agg.Buckets[2].DocCount)
- }
-}
-
-func TestAggsSubAggregates(t *testing.T) {
- rs := `{
- "users" : {
- "doc_count_error_upper_bound" : 1,
- "sum_other_doc_count" : 2,
- "buckets" : [ {
- "key" : "olivere",
- "doc_count" : 2,
- "ts" : {
- "buckets" : [ {
- "key_as_string" : "2012-01-01T00:00:00.000Z",
- "key" : 1325376000000,
- "doc_count" : 2
- } ]
- }
- }, {
- "key" : "sandrae",
- "doc_count" : 1,
- "ts" : {
- "buckets" : [ {
- "key_as_string" : "2011-01-01T00:00:00.000Z",
- "key" : 1293840000000,
- "doc_count" : 1
- } ]
- }
- } ]
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(rs), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- // Access top-level aggregation
- users, found := aggs.Terms("users")
- if !found {
- t.Fatalf("expected users aggregation to be found; got: %v", found)
- }
- if users == nil {
- t.Fatalf("expected users aggregation; got: %v", users)
- }
- if users.Buckets == nil {
- t.Fatalf("expected users buckets; got: %v", users.Buckets)
- }
- if len(users.Buckets) != 2 {
- t.Errorf("expected %d bucket entries; got: %d", 2, len(users.Buckets))
- }
- if users.Buckets[0].Key != "olivere" {
- t.Errorf("expected key %q; got: %q", "olivere", users.Buckets[0].Key)
- }
- if users.Buckets[0].DocCount != 2 {
- t.Errorf("expected doc count %d; got: %d", 2, users.Buckets[0].DocCount)
- }
- if users.Buckets[1].Key != "sandrae" {
- t.Errorf("expected key %q; got: %q", "sandrae", users.Buckets[1].Key)
- }
- if users.Buckets[1].DocCount != 1 {
- t.Errorf("expected doc count %d; got: %d", 1, users.Buckets[1].DocCount)
- }
-
- // Access sub-aggregation
- ts, found := users.Buckets[0].DateHistogram("ts")
- if !found {
- t.Fatalf("expected ts aggregation to be found; got: %v", found)
- }
- if ts == nil {
- t.Fatalf("expected ts aggregation; got: %v", ts)
- }
- if ts.Buckets == nil {
- t.Fatalf("expected ts buckets; got: %v", ts.Buckets)
- }
- if len(ts.Buckets) != 1 {
- t.Errorf("expected %d bucket entries; got: %d", 1, len(ts.Buckets))
- }
- if ts.Buckets[0].Key != 1325376000000 {
- t.Errorf("expected key %v; got: %v", 1325376000000, ts.Buckets[0].Key)
- }
- if ts.Buckets[0].KeyAsString == nil {
- t.Fatalf("expected key_as_string != %v; got: %v", nil, ts.Buckets[0].KeyAsString)
- }
- if *ts.Buckets[0].KeyAsString != "2012-01-01T00:00:00.000Z" {
- t.Errorf("expected key_as_string %q; got: %q", "2012-01-01T00:00:00.000Z", *ts.Buckets[0].KeyAsString)
- }
-}
-
-func TestAggsPipelineAvgBucket(t *testing.T) {
- s := `{
- "avg_monthly_sales" : {
- "value" : 328.33333333333333
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.AvgBucket("avg_monthly_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(328.33333333333333) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(328.33333333333333), *agg.Value)
- }
-}
-
-func TestAggsPipelineSumBucket(t *testing.T) {
- s := `{
- "sum_monthly_sales" : {
- "value" : 985
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.SumBucket("sum_monthly_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(985) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(985), *agg.Value)
- }
-}
-
-func TestAggsPipelineMaxBucket(t *testing.T) {
- s := `{
- "max_monthly_sales" : {
- "keys": ["2015/01/01 00:00:00"],
- "value" : 550
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.MaxBucket("max_monthly_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if len(agg.Keys) != 1 {
- t.Fatalf("expected 1 key; got: %d", len(agg.Keys))
- }
- if got, want := agg.Keys[0], "2015/01/01 00:00:00"; got != want {
- t.Fatalf("expected key %q; got: %v (%T)", want, got, got)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(550) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(550), *agg.Value)
- }
-}
-
-func TestAggsPipelineMinBucket(t *testing.T) {
- s := `{
- "min_monthly_sales" : {
- "keys": ["2015/02/01 00:00:00"],
- "value" : 60
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.MinBucket("min_monthly_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if len(agg.Keys) != 1 {
- t.Fatalf("expected 1 key; got: %d", len(agg.Keys))
- }
- if got, want := agg.Keys[0], "2015/02/01 00:00:00"; got != want {
- t.Fatalf("expected key %q; got: %v (%T)", want, got, got)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(60) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(60), *agg.Value)
- }
-}
-
-func TestAggsPipelineMovAvg(t *testing.T) {
- s := `{
- "the_movavg" : {
- "value" : 12.0
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.MovAvg("the_movavg")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(12.0) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(12.0), *agg.Value)
- }
-}
-
-func TestAggsPipelineDerivative(t *testing.T) {
- s := `{
- "sales_deriv" : {
- "value" : 315
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Derivative("sales_deriv")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(315) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(315), *agg.Value)
- }
-}
-
-func TestAggsPipelinePercentilesBucket(t *testing.T) {
- s := `{
- "sales_percentiles": {
- "values": {
- "25.0": 100,
- "50.0": 200,
- "75.0": 300
- }
- }
-}`
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.PercentilesBucket("sales_percentiles")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if len(agg.Values) != 3 {
- t.Fatalf("expected aggregation map with three entries; got: %v", agg.Values)
- }
-}
-
-func TestAggsPipelineStatsBucket(t *testing.T) {
- s := `{
- "stats_monthly_sales": {
- "count": 3,
- "min": 60.0,
- "max": 550.0,
- "avg": 328.3333333333333,
- "sum": 985.0
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.StatsBucket("stats_monthly_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Count != 3 {
- t.Fatalf("expected aggregation count = %v; got: %v", 3, agg.Count)
- }
- if agg.Min == nil {
- t.Fatalf("expected aggregation min != nil; got: %v", agg.Min)
- }
- if *agg.Min != float64(60.0) {
- t.Fatalf("expected aggregation min = %v; got: %v", float64(60.0), *agg.Min)
- }
- if agg.Max == nil {
- t.Fatalf("expected aggregation max != nil; got: %v", agg.Max)
- }
- if *agg.Max != float64(550.0) {
- t.Fatalf("expected aggregation max = %v; got: %v", float64(550.0), *agg.Max)
- }
- if agg.Avg == nil {
- t.Fatalf("expected aggregation avg != nil; got: %v", agg.Avg)
- }
- if *agg.Avg != float64(328.3333333333333) {
- t.Fatalf("expected aggregation average = %v; got: %v", float64(328.3333333333333), *agg.Avg)
- }
- if agg.Sum == nil {
- t.Fatalf("expected aggregation sum != nil; got: %v", agg.Sum)
- }
- if *agg.Sum != float64(985.0) {
- t.Fatalf("expected aggregation sum = %v; got: %v", float64(985.0), *agg.Sum)
- }
-}
-
-func TestAggsPipelineCumulativeSum(t *testing.T) {
- s := `{
- "cumulative_sales" : {
- "value" : 550
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.CumulativeSum("cumulative_sales")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(550) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(550), *agg.Value)
- }
-}
-
-func TestAggsPipelineBucketScript(t *testing.T) {
- s := `{
- "t-shirt-percentage" : {
- "value" : 20
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.BucketScript("t-shirt-percentage")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(20) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(20), *agg.Value)
- }
-}
-
-func TestAggsPipelineSerialDiff(t *testing.T) {
- s := `{
- "the_diff" : {
- "value" : -722.0
- }
-}`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.SerialDiff("the_diff")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if agg.Value == nil {
- t.Fatalf("expected aggregation value != nil; got: %v", agg.Value)
- }
- if *agg.Value != float64(-722.0) {
- t.Fatalf("expected aggregation value = %v; got: %v", float64(20), *agg.Value)
- }
-}
-
-func TestAggsComposite(t *testing.T) {
- s := `{
- "the_composite" : {
- "buckets" : [
- {
- "key" : {
- "composite_users" : "olivere",
- "composite_retweets" : 0.0,
- "composite_created" : 1349856720000
- },
- "doc_count" : 1
- },
- {
- "key" : {
- "composite_users" : "olivere",
- "composite_retweets" : 108.0,
- "composite_created" : 1355333880000
- },
- "doc_count" : 1
- },
- {
- "key" : {
- "composite_users" : "sandrae",
- "composite_retweets" : 12.0,
- "composite_created" : 1321009080000
- },
- "doc_count" : 1
- }
- ]
- }
- }`
-
- aggs := new(Aggregations)
- err := json.Unmarshal([]byte(s), &aggs)
- if err != nil {
- t.Fatalf("expected no error decoding; got: %v", err)
- }
-
- agg, found := aggs.Composite("the_composite")
- if !found {
- t.Fatalf("expected aggregation to be found; got: %v", found)
- }
- if agg == nil {
- t.Fatalf("expected aggregation != nil; got: %v", agg)
- }
- if want, have := 3, len(agg.Buckets); want != have {
- t.Fatalf("expected aggregation buckets length = %v; got: %v", want, have)
- }
-
- // 1st bucket
- bucket := agg.Buckets[0]
- if want, have := int64(1), bucket.DocCount; want != have {
- t.Fatalf("expected aggregation bucket doc count = %v; got: %v", want, have)
- }
- if want, have := 3, len(bucket.Key); want != have {
- t.Fatalf("expected aggregation bucket key length = %v; got: %v", want, have)
- }
- v, found := bucket.Key["composite_users"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_users")
- }
- s, ok := v.(string)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := "olivere", s; want != have {
- t.Fatalf("expected to find bucket key value %q; got: %q", want, have)
- }
- v, found = bucket.Key["composite_retweets"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_retweets")
- }
- f, ok := v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 0.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
- v, found = bucket.Key["composite_created"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_created")
- }
- f, ok = v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 1349856720000.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
-
- // 2nd bucket
- bucket = agg.Buckets[1]
- if want, have := int64(1), bucket.DocCount; want != have {
- t.Fatalf("expected aggregation bucket doc count = %v; got: %v", want, have)
- }
- if want, have := 3, len(bucket.Key); want != have {
- t.Fatalf("expected aggregation bucket key length = %v; got: %v", want, have)
- }
- v, found = bucket.Key["composite_users"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_users")
- }
- s, ok = v.(string)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := "olivere", s; want != have {
- t.Fatalf("expected to find bucket key value %q; got: %q", want, have)
- }
- v, found = bucket.Key["composite_retweets"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_retweets")
- }
- f, ok = v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 108.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
- v, found = bucket.Key["composite_created"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_created")
- }
- f, ok = v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 1355333880000.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
-
- // 3rd bucket
- bucket = agg.Buckets[2]
- if want, have := int64(1), bucket.DocCount; want != have {
- t.Fatalf("expected aggregation bucket doc count = %v; got: %v", want, have)
- }
- if want, have := 3, len(bucket.Key); want != have {
- t.Fatalf("expected aggregation bucket key length = %v; got: %v", want, have)
- }
- v, found = bucket.Key["composite_users"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_users")
- }
- s, ok = v.(string)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := "sandrae", s; want != have {
- t.Fatalf("expected to find bucket key value %q; got: %q", want, have)
- }
- v, found = bucket.Key["composite_retweets"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_retweets")
- }
- f, ok = v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 12.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
- v, found = bucket.Key["composite_created"]
- if !found {
- t.Fatalf("expected to find bucket key %q", "composite_created")
- }
- f, ok = v.(float64)
- if !ok {
- t.Fatalf("expected to have bucket key of type string; got: %T", v)
- }
- if want, have := 1321009080000.0, f; want != have {
- t.Fatalf("expected to find bucket key value %v; got: %v", want, have)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_collapse_builder.go b/vendor/github.com/olivere/elastic/search_collapse_builder.go
deleted file mode 100644
index b3c628ba3..000000000
--- a/vendor/github.com/olivere/elastic/search_collapse_builder.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// CollapseBuilder enables field collapsing on a search request.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-collapse.html
-// for details.
-type CollapseBuilder struct {
- field string
- innerHit *InnerHit
- maxConcurrentGroupRequests *int
-}
-
-// NewCollapseBuilder creates a new CollapseBuilder.
-func NewCollapseBuilder(field string) *CollapseBuilder {
- return &CollapseBuilder{field: field}
-}
-
-// Field to collapse.
-func (b *CollapseBuilder) Field(field string) *CollapseBuilder {
- b.field = field
- return b
-}
-
-// InnerHit option to expand the collapsed results.
-func (b *CollapseBuilder) InnerHit(innerHit *InnerHit) *CollapseBuilder {
- b.innerHit = innerHit
- return b
-}
-
-// MaxConcurrentGroupRequests is the maximum number of group requests that are
-// allowed to be ran concurrently in the inner_hits phase.
-func (b *CollapseBuilder) MaxConcurrentGroupRequests(max int) *CollapseBuilder {
- b.maxConcurrentGroupRequests = &max
- return b
-}
-
-// Source generates the JSON serializable fragment for the CollapseBuilder.
-func (b *CollapseBuilder) Source() (interface{}, error) {
- // {
- // "field": "user",
- // "inner_hits": {
- // "name": "last_tweets",
- // "size": 5,
- // "sort": [{ "date": "asc" }]
- // },
- // "max_concurrent_group_searches": 4
- // }
- src := map[string]interface{}{
- "field": b.field,
- }
-
- if b.innerHit != nil {
- hits, err := b.innerHit.Source()
- if err != nil {
- return nil, err
- }
- src["inner_hits"] = hits
- }
-
- if b.maxConcurrentGroupRequests != nil {
- src["max_concurrent_group_searches"] = *b.maxConcurrentGroupRequests
- }
-
- return src, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_collapse_builder_test.go b/vendor/github.com/olivere/elastic/search_collapse_builder_test.go
deleted file mode 100644
index 0b74fadab..000000000
--- a/vendor/github.com/olivere/elastic/search_collapse_builder_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestCollapseBuilderSource(t *testing.T) {
- b := NewCollapseBuilder("user").
- InnerHit(NewInnerHit().Name("last_tweets").Size(5).Sort("date", true)).
- MaxConcurrentGroupRequests(4)
- src, err := b.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"field":"user","inner_hits":{"name":"last_tweets","size":5,"sort":[{"date":{"order":"asc"}}]},"max_concurrent_group_searches":4}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_bool.go b/vendor/github.com/olivere/elastic/search_queries_bool.go
deleted file mode 100644
index a1ff17596..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_bool.go
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "fmt"
-
-// A bool query matches documents matching boolean
-// combinations of other queries.
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-bool-query.html
-type BoolQuery struct {
- Query
- mustClauses []Query
- mustNotClauses []Query
- filterClauses []Query
- shouldClauses []Query
- boost *float64
- minimumShouldMatch string
- adjustPureNegative *bool
- queryName string
-}
-
-// Creates a new bool query.
-func NewBoolQuery() *BoolQuery {
- return &BoolQuery{
- mustClauses: make([]Query, 0),
- mustNotClauses: make([]Query, 0),
- filterClauses: make([]Query, 0),
- shouldClauses: make([]Query, 0),
- }
-}
-
-func (q *BoolQuery) Must(queries ...Query) *BoolQuery {
- q.mustClauses = append(q.mustClauses, queries...)
- return q
-}
-
-func (q *BoolQuery) MustNot(queries ...Query) *BoolQuery {
- q.mustNotClauses = append(q.mustNotClauses, queries...)
- return q
-}
-
-func (q *BoolQuery) Filter(filters ...Query) *BoolQuery {
- q.filterClauses = append(q.filterClauses, filters...)
- return q
-}
-
-func (q *BoolQuery) Should(queries ...Query) *BoolQuery {
- q.shouldClauses = append(q.shouldClauses, queries...)
- return q
-}
-
-func (q *BoolQuery) Boost(boost float64) *BoolQuery {
- q.boost = &boost
- return q
-}
-
-func (q *BoolQuery) MinimumShouldMatch(minimumShouldMatch string) *BoolQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-func (q *BoolQuery) MinimumNumberShouldMatch(minimumNumberShouldMatch int) *BoolQuery {
- q.minimumShouldMatch = fmt.Sprintf("%d", minimumNumberShouldMatch)
- return q
-}
-
-func (q *BoolQuery) AdjustPureNegative(adjustPureNegative bool) *BoolQuery {
- q.adjustPureNegative = &adjustPureNegative
- return q
-}
-
-func (q *BoolQuery) QueryName(queryName string) *BoolQuery {
- q.queryName = queryName
- return q
-}
-
-// Creates the query source for the bool query.
-func (q *BoolQuery) Source() (interface{}, error) {
- // {
- // "bool" : {
- // "must" : {
- // "term" : { "user" : "kimchy" }
- // },
- // "must_not" : {
- // "range" : {
- // "age" : { "from" : 10, "to" : 20 }
- // }
- // },
- // "filter" : [
- // ...
- // ]
- // "should" : [
- // {
- // "term" : { "tag" : "wow" }
- // },
- // {
- // "term" : { "tag" : "elasticsearch" }
- // }
- // ],
- // "minimum_should_match" : 1,
- // "boost" : 1.0
- // }
- // }
-
- query := make(map[string]interface{})
-
- boolClause := make(map[string]interface{})
- query["bool"] = boolClause
-
- // must
- if len(q.mustClauses) == 1 {
- src, err := q.mustClauses[0].Source()
- if err != nil {
- return nil, err
- }
- boolClause["must"] = src
- } else if len(q.mustClauses) > 1 {
- var clauses []interface{}
- for _, subQuery := range q.mustClauses {
- src, err := subQuery.Source()
- if err != nil {
- return nil, err
- }
- clauses = append(clauses, src)
- }
- boolClause["must"] = clauses
- }
-
- // must_not
- if len(q.mustNotClauses) == 1 {
- src, err := q.mustNotClauses[0].Source()
- if err != nil {
- return nil, err
- }
- boolClause["must_not"] = src
- } else if len(q.mustNotClauses) > 1 {
- var clauses []interface{}
- for _, subQuery := range q.mustNotClauses {
- src, err := subQuery.Source()
- if err != nil {
- return nil, err
- }
- clauses = append(clauses, src)
- }
- boolClause["must_not"] = clauses
- }
-
- // filter
- if len(q.filterClauses) == 1 {
- src, err := q.filterClauses[0].Source()
- if err != nil {
- return nil, err
- }
- boolClause["filter"] = src
- } else if len(q.filterClauses) > 1 {
- var clauses []interface{}
- for _, subQuery := range q.filterClauses {
- src, err := subQuery.Source()
- if err != nil {
- return nil, err
- }
- clauses = append(clauses, src)
- }
- boolClause["filter"] = clauses
- }
-
- // should
- if len(q.shouldClauses) == 1 {
- src, err := q.shouldClauses[0].Source()
- if err != nil {
- return nil, err
- }
- boolClause["should"] = src
- } else if len(q.shouldClauses) > 1 {
- var clauses []interface{}
- for _, subQuery := range q.shouldClauses {
- src, err := subQuery.Source()
- if err != nil {
- return nil, err
- }
- clauses = append(clauses, src)
- }
- boolClause["should"] = clauses
- }
-
- if q.boost != nil {
- boolClause["boost"] = *q.boost
- }
- if q.minimumShouldMatch != "" {
- boolClause["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.adjustPureNegative != nil {
- boolClause["adjust_pure_negative"] = *q.adjustPureNegative
- }
- if q.queryName != "" {
- boolClause["_name"] = q.queryName
- }
-
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_bool_test.go b/vendor/github.com/olivere/elastic/search_queries_bool_test.go
deleted file mode 100644
index cdcc38de1..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_bool_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestBoolQuery(t *testing.T) {
- q := NewBoolQuery()
- q = q.Must(NewTermQuery("tag", "wow"))
- q = q.MustNot(NewRangeQuery("age").From(10).To(20))
- q = q.Filter(NewTermQuery("account", "1"))
- q = q.Should(NewTermQuery("tag", "sometag"), NewTermQuery("tag", "sometagtag"))
- q = q.Boost(10)
- q = q.QueryName("Test")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"bool":{"_name":"Test","boost":10,"filter":{"term":{"account":"1"}},"must":{"term":{"tag":"wow"}},"must_not":{"range":{"age":{"from":10,"include_lower":true,"include_upper":true,"to":20}}},"should":[{"term":{"tag":"sometag"}},{"term":{"tag":"sometagtag"}}]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_boosting.go b/vendor/github.com/olivere/elastic/search_queries_boosting.go
deleted file mode 100644
index 0060a30a8..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_boosting.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// A boosting query can be used to effectively
-// demote results that match a given query.
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-boosting-query.html
-type BoostingQuery struct {
- Query
- positiveClause Query
- negativeClause Query
- negativeBoost *float64
- boost *float64
-}
-
-// Creates a new boosting query.
-func NewBoostingQuery() *BoostingQuery {
- return &BoostingQuery{}
-}
-
-func (q *BoostingQuery) Positive(positive Query) *BoostingQuery {
- q.positiveClause = positive
- return q
-}
-
-func (q *BoostingQuery) Negative(negative Query) *BoostingQuery {
- q.negativeClause = negative
- return q
-}
-
-func (q *BoostingQuery) NegativeBoost(negativeBoost float64) *BoostingQuery {
- q.negativeBoost = &negativeBoost
- return q
-}
-
-func (q *BoostingQuery) Boost(boost float64) *BoostingQuery {
- q.boost = &boost
- return q
-}
-
-// Creates the query source for the boosting query.
-func (q *BoostingQuery) Source() (interface{}, error) {
- // {
- // "boosting" : {
- // "positive" : {
- // "term" : {
- // "field1" : "value1"
- // }
- // },
- // "negative" : {
- // "term" : {
- // "field2" : "value2"
- // }
- // },
- // "negative_boost" : 0.2
- // }
- // }
-
- query := make(map[string]interface{})
-
- boostingClause := make(map[string]interface{})
- query["boosting"] = boostingClause
-
- // Negative and positive clause as well as negative boost
- // are mandatory in the Java client.
-
- // positive
- if q.positiveClause != nil {
- src, err := q.positiveClause.Source()
- if err != nil {
- return nil, err
- }
- boostingClause["positive"] = src
- }
-
- // negative
- if q.negativeClause != nil {
- src, err := q.negativeClause.Source()
- if err != nil {
- return nil, err
- }
- boostingClause["negative"] = src
- }
-
- if q.negativeBoost != nil {
- boostingClause["negative_boost"] = *q.negativeBoost
- }
-
- if q.boost != nil {
- boostingClause["boost"] = *q.boost
- }
-
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_boosting_test.go b/vendor/github.com/olivere/elastic/search_queries_boosting_test.go
deleted file mode 100644
index 6c7f263f4..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_boosting_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestBoostingQuery(t *testing.T) {
- q := NewBoostingQuery()
- q = q.Positive(NewTermQuery("tag", "wow"))
- q = q.Negative(NewRangeQuery("age").From(10).To(20))
- q = q.NegativeBoost(0.2)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"boosting":{"negative":{"range":{"age":{"from":10,"include_lower":true,"include_upper":true,"to":20}}},"negative_boost":0.2,"positive":{"term":{"tag":"wow"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_common_terms.go b/vendor/github.com/olivere/elastic/search_queries_common_terms.go
deleted file mode 100644
index 93a03de54..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_common_terms.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// CommonTermsQuery is a modern alternative to stopwords
-// which improves the precision and recall of search results
-// (by taking stopwords into account), without sacrificing performance.
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-common-terms-query.html
-type CommonTermsQuery struct {
- Query
- name string
- text interface{}
- cutoffFreq *float64
- highFreq *float64
- highFreqOp string
- highFreqMinimumShouldMatch string
- lowFreq *float64
- lowFreqOp string
- lowFreqMinimumShouldMatch string
- analyzer string
- boost *float64
- queryName string
-}
-
-// NewCommonTermsQuery creates and initializes a new common terms query.
-func NewCommonTermsQuery(name string, text interface{}) *CommonTermsQuery {
- return &CommonTermsQuery{name: name, text: text}
-}
-
-func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery {
- q.cutoffFreq = &f
- return q
-}
-
-func (q *CommonTermsQuery) HighFreq(f float64) *CommonTermsQuery {
- q.highFreq = &f
- return q
-}
-
-func (q *CommonTermsQuery) HighFreqOperator(op string) *CommonTermsQuery {
- q.highFreqOp = op
- return q
-}
-
-func (q *CommonTermsQuery) HighFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery {
- q.highFreqMinimumShouldMatch = minShouldMatch
- return q
-}
-
-func (q *CommonTermsQuery) LowFreq(f float64) *CommonTermsQuery {
- q.lowFreq = &f
- return q
-}
-
-func (q *CommonTermsQuery) LowFreqOperator(op string) *CommonTermsQuery {
- q.lowFreqOp = op
- return q
-}
-
-func (q *CommonTermsQuery) LowFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery {
- q.lowFreqMinimumShouldMatch = minShouldMatch
- return q
-}
-
-func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery {
- q.analyzer = analyzer
- return q
-}
-
-func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery {
- q.boost = &boost
- return q
-}
-
-func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery {
- q.queryName = queryName
- return q
-}
-
-// Creates the query source for the common query.
-func (q *CommonTermsQuery) Source() (interface{}, error) {
- // {
- // "common": {
- // "body": {
- // "query": "this is bonsai cool",
- // "cutoff_frequency": 0.001
- // }
- // }
- // }
- source := make(map[string]interface{})
- body := make(map[string]interface{})
- query := make(map[string]interface{})
-
- source["common"] = body
- body[q.name] = query
- query["query"] = q.text
-
- if q.cutoffFreq != nil {
- query["cutoff_frequency"] = *q.cutoffFreq
- }
- if q.highFreq != nil {
- query["high_freq"] = *q.highFreq
- }
- if q.highFreqOp != "" {
- query["high_freq_operator"] = q.highFreqOp
- }
- if q.lowFreq != nil {
- query["low_freq"] = *q.lowFreq
- }
- if q.lowFreqOp != "" {
- query["low_freq_operator"] = q.lowFreqOp
- }
- if q.lowFreqMinimumShouldMatch != "" || q.highFreqMinimumShouldMatch != "" {
- mm := make(map[string]interface{})
- if q.lowFreqMinimumShouldMatch != "" {
- mm["low_freq"] = q.lowFreqMinimumShouldMatch
- }
- if q.highFreqMinimumShouldMatch != "" {
- mm["high_freq"] = q.highFreqMinimumShouldMatch
- }
- query["minimum_should_match"] = mm
- }
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_common_terms_test.go b/vendor/github.com/olivere/elastic/search_queries_common_terms_test.go
deleted file mode 100644
index e841e7731..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_common_terms_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- _ "net/http"
- "testing"
-)
-
-func TestCommonTermsQuery(t *testing.T) {
- q := NewCommonTermsQuery("message", "Golang").CutoffFrequency(0.001)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"common":{"message":{"cutoff_frequency":0.001,"query":"Golang"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchQueriesCommonTermsQuery(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Common terms query
- q := NewCommonTermsQuery("message", "Golang")
- searchResult, err := client.Search().Index(testIndexName).Query(q).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 1 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 1, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 1 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 1, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_constant_score.go b/vendor/github.com/olivere/elastic/search_queries_constant_score.go
deleted file mode 100644
index 285d91817..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_constant_score.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ConstantScoreQuery is a query that wraps a filter and simply returns
-// a constant score equal to the query boost for every document in the filter.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-constant-score-query.html
-type ConstantScoreQuery struct {
- filter Query
- boost *float64
-}
-
-// ConstantScoreQuery creates and initializes a new constant score query.
-func NewConstantScoreQuery(filter Query) *ConstantScoreQuery {
- return &ConstantScoreQuery{
- filter: filter,
- }
-}
-
-// Boost sets the boost for this query. Documents matching this query
-// will (in addition to the normal weightings) have their score multiplied
-// by the boost provided.
-func (q *ConstantScoreQuery) Boost(boost float64) *ConstantScoreQuery {
- q.boost = &boost
- return q
-}
-
-// Source returns the query source.
-func (q *ConstantScoreQuery) Source() (interface{}, error) {
- // "constant_score" : {
- // "filter" : {
- // ....
- // },
- // "boost" : 1.5
- // }
-
- query := make(map[string]interface{})
-
- params := make(map[string]interface{})
- query["constant_score"] = params
-
- // filter
- src, err := q.filter.Source()
- if err != nil {
- return nil, err
- }
- params["filter"] = src
-
- // boost
- if q.boost != nil {
- params["boost"] = *q.boost
- }
-
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_constant_score_test.go b/vendor/github.com/olivere/elastic/search_queries_constant_score_test.go
deleted file mode 100644
index 6508a91fb..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_constant_score_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestConstantScoreQuery(t *testing.T) {
- q := NewConstantScoreQuery(NewTermQuery("user", "kimchy")).Boost(1.2)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"constant_score":{"boost":1.2,"filter":{"term":{"user":"kimchy"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_dis_max.go b/vendor/github.com/olivere/elastic/search_queries_dis_max.go
deleted file mode 100644
index 7a4f53a97..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_dis_max.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// DisMaxQuery is a query that generates the union of documents produced by
-// its subqueries, and that scores each document with the maximum score
-// for that document as produced by any subquery, plus a tie breaking
-// increment for any additional matching subqueries.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-dis-max-query.html
-type DisMaxQuery struct {
- queries []Query
- boost *float64
- tieBreaker *float64
- queryName string
-}
-
-// NewDisMaxQuery creates and initializes a new dis max query.
-func NewDisMaxQuery() *DisMaxQuery {
- return &DisMaxQuery{
- queries: make([]Query, 0),
- }
-}
-
-// Query adds one or more queries to the dis max query.
-func (q *DisMaxQuery) Query(queries ...Query) *DisMaxQuery {
- q.queries = append(q.queries, queries...)
- return q
-}
-
-// Boost sets the boost for this query. Documents matching this query will
-// (in addition to the normal weightings) have their score multiplied by
-// the boost provided.
-func (q *DisMaxQuery) Boost(boost float64) *DisMaxQuery {
- q.boost = &boost
- return q
-}
-
-// TieBreaker is the factor by which the score of each non-maximum disjunct
-// for a document is multiplied with and added into the final score.
-//
-// If non-zero, the value should be small, on the order of 0.1, which says
-// that 10 occurrences of word in a lower-scored field that is also in a
-// higher scored field is just as good as a unique word in the lower scored
-// field (i.e., one that is not in any higher scored field).
-func (q *DisMaxQuery) TieBreaker(tieBreaker float64) *DisMaxQuery {
- q.tieBreaker = &tieBreaker
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched filters per hit.
-func (q *DisMaxQuery) QueryName(queryName string) *DisMaxQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns the JSON serializable content for this query.
-func (q *DisMaxQuery) Source() (interface{}, error) {
- // {
- // "dis_max" : {
- // "tie_breaker" : 0.7,
- // "boost" : 1.2,
- // "queries" : {
- // {
- // "term" : { "age" : 34 }
- // },
- // {
- // "term" : { "age" : 35 }
- // }
- // ]
- // }
- // }
-
- query := make(map[string]interface{})
- params := make(map[string]interface{})
- query["dis_max"] = params
-
- if q.tieBreaker != nil {
- params["tie_breaker"] = *q.tieBreaker
- }
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- // queries
- var clauses []interface{}
- for _, subQuery := range q.queries {
- src, err := subQuery.Source()
- if err != nil {
- return nil, err
- }
- clauses = append(clauses, src)
- }
- params["queries"] = clauses
-
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_dis_max_test.go b/vendor/github.com/olivere/elastic/search_queries_dis_max_test.go
deleted file mode 100644
index 76ddfb079..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_dis_max_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestDisMaxQuery(t *testing.T) {
- q := NewDisMaxQuery()
- q = q.Query(NewTermQuery("age", 34), NewTermQuery("age", 35)).Boost(1.2).TieBreaker(0.7)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"dis_max":{"boost":1.2,"queries":[{"term":{"age":34}},{"term":{"age":35}}],"tie_breaker":0.7}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_exists.go b/vendor/github.com/olivere/elastic/search_queries_exists.go
deleted file mode 100644
index ac7378bad..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_exists.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ExistsQuery is a query that only matches on documents that the field
-// has a value in them.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-exists-query.html
-type ExistsQuery struct {
- name string
- queryName string
-}
-
-// NewExistsQuery creates and initializes a new dis max query.
-func NewExistsQuery(name string) *ExistsQuery {
- return &ExistsQuery{
- name: name,
- }
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched queries per hit.
-func (q *ExistsQuery) QueryName(queryName string) *ExistsQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns the JSON serializable content for this query.
-func (q *ExistsQuery) Source() (interface{}, error) {
- // {
- // "exists" : {
- // "field" : "user"
- // }
- // }
-
- query := make(map[string]interface{})
- params := make(map[string]interface{})
- query["exists"] = params
-
- params["field"] = q.name
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_exists_test.go b/vendor/github.com/olivere/elastic/search_queries_exists_test.go
deleted file mode 100644
index f2d047087..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_exists_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestExistsQuery(t *testing.T) {
- q := NewExistsQuery("user")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"exists":{"field":"user"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_fsq.go b/vendor/github.com/olivere/elastic/search_queries_fsq.go
deleted file mode 100644
index 4cabd9bd9..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_fsq.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// FunctionScoreQuery allows you to modify the score of documents that
-// are retrieved by a query. This can be useful if, for example,
-// a score function is computationally expensive and it is sufficient
-// to compute the score on a filtered set of documents.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html
-type FunctionScoreQuery struct {
- query Query
- filter Query
- boost *float64
- maxBoost *float64
- scoreMode string
- boostMode string
- filters []Query
- scoreFuncs []ScoreFunction
- minScore *float64
- weight *float64
-}
-
-// NewFunctionScoreQuery creates and initializes a new function score query.
-func NewFunctionScoreQuery() *FunctionScoreQuery {
- return &FunctionScoreQuery{
- filters: make([]Query, 0),
- scoreFuncs: make([]ScoreFunction, 0),
- }
-}
-
-// Query sets the query for the function score query.
-func (q *FunctionScoreQuery) Query(query Query) *FunctionScoreQuery {
- q.query = query
- return q
-}
-
-// Filter sets the filter for the function score query.
-func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery {
- q.filter = filter
- return q
-}
-
-// Add adds a score function that will execute on all the documents
-// matching the filter.
-func (q *FunctionScoreQuery) Add(filter Query, scoreFunc ScoreFunction) *FunctionScoreQuery {
- q.filters = append(q.filters, filter)
- q.scoreFuncs = append(q.scoreFuncs, scoreFunc)
- return q
-}
-
-// AddScoreFunc adds a score function that will execute the function on all documents.
-func (q *FunctionScoreQuery) AddScoreFunc(scoreFunc ScoreFunction) *FunctionScoreQuery {
- q.filters = append(q.filters, nil)
- q.scoreFuncs = append(q.scoreFuncs, scoreFunc)
- return q
-}
-
-// ScoreMode defines how results of individual score functions will be aggregated.
-// Can be first, avg, max, sum, min, or multiply.
-func (q *FunctionScoreQuery) ScoreMode(scoreMode string) *FunctionScoreQuery {
- q.scoreMode = scoreMode
- return q
-}
-
-// BoostMode defines how the combined result of score functions will
-// influence the final score together with the sub query score.
-func (q *FunctionScoreQuery) BoostMode(boostMode string) *FunctionScoreQuery {
- q.boostMode = boostMode
- return q
-}
-
-// MaxBoost is the maximum boost that will be applied by function score.
-func (q *FunctionScoreQuery) MaxBoost(maxBoost float64) *FunctionScoreQuery {
- q.maxBoost = &maxBoost
- return q
-}
-
-// Boost sets the boost for this query. Documents matching this query will
-// (in addition to the normal weightings) have their score multiplied by the
-// boost provided.
-func (q *FunctionScoreQuery) Boost(boost float64) *FunctionScoreQuery {
- q.boost = &boost
- return q
-}
-
-// MinScore sets the minimum score.
-func (q *FunctionScoreQuery) MinScore(minScore float64) *FunctionScoreQuery {
- q.minScore = &minScore
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *FunctionScoreQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["function_score"] = query
-
- if q.query != nil {
- src, err := q.query.Source()
- if err != nil {
- return nil, err
- }
- query["query"] = src
- }
- if q.filter != nil {
- src, err := q.filter.Source()
- if err != nil {
- return nil, err
- }
- query["filter"] = src
- }
-
- if len(q.filters) == 1 && q.filters[0] == nil {
- // Weight needs to be serialized on this level.
- if weight := q.scoreFuncs[0].GetWeight(); weight != nil {
- query["weight"] = weight
- }
- // Serialize the score function
- src, err := q.scoreFuncs[0].Source()
- if err != nil {
- return nil, err
- }
- query[q.scoreFuncs[0].Name()] = src
- } else {
- funcs := make([]interface{}, len(q.filters))
- for i, filter := range q.filters {
- hsh := make(map[string]interface{})
- if filter != nil {
- src, err := filter.Source()
- if err != nil {
- return nil, err
- }
- hsh["filter"] = src
- }
- // Weight needs to be serialized on this level.
- if weight := q.scoreFuncs[i].GetWeight(); weight != nil {
- hsh["weight"] = weight
- }
- // Serialize the score function
- src, err := q.scoreFuncs[i].Source()
- if err != nil {
- return nil, err
- }
- hsh[q.scoreFuncs[i].Name()] = src
- funcs[i] = hsh
- }
- query["functions"] = funcs
- }
-
- if q.scoreMode != "" {
- query["score_mode"] = q.scoreMode
- }
- if q.boostMode != "" {
- query["boost_mode"] = q.boostMode
- }
- if q.maxBoost != nil {
- query["max_boost"] = *q.maxBoost
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.minScore != nil {
- query["min_score"] = *q.minScore
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_fsq_score_funcs.go b/vendor/github.com/olivere/elastic/search_queries_fsq_score_funcs.go
deleted file mode 100644
index 84cc52de9..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_fsq_score_funcs.go
+++ /dev/null
@@ -1,567 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "strings"
-)
-
-// ScoreFunction is used in combination with the Function Score Query.
-type ScoreFunction interface {
- Name() string
- GetWeight() *float64 // returns the weight which must be serialized at the level of FunctionScoreQuery
- Source() (interface{}, error)
-}
-
-// -- Exponential Decay --
-
-// ExponentialDecayFunction builds an exponential decay score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html
-// for details.
-type ExponentialDecayFunction struct {
- fieldName string
- origin interface{}
- scale interface{}
- decay *float64
- offset interface{}
- multiValueMode string
- weight *float64
-}
-
-// NewExponentialDecayFunction creates a new ExponentialDecayFunction.
-func NewExponentialDecayFunction() *ExponentialDecayFunction {
- return &ExponentialDecayFunction{}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *ExponentialDecayFunction) Name() string {
- return "exp"
-}
-
-// FieldName specifies the name of the field to which this decay function is applied to.
-func (fn *ExponentialDecayFunction) FieldName(fieldName string) *ExponentialDecayFunction {
- fn.fieldName = fieldName
- return fn
-}
-
-// Origin defines the "central point" by which the decay function calculates
-// "distance".
-func (fn *ExponentialDecayFunction) Origin(origin interface{}) *ExponentialDecayFunction {
- fn.origin = origin
- return fn
-}
-
-// Scale defines the scale to be used with Decay.
-func (fn *ExponentialDecayFunction) Scale(scale interface{}) *ExponentialDecayFunction {
- fn.scale = scale
- return fn
-}
-
-// Decay defines how documents are scored at the distance given a Scale.
-// If no decay is defined, documents at the distance Scale will be scored 0.5.
-func (fn *ExponentialDecayFunction) Decay(decay float64) *ExponentialDecayFunction {
- fn.decay = &decay
- return fn
-}
-
-// Offset, if defined, computes the decay function only for a distance
-// greater than the defined offset.
-func (fn *ExponentialDecayFunction) Offset(offset interface{}) *ExponentialDecayFunction {
- fn.offset = offset
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *ExponentialDecayFunction) Weight(weight float64) *ExponentialDecayFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *ExponentialDecayFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// MultiValueMode specifies how the decay function should be calculated
-// on a field that has multiple values.
-// Valid modes are: min, max, avg, and sum.
-func (fn *ExponentialDecayFunction) MultiValueMode(mode string) *ExponentialDecayFunction {
- fn.multiValueMode = mode
- return fn
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *ExponentialDecayFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source[fn.fieldName] = params
- if fn.origin != nil {
- params["origin"] = fn.origin
- }
- params["scale"] = fn.scale
- if fn.decay != nil && *fn.decay > 0 {
- params["decay"] = *fn.decay
- }
- if fn.offset != nil {
- params["offset"] = fn.offset
- }
- if fn.multiValueMode != "" {
- source["multi_value_mode"] = fn.multiValueMode
- }
- return source, nil
-}
-
-// -- Gauss Decay --
-
-// GaussDecayFunction builds a gauss decay score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html
-// for details.
-type GaussDecayFunction struct {
- fieldName string
- origin interface{}
- scale interface{}
- decay *float64
- offset interface{}
- multiValueMode string
- weight *float64
-}
-
-// NewGaussDecayFunction returns a new GaussDecayFunction.
-func NewGaussDecayFunction() *GaussDecayFunction {
- return &GaussDecayFunction{}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *GaussDecayFunction) Name() string {
- return "gauss"
-}
-
-// FieldName specifies the name of the field to which this decay function is applied to.
-func (fn *GaussDecayFunction) FieldName(fieldName string) *GaussDecayFunction {
- fn.fieldName = fieldName
- return fn
-}
-
-// Origin defines the "central point" by which the decay function calculates
-// "distance".
-func (fn *GaussDecayFunction) Origin(origin interface{}) *GaussDecayFunction {
- fn.origin = origin
- return fn
-}
-
-// Scale defines the scale to be used with Decay.
-func (fn *GaussDecayFunction) Scale(scale interface{}) *GaussDecayFunction {
- fn.scale = scale
- return fn
-}
-
-// Decay defines how documents are scored at the distance given a Scale.
-// If no decay is defined, documents at the distance Scale will be scored 0.5.
-func (fn *GaussDecayFunction) Decay(decay float64) *GaussDecayFunction {
- fn.decay = &decay
- return fn
-}
-
-// Offset, if defined, computes the decay function only for a distance
-// greater than the defined offset.
-func (fn *GaussDecayFunction) Offset(offset interface{}) *GaussDecayFunction {
- fn.offset = offset
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *GaussDecayFunction) Weight(weight float64) *GaussDecayFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *GaussDecayFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// MultiValueMode specifies how the decay function should be calculated
-// on a field that has multiple values.
-// Valid modes are: min, max, avg, and sum.
-func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction {
- fn.multiValueMode = mode
- return fn
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *GaussDecayFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source[fn.fieldName] = params
- if fn.origin != nil {
- params["origin"] = fn.origin
- }
- params["scale"] = fn.scale
- if fn.decay != nil && *fn.decay > 0 {
- params["decay"] = *fn.decay
- }
- if fn.offset != nil {
- params["offset"] = fn.offset
- }
- if fn.multiValueMode != "" {
- source["multi_value_mode"] = fn.multiValueMode
- }
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return source, nil
-}
-
-// -- Linear Decay --
-
-// LinearDecayFunction builds a linear decay score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html
-// for details.
-type LinearDecayFunction struct {
- fieldName string
- origin interface{}
- scale interface{}
- decay *float64
- offset interface{}
- multiValueMode string
- weight *float64
-}
-
-// NewLinearDecayFunction initializes and returns a new LinearDecayFunction.
-func NewLinearDecayFunction() *LinearDecayFunction {
- return &LinearDecayFunction{}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *LinearDecayFunction) Name() string {
- return "linear"
-}
-
-// FieldName specifies the name of the field to which this decay function is applied to.
-func (fn *LinearDecayFunction) FieldName(fieldName string) *LinearDecayFunction {
- fn.fieldName = fieldName
- return fn
-}
-
-// Origin defines the "central point" by which the decay function calculates
-// "distance".
-func (fn *LinearDecayFunction) Origin(origin interface{}) *LinearDecayFunction {
- fn.origin = origin
- return fn
-}
-
-// Scale defines the scale to be used with Decay.
-func (fn *LinearDecayFunction) Scale(scale interface{}) *LinearDecayFunction {
- fn.scale = scale
- return fn
-}
-
-// Decay defines how documents are scored at the distance given a Scale.
-// If no decay is defined, documents at the distance Scale will be scored 0.5.
-func (fn *LinearDecayFunction) Decay(decay float64) *LinearDecayFunction {
- fn.decay = &decay
- return fn
-}
-
-// Offset, if defined, computes the decay function only for a distance
-// greater than the defined offset.
-func (fn *LinearDecayFunction) Offset(offset interface{}) *LinearDecayFunction {
- fn.offset = offset
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *LinearDecayFunction) Weight(weight float64) *LinearDecayFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *LinearDecayFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// MultiValueMode specifies how the decay function should be calculated
-// on a field that has multiple values.
-// Valid modes are: min, max, avg, and sum.
-func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction {
- fn.multiValueMode = mode
- return fn
-}
-
-// GetMultiValueMode returns how the decay function should be calculated
-// on a field that has multiple values.
-// Valid modes are: min, max, avg, and sum.
-func (fn *LinearDecayFunction) GetMultiValueMode() string {
- return fn.multiValueMode
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *LinearDecayFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source[fn.fieldName] = params
- if fn.origin != nil {
- params["origin"] = fn.origin
- }
- params["scale"] = fn.scale
- if fn.decay != nil && *fn.decay > 0 {
- params["decay"] = *fn.decay
- }
- if fn.offset != nil {
- params["offset"] = fn.offset
- }
- if fn.multiValueMode != "" {
- source["multi_value_mode"] = fn.multiValueMode
- }
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return source, nil
-}
-
-// -- Script --
-
-// ScriptFunction builds a script score function. It uses a script to
-// compute or influence the score of documents that match with the inner
-// query or filter.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_script_score
-// for details.
-type ScriptFunction struct {
- script *Script
- weight *float64
-}
-
-// NewScriptFunction initializes and returns a new ScriptFunction.
-func NewScriptFunction(script *Script) *ScriptFunction {
- return &ScriptFunction{
- script: script,
- }
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *ScriptFunction) Name() string {
- return "script_score"
-}
-
-// Script specifies the script to be executed.
-func (fn *ScriptFunction) Script(script *Script) *ScriptFunction {
- fn.script = script
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *ScriptFunction) Weight(weight float64) *ScriptFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *ScriptFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *ScriptFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if fn.script != nil {
- src, err := fn.script.Source()
- if err != nil {
- return nil, err
- }
- source["script"] = src
- }
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return source, nil
-}
-
-// -- Field value factor --
-
-// FieldValueFactorFunction is a function score function that allows you
-// to use a field from a document to influence the score.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_field_value_factor.
-type FieldValueFactorFunction struct {
- field string
- factor *float64
- missing *float64
- weight *float64
- modifier string
-}
-
-// NewFieldValueFactorFunction initializes and returns a new FieldValueFactorFunction.
-func NewFieldValueFactorFunction() *FieldValueFactorFunction {
- return &FieldValueFactorFunction{}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *FieldValueFactorFunction) Name() string {
- return "field_value_factor"
-}
-
-// Field is the field to be extracted from the document.
-func (fn *FieldValueFactorFunction) Field(field string) *FieldValueFactorFunction {
- fn.field = field
- return fn
-}
-
-// Factor is the (optional) factor to multiply the field with. If you do not
-// specify a factor, the default is 1.
-func (fn *FieldValueFactorFunction) Factor(factor float64) *FieldValueFactorFunction {
- fn.factor = &factor
- return fn
-}
-
-// Modifier to apply to the field value. It can be one of: none, log, log1p,
-// log2p, ln, ln1p, ln2p, square, sqrt, or reciprocal. Defaults to: none.
-func (fn *FieldValueFactorFunction) Modifier(modifier string) *FieldValueFactorFunction {
- fn.modifier = modifier
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *FieldValueFactorFunction) Weight(weight float64) *FieldValueFactorFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *FieldValueFactorFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// Missing is used if a document does not have that field.
-func (fn *FieldValueFactorFunction) Missing(missing float64) *FieldValueFactorFunction {
- fn.missing = &missing
- return fn
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *FieldValueFactorFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if fn.field != "" {
- source["field"] = fn.field
- }
- if fn.factor != nil {
- source["factor"] = *fn.factor
- }
- if fn.missing != nil {
- source["missing"] = *fn.missing
- }
- if fn.modifier != "" {
- source["modifier"] = strings.ToLower(fn.modifier)
- }
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return source, nil
-}
-
-// -- Weight Factor --
-
-// WeightFactorFunction builds a weight factor function that multiplies
-// the weight to the score.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_weight
-// for details.
-type WeightFactorFunction struct {
- weight float64
-}
-
-// NewWeightFactorFunction initializes and returns a new WeightFactorFunction.
-func NewWeightFactorFunction(weight float64) *WeightFactorFunction {
- return &WeightFactorFunction{weight: weight}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *WeightFactorFunction) Name() string {
- return "weight"
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *WeightFactorFunction) Weight(weight float64) *WeightFactorFunction {
- fn.weight = weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *WeightFactorFunction) GetWeight() *float64 {
- return &fn.weight
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *WeightFactorFunction) Source() (interface{}, error) {
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return fn.weight, nil
-}
-
-// -- Random --
-
-// RandomFunction builds a random score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_random
-// for details.
-type RandomFunction struct {
- seed interface{}
- weight *float64
-}
-
-// NewRandomFunction initializes and returns a new RandomFunction.
-func NewRandomFunction() *RandomFunction {
- return &RandomFunction{}
-}
-
-// Name represents the JSON field name under which the output of Source
-// needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
-func (fn *RandomFunction) Name() string {
- return "random_score"
-}
-
-// Seed is documented in 1.6 as a numeric value. However, in the source code
-// of the Java client, it also accepts strings. So we accept both here, too.
-func (fn *RandomFunction) Seed(seed interface{}) *RandomFunction {
- fn.seed = seed
- return fn
-}
-
-// Weight adjusts the score of the score function.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-function-score-query.html#_using_function_score
-// for details.
-func (fn *RandomFunction) Weight(weight float64) *RandomFunction {
- fn.weight = &weight
- return fn
-}
-
-// GetWeight returns the adjusted score. It is part of the ScoreFunction interface.
-// Returns nil if weight is not specified.
-func (fn *RandomFunction) GetWeight() *float64 {
- return fn.weight
-}
-
-// Source returns the serializable JSON data of this score function.
-func (fn *RandomFunction) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if fn.seed != nil {
- source["seed"] = fn.seed
- }
- // Notice that the weight has to be serialized in FunctionScoreQuery.
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_fsq_test.go b/vendor/github.com/olivere/elastic/search_queries_fsq_test.go
deleted file mode 100644
index 256752d18..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_fsq_test.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestFunctionScoreQuery(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- Add(NewTermQuery("name.last", "banon"), NewWeightFactorFunction(1.5)).
- AddScoreFunc(NewWeightFactorFunction(3)).
- AddScoreFunc(NewRandomFunction()).
- Boost(3).
- MaxBoost(10).
- ScoreMode("avg")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"boost":3,"functions":[{"filter":{"term":{"name.last":"banon"}},"weight":1.5},{"weight":3},{"random_score":{}}],"max_boost":10,"query":{"term":{"name.last":"banon"}},"score_mode":"avg"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFunctionScoreQueryWithNilFilter(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("tag", "wow")).
- AddScoreFunc(NewRandomFunction()).
- Boost(2.0).
- MaxBoost(12.0).
- BoostMode("multiply").
- ScoreMode("max")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"boost":2,"boost_mode":"multiply","max_boost":12,"query":{"term":{"tag":"wow"}},"random_score":{},"score_mode":"max"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldValueFactor(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- AddScoreFunc(NewFieldValueFactorFunction().Modifier("sqrt").Factor(2).Field("income")).
- Boost(2.0).
- MaxBoost(12.0).
- BoostMode("multiply").
- ScoreMode("max")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"boost":2,"boost_mode":"multiply","field_value_factor":{"factor":2,"field":"income","modifier":"sqrt"},"max_boost":12,"query":{"term":{"name.last":"banon"}},"score_mode":"max"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldValueFactorWithWeight(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- AddScoreFunc(NewFieldValueFactorFunction().Modifier("sqrt").Factor(2).Field("income").Weight(2.5)).
- Boost(2.0).
- MaxBoost(12.0).
- BoostMode("multiply").
- ScoreMode("max")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"boost":2,"boost_mode":"multiply","field_value_factor":{"factor":2,"field":"income","modifier":"sqrt"},"max_boost":12,"query":{"term":{"name.last":"banon"}},"score_mode":"max","weight":2.5}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldValueFactorWithMultipleScoreFuncsAndWeights(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- AddScoreFunc(NewFieldValueFactorFunction().Modifier("sqrt").Factor(2).Field("income").Weight(2.5)).
- AddScoreFunc(NewScriptFunction(NewScript("_score * doc['my_numeric_field'].value")).Weight(1.25)).
- AddScoreFunc(NewWeightFactorFunction(0.5)).
- Boost(2.0).
- MaxBoost(12.0).
- BoostMode("multiply").
- ScoreMode("max")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"boost":2,"boost_mode":"multiply","functions":[{"field_value_factor":{"factor":2,"field":"income","modifier":"sqrt"},"weight":2.5},{"script_score":{"script":{"source":"_score * doc['my_numeric_field'].value"}},"weight":1.25},{"weight":0.5}],"max_boost":12,"query":{"term":{"name.last":"banon"}},"score_mode":"max"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFunctionScoreQueryWithGaussScoreFunc(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- AddScoreFunc(NewGaussDecayFunction().FieldName("pin.location").Origin("11, 12").Scale("2km").Offset("0km").Decay(0.33))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"gauss":{"pin.location":{"decay":0.33,"offset":"0km","origin":"11, 12","scale":"2km"}},"query":{"term":{"name.last":"banon"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFunctionScoreQueryWithGaussScoreFuncAndMultiValueMode(t *testing.T) {
- q := NewFunctionScoreQuery().
- Query(NewTermQuery("name.last", "banon")).
- AddScoreFunc(NewGaussDecayFunction().FieldName("pin.location").Origin("11, 12").Scale("2km").Offset("0km").Decay(0.33).MultiValueMode("avg"))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"function_score":{"gauss":{"multi_value_mode":"avg","pin.location":{"decay":0.33,"offset":"0km","origin":"11, 12","scale":"2km"}},"query":{"term":{"name.last":"banon"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_fuzzy.go b/vendor/github.com/olivere/elastic/search_queries_fuzzy.go
deleted file mode 100644
index 02b6c52c2..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_fuzzy.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// FuzzyQuery uses similarity based on Levenshtein edit distance for
-// string fields, and a +/- margin on numeric and date fields.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-fuzzy-query.html
-type FuzzyQuery struct {
- name string
- value interface{}
- boost *float64
- fuzziness interface{}
- prefixLength *int
- maxExpansions *int
- transpositions *bool
- rewrite string
- queryName string
-}
-
-// NewFuzzyQuery creates a new fuzzy query.
-func NewFuzzyQuery(name string, value interface{}) *FuzzyQuery {
- q := &FuzzyQuery{
- name: name,
- value: value,
- }
- return q
-}
-
-// Boost sets the boost for this query. Documents matching this query will
-// (in addition to the normal weightings) have their score multiplied by
-// the boost provided.
-func (q *FuzzyQuery) Boost(boost float64) *FuzzyQuery {
- q.boost = &boost
- return q
-}
-
-// Fuzziness can be an integer/long like 0, 1 or 2 as well as strings
-// like "auto", "0..1", "1..4" or "0.0..1.0".
-func (q *FuzzyQuery) Fuzziness(fuzziness interface{}) *FuzzyQuery {
- q.fuzziness = fuzziness
- return q
-}
-
-func (q *FuzzyQuery) PrefixLength(prefixLength int) *FuzzyQuery {
- q.prefixLength = &prefixLength
- return q
-}
-
-func (q *FuzzyQuery) MaxExpansions(maxExpansions int) *FuzzyQuery {
- q.maxExpansions = &maxExpansions
- return q
-}
-
-func (q *FuzzyQuery) Transpositions(transpositions bool) *FuzzyQuery {
- q.transpositions = &transpositions
- return q
-}
-
-func (q *FuzzyQuery) Rewrite(rewrite string) *FuzzyQuery {
- q.rewrite = rewrite
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *FuzzyQuery) QueryName(queryName string) *FuzzyQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *FuzzyQuery) Source() (interface{}, error) {
- // {
- // "fuzzy" : {
- // "user" : {
- // "value" : "ki",
- // "boost" : 1.0,
- // "fuzziness" : 2,
- // "prefix_length" : 0,
- // "max_expansions" : 100
- // }
- // }
-
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["fuzzy"] = query
-
- fq := make(map[string]interface{})
- query[q.name] = fq
-
- fq["value"] = q.value
-
- if q.boost != nil {
- fq["boost"] = *q.boost
- }
- if q.transpositions != nil {
- fq["transpositions"] = *q.transpositions
- }
- if q.fuzziness != nil {
- fq["fuzziness"] = q.fuzziness
- }
- if q.prefixLength != nil {
- fq["prefix_length"] = *q.prefixLength
- }
- if q.maxExpansions != nil {
- fq["max_expansions"] = *q.maxExpansions
- }
- if q.rewrite != "" {
- fq["rewrite"] = q.rewrite
- }
- if q.queryName != "" {
- fq["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_fuzzy_test.go b/vendor/github.com/olivere/elastic/search_queries_fuzzy_test.go
deleted file mode 100644
index 89140ca23..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_fuzzy_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestFuzzyQuery(t *testing.T) {
- q := NewFuzzyQuery("user", "ki").Boost(1.5).Fuzziness(2).PrefixLength(0).MaxExpansions(100)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"fuzzy":{"user":{"boost":1.5,"fuzziness":2,"max_expansions":100,"prefix_length":0,"value":"ki"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box.go b/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box.go
deleted file mode 100644
index 0418620d8..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// GeoBoundingBoxQuery allows to filter hits based on a point location using
-// a bounding box.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-geo-bounding-box-query.html
-type GeoBoundingBoxQuery struct {
- name string
- top *float64
- left *float64
- bottom *float64
- right *float64
- typ string
- queryName string
-}
-
-// NewGeoBoundingBoxQuery creates and initializes a new GeoBoundingBoxQuery.
-func NewGeoBoundingBoxQuery(name string) *GeoBoundingBoxQuery {
- return &GeoBoundingBoxQuery{
- name: name,
- }
-}
-
-func (q *GeoBoundingBoxQuery) TopLeft(top, left float64) *GeoBoundingBoxQuery {
- q.top = &top
- q.left = &left
- return q
-}
-
-func (q *GeoBoundingBoxQuery) TopLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery {
- return q.TopLeft(point.Lat, point.Lon)
-}
-
-func (q *GeoBoundingBoxQuery) BottomRight(bottom, right float64) *GeoBoundingBoxQuery {
- q.bottom = &bottom
- q.right = &right
- return q
-}
-
-func (q *GeoBoundingBoxQuery) BottomRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery {
- return q.BottomRight(point.Lat, point.Lon)
-}
-
-func (q *GeoBoundingBoxQuery) BottomLeft(bottom, left float64) *GeoBoundingBoxQuery {
- q.bottom = &bottom
- q.left = &left
- return q
-}
-
-func (q *GeoBoundingBoxQuery) BottomLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery {
- return q.BottomLeft(point.Lat, point.Lon)
-}
-
-func (q *GeoBoundingBoxQuery) TopRight(top, right float64) *GeoBoundingBoxQuery {
- q.top = &top
- q.right = &right
- return q
-}
-
-func (q *GeoBoundingBoxQuery) TopRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery {
- return q.TopRight(point.Lat, point.Lon)
-}
-
-// Type sets the type of executing the geo bounding box. It can be either
-// memory or indexed. It defaults to memory.
-func (q *GeoBoundingBoxQuery) Type(typ string) *GeoBoundingBoxQuery {
- q.typ = typ
- return q
-}
-
-func (q *GeoBoundingBoxQuery) QueryName(queryName string) *GeoBoundingBoxQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *GeoBoundingBoxQuery) Source() (interface{}, error) {
- // {
- // "geo_bounding_box" : {
- // ...
- // }
- // }
-
- if q.top == nil {
- return nil, errors.New("geo_bounding_box requires top latitude to be set")
- }
- if q.bottom == nil {
- return nil, errors.New("geo_bounding_box requires bottom latitude to be set")
- }
- if q.right == nil {
- return nil, errors.New("geo_bounding_box requires right longitude to be set")
- }
- if q.left == nil {
- return nil, errors.New("geo_bounding_box requires left longitude to be set")
- }
-
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["geo_bounding_box"] = params
-
- box := make(map[string]interface{})
- box["top_left"] = []float64{*q.left, *q.top}
- box["bottom_right"] = []float64{*q.right, *q.bottom}
- params[q.name] = box
-
- if q.typ != "" {
- params["type"] = q.typ
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box_test.go b/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box_test.go
deleted file mode 100644
index f44a2364f..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_bounding_box_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoBoundingBoxQueryIncomplete(t *testing.T) {
- q := NewGeoBoundingBoxQuery("pin.location")
- q = q.TopLeft(40.73, -74.1)
- // no bottom and no right here
- q = q.Type("memory")
- src, err := q.Source()
- if err == nil {
- t.Fatal("expected error")
- }
- if src != nil {
- t.Fatal("expected empty source")
- }
-}
-
-func TestGeoBoundingBoxQuery(t *testing.T) {
- q := NewGeoBoundingBoxQuery("pin.location")
- q = q.TopLeft(40.73, -74.1)
- q = q.BottomRight(40.01, -71.12)
- q = q.Type("memory")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_bounding_box":{"pin.location":{"bottom_right":[-71.12,40.01],"top_left":[-74.1,40.73]},"type":"memory"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoBoundingBoxQueryWithGeoPoint(t *testing.T) {
- q := NewGeoBoundingBoxQuery("pin.location")
- q = q.TopLeftFromGeoPoint(GeoPointFromLatLon(40.73, -74.1))
- q = q.BottomRightFromGeoPoint(GeoPointFromLatLon(40.01, -71.12))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_bounding_box":{"pin.location":{"bottom_right":[-71.12,40.01],"top_left":[-74.1,40.73]}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_distance.go b/vendor/github.com/olivere/elastic/search_queries_geo_distance.go
deleted file mode 100644
index 00e62725f..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_distance.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// GeoDistanceQuery filters documents that include only hits that exists
-// within a specific distance from a geo point.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-geo-distance-query.html
-type GeoDistanceQuery struct {
- name string
- distance string
- lat float64
- lon float64
- geohash string
- distanceType string
- queryName string
-}
-
-// NewGeoDistanceQuery creates and initializes a new GeoDistanceQuery.
-func NewGeoDistanceQuery(name string) *GeoDistanceQuery {
- return &GeoDistanceQuery{name: name}
-}
-
-func (q *GeoDistanceQuery) GeoPoint(point *GeoPoint) *GeoDistanceQuery {
- q.lat = point.Lat
- q.lon = point.Lon
- return q
-}
-
-func (q *GeoDistanceQuery) Point(lat, lon float64) *GeoDistanceQuery {
- q.lat = lat
- q.lon = lon
- return q
-}
-
-func (q *GeoDistanceQuery) Lat(lat float64) *GeoDistanceQuery {
- q.lat = lat
- return q
-}
-
-func (q *GeoDistanceQuery) Lon(lon float64) *GeoDistanceQuery {
- q.lon = lon
- return q
-}
-
-func (q *GeoDistanceQuery) GeoHash(geohash string) *GeoDistanceQuery {
- q.geohash = geohash
- return q
-}
-
-func (q *GeoDistanceQuery) Distance(distance string) *GeoDistanceQuery {
- q.distance = distance
- return q
-}
-
-func (q *GeoDistanceQuery) DistanceType(distanceType string) *GeoDistanceQuery {
- q.distanceType = distanceType
- return q
-}
-
-func (q *GeoDistanceQuery) QueryName(queryName string) *GeoDistanceQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *GeoDistanceQuery) Source() (interface{}, error) {
- // {
- // "geo_distance" : {
- // "distance" : "200km",
- // "pin.location" : {
- // "lat" : 40,
- // "lon" : -70
- // }
- // }
- // }
-
- source := make(map[string]interface{})
-
- params := make(map[string]interface{})
-
- if q.geohash != "" {
- params[q.name] = q.geohash
- } else {
- location := make(map[string]interface{})
- location["lat"] = q.lat
- location["lon"] = q.lon
- params[q.name] = location
- }
-
- if q.distance != "" {
- params["distance"] = q.distance
- }
- if q.distanceType != "" {
- params["distance_type"] = q.distanceType
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- source["geo_distance"] = params
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_distance_test.go b/vendor/github.com/olivere/elastic/search_queries_geo_distance_test.go
deleted file mode 100644
index dd169575a..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_distance_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoDistanceQuery(t *testing.T) {
- q := NewGeoDistanceQuery("pin.location")
- q = q.Lat(40)
- q = q.Lon(-70)
- q = q.Distance("200km")
- q = q.DistanceType("plane")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"distance":"200km","distance_type":"plane","pin.location":{"lat":40,"lon":-70}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceQueryWithGeoPoint(t *testing.T) {
- q := NewGeoDistanceQuery("pin.location")
- q = q.GeoPoint(GeoPointFromLatLon(40, -70))
- q = q.Distance("200km")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"distance":"200km","pin.location":{"lat":40,"lon":-70}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceQueryWithGeoHash(t *testing.T) {
- q := NewGeoDistanceQuery("pin.location")
- q = q.GeoHash("drm3btev3e86")
- q = q.Distance("12km")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_distance":{"distance":"12km","pin.location":"drm3btev3e86"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_polygon.go b/vendor/github.com/olivere/elastic/search_queries_geo_polygon.go
deleted file mode 100644
index 7678c3f3b..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_polygon.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// GeoPolygonQuery allows to include hits that only fall within a polygon of points.
-//
-// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-geo-polygon-query.html
-type GeoPolygonQuery struct {
- name string
- points []*GeoPoint
- queryName string
-}
-
-// NewGeoPolygonQuery creates and initializes a new GeoPolygonQuery.
-func NewGeoPolygonQuery(name string) *GeoPolygonQuery {
- return &GeoPolygonQuery{
- name: name,
- points: make([]*GeoPoint, 0),
- }
-}
-
-// AddPoint adds a point from latitude and longitude.
-func (q *GeoPolygonQuery) AddPoint(lat, lon float64) *GeoPolygonQuery {
- q.points = append(q.points, GeoPointFromLatLon(lat, lon))
- return q
-}
-
-// AddGeoPoint adds a GeoPoint.
-func (q *GeoPolygonQuery) AddGeoPoint(point *GeoPoint) *GeoPolygonQuery {
- q.points = append(q.points, point)
- return q
-}
-
-func (q *GeoPolygonQuery) QueryName(queryName string) *GeoPolygonQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *GeoPolygonQuery) Source() (interface{}, error) {
- // "geo_polygon" : {
- // "person.location" : {
- // "points" : [
- // {"lat" : 40, "lon" : -70},
- // {"lat" : 30, "lon" : -80},
- // {"lat" : 20, "lon" : -90}
- // ]
- // }
- // }
- source := make(map[string]interface{})
-
- params := make(map[string]interface{})
- source["geo_polygon"] = params
-
- polygon := make(map[string]interface{})
- params[q.name] = polygon
-
- var points []interface{}
- for _, point := range q.points {
- points = append(points, point.Source())
- }
- polygon["points"] = points
-
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_geo_polygon_test.go b/vendor/github.com/olivere/elastic/search_queries_geo_polygon_test.go
deleted file mode 100644
index 932c57d7b..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_geo_polygon_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestGeoPolygonQuery(t *testing.T) {
- q := NewGeoPolygonQuery("person.location")
- q = q.AddPoint(40, -70)
- q = q.AddPoint(30, -80)
- point, err := GeoPointFromString("20,-90")
- if err != nil {
- t.Fatalf("GeoPointFromString failed: %v", err)
- }
- q = q.AddGeoPoint(point)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_polygon":{"person.location":{"points":[{"lat":40,"lon":-70},{"lat":30,"lon":-80},{"lat":20,"lon":-90}]}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoPolygonQueryFromGeoPoints(t *testing.T) {
- q := NewGeoPolygonQuery("person.location")
- q = q.AddGeoPoint(&GeoPoint{Lat: 40, Lon: -70})
- q = q.AddGeoPoint(GeoPointFromLatLon(30, -80))
- point, err := GeoPointFromString("20,-90")
- if err != nil {
- t.Fatalf("GeoPointFromString failed: %v", err)
- }
- q = q.AddGeoPoint(point)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"geo_polygon":{"person.location":{"points":[{"lat":40,"lon":-70},{"lat":30,"lon":-80},{"lat":20,"lon":-90}]}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_has_child.go b/vendor/github.com/olivere/elastic/search_queries_has_child.go
deleted file mode 100644
index 41e7429c4..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_has_child.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// HasChildQuery accepts a query and the child type to run against, and results
-// in parent documents that have child docs matching the query.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-has-child-query.html
-type HasChildQuery struct {
- query Query
- childType string
- boost *float64
- scoreMode string
- minChildren *int
- maxChildren *int
- shortCircuitCutoff *int
- queryName string
- innerHit *InnerHit
-}
-
-// NewHasChildQuery creates and initializes a new has_child query.
-func NewHasChildQuery(childType string, query Query) *HasChildQuery {
- return &HasChildQuery{
- query: query,
- childType: childType,
- }
-}
-
-// Boost sets the boost for this query.
-func (q *HasChildQuery) Boost(boost float64) *HasChildQuery {
- q.boost = &boost
- return q
-}
-
-// ScoreMode defines how the scores from the matching child documents
-// are mapped into the parent document. Allowed values are: min, max,
-// avg, or none.
-func (q *HasChildQuery) ScoreMode(scoreMode string) *HasChildQuery {
- q.scoreMode = scoreMode
- return q
-}
-
-// MinChildren defines the minimum number of children that are required
-// to match for the parent to be considered a match.
-func (q *HasChildQuery) MinChildren(minChildren int) *HasChildQuery {
- q.minChildren = &minChildren
- return q
-}
-
-// MaxChildren defines the maximum number of children that are required
-// to match for the parent to be considered a match.
-func (q *HasChildQuery) MaxChildren(maxChildren int) *HasChildQuery {
- q.maxChildren = &maxChildren
- return q
-}
-
-// ShortCircuitCutoff configures what cut off point only to evaluate
-// parent documents that contain the matching parent id terms instead
-// of evaluating all parent docs.
-func (q *HasChildQuery) ShortCircuitCutoff(shortCircuitCutoff int) *HasChildQuery {
- q.shortCircuitCutoff = &shortCircuitCutoff
- return q
-}
-
-// QueryName specifies the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *HasChildQuery) QueryName(queryName string) *HasChildQuery {
- q.queryName = queryName
- return q
-}
-
-// InnerHit sets the inner hit definition in the scope of this query and
-// reusing the defined type and query.
-func (q *HasChildQuery) InnerHit(innerHit *InnerHit) *HasChildQuery {
- q.innerHit = innerHit
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *HasChildQuery) Source() (interface{}, error) {
- // {
- // "has_child" : {
- // "type" : "blog_tag",
- // "score_mode" : "min",
- // "query" : {
- // "term" : {
- // "tag" : "something"
- // }
- // }
- // }
- // }
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["has_child"] = query
-
- src, err := q.query.Source()
- if err != nil {
- return nil, err
- }
- query["query"] = src
- query["type"] = q.childType
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.scoreMode != "" {
- query["score_mode"] = q.scoreMode
- }
- if q.minChildren != nil {
- query["min_children"] = *q.minChildren
- }
- if q.maxChildren != nil {
- query["max_children"] = *q.maxChildren
- }
- if q.shortCircuitCutoff != nil {
- query["short_circuit_cutoff"] = *q.shortCircuitCutoff
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
- if q.innerHit != nil {
- src, err := q.innerHit.Source()
- if err != nil {
- return nil, err
- }
- query["inner_hits"] = src
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_has_child_test.go b/vendor/github.com/olivere/elastic/search_queries_has_child_test.go
deleted file mode 100644
index 745c263f9..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_has_child_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestHasChildQuery(t *testing.T) {
- q := NewHasChildQuery("blog_tag", NewTermQuery("tag", "something")).ScoreMode("min")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"has_child":{"query":{"term":{"tag":"something"}},"score_mode":"min","type":"blog_tag"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestHasChildQueryWithInnerHit(t *testing.T) {
- q := NewHasChildQuery("blog_tag", NewTermQuery("tag", "something"))
- q = q.InnerHit(NewInnerHit().Name("comments"))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"has_child":{"inner_hits":{"name":"comments"},"query":{"term":{"tag":"something"}},"type":"blog_tag"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_has_parent.go b/vendor/github.com/olivere/elastic/search_queries_has_parent.go
deleted file mode 100644
index 5e1b650af..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_has_parent.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// HasParentQuery accepts a query and a parent type. The query is executed
-// in the parent document space which is specified by the parent type.
-// This query returns child documents which associated parents have matched.
-// For the rest has_parent query has the same options and works in the
-// same manner as has_child query.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-has-parent-query.html
-type HasParentQuery struct {
- query Query
- parentType string
- boost *float64
- score *bool
- queryName string
- innerHit *InnerHit
-}
-
-// NewHasParentQuery creates and initializes a new has_parent query.
-func NewHasParentQuery(parentType string, query Query) *HasParentQuery {
- return &HasParentQuery{
- query: query,
- parentType: parentType,
- }
-}
-
-// Boost sets the boost for this query.
-func (q *HasParentQuery) Boost(boost float64) *HasParentQuery {
- q.boost = &boost
- return q
-}
-
-// Score defines if the parent score is mapped into the child documents.
-func (q *HasParentQuery) Score(score bool) *HasParentQuery {
- q.score = &score
- return q
-}
-
-// QueryName specifies the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *HasParentQuery) QueryName(queryName string) *HasParentQuery {
- q.queryName = queryName
- return q
-}
-
-// InnerHit sets the inner hit definition in the scope of this query and
-// reusing the defined type and query.
-func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery {
- q.innerHit = innerHit
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *HasParentQuery) Source() (interface{}, error) {
- // {
- // "has_parent" : {
- // "parent_type" : "blog",
- // "query" : {
- // "term" : {
- // "tag" : "something"
- // }
- // }
- // }
- // }
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["has_parent"] = query
-
- src, err := q.query.Source()
- if err != nil {
- return nil, err
- }
- query["query"] = src
- query["parent_type"] = q.parentType
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.score != nil {
- query["score"] = *q.score
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
- if q.innerHit != nil {
- src, err := q.innerHit.Source()
- if err != nil {
- return nil, err
- }
- query["inner_hits"] = src
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_has_parent_test.go b/vendor/github.com/olivere/elastic/search_queries_has_parent_test.go
deleted file mode 100644
index 0fec395e3..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_has_parent_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestHasParentQueryTest(t *testing.T) {
- q := NewHasParentQuery("blog", NewTermQuery("tag", "something")).Score(true)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"has_parent":{"parent_type":"blog","query":{"term":{"tag":"something"}},"score":true}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_ids.go b/vendor/github.com/olivere/elastic/search_queries_ids.go
deleted file mode 100644
index e067aebbe..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_ids.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// IdsQuery filters documents that only have the provided ids.
-// Note, this query uses the _uid field.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-ids-query.html
-type IdsQuery struct {
- types []string
- values []string
- boost *float64
- queryName string
-}
-
-// NewIdsQuery creates and initializes a new ids query.
-func NewIdsQuery(types ...string) *IdsQuery {
- return &IdsQuery{
- types: types,
- values: make([]string, 0),
- }
-}
-
-// Ids adds ids to the filter.
-func (q *IdsQuery) Ids(ids ...string) *IdsQuery {
- q.values = append(q.values, ids...)
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *IdsQuery) Boost(boost float64) *IdsQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter.
-func (q *IdsQuery) QueryName(queryName string) *IdsQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *IdsQuery) Source() (interface{}, error) {
- // {
- // "ids" : {
- // "type" : "my_type",
- // "values" : ["1", "4", "100"]
- // }
- // }
-
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["ids"] = query
-
- // type(s)
- if len(q.types) == 1 {
- query["type"] = q.types[0]
- } else if len(q.types) > 1 {
- query["types"] = q.types
- }
-
- // values
- query["values"] = q.values
-
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_ids_test.go b/vendor/github.com/olivere/elastic/search_queries_ids_test.go
deleted file mode 100644
index b36605b4d..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_ids_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestIdsQuery(t *testing.T) {
- q := NewIdsQuery("my_type").Ids("1", "4", "100").Boost(10.5).QueryName("my_query")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ids":{"_name":"my_query","boost":10.5,"type":"my_type","values":["1","4","100"]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match.go b/vendor/github.com/olivere/elastic/search_queries_match.go
deleted file mode 100644
index b38b12452..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match.go
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatchQuery is a family of queries that accepts text/numerics/dates,
-// analyzes them, and constructs a query.
-//
-// To create a new MatchQuery, use NewMatchQuery. To create specific types
-// of queries, e.g. a match_phrase query, use NewMatchPhrQuery(...).Type("phrase"),
-// or use one of the shortcuts e.g. NewMatchPhraseQuery(...).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-match-query.html
-type MatchQuery struct {
- name string
- text interface{}
- operator string // or / and
- analyzer string
- boost *float64
- fuzziness string
- prefixLength *int
- maxExpansions *int
- minimumShouldMatch string
- fuzzyRewrite string
- lenient *bool
- fuzzyTranspositions *bool
- zeroTermsQuery string
- cutoffFrequency *float64
- queryName string
-}
-
-// NewMatchQuery creates and initializes a new MatchQuery.
-func NewMatchQuery(name string, text interface{}) *MatchQuery {
- return &MatchQuery{name: name, text: text}
-}
-
-// Operator sets the operator to use when using a boolean query.
-// Can be "AND" or "OR" (default).
-func (q *MatchQuery) Operator(operator string) *MatchQuery {
- q.operator = operator
- return q
-}
-
-// Analyzer explicitly sets the analyzer to use. It defaults to use explicit
-// mapping config for the field, or, if not set, the default search analyzer.
-func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery {
- q.analyzer = analyzer
- return q
-}
-
-// Fuzziness sets the fuzziness when evaluated to a fuzzy query type.
-// Defaults to "AUTO".
-func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery {
- q.fuzziness = fuzziness
- return q
-}
-
-// PrefixLength sets the length of a length of common (non-fuzzy)
-// prefix for fuzzy match queries. It must be non-negative.
-func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery {
- q.prefixLength = &prefixLength
- return q
-}
-
-// MaxExpansions is used with fuzzy or prefix type queries. It specifies
-// the number of term expansions to use. It defaults to unbounded so that
-// its recommended to set it to a reasonable value for faster execution.
-func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery {
- q.maxExpansions = &maxExpansions
- return q
-}
-
-// CutoffFrequency can be a value in [0..1] (or an absolute number >=1).
-// It represents the maximum treshold of a terms document frequency to be
-// considered a low frequency term.
-func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery {
- q.cutoffFrequency = &cutoff
- return q
-}
-
-// MinimumShouldMatch sets the optional minimumShouldMatch value to
-// apply to the query.
-func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-// FuzzyRewrite sets the fuzzy_rewrite parameter controlling how the
-// fuzzy query will get rewritten.
-func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery {
- q.fuzzyRewrite = fuzzyRewrite
- return q
-}
-
-// FuzzyTranspositions sets whether transpositions are supported in
-// fuzzy queries.
-//
-// The default metric used by fuzzy queries to determine a match is
-// the Damerau-Levenshtein distance formula which supports transpositions.
-// Setting transposition to false will
-// * switch to classic Levenshtein distance.
-// * If not set, Damerau-Levenshtein distance metric will be used.
-func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery {
- q.fuzzyTranspositions = &fuzzyTranspositions
- return q
-}
-
-// Lenient specifies whether format based failures will be ignored.
-func (q *MatchQuery) Lenient(lenient bool) *MatchQuery {
- q.lenient = &lenient
- return q
-}
-
-// ZeroTermsQuery can be "all" or "none".
-func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery {
- q.zeroTermsQuery = zeroTermsQuery
- return q
-}
-
-// Boost sets the boost to apply to this query.
-func (q *MatchQuery) Boost(boost float64) *MatchQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *MatchQuery) QueryName(queryName string) *MatchQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *MatchQuery) Source() (interface{}, error) {
- // {"match":{"name":{"query":"value","type":"boolean/phrase"}}}
- source := make(map[string]interface{})
-
- match := make(map[string]interface{})
- source["match"] = match
-
- query := make(map[string]interface{})
- match[q.name] = query
-
- query["query"] = q.text
-
- if q.operator != "" {
- query["operator"] = q.operator
- }
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.fuzziness != "" {
- query["fuzziness"] = q.fuzziness
- }
- if q.prefixLength != nil {
- query["prefix_length"] = *q.prefixLength
- }
- if q.maxExpansions != nil {
- query["max_expansions"] = *q.maxExpansions
- }
- if q.minimumShouldMatch != "" {
- query["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.fuzzyRewrite != "" {
- query["fuzzy_rewrite"] = q.fuzzyRewrite
- }
- if q.lenient != nil {
- query["lenient"] = *q.lenient
- }
- if q.fuzzyTranspositions != nil {
- query["fuzzy_transpositions"] = *q.fuzzyTranspositions
- }
- if q.zeroTermsQuery != "" {
- query["zero_terms_query"] = q.zeroTermsQuery
- }
- if q.cutoffFrequency != nil {
- query["cutoff_frequency"] = q.cutoffFrequency
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_all.go b/vendor/github.com/olivere/elastic/search_queries_match_all.go
deleted file mode 100644
index 3829c8af0..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_all.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatchAllQuery is the most simple query, which matches all documents,
-// giving them all a _score of 1.0.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-match-all-query.html
-type MatchAllQuery struct {
- boost *float64
- queryName string
-}
-
-// NewMatchAllQuery creates and initializes a new match all query.
-func NewMatchAllQuery() *MatchAllQuery {
- return &MatchAllQuery{}
-}
-
-// Boost sets the boost for this query. Documents matching this query will
-// (in addition to the normal weightings) have their score multiplied by the
-// boost provided.
-func (q *MatchAllQuery) Boost(boost float64) *MatchAllQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name.
-func (q *MatchAllQuery) QueryName(name string) *MatchAllQuery {
- q.queryName = name
- return q
-}
-
-// Source returns JSON for the match all query.
-func (q MatchAllQuery) Source() (interface{}, error) {
- // {
- // "match_all" : { ... }
- // }
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["match_all"] = params
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_all_test.go b/vendor/github.com/olivere/elastic/search_queries_match_all_test.go
deleted file mode 100644
index 5d8671025..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_all_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatchAllQuery(t *testing.T) {
- q := NewMatchAllQuery()
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_all":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMatchAllQueryWithBoost(t *testing.T) {
- q := NewMatchAllQuery().Boost(3.14)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_all":{"boost":3.14}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMatchAllQueryWithQueryName(t *testing.T) {
- q := NewMatchAllQuery().QueryName("qname")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_all":{"_name":"qname"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_none.go b/vendor/github.com/olivere/elastic/search_queries_match_none.go
deleted file mode 100644
index 9afe16716..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_none.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatchNoneQuery returns no documents. It is the inverse of
-// MatchAllQuery.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-match-all-query.html
-type MatchNoneQuery struct {
- queryName string
-}
-
-// NewMatchNoneQuery creates and initializes a new match none query.
-func NewMatchNoneQuery() *MatchNoneQuery {
- return &MatchNoneQuery{}
-}
-
-// QueryName sets the query name.
-func (q *MatchNoneQuery) QueryName(name string) *MatchNoneQuery {
- q.queryName = name
- return q
-}
-
-// Source returns JSON for the match none query.
-func (q MatchNoneQuery) Source() (interface{}, error) {
- // {
- // "match_none" : { ... }
- // }
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["match_none"] = params
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_none_test.go b/vendor/github.com/olivere/elastic/search_queries_match_none_test.go
deleted file mode 100644
index 6463452da..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_none_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatchNoneQuery(t *testing.T) {
- q := NewMatchNoneQuery()
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_none":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMatchNoneQueryWithQueryName(t *testing.T) {
- q := NewMatchNoneQuery().QueryName("qname")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_none":{"_name":"qname"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_phrase.go b/vendor/github.com/olivere/elastic/search_queries_match_phrase.go
deleted file mode 100644
index 0e4c6327e..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_phrase.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatchPhraseQuery analyzes the text and creates a phrase query out of
-// the analyzed text.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-match-query-phrase.html
-type MatchPhraseQuery struct {
- name string
- value interface{}
- analyzer string
- slop *int
- boost *float64
- queryName string
-}
-
-// NewMatchPhraseQuery creates and initializes a new MatchPhraseQuery.
-func NewMatchPhraseQuery(name string, value interface{}) *MatchPhraseQuery {
- return &MatchPhraseQuery{name: name, value: value}
-}
-
-// Analyzer explicitly sets the analyzer to use. It defaults to use explicit
-// mapping config for the field, or, if not set, the default search analyzer.
-func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery {
- q.analyzer = analyzer
- return q
-}
-
-// Slop sets the phrase slop if evaluated to a phrase query type.
-func (q *MatchPhraseQuery) Slop(slop int) *MatchPhraseQuery {
- q.slop = &slop
- return q
-}
-
-// Boost sets the boost to apply to this query.
-func (q *MatchPhraseQuery) Boost(boost float64) *MatchPhraseQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *MatchPhraseQuery) QueryName(queryName string) *MatchPhraseQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *MatchPhraseQuery) Source() (interface{}, error) {
- // {"match_phrase":{"name":{"query":"value","analyzer":"my_analyzer"}}}
- source := make(map[string]interface{})
-
- match := make(map[string]interface{})
- source["match_phrase"] = match
-
- query := make(map[string]interface{})
- match[q.name] = query
-
- query["query"] = q.value
-
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.slop != nil {
- query["slop"] = *q.slop
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix.go b/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix.go
deleted file mode 100644
index 10a88668d..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// MatchPhrasePrefixQuery is the same as match_phrase, except that it allows for
-// prefix matches on the last term in the text.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-match-query-phrase-prefix.html
-type MatchPhrasePrefixQuery struct {
- name string
- value interface{}
- analyzer string
- slop *int
- maxExpansions *int
- boost *float64
- queryName string
-}
-
-// NewMatchPhrasePrefixQuery creates and initializes a new MatchPhrasePrefixQuery.
-func NewMatchPhrasePrefixQuery(name string, value interface{}) *MatchPhrasePrefixQuery {
- return &MatchPhrasePrefixQuery{name: name, value: value}
-}
-
-// Analyzer explicitly sets the analyzer to use. It defaults to use explicit
-// mapping config for the field, or, if not set, the default search analyzer.
-func (q *MatchPhrasePrefixQuery) Analyzer(analyzer string) *MatchPhrasePrefixQuery {
- q.analyzer = analyzer
- return q
-}
-
-// Slop sets the phrase slop if evaluated to a phrase query type.
-func (q *MatchPhrasePrefixQuery) Slop(slop int) *MatchPhrasePrefixQuery {
- q.slop = &slop
- return q
-}
-
-// MaxExpansions sets the number of term expansions to use.
-func (q *MatchPhrasePrefixQuery) MaxExpansions(n int) *MatchPhrasePrefixQuery {
- q.maxExpansions = &n
- return q
-}
-
-// Boost sets the boost to apply to this query.
-func (q *MatchPhrasePrefixQuery) Boost(boost float64) *MatchPhrasePrefixQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *MatchPhrasePrefixQuery) QueryName(queryName string) *MatchPhrasePrefixQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the function score query.
-func (q *MatchPhrasePrefixQuery) Source() (interface{}, error) {
- // {"match_phrase_prefix":{"name":{"query":"value","max_expansions":10}}}
- source := make(map[string]interface{})
-
- match := make(map[string]interface{})
- source["match_phrase_prefix"] = match
-
- query := make(map[string]interface{})
- match[q.name] = query
-
- query["query"] = q.value
-
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.slop != nil {
- query["slop"] = *q.slop
- }
- if q.maxExpansions != nil {
- query["max_expansions"] = *q.maxExpansions
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix_test.go b/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix_test.go
deleted file mode 100644
index 82a02f17d..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_phrase_prefix_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatchPhrasePrefixQuery(t *testing.T) {
- q := NewMatchPhrasePrefixQuery("message", "this is a test").Boost(0.3).MaxExpansions(5)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_phrase_prefix":{"message":{"boost":0.3,"max_expansions":5,"query":"this is a test"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_phrase_test.go b/vendor/github.com/olivere/elastic/search_queries_match_phrase_test.go
deleted file mode 100644
index 85e60d8b5..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_phrase_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatchPhraseQuery(t *testing.T) {
- q := NewMatchPhraseQuery("message", "this is a test").
- Analyzer("my_analyzer").
- Boost(0.7)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_phrase":{"message":{"analyzer":"my_analyzer","boost":0.7,"query":"this is a test"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_match_test.go b/vendor/github.com/olivere/elastic/search_queries_match_test.go
deleted file mode 100644
index dd750cf93..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_match_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMatchQuery(t *testing.T) {
- q := NewMatchQuery("message", "this is a test")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match":{"message":{"query":"this is a test"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMatchQueryWithOptions(t *testing.T) {
- q := NewMatchQuery("message", "this is a test").Analyzer("whitespace").Operator("or").Boost(2.5)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match":{"message":{"analyzer":"whitespace","boost":2.5,"operator":"or","query":"this is a test"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_more_like_this.go b/vendor/github.com/olivere/elastic/search_queries_more_like_this.go
deleted file mode 100644
index 5c71e291f..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_more_like_this.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// MoreLikeThis query (MLT Query) finds documents that are "like" a given
-// set of documents. In order to do so, MLT selects a set of representative
-// terms of these input documents, forms a query using these terms, executes
-// the query and returns the results. The user controls the input documents,
-// how the terms should be selected and how the query is formed.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-mlt-query.html
-type MoreLikeThisQuery struct {
- fields []string
- docs []*MoreLikeThisQueryItem
- unlikeDocs []*MoreLikeThisQueryItem
- include *bool
- minimumShouldMatch string
- minTermFreq *int
- maxQueryTerms *int
- stopWords []string
- minDocFreq *int
- maxDocFreq *int
- minWordLength *int
- maxWordLength *int
- boostTerms *float64
- boost *float64
- analyzer string
- failOnUnsupportedField *bool
- queryName string
-}
-
-// NewMoreLikeThisQuery creates and initializes a new MoreLikeThisQuery.
-func NewMoreLikeThisQuery() *MoreLikeThisQuery {
- return &MoreLikeThisQuery{
- fields: make([]string, 0),
- stopWords: make([]string, 0),
- docs: make([]*MoreLikeThisQueryItem, 0),
- unlikeDocs: make([]*MoreLikeThisQueryItem, 0),
- }
-}
-
-// Field adds one or more field names to the query.
-func (q *MoreLikeThisQuery) Field(fields ...string) *MoreLikeThisQuery {
- q.fields = append(q.fields, fields...)
- return q
-}
-
-// StopWord sets the stopwords. Any word in this set is considered
-// "uninteresting" and ignored. Even if your Analyzer allows stopwords,
-// you might want to tell the MoreLikeThis code to ignore them, as for
-// the purposes of document similarity it seems reasonable to assume that
-// "a stop word is never interesting".
-func (q *MoreLikeThisQuery) StopWord(stopWords ...string) *MoreLikeThisQuery {
- q.stopWords = append(q.stopWords, stopWords...)
- return q
-}
-
-// LikeText sets the text to use in order to find documents that are "like" this.
-func (q *MoreLikeThisQuery) LikeText(likeTexts ...string) *MoreLikeThisQuery {
- for _, s := range likeTexts {
- item := NewMoreLikeThisQueryItem().LikeText(s)
- q.docs = append(q.docs, item)
- }
- return q
-}
-
-// LikeItems sets the documents to use in order to find documents that are "like" this.
-func (q *MoreLikeThisQuery) LikeItems(docs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery {
- q.docs = append(q.docs, docs...)
- return q
-}
-
-// IgnoreLikeText sets the text from which the terms should not be selected from.
-func (q *MoreLikeThisQuery) IgnoreLikeText(ignoreLikeText ...string) *MoreLikeThisQuery {
- for _, s := range ignoreLikeText {
- item := NewMoreLikeThisQueryItem().LikeText(s)
- q.unlikeDocs = append(q.unlikeDocs, item)
- }
- return q
-}
-
-// IgnoreLikeItems sets the documents from which the terms should not be selected from.
-func (q *MoreLikeThisQuery) IgnoreLikeItems(ignoreDocs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery {
- q.unlikeDocs = append(q.unlikeDocs, ignoreDocs...)
- return q
-}
-
-// Ids sets the document ids to use in order to find documents that are "like" this.
-func (q *MoreLikeThisQuery) Ids(ids ...string) *MoreLikeThisQuery {
- for _, id := range ids {
- item := NewMoreLikeThisQueryItem().Id(id)
- q.docs = append(q.docs, item)
- }
- return q
-}
-
-// Include specifies whether the input documents should also be included
-// in the results returned. Defaults to false.
-func (q *MoreLikeThisQuery) Include(include bool) *MoreLikeThisQuery {
- q.include = &include
- return q
-}
-
-// MinimumShouldMatch sets the number of terms that must match the generated
-// query expressed in the common syntax for minimum should match.
-// The default value is "30%".
-//
-// This used to be "PercentTermsToMatch" in Elasticsearch versions before 2.0.
-func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-// MinTermFreq is the frequency below which terms will be ignored in the
-// source doc. The default frequency is 2.
-func (q *MoreLikeThisQuery) MinTermFreq(minTermFreq int) *MoreLikeThisQuery {
- q.minTermFreq = &minTermFreq
- return q
-}
-
-// MaxQueryTerms sets the maximum number of query terms that will be included
-// in any generated query. It defaults to 25.
-func (q *MoreLikeThisQuery) MaxQueryTerms(maxQueryTerms int) *MoreLikeThisQuery {
- q.maxQueryTerms = &maxQueryTerms
- return q
-}
-
-// MinDocFreq sets the frequency at which words will be ignored which do
-// not occur in at least this many docs. The default is 5.
-func (q *MoreLikeThisQuery) MinDocFreq(minDocFreq int) *MoreLikeThisQuery {
- q.minDocFreq = &minDocFreq
- return q
-}
-
-// MaxDocFreq sets the maximum frequency for which words may still appear.
-// Words that appear in more than this many docs will be ignored.
-// It defaults to unbounded.
-func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery {
- q.maxDocFreq = &maxDocFreq
- return q
-}
-
-// MinWordLength sets the minimum word length below which words will be
-// ignored. It defaults to 0.
-func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery {
- q.minWordLength = &minWordLength
- return q
-}
-
-// MaxWordLength sets the maximum word length above which words will be ignored.
-// Defaults to unbounded (0).
-func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery {
- q.maxWordLength = &maxWordLength
- return q
-}
-
-// BoostTerms sets the boost factor to use when boosting terms.
-// It defaults to 1.
-func (q *MoreLikeThisQuery) BoostTerms(boostTerms float64) *MoreLikeThisQuery {
- q.boostTerms = &boostTerms
- return q
-}
-
-// Analyzer specifies the analyzer that will be use to analyze the text.
-// Defaults to the analyzer associated with the field.
-func (q *MoreLikeThisQuery) Analyzer(analyzer string) *MoreLikeThisQuery {
- q.analyzer = analyzer
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *MoreLikeThisQuery) Boost(boost float64) *MoreLikeThisQuery {
- q.boost = &boost
- return q
-}
-
-// FailOnUnsupportedField indicates whether to fail or return no result
-// when this query is run against a field which is not supported such as
-// a binary/numeric field.
-func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery {
- q.failOnUnsupportedField = &fail
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched_filters per hit.
-func (q *MoreLikeThisQuery) QueryName(queryName string) *MoreLikeThisQuery {
- q.queryName = queryName
- return q
-}
-
-// Source creates the source for the MLT query.
-// It may return an error if the caller forgot to specify any documents to
-// be "liked" in the MoreLikeThisQuery.
-func (q *MoreLikeThisQuery) Source() (interface{}, error) {
- // {
- // "match_all" : { ... }
- // }
- if len(q.docs) == 0 {
- return nil, errors.New(`more_like_this requires some documents to be "liked"`)
- }
-
- source := make(map[string]interface{})
-
- params := make(map[string]interface{})
- source["more_like_this"] = params
-
- if len(q.fields) > 0 {
- params["fields"] = q.fields
- }
-
- var likes []interface{}
- for _, doc := range q.docs {
- src, err := doc.Source()
- if err != nil {
- return nil, err
- }
- likes = append(likes, src)
- }
- params["like"] = likes
-
- if len(q.unlikeDocs) > 0 {
- var dontLikes []interface{}
- for _, doc := range q.unlikeDocs {
- src, err := doc.Source()
- if err != nil {
- return nil, err
- }
- dontLikes = append(dontLikes, src)
- }
- params["unlike"] = dontLikes
- }
-
- if q.minimumShouldMatch != "" {
- params["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.minTermFreq != nil {
- params["min_term_freq"] = *q.minTermFreq
- }
- if q.maxQueryTerms != nil {
- params["max_query_terms"] = *q.maxQueryTerms
- }
- if len(q.stopWords) > 0 {
- params["stop_words"] = q.stopWords
- }
- if q.minDocFreq != nil {
- params["min_doc_freq"] = *q.minDocFreq
- }
- if q.maxDocFreq != nil {
- params["max_doc_freq"] = *q.maxDocFreq
- }
- if q.minWordLength != nil {
- params["min_word_length"] = *q.minWordLength
- }
- if q.maxWordLength != nil {
- params["max_word_length"] = *q.maxWordLength
- }
- if q.boostTerms != nil {
- params["boost_terms"] = *q.boostTerms
- }
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- if q.analyzer != "" {
- params["analyzer"] = q.analyzer
- }
- if q.failOnUnsupportedField != nil {
- params["fail_on_unsupported_field"] = *q.failOnUnsupportedField
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
- if q.include != nil {
- params["include"] = *q.include
- }
-
- return source, nil
-}
-
-// -- MoreLikeThisQueryItem --
-
-// MoreLikeThisQueryItem represents a single item of a MoreLikeThisQuery
-// to be "liked" or "unliked".
-type MoreLikeThisQueryItem struct {
- likeText string
-
- index string
- typ string
- id string
- doc interface{}
- fields []string
- routing string
- fsc *FetchSourceContext
- version int64
- versionType string
-}
-
-// NewMoreLikeThisQueryItem creates and initializes a MoreLikeThisQueryItem.
-func NewMoreLikeThisQueryItem() *MoreLikeThisQueryItem {
- return &MoreLikeThisQueryItem{
- version: -1,
- }
-}
-
-// LikeText represents a text to be "liked".
-func (item *MoreLikeThisQueryItem) LikeText(likeText string) *MoreLikeThisQueryItem {
- item.likeText = likeText
- return item
-}
-
-// Index represents the index of the item.
-func (item *MoreLikeThisQueryItem) Index(index string) *MoreLikeThisQueryItem {
- item.index = index
- return item
-}
-
-// Type represents the document type of the item.
-func (item *MoreLikeThisQueryItem) Type(typ string) *MoreLikeThisQueryItem {
- item.typ = typ
- return item
-}
-
-// Id represents the document id of the item.
-func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem {
- item.id = id
- return item
-}
-
-// Doc represents a raw document template for the item.
-func (item *MoreLikeThisQueryItem) Doc(doc interface{}) *MoreLikeThisQueryItem {
- item.doc = doc
- return item
-}
-
-// Fields represents the list of fields of the item.
-func (item *MoreLikeThisQueryItem) Fields(fields ...string) *MoreLikeThisQueryItem {
- item.fields = append(item.fields, fields...)
- return item
-}
-
-// Routing sets the routing associated with the item.
-func (item *MoreLikeThisQueryItem) Routing(routing string) *MoreLikeThisQueryItem {
- item.routing = routing
- return item
-}
-
-// FetchSourceContext represents the fetch source of the item which controls
-// if and how _source should be returned.
-func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem {
- item.fsc = fsc
- return item
-}
-
-// Version specifies the version of the item.
-func (item *MoreLikeThisQueryItem) Version(version int64) *MoreLikeThisQueryItem {
- item.version = version
- return item
-}
-
-// VersionType represents the version type of the item.
-func (item *MoreLikeThisQueryItem) VersionType(versionType string) *MoreLikeThisQueryItem {
- item.versionType = versionType
- return item
-}
-
-// Source returns the JSON-serializable fragment of the entity.
-func (item *MoreLikeThisQueryItem) Source() (interface{}, error) {
- if item.likeText != "" {
- return item.likeText, nil
- }
-
- source := make(map[string]interface{})
-
- if item.index != "" {
- source["_index"] = item.index
- }
- if item.typ != "" {
- source["_type"] = item.typ
- }
- if item.id != "" {
- source["_id"] = item.id
- }
- if item.doc != nil {
- source["doc"] = item.doc
- }
- if len(item.fields) > 0 {
- source["fields"] = item.fields
- }
- if item.routing != "" {
- source["_routing"] = item.routing
- }
- if item.fsc != nil {
- src, err := item.fsc.Source()
- if err != nil {
- return nil, err
- }
- source["_source"] = src
- }
- if item.version >= 0 {
- source["_version"] = item.version
- }
- if item.versionType != "" {
- source["_version_type"] = item.versionType
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_more_like_this_test.go b/vendor/github.com/olivere/elastic/search_queries_more_like_this_test.go
deleted file mode 100644
index dcbbe74d1..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_more_like_this_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestMoreLikeThisQuerySourceWithLikeText(t *testing.T) {
- q := NewMoreLikeThisQuery().LikeText("Golang topic").Field("message")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatal(err)
- }
- got := string(data)
- expected := `{"more_like_this":{"fields":["message"],"like":["Golang topic"]}}`
- if got != expected {
- t.Fatalf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMoreLikeThisQuerySourceWithLikeAndUnlikeItems(t *testing.T) {
- q := NewMoreLikeThisQuery()
- q = q.LikeItems(
- NewMoreLikeThisQueryItem().Id("1"),
- NewMoreLikeThisQueryItem().Index(testIndexName2).Type("comment").Id("2").Routing("routing_id"),
- )
- q = q.IgnoreLikeItems(NewMoreLikeThisQueryItem().Id("3"))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatal(err)
- }
- got := string(data)
- expected := `{"more_like_this":{"like":[{"_id":"1"},{"_id":"2","_index":"elastic-test2","_routing":"routing_id","_type":"comment"}],"unlike":[{"_id":"3"}]}}`
- if got != expected {
- t.Fatalf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMoreLikeThisQuery(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another Golang topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Common query
- mltq := NewMoreLikeThisQuery().LikeText("Golang topic").Field("message")
- res, err := client.Search().
- Index(testIndexName).
- Query(mltq).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_multi_match.go b/vendor/github.com/olivere/elastic/search_queries_multi_match.go
deleted file mode 100644
index b6ff2107e..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_multi_match.go
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
- "strings"
-)
-
-// MultiMatchQuery builds on the MatchQuery to allow multi-field queries.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-multi-match-query.html
-type MultiMatchQuery struct {
- text interface{}
- fields []string
- fieldBoosts map[string]*float64
- typ string // best_fields, boolean, most_fields, cross_fields, phrase, phrase_prefix
- operator string // AND or OR
- analyzer string
- boost *float64
- slop *int
- fuzziness string
- prefixLength *int
- maxExpansions *int
- minimumShouldMatch string
- rewrite string
- fuzzyRewrite string
- tieBreaker *float64
- lenient *bool
- cutoffFrequency *float64
- zeroTermsQuery string
- queryName string
-}
-
-// MultiMatchQuery creates and initializes a new MultiMatchQuery.
-func NewMultiMatchQuery(text interface{}, fields ...string) *MultiMatchQuery {
- q := &MultiMatchQuery{
- text: text,
- fields: make([]string, 0),
- fieldBoosts: make(map[string]*float64),
- }
- q.fields = append(q.fields, fields...)
- return q
-}
-
-// Field adds a field to run the multi match against.
-func (q *MultiMatchQuery) Field(field string) *MultiMatchQuery {
- q.fields = append(q.fields, field)
- return q
-}
-
-// FieldWithBoost adds a field to run the multi match against with a specific boost.
-func (q *MultiMatchQuery) FieldWithBoost(field string, boost float64) *MultiMatchQuery {
- q.fields = append(q.fields, field)
- q.fieldBoosts[field] = &boost
- return q
-}
-
-// Type can be "best_fields", "boolean", "most_fields", "cross_fields",
-// "phrase", or "phrase_prefix".
-func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery {
- var zero = float64(0.0)
- var one = float64(1.0)
-
- switch strings.ToLower(typ) {
- default: // best_fields / boolean
- q.typ = "best_fields"
- q.tieBreaker = &zero
- case "most_fields":
- q.typ = "most_fields"
- q.tieBreaker = &one
- case "cross_fields":
- q.typ = "cross_fields"
- q.tieBreaker = &zero
- case "phrase":
- q.typ = "phrase"
- q.tieBreaker = &zero
- case "phrase_prefix":
- q.typ = "phrase_prefix"
- q.tieBreaker = &zero
- }
- return q
-}
-
-// Operator sets the operator to use when using boolean query.
-// It can be either AND or OR (default).
-func (q *MultiMatchQuery) Operator(operator string) *MultiMatchQuery {
- q.operator = operator
- return q
-}
-
-// Analyzer sets the analyzer to use explicitly. It defaults to use explicit
-// mapping config for the field, or, if not set, the default search analyzer.
-func (q *MultiMatchQuery) Analyzer(analyzer string) *MultiMatchQuery {
- q.analyzer = analyzer
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *MultiMatchQuery) Boost(boost float64) *MultiMatchQuery {
- q.boost = &boost
- return q
-}
-
-// Slop sets the phrase slop if evaluated to a phrase query type.
-func (q *MultiMatchQuery) Slop(slop int) *MultiMatchQuery {
- q.slop = &slop
- return q
-}
-
-// Fuzziness sets the fuzziness used when evaluated to a fuzzy query type.
-// It defaults to "AUTO".
-func (q *MultiMatchQuery) Fuzziness(fuzziness string) *MultiMatchQuery {
- q.fuzziness = fuzziness
- return q
-}
-
-// PrefixLength for the fuzzy process.
-func (q *MultiMatchQuery) PrefixLength(prefixLength int) *MultiMatchQuery {
- q.prefixLength = &prefixLength
- return q
-}
-
-// MaxExpansions is the number of term expansions to use when using fuzzy
-// or prefix type query. It defaults to unbounded so it's recommended
-// to set it to a reasonable value for faster execution.
-func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery {
- q.maxExpansions = &maxExpansions
- return q
-}
-
-// MinimumShouldMatch represents the minimum number of optional should clauses
-// to match.
-func (q *MultiMatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MultiMatchQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-func (q *MultiMatchQuery) Rewrite(rewrite string) *MultiMatchQuery {
- q.rewrite = rewrite
- return q
-}
-
-func (q *MultiMatchQuery) FuzzyRewrite(fuzzyRewrite string) *MultiMatchQuery {
- q.fuzzyRewrite = fuzzyRewrite
- return q
-}
-
-// TieBreaker for "best-match" disjunction queries (OR queries).
-// The tie breaker capability allows documents that match more than one
-// query clause (in this case on more than one field) to be scored better
-// than documents that match only the best of the fields, without confusing
-// this with the better case of two distinct matches in the multiple fields.
-//
-// A tie-breaker value of 1.0 is interpreted as a signal to score queries as
-// "most-match" queries where all matching query clauses are considered for scoring.
-func (q *MultiMatchQuery) TieBreaker(tieBreaker float64) *MultiMatchQuery {
- q.tieBreaker = &tieBreaker
- return q
-}
-
-// Lenient indicates whether format based failures will be ignored.
-func (q *MultiMatchQuery) Lenient(lenient bool) *MultiMatchQuery {
- q.lenient = &lenient
- return q
-}
-
-// CutoffFrequency sets a cutoff value in [0..1] (or absolute number >=1)
-// representing the maximum threshold of a terms document frequency to be
-// considered a low frequency term.
-func (q *MultiMatchQuery) CutoffFrequency(cutoff float64) *MultiMatchQuery {
- q.cutoffFrequency = &cutoff
- return q
-}
-
-// ZeroTermsQuery can be "all" or "none".
-func (q *MultiMatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MultiMatchQuery {
- q.zeroTermsQuery = zeroTermsQuery
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *MultiMatchQuery) QueryName(queryName string) *MultiMatchQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the query.
-func (q *MultiMatchQuery) Source() (interface{}, error) {
- //
- // {
- // "multi_match" : {
- // "query" : "this is a test",
- // "fields" : [ "subject", "message" ]
- // }
- // }
-
- source := make(map[string]interface{})
-
- multiMatch := make(map[string]interface{})
- source["multi_match"] = multiMatch
-
- multiMatch["query"] = q.text
-
- if len(q.fields) > 0 {
- var fields []string
- for _, field := range q.fields {
- if boost, found := q.fieldBoosts[field]; found {
- if boost != nil {
- fields = append(fields, fmt.Sprintf("%s^%f", field, *boost))
- } else {
- fields = append(fields, field)
- }
- } else {
- fields = append(fields, field)
- }
- }
- multiMatch["fields"] = fields
- }
-
- if q.typ != "" {
- multiMatch["type"] = q.typ
- }
-
- if q.operator != "" {
- multiMatch["operator"] = q.operator
- }
- if q.analyzer != "" {
- multiMatch["analyzer"] = q.analyzer
- }
- if q.boost != nil {
- multiMatch["boost"] = *q.boost
- }
- if q.slop != nil {
- multiMatch["slop"] = *q.slop
- }
- if q.fuzziness != "" {
- multiMatch["fuzziness"] = q.fuzziness
- }
- if q.prefixLength != nil {
- multiMatch["prefix_length"] = *q.prefixLength
- }
- if q.maxExpansions != nil {
- multiMatch["max_expansions"] = *q.maxExpansions
- }
- if q.minimumShouldMatch != "" {
- multiMatch["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.rewrite != "" {
- multiMatch["rewrite"] = q.rewrite
- }
- if q.fuzzyRewrite != "" {
- multiMatch["fuzzy_rewrite"] = q.fuzzyRewrite
- }
- if q.tieBreaker != nil {
- multiMatch["tie_breaker"] = *q.tieBreaker
- }
- if q.lenient != nil {
- multiMatch["lenient"] = *q.lenient
- }
- if q.cutoffFrequency != nil {
- multiMatch["cutoff_frequency"] = *q.cutoffFrequency
- }
- if q.zeroTermsQuery != "" {
- multiMatch["zero_terms_query"] = q.zeroTermsQuery
- }
- if q.queryName != "" {
- multiMatch["_name"] = q.queryName
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_multi_match_test.go b/vendor/github.com/olivere/elastic/search_queries_multi_match_test.go
deleted file mode 100644
index d897f7e72..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_multi_match_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestMultiMatchQuery(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryBestFields(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").Type("best_fields")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":0,"type":"best_fields"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryMostFields(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").Type("most_fields")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":1,"type":"most_fields"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryCrossFields(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").Type("cross_fields")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":0,"type":"cross_fields"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryPhrase(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").Type("phrase")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":0,"type":"phrase"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryPhrasePrefix(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").Type("phrase_prefix")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":0,"type":"phrase_prefix"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestMultiMatchQueryBestFieldsWithCustomTieBreaker(t *testing.T) {
- q := NewMultiMatchQuery("this is a test", "subject", "message").
- Type("best_fields").
- TieBreaker(0.3)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"multi_match":{"fields":["subject","message"],"query":"this is a test","tie_breaker":0.3,"type":"best_fields"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_nested.go b/vendor/github.com/olivere/elastic/search_queries_nested.go
deleted file mode 100644
index d0a342283..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_nested.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// NestedQuery allows to query nested objects / docs.
-// The query is executed against the nested objects / docs as if they were
-// indexed as separate docs (they are, internally) and resulting in the
-// root parent doc (or parent nested mapping).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-nested-query.html
-type NestedQuery struct {
- query Query
- path string
- scoreMode string
- boost *float64
- queryName string
- innerHit *InnerHit
- ignoreUnmapped *bool
-}
-
-// NewNestedQuery creates and initializes a new NestedQuery.
-func NewNestedQuery(path string, query Query) *NestedQuery {
- return &NestedQuery{path: path, query: query}
-}
-
-// ScoreMode specifies the score mode.
-func (q *NestedQuery) ScoreMode(scoreMode string) *NestedQuery {
- q.scoreMode = scoreMode
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *NestedQuery) Boost(boost float64) *NestedQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *NestedQuery) QueryName(queryName string) *NestedQuery {
- q.queryName = queryName
- return q
-}
-
-// InnerHit sets the inner hit definition in the scope of this nested query
-// and reusing the defined path and query.
-func (q *NestedQuery) InnerHit(innerHit *InnerHit) *NestedQuery {
- q.innerHit = innerHit
- return q
-}
-
-// IgnoreUnmapped sets the ignore_unmapped option for the filter that ignores
-// unmapped nested fields
-func (q *NestedQuery) IgnoreUnmapped(value bool) *NestedQuery {
- q.ignoreUnmapped = &value
- return q
-}
-
-// Source returns JSON for the query.
-func (q *NestedQuery) Source() (interface{}, error) {
- query := make(map[string]interface{})
- nq := make(map[string]interface{})
- query["nested"] = nq
-
- src, err := q.query.Source()
- if err != nil {
- return nil, err
- }
- nq["query"] = src
-
- nq["path"] = q.path
-
- if q.scoreMode != "" {
- nq["score_mode"] = q.scoreMode
- }
- if q.boost != nil {
- nq["boost"] = *q.boost
- }
- if q.queryName != "" {
- nq["_name"] = q.queryName
- }
- if q.ignoreUnmapped != nil {
- nq["ignore_unmapped"] = *q.ignoreUnmapped
- }
- if q.innerHit != nil {
- src, err := q.innerHit.Source()
- if err != nil {
- return nil, err
- }
- nq["inner_hits"] = src
- }
- return query, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_nested_test.go b/vendor/github.com/olivere/elastic/search_queries_nested_test.go
deleted file mode 100644
index c7a5322a6..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_nested_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestNestedQuery(t *testing.T) {
- bq := NewBoolQuery()
- bq = bq.Must(NewTermQuery("obj1.name", "blue"))
- bq = bq.Must(NewRangeQuery("obj1.count").Gt(5))
- q := NewNestedQuery("obj1", bq).QueryName("qname")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"nested":{"_name":"qname","path":"obj1","query":{"bool":{"must":[{"term":{"obj1.name":"blue"}},{"range":{"obj1.count":{"from":5,"include_lower":false,"include_upper":true,"to":null}}}]}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNestedQueryWithInnerHit(t *testing.T) {
- bq := NewBoolQuery()
- bq = bq.Must(NewTermQuery("obj1.name", "blue"))
- bq = bq.Must(NewRangeQuery("obj1.count").Gt(5))
- q := NewNestedQuery("obj1", bq)
- q = q.QueryName("qname")
- q = q.InnerHit(NewInnerHit().Name("comments").Query(NewTermQuery("user", "olivere")))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"nested":{"_name":"qname","inner_hits":{"name":"comments","query":{"term":{"user":"olivere"}}},"path":"obj1","query":{"bool":{"must":[{"term":{"obj1.name":"blue"}},{"range":{"obj1.count":{"from":5,"include_lower":false,"include_upper":true,"to":null}}}]}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNestedQueryWithIgnoreUnmapped(t *testing.T) {
- var tests = []struct {
- query *BoolQuery
- expected string
- }{
- {
- NewBoolQuery().Must(NewNestedQuery("path", NewTermQuery("test", "test"))),
- `{"bool":{"must":{"nested":{"path":"path","query":{"term":{"test":"test"}}}}}}`,
- },
- {
- NewBoolQuery().Must(NewNestedQuery("path", NewTermQuery("test", "test")).IgnoreUnmapped(true)),
- `{"bool":{"must":{"nested":{"ignore_unmapped":true,"path":"path","query":{"term":{"test":"test"}}}}}}`,
- },
- {
- NewBoolQuery().Must(NewNestedQuery("path", NewTermQuery("test", "test")).IgnoreUnmapped(false)),
- `{"bool":{"must":{"nested":{"ignore_unmapped":false,"path":"path","query":{"term":{"test":"test"}}}}}}`,
- },
- }
- for _, test := range tests {
- src, err := test.query.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- if got != test.expected {
- t.Errorf("expected\n%s\n,got:\n%s", test.expected, got)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_parent_id.go b/vendor/github.com/olivere/elastic/search_queries_parent_id.go
deleted file mode 100644
index c0b610f12..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_parent_id.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// ParentIdQuery can be used to find child documents which belong to a
-// particular parent. Given the following mapping definition.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-parent-id-query.html
-type ParentIdQuery struct {
- typ string
- id string
- ignoreUnmapped *bool
- boost *float64
- queryName string
- innerHit *InnerHit
-}
-
-// NewParentIdQuery creates and initializes a new parent_id query.
-func NewParentIdQuery(typ, id string) *ParentIdQuery {
- return &ParentIdQuery{
- typ: typ,
- id: id,
- }
-}
-
-// Type sets the parent type.
-func (q *ParentIdQuery) Type(typ string) *ParentIdQuery {
- q.typ = typ
- return q
-}
-
-// Id sets the id.
-func (q *ParentIdQuery) Id(id string) *ParentIdQuery {
- q.id = id
- return q
-}
-
-// IgnoreUnmapped specifies whether unmapped types should be ignored.
-// If set to false, the query failes when an unmapped type is found.
-func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery {
- q.ignoreUnmapped = &ignore
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *ParentIdQuery) Boost(boost float64) *ParentIdQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName specifies the query name for the filter that can be used when
-// searching for matched filters per hit.
-func (q *ParentIdQuery) QueryName(queryName string) *ParentIdQuery {
- q.queryName = queryName
- return q
-}
-
-// InnerHit sets the inner hit definition in the scope of this query and
-// reusing the defined type and query.
-func (q *ParentIdQuery) InnerHit(innerHit *InnerHit) *ParentIdQuery {
- q.innerHit = innerHit
- return q
-}
-
-// Source returns JSON for the parent_id query.
-func (q *ParentIdQuery) Source() (interface{}, error) {
- // {
- // "parent_id" : {
- // "type" : "blog",
- // "id" : "1"
- // }
- // }
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["parent_id"] = query
-
- query["type"] = q.typ
- query["id"] = q.id
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.ignoreUnmapped != nil {
- query["ignore_unmapped"] = *q.ignoreUnmapped
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
- if q.innerHit != nil {
- src, err := q.innerHit.Source()
- if err != nil {
- return nil, err
- }
- query["inner_hits"] = src
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_parent_id_test.go b/vendor/github.com/olivere/elastic/search_queries_parent_id_test.go
deleted file mode 100644
index 0d18f216a..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_parent_id_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestParentIdQueryTest(t *testing.T) {
- tests := []struct {
- Query Query
- Expected string
- }{
- // #0
- {
- Query: NewParentIdQuery("blog_tag", "1"),
- Expected: `{"parent_id":{"id":"1","type":"blog_tag"}}`,
- },
- // #1
- {
- Query: NewParentIdQuery("blog_tag", "1").IgnoreUnmapped(true),
- Expected: `{"parent_id":{"id":"1","ignore_unmapped":true,"type":"blog_tag"}}`,
- },
- // #2
- {
- Query: NewParentIdQuery("blog_tag", "1").IgnoreUnmapped(false),
- Expected: `{"parent_id":{"id":"1","ignore_unmapped":false,"type":"blog_tag"}}`,
- },
- // #3
- {
- Query: NewParentIdQuery("blog_tag", "1").IgnoreUnmapped(true).Boost(5).QueryName("my_parent_query"),
- Expected: `{"parent_id":{"_name":"my_parent_query","boost":5,"id":"1","ignore_unmapped":true,"type":"blog_tag"}}`,
- },
- }
-
- for i, tt := range tests {
- src, err := tt.Query.Source()
- if err != nil {
- t.Fatalf("#%d: encoding Source failed: %v", i, err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("#%d: marshaling to JSON failed: %v", i, err)
- }
- if want, got := tt.Expected, string(data); want != got {
- t.Fatalf("#%d: expected\n%s\ngot:\n%s", i, want, got)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_percolator.go b/vendor/github.com/olivere/elastic/search_queries_percolator.go
deleted file mode 100644
index a7605655b..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_percolator.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// PercolatorQuery can be used to match queries stored in an index.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-percolate-query.html
-type PercolatorQuery struct {
- field string
- documentType string // deprecated
- document interface{}
- indexedDocumentIndex string
- indexedDocumentType string
- indexedDocumentId string
- indexedDocumentRouting string
- indexedDocumentPreference string
- indexedDocumentVersion *int64
-}
-
-// NewPercolatorQuery creates and initializes a new Percolator query.
-func NewPercolatorQuery() *PercolatorQuery {
- return &PercolatorQuery{}
-}
-
-func (q *PercolatorQuery) Field(field string) *PercolatorQuery {
- q.field = field
- return q
-}
-
-// Deprecated: DocumentType is deprecated as of 6.0.
-func (q *PercolatorQuery) DocumentType(typ string) *PercolatorQuery {
- q.documentType = typ
- return q
-}
-
-func (q *PercolatorQuery) Document(doc interface{}) *PercolatorQuery {
- q.document = doc
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentIndex(index string) *PercolatorQuery {
- q.indexedDocumentIndex = index
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentType(typ string) *PercolatorQuery {
- q.indexedDocumentType = typ
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentId(id string) *PercolatorQuery {
- q.indexedDocumentId = id
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentRouting(routing string) *PercolatorQuery {
- q.indexedDocumentRouting = routing
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentPreference(preference string) *PercolatorQuery {
- q.indexedDocumentPreference = preference
- return q
-}
-
-func (q *PercolatorQuery) IndexedDocumentVersion(version int64) *PercolatorQuery {
- q.indexedDocumentVersion = &version
- return q
-}
-
-// Source returns JSON for the percolate query.
-func (q *PercolatorQuery) Source() (interface{}, error) {
- if len(q.field) == 0 {
- return nil, errors.New("elastic: Field is required in PercolatorQuery")
- }
- if q.document == nil {
- return nil, errors.New("elastic: Document is required in PercolatorQuery")
- }
-
- // {
- // "percolate" : { ... }
- // }
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["percolate"] = params
- params["field"] = q.field
- if q.documentType != "" {
- params["document_type"] = q.documentType
- }
- params["document"] = q.document
- if len(q.indexedDocumentIndex) > 0 {
- params["index"] = q.indexedDocumentIndex
- }
- if len(q.indexedDocumentType) > 0 {
- params["type"] = q.indexedDocumentType
- }
- if len(q.indexedDocumentId) > 0 {
- params["id"] = q.indexedDocumentId
- }
- if len(q.indexedDocumentRouting) > 0 {
- params["routing"] = q.indexedDocumentRouting
- }
- if len(q.indexedDocumentPreference) > 0 {
- params["preference"] = q.indexedDocumentPreference
- }
- if q.indexedDocumentVersion != nil {
- params["version"] = *q.indexedDocumentVersion
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_percolator_test.go b/vendor/github.com/olivere/elastic/search_queries_percolator_test.go
deleted file mode 100644
index edc7be626..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_percolator_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPercolatorQuery(t *testing.T) {
- q := NewPercolatorQuery().
- Field("query").
- Document(map[string]interface{}{
- "message": "Some message",
- })
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percolate":{"document":{"message":"Some message"},"field":"query"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercolatorQueryWithDetails(t *testing.T) {
- q := NewPercolatorQuery().
- Field("query").
- Document(map[string]interface{}{
- "message": "Some message",
- }).
- IndexedDocumentIndex("index").
- IndexedDocumentId("1").
- IndexedDocumentRouting("route").
- IndexedDocumentPreference("one").
- IndexedDocumentVersion(1)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"percolate":{"document":{"message":"Some message"},"field":"query","id":"1","index":"index","preference":"one","routing":"route","version":1}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPercolatorQueryWithMissingFields(t *testing.T) {
- q := NewPercolatorQuery() // no Field, Document, or Query
- _, err := q.Source()
- if err == nil {
- t.Fatal("expected error, got nil")
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_prefix.go b/vendor/github.com/olivere/elastic/search_queries_prefix.go
deleted file mode 100644
index 075bcc7ba..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_prefix.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// PrefixQuery matches documents that have fields containing terms
-// with a specified prefix (not analyzed).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-prefix-query.html
-type PrefixQuery struct {
- name string
- prefix string
- boost *float64
- rewrite string
- queryName string
-}
-
-// NewPrefixQuery creates and initializes a new PrefixQuery.
-func NewPrefixQuery(name string, prefix string) *PrefixQuery {
- return &PrefixQuery{name: name, prefix: prefix}
-}
-
-// Boost sets the boost for this query.
-func (q *PrefixQuery) Boost(boost float64) *PrefixQuery {
- q.boost = &boost
- return q
-}
-
-func (q *PrefixQuery) Rewrite(rewrite string) *PrefixQuery {
- q.rewrite = rewrite
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched_filters per hit.
-func (q *PrefixQuery) QueryName(queryName string) *PrefixQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the query.
-func (q *PrefixQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["prefix"] = query
-
- if q.boost == nil && q.rewrite == "" && q.queryName == "" {
- query[q.name] = q.prefix
- } else {
- subQuery := make(map[string]interface{})
- subQuery["value"] = q.prefix
- if q.boost != nil {
- subQuery["boost"] = *q.boost
- }
- if q.rewrite != "" {
- subQuery["rewrite"] = q.rewrite
- }
- if q.queryName != "" {
- subQuery["_name"] = q.queryName
- }
- query[q.name] = subQuery
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_prefix_example_test.go b/vendor/github.com/olivere/elastic/search_queries_prefix_example_test.go
deleted file mode 100644
index 73950f1f3..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_prefix_example_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic_test
-
-import (
- "context"
-
- "github.com/olivere/elastic"
-)
-
-func ExamplePrefixQuery() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Define wildcard query
- q := elastic.NewPrefixQuery("user", "oli")
- q = q.QueryName("my_query_name")
-
- searchResult, err := client.Search().
- Index("twitter").
- Query(q).
- Pretty(true).
- Do(context.Background())
- if err != nil {
- // Handle error
- panic(err)
- }
- _ = searchResult
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_prefix_test.go b/vendor/github.com/olivere/elastic/search_queries_prefix_test.go
deleted file mode 100644
index 78d27b600..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_prefix_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPrefixQuery(t *testing.T) {
- q := NewPrefixQuery("user", "ki")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"prefix":{"user":"ki"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPrefixQueryWithOptions(t *testing.T) {
- q := NewPrefixQuery("user", "ki")
- q = q.QueryName("my_query_name")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"prefix":{"user":{"_name":"my_query_name","value":"ki"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_query_string.go b/vendor/github.com/olivere/elastic/search_queries_query_string.go
deleted file mode 100644
index a52c8b1a5..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_query_string.go
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
-)
-
-// QueryStringQuery uses the query parser in order to parse its content.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-query-string-query.html
-type QueryStringQuery struct {
- queryString string
- defaultField string
- defaultOperator string
- analyzer string
- quoteAnalyzer string
- quoteFieldSuffix string
- allowLeadingWildcard *bool
- lowercaseExpandedTerms *bool // Deprecated: Decision is now made by the analyzer
- enablePositionIncrements *bool
- analyzeWildcard *bool
- locale string // Deprecated: Decision is now made by the analyzer
- boost *float64
- fuzziness string
- fuzzyPrefixLength *int
- fuzzyMaxExpansions *int
- fuzzyRewrite string
- phraseSlop *int
- fields []string
- fieldBoosts map[string]*float64
- tieBreaker *float64
- rewrite string
- minimumShouldMatch string
- lenient *bool
- queryName string
- timeZone string
- maxDeterminizedStates *int
- escape *bool
- typ string
-}
-
-// NewQueryStringQuery creates and initializes a new QueryStringQuery.
-func NewQueryStringQuery(queryString string) *QueryStringQuery {
- return &QueryStringQuery{
- queryString: queryString,
- fields: make([]string, 0),
- fieldBoosts: make(map[string]*float64),
- }
-}
-
-// DefaultField specifies the field to run against when no prefix field
-// is specified. Only relevant when not explicitly adding fields the query
-// string will run against.
-func (q *QueryStringQuery) DefaultField(defaultField string) *QueryStringQuery {
- q.defaultField = defaultField
- return q
-}
-
-// Field adds a field to run the query string against.
-func (q *QueryStringQuery) Field(field string) *QueryStringQuery {
- q.fields = append(q.fields, field)
- return q
-}
-
-// Type sets how multiple fields should be combined to build textual part queries,
-// e.g. "best_fields".
-func (q *QueryStringQuery) Type(typ string) *QueryStringQuery {
- q.typ = typ
- return q
-}
-
-// FieldWithBoost adds a field to run the query string against with a specific boost.
-func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery {
- q.fields = append(q.fields, field)
- q.fieldBoosts[field] = &boost
- return q
-}
-
-// TieBreaker is used when more than one field is used with the query string,
-// and combined queries are using dismax.
-func (q *QueryStringQuery) TieBreaker(tieBreaker float64) *QueryStringQuery {
- q.tieBreaker = &tieBreaker
- return q
-}
-
-// DefaultOperator sets the boolean operator of the query parser used to
-// parse the query string.
-//
-// In default mode (OR) terms without any modifiers
-// are considered optional, e.g. "capital of Hungary" is equal to
-// "capital OR of OR Hungary".
-//
-// In AND mode, terms are considered to be in conjunction. The above mentioned
-// query is then parsed as "capital AND of AND Hungary".
-func (q *QueryStringQuery) DefaultOperator(operator string) *QueryStringQuery {
- q.defaultOperator = operator
- return q
-}
-
-// Analyzer is an optional analyzer used to analyze the query string.
-// Note, if a field has search analyzer defined for it, then it will be used
-// automatically. Defaults to the smart search analyzer.
-func (q *QueryStringQuery) Analyzer(analyzer string) *QueryStringQuery {
- q.analyzer = analyzer
- return q
-}
-
-// QuoteAnalyzer is an optional analyzer to be used to analyze the query string
-// for phrase searches. Note, if a field has search analyzer defined for it,
-// then it will be used automatically. Defaults to the smart search analyzer.
-func (q *QueryStringQuery) QuoteAnalyzer(quoteAnalyzer string) *QueryStringQuery {
- q.quoteAnalyzer = quoteAnalyzer
- return q
-}
-
-// MaxDeterminizedState protects against too-difficult regular expression queries.
-func (q *QueryStringQuery) MaxDeterminizedState(maxDeterminizedStates int) *QueryStringQuery {
- q.maxDeterminizedStates = &maxDeterminizedStates
- return q
-}
-
-// AllowLeadingWildcard specifies whether leading wildcards should be allowed
-// or not (defaults to true).
-func (q *QueryStringQuery) AllowLeadingWildcard(allowLeadingWildcard bool) *QueryStringQuery {
- q.allowLeadingWildcard = &allowLeadingWildcard
- return q
-}
-
-// LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy
-// and range queries are automatically lower-cased or not. Default is true.
-//
-// Deprecated: Decision is now made by the analyzer.
-func (q *QueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *QueryStringQuery {
- q.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return q
-}
-
-// EnablePositionIncrements indicates whether to enable position increments
-// in result query. Defaults to true.
-//
-// When set, result phrase and multi-phrase queries will be aware of position
-// increments. Useful when e.g. a StopFilter increases the position increment
-// of the token that follows an omitted token.
-func (q *QueryStringQuery) EnablePositionIncrements(enablePositionIncrements bool) *QueryStringQuery {
- q.enablePositionIncrements = &enablePositionIncrements
- return q
-}
-
-// Fuzziness sets the edit distance for fuzzy queries. Default is "AUTO".
-func (q *QueryStringQuery) Fuzziness(fuzziness string) *QueryStringQuery {
- q.fuzziness = fuzziness
- return q
-}
-
-// FuzzyPrefixLength sets the minimum prefix length for fuzzy queries.
-// Default is 1.
-func (q *QueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *QueryStringQuery {
- q.fuzzyPrefixLength = &fuzzyPrefixLength
- return q
-}
-
-func (q *QueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *QueryStringQuery {
- q.fuzzyMaxExpansions = &fuzzyMaxExpansions
- return q
-}
-
-func (q *QueryStringQuery) FuzzyRewrite(fuzzyRewrite string) *QueryStringQuery {
- q.fuzzyRewrite = fuzzyRewrite
- return q
-}
-
-// PhraseSlop sets the default slop for phrases. If zero, then exact matches
-// are required. Default value is zero.
-func (q *QueryStringQuery) PhraseSlop(phraseSlop int) *QueryStringQuery {
- q.phraseSlop = &phraseSlop
- return q
-}
-
-// AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
-func (q *QueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *QueryStringQuery {
- q.analyzeWildcard = &analyzeWildcard
- return q
-}
-
-func (q *QueryStringQuery) Rewrite(rewrite string) *QueryStringQuery {
- q.rewrite = rewrite
- return q
-}
-
-func (q *QueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *QueryStringQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *QueryStringQuery) Boost(boost float64) *QueryStringQuery {
- q.boost = &boost
- return q
-}
-
-// QuoteFieldSuffix is an optional field name suffix to automatically
-// try and add to the field searched when using quoted text.
-func (q *QueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *QueryStringQuery {
- q.quoteFieldSuffix = quoteFieldSuffix
- return q
-}
-
-// Lenient indicates whether the query string parser should be lenient
-// when parsing field values. It defaults to the index setting and if not
-// set, defaults to false.
-func (q *QueryStringQuery) Lenient(lenient bool) *QueryStringQuery {
- q.lenient = &lenient
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched_filters per hit.
-func (q *QueryStringQuery) QueryName(queryName string) *QueryStringQuery {
- q.queryName = queryName
- return q
-}
-
-// Locale specifies the locale to be used for string conversions.
-//
-// Deprecated: Decision is now made by the analyzer.
-func (q *QueryStringQuery) Locale(locale string) *QueryStringQuery {
- q.locale = locale
- return q
-}
-
-// TimeZone can be used to automatically adjust to/from fields using a
-// timezone. Only used with date fields, of course.
-func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery {
- q.timeZone = timeZone
- return q
-}
-
-// Escape performs escaping of the query string.
-func (q *QueryStringQuery) Escape(escape bool) *QueryStringQuery {
- q.escape = &escape
- return q
-}
-
-// Source returns JSON for the query.
-func (q *QueryStringQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["query_string"] = query
-
- query["query"] = q.queryString
-
- if q.defaultField != "" {
- query["default_field"] = q.defaultField
- }
-
- if len(q.fields) > 0 {
- var fields []string
- for _, field := range q.fields {
- if boost, found := q.fieldBoosts[field]; found {
- if boost != nil {
- fields = append(fields, fmt.Sprintf("%s^%f", field, *boost))
- } else {
- fields = append(fields, field)
- }
- } else {
- fields = append(fields, field)
- }
- }
- query["fields"] = fields
- }
-
- if q.tieBreaker != nil {
- query["tie_breaker"] = *q.tieBreaker
- }
- if q.defaultOperator != "" {
- query["default_operator"] = q.defaultOperator
- }
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.quoteAnalyzer != "" {
- query["quote_analyzer"] = q.quoteAnalyzer
- }
- if q.maxDeterminizedStates != nil {
- query["max_determinized_states"] = *q.maxDeterminizedStates
- }
- if q.allowLeadingWildcard != nil {
- query["allow_leading_wildcard"] = *q.allowLeadingWildcard
- }
- if q.lowercaseExpandedTerms != nil {
- query["lowercase_expanded_terms"] = *q.lowercaseExpandedTerms
- }
- if q.enablePositionIncrements != nil {
- query["enable_position_increments"] = *q.enablePositionIncrements
- }
- if q.fuzziness != "" {
- query["fuzziness"] = q.fuzziness
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
- if q.fuzzyPrefixLength != nil {
- query["fuzzy_prefix_length"] = *q.fuzzyPrefixLength
- }
- if q.fuzzyMaxExpansions != nil {
- query["fuzzy_max_expansions"] = *q.fuzzyMaxExpansions
- }
- if q.fuzzyRewrite != "" {
- query["fuzzy_rewrite"] = q.fuzzyRewrite
- }
- if q.phraseSlop != nil {
- query["phrase_slop"] = *q.phraseSlop
- }
- if q.analyzeWildcard != nil {
- query["analyze_wildcard"] = *q.analyzeWildcard
- }
- if q.rewrite != "" {
- query["rewrite"] = q.rewrite
- }
- if q.minimumShouldMatch != "" {
- query["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.quoteFieldSuffix != "" {
- query["quote_field_suffix"] = q.quoteFieldSuffix
- }
- if q.lenient != nil {
- query["lenient"] = *q.lenient
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
- if q.locale != "" {
- query["locale"] = q.locale
- }
- if q.timeZone != "" {
- query["time_zone"] = q.timeZone
- }
- if q.escape != nil {
- query["escape"] = *q.escape
- }
- if q.typ != "" {
- query["type"] = q.typ
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_query_string_test.go b/vendor/github.com/olivere/elastic/search_queries_query_string_test.go
deleted file mode 100644
index 5030c3382..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_query_string_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestQueryStringQuery(t *testing.T) {
- q := NewQueryStringQuery(`this AND that OR thus`)
- q = q.DefaultField("content")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query_string":{"default_field":"content","query":"this AND that OR thus"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestQueryStringQueryTimeZone(t *testing.T) {
- q := NewQueryStringQuery(`tweet_date:[2015-01-01 TO 2017-12-31]`)
- q = q.TimeZone("Europe/Berlin")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query_string":{"query":"tweet_date:[2015-01-01 TO 2017-12-31]","time_zone":"Europe/Berlin"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_range.go b/vendor/github.com/olivere/elastic/search_queries_range.go
deleted file mode 100644
index 1b92dee23..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_range.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// RangeQuery matches documents with fields that have terms within a certain range.
-//
-// For details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-range-query.html
-type RangeQuery struct {
- name string
- from interface{}
- to interface{}
- timeZone string
- includeLower bool
- includeUpper bool
- boost *float64
- queryName string
- format string
-}
-
-// NewRangeQuery creates and initializes a new RangeQuery.
-func NewRangeQuery(name string) *RangeQuery {
- return &RangeQuery{name: name, includeLower: true, includeUpper: true}
-}
-
-// From indicates the from part of the RangeQuery.
-// Use nil to indicate an unbounded from part.
-func (q *RangeQuery) From(from interface{}) *RangeQuery {
- q.from = from
- return q
-}
-
-// Gt indicates a greater-than value for the from part.
-// Use nil to indicate an unbounded from part.
-func (q *RangeQuery) Gt(from interface{}) *RangeQuery {
- q.from = from
- q.includeLower = false
- return q
-}
-
-// Gte indicates a greater-than-or-equal value for the from part.
-// Use nil to indicate an unbounded from part.
-func (q *RangeQuery) Gte(from interface{}) *RangeQuery {
- q.from = from
- q.includeLower = true
- return q
-}
-
-// To indicates the to part of the RangeQuery.
-// Use nil to indicate an unbounded to part.
-func (q *RangeQuery) To(to interface{}) *RangeQuery {
- q.to = to
- return q
-}
-
-// Lt indicates a less-than value for the to part.
-// Use nil to indicate an unbounded to part.
-func (q *RangeQuery) Lt(to interface{}) *RangeQuery {
- q.to = to
- q.includeUpper = false
- return q
-}
-
-// Lte indicates a less-than-or-equal value for the to part.
-// Use nil to indicate an unbounded to part.
-func (q *RangeQuery) Lte(to interface{}) *RangeQuery {
- q.to = to
- q.includeUpper = true
- return q
-}
-
-// IncludeLower indicates whether the lower bound should be included or not.
-// Defaults to true.
-func (q *RangeQuery) IncludeLower(includeLower bool) *RangeQuery {
- q.includeLower = includeLower
- return q
-}
-
-// IncludeUpper indicates whether the upper bound should be included or not.
-// Defaults to true.
-func (q *RangeQuery) IncludeUpper(includeUpper bool) *RangeQuery {
- q.includeUpper = includeUpper
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *RangeQuery) Boost(boost float64) *RangeQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched_filters per hit.
-func (q *RangeQuery) QueryName(queryName string) *RangeQuery {
- q.queryName = queryName
- return q
-}
-
-// TimeZone is used for date fields. In that case, we can adjust the
-// from/to fields using a timezone.
-func (q *RangeQuery) TimeZone(timeZone string) *RangeQuery {
- q.timeZone = timeZone
- return q
-}
-
-// Format is used for date fields. In that case, we can set the format
-// to be used instead of the mapper format.
-func (q *RangeQuery) Format(format string) *RangeQuery {
- q.format = format
- return q
-}
-
-// Source returns JSON for the query.
-func (q *RangeQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- rangeQ := make(map[string]interface{})
- source["range"] = rangeQ
-
- params := make(map[string]interface{})
- rangeQ[q.name] = params
-
- params["from"] = q.from
- params["to"] = q.to
- if q.timeZone != "" {
- params["time_zone"] = q.timeZone
- }
- if q.format != "" {
- params["format"] = q.format
- }
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- params["include_lower"] = q.includeLower
- params["include_upper"] = q.includeUpper
-
- if q.queryName != "" {
- rangeQ["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_range_test.go b/vendor/github.com/olivere/elastic/search_queries_range_test.go
deleted file mode 100644
index 86d018a86..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_range_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestRangeQuery(t *testing.T) {
- q := NewRangeQuery("postDate").From("2010-03-01").To("2010-04-01").Boost(3)
- q = q.QueryName("my_query")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"_name":"my_query","postDate":{"boost":3,"from":"2010-03-01","include_lower":true,"include_upper":true,"to":"2010-04-01"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeQueryWithTimeZone(t *testing.T) {
- q := NewRangeQuery("born").
- Gte("2012-01-01").
- Lte("now").
- TimeZone("+1:00")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"born":{"from":"2012-01-01","include_lower":true,"include_upper":true,"time_zone":"+1:00","to":"now"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRangeQueryWithFormat(t *testing.T) {
- q := NewRangeQuery("born").
- Gte("2012/01/01").
- Lte("now").
- Format("yyyy/MM/dd")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"range":{"born":{"format":"yyyy/MM/dd","from":"2012/01/01","include_lower":true,"include_upper":true,"to":"now"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_raw_string.go b/vendor/github.com/olivere/elastic/search_queries_raw_string.go
deleted file mode 100644
index 3f9685c41..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_raw_string.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012-present Oliver Eilhard, John Stanford. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "encoding/json"
-
-// RawStringQuery can be used to treat a string representation of an ES query
-// as a Query. Example usage:
-// q := RawStringQuery("{\"match_all\":{}}")
-// db.Search().Query(q).From(1).Size(100).Do()
-type RawStringQuery string
-
-// NewRawStringQuery ininitializes a new RawStringQuery.
-// It is the same as RawStringQuery(q).
-func NewRawStringQuery(q string) RawStringQuery {
- return RawStringQuery(q)
-}
-
-// Source returns the JSON encoded body
-func (q RawStringQuery) Source() (interface{}, error) {
- var f interface{}
- err := json.Unmarshal([]byte(q), &f)
- return f, err
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_raw_string_test.go b/vendor/github.com/olivere/elastic/search_queries_raw_string_test.go
deleted file mode 100644
index 5bb3dac41..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_raw_string_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestRawStringQuery(t *testing.T) {
- q := RawStringQuery(`{"match_all":{}}`)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_all":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNewRawStringQuery(t *testing.T) {
- q := NewRawStringQuery(`{"match_all":{}}`)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"match_all":{}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_regexp.go b/vendor/github.com/olivere/elastic/search_queries_regexp.go
deleted file mode 100644
index a08b533cb..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_regexp.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// RegexpQuery allows you to use regular expression term queries.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-regexp-query.html
-type RegexpQuery struct {
- name string
- regexp string
- flags string
- boost *float64
- rewrite string
- queryName string
- maxDeterminizedStates *int
-}
-
-// NewRegexpQuery creates and initializes a new RegexpQuery.
-func NewRegexpQuery(name string, regexp string) *RegexpQuery {
- return &RegexpQuery{name: name, regexp: regexp}
-}
-
-// Flags sets the regexp flags.
-func (q *RegexpQuery) Flags(flags string) *RegexpQuery {
- q.flags = flags
- return q
-}
-
-// MaxDeterminizedStates protects against complex regular expressions.
-func (q *RegexpQuery) MaxDeterminizedStates(maxDeterminizedStates int) *RegexpQuery {
- q.maxDeterminizedStates = &maxDeterminizedStates
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *RegexpQuery) Boost(boost float64) *RegexpQuery {
- q.boost = &boost
- return q
-}
-
-func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery {
- q.rewrite = rewrite
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *RegexpQuery) QueryName(queryName string) *RegexpQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns the JSON-serializable query data.
-func (q *RegexpQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
- query := make(map[string]interface{})
- source["regexp"] = query
-
- x := make(map[string]interface{})
- x["value"] = q.regexp
- if q.flags != "" {
- x["flags"] = q.flags
- }
- if q.maxDeterminizedStates != nil {
- x["max_determinized_states"] = *q.maxDeterminizedStates
- }
- if q.boost != nil {
- x["boost"] = *q.boost
- }
- if q.rewrite != "" {
- x["rewrite"] = q.rewrite
- }
- if q.queryName != "" {
- x["name"] = q.queryName
- }
- query[q.name] = x
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_regexp_test.go b/vendor/github.com/olivere/elastic/search_queries_regexp_test.go
deleted file mode 100644
index d30c0a36d..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_regexp_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestRegexpQuery(t *testing.T) {
- q := NewRegexpQuery("name.first", "s.*y")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"regexp":{"name.first":{"value":"s.*y"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestRegexpQueryWithOptions(t *testing.T) {
- q := NewRegexpQuery("name.first", "s.*y").
- Boost(1.2).
- Flags("INTERSECTION|COMPLEMENT|EMPTY").
- QueryName("my_query_name")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"regexp":{"name.first":{"boost":1.2,"flags":"INTERSECTION|COMPLEMENT|EMPTY","name":"my_query_name","value":"s.*y"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_script.go b/vendor/github.com/olivere/elastic/search_queries_script.go
deleted file mode 100644
index d430f4c8f..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_script.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// ScriptQuery allows to define scripts as filters.
-//
-// For details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-script-query.html
-type ScriptQuery struct {
- script *Script
- queryName string
-}
-
-// NewScriptQuery creates and initializes a new ScriptQuery.
-func NewScriptQuery(script *Script) *ScriptQuery {
- return &ScriptQuery{
- script: script,
- }
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *ScriptQuery) QueryName(queryName string) *ScriptQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the query.
-func (q *ScriptQuery) Source() (interface{}, error) {
- if q.script == nil {
- return nil, errors.New("ScriptQuery expected a script")
- }
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["script"] = params
-
- src, err := q.script.Source()
- if err != nil {
- return nil, err
- }
- params["script"] = src
-
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_script_test.go b/vendor/github.com/olivere/elastic/search_queries_script_test.go
deleted file mode 100644
index 66ec106d5..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_script_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestScriptQuery(t *testing.T) {
- q := NewScriptQuery(NewScript("doc['num1'.value > 1"))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"script":{"script":{"source":"doc['num1'.value \u003e 1"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScriptQueryWithParams(t *testing.T) {
- q := NewScriptQuery(NewScript("doc['num1'.value > 1"))
- q = q.QueryName("MyQueryName")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"script":{"_name":"MyQueryName","script":{"source":"doc['num1'.value \u003e 1"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_simple_query_string.go b/vendor/github.com/olivere/elastic/search_queries_simple_query_string.go
deleted file mode 100644
index 462ea5533..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_simple_query_string.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
- "strings"
-)
-
-// SimpleQueryStringQuery is a query that uses the SimpleQueryParser
-// to parse its context. Unlike the regular query_string query,
-// the simple_query_string query will never throw an exception,
-// and discards invalid parts of the query.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-simple-query-string-query.html
-type SimpleQueryStringQuery struct {
- queryText string
- analyzer string
- operator string
- fields []string
- fieldBoosts map[string]*float64
- minimumShouldMatch string
- flags string
- boost *float64
- lowercaseExpandedTerms *bool
- lenient *bool
- analyzeWildcard *bool
- locale string
- queryName string
-}
-
-// NewSimpleQueryStringQuery creates and initializes a new SimpleQueryStringQuery.
-func NewSimpleQueryStringQuery(text string) *SimpleQueryStringQuery {
- return &SimpleQueryStringQuery{
- queryText: text,
- fields: make([]string, 0),
- fieldBoosts: make(map[string]*float64),
- }
-}
-
-// Field adds a field to run the query against.
-func (q *SimpleQueryStringQuery) Field(field string) *SimpleQueryStringQuery {
- q.fields = append(q.fields, field)
- return q
-}
-
-// Field adds a field to run the query against with a specific boost.
-func (q *SimpleQueryStringQuery) FieldWithBoost(field string, boost float64) *SimpleQueryStringQuery {
- q.fields = append(q.fields, field)
- q.fieldBoosts[field] = &boost
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *SimpleQueryStringQuery) Boost(boost float64) *SimpleQueryStringQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used when
-// searching for matched_filters per hit.
-func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery {
- q.queryName = queryName
- return q
-}
-
-// Analyzer specifies the analyzer to use for the query.
-func (q *SimpleQueryStringQuery) Analyzer(analyzer string) *SimpleQueryStringQuery {
- q.analyzer = analyzer
- return q
-}
-
-// DefaultOperator specifies the default operator for the query.
-func (q *SimpleQueryStringQuery) DefaultOperator(defaultOperator string) *SimpleQueryStringQuery {
- q.operator = defaultOperator
- return q
-}
-
-// Flags sets the flags for the query.
-func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery {
- q.flags = flags
- return q
-}
-
-// LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy
-// and range queries are automatically lower-cased or not. Default is true.
-func (q *SimpleQueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *SimpleQueryStringQuery {
- q.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return q
-}
-
-func (q *SimpleQueryStringQuery) Locale(locale string) *SimpleQueryStringQuery {
- q.locale = locale
- return q
-}
-
-// Lenient indicates whether the query string parser should be lenient
-// when parsing field values. It defaults to the index setting and if not
-// set, defaults to false.
-func (q *SimpleQueryStringQuery) Lenient(lenient bool) *SimpleQueryStringQuery {
- q.lenient = &lenient
- return q
-}
-
-// AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
-func (q *SimpleQueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *SimpleQueryStringQuery {
- q.analyzeWildcard = &analyzeWildcard
- return q
-}
-
-func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery {
- q.minimumShouldMatch = minimumShouldMatch
- return q
-}
-
-// Source returns JSON for the query.
-func (q *SimpleQueryStringQuery) Source() (interface{}, error) {
- // {
- // "simple_query_string" : {
- // "query" : "\"fried eggs\" +(eggplant | potato) -frittata",
- // "analyzer" : "snowball",
- // "fields" : ["body^5","_all"],
- // "default_operator" : "and"
- // }
- // }
-
- source := make(map[string]interface{})
-
- query := make(map[string]interface{})
- source["simple_query_string"] = query
-
- query["query"] = q.queryText
-
- if len(q.fields) > 0 {
- var fields []string
- for _, field := range q.fields {
- if boost, found := q.fieldBoosts[field]; found {
- if boost != nil {
- fields = append(fields, fmt.Sprintf("%s^%f", field, *boost))
- } else {
- fields = append(fields, field)
- }
- } else {
- fields = append(fields, field)
- }
- }
- query["fields"] = fields
- }
-
- if q.flags != "" {
- query["flags"] = q.flags
- }
- if q.analyzer != "" {
- query["analyzer"] = q.analyzer
- }
- if q.operator != "" {
- query["default_operator"] = strings.ToLower(q.operator)
- }
- if q.lowercaseExpandedTerms != nil {
- query["lowercase_expanded_terms"] = *q.lowercaseExpandedTerms
- }
- if q.lenient != nil {
- query["lenient"] = *q.lenient
- }
- if q.analyzeWildcard != nil {
- query["analyze_wildcard"] = *q.analyzeWildcard
- }
- if q.locale != "" {
- query["locale"] = q.locale
- }
- if q.queryName != "" {
- query["_name"] = q.queryName
- }
- if q.minimumShouldMatch != "" {
- query["minimum_should_match"] = q.minimumShouldMatch
- }
- if q.boost != nil {
- query["boost"] = *q.boost
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_simple_query_string_test.go b/vendor/github.com/olivere/elastic/search_queries_simple_query_string_test.go
deleted file mode 100644
index ea4a341ec..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_simple_query_string_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestSimpleQueryStringQuery(t *testing.T) {
- q := NewSimpleQueryStringQuery(`"fried eggs" +(eggplant | potato) -frittata`)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"simple_query_string":{"query":"\"fried eggs\" +(eggplant | potato) -frittata"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSimpleQueryStringQueryExec(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewSimpleQueryStringQuery("+Golang +Elasticsearch")).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 1 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 1, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 1 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 1, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_slice.go b/vendor/github.com/olivere/elastic/search_queries_slice.go
deleted file mode 100644
index e1b1db928..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_slice.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// SliceQuery allows to partition the documents into several slices.
-// It is used e.g. to slice scroll operations in Elasticsearch 5.0 or later.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html#sliced-scroll
-// for details.
-type SliceQuery struct {
- field string
- id *int
- max *int
-}
-
-// NewSliceQuery creates a new SliceQuery.
-func NewSliceQuery() *SliceQuery {
- return &SliceQuery{}
-}
-
-// Field is the name of the field to slice against (_uid by default).
-func (s *SliceQuery) Field(field string) *SliceQuery {
- s.field = field
- return s
-}
-
-// Id is the id of the slice.
-func (s *SliceQuery) Id(id int) *SliceQuery {
- s.id = &id
- return s
-}
-
-// Max is the maximum number of slices.
-func (s *SliceQuery) Max(max int) *SliceQuery {
- s.max = &max
- return s
-}
-
-// Source returns the JSON body.
-func (s *SliceQuery) Source() (interface{}, error) {
- m := make(map[string]interface{})
- if s.field != "" {
- m["field"] = s.field
- }
- if s.id != nil {
- m["id"] = *s.id
- }
- if s.max != nil {
- m["max"] = *s.max
- }
- return m, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_slice_test.go b/vendor/github.com/olivere/elastic/search_queries_slice_test.go
deleted file mode 100644
index 0589f4e29..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_slice_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSliceQuery(t *testing.T) {
- q := NewSliceQuery().Field("date").Id(0).Max(2)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"field":"date","id":0,"max":2}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_term.go b/vendor/github.com/olivere/elastic/search_queries_term.go
deleted file mode 100644
index 9a445e0ec..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_term.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermQuery finds documents that contain the exact term specified
-// in the inverted index.
-//
-// For details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-term-query.html
-type TermQuery struct {
- name string
- value interface{}
- boost *float64
- queryName string
-}
-
-// NewTermQuery creates and initializes a new TermQuery.
-func NewTermQuery(name string, value interface{}) *TermQuery {
- return &TermQuery{name: name, value: value}
-}
-
-// Boost sets the boost for this query.
-func (q *TermQuery) Boost(boost float64) *TermQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *TermQuery) QueryName(queryName string) *TermQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns JSON for the query.
-func (q *TermQuery) Source() (interface{}, error) {
- // {"term":{"name":"value"}}
- source := make(map[string]interface{})
- tq := make(map[string]interface{})
- source["term"] = tq
-
- if q.boost == nil && q.queryName == "" {
- tq[q.name] = q.value
- } else {
- subQ := make(map[string]interface{})
- subQ["value"] = q.value
- if q.boost != nil {
- subQ["boost"] = *q.boost
- }
- if q.queryName != "" {
- subQ["_name"] = q.queryName
- }
- tq[q.name] = subQ
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_term_test.go b/vendor/github.com/olivere/elastic/search_queries_term_test.go
deleted file mode 100644
index f800fa954..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_term_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTermQuery(t *testing.T) {
- q := NewTermQuery("user", "ki")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"term":{"user":"ki"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermQueryWithOptions(t *testing.T) {
- q := NewTermQuery("user", "ki")
- q = q.Boost(2.79)
- q = q.QueryName("my_tq")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"term":{"user":{"_name":"my_tq","boost":2.79,"value":"ki"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_terms.go b/vendor/github.com/olivere/elastic/search_queries_terms.go
deleted file mode 100644
index 3649576dc..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_terms.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermsQuery filters documents that have fields that match any
-// of the provided terms (not analyzed).
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-terms-query.html
-type TermsQuery struct {
- name string
- values []interface{}
- termsLookup *TermsLookup
- queryName string
- boost *float64
-}
-
-// NewTermsQuery creates and initializes a new TermsQuery.
-func NewTermsQuery(name string, values ...interface{}) *TermsQuery {
- q := &TermsQuery{
- name: name,
- values: make([]interface{}, 0),
- }
- if len(values) > 0 {
- q.values = append(q.values, values...)
- }
- return q
-}
-
-// TermsLookup adds terms lookup details to the query.
-func (q *TermsQuery) TermsLookup(lookup *TermsLookup) *TermsQuery {
- q.termsLookup = lookup
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *TermsQuery) Boost(boost float64) *TermsQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *TermsQuery) QueryName(queryName string) *TermsQuery {
- q.queryName = queryName
- return q
-}
-
-// Creates the query source for the term query.
-func (q *TermsQuery) Source() (interface{}, error) {
- // {"terms":{"name":["value1","value2"]}}
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["terms"] = params
-
- if q.termsLookup != nil {
- src, err := q.termsLookup.Source()
- if err != nil {
- return nil, err
- }
- params[q.name] = src
- } else {
- params[q.name] = q.values
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_terms_set.go b/vendor/github.com/olivere/elastic/search_queries_terms_set.go
deleted file mode 100644
index be410a1a7..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_terms_set.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermsSetQuery returns any documents that match with at least
-// one or more of the provided terms. The terms are not analyzed
-// and thus must match exactly. The number of terms that must
-// match varies per document and is either controlled by a
-// minimum should match field or computed per document in a
-// minimum should match script.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.1/query-dsl-terms-set-query.html
-type TermsSetQuery struct {
- name string
- values []interface{}
- minimumShouldMatchField string
- minimumShouldMatchScript *Script
- queryName string
- boost *float64
-}
-
-// NewTermsSetQuery creates and initializes a new TermsSetQuery.
-func NewTermsSetQuery(name string, values ...interface{}) *TermsSetQuery {
- q := &TermsSetQuery{
- name: name,
- }
- if len(values) > 0 {
- q.values = append(q.values, values...)
- }
- return q
-}
-
-// MinimumShouldMatchField specifies the field to match.
-func (q *TermsSetQuery) MinimumShouldMatchField(minimumShouldMatchField string) *TermsSetQuery {
- q.minimumShouldMatchField = minimumShouldMatchField
- return q
-}
-
-// MinimumShouldMatchScript specifies the script to match.
-func (q *TermsSetQuery) MinimumShouldMatchScript(minimumShouldMatchScript *Script) *TermsSetQuery {
- q.minimumShouldMatchScript = minimumShouldMatchScript
- return q
-}
-
-// Boost sets the boost for this query.
-func (q *TermsSetQuery) Boost(boost float64) *TermsSetQuery {
- q.boost = &boost
- return q
-}
-
-// QueryName sets the query name for the filter that can be used
-// when searching for matched_filters per hit
-func (q *TermsSetQuery) QueryName(queryName string) *TermsSetQuery {
- q.queryName = queryName
- return q
-}
-
-// Source creates the query source for the term query.
-func (q *TermsSetQuery) Source() (interface{}, error) {
- // {"terms_set":{"codes":{"terms":["abc","def"],"minimum_should_match_field":"required_matches"}}}
- source := make(map[string]interface{})
- inner := make(map[string]interface{})
- params := make(map[string]interface{})
- inner[q.name] = params
- source["terms_set"] = inner
-
- // terms
- params["terms"] = q.values
-
- // minimum_should_match_field
- if match := q.minimumShouldMatchField; match != "" {
- params["minimum_should_match_field"] = match
- }
-
- // minimum_should_match_script
- if match := q.minimumShouldMatchScript; match != nil {
- src, err := match.Source()
- if err != nil {
- return nil, err
- }
- params["minimum_should_match_script"] = src
- }
-
- // Common parameters for all queries
- if q.boost != nil {
- params["boost"] = *q.boost
- }
- if q.queryName != "" {
- params["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_terms_set_test.go b/vendor/github.com/olivere/elastic/search_queries_terms_set_test.go
deleted file mode 100644
index e13fbfb2f..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_terms_set_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestTermsSetQueryWithField(t *testing.T) {
- q := NewTermsSetQuery("codes", "abc", "def", "ghi").MinimumShouldMatchField("required_matches")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms_set":{"codes":{"minimum_should_match_field":"required_matches","terms":["abc","def","ghi"]}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsSetQueryWithScript(t *testing.T) {
- q := NewTermsSetQuery("codes", "abc", "def", "ghi").
- MinimumShouldMatchScript(
- NewScript(`Math.min(params.num_terms, doc['required_matches'].value)`),
- )
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms_set":{"codes":{"minimum_should_match_script":{"source":"Math.min(params.num_terms, doc['required_matches'].value)"},"terms":["abc","def","ghi"]}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchTermsSetQuery(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(
- NewTermsSetQuery("user", "olivere", "sandrae").
- MinimumShouldMatchField("retweets"),
- ).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if got, want := searchResult.Hits.TotalHits, int64(3); got != want {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", want, got)
- }
- if got, want := len(searchResult.Hits.Hits), 3; got != want {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_terms_test.go b/vendor/github.com/olivere/elastic/search_queries_terms_test.go
deleted file mode 100644
index 72f472d17..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_terms_test.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTermsQuery(t *testing.T) {
- q := NewTermsQuery("user", "ki")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"user":["ki"]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsQueryWithEmptyArray(t *testing.T) {
- included := make([]interface{}, 0)
- q := NewTermsQuery("tags", included...)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"tags":[]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermsQueryWithTermsLookup(t *testing.T) {
- q := NewTermsQuery("user").
- TermsLookup(NewTermsLookup().Index("users").Type("user").Id("2").Path("followers"))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"user":{"id":"2","index":"users","path":"followers","type":"user"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermQuerysWithOptions(t *testing.T) {
- q := NewTermsQuery("user", "ki", "ko")
- q = q.Boost(2.79)
- q = q.QueryName("my_tq")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"terms":{"_name":"my_tq","boost":2.79,"user":["ki","ko"]}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_type.go b/vendor/github.com/olivere/elastic/search_queries_type.go
deleted file mode 100644
index e7aef30df..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_type.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TypeQuery filters documents matching the provided document / mapping type.
-//
-// For details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-type-query.html
-type TypeQuery struct {
- typ string
-}
-
-func NewTypeQuery(typ string) *TypeQuery {
- return &TypeQuery{typ: typ}
-}
-
-// Source returns JSON for the query.
-func (q *TypeQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
- params := make(map[string]interface{})
- source["type"] = params
- params["value"] = q.typ
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_type_test.go b/vendor/github.com/olivere/elastic/search_queries_type_test.go
deleted file mode 100644
index 176b82abb..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_type_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTypeQuery(t *testing.T) {
- q := NewTypeQuery("my_type")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"type":{"value":"my_type"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_wildcard.go b/vendor/github.com/olivere/elastic/search_queries_wildcard.go
deleted file mode 100644
index ea8a0901c..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_wildcard.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// WildcardQuery matches documents that have fields matching a wildcard
-// expression (not analyzed). Supported wildcards are *, which matches
-// any character sequence (including the empty one), and ?, which matches
-// any single character. Note this query can be slow, as it needs to iterate
-// over many terms. In order to prevent extremely slow wildcard queries,
-// a wildcard term should not start with one of the wildcards * or ?.
-// The wildcard query maps to Lucene WildcardQuery.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-wildcard-query.html
-type WildcardQuery struct {
- name string
- wildcard string
- boost *float64
- rewrite string
- queryName string
-}
-
-// NewWildcardQuery creates and initializes a new WildcardQuery.
-func NewWildcardQuery(name, wildcard string) *WildcardQuery {
- return &WildcardQuery{
- name: name,
- wildcard: wildcard,
- }
-}
-
-// Boost sets the boost for this query.
-func (q *WildcardQuery) Boost(boost float64) *WildcardQuery {
- q.boost = &boost
- return q
-}
-
-func (q *WildcardQuery) Rewrite(rewrite string) *WildcardQuery {
- q.rewrite = rewrite
- return q
-}
-
-// QueryName sets the name of this query.
-func (q *WildcardQuery) QueryName(queryName string) *WildcardQuery {
- q.queryName = queryName
- return q
-}
-
-// Source returns the JSON serializable body of this query.
-func (q *WildcardQuery) Source() (interface{}, error) {
- // {
- // "wildcard" : {
- // "user" : {
- // "wildcard" : "ki*y",
- // "boost" : 1.0
- // }
- // }
-
- source := make(map[string]interface{})
-
- query := make(map[string]interface{})
- source["wildcard"] = query
-
- wq := make(map[string]interface{})
- query[q.name] = wq
-
- wq["wildcard"] = q.wildcard
-
- if q.boost != nil {
- wq["boost"] = *q.boost
- }
- if q.rewrite != "" {
- wq["rewrite"] = q.rewrite
- }
- if q.queryName != "" {
- wq["_name"] = q.queryName
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_queries_wildcard_test.go b/vendor/github.com/olivere/elastic/search_queries_wildcard_test.go
deleted file mode 100644
index b41c8ab7b..000000000
--- a/vendor/github.com/olivere/elastic/search_queries_wildcard_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic_test
-
-import (
- "context"
- "encoding/json"
- "testing"
-
- "github.com/olivere/elastic"
-)
-
-func ExampleWildcardQuery() {
- // Get a client to the local Elasticsearch instance.
- client, err := elastic.NewClient()
- if err != nil {
- // Handle error
- panic(err)
- }
-
- // Define wildcard query
- q := elastic.NewWildcardQuery("user", "oli*er?").Boost(1.2)
- searchResult, err := client.Search().
- Index("twitter"). // search in index "twitter"
- Query(q). // use wildcard query defined above
- Do(context.TODO()) // execute
- if err != nil {
- // Handle error
- panic(err)
- }
- _ = searchResult
-}
-
-func TestWildcardQuery(t *testing.T) {
- q := elastic.NewWildcardQuery("user", "ki*y??")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"wildcard":{"user":{"wildcard":"ki*y??"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestWildcardQueryWithBoost(t *testing.T) {
- q := elastic.NewWildcardQuery("user", "ki*y??").Boost(1.2)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"wildcard":{"user":{"boost":1.2,"wildcard":"ki*y??"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_request.go b/vendor/github.com/olivere/elastic/search_request.go
deleted file mode 100644
index 8f08e73ff..000000000
--- a/vendor/github.com/olivere/elastic/search_request.go
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "strings"
-)
-
-// SearchRequest combines a search request and its
-// query details (see SearchSource).
-// It is used in combination with MultiSearch.
-type SearchRequest struct {
- searchType string
- indices []string
- types []string
- routing *string
- preference *string
- requestCache *bool
- ignoreUnavailable *bool
- allowNoIndices *bool
- expandWildcards string
- scroll string
- source interface{}
-}
-
-// NewSearchRequest creates a new search request.
-func NewSearchRequest() *SearchRequest {
- return &SearchRequest{}
-}
-
-// SearchRequest must be one of "dfs_query_then_fetch" or
-// "query_then_fetch".
-func (r *SearchRequest) SearchType(searchType string) *SearchRequest {
- r.searchType = searchType
- return r
-}
-
-// SearchTypeDfsQueryThenFetch sets search type to dfs_query_then_fetch.
-func (r *SearchRequest) SearchTypeDfsQueryThenFetch() *SearchRequest {
- return r.SearchType("dfs_query_then_fetch")
-}
-
-// SearchTypeQueryThenFetch sets search type to query_then_fetch.
-func (r *SearchRequest) SearchTypeQueryThenFetch() *SearchRequest {
- return r.SearchType("query_then_fetch")
-}
-
-func (r *SearchRequest) Index(indices ...string) *SearchRequest {
- r.indices = append(r.indices, indices...)
- return r
-}
-
-func (r *SearchRequest) HasIndices() bool {
- return len(r.indices) > 0
-}
-
-func (r *SearchRequest) Type(types ...string) *SearchRequest {
- r.types = append(r.types, types...)
- return r
-}
-
-func (r *SearchRequest) Routing(routing string) *SearchRequest {
- r.routing = &routing
- return r
-}
-
-func (r *SearchRequest) Routings(routings ...string) *SearchRequest {
- if routings != nil {
- routings := strings.Join(routings, ",")
- r.routing = &routings
- } else {
- r.routing = nil
- }
- return r
-}
-
-func (r *SearchRequest) Preference(preference string) *SearchRequest {
- r.preference = &preference
- return r
-}
-
-func (r *SearchRequest) RequestCache(requestCache bool) *SearchRequest {
- r.requestCache = &requestCache
- return r
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *SearchRequest) IgnoreUnavailable(ignoreUnavailable bool) *SearchRequest {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices
-// expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
-func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *SearchRequest) ExpandWildcards(expandWildcards string) *SearchRequest {
- s.expandWildcards = expandWildcards
- return s
-}
-
-func (r *SearchRequest) Scroll(scroll string) *SearchRequest {
- r.scroll = scroll
- return r
-}
-
-func (r *SearchRequest) SearchSource(searchSource *SearchSource) *SearchRequest {
- return r.Source(searchSource)
-}
-
-func (r *SearchRequest) Source(source interface{}) *SearchRequest {
- r.source = source
- return r
-}
-
-// header is used e.g. by MultiSearch to get information about the search header
-// of one SearchRequest.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-multi-search.html
-func (r *SearchRequest) header() interface{} {
- h := make(map[string]interface{})
- if r.searchType != "" {
- h["search_type"] = r.searchType
- }
-
- switch len(r.indices) {
- case 0:
- case 1:
- h["index"] = r.indices[0]
- default:
- h["indices"] = r.indices
- }
-
- switch len(r.types) {
- case 0:
- case 1:
- h["type"] = r.types[0]
- default:
- h["types"] = r.types
- }
-
- if r.routing != nil && *r.routing != "" {
- h["routing"] = *r.routing
- }
- if r.preference != nil && *r.preference != "" {
- h["preference"] = *r.preference
- }
- if r.requestCache != nil {
- h["request_cache"] = *r.requestCache
- }
- if r.ignoreUnavailable != nil {
- h["ignore_unavailable"] = *r.ignoreUnavailable
- }
- if r.allowNoIndices != nil {
- h["allow_no_indices"] = *r.allowNoIndices
- }
- if r.expandWildcards != "" {
- h["expand_wildcards"] = r.expandWildcards
- }
- if r.scroll != "" {
- h["scroll"] = r.scroll
- }
-
- return h
-}
-
-// Body allows to access the search body of the request, as generated by the DSL.
-// Notice that Body is read-only. You must not change the request body.
-//
-// Body is used e.g. by MultiSearch to get information about the search body
-// of one SearchRequest.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-multi-search.html
-func (r *SearchRequest) Body() (string, error) {
- switch t := r.source.(type) {
- default:
- body, err := json.Marshal(r.source)
- if err != nil {
- return "", err
- }
- return string(body), nil
- case *SearchSource:
- src, err := t.Source()
- if err != nil {
- return "", err
- }
- body, err := json.Marshal(src)
- if err != nil {
- return "", err
- }
- return string(body), nil
- case json.RawMessage:
- return string(t), nil
- case *json.RawMessage:
- return string(*t), nil
- case string:
- return t, nil
- case *string:
- if t != nil {
- return *t, nil
- }
- return "{}", nil
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_request_test.go b/vendor/github.com/olivere/elastic/search_request_test.go
deleted file mode 100644
index fa03af2c8..000000000
--- a/vendor/github.com/olivere/elastic/search_request_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- _ "net/http"
- "testing"
-)
-
-func TestSearchRequestIndex(t *testing.T) {
- builder := NewSearchRequest().Index("test")
- data, err := json.Marshal(builder.header())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"index":"test"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchRequestIndices(t *testing.T) {
- builder := NewSearchRequest().Index("test", "test2")
- data, err := json.Marshal(builder.header())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"indices":["test","test2"]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchRequestHasIndices(t *testing.T) {
- builder := NewSearchRequest()
- if builder.HasIndices() {
- t.Errorf("expected HasIndices to return true; got %v", builder.HasIndices())
- }
- builder = builder.Index("test", "test2")
- if !builder.HasIndices() {
- t.Errorf("expected HasIndices to return false; got %v", builder.HasIndices())
- }
-}
-
-func TestSearchRequestIgnoreUnavailable(t *testing.T) {
- builder := NewSearchRequest().Index("test").IgnoreUnavailable(true)
- data, err := json.Marshal(builder.header())
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"ignore_unavailable":true,"index":"test"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_source.go b/vendor/github.com/olivere/elastic/search_source.go
deleted file mode 100644
index 77b1c5093..000000000
--- a/vendor/github.com/olivere/elastic/search_source.go
+++ /dev/null
@@ -1,546 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "fmt"
-)
-
-// SearchSource enables users to build the search source.
-// It resembles the SearchSourceBuilder in Elasticsearch.
-type SearchSource struct {
- query Query
- postQuery Query
- sliceQuery Query
- from int
- size int
- explain *bool
- version *bool
- sorters []Sorter
- trackScores bool
- searchAfterSortValues []interface{}
- minScore *float64
- timeout string
- terminateAfter *int
- storedFieldNames []string
- docvalueFields []string
- scriptFields []*ScriptField
- fetchSourceContext *FetchSourceContext
- aggregations map[string]Aggregation
- highlight *Highlight
- globalSuggestText string
- suggesters []Suggester
- rescores []*Rescore
- defaultRescoreWindowSize *int
- indexBoosts map[string]float64
- stats []string
- innerHits map[string]*InnerHit
- collapse *CollapseBuilder
- profile bool
-}
-
-// NewSearchSource initializes a new SearchSource.
-func NewSearchSource() *SearchSource {
- return &SearchSource{
- from: -1,
- size: -1,
- trackScores: false,
- aggregations: make(map[string]Aggregation),
- indexBoosts: make(map[string]float64),
- innerHits: make(map[string]*InnerHit),
- }
-}
-
-// Query sets the query to use with this search source.
-func (s *SearchSource) Query(query Query) *SearchSource {
- s.query = query
- return s
-}
-
-// Profile specifies that this search source should activate the
-// Profile API for queries made on it.
-func (s *SearchSource) Profile(profile bool) *SearchSource {
- s.profile = profile
- return s
-}
-
-// PostFilter will be executed after the query has been executed and
-// only affects the search hits, not the aggregations.
-// This filter is always executed as the last filtering mechanism.
-func (s *SearchSource) PostFilter(postFilter Query) *SearchSource {
- s.postQuery = postFilter
- return s
-}
-
-// Slice allows partitioning the documents in multiple slices.
-// It is e.g. used to slice a scroll operation, supported in
-// Elasticsearch 5.0 or later.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html#sliced-scroll
-// for details.
-func (s *SearchSource) Slice(sliceQuery Query) *SearchSource {
- s.sliceQuery = sliceQuery
- return s
-}
-
-// From index to start the search from. Defaults to 0.
-func (s *SearchSource) From(from int) *SearchSource {
- s.from = from
- return s
-}
-
-// Size is the number of search hits to return. Defaults to 10.
-func (s *SearchSource) Size(size int) *SearchSource {
- s.size = size
- return s
-}
-
-// MinScore sets the minimum score below which docs will be filtered out.
-func (s *SearchSource) MinScore(minScore float64) *SearchSource {
- s.minScore = &minScore
- return s
-}
-
-// Explain indicates whether each search hit should be returned with
-// an explanation of the hit (ranking).
-func (s *SearchSource) Explain(explain bool) *SearchSource {
- s.explain = &explain
- return s
-}
-
-// Version indicates whether each search hit should be returned with
-// a version associated to it.
-func (s *SearchSource) Version(version bool) *SearchSource {
- s.version = &version
- return s
-}
-
-// Timeout controls how long a search is allowed to take, e.g. "1s" or "500ms".
-func (s *SearchSource) Timeout(timeout string) *SearchSource {
- s.timeout = timeout
- return s
-}
-
-// TimeoutInMillis controls how many milliseconds a search is allowed
-// to take before it is canceled.
-func (s *SearchSource) TimeoutInMillis(timeoutInMillis int) *SearchSource {
- s.timeout = fmt.Sprintf("%dms", timeoutInMillis)
- return s
-}
-
-// TerminateAfter allows the request to stop after the given number
-// of search hits are collected.
-func (s *SearchSource) TerminateAfter(terminateAfter int) *SearchSource {
- s.terminateAfter = &terminateAfter
- return s
-}
-
-// Sort adds a sort order.
-func (s *SearchSource) Sort(field string, ascending bool) *SearchSource {
- s.sorters = append(s.sorters, SortInfo{Field: field, Ascending: ascending})
- return s
-}
-
-// SortWithInfo adds a sort order.
-func (s *SearchSource) SortWithInfo(info SortInfo) *SearchSource {
- s.sorters = append(s.sorters, info)
- return s
-}
-
-// SortBy adds a sort order.
-func (s *SearchSource) SortBy(sorter ...Sorter) *SearchSource {
- s.sorters = append(s.sorters, sorter...)
- return s
-}
-
-func (s *SearchSource) hasSort() bool {
- return len(s.sorters) > 0
-}
-
-// TrackScores is applied when sorting and controls if scores will be
-// tracked as well. Defaults to false.
-func (s *SearchSource) TrackScores(trackScores bool) *SearchSource {
- s.trackScores = trackScores
- return s
-}
-
-// SearchAfter allows a different form of pagination by using a live cursor,
-// using the results of the previous page to help the retrieval of the next.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-search-after.html
-func (s *SearchSource) SearchAfter(sortValues ...interface{}) *SearchSource {
- s.searchAfterSortValues = append(s.searchAfterSortValues, sortValues...)
- return s
-}
-
-// Aggregation adds an aggreation to perform as part of the search.
-func (s *SearchSource) Aggregation(name string, aggregation Aggregation) *SearchSource {
- s.aggregations[name] = aggregation
- return s
-}
-
-// DefaultRescoreWindowSize sets the rescore window size for rescores
-// that don't specify their window.
-func (s *SearchSource) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchSource {
- s.defaultRescoreWindowSize = &defaultRescoreWindowSize
- return s
-}
-
-// Highlight adds highlighting to the search.
-func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource {
- s.highlight = highlight
- return s
-}
-
-// Highlighter returns the highlighter.
-func (s *SearchSource) Highlighter() *Highlight {
- if s.highlight == nil {
- s.highlight = NewHighlight()
- }
- return s.highlight
-}
-
-// GlobalSuggestText defines the global text to use with all suggesters.
-// This avoids repetition.
-func (s *SearchSource) GlobalSuggestText(text string) *SearchSource {
- s.globalSuggestText = text
- return s
-}
-
-// Suggester adds a suggester to the search.
-func (s *SearchSource) Suggester(suggester Suggester) *SearchSource {
- s.suggesters = append(s.suggesters, suggester)
- return s
-}
-
-// Rescorer adds a rescorer to the search.
-func (s *SearchSource) Rescorer(rescore *Rescore) *SearchSource {
- s.rescores = append(s.rescores, rescore)
- return s
-}
-
-// ClearRescorers removes all rescorers from the search.
-func (s *SearchSource) ClearRescorers() *SearchSource {
- s.rescores = make([]*Rescore, 0)
- return s
-}
-
-// FetchSource indicates whether the response should contain the stored
-// _source for every hit.
-func (s *SearchSource) FetchSource(fetchSource bool) *SearchSource {
- if s.fetchSourceContext == nil {
- s.fetchSourceContext = NewFetchSourceContext(fetchSource)
- } else {
- s.fetchSourceContext.SetFetchSource(fetchSource)
- }
- return s
-}
-
-// FetchSourceContext indicates how the _source should be fetched.
-func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource {
- s.fetchSourceContext = fetchSourceContext
- return s
-}
-
-// NoStoredFields indicates that no fields should be loaded, resulting in only
-// id and type to be returned per field.
-func (s *SearchSource) NoStoredFields() *SearchSource {
- s.storedFieldNames = nil
- return s
-}
-
-// StoredField adds a single field to load and return (note, must be stored) as
-// part of the search request. If none are specified, the source of the
-// document will be returned.
-func (s *SearchSource) StoredField(storedFieldName string) *SearchSource {
- s.storedFieldNames = append(s.storedFieldNames, storedFieldName)
- return s
-}
-
-// StoredFields sets the fields to load and return as part of the search request.
-// If none are specified, the source of the document will be returned.
-func (s *SearchSource) StoredFields(storedFieldNames ...string) *SearchSource {
- s.storedFieldNames = append(s.storedFieldNames, storedFieldNames...)
- return s
-}
-
-// DocvalueField adds a single field to load from the field data cache
-// and return as part of the search request.
-func (s *SearchSource) DocvalueField(fieldDataField string) *SearchSource {
- s.docvalueFields = append(s.docvalueFields, fieldDataField)
- return s
-}
-
-// DocvalueFields adds one or more fields to load from the field data cache
-// and return as part of the search request.
-func (s *SearchSource) DocvalueFields(docvalueFields ...string) *SearchSource {
- s.docvalueFields = append(s.docvalueFields, docvalueFields...)
- return s
-}
-
-// ScriptField adds a single script field with the provided script.
-func (s *SearchSource) ScriptField(scriptField *ScriptField) *SearchSource {
- s.scriptFields = append(s.scriptFields, scriptField)
- return s
-}
-
-// ScriptFields adds one or more script fields with the provided scripts.
-func (s *SearchSource) ScriptFields(scriptFields ...*ScriptField) *SearchSource {
- s.scriptFields = append(s.scriptFields, scriptFields...)
- return s
-}
-
-// IndexBoost sets the boost that a specific index will receive when the
-// query is executed against it.
-func (s *SearchSource) IndexBoost(index string, boost float64) *SearchSource {
- s.indexBoosts[index] = boost
- return s
-}
-
-// Stats group this request will be aggregated under.
-func (s *SearchSource) Stats(statsGroup ...string) *SearchSource {
- s.stats = append(s.stats, statsGroup...)
- return s
-}
-
-// InnerHit adds an inner hit to return with the result.
-func (s *SearchSource) InnerHit(name string, innerHit *InnerHit) *SearchSource {
- s.innerHits[name] = innerHit
- return s
-}
-
-// Collapse adds field collapsing.
-func (s *SearchSource) Collapse(collapse *CollapseBuilder) *SearchSource {
- s.collapse = collapse
- return s
-}
-
-// Source returns the serializable JSON for the source builder.
-func (s *SearchSource) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- if s.from != -1 {
- source["from"] = s.from
- }
- if s.size != -1 {
- source["size"] = s.size
- }
- if s.timeout != "" {
- source["timeout"] = s.timeout
- }
- if s.terminateAfter != nil {
- source["terminate_after"] = *s.terminateAfter
- }
- if s.query != nil {
- src, err := s.query.Source()
- if err != nil {
- return nil, err
- }
- source["query"] = src
- }
- if s.postQuery != nil {
- src, err := s.postQuery.Source()
- if err != nil {
- return nil, err
- }
- source["post_filter"] = src
- }
- if s.sliceQuery != nil {
- src, err := s.sliceQuery.Source()
- if err != nil {
- return nil, err
- }
- source["slice"] = src
- }
- if s.minScore != nil {
- source["min_score"] = *s.minScore
- }
- if s.version != nil {
- source["version"] = *s.version
- }
- if s.explain != nil {
- source["explain"] = *s.explain
- }
- if s.profile {
- source["profile"] = s.profile
- }
- if s.collapse != nil {
- src, err := s.collapse.Source()
- if err != nil {
- return nil, err
- }
- source["collapse"] = src
- }
- if s.fetchSourceContext != nil {
- src, err := s.fetchSourceContext.Source()
- if err != nil {
- return nil, err
- }
- source["_source"] = src
- }
-
- if s.storedFieldNames != nil {
- switch len(s.storedFieldNames) {
- case 1:
- source["stored_fields"] = s.storedFieldNames[0]
- default:
- source["stored_fields"] = s.storedFieldNames
- }
- }
-
- if len(s.docvalueFields) > 0 {
- source["docvalue_fields"] = s.docvalueFields
- }
-
- if len(s.scriptFields) > 0 {
- sfmap := make(map[string]interface{})
- for _, scriptField := range s.scriptFields {
- src, err := scriptField.Source()
- if err != nil {
- return nil, err
- }
- sfmap[scriptField.FieldName] = src
- }
- source["script_fields"] = sfmap
- }
-
- if len(s.sorters) > 0 {
- var sortarr []interface{}
- for _, sorter := range s.sorters {
- src, err := sorter.Source()
- if err != nil {
- return nil, err
- }
- sortarr = append(sortarr, src)
- }
- source["sort"] = sortarr
- }
-
- if s.trackScores {
- source["track_scores"] = s.trackScores
- }
-
- if len(s.searchAfterSortValues) > 0 {
- source["search_after"] = s.searchAfterSortValues
- }
-
- if len(s.indexBoosts) > 0 {
- source["indices_boost"] = s.indexBoosts
- }
-
- if len(s.aggregations) > 0 {
- aggsMap := make(map[string]interface{})
- for name, aggregate := range s.aggregations {
- src, err := aggregate.Source()
- if err != nil {
- return nil, err
- }
- aggsMap[name] = src
- }
- source["aggregations"] = aggsMap
- }
-
- if s.highlight != nil {
- src, err := s.highlight.Source()
- if err != nil {
- return nil, err
- }
- source["highlight"] = src
- }
-
- if len(s.suggesters) > 0 {
- suggesters := make(map[string]interface{})
- for _, s := range s.suggesters {
- src, err := s.Source(false)
- if err != nil {
- return nil, err
- }
- suggesters[s.Name()] = src
- }
- if s.globalSuggestText != "" {
- suggesters["text"] = s.globalSuggestText
- }
- source["suggest"] = suggesters
- }
-
- if len(s.rescores) > 0 {
- // Strip empty rescores from request
- var rescores []*Rescore
- for _, r := range s.rescores {
- if !r.IsEmpty() {
- rescores = append(rescores, r)
- }
- }
-
- if len(rescores) == 1 {
- rescores[0].defaultRescoreWindowSize = s.defaultRescoreWindowSize
- src, err := rescores[0].Source()
- if err != nil {
- return nil, err
- }
- source["rescore"] = src
- } else {
- var slice []interface{}
- for _, r := range rescores {
- r.defaultRescoreWindowSize = s.defaultRescoreWindowSize
- src, err := r.Source()
- if err != nil {
- return nil, err
- }
- slice = append(slice, src)
- }
- source["rescore"] = slice
- }
- }
-
- if len(s.stats) > 0 {
- source["stats"] = s.stats
- }
-
- if len(s.innerHits) > 0 {
- // Top-level inner hits
- // See http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-request-inner-hits.html#top-level-inner-hits
- // "inner_hits": {
- // "<inner_hits_name>": {
- // "<path|type>": {
- // "<path-to-nested-object-field|child-or-parent-type>": {
- // <inner_hits_body>,
- // [,"inner_hits" : { [<sub_inner_hits>]+ } ]?
- // }
- // }
- // },
- // [,"<inner_hits_name_2>" : { ... } ]*
- // }
- m := make(map[string]interface{})
- for name, hit := range s.innerHits {
- if hit.path != "" {
- src, err := hit.Source()
- if err != nil {
- return nil, err
- }
- path := make(map[string]interface{})
- path[hit.path] = src
- m[name] = map[string]interface{}{
- "path": path,
- }
- } else if hit.typ != "" {
- src, err := hit.Source()
- if err != nil {
- return nil, err
- }
- typ := make(map[string]interface{})
- typ[hit.typ] = src
- m[name] = map[string]interface{}{
- "type": typ,
- }
- } else {
- // TODO the Java client throws here, because either path or typ must be specified
- _ = m
- }
- }
- source["inner_hits"] = m
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_source_test.go b/vendor/github.com/olivere/elastic/search_source_test.go
deleted file mode 100644
index a78991bf0..000000000
--- a/vendor/github.com/olivere/elastic/search_source_test.go
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSearchSourceMatchAllQuery(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceNoStoredFields(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).NoStoredFields()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceStoredFields(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).StoredFields("message", "tags")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}},"stored_fields":["message","tags"]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceFetchSourceDisabled(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).FetchSource(false)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_source":false,"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceFetchSourceByWildcards(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- fsc := NewFetchSourceContext(true).Include("obj1.*", "obj2.*").Exclude("*.description")
- builder := NewSearchSource().Query(matchAllQ).FetchSourceContext(fsc)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_source":{"excludes":["*.description"],"includes":["obj1.*","obj2.*"]},"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceDocvalueFields(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).DocvalueFields("test1", "test2")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"docvalue_fields":["test1","test2"],"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceScriptFields(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- sf1 := NewScriptField("test1", NewScript("doc['my_field_name'].value * 2"))
- sf2 := NewScriptField("test2", NewScript("doc['my_field_name'].value * factor").Param("factor", 3.1415927))
- builder := NewSearchSource().Query(matchAllQ).ScriptFields(sf1, sf2)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}},"script_fields":{"test1":{"script":{"source":"doc['my_field_name'].value * 2"}},"test2":{"script":{"params":{"factor":3.1415927},"source":"doc['my_field_name'].value * factor"}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourcePostFilter(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- pf := NewTermQuery("tag", "important")
- builder := NewSearchSource().Query(matchAllQ).PostFilter(pf)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"post_filter":{"term":{"tag":"important"}},"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceHighlight(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- hl := NewHighlight().Field("content")
- builder := NewSearchSource().Query(matchAllQ).Highlight(hl)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"highlight":{"fields":{"content":{}}},"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceRescoring(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- rescorerQuery := NewMatchPhraseQuery("field1", "the quick brown fox").Slop(2)
- rescorer := NewQueryRescorer(rescorerQuery)
- rescorer = rescorer.QueryWeight(0.7)
- rescorer = rescorer.RescoreQueryWeight(1.2)
- rescore := NewRescore().WindowSize(50).Rescorer(rescorer)
- builder := NewSearchSource().Query(matchAllQ).Rescorer(rescore)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}},"rescore":{"query":{"query_weight":0.7,"rescore_query":{"match_phrase":{"field1":{"query":"the quick brown fox","slop":2}}},"rescore_query_weight":1.2},"window_size":50}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceIndexBoost(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).IndexBoost("index1", 1.4).IndexBoost("index2", 1.3)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"indices_boost":{"index1":1.4,"index2":1.3},"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceMixDifferentSorters(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).
- Sort("a", false).
- SortWithInfo(SortInfo{Field: "b", Ascending: true}).
- SortBy(NewScriptSort(NewScript("doc['field_name'].value * factor").Param("factor", 1.1), "number"))
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}},"sort":[{"a":{"order":"desc"}},{"b":{"order":"asc"}},{"_script":{"order":"asc","script":{"params":{"factor":1.1},"source":"doc['field_name'].value * factor"},"type":"number"}}]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceInnerHits(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).
- InnerHit("comments", NewInnerHit().Type("comment").Query(NewMatchQuery("user", "olivere"))).
- InnerHit("views", NewInnerHit().Path("view"))
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"inner_hits":{"comments":{"type":{"comment":{"query":{"match":{"user":{"query":"olivere"}}}}}},"views":{"path":{"view":{}}}},"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceSearchAfter(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).SearchAfter(1463538857, "tweet#654323")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"query":{"match_all":{}},"search_after":[1463538857,"tweet#654323"]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSearchSourceProfiledQuery(t *testing.T) {
- matchAllQ := NewMatchAllQuery()
- builder := NewSearchSource().Query(matchAllQ).Profile(true)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"profile":true,"query":{"match_all":{}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_suggester_test.go b/vendor/github.com/olivere/elastic/search_suggester_test.go
deleted file mode 100644
index 33bdc9275..000000000
--- a/vendor/github.com/olivere/elastic/search_suggester_test.go
+++ /dev/null
@@ -1,355 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestTermSuggester(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- tsName := "my-suggestions"
- ts := NewTermSuggester(tsName)
- ts = ts.Text("Goolang")
- ts = ts.Field("message")
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- Suggester(ts).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Suggest == nil {
- t.Errorf("expected SearchResult.Suggest != nil; got nil")
- }
- mySuggestions, found := searchResult.Suggest[tsName]
- if !found {
- t.Errorf("expected to find SearchResult.Suggest[%s]; got false", tsName)
- }
- if mySuggestions == nil {
- t.Errorf("expected SearchResult.Suggest[%s] != nil; got nil", tsName)
- }
-
- if len(mySuggestions) != 1 {
- t.Errorf("expected 1 suggestion; got %d", len(mySuggestions))
- }
- mySuggestion := mySuggestions[0]
- if mySuggestion.Text != "goolang" {
- t.Errorf("expected Text = 'goolang'; got %s", mySuggestion.Text)
- }
- if mySuggestion.Offset != 0 {
- t.Errorf("expected Offset = %d; got %d", 0, mySuggestion.Offset)
- }
- if mySuggestion.Length != 7 {
- t.Errorf("expected Length = %d; got %d", 7, mySuggestion.Length)
- }
- if len(mySuggestion.Options) != 1 {
- t.Errorf("expected 1 option; got %d", len(mySuggestion.Options))
- }
- myOption := mySuggestion.Options[0]
- if myOption.Text != "golang" {
- t.Errorf("expected Text = 'golang'; got %s", myOption.Text)
- }
-}
-
-func TestPhraseSuggester(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- phraseSuggesterName := "my-suggestions"
- ps := NewPhraseSuggester(phraseSuggesterName)
- ps = ps.Text("Goolang")
- ps = ps.Field("message")
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- Suggester(ps).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Suggest == nil {
- t.Errorf("expected SearchResult.Suggest != nil; got nil")
- }
- mySuggestions, found := searchResult.Suggest[phraseSuggesterName]
- if !found {
- t.Errorf("expected to find SearchResult.Suggest[%s]; got false", phraseSuggesterName)
- }
- if mySuggestions == nil {
- t.Errorf("expected SearchResult.Suggest[%s] != nil; got nil", phraseSuggesterName)
- }
-
- if len(mySuggestions) != 1 {
- t.Errorf("expected 1 suggestion; got %d", len(mySuggestions))
- }
- mySuggestion := mySuggestions[0]
- if mySuggestion.Text != "Goolang" {
- t.Errorf("expected Text = 'Goolang'; got %s", mySuggestion.Text)
- }
- if mySuggestion.Offset != 0 {
- t.Errorf("expected Offset = %d; got %d", 0, mySuggestion.Offset)
- }
- if mySuggestion.Length != 7 {
- t.Errorf("expected Length = %d; got %d", 7, mySuggestion.Length)
- }
- if want, have := 1, len(mySuggestion.Options); want != have {
- t.Errorf("expected len(options) = %d; got %d", want, have)
- }
- if want, have := "golang", mySuggestion.Options[0].Text; want != have {
- t.Errorf("expected options[0].Text = %q; got %q", want, have)
- }
- if score := mySuggestion.Options[0].Score; score <= 0.0 {
- t.Errorf("expected options[0].Score > 0.0; got %v", score)
- }
-}
-
-func TestCompletionSuggester(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- tweet1 := tweet{
- User: "olivere",
- Message: "Welcome to Golang and Elasticsearch.",
- Suggest: NewSuggestField("Golang", "Elasticsearch"),
- }
- tweet2 := tweet{
- User: "olivere",
- Message: "Another unrelated topic.",
- Suggest: NewSuggestField("Another unrelated topic."),
- }
- tweet3 := tweet{
- User: "sandrae",
- Message: "Cycling is fun.",
- Suggest: NewSuggestField("Cycling is fun."),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- suggesterName := "my-suggestions"
- cs := NewCompletionSuggester(suggesterName)
- cs = cs.Text("Golang")
- cs = cs.Field("suggest_field")
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- Suggester(cs).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Suggest == nil {
- t.Errorf("expected SearchResult.Suggest != nil; got nil")
- }
- mySuggestions, found := searchResult.Suggest[suggesterName]
- if !found {
- t.Errorf("expected to find SearchResult.Suggest[%s]; got false", suggesterName)
- }
- if mySuggestions == nil {
- t.Errorf("expected SearchResult.Suggest[%s] != nil; got nil", suggesterName)
- }
-
- if len(mySuggestions) != 1 {
- t.Errorf("expected 1 suggestion; got %d", len(mySuggestions))
- }
- mySuggestion := mySuggestions[0]
- if mySuggestion.Text != "Golang" {
- t.Errorf("expected Text = 'Golang'; got %s", mySuggestion.Text)
- }
- if mySuggestion.Offset != 0 {
- t.Errorf("expected Offset = %d; got %d", 0, mySuggestion.Offset)
- }
- if mySuggestion.Length != 6 {
- t.Errorf("expected Length = %d; got %d", 7, mySuggestion.Length)
- }
- if len(mySuggestion.Options) != 1 {
- t.Errorf("expected 1 option; got %d", len(mySuggestion.Options))
- }
- myOption := mySuggestion.Options[0]
- if myOption.Text != "Golang" {
- t.Errorf("expected Text = 'Golang'; got %s", myOption.Text)
- }
-}
-
-func TestContextSuggester(t *testing.T) {
- client := setupTestClientAndCreateIndex(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- // TODO make a nice way of creating tweets, as currently the context fields are unsupported as part of the suggestion fields
- tweet1 := `
- {
- "user":"olivere",
- "message":"Welcome to Golang and Elasticsearch.",
- "retweets":0,
- "created":"0001-01-01T00:00:00Z",
- "suggest_field":{
- "input":[
- "Golang",
- "Elasticsearch"
- ],
- "contexts":{
- "user_name": ["olivere"]
- }
- }
- }
- `
- tweet2 := `
- {
- "user":"sandrae",
- "message":"I like golfing",
- "retweets":0,
- "created":"0001-01-01T00:00:00Z",
- "suggest_field":{
- "input":[
- "Golfing"
- ],
- "contexts":{
- "user_name": ["sandrae"]
- }
- }
- }
- `
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyString(tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyString(tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- suggesterName := "my-suggestions"
- cs := NewContextSuggester(suggesterName)
- cs = cs.Prefix("Gol")
- cs = cs.Field("suggest_field")
- cs = cs.ContextQueries(
- NewSuggesterCategoryQuery("user_name", "olivere"),
- )
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Suggester(cs).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Suggest == nil {
- t.Errorf("expected SearchResult.Suggest != nil; got nil")
- }
- mySuggestions, found := searchResult.Suggest[suggesterName]
- if !found {
- t.Errorf("expected to find SearchResult.Suggest[%s]; got false", suggesterName)
- }
- if mySuggestions == nil {
- t.Errorf("expected SearchResult.Suggest[%s] != nil; got nil", suggesterName)
- }
-
- // sandra's tweet is not returned because of the user_name context
- if len(mySuggestions) != 1 {
- t.Errorf("expected 1 suggestion; got %d", len(mySuggestions))
- }
- mySuggestion := mySuggestions[0]
- if mySuggestion.Text != "Gol" {
- t.Errorf("expected Text = 'Gol'; got %s", mySuggestion.Text)
- }
- if mySuggestion.Offset != 0 {
- t.Errorf("expected Offset = %d; got %d", 0, mySuggestion.Offset)
- }
- if mySuggestion.Length != 3 {
- t.Errorf("expected Length = %d; got %d", 3, mySuggestion.Length)
- }
- if len(mySuggestion.Options) != 1 {
- t.Errorf("expected 1 option; got %d", len(mySuggestion.Options))
- }
- myOption := mySuggestion.Options[0]
- if myOption.Text != "Golang" {
- t.Errorf("expected Text = 'Golang'; got %s", myOption.Text)
- }
- if myOption.Id != "1" {
- t.Errorf("expected Id = '1'; got %s", myOption.Id)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_terms_lookup.go b/vendor/github.com/olivere/elastic/search_terms_lookup.go
deleted file mode 100644
index 9a2456bdd..000000000
--- a/vendor/github.com/olivere/elastic/search_terms_lookup.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermsLookup encapsulates the parameters needed to fetch terms.
-//
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-terms-query.html#query-dsl-terms-lookup.
-type TermsLookup struct {
- index string
- typ string
- id string
- path string
- routing string
-}
-
-// NewTermsLookup creates and initializes a new TermsLookup.
-func NewTermsLookup() *TermsLookup {
- t := &TermsLookup{}
- return t
-}
-
-// Index name.
-func (t *TermsLookup) Index(index string) *TermsLookup {
- t.index = index
- return t
-}
-
-// Type name.
-func (t *TermsLookup) Type(typ string) *TermsLookup {
- t.typ = typ
- return t
-}
-
-// Id to look up.
-func (t *TermsLookup) Id(id string) *TermsLookup {
- t.id = id
- return t
-}
-
-// Path to use for lookup.
-func (t *TermsLookup) Path(path string) *TermsLookup {
- t.path = path
- return t
-}
-
-// Routing value.
-func (t *TermsLookup) Routing(routing string) *TermsLookup {
- t.routing = routing
- return t
-}
-
-// Source creates the JSON source of the builder.
-func (t *TermsLookup) Source() (interface{}, error) {
- src := make(map[string]interface{})
- if t.index != "" {
- src["index"] = t.index
- }
- if t.typ != "" {
- src["type"] = t.typ
- }
- if t.id != "" {
- src["id"] = t.id
- }
- if t.path != "" {
- src["path"] = t.path
- }
- if t.routing != "" {
- src["routing"] = t.routing
- }
- return src, nil
-}
diff --git a/vendor/github.com/olivere/elastic/search_terms_lookup_test.go b/vendor/github.com/olivere/elastic/search_terms_lookup_test.go
deleted file mode 100644
index 369f72346..000000000
--- a/vendor/github.com/olivere/elastic/search_terms_lookup_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTermsLookup(t *testing.T) {
- tl := NewTermsLookup().Index("users").Type("user").Id("2").Path("followers")
- src, err := tl.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"id":"2","index":"users","path":"followers","type":"user"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/search_test.go b/vendor/github.com/olivere/elastic/search_test.go
deleted file mode 100644
index 586089aaa..000000000
--- a/vendor/github.com/olivere/elastic/search_test.go
+++ /dev/null
@@ -1,1320 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "reflect"
- "testing"
- "time"
-)
-
-func TestSearchMatchAll(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- Size(100).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if got, want := searchResult.Hits.TotalHits, int64(3); got != want {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", want, got)
- }
- if got, want := len(searchResult.Hits.Hits), 3; got != want {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, got)
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestSearchMatchAllWithRequestCacheDisabled(t *testing.T) {
- //client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents, with request cache disabled
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- Size(100).
- Pretty(true).
- RequestCache(false).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if got, want := searchResult.Hits.TotalHits, int64(3); got != want {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", want, got)
- }
- if got, want := len(searchResult.Hits.Hits), 3; got != want {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, got)
- }
-}
-
-func BenchmarkSearchMatchAll(b *testing.B) {
- client := setupTestClientAndCreateIndexAndAddDocs(b)
-
- for n := 0; n < b.N; n++ {
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().Index(testIndexName).Query(all).Do(context.TODO())
- if err != nil {
- b.Fatal(err)
- }
- if searchResult.Hits == nil {
- b.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits == 0 {
- b.Errorf("expected SearchResult.Hits.TotalHits > %d; got %d", 0, searchResult.Hits.TotalHits)
- }
- }
-}
-
-func TestSearchResultTotalHits(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- count, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- all := NewMatchAllQuery()
- searchResult, err := client.Search().Index(testIndexName).Query(all).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- got := searchResult.TotalHits()
- if got != count {
- t.Fatalf("expected %d hits; got: %d", count, got)
- }
-
- // No hits
- searchResult = &SearchResult{}
- got = searchResult.TotalHits()
- if got != 0 {
- t.Errorf("expected %d hits; got: %d", 0, got)
- }
-}
-
-func TestSearchResultWithProfiling(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- all := NewMatchAllQuery()
- searchResult, err := client.Search().Index(testIndexName).Query(all).Profile(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- if searchResult.Profile == nil {
- t.Fatal("Profiled MatchAll query did not return profiling data with results")
- }
-}
-
-func TestSearchResultEach(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- all := NewMatchAllQuery()
- searchResult, err := client.Search().Index(testIndexName).Query(all).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Iterate over non-ptr type
- var aTweet tweet
- count := 0
- for _, item := range searchResult.Each(reflect.TypeOf(aTweet)) {
- count++
- _, ok := item.(tweet)
- if !ok {
- t.Fatalf("expected hit to be serialized as tweet; got: %v", reflect.ValueOf(item))
- }
- }
- if count == 0 {
- t.Errorf("expected to find some hits; got: %d", count)
- }
-
- // Iterate over ptr-type
- count = 0
- var aTweetPtr *tweet
- for _, item := range searchResult.Each(reflect.TypeOf(aTweetPtr)) {
- count++
- tw, ok := item.(*tweet)
- if !ok {
- t.Fatalf("expected hit to be serialized as tweet; got: %v", reflect.ValueOf(item))
- }
- if tw == nil {
- t.Fatal("expected hit to not be nil")
- }
- }
- if count == 0 {
- t.Errorf("expected to find some hits; got: %d", count)
- }
-
- // Does not iterate when no hits are found
- searchResult = &SearchResult{Hits: nil}
- count = 0
- for _, item := range searchResult.Each(reflect.TypeOf(aTweet)) {
- count++
- _ = item
- }
- if count != 0 {
- t.Errorf("expected to not find any hits; got: %d", count)
- }
- searchResult = &SearchResult{Hits: &SearchHits{Hits: make([]*SearchHit, 0)}}
- count = 0
- for _, item := range searchResult.Each(reflect.TypeOf(aTweet)) {
- count++
- _ = item
- }
- if count != 0 {
- t.Errorf("expected to not find any hits; got: %d", count)
- }
-}
-
-func TestSearchResultEachNoSource(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocsNoSource(t)
-
- all := NewMatchAllQuery()
- searchResult, err := client.Search().Index(testNoSourceIndexName).Query(all).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Iterate over non-ptr type
- var aTweet tweet
- count := 0
- for _, item := range searchResult.Each(reflect.TypeOf(aTweet)) {
- count++
- tw, ok := item.(tweet)
- if !ok {
- t.Fatalf("expected hit to be serialized as tweet; got: %v", reflect.ValueOf(item))
- }
-
- if tw.User != "" {
- t.Fatalf("expected no _source hit to be empty tweet; got: %v", reflect.ValueOf(item))
- }
- }
- if count != 2 {
- t.Errorf("expected to find 2 hits; got: %d", count)
- }
-
- // Iterate over ptr-type
- count = 0
- var aTweetPtr *tweet
- for _, item := range searchResult.Each(reflect.TypeOf(aTweetPtr)) {
- count++
- tw, ok := item.(*tweet)
- if !ok {
- t.Fatalf("expected hit to be serialized as tweet; got: %v", reflect.ValueOf(item))
- }
- if tw != nil {
- t.Fatal("expected hit to be nil")
- }
- }
- if count != 2 {
- t.Errorf("expected to find 2 hits; got: %d", count)
- }
-}
-
-func TestSearchSorting(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(all).
- Sort("created", false).
- Timeout("1s").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 3 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 3, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestSearchSortingBySorters(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(all).
- SortBy(NewFieldSort("created").Desc(), NewScoreSort()).
- Timeout("1s").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 3 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 3, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- }
-}
-
-func TestSearchSpecificFields(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(all).
- StoredFields("message").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 3 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 3, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- if hit.Source != nil {
- t.Fatalf("expected SearchResult.Hits.Hit.Source to be nil; got: %q", hit.Source)
- }
- if hit.Fields == nil {
- t.Fatal("expected SearchResult.Hits.Hit.Fields to be != nil")
- }
- field, found := hit.Fields["message"]
- if !found {
- t.Errorf("expected SearchResult.Hits.Hit.Fields[%s] to be found", "message")
- }
- fields, ok := field.([]interface{})
- if !ok {
- t.Errorf("expected []interface{}; got: %v", reflect.TypeOf(fields))
- }
- if len(fields) != 1 {
- t.Errorf("expected a field with 1 entry; got: %d", len(fields))
- }
- message, ok := fields[0].(string)
- if !ok {
- t.Errorf("expected a string; got: %v", reflect.TypeOf(fields[0]))
- }
- if message == "" {
- t.Errorf("expected a message; got: %q", message)
- }
- }
-}
-
-func TestSearchExplain(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
- // client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(all).
- Explain(true).
- Timeout("1s").
- // Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 3 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 3, len(searchResult.Hits.Hits))
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Errorf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- if hit.Explanation == nil {
- t.Fatal("expected search explanation")
- }
- if hit.Explanation.Value <= 0.0 {
- t.Errorf("expected explanation value to be > 0.0; got: %v", hit.Explanation.Value)
- }
- if hit.Explanation.Description == "" {
- t.Errorf("expected explanation description != %q; got: %q", "", hit.Explanation.Description)
- }
- }
-}
-
-func TestSearchSource(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Set up the request JSON manually to pass to the search service via Source()
- source := map[string]interface{}{
- "query": map[string]interface{}{
- "match_all": map[string]interface{}{},
- },
- }
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Source(source). // sets the JSON request
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
-}
-
-func TestSearchSourceWithString(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Source(`{"query":{"match_all":{}}}`). // sets the JSON request
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
-}
-
-func TestSearchRawString(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- query := RawStringQuery(`{"match_all":{}}`)
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(query).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
-}
-
-func TestSearchSearchSource(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- // Set up the search source manually and pass it to the search service via SearchSource()
- ss := NewSearchSource().Query(NewMatchAllQuery()).From(0).Size(2)
-
- // One can use ss.Source() to get to the raw interface{} that will be used
- // as the search request JSON by the SearchService.
-
- searchResult, err := client.Search().
- Index(testIndexName).
- SearchSource(ss). // sets the SearchSource
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 2 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 2, len(searchResult.Hits.Hits))
- }
-}
-
-func TestSearchInnerHitsOnHasChild(t *testing.T) {
- // client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- ctx := context.Background()
-
- // Create join index
- createIndex, err := client.CreateIndex(testJoinIndex).Body(testJoinMapping).Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex)
- }
-
- // Add documents
- // See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/parent-join.html for example code.
- doc1 := joinDoc{
- Message: "This is a question",
- JoinField: &joinField{Name: "question"},
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("1").BodyJson(&doc1).Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc2 := joinDoc{
- Message: "This is another question",
- JoinField: "question",
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("2").BodyJson(&doc2).Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc3 := joinDoc{
- Message: "This is an answer",
- JoinField: &joinField{
- Name: "answer",
- Parent: "1",
- },
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("3").BodyJson(&doc3).Routing("1").Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc4 := joinDoc{
- Message: "This is another answer",
- JoinField: &joinField{
- Name: "answer",
- Parent: "1",
- },
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("4").BodyJson(&doc4).Routing("1").Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testJoinIndex).Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- // Search for all documents that have an answer, and return those answers as inner hits
- bq := NewBoolQuery()
- bq = bq.Must(NewMatchAllQuery())
- bq = bq.Filter(NewHasChildQuery("answer", NewMatchAllQuery()).
- InnerHit(NewInnerHit().Name("answers")))
-
- searchResult, err := client.Search().
- Index(testJoinIndex).
- Query(bq).
- Pretty(true).
- Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 1 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 2, searchResult.Hits.TotalHits)
- }
- if len(searchResult.Hits.Hits) != 1 {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", 2, len(searchResult.Hits.Hits))
- }
-
- hit := searchResult.Hits.Hits[0]
- if want, have := "1", hit.Id; want != have {
- t.Fatalf("expected tweet %q; got: %q", want, have)
- }
- if hit.InnerHits == nil {
- t.Fatalf("expected inner hits; got: %v", hit.InnerHits)
- }
- if want, have := 1, len(hit.InnerHits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- innerHits, found := hit.InnerHits["answers"]
- if !found {
- t.Fatalf("expected inner hits for name %q", "answers")
- }
- if innerHits == nil || innerHits.Hits == nil {
- t.Fatal("expected inner hits != nil")
- }
- if want, have := 2, len(innerHits.Hits.Hits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- if want, have := "3", innerHits.Hits.Hits[0].Id; want != have {
- t.Fatalf("expected inner hit with id %q; got: %q", want, have)
- }
- if want, have := "4", innerHits.Hits.Hits[1].Id; want != have {
- t.Fatalf("expected inner hit with id %q; got: %q", want, have)
- }
-}
-
-func TestSearchInnerHitsOnHasParent(t *testing.T) {
- // client := setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- ctx := context.Background()
-
- // Create join index
- createIndex, err := client.CreateIndex(testJoinIndex).Body(testJoinMapping).Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex)
- }
-
- // Add documents
- // See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/parent-join.html for example code.
- doc1 := joinDoc{
- Message: "This is a question",
- JoinField: &joinField{Name: "question"},
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("1").BodyJson(&doc1).Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc2 := joinDoc{
- Message: "This is another question",
- JoinField: "question",
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("2").BodyJson(&doc2).Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc3 := joinDoc{
- Message: "This is an answer",
- JoinField: &joinField{
- Name: "answer",
- Parent: "1",
- },
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("3").BodyJson(&doc3).Routing("1").Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- doc4 := joinDoc{
- Message: "This is another answer",
- JoinField: &joinField{
- Name: "answer",
- Parent: "1",
- },
- }
- _, err = client.Index().Index(testJoinIndex).Type("doc").Id("4").BodyJson(&doc4).Routing("1").Refresh("true").Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testJoinIndex).Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- // Search for all documents that have an answer, and return those answers as inner hits
- bq := NewBoolQuery()
- bq = bq.Must(NewMatchAllQuery())
- bq = bq.Filter(NewHasParentQuery("question", NewMatchAllQuery()).
- InnerHit(NewInnerHit().Name("answers")))
-
- searchResult, err := client.Search().
- Index(testJoinIndex).
- Query(bq).
- Pretty(true).
- Do(ctx)
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if want, have := int64(2), searchResult.Hits.TotalHits; want != have {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", want, have)
- }
- if want, have := 2, len(searchResult.Hits.Hits); want != have {
- t.Errorf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, have)
- }
-
- hit := searchResult.Hits.Hits[0]
- if want, have := "3", hit.Id; want != have {
- t.Fatalf("expected tweet %q; got: %q", want, have)
- }
- if hit.InnerHits == nil {
- t.Fatalf("expected inner hits; got: %v", hit.InnerHits)
- }
- if want, have := 1, len(hit.InnerHits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- innerHits, found := hit.InnerHits["answers"]
- if !found {
- t.Fatalf("expected inner hits for name %q", "tweets")
- }
- if innerHits == nil || innerHits.Hits == nil {
- t.Fatal("expected inner hits != nil")
- }
- if want, have := 1, len(innerHits.Hits.Hits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- if want, have := "1", innerHits.Hits.Hits[0].Id; want != have {
- t.Fatalf("expected inner hit with id %q; got: %q", want, have)
- }
-
- hit = searchResult.Hits.Hits[1]
- if want, have := "4", hit.Id; want != have {
- t.Fatalf("expected tweet %q; got: %q", want, have)
- }
- if hit.InnerHits == nil {
- t.Fatalf("expected inner hits; got: %v", hit.InnerHits)
- }
- if want, have := 1, len(hit.InnerHits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- innerHits, found = hit.InnerHits["answers"]
- if !found {
- t.Fatalf("expected inner hits for name %q", "tweets")
- }
- if innerHits == nil || innerHits.Hits == nil {
- t.Fatal("expected inner hits != nil")
- }
- if want, have := 1, len(innerHits.Hits.Hits); want != have {
- t.Fatalf("expected %d inner hits; got: %d", want, have)
- }
- if want, have := "1", innerHits.Hits.Hits[0].Id; want != have {
- t.Fatalf("expected inner hit with id %q; got: %q", want, have)
- }
-}
-
-func TestSearchBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- }{
- {
- []string{},
- []string{},
- "/_search",
- },
- {
- []string{"index1"},
- []string{},
- "/index1/_search",
- },
- {
- []string{"index1", "index2"},
- []string{},
- "/index1%2Cindex2/_search",
- },
- {
- []string{},
- []string{"type1"},
- "/_all/type1/_search",
- },
- {
- []string{"index1"},
- []string{"type1"},
- "/index1/type1/_search",
- },
- {
- []string{"index1", "index2"},
- []string{"type1", "type2"},
- "/index1%2Cindex2/type1%2Ctype2/_search",
- },
- {
- []string{},
- []string{"type1", "type2"},
- "/_all/type1%2Ctype2/_search",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.Search().Index(test.Indices...).Type(test.Types...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestSearchFilterPath(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndAddDocs(t, SetTraceLog(log.New(os.Stdout, "", log.LstdFlags)))
- client := setupTestClientAndCreateIndexAndAddDocs(t)
-
- // Match all should return all documents
- all := NewMatchAllQuery()
- searchResult, err := client.Search().
- Index(testIndexName).
- Type("doc").
- Query(all).
- FilterPath(
- "took",
- "hits.hits._id",
- "hits.hits._source.user",
- "hits.hits._source.message",
- ).
- Timeout("1s").
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Fatalf("expected SearchResult.Hits != nil; got nil")
- }
- // 0 because it was filtered out
- if want, got := int64(0), searchResult.Hits.TotalHits; want != got {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", want, got)
- }
- if want, got := 3, len(searchResult.Hits.Hits); want != got {
- t.Fatalf("expected len(SearchResult.Hits.Hits) = %d; got %d", want, got)
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if want, got := "", hit.Index; want != got {
- t.Fatalf("expected index %q, got %q", want, got)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- // user field
- v, found := item["user"]
- if !found {
- t.Fatalf("expected SearchResult.Hits.Hit[%q] to be found", "user")
- }
- if v == "" {
- t.Fatalf("expected user field, got %v (%T)", v, v)
- }
- // No retweets field
- v, found = item["retweets"]
- if found {
- t.Fatalf("expected SearchResult.Hits.Hit[%q] to not be found, got %v", "retweets", v)
- }
- if v == "" {
- t.Fatalf("expected user field, got %v (%T)", v, v)
- }
- }
-}
-
-func TestSearchAfter(t *testing.T) {
- // client := setupTestClientAndCreateIndexAndLog(t, SetTraceLog(log.New(os.Stdout, "", 0)))
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{
- User: "olivere", Retweets: 108,
- Message: "Welcome to Golang and Elasticsearch.",
- Created: time.Date(2012, 12, 12, 17, 38, 34, 0, time.UTC),
- }
- tweet2 := tweet{
- User: "olivere", Retweets: 0,
- Message: "Another unrelated topic.",
- Created: time.Date(2012, 10, 10, 8, 12, 03, 0, time.UTC),
- }
- tweet3 := tweet{
- User: "sandrae", Retweets: 12,
- Message: "Cycling is fun.",
- Created: time.Date(2011, 11, 11, 10, 58, 12, 0, time.UTC),
- }
-
- // Add all documents
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Flush().Index(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Query(NewMatchAllQuery()).
- SearchAfter("olivere").
- Sort("user", true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if searchResult.Hits == nil {
- t.Errorf("expected SearchResult.Hits != nil; got nil")
- }
- if searchResult.Hits.TotalHits != 3 {
- t.Errorf("expected SearchResult.Hits.TotalHits = %d; got %d", 3, searchResult.Hits.TotalHits)
- }
- if want, got := 1, len(searchResult.Hits.Hits); want != got {
- t.Fatalf("expected len(SearchResult.Hits.Hits) = %d; got: %d", want, got)
- }
- hit := searchResult.Hits.Hits[0]
- if want, got := "3", hit.Id; want != got {
- t.Fatalf("expected tweet %q; got: %q", want, got)
- }
-}
-
-func TestSearchResultWithFieldCollapsing(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Type("doc").
- Query(NewMatchAllQuery()).
- Collapse(NewCollapseBuilder("user")).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- if searchResult.Hits == nil {
- t.Fatalf("expected SearchResult.Hits != nil; got nil")
- }
- if got := searchResult.Hits.TotalHits; got == 0 {
- t.Fatalf("expected SearchResult.Hits.TotalHits > 0; got %d", got)
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- if len(hit.Fields) == 0 {
- t.Fatal("expected fields in SearchResult")
- }
- usersVal, ok := hit.Fields["user"]
- if !ok {
- t.Fatalf("expected %q field in fields of SearchResult", "user")
- }
- users, ok := usersVal.([]interface{})
- if !ok {
- t.Fatalf("expected slice of strings in field of SearchResult, got %T", usersVal)
- }
- if len(users) != 1 {
- t.Fatalf("expected 1 entry in users slice, got %d", len(users))
- }
- }
-}
-
-func TestSearchResultWithFieldCollapsingAndInnerHits(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- searchResult, err := client.Search().
- Index(testIndexName).
- Type("doc").
- Query(NewMatchAllQuery()).
- Collapse(
- NewCollapseBuilder("user").
- InnerHit(
- NewInnerHit().Name("last_tweets").Size(5).Sort("created", true),
- ).
- MaxConcurrentGroupRequests(4)).
- Pretty(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- if searchResult.Hits == nil {
- t.Fatalf("expected SearchResult.Hits != nil; got nil")
- }
- if got := searchResult.Hits.TotalHits; got == 0 {
- t.Fatalf("expected SearchResult.Hits.TotalHits > 0; got %d", got)
- }
-
- for _, hit := range searchResult.Hits.Hits {
- if hit.Index != testIndexName {
- t.Fatalf("expected SearchResult.Hits.Hit.Index = %q; got %q", testIndexName, hit.Index)
- }
- item := make(map[string]interface{})
- err := json.Unmarshal(*hit.Source, &item)
- if err != nil {
- t.Fatal(err)
- }
- if len(hit.Fields) == 0 {
- t.Fatal("expected fields in SearchResult")
- }
- usersVal, ok := hit.Fields["user"]
- if !ok {
- t.Fatalf("expected %q field in fields of SearchResult", "user")
- }
- users, ok := usersVal.([]interface{})
- if !ok {
- t.Fatalf("expected slice of strings in field of SearchResult, got %T", usersVal)
- }
- if len(users) != 1 {
- t.Fatalf("expected 1 entry in users slice, got %d", len(users))
- }
- lastTweets, ok := hit.InnerHits["last_tweets"]
- if !ok {
- t.Fatalf("expected inner_hits named %q in SearchResult", "last_tweets")
- }
- if lastTweets == nil {
- t.Fatal("expected inner_hits in SearchResult")
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/setup_test.go b/vendor/github.com/olivere/elastic/setup_test.go
deleted file mode 100644
index 480ae5d20..000000000
--- a/vendor/github.com/olivere/elastic/setup_test.go
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "log"
- "math/rand"
- "os"
- "time"
-)
-
-const (
- testIndexName = "elastic-test"
- testIndexName2 = "elastic-test2"
- testIndexName3 = "elastic-test3"
- testMapping = `
-{
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "user":{
- "type":"keyword"
- },
- "message":{
- "type":"text",
- "store": true,
- "fielddata": true
- },
- "tags":{
- "type":"keyword"
- },
- "location":{
- "type":"geo_point"
- },
- "suggest_field":{
- "type":"completion",
- "contexts":[
- {
- "name":"user_name",
- "type":"category"
- }
- ]
- }
- }
- }
- }
-}
-`
-
- testNoSourceIndexName = "elastic-nosource-test"
- testNoSourceMapping = `
-{
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "_source": {
- "enabled": false
- },
- "properties":{
- "user":{
- "type":"keyword"
- },
- "message":{
- "type":"text",
- "store": true,
- "fielddata": true
- },
- "tags":{
- "type":"keyword"
- },
- "location":{
- "type":"geo_point"
- },
- "suggest_field":{
- "type":"completion",
- "contexts":[
- {
- "name":"user_name",
- "type":"category"
- }
- ]
- }
- }
- }
- }
-}
-`
-
- testJoinIndex = "elastic-joins"
- testJoinMapping = `
- {
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "message":{
- "type":"text"
- },
- "my_join_field": {
- "type": "join",
- "relations": {
- "question": "answer"
- }
- }
- }
- }
- }
- }
-`
-
- testOrderIndex = "elastic-orders"
- testOrderMapping = `
-{
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "article":{
- "type":"text"
- },
- "manufacturer":{
- "type":"keyword"
- },
- "price":{
- "type":"float"
- },
- "time":{
- "type":"date",
- "format": "YYYY-MM-dd"
- }
- }
- }
- }
-}
-`
-
- /*
- testDoctypeIndex = "elastic-doctypes"
- testDoctypeMapping = `
- {
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "message":{
- "type":"text",
- "store": true,
- "fielddata": true
- }
- }
- }
- }
- }
- `
- */
-
- testQueryIndex = "elastic-queries"
- testQueryMapping = `
-{
- "settings":{
- "number_of_shards":1,
- "number_of_replicas":0
- },
- "mappings":{
- "doc":{
- "properties":{
- "message":{
- "type":"text",
- "store": true,
- "fielddata": true
- },
- "query": {
- "type": "percolator"
- }
- }
- }
- }
-}
-`
-)
-
-type tweet struct {
- User string `json:"user"`
- Message string `json:"message"`
- Retweets int `json:"retweets"`
- Image string `json:"image,omitempty"`
- Created time.Time `json:"created,omitempty"`
- Tags []string `json:"tags,omitempty"`
- Location string `json:"location,omitempty"`
- Suggest *SuggestField `json:"suggest_field,omitempty"`
-}
-
-func (t tweet) String() string {
- return fmt.Sprintf("tweet{User:%q,Message:%q,Retweets:%d}", t.User, t.Message, t.Retweets)
-}
-
-type comment struct {
- User string `json:"user"`
- Comment string `json:"comment"`
- Created time.Time `json:"created,omitempty"`
-}
-
-func (c comment) String() string {
- return fmt.Sprintf("comment{User:%q,Comment:%q}", c.User, c.Comment)
-}
-
-type joinDoc struct {
- Message string `json:"message"`
- JoinField interface{} `json:"my_join_field,omitempty"`
-}
-
-type joinField struct {
- Name string `json:"name"`
- Parent string `json:"parent,omitempty"`
-}
-
-type order struct {
- Article string `json:"article"`
- Manufacturer string `json:"manufacturer"`
- Price float64 `json:"price"`
- Time string `json:"time,omitempty"`
-}
-
-func (o order) String() string {
- return fmt.Sprintf("order{Article:%q,Manufacturer:%q,Price:%v,Time:%v}", o.Article, o.Manufacturer, o.Price, o.Time)
-}
-
-// doctype is required for Percolate tests.
-type doctype struct {
- Message string `json:"message"`
-}
-
-// queries is required for Percolate tests.
-type queries struct {
- Query string `json:"query"`
-}
-
-func isTravis() bool {
- return os.Getenv("TRAVIS") != ""
-}
-
-func travisGoVersion() string {
- return os.Getenv("TRAVIS_GO_VERSION")
-}
-
-type logger interface {
- Error(args ...interface{})
- Errorf(format string, args ...interface{})
- Fatal(args ...interface{})
- Fatalf(format string, args ...interface{})
- Fail()
- FailNow()
- Log(args ...interface{})
- Logf(format string, args ...interface{})
-}
-
-func setupTestClient(t logger, options ...ClientOptionFunc) (client *Client) {
- var err error
-
- client, err = NewClient(options...)
- if err != nil {
- t.Fatal(err)
- }
-
- client.DeleteIndex(testIndexName).Do(context.TODO())
- client.DeleteIndex(testIndexName2).Do(context.TODO())
- client.DeleteIndex(testIndexName3).Do(context.TODO())
- client.DeleteIndex(testOrderIndex).Do(context.TODO())
- client.DeleteIndex(testNoSourceIndexName).Do(context.TODO())
- //client.DeleteIndex(testDoctypeIndex).Do(context.TODO())
- client.DeleteIndex(testQueryIndex).Do(context.TODO())
- client.DeleteIndex(testJoinIndex).Do(context.TODO())
-
- return client
-}
-
-func setupTestClientAndCreateIndex(t logger, options ...ClientOptionFunc) *Client {
- client := setupTestClient(t, options...)
-
- // Create index
- createIndex, err := client.CreateIndex(testIndexName).Body(testMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex)
- }
-
- // Create second index
- createIndex2, err := client.CreateIndex(testIndexName2).Body(testMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createIndex2 == nil {
- t.Errorf("expected result to be != nil; got: %v", createIndex2)
- }
-
- // Create no source index
- createNoSourceIndex, err := client.CreateIndex(testNoSourceIndexName).Body(testNoSourceMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createNoSourceIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createNoSourceIndex)
- }
-
- // Create order index
- createOrderIndex, err := client.CreateIndex(testOrderIndex).Body(testOrderMapping).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if createOrderIndex == nil {
- t.Errorf("expected result to be != nil; got: %v", createOrderIndex)
- }
-
- return client
-}
-
-func setupTestClientAndCreateIndexAndLog(t logger, options ...ClientOptionFunc) *Client {
- return setupTestClientAndCreateIndex(t, SetTraceLog(log.New(os.Stdout, "", 0)))
-}
-
-func setupTestClientAndCreateIndexAndAddDocs(t logger, options ...ClientOptionFunc) *Client {
- client := setupTestClientAndCreateIndex(t, options...)
-
- // Add tweets
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
- tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
- //comment1 := comment{User: "nico", Comment: "You bet."}
-
- _, err := client.Index().Index(testIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Index().Index(testIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Index().Index(testIndexName).Type("doc").Id("3").Routing("someroutingkey").BodyJson(&tweet3).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- /*
- _, err = client.Index().Index(testIndexName).Type("comment").Id("1").Parent("3").BodyJson(&comment1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- */
-
- // Add orders
- var orders []order
- orders = append(orders, order{Article: "Apple MacBook", Manufacturer: "Apple", Price: 1290, Time: "2015-01-18"})
- orders = append(orders, order{Article: "Paper", Manufacturer: "Canon", Price: 100, Time: "2015-03-01"})
- orders = append(orders, order{Article: "Apple iPad", Manufacturer: "Apple", Price: 499, Time: "2015-04-12"})
- orders = append(orders, order{Article: "Dell XPS 13", Manufacturer: "Dell", Price: 1600, Time: "2015-04-18"})
- orders = append(orders, order{Article: "Apple Watch", Manufacturer: "Apple", Price: 349, Time: "2015-04-29"})
- orders = append(orders, order{Article: "Samsung TV", Manufacturer: "Samsung", Price: 790, Time: "2015-05-03"})
- orders = append(orders, order{Article: "Hoodie", Manufacturer: "h&m", Price: 49, Time: "2015-06-03"})
- orders = append(orders, order{Article: "T-Shirt", Manufacturer: "h&m", Price: 19, Time: "2015-06-18"})
- for i, o := range orders {
- id := fmt.Sprintf("%d", i)
- _, err = client.Index().Index(testOrderIndex).Type("doc").Id(id).BodyJson(&o).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- }
-
- // Flush
- _, err = client.Flush().Index(testIndexName, testOrderIndex).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- return client
-}
-
-func setupTestClientAndCreateIndexAndAddDocsNoSource(t logger, options ...ClientOptionFunc) *Client {
- client := setupTestClientAndCreateIndex(t, options...)
-
- // Add tweets
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
- tweet2 := tweet{User: "olivere", Message: "Another unrelated topic."}
-
- _, err := client.Index().Index(testNoSourceIndexName).Type("doc").Id("1").BodyJson(&tweet1).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- _, err = client.Index().Index(testNoSourceIndexName).Type("doc").Id("2").BodyJson(&tweet2).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- // Flush
- _, err = client.Flush().Index(testNoSourceIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
-
- return client
-}
-
-var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
-
-func randomString(n int) string {
- b := make([]rune, n)
- for i := range b {
- b[i] = letters[rand.Intn(len(letters))]
- }
- return string(b)
-}
-
-type lexicographically struct {
- strings []string
-}
-
-func (l lexicographically) Len() int {
- return len(l.strings)
-}
-
-func (l lexicographically) Less(i, j int) bool {
- return l.strings[i] < l.strings[j]
-}
-
-func (l lexicographically) Swap(i, j int) {
- l.strings[i], l.strings[j] = l.strings[j], l.strings[i]
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_create.go b/vendor/github.com/olivere/elastic/snapshot_create.go
deleted file mode 100644
index 1bbd2762e..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_create.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "time"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// SnapshotCreateService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-snapshots.html.
-type SnapshotCreateService struct {
- client *Client
- pretty bool
- repository string
- snapshot string
- masterTimeout string
- waitForCompletion *bool
- bodyJson interface{}
- bodyString string
-}
-
-// NewSnapshotCreateService creates a new SnapshotCreateService.
-func NewSnapshotCreateService(client *Client) *SnapshotCreateService {
- return &SnapshotCreateService{
- client: client,
- }
-}
-
-// Repository is the repository name.
-func (s *SnapshotCreateService) Repository(repository string) *SnapshotCreateService {
- s.repository = repository
- return s
-}
-
-// Snapshot is the snapshot name.
-func (s *SnapshotCreateService) Snapshot(snapshot string) *SnapshotCreateService {
- s.snapshot = snapshot
- return s
-}
-
-// MasterTimeout is documented as: Explicit operation timeout for connection to master node.
-func (s *SnapshotCreateService) MasterTimeout(masterTimeout string) *SnapshotCreateService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// WaitForCompletion is documented as: Should this request wait until the operation has completed before returning.
-func (s *SnapshotCreateService) WaitForCompletion(waitForCompletion bool) *SnapshotCreateService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *SnapshotCreateService) Pretty(pretty bool) *SnapshotCreateService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson is documented as: The snapshot definition.
-func (s *SnapshotCreateService) BodyJson(body interface{}) *SnapshotCreateService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: The snapshot definition.
-func (s *SnapshotCreateService) BodyString(body string) *SnapshotCreateService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SnapshotCreateService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_snapshot/{repository}/{snapshot}", map[string]string{
- "snapshot": s.snapshot,
- "repository": s.repository,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SnapshotCreateService) Validate() error {
- var invalid []string
- if s.repository == "" {
- invalid = append(invalid, "Repository")
- }
- if s.snapshot == "" {
- invalid = append(invalid, "Snapshot")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *SnapshotCreateService) Do(ctx context.Context) (*SnapshotCreateResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else {
- body = s.bodyString
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SnapshotCreateResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SnapshotShardFailure stores information about failures that occurred during shard snapshotting process.
-type SnapshotShardFailure struct {
- Index string `json:"index"`
- IndexUUID string `json:"index_uuid"`
- ShardID int `json:"shard_id"`
- Reason string `json:"reason"`
- NodeID string `json:"node_id"`
- Status string `json:"status"`
-}
-
-// SnapshotCreateResponse is the response of SnapshotCreateService.Do.
-type SnapshotCreateResponse struct {
- // Accepted indicates whether the request was accepted by elasticsearch.
- // It's available when waitForCompletion is false.
- Accepted *bool `json:"accepted"`
-
- // Snapshot is available when waitForCompletion is true.
- Snapshot *struct {
- Snapshot string `json:"snapshot"`
- UUID string `json:"uuid"`
- VersionID int `json:"version_id"`
- Version string `json:"version"`
- Indices []string `json:"indices"`
- State string `json:"state"`
- Reason string `json:"reason"`
- StartTime time.Time `json:"start_time"`
- StartTimeInMillis int64 `json:"start_time_in_millis"`
- EndTime time.Time `json:"end_time"`
- EndTimeInMillis int64 `json:"end_time_in_millis"`
- DurationInMillis int64 `json:"duration_in_millis"`
- Failures []SnapshotShardFailure `json:"failures"`
- Shards shardsInfo `json:"shards"`
- } `json:"snapshot"`
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_create_repository.go b/vendor/github.com/olivere/elastic/snapshot_create_repository.go
deleted file mode 100644
index e7f6d5336..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_create_repository.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// SnapshotCreateRepositoryService creates a snapshot repository.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-snapshots.html
-// for details.
-type SnapshotCreateRepositoryService struct {
- client *Client
- pretty bool
- repository string
- masterTimeout string
- timeout string
- verify *bool
- typ string
- settings map[string]interface{}
- bodyJson interface{}
- bodyString string
-}
-
-// NewSnapshotCreateRepositoryService creates a new SnapshotCreateRepositoryService.
-func NewSnapshotCreateRepositoryService(client *Client) *SnapshotCreateRepositoryService {
- return &SnapshotCreateRepositoryService{
- client: client,
- }
-}
-
-// Repository is the repository name.
-func (s *SnapshotCreateRepositoryService) Repository(repository string) *SnapshotCreateRepositoryService {
- s.repository = repository
- return s
-}
-
-// MasterTimeout specifies an explicit operation timeout for connection to master node.
-func (s *SnapshotCreateRepositoryService) MasterTimeout(masterTimeout string) *SnapshotCreateRepositoryService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *SnapshotCreateRepositoryService) Timeout(timeout string) *SnapshotCreateRepositoryService {
- s.timeout = timeout
- return s
-}
-
-// Verify indicates whether to verify the repository after creation.
-func (s *SnapshotCreateRepositoryService) Verify(verify bool) *SnapshotCreateRepositoryService {
- s.verify = &verify
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *SnapshotCreateRepositoryService) Pretty(pretty bool) *SnapshotCreateRepositoryService {
- s.pretty = pretty
- return s
-}
-
-// Type sets the snapshot repository type, e.g. "fs".
-func (s *SnapshotCreateRepositoryService) Type(typ string) *SnapshotCreateRepositoryService {
- s.typ = typ
- return s
-}
-
-// Settings sets all settings of the snapshot repository.
-func (s *SnapshotCreateRepositoryService) Settings(settings map[string]interface{}) *SnapshotCreateRepositoryService {
- s.settings = settings
- return s
-}
-
-// Setting sets a single settings of the snapshot repository.
-func (s *SnapshotCreateRepositoryService) Setting(name string, value interface{}) *SnapshotCreateRepositoryService {
- if s.settings == nil {
- s.settings = make(map[string]interface{})
- }
- s.settings[name] = value
- return s
-}
-
-// BodyJson is documented as: The repository definition.
-func (s *SnapshotCreateRepositoryService) BodyJson(body interface{}) *SnapshotCreateRepositoryService {
- s.bodyJson = body
- return s
-}
-
-// BodyString is documented as: The repository definition.
-func (s *SnapshotCreateRepositoryService) BodyString(body string) *SnapshotCreateRepositoryService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SnapshotCreateRepositoryService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_snapshot/{repository}", map[string]string{
- "repository": s.repository,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.verify != nil {
- params.Set("verify", fmt.Sprintf("%v", *s.verify))
- }
- return path, params, nil
-}
-
-// buildBody builds the body for the operation.
-func (s *SnapshotCreateRepositoryService) buildBody() (interface{}, error) {
- if s.bodyJson != nil {
- return s.bodyJson, nil
- }
- if s.bodyString != "" {
- return s.bodyString, nil
- }
-
- body := map[string]interface{}{
- "type": s.typ,
- }
- if len(s.settings) > 0 {
- body["settings"] = s.settings
- }
- return body, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SnapshotCreateRepositoryService) Validate() error {
- var invalid []string
- if s.repository == "" {
- invalid = append(invalid, "Repository")
- }
- if s.bodyString == "" && s.bodyJson == nil {
- invalid = append(invalid, "BodyJson")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *SnapshotCreateRepositoryService) Do(ctx context.Context) (*SnapshotCreateRepositoryResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body, err := s.buildBody()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SnapshotCreateRepositoryResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SnapshotCreateRepositoryResponse is the response of SnapshotCreateRepositoryService.Do.
-type SnapshotCreateRepositoryResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_create_repository_test.go b/vendor/github.com/olivere/elastic/snapshot_create_repository_test.go
deleted file mode 100644
index 2045c700d..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_create_repository_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSnapshotPutRepositoryURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Repository string
- Expected string
- }{
- {
- "repo",
- "/_snapshot/repo",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.SnapshotCreateRepository(test.Repository).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestSnapshotPutRepositoryBody(t *testing.T) {
- client := setupTestClient(t)
-
- service := client.SnapshotCreateRepository("my_backup")
- service = service.Type("fs").
- Settings(map[string]interface{}{
- "location": "my_backup_location",
- "compress": false,
- }).
- Setting("compress", true).
- Setting("chunk_size", 16*1024*1024)
-
- src, err := service.buildBody()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"settings":{"chunk_size":16777216,"compress":true,"location":"my_backup_location"},"type":"fs"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_create_test.go b/vendor/github.com/olivere/elastic/snapshot_create_test.go
deleted file mode 100644
index 74b009cfe..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_create_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package elastic
-
-import (
- "net/url"
- "reflect"
- "testing"
-)
-
-func TestSnapshotValidate(t *testing.T) {
- var client *Client
-
- err := NewSnapshotCreateService(client).Validate()
- got := err.Error()
- expected := "missing required fields: [Repository Snapshot]"
- if got != expected {
- t.Errorf("expected %q; got: %q", expected, got)
- }
-}
-
-func TestSnapshotPutURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Repository string
- Snapshot string
- Pretty bool
- MasterTimeout string
- WaitForCompletion bool
- ExpectedPath string
- ExpectedParams url.Values
- }{
- {
- Repository: "repo",
- Snapshot: "snapshot_of_sunday",
- Pretty: true,
- MasterTimeout: "60s",
- WaitForCompletion: true,
- ExpectedPath: "/_snapshot/repo/snapshot_of_sunday",
- ExpectedParams: url.Values{
- "pretty": []string{"true"},
- "master_timeout": []string{"60s"},
- "wait_for_completion": []string{"true"},
- },
- },
- }
-
- for _, test := range tests {
- path, params, err := client.SnapshotCreate(test.Repository, test.Snapshot).
- Pretty(test.Pretty).
- MasterTimeout(test.MasterTimeout).
- WaitForCompletion(test.WaitForCompletion).
- buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.ExpectedPath {
- t.Errorf("expected %q; got: %q", test.ExpectedPath, path)
- }
- if !reflect.DeepEqual(params, test.ExpectedParams) {
- t.Errorf("expected %q; got: %q", test.ExpectedParams, params)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_delete_repository.go b/vendor/github.com/olivere/elastic/snapshot_delete_repository.go
deleted file mode 100644
index ad3e49b0e..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_delete_repository.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// SnapshotDeleteRepositoryService deletes a snapshot repository.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-snapshots.html
-// for details.
-type SnapshotDeleteRepositoryService struct {
- client *Client
- pretty bool
- repository []string
- masterTimeout string
- timeout string
-}
-
-// NewSnapshotDeleteRepositoryService creates a new SnapshotDeleteRepositoryService.
-func NewSnapshotDeleteRepositoryService(client *Client) *SnapshotDeleteRepositoryService {
- return &SnapshotDeleteRepositoryService{
- client: client,
- repository: make([]string, 0),
- }
-}
-
-// Repository is the list of repository names.
-func (s *SnapshotDeleteRepositoryService) Repository(repositories ...string) *SnapshotDeleteRepositoryService {
- s.repository = append(s.repository, repositories...)
- return s
-}
-
-// MasterTimeout specifies an explicit operation timeout for connection to master node.
-func (s *SnapshotDeleteRepositoryService) MasterTimeout(masterTimeout string) *SnapshotDeleteRepositoryService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *SnapshotDeleteRepositoryService) Timeout(timeout string) *SnapshotDeleteRepositoryService {
- s.timeout = timeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *SnapshotDeleteRepositoryService) Pretty(pretty bool) *SnapshotDeleteRepositoryService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SnapshotDeleteRepositoryService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_snapshot/{repository}", map[string]string{
- "repository": strings.Join(s.repository, ","),
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SnapshotDeleteRepositoryService) Validate() error {
- var invalid []string
- if len(s.repository) == 0 {
- invalid = append(invalid, "Repository")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *SnapshotDeleteRepositoryService) Do(ctx context.Context) (*SnapshotDeleteRepositoryResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "DELETE",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SnapshotDeleteRepositoryResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SnapshotDeleteRepositoryResponse is the response of SnapshotDeleteRepositoryService.Do.
-type SnapshotDeleteRepositoryResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_delete_repository_test.go b/vendor/github.com/olivere/elastic/snapshot_delete_repository_test.go
deleted file mode 100644
index aec793a60..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_delete_repository_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestSnapshotDeleteRepositoryURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Repository []string
- Expected string
- }{
- {
- []string{"repo1"},
- "/_snapshot/repo1",
- },
- {
- []string{"repo1", "repo2"},
- "/_snapshot/repo1%2Crepo2",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.SnapshotDeleteRepository(test.Repository...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_get_repository.go b/vendor/github.com/olivere/elastic/snapshot_get_repository.go
deleted file mode 100644
index 2d24c5e4c..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_get_repository.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// SnapshotGetRepositoryService reads a snapshot repository.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-snapshots.html
-// for details.
-type SnapshotGetRepositoryService struct {
- client *Client
- pretty bool
- repository []string
- local *bool
- masterTimeout string
-}
-
-// NewSnapshotGetRepositoryService creates a new SnapshotGetRepositoryService.
-func NewSnapshotGetRepositoryService(client *Client) *SnapshotGetRepositoryService {
- return &SnapshotGetRepositoryService{
- client: client,
- repository: make([]string, 0),
- }
-}
-
-// Repository is the list of repository names.
-func (s *SnapshotGetRepositoryService) Repository(repositories ...string) *SnapshotGetRepositoryService {
- s.repository = append(s.repository, repositories...)
- return s
-}
-
-// Local indicates whether to return local information, i.e. do not retrieve the state from master node (default: false).
-func (s *SnapshotGetRepositoryService) Local(local bool) *SnapshotGetRepositoryService {
- s.local = &local
- return s
-}
-
-// MasterTimeout specifies an explicit operation timeout for connection to master node.
-func (s *SnapshotGetRepositoryService) MasterTimeout(masterTimeout string) *SnapshotGetRepositoryService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *SnapshotGetRepositoryService) Pretty(pretty bool) *SnapshotGetRepositoryService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SnapshotGetRepositoryService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.repository) > 0 {
- path, err = uritemplates.Expand("/_snapshot/{repository}", map[string]string{
- "repository": strings.Join(s.repository, ","),
- })
- } else {
- path = "/_snapshot"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.local != nil {
- params.Set("local", fmt.Sprintf("%v", *s.local))
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SnapshotGetRepositoryService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *SnapshotGetRepositoryService) Do(ctx context.Context) (SnapshotGetRepositoryResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- var ret SnapshotGetRepositoryResponse
- if err := json.Unmarshal(res.Body, &ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SnapshotGetRepositoryResponse is the response of SnapshotGetRepositoryService.Do.
-type SnapshotGetRepositoryResponse map[string]*SnapshotRepositoryMetaData
-
-// SnapshotRepositoryMetaData contains all information about
-// a single snapshot repository.
-type SnapshotRepositoryMetaData struct {
- Type string `json:"type"`
- Settings map[string]interface{} `json:"settings,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_get_repository_test.go b/vendor/github.com/olivere/elastic/snapshot_get_repository_test.go
deleted file mode 100644
index 0dcd0bb90..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_get_repository_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestSnapshotGetRepositoryURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Repository []string
- Expected string
- }{
- {
- []string{},
- "/_snapshot",
- },
- {
- []string{"repo1"},
- "/_snapshot/repo1",
- },
- {
- []string{"repo1", "repo2"},
- "/_snapshot/repo1%2Crepo2",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.SnapshotGetRepository(test.Repository...).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_verify_repository.go b/vendor/github.com/olivere/elastic/snapshot_verify_repository.go
deleted file mode 100644
index 5494ab475..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_verify_repository.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// SnapshotVerifyRepositoryService verifies a snapshop repository.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-snapshots.html
-// for details.
-type SnapshotVerifyRepositoryService struct {
- client *Client
- pretty bool
- repository string
- masterTimeout string
- timeout string
-}
-
-// NewSnapshotVerifyRepositoryService creates a new SnapshotVerifyRepositoryService.
-func NewSnapshotVerifyRepositoryService(client *Client) *SnapshotVerifyRepositoryService {
- return &SnapshotVerifyRepositoryService{
- client: client,
- }
-}
-
-// Repository specifies the repository name.
-func (s *SnapshotVerifyRepositoryService) Repository(repository string) *SnapshotVerifyRepositoryService {
- s.repository = repository
- return s
-}
-
-// MasterTimeout is the explicit operation timeout for connection to master node.
-func (s *SnapshotVerifyRepositoryService) MasterTimeout(masterTimeout string) *SnapshotVerifyRepositoryService {
- s.masterTimeout = masterTimeout
- return s
-}
-
-// Timeout is an explicit operation timeout.
-func (s *SnapshotVerifyRepositoryService) Timeout(timeout string) *SnapshotVerifyRepositoryService {
- s.timeout = timeout
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *SnapshotVerifyRepositoryService) Pretty(pretty bool) *SnapshotVerifyRepositoryService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *SnapshotVerifyRepositoryService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_snapshot/{repository}/_verify", map[string]string{
- "repository": s.repository,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.masterTimeout != "" {
- params.Set("master_timeout", s.masterTimeout)
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *SnapshotVerifyRepositoryService) Validate() error {
- var invalid []string
- if s.repository == "" {
- invalid = append(invalid, "Repository")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *SnapshotVerifyRepositoryService) Do(ctx context.Context) (*SnapshotVerifyRepositoryResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(SnapshotVerifyRepositoryResponse)
- if err := json.Unmarshal(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// SnapshotVerifyRepositoryResponse is the response of SnapshotVerifyRepositoryService.Do.
-type SnapshotVerifyRepositoryResponse struct {
- Nodes map[string]*SnapshotVerifyRepositoryNode `json:"nodes"`
-}
-
-type SnapshotVerifyRepositoryNode struct {
- Name string `json:"name"`
-}
diff --git a/vendor/github.com/olivere/elastic/snapshot_verify_repository_test.go b/vendor/github.com/olivere/elastic/snapshot_verify_repository_test.go
deleted file mode 100644
index 9776782d2..000000000
--- a/vendor/github.com/olivere/elastic/snapshot_verify_repository_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestSnapshotVerifyRepositoryURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Repository string
- Expected string
- }{
- {
- "repo",
- "/_snapshot/repo/_verify",
- },
- }
-
- for _, test := range tests {
- path, _, err := client.SnapshotVerifyRepository(test.Repository).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/sort.go b/vendor/github.com/olivere/elastic/sort.go
deleted file mode 100644
index 7e2b32183..000000000
--- a/vendor/github.com/olivere/elastic/sort.go
+++ /dev/null
@@ -1,614 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// -- Sorter --
-
-// Sorter is an interface for sorting strategies, e.g. ScoreSort or FieldSort.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-sort.html.
-type Sorter interface {
- Source() (interface{}, error)
-}
-
-// -- SortInfo --
-
-// SortInfo contains information about sorting a field.
-type SortInfo struct {
- Sorter
- Field string
- Ascending bool
- Missing interface{}
- IgnoreUnmapped *bool
- UnmappedType string
- SortMode string
- NestedFilter Query
- NestedPath string
- NestedSort *NestedSort // available in 6.1 or later
-}
-
-func (info SortInfo) Source() (interface{}, error) {
- prop := make(map[string]interface{})
- if info.Ascending {
- prop["order"] = "asc"
- } else {
- prop["order"] = "desc"
- }
- if info.Missing != nil {
- prop["missing"] = info.Missing
- }
- if info.IgnoreUnmapped != nil {
- prop["ignore_unmapped"] = *info.IgnoreUnmapped
- }
- if info.UnmappedType != "" {
- prop["unmapped_type"] = info.UnmappedType
- }
- if info.SortMode != "" {
- prop["mode"] = info.SortMode
- }
- if info.NestedFilter != nil {
- src, err := info.NestedFilter.Source()
- if err != nil {
- return nil, err
- }
- prop["nested_filter"] = src
- }
- if info.NestedPath != "" {
- prop["nested_path"] = info.NestedPath
- }
- if info.NestedSort != nil {
- src, err := info.NestedSort.Source()
- if err != nil {
- return nil, err
- }
- prop["nested"] = src
- }
- source := make(map[string]interface{})
- source[info.Field] = prop
- return source, nil
-}
-
-// -- SortByDoc --
-
-// SortByDoc sorts by the "_doc" field, as described in
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-scroll.html.
-//
-// Example:
-// ss := elastic.NewSearchSource()
-// ss = ss.SortBy(elastic.SortByDoc{})
-type SortByDoc struct {
- Sorter
-}
-
-// Source returns the JSON-serializable data.
-func (s SortByDoc) Source() (interface{}, error) {
- return "_doc", nil
-}
-
-// -- ScoreSort --
-
-// ScoreSort sorts by relevancy score.
-type ScoreSort struct {
- Sorter
- ascending bool
-}
-
-// NewScoreSort creates a new ScoreSort.
-func NewScoreSort() *ScoreSort {
- return &ScoreSort{ascending: false} // Descending by default!
-}
-
-// Order defines whether sorting ascending (default) or descending.
-func (s *ScoreSort) Order(ascending bool) *ScoreSort {
- s.ascending = ascending
- return s
-}
-
-// Asc sets ascending sort order.
-func (s *ScoreSort) Asc() *ScoreSort {
- s.ascending = true
- return s
-}
-
-// Desc sets descending sort order.
-func (s *ScoreSort) Desc() *ScoreSort {
- s.ascending = false
- return s
-}
-
-// Source returns the JSON-serializable data.
-func (s *ScoreSort) Source() (interface{}, error) {
- source := make(map[string]interface{})
- x := make(map[string]interface{})
- source["_score"] = x
- if s.ascending {
- x["order"] = "asc"
- } else {
- x["order"] = "desc"
- }
- return source, nil
-}
-
-// -- FieldSort --
-
-// FieldSort sorts by a given field.
-type FieldSort struct {
- Sorter
- fieldName string
- ascending bool
- missing interface{}
- unmappedType *string
- sortMode *string
- nestedFilter Query
- nestedPath *string
- nestedSort *NestedSort
-}
-
-// NewFieldSort creates a new FieldSort.
-func NewFieldSort(fieldName string) *FieldSort {
- return &FieldSort{
- fieldName: fieldName,
- ascending: true,
- }
-}
-
-// FieldName specifies the name of the field to be used for sorting.
-func (s *FieldSort) FieldName(fieldName string) *FieldSort {
- s.fieldName = fieldName
- return s
-}
-
-// Order defines whether sorting ascending (default) or descending.
-func (s *FieldSort) Order(ascending bool) *FieldSort {
- s.ascending = ascending
- return s
-}
-
-// Asc sets ascending sort order.
-func (s *FieldSort) Asc() *FieldSort {
- s.ascending = true
- return s
-}
-
-// Desc sets descending sort order.
-func (s *FieldSort) Desc() *FieldSort {
- s.ascending = false
- return s
-}
-
-// Missing sets the value to be used when a field is missing in a document.
-// You can also use "_last" or "_first" to sort missing last or first
-// respectively.
-func (s *FieldSort) Missing(missing interface{}) *FieldSort {
- s.missing = missing
- return s
-}
-
-// UnmappedType sets the type to use when the current field is not mapped
-// in an index.
-func (s *FieldSort) UnmappedType(typ string) *FieldSort {
- s.unmappedType = &typ
- return s
-}
-
-// SortMode specifies what values to pick in case a document contains
-// multiple values for the targeted sort field. Possible values are:
-// min, max, sum, and avg.
-func (s *FieldSort) SortMode(sortMode string) *FieldSort {
- s.sortMode = &sortMode
- return s
-}
-
-// NestedFilter sets a filter that nested objects should match with
-// in order to be taken into account for sorting.
-func (s *FieldSort) NestedFilter(nestedFilter Query) *FieldSort {
- s.nestedFilter = nestedFilter
- return s
-}
-
-// NestedPath is used if sorting occurs on a field that is inside a
-// nested object.
-func (s *FieldSort) NestedPath(nestedPath string) *FieldSort {
- s.nestedPath = &nestedPath
- return s
-}
-
-// NestedSort is available starting with 6.1 and will replace NestedFilter
-// and NestedPath.
-func (s *FieldSort) NestedSort(nestedSort *NestedSort) *FieldSort {
- s.nestedSort = nestedSort
- return s
-}
-
-// Source returns the JSON-serializable data.
-func (s *FieldSort) Source() (interface{}, error) {
- source := make(map[string]interface{})
- x := make(map[string]interface{})
- source[s.fieldName] = x
- if s.ascending {
- x["order"] = "asc"
- } else {
- x["order"] = "desc"
- }
- if s.missing != nil {
- x["missing"] = s.missing
- }
- if s.unmappedType != nil {
- x["unmapped_type"] = *s.unmappedType
- }
- if s.sortMode != nil {
- x["mode"] = *s.sortMode
- }
- if s.nestedFilter != nil {
- src, err := s.nestedFilter.Source()
- if err != nil {
- return nil, err
- }
- x["nested_filter"] = src
- }
- if s.nestedPath != nil {
- x["nested_path"] = *s.nestedPath
- }
- if s.nestedSort != nil {
- src, err := s.nestedSort.Source()
- if err != nil {
- return nil, err
- }
- x["nested"] = src
- }
- return source, nil
-}
-
-// -- GeoDistanceSort --
-
-// GeoDistanceSort allows for sorting by geographic distance.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-sort.html#_geo_distance_sorting.
-type GeoDistanceSort struct {
- Sorter
- fieldName string
- points []*GeoPoint
- geohashes []string
- distanceType *string
- unit string
- ascending bool
- sortMode *string
- nestedFilter Query
- nestedPath *string
- nestedSort *NestedSort
-}
-
-// NewGeoDistanceSort creates a new sorter for geo distances.
-func NewGeoDistanceSort(fieldName string) *GeoDistanceSort {
- return &GeoDistanceSort{
- fieldName: fieldName,
- ascending: true,
- }
-}
-
-// FieldName specifies the name of the (geo) field to use for sorting.
-func (s *GeoDistanceSort) FieldName(fieldName string) *GeoDistanceSort {
- s.fieldName = fieldName
- return s
-}
-
-// Order defines whether sorting ascending (default) or descending.
-func (s *GeoDistanceSort) Order(ascending bool) *GeoDistanceSort {
- s.ascending = ascending
- return s
-}
-
-// Asc sets ascending sort order.
-func (s *GeoDistanceSort) Asc() *GeoDistanceSort {
- s.ascending = true
- return s
-}
-
-// Desc sets descending sort order.
-func (s *GeoDistanceSort) Desc() *GeoDistanceSort {
- s.ascending = false
- return s
-}
-
-// Point specifies a point to create the range distance aggregations from.
-func (s *GeoDistanceSort) Point(lat, lon float64) *GeoDistanceSort {
- s.points = append(s.points, GeoPointFromLatLon(lat, lon))
- return s
-}
-
-// Points specifies the geo point(s) to create the range distance aggregations from.
-func (s *GeoDistanceSort) Points(points ...*GeoPoint) *GeoDistanceSort {
- s.points = append(s.points, points...)
- return s
-}
-
-// GeoHashes specifies the geo point to create the range distance aggregations from.
-func (s *GeoDistanceSort) GeoHashes(geohashes ...string) *GeoDistanceSort {
- s.geohashes = append(s.geohashes, geohashes...)
- return s
-}
-
-// Unit specifies the distance unit to use. It defaults to km.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/common-options.html#distance-units
-// for details.
-func (s *GeoDistanceSort) Unit(unit string) *GeoDistanceSort {
- s.unit = unit
- return s
-}
-
-// GeoDistance is an alias for DistanceType.
-func (s *GeoDistanceSort) GeoDistance(geoDistance string) *GeoDistanceSort {
- return s.DistanceType(geoDistance)
-}
-
-// DistanceType describes how to compute the distance, e.g. "arc" or "plane".
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-sort.html#geo-sorting
-// for details.
-func (s *GeoDistanceSort) DistanceType(distanceType string) *GeoDistanceSort {
- s.distanceType = &distanceType
- return s
-}
-
-// SortMode specifies what values to pick in case a document contains
-// multiple values for the targeted sort field. Possible values are:
-// min, max, sum, and avg.
-func (s *GeoDistanceSort) SortMode(sortMode string) *GeoDistanceSort {
- s.sortMode = &sortMode
- return s
-}
-
-// NestedFilter sets a filter that nested objects should match with
-// in order to be taken into account for sorting.
-func (s *GeoDistanceSort) NestedFilter(nestedFilter Query) *GeoDistanceSort {
- s.nestedFilter = nestedFilter
- return s
-}
-
-// NestedPath is used if sorting occurs on a field that is inside a
-// nested object.
-func (s *GeoDistanceSort) NestedPath(nestedPath string) *GeoDistanceSort {
- s.nestedPath = &nestedPath
- return s
-}
-
-// NestedSort is available starting with 6.1 and will replace NestedFilter
-// and NestedPath.
-func (s *GeoDistanceSort) NestedSort(nestedSort *NestedSort) *GeoDistanceSort {
- s.nestedSort = nestedSort
- return s
-}
-
-// Source returns the JSON-serializable data.
-func (s *GeoDistanceSort) Source() (interface{}, error) {
- source := make(map[string]interface{})
- x := make(map[string]interface{})
- source["_geo_distance"] = x
-
- // Points
- var ptarr []interface{}
- for _, pt := range s.points {
- ptarr = append(ptarr, pt.Source())
- }
- for _, geohash := range s.geohashes {
- ptarr = append(ptarr, geohash)
- }
- x[s.fieldName] = ptarr
-
- if s.unit != "" {
- x["unit"] = s.unit
- }
- if s.distanceType != nil {
- x["distance_type"] = *s.distanceType
- }
-
- if s.ascending {
- x["order"] = "asc"
- } else {
- x["order"] = "desc"
- }
- if s.sortMode != nil {
- x["mode"] = *s.sortMode
- }
- if s.nestedFilter != nil {
- src, err := s.nestedFilter.Source()
- if err != nil {
- return nil, err
- }
- x["nested_filter"] = src
- }
- if s.nestedPath != nil {
- x["nested_path"] = *s.nestedPath
- }
- if s.nestedSort != nil {
- src, err := s.nestedSort.Source()
- if err != nil {
- return nil, err
- }
- x["nested"] = src
- }
- return source, nil
-}
-
-// -- ScriptSort --
-
-// ScriptSort sorts by a custom script. See
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/modules-scripting.html#modules-scripting
-// for details about scripting.
-type ScriptSort struct {
- Sorter
- script *Script
- typ string
- ascending bool
- sortMode *string
- nestedFilter Query
- nestedPath *string
- nestedSort *NestedSort
-}
-
-// NewScriptSort creates and initializes a new ScriptSort.
-// You must provide a script and a type, e.g. "string" or "number".
-func NewScriptSort(script *Script, typ string) *ScriptSort {
- return &ScriptSort{
- script: script,
- typ: typ,
- ascending: true,
- }
-}
-
-// Type sets the script type, which can be either "string" or "number".
-func (s *ScriptSort) Type(typ string) *ScriptSort {
- s.typ = typ
- return s
-}
-
-// Order defines whether sorting ascending (default) or descending.
-func (s *ScriptSort) Order(ascending bool) *ScriptSort {
- s.ascending = ascending
- return s
-}
-
-// Asc sets ascending sort order.
-func (s *ScriptSort) Asc() *ScriptSort {
- s.ascending = true
- return s
-}
-
-// Desc sets descending sort order.
-func (s *ScriptSort) Desc() *ScriptSort {
- s.ascending = false
- return s
-}
-
-// SortMode specifies what values to pick in case a document contains
-// multiple values for the targeted sort field. Possible values are:
-// min or max.
-func (s *ScriptSort) SortMode(sortMode string) *ScriptSort {
- s.sortMode = &sortMode
- return s
-}
-
-// NestedFilter sets a filter that nested objects should match with
-// in order to be taken into account for sorting.
-func (s *ScriptSort) NestedFilter(nestedFilter Query) *ScriptSort {
- s.nestedFilter = nestedFilter
- return s
-}
-
-// NestedPath is used if sorting occurs on a field that is inside a
-// nested object.
-func (s *ScriptSort) NestedPath(nestedPath string) *ScriptSort {
- s.nestedPath = &nestedPath
- return s
-}
-
-// NestedSort is available starting with 6.1 and will replace NestedFilter
-// and NestedPath.
-func (s *ScriptSort) NestedSort(nestedSort *NestedSort) *ScriptSort {
- s.nestedSort = nestedSort
- return s
-}
-
-// Source returns the JSON-serializable data.
-func (s *ScriptSort) Source() (interface{}, error) {
- if s.script == nil {
- return nil, errors.New("ScriptSort expected a script")
- }
- source := make(map[string]interface{})
- x := make(map[string]interface{})
- source["_script"] = x
-
- src, err := s.script.Source()
- if err != nil {
- return nil, err
- }
- x["script"] = src
-
- x["type"] = s.typ
-
- if s.ascending {
- x["order"] = "asc"
- } else {
- x["order"] = "desc"
- }
- if s.sortMode != nil {
- x["mode"] = *s.sortMode
- }
- if s.nestedFilter != nil {
- src, err := s.nestedFilter.Source()
- if err != nil {
- return nil, err
- }
- x["nested_filter"] = src
- }
- if s.nestedPath != nil {
- x["nested_path"] = *s.nestedPath
- }
- if s.nestedSort != nil {
- src, err := s.nestedSort.Source()
- if err != nil {
- return nil, err
- }
- x["nested"] = src
- }
- return source, nil
-}
-
-// -- NestedSort --
-
-// NestedSort is used for fields that are inside a nested object.
-// It takes a "path" argument and an optional nested filter that the
-// nested objects should match with in order to be taken into account
-// for sorting.
-//
-// NestedSort is available from 6.1 and replaces nestedFilter and nestedPath
-// in the other sorters.
-type NestedSort struct {
- Sorter
- path string
- filter Query
- nestedSort *NestedSort
-}
-
-// NewNestedSort creates a new NestedSort.
-func NewNestedSort(path string) *NestedSort {
- return &NestedSort{path: path}
-}
-
-// Filter sets the filter.
-func (s *NestedSort) Filter(filter Query) *NestedSort {
- s.filter = filter
- return s
-}
-
-// NestedSort embeds another level of nested sorting.
-func (s *NestedSort) NestedSort(nestedSort *NestedSort) *NestedSort {
- s.nestedSort = nestedSort
- return s
-}
-
-// Source returns the JSON-serializable data.
-func (s *NestedSort) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- if s.path != "" {
- source["path"] = s.path
- }
- if s.filter != nil {
- src, err := s.filter.Source()
- if err != nil {
- return nil, err
- }
- source["filter"] = src
- }
- if s.nestedSort != nil {
- src, err := s.nestedSort.Source()
- if err != nil {
- return nil, err
- }
- source["nested"] = src
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/sort_test.go b/vendor/github.com/olivere/elastic/sort_test.go
deleted file mode 100644
index b54cbd98c..000000000
--- a/vendor/github.com/olivere/elastic/sort_test.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSortInfo(t *testing.T) {
- builder := SortInfo{Field: "grade", Ascending: false}
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"grade":{"order":"desc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSortInfoComplex(t *testing.T) {
- builder := SortInfo{
- Field: "price",
- Ascending: false,
- Missing: "_last",
- SortMode: "avg",
- NestedFilter: NewTermQuery("product.color", "blue"),
- NestedPath: "variant",
- }
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"price":{"missing":"_last","mode":"avg","nested_filter":{"term":{"product.color":"blue"}},"nested_path":"variant","order":"desc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScoreSort(t *testing.T) {
- builder := NewScoreSort()
- if builder.ascending != false {
- t.Error("expected score sorter to be ascending by default")
- }
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_score":{"order":"desc"}}` // ScoreSort is "desc" by default
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScoreSortOrderAscending(t *testing.T) {
- builder := NewScoreSort().Asc()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_score":{"order":"asc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScoreSortOrderDescending(t *testing.T) {
- builder := NewScoreSort().Desc()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_score":{"order":"desc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldSort(t *testing.T) {
- builder := NewFieldSort("grade")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"grade":{"order":"asc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldSortOrderDesc(t *testing.T) {
- builder := NewFieldSort("grade").Desc()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"grade":{"order":"desc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldSortComplex(t *testing.T) {
- builder := NewFieldSort("price").Desc().
- SortMode("avg").
- Missing("_last").
- UnmappedType("product").
- NestedFilter(NewTermQuery("product.color", "blue")).
- NestedPath("variant")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"price":{"missing":"_last","mode":"avg","nested_filter":{"term":{"product.color":"blue"}},"nested_path":"variant","order":"desc","unmapped_type":"product"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceSort(t *testing.T) {
- builder := NewGeoDistanceSort("pin.location").
- Point(-70, 40).
- Order(true).
- Unit("km").
- SortMode("min").
- GeoDistance("plane")
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_geo_distance":{"distance_type":"plane","mode":"min","order":"asc","pin.location":[{"lat":-70,"lon":40}],"unit":"km"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestGeoDistanceSortOrderDesc(t *testing.T) {
- builder := NewGeoDistanceSort("pin.location").
- Point(-70, 40).
- Unit("km").
- SortMode("min").
- GeoDistance("arc").
- Desc()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_geo_distance":{"distance_type":"arc","mode":"min","order":"desc","pin.location":[{"lat":-70,"lon":40}],"unit":"km"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-func TestScriptSort(t *testing.T) {
- builder := NewScriptSort(NewScript("doc['field_name'].value * factor").Param("factor", 1.1), "number").Order(true)
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_script":{"order":"asc","script":{"params":{"factor":1.1},"source":"doc['field_name'].value * factor"},"type":"number"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestScriptSortOrderDesc(t *testing.T) {
- builder := NewScriptSort(NewScript("doc['field_name'].value * factor").Param("factor", 1.1), "number").Desc()
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"_script":{"order":"desc","script":{"params":{"factor":1.1},"source":"doc['field_name'].value * factor"},"type":"number"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestNestedSort(t *testing.T) {
- builder := NewNestedSort("offer").
- Filter(NewTermQuery("offer.color", "blue"))
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"filter":{"term":{"offer.color":"blue"}},"path":"offer"}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestFieldSortWithNestedSort(t *testing.T) {
- builder := NewFieldSort("offer.price").
- Asc().
- SortMode("avg").
- NestedSort(
- NewNestedSort("offer").Filter(NewTermQuery("offer.color", "blue")),
- )
- src, err := builder.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"offer.price":{"mode":"avg","nested":{"filter":{"term":{"offer.color":"blue"}},"path":"offer"},"order":"asc"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggest_field.go b/vendor/github.com/olivere/elastic/suggest_field.go
deleted file mode 100644
index 8405a6f9e..000000000
--- a/vendor/github.com/olivere/elastic/suggest_field.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "errors"
-)
-
-// SuggestField can be used by the caller to specify a suggest field
-// at index time. For a detailed example, see e.g.
-// https://www.elastic.co/blog/you-complete-me.
-type SuggestField struct {
- inputs []string
- weight int
- contextQueries []SuggesterContextQuery
-}
-
-func NewSuggestField(input ...string) *SuggestField {
- return &SuggestField{
- inputs: input,
- weight: -1,
- }
-}
-
-func (f *SuggestField) Input(input ...string) *SuggestField {
- if f.inputs == nil {
- f.inputs = make([]string, 0)
- }
- f.inputs = append(f.inputs, input...)
- return f
-}
-
-func (f *SuggestField) Weight(weight int) *SuggestField {
- f.weight = weight
- return f
-}
-
-func (f *SuggestField) ContextQuery(queries ...SuggesterContextQuery) *SuggestField {
- f.contextQueries = append(f.contextQueries, queries...)
- return f
-}
-
-// MarshalJSON encodes SuggestField into JSON.
-func (f *SuggestField) MarshalJSON() ([]byte, error) {
- source := make(map[string]interface{})
-
- if f.inputs != nil {
- switch len(f.inputs) {
- case 1:
- source["input"] = f.inputs[0]
- default:
- source["input"] = f.inputs
- }
- }
-
- if f.weight >= 0 {
- source["weight"] = f.weight
- }
-
- switch len(f.contextQueries) {
- case 0:
- case 1:
- src, err := f.contextQueries[0].Source()
- if err != nil {
- return nil, err
- }
- source["contexts"] = src
- default:
- ctxq := make(map[string]interface{})
- for _, query := range f.contextQueries {
- src, err := query.Source()
- if err != nil {
- return nil, err
- }
- m, ok := src.(map[string]interface{})
- if !ok {
- return nil, errors.New("SuggesterContextQuery must be of type map[string]interface{}")
- }
- for k, v := range m {
- ctxq[k] = v
- }
- }
- source["contexts"] = ctxq
- }
-
- return json.Marshal(source)
-}
diff --git a/vendor/github.com/olivere/elastic/suggest_field_test.go b/vendor/github.com/olivere/elastic/suggest_field_test.go
deleted file mode 100644
index 426875b2f..000000000
--- a/vendor/github.com/olivere/elastic/suggest_field_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSuggestField(t *testing.T) {
- field := NewSuggestField().
- Input("Welcome to Golang and Elasticsearch.", "Golang and Elasticsearch").
- Weight(1).
- ContextQuery(
- NewSuggesterCategoryMapping("color").FieldName("color_field").DefaultValues("red", "green", "blue"),
- NewSuggesterGeoMapping("location").Precision("5m").Neighbors(true).DefaultLocations(GeoPointFromLatLon(52.516275, 13.377704)),
- )
- data, err := json.Marshal(field)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"contexts":{"color":{"default":["red","green","blue"],"path":"color_field","type":"category"},"location":{"default":{"lat":52.516275,"lon":13.377704},"neighbors":true,"precision":["5m"],"type":"geo"}},"input":["Welcome to Golang and Elasticsearch.","Golang and Elasticsearch"],"weight":1}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester.go b/vendor/github.com/olivere/elastic/suggester.go
deleted file mode 100644
index f7dc48f90..000000000
--- a/vendor/github.com/olivere/elastic/suggester.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// Represents the generic suggester interface.
-// A suggester's only purpose is to return the
-// source of the query as a JSON-serializable
-// object. Returning a map[string]interface{}
-// will do.
-type Suggester interface {
- Name() string
- Source(includeName bool) (interface{}, error)
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_completion.go b/vendor/github.com/olivere/elastic/suggester_completion.go
deleted file mode 100644
index d2b4a326c..000000000
--- a/vendor/github.com/olivere/elastic/suggester_completion.go
+++ /dev/null
@@ -1,352 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// CompletionSuggester is a fast suggester for e.g. type-ahead completion.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-suggesters-completion.html
-// for more details.
-type CompletionSuggester struct {
- Suggester
- name string
- text string
- prefix string
- regex string
- field string
- analyzer string
- size *int
- shardSize *int
- contextQueries []SuggesterContextQuery
- payload interface{}
-
- fuzzyOptions *FuzzyCompletionSuggesterOptions
- regexOptions *RegexCompletionSuggesterOptions
- skipDuplicates *bool
-}
-
-// Creates a new completion suggester.
-func NewCompletionSuggester(name string) *CompletionSuggester {
- return &CompletionSuggester{
- name: name,
- }
-}
-
-func (q *CompletionSuggester) Name() string {
- return q.name
-}
-
-func (q *CompletionSuggester) Text(text string) *CompletionSuggester {
- q.text = text
- return q
-}
-
-func (q *CompletionSuggester) Prefix(prefix string) *CompletionSuggester {
- q.prefix = prefix
- return q
-}
-
-func (q *CompletionSuggester) PrefixWithEditDistance(prefix string, editDistance interface{}) *CompletionSuggester {
- q.prefix = prefix
- q.fuzzyOptions = NewFuzzyCompletionSuggesterOptions().EditDistance(editDistance)
- return q
-}
-
-func (q *CompletionSuggester) PrefixWithOptions(prefix string, options *FuzzyCompletionSuggesterOptions) *CompletionSuggester {
- q.prefix = prefix
- q.fuzzyOptions = options
- return q
-}
-
-func (q *CompletionSuggester) FuzzyOptions(options *FuzzyCompletionSuggesterOptions) *CompletionSuggester {
- q.fuzzyOptions = options
- return q
-}
-
-func (q *CompletionSuggester) Fuzziness(fuzziness interface{}) *CompletionSuggester {
- if q.fuzzyOptions == nil {
- q.fuzzyOptions = NewFuzzyCompletionSuggesterOptions()
- }
- q.fuzzyOptions = q.fuzzyOptions.EditDistance(fuzziness)
- return q
-}
-
-func (q *CompletionSuggester) Regex(regex string) *CompletionSuggester {
- q.regex = regex
- return q
-}
-
-func (q *CompletionSuggester) RegexWithOptions(regex string, options *RegexCompletionSuggesterOptions) *CompletionSuggester {
- q.regex = regex
- q.regexOptions = options
- return q
-}
-
-func (q *CompletionSuggester) RegexOptions(options *RegexCompletionSuggesterOptions) *CompletionSuggester {
- q.regexOptions = options
- return q
-}
-
-func (q *CompletionSuggester) SkipDuplicates(skipDuplicates bool) *CompletionSuggester {
- q.skipDuplicates = &skipDuplicates
- return q
-}
-
-func (q *CompletionSuggester) Field(field string) *CompletionSuggester {
- q.field = field
- return q
-}
-
-func (q *CompletionSuggester) Analyzer(analyzer string) *CompletionSuggester {
- q.analyzer = analyzer
- return q
-}
-
-func (q *CompletionSuggester) Size(size int) *CompletionSuggester {
- q.size = &size
- return q
-}
-
-func (q *CompletionSuggester) ShardSize(shardSize int) *CompletionSuggester {
- q.shardSize = &shardSize
- return q
-}
-
-func (q *CompletionSuggester) ContextQuery(query SuggesterContextQuery) *CompletionSuggester {
- q.contextQueries = append(q.contextQueries, query)
- return q
-}
-
-func (q *CompletionSuggester) ContextQueries(queries ...SuggesterContextQuery) *CompletionSuggester {
- q.contextQueries = append(q.contextQueries, queries...)
- return q
-}
-
-// completionSuggesterRequest is necessary because the order in which
-// the JSON elements are routed to Elasticsearch is relevant.
-// We got into trouble when using plain maps because the text element
-// needs to go before the completion element.
-type completionSuggesterRequest struct {
- Text string `json:"text,omitempty"`
- Prefix string `json:"prefix,omitempty"`
- Regex string `json:"regex,omitempty"`
- Completion interface{} `json:"completion,omitempty"`
-}
-
-// Source creates the JSON data for the completion suggester.
-func (q *CompletionSuggester) Source(includeName bool) (interface{}, error) {
- cs := &completionSuggesterRequest{}
-
- if q.text != "" {
- cs.Text = q.text
- }
- if q.prefix != "" {
- cs.Prefix = q.prefix
- }
- if q.regex != "" {
- cs.Regex = q.regex
- }
-
- suggester := make(map[string]interface{})
- cs.Completion = suggester
-
- if q.analyzer != "" {
- suggester["analyzer"] = q.analyzer
- }
- if q.field != "" {
- suggester["field"] = q.field
- }
- if q.size != nil {
- suggester["size"] = *q.size
- }
- if q.shardSize != nil {
- suggester["shard_size"] = *q.shardSize
- }
- switch len(q.contextQueries) {
- case 0:
- case 1:
- src, err := q.contextQueries[0].Source()
- if err != nil {
- return nil, err
- }
- suggester["contexts"] = src
- default:
- ctxq := make(map[string]interface{})
- for _, query := range q.contextQueries {
- src, err := query.Source()
- if err != nil {
- return nil, err
- }
- // Merge the dictionary into ctxq
- m, ok := src.(map[string]interface{})
- if !ok {
- return nil, errors.New("elastic: context query is not a map")
- }
- for k, v := range m {
- ctxq[k] = v
- }
- }
- suggester["contexts"] = ctxq
- }
-
- // Fuzzy options
- if q.fuzzyOptions != nil {
- src, err := q.fuzzyOptions.Source()
- if err != nil {
- return nil, err
- }
- suggester["fuzzy"] = src
- }
-
- // Regex options
- if q.regexOptions != nil {
- src, err := q.regexOptions.Source()
- if err != nil {
- return nil, err
- }
- suggester["regex"] = src
- }
-
- if q.skipDuplicates != nil {
- suggester["skip_duplicates"] = *q.skipDuplicates
- }
-
- // TODO(oe) Add completion-suggester specific parameters here
-
- if !includeName {
- return cs, nil
- }
-
- source := make(map[string]interface{})
- source[q.name] = cs
- return source, nil
-}
-
-// -- Fuzzy options --
-
-// FuzzyCompletionSuggesterOptions represents the options for fuzzy completion suggester.
-type FuzzyCompletionSuggesterOptions struct {
- editDistance interface{}
- transpositions *bool
- minLength *int
- prefixLength *int
- unicodeAware *bool
- maxDeterminizedStates *int
-}
-
-// NewFuzzyCompletionSuggesterOptions initializes a new FuzzyCompletionSuggesterOptions instance.
-func NewFuzzyCompletionSuggesterOptions() *FuzzyCompletionSuggesterOptions {
- return &FuzzyCompletionSuggesterOptions{}
-}
-
-// EditDistance specifies the maximum number of edits, e.g. a number like "1" or "2"
-// or a string like "0..2" or ">5". See https://www.elastic.co/guide/en/elasticsearch/reference/5.6/common-options.html#fuzziness
-// for details.
-func (o *FuzzyCompletionSuggesterOptions) EditDistance(editDistance interface{}) *FuzzyCompletionSuggesterOptions {
- o.editDistance = editDistance
- return o
-}
-
-// Transpositions, if set to true, are counted as one change instead of two (defaults to true).
-func (o *FuzzyCompletionSuggesterOptions) Transpositions(transpositions bool) *FuzzyCompletionSuggesterOptions {
- o.transpositions = &transpositions
- return o
-}
-
-// MinLength represents the minimum length of the input before fuzzy suggestions are returned (defaults to 3).
-func (o *FuzzyCompletionSuggesterOptions) MinLength(minLength int) *FuzzyCompletionSuggesterOptions {
- o.minLength = &minLength
- return o
-}
-
-// PrefixLength represents the minimum length of the input, which is not checked for
-// fuzzy alternatives (defaults to 1).
-func (o *FuzzyCompletionSuggesterOptions) PrefixLength(prefixLength int) *FuzzyCompletionSuggesterOptions {
- o.prefixLength = &prefixLength
- return o
-}
-
-// UnicodeAware, if true, all measurements (like fuzzy edit distance, transpositions, and lengths)
-// are measured in Unicode code points instead of in bytes. This is slightly slower than
-// raw bytes, so it is set to false by default.
-func (o *FuzzyCompletionSuggesterOptions) UnicodeAware(unicodeAware bool) *FuzzyCompletionSuggesterOptions {
- o.unicodeAware = &unicodeAware
- return o
-}
-
-// MaxDeterminizedStates is currently undocumented in Elasticsearch. It represents
-// the maximum automaton states allowed for fuzzy expansion.
-func (o *FuzzyCompletionSuggesterOptions) MaxDeterminizedStates(max int) *FuzzyCompletionSuggesterOptions {
- o.maxDeterminizedStates = &max
- return o
-}
-
-// Source creates the JSON data.
-func (o *FuzzyCompletionSuggesterOptions) Source() (interface{}, error) {
- out := make(map[string]interface{})
-
- if o.editDistance != nil {
- out["fuzziness"] = o.editDistance
- }
- if o.transpositions != nil {
- out["transpositions"] = *o.transpositions
- }
- if o.minLength != nil {
- out["min_length"] = *o.minLength
- }
- if o.prefixLength != nil {
- out["prefix_length"] = *o.prefixLength
- }
- if o.unicodeAware != nil {
- out["unicode_aware"] = *o.unicodeAware
- }
- if o.maxDeterminizedStates != nil {
- out["max_determinized_states"] = *o.maxDeterminizedStates
- }
-
- return out, nil
-}
-
-// -- Regex options --
-
-// RegexCompletionSuggesterOptions represents the options for regex completion suggester.
-type RegexCompletionSuggesterOptions struct {
- flags interface{} // string or int
- maxDeterminizedStates *int
-}
-
-// NewRegexCompletionSuggesterOptions initializes a new RegexCompletionSuggesterOptions instance.
-func NewRegexCompletionSuggesterOptions() *RegexCompletionSuggesterOptions {
- return &RegexCompletionSuggesterOptions{}
-}
-
-// Flags represents internal regex flags. See https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-suggesters-completion.html#regex
-// for details.
-func (o *RegexCompletionSuggesterOptions) Flags(flags interface{}) *RegexCompletionSuggesterOptions {
- o.flags = flags
- return o
-}
-
-// MaxDeterminizedStates represents the maximum automaton states allowed for regex expansion.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-suggesters-completion.html#regex
-// for details.
-func (o *RegexCompletionSuggesterOptions) MaxDeterminizedStates(max int) *RegexCompletionSuggesterOptions {
- o.maxDeterminizedStates = &max
- return o
-}
-
-// Source creates the JSON data.
-func (o *RegexCompletionSuggesterOptions) Source() (interface{}, error) {
- out := make(map[string]interface{})
-
- if o.flags != nil {
- out["flags"] = o.flags
- }
- if o.maxDeterminizedStates != nil {
- out["max_determinized_states"] = *o.maxDeterminizedStates
- }
-
- return out, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_completion_test.go b/vendor/github.com/olivere/elastic/suggester_completion_test.go
deleted file mode 100644
index adbf58657..000000000
--- a/vendor/github.com/olivere/elastic/suggester_completion_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestCompletionSuggesterSource(t *testing.T) {
- s := NewCompletionSuggester("song-suggest").
- Text("n").
- Field("suggest")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"song-suggest":{"text":"n","completion":{"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompletionSuggesterPrefixSource(t *testing.T) {
- s := NewCompletionSuggester("song-suggest").
- Prefix("nir").
- Field("suggest")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"song-suggest":{"prefix":"nir","completion":{"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompletionSuggesterPrefixWithFuzzySource(t *testing.T) {
- s := NewCompletionSuggester("song-suggest").
- Prefix("nor").
- Field("suggest").
- FuzzyOptions(NewFuzzyCompletionSuggesterOptions().EditDistance(2))
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"song-suggest":{"prefix":"nor","completion":{"field":"suggest","fuzzy":{"fuzziness":2}}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompletionSuggesterRegexSource(t *testing.T) {
- s := NewCompletionSuggester("song-suggest").
- Regex("n[ever|i]r").
- Field("suggest")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"song-suggest":{"regex":"n[ever|i]r","completion":{"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestCompletionSuggesterSourceWithMultipleContexts(t *testing.T) {
- s := NewCompletionSuggester("song-suggest").
- Text("n").
- Field("suggest").
- ContextQueries(
- NewSuggesterCategoryQuery("artist", "Sting"),
- NewSuggesterCategoryQuery("label", "BMG"),
- )
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"song-suggest":{"text":"n","completion":{"contexts":{"artist":[{"context":"Sting"}],"label":[{"context":"BMG"}]},"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected %s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context.go b/vendor/github.com/olivere/elastic/suggester_context.go
deleted file mode 100644
index 12877c1a6..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "errors"
-
-// SuggesterContextQuery is used to define context information within
-// a suggestion request.
-type SuggesterContextQuery interface {
- Source() (interface{}, error)
-}
-
-// ContextSuggester is a fast suggester for e.g. type-ahead completion that supports filtering and boosting based on contexts.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/suggester-context.html
-// for more details.
-type ContextSuggester struct {
- Suggester
- name string
- prefix string
- field string
- size *int
- contextQueries []SuggesterContextQuery
-}
-
-// Creates a new context suggester.
-func NewContextSuggester(name string) *ContextSuggester {
- return &ContextSuggester{
- name: name,
- contextQueries: make([]SuggesterContextQuery, 0),
- }
-}
-
-func (q *ContextSuggester) Name() string {
- return q.name
-}
-
-func (q *ContextSuggester) Prefix(prefix string) *ContextSuggester {
- q.prefix = prefix
- return q
-}
-
-func (q *ContextSuggester) Field(field string) *ContextSuggester {
- q.field = field
- return q
-}
-
-func (q *ContextSuggester) Size(size int) *ContextSuggester {
- q.size = &size
- return q
-}
-
-func (q *ContextSuggester) ContextQuery(query SuggesterContextQuery) *ContextSuggester {
- q.contextQueries = append(q.contextQueries, query)
- return q
-}
-
-func (q *ContextSuggester) ContextQueries(queries ...SuggesterContextQuery) *ContextSuggester {
- q.contextQueries = append(q.contextQueries, queries...)
- return q
-}
-
-// contextSuggesterRequest is necessary because the order in which
-// the JSON elements are routed to Elasticsearch is relevant.
-// We got into trouble when using plain maps because the text element
-// needs to go before the completion element.
-type contextSuggesterRequest struct {
- Prefix string `json:"prefix"`
- Completion interface{} `json:"completion"`
-}
-
-// Creates the source for the context suggester.
-func (q *ContextSuggester) Source(includeName bool) (interface{}, error) {
- cs := &contextSuggesterRequest{}
-
- if q.prefix != "" {
- cs.Prefix = q.prefix
- }
-
- suggester := make(map[string]interface{})
- cs.Completion = suggester
-
- if q.field != "" {
- suggester["field"] = q.field
- }
- if q.size != nil {
- suggester["size"] = *q.size
- }
- switch len(q.contextQueries) {
- case 0:
- case 1:
- src, err := q.contextQueries[0].Source()
- if err != nil {
- return nil, err
- }
- suggester["contexts"] = src
- default:
- ctxq := make(map[string]interface{})
- for _, query := range q.contextQueries {
- src, err := query.Source()
- if err != nil {
- return nil, err
- }
- // Merge the dictionary into ctxq
- m, ok := src.(map[string]interface{})
- if !ok {
- return nil, errors.New("elastic: context query is not a map")
- }
- for k, v := range m {
- ctxq[k] = v
- }
- }
- suggester["contexts"] = ctxq
- }
-
- if !includeName {
- return cs, nil
- }
-
- source := make(map[string]interface{})
- source[q.name] = cs
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context_category.go b/vendor/github.com/olivere/elastic/suggester_context_category.go
deleted file mode 100644
index 9c50651fa..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context_category.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// -- SuggesterCategoryMapping --
-
-// SuggesterCategoryMapping provides a mapping for a category context in a suggester.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/suggester-context.html#_category_mapping.
-type SuggesterCategoryMapping struct {
- name string
- fieldName string
- defaultValues []string
-}
-
-// NewSuggesterCategoryMapping creates a new SuggesterCategoryMapping.
-func NewSuggesterCategoryMapping(name string) *SuggesterCategoryMapping {
- return &SuggesterCategoryMapping{
- name: name,
- defaultValues: make([]string, 0),
- }
-}
-
-func (q *SuggesterCategoryMapping) DefaultValues(values ...string) *SuggesterCategoryMapping {
- q.defaultValues = append(q.defaultValues, values...)
- return q
-}
-
-func (q *SuggesterCategoryMapping) FieldName(fieldName string) *SuggesterCategoryMapping {
- q.fieldName = fieldName
- return q
-}
-
-// Source returns a map that will be used to serialize the context query as JSON.
-func (q *SuggesterCategoryMapping) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- x := make(map[string]interface{})
- source[q.name] = x
-
- x["type"] = "category"
-
- switch len(q.defaultValues) {
- case 0:
- x["default"] = q.defaultValues
- case 1:
- x["default"] = q.defaultValues[0]
- default:
- x["default"] = q.defaultValues
- }
-
- if q.fieldName != "" {
- x["path"] = q.fieldName
- }
- return source, nil
-}
-
-// -- SuggesterCategoryQuery --
-
-// SuggesterCategoryQuery provides querying a category context in a suggester.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/suggester-context.html#_category_query.
-type SuggesterCategoryQuery struct {
- name string
- values map[string]*int
-}
-
-// NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
-func NewSuggesterCategoryQuery(name string, values ...string) *SuggesterCategoryQuery {
- q := &SuggesterCategoryQuery{
- name: name,
- values: make(map[string]*int),
- }
-
- if len(values) > 0 {
- q.Values(values...)
- }
- return q
-}
-
-func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery {
- q.values[val] = nil
- return q
-}
-
-func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery {
- q.values[val] = &boost
- return q
-}
-
-func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery {
- for _, val := range values {
- q.values[val] = nil
- }
- return q
-}
-
-// Source returns a map that will be used to serialize the context query as JSON.
-func (q *SuggesterCategoryQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- switch len(q.values) {
- case 0:
- source[q.name] = make([]string, 0)
- default:
- contexts := make([]interface{}, 0)
- for val, boost := range q.values {
- context := make(map[string]interface{})
- context["context"] = val
- if boost != nil {
- context["boost"] = *boost
- }
- contexts = append(contexts, context)
- }
- source[q.name] = contexts
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context_category_test.go b/vendor/github.com/olivere/elastic/suggester_context_category_test.go
deleted file mode 100644
index 46acd725e..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context_category_test.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSuggesterCategoryMapping(t *testing.T) {
- q := NewSuggesterCategoryMapping("color").DefaultValues("red")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"color":{"default":"red","type":"category"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSuggesterCategoryMappingWithTwoDefaultValues(t *testing.T) {
- q := NewSuggesterCategoryMapping("color").DefaultValues("red", "orange")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"color":{"default":["red","orange"],"type":"category"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSuggesterCategoryMappingWithFieldName(t *testing.T) {
- q := NewSuggesterCategoryMapping("color").
- DefaultValues("red", "orange").
- FieldName("color_field")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"color":{"default":["red","orange"],"path":"color_field","type":"category"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSuggesterCategoryQuery(t *testing.T) {
- q := NewSuggesterCategoryQuery("color", "red")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"color":[{"context":"red"}]}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSuggesterCategoryQueryWithTwoValues(t *testing.T) {
- q := NewSuggesterCategoryQuery("color", "red", "yellow")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expectedOutcomes := []string{
- `{"color":[{"context":"red"},{"context":"yellow"}]}`,
- `{"color":[{"context":"yellow"},{"context":"red"}]}`,
- }
- var match bool
- for _, expected := range expectedOutcomes {
- if got == expected {
- match = true
- break
- }
- }
- if !match {
- t.Errorf("expected any of %v\n,got:\n%s", expectedOutcomes, got)
- }
-}
-
-func TestSuggesterCategoryQueryWithBoost(t *testing.T) {
- q := NewSuggesterCategoryQuery("color", "red")
- q.ValueWithBoost("yellow", 4)
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expectedOutcomes := []string{
- `{"color":[{"context":"red"},{"boost":4,"context":"yellow"}]}`,
- `{"color":[{"boost":4,"context":"yellow"},{"context":"red"}]}`,
- }
- var match bool
- for _, expected := range expectedOutcomes {
- if got == expected {
- match = true
- break
- }
- }
- if !match {
- t.Errorf("expected any of %v\n,got:\n%v", expectedOutcomes, got)
- }
-}
-
-func TestSuggesterCategoryQueryWithoutBoost(t *testing.T) {
- q := NewSuggesterCategoryQuery("color", "red")
- q.Value("yellow")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expectedOutcomes := []string{
- `{"color":[{"context":"red"},{"context":"yellow"}]}`,
- `{"color":[{"context":"yellow"},{"context":"red"}]}`,
- }
- var match bool
- for _, expected := range expectedOutcomes {
- if got == expected {
- match = true
- break
- }
- }
- if !match {
- t.Errorf("expected any of %v\n,got:\n%s", expectedOutcomes, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context_geo.go b/vendor/github.com/olivere/elastic/suggester_context_geo.go
deleted file mode 100644
index 3fea63feb..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context_geo.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// -- SuggesterGeoMapping --
-
-// SuggesterGeoMapping provides a mapping for a geolocation context in a suggester.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/suggester-context.html#_geo_location_mapping.
-type SuggesterGeoMapping struct {
- name string
- defaultLocations []*GeoPoint
- precision []string
- neighbors *bool
- fieldName string
-}
-
-// NewSuggesterGeoMapping creates a new SuggesterGeoMapping.
-func NewSuggesterGeoMapping(name string) *SuggesterGeoMapping {
- return &SuggesterGeoMapping{
- name: name,
- }
-}
-
-func (q *SuggesterGeoMapping) DefaultLocations(locations ...*GeoPoint) *SuggesterGeoMapping {
- q.defaultLocations = append(q.defaultLocations, locations...)
- return q
-}
-
-func (q *SuggesterGeoMapping) Precision(precision ...string) *SuggesterGeoMapping {
- q.precision = append(q.precision, precision...)
- return q
-}
-
-func (q *SuggesterGeoMapping) Neighbors(neighbors bool) *SuggesterGeoMapping {
- q.neighbors = &neighbors
- return q
-}
-
-func (q *SuggesterGeoMapping) FieldName(fieldName string) *SuggesterGeoMapping {
- q.fieldName = fieldName
- return q
-}
-
-// Source returns a map that will be used to serialize the context query as JSON.
-func (q *SuggesterGeoMapping) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- x := make(map[string]interface{})
- source[q.name] = x
-
- x["type"] = "geo"
-
- if len(q.precision) > 0 {
- x["precision"] = q.precision
- }
- if q.neighbors != nil {
- x["neighbors"] = *q.neighbors
- }
-
- switch len(q.defaultLocations) {
- case 0:
- case 1:
- x["default"] = q.defaultLocations[0].Source()
- default:
- var arr []interface{}
- for _, p := range q.defaultLocations {
- arr = append(arr, p.Source())
- }
- x["default"] = arr
- }
-
- if q.fieldName != "" {
- x["path"] = q.fieldName
- }
- return source, nil
-}
-
-// -- SuggesterGeoQuery --
-
-// SuggesterGeoQuery provides querying a geolocation context in a suggester.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/suggester-context.html#_geo_location_query
-type SuggesterGeoQuery struct {
- name string
- location *GeoPoint
- precision []string
-}
-
-// NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
-func NewSuggesterGeoQuery(name string, location *GeoPoint) *SuggesterGeoQuery {
- return &SuggesterGeoQuery{
- name: name,
- location: location,
- precision: make([]string, 0),
- }
-}
-
-func (q *SuggesterGeoQuery) Precision(precision ...string) *SuggesterGeoQuery {
- q.precision = append(q.precision, precision...)
- return q
-}
-
-// Source returns a map that will be used to serialize the context query as JSON.
-func (q *SuggesterGeoQuery) Source() (interface{}, error) {
- source := make(map[string]interface{})
-
- if len(q.precision) == 0 {
- if q.location != nil {
- source[q.name] = q.location.Source()
- }
- } else {
- x := make(map[string]interface{})
- source[q.name] = x
-
- if q.location != nil {
- x["value"] = q.location.Source()
- }
-
- switch len(q.precision) {
- case 0:
- case 1:
- x["precision"] = q.precision[0]
- default:
- x["precision"] = q.precision
- }
- }
-
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context_geo_test.go b/vendor/github.com/olivere/elastic/suggester_context_geo_test.go
deleted file mode 100644
index b1ab2f495..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context_geo_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestSuggesterGeoMapping(t *testing.T) {
- q := NewSuggesterGeoMapping("location").
- Precision("1km", "5m").
- Neighbors(true).
- FieldName("pin").
- DefaultLocations(GeoPointFromLatLon(0.0, 0.0))
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"location":{"default":{"lat":0,"lon":0},"neighbors":true,"path":"pin","precision":["1km","5m"],"type":"geo"}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestSuggesterGeoQuery(t *testing.T) {
- q := NewSuggesterGeoQuery("location", GeoPointFromLatLon(11.5, 62.71)).Precision("1km")
- src, err := q.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"location":{"precision":"1km","value":{"lat":11.5,"lon":62.71}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_context_test.go b/vendor/github.com/olivere/elastic/suggester_context_test.go
deleted file mode 100644
index 045ccb2f4..000000000
--- a/vendor/github.com/olivere/elastic/suggester_context_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestContextSuggesterSource(t *testing.T) {
- s := NewContextSuggester("place_suggestion").
- Prefix("tim").
- Field("suggest")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"place_suggestion":{"prefix":"tim","completion":{"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestContextSuggesterSourceWithMultipleContexts(t *testing.T) {
- s := NewContextSuggester("place_suggestion").
- Prefix("tim").
- Field("suggest").
- ContextQueries(
- NewSuggesterCategoryQuery("place_type", "cafe", "restaurants"),
- )
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- // Due to the randomization of dictionary key, we could actually have two different valid expected outcomes
- expected := `{"place_suggestion":{"prefix":"tim","completion":{"contexts":{"place_type":[{"context":"cafe"},{"context":"restaurants"}]},"field":"suggest"}}}`
- if got != expected {
- expected := `{"place_suggestion":{"prefix":"tim","completion":{"contexts":{"place_type":[{"context":"restaurants"},{"context":"cafe"}]},"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected %s\n,got:\n%s", expected, got)
- }
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_phrase.go b/vendor/github.com/olivere/elastic/suggester_phrase.go
deleted file mode 100644
index 2f6b6a326..000000000
--- a/vendor/github.com/olivere/elastic/suggester_phrase.go
+++ /dev/null
@@ -1,546 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// PhraseSuggester provides an API to access word alternatives
-// on a per token basis within a certain string distance.
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-phrase.html.
-type PhraseSuggester struct {
- Suggester
- name string
- text string
- field string
- analyzer string
- size *int
- shardSize *int
- contextQueries []SuggesterContextQuery
-
- // fields specific to a phrase suggester
- maxErrors *float64
- separator *string
- realWordErrorLikelihood *float64
- confidence *float64
- generators map[string][]CandidateGenerator
- gramSize *int
- smoothingModel SmoothingModel
- forceUnigrams *bool
- tokenLimit *int
- preTag, postTag *string
- collateQuery *string
- collatePreference *string
- collateParams map[string]interface{}
- collatePrune *bool
-}
-
-// NewPhraseSuggester creates a new PhraseSuggester.
-func NewPhraseSuggester(name string) *PhraseSuggester {
- return &PhraseSuggester{
- name: name,
- collateParams: make(map[string]interface{}),
- }
-}
-
-func (q *PhraseSuggester) Name() string {
- return q.name
-}
-
-func (q *PhraseSuggester) Text(text string) *PhraseSuggester {
- q.text = text
- return q
-}
-
-func (q *PhraseSuggester) Field(field string) *PhraseSuggester {
- q.field = field
- return q
-}
-
-func (q *PhraseSuggester) Analyzer(analyzer string) *PhraseSuggester {
- q.analyzer = analyzer
- return q
-}
-
-func (q *PhraseSuggester) Size(size int) *PhraseSuggester {
- q.size = &size
- return q
-}
-
-func (q *PhraseSuggester) ShardSize(shardSize int) *PhraseSuggester {
- q.shardSize = &shardSize
- return q
-}
-
-func (q *PhraseSuggester) ContextQuery(query SuggesterContextQuery) *PhraseSuggester {
- q.contextQueries = append(q.contextQueries, query)
- return q
-}
-
-func (q *PhraseSuggester) ContextQueries(queries ...SuggesterContextQuery) *PhraseSuggester {
- q.contextQueries = append(q.contextQueries, queries...)
- return q
-}
-
-func (q *PhraseSuggester) GramSize(gramSize int) *PhraseSuggester {
- if gramSize >= 1 {
- q.gramSize = &gramSize
- }
- return q
-}
-
-func (q *PhraseSuggester) MaxErrors(maxErrors float64) *PhraseSuggester {
- q.maxErrors = &maxErrors
- return q
-}
-
-func (q *PhraseSuggester) Separator(separator string) *PhraseSuggester {
- q.separator = &separator
- return q
-}
-
-func (q *PhraseSuggester) RealWordErrorLikelihood(realWordErrorLikelihood float64) *PhraseSuggester {
- q.realWordErrorLikelihood = &realWordErrorLikelihood
- return q
-}
-
-func (q *PhraseSuggester) Confidence(confidence float64) *PhraseSuggester {
- q.confidence = &confidence
- return q
-}
-
-func (q *PhraseSuggester) CandidateGenerator(generator CandidateGenerator) *PhraseSuggester {
- if q.generators == nil {
- q.generators = make(map[string][]CandidateGenerator)
- }
- typ := generator.Type()
- if _, found := q.generators[typ]; !found {
- q.generators[typ] = make([]CandidateGenerator, 0)
- }
- q.generators[typ] = append(q.generators[typ], generator)
- return q
-}
-
-func (q *PhraseSuggester) CandidateGenerators(generators ...CandidateGenerator) *PhraseSuggester {
- for _, g := range generators {
- q = q.CandidateGenerator(g)
- }
- return q
-}
-
-func (q *PhraseSuggester) ClearCandidateGenerator() *PhraseSuggester {
- q.generators = nil
- return q
-}
-
-func (q *PhraseSuggester) ForceUnigrams(forceUnigrams bool) *PhraseSuggester {
- q.forceUnigrams = &forceUnigrams
- return q
-}
-
-func (q *PhraseSuggester) SmoothingModel(smoothingModel SmoothingModel) *PhraseSuggester {
- q.smoothingModel = smoothingModel
- return q
-}
-
-func (q *PhraseSuggester) TokenLimit(tokenLimit int) *PhraseSuggester {
- q.tokenLimit = &tokenLimit
- return q
-}
-
-func (q *PhraseSuggester) Highlight(preTag, postTag string) *PhraseSuggester {
- q.preTag = &preTag
- q.postTag = &postTag
- return q
-}
-
-func (q *PhraseSuggester) CollateQuery(collateQuery string) *PhraseSuggester {
- q.collateQuery = &collateQuery
- return q
-}
-
-func (q *PhraseSuggester) CollatePreference(collatePreference string) *PhraseSuggester {
- q.collatePreference = &collatePreference
- return q
-}
-
-func (q *PhraseSuggester) CollateParams(collateParams map[string]interface{}) *PhraseSuggester {
- q.collateParams = collateParams
- return q
-}
-
-func (q *PhraseSuggester) CollatePrune(collatePrune bool) *PhraseSuggester {
- q.collatePrune = &collatePrune
- return q
-}
-
-// phraseSuggesterRequest is necessary because the order in which
-// the JSON elements are routed to Elasticsearch is relevant.
-// We got into trouble when using plain maps because the text element
-// needs to go before the simple_phrase element.
-type phraseSuggesterRequest struct {
- Text string `json:"text"`
- Phrase interface{} `json:"phrase"`
-}
-
-// Source generates the source for the phrase suggester.
-func (q *PhraseSuggester) Source(includeName bool) (interface{}, error) {
- ps := &phraseSuggesterRequest{}
-
- if q.text != "" {
- ps.Text = q.text
- }
-
- suggester := make(map[string]interface{})
- ps.Phrase = suggester
-
- if q.analyzer != "" {
- suggester["analyzer"] = q.analyzer
- }
- if q.field != "" {
- suggester["field"] = q.field
- }
- if q.size != nil {
- suggester["size"] = *q.size
- }
- if q.shardSize != nil {
- suggester["shard_size"] = *q.shardSize
- }
- switch len(q.contextQueries) {
- case 0:
- case 1:
- src, err := q.contextQueries[0].Source()
- if err != nil {
- return nil, err
- }
- suggester["contexts"] = src
- default:
- var ctxq []interface{}
- for _, query := range q.contextQueries {
- src, err := query.Source()
- if err != nil {
- return nil, err
- }
- ctxq = append(ctxq, src)
- }
- suggester["contexts"] = ctxq
- }
-
- // Phase-specified parameters
- if q.realWordErrorLikelihood != nil {
- suggester["real_word_error_likelihood"] = *q.realWordErrorLikelihood
- }
- if q.confidence != nil {
- suggester["confidence"] = *q.confidence
- }
- if q.separator != nil {
- suggester["separator"] = *q.separator
- }
- if q.maxErrors != nil {
- suggester["max_errors"] = *q.maxErrors
- }
- if q.gramSize != nil {
- suggester["gram_size"] = *q.gramSize
- }
- if q.forceUnigrams != nil {
- suggester["force_unigrams"] = *q.forceUnigrams
- }
- if q.tokenLimit != nil {
- suggester["token_limit"] = *q.tokenLimit
- }
- if q.generators != nil && len(q.generators) > 0 {
- for typ, generators := range q.generators {
- var arr []interface{}
- for _, g := range generators {
- src, err := g.Source()
- if err != nil {
- return nil, err
- }
- arr = append(arr, src)
- }
- suggester[typ] = arr
- }
- }
- if q.smoothingModel != nil {
- src, err := q.smoothingModel.Source()
- if err != nil {
- return nil, err
- }
- x := make(map[string]interface{})
- x[q.smoothingModel.Type()] = src
- suggester["smoothing"] = x
- }
- if q.preTag != nil {
- hl := make(map[string]string)
- hl["pre_tag"] = *q.preTag
- if q.postTag != nil {
- hl["post_tag"] = *q.postTag
- }
- suggester["highlight"] = hl
- }
- if q.collateQuery != nil {
- collate := make(map[string]interface{})
- suggester["collate"] = collate
- if q.collateQuery != nil {
- collate["query"] = *q.collateQuery
- }
- if q.collatePreference != nil {
- collate["preference"] = *q.collatePreference
- }
- if len(q.collateParams) > 0 {
- collate["params"] = q.collateParams
- }
- if q.collatePrune != nil {
- collate["prune"] = *q.collatePrune
- }
- }
-
- if !includeName {
- return ps, nil
- }
-
- source := make(map[string]interface{})
- source[q.name] = ps
- return source, nil
-}
-
-// -- Smoothing models --
-
-type SmoothingModel interface {
- Type() string
- Source() (interface{}, error)
-}
-
-// StupidBackoffSmoothingModel implements a stupid backoff smoothing model.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-phrase.html#_smoothing_models
-// for details about smoothing models.
-type StupidBackoffSmoothingModel struct {
- discount float64
-}
-
-func NewStupidBackoffSmoothingModel(discount float64) *StupidBackoffSmoothingModel {
- return &StupidBackoffSmoothingModel{
- discount: discount,
- }
-}
-
-func (sm *StupidBackoffSmoothingModel) Type() string {
- return "stupid_backoff"
-}
-
-func (sm *StupidBackoffSmoothingModel) Source() (interface{}, error) {
- source := make(map[string]interface{})
- source["discount"] = sm.discount
- return source, nil
-}
-
-// --
-
-// LaplaceSmoothingModel implements a laplace smoothing model.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-phrase.html#_smoothing_models
-// for details about smoothing models.
-type LaplaceSmoothingModel struct {
- alpha float64
-}
-
-func NewLaplaceSmoothingModel(alpha float64) *LaplaceSmoothingModel {
- return &LaplaceSmoothingModel{
- alpha: alpha,
- }
-}
-
-func (sm *LaplaceSmoothingModel) Type() string {
- return "laplace"
-}
-
-func (sm *LaplaceSmoothingModel) Source() (interface{}, error) {
- source := make(map[string]interface{})
- source["alpha"] = sm.alpha
- return source, nil
-}
-
-// --
-
-// LinearInterpolationSmoothingModel implements a linear interpolation
-// smoothing model.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-phrase.html#_smoothing_models
-// for details about smoothing models.
-type LinearInterpolationSmoothingModel struct {
- trigramLamda float64
- bigramLambda float64
- unigramLambda float64
-}
-
-func NewLinearInterpolationSmoothingModel(trigramLamda, bigramLambda, unigramLambda float64) *LinearInterpolationSmoothingModel {
- return &LinearInterpolationSmoothingModel{
- trigramLamda: trigramLamda,
- bigramLambda: bigramLambda,
- unigramLambda: unigramLambda,
- }
-}
-
-func (sm *LinearInterpolationSmoothingModel) Type() string {
- return "linear_interpolation"
-}
-
-func (sm *LinearInterpolationSmoothingModel) Source() (interface{}, error) {
- source := make(map[string]interface{})
- source["trigram_lambda"] = sm.trigramLamda
- source["bigram_lambda"] = sm.bigramLambda
- source["unigram_lambda"] = sm.unigramLambda
- return source, nil
-}
-
-// -- CandidateGenerator --
-
-type CandidateGenerator interface {
- Type() string
- Source() (interface{}, error)
-}
-
-// DirectCandidateGenerator implements a direct candidate generator.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-phrase.html#_smoothing_models
-// for details about smoothing models.
-type DirectCandidateGenerator struct {
- field string
- preFilter *string
- postFilter *string
- suggestMode *string
- accuracy *float64
- size *int
- sort *string
- stringDistance *string
- maxEdits *int
- maxInspections *int
- maxTermFreq *float64
- prefixLength *int
- minWordLength *int
- minDocFreq *float64
-}
-
-func NewDirectCandidateGenerator(field string) *DirectCandidateGenerator {
- return &DirectCandidateGenerator{
- field: field,
- }
-}
-
-func (g *DirectCandidateGenerator) Type() string {
- return "direct_generator"
-}
-
-func (g *DirectCandidateGenerator) Field(field string) *DirectCandidateGenerator {
- g.field = field
- return g
-}
-
-func (g *DirectCandidateGenerator) PreFilter(preFilter string) *DirectCandidateGenerator {
- g.preFilter = &preFilter
- return g
-}
-
-func (g *DirectCandidateGenerator) PostFilter(postFilter string) *DirectCandidateGenerator {
- g.postFilter = &postFilter
- return g
-}
-
-func (g *DirectCandidateGenerator) SuggestMode(suggestMode string) *DirectCandidateGenerator {
- g.suggestMode = &suggestMode
- return g
-}
-
-func (g *DirectCandidateGenerator) Accuracy(accuracy float64) *DirectCandidateGenerator {
- g.accuracy = &accuracy
- return g
-}
-
-func (g *DirectCandidateGenerator) Size(size int) *DirectCandidateGenerator {
- g.size = &size
- return g
-}
-
-func (g *DirectCandidateGenerator) Sort(sort string) *DirectCandidateGenerator {
- g.sort = &sort
- return g
-}
-
-func (g *DirectCandidateGenerator) StringDistance(stringDistance string) *DirectCandidateGenerator {
- g.stringDistance = &stringDistance
- return g
-}
-
-func (g *DirectCandidateGenerator) MaxEdits(maxEdits int) *DirectCandidateGenerator {
- g.maxEdits = &maxEdits
- return g
-}
-
-func (g *DirectCandidateGenerator) MaxInspections(maxInspections int) *DirectCandidateGenerator {
- g.maxInspections = &maxInspections
- return g
-}
-
-func (g *DirectCandidateGenerator) MaxTermFreq(maxTermFreq float64) *DirectCandidateGenerator {
- g.maxTermFreq = &maxTermFreq
- return g
-}
-
-func (g *DirectCandidateGenerator) PrefixLength(prefixLength int) *DirectCandidateGenerator {
- g.prefixLength = &prefixLength
- return g
-}
-
-func (g *DirectCandidateGenerator) MinWordLength(minWordLength int) *DirectCandidateGenerator {
- g.minWordLength = &minWordLength
- return g
-}
-
-func (g *DirectCandidateGenerator) MinDocFreq(minDocFreq float64) *DirectCandidateGenerator {
- g.minDocFreq = &minDocFreq
- return g
-}
-
-func (g *DirectCandidateGenerator) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if g.field != "" {
- source["field"] = g.field
- }
- if g.suggestMode != nil {
- source["suggest_mode"] = *g.suggestMode
- }
- if g.accuracy != nil {
- source["accuracy"] = *g.accuracy
- }
- if g.size != nil {
- source["size"] = *g.size
- }
- if g.sort != nil {
- source["sort"] = *g.sort
- }
- if g.stringDistance != nil {
- source["string_distance"] = *g.stringDistance
- }
- if g.maxEdits != nil {
- source["max_edits"] = *g.maxEdits
- }
- if g.maxInspections != nil {
- source["max_inspections"] = *g.maxInspections
- }
- if g.maxTermFreq != nil {
- source["max_term_freq"] = *g.maxTermFreq
- }
- if g.prefixLength != nil {
- source["prefix_length"] = *g.prefixLength
- }
- if g.minWordLength != nil {
- source["min_word_length"] = *g.minWordLength
- }
- if g.minDocFreq != nil {
- source["min_doc_freq"] = *g.minDocFreq
- }
- if g.preFilter != nil {
- source["pre_filter"] = *g.preFilter
- }
- if g.postFilter != nil {
- source["post_filter"] = *g.postFilter
- }
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_phrase_test.go b/vendor/github.com/olivere/elastic/suggester_phrase_test.go
deleted file mode 100644
index 63dde686e..000000000
--- a/vendor/github.com/olivere/elastic/suggester_phrase_test.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestPhraseSuggesterSource(t *testing.T) {
- s := NewPhraseSuggester("name").
- Text("Xor the Got-Jewel").
- Analyzer("body").
- Field("bigram").
- Size(1).
- RealWordErrorLikelihood(0.95).
- MaxErrors(0.5).
- GramSize(2).
- Highlight("<em>", "</em>")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"name":{"text":"Xor the Got-Jewel","phrase":{"analyzer":"body","field":"bigram","gram_size":2,"highlight":{"post_tag":"\u003c/em\u003e","pre_tag":"\u003cem\u003e"},"max_errors":0.5,"real_word_error_likelihood":0.95,"size":1}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPhraseSuggesterSourceWithContextQuery(t *testing.T) {
- geomapQ := NewSuggesterGeoMapping("location").
- Precision("1km", "5m").
- Neighbors(true).
- FieldName("pin").
- DefaultLocations(GeoPointFromLatLon(0.0, 0.0))
-
- s := NewPhraseSuggester("name").
- Text("Xor the Got-Jewel").
- Analyzer("body").
- Field("bigram").
- Size(1).
- RealWordErrorLikelihood(0.95).
- MaxErrors(0.5).
- GramSize(2).
- Highlight("<em>", "</em>").
- ContextQuery(geomapQ)
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"name":{"text":"Xor the Got-Jewel","phrase":{"analyzer":"body","contexts":{"location":{"default":{"lat":0,"lon":0},"neighbors":true,"path":"pin","precision":["1km","5m"],"type":"geo"}},"field":"bigram","gram_size":2,"highlight":{"post_tag":"\u003c/em\u003e","pre_tag":"\u003cem\u003e"},"max_errors":0.5,"real_word_error_likelihood":0.95,"size":1}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPhraseSuggesterComplexSource(t *testing.T) {
- g1 := NewDirectCandidateGenerator("body").
- SuggestMode("always").
- MinWordLength(1)
-
- g2 := NewDirectCandidateGenerator("reverse").
- SuggestMode("always").
- MinWordLength(1).
- PreFilter("reverse").
- PostFilter("reverse")
-
- s := NewPhraseSuggester("simple_phrase").
- Text("Xor the Got-Jewel").
- Analyzer("body").
- Field("bigram").
- Size(4).
- RealWordErrorLikelihood(0.95).
- Confidence(2.0).
- GramSize(2).
- CandidateGenerators(g1, g2).
- CollateQuery(`"match":{"{{field_name}}" : "{{suggestion}}"}`).
- CollateParams(map[string]interface{}{"field_name": "title"}).
- CollatePreference("_primary").
- CollatePrune(true)
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"simple_phrase":{"text":"Xor the Got-Jewel","phrase":{"analyzer":"body","collate":{"params":{"field_name":"title"},"preference":"_primary","prune":true,"query":"\"match\":{\"{{field_name}}\" : \"{{suggestion}}\"}"},"confidence":2,"direct_generator":[{"field":"body","min_word_length":1,"suggest_mode":"always"},{"field":"reverse","min_word_length":1,"post_filter":"reverse","pre_filter":"reverse","suggest_mode":"always"}],"field":"bigram","gram_size":2,"real_word_error_likelihood":0.95,"size":4}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestPhraseStupidBackoffSmoothingModel(t *testing.T) {
- s := NewStupidBackoffSmoothingModel(0.42)
- src, err := s.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- // The source does NOT include the smoothing model type!
- expected := `{"discount":0.42}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
- if s.Type() != "stupid_backoff" {
- t.Errorf("expected %q, got: %q", "stupid_backoff", s.Type())
- }
-}
-
-func TestPhraseLaplaceSmoothingModel(t *testing.T) {
- s := NewLaplaceSmoothingModel(0.63)
- src, err := s.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- // The source does NOT include the smoothing model type!
- expected := `{"alpha":0.63}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
- if s.Type() != "laplace" {
- t.Errorf("expected %q, got: %q", "laplace", s.Type())
- }
-}
-
-func TestLinearInterpolationSmoothingModel(t *testing.T) {
- s := NewLinearInterpolationSmoothingModel(0.3, 0.2, 0.05)
- src, err := s.Source()
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- // The source does NOT include the smoothing model type!
- expected := `{"bigram_lambda":0.2,"trigram_lambda":0.3,"unigram_lambda":0.05}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
- if s.Type() != "linear_interpolation" {
- t.Errorf("expected %q, got: %q", "linear_interpolation", s.Type())
- }
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_term.go b/vendor/github.com/olivere/elastic/suggester_term.go
deleted file mode 100644
index 69e1531f6..000000000
--- a/vendor/github.com/olivere/elastic/suggester_term.go
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-// TermSuggester suggests terms based on edit distance.
-// For more details, see
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-suggesters-term.html.
-type TermSuggester struct {
- Suggester
- name string
- text string
- field string
- analyzer string
- size *int
- shardSize *int
- contextQueries []SuggesterContextQuery
-
- // fields specific to term suggester
- suggestMode string
- accuracy *float64
- sort string
- stringDistance string
- maxEdits *int
- maxInspections *int
- maxTermFreq *float64
- prefixLength *int
- minWordLength *int
- minDocFreq *float64
-}
-
-// NewTermSuggester creates a new TermSuggester.
-func NewTermSuggester(name string) *TermSuggester {
- return &TermSuggester{
- name: name,
- }
-}
-
-func (q *TermSuggester) Name() string {
- return q.name
-}
-
-func (q *TermSuggester) Text(text string) *TermSuggester {
- q.text = text
- return q
-}
-
-func (q *TermSuggester) Field(field string) *TermSuggester {
- q.field = field
- return q
-}
-
-func (q *TermSuggester) Analyzer(analyzer string) *TermSuggester {
- q.analyzer = analyzer
- return q
-}
-
-func (q *TermSuggester) Size(size int) *TermSuggester {
- q.size = &size
- return q
-}
-
-func (q *TermSuggester) ShardSize(shardSize int) *TermSuggester {
- q.shardSize = &shardSize
- return q
-}
-
-func (q *TermSuggester) ContextQuery(query SuggesterContextQuery) *TermSuggester {
- q.contextQueries = append(q.contextQueries, query)
- return q
-}
-
-func (q *TermSuggester) ContextQueries(queries ...SuggesterContextQuery) *TermSuggester {
- q.contextQueries = append(q.contextQueries, queries...)
- return q
-}
-
-func (q *TermSuggester) SuggestMode(suggestMode string) *TermSuggester {
- q.suggestMode = suggestMode
- return q
-}
-
-func (q *TermSuggester) Accuracy(accuracy float64) *TermSuggester {
- q.accuracy = &accuracy
- return q
-}
-
-func (q *TermSuggester) Sort(sort string) *TermSuggester {
- q.sort = sort
- return q
-}
-
-func (q *TermSuggester) StringDistance(stringDistance string) *TermSuggester {
- q.stringDistance = stringDistance
- return q
-}
-
-func (q *TermSuggester) MaxEdits(maxEdits int) *TermSuggester {
- q.maxEdits = &maxEdits
- return q
-}
-
-func (q *TermSuggester) MaxInspections(maxInspections int) *TermSuggester {
- q.maxInspections = &maxInspections
- return q
-}
-
-func (q *TermSuggester) MaxTermFreq(maxTermFreq float64) *TermSuggester {
- q.maxTermFreq = &maxTermFreq
- return q
-}
-
-func (q *TermSuggester) PrefixLength(prefixLength int) *TermSuggester {
- q.prefixLength = &prefixLength
- return q
-}
-
-func (q *TermSuggester) MinWordLength(minWordLength int) *TermSuggester {
- q.minWordLength = &minWordLength
- return q
-}
-
-func (q *TermSuggester) MinDocFreq(minDocFreq float64) *TermSuggester {
- q.minDocFreq = &minDocFreq
- return q
-}
-
-// termSuggesterRequest is necessary because the order in which
-// the JSON elements are routed to Elasticsearch is relevant.
-// We got into trouble when using plain maps because the text element
-// needs to go before the term element.
-type termSuggesterRequest struct {
- Text string `json:"text"`
- Term interface{} `json:"term"`
-}
-
-// Source generates the source for the term suggester.
-func (q *TermSuggester) Source(includeName bool) (interface{}, error) {
- // "suggest" : {
- // "my-suggest-1" : {
- // "text" : "the amsterdma meetpu",
- // "term" : {
- // "field" : "body"
- // }
- // },
- // "my-suggest-2" : {
- // "text" : "the rottredam meetpu",
- // "term" : {
- // "field" : "title",
- // }
- // }
- // }
- ts := &termSuggesterRequest{}
- if q.text != "" {
- ts.Text = q.text
- }
-
- suggester := make(map[string]interface{})
- ts.Term = suggester
-
- if q.analyzer != "" {
- suggester["analyzer"] = q.analyzer
- }
- if q.field != "" {
- suggester["field"] = q.field
- }
- if q.size != nil {
- suggester["size"] = *q.size
- }
- if q.shardSize != nil {
- suggester["shard_size"] = *q.shardSize
- }
- switch len(q.contextQueries) {
- case 0:
- case 1:
- src, err := q.contextQueries[0].Source()
- if err != nil {
- return nil, err
- }
- suggester["contexts"] = src
- default:
- ctxq := make([]interface{}, len(q.contextQueries))
- for i, query := range q.contextQueries {
- src, err := query.Source()
- if err != nil {
- return nil, err
- }
- ctxq[i] = src
- }
- suggester["contexts"] = ctxq
- }
-
- // Specific to term suggester
- if q.suggestMode != "" {
- suggester["suggest_mode"] = q.suggestMode
- }
- if q.accuracy != nil {
- suggester["accuracy"] = *q.accuracy
- }
- if q.sort != "" {
- suggester["sort"] = q.sort
- }
- if q.stringDistance != "" {
- suggester["string_distance"] = q.stringDistance
- }
- if q.maxEdits != nil {
- suggester["max_edits"] = *q.maxEdits
- }
- if q.maxInspections != nil {
- suggester["max_inspections"] = *q.maxInspections
- }
- if q.maxTermFreq != nil {
- suggester["max_term_freq"] = *q.maxTermFreq
- }
- if q.prefixLength != nil {
- suggester["prefix_length"] = *q.prefixLength
- }
- if q.minWordLength != nil {
- suggester["min_word_len"] = *q.minWordLength
- }
- if q.minDocFreq != nil {
- suggester["min_doc_freq"] = *q.minDocFreq
- }
-
- if !includeName {
- return ts, nil
- }
-
- source := make(map[string]interface{})
- source[q.name] = ts
- return source, nil
-}
diff --git a/vendor/github.com/olivere/elastic/suggester_term_test.go b/vendor/github.com/olivere/elastic/suggester_term_test.go
deleted file mode 100644
index d3250f69a..000000000
--- a/vendor/github.com/olivere/elastic/suggester_term_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "encoding/json"
- "testing"
-)
-
-func TestTermSuggesterSource(t *testing.T) {
- s := NewTermSuggester("name").
- Text("n").
- Field("suggest")
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"name":{"text":"n","term":{"field":"suggest"}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
-
-func TestTermSuggesterWithPrefixLengthSource(t *testing.T) {
- s := NewTermSuggester("name").
- Text("n").
- Field("suggest").
- PrefixLength(0)
- src, err := s.Source(true)
- if err != nil {
- t.Fatal(err)
- }
- data, err := json.Marshal(src)
- if err != nil {
- t.Fatalf("marshaling to JSON failed: %v", err)
- }
- got := string(data)
- expected := `{"name":{"text":"n","term":{"field":"suggest","prefix_length":0}}}`
- if got != expected {
- t.Errorf("expected\n%s\n,got:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/tasks_cancel.go b/vendor/github.com/olivere/elastic/tasks_cancel.go
deleted file mode 100644
index 84f8aec35..000000000
--- a/vendor/github.com/olivere/elastic/tasks_cancel.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// TasksCancelService can cancel long-running tasks.
-// It is supported as of Elasticsearch 2.3.0.
-//
-// See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/tasks-cancel.html
-// for details.
-type TasksCancelService struct {
- client *Client
- pretty bool
- taskId *int64
- actions []string
- nodeId []string
- parentNode string
- parentTask *int64
-}
-
-// NewTasksCancelService creates a new TasksCancelService.
-func NewTasksCancelService(client *Client) *TasksCancelService {
- return &TasksCancelService{
- client: client,
- actions: make([]string, 0),
- nodeId: make([]string, 0),
- }
-}
-
-// TaskId specifies the task to cancel. Set to -1 to cancel all tasks.
-func (s *TasksCancelService) TaskId(taskId int64) *TasksCancelService {
- s.taskId = &taskId
- return s
-}
-
-// Actions is a list of actions that should be cancelled. Leave empty to cancel all.
-func (s *TasksCancelService) Actions(actions []string) *TasksCancelService {
- s.actions = actions
- return s
-}
-
-// NodeId is a list of node IDs or names to limit the returned information;
-// use `_local` to return information from the node you're connecting to,
-// leave empty to get information from all nodes.
-func (s *TasksCancelService) NodeId(nodeId []string) *TasksCancelService {
- s.nodeId = nodeId
- return s
-}
-
-// ParentNode specifies to cancel tasks with specified parent node.
-func (s *TasksCancelService) ParentNode(parentNode string) *TasksCancelService {
- s.parentNode = parentNode
- return s
-}
-
-// ParentTask specifies to cancel tasks with specified parent task id.
-// Set to -1 to cancel all.
-func (s *TasksCancelService) ParentTask(parentTask int64) *TasksCancelService {
- s.parentTask = &parentTask
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *TasksCancelService) Pretty(pretty bool) *TasksCancelService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *TasksCancelService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if s.taskId != nil {
- path, err = uritemplates.Expand("/_tasks/{task_id}/_cancel", map[string]string{
- "task_id": fmt.Sprintf("%d", *s.taskId),
- })
- } else {
- path = "/_tasks/_cancel"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.actions) > 0 {
- params.Set("actions", strings.Join(s.actions, ","))
- }
- if len(s.nodeId) > 0 {
- params.Set("node_id", strings.Join(s.nodeId, ","))
- }
- if s.parentNode != "" {
- params.Set("parent_node", s.parentNode)
- }
- if s.parentTask != nil {
- params.Set("parent_task", fmt.Sprintf("%v", *s.parentTask))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *TasksCancelService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *TasksCancelService) Do(ctx context.Context) (*TasksListResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(TasksListResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
diff --git a/vendor/github.com/olivere/elastic/tasks_cancel_test.go b/vendor/github.com/olivere/elastic/tasks_cancel_test.go
deleted file mode 100644
index c9d863394..000000000
--- a/vendor/github.com/olivere/elastic/tasks_cancel_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import "testing"
-
-func TestTasksCancelBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- // Cancel all
- got, _, err := client.TasksCancel().buildURL()
- if err != nil {
- t.Fatal(err)
- }
- want := "/_tasks/_cancel"
- if got != want {
- t.Errorf("want %q; got %q", want, got)
- }
-
- // Cancel specific task
- got, _, err = client.TasksCancel().TaskId(42).buildURL()
- if err != nil {
- t.Fatal(err)
- }
- want = "/_tasks/42/_cancel"
- if got != want {
- t.Errorf("want %q; got %q", want, got)
- }
-}
-
-/*
-func TestTasksCancel(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Tasks Management API yet", esversion)
- }
- res, err := client.TasksCancel("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("response is nil")
- }
-}
-*/
diff --git a/vendor/github.com/olivere/elastic/tasks_get_task.go b/vendor/github.com/olivere/elastic/tasks_get_task.go
deleted file mode 100644
index 5f63726e4..000000000
--- a/vendor/github.com/olivere/elastic/tasks_get_task.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// TasksGetTaskService retrieves the state of a task in the cluster. It is part of the Task Management API
-// documented at http://www.elastic.co/guide/en/elasticsearch/reference/5.2/tasks-list.html.
-//
-// It is supported as of Elasticsearch 2.3.0.
-type TasksGetTaskService struct {
- client *Client
- pretty bool
- taskId string
- waitForCompletion *bool
-}
-
-// NewTasksGetTaskService creates a new TasksGetTaskService.
-func NewTasksGetTaskService(client *Client) *TasksGetTaskService {
- return &TasksGetTaskService{
- client: client,
- }
-}
-
-// TaskId indicates to return the task with specified id.
-func (s *TasksGetTaskService) TaskId(taskId string) *TasksGetTaskService {
- s.taskId = taskId
- return s
-}
-
-// WaitForCompletion indicates whether to wait for the matching tasks
-// to complete (default: false).
-func (s *TasksGetTaskService) WaitForCompletion(waitForCompletion bool) *TasksGetTaskService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *TasksGetTaskService) Pretty(pretty bool) *TasksGetTaskService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *TasksGetTaskService) buildURL() (string, url.Values, error) {
- // Build URL
- path, err := uritemplates.Expand("/_tasks/{task_id}", map[string]string{
- "task_id": s.taskId,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "1")
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *TasksGetTaskService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *TasksGetTaskService) Do(ctx context.Context) (*TasksGetTaskResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(TasksGetTaskResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-type TasksGetTaskResponse struct {
- Completed bool `json:"completed"`
- Task *TaskInfo `json:"task,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/tasks_get_task_test.go b/vendor/github.com/olivere/elastic/tasks_get_task_test.go
deleted file mode 100644
index a4da49c74..000000000
--- a/vendor/github.com/olivere/elastic/tasks_get_task_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "testing"
-)
-
-func TestTasksGetTaskBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- // Get specific task
- got, _, err := client.TasksGetTask().TaskId("123").buildURL()
- if err != nil {
- t.Fatal(err)
- }
- want := "/_tasks/123"
- if got != want {
- t.Errorf("want %q; got %q", want, got)
- }
-}
-
-/*
-func TestTasksGetTask(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t)
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Tasks Management API yet", esversion)
- }
- res, err := client.TasksGetTask().TaskId("123").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("response is nil")
- }
-}
-*/
diff --git a/vendor/github.com/olivere/elastic/tasks_list.go b/vendor/github.com/olivere/elastic/tasks_list.go
deleted file mode 100644
index 54299d961..000000000
--- a/vendor/github.com/olivere/elastic/tasks_list.go
+++ /dev/null
@@ -1,231 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// TasksListService retrieves the list of currently executing tasks
-// on one ore more nodes in the cluster. It is part of the Task Management API
-// documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/tasks.html.
-//
-// It is supported as of Elasticsearch 2.3.0.
-type TasksListService struct {
- client *Client
- pretty bool
- taskId []string
- actions []string
- detailed *bool
- nodeId []string
- parentNode string
- parentTaskId *string
- waitForCompletion *bool
- groupBy string
-}
-
-// NewTasksListService creates a new TasksListService.
-func NewTasksListService(client *Client) *TasksListService {
- return &TasksListService{
- client: client,
- }
-}
-
-// TaskId indicates to returns the task(s) with specified id(s).
-func (s *TasksListService) TaskId(taskId ...string) *TasksListService {
- s.taskId = append(s.taskId, taskId...)
- return s
-}
-
-// Actions is a list of actions that should be returned. Leave empty to return all.
-func (s *TasksListService) Actions(actions ...string) *TasksListService {
- s.actions = append(s.actions, actions...)
- return s
-}
-
-// Detailed indicates whether to return detailed task information (default: false).
-func (s *TasksListService) Detailed(detailed bool) *TasksListService {
- s.detailed = &detailed
- return s
-}
-
-// NodeId is a list of node IDs or names to limit the returned information;
-// use `_local` to return information from the node you're connecting to,
-// leave empty to get information from all nodes.
-func (s *TasksListService) NodeId(nodeId ...string) *TasksListService {
- s.nodeId = append(s.nodeId, nodeId...)
- return s
-}
-
-// ParentNode returns tasks with specified parent node.
-func (s *TasksListService) ParentNode(parentNode string) *TasksListService {
- s.parentNode = parentNode
- return s
-}
-
-// ParentTaskId returns tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
-func (s *TasksListService) ParentTaskId(parentTaskId string) *TasksListService {
- s.parentTaskId = &parentTaskId
- return s
-}
-
-// WaitForCompletion indicates whether to wait for the matching tasks
-// to complete (default: false).
-func (s *TasksListService) WaitForCompletion(waitForCompletion bool) *TasksListService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// GroupBy groups tasks by nodes or parent/child relationships.
-// As of now, it can either be "nodes" (default) or "parents".
-func (s *TasksListService) GroupBy(groupBy string) *TasksListService {
- s.groupBy = groupBy
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *TasksListService) Pretty(pretty bool) *TasksListService {
- s.pretty = pretty
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *TasksListService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.taskId) > 0 {
- path, err = uritemplates.Expand("/_tasks/{task_id}", map[string]string{
- "task_id": strings.Join(s.taskId, ","),
- })
- } else {
- path = "/_tasks"
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.actions) > 0 {
- params.Set("actions", strings.Join(s.actions, ","))
- }
- if s.detailed != nil {
- params.Set("detailed", fmt.Sprintf("%v", *s.detailed))
- }
- if len(s.nodeId) > 0 {
- params.Set("node_id", strings.Join(s.nodeId, ","))
- }
- if s.parentNode != "" {
- params.Set("parent_node", s.parentNode)
- }
- if s.parentTaskId != nil {
- params.Set("parent_task_id", *s.parentTaskId)
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- if s.groupBy != "" {
- params.Set("group_by", s.groupBy)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *TasksListService) Validate() error {
- return nil
-}
-
-// Do executes the operation.
-func (s *TasksListService) Do(ctx context.Context) (*TasksListResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(TasksListResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// TasksListResponse is the response of TasksListService.Do.
-type TasksListResponse struct {
- TaskFailures []*TaskOperationFailure `json:"task_failures"`
- NodeFailures []*FailedNodeException `json:"node_failures"`
- // Nodes returns the tasks per node. The key is the node id.
- Nodes map[string]*DiscoveryNode `json:"nodes"`
-}
-
-type TaskOperationFailure struct {
- TaskId int64 `json:"task_id"` // this is a long in the Java source
- NodeId string `json:"node_id"`
- Status string `json:"status"`
- Reason *ErrorDetails `json:"reason"`
-}
-
-type FailedNodeException struct {
- *ErrorDetails
- NodeId string `json:"node_id"`
-}
-
-type DiscoveryNode struct {
- Name string `json:"name"`
- TransportAddress string `json:"transport_address"`
- Host string `json:"host"`
- IP string `json:"ip"`
- Roles []string `json:"roles"` // "master", "data", or "ingest"
- Attributes map[string]interface{} `json:"attributes"`
- // Tasks returns the tasks by its id (as a string).
- Tasks map[string]*TaskInfo `json:"tasks"`
-}
-
-// TaskInfo represents information about a currently running task.
-type TaskInfo struct {
- Node string `json:"node"`
- Id int64 `json:"id"` // the task id (yes, this is a long in the Java source)
- Type string `json:"type"`
- Action string `json:"action"`
- Status interface{} `json:"status"` // has separate implementations of Task.Status in Java for reindexing, replication, and "RawTaskStatus"
- Description interface{} `json:"description"` // same as Status
- StartTime string `json:"start_time"`
- StartTimeInMillis int64 `json:"start_time_in_millis"`
- RunningTime string `json:"running_time"`
- RunningTimeInNanos int64 `json:"running_time_in_nanos"`
- Cancellable bool `json:"cancellable"`
- ParentTaskId string `json:"parent_task_id"` // like "YxJnVYjwSBm_AUbzddTajQ:12356"
-}
-
-// StartTaskResult is used in cases where a task gets started asynchronously and
-// the operation simply returnes a TaskID to watch for via the Task Management API.
-type StartTaskResult struct {
- TaskId string `json:"task"`
-}
diff --git a/vendor/github.com/olivere/elastic/tasks_list_test.go b/vendor/github.com/olivere/elastic/tasks_list_test.go
deleted file mode 100644
index 9ecabcd68..000000000
--- a/vendor/github.com/olivere/elastic/tasks_list_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
-)
-
-func TestTasksListBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- TaskId []string
- Expected string
- }{
- {
- []string{},
- "/_tasks",
- },
- {
- []string{"42"},
- "/_tasks/42",
- },
- {
- []string{"42", "37"},
- "/_tasks/42%2C37",
- },
- }
-
- for i, test := range tests {
- path, _, err := client.TasksList().TaskId(test.TaskId...).buildURL()
- if err != nil {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
-}
-
-func TestTasksList(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support Tasks Management API yet", esversion)
- }
-
- res, err := client.TasksList().Pretty(true).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("response is nil")
- }
- if len(res.Nodes) == 0 {
- t.Fatalf("expected at least 1 node; got: %d", len(res.Nodes))
- }
-}
diff --git a/vendor/github.com/olivere/elastic/termvectors.go b/vendor/github.com/olivere/elastic/termvectors.go
deleted file mode 100644
index 5943ad14f..000000000
--- a/vendor/github.com/olivere/elastic/termvectors.go
+++ /dev/null
@@ -1,464 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// TermvectorsService returns information and statistics on terms in the
-// fields of a particular document. The document could be stored in the
-// index or artificially provided by the user.
-//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-termvectors.html
-// for documentation.
-type TermvectorsService struct {
- client *Client
- pretty bool
- id string
- index string
- typ string
- dfs *bool
- doc interface{}
- fieldStatistics *bool
- fields []string
- filter *TermvectorsFilterSettings
- perFieldAnalyzer map[string]string
- offsets *bool
- parent string
- payloads *bool
- positions *bool
- preference string
- realtime *bool
- routing string
- termStatistics *bool
- version interface{}
- versionType string
- bodyJson interface{}
- bodyString string
-}
-
-// NewTermvectorsService creates a new TermvectorsService.
-func NewTermvectorsService(client *Client) *TermvectorsService {
- return &TermvectorsService{
- client: client,
- }
-}
-
-// Index in which the document resides.
-func (s *TermvectorsService) Index(index string) *TermvectorsService {
- s.index = index
- return s
-}
-
-// Type of the document.
-func (s *TermvectorsService) Type(typ string) *TermvectorsService {
- s.typ = typ
- return s
-}
-
-// Id of the document.
-func (s *TermvectorsService) Id(id string) *TermvectorsService {
- s.id = id
- return s
-}
-
-// Dfs specifies if distributed frequencies should be returned instead
-// shard frequencies.
-func (s *TermvectorsService) Dfs(dfs bool) *TermvectorsService {
- s.dfs = &dfs
- return s
-}
-
-// Doc is the document to analyze.
-func (s *TermvectorsService) Doc(doc interface{}) *TermvectorsService {
- s.doc = doc
- return s
-}
-
-// FieldStatistics specifies if document count, sum of document frequencies
-// and sum of total term frequencies should be returned.
-func (s *TermvectorsService) FieldStatistics(fieldStatistics bool) *TermvectorsService {
- s.fieldStatistics = &fieldStatistics
- return s
-}
-
-// Fields a list of fields to return.
-func (s *TermvectorsService) Fields(fields ...string) *TermvectorsService {
- if s.fields == nil {
- s.fields = make([]string, 0)
- }
- s.fields = append(s.fields, fields...)
- return s
-}
-
-// Filter adds terms filter settings.
-func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService {
- s.filter = filter
- return s
-}
-
-// PerFieldAnalyzer allows to specify a different analyzer than the one
-// at the field.
-func (s *TermvectorsService) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *TermvectorsService {
- s.perFieldAnalyzer = perFieldAnalyzer
- return s
-}
-
-// Offsets specifies if term offsets should be returned.
-func (s *TermvectorsService) Offsets(offsets bool) *TermvectorsService {
- s.offsets = &offsets
- return s
-}
-
-// Parent id of documents.
-func (s *TermvectorsService) Parent(parent string) *TermvectorsService {
- s.parent = parent
- return s
-}
-
-// Payloads specifies if term payloads should be returned.
-func (s *TermvectorsService) Payloads(payloads bool) *TermvectorsService {
- s.payloads = &payloads
- return s
-}
-
-// Positions specifies if term positions should be returned.
-func (s *TermvectorsService) Positions(positions bool) *TermvectorsService {
- s.positions = &positions
- return s
-}
-
-// Preference specify the node or shard the operation
-// should be performed on (default: random).
-func (s *TermvectorsService) Preference(preference string) *TermvectorsService {
- s.preference = preference
- return s
-}
-
-// Realtime specifies if request is real-time as opposed to
-// near-real-time (default: true).
-func (s *TermvectorsService) Realtime(realtime bool) *TermvectorsService {
- s.realtime = &realtime
- return s
-}
-
-// Routing is a specific routing value.
-func (s *TermvectorsService) Routing(routing string) *TermvectorsService {
- s.routing = routing
- return s
-}
-
-// TermStatistics specifies if total term frequency and document frequency
-// should be returned.
-func (s *TermvectorsService) TermStatistics(termStatistics bool) *TermvectorsService {
- s.termStatistics = &termStatistics
- return s
-}
-
-// Version an explicit version number for concurrency control.
-func (s *TermvectorsService) Version(version interface{}) *TermvectorsService {
- s.version = version
- return s
-}
-
-// VersionType specifies a version type ("internal", "external", or "external_gte").
-func (s *TermvectorsService) VersionType(versionType string) *TermvectorsService {
- s.versionType = versionType
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *TermvectorsService) Pretty(pretty bool) *TermvectorsService {
- s.pretty = pretty
- return s
-}
-
-// BodyJson defines the body parameters. See documentation.
-func (s *TermvectorsService) BodyJson(body interface{}) *TermvectorsService {
- s.bodyJson = body
- return s
-}
-
-// BodyString defines the body parameters as a string. See documentation.
-func (s *TermvectorsService) BodyString(body string) *TermvectorsService {
- s.bodyString = body
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *TermvectorsService) buildURL() (string, url.Values, error) {
- var pathParam = map[string]string{
- "index": s.index,
- "type": s.typ,
- }
- var path string
- var err error
-
- // Build URL
- if s.id != "" {
- pathParam["id"] = s.id
- path, err = uritemplates.Expand("/{index}/{type}/{id}/_termvectors", pathParam)
- } else {
- path, err = uritemplates.Expand("/{index}/{type}/_termvectors", pathParam)
- }
-
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if s.dfs != nil {
- params.Set("dfs", fmt.Sprintf("%v", *s.dfs))
- }
- if s.fieldStatistics != nil {
- params.Set("field_statistics", fmt.Sprintf("%v", *s.fieldStatistics))
- }
- if len(s.fields) > 0 {
- params.Set("fields", strings.Join(s.fields, ","))
- }
- if s.offsets != nil {
- params.Set("offsets", fmt.Sprintf("%v", *s.offsets))
- }
- if s.parent != "" {
- params.Set("parent", s.parent)
- }
- if s.payloads != nil {
- params.Set("payloads", fmt.Sprintf("%v", *s.payloads))
- }
- if s.positions != nil {
- params.Set("positions", fmt.Sprintf("%v", *s.positions))
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.realtime != nil {
- params.Set("realtime", fmt.Sprintf("%v", *s.realtime))
- }
- if s.routing != "" {
- params.Set("routing", s.routing)
- }
- if s.termStatistics != nil {
- params.Set("term_statistics", fmt.Sprintf("%v", *s.termStatistics))
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", s.version))
- }
- if s.versionType != "" {
- params.Set("version_type", s.versionType)
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *TermvectorsService) Validate() error {
- var invalid []string
- if s.index == "" {
- invalid = append(invalid, "Index")
- }
- if s.typ == "" {
- invalid = append(invalid, "Type")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// Do executes the operation.
-func (s *TermvectorsService) Do(ctx context.Context) (*TermvectorsResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- var body interface{}
- if s.bodyJson != nil {
- body = s.bodyJson
- } else if s.bodyString != "" {
- body = s.bodyString
- } else {
- data := make(map[string]interface{})
- if s.doc != nil {
- data["doc"] = s.doc
- }
- if len(s.perFieldAnalyzer) > 0 {
- data["per_field_analyzer"] = s.perFieldAnalyzer
- }
- if s.filter != nil {
- src, err := s.filter.Source()
- if err != nil {
- return nil, err
- }
- data["filter"] = src
- }
- if len(data) > 0 {
- body = data
- }
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "GET",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response
- ret := new(TermvectorsResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// -- Filter settings --
-
-// TermvectorsFilterSettings adds additional filters to a Termsvector request.
-// It allows to filter terms based on their tf-idf scores.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-termvectors.html#_terms_filtering
-// for more information.
-type TermvectorsFilterSettings struct {
- maxNumTerms *int64
- minTermFreq *int64
- maxTermFreq *int64
- minDocFreq *int64
- maxDocFreq *int64
- minWordLength *int64
- maxWordLength *int64
-}
-
-// NewTermvectorsFilterSettings creates and initializes a new TermvectorsFilterSettings struct.
-func NewTermvectorsFilterSettings() *TermvectorsFilterSettings {
- return &TermvectorsFilterSettings{}
-}
-
-// MaxNumTerms specifies the maximum number of terms the must be returned per field.
-func (fs *TermvectorsFilterSettings) MaxNumTerms(value int64) *TermvectorsFilterSettings {
- fs.maxNumTerms = &value
- return fs
-}
-
-// MinTermFreq ignores words with less than this frequency in the source doc.
-func (fs *TermvectorsFilterSettings) MinTermFreq(value int64) *TermvectorsFilterSettings {
- fs.minTermFreq = &value
- return fs
-}
-
-// MaxTermFreq ignores words with more than this frequency in the source doc.
-func (fs *TermvectorsFilterSettings) MaxTermFreq(value int64) *TermvectorsFilterSettings {
- fs.maxTermFreq = &value
- return fs
-}
-
-// MinDocFreq ignores terms which do not occur in at least this many docs.
-func (fs *TermvectorsFilterSettings) MinDocFreq(value int64) *TermvectorsFilterSettings {
- fs.minDocFreq = &value
- return fs
-}
-
-// MaxDocFreq ignores terms which occur in more than this many docs.
-func (fs *TermvectorsFilterSettings) MaxDocFreq(value int64) *TermvectorsFilterSettings {
- fs.maxDocFreq = &value
- return fs
-}
-
-// MinWordLength specifies the minimum word length below which words will be ignored.
-func (fs *TermvectorsFilterSettings) MinWordLength(value int64) *TermvectorsFilterSettings {
- fs.minWordLength = &value
- return fs
-}
-
-// MaxWordLength specifies the maximum word length above which words will be ignored.
-func (fs *TermvectorsFilterSettings) MaxWordLength(value int64) *TermvectorsFilterSettings {
- fs.maxWordLength = &value
- return fs
-}
-
-// Source returns JSON for the query.
-func (fs *TermvectorsFilterSettings) Source() (interface{}, error) {
- source := make(map[string]interface{})
- if fs.maxNumTerms != nil {
- source["max_num_terms"] = *fs.maxNumTerms
- }
- if fs.minTermFreq != nil {
- source["min_term_freq"] = *fs.minTermFreq
- }
- if fs.maxTermFreq != nil {
- source["max_term_freq"] = *fs.maxTermFreq
- }
- if fs.minDocFreq != nil {
- source["min_doc_freq"] = *fs.minDocFreq
- }
- if fs.maxDocFreq != nil {
- source["max_doc_freq"] = *fs.maxDocFreq
- }
- if fs.minWordLength != nil {
- source["min_word_length"] = *fs.minWordLength
- }
- if fs.maxWordLength != nil {
- source["max_word_length"] = *fs.maxWordLength
- }
- return source, nil
-}
-
-// -- Response types --
-
-type TokenInfo struct {
- StartOffset int64 `json:"start_offset"`
- EndOffset int64 `json:"end_offset"`
- Position int64 `json:"position"`
- Payload string `json:"payload"`
-}
-
-type TermsInfo struct {
- DocFreq int64 `json:"doc_freq"`
- Score float64 `json:"score"`
- TermFreq int64 `json:"term_freq"`
- Ttf int64 `json:"ttf"`
- Tokens []TokenInfo `json:"tokens"`
-}
-
-type FieldStatistics struct {
- DocCount int64 `json:"doc_count"`
- SumDocFreq int64 `json:"sum_doc_freq"`
- SumTtf int64 `json:"sum_ttf"`
-}
-
-type TermVectorsFieldInfo struct {
- FieldStatistics FieldStatistics `json:"field_statistics"`
- Terms map[string]TermsInfo `json:"terms"`
-}
-
-// TermvectorsResponse is the response of TermvectorsService.Do.
-type TermvectorsResponse struct {
- Index string `json:"_index"`
- Type string `json:"_type"`
- Id string `json:"_id,omitempty"`
- Version int `json:"_version"`
- Found bool `json:"found"`
- Took int64 `json:"took"`
- TermVectors map[string]TermVectorsFieldInfo `json:"term_vectors"`
-}
diff --git a/vendor/github.com/olivere/elastic/termvectors_test.go b/vendor/github.com/olivere/elastic/termvectors_test.go
deleted file mode 100644
index 0391f2b0a..000000000
--- a/vendor/github.com/olivere/elastic/termvectors_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "testing"
- "time"
-)
-
-func TestTermVectorsBuildURL(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tests := []struct {
- Index string
- Type string
- Id string
- Expected string
- }{
- {
- "twitter",
- "doc",
- "",
- "/twitter/doc/_termvectors",
- },
- {
- "twitter",
- "doc",
- "1",
- "/twitter/doc/1/_termvectors",
- },
- }
-
- for _, test := range tests {
- builder := client.TermVectors(test.Index, test.Type)
- if test.Id != "" {
- builder = builder.Id(test.Id)
- }
- path, _, err := builder.buildURL()
- if err != nil {
- t.Fatal(err)
- }
- if path != test.Expected {
- t.Errorf("expected %q; got: %q", test.Expected, path)
- }
- }
-}
-
-func TestTermVectorsWithId(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and Elasticsearch."}
-
- // Add a document
- indexResult, err := client.Index().
- Index(testIndexName).
- Type("doc").
- Id("1").
- BodyJson(&tweet1).
- Refresh("true").
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if indexResult == nil {
- t.Errorf("expected result to be != nil; got: %v", indexResult)
- }
-
- // TermVectors by specifying ID
- field := "Message"
- result, err := client.TermVectors(testIndexName, "doc").
- Id("1").
- Fields(field).
- FieldStatistics(true).
- TermStatistics(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if result == nil {
- t.Fatal("expected to return information and statistics")
- }
- if !result.Found {
- t.Errorf("expected found to be %v; got: %v", true, result.Found)
- }
-}
-
-func TestTermVectorsWithDoc(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Travis lags sometimes
- if isTravis() {
- time.Sleep(2 * time.Second)
- }
-
- // TermVectors by specifying Doc
- var doc = map[string]interface{}{
- "fullname": "John Doe",
- "text": "twitter test test test",
- }
- var perFieldAnalyzer = map[string]string{
- "fullname": "keyword",
- }
-
- result, err := client.TermVectors(testIndexName, "doc").
- Doc(doc).
- PerFieldAnalyzer(perFieldAnalyzer).
- FieldStatistics(true).
- TermStatistics(true).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if result == nil {
- t.Fatal("expected to return information and statistics")
- }
- if !result.Found {
- t.Errorf("expected found to be %v; got: %v", true, result.Found)
- }
-}
-
-func TestTermVectorsWithFilter(t *testing.T) {
- client := setupTestClientAndCreateIndex(t)
-
- // Travis lags sometimes
- if isTravis() {
- time.Sleep(2 * time.Second)
- }
-
- // TermVectors by specifying Doc
- var doc = map[string]interface{}{
- "fullname": "John Doe",
- "text": "twitter test test test",
- }
- var perFieldAnalyzer = map[string]string{
- "fullname": "keyword",
- }
-
- result, err := client.TermVectors(testIndexName, "doc").
- Doc(doc).
- PerFieldAnalyzer(perFieldAnalyzer).
- FieldStatistics(true).
- TermStatistics(true).
- Filter(NewTermvectorsFilterSettings().MinTermFreq(1)).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if result == nil {
- t.Fatal("expected to return information and statistics")
- }
- if !result.Found {
- t.Errorf("expected found to be %v; got: %v", true, result.Found)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/update.go b/vendor/github.com/olivere/elastic/update.go
deleted file mode 100644
index 5507fae4c..000000000
--- a/vendor/github.com/olivere/elastic/update.go
+++ /dev/null
@@ -1,327 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// UpdateService updates a document in Elasticsearch.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docs-update.html
-// for details.
-type UpdateService struct {
- client *Client
- index string
- typ string
- id string
- routing string
- parent string
- script *Script
- fields []string
- fsc *FetchSourceContext
- version *int64
- versionType string
- retryOnConflict *int
- refresh string
- waitForActiveShards string
- upsert interface{}
- scriptedUpsert *bool
- docAsUpsert *bool
- detectNoop *bool
- doc interface{}
- timeout string
- pretty bool
-}
-
-// NewUpdateService creates the service to update documents in Elasticsearch.
-func NewUpdateService(client *Client) *UpdateService {
- builder := &UpdateService{
- client: client,
- fields: make([]string, 0),
- }
- return builder
-}
-
-// Index is the name of the Elasticsearch index (required).
-func (b *UpdateService) Index(name string) *UpdateService {
- b.index = name
- return b
-}
-
-// Type is the type of the document (required).
-func (b *UpdateService) Type(typ string) *UpdateService {
- b.typ = typ
- return b
-}
-
-// Id is the identifier of the document to update (required).
-func (b *UpdateService) Id(id string) *UpdateService {
- b.id = id
- return b
-}
-
-// Routing specifies a specific routing value.
-func (b *UpdateService) Routing(routing string) *UpdateService {
- b.routing = routing
- return b
-}
-
-// Parent sets the id of the parent document.
-func (b *UpdateService) Parent(parent string) *UpdateService {
- b.parent = parent
- return b
-}
-
-// Script is the script definition.
-func (b *UpdateService) Script(script *Script) *UpdateService {
- b.script = script
- return b
-}
-
-// RetryOnConflict specifies how many times the operation should be retried
-// when a conflict occurs (default: 0).
-func (b *UpdateService) RetryOnConflict(retryOnConflict int) *UpdateService {
- b.retryOnConflict = &retryOnConflict
- return b
-}
-
-// Fields is a list of fields to return in the response.
-func (b *UpdateService) Fields(fields ...string) *UpdateService {
- b.fields = make([]string, 0, len(fields))
- b.fields = append(b.fields, fields...)
- return b
-}
-
-// Version defines the explicit version number for concurrency control.
-func (b *UpdateService) Version(version int64) *UpdateService {
- b.version = &version
- return b
-}
-
-// VersionType is e.g. "internal".
-func (b *UpdateService) VersionType(versionType string) *UpdateService {
- b.versionType = versionType
- return b
-}
-
-// Refresh the index after performing the update.
-func (b *UpdateService) Refresh(refresh string) *UpdateService {
- b.refresh = refresh
- return b
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active before
-// proceeding with the update operation. Defaults to 1, meaning the primary shard only.
-// Set to `all` for all shard copies, otherwise set to any non-negative value less than
-// or equal to the total number of copies for the shard (number of replicas + 1).
-func (b *UpdateService) WaitForActiveShards(waitForActiveShards string) *UpdateService {
- b.waitForActiveShards = waitForActiveShards
- return b
-}
-
-// Doc allows for updating a partial document.
-func (b *UpdateService) Doc(doc interface{}) *UpdateService {
- b.doc = doc
- return b
-}
-
-// Upsert can be used to index the document when it doesn't exist yet.
-// Use this e.g. to initialize a document with a default value.
-func (b *UpdateService) Upsert(doc interface{}) *UpdateService {
- b.upsert = doc
- return b
-}
-
-// DocAsUpsert can be used to insert the document if it doesn't already exist.
-func (b *UpdateService) DocAsUpsert(docAsUpsert bool) *UpdateService {
- b.docAsUpsert = &docAsUpsert
- return b
-}
-
-// DetectNoop will instruct Elasticsearch to check if changes will occur
-// when updating via Doc. It there aren't any changes, the request will
-// turn into a no-op.
-func (b *UpdateService) DetectNoop(detectNoop bool) *UpdateService {
- b.detectNoop = &detectNoop
- return b
-}
-
-// ScriptedUpsert should be set to true if the referenced script
-// (defined in Script or ScriptId) should be called to perform an insert.
-// The default is false.
-func (b *UpdateService) ScriptedUpsert(scriptedUpsert bool) *UpdateService {
- b.scriptedUpsert = &scriptedUpsert
- return b
-}
-
-// Timeout is an explicit timeout for the operation, e.g. "1000", "1s" or "500ms".
-func (b *UpdateService) Timeout(timeout string) *UpdateService {
- b.timeout = timeout
- return b
-}
-
-// Pretty instructs to return human readable, prettified JSON.
-func (b *UpdateService) Pretty(pretty bool) *UpdateService {
- b.pretty = pretty
- return b
-}
-
-// FetchSource asks Elasticsearch to return the updated _source in the response.
-func (s *UpdateService) FetchSource(fetchSource bool) *UpdateService {
- if s.fsc == nil {
- s.fsc = NewFetchSourceContext(fetchSource)
- } else {
- s.fsc.SetFetchSource(fetchSource)
- }
- return s
-}
-
-// FetchSourceContext indicates that _source should be returned in the response,
-// allowing wildcard patterns to be defined via FetchSourceContext.
-func (s *UpdateService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *UpdateService {
- s.fsc = fetchSourceContext
- return s
-}
-
-// url returns the URL part of the document request.
-func (b *UpdateService) url() (string, url.Values, error) {
- // Build url
- path := "/{index}/{type}/{id}/_update"
- path, err := uritemplates.Expand(path, map[string]string{
- "index": b.index,
- "type": b.typ,
- "id": b.id,
- })
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Parameters
- params := make(url.Values)
- if b.pretty {
- params.Set("pretty", "true")
- }
- if b.routing != "" {
- params.Set("routing", b.routing)
- }
- if b.parent != "" {
- params.Set("parent", b.parent)
- }
- if b.timeout != "" {
- params.Set("timeout", b.timeout)
- }
- if b.refresh != "" {
- params.Set("refresh", b.refresh)
- }
- if b.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", b.waitForActiveShards)
- }
- if len(b.fields) > 0 {
- params.Set("fields", strings.Join(b.fields, ","))
- }
- if b.version != nil {
- params.Set("version", fmt.Sprintf("%d", *b.version))
- }
- if b.versionType != "" {
- params.Set("version_type", b.versionType)
- }
- if b.retryOnConflict != nil {
- params.Set("retry_on_conflict", fmt.Sprintf("%v", *b.retryOnConflict))
- }
-
- return path, params, nil
-}
-
-// body returns the body part of the document request.
-func (b *UpdateService) body() (interface{}, error) {
- source := make(map[string]interface{})
-
- if b.script != nil {
- src, err := b.script.Source()
- if err != nil {
- return nil, err
- }
- source["script"] = src
- }
-
- if b.scriptedUpsert != nil {
- source["scripted_upsert"] = *b.scriptedUpsert
- }
-
- if b.upsert != nil {
- source["upsert"] = b.upsert
- }
-
- if b.doc != nil {
- source["doc"] = b.doc
- }
- if b.docAsUpsert != nil {
- source["doc_as_upsert"] = *b.docAsUpsert
- }
- if b.detectNoop != nil {
- source["detect_noop"] = *b.detectNoop
- }
- if b.fsc != nil {
- src, err := b.fsc.Source()
- if err != nil {
- return nil, err
- }
- source["_source"] = src
- }
-
- return source, nil
-}
-
-// Do executes the update operation.
-func (b *UpdateService) Do(ctx context.Context) (*UpdateResponse, error) {
- path, params, err := b.url()
- if err != nil {
- return nil, err
- }
-
- // Get body of the request
- body, err := b.body()
- if err != nil {
- return nil, err
- }
-
- // Get response
- res, err := b.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return result
- ret := new(UpdateResponse)
- if err := b.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
-
-// UpdateResponse is the result of updating a document in Elasticsearch.
-type UpdateResponse struct {
- Index string `json:"_index,omitempty"`
- Type string `json:"_type,omitempty"`
- Id string `json:"_id,omitempty"`
- Version int64 `json:"_version,omitempty"`
- Result string `json:"result,omitempty"`
- Shards *shardsInfo `json:"_shards,omitempty"`
- SeqNo int64 `json:"_seq_no,omitempty"`
- PrimaryTerm int64 `json:"_primary_term,omitempty"`
- Status int `json:"status,omitempty"`
- ForcedRefresh bool `json:"forced_refresh,omitempty"`
- GetResult *GetResult `json:"get,omitempty"`
-}
diff --git a/vendor/github.com/olivere/elastic/update_by_query.go b/vendor/github.com/olivere/elastic/update_by_query.go
deleted file mode 100644
index 953d67388..000000000
--- a/vendor/github.com/olivere/elastic/update_by_query.go
+++ /dev/null
@@ -1,655 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/olivere/elastic/uritemplates"
-)
-
-// UpdateByQueryService is documented at https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html.
-type UpdateByQueryService struct {
- client *Client
- pretty bool
- index []string
- typ []string
- script *Script
- query Query
- body interface{}
- xSource []string
- xSourceExclude []string
- xSourceInclude []string
- allowNoIndices *bool
- analyzeWildcard *bool
- analyzer string
- conflicts string
- defaultOperator string
- docvalueFields []string
- df string
- expandWildcards string
- explain *bool
- fielddataFields []string
- from *int
- ignoreUnavailable *bool
- lenient *bool
- lowercaseExpandedTerms *bool
- pipeline string
- preference string
- q string
- refresh string
- requestCache *bool
- requestsPerSecond *int
- routing []string
- scroll string
- scrollSize *int
- searchTimeout string
- searchType string
- size *int
- sort []string
- stats []string
- storedFields []string
- suggestField string
- suggestMode string
- suggestSize *int
- suggestText string
- terminateAfter *int
- timeout string
- trackScores *bool
- version *bool
- versionType *bool
- waitForActiveShards string
- waitForCompletion *bool
-}
-
-// NewUpdateByQueryService creates a new UpdateByQueryService.
-func NewUpdateByQueryService(client *Client) *UpdateByQueryService {
- return &UpdateByQueryService{
- client: client,
- }
-}
-
-// Index is a list of index names to search; use `_all` or empty string to
-// perform the operation on all indices.
-func (s *UpdateByQueryService) Index(index ...string) *UpdateByQueryService {
- s.index = append(s.index, index...)
- return s
-}
-
-// Type is a list of document types to search; leave empty to perform
-// the operation on all types.
-func (s *UpdateByQueryService) Type(typ ...string) *UpdateByQueryService {
- s.typ = append(s.typ, typ...)
- return s
-}
-
-// Pretty indicates that the JSON response be indented and human readable.
-func (s *UpdateByQueryService) Pretty(pretty bool) *UpdateByQueryService {
- s.pretty = pretty
- return s
-}
-
-// Script sets an update script.
-func (s *UpdateByQueryService) Script(script *Script) *UpdateByQueryService {
- s.script = script
- return s
-}
-
-// Body specifies the body of the request. It overrides data being specified via
-// SearchService or Script.
-func (s *UpdateByQueryService) Body(body string) *UpdateByQueryService {
- s.body = body
- return s
-}
-
-// XSource is true or false to return the _source field or not,
-// or a list of fields to return.
-func (s *UpdateByQueryService) XSource(xSource ...string) *UpdateByQueryService {
- s.xSource = append(s.xSource, xSource...)
- return s
-}
-
-// XSourceExclude represents a list of fields to exclude from the returned _source field.
-func (s *UpdateByQueryService) XSourceExclude(xSourceExclude ...string) *UpdateByQueryService {
- s.xSourceExclude = append(s.xSourceExclude, xSourceExclude...)
- return s
-}
-
-// XSourceInclude represents a list of fields to extract and return from the _source field.
-func (s *UpdateByQueryService) XSourceInclude(xSourceInclude ...string) *UpdateByQueryService {
- s.xSourceInclude = append(s.xSourceInclude, xSourceInclude...)
- return s
-}
-
-// AllowNoIndices indicates whether to ignore if a wildcard indices expression
-// resolves into no concrete indices. (This includes `_all` string or when
-// no indices have been specified).
-func (s *UpdateByQueryService) AllowNoIndices(allowNoIndices bool) *UpdateByQueryService {
- s.allowNoIndices = &allowNoIndices
- return s
-}
-
-// AnalyzeWildcard specifies whether wildcard and prefix queries should be
-// analyzed (default: false).
-func (s *UpdateByQueryService) AnalyzeWildcard(analyzeWildcard bool) *UpdateByQueryService {
- s.analyzeWildcard = &analyzeWildcard
- return s
-}
-
-// Analyzer specifies the analyzer to use for the query string.
-func (s *UpdateByQueryService) Analyzer(analyzer string) *UpdateByQueryService {
- s.analyzer = analyzer
- return s
-}
-
-// Conflicts indicates what to do when the process detects version conflicts.
-// Possible values are "proceed" and "abort".
-func (s *UpdateByQueryService) Conflicts(conflicts string) *UpdateByQueryService {
- s.conflicts = conflicts
- return s
-}
-
-// AbortOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("abort").
-func (s *UpdateByQueryService) AbortOnVersionConflict() *UpdateByQueryService {
- s.conflicts = "abort"
- return s
-}
-
-// ProceedOnVersionConflict aborts the request on version conflicts.
-// It is an alias to setting Conflicts("proceed").
-func (s *UpdateByQueryService) ProceedOnVersionConflict() *UpdateByQueryService {
- s.conflicts = "proceed"
- return s
-}
-
-// DefaultOperator is the default operator for query string query (AND or OR).
-func (s *UpdateByQueryService) DefaultOperator(defaultOperator string) *UpdateByQueryService {
- s.defaultOperator = defaultOperator
- return s
-}
-
-// DF specifies the field to use as default where no field prefix is given in the query string.
-func (s *UpdateByQueryService) DF(df string) *UpdateByQueryService {
- s.df = df
- return s
-}
-
-// DocvalueFields specifies the list of fields to return as the docvalue representation of a field for each hit.
-func (s *UpdateByQueryService) DocvalueFields(docvalueFields ...string) *UpdateByQueryService {
- s.docvalueFields = docvalueFields
- return s
-}
-
-// ExpandWildcards indicates whether to expand wildcard expression to
-// concrete indices that are open, closed or both.
-func (s *UpdateByQueryService) ExpandWildcards(expandWildcards string) *UpdateByQueryService {
- s.expandWildcards = expandWildcards
- return s
-}
-
-// Explain specifies whether to return detailed information about score
-// computation as part of a hit.
-func (s *UpdateByQueryService) Explain(explain bool) *UpdateByQueryService {
- s.explain = &explain
- return s
-}
-
-// FielddataFields is a list of fields to return as the field data
-// representation of a field for each hit.
-func (s *UpdateByQueryService) FielddataFields(fielddataFields ...string) *UpdateByQueryService {
- s.fielddataFields = append(s.fielddataFields, fielddataFields...)
- return s
-}
-
-// From is the starting offset (default: 0).
-func (s *UpdateByQueryService) From(from int) *UpdateByQueryService {
- s.from = &from
- return s
-}
-
-// IgnoreUnavailable indicates whether specified concrete indices should be
-// ignored when unavailable (missing or closed).
-func (s *UpdateByQueryService) IgnoreUnavailable(ignoreUnavailable bool) *UpdateByQueryService {
- s.ignoreUnavailable = &ignoreUnavailable
- return s
-}
-
-// Lenient specifies whether format-based query failures
-// (such as providing text to a numeric field) should be ignored.
-func (s *UpdateByQueryService) Lenient(lenient bool) *UpdateByQueryService {
- s.lenient = &lenient
- return s
-}
-
-// LowercaseExpandedTerms specifies whether query terms should be lowercased.
-func (s *UpdateByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *UpdateByQueryService {
- s.lowercaseExpandedTerms = &lowercaseExpandedTerms
- return s
-}
-
-// Pipeline specifies the ingest pipeline to set on index requests made by this action (default: none).
-func (s *UpdateByQueryService) Pipeline(pipeline string) *UpdateByQueryService {
- s.pipeline = pipeline
- return s
-}
-
-// Preference specifies the node or shard the operation should be performed on
-// (default: random).
-func (s *UpdateByQueryService) Preference(preference string) *UpdateByQueryService {
- s.preference = preference
- return s
-}
-
-// Q specifies the query in the Lucene query string syntax.
-func (s *UpdateByQueryService) Q(q string) *UpdateByQueryService {
- s.q = q
- return s
-}
-
-// Query sets a query definition using the Query DSL.
-func (s *UpdateByQueryService) Query(query Query) *UpdateByQueryService {
- s.query = query
- return s
-}
-
-// Refresh indicates whether the effected indexes should be refreshed.
-func (s *UpdateByQueryService) Refresh(refresh string) *UpdateByQueryService {
- s.refresh = refresh
- return s
-}
-
-// RequestCache specifies if request cache should be used for this request
-// or not, defaults to index level setting.
-func (s *UpdateByQueryService) RequestCache(requestCache bool) *UpdateByQueryService {
- s.requestCache = &requestCache
- return s
-}
-
-// RequestsPerSecond sets the throttle on this request in sub-requests per second.
-// -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
-func (s *UpdateByQueryService) RequestsPerSecond(requestsPerSecond int) *UpdateByQueryService {
- s.requestsPerSecond = &requestsPerSecond
- return s
-}
-
-// Routing is a list of specific routing values.
-func (s *UpdateByQueryService) Routing(routing ...string) *UpdateByQueryService {
- s.routing = append(s.routing, routing...)
- return s
-}
-
-// Scroll specifies how long a consistent view of the index should be maintained
-// for scrolled search.
-func (s *UpdateByQueryService) Scroll(scroll string) *UpdateByQueryService {
- s.scroll = scroll
- return s
-}
-
-// ScrollSize is the size on the scroll request powering the update_by_query.
-func (s *UpdateByQueryService) ScrollSize(scrollSize int) *UpdateByQueryService {
- s.scrollSize = &scrollSize
- return s
-}
-
-// SearchTimeout defines an explicit timeout for each search request.
-// Defaults to no timeout.
-func (s *UpdateByQueryService) SearchTimeout(searchTimeout string) *UpdateByQueryService {
- s.searchTimeout = searchTimeout
- return s
-}
-
-// SearchType is the search operation type. Possible values are
-// "query_then_fetch" and "dfs_query_then_fetch".
-func (s *UpdateByQueryService) SearchType(searchType string) *UpdateByQueryService {
- s.searchType = searchType
- return s
-}
-
-// Size represents the number of hits to return (default: 10).
-func (s *UpdateByQueryService) Size(size int) *UpdateByQueryService {
- s.size = &size
- return s
-}
-
-// Sort is a list of <field>:<direction> pairs.
-func (s *UpdateByQueryService) Sort(sort ...string) *UpdateByQueryService {
- s.sort = append(s.sort, sort...)
- return s
-}
-
-// SortByField adds a sort order.
-func (s *UpdateByQueryService) SortByField(field string, ascending bool) *UpdateByQueryService {
- if ascending {
- s.sort = append(s.sort, fmt.Sprintf("%s:asc", field))
- } else {
- s.sort = append(s.sort, fmt.Sprintf("%s:desc", field))
- }
- return s
-}
-
-// Stats specifies specific tag(s) of the request for logging and statistical purposes.
-func (s *UpdateByQueryService) Stats(stats ...string) *UpdateByQueryService {
- s.stats = append(s.stats, stats...)
- return s
-}
-
-// StoredFields specifies the list of stored fields to return as part of a hit.
-func (s *UpdateByQueryService) StoredFields(storedFields ...string) *UpdateByQueryService {
- s.storedFields = storedFields
- return s
-}
-
-// SuggestField specifies which field to use for suggestions.
-func (s *UpdateByQueryService) SuggestField(suggestField string) *UpdateByQueryService {
- s.suggestField = suggestField
- return s
-}
-
-// SuggestMode specifies the suggest mode. Possible values are
-// "missing", "popular", and "always".
-func (s *UpdateByQueryService) SuggestMode(suggestMode string) *UpdateByQueryService {
- s.suggestMode = suggestMode
- return s
-}
-
-// SuggestSize specifies how many suggestions to return in response.
-func (s *UpdateByQueryService) SuggestSize(suggestSize int) *UpdateByQueryService {
- s.suggestSize = &suggestSize
- return s
-}
-
-// SuggestText specifies the source text for which the suggestions should be returned.
-func (s *UpdateByQueryService) SuggestText(suggestText string) *UpdateByQueryService {
- s.suggestText = suggestText
- return s
-}
-
-// TerminateAfter indicates the maximum number of documents to collect
-// for each shard, upon reaching which the query execution will terminate early.
-func (s *UpdateByQueryService) TerminateAfter(terminateAfter int) *UpdateByQueryService {
- s.terminateAfter = &terminateAfter
- return s
-}
-
-// Timeout is the time each individual bulk request should wait for shards
-// that are unavailable.
-func (s *UpdateByQueryService) Timeout(timeout string) *UpdateByQueryService {
- s.timeout = timeout
- return s
-}
-
-// TimeoutInMillis sets the timeout in milliseconds.
-func (s *UpdateByQueryService) TimeoutInMillis(timeoutInMillis int) *UpdateByQueryService {
- s.timeout = fmt.Sprintf("%dms", timeoutInMillis)
- return s
-}
-
-// TrackScores indicates whether to calculate and return scores even if
-// they are not used for sorting.
-func (s *UpdateByQueryService) TrackScores(trackScores bool) *UpdateByQueryService {
- s.trackScores = &trackScores
- return s
-}
-
-// Version specifies whether to return document version as part of a hit.
-func (s *UpdateByQueryService) Version(version bool) *UpdateByQueryService {
- s.version = &version
- return s
-}
-
-// VersionType indicates if the document increment the version number (internal)
-// on hit or not (reindex).
-func (s *UpdateByQueryService) VersionType(versionType bool) *UpdateByQueryService {
- s.versionType = &versionType
- return s
-}
-
-// WaitForActiveShards sets the number of shard copies that must be active before proceeding
-// with the update by query operation. Defaults to 1, meaning the primary shard only.
-// Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal
-// to the total number of copies for the shard (number of replicas + 1).
-func (s *UpdateByQueryService) WaitForActiveShards(waitForActiveShards string) *UpdateByQueryService {
- s.waitForActiveShards = waitForActiveShards
- return s
-}
-
-// WaitForCompletion indicates if the request should block until the reindex is complete.
-func (s *UpdateByQueryService) WaitForCompletion(waitForCompletion bool) *UpdateByQueryService {
- s.waitForCompletion = &waitForCompletion
- return s
-}
-
-// buildURL builds the URL for the operation.
-func (s *UpdateByQueryService) buildURL() (string, url.Values, error) {
- // Build URL
- var err error
- var path string
- if len(s.typ) > 0 {
- path, err = uritemplates.Expand("/{index}/{type}/_update_by_query", map[string]string{
- "index": strings.Join(s.index, ","),
- "type": strings.Join(s.typ, ","),
- })
- } else {
- path, err = uritemplates.Expand("/{index}/_update_by_query", map[string]string{
- "index": strings.Join(s.index, ","),
- })
- }
- if err != nil {
- return "", url.Values{}, err
- }
-
- // Add query string parameters
- params := url.Values{}
- if s.pretty {
- params.Set("pretty", "true")
- }
- if len(s.xSource) > 0 {
- params.Set("_source", strings.Join(s.xSource, ","))
- }
- if len(s.xSourceExclude) > 0 {
- params.Set("_source_exclude", strings.Join(s.xSourceExclude, ","))
- }
- if len(s.xSourceInclude) > 0 {
- params.Set("_source_include", strings.Join(s.xSourceInclude, ","))
- }
- if s.allowNoIndices != nil {
- params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
- }
- if s.analyzer != "" {
- params.Set("analyzer", s.analyzer)
- }
- if s.analyzeWildcard != nil {
- params.Set("analyze_wildcard", fmt.Sprintf("%v", *s.analyzeWildcard))
- }
- if s.conflicts != "" {
- params.Set("conflicts", s.conflicts)
- }
- if s.defaultOperator != "" {
- params.Set("default_operator", s.defaultOperator)
- }
- if s.df != "" {
- params.Set("df", s.df)
- }
- if s.expandWildcards != "" {
- params.Set("expand_wildcards", s.expandWildcards)
- }
- if s.explain != nil {
- params.Set("explain", fmt.Sprintf("%v", *s.explain))
- }
- if len(s.storedFields) > 0 {
- params.Set("stored_fields", strings.Join(s.storedFields, ","))
- }
- if len(s.docvalueFields) > 0 {
- params.Set("docvalue_fields", strings.Join(s.docvalueFields, ","))
- }
- if len(s.fielddataFields) > 0 {
- params.Set("fielddata_fields", strings.Join(s.fielddataFields, ","))
- }
- if s.from != nil {
- params.Set("from", fmt.Sprintf("%d", *s.from))
- }
- if s.ignoreUnavailable != nil {
- params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
- }
- if s.lenient != nil {
- params.Set("lenient", fmt.Sprintf("%v", *s.lenient))
- }
- if s.lowercaseExpandedTerms != nil {
- params.Set("lowercase_expanded_terms", fmt.Sprintf("%v", *s.lowercaseExpandedTerms))
- }
- if s.pipeline != "" {
- params.Set("pipeline", s.pipeline)
- }
- if s.preference != "" {
- params.Set("preference", s.preference)
- }
- if s.q != "" {
- params.Set("q", s.q)
- }
- if s.refresh != "" {
- params.Set("refresh", s.refresh)
- }
- if s.requestCache != nil {
- params.Set("request_cache", fmt.Sprintf("%v", *s.requestCache))
- }
- if len(s.routing) > 0 {
- params.Set("routing", strings.Join(s.routing, ","))
- }
- if s.scroll != "" {
- params.Set("scroll", s.scroll)
- }
- if s.scrollSize != nil {
- params.Set("scroll_size", fmt.Sprintf("%d", *s.scrollSize))
- }
- if s.searchTimeout != "" {
- params.Set("search_timeout", s.searchTimeout)
- }
- if s.searchType != "" {
- params.Set("search_type", s.searchType)
- }
- if s.size != nil {
- params.Set("size", fmt.Sprintf("%d", *s.size))
- }
- if len(s.sort) > 0 {
- params.Set("sort", strings.Join(s.sort, ","))
- }
- if len(s.stats) > 0 {
- params.Set("stats", strings.Join(s.stats, ","))
- }
- if s.suggestField != "" {
- params.Set("suggest_field", s.suggestField)
- }
- if s.suggestMode != "" {
- params.Set("suggest_mode", s.suggestMode)
- }
- if s.suggestSize != nil {
- params.Set("suggest_size", fmt.Sprintf("%v", *s.suggestSize))
- }
- if s.suggestText != "" {
- params.Set("suggest_text", s.suggestText)
- }
- if s.terminateAfter != nil {
- params.Set("terminate_after", fmt.Sprintf("%v", *s.terminateAfter))
- }
- if s.timeout != "" {
- params.Set("timeout", s.timeout)
- }
- if s.trackScores != nil {
- params.Set("track_scores", fmt.Sprintf("%v", *s.trackScores))
- }
- if s.version != nil {
- params.Set("version", fmt.Sprintf("%v", *s.version))
- }
- if s.versionType != nil {
- params.Set("version_type", fmt.Sprintf("%v", *s.versionType))
- }
- if s.waitForActiveShards != "" {
- params.Set("wait_for_active_shards", s.waitForActiveShards)
- }
- if s.waitForCompletion != nil {
- params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
- }
- if s.requestsPerSecond != nil {
- params.Set("requests_per_second", fmt.Sprintf("%v", *s.requestsPerSecond))
- }
- return path, params, nil
-}
-
-// Validate checks if the operation is valid.
-func (s *UpdateByQueryService) Validate() error {
- var invalid []string
- if len(s.index) == 0 {
- invalid = append(invalid, "Index")
- }
- if len(invalid) > 0 {
- return fmt.Errorf("missing required fields: %v", invalid)
- }
- return nil
-}
-
-// getBody returns the body part of the document request.
-func (s *UpdateByQueryService) getBody() (interface{}, error) {
- if s.body != nil {
- return s.body, nil
- }
- source := make(map[string]interface{})
- if s.script != nil {
- src, err := s.script.Source()
- if err != nil {
- return nil, err
- }
- source["script"] = src
- }
- if s.query != nil {
- src, err := s.query.Source()
- if err != nil {
- return nil, err
- }
- source["query"] = src
- }
- return source, nil
-}
-
-// Do executes the operation.
-func (s *UpdateByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error) {
- // Check pre-conditions
- if err := s.Validate(); err != nil {
- return nil, err
- }
-
- // Get URL for request
- path, params, err := s.buildURL()
- if err != nil {
- return nil, err
- }
-
- // Setup HTTP request body
- body, err := s.getBody()
- if err != nil {
- return nil, err
- }
-
- // Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "POST",
- Path: path,
- Params: params,
- Body: body,
- })
- if err != nil {
- return nil, err
- }
-
- // Return operation response (BulkIndexByScrollResponse is defined in DeleteByQuery)
- ret := new(BulkIndexByScrollResponse)
- if err := s.client.decoder.Decode(res.Body, ret); err != nil {
- return nil, err
- }
- return ret, nil
-}
diff --git a/vendor/github.com/olivere/elastic/update_by_query_test.go b/vendor/github.com/olivere/elastic/update_by_query_test.go
deleted file mode 100644
index fde924dd5..000000000
--- a/vendor/github.com/olivere/elastic/update_by_query_test.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestUpdateByQueryBuildURL(t *testing.T) {
- client := setupTestClient(t)
-
- tests := []struct {
- Indices []string
- Types []string
- Expected string
- ExpectErr bool
- }{
- {
- []string{},
- []string{},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{},
- "/index1/_update_by_query",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{},
- "/index1%2Cindex2/_update_by_query",
- false,
- },
- {
- []string{},
- []string{"type1"},
- "",
- true,
- },
- {
- []string{"index1"},
- []string{"type1"},
- "/index1/type1/_update_by_query",
- false,
- },
- {
- []string{"index1", "index2"},
- []string{"type1", "type2"},
- "/index1%2Cindex2/type1%2Ctype2/_update_by_query",
- false,
- },
- }
-
- for i, test := range tests {
- builder := client.UpdateByQuery().Index(test.Indices...).Type(test.Types...)
- err := builder.Validate()
- if err != nil {
- if !test.ExpectErr {
- t.Errorf("case #%d: %v", i+1, err)
- continue
- }
- } else {
- // err == nil
- if test.ExpectErr {
- t.Errorf("case #%d: expected error", i+1)
- continue
- }
- path, _, _ := builder.buildURL()
- if path != test.Expected {
- t.Errorf("case #%d: expected %q; got: %q", i+1, test.Expected, path)
- }
- }
- }
-}
-
-func TestUpdateByQueryBodyWithQuery(t *testing.T) {
- client := setupTestClient(t)
- out, err := client.UpdateByQuery().Query(NewTermQuery("user", "olivere")).getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"query":{"term":{"user":"olivere"}}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestUpdateByQueryBodyWithQueryAndScript(t *testing.T) {
- client := setupTestClient(t)
- out, err := client.UpdateByQuery().
- Query(NewTermQuery("user", "olivere")).
- Script(NewScriptInline("ctx._source.likes++")).
- getBody()
- if err != nil {
- t.Fatal(err)
- }
- b, err := json.Marshal(out)
- if err != nil {
- t.Fatal(err)
- }
- got := string(b)
- want := `{"query":{"term":{"user":"olivere"}},"script":{"source":"ctx._source.likes++"}}`
- if got != want {
- t.Fatalf("\ngot %s\nwant %s", got, want)
- }
-}
-
-func TestUpdateByQuery(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
- esversion, err := client.ElasticsearchVersion(DefaultURL)
- if err != nil {
- t.Fatal(err)
- }
- if esversion < "2.3.0" {
- t.Skipf("Elasticsearch %v does not support update-by-query yet", esversion)
- }
-
- sourceCount, err := client.Count(testIndexName).Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if sourceCount <= 0 {
- t.Fatalf("expected more than %d documents; got: %d", 0, sourceCount)
- }
-
- res, err := client.UpdateByQuery(testIndexName).ProceedOnVersionConflict().Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("response is nil")
- }
- if res.Updated != sourceCount {
- t.Fatalf("expected %d; got: %d", sourceCount, res.Updated)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/update_integration_test.go b/vendor/github.com/olivere/elastic/update_integration_test.go
deleted file mode 100644
index f36925298..000000000
--- a/vendor/github.com/olivere/elastic/update_integration_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "testing"
-)
-
-func TestUpdateWithScript(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- // Get original
- getRes, err := client.Get().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- var original tweet
- if err := json.Unmarshal(*getRes.Source, &original); err != nil {
- t.Fatal(err)
- }
-
- // Update with script
- updRes, err := client.Update().Index(testIndexName).Type("doc").Id("1").
- Script(
- NewScript(`ctx._source.message = "Updated message text."`).Lang("painless"),
- ).
- Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- if updRes == nil {
- t.Fatal("response is nil")
- }
- if want, have := "updated", updRes.Result; want != have {
- t.Fatalf("want Result = %q, have %v", want, have)
- }
-
- // Get new version
- getRes, err = client.Get().Index(testIndexName).Type("doc").Id("1").Do(context.TODO())
- if err != nil {
- t.Fatal(err)
- }
- var updated tweet
- if err := json.Unmarshal(*getRes.Source, &updated); err != nil {
- t.Fatal(err)
- }
-
- if want, have := original.User, updated.User; want != have {
- t.Fatalf("want User = %q, have %v", want, have)
- }
- if want, have := "Updated message text.", updated.Message; want != have {
- t.Fatalf("want Message = %q, have %v", want, have)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/update_test.go b/vendor/github.com/olivere/elastic/update_test.go
deleted file mode 100644
index 1f04cedd6..000000000
--- a/vendor/github.com/olivere/elastic/update_test.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2012-present Oliver Eilhard. All rights reserved.
-// Use of this source code is governed by a MIT-license.
-// See http://olivere.mit-license.org/license.txt for details.
-
-package elastic
-
-import (
- "context"
- "encoding/json"
- "net/url"
- "testing"
-)
-
-func TestUpdateViaScript(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- update := client.Update().
- Index("test").Type("type1").Id("1").
- Script(NewScript("ctx._source.tags += tag").Params(map[string]interface{}{"tag": "blue"}).Lang("groovy"))
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/test/type1/1/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{}
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"script":{"lang":"groovy","params":{"tag":"blue"},"source":"ctx._source.tags += tag"}}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateViaScriptId(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- scriptParams := map[string]interface{}{
- "pageViewEvent": map[string]interface{}{
- "url": "foo.com/bar",
- "response": 404,
- "time": "2014-01-01 12:32",
- },
- }
- script := NewScriptStored("my_web_session_summariser").Params(scriptParams)
-
- update := client.Update().
- Index("sessions").Type("session").Id("dh3sgudg8gsrgl").
- Script(script).
- ScriptedUpsert(true).
- Upsert(map[string]interface{}{})
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/sessions/session/dh3sgudg8gsrgl/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{}
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"script":{"id":"my_web_session_summariser","params":{"pageViewEvent":{"response":404,"time":"2014-01-01 12:32","url":"foo.com/bar"}}},"scripted_upsert":true,"upsert":{}}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateViaScriptAndUpsert(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- update := client.Update().
- Index("test").Type("type1").Id("1").
- Script(NewScript("ctx._source.counter += count").Params(map[string]interface{}{"count": 4})).
- Upsert(map[string]interface{}{"counter": 1})
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/test/type1/1/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{}
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"script":{"params":{"count":4},"source":"ctx._source.counter += count"},"upsert":{"counter":1}}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateViaDoc(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- update := client.Update().
- Index("test").Type("type1").Id("1").
- Doc(map[string]interface{}{"name": "new_name"}).
- DetectNoop(true)
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/test/type1/1/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{}
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"detect_noop":true,"doc":{"name":"new_name"}}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateViaDocAndUpsert(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- update := client.Update().
- Index("test").Type("type1").Id("1").
- Doc(map[string]interface{}{"name": "new_name"}).
- DocAsUpsert(true).
- Timeout("1s").
- Refresh("true")
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/test/type1/1/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{"refresh": []string{"true"}, "timeout": []string{"1s"}}
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"doc":{"name":"new_name"},"doc_as_upsert":true}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateViaDocAndUpsertAndFetchSource(t *testing.T) {
- client := setupTestClient(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- update := client.Update().
- Index("test").Type("type1").Id("1").
- Doc(map[string]interface{}{"name": "new_name"}).
- DocAsUpsert(true).
- Timeout("1s").
- Refresh("true").
- FetchSource(true)
- path, params, err := update.url()
- if err != nil {
- t.Fatalf("expected to return URL, got: %v", err)
- }
- expectedPath := `/test/type1/1/_update`
- if expectedPath != path {
- t.Errorf("expected URL path\n%s\ngot:\n%s", expectedPath, path)
- }
- expectedParams := url.Values{
- "refresh": []string{"true"},
- "timeout": []string{"1s"},
- }
- if expectedParams.Encode() != params.Encode() {
- t.Errorf("expected URL parameters\n%s\ngot:\n%s", expectedParams.Encode(), params.Encode())
- }
- body, err := update.body()
- if err != nil {
- t.Fatalf("expected to return body, got: %v", err)
- }
- data, err := json.Marshal(body)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"_source":true,"doc":{"name":"new_name"},"doc_as_upsert":true}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
-
-func TestUpdateAndFetchSource(t *testing.T) {
- client := setupTestClientAndCreateIndexAndAddDocs(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
-
- res, err := client.Update().
- Index(testIndexName).Type("doc").Id("1").
- Doc(map[string]interface{}{"user": "sandrae"}).
- DetectNoop(true).
- FetchSource(true).
- Do(context.Background())
- if err != nil {
- t.Fatal(err)
- }
- if res == nil {
- t.Fatal("expected response != nil")
- }
- if res.GetResult == nil {
- t.Fatal("expected GetResult != nil")
- }
- data, err := json.Marshal(res.GetResult.Source)
- if err != nil {
- t.Fatalf("expected to marshal body as JSON, got: %v", err)
- }
- got := string(data)
- expected := `{"user":"sandrae","message":"Welcome to Golang and Elasticsearch.","retweets":0,"created":"0001-01-01T00:00:00Z"}`
- if got != expected {
- t.Errorf("expected\n%s\ngot:\n%s", expected, got)
- }
-}
diff --git a/vendor/github.com/olivere/elastic/uritemplates/LICENSE b/vendor/github.com/olivere/elastic/uritemplates/LICENSE
deleted file mode 100644
index de9c88cb6..000000000
--- a/vendor/github.com/olivere/elastic/uritemplates/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright (c) 2013 Joshua Tacoma
-
-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/olivere/elastic/uritemplates/uritemplates.go b/vendor/github.com/olivere/elastic/uritemplates/uritemplates.go
deleted file mode 100644
index 8a84813fe..000000000
--- a/vendor/github.com/olivere/elastic/uritemplates/uritemplates.go
+++ /dev/null
@@ -1,359 +0,0 @@
-// Copyright 2013 Joshua Tacoma. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package uritemplates is a level 4 implementation of RFC 6570 (URI
-// Template, http://tools.ietf.org/html/rfc6570).
-//
-// To use uritemplates, parse a template string and expand it with a value
-// map:
-//
-// template, _ := uritemplates.Parse("https://api.github.com/repos{/user,repo}")
-// values := make(map[string]interface{})
-// values["user"] = "jtacoma"
-// values["repo"] = "uritemplates"
-// expanded, _ := template.ExpandString(values)
-// fmt.Printf(expanded)
-//
-package uritemplates
-
-import (
- "bytes"
- "errors"
- "fmt"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-)
-
-var (
- unreserved = regexp.MustCompile("[^A-Za-z0-9\\-._~]")
- reserved = regexp.MustCompile("[^A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=]")
- validname = regexp.MustCompile("^([A-Za-z0-9_\\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$")
- hex = []byte("0123456789ABCDEF")
-)
-
-func pctEncode(src []byte) []byte {
- dst := make([]byte, len(src)*3)
- for i, b := range src {
- buf := dst[i*3 : i*3+3]
- buf[0] = 0x25
- buf[1] = hex[b/16]
- buf[2] = hex[b%16]
- }
- return dst
-}
-
-func escape(s string, allowReserved bool) (escaped string) {
- if allowReserved {
- escaped = string(reserved.ReplaceAllFunc([]byte(s), pctEncode))
- } else {
- escaped = string(unreserved.ReplaceAllFunc([]byte(s), pctEncode))
- }
- return escaped
-}
-
-// A UriTemplate is a parsed representation of a URI template.
-type UriTemplate struct {
- raw string
- parts []templatePart
-}
-
-// Parse parses a URI template string into a UriTemplate object.
-func Parse(rawtemplate string) (template *UriTemplate, err error) {
- template = new(UriTemplate)
- template.raw = rawtemplate
- split := strings.Split(rawtemplate, "{")
- template.parts = make([]templatePart, len(split)*2-1)
- for i, s := range split {
- if i == 0 {
- if strings.Contains(s, "}") {
- err = errors.New("unexpected }")
- break
- }
- template.parts[i].raw = s
- } else {
- subsplit := strings.Split(s, "}")
- if len(subsplit) != 2 {
- err = errors.New("malformed template")
- break
- }
- expression := subsplit[0]
- template.parts[i*2-1], err = parseExpression(expression)
- if err != nil {
- break
- }
- template.parts[i*2].raw = subsplit[1]
- }
- }
- if err != nil {
- template = nil
- }
- return template, err
-}
-
-type templatePart struct {
- raw string
- terms []templateTerm
- first string
- sep string
- named bool
- ifemp string
- allowReserved bool
-}
-
-type templateTerm struct {
- name string
- explode bool
- truncate int
-}
-
-func parseExpression(expression string) (result templatePart, err error) {
- switch expression[0] {
- case '+':
- result.sep = ","
- result.allowReserved = true
- expression = expression[1:]
- case '.':
- result.first = "."
- result.sep = "."
- expression = expression[1:]
- case '/':
- result.first = "/"
- result.sep = "/"
- expression = expression[1:]
- case ';':
- result.first = ";"
- result.sep = ";"
- result.named = true
- expression = expression[1:]
- case '?':
- result.first = "?"
- result.sep = "&"
- result.named = true
- result.ifemp = "="
- expression = expression[1:]
- case '&':
- result.first = "&"
- result.sep = "&"
- result.named = true
- result.ifemp = "="
- expression = expression[1:]
- case '#':
- result.first = "#"
- result.sep = ","
- result.allowReserved = true
- expression = expression[1:]
- default:
- result.sep = ","
- }
- rawterms := strings.Split(expression, ",")
- result.terms = make([]templateTerm, len(rawterms))
- for i, raw := range rawterms {
- result.terms[i], err = parseTerm(raw)
- if err != nil {
- break
- }
- }
- return result, err
-}
-
-func parseTerm(term string) (result templateTerm, err error) {
- if strings.HasSuffix(term, "*") {
- result.explode = true
- term = term[:len(term)-1]
- }
- split := strings.Split(term, ":")
- if len(split) == 1 {
- result.name = term
- } else if len(split) == 2 {
- result.name = split[0]
- var parsed int64
- parsed, err = strconv.ParseInt(split[1], 10, 0)
- result.truncate = int(parsed)
- } else {
- err = errors.New("multiple colons in same term")
- }
- if !validname.MatchString(result.name) {
- err = errors.New("not a valid name: " + result.name)
- }
- if result.explode && result.truncate > 0 {
- err = errors.New("both explode and prefix modifers on same term")
- }
- return result, err
-}
-
-// Expand expands a URI template with a set of values to produce a string.
-func (self *UriTemplate) Expand(value interface{}) (string, error) {
- values, ismap := value.(map[string]interface{})
- if !ismap {
- if m, ismap := struct2map(value); !ismap {
- return "", errors.New("expected map[string]interface{}, struct, or pointer to struct.")
- } else {
- return self.Expand(m)
- }
- }
- var buf bytes.Buffer
- for _, p := range self.parts {
- err := p.expand(&buf, values)
- if err != nil {
- return "", err
- }
- }
- return buf.String(), nil
-}
-
-func (self *templatePart) expand(buf *bytes.Buffer, values map[string]interface{}) error {
- if len(self.raw) > 0 {
- buf.WriteString(self.raw)
- return nil
- }
- var zeroLen = buf.Len()
- buf.WriteString(self.first)
- var firstLen = buf.Len()
- for _, term := range self.terms {
- value, exists := values[term.name]
- if !exists {
- continue
- }
- if buf.Len() != firstLen {
- buf.WriteString(self.sep)
- }
- switch v := value.(type) {
- case string:
- self.expandString(buf, term, v)
- case []interface{}:
- self.expandArray(buf, term, v)
- case map[string]interface{}:
- if term.truncate > 0 {
- return errors.New("cannot truncate a map expansion")
- }
- self.expandMap(buf, term, v)
- default:
- if m, ismap := struct2map(value); ismap {
- if term.truncate > 0 {
- return errors.New("cannot truncate a map expansion")
- }
- self.expandMap(buf, term, m)
- } else {
- str := fmt.Sprintf("%v", value)
- self.expandString(buf, term, str)
- }
- }
- }
- if buf.Len() == firstLen {
- original := buf.Bytes()[:zeroLen]
- buf.Reset()
- buf.Write(original)
- }
- return nil
-}
-
-func (self *templatePart) expandName(buf *bytes.Buffer, name string, empty bool) {
- if self.named {
- buf.WriteString(name)
- if empty {
- buf.WriteString(self.ifemp)
- } else {
- buf.WriteString("=")
- }
- }
-}
-
-func (self *templatePart) expandString(buf *bytes.Buffer, t templateTerm, s string) {
- if len(s) > t.truncate && t.truncate > 0 {
- s = s[:t.truncate]
- }
- self.expandName(buf, t.name, len(s) == 0)
- buf.WriteString(escape(s, self.allowReserved))
-}
-
-func (self *templatePart) expandArray(buf *bytes.Buffer, t templateTerm, a []interface{}) {
- if len(a) == 0 {
- return
- } else if !t.explode {
- self.expandName(buf, t.name, false)
- }
- for i, value := range a {
- if t.explode && i > 0 {
- buf.WriteString(self.sep)
- } else if i > 0 {
- buf.WriteString(",")
- }
- var s string
- switch v := value.(type) {
- case string:
- s = v
- default:
- s = fmt.Sprintf("%v", v)
- }
- if len(s) > t.truncate && t.truncate > 0 {
- s = s[:t.truncate]
- }
- if self.named && t.explode {
- self.expandName(buf, t.name, len(s) == 0)
- }
- buf.WriteString(escape(s, self.allowReserved))
- }
-}
-
-func (self *templatePart) expandMap(buf *bytes.Buffer, t templateTerm, m map[string]interface{}) {
- if len(m) == 0 {
- return
- }
- if !t.explode {
- self.expandName(buf, t.name, len(m) == 0)
- }
- var firstLen = buf.Len()
- for k, value := range m {
- if firstLen != buf.Len() {
- if t.explode {
- buf.WriteString(self.sep)
- } else {
- buf.WriteString(",")
- }
- }
- var s string
- switch v := value.(type) {
- case string:
- s = v
- default:
- s = fmt.Sprintf("%v", v)
- }
- if t.explode {
- buf.WriteString(escape(k, self.allowReserved))
- buf.WriteRune('=')
- buf.WriteString(escape(s, self.allowReserved))
- } else {
- buf.WriteString(escape(k, self.allowReserved))
- buf.WriteRune(',')
- buf.WriteString(escape(s, self.allowReserved))
- }
- }
-}
-
-func struct2map(v interface{}) (map[string]interface{}, bool) {
- value := reflect.ValueOf(v)
- switch value.Type().Kind() {
- case reflect.Ptr:
- return struct2map(value.Elem().Interface())
- case reflect.Struct:
- m := make(map[string]interface{})
- for i := 0; i < value.NumField(); i++ {
- tag := value.Type().Field(i).Tag
- var name string
- if strings.Contains(string(tag), ":") {
- name = tag.Get("uri")
- } else {
- name = strings.TrimSpace(string(tag))
- }
- if len(name) == 0 {
- name = value.Type().Field(i).Name
- }
- m[name] = value.Field(i).Interface()
- }
- return m, true
- }
- return nil, false
-}
diff --git a/vendor/github.com/olivere/elastic/uritemplates/utils.go b/vendor/github.com/olivere/elastic/uritemplates/utils.go
deleted file mode 100644
index 399ef4623..000000000
--- a/vendor/github.com/olivere/elastic/uritemplates/utils.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package uritemplates
-
-func Expand(path string, expansions map[string]string) (string, error) {
- template, err := Parse(path)
- if err != nil {
- return "", err
- }
- values := make(map[string]interface{})
- for k, v := range expansions {
- values[k] = v
- }
- return template.Expand(values)
-}
diff --git a/vendor/github.com/olivere/elastic/uritemplates/utils_test.go b/vendor/github.com/olivere/elastic/uritemplates/utils_test.go
deleted file mode 100644
index 633949b6f..000000000
--- a/vendor/github.com/olivere/elastic/uritemplates/utils_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package uritemplates
-
-import (
- "testing"
-)
-
-type ExpandTest struct {
- in string
- expansions map[string]string
- want string
-}
-
-var expandTests = []ExpandTest{
- // #0: no expansions
- {
- "http://www.golang.org/",
- map[string]string{},
- "http://www.golang.org/",
- },
- // #1: one expansion, no escaping
- {
- "http://www.golang.org/{bucket}/delete",
- map[string]string{
- "bucket": "red",
- },
- "http://www.golang.org/red/delete",
- },
- // #2: one expansion, with hex escapes
- {
- "http://www.golang.org/{bucket}/delete",
- map[string]string{
- "bucket": "red/blue",
- },
- "http://www.golang.org/red%2Fblue/delete",
- },
- // #3: one expansion, with space
- {
- "http://www.golang.org/{bucket}/delete",
- map[string]string{
- "bucket": "red or blue",
- },
- "http://www.golang.org/red%20or%20blue/delete",
- },
- // #4: expansion not found
- {
- "http://www.golang.org/{object}/delete",
- map[string]string{
- "bucket": "red or blue",
- },
- "http://www.golang.org//delete",
- },
- // #5: multiple expansions
- {
- "http://www.golang.org/{one}/{two}/{three}/get",
- map[string]string{
- "one": "ONE",
- "two": "TWO",
- "three": "THREE",
- },
- "http://www.golang.org/ONE/TWO/THREE/get",
- },
- // #6: utf-8 characters
- {
- "http://www.golang.org/{bucket}/get",
- map[string]string{
- "bucket": "£100",
- },
- "http://www.golang.org/%C2%A3100/get",
- },
- // #7: punctuations
- {
- "http://www.golang.org/{bucket}/get",
- map[string]string{
- "bucket": `/\@:,.*~`,
- },
- "http://www.golang.org/%2F%5C%40%3A%2C.%2A~/get",
- },
- // #8: mis-matched brackets
- {
- "http://www.golang.org/{bucket/get",
- map[string]string{
- "bucket": "red",
- },
- "",
- },
- // #9: "+" prefix for suppressing escape
- // See also: http://tools.ietf.org/html/rfc6570#section-3.2.3
- {
- "http://www.golang.org/{+topic}",
- map[string]string{
- "topic": "/topics/myproject/mytopic",
- },
- // The double slashes here look weird, but it's intentional
- "http://www.golang.org//topics/myproject/mytopic",
- },
-}
-
-func TestExpand(t *testing.T) {
- for i, test := range expandTests {
- got, _ := Expand(test.in, test.expansions)
- if got != test.want {
- t.Errorf("got %q expected %q in test %d", got, test.want, i)
- }
- }
-}
diff --git a/vendor/github.com/pborman/uuid/marshal_test.go b/vendor/github.com/pborman/uuid/marshal_test.go
deleted file mode 100644
index 4e85b6bab..000000000
--- a/vendor/github.com/pborman/uuid/marshal_test.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "bytes"
- "encoding/json"
- "reflect"
- "testing"
-)
-
-var testUUID = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
-var testArray = testUUID.Array()
-
-func TestJSON(t *testing.T) {
- type S struct {
- ID1 UUID
- ID2 UUID
- }
- s1 := S{ID1: testUUID}
- data, err := json.Marshal(&s1)
- if err != nil {
- t.Fatal(err)
- }
- var s2 S
- if err := json.Unmarshal(data, &s2); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(&s1, &s2) {
- t.Errorf("got %#v, want %#v", s2, s1)
- }
-}
-
-func TestJSONArray(t *testing.T) {
- type S struct {
- ID1 Array
- ID2 Array
- }
- s1 := S{ID1: testArray}
- data, err := json.Marshal(&s1)
- if err != nil {
- t.Fatal(err)
- }
- var s2 S
- if err := json.Unmarshal(data, &s2); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(&s1, &s2) {
- t.Errorf("got %#v, want %#v", s2, s1)
- }
-}
-
-func TestMarshal(t *testing.T) {
- data, err := testUUID.MarshalBinary()
- if err != nil {
- t.Fatalf("MarhsalBinary returned unexpected error %v", err)
- }
- if !bytes.Equal(data, testUUID) {
- t.Fatalf("MarhsalBinary returns %x, want %x", data, testUUID)
- }
- var u UUID
- u.UnmarshalBinary(data)
- if !Equal(data, u) {
- t.Fatalf("UnmarhsalBinary returns %v, want %v", u, testUUID)
- }
-}
-
-func TestMarshalArray(t *testing.T) {
- data, err := testArray.MarshalBinary()
- if err != nil {
- t.Fatalf("MarhsalBinary returned unexpected error %v", err)
- }
- if !bytes.Equal(data, testUUID) {
- t.Fatalf("MarhsalBinary returns %x, want %x", data, testUUID)
- }
- var a Array
- a.UnmarshalBinary(data)
- if a != testArray {
- t.Fatalf("UnmarhsalBinary returns %v, want %v", a, testArray)
- }
-}
-
-func TestMarshalTextArray(t *testing.T) {
- data, err := testArray.MarshalText()
- if err != nil {
- t.Fatalf("MarhsalText returned unexpected error %v", err)
- }
- var a Array
- a.UnmarshalText(data)
- if a != testArray {
- t.Fatalf("UnmarhsalText returns %v, want %v", a, testArray)
- }
-}
-
-func BenchmarkUUID_MarshalJSON(b *testing.B) {
- x := &struct {
- UUID UUID `json:"uuid"`
- }{}
- x.UUID = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if x.UUID == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- js, err := json.Marshal(x)
- if err != nil {
- b.Fatalf("marshal json: %#v (%v)", js, err)
- }
- }
-}
-
-func BenchmarkUUID_UnmarshalJSON(b *testing.B) {
- js := []byte(`{"uuid":"f47ac10b-58cc-0372-8567-0e02b2c3d479"}`)
- var x *struct {
- UUID UUID `json:"uuid"`
- }
- for i := 0; i < b.N; i++ {
- err := json.Unmarshal(js, &x)
- if err != nil {
- b.Fatalf("marshal json: %#v (%v)", js, err)
- }
- }
-}
diff --git a/vendor/github.com/pborman/uuid/seq_test.go b/vendor/github.com/pborman/uuid/seq_test.go
deleted file mode 100644
index 3b3d1430d..000000000
--- a/vendor/github.com/pborman/uuid/seq_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "flag"
- "runtime"
- "testing"
- "time"
-)
-
-// This test is only run when --regressions is passed on the go test line.
-var regressions = flag.Bool("regressions", false, "run uuid regression tests")
-
-// TestClockSeqRace tests for a particular race condition of returning two
-// identical Version1 UUIDs. The duration of 1 minute was chosen as the race
-// condition, before being fixed, nearly always occured in under 30 seconds.
-func TestClockSeqRace(t *testing.T) {
- if !*regressions {
- t.Skip("skipping regression tests")
- }
- duration := time.Minute
-
- done := make(chan struct{})
- defer close(done)
-
- ch := make(chan UUID, 10000)
- ncpu := runtime.NumCPU()
- switch ncpu {
- case 0, 1:
- // We can't run the test effectively.
- t.Skip("skipping race test, only one CPU detected")
- return
- default:
- runtime.GOMAXPROCS(ncpu)
- }
- for i := 0; i < ncpu; i++ {
- go func() {
- for {
- select {
- case <-done:
- return
- case ch <- NewUUID():
- }
- }
- }()
- }
-
- uuids := make(map[string]bool)
- cnt := 0
- start := time.Now()
- for u := range ch {
- s := u.String()
- if uuids[s] {
- t.Errorf("duplicate uuid after %d in %v: %s", cnt, time.Since(start), s)
- return
- }
- uuids[s] = true
- if time.Since(start) > duration {
- return
- }
- cnt++
- }
-}
diff --git a/vendor/github.com/pborman/uuid/sql_test.go b/vendor/github.com/pborman/uuid/sql_test.go
deleted file mode 100644
index 103095156..000000000
--- a/vendor/github.com/pborman/uuid/sql_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "strings"
- "testing"
-)
-
-func TestScan(t *testing.T) {
- var stringTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d479"
- var byteTest []byte = Parse(stringTest)
- var badTypeTest int = 6
- var invalidTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d4"
-
- // sunny day tests
-
- var uuid UUID
- err := (&uuid).Scan(stringTest)
- if err != nil {
- t.Fatal(err)
- }
-
- err = (&uuid).Scan([]byte(stringTest))
- if err != nil {
- t.Fatal(err)
- }
-
- err = (&uuid).Scan(byteTest)
- if err != nil {
- t.Fatal(err)
- }
-
- // bad type tests
-
- err = (&uuid).Scan(badTypeTest)
- if err == nil {
- t.Error("int correctly parsed and shouldn't have")
- }
- if !strings.Contains(err.Error(), "unable to scan type") {
- t.Error("attempting to parse an int returned an incorrect error message")
- }
-
- // invalid/incomplete uuids
-
- err = (&uuid).Scan(invalidTest)
- if err == nil {
- t.Error("invalid uuid was parsed without error")
- }
- if !strings.Contains(err.Error(), "invalid UUID") {
- t.Error("attempting to parse an invalid UUID returned an incorrect error message")
- }
-
- err = (&uuid).Scan(byteTest[:len(byteTest)-2])
- if err == nil {
- t.Error("invalid byte uuid was parsed without error")
- }
- if !strings.Contains(err.Error(), "invalid UUID") {
- t.Error("attempting to parse an invalid byte UUID returned an incorrect error message")
- }
-
- // empty tests
-
- uuid = nil
- var emptySlice []byte
- err = (&uuid).Scan(emptySlice)
- if err != nil {
- t.Fatal(err)
- }
-
- if uuid != nil {
- t.Error("UUID was not nil after scanning empty byte slice")
- }
-
- uuid = nil
- var emptyString string
- err = (&uuid).Scan(emptyString)
- if err != nil {
- t.Fatal(err)
- }
-
- if uuid != nil {
- t.Error("UUID was not nil after scanning empty string")
- }
-}
-
-func TestValue(t *testing.T) {
- stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479"
- uuid := Parse(stringTest)
- val, _ := uuid.Value()
- if val != stringTest {
- t.Error("Value() did not return expected string")
- }
-}
diff --git a/vendor/github.com/pborman/uuid/uuid_test.go b/vendor/github.com/pborman/uuid/uuid_test.go
deleted file mode 100644
index 038723966..000000000
--- a/vendor/github.com/pborman/uuid/uuid_test.go
+++ /dev/null
@@ -1,543 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "bytes"
- "fmt"
- "os"
- "strings"
- "testing"
- "time"
-)
-
-type test struct {
- in string
- version Version
- variant Variant
- isuuid bool
-}
-
-var tests = []test{
- {"f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, RFC4122, true},
- {"f47ac10b-58cc-1372-8567-0e02b2c3d479", 1, RFC4122, true},
- {"f47ac10b-58cc-2372-8567-0e02b2c3d479", 2, RFC4122, true},
- {"f47ac10b-58cc-3372-8567-0e02b2c3d479", 3, RFC4122, true},
- {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true},
- {"f47ac10b-58cc-5372-8567-0e02b2c3d479", 5, RFC4122, true},
- {"f47ac10b-58cc-6372-8567-0e02b2c3d479", 6, RFC4122, true},
- {"f47ac10b-58cc-7372-8567-0e02b2c3d479", 7, RFC4122, true},
- {"f47ac10b-58cc-8372-8567-0e02b2c3d479", 8, RFC4122, true},
- {"f47ac10b-58cc-9372-8567-0e02b2c3d479", 9, RFC4122, true},
- {"f47ac10b-58cc-a372-8567-0e02b2c3d479", 10, RFC4122, true},
- {"f47ac10b-58cc-b372-8567-0e02b2c3d479", 11, RFC4122, true},
- {"f47ac10b-58cc-c372-8567-0e02b2c3d479", 12, RFC4122, true},
- {"f47ac10b-58cc-d372-8567-0e02b2c3d479", 13, RFC4122, true},
- {"f47ac10b-58cc-e372-8567-0e02b2c3d479", 14, RFC4122, true},
- {"f47ac10b-58cc-f372-8567-0e02b2c3d479", 15, RFC4122, true},
-
- {"urn:uuid:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
- {"URN:UUID:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-1567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-2567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-3567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-4567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-5567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-6567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-7567-0e02b2c3d479", 4, Reserved, true},
- {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true},
- {"f47ac10b-58cc-4372-9567-0e02b2c3d479", 4, RFC4122, true},
- {"f47ac10b-58cc-4372-a567-0e02b2c3d479", 4, RFC4122, true},
- {"f47ac10b-58cc-4372-b567-0e02b2c3d479", 4, RFC4122, true},
- {"f47ac10b-58cc-4372-c567-0e02b2c3d479", 4, Microsoft, true},
- {"f47ac10b-58cc-4372-d567-0e02b2c3d479", 4, Microsoft, true},
- {"f47ac10b-58cc-4372-e567-0e02b2c3d479", 4, Future, true},
- {"f47ac10b-58cc-4372-f567-0e02b2c3d479", 4, Future, true},
-
- {"f47ac10b158cc-5372-a567-0e02b2c3d479", 0, Invalid, false},
- {"f47ac10b-58cc25372-a567-0e02b2c3d479", 0, Invalid, false},
- {"f47ac10b-58cc-53723a567-0e02b2c3d479", 0, Invalid, false},
- {"f47ac10b-58cc-5372-a56740e02b2c3d479", 0, Invalid, false},
- {"f47ac10b-58cc-5372-a567-0e02-2c3d479", 0, Invalid, false},
- {"g47ac10b-58cc-4372-a567-0e02b2c3d479", 0, Invalid, false},
-}
-
-var constants = []struct {
- c interface{}
- name string
-}{
- {Person, "Person"},
- {Group, "Group"},
- {Org, "Org"},
- {Invalid, "Invalid"},
- {RFC4122, "RFC4122"},
- {Reserved, "Reserved"},
- {Microsoft, "Microsoft"},
- {Future, "Future"},
- {Domain(17), "Domain17"},
- {Variant(42), "BadVariant42"},
-}
-
-func testTest(t *testing.T, in string, tt test) {
- uuid := Parse(in)
- if ok := (uuid != nil); ok != tt.isuuid {
- t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid)
- }
- if uuid == nil {
- return
- }
-
- if v := uuid.Variant(); v != tt.variant {
- t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant)
- }
- if v, _ := uuid.Version(); v != tt.version {
- t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version)
- }
-}
-
-func TestUUID(t *testing.T) {
- for _, tt := range tests {
- testTest(t, tt.in, tt)
- testTest(t, strings.ToUpper(tt.in), tt)
- }
-}
-
-func TestConstants(t *testing.T) {
- for x, tt := range constants {
- v, ok := tt.c.(fmt.Stringer)
- if !ok {
- t.Errorf("%x: %v: not a stringer", x, v)
- } else if s := v.String(); s != tt.name {
- v, _ := tt.c.(int)
- t.Errorf("%x: Constant %T:%d gives %q, expected %q", x, tt.c, v, s, tt.name)
- }
- }
-}
-
-func TestRandomUUID(t *testing.T) {
- m := make(map[string]bool)
- for x := 1; x < 32; x++ {
- uuid := NewRandom()
- s := uuid.String()
- if m[s] {
- t.Errorf("NewRandom returned duplicated UUID %s", s)
- }
- m[s] = true
- if v, _ := uuid.Version(); v != 4 {
- t.Errorf("Random UUID of version %s", v)
- }
- if uuid.Variant() != RFC4122 {
- t.Errorf("Random UUID is variant %d", uuid.Variant())
- }
- }
-}
-
-func TestNew(t *testing.T) {
- m := make(map[string]bool)
- for x := 1; x < 32; x++ {
- s := New()
- if m[s] {
- t.Errorf("New returned duplicated UUID %s", s)
- }
- m[s] = true
- uuid := Parse(s)
- if uuid == nil {
- t.Errorf("New returned %q which does not decode", s)
- continue
- }
- if v, _ := uuid.Version(); v != 4 {
- t.Errorf("Random UUID of version %s", v)
- }
- if uuid.Variant() != RFC4122 {
- t.Errorf("Random UUID is variant %d", uuid.Variant())
- }
- }
-}
-
-func clockSeq(t *testing.T, uuid UUID) int {
- seq, ok := uuid.ClockSequence()
- if !ok {
- t.Fatalf("%s: invalid clock sequence", uuid)
- }
- return seq
-}
-
-func TestClockSeq(t *testing.T) {
- // Fake time.Now for this test to return a monotonically advancing time; restore it at end.
- defer func(orig func() time.Time) { timeNow = orig }(timeNow)
- monTime := time.Now()
- timeNow = func() time.Time {
- monTime = monTime.Add(1 * time.Second)
- return monTime
- }
-
- SetClockSequence(-1)
- uuid1 := NewUUID()
- uuid2 := NewUUID()
-
- if clockSeq(t, uuid1) != clockSeq(t, uuid2) {
- t.Errorf("clock sequence %d != %d", clockSeq(t, uuid1), clockSeq(t, uuid2))
- }
-
- SetClockSequence(-1)
- uuid2 = NewUUID()
-
- // Just on the very off chance we generated the same sequence
- // two times we try again.
- if clockSeq(t, uuid1) == clockSeq(t, uuid2) {
- SetClockSequence(-1)
- uuid2 = NewUUID()
- }
- if clockSeq(t, uuid1) == clockSeq(t, uuid2) {
- t.Errorf("Duplicate clock sequence %d", clockSeq(t, uuid1))
- }
-
- SetClockSequence(0x1234)
- uuid1 = NewUUID()
- if seq := clockSeq(t, uuid1); seq != 0x1234 {
- t.Errorf("%s: expected seq 0x1234 got 0x%04x", uuid1, seq)
- }
-}
-
-func TestCoding(t *testing.T) {
- text := "7d444840-9dc0-11d1-b245-5ffdce74fad2"
- urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2"
- data := UUID{
- 0x7d, 0x44, 0x48, 0x40,
- 0x9d, 0xc0,
- 0x11, 0xd1,
- 0xb2, 0x45,
- 0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2,
- }
- if v := data.String(); v != text {
- t.Errorf("%x: encoded to %s, expected %s", data, v, text)
- }
- if v := data.URN(); v != urn {
- t.Errorf("%x: urn is %s, expected %s", data, v, urn)
- }
-
- uuid := Parse(text)
- if !Equal(uuid, data) {
- t.Errorf("%s: decoded to %s, expected %s", text, uuid, data)
- }
-}
-
-func TestVersion1(t *testing.T) {
- uuid1 := NewUUID()
- uuid2 := NewUUID()
-
- if Equal(uuid1, uuid2) {
- t.Errorf("%s:duplicate uuid", uuid1)
- }
- if v, _ := uuid1.Version(); v != 1 {
- t.Errorf("%s: version %s expected 1", uuid1, v)
- }
- if v, _ := uuid2.Version(); v != 1 {
- t.Errorf("%s: version %s expected 1", uuid2, v)
- }
- n1 := uuid1.NodeID()
- n2 := uuid2.NodeID()
- if !bytes.Equal(n1, n2) {
- t.Errorf("Different nodes %x != %x", n1, n2)
- }
- t1, ok := uuid1.Time()
- if !ok {
- t.Errorf("%s: invalid time", uuid1)
- }
- t2, ok := uuid2.Time()
- if !ok {
- t.Errorf("%s: invalid time", uuid2)
- }
- q1, ok := uuid1.ClockSequence()
- if !ok {
- t.Errorf("%s: invalid clock sequence", uuid1)
- }
- q2, ok := uuid2.ClockSequence()
- if !ok {
- t.Errorf("%s: invalid clock sequence", uuid2)
- }
-
- switch {
- case t1 == t2 && q1 == q2:
- t.Error("time stopped")
- case t1 > t2 && q1 == q2:
- t.Error("time reversed")
- case t1 < t2 && q1 != q2:
- t.Error("clock sequence chaned unexpectedly")
- }
-}
-
-func TestNode(t *testing.T) {
- // This test is mostly to make sure we don't leave nodeMu locked.
- ifname = ""
- if ni := NodeInterface(); ni != "" {
- t.Errorf("NodeInterface got %q, want %q", ni, "")
- }
- if SetNodeInterface("xyzzy") {
- t.Error("SetNodeInterface succeeded on a bad interface name")
- }
- if !SetNodeInterface("") {
- t.Error("SetNodeInterface failed")
- }
- if ni := NodeInterface(); ni == "" {
- t.Error("NodeInterface returned an empty string")
- }
-
- ni := NodeID()
- if len(ni) != 6 {
- t.Errorf("ni got %d bytes, want 6", len(ni))
- }
- hasData := false
- for _, b := range ni {
- if b != 0 {
- hasData = true
- }
- }
- if !hasData {
- t.Error("nodeid is all zeros")
- }
-
- id := []byte{1, 2, 3, 4, 5, 6, 7, 8}
- SetNodeID(id)
- ni = NodeID()
- if !bytes.Equal(ni, id[:6]) {
- t.Errorf("got nodeid %v, want %v", ni, id[:6])
- }
-
- if ni := NodeInterface(); ni != "user" {
- t.Errorf("got inteface %q, want %q", ni, "user")
- }
-}
-
-func TestNodeAndTime(t *testing.T) {
- // Time is February 5, 1998 12:30:23.136364800 AM GMT
-
- uuid := Parse("7d444840-9dc0-11d1-b245-5ffdce74fad2")
- node := []byte{0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2}
-
- ts, ok := uuid.Time()
- if ok {
- c := time.Unix(ts.UnixTime())
- want := time.Date(1998, 2, 5, 0, 30, 23, 136364800, time.UTC)
- if !c.Equal(want) {
- t.Errorf("Got time %v, want %v", c, want)
- }
- } else {
- t.Errorf("%s: bad time", uuid)
- }
- if !bytes.Equal(node, uuid.NodeID()) {
- t.Errorf("Expected node %v got %v", node, uuid.NodeID())
- }
-}
-
-func TestMD5(t *testing.T) {
- uuid := NewMD5(NameSpace_DNS, []byte("python.org")).String()
- want := "6fa459ea-ee8a-3ca4-894e-db77e160355e"
- if uuid != want {
- t.Errorf("MD5: got %q expected %q", uuid, want)
- }
-}
-
-func TestSHA1(t *testing.T) {
- uuid := NewSHA1(NameSpace_DNS, []byte("python.org")).String()
- want := "886313e1-3b8a-5372-9b90-0c9aee199e5d"
- if uuid != want {
- t.Errorf("SHA1: got %q expected %q", uuid, want)
- }
-}
-
-func TestNodeID(t *testing.T) {
- nid := []byte{1, 2, 3, 4, 5, 6}
- SetNodeInterface("")
- s := NodeInterface()
- if s == "" || s == "user" {
- t.Errorf("NodeInterface %q after SetInteface", s)
- }
- node1 := NodeID()
- if node1 == nil {
- t.Error("NodeID nil after SetNodeInterface", s)
- }
- SetNodeID(nid)
- s = NodeInterface()
- if s != "user" {
- t.Errorf("Expected NodeInterface %q got %q", "user", s)
- }
- node2 := NodeID()
- if node2 == nil {
- t.Error("NodeID nil after SetNodeID", s)
- }
- if bytes.Equal(node1, node2) {
- t.Error("NodeID not changed after SetNodeID", s)
- } else if !bytes.Equal(nid, node2) {
- t.Errorf("NodeID is %x, expected %x", node2, nid)
- }
-}
-
-func testDCE(t *testing.T, name string, uuid UUID, domain Domain, id uint32) {
- if uuid == nil {
- t.Errorf("%s failed", name)
- return
- }
- if v, _ := uuid.Version(); v != 2 {
- t.Errorf("%s: %s: expected version 2, got %s", name, uuid, v)
- return
- }
- if v, ok := uuid.Domain(); !ok || v != domain {
- if !ok {
- t.Errorf("%s: %d: Domain failed", name, uuid)
- } else {
- t.Errorf("%s: %s: expected domain %d, got %d", name, uuid, domain, v)
- }
- }
- if v, ok := uuid.Id(); !ok || v != id {
- if !ok {
- t.Errorf("%s: %d: Id failed", name, uuid)
- } else {
- t.Errorf("%s: %s: expected id %d, got %d", name, uuid, id, v)
- }
- }
-}
-
-func TestDCE(t *testing.T) {
- testDCE(t, "NewDCESecurity", NewDCESecurity(42, 12345678), 42, 12345678)
- testDCE(t, "NewDCEPerson", NewDCEPerson(), Person, uint32(os.Getuid()))
- testDCE(t, "NewDCEGroup", NewDCEGroup(), Group, uint32(os.Getgid()))
-}
-
-type badRand struct{}
-
-func (r badRand) Read(buf []byte) (int, error) {
- for i, _ := range buf {
- buf[i] = byte(i)
- }
- return len(buf), nil
-}
-
-func TestBadRand(t *testing.T) {
- SetRand(badRand{})
- uuid1 := New()
- uuid2 := New()
- if uuid1 != uuid2 {
- t.Errorf("expected duplicates, got %q and %q", uuid1, uuid2)
- }
- SetRand(nil)
- uuid1 = New()
- uuid2 = New()
- if uuid1 == uuid2 {
- t.Errorf("unexpected duplicates, got %q", uuid1)
- }
-}
-
-func TestUUID_Array(t *testing.T) {
- expect := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- t.Fatal("invalid uuid")
- }
- if uuid.Array() != expect {
- t.Fatal("invalid array")
- }
-}
-
-func TestArray_UUID(t *testing.T) {
- array := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if expect == nil {
- t.Fatal("invalid uuid")
- }
- if !bytes.Equal(array.UUID(), expect) {
- t.Fatal("invalid uuid")
- }
-}
-
-func BenchmarkParse(b *testing.B) {
- for i := 0; i < b.N; i++ {
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- b.Fatal("invalid uuid")
- }
- }
-}
-
-func BenchmarkNew(b *testing.B) {
- for i := 0; i < b.N; i++ {
- New()
- }
-}
-
-func BenchmarkUUID_String(b *testing.B) {
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if uuid.String() == "" {
- b.Fatal("invalid uuid")
- }
- }
-}
-
-func BenchmarkUUID_URN(b *testing.B) {
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if uuid.URN() == "" {
- b.Fatal("invalid uuid")
- }
- }
-}
-
-func BenchmarkUUID_Array(b *testing.B) {
- expect := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if uuid.Array() != expect {
- b.Fatal("invalid array")
- }
- }
-}
-
-func BenchmarkArray_UUID(b *testing.B) {
- array := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if expect == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if !bytes.Equal(array.UUID(), expect) {
- b.Fatal("invalid uuid")
- }
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/benchmark_test.go b/vendor/github.com/pelletier/go-toml/benchmark_test.go
deleted file mode 100644
index e1f209dfa..000000000
--- a/vendor/github.com/pelletier/go-toml/benchmark_test.go
+++ /dev/null
@@ -1,192 +0,0 @@
-package toml
-
-import (
- "bytes"
- "encoding/json"
- "io/ioutil"
- "testing"
- "time"
-
- burntsushi "github.com/BurntSushi/toml"
- yaml "gopkg.in/yaml.v2"
-)
-
-type benchmarkDoc struct {
- Table struct {
- Key string
- Subtable struct {
- Key string
- }
- Inline struct {
- Name struct {
- First string
- Last string
- }
- Point struct {
- X int64
- U int64
- }
- }
- }
- String struct {
- Basic struct {
- Basic string
- }
- Multiline struct {
- Key1 string
- Key2 string
- Key3 string
- Continued struct {
- Key1 string
- Key2 string
- Key3 string
- }
- }
- Literal struct {
- Winpath string
- Winpath2 string
- Quoted string
- Regex string
- Multiline struct {
- Regex2 string
- Lines string
- }
- }
- }
- Integer struct {
- Key1 int64
- Key2 int64
- Key3 int64
- Key4 int64
- Underscores struct {
- Key1 int64
- Key2 int64
- Key3 int64
- }
- }
- Float struct {
- Fractional struct {
- Key1 float64
- Key2 float64
- Key3 float64
- }
- Exponent struct {
- Key1 float64
- Key2 float64
- Key3 float64
- }
- Both struct {
- Key float64
- }
- Underscores struct {
- Key1 float64
- Key2 float64
- }
- }
- Boolean struct {
- True bool
- False bool
- }
- Datetime struct {
- Key1 time.Time
- Key2 time.Time
- Key3 time.Time
- }
- Array struct {
- Key1 []int64
- Key2 []string
- Key3 [][]int64
- // TODO: Key4 not supported by go-toml's Unmarshal
- Key5 []int64
- Key6 []int64
- }
- Products []struct {
- Name string
- Sku int64
- Color string
- }
- Fruit []struct {
- Name string
- Physical struct {
- Color string
- Shape string
- Variety []struct {
- Name string
- }
- }
- }
-}
-
-func BenchmarkParseToml(b *testing.B) {
- fileBytes, err := ioutil.ReadFile("benchmark.toml")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, err := LoadReader(bytes.NewReader(fileBytes))
- if err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkUnmarshalToml(b *testing.B) {
- bytes, err := ioutil.ReadFile("benchmark.toml")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- target := benchmarkDoc{}
- err := Unmarshal(bytes, &target)
- if err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkUnmarshalBurntSushiToml(b *testing.B) {
- bytes, err := ioutil.ReadFile("benchmark.toml")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- target := benchmarkDoc{}
- err := burntsushi.Unmarshal(bytes, &target)
- if err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkUnmarshalJson(b *testing.B) {
- bytes, err := ioutil.ReadFile("benchmark.json")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- target := benchmarkDoc{}
- err := json.Unmarshal(bytes, &target)
- if err != nil {
- b.Fatal(err)
- }
- }
-}
-
-func BenchmarkUnmarshalYaml(b *testing.B) {
- bytes, err := ioutil.ReadFile("benchmark.yml")
- if err != nil {
- b.Fatal(err)
- }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- target := benchmarkDoc{}
- err := yaml.Unmarshal(bytes, &target)
- if err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/cmd/test_program.go b/vendor/github.com/pelletier/go-toml/cmd/test_program.go
deleted file mode 100644
index 73077f614..000000000
--- a/vendor/github.com/pelletier/go-toml/cmd/test_program.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package main
-
-import (
- "encoding/json"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "time"
-
- "github.com/pelletier/go-toml"
-)
-
-func main() {
- bytes, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- log.Fatalf("Error during TOML read: %s", err)
- os.Exit(2)
- }
- tree, err := toml.Load(string(bytes))
- if err != nil {
- log.Fatalf("Error during TOML load: %s", err)
- os.Exit(1)
- }
-
- typedTree := translate(*tree)
-
- if err := json.NewEncoder(os.Stdout).Encode(typedTree); err != nil {
- log.Fatalf("Error encoding JSON: %s", err)
- os.Exit(3)
- }
-
- os.Exit(0)
-}
-
-func translate(tomlData interface{}) interface{} {
- switch orig := tomlData.(type) {
- case map[string]interface{}:
- typed := make(map[string]interface{}, len(orig))
- for k, v := range orig {
- typed[k] = translate(v)
- }
- return typed
- case *toml.Tree:
- return translate(*orig)
- case toml.Tree:
- keys := orig.Keys()
- typed := make(map[string]interface{}, len(keys))
- for _, k := range keys {
- typed[k] = translate(orig.GetPath([]string{k}))
- }
- return typed
- case []*toml.Tree:
- typed := make([]map[string]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v).(map[string]interface{})
- }
- return typed
- case []map[string]interface{}:
- typed := make([]map[string]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v).(map[string]interface{})
- }
- return typed
- case []interface{}:
- typed := make([]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v)
- }
- return tag("array", typed)
- case time.Time:
- return tag("datetime", orig.Format("2006-01-02T15:04:05Z"))
- case bool:
- return tag("bool", fmt.Sprintf("%v", orig))
- case int64:
- return tag("integer", fmt.Sprintf("%d", orig))
- case float64:
- return tag("float", fmt.Sprintf("%v", orig))
- case string:
- return tag("string", orig)
- }
-
- panic(fmt.Sprintf("Unknown type: %T", tomlData))
-}
-
-func tag(typeName string, data interface{}) map[string]interface{} {
- return map[string]interface{}{
- "type": typeName,
- "value": data,
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/cmd/tomljson/main.go b/vendor/github.com/pelletier/go-toml/cmd/tomljson/main.go
deleted file mode 100644
index b2d6fc673..000000000
--- a/vendor/github.com/pelletier/go-toml/cmd/tomljson/main.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Tomljson reads TOML and converts to JSON.
-//
-// Usage:
-// cat file.toml | tomljson > file.json
-// tomljson file1.toml > file.json
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "io"
- "os"
-
- "github.com/pelletier/go-toml"
-)
-
-func main() {
- flag.Usage = func() {
- fmt.Fprintln(os.Stderr, `tomljson can be used in two ways:
-Writing to STDIN and reading from STDOUT:
- cat file.toml | tomljson > file.json
-
-Reading from a file name:
- tomljson file.toml
-`)
- }
- flag.Parse()
- os.Exit(processMain(flag.Args(), os.Stdin, os.Stdout, os.Stderr))
-}
-
-func processMain(files []string, defaultInput io.Reader, output io.Writer, errorOutput io.Writer) int {
- // read from stdin and print to stdout
- inputReader := defaultInput
-
- if len(files) > 0 {
- var err error
- inputReader, err = os.Open(files[0])
- if err != nil {
- printError(err, errorOutput)
- return -1
- }
- }
- s, err := reader(inputReader)
- if err != nil {
- printError(err, errorOutput)
- return -1
- }
- io.WriteString(output, s+"\n")
- return 0
-}
-
-func printError(err error, output io.Writer) {
- io.WriteString(output, err.Error()+"\n")
-}
-
-func reader(r io.Reader) (string, error) {
- tree, err := toml.LoadReader(r)
- if err != nil {
- return "", err
- }
- return mapToJSON(tree)
-}
-
-func mapToJSON(tree *toml.Tree) (string, error) {
- treeMap := tree.ToMap()
- bytes, err := json.MarshalIndent(treeMap, "", " ")
- if err != nil {
- return "", err
- }
- return string(bytes[:]), nil
-}
diff --git a/vendor/github.com/pelletier/go-toml/cmd/tomljson/main_test.go b/vendor/github.com/pelletier/go-toml/cmd/tomljson/main_test.go
deleted file mode 100644
index 0b4bdbb11..000000000
--- a/vendor/github.com/pelletier/go-toml/cmd/tomljson/main_test.go
+++ /dev/null
@@ -1,82 +0,0 @@
-package main
-
-import (
- "bytes"
- "io/ioutil"
- "os"
- "strings"
- "testing"
-)
-
-func expectBufferEquality(t *testing.T, name string, buffer *bytes.Buffer, expected string) {
- output := buffer.String()
- if output != expected {
- t.Errorf("incorrect %s:\n%s\n\nexpected %s:\n%s", name, output, name, expected)
- t.Log([]rune(output))
- t.Log([]rune(expected))
- }
-}
-
-func expectProcessMainResults(t *testing.T, input string, args []string, exitCode int, expectedOutput string, expectedError string) {
- inputReader := strings.NewReader(input)
- outputBuffer := new(bytes.Buffer)
- errorBuffer := new(bytes.Buffer)
-
- returnCode := processMain(args, inputReader, outputBuffer, errorBuffer)
-
- expectBufferEquality(t, "output", outputBuffer, expectedOutput)
- expectBufferEquality(t, "error", errorBuffer, expectedError)
-
- if returnCode != exitCode {
- t.Error("incorrect return code:", returnCode, "expected", exitCode)
- }
-}
-
-func TestProcessMainReadFromStdin(t *testing.T) {
- input := `
- [mytoml]
- a = 42`
- expectedOutput := `{
- "mytoml": {
- "a": 42
- }
-}
-`
- expectedError := ``
- expectedExitCode := 0
-
- expectProcessMainResults(t, input, []string{}, expectedExitCode, expectedOutput, expectedError)
-}
-
-func TestProcessMainReadFromFile(t *testing.T) {
- input := `
- [mytoml]
- a = 42`
-
- tmpfile, err := ioutil.TempFile("", "example.toml")
- if err != nil {
- t.Fatal(err)
- }
- if _, err := tmpfile.Write([]byte(input)); err != nil {
- t.Fatal(err)
- }
-
- defer os.Remove(tmpfile.Name())
-
- expectedOutput := `{
- "mytoml": {
- "a": 42
- }
-}
-`
- expectedError := ``
- expectedExitCode := 0
-
- expectProcessMainResults(t, ``, []string{tmpfile.Name()}, expectedExitCode, expectedOutput, expectedError)
-}
-
-func TestProcessMainReadFromMissingFile(t *testing.T) {
- expectedError := `open /this/file/does/not/exist: no such file or directory
-`
- expectProcessMainResults(t, ``, []string{"/this/file/does/not/exist"}, -1, ``, expectedError)
-}
diff --git a/vendor/github.com/pelletier/go-toml/cmd/tomll/main.go b/vendor/github.com/pelletier/go-toml/cmd/tomll/main.go
deleted file mode 100644
index 36c7e3759..000000000
--- a/vendor/github.com/pelletier/go-toml/cmd/tomll/main.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Tomll is a linter for TOML
-//
-// Usage:
-// cat file.toml | tomll > file_linted.toml
-// tomll file1.toml file2.toml # lint the two files in place
-package main
-
-import (
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "os"
-
- "github.com/pelletier/go-toml"
-)
-
-func main() {
- flag.Usage = func() {
- fmt.Fprintln(os.Stderr, `tomll can be used in two ways:
-Writing to STDIN and reading from STDOUT:
- cat file.toml | tomll > file.toml
-
-Reading and updating a list of files:
- tomll a.toml b.toml c.toml
-
-When given a list of files, tomll will modify all files in place without asking.
-`)
- }
- flag.Parse()
- // read from stdin and print to stdout
- if flag.NArg() == 0 {
- s, err := lintReader(os.Stdin)
- if err != nil {
- io.WriteString(os.Stderr, err.Error())
- os.Exit(-1)
- }
- io.WriteString(os.Stdout, s)
- } else {
- // otherwise modify a list of files
- for _, filename := range flag.Args() {
- s, err := lintFile(filename)
- if err != nil {
- io.WriteString(os.Stderr, err.Error())
- os.Exit(-1)
- }
- ioutil.WriteFile(filename, []byte(s), 0644)
- }
- }
-}
-
-func lintFile(filename string) (string, error) {
- tree, err := toml.LoadFile(filename)
- if err != nil {
- return "", err
- }
- return tree.String(), nil
-}
-
-func lintReader(r io.Reader) (string, error) {
- tree, err := toml.LoadReader(r)
- if err != nil {
- return "", err
- }
- return tree.String(), nil
-}
diff --git a/vendor/github.com/pelletier/go-toml/doc_test.go b/vendor/github.com/pelletier/go-toml/doc_test.go
deleted file mode 100644
index 3b8171b22..000000000
--- a/vendor/github.com/pelletier/go-toml/doc_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// code examples for godoc
-
-package toml_test
-
-import (
- "fmt"
- "log"
-
- toml "github.com/pelletier/go-toml"
-)
-
-func Example_tree() {
- config, err := toml.LoadFile("config.toml")
-
- if err != nil {
- fmt.Println("Error ", err.Error())
- } else {
- // retrieve data directly
- user := config.Get("postgres.user").(string)
- password := config.Get("postgres.password").(string)
-
- // or using an intermediate object
- configTree := config.Get("postgres").(*toml.Tree)
- user = configTree.Get("user").(string)
- password = configTree.Get("password").(string)
- fmt.Println("User is", user, " and password is", password)
-
- // show where elements are in the file
- fmt.Printf("User position: %v\n", configTree.GetPosition("user"))
- fmt.Printf("Password position: %v\n", configTree.GetPosition("password"))
- }
-}
-
-func Example_unmarshal() {
- type Employer struct {
- Name string
- Phone string
- }
- type Person struct {
- Name string
- Age int64
- Employer Employer
- }
-
- document := []byte(`
- name = "John"
- age = 30
- [employer]
- name = "Company Inc."
- phone = "+1 234 567 89012"
- `)
-
- person := Person{}
- toml.Unmarshal(document, &person)
- fmt.Println(person.Name, "is", person.Age, "and works at", person.Employer.Name)
- // Output:
- // John is 30 and works at Company Inc.
-}
-
-func ExampleMarshal() {
- type Postgres struct {
- User string `toml:"user"`
- Password string `toml:"password"`
- Database string `toml:"db" commented:"true" comment:"not used anymore"`
- }
- type Config struct {
- Postgres Postgres `toml:"postgres" comment:"Postgres configuration"`
- }
-
- config := Config{Postgres{User: "pelletier", Password: "mypassword", Database: "old_database"}}
- b, err := toml.Marshal(config)
- if err != nil {
- log.Fatal(err)
- }
- fmt.Println(string(b))
- // Output:
- // # Postgres configuration
- // [postgres]
- //
- // # not used anymore
- // # db = "old_database"
- // password = "mypassword"
- // user = "pelletier"
-}
-
-func ExampleUnmarshal() {
- type Postgres struct {
- User string
- Password string
- }
- type Config struct {
- Postgres Postgres
- }
-
- doc := []byte(`
- [postgres]
- user = "pelletier"
- password = "mypassword"`)
-
- config := Config{}
- toml.Unmarshal(doc, &config)
- fmt.Println("user=", config.Postgres.User)
- // Output:
- // user= pelletier
-}
diff --git a/vendor/github.com/pelletier/go-toml/keysparsing_test.go b/vendor/github.com/pelletier/go-toml/keysparsing_test.go
deleted file mode 100644
index 84cb82604..000000000
--- a/vendor/github.com/pelletier/go-toml/keysparsing_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package toml
-
-import (
- "fmt"
- "testing"
-)
-
-func testResult(t *testing.T, key string, expected []string) {
- parsed, err := parseKey(key)
- t.Logf("key=%s expected=%s parsed=%s", key, expected, parsed)
- if err != nil {
- t.Fatal("Unexpected error:", err)
- }
- if len(expected) != len(parsed) {
- t.Fatal("Expected length", len(expected), "but", len(parsed), "parsed")
- }
- for index, expectedKey := range expected {
- if expectedKey != parsed[index] {
- t.Fatal("Expected", expectedKey, "at index", index, "but found", parsed[index])
- }
- }
-}
-
-func testError(t *testing.T, key string, expectedError string) {
- res, err := parseKey(key)
- if err == nil {
- t.Fatalf("Expected error, but succesfully parsed key %s", res)
- }
- if fmt.Sprintf("%s", err) != expectedError {
- t.Fatalf("Expected error \"%s\", but got \"%s\".", expectedError, err)
- }
-}
-
-func TestBareKeyBasic(t *testing.T) {
- testResult(t, "test", []string{"test"})
-}
-
-func TestBareKeyDotted(t *testing.T) {
- testResult(t, "this.is.a.key", []string{"this", "is", "a", "key"})
-}
-
-func TestDottedKeyBasic(t *testing.T) {
- testResult(t, "\"a.dotted.key\"", []string{"a.dotted.key"})
-}
-
-func TestBaseKeyPound(t *testing.T) {
- testError(t, "hello#world", "invalid bare character: #")
-}
-
-func TestQuotedKeys(t *testing.T) {
- testResult(t, `hello."foo".bar`, []string{"hello", "foo", "bar"})
- testResult(t, `"hello!"`, []string{"hello!"})
- testResult(t, `foo."ba.r".baz`, []string{"foo", "ba.r", "baz"})
-
- // escape sequences must not be converted
- testResult(t, `"hello\tworld"`, []string{`hello\tworld`})
-}
-
-func TestEmptyKey(t *testing.T) {
- testError(t, "", "empty key")
- testError(t, " ", "empty key")
- testResult(t, `""`, []string{""})
-}
diff --git a/vendor/github.com/pelletier/go-toml/lexer_test.go b/vendor/github.com/pelletier/go-toml/lexer_test.go
deleted file mode 100644
index cb4913031..000000000
--- a/vendor/github.com/pelletier/go-toml/lexer_test.go
+++ /dev/null
@@ -1,750 +0,0 @@
-package toml
-
-import (
- "reflect"
- "testing"
-)
-
-func testFlow(t *testing.T, input string, expectedFlow []token) {
- tokens := lexToml([]byte(input))
- if !reflect.DeepEqual(tokens, expectedFlow) {
- t.Fatal("Different flows. Expected\n", expectedFlow, "\nGot:\n", tokens)
- }
-}
-
-func TestValidKeyGroup(t *testing.T) {
- testFlow(t, "[hello world]", []token{
- {Position{1, 1}, tokenLeftBracket, "["},
- {Position{1, 2}, tokenKeyGroup, "hello world"},
- {Position{1, 13}, tokenRightBracket, "]"},
- {Position{1, 14}, tokenEOF, ""},
- })
-}
-
-func TestNestedQuotedUnicodeKeyGroup(t *testing.T) {
- testFlow(t, `[ j . "Êž" . l ]`, []token{
- {Position{1, 1}, tokenLeftBracket, "["},
- {Position{1, 2}, tokenKeyGroup, ` j . "Êž" . l `},
- {Position{1, 15}, tokenRightBracket, "]"},
- {Position{1, 16}, tokenEOF, ""},
- })
-}
-
-func TestUnclosedKeyGroup(t *testing.T) {
- testFlow(t, "[hello world", []token{
- {Position{1, 1}, tokenLeftBracket, "["},
- {Position{1, 2}, tokenError, "unclosed table key"},
- })
-}
-
-func TestComment(t *testing.T) {
- testFlow(t, "# blahblah", []token{
- {Position{1, 11}, tokenEOF, ""},
- })
-}
-
-func TestKeyGroupComment(t *testing.T) {
- testFlow(t, "[hello world] # blahblah", []token{
- {Position{1, 1}, tokenLeftBracket, "["},
- {Position{1, 2}, tokenKeyGroup, "hello world"},
- {Position{1, 13}, tokenRightBracket, "]"},
- {Position{1, 25}, tokenEOF, ""},
- })
-}
-
-func TestMultipleKeyGroupsComment(t *testing.T) {
- testFlow(t, "[hello world] # blahblah\n[test]", []token{
- {Position{1, 1}, tokenLeftBracket, "["},
- {Position{1, 2}, tokenKeyGroup, "hello world"},
- {Position{1, 13}, tokenRightBracket, "]"},
- {Position{2, 1}, tokenLeftBracket, "["},
- {Position{2, 2}, tokenKeyGroup, "test"},
- {Position{2, 6}, tokenRightBracket, "]"},
- {Position{2, 7}, tokenEOF, ""},
- })
-}
-
-func TestSimpleWindowsCRLF(t *testing.T) {
- testFlow(t, "a=4\r\nb=2", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 2}, tokenEqual, "="},
- {Position{1, 3}, tokenInteger, "4"},
- {Position{2, 1}, tokenKey, "b"},
- {Position{2, 2}, tokenEqual, "="},
- {Position{2, 3}, tokenInteger, "2"},
- {Position{2, 4}, tokenEOF, ""},
- })
-}
-
-func TestBasicKey(t *testing.T) {
- testFlow(t, "hello", []token{
- {Position{1, 1}, tokenKey, "hello"},
- {Position{1, 6}, tokenEOF, ""},
- })
-}
-
-func TestBasicKeyWithUnderscore(t *testing.T) {
- testFlow(t, "hello_hello", []token{
- {Position{1, 1}, tokenKey, "hello_hello"},
- {Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestBasicKeyWithDash(t *testing.T) {
- testFlow(t, "hello-world", []token{
- {Position{1, 1}, tokenKey, "hello-world"},
- {Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestBasicKeyWithUppercaseMix(t *testing.T) {
- testFlow(t, "helloHELLOHello", []token{
- {Position{1, 1}, tokenKey, "helloHELLOHello"},
- {Position{1, 16}, tokenEOF, ""},
- })
-}
-
-func TestBasicKeyWithInternationalCharacters(t *testing.T) {
- testFlow(t, "héllÖ", []token{
- {Position{1, 1}, tokenKey, "héllÖ"},
- {Position{1, 6}, tokenEOF, ""},
- })
-}
-
-func TestBasicKeyAndEqual(t *testing.T) {
- testFlow(t, "hello =", []token{
- {Position{1, 1}, tokenKey, "hello"},
- {Position{1, 7}, tokenEqual, "="},
- {Position{1, 8}, tokenEOF, ""},
- })
-}
-
-func TestKeyWithSharpAndEqual(t *testing.T) {
- testFlow(t, "key#name = 5", []token{
- {Position{1, 1}, tokenError, "keys cannot contain # character"},
- })
-}
-
-func TestKeyWithSymbolsAndEqual(t *testing.T) {
- testFlow(t, "~!@$^&*()_+-`1234567890[]\\|/?><.,;:' = 5", []token{
- {Position{1, 1}, tokenError, "keys cannot contain ~ character"},
- })
-}
-
-func TestKeyEqualStringEscape(t *testing.T) {
- testFlow(t, `foo = "hello\""`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "hello\""},
- {Position{1, 16}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualStringUnfinished(t *testing.T) {
- testFlow(t, `foo = "bar`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unclosed string"},
- })
-}
-
-func TestKeyEqualString(t *testing.T) {
- testFlow(t, `foo = "bar"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "bar"},
- {Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualTrue(t *testing.T) {
- testFlow(t, "foo = true", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenTrue, "true"},
- {Position{1, 11}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualFalse(t *testing.T) {
- testFlow(t, "foo = false", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenFalse, "false"},
- {Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestArrayNestedString(t *testing.T) {
- testFlow(t, `a = [ ["hello", "world"] ]`, []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenLeftBracket, "["},
- {Position{1, 7}, tokenLeftBracket, "["},
- {Position{1, 9}, tokenString, "hello"},
- {Position{1, 15}, tokenComma, ","},
- {Position{1, 18}, tokenString, "world"},
- {Position{1, 24}, tokenRightBracket, "]"},
- {Position{1, 26}, tokenRightBracket, "]"},
- {Position{1, 27}, tokenEOF, ""},
- })
-}
-
-func TestArrayNestedInts(t *testing.T) {
- testFlow(t, "a = [ [42, 21], [10] ]", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenLeftBracket, "["},
- {Position{1, 7}, tokenLeftBracket, "["},
- {Position{1, 8}, tokenInteger, "42"},
- {Position{1, 10}, tokenComma, ","},
- {Position{1, 12}, tokenInteger, "21"},
- {Position{1, 14}, tokenRightBracket, "]"},
- {Position{1, 15}, tokenComma, ","},
- {Position{1, 17}, tokenLeftBracket, "["},
- {Position{1, 18}, tokenInteger, "10"},
- {Position{1, 20}, tokenRightBracket, "]"},
- {Position{1, 22}, tokenRightBracket, "]"},
- {Position{1, 23}, tokenEOF, ""},
- })
-}
-
-func TestArrayInts(t *testing.T) {
- testFlow(t, "a = [ 42, 21, 10, ]", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenLeftBracket, "["},
- {Position{1, 7}, tokenInteger, "42"},
- {Position{1, 9}, tokenComma, ","},
- {Position{1, 11}, tokenInteger, "21"},
- {Position{1, 13}, tokenComma, ","},
- {Position{1, 15}, tokenInteger, "10"},
- {Position{1, 17}, tokenComma, ","},
- {Position{1, 19}, tokenRightBracket, "]"},
- {Position{1, 20}, tokenEOF, ""},
- })
-}
-
-func TestMultilineArrayComments(t *testing.T) {
- testFlow(t, "a = [1, # wow\n2, # such items\n3, # so array\n]", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenLeftBracket, "["},
- {Position{1, 6}, tokenInteger, "1"},
- {Position{1, 7}, tokenComma, ","},
- {Position{2, 1}, tokenInteger, "2"},
- {Position{2, 2}, tokenComma, ","},
- {Position{3, 1}, tokenInteger, "3"},
- {Position{3, 2}, tokenComma, ","},
- {Position{4, 1}, tokenRightBracket, "]"},
- {Position{4, 2}, tokenEOF, ""},
- })
-}
-
-func TestNestedArraysComment(t *testing.T) {
- toml := `
-someArray = [
-# does not work
-["entry1"]
-]`
- testFlow(t, toml, []token{
- {Position{2, 1}, tokenKey, "someArray"},
- {Position{2, 11}, tokenEqual, "="},
- {Position{2, 13}, tokenLeftBracket, "["},
- {Position{4, 1}, tokenLeftBracket, "["},
- {Position{4, 3}, tokenString, "entry1"},
- {Position{4, 10}, tokenRightBracket, "]"},
- {Position{5, 1}, tokenRightBracket, "]"},
- {Position{5, 2}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualArrayBools(t *testing.T) {
- testFlow(t, "foo = [true, false, true]", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenLeftBracket, "["},
- {Position{1, 8}, tokenTrue, "true"},
- {Position{1, 12}, tokenComma, ","},
- {Position{1, 14}, tokenFalse, "false"},
- {Position{1, 19}, tokenComma, ","},
- {Position{1, 21}, tokenTrue, "true"},
- {Position{1, 25}, tokenRightBracket, "]"},
- {Position{1, 26}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualArrayBoolsWithComments(t *testing.T) {
- testFlow(t, "foo = [true, false, true] # YEAH", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenLeftBracket, "["},
- {Position{1, 8}, tokenTrue, "true"},
- {Position{1, 12}, tokenComma, ","},
- {Position{1, 14}, tokenFalse, "false"},
- {Position{1, 19}, tokenComma, ","},
- {Position{1, 21}, tokenTrue, "true"},
- {Position{1, 25}, tokenRightBracket, "]"},
- {Position{1, 33}, tokenEOF, ""},
- })
-}
-
-func TestDateRegexp(t *testing.T) {
- if dateRegexp.FindString("1979-05-27T07:32:00Z") == "" {
- t.Error("basic lexing")
- }
- if dateRegexp.FindString("1979-05-27T00:32:00-07:00") == "" {
- t.Error("offset lexing")
- }
- if dateRegexp.FindString("1979-05-27T00:32:00.999999-07:00") == "" {
- t.Error("nano precision lexing")
- }
-}
-
-func TestKeyEqualDate(t *testing.T) {
- testFlow(t, "foo = 1979-05-27T07:32:00Z", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenDate, "1979-05-27T07:32:00Z"},
- {Position{1, 27}, tokenEOF, ""},
- })
- testFlow(t, "foo = 1979-05-27T00:32:00-07:00", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenDate, "1979-05-27T00:32:00-07:00"},
- {Position{1, 32}, tokenEOF, ""},
- })
- testFlow(t, "foo = 1979-05-27T00:32:00.999999-07:00", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenDate, "1979-05-27T00:32:00.999999-07:00"},
- {Position{1, 39}, tokenEOF, ""},
- })
-}
-
-func TestFloatEndingWithDot(t *testing.T) {
- testFlow(t, "foo = 42.", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenError, "float cannot end with a dot"},
- })
-}
-
-func TestFloatWithTwoDots(t *testing.T) {
- testFlow(t, "foo = 4.2.", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenError, "cannot have two dots in one float"},
- })
-}
-
-func TestFloatWithExponent1(t *testing.T) {
- testFlow(t, "a = 5e+22", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenFloat, "5e+22"},
- {Position{1, 10}, tokenEOF, ""},
- })
-}
-
-func TestFloatWithExponent2(t *testing.T) {
- testFlow(t, "a = 5E+22", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenFloat, "5E+22"},
- {Position{1, 10}, tokenEOF, ""},
- })
-}
-
-func TestFloatWithExponent3(t *testing.T) {
- testFlow(t, "a = -5e+22", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenFloat, "-5e+22"},
- {Position{1, 11}, tokenEOF, ""},
- })
-}
-
-func TestFloatWithExponent4(t *testing.T) {
- testFlow(t, "a = -5e-22", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenFloat, "-5e-22"},
- {Position{1, 11}, tokenEOF, ""},
- })
-}
-
-func TestFloatWithExponent5(t *testing.T) {
- testFlow(t, "a = 6.626e-34", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenFloat, "6.626e-34"},
- {Position{1, 14}, tokenEOF, ""},
- })
-}
-
-func TestInvalidEsquapeSequence(t *testing.T) {
- testFlow(t, `foo = "\x"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "invalid escape sequence: \\x"},
- })
-}
-
-func TestNestedArrays(t *testing.T) {
- testFlow(t, "foo = [[[]]]", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenLeftBracket, "["},
- {Position{1, 8}, tokenLeftBracket, "["},
- {Position{1, 9}, tokenLeftBracket, "["},
- {Position{1, 10}, tokenRightBracket, "]"},
- {Position{1, 11}, tokenRightBracket, "]"},
- {Position{1, 12}, tokenRightBracket, "]"},
- {Position{1, 13}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualNumber(t *testing.T) {
- testFlow(t, "foo = 42", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "42"},
- {Position{1, 9}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = +42", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "+42"},
- {Position{1, 10}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = -42", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "-42"},
- {Position{1, 10}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = 4.2", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenFloat, "4.2"},
- {Position{1, 10}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = +4.2", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenFloat, "+4.2"},
- {Position{1, 11}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = -4.2", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenFloat, "-4.2"},
- {Position{1, 11}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = 1_000", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "1_000"},
- {Position{1, 12}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = 5_349_221", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "5_349_221"},
- {Position{1, 16}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = 1_2_3_4_5", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "1_2_3_4_5"},
- {Position{1, 16}, tokenEOF, ""},
- })
-
- testFlow(t, "flt8 = 9_224_617.445_991_228_313", []token{
- {Position{1, 1}, tokenKey, "flt8"},
- {Position{1, 6}, tokenEqual, "="},
- {Position{1, 8}, tokenFloat, "9_224_617.445_991_228_313"},
- {Position{1, 33}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = +", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenError, "no digit in that number"},
- })
-}
-
-func TestMultiline(t *testing.T) {
- testFlow(t, "foo = 42\nbar=21", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 7}, tokenInteger, "42"},
- {Position{2, 1}, tokenKey, "bar"},
- {Position{2, 4}, tokenEqual, "="},
- {Position{2, 5}, tokenInteger, "21"},
- {Position{2, 7}, tokenEOF, ""},
- })
-}
-
-func TestKeyEqualStringUnicodeEscape(t *testing.T) {
- testFlow(t, `foo = "hello \u2665"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "hello ♥"},
- {Position{1, 21}, tokenEOF, ""},
- })
- testFlow(t, `foo = "hello \U000003B4"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "hello δ"},
- {Position{1, 25}, tokenEOF, ""},
- })
- testFlow(t, `foo = "\uabcd"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "\uabcd"},
- {Position{1, 15}, tokenEOF, ""},
- })
- testFlow(t, `foo = "\uABCD"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "\uABCD"},
- {Position{1, 15}, tokenEOF, ""},
- })
- testFlow(t, `foo = "\U000bcdef"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "\U000bcdef"},
- {Position{1, 19}, tokenEOF, ""},
- })
- testFlow(t, `foo = "\U000BCDEF"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "\U000BCDEF"},
- {Position{1, 19}, tokenEOF, ""},
- })
- testFlow(t, `foo = "\u2"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unfinished unicode escape"},
- })
- testFlow(t, `foo = "\U2"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unfinished unicode escape"},
- })
-}
-
-func TestKeyEqualStringNoEscape(t *testing.T) {
- testFlow(t, "foo = \"hello \u0002\"", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unescaped control character U+0002"},
- })
- testFlow(t, "foo = \"hello \u001F\"", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unescaped control character U+001F"},
- })
-}
-
-func TestLiteralString(t *testing.T) {
- testFlow(t, `foo = 'C:\Users\nodejs\templates'`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, `C:\Users\nodejs\templates`},
- {Position{1, 34}, tokenEOF, ""},
- })
- testFlow(t, `foo = '\\ServerX\admin$\system32\'`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, `\\ServerX\admin$\system32\`},
- {Position{1, 35}, tokenEOF, ""},
- })
- testFlow(t, `foo = 'Tom "Dubs" Preston-Werner'`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, `Tom "Dubs" Preston-Werner`},
- {Position{1, 34}, tokenEOF, ""},
- })
- testFlow(t, `foo = '<\i\c*\s*>'`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, `<\i\c*\s*>`},
- {Position{1, 19}, tokenEOF, ""},
- })
- testFlow(t, `foo = 'C:\Users\nodejs\unfinis`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenError, "unclosed string"},
- })
-}
-
-func TestMultilineLiteralString(t *testing.T) {
- testFlow(t, `foo = '''hello 'literal' world'''`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 10}, tokenString, `hello 'literal' world`},
- {Position{1, 34}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = '''\nhello\n'literal'\nworld'''", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{2, 1}, tokenString, "hello\n'literal'\nworld"},
- {Position{4, 9}, tokenEOF, ""},
- })
- testFlow(t, "foo = '''\r\nhello\r\n'literal'\r\nworld'''", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{2, 1}, tokenString, "hello\r\n'literal'\r\nworld"},
- {Position{4, 9}, tokenEOF, ""},
- })
-}
-
-func TestMultilineString(t *testing.T) {
- testFlow(t, `foo = """hello "literal" world"""`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 10}, tokenString, `hello "literal" world`},
- {Position{1, 34}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = \"\"\"\r\nhello\\\r\n\"literal\"\\\nworld\"\"\"", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{2, 1}, tokenString, "hello\"literal\"world"},
- {Position{4, 9}, tokenEOF, ""},
- })
-
- testFlow(t, "foo = \"\"\"\\\n \\\n \\\n hello\\\nmultiline\\\nworld\"\"\"", []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 10}, tokenString, "hellomultilineworld"},
- {Position{6, 9}, tokenEOF, ""},
- })
-
- testFlow(t, "key2 = \"\"\"\nThe quick brown \\\n\n\n fox jumps over \\\n the lazy dog.\"\"\"", []token{
- {Position{1, 1}, tokenKey, "key2"},
- {Position{1, 6}, tokenEqual, "="},
- {Position{2, 1}, tokenString, "The quick brown fox jumps over the lazy dog."},
- {Position{6, 21}, tokenEOF, ""},
- })
-
- testFlow(t, "key2 = \"\"\"\\\n The quick brown \\\n fox jumps over \\\n the lazy dog.\\\n \"\"\"", []token{
- {Position{1, 1}, tokenKey, "key2"},
- {Position{1, 6}, tokenEqual, "="},
- {Position{1, 11}, tokenString, "The quick brown fox jumps over the lazy dog."},
- {Position{5, 11}, tokenEOF, ""},
- })
-
- testFlow(t, `key2 = "Roses are red\nViolets are blue"`, []token{
- {Position{1, 1}, tokenKey, "key2"},
- {Position{1, 6}, tokenEqual, "="},
- {Position{1, 9}, tokenString, "Roses are red\nViolets are blue"},
- {Position{1, 41}, tokenEOF, ""},
- })
-
- testFlow(t, "key2 = \"\"\"\nRoses are red\nViolets are blue\"\"\"", []token{
- {Position{1, 1}, tokenKey, "key2"},
- {Position{1, 6}, tokenEqual, "="},
- {Position{2, 1}, tokenString, "Roses are red\nViolets are blue"},
- {Position{3, 20}, tokenEOF, ""},
- })
-}
-
-func TestUnicodeString(t *testing.T) {
- testFlow(t, `foo = "hello ♥ world"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "hello ♥ world"},
- {Position{1, 22}, tokenEOF, ""},
- })
-}
-func TestEscapeInString(t *testing.T) {
- testFlow(t, `foo = "\b\f\/"`, []token{
- {Position{1, 1}, tokenKey, "foo"},
- {Position{1, 5}, tokenEqual, "="},
- {Position{1, 8}, tokenString, "\b\f/"},
- {Position{1, 15}, tokenEOF, ""},
- })
-}
-
-func TestKeyGroupArray(t *testing.T) {
- testFlow(t, "[[foo]]", []token{
- {Position{1, 1}, tokenDoubleLeftBracket, "[["},
- {Position{1, 3}, tokenKeyGroupArray, "foo"},
- {Position{1, 6}, tokenDoubleRightBracket, "]]"},
- {Position{1, 8}, tokenEOF, ""},
- })
-}
-
-func TestQuotedKey(t *testing.T) {
- testFlow(t, "\"a b\" = 42", []token{
- {Position{1, 1}, tokenKey, "a b"},
- {Position{1, 7}, tokenEqual, "="},
- {Position{1, 9}, tokenInteger, "42"},
- {Position{1, 11}, tokenEOF, ""},
- })
-}
-
-func TestKeyNewline(t *testing.T) {
- testFlow(t, "a\n= 4", []token{
- {Position{1, 1}, tokenError, "keys cannot contain new lines"},
- })
-}
-
-func TestInvalidFloat(t *testing.T) {
- testFlow(t, "a=7e1_", []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 2}, tokenEqual, "="},
- {Position{1, 3}, tokenFloat, "7e1_"},
- {Position{1, 7}, tokenEOF, ""},
- })
-}
-
-func TestLexUnknownRvalue(t *testing.T) {
- testFlow(t, `a = !b`, []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenError, "no value can start with !"},
- })
-
- testFlow(t, `a = \b`, []token{
- {Position{1, 1}, tokenKey, "a"},
- {Position{1, 3}, tokenEqual, "="},
- {Position{1, 5}, tokenError, `no value can start with \`},
- })
-}
-
-func BenchmarkLexer(b *testing.B) {
- sample := `title = "Hugo: A Fast and Flexible Website Generator"
-baseurl = "http://gohugo.io/"
-MetaDataFormat = "yaml"
-pluralizeListTitles = false
-
-[params]
- description = "Documentation of Hugo, a fast and flexible static site generator built with love by spf13, bep and friends in Go"
- author = "Steve Francia (spf13) and friends"
- release = "0.22-DEV"
-
-[[menu.main]]
- name = "Download Hugo"
- pre = "<i class='fa fa-download'></i>"
- url = "https://github.com/spf13/hugo/releases"
- weight = -200
-`
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- lexToml([]byte(sample))
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/marshal_test.go b/vendor/github.com/pelletier/go-toml/marshal_test.go
deleted file mode 100644
index 291a80d2a..000000000
--- a/vendor/github.com/pelletier/go-toml/marshal_test.go
+++ /dev/null
@@ -1,806 +0,0 @@
-package toml
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-type basicMarshalTestStruct struct {
- String string `toml:"string"`
- StringList []string `toml:"strlist"`
- Sub basicMarshalTestSubStruct `toml:"subdoc"`
- SubList []basicMarshalTestSubStruct `toml:"sublist"`
-}
-
-type basicMarshalTestSubStruct struct {
- String2 string
-}
-
-var basicTestData = basicMarshalTestStruct{
- String: "Hello",
- StringList: []string{"Howdy", "Hey There"},
- Sub: basicMarshalTestSubStruct{"One"},
- SubList: []basicMarshalTestSubStruct{{"Two"}, {"Three"}},
-}
-
-var basicTestToml = []byte(`string = "Hello"
-strlist = ["Howdy","Hey There"]
-
-[subdoc]
- String2 = "One"
-
-[[sublist]]
- String2 = "Two"
-
-[[sublist]]
- String2 = "Three"
-`)
-
-func TestBasicMarshal(t *testing.T) {
- result, err := Marshal(basicTestData)
- if err != nil {
- t.Fatal(err)
- }
- expected := basicTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestBasicUnmarshal(t *testing.T) {
- result := basicMarshalTestStruct{}
- err := Unmarshal(basicTestToml, &result)
- expected := basicTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-type testDoc struct {
- Title string `toml:"title"`
- Basics testDocBasics `toml:"basic"`
- BasicLists testDocBasicLists `toml:"basic_lists"`
- BasicMap map[string]string `toml:"basic_map"`
- Subdocs testDocSubs `toml:"subdoc"`
- SubDocList []testSubDoc `toml:"subdoclist"`
- SubDocPtrs []*testSubDoc `toml:"subdocptrs"`
- err int `toml:"shouldntBeHere"`
- unexported int `toml:"shouldntBeHere"`
- Unexported2 int `toml:"-"`
-}
-
-type testDocBasics struct {
- Bool bool `toml:"bool"`
- Date time.Time `toml:"date"`
- Float float32 `toml:"float"`
- Int int `toml:"int"`
- Uint uint `toml:"uint"`
- String *string `toml:"string"`
- unexported int `toml:"shouldntBeHere"`
-}
-
-type testDocBasicLists struct {
- Bools []bool `toml:"bools"`
- Dates []time.Time `toml:"dates"`
- Floats []*float32 `toml:"floats"`
- Ints []int `toml:"ints"`
- Strings []string `toml:"strings"`
- UInts []uint `toml:"uints"`
-}
-
-type testDocSubs struct {
- First testSubDoc `toml:"first"`
- Second *testSubDoc `toml:"second"`
-}
-
-type testSubDoc struct {
- Name string `toml:"name"`
- unexported int `toml:"shouldntBeHere"`
-}
-
-var biteMe = "Bite me"
-var float1 float32 = 12.3
-var float2 float32 = 45.6
-var float3 float32 = 78.9
-var subdoc = testSubDoc{"Second", 0}
-
-var docData = testDoc{
- Title: "TOML Marshal Testing",
- unexported: 0,
- Unexported2: 0,
- Basics: testDocBasics{
- Bool: true,
- Date: time.Date(1979, 5, 27, 7, 32, 0, 0, time.UTC),
- Float: 123.4,
- Int: 5000,
- Uint: 5001,
- String: &biteMe,
- unexported: 0,
- },
- BasicLists: testDocBasicLists{
- Bools: []bool{true, false, true},
- Dates: []time.Time{
- time.Date(1979, 5, 27, 7, 32, 0, 0, time.UTC),
- time.Date(1980, 5, 27, 7, 32, 0, 0, time.UTC),
- },
- Floats: []*float32{&float1, &float2, &float3},
- Ints: []int{8001, 8001, 8002},
- Strings: []string{"One", "Two", "Three"},
- UInts: []uint{5002, 5003},
- },
- BasicMap: map[string]string{
- "one": "one",
- "two": "two",
- },
- Subdocs: testDocSubs{
- First: testSubDoc{"First", 0},
- Second: &subdoc,
- },
- SubDocList: []testSubDoc{
- {"List.First", 0},
- {"List.Second", 0},
- },
- SubDocPtrs: []*testSubDoc{&subdoc},
-}
-
-func TestDocMarshal(t *testing.T) {
- result, err := Marshal(docData)
- if err != nil {
- t.Fatal(err)
- }
- expected, _ := ioutil.ReadFile("marshal_test.toml")
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestDocUnmarshal(t *testing.T) {
- result := testDoc{}
- tomlData, _ := ioutil.ReadFile("marshal_test.toml")
- err := Unmarshal(tomlData, &result)
- expected := docData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- resStr, _ := json.MarshalIndent(result, "", " ")
- expStr, _ := json.MarshalIndent(expected, "", " ")
- t.Errorf("Bad unmarshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expStr, resStr)
- }
-}
-
-func TestDocPartialUnmarshal(t *testing.T) {
- result := testDocSubs{}
-
- tree, _ := LoadFile("marshal_test.toml")
- subTree := tree.Get("subdoc").(*Tree)
- err := subTree.Unmarshal(&result)
- expected := docData.Subdocs
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- resStr, _ := json.MarshalIndent(result, "", " ")
- expStr, _ := json.MarshalIndent(expected, "", " ")
- t.Errorf("Bad partial unmartial: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expStr, resStr)
- }
-}
-
-type tomlTypeCheckTest struct {
- name string
- item interface{}
- typ int //0=primitive, 1=otherslice, 2=treeslice, 3=tree
-}
-
-func TestTypeChecks(t *testing.T) {
- tests := []tomlTypeCheckTest{
- {"integer", 2, 0},
- {"time", time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC), 0},
- {"stringlist", []string{"hello", "hi"}, 1},
- {"timelist", []time.Time{time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC)}, 1},
- {"objectlist", []tomlTypeCheckTest{}, 2},
- {"object", tomlTypeCheckTest{}, 3},
- }
-
- for _, test := range tests {
- expected := []bool{false, false, false, false}
- expected[test.typ] = true
- result := []bool{
- isPrimitive(reflect.TypeOf(test.item)),
- isOtherSlice(reflect.TypeOf(test.item)),
- isTreeSlice(reflect.TypeOf(test.item)),
- isTree(reflect.TypeOf(test.item)),
- }
- if !reflect.DeepEqual(expected, result) {
- t.Errorf("Bad type check on %q: expected %v, got %v", test.name, expected, result)
- }
- }
-}
-
-type unexportedMarshalTestStruct struct {
- String string `toml:"string"`
- StringList []string `toml:"strlist"`
- Sub basicMarshalTestSubStruct `toml:"subdoc"`
- SubList []basicMarshalTestSubStruct `toml:"sublist"`
- unexported int `toml:"shouldntBeHere"`
- Unexported2 int `toml:"-"`
-}
-
-var unexportedTestData = unexportedMarshalTestStruct{
- String: "Hello",
- StringList: []string{"Howdy", "Hey There"},
- Sub: basicMarshalTestSubStruct{"One"},
- SubList: []basicMarshalTestSubStruct{{"Two"}, {"Three"}},
- unexported: 0,
- Unexported2: 0,
-}
-
-var unexportedTestToml = []byte(`string = "Hello"
-strlist = ["Howdy","Hey There"]
-unexported = 1
-shouldntBeHere = 2
-
-[subdoc]
- String2 = "One"
-
-[[sublist]]
- String2 = "Two"
-
-[[sublist]]
- String2 = "Three"
-`)
-
-func TestUnexportedUnmarshal(t *testing.T) {
- result := unexportedMarshalTestStruct{}
- err := Unmarshal(unexportedTestToml, &result)
- expected := unexportedTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad unexported unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-type errStruct struct {
- Bool bool `toml:"bool"`
- Date time.Time `toml:"date"`
- Float float64 `toml:"float"`
- Int int16 `toml:"int"`
- String *string `toml:"string"`
-}
-
-var errTomls = []string{
- "bool = truly\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:3200Z\nfloat = 123.4\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123a4\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = j000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = 5000\nstring = Bite me",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = 5000\nstring = Bite me",
- "bool = 1\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1\nfloat = 123.4\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\n\"sorry\"\nint = 5000\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = \"sorry\"\nstring = \"Bite me\"",
- "bool = true\ndate = 1979-05-27T07:32:00Z\nfloat = 123.4\nint = 5000\nstring = 1",
-}
-
-type mapErr struct {
- Vals map[string]float64
-}
-
-type intErr struct {
- Int1 int
- Int2 int8
- Int3 int16
- Int4 int32
- Int5 int64
- UInt1 uint
- UInt2 uint8
- UInt3 uint16
- UInt4 uint32
- UInt5 uint64
- Flt1 float32
- Flt2 float64
-}
-
-var intErrTomls = []string{
- "Int1 = []\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = []\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = []\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = []\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = []\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = []\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = []\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = []\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = []\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = []\nFlt1 = 1.0\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = []\nFlt2 = 2.0",
- "Int1 = 1\nInt2 = 2\nInt3 = 3\nInt4 = 4\nInt5 = 5\nUInt1 = 1\nUInt2 = 2\nUInt3 = 3\nUInt4 = 4\nUInt5 = 5\nFlt1 = 1.0\nFlt2 = []",
-}
-
-func TestErrUnmarshal(t *testing.T) {
- for ind, toml := range errTomls {
- result := errStruct{}
- err := Unmarshal([]byte(toml), &result)
- if err == nil {
- t.Errorf("Expected err from case %d\n", ind)
- }
- }
- result2 := mapErr{}
- err := Unmarshal([]byte("[Vals]\nfred=\"1.2\""), &result2)
- if err == nil {
- t.Errorf("Expected err from map")
- }
- for ind, toml := range intErrTomls {
- result3 := intErr{}
- err := Unmarshal([]byte(toml), &result3)
- if err == nil {
- t.Errorf("Expected int err from case %d\n", ind)
- }
- }
-}
-
-type emptyMarshalTestStruct struct {
- Title string `toml:"title"`
- Bool bool `toml:"bool"`
- Int int `toml:"int"`
- String string `toml:"string"`
- StringList []string `toml:"stringlist"`
- Ptr *basicMarshalTestStruct `toml:"ptr"`
- Map map[string]string `toml:"map"`
-}
-
-var emptyTestData = emptyMarshalTestStruct{
- Title: "Placeholder",
- Bool: false,
- Int: 0,
- String: "",
- StringList: []string{},
- Ptr: nil,
- Map: map[string]string{},
-}
-
-var emptyTestToml = []byte(`bool = false
-int = 0
-string = ""
-stringlist = []
-title = "Placeholder"
-
-[map]
-`)
-
-type emptyMarshalTestStruct2 struct {
- Title string `toml:"title"`
- Bool bool `toml:"bool,omitempty"`
- Int int `toml:"int, omitempty"`
- String string `toml:"string,omitempty "`
- StringList []string `toml:"stringlist,omitempty"`
- Ptr *basicMarshalTestStruct `toml:"ptr,omitempty"`
- Map map[string]string `toml:"map,omitempty"`
-}
-
-var emptyTestData2 = emptyMarshalTestStruct2{
- Title: "Placeholder",
- Bool: false,
- Int: 0,
- String: "",
- StringList: []string{},
- Ptr: nil,
- Map: map[string]string{},
-}
-
-var emptyTestToml2 = []byte(`title = "Placeholder"
-`)
-
-func TestEmptyMarshal(t *testing.T) {
- result, err := Marshal(emptyTestData)
- if err != nil {
- t.Fatal(err)
- }
- expected := emptyTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad empty marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestEmptyMarshalOmit(t *testing.T) {
- result, err := Marshal(emptyTestData2)
- if err != nil {
- t.Fatal(err)
- }
- expected := emptyTestToml2
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad empty omit marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestEmptyUnmarshal(t *testing.T) {
- result := emptyMarshalTestStruct{}
- err := Unmarshal(emptyTestToml, &result)
- expected := emptyTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad empty unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-func TestEmptyUnmarshalOmit(t *testing.T) {
- result := emptyMarshalTestStruct2{}
- err := Unmarshal(emptyTestToml, &result)
- expected := emptyTestData2
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad empty omit unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-type pointerMarshalTestStruct struct {
- Str *string
- List *[]string
- ListPtr *[]*string
- Map *map[string]string
- MapPtr *map[string]*string
- EmptyStr *string
- EmptyList *[]string
- EmptyMap *map[string]string
- DblPtr *[]*[]*string
-}
-
-var pointerStr = "Hello"
-var pointerList = []string{"Hello back"}
-var pointerListPtr = []*string{&pointerStr}
-var pointerMap = map[string]string{"response": "Goodbye"}
-var pointerMapPtr = map[string]*string{"alternate": &pointerStr}
-var pointerTestData = pointerMarshalTestStruct{
- Str: &pointerStr,
- List: &pointerList,
- ListPtr: &pointerListPtr,
- Map: &pointerMap,
- MapPtr: &pointerMapPtr,
- EmptyStr: nil,
- EmptyList: nil,
- EmptyMap: nil,
-}
-
-var pointerTestToml = []byte(`List = ["Hello back"]
-ListPtr = ["Hello"]
-Str = "Hello"
-
-[Map]
- response = "Goodbye"
-
-[MapPtr]
- alternate = "Hello"
-`)
-
-func TestPointerMarshal(t *testing.T) {
- result, err := Marshal(pointerTestData)
- if err != nil {
- t.Fatal(err)
- }
- expected := pointerTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad pointer marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestPointerUnmarshal(t *testing.T) {
- result := pointerMarshalTestStruct{}
- err := Unmarshal(pointerTestToml, &result)
- expected := pointerTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad pointer unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-func TestUnmarshalTypeMismatch(t *testing.T) {
- result := pointerMarshalTestStruct{}
- err := Unmarshal([]byte("List = 123"), &result)
- if !strings.HasPrefix(err.Error(), "(1, 1): Can't convert 123(int64) to []string(slice)") {
- t.Errorf("Type mismatch must be reported: got %v", err.Error())
- }
-}
-
-type nestedMarshalTestStruct struct {
- String [][]string
- //Struct [][]basicMarshalTestSubStruct
- StringPtr *[]*[]*string
- // StructPtr *[]*[]*basicMarshalTestSubStruct
-}
-
-var str1 = "Three"
-var str2 = "Four"
-var strPtr = []*string{&str1, &str2}
-var strPtr2 = []*[]*string{&strPtr}
-
-var nestedTestData = nestedMarshalTestStruct{
- String: [][]string{{"Five", "Six"}, {"One", "Two"}},
- StringPtr: &strPtr2,
-}
-
-var nestedTestToml = []byte(`String = [["Five","Six"],["One","Two"]]
-StringPtr = [["Three","Four"]]
-`)
-
-func TestNestedMarshal(t *testing.T) {
- result, err := Marshal(nestedTestData)
- if err != nil {
- t.Fatal(err)
- }
- expected := nestedTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad nested marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestNestedUnmarshal(t *testing.T) {
- result := nestedMarshalTestStruct{}
- err := Unmarshal(nestedTestToml, &result)
- expected := nestedTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad nested unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-type customMarshalerParent struct {
- Self customMarshaler `toml:"me"`
- Friends []customMarshaler `toml:"friends"`
-}
-
-type customMarshaler struct {
- FirsName string
- LastName string
-}
-
-func (c customMarshaler) MarshalTOML() ([]byte, error) {
- fullName := fmt.Sprintf("%s %s", c.FirsName, c.LastName)
- return []byte(fullName), nil
-}
-
-var customMarshalerData = customMarshaler{FirsName: "Sally", LastName: "Fields"}
-var customMarshalerToml = []byte(`Sally Fields`)
-var nestedCustomMarshalerData = customMarshalerParent{
- Self: customMarshaler{FirsName: "Maiku", LastName: "Suteda"},
- Friends: []customMarshaler{customMarshalerData},
-}
-var nestedCustomMarshalerToml = []byte(`friends = ["Sally Fields"]
-me = "Maiku Suteda"
-`)
-
-func TestCustomMarshaler(t *testing.T) {
- result, err := Marshal(customMarshalerData)
- if err != nil {
- t.Fatal(err)
- }
- expected := customMarshalerToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad custom marshaler: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestNestedCustomMarshaler(t *testing.T) {
- result, err := Marshal(nestedCustomMarshalerData)
- if err != nil {
- t.Fatal(err)
- }
- expected := nestedCustomMarshalerToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad nested custom marshaler: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-var commentTestToml = []byte(`
-# it's a comment on type
-[postgres]
- # isCommented = "dvalue"
- noComment = "cvalue"
-
- # A comment on AttrB with a
- # break line
- password = "bvalue"
-
- # A comment on AttrA
- user = "avalue"
-
- [[postgres.My]]
-
- # a comment on my on typeC
- My = "Foo"
-
- [[postgres.My]]
-
- # a comment on my on typeC
- My = "Baar"
-`)
-
-func TestMarshalComment(t *testing.T) {
- type TypeC struct {
- My string `comment:"a comment on my on typeC"`
- }
- type TypeB struct {
- AttrA string `toml:"user" comment:"A comment on AttrA"`
- AttrB string `toml:"password" comment:"A comment on AttrB with a\n break line"`
- AttrC string `toml:"noComment"`
- AttrD string `toml:"isCommented" commented:"true"`
- My []TypeC
- }
- type TypeA struct {
- TypeB TypeB `toml:"postgres" comment:"it's a comment on type"`
- }
-
- ta := []TypeC{{My: "Foo"}, {My: "Baar"}}
- config := TypeA{TypeB{AttrA: "avalue", AttrB: "bvalue", AttrC: "cvalue", AttrD: "dvalue", My: ta}}
- result, err := Marshal(config)
- if err != nil {
- t.Fatal(err)
- }
- expected := commentTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-type mapsTestStruct struct {
- Simple map[string]string
- Paths map[string]string
- Other map[string]float64
- X struct {
- Y struct {
- Z map[string]bool
- }
- }
-}
-
-var mapsTestData = mapsTestStruct{
- Simple: map[string]string{
- "one plus one": "two",
- "next": "three",
- },
- Paths: map[string]string{
- "/this/is/a/path": "/this/is/also/a/path",
- "/heloo.txt": "/tmp/lololo.txt",
- },
- Other: map[string]float64{
- "testing": 3.9999,
- },
- X: struct{ Y struct{ Z map[string]bool } }{
- Y: struct{ Z map[string]bool }{
- Z: map[string]bool{
- "is.Nested": true,
- },
- },
- },
-}
-var mapsTestToml = []byte(`
-[Other]
- "testing" = 3.9999
-
-[Paths]
- "/heloo.txt" = "/tmp/lololo.txt"
- "/this/is/a/path" = "/this/is/also/a/path"
-
-[Simple]
- "next" = "three"
- "one plus one" = "two"
-
-[X]
-
- [X.Y]
-
- [X.Y.Z]
- "is.Nested" = true
-`)
-
-func TestEncodeQuotedMapKeys(t *testing.T) {
- var buf bytes.Buffer
- if err := NewEncoder(&buf).QuoteMapKeys(true).Encode(mapsTestData); err != nil {
- t.Fatal(err)
- }
- result := buf.Bytes()
- expected := mapsTestToml
- if !bytes.Equal(result, expected) {
- t.Errorf("Bad maps marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
- }
-}
-
-func TestDecodeQuotedMapKeys(t *testing.T) {
- result := mapsTestStruct{}
- err := NewDecoder(bytes.NewBuffer(mapsTestToml)).Decode(&result)
- expected := mapsTestData
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(result, expected) {
- t.Errorf("Bad maps unmarshal: expected %v, got %v", expected, result)
- }
-}
-
-type structArrayNoTag struct {
- A struct {
- B []int64
- C []int64
- }
-}
-
-func TestMarshalArray(t *testing.T) {
- expected := []byte(`
-[A]
- B = [1,2,3]
- C = [1]
-`)
-
- m := structArrayNoTag{
- A: struct {
- B []int64
- C []int64
- }{
- B: []int64{1, 2, 3},
- C: []int64{1},
- },
- }
-
- b, err := Marshal(m)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if !bytes.Equal(b, expected) {
- t.Errorf("Bad arrays marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, b)
- }
-}
-
-func TestMarshalArrayOnePerLine(t *testing.T) {
- expected := []byte(`
-[A]
- B = [
- 1,
- 2,
- 3
- ]
- C = [1]
-`)
-
- m := structArrayNoTag{
- A: struct {
- B []int64
- C []int64
- }{
- B: []int64{1, 2, 3},
- C: []int64{1},
- },
- }
-
- var buf bytes.Buffer
- encoder := NewEncoder(&buf).ArraysWithOneElementPerLine(true)
- err := encoder.Encode(m)
-
- if err != nil {
- t.Fatal(err)
- }
-
- b := buf.Bytes()
-
- if !bytes.Equal(b, expected) {
- t.Errorf("Bad arrays marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, b)
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/parser_test.go b/vendor/github.com/pelletier/go-toml/parser_test.go
deleted file mode 100644
index ca29c442e..000000000
--- a/vendor/github.com/pelletier/go-toml/parser_test.go
+++ /dev/null
@@ -1,899 +0,0 @@
-package toml
-
-import (
- "fmt"
- "math"
- "reflect"
- "testing"
- "time"
-
- "github.com/davecgh/go-spew/spew"
-)
-
-func assertSubTree(t *testing.T, path []string, tree *Tree, err error, ref map[string]interface{}) {
- if err != nil {
- t.Error("Non-nil error:", err.Error())
- return
- }
- for k, v := range ref {
- nextPath := append(path, k)
- t.Log("asserting path", nextPath)
- // NOTE: directly access key instead of resolve by path
- // NOTE: see TestSpecialKV
- switch node := tree.GetPath([]string{k}).(type) {
- case []*Tree:
- t.Log("\tcomparing key", nextPath, "by array iteration")
- for idx, item := range node {
- assertSubTree(t, nextPath, item, err, v.([]map[string]interface{})[idx])
- }
- case *Tree:
- t.Log("\tcomparing key", nextPath, "by subtree assestion")
- assertSubTree(t, nextPath, node, err, v.(map[string]interface{}))
- default:
- t.Log("\tcomparing key", nextPath, "by string representation because it's of type", reflect.TypeOf(node))
- if fmt.Sprintf("%v", node) != fmt.Sprintf("%v", v) {
- t.Errorf("was expecting %v at %v but got %v", v, k, node)
- }
- }
- }
-}
-
-func assertTree(t *testing.T, tree *Tree, err error, ref map[string]interface{}) {
- t.Log("Asserting tree:\n", spew.Sdump(tree))
- assertSubTree(t, []string{}, tree, err, ref)
- t.Log("Finished tree assertion.")
-}
-
-func TestCreateSubTree(t *testing.T) {
- tree := newTree()
- tree.createSubTree([]string{"a", "b", "c"}, Position{})
- tree.Set("a.b.c", 42)
- if tree.Get("a.b.c") != 42 {
- t.Fail()
- }
-}
-
-func TestSimpleKV(t *testing.T) {
- tree, err := Load("a = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(42),
- })
-
- tree, _ = Load("a = 42\nb = 21")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(42),
- "b": int64(21),
- })
-}
-
-func TestNumberInKey(t *testing.T) {
- tree, err := Load("hello2 = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "hello2": int64(42),
- })
-}
-
-func TestIncorrectKeyExtraSquareBracket(t *testing.T) {
- _, err := Load(`[a]b]
-zyx = 42`)
- if err == nil {
- t.Error("Error should have been returned.")
- }
- if err.Error() != "(1, 4): unexpected token" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestSimpleNumbers(t *testing.T) {
- tree, err := Load("a = +42\nb = -21\nc = +4.2\nd = -2.1")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(42),
- "b": int64(-21),
- "c": float64(4.2),
- "d": float64(-2.1),
- })
-}
-
-func TestSpecialFloats(t *testing.T) {
- tree, err := Load(`
-normalinf = inf
-plusinf = +inf
-minusinf = -inf
-normalnan = nan
-plusnan = +nan
-minusnan = -nan
-`)
- assertTree(t, tree, err, map[string]interface{}{
- "normalinf": math.Inf(1),
- "plusinf": math.Inf(1),
- "minusinf": math.Inf(-1),
- "normalnan": math.NaN(),
- "plusnan": math.NaN(),
- "minusnan": math.NaN(),
- })
-}
-
-func TestHexIntegers(t *testing.T) {
- tree, err := Load(`a = 0xDEADBEEF`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(3735928559)})
-
- tree, err = Load(`a = 0xdeadbeef`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(3735928559)})
-
- tree, err = Load(`a = 0xdead_beef`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(3735928559)})
-
- _, err = Load(`a = 0x_1`)
- if err.Error() != "(1, 5): invalid use of _ in hex number" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestOctIntegers(t *testing.T) {
- tree, err := Load(`a = 0o01234567`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(342391)})
-
- tree, err = Load(`a = 0o755`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(493)})
-
- _, err = Load(`a = 0o_1`)
- if err.Error() != "(1, 5): invalid use of _ in number" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestBinIntegers(t *testing.T) {
- tree, err := Load(`a = 0b11010110`)
- assertTree(t, tree, err, map[string]interface{}{"a": int64(214)})
-
- _, err = Load(`a = 0b_1`)
- if err.Error() != "(1, 5): invalid use of _ in number" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestBadIntegerBase(t *testing.T) {
- _, err := Load(`a = 0k1`)
- if err.Error() != "(1, 5): unknown number base: k. possible options are x (hex) o (octal) b (binary)" {
- t.Error("Error should have been returned.")
- }
-}
-
-func TestIntegerNoDigit(t *testing.T) {
- _, err := Load(`a = 0b`)
- if err.Error() != "(1, 5): number needs at least one digit" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestNumbersWithUnderscores(t *testing.T) {
- tree, err := Load("a = 1_000")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(1000),
- })
-
- tree, err = Load("a = 5_349_221")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(5349221),
- })
-
- tree, err = Load("a = 1_2_3_4_5")
- assertTree(t, tree, err, map[string]interface{}{
- "a": int64(12345),
- })
-
- tree, err = Load("flt8 = 9_224_617.445_991_228_313")
- assertTree(t, tree, err, map[string]interface{}{
- "flt8": float64(9224617.445991228313),
- })
-
- tree, err = Load("flt9 = 1e1_00")
- assertTree(t, tree, err, map[string]interface{}{
- "flt9": float64(1e100),
- })
-}
-
-func TestFloatsWithExponents(t *testing.T) {
- tree, err := Load("a = 5e+22\nb = 5E+22\nc = -5e+22\nd = -5e-22\ne = 6.626e-34")
- assertTree(t, tree, err, map[string]interface{}{
- "a": float64(5e+22),
- "b": float64(5E+22),
- "c": float64(-5e+22),
- "d": float64(-5e-22),
- "e": float64(6.626e-34),
- })
-}
-
-func TestSimpleDate(t *testing.T) {
- tree, err := Load("a = 1979-05-27T07:32:00Z")
- assertTree(t, tree, err, map[string]interface{}{
- "a": time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
- })
-}
-
-func TestDateOffset(t *testing.T) {
- tree, err := Load("a = 1979-05-27T00:32:00-07:00")
- assertTree(t, tree, err, map[string]interface{}{
- "a": time.Date(1979, time.May, 27, 0, 32, 0, 0, time.FixedZone("", -7*60*60)),
- })
-}
-
-func TestDateNano(t *testing.T) {
- tree, err := Load("a = 1979-05-27T00:32:00.999999999-07:00")
- assertTree(t, tree, err, map[string]interface{}{
- "a": time.Date(1979, time.May, 27, 0, 32, 0, 999999999, time.FixedZone("", -7*60*60)),
- })
-}
-
-func TestSimpleString(t *testing.T) {
- tree, err := Load("a = \"hello world\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a": "hello world",
- })
-}
-
-func TestSpaceKey(t *testing.T) {
- tree, err := Load("\"a b\" = \"hello world\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a b": "hello world",
- })
-}
-
-func TestDoubleQuotedKey(t *testing.T) {
- tree, err := Load(`
- "key" = "a"
- "\t" = "b"
- "\U0001F914" = "c"
- "\u2764" = "d"
- `)
- assertTree(t, tree, err, map[string]interface{}{
- "key": "a",
- "\t": "b",
- "\U0001F914": "c",
- "\u2764": "d",
- })
-}
-
-func TestSingleQuotedKey(t *testing.T) {
- tree, err := Load(`
- 'key' = "a"
- '\t' = "b"
- '\U0001F914' = "c"
- '\u2764' = "d"
- `)
- assertTree(t, tree, err, map[string]interface{}{
- `key`: "a",
- `\t`: "b",
- `\U0001F914`: "c",
- `\u2764`: "d",
- })
-}
-
-func TestStringEscapables(t *testing.T) {
- tree, err := Load("a = \"a \\n b\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a": "a \n b",
- })
-
- tree, err = Load("a = \"a \\t b\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a": "a \t b",
- })
-
- tree, err = Load("a = \"a \\r b\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a": "a \r b",
- })
-
- tree, err = Load("a = \"a \\\\ b\"")
- assertTree(t, tree, err, map[string]interface{}{
- "a": "a \\ b",
- })
-}
-
-func TestEmptyQuotedString(t *testing.T) {
- tree, err := Load(`[""]
-"" = 1`)
- assertTree(t, tree, err, map[string]interface{}{
- "": map[string]interface{}{
- "": int64(1),
- },
- })
-}
-
-func TestBools(t *testing.T) {
- tree, err := Load("a = true\nb = false")
- assertTree(t, tree, err, map[string]interface{}{
- "a": true,
- "b": false,
- })
-}
-
-func TestNestedKeys(t *testing.T) {
- tree, err := Load("[a.b.c]\nd = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "a": map[string]interface{}{
- "b": map[string]interface{}{
- "c": map[string]interface{}{
- "d": int64(42),
- },
- },
- },
- })
-}
-
-func TestNestedQuotedUnicodeKeys(t *testing.T) {
- tree, err := Load("[ j . \"Êž\" . l ]\nd = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "j": map[string]interface{}{
- "Êž": map[string]interface{}{
- "l": map[string]interface{}{
- "d": int64(42),
- },
- },
- },
- })
-
- tree, err = Load("[ g . h . i ]\nd = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "g": map[string]interface{}{
- "h": map[string]interface{}{
- "i": map[string]interface{}{
- "d": int64(42),
- },
- },
- },
- })
-
- tree, err = Load("[ d.e.f ]\nk = 42")
- assertTree(t, tree, err, map[string]interface{}{
- "d": map[string]interface{}{
- "e": map[string]interface{}{
- "f": map[string]interface{}{
- "k": int64(42),
- },
- },
- },
- })
-}
-
-func TestArrayOne(t *testing.T) {
- tree, err := Load("a = [1]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(1)},
- })
-}
-
-func TestArrayZero(t *testing.T) {
- tree, err := Load("a = []")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []interface{}{},
- })
-}
-
-func TestArraySimple(t *testing.T) {
- tree, err := Load("a = [42, 21, 10]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(42), int64(21), int64(10)},
- })
-
- tree, _ = Load("a = [42, 21, 10,]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(42), int64(21), int64(10)},
- })
-}
-
-func TestArrayMultiline(t *testing.T) {
- tree, err := Load("a = [42,\n21, 10,]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(42), int64(21), int64(10)},
- })
-}
-
-func TestArrayNested(t *testing.T) {
- tree, err := Load("a = [[42, 21], [10]]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": [][]int64{{int64(42), int64(21)}, {int64(10)}},
- })
-}
-
-func TestNestedArrayComment(t *testing.T) {
- tree, err := Load(`
-someArray = [
-# does not work
-["entry1"]
-]`)
- assertTree(t, tree, err, map[string]interface{}{
- "someArray": [][]string{{"entry1"}},
- })
-}
-
-func TestNestedEmptyArrays(t *testing.T) {
- tree, err := Load("a = [[[]]]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": [][][]interface{}{{{}}},
- })
-}
-
-func TestArrayMixedTypes(t *testing.T) {
- _, err := Load("a = [42, 16.0]")
- if err.Error() != "(1, 10): mixed types in array" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a = [42, \"hello\"]")
- if err.Error() != "(1, 11): mixed types in array" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestArrayNestedStrings(t *testing.T) {
- tree, err := Load("data = [ [\"gamma\", \"delta\"], [\"Foo\"] ]")
- assertTree(t, tree, err, map[string]interface{}{
- "data": [][]string{{"gamma", "delta"}, {"Foo"}},
- })
-}
-
-func TestParseUnknownRvalue(t *testing.T) {
- _, err := Load("a = !bssss")
- if err == nil {
- t.Error("Expecting a parse error")
- }
-
- _, err = Load("a = /b")
- if err == nil {
- t.Error("Expecting a parse error")
- }
-}
-
-func TestMissingValue(t *testing.T) {
- _, err := Load("a = ")
- if err.Error() != "(1, 5): expecting a value" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestUnterminatedArray(t *testing.T) {
- _, err := Load("a = [1,")
- if err.Error() != "(1, 8): unterminated array" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a = [1")
- if err.Error() != "(1, 7): unterminated array" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a = [1 2")
- if err.Error() != "(1, 8): missing comma" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestNewlinesInArrays(t *testing.T) {
- tree, err := Load("a = [1,\n2,\n3]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(1), int64(2), int64(3)},
- })
-}
-
-func TestArrayWithExtraComma(t *testing.T) {
- tree, err := Load("a = [1,\n2,\n3,\n]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(1), int64(2), int64(3)},
- })
-}
-
-func TestArrayWithExtraCommaComment(t *testing.T) {
- tree, err := Load("a = [1, # wow\n2, # such items\n3, # so array\n]")
- assertTree(t, tree, err, map[string]interface{}{
- "a": []int64{int64(1), int64(2), int64(3)},
- })
-}
-
-func TestSimpleInlineGroup(t *testing.T) {
- tree, err := Load("key = {a = 42}")
- assertTree(t, tree, err, map[string]interface{}{
- "key": map[string]interface{}{
- "a": int64(42),
- },
- })
-}
-
-func TestDoubleInlineGroup(t *testing.T) {
- tree, err := Load("key = {a = 42, b = \"foo\"}")
- assertTree(t, tree, err, map[string]interface{}{
- "key": map[string]interface{}{
- "a": int64(42),
- "b": "foo",
- },
- })
-}
-
-func TestExampleInlineGroup(t *testing.T) {
- tree, err := Load(`name = { first = "Tom", last = "Preston-Werner" }
-point = { x = 1, y = 2 }`)
- assertTree(t, tree, err, map[string]interface{}{
- "name": map[string]interface{}{
- "first": "Tom",
- "last": "Preston-Werner",
- },
- "point": map[string]interface{}{
- "x": int64(1),
- "y": int64(2),
- },
- })
-}
-
-func TestExampleInlineGroupInArray(t *testing.T) {
- tree, err := Load(`points = [{ x = 1, y = 2 }]`)
- assertTree(t, tree, err, map[string]interface{}{
- "points": []map[string]interface{}{
- {
- "x": int64(1),
- "y": int64(2),
- },
- },
- })
-}
-
-func TestInlineTableUnterminated(t *testing.T) {
- _, err := Load("foo = {")
- if err.Error() != "(1, 8): unterminated inline table" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestInlineTableCommaExpected(t *testing.T) {
- _, err := Load("foo = {hello = 53 test = foo}")
- if err.Error() != "(1, 19): comma expected between fields in inline table" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestInlineTableCommaStart(t *testing.T) {
- _, err := Load("foo = {, hello = 53}")
- if err.Error() != "(1, 8): inline table cannot start with a comma" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestInlineTableDoubleComma(t *testing.T) {
- _, err := Load("foo = {hello = 53,, foo = 17}")
- if err.Error() != "(1, 19): need field between two commas in inline table" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestDuplicateGroups(t *testing.T) {
- _, err := Load("[foo]\na=2\n[foo]b=3")
- if err.Error() != "(3, 2): duplicated tables" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestDuplicateKeys(t *testing.T) {
- _, err := Load("foo = 2\nfoo = 3")
- if err.Error() != "(2, 1): The following key was defined twice: foo" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestEmptyIntermediateTable(t *testing.T) {
- _, err := Load("[foo..bar]")
- if err.Error() != "(1, 2): invalid table array key: empty table key" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestImplicitDeclarationBefore(t *testing.T) {
- tree, err := Load("[a.b.c]\nanswer = 42\n[a]\nbetter = 43")
- assertTree(t, tree, err, map[string]interface{}{
- "a": map[string]interface{}{
- "b": map[string]interface{}{
- "c": map[string]interface{}{
- "answer": int64(42),
- },
- },
- "better": int64(43),
- },
- })
-}
-
-func TestFloatsWithoutLeadingZeros(t *testing.T) {
- _, err := Load("a = .42")
- if err.Error() != "(1, 5): cannot start float with a dot" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a = -.42")
- if err.Error() != "(1, 5): cannot start float with a dot" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestMissingFile(t *testing.T) {
- _, err := LoadFile("foo.toml")
- if err.Error() != "open foo.toml: no such file or directory" &&
- err.Error() != "open foo.toml: The system cannot find the file specified." {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestParseFile(t *testing.T) {
- tree, err := LoadFile("example.toml")
-
- assertTree(t, tree, err, map[string]interface{}{
- "title": "TOML Example",
- "owner": map[string]interface{}{
- "name": "Tom Preston-Werner",
- "organization": "GitHub",
- "bio": "GitHub Cofounder & CEO\nLikes tater tots and beer.",
- "dob": time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
- },
- "database": map[string]interface{}{
- "server": "192.168.1.1",
- "ports": []int64{8001, 8001, 8002},
- "connection_max": 5000,
- "enabled": true,
- },
- "servers": map[string]interface{}{
- "alpha": map[string]interface{}{
- "ip": "10.0.0.1",
- "dc": "eqdc10",
- },
- "beta": map[string]interface{}{
- "ip": "10.0.0.2",
- "dc": "eqdc10",
- },
- },
- "clients": map[string]interface{}{
- "data": []interface{}{
- []string{"gamma", "delta"},
- []int64{1, 2},
- },
- },
- })
-}
-
-func TestParseFileCRLF(t *testing.T) {
- tree, err := LoadFile("example-crlf.toml")
-
- assertTree(t, tree, err, map[string]interface{}{
- "title": "TOML Example",
- "owner": map[string]interface{}{
- "name": "Tom Preston-Werner",
- "organization": "GitHub",
- "bio": "GitHub Cofounder & CEO\nLikes tater tots and beer.",
- "dob": time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
- },
- "database": map[string]interface{}{
- "server": "192.168.1.1",
- "ports": []int64{8001, 8001, 8002},
- "connection_max": 5000,
- "enabled": true,
- },
- "servers": map[string]interface{}{
- "alpha": map[string]interface{}{
- "ip": "10.0.0.1",
- "dc": "eqdc10",
- },
- "beta": map[string]interface{}{
- "ip": "10.0.0.2",
- "dc": "eqdc10",
- },
- },
- "clients": map[string]interface{}{
- "data": []interface{}{
- []string{"gamma", "delta"},
- []int64{1, 2},
- },
- },
- })
-}
-
-func TestParseKeyGroupArray(t *testing.T) {
- tree, err := Load("[[foo.bar]] a = 42\n[[foo.bar]] a = 69")
- assertTree(t, tree, err, map[string]interface{}{
- "foo": map[string]interface{}{
- "bar": []map[string]interface{}{
- {"a": int64(42)},
- {"a": int64(69)},
- },
- },
- })
-}
-
-func TestParseKeyGroupArrayUnfinished(t *testing.T) {
- _, err := Load("[[foo.bar]\na = 42")
- if err.Error() != "(1, 10): was expecting token [[, but got unclosed table array key instead" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("[[foo.[bar]\na = 42")
- if err.Error() != "(1, 3): unexpected token table array key cannot contain ']', was expecting a table array key" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestParseKeyGroupArrayQueryExample(t *testing.T) {
- tree, err := Load(`
- [[book]]
- title = "The Stand"
- author = "Stephen King"
- [[book]]
- title = "For Whom the Bell Tolls"
- author = "Ernest Hemmingway"
- [[book]]
- title = "Neuromancer"
- author = "William Gibson"
- `)
-
- assertTree(t, tree, err, map[string]interface{}{
- "book": []map[string]interface{}{
- {"title": "The Stand", "author": "Stephen King"},
- {"title": "For Whom the Bell Tolls", "author": "Ernest Hemmingway"},
- {"title": "Neuromancer", "author": "William Gibson"},
- },
- })
-}
-
-func TestParseKeyGroupArraySpec(t *testing.T) {
- tree, err := Load("[[fruit]]\n name=\"apple\"\n [fruit.physical]\n color=\"red\"\n shape=\"round\"\n [[fruit]]\n name=\"banana\"")
- assertTree(t, tree, err, map[string]interface{}{
- "fruit": []map[string]interface{}{
- {"name": "apple", "physical": map[string]interface{}{"color": "red", "shape": "round"}},
- {"name": "banana"},
- },
- })
-}
-
-func TestTomlValueStringRepresentation(t *testing.T) {
- for idx, item := range []struct {
- Value interface{}
- Expect string
- }{
- {int64(12345), "12345"},
- {uint64(50), "50"},
- {float64(123.45), "123.45"},
- {true, "true"},
- {"hello world", "\"hello world\""},
- {"\b\t\n\f\r\"\\", "\"\\b\\t\\n\\f\\r\\\"\\\\\""},
- {"\x05", "\"\\u0005\""},
- {time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
- "1979-05-27T07:32:00Z"},
- {[]interface{}{"gamma", "delta"},
- "[\"gamma\",\"delta\"]"},
- {nil, ""},
- } {
- result, err := tomlValueStringRepresentation(item.Value, "", false)
- if err != nil {
- t.Errorf("Test %d - unexpected error: %s", idx, err)
- }
- if result != item.Expect {
- t.Errorf("Test %d - got '%s', expected '%s'", idx, result, item.Expect)
- }
- }
-}
-
-func TestToStringMapStringString(t *testing.T) {
- tree, err := TreeFromMap(map[string]interface{}{"m": map[string]interface{}{"v": "abc"}})
- if err != nil {
- t.Fatalf("unexpected error: %s", err)
- }
- want := "\n[m]\n v = \"abc\"\n"
- got := tree.String()
-
- if got != want {
- t.Errorf("want:\n%q\ngot:\n%q", want, got)
- }
-}
-
-func assertPosition(t *testing.T, text string, ref map[string]Position) {
- tree, err := Load(text)
- if err != nil {
- t.Errorf("Error loading document text: `%v`", text)
- t.Errorf("Error: %v", err)
- }
- for path, pos := range ref {
- testPos := tree.GetPosition(path)
- if testPos.Invalid() {
- t.Errorf("Failed to query tree path or path has invalid position: %s", path)
- } else if pos != testPos {
- t.Errorf("Expected position %v, got %v instead", pos, testPos)
- }
- }
-}
-
-func TestDocumentPositions(t *testing.T) {
- assertPosition(t,
- "[foo]\nbar=42\nbaz=69",
- map[string]Position{
- "": {1, 1},
- "foo": {1, 1},
- "foo.bar": {2, 1},
- "foo.baz": {3, 1},
- })
-}
-
-func TestDocumentPositionsWithSpaces(t *testing.T) {
- assertPosition(t,
- " [foo]\n bar=42\n baz=69",
- map[string]Position{
- "": {1, 1},
- "foo": {1, 3},
- "foo.bar": {2, 3},
- "foo.baz": {3, 3},
- })
-}
-
-func TestDocumentPositionsWithGroupArray(t *testing.T) {
- assertPosition(t,
- "[[foo]]\nbar=42\nbaz=69",
- map[string]Position{
- "": {1, 1},
- "foo": {1, 1},
- "foo.bar": {2, 1},
- "foo.baz": {3, 1},
- })
-}
-
-func TestNestedTreePosition(t *testing.T) {
- assertPosition(t,
- "[foo.bar]\na=42\nb=69",
- map[string]Position{
- "": {1, 1},
- "foo": {1, 1},
- "foo.bar": {1, 1},
- "foo.bar.a": {2, 1},
- "foo.bar.b": {3, 1},
- })
-}
-
-func TestInvalidGroupArray(t *testing.T) {
- _, err := Load("[table#key]\nanswer = 42")
- if err == nil {
- t.Error("Should error")
- }
-
- _, err = Load("[foo.[bar]\na = 42")
- if err.Error() != "(1, 2): unexpected token table key cannot contain ']', was expecting a table key" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestDoubleEqual(t *testing.T) {
- _, err := Load("foo= = 2")
- if err.Error() != "(1, 6): cannot have multiple equals for the same key" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestGroupArrayReassign(t *testing.T) {
- _, err := Load("[hello]\n[[hello]]")
- if err.Error() != "(2, 3): key \"hello\" is already assigned and not of type table array" {
- t.Error("Bad error message:", err.Error())
- }
-}
-
-func TestInvalidFloatParsing(t *testing.T) {
- _, err := Load("a=1e_2")
- if err.Error() != "(1, 3): invalid use of _ in number" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a=1e2_")
- if err.Error() != "(1, 3): invalid use of _ in number" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a=1__2")
- if err.Error() != "(1, 3): invalid use of _ in number" {
- t.Error("Bad error message:", err.Error())
- }
-
- _, err = Load("a=_1_2")
- if err.Error() != "(1, 3): cannot start number with underscore" {
- t.Error("Bad error message:", err.Error())
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/position_test.go b/vendor/github.com/pelletier/go-toml/position_test.go
deleted file mode 100644
index 63ad1afc8..000000000
--- a/vendor/github.com/pelletier/go-toml/position_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Testing support for go-toml
-
-package toml
-
-import (
- "testing"
-)
-
-func TestPositionString(t *testing.T) {
- p := Position{123, 456}
- expected := "(123, 456)"
- value := p.String()
-
- if value != expected {
- t.Errorf("Expected %v, got %v instead", expected, value)
- }
-}
-
-func TestInvalid(t *testing.T) {
- for i, v := range []Position{
- {0, 1234},
- {1234, 0},
- {0, 0},
- } {
- if !v.Invalid() {
- t.Errorf("Position at %v is valid: %v", i, v)
- }
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/doc.go b/vendor/github.com/pelletier/go-toml/query/doc.go
deleted file mode 100644
index ed63c1109..000000000
--- a/vendor/github.com/pelletier/go-toml/query/doc.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Package query performs JSONPath-like queries on a TOML document.
-//
-// The query path implementation is based loosely on the JSONPath specification:
-// http://goessner.net/articles/JsonPath/.
-//
-// The idea behind a query path is to allow quick access to any element, or set
-// of elements within TOML document, with a single expression.
-//
-// result, err := query.CompileAndExecute("$.foo.bar.baz", tree)
-//
-// This is roughly equivalent to:
-//
-// next := tree.Get("foo")
-// if next != nil {
-// next = next.Get("bar")
-// if next != nil {
-// next = next.Get("baz")
-// }
-// }
-// result := next
-//
-// err is nil if any parsing exception occurs.
-//
-// If no node in the tree matches the query, result will simply contain an empty list of
-// items.
-//
-// As illustrated above, the query path is much more efficient, especially since
-// the structure of the TOML file can vary. Rather than making assumptions about
-// a document's structure, a query allows the programmer to make structured
-// requests into the document, and get zero or more values as a result.
-//
-// Query syntax
-//
-// The syntax of a query begins with a root token, followed by any number
-// sub-expressions:
-//
-// $
-// Root of the TOML tree. This must always come first.
-// .name
-// Selects child of this node, where 'name' is a TOML key
-// name.
-// ['name']
-// Selects child of this node, where 'name' is a string
-// containing a TOML key name.
-// [index]
-// Selcts child array element at 'index'.
-// ..expr
-// Recursively selects all children, filtered by an a union,
-// index, or slice expression.
-// ..*
-// Recursive selection of all nodes at this point in the
-// tree.
-// .*
-// Selects all children of the current node.
-// [expr,expr]
-// Union operator - a logical 'or' grouping of two or more
-// sub-expressions: index, key name, or filter.
-// [start:end:step]
-// Slice operator - selects array elements from start to
-// end-1, at the given step. All three arguments are
-// optional.
-// [?(filter)]
-// Named filter expression - the function 'filter' is
-// used to filter children at this node.
-//
-// Query Indexes And Slices
-//
-// Index expressions perform no bounds checking, and will contribute no
-// values to the result set if the provided index or index range is invalid.
-// Negative indexes represent values from the end of the array, counting backwards.
-//
-// // select the last index of the array named 'foo'
-// query.CompileAndExecute("$.foo[-1]", tree)
-//
-// Slice expressions are supported, by using ':' to separate a start/end index pair.
-//
-// // select up to the first five elements in the array
-// query.CompileAndExecute("$.foo[0:5]", tree)
-//
-// Slice expressions also allow negative indexes for the start and stop
-// arguments.
-//
-// // select all array elements.
-// query.CompileAndExecute("$.foo[0:-1]", tree)
-//
-// Slice expressions may have an optional stride/step parameter:
-//
-// // select every other element
-// query.CompileAndExecute("$.foo[0:-1:2]", tree)
-//
-// Slice start and end parameters are also optional:
-//
-// // these are all equivalent and select all the values in the array
-// query.CompileAndExecute("$.foo[:]", tree)
-// query.CompileAndExecute("$.foo[0:]", tree)
-// query.CompileAndExecute("$.foo[:-1]", tree)
-// query.CompileAndExecute("$.foo[0:-1:]", tree)
-// query.CompileAndExecute("$.foo[::1]", tree)
-// query.CompileAndExecute("$.foo[0::1]", tree)
-// query.CompileAndExecute("$.foo[:-1:1]", tree)
-// query.CompileAndExecute("$.foo[0:-1:1]", tree)
-//
-// Query Filters
-//
-// Query filters are used within a Union [,] or single Filter [] expression.
-// A filter only allows nodes that qualify through to the next expression,
-// and/or into the result set.
-//
-// // returns children of foo that are permitted by the 'bar' filter.
-// query.CompileAndExecute("$.foo[?(bar)]", tree)
-//
-// There are several filters provided with the library:
-//
-// tree
-// Allows nodes of type Tree.
-// int
-// Allows nodes of type int64.
-// float
-// Allows nodes of type float64.
-// string
-// Allows nodes of type string.
-// time
-// Allows nodes of type time.Time.
-// bool
-// Allows nodes of type bool.
-//
-// Query Results
-//
-// An executed query returns a Result object. This contains the nodes
-// in the TOML tree that qualify the query expression. Position information
-// is also available for each value in the set.
-//
-// // display the results of a query
-// results := query.CompileAndExecute("$.foo.bar.baz", tree)
-// for idx, value := results.Values() {
-// fmt.Println("%v: %v", results.Positions()[idx], value)
-// }
-//
-// Compiled Queries
-//
-// Queries may be executed directly on a Tree object, or compiled ahead
-// of time and executed discretely. The former is more convenient, but has the
-// penalty of having to recompile the query expression each time.
-//
-// // basic query
-// results := query.CompileAndExecute("$.foo.bar.baz", tree)
-//
-// // compiled query
-// query, err := toml.Compile("$.foo.bar.baz")
-// results := query.Execute(tree)
-//
-// // run the compiled query again on a different tree
-// moreResults := query.Execute(anotherTree)
-//
-// User Defined Query Filters
-//
-// Filter expressions may also be user defined by using the SetFilter()
-// function on the Query object. The function must return true/false, which
-// signifies if the passed node is kept or discarded, respectively.
-//
-// // create a query that references a user-defined filter
-// query, _ := query.Compile("$[?(bazOnly)]")
-//
-// // define the filter, and assign it to the query
-// query.SetFilter("bazOnly", func(node interface{}) bool{
-// if tree, ok := node.(*Tree); ok {
-// return tree.Has("baz")
-// }
-// return false // reject all other node types
-// })
-//
-// // run the query
-// query.Execute(tree)
-//
-package query
diff --git a/vendor/github.com/pelletier/go-toml/query/lexer.go b/vendor/github.com/pelletier/go-toml/query/lexer.go
deleted file mode 100644
index 2dc319408..000000000
--- a/vendor/github.com/pelletier/go-toml/query/lexer.go
+++ /dev/null
@@ -1,357 +0,0 @@
-// TOML JSONPath lexer.
-//
-// Written using the principles developed by Rob Pike in
-// http://www.youtube.com/watch?v=HxaD_trXwRE
-
-package query
-
-import (
- "fmt"
- "github.com/pelletier/go-toml"
- "strconv"
- "strings"
- "unicode/utf8"
-)
-
-// Lexer state function
-type queryLexStateFn func() queryLexStateFn
-
-// Lexer definition
-type queryLexer struct {
- input string
- start int
- pos int
- width int
- tokens chan token
- depth int
- line int
- col int
- stringTerm string
-}
-
-func (l *queryLexer) run() {
- for state := l.lexVoid; state != nil; {
- state = state()
- }
- close(l.tokens)
-}
-
-func (l *queryLexer) nextStart() {
- // iterate by runes (utf8 characters)
- // search for newlines and advance line/col counts
- for i := l.start; i < l.pos; {
- r, width := utf8.DecodeRuneInString(l.input[i:])
- if r == '\n' {
- l.line++
- l.col = 1
- } else {
- l.col++
- }
- i += width
- }
- // advance start position to next token
- l.start = l.pos
-}
-
-func (l *queryLexer) emit(t tokenType) {
- l.tokens <- token{
- Position: toml.Position{Line: l.line, Col: l.col},
- typ: t,
- val: l.input[l.start:l.pos],
- }
- l.nextStart()
-}
-
-func (l *queryLexer) emitWithValue(t tokenType, value string) {
- l.tokens <- token{
- Position: toml.Position{Line: l.line, Col: l.col},
- typ: t,
- val: value,
- }
- l.nextStart()
-}
-
-func (l *queryLexer) next() rune {
- if l.pos >= len(l.input) {
- l.width = 0
- return eof
- }
- var r rune
- r, l.width = utf8.DecodeRuneInString(l.input[l.pos:])
- l.pos += l.width
- return r
-}
-
-func (l *queryLexer) ignore() {
- l.nextStart()
-}
-
-func (l *queryLexer) backup() {
- l.pos -= l.width
-}
-
-func (l *queryLexer) errorf(format string, args ...interface{}) queryLexStateFn {
- l.tokens <- token{
- Position: toml.Position{Line: l.line, Col: l.col},
- typ: tokenError,
- val: fmt.Sprintf(format, args...),
- }
- return nil
-}
-
-func (l *queryLexer) peek() rune {
- r := l.next()
- l.backup()
- return r
-}
-
-func (l *queryLexer) accept(valid string) bool {
- if strings.ContainsRune(valid, l.next()) {
- return true
- }
- l.backup()
- return false
-}
-
-func (l *queryLexer) follow(next string) bool {
- return strings.HasPrefix(l.input[l.pos:], next)
-}
-
-func (l *queryLexer) lexVoid() queryLexStateFn {
- for {
- next := l.peek()
- switch next {
- case '$':
- l.pos++
- l.emit(tokenDollar)
- continue
- case '.':
- if l.follow("..") {
- l.pos += 2
- l.emit(tokenDotDot)
- } else {
- l.pos++
- l.emit(tokenDot)
- }
- continue
- case '[':
- l.pos++
- l.emit(tokenLeftBracket)
- continue
- case ']':
- l.pos++
- l.emit(tokenRightBracket)
- continue
- case ',':
- l.pos++
- l.emit(tokenComma)
- continue
- case '*':
- l.pos++
- l.emit(tokenStar)
- continue
- case '(':
- l.pos++
- l.emit(tokenLeftParen)
- continue
- case ')':
- l.pos++
- l.emit(tokenRightParen)
- continue
- case '?':
- l.pos++
- l.emit(tokenQuestion)
- continue
- case ':':
- l.pos++
- l.emit(tokenColon)
- continue
- case '\'':
- l.ignore()
- l.stringTerm = string(next)
- return l.lexString
- case '"':
- l.ignore()
- l.stringTerm = string(next)
- return l.lexString
- }
-
- if isSpace(next) {
- l.next()
- l.ignore()
- continue
- }
-
- if isAlphanumeric(next) {
- return l.lexKey
- }
-
- if next == '+' || next == '-' || isDigit(next) {
- return l.lexNumber
- }
-
- if l.next() == eof {
- break
- }
-
- return l.errorf("unexpected char: '%v'", next)
- }
- l.emit(tokenEOF)
- return nil
-}
-
-func (l *queryLexer) lexKey() queryLexStateFn {
- for {
- next := l.peek()
- if !isAlphanumeric(next) {
- l.emit(tokenKey)
- return l.lexVoid
- }
-
- if l.next() == eof {
- break
- }
- }
- l.emit(tokenEOF)
- return nil
-}
-
-func (l *queryLexer) lexString() queryLexStateFn {
- l.pos++
- l.ignore()
- growingString := ""
-
- for {
- if l.follow(l.stringTerm) {
- l.emitWithValue(tokenString, growingString)
- l.pos++
- l.ignore()
- return l.lexVoid
- }
-
- if l.follow("\\\"") {
- l.pos++
- growingString += "\""
- } else if l.follow("\\'") {
- l.pos++
- growingString += "'"
- } else if l.follow("\\n") {
- l.pos++
- growingString += "\n"
- } else if l.follow("\\b") {
- l.pos++
- growingString += "\b"
- } else if l.follow("\\f") {
- l.pos++
- growingString += "\f"
- } else if l.follow("\\/") {
- l.pos++
- growingString += "/"
- } else if l.follow("\\t") {
- l.pos++
- growingString += "\t"
- } else if l.follow("\\r") {
- l.pos++
- growingString += "\r"
- } else if l.follow("\\\\") {
- l.pos++
- growingString += "\\"
- } else if l.follow("\\u") {
- l.pos += 2
- code := ""
- for i := 0; i < 4; i++ {
- c := l.peek()
- l.pos++
- if !isHexDigit(c) {
- return l.errorf("unfinished unicode escape")
- }
- code = code + string(c)
- }
- l.pos--
- intcode, err := strconv.ParseInt(code, 16, 32)
- if err != nil {
- return l.errorf("invalid unicode escape: \\u" + code)
- }
- growingString += string(rune(intcode))
- } else if l.follow("\\U") {
- l.pos += 2
- code := ""
- for i := 0; i < 8; i++ {
- c := l.peek()
- l.pos++
- if !isHexDigit(c) {
- return l.errorf("unfinished unicode escape")
- }
- code = code + string(c)
- }
- l.pos--
- intcode, err := strconv.ParseInt(code, 16, 32)
- if err != nil {
- return l.errorf("invalid unicode escape: \\u" + code)
- }
- growingString += string(rune(intcode))
- } else if l.follow("\\") {
- l.pos++
- return l.errorf("invalid escape sequence: \\" + string(l.peek()))
- } else {
- growingString += string(l.peek())
- }
-
- if l.next() == eof {
- break
- }
- }
-
- return l.errorf("unclosed string")
-}
-
-func (l *queryLexer) lexNumber() queryLexStateFn {
- l.ignore()
- if !l.accept("+") {
- l.accept("-")
- }
- pointSeen := false
- digitSeen := false
- for {
- next := l.next()
- if next == '.' {
- if pointSeen {
- return l.errorf("cannot have two dots in one float")
- }
- if !isDigit(l.peek()) {
- return l.errorf("float cannot end with a dot")
- }
- pointSeen = true
- } else if isDigit(next) {
- digitSeen = true
- } else {
- l.backup()
- break
- }
- if pointSeen && !digitSeen {
- return l.errorf("cannot start float with a dot")
- }
- }
-
- if !digitSeen {
- return l.errorf("no digit in that number")
- }
- if pointSeen {
- l.emit(tokenFloat)
- } else {
- l.emit(tokenInteger)
- }
- return l.lexVoid
-}
-
-// Entry point
-func lexQuery(input string) chan token {
- l := &queryLexer{
- input: input,
- tokens: make(chan token),
- line: 1,
- col: 1,
- }
- go l.run()
- return l.tokens
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/lexer_test.go b/vendor/github.com/pelletier/go-toml/query/lexer_test.go
deleted file mode 100644
index 8ce0501fe..000000000
--- a/vendor/github.com/pelletier/go-toml/query/lexer_test.go
+++ /dev/null
@@ -1,179 +0,0 @@
-package query
-
-import (
- "github.com/pelletier/go-toml"
- "testing"
-)
-
-func testQLFlow(t *testing.T, input string, expectedFlow []token) {
- ch := lexQuery(input)
- for idx, expected := range expectedFlow {
- token := <-ch
- if token != expected {
- t.Log("While testing #", idx, ":", input)
- t.Log("compared (got)", token, "to (expected)", expected)
- t.Log("\tvalue:", token.val, "<->", expected.val)
- t.Log("\tvalue as bytes:", []byte(token.val), "<->", []byte(expected.val))
- t.Log("\ttype:", token.typ.String(), "<->", expected.typ.String())
- t.Log("\tline:", token.Line, "<->", expected.Line)
- t.Log("\tcolumn:", token.Col, "<->", expected.Col)
- t.Log("compared", token, "to", expected)
- t.FailNow()
- }
- }
-
- tok, ok := <-ch
- if ok {
- t.Log("channel is not closed!")
- t.Log(len(ch)+1, "tokens remaining:")
-
- t.Log("token ->", tok)
- for token := range ch {
- t.Log("token ->", token)
- }
- t.FailNow()
- }
-}
-
-func TestLexSpecialChars(t *testing.T) {
- testQLFlow(t, " .$[]..()?*", []token{
- {toml.Position{1, 2}, tokenDot, "."},
- {toml.Position{1, 3}, tokenDollar, "$"},
- {toml.Position{1, 4}, tokenLeftBracket, "["},
- {toml.Position{1, 5}, tokenRightBracket, "]"},
- {toml.Position{1, 6}, tokenDotDot, ".."},
- {toml.Position{1, 8}, tokenLeftParen, "("},
- {toml.Position{1, 9}, tokenRightParen, ")"},
- {toml.Position{1, 10}, tokenQuestion, "?"},
- {toml.Position{1, 11}, tokenStar, "*"},
- {toml.Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestLexString(t *testing.T) {
- testQLFlow(t, "'foo\n'", []token{
- {toml.Position{1, 2}, tokenString, "foo\n"},
- {toml.Position{2, 2}, tokenEOF, ""},
- })
-}
-
-func TestLexDoubleString(t *testing.T) {
- testQLFlow(t, `"bar"`, []token{
- {toml.Position{1, 2}, tokenString, "bar"},
- {toml.Position{1, 6}, tokenEOF, ""},
- })
-}
-
-func TestLexStringEscapes(t *testing.T) {
- testQLFlow(t, `"foo \" \' \b \f \/ \t \r \\ \u03A9 \U00012345 \n bar"`, []token{
- {toml.Position{1, 2}, tokenString, "foo \" ' \b \f / \t \r \\ \u03A9 \U00012345 \n bar"},
- {toml.Position{1, 55}, tokenEOF, ""},
- })
-}
-
-func TestLexStringUnfinishedUnicode4(t *testing.T) {
- testQLFlow(t, `"\u000"`, []token{
- {toml.Position{1, 2}, tokenError, "unfinished unicode escape"},
- })
-}
-
-func TestLexStringUnfinishedUnicode8(t *testing.T) {
- testQLFlow(t, `"\U0000"`, []token{
- {toml.Position{1, 2}, tokenError, "unfinished unicode escape"},
- })
-}
-
-func TestLexStringInvalidEscape(t *testing.T) {
- testQLFlow(t, `"\x"`, []token{
- {toml.Position{1, 2}, tokenError, "invalid escape sequence: \\x"},
- })
-}
-
-func TestLexStringUnfinished(t *testing.T) {
- testQLFlow(t, `"bar`, []token{
- {toml.Position{1, 2}, tokenError, "unclosed string"},
- })
-}
-
-func TestLexKey(t *testing.T) {
- testQLFlow(t, "foo", []token{
- {toml.Position{1, 1}, tokenKey, "foo"},
- {toml.Position{1, 4}, tokenEOF, ""},
- })
-}
-
-func TestLexRecurse(t *testing.T) {
- testQLFlow(t, "$..*", []token{
- {toml.Position{1, 1}, tokenDollar, "$"},
- {toml.Position{1, 2}, tokenDotDot, ".."},
- {toml.Position{1, 4}, tokenStar, "*"},
- {toml.Position{1, 5}, tokenEOF, ""},
- })
-}
-
-func TestLexBracketKey(t *testing.T) {
- testQLFlow(t, "$[foo]", []token{
- {toml.Position{1, 1}, tokenDollar, "$"},
- {toml.Position{1, 2}, tokenLeftBracket, "["},
- {toml.Position{1, 3}, tokenKey, "foo"},
- {toml.Position{1, 6}, tokenRightBracket, "]"},
- {toml.Position{1, 7}, tokenEOF, ""},
- })
-}
-
-func TestLexSpace(t *testing.T) {
- testQLFlow(t, "foo bar baz", []token{
- {toml.Position{1, 1}, tokenKey, "foo"},
- {toml.Position{1, 5}, tokenKey, "bar"},
- {toml.Position{1, 9}, tokenKey, "baz"},
- {toml.Position{1, 12}, tokenEOF, ""},
- })
-}
-
-func TestLexInteger(t *testing.T) {
- testQLFlow(t, "100 +200 -300", []token{
- {toml.Position{1, 1}, tokenInteger, "100"},
- {toml.Position{1, 5}, tokenInteger, "+200"},
- {toml.Position{1, 10}, tokenInteger, "-300"},
- {toml.Position{1, 14}, tokenEOF, ""},
- })
-}
-
-func TestLexFloat(t *testing.T) {
- testQLFlow(t, "100.0 +200.0 -300.0", []token{
- {toml.Position{1, 1}, tokenFloat, "100.0"},
- {toml.Position{1, 7}, tokenFloat, "+200.0"},
- {toml.Position{1, 14}, tokenFloat, "-300.0"},
- {toml.Position{1, 20}, tokenEOF, ""},
- })
-}
-
-func TestLexFloatWithMultipleDots(t *testing.T) {
- testQLFlow(t, "4.2.", []token{
- {toml.Position{1, 1}, tokenError, "cannot have two dots in one float"},
- })
-}
-
-func TestLexFloatLeadingDot(t *testing.T) {
- testQLFlow(t, "+.1", []token{
- {toml.Position{1, 1}, tokenError, "cannot start float with a dot"},
- })
-}
-
-func TestLexFloatWithTrailingDot(t *testing.T) {
- testQLFlow(t, "42.", []token{
- {toml.Position{1, 1}, tokenError, "float cannot end with a dot"},
- })
-}
-
-func TestLexNumberWithoutDigit(t *testing.T) {
- testQLFlow(t, "+", []token{
- {toml.Position{1, 1}, tokenError, "no digit in that number"},
- })
-}
-
-func TestLexUnknown(t *testing.T) {
- testQLFlow(t, "^", []token{
- {toml.Position{1, 1}, tokenError, "unexpected char: '94'"},
- })
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/match.go b/vendor/github.com/pelletier/go-toml/query/match.go
deleted file mode 100644
index d7bb15a45..000000000
--- a/vendor/github.com/pelletier/go-toml/query/match.go
+++ /dev/null
@@ -1,232 +0,0 @@
-package query
-
-import (
- "fmt"
- "github.com/pelletier/go-toml"
-)
-
-// base match
-type matchBase struct {
- next pathFn
-}
-
-func (f *matchBase) setNext(next pathFn) {
- f.next = next
-}
-
-// terminating functor - gathers results
-type terminatingFn struct {
- // empty
-}
-
-func newTerminatingFn() *terminatingFn {
- return &terminatingFn{}
-}
-
-func (f *terminatingFn) setNext(next pathFn) {
- // do nothing
-}
-
-func (f *terminatingFn) call(node interface{}, ctx *queryContext) {
- ctx.result.appendResult(node, ctx.lastPosition)
-}
-
-// match single key
-type matchKeyFn struct {
- matchBase
- Name string
-}
-
-func newMatchKeyFn(name string) *matchKeyFn {
- return &matchKeyFn{Name: name}
-}
-
-func (f *matchKeyFn) call(node interface{}, ctx *queryContext) {
- if array, ok := node.([]*toml.Tree); ok {
- for _, tree := range array {
- item := tree.Get(f.Name)
- if item != nil {
- ctx.lastPosition = tree.GetPosition(f.Name)
- f.next.call(item, ctx)
- }
- }
- } else if tree, ok := node.(*toml.Tree); ok {
- item := tree.Get(f.Name)
- if item != nil {
- ctx.lastPosition = tree.GetPosition(f.Name)
- f.next.call(item, ctx)
- }
- }
-}
-
-// match single index
-type matchIndexFn struct {
- matchBase
- Idx int
-}
-
-func newMatchIndexFn(idx int) *matchIndexFn {
- return &matchIndexFn{Idx: idx}
-}
-
-func (f *matchIndexFn) call(node interface{}, ctx *queryContext) {
- if arr, ok := node.([]interface{}); ok {
- if f.Idx < len(arr) && f.Idx >= 0 {
- if treesArray, ok := node.([]*toml.Tree); ok {
- if len(treesArray) > 0 {
- ctx.lastPosition = treesArray[0].Position()
- }
- }
- f.next.call(arr[f.Idx], ctx)
- }
- }
-}
-
-// filter by slicing
-type matchSliceFn struct {
- matchBase
- Start, End, Step int
-}
-
-func newMatchSliceFn(start, end, step int) *matchSliceFn {
- return &matchSliceFn{Start: start, End: end, Step: step}
-}
-
-func (f *matchSliceFn) call(node interface{}, ctx *queryContext) {
- if arr, ok := node.([]interface{}); ok {
- // adjust indexes for negative values, reverse ordering
- realStart, realEnd := f.Start, f.End
- if realStart < 0 {
- realStart = len(arr) + realStart
- }
- if realEnd < 0 {
- realEnd = len(arr) + realEnd
- }
- if realEnd < realStart {
- realEnd, realStart = realStart, realEnd // swap
- }
- // loop and gather
- for idx := realStart; idx < realEnd; idx += f.Step {
- if treesArray, ok := node.([]*toml.Tree); ok {
- if len(treesArray) > 0 {
- ctx.lastPosition = treesArray[0].Position()
- }
- }
- f.next.call(arr[idx], ctx)
- }
- }
-}
-
-// match anything
-type matchAnyFn struct {
- matchBase
-}
-
-func newMatchAnyFn() *matchAnyFn {
- return &matchAnyFn{}
-}
-
-func (f *matchAnyFn) call(node interface{}, ctx *queryContext) {
- if tree, ok := node.(*toml.Tree); ok {
- for _, k := range tree.Keys() {
- v := tree.Get(k)
- ctx.lastPosition = tree.GetPosition(k)
- f.next.call(v, ctx)
- }
- }
-}
-
-// filter through union
-type matchUnionFn struct {
- Union []pathFn
-}
-
-func (f *matchUnionFn) setNext(next pathFn) {
- for _, fn := range f.Union {
- fn.setNext(next)
- }
-}
-
-func (f *matchUnionFn) call(node interface{}, ctx *queryContext) {
- for _, fn := range f.Union {
- fn.call(node, ctx)
- }
-}
-
-// match every single last node in the tree
-type matchRecursiveFn struct {
- matchBase
-}
-
-func newMatchRecursiveFn() *matchRecursiveFn {
- return &matchRecursiveFn{}
-}
-
-func (f *matchRecursiveFn) call(node interface{}, ctx *queryContext) {
- originalPosition := ctx.lastPosition
- if tree, ok := node.(*toml.Tree); ok {
- var visit func(tree *toml.Tree)
- visit = func(tree *toml.Tree) {
- for _, k := range tree.Keys() {
- v := tree.Get(k)
- ctx.lastPosition = tree.GetPosition(k)
- f.next.call(v, ctx)
- switch node := v.(type) {
- case *toml.Tree:
- visit(node)
- case []*toml.Tree:
- for _, subtree := range node {
- visit(subtree)
- }
- }
- }
- }
- ctx.lastPosition = originalPosition
- f.next.call(tree, ctx)
- visit(tree)
- }
-}
-
-// match based on an externally provided functional filter
-type matchFilterFn struct {
- matchBase
- Pos toml.Position
- Name string
-}
-
-func newMatchFilterFn(name string, pos toml.Position) *matchFilterFn {
- return &matchFilterFn{Name: name, Pos: pos}
-}
-
-func (f *matchFilterFn) call(node interface{}, ctx *queryContext) {
- fn, ok := (*ctx.filters)[f.Name]
- if !ok {
- panic(fmt.Sprintf("%s: query context does not have filter '%s'",
- f.Pos.String(), f.Name))
- }
- switch castNode := node.(type) {
- case *toml.Tree:
- for _, k := range castNode.Keys() {
- v := castNode.Get(k)
- if fn(v) {
- ctx.lastPosition = castNode.GetPosition(k)
- f.next.call(v, ctx)
- }
- }
- case []*toml.Tree:
- for _, v := range castNode {
- if fn(v) {
- if len(castNode) > 0 {
- ctx.lastPosition = castNode[0].Position()
- }
- f.next.call(v, ctx)
- }
- }
- case []interface{}:
- for _, v := range castNode {
- if fn(v) {
- f.next.call(v, ctx)
- }
- }
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/match_test.go b/vendor/github.com/pelletier/go-toml/query/match_test.go
deleted file mode 100644
index 429b8f6b9..000000000
--- a/vendor/github.com/pelletier/go-toml/query/match_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package query
-
-import (
- "fmt"
- "github.com/pelletier/go-toml"
- "testing"
-)
-
-// dump path tree to a string
-func pathString(root pathFn) string {
- result := fmt.Sprintf("%T:", root)
- switch fn := root.(type) {
- case *terminatingFn:
- result += "{}"
- case *matchKeyFn:
- result += fmt.Sprintf("{%s}", fn.Name)
- result += pathString(fn.next)
- case *matchIndexFn:
- result += fmt.Sprintf("{%d}", fn.Idx)
- result += pathString(fn.next)
- case *matchSliceFn:
- result += fmt.Sprintf("{%d:%d:%d}",
- fn.Start, fn.End, fn.Step)
- result += pathString(fn.next)
- case *matchAnyFn:
- result += "{}"
- result += pathString(fn.next)
- case *matchUnionFn:
- result += "{["
- for _, v := range fn.Union {
- result += pathString(v) + ", "
- }
- result += "]}"
- case *matchRecursiveFn:
- result += "{}"
- result += pathString(fn.next)
- case *matchFilterFn:
- result += fmt.Sprintf("{%s}", fn.Name)
- result += pathString(fn.next)
- }
- return result
-}
-
-func assertPathMatch(t *testing.T, path, ref *Query) bool {
- pathStr := pathString(path.root)
- refStr := pathString(ref.root)
- if pathStr != refStr {
- t.Errorf("paths do not match")
- t.Log("test:", pathStr)
- t.Log("ref: ", refStr)
- return false
- }
- return true
-}
-
-func assertPath(t *testing.T, query string, ref *Query) {
- path, _ := parseQuery(lexQuery(query))
- assertPathMatch(t, path, ref)
-}
-
-func buildPath(parts ...pathFn) *Query {
- query := newQuery()
- for _, v := range parts {
- query.appendPath(v)
- }
- return query
-}
-
-func TestPathRoot(t *testing.T) {
- assertPath(t,
- "$",
- buildPath(
- // empty
- ))
-}
-
-func TestPathKey(t *testing.T) {
- assertPath(t,
- "$.foo",
- buildPath(
- newMatchKeyFn("foo"),
- ))
-}
-
-func TestPathBracketKey(t *testing.T) {
- assertPath(t,
- "$[foo]",
- buildPath(
- newMatchKeyFn("foo"),
- ))
-}
-
-func TestPathBracketStringKey(t *testing.T) {
- assertPath(t,
- "$['foo']",
- buildPath(
- newMatchKeyFn("foo"),
- ))
-}
-
-func TestPathIndex(t *testing.T) {
- assertPath(t,
- "$[123]",
- buildPath(
- newMatchIndexFn(123),
- ))
-}
-
-func TestPathSliceStart(t *testing.T) {
- assertPath(t,
- "$[123:]",
- buildPath(
- newMatchSliceFn(123, maxInt, 1),
- ))
-}
-
-func TestPathSliceStartEnd(t *testing.T) {
- assertPath(t,
- "$[123:456]",
- buildPath(
- newMatchSliceFn(123, 456, 1),
- ))
-}
-
-func TestPathSliceStartEndColon(t *testing.T) {
- assertPath(t,
- "$[123:456:]",
- buildPath(
- newMatchSliceFn(123, 456, 1),
- ))
-}
-
-func TestPathSliceStartStep(t *testing.T) {
- assertPath(t,
- "$[123::7]",
- buildPath(
- newMatchSliceFn(123, maxInt, 7),
- ))
-}
-
-func TestPathSliceEndStep(t *testing.T) {
- assertPath(t,
- "$[:456:7]",
- buildPath(
- newMatchSliceFn(0, 456, 7),
- ))
-}
-
-func TestPathSliceStep(t *testing.T) {
- assertPath(t,
- "$[::7]",
- buildPath(
- newMatchSliceFn(0, maxInt, 7),
- ))
-}
-
-func TestPathSliceAll(t *testing.T) {
- assertPath(t,
- "$[123:456:7]",
- buildPath(
- newMatchSliceFn(123, 456, 7),
- ))
-}
-
-func TestPathAny(t *testing.T) {
- assertPath(t,
- "$.*",
- buildPath(
- newMatchAnyFn(),
- ))
-}
-
-func TestPathUnion(t *testing.T) {
- assertPath(t,
- "$[foo, bar, baz]",
- buildPath(
- &matchUnionFn{[]pathFn{
- newMatchKeyFn("foo"),
- newMatchKeyFn("bar"),
- newMatchKeyFn("baz"),
- }},
- ))
-}
-
-func TestPathRecurse(t *testing.T) {
- assertPath(t,
- "$..*",
- buildPath(
- newMatchRecursiveFn(),
- ))
-}
-
-func TestPathFilterExpr(t *testing.T) {
- assertPath(t,
- "$[?('foo'),?(bar)]",
- buildPath(
- &matchUnionFn{[]pathFn{
- newMatchFilterFn("foo", toml.Position{}),
- newMatchFilterFn("bar", toml.Position{}),
- }},
- ))
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/parser.go b/vendor/github.com/pelletier/go-toml/query/parser.go
deleted file mode 100644
index 5f69b70d4..000000000
--- a/vendor/github.com/pelletier/go-toml/query/parser.go
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- Based on the "jsonpath" spec/concept.
-
- http://goessner.net/articles/JsonPath/
- https://code.google.com/p/json-path/
-*/
-
-package query
-
-import (
- "fmt"
-)
-
-const maxInt = int(^uint(0) >> 1)
-
-type queryParser struct {
- flow chan token
- tokensBuffer []token
- query *Query
- union []pathFn
- err error
-}
-
-type queryParserStateFn func() queryParserStateFn
-
-// Formats and panics an error message based on a token
-func (p *queryParser) parseError(tok *token, msg string, args ...interface{}) queryParserStateFn {
- p.err = fmt.Errorf(tok.Position.String()+": "+msg, args...)
- return nil // trigger parse to end
-}
-
-func (p *queryParser) run() {
- for state := p.parseStart; state != nil; {
- state = state()
- }
-}
-
-func (p *queryParser) backup(tok *token) {
- p.tokensBuffer = append(p.tokensBuffer, *tok)
-}
-
-func (p *queryParser) peek() *token {
- if len(p.tokensBuffer) != 0 {
- return &(p.tokensBuffer[0])
- }
-
- tok, ok := <-p.flow
- if !ok {
- return nil
- }
- p.backup(&tok)
- return &tok
-}
-
-func (p *queryParser) lookahead(types ...tokenType) bool {
- result := true
- buffer := []token{}
-
- for _, typ := range types {
- tok := p.getToken()
- if tok == nil {
- result = false
- break
- }
- buffer = append(buffer, *tok)
- if tok.typ != typ {
- result = false
- break
- }
- }
- // add the tokens back to the buffer, and return
- p.tokensBuffer = append(p.tokensBuffer, buffer...)
- return result
-}
-
-func (p *queryParser) getToken() *token {
- if len(p.tokensBuffer) != 0 {
- tok := p.tokensBuffer[0]
- p.tokensBuffer = p.tokensBuffer[1:]
- return &tok
- }
- tok, ok := <-p.flow
- if !ok {
- return nil
- }
- return &tok
-}
-
-func (p *queryParser) parseStart() queryParserStateFn {
- tok := p.getToken()
-
- if tok == nil || tok.typ == tokenEOF {
- return nil
- }
-
- if tok.typ != tokenDollar {
- return p.parseError(tok, "Expected '$' at start of expression")
- }
-
- return p.parseMatchExpr
-}
-
-// handle '.' prefix, '[]', and '..'
-func (p *queryParser) parseMatchExpr() queryParserStateFn {
- tok := p.getToken()
- switch tok.typ {
- case tokenDotDot:
- p.query.appendPath(&matchRecursiveFn{})
- // nested parse for '..'
- tok := p.getToken()
- switch tok.typ {
- case tokenKey:
- p.query.appendPath(newMatchKeyFn(tok.val))
- return p.parseMatchExpr
- case tokenLeftBracket:
- return p.parseBracketExpr
- case tokenStar:
- // do nothing - the recursive predicate is enough
- return p.parseMatchExpr
- }
-
- case tokenDot:
- // nested parse for '.'
- tok := p.getToken()
- switch tok.typ {
- case tokenKey:
- p.query.appendPath(newMatchKeyFn(tok.val))
- return p.parseMatchExpr
- case tokenStar:
- p.query.appendPath(&matchAnyFn{})
- return p.parseMatchExpr
- }
-
- case tokenLeftBracket:
- return p.parseBracketExpr
-
- case tokenEOF:
- return nil // allow EOF at this stage
- }
- return p.parseError(tok, "expected match expression")
-}
-
-func (p *queryParser) parseBracketExpr() queryParserStateFn {
- if p.lookahead(tokenInteger, tokenColon) {
- return p.parseSliceExpr
- }
- if p.peek().typ == tokenColon {
- return p.parseSliceExpr
- }
- return p.parseUnionExpr
-}
-
-func (p *queryParser) parseUnionExpr() queryParserStateFn {
- var tok *token
-
- // this state can be traversed after some sub-expressions
- // so be careful when setting up state in the parser
- if p.union == nil {
- p.union = []pathFn{}
- }
-
-loop: // labeled loop for easy breaking
- for {
- if len(p.union) > 0 {
- // parse delimiter or terminator
- tok = p.getToken()
- switch tok.typ {
- case tokenComma:
- // do nothing
- case tokenRightBracket:
- break loop
- default:
- return p.parseError(tok, "expected ',' or ']', not '%s'", tok.val)
- }
- }
-
- // parse sub expression
- tok = p.getToken()
- switch tok.typ {
- case tokenInteger:
- p.union = append(p.union, newMatchIndexFn(tok.Int()))
- case tokenKey:
- p.union = append(p.union, newMatchKeyFn(tok.val))
- case tokenString:
- p.union = append(p.union, newMatchKeyFn(tok.val))
- case tokenQuestion:
- return p.parseFilterExpr
- default:
- return p.parseError(tok, "expected union sub expression, not '%s', %d", tok.val, len(p.union))
- }
- }
-
- // if there is only one sub-expression, use that instead
- if len(p.union) == 1 {
- p.query.appendPath(p.union[0])
- } else {
- p.query.appendPath(&matchUnionFn{p.union})
- }
-
- p.union = nil // clear out state
- return p.parseMatchExpr
-}
-
-func (p *queryParser) parseSliceExpr() queryParserStateFn {
- // init slice to grab all elements
- start, end, step := 0, maxInt, 1
-
- // parse optional start
- tok := p.getToken()
- if tok.typ == tokenInteger {
- start = tok.Int()
- tok = p.getToken()
- }
- if tok.typ != tokenColon {
- return p.parseError(tok, "expected ':'")
- }
-
- // parse optional end
- tok = p.getToken()
- if tok.typ == tokenInteger {
- end = tok.Int()
- tok = p.getToken()
- }
- if tok.typ == tokenRightBracket {
- p.query.appendPath(newMatchSliceFn(start, end, step))
- return p.parseMatchExpr
- }
- if tok.typ != tokenColon {
- return p.parseError(tok, "expected ']' or ':'")
- }
-
- // parse optional step
- tok = p.getToken()
- if tok.typ == tokenInteger {
- step = tok.Int()
- if step < 0 {
- return p.parseError(tok, "step must be a positive value")
- }
- tok = p.getToken()
- }
- if tok.typ != tokenRightBracket {
- return p.parseError(tok, "expected ']'")
- }
-
- p.query.appendPath(newMatchSliceFn(start, end, step))
- return p.parseMatchExpr
-}
-
-func (p *queryParser) parseFilterExpr() queryParserStateFn {
- tok := p.getToken()
- if tok.typ != tokenLeftParen {
- return p.parseError(tok, "expected left-parenthesis for filter expression")
- }
- tok = p.getToken()
- if tok.typ != tokenKey && tok.typ != tokenString {
- return p.parseError(tok, "expected key or string for filter function name")
- }
- name := tok.val
- tok = p.getToken()
- if tok.typ != tokenRightParen {
- return p.parseError(tok, "expected right-parenthesis for filter expression")
- }
- p.union = append(p.union, newMatchFilterFn(name, tok.Position))
- return p.parseUnionExpr
-}
-
-func parseQuery(flow chan token) (*Query, error) {
- parser := &queryParser{
- flow: flow,
- tokensBuffer: []token{},
- query: newQuery(),
- }
- parser.run()
- return parser.query, parser.err
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/parser_test.go b/vendor/github.com/pelletier/go-toml/query/parser_test.go
deleted file mode 100644
index 473896a02..000000000
--- a/vendor/github.com/pelletier/go-toml/query/parser_test.go
+++ /dev/null
@@ -1,482 +0,0 @@
-package query
-
-import (
- "fmt"
- "github.com/pelletier/go-toml"
- "io/ioutil"
- "sort"
- "strings"
- "testing"
- "time"
-)
-
-type queryTestNode struct {
- value interface{}
- position toml.Position
-}
-
-func valueString(root interface{}) string {
- result := "" //fmt.Sprintf("%T:", root)
- switch node := root.(type) {
- case *Result:
- items := []string{}
- for i, v := range node.Values() {
- items = append(items, fmt.Sprintf("%s:%s",
- node.Positions()[i].String(), valueString(v)))
- }
- sort.Strings(items)
- result = "[" + strings.Join(items, ", ") + "]"
- case queryTestNode:
- result = fmt.Sprintf("%s:%s",
- node.position.String(), valueString(node.value))
- case []interface{}:
- items := []string{}
- for _, v := range node {
- items = append(items, valueString(v))
- }
- sort.Strings(items)
- result = "[" + strings.Join(items, ", ") + "]"
- case *toml.Tree:
- // workaround for unreliable map key ordering
- items := []string{}
- for _, k := range node.Keys() {
- v := node.GetPath([]string{k})
- items = append(items, k+":"+valueString(v))
- }
- sort.Strings(items)
- result = "{" + strings.Join(items, ", ") + "}"
- case map[string]interface{}:
- // workaround for unreliable map key ordering
- items := []string{}
- for k, v := range node {
- items = append(items, k+":"+valueString(v))
- }
- sort.Strings(items)
- result = "{" + strings.Join(items, ", ") + "}"
- case int64:
- result += fmt.Sprintf("%d", node)
- case string:
- result += "'" + node + "'"
- case float64:
- result += fmt.Sprintf("%f", node)
- case bool:
- result += fmt.Sprintf("%t", node)
- case time.Time:
- result += fmt.Sprintf("'%v'", node)
- }
- return result
-}
-
-func assertValue(t *testing.T, result, ref interface{}) {
- pathStr := valueString(result)
- refStr := valueString(ref)
- if pathStr != refStr {
- t.Errorf("values do not match")
- t.Log("test:", pathStr)
- t.Log("ref: ", refStr)
- }
-}
-
-func assertQueryPositions(t *testing.T, tomlDoc string, query string, ref []interface{}) {
- tree, err := toml.Load(tomlDoc)
- if err != nil {
- t.Errorf("Non-nil toml parse error: %v", err)
- return
- }
- q, err := Compile(query)
- if err != nil {
- t.Error(err)
- return
- }
- results := q.Execute(tree)
- assertValue(t, results, ref)
-}
-
-func TestQueryRoot(t *testing.T) {
- assertQueryPositions(t,
- "a = 42",
- "$",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "a": int64(42),
- }, toml.Position{1, 1},
- },
- })
-}
-
-func TestQueryKey(t *testing.T) {
- assertQueryPositions(t,
- "[foo]\na = 42",
- "$.foo.a",
- []interface{}{
- queryTestNode{
- int64(42), toml.Position{2, 1},
- },
- })
-}
-
-func TestQueryKeyString(t *testing.T) {
- assertQueryPositions(t,
- "[foo]\na = 42",
- "$.foo['a']",
- []interface{}{
- queryTestNode{
- int64(42), toml.Position{2, 1},
- },
- })
-}
-
-func TestQueryIndex(t *testing.T) {
- assertQueryPositions(t,
- "[foo]\na = [1,2,3,4,5,6,7,8,9,0]",
- "$.foo.a[5]",
- []interface{}{
- queryTestNode{
- int64(6), toml.Position{2, 1},
- },
- })
-}
-
-func TestQuerySliceRange(t *testing.T) {
- assertQueryPositions(t,
- "[foo]\na = [1,2,3,4,5,6,7,8,9,0]",
- "$.foo.a[0:5]",
- []interface{}{
- queryTestNode{
- int64(1), toml.Position{2, 1},
- },
- queryTestNode{
- int64(2), toml.Position{2, 1},
- },
- queryTestNode{
- int64(3), toml.Position{2, 1},
- },
- queryTestNode{
- int64(4), toml.Position{2, 1},
- },
- queryTestNode{
- int64(5), toml.Position{2, 1},
- },
- })
-}
-
-func TestQuerySliceStep(t *testing.T) {
- assertQueryPositions(t,
- "[foo]\na = [1,2,3,4,5,6,7,8,9,0]",
- "$.foo.a[0:5:2]",
- []interface{}{
- queryTestNode{
- int64(1), toml.Position{2, 1},
- },
- queryTestNode{
- int64(3), toml.Position{2, 1},
- },
- queryTestNode{
- int64(5), toml.Position{2, 1},
- },
- })
-}
-
-func TestQueryAny(t *testing.T) {
- assertQueryPositions(t,
- "[foo.bar]\na=1\nb=2\n[foo.baz]\na=3\nb=4",
- "$.foo.*",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- }, toml.Position{4, 1},
- },
- })
-}
-func TestQueryUnionSimple(t *testing.T) {
- assertQueryPositions(t,
- "[foo.bar]\na=1\nb=2\n[baz.foo]\na=3\nb=4\n[gorf.foo]\na=5\nb=6",
- "$.*[bar,foo]",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- }, toml.Position{4, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(5),
- "b": int64(6),
- }, toml.Position{7, 1},
- },
- })
-}
-
-func TestQueryRecursionAll(t *testing.T) {
- assertQueryPositions(t,
- "[foo.bar]\na=1\nb=2\n[baz.foo]\na=3\nb=4\n[gorf.foo]\na=5\nb=6",
- "$..*",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "foo": map[string]interface{}{
- "bar": map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- },
- },
- "baz": map[string]interface{}{
- "foo": map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- },
- },
- "gorf": map[string]interface{}{
- "foo": map[string]interface{}{
- "a": int64(5),
- "b": int64(6),
- },
- },
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "bar": map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- },
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- }, toml.Position{1, 1},
- },
- queryTestNode{
- int64(1), toml.Position{2, 1},
- },
- queryTestNode{
- int64(2), toml.Position{3, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "foo": map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- },
- }, toml.Position{4, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- }, toml.Position{4, 1},
- },
- queryTestNode{
- int64(3), toml.Position{5, 1},
- },
- queryTestNode{
- int64(4), toml.Position{6, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "foo": map[string]interface{}{
- "a": int64(5),
- "b": int64(6),
- },
- }, toml.Position{7, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(5),
- "b": int64(6),
- }, toml.Position{7, 1},
- },
- queryTestNode{
- int64(5), toml.Position{8, 1},
- },
- queryTestNode{
- int64(6), toml.Position{9, 1},
- },
- })
-}
-
-func TestQueryRecursionUnionSimple(t *testing.T) {
- assertQueryPositions(t,
- "[foo.bar]\na=1\nb=2\n[baz.foo]\na=3\nb=4\n[gorf.foo]\na=5\nb=6",
- "$..['foo','bar']",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "bar": map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- },
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(3),
- "b": int64(4),
- }, toml.Position{4, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(1),
- "b": int64(2),
- }, toml.Position{1, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "a": int64(5),
- "b": int64(6),
- }, toml.Position{7, 1},
- },
- })
-}
-
-func TestQueryFilterFn(t *testing.T) {
- buff, err := ioutil.ReadFile("../example.toml")
- if err != nil {
- t.Error(err)
- return
- }
-
- assertQueryPositions(t, string(buff),
- "$..[?(int)]",
- []interface{}{
- queryTestNode{
- int64(8001), toml.Position{13, 1},
- },
- queryTestNode{
- int64(8001), toml.Position{13, 1},
- },
- queryTestNode{
- int64(8002), toml.Position{13, 1},
- },
- queryTestNode{
- int64(5000), toml.Position{14, 1},
- },
- })
-
- assertQueryPositions(t, string(buff),
- "$..[?(string)]",
- []interface{}{
- queryTestNode{
- "TOML Example", toml.Position{3, 1},
- },
- queryTestNode{
- "Tom Preston-Werner", toml.Position{6, 1},
- },
- queryTestNode{
- "GitHub", toml.Position{7, 1},
- },
- queryTestNode{
- "GitHub Cofounder & CEO\nLikes tater tots and beer.",
- toml.Position{8, 1},
- },
- queryTestNode{
- "192.168.1.1", toml.Position{12, 1},
- },
- queryTestNode{
- "10.0.0.1", toml.Position{21, 3},
- },
- queryTestNode{
- "eqdc10", toml.Position{22, 3},
- },
- queryTestNode{
- "10.0.0.2", toml.Position{25, 3},
- },
- queryTestNode{
- "eqdc10", toml.Position{26, 3},
- },
- })
-
- assertQueryPositions(t, string(buff),
- "$..[?(float)]",
- []interface{}{
- // no float values in document
- })
-
- tv, _ := time.Parse(time.RFC3339, "1979-05-27T07:32:00Z")
- assertQueryPositions(t, string(buff),
- "$..[?(tree)]",
- []interface{}{
- queryTestNode{
- map[string]interface{}{
- "name": "Tom Preston-Werner",
- "organization": "GitHub",
- "bio": "GitHub Cofounder & CEO\nLikes tater tots and beer.",
- "dob": tv,
- }, toml.Position{5, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "server": "192.168.1.1",
- "ports": []interface{}{int64(8001), int64(8001), int64(8002)},
- "connection_max": int64(5000),
- "enabled": true,
- }, toml.Position{11, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "alpha": map[string]interface{}{
- "ip": "10.0.0.1",
- "dc": "eqdc10",
- },
- "beta": map[string]interface{}{
- "ip": "10.0.0.2",
- "dc": "eqdc10",
- },
- }, toml.Position{17, 1},
- },
- queryTestNode{
- map[string]interface{}{
- "ip": "10.0.0.1",
- "dc": "eqdc10",
- }, toml.Position{20, 3},
- },
- queryTestNode{
- map[string]interface{}{
- "ip": "10.0.0.2",
- "dc": "eqdc10",
- }, toml.Position{24, 3},
- },
- queryTestNode{
- map[string]interface{}{
- "data": []interface{}{
- []interface{}{"gamma", "delta"},
- []interface{}{int64(1), int64(2)},
- },
- }, toml.Position{28, 1},
- },
- })
-
- assertQueryPositions(t, string(buff),
- "$..[?(time)]",
- []interface{}{
- queryTestNode{
- tv, toml.Position{9, 1},
- },
- })
-
- assertQueryPositions(t, string(buff),
- "$..[?(bool)]",
- []interface{}{
- queryTestNode{
- true, toml.Position{15, 1},
- },
- })
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/query.go b/vendor/github.com/pelletier/go-toml/query/query.go
deleted file mode 100644
index 1c6cd8014..000000000
--- a/vendor/github.com/pelletier/go-toml/query/query.go
+++ /dev/null
@@ -1,158 +0,0 @@
-package query
-
-import (
- "time"
-
- "github.com/pelletier/go-toml"
-)
-
-// NodeFilterFn represents a user-defined filter function, for use with
-// Query.SetFilter().
-//
-// The return value of the function must indicate if 'node' is to be included
-// at this stage of the TOML path. Returning true will include the node, and
-// returning false will exclude it.
-//
-// NOTE: Care should be taken to write script callbacks such that they are safe
-// to use from multiple goroutines.
-type NodeFilterFn func(node interface{}) bool
-
-// Result is the result of Executing a Query.
-type Result struct {
- items []interface{}
- positions []toml.Position
-}
-
-// appends a value/position pair to the result set.
-func (r *Result) appendResult(node interface{}, pos toml.Position) {
- r.items = append(r.items, node)
- r.positions = append(r.positions, pos)
-}
-
-// Values is a set of values within a Result. The order of values is not
-// guaranteed to be in document order, and may be different each time a query is
-// executed.
-func (r Result) Values() []interface{} {
- return r.items
-}
-
-// Positions is a set of positions for values within a Result. Each index
-// in Positions() corresponds to the entry in Value() of the same index.
-func (r Result) Positions() []toml.Position {
- return r.positions
-}
-
-// runtime context for executing query paths
-type queryContext struct {
- result *Result
- filters *map[string]NodeFilterFn
- lastPosition toml.Position
-}
-
-// generic path functor interface
-type pathFn interface {
- setNext(next pathFn)
- // it is the caller's responsibility to set the ctx.lastPosition before invoking call()
- // node can be one of: *toml.Tree, []*toml.Tree, or a scalar
- call(node interface{}, ctx *queryContext)
-}
-
-// A Query is the representation of a compiled TOML path. A Query is safe
-// for concurrent use by multiple goroutines.
-type Query struct {
- root pathFn
- tail pathFn
- filters *map[string]NodeFilterFn
-}
-
-func newQuery() *Query {
- return &Query{
- root: nil,
- tail: nil,
- filters: &defaultFilterFunctions,
- }
-}
-
-func (q *Query) appendPath(next pathFn) {
- if q.root == nil {
- q.root = next
- } else {
- q.tail.setNext(next)
- }
- q.tail = next
- next.setNext(newTerminatingFn()) // init the next functor
-}
-
-// Compile compiles a TOML path expression. The returned Query can be used
-// to match elements within a Tree and its descendants. See Execute.
-func Compile(path string) (*Query, error) {
- return parseQuery(lexQuery(path))
-}
-
-// Execute executes a query against a Tree, and returns the result of the query.
-func (q *Query) Execute(tree *toml.Tree) *Result {
- result := &Result{
- items: []interface{}{},
- positions: []toml.Position{},
- }
- if q.root == nil {
- result.appendResult(tree, tree.GetPosition(""))
- } else {
- ctx := &queryContext{
- result: result,
- filters: q.filters,
- }
- ctx.lastPosition = tree.Position()
- q.root.call(tree, ctx)
- }
- return result
-}
-
-// CompileAndExecute is a shorthand for Compile(path) followed by Execute(tree).
-func CompileAndExecute(path string, tree *toml.Tree) (*Result, error) {
- query, err := Compile(path)
- if err != nil {
- return nil, err
- }
- return query.Execute(tree), nil
-}
-
-// SetFilter sets a user-defined filter function. These may be used inside
-// "?(..)" query expressions to filter TOML document elements within a query.
-func (q *Query) SetFilter(name string, fn NodeFilterFn) {
- if q.filters == &defaultFilterFunctions {
- // clone the static table
- q.filters = &map[string]NodeFilterFn{}
- for k, v := range defaultFilterFunctions {
- (*q.filters)[k] = v
- }
- }
- (*q.filters)[name] = fn
-}
-
-var defaultFilterFunctions = map[string]NodeFilterFn{
- "tree": func(node interface{}) bool {
- _, ok := node.(*toml.Tree)
- return ok
- },
- "int": func(node interface{}) bool {
- _, ok := node.(int64)
- return ok
- },
- "float": func(node interface{}) bool {
- _, ok := node.(float64)
- return ok
- },
- "string": func(node interface{}) bool {
- _, ok := node.(string)
- return ok
- },
- "time": func(node interface{}) bool {
- _, ok := node.(time.Time)
- return ok
- },
- "bool": func(node interface{}) bool {
- _, ok := node.(bool)
- return ok
- },
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/query_test.go b/vendor/github.com/pelletier/go-toml/query/query_test.go
deleted file mode 100644
index 903a8dc73..000000000
--- a/vendor/github.com/pelletier/go-toml/query/query_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-package query
-
-import (
- "fmt"
- "testing"
-
- "github.com/pelletier/go-toml"
-)
-
-func assertArrayContainsInAnyOrder(t *testing.T, array []interface{}, objects ...interface{}) {
- if len(array) != len(objects) {
- t.Fatalf("array contains %d objects but %d are expected", len(array), len(objects))
- }
-
- for _, o := range objects {
- found := false
- for _, a := range array {
- if a == o {
- found = true
- break
- }
- }
- if !found {
- t.Fatal(o, "not found in array", array)
- }
- }
-}
-
-func TestQueryExample(t *testing.T) {
- config, _ := toml.Load(`
- [[book]]
- title = "The Stand"
- author = "Stephen King"
- [[book]]
- title = "For Whom the Bell Tolls"
- author = "Ernest Hemmingway"
- [[book]]
- title = "Neuromancer"
- author = "William Gibson"
- `)
- authors, err := CompileAndExecute("$.book.author", config)
- if err != nil {
- t.Fatal("unexpected error:", err)
- }
- names := authors.Values()
- if len(names) != 3 {
- t.Fatalf("query should return 3 names but returned %d", len(names))
- }
- assertArrayContainsInAnyOrder(t, names, "Stephen King", "Ernest Hemmingway", "William Gibson")
-}
-
-func TestQueryReadmeExample(t *testing.T) {
- config, _ := toml.Load(`
-[postgres]
-user = "pelletier"
-password = "mypassword"
-`)
-
- query, err := Compile("$..[user,password]")
- if err != nil {
- t.Fatal("unexpected error:", err)
- }
- results := query.Execute(config)
- values := results.Values()
- if len(values) != 2 {
- t.Fatalf("query should return 2 values but returned %d", len(values))
- }
- assertArrayContainsInAnyOrder(t, values, "pelletier", "mypassword")
-}
-
-func TestQueryPathNotPresent(t *testing.T) {
- config, _ := toml.Load(`a = "hello"`)
- query, err := Compile("$.foo.bar")
- if err != nil {
- t.Fatal("unexpected error:", err)
- }
- results := query.Execute(config)
- if err != nil {
- t.Fatalf("err should be nil. got %s instead", err)
- }
- if len(results.items) != 0 {
- t.Fatalf("no items should be matched. %d matched instead", len(results.items))
- }
-}
-
-func ExampleNodeFilterFn_filterExample() {
- tree, _ := toml.Load(`
- [struct_one]
- foo = "foo"
- bar = "bar"
-
- [struct_two]
- baz = "baz"
- gorf = "gorf"
- `)
-
- // create a query that references a user-defined-filter
- query, _ := Compile("$[?(bazOnly)]")
-
- // define the filter, and assign it to the query
- query.SetFilter("bazOnly", func(node interface{}) bool {
- if tree, ok := node.(*toml.Tree); ok {
- return tree.Has("baz")
- }
- return false // reject all other node types
- })
-
- // results contain only the 'struct_two' Tree
- query.Execute(tree)
-}
-
-func ExampleQuery_queryExample() {
- config, _ := toml.Load(`
- [[book]]
- title = "The Stand"
- author = "Stephen King"
- [[book]]
- title = "For Whom the Bell Tolls"
- author = "Ernest Hemmingway"
- [[book]]
- title = "Neuromancer"
- author = "William Gibson"
- `)
-
- // find and print all the authors in the document
- query, _ := Compile("$.book.author")
- authors := query.Execute(config)
- for _, name := range authors.Values() {
- fmt.Println(name)
- }
-}
-
-func TestTomlQuery(t *testing.T) {
- tree, err := toml.Load("[foo.bar]\na=1\nb=2\n[baz.foo]\na=3\nb=4\n[gorf.foo]\na=5\nb=6")
- if err != nil {
- t.Error(err)
- return
- }
- query, err := Compile("$.foo.bar")
- if err != nil {
- t.Error(err)
- return
- }
- result := query.Execute(tree)
- values := result.Values()
- if len(values) != 1 {
- t.Errorf("Expected resultset of 1, got %d instead: %v", len(values), values)
- }
-
- if tt, ok := values[0].(*toml.Tree); !ok {
- t.Errorf("Expected type of Tree: %T", values[0])
- } else if tt.Get("a") != int64(1) {
- t.Errorf("Expected 'a' with a value 1: %v", tt.Get("a"))
- } else if tt.Get("b") != int64(2) {
- t.Errorf("Expected 'b' with a value 2: %v", tt.Get("b"))
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/query/tokens.go b/vendor/github.com/pelletier/go-toml/query/tokens.go
deleted file mode 100644
index 9ae579de2..000000000
--- a/vendor/github.com/pelletier/go-toml/query/tokens.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package query
-
-import (
- "fmt"
- "github.com/pelletier/go-toml"
- "strconv"
- "unicode"
-)
-
-// Define tokens
-type tokenType int
-
-const (
- eof = -(iota + 1)
-)
-
-const (
- tokenError tokenType = iota
- tokenEOF
- tokenKey
- tokenString
- tokenInteger
- tokenFloat
- tokenLeftBracket
- tokenRightBracket
- tokenLeftParen
- tokenRightParen
- tokenComma
- tokenColon
- tokenDollar
- tokenStar
- tokenQuestion
- tokenDot
- tokenDotDot
-)
-
-var tokenTypeNames = []string{
- "Error",
- "EOF",
- "Key",
- "String",
- "Integer",
- "Float",
- "[",
- "]",
- "(",
- ")",
- ",",
- ":",
- "$",
- "*",
- "?",
- ".",
- "..",
-}
-
-type token struct {
- toml.Position
- typ tokenType
- val string
-}
-
-func (tt tokenType) String() string {
- idx := int(tt)
- if idx < len(tokenTypeNames) {
- return tokenTypeNames[idx]
- }
- return "Unknown"
-}
-
-func (t token) Int() int {
- if result, err := strconv.Atoi(t.val); err != nil {
- panic(err)
- } else {
- return result
- }
-}
-
-func (t token) String() string {
- switch t.typ {
- case tokenEOF:
- return "EOF"
- case tokenError:
- return t.val
- }
-
- return fmt.Sprintf("%q", t.val)
-}
-
-func isSpace(r rune) bool {
- return r == ' ' || r == '\t'
-}
-
-func isAlphanumeric(r rune) bool {
- return unicode.IsLetter(r) || r == '_'
-}
-
-func isDigit(r rune) bool {
- return unicode.IsNumber(r)
-}
-
-func isHexDigit(r rune) bool {
- return isDigit(r) ||
- (r >= 'a' && r <= 'f') ||
- (r >= 'A' && r <= 'F')
-}
diff --git a/vendor/github.com/pelletier/go-toml/token_test.go b/vendor/github.com/pelletier/go-toml/token_test.go
deleted file mode 100644
index 20b560d51..000000000
--- a/vendor/github.com/pelletier/go-toml/token_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package toml
-
-import "testing"
-
-func TestTokenStringer(t *testing.T) {
- var tests = []struct {
- tt tokenType
- expect string
- }{
- {tokenError, "Error"},
- {tokenEOF, "EOF"},
- {tokenComment, "Comment"},
- {tokenKey, "Key"},
- {tokenString, "String"},
- {tokenInteger, "Integer"},
- {tokenTrue, "True"},
- {tokenFalse, "False"},
- {tokenFloat, "Float"},
- {tokenEqual, "="},
- {tokenLeftBracket, "["},
- {tokenRightBracket, "]"},
- {tokenLeftCurlyBrace, "{"},
- {tokenRightCurlyBrace, "}"},
- {tokenLeftParen, "("},
- {tokenRightParen, ")"},
- {tokenDoubleLeftBracket, "]]"},
- {tokenDoubleRightBracket, "[["},
- {tokenDate, "Date"},
- {tokenKeyGroup, "KeyGroup"},
- {tokenKeyGroupArray, "KeyGroupArray"},
- {tokenComma, ","},
- {tokenColon, ":"},
- {tokenDollar, "$"},
- {tokenStar, "*"},
- {tokenQuestion, "?"},
- {tokenDot, "."},
- {tokenDotDot, ".."},
- {tokenEOL, "EOL"},
- {tokenEOL + 1, "Unknown"},
- }
-
- for i, test := range tests {
- got := test.tt.String()
- if got != test.expect {
- t.Errorf("[%d] invalid string of token type; got %q, expected %q", i, got, test.expect)
- }
- }
-}
-
-func TestTokenString(t *testing.T) {
- var tests = []struct {
- tok token
- expect string
- }{
- {token{Position{1, 1}, tokenEOF, ""}, "EOF"},
- {token{Position{1, 1}, tokenError, "Δt"}, "Δt"},
- {token{Position{1, 1}, tokenString, "bar"}, `"bar"`},
- {token{Position{1, 1}, tokenString, "123456789012345"}, `"123456789012345"`},
- }
-
- for i, test := range tests {
- got := test.tok.String()
- if got != test.expect {
- t.Errorf("[%d] invalid of string token; got %q, expected %q", i, got, test.expect)
- }
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/toml_test.go b/vendor/github.com/pelletier/go-toml/toml_test.go
deleted file mode 100644
index ab9c24253..000000000
--- a/vendor/github.com/pelletier/go-toml/toml_test.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Testing support for go-toml
-
-package toml
-
-import (
- "testing"
-)
-
-func TestTomlHas(t *testing.T) {
- tree, _ := Load(`
- [test]
- key = "value"
- `)
-
- if !tree.Has("test.key") {
- t.Errorf("Has - expected test.key to exists")
- }
-
- if tree.Has("") {
- t.Errorf("Should return false if the key is not provided")
- }
-}
-
-func TestTomlGet(t *testing.T) {
- tree, _ := Load(`
- [test]
- key = "value"
- `)
-
- if tree.Get("") != tree {
- t.Errorf("Get should return the tree itself when given an empty path")
- }
-
- if tree.Get("test.key") != "value" {
- t.Errorf("Get should return the value")
- }
- if tree.Get(`\`) != nil {
- t.Errorf("should return nil when the key is malformed")
- }
-}
-
-func TestTomlGetDefault(t *testing.T) {
- tree, _ := Load(`
- [test]
- key = "value"
- `)
-
- if tree.GetDefault("", "hello") != tree {
- t.Error("GetDefault should return the tree itself when given an empty path")
- }
-
- if tree.GetDefault("test.key", "hello") != "value" {
- t.Error("Get should return the value")
- }
-
- if tree.GetDefault("whatever", "hello") != "hello" {
- t.Error("GetDefault should return the default value if the key does not exist")
- }
-}
-
-func TestTomlHasPath(t *testing.T) {
- tree, _ := Load(`
- [test]
- key = "value"
- `)
-
- if !tree.HasPath([]string{"test", "key"}) {
- t.Errorf("HasPath - expected test.key to exists")
- }
-}
-
-func TestTomlGetPath(t *testing.T) {
- node := newTree()
- //TODO: set other node data
-
- for idx, item := range []struct {
- Path []string
- Expected *Tree
- }{
- { // empty path test
- []string{},
- node,
- },
- } {
- result := node.GetPath(item.Path)
- if result != item.Expected {
- t.Errorf("GetPath[%d] %v - expected %v, got %v instead.", idx, item.Path, item.Expected, result)
- }
- }
-
- tree, _ := Load("[foo.bar]\na=1\nb=2\n[baz.foo]\na=3\nb=4\n[gorf.foo]\na=5\nb=6")
- if tree.GetPath([]string{"whatever"}) != nil {
- t.Error("GetPath should return nil when the key does not exist")
- }
-}
-
-func TestTomlFromMap(t *testing.T) {
- simpleMap := map[string]interface{}{"hello": 42}
- tree, err := TreeFromMap(simpleMap)
- if err != nil {
- t.Fatal("unexpected error:", err)
- }
- if tree.Get("hello") != int64(42) {
- t.Fatal("hello should be 42, not", tree.Get("hello"))
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/tomltree_create_test.go b/vendor/github.com/pelletier/go-toml/tomltree_create_test.go
deleted file mode 100644
index 3465a1066..000000000
--- a/vendor/github.com/pelletier/go-toml/tomltree_create_test.go
+++ /dev/null
@@ -1,126 +0,0 @@
-package toml
-
-import (
- "strconv"
- "testing"
- "time"
-)
-
-type customString string
-
-type stringer struct{}
-
-func (s stringer) String() string {
- return "stringer"
-}
-
-func validate(t *testing.T, path string, object interface{}) {
- switch o := object.(type) {
- case *Tree:
- for key, tree := range o.values {
- validate(t, path+"."+key, tree)
- }
- case []*Tree:
- for index, tree := range o {
- validate(t, path+"."+strconv.Itoa(index), tree)
- }
- case *tomlValue:
- switch o.value.(type) {
- case int64, uint64, bool, string, float64, time.Time,
- []int64, []uint64, []bool, []string, []float64, []time.Time:
- default:
- t.Fatalf("tomlValue at key %s containing incorrect type %T", path, o.value)
- }
- default:
- t.Fatalf("value at key %s is of incorrect type %T", path, object)
- }
- t.Logf("validation ok %s as %T", path, object)
-}
-
-func validateTree(t *testing.T, tree *Tree) {
- validate(t, "", tree)
-}
-
-func TestTreeCreateToTree(t *testing.T) {
- data := map[string]interface{}{
- "a_string": "bar",
- "an_int": 42,
- "time": time.Now(),
- "int8": int8(2),
- "int16": int16(2),
- "int32": int32(2),
- "uint8": uint8(2),
- "uint16": uint16(2),
- "uint32": uint32(2),
- "float32": float32(2),
- "a_bool": false,
- "stringer": stringer{},
- "nested": map[string]interface{}{
- "foo": "bar",
- },
- "array": []string{"a", "b", "c"},
- "array_uint": []uint{uint(1), uint(2)},
- "array_table": []map[string]interface{}{{"sub_map": 52}},
- "array_times": []time.Time{time.Now(), time.Now()},
- "map_times": map[string]time.Time{"now": time.Now()},
- "custom_string_map_key": map[customString]interface{}{customString("custom"): "custom"},
- }
- tree, err := TreeFromMap(data)
- if err != nil {
- t.Fatal("unexpected error:", err)
- }
- validateTree(t, tree)
-}
-
-func TestTreeCreateToTreeInvalidLeafType(t *testing.T) {
- _, err := TreeFromMap(map[string]interface{}{"foo": t})
- expected := "cannot convert type *testing.T to Tree"
- if err.Error() != expected {
- t.Fatalf("expected error %s, got %s", expected, err.Error())
- }
-}
-
-func TestTreeCreateToTreeInvalidMapKeyType(t *testing.T) {
- _, err := TreeFromMap(map[string]interface{}{"foo": map[int]interface{}{2: 1}})
- expected := "map key needs to be a string, not int (int)"
- if err.Error() != expected {
- t.Fatalf("expected error %s, got %s", expected, err.Error())
- }
-}
-
-func TestTreeCreateToTreeInvalidArrayMemberType(t *testing.T) {
- _, err := TreeFromMap(map[string]interface{}{"foo": []*testing.T{t}})
- expected := "cannot convert type *testing.T to Tree"
- if err.Error() != expected {
- t.Fatalf("expected error %s, got %s", expected, err.Error())
- }
-}
-
-func TestTreeCreateToTreeInvalidTableGroupType(t *testing.T) {
- _, err := TreeFromMap(map[string]interface{}{"foo": []map[string]interface{}{{"hello": t}}})
- expected := "cannot convert type *testing.T to Tree"
- if err.Error() != expected {
- t.Fatalf("expected error %s, got %s", expected, err.Error())
- }
-}
-
-func TestRoundTripArrayOfTables(t *testing.T) {
- orig := "\n[[stuff]]\n name = \"foo\"\n things = [\"a\",\"b\"]\n"
- tree, err := Load(orig)
- if err != nil {
- t.Fatalf("unexpected error: %s", err)
- }
-
- m := tree.ToMap()
-
- tree, err = TreeFromMap(m)
- if err != nil {
- t.Fatalf("unexpected error: %s", err)
- }
- want := orig
- got := tree.String()
-
- if got != want {
- t.Errorf("want:\n%s\ngot:\n%s", want, got)
- }
-}
diff --git a/vendor/github.com/pelletier/go-toml/tomltree_write_test.go b/vendor/github.com/pelletier/go-toml/tomltree_write_test.go
deleted file mode 100644
index 206203b88..000000000
--- a/vendor/github.com/pelletier/go-toml/tomltree_write_test.go
+++ /dev/null
@@ -1,376 +0,0 @@
-package toml
-
-import (
- "bytes"
- "errors"
- "fmt"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-type failingWriter struct {
- failAt int
- written int
- buffer bytes.Buffer
-}
-
-func (f *failingWriter) Write(p []byte) (n int, err error) {
- count := len(p)
- toWrite := f.failAt - (count + f.written)
- if toWrite < 0 {
- toWrite = 0
- }
- if toWrite > count {
- f.written += count
- f.buffer.Write(p)
- return count, nil
- }
-
- f.buffer.Write(p[:toWrite])
- f.written = f.failAt
- return toWrite, fmt.Errorf("failingWriter failed after writing %d bytes", f.written)
-}
-
-func assertErrorString(t *testing.T, expected string, err error) {
- expectedErr := errors.New(expected)
- if err == nil || err.Error() != expectedErr.Error() {
- t.Errorf("expecting error %s, but got %s instead", expected, err)
- }
-}
-
-func TestTreeWriteToEmptyTable(t *testing.T) {
- doc := `[[empty-tables]]
-[[empty-tables]]`
-
- toml, err := Load(doc)
- if err != nil {
- t.Fatal("Unexpected Load error:", err)
- }
- tomlString, err := toml.ToTomlString()
- if err != nil {
- t.Fatal("Unexpected ToTomlString error:", err)
- }
-
- expected := `
-[[empty-tables]]
-
-[[empty-tables]]
-`
-
- if tomlString != expected {
- t.Fatalf("Expected:\n%s\nGot:\n%s", expected, tomlString)
- }
-}
-
-func TestTreeWriteToTomlString(t *testing.T) {
- toml, err := Load(`name = { first = "Tom", last = "Preston-Werner" }
-points = { x = 1, y = 2 }`)
-
- if err != nil {
- t.Fatal("Unexpected error:", err)
- }
-
- tomlString, _ := toml.ToTomlString()
- reparsedTree, err := Load(tomlString)
-
- assertTree(t, reparsedTree, err, map[string]interface{}{
- "name": map[string]interface{}{
- "first": "Tom",
- "last": "Preston-Werner",
- },
- "points": map[string]interface{}{
- "x": int64(1),
- "y": int64(2),
- },
- })
-}
-
-func TestTreeWriteToTomlStringSimple(t *testing.T) {
- tree, err := Load("[foo]\n\n[[foo.bar]]\na = 42\n\n[[foo.bar]]\na = 69\n")
- if err != nil {
- t.Errorf("Test failed to parse: %v", err)
- return
- }
- result, err := tree.ToTomlString()
- if err != nil {
- t.Errorf("Unexpected error: %s", err)
- }
- expected := "\n[foo]\n\n [[foo.bar]]\n a = 42\n\n [[foo.bar]]\n a = 69\n"
- if result != expected {
- t.Errorf("Expected got '%s', expected '%s'", result, expected)
- }
-}
-
-func TestTreeWriteToTomlStringKeysOrders(t *testing.T) {
- for i := 0; i < 100; i++ {
- tree, _ := Load(`
- foobar = true
- bar = "baz"
- foo = 1
- [qux]
- foo = 1
- bar = "baz2"`)
-
- stringRepr, _ := tree.ToTomlString()
-
- t.Log("Intermediate string representation:")
- t.Log(stringRepr)
-
- r := strings.NewReader(stringRepr)
- toml, err := LoadReader(r)
-
- if err != nil {
- t.Fatal("Unexpected error:", err)
- }
-
- assertTree(t, toml, err, map[string]interface{}{
- "foobar": true,
- "bar": "baz",
- "foo": 1,
- "qux": map[string]interface{}{
- "foo": 1,
- "bar": "baz2",
- },
- })
- }
-}
-
-func testMaps(t *testing.T, actual, expected map[string]interface{}) {
- if !reflect.DeepEqual(actual, expected) {
- t.Fatal("trees aren't equal.\n", "Expected:\n", expected, "\nActual:\n", actual)
- }
-}
-
-func TestTreeWriteToMapSimple(t *testing.T) {
- tree, _ := Load("a = 42\nb = 17")
-
- expected := map[string]interface{}{
- "a": int64(42),
- "b": int64(17),
- }
-
- testMaps(t, tree.ToMap(), expected)
-}
-
-func TestTreeWriteToInvalidTreeSimpleValue(t *testing.T) {
- tree := Tree{values: map[string]interface{}{"foo": int8(1)}}
- _, err := tree.ToTomlString()
- assertErrorString(t, "invalid value type at foo: int8", err)
-}
-
-func TestTreeWriteToInvalidTreeTomlValue(t *testing.T) {
- tree := Tree{values: map[string]interface{}{"foo": &tomlValue{value: int8(1), comment: "", position: Position{}}}}
- _, err := tree.ToTomlString()
- assertErrorString(t, "unsupported value type int8: 1", err)
-}
-
-func TestTreeWriteToInvalidTreeTomlValueArray(t *testing.T) {
- tree := Tree{values: map[string]interface{}{"foo": &tomlValue{value: int8(1), comment: "", position: Position{}}}}
- _, err := tree.ToTomlString()
- assertErrorString(t, "unsupported value type int8: 1", err)
-}
-
-func TestTreeWriteToFailingWriterInSimpleValue(t *testing.T) {
- toml, _ := Load(`a = 2`)
- writer := failingWriter{failAt: 0, written: 0}
- _, err := toml.WriteTo(&writer)
- assertErrorString(t, "failingWriter failed after writing 0 bytes", err)
-}
-
-func TestTreeWriteToFailingWriterInTable(t *testing.T) {
- toml, _ := Load(`
-[b]
-a = 2`)
- writer := failingWriter{failAt: 2, written: 0}
- _, err := toml.WriteTo(&writer)
- assertErrorString(t, "failingWriter failed after writing 2 bytes", err)
-
- writer = failingWriter{failAt: 13, written: 0}
- _, err = toml.WriteTo(&writer)
- assertErrorString(t, "failingWriter failed after writing 13 bytes", err)
-}
-
-func TestTreeWriteToFailingWriterInArray(t *testing.T) {
- toml, _ := Load(`
-[[b]]
-a = 2`)
- writer := failingWriter{failAt: 2, written: 0}
- _, err := toml.WriteTo(&writer)
- assertErrorString(t, "failingWriter failed after writing 2 bytes", err)
-
- writer = failingWriter{failAt: 15, written: 0}
- _, err = toml.WriteTo(&writer)
- assertErrorString(t, "failingWriter failed after writing 15 bytes", err)
-}
-
-func TestTreeWriteToMapExampleFile(t *testing.T) {
- tree, _ := LoadFile("example.toml")
- expected := map[string]interface{}{
- "title": "TOML Example",
- "owner": map[string]interface{}{
- "name": "Tom Preston-Werner",
- "organization": "GitHub",
- "bio": "GitHub Cofounder & CEO\nLikes tater tots and beer.",
- "dob": time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
- },
- "database": map[string]interface{}{
- "server": "192.168.1.1",
- "ports": []interface{}{int64(8001), int64(8001), int64(8002)},
- "connection_max": int64(5000),
- "enabled": true,
- },
- "servers": map[string]interface{}{
- "alpha": map[string]interface{}{
- "ip": "10.0.0.1",
- "dc": "eqdc10",
- },
- "beta": map[string]interface{}{
- "ip": "10.0.0.2",
- "dc": "eqdc10",
- },
- },
- "clients": map[string]interface{}{
- "data": []interface{}{
- []interface{}{"gamma", "delta"},
- []interface{}{int64(1), int64(2)},
- },
- },
- }
- testMaps(t, tree.ToMap(), expected)
-}
-
-func TestTreeWriteToMapWithTablesInMultipleChunks(t *testing.T) {
- tree, _ := Load(`
- [[menu.main]]
- a = "menu 1"
- b = "menu 2"
- [[menu.main]]
- c = "menu 3"
- d = "menu 4"`)
- expected := map[string]interface{}{
- "menu": map[string]interface{}{
- "main": []interface{}{
- map[string]interface{}{"a": "menu 1", "b": "menu 2"},
- map[string]interface{}{"c": "menu 3", "d": "menu 4"},
- },
- },
- }
- treeMap := tree.ToMap()
-
- testMaps(t, treeMap, expected)
-}
-
-func TestTreeWriteToMapWithArrayOfInlineTables(t *testing.T) {
- tree, _ := Load(`
- [params]
- language_tabs = [
- { key = "shell", name = "Shell" },
- { key = "ruby", name = "Ruby" },
- { key = "python", name = "Python" }
- ]`)
-
- expected := map[string]interface{}{
- "params": map[string]interface{}{
- "language_tabs": []interface{}{
- map[string]interface{}{
- "key": "shell",
- "name": "Shell",
- },
- map[string]interface{}{
- "key": "ruby",
- "name": "Ruby",
- },
- map[string]interface{}{
- "key": "python",
- "name": "Python",
- },
- },
- },
- }
-
- treeMap := tree.ToMap()
- testMaps(t, treeMap, expected)
-}
-
-func TestTreeWriteToFloat(t *testing.T) {
- tree, err := Load(`a = 3.0`)
- if err != nil {
- t.Fatal(err)
- }
- str, err := tree.ToTomlString()
- if err != nil {
- t.Fatal(err)
- }
- expected := `a = 3.0`
- if strings.TrimSpace(str) != strings.TrimSpace(expected) {
- t.Fatalf("Expected:\n%s\nGot:\n%s", expected, str)
- }
-}
-
-func TestTreeWriteToSpecialFloat(t *testing.T) {
- expected := `a = +inf
-b = -inf
-c = nan`
-
- tree, err := Load(expected)
- if err != nil {
- t.Fatal(err)
- }
- str, err := tree.ToTomlString()
- if err != nil {
- t.Fatal(err)
- }
- if strings.TrimSpace(str) != strings.TrimSpace(expected) {
- t.Fatalf("Expected:\n%s\nGot:\n%s", expected, str)
- }
-}
-
-func BenchmarkTreeToTomlString(b *testing.B) {
- toml, err := Load(sampleHard)
- if err != nil {
- b.Fatal("Unexpected error:", err)
- }
-
- for i := 0; i < b.N; i++ {
- _, err := toml.ToTomlString()
- if err != nil {
- b.Fatal(err)
- }
- }
-}
-
-var sampleHard = `# Test file for TOML
-# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate
-# This part you'll really hate
-
-[the]
-test_string = "You'll hate me after this - #" # " Annoying, isn't it?
-
- [the.hard]
- test_array = [ "] ", " # "] # ] There you go, parse this!
- test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]
- # You didn't think it'd as easy as chucking out the last #, did you?
- another_test_string = " Same thing, but with a string #"
- harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too"
- # Things will get harder
-
- [the.hard."bit#"]
- "what?" = "You don't think some user won't do that?"
- multi_line_array = [
- "]",
- # ] Oh yes I did
- ]
-
-# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test
-
-#[error] if you didn't catch this, your parser is broken
-#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this
-#array = [
-# "This might most likely happen in multiline arrays",
-# Like here,
-# "or here,
-# and here"
-# ] End of array comment, forgot the #
-#number = 3.14 pi <--again forgot the # `
diff --git a/vendor/github.com/pkg/errors/bench_test.go b/vendor/github.com/pkg/errors/bench_test.go
deleted file mode 100644
index 0416a3cbb..000000000
--- a/vendor/github.com/pkg/errors/bench_test.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// +build go1.7
-
-package errors
-
-import (
- "fmt"
- "testing"
-
- stderrors "errors"
-)
-
-func noErrors(at, depth int) error {
- if at >= depth {
- return stderrors.New("no error")
- }
- return noErrors(at+1, depth)
-}
-func yesErrors(at, depth int) error {
- if at >= depth {
- return New("ye error")
- }
- return yesErrors(at+1, depth)
-}
-
-func BenchmarkErrors(b *testing.B) {
- var toperr error
- type run struct {
- stack int
- std bool
- }
- runs := []run{
- {10, false},
- {10, true},
- {100, false},
- {100, true},
- {1000, false},
- {1000, true},
- }
- for _, r := range runs {
- part := "pkg/errors"
- if r.std {
- part = "errors"
- }
- name := fmt.Sprintf("%s-stack-%d", part, r.stack)
- b.Run(name, func(b *testing.B) {
- var err error
- f := yesErrors
- if r.std {
- f = noErrors
- }
- b.ReportAllocs()
- for i := 0; i < b.N; i++ {
- err = f(0, r.stack)
- }
- b.StopTimer()
- toperr = err
- })
- }
-}
diff --git a/vendor/github.com/pkg/errors/errors_test.go b/vendor/github.com/pkg/errors/errors_test.go
deleted file mode 100644
index 1d8c63558..000000000
--- a/vendor/github.com/pkg/errors/errors_test.go
+++ /dev/null
@@ -1,226 +0,0 @@
-package errors
-
-import (
- "errors"
- "fmt"
- "io"
- "reflect"
- "testing"
-)
-
-func TestNew(t *testing.T) {
- tests := []struct {
- err string
- want error
- }{
- {"", fmt.Errorf("")},
- {"foo", fmt.Errorf("foo")},
- {"foo", New("foo")},
- {"string with format specifiers: %v", errors.New("string with format specifiers: %v")},
- }
-
- for _, tt := range tests {
- got := New(tt.err)
- if got.Error() != tt.want.Error() {
- t.Errorf("New.Error(): got: %q, want %q", got, tt.want)
- }
- }
-}
-
-func TestWrapNil(t *testing.T) {
- got := Wrap(nil, "no error")
- if got != nil {
- t.Errorf("Wrap(nil, \"no error\"): got %#v, expected nil", got)
- }
-}
-
-func TestWrap(t *testing.T) {
- tests := []struct {
- err error
- message string
- want string
- }{
- {io.EOF, "read error", "read error: EOF"},
- {Wrap(io.EOF, "read error"), "client error", "client error: read error: EOF"},
- }
-
- for _, tt := range tests {
- got := Wrap(tt.err, tt.message).Error()
- if got != tt.want {
- t.Errorf("Wrap(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want)
- }
- }
-}
-
-type nilError struct{}
-
-func (nilError) Error() string { return "nil error" }
-
-func TestCause(t *testing.T) {
- x := New("error")
- tests := []struct {
- err error
- want error
- }{{
- // nil error is nil
- err: nil,
- want: nil,
- }, {
- // explicit nil error is nil
- err: (error)(nil),
- want: nil,
- }, {
- // typed nil is nil
- err: (*nilError)(nil),
- want: (*nilError)(nil),
- }, {
- // uncaused error is unaffected
- err: io.EOF,
- want: io.EOF,
- }, {
- // caused error returns cause
- err: Wrap(io.EOF, "ignored"),
- want: io.EOF,
- }, {
- err: x, // return from errors.New
- want: x,
- }, {
- WithMessage(nil, "whoops"),
- nil,
- }, {
- WithMessage(io.EOF, "whoops"),
- io.EOF,
- }, {
- WithStack(nil),
- nil,
- }, {
- WithStack(io.EOF),
- io.EOF,
- }}
-
- for i, tt := range tests {
- got := Cause(tt.err)
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("test %d: got %#v, want %#v", i+1, got, tt.want)
- }
- }
-}
-
-func TestWrapfNil(t *testing.T) {
- got := Wrapf(nil, "no error")
- if got != nil {
- t.Errorf("Wrapf(nil, \"no error\"): got %#v, expected nil", got)
- }
-}
-
-func TestWrapf(t *testing.T) {
- tests := []struct {
- err error
- message string
- want string
- }{
- {io.EOF, "read error", "read error: EOF"},
- {Wrapf(io.EOF, "read error without format specifiers"), "client error", "client error: read error without format specifiers: EOF"},
- {Wrapf(io.EOF, "read error with %d format specifier", 1), "client error", "client error: read error with 1 format specifier: EOF"},
- }
-
- for _, tt := range tests {
- got := Wrapf(tt.err, tt.message).Error()
- if got != tt.want {
- t.Errorf("Wrapf(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want)
- }
- }
-}
-
-func TestErrorf(t *testing.T) {
- tests := []struct {
- err error
- want string
- }{
- {Errorf("read error without format specifiers"), "read error without format specifiers"},
- {Errorf("read error with %d format specifier", 1), "read error with 1 format specifier"},
- }
-
- for _, tt := range tests {
- got := tt.err.Error()
- if got != tt.want {
- t.Errorf("Errorf(%v): got: %q, want %q", tt.err, got, tt.want)
- }
- }
-}
-
-func TestWithStackNil(t *testing.T) {
- got := WithStack(nil)
- if got != nil {
- t.Errorf("WithStack(nil): got %#v, expected nil", got)
- }
-}
-
-func TestWithStack(t *testing.T) {
- tests := []struct {
- err error
- want string
- }{
- {io.EOF, "EOF"},
- {WithStack(io.EOF), "EOF"},
- }
-
- for _, tt := range tests {
- got := WithStack(tt.err).Error()
- if got != tt.want {
- t.Errorf("WithStack(%v): got: %v, want %v", tt.err, got, tt.want)
- }
- }
-}
-
-func TestWithMessageNil(t *testing.T) {
- got := WithMessage(nil, "no error")
- if got != nil {
- t.Errorf("WithMessage(nil, \"no error\"): got %#v, expected nil", got)
- }
-}
-
-func TestWithMessage(t *testing.T) {
- tests := []struct {
- err error
- message string
- want string
- }{
- {io.EOF, "read error", "read error: EOF"},
- {WithMessage(io.EOF, "read error"), "client error", "client error: read error: EOF"},
- }
-
- for _, tt := range tests {
- got := WithMessage(tt.err, tt.message).Error()
- if got != tt.want {
- t.Errorf("WithMessage(%v, %q): got: %q, want %q", tt.err, tt.message, got, tt.want)
- }
- }
-
-}
-
-// errors.New, etc values are not expected to be compared by value
-// but the change in errors#27 made them incomparable. Assert that
-// various kinds of errors have a functional equality operator, even
-// if the result of that equality is always false.
-func TestErrorEquality(t *testing.T) {
- vals := []error{
- nil,
- io.EOF,
- errors.New("EOF"),
- New("EOF"),
- Errorf("EOF"),
- Wrap(io.EOF, "EOF"),
- Wrapf(io.EOF, "EOF%d", 2),
- WithMessage(nil, "whoops"),
- WithMessage(io.EOF, "whoops"),
- WithStack(io.EOF),
- WithStack(nil),
- }
-
- for i := range vals {
- for j := range vals {
- _ = vals[i] == vals[j] // mustn't panic
- }
- }
-}
diff --git a/vendor/github.com/pkg/errors/example_test.go b/vendor/github.com/pkg/errors/example_test.go
deleted file mode 100644
index c1fc13e38..000000000
--- a/vendor/github.com/pkg/errors/example_test.go
+++ /dev/null
@@ -1,205 +0,0 @@
-package errors_test
-
-import (
- "fmt"
-
- "github.com/pkg/errors"
-)
-
-func ExampleNew() {
- err := errors.New("whoops")
- fmt.Println(err)
-
- // Output: whoops
-}
-
-func ExampleNew_printf() {
- err := errors.New("whoops")
- fmt.Printf("%+v", err)
-
- // Example output:
- // whoops
- // github.com/pkg/errors_test.ExampleNew_printf
- // /home/dfc/src/github.com/pkg/errors/example_test.go:17
- // testing.runExample
- // /home/dfc/go/src/testing/example.go:114
- // testing.RunExamples
- // /home/dfc/go/src/testing/example.go:38
- // testing.(*M).Run
- // /home/dfc/go/src/testing/testing.go:744
- // main.main
- // /github.com/pkg/errors/_test/_testmain.go:106
- // runtime.main
- // /home/dfc/go/src/runtime/proc.go:183
- // runtime.goexit
- // /home/dfc/go/src/runtime/asm_amd64.s:2059
-}
-
-func ExampleWithMessage() {
- cause := errors.New("whoops")
- err := errors.WithMessage(cause, "oh noes")
- fmt.Println(err)
-
- // Output: oh noes: whoops
-}
-
-func ExampleWithStack() {
- cause := errors.New("whoops")
- err := errors.WithStack(cause)
- fmt.Println(err)
-
- // Output: whoops
-}
-
-func ExampleWithStack_printf() {
- cause := errors.New("whoops")
- err := errors.WithStack(cause)
- fmt.Printf("%+v", err)
-
- // Example Output:
- // whoops
- // github.com/pkg/errors_test.ExampleWithStack_printf
- // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:55
- // testing.runExample
- // /usr/lib/go/src/testing/example.go:114
- // testing.RunExamples
- // /usr/lib/go/src/testing/example.go:38
- // testing.(*M).Run
- // /usr/lib/go/src/testing/testing.go:744
- // main.main
- // github.com/pkg/errors/_test/_testmain.go:106
- // runtime.main
- // /usr/lib/go/src/runtime/proc.go:183
- // runtime.goexit
- // /usr/lib/go/src/runtime/asm_amd64.s:2086
- // github.com/pkg/errors_test.ExampleWithStack_printf
- // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:56
- // testing.runExample
- // /usr/lib/go/src/testing/example.go:114
- // testing.RunExamples
- // /usr/lib/go/src/testing/example.go:38
- // testing.(*M).Run
- // /usr/lib/go/src/testing/testing.go:744
- // main.main
- // github.com/pkg/errors/_test/_testmain.go:106
- // runtime.main
- // /usr/lib/go/src/runtime/proc.go:183
- // runtime.goexit
- // /usr/lib/go/src/runtime/asm_amd64.s:2086
-}
-
-func ExampleWrap() {
- cause := errors.New("whoops")
- err := errors.Wrap(cause, "oh noes")
- fmt.Println(err)
-
- // Output: oh noes: whoops
-}
-
-func fn() error {
- e1 := errors.New("error")
- e2 := errors.Wrap(e1, "inner")
- e3 := errors.Wrap(e2, "middle")
- return errors.Wrap(e3, "outer")
-}
-
-func ExampleCause() {
- err := fn()
- fmt.Println(err)
- fmt.Println(errors.Cause(err))
-
- // Output: outer: middle: inner: error
- // error
-}
-
-func ExampleWrap_extended() {
- err := fn()
- fmt.Printf("%+v\n", err)
-
- // Example output:
- // error
- // github.com/pkg/errors_test.fn
- // /home/dfc/src/github.com/pkg/errors/example_test.go:47
- // github.com/pkg/errors_test.ExampleCause_printf
- // /home/dfc/src/github.com/pkg/errors/example_test.go:63
- // testing.runExample
- // /home/dfc/go/src/testing/example.go:114
- // testing.RunExamples
- // /home/dfc/go/src/testing/example.go:38
- // testing.(*M).Run
- // /home/dfc/go/src/testing/testing.go:744
- // main.main
- // /github.com/pkg/errors/_test/_testmain.go:104
- // runtime.main
- // /home/dfc/go/src/runtime/proc.go:183
- // runtime.goexit
- // /home/dfc/go/src/runtime/asm_amd64.s:2059
- // github.com/pkg/errors_test.fn
- // /home/dfc/src/github.com/pkg/errors/example_test.go:48: inner
- // github.com/pkg/errors_test.fn
- // /home/dfc/src/github.com/pkg/errors/example_test.go:49: middle
- // github.com/pkg/errors_test.fn
- // /home/dfc/src/github.com/pkg/errors/example_test.go:50: outer
-}
-
-func ExampleWrapf() {
- cause := errors.New("whoops")
- err := errors.Wrapf(cause, "oh noes #%d", 2)
- fmt.Println(err)
-
- // Output: oh noes #2: whoops
-}
-
-func ExampleErrorf_extended() {
- err := errors.Errorf("whoops: %s", "foo")
- fmt.Printf("%+v", err)
-
- // Example output:
- // whoops: foo
- // github.com/pkg/errors_test.ExampleErrorf
- // /home/dfc/src/github.com/pkg/errors/example_test.go:101
- // testing.runExample
- // /home/dfc/go/src/testing/example.go:114
- // testing.RunExamples
- // /home/dfc/go/src/testing/example.go:38
- // testing.(*M).Run
- // /home/dfc/go/src/testing/testing.go:744
- // main.main
- // /github.com/pkg/errors/_test/_testmain.go:102
- // runtime.main
- // /home/dfc/go/src/runtime/proc.go:183
- // runtime.goexit
- // /home/dfc/go/src/runtime/asm_amd64.s:2059
-}
-
-func Example_stackTrace() {
- type stackTracer interface {
- StackTrace() errors.StackTrace
- }
-
- err, ok := errors.Cause(fn()).(stackTracer)
- if !ok {
- panic("oops, err does not implement stackTracer")
- }
-
- st := err.StackTrace()
- fmt.Printf("%+v", st[0:2]) // top two frames
-
- // Example output:
- // github.com/pkg/errors_test.fn
- // /home/dfc/src/github.com/pkg/errors/example_test.go:47
- // github.com/pkg/errors_test.Example_stackTrace
- // /home/dfc/src/github.com/pkg/errors/example_test.go:127
-}
-
-func ExampleCause_printf() {
- err := errors.Wrap(func() error {
- return func() error {
- return errors.Errorf("hello %s", fmt.Sprintf("world"))
- }()
- }(), "failed")
-
- fmt.Printf("%v", err)
-
- // Output: failed: hello world
-}
diff --git a/vendor/github.com/pkg/errors/format_test.go b/vendor/github.com/pkg/errors/format_test.go
deleted file mode 100644
index 15fd7d89d..000000000
--- a/vendor/github.com/pkg/errors/format_test.go
+++ /dev/null
@@ -1,535 +0,0 @@
-package errors
-
-import (
- "errors"
- "fmt"
- "io"
- "regexp"
- "strings"
- "testing"
-)
-
-func TestFormatNew(t *testing.T) {
- tests := []struct {
- error
- format string
- want string
- }{{
- New("error"),
- "%s",
- "error",
- }, {
- New("error"),
- "%v",
- "error",
- }, {
- New("error"),
- "%+v",
- "error\n" +
- "github.com/pkg/errors.TestFormatNew\n" +
- "\t.+/github.com/pkg/errors/format_test.go:26",
- }, {
- New("error"),
- "%q",
- `"error"`,
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.error, tt.format, tt.want)
- }
-}
-
-func TestFormatErrorf(t *testing.T) {
- tests := []struct {
- error
- format string
- want string
- }{{
- Errorf("%s", "error"),
- "%s",
- "error",
- }, {
- Errorf("%s", "error"),
- "%v",
- "error",
- }, {
- Errorf("%s", "error"),
- "%+v",
- "error\n" +
- "github.com/pkg/errors.TestFormatErrorf\n" +
- "\t.+/github.com/pkg/errors/format_test.go:56",
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.error, tt.format, tt.want)
- }
-}
-
-func TestFormatWrap(t *testing.T) {
- tests := []struct {
- error
- format string
- want string
- }{{
- Wrap(New("error"), "error2"),
- "%s",
- "error2: error",
- }, {
- Wrap(New("error"), "error2"),
- "%v",
- "error2: error",
- }, {
- Wrap(New("error"), "error2"),
- "%+v",
- "error\n" +
- "github.com/pkg/errors.TestFormatWrap\n" +
- "\t.+/github.com/pkg/errors/format_test.go:82",
- }, {
- Wrap(io.EOF, "error"),
- "%s",
- "error: EOF",
- }, {
- Wrap(io.EOF, "error"),
- "%v",
- "error: EOF",
- }, {
- Wrap(io.EOF, "error"),
- "%+v",
- "EOF\n" +
- "error\n" +
- "github.com/pkg/errors.TestFormatWrap\n" +
- "\t.+/github.com/pkg/errors/format_test.go:96",
- }, {
- Wrap(Wrap(io.EOF, "error1"), "error2"),
- "%+v",
- "EOF\n" +
- "error1\n" +
- "github.com/pkg/errors.TestFormatWrap\n" +
- "\t.+/github.com/pkg/errors/format_test.go:103\n",
- }, {
- Wrap(New("error with space"), "context"),
- "%q",
- `"context: error with space"`,
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.error, tt.format, tt.want)
- }
-}
-
-func TestFormatWrapf(t *testing.T) {
- tests := []struct {
- error
- format string
- want string
- }{{
- Wrapf(io.EOF, "error%d", 2),
- "%s",
- "error2: EOF",
- }, {
- Wrapf(io.EOF, "error%d", 2),
- "%v",
- "error2: EOF",
- }, {
- Wrapf(io.EOF, "error%d", 2),
- "%+v",
- "EOF\n" +
- "error2\n" +
- "github.com/pkg/errors.TestFormatWrapf\n" +
- "\t.+/github.com/pkg/errors/format_test.go:134",
- }, {
- Wrapf(New("error"), "error%d", 2),
- "%s",
- "error2: error",
- }, {
- Wrapf(New("error"), "error%d", 2),
- "%v",
- "error2: error",
- }, {
- Wrapf(New("error"), "error%d", 2),
- "%+v",
- "error\n" +
- "github.com/pkg/errors.TestFormatWrapf\n" +
- "\t.+/github.com/pkg/errors/format_test.go:149",
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.error, tt.format, tt.want)
- }
-}
-
-func TestFormatWithStack(t *testing.T) {
- tests := []struct {
- error
- format string
- want []string
- }{{
- WithStack(io.EOF),
- "%s",
- []string{"EOF"},
- }, {
- WithStack(io.EOF),
- "%v",
- []string{"EOF"},
- }, {
- WithStack(io.EOF),
- "%+v",
- []string{"EOF",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:175"},
- }, {
- WithStack(New("error")),
- "%s",
- []string{"error"},
- }, {
- WithStack(New("error")),
- "%v",
- []string{"error"},
- }, {
- WithStack(New("error")),
- "%+v",
- []string{"error",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:189",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:189"},
- }, {
- WithStack(WithStack(io.EOF)),
- "%+v",
- []string{"EOF",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:197",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:197"},
- }, {
- WithStack(WithStack(Wrapf(io.EOF, "message"))),
- "%+v",
- []string{"EOF",
- "message",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:205",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:205",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:205"},
- }, {
- WithStack(Errorf("error%d", 1)),
- "%+v",
- []string{"error1",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:216",
- "github.com/pkg/errors.TestFormatWithStack\n" +
- "\t.+/github.com/pkg/errors/format_test.go:216"},
- }}
-
- for i, tt := range tests {
- testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true)
- }
-}
-
-func TestFormatWithMessage(t *testing.T) {
- tests := []struct {
- error
- format string
- want []string
- }{{
- WithMessage(New("error"), "error2"),
- "%s",
- []string{"error2: error"},
- }, {
- WithMessage(New("error"), "error2"),
- "%v",
- []string{"error2: error"},
- }, {
- WithMessage(New("error"), "error2"),
- "%+v",
- []string{
- "error",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:244",
- "error2"},
- }, {
- WithMessage(io.EOF, "addition1"),
- "%s",
- []string{"addition1: EOF"},
- }, {
- WithMessage(io.EOF, "addition1"),
- "%v",
- []string{"addition1: EOF"},
- }, {
- WithMessage(io.EOF, "addition1"),
- "%+v",
- []string{"EOF", "addition1"},
- }, {
- WithMessage(WithMessage(io.EOF, "addition1"), "addition2"),
- "%v",
- []string{"addition2: addition1: EOF"},
- }, {
- WithMessage(WithMessage(io.EOF, "addition1"), "addition2"),
- "%+v",
- []string{"EOF", "addition1", "addition2"},
- }, {
- Wrap(WithMessage(io.EOF, "error1"), "error2"),
- "%+v",
- []string{"EOF", "error1", "error2",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:272"},
- }, {
- WithMessage(Errorf("error%d", 1), "error2"),
- "%+v",
- []string{"error1",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:278",
- "error2"},
- }, {
- WithMessage(WithStack(io.EOF), "error"),
- "%+v",
- []string{
- "EOF",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:285",
- "error"},
- }, {
- WithMessage(Wrap(WithStack(io.EOF), "inside-error"), "outside-error"),
- "%+v",
- []string{
- "EOF",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:293",
- "inside-error",
- "github.com/pkg/errors.TestFormatWithMessage\n" +
- "\t.+/github.com/pkg/errors/format_test.go:293",
- "outside-error"},
- }}
-
- for i, tt := range tests {
- testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true)
- }
-}
-
-func TestFormatGeneric(t *testing.T) {
- starts := []struct {
- err error
- want []string
- }{
- {New("new-error"), []string{
- "new-error",
- "github.com/pkg/errors.TestFormatGeneric\n" +
- "\t.+/github.com/pkg/errors/format_test.go:315"},
- }, {Errorf("errorf-error"), []string{
- "errorf-error",
- "github.com/pkg/errors.TestFormatGeneric\n" +
- "\t.+/github.com/pkg/errors/format_test.go:319"},
- }, {errors.New("errors-new-error"), []string{
- "errors-new-error"},
- },
- }
-
- wrappers := []wrapper{
- {
- func(err error) error { return WithMessage(err, "with-message") },
- []string{"with-message"},
- }, {
- func(err error) error { return WithStack(err) },
- []string{
- "github.com/pkg/errors.(func·002|TestFormatGeneric.func2)\n\t" +
- ".+/github.com/pkg/errors/format_test.go:333",
- },
- }, {
- func(err error) error { return Wrap(err, "wrap-error") },
- []string{
- "wrap-error",
- "github.com/pkg/errors.(func·003|TestFormatGeneric.func3)\n\t" +
- ".+/github.com/pkg/errors/format_test.go:339",
- },
- }, {
- func(err error) error { return Wrapf(err, "wrapf-error%d", 1) },
- []string{
- "wrapf-error1",
- "github.com/pkg/errors.(func·004|TestFormatGeneric.func4)\n\t" +
- ".+/github.com/pkg/errors/format_test.go:346",
- },
- },
- }
-
- for s := range starts {
- err := starts[s].err
- want := starts[s].want
- testFormatCompleteCompare(t, s, err, "%+v", want, false)
- testGenericRecursive(t, err, want, wrappers, 3)
- }
-}
-
-func testFormatRegexp(t *testing.T, n int, arg interface{}, format, want string) {
- got := fmt.Sprintf(format, arg)
- gotLines := strings.SplitN(got, "\n", -1)
- wantLines := strings.SplitN(want, "\n", -1)
-
- if len(wantLines) > len(gotLines) {
- t.Errorf("test %d: wantLines(%d) > gotLines(%d):\n got: %q\nwant: %q", n+1, len(wantLines), len(gotLines), got, want)
- return
- }
-
- for i, w := range wantLines {
- match, err := regexp.MatchString(w, gotLines[i])
- if err != nil {
- t.Fatal(err)
- }
- if !match {
- t.Errorf("test %d: line %d: fmt.Sprintf(%q, err):\n got: %q\nwant: %q", n+1, i+1, format, got, want)
- }
- }
-}
-
-var stackLineR = regexp.MustCompile(`\.`)
-
-// parseBlocks parses input into a slice, where:
-// - incase entry contains a newline, its a stacktrace
-// - incase entry contains no newline, its a solo line.
-//
-// Detecting stack boundaries only works incase the WithStack-calls are
-// to be found on the same line, thats why it is optionally here.
-//
-// Example use:
-//
-// for _, e := range blocks {
-// if strings.ContainsAny(e, "\n") {
-// // Match as stack
-// } else {
-// // Match as line
-// }
-// }
-//
-func parseBlocks(input string, detectStackboundaries bool) ([]string, error) {
- var blocks []string
-
- stack := ""
- wasStack := false
- lines := map[string]bool{} // already found lines
-
- for _, l := range strings.Split(input, "\n") {
- isStackLine := stackLineR.MatchString(l)
-
- switch {
- case !isStackLine && wasStack:
- blocks = append(blocks, stack, l)
- stack = ""
- lines = map[string]bool{}
- case isStackLine:
- if wasStack {
- // Detecting two stacks after another, possible cause lines match in
- // our tests due to WithStack(WithStack(io.EOF)) on same line.
- if detectStackboundaries {
- if lines[l] {
- if len(stack) == 0 {
- return nil, errors.New("len of block must not be zero here")
- }
-
- blocks = append(blocks, stack)
- stack = l
- lines = map[string]bool{l: true}
- continue
- }
- }
-
- stack = stack + "\n" + l
- } else {
- stack = l
- }
- lines[l] = true
- case !isStackLine && !wasStack:
- blocks = append(blocks, l)
- default:
- return nil, errors.New("must not happen")
- }
-
- wasStack = isStackLine
- }
-
- // Use up stack
- if stack != "" {
- blocks = append(blocks, stack)
- }
- return blocks, nil
-}
-
-func testFormatCompleteCompare(t *testing.T, n int, arg interface{}, format string, want []string, detectStackBoundaries bool) {
- gotStr := fmt.Sprintf(format, arg)
-
- got, err := parseBlocks(gotStr, detectStackBoundaries)
- if err != nil {
- t.Fatal(err)
- }
-
- if len(got) != len(want) {
- t.Fatalf("test %d: fmt.Sprintf(%s, err) -> wrong number of blocks: got(%d) want(%d)\n got: %s\nwant: %s\ngotStr: %q",
- n+1, format, len(got), len(want), prettyBlocks(got), prettyBlocks(want), gotStr)
- }
-
- for i := range got {
- if strings.ContainsAny(want[i], "\n") {
- // Match as stack
- match, err := regexp.MatchString(want[i], got[i])
- if err != nil {
- t.Fatal(err)
- }
- if !match {
- t.Fatalf("test %d: block %d: fmt.Sprintf(%q, err):\ngot:\n%q\nwant:\n%q\nall-got:\n%s\nall-want:\n%s\n",
- n+1, i+1, format, got[i], want[i], prettyBlocks(got), prettyBlocks(want))
- }
- } else {
- // Match as message
- if got[i] != want[i] {
- t.Fatalf("test %d: fmt.Sprintf(%s, err) at block %d got != want:\n got: %q\nwant: %q", n+1, format, i+1, got[i], want[i])
- }
- }
- }
-}
-
-type wrapper struct {
- wrap func(err error) error
- want []string
-}
-
-func prettyBlocks(blocks []string, prefix ...string) string {
- var out []string
-
- for _, b := range blocks {
- out = append(out, fmt.Sprintf("%v", b))
- }
-
- return " " + strings.Join(out, "\n ")
-}
-
-func testGenericRecursive(t *testing.T, beforeErr error, beforeWant []string, list []wrapper, maxDepth int) {
- if len(beforeWant) == 0 {
- panic("beforeWant must not be empty")
- }
- for _, w := range list {
- if len(w.want) == 0 {
- panic("want must not be empty")
- }
-
- err := w.wrap(beforeErr)
-
- // Copy required cause append(beforeWant, ..) modified beforeWant subtly.
- beforeCopy := make([]string, len(beforeWant))
- copy(beforeCopy, beforeWant)
-
- beforeWant := beforeCopy
- last := len(beforeWant) - 1
- var want []string
-
- // Merge two stacks behind each other.
- if strings.ContainsAny(beforeWant[last], "\n") && strings.ContainsAny(w.want[0], "\n") {
- want = append(beforeWant[:last], append([]string{beforeWant[last] + "((?s).*)" + w.want[0]}, w.want[1:]...)...)
- } else {
- want = append(beforeWant, w.want...)
- }
-
- testFormatCompleteCompare(t, maxDepth, err, "%+v", want, false)
- if maxDepth > 0 {
- testGenericRecursive(t, err, want, list, maxDepth-1)
- }
- }
-}
diff --git a/vendor/github.com/pkg/errors/stack_test.go b/vendor/github.com/pkg/errors/stack_test.go
deleted file mode 100644
index 510c27a9f..000000000
--- a/vendor/github.com/pkg/errors/stack_test.go
+++ /dev/null
@@ -1,292 +0,0 @@
-package errors
-
-import (
- "fmt"
- "runtime"
- "testing"
-)
-
-var initpc, _, _, _ = runtime.Caller(0)
-
-func TestFrameLine(t *testing.T) {
- var tests = []struct {
- Frame
- want int
- }{{
- Frame(initpc),
- 9,
- }, {
- func() Frame {
- var pc, _, _, _ = runtime.Caller(0)
- return Frame(pc)
- }(),
- 20,
- }, {
- func() Frame {
- var pc, _, _, _ = runtime.Caller(1)
- return Frame(pc)
- }(),
- 28,
- }, {
- Frame(0), // invalid PC
- 0,
- }}
-
- for _, tt := range tests {
- got := tt.Frame.line()
- want := tt.want
- if want != got {
- t.Errorf("Frame(%v): want: %v, got: %v", uintptr(tt.Frame), want, got)
- }
- }
-}
-
-type X struct{}
-
-func (x X) val() Frame {
- var pc, _, _, _ = runtime.Caller(0)
- return Frame(pc)
-}
-
-func (x *X) ptr() Frame {
- var pc, _, _, _ = runtime.Caller(0)
- return Frame(pc)
-}
-
-func TestFrameFormat(t *testing.T) {
- var tests = []struct {
- Frame
- format string
- want string
- }{{
- Frame(initpc),
- "%s",
- "stack_test.go",
- }, {
- Frame(initpc),
- "%+s",
- "github.com/pkg/errors.init\n" +
- "\t.+/github.com/pkg/errors/stack_test.go",
- }, {
- Frame(0),
- "%s",
- "unknown",
- }, {
- Frame(0),
- "%+s",
- "unknown",
- }, {
- Frame(initpc),
- "%d",
- "9",
- }, {
- Frame(0),
- "%d",
- "0",
- }, {
- Frame(initpc),
- "%n",
- "init",
- }, {
- func() Frame {
- var x X
- return x.ptr()
- }(),
- "%n",
- `\(\*X\).ptr`,
- }, {
- func() Frame {
- var x X
- return x.val()
- }(),
- "%n",
- "X.val",
- }, {
- Frame(0),
- "%n",
- "",
- }, {
- Frame(initpc),
- "%v",
- "stack_test.go:9",
- }, {
- Frame(initpc),
- "%+v",
- "github.com/pkg/errors.init\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:9",
- }, {
- Frame(0),
- "%v",
- "unknown:0",
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.Frame, tt.format, tt.want)
- }
-}
-
-func TestFuncname(t *testing.T) {
- tests := []struct {
- name, want string
- }{
- {"", ""},
- {"runtime.main", "main"},
- {"github.com/pkg/errors.funcname", "funcname"},
- {"funcname", "funcname"},
- {"io.copyBuffer", "copyBuffer"},
- {"main.(*R).Write", "(*R).Write"},
- }
-
- for _, tt := range tests {
- got := funcname(tt.name)
- want := tt.want
- if got != want {
- t.Errorf("funcname(%q): want: %q, got %q", tt.name, want, got)
- }
- }
-}
-
-func TestTrimGOPATH(t *testing.T) {
- var tests = []struct {
- Frame
- want string
- }{{
- Frame(initpc),
- "github.com/pkg/errors/stack_test.go",
- }}
-
- for i, tt := range tests {
- pc := tt.Frame.pc()
- fn := runtime.FuncForPC(pc)
- file, _ := fn.FileLine(pc)
- got := trimGOPATH(fn.Name(), file)
- testFormatRegexp(t, i, got, "%s", tt.want)
- }
-}
-
-func TestStackTrace(t *testing.T) {
- tests := []struct {
- err error
- want []string
- }{{
- New("ooh"), []string{
- "github.com/pkg/errors.TestStackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:172",
- },
- }, {
- Wrap(New("ooh"), "ahh"), []string{
- "github.com/pkg/errors.TestStackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:177", // this is the stack of Wrap, not New
- },
- }, {
- Cause(Wrap(New("ooh"), "ahh")), []string{
- "github.com/pkg/errors.TestStackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:182", // this is the stack of New
- },
- }, {
- func() error { return New("ooh") }(), []string{
- `github.com/pkg/errors.(func·009|TestStackTrace.func1)` +
- "\n\t.+/github.com/pkg/errors/stack_test.go:187", // this is the stack of New
- "github.com/pkg/errors.TestStackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:187", // this is the stack of New's caller
- },
- }, {
- Cause(func() error {
- return func() error {
- return Errorf("hello %s", fmt.Sprintf("world"))
- }()
- }()), []string{
- `github.com/pkg/errors.(func·010|TestStackTrace.func2.1)` +
- "\n\t.+/github.com/pkg/errors/stack_test.go:196", // this is the stack of Errorf
- `github.com/pkg/errors.(func·011|TestStackTrace.func2)` +
- "\n\t.+/github.com/pkg/errors/stack_test.go:197", // this is the stack of Errorf's caller
- "github.com/pkg/errors.TestStackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:198", // this is the stack of Errorf's caller's caller
- },
- }}
- for i, tt := range tests {
- x, ok := tt.err.(interface {
- StackTrace() StackTrace
- })
- if !ok {
- t.Errorf("expected %#v to implement StackTrace() StackTrace", tt.err)
- continue
- }
- st := x.StackTrace()
- for j, want := range tt.want {
- testFormatRegexp(t, i, st[j], "%+v", want)
- }
- }
-}
-
-func stackTrace() StackTrace {
- const depth = 8
- var pcs [depth]uintptr
- n := runtime.Callers(1, pcs[:])
- var st stack = pcs[0:n]
- return st.StackTrace()
-}
-
-func TestStackTraceFormat(t *testing.T) {
- tests := []struct {
- StackTrace
- format string
- want string
- }{{
- nil,
- "%s",
- `\[\]`,
- }, {
- nil,
- "%v",
- `\[\]`,
- }, {
- nil,
- "%+v",
- "",
- }, {
- nil,
- "%#v",
- `\[\]errors.Frame\(nil\)`,
- }, {
- make(StackTrace, 0),
- "%s",
- `\[\]`,
- }, {
- make(StackTrace, 0),
- "%v",
- `\[\]`,
- }, {
- make(StackTrace, 0),
- "%+v",
- "",
- }, {
- make(StackTrace, 0),
- "%#v",
- `\[\]errors.Frame{}`,
- }, {
- stackTrace()[:2],
- "%s",
- `\[stack_test.go stack_test.go\]`,
- }, {
- stackTrace()[:2],
- "%v",
- `\[stack_test.go:225 stack_test.go:272\]`,
- }, {
- stackTrace()[:2],
- "%+v",
- "\n" +
- "github.com/pkg/errors.stackTrace\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:225\n" +
- "github.com/pkg/errors.TestStackTraceFormat\n" +
- "\t.+/github.com/pkg/errors/stack_test.go:276",
- }, {
- stackTrace()[:2],
- "%#v",
- `\[\]errors.Frame{stack_test.go:225, stack_test.go:284}`,
- }}
-
- for i, tt := range tests {
- testFormatRegexp(t, i, tt.StackTrace, tt.format, tt.want)
- }
-}
diff --git a/vendor/github.com/pmezard/go-difflib/.travis.yml b/vendor/github.com/pmezard/go-difflib/.travis.yml
deleted file mode 100644
index 90c9c6f91..000000000
--- a/vendor/github.com/pmezard/go-difflib/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: go
-go:
- - 1.5
- - tip
-
diff --git a/vendor/github.com/pmezard/go-difflib/README.md b/vendor/github.com/pmezard/go-difflib/README.md
deleted file mode 100644
index e87f307ed..000000000
--- a/vendor/github.com/pmezard/go-difflib/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-go-difflib
-==========
-
-[![Build Status](https://travis-ci.org/pmezard/go-difflib.png?branch=master)](https://travis-ci.org/pmezard/go-difflib)
-[![GoDoc](https://godoc.org/github.com/pmezard/go-difflib/difflib?status.svg)](https://godoc.org/github.com/pmezard/go-difflib/difflib)
-
-Go-difflib is a partial port of python 3 difflib package. Its main goal
-was to make unified and context diff available in pure Go, mostly for
-testing purposes.
-
-The following class and functions (and related tests) have be ported:
-
-* `SequenceMatcher`
-* `unified_diff()`
-* `context_diff()`
-
-## Installation
-
-```bash
-$ go get github.com/pmezard/go-difflib/difflib
-```
-
-### Quick Start
-
-Diffs are configured with Unified (or ContextDiff) structures, and can
-be output to an io.Writer or returned as a string.
-
-```Go
-diff := UnifiedDiff{
- A: difflib.SplitLines("foo\nbar\n"),
- B: difflib.SplitLines("foo\nbaz\n"),
- FromFile: "Original",
- ToFile: "Current",
- Context: 3,
-}
-text, _ := GetUnifiedDiffString(diff)
-fmt.Printf(text)
-```
-
-would output:
-
-```
---- Original
-+++ Current
-@@ -1,3 +1,3 @@
- foo
--bar
-+baz
-```
-
diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go
deleted file mode 100644
index d72511962..000000000
--- a/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go
+++ /dev/null
@@ -1,426 +0,0 @@
-package difflib
-
-import (
- "bytes"
- "fmt"
- "math"
- "reflect"
- "strings"
- "testing"
-)
-
-func assertAlmostEqual(t *testing.T, a, b float64, places int) {
- if math.Abs(a-b) > math.Pow10(-places) {
- t.Errorf("%.7f != %.7f", a, b)
- }
-}
-
-func assertEqual(t *testing.T, a, b interface{}) {
- if !reflect.DeepEqual(a, b) {
- t.Errorf("%v != %v", a, b)
- }
-}
-
-func splitChars(s string) []string {
- chars := make([]string, 0, len(s))
- // Assume ASCII inputs
- for i := 0; i != len(s); i++ {
- chars = append(chars, string(s[i]))
- }
- return chars
-}
-
-func TestSequenceMatcherRatio(t *testing.T) {
- s := NewMatcher(splitChars("abcd"), splitChars("bcde"))
- assertEqual(t, s.Ratio(), 0.75)
- assertEqual(t, s.QuickRatio(), 0.75)
- assertEqual(t, s.RealQuickRatio(), 1.0)
-}
-
-func TestGetOptCodes(t *testing.T) {
- a := "qabxcd"
- b := "abycdf"
- s := NewMatcher(splitChars(a), splitChars(b))
- w := &bytes.Buffer{}
- for _, op := range s.GetOpCodes() {
- fmt.Fprintf(w, "%s a[%d:%d], (%s) b[%d:%d] (%s)\n", string(op.Tag),
- op.I1, op.I2, a[op.I1:op.I2], op.J1, op.J2, b[op.J1:op.J2])
- }
- result := string(w.Bytes())
- expected := `d a[0:1], (q) b[0:0] ()
-e a[1:3], (ab) b[0:2] (ab)
-r a[3:4], (x) b[2:3] (y)
-e a[4:6], (cd) b[3:5] (cd)
-i a[6:6], () b[5:6] (f)
-`
- if expected != result {
- t.Errorf("unexpected op codes: \n%s", result)
- }
-}
-
-func TestGroupedOpCodes(t *testing.T) {
- a := []string{}
- for i := 0; i != 39; i++ {
- a = append(a, fmt.Sprintf("%02d", i))
- }
- b := []string{}
- b = append(b, a[:8]...)
- b = append(b, " i")
- b = append(b, a[8:19]...)
- b = append(b, " x")
- b = append(b, a[20:22]...)
- b = append(b, a[27:34]...)
- b = append(b, " y")
- b = append(b, a[35:]...)
- s := NewMatcher(a, b)
- w := &bytes.Buffer{}
- for _, g := range s.GetGroupedOpCodes(-1) {
- fmt.Fprintf(w, "group\n")
- for _, op := range g {
- fmt.Fprintf(w, " %s, %d, %d, %d, %d\n", string(op.Tag),
- op.I1, op.I2, op.J1, op.J2)
- }
- }
- result := string(w.Bytes())
- expected := `group
- e, 5, 8, 5, 8
- i, 8, 8, 8, 9
- e, 8, 11, 9, 12
-group
- e, 16, 19, 17, 20
- r, 19, 20, 20, 21
- e, 20, 22, 21, 23
- d, 22, 27, 23, 23
- e, 27, 30, 23, 26
-group
- e, 31, 34, 27, 30
- r, 34, 35, 30, 31
- e, 35, 38, 31, 34
-`
- if expected != result {
- t.Errorf("unexpected op codes: \n%s", result)
- }
-}
-
-func ExampleGetUnifiedDiffCode() {
- a := `one
-two
-three
-four
-fmt.Printf("%s,%T",a,b)`
- b := `zero
-one
-three
-four`
- diff := UnifiedDiff{
- A: SplitLines(a),
- B: SplitLines(b),
- FromFile: "Original",
- FromDate: "2005-01-26 23:30:50",
- ToFile: "Current",
- ToDate: "2010-04-02 10:20:52",
- Context: 3,
- }
- result, _ := GetUnifiedDiffString(diff)
- fmt.Println(strings.Replace(result, "\t", " ", -1))
- // Output:
- // --- Original 2005-01-26 23:30:50
- // +++ Current 2010-04-02 10:20:52
- // @@ -1,5 +1,4 @@
- // +zero
- // one
- // -two
- // three
- // four
- // -fmt.Printf("%s,%T",a,b)
-}
-
-func ExampleGetContextDiffCode() {
- a := `one
-two
-three
-four
-fmt.Printf("%s,%T",a,b)`
- b := `zero
-one
-tree
-four`
- diff := ContextDiff{
- A: SplitLines(a),
- B: SplitLines(b),
- FromFile: "Original",
- ToFile: "Current",
- Context: 3,
- Eol: "\n",
- }
- result, _ := GetContextDiffString(diff)
- fmt.Print(strings.Replace(result, "\t", " ", -1))
- // Output:
- // *** Original
- // --- Current
- // ***************
- // *** 1,5 ****
- // one
- // ! two
- // ! three
- // four
- // - fmt.Printf("%s,%T",a,b)
- // --- 1,4 ----
- // + zero
- // one
- // ! tree
- // four
-}
-
-func ExampleGetContextDiffString() {
- a := `one
-two
-three
-four`
- b := `zero
-one
-tree
-four`
- diff := ContextDiff{
- A: SplitLines(a),
- B: SplitLines(b),
- FromFile: "Original",
- ToFile: "Current",
- Context: 3,
- Eol: "\n",
- }
- result, _ := GetContextDiffString(diff)
- fmt.Printf(strings.Replace(result, "\t", " ", -1))
- // Output:
- // *** Original
- // --- Current
- // ***************
- // *** 1,4 ****
- // one
- // ! two
- // ! three
- // four
- // --- 1,4 ----
- // + zero
- // one
- // ! tree
- // four
-}
-
-func rep(s string, count int) string {
- return strings.Repeat(s, count)
-}
-
-func TestWithAsciiOneInsert(t *testing.T) {
- sm := NewMatcher(splitChars(rep("b", 100)),
- splitChars("a"+rep("b", 100)))
- assertAlmostEqual(t, sm.Ratio(), 0.995, 3)
- assertEqual(t, sm.GetOpCodes(),
- []OpCode{{'i', 0, 0, 0, 1}, {'e', 0, 100, 1, 101}})
- assertEqual(t, len(sm.bPopular), 0)
-
- sm = NewMatcher(splitChars(rep("b", 100)),
- splitChars(rep("b", 50)+"a"+rep("b", 50)))
- assertAlmostEqual(t, sm.Ratio(), 0.995, 3)
- assertEqual(t, sm.GetOpCodes(),
- []OpCode{{'e', 0, 50, 0, 50}, {'i', 50, 50, 50, 51}, {'e', 50, 100, 51, 101}})
- assertEqual(t, len(sm.bPopular), 0)
-}
-
-func TestWithAsciiOnDelete(t *testing.T) {
- sm := NewMatcher(splitChars(rep("a", 40)+"c"+rep("b", 40)),
- splitChars(rep("a", 40)+rep("b", 40)))
- assertAlmostEqual(t, sm.Ratio(), 0.994, 3)
- assertEqual(t, sm.GetOpCodes(),
- []OpCode{{'e', 0, 40, 0, 40}, {'d', 40, 41, 40, 40}, {'e', 41, 81, 40, 80}})
-}
-
-func TestWithAsciiBJunk(t *testing.T) {
- isJunk := func(s string) bool {
- return s == " "
- }
- sm := NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)),
- splitChars(rep("a", 44)+rep("b", 40)), true, isJunk)
- assertEqual(t, sm.bJunk, map[string]struct{}{})
-
- sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)),
- splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk)
- assertEqual(t, sm.bJunk, map[string]struct{}{" ": struct{}{}})
-
- isJunk = func(s string) bool {
- return s == " " || s == "b"
- }
- sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)),
- splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk)
- assertEqual(t, sm.bJunk, map[string]struct{}{" ": struct{}{}, "b": struct{}{}})
-}
-
-func TestSFBugsRatioForNullSeqn(t *testing.T) {
- sm := NewMatcher(nil, nil)
- assertEqual(t, sm.Ratio(), 1.0)
- assertEqual(t, sm.QuickRatio(), 1.0)
- assertEqual(t, sm.RealQuickRatio(), 1.0)
-}
-
-func TestSFBugsComparingEmptyLists(t *testing.T) {
- groups := NewMatcher(nil, nil).GetGroupedOpCodes(-1)
- assertEqual(t, len(groups), 0)
- diff := UnifiedDiff{
- FromFile: "Original",
- ToFile: "Current",
- Context: 3,
- }
- result, err := GetUnifiedDiffString(diff)
- assertEqual(t, err, nil)
- assertEqual(t, result, "")
-}
-
-func TestOutputFormatRangeFormatUnified(t *testing.T) {
- // Per the diff spec at http://www.unix.org/single_unix_specification/
- //
- // Each <range> field shall be of the form:
- // %1d", <beginning line number> if the range contains exactly one line,
- // and:
- // "%1d,%1d", <beginning line number>, <number of lines> otherwise.
- // If a range is empty, its beginning line number shall be the number of
- // the line just before the range, or 0 if the empty range starts the file.
- fm := formatRangeUnified
- assertEqual(t, fm(3, 3), "3,0")
- assertEqual(t, fm(3, 4), "4")
- assertEqual(t, fm(3, 5), "4,2")
- assertEqual(t, fm(3, 6), "4,3")
- assertEqual(t, fm(0, 0), "0,0")
-}
-
-func TestOutputFormatRangeFormatContext(t *testing.T) {
- // Per the diff spec at http://www.unix.org/single_unix_specification/
- //
- // The range of lines in file1 shall be written in the following format
- // if the range contains two or more lines:
- // "*** %d,%d ****\n", <beginning line number>, <ending line number>
- // and the following format otherwise:
- // "*** %d ****\n", <ending line number>
- // The ending line number of an empty range shall be the number of the preceding line,
- // or 0 if the range is at the start of the file.
- //
- // Next, the range of lines in file2 shall be written in the following format
- // if the range contains two or more lines:
- // "--- %d,%d ----\n", <beginning line number>, <ending line number>
- // and the following format otherwise:
- // "--- %d ----\n", <ending line number>
- fm := formatRangeContext
- assertEqual(t, fm(3, 3), "3")
- assertEqual(t, fm(3, 4), "4")
- assertEqual(t, fm(3, 5), "4,5")
- assertEqual(t, fm(3, 6), "4,6")
- assertEqual(t, fm(0, 0), "0")
-}
-
-func TestOutputFormatTabDelimiter(t *testing.T) {
- diff := UnifiedDiff{
- A: splitChars("one"),
- B: splitChars("two"),
- FromFile: "Original",
- FromDate: "2005-01-26 23:30:50",
- ToFile: "Current",
- ToDate: "2010-04-12 10:20:52",
- Eol: "\n",
- }
- ud, err := GetUnifiedDiffString(diff)
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(ud)[:2], []string{
- "--- Original\t2005-01-26 23:30:50\n",
- "+++ Current\t2010-04-12 10:20:52\n",
- })
- cd, err := GetContextDiffString(ContextDiff(diff))
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(cd)[:2], []string{
- "*** Original\t2005-01-26 23:30:50\n",
- "--- Current\t2010-04-12 10:20:52\n",
- })
-}
-
-func TestOutputFormatNoTrailingTabOnEmptyFiledate(t *testing.T) {
- diff := UnifiedDiff{
- A: splitChars("one"),
- B: splitChars("two"),
- FromFile: "Original",
- ToFile: "Current",
- Eol: "\n",
- }
- ud, err := GetUnifiedDiffString(diff)
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(ud)[:2], []string{"--- Original\n", "+++ Current\n"})
-
- cd, err := GetContextDiffString(ContextDiff(diff))
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(cd)[:2], []string{"*** Original\n", "--- Current\n"})
-}
-
-func TestOmitFilenames(t *testing.T) {
- diff := UnifiedDiff{
- A: SplitLines("o\nn\ne\n"),
- B: SplitLines("t\nw\no\n"),
- Eol: "\n",
- }
- ud, err := GetUnifiedDiffString(diff)
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(ud), []string{
- "@@ -0,0 +1,2 @@\n",
- "+t\n",
- "+w\n",
- "@@ -2,2 +3,0 @@\n",
- "-n\n",
- "-e\n",
- "\n",
- })
-
- cd, err := GetContextDiffString(ContextDiff(diff))
- assertEqual(t, err, nil)
- assertEqual(t, SplitLines(cd), []string{
- "***************\n",
- "*** 0 ****\n",
- "--- 1,2 ----\n",
- "+ t\n",
- "+ w\n",
- "***************\n",
- "*** 2,3 ****\n",
- "- n\n",
- "- e\n",
- "--- 3 ----\n",
- "\n",
- })
-}
-
-func TestSplitLines(t *testing.T) {
- allTests := []struct {
- input string
- want []string
- }{
- {"foo", []string{"foo\n"}},
- {"foo\nbar", []string{"foo\n", "bar\n"}},
- {"foo\nbar\n", []string{"foo\n", "bar\n", "\n"}},
- }
- for _, test := range allTests {
- assertEqual(t, SplitLines(test.input), test.want)
- }
-}
-
-func benchmarkSplitLines(b *testing.B, count int) {
- str := strings.Repeat("foo\n", count)
-
- b.ResetTimer()
-
- n := 0
- for i := 0; i < b.N; i++ {
- n += len(SplitLines(str))
- }
-}
-
-func BenchmarkSplitLines100(b *testing.B) {
- benchmarkSplitLines(b, 100)
-}
-
-func BenchmarkSplitLines10000(b *testing.B) {
- benchmarkSplitLines(b, 10000)
-}
diff --git a/vendor/github.com/prometheus/client_golang/.gitignore b/vendor/github.com/prometheus/client_golang/.gitignore
deleted file mode 100644
index 5725b80fd..000000000
--- a/vendor/github.com/prometheus/client_golang/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Examples
-/examples/simple/simple
-/examples/random/random
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-
-*~
-*#
-.build
diff --git a/vendor/github.com/prometheus/client_golang/.travis.yml b/vendor/github.com/prometheus/client_golang/.travis.yml
deleted file mode 100644
index e9bca4ec7..000000000
--- a/vendor/github.com/prometheus/client_golang/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-sudo: false
-language: go
-
-go:
- - 1.7.x
- - 1.8.x
- - 1.9.x
-
-script:
- - go test -short ./...
diff --git a/vendor/github.com/prometheus/client_golang/AUTHORS.md b/vendor/github.com/prometheus/client_golang/AUTHORS.md
new file mode 100644
index 000000000..c5275d5ab
--- /dev/null
+++ b/vendor/github.com/prometheus/client_golang/AUTHORS.md
@@ -0,0 +1,18 @@
+The Prometheus project was started by Matt T. Proud (emeritus) and
+Julius Volz in 2012.
+
+Maintainers of this repository:
+
+* Björn Rabenstein <beorn@soundcloud.com>
+
+The following individuals have contributed code to this repository
+(listed in alphabetical order):
+
+* Bernerd Schaefer <bj.schaefer@gmail.com>
+* Björn Rabenstein <beorn@soundcloud.com>
+* Daniel Bornkessel <daniel@soundcloud.com>
+* Jeff Younker <jeff@drinktomi.com>
+* Julius Volz <julius.volz@gmail.com>
+* Matt T. Proud <matt.proud@gmail.com>
+* Tobias Schmidt <ts@soundcloud.com>
+
diff --git a/vendor/github.com/prometheus/client_golang/CHANGELOG.md b/vendor/github.com/prometheus/client_golang/CHANGELOG.md
deleted file mode 100644
index 330788a4e..000000000
--- a/vendor/github.com/prometheus/client_golang/CHANGELOG.md
+++ /dev/null
@@ -1,109 +0,0 @@
-## 0.8.0 / 2016-08-17
-* [CHANGE] Registry is doing more consistency checks. This might break
- existing setups that used to export inconsistent metrics.
-* [CHANGE] Pushing to Pushgateway moved to package `push` and changed to allow
- arbitrary grouping.
-* [CHANGE] Removed `SelfCollector`.
-* [CHANGE] Removed `PanicOnCollectError` and `EnableCollectChecks` methods.
-* [CHANGE] Moved packages to the prometheus/common repo: `text`, `model`,
- `extraction`.
-* [CHANGE] Deprecated a number of functions.
-* [FEATURE] Allow custom registries. Added `Registerer` and `Gatherer`
- interfaces.
-* [FEATURE] Separated HTTP exposition, allowing custom HTTP handlers (package
- `promhttp`) and enabling the creation of other exposition mechanisms.
-* [FEATURE] `MustRegister` is variadic now, allowing registration of many
- collectors in one call.
-* [FEATURE] Added HTTP API v1 package.
-* [ENHANCEMENT] Numerous documentation improvements.
-* [ENHANCEMENT] Improved metric sorting.
-* [ENHANCEMENT] Inlined fnv64a hashing for improved performance.
-* [ENHANCEMENT] Several test improvements.
-* [BUGFIX] Handle collisions in MetricVec.
-
-## 0.7.0 / 2015-07-27
-* [CHANGE] Rename ExporterLabelPrefix to ExportedLabelPrefix.
-* [BUGFIX] Closed gaps in metric consistency check.
-* [BUGFIX] Validate LabelName/LabelSet on JSON unmarshaling.
-* [ENHANCEMENT] Document the possibility to create "empty" metrics in
- a metric vector.
-* [ENHANCEMENT] Fix and clarify various doc comments and the README.md.
-* [ENHANCEMENT] (Kind of) solve "The Proxy Problem" of http.InstrumentHandler.
-* [ENHANCEMENT] Change responseWriterDelegator.written to int64.
-
-## 0.6.0 / 2015-06-01
-* [CHANGE] Rename process_goroutines to go_goroutines.
-* [ENHANCEMENT] Validate label names during YAML decoding.
-* [ENHANCEMENT] Add LabelName regular expression.
-* [BUGFIX] Ensure alignment of struct members for 32-bit systems.
-
-## 0.5.0 / 2015-05-06
-* [BUGFIX] Removed a weakness in the fingerprinting aka signature code.
- This makes fingerprinting slower and more allocation-heavy, but the
- weakness was too severe to be tolerated.
-* [CHANGE] As a result of the above, Metric.Fingerprint is now returning
- a different fingerprint. To keep the same fingerprint, the new method
- Metric.FastFingerprint was introduced, which will be used by the
- Prometheus server for storage purposes (implying that a collision
- detection has to be added, too).
-* [ENHANCEMENT] The Metric.Equal and Metric.Before do not depend on
- fingerprinting anymore, removing the possibility of an undetected
- fingerprint collision.
-* [FEATURE] The Go collector in the exposition library includes garbage
- collection stats.
-* [FEATURE] The exposition library allows to create constant "throw-away"
- summaries and histograms.
-* [CHANGE] A number of new reserved labels and prefixes.
-
-## 0.4.0 / 2015-04-08
-* [CHANGE] Return NaN when Summaries have no observations yet.
-* [BUGFIX] Properly handle Summary decay upon Write().
-* [BUGFIX] Fix the documentation link to the consumption library.
-* [FEATURE] Allow the metric family injection hook to merge with existing
- metric families.
-* [ENHANCEMENT] Removed cgo dependency and conditional compilation of procfs.
-* [MAINTENANCE] Adjusted to changes in matttproud/golang_protobuf_extensions.
-
-## 0.3.2 / 2015-03-11
-* [BUGFIX] Fixed the receiver type of COWMetric.Set(). This method is
- only used by the Prometheus server internally.
-* [CLEANUP] Added licenses of vendored code left out by godep.
-
-## 0.3.1 / 2015-03-04
-* [ENHANCEMENT] Switched fingerprinting functions from own free list to
- sync.Pool.
-* [CHANGE] Makefile uses Go 1.4.2 now (only relevant for examples and tests).
-
-## 0.3.0 / 2015-03-03
-* [CHANGE] Changed the fingerprinting for metrics. THIS WILL INVALIDATE ALL
- PERSISTED FINGERPRINTS. IF YOU COMPILE THE PROMETHEUS SERVER WITH THIS
- VERSION, YOU HAVE TO WIPE THE PREVIOUSLY CREATED STORAGE.
-* [CHANGE] LabelValuesToSignature removed. (Nobody had used it, and it was
- arguably broken.)
-* [CHANGE] Vendored dependencies. Those are only used by the Makefile. If
- client_golang is used as a library, the vendoring will stay out of your way.
-* [BUGFIX] Remove a weakness in the fingerprinting for metrics. (This made
- the fingerprinting change above necessary.)
-* [FEATURE] Added new fingerprinting functions SignatureForLabels and
- SignatureWithoutLabels to be used by the Prometheus server. These functions
- require fewer allocations than the ones currently used by the server.
-
-## 0.2.0 / 2015-02-23
-* [FEATURE] Introduce new Histagram metric type.
-* [CHANGE] Ignore process collector errors for now (better error handling
- pending).
-* [CHANGE] Use clear error interface for process pidFn.
-* [BUGFIX] Fix Go download links for several archs and OSes.
-* [ENHANCEMENT] Massively improve Gauge and Counter performance.
-* [ENHANCEMENT] Catch illegal label names for summaries in histograms.
-* [ENHANCEMENT] Reduce allocations during fingerprinting.
-* [ENHANCEMENT] Remove cgo dependency. procfs package will only be included if
- both cgo is available and the build is for an OS with procfs.
-* [CLEANUP] Clean up code style issues.
-* [CLEANUP] Mark slow test as such and exclude them from travis.
-* [CLEANUP] Update protobuf library package name.
-* [CLEANUP] Updated vendoring of beorn7/perks.
-
-## 0.1.0 / 2015-02-02
-* [CLEANUP] Introduced semantic versioning and changelog. From now on,
- changes will be reported in this file.
diff --git a/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md b/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md
deleted file mode 100644
index 40503edbf..000000000
--- a/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Contributing
-
-Prometheus uses GitHub to manage reviews of pull requests.
-
-* If you have a trivial fix or improvement, go ahead and create a pull request,
- addressing (with `@...`) the maintainer of this repository (see
- [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.
-
-* If you plan to do something more involved, first discuss your ideas
- on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).
- This will avoid unnecessary work and surely give you and us a good deal
- of inspiration.
-
-* Relevant coding style guidelines are the [Go Code Review
- Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments)
- and the _Formatting and style_ section of Peter Bourgon's [Go: Best
- Practices for Production
- Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
diff --git a/vendor/github.com/prometheus/client_golang/ISSUE_TEMPLATE.md b/vendor/github.com/prometheus/client_golang/ISSUE_TEMPLATE.md
deleted file mode 100644
index a456acf5b..000000000
--- a/vendor/github.com/prometheus/client_golang/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,8 +0,0 @@
-<!--
-
- If you are unhappy how your favorite Go dependency management tool deals
- with this repository, please do not file an issue but read
- https://github.com/prometheus/client_golang#important-note-about-releases-versioning-tagging-stability-and-your-favorite-go-dependency-management-tool
- instead. Thank you very much.
-
--->
diff --git a/vendor/github.com/prometheus/client_golang/MAINTAINERS.md b/vendor/github.com/prometheus/client_golang/MAINTAINERS.md
deleted file mode 100644
index 3ede55fe1..000000000
--- a/vendor/github.com/prometheus/client_golang/MAINTAINERS.md
+++ /dev/null
@@ -1 +0,0 @@
-* Björn Rabenstein <beorn@soundcloud.com>
diff --git a/vendor/github.com/prometheus/client_golang/README.md b/vendor/github.com/prometheus/client_golang/README.md
deleted file mode 100644
index 17d46ecaf..000000000
--- a/vendor/github.com/prometheus/client_golang/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Prometheus Go client library
-
-[![Build Status](https://travis-ci.org/prometheus/client_golang.svg?branch=master)](https://travis-ci.org/prometheus/client_golang)
-[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/client_golang)](https://goreportcard.com/report/github.com/prometheus/client_golang)
-[![go-doc](https://godoc.org/github.com/prometheus/client_golang?status.svg)](https://godoc.org/github.com/prometheus/client_golang)
-
-This is the [Go](http://golang.org) client library for
-[Prometheus](http://prometheus.io). It has two separate parts, one for
-instrumenting application code, and one for creating clients that talk to the
-Prometheus HTTP API.
-
-__This library requires Go1.7 or later.__
-
-## Important note about releases, versioning, tagging, stability, and your favorite Go dependency management tool
-
-While our goal is to follow [Semantic Versioning](https://semver.org/), this
-repository is still pre-1.0.0. To quote the
-[Semantic Versioning spec](https://semver.org/#spec-item-4): “Anything may
-change at any time. The public API should not be considered stable.†We know
-that this is at odds with the widespread use of this library. However, just
-declaring something 1.0.0 doesn't make it 1.0.0. Instead, we are working
-towards a 1.0.0 release that actually deserves its major version number.
-
-Having said that, we aim for always keeping the tip of master in a workable
-state and for only introducing â€mildly†breaking changes up to and including
-[v0.9.0](https://github.com/prometheus/client_golang/milestone/1). After that,
-a number of â€hard†breaking changes are planned, see the
-[v0.10.0 milestone](https://github.com/prometheus/client_golang/milestone/2),
-which should get the library much closer to 1.0.0 state.
-
-Dependency management in Go projects is still in flux, and there are many tools
-floating around. While [dep](https://golang.github.io/dep/) might develop into
-the de-facto standard tool, it is still officially experimental. The roadmap
-for this library has been laid out with a lot of sometimes painful experience
-in mind. We really cannot adjust it every other month to the needs of the
-currently most popular or most promising Go dependency management tool. The
-recommended course of action with dependency management tools is the following:
-
-- Do not expect strict post-1.0.0 semver semantics prior to the 1.0.0
- release. If your dependency management tool expects strict post-1.0.0 semver
- semantics, you have to wait. Sorry.
-- If you want absolute certainty, please lock to a specific commit. You can
- also lock to tags, but please don't ask for more tagging. This would suggest
- some release or stability testing procedure that simply is not in place. As
- said above, we are aiming for stability of the tip of master, but if we
- tagged every single commit, locking to tags would be the same as locking to
- commits.
-- If you want to get the newer features and improvements and are willing to
- take the minor risk of newly introduced bugs and “mild†breakage, just always
- update to the tip of master (which is essentially the original idea of Go
- dependency management). We recommend to not use features marked as
- _deprecated_ in this case.
-- Once [v0.9.0](https://github.com/prometheus/client_golang/milestone/1) is
- out, you could lock to v0.9.x to get bugfixes (and perhaps minor new
- features) while avoiding the “hard†breakage that will come with post-0.9
- features.
-
-## Instrumenting applications
-
-[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/prometheus)](http://gocover.io/github.com/prometheus/client_golang/prometheus) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus)
-
-The
-[`prometheus` directory](https://github.com/prometheus/client_golang/tree/master/prometheus)
-contains the instrumentation library. See the
-[best practices section](http://prometheus.io/docs/practices/naming/) of the
-Prometheus documentation to learn more about instrumenting applications.
-
-The
-[`examples` directory](https://github.com/prometheus/client_golang/tree/master/examples)
-contains simple examples of instrumented code.
-
-## Client for the Prometheus HTTP API
-
-[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/api/prometheus/v1)](http://gocover.io/github.com/prometheus/client_golang/api/prometheus/v1) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/api/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/api)
-
-The
-[`api/prometheus` directory](https://github.com/prometheus/client_golang/tree/master/api/prometheus)
-contains the client for the
-[Prometheus HTTP API](http://prometheus.io/docs/querying/api/). It allows you
-to write Go applications that query time series data from a Prometheus
-server. It is still in alpha stage.
-
-## Where is `model`, `extraction`, and `text`?
-
-The `model` packages has been moved to
-[`prometheus/common/model`](https://github.com/prometheus/common/tree/master/model).
-
-The `extraction` and `text` packages are now contained in
-[`prometheus/common/expfmt`](https://github.com/prometheus/common/tree/master/expfmt).
-
-## Contributing and community
-
-See the [contributing guidelines](CONTRIBUTING.md) and the
-[Community section](http://prometheus.io/community/) of the homepage.
diff --git a/vendor/github.com/prometheus/client_golang/VERSION b/vendor/github.com/prometheus/client_golang/VERSION
deleted file mode 100644
index a3df0a695..000000000
--- a/vendor/github.com/prometheus/client_golang/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-0.8.0
diff --git a/vendor/github.com/prometheus/client_golang/api/client.go b/vendor/github.com/prometheus/client_golang/api/client.go
deleted file mode 100644
index bf2672466..000000000
--- a/vendor/github.com/prometheus/client_golang/api/client.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// +build go1.7
-
-// Package api provides clients for the HTTP APIs.
-package api
-
-import (
- "context"
- "io/ioutil"
- "net"
- "net/http"
- "net/url"
- "path"
- "strings"
- "time"
-)
-
-// DefaultRoundTripper is used if no RoundTripper is set in Config.
-var DefaultRoundTripper http.RoundTripper = &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
-}
-
-// Config defines configuration parameters for a new client.
-type Config struct {
- // The address of the Prometheus to connect to.
- Address string
-
- // RoundTripper is used by the Client to drive HTTP requests. If not
- // provided, DefaultRoundTripper will be used.
- RoundTripper http.RoundTripper
-}
-
-func (cfg *Config) roundTripper() http.RoundTripper {
- if cfg.RoundTripper == nil {
- return DefaultRoundTripper
- }
- return cfg.RoundTripper
-}
-
-// Client is the interface for an API client.
-type Client interface {
- URL(ep string, args map[string]string) *url.URL
- Do(context.Context, *http.Request) (*http.Response, []byte, error)
-}
-
-// NewClient returns a new Client.
-//
-// It is safe to use the returned Client from multiple goroutines.
-func NewClient(cfg Config) (Client, error) {
- u, err := url.Parse(cfg.Address)
- if err != nil {
- return nil, err
- }
- u.Path = strings.TrimRight(u.Path, "/")
-
- return &httpClient{
- endpoint: u,
- client: http.Client{Transport: cfg.roundTripper()},
- }, nil
-}
-
-type httpClient struct {
- endpoint *url.URL
- client http.Client
-}
-
-func (c *httpClient) URL(ep string, args map[string]string) *url.URL {
- p := path.Join(c.endpoint.Path, ep)
-
- for arg, val := range args {
- arg = ":" + arg
- p = strings.Replace(p, arg, val, -1)
- }
-
- u := *c.endpoint
- u.Path = p
-
- return &u
-}
-
-func (c *httpClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) {
- if ctx != nil {
- req = req.WithContext(ctx)
- }
- resp, err := c.client.Do(req)
- defer func() {
- if resp != nil {
- resp.Body.Close()
- }
- }()
-
- if err != nil {
- return nil, nil, err
- }
-
- var body []byte
- done := make(chan struct{})
- go func() {
- body, err = ioutil.ReadAll(resp.Body)
- close(done)
- }()
-
- select {
- case <-ctx.Done():
- err = resp.Body.Close()
- <-done
- if err == nil {
- err = ctx.Err()
- }
- case <-done:
- }
-
- return resp, body, err
-}
diff --git a/vendor/github.com/prometheus/client_golang/api/client_test.go b/vendor/github.com/prometheus/client_golang/api/client_test.go
deleted file mode 100644
index 53226d7d2..000000000
--- a/vendor/github.com/prometheus/client_golang/api/client_test.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// +build go1.7
-
-package api
-
-import (
- "net/http"
- "net/url"
- "testing"
-)
-
-func TestConfig(t *testing.T) {
- c := Config{}
- if c.roundTripper() != DefaultRoundTripper {
- t.Fatalf("expected default roundtripper for nil RoundTripper field")
- }
-}
-
-func TestClientURL(t *testing.T) {
- tests := []struct {
- address string
- endpoint string
- args map[string]string
- expected string
- }{
- {
- address: "http://localhost:9090",
- endpoint: "/test",
- expected: "http://localhost:9090/test",
- },
- {
- address: "http://localhost",
- endpoint: "/test",
- expected: "http://localhost/test",
- },
- {
- address: "http://localhost:9090",
- endpoint: "test",
- expected: "http://localhost:9090/test",
- },
- {
- address: "http://localhost:9090/prefix",
- endpoint: "/test",
- expected: "http://localhost:9090/prefix/test",
- },
- {
- address: "https://localhost:9090/",
- endpoint: "/test/",
- expected: "https://localhost:9090/test",
- },
- {
- address: "http://localhost:9090",
- endpoint: "/test/:param",
- args: map[string]string{
- "param": "content",
- },
- expected: "http://localhost:9090/test/content",
- },
- {
- address: "http://localhost:9090",
- endpoint: "/test/:param/more/:param",
- args: map[string]string{
- "param": "content",
- },
- expected: "http://localhost:9090/test/content/more/content",
- },
- {
- address: "http://localhost:9090",
- endpoint: "/test/:param/more/:foo",
- args: map[string]string{
- "param": "content",
- "foo": "bar",
- },
- expected: "http://localhost:9090/test/content/more/bar",
- },
- {
- address: "http://localhost:9090",
- endpoint: "/test/:param",
- args: map[string]string{
- "nonexistant": "content",
- },
- expected: "http://localhost:9090/test/:param",
- },
- }
-
- for _, test := range tests {
- ep, err := url.Parse(test.address)
- if err != nil {
- t.Fatal(err)
- }
-
- hclient := &httpClient{
- endpoint: ep,
- client: http.Client{Transport: DefaultRoundTripper},
- }
-
- u := hclient.URL(test.endpoint, test.args)
- if u.String() != test.expected {
- t.Errorf("unexpected result: got %s, want %s", u, test.expected)
- continue
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go b/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go
deleted file mode 100644
index cb07022bc..000000000
--- a/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build go1.7
-
-// Package v1 provides bindings to the Prometheus HTTP API v1:
-// http://prometheus.io/docs/querying/api/
-package v1
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/http"
- "strconv"
- "time"
-
- "github.com/prometheus/client_golang/api"
- "github.com/prometheus/common/model"
-)
-
-const (
- statusAPIError = 422
-
- apiPrefix = "/api/v1"
-
- epQuery = apiPrefix + "/query"
- epQueryRange = apiPrefix + "/query_range"
- epLabelValues = apiPrefix + "/label/:name/values"
- epSeries = apiPrefix + "/series"
-)
-
-// ErrorType models the different API error types.
-type ErrorType string
-
-// Possible values for ErrorType.
-const (
- ErrBadData ErrorType = "bad_data"
- ErrTimeout = "timeout"
- ErrCanceled = "canceled"
- ErrExec = "execution"
- ErrBadResponse = "bad_response"
-)
-
-// Error is an error returned by the API.
-type Error struct {
- Type ErrorType
- Msg string
-}
-
-func (e *Error) Error() string {
- return fmt.Sprintf("%s: %s", e.Type, e.Msg)
-}
-
-// Range represents a sliced time range.
-type Range struct {
- // The boundaries of the time range.
- Start, End time.Time
- // The maximum time between two slices within the boundaries.
- Step time.Duration
-}
-
-// API provides bindings for Prometheus's v1 API.
-type API interface {
- // Query performs a query for the given time.
- Query(ctx context.Context, query string, ts time.Time) (model.Value, error)
- // QueryRange performs a query for the given range.
- QueryRange(ctx context.Context, query string, r Range) (model.Value, error)
- // LabelValues performs a query for the values of the given label.
- LabelValues(ctx context.Context, label string) (model.LabelValues, error)
- // Series finds series by label matchers.
- Series(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]model.LabelSet, error)
-}
-
-// queryResult contains result data for a query.
-type queryResult struct {
- Type model.ValueType `json:"resultType"`
- Result interface{} `json:"result"`
-
- // The decoded value.
- v model.Value
-}
-
-func (qr *queryResult) UnmarshalJSON(b []byte) error {
- v := struct {
- Type model.ValueType `json:"resultType"`
- Result json.RawMessage `json:"result"`
- }{}
-
- err := json.Unmarshal(b, &v)
- if err != nil {
- return err
- }
-
- switch v.Type {
- case model.ValScalar:
- var sv model.Scalar
- err = json.Unmarshal(v.Result, &sv)
- qr.v = &sv
-
- case model.ValVector:
- var vv model.Vector
- err = json.Unmarshal(v.Result, &vv)
- qr.v = vv
-
- case model.ValMatrix:
- var mv model.Matrix
- err = json.Unmarshal(v.Result, &mv)
- qr.v = mv
-
- default:
- err = fmt.Errorf("unexpected value type %q", v.Type)
- }
- return err
-}
-
-// NewAPI returns a new API for the client.
-//
-// It is safe to use the returned API from multiple goroutines.
-func NewAPI(c api.Client) API {
- return &httpAPI{client: apiClient{c}}
-}
-
-type httpAPI struct {
- client api.Client
-}
-
-func (h *httpAPI) Query(ctx context.Context, query string, ts time.Time) (model.Value, error) {
- u := h.client.URL(epQuery, nil)
- q := u.Query()
-
- q.Set("query", query)
- if !ts.IsZero() {
- q.Set("time", ts.Format(time.RFC3339Nano))
- }
-
- u.RawQuery = q.Encode()
-
- req, err := http.NewRequest("GET", u.String(), nil)
- if err != nil {
- return nil, err
- }
-
- _, body, err := h.client.Do(ctx, req)
- if err != nil {
- return nil, err
- }
-
- var qres queryResult
- err = json.Unmarshal(body, &qres)
-
- return model.Value(qres.v), err
-}
-
-func (h *httpAPI) QueryRange(ctx context.Context, query string, r Range) (model.Value, error) {
- u := h.client.URL(epQueryRange, nil)
- q := u.Query()
-
- var (
- start = r.Start.Format(time.RFC3339Nano)
- end = r.End.Format(time.RFC3339Nano)
- step = strconv.FormatFloat(r.Step.Seconds(), 'f', 3, 64)
- )
-
- q.Set("query", query)
- q.Set("start", start)
- q.Set("end", end)
- q.Set("step", step)
-
- u.RawQuery = q.Encode()
-
- req, err := http.NewRequest("GET", u.String(), nil)
- if err != nil {
- return nil, err
- }
-
- _, body, err := h.client.Do(ctx, req)
- if err != nil {
- return nil, err
- }
-
- var qres queryResult
- err = json.Unmarshal(body, &qres)
-
- return model.Value(qres.v), err
-}
-
-func (h *httpAPI) LabelValues(ctx context.Context, label string) (model.LabelValues, error) {
- u := h.client.URL(epLabelValues, map[string]string{"name": label})
- req, err := http.NewRequest(http.MethodGet, u.String(), nil)
- if err != nil {
- return nil, err
- }
- _, body, err := h.client.Do(ctx, req)
- if err != nil {
- return nil, err
- }
- var labelValues model.LabelValues
- err = json.Unmarshal(body, &labelValues)
- return labelValues, err
-}
-
-func (h *httpAPI) Series(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]model.LabelSet, error) {
- u := h.client.URL(epSeries, nil)
- q := u.Query()
-
- for _, m := range matches {
- q.Add("match[]", m)
- }
-
- q.Set("start", startTime.Format(time.RFC3339Nano))
- q.Set("end", endTime.Format(time.RFC3339Nano))
-
- u.RawQuery = q.Encode()
-
- req, err := http.NewRequest("GET", u.String(), nil)
- if err != nil {
- return nil, err
- }
-
- _, body, err := h.client.Do(ctx, req)
- if err != nil {
- return nil, err
- }
-
- var mset []model.LabelSet
- err = json.Unmarshal(body, &mset)
- return mset, err
-}
-
-// apiClient wraps a regular client and processes successful API responses.
-// Successful also includes responses that errored at the API level.
-type apiClient struct {
- api.Client
-}
-
-type apiResponse struct {
- Status string `json:"status"`
- Data json.RawMessage `json:"data"`
- ErrorType ErrorType `json:"errorType"`
- Error string `json:"error"`
-}
-
-func (c apiClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) {
- resp, body, err := c.Client.Do(ctx, req)
- if err != nil {
- return resp, body, err
- }
-
- code := resp.StatusCode
-
- if code/100 != 2 && code != statusAPIError {
- return resp, body, &Error{
- Type: ErrBadResponse,
- Msg: fmt.Sprintf("bad response code %d", resp.StatusCode),
- }
- }
-
- var result apiResponse
-
- if err = json.Unmarshal(body, &result); err != nil {
- return resp, body, &Error{
- Type: ErrBadResponse,
- Msg: err.Error(),
- }
- }
-
- if (code == statusAPIError) != (result.Status == "error") {
- err = &Error{
- Type: ErrBadResponse,
- Msg: "inconsistent body for response code",
- }
- }
-
- if code == statusAPIError && result.Status == "error" {
- err = &Error{
- Type: result.ErrorType,
- Msg: result.Error,
- }
- }
-
- return resp, []byte(result.Data), err
-}
diff --git a/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api_test.go b/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api_test.go
deleted file mode 100644
index e557d68f9..000000000
--- a/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api_test.go
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build go1.7
-
-package v1
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/http"
- "net/url"
- "reflect"
- "strings"
- "testing"
- "time"
-
- "github.com/prometheus/common/model"
-)
-
-type apiTest struct {
- do func() (interface{}, error)
- inErr error
- inRes interface{}
-
- reqPath string
- reqParam url.Values
- reqMethod string
- res interface{}
- err error
-}
-
-type apiTestClient struct {
- *testing.T
- curTest apiTest
-}
-
-func (c *apiTestClient) URL(ep string, args map[string]string) *url.URL {
- path := ep
- for k, v := range args {
- path = strings.Replace(path, ":"+k, v, -1)
- }
- u := &url.URL{
- Host: "test:9090",
- Path: path,
- }
- return u
-}
-
-func (c *apiTestClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) {
-
- test := c.curTest
-
- if req.URL.Path != test.reqPath {
- c.Errorf("unexpected request path: want %s, got %s", test.reqPath, req.URL.Path)
- }
- if req.Method != test.reqMethod {
- c.Errorf("unexpected request method: want %s, got %s", test.reqMethod, req.Method)
- }
-
- b, err := json.Marshal(test.inRes)
- if err != nil {
- c.Fatal(err)
- }
-
- resp := &http.Response{}
- if test.inErr != nil {
- resp.StatusCode = statusAPIError
- } else {
- resp.StatusCode = http.StatusOK
- }
-
- return resp, b, test.inErr
-}
-
-func TestAPIs(t *testing.T) {
-
- testTime := time.Now()
-
- client := &apiTestClient{T: t}
-
- queryAPI := &httpAPI{
- client: client,
- }
-
- doQuery := func(q string, ts time.Time) func() (interface{}, error) {
- return func() (interface{}, error) {
- return queryAPI.Query(context.Background(), q, ts)
- }
- }
-
- doQueryRange := func(q string, rng Range) func() (interface{}, error) {
- return func() (interface{}, error) {
- return queryAPI.QueryRange(context.Background(), q, rng)
- }
- }
-
- doLabelValues := func(label string) func() (interface{}, error) {
- return func() (interface{}, error) {
- return queryAPI.LabelValues(context.Background(), label)
- }
- }
-
- doSeries := func(matcher string, startTime time.Time, endTime time.Time) func() (interface{}, error) {
- return func() (interface{}, error) {
- return queryAPI.Series(context.Background(), []string{matcher}, startTime, endTime)
- }
- }
-
- queryTests := []apiTest{
- {
- do: doQuery("2", testTime),
- inRes: &queryResult{
- Type: model.ValScalar,
- Result: &model.Scalar{
- Value: 2,
- Timestamp: model.TimeFromUnix(testTime.Unix()),
- },
- },
-
- reqMethod: "GET",
- reqPath: "/api/v1/query",
- reqParam: url.Values{
- "query": []string{"2"},
- "time": []string{testTime.Format(time.RFC3339Nano)},
- },
- res: &model.Scalar{
- Value: 2,
- Timestamp: model.TimeFromUnix(testTime.Unix()),
- },
- },
- {
- do: doQuery("2", testTime),
- inErr: fmt.Errorf("some error"),
-
- reqMethod: "GET",
- reqPath: "/api/v1/query",
- reqParam: url.Values{
- "query": []string{"2"},
- "time": []string{testTime.Format(time.RFC3339Nano)},
- },
- err: fmt.Errorf("some error"),
- },
-
- {
- do: doQueryRange("2", Range{
- Start: testTime.Add(-time.Minute),
- End: testTime,
- Step: time.Minute,
- }),
- inErr: fmt.Errorf("some error"),
-
- reqMethod: "GET",
- reqPath: "/api/v1/query_range",
- reqParam: url.Values{
- "query": []string{"2"},
- "start": []string{testTime.Add(-time.Minute).Format(time.RFC3339Nano)},
- "end": []string{testTime.Format(time.RFC3339Nano)},
- "step": []string{time.Minute.String()},
- },
- err: fmt.Errorf("some error"),
- },
-
- {
- do: doLabelValues("mylabel"),
- inRes: []string{"val1", "val2"},
- reqMethod: "GET",
- reqPath: "/api/v1/label/mylabel/values",
- res: model.LabelValues{"val1", "val2"},
- },
-
- {
- do: doLabelValues("mylabel"),
- inErr: fmt.Errorf("some error"),
- reqMethod: "GET",
- reqPath: "/api/v1/label/mylabel/values",
- err: fmt.Errorf("some error"),
- },
-
- {
- do: doSeries("up", testTime.Add(-time.Minute), testTime),
- inRes: []map[string]string{
- {
- "__name__": "up",
- "job": "prometheus",
- "instance": "localhost:9090"},
- },
- reqMethod: "GET",
- reqPath: "/api/v1/series",
- reqParam: url.Values{
- "match": []string{"up"},
- "start": []string{testTime.Add(-time.Minute).Format(time.RFC3339Nano)},
- "end": []string{testTime.Format(time.RFC3339Nano)},
- },
- res: []model.LabelSet{
- model.LabelSet{
- "__name__": "up",
- "job": "prometheus",
- "instance": "localhost:9090",
- },
- },
- },
-
- {
- do: doSeries("up", testTime.Add(-time.Minute), testTime),
- inErr: fmt.Errorf("some error"),
- reqMethod: "GET",
- reqPath: "/api/v1/series",
- reqParam: url.Values{
- "match": []string{"up"},
- "start": []string{testTime.Add(-time.Minute).Format(time.RFC3339Nano)},
- "end": []string{testTime.Format(time.RFC3339Nano)},
- },
- err: fmt.Errorf("some error"),
- },
- }
-
- var tests []apiTest
- tests = append(tests, queryTests...)
-
- for _, test := range tests {
- client.curTest = test
-
- res, err := test.do()
-
- if test.err != nil {
- if err == nil {
- t.Errorf("expected error %q but got none", test.err)
- continue
- }
- if err.Error() != test.err.Error() {
- t.Errorf("unexpected error: want %s, got %s", test.err, err)
- }
- continue
- }
- if err != nil {
- t.Errorf("unexpected error: %s", err)
- continue
- }
-
- if !reflect.DeepEqual(res, test.res) {
- t.Errorf("unexpected result: want %v, got %v", test.res, res)
- }
- }
-}
-
-type testClient struct {
- *testing.T
-
- ch chan apiClientTest
- req *http.Request
-}
-
-type apiClientTest struct {
- code int
- response interface{}
- expected string
- err *Error
-}
-
-func (c *testClient) URL(ep string, args map[string]string) *url.URL {
- return nil
-}
-
-func (c *testClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) {
- if ctx == nil {
- c.Fatalf("context was not passed down")
- }
- if req != c.req {
- c.Fatalf("request was not passed down")
- }
-
- test := <-c.ch
-
- var b []byte
- var err error
-
- switch v := test.response.(type) {
- case string:
- b = []byte(v)
- default:
- b, err = json.Marshal(v)
- if err != nil {
- c.Fatal(err)
- }
- }
-
- resp := &http.Response{
- StatusCode: test.code,
- }
-
- return resp, b, nil
-}
-
-func TestAPIClientDo(t *testing.T) {
- tests := []apiClientTest{
- {
- response: &apiResponse{
- Status: "error",
- Data: json.RawMessage(`null`),
- ErrorType: ErrBadData,
- Error: "failed",
- },
- err: &Error{
- Type: ErrBadData,
- Msg: "failed",
- },
- code: statusAPIError,
- expected: `null`,
- },
- {
- response: &apiResponse{
- Status: "error",
- Data: json.RawMessage(`"test"`),
- ErrorType: ErrTimeout,
- Error: "timed out",
- },
- err: &Error{
- Type: ErrTimeout,
- Msg: "timed out",
- },
- code: statusAPIError,
- expected: `test`,
- },
- {
- response: "bad json",
- err: &Error{
- Type: ErrBadResponse,
- Msg: "bad response code 400",
- },
- code: http.StatusBadRequest,
- },
- {
- response: "bad json",
- err: &Error{
- Type: ErrBadResponse,
- Msg: "invalid character 'b' looking for beginning of value",
- },
- code: statusAPIError,
- },
- {
- response: &apiResponse{
- Status: "success",
- Data: json.RawMessage(`"test"`),
- },
- err: &Error{
- Type: ErrBadResponse,
- Msg: "inconsistent body for response code",
- },
- code: statusAPIError,
- },
- {
- response: &apiResponse{
- Status: "success",
- Data: json.RawMessage(`"test"`),
- ErrorType: ErrTimeout,
- Error: "timed out",
- },
- err: &Error{
- Type: ErrBadResponse,
- Msg: "inconsistent body for response code",
- },
- code: statusAPIError,
- },
- {
- response: &apiResponse{
- Status: "error",
- Data: json.RawMessage(`"test"`),
- ErrorType: ErrTimeout,
- Error: "timed out",
- },
- err: &Error{
- Type: ErrBadResponse,
- Msg: "inconsistent body for response code",
- },
- code: http.StatusOK,
- },
- }
-
- tc := &testClient{
- T: t,
- ch: make(chan apiClientTest, 1),
- req: &http.Request{},
- }
- client := &apiClient{tc}
-
- for _, test := range tests {
-
- tc.ch <- test
-
- _, body, err := client.Do(context.Background(), tc.req)
-
- if test.err != nil {
- if err == nil {
- t.Errorf("expected error %q but got none", test.err)
- continue
- }
- if test.err.Error() != err.Error() {
- t.Errorf("unexpected error: want %q, got %q", test.err, err)
- }
- continue
- }
- if err != nil {
- t.Errorf("unexpeceted error %s", err)
- continue
- }
-
- want, got := test.expected, string(body)
- if want != got {
- t.Errorf("unexpected body: want %q, got %q", want, got)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/examples/random/Dockerfile b/vendor/github.com/prometheus/client_golang/examples/random/Dockerfile
deleted file mode 100644
index 32b6846ea..000000000
--- a/vendor/github.com/prometheus/client_golang/examples/random/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-# This Dockerfile builds an image for a client_golang example.
-#
-# Use as (from the root for the client_golang repository):
-# docker build -f examples/$name/Dockerfile -t prometheus/golang-example-$name .
-
-# Builder image, where we build the example.
-FROM golang:1.9.0 AS builder
-WORKDIR /go/src/github.com/prometheus/client_golang
-COPY . .
-WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
-RUN go get -d
-WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
-RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
-
-# Final image.
-FROM scratch
-LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
-COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
-EXPOSE 8080
-ENTRYPOINT ["/random"]
diff --git a/vendor/github.com/prometheus/client_golang/examples/random/main.go b/vendor/github.com/prometheus/client_golang/examples/random/main.go
deleted file mode 100644
index eef50d200..000000000
--- a/vendor/github.com/prometheus/client_golang/examples/random/main.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// A simple example exposing fictional RPC latencies with different types of
-// random distributions (uniform, normal, and exponential) as Prometheus
-// metrics.
-package main
-
-import (
- "flag"
- "log"
- "math"
- "math/rand"
- "net/http"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/promhttp"
-)
-
-var (
- addr = flag.String("listen-address", ":8080", "The address to listen on for HTTP requests.")
- uniformDomain = flag.Float64("uniform.domain", 0.0002, "The domain for the uniform distribution.")
- normDomain = flag.Float64("normal.domain", 0.0002, "The domain for the normal distribution.")
- normMean = flag.Float64("normal.mean", 0.00001, "The mean for the normal distribution.")
- oscillationPeriod = flag.Duration("oscillation-period", 10*time.Minute, "The duration of the rate oscillation period.")
-)
-
-var (
- // Create a summary to track fictional interservice RPC latencies for three
- // distinct services with different latency distributions. These services are
- // differentiated via a "service" label.
- rpcDurations = prometheus.NewSummaryVec(
- prometheus.SummaryOpts{
- Name: "rpc_durations_seconds",
- Help: "RPC latency distributions.",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- []string{"service"},
- )
- // The same as above, but now as a histogram, and only for the normal
- // distribution. The buckets are targeted to the parameters of the
- // normal distribution, with 20 buckets centered on the mean, each
- // half-sigma wide.
- rpcDurationsHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{
- Name: "rpc_durations_histogram_seconds",
- Help: "RPC latency distributions.",
- Buckets: prometheus.LinearBuckets(*normMean-5**normDomain, .5**normDomain, 20),
- })
-)
-
-func init() {
- // Register the summary and the histogram with Prometheus's default registry.
- prometheus.MustRegister(rpcDurations)
- prometheus.MustRegister(rpcDurationsHistogram)
-}
-
-func main() {
- flag.Parse()
-
- start := time.Now()
-
- oscillationFactor := func() float64 {
- return 2 + math.Sin(math.Sin(2*math.Pi*float64(time.Since(start))/float64(*oscillationPeriod)))
- }
-
- // Periodically record some sample latencies for the three services.
- go func() {
- for {
- v := rand.Float64() * *uniformDomain
- rpcDurations.WithLabelValues("uniform").Observe(v)
- time.Sleep(time.Duration(100*oscillationFactor()) * time.Millisecond)
- }
- }()
-
- go func() {
- for {
- v := (rand.NormFloat64() * *normDomain) + *normMean
- rpcDurations.WithLabelValues("normal").Observe(v)
- rpcDurationsHistogram.Observe(v)
- time.Sleep(time.Duration(75*oscillationFactor()) * time.Millisecond)
- }
- }()
-
- go func() {
- for {
- v := rand.ExpFloat64() / 1e6
- rpcDurations.WithLabelValues("exponential").Observe(v)
- time.Sleep(time.Duration(50*oscillationFactor()) * time.Millisecond)
- }
- }()
-
- // Expose the registered metrics via HTTP.
- http.Handle("/metrics", promhttp.Handler())
- log.Fatal(http.ListenAndServe(*addr, nil))
-}
diff --git a/vendor/github.com/prometheus/client_golang/examples/simple/Dockerfile b/vendor/github.com/prometheus/client_golang/examples/simple/Dockerfile
deleted file mode 100644
index 99b49d781..000000000
--- a/vendor/github.com/prometheus/client_golang/examples/simple/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-# This Dockerfile builds an image for a client_golang example.
-#
-# Use as (from the root for the client_golang repository):
-# docker build -f examples/$name/Dockerfile -t prometheus/golang-example-$name .
-
-# Builder image, where we build the example.
-FROM golang:1.9.0 AS builder
-WORKDIR /go/src/github.com/prometheus/client_golang
-COPY . .
-WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
-RUN go get -d
-WORKDIR /go/src/github.com/prometheus/client_golang/examples/simple
-RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
-
-# Final image.
-FROM scratch
-LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
-COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/simple .
-EXPOSE 8080
-ENTRYPOINT ["/simple"]
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go b/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go
deleted file mode 100644
index 4a05721dc..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "sync"
- "testing"
-)
-
-func BenchmarkCounterWithLabelValues(b *testing.B) {
- m := NewCounterVec(
- CounterOpts{
- Name: "benchmark_counter",
- Help: "A counter to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.WithLabelValues("eins", "zwei", "drei").Inc()
- }
-}
-
-func BenchmarkCounterWithLabelValuesConcurrent(b *testing.B) {
- m := NewCounterVec(
- CounterOpts{
- Name: "benchmark_counter",
- Help: "A counter to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- wg := sync.WaitGroup{}
- for i := 0; i < 10; i++ {
- wg.Add(1)
- go func() {
- for j := 0; j < b.N/10; j++ {
- m.WithLabelValues("eins", "zwei", "drei").Inc()
- }
- wg.Done()
- }()
- }
- wg.Wait()
-}
-
-func BenchmarkCounterWithMappedLabels(b *testing.B) {
- m := NewCounterVec(
- CounterOpts{
- Name: "benchmark_counter",
- Help: "A counter to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.With(Labels{"two": "zwei", "one": "eins", "three": "drei"}).Inc()
- }
-}
-
-func BenchmarkCounterWithPreparedMappedLabels(b *testing.B) {
- m := NewCounterVec(
- CounterOpts{
- Name: "benchmark_counter",
- Help: "A counter to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- labels := Labels{"two": "zwei", "one": "eins", "three": "drei"}
- for i := 0; i < b.N; i++ {
- m.With(labels).Inc()
- }
-}
-
-func BenchmarkCounterNoLabels(b *testing.B) {
- m := NewCounter(CounterOpts{
- Name: "benchmark_counter",
- Help: "A counter to benchmark it.",
- })
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.Inc()
- }
-}
-
-func BenchmarkGaugeWithLabelValues(b *testing.B) {
- m := NewGaugeVec(
- GaugeOpts{
- Name: "benchmark_gauge",
- Help: "A gauge to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.WithLabelValues("eins", "zwei", "drei").Set(3.1415)
- }
-}
-
-func BenchmarkGaugeNoLabels(b *testing.B) {
- m := NewGauge(GaugeOpts{
- Name: "benchmark_gauge",
- Help: "A gauge to benchmark it.",
- })
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.Set(3.1415)
- }
-}
-
-func BenchmarkSummaryWithLabelValues(b *testing.B) {
- m := NewSummaryVec(
- SummaryOpts{
- Name: "benchmark_summary",
- Help: "A summary to benchmark it.",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.WithLabelValues("eins", "zwei", "drei").Observe(3.1415)
- }
-}
-
-func BenchmarkSummaryNoLabels(b *testing.B) {
- m := NewSummary(SummaryOpts{
- Name: "benchmark_summary",
- Help: "A summary to benchmark it.",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.Observe(3.1415)
- }
-}
-
-func BenchmarkHistogramWithLabelValues(b *testing.B) {
- m := NewHistogramVec(
- HistogramOpts{
- Name: "benchmark_histogram",
- Help: "A histogram to benchmark it.",
- },
- []string{"one", "two", "three"},
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.WithLabelValues("eins", "zwei", "drei").Observe(3.1415)
- }
-}
-
-func BenchmarkHistogramNoLabels(b *testing.B) {
- m := NewHistogram(HistogramOpts{
- Name: "benchmark_histogram",
- Help: "A histogram to benchmark it.",
- },
- )
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- m.Observe(3.1415)
- }
-}
-
-func BenchmarkParallelCounter(b *testing.B) {
- c := NewCounter(CounterOpts{
- Name: "benchmark_counter",
- Help: "A Counter to benchmark it.",
- })
- b.ReportAllocs()
- b.ResetTimer()
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- c.Inc()
- }
- })
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go
index 765e4550c..ee37949ad 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go
@@ -15,10 +15,6 @@ package prometheus
import (
"errors"
- "math"
- "sync/atomic"
-
- dto "github.com/prometheus/client_model/go"
)
// Counter is a Metric that represents a single numerical value that only ever
@@ -34,8 +30,16 @@ type Counter interface {
Metric
Collector
- // Inc increments the counter by 1. Use Add to increment it by arbitrary
- // non-negative values.
+ // Set is used to set the Counter to an arbitrary value. It is only used
+ // if you have to transfer a value from an external counter into this
+ // Prometheus metric. Do not use it for regular handling of a
+ // Prometheus counter (as it can be used to break the contract of
+ // monotonically increasing values).
+ //
+ // Deprecated: Use NewConstMetric to create a counter for an external
+ // value. A Counter should never be set.
+ Set(float64)
+ // Inc increments the counter by 1.
Inc()
// Add adds the given value to the counter. It panics if the value is <
// 0.
@@ -46,14 +50,6 @@ type Counter interface {
type CounterOpts Opts
// NewCounter creates a new Counter based on the provided CounterOpts.
-//
-// The returned implementation tracks the counter value in two separate
-// variables, a float64 and a uint64. The latter is used to track calls of the
-// Inc method and calls of the Add method with a value that can be represented
-// as a uint64. This allows atomic increments of the counter with optimal
-// performance. (It is common to have an Inc call in very hot execution paths.)
-// Both internal tracking values are added up in the Write method. This has to
-// be taken into account when it comes to precision and overflow behavior.
func NewCounter(opts CounterOpts) Counter {
desc := NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
@@ -61,58 +57,20 @@ func NewCounter(opts CounterOpts) Counter {
nil,
opts.ConstLabels,
)
- result := &counter{desc: desc, labelPairs: desc.constLabelPairs}
+ result := &counter{value: value{desc: desc, valType: CounterValue, labelPairs: desc.constLabelPairs}}
result.init(result) // Init self-collection.
return result
}
type counter struct {
- // valBits contains the bits of the represented float64 value, while
- // valInt stores values that are exact integers. Both have to go first
- // in the struct to guarantee alignment for atomic operations.
- // http://golang.org/pkg/sync/atomic/#pkg-note-BUG
- valBits uint64
- valInt uint64
-
- selfCollector
- desc *Desc
-
- labelPairs []*dto.LabelPair
-}
-
-func (c *counter) Desc() *Desc {
- return c.desc
+ value
}
func (c *counter) Add(v float64) {
if v < 0 {
panic(errors.New("counter cannot decrease in value"))
}
- ival := uint64(v)
- if float64(ival) == v {
- atomic.AddUint64(&c.valInt, ival)
- return
- }
-
- for {
- oldBits := atomic.LoadUint64(&c.valBits)
- newBits := math.Float64bits(math.Float64frombits(oldBits) + v)
- if atomic.CompareAndSwapUint64(&c.valBits, oldBits, newBits) {
- return
- }
- }
-}
-
-func (c *counter) Inc() {
- atomic.AddUint64(&c.valInt, 1)
-}
-
-func (c *counter) Write(out *dto.Metric) error {
- fval := math.Float64frombits(atomic.LoadUint64(&c.valBits))
- ival := atomic.LoadUint64(&c.valInt)
- val := fval + float64(ival)
-
- return populateMetric(CounterValue, val, c.labelPairs, out)
+ c.value.Add(v)
}
// CounterVec is a Collector that bundles a set of Counters that all share the
@@ -120,12 +78,16 @@ func (c *counter) Write(out *dto.Metric) error {
// if you want to count the same thing partitioned by various dimensions
// (e.g. number of HTTP requests, partitioned by response code and
// method). Create instances with NewCounterVec.
+//
+// CounterVec embeds MetricVec. See there for a full list of methods with
+// detailed documentation.
type CounterVec struct {
- *metricVec
+ *MetricVec
}
// NewCounterVec creates a new CounterVec based on the provided CounterOpts and
-// partitioned by the given label names.
+// partitioned by the given label names. At least one label name must be
+// provided.
func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec {
desc := NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
@@ -134,62 +96,34 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec {
opts.ConstLabels,
)
return &CounterVec{
- metricVec: newMetricVec(desc, func(lvs ...string) Metric {
- if len(lvs) != len(desc.variableLabels) {
- panic(errInconsistentCardinality)
- }
- result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs)}
+ MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
+ result := &counter{value: value{
+ desc: desc,
+ valType: CounterValue,
+ labelPairs: makeLabelPairs(desc, lvs),
+ }}
result.init(result) // Init self-collection.
return result
}),
}
}
-// GetMetricWithLabelValues returns the Counter for the given slice of label
-// values (same order as the VariableLabels in Desc). If that combination of
-// label values is accessed for the first time, a new Counter is created.
-//
-// It is possible to call this method without using the returned Counter to only
-// create the new Counter but leave it at its starting value 0. See also the
-// SummaryVec example.
-//
-// Keeping the Counter for later use is possible (and should be considered if
-// performance is critical), but keep in mind that Reset, DeleteLabelValues and
-// Delete can be used to delete the Counter from the CounterVec. In that case,
-// the Counter will still exist, but it will not be exported anymore, even if a
-// Counter with the same label values is created later.
-//
-// An error is returned if the number of label values is not the same as the
-// number of VariableLabels in Desc (minus any curried labels).
-//
-// Note that for more than one label value, this method is prone to mistakes
-// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as
-// an alternative to avoid that type of mistake. For higher label numbers, the
-// latter has a much more readable (albeit more verbose) syntax, but it comes
-// with a performance overhead (for creating and processing the Labels map).
-// See also the GaugeVec example.
-func (v *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) {
- metric, err := v.metricVec.getMetricWithLabelValues(lvs...)
+// GetMetricWithLabelValues replaces the method of the same name in
+// MetricVec. The difference is that this method returns a Counter and not a
+// Metric so that no type conversion is required.
+func (m *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) {
+ metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
if metric != nil {
return metric.(Counter), err
}
return nil, err
}
-// GetMetricWith returns the Counter for the given Labels map (the label names
-// must match those of the VariableLabels in Desc). If that label map is
-// accessed for the first time, a new Counter is created. Implications of
-// creating a Counter without using it and keeping the Counter for later use are
-// the same as for GetMetricWithLabelValues.
-//
-// An error is returned if the number and names of the Labels are inconsistent
-// with those of the VariableLabels in Desc (minus any curried labels).
-//
-// This method is used for the same purpose as
-// GetMetricWithLabelValues(...string). See there for pros and cons of the two
-// methods.
-func (v *CounterVec) GetMetricWith(labels Labels) (Counter, error) {
- metric, err := v.metricVec.getMetricWith(labels)
+// GetMetricWith replaces the method of the same name in MetricVec. The
+// difference is that this method returns a Counter and not a Metric so that no
+// type conversion is required.
+func (m *CounterVec) GetMetricWith(labels Labels) (Counter, error) {
+ metric, err := m.MetricVec.GetMetricWith(labels)
if metric != nil {
return metric.(Counter), err
}
@@ -197,57 +131,18 @@ func (v *CounterVec) GetMetricWith(labels Labels) (Counter, error) {
}
// WithLabelValues works as GetMetricWithLabelValues, but panics where
-// GetMetricWithLabelValues would have returned an error. Not returning an
-// error allows shortcuts like
+// GetMetricWithLabelValues would have returned an error. By not returning an
+// error, WithLabelValues allows shortcuts like
// myVec.WithLabelValues("404", "GET").Add(42)
-func (v *CounterVec) WithLabelValues(lvs ...string) Counter {
- c, err := v.GetMetricWithLabelValues(lvs...)
- if err != nil {
- panic(err)
- }
- return c
+func (m *CounterVec) WithLabelValues(lvs ...string) Counter {
+ return m.MetricVec.WithLabelValues(lvs...).(Counter)
}
// With works as GetMetricWith, but panics where GetMetricWithLabels would have
-// returned an error. Not returning an error allows shortcuts like
-// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42)
-func (v *CounterVec) With(labels Labels) Counter {
- c, err := v.GetMetricWith(labels)
- if err != nil {
- panic(err)
- }
- return c
-}
-
-// CurryWith returns a vector curried with the provided labels, i.e. the
-// returned vector has those labels pre-set for all labeled operations performed
-// on it. The cardinality of the curried vector is reduced accordingly. The
-// order of the remaining labels stays the same (just with the curried labels
-// taken out of the sequence – which is relevant for the
-// (GetMetric)WithLabelValues methods). It is possible to curry a curried
-// vector, but only with labels not yet used for currying before.
-//
-// The metrics contained in the CounterVec are shared between the curried and
-// uncurried vectors. They are just accessed differently. Curried and uncurried
-// vectors behave identically in terms of collection. Only one must be
-// registered with a given registry (usually the uncurried version). The Reset
-// method deletes all metrics, even if called on a curried vector.
-func (v *CounterVec) CurryWith(labels Labels) (*CounterVec, error) {
- vec, err := v.curryWith(labels)
- if vec != nil {
- return &CounterVec{vec}, err
- }
- return nil, err
-}
-
-// MustCurryWith works as CurryWith but panics where CurryWith would have
-// returned an error.
-func (v *CounterVec) MustCurryWith(labels Labels) *CounterVec {
- vec, err := v.CurryWith(labels)
- if err != nil {
- panic(err)
- }
- return vec
+// returned an error. By not returning an error, With allows shortcuts like
+// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42)
+func (m *CounterVec) With(labels Labels) Counter {
+ return m.MetricVec.With(labels).(Counter)
}
// CounterFunc is a Counter whose value is determined at collect time by calling a
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go b/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go
deleted file mode 100644
index 5062f51af..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "fmt"
- "math"
- "testing"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func TestCounterAdd(t *testing.T) {
- counter := NewCounter(CounterOpts{
- Name: "test",
- Help: "test help",
- ConstLabels: Labels{"a": "1", "b": "2"},
- }).(*counter)
- counter.Inc()
- if expected, got := 0.0, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("Expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(1), counter.valInt; expected != got {
- t.Errorf("Expected %d, got %d.", expected, got)
- }
- counter.Add(42)
- if expected, got := 0.0, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("Expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(43), counter.valInt; expected != got {
- t.Errorf("Expected %d, got %d.", expected, got)
- }
-
- counter.Add(24.42)
- if expected, got := 24.42, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("Expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(43), counter.valInt; expected != got {
- t.Errorf("Expected %d, got %d.", expected, got)
- }
-
- if expected, got := "counter cannot decrease in value", decreaseCounter(counter).Error(); expected != got {
- t.Errorf("Expected error %q, got %q.", expected, got)
- }
-
- m := &dto.Metric{}
- counter.Write(m)
-
- if expected, got := `label:<name:"a" value:"1" > label:<name:"b" value:"2" > counter:<value:67.42 > `, m.String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func decreaseCounter(c *counter) (err error) {
- defer func() {
- if e := recover(); e != nil {
- err = e.(error)
- }
- }()
- c.Add(-1)
- return nil
-}
-
-func TestCounterVecGetMetricWithInvalidLabelValues(t *testing.T) {
- testCases := []struct {
- desc string
- labels Labels
- }{
- {
- desc: "non utf8 label value",
- labels: Labels{"a": "\xFF"},
- },
- {
- desc: "not enough label values",
- labels: Labels{},
- },
- {
- desc: "too many label values",
- labels: Labels{"a": "1", "b": "2"},
- },
- }
-
- for _, test := range testCases {
- counterVec := NewCounterVec(CounterOpts{
- Name: "test",
- }, []string{"a"})
-
- labelValues := make([]string, len(test.labels))
- for _, val := range test.labels {
- labelValues = append(labelValues, val)
- }
-
- expectPanic(t, func() {
- counterVec.WithLabelValues(labelValues...)
- }, fmt.Sprintf("WithLabelValues: expected panic because: %s", test.desc))
- expectPanic(t, func() {
- counterVec.With(test.labels)
- }, fmt.Sprintf("WithLabelValues: expected panic because: %s", test.desc))
-
- if _, err := counterVec.GetMetricWithLabelValues(labelValues...); err == nil {
- t.Errorf("GetMetricWithLabelValues: expected error because: %s", test.desc)
- }
- if _, err := counterVec.GetMetricWith(test.labels); err == nil {
- t.Errorf("GetMetricWith: expected error because: %s", test.desc)
- }
- }
-}
-
-func expectPanic(t *testing.T, op func(), errorMsg string) {
- defer func() {
- if err := recover(); err == nil {
- t.Error(errorMsg)
- }
- }()
-
- op()
-}
-
-func TestCounterAddInf(t *testing.T) {
- counter := NewCounter(CounterOpts{
- Name: "test",
- Help: "test help",
- }).(*counter)
-
- counter.Inc()
- if expected, got := 0.0, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("Expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(1), counter.valInt; expected != got {
- t.Errorf("Expected %d, got %d.", expected, got)
- }
-
- counter.Add(math.Inf(1))
- if expected, got := math.Inf(1), math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("valBits expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(1), counter.valInt; expected != got {
- t.Errorf("valInts expected %d, got %d.", expected, got)
- }
-
- counter.Inc()
- if expected, got := math.Inf(1), math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("Expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(2), counter.valInt; expected != got {
- t.Errorf("Expected %d, got %d.", expected, got)
- }
-
- m := &dto.Metric{}
- counter.Write(m)
-
- if expected, got := `counter:<value:inf > `, m.String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func TestCounterAddLarge(t *testing.T) {
- counter := NewCounter(CounterOpts{
- Name: "test",
- Help: "test help",
- }).(*counter)
-
- // large overflows the underlying type and should therefore be stored in valBits.
- large := float64(math.MaxUint64 + 1)
- counter.Add(large)
- if expected, got := large, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("valBits expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(0), counter.valInt; expected != got {
- t.Errorf("valInts expected %d, got %d.", expected, got)
- }
-
- m := &dto.Metric{}
- counter.Write(m)
-
- if expected, got := fmt.Sprintf("counter:<value:%0.16e > ", large), m.String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func TestCounterAddSmall(t *testing.T) {
- counter := NewCounter(CounterOpts{
- Name: "test",
- Help: "test help",
- }).(*counter)
- small := 0.000000000001
- counter.Add(small)
- if expected, got := small, math.Float64frombits(counter.valBits); expected != got {
- t.Errorf("valBits expected %f, got %f.", expected, got)
- }
- if expected, got := uint64(0), counter.valInt; expected != got {
- t.Errorf("valInts expected %d, got %d.", expected, got)
- }
-
- m := &dto.Metric{}
- counter.Write(m)
-
- if expected, got := fmt.Sprintf("counter:<value:%0.0e > ", small), m.String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go
index 4a755b0fa..77f4b30e8 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go
@@ -16,15 +16,33 @@ package prometheus
import (
"errors"
"fmt"
+ "regexp"
"sort"
"strings"
"github.com/golang/protobuf/proto"
- "github.com/prometheus/common/model"
dto "github.com/prometheus/client_model/go"
)
+var (
+ metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`)
+ labelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$")
+)
+
+// reservedLabelPrefix is a prefix which is not legal in user-supplied
+// label names.
+const reservedLabelPrefix = "__"
+
+// Labels represents a collection of label name -> value mappings. This type is
+// commonly used with the With(Labels) and GetMetricWith(Labels) methods of
+// metric vector Collectors, e.g.:
+// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42)
+//
+// The other use-case is the specification of constant label pairs in Opts or to
+// create a Desc.
+type Labels map[string]string
+
// Desc is the descriptor used by every Prometheus Metric. It is essentially
// the immutable meta-data of a Metric. The normal Metric implementations
// included in this package manage their Desc under the hood. Users only have to
@@ -60,7 +78,7 @@ type Desc struct {
// Help string. Each Desc with the same fqName must have the same
// dimHash.
dimHash uint64
- // err is an error that occurred during construction. It is reported on
+ // err is an error that occured during construction. It is reported on
// registration time.
err error
}
@@ -73,7 +91,8 @@ type Desc struct {
// and therefore not part of the Desc. (They are managed within the Metric.)
//
// For constLabels, the label values are constant. Therefore, they are fully
-// specified in the Desc. See the Collector example for a usage pattern.
+// specified in the Desc. See the Opts documentation for the implications of
+// constant labels.
func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *Desc {
d := &Desc{
fqName: fqName,
@@ -84,7 +103,7 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *
d.err = errors.New("empty help string")
return d
}
- if !model.IsValidMetricName(model.LabelValue(fqName)) {
+ if !metricNameRE.MatchString(fqName) {
d.err = fmt.Errorf("%q is not a valid metric name", fqName)
return d
}
@@ -108,12 +127,6 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *
for _, labelName := range labelNames {
labelValues = append(labelValues, constLabels[labelName])
}
- // Validate the const label values. They can't have a wrong cardinality, so
- // use in len(labelValues) as expectedNumberOfValues.
- if err := validateLabelValues(labelValues, len(labelValues)); err != nil {
- d.err = err
- return d
- }
// Now add the variable label names, but prefix them with something that
// cannot be in a regular label name. That prevents matching the label
// dimension with a different mix between preset and variable labels.
@@ -129,7 +142,6 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *
d.err = errors.New("duplicate label names")
return d
}
-
vh := hashNew()
for _, val := range labelValues {
vh = hashAdd(vh, val)
@@ -186,3 +198,8 @@ func (d *Desc) String() string {
d.variableLabels,
)
}
+
+func checkLabelName(l string) bool {
+ return labelNameRE.MatchString(l) &&
+ !strings.HasPrefix(l, reservedLabelPrefix)
+}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc_test.go b/vendor/github.com/prometheus/client_golang/prometheus/desc_test.go
deleted file mode 100644
index 2f962652c..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/desc_test.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package prometheus
-
-import (
- "testing"
-)
-
-func TestNewDescInvalidLabelValues(t *testing.T) {
- desc := NewDesc(
- "sample_label",
- "sample label",
- nil,
- Labels{"a": "\xFF"},
- )
- if desc.err == nil {
- t.Errorf("NewDesc: expected error because: %s", desc.err)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go
index f727c991d..b15a2d3b9 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/doc.go
@@ -11,13 +11,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package prometheus is the core instrumentation package. It provides metrics
-// primitives to instrument code for monitoring. It also offers a registry for
-// metrics. Sub-packages allow to expose the registered metrics via HTTP
-// (package promhttp) or push them to a Pushgateway (package push).
+// Package prometheus provides metrics primitives to instrument code for
+// monitoring. It also offers a registry for metrics. Sub-packages allow to
+// expose the registered metrics via HTTP (package promhttp) or push them to a
+// Pushgateway (package push).
//
// All exported functions and methods are safe to be used concurrently unless
-// specified otherwise.
+//specified otherwise.
//
// A Basic Example
//
@@ -26,7 +26,6 @@
// package main
//
// import (
-// "log"
// "net/http"
//
// "github.com/prometheus/client_golang/prometheus"
@@ -60,7 +59,7 @@
// // The Handler function provides a default handler to expose metrics
// // via an HTTP server. "/metrics" is the usual endpoint for that.
// http.Handle("/metrics", promhttp.Handler())
-// log.Fatal(http.ListenAndServe(":8080", nil))
+// http.ListenAndServe(":8080", nil)
// }
//
//
@@ -70,7 +69,7 @@
// Metrics
//
// The number of exported identifiers in this package might appear a bit
-// overwhelming. However, in addition to the basic plumbing shown in the example
+// overwhelming. Hovever, in addition to the basic plumbing shown in the example
// above, you only need to understand the different metric types and their
// vector versions for basic usage.
//
@@ -96,8 +95,8 @@
// SummaryVec, HistogramVec, and UntypedVec are not.
//
// To create instances of Metrics and their vector versions, you need a suitable
-// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, HistogramOpts, or
-// UntypedOpts.
+// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts,
+// HistogramOpts, or UntypedOpts.
//
// Custom Collectors and constant Metrics
//
@@ -115,8 +114,8 @@
// Metric instances “on the fly†using NewConstMetric, NewConstHistogram, and
// NewConstSummary (and their respective Must… versions). That will happen in
// the Collect method. The Describe method has to return separate Desc
-// instances, representative of the “throw-away†metrics to be created later.
-// NewDesc comes in handy to create those Desc instances.
+// instances, representative of the “throw-away†metrics to be created
+// later. NewDesc comes in handy to create those Desc instances.
//
// The Collector example illustrates the use case. You can also look at the
// source code of the processCollector (mirroring process metrics), the
@@ -130,34 +129,34 @@
// Advanced Uses of the Registry
//
// While MustRegister is the by far most common way of registering a Collector,
-// sometimes you might want to handle the errors the registration might cause.
-// As suggested by the name, MustRegister panics if an error occurs. With the
-// Register function, the error is returned and can be handled.
+// sometimes you might want to handle the errors the registration might
+// cause. As suggested by the name, MustRegister panics if an error occurs. With
+// the Register function, the error is returned and can be handled.
//
// An error is returned if the registered Collector is incompatible or
// inconsistent with already registered metrics. The registry aims for
-// consistency of the collected metrics according to the Prometheus data model.
-// Inconsistencies are ideally detected at registration time, not at collect
-// time. The former will usually be detected at start-up time of a program,
-// while the latter will only happen at scrape time, possibly not even on the
-// first scrape if the inconsistency only becomes relevant later. That is the
-// main reason why a Collector and a Metric have to describe themselves to the
-// registry.
+// consistency of the collected metrics according to the Prometheus data
+// model. Inconsistencies are ideally detected at registration time, not at
+// collect time. The former will usually be detected at start-up time of a
+// program, while the latter will only happen at scrape time, possibly not even
+// on the first scrape if the inconsistency only becomes relevant later. That is
+// the main reason why a Collector and a Metric have to describe themselves to
+// the registry.
//
// So far, everything we did operated on the so-called default registry, as it
-// can be found in the global DefaultRegisterer variable. With NewRegistry, you
+// can be found in the global DefaultRegistry variable. With NewRegistry, you
// can create a custom registry, or you can even implement the Registerer or
-// Gatherer interfaces yourself. The methods Register and Unregister work in the
-// same way on a custom registry as the global functions Register and Unregister
-// on the default registry.
-//
-// There are a number of uses for custom registries: You can use registries with
-// special properties, see NewPedanticRegistry. You can avoid global state, as
-// it is imposed by the DefaultRegisterer. You can use multiple registries at
-// the same time to expose different metrics in different ways. You can use
+// Gatherer interfaces yourself. The methods Register and Unregister work in
+// the same way on a custom registry as the global functions Register and
+// Unregister on the default registry.
+//
+// There are a number of uses for custom registries: You can use registries
+// with special properties, see NewPedanticRegistry. You can avoid global state,
+// as it is imposed by the DefaultRegistry. You can use multiple registries at
+// the same time to expose different metrics in different ways. You can use
// separate registries for testing purposes.
//
-// Also note that the DefaultRegisterer comes registered with a Collector for Go
+// Also note that the DefaultRegistry comes registered with a Collector for Go
// runtime metrics (via NewGoCollector) and a Collector for process metrics (via
// NewProcessCollector). With a custom registry, you are in control and decide
// yourself about the Collectors to register.
@@ -167,20 +166,16 @@
// The Registry implements the Gatherer interface. The caller of the Gather
// method can then expose the gathered metrics in some way. Usually, the metrics
// are served via HTTP on the /metrics endpoint. That's happening in the example
-// above. The tools to expose metrics via HTTP are in the promhttp sub-package.
-// (The top-level functions in the prometheus package are deprecated.)
+// above. The tools to expose metrics via HTTP are in the promhttp
+// sub-package. (The top-level functions in the prometheus package are
+// deprecated.)
//
// Pushing to the Pushgateway
//
// Function for pushing to the Pushgateway can be found in the push sub-package.
//
-// Graphite Bridge
-//
-// Functions and examples to push metrics from a Gatherer to Graphite can be
-// found in the graphite sub-package.
-//
// Other Means of Exposition
//
-// More ways of exposing metrics can easily be added by following the approaches
-// of the existing implementations.
+// More ways of exposing metrics can easily be added. Sending metrics to
+// Graphite would be an example that will soon be implemented.
package prometheus
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go b/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go
deleted file mode 100644
index 260c1b52d..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import "github.com/prometheus/client_golang/prometheus"
-
-// ClusterManager is an example for a system that might have been built without
-// Prometheus in mind. It models a central manager of jobs running in a
-// cluster. To turn it into something that collects Prometheus metrics, we
-// simply add the two methods required for the Collector interface.
-//
-// An additional challenge is that multiple instances of the ClusterManager are
-// run within the same binary, each in charge of a different zone. We need to
-// make use of ConstLabels to be able to register each ClusterManager instance
-// with Prometheus.
-type ClusterManager struct {
- Zone string
- OOMCountDesc *prometheus.Desc
- RAMUsageDesc *prometheus.Desc
- // ... many more fields
-}
-
-// ReallyExpensiveAssessmentOfTheSystemState is a mock for the data gathering a
-// real cluster manager would have to do. Since it may actually be really
-// expensive, it must only be called once per collection. This implementation,
-// obviously, only returns some made-up data.
-func (c *ClusterManager) ReallyExpensiveAssessmentOfTheSystemState() (
- oomCountByHost map[string]int, ramUsageByHost map[string]float64,
-) {
- // Just example fake data.
- oomCountByHost = map[string]int{
- "foo.example.org": 42,
- "bar.example.org": 2001,
- }
- ramUsageByHost = map[string]float64{
- "foo.example.org": 6.023e23,
- "bar.example.org": 3.14,
- }
- return
-}
-
-// Describe simply sends the two Descs in the struct to the channel.
-func (c *ClusterManager) Describe(ch chan<- *prometheus.Desc) {
- ch <- c.OOMCountDesc
- ch <- c.RAMUsageDesc
-}
-
-// Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState. Then it
-// creates constant metrics for each host on the fly based on the returned data.
-//
-// Note that Collect could be called concurrently, so we depend on
-// ReallyExpensiveAssessmentOfTheSystemState to be concurrency-safe.
-func (c *ClusterManager) Collect(ch chan<- prometheus.Metric) {
- oomCountByHost, ramUsageByHost := c.ReallyExpensiveAssessmentOfTheSystemState()
- for host, oomCount := range oomCountByHost {
- ch <- prometheus.MustNewConstMetric(
- c.OOMCountDesc,
- prometheus.CounterValue,
- float64(oomCount),
- host,
- )
- }
- for host, ramUsage := range ramUsageByHost {
- ch <- prometheus.MustNewConstMetric(
- c.RAMUsageDesc,
- prometheus.GaugeValue,
- ramUsage,
- host,
- )
- }
-}
-
-// NewClusterManager creates the two Descs OOMCountDesc and RAMUsageDesc. Note
-// that the zone is set as a ConstLabel. (It's different in each instance of the
-// ClusterManager, but constant over the lifetime of an instance.) Then there is
-// a variable label "host", since we want to partition the collected metrics by
-// host. Since all Descs created in this way are consistent across instances,
-// with a guaranteed distinction by the "zone" label, we can register different
-// ClusterManager instances with the same registry.
-func NewClusterManager(zone string) *ClusterManager {
- return &ClusterManager{
- Zone: zone,
- OOMCountDesc: prometheus.NewDesc(
- "clustermanager_oom_crashes_total",
- "Number of OOM crashes.",
- []string{"host"},
- prometheus.Labels{"zone": zone},
- ),
- RAMUsageDesc: prometheus.NewDesc(
- "clustermanager_ram_usage_bytes",
- "RAM usage as reported to the cluster manager.",
- []string{"host"},
- prometheus.Labels{"zone": zone},
- ),
- }
-}
-
-func ExampleCollector() {
- workerDB := NewClusterManager("db")
- workerCA := NewClusterManager("ca")
-
- // Since we are dealing with custom Collector implementations, it might
- // be a good idea to try it out with a pedantic registry.
- reg := prometheus.NewPedanticRegistry()
- reg.MustRegister(workerDB)
- reg.MustRegister(workerCA)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_complex_test.go b/vendor/github.com/prometheus/client_golang/prometheus/example_timer_complex_test.go
deleted file mode 100644
index c5e7de5e5..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_complex_test.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import (
- "net/http"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-var (
- // apiRequestDuration tracks the duration separate for each HTTP status
- // class (1xx, 2xx, ...). This creates a fair amount of time series on
- // the Prometheus server. Usually, you would track the duration of
- // serving HTTP request without partitioning by outcome. Do something
- // like this only if needed. Also note how only status classes are
- // tracked, not every single status code. The latter would create an
- // even larger amount of time series. Request counters partitioned by
- // status code are usually OK as each counter only creates one time
- // series. Histograms are way more expensive, so partition with care and
- // only where you really need separate latency tracking. Partitioning by
- // status class is only an example. In concrete cases, other partitions
- // might make more sense.
- apiRequestDuration = prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "api_request_duration_seconds",
- Help: "Histogram for the request duration of the public API, partitioned by status class.",
- Buckets: prometheus.ExponentialBuckets(0.1, 1.5, 5),
- },
- []string{"status_class"},
- )
-)
-
-func handler(w http.ResponseWriter, r *http.Request) {
- status := http.StatusOK
- // The ObserverFunc gets called by the deferred ObserveDuration and
- // decides which Histogram's Observe method is called.
- timer := prometheus.NewTimer(prometheus.ObserverFunc(func(v float64) {
- switch {
- case status >= 500: // Server error.
- apiRequestDuration.WithLabelValues("5xx").Observe(v)
- case status >= 400: // Client error.
- apiRequestDuration.WithLabelValues("4xx").Observe(v)
- case status >= 300: // Redirection.
- apiRequestDuration.WithLabelValues("3xx").Observe(v)
- case status >= 200: // Success.
- apiRequestDuration.WithLabelValues("2xx").Observe(v)
- default: // Informational.
- apiRequestDuration.WithLabelValues("1xx").Observe(v)
- }
- }))
- defer timer.ObserveDuration()
-
- // Handle the request. Set status accordingly.
- // ...
-}
-
-func ExampleTimer_complex() {
- http.HandleFunc("/api", handler)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_gauge_test.go b/vendor/github.com/prometheus/client_golang/prometheus/example_timer_gauge_test.go
deleted file mode 100644
index 7184a0d1d..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_gauge_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import (
- "os"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-var (
- // If a function is called rarely (i.e. not more often than scrapes
- // happen) or ideally only once (like in a batch job), it can make sense
- // to use a Gauge for timing the function call. For timing a batch job
- // and pushing the result to a Pushgateway, see also the comprehensive
- // example in the push package.
- funcDuration = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "example_function_duration_seconds",
- Help: "Duration of the last call of an example function.",
- })
-)
-
-func run() error {
- // The Set method of the Gauge is used to observe the duration.
- timer := prometheus.NewTimer(prometheus.ObserverFunc(funcDuration.Set))
- defer timer.ObserveDuration()
-
- // Do something. Return errors as encountered. The use of 'defer' above
- // makes sure the function is still timed properly.
- return nil
-}
-
-func ExampleTimer_gauge() {
- if err := run(); err != nil {
- os.Exit(1)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_test.go b/vendor/github.com/prometheus/client_golang/prometheus/example_timer_test.go
deleted file mode 100644
index bd86bb472..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/example_timer_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import (
- "math/rand"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-var (
- requestDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
- Name: "example_request_duration_seconds",
- Help: "Histogram for the runtime of a simple example function.",
- Buckets: prometheus.LinearBuckets(0.01, 0.01, 10),
- })
-)
-
-func ExampleTimer() {
- // timer times this example function. It uses a Histogram, but a Summary
- // would also work, as both implement Observer. Check out
- // https://prometheus.io/docs/practices/histograms/ for differences.
- timer := prometheus.NewTimer(requestDuration)
- defer timer.ObserveDuration()
-
- // Do something here that takes time.
- time.Sleep(time.Duration(rand.NormFloat64()*10000+50000) * time.Microsecond)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go b/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go
deleted file mode 100644
index 45f60650f..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go
+++ /dev/null
@@ -1,754 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import (
- "bytes"
- "fmt"
- "math"
- "net/http"
- "runtime"
- "sort"
- "strings"
-
- dto "github.com/prometheus/client_model/go"
- "github.com/prometheus/common/expfmt"
-
- "github.com/golang/protobuf/proto"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func ExampleGauge() {
- opsQueued := prometheus.NewGauge(prometheus.GaugeOpts{
- Namespace: "our_company",
- Subsystem: "blob_storage",
- Name: "ops_queued",
- Help: "Number of blob storage operations waiting to be processed.",
- })
- prometheus.MustRegister(opsQueued)
-
- // 10 operations queued by the goroutine managing incoming requests.
- opsQueued.Add(10)
- // A worker goroutine has picked up a waiting operation.
- opsQueued.Dec()
- // And once more...
- opsQueued.Dec()
-}
-
-func ExampleGaugeVec() {
- opsQueued := prometheus.NewGaugeVec(
- prometheus.GaugeOpts{
- Namespace: "our_company",
- Subsystem: "blob_storage",
- Name: "ops_queued",
- Help: "Number of blob storage operations waiting to be processed, partitioned by user and type.",
- },
- []string{
- // Which user has requested the operation?
- "user",
- // Of what type is the operation?
- "type",
- },
- )
- prometheus.MustRegister(opsQueued)
-
- // Increase a value using compact (but order-sensitive!) WithLabelValues().
- opsQueued.WithLabelValues("bob", "put").Add(4)
- // Increase a value with a map using WithLabels. More verbose, but order
- // doesn't matter anymore.
- opsQueued.With(prometheus.Labels{"type": "delete", "user": "alice"}).Inc()
-}
-
-func ExampleGaugeFunc() {
- if err := prometheus.Register(prometheus.NewGaugeFunc(
- prometheus.GaugeOpts{
- Subsystem: "runtime",
- Name: "goroutines_count",
- Help: "Number of goroutines that currently exist.",
- },
- func() float64 { return float64(runtime.NumGoroutine()) },
- )); err == nil {
- fmt.Println("GaugeFunc 'goroutines_count' registered.")
- }
- // Note that the count of goroutines is a gauge (and not a counter) as
- // it can go up and down.
-
- // Output:
- // GaugeFunc 'goroutines_count' registered.
-}
-
-func ExampleCounter() {
- pushCounter := prometheus.NewCounter(prometheus.CounterOpts{
- Name: "repository_pushes", // Note: No help string...
- })
- err := prometheus.Register(pushCounter) // ... so this will return an error.
- if err != nil {
- fmt.Println("Push counter couldn't be registered, no counting will happen:", err)
- return
- }
-
- // Try it once more, this time with a help string.
- pushCounter = prometheus.NewCounter(prometheus.CounterOpts{
- Name: "repository_pushes",
- Help: "Number of pushes to external repository.",
- })
- err = prometheus.Register(pushCounter)
- if err != nil {
- fmt.Println("Push counter couldn't be registered AGAIN, no counting will happen:", err)
- return
- }
-
- pushComplete := make(chan struct{})
- // TODO: Start a goroutine that performs repository pushes and reports
- // each completion via the channel.
- for range pushComplete {
- pushCounter.Inc()
- }
- // Output:
- // Push counter couldn't be registered, no counting will happen: descriptor Desc{fqName: "repository_pushes", help: "", constLabels: {}, variableLabels: []} is invalid: empty help string
-}
-
-func ExampleCounterVec() {
- httpReqs := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "http_requests_total",
- Help: "How many HTTP requests processed, partitioned by status code and HTTP method.",
- },
- []string{"code", "method"},
- )
- prometheus.MustRegister(httpReqs)
-
- httpReqs.WithLabelValues("404", "POST").Add(42)
-
- // If you have to access the same set of labels very frequently, it
- // might be good to retrieve the metric only once and keep a handle to
- // it. But beware of deletion of that metric, see below!
- m := httpReqs.WithLabelValues("200", "GET")
- for i := 0; i < 1000000; i++ {
- m.Inc()
- }
- // Delete a metric from the vector. If you have previously kept a handle
- // to that metric (as above), future updates via that handle will go
- // unseen (even if you re-create a metric with the same label set
- // later).
- httpReqs.DeleteLabelValues("200", "GET")
- // Same thing with the more verbose Labels syntax.
- httpReqs.Delete(prometheus.Labels{"method": "GET", "code": "200"})
-}
-
-func ExampleInstrumentHandler() {
- // Handle the "/doc" endpoint with the standard http.FileServer handler.
- // By wrapping the handler with InstrumentHandler, request count,
- // request and response sizes, and request latency are automatically
- // exported to Prometheus, partitioned by HTTP status code and method
- // and by the handler name (here "fileserver").
- http.Handle("/doc", prometheus.InstrumentHandler(
- "fileserver", http.FileServer(http.Dir("/usr/share/doc")),
- ))
- // The Prometheus handler still has to be registered to handle the
- // "/metrics" endpoint. The handler returned by prometheus.Handler() is
- // already instrumented - with "prometheus" as the handler name. In this
- // example, we want the handler name to be "metrics", so we instrument
- // the uninstrumented Prometheus handler ourselves.
- http.Handle("/metrics", prometheus.InstrumentHandler(
- "metrics", prometheus.UninstrumentedHandler(),
- ))
-}
-
-func ExampleLabelPairSorter() {
- labelPairs := []*dto.LabelPair{
- {Name: proto.String("status"), Value: proto.String("404")},
- {Name: proto.String("method"), Value: proto.String("get")},
- }
-
- sort.Sort(prometheus.LabelPairSorter(labelPairs))
-
- fmt.Println(labelPairs)
- // Output:
- // [name:"method" value:"get" name:"status" value:"404" ]
-}
-
-func ExampleRegister() {
- // Imagine you have a worker pool and want to count the tasks completed.
- taskCounter := prometheus.NewCounter(prometheus.CounterOpts{
- Subsystem: "worker_pool",
- Name: "completed_tasks_total",
- Help: "Total number of tasks completed.",
- })
- // This will register fine.
- if err := prometheus.Register(taskCounter); err != nil {
- fmt.Println(err)
- } else {
- fmt.Println("taskCounter registered.")
- }
- // Don't forget to tell the HTTP server about the Prometheus handler.
- // (In a real program, you still need to start the HTTP server...)
- http.Handle("/metrics", prometheus.Handler())
-
- // Now you can start workers and give every one of them a pointer to
- // taskCounter and let it increment it whenever it completes a task.
- taskCounter.Inc() // This has to happen somewhere in the worker code.
-
- // But wait, you want to see how individual workers perform. So you need
- // a vector of counters, with one element for each worker.
- taskCounterVec := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Subsystem: "worker_pool",
- Name: "completed_tasks_total",
- Help: "Total number of tasks completed.",
- },
- []string{"worker_id"},
- )
-
- // Registering will fail because we already have a metric of that name.
- if err := prometheus.Register(taskCounterVec); err != nil {
- fmt.Println("taskCounterVec not registered:", err)
- } else {
- fmt.Println("taskCounterVec registered.")
- }
-
- // To fix, first unregister the old taskCounter.
- if prometheus.Unregister(taskCounter) {
- fmt.Println("taskCounter unregistered.")
- }
-
- // Try registering taskCounterVec again.
- if err := prometheus.Register(taskCounterVec); err != nil {
- fmt.Println("taskCounterVec not registered:", err)
- } else {
- fmt.Println("taskCounterVec registered.")
- }
- // Bummer! Still doesn't work.
-
- // Prometheus will not allow you to ever export metrics with
- // inconsistent help strings or label names. After unregistering, the
- // unregistered metrics will cease to show up in the /metrics HTTP
- // response, but the registry still remembers that those metrics had
- // been exported before. For this example, we will now choose a
- // different name. (In a real program, you would obviously not export
- // the obsolete metric in the first place.)
- taskCounterVec = prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Subsystem: "worker_pool",
- Name: "completed_tasks_by_id",
- Help: "Total number of tasks completed.",
- },
- []string{"worker_id"},
- )
- if err := prometheus.Register(taskCounterVec); err != nil {
- fmt.Println("taskCounterVec not registered:", err)
- } else {
- fmt.Println("taskCounterVec registered.")
- }
- // Finally it worked!
-
- // The workers have to tell taskCounterVec their id to increment the
- // right element in the metric vector.
- taskCounterVec.WithLabelValues("42").Inc() // Code from worker 42.
-
- // Each worker could also keep a reference to their own counter element
- // around. Pick the counter at initialization time of the worker.
- myCounter := taskCounterVec.WithLabelValues("42") // From worker 42 initialization code.
- myCounter.Inc() // Somewhere in the code of that worker.
-
- // Note that something like WithLabelValues("42", "spurious arg") would
- // panic (because you have provided too many label values). If you want
- // to get an error instead, use GetMetricWithLabelValues(...) instead.
- notMyCounter, err := taskCounterVec.GetMetricWithLabelValues("42", "spurious arg")
- if err != nil {
- fmt.Println("Worker initialization failed:", err)
- }
- if notMyCounter == nil {
- fmt.Println("notMyCounter is nil.")
- }
-
- // A different (and somewhat tricky) approach is to use
- // ConstLabels. ConstLabels are pairs of label names and label values
- // that never change. You might ask what those labels are good for (and
- // rightfully so - if they never change, they could as well be part of
- // the metric name). There are essentially two use-cases: The first is
- // if labels are constant throughout the lifetime of a binary execution,
- // but they vary over time or between different instances of a running
- // binary. The second is what we have here: Each worker creates and
- // registers an own Counter instance where the only difference is in the
- // value of the ConstLabels. Those Counters can all be registered
- // because the different ConstLabel values guarantee that each worker
- // will increment a different Counter metric.
- counterOpts := prometheus.CounterOpts{
- Subsystem: "worker_pool",
- Name: "completed_tasks",
- Help: "Total number of tasks completed.",
- ConstLabels: prometheus.Labels{"worker_id": "42"},
- }
- taskCounterForWorker42 := prometheus.NewCounter(counterOpts)
- if err := prometheus.Register(taskCounterForWorker42); err != nil {
- fmt.Println("taskCounterVForWorker42 not registered:", err)
- } else {
- fmt.Println("taskCounterForWorker42 registered.")
- }
- // Obviously, in real code, taskCounterForWorker42 would be a member
- // variable of a worker struct, and the "42" would be retrieved with a
- // GetId() method or something. The Counter would be created and
- // registered in the initialization code of the worker.
-
- // For the creation of the next Counter, we can recycle
- // counterOpts. Just change the ConstLabels.
- counterOpts.ConstLabels = prometheus.Labels{"worker_id": "2001"}
- taskCounterForWorker2001 := prometheus.NewCounter(counterOpts)
- if err := prometheus.Register(taskCounterForWorker2001); err != nil {
- fmt.Println("taskCounterVForWorker2001 not registered:", err)
- } else {
- fmt.Println("taskCounterForWorker2001 registered.")
- }
-
- taskCounterForWorker2001.Inc()
- taskCounterForWorker42.Inc()
- taskCounterForWorker2001.Inc()
-
- // Yet another approach would be to turn the workers themselves into
- // Collectors and register them. See the Collector example for details.
-
- // Output:
- // taskCounter registered.
- // taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: [worker_id]} has different label names or a different help string
- // taskCounter unregistered.
- // taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: [worker_id]} has different label names or a different help string
- // taskCounterVec registered.
- // Worker initialization failed: inconsistent label cardinality
- // notMyCounter is nil.
- // taskCounterForWorker42 registered.
- // taskCounterForWorker2001 registered.
-}
-
-func ExampleSummary() {
- temps := prometheus.NewSummary(prometheus.SummaryOpts{
- Name: "pond_temperature_celsius",
- Help: "The temperature of the frog pond.",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- })
-
- // Simulate some observations.
- for i := 0; i < 1000; i++ {
- temps.Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10)
- }
-
- // Just for demonstration, let's check the state of the summary by
- // (ab)using its Write method (which is usually only used by Prometheus
- // internally).
- metric := &dto.Metric{}
- temps.Write(metric)
- fmt.Println(proto.MarshalTextString(metric))
-
- // Output:
- // summary: <
- // sample_count: 1000
- // sample_sum: 29969.50000000001
- // quantile: <
- // quantile: 0.5
- // value: 31.1
- // >
- // quantile: <
- // quantile: 0.9
- // value: 41.3
- // >
- // quantile: <
- // quantile: 0.99
- // value: 41.9
- // >
- // >
-}
-
-func ExampleSummaryVec() {
- temps := prometheus.NewSummaryVec(
- prometheus.SummaryOpts{
- Name: "pond_temperature_celsius",
- Help: "The temperature of the frog pond.",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- []string{"species"},
- )
-
- // Simulate some observations.
- for i := 0; i < 1000; i++ {
- temps.WithLabelValues("litoria-caerulea").Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10)
- temps.WithLabelValues("lithobates-catesbeianus").Observe(32 + math.Floor(100*math.Cos(float64(i)*0.11))/10)
- }
-
- // Create a Summary without any observations.
- temps.WithLabelValues("leiopelma-hochstetteri")
-
- // Just for demonstration, let's check the state of the summary vector
- // by registering it with a custom registry and then let it collect the
- // metrics.
- reg := prometheus.NewRegistry()
- reg.MustRegister(temps)
-
- metricFamilies, err := reg.Gather()
- if err != nil || len(metricFamilies) != 1 {
- panic("unexpected behavior of custom test registry")
- }
- fmt.Println(proto.MarshalTextString(metricFamilies[0]))
-
- // Output:
- // name: "pond_temperature_celsius"
- // help: "The temperature of the frog pond."
- // type: SUMMARY
- // metric: <
- // label: <
- // name: "species"
- // value: "leiopelma-hochstetteri"
- // >
- // summary: <
- // sample_count: 0
- // sample_sum: 0
- // quantile: <
- // quantile: 0.5
- // value: nan
- // >
- // quantile: <
- // quantile: 0.9
- // value: nan
- // >
- // quantile: <
- // quantile: 0.99
- // value: nan
- // >
- // >
- // >
- // metric: <
- // label: <
- // name: "species"
- // value: "lithobates-catesbeianus"
- // >
- // summary: <
- // sample_count: 1000
- // sample_sum: 31956.100000000017
- // quantile: <
- // quantile: 0.5
- // value: 32.4
- // >
- // quantile: <
- // quantile: 0.9
- // value: 41.4
- // >
- // quantile: <
- // quantile: 0.99
- // value: 41.9
- // >
- // >
- // >
- // metric: <
- // label: <
- // name: "species"
- // value: "litoria-caerulea"
- // >
- // summary: <
- // sample_count: 1000
- // sample_sum: 29969.50000000001
- // quantile: <
- // quantile: 0.5
- // value: 31.1
- // >
- // quantile: <
- // quantile: 0.9
- // value: 41.3
- // >
- // quantile: <
- // quantile: 0.99
- // value: 41.9
- // >
- // >
- // >
-}
-
-func ExampleNewConstSummary() {
- desc := prometheus.NewDesc(
- "http_request_duration_seconds",
- "A summary of the HTTP request durations.",
- []string{"code", "method"},
- prometheus.Labels{"owner": "example"},
- )
-
- // Create a constant summary from values we got from a 3rd party telemetry system.
- s := prometheus.MustNewConstSummary(
- desc,
- 4711, 403.34,
- map[float64]float64{0.5: 42.3, 0.9: 323.3},
- "200", "get",
- )
-
- // Just for demonstration, let's check the state of the summary by
- // (ab)using its Write method (which is usually only used by Prometheus
- // internally).
- metric := &dto.Metric{}
- s.Write(metric)
- fmt.Println(proto.MarshalTextString(metric))
-
- // Output:
- // label: <
- // name: "code"
- // value: "200"
- // >
- // label: <
- // name: "method"
- // value: "get"
- // >
- // label: <
- // name: "owner"
- // value: "example"
- // >
- // summary: <
- // sample_count: 4711
- // sample_sum: 403.34
- // quantile: <
- // quantile: 0.5
- // value: 42.3
- // >
- // quantile: <
- // quantile: 0.9
- // value: 323.3
- // >
- // >
-}
-
-func ExampleHistogram() {
- temps := prometheus.NewHistogram(prometheus.HistogramOpts{
- Name: "pond_temperature_celsius",
- Help: "The temperature of the frog pond.", // Sorry, we can't measure how badly it smells.
- Buckets: prometheus.LinearBuckets(20, 5, 5), // 5 buckets, each 5 centigrade wide.
- })
-
- // Simulate some observations.
- for i := 0; i < 1000; i++ {
- temps.Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10)
- }
-
- // Just for demonstration, let's check the state of the histogram by
- // (ab)using its Write method (which is usually only used by Prometheus
- // internally).
- metric := &dto.Metric{}
- temps.Write(metric)
- fmt.Println(proto.MarshalTextString(metric))
-
- // Output:
- // histogram: <
- // sample_count: 1000
- // sample_sum: 29969.50000000001
- // bucket: <
- // cumulative_count: 192
- // upper_bound: 20
- // >
- // bucket: <
- // cumulative_count: 366
- // upper_bound: 25
- // >
- // bucket: <
- // cumulative_count: 501
- // upper_bound: 30
- // >
- // bucket: <
- // cumulative_count: 638
- // upper_bound: 35
- // >
- // bucket: <
- // cumulative_count: 816
- // upper_bound: 40
- // >
- // >
-}
-
-func ExampleNewConstHistogram() {
- desc := prometheus.NewDesc(
- "http_request_duration_seconds",
- "A histogram of the HTTP request durations.",
- []string{"code", "method"},
- prometheus.Labels{"owner": "example"},
- )
-
- // Create a constant histogram from values we got from a 3rd party telemetry system.
- h := prometheus.MustNewConstHistogram(
- desc,
- 4711, 403.34,
- map[float64]uint64{25: 121, 50: 2403, 100: 3221, 200: 4233},
- "200", "get",
- )
-
- // Just for demonstration, let's check the state of the histogram by
- // (ab)using its Write method (which is usually only used by Prometheus
- // internally).
- metric := &dto.Metric{}
- h.Write(metric)
- fmt.Println(proto.MarshalTextString(metric))
-
- // Output:
- // label: <
- // name: "code"
- // value: "200"
- // >
- // label: <
- // name: "method"
- // value: "get"
- // >
- // label: <
- // name: "owner"
- // value: "example"
- // >
- // histogram: <
- // sample_count: 4711
- // sample_sum: 403.34
- // bucket: <
- // cumulative_count: 121
- // upper_bound: 25
- // >
- // bucket: <
- // cumulative_count: 2403
- // upper_bound: 50
- // >
- // bucket: <
- // cumulative_count: 3221
- // upper_bound: 100
- // >
- // bucket: <
- // cumulative_count: 4233
- // upper_bound: 200
- // >
- // >
-}
-
-func ExampleAlreadyRegisteredError() {
- reqCounter := prometheus.NewCounter(prometheus.CounterOpts{
- Name: "requests_total",
- Help: "The total number of requests served.",
- })
- if err := prometheus.Register(reqCounter); err != nil {
- if are, ok := err.(prometheus.AlreadyRegisteredError); ok {
- // A counter for that metric has been registered before.
- // Use the old counter from now on.
- reqCounter = are.ExistingCollector.(prometheus.Counter)
- } else {
- // Something else went wrong!
- panic(err)
- }
- }
- reqCounter.Inc()
-}
-
-func ExampleGatherers() {
- reg := prometheus.NewRegistry()
- temp := prometheus.NewGaugeVec(
- prometheus.GaugeOpts{
- Name: "temperature_kelvin",
- Help: "Temperature in Kelvin.",
- },
- []string{"location"},
- )
- reg.MustRegister(temp)
- temp.WithLabelValues("outside").Set(273.14)
- temp.WithLabelValues("inside").Set(298.44)
-
- var parser expfmt.TextParser
-
- text := `
-# TYPE humidity_percent gauge
-# HELP humidity_percent Humidity in %.
-humidity_percent{location="outside"} 45.4
-humidity_percent{location="inside"} 33.2
-# TYPE temperature_kelvin gauge
-# HELP temperature_kelvin Temperature in Kelvin.
-temperature_kelvin{location="somewhere else"} 4.5
-`
-
- parseText := func() ([]*dto.MetricFamily, error) {
- parsed, err := parser.TextToMetricFamilies(strings.NewReader(text))
- if err != nil {
- return nil, err
- }
- var result []*dto.MetricFamily
- for _, mf := range parsed {
- result = append(result, mf)
- }
- return result, nil
- }
-
- gatherers := prometheus.Gatherers{
- reg,
- prometheus.GathererFunc(parseText),
- }
-
- gathering, err := gatherers.Gather()
- if err != nil {
- fmt.Println(err)
- }
-
- out := &bytes.Buffer{}
- for _, mf := range gathering {
- if _, err := expfmt.MetricFamilyToText(out, mf); err != nil {
- panic(err)
- }
- }
- fmt.Print(out.String())
- fmt.Println("----------")
-
- // Note how the temperature_kelvin metric family has been merged from
- // different sources. Now try
- text = `
-# TYPE humidity_percent gauge
-# HELP humidity_percent Humidity in %.
-humidity_percent{location="outside"} 45.4
-humidity_percent{location="inside"} 33.2
-# TYPE temperature_kelvin gauge
-# HELP temperature_kelvin Temperature in Kelvin.
-# Duplicate metric:
-temperature_kelvin{location="outside"} 265.3
- # Wrong labels:
-temperature_kelvin 4.5
-`
-
- gathering, err = gatherers.Gather()
- if err != nil {
- fmt.Println(err)
- }
- // Note that still as many metrics as possible are returned:
- out.Reset()
- for _, mf := range gathering {
- if _, err := expfmt.MetricFamilyToText(out, mf); err != nil {
- panic(err)
- }
- }
- fmt.Print(out.String())
-
- // Output:
- // # HELP humidity_percent Humidity in %.
- // # TYPE humidity_percent gauge
- // humidity_percent{location="inside"} 33.2
- // humidity_percent{location="outside"} 45.4
- // # HELP temperature_kelvin Temperature in Kelvin.
- // # TYPE temperature_kelvin gauge
- // temperature_kelvin{location="inside"} 298.44
- // temperature_kelvin{location="outside"} 273.14
- // temperature_kelvin{location="somewhere else"} 4.5
- // ----------
- // 2 error(s) occurred:
- // * collected metric temperature_kelvin label:<name:"location" value:"outside" > gauge:<value:265.3 > was collected before with the same name and label values
- // * collected metric temperature_kelvin gauge:<value:4.5 > has label dimensions inconsistent with previously collected metrics in the same metric family
- // # HELP humidity_percent Humidity in %.
- // # TYPE humidity_percent gauge
- // humidity_percent{location="inside"} 33.2
- // humidity_percent{location="outside"} 45.4
- // # HELP temperature_kelvin Temperature in Kelvin.
- // # TYPE temperature_kelvin gauge
- // temperature_kelvin{location="inside"} 298.44
- // temperature_kelvin{location="outside"} 273.14
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go
deleted file mode 100644
index 910dac325..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus_test
-
-import (
- "expvar"
- "fmt"
- "sort"
- "strings"
-
- dto "github.com/prometheus/client_model/go"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func ExampleNewExpvarCollector() {
- expvarCollector := prometheus.NewExpvarCollector(map[string]*prometheus.Desc{
- "memstats": prometheus.NewDesc(
- "expvar_memstats",
- "All numeric memstats as one metric family. Not a good role-model, actually... ;-)",
- []string{"type"}, nil,
- ),
- "lone-int": prometheus.NewDesc(
- "expvar_lone_int",
- "Just an expvar int as an example.",
- nil, nil,
- ),
- "http-request-map": prometheus.NewDesc(
- "expvar_http_request_total",
- "How many http requests processed, partitioned by status code and http method.",
- []string{"code", "method"}, nil,
- ),
- })
- prometheus.MustRegister(expvarCollector)
-
- // The Prometheus part is done here. But to show that this example is
- // doing anything, we have to manually export something via expvar. In
- // real-life use-cases, some library would already have exported via
- // expvar what we want to re-export as Prometheus metrics.
- expvar.NewInt("lone-int").Set(42)
- expvarMap := expvar.NewMap("http-request-map")
- var (
- expvarMap1, expvarMap2 expvar.Map
- expvarInt11, expvarInt12, expvarInt21, expvarInt22 expvar.Int
- )
- expvarMap1.Init()
- expvarMap2.Init()
- expvarInt11.Set(3)
- expvarInt12.Set(13)
- expvarInt21.Set(11)
- expvarInt22.Set(212)
- expvarMap1.Set("POST", &expvarInt11)
- expvarMap1.Set("GET", &expvarInt12)
- expvarMap2.Set("POST", &expvarInt21)
- expvarMap2.Set("GET", &expvarInt22)
- expvarMap.Set("404", &expvarMap1)
- expvarMap.Set("200", &expvarMap2)
- // Results in the following expvar map:
- // "http-request-count": {"200": {"POST": 11, "GET": 212}, "404": {"POST": 3, "GET": 13}}
-
- // Let's see what the scrape would yield, but exclude the memstats metrics.
- metricStrings := []string{}
- metric := dto.Metric{}
- metricChan := make(chan prometheus.Metric)
- go func() {
- expvarCollector.Collect(metricChan)
- close(metricChan)
- }()
- for m := range metricChan {
- if strings.Index(m.Desc().String(), "expvar_memstats") == -1 {
- metric.Reset()
- m.Write(&metric)
- metricStrings = append(metricStrings, metric.String())
- }
- }
- sort.Strings(metricStrings)
- for _, s := range metricStrings {
- fmt.Println(strings.TrimRight(s, " "))
- }
- // Output:
- // label:<name:"code" value:"200" > label:<name:"method" value:"GET" > untyped:<value:212 >
- // label:<name:"code" value:"200" > label:<name:"method" value:"POST" > untyped:<value:11 >
- // label:<name:"code" value:"404" > label:<name:"method" value:"GET" > untyped:<value:13 >
- // label:<name:"code" value:"404" > label:<name:"method" value:"POST" > untyped:<value:3 >
- // untyped:<value:42 >
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go
index 17c72d7eb..8b70e5141 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go
@@ -13,14 +13,6 @@
package prometheus
-import (
- "math"
- "sync/atomic"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-)
-
// Gauge is a Metric that represents a single numerical value that can
// arbitrarily go up and down.
//
@@ -35,95 +27,29 @@ type Gauge interface {
// Set sets the Gauge to an arbitrary value.
Set(float64)
- // Inc increments the Gauge by 1. Use Add to increment it by arbitrary
- // values.
+ // Inc increments the Gauge by 1.
Inc()
- // Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary
- // values.
+ // Dec decrements the Gauge by 1.
Dec()
- // Add adds the given value to the Gauge. (The value can be negative,
- // resulting in a decrease of the Gauge.)
+ // Add adds the given value to the Gauge. (The value can be
+ // negative, resulting in a decrease of the Gauge.)
Add(float64)
// Sub subtracts the given value from the Gauge. (The value can be
// negative, resulting in an increase of the Gauge.)
Sub(float64)
-
- // SetToCurrentTime sets the Gauge to the current Unix time in seconds.
- SetToCurrentTime()
}
// GaugeOpts is an alias for Opts. See there for doc comments.
type GaugeOpts Opts
// NewGauge creates a new Gauge based on the provided GaugeOpts.
-//
-// The returned implementation is optimized for a fast Set method. If you have a
-// choice for managing the value of a Gauge via Set vs. Inc/Dec/Add/Sub, pick
-// the former. For example, the Inc method of the returned Gauge is slower than
-// the Inc method of a Counter returned by NewCounter. This matches the typical
-// scenarios for Gauges and Counters, where the former tends to be Set-heavy and
-// the latter Inc-heavy.
func NewGauge(opts GaugeOpts) Gauge {
- desc := NewDesc(
+ return newValue(NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
opts.Help,
nil,
opts.ConstLabels,
- )
- result := &gauge{desc: desc, labelPairs: desc.constLabelPairs}
- result.init(result) // Init self-collection.
- return result
-}
-
-type gauge struct {
- // valBits contains the bits of the represented float64 value. It has
- // to go first in the struct to guarantee alignment for atomic
- // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG
- valBits uint64
-
- selfCollector
-
- desc *Desc
- labelPairs []*dto.LabelPair
-}
-
-func (g *gauge) Desc() *Desc {
- return g.desc
-}
-
-func (g *gauge) Set(val float64) {
- atomic.StoreUint64(&g.valBits, math.Float64bits(val))
-}
-
-func (g *gauge) SetToCurrentTime() {
- g.Set(float64(time.Now().UnixNano()) / 1e9)
-}
-
-func (g *gauge) Inc() {
- g.Add(1)
-}
-
-func (g *gauge) Dec() {
- g.Add(-1)
-}
-
-func (g *gauge) Add(val float64) {
- for {
- oldBits := atomic.LoadUint64(&g.valBits)
- newBits := math.Float64bits(math.Float64frombits(oldBits) + val)
- if atomic.CompareAndSwapUint64(&g.valBits, oldBits, newBits) {
- return
- }
- }
-}
-
-func (g *gauge) Sub(val float64) {
- g.Add(val * -1)
-}
-
-func (g *gauge) Write(out *dto.Metric) error {
- val := math.Float64frombits(atomic.LoadUint64(&g.valBits))
- return populateMetric(GaugeValue, val, g.labelPairs, out)
+ ), GaugeValue, 0)
}
// GaugeVec is a Collector that bundles a set of Gauges that all share the same
@@ -132,11 +58,12 @@ func (g *gauge) Write(out *dto.Metric) error {
// (e.g. number of operations queued, partitioned by user and operation
// type). Create instances with NewGaugeVec.
type GaugeVec struct {
- *metricVec
+ *MetricVec
}
// NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and
-// partitioned by the given label names.
+// partitioned by the given label names. At least one label name must be
+// provided.
func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec {
desc := NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
@@ -145,62 +72,28 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec {
opts.ConstLabels,
)
return &GaugeVec{
- metricVec: newMetricVec(desc, func(lvs ...string) Metric {
- if len(lvs) != len(desc.variableLabels) {
- panic(errInconsistentCardinality)
- }
- result := &gauge{desc: desc, labelPairs: makeLabelPairs(desc, lvs)}
- result.init(result) // Init self-collection.
- return result
+ MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
+ return newValue(desc, GaugeValue, 0, lvs...)
}),
}
}
-// GetMetricWithLabelValues returns the Gauge for the given slice of label
-// values (same order as the VariableLabels in Desc). If that combination of
-// label values is accessed for the first time, a new Gauge is created.
-//
-// It is possible to call this method without using the returned Gauge to only
-// create the new Gauge but leave it at its starting value 0. See also the
-// SummaryVec example.
-//
-// Keeping the Gauge for later use is possible (and should be considered if
-// performance is critical), but keep in mind that Reset, DeleteLabelValues and
-// Delete can be used to delete the Gauge from the GaugeVec. In that case, the
-// Gauge will still exist, but it will not be exported anymore, even if a
-// Gauge with the same label values is created later. See also the CounterVec
-// example.
-//
-// An error is returned if the number of label values is not the same as the
-// number of VariableLabels in Desc (minus any curried labels).
-//
-// Note that for more than one label value, this method is prone to mistakes
-// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as
-// an alternative to avoid that type of mistake. For higher label numbers, the
-// latter has a much more readable (albeit more verbose) syntax, but it comes
-// with a performance overhead (for creating and processing the Labels map).
-func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) {
- metric, err := v.metricVec.getMetricWithLabelValues(lvs...)
+// GetMetricWithLabelValues replaces the method of the same name in
+// MetricVec. The difference is that this method returns a Gauge and not a
+// Metric so that no type conversion is required.
+func (m *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) {
+ metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
if metric != nil {
return metric.(Gauge), err
}
return nil, err
}
-// GetMetricWith returns the Gauge for the given Labels map (the label names
-// must match those of the VariableLabels in Desc). If that label map is
-// accessed for the first time, a new Gauge is created. Implications of
-// creating a Gauge without using it and keeping the Gauge for later use are
-// the same as for GetMetricWithLabelValues.
-//
-// An error is returned if the number and names of the Labels are inconsistent
-// with those of the VariableLabels in Desc (minus any curried labels).
-//
-// This method is used for the same purpose as
-// GetMetricWithLabelValues(...string). See there for pros and cons of the two
-// methods.
-func (v *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) {
- metric, err := v.metricVec.getMetricWith(labels)
+// GetMetricWith replaces the method of the same name in MetricVec. The
+// difference is that this method returns a Gauge and not a Metric so that no
+// type conversion is required.
+func (m *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) {
+ metric, err := m.MetricVec.GetMetricWith(labels)
if metric != nil {
return metric.(Gauge), err
}
@@ -208,57 +101,18 @@ func (v *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) {
}
// WithLabelValues works as GetMetricWithLabelValues, but panics where
-// GetMetricWithLabelValues would have returned an error. Not returning an
-// error allows shortcuts like
+// GetMetricWithLabelValues would have returned an error. By not returning an
+// error, WithLabelValues allows shortcuts like
// myVec.WithLabelValues("404", "GET").Add(42)
-func (v *GaugeVec) WithLabelValues(lvs ...string) Gauge {
- g, err := v.GetMetricWithLabelValues(lvs...)
- if err != nil {
- panic(err)
- }
- return g
+func (m *GaugeVec) WithLabelValues(lvs ...string) Gauge {
+ return m.MetricVec.WithLabelValues(lvs...).(Gauge)
}
// With works as GetMetricWith, but panics where GetMetricWithLabels would have
-// returned an error. Not returning an error allows shortcuts like
-// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42)
-func (v *GaugeVec) With(labels Labels) Gauge {
- g, err := v.GetMetricWith(labels)
- if err != nil {
- panic(err)
- }
- return g
-}
-
-// CurryWith returns a vector curried with the provided labels, i.e. the
-// returned vector has those labels pre-set for all labeled operations performed
-// on it. The cardinality of the curried vector is reduced accordingly. The
-// order of the remaining labels stays the same (just with the curried labels
-// taken out of the sequence – which is relevant for the
-// (GetMetric)WithLabelValues methods). It is possible to curry a curried
-// vector, but only with labels not yet used for currying before.
-//
-// The metrics contained in the GaugeVec are shared between the curried and
-// uncurried vectors. They are just accessed differently. Curried and uncurried
-// vectors behave identically in terms of collection. Only one must be
-// registered with a given registry (usually the uncurried version). The Reset
-// method deletes all metrics, even if called on a curried vector.
-func (v *GaugeVec) CurryWith(labels Labels) (*GaugeVec, error) {
- vec, err := v.curryWith(labels)
- if vec != nil {
- return &GaugeVec{vec}, err
- }
- return nil, err
-}
-
-// MustCurryWith works as CurryWith but panics where CurryWith would have
-// returned an error.
-func (v *GaugeVec) MustCurryWith(labels Labels) *GaugeVec {
- vec, err := v.CurryWith(labels)
- if err != nil {
- panic(err)
- }
- return vec
+// returned an error. By not returning an error, With allows shortcuts like
+// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42)
+func (m *GaugeVec) With(labels Labels) Gauge {
+ return m.MetricVec.With(labels).(Gauge)
}
// GaugeFunc is a Gauge whose value is determined at collect time by calling a
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go
deleted file mode 100644
index a2e3c1416..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "math"
- "math/rand"
- "sync"
- "testing"
- "testing/quick"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func listenGaugeStream(vals, result chan float64, done chan struct{}) {
- var sum float64
-outer:
- for {
- select {
- case <-done:
- close(vals)
- for v := range vals {
- sum += v
- }
- break outer
- case v := <-vals:
- sum += v
- }
- }
- result <- sum
- close(result)
-}
-
-func TestGaugeConcurrency(t *testing.T) {
- it := func(n uint32) bool {
- mutations := int(n % 10000)
- concLevel := int(n%15 + 1)
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- sStream := make(chan float64, mutations*concLevel)
- result := make(chan float64)
- done := make(chan struct{})
-
- go listenGaugeStream(sStream, result, done)
- go func() {
- end.Wait()
- close(done)
- }()
-
- gge := NewGauge(GaugeOpts{
- Name: "test_gauge",
- Help: "no help can be found here",
- })
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- for j := 0; j < mutations; j++ {
- vals[j] = rand.Float64() - 0.5
- }
-
- go func(vals []float64) {
- start.Wait()
- for _, v := range vals {
- sStream <- v
- gge.Add(v)
- }
- end.Done()
- }(vals)
- }
- start.Done()
-
- if expected, got := <-result, math.Float64frombits(gge.(*gauge).valBits); math.Abs(expected-got) > 0.000001 {
- t.Fatalf("expected approx. %f, got %f", expected, got)
- return false
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestGaugeVecConcurrency(t *testing.T) {
- it := func(n uint32) bool {
- mutations := int(n % 10000)
- concLevel := int(n%15 + 1)
- vecLength := int(n%5 + 1)
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- sStreams := make([]chan float64, vecLength)
- results := make([]chan float64, vecLength)
- done := make(chan struct{})
-
- for i := 0; i < vecLength; i++ {
- sStreams[i] = make(chan float64, mutations*concLevel)
- results[i] = make(chan float64)
- go listenGaugeStream(sStreams[i], results[i], done)
- }
-
- go func() {
- end.Wait()
- close(done)
- }()
-
- gge := NewGaugeVec(
- GaugeOpts{
- Name: "test_gauge",
- Help: "no help can be found here",
- },
- []string{"label"},
- )
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- pick := make([]int, mutations)
- for j := 0; j < mutations; j++ {
- vals[j] = rand.Float64() - 0.5
- pick[j] = rand.Intn(vecLength)
- }
-
- go func(vals []float64) {
- start.Wait()
- for i, v := range vals {
- sStreams[pick[i]] <- v
- gge.WithLabelValues(string('A' + pick[i])).Add(v)
- }
- end.Done()
- }(vals)
- }
- start.Done()
-
- for i := range sStreams {
- if expected, got := <-results[i], math.Float64frombits(gge.WithLabelValues(string('A'+i)).(*gauge).valBits); math.Abs(expected-got) > 0.000001 {
- t.Fatalf("expected approx. %f, got %f", expected, got)
- return false
- }
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestGaugeFunc(t *testing.T) {
- gf := NewGaugeFunc(
- GaugeOpts{
- Name: "test_name",
- Help: "test help",
- ConstLabels: Labels{"a": "1", "b": "2"},
- },
- func() float64 { return 3.1415 },
- )
-
- if expected, got := `Desc{fqName: "test_name", help: "test help", constLabels: {a="1",b="2"}, variableLabels: []}`, gf.Desc().String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-
- m := &dto.Metric{}
- gf.Write(m)
-
- if expected, got := `label:<name:"a" value:"1" > label:<name:"b" value:"2" > gauge:<value:3.1415 > `, m.String(); expected != got {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func TestGaugeSetCurrentTime(t *testing.T) {
- g := NewGauge(GaugeOpts{
- Name: "test_name",
- Help: "test help",
- })
- g.SetToCurrentTime()
- unixTime := float64(time.Now().Unix())
-
- m := &dto.Metric{}
- g.Write(m)
-
- delta := unixTime - m.GetGauge().GetValue()
- // This is just a smoke test to make sure SetToCurrentTime is not
- // totally off. Tests with current time involved are hard...
- if math.Abs(delta) > 5 {
- t.Errorf("Gauge set to current time deviates from current time by more than 5s, delta is %f seconds", delta)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
index 096454af9..abc9d4ec4 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
@@ -8,10 +8,8 @@ import (
)
type goCollector struct {
- goroutinesDesc *Desc
- threadsDesc *Desc
- gcDesc *Desc
- goInfoDesc *Desc
+ goroutines Gauge
+ gcDesc *Desc
// metrics to describe and collect
metrics memStatsMetrics
@@ -21,22 +19,15 @@ type goCollector struct {
// go process.
func NewGoCollector() Collector {
return &goCollector{
- goroutinesDesc: NewDesc(
- "go_goroutines",
- "Number of goroutines that currently exist.",
- nil, nil),
- threadsDesc: NewDesc(
- "go_threads",
- "Number of OS threads created.",
- nil, nil),
+ goroutines: NewGauge(GaugeOpts{
+ Namespace: "go",
+ Name: "goroutines",
+ Help: "Number of goroutines that currently exist.",
+ }),
gcDesc: NewDesc(
"go_gc_duration_seconds",
"A summary of the GC invocation durations.",
nil, nil),
- goInfoDesc: NewDesc(
- "go_info",
- "Information about the Go environment.",
- nil, Labels{"version": runtime.Version()}),
metrics: memStatsMetrics{
{
desc: NewDesc(
@@ -57,7 +48,7 @@ func NewGoCollector() Collector {
}, {
desc: NewDesc(
memstatNamespace("sys_bytes"),
- "Number of bytes obtained from system.",
+ "Number of bytes obtained by system. Sum of all system allocations.",
nil, nil,
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) },
@@ -120,12 +111,12 @@ func NewGoCollector() Collector {
valType: GaugeValue,
}, {
desc: NewDesc(
- memstatNamespace("heap_released_bytes"),
- "Number of heap bytes released to OS.",
+ memstatNamespace("heap_released_bytes_total"),
+ "Total number of heap bytes released to OS.",
nil, nil,
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) },
- valType: GaugeValue,
+ valType: CounterValue,
}, {
desc: NewDesc(
memstatNamespace("heap_objects"),
@@ -222,14 +213,6 @@ func NewGoCollector() Collector {
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC) / 1e9 },
valType: GaugeValue,
- }, {
- desc: NewDesc(
- memstatNamespace("gc_cpu_fraction"),
- "The fraction of this program's available CPU time used by the GC since the program started.",
- nil, nil,
- ),
- eval: func(ms *runtime.MemStats) float64 { return ms.GCCPUFraction },
- valType: GaugeValue,
},
},
}
@@ -241,10 +224,9 @@ func memstatNamespace(s string) string {
// Describe returns all descriptions of the collector.
func (c *goCollector) Describe(ch chan<- *Desc) {
- ch <- c.goroutinesDesc
- ch <- c.threadsDesc
+ ch <- c.goroutines.Desc()
ch <- c.gcDesc
- ch <- c.goInfoDesc
+
for _, i := range c.metrics {
ch <- i.desc
}
@@ -252,9 +234,8 @@ func (c *goCollector) Describe(ch chan<- *Desc) {
// Collect returns the current state of all metrics of the collector.
func (c *goCollector) Collect(ch chan<- Metric) {
- ch <- MustNewConstMetric(c.goroutinesDesc, GaugeValue, float64(runtime.NumGoroutine()))
- n, _ := runtime.ThreadCreateProfile(nil)
- ch <- MustNewConstMetric(c.threadsDesc, GaugeValue, float64(n))
+ c.goroutines.Set(float64(runtime.NumGoroutine()))
+ ch <- c.goroutines
var stats debug.GCStats
stats.PauseQuantiles = make([]time.Duration, 5)
@@ -267,8 +248,6 @@ func (c *goCollector) Collect(ch chan<- Metric) {
quantiles[0.0] = stats.PauseQuantiles[0].Seconds()
ch <- MustNewConstSummary(c.gcDesc, uint64(stats.NumGC), float64(stats.PauseTotal.Seconds()), quantiles)
- ch <- MustNewConstMetric(c.goInfoDesc, GaugeValue, 1)
-
ms := &runtime.MemStats{}
runtime.ReadMemStats(ms)
for _, i := range c.metrics {
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go
deleted file mode 100644
index 72264da9a..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package prometheus
-
-import (
- "runtime"
- "testing"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func TestGoCollector(t *testing.T) {
- var (
- c = NewGoCollector()
- ch = make(chan Metric)
- waitc = make(chan struct{})
- closec = make(chan struct{})
- old = -1
- )
- defer close(closec)
-
- go func() {
- c.Collect(ch)
- go func(c <-chan struct{}) {
- <-c
- }(closec)
- <-waitc
- c.Collect(ch)
- }()
-
- for {
- select {
- case m := <-ch:
- // m can be Gauge or Counter,
- // currently just test the go_goroutines Gauge
- // and ignore others.
- if m.Desc().fqName != "go_goroutines" {
- continue
- }
- pb := &dto.Metric{}
- m.Write(pb)
- if pb.GetGauge() == nil {
- continue
- }
-
- if old == -1 {
- old = int(pb.GetGauge().GetValue())
- close(waitc)
- continue
- }
-
- if diff := int(pb.GetGauge().GetValue()) - old; diff != 1 {
- // TODO: This is flaky in highly concurrent situations.
- t.Errorf("want 1 new goroutine, got %d", diff)
- }
-
- // GoCollector performs three sends per call.
- // On line 27 we need to receive three more sends
- // to shut down cleanly.
- <-ch
- <-ch
- <-ch
- return
- case <-time.After(1 * time.Second):
- t.Fatalf("expected collect timed out")
- }
- }
-}
-
-func TestGCCollector(t *testing.T) {
- var (
- c = NewGoCollector()
- ch = make(chan Metric)
- waitc = make(chan struct{})
- closec = make(chan struct{})
- oldGC uint64
- oldPause float64
- )
- defer close(closec)
-
- go func() {
- c.Collect(ch)
- // force GC
- runtime.GC()
- <-waitc
- c.Collect(ch)
- }()
-
- first := true
- for {
- select {
- case metric := <-ch:
- pb := &dto.Metric{}
- metric.Write(pb)
- if pb.GetSummary() == nil {
- continue
- }
- if len(pb.GetSummary().Quantile) != 5 {
- t.Errorf("expected 4 buckets, got %d", len(pb.GetSummary().Quantile))
- }
- for idx, want := range []float64{0.0, 0.25, 0.5, 0.75, 1.0} {
- if *pb.GetSummary().Quantile[idx].Quantile != want {
- t.Errorf("bucket #%d is off, got %f, want %f", idx, *pb.GetSummary().Quantile[idx].Quantile, want)
- }
- }
- if first {
- first = false
- oldGC = *pb.GetSummary().SampleCount
- oldPause = *pb.GetSummary().SampleSum
- close(waitc)
- continue
- }
- if diff := *pb.GetSummary().SampleCount - oldGC; diff != 1 {
- t.Errorf("want 1 new garbage collection run, got %d", diff)
- }
- if diff := *pb.GetSummary().SampleSum - oldPause; diff <= 0 {
- t.Errorf("want moar pause, got %f", diff)
- }
- return
- case <-time.After(1 * time.Second):
- t.Fatalf("expected collect timed out")
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go b/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go
deleted file mode 100644
index 11533374b..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go
+++ /dev/null
@@ -1,280 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-// Package graphite provides a bridge to push Prometheus metrics to a Graphite
-// server.
-package graphite
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "net"
- "sort"
- "time"
-
- "github.com/prometheus/common/expfmt"
- "github.com/prometheus/common/model"
- "golang.org/x/net/context"
-
- dto "github.com/prometheus/client_model/go"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-const (
- defaultInterval = 15 * time.Second
- millisecondsPerSecond = 1000
-)
-
-// HandlerErrorHandling defines how a Handler serving metrics will handle
-// errors.
-type HandlerErrorHandling int
-
-// These constants cause handlers serving metrics to behave as described if
-// errors are encountered.
-const (
- // Ignore errors and try to push as many metrics to Graphite as possible.
- ContinueOnError HandlerErrorHandling = iota
-
- // Abort the push to Graphite upon the first error encountered.
- AbortOnError
-)
-
-// Config defines the Graphite bridge config.
-type Config struct {
- // The url to push data to. Required.
- URL string
-
- // The prefix for the pushed Graphite metrics. Defaults to empty string.
- Prefix string
-
- // The interval to use for pushing data to Graphite. Defaults to 15 seconds.
- Interval time.Duration
-
- // The timeout for pushing metrics to Graphite. Defaults to 15 seconds.
- Timeout time.Duration
-
- // The Gatherer to use for metrics. Defaults to prometheus.DefaultGatherer.
- Gatherer prometheus.Gatherer
-
- // The logger that messages are written to. Defaults to no logging.
- Logger Logger
-
- // ErrorHandling defines how errors are handled. Note that errors are
- // logged regardless of the configured ErrorHandling provided Logger
- // is not nil.
- ErrorHandling HandlerErrorHandling
-}
-
-// Bridge pushes metrics to the configured Graphite server.
-type Bridge struct {
- url string
- prefix string
- interval time.Duration
- timeout time.Duration
-
- errorHandling HandlerErrorHandling
- logger Logger
-
- g prometheus.Gatherer
-}
-
-// Logger is the minimal interface Bridge needs for logging. Note that
-// log.Logger from the standard library implements this interface, and it is
-// easy to implement by custom loggers, if they don't do so already anyway.
-type Logger interface {
- Println(v ...interface{})
-}
-
-// NewBridge returns a pointer to a new Bridge struct.
-func NewBridge(c *Config) (*Bridge, error) {
- b := &Bridge{}
-
- if c.URL == "" {
- return nil, errors.New("missing URL")
- }
- b.url = c.URL
-
- if c.Gatherer == nil {
- b.g = prometheus.DefaultGatherer
- } else {
- b.g = c.Gatherer
- }
-
- if c.Logger != nil {
- b.logger = c.Logger
- }
-
- if c.Prefix != "" {
- b.prefix = c.Prefix
- }
-
- var z time.Duration
- if c.Interval == z {
- b.interval = defaultInterval
- } else {
- b.interval = c.Interval
- }
-
- if c.Timeout == z {
- b.timeout = defaultInterval
- } else {
- b.timeout = c.Timeout
- }
-
- b.errorHandling = c.ErrorHandling
-
- return b, nil
-}
-
-// Run starts the event loop that pushes Prometheus metrics to Graphite at the
-// configured interval.
-func (b *Bridge) Run(ctx context.Context) {
- ticker := time.NewTicker(b.interval)
- defer ticker.Stop()
- for {
- select {
- case <-ticker.C:
- if err := b.Push(); err != nil && b.logger != nil {
- b.logger.Println("error pushing to Graphite:", err)
- }
- case <-ctx.Done():
- return
- }
- }
-}
-
-// Push pushes Prometheus metrics to the configured Graphite server.
-func (b *Bridge) Push() error {
- mfs, err := b.g.Gather()
- if err != nil || len(mfs) == 0 {
- switch b.errorHandling {
- case AbortOnError:
- return err
- case ContinueOnError:
- if b.logger != nil {
- b.logger.Println("continue on error:", err)
- }
- default:
- panic("unrecognized error handling value")
- }
- }
-
- conn, err := net.DialTimeout("tcp", b.url, b.timeout)
- if err != nil {
- return err
- }
- defer conn.Close()
-
- return writeMetrics(conn, mfs, b.prefix, model.Now())
-}
-
-func writeMetrics(w io.Writer, mfs []*dto.MetricFamily, prefix string, now model.Time) error {
- vec, err := expfmt.ExtractSamples(&expfmt.DecodeOptions{
- Timestamp: now,
- }, mfs...)
- if err != nil {
- return err
- }
-
- buf := bufio.NewWriter(w)
- for _, s := range vec {
- if err := writeSanitized(buf, prefix); err != nil {
- return err
- }
- if err := buf.WriteByte('.'); err != nil {
- return err
- }
- if err := writeMetric(buf, s.Metric); err != nil {
- return err
- }
- if _, err := fmt.Fprintf(buf, " %g %d\n", s.Value, int64(s.Timestamp)/millisecondsPerSecond); err != nil {
- return err
- }
- if err := buf.Flush(); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func writeMetric(buf *bufio.Writer, m model.Metric) error {
- metricName, hasName := m[model.MetricNameLabel]
- numLabels := len(m) - 1
- if !hasName {
- numLabels = len(m)
- }
-
- labelStrings := make([]string, 0, numLabels)
- for label, value := range m {
- if label != model.MetricNameLabel {
- labelStrings = append(labelStrings, fmt.Sprintf("%s %s", string(label), string(value)))
- }
- }
-
- var err error
- switch numLabels {
- case 0:
- if hasName {
- return writeSanitized(buf, string(metricName))
- }
- default:
- sort.Strings(labelStrings)
- if err = writeSanitized(buf, string(metricName)); err != nil {
- return err
- }
- for _, s := range labelStrings {
- if err = buf.WriteByte('.'); err != nil {
- return err
- }
- if err = writeSanitized(buf, s); err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-func writeSanitized(buf *bufio.Writer, s string) error {
- prevUnderscore := false
-
- for _, c := range s {
- c = replaceInvalidRune(c)
- if c == '_' {
- if prevUnderscore {
- continue
- }
- prevUnderscore = true
- } else {
- prevUnderscore = false
- }
- if _, err := buf.WriteRune(c); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func replaceInvalidRune(c rune) rune {
- if c == ' ' {
- return '.'
- }
- if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == ':' || (c >= '0' && c <= '9')) {
- return '_'
- }
- return c
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge_test.go b/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge_test.go
deleted file mode 100644
index c2b274c6a..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge_test.go
+++ /dev/null
@@ -1,309 +0,0 @@
-package graphite
-
-import (
- "bufio"
- "bytes"
- "io"
- "log"
- "net"
- "os"
- "regexp"
- "testing"
- "time"
-
- "github.com/prometheus/common/model"
- "golang.org/x/net/context"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func TestSanitize(t *testing.T) {
- testCases := []struct {
- in, out string
- }{
- {in: "hello", out: "hello"},
- {in: "hE/l1o", out: "hE_l1o"},
- {in: "he,*ll(.o", out: "he_ll_o"},
- {in: "hello_there%^&", out: "hello_there_"},
- }
-
- var buf bytes.Buffer
- w := bufio.NewWriter(&buf)
-
- for i, tc := range testCases {
- if err := writeSanitized(w, tc.in); err != nil {
- t.Fatalf("write failed: %v", err)
- }
- if err := w.Flush(); err != nil {
- t.Fatalf("flush failed: %v", err)
- }
-
- if want, got := tc.out, buf.String(); want != got {
- t.Fatalf("test case index %d: got sanitized string %s, want %s", i, got, want)
- }
-
- buf.Reset()
- }
-}
-
-func TestWriteSummary(t *testing.T) {
- sumVec := prometheus.NewSummaryVec(
- prometheus.SummaryOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- []string{"labelname"},
- )
-
- sumVec.WithLabelValues("val1").Observe(float64(10))
- sumVec.WithLabelValues("val1").Observe(float64(20))
- sumVec.WithLabelValues("val1").Observe(float64(30))
- sumVec.WithLabelValues("val2").Observe(float64(20))
- sumVec.WithLabelValues("val2").Observe(float64(30))
- sumVec.WithLabelValues("val2").Observe(float64(40))
-
- reg := prometheus.NewRegistry()
- reg.MustRegister(sumVec)
-
- mfs, err := reg.Gather()
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- now := model.Time(1477043083)
- var buf bytes.Buffer
- err = writeMetrics(&buf, mfs, "prefix", now)
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- want := `prefix.name.constname.constvalue.labelname.val1.quantile.0_5 20 1477043
-prefix.name.constname.constvalue.labelname.val1.quantile.0_9 30 1477043
-prefix.name.constname.constvalue.labelname.val1.quantile.0_99 30 1477043
-prefix.name_sum.constname.constvalue.labelname.val1 60 1477043
-prefix.name_count.constname.constvalue.labelname.val1 3 1477043
-prefix.name.constname.constvalue.labelname.val2.quantile.0_5 30 1477043
-prefix.name.constname.constvalue.labelname.val2.quantile.0_9 40 1477043
-prefix.name.constname.constvalue.labelname.val2.quantile.0_99 40 1477043
-prefix.name_sum.constname.constvalue.labelname.val2 90 1477043
-prefix.name_count.constname.constvalue.labelname.val2 3 1477043
-`
-
- if got := buf.String(); want != got {
- t.Fatalf("wanted \n%s\n, got \n%s\n", want, got)
- }
-}
-
-func TestWriteHistogram(t *testing.T) {
- histVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- Buckets: []float64{0.01, 0.02, 0.05, 0.1},
- },
- []string{"labelname"},
- )
-
- histVec.WithLabelValues("val1").Observe(float64(10))
- histVec.WithLabelValues("val1").Observe(float64(20))
- histVec.WithLabelValues("val1").Observe(float64(30))
- histVec.WithLabelValues("val2").Observe(float64(20))
- histVec.WithLabelValues("val2").Observe(float64(30))
- histVec.WithLabelValues("val2").Observe(float64(40))
-
- reg := prometheus.NewRegistry()
- reg.MustRegister(histVec)
-
- mfs, err := reg.Gather()
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- now := model.Time(1477043083)
- var buf bytes.Buffer
- err = writeMetrics(&buf, mfs, "prefix", now)
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- want := `prefix.name_bucket.constname.constvalue.labelname.val1.le.0_01 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val1.le.0_02 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val1.le.0_05 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val1.le.0_1 0 1477043
-prefix.name_sum.constname.constvalue.labelname.val1 60 1477043
-prefix.name_count.constname.constvalue.labelname.val1 3 1477043
-prefix.name_bucket.constname.constvalue.labelname.val1.le._Inf 3 1477043
-prefix.name_bucket.constname.constvalue.labelname.val2.le.0_01 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val2.le.0_02 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val2.le.0_05 0 1477043
-prefix.name_bucket.constname.constvalue.labelname.val2.le.0_1 0 1477043
-prefix.name_sum.constname.constvalue.labelname.val2 90 1477043
-prefix.name_count.constname.constvalue.labelname.val2 3 1477043
-prefix.name_bucket.constname.constvalue.labelname.val2.le._Inf 3 1477043
-`
- if got := buf.String(); want != got {
- t.Fatalf("wanted \n%s\n, got \n%s\n", want, got)
- }
-}
-
-func TestToReader(t *testing.T) {
- cntVec := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- },
- []string{"labelname"},
- )
- cntVec.WithLabelValues("val1").Inc()
- cntVec.WithLabelValues("val2").Inc()
-
- reg := prometheus.NewRegistry()
- reg.MustRegister(cntVec)
-
- want := `prefix.name.constname.constvalue.labelname.val1 1 1477043
-prefix.name.constname.constvalue.labelname.val2 1 1477043
-`
- mfs, err := reg.Gather()
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- now := model.Time(1477043083)
- var buf bytes.Buffer
- err = writeMetrics(&buf, mfs, "prefix", now)
- if err != nil {
- t.Fatalf("error: %v", err)
- }
-
- if got := buf.String(); want != got {
- t.Fatalf("wanted \n%s\n, got \n%s\n", want, got)
- }
-}
-
-func TestPush(t *testing.T) {
- reg := prometheus.NewRegistry()
- cntVec := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- },
- []string{"labelname"},
- )
- cntVec.WithLabelValues("val1").Inc()
- cntVec.WithLabelValues("val2").Inc()
- reg.MustRegister(cntVec)
-
- host := "localhost"
- port := ":56789"
- b, err := NewBridge(&Config{
- URL: host + port,
- Gatherer: reg,
- Prefix: "prefix",
- })
- if err != nil {
- t.Fatalf("error creating bridge: %v", err)
- }
-
- nmg, err := newMockGraphite(port)
- if err != nil {
- t.Fatalf("error creating mock graphite: %v", err)
- }
- defer nmg.Close()
-
- err = b.Push()
- if err != nil {
- t.Fatalf("error pushing: %v", err)
- }
-
- wants := []string{
- "prefix.name.constname.constvalue.labelname.val1 1",
- "prefix.name.constname.constvalue.labelname.val2 1",
- }
-
- select {
- case got := <-nmg.readc:
- for _, want := range wants {
- matched, err := regexp.MatchString(want, got)
- if err != nil {
- t.Fatalf("error pushing: %v", err)
- }
- if !matched {
- t.Fatalf("missing metric:\nno match for %s received by server:\n%s", want, got)
- }
- }
- return
- case err := <-nmg.errc:
- t.Fatalf("error reading push: %v", err)
- case <-time.After(50 * time.Millisecond):
- t.Fatalf("no result from graphite server")
- }
-}
-
-func newMockGraphite(port string) (*mockGraphite, error) {
- readc := make(chan string)
- errc := make(chan error)
- ln, err := net.Listen("tcp", port)
- if err != nil {
- return nil, err
- }
-
- go func() {
- conn, err := ln.Accept()
- if err != nil {
- errc <- err
- }
- var b bytes.Buffer
- io.Copy(&b, conn)
- readc <- b.String()
- }()
-
- return &mockGraphite{
- readc: readc,
- errc: errc,
- Listener: ln,
- }, nil
-}
-
-type mockGraphite struct {
- readc chan string
- errc chan error
-
- net.Listener
-}
-
-func ExampleBridge() {
- b, err := NewBridge(&Config{
- URL: "graphite.example.org:3099",
- Gatherer: prometheus.DefaultGatherer,
- Prefix: "prefix",
- Interval: 15 * time.Second,
- Timeout: 10 * time.Second,
- ErrorHandling: AbortOnError,
- Logger: log.New(os.Stdout, "graphite bridge: ", log.Lshortfile),
- })
- if err != nil {
- panic(err)
- }
-
- go func() {
- // Start something in a goroutine that uses metrics.
- }()
-
- // Push initial metrics to Graphite. Fail fast if the push fails.
- if err := b.Push(); err != nil {
- panic(err)
- }
-
- // Create a Context to control stopping the Run() loop that pushes
- // metrics to Graphite.
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- // Start pushing metrics to Graphite in the Run() loop.
- b.Run(ctx)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
index 331783a75..9719e8fac 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
@@ -126,16 +126,23 @@ type HistogramOpts struct {
// string.
Help string
- // ConstLabels are used to attach fixed labels to this metric. Metrics
- // with the same fully-qualified name must have the same label names in
- // their ConstLabels.
+ // ConstLabels are used to attach fixed labels to this
+ // Histogram. Histograms with the same fully-qualified name must have the
+ // same label names in their ConstLabels.
//
- // ConstLabels are only used rarely. In particular, do not use them to
- // attach the same labels to all your metrics. Those use cases are
- // better covered by target labels set by the scraping Prometheus
- // server, or by one specific metric (e.g. a build_info or a
- // machine_role metric). See also
- // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels
+ // Note that in most cases, labels have a value that varies during the
+ // lifetime of a process. Those labels are usually managed with a
+ // HistogramVec. ConstLabels serve only special purposes. One is for the
+ // special case where the value of a label does not change during the
+ // lifetime of a process, e.g. if the revision of the running binary is
+ // put into a label. Another, more advanced purpose is if more than one
+ // Collector needs to collect Histograms with the same fully-qualified
+ // name. In that case, those Summaries must differ in the values of
+ // their ConstLabels. See the Collector examples.
+ //
+ // If the value of a label never changes (not even between binaries),
+ // that label most likely should not be a label at all (but part of the
+ // metric name).
ConstLabels Labels
// Buckets defines the buckets into which observations are counted. Each
@@ -280,11 +287,12 @@ func (h *histogram) Write(out *dto.Metric) error {
// (e.g. HTTP request latencies, partitioned by status code and method). Create
// instances with NewHistogramVec.
type HistogramVec struct {
- *metricVec
+ *MetricVec
}
// NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and
-// partitioned by the given label names.
+// partitioned by the given label names. At least one label name must be
+// provided.
func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec {
desc := NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
@@ -293,116 +301,47 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec {
opts.ConstLabels,
)
return &HistogramVec{
- metricVec: newMetricVec(desc, func(lvs ...string) Metric {
+ MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
return newHistogram(desc, opts, lvs...)
}),
}
}
-// GetMetricWithLabelValues returns the Histogram for the given slice of label
-// values (same order as the VariableLabels in Desc). If that combination of
-// label values is accessed for the first time, a new Histogram is created.
-//
-// It is possible to call this method without using the returned Histogram to only
-// create the new Histogram but leave it at its starting value, a Histogram without
-// any observations.
-//
-// Keeping the Histogram for later use is possible (and should be considered if
-// performance is critical), but keep in mind that Reset, DeleteLabelValues and
-// Delete can be used to delete the Histogram from the HistogramVec. In that case, the
-// Histogram will still exist, but it will not be exported anymore, even if a
-// Histogram with the same label values is created later. See also the CounterVec
-// example.
-//
-// An error is returned if the number of label values is not the same as the
-// number of VariableLabels in Desc (minus any curried labels).
-//
-// Note that for more than one label value, this method is prone to mistakes
-// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as
-// an alternative to avoid that type of mistake. For higher label numbers, the
-// latter has a much more readable (albeit more verbose) syntax, but it comes
-// with a performance overhead (for creating and processing the Labels map).
-// See also the GaugeVec example.
-func (v *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) {
- metric, err := v.metricVec.getMetricWithLabelValues(lvs...)
+// GetMetricWithLabelValues replaces the method of the same name in
+// MetricVec. The difference is that this method returns a Histogram and not a
+// Metric so that no type conversion is required.
+func (m *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Histogram, error) {
+ metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
if metric != nil {
- return metric.(Observer), err
+ return metric.(Histogram), err
}
return nil, err
}
-// GetMetricWith returns the Histogram for the given Labels map (the label names
-// must match those of the VariableLabels in Desc). If that label map is
-// accessed for the first time, a new Histogram is created. Implications of
-// creating a Histogram without using it and keeping the Histogram for later use
-// are the same as for GetMetricWithLabelValues.
-//
-// An error is returned if the number and names of the Labels are inconsistent
-// with those of the VariableLabels in Desc (minus any curried labels).
-//
-// This method is used for the same purpose as
-// GetMetricWithLabelValues(...string). See there for pros and cons of the two
-// methods.
-func (v *HistogramVec) GetMetricWith(labels Labels) (Observer, error) {
- metric, err := v.metricVec.getMetricWith(labels)
+// GetMetricWith replaces the method of the same name in MetricVec. The
+// difference is that this method returns a Histogram and not a Metric so that no
+// type conversion is required.
+func (m *HistogramVec) GetMetricWith(labels Labels) (Histogram, error) {
+ metric, err := m.MetricVec.GetMetricWith(labels)
if metric != nil {
- return metric.(Observer), err
+ return metric.(Histogram), err
}
return nil, err
}
// WithLabelValues works as GetMetricWithLabelValues, but panics where
-// GetMetricWithLabelValues would have returned an error. Not returning an
-// error allows shortcuts like
+// GetMetricWithLabelValues would have returned an error. By not returning an
+// error, WithLabelValues allows shortcuts like
// myVec.WithLabelValues("404", "GET").Observe(42.21)
-func (v *HistogramVec) WithLabelValues(lvs ...string) Observer {
- h, err := v.GetMetricWithLabelValues(lvs...)
- if err != nil {
- panic(err)
- }
- return h
-}
-
-// With works as GetMetricWith but panics where GetMetricWithLabels would have
-// returned an error. Not returning an error allows shortcuts like
-// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21)
-func (v *HistogramVec) With(labels Labels) Observer {
- h, err := v.GetMetricWith(labels)
- if err != nil {
- panic(err)
- }
- return h
+func (m *HistogramVec) WithLabelValues(lvs ...string) Histogram {
+ return m.MetricVec.WithLabelValues(lvs...).(Histogram)
}
-// CurryWith returns a vector curried with the provided labels, i.e. the
-// returned vector has those labels pre-set for all labeled operations performed
-// on it. The cardinality of the curried vector is reduced accordingly. The
-// order of the remaining labels stays the same (just with the curried labels
-// taken out of the sequence – which is relevant for the
-// (GetMetric)WithLabelValues methods). It is possible to curry a curried
-// vector, but only with labels not yet used for currying before.
-//
-// The metrics contained in the HistogramVec are shared between the curried and
-// uncurried vectors. They are just accessed differently. Curried and uncurried
-// vectors behave identically in terms of collection. Only one must be
-// registered with a given registry (usually the uncurried version). The Reset
-// method deletes all metrics, even if called on a curried vector.
-func (v *HistogramVec) CurryWith(labels Labels) (ObserverVec, error) {
- vec, err := v.curryWith(labels)
- if vec != nil {
- return &HistogramVec{vec}, err
- }
- return nil, err
-}
-
-// MustCurryWith works as CurryWith but panics where CurryWith would have
-// returned an error.
-func (v *HistogramVec) MustCurryWith(labels Labels) ObserverVec {
- vec, err := v.CurryWith(labels)
- if err != nil {
- panic(err)
- }
- return vec
+// With works as GetMetricWith, but panics where GetMetricWithLabels would have
+// returned an error. By not returning an error, With allows shortcuts like
+// myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21)
+func (m *HistogramVec) With(labels Labels) Histogram {
+ return m.MetricVec.With(labels).(Histogram)
}
type constHistogram struct {
@@ -462,8 +401,8 @@ func NewConstHistogram(
buckets map[float64]uint64,
labelValues ...string,
) (Metric, error) {
- if err := validateLabelValues(labelValues, len(desc.variableLabels)); err != nil {
- return nil, err
+ if len(desc.variableLabels) != len(labelValues) {
+ return nil, errInconsistentCardinality
}
return &constHistogram{
desc: desc,
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go
deleted file mode 100644
index 5a20f4b6b..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "math"
- "math/rand"
- "reflect"
- "sort"
- "sync"
- "testing"
- "testing/quick"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func benchmarkHistogramObserve(w int, b *testing.B) {
- b.StopTimer()
-
- wg := new(sync.WaitGroup)
- wg.Add(w)
-
- g := new(sync.WaitGroup)
- g.Add(1)
-
- s := NewHistogram(HistogramOpts{})
-
- for i := 0; i < w; i++ {
- go func() {
- g.Wait()
-
- for i := 0; i < b.N; i++ {
- s.Observe(float64(i))
- }
-
- wg.Done()
- }()
- }
-
- b.StartTimer()
- g.Done()
- wg.Wait()
-}
-
-func BenchmarkHistogramObserve1(b *testing.B) {
- benchmarkHistogramObserve(1, b)
-}
-
-func BenchmarkHistogramObserve2(b *testing.B) {
- benchmarkHistogramObserve(2, b)
-}
-
-func BenchmarkHistogramObserve4(b *testing.B) {
- benchmarkHistogramObserve(4, b)
-}
-
-func BenchmarkHistogramObserve8(b *testing.B) {
- benchmarkHistogramObserve(8, b)
-}
-
-func benchmarkHistogramWrite(w int, b *testing.B) {
- b.StopTimer()
-
- wg := new(sync.WaitGroup)
- wg.Add(w)
-
- g := new(sync.WaitGroup)
- g.Add(1)
-
- s := NewHistogram(HistogramOpts{})
-
- for i := 0; i < 1000000; i++ {
- s.Observe(float64(i))
- }
-
- for j := 0; j < w; j++ {
- outs := make([]dto.Metric, b.N)
-
- go func(o []dto.Metric) {
- g.Wait()
-
- for i := 0; i < b.N; i++ {
- s.Write(&o[i])
- }
-
- wg.Done()
- }(outs)
- }
-
- b.StartTimer()
- g.Done()
- wg.Wait()
-}
-
-func BenchmarkHistogramWrite1(b *testing.B) {
- benchmarkHistogramWrite(1, b)
-}
-
-func BenchmarkHistogramWrite2(b *testing.B) {
- benchmarkHistogramWrite(2, b)
-}
-
-func BenchmarkHistogramWrite4(b *testing.B) {
- benchmarkHistogramWrite(4, b)
-}
-
-func BenchmarkHistogramWrite8(b *testing.B) {
- benchmarkHistogramWrite(8, b)
-}
-
-func TestHistogramNonMonotonicBuckets(t *testing.T) {
- testCases := map[string][]float64{
- "not strictly monotonic": {1, 2, 2, 3},
- "not monotonic at all": {1, 2, 4, 3, 5},
- "have +Inf in the middle": {1, 2, math.Inf(+1), 3},
- }
- for name, buckets := range testCases {
- func() {
- defer func() {
- if r := recover(); r == nil {
- t.Errorf("Buckets %v are %s but NewHistogram did not panic.", buckets, name)
- }
- }()
- _ = NewHistogram(HistogramOpts{
- Name: "test_histogram",
- Help: "helpless",
- Buckets: buckets,
- })
- }()
- }
-}
-
-// Intentionally adding +Inf here to test if that case is handled correctly.
-// Also, getCumulativeCounts depends on it.
-var testBuckets = []float64{-2, -1, -0.5, 0, 0.5, 1, 2, math.Inf(+1)}
-
-func TestHistogramConcurrency(t *testing.T) {
- if testing.Short() {
- t.Skip("Skipping test in short mode.")
- }
-
- rand.Seed(42)
-
- it := func(n uint32) bool {
- mutations := int(n%1e4 + 1e4)
- concLevel := int(n%5 + 1)
- total := mutations * concLevel
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- sum := NewHistogram(HistogramOpts{
- Name: "test_histogram",
- Help: "helpless",
- Buckets: testBuckets,
- })
-
- allVars := make([]float64, total)
- var sampleSum float64
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- for j := 0; j < mutations; j++ {
- v := rand.NormFloat64()
- vals[j] = v
- allVars[i*mutations+j] = v
- sampleSum += v
- }
-
- go func(vals []float64) {
- start.Wait()
- for _, v := range vals {
- sum.Observe(v)
- }
- end.Done()
- }(vals)
- }
- sort.Float64s(allVars)
- start.Done()
- end.Wait()
-
- m := &dto.Metric{}
- sum.Write(m)
- if got, want := int(*m.Histogram.SampleCount), total; got != want {
- t.Errorf("got sample count %d, want %d", got, want)
- }
- if got, want := *m.Histogram.SampleSum, sampleSum; math.Abs((got-want)/want) > 0.001 {
- t.Errorf("got sample sum %f, want %f", got, want)
- }
-
- wantCounts := getCumulativeCounts(allVars)
-
- if got, want := len(m.Histogram.Bucket), len(testBuckets)-1; got != want {
- t.Errorf("got %d buckets in protobuf, want %d", got, want)
- }
- for i, wantBound := range testBuckets {
- if i == len(testBuckets)-1 {
- break // No +Inf bucket in protobuf.
- }
- if gotBound := *m.Histogram.Bucket[i].UpperBound; gotBound != wantBound {
- t.Errorf("got bound %f, want %f", gotBound, wantBound)
- }
- if gotCount, wantCount := *m.Histogram.Bucket[i].CumulativeCount, wantCounts[i]; gotCount != wantCount {
- t.Errorf("got count %d, want %d", gotCount, wantCount)
- }
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Error(err)
- }
-}
-
-func TestHistogramVecConcurrency(t *testing.T) {
- if testing.Short() {
- t.Skip("Skipping test in short mode.")
- }
-
- rand.Seed(42)
-
- objectives := make([]float64, 0, len(DefObjectives))
- for qu := range DefObjectives {
-
- objectives = append(objectives, qu)
- }
- sort.Float64s(objectives)
-
- it := func(n uint32) bool {
- mutations := int(n%1e4 + 1e4)
- concLevel := int(n%7 + 1)
- vecLength := int(n%3 + 1)
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- his := NewHistogramVec(
- HistogramOpts{
- Name: "test_histogram",
- Help: "helpless",
- Buckets: []float64{-2, -1, -0.5, 0, 0.5, 1, 2, math.Inf(+1)},
- },
- []string{"label"},
- )
-
- allVars := make([][]float64, vecLength)
- sampleSums := make([]float64, vecLength)
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- picks := make([]int, mutations)
- for j := 0; j < mutations; j++ {
- v := rand.NormFloat64()
- vals[j] = v
- pick := rand.Intn(vecLength)
- picks[j] = pick
- allVars[pick] = append(allVars[pick], v)
- sampleSums[pick] += v
- }
-
- go func(vals []float64) {
- start.Wait()
- for i, v := range vals {
- his.WithLabelValues(string('A' + picks[i])).Observe(v)
- }
- end.Done()
- }(vals)
- }
- for _, vars := range allVars {
- sort.Float64s(vars)
- }
- start.Done()
- end.Wait()
-
- for i := 0; i < vecLength; i++ {
- m := &dto.Metric{}
- s := his.WithLabelValues(string('A' + i))
- s.(Histogram).Write(m)
-
- if got, want := len(m.Histogram.Bucket), len(testBuckets)-1; got != want {
- t.Errorf("got %d buckets in protobuf, want %d", got, want)
- }
- if got, want := int(*m.Histogram.SampleCount), len(allVars[i]); got != want {
- t.Errorf("got sample count %d, want %d", got, want)
- }
- if got, want := *m.Histogram.SampleSum, sampleSums[i]; math.Abs((got-want)/want) > 0.001 {
- t.Errorf("got sample sum %f, want %f", got, want)
- }
-
- wantCounts := getCumulativeCounts(allVars[i])
-
- for j, wantBound := range testBuckets {
- if j == len(testBuckets)-1 {
- break // No +Inf bucket in protobuf.
- }
- if gotBound := *m.Histogram.Bucket[j].UpperBound; gotBound != wantBound {
- t.Errorf("got bound %f, want %f", gotBound, wantBound)
- }
- if gotCount, wantCount := *m.Histogram.Bucket[j].CumulativeCount, wantCounts[j]; gotCount != wantCount {
- t.Errorf("got count %d, want %d", gotCount, wantCount)
- }
- }
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Error(err)
- }
-}
-
-func getCumulativeCounts(vars []float64) []uint64 {
- counts := make([]uint64, len(testBuckets))
- for _, v := range vars {
- for i := len(testBuckets) - 1; i >= 0; i-- {
- if v > testBuckets[i] {
- break
- }
- counts[i]++
- }
- }
- return counts
-}
-
-func TestBuckets(t *testing.T) {
- got := LinearBuckets(-15, 5, 6)
- want := []float64{-15, -10, -5, 0, 5, 10}
- if !reflect.DeepEqual(got, want) {
- t.Errorf("linear buckets: got %v, want %v", got, want)
- }
-
- got = ExponentialBuckets(100, 1.2, 3)
- want = []float64{100, 120, 144}
- if !reflect.DeepEqual(got, want) {
- t.Errorf("linear buckets: got %v, want %v", got, want)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http.go b/vendor/github.com/prometheus/client_golang/prometheus/http.go
index dd0f8197f..67ee5ac79 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/http.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/http.go
@@ -61,8 +61,8 @@ func giveBuf(buf *bytes.Buffer) {
// name).
//
// Deprecated: Please note the issues described in the doc comment of
-// InstrumentHandler. You might want to consider using
-// promhttp.InstrumentedHandler instead.
+// InstrumentHandler. You might want to consider using promhttp.Handler instead
+// (which is non instrumented).
func Handler() http.Handler {
return InstrumentHandler("prometheus", UninstrumentedHandler())
}
@@ -95,7 +95,7 @@ func UninstrumentedHandler() http.Handler {
closer.Close()
}
if lastErr != nil && buf.Len() == 0 {
- http.Error(w, "No metrics encoded, last error:\n\n"+lastErr.Error(), http.StatusInternalServerError)
+ http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError)
return
}
header := w.Header()
@@ -158,8 +158,7 @@ func nowSeries(t ...time.Time) nower {
// value. http_requests_total is a metric vector partitioned by HTTP method
// (label name "method") and HTTP status code (label name "code").
//
-// Deprecated: InstrumentHandler has several issues. Use the tooling provided in
-// package promhttp instead. The issues are the following:
+// Deprecated: InstrumentHandler has several issues:
//
// - It uses Summaries rather than Histograms. Summaries are not useful if
// aggregation across multiple instances is required.
@@ -173,8 +172,9 @@ func nowSeries(t ...time.Time) nower {
// httputil.ReverseProxy is a prominent example for a handler
// performing such writes.
//
-// - It has additional issues with HTTP/2, cf.
-// https://github.com/prometheus/client_golang/issues/272.
+// Upcoming versions of this package will provide ways of instrumenting HTTP
+// handlers that are more flexible and have fewer issues. Please prefer direct
+// instrumentation in the meantime.
func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc {
return InstrumentHandlerFunc(handlerName, handler.ServeHTTP)
}
@@ -184,13 +184,12 @@ func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFun
// issues).
//
// Deprecated: InstrumentHandlerFunc is deprecated for the same reasons as
-// InstrumentHandler is. Use the tooling provided in package promhttp instead.
+// InstrumentHandler is.
func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
return InstrumentHandlerFuncWithOpts(
SummaryOpts{
Subsystem: "http",
ConstLabels: Labels{"handler": handlerName},
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
},
handlerFunc,
)
@@ -223,7 +222,7 @@ func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWri
// SummaryOpts.
//
// Deprecated: InstrumentHandlerWithOpts is deprecated for the same reasons as
-// InstrumentHandler is. Use the tooling provided in package promhttp instead.
+// InstrumentHandler is.
func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc {
return InstrumentHandlerFuncWithOpts(opts, handler.ServeHTTP)
}
@@ -234,7 +233,7 @@ func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.Hand
// SummaryOpts are used.
//
// Deprecated: InstrumentHandlerFuncWithOpts is deprecated for the same reasons
-// as InstrumentHandler is. Use the tooling provided in package promhttp instead.
+// as InstrumentHandler is.
func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
reqCnt := NewCounterVec(
CounterOpts{
@@ -246,52 +245,34 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo
},
instLabels,
)
- if err := Register(reqCnt); err != nil {
- if are, ok := err.(AlreadyRegisteredError); ok {
- reqCnt = are.ExistingCollector.(*CounterVec)
- } else {
- panic(err)
- }
- }
opts.Name = "request_duration_microseconds"
opts.Help = "The HTTP request latencies in microseconds."
reqDur := NewSummary(opts)
- if err := Register(reqDur); err != nil {
- if are, ok := err.(AlreadyRegisteredError); ok {
- reqDur = are.ExistingCollector.(Summary)
- } else {
- panic(err)
- }
- }
opts.Name = "request_size_bytes"
opts.Help = "The HTTP request sizes in bytes."
reqSz := NewSummary(opts)
- if err := Register(reqSz); err != nil {
- if are, ok := err.(AlreadyRegisteredError); ok {
- reqSz = are.ExistingCollector.(Summary)
- } else {
- panic(err)
- }
- }
opts.Name = "response_size_bytes"
opts.Help = "The HTTP response sizes in bytes."
resSz := NewSummary(opts)
- if err := Register(resSz); err != nil {
- if are, ok := err.(AlreadyRegisteredError); ok {
- resSz = are.ExistingCollector.(Summary)
- } else {
- panic(err)
- }
- }
+
+ regReqCnt := MustRegisterOrGet(reqCnt).(*CounterVec)
+ regReqDur := MustRegisterOrGet(reqDur).(Summary)
+ regReqSz := MustRegisterOrGet(reqSz).(Summary)
+ regResSz := MustRegisterOrGet(resSz).(Summary)
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
now := time.Now()
delegate := &responseWriterDelegator{ResponseWriter: w}
- out := computeApproximateRequestSize(r)
+ out := make(chan int)
+ urlLen := 0
+ if r.URL != nil {
+ urlLen = len(r.URL.String())
+ }
+ go computeApproximateRequestSize(r, out, urlLen)
_, cn := w.(http.CloseNotifier)
_, fl := w.(http.Flusher)
@@ -309,44 +290,30 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo
method := sanitizeMethod(r.Method)
code := sanitizeCode(delegate.status)
- reqCnt.WithLabelValues(method, code).Inc()
- reqDur.Observe(elapsed)
- resSz.Observe(float64(delegate.written))
- reqSz.Observe(float64(<-out))
+ regReqCnt.WithLabelValues(method, code).Inc()
+ regReqDur.Observe(elapsed)
+ regResSz.Observe(float64(delegate.written))
+ regReqSz.Observe(float64(<-out))
})
}
-func computeApproximateRequestSize(r *http.Request) <-chan int {
- // Get URL length in current go routine for avoiding a race condition.
- // HandlerFunc that runs in parallel may modify the URL.
- s := 0
- if r.URL != nil {
- s += len(r.URL.String())
- }
-
- out := make(chan int, 1)
-
- go func() {
- s += len(r.Method)
- s += len(r.Proto)
- for name, values := range r.Header {
- s += len(name)
- for _, value := range values {
- s += len(value)
- }
+func computeApproximateRequestSize(r *http.Request, out chan int, s int) {
+ s += len(r.Method)
+ s += len(r.Proto)
+ for name, values := range r.Header {
+ s += len(name)
+ for _, value := range values {
+ s += len(value)
}
- s += len(r.Host)
+ }
+ s += len(r.Host)
- // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL.
+ // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL.
- if r.ContentLength != -1 {
- s += int(r.ContentLength)
- }
- out <- s
- close(out)
- }()
-
- return out
+ if r.ContentLength != -1 {
+ s += int(r.ContentLength)
+ }
+ out <- s
}
type responseWriterDelegator struct {
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http_test.go b/vendor/github.com/prometheus/client_golang/prometheus/http_test.go
deleted file mode 100644
index 0c7fa2347..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/http_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-type respBody string
-
-func (b respBody) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusTeapot)
- w.Write([]byte(b))
-}
-
-func TestInstrumentHandler(t *testing.T) {
- defer func(n nower) {
- now = n.(nower)
- }(now)
-
- instant := time.Now()
- end := instant.Add(30 * time.Second)
- now = nowSeries(instant, end)
- respBody := respBody("Howdy there!")
-
- hndlr := InstrumentHandler("test-handler", respBody)
-
- opts := SummaryOpts{
- Subsystem: "http",
- ConstLabels: Labels{"handler": "test-handler"},
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- }
-
- reqCnt := NewCounterVec(
- CounterOpts{
- Namespace: opts.Namespace,
- Subsystem: opts.Subsystem,
- Name: "requests_total",
- Help: "Total number of HTTP requests made.",
- ConstLabels: opts.ConstLabels,
- },
- instLabels,
- )
- err := Register(reqCnt)
- if err == nil {
- t.Fatal("expected reqCnt to be registered already")
- }
- if are, ok := err.(AlreadyRegisteredError); ok {
- reqCnt = are.ExistingCollector.(*CounterVec)
- } else {
- t.Fatal("unexpected registration error:", err)
- }
-
- opts.Name = "request_duration_microseconds"
- opts.Help = "The HTTP request latencies in microseconds."
- reqDur := NewSummary(opts)
- err = Register(reqDur)
- if err == nil {
- t.Fatal("expected reqDur to be registered already")
- }
- if are, ok := err.(AlreadyRegisteredError); ok {
- reqDur = are.ExistingCollector.(Summary)
- } else {
- t.Fatal("unexpected registration error:", err)
- }
-
- opts.Name = "request_size_bytes"
- opts.Help = "The HTTP request sizes in bytes."
- reqSz := NewSummary(opts)
- err = Register(reqSz)
- if err == nil {
- t.Fatal("expected reqSz to be registered already")
- }
- if _, ok := err.(AlreadyRegisteredError); !ok {
- t.Fatal("unexpected registration error:", err)
- }
-
- opts.Name = "response_size_bytes"
- opts.Help = "The HTTP response sizes in bytes."
- resSz := NewSummary(opts)
- err = Register(resSz)
- if err == nil {
- t.Fatal("expected resSz to be registered already")
- }
- if _, ok := err.(AlreadyRegisteredError); !ok {
- t.Fatal("unexpected registration error:", err)
- }
-
- reqCnt.Reset()
-
- resp := httptest.NewRecorder()
- req := &http.Request{
- Method: "GET",
- }
-
- hndlr.ServeHTTP(resp, req)
-
- if resp.Code != http.StatusTeapot {
- t.Fatalf("expected status %d, got %d", http.StatusTeapot, resp.Code)
- }
- if string(resp.Body.Bytes()) != "Howdy there!" {
- t.Fatalf("expected body %s, got %s", "Howdy there!", string(resp.Body.Bytes()))
- }
-
- out := &dto.Metric{}
- reqDur.Write(out)
- if want, got := "test-handler", out.Label[0].GetValue(); want != got {
- t.Errorf("want label value %q in reqDur, got %q", want, got)
- }
- if want, got := uint64(1), out.Summary.GetSampleCount(); want != got {
- t.Errorf("want sample count %d in reqDur, got %d", want, got)
- }
-
- out.Reset()
- if want, got := 1, len(reqCnt.metricMap.metrics); want != got {
- t.Errorf("want %d children in reqCnt, got %d", want, got)
- }
- cnt, err := reqCnt.GetMetricWithLabelValues("get", "418")
- if err != nil {
- t.Fatal(err)
- }
- cnt.Write(out)
- if want, got := "418", out.Label[0].GetValue(); want != got {
- t.Errorf("want label value %q in reqCnt, got %q", want, got)
- }
- if want, got := "test-handler", out.Label[1].GetValue(); want != got {
- t.Errorf("want label value %q in reqCnt, got %q", want, got)
- }
- if want, got := "get", out.Label[2].GetValue(); want != got {
- t.Errorf("want label value %q in reqCnt, got %q", want, got)
- }
- if out.Counter == nil {
- t.Fatal("expected non-nil counter in reqCnt")
- }
- if want, got := 1., out.Counter.GetValue(); want != got {
- t.Errorf("want reqCnt of %f, got %f", want, got)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/labels.go b/vendor/github.com/prometheus/client_golang/prometheus/labels.go
deleted file mode 100644
index 2502e3734..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/labels.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package prometheus
-
-import (
- "errors"
- "fmt"
- "strings"
- "unicode/utf8"
-
- "github.com/prometheus/common/model"
-)
-
-// Labels represents a collection of label name -> value mappings. This type is
-// commonly used with the With(Labels) and GetMetricWith(Labels) methods of
-// metric vector Collectors, e.g.:
-// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42)
-//
-// The other use-case is the specification of constant label pairs in Opts or to
-// create a Desc.
-type Labels map[string]string
-
-// reservedLabelPrefix is a prefix which is not legal in user-supplied
-// label names.
-const reservedLabelPrefix = "__"
-
-var errInconsistentCardinality = errors.New("inconsistent label cardinality")
-
-func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error {
- if len(labels) != expectedNumberOfValues {
- return errInconsistentCardinality
- }
-
- for name, val := range labels {
- if !utf8.ValidString(val) {
- return fmt.Errorf("label %s: value %q is not valid UTF-8", name, val)
- }
- }
-
- return nil
-}
-
-func validateLabelValues(vals []string, expectedNumberOfValues int) error {
- if len(vals) != expectedNumberOfValues {
- return errInconsistentCardinality
- }
-
- for _, val := range vals {
- if !utf8.ValidString(val) {
- return fmt.Errorf("label value %q is not valid UTF-8", val)
- }
- }
-
- return nil
-}
-
-func checkLabelName(l string) bool {
- return model.LabelName(l).IsValid() && !strings.HasPrefix(l, reservedLabelPrefix)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/metric.go
index 6213ee812..d4063d98f 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/metric.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/metric.go
@@ -79,12 +79,20 @@ type Opts struct {
// with the same fully-qualified name must have the same label names in
// their ConstLabels.
//
- // ConstLabels are only used rarely. In particular, do not use them to
- // attach the same labels to all your metrics. Those use cases are
- // better covered by target labels set by the scraping Prometheus
- // server, or by one specific metric (e.g. a build_info or a
- // machine_role metric). See also
- // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels
+ // Note that in most cases, labels have a value that varies during the
+ // lifetime of a process. Those labels are usually managed with a metric
+ // vector collector (like CounterVec, GaugeVec, UntypedVec). ConstLabels
+ // serve only special purposes. One is for the special case where the
+ // value of a label does not change during the lifetime of a process,
+ // e.g. if the revision of the running binary is put into a
+ // label. Another, more advanced purpose is if more than one Collector
+ // needs to collect Metrics with the same fully-qualified name. In that
+ // case, those Metrics must differ in the values of their
+ // ConstLabels. See the Collector examples.
+ //
+ // If the value of a label never changes (not even between binaries),
+ // that label most likely should not be a label at all (but part of the
+ // metric name).
ConstLabels Labels
}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric_test.go b/vendor/github.com/prometheus/client_golang/prometheus/metric_test.go
deleted file mode 100644
index 7145f5e53..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/metric_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import "testing"
-
-func TestBuildFQName(t *testing.T) {
- scenarios := []struct{ namespace, subsystem, name, result string }{
- {"a", "b", "c", "a_b_c"},
- {"", "b", "c", "b_c"},
- {"a", "", "c", "a_c"},
- {"", "", "c", "c"},
- {"a", "b", "", ""},
- {"a", "", "", ""},
- {"", "b", "", ""},
- {" ", "", "", ""},
- }
-
- for i, s := range scenarios {
- if want, got := s.result, BuildFQName(s.namespace, s.subsystem, s.name); want != got {
- t.Errorf("%d. want %s, got %s", i, want, got)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/observer.go b/vendor/github.com/prometheus/client_golang/prometheus/observer.go
deleted file mode 100644
index 5806cd09e..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/observer.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package prometheus
-
-// Observer is the interface that wraps the Observe method, which is used by
-// Histogram and Summary to add observations.
-type Observer interface {
- Observe(float64)
-}
-
-// The ObserverFunc type is an adapter to allow the use of ordinary
-// functions as Observers. If f is a function with the appropriate
-// signature, ObserverFunc(f) is an Observer that calls f.
-//
-// This adapter is usually used in connection with the Timer type, and there are
-// two general use cases:
-//
-// The most common one is to use a Gauge as the Observer for a Timer.
-// See the "Gauge" Timer example.
-//
-// The more advanced use case is to create a function that dynamically decides
-// which Observer to use for observing the duration. See the "Complex" Timer
-// example.
-type ObserverFunc func(float64)
-
-// Observe calls f(value). It implements Observer.
-func (f ObserverFunc) Observe(value float64) {
- f(value)
-}
-
-// ObserverVec is an interface implemented by `HistogramVec` and `SummaryVec`.
-type ObserverVec interface {
- GetMetricWith(Labels) (Observer, error)
- GetMetricWithLabelValues(lvs ...string) (Observer, error)
- With(Labels) Observer
- WithLabelValues(...string) Observer
- CurryWith(Labels) (ObserverVec, error)
- MustCurryWith(Labels) ObserverVec
-
- Collector
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go
index 32ac74a7f..e31e62e78 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go
@@ -19,18 +19,15 @@ type processCollector struct {
pid int
collectFn func(chan<- Metric)
pidFn func() (int, error)
- cpuTotal *Desc
- openFDs, maxFDs *Desc
- vsize, rss *Desc
- startTime *Desc
+ cpuTotal Counter
+ openFDs, maxFDs Gauge
+ vsize, rss Gauge
+ startTime Gauge
}
// NewProcessCollector returns a collector which exports the current state of
-// process metrics including CPU, memory and file descriptor usage as well as
-// the process start time for the given process ID under the given namespace.
-//
-// Currently, the collector depends on a Linux-style proc filesystem and
-// therefore only exports metrics for Linux.
+// process metrics including cpu, memory and file descriptor usage as well as
+// the process start time for the given process id under the given namespace.
func NewProcessCollector(pid int, namespace string) Collector {
return NewProcessCollectorPIDFn(
func() (int, error) { return pid, nil },
@@ -38,51 +35,49 @@ func NewProcessCollector(pid int, namespace string) Collector {
)
}
-// NewProcessCollectorPIDFn works like NewProcessCollector but the process ID is
-// determined on each collect anew by calling the given pidFn function.
+// NewProcessCollectorPIDFn returns a collector which exports the current state
+// of process metrics including cpu, memory and file descriptor usage as well
+// as the process start time under the given namespace. The given pidFn is
+// called on each collect and is used to determine the process to export
+// metrics for.
func NewProcessCollectorPIDFn(
pidFn func() (int, error),
namespace string,
) Collector {
- ns := ""
- if len(namespace) > 0 {
- ns = namespace + "_"
- }
-
c := processCollector{
pidFn: pidFn,
collectFn: func(chan<- Metric) {},
- cpuTotal: NewDesc(
- ns+"process_cpu_seconds_total",
- "Total user and system CPU time spent in seconds.",
- nil, nil,
- ),
- openFDs: NewDesc(
- ns+"process_open_fds",
- "Number of open file descriptors.",
- nil, nil,
- ),
- maxFDs: NewDesc(
- ns+"process_max_fds",
- "Maximum number of open file descriptors.",
- nil, nil,
- ),
- vsize: NewDesc(
- ns+"process_virtual_memory_bytes",
- "Virtual memory size in bytes.",
- nil, nil,
- ),
- rss: NewDesc(
- ns+"process_resident_memory_bytes",
- "Resident memory size in bytes.",
- nil, nil,
- ),
- startTime: NewDesc(
- ns+"process_start_time_seconds",
- "Start time of the process since unix epoch in seconds.",
- nil, nil,
- ),
+ cpuTotal: NewCounter(CounterOpts{
+ Namespace: namespace,
+ Name: "process_cpu_seconds_total",
+ Help: "Total user and system CPU time spent in seconds.",
+ }),
+ openFDs: NewGauge(GaugeOpts{
+ Namespace: namespace,
+ Name: "process_open_fds",
+ Help: "Number of open file descriptors.",
+ }),
+ maxFDs: NewGauge(GaugeOpts{
+ Namespace: namespace,
+ Name: "process_max_fds",
+ Help: "Maximum number of open file descriptors.",
+ }),
+ vsize: NewGauge(GaugeOpts{
+ Namespace: namespace,
+ Name: "process_virtual_memory_bytes",
+ Help: "Virtual memory size in bytes.",
+ }),
+ rss: NewGauge(GaugeOpts{
+ Namespace: namespace,
+ Name: "process_resident_memory_bytes",
+ Help: "Resident memory size in bytes.",
+ }),
+ startTime: NewGauge(GaugeOpts{
+ Namespace: namespace,
+ Name: "process_start_time_seconds",
+ Help: "Start time of the process since unix epoch in seconds.",
+ }),
}
// Set up process metric collection if supported by the runtime.
@@ -95,12 +90,12 @@ func NewProcessCollectorPIDFn(
// Describe returns all descriptions of the collector.
func (c *processCollector) Describe(ch chan<- *Desc) {
- ch <- c.cpuTotal
- ch <- c.openFDs
- ch <- c.maxFDs
- ch <- c.vsize
- ch <- c.rss
- ch <- c.startTime
+ ch <- c.cpuTotal.Desc()
+ ch <- c.openFDs.Desc()
+ ch <- c.maxFDs.Desc()
+ ch <- c.vsize.Desc()
+ ch <- c.rss.Desc()
+ ch <- c.startTime.Desc()
}
// Collect returns the current state of all metrics of the collector.
@@ -122,19 +117,26 @@ func (c *processCollector) processCollect(ch chan<- Metric) {
}
if stat, err := p.NewStat(); err == nil {
- ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime())
- ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory()))
- ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory()))
+ c.cpuTotal.Set(stat.CPUTime())
+ ch <- c.cpuTotal
+ c.vsize.Set(float64(stat.VirtualMemory()))
+ ch <- c.vsize
+ c.rss.Set(float64(stat.ResidentMemory()))
+ ch <- c.rss
+
if startTime, err := stat.StartTime(); err == nil {
- ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime)
+ c.startTime.Set(startTime)
+ ch <- c.startTime
}
}
if fds, err := p.FileDescriptorsLen(); err == nil {
- ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds))
+ c.openFDs.Set(float64(fds))
+ ch <- c.openFDs
}
if limits, err := p.NewLimits(); err == nil {
- ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles))
+ c.maxFDs.Set(float64(limits.OpenFiles))
+ ch <- c.maxFDs
}
}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go
deleted file mode 100644
index c7acb47fe..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package prometheus
-
-import (
- "bytes"
- "os"
- "regexp"
- "testing"
-
- "github.com/prometheus/common/expfmt"
- "github.com/prometheus/procfs"
-)
-
-func TestProcessCollector(t *testing.T) {
- if _, err := procfs.Self(); err != nil {
- t.Skipf("skipping TestProcessCollector, procfs not available: %s", err)
- }
-
- registry := NewRegistry()
- if err := registry.Register(NewProcessCollector(os.Getpid(), "")); err != nil {
- t.Fatal(err)
- }
- if err := registry.Register(NewProcessCollectorPIDFn(
- func() (int, error) { return os.Getpid(), nil }, "foobar"),
- ); err != nil {
- t.Fatal(err)
- }
-
- mfs, err := registry.Gather()
- if err != nil {
- t.Fatal(err)
- }
-
- var buf bytes.Buffer
- for _, mf := range mfs {
- if _, err := expfmt.MetricFamilyToText(&buf, mf); err != nil {
- t.Fatal(err)
- }
- }
-
- for _, re := range []*regexp.Regexp{
- regexp.MustCompile("\nprocess_cpu_seconds_total [0-9]"),
- regexp.MustCompile("\nprocess_max_fds [1-9]"),
- regexp.MustCompile("\nprocess_open_fds [1-9]"),
- regexp.MustCompile("\nprocess_virtual_memory_bytes [1-9]"),
- regexp.MustCompile("\nprocess_resident_memory_bytes [1-9]"),
- regexp.MustCompile("\nprocess_start_time_seconds [0-9.]{10,}"),
- regexp.MustCompile("\nfoobar_process_cpu_seconds_total [0-9]"),
- regexp.MustCompile("\nfoobar_process_max_fds [1-9]"),
- regexp.MustCompile("\nfoobar_process_open_fds [1-9]"),
- regexp.MustCompile("\nfoobar_process_virtual_memory_bytes [1-9]"),
- regexp.MustCompile("\nfoobar_process_resident_memory_bytes [1-9]"),
- regexp.MustCompile("\nfoobar_process_start_time_seconds [0-9.]{10,}"),
- } {
- if !re.Match(buf.Bytes()) {
- t.Errorf("want body to match %s\n%s", re, buf.String())
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go
deleted file mode 100644
index 9c1c66dcc..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package promhttp
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
-)
-
-const (
- closeNotifier = 1 << iota
- flusher
- hijacker
- readerFrom
- pusher
-)
-
-type delegator interface {
- http.ResponseWriter
-
- Status() int
- Written() int64
-}
-
-type responseWriterDelegator struct {
- http.ResponseWriter
-
- handler, method string
- status int
- written int64
- wroteHeader bool
- observeWriteHeader func(int)
-}
-
-func (r *responseWriterDelegator) Status() int {
- return r.status
-}
-
-func (r *responseWriterDelegator) Written() int64 {
- return r.written
-}
-
-func (r *responseWriterDelegator) WriteHeader(code int) {
- r.status = code
- r.wroteHeader = true
- r.ResponseWriter.WriteHeader(code)
- if r.observeWriteHeader != nil {
- r.observeWriteHeader(code)
- }
-}
-
-func (r *responseWriterDelegator) Write(b []byte) (int, error) {
- if !r.wroteHeader {
- r.WriteHeader(http.StatusOK)
- }
- n, err := r.ResponseWriter.Write(b)
- r.written += int64(n)
- return n, err
-}
-
-type closeNotifierDelegator struct{ *responseWriterDelegator }
-type flusherDelegator struct{ *responseWriterDelegator }
-type hijackerDelegator struct{ *responseWriterDelegator }
-type readerFromDelegator struct{ *responseWriterDelegator }
-
-func (d *closeNotifierDelegator) CloseNotify() <-chan bool {
- return d.ResponseWriter.(http.CloseNotifier).CloseNotify()
-}
-func (d *flusherDelegator) Flush() {
- d.ResponseWriter.(http.Flusher).Flush()
-}
-func (d *hijackerDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- return d.ResponseWriter.(http.Hijacker).Hijack()
-}
-func (d *readerFromDelegator) ReadFrom(re io.Reader) (int64, error) {
- if !d.wroteHeader {
- d.WriteHeader(http.StatusOK)
- }
- n, err := d.ResponseWriter.(io.ReaderFrom).ReadFrom(re)
- d.written += n
- return n, err
-}
-
-var pickDelegator = make([]func(*responseWriterDelegator) delegator, 32)
-
-func init() {
- // TODO(beorn7): Code generation would help here.
- pickDelegator[0] = func(d *responseWriterDelegator) delegator { // 0
- return d
- }
- pickDelegator[closeNotifier] = func(d *responseWriterDelegator) delegator { // 1
- return &closeNotifierDelegator{d}
- }
- pickDelegator[flusher] = func(d *responseWriterDelegator) delegator { // 2
- return &flusherDelegator{d}
- }
- pickDelegator[flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 3
- return struct {
- *responseWriterDelegator
- http.Flusher
- http.CloseNotifier
- }{d, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[hijacker] = func(d *responseWriterDelegator) delegator { // 4
- return &hijackerDelegator{d}
- }
- pickDelegator[hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 5
- return struct {
- *responseWriterDelegator
- http.Hijacker
- http.CloseNotifier
- }{d, &hijackerDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 6
- return struct {
- *responseWriterDelegator
- http.Hijacker
- http.Flusher
- }{d, &hijackerDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 7
- return struct {
- *responseWriterDelegator
- http.Hijacker
- http.Flusher
- http.CloseNotifier
- }{d, &hijackerDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[readerFrom] = func(d *responseWriterDelegator) delegator { // 8
- return readerFromDelegator{d}
- }
- pickDelegator[readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 9
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.CloseNotifier
- }{d, &readerFromDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 10
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Flusher
- }{d, &readerFromDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 11
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Flusher
- http.CloseNotifier
- }{d, &readerFromDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 12
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Hijacker
- }{d, &readerFromDelegator{d}, &hijackerDelegator{d}}
- }
- pickDelegator[readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 13
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Hijacker
- http.CloseNotifier
- }{d, &readerFromDelegator{d}, &hijackerDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 14
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Hijacker
- http.Flusher
- }{d, &readerFromDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 15
- return struct {
- *responseWriterDelegator
- io.ReaderFrom
- http.Hijacker
- http.Flusher
- http.CloseNotifier
- }{d, &readerFromDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go
deleted file mode 100644
index 75a905e2f..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build go1.8
-
-package promhttp
-
-import (
- "io"
- "net/http"
-)
-
-type pusherDelegator struct{ *responseWriterDelegator }
-
-func (d *pusherDelegator) Push(target string, opts *http.PushOptions) error {
- return d.ResponseWriter.(http.Pusher).Push(target, opts)
-}
-
-func init() {
- pickDelegator[pusher] = func(d *responseWriterDelegator) delegator { // 16
- return &pusherDelegator{d}
- }
- pickDelegator[pusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 17
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+flusher] = func(d *responseWriterDelegator) delegator { // 18
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Flusher
- }{d, &pusherDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[pusher+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 19
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Flusher
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+hijacker] = func(d *responseWriterDelegator) delegator { // 20
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Hijacker
- }{d, &pusherDelegator{d}, &hijackerDelegator{d}}
- }
- pickDelegator[pusher+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 21
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Hijacker
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &hijackerDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 22
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Hijacker
- http.Flusher
- }{d, &pusherDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[pusher+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { //23
- return struct {
- *responseWriterDelegator
- http.Pusher
- http.Hijacker
- http.Flusher
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+readerFrom] = func(d *responseWriterDelegator) delegator { // 24
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 25
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 26
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Flusher
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 27
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Flusher
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 28
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Hijacker
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &hijackerDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 29
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Hijacker
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &hijackerDelegator{d}, &closeNotifierDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 30
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Hijacker
- http.Flusher
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}}
- }
- pickDelegator[pusher+readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 31
- return struct {
- *responseWriterDelegator
- http.Pusher
- io.ReaderFrom
- http.Hijacker
- http.Flusher
- http.CloseNotifier
- }{d, &pusherDelegator{d}, &readerFromDelegator{d}, &hijackerDelegator{d}, &flusherDelegator{d}, &closeNotifierDelegator{d}}
- }
-}
-
-func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator {
- d := &responseWriterDelegator{
- ResponseWriter: w,
- observeWriteHeader: observeWriteHeaderFunc,
- }
-
- id := 0
- if _, ok := w.(http.CloseNotifier); ok {
- id += closeNotifier
- }
- if _, ok := w.(http.Flusher); ok {
- id += flusher
- }
- if _, ok := w.(http.Hijacker); ok {
- id += hijacker
- }
- if _, ok := w.(io.ReaderFrom); ok {
- id += readerFrom
- }
- if _, ok := w.(http.Pusher); ok {
- id += pusher
- }
-
- return pickDelegator[id](d)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go
deleted file mode 100644
index 8bb9b8b68..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build !go1.8
-
-package promhttp
-
-import (
- "io"
- "net/http"
-)
-
-func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator {
- d := &responseWriterDelegator{
- ResponseWriter: w,
- observeWriteHeader: observeWriteHeaderFunc,
- }
-
- id := 0
- if _, ok := w.(http.CloseNotifier); ok {
- id += closeNotifier
- }
- if _, ok := w.(http.Flusher); ok {
- id += flusher
- }
- if _, ok := w.(http.Hijacker); ok {
- id += hijacker
- }
- if _, ok := w.(io.ReaderFrom); ok {
- id += readerFrom
- }
-
- return pickDelegator[id](d)
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go
index 8dc260355..b6dd5a266 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go
@@ -11,24 +11,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package promhttp provides tooling around HTTP servers and clients.
+// Copyright (c) 2013, The Prometheus Authors
+// All rights reserved.
//
-// First, the package allows the creation of http.Handler instances to expose
-// Prometheus metrics via HTTP. promhttp.Handler acts on the
-// prometheus.DefaultGatherer. With HandlerFor, you can create a handler for a
-// custom registry or anything that implements the Gatherer interface. It also
-// allows the creation of handlers that act differently on errors or allow to
-// log errors.
-//
-// Second, the package provides tooling to instrument instances of http.Handler
-// via middleware. Middleware wrappers follow the naming scheme
-// InstrumentHandlerX, where X describes the intended use of the middleware.
-// See each function's doc comment for specific details.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+// Package promhttp contains functions to create http.Handler instances to
+// expose Prometheus metrics via HTTP. In later versions of this package, it
+// will also contain tooling to instrument instances of http.Handler and
+// http.RoundTripper.
//
-// Finally, the package allows for an http.RoundTripper to be instrumented via
-// middleware. Middleware wrappers follow the naming scheme
-// InstrumentRoundTripperX, where X describes the intended use of the
-// middleware. See each function's doc comment for specific details.
+// promhttp.Handler acts on the prometheus.DefaultGatherer. With HandlerFor,
+// you can create a handler for a custom registry or anything that implements
+// the Gatherer interface. It also allows to create handlers that act
+// differently on errors or allow to log errors.
package promhttp
import (
@@ -39,7 +36,6 @@ import (
"net/http"
"strings"
"sync"
- "time"
"github.com/prometheus/common/expfmt"
@@ -68,51 +64,21 @@ func giveBuf(buf *bytes.Buffer) {
bufPool.Put(buf)
}
-// Handler returns an http.Handler for the prometheus.DefaultGatherer, using
-// default HandlerOpts, i.e. it reports the first error as an HTTP error, it has
-// no error logging, and it applies compression if requested by the client.
-//
-// The returned http.Handler is already instrumented using the
-// InstrumentMetricHandler function and the prometheus.DefaultRegisterer. If you
-// create multiple http.Handlers by separate calls of the Handler function, the
-// metrics used for instrumentation will be shared between them, providing
-// global scrape counts.
+// Handler returns an HTTP handler for the prometheus.DefaultGatherer. The
+// Handler uses the default HandlerOpts, i.e. report the first error as an HTTP
+// error, no error logging, and compression if requested by the client.
//
-// This function is meant to cover the bulk of basic use cases. If you are doing
-// anything that requires more customization (including using a non-default
-// Gatherer, different instrumentation, and non-default HandlerOpts), use the
-// HandlerFor function. See there for details.
+// If you want to create a Handler for the DefaultGatherer with different
+// HandlerOpts, create it with HandlerFor with prometheus.DefaultGatherer and
+// your desired HandlerOpts.
func Handler() http.Handler {
- return InstrumentMetricHandler(
- prometheus.DefaultRegisterer, HandlerFor(prometheus.DefaultGatherer, HandlerOpts{}),
- )
+ return HandlerFor(prometheus.DefaultGatherer, HandlerOpts{})
}
-// HandlerFor returns an uninstrumented http.Handler for the provided
-// Gatherer. The behavior of the Handler is defined by the provided
-// HandlerOpts. Thus, HandlerFor is useful to create http.Handlers for custom
-// Gatherers, with non-default HandlerOpts, and/or with custom (or no)
-// instrumentation. Use the InstrumentMetricHandler function to apply the same
-// kind of instrumentation as it is used by the Handler function.
+// HandlerFor returns an http.Handler for the provided Gatherer. The behavior
+// of the Handler is defined by the provided HandlerOpts.
func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler {
- var inFlightSem chan struct{}
- if opts.MaxRequestsInFlight > 0 {
- inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight)
- }
-
- h := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
- if inFlightSem != nil {
- select {
- case inFlightSem <- struct{}{}: // All good, carry on.
- defer func() { <-inFlightSem }()
- default:
- http.Error(w, fmt.Sprintf(
- "Limit of concurrent requests reached (%d), try again later.", opts.MaxRequestsInFlight,
- ), http.StatusServiceUnavailable)
- return
- }
- }
-
+ return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
mfs, err := reg.Gather()
if err != nil {
if opts.ErrorLog != nil {
@@ -159,7 +125,7 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler {
closer.Close()
}
if lastErr != nil && buf.Len() == 0 {
- http.Error(w, "No metrics encoded, last error:\n\n"+lastErr.Error(), http.StatusInternalServerError)
+ http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError)
return
}
header := w.Header()
@@ -168,70 +134,9 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler {
if encoding != "" {
header.Set(contentEncodingHeader, encoding)
}
- if _, err := w.Write(buf.Bytes()); err != nil && opts.ErrorLog != nil {
- opts.ErrorLog.Println("error while sending encoded metrics:", err)
- }
+ w.Write(buf.Bytes())
// TODO(beorn7): Consider streaming serving of metrics.
})
-
- if opts.Timeout <= 0 {
- return h
- }
- return http.TimeoutHandler(h, opts.Timeout, fmt.Sprintf(
- "Exceeded configured timeout of %v.\n",
- opts.Timeout,
- ))
-}
-
-// InstrumentMetricHandler is usually used with an http.Handler returned by the
-// HandlerFor function. It instruments the provided http.Handler with two
-// metrics: A counter vector "promhttp_metric_handler_requests_total" to count
-// scrapes partitioned by HTTP status code, and a gauge
-// "promhttp_metric_handler_requests_in_flight" to track the number of
-// simultaneous scrapes. This function idempotently registers collectors for
-// both metrics with the provided Registerer. It panics if the registration
-// fails. The provided metrics are useful to see how many scrapes hit the
-// monitored target (which could be from different Prometheus servers or other
-// scrapers), and how often they overlap (which would result in more than one
-// scrape in flight at the same time). Note that the scrapes-in-flight gauge
-// will contain the scrape by which it is exposed, while the scrape counter will
-// only get incremented after the scrape is complete (as only then the status
-// code is known). For tracking scrape durations, use the
-// "scrape_duration_seconds" gauge created by the Prometheus server upon each
-// scrape.
-func InstrumentMetricHandler(reg prometheus.Registerer, handler http.Handler) http.Handler {
- cnt := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "promhttp_metric_handler_requests_total",
- Help: "Total number of scrapes by HTTP status code.",
- },
- []string{"code"},
- )
- // Initialize the most likely HTTP status codes.
- cnt.WithLabelValues("200")
- cnt.WithLabelValues("500")
- cnt.WithLabelValues("503")
- if err := reg.Register(cnt); err != nil {
- if are, ok := err.(prometheus.AlreadyRegisteredError); ok {
- cnt = are.ExistingCollector.(*prometheus.CounterVec)
- } else {
- panic(err)
- }
- }
-
- gge := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "promhttp_metric_handler_requests_in_flight",
- Help: "Current number of scrapes being served.",
- })
- if err := reg.Register(gge); err != nil {
- if are, ok := err.(prometheus.AlreadyRegisteredError); ok {
- gge = are.ExistingCollector.(prometheus.Gauge)
- } else {
- panic(err)
- }
- }
-
- return InstrumentHandlerCounter(cnt, InstrumentHandlerInFlight(gge, handler))
}
// HandlerErrorHandling defines how a Handler serving metrics will handle
@@ -275,21 +180,6 @@ type HandlerOpts struct {
// If DisableCompression is true, the handler will never compress the
// response, even if requested by the client.
DisableCompression bool
- // The number of concurrent HTTP requests is limited to
- // MaxRequestsInFlight. Additional requests are responded to with 503
- // Service Unavailable and a suitable message in the body. If
- // MaxRequestsInFlight is 0 or negative, no limit is applied.
- MaxRequestsInFlight int
- // If handling a request takes longer than Timeout, it is responded to
- // with 503 ServiceUnavailable and a suitable Message. No timeout is
- // applied if Timeout is 0 or negative. Note that with the current
- // implementation, reaching the timeout simply ends the HTTP requests as
- // described above (and even that only if sending of the body hasn't
- // started yet), while the bulk work of gathering all the metrics keeps
- // running in the background (with the eventual result to be thrown
- // away). Until the implementation is improved, it is recommended to
- // implement a separate timeout in potentially slow Collectors.
- Timeout time.Duration
}
// decorateWriter wraps a writer to handle gzip compression if requested. It
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go
deleted file mode 100644
index aeaa0b4d7..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package promhttp
-
-import (
- "bytes"
- "errors"
- "log"
- "net/http"
- "net/http/httptest"
- "strings"
- "testing"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-type errorCollector struct{}
-
-func (e errorCollector) Describe(ch chan<- *prometheus.Desc) {
- ch <- prometheus.NewDesc("invalid_metric", "not helpful", nil, nil)
-}
-
-func (e errorCollector) Collect(ch chan<- prometheus.Metric) {
- ch <- prometheus.NewInvalidMetric(
- prometheus.NewDesc("invalid_metric", "not helpful", nil, nil),
- errors.New("collect error"),
- )
-}
-
-type blockingCollector struct {
- CollectStarted, Block chan struct{}
-}
-
-func (b blockingCollector) Describe(ch chan<- *prometheus.Desc) {
- ch <- prometheus.NewDesc("dummy_desc", "not helpful", nil, nil)
-}
-
-func (b blockingCollector) Collect(ch chan<- prometheus.Metric) {
- select {
- case b.CollectStarted <- struct{}{}:
- default:
- }
- // Collects nothing, just waits for a channel receive.
- <-b.Block
-}
-
-func TestHandlerErrorHandling(t *testing.T) {
-
- // Create a registry that collects a MetricFamily with two elements,
- // another with one, and reports an error.
- reg := prometheus.NewRegistry()
-
- cnt := prometheus.NewCounter(prometheus.CounterOpts{
- Name: "the_count",
- Help: "Ah-ah-ah! Thunder and lightning!",
- })
- reg.MustRegister(cnt)
-
- cntVec := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- },
- []string{"labelname"},
- )
- cntVec.WithLabelValues("val1").Inc()
- cntVec.WithLabelValues("val2").Inc()
- reg.MustRegister(cntVec)
-
- reg.MustRegister(errorCollector{})
-
- logBuf := &bytes.Buffer{}
- logger := log.New(logBuf, "", 0)
-
- writer := httptest.NewRecorder()
- request, _ := http.NewRequest("GET", "/", nil)
- request.Header.Add("Accept", "test/plain")
-
- errorHandler := HandlerFor(reg, HandlerOpts{
- ErrorLog: logger,
- ErrorHandling: HTTPErrorOnError,
- })
- continueHandler := HandlerFor(reg, HandlerOpts{
- ErrorLog: logger,
- ErrorHandling: ContinueOnError,
- })
- panicHandler := HandlerFor(reg, HandlerOpts{
- ErrorLog: logger,
- ErrorHandling: PanicOnError,
- })
- wantMsg := `error gathering metrics: error collecting metric Desc{fqName: "invalid_metric", help: "not helpful", constLabels: {}, variableLabels: []}: collect error
-`
- wantErrorBody := `An error has occurred during metrics gathering:
-
-error collecting metric Desc{fqName: "invalid_metric", help: "not helpful", constLabels: {}, variableLabels: []}: collect error
-`
- wantOKBody := `# HELP name docstring
-# TYPE name counter
-name{constname="constvalue",labelname="val1"} 1
-name{constname="constvalue",labelname="val2"} 1
-# HELP the_count Ah-ah-ah! Thunder and lightning!
-# TYPE the_count counter
-the_count 0
-`
-
- errorHandler.ServeHTTP(writer, request)
- if got, want := writer.Code, http.StatusInternalServerError; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
- if got := logBuf.String(); got != wantMsg {
- t.Errorf("got log message:\n%s\nwant log mesage:\n%s\n", got, wantMsg)
- }
- if got := writer.Body.String(); got != wantErrorBody {
- t.Errorf("got body:\n%s\nwant body:\n%s\n", got, wantErrorBody)
- }
- logBuf.Reset()
- writer.Body.Reset()
- writer.Code = http.StatusOK
-
- continueHandler.ServeHTTP(writer, request)
- if got, want := writer.Code, http.StatusOK; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
- if got := logBuf.String(); got != wantMsg {
- t.Errorf("got log message %q, want %q", got, wantMsg)
- }
- if got := writer.Body.String(); got != wantOKBody {
- t.Errorf("got body %q, want %q", got, wantOKBody)
- }
-
- defer func() {
- if err := recover(); err == nil {
- t.Error("expected panic from panicHandler")
- }
- }()
- panicHandler.ServeHTTP(writer, request)
-}
-
-func TestInstrumentMetricHandler(t *testing.T) {
- reg := prometheus.NewRegistry()
- handler := InstrumentMetricHandler(reg, HandlerFor(reg, HandlerOpts{}))
- // Do it again to test idempotency.
- InstrumentMetricHandler(reg, HandlerFor(reg, HandlerOpts{}))
- writer := httptest.NewRecorder()
- request, _ := http.NewRequest("GET", "/", nil)
- request.Header.Add("Accept", "test/plain")
-
- handler.ServeHTTP(writer, request)
- if got, want := writer.Code, http.StatusOK; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
-
- want := "promhttp_metric_handler_requests_in_flight 1\n"
- if got := writer.Body.String(); !strings.Contains(got, want) {
- t.Errorf("got body %q, does not contain %q", got, want)
- }
- want = "promhttp_metric_handler_requests_total{code=\"200\"} 0\n"
- if got := writer.Body.String(); !strings.Contains(got, want) {
- t.Errorf("got body %q, does not contain %q", got, want)
- }
-
- writer.Body.Reset()
- handler.ServeHTTP(writer, request)
- if got, want := writer.Code, http.StatusOK; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
-
- want = "promhttp_metric_handler_requests_in_flight 1\n"
- if got := writer.Body.String(); !strings.Contains(got, want) {
- t.Errorf("got body %q, does not contain %q", got, want)
- }
- want = "promhttp_metric_handler_requests_total{code=\"200\"} 1\n"
- if got := writer.Body.String(); !strings.Contains(got, want) {
- t.Errorf("got body %q, does not contain %q", got, want)
- }
-}
-
-func TestHandlerMaxRequestsInFlight(t *testing.T) {
- reg := prometheus.NewRegistry()
- handler := HandlerFor(reg, HandlerOpts{MaxRequestsInFlight: 1})
- w1 := httptest.NewRecorder()
- w2 := httptest.NewRecorder()
- w3 := httptest.NewRecorder()
- request, _ := http.NewRequest("GET", "/", nil)
- request.Header.Add("Accept", "test/plain")
-
- c := blockingCollector{Block: make(chan struct{}), CollectStarted: make(chan struct{}, 1)}
- reg.MustRegister(c)
-
- rq1Done := make(chan struct{})
- go func() {
- handler.ServeHTTP(w1, request)
- close(rq1Done)
- }()
- <-c.CollectStarted
-
- handler.ServeHTTP(w2, request)
-
- if got, want := w2.Code, http.StatusServiceUnavailable; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
- if got, want := w2.Body.String(), "Limit of concurrent requests reached (1), try again later.\n"; got != want {
- t.Errorf("got body %q, want %q", got, want)
- }
-
- close(c.Block)
- <-rq1Done
-
- handler.ServeHTTP(w3, request)
-
- if got, want := w3.Code, http.StatusOK; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
-}
-
-func TestHandlerTimeout(t *testing.T) {
- reg := prometheus.NewRegistry()
- handler := HandlerFor(reg, HandlerOpts{Timeout: time.Millisecond})
- w := httptest.NewRecorder()
-
- request, _ := http.NewRequest("GET", "/", nil)
- request.Header.Add("Accept", "test/plain")
-
- c := blockingCollector{Block: make(chan struct{}), CollectStarted: make(chan struct{}, 1)}
- reg.MustRegister(c)
-
- handler.ServeHTTP(w, request)
-
- if got, want := w.Code, http.StatusServiceUnavailable; got != want {
- t.Errorf("got HTTP status code %d, want %d", got, want)
- }
- if got, want := w.Body.String(), "Exceeded configured timeout of 1ms.\n"; got != want {
- t.Errorf("got body %q, want %q", got, want)
- }
-
- close(c.Block) // To not leak a goroutine.
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go
deleted file mode 100644
index 86fd56447..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package promhttp
-
-import (
- "net/http"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-// The RoundTripperFunc type is an adapter to allow the use of ordinary
-// functions as RoundTrippers. If f is a function with the appropriate
-// signature, RountTripperFunc(f) is a RoundTripper that calls f.
-type RoundTripperFunc func(req *http.Request) (*http.Response, error)
-
-// RoundTrip implements the RoundTripper interface.
-func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) {
- return rt(r)
-}
-
-// InstrumentRoundTripperInFlight is a middleware that wraps the provided
-// http.RoundTripper. It sets the provided prometheus.Gauge to the number of
-// requests currently handled by the wrapped http.RoundTripper.
-//
-// See the example for ExampleInstrumentRoundTripperDuration for example usage.
-func InstrumentRoundTripperInFlight(gauge prometheus.Gauge, next http.RoundTripper) RoundTripperFunc {
- return RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
- gauge.Inc()
- defer gauge.Dec()
- return next.RoundTrip(r)
- })
-}
-
-// InstrumentRoundTripperCounter is a middleware that wraps the provided
-// http.RoundTripper to observe the request result with the provided CounterVec.
-// The CounterVec must have zero, one, or two non-const non-curried labels. For
-// those, the only allowed label names are "code" and "method". The function
-// panics otherwise. Partitioning of the CounterVec happens by HTTP status code
-// and/or HTTP method if the respective instance label names are present in the
-// CounterVec. For unpartitioned counting, use a CounterVec with zero labels.
-//
-// If the wrapped RoundTripper panics or returns a non-nil error, the Counter
-// is not incremented.
-//
-// See the example for ExampleInstrumentRoundTripperDuration for example usage.
-func InstrumentRoundTripperCounter(counter *prometheus.CounterVec, next http.RoundTripper) RoundTripperFunc {
- code, method := checkLabels(counter)
-
- return RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
- resp, err := next.RoundTrip(r)
- if err == nil {
- counter.With(labels(code, method, r.Method, resp.StatusCode)).Inc()
- }
- return resp, err
- })
-}
-
-// InstrumentRoundTripperDuration is a middleware that wraps the provided
-// http.RoundTripper to observe the request duration with the provided
-// ObserverVec. The ObserverVec must have zero, one, or two non-const
-// non-curried labels. For those, the only allowed label names are "code" and
-// "method". The function panics otherwise. The Observe method of the Observer
-// in the ObserverVec is called with the request duration in
-// seconds. Partitioning happens by HTTP status code and/or HTTP method if the
-// respective instance label names are present in the ObserverVec. For
-// unpartitioned observations, use an ObserverVec with zero labels. Note that
-// partitioning of Histograms is expensive and should be used judiciously.
-//
-// If the wrapped RoundTripper panics or returns a non-nil error, no values are
-// reported.
-//
-// Note that this method is only guaranteed to never observe negative durations
-// if used with Go1.9+.
-func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundTripper) RoundTripperFunc {
- code, method := checkLabels(obs)
-
- return RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
- start := time.Now()
- resp, err := next.RoundTrip(r)
- if err == nil {
- obs.With(labels(code, method, r.Method, resp.StatusCode)).Observe(time.Since(start).Seconds())
- }
- return resp, err
- })
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go
deleted file mode 100644
index 0bd80c355..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build go1.8
-
-package promhttp
-
-import (
- "context"
- "crypto/tls"
- "net/http"
- "net/http/httptrace"
- "time"
-)
-
-// InstrumentTrace is used to offer flexibility in instrumenting the available
-// httptrace.ClientTrace hook functions. Each function is passed a float64
-// representing the time in seconds since the start of the http request. A user
-// may choose to use separately buckets Histograms, or implement custom
-// instance labels on a per function basis.
-type InstrumentTrace struct {
- GotConn func(float64)
- PutIdleConn func(float64)
- GotFirstResponseByte func(float64)
- Got100Continue func(float64)
- DNSStart func(float64)
- DNSDone func(float64)
- ConnectStart func(float64)
- ConnectDone func(float64)
- TLSHandshakeStart func(float64)
- TLSHandshakeDone func(float64)
- WroteHeaders func(float64)
- Wait100Continue func(float64)
- WroteRequest func(float64)
-}
-
-// InstrumentRoundTripperTrace is a middleware that wraps the provided
-// RoundTripper and reports times to hook functions provided in the
-// InstrumentTrace struct. Hook functions that are not present in the provided
-// InstrumentTrace struct are ignored. Times reported to the hook functions are
-// time since the start of the request. Only with Go1.9+, those times are
-// guaranteed to never be negative. (Earlier Go versions are not using a
-// monotonic clock.) Note that partitioning of Histograms is expensive and
-// should be used judiciously.
-//
-// For hook functions that receive an error as an argument, no observations are
-// made in the event of a non-nil error value.
-//
-// See the example for ExampleInstrumentRoundTripperDuration for example usage.
-func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc {
- return RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
- start := time.Now()
-
- trace := &httptrace.ClientTrace{
- GotConn: func(_ httptrace.GotConnInfo) {
- if it.GotConn != nil {
- it.GotConn(time.Since(start).Seconds())
- }
- },
- PutIdleConn: func(err error) {
- if err != nil {
- return
- }
- if it.PutIdleConn != nil {
- it.PutIdleConn(time.Since(start).Seconds())
- }
- },
- DNSStart: func(_ httptrace.DNSStartInfo) {
- if it.DNSStart != nil {
- it.DNSStart(time.Since(start).Seconds())
- }
- },
- DNSDone: func(_ httptrace.DNSDoneInfo) {
- if it.DNSStart != nil {
- it.DNSStart(time.Since(start).Seconds())
- }
- },
- ConnectStart: func(_, _ string) {
- if it.ConnectStart != nil {
- it.ConnectStart(time.Since(start).Seconds())
- }
- },
- ConnectDone: func(_, _ string, err error) {
- if err != nil {
- return
- }
- if it.ConnectDone != nil {
- it.ConnectDone(time.Since(start).Seconds())
- }
- },
- GotFirstResponseByte: func() {
- if it.GotFirstResponseByte != nil {
- it.GotFirstResponseByte(time.Since(start).Seconds())
- }
- },
- Got100Continue: func() {
- if it.Got100Continue != nil {
- it.Got100Continue(time.Since(start).Seconds())
- }
- },
- TLSHandshakeStart: func() {
- if it.TLSHandshakeStart != nil {
- it.TLSHandshakeStart(time.Since(start).Seconds())
- }
- },
- TLSHandshakeDone: func(_ tls.ConnectionState, err error) {
- if err != nil {
- return
- }
- if it.TLSHandshakeDone != nil {
- it.TLSHandshakeDone(time.Since(start).Seconds())
- }
- },
- WroteHeaders: func() {
- if it.WroteHeaders != nil {
- it.WroteHeaders(time.Since(start).Seconds())
- }
- },
- Wait100Continue: func() {
- if it.Wait100Continue != nil {
- it.Wait100Continue(time.Since(start).Seconds())
- }
- },
- WroteRequest: func(_ httptrace.WroteRequestInfo) {
- if it.WroteRequest != nil {
- it.WroteRequest(time.Since(start).Seconds())
- }
- },
- }
- r = r.WithContext(httptrace.WithClientTrace(context.Background(), trace))
-
- return next.RoundTrip(r)
- })
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8_test.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8_test.go
deleted file mode 100644
index 7e3f5229f..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8_test.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// +build go1.8
-
-package promhttp
-
-import (
- "log"
- "net/http"
- "testing"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func TestClientMiddlewareAPI(t *testing.T) {
- client := http.DefaultClient
- client.Timeout = 1 * time.Second
-
- reg := prometheus.NewRegistry()
-
- inFlightGauge := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "client_in_flight_requests",
- Help: "A gauge of in-flight requests for the wrapped client.",
- })
-
- counter := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "client_api_requests_total",
- Help: "A counter for requests from the wrapped client.",
- },
- []string{"code", "method"},
- )
-
- dnsLatencyVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "dns_duration_seconds",
- Help: "Trace dns latency histogram.",
- Buckets: []float64{.005, .01, .025, .05},
- },
- []string{"event"},
- )
-
- tlsLatencyVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "tls_duration_seconds",
- Help: "Trace tls latency histogram.",
- Buckets: []float64{.05, .1, .25, .5},
- },
- []string{"event"},
- )
-
- histVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "request_duration_seconds",
- Help: "A histogram of request latencies.",
- Buckets: prometheus.DefBuckets,
- },
- []string{"method"},
- )
-
- reg.MustRegister(counter, tlsLatencyVec, dnsLatencyVec, histVec, inFlightGauge)
-
- trace := &InstrumentTrace{
- DNSStart: func(t float64) {
- dnsLatencyVec.WithLabelValues("dns_start")
- },
- DNSDone: func(t float64) {
- dnsLatencyVec.WithLabelValues("dns_done")
- },
- TLSHandshakeStart: func(t float64) {
- tlsLatencyVec.WithLabelValues("tls_handshake_start")
- },
- TLSHandshakeDone: func(t float64) {
- tlsLatencyVec.WithLabelValues("tls_handshake_done")
- },
- }
-
- client.Transport = InstrumentRoundTripperInFlight(inFlightGauge,
- InstrumentRoundTripperCounter(counter,
- InstrumentRoundTripperTrace(trace,
- InstrumentRoundTripperDuration(histVec, http.DefaultTransport),
- ),
- ),
- )
-
- resp, err := client.Get("http://google.com")
- if err != nil {
- t.Fatalf("%v", err)
- }
- defer resp.Body.Close()
-}
-
-func ExampleInstrumentRoundTripperDuration() {
- client := http.DefaultClient
- client.Timeout = 1 * time.Second
-
- inFlightGauge := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "client_in_flight_requests",
- Help: "A gauge of in-flight requests for the wrapped client.",
- })
-
- counter := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "client_api_requests_total",
- Help: "A counter for requests from the wrapped client.",
- },
- []string{"code", "method"},
- )
-
- // dnsLatencyVec uses custom buckets based on expected dns durations.
- // It has an instance label "event", which is set in the
- // DNSStart and DNSDonehook functions defined in the
- // InstrumentTrace struct below.
- dnsLatencyVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "dns_duration_seconds",
- Help: "Trace dns latency histogram.",
- Buckets: []float64{.005, .01, .025, .05},
- },
- []string{"event"},
- )
-
- // tlsLatencyVec uses custom buckets based on expected tls durations.
- // It has an instance label "event", which is set in the
- // TLSHandshakeStart and TLSHandshakeDone hook functions defined in the
- // InstrumentTrace struct below.
- tlsLatencyVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "tls_duration_seconds",
- Help: "Trace tls latency histogram.",
- Buckets: []float64{.05, .1, .25, .5},
- },
- []string{"event"},
- )
-
- // histVec has no labels, making it a zero-dimensional ObserverVec.
- histVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "request_duration_seconds",
- Help: "A histogram of request latencies.",
- Buckets: prometheus.DefBuckets,
- },
- []string{},
- )
-
- // Register all of the metrics in the standard registry.
- prometheus.MustRegister(counter, tlsLatencyVec, dnsLatencyVec, histVec, inFlightGauge)
-
- // Define functions for the available httptrace.ClientTrace hook
- // functions that we want to instrument.
- trace := &InstrumentTrace{
- DNSStart: func(t float64) {
- dnsLatencyVec.WithLabelValues("dns_start")
- },
- DNSDone: func(t float64) {
- dnsLatencyVec.WithLabelValues("dns_done")
- },
- TLSHandshakeStart: func(t float64) {
- tlsLatencyVec.WithLabelValues("tls_handshake_start")
- },
- TLSHandshakeDone: func(t float64) {
- tlsLatencyVec.WithLabelValues("tls_handshake_done")
- },
- }
-
- // Wrap the default RoundTripper with middleware.
- roundTripper := InstrumentRoundTripperInFlight(inFlightGauge,
- InstrumentRoundTripperCounter(counter,
- InstrumentRoundTripperTrace(trace,
- InstrumentRoundTripperDuration(histVec, http.DefaultTransport),
- ),
- ),
- )
-
- // Set the RoundTripper on our client.
- client.Transport = roundTripper
-
- resp, err := client.Get("http://google.com")
- if err != nil {
- log.Printf("error: %v", err)
- }
- defer resp.Body.Close()
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go
deleted file mode 100644
index 9db243805..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go
+++ /dev/null
@@ -1,447 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package promhttp
-
-import (
- "errors"
- "net/http"
- "strconv"
- "strings"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-// magicString is used for the hacky label test in checkLabels. Remove once fixed.
-const magicString = "zZgWfBxLqvG8kc8IMv3POi2Bb0tZI3vAnBx+gBaFi9FyPzB/CzKUer1yufDa"
-
-// InstrumentHandlerInFlight is a middleware that wraps the provided
-// http.Handler. It sets the provided prometheus.Gauge to the number of
-// requests currently handled by the wrapped http.Handler.
-//
-// See the example for InstrumentHandlerDuration for example usage.
-func InstrumentHandlerInFlight(g prometheus.Gauge, next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- g.Inc()
- defer g.Dec()
- next.ServeHTTP(w, r)
- })
-}
-
-// InstrumentHandlerDuration is a middleware that wraps the provided
-// http.Handler to observe the request duration with the provided ObserverVec.
-// The ObserverVec must have zero, one, or two non-const non-curried labels. For
-// those, the only allowed label names are "code" and "method". The function
-// panics otherwise. The Observe method of the Observer in the ObserverVec is
-// called with the request duration in seconds. Partitioning happens by HTTP
-// status code and/or HTTP method if the respective instance label names are
-// present in the ObserverVec. For unpartitioned observations, use an
-// ObserverVec with zero labels. Note that partitioning of Histograms is
-// expensive and should be used judiciously.
-//
-// If the wrapped Handler does not set a status code, a status code of 200 is assumed.
-//
-// If the wrapped Handler panics, no values are reported.
-//
-// Note that this method is only guaranteed to never observe negative durations
-// if used with Go1.9+.
-func InstrumentHandlerDuration(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc {
- code, method := checkLabels(obs)
-
- if code {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- now := time.Now()
- d := newDelegator(w, nil)
- next.ServeHTTP(d, r)
-
- obs.With(labels(code, method, r.Method, d.Status())).Observe(time.Since(now).Seconds())
- })
- }
-
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- now := time.Now()
- next.ServeHTTP(w, r)
- obs.With(labels(code, method, r.Method, 0)).Observe(time.Since(now).Seconds())
- })
-}
-
-// InstrumentHandlerCounter is a middleware that wraps the provided http.Handler
-// to observe the request result with the provided CounterVec. The CounterVec
-// must have zero, one, or two non-const non-curried labels. For those, the only
-// allowed label names are "code" and "method". The function panics
-// otherwise. Partitioning of the CounterVec happens by HTTP status code and/or
-// HTTP method if the respective instance label names are present in the
-// CounterVec. For unpartitioned counting, use a CounterVec with zero labels.
-//
-// If the wrapped Handler does not set a status code, a status code of 200 is assumed.
-//
-// If the wrapped Handler panics, the Counter is not incremented.
-//
-// See the example for InstrumentHandlerDuration for example usage.
-func InstrumentHandlerCounter(counter *prometheus.CounterVec, next http.Handler) http.HandlerFunc {
- code, method := checkLabels(counter)
-
- if code {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- d := newDelegator(w, nil)
- next.ServeHTTP(d, r)
- counter.With(labels(code, method, r.Method, d.Status())).Inc()
- })
- }
-
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- next.ServeHTTP(w, r)
- counter.With(labels(code, method, r.Method, 0)).Inc()
- })
-}
-
-// InstrumentHandlerTimeToWriteHeader is a middleware that wraps the provided
-// http.Handler to observe with the provided ObserverVec the request duration
-// until the response headers are written. The ObserverVec must have zero, one,
-// or two non-const non-curried labels. For those, the only allowed label names
-// are "code" and "method". The function panics otherwise. The Observe method of
-// the Observer in the ObserverVec is called with the request duration in
-// seconds. Partitioning happens by HTTP status code and/or HTTP method if the
-// respective instance label names are present in the ObserverVec. For
-// unpartitioned observations, use an ObserverVec with zero labels. Note that
-// partitioning of Histograms is expensive and should be used judiciously.
-//
-// If the wrapped Handler panics before calling WriteHeader, no value is
-// reported.
-//
-// Note that this method is only guaranteed to never observe negative durations
-// if used with Go1.9+.
-//
-// See the example for InstrumentHandlerDuration for example usage.
-func InstrumentHandlerTimeToWriteHeader(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc {
- code, method := checkLabels(obs)
-
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- now := time.Now()
- d := newDelegator(w, func(status int) {
- obs.With(labels(code, method, r.Method, status)).Observe(time.Since(now).Seconds())
- })
- next.ServeHTTP(d, r)
- })
-}
-
-// InstrumentHandlerRequestSize is a middleware that wraps the provided
-// http.Handler to observe the request size with the provided ObserverVec. The
-// ObserverVec must have zero, one, or two non-const non-curried labels. For
-// those, the only allowed label names are "code" and "method". The function
-// panics otherwise. The Observe method of the Observer in the ObserverVec is
-// called with the request size in bytes. Partitioning happens by HTTP status
-// code and/or HTTP method if the respective instance label names are present in
-// the ObserverVec. For unpartitioned observations, use an ObserverVec with zero
-// labels. Note that partitioning of Histograms is expensive and should be used
-// judiciously.
-//
-// If the wrapped Handler does not set a status code, a status code of 200 is assumed.
-//
-// If the wrapped Handler panics, no values are reported.
-//
-// See the example for InstrumentHandlerDuration for example usage.
-func InstrumentHandlerRequestSize(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc {
- code, method := checkLabels(obs)
-
- if code {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- d := newDelegator(w, nil)
- next.ServeHTTP(d, r)
- size := computeApproximateRequestSize(r)
- obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(size))
- })
- }
-
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- next.ServeHTTP(w, r)
- size := computeApproximateRequestSize(r)
- obs.With(labels(code, method, r.Method, 0)).Observe(float64(size))
- })
-}
-
-// InstrumentHandlerResponseSize is a middleware that wraps the provided
-// http.Handler to observe the response size with the provided ObserverVec. The
-// ObserverVec must have zero, one, or two non-const non-curried labels. For
-// those, the only allowed label names are "code" and "method". The function
-// panics otherwise. The Observe method of the Observer in the ObserverVec is
-// called with the response size in bytes. Partitioning happens by HTTP status
-// code and/or HTTP method if the respective instance label names are present in
-// the ObserverVec. For unpartitioned observations, use an ObserverVec with zero
-// labels. Note that partitioning of Histograms is expensive and should be used
-// judiciously.
-//
-// If the wrapped Handler does not set a status code, a status code of 200 is assumed.
-//
-// If the wrapped Handler panics, no values are reported.
-//
-// See the example for InstrumentHandlerDuration for example usage.
-func InstrumentHandlerResponseSize(obs prometheus.ObserverVec, next http.Handler) http.Handler {
- code, method := checkLabels(obs)
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- d := newDelegator(w, nil)
- next.ServeHTTP(d, r)
- obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(d.Written()))
- })
-}
-
-func checkLabels(c prometheus.Collector) (code bool, method bool) {
- // TODO(beorn7): Remove this hacky way to check for instance labels
- // once Descriptors can have their dimensionality queried.
- var (
- desc *prometheus.Desc
- m prometheus.Metric
- pm dto.Metric
- lvs []string
- )
-
- // Get the Desc from the Collector.
- descc := make(chan *prometheus.Desc, 1)
- c.Describe(descc)
-
- select {
- case desc = <-descc:
- default:
- panic("no description provided by collector")
- }
- select {
- case <-descc:
- panic("more than one description provided by collector")
- default:
- }
-
- close(descc)
-
- // Create a ConstMetric with the Desc. Since we don't know how many
- // variable labels there are, try for as long as it needs.
- for err := errors.New("dummy"); err != nil; lvs = append(lvs, magicString) {
- m, err = prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0, lvs...)
- }
-
- // Write out the metric into a proto message and look at the labels.
- // If the value is not the magicString, it is a constLabel, which doesn't interest us.
- // If the label is curried, it doesn't interest us.
- // In all other cases, only "code" or "method" is allowed.
- if err := m.Write(&pm); err != nil {
- panic("error checking metric for labels")
- }
- for _, label := range pm.Label {
- name, value := label.GetName(), label.GetValue()
- if value != magicString || isLabelCurried(c, name) {
- continue
- }
- switch name {
- case "code":
- code = true
- case "method":
- method = true
- default:
- panic("metric partitioned with non-supported labels")
- }
- }
- return
-}
-
-func isLabelCurried(c prometheus.Collector, label string) bool {
- // This is even hackier than the label test above.
- // We essentially try to curry again and see if it works.
- // But for that, we need to type-convert to the two
- // types we use here, ObserverVec or *CounterVec.
- switch v := c.(type) {
- case *prometheus.CounterVec:
- if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil {
- return false
- }
- case prometheus.ObserverVec:
- if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil {
- return false
- }
- default:
- panic("unsupported metric vec type")
- }
- return true
-}
-
-// emptyLabels is a one-time allocation for non-partitioned metrics to avoid
-// unnecessary allocations on each request.
-var emptyLabels = prometheus.Labels{}
-
-func labels(code, method bool, reqMethod string, status int) prometheus.Labels {
- if !(code || method) {
- return emptyLabels
- }
- labels := prometheus.Labels{}
-
- if code {
- labels["code"] = sanitizeCode(status)
- }
- if method {
- labels["method"] = sanitizeMethod(reqMethod)
- }
-
- return labels
-}
-
-func computeApproximateRequestSize(r *http.Request) int {
- s := 0
- if r.URL != nil {
- s += len(r.URL.String())
- }
-
- s += len(r.Method)
- s += len(r.Proto)
- for name, values := range r.Header {
- s += len(name)
- for _, value := range values {
- s += len(value)
- }
- }
- s += len(r.Host)
-
- // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL.
-
- if r.ContentLength != -1 {
- s += int(r.ContentLength)
- }
- return s
-}
-
-func sanitizeMethod(m string) string {
- switch m {
- case "GET", "get":
- return "get"
- case "PUT", "put":
- return "put"
- case "HEAD", "head":
- return "head"
- case "POST", "post":
- return "post"
- case "DELETE", "delete":
- return "delete"
- case "CONNECT", "connect":
- return "connect"
- case "OPTIONS", "options":
- return "options"
- case "NOTIFY", "notify":
- return "notify"
- default:
- return strings.ToLower(m)
- }
-}
-
-// If the wrapped http.Handler has not set a status code, i.e. the value is
-// currently 0, santizeCode will return 200, for consistency with behavior in
-// the stdlib.
-func sanitizeCode(s int) string {
- switch s {
- case 100:
- return "100"
- case 101:
- return "101"
-
- case 200, 0:
- return "200"
- case 201:
- return "201"
- case 202:
- return "202"
- case 203:
- return "203"
- case 204:
- return "204"
- case 205:
- return "205"
- case 206:
- return "206"
-
- case 300:
- return "300"
- case 301:
- return "301"
- case 302:
- return "302"
- case 304:
- return "304"
- case 305:
- return "305"
- case 307:
- return "307"
-
- case 400:
- return "400"
- case 401:
- return "401"
- case 402:
- return "402"
- case 403:
- return "403"
- case 404:
- return "404"
- case 405:
- return "405"
- case 406:
- return "406"
- case 407:
- return "407"
- case 408:
- return "408"
- case 409:
- return "409"
- case 410:
- return "410"
- case 411:
- return "411"
- case 412:
- return "412"
- case 413:
- return "413"
- case 414:
- return "414"
- case 415:
- return "415"
- case 416:
- return "416"
- case 417:
- return "417"
- case 418:
- return "418"
-
- case 500:
- return "500"
- case 501:
- return "501"
- case 502:
- return "502"
- case 503:
- return "503"
- case 504:
- return "504"
- case 505:
- return "505"
-
- case 428:
- return "428"
- case 429:
- return "429"
- case 431:
- return "431"
- case 511:
- return "511"
-
- default:
- return strconv.Itoa(s)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go
deleted file mode 100644
index 716c6f45e..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go
+++ /dev/null
@@ -1,401 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package promhttp
-
-import (
- "io"
- "log"
- "net/http"
- "net/http/httptest"
- "testing"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func TestLabelCheck(t *testing.T) {
- scenarios := map[string]struct {
- varLabels []string
- constLabels []string
- curriedLabels []string
- ok bool
- }{
- "empty": {
- varLabels: []string{},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: true,
- },
- "code as single var label": {
- varLabels: []string{"code"},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: true,
- },
- "method as single var label": {
- varLabels: []string{"method"},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: true,
- },
- "cade and method as var labels": {
- varLabels: []string{"method", "code"},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: true,
- },
- "valid case with all labels used": {
- varLabels: []string{"code", "method"},
- constLabels: []string{"foo", "bar"},
- curriedLabels: []string{"dings", "bums"},
- ok: true,
- },
- "unsupported var label": {
- varLabels: []string{"foo"},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: false,
- },
- "mixed var labels": {
- varLabels: []string{"method", "foo", "code"},
- constLabels: []string{},
- curriedLabels: []string{},
- ok: false,
- },
- "unsupported var label but curried": {
- varLabels: []string{},
- constLabels: []string{},
- curriedLabels: []string{"foo"},
- ok: true,
- },
- "mixed var labels but unsupported curried": {
- varLabels: []string{"code", "method"},
- constLabels: []string{},
- curriedLabels: []string{"foo"},
- ok: true,
- },
- "supported label as const and curry": {
- varLabels: []string{},
- constLabels: []string{"code"},
- curriedLabels: []string{"method"},
- ok: true,
- },
- "supported label as const and curry with unsupported as var": {
- varLabels: []string{"foo"},
- constLabels: []string{"code"},
- curriedLabels: []string{"method"},
- ok: false,
- },
- }
-
- for name, sc := range scenarios {
- t.Run(name, func(t *testing.T) {
- constLabels := prometheus.Labels{}
- for _, l := range sc.constLabels {
- constLabels[l] = "dummy"
- }
- c := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "c",
- Help: "c help",
- ConstLabels: constLabels,
- },
- append(sc.varLabels, sc.curriedLabels...),
- )
- o := prometheus.ObserverVec(prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "c",
- Help: "c help",
- ConstLabels: constLabels,
- },
- append(sc.varLabels, sc.curriedLabels...),
- ))
- for _, l := range sc.curriedLabels {
- c = c.MustCurryWith(prometheus.Labels{l: "dummy"})
- o = o.MustCurryWith(prometheus.Labels{l: "dummy"})
- }
-
- func() {
- defer func() {
- if err := recover(); err != nil {
- if sc.ok {
- t.Error("unexpected panic:", err)
- }
- } else if !sc.ok {
- t.Error("expected panic")
- }
- }()
- InstrumentHandlerCounter(c, nil)
- }()
- func() {
- defer func() {
- if err := recover(); err != nil {
- if sc.ok {
- t.Error("unexpected panic:", err)
- }
- } else if !sc.ok {
- t.Error("expected panic")
- }
- }()
- InstrumentHandlerDuration(o, nil)
- }()
- if sc.ok {
- // Test if wantCode and wantMethod were detected correctly.
- var wantCode, wantMethod bool
- for _, l := range sc.varLabels {
- if l == "code" {
- wantCode = true
- }
- if l == "method" {
- wantMethod = true
- }
- }
- gotCode, gotMethod := checkLabels(c)
- if gotCode != wantCode {
- t.Errorf("wanted code=%t for counter, got code=%t", wantCode, gotCode)
- }
- if gotMethod != wantMethod {
- t.Errorf("wanted method=%t for counter, got method=%t", wantMethod, gotMethod)
- }
- gotCode, gotMethod = checkLabels(o)
- if gotCode != wantCode {
- t.Errorf("wanted code=%t for observer, got code=%t", wantCode, gotCode)
- }
- if gotMethod != wantMethod {
- t.Errorf("wanted method=%t for observer, got method=%t", wantMethod, gotMethod)
- }
- }
- })
- }
-}
-
-func TestMiddlewareAPI(t *testing.T) {
- reg := prometheus.NewRegistry()
-
- inFlightGauge := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "in_flight_requests",
- Help: "A gauge of requests currently being served by the wrapped handler.",
- })
-
- counter := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "api_requests_total",
- Help: "A counter for requests to the wrapped handler.",
- },
- []string{"code", "method"},
- )
-
- histVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "response_duration_seconds",
- Help: "A histogram of request latencies.",
- Buckets: prometheus.DefBuckets,
- ConstLabels: prometheus.Labels{"handler": "api"},
- },
- []string{"method"},
- )
-
- writeHeaderVec := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "write_header_duration_seconds",
- Help: "A histogram of time to first write latencies.",
- Buckets: prometheus.DefBuckets,
- ConstLabels: prometheus.Labels{"handler": "api"},
- },
- []string{},
- )
-
- responseSize := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "push_request_size_bytes",
- Help: "A histogram of request sizes for requests.",
- Buckets: []float64{200, 500, 900, 1500},
- },
- []string{},
- )
-
- handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("OK"))
- })
-
- reg.MustRegister(inFlightGauge, counter, histVec, responseSize, writeHeaderVec)
-
- chain := InstrumentHandlerInFlight(inFlightGauge,
- InstrumentHandlerCounter(counter,
- InstrumentHandlerDuration(histVec,
- InstrumentHandlerTimeToWriteHeader(writeHeaderVec,
- InstrumentHandlerResponseSize(responseSize, handler),
- ),
- ),
- ),
- )
-
- r, _ := http.NewRequest("GET", "www.example.com", nil)
- w := httptest.NewRecorder()
- chain.ServeHTTP(w, r)
-}
-
-func TestInstrumentTimeToFirstWrite(t *testing.T) {
- var i int
- dobs := &responseWriterDelegator{
- ResponseWriter: httptest.NewRecorder(),
- observeWriteHeader: func(status int) {
- i = status
- },
- }
- d := newDelegator(dobs, nil)
-
- d.WriteHeader(http.StatusOK)
-
- if i != http.StatusOK {
- t.Fatalf("failed to execute observeWriteHeader")
- }
-}
-
-// testResponseWriter is an http.ResponseWriter that also implements
-// http.CloseNotifier, http.Flusher, and io.ReaderFrom.
-type testResponseWriter struct {
- closeNotifyCalled, flushCalled, readFromCalled bool
-}
-
-func (t *testResponseWriter) Header() http.Header { return nil }
-func (t *testResponseWriter) Write([]byte) (int, error) { return 0, nil }
-func (t *testResponseWriter) WriteHeader(int) {}
-func (t *testResponseWriter) CloseNotify() <-chan bool {
- t.closeNotifyCalled = true
- return nil
-}
-func (t *testResponseWriter) Flush() { t.flushCalled = true }
-func (t *testResponseWriter) ReadFrom(io.Reader) (int64, error) {
- t.readFromCalled = true
- return 0, nil
-}
-
-// testFlusher is an http.ResponseWriter that also implements http.Flusher.
-type testFlusher struct {
- flushCalled bool
-}
-
-func (t *testFlusher) Header() http.Header { return nil }
-func (t *testFlusher) Write([]byte) (int, error) { return 0, nil }
-func (t *testFlusher) WriteHeader(int) {}
-func (t *testFlusher) Flush() { t.flushCalled = true }
-
-func TestInterfaceUpgrade(t *testing.T) {
- w := &testResponseWriter{}
- d := newDelegator(w, nil)
- d.(http.CloseNotifier).CloseNotify()
- if !w.closeNotifyCalled {
- t.Error("CloseNotify not called")
- }
- d.(http.Flusher).Flush()
- if !w.flushCalled {
- t.Error("Flush not called")
- }
- d.(io.ReaderFrom).ReadFrom(nil)
- if !w.readFromCalled {
- t.Error("ReadFrom not called")
- }
- if _, ok := d.(http.Hijacker); ok {
- t.Error("delegator unexpectedly implements http.Hijacker")
- }
-
- f := &testFlusher{}
- d = newDelegator(f, nil)
- if _, ok := d.(http.CloseNotifier); ok {
- t.Error("delegator unexpectedly implements http.CloseNotifier")
- }
- d.(http.Flusher).Flush()
- if !w.flushCalled {
- t.Error("Flush not called")
- }
- if _, ok := d.(io.ReaderFrom); ok {
- t.Error("delegator unexpectedly implements io.ReaderFrom")
- }
- if _, ok := d.(http.Hijacker); ok {
- t.Error("delegator unexpectedly implements http.Hijacker")
- }
-}
-
-func ExampleInstrumentHandlerDuration() {
- inFlightGauge := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "in_flight_requests",
- Help: "A gauge of requests currently being served by the wrapped handler.",
- })
-
- counter := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "api_requests_total",
- Help: "A counter for requests to the wrapped handler.",
- },
- []string{"code", "method"},
- )
-
- // duration is partitioned by the HTTP method and handler. It uses custom
- // buckets based on the expected request duration.
- duration := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "request_duration_seconds",
- Help: "A histogram of latencies for requests.",
- Buckets: []float64{.25, .5, 1, 2.5, 5, 10},
- },
- []string{"handler", "method"},
- )
-
- // responseSize has no labels, making it a zero-dimensional
- // ObserverVec.
- responseSize := prometheus.NewHistogramVec(
- prometheus.HistogramOpts{
- Name: "response_size_bytes",
- Help: "A histogram of response sizes for requests.",
- Buckets: []float64{200, 500, 900, 1500},
- },
- []string{},
- )
-
- // Create the handlers that will be wrapped by the middleware.
- pushHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("Push"))
- })
- pullHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("Pull"))
- })
-
- // Register all of the metrics in the standard registry.
- prometheus.MustRegister(inFlightGauge, counter, duration, responseSize)
-
- // Instrument the handlers with all the metrics, injecting the "handler"
- // label by currying.
- pushChain := InstrumentHandlerInFlight(inFlightGauge,
- InstrumentHandlerDuration(duration.MustCurryWith(prometheus.Labels{"handler": "push"}),
- InstrumentHandlerCounter(counter,
- InstrumentHandlerResponseSize(responseSize, pushHandler),
- ),
- ),
- )
- pullChain := InstrumentHandlerInFlight(inFlightGauge,
- InstrumentHandlerDuration(duration.MustCurryWith(prometheus.Labels{"handler": "pull"}),
- InstrumentHandlerCounter(counter,
- InstrumentHandlerResponseSize(responseSize, pullHandler),
- ),
- ),
- )
-
- http.Handle("/metrics", Handler())
- http.Handle("/push", pushChain)
- http.Handle("/pull", pullChain)
-
- if err := http.ListenAndServe(":3000", nil); err != nil {
- log.Fatal(err)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go b/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go
deleted file mode 100644
index 3d62b5725..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// 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.
-
-package push
-
-// This file contains only deprecated code. Remove after v0.9 is released.
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "os"
- "strings"
-
- "github.com/prometheus/common/expfmt"
- "github.com/prometheus/common/model"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-// FromGatherer triggers a metric collection by the provided Gatherer (which is
-// usually implemented by a prometheus.Registry) and pushes all gathered metrics
-// to the Pushgateway specified by url, using the provided job name and the
-// (optional) further grouping labels (the grouping map may be nil). See the
-// Pushgateway documentation for detailed implications of the job and other
-// grouping labels. Neither the job name nor any grouping label value may
-// contain a "/". The metrics pushed must not contain a job label of their own
-// nor any of the grouping labels.
-//
-// You can use just host:port or ip:port as url, in which case 'http://' is
-// added automatically. You can also include the schema in the URL. However, do
-// not include the '/metrics/jobs/...' part.
-//
-// Note that all previously pushed metrics with the same job and other grouping
-// labels will be replaced with the metrics pushed by this call. (It uses HTTP
-// method 'PUT' to push to the Pushgateway.)
-//
-// Deprecated: Please use a Pusher created with New instead.
-func FromGatherer(job string, grouping map[string]string, url string, g prometheus.Gatherer) error {
- return push(job, grouping, url, g, "PUT")
-}
-
-// AddFromGatherer works like FromGatherer, but only previously pushed metrics
-// with the same name (and the same job and other grouping labels) will be
-// replaced. (It uses HTTP method 'POST' to push to the Pushgateway.)
-//
-// Deprecated: Please use a Pusher created with New instead.
-func AddFromGatherer(job string, grouping map[string]string, url string, g prometheus.Gatherer) error {
- return push(job, grouping, url, g, "POST")
-}
-
-func push(job string, grouping map[string]string, pushURL string, g prometheus.Gatherer, method string) error {
- if !strings.Contains(pushURL, "://") {
- pushURL = "http://" + pushURL
- }
- if strings.HasSuffix(pushURL, "/") {
- pushURL = pushURL[:len(pushURL)-1]
- }
-
- if strings.Contains(job, "/") {
- return fmt.Errorf("job contains '/': %s", job)
- }
- urlComponents := []string{url.QueryEscape(job)}
- for ln, lv := range grouping {
- if !model.LabelName(ln).IsValid() {
- return fmt.Errorf("grouping label has invalid name: %s", ln)
- }
- if strings.Contains(lv, "/") {
- return fmt.Errorf("value of grouping label %s contains '/': %s", ln, lv)
- }
- urlComponents = append(urlComponents, ln, lv)
- }
- pushURL = fmt.Sprintf("%s/metrics/job/%s", pushURL, strings.Join(urlComponents, "/"))
-
- mfs, err := g.Gather()
- if err != nil {
- return err
- }
- buf := &bytes.Buffer{}
- enc := expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)
- // Check for pre-existing grouping labels:
- for _, mf := range mfs {
- for _, m := range mf.GetMetric() {
- for _, l := range m.GetLabel() {
- if l.GetName() == "job" {
- return fmt.Errorf("pushed metric %s (%s) already contains a job label", mf.GetName(), m)
- }
- if _, ok := grouping[l.GetName()]; ok {
- return fmt.Errorf(
- "pushed metric %s (%s) already contains grouping label %s",
- mf.GetName(), m, l.GetName(),
- )
- }
- }
- }
- enc.Encode(mf)
- }
- req, err := http.NewRequest(method, pushURL, buf)
- if err != nil {
- return err
- }
- req.Header.Set(contentTypeHeader, string(expfmt.FmtProtoDelim))
- resp, err := http.DefaultClient.Do(req)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.StatusCode != 202 {
- body, _ := ioutil.ReadAll(resp.Body) // Ignore any further error as this is for an error message only.
- return fmt.Errorf("unexpected status code %d while pushing to %s: %s", resp.StatusCode, pushURL, body)
- }
- return nil
-}
-
-// Collectors works like FromGatherer, but it does not use a Gatherer. Instead,
-// it collects from the provided collectors directly. It is a convenient way to
-// push only a few metrics.
-//
-// Deprecated: Please use a Pusher created with New instead.
-func Collectors(job string, grouping map[string]string, url string, collectors ...prometheus.Collector) error {
- return pushCollectors(job, grouping, url, "PUT", collectors...)
-}
-
-// AddCollectors works like AddFromGatherer, but it does not use a Gatherer.
-// Instead, it collects from the provided collectors directly. It is a
-// convenient way to push only a few metrics.
-//
-// Deprecated: Please use a Pusher created with New instead.
-func AddCollectors(job string, grouping map[string]string, url string, collectors ...prometheus.Collector) error {
- return pushCollectors(job, grouping, url, "POST", collectors...)
-}
-
-func pushCollectors(job string, grouping map[string]string, url, method string, collectors ...prometheus.Collector) error {
- r := prometheus.NewRegistry()
- for _, collector := range collectors {
- if err := r.Register(collector); err != nil {
- return err
- }
- }
- return push(job, grouping, url, r, method)
-}
-
-// HostnameGroupingKey returns a label map with the only entry
-// {instance="<hostname>"}. This can be conveniently used as the grouping
-// parameter if metrics should be pushed with the hostname as label. The
-// returned map is created upon each call so that the caller is free to add more
-// labels to the map.
-//
-// Deprecated: Usually, metrics pushed to the Pushgateway should not be
-// host-centric. (You would use https://github.com/prometheus/node_exporter in
-// that case.) If you have the need to add the hostname to the grouping key, you
-// are probably doing something wrong. See
-// https://prometheus.io/docs/practices/pushing/ for details.
-func HostnameGroupingKey() map[string]string {
- hostname, err := os.Hostname()
- if err != nil {
- return map[string]string{"instance": "unknown"}
- }
- return map[string]string{"instance": hostname}
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/example_add_from_gatherer_test.go b/vendor/github.com/prometheus/client_golang/prometheus/push/example_add_from_gatherer_test.go
deleted file mode 100644
index dd22b526a..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/push/example_add_from_gatherer_test.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package push_test
-
-import (
- "fmt"
- "time"
-
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/push"
-)
-
-var (
- completionTime = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "db_backup_last_completion_timestamp_seconds",
- Help: "The timestamp of the last completion of a DB backup, successful or not.",
- })
- successTime = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "db_backup_last_success_timestamp_seconds",
- Help: "The timestamp of the last successful completion of a DB backup.",
- })
- duration = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "db_backup_duration_seconds",
- Help: "The duration of the last DB backup in seconds.",
- })
- records = prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "db_backup_records_processed",
- Help: "The number of records processed in the last DB backup.",
- })
-)
-
-func performBackup() (int, error) {
- // Perform the backup and return the number of backed up records and any
- // applicable error.
- // ...
- return 42, nil
-}
-
-func ExamplePusher_Add() {
- // We use a registry here to benefit from the consistency checks that
- // happen during registration.
- registry := prometheus.NewRegistry()
- registry.MustRegister(completionTime, duration, records)
- // Note that successTime is not registered.
-
- pusher := push.New("http://pushgateway:9091", "db_backup").Gatherer(registry)
-
- start := time.Now()
- n, err := performBackup()
- records.Set(float64(n))
- // Note that time.Since only uses a monotonic clock in Go1.9+.
- duration.Set(time.Since(start).Seconds())
- completionTime.SetToCurrentTime()
- if err != nil {
- fmt.Println("DB backup failed:", err)
- } else {
- // Add successTime to pusher only in case of success.
- // We could as well register it with the registry.
- // This example, however, demonstrates that you can
- // mix Gatherers and Collectors when handling a Pusher.
- pusher.Collector(successTime)
- successTime.SetToCurrentTime()
- }
- // Add is used here rather than Push to not delete a previously pushed
- // success timestamp in case of a failure of this backup.
- if err := pusher.Add(); err != nil {
- fmt.Println("Could not push to Pushgateway:", err)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/examples_test.go b/vendor/github.com/prometheus/client_golang/prometheus/push/examples_test.go
deleted file mode 100644
index fa5549a9e..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/push/examples_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package push_test
-
-import (
- "fmt"
-
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/push"
-)
-
-func ExamplePusher_Push() {
- completionTime := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "db_backup_last_completion_timestamp_seconds",
- Help: "The timestamp of the last successful completion of a DB backup.",
- })
- completionTime.SetToCurrentTime()
- if err := push.New("http://pushgateway:9091", "db_backup").
- Collector(completionTime).
- Grouping("db", "customers").
- Push(); err != nil {
- fmt.Println("Could not push completion time to Pushgateway:", err)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/push.go b/vendor/github.com/prometheus/client_golang/prometheus/push/push.go
deleted file mode 100644
index 02be52c38..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/push/push.go
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// Package push provides functions to push metrics to a Pushgateway. It uses a
-// builder approach. Create a Pusher with New and then add the various options
-// by using its methods, finally calling Add or Push, like this:
-//
-// // Easy case:
-// push.New("http://example.org/metrics", "my_job").Gatherer(myRegistry).Push()
-//
-// // Complex case:
-// push.New("http://example.org/metrics", "my_job").
-// Collector(myCollector1).
-// Collector(myCollector2).
-// Grouping("zone", "xy").
-// Client(&myHTTPClient).
-// BasicAuth("top", "secret").
-// Add()
-//
-// See the examples section for more detailed examples.
-//
-// See the documentation of the Pushgateway to understand the meaning of
-// the grouping key and the differences between Push and Add:
-// https://github.com/prometheus/pushgateway
-package push
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/prometheus/common/expfmt"
- "github.com/prometheus/common/model"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-const contentTypeHeader = "Content-Type"
-
-// Pusher manages a push to the Pushgateway. Use New to create one, configure it
-// with its methods, and finally use the Add or Push method to push.
-type Pusher struct {
- error error
-
- url, job string
- grouping map[string]string
-
- gatherers prometheus.Gatherers
- registerer prometheus.Registerer
-
- client *http.Client
- useBasicAuth bool
- username, password string
-}
-
-// New creates a new Pusher to push to the provided URL withe the provided job
-// name. You can use just host:port or ip:port as url, in which case “http://â€
-// is added automatically. Alternatively, include the schema in the
-// URL. However, do not include the “/metrics/jobs/…†part.
-//
-// Note that until https://github.com/prometheus/pushgateway/issues/97 is
-// resolved, a “/†character in the job name is prohibited.
-func New(url, job string) *Pusher {
- var (
- reg = prometheus.NewRegistry()
- err error
- )
- if !strings.Contains(url, "://") {
- url = "http://" + url
- }
- if strings.HasSuffix(url, "/") {
- url = url[:len(url)-1]
- }
- if strings.Contains(job, "/") {
- err = fmt.Errorf("job contains '/': %s", job)
- }
-
- return &Pusher{
- error: err,
- url: url,
- job: job,
- grouping: map[string]string{},
- gatherers: prometheus.Gatherers{reg},
- registerer: reg,
- client: &http.Client{},
- }
-}
-
-// Push collects/gathers all metrics from all Collectors and Gatherers added to
-// this Pusher. Then, it pushes them to the Pushgateway configured while
-// creating this Pusher, using the configured job name and any added grouping
-// labels as grouping key. All previously pushed metrics with the same job and
-// other grouping labels will be replaced with the metrics pushed by this
-// call. (It uses HTTP method “PUT†to push to the Pushgateway.)
-//
-// Push returns the first error encountered by any method call (including this
-// one) in the lifetime of the Pusher.
-func (p *Pusher) Push() error {
- return p.push("PUT")
-}
-
-// Add works like push, but only previously pushed metrics with the same name
-// (and the same job and other grouping labels) will be replaced. (It uses HTTP
-// method “POST†to push to the Pushgateway.)
-func (p *Pusher) Add() error {
- return p.push("POST")
-}
-
-// Gatherer adds a Gatherer to the Pusher, from which metrics will be gathered
-// to push them to the Pushgateway. The gathered metrics must not contain a job
-// label of their own.
-//
-// For convenience, this method returns a pointer to the Pusher itself.
-func (p *Pusher) Gatherer(g prometheus.Gatherer) *Pusher {
- p.gatherers = append(p.gatherers, g)
- return p
-}
-
-// Collector adds a Collector to the Pusher, from which metrics will be
-// collected to push them to the Pushgateway. The collected metrics must not
-// contain a job label of their own.
-//
-// For convenience, this method returns a pointer to the Pusher itself.
-func (p *Pusher) Collector(c prometheus.Collector) *Pusher {
- if p.error == nil {
- p.error = p.registerer.Register(c)
- }
- return p
-}
-
-// Grouping adds a label pair to the grouping key of the Pusher, replacing any
-// previously added label pair with the same label name. Note that setting any
-// labels in the grouping key that are already contained in the metrics to push
-// will lead to an error.
-//
-// For convenience, this method returns a pointer to the Pusher itself.
-//
-// Note that until https://github.com/prometheus/pushgateway/issues/97 is
-// resolved, this method does not allow a “/†character in the label value.
-func (p *Pusher) Grouping(name, value string) *Pusher {
- if p.error == nil {
- if !model.LabelName(name).IsValid() {
- p.error = fmt.Errorf("grouping label has invalid name: %s", name)
- return p
- }
- if strings.Contains(value, "/") {
- p.error = fmt.Errorf("value of grouping label %s contains '/': %s", name, value)
- return p
- }
- p.grouping[name] = value
- }
- return p
-}
-
-// Client sets a custom HTTP client for the Pusher. For convenience, this method
-// returns a pointer to the Pusher itself.
-func (p *Pusher) Client(c *http.Client) *Pusher {
- p.client = c
- return p
-}
-
-// BasicAuth configures the Pusher to use HTTP Basic Authentication with the
-// provided username and password. For convenience, this method returns a
-// pointer to the Pusher itself.
-func (p *Pusher) BasicAuth(username, password string) *Pusher {
- p.useBasicAuth = true
- p.username = username
- p.password = password
- return p
-}
-
-func (p *Pusher) push(method string) error {
- if p.error != nil {
- return p.error
- }
- urlComponents := []string{url.QueryEscape(p.job)}
- for ln, lv := range p.grouping {
- urlComponents = append(urlComponents, ln, lv)
- }
- pushURL := fmt.Sprintf("%s/metrics/job/%s", p.url, strings.Join(urlComponents, "/"))
-
- mfs, err := p.gatherers.Gather()
- if err != nil {
- return err
- }
- buf := &bytes.Buffer{}
- enc := expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)
- // Check for pre-existing grouping labels:
- for _, mf := range mfs {
- for _, m := range mf.GetMetric() {
- for _, l := range m.GetLabel() {
- if l.GetName() == "job" {
- return fmt.Errorf("pushed metric %s (%s) already contains a job label", mf.GetName(), m)
- }
- if _, ok := p.grouping[l.GetName()]; ok {
- return fmt.Errorf(
- "pushed metric %s (%s) already contains grouping label %s",
- mf.GetName(), m, l.GetName(),
- )
- }
- }
- }
- enc.Encode(mf)
- }
- req, err := http.NewRequest(method, pushURL, buf)
- if err != nil {
- return err
- }
- if p.useBasicAuth {
- req.SetBasicAuth(p.username, p.password)
- }
- req.Header.Set(contentTypeHeader, string(expfmt.FmtProtoDelim))
- resp, err := p.client.Do(req)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.StatusCode != 202 {
- body, _ := ioutil.ReadAll(resp.Body) // Ignore any further error as this is for an error message only.
- return fmt.Errorf("unexpected status code %d while pushing to %s: %s", resp.StatusCode, pushURL, body)
- }
- return nil
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/push_test.go b/vendor/github.com/prometheus/client_golang/prometheus/push/push_test.go
deleted file mode 100644
index 34ec334bb..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/push/push_test.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package push
-
-import (
- "bytes"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "testing"
-
- "github.com/prometheus/common/expfmt"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-func TestPush(t *testing.T) {
-
- var (
- lastMethod string
- lastBody []byte
- lastPath string
- )
-
- // Fake a Pushgateway that always responds with 202.
- pgwOK := httptest.NewServer(
- http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- lastMethod = r.Method
- var err error
- lastBody, err = ioutil.ReadAll(r.Body)
- if err != nil {
- t.Fatal(err)
- }
- lastPath = r.URL.EscapedPath()
- w.Header().Set("Content-Type", `text/plain; charset=utf-8`)
- w.WriteHeader(http.StatusAccepted)
- }),
- )
- defer pgwOK.Close()
-
- // Fake a Pushgateway that always responds with 500.
- pgwErr := httptest.NewServer(
- http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- http.Error(w, "fake error", http.StatusInternalServerError)
- }),
- )
- defer pgwErr.Close()
-
- metric1 := prometheus.NewCounter(prometheus.CounterOpts{
- Name: "testname1",
- Help: "testhelp1",
- })
- metric2 := prometheus.NewGauge(prometheus.GaugeOpts{
- Name: "testname2",
- Help: "testhelp2",
- ConstLabels: prometheus.Labels{"foo": "bar", "dings": "bums"},
- })
-
- reg := prometheus.NewRegistry()
- reg.MustRegister(metric1)
- reg.MustRegister(metric2)
-
- mfs, err := reg.Gather()
- if err != nil {
- t.Fatal(err)
- }
-
- buf := &bytes.Buffer{}
- enc := expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)
-
- for _, mf := range mfs {
- if err := enc.Encode(mf); err != nil {
- t.Fatal(err)
- }
- }
- wantBody := buf.Bytes()
-
- // Push some Collectors, all good.
- if err := New(pgwOK.URL, "testjob").
- Collector(metric1).
- Collector(metric2).
- Push(); err != nil {
- t.Fatal(err)
- }
- if lastMethod != "PUT" {
- t.Error("want method PUT for Push, got", lastMethod)
- }
- if bytes.Compare(lastBody, wantBody) != 0 {
- t.Errorf("got body %v, want %v", lastBody, wantBody)
- }
- if lastPath != "/metrics/job/testjob" {
- t.Error("unexpected path:", lastPath)
- }
-
- // Add some Collectors, with nil grouping, all good.
- if err := New(pgwOK.URL, "testjob").
- Collector(metric1).
- Collector(metric2).
- Add(); err != nil {
- t.Fatal(err)
- }
- if lastMethod != "POST" {
- t.Error("want method POST for Add, got", lastMethod)
- }
- if bytes.Compare(lastBody, wantBody) != 0 {
- t.Errorf("got body %v, want %v", lastBody, wantBody)
- }
- if lastPath != "/metrics/job/testjob" {
- t.Error("unexpected path:", lastPath)
- }
-
- // Push some Collectors with a broken PGW.
- if err := New(pgwErr.URL, "testjob").
- Collector(metric1).
- Collector(metric2).
- Push(); err == nil {
- t.Error("push to broken Pushgateway succeeded")
- } else {
- if got, want := err.Error(), "unexpected status code 500 while pushing to "+pgwErr.URL+"/metrics/job/testjob: fake error\n"; got != want {
- t.Errorf("got error %q, want %q", got, want)
- }
- }
-
- // Push some Collectors with invalid grouping or job.
- if err := New(pgwOK.URL, "testjob").
- Grouping("foo", "bums").
- Collector(metric1).
- Collector(metric2).
- Push(); err == nil {
- t.Error("push with grouping contained in metrics succeeded")
- }
- if err := New(pgwOK.URL, "test/job").
- Collector(metric1).
- Collector(metric2).
- Push(); err == nil {
- t.Error("push with invalid job value succeeded")
- }
- if err := New(pgwOK.URL, "testjob").
- Grouping("foobar", "bu/ms").
- Collector(metric1).
- Collector(metric2).
- Push(); err == nil {
- t.Error("push with invalid grouping succeeded")
- }
- if err := New(pgwOK.URL, "testjob").
- Grouping("foo-bar", "bums").
- Collector(metric1).
- Collector(metric2).
- Push(); err == nil {
- t.Error("push with invalid grouping succeeded")
- }
-
- // Push registry, all good.
- if err := New(pgwOK.URL, "testjob").
- Gatherer(reg).
- Push(); err != nil {
- t.Fatal(err)
- }
- if lastMethod != "PUT" {
- t.Error("want method PUT for Push, got", lastMethod)
- }
- if bytes.Compare(lastBody, wantBody) != 0 {
- t.Errorf("got body %v, want %v", lastBody, wantBody)
- }
-
- // Add registry, all good.
- if err := New(pgwOK.URL, "testjob").
- Grouping("a", "x").
- Grouping("b", "y").
- Gatherer(reg).
- Add(); err != nil {
- t.Fatal(err)
- }
- if lastMethod != "POST" {
- t.Error("want method POST for Add, got", lastMethod)
- }
- if bytes.Compare(lastBody, wantBody) != 0 {
- t.Errorf("got body %v, want %v", lastBody, wantBody)
- }
- if lastPath != "/metrics/job/testjob/a/x/b/y" && lastPath != "/metrics/job/testjob/b/y/a/x" {
- t.Error("unexpected path:", lastPath)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go
index bee370364..32a3986b0 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/registry.go
@@ -18,10 +18,8 @@ import (
"errors"
"fmt"
"os"
- "runtime"
"sort"
"sync"
- "unicode/utf8"
"github.com/golang/protobuf/proto"
@@ -37,13 +35,13 @@ const (
// DefaultRegisterer and DefaultGatherer are the implementations of the
// Registerer and Gatherer interface a number of convenience functions in this
// package act on. Initially, both variables point to the same Registry, which
-// has a process collector (currently on Linux only, see NewProcessCollector)
-// and a Go collector (see NewGoCollector) already registered. This approach to
-// keep default instances as global state mirrors the approach of other packages
-// in the Go standard library. Note that there are caveats. Change the variables
-// with caution and only if you understand the consequences. Users who want to
-// avoid global state altogether should not use the convenience functions and
-// act on custom instances instead.
+// has a process collector (see NewProcessCollector) and a Go collector (see
+// NewGoCollector) already registered. This approach to keep default instances
+// as global state mirrors the approach of other packages in the Go standard
+// library. Note that there are caveats. Change the variables with caution and
+// only if you understand the consequences. Users who want to avoid global state
+// altogether should not use the convenience function and act on custom
+// instances instead.
var (
defaultRegistry = NewRegistry()
DefaultRegisterer Registerer = defaultRegistry
@@ -82,7 +80,7 @@ func NewPedanticRegistry() *Registry {
// Registerer is the interface for the part of a registry in charge of
// registering and unregistering. Users of custom registries should use
-// Registerer as type for registration purposes (rather than the Registry type
+// Registerer as type for registration purposes (rather then the Registry type
// directly). In that way, they are free to use custom Registerer implementation
// (e.g. for testing purposes).
type Registerer interface {
@@ -154,6 +152,38 @@ func MustRegister(cs ...Collector) {
DefaultRegisterer.MustRegister(cs...)
}
+// RegisterOrGet registers the provided Collector with the DefaultRegisterer and
+// returns the Collector, unless an equal Collector was registered before, in
+// which case that Collector is returned.
+//
+// Deprecated: RegisterOrGet is merely a convenience function for the
+// implementation as described in the documentation for
+// AlreadyRegisteredError. As the use case is relatively rare, this function
+// will be removed in a future version of this package to clean up the
+// namespace.
+func RegisterOrGet(c Collector) (Collector, error) {
+ if err := Register(c); err != nil {
+ if are, ok := err.(AlreadyRegisteredError); ok {
+ return are.ExistingCollector, nil
+ }
+ return nil, err
+ }
+ return c, nil
+}
+
+// MustRegisterOrGet behaves like RegisterOrGet but panics instead of returning
+// an error.
+//
+// Deprecated: This is deprecated for the same reason RegisterOrGet is. See
+// there for details.
+func MustRegisterOrGet(c Collector) Collector {
+ c, err := RegisterOrGet(c)
+ if err != nil {
+ panic(err)
+ }
+ return c
+}
+
// Unregister removes the registration of the provided Collector from the
// DefaultRegisterer.
//
@@ -171,6 +201,25 @@ func (gf GathererFunc) Gather() ([]*dto.MetricFamily, error) {
return gf()
}
+// SetMetricFamilyInjectionHook replaces the DefaultGatherer with one that
+// gathers from the previous DefaultGatherers but then merges the MetricFamily
+// protobufs returned from the provided hook function with the MetricFamily
+// protobufs returned from the original DefaultGatherer.
+//
+// Deprecated: This function manipulates the DefaultGatherer variable. Consider
+// the implications, i.e. don't do this concurrently with any uses of the
+// DefaultGatherer. In the rare cases where you need to inject MetricFamily
+// protobufs directly, it is recommended to use a custom Registry and combine it
+// with a custom Gatherer using the Gatherers type (see
+// there). SetMetricFamilyInjectionHook only exists for compatibility reasons
+// with previous versions of this package.
+func SetMetricFamilyInjectionHook(hook func() []*dto.MetricFamily) {
+ DefaultGatherer = Gatherers{
+ DefaultGatherer,
+ GathererFunc(func() ([]*dto.MetricFamily, error) { return hook(), nil }),
+ }
+}
+
// AlreadyRegisteredError is returned by the Register method if the Collector to
// be registered has already been registered before, or a different Collector
// that collects the same metrics has been registered before. Registration fails
@@ -203,13 +252,6 @@ func (errs MultiError) Error() string {
return buf.String()
}
-// Append appends the provided error if it is not nil.
-func (errs *MultiError) Append(err error) {
- if err != nil {
- *errs = append(*errs, err)
- }
-}
-
// MaybeUnwrap returns nil if len(errs) is 0. It returns the first and only
// contained error as error if len(errs is 1). In all other cases, it returns
// the MultiError directly. This is helpful for returning a MultiError in a way
@@ -252,7 +294,7 @@ func (r *Registry) Register(c Collector) error {
}()
r.mtx.Lock()
defer r.mtx.Unlock()
- // Conduct various tests...
+ // Coduct various tests...
for desc := range descChan {
// Is the descriptor valid at all?
@@ -376,12 +418,22 @@ func (r *Registry) Gather() ([]*dto.MetricFamily, error) {
)
r.mtx.RLock()
- goroutineBudget := len(r.collectorsByID)
metricFamiliesByName := make(map[string]*dto.MetricFamily, len(r.dimHashesByName))
- collectors := make(chan Collector, len(r.collectorsByID))
+
+ // Scatter.
+ // (Collectors could be complex and slow, so we call them all at once.)
+ wg.Add(len(r.collectorsByID))
+ go func() {
+ wg.Wait()
+ close(metricChan)
+ }()
for _, collector := range r.collectorsByID {
- collectors <- collector
+ go func(collector Collector) {
+ defer wg.Done()
+ collector.Collect(metricChan)
+ }(collector)
}
+
// In case pedantic checks are enabled, we have to copy the map before
// giving up the RLock.
if r.pedanticChecksEnabled {
@@ -390,174 +442,127 @@ func (r *Registry) Gather() ([]*dto.MetricFamily, error) {
registeredDescIDs[id] = struct{}{}
}
}
- r.mtx.RUnlock()
- wg.Add(goroutineBudget)
-
- collectWorker := func() {
- for {
- select {
- case collector := <-collectors:
- collector.Collect(metricChan)
- wg.Done()
- default:
- return
- }
- }
- }
-
- // Start the first worker now to make sure at least one is running.
- go collectWorker()
- goroutineBudget--
-
- // Close the metricChan once all collectors are collected.
- go func() {
- wg.Wait()
- close(metricChan)
- }()
+ r.mtx.RUnlock()
// Drain metricChan in case of premature return.
defer func() {
- for range metricChan {
+ for _ = range metricChan {
}
}()
-collectLoop:
- for {
- select {
- case metric, ok := <-metricChan:
- if !ok {
- // metricChan is closed, we are done.
- break collectLoop
- }
- errs.Append(processMetric(
- metric, metricFamiliesByName,
- metricHashes, dimHashes,
- registeredDescIDs,
+ // Gather.
+ for metric := range metricChan {
+ // This could be done concurrently, too, but it required locking
+ // of metricFamiliesByName (and of metricHashes if checks are
+ // enabled). Most likely not worth it.
+ desc := metric.Desc()
+ dtoMetric := &dto.Metric{}
+ if err := metric.Write(dtoMetric); err != nil {
+ errs = append(errs, fmt.Errorf(
+ "error collecting metric %v: %s", desc, err,
))
- default:
- if goroutineBudget <= 0 || len(collectors) == 0 {
- // All collectors are aleady being worked on or
- // we have already as many goroutines started as
- // there are collectors. Just process metrics
- // from now on.
- for metric := range metricChan {
- errs.Append(processMetric(
- metric, metricFamiliesByName,
- metricHashes, dimHashes,
- registeredDescIDs,
+ continue
+ }
+ metricFamily, ok := metricFamiliesByName[desc.fqName]
+ if ok {
+ if metricFamily.GetHelp() != desc.help {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s has help %q but should have %q",
+ desc.fqName, dtoMetric, desc.help, metricFamily.GetHelp(),
+ ))
+ continue
+ }
+ // TODO(beorn7): Simplify switch once Desc has type.
+ switch metricFamily.GetType() {
+ case dto.MetricType_COUNTER:
+ if dtoMetric.Counter == nil {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s should be a Counter",
+ desc.fqName, dtoMetric,
+ ))
+ continue
+ }
+ case dto.MetricType_GAUGE:
+ if dtoMetric.Gauge == nil {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s should be a Gauge",
+ desc.fqName, dtoMetric,
+ ))
+ continue
+ }
+ case dto.MetricType_SUMMARY:
+ if dtoMetric.Summary == nil {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s should be a Summary",
+ desc.fqName, dtoMetric,
+ ))
+ continue
+ }
+ case dto.MetricType_UNTYPED:
+ if dtoMetric.Untyped == nil {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s should be Untyped",
+ desc.fqName, dtoMetric,
+ ))
+ continue
+ }
+ case dto.MetricType_HISTOGRAM:
+ if dtoMetric.Histogram == nil {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s should be a Histogram",
+ desc.fqName, dtoMetric,
))
+ continue
}
- break collectLoop
+ default:
+ panic("encountered MetricFamily with invalid type")
}
- // Start more workers.
- go collectWorker()
- goroutineBudget--
- runtime.Gosched()
+ } else {
+ metricFamily = &dto.MetricFamily{}
+ metricFamily.Name = proto.String(desc.fqName)
+ metricFamily.Help = proto.String(desc.help)
+ // TODO(beorn7): Simplify switch once Desc has type.
+ switch {
+ case dtoMetric.Gauge != nil:
+ metricFamily.Type = dto.MetricType_GAUGE.Enum()
+ case dtoMetric.Counter != nil:
+ metricFamily.Type = dto.MetricType_COUNTER.Enum()
+ case dtoMetric.Summary != nil:
+ metricFamily.Type = dto.MetricType_SUMMARY.Enum()
+ case dtoMetric.Untyped != nil:
+ metricFamily.Type = dto.MetricType_UNTYPED.Enum()
+ case dtoMetric.Histogram != nil:
+ metricFamily.Type = dto.MetricType_HISTOGRAM.Enum()
+ default:
+ errs = append(errs, fmt.Errorf(
+ "empty metric collected: %s", dtoMetric,
+ ))
+ continue
+ }
+ metricFamiliesByName[desc.fqName] = metricFamily
}
- }
- return normalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap()
-}
-
-// processMetric is an internal helper method only used by the Gather method.
-func processMetric(
- metric Metric,
- metricFamiliesByName map[string]*dto.MetricFamily,
- metricHashes map[uint64]struct{},
- dimHashes map[string]uint64,
- registeredDescIDs map[uint64]struct{},
-) error {
- desc := metric.Desc()
- dtoMetric := &dto.Metric{}
- if err := metric.Write(dtoMetric); err != nil {
- return fmt.Errorf("error collecting metric %v: %s", desc, err)
- }
- metricFamily, ok := metricFamiliesByName[desc.fqName]
- if ok {
- if metricFamily.GetHelp() != desc.help {
- return fmt.Errorf(
- "collected metric %s %s has help %q but should have %q",
- desc.fqName, dtoMetric, desc.help, metricFamily.GetHelp(),
- )
+ if err := checkMetricConsistency(metricFamily, dtoMetric, metricHashes, dimHashes); err != nil {
+ errs = append(errs, err)
+ continue
}
- // TODO(beorn7): Simplify switch once Desc has type.
- switch metricFamily.GetType() {
- case dto.MetricType_COUNTER:
- if dtoMetric.Counter == nil {
- return fmt.Errorf(
- "collected metric %s %s should be a Counter",
- desc.fqName, dtoMetric,
- )
- }
- case dto.MetricType_GAUGE:
- if dtoMetric.Gauge == nil {
- return fmt.Errorf(
- "collected metric %s %s should be a Gauge",
- desc.fqName, dtoMetric,
- )
+ if r.pedanticChecksEnabled {
+ // Is the desc registered at all?
+ if _, exist := registeredDescIDs[desc.id]; !exist {
+ errs = append(errs, fmt.Errorf(
+ "collected metric %s %s with unregistered descriptor %s",
+ metricFamily.GetName(), dtoMetric, desc,
+ ))
+ continue
}
- case dto.MetricType_SUMMARY:
- if dtoMetric.Summary == nil {
- return fmt.Errorf(
- "collected metric %s %s should be a Summary",
- desc.fqName, dtoMetric,
- )
+ if err := checkDescConsistency(metricFamily, dtoMetric, desc); err != nil {
+ errs = append(errs, err)
+ continue
}
- case dto.MetricType_UNTYPED:
- if dtoMetric.Untyped == nil {
- return fmt.Errorf(
- "collected metric %s %s should be Untyped",
- desc.fqName, dtoMetric,
- )
- }
- case dto.MetricType_HISTOGRAM:
- if dtoMetric.Histogram == nil {
- return fmt.Errorf(
- "collected metric %s %s should be a Histogram",
- desc.fqName, dtoMetric,
- )
- }
- default:
- panic("encountered MetricFamily with invalid type")
- }
- } else {
- metricFamily = &dto.MetricFamily{}
- metricFamily.Name = proto.String(desc.fqName)
- metricFamily.Help = proto.String(desc.help)
- // TODO(beorn7): Simplify switch once Desc has type.
- switch {
- case dtoMetric.Gauge != nil:
- metricFamily.Type = dto.MetricType_GAUGE.Enum()
- case dtoMetric.Counter != nil:
- metricFamily.Type = dto.MetricType_COUNTER.Enum()
- case dtoMetric.Summary != nil:
- metricFamily.Type = dto.MetricType_SUMMARY.Enum()
- case dtoMetric.Untyped != nil:
- metricFamily.Type = dto.MetricType_UNTYPED.Enum()
- case dtoMetric.Histogram != nil:
- metricFamily.Type = dto.MetricType_HISTOGRAM.Enum()
- default:
- return fmt.Errorf("empty metric collected: %s", dtoMetric)
- }
- metricFamiliesByName[desc.fqName] = metricFamily
- }
- if err := checkMetricConsistency(metricFamily, dtoMetric, metricHashes, dimHashes); err != nil {
- return err
- }
- if registeredDescIDs != nil {
- // Is the desc registered at all?
- if _, exist := registeredDescIDs[desc.id]; !exist {
- return fmt.Errorf(
- "collected metric %s %s with unregistered descriptor %s",
- metricFamily.GetName(), dtoMetric, desc,
- )
- }
- if err := checkDescConsistency(metricFamily, dtoMetric, desc); err != nil {
- return err
}
+ metricFamily.Metric = append(metricFamily.Metric, dtoMetric)
}
- metricFamily.Metric = append(metricFamily.Metric, dtoMetric)
- return nil
+ return normalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap()
}
// Gatherers is a slice of Gatherer instances that implements the Gatherer
@@ -678,7 +683,7 @@ func (s metricSorter) Less(i, j int) bool {
return s[i].GetTimestampMs() < s[j].GetTimestampMs()
}
-// normalizeMetricFamilies returns a MetricFamily slice with empty
+// normalizeMetricFamilies returns a MetricFamily slice whith empty
// MetricFamilies pruned and the remaining MetricFamilies sorted by name within
// the slice, with the contained Metrics sorted within each MetricFamily.
func normalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily {
@@ -701,7 +706,7 @@ func normalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily)
// checkMetricConsistency checks if the provided Metric is consistent with the
// provided MetricFamily. It also hashed the Metric labels and the MetricFamily
-// name. If the resulting hash is already in the provided metricHashes, an error
+// name. If the resulting hash is alread in the provided metricHashes, an error
// is returned. If not, it is added to metricHashes. The provided dimHashes maps
// MetricFamily names to their dimHash (hashed sorted label names). If dimHashes
// doesn't yet contain a hash for the provided MetricFamily, it is
@@ -725,12 +730,6 @@ func checkMetricConsistency(
)
}
- for _, labelPair := range dtoMetric.GetLabel() {
- if !utf8.ValidString(*labelPair.Value) {
- return fmt.Errorf("collected metric's label %s is not utf8: %#v", *labelPair.Name, *labelPair.Value)
- }
- }
-
// Is the metric unique (i.e. no other metric with the same name and the same label values)?
h := hashNew()
h = hashAdd(h, metricFamily.GetName())
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go b/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go
deleted file mode 100644
index d136bba1e..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go
+++ /dev/null
@@ -1,590 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-// Copyright (c) 2013, The Prometheus Authors
-// All rights reserved.
-//
-// Use of this source code is governed by a BSD-style license that can be found
-// in the LICENSE file.
-
-package prometheus_test
-
-import (
- "bytes"
- "net/http"
- "net/http/httptest"
- "testing"
-
- dto "github.com/prometheus/client_model/go"
-
- "github.com/golang/protobuf/proto"
- "github.com/prometheus/common/expfmt"
-
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/promhttp"
-)
-
-func testHandler(t testing.TB) {
-
- metricVec := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "name",
- Help: "docstring",
- ConstLabels: prometheus.Labels{"constname": "constvalue"},
- },
- []string{"labelname"},
- )
-
- metricVec.WithLabelValues("val1").Inc()
- metricVec.WithLabelValues("val2").Inc()
-
- externalMetricFamily := &dto.MetricFamily{
- Name: proto.String("externalname"),
- Help: proto.String("externaldocstring"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- {
- Label: []*dto.LabelPair{
- {
- Name: proto.String("externalconstname"),
- Value: proto.String("externalconstvalue"),
- },
- {
- Name: proto.String("externallabelname"),
- Value: proto.String("externalval1"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(1),
- },
- },
- },
- }
- externalBuf := &bytes.Buffer{}
- enc := expfmt.NewEncoder(externalBuf, expfmt.FmtProtoDelim)
- if err := enc.Encode(externalMetricFamily); err != nil {
- t.Fatal(err)
- }
- externalMetricFamilyAsBytes := externalBuf.Bytes()
- externalMetricFamilyAsText := []byte(`# HELP externalname externaldocstring
-# TYPE externalname counter
-externalname{externalconstname="externalconstvalue",externallabelname="externalval1"} 1
-`)
- externalMetricFamilyAsProtoText := []byte(`name: "externalname"
-help: "externaldocstring"
-type: COUNTER
-metric: <
- label: <
- name: "externalconstname"
- value: "externalconstvalue"
- >
- label: <
- name: "externallabelname"
- value: "externalval1"
- >
- counter: <
- value: 1
- >
->
-
-`)
- externalMetricFamilyAsProtoCompactText := []byte(`name:"externalname" help:"externaldocstring" type:COUNTER metric:<label:<name:"externalconstname" value:"externalconstvalue" > label:<name:"externallabelname" value:"externalval1" > counter:<value:1 > >
-`)
-
- expectedMetricFamily := &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("docstring"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- {
- Label: []*dto.LabelPair{
- {
- Name: proto.String("constname"),
- Value: proto.String("constvalue"),
- },
- {
- Name: proto.String("labelname"),
- Value: proto.String("val1"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(1),
- },
- },
- {
- Label: []*dto.LabelPair{
- {
- Name: proto.String("constname"),
- Value: proto.String("constvalue"),
- },
- {
- Name: proto.String("labelname"),
- Value: proto.String("val2"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(1),
- },
- },
- },
- }
- buf := &bytes.Buffer{}
- enc = expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)
- if err := enc.Encode(expectedMetricFamily); err != nil {
- t.Fatal(err)
- }
- expectedMetricFamilyAsBytes := buf.Bytes()
- expectedMetricFamilyAsText := []byte(`# HELP name docstring
-# TYPE name counter
-name{constname="constvalue",labelname="val1"} 1
-name{constname="constvalue",labelname="val2"} 1
-`)
- expectedMetricFamilyAsProtoText := []byte(`name: "name"
-help: "docstring"
-type: COUNTER
-metric: <
- label: <
- name: "constname"
- value: "constvalue"
- >
- label: <
- name: "labelname"
- value: "val1"
- >
- counter: <
- value: 1
- >
->
-metric: <
- label: <
- name: "constname"
- value: "constvalue"
- >
- label: <
- name: "labelname"
- value: "val2"
- >
- counter: <
- value: 1
- >
->
-
-`)
- expectedMetricFamilyAsProtoCompactText := []byte(`name:"name" help:"docstring" type:COUNTER metric:<label:<name:"constname" value:"constvalue" > label:<name:"labelname" value:"val1" > counter:<value:1 > > metric:<label:<name:"constname" value:"constvalue" > label:<name:"labelname" value:"val2" > counter:<value:1 > >
-`)
-
- externalMetricFamilyWithSameName := &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("docstring"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- {
- Label: []*dto.LabelPair{
- {
- Name: proto.String("constname"),
- Value: proto.String("constvalue"),
- },
- {
- Name: proto.String("labelname"),
- Value: proto.String("different_val"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(42),
- },
- },
- },
- }
-
- expectedMetricFamilyMergedWithExternalAsProtoCompactText := []byte(`name:"name" help:"docstring" type:COUNTER metric:<label:<name:"constname" value:"constvalue" > label:<name:"labelname" value:"different_val" > counter:<value:42 > > metric:<label:<name:"constname" value:"constvalue" > label:<name:"labelname" value:"val1" > counter:<value:1 > > metric:<label:<name:"constname" value:"constvalue" > label:<name:"labelname" value:"val2" > counter:<value:1 > >
-`)
-
- externalMetricFamilyWithInvalidLabelValue := &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("docstring"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- {
- Label: []*dto.LabelPair{
- {
- Name: proto.String("constname"),
- Value: proto.String("\xFF"),
- },
- {
- Name: proto.String("labelname"),
- Value: proto.String("different_val"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(42),
- },
- },
- },
- }
-
- expectedMetricFamilyInvalidLabelValueAsText := []byte(`An error has occurred during metrics gathering:
-
-collected metric's label constname is not utf8: "\xff"
-`)
-
- type output struct {
- headers map[string]string
- body []byte
- }
-
- var scenarios = []struct {
- headers map[string]string
- out output
- collector prometheus.Collector
- externalMF []*dto.MetricFamily
- }{
- { // 0
- headers: map[string]string{
- "Accept": "foo/bar;q=0.2, dings/bums;q=0.8",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: []byte{},
- },
- },
- { // 1
- headers: map[string]string{
- "Accept": "foo/bar;q=0.2, application/quark;q=0.8",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: []byte{},
- },
- },
- { // 2
- headers: map[string]string{
- "Accept": "foo/bar;q=0.2, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.8",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: []byte{},
- },
- },
- { // 3
- headers: map[string]string{
- "Accept": "text/plain;q=0.2, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.8",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`,
- },
- body: []byte{},
- },
- },
- { // 4
- headers: map[string]string{
- "Accept": "application/json",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: expectedMetricFamilyAsText,
- },
- collector: metricVec,
- },
- { // 5
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`,
- },
- body: expectedMetricFamilyAsBytes,
- },
- collector: metricVec,
- },
- { // 6
- headers: map[string]string{
- "Accept": "application/json",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: externalMetricFamilyAsText,
- },
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 7
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`,
- },
- body: externalMetricFamilyAsBytes,
- },
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 8
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsBytes,
- expectedMetricFamilyAsBytes,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 9
- headers: map[string]string{
- "Accept": "text/plain",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: []byte{},
- },
- },
- { // 10
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.2, text/plain;q=0.5",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: expectedMetricFamilyAsText,
- },
- collector: metricVec,
- },
- { // 11
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.2, text/plain;q=0.5;version=0.0.4",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; version=0.0.4`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsText,
- expectedMetricFamilyAsText,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 12
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.2, text/plain;q=0.5;version=0.0.2",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsBytes,
- expectedMetricFamilyAsBytes,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 13
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=text;q=0.5, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.4",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=text`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsProtoText,
- expectedMetricFamilyAsProtoText,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 14
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=compact-text",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsProtoCompactText,
- expectedMetricFamilyAsProtoCompactText,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{externalMetricFamily},
- },
- { // 15
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=compact-text",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text`,
- },
- body: bytes.Join(
- [][]byte{
- externalMetricFamilyAsProtoCompactText,
- expectedMetricFamilyMergedWithExternalAsProtoCompactText,
- },
- []byte{},
- ),
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{
- externalMetricFamily,
- externalMetricFamilyWithSameName,
- },
- },
- { // 16
- headers: map[string]string{
- "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=compact-text",
- },
- out: output{
- headers: map[string]string{
- "Content-Type": `text/plain; charset=utf-8`,
- },
- body: expectedMetricFamilyInvalidLabelValueAsText,
- },
- collector: metricVec,
- externalMF: []*dto.MetricFamily{
- externalMetricFamily,
- externalMetricFamilyWithInvalidLabelValue,
- },
- },
- }
- for i, scenario := range scenarios {
- registry := prometheus.NewPedanticRegistry()
- gatherer := prometheus.Gatherer(registry)
- if scenario.externalMF != nil {
- gatherer = prometheus.Gatherers{
- registry,
- prometheus.GathererFunc(func() ([]*dto.MetricFamily, error) {
- return scenario.externalMF, nil
- }),
- }
- }
-
- if scenario.collector != nil {
- registry.Register(scenario.collector)
- }
- writer := httptest.NewRecorder()
- handler := prometheus.InstrumentHandler("prometheus", promhttp.HandlerFor(gatherer, promhttp.HandlerOpts{}))
- request, _ := http.NewRequest("GET", "/", nil)
- for key, value := range scenario.headers {
- request.Header.Add(key, value)
- }
- handler(writer, request)
-
- for key, value := range scenario.out.headers {
- if writer.HeaderMap.Get(key) != value {
- t.Errorf(
- "%d. expected %q for header %q, got %q",
- i, value, key, writer.Header().Get(key),
- )
- }
- }
-
- if !bytes.Equal(scenario.out.body, writer.Body.Bytes()) {
- t.Errorf(
- "%d. expected body:\n%s\ngot body:\n%s\n",
- i, scenario.out.body, writer.Body.Bytes(),
- )
- }
- }
-}
-
-func TestHandler(t *testing.T) {
- testHandler(t)
-}
-
-func BenchmarkHandler(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testHandler(b)
- }
-}
-
-func TestRegisterWithOrGet(t *testing.T) {
- // Replace the default registerer just to be sure. This is bad, but this
- // whole test will go away once RegisterOrGet is removed.
- oldRegisterer := prometheus.DefaultRegisterer
- defer func() {
- prometheus.DefaultRegisterer = oldRegisterer
- }()
- prometheus.DefaultRegisterer = prometheus.NewRegistry()
- original := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "test",
- Help: "help",
- },
- []string{"foo", "bar"},
- )
- equalButNotSame := prometheus.NewCounterVec(
- prometheus.CounterOpts{
- Name: "test",
- Help: "help",
- },
- []string{"foo", "bar"},
- )
- var err error
- if err = prometheus.Register(original); err != nil {
- t.Fatal(err)
- }
- if err = prometheus.Register(equalButNotSame); err == nil {
- t.Fatal("expected error when registringe equal collector")
- }
- if are, ok := err.(prometheus.AlreadyRegisteredError); ok {
- if are.ExistingCollector != original {
- t.Error("expected original collector but got something else")
- }
- if are.ExistingCollector == equalButNotSame {
- t.Error("expected original callector but got new one")
- }
- } else {
- t.Error("unexpected error:", err)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go
index f7dc85b96..bce05bf9a 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go
@@ -36,10 +36,7 @@ const quantileLabel = "quantile"
//
// A typical use-case is the observation of request latencies. By default, a
// Summary provides the median, the 90th and the 99th percentile of the latency
-// as rank estimations. However, the default behavior will change in the
-// upcoming v0.10 of the library. There will be no rank estiamtions at all by
-// default. For a sane transition, it is recommended to set the desired rank
-// estimations explicitly.
+// as rank estimations.
//
// Note that the rank estimations cannot be aggregated in a meaningful way with
// the Prometheus query language (i.e. you cannot average or add them). If you
@@ -57,9 +54,6 @@ type Summary interface {
}
// DefObjectives are the default Summary quantile values.
-//
-// Deprecated: DefObjectives will not be used as the default objectives in
-// v0.10 of the library. The default Summary will have no quantiles then.
var (
DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
@@ -81,10 +75,8 @@ const (
)
// SummaryOpts bundles the options for creating a Summary metric. It is
-// mandatory to set Name and Help to a non-empty string. While all other fields
-// are optional and can safely be left at their zero value, it is recommended to
-// explicitly set the Objectives field to the desired value as the default value
-// will change in the upcoming v0.10 of the library.
+// mandatory to set Name and Help to a non-empty string. All other fields are
+// optional and can safely be left at their zero value.
type SummaryOpts struct {
// Namespace, Subsystem, and Name are components of the fully-qualified
// name of the Summary (created by joining these components with
@@ -101,28 +93,29 @@ type SummaryOpts struct {
// string.
Help string
- // ConstLabels are used to attach fixed labels to this metric. Metrics
- // with the same fully-qualified name must have the same label names in
- // their ConstLabels.
+ // ConstLabels are used to attach fixed labels to this
+ // Summary. Summaries with the same fully-qualified name must have the
+ // same label names in their ConstLabels.
+ //
+ // Note that in most cases, labels have a value that varies during the
+ // lifetime of a process. Those labels are usually managed with a
+ // SummaryVec. ConstLabels serve only special purposes. One is for the
+ // special case where the value of a label does not change during the
+ // lifetime of a process, e.g. if the revision of the running binary is
+ // put into a label. Another, more advanced purpose is if more than one
+ // Collector needs to collect Summaries with the same fully-qualified
+ // name. In that case, those Summaries must differ in the values of
+ // their ConstLabels. See the Collector examples.
//
- // ConstLabels are only used rarely. In particular, do not use them to
- // attach the same labels to all your metrics. Those use cases are
- // better covered by target labels set by the scraping Prometheus
- // server, or by one specific metric (e.g. a build_info or a
- // machine_role metric). See also
- // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels
+ // If the value of a label never changes (not even between binaries),
+ // that label most likely should not be a label at all (but part of the
+ // metric name).
ConstLabels Labels
// Objectives defines the quantile rank estimates with their respective
- // absolute error. If Objectives[q] = e, then the value reported for q
- // will be the φ-quantile value for some φ between q-e and q+e. The
- // default value is DefObjectives. It is used if Objectives is left at
- // its zero value (i.e. nil). To create a Summary without Objectives,
- // set it to an empty map (i.e. map[float64]float64{}).
- //
- // Deprecated: Note that the current value of DefObjectives is
- // deprecated. It will be replaced by an empty map in v0.10 of the
- // library. Please explicitly set Objectives to the desired value.
+ // absolute error. If Objectives[q] = e, then the value reported
+ // for q will be the φ-quantile value for some φ between q-e and q+e.
+ // The default value is DefObjectives.
Objectives map[float64]float64
// MaxAge defines the duration for which an observation stays relevant
@@ -190,7 +183,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
}
}
- if opts.Objectives == nil {
+ if len(opts.Objectives) == 0 {
opts.Objectives = DefObjectives
}
@@ -397,11 +390,12 @@ func (s quantSort) Less(i, j int) bool {
// (e.g. HTTP request latencies, partitioned by status code and method). Create
// instances with NewSummaryVec.
type SummaryVec struct {
- *metricVec
+ *MetricVec
}
// NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and
-// partitioned by the given label names.
+// partitioned by the given label names. At least one label name must be
+// provided.
func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec {
desc := NewDesc(
BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
@@ -410,116 +404,47 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec {
opts.ConstLabels,
)
return &SummaryVec{
- metricVec: newMetricVec(desc, func(lvs ...string) Metric {
+ MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
return newSummary(desc, opts, lvs...)
}),
}
}
-// GetMetricWithLabelValues returns the Summary for the given slice of label
-// values (same order as the VariableLabels in Desc). If that combination of
-// label values is accessed for the first time, a new Summary is created.
-//
-// It is possible to call this method without using the returned Summary to only
-// create the new Summary but leave it at its starting value, a Summary without
-// any observations.
-//
-// Keeping the Summary for later use is possible (and should be considered if
-// performance is critical), but keep in mind that Reset, DeleteLabelValues and
-// Delete can be used to delete the Summary from the SummaryVec. In that case,
-// the Summary will still exist, but it will not be exported anymore, even if a
-// Summary with the same label values is created later. See also the CounterVec
-// example.
-//
-// An error is returned if the number of label values is not the same as the
-// number of VariableLabels in Desc (minus any curried labels).
-//
-// Note that for more than one label value, this method is prone to mistakes
-// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as
-// an alternative to avoid that type of mistake. For higher label numbers, the
-// latter has a much more readable (albeit more verbose) syntax, but it comes
-// with a performance overhead (for creating and processing the Labels map).
-// See also the GaugeVec example.
-func (v *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) {
- metric, err := v.metricVec.getMetricWithLabelValues(lvs...)
+// GetMetricWithLabelValues replaces the method of the same name in
+// MetricVec. The difference is that this method returns a Summary and not a
+// Metric so that no type conversion is required.
+func (m *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Summary, error) {
+ metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
if metric != nil {
- return metric.(Observer), err
+ return metric.(Summary), err
}
return nil, err
}
-// GetMetricWith returns the Summary for the given Labels map (the label names
-// must match those of the VariableLabels in Desc). If that label map is
-// accessed for the first time, a new Summary is created. Implications of
-// creating a Summary without using it and keeping the Summary for later use are
-// the same as for GetMetricWithLabelValues.
-//
-// An error is returned if the number and names of the Labels are inconsistent
-// with those of the VariableLabels in Desc (minus any curried labels).
-//
-// This method is used for the same purpose as
-// GetMetricWithLabelValues(...string). See there for pros and cons of the two
-// methods.
-func (v *SummaryVec) GetMetricWith(labels Labels) (Observer, error) {
- metric, err := v.metricVec.getMetricWith(labels)
+// GetMetricWith replaces the method of the same name in MetricVec. The
+// difference is that this method returns a Summary and not a Metric so that no
+// type conversion is required.
+func (m *SummaryVec) GetMetricWith(labels Labels) (Summary, error) {
+ metric, err := m.MetricVec.GetMetricWith(labels)
if metric != nil {
- return metric.(Observer), err
+ return metric.(Summary), err
}
return nil, err
}
// WithLabelValues works as GetMetricWithLabelValues, but panics where
-// GetMetricWithLabelValues would have returned an error. Not returning an
-// error allows shortcuts like
+// GetMetricWithLabelValues would have returned an error. By not returning an
+// error, WithLabelValues allows shortcuts like
// myVec.WithLabelValues("404", "GET").Observe(42.21)
-func (v *SummaryVec) WithLabelValues(lvs ...string) Observer {
- s, err := v.GetMetricWithLabelValues(lvs...)
- if err != nil {
- panic(err)
- }
- return s
+func (m *SummaryVec) WithLabelValues(lvs ...string) Summary {
+ return m.MetricVec.WithLabelValues(lvs...).(Summary)
}
// With works as GetMetricWith, but panics where GetMetricWithLabels would have
-// returned an error. Not returning an error allows shortcuts like
-// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21)
-func (v *SummaryVec) With(labels Labels) Observer {
- s, err := v.GetMetricWith(labels)
- if err != nil {
- panic(err)
- }
- return s
-}
-
-// CurryWith returns a vector curried with the provided labels, i.e. the
-// returned vector has those labels pre-set for all labeled operations performed
-// on it. The cardinality of the curried vector is reduced accordingly. The
-// order of the remaining labels stays the same (just with the curried labels
-// taken out of the sequence – which is relevant for the
-// (GetMetric)WithLabelValues methods). It is possible to curry a curried
-// vector, but only with labels not yet used for currying before.
-//
-// The metrics contained in the SummaryVec are shared between the curried and
-// uncurried vectors. They are just accessed differently. Curried and uncurried
-// vectors behave identically in terms of collection. Only one must be
-// registered with a given registry (usually the uncurried version). The Reset
-// method deletes all metrics, even if called on a curried vector.
-func (v *SummaryVec) CurryWith(labels Labels) (ObserverVec, error) {
- vec, err := v.curryWith(labels)
- if vec != nil {
- return &SummaryVec{vec}, err
- }
- return nil, err
-}
-
-// MustCurryWith works as CurryWith but panics where CurryWith would have
-// returned an error.
-func (v *SummaryVec) MustCurryWith(labels Labels) ObserverVec {
- vec, err := v.CurryWith(labels)
- if err != nil {
- panic(err)
- }
- return vec
+// returned an error. By not returning an error, With allows shortcuts like
+// myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21)
+func (m *SummaryVec) With(labels Labels) Summary {
+ return m.MetricVec.With(labels).(Summary)
}
type constSummary struct {
@@ -580,8 +505,8 @@ func NewConstSummary(
quantiles map[float64]float64,
labelValues ...string,
) (Metric, error) {
- if err := validateLabelValues(labelValues, len(desc.variableLabels)); err != nil {
- return nil, err
+ if len(desc.variableLabels) != len(labelValues) {
+ return nil, errInconsistentCardinality
}
return &constSummary{
desc: desc,
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go b/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go
deleted file mode 100644
index b162ed946..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go
+++ /dev/null
@@ -1,388 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "math"
- "math/rand"
- "sort"
- "sync"
- "testing"
- "testing/quick"
- "time"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func TestSummaryWithDefaultObjectives(t *testing.T) {
- reg := NewRegistry()
- summaryWithDefaultObjectives := NewSummary(SummaryOpts{
- Name: "default_objectives",
- Help: "Test help.",
- })
- if err := reg.Register(summaryWithDefaultObjectives); err != nil {
- t.Error(err)
- }
-
- m := &dto.Metric{}
- if err := summaryWithDefaultObjectives.Write(m); err != nil {
- t.Error(err)
- }
- if len(m.GetSummary().Quantile) != len(DefObjectives) {
- t.Error("expected default objectives in summary")
- }
-}
-
-func TestSummaryWithoutObjectives(t *testing.T) {
- reg := NewRegistry()
- summaryWithEmptyObjectives := NewSummary(SummaryOpts{
- Name: "empty_objectives",
- Help: "Test help.",
- Objectives: map[float64]float64{},
- })
- if err := reg.Register(summaryWithEmptyObjectives); err != nil {
- t.Error(err)
- }
-
- m := &dto.Metric{}
- if err := summaryWithEmptyObjectives.Write(m); err != nil {
- t.Error(err)
- }
- if len(m.GetSummary().Quantile) != 0 {
- t.Error("expected no objectives in summary")
- }
-}
-
-func benchmarkSummaryObserve(w int, b *testing.B) {
- b.StopTimer()
-
- wg := new(sync.WaitGroup)
- wg.Add(w)
-
- g := new(sync.WaitGroup)
- g.Add(1)
-
- s := NewSummary(SummaryOpts{})
-
- for i := 0; i < w; i++ {
- go func() {
- g.Wait()
-
- for i := 0; i < b.N; i++ {
- s.Observe(float64(i))
- }
-
- wg.Done()
- }()
- }
-
- b.StartTimer()
- g.Done()
- wg.Wait()
-}
-
-func BenchmarkSummaryObserve1(b *testing.B) {
- benchmarkSummaryObserve(1, b)
-}
-
-func BenchmarkSummaryObserve2(b *testing.B) {
- benchmarkSummaryObserve(2, b)
-}
-
-func BenchmarkSummaryObserve4(b *testing.B) {
- benchmarkSummaryObserve(4, b)
-}
-
-func BenchmarkSummaryObserve8(b *testing.B) {
- benchmarkSummaryObserve(8, b)
-}
-
-func benchmarkSummaryWrite(w int, b *testing.B) {
- b.StopTimer()
-
- wg := new(sync.WaitGroup)
- wg.Add(w)
-
- g := new(sync.WaitGroup)
- g.Add(1)
-
- s := NewSummary(SummaryOpts{})
-
- for i := 0; i < 1000000; i++ {
- s.Observe(float64(i))
- }
-
- for j := 0; j < w; j++ {
- outs := make([]dto.Metric, b.N)
-
- go func(o []dto.Metric) {
- g.Wait()
-
- for i := 0; i < b.N; i++ {
- s.Write(&o[i])
- }
-
- wg.Done()
- }(outs)
- }
-
- b.StartTimer()
- g.Done()
- wg.Wait()
-}
-
-func BenchmarkSummaryWrite1(b *testing.B) {
- benchmarkSummaryWrite(1, b)
-}
-
-func BenchmarkSummaryWrite2(b *testing.B) {
- benchmarkSummaryWrite(2, b)
-}
-
-func BenchmarkSummaryWrite4(b *testing.B) {
- benchmarkSummaryWrite(4, b)
-}
-
-func BenchmarkSummaryWrite8(b *testing.B) {
- benchmarkSummaryWrite(8, b)
-}
-
-func TestSummaryConcurrency(t *testing.T) {
- if testing.Short() {
- t.Skip("Skipping test in short mode.")
- }
-
- rand.Seed(42)
-
- it := func(n uint32) bool {
- mutations := int(n%1e4 + 1e4)
- concLevel := int(n%5 + 1)
- total := mutations * concLevel
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- sum := NewSummary(SummaryOpts{
- Name: "test_summary",
- Help: "helpless",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- })
-
- allVars := make([]float64, total)
- var sampleSum float64
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- for j := 0; j < mutations; j++ {
- v := rand.NormFloat64()
- vals[j] = v
- allVars[i*mutations+j] = v
- sampleSum += v
- }
-
- go func(vals []float64) {
- start.Wait()
- for _, v := range vals {
- sum.Observe(v)
- }
- end.Done()
- }(vals)
- }
- sort.Float64s(allVars)
- start.Done()
- end.Wait()
-
- m := &dto.Metric{}
- sum.Write(m)
- if got, want := int(*m.Summary.SampleCount), total; got != want {
- t.Errorf("got sample count %d, want %d", got, want)
- }
- if got, want := *m.Summary.SampleSum, sampleSum; math.Abs((got-want)/want) > 0.001 {
- t.Errorf("got sample sum %f, want %f", got, want)
- }
-
- objectives := make([]float64, 0, len(DefObjectives))
- for qu := range DefObjectives {
- objectives = append(objectives, qu)
- }
- sort.Float64s(objectives)
-
- for i, wantQ := range objectives {
- ε := DefObjectives[wantQ]
- gotQ := *m.Summary.Quantile[i].Quantile
- gotV := *m.Summary.Quantile[i].Value
- min, max := getBounds(allVars, wantQ, ε)
- if gotQ != wantQ {
- t.Errorf("got quantile %f, want %f", gotQ, wantQ)
- }
- if gotV < min || gotV > max {
- t.Errorf("got %f for quantile %f, want [%f,%f]", gotV, gotQ, min, max)
- }
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Error(err)
- }
-}
-
-func TestSummaryVecConcurrency(t *testing.T) {
- if testing.Short() {
- t.Skip("Skipping test in short mode.")
- }
-
- rand.Seed(42)
-
- objectives := make([]float64, 0, len(DefObjectives))
- for qu := range DefObjectives {
-
- objectives = append(objectives, qu)
- }
- sort.Float64s(objectives)
-
- it := func(n uint32) bool {
- mutations := int(n%1e4 + 1e4)
- concLevel := int(n%7 + 1)
- vecLength := int(n%3 + 1)
-
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- sum := NewSummaryVec(
- SummaryOpts{
- Name: "test_summary",
- Help: "helpless",
- Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
- },
- []string{"label"},
- )
-
- allVars := make([][]float64, vecLength)
- sampleSums := make([]float64, vecLength)
- for i := 0; i < concLevel; i++ {
- vals := make([]float64, mutations)
- picks := make([]int, mutations)
- for j := 0; j < mutations; j++ {
- v := rand.NormFloat64()
- vals[j] = v
- pick := rand.Intn(vecLength)
- picks[j] = pick
- allVars[pick] = append(allVars[pick], v)
- sampleSums[pick] += v
- }
-
- go func(vals []float64) {
- start.Wait()
- for i, v := range vals {
- sum.WithLabelValues(string('A' + picks[i])).Observe(v)
- }
- end.Done()
- }(vals)
- }
- for _, vars := range allVars {
- sort.Float64s(vars)
- }
- start.Done()
- end.Wait()
-
- for i := 0; i < vecLength; i++ {
- m := &dto.Metric{}
- s := sum.WithLabelValues(string('A' + i))
- s.(Summary).Write(m)
- if got, want := int(*m.Summary.SampleCount), len(allVars[i]); got != want {
- t.Errorf("got sample count %d for label %c, want %d", got, 'A'+i, want)
- }
- if got, want := *m.Summary.SampleSum, sampleSums[i]; math.Abs((got-want)/want) > 0.001 {
- t.Errorf("got sample sum %f for label %c, want %f", got, 'A'+i, want)
- }
- for j, wantQ := range objectives {
- ε := DefObjectives[wantQ]
- gotQ := *m.Summary.Quantile[j].Quantile
- gotV := *m.Summary.Quantile[j].Value
- min, max := getBounds(allVars[i], wantQ, ε)
- if gotQ != wantQ {
- t.Errorf("got quantile %f for label %c, want %f", gotQ, 'A'+i, wantQ)
- }
- if gotV < min || gotV > max {
- t.Errorf("got %f for quantile %f for label %c, want [%f,%f]", gotV, gotQ, 'A'+i, min, max)
- }
- }
- }
- return true
- }
-
- if err := quick.Check(it, nil); err != nil {
- t.Error(err)
- }
-}
-
-func TestSummaryDecay(t *testing.T) {
- if testing.Short() {
- t.Skip("Skipping test in short mode.")
- // More because it depends on timing than because it is particularly long...
- }
-
- sum := NewSummary(SummaryOpts{
- Name: "test_summary",
- Help: "helpless",
- MaxAge: 100 * time.Millisecond,
- Objectives: map[float64]float64{0.1: 0.001},
- AgeBuckets: 10,
- })
-
- m := &dto.Metric{}
- i := 0
- tick := time.NewTicker(time.Millisecond)
- for range tick.C {
- i++
- sum.Observe(float64(i))
- if i%10 == 0 {
- sum.Write(m)
- if got, want := *m.Summary.Quantile[0].Value, math.Max(float64(i)/10, float64(i-90)); math.Abs(got-want) > 20 {
- t.Errorf("%d. got %f, want %f", i, got, want)
- }
- m.Reset()
- }
- if i >= 1000 {
- break
- }
- }
- tick.Stop()
- // Wait for MaxAge without observations and make sure quantiles are NaN.
- time.Sleep(100 * time.Millisecond)
- sum.Write(m)
- if got := *m.Summary.Quantile[0].Value; !math.IsNaN(got) {
- t.Errorf("got %f, want NaN after expiration", got)
- }
-}
-
-func getBounds(vars []float64, q, ε float64) (min, max float64) {
- // TODO(beorn7): This currently tolerates an error of up to 2*ε. The
- // error must be at most ε, but for some reason, it's sometimes slightly
- // higher. That's a bug.
- n := float64(len(vars))
- lower := int((q - 2*ε) * n)
- upper := int(math.Ceil((q + 2*ε) * n))
- min = vars[0]
- if lower > 1 {
- min = vars[lower-1]
- }
- max = vars[len(vars)-1]
- if upper < len(vars) {
- max = vars[upper-1]
- }
- return
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/timer.go b/vendor/github.com/prometheus/client_golang/prometheus/timer.go
deleted file mode 100644
index b8fc5f18c..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/timer.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import "time"
-
-// Timer is a helper type to time functions. Use NewTimer to create new
-// instances.
-type Timer struct {
- begin time.Time
- observer Observer
-}
-
-// NewTimer creates a new Timer. The provided Observer is used to observe a
-// duration in seconds. Timer is usually used to time a function call in the
-// following way:
-// func TimeMe() {
-// timer := NewTimer(myHistogram)
-// defer timer.ObserveDuration()
-// // Do actual work.
-// }
-func NewTimer(o Observer) *Timer {
- return &Timer{
- begin: time.Now(),
- observer: o,
- }
-}
-
-// ObserveDuration records the duration passed since the Timer was created with
-// NewTimer. It calls the Observe method of the Observer provided during
-// construction with the duration in seconds as an argument. ObserveDuration is
-// usually called with a defer statement.
-//
-// Note that this method is only guaranteed to never observe negative durations
-// if used with Go1.9+.
-func (t *Timer) ObserveDuration() {
- if t.observer != nil {
- t.observer.Observe(time.Since(t.begin).Seconds())
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/timer_test.go b/vendor/github.com/prometheus/client_golang/prometheus/timer_test.go
deleted file mode 100644
index 294902068..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/timer_test.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "testing"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func TestTimerObserve(t *testing.T) {
- var (
- his = NewHistogram(HistogramOpts{Name: "test_histogram"})
- sum = NewSummary(SummaryOpts{Name: "test_summary"})
- gauge = NewGauge(GaugeOpts{Name: "test_gauge"})
- )
-
- func() {
- hisTimer := NewTimer(his)
- sumTimer := NewTimer(sum)
- gaugeTimer := NewTimer(ObserverFunc(gauge.Set))
- defer hisTimer.ObserveDuration()
- defer sumTimer.ObserveDuration()
- defer gaugeTimer.ObserveDuration()
- }()
-
- m := &dto.Metric{}
- his.Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for histogram, got %d", want, got)
- }
- m.Reset()
- sum.Write(m)
- if want, got := uint64(1), m.GetSummary().GetSampleCount(); want != got {
- t.Errorf("want %d observations for summary, got %d", want, got)
- }
- m.Reset()
- gauge.Write(m)
- if got := m.GetGauge().GetValue(); got <= 0 {
- t.Errorf("want value > 0 for gauge, got %f", got)
- }
-}
-
-func TestTimerEmpty(t *testing.T) {
- emptyTimer := NewTimer(nil)
- emptyTimer.ObserveDuration()
- // Do nothing, just demonstrate it works without panic.
-}
-
-func TestTimerConditionalTiming(t *testing.T) {
- var (
- his = NewHistogram(HistogramOpts{
- Name: "test_histogram",
- })
- timeMe = true
- m = &dto.Metric{}
- )
-
- timedFunc := func() {
- timer := NewTimer(ObserverFunc(func(v float64) {
- if timeMe {
- his.Observe(v)
- }
- }))
- defer timer.ObserveDuration()
- }
-
- timedFunc() // This will time.
- his.Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for histogram, got %d", want, got)
- }
-
- timeMe = false
- timedFunc() // This will not time again.
- m.Reset()
- his.Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for histogram, got %d", want, got)
- }
-}
-
-func TestTimerByOutcome(t *testing.T) {
- var (
- his = NewHistogramVec(
- HistogramOpts{Name: "test_histogram"},
- []string{"outcome"},
- )
- outcome = "foo"
- m = &dto.Metric{}
- )
-
- timedFunc := func() {
- timer := NewTimer(ObserverFunc(func(v float64) {
- his.WithLabelValues(outcome).Observe(v)
- }))
- defer timer.ObserveDuration()
-
- if outcome == "foo" {
- outcome = "bar"
- return
- }
- outcome = "foo"
- }
-
- timedFunc()
- his.WithLabelValues("foo").(Histogram).Write(m)
- if want, got := uint64(0), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'foo' histogram, got %d", want, got)
- }
- m.Reset()
- his.WithLabelValues("bar").(Histogram).Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'bar' histogram, got %d", want, got)
- }
-
- timedFunc()
- m.Reset()
- his.WithLabelValues("foo").(Histogram).Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'foo' histogram, got %d", want, got)
- }
- m.Reset()
- his.WithLabelValues("bar").(Histogram).Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'bar' histogram, got %d", want, got)
- }
-
- timedFunc()
- m.Reset()
- his.WithLabelValues("foo").(Histogram).Write(m)
- if want, got := uint64(1), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'foo' histogram, got %d", want, got)
- }
- m.Reset()
- his.WithLabelValues("bar").(Histogram).Write(m)
- if want, got := uint64(2), m.GetHistogram().GetSampleCount(); want != got {
- t.Errorf("want %d observations for 'bar' histogram, got %d", want, got)
- }
-
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go
index 0f9ce63f4..5faf7e6e3 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go
@@ -13,12 +13,108 @@
package prometheus
+// Untyped is a Metric that represents a single numerical value that can
+// arbitrarily go up and down.
+//
+// An Untyped metric works the same as a Gauge. The only difference is that to
+// no type information is implied.
+//
+// To create Untyped instances, use NewUntyped.
+type Untyped interface {
+ Metric
+ Collector
+
+ // Set sets the Untyped metric to an arbitrary value.
+ Set(float64)
+ // Inc increments the Untyped metric by 1.
+ Inc()
+ // Dec decrements the Untyped metric by 1.
+ Dec()
+ // Add adds the given value to the Untyped metric. (The value can be
+ // negative, resulting in a decrease.)
+ Add(float64)
+ // Sub subtracts the given value from the Untyped metric. (The value can
+ // be negative, resulting in an increase.)
+ Sub(float64)
+}
+
// UntypedOpts is an alias for Opts. See there for doc comments.
type UntypedOpts Opts
-// UntypedFunc works like GaugeFunc but the collected metric is of type
-// "Untyped". UntypedFunc is useful to mirror an external metric of unknown
-// type.
+// NewUntyped creates a new Untyped metric from the provided UntypedOpts.
+func NewUntyped(opts UntypedOpts) Untyped {
+ return newValue(NewDesc(
+ BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
+ opts.Help,
+ nil,
+ opts.ConstLabels,
+ ), UntypedValue, 0)
+}
+
+// UntypedVec is a Collector that bundles a set of Untyped metrics that all
+// share the same Desc, but have different values for their variable
+// labels. This is used if you want to count the same thing partitioned by
+// various dimensions. Create instances with NewUntypedVec.
+type UntypedVec struct {
+ *MetricVec
+}
+
+// NewUntypedVec creates a new UntypedVec based on the provided UntypedOpts and
+// partitioned by the given label names. At least one label name must be
+// provided.
+func NewUntypedVec(opts UntypedOpts, labelNames []string) *UntypedVec {
+ desc := NewDesc(
+ BuildFQName(opts.Namespace, opts.Subsystem, opts.Name),
+ opts.Help,
+ labelNames,
+ opts.ConstLabels,
+ )
+ return &UntypedVec{
+ MetricVec: newMetricVec(desc, func(lvs ...string) Metric {
+ return newValue(desc, UntypedValue, 0, lvs...)
+ }),
+ }
+}
+
+// GetMetricWithLabelValues replaces the method of the same name in
+// MetricVec. The difference is that this method returns an Untyped and not a
+// Metric so that no type conversion is required.
+func (m *UntypedVec) GetMetricWithLabelValues(lvs ...string) (Untyped, error) {
+ metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...)
+ if metric != nil {
+ return metric.(Untyped), err
+ }
+ return nil, err
+}
+
+// GetMetricWith replaces the method of the same name in MetricVec. The
+// difference is that this method returns an Untyped and not a Metric so that no
+// type conversion is required.
+func (m *UntypedVec) GetMetricWith(labels Labels) (Untyped, error) {
+ metric, err := m.MetricVec.GetMetricWith(labels)
+ if metric != nil {
+ return metric.(Untyped), err
+ }
+ return nil, err
+}
+
+// WithLabelValues works as GetMetricWithLabelValues, but panics where
+// GetMetricWithLabelValues would have returned an error. By not returning an
+// error, WithLabelValues allows shortcuts like
+// myVec.WithLabelValues("404", "GET").Add(42)
+func (m *UntypedVec) WithLabelValues(lvs ...string) Untyped {
+ return m.MetricVec.WithLabelValues(lvs...).(Untyped)
+}
+
+// With works as GetMetricWith, but panics where GetMetricWithLabels would have
+// returned an error. By not returning an error, With allows shortcuts like
+// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42)
+func (m *UntypedVec) With(labels Labels) Untyped {
+ return m.MetricVec.With(labels).(Untyped)
+}
+
+// UntypedFunc is an Untyped whose value is determined at collect time by
+// calling a provided function.
//
// To create UntypedFunc instances, use NewUntypedFunc.
type UntypedFunc interface {
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go
index 543b57c27..a944c3775 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/value.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/value.go
@@ -14,8 +14,11 @@
package prometheus
import (
+ "errors"
"fmt"
+ "math"
"sort"
+ "sync/atomic"
dto "github.com/prometheus/client_model/go"
@@ -33,6 +36,77 @@ const (
UntypedValue
)
+var errInconsistentCardinality = errors.New("inconsistent label cardinality")
+
+// value is a generic metric for simple values. It implements Metric, Collector,
+// Counter, Gauge, and Untyped. Its effective type is determined by
+// ValueType. This is a low-level building block used by the library to back the
+// implementations of Counter, Gauge, and Untyped.
+type value struct {
+ // valBits containst the bits of the represented float64 value. It has
+ // to go first in the struct to guarantee alignment for atomic
+ // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG
+ valBits uint64
+
+ selfCollector
+
+ desc *Desc
+ valType ValueType
+ labelPairs []*dto.LabelPair
+}
+
+// newValue returns a newly allocated value with the given Desc, ValueType,
+// sample value and label values. It panics if the number of label
+// values is different from the number of variable labels in Desc.
+func newValue(desc *Desc, valueType ValueType, val float64, labelValues ...string) *value {
+ if len(labelValues) != len(desc.variableLabels) {
+ panic(errInconsistentCardinality)
+ }
+ result := &value{
+ desc: desc,
+ valType: valueType,
+ valBits: math.Float64bits(val),
+ labelPairs: makeLabelPairs(desc, labelValues),
+ }
+ result.init(result)
+ return result
+}
+
+func (v *value) Desc() *Desc {
+ return v.desc
+}
+
+func (v *value) Set(val float64) {
+ atomic.StoreUint64(&v.valBits, math.Float64bits(val))
+}
+
+func (v *value) Inc() {
+ v.Add(1)
+}
+
+func (v *value) Dec() {
+ v.Add(-1)
+}
+
+func (v *value) Add(val float64) {
+ for {
+ oldBits := atomic.LoadUint64(&v.valBits)
+ newBits := math.Float64bits(math.Float64frombits(oldBits) + val)
+ if atomic.CompareAndSwapUint64(&v.valBits, oldBits, newBits) {
+ return
+ }
+ }
+}
+
+func (v *value) Sub(val float64) {
+ v.Add(val * -1)
+}
+
+func (v *value) Write(out *dto.Metric) error {
+ val := math.Float64frombits(atomic.LoadUint64(&v.valBits))
+ return populateMetric(v.valType, val, v.labelPairs, out)
+}
+
// valueFunc is a generic metric for simple values retrieved on collect time
// from a function. It implements Metric and Collector. Its effective type is
// determined by ValueType. This is a low-level building block used by the
@@ -79,8 +153,8 @@ func (v *valueFunc) Write(out *dto.Metric) error {
// the Collect method. NewConstMetric returns an error if the length of
// labelValues is not consistent with the variable labels in Desc.
func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) {
- if err := validateLabelValues(labelValues, len(desc.variableLabels)); err != nil {
- return nil, err
+ if len(desc.variableLabels) != len(labelValues) {
+ return nil, errInconsistentCardinality
}
return &constMetric{
desc: desc,
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value_test.go b/vendor/github.com/prometheus/client_golang/prometheus/value_test.go
deleted file mode 100644
index eed517e7b..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/value_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package prometheus
-
-import (
- "fmt"
- "testing"
-)
-
-func TestNewConstMetricInvalidLabelValues(t *testing.T) {
- testCases := []struct {
- desc string
- labels Labels
- }{
- {
- desc: "non utf8 label value",
- labels: Labels{"a": "\xFF"},
- },
- {
- desc: "not enough label values",
- labels: Labels{},
- },
- {
- desc: "too many label values",
- labels: Labels{"a": "1", "b": "2"},
- },
- }
-
- for _, test := range testCases {
- metricDesc := NewDesc(
- "sample_value",
- "sample value",
- []string{"a"},
- Labels{},
- )
-
- expectPanic(t, func() {
- MustNewConstMetric(metricDesc, CounterValue, 0.3, "\xFF")
- }, fmt.Sprintf("WithLabelValues: expected panic because: %s", test.desc))
-
- if _, err := NewConstMetric(metricDesc, CounterValue, 0.3, "\xFF"); err == nil {
- t.Errorf("NewConstMetric: expected error because: %s", test.desc)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/vendor/github.com/prometheus/client_golang/prometheus/vec.go
index cea158249..7f3eef9a4 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/vec.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/vec.go
@@ -20,253 +20,200 @@ import (
"github.com/prometheus/common/model"
)
-// metricVec is a Collector to bundle metrics of the same name that differ in
-// their label values. metricVec is not used directly (and therefore
-// unexported). It is used as a building block for implementations of vectors of
-// a given metric type, like GaugeVec, CounterVec, SummaryVec, and HistogramVec.
-// It also handles label currying. It uses basicMetricVec internally.
-type metricVec struct {
- *metricMap
-
- curry []curriedLabelValue
-
- // hashAdd and hashAddByte can be replaced for testing collision handling.
- hashAdd func(h uint64, s string) uint64
+// MetricVec is a Collector to bundle metrics of the same name that
+// differ in their label values. MetricVec is usually not used directly but as a
+// building block for implementations of vectors of a given metric
+// type. GaugeVec, CounterVec, SummaryVec, and UntypedVec are examples already
+// provided in this package.
+type MetricVec struct {
+ mtx sync.RWMutex // Protects the children.
+ children map[uint64][]metricWithLabelValues
+ desc *Desc
+
+ newMetric func(labelValues ...string) Metric
+ hashAdd func(h uint64, s string) uint64 // replace hash function for testing collision handling
hashAddByte func(h uint64, b byte) uint64
}
-// newMetricVec returns an initialized metricVec.
-func newMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *metricVec {
- return &metricVec{
- metricMap: &metricMap{
- metrics: map[uint64][]metricWithLabelValues{},
- desc: desc,
- newMetric: newMetric,
- },
+// newMetricVec returns an initialized MetricVec. The concrete value is
+// returned for embedding into another struct.
+func newMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec {
+ return &MetricVec{
+ children: map[uint64][]metricWithLabelValues{},
+ desc: desc,
+ newMetric: newMetric,
hashAdd: hashAdd,
hashAddByte: hashAddByte,
}
}
-// DeleteLabelValues removes the metric where the variable labels are the same
-// as those passed in as labels (same order as the VariableLabels in Desc). It
-// returns true if a metric was deleted.
-//
-// It is not an error if the number of label values is not the same as the
-// number of VariableLabels in Desc. However, such inconsistent label count can
-// never match an actual metric, so the method will always return false in that
-// case.
-//
-// Note that for more than one label value, this method is prone to mistakes
-// caused by an incorrect order of arguments. Consider Delete(Labels) as an
-// alternative to avoid that type of mistake. For higher label numbers, the
-// latter has a much more readable (albeit more verbose) syntax, but it comes
-// with a performance overhead (for creating and processing the Labels map).
-// See also the CounterVec example.
-func (m *metricVec) DeleteLabelValues(lvs ...string) bool {
- h, err := m.hashLabelValues(lvs)
- if err != nil {
- return false
- }
-
- return m.metricMap.deleteByHashWithLabelValues(h, lvs, m.curry)
+// metricWithLabelValues provides the metric and its label values for
+// disambiguation on hash collision.
+type metricWithLabelValues struct {
+ values []string
+ metric Metric
}
-// Delete deletes the metric where the variable labels are the same as those
-// passed in as labels. It returns true if a metric was deleted.
-//
-// It is not an error if the number and names of the Labels are inconsistent
-// with those of the VariableLabels in Desc. However, such inconsistent Labels
-// can never match an actual metric, so the method will always return false in
-// that case.
-//
-// This method is used for the same purpose as DeleteLabelValues(...string). See
-// there for pros and cons of the two methods.
-func (m *metricVec) Delete(labels Labels) bool {
- h, err := m.hashLabels(labels)
- if err != nil {
- return false
- }
-
- return m.metricMap.deleteByHashWithLabels(h, labels, m.curry)
+// Describe implements Collector. The length of the returned slice
+// is always one.
+func (m *MetricVec) Describe(ch chan<- *Desc) {
+ ch <- m.desc
}
-func (m *metricVec) curryWith(labels Labels) (*metricVec, error) {
- var (
- newCurry []curriedLabelValue
- oldCurry = m.curry
- iCurry int
- )
- for i, label := range m.desc.variableLabels {
- val, ok := labels[label]
- if iCurry < len(oldCurry) && oldCurry[iCurry].index == i {
- if ok {
- return nil, fmt.Errorf("label name %q is already curried", label)
- }
- newCurry = append(newCurry, oldCurry[iCurry])
- iCurry++
- } else {
- if !ok {
- continue // Label stays uncurried.
- }
- newCurry = append(newCurry, curriedLabelValue{i, val})
+// Collect implements Collector.
+func (m *MetricVec) Collect(ch chan<- Metric) {
+ m.mtx.RLock()
+ defer m.mtx.RUnlock()
+
+ for _, metrics := range m.children {
+ for _, metric := range metrics {
+ ch <- metric.metric
}
}
- if l := len(oldCurry) + len(labels) - len(newCurry); l > 0 {
- return nil, fmt.Errorf("%d unknown label(s) found during currying", l)
- }
-
- return &metricVec{
- metricMap: m.metricMap,
- curry: newCurry,
- hashAdd: m.hashAdd,
- hashAddByte: m.hashAddByte,
- }, nil
}
-func (m *metricVec) getMetricWithLabelValues(lvs ...string) (Metric, error) {
+// GetMetricWithLabelValues returns the Metric for the given slice of label
+// values (same order as the VariableLabels in Desc). If that combination of
+// label values is accessed for the first time, a new Metric is created.
+//
+// It is possible to call this method without using the returned Metric to only
+// create the new Metric but leave it at its start value (e.g. a Summary or
+// Histogram without any observations). See also the SummaryVec example.
+//
+// Keeping the Metric for later use is possible (and should be considered if
+// performance is critical), but keep in mind that Reset, DeleteLabelValues and
+// Delete can be used to delete the Metric from the MetricVec. In that case, the
+// Metric will still exist, but it will not be exported anymore, even if a
+// Metric with the same label values is created later. See also the CounterVec
+// example.
+//
+// An error is returned if the number of label values is not the same as the
+// number of VariableLabels in Desc.
+//
+// Note that for more than one label value, this method is prone to mistakes
+// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as
+// an alternative to avoid that type of mistake. For higher label numbers, the
+// latter has a much more readable (albeit more verbose) syntax, but it comes
+// with a performance overhead (for creating and processing the Labels map).
+// See also the GaugeVec example.
+func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) {
h, err := m.hashLabelValues(lvs)
if err != nil {
return nil, err
}
- return m.metricMap.getOrCreateMetricWithLabelValues(h, lvs, m.curry), nil
+ return m.getOrCreateMetricWithLabelValues(h, lvs), nil
}
-func (m *metricVec) getMetricWith(labels Labels) (Metric, error) {
+// GetMetricWith returns the Metric for the given Labels map (the label names
+// must match those of the VariableLabels in Desc). If that label map is
+// accessed for the first time, a new Metric is created. Implications of
+// creating a Metric without using it and keeping the Metric for later use are
+// the same as for GetMetricWithLabelValues.
+//
+// An error is returned if the number and names of the Labels are inconsistent
+// with those of the VariableLabels in Desc.
+//
+// This method is used for the same purpose as
+// GetMetricWithLabelValues(...string). See there for pros and cons of the two
+// methods.
+func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) {
h, err := m.hashLabels(labels)
if err != nil {
return nil, err
}
- return m.metricMap.getOrCreateMetricWithLabels(h, labels, m.curry), nil
+ return m.getOrCreateMetricWithLabels(h, labels), nil
}
-func (m *metricVec) hashLabelValues(vals []string) (uint64, error) {
- if err := validateLabelValues(vals, len(m.desc.variableLabels)-len(m.curry)); err != nil {
- return 0, err
- }
-
- var (
- h = hashNew()
- curry = m.curry
- iVals, iCurry int
- )
- for i := 0; i < len(m.desc.variableLabels); i++ {
- if iCurry < len(curry) && curry[iCurry].index == i {
- h = m.hashAdd(h, curry[iCurry].value)
- iCurry++
- } else {
- h = m.hashAdd(h, vals[iVals])
- iVals++
- }
- h = m.hashAddByte(h, model.SeparatorByte)
+// WithLabelValues works as GetMetricWithLabelValues, but panics if an error
+// occurs. The method allows neat syntax like:
+// httpReqs.WithLabelValues("404", "POST").Inc()
+func (m *MetricVec) WithLabelValues(lvs ...string) Metric {
+ metric, err := m.GetMetricWithLabelValues(lvs...)
+ if err != nil {
+ panic(err)
}
- return h, nil
+ return metric
}
-func (m *metricVec) hashLabels(labels Labels) (uint64, error) {
- if err := validateValuesInLabels(labels, len(m.desc.variableLabels)-len(m.curry)); err != nil {
- return 0, err
- }
-
- var (
- h = hashNew()
- curry = m.curry
- iCurry int
- )
- for i, label := range m.desc.variableLabels {
- val, ok := labels[label]
- if iCurry < len(curry) && curry[iCurry].index == i {
- if ok {
- return 0, fmt.Errorf("label name %q is already curried", label)
- }
- h = m.hashAdd(h, curry[iCurry].value)
- iCurry++
- } else {
- if !ok {
- return 0, fmt.Errorf("label name %q missing in label map", label)
- }
- h = m.hashAdd(h, val)
- }
- h = m.hashAddByte(h, model.SeparatorByte)
+// With works as GetMetricWith, but panics if an error occurs. The method allows
+// neat syntax like:
+// httpReqs.With(Labels{"status":"404", "method":"POST"}).Inc()
+func (m *MetricVec) With(labels Labels) Metric {
+ metric, err := m.GetMetricWith(labels)
+ if err != nil {
+ panic(err)
}
- return h, nil
-}
-
-// metricWithLabelValues provides the metric and its label values for
-// disambiguation on hash collision.
-type metricWithLabelValues struct {
- values []string
- metric Metric
-}
-
-// curriedLabelValue sets the curried value for a label at the given index.
-type curriedLabelValue struct {
- index int
- value string
-}
-
-// metricMap is a helper for metricVec and shared between differently curried
-// metricVecs.
-type metricMap struct {
- mtx sync.RWMutex // Protects metrics.
- metrics map[uint64][]metricWithLabelValues
- desc *Desc
- newMetric func(labelValues ...string) Metric
-}
-
-// Describe implements Collector. It will send exactly one Desc to the provided
-// channel.
-func (m *metricMap) Describe(ch chan<- *Desc) {
- ch <- m.desc
+ return metric
}
-// Collect implements Collector.
-func (m *metricMap) Collect(ch chan<- Metric) {
- m.mtx.RLock()
- defer m.mtx.RUnlock()
+// DeleteLabelValues removes the metric where the variable labels are the same
+// as those passed in as labels (same order as the VariableLabels in Desc). It
+// returns true if a metric was deleted.
+//
+// It is not an error if the number of label values is not the same as the
+// number of VariableLabels in Desc. However, such inconsistent label count can
+// never match an actual Metric, so the method will always return false in that
+// case.
+//
+// Note that for more than one label value, this method is prone to mistakes
+// caused by an incorrect order of arguments. Consider Delete(Labels) as an
+// alternative to avoid that type of mistake. For higher label numbers, the
+// latter has a much more readable (albeit more verbose) syntax, but it comes
+// with a performance overhead (for creating and processing the Labels map).
+// See also the CounterVec example.
+func (m *MetricVec) DeleteLabelValues(lvs ...string) bool {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
- for _, metrics := range m.metrics {
- for _, metric := range metrics {
- ch <- metric.metric
- }
+ h, err := m.hashLabelValues(lvs)
+ if err != nil {
+ return false
}
+ return m.deleteByHashWithLabelValues(h, lvs)
}
-// Reset deletes all metrics in this vector.
-func (m *metricMap) Reset() {
+// Delete deletes the metric where the variable labels are the same as those
+// passed in as labels. It returns true if a metric was deleted.
+//
+// It is not an error if the number and names of the Labels are inconsistent
+// with those of the VariableLabels in the Desc of the MetricVec. However, such
+// inconsistent Labels can never match an actual Metric, so the method will
+// always return false in that case.
+//
+// This method is used for the same purpose as DeleteLabelValues(...string). See
+// there for pros and cons of the two methods.
+func (m *MetricVec) Delete(labels Labels) bool {
m.mtx.Lock()
defer m.mtx.Unlock()
- for h := range m.metrics {
- delete(m.metrics, h)
+ h, err := m.hashLabels(labels)
+ if err != nil {
+ return false
}
+
+ return m.deleteByHashWithLabels(h, labels)
}
// deleteByHashWithLabelValues removes the metric from the hash bucket h. If
// there are multiple matches in the bucket, use lvs to select a metric and
// remove only that metric.
-func (m *metricMap) deleteByHashWithLabelValues(
- h uint64, lvs []string, curry []curriedLabelValue,
-) bool {
- m.mtx.Lock()
- defer m.mtx.Unlock()
-
- metrics, ok := m.metrics[h]
+func (m *MetricVec) deleteByHashWithLabelValues(h uint64, lvs []string) bool {
+ metrics, ok := m.children[h]
if !ok {
return false
}
- i := findMetricWithLabelValues(metrics, lvs, curry)
+ i := m.findMetricWithLabelValues(metrics, lvs)
if i >= len(metrics) {
return false
}
if len(metrics) > 1 {
- m.metrics[h] = append(metrics[:i], metrics[i+1:]...)
+ m.children[h] = append(metrics[:i], metrics[i+1:]...)
} else {
- delete(m.metrics, h)
+ delete(m.children, h)
}
return true
}
@@ -274,35 +221,69 @@ func (m *metricMap) deleteByHashWithLabelValues(
// deleteByHashWithLabels removes the metric from the hash bucket h. If there
// are multiple matches in the bucket, use lvs to select a metric and remove
// only that metric.
-func (m *metricMap) deleteByHashWithLabels(
- h uint64, labels Labels, curry []curriedLabelValue,
-) bool {
- metrics, ok := m.metrics[h]
+func (m *MetricVec) deleteByHashWithLabels(h uint64, labels Labels) bool {
+ metrics, ok := m.children[h]
if !ok {
return false
}
- i := findMetricWithLabels(m.desc, metrics, labels, curry)
+ i := m.findMetricWithLabels(metrics, labels)
if i >= len(metrics) {
return false
}
if len(metrics) > 1 {
- m.metrics[h] = append(metrics[:i], metrics[i+1:]...)
+ m.children[h] = append(metrics[:i], metrics[i+1:]...)
} else {
- delete(m.metrics, h)
+ delete(m.children, h)
}
return true
}
+// Reset deletes all metrics in this vector.
+func (m *MetricVec) Reset() {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ for h := range m.children {
+ delete(m.children, h)
+ }
+}
+
+func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) {
+ if len(vals) != len(m.desc.variableLabels) {
+ return 0, errInconsistentCardinality
+ }
+ h := hashNew()
+ for _, val := range vals {
+ h = m.hashAdd(h, val)
+ h = m.hashAddByte(h, model.SeparatorByte)
+ }
+ return h, nil
+}
+
+func (m *MetricVec) hashLabels(labels Labels) (uint64, error) {
+ if len(labels) != len(m.desc.variableLabels) {
+ return 0, errInconsistentCardinality
+ }
+ h := hashNew()
+ for _, label := range m.desc.variableLabels {
+ val, ok := labels[label]
+ if !ok {
+ return 0, fmt.Errorf("label name %q missing in label map", label)
+ }
+ h = m.hashAdd(h, val)
+ h = m.hashAddByte(h, model.SeparatorByte)
+ }
+ return h, nil
+}
+
// getOrCreateMetricWithLabelValues retrieves the metric by hash and label value
// or creates it and returns the new one.
//
// This function holds the mutex.
-func (m *metricMap) getOrCreateMetricWithLabelValues(
- hash uint64, lvs []string, curry []curriedLabelValue,
-) Metric {
+func (m *MetricVec) getOrCreateMetricWithLabelValues(hash uint64, lvs []string) Metric {
m.mtx.RLock()
- metric, ok := m.getMetricWithHashAndLabelValues(hash, lvs, curry)
+ metric, ok := m.getMetricWithLabelValues(hash, lvs)
m.mtx.RUnlock()
if ok {
return metric
@@ -310,11 +291,13 @@ func (m *metricMap) getOrCreateMetricWithLabelValues(
m.mtx.Lock()
defer m.mtx.Unlock()
- metric, ok = m.getMetricWithHashAndLabelValues(hash, lvs, curry)
+ metric, ok = m.getMetricWithLabelValues(hash, lvs)
if !ok {
- inlinedLVs := inlineLabelValues(lvs, curry)
- metric = m.newMetric(inlinedLVs...)
- m.metrics[hash] = append(m.metrics[hash], metricWithLabelValues{values: inlinedLVs, metric: metric})
+ // Copy to avoid allocation in case wo don't go down this code path.
+ copiedLVs := make([]string, len(lvs))
+ copy(copiedLVs, lvs)
+ metric = m.newMetric(copiedLVs...)
+ m.children[hash] = append(m.children[hash], metricWithLabelValues{values: copiedLVs, metric: metric})
}
return metric
}
@@ -323,11 +306,9 @@ func (m *metricMap) getOrCreateMetricWithLabelValues(
// or creates it and returns the new one.
//
// This function holds the mutex.
-func (m *metricMap) getOrCreateMetricWithLabels(
- hash uint64, labels Labels, curry []curriedLabelValue,
-) Metric {
+func (m *MetricVec) getOrCreateMetricWithLabels(hash uint64, labels Labels) Metric {
m.mtx.RLock()
- metric, ok := m.getMetricWithHashAndLabels(hash, labels, curry)
+ metric, ok := m.getMetricWithLabels(hash, labels)
m.mtx.RUnlock()
if ok {
return metric
@@ -335,37 +316,33 @@ func (m *metricMap) getOrCreateMetricWithLabels(
m.mtx.Lock()
defer m.mtx.Unlock()
- metric, ok = m.getMetricWithHashAndLabels(hash, labels, curry)
+ metric, ok = m.getMetricWithLabels(hash, labels)
if !ok {
- lvs := extractLabelValues(m.desc, labels, curry)
+ lvs := m.extractLabelValues(labels)
metric = m.newMetric(lvs...)
- m.metrics[hash] = append(m.metrics[hash], metricWithLabelValues{values: lvs, metric: metric})
+ m.children[hash] = append(m.children[hash], metricWithLabelValues{values: lvs, metric: metric})
}
return metric
}
-// getMetricWithHashAndLabelValues gets a metric while handling possible
-// collisions in the hash space. Must be called while holding the read mutex.
-func (m *metricMap) getMetricWithHashAndLabelValues(
- h uint64, lvs []string, curry []curriedLabelValue,
-) (Metric, bool) {
- metrics, ok := m.metrics[h]
+// getMetricWithLabelValues gets a metric while handling possible collisions in
+// the hash space. Must be called while holding read mutex.
+func (m *MetricVec) getMetricWithLabelValues(h uint64, lvs []string) (Metric, bool) {
+ metrics, ok := m.children[h]
if ok {
- if i := findMetricWithLabelValues(metrics, lvs, curry); i < len(metrics) {
+ if i := m.findMetricWithLabelValues(metrics, lvs); i < len(metrics) {
return metrics[i].metric, true
}
}
return nil, false
}
-// getMetricWithHashAndLabels gets a metric while handling possible collisions in
+// getMetricWithLabels gets a metric while handling possible collisions in
// the hash space. Must be called while holding read mutex.
-func (m *metricMap) getMetricWithHashAndLabels(
- h uint64, labels Labels, curry []curriedLabelValue,
-) (Metric, bool) {
- metrics, ok := m.metrics[h]
+func (m *MetricVec) getMetricWithLabels(h uint64, labels Labels) (Metric, bool) {
+ metrics, ok := m.children[h]
if ok {
- if i := findMetricWithLabels(m.desc, metrics, labels, curry); i < len(metrics) {
+ if i := m.findMetricWithLabels(metrics, labels); i < len(metrics) {
return metrics[i].metric, true
}
}
@@ -374,11 +351,9 @@ func (m *metricMap) getMetricWithHashAndLabels(
// findMetricWithLabelValues returns the index of the matching metric or
// len(metrics) if not found.
-func findMetricWithLabelValues(
- metrics []metricWithLabelValues, lvs []string, curry []curriedLabelValue,
-) int {
+func (m *MetricVec) findMetricWithLabelValues(metrics []metricWithLabelValues, lvs []string) int {
for i, metric := range metrics {
- if matchLabelValues(metric.values, lvs, curry) {
+ if m.matchLabelValues(metric.values, lvs) {
return i
}
}
@@ -387,51 +362,32 @@ func findMetricWithLabelValues(
// findMetricWithLabels returns the index of the matching metric or len(metrics)
// if not found.
-func findMetricWithLabels(
- desc *Desc, metrics []metricWithLabelValues, labels Labels, curry []curriedLabelValue,
-) int {
+func (m *MetricVec) findMetricWithLabels(metrics []metricWithLabelValues, labels Labels) int {
for i, metric := range metrics {
- if matchLabels(desc, metric.values, labels, curry) {
+ if m.matchLabels(metric.values, labels) {
return i
}
}
return len(metrics)
}
-func matchLabelValues(values []string, lvs []string, curry []curriedLabelValue) bool {
- if len(values) != len(lvs)+len(curry) {
+func (m *MetricVec) matchLabelValues(values []string, lvs []string) bool {
+ if len(values) != len(lvs) {
return false
}
- var iLVs, iCurry int
for i, v := range values {
- if iCurry < len(curry) && curry[iCurry].index == i {
- if v != curry[iCurry].value {
- return false
- }
- iCurry++
- continue
- }
- if v != lvs[iLVs] {
+ if v != lvs[i] {
return false
}
- iLVs++
}
return true
}
-func matchLabels(desc *Desc, values []string, labels Labels, curry []curriedLabelValue) bool {
- if len(values) != len(labels)+len(curry) {
+func (m *MetricVec) matchLabels(values []string, labels Labels) bool {
+ if len(labels) != len(values) {
return false
}
- iCurry := 0
- for i, k := range desc.variableLabels {
- if iCurry < len(curry) && curry[iCurry].index == i {
- if values[i] != curry[iCurry].value {
- return false
- }
- iCurry++
- continue
- }
+ for i, k := range m.desc.variableLabels {
if values[i] != labels[k] {
return false
}
@@ -439,31 +395,10 @@ func matchLabels(desc *Desc, values []string, labels Labels, curry []curriedLabe
return true
}
-func extractLabelValues(desc *Desc, labels Labels, curry []curriedLabelValue) []string {
- labelValues := make([]string, len(labels)+len(curry))
- iCurry := 0
- for i, k := range desc.variableLabels {
- if iCurry < len(curry) && curry[iCurry].index == i {
- labelValues[i] = curry[iCurry].value
- iCurry++
- continue
- }
+func (m *MetricVec) extractLabelValues(labels Labels) []string {
+ labelValues := make([]string, len(labels))
+ for i, k := range m.desc.variableLabels {
labelValues[i] = labels[k]
}
return labelValues
}
-
-func inlineLabelValues(lvs []string, curry []curriedLabelValue) []string {
- labelValues := make([]string, len(lvs)+len(curry))
- var iCurry, iLVs int
- for i := range labelValues {
- if iCurry < len(curry) && curry[iCurry].index == i {
- labelValues[i] = curry[iCurry].value
- iCurry++
- continue
- }
- labelValues[i] = lvs[iLVs]
- iLVs++
- }
- return labelValues
-}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go b/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go
deleted file mode 100644
index bd18a9f4e..000000000
--- a/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go
+++ /dev/null
@@ -1,535 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package prometheus
-
-import (
- "fmt"
- "testing"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func TestDelete(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- testDelete(t, vec)
-}
-
-func TestDeleteWithCollisions(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
- vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
- testDelete(t, vec)
-}
-
-func testDelete(t *testing.T, vec *GaugeVec) {
- if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-
- vec.With(Labels{"l1": "v1", "l2": "v2"}).(Gauge).Set(42)
- if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), true; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-
- vec.With(Labels{"l1": "v1", "l2": "v2"}).(Gauge).Set(42)
- if got, want := vec.Delete(Labels{"l2": "v2", "l1": "v1"}), true; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.Delete(Labels{"l2": "v2", "l1": "v1"}), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-
- vec.With(Labels{"l1": "v1", "l2": "v2"}).(Gauge).Set(42)
- if got, want := vec.Delete(Labels{"l2": "v1", "l1": "v2"}), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.Delete(Labels{"l1": "v1"}), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-}
-
-func TestDeleteLabelValues(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- testDeleteLabelValues(t, vec)
-}
-
-func TestDeleteLabelValuesWithCollisions(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
- vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
- testDeleteLabelValues(t, vec)
-}
-
-func testDeleteLabelValues(t *testing.T, vec *GaugeVec) {
- if got, want := vec.DeleteLabelValues("v1", "v2"), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-
- vec.With(Labels{"l1": "v1", "l2": "v2"}).(Gauge).Set(42)
- vec.With(Labels{"l1": "v1", "l2": "v3"}).(Gauge).Set(42) // Add junk data for collision.
- if got, want := vec.DeleteLabelValues("v1", "v2"), true; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.DeleteLabelValues("v1", "v2"), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.DeleteLabelValues("v1", "v3"), true; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-
- vec.With(Labels{"l1": "v1", "l2": "v2"}).(Gauge).Set(42)
- // Delete out of order.
- if got, want := vec.DeleteLabelValues("v2", "v1"), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
- if got, want := vec.DeleteLabelValues("v1"), false; got != want {
- t.Errorf("got %v, want %v", got, want)
- }
-}
-
-func TestMetricVec(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- testMetricVec(t, vec)
-}
-
-func TestMetricVecWithCollisions(t *testing.T) {
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"l1", "l2"},
- )
- vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
- vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
- testMetricVec(t, vec)
-}
-
-func testMetricVec(t *testing.T, vec *GaugeVec) {
- vec.Reset() // Actually test Reset now!
-
- var pair [2]string
- // Keep track of metrics.
- expected := map[[2]string]int{}
-
- for i := 0; i < 1000; i++ {
- pair[0], pair[1] = fmt.Sprint(i%4), fmt.Sprint(i%5) // Varying combinations multiples.
- expected[pair]++
- vec.WithLabelValues(pair[0], pair[1]).Inc()
-
- expected[[2]string{"v1", "v2"}]++
- vec.WithLabelValues("v1", "v2").(Gauge).Inc()
- }
-
- var total int
- for _, metrics := range vec.metricMap.metrics {
- for _, metric := range metrics {
- total++
- copy(pair[:], metric.values)
-
- var metricOut dto.Metric
- if err := metric.metric.Write(&metricOut); err != nil {
- t.Fatal(err)
- }
- actual := *metricOut.Gauge.Value
-
- var actualPair [2]string
- for i, label := range metricOut.Label {
- actualPair[i] = *label.Value
- }
-
- // Test output pair against metric.values to ensure we've selected
- // the right one. We check this to ensure the below check means
- // anything at all.
- if actualPair != pair {
- t.Fatalf("unexpected pair association in metric map: %v != %v", actualPair, pair)
- }
-
- if actual != float64(expected[pair]) {
- t.Fatalf("incorrect counter value for %v: %v != %v", pair, actual, expected[pair])
- }
- }
- }
-
- if total != len(expected) {
- t.Fatalf("unexpected number of metrics: %v != %v", total, len(expected))
- }
-
- vec.Reset()
-
- if len(vec.metricMap.metrics) > 0 {
- t.Fatalf("reset failed")
- }
-}
-
-func TestCounterVecEndToEndWithCollision(t *testing.T) {
- vec := NewCounterVec(
- CounterOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"labelname"},
- )
- vec.WithLabelValues("77kepQFQ8Kl").Inc()
- vec.WithLabelValues("!0IC=VloaY").Add(2)
-
- m := &dto.Metric{}
- if err := vec.WithLabelValues("77kepQFQ8Kl").Write(m); err != nil {
- t.Fatal(err)
- }
- if got, want := m.GetLabel()[0].GetValue(), "77kepQFQ8Kl"; got != want {
- t.Errorf("got label value %q, want %q", got, want)
- }
- if got, want := m.GetCounter().GetValue(), 1.; got != want {
- t.Errorf("got value %f, want %f", got, want)
- }
- m.Reset()
- if err := vec.WithLabelValues("!0IC=VloaY").Write(m); err != nil {
- t.Fatal(err)
- }
- if got, want := m.GetLabel()[0].GetValue(), "!0IC=VloaY"; got != want {
- t.Errorf("got label value %q, want %q", got, want)
- }
- if got, want := m.GetCounter().GetValue(), 2.; got != want {
- t.Errorf("got value %f, want %f", got, want)
- }
-}
-
-func TestCurryVec(t *testing.T) {
- vec := NewCounterVec(
- CounterOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"one", "two", "three"},
- )
- testCurryVec(t, vec)
-}
-
-func TestCurryVecWithCollisions(t *testing.T) {
- vec := NewCounterVec(
- CounterOpts{
- Name: "test",
- Help: "helpless",
- },
- []string{"one", "two", "three"},
- )
- vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
- vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
- testCurryVec(t, vec)
-}
-
-func testCurryVec(t *testing.T, vec *CounterVec) {
-
- assertMetrics := func(t *testing.T) {
- n := 0
- for _, m := range vec.metricMap.metrics {
- n += len(m)
- }
- if n != 2 {
- t.Error("expected two metrics, got", n)
- }
- m := &dto.Metric{}
- c1, err := vec.GetMetricWithLabelValues("1", "2", "3")
- if err != nil {
- t.Fatal("unexpected error getting metric:", err)
- }
- c1.Write(m)
- if want, got := 1., m.GetCounter().GetValue(); want != got {
- t.Errorf("want %f as counter value, got %f", want, got)
- }
- m.Reset()
- c2, err := vec.GetMetricWithLabelValues("11", "22", "33")
- if err != nil {
- t.Fatal("unexpected error getting metric:", err)
- }
- c2.Write(m)
- if want, got := 1., m.GetCounter().GetValue(); want != got {
- t.Errorf("want %f as counter value, got %f", want, got)
- }
- }
-
- assertNoMetric := func(t *testing.T) {
- if n := len(vec.metricMap.metrics); n != 0 {
- t.Error("expected no metrics, got", n)
- }
- }
-
- t.Run("zero labels", func(t *testing.T) {
- c1 := vec.MustCurryWith(nil)
- c2 := vec.MustCurryWith(nil)
- c1.WithLabelValues("1", "2", "3").Inc()
- c2.With(Labels{"one": "11", "two": "22", "three": "33"}).Inc()
- assertMetrics(t)
- if !c1.Delete(Labels{"one": "1", "two": "2", "three": "3"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("11", "22", "33") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("first label", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"one": "1"})
- c2 := vec.MustCurryWith(Labels{"one": "11"})
- c1.WithLabelValues("2", "3").Inc()
- c2.With(Labels{"two": "22", "three": "33"}).Inc()
- assertMetrics(t)
- if c1.Delete(Labels{"two": "22", "three": "33"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if c2.DeleteLabelValues("2", "3") {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"two": "2", "three": "3"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("22", "33") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("middle label", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"two": "2"})
- c2 := vec.MustCurryWith(Labels{"two": "22"})
- c1.WithLabelValues("1", "3").Inc()
- c2.With(Labels{"one": "11", "three": "33"}).Inc()
- assertMetrics(t)
- if c1.Delete(Labels{"one": "11", "three": "33"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if c2.DeleteLabelValues("1", "3") {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"one": "1", "three": "3"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("11", "33") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("last label", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"three": "3"})
- c2 := vec.MustCurryWith(Labels{"three": "33"})
- c1.WithLabelValues("1", "2").Inc()
- c2.With(Labels{"one": "11", "two": "22"}).Inc()
- assertMetrics(t)
- if c1.Delete(Labels{"two": "22", "one": "11"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if c2.DeleteLabelValues("1", "2") {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"two": "2", "one": "1"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("11", "22") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("two labels", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"three": "3", "one": "1"})
- c2 := vec.MustCurryWith(Labels{"three": "33", "one": "11"})
- c1.WithLabelValues("2").Inc()
- c2.With(Labels{"two": "22"}).Inc()
- assertMetrics(t)
- if c1.Delete(Labels{"two": "22"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if c2.DeleteLabelValues("2") {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"two": "2"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("22") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("all labels", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"three": "3", "two": "2", "one": "1"})
- c2 := vec.MustCurryWith(Labels{"three": "33", "one": "11", "two": "22"})
- c1.WithLabelValues().Inc()
- c2.With(nil).Inc()
- assertMetrics(t)
- if !c1.Delete(Labels{}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues() {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("double curry", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"three": "3"}).MustCurryWith(Labels{"one": "1"})
- c2 := vec.MustCurryWith(Labels{"three": "33"}).MustCurryWith(Labels{"one": "11"})
- c1.WithLabelValues("2").Inc()
- c2.With(Labels{"two": "22"}).Inc()
- assertMetrics(t)
- if c1.Delete(Labels{"two": "22"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if c2.DeleteLabelValues("2") {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"two": "2"}) {
- t.Error("deletion failed")
- }
- if !c2.DeleteLabelValues("22") {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("use already curried label", func(t *testing.T) {
- c1 := vec.MustCurryWith(Labels{"three": "3"})
- if _, err := c1.GetMetricWithLabelValues("1", "2", "3"); err == nil {
- t.Error("expected error when using already curried label")
- }
- if _, err := c1.GetMetricWith(Labels{"one": "1", "two": "2", "three": "3"}); err == nil {
- t.Error("expected error when using already curried label")
- }
- assertNoMetric(t)
- c1.WithLabelValues("1", "2").Inc()
- if c1.Delete(Labels{"one": "1", "two": "2", "three": "3"}) {
- t.Error("deletion unexpectedly succeeded")
- }
- if !c1.Delete(Labels{"one": "1", "two": "2"}) {
- t.Error("deletion failed")
- }
- assertNoMetric(t)
- })
- t.Run("curry already curried label", func(t *testing.T) {
- if _, err := vec.MustCurryWith(Labels{"three": "3"}).CurryWith(Labels{"three": "33"}); err == nil {
- t.Error("currying unexpectedly succeeded")
- } else if err.Error() != `label name "three" is already curried` {
- t.Error("currying returned unexpected error:", err)
- }
-
- })
- t.Run("unknown label", func(t *testing.T) {
- if _, err := vec.CurryWith(Labels{"foo": "bar"}); err == nil {
- t.Error("currying unexpectedly succeeded")
- } else if err.Error() != "1 unknown label(s) found during currying" {
- t.Error("currying returned unexpected error:", err)
- }
- })
-}
-
-func BenchmarkMetricVecWithLabelValuesBasic(b *testing.B) {
- benchmarkMetricVecWithLabelValues(b, map[string][]string{
- "l1": {"onevalue"},
- "l2": {"twovalue"},
- })
-}
-
-func BenchmarkMetricVecWithLabelValues2Keys10ValueCardinality(b *testing.B) {
- benchmarkMetricVecWithLabelValuesCardinality(b, 2, 10)
-}
-
-func BenchmarkMetricVecWithLabelValues4Keys10ValueCardinality(b *testing.B) {
- benchmarkMetricVecWithLabelValuesCardinality(b, 4, 10)
-}
-
-func BenchmarkMetricVecWithLabelValues2Keys100ValueCardinality(b *testing.B) {
- benchmarkMetricVecWithLabelValuesCardinality(b, 2, 100)
-}
-
-func BenchmarkMetricVecWithLabelValues10Keys100ValueCardinality(b *testing.B) {
- benchmarkMetricVecWithLabelValuesCardinality(b, 10, 100)
-}
-
-func BenchmarkMetricVecWithLabelValues10Keys1000ValueCardinality(b *testing.B) {
- benchmarkMetricVecWithLabelValuesCardinality(b, 10, 1000)
-}
-
-func benchmarkMetricVecWithLabelValuesCardinality(b *testing.B, nkeys, nvalues int) {
- labels := map[string][]string{}
-
- for i := 0; i < nkeys; i++ {
- var (
- k = fmt.Sprintf("key-%v", i)
- vs = make([]string, 0, nvalues)
- )
- for j := 0; j < nvalues; j++ {
- vs = append(vs, fmt.Sprintf("value-%v", j))
- }
- labels[k] = vs
- }
-
- benchmarkMetricVecWithLabelValues(b, labels)
-}
-
-func benchmarkMetricVecWithLabelValues(b *testing.B, labels map[string][]string) {
- var keys []string
- for k := range labels { // Map order dependent, who cares though.
- keys = append(keys, k)
- }
-
- values := make([]string, len(labels)) // Value cache for permutations.
- vec := NewGaugeVec(
- GaugeOpts{
- Name: "test",
- Help: "helpless",
- },
- keys,
- )
-
- b.ReportAllocs()
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- // Varies input across provide map entries based on key size.
- for j, k := range keys {
- candidates := labels[k]
- values[j] = candidates[i%len(candidates)]
- }
-
- vec.WithLabelValues(values...)
- }
-}
diff --git a/vendor/github.com/prometheus/client_model/.gitignore b/vendor/github.com/prometheus/client_model/.gitignore
deleted file mode 100644
index 2f7896d1d..000000000
--- a/vendor/github.com/prometheus/client_model/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-target/
diff --git a/vendor/github.com/prometheus/client_model/CONTRIBUTING.md b/vendor/github.com/prometheus/client_model/CONTRIBUTING.md
deleted file mode 100644
index 40503edbf..000000000
--- a/vendor/github.com/prometheus/client_model/CONTRIBUTING.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Contributing
-
-Prometheus uses GitHub to manage reviews of pull requests.
-
-* If you have a trivial fix or improvement, go ahead and create a pull request,
- addressing (with `@...`) the maintainer of this repository (see
- [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.
-
-* If you plan to do something more involved, first discuss your ideas
- on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).
- This will avoid unnecessary work and surely give you and us a good deal
- of inspiration.
-
-* Relevant coding style guidelines are the [Go Code Review
- Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments)
- and the _Formatting and style_ section of Peter Bourgon's [Go: Best
- Practices for Production
- Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
diff --git a/vendor/github.com/prometheus/client_model/MAINTAINERS.md b/vendor/github.com/prometheus/client_model/MAINTAINERS.md
deleted file mode 100644
index 3ede55fe1..000000000
--- a/vendor/github.com/prometheus/client_model/MAINTAINERS.md
+++ /dev/null
@@ -1 +0,0 @@
-* Björn Rabenstein <beorn@soundcloud.com>
diff --git a/vendor/github.com/prometheus/client_model/Makefile b/vendor/github.com/prometheus/client_model/Makefile
deleted file mode 100644
index e147c69da..000000000
--- a/vendor/github.com/prometheus/client_model/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2013 Prometheus Team
-# 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.
-
-KEY_ID ?= _DEFINE_ME_
-
-all: cpp go java python ruby
-
-SUFFIXES:
-
-cpp: cpp/metrics.pb.cc cpp/metrics.pb.h
-
-cpp/metrics.pb.cc: metrics.proto
- protoc $< --cpp_out=cpp/
-
-cpp/metrics.pb.h: metrics.proto
- protoc $< --cpp_out=cpp/
-
-go: go/metrics.pb.go
-
-go/metrics.pb.go: metrics.proto
- protoc $< --go_out=go/
-
-java: src/main/java/io/prometheus/client/Metrics.java pom.xml
- mvn clean compile package
-
-src/main/java/io/prometheus/client/Metrics.java: metrics.proto
- protoc $< --java_out=src/main/java
-
-python: python/prometheus/client/model/metrics_pb2.py
-
-python/prometheus/client/model/metrics_pb2.py: metrics.proto
- mkdir -p python/prometheus/client/model
- protoc $< --python_out=python/prometheus/client/model
-
-ruby:
- $(MAKE) -C ruby build
-
-clean:
- -rm -rf cpp/*
- -rm -rf go/*
- -rm -rf java/*
- -rm -rf python/*
- -$(MAKE) -C ruby clean
- -mvn clean
-
-maven-deploy-snapshot: java
- mvn clean deploy -Dgpg.keyname=$(KEY_ID) -DperformRelease=true
-
-maven-deploy-release: java
- mvn clean release:clean release:prepare release:perform -Dgpg.keyname=$(KEY_ID) -DperformRelease=true
-
-.PHONY: all clean cpp go java maven-deploy-snapshot maven-deploy-release python ruby
diff --git a/vendor/github.com/prometheus/client_model/README.md b/vendor/github.com/prometheus/client_model/README.md
deleted file mode 100644
index a710042db..000000000
--- a/vendor/github.com/prometheus/client_model/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Background
-Under most circumstances, manually downloading this repository should never
-be required.
-
-# Prerequisites
-# Base
-* [Google Protocol Buffers](https://developers.google.com/protocol-buffers)
-
-## Java
-* [Apache Maven](http://maven.apache.org)
-* [Prometheus Maven Repository](https://github.com/prometheus/io.prometheus-maven-repository) checked out into ../io.prometheus-maven-repository
-
-## Go
-* [Go](http://golang.org)
-* [goprotobuf](https://code.google.com/p/goprotobuf)
-
-## Ruby
-* [Ruby](https://www.ruby-lang.org)
-* [bundler](https://rubygems.org/gems/bundler)
-
-# Building
- $ make
-
-# Getting Started
- * The Go source code is periodically indexed: [Go Protocol Buffer Model](http://godoc.org/github.com/prometheus/client_model/go).
- * All of the core developers are accessible via the [Prometheus Developers Mailinglist](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).
diff --git a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc
deleted file mode 100644
index 1ff893b83..000000000
--- a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc
+++ /dev/null
@@ -1,3380 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: metrics.proto
-
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
-#include "metrics.pb.h"
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// @@protoc_insertion_point(includes)
-
-namespace io {
-namespace prometheus {
-namespace client {
-
-namespace {
-
-const ::google::protobuf::Descriptor* LabelPair_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- LabelPair_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Gauge_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Gauge_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Counter_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Counter_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Quantile_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Quantile_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Summary_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Summary_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Untyped_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Untyped_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Histogram_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Histogram_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Bucket_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Bucket_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Metric_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Metric_reflection_ = NULL;
-const ::google::protobuf::Descriptor* MetricFamily_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- MetricFamily_reflection_ = NULL;
-const ::google::protobuf::EnumDescriptor* MetricType_descriptor_ = NULL;
-
-} // namespace
-
-
-void protobuf_AssignDesc_metrics_2eproto() {
- protobuf_AddDesc_metrics_2eproto();
- const ::google::protobuf::FileDescriptor* file =
- ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
- "metrics.proto");
- GOOGLE_CHECK(file != NULL);
- LabelPair_descriptor_ = file->message_type(0);
- static const int LabelPair_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, value_),
- };
- LabelPair_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- LabelPair_descriptor_,
- LabelPair::default_instance_,
- LabelPair_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(LabelPair));
- Gauge_descriptor_ = file->message_type(1);
- static const int Gauge_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, value_),
- };
- Gauge_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Gauge_descriptor_,
- Gauge::default_instance_,
- Gauge_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Gauge));
- Counter_descriptor_ = file->message_type(2);
- static const int Counter_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, value_),
- };
- Counter_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Counter_descriptor_,
- Counter::default_instance_,
- Counter_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Counter));
- Quantile_descriptor_ = file->message_type(3);
- static const int Quantile_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, quantile_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, value_),
- };
- Quantile_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Quantile_descriptor_,
- Quantile::default_instance_,
- Quantile_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Quantile));
- Summary_descriptor_ = file->message_type(4);
- static const int Summary_offsets_[3] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_count_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_sum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, quantile_),
- };
- Summary_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Summary_descriptor_,
- Summary::default_instance_,
- Summary_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Summary));
- Untyped_descriptor_ = file->message_type(5);
- static const int Untyped_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, value_),
- };
- Untyped_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Untyped_descriptor_,
- Untyped::default_instance_,
- Untyped_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Untyped));
- Histogram_descriptor_ = file->message_type(6);
- static const int Histogram_offsets_[3] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_count_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_sum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, bucket_),
- };
- Histogram_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Histogram_descriptor_,
- Histogram::default_instance_,
- Histogram_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Histogram));
- Bucket_descriptor_ = file->message_type(7);
- static const int Bucket_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, cumulative_count_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, upper_bound_),
- };
- Bucket_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Bucket_descriptor_,
- Bucket::default_instance_,
- Bucket_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Bucket));
- Metric_descriptor_ = file->message_type(8);
- static const int Metric_offsets_[7] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, label_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, gauge_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, counter_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, summary_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, untyped_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, histogram_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, timestamp_ms_),
- };
- Metric_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Metric_descriptor_,
- Metric::default_instance_,
- Metric_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Metric));
- MetricFamily_descriptor_ = file->message_type(9);
- static const int MetricFamily_offsets_[4] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, help_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, type_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, metric_),
- };
- MetricFamily_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- MetricFamily_descriptor_,
- MetricFamily::default_instance_,
- MetricFamily_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(MetricFamily));
- MetricType_descriptor_ = file->enum_type(0);
-}
-
-namespace {
-
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
-inline void protobuf_AssignDescriptorsOnce() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
- &protobuf_AssignDesc_metrics_2eproto);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- LabelPair_descriptor_, &LabelPair::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Gauge_descriptor_, &Gauge::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Counter_descriptor_, &Counter::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Quantile_descriptor_, &Quantile::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Summary_descriptor_, &Summary::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Untyped_descriptor_, &Untyped::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Histogram_descriptor_, &Histogram::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Bucket_descriptor_, &Bucket::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Metric_descriptor_, &Metric::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- MetricFamily_descriptor_, &MetricFamily::default_instance());
-}
-
-} // namespace
-
-void protobuf_ShutdownFile_metrics_2eproto() {
- delete LabelPair::default_instance_;
- delete LabelPair_reflection_;
- delete Gauge::default_instance_;
- delete Gauge_reflection_;
- delete Counter::default_instance_;
- delete Counter_reflection_;
- delete Quantile::default_instance_;
- delete Quantile_reflection_;
- delete Summary::default_instance_;
- delete Summary_reflection_;
- delete Untyped::default_instance_;
- delete Untyped_reflection_;
- delete Histogram::default_instance_;
- delete Histogram_reflection_;
- delete Bucket::default_instance_;
- delete Bucket_reflection_;
- delete Metric::default_instance_;
- delete Metric_reflection_;
- delete MetricFamily::default_instance_;
- delete MetricFamily_reflection_;
-}
-
-void protobuf_AddDesc_metrics_2eproto() {
- static bool already_here = false;
- if (already_here) return;
- already_here = true;
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- "\n\rmetrics.proto\022\024io.prometheus.client\"(\n"
- "\tLabelPair\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\""
- "\026\n\005Gauge\022\r\n\005value\030\001 \001(\001\"\030\n\007Counter\022\r\n\005va"
- "lue\030\001 \001(\001\"+\n\010Quantile\022\020\n\010quantile\030\001 \001(\001\022"
- "\r\n\005value\030\002 \001(\001\"e\n\007Summary\022\024\n\014sample_coun"
- "t\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\0220\n\010quantile\030"
- "\003 \003(\0132\036.io.prometheus.client.Quantile\"\030\n"
- "\007Untyped\022\r\n\005value\030\001 \001(\001\"c\n\tHistogram\022\024\n\014"
- "sample_count\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\022,"
- "\n\006bucket\030\003 \003(\0132\034.io.prometheus.client.Bu"
- "cket\"7\n\006Bucket\022\030\n\020cumulative_count\030\001 \001(\004"
- "\022\023\n\013upper_bound\030\002 \001(\001\"\276\002\n\006Metric\022.\n\005labe"
- "l\030\001 \003(\0132\037.io.prometheus.client.LabelPair"
- "\022*\n\005gauge\030\002 \001(\0132\033.io.prometheus.client.G"
- "auge\022.\n\007counter\030\003 \001(\0132\035.io.prometheus.cl"
- "ient.Counter\022.\n\007summary\030\004 \001(\0132\035.io.prome"
- "theus.client.Summary\022.\n\007untyped\030\005 \001(\0132\035."
- "io.prometheus.client.Untyped\0222\n\thistogra"
- "m\030\007 \001(\0132\037.io.prometheus.client.Histogram"
- "\022\024\n\014timestamp_ms\030\006 \001(\003\"\210\001\n\014MetricFamily\022"
- "\014\n\004name\030\001 \001(\t\022\014\n\004help\030\002 \001(\t\022.\n\004type\030\003 \001("
- "\0162 .io.prometheus.client.MetricType\022,\n\006m"
- "etric\030\004 \003(\0132\034.io.prometheus.client.Metri"
- "c*M\n\nMetricType\022\013\n\007COUNTER\020\000\022\t\n\005GAUGE\020\001\022"
- "\013\n\007SUMMARY\020\002\022\013\n\007UNTYPED\020\003\022\r\n\tHISTOGRAM\020\004"
- "B\026\n\024io.prometheus.client", 1024);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "metrics.proto", &protobuf_RegisterTypes);
- LabelPair::default_instance_ = new LabelPair();
- Gauge::default_instance_ = new Gauge();
- Counter::default_instance_ = new Counter();
- Quantile::default_instance_ = new Quantile();
- Summary::default_instance_ = new Summary();
- Untyped::default_instance_ = new Untyped();
- Histogram::default_instance_ = new Histogram();
- Bucket::default_instance_ = new Bucket();
- Metric::default_instance_ = new Metric();
- MetricFamily::default_instance_ = new MetricFamily();
- LabelPair::default_instance_->InitAsDefaultInstance();
- Gauge::default_instance_->InitAsDefaultInstance();
- Counter::default_instance_->InitAsDefaultInstance();
- Quantile::default_instance_->InitAsDefaultInstance();
- Summary::default_instance_->InitAsDefaultInstance();
- Untyped::default_instance_->InitAsDefaultInstance();
- Histogram::default_instance_->InitAsDefaultInstance();
- Bucket::default_instance_->InitAsDefaultInstance();
- Metric::default_instance_->InitAsDefaultInstance();
- MetricFamily::default_instance_->InitAsDefaultInstance();
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_metrics_2eproto);
-}
-
-// Force AddDescriptors() to be called at static initialization time.
-struct StaticDescriptorInitializer_metrics_2eproto {
- StaticDescriptorInitializer_metrics_2eproto() {
- protobuf_AddDesc_metrics_2eproto();
- }
-} static_descriptor_initializer_metrics_2eproto_;
-const ::google::protobuf::EnumDescriptor* MetricType_descriptor() {
- protobuf_AssignDescriptorsOnce();
- return MetricType_descriptor_;
-}
-bool MetricType_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- return true;
- default:
- return false;
- }
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int LabelPair::kNameFieldNumber;
-const int LabelPair::kValueFieldNumber;
-#endif // !_MSC_VER
-
-LabelPair::LabelPair()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.LabelPair)
-}
-
-void LabelPair::InitAsDefaultInstance() {
-}
-
-LabelPair::LabelPair(const LabelPair& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.LabelPair)
-}
-
-void LabelPair::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-LabelPair::~LabelPair() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.LabelPair)
- SharedDtor();
-}
-
-void LabelPair::SharedDtor() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete value_;
- }
- if (this != default_instance_) {
- }
-}
-
-void LabelPair::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* LabelPair::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return LabelPair_descriptor_;
-}
-
-const LabelPair& LabelPair::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-LabelPair* LabelPair::default_instance_ = NULL;
-
-LabelPair* LabelPair::New() const {
- return new LabelPair;
-}
-
-void LabelPair::Clear() {
- if (_has_bits_[0 / 32] & 3) {
- if (has_name()) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- }
- if (has_value()) {
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_->clear();
- }
- }
- }
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool LabelPair::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.LabelPair)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string name = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "name");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_value;
- break;
- }
-
- // optional string value = 2;
- case 2: {
- if (tag == 18) {
- parse_value:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_value()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "value");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.LabelPair)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.LabelPair)
- return false;
-#undef DO_
-}
-
-void LabelPair::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.LabelPair)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
-
- // optional string value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.LabelPair)
-}
-
-::google::protobuf::uint8* LabelPair::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.LabelPair)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
-
- // optional string value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.LabelPair)
- return target;
-}
-
-int LabelPair::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional string name = 1;
- if (has_name()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- // optional string value = 2;
- if (has_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void LabelPair::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const LabelPair* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const LabelPair*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void LabelPair::MergeFrom(const LabelPair& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_name()) {
- set_name(from.name());
- }
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void LabelPair::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void LabelPair::CopyFrom(const LabelPair& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool LabelPair::IsInitialized() const {
-
- return true;
-}
-
-void LabelPair::Swap(LabelPair* other) {
- if (other != this) {
- std::swap(name_, other->name_);
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata LabelPair::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = LabelPair_descriptor_;
- metadata.reflection = LabelPair_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Gauge::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Gauge::Gauge()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Gauge)
-}
-
-void Gauge::InitAsDefaultInstance() {
-}
-
-Gauge::Gauge(const Gauge& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Gauge)
-}
-
-void Gauge::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Gauge::~Gauge() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Gauge)
- SharedDtor();
-}
-
-void Gauge::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Gauge::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Gauge::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Gauge_descriptor_;
-}
-
-const Gauge& Gauge::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Gauge* Gauge::default_instance_ = NULL;
-
-Gauge* Gauge::New() const {
- return new Gauge;
-}
-
-void Gauge::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Gauge::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Gauge)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional double value = 1;
- case 1: {
- if (tag == 9) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &value_)));
- set_has_value();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Gauge)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Gauge)
- return false;
-#undef DO_
-}
-
-void Gauge::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Gauge)
- // optional double value = 1;
- if (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Gauge)
-}
-
-::google::protobuf::uint8* Gauge::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Gauge)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Gauge)
- return target;
-}
-
-int Gauge::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Gauge::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Gauge* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Gauge*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Gauge::MergeFrom(const Gauge& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Gauge::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Gauge::CopyFrom(const Gauge& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Gauge::IsInitialized() const {
-
- return true;
-}
-
-void Gauge::Swap(Gauge* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Gauge::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Gauge_descriptor_;
- metadata.reflection = Gauge_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Counter::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Counter::Counter()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Counter)
-}
-
-void Counter::InitAsDefaultInstance() {
-}
-
-Counter::Counter(const Counter& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Counter)
-}
-
-void Counter::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Counter::~Counter() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Counter)
- SharedDtor();
-}
-
-void Counter::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Counter::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Counter::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Counter_descriptor_;
-}
-
-const Counter& Counter::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Counter* Counter::default_instance_ = NULL;
-
-Counter* Counter::New() const {
- return new Counter;
-}
-
-void Counter::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Counter::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Counter)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional double value = 1;
- case 1: {
- if (tag == 9) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &value_)));
- set_has_value();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Counter)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Counter)
- return false;
-#undef DO_
-}
-
-void Counter::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Counter)
- // optional double value = 1;
- if (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Counter)
-}
-
-::google::protobuf::uint8* Counter::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Counter)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Counter)
- return target;
-}
-
-int Counter::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Counter::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Counter* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Counter*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Counter::MergeFrom(const Counter& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Counter::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Counter::CopyFrom(const Counter& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Counter::IsInitialized() const {
-
- return true;
-}
-
-void Counter::Swap(Counter* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Counter::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Counter_descriptor_;
- metadata.reflection = Counter_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Quantile::kQuantileFieldNumber;
-const int Quantile::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Quantile::Quantile()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Quantile)
-}
-
-void Quantile::InitAsDefaultInstance() {
-}
-
-Quantile::Quantile(const Quantile& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Quantile)
-}
-
-void Quantile::SharedCtor() {
- _cached_size_ = 0;
- quantile_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Quantile::~Quantile() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Quantile)
- SharedDtor();
-}
-
-void Quantile::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Quantile::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Quantile::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Quantile_descriptor_;
-}
-
-const Quantile& Quantile::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Quantile* Quantile::default_instance_ = NULL;
-
-Quantile* Quantile::New() const {
- return new Quantile;
-}
-
-void Quantile::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Quantile*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(quantile_, value_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Quantile::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Quantile)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional double quantile = 1;
- case 1: {
- if (tag == 9) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &quantile_)));
- set_has_quantile();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(17)) goto parse_value;
- break;
- }
-
- // optional double value = 2;
- case 2: {
- if (tag == 17) {
- parse_value:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &value_)));
- set_has_value();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Quantile)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Quantile)
- return false;
-#undef DO_
-}
-
-void Quantile::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Quantile)
- // optional double quantile = 1;
- if (has_quantile()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->quantile(), output);
- }
-
- // optional double value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Quantile)
-}
-
-::google::protobuf::uint8* Quantile::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Quantile)
- // optional double quantile = 1;
- if (has_quantile()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->quantile(), target);
- }
-
- // optional double value = 2;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Quantile)
- return target;
-}
-
-int Quantile::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double quantile = 1;
- if (has_quantile()) {
- total_size += 1 + 8;
- }
-
- // optional double value = 2;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Quantile::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Quantile* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Quantile*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Quantile::MergeFrom(const Quantile& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_quantile()) {
- set_quantile(from.quantile());
- }
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Quantile::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Quantile::CopyFrom(const Quantile& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Quantile::IsInitialized() const {
-
- return true;
-}
-
-void Quantile::Swap(Quantile* other) {
- if (other != this) {
- std::swap(quantile_, other->quantile_);
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Quantile::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Quantile_descriptor_;
- metadata.reflection = Quantile_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Summary::kSampleCountFieldNumber;
-const int Summary::kSampleSumFieldNumber;
-const int Summary::kQuantileFieldNumber;
-#endif // !_MSC_VER
-
-Summary::Summary()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Summary)
-}
-
-void Summary::InitAsDefaultInstance() {
-}
-
-Summary::Summary(const Summary& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Summary)
-}
-
-void Summary::SharedCtor() {
- _cached_size_ = 0;
- sample_count_ = GOOGLE_ULONGLONG(0);
- sample_sum_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Summary::~Summary() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Summary)
- SharedDtor();
-}
-
-void Summary::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Summary::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Summary::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Summary_descriptor_;
-}
-
-const Summary& Summary::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Summary* Summary::default_instance_ = NULL;
-
-Summary* Summary::New() const {
- return new Summary;
-}
-
-void Summary::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Summary*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(sample_count_, sample_sum_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- quantile_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Summary::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Summary)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional uint64 sample_count = 1;
- case 1: {
- if (tag == 8) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &sample_count_)));
- set_has_sample_count();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(17)) goto parse_sample_sum;
- break;
- }
-
- // optional double sample_sum = 2;
- case 2: {
- if (tag == 17) {
- parse_sample_sum:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &sample_sum_)));
- set_has_sample_sum();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_quantile;
- break;
- }
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- case 3: {
- if (tag == 26) {
- parse_quantile:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_quantile()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_quantile;
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Summary)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Summary)
- return false;
-#undef DO_
-}
-
-void Summary::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Summary)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
- }
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- for (int i = 0; i < this->quantile_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->quantile(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Summary)
-}
-
-::google::protobuf::uint8* Summary::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Summary)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
- }
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- for (int i = 0; i < this->quantile_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->quantile(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Summary)
- return target;
-}
-
-int Summary::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->sample_count());
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- total_size += 1 + 8;
- }
-
- }
- // repeated .io.prometheus.client.Quantile quantile = 3;
- total_size += 1 * this->quantile_size();
- for (int i = 0; i < this->quantile_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->quantile(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Summary::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Summary* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Summary*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Summary::MergeFrom(const Summary& from) {
- GOOGLE_CHECK_NE(&from, this);
- quantile_.MergeFrom(from.quantile_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_sample_count()) {
- set_sample_count(from.sample_count());
- }
- if (from.has_sample_sum()) {
- set_sample_sum(from.sample_sum());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Summary::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Summary::CopyFrom(const Summary& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Summary::IsInitialized() const {
-
- return true;
-}
-
-void Summary::Swap(Summary* other) {
- if (other != this) {
- std::swap(sample_count_, other->sample_count_);
- std::swap(sample_sum_, other->sample_sum_);
- quantile_.Swap(&other->quantile_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Summary::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Summary_descriptor_;
- metadata.reflection = Summary_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Untyped::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Untyped::Untyped()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Untyped)
-}
-
-void Untyped::InitAsDefaultInstance() {
-}
-
-Untyped::Untyped(const Untyped& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Untyped)
-}
-
-void Untyped::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Untyped::~Untyped() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Untyped)
- SharedDtor();
-}
-
-void Untyped::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Untyped::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Untyped::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Untyped_descriptor_;
-}
-
-const Untyped& Untyped::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Untyped* Untyped::default_instance_ = NULL;
-
-Untyped* Untyped::New() const {
- return new Untyped;
-}
-
-void Untyped::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Untyped::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Untyped)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional double value = 1;
- case 1: {
- if (tag == 9) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &value_)));
- set_has_value();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Untyped)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Untyped)
- return false;
-#undef DO_
-}
-
-void Untyped::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Untyped)
- // optional double value = 1;
- if (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Untyped)
-}
-
-::google::protobuf::uint8* Untyped::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Untyped)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Untyped)
- return target;
-}
-
-int Untyped::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Untyped::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Untyped* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Untyped*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Untyped::MergeFrom(const Untyped& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Untyped::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Untyped::CopyFrom(const Untyped& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Untyped::IsInitialized() const {
-
- return true;
-}
-
-void Untyped::Swap(Untyped* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Untyped::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Untyped_descriptor_;
- metadata.reflection = Untyped_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Histogram::kSampleCountFieldNumber;
-const int Histogram::kSampleSumFieldNumber;
-const int Histogram::kBucketFieldNumber;
-#endif // !_MSC_VER
-
-Histogram::Histogram()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Histogram)
-}
-
-void Histogram::InitAsDefaultInstance() {
-}
-
-Histogram::Histogram(const Histogram& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Histogram)
-}
-
-void Histogram::SharedCtor() {
- _cached_size_ = 0;
- sample_count_ = GOOGLE_ULONGLONG(0);
- sample_sum_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Histogram::~Histogram() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Histogram)
- SharedDtor();
-}
-
-void Histogram::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Histogram::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Histogram::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Histogram_descriptor_;
-}
-
-const Histogram& Histogram::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Histogram* Histogram::default_instance_ = NULL;
-
-Histogram* Histogram::New() const {
- return new Histogram;
-}
-
-void Histogram::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Histogram*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(sample_count_, sample_sum_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- bucket_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Histogram::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Histogram)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional uint64 sample_count = 1;
- case 1: {
- if (tag == 8) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &sample_count_)));
- set_has_sample_count();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(17)) goto parse_sample_sum;
- break;
- }
-
- // optional double sample_sum = 2;
- case 2: {
- if (tag == 17) {
- parse_sample_sum:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &sample_sum_)));
- set_has_sample_sum();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_bucket;
- break;
- }
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- case 3: {
- if (tag == 26) {
- parse_bucket:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_bucket()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_bucket;
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Histogram)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Histogram)
- return false;
-#undef DO_
-}
-
-void Histogram::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Histogram)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
- }
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- for (int i = 0; i < this->bucket_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->bucket(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Histogram)
-}
-
-::google::protobuf::uint8* Histogram::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Histogram)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
- }
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- for (int i = 0; i < this->bucket_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->bucket(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Histogram)
- return target;
-}
-
-int Histogram::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->sample_count());
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- total_size += 1 + 8;
- }
-
- }
- // repeated .io.prometheus.client.Bucket bucket = 3;
- total_size += 1 * this->bucket_size();
- for (int i = 0; i < this->bucket_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->bucket(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Histogram::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Histogram* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Histogram*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Histogram::MergeFrom(const Histogram& from) {
- GOOGLE_CHECK_NE(&from, this);
- bucket_.MergeFrom(from.bucket_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_sample_count()) {
- set_sample_count(from.sample_count());
- }
- if (from.has_sample_sum()) {
- set_sample_sum(from.sample_sum());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Histogram::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Histogram::CopyFrom(const Histogram& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Histogram::IsInitialized() const {
-
- return true;
-}
-
-void Histogram::Swap(Histogram* other) {
- if (other != this) {
- std::swap(sample_count_, other->sample_count_);
- std::swap(sample_sum_, other->sample_sum_);
- bucket_.Swap(&other->bucket_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Histogram::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Histogram_descriptor_;
- metadata.reflection = Histogram_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Bucket::kCumulativeCountFieldNumber;
-const int Bucket::kUpperBoundFieldNumber;
-#endif // !_MSC_VER
-
-Bucket::Bucket()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Bucket)
-}
-
-void Bucket::InitAsDefaultInstance() {
-}
-
-Bucket::Bucket(const Bucket& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Bucket)
-}
-
-void Bucket::SharedCtor() {
- _cached_size_ = 0;
- cumulative_count_ = GOOGLE_ULONGLONG(0);
- upper_bound_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Bucket::~Bucket() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Bucket)
- SharedDtor();
-}
-
-void Bucket::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void Bucket::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Bucket::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Bucket_descriptor_;
-}
-
-const Bucket& Bucket::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Bucket* Bucket::default_instance_ = NULL;
-
-Bucket* Bucket::New() const {
- return new Bucket;
-}
-
-void Bucket::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Bucket*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(cumulative_count_, upper_bound_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Bucket::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Bucket)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional uint64 cumulative_count = 1;
- case 1: {
- if (tag == 8) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &cumulative_count_)));
- set_has_cumulative_count();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(17)) goto parse_upper_bound;
- break;
- }
-
- // optional double upper_bound = 2;
- case 2: {
- if (tag == 17) {
- parse_upper_bound:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &upper_bound_)));
- set_has_upper_bound();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Bucket)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Bucket)
- return false;
-#undef DO_
-}
-
-void Bucket::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Bucket)
- // optional uint64 cumulative_count = 1;
- if (has_cumulative_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->cumulative_count(), output);
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->upper_bound(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Bucket)
-}
-
-::google::protobuf::uint8* Bucket::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Bucket)
- // optional uint64 cumulative_count = 1;
- if (has_cumulative_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->cumulative_count(), target);
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->upper_bound(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Bucket)
- return target;
-}
-
-int Bucket::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 cumulative_count = 1;
- if (has_cumulative_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->cumulative_count());
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Bucket::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Bucket* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Bucket*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Bucket::MergeFrom(const Bucket& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_cumulative_count()) {
- set_cumulative_count(from.cumulative_count());
- }
- if (from.has_upper_bound()) {
- set_upper_bound(from.upper_bound());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Bucket::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Bucket::CopyFrom(const Bucket& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Bucket::IsInitialized() const {
-
- return true;
-}
-
-void Bucket::Swap(Bucket* other) {
- if (other != this) {
- std::swap(cumulative_count_, other->cumulative_count_);
- std::swap(upper_bound_, other->upper_bound_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Bucket::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Bucket_descriptor_;
- metadata.reflection = Bucket_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Metric::kLabelFieldNumber;
-const int Metric::kGaugeFieldNumber;
-const int Metric::kCounterFieldNumber;
-const int Metric::kSummaryFieldNumber;
-const int Metric::kUntypedFieldNumber;
-const int Metric::kHistogramFieldNumber;
-const int Metric::kTimestampMsFieldNumber;
-#endif // !_MSC_VER
-
-Metric::Metric()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Metric)
-}
-
-void Metric::InitAsDefaultInstance() {
- gauge_ = const_cast< ::io::prometheus::client::Gauge*>(&::io::prometheus::client::Gauge::default_instance());
- counter_ = const_cast< ::io::prometheus::client::Counter*>(&::io::prometheus::client::Counter::default_instance());
- summary_ = const_cast< ::io::prometheus::client::Summary*>(&::io::prometheus::client::Summary::default_instance());
- untyped_ = const_cast< ::io::prometheus::client::Untyped*>(&::io::prometheus::client::Untyped::default_instance());
- histogram_ = const_cast< ::io::prometheus::client::Histogram*>(&::io::prometheus::client::Histogram::default_instance());
-}
-
-Metric::Metric(const Metric& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Metric)
-}
-
-void Metric::SharedCtor() {
- _cached_size_ = 0;
- gauge_ = NULL;
- counter_ = NULL;
- summary_ = NULL;
- untyped_ = NULL;
- histogram_ = NULL;
- timestamp_ms_ = GOOGLE_LONGLONG(0);
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Metric::~Metric() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.Metric)
- SharedDtor();
-}
-
-void Metric::SharedDtor() {
- if (this != default_instance_) {
- delete gauge_;
- delete counter_;
- delete summary_;
- delete untyped_;
- delete histogram_;
- }
-}
-
-void Metric::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Metric::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Metric_descriptor_;
-}
-
-const Metric& Metric::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-Metric* Metric::default_instance_ = NULL;
-
-Metric* Metric::New() const {
- return new Metric;
-}
-
-void Metric::Clear() {
- if (_has_bits_[0 / 32] & 126) {
- if (has_gauge()) {
- if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear();
- }
- if (has_counter()) {
- if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear();
- }
- if (has_summary()) {
- if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear();
- }
- if (has_untyped()) {
- if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear();
- }
- if (has_histogram()) {
- if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear();
- }
- timestamp_ms_ = GOOGLE_LONGLONG(0);
- }
- label_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Metric::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.Metric)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated .io.prometheus.client.LabelPair label = 1;
- case 1: {
- if (tag == 10) {
- parse_label:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_label()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(10)) goto parse_label;
- if (input->ExpectTag(18)) goto parse_gauge;
- break;
- }
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- case 2: {
- if (tag == 18) {
- parse_gauge:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_gauge()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_counter;
- break;
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- case 3: {
- if (tag == 26) {
- parse_counter:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_counter()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(34)) goto parse_summary;
- break;
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- case 4: {
- if (tag == 34) {
- parse_summary:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_summary()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(42)) goto parse_untyped;
- break;
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- case 5: {
- if (tag == 42) {
- parse_untyped:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_untyped()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(48)) goto parse_timestamp_ms;
- break;
- }
-
- // optional int64 timestamp_ms = 6;
- case 6: {
- if (tag == 48) {
- parse_timestamp_ms:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &timestamp_ms_)));
- set_has_timestamp_ms();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(58)) goto parse_histogram;
- break;
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- case 7: {
- if (tag == 58) {
- parse_histogram:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_histogram()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.Metric)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.Metric)
- return false;
-#undef DO_
-}
-
-void Metric::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.Metric)
- // repeated .io.prometheus.client.LabelPair label = 1;
- for (int i = 0; i < this->label_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->label(i), output);
- }
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->gauge(), output);
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->counter(), output);
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->summary(), output);
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->untyped(), output);
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->timestamp_ms(), output);
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, this->histogram(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Metric)
-}
-
-::google::protobuf::uint8* Metric::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Metric)
- // repeated .io.prometheus.client.LabelPair label = 1;
- for (int i = 0; i < this->label_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 1, this->label(i), target);
- }
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 2, this->gauge(), target);
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->counter(), target);
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 4, this->summary(), target);
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 5, this->untyped(), target);
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->timestamp_ms(), target);
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 7, this->histogram(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Metric)
- return target;
-}
-
-int Metric::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->gauge());
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->counter());
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->summary());
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->untyped());
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->histogram());
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->timestamp_ms());
- }
-
- }
- // repeated .io.prometheus.client.LabelPair label = 1;
- total_size += 1 * this->label_size();
- for (int i = 0; i < this->label_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->label(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Metric::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Metric* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Metric*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Metric::MergeFrom(const Metric& from) {
- GOOGLE_CHECK_NE(&from, this);
- label_.MergeFrom(from.label_);
- if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- if (from.has_gauge()) {
- mutable_gauge()->::io::prometheus::client::Gauge::MergeFrom(from.gauge());
- }
- if (from.has_counter()) {
- mutable_counter()->::io::prometheus::client::Counter::MergeFrom(from.counter());
- }
- if (from.has_summary()) {
- mutable_summary()->::io::prometheus::client::Summary::MergeFrom(from.summary());
- }
- if (from.has_untyped()) {
- mutable_untyped()->::io::prometheus::client::Untyped::MergeFrom(from.untyped());
- }
- if (from.has_histogram()) {
- mutable_histogram()->::io::prometheus::client::Histogram::MergeFrom(from.histogram());
- }
- if (from.has_timestamp_ms()) {
- set_timestamp_ms(from.timestamp_ms());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Metric::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Metric::CopyFrom(const Metric& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Metric::IsInitialized() const {
-
- return true;
-}
-
-void Metric::Swap(Metric* other) {
- if (other != this) {
- label_.Swap(&other->label_);
- std::swap(gauge_, other->gauge_);
- std::swap(counter_, other->counter_);
- std::swap(summary_, other->summary_);
- std::swap(untyped_, other->untyped_);
- std::swap(histogram_, other->histogram_);
- std::swap(timestamp_ms_, other->timestamp_ms_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Metric::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Metric_descriptor_;
- metadata.reflection = Metric_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int MetricFamily::kNameFieldNumber;
-const int MetricFamily::kHelpFieldNumber;
-const int MetricFamily::kTypeFieldNumber;
-const int MetricFamily::kMetricFieldNumber;
-#endif // !_MSC_VER
-
-MetricFamily::MetricFamily()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.MetricFamily)
-}
-
-void MetricFamily::InitAsDefaultInstance() {
-}
-
-MetricFamily::MetricFamily(const MetricFamily& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.MetricFamily)
-}
-
-void MetricFamily::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- type_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-MetricFamily::~MetricFamily() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.MetricFamily)
- SharedDtor();
-}
-
-void MetricFamily::SharedDtor() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete help_;
- }
- if (this != default_instance_) {
- }
-}
-
-void MetricFamily::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* MetricFamily::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return MetricFamily_descriptor_;
-}
-
-const MetricFamily& MetricFamily::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
- return *default_instance_;
-}
-
-MetricFamily* MetricFamily::default_instance_ = NULL;
-
-MetricFamily* MetricFamily::New() const {
- return new MetricFamily;
-}
-
-void MetricFamily::Clear() {
- if (_has_bits_[0 / 32] & 7) {
- if (has_name()) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- }
- if (has_help()) {
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_->clear();
- }
- }
- type_ = 0;
- }
- metric_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool MetricFamily::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:io.prometheus.client.MetricFamily)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string name = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "name");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_help;
- break;
- }
-
- // optional string help = 2;
- case 2: {
- if (tag == 18) {
- parse_help:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_help()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "help");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(24)) goto parse_type;
- break;
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- case 3: {
- if (tag == 24) {
- parse_type:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::io::prometheus::client::MetricType_IsValid(value)) {
- set_type(static_cast< ::io::prometheus::client::MetricType >(value));
- } else {
- mutable_unknown_fields()->AddVarint(3, value);
- }
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(34)) goto parse_metric;
- break;
- }
-
- // repeated .io.prometheus.client.Metric metric = 4;
- case 4: {
- if (tag == 34) {
- parse_metric:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_metric()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(34)) goto parse_metric;
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:io.prometheus.client.MetricFamily)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:io.prometheus.client.MetricFamily)
- return false;
-#undef DO_
-}
-
-void MetricFamily::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:io.prometheus.client.MetricFamily)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
-
- // optional string help = 2;
- if (has_help()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "help");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->help(), output);
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 3, this->type(), output);
- }
-
- // repeated .io.prometheus.client.Metric metric = 4;
- for (int i = 0; i < this->metric_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->metric(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.MetricFamily)
-}
-
-::google::protobuf::uint8* MetricFamily::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.MetricFamily)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
-
- // optional string help = 2;
- if (has_help()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "help");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->help(), target);
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 3, this->type(), target);
- }
-
- // repeated .io.prometheus.client.Metric metric = 4;
- for (int i = 0; i < this->metric_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 4, this->metric(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.MetricFamily)
- return target;
-}
-
-int MetricFamily::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional string name = 1;
- if (has_name()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- // optional string help = 2;
- if (has_help()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->help());
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
- }
-
- }
- // repeated .io.prometheus.client.Metric metric = 4;
- total_size += 1 * this->metric_size();
- for (int i = 0; i < this->metric_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->metric(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void MetricFamily::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const MetricFamily* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const MetricFamily*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void MetricFamily::MergeFrom(const MetricFamily& from) {
- GOOGLE_CHECK_NE(&from, this);
- metric_.MergeFrom(from.metric_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_name()) {
- set_name(from.name());
- }
- if (from.has_help()) {
- set_help(from.help());
- }
- if (from.has_type()) {
- set_type(from.type());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void MetricFamily::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void MetricFamily::CopyFrom(const MetricFamily& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool MetricFamily::IsInitialized() const {
-
- return true;
-}
-
-void MetricFamily::Swap(MetricFamily* other) {
- if (other != this) {
- std::swap(name_, other->name_);
- std::swap(help_, other->help_);
- std::swap(type_, other->type_);
- metric_.Swap(&other->metric_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata MetricFamily::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = MetricFamily_descriptor_;
- metadata.reflection = MetricFamily_reflection_;
- return metadata;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace client
-} // namespace prometheus
-} // namespace io
-
-// @@protoc_insertion_point(global_scope)
diff --git a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h
deleted file mode 100644
index 206ba3704..000000000
--- a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h
+++ /dev/null
@@ -1,2072 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: metrics.proto
-
-#ifndef PROTOBUF_metrics_2eproto__INCLUDED
-#define PROTOBUF_metrics_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 2006000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-#include <google/protobuf/generated_enum_reflection.h>
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace io {
-namespace prometheus {
-namespace client {
-
-// Internal implementation detail -- do not call these.
-void protobuf_AddDesc_metrics_2eproto();
-void protobuf_AssignDesc_metrics_2eproto();
-void protobuf_ShutdownFile_metrics_2eproto();
-
-class LabelPair;
-class Gauge;
-class Counter;
-class Quantile;
-class Summary;
-class Untyped;
-class Histogram;
-class Bucket;
-class Metric;
-class MetricFamily;
-
-enum MetricType {
- COUNTER = 0,
- GAUGE = 1,
- SUMMARY = 2,
- UNTYPED = 3,
- HISTOGRAM = 4
-};
-bool MetricType_IsValid(int value);
-const MetricType MetricType_MIN = COUNTER;
-const MetricType MetricType_MAX = HISTOGRAM;
-const int MetricType_ARRAYSIZE = MetricType_MAX + 1;
-
-const ::google::protobuf::EnumDescriptor* MetricType_descriptor();
-inline const ::std::string& MetricType_Name(MetricType value) {
- return ::google::protobuf::internal::NameOfEnum(
- MetricType_descriptor(), value);
-}
-inline bool MetricType_Parse(
- const ::std::string& name, MetricType* value) {
- return ::google::protobuf::internal::ParseNamedEnum<MetricType>(
- MetricType_descriptor(), name, value);
-}
-// ===================================================================
-
-class LabelPair : public ::google::protobuf::Message {
- public:
- LabelPair();
- virtual ~LabelPair();
-
- LabelPair(const LabelPair& from);
-
- inline LabelPair& operator=(const LabelPair& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const LabelPair& default_instance();
-
- void Swap(LabelPair* other);
-
- // implements Message ----------------------------------------------
-
- LabelPair* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const LabelPair& from);
- void MergeFrom(const LabelPair& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
- static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
-
- // optional string value = 2;
- inline bool has_value() const;
- inline void clear_value();
- static const int kValueFieldNumber = 2;
- inline const ::std::string& value() const;
- inline void set_value(const ::std::string& value);
- inline void set_value(const char* value);
- inline void set_value(const char* value, size_t size);
- inline ::std::string* mutable_value();
- inline ::std::string* release_value();
- inline void set_allocated_value(::std::string* value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.LabelPair)
- private:
- inline void set_has_name();
- inline void clear_has_name();
- inline void set_has_value();
- inline void clear_has_value();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::std::string* name_;
- ::std::string* value_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static LabelPair* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Gauge : public ::google::protobuf::Message {
- public:
- Gauge();
- virtual ~Gauge();
-
- Gauge(const Gauge& from);
-
- inline Gauge& operator=(const Gauge& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Gauge& default_instance();
-
- void Swap(Gauge* other);
-
- // implements Message ----------------------------------------------
-
- Gauge* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Gauge& from);
- void MergeFrom(const Gauge& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional double value = 1;
- inline bool has_value() const;
- inline void clear_value();
- static const int kValueFieldNumber = 1;
- inline double value() const;
- inline void set_value(double value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Gauge)
- private:
- inline void set_has_value();
- inline void clear_has_value();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- double value_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Gauge* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Counter : public ::google::protobuf::Message {
- public:
- Counter();
- virtual ~Counter();
-
- Counter(const Counter& from);
-
- inline Counter& operator=(const Counter& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Counter& default_instance();
-
- void Swap(Counter* other);
-
- // implements Message ----------------------------------------------
-
- Counter* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Counter& from);
- void MergeFrom(const Counter& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional double value = 1;
- inline bool has_value() const;
- inline void clear_value();
- static const int kValueFieldNumber = 1;
- inline double value() const;
- inline void set_value(double value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Counter)
- private:
- inline void set_has_value();
- inline void clear_has_value();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- double value_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Counter* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Quantile : public ::google::protobuf::Message {
- public:
- Quantile();
- virtual ~Quantile();
-
- Quantile(const Quantile& from);
-
- inline Quantile& operator=(const Quantile& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Quantile& default_instance();
-
- void Swap(Quantile* other);
-
- // implements Message ----------------------------------------------
-
- Quantile* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Quantile& from);
- void MergeFrom(const Quantile& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional double quantile = 1;
- inline bool has_quantile() const;
- inline void clear_quantile();
- static const int kQuantileFieldNumber = 1;
- inline double quantile() const;
- inline void set_quantile(double value);
-
- // optional double value = 2;
- inline bool has_value() const;
- inline void clear_value();
- static const int kValueFieldNumber = 2;
- inline double value() const;
- inline void set_value(double value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Quantile)
- private:
- inline void set_has_quantile();
- inline void clear_has_quantile();
- inline void set_has_value();
- inline void clear_has_value();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- double quantile_;
- double value_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Quantile* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Summary : public ::google::protobuf::Message {
- public:
- Summary();
- virtual ~Summary();
-
- Summary(const Summary& from);
-
- inline Summary& operator=(const Summary& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Summary& default_instance();
-
- void Swap(Summary* other);
-
- // implements Message ----------------------------------------------
-
- Summary* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Summary& from);
- void MergeFrom(const Summary& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional uint64 sample_count = 1;
- inline bool has_sample_count() const;
- inline void clear_sample_count();
- static const int kSampleCountFieldNumber = 1;
- inline ::google::protobuf::uint64 sample_count() const;
- inline void set_sample_count(::google::protobuf::uint64 value);
-
- // optional double sample_sum = 2;
- inline bool has_sample_sum() const;
- inline void clear_sample_sum();
- static const int kSampleSumFieldNumber = 2;
- inline double sample_sum() const;
- inline void set_sample_sum(double value);
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- inline int quantile_size() const;
- inline void clear_quantile();
- static const int kQuantileFieldNumber = 3;
- inline const ::io::prometheus::client::Quantile& quantile(int index) const;
- inline ::io::prometheus::client::Quantile* mutable_quantile(int index);
- inline ::io::prometheus::client::Quantile* add_quantile();
- inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >&
- quantile() const;
- inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >*
- mutable_quantile();
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Summary)
- private:
- inline void set_has_sample_count();
- inline void clear_has_sample_count();
- inline void set_has_sample_sum();
- inline void clear_has_sample_sum();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::google::protobuf::uint64 sample_count_;
- double sample_sum_;
- ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile > quantile_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Summary* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Untyped : public ::google::protobuf::Message {
- public:
- Untyped();
- virtual ~Untyped();
-
- Untyped(const Untyped& from);
-
- inline Untyped& operator=(const Untyped& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Untyped& default_instance();
-
- void Swap(Untyped* other);
-
- // implements Message ----------------------------------------------
-
- Untyped* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Untyped& from);
- void MergeFrom(const Untyped& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional double value = 1;
- inline bool has_value() const;
- inline void clear_value();
- static const int kValueFieldNumber = 1;
- inline double value() const;
- inline void set_value(double value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Untyped)
- private:
- inline void set_has_value();
- inline void clear_has_value();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- double value_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Untyped* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Histogram : public ::google::protobuf::Message {
- public:
- Histogram();
- virtual ~Histogram();
-
- Histogram(const Histogram& from);
-
- inline Histogram& operator=(const Histogram& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Histogram& default_instance();
-
- void Swap(Histogram* other);
-
- // implements Message ----------------------------------------------
-
- Histogram* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Histogram& from);
- void MergeFrom(const Histogram& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional uint64 sample_count = 1;
- inline bool has_sample_count() const;
- inline void clear_sample_count();
- static const int kSampleCountFieldNumber = 1;
- inline ::google::protobuf::uint64 sample_count() const;
- inline void set_sample_count(::google::protobuf::uint64 value);
-
- // optional double sample_sum = 2;
- inline bool has_sample_sum() const;
- inline void clear_sample_sum();
- static const int kSampleSumFieldNumber = 2;
- inline double sample_sum() const;
- inline void set_sample_sum(double value);
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- inline int bucket_size() const;
- inline void clear_bucket();
- static const int kBucketFieldNumber = 3;
- inline const ::io::prometheus::client::Bucket& bucket(int index) const;
- inline ::io::prometheus::client::Bucket* mutable_bucket(int index);
- inline ::io::prometheus::client::Bucket* add_bucket();
- inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >&
- bucket() const;
- inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >*
- mutable_bucket();
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Histogram)
- private:
- inline void set_has_sample_count();
- inline void clear_has_sample_count();
- inline void set_has_sample_sum();
- inline void clear_has_sample_sum();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::google::protobuf::uint64 sample_count_;
- double sample_sum_;
- ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket > bucket_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Histogram* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Bucket : public ::google::protobuf::Message {
- public:
- Bucket();
- virtual ~Bucket();
-
- Bucket(const Bucket& from);
-
- inline Bucket& operator=(const Bucket& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Bucket& default_instance();
-
- void Swap(Bucket* other);
-
- // implements Message ----------------------------------------------
-
- Bucket* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Bucket& from);
- void MergeFrom(const Bucket& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional uint64 cumulative_count = 1;
- inline bool has_cumulative_count() const;
- inline void clear_cumulative_count();
- static const int kCumulativeCountFieldNumber = 1;
- inline ::google::protobuf::uint64 cumulative_count() const;
- inline void set_cumulative_count(::google::protobuf::uint64 value);
-
- // optional double upper_bound = 2;
- inline bool has_upper_bound() const;
- inline void clear_upper_bound();
- static const int kUpperBoundFieldNumber = 2;
- inline double upper_bound() const;
- inline void set_upper_bound(double value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Bucket)
- private:
- inline void set_has_cumulative_count();
- inline void clear_has_cumulative_count();
- inline void set_has_upper_bound();
- inline void clear_has_upper_bound();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::google::protobuf::uint64 cumulative_count_;
- double upper_bound_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Bucket* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class Metric : public ::google::protobuf::Message {
- public:
- Metric();
- virtual ~Metric();
-
- Metric(const Metric& from);
-
- inline Metric& operator=(const Metric& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const Metric& default_instance();
-
- void Swap(Metric* other);
-
- // implements Message ----------------------------------------------
-
- Metric* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Metric& from);
- void MergeFrom(const Metric& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated .io.prometheus.client.LabelPair label = 1;
- inline int label_size() const;
- inline void clear_label();
- static const int kLabelFieldNumber = 1;
- inline const ::io::prometheus::client::LabelPair& label(int index) const;
- inline ::io::prometheus::client::LabelPair* mutable_label(int index);
- inline ::io::prometheus::client::LabelPair* add_label();
- inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >&
- label() const;
- inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >*
- mutable_label();
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- inline bool has_gauge() const;
- inline void clear_gauge();
- static const int kGaugeFieldNumber = 2;
- inline const ::io::prometheus::client::Gauge& gauge() const;
- inline ::io::prometheus::client::Gauge* mutable_gauge();
- inline ::io::prometheus::client::Gauge* release_gauge();
- inline void set_allocated_gauge(::io::prometheus::client::Gauge* gauge);
-
- // optional .io.prometheus.client.Counter counter = 3;
- inline bool has_counter() const;
- inline void clear_counter();
- static const int kCounterFieldNumber = 3;
- inline const ::io::prometheus::client::Counter& counter() const;
- inline ::io::prometheus::client::Counter* mutable_counter();
- inline ::io::prometheus::client::Counter* release_counter();
- inline void set_allocated_counter(::io::prometheus::client::Counter* counter);
-
- // optional .io.prometheus.client.Summary summary = 4;
- inline bool has_summary() const;
- inline void clear_summary();
- static const int kSummaryFieldNumber = 4;
- inline const ::io::prometheus::client::Summary& summary() const;
- inline ::io::prometheus::client::Summary* mutable_summary();
- inline ::io::prometheus::client::Summary* release_summary();
- inline void set_allocated_summary(::io::prometheus::client::Summary* summary);
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- inline bool has_untyped() const;
- inline void clear_untyped();
- static const int kUntypedFieldNumber = 5;
- inline const ::io::prometheus::client::Untyped& untyped() const;
- inline ::io::prometheus::client::Untyped* mutable_untyped();
- inline ::io::prometheus::client::Untyped* release_untyped();
- inline void set_allocated_untyped(::io::prometheus::client::Untyped* untyped);
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- inline bool has_histogram() const;
- inline void clear_histogram();
- static const int kHistogramFieldNumber = 7;
- inline const ::io::prometheus::client::Histogram& histogram() const;
- inline ::io::prometheus::client::Histogram* mutable_histogram();
- inline ::io::prometheus::client::Histogram* release_histogram();
- inline void set_allocated_histogram(::io::prometheus::client::Histogram* histogram);
-
- // optional int64 timestamp_ms = 6;
- inline bool has_timestamp_ms() const;
- inline void clear_timestamp_ms();
- static const int kTimestampMsFieldNumber = 6;
- inline ::google::protobuf::int64 timestamp_ms() const;
- inline void set_timestamp_ms(::google::protobuf::int64 value);
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.Metric)
- private:
- inline void set_has_gauge();
- inline void clear_has_gauge();
- inline void set_has_counter();
- inline void clear_has_counter();
- inline void set_has_summary();
- inline void clear_has_summary();
- inline void set_has_untyped();
- inline void clear_has_untyped();
- inline void set_has_histogram();
- inline void clear_has_histogram();
- inline void set_has_timestamp_ms();
- inline void clear_has_timestamp_ms();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair > label_;
- ::io::prometheus::client::Gauge* gauge_;
- ::io::prometheus::client::Counter* counter_;
- ::io::prometheus::client::Summary* summary_;
- ::io::prometheus::client::Untyped* untyped_;
- ::io::prometheus::client::Histogram* histogram_;
- ::google::protobuf::int64 timestamp_ms_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static Metric* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class MetricFamily : public ::google::protobuf::Message {
- public:
- MetricFamily();
- virtual ~MetricFamily();
-
- MetricFamily(const MetricFamily& from);
-
- inline MetricFamily& operator=(const MetricFamily& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const MetricFamily& default_instance();
-
- void Swap(MetricFamily* other);
-
- // implements Message ----------------------------------------------
-
- MetricFamily* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const MetricFamily& from);
- void MergeFrom(const MetricFamily& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
- static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
-
- // optional string help = 2;
- inline bool has_help() const;
- inline void clear_help();
- static const int kHelpFieldNumber = 2;
- inline const ::std::string& help() const;
- inline void set_help(const ::std::string& value);
- inline void set_help(const char* value);
- inline void set_help(const char* value, size_t size);
- inline ::std::string* mutable_help();
- inline ::std::string* release_help();
- inline void set_allocated_help(::std::string* help);
-
- // optional .io.prometheus.client.MetricType type = 3;
- inline bool has_type() const;
- inline void clear_type();
- static const int kTypeFieldNumber = 3;
- inline ::io::prometheus::client::MetricType type() const;
- inline void set_type(::io::prometheus::client::MetricType value);
-
- // repeated .io.prometheus.client.Metric metric = 4;
- inline int metric_size() const;
- inline void clear_metric();
- static const int kMetricFieldNumber = 4;
- inline const ::io::prometheus::client::Metric& metric(int index) const;
- inline ::io::prometheus::client::Metric* mutable_metric(int index);
- inline ::io::prometheus::client::Metric* add_metric();
- inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >&
- metric() const;
- inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >*
- mutable_metric();
-
- // @@protoc_insertion_point(class_scope:io.prometheus.client.MetricFamily)
- private:
- inline void set_has_name();
- inline void clear_has_name();
- inline void set_has_help();
- inline void clear_has_help();
- inline void set_has_type();
- inline void clear_has_type();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::std::string* name_;
- ::std::string* help_;
- ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric > metric_;
- int type_;
- friend void protobuf_AddDesc_metrics_2eproto();
- friend void protobuf_AssignDesc_metrics_2eproto();
- friend void protobuf_ShutdownFile_metrics_2eproto();
-
- void InitAsDefaultInstance();
- static MetricFamily* default_instance_;
-};
-// ===================================================================
-
-
-// ===================================================================
-
-// LabelPair
-
-// optional string name = 1;
-inline bool LabelPair::has_name() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void LabelPair::set_has_name() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void LabelPair::clear_has_name() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void LabelPair::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- clear_has_name();
-}
-inline const ::std::string& LabelPair::name() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.name)
- return *name_;
-}
-inline void LabelPair::set_name(const ::std::string& value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.name)
-}
-inline void LabelPair::set_name(const char* value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.name)
-}
-inline void LabelPair::set_name(const char* value, size_t size) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.name)
-}
-inline ::std::string* LabelPair::mutable_name() {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.name)
- return name_;
-}
-inline ::std::string* LabelPair::release_name() {
- clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void LabelPair::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
- set_has_name();
- name_ = name;
- } else {
- clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.name)
-}
-
-// optional string value = 2;
-inline bool LabelPair::has_value() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void LabelPair::set_has_value() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void LabelPair::clear_has_value() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void LabelPair::clear_value() {
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_->clear();
- }
- clear_has_value();
-}
-inline const ::std::string& LabelPair::value() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.value)
- return *value_;
-}
-inline void LabelPair::set_value(const ::std::string& value) {
- set_has_value();
- if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_ = new ::std::string;
- }
- value_->assign(value);
- // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.value)
-}
-inline void LabelPair::set_value(const char* value) {
- set_has_value();
- if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_ = new ::std::string;
- }
- value_->assign(value);
- // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.value)
-}
-inline void LabelPair::set_value(const char* value, size_t size) {
- set_has_value();
- if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_ = new ::std::string;
- }
- value_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.value)
-}
-inline ::std::string* LabelPair::mutable_value() {
- set_has_value();
- if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.value)
- return value_;
-}
-inline ::std::string* LabelPair::release_value() {
- clear_has_value();
- if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = value_;
- value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void LabelPair::set_allocated_value(::std::string* value) {
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete value_;
- }
- if (value) {
- set_has_value();
- value_ = value;
- } else {
- clear_has_value();
- value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.value)
-}
-
-// -------------------------------------------------------------------
-
-// Gauge
-
-// optional double value = 1;
-inline bool Gauge::has_value() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Gauge::set_has_value() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Gauge::clear_has_value() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Gauge::clear_value() {
- value_ = 0;
- clear_has_value();
-}
-inline double Gauge::value() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Gauge.value)
- return value_;
-}
-inline void Gauge::set_value(double value) {
- set_has_value();
- value_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Gauge.value)
-}
-
-// -------------------------------------------------------------------
-
-// Counter
-
-// optional double value = 1;
-inline bool Counter::has_value() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Counter::set_has_value() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Counter::clear_has_value() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Counter::clear_value() {
- value_ = 0;
- clear_has_value();
-}
-inline double Counter::value() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Counter.value)
- return value_;
-}
-inline void Counter::set_value(double value) {
- set_has_value();
- value_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Counter.value)
-}
-
-// -------------------------------------------------------------------
-
-// Quantile
-
-// optional double quantile = 1;
-inline bool Quantile::has_quantile() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Quantile::set_has_quantile() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Quantile::clear_has_quantile() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Quantile::clear_quantile() {
- quantile_ = 0;
- clear_has_quantile();
-}
-inline double Quantile::quantile() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.quantile)
- return quantile_;
-}
-inline void Quantile::set_quantile(double value) {
- set_has_quantile();
- quantile_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.quantile)
-}
-
-// optional double value = 2;
-inline bool Quantile::has_value() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Quantile::set_has_value() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void Quantile::clear_has_value() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void Quantile::clear_value() {
- value_ = 0;
- clear_has_value();
-}
-inline double Quantile::value() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.value)
- return value_;
-}
-inline void Quantile::set_value(double value) {
- set_has_value();
- value_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.value)
-}
-
-// -------------------------------------------------------------------
-
-// Summary
-
-// optional uint64 sample_count = 1;
-inline bool Summary::has_sample_count() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Summary::set_has_sample_count() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Summary::clear_has_sample_count() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Summary::clear_sample_count() {
- sample_count_ = GOOGLE_ULONGLONG(0);
- clear_has_sample_count();
-}
-inline ::google::protobuf::uint64 Summary::sample_count() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_count)
- return sample_count_;
-}
-inline void Summary::set_sample_count(::google::protobuf::uint64 value) {
- set_has_sample_count();
- sample_count_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_count)
-}
-
-// optional double sample_sum = 2;
-inline bool Summary::has_sample_sum() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Summary::set_has_sample_sum() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void Summary::clear_has_sample_sum() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void Summary::clear_sample_sum() {
- sample_sum_ = 0;
- clear_has_sample_sum();
-}
-inline double Summary::sample_sum() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_sum)
- return sample_sum_;
-}
-inline void Summary::set_sample_sum(double value) {
- set_has_sample_sum();
- sample_sum_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_sum)
-}
-
-// repeated .io.prometheus.client.Quantile quantile = 3;
-inline int Summary::quantile_size() const {
- return quantile_.size();
-}
-inline void Summary::clear_quantile() {
- quantile_.Clear();
-}
-inline const ::io::prometheus::client::Quantile& Summary::quantile(int index) const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.quantile)
- return quantile_.Get(index);
-}
-inline ::io::prometheus::client::Quantile* Summary::mutable_quantile(int index) {
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Summary.quantile)
- return quantile_.Mutable(index);
-}
-inline ::io::prometheus::client::Quantile* Summary::add_quantile() {
- // @@protoc_insertion_point(field_add:io.prometheus.client.Summary.quantile)
- return quantile_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >&
-Summary::quantile() const {
- // @@protoc_insertion_point(field_list:io.prometheus.client.Summary.quantile)
- return quantile_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >*
-Summary::mutable_quantile() {
- // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Summary.quantile)
- return &quantile_;
-}
-
-// -------------------------------------------------------------------
-
-// Untyped
-
-// optional double value = 1;
-inline bool Untyped::has_value() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Untyped::set_has_value() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Untyped::clear_has_value() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Untyped::clear_value() {
- value_ = 0;
- clear_has_value();
-}
-inline double Untyped::value() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Untyped.value)
- return value_;
-}
-inline void Untyped::set_value(double value) {
- set_has_value();
- value_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Untyped.value)
-}
-
-// -------------------------------------------------------------------
-
-// Histogram
-
-// optional uint64 sample_count = 1;
-inline bool Histogram::has_sample_count() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Histogram::set_has_sample_count() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Histogram::clear_has_sample_count() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Histogram::clear_sample_count() {
- sample_count_ = GOOGLE_ULONGLONG(0);
- clear_has_sample_count();
-}
-inline ::google::protobuf::uint64 Histogram::sample_count() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_count)
- return sample_count_;
-}
-inline void Histogram::set_sample_count(::google::protobuf::uint64 value) {
- set_has_sample_count();
- sample_count_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_count)
-}
-
-// optional double sample_sum = 2;
-inline bool Histogram::has_sample_sum() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Histogram::set_has_sample_sum() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void Histogram::clear_has_sample_sum() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void Histogram::clear_sample_sum() {
- sample_sum_ = 0;
- clear_has_sample_sum();
-}
-inline double Histogram::sample_sum() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_sum)
- return sample_sum_;
-}
-inline void Histogram::set_sample_sum(double value) {
- set_has_sample_sum();
- sample_sum_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_sum)
-}
-
-// repeated .io.prometheus.client.Bucket bucket = 3;
-inline int Histogram::bucket_size() const {
- return bucket_.size();
-}
-inline void Histogram::clear_bucket() {
- bucket_.Clear();
-}
-inline const ::io::prometheus::client::Bucket& Histogram::bucket(int index) const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.bucket)
- return bucket_.Get(index);
-}
-inline ::io::prometheus::client::Bucket* Histogram::mutable_bucket(int index) {
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Histogram.bucket)
- return bucket_.Mutable(index);
-}
-inline ::io::prometheus::client::Bucket* Histogram::add_bucket() {
- // @@protoc_insertion_point(field_add:io.prometheus.client.Histogram.bucket)
- return bucket_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >&
-Histogram::bucket() const {
- // @@protoc_insertion_point(field_list:io.prometheus.client.Histogram.bucket)
- return bucket_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >*
-Histogram::mutable_bucket() {
- // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Histogram.bucket)
- return &bucket_;
-}
-
-// -------------------------------------------------------------------
-
-// Bucket
-
-// optional uint64 cumulative_count = 1;
-inline bool Bucket::has_cumulative_count() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Bucket::set_has_cumulative_count() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void Bucket::clear_has_cumulative_count() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void Bucket::clear_cumulative_count() {
- cumulative_count_ = GOOGLE_ULONGLONG(0);
- clear_has_cumulative_count();
-}
-inline ::google::protobuf::uint64 Bucket::cumulative_count() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.cumulative_count)
- return cumulative_count_;
-}
-inline void Bucket::set_cumulative_count(::google::protobuf::uint64 value) {
- set_has_cumulative_count();
- cumulative_count_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.cumulative_count)
-}
-
-// optional double upper_bound = 2;
-inline bool Bucket::has_upper_bound() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Bucket::set_has_upper_bound() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void Bucket::clear_has_upper_bound() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void Bucket::clear_upper_bound() {
- upper_bound_ = 0;
- clear_has_upper_bound();
-}
-inline double Bucket::upper_bound() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.upper_bound)
- return upper_bound_;
-}
-inline void Bucket::set_upper_bound(double value) {
- set_has_upper_bound();
- upper_bound_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.upper_bound)
-}
-
-// -------------------------------------------------------------------
-
-// Metric
-
-// repeated .io.prometheus.client.LabelPair label = 1;
-inline int Metric::label_size() const {
- return label_.size();
-}
-inline void Metric::clear_label() {
- label_.Clear();
-}
-inline const ::io::prometheus::client::LabelPair& Metric::label(int index) const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.label)
- return label_.Get(index);
-}
-inline ::io::prometheus::client::LabelPair* Metric::mutable_label(int index) {
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.label)
- return label_.Mutable(index);
-}
-inline ::io::prometheus::client::LabelPair* Metric::add_label() {
- // @@protoc_insertion_point(field_add:io.prometheus.client.Metric.label)
- return label_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >&
-Metric::label() const {
- // @@protoc_insertion_point(field_list:io.prometheus.client.Metric.label)
- return label_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >*
-Metric::mutable_label() {
- // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Metric.label)
- return &label_;
-}
-
-// optional .io.prometheus.client.Gauge gauge = 2;
-inline bool Metric::has_gauge() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Metric::set_has_gauge() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void Metric::clear_has_gauge() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void Metric::clear_gauge() {
- if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear();
- clear_has_gauge();
-}
-inline const ::io::prometheus::client::Gauge& Metric::gauge() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.gauge)
- return gauge_ != NULL ? *gauge_ : *default_instance_->gauge_;
-}
-inline ::io::prometheus::client::Gauge* Metric::mutable_gauge() {
- set_has_gauge();
- if (gauge_ == NULL) gauge_ = new ::io::prometheus::client::Gauge;
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.gauge)
- return gauge_;
-}
-inline ::io::prometheus::client::Gauge* Metric::release_gauge() {
- clear_has_gauge();
- ::io::prometheus::client::Gauge* temp = gauge_;
- gauge_ = NULL;
- return temp;
-}
-inline void Metric::set_allocated_gauge(::io::prometheus::client::Gauge* gauge) {
- delete gauge_;
- gauge_ = gauge;
- if (gauge) {
- set_has_gauge();
- } else {
- clear_has_gauge();
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.gauge)
-}
-
-// optional .io.prometheus.client.Counter counter = 3;
-inline bool Metric::has_counter() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
-}
-inline void Metric::set_has_counter() {
- _has_bits_[0] |= 0x00000004u;
-}
-inline void Metric::clear_has_counter() {
- _has_bits_[0] &= ~0x00000004u;
-}
-inline void Metric::clear_counter() {
- if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear();
- clear_has_counter();
-}
-inline const ::io::prometheus::client::Counter& Metric::counter() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.counter)
- return counter_ != NULL ? *counter_ : *default_instance_->counter_;
-}
-inline ::io::prometheus::client::Counter* Metric::mutable_counter() {
- set_has_counter();
- if (counter_ == NULL) counter_ = new ::io::prometheus::client::Counter;
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.counter)
- return counter_;
-}
-inline ::io::prometheus::client::Counter* Metric::release_counter() {
- clear_has_counter();
- ::io::prometheus::client::Counter* temp = counter_;
- counter_ = NULL;
- return temp;
-}
-inline void Metric::set_allocated_counter(::io::prometheus::client::Counter* counter) {
- delete counter_;
- counter_ = counter;
- if (counter) {
- set_has_counter();
- } else {
- clear_has_counter();
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.counter)
-}
-
-// optional .io.prometheus.client.Summary summary = 4;
-inline bool Metric::has_summary() const {
- return (_has_bits_[0] & 0x00000008u) != 0;
-}
-inline void Metric::set_has_summary() {
- _has_bits_[0] |= 0x00000008u;
-}
-inline void Metric::clear_has_summary() {
- _has_bits_[0] &= ~0x00000008u;
-}
-inline void Metric::clear_summary() {
- if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear();
- clear_has_summary();
-}
-inline const ::io::prometheus::client::Summary& Metric::summary() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.summary)
- return summary_ != NULL ? *summary_ : *default_instance_->summary_;
-}
-inline ::io::prometheus::client::Summary* Metric::mutable_summary() {
- set_has_summary();
- if (summary_ == NULL) summary_ = new ::io::prometheus::client::Summary;
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.summary)
- return summary_;
-}
-inline ::io::prometheus::client::Summary* Metric::release_summary() {
- clear_has_summary();
- ::io::prometheus::client::Summary* temp = summary_;
- summary_ = NULL;
- return temp;
-}
-inline void Metric::set_allocated_summary(::io::prometheus::client::Summary* summary) {
- delete summary_;
- summary_ = summary;
- if (summary) {
- set_has_summary();
- } else {
- clear_has_summary();
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.summary)
-}
-
-// optional .io.prometheus.client.Untyped untyped = 5;
-inline bool Metric::has_untyped() const {
- return (_has_bits_[0] & 0x00000010u) != 0;
-}
-inline void Metric::set_has_untyped() {
- _has_bits_[0] |= 0x00000010u;
-}
-inline void Metric::clear_has_untyped() {
- _has_bits_[0] &= ~0x00000010u;
-}
-inline void Metric::clear_untyped() {
- if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear();
- clear_has_untyped();
-}
-inline const ::io::prometheus::client::Untyped& Metric::untyped() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.untyped)
- return untyped_ != NULL ? *untyped_ : *default_instance_->untyped_;
-}
-inline ::io::prometheus::client::Untyped* Metric::mutable_untyped() {
- set_has_untyped();
- if (untyped_ == NULL) untyped_ = new ::io::prometheus::client::Untyped;
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.untyped)
- return untyped_;
-}
-inline ::io::prometheus::client::Untyped* Metric::release_untyped() {
- clear_has_untyped();
- ::io::prometheus::client::Untyped* temp = untyped_;
- untyped_ = NULL;
- return temp;
-}
-inline void Metric::set_allocated_untyped(::io::prometheus::client::Untyped* untyped) {
- delete untyped_;
- untyped_ = untyped;
- if (untyped) {
- set_has_untyped();
- } else {
- clear_has_untyped();
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.untyped)
-}
-
-// optional .io.prometheus.client.Histogram histogram = 7;
-inline bool Metric::has_histogram() const {
- return (_has_bits_[0] & 0x00000020u) != 0;
-}
-inline void Metric::set_has_histogram() {
- _has_bits_[0] |= 0x00000020u;
-}
-inline void Metric::clear_has_histogram() {
- _has_bits_[0] &= ~0x00000020u;
-}
-inline void Metric::clear_histogram() {
- if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear();
- clear_has_histogram();
-}
-inline const ::io::prometheus::client::Histogram& Metric::histogram() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.histogram)
- return histogram_ != NULL ? *histogram_ : *default_instance_->histogram_;
-}
-inline ::io::prometheus::client::Histogram* Metric::mutable_histogram() {
- set_has_histogram();
- if (histogram_ == NULL) histogram_ = new ::io::prometheus::client::Histogram;
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.histogram)
- return histogram_;
-}
-inline ::io::prometheus::client::Histogram* Metric::release_histogram() {
- clear_has_histogram();
- ::io::prometheus::client::Histogram* temp = histogram_;
- histogram_ = NULL;
- return temp;
-}
-inline void Metric::set_allocated_histogram(::io::prometheus::client::Histogram* histogram) {
- delete histogram_;
- histogram_ = histogram;
- if (histogram) {
- set_has_histogram();
- } else {
- clear_has_histogram();
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.histogram)
-}
-
-// optional int64 timestamp_ms = 6;
-inline bool Metric::has_timestamp_ms() const {
- return (_has_bits_[0] & 0x00000040u) != 0;
-}
-inline void Metric::set_has_timestamp_ms() {
- _has_bits_[0] |= 0x00000040u;
-}
-inline void Metric::clear_has_timestamp_ms() {
- _has_bits_[0] &= ~0x00000040u;
-}
-inline void Metric::clear_timestamp_ms() {
- timestamp_ms_ = GOOGLE_LONGLONG(0);
- clear_has_timestamp_ms();
-}
-inline ::google::protobuf::int64 Metric::timestamp_ms() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.timestamp_ms)
- return timestamp_ms_;
-}
-inline void Metric::set_timestamp_ms(::google::protobuf::int64 value) {
- set_has_timestamp_ms();
- timestamp_ms_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.Metric.timestamp_ms)
-}
-
-// -------------------------------------------------------------------
-
-// MetricFamily
-
-// optional string name = 1;
-inline bool MetricFamily::has_name() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void MetricFamily::set_has_name() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void MetricFamily::clear_has_name() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void MetricFamily::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- clear_has_name();
-}
-inline const ::std::string& MetricFamily::name() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.name)
- return *name_;
-}
-inline void MetricFamily::set_name(const ::std::string& value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.name)
-}
-inline void MetricFamily::set_name(const char* value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.name)
-}
-inline void MetricFamily::set_name(const char* value, size_t size) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.name)
-}
-inline ::std::string* MetricFamily::mutable_name() {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.name)
- return name_;
-}
-inline ::std::string* MetricFamily::release_name() {
- clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void MetricFamily::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
- set_has_name();
- name_ = name;
- } else {
- clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.name)
-}
-
-// optional string help = 2;
-inline bool MetricFamily::has_help() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void MetricFamily::set_has_help() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void MetricFamily::clear_has_help() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void MetricFamily::clear_help() {
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_->clear();
- }
- clear_has_help();
-}
-inline const ::std::string& MetricFamily::help() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.help)
- return *help_;
-}
-inline void MetricFamily::set_help(const ::std::string& value) {
- set_has_help();
- if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_ = new ::std::string;
- }
- help_->assign(value);
- // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.help)
-}
-inline void MetricFamily::set_help(const char* value) {
- set_has_help();
- if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_ = new ::std::string;
- }
- help_->assign(value);
- // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.help)
-}
-inline void MetricFamily::set_help(const char* value, size_t size) {
- set_has_help();
- if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_ = new ::std::string;
- }
- help_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.help)
-}
-inline ::std::string* MetricFamily::mutable_help() {
- set_has_help();
- if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.help)
- return help_;
-}
-inline ::std::string* MetricFamily::release_help() {
- clear_has_help();
- if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = help_;
- help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void MetricFamily::set_allocated_help(::std::string* help) {
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete help_;
- }
- if (help) {
- set_has_help();
- help_ = help;
- } else {
- clear_has_help();
- help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.help)
-}
-
-// optional .io.prometheus.client.MetricType type = 3;
-inline bool MetricFamily::has_type() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
-}
-inline void MetricFamily::set_has_type() {
- _has_bits_[0] |= 0x00000004u;
-}
-inline void MetricFamily::clear_has_type() {
- _has_bits_[0] &= ~0x00000004u;
-}
-inline void MetricFamily::clear_type() {
- type_ = 0;
- clear_has_type();
-}
-inline ::io::prometheus::client::MetricType MetricFamily::type() const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.type)
- return static_cast< ::io::prometheus::client::MetricType >(type_);
-}
-inline void MetricFamily::set_type(::io::prometheus::client::MetricType value) {
- assert(::io::prometheus::client::MetricType_IsValid(value));
- set_has_type();
- type_ = value;
- // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.type)
-}
-
-// repeated .io.prometheus.client.Metric metric = 4;
-inline int MetricFamily::metric_size() const {
- return metric_.size();
-}
-inline void MetricFamily::clear_metric() {
- metric_.Clear();
-}
-inline const ::io::prometheus::client::Metric& MetricFamily::metric(int index) const {
- // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.metric)
- return metric_.Get(index);
-}
-inline ::io::prometheus::client::Metric* MetricFamily::mutable_metric(int index) {
- // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.metric)
- return metric_.Mutable(index);
-}
-inline ::io::prometheus::client::Metric* MetricFamily::add_metric() {
- // @@protoc_insertion_point(field_add:io.prometheus.client.MetricFamily.metric)
- return metric_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >&
-MetricFamily::metric() const {
- // @@protoc_insertion_point(field_list:io.prometheus.client.MetricFamily.metric)
- return metric_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >*
-MetricFamily::mutable_metric() {
- // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.MetricFamily.metric)
- return &metric_;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace client
-} // namespace prometheus
-} // namespace io
-
-#ifndef SWIG
-namespace google {
-namespace protobuf {
-
-template <> struct is_proto_enum< ::io::prometheus::client::MetricType> : ::google::protobuf::internal::true_type {};
-template <>
-inline const EnumDescriptor* GetEnumDescriptor< ::io::prometheus::client::MetricType>() {
- return ::io::prometheus::client::MetricType_descriptor();
-}
-
-} // namespace google
-} // namespace protobuf
-#endif // SWIG
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_metrics_2eproto__INCLUDED
diff --git a/vendor/github.com/prometheus/client_model/metrics.proto b/vendor/github.com/prometheus/client_model/metrics.proto
deleted file mode 100644
index 0b84af920..000000000
--- a/vendor/github.com/prometheus/client_model/metrics.proto
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2013 Prometheus Team
-// 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.
-
-syntax = "proto2";
-
-package io.prometheus.client;
-option java_package = "io.prometheus.client";
-
-message LabelPair {
- optional string name = 1;
- optional string value = 2;
-}
-
-enum MetricType {
- COUNTER = 0;
- GAUGE = 1;
- SUMMARY = 2;
- UNTYPED = 3;
- HISTOGRAM = 4;
-}
-
-message Gauge {
- optional double value = 1;
-}
-
-message Counter {
- optional double value = 1;
-}
-
-message Quantile {
- optional double quantile = 1;
- optional double value = 2;
-}
-
-message Summary {
- optional uint64 sample_count = 1;
- optional double sample_sum = 2;
- repeated Quantile quantile = 3;
-}
-
-message Untyped {
- optional double value = 1;
-}
-
-message Histogram {
- optional uint64 sample_count = 1;
- optional double sample_sum = 2;
- repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
-}
-
-message Bucket {
- optional uint64 cumulative_count = 1; // Cumulative in increasing order.
- optional double upper_bound = 2; // Inclusive.
-}
-
-message Metric {
- repeated LabelPair label = 1;
- optional Gauge gauge = 2;
- optional Counter counter = 3;
- optional Summary summary = 4;
- optional Untyped untyped = 5;
- optional Histogram histogram = 7;
- optional int64 timestamp_ms = 6;
-}
-
-message MetricFamily {
- optional string name = 1;
- optional string help = 2;
- optional MetricType type = 3;
- repeated Metric metric = 4;
-}
diff --git a/vendor/github.com/prometheus/client_model/pom.xml b/vendor/github.com/prometheus/client_model/pom.xml
deleted file mode 100644
index 4d34c9015..000000000
--- a/vendor/github.com/prometheus/client_model/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>io.prometheus.client</groupId>
- <artifactId>model</artifactId>
- <version>0.0.3-SNAPSHOT</version>
-
- <parent>
- <groupId>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
- </parent>
-
- <name>Prometheus Client Data Model</name>
- <url>http://github.com/prometheus/client_model</url>
- <description>
- Prometheus Client Data Model: Generated Protocol Buffer Assets
- </description>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:git:git@github.com:prometheus/client_model.git</connection>
- <developerConnection>scm:git:git@github.com:prometheus/client_model.git</developerConnection>
- <url>git@github.com:prometheus/client_model.git</url>
- </scm>
-
- <developers>
- <developer>
- <id>mtp</id>
- <name>Matt T. Proud</name>
- <email>matt.proud@gmail.com</email>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>2.5.0</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <docencoding>UTF-8</docencoding>
- <linksource>true</linksource>
- </configuration>
- <executions>
- <execution>
- <id>generate-javadoc-site-report</id>
- <phase>site</phase>
- <goals>
- <goal>javadoc</goal>
- </goals>
- </execution>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- <version>3.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.2.1</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>release-sign-artifacts</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/vendor/github.com/prometheus/client_model/python/prometheus/__init__.py b/vendor/github.com/prometheus/client_model/python/prometheus/__init__.py
deleted file mode 100644
index 617c0ced0..000000000
--- a/vendor/github.com/prometheus/client_model/python/prometheus/__init__.py
+++ /dev/null
@@ -1,12 +0,0 @@
- # Copyright 2013 Prometheus Team
- # 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/prometheus/client_model/ruby/.gitignore b/vendor/github.com/prometheus/client_model/ruby/.gitignore
deleted file mode 100644
index 8442a4709..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.gem
-.bundle
-Gemfile.lock
-pkg
-vendor/bundle
diff --git a/vendor/github.com/prometheus/client_model/ruby/Gemfile b/vendor/github.com/prometheus/client_model/ruby/Gemfile
deleted file mode 100644
index 1ff638cdc..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-source 'https://rubygems.org'
-
-# Specify your gem's dependencies in prometheus-client-model.gemspec
-gemspec
diff --git a/vendor/github.com/prometheus/client_model/ruby/Makefile b/vendor/github.com/prometheus/client_model/ruby/Makefile
deleted file mode 100644
index 09d544bf0..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-VENDOR_BUNDLE = vendor/bundle
-
-build: $(VENDOR_BUNDLE)/.bundled
- BEEFCAKE_NAMESPACE=Prometheus::Client protoc --beefcake_out lib/prometheus/client/model -I .. ../metrics.proto
-
-$(VENDOR_BUNDLE):
- mkdir -p $@
-
-$(VENDOR_BUNDLE)/.bundled: $(VENDOR_BUNDLE) Gemfile
- bundle install --quiet --path $<
- @touch $@
-
-clean:
- -rm -f lib/prometheus/client/model/metrics.pb.rb
- -rm -rf $(VENDOR_BUNDLE)
-
-.PHONY: build clean
diff --git a/vendor/github.com/prometheus/client_model/ruby/README.md b/vendor/github.com/prometheus/client_model/ruby/README.md
deleted file mode 100644
index c45fcc7a9..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Prometheus Ruby client model
-
-Data model artifacts for the [Prometheus Ruby client][1].
-
-## Installation
-
- gem install prometheus-client-model
-
-## Usage
-
-Build the artifacts from the protobuf specification:
-
- make build
-
-While this Gem's main purpose is to define the Prometheus data types for the
-[client][1], it's possible to use it without the client to decode a stream of
-delimited protobuf messages:
-
-```ruby
-require 'open-uri'
-require 'prometheus/client/model'
-
-CONTENT_TYPE = 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited'
-
-stream = open('http://localhost:9090/metrics', 'Accept' => CONTENT_TYPE).read
-while family = Prometheus::Client::MetricFamily.read_delimited(stream)
- puts family
-end
-```
-
-[1]: https://github.com/prometheus/client_ruby
diff --git a/vendor/github.com/prometheus/client_model/ruby/Rakefile b/vendor/github.com/prometheus/client_model/ruby/Rakefile
deleted file mode 100644
index 29955274e..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/Rakefile
+++ /dev/null
@@ -1 +0,0 @@
-require "bundler/gem_tasks"
diff --git a/vendor/github.com/prometheus/client_model/ruby/prometheus-client-model.gemspec b/vendor/github.com/prometheus/client_model/ruby/prometheus-client-model.gemspec
deleted file mode 100644
index 438ba127e..000000000
--- a/vendor/github.com/prometheus/client_model/ruby/prometheus-client-model.gemspec
+++ /dev/null
@@ -1,22 +0,0 @@
-# coding: utf-8
-lib = File.expand_path('../lib', __FILE__)
-$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
-require 'prometheus/client/model/version'
-
-Gem::Specification.new do |spec|
- spec.name = 'prometheus-client-model'
- spec.version = Prometheus::Client::Model::VERSION
- spec.authors = ['Tobias Schmidt']
- spec.email = ['tobidt@gmail.com']
- spec.summary = 'Data model artifacts for the Prometheus Ruby client'
- spec.homepage = 'https://github.com/prometheus/client_model/tree/master/ruby'
- spec.license = 'Apache 2.0'
-
- spec.files = %w[README.md LICENSE] + Dir.glob('{lib/**/*}')
- spec.require_paths = ['lib']
-
- spec.add_dependency 'beefcake', '>= 0.4.0'
-
- spec.add_development_dependency 'bundler', '~> 1.3'
- spec.add_development_dependency 'rake'
-end
diff --git a/vendor/github.com/prometheus/client_model/setup.py b/vendor/github.com/prometheus/client_model/setup.py
deleted file mode 100644
index 67b9f20e3..000000000
--- a/vendor/github.com/prometheus/client_model/setup.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-from setuptools import setup
-
-setup(
- name = 'prometheus_client_model',
- version = '0.0.1',
- author = 'Matt T. Proud',
- author_email = 'matt.proud@gmail.com',
- description = 'Data model artifacts for the Prometheus client.',
- license = 'Apache License 2.0',
- url = 'http://github.com/prometheus/client_model',
- packages = ['prometheus', 'prometheus/client', 'prometheus/client/model'],
- package_dir = {'': 'python'},
- requires = ['protobuf(==2.4.1)'],
- platforms = 'Platform Independent',
- classifiers = ['Development Status :: 3 - Alpha',
- 'Intended Audience :: Developers',
- 'Intended Audience :: System Administrators',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: OS Independent',
- 'Topic :: Software Development :: Testing',
- 'Topic :: System :: Monitoring'])
diff --git a/vendor/github.com/prometheus/common/.travis.yml b/vendor/github.com/prometheus/common/.travis.yml
deleted file mode 100644
index 2fe8e9ad7..000000000
--- a/vendor/github.com/prometheus/common/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-sudo: false
-
-language: go
-go:
- - 1.7.5
- - tip
diff --git a/vendor/github.com/prometheus/common/CONTRIBUTING.md b/vendor/github.com/prometheus/common/CONTRIBUTING.md
deleted file mode 100644
index 40503edbf..000000000
--- a/vendor/github.com/prometheus/common/CONTRIBUTING.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Contributing
-
-Prometheus uses GitHub to manage reviews of pull requests.
-
-* If you have a trivial fix or improvement, go ahead and create a pull request,
- addressing (with `@...`) the maintainer of this repository (see
- [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.
-
-* If you plan to do something more involved, first discuss your ideas
- on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).
- This will avoid unnecessary work and surely give you and us a good deal
- of inspiration.
-
-* Relevant coding style guidelines are the [Go Code Review
- Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments)
- and the _Formatting and style_ section of Peter Bourgon's [Go: Best
- Practices for Production
- Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
diff --git a/vendor/github.com/prometheus/common/MAINTAINERS.md b/vendor/github.com/prometheus/common/MAINTAINERS.md
deleted file mode 100644
index 1b3152161..000000000
--- a/vendor/github.com/prometheus/common/MAINTAINERS.md
+++ /dev/null
@@ -1 +0,0 @@
-* Fabian Reinartz <fabian.reinartz@coreos.com>
diff --git a/vendor/github.com/prometheus/common/README.md b/vendor/github.com/prometheus/common/README.md
deleted file mode 100644
index 11a584945..000000000
--- a/vendor/github.com/prometheus/common/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Common
-[![Build Status](https://travis-ci.org/prometheus/common.svg)](https://travis-ci.org/prometheus/common)
-
-This repository contains Go libraries that are shared across Prometheus
-components and libraries.
-
-* **config**: Common configuration structures
-* **expfmt**: Decoding and encoding for the exposition format
-* **log**: A logging wrapper around [logrus](https://github.com/sirupsen/logrus)
-* **model**: Shared data structures
-* **route**: A routing wrapper around [httprouter](https://github.com/julienschmidt/httprouter) using `context.Context`
-* **version**: Version informations and metric
diff --git a/vendor/github.com/prometheus/common/config/config.go b/vendor/github.com/prometheus/common/config/config.go
deleted file mode 100644
index 9195c34bf..000000000
--- a/vendor/github.com/prometheus/common/config/config.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package config
-
-import (
- "fmt"
- "strings"
-)
-
-func checkOverflow(m map[string]interface{}, ctx string) error {
- if len(m) > 0 {
- var keys []string
- for k := range m {
- keys = append(keys, k)
- }
- return fmt.Errorf("unknown fields in %s: %s", ctx, strings.Join(keys, ", "))
- }
- return nil
-}
-
-// Secret special type for storing secrets.
-type Secret string
-
-// MarshalYAML implements the yaml.Marshaler interface for Secrets.
-func (s Secret) MarshalYAML() (interface{}, error) {
- if s != "" {
- return "<secret>", nil
- }
- return nil, nil
-}
-
-//UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
-func (s *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error {
- type plain Secret
- return unmarshal((*plain)(s))
-}
diff --git a/vendor/github.com/prometheus/common/config/http_config.go b/vendor/github.com/prometheus/common/config/http_config.go
deleted file mode 100644
index ea231bf8d..000000000
--- a/vendor/github.com/prometheus/common/config/http_config.go
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package config
-
-import (
- "crypto/tls"
- "crypto/x509"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "strings"
-
- "gopkg.in/yaml.v2"
-)
-
-// BasicAuth contains basic HTTP authentication credentials.
-type BasicAuth struct {
- Username string `yaml:"username"`
- Password Secret `yaml:"password"`
-
- // Catches all undefined fields and must be empty after parsing.
- XXX map[string]interface{} `yaml:",inline"`
-}
-
-// URL is a custom URL type that allows validation at configuration load time.
-type URL struct {
- *url.URL
-}
-
-// UnmarshalYAML implements the yaml.Unmarshaler interface for URLs.
-func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error {
- var s string
- if err := unmarshal(&s); err != nil {
- return err
- }
-
- urlp, err := url.Parse(s)
- if err != nil {
- return err
- }
- u.URL = urlp
- return nil
-}
-
-// MarshalYAML implements the yaml.Marshaler interface for URLs.
-func (u URL) MarshalYAML() (interface{}, error) {
- if u.URL != nil {
- return u.String(), nil
- }
- return nil, nil
-}
-
-// HTTPClientConfig configures an HTTP client.
-type HTTPClientConfig struct {
- // The HTTP basic authentication credentials for the targets.
- BasicAuth *BasicAuth `yaml:"basic_auth,omitempty"`
- // The bearer token for the targets.
- BearerToken Secret `yaml:"bearer_token,omitempty"`
- // The bearer token file for the targets.
- BearerTokenFile string `yaml:"bearer_token_file,omitempty"`
- // HTTP proxy server to use to connect to the targets.
- ProxyURL URL `yaml:"proxy_url,omitempty"`
- // TLSConfig to use to connect to the targets.
- TLSConfig TLSConfig `yaml:"tls_config,omitempty"`
-
- // Catches all undefined fields and must be empty after parsing.
- XXX map[string]interface{} `yaml:",inline"`
-}
-
-// Validate validates the HTTPClientConfig to check only one of BearerToken,
-// BasicAuth and BearerTokenFile is configured.
-func (c *HTTPClientConfig) Validate() error {
- if len(c.BearerToken) > 0 && len(c.BearerTokenFile) > 0 {
- return fmt.Errorf("at most one of bearer_token & bearer_token_file must be configured")
- }
- if c.BasicAuth != nil && (len(c.BearerToken) > 0 || len(c.BearerTokenFile) > 0) {
- return fmt.Errorf("at most one of basic_auth, bearer_token & bearer_token_file must be configured")
- }
- return nil
-}
-
-// UnmarshalYAML implements the yaml.Unmarshaler interface
-func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
- type plain HTTPClientConfig
- err := unmarshal((*plain)(c))
- if err != nil {
- return err
- }
- err = c.Validate()
- if err != nil {
- return c.Validate()
- }
- return checkOverflow(c.XXX, "http_client_config")
-}
-
-// UnmarshalYAML implements the yaml.Unmarshaler interface.
-func (a *BasicAuth) UnmarshalYAML(unmarshal func(interface{}) error) error {
- type plain BasicAuth
- err := unmarshal((*plain)(a))
- if err != nil {
- return err
- }
- return checkOverflow(a.XXX, "basic_auth")
-}
-
-// NewHTTPClientFromConfig returns a new HTTP client configured for the
-// given config.HTTPClientConfig.
-func NewHTTPClientFromConfig(cfg *HTTPClientConfig) (*http.Client, error) {
- tlsConfig, err := NewTLSConfig(&cfg.TLSConfig)
- if err != nil {
- return nil, err
- }
-
- // It's the caller's job to handle timeouts
- var rt http.RoundTripper = &http.Transport{
- Proxy: http.ProxyURL(cfg.ProxyURL.URL),
- DisableKeepAlives: true,
- TLSClientConfig: tlsConfig,
- }
-
- // If a bearer token is provided, create a round tripper that will set the
- // Authorization header correctly on each request.
- bearerToken := cfg.BearerToken
- if len(bearerToken) == 0 && len(cfg.BearerTokenFile) > 0 {
- b, err := ioutil.ReadFile(cfg.BearerTokenFile)
- if err != nil {
- return nil, fmt.Errorf("unable to read bearer token file %s: %s", cfg.BearerTokenFile, err)
- }
- bearerToken = Secret(strings.TrimSpace(string(b)))
- }
-
- if len(bearerToken) > 0 {
- rt = NewBearerAuthRoundTripper(bearerToken, rt)
- }
-
- if cfg.BasicAuth != nil {
- rt = NewBasicAuthRoundTripper(cfg.BasicAuth.Username, Secret(cfg.BasicAuth.Password), rt)
- }
-
- // Return a new client with the configured round tripper.
- return &http.Client{Transport: rt}, nil
-}
-
-type bearerAuthRoundTripper struct {
- bearerToken Secret
- rt http.RoundTripper
-}
-
-type basicAuthRoundTripper struct {
- username string
- password Secret
- rt http.RoundTripper
-}
-
-// NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a request unless it has
-// already been set.
-func NewBasicAuthRoundTripper(username string, password Secret, rt http.RoundTripper) http.RoundTripper {
- return &basicAuthRoundTripper{username, password, rt}
-}
-
-func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
- if len(req.Header.Get("Authorization")) == 0 {
- req = cloneRequest(req)
- req.Header.Set("Authorization", "Bearer "+string(rt.bearerToken))
- }
-
- return rt.rt.RoundTrip(req)
-}
-
-// NewBearerAuthRoundTripper adds the provided bearer token to a request unless the authorization
-// header has already been set.
-func NewBearerAuthRoundTripper(bearer Secret, rt http.RoundTripper) http.RoundTripper {
- return &bearerAuthRoundTripper{bearer, rt}
-}
-
-func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
- if len(req.Header.Get("Authorization")) != 0 {
- return rt.RoundTrip(req)
- }
- req = cloneRequest(req)
- req.SetBasicAuth(rt.username, string(rt.password))
- return rt.rt.RoundTrip(req)
-}
-
-// cloneRequest returns a clone of the provided *http.Request.
-// The clone is a shallow copy of the struct and its Header map.
-func cloneRequest(r *http.Request) *http.Request {
- // Shallow copy of the struct.
- r2 := new(http.Request)
- *r2 = *r
- // Deep copy of the Header.
- r2.Header = make(http.Header)
- for k, s := range r.Header {
- r2.Header[k] = s
- }
- return r2
-}
-
-// NewTLSConfig creates a new tls.Config from the given config.TLSConfig.
-func NewTLSConfig(cfg *TLSConfig) (*tls.Config, error) {
- tlsConfig := &tls.Config{InsecureSkipVerify: cfg.InsecureSkipVerify}
-
- // If a CA cert is provided then let's read it in so we can validate the
- // scrape target's certificate properly.
- if len(cfg.CAFile) > 0 {
- caCertPool := x509.NewCertPool()
- // Load CA cert.
- caCert, err := ioutil.ReadFile(cfg.CAFile)
- if err != nil {
- return nil, fmt.Errorf("unable to use specified CA cert %s: %s", cfg.CAFile, err)
- }
- caCertPool.AppendCertsFromPEM(caCert)
- tlsConfig.RootCAs = caCertPool
- }
-
- if len(cfg.ServerName) > 0 {
- tlsConfig.ServerName = cfg.ServerName
- }
-
- // If a client cert & key is provided then configure TLS config accordingly.
- if len(cfg.CertFile) > 0 && len(cfg.KeyFile) == 0 {
- return nil, fmt.Errorf("client cert file %q specified without client key file", cfg.CertFile)
- } else if len(cfg.KeyFile) > 0 && len(cfg.CertFile) == 0 {
- return nil, fmt.Errorf("client key file %q specified without client cert file", cfg.KeyFile)
- } else if len(cfg.CertFile) > 0 && len(cfg.KeyFile) > 0 {
- cert, err := tls.LoadX509KeyPair(cfg.CertFile, cfg.KeyFile)
- if err != nil {
- return nil, fmt.Errorf("unable to use specified client cert (%s) & key (%s): %s", cfg.CertFile, cfg.KeyFile, err)
- }
- tlsConfig.Certificates = []tls.Certificate{cert}
- }
- tlsConfig.BuildNameToCertificate()
-
- return tlsConfig, nil
-}
-
-// TLSConfig configures the options for TLS connections.
-type TLSConfig struct {
- // The CA cert to use for the targets.
- CAFile string `yaml:"ca_file,omitempty"`
- // The client cert file for the targets.
- CertFile string `yaml:"cert_file,omitempty"`
- // The client key file for the targets.
- KeyFile string `yaml:"key_file,omitempty"`
- // Used to verify the hostname for the targets.
- ServerName string `yaml:"server_name,omitempty"`
- // Disable target certificate validation.
- InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
-
- // Catches all undefined fields and must be empty after parsing.
- XXX map[string]interface{} `yaml:",inline"`
-}
-
-// UnmarshalYAML implements the yaml.Unmarshaler interface.
-func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
- type plain TLSConfig
- if err := unmarshal((*plain)(c)); err != nil {
- return err
- }
- return checkOverflow(c.XXX, "TLS config")
-}
-
-func (c HTTPClientConfig) String() string {
- b, err := yaml.Marshal(c)
- if err != nil {
- return fmt.Sprintf("<error creating http client config string: %s>", err)
- }
- return string(b)
-}
diff --git a/vendor/github.com/prometheus/common/config/http_config_test.go b/vendor/github.com/prometheus/common/config/http_config_test.go
deleted file mode 100644
index 4b13e101b..000000000
--- a/vendor/github.com/prometheus/common/config/http_config_test.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package config
-
-import (
- "io/ioutil"
- "net/http"
- "net/url"
- "strings"
- "testing"
-
- yaml "gopkg.in/yaml.v2"
-)
-
-var invalidHTTPClientConfigs = []struct {
- httpClientConfigFile string
- errMsg string
-}{
- {
- httpClientConfigFile: "testdata/http.conf.bearer-token-and-file-set.bad.yml",
- errMsg: "at most one of bearer_token & bearer_token_file must be configured",
- },
- {
- httpClientConfigFile: "testdata/http.conf.empty.bad.yml",
- errMsg: "at most one of basic_auth, bearer_token & bearer_token_file must be configured",
- },
-}
-
-func TestAuthRoundTrippers(t *testing.T) {
-
- cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
- if err != nil {
- t.Errorf("Error loading HTTP client config: %v", err)
- }
-
- tlsConfig, err := NewTLSConfig(&cfg.TLSConfig)
- if err != nil {
- t.Errorf("Error creating new TLS config: %v", err)
- }
-
- rt := &http.Transport{
- Proxy: http.ProxyURL(cfg.ProxyURL.URL),
- DisableKeepAlives: true,
- TLSClientConfig: tlsConfig,
- }
- req := new(http.Request)
-
- bearerAuthRoundTripper := NewBearerAuthRoundTripper("mysecret", rt)
- bearerAuthRoundTripper.RoundTrip(req)
-
- basicAuthRoundTripper := NewBasicAuthRoundTripper("username", "password", rt)
- basicAuthRoundTripper.RoundTrip(req)
-}
-
-func TestHideHTTPClientConfigSecrets(t *testing.T) {
- c, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
- if err != nil {
- t.Errorf("Error parsing %s: %s", "testdata/http.conf.good.yml", err)
- }
-
- // String method must not reveal authentication credentials.
- s := c.String()
- if strings.Contains(s, "mysecret") {
- t.Fatal("http client config's String method reveals authentication credentials.")
- }
-}
-
-func mustParseURL(u string) *URL {
- parsed, err := url.Parse(u)
- if err != nil {
- panic(err)
- }
- return &URL{URL: parsed}
-}
-
-func TestNewClientFromConfig(t *testing.T) {
- cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
- if err != nil {
- t.Errorf("Error loading HTTP client config: %v", err)
- }
- _, err = NewHTTPClientFromConfig(cfg)
- if err != nil {
- t.Errorf("Error creating new client from config: %v", err)
- }
-}
-
-func TestNewClientFromInvalidConfig(t *testing.T) {
- cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.invalid-bearer-token-file.bad.yml")
- if err != nil {
- t.Errorf("Error loading HTTP client config: %v", err)
- }
- _, err = NewHTTPClientFromConfig(cfg)
- if err == nil {
- t.Error("Expected error creating new client from invalid config but got none")
- }
- if !strings.Contains(err.Error(), "unable to read bearer token file file: open file: no such file or directory") {
- t.Errorf("Expected error with config but got: %s", err.Error())
- }
-}
-
-func TestValidateHTTPConfig(t *testing.T) {
- cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
- if err != nil {
- t.Errorf("Error loading HTTP client config: %v", err)
- }
- err = cfg.Validate()
- if err != nil {
- t.Fatalf("Error validating %s: %s", "testdata/http.conf.good.yml", err)
- }
-}
-
-func TestInvalidHTTPConfigs(t *testing.T) {
- for _, ee := range invalidHTTPClientConfigs {
- _, _, err := LoadHTTPConfigFile(ee.httpClientConfigFile)
- if err == nil {
- t.Error("Expected error with config but got none")
- continue
- }
- if !strings.Contains(err.Error(), ee.errMsg) {
- t.Errorf("Expected error for invalid HTTP client configuration to contain %q but got: %s", ee.errMsg, err)
- }
- }
-}
-
-// LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
-func LoadHTTPConfig(s string) (*HTTPClientConfig, error) {
- cfg := &HTTPClientConfig{}
- err := yaml.Unmarshal([]byte(s), cfg)
- if err != nil {
- return nil, err
- }
- return cfg, nil
-}
-
-// LoadHTTPConfigFile parses the given YAML file into a HTTPClientConfig.
-func LoadHTTPConfigFile(filename string) (*HTTPClientConfig, []byte, error) {
- content, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, nil, err
- }
- cfg, err := LoadHTTPConfig(string(content))
- if err != nil {
- return nil, nil, err
- }
- return cfg, content, nil
-}
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml
deleted file mode 100644
index c613bacb0..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-basic_auth:
- username: username
- password: "mysecret"
-bearer_token: mysecret
-bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml
deleted file mode 100644
index ea2811f7c..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-basic_auth:
- username: username
- password: mysecret
-bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml
deleted file mode 100644
index 46ca63908..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-basic_auth:
- username: username
- password: "mysecret"
-proxy_url: "http://remote.host"
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml
deleted file mode 100644
index 4b1349bf4..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml
+++ /dev/null
@@ -1 +0,0 @@
-bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/testdata/tls_config.cert_no_key.bad.yml b/vendor/github.com/prometheus/common/config/testdata/tls_config.cert_no_key.bad.yml
deleted file mode 100644
index 7dfdc1ead..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/tls_config.cert_no_key.bad.yml
+++ /dev/null
@@ -1 +0,0 @@
-cert_file: somefile
diff --git a/vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml b/vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml
+++ /dev/null
diff --git a/vendor/github.com/prometheus/common/config/testdata/tls_config.insecure.good.yml b/vendor/github.com/prometheus/common/config/testdata/tls_config.insecure.good.yml
deleted file mode 100644
index d054383f1..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/tls_config.insecure.good.yml
+++ /dev/null
@@ -1 +0,0 @@
-insecure_skip_verify: true
diff --git a/vendor/github.com/prometheus/common/config/testdata/tls_config.invalid_field.bad.yml b/vendor/github.com/prometheus/common/config/testdata/tls_config.invalid_field.bad.yml
deleted file mode 100644
index 12cbaac3b..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/tls_config.invalid_field.bad.yml
+++ /dev/null
@@ -1 +0,0 @@
-something_invalid: true
diff --git a/vendor/github.com/prometheus/common/config/testdata/tls_config.key_no_cert.bad.yml b/vendor/github.com/prometheus/common/config/testdata/tls_config.key_no_cert.bad.yml
deleted file mode 100644
index cec045e89..000000000
--- a/vendor/github.com/prometheus/common/config/testdata/tls_config.key_no_cert.bad.yml
+++ /dev/null
@@ -1 +0,0 @@
-key_file: somefile
diff --git a/vendor/github.com/prometheus/common/config/tls_config_test.go b/vendor/github.com/prometheus/common/config/tls_config_test.go
deleted file mode 100644
index e2bd68edb..000000000
--- a/vendor/github.com/prometheus/common/config/tls_config_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package config
-
-import (
- "crypto/tls"
- "io/ioutil"
- "reflect"
- "strings"
- "testing"
-
- "gopkg.in/yaml.v2"
-)
-
-// LoadTLSConfig parses the given YAML file into a tls.Config.
-func LoadTLSConfig(filename string) (*tls.Config, error) {
- content, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, err
- }
- cfg := &TLSConfig{}
- if err = yaml.Unmarshal(content, cfg); err != nil {
- return nil, err
- }
- return NewTLSConfig(cfg)
-}
-
-var expectedTLSConfigs = []struct {
- filename string
- config *tls.Config
-}{
- {
- filename: "tls_config.empty.good.yml",
- config: &tls.Config{},
- }, {
- filename: "tls_config.insecure.good.yml",
- config: &tls.Config{InsecureSkipVerify: true},
- },
-}
-
-func TestValidTLSConfig(t *testing.T) {
- for _, cfg := range expectedTLSConfigs {
- cfg.config.BuildNameToCertificate()
- got, err := LoadTLSConfig("testdata/" + cfg.filename)
- if err != nil {
- t.Errorf("Error parsing %s: %s", cfg.filename, err)
- }
- if !reflect.DeepEqual(*got, *cfg.config) {
- t.Fatalf("%v: unexpected config result: \n\n%v\n expected\n\n%v", cfg.filename, got, cfg.config)
- }
- }
-}
-
-var expectedTLSConfigErrors = []struct {
- filename string
- errMsg string
-}{
- {
- filename: "tls_config.invalid_field.bad.yml",
- errMsg: "unknown fields in",
- }, {
- filename: "tls_config.cert_no_key.bad.yml",
- errMsg: "specified without client key file",
- }, {
- filename: "tls_config.key_no_cert.bad.yml",
- errMsg: "specified without client cert file",
- },
-}
-
-func TestBadTLSConfigs(t *testing.T) {
- for _, ee := range expectedTLSConfigErrors {
- _, err := LoadTLSConfig("testdata/" + ee.filename)
- if err == nil {
- t.Errorf("Expected error parsing %s but got none", ee.filename)
- continue
- }
- if !strings.Contains(err.Error(), ee.errMsg) {
- t.Errorf("Expected error for %s to contain %q but got: %s", ee.filename, ee.errMsg, err)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/expfmt/bench_test.go b/vendor/github.com/prometheus/common/expfmt/bench_test.go
deleted file mode 100644
index e539bfc13..000000000
--- a/vendor/github.com/prometheus/common/expfmt/bench_test.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package expfmt
-
-import (
- "bytes"
- "compress/gzip"
- "io"
- "io/ioutil"
- "testing"
-
- "github.com/matttproud/golang_protobuf_extensions/pbutil"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-var parser TextParser
-
-// Benchmarks to show how much penalty text format parsing actually inflicts.
-//
-// Example results on Linux 3.13.0, Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz, go1.4.
-//
-// BenchmarkParseText 1000 1188535 ns/op 205085 B/op 6135 allocs/op
-// BenchmarkParseTextGzip 1000 1376567 ns/op 246224 B/op 6151 allocs/op
-// BenchmarkParseProto 10000 172790 ns/op 52258 B/op 1160 allocs/op
-// BenchmarkParseProtoGzip 5000 324021 ns/op 94931 B/op 1211 allocs/op
-// BenchmarkParseProtoMap 10000 187946 ns/op 58714 B/op 1203 allocs/op
-//
-// CONCLUSION: The overhead for the map is negligible. Text format needs ~5x more allocations.
-// Without compression, it needs ~7x longer, but with compression (the more relevant scenario),
-// the difference becomes less relevant, only ~4x.
-//
-// The test data contains 248 samples.
-
-// BenchmarkParseText benchmarks the parsing of a text-format scrape into metric
-// family DTOs.
-func BenchmarkParseText(b *testing.B) {
- b.StopTimer()
- data, err := ioutil.ReadFile("testdata/text")
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- if _, err := parser.TextToMetricFamilies(bytes.NewReader(data)); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-// BenchmarkParseTextGzip benchmarks the parsing of a gzipped text-format scrape
-// into metric family DTOs.
-func BenchmarkParseTextGzip(b *testing.B) {
- b.StopTimer()
- data, err := ioutil.ReadFile("testdata/text.gz")
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- in, err := gzip.NewReader(bytes.NewReader(data))
- if err != nil {
- b.Fatal(err)
- }
- if _, err := parser.TextToMetricFamilies(in); err != nil {
- b.Fatal(err)
- }
- }
-}
-
-// BenchmarkParseProto benchmarks the parsing of a protobuf-format scrape into
-// metric family DTOs. Note that this does not build a map of metric families
-// (as the text version does), because it is not required for Prometheus
-// ingestion either. (However, it is required for the text-format parsing, as
-// the metric family might be sprinkled all over the text, while the
-// protobuf-format guarantees bundling at one place.)
-func BenchmarkParseProto(b *testing.B) {
- b.StopTimer()
- data, err := ioutil.ReadFile("testdata/protobuf")
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- family := &dto.MetricFamily{}
- in := bytes.NewReader(data)
- for {
- family.Reset()
- if _, err := pbutil.ReadDelimited(in, family); err != nil {
- if err == io.EOF {
- break
- }
- b.Fatal(err)
- }
- }
- }
-}
-
-// BenchmarkParseProtoGzip is like BenchmarkParseProto above, but parses gzipped
-// protobuf format.
-func BenchmarkParseProtoGzip(b *testing.B) {
- b.StopTimer()
- data, err := ioutil.ReadFile("testdata/protobuf.gz")
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- family := &dto.MetricFamily{}
- in, err := gzip.NewReader(bytes.NewReader(data))
- if err != nil {
- b.Fatal(err)
- }
- for {
- family.Reset()
- if _, err := pbutil.ReadDelimited(in, family); err != nil {
- if err == io.EOF {
- break
- }
- b.Fatal(err)
- }
- }
- }
-}
-
-// BenchmarkParseProtoMap is like BenchmarkParseProto but DOES put the parsed
-// metric family DTOs into a map. This is not happening during Prometheus
-// ingestion. It is just here to measure the overhead of that map creation and
-// separate it from the overhead of the text format parsing.
-func BenchmarkParseProtoMap(b *testing.B) {
- b.StopTimer()
- data, err := ioutil.ReadFile("testdata/protobuf")
- if err != nil {
- b.Fatal(err)
- }
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- families := map[string]*dto.MetricFamily{}
- in := bytes.NewReader(data)
- for {
- family := &dto.MetricFamily{}
- if _, err := pbutil.ReadDelimited(in, family); err != nil {
- if err == io.EOF {
- break
- }
- b.Fatal(err)
- }
- families[family.GetName()] = family
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go
index a7a42d5ef..c092723e8 100644
--- a/vendor/github.com/prometheus/common/expfmt/decode.go
+++ b/vendor/github.com/prometheus/common/expfmt/decode.go
@@ -164,9 +164,9 @@ func (sd *SampleDecoder) Decode(s *model.Vector) error {
}
// ExtractSamples builds a slice of samples from the provided metric
-// families. If an error occurs during sample extraction, it continues to
+// families. If an error occurrs during sample extraction, it continues to
// extract from the remaining metric families. The returned error is the last
-// error that has occured.
+// error that has occurred.
func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) {
var (
all model.Vector
diff --git a/vendor/github.com/prometheus/common/expfmt/decode_test.go b/vendor/github.com/prometheus/common/expfmt/decode_test.go
deleted file mode 100644
index 82c1130c9..000000000
--- a/vendor/github.com/prometheus/common/expfmt/decode_test.go
+++ /dev/null
@@ -1,435 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package expfmt
-
-import (
- "io"
- "net/http"
- "reflect"
- "sort"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
- dto "github.com/prometheus/client_model/go"
-
- "github.com/prometheus/common/model"
-)
-
-func TestTextDecoder(t *testing.T) {
- var (
- ts = model.Now()
- in = `
-# Only a quite simple scenario with two metric families.
-# More complicated tests of the parser itself can be found in the text package.
-# TYPE mf2 counter
-mf2 3
-mf1{label="value1"} -3.14 123456
-mf1{label="value2"} 42
-mf2 4
-`
- out = model.Vector{
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "mf1",
- "label": "value1",
- },
- Value: -3.14,
- Timestamp: 123456,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "mf1",
- "label": "value2",
- },
- Value: 42,
- Timestamp: ts,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "mf2",
- },
- Value: 3,
- Timestamp: ts,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "mf2",
- },
- Value: 4,
- Timestamp: ts,
- },
- }
- )
-
- dec := &SampleDecoder{
- Dec: &textDecoder{r: strings.NewReader(in)},
- Opts: &DecodeOptions{
- Timestamp: ts,
- },
- }
- var all model.Vector
- for {
- var smpls model.Vector
- err := dec.Decode(&smpls)
- if err == io.EOF {
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- all = append(all, smpls...)
- }
- sort.Sort(all)
- sort.Sort(out)
- if !reflect.DeepEqual(all, out) {
- t.Fatalf("output does not match")
- }
-}
-
-func TestProtoDecoder(t *testing.T) {
-
- var testTime = model.Now()
-
- scenarios := []struct {
- in string
- expected model.Vector
- fail bool
- }{
- {
- in: "",
- },
- {
- in: "\x8f\x01\n\rrequest_count\x12\x12Number of requests\x18\x00\"0\n#\n\x0fsome_!abel_name\x12\x10some_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00E\xc0\"6\n)\n\x12another_label_name\x12\x13another_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00U@",
- fail: true,
- },
- {
- in: "\x8f\x01\n\rrequest_count\x12\x12Number of requests\x18\x00\"0\n#\n\x0fsome_label_name\x12\x10some_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00E\xc0\"6\n)\n\x12another_label_name\x12\x13another_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00U@",
- expected: model.Vector{
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- "some_label_name": "some_label_value",
- },
- Value: -42,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- "another_label_name": "another_label_value",
- },
- Value: 84,
- Timestamp: testTime,
- },
- },
- },
- {
- in: "\xb9\x01\n\rrequest_count\x12\x12Number of requests\x18\x02\"O\n#\n\x0fsome_label_name\x12\x10some_label_value\"(\x1a\x12\t\xaeG\xe1z\x14\xae\xef?\x11\x00\x00\x00\x00\x00\x00E\xc0\x1a\x12\t+\x87\x16\xd9\xce\xf7\xef?\x11\x00\x00\x00\x00\x00\x00U\xc0\"A\n)\n\x12another_label_name\x12\x13another_label_value\"\x14\x1a\x12\t\x00\x00\x00\x00\x00\x00\xe0?\x11\x00\x00\x00\x00\x00\x00$@",
- expected: model.Vector{
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count_count",
- "some_label_name": "some_label_value",
- },
- Value: 0,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count_sum",
- "some_label_name": "some_label_value",
- },
- Value: 0,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- "some_label_name": "some_label_value",
- "quantile": "0.99",
- },
- Value: -42,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- "some_label_name": "some_label_value",
- "quantile": "0.999",
- },
- Value: -84,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count_count",
- "another_label_name": "another_label_value",
- },
- Value: 0,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count_sum",
- "another_label_name": "another_label_value",
- },
- Value: 0,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- "another_label_name": "another_label_value",
- "quantile": "0.5",
- },
- Value: 10,
- Timestamp: testTime,
- },
- },
- },
- {
- in: "\x8d\x01\n\x1drequest_duration_microseconds\x12\x15The response latency.\x18\x04\"S:Q\b\x85\x15\x11\xcd\xcc\xccL\x8f\xcb:A\x1a\v\b{\x11\x00\x00\x00\x00\x00\x00Y@\x1a\f\b\x9c\x03\x11\x00\x00\x00\x00\x00\x00^@\x1a\f\b\xd0\x04\x11\x00\x00\x00\x00\x00\x00b@\x1a\f\b\xf4\v\x11\x9a\x99\x99\x99\x99\x99e@\x1a\f\b\x85\x15\x11\x00\x00\x00\x00\x00\x00\xf0\u007f",
- expected: model.Vector{
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_bucket",
- "le": "100",
- },
- Value: 123,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_bucket",
- "le": "120",
- },
- Value: 412,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_bucket",
- "le": "144",
- },
- Value: 592,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_bucket",
- "le": "172.8",
- },
- Value: 1524,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_bucket",
- "le": "+Inf",
- },
- Value: 2693,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_sum",
- },
- Value: 1756047.3,
- Timestamp: testTime,
- },
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_duration_microseconds_count",
- },
- Value: 2693,
- Timestamp: testTime,
- },
- },
- },
- {
- // The metric type is unset in this protobuf, which needs to be handled
- // correctly by the decoder.
- in: "\x1c\n\rrequest_count\"\v\x1a\t\t\x00\x00\x00\x00\x00\x00\xf0?",
- expected: model.Vector{
- &model.Sample{
- Metric: model.Metric{
- model.MetricNameLabel: "request_count",
- },
- Value: 1,
- Timestamp: testTime,
- },
- },
- },
- }
-
- for i, scenario := range scenarios {
- dec := &SampleDecoder{
- Dec: &protoDecoder{r: strings.NewReader(scenario.in)},
- Opts: &DecodeOptions{
- Timestamp: testTime,
- },
- }
-
- var all model.Vector
- for {
- var smpls model.Vector
- err := dec.Decode(&smpls)
- if err == io.EOF {
- break
- }
- if scenario.fail {
- if err == nil {
- t.Fatal("Expected error but got none")
- }
- break
- }
- if err != nil {
- t.Fatal(err)
- }
- all = append(all, smpls...)
- }
- sort.Sort(all)
- sort.Sort(scenario.expected)
- if !reflect.DeepEqual(all, scenario.expected) {
- t.Fatalf("%d. output does not match, want: %#v, got %#v", i, scenario.expected, all)
- }
- }
-}
-
-func testDiscriminatorHTTPHeader(t testing.TB) {
- var scenarios = []struct {
- input map[string]string
- output Format
- err error
- }{
- {
- input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="io.prometheus.client.MetricFamily"; encoding="delimited"`},
- output: FmtProtoDelim,
- },
- {
- input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="illegal"; encoding="delimited"`},
- output: FmtUnknown,
- },
- {
- input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="io.prometheus.client.MetricFamily"; encoding="illegal"`},
- output: FmtUnknown,
- },
- {
- input: map[string]string{"Content-Type": `text/plain; version=0.0.4`},
- output: FmtText,
- },
- {
- input: map[string]string{"Content-Type": `text/plain`},
- output: FmtText,
- },
- {
- input: map[string]string{"Content-Type": `text/plain; version=0.0.3`},
- output: FmtUnknown,
- },
- }
-
- for i, scenario := range scenarios {
- var header http.Header
-
- if len(scenario.input) > 0 {
- header = http.Header{}
- }
-
- for key, value := range scenario.input {
- header.Add(key, value)
- }
-
- actual := ResponseFormat(header)
-
- if scenario.output != actual {
- t.Errorf("%d. expected %s, got %s", i, scenario.output, actual)
- }
- }
-}
-
-func TestDiscriminatorHTTPHeader(t *testing.T) {
- testDiscriminatorHTTPHeader(t)
-}
-
-func BenchmarkDiscriminatorHTTPHeader(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testDiscriminatorHTTPHeader(b)
- }
-}
-
-func TestExtractSamples(t *testing.T) {
- var (
- goodMetricFamily1 = &dto.MetricFamily{
- Name: proto.String("foo"),
- Help: proto.String("Help for foo."),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Counter: &dto.Counter{
- Value: proto.Float64(4711),
- },
- },
- },
- }
- goodMetricFamily2 = &dto.MetricFamily{
- Name: proto.String("bar"),
- Help: proto.String("Help for bar."),
- Type: dto.MetricType_GAUGE.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Gauge: &dto.Gauge{
- Value: proto.Float64(3.14),
- },
- },
- },
- }
- badMetricFamily = &dto.MetricFamily{
- Name: proto.String("bad"),
- Help: proto.String("Help for bad."),
- Type: dto.MetricType(42).Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Gauge: &dto.Gauge{
- Value: proto.Float64(2.7),
- },
- },
- },
- }
-
- opts = &DecodeOptions{
- Timestamp: 42,
- }
- )
-
- got, err := ExtractSamples(opts, goodMetricFamily1, goodMetricFamily2)
- if err != nil {
- t.Error("Unexpected error from ExtractSamples:", err)
- }
- want := model.Vector{
- &model.Sample{Metric: model.Metric{model.MetricNameLabel: "foo"}, Value: 4711, Timestamp: 42},
- &model.Sample{Metric: model.Metric{model.MetricNameLabel: "bar"}, Value: 3.14, Timestamp: 42},
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("unexpected samples extracted, got: %v, want: %v", got, want)
- }
-
- got, err = ExtractSamples(opts, goodMetricFamily1, badMetricFamily, goodMetricFamily2)
- if err == nil {
- t.Error("Expected error from ExtractSamples")
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("unexpected samples extracted, got: %v, want: %v", got, want)
- }
-}
diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go
index 371ac7503..c71bcb981 100644
--- a/vendor/github.com/prometheus/common/expfmt/expfmt.go
+++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go
@@ -26,7 +26,7 @@ const (
// The Content-Type values for the different wire protocols.
FmtUnknown Format = `<unknown>`
- FmtText Format = `text/plain; version=` + TextVersion
+ FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8`
FmtProtoDelim Format = ProtoFmt + ` encoding=delimited`
FmtProtoText Format = ProtoFmt + ` encoding=text`
FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text`
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0
deleted file mode 100644
index 139597f9c..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_1 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_1
deleted file mode 100644
index 2ae870679..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_1
+++ /dev/null
@@ -1,6 +0,0 @@
-
-minimal_metric 1.234
-another_metric -3e3 103948
-# Even that:
-no_labels{} 3
-# HELP line for non-existing metric will be ignored.
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_2 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_2
deleted file mode 100644
index 5c351db36..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_2
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# A normal comment.
-#
-# TYPE name counter
-name{labelname="val1",basename="basevalue"} NaN
-name {labelname="val2",basename="base\"v\\al\nue"} 0.23 1234567890
-# HELP name two-line\n doc str\\ing
-
- # HELP name2 doc str"ing 2
- # TYPE name2 gauge
-name2{labelname="val2" ,basename = "basevalue2" } +Inf 54321
-name2{ labelname = "val1" , }-Inf
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_3 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_3
deleted file mode 100644
index 0b3c345aa..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_3
+++ /dev/null
@@ -1,22 +0,0 @@
-
-# TYPE my_summary summary
-my_summary{n1="val1",quantile="0.5"} 110
-decoy -1 -2
-my_summary{n1="val1",quantile="0.9"} 140 1
-my_summary_count{n1="val1"} 42
-# Latest timestamp wins in case of a summary.
-my_summary_sum{n1="val1"} 4711 2
-fake_sum{n1="val1"} 2001
-# TYPE another_summary summary
-another_summary_count{n2="val2",n1="val1"} 20
-my_summary_count{n2="val2",n1="val1"} 5 5
-another_summary{n1="val1",n2="val2",quantile=".3"} -1.2
-my_summary_sum{n1="val2"} 08 15
-my_summary{n1="val3", quantile="0.2"} 4711
- my_summary{n1="val1",n2="val2",quantile="-12.34",} NaN
-# some
-# funny comments
-# HELP
-# HELP
-# HELP my_summary
-# HELP my_summary
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_4 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_4
deleted file mode 100644
index bde0a387a..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_4
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# HELP request_duration_microseconds The response latency.
-# TYPE request_duration_microseconds histogram
-request_duration_microseconds_bucket{le="100"} 123
-request_duration_microseconds_bucket{le="120"} 412
-request_duration_microseconds_bucket{le="144"} 592
-request_duration_microseconds_bucket{le="172.8"} 1524
-request_duration_microseconds_bucket{le="+Inf"} 2693
-request_duration_microseconds_sum 1.7560473e+06
-request_duration_microseconds_count 2693
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0
deleted file mode 100644
index 4c67f9a19..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0
+++ /dev/null
@@ -1 +0,0 @@
-bla 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_1 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_1
deleted file mode 100644
index b853478ee..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_1
+++ /dev/null
@@ -1 +0,0 @@
-metric{label="\t"} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_10 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_10
deleted file mode 100644
index b5fe5f5a6..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_10
+++ /dev/null
@@ -1 +0,0 @@
-metric{label="bla"} 3.14 2 3
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11
deleted file mode 100644
index 57c7fbc0b..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11
+++ /dev/null
@@ -1 +0,0 @@
-metric{label="bla"} blubb
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_12 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_12
deleted file mode 100644
index 0a9df79a1..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_12
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# HELP metric one
-# HELP metric two
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_13 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_13
deleted file mode 100644
index 5bc742781..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_13
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# TYPE metric counter
-# TYPE metric untyped
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_14 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_14
deleted file mode 100644
index a9a24265b..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_14
+++ /dev/null
@@ -1,3 +0,0 @@
-
-metric 4.12
-# TYPE metric counter
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_15 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_15
deleted file mode 100644
index 7e95ca8f4..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_15
+++ /dev/null
@@ -1,2 +0,0 @@
-
-# TYPE metric bla
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_16 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_16
deleted file mode 100644
index 7825f8887..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_16
+++ /dev/null
@@ -1,2 +0,0 @@
-
-# TYPE met-ric
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_17 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_17
deleted file mode 100644
index 8f35cae0c..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_17
+++ /dev/null
@@ -1 +0,0 @@
-@invalidmetric{label="bla"} 3.14 2 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_18 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_18
deleted file mode 100644
index 7ca2cc268..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_18
+++ /dev/null
@@ -1 +0,0 @@
-{label="bla"} 3.14 2 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_19 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_19
deleted file mode 100644
index 7a6ccc0dd..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_19
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# TYPE metric histogram
-metric_bucket{le="bla"} 3.14
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2
deleted file mode 100644
index 726d0017c..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2
+++ /dev/null
@@ -1,3 +0,0 @@
-
-metric{label="new
-line"} 3.14
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3
deleted file mode 100644
index 6aa9e3081..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3
+++ /dev/null
@@ -1 +0,0 @@
-metric{@="bla"} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_4 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_4
deleted file mode 100644
index d112cb902..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_4
+++ /dev/null
@@ -1 +0,0 @@
-metric{__name__="bla"} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_5 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_5
deleted file mode 100644
index b34554a8d..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_5
+++ /dev/null
@@ -1 +0,0 @@
-metric{label+="bla"} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_6 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_6
deleted file mode 100644
index c4d7df3d1..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_6
+++ /dev/null
@@ -1 +0,0 @@
-metric{label=bla} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_7 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_7
deleted file mode 100644
index 97eafc4a6..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_7
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# TYPE metric summary
-metric{quantile="bla"} 3.14
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_8 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_8
deleted file mode 100644
index fc706496b..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_8
+++ /dev/null
@@ -1 +0,0 @@
-metric{label="bla"+} 3.14 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_9 b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_9
deleted file mode 100644
index 57b4879c0..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_9
+++ /dev/null
@@ -1 +0,0 @@
-metric{label="bla"} 3.14 2.72
diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/minimal b/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/minimal
deleted file mode 100644
index be1e6a369..000000000
--- a/vendor/github.com/prometheus/common/expfmt/fuzz/corpus/minimal
+++ /dev/null
@@ -1 +0,0 @@
-m{} 0
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/json2 b/vendor/github.com/prometheus/common/expfmt/testdata/json2
deleted file mode 100644
index b914c9386..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/json2
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "baseLabels": {
- "__name__": "rpc_calls_total",
- "job": "batch_job"
- },
- "docstring": "RPC calls.",
- "metric": {
- "type": "counter",
- "value": [
- {
- "labels": {
- "service": "zed"
- },
- "value": 25
- },
- {
- "labels": {
- "service": "bar"
- },
- "value": 24
- }
- ]
- }
- },
- {
- "baseLabels": {
- "__name__": "rpc_latency_microseconds"
- },
- "docstring": "RPC latency.",
- "metric": {
- "type": "histogram",
- "value": [
- {
- "labels": {
- "service": "foo"
- },
- "value": {
- "0.010000": 15,
- "0.990000": 17
- }
- }
- ]
- }
- }
-]
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/json2_bad b/vendor/github.com/prometheus/common/expfmt/testdata/json2_bad
deleted file mode 100644
index cc6ac97c5..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/json2_bad
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "baseLabels": {
- "__name__": "rpc_calls_total",
- "job": "batch_job"
- },
- "docstring": "RPC calls.",
- "metric": {
- "type": "counter",
- "value": [
- {
- "labels": {
- "servic|e": "zed"
- },
- "value": 25
- },
- {
- "labels": {
- "service": "bar"
- },
- "value": 24
- }
- ]
- }
- },
- {
- "baseLabels": {
- "__name__": "rpc_latency_microseconds"
- },
- "docstring": "RPC latency.",
- "metric": {
- "type": "histogram",
- "value": [
- {
- "labels": {
- "service": "foo"
- },
- "value": {
- "0.010000": 15,
- "0.990000": 17
- }
- }
- ]
- }
- }
-]
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf b/vendor/github.com/prometheus/common/expfmt/testdata/protobuf
deleted file mode 100644
index b2d018a7c..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gz b/vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gz
deleted file mode 100644
index 7622adb1c..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gz
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/text b/vendor/github.com/prometheus/common/expfmt/testdata/text
deleted file mode 100644
index f3d8c3784..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/text
+++ /dev/null
@@ -1,322 +0,0 @@
-# HELP http_request_duration_microseconds The HTTP request latencies in microseconds.
-# TYPE http_request_duration_microseconds summary
-http_request_duration_microseconds{handler="/",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/"} 0
-http_request_duration_microseconds_count{handler="/"} 0
-http_request_duration_microseconds{handler="/alerts",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/alerts",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/alerts",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/alerts"} 0
-http_request_duration_microseconds_count{handler="/alerts"} 0
-http_request_duration_microseconds{handler="/api/metrics",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/api/metrics",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/api/metrics",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/api/metrics"} 0
-http_request_duration_microseconds_count{handler="/api/metrics"} 0
-http_request_duration_microseconds{handler="/api/query",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/api/query",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/api/query",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/api/query"} 0
-http_request_duration_microseconds_count{handler="/api/query"} 0
-http_request_duration_microseconds{handler="/api/query_range",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/api/query_range",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/api/query_range",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/api/query_range"} 0
-http_request_duration_microseconds_count{handler="/api/query_range"} 0
-http_request_duration_microseconds{handler="/api/targets",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/api/targets",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/api/targets",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/api/targets"} 0
-http_request_duration_microseconds_count{handler="/api/targets"} 0
-http_request_duration_microseconds{handler="/consoles/",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/consoles/",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/consoles/",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/consoles/"} 0
-http_request_duration_microseconds_count{handler="/consoles/"} 0
-http_request_duration_microseconds{handler="/graph",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/graph",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/graph",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/graph"} 0
-http_request_duration_microseconds_count{handler="/graph"} 0
-http_request_duration_microseconds{handler="/heap",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/heap",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/heap",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/heap"} 0
-http_request_duration_microseconds_count{handler="/heap"} 0
-http_request_duration_microseconds{handler="/static/",quantile="0.5"} 0
-http_request_duration_microseconds{handler="/static/",quantile="0.9"} 0
-http_request_duration_microseconds{handler="/static/",quantile="0.99"} 0
-http_request_duration_microseconds_sum{handler="/static/"} 0
-http_request_duration_microseconds_count{handler="/static/"} 0
-http_request_duration_microseconds{handler="prometheus",quantile="0.5"} 1307.275
-http_request_duration_microseconds{handler="prometheus",quantile="0.9"} 1858.632
-http_request_duration_microseconds{handler="prometheus",quantile="0.99"} 3087.384
-http_request_duration_microseconds_sum{handler="prometheus"} 179886.5000000001
-http_request_duration_microseconds_count{handler="prometheus"} 119
-# HELP http_request_size_bytes The HTTP request sizes in bytes.
-# TYPE http_request_size_bytes summary
-http_request_size_bytes{handler="/",quantile="0.5"} 0
-http_request_size_bytes{handler="/",quantile="0.9"} 0
-http_request_size_bytes{handler="/",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/"} 0
-http_request_size_bytes_count{handler="/"} 0
-http_request_size_bytes{handler="/alerts",quantile="0.5"} 0
-http_request_size_bytes{handler="/alerts",quantile="0.9"} 0
-http_request_size_bytes{handler="/alerts",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/alerts"} 0
-http_request_size_bytes_count{handler="/alerts"} 0
-http_request_size_bytes{handler="/api/metrics",quantile="0.5"} 0
-http_request_size_bytes{handler="/api/metrics",quantile="0.9"} 0
-http_request_size_bytes{handler="/api/metrics",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/api/metrics"} 0
-http_request_size_bytes_count{handler="/api/metrics"} 0
-http_request_size_bytes{handler="/api/query",quantile="0.5"} 0
-http_request_size_bytes{handler="/api/query",quantile="0.9"} 0
-http_request_size_bytes{handler="/api/query",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/api/query"} 0
-http_request_size_bytes_count{handler="/api/query"} 0
-http_request_size_bytes{handler="/api/query_range",quantile="0.5"} 0
-http_request_size_bytes{handler="/api/query_range",quantile="0.9"} 0
-http_request_size_bytes{handler="/api/query_range",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/api/query_range"} 0
-http_request_size_bytes_count{handler="/api/query_range"} 0
-http_request_size_bytes{handler="/api/targets",quantile="0.5"} 0
-http_request_size_bytes{handler="/api/targets",quantile="0.9"} 0
-http_request_size_bytes{handler="/api/targets",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/api/targets"} 0
-http_request_size_bytes_count{handler="/api/targets"} 0
-http_request_size_bytes{handler="/consoles/",quantile="0.5"} 0
-http_request_size_bytes{handler="/consoles/",quantile="0.9"} 0
-http_request_size_bytes{handler="/consoles/",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/consoles/"} 0
-http_request_size_bytes_count{handler="/consoles/"} 0
-http_request_size_bytes{handler="/graph",quantile="0.5"} 0
-http_request_size_bytes{handler="/graph",quantile="0.9"} 0
-http_request_size_bytes{handler="/graph",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/graph"} 0
-http_request_size_bytes_count{handler="/graph"} 0
-http_request_size_bytes{handler="/heap",quantile="0.5"} 0
-http_request_size_bytes{handler="/heap",quantile="0.9"} 0
-http_request_size_bytes{handler="/heap",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/heap"} 0
-http_request_size_bytes_count{handler="/heap"} 0
-http_request_size_bytes{handler="/static/",quantile="0.5"} 0
-http_request_size_bytes{handler="/static/",quantile="0.9"} 0
-http_request_size_bytes{handler="/static/",quantile="0.99"} 0
-http_request_size_bytes_sum{handler="/static/"} 0
-http_request_size_bytes_count{handler="/static/"} 0
-http_request_size_bytes{handler="prometheus",quantile="0.5"} 291
-http_request_size_bytes{handler="prometheus",quantile="0.9"} 291
-http_request_size_bytes{handler="prometheus",quantile="0.99"} 291
-http_request_size_bytes_sum{handler="prometheus"} 34488
-http_request_size_bytes_count{handler="prometheus"} 119
-# HELP http_requests_total Total number of HTTP requests made.
-# TYPE http_requests_total counter
-http_requests_total{code="200",handler="prometheus",method="get"} 119
-# HELP http_response_size_bytes The HTTP response sizes in bytes.
-# TYPE http_response_size_bytes summary
-http_response_size_bytes{handler="/",quantile="0.5"} 0
-http_response_size_bytes{handler="/",quantile="0.9"} 0
-http_response_size_bytes{handler="/",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/"} 0
-http_response_size_bytes_count{handler="/"} 0
-http_response_size_bytes{handler="/alerts",quantile="0.5"} 0
-http_response_size_bytes{handler="/alerts",quantile="0.9"} 0
-http_response_size_bytes{handler="/alerts",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/alerts"} 0
-http_response_size_bytes_count{handler="/alerts"} 0
-http_response_size_bytes{handler="/api/metrics",quantile="0.5"} 0
-http_response_size_bytes{handler="/api/metrics",quantile="0.9"} 0
-http_response_size_bytes{handler="/api/metrics",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/api/metrics"} 0
-http_response_size_bytes_count{handler="/api/metrics"} 0
-http_response_size_bytes{handler="/api/query",quantile="0.5"} 0
-http_response_size_bytes{handler="/api/query",quantile="0.9"} 0
-http_response_size_bytes{handler="/api/query",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/api/query"} 0
-http_response_size_bytes_count{handler="/api/query"} 0
-http_response_size_bytes{handler="/api/query_range",quantile="0.5"} 0
-http_response_size_bytes{handler="/api/query_range",quantile="0.9"} 0
-http_response_size_bytes{handler="/api/query_range",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/api/query_range"} 0
-http_response_size_bytes_count{handler="/api/query_range"} 0
-http_response_size_bytes{handler="/api/targets",quantile="0.5"} 0
-http_response_size_bytes{handler="/api/targets",quantile="0.9"} 0
-http_response_size_bytes{handler="/api/targets",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/api/targets"} 0
-http_response_size_bytes_count{handler="/api/targets"} 0
-http_response_size_bytes{handler="/consoles/",quantile="0.5"} 0
-http_response_size_bytes{handler="/consoles/",quantile="0.9"} 0
-http_response_size_bytes{handler="/consoles/",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/consoles/"} 0
-http_response_size_bytes_count{handler="/consoles/"} 0
-http_response_size_bytes{handler="/graph",quantile="0.5"} 0
-http_response_size_bytes{handler="/graph",quantile="0.9"} 0
-http_response_size_bytes{handler="/graph",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/graph"} 0
-http_response_size_bytes_count{handler="/graph"} 0
-http_response_size_bytes{handler="/heap",quantile="0.5"} 0
-http_response_size_bytes{handler="/heap",quantile="0.9"} 0
-http_response_size_bytes{handler="/heap",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/heap"} 0
-http_response_size_bytes_count{handler="/heap"} 0
-http_response_size_bytes{handler="/static/",quantile="0.5"} 0
-http_response_size_bytes{handler="/static/",quantile="0.9"} 0
-http_response_size_bytes{handler="/static/",quantile="0.99"} 0
-http_response_size_bytes_sum{handler="/static/"} 0
-http_response_size_bytes_count{handler="/static/"} 0
-http_response_size_bytes{handler="prometheus",quantile="0.5"} 2049
-http_response_size_bytes{handler="prometheus",quantile="0.9"} 2058
-http_response_size_bytes{handler="prometheus",quantile="0.99"} 2064
-http_response_size_bytes_sum{handler="prometheus"} 247001
-http_response_size_bytes_count{handler="prometheus"} 119
-# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
-# TYPE process_cpu_seconds_total counter
-process_cpu_seconds_total 0.55
-# HELP go_goroutines Number of goroutines that currently exist.
-# TYPE go_goroutines gauge
-go_goroutines 70
-# HELP process_max_fds Maximum number of open file descriptors.
-# TYPE process_max_fds gauge
-process_max_fds 8192
-# HELP process_open_fds Number of open file descriptors.
-# TYPE process_open_fds gauge
-process_open_fds 29
-# HELP process_resident_memory_bytes Resident memory size in bytes.
-# TYPE process_resident_memory_bytes gauge
-process_resident_memory_bytes 5.3870592e+07
-# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
-# TYPE process_start_time_seconds gauge
-process_start_time_seconds 1.42236894836e+09
-# HELP process_virtual_memory_bytes Virtual memory size in bytes.
-# TYPE process_virtual_memory_bytes gauge
-process_virtual_memory_bytes 5.41478912e+08
-# HELP prometheus_dns_sd_lookup_failures_total The number of DNS-SD lookup failures.
-# TYPE prometheus_dns_sd_lookup_failures_total counter
-prometheus_dns_sd_lookup_failures_total 0
-# HELP prometheus_dns_sd_lookups_total The number of DNS-SD lookups.
-# TYPE prometheus_dns_sd_lookups_total counter
-prometheus_dns_sd_lookups_total 7
-# HELP prometheus_evaluator_duration_milliseconds The duration for all evaluations to execute.
-# TYPE prometheus_evaluator_duration_milliseconds summary
-prometheus_evaluator_duration_milliseconds{quantile="0.01"} 0
-prometheus_evaluator_duration_milliseconds{quantile="0.05"} 0
-prometheus_evaluator_duration_milliseconds{quantile="0.5"} 0
-prometheus_evaluator_duration_milliseconds{quantile="0.9"} 1
-prometheus_evaluator_duration_milliseconds{quantile="0.99"} 1
-prometheus_evaluator_duration_milliseconds_sum 12
-prometheus_evaluator_duration_milliseconds_count 23
-# HELP prometheus_local_storage_checkpoint_duration_milliseconds The duration (in milliseconds) it took to checkpoint in-memory metrics and head chunks.
-# TYPE prometheus_local_storage_checkpoint_duration_milliseconds gauge
-prometheus_local_storage_checkpoint_duration_milliseconds 0
-# HELP prometheus_local_storage_chunk_ops_total The total number of chunk operations by their type.
-# TYPE prometheus_local_storage_chunk_ops_total counter
-prometheus_local_storage_chunk_ops_total{type="create"} 598
-prometheus_local_storage_chunk_ops_total{type="persist"} 174
-prometheus_local_storage_chunk_ops_total{type="pin"} 920
-prometheus_local_storage_chunk_ops_total{type="transcode"} 415
-prometheus_local_storage_chunk_ops_total{type="unpin"} 920
-# HELP prometheus_local_storage_indexing_batch_latency_milliseconds Quantiles for batch indexing latencies in milliseconds.
-# TYPE prometheus_local_storage_indexing_batch_latency_milliseconds summary
-prometheus_local_storage_indexing_batch_latency_milliseconds{quantile="0.5"} 0
-prometheus_local_storage_indexing_batch_latency_milliseconds{quantile="0.9"} 0
-prometheus_local_storage_indexing_batch_latency_milliseconds{quantile="0.99"} 0
-prometheus_local_storage_indexing_batch_latency_milliseconds_sum 0
-prometheus_local_storage_indexing_batch_latency_milliseconds_count 1
-# HELP prometheus_local_storage_indexing_batch_sizes Quantiles for indexing batch sizes (number of metrics per batch).
-# TYPE prometheus_local_storage_indexing_batch_sizes summary
-prometheus_local_storage_indexing_batch_sizes{quantile="0.5"} 2
-prometheus_local_storage_indexing_batch_sizes{quantile="0.9"} 2
-prometheus_local_storage_indexing_batch_sizes{quantile="0.99"} 2
-prometheus_local_storage_indexing_batch_sizes_sum 2
-prometheus_local_storage_indexing_batch_sizes_count 1
-# HELP prometheus_local_storage_indexing_queue_capacity The capacity of the indexing queue.
-# TYPE prometheus_local_storage_indexing_queue_capacity gauge
-prometheus_local_storage_indexing_queue_capacity 16384
-# HELP prometheus_local_storage_indexing_queue_length The number of metrics waiting to be indexed.
-# TYPE prometheus_local_storage_indexing_queue_length gauge
-prometheus_local_storage_indexing_queue_length 0
-# HELP prometheus_local_storage_ingested_samples_total The total number of samples ingested.
-# TYPE prometheus_local_storage_ingested_samples_total counter
-prometheus_local_storage_ingested_samples_total 30473
-# HELP prometheus_local_storage_invalid_preload_requests_total The total number of preload requests referring to a non-existent series. This is an indication of outdated label indexes.
-# TYPE prometheus_local_storage_invalid_preload_requests_total counter
-prometheus_local_storage_invalid_preload_requests_total 0
-# HELP prometheus_local_storage_memory_chunkdescs The current number of chunk descriptors in memory.
-# TYPE prometheus_local_storage_memory_chunkdescs gauge
-prometheus_local_storage_memory_chunkdescs 1059
-# HELP prometheus_local_storage_memory_chunks The current number of chunks in memory, excluding cloned chunks (i.e. chunks without a descriptor).
-# TYPE prometheus_local_storage_memory_chunks gauge
-prometheus_local_storage_memory_chunks 1020
-# HELP prometheus_local_storage_memory_series The current number of series in memory.
-# TYPE prometheus_local_storage_memory_series gauge
-prometheus_local_storage_memory_series 424
-# HELP prometheus_local_storage_persist_latency_microseconds A summary of latencies for persisting each chunk.
-# TYPE prometheus_local_storage_persist_latency_microseconds summary
-prometheus_local_storage_persist_latency_microseconds{quantile="0.5"} 30.377
-prometheus_local_storage_persist_latency_microseconds{quantile="0.9"} 203.539
-prometheus_local_storage_persist_latency_microseconds{quantile="0.99"} 2626.463
-prometheus_local_storage_persist_latency_microseconds_sum 20424.415
-prometheus_local_storage_persist_latency_microseconds_count 174
-# HELP prometheus_local_storage_persist_queue_capacity The total capacity of the persist queue.
-# TYPE prometheus_local_storage_persist_queue_capacity gauge
-prometheus_local_storage_persist_queue_capacity 1024
-# HELP prometheus_local_storage_persist_queue_length The current number of chunks waiting in the persist queue.
-# TYPE prometheus_local_storage_persist_queue_length gauge
-prometheus_local_storage_persist_queue_length 0
-# HELP prometheus_local_storage_series_ops_total The total number of series operations by their type.
-# TYPE prometheus_local_storage_series_ops_total counter
-prometheus_local_storage_series_ops_total{type="create"} 2
-prometheus_local_storage_series_ops_total{type="maintenance_in_memory"} 11
-# HELP prometheus_notifications_latency_milliseconds Latency quantiles for sending alert notifications (not including dropped notifications).
-# TYPE prometheus_notifications_latency_milliseconds summary
-prometheus_notifications_latency_milliseconds{quantile="0.5"} 0
-prometheus_notifications_latency_milliseconds{quantile="0.9"} 0
-prometheus_notifications_latency_milliseconds{quantile="0.99"} 0
-prometheus_notifications_latency_milliseconds_sum 0
-prometheus_notifications_latency_milliseconds_count 0
-# HELP prometheus_notifications_queue_capacity The capacity of the alert notifications queue.
-# TYPE prometheus_notifications_queue_capacity gauge
-prometheus_notifications_queue_capacity 100
-# HELP prometheus_notifications_queue_length The number of alert notifications in the queue.
-# TYPE prometheus_notifications_queue_length gauge
-prometheus_notifications_queue_length 0
-# HELP prometheus_rule_evaluation_duration_milliseconds The duration for a rule to execute.
-# TYPE prometheus_rule_evaluation_duration_milliseconds summary
-prometheus_rule_evaluation_duration_milliseconds{rule_type="alerting",quantile="0.5"} 0
-prometheus_rule_evaluation_duration_milliseconds{rule_type="alerting",quantile="0.9"} 0
-prometheus_rule_evaluation_duration_milliseconds{rule_type="alerting",quantile="0.99"} 2
-prometheus_rule_evaluation_duration_milliseconds_sum{rule_type="alerting"} 12
-prometheus_rule_evaluation_duration_milliseconds_count{rule_type="alerting"} 115
-prometheus_rule_evaluation_duration_milliseconds{rule_type="recording",quantile="0.5"} 0
-prometheus_rule_evaluation_duration_milliseconds{rule_type="recording",quantile="0.9"} 0
-prometheus_rule_evaluation_duration_milliseconds{rule_type="recording",quantile="0.99"} 3
-prometheus_rule_evaluation_duration_milliseconds_sum{rule_type="recording"} 15
-prometheus_rule_evaluation_duration_milliseconds_count{rule_type="recording"} 115
-# HELP prometheus_rule_evaluation_failures_total The total number of rule evaluation failures.
-# TYPE prometheus_rule_evaluation_failures_total counter
-prometheus_rule_evaluation_failures_total 0
-# HELP prometheus_samples_queue_capacity Capacity of the queue for unwritten samples.
-# TYPE prometheus_samples_queue_capacity gauge
-prometheus_samples_queue_capacity 4096
-# HELP prometheus_samples_queue_length Current number of items in the queue for unwritten samples. Each item comprises all samples exposed by one target as one metric family (i.e. metrics of the same name).
-# TYPE prometheus_samples_queue_length gauge
-prometheus_samples_queue_length 0
-# HELP prometheus_target_interval_length_seconds Actual intervals between scrapes.
-# TYPE prometheus_target_interval_length_seconds summary
-prometheus_target_interval_length_seconds{interval="15s",quantile="0.01"} 14
-prometheus_target_interval_length_seconds{interval="15s",quantile="0.05"} 14
-prometheus_target_interval_length_seconds{interval="15s",quantile="0.5"} 15
-prometheus_target_interval_length_seconds{interval="15s",quantile="0.9"} 15
-prometheus_target_interval_length_seconds{interval="15s",quantile="0.99"} 15
-prometheus_target_interval_length_seconds_sum{interval="15s"} 175
-prometheus_target_interval_length_seconds_count{interval="15s"} 12
-prometheus_target_interval_length_seconds{interval="1s",quantile="0.01"} 0
-prometheus_target_interval_length_seconds{interval="1s",quantile="0.05"} 0
-prometheus_target_interval_length_seconds{interval="1s",quantile="0.5"} 0
-prometheus_target_interval_length_seconds{interval="1s",quantile="0.9"} 1
-prometheus_target_interval_length_seconds{interval="1s",quantile="0.99"} 1
-prometheus_target_interval_length_seconds_sum{interval="1s"} 55
-prometheus_target_interval_length_seconds_count{interval="1s"} 117
diff --git a/vendor/github.com/prometheus/common/expfmt/testdata/text.gz b/vendor/github.com/prometheus/common/expfmt/testdata/text.gz
deleted file mode 100644
index b7658c84d..000000000
--- a/vendor/github.com/prometheus/common/expfmt/testdata/text.gz
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/prometheus/common/expfmt/text_create_test.go b/vendor/github.com/prometheus/common/expfmt/text_create_test.go
deleted file mode 100644
index e4cc5d803..000000000
--- a/vendor/github.com/prometheus/common/expfmt/text_create_test.go
+++ /dev/null
@@ -1,443 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package expfmt
-
-import (
- "bytes"
- "math"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- dto "github.com/prometheus/client_model/go"
-)
-
-func testCreate(t testing.TB) {
- var scenarios = []struct {
- in *dto.MetricFamily
- out string
- }{
- // 0: Counter, NaN as value, timestamp given.
- {
- in: &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("two-line\n doc str\\ing"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val1"),
- },
- &dto.LabelPair{
- Name: proto.String("basename"),
- Value: proto.String("basevalue"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(math.NaN()),
- },
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val2"),
- },
- &dto.LabelPair{
- Name: proto.String("basename"),
- Value: proto.String("basevalue"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(.23),
- },
- TimestampMs: proto.Int64(1234567890),
- },
- },
- },
- out: `# HELP name two-line\n doc str\\ing
-# TYPE name counter
-name{labelname="val1",basename="basevalue"} NaN
-name{labelname="val2",basename="basevalue"} 0.23 1234567890
-`,
- },
- // 1: Gauge, some escaping required, +Inf as value, multi-byte characters in label values.
- {
- in: &dto.MetricFamily{
- Name: proto.String("gauge_name"),
- Help: proto.String("gauge\ndoc\nstr\"ing"),
- Type: dto.MetricType_GAUGE.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("name_1"),
- Value: proto.String("val with\nnew line"),
- },
- &dto.LabelPair{
- Name: proto.String("name_2"),
- Value: proto.String("val with \\backslash and \"quotes\""),
- },
- },
- Gauge: &dto.Gauge{
- Value: proto.Float64(math.Inf(+1)),
- },
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("name_1"),
- Value: proto.String("Björn"),
- },
- &dto.LabelPair{
- Name: proto.String("name_2"),
- Value: proto.String("ä½–ä½¥"),
- },
- },
- Gauge: &dto.Gauge{
- Value: proto.Float64(3.14E42),
- },
- },
- },
- },
- out: `# HELP gauge_name gauge\ndoc\nstr"ing
-# TYPE gauge_name gauge
-gauge_name{name_1="val with\nnew line",name_2="val with \\backslash and \"quotes\""} +Inf
-gauge_name{name_1="Björn",name_2="佖佥"} 3.14e+42
-`,
- },
- // 2: Untyped, no help, one sample with no labels and -Inf as value, another sample with one label.
- {
- in: &dto.MetricFamily{
- Name: proto.String("untyped_name"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(math.Inf(-1)),
- },
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("name_1"),
- Value: proto.String("value 1"),
- },
- },
- Untyped: &dto.Untyped{
- Value: proto.Float64(-1.23e-45),
- },
- },
- },
- },
- out: `# TYPE untyped_name untyped
-untyped_name -Inf
-untyped_name{name_1="value 1"} -1.23e-45
-`,
- },
- // 3: Summary.
- {
- in: &dto.MetricFamily{
- Name: proto.String("summary_name"),
- Help: proto.String("summary docstring"),
- Type: dto.MetricType_SUMMARY.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Summary: &dto.Summary{
- SampleCount: proto.Uint64(42),
- SampleSum: proto.Float64(-3.4567),
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(0.5),
- Value: proto.Float64(-1.23),
- },
- &dto.Quantile{
- Quantile: proto.Float64(0.9),
- Value: proto.Float64(.2342354),
- },
- &dto.Quantile{
- Quantile: proto.Float64(0.99),
- Value: proto.Float64(0),
- },
- },
- },
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("name_1"),
- Value: proto.String("value 1"),
- },
- &dto.LabelPair{
- Name: proto.String("name_2"),
- Value: proto.String("value 2"),
- },
- },
- Summary: &dto.Summary{
- SampleCount: proto.Uint64(4711),
- SampleSum: proto.Float64(2010.1971),
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(0.5),
- Value: proto.Float64(1),
- },
- &dto.Quantile{
- Quantile: proto.Float64(0.9),
- Value: proto.Float64(2),
- },
- &dto.Quantile{
- Quantile: proto.Float64(0.99),
- Value: proto.Float64(3),
- },
- },
- },
- },
- },
- },
- out: `# HELP summary_name summary docstring
-# TYPE summary_name summary
-summary_name{quantile="0.5"} -1.23
-summary_name{quantile="0.9"} 0.2342354
-summary_name{quantile="0.99"} 0
-summary_name_sum -3.4567
-summary_name_count 42
-summary_name{name_1="value 1",name_2="value 2",quantile="0.5"} 1
-summary_name{name_1="value 1",name_2="value 2",quantile="0.9"} 2
-summary_name{name_1="value 1",name_2="value 2",quantile="0.99"} 3
-summary_name_sum{name_1="value 1",name_2="value 2"} 2010.1971
-summary_name_count{name_1="value 1",name_2="value 2"} 4711
-`,
- },
- // 4: Histogram
- {
- in: &dto.MetricFamily{
- Name: proto.String("request_duration_microseconds"),
- Help: proto.String("The response latency."),
- Type: dto.MetricType_HISTOGRAM.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Histogram: &dto.Histogram{
- SampleCount: proto.Uint64(2693),
- SampleSum: proto.Float64(1756047.3),
- Bucket: []*dto.Bucket{
- &dto.Bucket{
- UpperBound: proto.Float64(100),
- CumulativeCount: proto.Uint64(123),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(120),
- CumulativeCount: proto.Uint64(412),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(144),
- CumulativeCount: proto.Uint64(592),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(172.8),
- CumulativeCount: proto.Uint64(1524),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(math.Inf(+1)),
- CumulativeCount: proto.Uint64(2693),
- },
- },
- },
- },
- },
- },
- out: `# HELP request_duration_microseconds The response latency.
-# TYPE request_duration_microseconds histogram
-request_duration_microseconds_bucket{le="100"} 123
-request_duration_microseconds_bucket{le="120"} 412
-request_duration_microseconds_bucket{le="144"} 592
-request_duration_microseconds_bucket{le="172.8"} 1524
-request_duration_microseconds_bucket{le="+Inf"} 2693
-request_duration_microseconds_sum 1.7560473e+06
-request_duration_microseconds_count 2693
-`,
- },
- // 5: Histogram with missing +Inf bucket.
- {
- in: &dto.MetricFamily{
- Name: proto.String("request_duration_microseconds"),
- Help: proto.String("The response latency."),
- Type: dto.MetricType_HISTOGRAM.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Histogram: &dto.Histogram{
- SampleCount: proto.Uint64(2693),
- SampleSum: proto.Float64(1756047.3),
- Bucket: []*dto.Bucket{
- &dto.Bucket{
- UpperBound: proto.Float64(100),
- CumulativeCount: proto.Uint64(123),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(120),
- CumulativeCount: proto.Uint64(412),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(144),
- CumulativeCount: proto.Uint64(592),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(172.8),
- CumulativeCount: proto.Uint64(1524),
- },
- },
- },
- },
- },
- },
- out: `# HELP request_duration_microseconds The response latency.
-# TYPE request_duration_microseconds histogram
-request_duration_microseconds_bucket{le="100"} 123
-request_duration_microseconds_bucket{le="120"} 412
-request_duration_microseconds_bucket{le="144"} 592
-request_duration_microseconds_bucket{le="172.8"} 1524
-request_duration_microseconds_bucket{le="+Inf"} 2693
-request_duration_microseconds_sum 1.7560473e+06
-request_duration_microseconds_count 2693
-`,
- },
- // 6: No metric type, should result in default type Counter.
- {
- in: &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("doc string"),
- Metric: []*dto.Metric{
- &dto.Metric{
- Counter: &dto.Counter{
- Value: proto.Float64(math.Inf(-1)),
- },
- },
- },
- },
- out: `# HELP name doc string
-# TYPE name counter
-name -Inf
-`,
- },
- }
-
- for i, scenario := range scenarios {
- out := bytes.NewBuffer(make([]byte, 0, len(scenario.out)))
- n, err := MetricFamilyToText(out, scenario.in)
- if err != nil {
- t.Errorf("%d. error: %s", i, err)
- continue
- }
- if expected, got := len(scenario.out), n; expected != got {
- t.Errorf(
- "%d. expected %d bytes written, got %d",
- i, expected, got,
- )
- }
- if expected, got := scenario.out, out.String(); expected != got {
- t.Errorf(
- "%d. expected out=%q, got %q",
- i, expected, got,
- )
- }
- }
-
-}
-
-func TestCreate(t *testing.T) {
- testCreate(t)
-}
-
-func BenchmarkCreate(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testCreate(b)
- }
-}
-
-func testCreateError(t testing.TB) {
- var scenarios = []struct {
- in *dto.MetricFamily
- err string
- }{
- // 0: No metric.
- {
- in: &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("doc string"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{},
- },
- err: "MetricFamily has no metrics",
- },
- // 1: No metric name.
- {
- in: &dto.MetricFamily{
- Help: proto.String("doc string"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(math.Inf(-1)),
- },
- },
- },
- },
- err: "MetricFamily has no name",
- },
- // 2: Wrong type.
- {
- in: &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("doc string"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(math.Inf(-1)),
- },
- },
- },
- },
- err: "expected counter in metric",
- },
- }
-
- for i, scenario := range scenarios {
- var out bytes.Buffer
- _, err := MetricFamilyToText(&out, scenario.in)
- if err == nil {
- t.Errorf("%d. expected error, got nil", i)
- continue
- }
- if expected, got := scenario.err, err.Error(); strings.Index(got, expected) != 0 {
- t.Errorf(
- "%d. expected error starting with %q, got %q",
- i, expected, got,
- )
- }
- }
-
-}
-
-func TestCreateError(t *testing.T) {
- testCreateError(t)
-}
-
-func BenchmarkCreateError(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testCreateError(b)
- }
-}
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go
index 54bcfde29..b86290afa 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_parse.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go
@@ -556,8 +556,8 @@ func (p *TextParser) readTokenUntilWhitespace() {
// byte considered is the byte already read (now in p.currentByte). The first
// newline byte encountered is still copied into p.currentByte, but not into
// p.currentToken. If recognizeEscapeSequence is true, two escape sequences are
-// recognized: '\\' tranlates into '\', and '\n' into a line-feed character. All
-// other escape sequences are invalid and cause an error.
+// recognized: '\\' translates into '\', and '\n' into a line-feed character.
+// All other escape sequences are invalid and cause an error.
func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) {
p.currentToken.Reset()
escaped := false
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse_test.go b/vendor/github.com/prometheus/common/expfmt/text_parse_test.go
deleted file mode 100644
index 76c951185..000000000
--- a/vendor/github.com/prometheus/common/expfmt/text_parse_test.go
+++ /dev/null
@@ -1,593 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package expfmt
-
-import (
- "math"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
- dto "github.com/prometheus/client_model/go"
-)
-
-func testTextParse(t testing.TB) {
- var scenarios = []struct {
- in string
- out []*dto.MetricFamily
- }{
- // 0: Empty lines as input.
- {
- in: `
-
-`,
- out: []*dto.MetricFamily{},
- },
- // 1: Minimal case.
- {
- in: `
-minimal_metric 1.234
-another_metric -3e3 103948
-# Even that:
-no_labels{} 3
-# HELP line for non-existing metric will be ignored.
-`,
- out: []*dto.MetricFamily{
- &dto.MetricFamily{
- Name: proto.String("minimal_metric"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(1.234),
- },
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("another_metric"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(-3e3),
- },
- TimestampMs: proto.Int64(103948),
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("no_labels"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(3),
- },
- },
- },
- },
- },
- },
- // 2: Counters & gauges, docstrings, various whitespace, escape sequences.
- {
- in: `
-# A normal comment.
-#
-# TYPE name counter
-name{labelname="val1",basename="basevalue"} NaN
-name {labelname="val2",basename="base\"v\\al\nue"} 0.23 1234567890
-# HELP name two-line\n doc str\\ing
-
- # HELP name2 doc str"ing 2
- # TYPE name2 gauge
-name2{labelname="val2" ,basename = "basevalue2" } +Inf 54321
-name2{ labelname = "val1" , }-Inf
-`,
- out: []*dto.MetricFamily{
- &dto.MetricFamily{
- Name: proto.String("name"),
- Help: proto.String("two-line\n doc str\\ing"),
- Type: dto.MetricType_COUNTER.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val1"),
- },
- &dto.LabelPair{
- Name: proto.String("basename"),
- Value: proto.String("basevalue"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(math.NaN()),
- },
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val2"),
- },
- &dto.LabelPair{
- Name: proto.String("basename"),
- Value: proto.String("base\"v\\al\nue"),
- },
- },
- Counter: &dto.Counter{
- Value: proto.Float64(.23),
- },
- TimestampMs: proto.Int64(1234567890),
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("name2"),
- Help: proto.String("doc str\"ing 2"),
- Type: dto.MetricType_GAUGE.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val2"),
- },
- &dto.LabelPair{
- Name: proto.String("basename"),
- Value: proto.String("basevalue2"),
- },
- },
- Gauge: &dto.Gauge{
- Value: proto.Float64(math.Inf(+1)),
- },
- TimestampMs: proto.Int64(54321),
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("labelname"),
- Value: proto.String("val1"),
- },
- },
- Gauge: &dto.Gauge{
- Value: proto.Float64(math.Inf(-1)),
- },
- },
- },
- },
- },
- },
- // 3: The evil summary, mixed with other types and funny comments.
- {
- in: `
-# TYPE my_summary summary
-my_summary{n1="val1",quantile="0.5"} 110
-decoy -1 -2
-my_summary{n1="val1",quantile="0.9"} 140 1
-my_summary_count{n1="val1"} 42
-# Latest timestamp wins in case of a summary.
-my_summary_sum{n1="val1"} 4711 2
-fake_sum{n1="val1"} 2001
-# TYPE another_summary summary
-another_summary_count{n2="val2",n1="val1"} 20
-my_summary_count{n2="val2",n1="val1"} 5 5
-another_summary{n1="val1",n2="val2",quantile=".3"} -1.2
-my_summary_sum{n1="val2"} 08 15
-my_summary{n1="val3", quantile="0.2"} 4711
- my_summary{n1="val1",n2="val2",quantile="-12.34",} NaN
-# some
-# funny comments
-# HELP
-# HELP
-# HELP my_summary
-# HELP my_summary
-`,
- out: []*dto.MetricFamily{
- &dto.MetricFamily{
- Name: proto.String("fake_sum"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val1"),
- },
- },
- Untyped: &dto.Untyped{
- Value: proto.Float64(2001),
- },
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("decoy"),
- Type: dto.MetricType_UNTYPED.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Untyped: &dto.Untyped{
- Value: proto.Float64(-1),
- },
- TimestampMs: proto.Int64(-2),
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("my_summary"),
- Type: dto.MetricType_SUMMARY.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val1"),
- },
- },
- Summary: &dto.Summary{
- SampleCount: proto.Uint64(42),
- SampleSum: proto.Float64(4711),
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(0.5),
- Value: proto.Float64(110),
- },
- &dto.Quantile{
- Quantile: proto.Float64(0.9),
- Value: proto.Float64(140),
- },
- },
- },
- TimestampMs: proto.Int64(2),
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n2"),
- Value: proto.String("val2"),
- },
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val1"),
- },
- },
- Summary: &dto.Summary{
- SampleCount: proto.Uint64(5),
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(-12.34),
- Value: proto.Float64(math.NaN()),
- },
- },
- },
- TimestampMs: proto.Int64(5),
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val2"),
- },
- },
- Summary: &dto.Summary{
- SampleSum: proto.Float64(8),
- },
- TimestampMs: proto.Int64(15),
- },
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val3"),
- },
- },
- Summary: &dto.Summary{
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(0.2),
- Value: proto.Float64(4711),
- },
- },
- },
- },
- },
- },
- &dto.MetricFamily{
- Name: proto.String("another_summary"),
- Type: dto.MetricType_SUMMARY.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Label: []*dto.LabelPair{
- &dto.LabelPair{
- Name: proto.String("n2"),
- Value: proto.String("val2"),
- },
- &dto.LabelPair{
- Name: proto.String("n1"),
- Value: proto.String("val1"),
- },
- },
- Summary: &dto.Summary{
- SampleCount: proto.Uint64(20),
- Quantile: []*dto.Quantile{
- &dto.Quantile{
- Quantile: proto.Float64(0.3),
- Value: proto.Float64(-1.2),
- },
- },
- },
- },
- },
- },
- },
- },
- // 4: The histogram.
- {
- in: `
-# HELP request_duration_microseconds The response latency.
-# TYPE request_duration_microseconds histogram
-request_duration_microseconds_bucket{le="100"} 123
-request_duration_microseconds_bucket{le="120"} 412
-request_duration_microseconds_bucket{le="144"} 592
-request_duration_microseconds_bucket{le="172.8"} 1524
-request_duration_microseconds_bucket{le="+Inf"} 2693
-request_duration_microseconds_sum 1.7560473e+06
-request_duration_microseconds_count 2693
-`,
- out: []*dto.MetricFamily{
- {
- Name: proto.String("request_duration_microseconds"),
- Help: proto.String("The response latency."),
- Type: dto.MetricType_HISTOGRAM.Enum(),
- Metric: []*dto.Metric{
- &dto.Metric{
- Histogram: &dto.Histogram{
- SampleCount: proto.Uint64(2693),
- SampleSum: proto.Float64(1756047.3),
- Bucket: []*dto.Bucket{
- &dto.Bucket{
- UpperBound: proto.Float64(100),
- CumulativeCount: proto.Uint64(123),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(120),
- CumulativeCount: proto.Uint64(412),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(144),
- CumulativeCount: proto.Uint64(592),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(172.8),
- CumulativeCount: proto.Uint64(1524),
- },
- &dto.Bucket{
- UpperBound: proto.Float64(math.Inf(+1)),
- CumulativeCount: proto.Uint64(2693),
- },
- },
- },
- },
- },
- },
- },
- },
- }
-
- for i, scenario := range scenarios {
- out, err := parser.TextToMetricFamilies(strings.NewReader(scenario.in))
- if err != nil {
- t.Errorf("%d. error: %s", i, err)
- continue
- }
- if expected, got := len(scenario.out), len(out); expected != got {
- t.Errorf(
- "%d. expected %d MetricFamilies, got %d",
- i, expected, got,
- )
- }
- for _, expected := range scenario.out {
- got, ok := out[expected.GetName()]
- if !ok {
- t.Errorf(
- "%d. expected MetricFamily %q, found none",
- i, expected.GetName(),
- )
- continue
- }
- if expected.String() != got.String() {
- t.Errorf(
- "%d. expected MetricFamily %s, got %s",
- i, expected, got,
- )
- }
- }
- }
-}
-
-func TestTextParse(t *testing.T) {
- testTextParse(t)
-}
-
-func BenchmarkTextParse(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testTextParse(b)
- }
-}
-
-func testTextParseError(t testing.TB) {
- var scenarios = []struct {
- in string
- err string
- }{
- // 0: No new-line at end of input.
- {
- in: `
-bla 3.14
-blubber 42`,
- err: "text format parsing error in line 3: unexpected end of input stream",
- },
- // 1: Invalid escape sequence in label value.
- {
- in: `metric{label="\t"} 3.14`,
- err: "text format parsing error in line 1: invalid escape sequence",
- },
- // 2: Newline in label value.
- {
- in: `
-metric{label="new
-line"} 3.14
-`,
- err: `text format parsing error in line 2: label value "new" contains unescaped new-line`,
- },
- // 3:
- {
- in: `metric{@="bla"} 3.14`,
- err: "text format parsing error in line 1: invalid label name for metric",
- },
- // 4:
- {
- in: `metric{__name__="bla"} 3.14`,
- err: `text format parsing error in line 1: label name "__name__" is reserved`,
- },
- // 5:
- {
- in: `metric{label+="bla"} 3.14`,
- err: "text format parsing error in line 1: expected '=' after label name",
- },
- // 6:
- {
- in: `metric{label=bla} 3.14`,
- err: "text format parsing error in line 1: expected '\"' at start of label value",
- },
- // 7:
- {
- in: `
-# TYPE metric summary
-metric{quantile="bla"} 3.14
-`,
- err: "text format parsing error in line 3: expected float as value for 'quantile' label",
- },
- // 8:
- {
- in: `metric{label="bla"+} 3.14`,
- err: "text format parsing error in line 1: unexpected end of label value",
- },
- // 9:
- {
- in: `metric{label="bla"} 3.14 2.72
-`,
- err: "text format parsing error in line 1: expected integer as timestamp",
- },
- // 10:
- {
- in: `metric{label="bla"} 3.14 2 3
-`,
- err: "text format parsing error in line 1: spurious string after timestamp",
- },
- // 11:
- {
- in: `metric{label="bla"} blubb
-`,
- err: "text format parsing error in line 1: expected float as value",
- },
- // 12:
- {
- in: `
-# HELP metric one
-# HELP metric two
-`,
- err: "text format parsing error in line 3: second HELP line for metric name",
- },
- // 13:
- {
- in: `
-# TYPE metric counter
-# TYPE metric untyped
-`,
- err: `text format parsing error in line 3: second TYPE line for metric name "metric", or TYPE reported after samples`,
- },
- // 14:
- {
- in: `
-metric 4.12
-# TYPE metric counter
-`,
- err: `text format parsing error in line 3: second TYPE line for metric name "metric", or TYPE reported after samples`,
- },
- // 14:
- {
- in: `
-# TYPE metric bla
-`,
- err: "text format parsing error in line 2: unknown metric type",
- },
- // 15:
- {
- in: `
-# TYPE met-ric
-`,
- err: "text format parsing error in line 2: invalid metric name in comment",
- },
- // 16:
- {
- in: `@invalidmetric{label="bla"} 3.14 2`,
- err: "text format parsing error in line 1: invalid metric name",
- },
- // 17:
- {
- in: `{label="bla"} 3.14 2`,
- err: "text format parsing error in line 1: invalid metric name",
- },
- // 18:
- {
- in: `
-# TYPE metric histogram
-metric_bucket{le="bla"} 3.14
-`,
- err: "text format parsing error in line 3: expected float as value for 'le' label",
- },
- // 19: Invalid UTF-8 in label value.
- {
- in: "metric{l=\"\xbd\"} 3.14\n",
- err: "text format parsing error in line 1: invalid label value \"\\xbd\"",
- },
- }
-
- for i, scenario := range scenarios {
- _, err := parser.TextToMetricFamilies(strings.NewReader(scenario.in))
- if err == nil {
- t.Errorf("%d. expected error, got nil", i)
- continue
- }
- if expected, got := scenario.err, err.Error(); strings.Index(got, expected) != 0 {
- t.Errorf(
- "%d. expected error starting with %q, got %q",
- i, expected, got,
- )
- }
- }
-
-}
-
-func TestTextParseError(t *testing.T) {
- testTextParseError(t)
-}
-
-func BenchmarkParseError(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testTextParseError(b)
- }
-}
diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go
deleted file mode 100644
index 41d328f1d..000000000
--- a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package goautoneg
-
-import (
- "testing"
-)
-
-var chrome = "application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
-
-func TestParseAccept(t *testing.T) {
- alternatives := []string{"text/html", "image/png"}
- content_type := Negotiate(chrome, alternatives)
- if content_type != "image/png" {
- t.Errorf("got %s expected image/png", content_type)
- }
-
- alternatives = []string{"text/html", "text/plain", "text/n3"}
- content_type = Negotiate(chrome, alternatives)
- if content_type != "text/html" {
- t.Errorf("got %s expected text/html", content_type)
- }
-
- alternatives = []string{"text/n3", "text/plain"}
- content_type = Negotiate(chrome, alternatives)
- if content_type != "text/plain" {
- t.Errorf("got %s expected text/plain", content_type)
- }
-
- alternatives = []string{"text/n3", "application/rdf+xml"}
- content_type = Negotiate(chrome, alternatives)
- if content_type != "text/n3" {
- t.Errorf("got %s expected text/n3", content_type)
- }
-}
diff --git a/vendor/github.com/prometheus/common/log/eventlog_formatter.go b/vendor/github.com/prometheus/common/log/eventlog_formatter.go
deleted file mode 100644
index bcf68e6f2..000000000
--- a/vendor/github.com/prometheus/common/log/eventlog_formatter.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// +build windows
-
-package log
-
-import (
- "fmt"
- "os"
-
- "golang.org/x/sys/windows/svc/eventlog"
-
- "github.com/sirupsen/logrus"
-)
-
-func init() {
- setEventlogFormatter = func(l logger, name string, debugAsInfo bool) error {
- if name == "" {
- return fmt.Errorf("missing name parameter")
- }
-
- fmter, err := newEventlogger(name, debugAsInfo, l.entry.Logger.Formatter)
- if err != nil {
- fmt.Fprintf(os.Stderr, "error creating eventlog formatter: %v\n", err)
- l.Errorf("can't connect logger to eventlog: %v", err)
- return err
- }
- l.entry.Logger.Formatter = fmter
- return nil
- }
-}
-
-type eventlogger struct {
- log *eventlog.Log
- debugAsInfo bool
- wrap logrus.Formatter
-}
-
-func newEventlogger(name string, debugAsInfo bool, fmter logrus.Formatter) (*eventlogger, error) {
- logHandle, err := eventlog.Open(name)
- if err != nil {
- return nil, err
- }
- return &eventlogger{log: logHandle, debugAsInfo: debugAsInfo, wrap: fmter}, nil
-}
-
-func (s *eventlogger) Format(e *logrus.Entry) ([]byte, error) {
- data, err := s.wrap.Format(e)
- if err != nil {
- fmt.Fprintf(os.Stderr, "eventlogger: can't format entry: %v\n", err)
- return data, err
- }
-
- switch e.Level {
- case logrus.PanicLevel:
- fallthrough
- case logrus.FatalLevel:
- fallthrough
- case logrus.ErrorLevel:
- err = s.log.Error(102, e.Message)
- case logrus.WarnLevel:
- err = s.log.Warning(101, e.Message)
- case logrus.InfoLevel:
- err = s.log.Info(100, e.Message)
- case logrus.DebugLevel:
- if s.debugAsInfo {
- err = s.log.Info(100, e.Message)
- }
- default:
- err = s.log.Info(100, e.Message)
- }
-
- if err != nil {
- fmt.Fprintf(os.Stderr, "eventlogger: can't send log to eventlog: %v\n", err)
- }
-
- return data, err
-}
diff --git a/vendor/github.com/prometheus/common/log/log.go b/vendor/github.com/prometheus/common/log/log.go
deleted file mode 100644
index 108830255..000000000
--- a/vendor/github.com/prometheus/common/log/log.go
+++ /dev/null
@@ -1,364 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package log
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "net/url"
- "os"
- "runtime"
- "strconv"
- "strings"
-
- "github.com/sirupsen/logrus"
- "gopkg.in/alecthomas/kingpin.v2"
-)
-
-// setSyslogFormatter is nil if the target architecture does not support syslog.
-var setSyslogFormatter func(logger, string, string) error
-
-// setEventlogFormatter is nil if the target OS does not support Eventlog (i.e., is not Windows).
-var setEventlogFormatter func(logger, string, bool) error
-
-func setJSONFormatter() {
- origLogger.Formatter = &logrus.JSONFormatter{}
-}
-
-type loggerSettings struct {
- level string
- format string
-}
-
-func (s *loggerSettings) apply(ctx *kingpin.ParseContext) error {
- err := baseLogger.SetLevel(s.level)
- if err != nil {
- return err
- }
- err = baseLogger.SetFormat(s.format)
- return err
-}
-
-// AddFlags adds the flags used by this package to the Kingpin application.
-// To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
-func AddFlags(a *kingpin.Application) {
- s := loggerSettings{}
- a.Flag("log.level", "Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]").
- Default(origLogger.Level.String()).
- StringVar(&s.level)
- defaultFormat := url.URL{Scheme: "logger", Opaque: "stderr"}
- a.Flag("log.format", `Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"`).
- Default(defaultFormat.String()).
- StringVar(&s.format)
- a.Action(s.apply)
-}
-
-// Logger is the interface for loggers used in the Prometheus components.
-type Logger interface {
- Debug(...interface{})
- Debugln(...interface{})
- Debugf(string, ...interface{})
-
- Info(...interface{})
- Infoln(...interface{})
- Infof(string, ...interface{})
-
- Warn(...interface{})
- Warnln(...interface{})
- Warnf(string, ...interface{})
-
- Error(...interface{})
- Errorln(...interface{})
- Errorf(string, ...interface{})
-
- Fatal(...interface{})
- Fatalln(...interface{})
- Fatalf(string, ...interface{})
-
- With(key string, value interface{}) Logger
-
- SetFormat(string) error
- SetLevel(string) error
-}
-
-type logger struct {
- entry *logrus.Entry
-}
-
-func (l logger) With(key string, value interface{}) Logger {
- return logger{l.entry.WithField(key, value)}
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func (l logger) Debug(args ...interface{}) {
- l.sourced().Debug(args...)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func (l logger) Debugln(args ...interface{}) {
- l.sourced().Debugln(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func (l logger) Debugf(format string, args ...interface{}) {
- l.sourced().Debugf(format, args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func (l logger) Info(args ...interface{}) {
- l.sourced().Info(args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func (l logger) Infoln(args ...interface{}) {
- l.sourced().Infoln(args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func (l logger) Infof(format string, args ...interface{}) {
- l.sourced().Infof(format, args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func (l logger) Warn(args ...interface{}) {
- l.sourced().Warn(args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func (l logger) Warnln(args ...interface{}) {
- l.sourced().Warnln(args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func (l logger) Warnf(format string, args ...interface{}) {
- l.sourced().Warnf(format, args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func (l logger) Error(args ...interface{}) {
- l.sourced().Error(args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func (l logger) Errorln(args ...interface{}) {
- l.sourced().Errorln(args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func (l logger) Errorf(format string, args ...interface{}) {
- l.sourced().Errorf(format, args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func (l logger) Fatal(args ...interface{}) {
- l.sourced().Fatal(args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func (l logger) Fatalln(args ...interface{}) {
- l.sourced().Fatalln(args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func (l logger) Fatalf(format string, args ...interface{}) {
- l.sourced().Fatalf(format, args...)
-}
-
-func (l logger) SetLevel(level string) error {
- lvl, err := logrus.ParseLevel(level)
- if err != nil {
- return err
- }
-
- l.entry.Logger.Level = lvl
- return nil
-}
-
-func (l logger) SetFormat(format string) error {
- u, err := url.Parse(format)
- if err != nil {
- return err
- }
- if u.Scheme != "logger" {
- return fmt.Errorf("invalid scheme %s", u.Scheme)
- }
- jsonq := u.Query().Get("json")
- if jsonq == "true" {
- setJSONFormatter()
- }
-
- switch u.Opaque {
- case "syslog":
- if setSyslogFormatter == nil {
- return fmt.Errorf("system does not support syslog")
- }
- appname := u.Query().Get("appname")
- facility := u.Query().Get("local")
- return setSyslogFormatter(l, appname, facility)
- case "eventlog":
- if setEventlogFormatter == nil {
- return fmt.Errorf("system does not support eventlog")
- }
- name := u.Query().Get("name")
- debugAsInfo := false
- debugAsInfoRaw := u.Query().Get("debugAsInfo")
- if parsedDebugAsInfo, err := strconv.ParseBool(debugAsInfoRaw); err == nil {
- debugAsInfo = parsedDebugAsInfo
- }
- return setEventlogFormatter(l, name, debugAsInfo)
- case "stdout":
- l.entry.Logger.Out = os.Stdout
- case "stderr":
- l.entry.Logger.Out = os.Stderr
- default:
- return fmt.Errorf("unsupported logger %q", u.Opaque)
- }
- return nil
-}
-
-// sourced adds a source field to the logger that contains
-// the file name and line where the logging happened.
-func (l logger) sourced() *logrus.Entry {
- _, file, line, ok := runtime.Caller(2)
- if !ok {
- file = "<???>"
- line = 1
- } else {
- slash := strings.LastIndex(file, "/")
- file = file[slash+1:]
- }
- return l.entry.WithField("source", fmt.Sprintf("%s:%d", file, line))
-}
-
-var origLogger = logrus.New()
-var baseLogger = logger{entry: logrus.NewEntry(origLogger)}
-
-// Base returns the default Logger logging to
-func Base() Logger {
- return baseLogger
-}
-
-// NewLogger returns a new Logger logging to out.
-func NewLogger(w io.Writer) Logger {
- l := logrus.New()
- l.Out = w
- return logger{entry: logrus.NewEntry(l)}
-}
-
-// NewNopLogger returns a logger that discards all log messages.
-func NewNopLogger() Logger {
- l := logrus.New()
- l.Out = ioutil.Discard
- return logger{entry: logrus.NewEntry(l)}
-}
-
-// With adds a field to the logger.
-func With(key string, value interface{}) Logger {
- return baseLogger.With(key, value)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func Debug(args ...interface{}) {
- baseLogger.sourced().Debug(args...)
-}
-
-// Debugln logs a message at level Debug on the standard logger.
-func Debugln(args ...interface{}) {
- baseLogger.sourced().Debugln(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func Debugf(format string, args ...interface{}) {
- baseLogger.sourced().Debugf(format, args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func Info(args ...interface{}) {
- baseLogger.sourced().Info(args...)
-}
-
-// Infoln logs a message at level Info on the standard logger.
-func Infoln(args ...interface{}) {
- baseLogger.sourced().Infoln(args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func Infof(format string, args ...interface{}) {
- baseLogger.sourced().Infof(format, args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func Warn(args ...interface{}) {
- baseLogger.sourced().Warn(args...)
-}
-
-// Warnln logs a message at level Warn on the standard logger.
-func Warnln(args ...interface{}) {
- baseLogger.sourced().Warnln(args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func Warnf(format string, args ...interface{}) {
- baseLogger.sourced().Warnf(format, args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func Error(args ...interface{}) {
- baseLogger.sourced().Error(args...)
-}
-
-// Errorln logs a message at level Error on the standard logger.
-func Errorln(args ...interface{}) {
- baseLogger.sourced().Errorln(args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func Errorf(format string, args ...interface{}) {
- baseLogger.sourced().Errorf(format, args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func Fatal(args ...interface{}) {
- baseLogger.sourced().Fatal(args...)
-}
-
-// Fatalln logs a message at level Fatal on the standard logger.
-func Fatalln(args ...interface{}) {
- baseLogger.sourced().Fatalln(args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func Fatalf(format string, args ...interface{}) {
- baseLogger.sourced().Fatalf(format, args...)
-}
-
-// AddHook adds hook to Prometheus' original logger.
-func AddHook(hook logrus.Hook) {
- origLogger.Hooks.Add(hook)
-}
-
-type errorLogWriter struct{}
-
-func (errorLogWriter) Write(b []byte) (int, error) {
- baseLogger.sourced().Error(string(b))
- return len(b), nil
-}
-
-// NewErrorLogger returns a log.Logger that is meant to be used
-// in the ErrorLog field of an http.Server to log HTTP server errors.
-func NewErrorLogger() *log.Logger {
- return log.New(&errorLogWriter{}, "", 0)
-}
diff --git a/vendor/github.com/prometheus/common/log/log_test.go b/vendor/github.com/prometheus/common/log/log_test.go
deleted file mode 100644
index f63b4417f..000000000
--- a/vendor/github.com/prometheus/common/log/log_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package log
-
-import (
- "bytes"
- "regexp"
- "testing"
-
- "github.com/sirupsen/logrus"
-)
-
-func TestFileLineLogging(t *testing.T) {
- var buf bytes.Buffer
- origLogger.Out = &buf
- origLogger.Formatter = &logrus.TextFormatter{
- DisableColors: true,
- }
-
- // The default logging level should be "info".
- Debug("This debug-level line should not show up in the output.")
- Infof("This %s-level line should show up in the output.", "info")
-
- re := `^time=".*" level=info msg="This info-level line should show up in the output." source="log_test.go:33"\n$`
- if !regexp.MustCompile(re).Match(buf.Bytes()) {
- t.Fatalf("%q did not match expected regex %q", buf.String(), re)
- }
-}
diff --git a/vendor/github.com/prometheus/common/log/syslog_formatter.go b/vendor/github.com/prometheus/common/log/syslog_formatter.go
deleted file mode 100644
index f882f2f84..000000000
--- a/vendor/github.com/prometheus/common/log/syslog_formatter.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// +build !windows,!nacl,!plan9
-
-package log
-
-import (
- "fmt"
- "log/syslog"
- "os"
-
- "github.com/sirupsen/logrus"
-)
-
-var _ logrus.Formatter = (*syslogger)(nil)
-
-func init() {
- setSyslogFormatter = func(l logger, appname, local string) error {
- if appname == "" {
- return fmt.Errorf("missing appname parameter")
- }
- if local == "" {
- return fmt.Errorf("missing local parameter")
- }
-
- fmter, err := newSyslogger(appname, local, l.entry.Logger.Formatter)
- if err != nil {
- fmt.Fprintf(os.Stderr, "error creating syslog formatter: %v\n", err)
- l.entry.Errorf("can't connect logger to syslog: %v", err)
- return err
- }
- l.entry.Logger.Formatter = fmter
- return nil
- }
-}
-
-var prefixTag []byte
-
-type syslogger struct {
- wrap logrus.Formatter
- out *syslog.Writer
-}
-
-func newSyslogger(appname string, facility string, fmter logrus.Formatter) (*syslogger, error) {
- priority, err := getFacility(facility)
- if err != nil {
- return nil, err
- }
- out, err := syslog.New(priority, appname)
- _, isJSON := fmter.(*logrus.JSONFormatter)
- if isJSON {
- // add cee tag to json formatted syslogs
- prefixTag = []byte("@cee:")
- }
- return &syslogger{
- out: out,
- wrap: fmter,
- }, err
-}
-
-func getFacility(facility string) (syslog.Priority, error) {
- switch facility {
- case "0":
- return syslog.LOG_LOCAL0, nil
- case "1":
- return syslog.LOG_LOCAL1, nil
- case "2":
- return syslog.LOG_LOCAL2, nil
- case "3":
- return syslog.LOG_LOCAL3, nil
- case "4":
- return syslog.LOG_LOCAL4, nil
- case "5":
- return syslog.LOG_LOCAL5, nil
- case "6":
- return syslog.LOG_LOCAL6, nil
- case "7":
- return syslog.LOG_LOCAL7, nil
- }
- return syslog.LOG_LOCAL0, fmt.Errorf("invalid local(%s) for syslog", facility)
-}
-
-func (s *syslogger) Format(e *logrus.Entry) ([]byte, error) {
- data, err := s.wrap.Format(e)
- if err != nil {
- fmt.Fprintf(os.Stderr, "syslogger: can't format entry: %v\n", err)
- return data, err
- }
- // only append tag to data sent to syslog (line), not to what
- // is returned
- line := string(append(prefixTag, data...))
-
- switch e.Level {
- case logrus.PanicLevel:
- err = s.out.Crit(line)
- case logrus.FatalLevel:
- err = s.out.Crit(line)
- case logrus.ErrorLevel:
- err = s.out.Err(line)
- case logrus.WarnLevel:
- err = s.out.Warning(line)
- case logrus.InfoLevel:
- err = s.out.Info(line)
- case logrus.DebugLevel:
- err = s.out.Debug(line)
- default:
- err = s.out.Notice(line)
- }
-
- if err != nil {
- fmt.Fprintf(os.Stderr, "syslogger: can't send log to syslog: %v\n", err)
- }
-
- return data, err
-}
diff --git a/vendor/github.com/prometheus/common/log/syslog_formatter_test.go b/vendor/github.com/prometheus/common/log/syslog_formatter_test.go
deleted file mode 100644
index b7e68848f..000000000
--- a/vendor/github.com/prometheus/common/log/syslog_formatter_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-// +build !windows,!nacl,!plan9
-
-package log
-
-import (
- "errors"
- "log/syslog"
- "testing"
-)
-
-func TestGetFacility(t *testing.T) {
- testCases := []struct {
- facility string
- expectedPriority syslog.Priority
- expectedErr error
- }{
- {"0", syslog.LOG_LOCAL0, nil},
- {"1", syslog.LOG_LOCAL1, nil},
- {"2", syslog.LOG_LOCAL2, nil},
- {"3", syslog.LOG_LOCAL3, nil},
- {"4", syslog.LOG_LOCAL4, nil},
- {"5", syslog.LOG_LOCAL5, nil},
- {"6", syslog.LOG_LOCAL6, nil},
- {"7", syslog.LOG_LOCAL7, nil},
- {"8", syslog.LOG_LOCAL0, errors.New("invalid local(8) for syslog")},
- }
- for _, tc := range testCases {
- priority, err := getFacility(tc.facility)
- if err != tc.expectedErr {
- if err.Error() != tc.expectedErr.Error() {
- t.Errorf("want %s, got %s", tc.expectedErr.Error(), err.Error())
- }
- }
-
- if priority != tc.expectedPriority {
- t.Errorf("want %q, got %q", tc.expectedPriority, priority)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/alert_test.go b/vendor/github.com/prometheus/common/model/alert_test.go
deleted file mode 100644
index 9692bca21..000000000
--- a/vendor/github.com/prometheus/common/model/alert_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2013 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "strings"
- "testing"
- "time"
-)
-
-func TestAlertValidate(t *testing.T) {
- ts := time.Now()
-
- var cases = []struct {
- alert *Alert
- err string
- }{
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- StartsAt: ts,
- },
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- },
- err: "start time missing",
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- StartsAt: ts,
- EndsAt: ts,
- },
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- StartsAt: ts,
- EndsAt: ts.Add(1 * time.Minute),
- },
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- StartsAt: ts,
- EndsAt: ts.Add(-1 * time.Minute),
- },
- err: "start time must be before end time",
- },
- {
- alert: &Alert{
- StartsAt: ts,
- },
- err: "at least one label pair required",
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b", "!bad": "label"},
- StartsAt: ts,
- },
- err: "invalid label set: invalid name",
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b", "bad": "\xfflabel"},
- StartsAt: ts,
- },
- err: "invalid label set: invalid value",
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- Annotations: LabelSet{"!bad": "label"},
- StartsAt: ts,
- },
- err: "invalid annotations: invalid name",
- },
- {
- alert: &Alert{
- Labels: LabelSet{"a": "b"},
- Annotations: LabelSet{"bad": "\xfflabel"},
- StartsAt: ts,
- },
- err: "invalid annotations: invalid value",
- },
- }
-
- for i, c := range cases {
- err := c.alert.Validate()
- if err == nil {
- if c.err == "" {
- continue
- }
- t.Errorf("%d. Expected error %q but got none", i, c.err)
- continue
- }
- if c.err == "" && err != nil {
- t.Errorf("%d. Expected no error but got %q", i, err)
- continue
- }
- if !strings.Contains(err.Error(), c.err) {
- t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/labels_test.go b/vendor/github.com/prometheus/common/model/labels_test.go
deleted file mode 100644
index e8df28ffa..000000000
--- a/vendor/github.com/prometheus/common/model/labels_test.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2013 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "sort"
- "testing"
-)
-
-func testLabelNames(t testing.TB) {
- var scenarios = []struct {
- in LabelNames
- out LabelNames
- }{
- {
- in: LabelNames{"ZZZ", "zzz"},
- out: LabelNames{"ZZZ", "zzz"},
- },
- {
- in: LabelNames{"aaa", "AAA"},
- out: LabelNames{"AAA", "aaa"},
- },
- }
-
- for i, scenario := range scenarios {
- sort.Sort(scenario.in)
-
- for j, expected := range scenario.out {
- if expected != scenario.in[j] {
- t.Errorf("%d.%d expected %s, got %s", i, j, expected, scenario.in[j])
- }
- }
- }
-}
-
-func TestLabelNames(t *testing.T) {
- testLabelNames(t)
-}
-
-func BenchmarkLabelNames(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testLabelNames(b)
- }
-}
-
-func testLabelValues(t testing.TB) {
- var scenarios = []struct {
- in LabelValues
- out LabelValues
- }{
- {
- in: LabelValues{"ZZZ", "zzz"},
- out: LabelValues{"ZZZ", "zzz"},
- },
- {
- in: LabelValues{"aaa", "AAA"},
- out: LabelValues{"AAA", "aaa"},
- },
- }
-
- for i, scenario := range scenarios {
- sort.Sort(scenario.in)
-
- for j, expected := range scenario.out {
- if expected != scenario.in[j] {
- t.Errorf("%d.%d expected %s, got %s", i, j, expected, scenario.in[j])
- }
- }
- }
-}
-
-func TestLabelValues(t *testing.T) {
- testLabelValues(t)
-}
-
-func BenchmarkLabelValues(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testLabelValues(b)
- }
-}
-
-func TestLabelNameIsValid(t *testing.T) {
- var scenarios = []struct {
- ln LabelName
- valid bool
- }{
- {
- ln: "Avalid_23name",
- valid: true,
- },
- {
- ln: "_Avalid_23name",
- valid: true,
- },
- {
- ln: "1valid_23name",
- valid: false,
- },
- {
- ln: "avalid_23name",
- valid: true,
- },
- {
- ln: "Ava:lid_23name",
- valid: false,
- },
- {
- ln: "a lid_23name",
- valid: false,
- },
- {
- ln: ":leading_colon",
- valid: false,
- },
- {
- ln: "colon:in:the:middle",
- valid: false,
- },
- }
-
- for _, s := range scenarios {
- if s.ln.IsValid() != s.valid {
- t.Errorf("Expected %v for %q using IsValid method", s.valid, s.ln)
- }
- if LabelNameRE.MatchString(string(s.ln)) != s.valid {
- t.Errorf("Expected %v for %q using regexp match", s.valid, s.ln)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/metric_test.go b/vendor/github.com/prometheus/common/model/metric_test.go
deleted file mode 100644
index 06f9de525..000000000
--- a/vendor/github.com/prometheus/common/model/metric_test.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2013 The Prometheus Authors
-// 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.
-
-package model
-
-import "testing"
-
-func testMetric(t testing.TB) {
- var scenarios = []struct {
- input LabelSet
- fingerprint Fingerprint
- fastFingerprint Fingerprint
- }{
- {
- input: LabelSet{},
- fingerprint: 14695981039346656037,
- fastFingerprint: 14695981039346656037,
- },
- {
- input: LabelSet{
- "first_name": "electro",
- "occupation": "robot",
- "manufacturer": "westinghouse",
- },
- fingerprint: 5911716720268894962,
- fastFingerprint: 11310079640881077873,
- },
- {
- input: LabelSet{
- "x": "y",
- },
- fingerprint: 8241431561484471700,
- fastFingerprint: 13948396922932177635,
- },
- {
- input: LabelSet{
- "a": "bb",
- "b": "c",
- },
- fingerprint: 3016285359649981711,
- fastFingerprint: 3198632812309449502,
- },
- {
- input: LabelSet{
- "a": "b",
- "bb": "c",
- },
- fingerprint: 7122421792099404749,
- fastFingerprint: 5774953389407657638,
- },
- }
-
- for i, scenario := range scenarios {
- input := Metric(scenario.input)
-
- if scenario.fingerprint != input.Fingerprint() {
- t.Errorf("%d. expected %d, got %d", i, scenario.fingerprint, input.Fingerprint())
- }
- if scenario.fastFingerprint != input.FastFingerprint() {
- t.Errorf("%d. expected %d, got %d", i, scenario.fastFingerprint, input.FastFingerprint())
- }
- }
-}
-
-func TestMetric(t *testing.T) {
- testMetric(t)
-}
-
-func BenchmarkMetric(b *testing.B) {
- for i := 0; i < b.N; i++ {
- testMetric(b)
- }
-}
-
-func TestMetricNameIsValid(t *testing.T) {
- var scenarios = []struct {
- mn LabelValue
- valid bool
- }{
- {
- mn: "Avalid_23name",
- valid: true,
- },
- {
- mn: "_Avalid_23name",
- valid: true,
- },
- {
- mn: "1valid_23name",
- valid: false,
- },
- {
- mn: "avalid_23name",
- valid: true,
- },
- {
- mn: "Ava:lid_23name",
- valid: true,
- },
- {
- mn: "a lid_23name",
- valid: false,
- },
- {
- mn: ":leading_colon",
- valid: true,
- },
- {
- mn: "colon:in:the:middle",
- valid: true,
- },
- }
-
- for _, s := range scenarios {
- if IsValidMetricName(s.mn) != s.valid {
- t.Errorf("Expected %v for %q using IsValidMetricName function", s.valid, s.mn)
- }
- if MetricNameRE.MatchString(string(s.mn)) != s.valid {
- t.Errorf("Expected %v for %q using regexp matching", s.valid, s.mn)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/signature_test.go b/vendor/github.com/prometheus/common/model/signature_test.go
deleted file mode 100644
index d59c8a8c3..000000000
--- a/vendor/github.com/prometheus/common/model/signature_test.go
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2014 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "runtime"
- "sync"
- "testing"
-)
-
-func TestLabelsToSignature(t *testing.T) {
- var scenarios = []struct {
- in map[string]string
- out uint64
- }{
- {
- in: map[string]string{},
- out: 14695981039346656037,
- },
- {
- in: map[string]string{"name": "garland, briggs", "fear": "love is not enough"},
- out: 5799056148416392346,
- },
- }
-
- for i, scenario := range scenarios {
- actual := LabelsToSignature(scenario.in)
-
- if actual != scenario.out {
- t.Errorf("%d. expected %d, got %d", i, scenario.out, actual)
- }
- }
-}
-
-func TestMetricToFingerprint(t *testing.T) {
- var scenarios = []struct {
- in LabelSet
- out Fingerprint
- }{
- {
- in: LabelSet{},
- out: 14695981039346656037,
- },
- {
- in: LabelSet{"name": "garland, briggs", "fear": "love is not enough"},
- out: 5799056148416392346,
- },
- }
-
- for i, scenario := range scenarios {
- actual := labelSetToFingerprint(scenario.in)
-
- if actual != scenario.out {
- t.Errorf("%d. expected %d, got %d", i, scenario.out, actual)
- }
- }
-}
-
-func TestMetricToFastFingerprint(t *testing.T) {
- var scenarios = []struct {
- in LabelSet
- out Fingerprint
- }{
- {
- in: LabelSet{},
- out: 14695981039346656037,
- },
- {
- in: LabelSet{"name": "garland, briggs", "fear": "love is not enough"},
- out: 12952432476264840823,
- },
- }
-
- for i, scenario := range scenarios {
- actual := labelSetToFastFingerprint(scenario.in)
-
- if actual != scenario.out {
- t.Errorf("%d. expected %d, got %d", i, scenario.out, actual)
- }
- }
-}
-
-func TestSignatureForLabels(t *testing.T) {
- var scenarios = []struct {
- in Metric
- labels LabelNames
- out uint64
- }{
- {
- in: Metric{},
- labels: nil,
- out: 14695981039346656037,
- },
- {
- in: Metric{},
- labels: LabelNames{"empty"},
- out: 7187873163539638612,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: LabelNames{"empty"},
- out: 7187873163539638612,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: LabelNames{"fear", "name"},
- out: 5799056148416392346,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough", "foo": "bar"},
- labels: LabelNames{"fear", "name"},
- out: 5799056148416392346,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: LabelNames{},
- out: 14695981039346656037,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: nil,
- out: 14695981039346656037,
- },
- }
-
- for i, scenario := range scenarios {
- actual := SignatureForLabels(scenario.in, scenario.labels...)
-
- if actual != scenario.out {
- t.Errorf("%d. expected %d, got %d", i, scenario.out, actual)
- }
- }
-}
-
-func TestSignatureWithoutLabels(t *testing.T) {
- var scenarios = []struct {
- in Metric
- labels map[LabelName]struct{}
- out uint64
- }{
- {
- in: Metric{},
- labels: nil,
- out: 14695981039346656037,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: map[LabelName]struct{}{"fear": struct{}{}, "name": struct{}{}},
- out: 14695981039346656037,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough", "foo": "bar"},
- labels: map[LabelName]struct{}{"foo": struct{}{}},
- out: 5799056148416392346,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: map[LabelName]struct{}{},
- out: 5799056148416392346,
- },
- {
- in: Metric{"name": "garland, briggs", "fear": "love is not enough"},
- labels: nil,
- out: 5799056148416392346,
- },
- }
-
- for i, scenario := range scenarios {
- actual := SignatureWithoutLabels(scenario.in, scenario.labels)
-
- if actual != scenario.out {
- t.Errorf("%d. expected %d, got %d", i, scenario.out, actual)
- }
- }
-}
-
-func benchmarkLabelToSignature(b *testing.B, l map[string]string, e uint64) {
- for i := 0; i < b.N; i++ {
- if a := LabelsToSignature(l); a != e {
- b.Fatalf("expected signature of %d for %s, got %d", e, l, a)
- }
- }
-}
-
-func BenchmarkLabelToSignatureScalar(b *testing.B) {
- benchmarkLabelToSignature(b, nil, 14695981039346656037)
-}
-
-func BenchmarkLabelToSignatureSingle(b *testing.B) {
- benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value"}, 5146282821936882169)
-}
-
-func BenchmarkLabelToSignatureDouble(b *testing.B) {
- benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value", "second-label": "second-label-value"}, 3195800080984914717)
-}
-
-func BenchmarkLabelToSignatureTriple(b *testing.B) {
- benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 13843036195897128121)
-}
-
-func benchmarkMetricToFingerprint(b *testing.B, ls LabelSet, e Fingerprint) {
- for i := 0; i < b.N; i++ {
- if a := labelSetToFingerprint(ls); a != e {
- b.Fatalf("expected signature of %d for %s, got %d", e, ls, a)
- }
- }
-}
-
-func BenchmarkMetricToFingerprintScalar(b *testing.B) {
- benchmarkMetricToFingerprint(b, nil, 14695981039346656037)
-}
-
-func BenchmarkMetricToFingerprintSingle(b *testing.B) {
- benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value"}, 5146282821936882169)
-}
-
-func BenchmarkMetricToFingerprintDouble(b *testing.B) {
- benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value"}, 3195800080984914717)
-}
-
-func BenchmarkMetricToFingerprintTriple(b *testing.B) {
- benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 13843036195897128121)
-}
-
-func benchmarkMetricToFastFingerprint(b *testing.B, ls LabelSet, e Fingerprint) {
- for i := 0; i < b.N; i++ {
- if a := labelSetToFastFingerprint(ls); a != e {
- b.Fatalf("expected signature of %d for %s, got %d", e, ls, a)
- }
- }
-}
-
-func BenchmarkMetricToFastFingerprintScalar(b *testing.B) {
- benchmarkMetricToFastFingerprint(b, nil, 14695981039346656037)
-}
-
-func BenchmarkMetricToFastFingerprintSingle(b *testing.B) {
- benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value"}, 5147259542624943964)
-}
-
-func BenchmarkMetricToFastFingerprintDouble(b *testing.B) {
- benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value"}, 18269973311206963528)
-}
-
-func BenchmarkMetricToFastFingerprintTriple(b *testing.B) {
- benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676)
-}
-
-func BenchmarkEmptyLabelSignature(b *testing.B) {
- input := []map[string]string{nil, {}}
-
- var ms runtime.MemStats
- runtime.ReadMemStats(&ms)
-
- alloc := ms.Alloc
-
- for _, labels := range input {
- LabelsToSignature(labels)
- }
-
- runtime.ReadMemStats(&ms)
-
- if got := ms.Alloc; alloc != got {
- b.Fatal("expected LabelsToSignature with empty labels not to perform allocations")
- }
-}
-
-func benchmarkMetricToFastFingerprintConc(b *testing.B, ls LabelSet, e Fingerprint, concLevel int) {
- var start, end sync.WaitGroup
- start.Add(1)
- end.Add(concLevel)
-
- for i := 0; i < concLevel; i++ {
- go func() {
- start.Wait()
- for j := b.N / concLevel; j >= 0; j-- {
- if a := labelSetToFastFingerprint(ls); a != e {
- b.Fatalf("expected signature of %d for %s, got %d", e, ls, a)
- }
- }
- end.Done()
- }()
- }
- b.ResetTimer()
- start.Done()
- end.Wait()
-}
-
-func BenchmarkMetricToFastFingerprintTripleConc1(b *testing.B) {
- benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 1)
-}
-
-func BenchmarkMetricToFastFingerprintTripleConc2(b *testing.B) {
- benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 2)
-}
-
-func BenchmarkMetricToFastFingerprintTripleConc4(b *testing.B) {
- benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 4)
-}
-
-func BenchmarkMetricToFastFingerprintTripleConc8(b *testing.B) {
- benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 8)
-}
diff --git a/vendor/github.com/prometheus/common/model/silence.go b/vendor/github.com/prometheus/common/model/silence.go
index 7538e2997..bb99889d2 100644
--- a/vendor/github.com/prometheus/common/model/silence.go
+++ b/vendor/github.com/prometheus/common/model/silence.go
@@ -59,8 +59,8 @@ func (m *Matcher) Validate() error {
return nil
}
-// Silence defines the representation of a silence definiton
-// in the Prometheus eco-system.
+// Silence defines the representation of a silence definition in the Prometheus
+// eco-system.
type Silence struct {
ID uint64 `json:"id,omitempty"`
diff --git a/vendor/github.com/prometheus/common/model/silence_test.go b/vendor/github.com/prometheus/common/model/silence_test.go
deleted file mode 100644
index 8eaaf0744..000000000
--- a/vendor/github.com/prometheus/common/model/silence_test.go
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright 2015 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "strings"
- "testing"
- "time"
-)
-
-func TestMatcherValidate(t *testing.T) {
- var cases = []struct {
- matcher *Matcher
- err string
- }{
- {
- matcher: &Matcher{
- Name: "name",
- Value: "value",
- },
- },
- {
- matcher: &Matcher{
- Name: "name",
- Value: "value",
- IsRegex: true,
- },
- },
- {
- matcher: &Matcher{
- Name: "name!",
- Value: "value",
- },
- err: "invalid name",
- },
- {
- matcher: &Matcher{
- Name: "",
- Value: "value",
- },
- err: "invalid name",
- },
- {
- matcher: &Matcher{
- Name: "name",
- Value: "value\xff",
- },
- err: "invalid value",
- },
- {
- matcher: &Matcher{
- Name: "name",
- Value: "",
- },
- err: "invalid value",
- },
- }
-
- for i, c := range cases {
- err := c.matcher.Validate()
- if err == nil {
- if c.err == "" {
- continue
- }
- t.Errorf("%d. Expected error %q but got none", i, c.err)
- continue
- }
- if c.err == "" && err != nil {
- t.Errorf("%d. Expected no error but got %q", i, err)
- continue
- }
- if !strings.Contains(err.Error(), c.err) {
- t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err)
- }
- }
-}
-
-func TestSilenceValidate(t *testing.T) {
- ts := time.Now()
-
- var cases = []struct {
- sil *Silence
- err string
- }{
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- {Name: "name", Value: "value"},
- {Name: "name", Value: "value"},
- {Name: "name", Value: "value", IsRegex: true},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts.Add(-1 * time.Minute),
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- err: "start time must be before end time",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- err: "end time missing",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- EndsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- err: "start time missing",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "!name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- err: "invalid matcher",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedAt: ts,
- CreatedBy: "name",
- },
- err: "comment missing",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedBy: "name",
- Comment: "comment",
- },
- err: "creation timestamp missing",
- },
- {
- sil: &Silence{
- Matchers: []*Matcher{
- {Name: "name", Value: "value"},
- },
- StartsAt: ts,
- EndsAt: ts,
- CreatedAt: ts,
- Comment: "comment",
- },
- err: "creator information missing",
- },
- }
-
- for i, c := range cases {
- err := c.sil.Validate()
- if err == nil {
- if c.err == "" {
- continue
- }
- t.Errorf("%d. Expected error %q but got none", i, c.err)
- continue
- }
- if c.err == "" && err != nil {
- t.Errorf("%d. Expected no error but got %q", i, err)
- continue
- }
- if !strings.Contains(err.Error(), c.err) {
- t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/time_test.go b/vendor/github.com/prometheus/common/model/time_test.go
deleted file mode 100644
index 3efdd65ff..000000000
--- a/vendor/github.com/prometheus/common/model/time_test.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2013 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "testing"
- "time"
-)
-
-func TestComparators(t *testing.T) {
- t1a := TimeFromUnix(0)
- t1b := TimeFromUnix(0)
- t2 := TimeFromUnix(2*second - 1)
-
- if !t1a.Equal(t1b) {
- t.Fatalf("Expected %s to be equal to %s", t1a, t1b)
- }
- if t1a.Equal(t2) {
- t.Fatalf("Expected %s to not be equal to %s", t1a, t2)
- }
-
- if !t1a.Before(t2) {
- t.Fatalf("Expected %s to be before %s", t1a, t2)
- }
- if t1a.Before(t1b) {
- t.Fatalf("Expected %s to not be before %s", t1a, t1b)
- }
-
- if !t2.After(t1a) {
- t.Fatalf("Expected %s to be after %s", t2, t1a)
- }
- if t1b.After(t1a) {
- t.Fatalf("Expected %s to not be after %s", t1b, t1a)
- }
-}
-
-func TestTimeConversions(t *testing.T) {
- unixSecs := int64(1136239445)
- unixNsecs := int64(123456789)
- unixNano := unixSecs*1e9 + unixNsecs
-
- t1 := time.Unix(unixSecs, unixNsecs-unixNsecs%nanosPerTick)
- t2 := time.Unix(unixSecs, unixNsecs)
-
- ts := TimeFromUnixNano(unixNano)
- if !ts.Time().Equal(t1) {
- t.Fatalf("Expected %s, got %s", t1, ts.Time())
- }
-
- // Test available precision.
- ts = TimeFromUnixNano(t2.UnixNano())
- if !ts.Time().Equal(t1) {
- t.Fatalf("Expected %s, got %s", t1, ts.Time())
- }
-
- if ts.UnixNano() != unixNano-unixNano%nanosPerTick {
- t.Fatalf("Expected %d, got %d", unixNano, ts.UnixNano())
- }
-}
-
-func TestDuration(t *testing.T) {
- duration := time.Second + time.Minute + time.Hour
- goTime := time.Unix(1136239445, 0)
-
- ts := TimeFromUnix(goTime.Unix())
- if !goTime.Add(duration).Equal(ts.Add(duration).Time()) {
- t.Fatalf("Expected %s to be equal to %s", goTime.Add(duration), ts.Add(duration))
- }
-
- earlier := ts.Add(-duration)
- delta := ts.Sub(earlier)
- if delta != duration {
- t.Fatalf("Expected %s to be equal to %s", delta, duration)
- }
-}
-
-func TestParseDuration(t *testing.T) {
- var cases = []struct {
- in string
- out time.Duration
- }{
- {
- in: "0s",
- out: 0,
- }, {
- in: "324ms",
- out: 324 * time.Millisecond,
- }, {
- in: "3s",
- out: 3 * time.Second,
- }, {
- in: "5m",
- out: 5 * time.Minute,
- }, {
- in: "1h",
- out: time.Hour,
- }, {
- in: "4d",
- out: 4 * 24 * time.Hour,
- }, {
- in: "3w",
- out: 3 * 7 * 24 * time.Hour,
- }, {
- in: "10y",
- out: 10 * 365 * 24 * time.Hour,
- },
- }
-
- for _, c := range cases {
- d, err := ParseDuration(c.in)
- if err != nil {
- t.Errorf("Unexpected error on input %q", c.in)
- }
- if time.Duration(d) != c.out {
- t.Errorf("Expected %v but got %v", c.out, d)
- }
- if d.String() != c.in {
- t.Errorf("Expected duration string %q but got %q", c.in, d.String())
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/model/value.go b/vendor/github.com/prometheus/common/model/value.go
index c9ed3ffd8..c9d8fb1a2 100644
--- a/vendor/github.com/prometheus/common/model/value.go
+++ b/vendor/github.com/prometheus/common/model/value.go
@@ -100,7 +100,7 @@ func (s *SamplePair) UnmarshalJSON(b []byte) error {
}
// Equal returns true if this SamplePair and o have equal Values and equal
-// Timestamps. The sematics of Value equality is defined by SampleValue.Equal.
+// Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
func (s *SamplePair) Equal(o *SamplePair) bool {
return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp))
}
@@ -117,7 +117,7 @@ type Sample struct {
}
// Equal compares first the metrics, then the timestamp, then the value. The
-// sematics of value equality is defined by SampleValue.Equal.
+// semantics of value equality is defined by SampleValue.Equal.
func (s *Sample) Equal(o *Sample) bool {
if s == o {
return true
diff --git a/vendor/github.com/prometheus/common/model/value_test.go b/vendor/github.com/prometheus/common/model/value_test.go
deleted file mode 100644
index b97dcf84c..000000000
--- a/vendor/github.com/prometheus/common/model/value_test.go
+++ /dev/null
@@ -1,468 +0,0 @@
-// Copyright 2013 The Prometheus Authors
-// 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.
-
-package model
-
-import (
- "encoding/json"
- "math"
- "reflect"
- "sort"
- "testing"
-)
-
-func TestEqualValues(t *testing.T) {
- tests := map[string]struct {
- in1, in2 SampleValue
- want bool
- }{
- "equal floats": {
- in1: 3.14,
- in2: 3.14,
- want: true,
- },
- "unequal floats": {
- in1: 3.14,
- in2: 3.1415,
- want: false,
- },
- "positive inifinities": {
- in1: SampleValue(math.Inf(+1)),
- in2: SampleValue(math.Inf(+1)),
- want: true,
- },
- "negative inifinities": {
- in1: SampleValue(math.Inf(-1)),
- in2: SampleValue(math.Inf(-1)),
- want: true,
- },
- "different inifinities": {
- in1: SampleValue(math.Inf(+1)),
- in2: SampleValue(math.Inf(-1)),
- want: false,
- },
- "number and infinity": {
- in1: 42,
- in2: SampleValue(math.Inf(+1)),
- want: false,
- },
- "number and NaN": {
- in1: 42,
- in2: SampleValue(math.NaN()),
- want: false,
- },
- "NaNs": {
- in1: SampleValue(math.NaN()),
- in2: SampleValue(math.NaN()),
- want: true, // !!!
- },
- }
-
- for name, test := range tests {
- got := test.in1.Equal(test.in2)
- if got != test.want {
- t.Errorf("Comparing %s, %f and %f: got %t, want %t", name, test.in1, test.in2, got, test.want)
- }
- }
-}
-
-func TestEqualSamples(t *testing.T) {
- testSample := &Sample{}
-
- tests := map[string]struct {
- in1, in2 *Sample
- want bool
- }{
- "equal pointers": {
- in1: testSample,
- in2: testSample,
- want: true,
- },
- "different metrics": {
- in1: &Sample{Metric: Metric{"foo": "bar"}},
- in2: &Sample{Metric: Metric{"foo": "biz"}},
- want: false,
- },
- "different timestamp": {
- in1: &Sample{Timestamp: 0},
- in2: &Sample{Timestamp: 1},
- want: false,
- },
- "different value": {
- in1: &Sample{Value: 0},
- in2: &Sample{Value: 1},
- want: false,
- },
- "equal samples": {
- in1: &Sample{
- Metric: Metric{"foo": "bar"},
- Timestamp: 0,
- Value: 1,
- },
- in2: &Sample{
- Metric: Metric{"foo": "bar"},
- Timestamp: 0,
- Value: 1,
- },
- want: true,
- },
- }
-
- for name, test := range tests {
- got := test.in1.Equal(test.in2)
- if got != test.want {
- t.Errorf("Comparing %s, %v and %v: got %t, want %t", name, test.in1, test.in2, got, test.want)
- }
- }
-
-}
-
-func TestSamplePairJSON(t *testing.T) {
- input := []struct {
- plain string
- value SamplePair
- }{
- {
- plain: `[1234.567,"123.1"]`,
- value: SamplePair{
- Value: 123.1,
- Timestamp: 1234567,
- },
- },
- }
-
- for _, test := range input {
- b, err := json.Marshal(test.value)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if string(b) != test.plain {
- t.Errorf("encoding error: expected %q, got %q", test.plain, b)
- continue
- }
-
- var sp SamplePair
- err = json.Unmarshal(b, &sp)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if sp != test.value {
- t.Errorf("decoding error: expected %v, got %v", test.value, sp)
- }
- }
-}
-
-func TestSampleJSON(t *testing.T) {
- input := []struct {
- plain string
- value Sample
- }{
- {
- plain: `{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]}`,
- value: Sample{
- Metric: Metric{
- MetricNameLabel: "test_metric",
- },
- Value: 123.1,
- Timestamp: 1234567,
- },
- },
- }
-
- for _, test := range input {
- b, err := json.Marshal(test.value)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if string(b) != test.plain {
- t.Errorf("encoding error: expected %q, got %q", test.plain, b)
- continue
- }
-
- var sv Sample
- err = json.Unmarshal(b, &sv)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if !reflect.DeepEqual(sv, test.value) {
- t.Errorf("decoding error: expected %v, got %v", test.value, sv)
- }
- }
-}
-
-func TestVectorJSON(t *testing.T) {
- input := []struct {
- plain string
- value Vector
- }{
- {
- plain: `[]`,
- value: Vector{},
- },
- {
- plain: `[{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]}]`,
- value: Vector{&Sample{
- Metric: Metric{
- MetricNameLabel: "test_metric",
- },
- Value: 123.1,
- Timestamp: 1234567,
- }},
- },
- {
- plain: `[{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]},{"metric":{"foo":"bar"},"value":[1.234,"+Inf"]}]`,
- value: Vector{
- &Sample{
- Metric: Metric{
- MetricNameLabel: "test_metric",
- },
- Value: 123.1,
- Timestamp: 1234567,
- },
- &Sample{
- Metric: Metric{
- "foo": "bar",
- },
- Value: SampleValue(math.Inf(1)),
- Timestamp: 1234,
- },
- },
- },
- }
-
- for _, test := range input {
- b, err := json.Marshal(test.value)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if string(b) != test.plain {
- t.Errorf("encoding error: expected %q, got %q", test.plain, b)
- continue
- }
-
- var vec Vector
- err = json.Unmarshal(b, &vec)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if !reflect.DeepEqual(vec, test.value) {
- t.Errorf("decoding error: expected %v, got %v", test.value, vec)
- }
- }
-}
-
-func TestScalarJSON(t *testing.T) {
- input := []struct {
- plain string
- value Scalar
- }{
- {
- plain: `[123.456,"456"]`,
- value: Scalar{
- Timestamp: 123456,
- Value: 456,
- },
- },
- {
- plain: `[123123.456,"+Inf"]`,
- value: Scalar{
- Timestamp: 123123456,
- Value: SampleValue(math.Inf(1)),
- },
- },
- {
- plain: `[123123.456,"-Inf"]`,
- value: Scalar{
- Timestamp: 123123456,
- Value: SampleValue(math.Inf(-1)),
- },
- },
- }
-
- for _, test := range input {
- b, err := json.Marshal(test.value)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if string(b) != test.plain {
- t.Errorf("encoding error: expected %q, got %q", test.plain, b)
- continue
- }
-
- var sv Scalar
- err = json.Unmarshal(b, &sv)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if sv != test.value {
- t.Errorf("decoding error: expected %v, got %v", test.value, sv)
- }
- }
-}
-
-func TestStringJSON(t *testing.T) {
- input := []struct {
- plain string
- value String
- }{
- {
- plain: `[123.456,"test"]`,
- value: String{
- Timestamp: 123456,
- Value: "test",
- },
- },
- {
- plain: `[123123.456,"å°åŒ—"]`,
- value: String{
- Timestamp: 123123456,
- Value: "å°åŒ—",
- },
- },
- }
-
- for _, test := range input {
- b, err := json.Marshal(test.value)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if string(b) != test.plain {
- t.Errorf("encoding error: expected %q, got %q", test.plain, b)
- continue
- }
-
- var sv String
- err = json.Unmarshal(b, &sv)
- if err != nil {
- t.Error(err)
- continue
- }
-
- if sv != test.value {
- t.Errorf("decoding error: expected %v, got %v", test.value, sv)
- }
- }
-}
-
-func TestVectorSort(t *testing.T) {
- input := Vector{
- &Sample{
- Metric: Metric{
- MetricNameLabel: "A",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "A",
- },
- Timestamp: 2,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "C",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "C",
- },
- Timestamp: 2,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "B",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "B",
- },
- Timestamp: 2,
- },
- }
-
- expected := Vector{
- &Sample{
- Metric: Metric{
- MetricNameLabel: "A",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "A",
- },
- Timestamp: 2,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "B",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "B",
- },
- Timestamp: 2,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "C",
- },
- Timestamp: 1,
- },
- &Sample{
- Metric: Metric{
- MetricNameLabel: "C",
- },
- Timestamp: 2,
- },
- }
-
- sort.Sort(input)
-
- for i, actual := range input {
- actualFp := actual.Metric.Fingerprint()
- expectedFp := expected[i].Metric.Fingerprint()
-
- if actualFp != expectedFp {
- t.Fatalf("%d. Incorrect fingerprint. Got %s; want %s", i, actualFp.String(), expectedFp.String())
- }
-
- if actual.Timestamp != expected[i].Timestamp {
- t.Fatalf("%d. Incorrect timestamp. Got %s; want %s", i, actual.Timestamp, expected[i].Timestamp)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/common/promlog/flag/flag.go b/vendor/github.com/prometheus/common/promlog/flag/flag.go
deleted file mode 100644
index b9d361e43..000000000
--- a/vendor/github.com/prometheus/common/promlog/flag/flag.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package flag
-
-import (
- "github.com/prometheus/common/promlog"
- kingpin "gopkg.in/alecthomas/kingpin.v2"
-)
-
-// LevelFlagName is the canonical flag name to configure the allowed log level
-// within Prometheus projects.
-const LevelFlagName = "log.level"
-
-// LevelFlagHelp is the help description for the log.level flag.
-const LevelFlagHelp = "Only log messages with the given severity or above. One of: [debug, info, warn, error]"
-
-// AddFlags adds the flags used by this package to the Kingpin application.
-// To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
-func AddFlags(a *kingpin.Application, logLevel *promlog.AllowedLevel) {
- a.Flag(LevelFlagName, LevelFlagHelp).
- Default("info").SetValue(logLevel)
-}
diff --git a/vendor/github.com/prometheus/common/promlog/log.go b/vendor/github.com/prometheus/common/promlog/log.go
deleted file mode 100644
index cf8307ad2..000000000
--- a/vendor/github.com/prometheus/common/promlog/log.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// Package promlog defines standardised ways to initialize Go kit loggers
-// across Prometheus components.
-// It should typically only ever be imported by main packages.
-package promlog
-
-import (
- "os"
-
- "github.com/go-kit/kit/log"
- "github.com/go-kit/kit/log/level"
- "github.com/pkg/errors"
-)
-
-// AllowedLevel is a settable identifier for the minimum level a log entry
-// must be have.
-type AllowedLevel struct {
- s string
- o level.Option
-}
-
-func (l *AllowedLevel) String() string {
- return l.s
-}
-
-// Set updates the value of the allowed level.
-func (l *AllowedLevel) Set(s string) error {
- switch s {
- case "debug":
- l.o = level.AllowDebug()
- case "info":
- l.o = level.AllowInfo()
- case "warn":
- l.o = level.AllowWarn()
- case "error":
- l.o = level.AllowError()
- default:
- return errors.Errorf("unrecognized log level %q", s)
- }
- l.s = s
- return nil
-}
-
-// New returns a new leveled oklog logger in the logfmt format. Each logged line will be annotated
-// with a timestamp. The output always goes to stderr.
-func New(al AllowedLevel) log.Logger {
- l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
- l = level.NewFilter(l, al.o)
- l = log.With(l, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
- return l
-}
diff --git a/vendor/github.com/prometheus/common/route/route.go b/vendor/github.com/prometheus/common/route/route.go
deleted file mode 100644
index bb4688173..000000000
--- a/vendor/github.com/prometheus/common/route/route.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package route
-
-import (
- "net/http"
-
- "github.com/julienschmidt/httprouter"
- "golang.org/x/net/context"
-)
-
-type param string
-
-// Param returns param p for the context.
-func Param(ctx context.Context, p string) string {
- return ctx.Value(param(p)).(string)
-}
-
-// WithParam returns a new context with param p set to v.
-func WithParam(ctx context.Context, p, v string) context.Context {
- return context.WithValue(ctx, param(p), v)
-}
-
-// Router wraps httprouter.Router and adds support for prefixed sub-routers
-// and per-request context injections.
-type Router struct {
- rtr *httprouter.Router
- prefix string
-}
-
-// New returns a new Router.
-func New() *Router {
- return &Router{
- rtr: httprouter.New(),
- }
-}
-
-// WithPrefix returns a router that prefixes all registered routes with prefix.
-func (r *Router) WithPrefix(prefix string) *Router {
- return &Router{rtr: r.rtr, prefix: r.prefix + prefix}
-}
-
-// handle turns a HandlerFunc into an httprouter.Handle.
-func (r *Router) handle(h http.HandlerFunc) httprouter.Handle {
- return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
-
- for _, p := range params {
- ctx = context.WithValue(ctx, param(p.Key), p.Value)
- }
- h(w, req.WithContext(ctx))
- }
-}
-
-// Get registers a new GET route.
-func (r *Router) Get(path string, h http.HandlerFunc) {
- r.rtr.GET(r.prefix+path, r.handle(h))
-}
-
-// Options registers a new OPTIONS route.
-func (r *Router) Options(path string, h http.HandlerFunc) {
- r.rtr.OPTIONS(r.prefix+path, r.handle(h))
-}
-
-// Del registers a new DELETE route.
-func (r *Router) Del(path string, h http.HandlerFunc) {
- r.rtr.DELETE(r.prefix+path, r.handle(h))
-}
-
-// Put registers a new PUT route.
-func (r *Router) Put(path string, h http.HandlerFunc) {
- r.rtr.PUT(r.prefix+path, r.handle(h))
-}
-
-// Post registers a new POST route.
-func (r *Router) Post(path string, h http.HandlerFunc) {
- r.rtr.POST(r.prefix+path, r.handle(h))
-}
-
-// Redirect takes an absolute path and sends an internal HTTP redirect for it,
-// prefixed by the router's path prefix. Note that this method does not include
-// functionality for handling relative paths or full URL redirects.
-func (r *Router) Redirect(w http.ResponseWriter, req *http.Request, path string, code int) {
- http.Redirect(w, req, r.prefix+path, code)
-}
-
-// ServeHTTP implements http.Handler.
-func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- r.rtr.ServeHTTP(w, req)
-}
-
-// FileServe returns a new http.HandlerFunc that serves files from dir.
-// Using routes must provide the *filepath parameter.
-func FileServe(dir string) http.HandlerFunc {
- fs := http.FileServer(http.Dir(dir))
-
- return func(w http.ResponseWriter, r *http.Request) {
- r.URL.Path = Param(r.Context(), "filepath")
- fs.ServeHTTP(w, r)
- }
-}
diff --git a/vendor/github.com/prometheus/common/route/route_test.go b/vendor/github.com/prometheus/common/route/route_test.go
deleted file mode 100644
index a9bb20996..000000000
--- a/vendor/github.com/prometheus/common/route/route_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package route
-
-import (
- "net/http"
- "net/http/httptest"
- "testing"
-)
-
-func TestRedirect(t *testing.T) {
- router := New().WithPrefix("/test/prefix")
- w := httptest.NewRecorder()
- r, err := http.NewRequest("GET", "http://localhost:9090/foo", nil)
- if err != nil {
- t.Fatalf("Error building test request: %s", err)
- }
-
- router.Redirect(w, r, "/some/endpoint", http.StatusFound)
- if w.Code != http.StatusFound {
- t.Fatalf("Unexpected redirect status code: got %d, want %d", w.Code, http.StatusFound)
- }
-
- want := "/test/prefix/some/endpoint"
- got := w.Header()["Location"][0]
- if want != got {
- t.Fatalf("Unexpected redirect location: got %s, want %s", got, want)
- }
-}
-
-func TestContext(t *testing.T) {
- router := New()
- router.Get("/test/:foo/", func(w http.ResponseWriter, r *http.Request) {
- want := "bar"
- got := Param(r.Context(), "foo")
- if want != got {
- t.Fatalf("Unexpected context value: want %q, got %q", want, got)
- }
- })
-
- r, err := http.NewRequest("GET", "http://localhost:9090/test/bar/", nil)
- if err != nil {
- t.Fatalf("Error building test request: %s", err)
- }
- router.ServeHTTP(nil, r)
-}
diff --git a/vendor/github.com/prometheus/common/version/info.go b/vendor/github.com/prometheus/common/version/info.go
deleted file mode 100644
index 84489a510..000000000
--- a/vendor/github.com/prometheus/common/version/info.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2016 The Prometheus Authors
-// 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.
-
-package version
-
-import (
- "bytes"
- "fmt"
- "runtime"
- "strings"
- "text/template"
-
- "github.com/prometheus/client_golang/prometheus"
-)
-
-// Build information. Populated at build-time.
-var (
- Version string
- Revision string
- Branch string
- BuildUser string
- BuildDate string
- GoVersion = runtime.Version()
-)
-
-// NewCollector returns a collector which exports metrics about current version information.
-func NewCollector(program string) *prometheus.GaugeVec {
- buildInfo := prometheus.NewGaugeVec(
- prometheus.GaugeOpts{
- Namespace: program,
- Name: "build_info",
- Help: fmt.Sprintf(
- "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which %s was built.",
- program,
- ),
- },
- []string{"version", "revision", "branch", "goversion"},
- )
- buildInfo.WithLabelValues(Version, Revision, Branch, GoVersion).Set(1)
- return buildInfo
-}
-
-// versionInfoTmpl contains the template used by Info.
-var versionInfoTmpl = `
-{{.program}}, version {{.version}} (branch: {{.branch}}, revision: {{.revision}})
- build user: {{.buildUser}}
- build date: {{.buildDate}}
- go version: {{.goVersion}}
-`
-
-// Print returns version information.
-func Print(program string) string {
- m := map[string]string{
- "program": program,
- "version": Version,
- "revision": Revision,
- "branch": Branch,
- "buildUser": BuildUser,
- "buildDate": BuildDate,
- "goVersion": GoVersion,
- }
- t := template.Must(template.New("version").Parse(versionInfoTmpl))
-
- var buf bytes.Buffer
- if err := t.ExecuteTemplate(&buf, "version", m); err != nil {
- panic(err)
- }
- return strings.TrimSpace(buf.String())
-}
-
-// Info returns version, branch and revision information.
-func Info() string {
- return fmt.Sprintf("(version=%s, branch=%s, revision=%s)", Version, Branch, Revision)
-}
-
-// BuildContext returns goVersion, buildUser and buildDate information.
-func BuildContext() string {
- return fmt.Sprintf("(go=%s, user=%s, date=%s)", GoVersion, BuildUser, BuildDate)
-}
diff --git a/vendor/github.com/prometheus/procfs/.gitignore b/vendor/github.com/prometheus/procfs/.gitignore
new file mode 100644
index 000000000..25e3659ab
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/.gitignore
@@ -0,0 +1 @@
+/fixtures/
diff --git a/vendor/github.com/prometheus/procfs/.travis.yml b/vendor/github.com/prometheus/procfs/.travis.yml
index 0dc42122b..5416cf8a2 100644
--- a/vendor/github.com/prometheus/procfs/.travis.yml
+++ b/vendor/github.com/prometheus/procfs/.travis.yml
@@ -3,7 +3,13 @@ sudo: false
language: go
go:
+- 1.7.x
+- 1.8.x
- 1.9.x
+- 1.10.x
- 1.x
go_import_path: github.com/prometheus/procfs
+
+script:
+- make style check_license vet test staticcheck
diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile
index dd48afdcd..5c8f72625 100644
--- a/vendor/github.com/prometheus/procfs/Makefile
+++ b/vendor/github.com/prometheus/procfs/Makefile
@@ -1,18 +1,71 @@
-ci: fmt lint test
+# Copyright 2018 The Prometheus Authors
+# 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.
-fmt:
- ! gofmt -l *.go | read nothing
- go vet
+# Ensure GOBIN is not set during build so that promu is installed to the correct path
+unexport GOBIN
-lint:
- go get github.com/golang/lint/golint
- golint *.go
+GO ?= go
+GOFMT ?= $(GO)fmt
+FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH)))
+STATICCHECK := $(FIRST_GOPATH)/bin/staticcheck
+pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
-test: sysfs/fixtures/.unpacked
- go test -v ./...
+PREFIX ?= $(shell pwd)
+BIN_DIR ?= $(shell pwd)
-sysfs/fixtures/.unpacked: sysfs/fixtures.ttar
- ./ttar -C sysfs -x -f sysfs/fixtures.ttar
+ifdef DEBUG
+ bindata_flags = -debug
+endif
+
+STATICCHECK_IGNORE =
+
+all: format staticcheck build test
+
+style:
+ @echo ">> checking code style"
+ @! $(GOFMT) -d $(shell find . -path ./vendor -prune -o -name '*.go' -print) | grep '^'
+
+check_license:
+ @echo ">> checking license header"
+ @./scripts/check_license.sh
+
+test: fixtures/.unpacked sysfs/fixtures/.unpacked
+ @echo ">> running all tests"
+ @$(GO) test -race $(shell $(GO) list ./... | grep -v /vendor/ | grep -v examples)
+
+format:
+ @echo ">> formatting code"
+ @$(GO) fmt $(pkgs)
+
+vet:
+ @echo ">> vetting code"
+ @$(GO) vet $(pkgs)
+
+staticcheck: $(STATICCHECK)
+ @echo ">> running staticcheck"
+ @$(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" $(pkgs)
+
+%/.unpacked: %.ttar
+ ./ttar -C $(dir $*) -x -f $*.ttar
touch $@
-.PHONY: fmt lint test ci
+$(FIRST_GOPATH)/bin/staticcheck:
+ @GOOS= GOARCH= $(GO) get -u honnef.co/go/tools/cmd/staticcheck
+
+.PHONY: all style check_license format test vet staticcheck
+
+# Declaring the binaries at their default locations as PHONY targets is a hack
+# to ensure the latest version is downloaded on every make execution.
+# If this is not desired, copy/symlink these binaries to a different path and
+# set the respective environment variables.
+.PHONY: $(GOPATH)/bin/staticcheck
diff --git a/vendor/github.com/prometheus/procfs/bcache/bcache.go b/vendor/github.com/prometheus/procfs/bcache/bcache.go
deleted file mode 100644
index 1db178cec..000000000
--- a/vendor/github.com/prometheus/procfs/bcache/bcache.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// Package bcache provides access to statistics exposed by the bcache (Linux
-// block cache).
-package bcache
-
-// Stats contains bcache runtime statistics, parsed from /sys/fs/bcache/.
-//
-// The names and meanings of each statistic were taken from bcache.txt and
-// files in drivers/md/bcache in the Linux kernel source. Counters are uint64
-// (in-kernel counters are mostly unsigned long).
-type Stats struct {
- // The name of the bcache used to source these statistics.
- Name string
- Bcache BcacheStats
- Bdevs []BdevStats
- Caches []CacheStats
-}
-
-// BcacheStats contains statistics tied to a bcache ID.
-type BcacheStats struct {
- AverageKeySize uint64
- BtreeCacheSize uint64
- CacheAvailablePercent uint64
- Congested uint64
- RootUsagePercent uint64
- TreeDepth uint64
- Internal InternalStats
- FiveMin PeriodStats
- Total PeriodStats
-}
-
-// BdevStats contains statistics for one backing device.
-type BdevStats struct {
- Name string
- DirtyData uint64
- FiveMin PeriodStats
- Total PeriodStats
-}
-
-// CacheStats contains statistics for one cache device.
-type CacheStats struct {
- Name string
- IOErrors uint64
- MetadataWritten uint64
- Written uint64
- Priority PriorityStats
-}
-
-// PriorityStats contains statistics from the priority_stats file.
-type PriorityStats struct {
- UnusedPercent uint64
- MetadataPercent uint64
-}
-
-// InternalStats contains internal bcache statistics.
-type InternalStats struct {
- ActiveJournalEntries uint64
- BtreeNodes uint64
- BtreeReadAverageDurationNanoSeconds uint64
- CacheReadRaces uint64
-}
-
-// PeriodStats contains statistics for a time period (5 min or total).
-type PeriodStats struct {
- Bypassed uint64
- CacheBypassHits uint64
- CacheBypassMisses uint64
- CacheHits uint64
- CacheMissCollisions uint64
- CacheMisses uint64
- CacheReadaheads uint64
-}
diff --git a/vendor/github.com/prometheus/procfs/bcache/get.go b/vendor/github.com/prometheus/procfs/bcache/get.go
deleted file mode 100644
index b6d97de15..000000000
--- a/vendor/github.com/prometheus/procfs/bcache/get.go
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package bcache
-
-import (
- "bufio"
- "fmt"
- "io/ioutil"
- "os"
- "path"
- "path/filepath"
- "strconv"
- "strings"
-)
-
-// ParsePseudoFloat parses the peculiar format produced by bcache's bch_hprint.
-func parsePseudoFloat(str string) (float64, error) {
- ss := strings.Split(str, ".")
-
- intPart, err := strconv.ParseFloat(ss[0], 64)
- if err != nil {
- return 0, err
- }
-
- if len(ss) == 1 {
- // Pure integers are fine.
- return intPart, nil
- }
- fracPart, err := strconv.ParseFloat(ss[1], 64)
- if err != nil {
- return 0, err
- }
- // fracPart is a number between 0 and 1023 divided by 100; it is off
- // by a small amount. Unexpected bumps in time lines may occur because
- // for bch_hprint .1 != .10 and .10 > .9 (at least up to Linux
- // v4.12-rc3).
-
- // Restore the proper order:
- fracPart = fracPart / 10.24
- return intPart + fracPart, nil
-}
-
-// Dehumanize converts a human-readable byte slice into a uint64.
-func dehumanize(hbytes []byte) (uint64, error) {
- ll := len(hbytes)
- if ll == 0 {
- return 0, fmt.Errorf("zero-length reply")
- }
- lastByte := hbytes[ll-1]
- mul := float64(1)
- var (
- mant float64
- err error
- )
- // If lastByte is beyond the range of ASCII digits, it must be a
- // multiplier.
- if lastByte > 57 {
- // Remove multiplier from slice.
- hbytes = hbytes[:len(hbytes)-1]
-
- const (
- _ = 1 << (10 * iota)
- KiB
- MiB
- GiB
- TiB
- PiB
- EiB
- ZiB
- YiB
- )
-
- multipliers := map[rune]float64{
- // Source for conversion rules:
- // linux-kernel/drivers/md/bcache/util.c:bch_hprint()
- 'k': KiB,
- 'M': MiB,
- 'G': GiB,
- 'T': TiB,
- 'P': PiB,
- 'E': EiB,
- 'Z': ZiB,
- 'Y': YiB,
- }
- mul = multipliers[rune(lastByte)]
- mant, err = parsePseudoFloat(string(hbytes))
- if err != nil {
- return 0, err
- }
- } else {
- // Not humanized by bch_hprint
- mant, err = strconv.ParseFloat(string(hbytes), 64)
- if err != nil {
- return 0, err
- }
- }
- res := uint64(mant * mul)
- return res, nil
-}
-
-type parser struct {
- uuidPath string
- subDir string
- currentDir string
- err error
-}
-
-func (p *parser) setSubDir(pathElements ...string) {
- p.subDir = path.Join(pathElements...)
- p.currentDir = path.Join(p.uuidPath, p.subDir)
-}
-
-func (p *parser) readValue(fileName string) uint64 {
- if p.err != nil {
- return 0
- }
- path := path.Join(p.currentDir, fileName)
- byt, err := ioutil.ReadFile(path)
- if err != nil {
- p.err = fmt.Errorf("failed to read: %s", path)
- return 0
- }
- // Remove trailing newline.
- byt = byt[:len(byt)-1]
- res, err := dehumanize(byt)
- p.err = err
- return res
-}
-
-// ParsePriorityStats parses lines from the priority_stats file.
-func parsePriorityStats(line string, ps *PriorityStats) error {
- var (
- value uint64
- err error
- )
- switch {
- case strings.HasPrefix(line, "Unused:"):
- fields := strings.Fields(line)
- rawValue := fields[len(fields)-1]
- valueStr := strings.TrimSuffix(rawValue, "%")
- value, err = strconv.ParseUint(valueStr, 10, 64)
- if err != nil {
- return err
- }
- ps.UnusedPercent = value
- case strings.HasPrefix(line, "Metadata:"):
- fields := strings.Fields(line)
- rawValue := fields[len(fields)-1]
- valueStr := strings.TrimSuffix(rawValue, "%")
- value, err = strconv.ParseUint(valueStr, 10, 64)
- if err != nil {
- return err
- }
- ps.MetadataPercent = value
- }
- return nil
-}
-
-func (p *parser) getPriorityStats() PriorityStats {
- var res PriorityStats
-
- if p.err != nil {
- return res
- }
-
- path := path.Join(p.currentDir, "priority_stats")
-
- file, err := os.Open(path)
- if err != nil {
- p.err = fmt.Errorf("failed to read: %s", path)
- return res
- }
- defer file.Close()
-
- scanner := bufio.NewScanner(file)
- for scanner.Scan() {
- err = parsePriorityStats(scanner.Text(), &res)
- if err != nil {
- p.err = fmt.Errorf("failed to parse: %s (%s)", path, err)
- return res
- }
- }
- if err := scanner.Err(); err != nil {
- p.err = fmt.Errorf("failed to parse: %s (%s)", path, err)
- return res
- }
- return res
-}
-
-// GetStats collects from sysfs files data tied to one bcache ID.
-func GetStats(uuidPath string) (*Stats, error) {
- var bs Stats
-
- par := parser{uuidPath: uuidPath}
-
- // bcache stats
-
- // dir <uuidPath>
- par.setSubDir("")
- bs.Bcache.AverageKeySize = par.readValue("average_key_size")
- bs.Bcache.BtreeCacheSize = par.readValue("btree_cache_size")
- bs.Bcache.CacheAvailablePercent = par.readValue("cache_available_percent")
- bs.Bcache.Congested = par.readValue("congested")
- bs.Bcache.RootUsagePercent = par.readValue("root_usage_percent")
- bs.Bcache.TreeDepth = par.readValue("tree_depth")
-
- // bcache stats (internal)
-
- // dir <uuidPath>/internal
- par.setSubDir("internal")
- bs.Bcache.Internal.ActiveJournalEntries = par.readValue("active_journal_entries")
- bs.Bcache.Internal.BtreeNodes = par.readValue("btree_nodes")
- bs.Bcache.Internal.BtreeReadAverageDurationNanoSeconds = par.readValue("btree_read_average_duration_us")
- bs.Bcache.Internal.CacheReadRaces = par.readValue("cache_read_races")
-
- // bcache stats (period)
-
- // dir <uuidPath>/stats_five_minute
- par.setSubDir("stats_five_minute")
- bs.Bcache.FiveMin.Bypassed = par.readValue("bypassed")
- bs.Bcache.FiveMin.CacheHits = par.readValue("cache_hits")
-
- bs.Bcache.FiveMin.Bypassed = par.readValue("bypassed")
- bs.Bcache.FiveMin.CacheBypassHits = par.readValue("cache_bypass_hits")
- bs.Bcache.FiveMin.CacheBypassMisses = par.readValue("cache_bypass_misses")
- bs.Bcache.FiveMin.CacheHits = par.readValue("cache_hits")
- bs.Bcache.FiveMin.CacheMissCollisions = par.readValue("cache_miss_collisions")
- bs.Bcache.FiveMin.CacheMisses = par.readValue("cache_misses")
- bs.Bcache.FiveMin.CacheReadaheads = par.readValue("cache_readaheads")
-
- // dir <uuidPath>/stats_total
- par.setSubDir("stats_total")
- bs.Bcache.Total.Bypassed = par.readValue("bypassed")
- bs.Bcache.Total.CacheHits = par.readValue("cache_hits")
-
- bs.Bcache.Total.Bypassed = par.readValue("bypassed")
- bs.Bcache.Total.CacheBypassHits = par.readValue("cache_bypass_hits")
- bs.Bcache.Total.CacheBypassMisses = par.readValue("cache_bypass_misses")
- bs.Bcache.Total.CacheHits = par.readValue("cache_hits")
- bs.Bcache.Total.CacheMissCollisions = par.readValue("cache_miss_collisions")
- bs.Bcache.Total.CacheMisses = par.readValue("cache_misses")
- bs.Bcache.Total.CacheReadaheads = par.readValue("cache_readaheads")
-
- if par.err != nil {
- return nil, par.err
- }
-
- // bdev stats
-
- reg := path.Join(uuidPath, "bdev[0-9]*")
- bdevDirs, err := filepath.Glob(reg)
- if err != nil {
- return nil, err
- }
-
- bs.Bdevs = make([]BdevStats, len(bdevDirs))
-
- for ii, bdevDir := range bdevDirs {
- var bds = &bs.Bdevs[ii]
-
- bds.Name = filepath.Base(bdevDir)
-
- par.setSubDir(bds.Name)
- bds.DirtyData = par.readValue("dirty_data")
-
- // dir <uuidPath>/<bds.Name>/stats_five_minute
- par.setSubDir(bds.Name, "stats_five_minute")
- bds.FiveMin.Bypassed = par.readValue("bypassed")
- bds.FiveMin.CacheBypassHits = par.readValue("cache_bypass_hits")
- bds.FiveMin.CacheBypassMisses = par.readValue("cache_bypass_misses")
- bds.FiveMin.CacheHits = par.readValue("cache_hits")
- bds.FiveMin.CacheMissCollisions = par.readValue("cache_miss_collisions")
- bds.FiveMin.CacheMisses = par.readValue("cache_misses")
- bds.FiveMin.CacheReadaheads = par.readValue("cache_readaheads")
-
- // dir <uuidPath>/<bds.Name>/stats_total
- par.setSubDir("stats_total")
- bds.Total.Bypassed = par.readValue("bypassed")
- bds.Total.CacheBypassHits = par.readValue("cache_bypass_hits")
- bds.Total.CacheBypassMisses = par.readValue("cache_bypass_misses")
- bds.Total.CacheHits = par.readValue("cache_hits")
- bds.Total.CacheMissCollisions = par.readValue("cache_miss_collisions")
- bds.Total.CacheMisses = par.readValue("cache_misses")
- bds.Total.CacheReadaheads = par.readValue("cache_readaheads")
- }
-
- if par.err != nil {
- return nil, par.err
- }
-
- // cache stats
-
- reg = path.Join(uuidPath, "cache[0-9]*")
- cacheDirs, err := filepath.Glob(reg)
- if err != nil {
- return nil, err
- }
- bs.Caches = make([]CacheStats, len(cacheDirs))
-
- for ii, cacheDir := range cacheDirs {
- var cs = &bs.Caches[ii]
- cs.Name = filepath.Base(cacheDir)
-
- // dir is <uuidPath>/<cs.Name>
- par.setSubDir(cs.Name)
- cs.IOErrors = par.readValue("io_errors")
- cs.MetadataWritten = par.readValue("metadata_written")
- cs.Written = par.readValue("written")
-
- ps := par.getPriorityStats()
- cs.Priority = ps
- }
-
- if par.err != nil {
- return nil, par.err
- }
-
- return &bs, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/bcache/get_test.go b/vendor/github.com/prometheus/procfs/bcache/get_test.go
deleted file mode 100644
index 1d41a5ad3..000000000
--- a/vendor/github.com/prometheus/procfs/bcache/get_test.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package bcache
-
-import (
- "math"
- "testing"
-)
-
-func TestDehumanizeTests(t *testing.T) {
- dehumanizeTests := []struct {
- in []byte
- out uint64
- invalid bool
- }{
- {
- in: []byte("542k"),
- out: 555008,
- },
- {
- in: []byte("322M"),
- out: 337641472,
- },
- {
- in: []byte("1.1k"),
- out: 1124,
- },
- {
- in: []byte("1.9k"),
- out: 1924,
- },
- {
- in: []byte("1.10k"),
- out: 2024,
- },
- {
- in: []byte(""),
- out: 0,
- invalid: true,
- },
- }
- for _, tst := range dehumanizeTests {
- got, err := dehumanize(tst.in)
- if tst.invalid && err == nil {
- t.Error("expected an error, but none occurred")
- }
- if !tst.invalid && err != nil {
- t.Errorf("unexpected error: %v", err)
- }
- if got != tst.out {
- t.Errorf("dehumanize: '%s', want %d, got %d", tst.in, tst.out, got)
- }
- }
-}
-
-func TestParsePseudoFloatTests(t *testing.T) {
- parsePseudoFloatTests := []struct {
- in string
- out float64
- }{
- {
- in: "1.1",
- out: float64(1.097656),
- },
- {
- in: "1.9",
- out: float64(1.878906),
- },
- {
- in: "1.10",
- out: float64(1.976562),
- },
- }
- for _, tst := range parsePseudoFloatTests {
- got, err := parsePseudoFloat(tst.in)
- if err != nil || math.Abs(got-tst.out) > 0.0001 {
- t.Errorf("parsePseudoFloat: %s, want %f, got %f", tst.in, tst.out, got)
- }
- }
-}
-
-func TestPriorityStats(t *testing.T) {
- var want = PriorityStats{
- UnusedPercent: 99,
- MetadataPercent: 5,
- }
- var (
- in string
- gotErr error
- got PriorityStats
- )
- in = "Metadata: 5%"
- gotErr = parsePriorityStats(in, &got)
- if gotErr != nil || got.MetadataPercent != want.MetadataPercent {
- t.Errorf("parsePriorityStats: '%s', want %d, got %d", in, want.MetadataPercent, got.MetadataPercent)
- }
-
- in = "Unused: 99%"
- gotErr = parsePriorityStats(in, &got)
- if gotErr != nil || got.UnusedPercent != want.UnusedPercent {
- t.Errorf("parsePriorityStats: '%s', want %d, got %d", in, want.UnusedPercent, got.UnusedPercent)
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/buddyinfo_test.go b/vendor/github.com/prometheus/procfs/buddyinfo_test.go
deleted file mode 100644
index bcf9355ca..000000000
--- a/vendor/github.com/prometheus/procfs/buddyinfo_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package procfs
-
-import (
- "strings"
- "testing"
-)
-
-func TestBuddyInfo(t *testing.T) {
- buddyInfo, err := FS("fixtures/buddyinfo/valid").NewBuddyInfo()
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := "DMA", buddyInfo[0].Zone; want != got {
- t.Errorf("want Node 0, Zone %s, got %s", want, got)
- }
-
- if want, got := "Normal", buddyInfo[2].Zone; want != got {
- t.Errorf("want Node 0, Zone %s, got %s", want, got)
- }
-
- if want, got := 4381.0, buddyInfo[2].Sizes[0]; want != got {
- t.Errorf("want Node 0, Zone Normal %f, got %f", want, got)
- }
-
- if want, got := 572.0, buddyInfo[1].Sizes[1]; want != got {
- t.Errorf("want Node 0, Zone DMA32 %f, got %f", want, got)
- }
-}
-
-func TestBuddyInfoShort(t *testing.T) {
- _, err := FS("fixtures/buddyinfo/short").NewBuddyInfo()
- if err == nil {
- t.Errorf("expected error, but none occurred")
- }
-
- if want, got := "invalid number of fields when parsing buddyinfo", err.Error(); want != got {
- t.Errorf("wrong error returned, wanted %q, got %q", want, got)
- }
-}
-
-func TestBuddyInfoSizeMismatch(t *testing.T) {
- _, err := FS("fixtures/buddyinfo/sizemismatch").NewBuddyInfo()
- if err == nil {
- t.Errorf("expected error, but none occurred")
- }
-
- if want, got := "mismatch in number of buddyinfo buckets", err.Error(); !strings.HasPrefix(got, want) {
- t.Errorf("wrong error returned, wanted prefix %q, got %q", want, got)
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/fixtures.ttar b/vendor/github.com/prometheus/procfs/fixtures.ttar
new file mode 100644
index 000000000..3ee8291e8
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/fixtures.ttar
@@ -0,0 +1,446 @@
+# Archive created by ttar -c -f fixtures.ttar fixtures/
+Directory: fixtures
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26231
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/cmdline
+Lines: 1
+vimNULLBYTEtest.goNULLBYTE+10NULLBYTEEOF
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/comm
+Lines: 1
+vim
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/exe
+SymlinkTo: /usr/bin/vim
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26231/fd
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/fd/0
+SymlinkTo: ../../symlinktargets/abc
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/fd/1
+SymlinkTo: ../../symlinktargets/def
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/fd/10
+SymlinkTo: ../../symlinktargets/xyz
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/fd/2
+SymlinkTo: ../../symlinktargets/ghi
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/fd/3
+SymlinkTo: ../../symlinktargets/uvw
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/io
+Lines: 7
+rchar: 750339
+wchar: 818609
+syscr: 7405
+syscw: 5245
+read_bytes: 1024
+write_bytes: 2048
+cancelled_write_bytes: -1024
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/limits
+Lines: 17
+Limit Soft Limit Hard Limit Units
+Max cpu time unlimited unlimited seconds
+Max file size unlimited unlimited bytes
+Max data size unlimited unlimited bytes
+Max stack size 8388608 unlimited bytes
+Max core file size 0 unlimited bytes
+Max resident set unlimited unlimited bytes
+Max processes 62898 62898 processes
+Max open files 2048 4096 files
+Max locked memory 65536 65536 bytes
+Max address space 8589934592 unlimited bytes
+Max file locks unlimited unlimited locks
+Max pending signals 62898 62898 signals
+Max msgqueue size 819200 819200 bytes
+Max nice priority 0 0
+Max realtime priority 0 0
+Max realtime timeout unlimited unlimited us
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/mountstats
+Lines: 19
+device rootfs mounted on / with fstype rootfs
+device sysfs mounted on /sys with fstype sysfs
+device proc mounted on /proc with fstype proc
+device /dev/sda1 mounted on / with fstype ext4
+device 192.168.1.1:/srv/test mounted on /mnt/nfs/test with fstype nfs4 statvers=1.1
+ opts: rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none
+ age: 13968
+ caps: caps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255
+ nfsv4: bm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured
+ sec: flavor=1,pseudoflavor=1
+ events: 52 226 0 0 1 13 398 0 0 331 0 47 0 0 77 0 0 77 0 0 0 0 0 0 0 0 0
+ bytes: 1207640230 0 0 0 1210214218 0 295483 0
+ RPC iostats version: 1.0 p/v: 100003/4 (nfs)
+ xprt: tcp 832 0 1 0 11 6428 6428 0 12154 0 24 26 5726
+ per-op statistics
+ NULL: 0 0 0 0 0 0 0 0
+ READ: 1298 1298 0 207680 1210292152 6 79386 79407
+ WRITE: 0 0 0 0 0 0 0 0
+
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26231/net
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/net/dev
+Lines: 4
+Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ eth0: 438 5 0 0 0 0 0 0 648 8 0 0 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26231/ns
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/ns/mnt
+SymlinkTo: mnt:[4026531840]
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/ns/net
+SymlinkTo: net:[4026531993]
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/stat
+Lines: 1
+26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26232
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/cmdline
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/comm
+Lines: 1
+ata_sff
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26232/fd
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/fd/0
+SymlinkTo: ../../symlinktargets/abc
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/fd/1
+SymlinkTo: ../../symlinktargets/def
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/fd/2
+SymlinkTo: ../../symlinktargets/ghi
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/fd/3
+SymlinkTo: ../../symlinktargets/uvw
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/fd/4
+SymlinkTo: ../../symlinktargets/xyz
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/limits
+Lines: 17
+Limit Soft Limit Hard Limit Units
+Max cpu time unlimited unlimited seconds
+Max file size unlimited unlimited bytes
+Max data size unlimited unlimited bytes
+Max stack size 8388608 unlimited bytes
+Max core file size 0 unlimited bytes
+Max resident set unlimited unlimited bytes
+Max processes 29436 29436 processes
+Max open files 1024 4096 files
+Max locked memory 65536 65536 bytes
+Max address space unlimited unlimited bytes
+Max file locks unlimited unlimited locks
+Max pending signals 29436 29436 signals
+Max msgqueue size 819200 819200 bytes
+Max nice priority 0 0
+Max realtime priority 0 0
+Max realtime timeout unlimited unlimited us
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/stat
+Lines: 1
+33 (ata_sff) S 2 0 0 0 -1 69238880 0 0 0 0 0 0 0 0 0 -20 1 0 5 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/26233
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26233/cmdline
+Lines: 1
+com.github.uiautomatorNULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTEEOF
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/584
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/584/stat
+Lines: 2
+1020 ((a b ) ( c d) ) R 28378 1020 28378 34842 1020 4218880 286 0 0 0 0 0 0 0 20 0 1 0 10839175 10395648 155 18446744073709551615 4194304 4238788 140736466511168 140736466511168 140609271124624 0 0 0 0 0 0 0 17 5 0 0 0 0 0 6336016 6337300 25579520 140736466515030 140736466515061 140736466515061 140736466518002 0
+#!/bin/cat /proc/self/stat
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/buddyinfo
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/buddyinfo/short
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/buddyinfo/short/buddyinfo
+Lines: 3
+Node 0, zone
+Node 0, zone
+Node 0, zone
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/buddyinfo/sizemismatch
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/buddyinfo/sizemismatch/buddyinfo
+Lines: 3
+Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3
+Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0 0
+Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/buddyinfo/valid
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/buddyinfo/valid/buddyinfo
+Lines: 3
+Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3
+Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0
+Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/fs
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/fs/xfs
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/fs/xfs/stat
+Lines: 23
+extent_alloc 92447 97589 92448 93751
+abt 0 0 0 0
+blk_map 1767055 188820 184891 92447 92448 2140766 0
+bmbt 0 0 0 0
+dir 185039 92447 92444 136422
+trans 706 944304 0
+ig 185045 58807 0 126238 0 33637 22
+log 2883 113448 9 17360 739
+push_ail 945014 0 134260 15483 0 3940 464 159985 0 40
+xstrat 92447 0
+rw 107739 94045
+attr 4 0 0 0
+icluster 8677 7849 135802
+vnodes 92601 0 0 0 92444 92444 92444 0
+buf 2666287 7122 2659202 3599 2 7085 0 10297 7085
+abtb2 184941 1277345 13257 13278 0 0 0 0 0 0 0 0 0 0 2746147
+abtc2 345295 2416764 172637 172658 0 0 0 0 0 0 0 0 0 0 21406023
+bmbt2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ibt2 343004 1358467 0 0 0 0 0 0 0 0 0 0 0 0 0
+fibt2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+qm 0 0 0 0 0 0 0 0
+xpc 399724544 92823103 86219234
+debug 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/mdstat
+Lines: 26
+Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
+md3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9]
+ 5853468288 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
+
+md127 : active raid1 sdi2[0] sdj2[1]
+ 312319552 blocks [2/2] [UU]
+
+md0 : active raid1 sdk[2](S) sdi1[0] sdj1[1]
+ 248896 blocks [2/2] [UU]
+
+md4 : inactive raid1 sda3[0] sdb3[1]
+ 4883648 blocks [2/2] [UU]
+
+md6 : active raid1 sdb2[2] sda2[0]
+ 195310144 blocks [2/1] [U_]
+ [=>...................] recovery = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec
+
+md8 : active raid1 sdb1[1] sda1[0]
+ 195310144 blocks [2/2] [UU]
+ [=>...................] resync = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec
+
+md7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1]
+ 7813735424 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/3] [U_UU]
+ bitmap: 0/30 pages [0KB], 65536KB chunk
+
+unused devices: <none>
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/net
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/dev
+Lines: 6
+Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+vethf345468: 648 8 0 0 0 0 0 0 438 5 0 0 0 0 0 0
+ lo: 1664039048 1566805 0 0 0 0 0 0 1664039048 1566805 0 0 0 0 0 0
+docker0: 2568 38 0 0 0 0 0 0 438 5 0 0 0 0 0 0
+ eth0: 874354587 1036395 0 0 0 0 0 0 563352563 732147 0 0 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/ip_vs
+Lines: 21
+IP Virtual Server version 1.2.1 (size=4096)
+Prot LocalAddress:Port Scheduler Flags
+ -> RemoteAddress:Port Forward Weight ActiveConn InActConn
+TCP C0A80016:0CEA wlc
+ -> C0A85216:0CEA Tunnel 100 248 2
+ -> C0A85318:0CEA Tunnel 100 248 2
+ -> C0A85315:0CEA Tunnel 100 248 1
+TCP C0A80039:0CEA wlc
+ -> C0A85416:0CEA Tunnel 0 0 0
+ -> C0A85215:0CEA Tunnel 100 1499 0
+ -> C0A83215:0CEA Tunnel 100 1498 0
+TCP C0A80037:0CEA wlc
+ -> C0A8321A:0CEA Tunnel 0 0 0
+ -> C0A83120:0CEA Tunnel 100 0 0
+TCP [2620:0000:0000:0000:0000:0000:0000:0001]:0050 sh
+ -> [2620:0000:0000:0000:0000:0000:0000:0002]:0050 Route 1 0 0
+ -> [2620:0000:0000:0000:0000:0000:0000:0003]:0050 Route 1 0 0
+ -> [2620:0000:0000:0000:0000:0000:0000:0004]:0050 Route 1 1 1
+FWM 10001000 wlc
+ -> C0A8321A:0CEA Route 0 0 1
+ -> C0A83215:0CEA Route 0 0 2
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/ip_vs_stats
+Lines: 6
+ Total Incoming Outgoing Incoming Outgoing
+ Conns Packets Packets Bytes Bytes
+ 16AA370 E33656E5 0 51D8C8883AB3 0
+
+ Conns/s Pkts/s Pkts/s Bytes/s Bytes/s
+ 4 1FB3C 0 1282A8F 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/net/rpc
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/rpc/nfs
+Lines: 5
+net 18628 0 18628 6
+rpc 4329785 0 4338291
+proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
+proc3 22 1 4084749 29200 94754 32580 186 47747 7981 8639 0 6356 0 6962 0 7958 0 0 241 4 4 2 39
+proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/rpc/nfsd
+Lines: 11
+rc 0 6 18622
+fh 0 0 0 0 0
+io 157286400 0
+th 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
+ra 32 0 0 0 0 0 0 0 0 0 0 0
+net 18628 0 18628 6
+rpc 18628 0 0 0 0
+proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
+proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0
+proc4 2 2 10853
+proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/net/xfrm_stat
+Lines: 28
+XfrmInError 1
+XfrmInBufferError 2
+XfrmInHdrError 4
+XfrmInNoStates 3
+XfrmInStateProtoError 40
+XfrmInStateModeError 100
+XfrmInStateSeqError 6000
+XfrmInStateExpired 4
+XfrmInStateMismatch 23451
+XfrmInStateInvalid 55555
+XfrmInTmplMismatch 51
+XfrmInNoPols 65432
+XfrmInPolBlock 100
+XfrmInPolError 10000
+XfrmOutError 1000000
+XfrmOutBundleGenError 43321
+XfrmOutBundleCheckError 555
+XfrmOutNoStates 869
+XfrmOutStateProtoError 4542
+XfrmOutStateModeError 4
+XfrmOutStateSeqError 543
+XfrmOutStateExpired 565
+XfrmOutPolBlock 43456
+XfrmOutPolDead 7656
+XfrmOutPolError 1454
+XfrmFwdHdrError 6654
+XfrmOutStateInvalid 28765
+XfrmAcquireError 24532
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/self
+SymlinkTo: 26231
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/stat
+Lines: 16
+cpu 301854 612 111922 8979004 3552 2 3944 0 0 0
+cpu0 44490 19 21045 1087069 220 1 3410 0 0 0
+cpu1 47869 23 16474 1110787 591 0 46 0 0 0
+cpu2 46504 36 15916 1112321 441 0 326 0 0 0
+cpu3 47054 102 15683 1113230 533 0 60 0 0 0
+cpu4 28413 25 10776 1140321 217 0 8 0 0 0
+cpu5 29271 101 11586 1136270 672 0 30 0 0 0
+cpu6 29152 36 10276 1139721 319 0 29 0 0 0
+cpu7 29098 268 10164 1139282 555 0 31 0 0 0
+intr 8885917 17 0 0 0 0 0 0 0 1 79281 0 0 0 0 0 0 0 231237 0 0 0 0 250586 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 223424 190745 13 906 1283803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ctxt 38014093
+btime 1418183276
+processes 26442
+procs_running 2
+procs_blocked 1
+softirq 5057579 250191 1481983 1647 211099 186066 0 1783454 622196 12499 508444
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Directory: fixtures/symlinktargets
+Mode: 755
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/README
+Lines: 2
+This directory contains some empty files that are the symlinks the files in the "fd" directory point to.
+They are otherwise ignored by the tests
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/abc
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/def
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/ghi
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/uvw
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/symlinktargets/xyz
+Lines: 0
+Mode: 644
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/cmdline b/vendor/github.com/prometheus/procfs/fixtures/26231/cmdline
deleted file mode 100644
index d2d8ef887..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/cmdline
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/comm b/vendor/github.com/prometheus/procfs/fixtures/26231/comm
deleted file mode 100644
index f027e0d4b..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/comm
+++ /dev/null
@@ -1 +0,0 @@
-vim
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/exe b/vendor/github.com/prometheus/procfs/fixtures/26231/exe
deleted file mode 120000
index a91bec4da..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/exe
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/vim \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/0 b/vendor/github.com/prometheus/procfs/fixtures/26231/fd/0
deleted file mode 120000
index da9c5dff3..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/0
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/abc \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/1 b/vendor/github.com/prometheus/procfs/fixtures/26231/fd/1
deleted file mode 120000
index ca47b50ca..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/1
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/def \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/10 b/vendor/github.com/prometheus/procfs/fixtures/26231/fd/10
deleted file mode 120000
index c08683168..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/10
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/xyz \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/2 b/vendor/github.com/prometheus/procfs/fixtures/26231/fd/2
deleted file mode 120000
index 66731c068..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/2
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/ghi \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/3 b/vendor/github.com/prometheus/procfs/fixtures/26231/fd/3
deleted file mode 120000
index 0135dce35..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/fd/3
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/uvw \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/io b/vendor/github.com/prometheus/procfs/fixtures/26231/io
deleted file mode 100644
index b6210a7a7..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/io
+++ /dev/null
@@ -1,7 +0,0 @@
-rchar: 750339
-wchar: 818609
-syscr: 7405
-syscw: 5245
-read_bytes: 1024
-write_bytes: 2048
-cancelled_write_bytes: -1024
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/limits b/vendor/github.com/prometheus/procfs/fixtures/26231/limits
deleted file mode 100644
index 8b40108aa..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/limits
+++ /dev/null
@@ -1,17 +0,0 @@
-Limit Soft Limit Hard Limit Units
-Max cpu time unlimited unlimited seconds
-Max file size unlimited unlimited bytes
-Max data size unlimited unlimited bytes
-Max stack size 8388608 unlimited bytes
-Max core file size 0 unlimited bytes
-Max resident set unlimited unlimited bytes
-Max processes 62898 62898 processes
-Max open files 2048 4096 files
-Max locked memory 65536 65536 bytes
-Max address space 8589934592 unlimited bytes
-Max file locks unlimited unlimited locks
-Max pending signals 62898 62898 signals
-Max msgqueue size 819200 819200 bytes
-Max nice priority 0 0
-Max realtime priority 0 0
-Max realtime timeout unlimited unlimited us
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/mountstats b/vendor/github.com/prometheus/procfs/fixtures/26231/mountstats
deleted file mode 100644
index a665c33da..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/mountstats
+++ /dev/null
@@ -1,19 +0,0 @@
-device rootfs mounted on / with fstype rootfs
-device sysfs mounted on /sys with fstype sysfs
-device proc mounted on /proc with fstype proc
-device /dev/sda1 mounted on / with fstype ext4
-device 192.168.1.1:/srv/test mounted on /mnt/nfs/test with fstype nfs4 statvers=1.1
- opts: rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none
- age: 13968
- caps: caps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255
- nfsv4: bm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured
- sec: flavor=1,pseudoflavor=1
- events: 52 226 0 0 1 13 398 0 0 331 0 47 0 0 77 0 0 77 0 0 0 0 0 0 0 0 0
- bytes: 1207640230 0 0 0 1210214218 0 295483 0
- RPC iostats version: 1.0 p/v: 100003/4 (nfs)
- xprt: tcp 832 0 1 0 11 6428 6428 0 12154 0 24 26 5726
- per-op statistics
- NULL: 0 0 0 0 0 0 0 0
- READ: 1298 1298 0 207680 1210292152 6 79386 79407
- WRITE: 0 0 0 0 0 0 0 0
-
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/net/dev b/vendor/github.com/prometheus/procfs/fixtures/26231/net/dev
deleted file mode 100644
index f10895560..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/net/dev
+++ /dev/null
@@ -1,4 +0,0 @@
-Inter-| Receive | Transmit
- face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
- lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- eth0: 438 5 0 0 0 0 0 0 648 8 0 0 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/ns/mnt b/vendor/github.com/prometheus/procfs/fixtures/26231/ns/mnt
deleted file mode 120000
index 9c52ca211..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/ns/mnt
+++ /dev/null
@@ -1 +0,0 @@
-mnt:[4026531840] \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/ns/net b/vendor/github.com/prometheus/procfs/fixtures/26231/ns/net
deleted file mode 120000
index 1f0f79594..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/ns/net
+++ /dev/null
@@ -1 +0,0 @@
-net:[4026531993] \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26231/stat b/vendor/github.com/prometheus/procfs/fixtures/26231/stat
deleted file mode 100644
index 438aaa9dc..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26231/stat
+++ /dev/null
@@ -1 +0,0 @@
-26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/cmdline b/vendor/github.com/prometheus/procfs/fixtures/26232/cmdline
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/cmdline
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/comm b/vendor/github.com/prometheus/procfs/fixtures/26232/comm
deleted file mode 100644
index 62361ca78..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/comm
+++ /dev/null
@@ -1 +0,0 @@
-ata_sff
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/0 b/vendor/github.com/prometheus/procfs/fixtures/26232/fd/0
deleted file mode 120000
index da9c5dff3..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/0
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/abc \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/1 b/vendor/github.com/prometheus/procfs/fixtures/26232/fd/1
deleted file mode 120000
index ca47b50ca..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/1
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/def \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/2 b/vendor/github.com/prometheus/procfs/fixtures/26232/fd/2
deleted file mode 120000
index 66731c068..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/2
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/ghi \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/3 b/vendor/github.com/prometheus/procfs/fixtures/26232/fd/3
deleted file mode 120000
index 0135dce35..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/3
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/uvw \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/4 b/vendor/github.com/prometheus/procfs/fixtures/26232/fd/4
deleted file mode 120000
index c08683168..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/fd/4
+++ /dev/null
@@ -1 +0,0 @@
-../../symlinktargets/xyz \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/limits b/vendor/github.com/prometheus/procfs/fixtures/26232/limits
deleted file mode 100644
index 3f9bf16a9..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/limits
+++ /dev/null
@@ -1,17 +0,0 @@
-Limit Soft Limit Hard Limit Units
-Max cpu time unlimited unlimited seconds
-Max file size unlimited unlimited bytes
-Max data size unlimited unlimited bytes
-Max stack size 8388608 unlimited bytes
-Max core file size 0 unlimited bytes
-Max resident set unlimited unlimited bytes
-Max processes 29436 29436 processes
-Max open files 1024 4096 files
-Max locked memory 65536 65536 bytes
-Max address space unlimited unlimited bytes
-Max file locks unlimited unlimited locks
-Max pending signals 29436 29436 signals
-Max msgqueue size 819200 819200 bytes
-Max nice priority 0 0
-Max realtime priority 0 0
-Max realtime timeout unlimited unlimited us
diff --git a/vendor/github.com/prometheus/procfs/fixtures/26232/stat b/vendor/github.com/prometheus/procfs/fixtures/26232/stat
deleted file mode 100644
index 321b16073..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/26232/stat
+++ /dev/null
@@ -1 +0,0 @@
-33 (ata_sff) S 2 0 0 0 -1 69238880 0 0 0 0 0 0 0 0 0 -20 1 0 5 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/584/stat b/vendor/github.com/prometheus/procfs/fixtures/584/stat
deleted file mode 100644
index 65b9369d1..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/584/stat
+++ /dev/null
@@ -1,2 +0,0 @@
-1020 ((a b ) ( c d) ) R 28378 1020 28378 34842 1020 4218880 286 0 0 0 0 0 0 0 20 0 1 0 10839175 10395648 155 18446744073709551615 4194304 4238788 140736466511168 140736466511168 140609271124624 0 0 0 0 0 0 0 17 5 0 0 0 0 0 6336016 6337300 25579520 140736466515030 140736466515061 140736466515061 140736466518002 0
-#!/bin/cat /proc/self/stat
diff --git a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/short/buddyinfo b/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/short/buddyinfo
deleted file mode 100644
index 40e71ca35..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/short/buddyinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-Node 0, zone
-Node 0, zone
-Node 0, zone
diff --git a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/sizemismatch/buddyinfo b/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/sizemismatch/buddyinfo
deleted file mode 100644
index 945636182..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/sizemismatch/buddyinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3
-Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0 0
-Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/valid/buddyinfo b/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/valid/buddyinfo
deleted file mode 100644
index f90594a81..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/buddyinfo/valid/buddyinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3
-Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0
-Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/fs/xfs/stat b/vendor/github.com/prometheus/procfs/fixtures/fs/xfs/stat
deleted file mode 100644
index f7ca7f940..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/fs/xfs/stat
+++ /dev/null
@@ -1,23 +0,0 @@
-extent_alloc 92447 97589 92448 93751
-abt 0 0 0 0
-blk_map 1767055 188820 184891 92447 92448 2140766 0
-bmbt 0 0 0 0
-dir 185039 92447 92444 136422
-trans 706 944304 0
-ig 185045 58807 0 126238 0 33637 22
-log 2883 113448 9 17360 739
-push_ail 945014 0 134260 15483 0 3940 464 159985 0 40
-xstrat 92447 0
-rw 107739 94045
-attr 4 0 0 0
-icluster 8677 7849 135802
-vnodes 92601 0 0 0 92444 92444 92444 0
-buf 2666287 7122 2659202 3599 2 7085 0 10297 7085
-abtb2 184941 1277345 13257 13278 0 0 0 0 0 0 0 0 0 0 2746147
-abtc2 345295 2416764 172637 172658 0 0 0 0 0 0 0 0 0 0 21406023
-bmbt2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ibt2 343004 1358467 0 0 0 0 0 0 0 0 0 0 0 0 0
-fibt2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-qm 0 0 0 0 0 0 0 0
-xpc 399724544 92823103 86219234
-debug 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/mdstat b/vendor/github.com/prometheus/procfs/fixtures/mdstat
deleted file mode 100644
index 4430bdee2..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/mdstat
+++ /dev/null
@@ -1,26 +0,0 @@
-Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
-md3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9]
- 5853468288 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
-
-md127 : active raid1 sdi2[0] sdj2[1]
- 312319552 blocks [2/2] [UU]
-
-md0 : active raid1 sdk[2](S) sdi1[0] sdj1[1]
- 248896 blocks [2/2] [UU]
-
-md4 : inactive raid1 sda3[0] sdb3[1]
- 4883648 blocks [2/2] [UU]
-
-md6 : active raid1 sdb2[2] sda2[0]
- 195310144 blocks [2/1] [U_]
- [=>...................] recovery = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec
-
-md8 : active raid1 sdb1[1] sda1[0]
- 195310144 blocks [2/2] [UU]
- [=>...................] resync = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec
-
-md7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1]
- 7813735424 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/3] [U_UU]
- bitmap: 0/30 pages [0KB], 65536KB chunk
-
-unused devices: <none>
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/dev b/vendor/github.com/prometheus/procfs/fixtures/net/dev
deleted file mode 100644
index 2df786fa5..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/dev
+++ /dev/null
@@ -1,6 +0,0 @@
-Inter-| Receive | Transmit
- face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
-vethf345468: 648 8 0 0 0 0 0 0 438 5 0 0 0 0 0 0
- lo: 1664039048 1566805 0 0 0 0 0 0 1664039048 1566805 0 0 0 0 0 0
-docker0: 2568 38 0 0 0 0 0 0 438 5 0 0 0 0 0 0
- eth0: 874354587 1036395 0 0 0 0 0 0 563352563 732147 0 0 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs b/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs
deleted file mode 100644
index 5ee4bd2be..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs
+++ /dev/null
@@ -1,21 +0,0 @@
-IP Virtual Server version 1.2.1 (size=4096)
-Prot LocalAddress:Port Scheduler Flags
- -> RemoteAddress:Port Forward Weight ActiveConn InActConn
-TCP C0A80016:0CEA wlc
- -> C0A85216:0CEA Tunnel 100 248 2
- -> C0A85318:0CEA Tunnel 100 248 2
- -> C0A85315:0CEA Tunnel 100 248 1
-TCP C0A80039:0CEA wlc
- -> C0A85416:0CEA Tunnel 0 0 0
- -> C0A85215:0CEA Tunnel 100 1499 0
- -> C0A83215:0CEA Tunnel 100 1498 0
-TCP C0A80037:0CEA wlc
- -> C0A8321A:0CEA Tunnel 0 0 0
- -> C0A83120:0CEA Tunnel 100 0 0
-TCP [2620:0000:0000:0000:0000:0000:0000:0001]:0050 sh
- -> [2620:0000:0000:0000:0000:0000:0000:0002]:0050 Route 1 0 0
- -> [2620:0000:0000:0000:0000:0000:0000:0003]:0050 Route 1 0 0
- -> [2620:0000:0000:0000:0000:0000:0000:0004]:0050 Route 1 1 1
-FWM 10001000 wlc
- -> C0A8321A:0CEA Route 0 0 1
- -> C0A83215:0CEA Route 0 0 2
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs_stats b/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs_stats
deleted file mode 100644
index c00724e0f..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/ip_vs_stats
+++ /dev/null
@@ -1,6 +0,0 @@
- Total Incoming Outgoing Incoming Outgoing
- Conns Packets Packets Bytes Bytes
- 16AA370 E33656E5 0 51D8C8883AB3 0
-
- Conns/s Pkts/s Pkts/s Bytes/s Bytes/s
- 4 1FB3C 0 1282A8F 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfs b/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfs
deleted file mode 100644
index 2e58e0544..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfs
+++ /dev/null
@@ -1,5 +0,0 @@
-net 18628 0 18628 6
-rpc 4329785 0 4338291
-proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
-proc3 22 1 4084749 29200 94754 32580 186 47747 7981 8639 0 6356 0 6962 0 7958 0 0 241 4 4 2 39
-proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfsd b/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfsd
deleted file mode 100644
index 4e8565f41..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/rpc/nfsd
+++ /dev/null
@@ -1,11 +0,0 @@
-rc 0 6 18622
-fh 0 0 0 0 0
-io 157286400 0
-th 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
-ra 32 0 0 0 0 0 0 0 0 0 0 0
-net 18628 0 18628 6
-rpc 18628 0 0 0 0
-proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
-proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0
-proc4 2 2 10853
-proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/vendor/github.com/prometheus/procfs/fixtures/net/xfrm_stat b/vendor/github.com/prometheus/procfs/fixtures/net/xfrm_stat
deleted file mode 100644
index d278ace95..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/net/xfrm_stat
+++ /dev/null
@@ -1,28 +0,0 @@
-XfrmInError 1
-XfrmInBufferError 2
-XfrmInHdrError 4
-XfrmInNoStates 3
-XfrmInStateProtoError 40
-XfrmInStateModeError 100
-XfrmInStateSeqError 6000
-XfrmInStateExpired 4
-XfrmInStateMismatch 23451
-XfrmInStateInvalid 55555
-XfrmInTmplMismatch 51
-XfrmInNoPols 65432
-XfrmInPolBlock 100
-XfrmInPolError 10000
-XfrmOutError 1000000
-XfrmOutBundleGenError 43321
-XfrmOutBundleCheckError 555
-XfrmOutNoStates 869
-XfrmOutStateProtoError 4542
-XfrmOutStateModeError 4
-XfrmOutStateSeqError 543
-XfrmOutStateExpired 565
-XfrmOutPolBlock 43456
-XfrmOutPolDead 7656
-XfrmOutPolError 1454
-XfrmFwdHdrError 6654
-XfrmOutStateInvalid 28765
-XfrmAcquireError 24532
diff --git a/vendor/github.com/prometheus/procfs/fixtures/self b/vendor/github.com/prometheus/procfs/fixtures/self
deleted file mode 120000
index 1eeedea3d..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/self
+++ /dev/null
@@ -1 +0,0 @@
-26231 \ No newline at end of file
diff --git a/vendor/github.com/prometheus/procfs/fixtures/stat b/vendor/github.com/prometheus/procfs/fixtures/stat
deleted file mode 100644
index 1582a8cb5..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/stat
+++ /dev/null
@@ -1,16 +0,0 @@
-cpu 301854 612 111922 8979004 3552 2 3944 0 0 0
-cpu0 44490 19 21045 1087069 220 1 3410 0 0 0
-cpu1 47869 23 16474 1110787 591 0 46 0 0 0
-cpu2 46504 36 15916 1112321 441 0 326 0 0 0
-cpu3 47054 102 15683 1113230 533 0 60 0 0 0
-cpu4 28413 25 10776 1140321 217 0 8 0 0 0
-cpu5 29271 101 11586 1136270 672 0 30 0 0 0
-cpu6 29152 36 10276 1139721 319 0 29 0 0 0
-cpu7 29098 268 10164 1139282 555 0 31 0 0 0
-intr 8885917 17 0 0 0 0 0 0 0 1 79281 0 0 0 0 0 0 0 231237 0 0 0 0 250586 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 223424 190745 13 906 1283803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ctxt 38014093
-btime 1418183276
-processes 26442
-procs_running 2
-procs_blocked 1
-softirq 5057579 250191 1481983 1647 211099 186066 0 1783454 622196 12499 508444
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/README b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/README
deleted file mode 100644
index 5cf184ea0..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This directory contains some empty files that are the symlinks the files in the "fd" directory point to.
-They are otherwise ignored by the tests
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/abc b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/abc
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/abc
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/def b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/def
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/def
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/ghi b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/ghi
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/ghi
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/uvw b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/uvw
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/uvw
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/xyz b/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/xyz
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/prometheus/procfs/fixtures/symlinktargets/xyz
+++ /dev/null
diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go
index 65f09223f..b6c6b2ce1 100644
--- a/vendor/github.com/prometheus/procfs/fs.go
+++ b/vendor/github.com/prometheus/procfs/fs.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/fs_test.go b/vendor/github.com/prometheus/procfs/fs_test.go
deleted file mode 100644
index e492cde55..000000000
--- a/vendor/github.com/prometheus/procfs/fs_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package procfs
-
-import "testing"
-
-func TestNewFS(t *testing.T) {
- if _, err := NewFS("foobar"); err == nil {
- t.Error("want NewFS to fail for non-existing mount point")
- }
-
- if _, err := NewFS("procfs.go"); err == nil {
- t.Error("want NewFS to fail if mount point is not a directory")
- }
-}
-
-func TestFSXFSStats(t *testing.T) {
- stats, err := FS("fixtures").XFSStats()
- if err != nil {
- t.Fatalf("failed to parse XFS stats: %v", err)
- }
-
- // Very lightweight test just to sanity check the path used
- // to open XFS stats. Heavier tests in package xfs.
- if want, got := uint32(92447), stats.ExtentAllocation.ExtentsAllocated; want != got {
- t.Errorf("unexpected extents allocated:\nwant: %d\nhave: %d", want, got)
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go
index 5761b4570..e36d4a3bd 100644
--- a/vendor/github.com/prometheus/procfs/ipvs.go
+++ b/vendor/github.com/prometheus/procfs/ipvs.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/ipvs_test.go b/vendor/github.com/prometheus/procfs/ipvs_test.go
deleted file mode 100644
index 13ceab80e..000000000
--- a/vendor/github.com/prometheus/procfs/ipvs_test.go
+++ /dev/null
@@ -1,237 +0,0 @@
-package procfs
-
-import (
- "net"
- "testing"
-)
-
-var (
- expectedIPVSStats = IPVSStats{
- Connections: 23765872,
- IncomingPackets: 3811989221,
- OutgoingPackets: 0,
- IncomingBytes: 89991519156915,
- OutgoingBytes: 0,
- }
- expectedIPVSBackendStatuses = []IPVSBackendStatus{
- {
- LocalAddress: net.ParseIP("192.168.0.22"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.82.22"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 248,
- InactConn: 2,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.22"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.83.24"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 248,
- InactConn: 2,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.22"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.83.21"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 248,
- InactConn: 1,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.57"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.84.22"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 0,
- ActiveConn: 0,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.57"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.82.21"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 1499,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.57"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.50.21"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 1498,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.55"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.50.26"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 0,
- ActiveConn: 0,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("192.168.0.55"),
- LocalPort: 3306,
- RemoteAddress: net.ParseIP("192.168.49.32"),
- RemotePort: 3306,
- Proto: "TCP",
- Weight: 100,
- ActiveConn: 0,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("2620::1"),
- LocalPort: 80,
- RemoteAddress: net.ParseIP("2620::2"),
- RemotePort: 80,
- Proto: "TCP",
- Weight: 1,
- ActiveConn: 0,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("2620::1"),
- LocalPort: 80,
- RemoteAddress: net.ParseIP("2620::3"),
- RemotePort: 80,
- Proto: "TCP",
- Weight: 1,
- ActiveConn: 0,
- InactConn: 0,
- },
- {
- LocalAddress: net.ParseIP("2620::1"),
- LocalPort: 80,
- RemoteAddress: net.ParseIP("2620::4"),
- RemotePort: 80,
- Proto: "TCP",
- Weight: 1,
- ActiveConn: 1,
- InactConn: 1,
- },
- {
- LocalMark: "10001000",
- RemoteAddress: net.ParseIP("192.168.50.26"),
- RemotePort: 3306,
- Proto: "FWM",
- Weight: 0,
- ActiveConn: 0,
- InactConn: 1,
- },
- {
- LocalMark: "10001000",
- RemoteAddress: net.ParseIP("192.168.50.21"),
- RemotePort: 3306,
- Proto: "FWM",
- Weight: 0,
- ActiveConn: 0,
- InactConn: 2,
- },
- }
-)
-
-func TestIPVSStats(t *testing.T) {
- stats, err := FS("fixtures").NewIPVSStats()
- if err != nil {
- t.Fatal(err)
- }
-
- if stats != expectedIPVSStats {
- t.Errorf("want %+v, have %+v", expectedIPVSStats, stats)
- }
-}
-
-func TestParseIPPort(t *testing.T) {
- ip := net.ParseIP("192.168.0.22")
- port := uint16(3306)
-
- gotIP, gotPort, err := parseIPPort("C0A80016:0CEA")
- if err != nil {
- t.Fatal(err)
- }
- if !(gotIP.Equal(ip) && port == gotPort) {
- t.Errorf("want %s:%d, have %s:%d", ip, port, gotIP, gotPort)
- }
-}
-
-func TestParseIPPortInvalid(t *testing.T) {
- testcases := []string{
- "",
- "C0A80016",
- "C0A800:1234",
- "FOOBARBA:1234",
- "C0A80016:0CEA:1234",
- }
-
- for _, s := range testcases {
- ip, port, err := parseIPPort(s)
- if ip != nil || port != uint16(0) || err == nil {
- t.Errorf("Expected error for input %s, have ip = %s, port = %v, err = %v", s, ip, port, err)
- }
- }
-}
-
-func TestParseIPPortIPv6(t *testing.T) {
- ip := net.ParseIP("dead:beef::1")
- port := uint16(8080)
-
- gotIP, gotPort, err := parseIPPort("[DEAD:BEEF:0000:0000:0000:0000:0000:0001]:1F90")
- if err != nil {
- t.Fatal(err)
- }
- if !(gotIP.Equal(ip) && port == gotPort) {
- t.Errorf("want %s:%d, have %s:%d", ip, port, gotIP, gotPort)
- }
-}
-
-func TestIPVSBackendStatus(t *testing.T) {
- backendStats, err := FS("fixtures").NewIPVSBackendStatus()
- if err != nil {
- t.Fatal(err)
- }
- if want, have := len(expectedIPVSBackendStatuses), len(backendStats); want != have {
- t.Fatalf("want %d backend statuses, have %d", want, have)
- }
-
- for idx, expect := range expectedIPVSBackendStatuses {
- if !backendStats[idx].LocalAddress.Equal(expect.LocalAddress) {
- t.Errorf("want LocalAddress %s, have %s", expect.LocalAddress, backendStats[idx].LocalAddress)
- }
- if backendStats[idx].LocalPort != expect.LocalPort {
- t.Errorf("want LocalPort %d, have %d", expect.LocalPort, backendStats[idx].LocalPort)
- }
- if !backendStats[idx].RemoteAddress.Equal(expect.RemoteAddress) {
- t.Errorf("want RemoteAddress %s, have %s", expect.RemoteAddress, backendStats[idx].RemoteAddress)
- }
- if backendStats[idx].RemotePort != expect.RemotePort {
- t.Errorf("want RemotePort %d, have %d", expect.RemotePort, backendStats[idx].RemotePort)
- }
- if backendStats[idx].Proto != expect.Proto {
- t.Errorf("want Proto %s, have %s", expect.Proto, backendStats[idx].Proto)
- }
- if backendStats[idx].Weight != expect.Weight {
- t.Errorf("want Weight %d, have %d", expect.Weight, backendStats[idx].Weight)
- }
- if backendStats[idx].ActiveConn != expect.ActiveConn {
- t.Errorf("want ActiveConn %d, have %d", expect.ActiveConn, backendStats[idx].ActiveConn)
- }
- if backendStats[idx].InactConn != expect.InactConn {
- t.Errorf("want InactConn %d, have %d", expect.InactConn, backendStats[idx].InactConn)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go
index d7a248c0d..9dc19583d 100644
--- a/vendor/github.com/prometheus/procfs/mdstat.go
+++ b/vendor/github.com/prometheus/procfs/mdstat.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/mdstat_test.go b/vendor/github.com/prometheus/procfs/mdstat_test.go
deleted file mode 100644
index fa463c2fb..000000000
--- a/vendor/github.com/prometheus/procfs/mdstat_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package procfs
-
-import (
- "testing"
-)
-
-func TestMDStat(t *testing.T) {
- mdStates, err := FS("fixtures").ParseMDStat()
- if err != nil {
- t.Fatalf("parsing of reference-file failed entirely: %s", err)
- }
-
- refs := map[string]MDStat{
- "md3": {"md3", "active", 8, 8, 5853468288, 5853468288},
- "md127": {"md127", "active", 2, 2, 312319552, 312319552},
- "md0": {"md0", "active", 2, 2, 248896, 248896},
- "md4": {"md4", "inactive", 2, 2, 4883648, 4883648},
- "md6": {"md6", "active", 1, 2, 195310144, 16775552},
- "md8": {"md8", "active", 2, 2, 195310144, 16775552},
- "md7": {"md7", "active", 3, 4, 7813735424, 7813735424},
- }
-
- if want, have := len(refs), len(mdStates); want != have {
- t.Errorf("want %d parsed md-devices, have %d", want, have)
- }
- for _, md := range mdStates {
- if want, have := refs[md.Name], md; want != have {
- t.Errorf("%s: want %v, have %v", md.Name, want, have)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go
index 6b2b0ba9d..e95ddbc67 100644
--- a/vendor/github.com/prometheus/procfs/mountstats.go
+++ b/vendor/github.com/prometheus/procfs/mountstats.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
// While implementing parsing of /proc/[pid]/mountstats, this blog was used
diff --git a/vendor/github.com/prometheus/procfs/mountstats_test.go b/vendor/github.com/prometheus/procfs/mountstats_test.go
deleted file mode 100644
index 8f04f5355..000000000
--- a/vendor/github.com/prometheus/procfs/mountstats_test.go
+++ /dev/null
@@ -1,273 +0,0 @@
-package procfs
-
-import (
- "fmt"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-func TestMountStats(t *testing.T) {
- tests := []struct {
- name string
- s string
- mounts []*Mount
- invalid bool
- }{
- {
- name: "no devices",
- s: `hello`,
- },
- {
- name: "device has too few fields",
- s: `device foo`,
- invalid: true,
- },
- {
- name: "device incorrect format",
- s: `device rootfs BAD on / with fstype rootfs`,
- invalid: true,
- },
- {
- name: "device incorrect format",
- s: `device rootfs mounted BAD / with fstype rootfs`,
- invalid: true,
- },
- {
- name: "device incorrect format",
- s: `device rootfs mounted on / BAD fstype rootfs`,
- invalid: true,
- },
- {
- name: "device incorrect format",
- s: `device rootfs mounted on / with BAD rootfs`,
- invalid: true,
- },
- {
- name: "device rootfs cannot have stats",
- s: `device rootfs mounted on / with fstype rootfs stats`,
- invalid: true,
- },
- {
- name: "NFSv4 device with too little info",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nhello",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad bytes",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nbytes: 0",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad events",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nevents: 0",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad per-op stats",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nper-op statistics\nFOO 0",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad transport stats",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nxprt: tcp",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad transport version",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=foo\nxprt: tcp 0",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad transport stats version 1.0",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.0\nxprt: tcp 0 0 0 0 0 0 0 0 0 0 0 0 0",
- invalid: true,
- },
- {
- name: "NFSv4 device with bad transport stats version 1.1",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nxprt: tcp 0 0 0 0 0 0 0 0 0 0",
- invalid: true,
- },
- {
- name: "NFSv3 device with transport stats version 1.0 OK",
- s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs statvers=1.0\nxprt: tcp 1 2 3 4 5 6 7 8 9 10",
- mounts: []*Mount{{
- Device: "192.168.1.1:/srv",
- Mount: "/mnt/nfs",
- Type: "nfs",
- Stats: &MountStatsNFS{
- StatVersion: "1.0",
- Transport: NFSTransportStats{
- Port: 1,
- Bind: 2,
- Connect: 3,
- ConnectIdleTime: 4,
- IdleTime: 5 * time.Second,
- Sends: 6,
- Receives: 7,
- BadTransactionIDs: 8,
- CumulativeActiveRequests: 9,
- CumulativeBacklog: 10,
- },
- },
- }},
- },
- {
- name: "device rootfs OK",
- s: `device rootfs mounted on / with fstype rootfs`,
- mounts: []*Mount{{
- Device: "rootfs",
- Mount: "/",
- Type: "rootfs",
- }},
- },
- {
- name: "NFSv3 device with minimal stats OK",
- s: `device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs statvers=1.1`,
- mounts: []*Mount{{
- Device: "192.168.1.1:/srv",
- Mount: "/mnt/nfs",
- Type: "nfs",
- Stats: &MountStatsNFS{
- StatVersion: "1.1",
- },
- }},
- },
- {
- name: "fixtures OK",
- mounts: []*Mount{
- {
- Device: "rootfs",
- Mount: "/",
- Type: "rootfs",
- },
- {
- Device: "sysfs",
- Mount: "/sys",
- Type: "sysfs",
- },
- {
- Device: "proc",
- Mount: "/proc",
- Type: "proc",
- },
- {
- Device: "/dev/sda1",
- Mount: "/",
- Type: "ext4",
- },
- {
- Device: "192.168.1.1:/srv/test",
- Mount: "/mnt/nfs/test",
- Type: "nfs4",
- Stats: &MountStatsNFS{
- StatVersion: "1.1",
- Age: 13968 * time.Second,
- Bytes: NFSBytesStats{
- Read: 1207640230,
- ReadTotal: 1210214218,
- ReadPages: 295483,
- },
- Events: NFSEventsStats{
- InodeRevalidate: 52,
- DnodeRevalidate: 226,
- VFSOpen: 1,
- VFSLookup: 13,
- VFSAccess: 398,
- VFSReadPages: 331,
- VFSWritePages: 47,
- VFSFlush: 77,
- VFSFileRelease: 77,
- },
- Operations: []NFSOperationStats{
- {
- Operation: "NULL",
- },
- {
- Operation: "READ",
- Requests: 1298,
- Transmissions: 1298,
- BytesSent: 207680,
- BytesReceived: 1210292152,
- CumulativeQueueTime: 6 * time.Millisecond,
- CumulativeTotalResponseTime: 79386 * time.Millisecond,
- CumulativeTotalRequestTime: 79407 * time.Millisecond,
- },
- {
- Operation: "WRITE",
- },
- },
- Transport: NFSTransportStats{
- Port: 832,
- Connect: 1,
- IdleTime: 11 * time.Second,
- Sends: 6428,
- Receives: 6428,
- CumulativeActiveRequests: 12154,
- MaximumRPCSlotsUsed: 24,
- CumulativeSendingQueue: 26,
- CumulativePendingQueue: 5726,
- },
- },
- },
- },
- },
- }
-
- for i, tt := range tests {
- t.Logf("[%02d] test %q", i, tt.name)
-
- var mounts []*Mount
- var err error
-
- if tt.s != "" {
- mounts, err = parseMountStats(strings.NewReader(tt.s))
- } else {
- proc, e := FS("fixtures").NewProc(26231)
- if e != nil {
- t.Fatalf("failed to create proc: %v", err)
- }
-
- mounts, err = proc.MountStats()
- }
-
- if tt.invalid && err == nil {
- t.Error("expected an error, but none occurred")
- }
- if !tt.invalid && err != nil {
- t.Errorf("unexpected error: %v", err)
- }
-
- if want, have := tt.mounts, mounts; !reflect.DeepEqual(want, have) {
- t.Errorf("mounts:\nwant:\n%v\nhave:\n%v", mountsStr(want), mountsStr(have))
- }
- }
-}
-
-func mountsStr(mounts []*Mount) string {
- var out string
- for i, m := range mounts {
- out += fmt.Sprintf("[%d] %q on %q (%q)", i, m.Device, m.Mount, m.Type)
-
- stats, ok := m.Stats.(*MountStatsNFS)
- if !ok {
- out += "\n"
- continue
- }
-
- out += fmt.Sprintf("\n\t- v%s, age: %s", stats.StatVersion, stats.Age)
- out += fmt.Sprintf("\n\t- bytes: %v", stats.Bytes)
- out += fmt.Sprintf("\n\t- events: %v", stats.Events)
- out += fmt.Sprintf("\n\t- transport: %v", stats.Transport)
- out += fmt.Sprintf("\n\t- per-operation stats:")
-
- for _, o := range stats.Operations {
- out += fmt.Sprintf("\n\t\t- %v", o)
- }
-
- out += "\n"
- }
-
- return out
-}
diff --git a/vendor/github.com/prometheus/procfs/net_dev.go b/vendor/github.com/prometheus/procfs/net_dev.go
index f8c184efe..3f2523371 100644
--- a/vendor/github.com/prometheus/procfs/net_dev.go
+++ b/vendor/github.com/prometheus/procfs/net_dev.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
@@ -171,7 +184,7 @@ func (nd NetDev) parseLine(rawLine string) (*NetDevLine, error) {
}
// Total aggregates the values across interfaces and returns a new NetDevLine.
-// The Name field will be a sorted comma seperated list of interface names.
+// The Name field will be a sorted comma separated list of interface names.
func (nd NetDev) Total() NetDevLine {
total := NetDevLine{}
diff --git a/vendor/github.com/prometheus/procfs/net_dev_test.go b/vendor/github.com/prometheus/procfs/net_dev_test.go
deleted file mode 100644
index a69d8b9b8..000000000
--- a/vendor/github.com/prometheus/procfs/net_dev_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package procfs
-
-import (
- "testing"
-)
-
-func TestNetDevParseLine(t *testing.T) {
- const rawLine = ` eth0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16`
-
- have, err := NetDev{}.parseLine(rawLine)
- if err != nil {
- t.Fatal(err)
- }
-
- want := NetDevLine{"eth0", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
- if want != *have {
- t.Errorf("want %v, have %v", want, have)
- }
-}
-
-func TestNewNetDev(t *testing.T) {
- fs, err := NewFS("fixtures")
- if err != nil {
- t.Fatal(err)
- }
-
- nd, err := fs.NewNetDev()
- if err != nil {
- t.Fatal(err)
- }
-
- lines := map[string]NetDevLine{
- "vethf345468": {Name: "vethf345468", RxBytes: 648, RxPackets: 8, TxBytes: 438, TxPackets: 5},
- "lo": {Name: "lo", RxBytes: 1664039048, RxPackets: 1566805, TxBytes: 1664039048, TxPackets: 1566805},
- "docker0": {Name: "docker0", RxBytes: 2568, RxPackets: 38, TxBytes: 438, TxPackets: 5},
- "eth0": {Name: "eth0", RxBytes: 874354587, RxPackets: 1036395, TxBytes: 563352563, TxPackets: 732147},
- }
-
- if want, have := len(lines), len(nd); want != have {
- t.Errorf("want %d parsed net/dev lines, have %d", want, have)
- }
- for _, line := range nd {
- if want, have := lines[line.Name], line; want != have {
- t.Errorf("%s: want %v, have %v", line.Name, want, have)
- }
- }
-}
-
-func TestProcNewNetDev(t *testing.T) {
- p, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- nd, err := p.NewNetDev()
- if err != nil {
- t.Fatal(err)
- }
-
- lines := map[string]NetDevLine{
- "lo": {Name: "lo"},
- "eth0": {Name: "eth0", RxBytes: 438, RxPackets: 5, TxBytes: 648, TxPackets: 8},
- }
-
- if want, have := len(lines), len(nd); want != have {
- t.Errorf("want %d parsed net/dev lines, have %d", want, have)
- }
- for _, line := range nd {
- if want, have := lines[line.Name], line; want != have {
- t.Errorf("%s: want %v, have %v", line.Name, want, have)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/nfs/nfs.go b/vendor/github.com/prometheus/procfs/nfs/nfs.go
index e2185b782..651bf6819 100644
--- a/vendor/github.com/prometheus/procfs/nfs/nfs.go
+++ b/vendor/github.com/prometheus/procfs/nfs/nfs.go
@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package nfsd implements parsing of /proc/net/rpc/nfsd.
+// Package nfs implements parsing of /proc/net/rpc/nfsd.
// Fields are documented in https://www.svennd.be/nfsd-stats-explained-procnetrpcnfsd/
package nfs
@@ -136,8 +136,8 @@ type ClientV4Stats struct {
Setattr uint64
FsInfo uint64
Renew uint64
- SetClientId uint64
- SetClientIdConfirm uint64
+ SetClientID uint64
+ SetClientIDConfirm uint64
Lock uint64
Lockt uint64
Locku uint64
@@ -156,13 +156,13 @@ type ClientV4Stats struct {
ReadDir uint64
ServerCaps uint64
DelegReturn uint64
- GetAcl uint64
- SetAcl uint64
+ GetACL uint64
+ SetACL uint64
FsLocations uint64
ReleaseLockowner uint64
Secinfo uint64
FsidPresent uint64
- ExchangeId uint64
+ ExchangeID uint64
CreateSession uint64
DestroySession uint64
Sequence uint64
@@ -173,11 +173,11 @@ type ClientV4Stats struct {
LayoutCommit uint64
LayoutReturn uint64
SecinfoNoName uint64
- TestStateId uint64
- FreeStateId uint64
+ TestStateID uint64
+ FreeStateID uint64
GetDeviceList uint64
BindConnToSession uint64
- DestroyClientId uint64
+ DestroyClientID uint64
Seek uint64
Allocate uint64
DeAllocate uint64
@@ -238,7 +238,7 @@ type V4Ops struct {
RelLockOwner uint64
}
-// RPCStats models all stats from /proc/net/rpc/nfs.
+// ClientRPCStats models all stats from /proc/net/rpc/nfs.
type ClientRPCStats struct {
Network Network
ClientRPC ClientRPC
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse.go b/vendor/github.com/prometheus/procfs/nfs/parse.go
index 8f568f011..95a83cc5b 100644
--- a/vendor/github.com/prometheus/procfs/nfs/parse.go
+++ b/vendor/github.com/prometheus/procfs/nfs/parse.go
@@ -204,8 +204,8 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
Setattr: v[10],
FsInfo: v[11],
Renew: v[12],
- SetClientId: v[13],
- SetClientIdConfirm: v[14],
+ SetClientID: v[13],
+ SetClientIDConfirm: v[14],
Lock: v[15],
Lockt: v[16],
Locku: v[17],
@@ -224,13 +224,13 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
ReadDir: v[30],
ServerCaps: v[31],
DelegReturn: v[32],
- GetAcl: v[33],
- SetAcl: v[34],
+ GetACL: v[33],
+ SetACL: v[34],
FsLocations: v[35],
ReleaseLockowner: v[36],
Secinfo: v[37],
FsidPresent: v[38],
- ExchangeId: v[39],
+ ExchangeID: v[39],
CreateSession: v[40],
DestroySession: v[41],
Sequence: v[42],
@@ -241,11 +241,11 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
LayoutCommit: v[47],
LayoutReturn: v[48],
SecinfoNoName: v[49],
- TestStateId: v[50],
- FreeStateId: v[51],
+ TestStateID: v[50],
+ FreeStateID: v[51],
GetDeviceList: v[52],
BindConnToSession: v[53],
- DestroyClientId: v[54],
+ DestroyClientID: v[54],
Seek: v[55],
Allocate: v[56],
DeAllocate: v[57],
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfs_test.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfs_test.go
deleted file mode 100644
index afe3db47e..000000000
--- a/vendor/github.com/prometheus/procfs/nfs/parse_nfs_test.go
+++ /dev/null
@@ -1,305 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// 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.
-
-package nfs_test
-
-import (
- "reflect"
- "strings"
- "testing"
-
- "github.com/prometheus/procfs/nfs"
-)
-
-func TestNewNFSClientRPCStats(t *testing.T) {
- tests := []struct {
- name string
- content string
- stats *nfs.ClientRPCStats
- invalid bool
- }{
- {
- name: "invalid file",
- content: "invalid",
- invalid: true,
- }, {
- name: "good old kernel version file",
- content: `net 70 70 69 45
-rpc 1218785755 374636 1218815394
-proc2 18 16 57 74 52 71 73 45 86 0 52 83 61 17 53 50 23 70 82
-proc3 22 0 1061909262 48906 4077635 117661341 5 29391916 2570425 2993289 590 0 0 7815 15 1130 0 3983 92385 13332 2 1 23729
-proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21 84 15 53 86 54 66 56 97 36 49 32 85 81 11 58 32 67 13 28 35 90 1 26 1337
-`,
- stats: &nfs.ClientRPCStats{
- Network: nfs.Network{
- NetCount: 70,
- UDPCount: 70,
- TCPCount: 69,
- TCPConnect: 45,
- },
- ClientRPC: nfs.ClientRPC{
- RPCCount: 1218785755,
- Retransmissions: 374636,
- AuthRefreshes: 1218815394,
- },
- V2Stats: nfs.V2Stats{
- Null: 16,
- GetAttr: 57,
- SetAttr: 74,
- Root: 52,
- Lookup: 71,
- ReadLink: 73,
- Read: 45,
- WrCache: 86,
- Write: 0,
- Create: 52,
- Remove: 83,
- Rename: 61,
- Link: 17,
- SymLink: 53,
- MkDir: 50,
- RmDir: 23,
- ReadDir: 70,
- FsStat: 82,
- },
- V3Stats: nfs.V3Stats{
- Null: 0,
- GetAttr: 1061909262,
- SetAttr: 48906,
- Lookup: 4077635,
- Access: 117661341,
- ReadLink: 5,
- Read: 29391916,
- Write: 2570425,
- Create: 2993289,
- MkDir: 590,
- SymLink: 0,
- MkNod: 0,
- Remove: 7815,
- RmDir: 15,
- Rename: 1130,
- Link: 0,
- ReadDir: 3983,
- ReadDirPlus: 92385,
- FsStat: 13332,
- FsInfo: 2,
- PathConf: 1,
- Commit: 23729, },
- ClientV4Stats: nfs.ClientV4Stats{
- Null: 98,
- Read: 51,
- Write: 54,
- Commit: 83,
- Open: 85,
- OpenConfirm: 23,
- OpenNoattr: 24,
- OpenDowngrade: 1,
- Close: 28,
- Setattr: 73,
- FsInfo: 68,
- Renew: 83,
- SetClientId: 12,
- SetClientIdConfirm: 84,
- Lock: 39,
- Lockt: 68,
- Locku: 59,
- Access: 58,
- Getattr: 88,
- Lookup: 29,
- LookupRoot: 74,
- Remove: 69,
- Rename: 96,
- Link: 21,
- Symlink: 84,
- Create: 15,
- Pathconf: 53,
- StatFs: 86,
- ReadLink: 54,
- ReadDir: 66,
- ServerCaps: 56,
- DelegReturn: 97,
- GetAcl: 36,
- SetAcl: 49,
- FsLocations: 32,
- ReleaseLockowner: 85,
- Secinfo: 81,
- FsidPresent: 11,
- ExchangeId: 58,
- CreateSession: 32,
- DestroySession: 67,
- Sequence: 13,
- GetLeaseTime: 28,
- ReclaimComplete: 35,
- LayoutGet: 90,
- GetDeviceInfo: 1,
- LayoutCommit: 26,
- LayoutReturn: 1337,
- SecinfoNoName: 0,
- TestStateId: 0,
- FreeStateId: 0,
- GetDeviceList: 0,
- BindConnToSession: 0,
- DestroyClientId: 0,
- Seek: 0,
- Allocate: 0,
- DeAllocate: 0,
- LayoutStats: 0,
- Clone: 0,
- },
- },
- }, {
- name: "good file",
- content: `net 18628 0 18628 6
-rpc 4329785 0 4338291
-proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
-proc3 22 1 4084749 29200 94754 32580 186 47747 7981 8639 0 6356 0 6962 0 7958 0 0 241 4 4 2 39
-proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-`,
- stats: &nfs.ClientRPCStats{
- Network: nfs.Network{
- NetCount: 18628,
- UDPCount: 0,
- TCPCount: 18628,
- TCPConnect: 6,
- },
- ClientRPC: nfs.ClientRPC{
- RPCCount: 4329785,
- Retransmissions: 0,
- AuthRefreshes: 4338291,
- },
- V2Stats: nfs.V2Stats{
- Null: 2,
- GetAttr: 69,
- SetAttr: 0,
- Root: 0,
- Lookup: 4410,
- ReadLink: 0,
- Read: 0,
- WrCache: 0,
- Write: 0,
- Create: 0,
- Remove: 0,
- Rename: 0,
- Link: 0,
- SymLink: 0,
- MkDir: 0,
- RmDir: 0,
- ReadDir: 99,
- FsStat: 2,
- },
- V3Stats: nfs.V3Stats{
- Null: 1,
- GetAttr: 4084749,
- SetAttr: 29200,
- Lookup: 94754,
- Access: 32580,
- ReadLink: 186,
- Read: 47747,
- Write: 7981,
- Create: 8639,
- MkDir: 0,
- SymLink: 6356,
- MkNod: 0,
- Remove: 6962,
- RmDir: 0,
- Rename: 7958,
- Link: 0,
- ReadDir: 0,
- ReadDirPlus: 241,
- FsStat: 4,
- FsInfo: 4,
- PathConf: 2,
- Commit: 39,
- },
- ClientV4Stats: nfs.ClientV4Stats{
- Null: 1,
- Read: 0,
- Write: 0,
- Commit: 0,
- Open: 0,
- OpenConfirm: 0,
- OpenNoattr: 0,
- OpenDowngrade: 0,
- Close: 0,
- Setattr: 0,
- FsInfo: 0,
- Renew: 0,
- SetClientId: 1,
- SetClientIdConfirm: 1,
- Lock: 0,
- Lockt: 0,
- Locku: 0,
- Access: 0,
- Getattr: 0,
- Lookup: 0,
- LookupRoot: 0,
- Remove: 2,
- Rename: 0,
- Link: 0,
- Symlink: 0,
- Create: 0,
- Pathconf: 0,
- StatFs: 0,
- ReadLink: 0,
- ReadDir: 0,
- ServerCaps: 0,
- DelegReturn: 0,
- GetAcl: 0,
- SetAcl: 0,
- FsLocations: 0,
- ReleaseLockowner: 0,
- Secinfo: 0,
- FsidPresent: 0,
- ExchangeId: 0,
- CreateSession: 0,
- DestroySession: 0,
- Sequence: 0,
- GetLeaseTime: 0,
- ReclaimComplete: 0,
- LayoutGet: 0,
- GetDeviceInfo: 0,
- LayoutCommit: 0,
- LayoutReturn: 0,
- SecinfoNoName: 0,
- TestStateId: 0,
- FreeStateId: 0,
- GetDeviceList: 0,
- BindConnToSession: 0,
- DestroyClientId: 0,
- Seek: 0,
- Allocate: 0,
- DeAllocate: 0,
- LayoutStats: 0,
- Clone: 0,
- },
- },
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- stats, err := nfs.ParseClientRPCStats(strings.NewReader(tt.content))
-
- if tt.invalid && err == nil {
- t.Fatal("expected an error, but none occurred")
- }
- if !tt.invalid && err != nil {
- t.Fatalf("unexpected error: %v", err)
- }
-
- if want, have := tt.stats, stats; !reflect.DeepEqual(want, have) {
- t.Fatalf("unexpected NFS stats:\nwant:\n%v\nhave:\n%v", want, have)
- }
- })
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd_test.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfsd_test.go
deleted file mode 100644
index b09b3b580..000000000
--- a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd_test.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2018 The Prometheus Authors
-// 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.
-
-package nfs_test
-
-import (
- "reflect"
- "strings"
- "testing"
-
- "github.com/prometheus/procfs/nfs"
-)
-
-func TestNewNFSdServerRPCStats(t *testing.T) {
- tests := []struct {
- name string
- content string
- stats *nfs.ServerRPCStats
- invalid bool
- }{
- {
- name: "invalid file",
- content: "invalid",
- invalid: true,
- }, {
- name: "good file",
- content: `rc 0 6 18622
-fh 0 0 0 0 0
-io 157286400 0
-th 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
-ra 32 0 0 0 0 0 0 0 0 0 0 0
-net 18628 0 18628 6
-rpc 18628 0 0 0 0
-proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
-proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0
-proc4 2 2 10853
-proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-`,
- stats: &nfs.ServerRPCStats{
- ReplyCache: nfs.ReplyCache{
- Hits: 0,
- Misses: 6,
- NoCache: 18622,
- },
- FileHandles: nfs.FileHandles{
- Stale: 0,
- TotalLookups: 0,
- AnonLookups: 0,
- DirNoCache: 0,
- NoDirNoCache: 0,
- },
- InputOutput: nfs.InputOutput{
- Read: 157286400,
- Write: 0,
- },
- Threads: nfs.Threads{
- Threads: 8,
- FullCnt: 0,
- },
- ReadAheadCache: nfs.ReadAheadCache{
- CacheSize: 32,
- CacheHistogram: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- NotFound: 0,
- },
- Network: nfs.Network{
- NetCount: 18628,
- UDPCount: 0,
- TCPCount: 18628,
- TCPConnect: 6,
- },
- ServerRPC: nfs.ServerRPC{
- RPCCount: 18628,
- BadCnt: 0,
- BadFmt: 0,
- BadAuth: 0,
- BadcInt: 0,
- },
- V2Stats: nfs.V2Stats{
- Null: 2,
- GetAttr: 69,
- SetAttr: 0,
- Root: 0,
- Lookup: 4410,
- ReadLink: 0,
- Read: 0,
- WrCache: 0,
- Write: 0,
- Create: 0,
- Remove: 0,
- Rename: 0,
- Link: 0,
- SymLink: 0,
- MkDir: 0,
- RmDir: 0,
- ReadDir: 99,
- FsStat: 2,
- },
- V3Stats: nfs.V3Stats{
- Null: 2,
- GetAttr: 112,
- SetAttr: 0,
- Lookup: 2719,
- Access: 111,
- ReadLink: 0,
- Read: 0,
- Write: 0,
- Create: 0,
- MkDir: 0,
- SymLink: 0,
- MkNod: 0,
- Remove: 0,
- RmDir: 0,
- Rename: 0,
- Link: 0,
- ReadDir: 27,
- ReadDirPlus: 216,
- FsStat: 0,
- FsInfo: 2,
- PathConf: 1,
- Commit: 0,
- },
- ServerV4Stats: nfs.ServerV4Stats{
- Null: 2,
- Compound: 10853,
- },
- V4Ops: nfs.V4Ops{
- Op0Unused: 0,
- Op1Unused: 0,
- Op2Future: 0,
- Access: 1098,
- Close: 2,
- Commit: 0,
- Create: 0,
- DelegPurge: 0,
- DelegReturn: 0,
- GetAttr: 8179,
- GetFH: 5896,
- Link: 0,
- Lock: 0,
- Lockt: 0,
- Locku: 0,
- Lookup: 5900,
- LookupRoot: 0,
- Nverify: 0,
- Open: 2,
- OpenAttr: 0,
- OpenConfirm: 2,
- OpenDgrd: 0,
- PutFH: 9609,
- PutPubFH: 0,
- PutRootFH: 2,
- Read: 150,
- ReadDir: 1272,
- ReadLink: 0,
- Remove: 0,
- Rename: 0,
- Renew: 1236,
- RestoreFH: 0,
- SaveFH: 0,
- SecInfo: 0,
- SetAttr: 0,
- Verify: 3,
- Write: 3,
- RelLockOwner: 0,
- },
- },
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- stats, err := nfs.ParseServerRPCStats(strings.NewReader(tt.content))
-
- if tt.invalid && err == nil {
- t.Fatal("expected an error, but none occurred")
- }
- if !tt.invalid && err != nil {
- t.Fatalf("unexpected error: %v", err)
- }
-
- if want, have := tt.stats, stats; !reflect.DeepEqual(want, have) {
- t.Fatalf("unexpected NFS stats:\nwant:\n%v\nhave:\n%v", want, have)
- }
- })
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go
index 8717e1fe0..7cf5b8acf 100644
--- a/vendor/github.com/prometheus/procfs/proc.go
+++ b/vendor/github.com/prometheus/procfs/proc.go
@@ -1,6 +1,20 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
+ "bytes"
"fmt"
"io/ioutil"
"os"
@@ -113,7 +127,7 @@ func (p Proc) CmdLine() ([]string, error) {
return []string{}, nil
}
- return strings.Split(string(data[:len(data)-1]), string(byte(0))), nil
+ return strings.Split(string(bytes.TrimRight(data, string("\x00"))), string(byte(0))), nil
}
// Comm returns the command name of a process.
diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go
index e7f6674d0..0251c83bf 100644
--- a/vendor/github.com/prometheus/procfs/proc_io.go
+++ b/vendor/github.com/prometheus/procfs/proc_io.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/proc_io_test.go b/vendor/github.com/prometheus/procfs/proc_io_test.go
deleted file mode 100644
index 3aa1a1293..000000000
--- a/vendor/github.com/prometheus/procfs/proc_io_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package procfs
-
-import "testing"
-
-func TestProcIO(t *testing.T) {
- p, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- s, err := p.NewIO()
- if err != nil {
- t.Fatal(err)
- }
-
- for _, test := range []struct {
- name string
- want int64
- have int64
- }{
- {name: "RChar", want: 750339, have: int64(s.RChar)},
- {name: "WChar", want: 818609, have: int64(s.WChar)},
- {name: "SyscR", want: 7405, have: int64(s.SyscR)},
- {name: "SyscW", want: 5245, have: int64(s.SyscW)},
- {name: "ReadBytes", want: 1024, have: int64(s.ReadBytes)},
- {name: "WriteBytes", want: 2048, have: int64(s.WriteBytes)},
- {name: "CancelledWriteBytes", want: -1024, have: s.CancelledWriteBytes},
- } {
- if test.want != test.have {
- t.Errorf("want %s %d, have %d", test.name, test.want, test.have)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go
index b684a5b55..f04ba6fda 100644
--- a/vendor/github.com/prometheus/procfs/proc_limits.go
+++ b/vendor/github.com/prometheus/procfs/proc_limits.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/proc_limits_test.go b/vendor/github.com/prometheus/procfs/proc_limits_test.go
deleted file mode 100644
index ac62a3bb6..000000000
--- a/vendor/github.com/prometheus/procfs/proc_limits_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package procfs
-
-import "testing"
-
-func TestNewLimits(t *testing.T) {
- p, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- l, err := p.NewLimits()
- if err != nil {
- t.Fatal(err)
- }
-
- for _, test := range []struct {
- name string
- want int64
- have int64
- }{
- {name: "cpu time", want: -1, have: l.CPUTime},
- {name: "open files", want: 2048, have: l.OpenFiles},
- {name: "msgqueue size", want: 819200, have: l.MsqqueueSize},
- {name: "nice priority", want: 0, have: l.NicePriority},
- {name: "address space", want: 8589934592, have: l.AddressSpace},
- } {
- if test.want != test.have {
- t.Errorf("want %s %d, have %d", test.name, test.want, test.have)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go
index befdd2690..d06c26eba 100644
--- a/vendor/github.com/prometheus/procfs/proc_ns.go
+++ b/vendor/github.com/prometheus/procfs/proc_ns.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/proc_ns_test.go b/vendor/github.com/prometheus/procfs/proc_ns_test.go
deleted file mode 100644
index aea3f6a6c..000000000
--- a/vendor/github.com/prometheus/procfs/proc_ns_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package procfs
-
-import (
- "testing"
-)
-
-func TestNewNamespaces(t *testing.T) {
- p, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- namespaces, err := p.NewNamespaces()
- if err != nil {
- t.Fatal(err)
- }
-
- expectedNamespaces := map[string]Namespace{
- "mnt": {"mnt", 4026531840},
- "net": {"net", 4026531993},
- }
-
- if want, have := len(expectedNamespaces), len(namespaces); want != have {
- t.Errorf("want %d parsed namespaces, have %d", want, have)
- }
- for _, ns := range namespaces {
- if want, have := expectedNamespaces[ns.Type], ns; want != have {
- t.Errorf("%s: want %v, have %v", ns.Type, want, have)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go
index 724e271b9..3cf2a9f18 100644
--- a/vendor/github.com/prometheus/procfs/proc_stat.go
+++ b/vendor/github.com/prometheus/procfs/proc_stat.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/proc_stat_test.go b/vendor/github.com/prometheus/procfs/proc_stat_test.go
deleted file mode 100644
index a2ebcde78..000000000
--- a/vendor/github.com/prometheus/procfs/proc_stat_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-package procfs
-
-import (
- "os"
- "testing"
-)
-
-func TestProcStat(t *testing.T) {
- p, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- s, err := p.NewStat()
- if err != nil {
- t.Fatal(err)
- }
-
- for _, test := range []struct {
- name string
- want int
- have int
- }{
- {name: "pid", want: 26231, have: s.PID},
- {name: "user time", want: 1677, have: int(s.UTime)},
- {name: "system time", want: 44, have: int(s.STime)},
- {name: "start time", want: 82375, have: int(s.Starttime)},
- {name: "virtual memory size", want: 56274944, have: s.VSize},
- {name: "resident set size", want: 1981, have: s.RSS},
- } {
- if test.want != test.have {
- t.Errorf("want %s %d, have %d", test.name, test.want, test.have)
- }
- }
-}
-
-func TestProcStatComm(t *testing.T) {
- s1, err := testProcStat(26231)
- if err != nil {
- t.Fatal(err)
- }
- if want, have := "vim", s1.Comm; want != have {
- t.Errorf("want comm %s, have %s", want, have)
- }
-
- s2, err := testProcStat(584)
- if err != nil {
- t.Fatal(err)
- }
- if want, have := "(a b ) ( c d) ", s2.Comm; want != have {
- t.Errorf("want comm %s, have %s", want, have)
- }
-}
-
-func TestProcStatVirtualMemory(t *testing.T) {
- s, err := testProcStat(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- if want, have := 56274944, s.VirtualMemory(); want != have {
- t.Errorf("want virtual memory %d, have %d", want, have)
- }
-}
-
-func TestProcStatResidentMemory(t *testing.T) {
- s, err := testProcStat(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- if want, have := 1981*os.Getpagesize(), s.ResidentMemory(); want != have {
- t.Errorf("want resident memory %d, have %d", want, have)
- }
-}
-
-func TestProcStatStartTime(t *testing.T) {
- s, err := testProcStat(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- time, err := s.StartTime()
- if err != nil {
- t.Fatal(err)
- }
- if want, have := 1418184099.75, time; want != have {
- t.Errorf("want start time %f, have %f", want, have)
- }
-}
-
-func TestProcStatCPUTime(t *testing.T) {
- s, err := testProcStat(26231)
- if err != nil {
- t.Fatal(err)
- }
-
- if want, have := 17.21, s.CPUTime(); want != have {
- t.Errorf("want cpu time %f, have %f", want, have)
- }
-}
-
-func testProcStat(pid int) (ProcStat, error) {
- p, err := FS("fixtures").NewProc(pid)
- if err != nil {
- return ProcStat{}, err
- }
-
- return p.NewStat()
-}
diff --git a/vendor/github.com/prometheus/procfs/proc_test.go b/vendor/github.com/prometheus/procfs/proc_test.go
deleted file mode 100644
index 104b3245d..000000000
--- a/vendor/github.com/prometheus/procfs/proc_test.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package procfs
-
-import (
- "reflect"
- "sort"
- "testing"
-)
-
-func TestSelf(t *testing.T) {
- fs := FS("fixtures")
-
- p1, err := fs.NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
- p2, err := fs.Self()
- if err != nil {
- t.Fatal(err)
- }
-
- if !reflect.DeepEqual(p1, p2) {
- t.Errorf("want process %v, have %v", p1, p2)
- }
-}
-
-func TestAllProcs(t *testing.T) {
- procs, err := FS("fixtures").AllProcs()
- if err != nil {
- t.Fatal(err)
- }
- sort.Sort(procs)
- for i, p := range []*Proc{{PID: 584}, {PID: 26231}} {
- if want, have := p.PID, procs[i].PID; want != have {
- t.Errorf("want processes %d, have %d", want, have)
- }
- }
-}
-
-func TestCmdLine(t *testing.T) {
- for _, tt := range []struct {
- process int
- want []string
- }{
- {process: 26231, want: []string{"vim", "test.go", "+10"}},
- {process: 26232, want: []string{}},
- } {
- p1, err := FS("fixtures").NewProc(tt.process)
- if err != nil {
- t.Fatal(err)
- }
- c1, err := p1.CmdLine()
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(tt.want, c1) {
- t.Errorf("want cmdline %v, have %v", tt.want, c1)
- }
- }
-}
-
-func TestComm(t *testing.T) {
- for _, tt := range []struct {
- process int
- want string
- }{
- {process: 26231, want: "vim"},
- {process: 26232, want: "ata_sff"},
- } {
- p1, err := FS("fixtures").NewProc(tt.process)
- if err != nil {
- t.Fatal(err)
- }
- c1, err := p1.Comm()
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(tt.want, c1) {
- t.Errorf("want comm %v, have %v", tt.want, c1)
- }
- }
-}
-
-func TestExecutable(t *testing.T) {
- for _, tt := range []struct {
- process int
- want string
- }{
- {process: 26231, want: "/usr/bin/vim"},
- {process: 26232, want: ""},
- } {
- p, err := FS("fixtures").NewProc(tt.process)
- if err != nil {
- t.Fatal(err)
- }
- exe, err := p.Executable()
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(tt.want, exe) {
- t.Errorf("want absolute path to cmdline %v, have %v", tt.want, exe)
- }
- }
-}
-
-func TestFileDescriptors(t *testing.T) {
- p1, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
- fds, err := p1.FileDescriptors()
- if err != nil {
- t.Fatal(err)
- }
- sort.Sort(byUintptr(fds))
- if want := []uintptr{0, 1, 2, 3, 10}; !reflect.DeepEqual(want, fds) {
- t.Errorf("want fds %v, have %v", want, fds)
- }
-}
-
-func TestFileDescriptorTargets(t *testing.T) {
- p1, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
- fds, err := p1.FileDescriptorTargets()
- if err != nil {
- t.Fatal(err)
- }
- sort.Strings(fds)
- var want = []string{
- "../../symlinktargets/abc",
- "../../symlinktargets/def",
- "../../symlinktargets/ghi",
- "../../symlinktargets/uvw",
- "../../symlinktargets/xyz",
- }
- if !reflect.DeepEqual(want, fds) {
- t.Errorf("want fds %v, have %v", want, fds)
- }
-}
-
-func TestFileDescriptorsLen(t *testing.T) {
- p1, err := FS("fixtures").NewProc(26231)
- if err != nil {
- t.Fatal(err)
- }
- l, err := p1.FileDescriptorsLen()
- if err != nil {
- t.Fatal(err)
- }
- if want, have := 5, l; want != have {
- t.Errorf("want fds %d, have %d", want, have)
- }
-}
-
-type byUintptr []uintptr
-
-func (a byUintptr) Len() int { return len(a) }
-func (a byUintptr) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a byUintptr) Less(i, j int) bool { return a[i] < a[j] }
diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go
index 701f4df64..61eb6b0e3 100644
--- a/vendor/github.com/prometheus/procfs/stat.go
+++ b/vendor/github.com/prometheus/procfs/stat.go
@@ -1,3 +1,16 @@
+// Copyright 2018 The Prometheus Authors
+// 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.
+
package procfs
import (
diff --git a/vendor/github.com/prometheus/procfs/stat_test.go b/vendor/github.com/prometheus/procfs/stat_test.go
deleted file mode 100644
index c34ccce1a..000000000
--- a/vendor/github.com/prometheus/procfs/stat_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package procfs
-
-import "testing"
-
-func TestStat(t *testing.T) {
- s, err := FS("fixtures").NewStat()
- if err != nil {
- t.Fatal(err)
- }
-
- // cpu
- if want, have := float64(301854)/userHZ, s.CPUTotal.User; want != have {
- t.Errorf("want cpu/user %v, have %v", want, have)
- }
- if want, have := float64(31)/userHZ, s.CPU[7].SoftIRQ; want != have {
- t.Errorf("want cpu7/softirq %v, have %v", want, have)
- }
-
- // intr
- if want, have := uint64(8885917), s.IRQTotal; want != have {
- t.Errorf("want irq/total %d, have %d", want, have)
- }
- if want, have := uint64(1), s.IRQ[8]; want != have {
- t.Errorf("want irq8 %d, have %d", want, have)
- }
-
- // ctxt
- if want, have := uint64(38014093), s.ContextSwitches; want != have {
- t.Errorf("want context switches (ctxt) %d, have %d", want, have)
- }
-
- // btime
- if want, have := uint64(1418183276), s.BootTime; want != have {
- t.Errorf("want boot time (btime) %d, have %d", want, have)
- }
-
- // processes
- if want, have := uint64(26442), s.ProcessCreated; want != have {
- t.Errorf("want process created (processes) %d, have %d", want, have)
- }
-
- // procs_running
- if want, have := uint64(2), s.ProcessesRunning; want != have {
- t.Errorf("want processes running (procs_running) %d, have %d", want, have)
- }
-
- // procs_blocked
- if want, have := uint64(1), s.ProcessesBlocked; want != have {
- t.Errorf("want processes blocked (procs_blocked) %d, have %d", want, have)
- }
-
- // softirq
- if want, have := uint64(5057579), s.SoftIRQTotal; want != have {
- t.Errorf("want softirq total %d, have %d", want, have)
- }
-
- if want, have := uint64(508444), s.SoftIRQ.Rcu; want != have {
- t.Errorf("want softirq RCU %d, have %d", want, have)
- }
-
-}
diff --git a/vendor/github.com/prometheus/procfs/sysfs/.gitignore b/vendor/github.com/prometheus/procfs/sysfs/.gitignore
deleted file mode 100644
index 67fc140b9..000000000
--- a/vendor/github.com/prometheus/procfs/sysfs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-fixtures/
diff --git a/vendor/github.com/prometheus/procfs/sysfs/doc.go b/vendor/github.com/prometheus/procfs/sysfs/doc.go
deleted file mode 100644
index 9a6c244e9..000000000
--- a/vendor/github.com/prometheus/procfs/sysfs/doc.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-// Package sysfs provides functions to retrieve system and kernel metrics
-// from the pseudo-filesystem sys.
-package sysfs
diff --git a/vendor/github.com/prometheus/procfs/sysfs/fixtures.ttar b/vendor/github.com/prometheus/procfs/sysfs/fixtures.ttar
deleted file mode 100644
index 0045e7d56..000000000
--- a/vendor/github.com/prometheus/procfs/sysfs/fixtures.ttar
+++ /dev/null
@@ -1,721 +0,0 @@
-Directory: fixtures
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/dirty_data
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hits
-Lines: 1
-289
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hits
-Lines: 1
-546
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/io_errors
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/metadata_written
-Lines: 1
-512
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/priority_stats
-Lines: 5
-Unused: 99%
-Metadata: 0%
-Average: 10473
-Sectors per Q: 64
-Quantiles: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946]
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/written
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/average_key_size
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0
-Mode: 777
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/dirty_data
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_hits
-Lines: 1
-289
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_hits
-Lines: 1
-546
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/btree_cache_size
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0
-Mode: 777
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/io_errors
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/metadata_written
-Lines: 1
-512
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/priority_stats
-Lines: 5
-Unused: 99%
-Metadata: 0%
-Average: 10473
-Sectors per Q: 64
-Quantiles: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946]
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/written
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache_available_percent
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/congested
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/active_journal_entries
-Lines: 1
-1
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_nodes
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_read_average_duration_us
-Lines: 1
-1305
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/cache_read_races
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/root_usage_percent
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hits
-Lines: 1
-289
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hit_ratio
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/bypassed
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_hits
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hit_ratio
-Lines: 1
-100
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hits
-Lines: 1
-546
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_miss_collisions
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_misses
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_readaheads
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/tree_depth
-Lines: 1
-0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/xfs
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/xfs/sda1
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/xfs/sda1/stats
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/xfs/sda1/stats/stats
-Lines: 1
-extent_alloc 1 0 0 0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/xfs/sdb1
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Directory: fixtures/fs/xfs/sdb1/stats
-Mode: 755
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Path: fixtures/fs/xfs/sdb1/stats/stats
-Lines: 1
-extent_alloc 2 0 0 0
-Mode: 644
-# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/vendor/github.com/prometheus/procfs/sysfs/fs.go b/vendor/github.com/prometheus/procfs/sysfs/fs.go
deleted file mode 100644
index fb15d438a..000000000
--- a/vendor/github.com/prometheus/procfs/sysfs/fs.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package sysfs
-
-import (
- "fmt"
- "os"
- "path/filepath"
-
- "github.com/prometheus/procfs/bcache"
- "github.com/prometheus/procfs/xfs"
-)
-
-// FS represents the pseudo-filesystem sys, which provides an interface to
-// kernel data structures.
-type FS string
-
-// DefaultMountPoint is the common mount point of the sys filesystem.
-const DefaultMountPoint = "/sys"
-
-// NewFS returns a new FS mounted under the given mountPoint. It will error
-// if the mount point can't be read.
-func NewFS(mountPoint string) (FS, error) {
- info, err := os.Stat(mountPoint)
- if err != nil {
- return "", fmt.Errorf("could not read %s: %s", mountPoint, err)
- }
- if !info.IsDir() {
- return "", fmt.Errorf("mount point %s is not a directory", mountPoint)
- }
-
- return FS(mountPoint), nil
-}
-
-// Path returns the path of the given subsystem relative to the sys root.
-func (fs FS) Path(p ...string) string {
- return filepath.Join(append([]string{string(fs)}, p...)...)
-}
-
-// XFSStats retrieves XFS filesystem runtime statistics for each mounted XFS
-// filesystem. Only available on kernel 4.4+. On older kernels, an empty
-// slice of *xfs.Stats will be returned.
-func (fs FS) XFSStats() ([]*xfs.Stats, error) {
- matches, err := filepath.Glob(fs.Path("fs/xfs/*/stats/stats"))
- if err != nil {
- return nil, err
- }
-
- stats := make([]*xfs.Stats, 0, len(matches))
- for _, m := range matches {
- f, err := os.Open(m)
- if err != nil {
- return nil, err
- }
-
- // "*" used in glob above indicates the name of the filesystem.
- name := filepath.Base(filepath.Dir(filepath.Dir(m)))
-
- // File must be closed after parsing, regardless of success or
- // failure. Defer is not used because of the loop.
- s, err := xfs.ParseStats(f)
- _ = f.Close()
- if err != nil {
- return nil, err
- }
-
- s.Name = name
- stats = append(stats, s)
- }
-
- return stats, nil
-}
-
-// BcacheStats retrieves bcache runtime statistics for each bcache.
-func (fs FS) BcacheStats() ([]*bcache.Stats, error) {
- matches, err := filepath.Glob(fs.Path("fs/bcache/*-*"))
- if err != nil {
- return nil, err
- }
-
- stats := make([]*bcache.Stats, 0, len(matches))
- for _, uuidPath := range matches {
- // "*-*" in glob above indicates the name of the bcache.
- name := filepath.Base(uuidPath)
-
- // stats
- s, err := bcache.GetStats(uuidPath)
- if err != nil {
- return nil, err
- }
-
- s.Name = name
- stats = append(stats, s)
- }
-
- return stats, nil
-}
diff --git a/vendor/github.com/prometheus/procfs/sysfs/fs_test.go b/vendor/github.com/prometheus/procfs/sysfs/fs_test.go
deleted file mode 100644
index 2b7402eca..000000000
--- a/vendor/github.com/prometheus/procfs/sysfs/fs_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package sysfs
-
-import "testing"
-
-func TestNewFS(t *testing.T) {
- if _, err := NewFS("foobar"); err == nil {
- t.Error("want NewFS to fail for non-existing mount point")
- }
-
- if _, err := NewFS("doc.go"); err == nil {
- t.Error("want NewFS to fail if mount point is not a directory")
- }
-}
-
-func TestFSXFSStats(t *testing.T) {
- stats, err := FS("fixtures").XFSStats()
- if err != nil {
- t.Fatalf("failed to parse XFS stats: %v", err)
- }
-
- tests := []struct {
- name string
- allocated uint32
- }{
- {
- name: "sda1",
- allocated: 1,
- },
- {
- name: "sdb1",
- allocated: 2,
- },
- }
-
- const expect = 2
-
- if l := len(stats); l != expect {
- t.Fatalf("unexpected number of XFS stats: %d", l)
- }
- if l := len(tests); l != expect {
- t.Fatalf("unexpected number of tests: %d", l)
- }
-
- for i, tt := range tests {
- if want, got := tt.name, stats[i].Name; want != got {
- t.Errorf("unexpected stats name:\nwant: %q\nhave: %q", want, got)
- }
-
- if want, got := tt.allocated, stats[i].ExtentAllocation.ExtentsAllocated; want != got {
- t.Errorf("unexpected extents allocated:\nwant: %d\nhave: %d", want, got)
- }
- }
-}
-
-func TestFSBcacheStats(t *testing.T) {
- stats, err := FS("fixtures").BcacheStats()
- if err != nil {
- t.Fatalf("failed to parse bcache stats: %v", err)
- }
-
- tests := []struct {
- name string
- bdevs int
- caches int
- }{
- {
- name: "deaddd54-c735-46d5-868e-f331c5fd7c74",
- bdevs: 1,
- caches: 1,
- },
- }
-
- const expect = 1
-
- if l := len(stats); l != expect {
- t.Fatalf("unexpected number of bcache stats: %d", l)
- }
- if l := len(tests); l != expect {
- t.Fatalf("unexpected number of tests: %d", l)
- }
-
- for i, tt := range tests {
- if want, got := tt.name, stats[i].Name; want != got {
- t.Errorf("unexpected stats name:\nwant: %q\nhave: %q", want, got)
- }
-
- if want, got := tt.bdevs, len(stats[i].Bdevs); want != got {
- t.Errorf("unexpected value allocated:\nwant: %d\nhave: %d", want, got)
- }
-
- if want, got := tt.caches, len(stats[i].Caches); want != got {
- t.Errorf("unexpected value allocated:\nwant: %d\nhave: %d", want, got)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar
index 8227a4a37..b0171a12b 100755
--- a/vendor/github.com/prometheus/procfs/ttar
+++ b/vendor/github.com/prometheus/procfs/ttar
@@ -1,11 +1,26 @@
#!/usr/bin/env bash
+
# Purpose: plain text tar format
# Limitations: - only suitable for text files, directories, and symlinks
# - stores only filename, content, and mode
# - not designed for untrusted input
-
+#
# Note: must work with bash version 3.2 (macOS)
+# Copyright 2017 Roger Luethi
+#
+# 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.
+
set -o errexit -o nounset
# Sanitize environment (for instance, standard sorting of glob matches)
@@ -13,6 +28,55 @@ export LC_ALL=C
path=""
CMD=""
+ARG_STRING="$*"
+
+#------------------------------------------------------------------------------
+# Not all sed implementations can work on null bytes. In order to make ttar
+# work out of the box on macOS, use Python as a stream editor.
+
+USE_PYTHON=0
+
+PYTHON_CREATE_FILTER=$(cat << 'PCF'
+#!/usr/bin/env python
+
+import re
+import sys
+
+for line in sys.stdin:
+ line = re.sub(r'EOF', r'\EOF', line)
+ line = re.sub(r'NULLBYTE', r'\NULLBYTE', line)
+ line = re.sub('\x00', r'NULLBYTE', line)
+ sys.stdout.write(line)
+PCF
+)
+
+PYTHON_EXTRACT_FILTER=$(cat << 'PEF'
+#!/usr/bin/env python
+
+import re
+import sys
+
+for line in sys.stdin:
+ line = re.sub(r'(?<!\\)NULLBYTE', '\x00', line)
+ line = re.sub(r'\\NULLBYTE', 'NULLBYTE', line)
+ line = re.sub(r'([^\\])EOF', r'\1', line)
+ line = re.sub(r'\\EOF', 'EOF', line)
+ sys.stdout.write(line)
+PEF
+)
+
+function test_environment {
+ if [[ "$(echo "a" | sed 's/a/\x0/' | wc -c)" -ne 2 ]]; then
+ echo "WARNING sed unable to handle null bytes, using Python (slow)."
+ if ! which python >/dev/null; then
+ echo "ERROR Python not found. Aborting."
+ exit 2
+ fi
+ USE_PYTHON=1
+ fi
+}
+
+#------------------------------------------------------------------------------
function usage {
bname=$(basename "$0")
@@ -23,6 +87,7 @@ Usage: $bname [-C <DIR>] -c -f <ARCHIVE> <FILE...> (create archive)
Options:
-C <DIR> (change directory)
+ -v (verbose)
Example: Change to sysfs directory, create ttar file from fixtures directory
$bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/
@@ -45,6 +110,8 @@ function set_cmd {
CMD=$1
}
+unset VERBOSE
+
while getopts :cf:htxvC: opt; do
case $opt in
c)
@@ -142,8 +209,37 @@ function extract {
fi
while IFS= read -r line; do
line_no=$(( line_no + 1 ))
+ local eof_without_newline
if [ "$size" -gt 0 ]; then
- echo "$line" >> "$path"
+ if [[ "$line" =~ [^\\]EOF ]]; then
+ # An EOF not preceeded by a backslash indicates that the line
+ # does not end with a newline
+ eof_without_newline=1
+ else
+ eof_without_newline=0
+ fi
+ # Replace NULLBYTE with null byte if at beginning of line
+ # Replace NULLBYTE with null byte unless preceeded by backslash
+ # Remove one backslash in front of NULLBYTE (if any)
+ # Remove EOF unless preceeded by backslash
+ # Remove one backslash in front of EOF
+ if [ $USE_PYTHON -eq 1 ]; then
+ echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path"
+ else
+ # The repeated pattern makes up for sed's lack of negative
+ # lookbehind assertions (for consecutive null bytes).
+ echo -n "$line" | \
+ sed -e 's/^NULLBYTE/\x0/g;
+ s/\([^\\]\)NULLBYTE/\1\x0/g;
+ s/\([^\\]\)NULLBYTE/\1\x0/g;
+ s/\\NULLBYTE/NULLBYTE/g;
+ s/\([^\\]\)EOF/\1/g;
+ s/\\EOF/EOF/g;
+ ' >> "$path"
+ fi
+ if [[ "$eof_without_newline" -eq 0 ]]; then
+ echo >> "$path"
+ fi
size=$(( size - 1 ))
continue
fi
@@ -187,11 +283,14 @@ function get_mode {
local mfile=$1
if [ -z "${STAT_OPTION:-}" ]; then
if stat -c '%a' "$mfile" >/dev/null 2>&1; then
+ # GNU stat
STAT_OPTION='-c'
STAT_FORMAT='%a'
else
+ # BSD stat
STAT_OPTION='-f'
- STAT_FORMAT='%A'
+ # Octal output, user/group/other (omit file type, sticky bit)
+ STAT_FORMAT='%OLp'
fi
fi
stat "${STAT_OPTION}" "${STAT_FORMAT}" "$mfile"
@@ -200,6 +299,7 @@ function get_mode {
function _create {
shopt -s nullglob
local mode
+ local eof_without_newline
while (( "$#" )); do
file=$1
if [ -L "$file" ]; then
@@ -223,8 +323,30 @@ function _create {
elif [ -f "$file" ]; then
echo "Path: $file"
lines=$(wc -l "$file"|awk '{print $1}')
+ eof_without_newline=0
+ if [[ "$(wc -c "$file"|awk '{print $1}')" -gt 0 ]] && \
+ [[ "$(tail -c 1 "$file" | wc -l)" -eq 0 ]]; then
+ eof_without_newline=1
+ lines=$((lines+1))
+ fi
echo "Lines: $lines"
- cat "$file"
+ # Add backslash in front of EOF
+ # Add backslash in front of NULLBYTE
+ # Replace null byte with NULLBYTE
+ if [ $USE_PYTHON -eq 1 ]; then
+ < "$file" python -c "$PYTHON_CREATE_FILTER"
+ else
+ < "$file" \
+ sed 's/EOF/\\EOF/g;
+ s/NULLBYTE/\\NULLBYTE/g;
+ s/\x0/NULLBYTE/g;
+ '
+ fi
+ if [[ "$eof_without_newline" -eq 1 ]]; then
+ # Finish line with EOF to indicate that the original line did
+ # not end with a linefeed
+ echo "EOF"
+ fi
mode=$(get_mode "$file")
echo "Mode: $mode"
vecho "$mode $file"
@@ -249,9 +371,12 @@ function create {
rm "$ttar_file"
fi
exec > "$ttar_file"
+ echo "# Archive created by ttar $ARG_STRING"
_create "$@"
}
+test_environment
+
if [ -n "${CDIR:-}" ]; then
if [[ "$ARCHIVE" != /* ]]; then
# Relative path: preserve the archive's location before changing
diff --git a/vendor/github.com/prometheus/procfs/xfrm_test.go b/vendor/github.com/prometheus/procfs/xfrm_test.go
deleted file mode 100644
index 5918c390e..000000000
--- a/vendor/github.com/prometheus/procfs/xfrm_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2017 Prometheus Team
-// 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.
-
-package procfs
-
-import (
- "testing"
-)
-
-func TestXfrmStats(t *testing.T) {
- xfrmStats, err := FS("fixtures").NewXfrmStat()
- if err != nil {
- t.Fatal(err)
- }
-
- for _, test := range []struct {
- name string
- want int
- got int
- }{
- {name: "XfrmInError", want: 1, got: xfrmStats.XfrmInError},
- {name: "XfrmInBufferError", want: 2, got: xfrmStats.XfrmInBufferError},
- {name: "XfrmInHdrError", want: 4, got: xfrmStats.XfrmInHdrError},
- {name: "XfrmInNoStates", want: 3, got: xfrmStats.XfrmInNoStates},
- {name: "XfrmInStateProtoError", want: 40, got: xfrmStats.XfrmInStateProtoError},
- {name: "XfrmInStateModeError", want: 100, got: xfrmStats.XfrmInStateModeError},
- {name: "XfrmInStateSeqError", want: 6000, got: xfrmStats.XfrmInStateSeqError},
- {name: "XfrmInStateExpired", want: 4, got: xfrmStats.XfrmInStateExpired},
- {name: "XfrmInStateMismatch", want: 23451, got: xfrmStats.XfrmInStateMismatch},
- {name: "XfrmInStateInvalid", want: 55555, got: xfrmStats.XfrmInStateInvalid},
- {name: "XfrmInTmplMismatch", want: 51, got: xfrmStats.XfrmInTmplMismatch},
- {name: "XfrmInNoPols", want: 65432, got: xfrmStats.XfrmInNoPols},
- {name: "XfrmInPolBlock", want: 100, got: xfrmStats.XfrmInPolBlock},
- {name: "XfrmInPolError", want: 10000, got: xfrmStats.XfrmInPolError},
- {name: "XfrmOutError", want: 1000000, got: xfrmStats.XfrmOutError},
- {name: "XfrmOutBundleGenError", want: 43321, got: xfrmStats.XfrmOutBundleGenError},
- {name: "XfrmOutBundleCheckError", want: 555, got: xfrmStats.XfrmOutBundleCheckError},
- {name: "XfrmOutNoStates", want: 869, got: xfrmStats.XfrmOutNoStates},
- {name: "XfrmOutStateProtoError", want: 4542, got: xfrmStats.XfrmOutStateProtoError},
- {name: "XfrmOutStateModeError", want: 4, got: xfrmStats.XfrmOutStateModeError},
- {name: "XfrmOutStateSeqError", want: 543, got: xfrmStats.XfrmOutStateSeqError},
- {name: "XfrmOutStateExpired", want: 565, got: xfrmStats.XfrmOutStateExpired},
- {name: "XfrmOutPolBlock", want: 43456, got: xfrmStats.XfrmOutPolBlock},
- {name: "XfrmOutPolDead", want: 7656, got: xfrmStats.XfrmOutPolDead},
- {name: "XfrmOutPolError", want: 1454, got: xfrmStats.XfrmOutPolError},
- {name: "XfrmFwdHdrError", want: 6654, got: xfrmStats.XfrmFwdHdrError},
- {name: "XfrmOutStateInvaliad", want: 28765, got: xfrmStats.XfrmOutStateInvalid},
- {name: "XfrmAcquireError", want: 24532, got: xfrmStats.XfrmAcquireError},
- {name: "XfrmInStateInvalid", want: 55555, got: xfrmStats.XfrmInStateInvalid},
- {name: "XfrmOutError", want: 1000000, got: xfrmStats.XfrmOutError},
- } {
- if test.want != test.got {
- t.Errorf("Want %s %d, have %d", test.name, test.want, test.got)
- }
- }
-}
diff --git a/vendor/github.com/prometheus/procfs/xfs/parse_test.go b/vendor/github.com/prometheus/procfs/xfs/parse_test.go
deleted file mode 100644
index 2e946c2c5..000000000
--- a/vendor/github.com/prometheus/procfs/xfs/parse_test.go
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright 2017 The Prometheus Authors
-// 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.
-
-package xfs_test
-
-import (
- "reflect"
- "strings"
- "testing"
-
- "github.com/prometheus/procfs"
- "github.com/prometheus/procfs/xfs"
-)
-
-func TestParseStats(t *testing.T) {
- tests := []struct {
- name string
- s string
- fs bool
- stats *xfs.Stats
- invalid bool
- }{
- {
- name: "empty file OK",
- },
- {
- name: "short or empty lines and unknown labels ignored",
- s: "one\n\ntwo 1 2 3\n",
- stats: &xfs.Stats{},
- },
- {
- name: "bad uint32",
- s: "extent_alloc XXX",
- invalid: true,
- },
- {
- name: "bad uint64",
- s: "xpc XXX",
- invalid: true,
- },
- {
- name: "extent_alloc bad",
- s: "extent_alloc 1",
- invalid: true,
- },
- {
- name: "extent_alloc OK",
- s: "extent_alloc 1 2 3 4",
- stats: &xfs.Stats{
- ExtentAllocation: xfs.ExtentAllocationStats{
- ExtentsAllocated: 1,
- BlocksAllocated: 2,
- ExtentsFreed: 3,
- BlocksFreed: 4,
- },
- },
- },
- {
- name: "abt bad",
- s: "abt 1",
- invalid: true,
- },
- {
- name: "abt OK",
- s: "abt 1 2 3 4",
- stats: &xfs.Stats{
- AllocationBTree: xfs.BTreeStats{
- Lookups: 1,
- Compares: 2,
- RecordsInserted: 3,
- RecordsDeleted: 4,
- },
- },
- },
- {
- name: "blk_map bad",
- s: "blk_map 1",
- invalid: true,
- },
- {
- name: "blk_map OK",
- s: "blk_map 1 2 3 4 5 6 7",
- stats: &xfs.Stats{
- BlockMapping: xfs.BlockMappingStats{
- Reads: 1,
- Writes: 2,
- Unmaps: 3,
- ExtentListInsertions: 4,
- ExtentListDeletions: 5,
- ExtentListLookups: 6,
- ExtentListCompares: 7,
- },
- },
- },
- {
- name: "bmbt bad",
- s: "bmbt 1",
- invalid: true,
- },
- {
- name: "bmbt OK",
- s: "bmbt 1 2 3 4",
- stats: &xfs.Stats{
- BlockMapBTree: xfs.BTreeStats{
- Lookups: 1,
- Compares: 2,
- RecordsInserted: 3,
- RecordsDeleted: 4,
- },
- },
- },
- {
- name: "dir bad",
- s: "dir 1",
- invalid: true,
- },
- {
- name: "dir OK",
- s: "dir 1 2 3 4",
- stats: &xfs.Stats{
- DirectoryOperation: xfs.DirectoryOperationStats{
- Lookups: 1,
- Creates: 2,
- Removes: 3,
- Getdents: 4,
- },
- },
- },
- {
- name: "trans bad",
- s: "trans 1",
- invalid: true,
- },
- {
- name: "trans OK",
- s: "trans 1 2 3",
- stats: &xfs.Stats{
- Transaction: xfs.TransactionStats{
- Sync: 1,
- Async: 2,
- Empty: 3,
- },
- },
- },
- {
- name: "ig bad",
- s: "ig 1",
- invalid: true,
- },
- {
- name: "ig OK",
- s: "ig 1 2 3 4 5 6 7",
- stats: &xfs.Stats{
- InodeOperation: xfs.InodeOperationStats{
- Attempts: 1,
- Found: 2,
- Recycle: 3,
- Missed: 4,
- Duplicate: 5,
- Reclaims: 6,
- AttributeChange: 7,
- },
- },
- },
- {
- name: "log bad",
- s: "log 1",
- invalid: true,
- },
- {
- name: "log OK",
- s: "log 1 2 3 4 5",
- stats: &xfs.Stats{
- LogOperation: xfs.LogOperationStats{
- Writes: 1,
- Blocks: 2,
- NoInternalBuffers: 3,
- Force: 4,
- ForceSleep: 5,
- },
- },
- },
- {
- name: "rw bad",
- s: "rw 1",
- invalid: true,
- },
- {
- name: "rw OK",
- s: "rw 1 2",
- stats: &xfs.Stats{
- ReadWrite: xfs.ReadWriteStats{
- Read: 1,
- Write: 2,
- },
- },
- },
- {
- name: "attr bad",
- s: "attr 1",
- invalid: true,
- },
- {
- name: "attr OK",
- s: "attr 1 2 3 4",
- stats: &xfs.Stats{
- AttributeOperation: xfs.AttributeOperationStats{
- Get: 1,
- Set: 2,
- Remove: 3,
- List: 4,
- },
- },
- },
- {
- name: "icluster bad",
- s: "icluster 1",
- invalid: true,
- },
- {
- name: "icluster OK",
- s: "icluster 1 2 3",
- stats: &xfs.Stats{
- InodeClustering: xfs.InodeClusteringStats{
- Iflush: 1,
- Flush: 2,
- FlushInode: 3,
- },
- },
- },
- {
- name: "vnodes bad",
- s: "vnodes 1",
- invalid: true,
- },
- {
- name: "vnodes (missing free) OK",
- s: "vnodes 1 2 3 4 5 6 7",
- stats: &xfs.Stats{
- Vnode: xfs.VnodeStats{
- Active: 1,
- Allocate: 2,
- Get: 3,
- Hold: 4,
- Release: 5,
- Reclaim: 6,
- Remove: 7,
- },
- },
- },
- {
- name: "vnodes (with free) OK",
- s: "vnodes 1 2 3 4 5 6 7 8",
- stats: &xfs.Stats{
- Vnode: xfs.VnodeStats{
- Active: 1,
- Allocate: 2,
- Get: 3,
- Hold: 4,
- Release: 5,
- Reclaim: 6,
- Remove: 7,
- Free: 8,
- },
- },
- },
- {
- name: "buf bad",
- s: "buf 1",
- invalid: true,
- },
- {
- name: "buf OK",
- s: "buf 1 2 3 4 5 6 7 8 9",
- stats: &xfs.Stats{
- Buffer: xfs.BufferStats{
- Get: 1,
- Create: 2,
- GetLocked: 3,
- GetLockedWaited: 4,
- BusyLocked: 5,
- MissLocked: 6,
- PageRetries: 7,
- PageFound: 8,
- GetRead: 9,
- },
- },
- },
- {
- name: "xpc bad",
- s: "xpc 1",
- invalid: true,
- },
- {
- name: "xpc OK",
- s: "xpc 1 2 3",
- stats: &xfs.Stats{
- ExtendedPrecision: xfs.ExtendedPrecisionStats{
- FlushBytes: 1,
- WriteBytes: 2,
- ReadBytes: 3,
- },
- },
- },
- {
- name: "fixtures OK",
- fs: true,
- stats: &xfs.Stats{
- ExtentAllocation: xfs.ExtentAllocationStats{
- ExtentsAllocated: 92447,
- BlocksAllocated: 97589,
- ExtentsFreed: 92448,
- BlocksFreed: 93751,
- },
- AllocationBTree: xfs.BTreeStats{
- Lookups: 0,
- Compares: 0,
- RecordsInserted: 0,
- RecordsDeleted: 0,
- },
- BlockMapping: xfs.BlockMappingStats{
- Reads: 1767055,
- Writes: 188820,
- Unmaps: 184891,
- ExtentListInsertions: 92447,
- ExtentListDeletions: 92448,
- ExtentListLookups: 2140766,
- ExtentListCompares: 0,
- },
- BlockMapBTree: xfs.BTreeStats{
- Lookups: 0,
- Compares: 0,
- RecordsInserted: 0,
- RecordsDeleted: 0,
- },
- DirectoryOperation: xfs.DirectoryOperationStats{
- Lookups: 185039,
- Creates: 92447,
- Removes: 92444,
- Getdents: 136422,
- },
- Transaction: xfs.TransactionStats{
- Sync: 706,
- Async: 944304,
- Empty: 0,
- },
- InodeOperation: xfs.InodeOperationStats{
- Attempts: 185045,
- Found: 58807,
- Recycle: 0,
- Missed: 126238,
- Duplicate: 0,
- Reclaims: 33637,
- AttributeChange: 22,
- },
- LogOperation: xfs.LogOperationStats{
- Writes: 2883,
- Blocks: 113448,
- NoInternalBuffers: 9,
- Force: 17360,
- ForceSleep: 739,
- },
- ReadWrite: xfs.ReadWriteStats{
- Read: 107739,
- Write: 94045,
- },
- AttributeOperation: xfs.AttributeOperationStats{
- Get: 4,
- Set: 0,
- Remove: 0,
- List: 0,
- },
- InodeClustering: xfs.InodeClusteringStats{
- Iflush: 8677,
- Flush: 7849,
- FlushInode: 135802,
- },
- Vnode: xfs.VnodeStats{
- Active: 92601,
- Allocate: 0,
- Get: 0,
- Hold: 0,
- Release: 92444,
- Reclaim: 92444,
- Remove: 92444,
- Free: 0,
- },
- Buffer: xfs.BufferStats{
- Get: 2666287,
- Create: 7122,
- GetLocked: 2659202,
- GetLockedWaited: 3599,
- BusyLocked: 2,
- MissLocked: 7085,
- PageRetries: 0,
- PageFound: 10297,
- GetRead: 7085,
- },
- ExtendedPrecision: xfs.ExtendedPrecisionStats{
- FlushBytes: 399724544,
- WriteBytes: 92823103,
- ReadBytes: 86219234,
- },
- },
- },
- }
-
- for _, tt := range tests {
- var (
- stats *xfs.Stats
- err error
- )
-
- if tt.s != "" {
- stats, err = xfs.ParseStats(strings.NewReader(tt.s))
- }
- if tt.fs {
- stats, err = procfs.FS("../fixtures").XFSStats()
- }
-
- if tt.invalid && err == nil {
- t.Error("expected an error, but none occurred")
- }
- if !tt.invalid && err != nil {
- t.Errorf("unexpected error: %v", err)
- }
-
- if want, have := tt.stats, stats; !reflect.DeepEqual(want, have) {
- t.Errorf("unexpected XFS stats:\nwant:\n%v\nhave:\n%v", want, have)
- }
- }
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/.gitignore b/vendor/github.com/rwcarlsen/goexif/.gitignore
deleted file mode 100644
index 3866bbf31..000000000
--- a/vendor/github.com/rwcarlsen/goexif/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-*.sw*
-
-# 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
diff --git a/vendor/github.com/rwcarlsen/goexif/README.md b/vendor/github.com/rwcarlsen/goexif/README.md
deleted file mode 100644
index b57ef20fc..000000000
--- a/vendor/github.com/rwcarlsen/goexif/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-goexif
-======
-
-Provides decoding of basic exif and tiff encoded data. Still in alpha - no guarantees.
-Suggestions and pull requests are welcome. Functionality is split into two packages - "exif" and "tiff"
-The exif package depends on the tiff package.
-Documentation can be found at http://godoc.org/github.com/rwcarlsen/goexif
-
-Like goexif? - Bitcoin Cash tips welcome: 1DrU5V37nTXuv4vnRLVpahJEjhdATNgoBh
-
-To install, in a terminal type:
-
-```
-go get github.com/rwcarlsen/goexif/exif
-```
-
-Or if you just want the tiff package:
-
-```
-go get github.com/rwcarlsen/goexif/tiff
-```
-
-Example usage:
-
-```go
-package main
-
-import (
- "fmt"
- "log"
- "os"
-
- "github.com/rwcarlsen/goexif/exif"
- "github.com/rwcarlsen/goexif/mknote"
-)
-
-func ExampleDecode() {
- fname := "sample1.jpg"
-
- f, err := os.Open(fname)
- if err != nil {
- log.Fatal(err)
- }
-
- // Optionally register camera makenote data parsing - currently Nikon and
- // Canon are supported.
- exif.RegisterParsers(mknote.All...)
-
- x, err := exif.Decode(f)
- if err != nil {
- log.Fatal(err)
- }
-
- camModel, _ := x.Get(exif.Model) // normally, don't ignore errors!
- fmt.Println(camModel.StringVal())
-
- focal, _ := x.Get(exif.FocalLength)
- numer, denom, _ := focal.Rat2(0) // retrieve first (only) rat. value
- fmt.Printf("%v/%v", numer, denom)
-
- // Two convenience functions exist for date/time taken and GPS coords:
- tm, _ := x.DateTime()
- fmt.Println("Taken: ", tm)
-
- lat, long, _ := x.LatLong()
- fmt.Println("lat, long: ", lat, ", ", long)
-}
-```
-
-<!--golang-->
-[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/5e166f74cdb82b999ccd84e3c4dc4348 "githalytics.com")](http://githalytics.com/rwcarlsen/goexif)
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/huge_tag_exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/corrupt/huge_tag_exif.jpg
deleted file mode 100644
index ffb31743d..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/huge_tag_exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/infinite_loop_exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/corrupt/infinite_loop_exif.jpg
deleted file mode 100644
index 6b0994713..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/infinite_loop_exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/max_uint32_exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/corrupt/max_uint32_exif.jpg
deleted file mode 100644
index 2a51b0ba0..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/corrupt/max_uint32_exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/example_test.go b/vendor/github.com/rwcarlsen/goexif/exif/example_test.go
deleted file mode 100644
index 45fd5d4ad..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/example_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package exif_test
-
-import (
- "fmt"
- "log"
- "os"
-
- "github.com/rwcarlsen/goexif/exif"
- "github.com/rwcarlsen/goexif/mknote"
-)
-
-func ExampleDecode() {
- fname := "sample1.jpg"
-
- f, err := os.Open(fname)
- if err != nil {
- log.Fatal(err)
- }
-
- // Optionally register camera makenote data parsing - currently Nikon and
- // Canon are supported.
- exif.RegisterParsers(mknote.All...)
-
- x, err := exif.Decode(f)
- if err != nil {
- log.Fatal(err)
- }
-
- camModel, _ := x.Get(exif.Model) // normally, don't ignore errors!
- fmt.Println(camModel.StringVal())
-
- focal, _ := x.Get(exif.FocalLength)
- numer, denom, _ := focal.Rat2(0) // retrieve first (only) rat. value
- fmt.Printf("%v/%v", numer, denom)
-
- // Two convenience functions exist for date/time taken and GPS coords:
- tm, _ := x.DateTime()
- fmt.Println("Taken: ", tm)
-
- lat, long, _ := x.LatLong()
- fmt.Println("lat, long: ", lat, ", ", long)
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/exif.go b/vendor/github.com/rwcarlsen/goexif/exif/exif.go
index b420729da..87166ee4e 100644
--- a/vendor/github.com/rwcarlsen/goexif/exif/exif.go
+++ b/vendor/github.com/rwcarlsen/goexif/exif/exif.go
@@ -201,14 +201,16 @@ type Exif struct {
Raw []byte
}
-// Decode parses EXIF-encoded data from r and returns a queryable Exif
-// object. After the exif data section is called and the tiff structure
-// decoded, each registered parser is called (in order of registration). If
-// one parser returns an error, decoding terminates and the remaining
-// parsers are not called.
-// The error can be inspected with functions such as IsCriticalError to
-// determine whether the returned object might still be usable.
+// Decode parses EXIF data from r (a TIFF, JPEG, or raw EXIF block)
+// and returns a queryable Exif object. After the EXIF data section is
+// called and the TIFF structure is decoded, each registered parser is
+// called (in order of registration). If one parser returns an error,
+// decoding terminates and the remaining parsers are not called.
+//
+// The error can be inspected with functions such as IsCriticalError
+// to determine whether the returned object might still be usable.
func Decode(r io.Reader) (*Exif, error) {
+
// EXIF data in JPEG is stored in the APP1 marker. EXIF data uses the TIFF
// format to store data.
// If we're parsing a TIFF image, we don't need to strip away any data.
@@ -216,15 +218,14 @@ func Decode(r io.Reader) (*Exif, error) {
// marker and also the EXIF header.
header := make([]byte, 4)
- n, err := r.Read(header)
+ n, err := io.ReadFull(r, header)
if err != nil {
- return nil, err
- }
- if n < len(header) {
- return nil, errors.New("exif: short read on header")
+ return nil, fmt.Errorf("exif: error reading 4 byte header, got %d, %v", n, err)
}
var isTiff bool
+ var isRawExif bool
+ var assumeJPEG bool
switch string(header) {
case "II*\x00":
// TIFF - Little endian (Intel)
@@ -232,8 +233,11 @@ func Decode(r io.Reader) (*Exif, error) {
case "MM\x00*":
// TIFF - Big endian (Motorola)
isTiff = true
+ case "Exif":
+ isRawExif = true
default:
// Not TIFF, assume JPEG
+ assumeJPEG = true
}
// Put the header bytes back into the reader.
@@ -241,9 +245,20 @@ func Decode(r io.Reader) (*Exif, error) {
var (
er *bytes.Reader
tif *tiff.Tiff
+ sec *appSec
)
- if isTiff {
+ switch {
+ case isRawExif:
+ var header [6]byte
+ if _, err := io.ReadFull(r, header[:]); err != nil {
+ return nil, fmt.Errorf("exif: unexpected raw exif header read error")
+ }
+ if got, want := string(header[:]), "Exif\x00\x00"; got != want {
+ return nil, fmt.Errorf("exif: unexpected raw exif header; got %q, want %q", got, want)
+ }
+ fallthrough
+ case isTiff:
// Functions below need the IFDs from the TIFF data to be stored in a
// *bytes.Reader. We use TeeReader to get a copy of the bytes as a
// side-effect of tiff.Decode() doing its work.
@@ -251,9 +266,8 @@ func Decode(r io.Reader) (*Exif, error) {
tr := io.TeeReader(r, b)
tif, err = tiff.Decode(tr)
er = bytes.NewReader(b.Bytes())
- } else {
+ case assumeJPEG:
// Locate the JPEG APP1 header.
- var sec *appSec
sec, err = newAppSec(jpeg_APP1, r)
if err != nil {
return nil, err
@@ -368,8 +382,27 @@ func (x *Exif) DateTime() (time.Time, error) {
exifTimeLayout := "2006:01:02 15:04:05"
dateStr := strings.TrimRight(string(tag.Val), "\x00")
// TODO(bradfitz,mpl): look for timezone offset, GPS time, etc.
- // For now, just always return the time.Local timezone.
- return time.ParseInLocation(exifTimeLayout, dateStr, time.Local)
+ timeZone := time.Local
+ if tz, _ := x.TimeZone(); tz != nil {
+ timeZone = tz
+ }
+ return time.ParseInLocation(exifTimeLayout, dateStr, timeZone)
+}
+
+func (x *Exif) TimeZone() (*time.Location, error) {
+ // TODO: parse more timezone fields (e.g. Nikon WorldTime).
+ timeInfo, err := x.Get("Canon.TimeInfo")
+ if err != nil {
+ return nil, err
+ }
+ if timeInfo.Count < 2 {
+ return nil, errors.New("Canon.TimeInfo does not contain timezone")
+ }
+ offsetMinutes, err := timeInfo.Int(1)
+ if err != nil {
+ return nil, err
+ }
+ return time.FixedZone("", offsetMinutes*60), nil
}
func ratFloat(num, dem int64) float64 {
@@ -574,7 +607,7 @@ func newAppSec(marker byte, r io.Reader) (*appSec, error) {
}
dataLenBytes := make([]byte, 2)
- for k,_ := range dataLenBytes {
+ for k, _ := range dataLenBytes {
c, err := br.ReadByte()
if err != nil {
return nil, err
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/exif_test.go b/vendor/github.com/rwcarlsen/goexif/exif/exif_test.go
deleted file mode 100644
index c53f1ddda..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/exif_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package exif
-
-//go:generate go run regen_regress.go -- regress_expected_test.go
-//go:generate go fmt regress_expected_test.go
-
-import (
- "flag"
- "fmt"
- "math"
- "os"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/rwcarlsen/goexif/tiff"
-)
-
-var dataDir = flag.String("test_data_dir", ".", "Directory where the data files for testing are located")
-
-func TestDecode(t *testing.T) {
- fpath := filepath.Join(*dataDir, "samples")
- f, err := os.Open(fpath)
- if err != nil {
- t.Fatalf("Could not open sample directory '%s': %v", fpath, err)
- }
-
- names, err := f.Readdirnames(0)
- if err != nil {
- t.Fatalf("Could not read sample directory '%s': %v", fpath, err)
- }
-
- cnt := 0
- for _, name := range names {
- if !strings.HasSuffix(name, ".jpg") {
- t.Logf("skipping non .jpg file %v", name)
- continue
- }
- t.Logf("testing file %v", name)
- f, err := os.Open(filepath.Join(fpath, name))
- if err != nil {
- t.Fatal(err)
- }
-
- x, err := Decode(f)
- if err != nil {
- t.Fatal(err)
- } else if x == nil {
- t.Fatalf("No error and yet %v was not decoded", name)
- }
-
- t.Logf("checking pic %v", name)
- x.Walk(&walker{name, t})
- cnt++
- }
- if cnt != len(regressExpected) {
- t.Errorf("Did not process enough samples, got %d, want %d", cnt, len(regressExpected))
- }
-}
-
-type walker struct {
- picName string
- t *testing.T
-}
-
-func (w *walker) Walk(field FieldName, tag *tiff.Tag) error {
- // this needs to be commented out when regenerating regress expected vals
- pic := regressExpected[w.picName]
- if pic == nil {
- w.t.Errorf(" regression data not found")
- return nil
- }
-
- exp, ok := pic[field]
- if !ok {
- w.t.Errorf(" regression data does not have field %v", field)
- return nil
- }
-
- s := tag.String()
- if tag.Count == 1 && s != "\"\"" {
- s = fmt.Sprintf("[%s]", s)
- }
- got := tag.String()
-
- if exp != got {
- fmt.Println("s: ", s)
- fmt.Printf("len(s)=%v\n", len(s))
- w.t.Errorf(" field %v bad tag: expected '%s', got '%s'", field, exp, got)
- }
- return nil
-}
-
-func TestMarshal(t *testing.T) {
- name := filepath.Join(*dataDir, "sample1.jpg")
- f, err := os.Open(name)
- if err != nil {
- t.Fatalf("%v\n", err)
- }
- defer f.Close()
-
- x, err := Decode(f)
- if err != nil {
- t.Fatal(err)
- }
- if x == nil {
- t.Fatal("bad err")
- }
-
- b, err := x.MarshalJSON()
- if err != nil {
- t.Fatal(err)
- }
-
- t.Logf("%s", b)
-}
-
-func testSingleParseDegreesString(t *testing.T, s string, w float64) {
- g, err := parseTagDegreesString(s)
- if err != nil {
- t.Fatal(err)
- }
- if math.Abs(w-g) > 1e-10 {
- t.Errorf("Wrong parsing result %s: Want %.12f, got %.12f", s, w, g)
- }
-}
-
-func TestParseTagDegreesString(t *testing.T) {
- // semicolon as decimal mark
- testSingleParseDegreesString(t, "52,00000,50,00000,34,01180", 52.842781055556) // comma as separator
- testSingleParseDegreesString(t, "52,00000;50,00000;34,01180", 52.842781055556) // semicolon as separator
-
- // point as decimal mark
- testSingleParseDegreesString(t, "14.00000,44.00000,34.01180", 14.742781055556) // comma as separator
- testSingleParseDegreesString(t, "14.00000;44.00000;34.01180", 14.742781055556) // semicolon as separator
- testSingleParseDegreesString(t, "14.00000;44.00000,34.01180", 14.742781055556) // mixed separators
-
- testSingleParseDegreesString(t, "-008.0,30.0,03.6", -8.501) // leading zeros
-
- // no decimal places
- testSingleParseDegreesString(t, "-10,15,54", -10.265)
- testSingleParseDegreesString(t, "-10;15;54", -10.265)
-
- // incorrect mix of comma and point as decimal mark
- s := "-17,00000,15.00000,04.80000"
- if _, err := parseTagDegreesString(s); err == nil {
- t.Error("parseTagDegreesString: false positive for " + s)
- }
-}
-
-// Make sure we error out early when a tag had a count of MaxUint32
-func TestMaxUint32CountError(t *testing.T) {
- name := filepath.Join(*dataDir, "corrupt/max_uint32_exif.jpg")
- f, err := os.Open(name)
- if err != nil {
- t.Fatalf("%v\n", err)
- }
- defer f.Close()
-
- _, err = Decode(f)
- if err == nil {
- t.Fatal("no error on bad exif data")
- }
- if !strings.Contains(err.Error(), "invalid Count offset") {
- t.Fatal("wrong error:", err.Error())
- }
-}
-
-// Make sure we error out early with tag data sizes larger than the image file
-func TestHugeTagError(t *testing.T) {
- name := filepath.Join(*dataDir, "corrupt/huge_tag_exif.jpg")
- f, err := os.Open(name)
- if err != nil {
- t.Fatalf("%v\n", err)
- }
- defer f.Close()
-
- _, err = Decode(f)
- if err == nil {
- t.Fatal("no error on bad exif data")
- }
- if !strings.Contains(err.Error(), "short read") {
- t.Fatal("wrong error:", err.Error())
- }
-}
-
-// Check for a 0-length tag value
-func TestZeroLengthTagError(t *testing.T) {
- name := filepath.Join(*dataDir, "corrupt/infinite_loop_exif.jpg")
- f, err := os.Open(name)
- if err != nil {
- t.Fatalf("%v\n", err)
- }
- defer f.Close()
-
- _, err = Decode(f)
- if err == nil {
- t.Fatal("no error on bad exif data")
- }
- if !strings.Contains(err.Error(), "zero length tag value") {
- t.Fatal("wrong error:", err.Error())
- }
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/fields.go b/vendor/github.com/rwcarlsen/goexif/exif/fields.go
index 0388d2390..734034de6 100644
--- a/vendor/github.com/rwcarlsen/goexif/exif/fields.go
+++ b/vendor/github.com/rwcarlsen/goexif/exif/fields.go
@@ -9,127 +9,127 @@ const UnknownPrefix = "UnknownTag_"
// Primary EXIF fields
const (
ImageWidth FieldName = "ImageWidth"
- ImageLength = "ImageLength" // Image height called Length by EXIF spec
- BitsPerSample = "BitsPerSample"
- Compression = "Compression"
- PhotometricInterpretation = "PhotometricInterpretation"
- Orientation = "Orientation"
- SamplesPerPixel = "SamplesPerPixel"
- PlanarConfiguration = "PlanarConfiguration"
- YCbCrSubSampling = "YCbCrSubSampling"
- YCbCrPositioning = "YCbCrPositioning"
- XResolution = "XResolution"
- YResolution = "YResolution"
- ResolutionUnit = "ResolutionUnit"
- DateTime = "DateTime"
- ImageDescription = "ImageDescription"
- Make = "Make"
- Model = "Model"
- Software = "Software"
- Artist = "Artist"
- Copyright = "Copyright"
- ExifIFDPointer = "ExifIFDPointer"
- GPSInfoIFDPointer = "GPSInfoIFDPointer"
- InteroperabilityIFDPointer = "InteroperabilityIFDPointer"
- ExifVersion = "ExifVersion"
- FlashpixVersion = "FlashpixVersion"
- ColorSpace = "ColorSpace"
- ComponentsConfiguration = "ComponentsConfiguration"
- CompressedBitsPerPixel = "CompressedBitsPerPixel"
- PixelXDimension = "PixelXDimension"
- PixelYDimension = "PixelYDimension"
- MakerNote = "MakerNote"
- UserComment = "UserComment"
- RelatedSoundFile = "RelatedSoundFile"
- DateTimeOriginal = "DateTimeOriginal"
- DateTimeDigitized = "DateTimeDigitized"
- SubSecTime = "SubSecTime"
- SubSecTimeOriginal = "SubSecTimeOriginal"
- SubSecTimeDigitized = "SubSecTimeDigitized"
- ImageUniqueID = "ImageUniqueID"
- ExposureTime = "ExposureTime"
- FNumber = "FNumber"
- ExposureProgram = "ExposureProgram"
- SpectralSensitivity = "SpectralSensitivity"
- ISOSpeedRatings = "ISOSpeedRatings"
- OECF = "OECF"
- ShutterSpeedValue = "ShutterSpeedValue"
- ApertureValue = "ApertureValue"
- BrightnessValue = "BrightnessValue"
- ExposureBiasValue = "ExposureBiasValue"
- MaxApertureValue = "MaxApertureValue"
- SubjectDistance = "SubjectDistance"
- MeteringMode = "MeteringMode"
- LightSource = "LightSource"
- Flash = "Flash"
- FocalLength = "FocalLength"
- SubjectArea = "SubjectArea"
- FlashEnergy = "FlashEnergy"
- SpatialFrequencyResponse = "SpatialFrequencyResponse"
- FocalPlaneXResolution = "FocalPlaneXResolution"
- FocalPlaneYResolution = "FocalPlaneYResolution"
- FocalPlaneResolutionUnit = "FocalPlaneResolutionUnit"
- SubjectLocation = "SubjectLocation"
- ExposureIndex = "ExposureIndex"
- SensingMethod = "SensingMethod"
- FileSource = "FileSource"
- SceneType = "SceneType"
- CFAPattern = "CFAPattern"
- CustomRendered = "CustomRendered"
- ExposureMode = "ExposureMode"
- WhiteBalance = "WhiteBalance"
- DigitalZoomRatio = "DigitalZoomRatio"
- FocalLengthIn35mmFilm = "FocalLengthIn35mmFilm"
- SceneCaptureType = "SceneCaptureType"
- GainControl = "GainControl"
- Contrast = "Contrast"
- Saturation = "Saturation"
- Sharpness = "Sharpness"
- DeviceSettingDescription = "DeviceSettingDescription"
- SubjectDistanceRange = "SubjectDistanceRange"
- LensMake = "LensMake"
- LensModel = "LensModel"
+ ImageLength FieldName = "ImageLength" // Image height called Length by EXIF spec
+ BitsPerSample FieldName = "BitsPerSample"
+ Compression FieldName = "Compression"
+ PhotometricInterpretation FieldName = "PhotometricInterpretation"
+ Orientation FieldName = "Orientation"
+ SamplesPerPixel FieldName = "SamplesPerPixel"
+ PlanarConfiguration FieldName = "PlanarConfiguration"
+ YCbCrSubSampling FieldName = "YCbCrSubSampling"
+ YCbCrPositioning FieldName = "YCbCrPositioning"
+ XResolution FieldName = "XResolution"
+ YResolution FieldName = "YResolution"
+ ResolutionUnit FieldName = "ResolutionUnit"
+ DateTime FieldName = "DateTime"
+ ImageDescription FieldName = "ImageDescription"
+ Make FieldName = "Make"
+ Model FieldName = "Model"
+ Software FieldName = "Software"
+ Artist FieldName = "Artist"
+ Copyright FieldName = "Copyright"
+ ExifIFDPointer FieldName = "ExifIFDPointer"
+ GPSInfoIFDPointer FieldName = "GPSInfoIFDPointer"
+ InteroperabilityIFDPointer FieldName = "InteroperabilityIFDPointer"
+ ExifVersion FieldName = "ExifVersion"
+ FlashpixVersion FieldName = "FlashpixVersion"
+ ColorSpace FieldName = "ColorSpace"
+ ComponentsConfiguration FieldName = "ComponentsConfiguration"
+ CompressedBitsPerPixel FieldName = "CompressedBitsPerPixel"
+ PixelXDimension FieldName = "PixelXDimension"
+ PixelYDimension FieldName = "PixelYDimension"
+ MakerNote FieldName = "MakerNote"
+ UserComment FieldName = "UserComment"
+ RelatedSoundFile FieldName = "RelatedSoundFile"
+ DateTimeOriginal FieldName = "DateTimeOriginal"
+ DateTimeDigitized FieldName = "DateTimeDigitized"
+ SubSecTime FieldName = "SubSecTime"
+ SubSecTimeOriginal FieldName = "SubSecTimeOriginal"
+ SubSecTimeDigitized FieldName = "SubSecTimeDigitized"
+ ImageUniqueID FieldName = "ImageUniqueID"
+ ExposureTime FieldName = "ExposureTime"
+ FNumber FieldName = "FNumber"
+ ExposureProgram FieldName = "ExposureProgram"
+ SpectralSensitivity FieldName = "SpectralSensitivity"
+ ISOSpeedRatings FieldName = "ISOSpeedRatings"
+ OECF FieldName = "OECF"
+ ShutterSpeedValue FieldName = "ShutterSpeedValue"
+ ApertureValue FieldName = "ApertureValue"
+ BrightnessValue FieldName = "BrightnessValue"
+ ExposureBiasValue FieldName = "ExposureBiasValue"
+ MaxApertureValue FieldName = "MaxApertureValue"
+ SubjectDistance FieldName = "SubjectDistance"
+ MeteringMode FieldName = "MeteringMode"
+ LightSource FieldName = "LightSource"
+ Flash FieldName = "Flash"
+ FocalLength FieldName = "FocalLength"
+ SubjectArea FieldName = "SubjectArea"
+ FlashEnergy FieldName = "FlashEnergy"
+ SpatialFrequencyResponse FieldName = "SpatialFrequencyResponse"
+ FocalPlaneXResolution FieldName = "FocalPlaneXResolution"
+ FocalPlaneYResolution FieldName = "FocalPlaneYResolution"
+ FocalPlaneResolutionUnit FieldName = "FocalPlaneResolutionUnit"
+ SubjectLocation FieldName = "SubjectLocation"
+ ExposureIndex FieldName = "ExposureIndex"
+ SensingMethod FieldName = "SensingMethod"
+ FileSource FieldName = "FileSource"
+ SceneType FieldName = "SceneType"
+ CFAPattern FieldName = "CFAPattern"
+ CustomRendered FieldName = "CustomRendered"
+ ExposureMode FieldName = "ExposureMode"
+ WhiteBalance FieldName = "WhiteBalance"
+ DigitalZoomRatio FieldName = "DigitalZoomRatio"
+ FocalLengthIn35mmFilm FieldName = "FocalLengthIn35mmFilm"
+ SceneCaptureType FieldName = "SceneCaptureType"
+ GainControl FieldName = "GainControl"
+ Contrast FieldName = "Contrast"
+ Saturation FieldName = "Saturation"
+ Sharpness FieldName = "Sharpness"
+ DeviceSettingDescription FieldName = "DeviceSettingDescription"
+ SubjectDistanceRange FieldName = "SubjectDistanceRange"
+ LensMake FieldName = "LensMake"
+ LensModel FieldName = "LensModel"
)
// thumbnail fields
const (
- ThumbJPEGInterchangeFormat = "ThumbJPEGInterchangeFormat" // offset to thumb jpeg SOI
- ThumbJPEGInterchangeFormatLength = "ThumbJPEGInterchangeFormatLength" // byte length of thumb
+ ThumbJPEGInterchangeFormat FieldName = "ThumbJPEGInterchangeFormat" // offset to thumb jpeg SOI
+ ThumbJPEGInterchangeFormatLength FieldName = "ThumbJPEGInterchangeFormatLength" // byte length of thumb
)
// GPS fields
const (
GPSVersionID FieldName = "GPSVersionID"
- GPSLatitudeRef = "GPSLatitudeRef"
- GPSLatitude = "GPSLatitude"
- GPSLongitudeRef = "GPSLongitudeRef"
- GPSLongitude = "GPSLongitude"
- GPSAltitudeRef = "GPSAltitudeRef"
- GPSAltitude = "GPSAltitude"
- GPSTimeStamp = "GPSTimeStamp"
- GPSSatelites = "GPSSatelites"
- GPSStatus = "GPSStatus"
- GPSMeasureMode = "GPSMeasureMode"
- GPSDOP = "GPSDOP"
- GPSSpeedRef = "GPSSpeedRef"
- GPSSpeed = "GPSSpeed"
- GPSTrackRef = "GPSTrackRef"
- GPSTrack = "GPSTrack"
- GPSImgDirectionRef = "GPSImgDirectionRef"
- GPSImgDirection = "GPSImgDirection"
- GPSMapDatum = "GPSMapDatum"
- GPSDestLatitudeRef = "GPSDestLatitudeRef"
- GPSDestLatitude = "GPSDestLatitude"
- GPSDestLongitudeRef = "GPSDestLongitudeRef"
- GPSDestLongitude = "GPSDestLongitude"
- GPSDestBearingRef = "GPSDestBearingRef"
- GPSDestBearing = "GPSDestBearing"
- GPSDestDistanceRef = "GPSDestDistanceRef"
- GPSDestDistance = "GPSDestDistance"
- GPSProcessingMethod = "GPSProcessingMethod"
- GPSAreaInformation = "GPSAreaInformation"
- GPSDateStamp = "GPSDateStamp"
- GPSDifferential = "GPSDifferential"
+ GPSLatitudeRef FieldName = "GPSLatitudeRef"
+ GPSLatitude FieldName = "GPSLatitude"
+ GPSLongitudeRef FieldName = "GPSLongitudeRef"
+ GPSLongitude FieldName = "GPSLongitude"
+ GPSAltitudeRef FieldName = "GPSAltitudeRef"
+ GPSAltitude FieldName = "GPSAltitude"
+ GPSTimeStamp FieldName = "GPSTimeStamp"
+ GPSSatelites FieldName = "GPSSatelites"
+ GPSStatus FieldName = "GPSStatus"
+ GPSMeasureMode FieldName = "GPSMeasureMode"
+ GPSDOP FieldName = "GPSDOP"
+ GPSSpeedRef FieldName = "GPSSpeedRef"
+ GPSSpeed FieldName = "GPSSpeed"
+ GPSTrackRef FieldName = "GPSTrackRef"
+ GPSTrack FieldName = "GPSTrack"
+ GPSImgDirectionRef FieldName = "GPSImgDirectionRef"
+ GPSImgDirection FieldName = "GPSImgDirection"
+ GPSMapDatum FieldName = "GPSMapDatum"
+ GPSDestLatitudeRef FieldName = "GPSDestLatitudeRef"
+ GPSDestLatitude FieldName = "GPSDestLatitude"
+ GPSDestLongitudeRef FieldName = "GPSDestLongitudeRef"
+ GPSDestLongitude FieldName = "GPSDestLongitude"
+ GPSDestBearingRef FieldName = "GPSDestBearingRef"
+ GPSDestBearing FieldName = "GPSDestBearing"
+ GPSDestDistanceRef FieldName = "GPSDestDistanceRef"
+ GPSDestDistance FieldName = "GPSDestDistance"
+ GPSProcessingMethod FieldName = "GPSProcessingMethod"
+ GPSAreaInformation FieldName = "GPSAreaInformation"
+ GPSDateStamp FieldName = "GPSDateStamp"
+ GPSDifferential FieldName = "GPSDifferential"
)
// interoperability fields
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/regress_expected_test.go b/vendor/github.com/rwcarlsen/goexif/exif/regress_expected_test.go
deleted file mode 100644
index bf3998189..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/regress_expected_test.go
+++ /dev/null
@@ -1,2293 +0,0 @@
-package exif
-
-var regressExpected = map[string]map[FieldName]string{
- "2004-01-11-22-45-15-sep-2004-01-11-22-45-15a.jpg": map[FieldName]string{
- PixelXDimension: `1600`,
- InteroperabilityIFDPointer: `1009`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- Make: `"Samsung Techwin"`,
- DateTimeOriginal: `"2004:01:11 22:45:15"`,
- DateTimeDigitized: `"2004:01:11 22:45:15"`,
- ImageDescription: `"SAMSUNG DIGITAL CAMERA "`,
- ExifVersion: `"0220"`,
- MeteringMode: `2`,
- Flash: `1`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- FlashpixVersion: `"0100"`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `1039`,
- MaxApertureValue: `"32/10"`,
- ExposureProgram: `2`,
- Software: `"M5011S-1031"`,
- DateTime: `"2004:01:11 22:45:19"`,
- FNumber: `"320/100"`,
- ISOSpeedRatings: `150`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"2/1"`,
- RelatedSoundFile: `""`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `251`,
- ExposureTime: `"1000/30000"`,
- LightSource: `0`,
- FocalLength: `"82/11"`,
- ColorSpace: `1`,
- PixelYDimension: `1200`,
- FileSource: `""`,
- Model: `"U-CA 501"`,
- ThumbJPEGInterchangeFormatLength: `3530`,
- ExposureBiasValue: `"95/10"`,
- },
- "2006-08-03-16-29-38-sep-2006-08-03-16-29-38a.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `5108`,
- ThumbJPEGInterchangeFormatLength: `4323`,
- MaxApertureValue: `"95/32"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/1500"`,
- InteroperabilityIndex: `"R98"`,
- FocalPlaneXResolution: `"2816000/225"`,
- YResolution: `"180/1"`,
- DateTime: `"2006:08:03 16:29:38"`,
- ShutterSpeedValue: `"338/32"`,
- ApertureValue: `"95/32"`,
- FocalLength: `"5800/1000"`,
- FlashpixVersion: `"0100"`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2006:08:03 16:29:38"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `2824`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- FNumber: `"28/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2006:08:03 16:29:38"`,
- CompressedBitsPerPixel: `"5/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- UserComment: `""`,
- PixelXDimension: `2816`,
- Model: `"Canon PowerShot SD600"`,
- ExposureBiasValue: `"0/3"`,
- PixelYDimension: `2112`,
- FocalPlaneResolutionUnit: `2`,
- DigitalZoomRatio: `"2816/2816"`,
- Orientation: `6`,
- XResolution: `"180/1"`,
- ExifVersion: `"0220"`,
- Flash: `24`,
- FocalPlaneYResolution: `"2112000/169"`,
- CustomRendered: `0`,
- },
- "2006-11-11-19-17-56-sep-2006-11-11-19-17-56a.jpg": map[FieldName]string{
- FNumber: `"28/10"`,
- ExposureProgram: `2`,
- Software: `"E3200v1.1"`,
- DateTime: `"2006:11:11 19:17:56"`,
- ExposureTime: `"10/601"`,
- ISOSpeedRatings: `50`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"4/1"`,
- Saturation: `0`,
- XResolution: `"300/1"`,
- ExifIFDPointer: `284`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- FocalLength: `"58/10"`,
- ColorSpace: `1`,
- PixelYDimension: `1536`,
- FileSource: `""`,
- Model: `"E3200"`,
- ThumbJPEGInterchangeFormatLength: `4546`,
- DateTimeDigitized: `"2006:11:11 19:17:56"`,
- PixelXDimension: `2048`,
- InteroperabilityIFDPointer: `1026`,
- SceneType: `""`,
- DigitalZoomRatio: `"0/100"`,
- GainControl: `0`,
- Make: `"NIKON"`,
- DateTimeOriginal: `"2006:11:11 19:17:56"`,
- InteroperabilityIndex: `"R98"`,
- ImageDescription: `" "`,
- Sharpness: `0`,
- YCbCrPositioning: `2`,
- ExifVersion: `"0220"`,
- MeteringMode: `5`,
- Flash: `25`,
- FocalLengthIn35mmFilm: `38`,
- SubjectDistanceRange: `0`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- MaxApertureValue: `"30/10"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- YResolution: `"300/1"`,
- ThumbJPEGInterchangeFormat: `4596`,
- CustomRendered: `1`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- MakerNote: `""`,
- UserComment: `" "`,
- },
- "2006-12-10-23-58-20-sep-2006-12-10-23-58-20a.jpg": map[FieldName]string{
- Model: `"Canon PowerShot A80"`,
- ExposureBiasValue: `"0/3"`,
- PixelYDimension: `1704`,
- FocalPlaneResolutionUnit: `2`,
- FocalPlaneYResolution: `"1704000/210"`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"2272/2272"`,
- Orientation: `1`,
- XResolution: `"180/1"`,
- ExifVersion: `"0220"`,
- Flash: `24`,
- ThumbJPEGInterchangeFormat: `2036`,
- ThumbJPEGInterchangeFormatLength: `6465`,
- MaxApertureValue: `"95/32"`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/80"`,
- FocalLength: `"250/32"`,
- FlashpixVersion: `"0100"`,
- FocalPlaneXResolution: `"2272000/280"`,
- YResolution: `"180/1"`,
- DateTime: `"2006:12:10 23:58:20"`,
- ShutterSpeedValue: `"202/32"`,
- ApertureValue: `"95/32"`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2006:12:10 23:58:20"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1844`,
- FNumber: `"28/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- UserComment: `""`,
- PixelXDimension: `2272`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2006:12:10 23:58:20"`,
- CompressedBitsPerPixel: `"3/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- },
- "2006-12-17-07-09-14-sep-2006-12-17-07-09-14a.jpg": map[FieldName]string{
- WhiteBalance: `0`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormatLength: `7063`,
- ExposureBiasValue: `"0/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1536`,
- ExposureMode: `0`,
- InteroperabilityIndex: `"R98"`,
- Make: `"PENTAX Corporation"`,
- DateTimeDigitized: `"2006:12:17 07:09:14"`,
- PixelXDimension: `2048`,
- InteroperabilityIFDPointer: `31048`,
- CustomRendered: `0`,
- DateTime: `"2006:12:17 07:09:14"`,
- ExposureProgram: `2`,
- FocalLengthIn35mmFilm: `38`,
- Saturation: `0`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `64`,
- ExifVersion: `"0220"`,
- CompressedBitsPerPixel: `"5725504/3145728"`,
- Flash: `24`,
- Model: `"PENTAX Optio S6"`,
- ThumbJPEGInterchangeFormat: `31172`,
- MaxApertureValue: `"27/10"`,
- FocalLength: `"62/10"`,
- ColorSpace: `1`,
- DateTimeOriginal: `"2006:12:17 07:09:14"`,
- MakerNote: `""`,
- DigitalZoomRatio: `"100/100"`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Software: `"Optio S6 Ver 1.00"`,
- FNumber: `"270/100"`,
- Sharpness: `0`,
- ComponentsConfiguration: `""`,
- MeteringMode: `5`,
- SubjectDistanceRange: `2`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `586`,
- ExposureTime: `"1/160"`,
- },
- "2006-12-21-15-55-26-sep-2006-12-21-15-55-26a.jpg": map[FieldName]string{
- DateTimeDigitized: `"2006:12:21 15:55:26"`,
- CompressedBitsPerPixel: `"8/1"`,
- MeteringMode: `3`,
- MakerNote: `""`,
- PixelXDimension: `2592`,
- Saturation: `0`,
- ImageDescription: `" "`,
- Model: `"DSC-W15"`,
- ExposureBiasValue: `"-20/10"`,
- PixelYDimension: `1944`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `100`,
- ExifVersion: `"0220"`,
- Flash: `79`,
- CustomRendered: `0`,
- ThumbJPEGInterchangeFormat: `2484`,
- ThumbJPEGInterchangeFormatLength: `13571`,
- ExposureProgram: `2`,
- MaxApertureValue: `"48/16"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `256`,
- ExposureTime: `"10/400"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- YResolution: `"72/1"`,
- DateTime: `"2006:12:21 15:55:26"`,
- LightSource: `0`,
- FocalLength: `"79/10"`,
- FlashpixVersion: `"0100"`,
- Contrast: `0`,
- Make: `"SONY"`,
- DateTimeOriginal: `"2006:12:21 15:55:26"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `2278`,
- ExposureMode: `1`,
- SceneCaptureType: `0`,
- FNumber: `"28/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- },
- "2007-01-01-12-00-00-sep-2007-01-01-12-00-00a.jpg": map[FieldName]string{
- MaxApertureValue: `"286/100"`,
- ExposureIndex: `"200/1"`,
- ThumbJPEGInterchangeFormat: `13848`,
- ThumbJPEGInterchangeFormatLength: `3436`,
- ExposureProgram: `2`,
- ExposureTime: `"8942/1000000"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `340`,
- ApertureValue: `"286/100"`,
- LightSource: `0`,
- FocalLength: `"60/10"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"480/1"`,
- Software: `"KODAK EASYSHARE C713 ZOOM DIGITAL CAMERA"`,
- ShutterSpeedValue: `"680/100"`,
- InteroperabilityIFDPointer: `13816`,
- ExposureMode: `0`,
- FocalLengthIn35mmFilm: `36`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Make: `"EASTMAN KODAK COMPANY"`,
- DateTimeOriginal: `"2007:01:01 12:00:00"`,
- ComponentsConfiguration: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- FNumber: `"270/100"`,
- ColorSpace: `1`,
- FileSource: `""`,
- PixelXDimension: `1280`,
- SensingMethod: `2`,
- GainControl: `2`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- DateTimeDigitized: `"2007:01:01 12:00:00"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- Model: `"KODAK EASYSHARE C713 ZOOM DIGITAL CAMERA"`,
- ExposureBiasValue: `"0/10"`,
- PixelYDimension: `960`,
- ExifVersion: `"0221"`,
- Flash: `25`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/10"`,
- Orientation: `1`,
- XResolution: `"480/1"`,
- ISOSpeedRatings: `200`,
- },
- "2007-01-17-21-49-44-sep-2007-01-17-21-49-44a.jpg": map[FieldName]string{
- XResolution: `"180/1"`,
- ISOSpeedRatings: `50`,
- ExifVersion: `"0220"`,
- Flash: `24`,
- CustomRendered: `0`,
- Orientation: `1`,
- ThumbJPEGInterchangeFormatLength: `7024`,
- ExposureProgram: `2`,
- MaxApertureValue: `"297/100"`,
- ThumbJPEGInterchangeFormat: `956`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `266`,
- ExposureTime: `"1/30"`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- Software: `"1.00.018PR "`,
- DateTime: `"2007:01:17 21:49:44"`,
- ShutterSpeedValue: `"491/100"`,
- ApertureValue: `"33/10"`,
- LightSource: `0`,
- FocalLength: `"73/10"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"180/1"`,
- DateTimeOriginal: `"2007:01:17 21:49:44"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `832`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Make: `"Digital Camera "`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- FNumber: `"33/10"`,
- MeteringMode: `2`,
- MakerNote: `"6106789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"`,
- PixelXDimension: `2816`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2007:01:17 21:49:44"`,
- Model: `"6MP-9Y8 "`,
- ExposureBiasValue: `"0/10"`,
- PixelYDimension: `2112`,
- ImageDescription: `"Digital image "`,
- },
- "2007-02-02-18-13-29-sep-2007-02-02-18-13-29a.jpg": map[FieldName]string{
- Software: `"Optio S5z Ver 1.00 "`,
- FNumber: `"26/10"`,
- Sharpness: `0`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `586`,
- ExposureTime: `"1/60"`,
- ComponentsConfiguration: `""`,
- MeteringMode: `5`,
- SubjectDistanceRange: `2`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormatLength: `8800`,
- ExposureBiasValue: `"0/3"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1920`,
- WhiteBalance: `0`,
- Make: `"PENTAX Corporation "`,
- DateTimeDigitized: `"2007:02:02 18:13:29"`,
- PixelXDimension: `2560`,
- InteroperabilityIFDPointer: `30974`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- InteroperabilityIndex: `"R98"`,
- DateTime: `"2007:02:02 18:13:29"`,
- ExposureProgram: `2`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `200`,
- ExifVersion: `"0220"`,
- CompressedBitsPerPixel: `"27033600/4915200"`,
- Flash: `25`,
- FocalLengthIn35mmFilm: `35`,
- Saturation: `0`,
- Model: `"PENTAX Optio S5z "`,
- ThumbJPEGInterchangeFormat: `31098`,
- MaxApertureValue: `"28/10"`,
- FocalLength: `"580/100"`,
- ColorSpace: `1`,
- DateTimeOriginal: `"2007:02:02 18:13:29"`,
- MakerNote: `""`,
- DigitalZoomRatio: `"0/0"`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- },
- "2007-05-02-17-02-21-sep-2007-05-02-17-02-21a.jpg": map[FieldName]string{
- UserComment: `""`,
- PixelXDimension: `1600`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2007:05:02 17:02:21"`,
- CompressedBitsPerPixel: `"3/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- Model: `"Canon IXY DIGITAL 55"`,
- ExposureBiasValue: `"0/3"`,
- PixelYDimension: `1200`,
- FocalPlaneResolutionUnit: `2`,
- FocalPlaneYResolution: `"1200000/168"`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"2592/2592"`,
- Orientation: `1`,
- XResolution: `"180/1"`,
- ExifVersion: `"0220"`,
- Flash: `9`,
- ThumbJPEGInterchangeFormat: `5108`,
- ThumbJPEGInterchangeFormatLength: `6306`,
- MaxApertureValue: `"107/32"`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/60"`,
- FocalLength: `"7109/1000"`,
- FlashpixVersion: `"0100"`,
- FocalPlaneXResolution: `"1600000/225"`,
- YResolution: `"180/1"`,
- DateTime: `"2007:05:02 17:02:21"`,
- ShutterSpeedValue: `"189/32"`,
- ApertureValue: `"107/32"`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2007:05:02 17:02:21"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `2226`,
- FNumber: `"32/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- },
- "2007-05-12-08-19-07-sep-2007-05-12-08-19-07a.jpg": map[FieldName]string{
- Model: `"EX-Z70 "`,
- ExposureBiasValue: `"0/3"`,
- PixelYDimension: `480`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/0"`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ExifVersion: `"0221"`,
- Flash: `16`,
- ThumbJPEGInterchangeFormat: `27422`,
- ThumbJPEGInterchangeFormatLength: `8332`,
- ExposureProgram: `2`,
- MaxApertureValue: `"33/10"`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `282`,
- ExposureTime: `"1/50"`,
- FocalLength: `"630/100"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"72/1"`,
- Software: `"1.00 "`,
- DateTime: `"2007:06:17 22:56:38"`,
- LightSource: `0`,
- ExposureMode: `0`,
- FocalLengthIn35mmFilm: `38`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Make: `"CASIO COMPUTER CO.,LTD."`,
- DateTimeOriginal: `"2007:05:12 08:19:07"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `27298`,
- Sharpness: `0`,
- FNumber: `"31/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- PixelXDimension: `640`,
- GainControl: `2`,
- Saturation: `0`,
- DateTimeDigitized: `"2007:06:17 22:56:38"`,
- CompressedBitsPerPixel: `"252746/307200"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- },
- "2007-05-26-04-49-45-sep-2007-05-26-04-49-45a.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `4596`,
- ThumbJPEGInterchangeFormatLength: `10120`,
- ExposureProgram: `2`,
- MaxApertureValue: `"34/10"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `284`,
- ExposureTime: `"10/3486"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- YResolution: `"300/1"`,
- Software: `"COOLPIX L3v1.2"`,
- DateTime: `"2007:05:26 04:49:45"`,
- LightSource: `0`,
- FocalLength: `"63/10"`,
- FlashpixVersion: `"0100"`,
- Contrast: `0`,
- Make: `"NIKON"`,
- DateTimeOriginal: `"2007:05:26 04:49:45"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1026`,
- ExposureMode: `0`,
- FocalLengthIn35mmFilm: `38`,
- SceneCaptureType: `2`,
- FNumber: `"32/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- Saturation: `0`,
- DateTimeDigitized: `"2007:05:26 04:49:45"`,
- CompressedBitsPerPixel: `"4/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- UserComment: `" "`,
- PixelXDimension: `2592`,
- GainControl: `0`,
- SubjectDistanceRange: `0`,
- ImageDescription: `" "`,
- Model: `"COOLPIX L3"`,
- ExposureBiasValue: `"0/10"`,
- PixelYDimension: `1944`,
- Orientation: `1`,
- XResolution: `"300/1"`,
- ISOSpeedRatings: `50`,
- ExifVersion: `"0220"`,
- Flash: `24`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/100"`,
- },
- "2007-05-30-14-28-01-sep-2007-05-30-14-28-01a.jpg": map[FieldName]string{
- CompressedBitsPerPixel: `"2/1"`,
- MeteringMode: `5`,
- UserComment: `" "`,
- GainControl: `1`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- ExifIFDPointer: `284`,
- ExposureTime: `"10/40"`,
- InteroperabilityIndex: `"R98"`,
- Software: `"COOLPIX S6V1.0"`,
- ImageDescription: `" "`,
- Model: `"COOLPIX S6"`,
- XResolution: `"300/1"`,
- ISOSpeedRatings: `53`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1026`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/100"`,
- Make: `"NIKON"`,
- Orientation: `1`,
- Contrast: `0`,
- FocalLengthIn35mmFilm: `35`,
- SceneCaptureType: `0`,
- FileSource: `""`,
- FNumber: `"30/10"`,
- ExposureProgram: `2`,
- DateTimeDigitized: `"2007:05:30 14:28:01"`,
- MakerNote: `""`,
- PixelXDimension: `2816`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- FocalLength: `"58/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2112`,
- YResolution: `"300/1"`,
- DateTime: `"2007:05:30 14:28:01"`,
- Flash: `16`,
- ExposureMode: `0`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2007:05:30 14:28:01"`,
- MaxApertureValue: `"32/10"`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ThumbJPEGInterchangeFormat: `4596`,
- ThumbJPEGInterchangeFormatLength: `5274`,
- },
- "2007-06-06-16-15-25-sep-2007-06-06-16-15-25a.jpg": map[FieldName]string{
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2007:06:06 16:15:25"`,
- Flash: `24`,
- ExposureMode: `0`,
- ThumbJPEGInterchangeFormat: `4596`,
- ThumbJPEGInterchangeFormatLength: `5967`,
- MaxApertureValue: `"30/10"`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ExifIFDPointer: `284`,
- ExposureTime: `"10/2870"`,
- CompressedBitsPerPixel: `"2/1"`,
- MeteringMode: `5`,
- UserComment: `" "`,
- GainControl: `0`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- InteroperabilityIndex: `"R98"`,
- ImageDescription: `" "`,
- Model: `"E3700"`,
- Software: `"E3700v1.2"`,
- Make: `"NIKON"`,
- Orientation: `1`,
- XResolution: `"300/1"`,
- ISOSpeedRatings: `50`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1026`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/100"`,
- FocalLengthIn35mmFilm: `35`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- FNumber: `"48/10"`,
- ExposureProgram: `2`,
- FileSource: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- DateTimeDigitized: `"2007:06:06 16:15:25"`,
- MakerNote: `""`,
- PixelXDimension: `2048`,
- SceneType: `""`,
- YResolution: `"300/1"`,
- DateTime: `"2007:06:06 16:15:25"`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- FocalLength: `"54/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1536`,
- },
- "2007-06-26-10-13-04-sep-2007-06-26-10-13-04a.jpg": map[FieldName]string{
- ColorSpace: `1`,
- FileSource: `""`,
- FNumber: `"3/1"`,
- CompressedBitsPerPixel: `"6389872/3145728"`,
- MeteringMode: `2`,
- MakerNote: `""`,
- PixelXDimension: `2048`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2007:06:26 10:13:04"`,
- Model: `"DV"`,
- Copyright: `"Copyright2004"`,
- ExposureBiasValue: `"1/4"`,
- PixelYDimension: `1536`,
- ImageDescription: `"My beautiful picture"`,
- XResolution: `"320/1"`,
- ISOSpeedRatings: `100`,
- ExifVersion: `"0210"`,
- Flash: `0`,
- Orientation: `1`,
- ThumbJPEGInterchangeFormatLength: `6292`,
- ExposureProgram: `3`,
- MaxApertureValue: `"3/1"`,
- ExposureIndex: `"146/1"`,
- ThumbJPEGInterchangeFormat: `1306`,
- YCbCrPositioning: `2`,
- ExposureTime: `"23697424/268435456"`,
- ExifIFDPointer: `262`,
- RelatedSoundFile: `"RelatedSound"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- Software: `"DVWare 1.0"`,
- DateTime: `"2007:06:26 10:13:04"`,
- ShutterSpeedValue: `"7/1"`,
- ApertureValue: `"3/1"`,
- LightSource: `0`,
- FlashpixVersion: `"0100"`,
- YResolution: `"384/1"`,
- DateTimeOriginal: `"2007:06:26 10:13:04"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1170`,
- Make: `"CEC"`,
- },
- "2007-07-13-17-02-30-sep-2007-07-13-17-02-30a.jpg": map[FieldName]string{
- Software: `"Ver 1.00 "`,
- DateTime: `"2007:07:13 17:02:30"`,
- FNumber: `"48/10"`,
- ExposureProgram: `2`,
- RelatedSoundFile: `" "`,
- Saturation: `0`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `266`,
- ExposureTime: `"1/110"`,
- ISOSpeedRatings: `64`,
- ComponentsConfiguration: `""`,
- ColorSpace: `1`,
- PixelYDimension: `2736`,
- FileSource: `""`,
- Model: `"ViviCam X30 "`,
- ThumbJPEGInterchangeFormatLength: `20544`,
- ShutterSpeedValue: `"678/100"`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- DigitalZoomRatio: `"100/100"`,
- GainControl: `0`,
- InteroperabilityIndex: `"R98"`,
- Make: `"Vivitar"`,
- DateTimeOriginal: `"2007:07:13 17:02:30"`,
- DateTimeDigitized: `"2007:07:13 17:02:30"`,
- PixelXDimension: `3648`,
- InteroperabilityIFDPointer: `1010`,
- ImageDescription: `"Digital StillCamera"`,
- Sharpness: `0`,
- Flash: `0`,
- FocalLengthIn35mmFilm: `35`,
- SubjectDistanceRange: `0`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifVersion: `"0220"`,
- MeteringMode: `2`,
- WhiteBalance: `0`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `1156`,
- ApertureValue: `"45/10"`,
- MaxApertureValue: `"30/10"`,
- FlashpixVersion: `"0100"`,
- MakerNote: `""`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- },
- "2007-08-15-14-42-46-sep-2007-08-15-14-42-46a.jpg": map[FieldName]string{
- Model: `"KODAK C663 ZOOM DIGITAL CAMERA"`,
- ShutterSpeedValue: `"73/10"`,
- DigitalZoomRatio: `"0/100"`,
- FocalLengthIn35mmFilm: `66`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Make: `"EASTMAN KODAK COMPANY"`,
- Orientation: `1`,
- XResolution: `"230/1"`,
- CustomRendered: `0`,
- ISOSpeedRatings: `80`,
- ComponentsConfiguration: `""`,
- FNumber: `"36/10"`,
- ExposureProgram: `2`,
- FileSource: `""`,
- PixelXDimension: `2832`,
- SensingMethod: `2`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- DateTimeDigitized: `"2007:08:15 14:42:46"`,
- MakerNote: `""`,
- FocalLength: `"110/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2128`,
- YResolution: `"230/1"`,
- ApertureValue: `"37/10"`,
- ExposureBiasValue: `"0/3"`,
- LightSource: `0`,
- ExposureMode: `0`,
- ExifVersion: `"0221"`,
- DateTimeOriginal: `"2007:08:15 14:42:46"`,
- Flash: `24`,
- MaxApertureValue: `"37/10"`,
- ColorSpace: `1`,
- ExposureIndex: `"80/1"`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ThumbJPEGInterchangeFormat: `8472`,
- ThumbJPEGInterchangeFormatLength: `3060`,
- ExposureTime: `"1/160"`,
- MeteringMode: `5`,
- ExifIFDPointer: `320`,
- GainControl: `0`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- },
- "2007-08-24-02-40-42-sep-2007-08-24-02-40-42a.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `5108`,
- ThumbJPEGInterchangeFormatLength: `2084`,
- MaxApertureValue: `"147/32"`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/400"`,
- CompressedBitsPerPixel: `"5/1"`,
- MeteringMode: `5`,
- UserComment: `""`,
- InteroperabilityIndex: `"R98"`,
- Model: `"Canon PowerShot SD450"`,
- ShutterSpeedValue: `"277/32"`,
- FocalPlaneResolutionUnit: `2`,
- DigitalZoomRatio: `"2592/2592"`,
- Make: `"Canon"`,
- Orientation: `1`,
- XResolution: `"180/1"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `2206`,
- FocalPlaneYResolution: `"1944000/168"`,
- CustomRendered: `0`,
- SceneCaptureType: `0`,
- FNumber: `"100/10"`,
- FileSource: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- DateTimeDigitized: `"2007:08:24 02:40:42"`,
- MakerNote: `""`,
- PixelXDimension: `2592`,
- SensingMethod: `2`,
- FocalPlaneXResolution: `"2592000/225"`,
- YResolution: `"180/1"`,
- DateTime: `"2007:08:24 02:40:42"`,
- ApertureValue: `"213/32"`,
- ExposureBiasValue: `"0/3"`,
- FocalLength: `"17400/1000"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1944`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2007:08:24 02:40:42"`,
- Flash: `24`,
- ExposureMode: `0`,
- },
- "2007-11-07-11-40-44-sep-2007-11-07-11-40-44a.jpg": map[FieldName]string{
- YResolution: `"72/1"`,
- Copyright: `" "`,
- ThumbJPEGInterchangeFormat: `1306`,
- ApertureValue: `"600/100"`,
- MaxApertureValue: `"360/100"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- MakerNote: `""`,
- SensingMethod: `2`,
- CustomRendered: `1`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Software: `"Digital Camera FinePix Z1 Ver1.00"`,
- DateTime: `"2007:11:07 11:40:44"`,
- FNumber: `"800/100"`,
- ExposureProgram: `2`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `294`,
- ExposureTime: `"10/2000"`,
- ISOSpeedRatings: `64`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"20/10"`,
- PixelYDimension: `1944`,
- Model: `"FinePix Z1 "`,
- ThumbJPEGInterchangeFormatLength: `9900`,
- ShutterSpeedValue: `"764/100"`,
- ExposureBiasValue: `"0/100"`,
- LightSource: `0`,
- FocalLength: `"610/100"`,
- ColorSpace: `1`,
- FocalPlaneXResolution: `"4442/1"`,
- FileSource: `""`,
- InteroperabilityIndex: `"R98"`,
- Make: `"FUJIFILM"`,
- DateTimeOriginal: `"2007:11:07 11:40:44"`,
- DateTimeDigitized: `"2007:11:07 11:40:44"`,
- BrightnessValue: `"906/100"`,
- PixelXDimension: `2592`,
- InteroperabilityIFDPointer: `1158`,
- SceneType: `""`,
- FocalPlaneResolutionUnit: `3`,
- Sharpness: `0`,
- SubjectDistanceRange: `0`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifVersion: `"0220"`,
- MeteringMode: `5`,
- Flash: `16`,
- FocalPlaneYResolution: `"4442/1"`,
- },
- "2008-06-02-10-03-57-sep-2008-06-02-10-03-57a.jpg": map[FieldName]string{
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- FNumber: `"2800/1000"`,
- CompressedBitsPerPixel: `"5896224/3145728"`,
- MeteringMode: `4`,
- MakerNote: `""`,
- PixelXDimension: `2048`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2008:06:13 06:16:19"`,
- Copyright: `"Copyright 2006"`,
- ExposureBiasValue: `"0/10"`,
- PixelYDimension: `1536`,
- Model: `"i533"`,
- XResolution: `"288/3"`,
- ISOSpeedRatings: `100`,
- ExifVersion: `"0220"`,
- Flash: `65`,
- DigitalZoomRatio: `"100/100"`,
- Orientation: `1`,
- ThumbJPEGInterchangeFormatLength: `5972`,
- ExposureProgram: `7`,
- MaxApertureValue: `"2970/1000"`,
- ThumbJPEGInterchangeFormat: `3756`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `226`,
- ExposureTime: `"10/600"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- Software: `"00.00.1240a"`,
- DateTime: `"2008:06:13 06:16:19"`,
- ShutterSpeedValue: `"5907/1000"`,
- ApertureValue: `"2970/1000"`,
- LightSource: `4`,
- FocalLength: `"6200/1000"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"288/3"`,
- DateTimeOriginal: `"2008:06:02 10:03:57"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `3620`,
- ExposureMode: `0`,
- Make: `"Polaroid"`,
- },
- "2008-06-06-13-29-29-sep-2008-06-06-13-29-29a.jpg": map[FieldName]string{
- PixelXDimension: `1600`,
- InteroperabilityIFDPointer: `3334`,
- DigitalZoomRatio: `"3072/3072"`,
- InteroperabilityIndex: `"R98"`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2008:06:06 13:29:29"`,
- DateTimeDigitized: `"2008:06:06 13:29:29"`,
- FocalPlaneResolutionUnit: `2`,
- ExifVersion: `"0220"`,
- MeteringMode: `5`,
- Flash: `16`,
- FocalPlaneYResolution: `"1200000/169"`,
- Orientation: `6`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- MaxApertureValue: `"116/32"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- YResolution: `"180/1"`,
- ThumbJPEGInterchangeFormat: `5108`,
- ApertureValue: `"116/32"`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- MakerNote: `""`,
- UserComment: `""`,
- SensingMethod: `2`,
- DateTime: `"2008:06:06 13:29:29"`,
- FNumber: `"35/10"`,
- ISOSpeedRatings: `80`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"5/1"`,
- XResolution: `"180/1"`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/320"`,
- ExposureBiasValue: `"0/3"`,
- FocalLength: `"8462/1000"`,
- ColorSpace: `1`,
- PixelYDimension: `1200`,
- FocalPlaneXResolution: `"1600000/225"`,
- Model: `"Canon DIGITAL IXUS 75"`,
- ThumbJPEGInterchangeFormatLength: `6594`,
- ShutterSpeedValue: `"266/32"`,
- FileSource: `""`,
- },
- "2008-06-17-01-21-30-sep-2008-06-17-01-21-30a.jpg": map[FieldName]string{
- MaxApertureValue: `"30/10"`,
- ThumbJPEGInterchangeFormat: `1041`,
- ThumbJPEGInterchangeFormatLength: `13506`,
- ExposureProgram: `2`,
- ExposureTime: `"10/326"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `253`,
- LightSource: `0`,
- FocalLength: `"645/100"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"72/1"`,
- Software: `"A520_CT019"`,
- DateTime: `"2008:06:17 01:22:13"`,
- InteroperabilityIFDPointer: `1011`,
- Make: `"Polaroid"`,
- DateTimeOriginal: `"2008:06:17 01:21:30"`,
- ComponentsConfiguration: `""`,
- FNumber: `"28/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- UserComment: `""`,
- PixelXDimension: `2592`,
- DateTimeDigitized: `"2008:06:17 01:21:30"`,
- CompressedBitsPerPixel: `"2/1"`,
- MeteringMode: `2`,
- PixelYDimension: `1944`,
- ImageDescription: `"DCFC1247.JPG "`,
- Model: `"5MP Digital Camera"`,
- ExposureBiasValue: `"0/10"`,
- ExifVersion: `"0220"`,
- Flash: `0`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `100`,
- },
- "2008-09-02-17-43-48-sep-2008-09-02-17-43-48a.jpg": map[FieldName]string{
- ImageDescription: `" "`,
- Model: `"Z550a"`,
- YResolution: `"72/1"`,
- Software: `"R6GA004 prgCXC1250583_GENERIC_M 2.0"`,
- DateTime: `"2008:09:02 17:43:48"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1024`,
- Make: `"Sony Ericsson"`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2008:09:02 17:43:48"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `612`,
- ThumbJPEGInterchangeFormat: `748`,
- ThumbJPEGInterchangeFormatLength: `4641`,
- ColorSpace: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `302`,
- DateTimeDigitized: `"2008:09:02 17:43:48"`,
- PixelXDimension: `1280`,
- InteroperabilityIndex: `"R98"`,
- },
- "2009-03-26-09-23-20-sep-2009-03-26-09-23-20a.jpg": map[FieldName]string{
- FocalLength: `"5800/1000"`,
- ColorSpace: `1`,
- PixelYDimension: `2304`,
- FocalPlaneXResolution: `"3072000/225"`,
- Model: `"Canon PowerShot SD750"`,
- ThumbJPEGInterchangeFormatLength: `5513`,
- ShutterSpeedValue: `"287/32"`,
- ExposureBiasValue: `"0/3"`,
- FileSource: `""`,
- InteroperabilityIFDPointer: `3334`,
- DigitalZoomRatio: `"3072/3072"`,
- InteroperabilityIndex: `"R98"`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2009:03:26 09:23:20"`,
- DateTimeDigitized: `"2009:03:26 09:23:20"`,
- PixelXDimension: `3072`,
- FocalPlaneResolutionUnit: `2`,
- MeteringMode: `5`,
- Flash: `24`,
- FocalPlaneYResolution: `"2304000/169"`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifVersion: `"0220"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- YResolution: `"180/1"`,
- ThumbJPEGInterchangeFormat: `5108`,
- ApertureValue: `"95/32"`,
- MaxApertureValue: `"95/32"`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- MakerNote: `""`,
- UserComment: `""`,
- SensingMethod: `2`,
- CustomRendered: `0`,
- DateTime: `"2009:03:26 09:23:20"`,
- FNumber: `"28/10"`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"5/1"`,
- XResolution: `"180/1"`,
- ExifIFDPointer: `196`,
- ExposureTime: `"1/500"`,
- ISOSpeedRatings: `160`,
- },
- "2009-04-11-03-01-38-sep-2009-04-11-03-01-38a.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `33660`,
- MaxApertureValue: `"30/10"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- YResolution: `"300/1"`,
- UserComment: `" "`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- MakerNote: `""`,
- DateTime: `"2009:04:11 03:01:38"`,
- FNumber: `"28/10"`,
- ExposureProgram: `2`,
- Software: `"COOLPIX L18 V1.1"`,
- ExifIFDPointer: `230`,
- ExposureTime: `"1/250"`,
- ISOSpeedRatings: `227`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"4/1"`,
- Saturation: `0`,
- XResolution: `"300/1"`,
- ThumbJPEGInterchangeFormatLength: `9697`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- FocalLength: `"5700/1000"`,
- ColorSpace: `1`,
- PixelYDimension: `2448`,
- FileSource: `""`,
- Model: `"COOLPIX L18"`,
- DateTimeOriginal: `"2009:04:11 03:01:38"`,
- DateTimeDigitized: `"2009:04:11 03:01:38"`,
- PixelXDimension: `3264`,
- InteroperabilityIFDPointer: `33536`,
- SceneType: `""`,
- DigitalZoomRatio: `"0/100"`,
- GainControl: `1`,
- Make: `"NIKON"`,
- InteroperabilityIndex: `"R98"`,
- Sharpness: `1`,
- ImageDescription: `" "`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifVersion: `"0220"`,
- MeteringMode: `5`,
- Flash: `24`,
- FocalLengthIn35mmFilm: `35`,
- SubjectDistanceRange: `0`,
- Orientation: `1`,
- },
- "2009-04-23-07-21-35-sep-2009-04-23-07-21-35a.jpg": map[FieldName]string{
- Sharpness: `0`,
- MeteringMode: `5`,
- Flash: `9`,
- FocalLengthIn35mmFilm: `35`,
- SubjectDistanceRange: `3`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifVersion: `"0220"`,
- WhiteBalance: `0`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `31176`,
- MaxApertureValue: `"28/10"`,
- FlashpixVersion: `"0100"`,
- Contrast: `0`,
- MakerNote: `""`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Software: `"Optio S50 Ver 1.00"`,
- DateTime: `"2009:04:23 07:21:35"`,
- FNumber: `"26/10"`,
- ComponentsConfiguration: `""`,
- CompressedBitsPerPixel: `"13301888/4915200"`,
- Saturation: `0`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `590`,
- ExposureTime: `"1/40"`,
- ISOSpeedRatings: `100`,
- ColorSpace: `1`,
- PixelYDimension: `1920`,
- Model: `"PENTAX Optio S50"`,
- ThumbJPEGInterchangeFormatLength: `6015`,
- ExposureBiasValue: `"0/10"`,
- FocalLength: `"58/10"`,
- InteroperabilityIFDPointer: `31040`,
- DigitalZoomRatio: `"0/100"`,
- InteroperabilityIndex: `"R98"`,
- Make: `"PENTAX Corporation"`,
- DateTimeOriginal: `"2009:04:23 07:21:35"`,
- DateTimeDigitized: `"2009:04:23 07:21:35"`,
- PixelXDimension: `2560`,
- },
- "2009-06-11-19-23-18-sep-2009-06-11-19-23-18a.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `606`,
- ThumbJPEGInterchangeFormatLength: `7150`,
- ExposureProgram: `1`,
- ColorSpace: `65535`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `264`,
- ExposureTime: `"1/4"`,
- DateTimeDigitized: `"2009:06:11 19:23:18"`,
- MeteringMode: `1`,
- PixelXDimension: `1400`,
- PixelYDimension: `2100`,
- Model: `"Canon EOS DIGITAL REBEL XTi"`,
- YResolution: `"3500000/10000"`,
- Software: `"Adobe Photoshop CS3 Macintosh"`,
- DateTime: `"2009:06:23 18:42:05"`,
- ApertureValue: `"11257/1627"`,
- ExposureBiasValue: `"0/1"`,
- FocalLength: `"47/1"`,
- Make: `"Canon"`,
- Orientation: `1`,
- XResolution: `"3500000/10000"`,
- ISOSpeedRatings: `200`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2009:06:11 19:23:18"`,
- Flash: `16`,
- },
- "2009-06-20-07-59-05-sep-2009-06-20-07-59-05a.jpg": map[FieldName]string{
- DateTimeOriginal: `"2009:06:20 07:59:05"`,
- Flash: `89`,
- ExposureMode: `0`,
- ExifVersion: `"0221"`,
- ThumbJPEGInterchangeFormatLength: `4569`,
- MaxApertureValue: `"36/10"`,
- ColorSpace: `1`,
- ExposureIndex: `"160/1"`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ThumbJPEGInterchangeFormat: `9032`,
- ExposureTime: `"1/500"`,
- MeteringMode: `5`,
- GainControl: `2`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- InteroperabilityIndex: `"R98"`,
- ExifIFDPointer: `514`,
- ShutterSpeedValue: `"9/1"`,
- Model: `"KODAK EASYSHARE Z710 ZOOM DIGITAL CAMERA"`,
- Orientation: `1`,
- XResolution: `"480/1"`,
- ISOSpeedRatings: `160`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `8728`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/100"`,
- Make: `"EASTMAN KODAK COMPANY"`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- FocalLengthIn35mmFilm: `337`,
- ExposureProgram: `2`,
- FileSource: `""`,
- FNumber: `"35/10"`,
- YCbCrPositioning: `1`,
- DateTimeDigitized: `"2009:06:20 07:59:05"`,
- MakerNote: `""`,
- PixelXDimension: `3072`,
- SensingMethod: `2`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- ApertureValue: `"36/10"`,
- ExposureBiasValue: `"0/3"`,
- LightSource: `0`,
- FocalLength: `"559/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2304`,
- YResolution: `"480/1"`,
- },
- "2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpg": map[FieldName]string{
- XResolution: `"72/1"`,
- ISOSpeedRatings: `100`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `1158`,
- FocalPlaneYResolution: `"5292/1"`,
- CustomRendered: `0`,
- Make: `"FUJIFILM"`,
- Orientation: `1`,
- SceneCaptureType: `0`,
- FileSource: `""`,
- FNumber: `"400/100"`,
- ExposureProgram: `2`,
- DateTimeDigitized: `"2009:08:05 08:11:31"`,
- MakerNote: `"FUJIFILM0130" !"#,012NORMAL d"`,
- PixelXDimension: `2848`,
- SensingMethod: `2`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- Copyright: `" "`,
- ApertureValue: `"400/100"`,
- ExposureBiasValue: `"0/100"`,
- LightSource: `0`,
- FocalLength: `"720/100"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"72/1"`,
- DateTime: `"2009:08:05 08:11:31"`,
- PixelYDimension: `2136`,
- FocalPlaneXResolution: `"5292/1"`,
- Flash: `16`,
- ExposureMode: `0`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2009:08:05 08:11:31"`,
- MaxApertureValue: `"300/100"`,
- ColorSpace: `1`,
- WhiteBalance: `1`,
- Sharpness: `0`,
- ThumbJPEGInterchangeFormat: `1306`,
- ThumbJPEGInterchangeFormatLength: `8596`,
- CompressedBitsPerPixel: `"20/10"`,
- BrightnessValue: `"719/100"`,
- MeteringMode: `5`,
- SubjectDistanceRange: `0`,
- InteroperabilityIndex: `"R98"`,
- ExifIFDPointer: `294`,
- ExposureTime: `"10/3000"`,
- ShutterSpeedValue: `"820/100"`,
- FocalPlaneResolutionUnit: `3`,
- Model: `"FinePix E550 "`,
- Software: `"Digital Camera FinePix E550 Ver1.00"`,
- },
- "2010-06-08-04-44-24-sep-2010-06-08-04-44-24a.jpg": map[FieldName]string{
- CompressedBitsPerPixel: `"8/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- PixelXDimension: `2816`,
- Saturation: `0`,
- DateTimeDigitized: `"2010:06:08 04:44:24"`,
- Model: `"DSC-S600"`,
- ExposureBiasValue: `"0/10"`,
- PixelYDimension: `2112`,
- ImageDescription: `" "`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `80`,
- ExifVersion: `"0221"`,
- Flash: `31`,
- CustomRendered: `0`,
- Orientation: `1`,
- ThumbJPEGInterchangeFormatLength: `4029`,
- ExposureProgram: `2`,
- MaxApertureValue: `"48/16"`,
- ThumbJPEGInterchangeFormat: `6892`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `2314`,
- ExposureTime: `"10/400"`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- DateTime: `"2010:06:08 04:44:24"`,
- LightSource: `0`,
- FocalLength: `"51/10"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"72/1"`,
- DateTimeOriginal: `"2010:06:08 04:44:24"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `6640`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Make: `"SONY"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- FNumber: `"28/10"`,
- },
- "2010-06-20-20-07-39-sep-2010-06-20-20-07-39a.jpg": map[FieldName]string{
- FocalPlaneYResolution: `"2736000/181"`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"3648/3648"`,
- Orientation: `1`,
- XResolution: `"4718592/65536"`,
- ISOSpeedRatings: `800`,
- ExifVersion: `"0220"`,
- Flash: `16`,
- ThumbJPEGInterchangeFormat: `3408`,
- ThumbJPEGInterchangeFormatLength: `5126`,
- MaxApertureValue: `"116/32"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `302`,
- ExposureTime: `"1/10"`,
- FocalLength: `"9681/1000"`,
- FlashpixVersion: `"0100"`,
- FocalPlaneXResolution: `"3648000/241"`,
- YResolution: `"4718592/65536"`,
- Software: `"QuickTime 7.6.6"`,
- DateTime: `"2010:10:31 22:39:25"`,
- ShutterSpeedValue: `"106/32"`,
- ApertureValue: `"116/32"`,
- Make: `"Canon"`,
- DateTimeOriginal: `"2010:06:20 20:07:39"`,
- ComponentsConfiguration: `""`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- FNumber: `"35/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- PixelXDimension: `3648`,
- SensingMethod: `2`,
- DateTimeDigitized: `"2010:06:20 20:07:39"`,
- CompressedBitsPerPixel: `"3/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- UserComment: `""`,
- ImageDescription: `" "`,
- Model: `"Canon PowerShot SD1200 IS"`,
- ExposureBiasValue: `"0/3"`,
- PixelYDimension: `2736`,
- FocalPlaneResolutionUnit: `2`,
- },
- "2010-09-02-08-43-02-sep-2010-09-02-08-43-02a.jpg": map[FieldName]string{
- DateTime: `"2010:09:02 08:43:02"`,
- ExposureProgram: `5`,
- ExifVersion: `"0221"`,
- CompressedBitsPerPixel: `"1/1"`,
- Flash: `65`,
- Saturation: `0`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `800`,
- MaxApertureValue: `"362/100"`,
- LightSource: `0`,
- FocalLength: `"210/10"`,
- ColorSpace: `1`,
- Model: `"FE370,X880,C575 "`,
- ThumbJPEGInterchangeFormat: `9204`,
- SceneType: `""`,
- DigitalZoomRatio: `"0/100"`,
- SceneCaptureType: `3`,
- GainControl: `2`,
- Contrast: `0`,
- DateTimeOriginal: `"2010:09:02 08:43:02"`,
- MakerNote: `""`,
- FNumber: `"53/10"`,
- Sharpness: `0`,
- ImageDescription: `"OLYMPUS DIGITAL CAMERA "`,
- Software: `"Version 1.0 "`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `996`,
- ExposureTime: `"10/500"`,
- ComponentsConfiguration: `""`,
- MeteringMode: `5`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- ExposureBiasValue: `"0/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2448`,
- FileSource: `""`,
- WhiteBalance: `0`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormatLength: `3562`,
- UserComment: `" "`,
- PixelXDimension: `3264`,
- InteroperabilityIFDPointer: `1714`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- InteroperabilityIndex: `"R98"`,
- Make: `"OLYMPUS IMAGING CORP. "`,
- DateTimeDigitized: `"2010:09:02 08:43:02"`,
- },
- "2011-01-24-22-06-02-sep-2011-01-24-22-06-02a.jpg": map[FieldName]string{
- ColorSpace: `1`,
- WhiteBalance: `0`,
- ThumbJPEGInterchangeFormat: `25601`,
- ThumbJPEGInterchangeFormatLength: `3385`,
- ExifIFDPointer: `157`,
- PixelXDimension: `1200`,
- MakerNote: `""`,
- DateTimeDigitized: `"2011:01:24 22:06:02"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- Software: `"V 12.40"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1600`,
- Model: `"6350"`,
- YResolution: `"300/1"`,
- XResolution: `"300/1"`,
- ExifVersion: `"0220"`,
- ComponentsConfiguration: `""`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Make: `"Nokia"`,
- Orientation: `1`,
- DigitalZoomRatio: `"1024/1024"`,
- DateTimeOriginal: `"2011:01:24 22:06:02"`,
- },
- "2011-03-07-09-28-03-sep-2011-03-07-09-28-03a.jpg": map[FieldName]string{
- Model: `"GU295"`,
- Software: `"GU295-MSM1530032L-V10i-APR-22-2010-ATT-US"`,
- Make: `"LG Elec."`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `538`,
- CustomRendered: `1`,
- DigitalZoomRatio: `"0/0"`,
- Contrast: `0`,
- ExposureProgram: `2`,
- FileSource: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- DateTimeDigitized: `"2011:03:07 09:28:03"`,
- PixelXDimension: `1280`,
- SceneType: `""`,
- YResolution: `"72/1"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `960`,
- ExifVersion: `"0220"`,
- DateTimeOriginal: `"2011:03:07 09:28:03"`,
- ExposureMode: `0`,
- ThumbJPEGInterchangeFormat: `662`,
- ThumbJPEGInterchangeFormatLength: `9850`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ExifIFDPointer: `224`,
- BrightnessValue: `"0/1024"`,
- MeteringMode: `2`,
- Saturation: `0`,
- InteroperabilityIndex: `"R98"`,
- },
- "2011-05-07-13-02-49-sep-2011-05-07-13-02-49a.jpg": map[FieldName]string{
- DateTimeOriginal: `"2011:05:07 13:02:49"`,
- SceneType: `""`,
- Contrast: `0`,
- Software: `"M7500BSAAAAAAD3050"`,
- GPSVersionID: `[2,2,0,0]`,
- GPSLatitudeRef: `"N"`,
- GPSAltitude: `"0/1"`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `218`,
- GPSInfoIFDPointer: `502`,
- ComponentsConfiguration: `""`,
- GPSLongitudeRef: `"E"`,
- GPSTimeStamp: `["19/1","3/1","43/1"]`,
- GPSDateStamp: `"2011:05:07 "`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormatLength: `22806`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1536`,
- FileSource: `""`,
- WhiteBalance: `0`,
- GPSAltitudeRef: `0`,
- Make: `"HTC"`,
- DateTimeDigitized: `"2011:05:07 13:02:49"`,
- PixelXDimension: `2048`,
- InteroperabilityIFDPointer: `472`,
- GPSLatitude: `["0/1","0/1","0/100"]`,
- InteroperabilityIndex: `"R98"`,
- GPSLongitude: `["0/1","0/1","0/100"]`,
- XResolution: `"72/1"`,
- ExifVersion: `"0220"`,
- GPSProcessingMethod: `"ASCIIHYBRID-FIX"`,
- Model: `"RAPH800"`,
- ThumbJPEGInterchangeFormat: `920`,
- ColorSpace: `1`,
- GPSMapDatum: `"WGS-84"`,
- },
- "2011-08-07-19-22-57-sep-2011-08-07-19-22-57a.jpg": map[FieldName]string{
- ResolutionUnit: `2`,
- DateTimeDigitized: `"2011:08:07 19:22:57"`,
- SensingMethod: `2`,
- SceneType: `""`,
- YResolution: `"300/1"`,
- DateTime: `"2011:08:11 09:46:32"`,
- ApertureValue: `"433985/100000"`,
- ExposureBiasValue: `"2/6"`,
- LightSource: `0`,
- FocalLength: `"620/10"`,
- ExifVersion: `"0221"`,
- DateTimeOriginal: `"2011:08:07 19:22:57"`,
- Flash: `7`,
- ExposureMode: `0`,
- ThumbJPEGInterchangeFormat: `802`,
- ThumbJPEGInterchangeFormatLength: `9117`,
- MaxApertureValue: `"43/10"`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ExifIFDPointer: `186`,
- ExposureTime: `"1/30"`,
- MeteringMode: `2`,
- GainControl: `1`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- Model: `"NIKON D200"`,
- Software: `"Ver.1.00"`,
- ShutterSpeedValue: `"4906891/1000000"`,
- SubSecTimeOriginal: `"65"`,
- SubSecTimeDigitized: `"65"`,
- FocalLengthIn35mmFilm: `93`,
- SceneCaptureType: `0`,
- Make: `"NIKON CORPORATION"`,
- XResolution: `"300/1"`,
- ISOSpeedRatings: `400`,
- CFAPattern: `""`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"1/1"`,
- Contrast: `0`,
- FNumber: `"45/10"`,
- ExposureProgram: `3`,
- SubjectDistance: `"63/100"`,
- FileSource: `""`,
- },
- "2011-10-28-17-50-18-sep-2011-10-28-17-50-18a.jpg": map[FieldName]string{
- SubSecTime: `"92"`,
- CustomRendered: `0`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- UserComment: `""`,
- DateTime: `"2011:11:08 07:27:55"`,
- FNumber: `"4/1"`,
- ExposureProgram: `2`,
- SubSecTimeOriginal: `"92"`,
- GPSVersionID: `[2,2,0,0]`,
- Software: `"Adobe Photoshop CS4 Macintosh"`,
- ExifIFDPointer: `364`,
- ExposureTime: `"1/60"`,
- ISOSpeedRatings: `800`,
- ComponentsConfiguration: `""`,
- XResolution: `"720000/10000"`,
- ThumbJPEGInterchangeFormatLength: `6186`,
- ShutterSpeedValue: `"393216/65536"`,
- ExposureBiasValue: `"0/1"`,
- FocalLength: `"34/1"`,
- ColorSpace: `65535`,
- PixelYDimension: `864`,
- FocalPlaneXResolution: `"5616000/1459"`,
- Model: `"Canon EOS 5D Mark II"`,
- DateTimeOriginal: `"2011:10:28 17:50:18"`,
- DateTimeDigitized: `"2011:10:28 17:50:18"`,
- PixelXDimension: `576`,
- InteroperabilityIFDPointer: `1120`,
- InteroperabilityIndex: `"R03"`,
- Make: `"Canon"`,
- FocalPlaneResolutionUnit: `2`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- GPSInfoIFDPointer: `1152`,
- ExifVersion: `"0221"`,
- MeteringMode: `5`,
- Flash: `9`,
- FocalPlaneYResolution: `"3744000/958"`,
- Orientation: `1`,
- ThumbJPEGInterchangeFormat: `1266`,
- ApertureValue: `"262144/65536"`,
- SubSecTimeDigitized: `"92"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `1`,
- YResolution: `"720000/10000"`,
- },
- "2011-10-28-18-25-43-sep-2011-10-28-18-25-43.jpg": map[FieldName]string{
- SubSecTimeOriginal: `"50"`,
- DateTime: `"2011:10:28 18:25:43"`,
- ISOSpeedRatings: `1250`,
- ComponentsConfiguration: `""`,
- Saturation: `0`,
- XResolution: `"300/1"`,
- ExposureTime: `"10/600"`,
- ColorSpace: `1`,
- ThumbJPEGInterchangeFormatLength: `3670`,
- LightSource: `0`,
- FocalLength: `"800/10"`,
- CFAPattern: `""`,
- DigitalZoomRatio: `"1/1"`,
- InteroperabilityIndex: `"R98"`,
- Make: `"NIKON CORPORATION"`,
- DateTimeOriginal: `"2011:10:28 18:25:43"`,
- InteroperabilityIFDPointer: `3604`,
- Sharpness: `0`,
- ExifVersion: `"0221"`,
- MeteringMode: `5`,
- Flash: `31`,
- FocalLengthIn35mmFilm: `120`,
- Orientation: `1`,
- YCbCrPositioning: `2`,
- SubSecTimeDigitized: `"50"`,
- WhiteBalance: `0`,
- ThumbJPEGInterchangeFormat: `3728`,
- SensingMethod: `2`,
- CustomRendered: `0`,
- SubSecTime: `"50"`,
- ExposureProgram: `0`,
- Software: `"Ver.1.11 "`,
- FNumber: `"56/10"`,
- CompressedBitsPerPixel: `"2/1"`,
- ExifIFDPointer: `208`,
- FileSource: `""`,
- Model: `"NIKON D80"`,
- ExposureBiasValue: `"0/6"`,
- PixelYDimension: `537`,
- GainControl: `2`,
- DateTimeDigitized: `"2011:10:28 18:25:43"`,
- PixelXDimension: `800`,
- SceneType: `""`,
- ImageUniqueID: `"7fa4f6d028df5f2fc1bad8102be81064"`,
- SubjectDistanceRange: `0`,
- ResolutionUnit: `2`,
- FlashpixVersion: `"0100"`,
- YResolution: `"300/1"`,
- MaxApertureValue: `"50/10"`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- MakerNote: `""`,
- UserComment: `"ASCII "`,
- },
- "2011-11-18-15-38-34-sep-Photo11181538.jpg": map[FieldName]string{
- WhiteBalance: `0`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `642`,
- FlashpixVersion: `"0100"`,
- CustomRendered: `1`,
- ExposureMode: `0`,
- Contrast: `1`,
- Software: `"M6290A-KPVMZL-2.6.0140T"`,
- ExposureProgram: `2`,
- Saturation: `0`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `204`,
- ComponentsConfiguration: `""`,
- PixelYDimension: `1200`,
- FileSource: `""`,
- Model: `"P2020"`,
- ThumbJPEGInterchangeFormatLength: `12226`,
- ColorSpace: `1`,
- BrightnessValue: `"0/1024"`,
- PixelXDimension: `1600`,
- InteroperabilityIFDPointer: `518`,
- SceneType: `""`,
- DigitalZoomRatio: `"0/0"`,
- Make: `"PANTECH"`,
- DateTimeOriginal: `"2011:11:18 15:38:34"`,
- DateTimeDigitized: `"2011:11:18 15:38:34"`,
- InteroperabilityIndex: `"R98"`,
- Sharpness: `0`,
- ExifVersion: `"0220"`,
- MeteringMode: `2`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- },
- "2012-06-02-10-12-28-sep-2012-06-02-10-12-28.jpg": map[FieldName]string{
- YResolution: `"180/1"`,
- Software: `"Ver.1.0 "`,
- DateTime: `"2012:06:02 10:12:28"`,
- LightSource: `0`,
- FocalLength: `"50/10"`,
- FlashpixVersion: `"0100"`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- Make: `"Panasonic"`,
- DateTimeOriginal: `"2012:06:02 10:12:28"`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `10506`,
- ExposureMode: `0`,
- FocalLengthIn35mmFilm: `28`,
- FNumber: `"33/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- GainControl: `0`,
- Saturation: `0`,
- DateTimeDigitized: `"2012:06:02 10:12:28"`,
- CompressedBitsPerPixel: `"4/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- PixelXDimension: `4608`,
- SensingMethod: `2`,
- Model: `"DMC-FH25"`,
- ExposureBiasValue: `"0/100"`,
- PixelYDimension: `3456`,
- DigitalZoomRatio: `"0/10"`,
- Orientation: `1`,
- XResolution: `"180/1"`,
- ISOSpeedRatings: `100`,
- ExifVersion: `"0230"`,
- Flash: `16`,
- CustomRendered: `0`,
- ThumbJPEGInterchangeFormat: `11764`,
- ThumbJPEGInterchangeFormatLength: `7486`,
- ExposureProgram: `2`,
- MaxApertureValue: `"441/128"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `636`,
- ExposureTime: `"10/4000"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- },
- "2012-09-21-22-07-34-sep-2012-09-21-22-07-34.jpg": map[FieldName]string{
- ThumbJPEGInterchangeFormat: `5108`,
- ThumbJPEGInterchangeFormatLength: `4855`,
- MaxApertureValue: `"95/32"`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- ExifIFDPointer: `240`,
- ExposureTime: `"1/60"`,
- CompressedBitsPerPixel: `"3/1"`,
- MeteringMode: `5`,
- UserComment: `""`,
- InteroperabilityIndex: `"R98"`,
- ImageDescription: `" "`,
- Model: `"Canon PowerShot SD940 IS"`,
- ShutterSpeedValue: `"189/32"`,
- FocalPlaneResolutionUnit: `2`,
- CustomRendered: `0`,
- Make: `"Canon"`,
- Orientation: `1`,
- XResolution: `"180/1"`,
- ISOSpeedRatings: `500`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `3288`,
- FocalPlaneYResolution: `"2448000/183"`,
- DigitalZoomRatio: `"4000/4000"`,
- SceneCaptureType: `2`,
- FNumber: `"28/10"`,
- FileSource: `""`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- DateTimeDigitized: `"2012:09:21 22:07:34"`,
- MakerNote: `""`,
- PixelXDimension: `3264`,
- SensingMethod: `2`,
- FocalPlaneXResolution: `"3264000/244"`,
- YResolution: `"180/1"`,
- DateTime: `"2012:09:21 22:07:34"`,
- ApertureValue: `"95/32"`,
- ExposureBiasValue: `"0/3"`,
- FocalLength: `"5000/1000"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2448`,
- ExifVersion: `"0221"`,
- DateTimeOriginal: `"2012:09:21 22:07:34"`,
- Flash: `25`,
- ExposureMode: `0`,
- },
- "2012-12-19-21-38-40-sep-temple_square1.jpg": map[FieldName]string{
- InteroperabilityIFDPointer: `322`,
- GPSLatitude: `["40/1","46/1","1322/100"]`,
- InteroperabilityIndex: `"R98"`,
- Make: `"HTC"`,
- DateTimeOriginal: `"2012:12:19 21:38:40"`,
- DateTimeDigitized: `"2012:12:19 21:38:40"`,
- PixelXDimension: `3264`,
- GPSLatitudeRef: `"N"`,
- GPSLongitude: `["111/1","53/1","2840/100"]`,
- GPSLongitudeRef: `"W"`,
- GPSProcessingMethod: `"ASCIIGPS"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- GPSInfoIFDPointer: `352`,
- ExifVersion: `"0220"`,
- GPSMapDatum: `"WGS-84"`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `696`,
- FlashpixVersion: `"0100"`,
- GPSAltitudeRef: `0`,
- GPSVersionID: `[2,2,0]`,
- GPSAltitude: `"1334/1"`,
- GPSTimeStamp: `["4/1","38/1","40/1"]`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `136`,
- ISOSpeedRatings: `801`,
- ComponentsConfiguration: `""`,
- PixelYDimension: `1952`,
- GPSDateStamp: `"2012:12:20"`,
- Model: `"ADR6400L"`,
- ThumbJPEGInterchangeFormatLength: `38469`,
- FocalLength: `"457/100"`,
- ColorSpace: `1`,
- },
- "2012-12-21-11-15-19-sep-IMG_0001.jpg": map[FieldName]string{
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `360`,
- ExposureTime: `"1/30"`,
- InteroperabilityIndex: `"R98"`,
- SubSecTimeDigitized: `"00"`,
- FlashpixVersion: `"0100"`,
- FocalPlaneXResolution: `"5184000/894"`,
- YResolution: `"72/1"`,
- DateTime: `"2012:12:21 11:15:19"`,
- ShutterSpeedValue: `"327680/65536"`,
- ApertureValue: `"286720/65536"`,
- FocalLength: `"24/1"`,
- LensModel: `"EF-S18-55mm f/3.5-5.6 IS II"`,
- GPSVersionID: `[2,3,0,0]`,
- InteroperabilityIFDPointer: `8806`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- Make: `"Canon"`,
- GPSInfoIFDPointer: `9034`,
- DateTimeOriginal: `"2012:12:21 11:15:19"`,
- ComponentsConfiguration: `""`,
- SubSecTime: `"00"`,
- Artist: `""`,
- FNumber: `"45/10"`,
- ColorSpace: `1`,
- WhiteBalance: `0`,
- DateTimeDigitized: `"2012:12:21 11:15:19"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- UserComment: `""`,
- PixelXDimension: `5184`,
- FocalPlaneResolutionUnit: `2`,
- Model: `"Canon EOS REBEL T4i"`,
- Copyright: `""`,
- ExposureBiasValue: `"0/1"`,
- SubSecTimeOriginal: `"00"`,
- PixelYDimension: `3456`,
- FocalPlaneYResolution: `"3456000/597"`,
- CustomRendered: `0`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ISOSpeedRatings: `1600`,
- ExifVersion: `"0230"`,
- Flash: `16`,
- ThumbJPEGInterchangeFormat: `10924`,
- ThumbJPEGInterchangeFormatLength: `14327`,
- ExposureProgram: `0`,
- },
- "2013-02-05-23-12-09-sep-DSCI0001.jpg": map[FieldName]string{
- ApertureValue: `"3072/1000"`,
- ExposureBiasValue: `"0/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `1200`,
- FileSource: `""`,
- YResolution: `"288/3"`,
- ThumbJPEGInterchangeFormatLength: `5863`,
- ShutterSpeedValue: `"5907/1000"`,
- WhiteBalance: `0`,
- InteroperabilityIFDPointer: `4838`,
- ExposureMode: `0`,
- InteroperabilityIndex: `"R98"`,
- Make: `"Polaroid"`,
- DateTimeDigitized: `"2013:02:05 23:12:09"`,
- PixelXDimension: `1600`,
- DateTime: `"2013:02:05 23:12:09"`,
- ExposureProgram: `2`,
- CompressedBitsPerPixel: `"3766184/1920000"`,
- Flash: `1`,
- FocalLengthIn35mmFilm: `35`,
- XResolution: `"288/3"`,
- ISOSpeedRatings: `100`,
- ExifVersion: `"0210"`,
- MaxApertureValue: `"3072/1000"`,
- LightSource: `0`,
- FocalLength: `"5954/1000"`,
- ColorSpace: `1`,
- Model: `"Polaroid i532"`,
- Copyright: `"Copyright 2005"`,
- ThumbJPEGInterchangeFormat: `4974`,
- SceneType: `""`,
- DigitalZoomRatio: `"100/100"`,
- SceneCaptureType: `0`,
- DateTimeOriginal: `"2013:02:05 23:12:09"`,
- MakerNote: `" BARCODE:A265KS008000; ZP:812; FP:124; AWB:235,679; PWB:476,304; PMF:12,11610; LV:493; LUM:3-8-9-8-1-11;20;26;19;10;A:1,F1:6,F2:18;ET:145, W:2, F:3 ;FV: 41FV: 36FV: 43FV: 223FV: 258FV: 9FV: 466FV: 216FP: 10FP: 8FP: 6FP: 6FP: 6FP: 0FP: 8FP: 8AFS: 110"`,
- SensingMethod: `2`,
- Sharpness: `0`,
- ImageDescription: `""`,
- Software: `" 1.0"`,
- FNumber: `"28/10"`,
- ExifIFDPointer: `240`,
- ExposureTime: `"1/60"`,
- ComponentsConfiguration: `""`,
- MeteringMode: `3`,
- Orientation: `1`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- },
- "2099-08-12-19-59-29-sep-2099-08-12-19-59-29a.jpg": map[FieldName]string{
- Model: `"NIKON D70s"`,
- ExposureBiasValue: `"0/6"`,
- SubSecTimeOriginal: `"00"`,
- PixelYDimension: `2000`,
- CFAPattern: `""`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"1/1"`,
- Orientation: `1`,
- XResolution: `"300/1"`,
- ExifVersion: `"0221"`,
- Flash: `31`,
- ThumbJPEGInterchangeFormat: `28588`,
- ThumbJPEGInterchangeFormatLength: `8886`,
- ExposureProgram: `0`,
- MaxApertureValue: `"36/10"`,
- SceneType: `""`,
- InteroperabilityIndex: `"R98"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `2`,
- ExifIFDPointer: `216`,
- ExposureTime: `"10/600"`,
- FocalLength: `"180/10"`,
- SubSecTimeDigitized: `"00"`,
- FlashpixVersion: `"0100"`,
- YResolution: `"300/1"`,
- Software: `"Ver.1.00 "`,
- DateTime: `"2099:08:12 19:59:29"`,
- LightSource: `0`,
- InteroperabilityIFDPointer: `28448`,
- ExposureMode: `0`,
- FocalLengthIn35mmFilm: `27`,
- SceneCaptureType: `0`,
- Make: `"NIKON CORPORATION"`,
- DateTimeOriginal: `"2099:08:12 19:59:29"`,
- ComponentsConfiguration: `""`,
- SubSecTime: `"00"`,
- Contrast: `1`,
- Sharpness: `0`,
- FNumber: `"35/10"`,
- ColorSpace: `1`,
- FileSource: `""`,
- WhiteBalance: `0`,
- UserComment: `"ASCII "`,
- PixelXDimension: `3008`,
- SensingMethod: `2`,
- GainControl: `0`,
- DateTimeDigitized: `"2099:08:12 19:59:29"`,
- CompressedBitsPerPixel: `"2/1"`,
- MeteringMode: `5`,
- MakerNote: `""`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- },
- "2216-11-15-11-46-51-sep-2216-11-15-11-46-51a.jpg": map[FieldName]string{
- ExposureProgram: `2`,
- FileSource: `""`,
- FNumber: `"480/100"`,
- YCbCrPositioning: `2`,
- DateTimeDigitized: `"2216:11:15 11:46:51"`,
- MakerNote: `""`,
- PixelXDimension: `3296`,
- SensingMethod: `2`,
- SceneType: `""`,
- ResolutionUnit: `2`,
- ApertureValue: `"452/100"`,
- ExposureBiasValue: `"0/10"`,
- LightSource: `0`,
- FocalLength: `"60/10"`,
- FlashpixVersion: `"0100"`,
- PixelYDimension: `2472`,
- YResolution: `"480/1"`,
- DateTimeOriginal: `"2216:11:15 11:46:51"`,
- Flash: `24`,
- ExposureMode: `0`,
- ExifVersion: `"0221"`,
- ThumbJPEGInterchangeFormatLength: `5175`,
- MaxApertureValue: `"286/100"`,
- ColorSpace: `1`,
- ExposureIndex: `"80/1"`,
- WhiteBalance: `0`,
- Sharpness: `0`,
- ThumbJPEGInterchangeFormat: `17818`,
- ExposureTime: `"1016/1000000"`,
- MeteringMode: `5`,
- GainControl: `0`,
- Saturation: `0`,
- SubjectDistanceRange: `0`,
- ExifIFDPointer: `2316`,
- Software: `"KODAK EASYSHARE C813 ZOOM DIGITAL CAMERA"`,
- ShutterSpeedValue: `"994/100"`,
- Model: `"KODAK EASYSHARE C813 ZOOM DIGITAL CAMERA"`,
- Orientation: `1`,
- XResolution: `"480/1"`,
- ISOSpeedRatings: `80`,
- ComponentsConfiguration: `""`,
- InteroperabilityIFDPointer: `17674`,
- CustomRendered: `0`,
- DigitalZoomRatio: `"0/10"`,
- Make: `"EASTMAN KODAK COMPANY"`,
- SceneCaptureType: `0`,
- Contrast: `0`,
- FocalLengthIn35mmFilm: `36`,
- },
- "FailedHash-NoDate-sep-remembory.jpg": map[FieldName]string{
- Model: `"MFC-7840W"`,
- YResolution: `"150/1"`,
- Software: `"Apple Image Capture"`,
- PixelYDimension: `1626`,
- ExifIFDPointer: `192`,
- PixelXDimension: `1232`,
- Make: `"Brother"`,
- Orientation: `1`,
- XResolution: `"150/1"`,
- ResolutionUnit: `2`,
- },
- "f1-exif.jpg": map[FieldName]string{
- PixelXDimension: `0`,
- Orientation: `1`,
- XResolution: `"72/1"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:02"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- },
- "f2-exif.jpg": map[FieldName]string{
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `2`,
- XResolution: `"72/1"`,
- },
- "f3-exif.jpg": map[FieldName]string{
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `3`,
- XResolution: `"72/1"`,
- },
- "f4-exif.jpg": map[FieldName]string{
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `4`,
- XResolution: `"72/1"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- },
- "f5-exif.jpg": map[FieldName]string{
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `5`,
- XResolution: `"72/1"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- PixelYDimension: `0`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- },
- "f6-exif.jpg": map[FieldName]string{
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `6`,
- XResolution: `"72/1"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- },
- "f7-exif.jpg": map[FieldName]string{
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `7`,
- XResolution: `"72/1"`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- PixelYDimension: `0`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- },
- "f8-exif.jpg": map[FieldName]string{
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- ExifIFDPointer: `134`,
- ExifVersion: `"0210"`,
- ComponentsConfiguration: `""`,
- PixelXDimension: `0`,
- Orientation: `8`,
- XResolution: `"72/1"`,
- FlashpixVersion: `"0100"`,
- ColorSpace: `65535`,
- PixelYDimension: `0`,
- YResolution: `"72/1"`,
- DateTime: `"2012:11:04 05:42:32"`,
- },
- "geodegrees_as_string.jpg": map[FieldName]string{
- GPSAltitudeRef: `0`,
- ThumbJPEGInterchangeFormat: `539`,
- ThumbJPEGInterchangeFormatLength: `13132`,
- WhiteBalance: `0`,
- ExposureProgram: `0`,
- Sharpness: `2`,
- ExifIFDPointer: `114`,
- ExposureTime: `"0/1024"`,
- Saturation: `0`,
- GPSLatitude: `"52,00000,50,00000,34,01180"`,
- GPSTimeStamp: `"17,00000,8,00000,29,00000"`,
- Model: `"HTC One_M8"`,
- ApertureValue: `"2048/1024"`,
- FocalLength: `"3072/1024"`,
- GPSLatitudeRef: `"N"`,
- GPSLongitude: `"11,00000,10,00000,58,28360"`,
- GPSAltitude: `"0/1024"`,
- GPSLongitudeRef: `"E"`,
- GPSProcessingMethod: `"ASCII"`,
- GPSInfoIFDPointer: `317`,
- Make: `"HTC"`,
- DateTimeOriginal: `"2014:04:26 19:09:19"`,
- ISOSpeedRatings: `125`,
- Contrast: `0`,
- },
- "has-lens-info.jpg": map[FieldName]string{
- LensModel: `"iPhone 4S back camera 4.28mm f/2.4"`,
- Model: `"iPhone 4S"`,
- ThumbJPEGInterchangeFormatLength: `10875`,
- ShutterSpeedValue: `"106906/10353"`,
- FocalLength: `"107/25"`,
- SubjectArea: `[1631,1223,881,881]`,
- ColorSpace: `1`,
- PixelYDimension: `2448`,
- GPSLatitude: `["59/1","19/1","5717/100"]`,
- Make: `"Apple"`,
- DateTimeOriginal: `"2014:09:01 15:03:47"`,
- DateTimeDigitized: `"2014:09:01 15:03:47"`,
- BrightnessValue: `"3927/419"`,
- PixelXDimension: `3264`,
- SceneType: `""`,
- LensMake: `"Apple"`,
- GPSLatitudeRef: `"N"`,
- GPSLongitude: `["18/1","3/1","5379/100"]`,
- FocalLengthIn35mmFilm: `35`,
- Orientation: `6`,
- ResolutionUnit: `2`,
- YCbCrPositioning: `1`,
- GPSInfoIFDPointer: `948`,
- ExifVersion: `"0221"`,
- MeteringMode: `5`,
- Flash: `16`,
- GPSLongitudeRef: `"E"`,
- YResolution: `"72/1"`,
- ThumbJPEGInterchangeFormat: `1244`,
- ApertureValue: `"4845/1918"`,
- SubSecTimeDigitized: `"880"`,
- FlashpixVersion: `"0100"`,
- WhiteBalance: `0`,
- GPSAltitudeRef: `0`,
- MakerNote: `""`,
- SensingMethod: `2`,
- ExposureMode: `0`,
- SceneCaptureType: `0`,
- GPSImgDirection: `"18329/175"`,
- Software: `"7.1.1"`,
- DateTime: `"2014:09:01 15:03:47"`,
- FNumber: `"12/5"`,
- ExposureProgram: `2`,
- SubSecTimeOriginal: `"880"`,
- GPSImgDirectionRef: `"T"`,
- XResolution: `"72/1"`,
- ExifIFDPointer: `204`,
- ExposureTime: `"1/1284"`,
- ISOSpeedRatings: `50`,
- ComponentsConfiguration: `""`,
- GPSAltitude: `"29/1"`,
- GPSTimeStamp: `["13/1","3/1","4279/100"]`,
- },
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2004-01-11-22-45-15-sep-2004-01-11-22-45-15a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2004-01-11-22-45-15-sep-2004-01-11-22-45-15a.jpg
deleted file mode 100644
index 6f3be2480..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2004-01-11-22-45-15-sep-2004-01-11-22-45-15a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-08-03-16-29-38-sep-2006-08-03-16-29-38a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-08-03-16-29-38-sep-2006-08-03-16-29-38a.jpg
deleted file mode 100644
index 39891df84..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-08-03-16-29-38-sep-2006-08-03-16-29-38a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-11-11-19-17-56-sep-2006-11-11-19-17-56a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-11-11-19-17-56-sep-2006-11-11-19-17-56a.jpg
deleted file mode 100644
index 4721e7542..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-11-11-19-17-56-sep-2006-11-11-19-17-56a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-10-23-58-20-sep-2006-12-10-23-58-20a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-10-23-58-20-sep-2006-12-10-23-58-20a.jpg
deleted file mode 100644
index 8c0997ea0..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-10-23-58-20-sep-2006-12-10-23-58-20a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-17-07-09-14-sep-2006-12-17-07-09-14a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-17-07-09-14-sep-2006-12-17-07-09-14a.jpg
deleted file mode 100644
index 1c6e7601d..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-17-07-09-14-sep-2006-12-17-07-09-14a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-21-15-55-26-sep-2006-12-21-15-55-26a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-21-15-55-26-sep-2006-12-21-15-55-26a.jpg
deleted file mode 100644
index 8aaf632be..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2006-12-21-15-55-26-sep-2006-12-21-15-55-26a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-01-12-00-00-sep-2007-01-01-12-00-00a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-01-12-00-00-sep-2007-01-01-12-00-00a.jpg
deleted file mode 100644
index c44db32c1..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-01-12-00-00-sep-2007-01-01-12-00-00a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-17-21-49-44-sep-2007-01-17-21-49-44a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-17-21-49-44-sep-2007-01-17-21-49-44a.jpg
deleted file mode 100644
index f025460d6..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-01-17-21-49-44-sep-2007-01-17-21-49-44a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-02-02-18-13-29-sep-2007-02-02-18-13-29a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-02-02-18-13-29-sep-2007-02-02-18-13-29a.jpg
deleted file mode 100644
index 3f1fbfbdf..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-02-02-18-13-29-sep-2007-02-02-18-13-29a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-02-17-02-21-sep-2007-05-02-17-02-21a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-02-17-02-21-sep-2007-05-02-17-02-21a.jpg
deleted file mode 100644
index 351935778..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-02-17-02-21-sep-2007-05-02-17-02-21a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-12-08-19-07-sep-2007-05-12-08-19-07a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-12-08-19-07-sep-2007-05-12-08-19-07a.jpg
deleted file mode 100644
index 175b60663..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-12-08-19-07-sep-2007-05-12-08-19-07a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-26-04-49-45-sep-2007-05-26-04-49-45a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-26-04-49-45-sep-2007-05-26-04-49-45a.jpg
deleted file mode 100644
index 90a6c92b0..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-26-04-49-45-sep-2007-05-26-04-49-45a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-30-14-28-01-sep-2007-05-30-14-28-01a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-30-14-28-01-sep-2007-05-30-14-28-01a.jpg
deleted file mode 100644
index 74f30c351..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-05-30-14-28-01-sep-2007-05-30-14-28-01a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-06-16-15-25-sep-2007-06-06-16-15-25a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-06-16-15-25-sep-2007-06-06-16-15-25a.jpg
deleted file mode 100644
index 0a025a0b8..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-06-16-15-25-sep-2007-06-06-16-15-25a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-26-10-13-04-sep-2007-06-26-10-13-04a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-26-10-13-04-sep-2007-06-26-10-13-04a.jpg
deleted file mode 100644
index 526cefafd..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-06-26-10-13-04-sep-2007-06-26-10-13-04a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-07-13-17-02-30-sep-2007-07-13-17-02-30a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-07-13-17-02-30-sep-2007-07-13-17-02-30a.jpg
deleted file mode 100644
index c39e90fca..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-07-13-17-02-30-sep-2007-07-13-17-02-30a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-15-14-42-46-sep-2007-08-15-14-42-46a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-15-14-42-46-sep-2007-08-15-14-42-46a.jpg
deleted file mode 100644
index 81be2a200..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-15-14-42-46-sep-2007-08-15-14-42-46a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-24-02-40-42-sep-2007-08-24-02-40-42a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-24-02-40-42-sep-2007-08-24-02-40-42a.jpg
deleted file mode 100644
index aa457643d..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-08-24-02-40-42-sep-2007-08-24-02-40-42a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-11-07-11-40-44-sep-2007-11-07-11-40-44a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-11-07-11-40-44-sep-2007-11-07-11-40-44a.jpg
deleted file mode 100644
index 916a2b6c3..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2007-11-07-11-40-44-sep-2007-11-07-11-40-44a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-02-10-03-57-sep-2008-06-02-10-03-57a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-02-10-03-57-sep-2008-06-02-10-03-57a.jpg
deleted file mode 100644
index 0aedf3003..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-02-10-03-57-sep-2008-06-02-10-03-57a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-06-13-29-29-sep-2008-06-06-13-29-29a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-06-13-29-29-sep-2008-06-06-13-29-29a.jpg
deleted file mode 100644
index a291900e3..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-06-13-29-29-sep-2008-06-06-13-29-29a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-17-01-21-30-sep-2008-06-17-01-21-30a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-17-01-21-30-sep-2008-06-17-01-21-30a.jpg
deleted file mode 100644
index 805d1d0f0..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-06-17-01-21-30-sep-2008-06-17-01-21-30a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-09-02-17-43-48-sep-2008-09-02-17-43-48a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-09-02-17-43-48-sep-2008-09-02-17-43-48a.jpg
deleted file mode 100644
index c866423c7..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2008-09-02-17-43-48-sep-2008-09-02-17-43-48a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-03-26-09-23-20-sep-2009-03-26-09-23-20a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-03-26-09-23-20-sep-2009-03-26-09-23-20a.jpg
deleted file mode 100644
index 761bf6488..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-03-26-09-23-20-sep-2009-03-26-09-23-20a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-11-03-01-38-sep-2009-04-11-03-01-38a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-11-03-01-38-sep-2009-04-11-03-01-38a.jpg
deleted file mode 100644
index 484fe3759..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-11-03-01-38-sep-2009-04-11-03-01-38a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-23-07-21-35-sep-2009-04-23-07-21-35a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-23-07-21-35-sep-2009-04-23-07-21-35a.jpg
deleted file mode 100644
index f39db7d9a..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-04-23-07-21-35-sep-2009-04-23-07-21-35a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-11-19-23-18-sep-2009-06-11-19-23-18a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-11-19-23-18-sep-2009-06-11-19-23-18a.jpg
deleted file mode 100644
index 599764bf8..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-11-19-23-18-sep-2009-06-11-19-23-18a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-20-07-59-05-sep-2009-06-20-07-59-05a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-20-07-59-05-sep-2009-06-20-07-59-05a.jpg
deleted file mode 100644
index 8718269e9..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-06-20-07-59-05-sep-2009-06-20-07-59-05a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpg
deleted file mode 100644
index 9598b2136..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-08-04-44-24-sep-2010-06-08-04-44-24a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-08-04-44-24-sep-2010-06-08-04-44-24a.jpg
deleted file mode 100644
index 33f7d9b20..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-08-04-44-24-sep-2010-06-08-04-44-24a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-20-20-07-39-sep-2010-06-20-20-07-39a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-20-20-07-39-sep-2010-06-20-20-07-39a.jpg
deleted file mode 100644
index ec2faa1a9..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-06-20-20-07-39-sep-2010-06-20-20-07-39a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-09-02-08-43-02-sep-2010-09-02-08-43-02a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-09-02-08-43-02-sep-2010-09-02-08-43-02a.jpg
deleted file mode 100644
index 3b7f906db..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2010-09-02-08-43-02-sep-2010-09-02-08-43-02a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-01-24-22-06-02-sep-2011-01-24-22-06-02a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-01-24-22-06-02-sep-2011-01-24-22-06-02a.jpg
deleted file mode 100644
index 1a4af42d3..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-01-24-22-06-02-sep-2011-01-24-22-06-02a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-03-07-09-28-03-sep-2011-03-07-09-28-03a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-03-07-09-28-03-sep-2011-03-07-09-28-03a.jpg
deleted file mode 100644
index 42d347656..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-03-07-09-28-03-sep-2011-03-07-09-28-03a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-05-07-13-02-49-sep-2011-05-07-13-02-49a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-05-07-13-02-49-sep-2011-05-07-13-02-49a.jpg
deleted file mode 100644
index 7e84ec481..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-05-07-13-02-49-sep-2011-05-07-13-02-49a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-08-07-19-22-57-sep-2011-08-07-19-22-57a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-08-07-19-22-57-sep-2011-08-07-19-22-57a.jpg
deleted file mode 100644
index 16fad2ecb..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-08-07-19-22-57-sep-2011-08-07-19-22-57a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-17-50-18-sep-2011-10-28-17-50-18a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-17-50-18-sep-2011-10-28-17-50-18a.jpg
deleted file mode 100644
index f6020a8c9..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-17-50-18-sep-2011-10-28-17-50-18a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-18-25-43-sep-2011-10-28-18-25-43.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-18-25-43-sep-2011-10-28-18-25-43.jpg
deleted file mode 100644
index 3aa541878..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-10-28-18-25-43-sep-2011-10-28-18-25-43.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-11-18-15-38-34-sep-Photo11181538.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-11-18-15-38-34-sep-Photo11181538.jpg
deleted file mode 100644
index 48ef933a2..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2011-11-18-15-38-34-sep-Photo11181538.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-06-02-10-12-28-sep-2012-06-02-10-12-28.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-06-02-10-12-28-sep-2012-06-02-10-12-28.jpg
deleted file mode 100644
index f83270eee..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-06-02-10-12-28-sep-2012-06-02-10-12-28.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-09-21-22-07-34-sep-2012-09-21-22-07-34.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-09-21-22-07-34-sep-2012-09-21-22-07-34.jpg
deleted file mode 100644
index 5cdb55aac..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-09-21-22-07-34-sep-2012-09-21-22-07-34.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-19-21-38-40-sep-temple_square1.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-19-21-38-40-sep-temple_square1.jpg
deleted file mode 100644
index 4cc074f8e..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-19-21-38-40-sep-temple_square1.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-21-11-15-19-sep-IMG_0001.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-21-11-15-19-sep-IMG_0001.jpg
deleted file mode 100644
index ba23c3c42..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2012-12-21-11-15-19-sep-IMG_0001.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2013-02-05-23-12-09-sep-DSCI0001.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2013-02-05-23-12-09-sep-DSCI0001.jpg
deleted file mode 100644
index 0396148af..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2013-02-05-23-12-09-sep-DSCI0001.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2099-08-12-19-59-29-sep-2099-08-12-19-59-29a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2099-08-12-19-59-29-sep-2099-08-12-19-59-29a.jpg
deleted file mode 100644
index 9729182b3..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2099-08-12-19-59-29-sep-2099-08-12-19-59-29a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/2216-11-15-11-46-51-sep-2216-11-15-11-46-51a.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/2216-11-15-11-46-51-sep-2216-11-15-11-46-51a.jpg
deleted file mode 100644
index ae53a397a..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/2216-11-15-11-46-51-sep-2216-11-15-11-46-51a.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/FailedHash-NoDate-sep-remembory.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/FailedHash-NoDate-sep-remembory.jpg
deleted file mode 100644
index 9fb415124..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/FailedHash-NoDate-sep-remembory.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f1-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f1-exif.jpg
deleted file mode 100644
index ff003e394..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f1-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f2-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f2-exif.jpg
deleted file mode 100644
index 7e0f170e3..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f2-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f3-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f3-exif.jpg
deleted file mode 100644
index 3ed7b16a7..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f3-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f4-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f4-exif.jpg
deleted file mode 100644
index 0e081f919..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f4-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f5-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f5-exif.jpg
deleted file mode 100644
index e8d875479..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f5-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f6-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f6-exif.jpg
deleted file mode 100644
index 4e2c86415..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f6-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f7-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f7-exif.jpg
deleted file mode 100644
index b5dddea44..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f7-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/f8-exif.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/f8-exif.jpg
deleted file mode 100644
index fb050fc6d..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/f8-exif.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/geodegrees_as_string.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/geodegrees_as_string.jpg
deleted file mode 100644
index 280a70ec4..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/geodegrees_as_string.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exif/samples/has-lens-info.jpg b/vendor/github.com/rwcarlsen/goexif/exif/samples/has-lens-info.jpg
deleted file mode 100644
index 57757da33..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exif/samples/has-lens-info.jpg
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/rwcarlsen/goexif/exifstat/main.go b/vendor/github.com/rwcarlsen/goexif/exifstat/main.go
deleted file mode 100644
index 0b383c9d5..000000000
--- a/vendor/github.com/rwcarlsen/goexif/exifstat/main.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
-
- "github.com/rwcarlsen/goexif/exif"
- "github.com/rwcarlsen/goexif/mknote"
- "github.com/rwcarlsen/goexif/tiff"
-)
-
-var mnote = flag.Bool("mknote", false, "try to parse makernote data")
-var thumb = flag.Bool("thumb", false, "dump thumbail data to stdout (for first listed image file)")
-
-func main() {
- flag.Parse()
- fnames := flag.Args()
-
- if *mnote {
- exif.RegisterParsers(mknote.All...)
- }
-
- for _, name := range fnames {
- f, err := os.Open(name)
- if err != nil {
- log.Printf("err on %v: %v", name, err)
- continue
- }
-
- x, err := exif.Decode(f)
- if err != nil {
- log.Printf("err on %v: %v", name, err)
- continue
- }
-
- if *thumb {
- data, err := x.JpegThumbnail()
- if err != nil {
- log.Fatal("no thumbnail present")
- }
- if _, err := os.Stdout.Write(data); err != nil {
- log.Fatal(err)
- }
- return
- }
-
- fmt.Printf("\n---- Image '%v' ----\n", name)
- x.Walk(Walker{})
- }
-}
-
-type Walker struct{}
-
-func (_ Walker) Walk(name exif.FieldName, tag *tiff.Tag) error {
- data, _ := tag.MarshalJSON()
- fmt.Printf(" %v: %v\n", name, string(data))
- return nil
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/mknote/fields.go b/vendor/github.com/rwcarlsen/goexif/mknote/fields.go
deleted file mode 100644
index e67d11c20..000000000
--- a/vendor/github.com/rwcarlsen/goexif/mknote/fields.go
+++ /dev/null
@@ -1,268 +0,0 @@
-package mknote
-
-import "github.com/rwcarlsen/goexif/exif"
-
-// Useful resources used in creating these tables:
-// http://www.exiv2.org/makernote.html
-// http://www.exiv2.org/tags-canon.html
-// http://www.exiv2.org/tags-nikon.html
-
-// Known Maker Note fields
-const (
- // common fields
- ISOSpeed exif.FieldName = "ISOSpeed"
- ColorMode = "ColorMode"
- Quality = "Quality"
- Sharpening = "Sharpening"
- Focus = "Focus"
- FlashSetting = "FlashSetting"
- FlashDevice = "FlashDevice"
- WhiteBalanceBias = "WhiteBalanceBias"
- WB_RBLevels = "WB_RBLevels"
- ProgramShift = "ProgramShift"
- ExposureDiff = "ExposureDiff"
- ISOSelection = "ISOSelection"
- DataDump = "DataDump"
- Preview = "Preview"
- FlashComp = "FlashComp"
- ISOSettings = "ISOSettings"
- ImageBoundary = "ImageBoundary"
- FlashExposureComp = "FlashExposureComp"
- FlashBracketComp = "FlashBracketComp"
- ExposureBracketComp = "ExposureBracketComp"
- ImageProcessing = "ImageProcessing"
- CropHiSpeed = "CropHiSpeed"
- ExposureTuning = "ExposureTuning"
- SerialNumber = "SerialNumber"
- ImageAuthentication = "ImageAuthentication"
- ActiveDLighting = "ActiveDLighting"
- VignetteControl = "VignetteControl"
- ImageAdjustment = "ImageAdjustment"
- ToneComp = "ToneComp"
- AuxiliaryLens = "AuxiliaryLens"
- LensType = "LensType"
- Lens = "Lens"
- FocusDistance = "FocusDistance"
- DigitalZoom = "DigitalZoom"
- FlashMode = "FlashMode"
- ShootingMode = "ShootingMode"
- AutoBracketRelease = "AutoBracketRelease"
- LensFStops = "LensFStops"
- ContrastCurve = "ContrastCurve"
- ColorHue = "ColorHue"
- SceneMode = "SceneMode"
- HueAdjustment = "HueAdjustment"
- NEFCompression = "NEFCompression"
- NoiseReduction = "NoiseReduction"
- LinearizationTable = "LinearizationTable"
- RawImageCenter = "RawImageCenter"
- SensorPixelSize = "SensorPixelSize"
- SceneAssist = "SceneAssist"
- RetouchHistory = "RetouchHistory"
- ImageDataSize = "ImageDataSize"
- ImageCount = "ImageCount"
- DeletedImageCount = "DeletedImageCount"
- ShutterCount = "ShutterCount"
- ImageOptimization = "ImageOptimization"
- SaturationText = "SaturationText"
- VariProgram = "VariProgram"
- ImageStabilization = "ImageStabilization"
- AFResponse = "AFResponse"
- HighISONoiseReduction = "HighISONoiseReduction"
- ToningEffect = "ToningEffect"
- PrintIM = "PrintIM"
- CaptureData = "CaptureData"
- CaptureVersion = "CaptureVersion"
- CaptureOffsets = "CaptureOffsets"
- ScanIFD = "ScanIFD"
- ICCProfile = "ICCProfile"
- CaptureOutput = "CaptureOutput"
- Panorama = "Panorama"
- ImageType = "ImageType"
- FirmwareVersion = "FirmwareVersion"
- FileNumber = "FileNumber"
- OwnerName = "OwnerName"
- CameraInfo = "CameraInfo"
- CustomFunctions = "CustomFunctions"
- ModelID = "ModelID"
- PictureInfo = "PictureInfo"
- ThumbnailImageValidArea = "ThumbnailImageValidArea"
- SerialNumberFormat = "SerialNumberFormat"
- SuperMacro = "SuperMacro"
- OriginalDecisionDataOffset = "OriginalDecisionDataOffset"
- WhiteBalanceTable = "WhiteBalanceTable"
- LensModel = "LensModel"
- InternalSerialNumber = "InternalSerialNumber"
- DustRemovalData = "DustRemovalData"
- ProcessingInfo = "ProcessingInfo"
- MeasuredColor = "MeasuredColor"
- VRDOffset = "VRDOffset"
- SensorInfo = "SensorInfo"
- ColorData = "ColorData"
-
- // Nikon-specific fields
- Nikon_Version = "Nikon.Version"
- Nikon_WhiteBalance = "Nikon.WhiteBalance"
- Nikon_ColorSpace = "Nikon.ColorSpace"
- Nikon_LightSource = "Nikon.LightSource"
- Nikon_Saturation = "Nikon_Saturation"
- Nikon_ShotInfo = "Nikon.ShotInfo" // A sub-IFD
- Nikon_VRInfo = "Nikon.VRInfo" // A sub-IFD
- Nikon_PictureControl = "Nikon.PictureControl" // A sub-IFD
- Nikon_WorldTime = "Nikon.WorldTime" // A sub-IFD
- Nikon_ISOInfo = "Nikon.ISOInfo" // A sub-IFD
- Nikon_AFInfo = "Nikon.AFInfo" // A sub-IFD
- Nikon_ColorBalance = "Nikon.ColorBalance" // A sub-IFD
- Nikon_LensData = "Nikon.LensData" // A sub-IFD
- Nikon_SerialNO = "Nikon.SerialNO" // usually starts with "NO="
- Nikon_FlashInfo = "Nikon.FlashInfo" // A sub-IFD
- Nikon_MultiExposure = "Nikon.MultiExposure" // A sub-IFD
- Nikon_AFInfo2 = "Nikon.AFInfo2" // A sub-IFD
- Nikon_FileInfo = "Nikon.FileInfo" // A sub-IFD
- Nikon_AFTune = "Nikon.AFTune" // A sub-IFD
- Nikon3_0x000a = "Nikon3.0x000a"
- Nikon3_0x009b = "Nikon3.0x009b"
- Nikon3_0x009f = "Nikon3.0x009f"
- Nikon3_0x00a3 = "Nikon3.0x00a3"
-
- // Canon-specific fiends
- Canon_CameraSettings = "Canon.CameraSettings" // A sub-IFD
- Canon_ShotInfo = "Canon.ShotInfo" // A sub-IFD
- Canon_AFInfo = "Canon.AFInfo"
- Canon_0x0000 = "Canon.0x0000"
- Canon_0x0003 = "Canon.0x0003"
- Canon_0x00b5 = "Canon.0x00b5"
- Canon_0x00c0 = "Canon.0x00c0"
- Canon_0x00c1 = "Canon.0x00c1"
-)
-
-var makerNoteCanonFields = map[uint16]exif.FieldName{
- 0x0000: Canon_0x0000,
- 0x0001: Canon_CameraSettings,
- 0x0002: exif.FocalLength,
- 0x0003: Canon_0x0003,
- 0x0004: Canon_ShotInfo,
- 0x0005: Panorama,
- 0x0006: ImageType,
- 0x0007: FirmwareVersion,
- 0x0008: FileNumber,
- 0x0009: OwnerName,
- 0x000c: SerialNumber,
- 0x000d: CameraInfo,
- 0x000f: CustomFunctions,
- 0x0010: ModelID,
- 0x0012: PictureInfo,
- 0x0013: ThumbnailImageValidArea,
- 0x0015: SerialNumberFormat,
- 0x001a: SuperMacro,
- 0x0026: Canon_AFInfo,
- 0x0083: OriginalDecisionDataOffset,
- 0x00a4: WhiteBalanceTable,
- 0x0095: LensModel,
- 0x0096: InternalSerialNumber,
- 0x0097: DustRemovalData,
- 0x0099: CustomFunctions,
- 0x00a0: ProcessingInfo,
- 0x00aa: MeasuredColor,
- 0x00b4: exif.ColorSpace,
- 0x00b5: Canon_0x00b5,
- 0x00c0: Canon_0x00c0,
- 0x00c1: Canon_0x00c1,
- 0x00d0: VRDOffset,
- 0x00e0: SensorInfo,
- 0x4001: ColorData,
-}
-
-// Nikon version 3 Maker Notes fields (used by E5400, SQ, D2H, D70, and newer)
-var makerNoteNikon3Fields = map[uint16]exif.FieldName{
- 0x0001: Nikon_Version,
- 0x0002: ISOSpeed,
- 0x0003: ColorMode,
- 0x0004: Quality,
- 0x0005: Nikon_WhiteBalance,
- 0x0006: Sharpening,
- 0x0007: Focus,
- 0x0008: FlashSetting,
- 0x0009: FlashDevice,
- 0x000a: Nikon3_0x000a,
- 0x000b: WhiteBalanceBias,
- 0x000c: WB_RBLevels,
- 0x000d: ProgramShift,
- 0x000e: ExposureDiff,
- 0x000f: ISOSelection,
- 0x0010: DataDump,
- 0x0011: Preview,
- 0x0012: FlashComp,
- 0x0013: ISOSettings,
- 0x0016: ImageBoundary,
- 0x0017: FlashExposureComp,
- 0x0018: FlashBracketComp,
- 0x0019: ExposureBracketComp,
- 0x001a: ImageProcessing,
- 0x001b: CropHiSpeed,
- 0x001c: ExposureTuning,
- 0x001d: SerialNumber,
- 0x001e: Nikon_ColorSpace,
- 0x001f: Nikon_VRInfo,
- 0x0020: ImageAuthentication,
- 0x0022: ActiveDLighting,
- 0x0023: Nikon_PictureControl,
- 0x0024: Nikon_WorldTime,
- 0x0025: Nikon_ISOInfo,
- 0x002a: VignetteControl,
- 0x0080: ImageAdjustment,
- 0x0081: ToneComp,
- 0x0082: AuxiliaryLens,
- 0x0083: LensType,
- 0x0084: Lens,
- 0x0085: FocusDistance,
- 0x0086: DigitalZoom,
- 0x0087: FlashMode,
- 0x0088: Nikon_AFInfo,
- 0x0089: ShootingMode,
- 0x008a: AutoBracketRelease,
- 0x008b: LensFStops,
- 0x008c: ContrastCurve,
- 0x008d: ColorHue,
- 0x008f: SceneMode,
- 0x0090: Nikon_LightSource,
- 0x0091: Nikon_ShotInfo,
- 0x0092: HueAdjustment,
- 0x0093: NEFCompression,
- 0x0094: Nikon_Saturation,
- 0x0095: NoiseReduction,
- 0x0096: LinearizationTable,
- 0x0097: Nikon_ColorBalance,
- 0x0098: Nikon_LensData,
- 0x0099: RawImageCenter,
- 0x009a: SensorPixelSize,
- 0x009b: Nikon3_0x009b,
- 0x009c: SceneAssist,
- 0x009e: RetouchHistory,
- 0x009f: Nikon3_0x009f,
- 0x00a0: Nikon_SerialNO,
- 0x00a2: ImageDataSize,
- 0x00a3: Nikon3_0x00a3,
- 0x00a5: ImageCount,
- 0x00a6: DeletedImageCount,
- 0x00a7: ShutterCount,
- 0x00a8: Nikon_FlashInfo,
- 0x00a9: ImageOptimization,
- 0x00aa: SaturationText,
- 0x00ab: VariProgram,
- 0x00ac: ImageStabilization,
- 0x00ad: AFResponse,
- 0x00b0: Nikon_MultiExposure,
- 0x00b1: HighISONoiseReduction,
- 0x00b3: ToningEffect,
- 0x00b7: Nikon_AFInfo2,
- 0x00b8: Nikon_FileInfo,
- 0x00b9: Nikon_AFTune,
- 0x0e00: PrintIM,
- 0x0e01: CaptureData,
- 0x0e09: CaptureVersion,
- 0x0e0e: CaptureOffsets,
- 0x0e10: ScanIFD,
- 0x0e1d: ICCProfile,
- 0x0e1e: CaptureOutput,
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/mknote/mknote.go b/vendor/github.com/rwcarlsen/goexif/mknote/mknote.go
deleted file mode 100644
index 1e6021621..000000000
--- a/vendor/github.com/rwcarlsen/goexif/mknote/mknote.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Package mknote provides makernote parsers that can be used with goexif/exif.
-package mknote
-
-import (
- "bytes"
-
- "github.com/rwcarlsen/goexif/exif"
- "github.com/rwcarlsen/goexif/tiff"
-)
-
-var (
- // Canon is an exif.Parser for canon makernote data.
- Canon = &canon{}
- // NikonV3 is an exif.Parser for nikon makernote data.
- NikonV3 = &nikonV3{}
- // All is a list of all available makernote parsers
- All = []exif.Parser{Canon, NikonV3}
-)
-
-type canon struct{}
-
-// Parse decodes all Canon makernote data found in x and adds it to x.
-func (_ *canon) Parse(x *exif.Exif) error {
- m, err := x.Get(exif.MakerNote)
- if err != nil {
- return nil
- }
-
- mk, err := x.Get(exif.Make)
- if err != nil {
- return nil
- }
-
- if val, err := mk.StringVal(); err != nil || val != "Canon" {
- return nil
- }
-
- // Canon notes are a single IFD directory with no header.
- // Reader offsets need to be w.r.t. the original tiff structure.
- buf := bytes.NewReader(append(make([]byte, m.ValOffset), m.Val...))
- buf.Seek(int64(m.ValOffset), 0)
-
- mkNotesDir, _, err := tiff.DecodeDir(buf, x.Tiff.Order)
- if err != nil {
- return err
- }
- x.LoadTags(mkNotesDir, makerNoteCanonFields, false)
- return nil
-}
-
-type nikonV3 struct{}
-
-// Parse decodes all Nikon makernote data found in x and adds it to x.
-func (_ *nikonV3) Parse(x *exif.Exif) error {
- m, err := x.Get(exif.MakerNote)
- if err != nil {
- return nil
- } else if bytes.Compare(m.Val[:6], []byte("Nikon\000")) != 0 {
- return nil
- }
-
- // Nikon v3 maker note is a self-contained IFD (offsets are relative
- // to the start of the maker note)
- mkNotes, err := tiff.Decode(bytes.NewReader(m.Val[10:]))
- if err != nil {
- return err
- }
- x.LoadTags(mkNotes.Dirs[0], makerNoteNikon3Fields, false)
- return nil
-}
diff --git a/vendor/github.com/rwcarlsen/goexif/tiff/tag.go b/vendor/github.com/rwcarlsen/goexif/tiff/tag.go
index 66b68e334..95d4b28b8 100644
--- a/vendor/github.com/rwcarlsen/goexif/tiff/tag.go
+++ b/vendor/github.com/rwcarlsen/goexif/tiff/tag.go
@@ -41,17 +41,17 @@ type DataType uint16
const (
DTByte DataType = 1
- DTAscii = 2
- DTShort = 3
- DTLong = 4
- DTRational = 5
- DTSByte = 6
- DTUndefined = 7
- DTSShort = 8
- DTSLong = 9
- DTSRational = 10
- DTFloat = 11
- DTDouble = 12
+ DTAscii DataType = 2
+ DTShort DataType = 3
+ DTLong DataType = 4
+ DTRational DataType = 5
+ DTSByte DataType = 6
+ DTUndefined DataType = 7
+ DTSShort DataType = 8
+ DTSLong DataType = 9
+ DTSRational DataType = 10
+ DTFloat DataType = 11
+ DTDouble DataType = 12
)
var typeNames = map[DataType]string{
diff --git a/vendor/github.com/rwcarlsen/goexif/tiff/tiff_test.go b/vendor/github.com/rwcarlsen/goexif/tiff/tiff_test.go
deleted file mode 100644
index 5db348dc8..000000000
--- a/vendor/github.com/rwcarlsen/goexif/tiff/tiff_test.go
+++ /dev/null
@@ -1,235 +0,0 @@
-package tiff
-
-import (
- "bytes"
- "encoding/binary"
- "encoding/hex"
- "flag"
- "os"
- "path/filepath"
- "testing"
-)
-
-var dataDir = flag.String("test_data_dir", ".", "Directory where the data files for testing are located")
-
-type input struct {
- tgId string
- tpe string
- nVals string
- offset string
- val string
-}
-
-type output struct {
- id uint16
- typ DataType
- count uint32
- val []byte
-}
-
-type tagTest struct {
- big input // big endian
- little input // little endian
- out output
-}
-
-///////////////////////////////////////////////
-//// Big endian Tests /////////////////////////
-///////////////////////////////////////////////
-var set1 = []tagTest{
- //////////// string type //////////////
- tagTest{
- // {"TgId", "TYPE", "N-VALUES", "OFFSET--", "VAL..."},
- input{"0003", "0002", "00000002", "11000000", ""},
- input{"0300", "0200", "02000000", "11000000", ""},
- output{0x0003, DataType(0x0002), 0x0002, []byte{0x11, 0x00}},
- },
- tagTest{
- input{"0001", "0002", "00000006", "00000012", "111213141516"},
- input{"0100", "0200", "06000000", "12000000", "111213141516"},
- output{0x0001, DataType(0x0002), 0x0006, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16}},
- },
- //////////// int (1-byte) type ////////////////
- tagTest{
- input{"0001", "0001", "00000001", "11000000", ""},
- input{"0100", "0100", "01000000", "11000000", ""},
- output{0x0001, DataType(0x0001), 0x0001, []byte{0x11}},
- },
- tagTest{
- input{"0001", "0001", "00000005", "00000010", "1112131415"},
- input{"0100", "0100", "05000000", "10000000", "1112131415"},
- output{0x0001, DataType(0x0001), 0x0005, []byte{0x11, 0x12, 0x13, 0x14, 0x15}},
- },
- tagTest{
- input{"0001", "0006", "00000001", "11000000", ""},
- input{"0100", "0600", "01000000", "11000000", ""},
- output{0x0001, DataType(0x0006), 0x0001, []byte{0x11}},
- },
- tagTest{
- input{"0001", "0006", "00000005", "00000010", "1112131415"},
- input{"0100", "0600", "05000000", "10000000", "1112131415"},
- output{0x0001, DataType(0x0006), 0x0005, []byte{0x11, 0x12, 0x13, 0x14, 0x15}},
- },
- //////////// int (2-byte) types ////////////////
- tagTest{
- input{"0001", "0003", "00000002", "11111212", ""},
- input{"0100", "0300", "02000000", "11111212", ""},
- output{0x0001, DataType(0x0003), 0x0002, []byte{0x11, 0x11, 0x12, 0x12}},
- },
- tagTest{
- input{"0001", "0003", "00000003", "00000010", "111213141516"},
- input{"0100", "0300", "03000000", "10000000", "111213141516"},
- output{0x0001, DataType(0x0003), 0x0003, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16}},
- },
- tagTest{
- input{"0001", "0008", "00000001", "11120000", ""},
- input{"0100", "0800", "01000000", "11120000", ""},
- output{0x0001, DataType(0x0008), 0x0001, []byte{0x11, 0x12}},
- },
- tagTest{
- input{"0001", "0008", "00000003", "00000100", "111213141516"},
- input{"0100", "0800", "03000000", "00100000", "111213141516"},
- output{0x0001, DataType(0x0008), 0x0003, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16}},
- },
- //////////// int (4-byte) types ////////////////
- tagTest{
- input{"0001", "0004", "00000001", "11121314", ""},
- input{"0100", "0400", "01000000", "11121314", ""},
- output{0x0001, DataType(0x0004), 0x0001, []byte{0x11, 0x12, 0x13, 0x14}},
- },
- tagTest{
- input{"0001", "0004", "00000002", "00000010", "1112131415161718"},
- input{"0100", "0400", "02000000", "10000000", "1112131415161718"},
- output{0x0001, DataType(0x0004), 0x0002, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}},
- },
- tagTest{
- input{"0001", "0009", "00000001", "11121314", ""},
- input{"0100", "0900", "01000000", "11121314", ""},
- output{0x0001, DataType(0x0009), 0x0001, []byte{0x11, 0x12, 0x13, 0x14}},
- },
- tagTest{
- input{"0001", "0009", "00000002", "00000011", "1112131415161819"},
- input{"0100", "0900", "02000000", "11000000", "1112131415161819"},
- output{0x0001, DataType(0x0009), 0x0002, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x18, 0x19}},
- },
- //////////// rational types ////////////////////
- tagTest{
- input{"0001", "0005", "00000001", "00000010", "1112131415161718"},
- input{"0100", "0500", "01000000", "10000000", "1112131415161718"},
- output{0x0001, DataType(0x0005), 0x0001, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}},
- },
- tagTest{
- input{"0001", "000A", "00000001", "00000011", "1112131415161819"},
- input{"0100", "0A00", "01000000", "11000000", "1112131415161819"},
- output{0x0001, DataType(0x000A), 0x0001, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x18, 0x19}},
- },
- //////////// float types ///////////////////////
- tagTest{
- input{"0001", "0005", "00000001", "00000010", "1112131415161718"},
- input{"0100", "0500", "01000000", "10000000", "1112131415161718"},
- output{0x0001, DataType(0x0005), 0x0001, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}},
- },
- tagTest{
- input{"0101", "000A", "00000001", "00000011", "1112131415161819"},
- input{"0101", "0A00", "01000000", "11000000", "1112131415161819"},
- output{0x0101, DataType(0x000A), 0x0001, []byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x18, 0x19}},
- },
-}
-
-func TestDecodeTag(t *testing.T) {
- for i, tst := range set1 {
- testSingle(t, binary.BigEndian, tst.big, tst.out, i)
- testSingle(t, binary.LittleEndian, tst.little, tst.out, i)
- }
-}
-
-func testSingle(t *testing.T, order binary.ByteOrder, in input, out output, i int) {
- data := buildInput(in, order)
- buf := bytes.NewReader(data)
- tg, err := DecodeTag(buf, order)
- if err != nil {
- t.Errorf("(%v) tag %v%+v decode failed: %v", order, i, in, err)
- return
- }
-
- if tg.Id != out.id {
- t.Errorf("(%v) tag %v id decode: expected %v, got %v", order, i, out.id, tg.Id)
- }
- if tg.Type != out.typ {
- t.Errorf("(%v) tag %v type decode: expected %v, got %v", order, i, out.typ, tg.Type)
- }
- if tg.Count != out.count {
- t.Errorf("(%v) tag %v component count decode: expected %v, got %v", order, i, out.count, tg.Count)
- }
- if !bytes.Equal(tg.Val, out.val) {
- t.Errorf("(%v) tag %v value decode: expected %v, got %v", order, i, out.val, tg.Val)
- }
-}
-
-// buildInputBig creates a byte-slice based on big-endian ordered input
-func buildInput(in input, order binary.ByteOrder) []byte {
- data := make([]byte, 0)
- d, _ := hex.DecodeString(in.tgId)
- data = append(data, d...)
- d, _ = hex.DecodeString(in.tpe)
- data = append(data, d...)
- d, _ = hex.DecodeString(in.nVals)
- data = append(data, d...)
- d, _ = hex.DecodeString(in.offset)
- data = append(data, d...)
-
- if in.val != "" {
- off := order.Uint32(d)
- for i := 0; i < int(off)-12; i++ {
- data = append(data, 0xFF)
- }
-
- d, _ = hex.DecodeString(in.val)
- data = append(data, d...)
- }
-
- return data
-}
-
-func TestDecode(t *testing.T) {
- name := filepath.Join(*dataDir, "sample1.tif")
- f, err := os.Open(name)
- if err != nil {
- t.Fatalf("%v\n", err)
- }
-
- tif, err := Decode(f)
- if err != nil {
- t.Fatal(err)
- }
-
- t.Log(tif)
-}
-
-func TestDecodeTag_blob(t *testing.T) {
- buf := bytes.NewReader(data())
- buf.Seek(10, 1)
- tg, err := DecodeTag(buf, binary.LittleEndian)
- if err != nil {
- t.Fatalf("tag decode failed: %v", err)
- }
-
- t.Logf("tag: %v+\n", tg)
- n, d, err := tg.Rat2(0)
- if err != nil {
- t.Fatalf("tag decoded wrong type: %v", err)
- }
- t.Logf("tag rat val: %v/%v\n", n, d)
-}
-
-func data() []byte {
- s1 := "49492A000800000002001A0105000100"
- s1 += "00002600000069870400010000001102"
- s1 += "0000000000004800000001000000"
-
- dat, err := hex.DecodeString(s1)
- if err != nil {
- panic("invalid string fixture")
- }
- return dat
-}
diff --git a/vendor/github.com/sean-/seed/init_test.go b/vendor/github.com/sean-/seed/init_test.go
deleted file mode 100644
index 4736061f7..000000000
--- a/vendor/github.com/sean-/seed/init_test.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package seed_test
-
-import (
- "testing"
-
- "github.com/sean-/seed"
-)
-
-func TestInit(t *testing.T) {
- secure, err := seed.Init()
- if !secure {
- t.Fatalf("Failed to securely seed: %v", err)
- }
-}
-
-func TestMustInit(t *testing.T) {
- seed.MustInit()
-
- if !seed.Seeded() {
- t.Fatalf("MustInit() failed to seed")
- }
-
- if !seed.Secure() {
- t.Fatalf("MustInit() failed to securely seed")
- }
-}
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/Godeps.json b/vendor/github.com/segmentio/analytics-go/Godeps/Godeps.json
deleted file mode 100644
index e1b79eb2d..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/Godeps.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "ImportPath": "github.com/segmentio/analytics-go",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/jehiah/go-strftime",
- "Rev": "834e15c05a45371503440cc195bbd05c9a0968d9"
- },
- {
- "ImportPath": "github.com/xtgo/uuid",
- "Rev": "a0b114877d4caeffbd7f87e3757c17fce570fea7"
- }
- ]
-}
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/Readme b/vendor/github.com/segmentio/analytics-go/Godeps/Readme
deleted file mode 100644
index 4cdaa53d5..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/.gitignore b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/.gitignore
deleted file mode 100644
index f037d684e..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/pkg
-/bin
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/.gitignore b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/.gitignore
deleted file mode 100644
index 00268614f..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/README.md b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/README.md
deleted file mode 100644
index 8eb240384..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-go-strftime
-===========
-
-go implementation of strftime \ No newline at end of file
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime.go b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime.go
deleted file mode 100644
index 99e26716f..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// go implementation of strftime
-package strftime
-
-import (
- "strings"
- "time"
-)
-
-// taken from time/format.go
-var conversion = map[rune]string {
- /*stdLongMonth */ 'B':"January",
- /*stdMonth */ 'b': "Jan",
- // stdNumMonth */ 'm': "1",
- /*stdZeroMonth */ 'm': "01",
- /*stdLongWeekDay */ 'A': "Monday",
- /*stdWeekDay */ 'a': "Mon",
- // stdDay */ 'd': "2",
- // stdUnderDay */ 'd': "_2",
- /*stdZeroDay */ 'd': "02",
- /*stdHour */ 'H': "15",
- // stdHour12 */ 'I': "3",
- /*stdZeroHour12 */ 'I': "03",
- // stdMinute */ 'M': "4",
- /*stdZeroMinute */ 'M': "04",
- // stdSecond */ 'S': "5",
- /*stdZeroSecond */ 'S': "05",
- /*stdLongYear */ 'Y': "2006",
- /*stdYear */ 'y': "06",
- /*stdPM */ 'p': "PM",
- // stdpm */ 'p': "pm",
- /*stdTZ */ 'Z': "MST",
- // stdISO8601TZ */ 'z': "Z0700", // prints Z for UTC
- // stdISO8601ColonTZ */ 'z': "Z07:00", // prints Z for UTC
- /*stdNumTZ */ 'z': "-0700", // always numeric
- // stdNumShortTZ */ 'b': "-07", // always numeric
- // stdNumColonTZ */ 'b': "-07:00", // always numeric
-}
-
-// This is an alternative to time.Format because no one knows
-// what date 040305 is supposed to create when used as a 'layout' string
-// this takes standard strftime format options. For a complete list
-// of format options see http://strftime.org/
-func Format(format string, t time.Time) string {
- retval := make([]byte, 0, len(format))
- for i, ni := 0, 0; i < len(format); i = ni + 2 {
- ni = strings.IndexByte(format[i:], '%')
- if ni < 0 {
- ni = len(format)
- } else {
- ni += i
- }
- retval = append(retval, []byte(format[i:ni])...)
- if ni + 1 < len(format) {
- c := format[ni + 1]
- if c == '%' {
- retval = append(retval, '%')
- } else {
- if layoutCmd, ok := conversion[rune(c)]; ok {
- retval = append(retval, []byte(t.Format(layoutCmd))...)
- } else {
- retval = append(retval, '%', c)
- }
- }
- } else {
- if ni < len(format) {
- retval = append(retval, '%')
- }
- }
- }
- return string(retval)
-}
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime_test.go b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime_test.go
deleted file mode 100644
index 45cbca345..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/jehiah/go-strftime/strftime_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package strftime
-
-import (
- "time"
- "fmt"
- "testing"
-)
-
-func ExampleFormat() {
- t := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- t = t.In(utc)
- fmt.Println(Format("%Y-%m-%d %H:%M:%S", t))
- // Output:
- // 2012-06-21 02:12:56
-}
-
-func TestNoLeadingPercentSign(t *testing.T) {
- tm := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- tm = tm.In(utc)
- result := Format("aaabbb0123456789%Y", tm)
- if result != "aaabbb01234567892012" {
- t.Logf("%s != %s", result, "aaabbb01234567892012")
- t.Fail()
- }
-}
-
-
-func TestUnsupported(t *testing.T) {
- tm := time.Unix(1340244776, 0)
- utc, _ := time.LoadLocation("UTC")
- tm = tm.In(utc)
- result := Format("%0%1%%%2", tm)
- if result != "%0%1%%2" {
- t.Logf("%s != %s", result, "%0%1%%2")
- t.Fail()
- }
-}
-
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid.go b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid.go
deleted file mode 100644
index a0fd7a5a5..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (c) 2012 The gocql Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package uuid can be used to generate and parse universally unique
-// identifiers, a standardized format in the form of a 128 bit number.
-//
-// http://tools.ietf.org/html/rfc4122
-package uuid
-
-import (
- "crypto/rand"
- "encoding/hex"
- "errors"
- "io"
- "net"
- "strconv"
- "time"
-)
-
-type UUID [16]byte
-
-var hardwareAddr []byte
-
-const (
- VariantNCSCompat = 0
- VariantIETF = 2
- VariantMicrosoft = 6
- VariantFuture = 7
-)
-
-func init() {
- if interfaces, err := net.Interfaces(); err == nil {
- for _, i := range interfaces {
- if i.Flags&net.FlagLoopback == 0 && len(i.HardwareAddr) > 0 {
- hardwareAddr = i.HardwareAddr
- break
- }
- }
- }
- if hardwareAddr == nil {
- // If we failed to obtain the MAC address of the current computer,
- // we will use a randomly generated 6 byte sequence instead and set
- // the multicast bit as recommended in RFC 4122.
- hardwareAddr = make([]byte, 6)
- _, err := io.ReadFull(rand.Reader, hardwareAddr)
- if err != nil {
- panic(err)
- }
- hardwareAddr[0] = hardwareAddr[0] | 0x01
- }
-}
-
-// Parse parses a 32 digit hexadecimal number (that might contain hyphens)
-// representing an UUID.
-func Parse(input string) (UUID, error) {
- var u UUID
- j := 0
- for i := 0; i < len(input); i++ {
- b := input[i]
- switch {
- default:
- fallthrough
- case j == 32:
- goto err
- case b == '-':
- continue
- case '0' <= b && b <= '9':
- b -= '0'
- case 'a' <= b && b <= 'f':
- b -= 'a' - 10
- case 'A' <= b && b <= 'F':
- b -= 'A' - 10
- }
- u[j/2] |= b << byte(^j&1<<2)
- j++
- }
- if j == 32 {
- return u, nil
- }
-err:
- return UUID{}, errors.New("invalid UUID " + strconv.Quote(input))
-}
-
-// FromBytes converts a raw byte slice to an UUID. It will panic if the slice
-// isn't exactly 16 bytes long.
-func FromBytes(input []byte) UUID {
- var u UUID
- if len(input) != 16 {
- panic("UUIDs must be exactly 16 bytes long")
- }
- copy(u[:], input)
- return u
-}
-
-// NewRandom generates a totally random UUID (version 4) as described in
-// RFC 4122.
-func NewRandom() UUID {
- var u UUID
- io.ReadFull(rand.Reader, u[:])
- u[6] &= 0x0F // clear version
- u[6] |= 0x40 // set version to 4 (random uuid)
- u[8] &= 0x3F // clear variant
- u[8] |= 0x80 // set to IETF variant
- return u
-}
-
-var timeBase = time.Date(1582, time.October, 15, 0, 0, 0, 0, time.UTC).Unix()
-
-// NewTime generates a new time based UUID (version 1) as described in RFC
-// 4122. This UUID contains the MAC address of the node that generated the
-// UUID, a timestamp and a sequence number.
-func NewTime() UUID {
- var u UUID
-
- now := time.Now().In(time.UTC)
- t := uint64(now.Unix()-timeBase)*10000000 + uint64(now.Nanosecond()/100)
- u[0], u[1], u[2], u[3] = byte(t>>24), byte(t>>16), byte(t>>8), byte(t)
- u[4], u[5] = byte(t>>40), byte(t>>32)
- u[6], u[7] = byte(t>>56)&0x0F, byte(t>>48)
-
- var clockSeq [2]byte
- io.ReadFull(rand.Reader, clockSeq[:])
- u[8] = clockSeq[1]
- u[9] = clockSeq[0]
-
- copy(u[10:], hardwareAddr)
-
- u[6] |= 0x10 // set version to 1 (time based uuid)
- u[8] &= 0x3F // clear variant
- u[8] |= 0x80 // set to IETF variant
-
- return u
-}
-
-// String returns the UUID in it's canonical form, a 32 digit hexadecimal
-// number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
-func (u UUID) String() string {
- buf := [36]byte{8: '-', 13: '-', 18: '-', 23: '-'}
- hex.Encode(buf[0:], u[0:4])
- hex.Encode(buf[9:], u[4:6])
- hex.Encode(buf[14:], u[6:8])
- hex.Encode(buf[19:], u[8:10])
- hex.Encode(buf[24:], u[10:])
- return string(buf[:])
-}
-
-// Bytes returns the raw byte slice for this UUID. A UUID is always 128 bits
-// (16 bytes) long.
-func (u UUID) Bytes() []byte {
- return u[:]
-}
-
-// Variant returns the variant of this UUID. This package will only generate
-// UUIDs in the IETF variant.
-func (u UUID) Variant() int {
- x := u[8]
- switch byte(0) {
- case x & 0x80:
- return VariantNCSCompat
- case x & 0x40:
- return VariantIETF
- case x & 0x20:
- return VariantMicrosoft
- }
- return VariantFuture
-}
-
-// Version extracts the version of this UUID variant. The RFC 4122 describes
-// five kinds of UUIDs.
-func (u UUID) Version() int {
- return int(u[6] & 0xF0 >> 4)
-}
-
-// Node extracts the MAC address of the node who generated this UUID. It will
-// return nil if the UUID is not a time based UUID (version 1).
-func (u UUID) Node() []byte {
- if u.Version() != 1 {
- return nil
- }
- return u[10:]
-}
-
-// Timestamp extracts the timestamp information from a time based UUID
-// (version 1).
-func (u UUID) Timestamp() uint64 {
- if u.Version() != 1 {
- return 0
- }
- return uint64(u[0])<<24 + uint64(u[1])<<16 + uint64(u[2])<<8 +
- uint64(u[3]) + uint64(u[4])<<40 + uint64(u[5])<<32 +
- uint64(u[7])<<48 + uint64(u[6]&0x0F)<<56
-}
-
-// Time is like Timestamp, except that it returns a time.Time.
-func (u UUID) Time() time.Time {
- t := u.Timestamp()
- if t == 0 {
- return time.Time{}
- }
- sec := t / 10000000
- nsec := t - sec
- return time.Unix(int64(sec)+timeBase, int64(nsec))
-}
diff --git a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid_test.go b/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid_test.go
deleted file mode 100644
index 3cef4a31a..000000000
--- a/vendor/github.com/segmentio/analytics-go/Godeps/_workspace/src/github.com/xtgo/uuid/uuid_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2012 The gocql Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "bytes"
- "testing"
-)
-
-func TestNil(t *testing.T) {
- var uuid UUID
- want, got := "00000000-0000-0000-0000-000000000000", uuid.String()
- if want != got {
- t.Fatalf("TestNil: expected %q got %q", want, got)
- }
-}
-
-var tests = []struct {
- input string
- variant int
- version int
-}{
- {"b4f00409-cef8-4822-802c-deb20704c365", VariantIETF, 4},
- {"f81d4fae-7dec-11d0-a765-00a0c91e6bf6", VariantIETF, 1},
- {"00000000-7dec-11d0-a765-00a0c91e6bf6", VariantIETF, 1},
- {"3051a8d7-aea7-1801-e0bf-bc539dd60cf3", VariantFuture, 1},
- {"3051a8d7-aea7-2801-e0bf-bc539dd60cf3", VariantFuture, 2},
- {"3051a8d7-aea7-3801-e0bf-bc539dd60cf3", VariantFuture, 3},
- {"3051a8d7-aea7-4801-e0bf-bc539dd60cf3", VariantFuture, 4},
- {"3051a8d7-aea7-3801-e0bf-bc539dd60cf3", VariantFuture, 5},
- {"d0e817e1-e4b1-1801-3fe6-b4b60ccecf9d", VariantNCSCompat, 0},
- {"d0e817e1-e4b1-1801-bfe6-b4b60ccecf9d", VariantIETF, 1},
- {"d0e817e1-e4b1-1801-dfe6-b4b60ccecf9d", VariantMicrosoft, 0},
- {"d0e817e1-e4b1-1801-ffe6-b4b60ccecf9d", VariantFuture, 0},
-}
-
-func TestPredefined(t *testing.T) {
- for i := range tests {
- uuid, err := Parse(tests[i].input)
- if err != nil {
- t.Errorf("Parse #%d: %v", i, err)
- continue
- }
-
- if str := uuid.String(); str != tests[i].input {
- t.Errorf("String #%d: expected %q got %q", i, tests[i].input, str)
- continue
- }
-
- if variant := uuid.Variant(); variant != tests[i].variant {
- t.Errorf("Variant #%d: expected %d got %d", i, tests[i].variant, variant)
- }
-
- if tests[i].variant == VariantIETF {
- if version := uuid.Version(); version != tests[i].version {
- t.Errorf("Version #%d: expected %d got %d", i, tests[i].version, version)
- }
- }
- }
-}
-
-func TestNewRandom(t *testing.T) {
- for i := 0; i < 20; i++ {
- uuid := NewRandom()
-
- if variant := uuid.Variant(); variant != VariantIETF {
- t.Errorf("wrong variant. expected %d got %d", VariantIETF, variant)
- }
- if version := uuid.Version(); version != 4 {
- t.Errorf("wrong version. expected %d got %d", 4, version)
- }
- }
-}
-
-func TestNewTime(t *testing.T) {
- var node []byte
- timestamp := uint64(0)
- for i := 0; i < 20; i++ {
- uuid := NewTime()
-
- if variant := uuid.Variant(); variant != VariantIETF {
- t.Errorf("wrong variant. expected %d got %d", VariantIETF, variant)
- }
- if version := uuid.Version(); version != 1 {
- t.Errorf("wrong version. expected %d got %d", 1, version)
- }
-
- if n := uuid.Node(); !bytes.Equal(n, node) && i > 0 {
- t.Errorf("wrong node. expected %x, got %x", node, n)
- } else if i == 0 {
- node = n
- }
-
- ts := uuid.Timestamp()
- if ts < timestamp {
- t.Errorf("timestamps must grow")
- }
- timestamp = ts
- }
-}
diff --git a/vendor/github.com/segmentio/analytics-go/analytics_test.go b/vendor/github.com/segmentio/analytics-go/analytics_test.go
deleted file mode 100644
index c6f0dc4f2..000000000
--- a/vendor/github.com/segmentio/analytics-go/analytics_test.go
+++ /dev/null
@@ -1,478 +0,0 @@
-package analytics
-
-import "net/http/httptest"
-import "encoding/json"
-import "net/http"
-import "testing"
-import "bytes"
-import "time"
-import "fmt"
-import "io"
-
-func mockId() string { return "I'm unique" }
-
-func mockTime() time.Time {
- // time.Unix(0, 0) fails on Circle
- return time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
-}
-
-func mockServer() (chan []byte, *httptest.Server) {
- done := make(chan []byte, 1)
-
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- buf := bytes.NewBuffer(nil)
- io.Copy(buf, r.Body)
-
- var v interface{}
- err := json.Unmarshal(buf.Bytes(), &v)
- if err != nil {
- panic(err)
- }
-
- b, err := json.MarshalIndent(v, "", " ")
- if err != nil {
- panic(err)
- }
-
- done <- b
- }))
-
- return done, server
-}
-
-func ExampleTrack() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 1
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- })
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleClose() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- })
-
- client.Close()
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleInterval() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- })
-
- // Will flush in 5 seconds (default interval).
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleTrackWithTimestampSet() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 1
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- Message: Message{
- Timestamp: timestamp(time.Date(2015, time.July, 10, 23, 0, 0, 0, time.UTC)),
- },
- })
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2015-07-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleTrackWithMessageIdSet() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 1
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- Message: Message{
- MessageId: "abc",
- },
- })
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "abc",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleTrack_context() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 1
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- Context: map[string]interface{}{
- "whatever": "here",
- },
- })
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "context": {
- // "whatever": "here"
- // },
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleTrack_many() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 3
-
- for i := 0; i < 5; i++ {
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": i,
- },
- })
- }
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "version": 0
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // },
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "version": 1
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // },
- // {
- // "event": "Download",
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "version": 2
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-func ExampleTrackWithIntegrations() {
- body, server := mockServer()
- defer server.Close()
-
- client := New("h97jamjwbh")
- client.Endpoint = server.URL
- client.now = mockTime
- client.uid = mockId
- client.Size = 1
-
- client.Track(&Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- Integrations: map[string]interface{}{
- "All": true,
- "Intercom": false,
- "Mixpanel": true,
- },
- })
-
- fmt.Printf("%s\n", <-body)
- // Output:
- // {
- // "batch": [
- // {
- // "event": "Download",
- // "integrations": {
- // "All": true,
- // "Intercom": false,
- // "Mixpanel": true
- // },
- // "messageId": "I'm unique",
- // "properties": {
- // "application": "Segment Desktop",
- // "platform": "osx",
- // "version": "1.1.0"
- // },
- // "timestamp": "2009-11-10T23:00:00+0000",
- // "type": "track",
- // "userId": "123456"
- // }
- // ],
- // "context": {
- // "library": {
- // "name": "analytics-go",
- // "version": "2.1.0"
- // }
- // },
- // "messageId": "I'm unique",
- // "sentAt": "2009-11-10T23:00:00+0000"
- // }
-}
-
-// Tests that calling Close right after creating the client object doesn't
-// block.
-// Bug: https://github.com/segmentio/analytics-go/issues/43
-func TestCloseFinish(_ *testing.T) {
- c := New("test")
- c.Close()
-}
diff --git a/vendor/github.com/segmentio/analytics-go/examples/track.go b/vendor/github.com/segmentio/analytics-go/examples/track.go
deleted file mode 100644
index 484c38efa..000000000
--- a/vendor/github.com/segmentio/analytics-go/examples/track.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package main
-
-import "github.com/segmentio/analytics-go"
-import "time"
-
-func main() {
- client := analytics.New("h97jamjwbh")
- client.Interval = 30 * time.Second
- client.Size = 100
- client.Verbose = true
-
- done := time.After(3 * time.Second)
- tick := time.Tick(50 * time.Millisecond)
-
-out:
- for {
- select {
- case <-done:
- println("exiting")
- break out
- case <-tick:
- client.Track(&analytics.Track{
- Event: "Download",
- UserId: "123456",
- Properties: map[string]interface{}{
- "application": "Segment Desktop",
- "version": "1.1.0",
- "platform": "osx",
- },
- })
- }
- }
-
- println("flushing")
- client.Close()
-}
diff --git a/vendor/github.com/segmentio/backo-go/backo_test.go b/vendor/github.com/segmentio/backo-go/backo_test.go
deleted file mode 100644
index 89933acf7..000000000
--- a/vendor/github.com/segmentio/backo-go/backo_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package backo
-
-import (
- "fmt"
- "math"
- "testing"
- "time"
-
- "github.com/bmizerany/assert"
-)
-
-// Tests default backo behaviour.
-func TestDefaults(t *testing.T) {
- backo := DefaultBacko()
-
- assert.Equal(t, milliseconds(100), backo.Duration(0))
- assert.Equal(t, milliseconds(200), backo.Duration(1))
- assert.Equal(t, milliseconds(400), backo.Duration(2))
- assert.Equal(t, milliseconds(800), backo.Duration(3))
-}
-
-// Tests backo does not exceed cap.
-func TestCap(t *testing.T) {
- backo := NewBacko(milliseconds(100), 2, 0, milliseconds(600))
-
- assert.Equal(t, milliseconds(100), backo.Duration(0))
- assert.Equal(t, milliseconds(200), backo.Duration(1))
- assert.Equal(t, milliseconds(400), backo.Duration(2))
- assert.Equal(t, milliseconds(600), backo.Duration(3))
-}
-
-// Tests that jitter adds randomness.
-func TestJitter(t *testing.T) {
- defaultBacko := NewBacko(milliseconds(100), 2, 1, milliseconds(10*1000))
- jitterBacko := NewBacko(milliseconds(100), 2, 1, milliseconds(10*1000))
-
- // TODO: Check jittered durations are within a range.
- assert.NotEqual(t, jitterBacko.Duration(0), defaultBacko.Duration(0))
- assert.NotEqual(t, jitterBacko.Duration(1), defaultBacko.Duration(1))
- assert.NotEqual(t, jitterBacko.Duration(2), defaultBacko.Duration(2))
- assert.NotEqual(t, jitterBacko.Duration(3), defaultBacko.Duration(3))
-}
-
-func ExampleBacko_BackoffDefault() {
- b := DefaultBacko()
- ticker := b.NewTicker()
-
- for i := 0; i < 6; i++ {
- start := time.Now()
- select {
- case t := <-ticker.C:
- fmt.Println(nearest10Millis(t.Sub(start)))
- }
- }
-
- ticker.Stop()
-
- // Output:
- // 100
- // 200
- // 400
- // 800
- // 1600
- // 3200
-}
-
-func nearest10Millis(d time.Duration) float64 {
- // Typically d is something like 11 or 21, so do some magic to round the
- // durations to the nearest 10. We divide d by 10, floor it, and multiply it
- // by 10 again.
- return math.Floor(float64(d/time.Millisecond/10) * 10)
-}
-
-// Returns the given milliseconds as time.Duration
-func milliseconds(ms int64) time.Duration {
- return time.Duration(ms * 1000 * 1000)
-}
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/.gitignore b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/.gitignore
deleted file mode 100644
index b6fadf4eb..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-_go_.*
-_gotest_.*
-_obj
-_test
-_testmain.go
-*.out
-*.[568]
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/README.md b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/README.md
deleted file mode 100644
index 8b6b6fc4f..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Assert (c) Blake Mizerany and Keith Rarick -- MIT LICENCE
-
-## Assertions for Go tests
-
-## Install
-
- $ go get github.com/bmizerany/assert
-
-## Use
-
-**point.go**
-
- package point
-
- type Point struct {
- x, y int
- }
-
-**point_test.go**
-
-
- package point
-
- import (
- "testing"
- "github.com/bmizerany/assert"
- )
-
- func TestAsserts(t *testing.T) {
- p1 := Point{1, 1}
- p2 := Point{2, 1}
-
- assert.Equal(t, p1, p2)
- }
-
-**output**
- $ go test
- --- FAIL: TestAsserts (0.00 seconds)
- assert.go:15: /Users/flavio.barbosa/dev/stewie/src/point_test.go:12
- assert.go:24: ! X: 1 != 2
- FAIL
-
-## Docs
-
- http://github.com/bmizerany/assert
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert.go b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert.go
deleted file mode 100644
index 7409f985e..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package assert
-// Testing helpers for doozer.
-
-import (
- "github.com/kr/pretty"
- "reflect"
- "testing"
- "runtime"
- "fmt"
-)
-
-func assert(t *testing.T, result bool, f func(), cd int) {
- if !result {
- _, file, line, _ := runtime.Caller(cd + 1)
- t.Errorf("%s:%d", file, line)
- f()
- t.FailNow()
- }
-}
-
-func equal(t *testing.T, exp, got interface{}, cd int, args ...interface{}) {
- fn := func() {
- for _, desc := range pretty.Diff(exp, got) {
- t.Error("!", desc)
- }
- if len(args) > 0 {
- t.Error("!", " -", fmt.Sprint(args...))
- }
- }
- result := reflect.DeepEqual(exp, got)
- assert(t, result, fn, cd+1)
-}
-
-func tt(t *testing.T, result bool, cd int, args ...interface{}) {
- fn := func() {
- t.Errorf("! Failure")
- if len(args) > 0 {
- t.Error("!", " -", fmt.Sprint(args...))
- }
- }
- assert(t, result, fn, cd+1)
-}
-
-func T(t *testing.T, result bool, args ...interface{}) {
- tt(t, result, 1, args...)
-}
-
-func Tf(t *testing.T, result bool, format string, args ...interface{}) {
- tt(t, result, 1, fmt.Sprintf(format, args...))
-}
-
-func Equal(t *testing.T, exp, got interface{}, args ...interface{}) {
- equal(t, exp, got, 1, args...)
-}
-
-func Equalf(t *testing.T, exp, got interface{}, format string, args ...interface{}) {
- equal(t, exp, got, 1, fmt.Sprintf(format, args...))
-}
-
-func NotEqual(t *testing.T, exp, got interface{}, args ...interface{}) {
- fn := func() {
- t.Errorf("! Unexpected: <%#v>", exp)
- if len(args) > 0 {
- t.Error("!", " -", fmt.Sprint(args...))
- }
- }
- result := !reflect.DeepEqual(exp, got)
- assert(t, result, fn, 1)
-}
-
-func Panic(t *testing.T, err interface{}, fn func()) {
- defer func() {
- equal(t, err, recover(), 3)
- }()
- fn()
-}
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert_test.go b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert_test.go
deleted file mode 100644
index 162a590c6..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/assert_test.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package assert
-
-import (
- "testing"
-)
-
-func TestLineNumbers(t *testing.T) {
- Equal(t, "foo", "foo", "msg!")
- //Equal(t, "foo", "bar", "this should blow up")
-}
-
-func TestNotEqual(t *testing.T) {
- NotEqual(t, "foo", "bar", "msg!")
- //NotEqual(t, "foo", "foo", "this should blow up")
-}
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point.go b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point.go
deleted file mode 100644
index 15789fe10..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package point
-
-type Point struct {
- X, Y int
-}
diff --git a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point_test.go b/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point_test.go
deleted file mode 100644
index 34e791a43..000000000
--- a/vendor/github.com/segmentio/backo-go/vendor/github.com/bmizerany/assert/example/point_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package point
-
-import (
- "testing"
- "assert"
-)
-
-func TestAsserts(t *testing.T) {
- p1 := Point{1, 1}
- p2 := Point{2, 1}
-
- assert.Equal(t, p1, p2)
-}
diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore
new file mode 100644
index 000000000..66be63a00
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/.gitignore
@@ -0,0 +1 @@
+logrus
diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml
new file mode 100644
index 000000000..a23296a53
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/.travis.yml
@@ -0,0 +1,15 @@
+language: go
+go:
+ - 1.6.x
+ - 1.7.x
+ - 1.8.x
+ - tip
+env:
+ - GOMAXPROCS=4 GORACE=halt_on_error=1
+install:
+ - go get github.com/stretchr/testify/assert
+ - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2
+ - go get golang.org/x/sys/unix
+ - go get golang.org/x/sys/windows
+script:
+ - go test -race -v ./...
diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
new file mode 100644
index 000000000..1bd1deb29
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
@@ -0,0 +1,123 @@
+# 1.0.5
+
+* Fix hooks race (#707)
+* Fix panic deadlock (#695)
+
+# 1.0.4
+
+* Fix race when adding hooks (#612)
+* Fix terminal check in AppEngine (#635)
+
+# 1.0.3
+
+* Replace example files with testable examples
+
+# 1.0.2
+
+* bug: quote non-string values in text formatter (#583)
+* Make (*Logger) SetLevel a public method
+
+# 1.0.1
+
+* bug: fix escaping in text formatter (#575)
+
+# 1.0.0
+
+* Officially changed name to lower-case
+* bug: colors on Windows 10 (#541)
+* bug: fix race in accessing level (#512)
+
+# 0.11.5
+
+* feature: add writer and writerlevel to entry (#372)
+
+# 0.11.4
+
+* bug: fix undefined variable on solaris (#493)
+
+# 0.11.3
+
+* formatter: configure quoting of empty values (#484)
+* formatter: configure quoting character (default is `"`) (#484)
+* bug: fix not importing io correctly in non-linux environments (#481)
+
+# 0.11.2
+
+* bug: fix windows terminal detection (#476)
+
+# 0.11.1
+
+* bug: fix tty detection with custom out (#471)
+
+# 0.11.0
+
+* performance: Use bufferpool to allocate (#370)
+* terminal: terminal detection for app-engine (#343)
+* feature: exit handler (#375)
+
+# 0.10.0
+
+* feature: Add a test hook (#180)
+* feature: `ParseLevel` is now case-insensitive (#326)
+* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308)
+* performance: avoid re-allocations on `WithFields` (#335)
+
+# 0.9.0
+
+* logrus/text_formatter: don't emit empty msg
+* logrus/hooks/airbrake: move out of main repository
+* logrus/hooks/sentry: move out of main repository
+* logrus/hooks/papertrail: move out of main repository
+* logrus/hooks/bugsnag: move out of main repository
+* logrus/core: run tests with `-race`
+* logrus/core: detect TTY based on `stderr`
+* logrus/core: support `WithError` on logger
+* logrus/core: Solaris support
+
+# 0.8.7
+
+* logrus/core: fix possible race (#216)
+* logrus/doc: small typo fixes and doc improvements
+
+
+# 0.8.6
+
+* hooks/raven: allow passing an initialized client
+
+# 0.8.5
+
+* logrus/core: revert #208
+
+# 0.8.4
+
+* formatter/text: fix data race (#218)
+
+# 0.8.3
+
+* logrus/core: fix entry log level (#208)
+* logrus/core: improve performance of text formatter by 40%
+* logrus/core: expose `LevelHooks` type
+* logrus/core: add support for DragonflyBSD and NetBSD
+* formatter/text: print structs more verbosely
+
+# 0.8.2
+
+* logrus: fix more Fatal family functions
+
+# 0.8.1
+
+* logrus: fix not exiting on `Fatalf` and `Fatalln`
+
+# 0.8.0
+
+* logrus: defaults to stderr instead of stdout
+* hooks/sentry: add special field for `*http.Request`
+* formatter/text: ignore Windows for colors
+
+# 0.7.3
+
+* formatter/\*: allow configuration of timestamp layout
+
+# 0.7.2
+
+* formatter/text: Add configuration option for time format (#158)
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md b/vendor/github.com/sirupsen/logrus/LICENSE
index 229851590..f090cb42f 100644
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md
+++ b/vendor/github.com/sirupsen/logrus/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014 Mitchell Hashimoto
+Copyright (c) 2014 Simon Eskildsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md
new file mode 100644
index 000000000..f77819b16
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/README.md
@@ -0,0 +1,511 @@
+# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/>&nbsp;[![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus)&nbsp;[![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus)
+
+Logrus is a structured logger for Go (golang), completely API compatible with
+the standard library logger.
+
+**Seeing weird case-sensitive problems?** It's in the past been possible to
+import Logrus as both upper- and lower-case. Due to the Go package environment,
+this caused issues in the community and we needed a standard. Some environments
+experienced problems with the upper-case variant, so the lower-case was decided.
+Everything using `logrus` will need to use the lower-case:
+`github.com/sirupsen/logrus`. Any package that isn't, should be changed.
+
+To fix Glide, see [these
+comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437).
+For an in-depth explanation of the casing issue, see [this
+comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276).
+
+**Are you interested in assisting in maintaining Logrus?** Currently I have a
+lot of obligations, and I am unable to provide Logrus with the maintainership it
+needs. If you'd like to help, please reach out to me at `simon at author's
+username dot com`.
+
+Nicely color-coded in development (when a TTY is attached, otherwise just
+plain text):
+
+![Colored](http://i.imgur.com/PY7qMwd.png)
+
+With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
+or Splunk:
+
+```json
+{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
+ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
+
+{"level":"warning","msg":"The group's number increased tremendously!",
+"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
+
+{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
+"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
+
+{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
+"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
+
+{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
+"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
+```
+
+With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not
+attached, the output is compatible with the
+[logfmt](http://godoc.org/github.com/kr/logfmt) format:
+
+```text
+time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
+time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
+time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
+time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
+time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
+time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
+exit status 1
+```
+
+#### Case-sensitivity
+
+The organization's name was changed to lower-case--and this will not be changed
+back. If you are getting import conflicts due to case sensitivity, please use
+the lower-case import: `github.com/sirupsen/logrus`.
+
+#### Example
+
+The simplest way to use Logrus is simply the package-level exported logger:
+
+```go
+package main
+
+import (
+ log "github.com/sirupsen/logrus"
+)
+
+func main() {
+ log.WithFields(log.Fields{
+ "animal": "walrus",
+ }).Info("A walrus appears")
+}
+```
+
+Note that it's completely api-compatible with the stdlib logger, so you can
+replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"`
+and you'll now have the flexibility of Logrus. You can customize it all you
+want:
+
+```go
+package main
+
+import (
+ "os"
+ log "github.com/sirupsen/logrus"
+)
+
+func init() {
+ // Log as JSON instead of the default ASCII formatter.
+ log.SetFormatter(&log.JSONFormatter{})
+
+ // Output to stdout instead of the default stderr
+ // Can be any io.Writer, see below for File example
+ log.SetOutput(os.Stdout)
+
+ // Only log the warning severity or above.
+ log.SetLevel(log.WarnLevel)
+}
+
+func main() {
+ log.WithFields(log.Fields{
+ "animal": "walrus",
+ "size": 10,
+ }).Info("A group of walrus emerges from the ocean")
+
+ log.WithFields(log.Fields{
+ "omg": true,
+ "number": 122,
+ }).Warn("The group's number increased tremendously!")
+
+ log.WithFields(log.Fields{
+ "omg": true,
+ "number": 100,
+ }).Fatal("The ice breaks!")
+
+ // A common pattern is to re-use fields between logging statements by re-using
+ // the logrus.Entry returned from WithFields()
+ contextLogger := log.WithFields(log.Fields{
+ "common": "this is a common field",
+ "other": "I also should be logged always",
+ })
+
+ contextLogger.Info("I'll be logged with common and other field")
+ contextLogger.Info("Me too")
+}
+```
+
+For more advanced usage such as logging to multiple locations from the same
+application, you can also create an instance of the `logrus` Logger:
+
+```go
+package main
+
+import (
+ "os"
+ "github.com/sirupsen/logrus"
+)
+
+// Create a new instance of the logger. You can have any number of instances.
+var log = logrus.New()
+
+func main() {
+ // The API for setting attributes is a little different than the package level
+ // exported logger. See Godoc.
+ log.Out = os.Stdout
+
+ // You could set this to any `io.Writer` such as a file
+ // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
+ // if err == nil {
+ // log.Out = file
+ // } else {
+ // log.Info("Failed to log to file, using default stderr")
+ // }
+
+ log.WithFields(logrus.Fields{
+ "animal": "walrus",
+ "size": 10,
+ }).Info("A group of walrus emerges from the ocean")
+}
+```
+
+#### Fields
+
+Logrus encourages careful, structured logging through logging fields instead of
+long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
+to send event %s to topic %s with key %d")`, you should log the much more
+discoverable:
+
+```go
+log.WithFields(log.Fields{
+ "event": event,
+ "topic": topic,
+ "key": key,
+}).Fatal("Failed to send event")
+```
+
+We've found this API forces you to think about logging in a way that produces
+much more useful logging messages. We've been in countless situations where just
+a single added field to a log statement that was already there would've saved us
+hours. The `WithFields` call is optional.
+
+In general, with Logrus using any of the `printf`-family functions should be
+seen as a hint you should add a field, however, you can still use the
+`printf`-family functions with Logrus.
+
+#### Default Fields
+
+Often it's helpful to have fields _always_ attached to log statements in an
+application or parts of one. For example, you may want to always log the
+`request_id` and `user_ip` in the context of a request. Instead of writing
+`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on
+every line, you can create a `logrus.Entry` to pass around instead:
+
+```go
+requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})
+requestLogger.Info("something happened on that request") # will log request_id and user_ip
+requestLogger.Warn("something not great happened")
+```
+
+#### Hooks
+
+You can add hooks for logging levels. For example to send errors to an exception
+tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
+multiple places simultaneously, e.g. syslog.
+
+Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
+`init`:
+
+```go
+import (
+ log "github.com/sirupsen/logrus"
+ "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "airbrake"
+ logrus_syslog "github.com/sirupsen/logrus/hooks/syslog"
+ "log/syslog"
+)
+
+func init() {
+
+ // Use the Airbrake hook to report errors that have Error severity or above to
+ // an exception tracker. You can create custom hooks, see the Hooks section.
+ log.AddHook(airbrake.NewHook(123, "xyz", "production"))
+
+ hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
+ if err != nil {
+ log.Error("Unable to connect to local syslog daemon")
+ } else {
+ log.AddHook(hook)
+ }
+}
+```
+Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
+
+| Hook | Description |
+| ----- | ----------- |
+| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
+| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
+| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) |
+| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) |
+| [Application Insights](https://github.com/jjcollinge/logrus-appinsights) | Hook for logging to [Application Insights](https://azure.microsoft.com/en-us/services/application-insights/)
+| [AzureTableHook](https://github.com/kpfaulkner/azuretablehook/) | Hook for logging to Azure Table Storage|
+| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
+| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic |
+| [Discordrus](https://github.com/kz/discordrus) | Hook for logging to [Discord](https://discordapp.com/) |
+| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch|
+| [Firehose](https://github.com/beaubrewer/logrus_firehose) | Hook for logging to [Amazon Firehose](https://aws.amazon.com/kinesis/firehose/)
+| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
+| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) |
+| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) |
+| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
+| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
+| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb |
+| [Influxus](http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB](http://influxdata.com/) |
+| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
+| [KafkaLogrus](https://github.com/tracer0tong/kafkalogrus) | Hook for logging to Kafka |
+| [Kafka REST Proxy](https://github.com/Nordstrom/logrus-kafka-rest-proxy) | Hook for logging to [Kafka REST Proxy](https://docs.confluent.io/current/kafka-rest/docs) |
+| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
+| [Logbeat](https://github.com/macandmia/logbeat) | Hook for logging to [Opbeat](https://opbeat.com/) |
+| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) |
+| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) |
+| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) |
+| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
+| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) |
+| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
+| [Mattermost](https://github.com/shuLhan/mattermost-integration/tree/master/hooks/logrus) | Hook for logging to [Mattermost](https://mattermost.com/) |
+| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
+| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) |
+| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit |
+| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. |
+| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) |
+| [Promrus](https://github.com/weaveworks/promrus) | Expose number of log messages as [Prometheus](https://prometheus.io/) metrics |
+| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) |
+| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
+| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) |
+| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
+| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)|
+| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. |
+| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
+| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) |
+| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)|
+| [Syslog](https://github.com/sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
+| [Syslog TLS](https://github.com/shinji62/logrus-syslog-ng) | Send errors to remote syslog server with TLS support. |
+| [Telegram](https://github.com/rossmcdonald/telegram_hook) | Hook for logging errors to [Telegram](https://telegram.org/) |
+| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) |
+| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) |
+| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash |
+| [SQS-Hook](https://github.com/tsarpaul/logrus_sqs) | Hook for logging to [Amazon Simple Queue Service (SQS)](https://aws.amazon.com/sqs/) |
+
+#### Level logging
+
+Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
+
+```go
+log.Debug("Useful debugging information.")
+log.Info("Something noteworthy happened!")
+log.Warn("You should probably take a look at this.")
+log.Error("Something failed but I'm not quitting.")
+// Calls os.Exit(1) after logging
+log.Fatal("Bye.")
+// Calls panic() after logging
+log.Panic("I'm bailing.")
+```
+
+You can set the logging level on a `Logger`, then it will only log entries with
+that severity or anything above it:
+
+```go
+// Will log anything that is info or above (warn, error, fatal, panic). Default.
+log.SetLevel(log.InfoLevel)
+```
+
+It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
+environment if your application has that.
+
+#### Entries
+
+Besides the fields added with `WithField` or `WithFields` some fields are
+automatically added to all logging events:
+
+1. `time`. The timestamp when the entry was created.
+2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
+ the `AddFields` call. E.g. `Failed to send event.`
+3. `level`. The logging level. E.g. `info`.
+
+#### Environments
+
+Logrus has no notion of environment.
+
+If you wish for hooks and formatters to only be used in specific environments,
+you should handle that yourself. For example, if your application has a global
+variable `Environment`, which is a string representation of the environment you
+could do:
+
+```go
+import (
+ log "github.com/sirupsen/logrus"
+)
+
+init() {
+ // do something here to set environment depending on an environment variable
+ // or command-line flag
+ if Environment == "production" {
+ log.SetFormatter(&log.JSONFormatter{})
+ } else {
+ // The TextFormatter is default, you don't actually have to do this.
+ log.SetFormatter(&log.TextFormatter{})
+ }
+}
+```
+
+This configuration is how `logrus` was intended to be used, but JSON in
+production is mostly only useful if you do log aggregation with tools like
+Splunk or Logstash.
+
+#### Formatters
+
+The built-in logging formatters are:
+
+* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
+ without colors.
+ * *Note:* to force colored output when there is no TTY, set the `ForceColors`
+ field to `true`. To force no colored output even if there is a TTY set the
+ `DisableColors` field to `true`. For Windows, see
+ [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable).
+ * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter).
+* `logrus.JSONFormatter`. Logs fields as JSON.
+ * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter).
+
+Third party logging formatters:
+
+* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can be parsed by Kubernetes and Google Container Engine.
+* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
+* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
+* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ÅÌ Í•Í–ÌšfÌÍÌ  ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗lÍ–ÍŽg̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
+
+You can define your formatter by implementing the `Formatter` interface,
+requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
+`Fields` type (`map[string]interface{}`) with all your fields as well as the
+default ones (see Entries section above):
+
+```go
+type MyJSONFormatter struct {
+}
+
+log.SetFormatter(new(MyJSONFormatter))
+
+func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
+ // Note this doesn't include Time, Level and Message which are available on
+ // the Entry. Consult `godoc` on information about those fields or read the
+ // source of the official loggers.
+ serialized, err := json.Marshal(entry.Data)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
+ }
+ return append(serialized, '\n'), nil
+}
+```
+
+#### Logger as an `io.Writer`
+
+Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
+
+```go
+w := logger.Writer()
+defer w.Close()
+
+srv := http.Server{
+ // create a stdlib log.Logger that writes to
+ // logrus.Logger.
+ ErrorLog: log.New(w, "", 0),
+}
+```
+
+Each line written to that writer will be printed the usual way, using formatters
+and hooks. The level for those entries is `info`.
+
+This means that we can override the standard library logger easily:
+
+```go
+logger := logrus.New()
+logger.Formatter = &logrus.JSONFormatter{}
+
+// Use logrus for standard log output
+// Note that `log` here references stdlib's log
+// Not logrus imported under the name `log`.
+log.SetOutput(logger.Writer())
+```
+
+#### Rotation
+
+Log rotation is not provided with Logrus. Log rotation should be done by an
+external program (like `logrotate(8)`) that can compress and delete old log
+entries. It should not be a feature of the application-level logger.
+
+#### Tools
+
+| Tool | Description |
+| ---- | ----------- |
+|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
+|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) |
+
+#### Testing
+
+Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides:
+
+* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook
+* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any):
+
+```go
+import(
+ "github.com/sirupsen/logrus"
+ "github.com/sirupsen/logrus/hooks/test"
+ "github.com/stretchr/testify/assert"
+ "testing"
+)
+
+func TestSomething(t*testing.T){
+ logger, hook := test.NewNullLogger()
+ logger.Error("Helloerror")
+
+ assert.Equal(t, 1, len(hook.Entries))
+ assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level)
+ assert.Equal(t, "Helloerror", hook.LastEntry().Message)
+
+ hook.Reset()
+ assert.Nil(t, hook.LastEntry())
+}
+```
+
+#### Fatal handlers
+
+Logrus can register one or more functions that will be called when any `fatal`
+level message is logged. The registered handlers will be executed before
+logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need
+to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted.
+
+```
+...
+handler := func() {
+ // gracefully shutdown something...
+}
+logrus.RegisterExitHandler(handler)
+...
+```
+
+#### Thread safety
+
+By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs.
+If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking.
+
+Situation when locking is not needed includes:
+
+* You have no hooks registered, or hooks calling is already thread-safe.
+
+* Writing to logger.Out is already thread-safe, for example:
+
+ 1) logger.Out is protected by locks.
+
+ 2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing)
+
+ (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/)
diff --git a/vendor/github.com/sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go
new file mode 100644
index 000000000..8af90637a
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/alt_exit.go
@@ -0,0 +1,64 @@
+package logrus
+
+// The following code was sourced and modified from the
+// https://github.com/tebeka/atexit package governed by the following license:
+//
+// Copyright (c) 2012 Miki Tebeka <miki.tebeka@gmail.com>.
+//
+// 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.
+
+import (
+ "fmt"
+ "os"
+)
+
+var handlers = []func(){}
+
+func runHandler(handler func()) {
+ defer func() {
+ if err := recover(); err != nil {
+ fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err)
+ }
+ }()
+
+ handler()
+}
+
+func runHandlers() {
+ for _, handler := range handlers {
+ runHandler(handler)
+ }
+}
+
+// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
+func Exit(code int) {
+ runHandlers()
+ os.Exit(code)
+}
+
+// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
+// all handlers. The handlers will also be invoked when any Fatal log entry is
+// made.
+//
+// This method is useful when a caller wishes to use logrus to log a fatal
+// message but also needs to gracefully shutdown. An example usecase could be
+// closing database connections, or sending a alert that the application is
+// closing.
+func RegisterExitHandler(handler func()) {
+ handlers = append(handlers, handler)
+}
diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml
new file mode 100644
index 000000000..96c2ce15f
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/appveyor.yml
@@ -0,0 +1,14 @@
+version: "{build}"
+platform: x64
+clone_folder: c:\gopath\src\github.com\sirupsen\logrus
+environment:
+ GOPATH: c:\gopath
+branches:
+ only:
+ - master
+install:
+ - set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
+ - go version
+build_script:
+ - go get -t
+ - go test
diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go
new file mode 100644
index 000000000..da67aba06
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/doc.go
@@ -0,0 +1,26 @@
+/*
+Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
+
+
+The simplest way to use Logrus is simply the package-level exported logger:
+
+ package main
+
+ import (
+ log "github.com/sirupsen/logrus"
+ )
+
+ func main() {
+ log.WithFields(log.Fields{
+ "animal": "walrus",
+ "number": 1,
+ "size": 10,
+ }).Info("A walrus appears")
+ }
+
+Output:
+ time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
+
+For a full guide visit https://github.com/sirupsen/logrus
+*/
+package logrus
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
new file mode 100644
index 000000000..778f4c9f0
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/entry.go
@@ -0,0 +1,288 @@
+package logrus
+
+import (
+ "bytes"
+ "fmt"
+ "os"
+ "sync"
+ "time"
+)
+
+var bufferPool *sync.Pool
+
+func init() {
+ bufferPool = &sync.Pool{
+ New: func() interface{} {
+ return new(bytes.Buffer)
+ },
+ }
+}
+
+// Defines the key when adding errors using WithError.
+var ErrorKey = "error"
+
+// An entry is the final or intermediate Logrus logging entry. It contains all
+// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
+// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
+// passed around as much as you wish to avoid field duplication.
+type Entry struct {
+ Logger *Logger
+
+ // Contains all the fields set by the user.
+ Data Fields
+
+ // Time at which the log entry was created
+ Time time.Time
+
+ // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
+ // This field will be set on entry firing and the value will be equal to the one in Logger struct field.
+ Level Level
+
+ // Message passed to Debug, Info, Warn, Error, Fatal or Panic
+ Message string
+
+ // When formatter is called in entry.log(), an Buffer may be set to entry
+ Buffer *bytes.Buffer
+}
+
+func NewEntry(logger *Logger) *Entry {
+ return &Entry{
+ Logger: logger,
+ // Default is three fields, give a little extra room
+ Data: make(Fields, 5),
+ }
+}
+
+// Returns the string representation from the reader and ultimately the
+// formatter.
+func (entry *Entry) String() (string, error) {
+ serialized, err := entry.Logger.Formatter.Format(entry)
+ if err != nil {
+ return "", err
+ }
+ str := string(serialized)
+ return str, nil
+}
+
+// Add an error as single field (using the key defined in ErrorKey) to the Entry.
+func (entry *Entry) WithError(err error) *Entry {
+ return entry.WithField(ErrorKey, err)
+}
+
+// Add a single field to the Entry.
+func (entry *Entry) WithField(key string, value interface{}) *Entry {
+ return entry.WithFields(Fields{key: value})
+}
+
+// Add a map of fields to the Entry.
+func (entry *Entry) WithFields(fields Fields) *Entry {
+ data := make(Fields, len(entry.Data)+len(fields))
+ for k, v := range entry.Data {
+ data[k] = v
+ }
+ for k, v := range fields {
+ data[k] = v
+ }
+ return &Entry{Logger: entry.Logger, Data: data}
+}
+
+// This function is not declared with a pointer value because otherwise
+// race conditions will occur when using multiple goroutines
+func (entry Entry) log(level Level, msg string) {
+ var buffer *bytes.Buffer
+ entry.Time = time.Now()
+ entry.Level = level
+ entry.Message = msg
+
+ entry.fireHooks()
+
+ buffer = bufferPool.Get().(*bytes.Buffer)
+ buffer.Reset()
+ defer bufferPool.Put(buffer)
+ entry.Buffer = buffer
+
+ entry.write()
+
+ entry.Buffer = nil
+
+ // To avoid Entry#log() returning a value that only would make sense for
+ // panic() to use in Entry#Panic(), we avoid the allocation by checking
+ // directly here.
+ if level <= PanicLevel {
+ panic(&entry)
+ }
+}
+
+// This function is not declared with a pointer value because otherwise
+// race conditions will occur when using multiple goroutines
+func (entry Entry) fireHooks() {
+ entry.Logger.mu.Lock()
+ defer entry.Logger.mu.Unlock()
+ err := entry.Logger.Hooks.Fire(entry.Level, &entry)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
+ }
+}
+
+func (entry *Entry) write() {
+ serialized, err := entry.Logger.Formatter.Format(entry)
+ entry.Logger.mu.Lock()
+ defer entry.Logger.mu.Unlock()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
+ } else {
+ _, err = entry.Logger.Out.Write(serialized)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
+ }
+ }
+}
+
+func (entry *Entry) Debug(args ...interface{}) {
+ if entry.Logger.level() >= DebugLevel {
+ entry.log(DebugLevel, fmt.Sprint(args...))
+ }
+}
+
+func (entry *Entry) Print(args ...interface{}) {
+ entry.Info(args...)
+}
+
+func (entry *Entry) Info(args ...interface{}) {
+ if entry.Logger.level() >= InfoLevel {
+ entry.log(InfoLevel, fmt.Sprint(args...))
+ }
+}
+
+func (entry *Entry) Warn(args ...interface{}) {
+ if entry.Logger.level() >= WarnLevel {
+ entry.log(WarnLevel, fmt.Sprint(args...))
+ }
+}
+
+func (entry *Entry) Warning(args ...interface{}) {
+ entry.Warn(args...)
+}
+
+func (entry *Entry) Error(args ...interface{}) {
+ if entry.Logger.level() >= ErrorLevel {
+ entry.log(ErrorLevel, fmt.Sprint(args...))
+ }
+}
+
+func (entry *Entry) Fatal(args ...interface{}) {
+ if entry.Logger.level() >= FatalLevel {
+ entry.log(FatalLevel, fmt.Sprint(args...))
+ }
+ Exit(1)
+}
+
+func (entry *Entry) Panic(args ...interface{}) {
+ if entry.Logger.level() >= PanicLevel {
+ entry.log(PanicLevel, fmt.Sprint(args...))
+ }
+ panic(fmt.Sprint(args...))
+}
+
+// Entry Printf family functions
+
+func (entry *Entry) Debugf(format string, args ...interface{}) {
+ if entry.Logger.level() >= DebugLevel {
+ entry.Debug(fmt.Sprintf(format, args...))
+ }
+}
+
+func (entry *Entry) Infof(format string, args ...interface{}) {
+ if entry.Logger.level() >= InfoLevel {
+ entry.Info(fmt.Sprintf(format, args...))
+ }
+}
+
+func (entry *Entry) Printf(format string, args ...interface{}) {
+ entry.Infof(format, args...)
+}
+
+func (entry *Entry) Warnf(format string, args ...interface{}) {
+ if entry.Logger.level() >= WarnLevel {
+ entry.Warn(fmt.Sprintf(format, args...))
+ }
+}
+
+func (entry *Entry) Warningf(format string, args ...interface{}) {
+ entry.Warnf(format, args...)
+}
+
+func (entry *Entry) Errorf(format string, args ...interface{}) {
+ if entry.Logger.level() >= ErrorLevel {
+ entry.Error(fmt.Sprintf(format, args...))
+ }
+}
+
+func (entry *Entry) Fatalf(format string, args ...interface{}) {
+ if entry.Logger.level() >= FatalLevel {
+ entry.Fatal(fmt.Sprintf(format, args...))
+ }
+ Exit(1)
+}
+
+func (entry *Entry) Panicf(format string, args ...interface{}) {
+ if entry.Logger.level() >= PanicLevel {
+ entry.Panic(fmt.Sprintf(format, args...))
+ }
+}
+
+// Entry Println family functions
+
+func (entry *Entry) Debugln(args ...interface{}) {
+ if entry.Logger.level() >= DebugLevel {
+ entry.Debug(entry.sprintlnn(args...))
+ }
+}
+
+func (entry *Entry) Infoln(args ...interface{}) {
+ if entry.Logger.level() >= InfoLevel {
+ entry.Info(entry.sprintlnn(args...))
+ }
+}
+
+func (entry *Entry) Println(args ...interface{}) {
+ entry.Infoln(args...)
+}
+
+func (entry *Entry) Warnln(args ...interface{}) {
+ if entry.Logger.level() >= WarnLevel {
+ entry.Warn(entry.sprintlnn(args...))
+ }
+}
+
+func (entry *Entry) Warningln(args ...interface{}) {
+ entry.Warnln(args...)
+}
+
+func (entry *Entry) Errorln(args ...interface{}) {
+ if entry.Logger.level() >= ErrorLevel {
+ entry.Error(entry.sprintlnn(args...))
+ }
+}
+
+func (entry *Entry) Fatalln(args ...interface{}) {
+ if entry.Logger.level() >= FatalLevel {
+ entry.Fatal(entry.sprintlnn(args...))
+ }
+ Exit(1)
+}
+
+func (entry *Entry) Panicln(args ...interface{}) {
+ if entry.Logger.level() >= PanicLevel {
+ entry.Panic(entry.sprintlnn(args...))
+ }
+}
+
+// Sprintlnn => Sprint no newline. This is to get the behavior of how
+// fmt.Sprintln where spaces are always added between operands, regardless of
+// their type. Instead of vendoring the Sprintln implementation to spare a
+// string allocation, we do the simplest thing.
+func (entry *Entry) sprintlnn(args ...interface{}) string {
+ msg := fmt.Sprintln(args...)
+ return msg[:len(msg)-1]
+}
diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go
new file mode 100644
index 000000000..013183eda
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/exported.go
@@ -0,0 +1,193 @@
+package logrus
+
+import (
+ "io"
+)
+
+var (
+ // std is the name of the standard logger in stdlib `log`
+ std = New()
+)
+
+func StandardLogger() *Logger {
+ return std
+}
+
+// SetOutput sets the standard logger output.
+func SetOutput(out io.Writer) {
+ std.mu.Lock()
+ defer std.mu.Unlock()
+ std.Out = out
+}
+
+// SetFormatter sets the standard logger formatter.
+func SetFormatter(formatter Formatter) {
+ std.mu.Lock()
+ defer std.mu.Unlock()
+ std.Formatter = formatter
+}
+
+// SetLevel sets the standard logger level.
+func SetLevel(level Level) {
+ std.mu.Lock()
+ defer std.mu.Unlock()
+ std.SetLevel(level)
+}
+
+// GetLevel returns the standard logger level.
+func GetLevel() Level {
+ std.mu.Lock()
+ defer std.mu.Unlock()
+ return std.level()
+}
+
+// AddHook adds a hook to the standard logger hooks.
+func AddHook(hook Hook) {
+ std.mu.Lock()
+ defer std.mu.Unlock()
+ std.Hooks.Add(hook)
+}
+
+// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
+func WithError(err error) *Entry {
+ return std.WithField(ErrorKey, err)
+}
+
+// WithField creates an entry from the standard logger and adds a field to
+// it. If you want multiple fields, use `WithFields`.
+//
+// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
+// or Panic on the Entry it returns.
+func WithField(key string, value interface{}) *Entry {
+ return std.WithField(key, value)
+}
+
+// WithFields creates an entry from the standard logger and adds multiple
+// fields to it. This is simply a helper for `WithField`, invoking it
+// once for each field.
+//
+// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
+// or Panic on the Entry it returns.
+func WithFields(fields Fields) *Entry {
+ return std.WithFields(fields)
+}
+
+// Debug logs a message at level Debug on the standard logger.
+func Debug(args ...interface{}) {
+ std.Debug(args...)
+}
+
+// Print logs a message at level Info on the standard logger.
+func Print(args ...interface{}) {
+ std.Print(args...)
+}
+
+// Info logs a message at level Info on the standard logger.
+func Info(args ...interface{}) {
+ std.Info(args...)
+}
+
+// Warn logs a message at level Warn on the standard logger.
+func Warn(args ...interface{}) {
+ std.Warn(args...)
+}
+
+// Warning logs a message at level Warn on the standard logger.
+func Warning(args ...interface{}) {
+ std.Warning(args...)
+}
+
+// Error logs a message at level Error on the standard logger.
+func Error(args ...interface{}) {
+ std.Error(args...)
+}
+
+// Panic logs a message at level Panic on the standard logger.
+func Panic(args ...interface{}) {
+ std.Panic(args...)
+}
+
+// Fatal logs a message at level Fatal on the standard logger.
+func Fatal(args ...interface{}) {
+ std.Fatal(args...)
+}
+
+// Debugf logs a message at level Debug on the standard logger.
+func Debugf(format string, args ...interface{}) {
+ std.Debugf(format, args...)
+}
+
+// Printf logs a message at level Info on the standard logger.
+func Printf(format string, args ...interface{}) {
+ std.Printf(format, args...)
+}
+
+// Infof logs a message at level Info on the standard logger.
+func Infof(format string, args ...interface{}) {
+ std.Infof(format, args...)
+}
+
+// Warnf logs a message at level Warn on the standard logger.
+func Warnf(format string, args ...interface{}) {
+ std.Warnf(format, args...)
+}
+
+// Warningf logs a message at level Warn on the standard logger.
+func Warningf(format string, args ...interface{}) {
+ std.Warningf(format, args...)
+}
+
+// Errorf logs a message at level Error on the standard logger.
+func Errorf(format string, args ...interface{}) {
+ std.Errorf(format, args...)
+}
+
+// Panicf logs a message at level Panic on the standard logger.
+func Panicf(format string, args ...interface{}) {
+ std.Panicf(format, args...)
+}
+
+// Fatalf logs a message at level Fatal on the standard logger.
+func Fatalf(format string, args ...interface{}) {
+ std.Fatalf(format, args...)
+}
+
+// Debugln logs a message at level Debug on the standard logger.
+func Debugln(args ...interface{}) {
+ std.Debugln(args...)
+}
+
+// Println logs a message at level Info on the standard logger.
+func Println(args ...interface{}) {
+ std.Println(args...)
+}
+
+// Infoln logs a message at level Info on the standard logger.
+func Infoln(args ...interface{}) {
+ std.Infoln(args...)
+}
+
+// Warnln logs a message at level Warn on the standard logger.
+func Warnln(args ...interface{}) {
+ std.Warnln(args...)
+}
+
+// Warningln logs a message at level Warn on the standard logger.
+func Warningln(args ...interface{}) {
+ std.Warningln(args...)
+}
+
+// Errorln logs a message at level Error on the standard logger.
+func Errorln(args ...interface{}) {
+ std.Errorln(args...)
+}
+
+// Panicln logs a message at level Panic on the standard logger.
+func Panicln(args ...interface{}) {
+ std.Panicln(args...)
+}
+
+// Fatalln logs a message at level Fatal on the standard logger.
+func Fatalln(args ...interface{}) {
+ std.Fatalln(args...)
+}
diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go
new file mode 100644
index 000000000..b183ff5b1
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/formatter.go
@@ -0,0 +1,45 @@
+package logrus
+
+import "time"
+
+const defaultTimestampFormat = time.RFC3339
+
+// The Formatter interface is used to implement a custom Formatter. It takes an
+// `Entry`. It exposes all the fields, including the default ones:
+//
+// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
+// * `entry.Data["time"]`. The timestamp.
+// * `entry.Data["level"]. The level the entry was logged at.
+//
+// Any additional fields added with `WithField` or `WithFields` are also in
+// `entry.Data`. Format is expected to return an array of bytes which are then
+// logged to `logger.Out`.
+type Formatter interface {
+ Format(*Entry) ([]byte, error)
+}
+
+// This is to not silently overwrite `time`, `msg` and `level` fields when
+// dumping it. If this code wasn't there doing:
+//
+// logrus.WithField("level", 1).Info("hello")
+//
+// Would just silently drop the user provided level. Instead with this code
+// it'll logged as:
+//
+// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
+//
+// It's not exported because it's still using Data in an opinionated way. It's to
+// avoid code duplication between the two default formatters.
+func prefixFieldClashes(data Fields) {
+ if t, ok := data["time"]; ok {
+ data["fields.time"] = t
+ }
+
+ if m, ok := data["msg"]; ok {
+ data["fields.msg"] = m
+ }
+
+ if l, ok := data["level"]; ok {
+ data["fields.level"] = l
+ }
+}
diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go
new file mode 100644
index 000000000..3f151cdc3
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/hooks.go
@@ -0,0 +1,34 @@
+package logrus
+
+// A hook to be fired when logging on the logging levels returned from
+// `Levels()` on your implementation of the interface. Note that this is not
+// fired in a goroutine or a channel with workers, you should handle such
+// functionality yourself if your call is non-blocking and you don't wish for
+// the logging calls for levels returned from `Levels()` to block.
+type Hook interface {
+ Levels() []Level
+ Fire(*Entry) error
+}
+
+// Internal type for storing the hooks on a logger instance.
+type LevelHooks map[Level][]Hook
+
+// Add a hook to an instance of logger. This is called with
+// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
+func (hooks LevelHooks) Add(hook Hook) {
+ for _, level := range hook.Levels() {
+ hooks[level] = append(hooks[level], hook)
+ }
+}
+
+// Fire all the hooks for the passed level. Used by `entry.log` to fire
+// appropriate hooks for a log entry.
+func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
+ for _, hook := range hooks[level] {
+ if err := hook.Fire(entry); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go
new file mode 100644
index 000000000..fb01c1b10
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/json_formatter.go
@@ -0,0 +1,79 @@
+package logrus
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+type fieldKey string
+
+// FieldMap allows customization of the key names for default fields.
+type FieldMap map[fieldKey]string
+
+// Default key names for the default fields
+const (
+ FieldKeyMsg = "msg"
+ FieldKeyLevel = "level"
+ FieldKeyTime = "time"
+)
+
+func (f FieldMap) resolve(key fieldKey) string {
+ if k, ok := f[key]; ok {
+ return k
+ }
+
+ return string(key)
+}
+
+// JSONFormatter formats logs into parsable json
+type JSONFormatter struct {
+ // TimestampFormat sets the format used for marshaling timestamps.
+ TimestampFormat string
+
+ // DisableTimestamp allows disabling automatic timestamps in output
+ DisableTimestamp bool
+
+ // FieldMap allows users to customize the names of keys for default fields.
+ // As an example:
+ // formatter := &JSONFormatter{
+ // FieldMap: FieldMap{
+ // FieldKeyTime: "@timestamp",
+ // FieldKeyLevel: "@level",
+ // FieldKeyMsg: "@message",
+ // },
+ // }
+ FieldMap FieldMap
+}
+
+// Format renders a single log entry
+func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
+ data := make(Fields, len(entry.Data)+3)
+ for k, v := range entry.Data {
+ switch v := v.(type) {
+ case error:
+ // Otherwise errors are ignored by `encoding/json`
+ // https://github.com/sirupsen/logrus/issues/137
+ data[k] = v.Error()
+ default:
+ data[k] = v
+ }
+ }
+ prefixFieldClashes(data)
+
+ timestampFormat := f.TimestampFormat
+ if timestampFormat == "" {
+ timestampFormat = defaultTimestampFormat
+ }
+
+ if !f.DisableTimestamp {
+ data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
+ }
+ data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
+ data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
+
+ serialized, err := json.Marshal(data)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
+ }
+ return append(serialized, '\n'), nil
+}
diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go
new file mode 100644
index 000000000..fdaf8a653
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/logger.go
@@ -0,0 +1,323 @@
+package logrus
+
+import (
+ "io"
+ "os"
+ "sync"
+ "sync/atomic"
+)
+
+type Logger struct {
+ // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
+ // file, or leave it default which is `os.Stderr`. You can also set this to
+ // something more adventorous, such as logging to Kafka.
+ Out io.Writer
+ // Hooks for the logger instance. These allow firing events based on logging
+ // levels and log entries. For example, to send errors to an error tracking
+ // service, log to StatsD or dump the core on fatal errors.
+ Hooks LevelHooks
+ // All log entries pass through the formatter before logged to Out. The
+ // included formatters are `TextFormatter` and `JSONFormatter` for which
+ // TextFormatter is the default. In development (when a TTY is attached) it
+ // logs with colors, but to a file it wouldn't. You can easily implement your
+ // own that implements the `Formatter` interface, see the `README` or included
+ // formatters for examples.
+ Formatter Formatter
+ // The logging level the logger should log at. This is typically (and defaults
+ // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
+ // logged.
+ Level Level
+ // Used to sync writing to the log. Locking is enabled by Default
+ mu MutexWrap
+ // Reusable empty entry
+ entryPool sync.Pool
+}
+
+type MutexWrap struct {
+ lock sync.Mutex
+ disabled bool
+}
+
+func (mw *MutexWrap) Lock() {
+ if !mw.disabled {
+ mw.lock.Lock()
+ }
+}
+
+func (mw *MutexWrap) Unlock() {
+ if !mw.disabled {
+ mw.lock.Unlock()
+ }
+}
+
+func (mw *MutexWrap) Disable() {
+ mw.disabled = true
+}
+
+// Creates a new logger. Configuration should be set by changing `Formatter`,
+// `Out` and `Hooks` directly on the default logger instance. You can also just
+// instantiate your own:
+//
+// var log = &Logger{
+// Out: os.Stderr,
+// Formatter: new(JSONFormatter),
+// Hooks: make(LevelHooks),
+// Level: logrus.DebugLevel,
+// }
+//
+// It's recommended to make this a global instance called `log`.
+func New() *Logger {
+ return &Logger{
+ Out: os.Stderr,
+ Formatter: new(TextFormatter),
+ Hooks: make(LevelHooks),
+ Level: InfoLevel,
+ }
+}
+
+func (logger *Logger) newEntry() *Entry {
+ entry, ok := logger.entryPool.Get().(*Entry)
+ if ok {
+ return entry
+ }
+ return NewEntry(logger)
+}
+
+func (logger *Logger) releaseEntry(entry *Entry) {
+ logger.entryPool.Put(entry)
+}
+
+// Adds a field to the log entry, note that it doesn't log until you call
+// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
+// If you want multiple fields, use `WithFields`.
+func (logger *Logger) WithField(key string, value interface{}) *Entry {
+ entry := logger.newEntry()
+ defer logger.releaseEntry(entry)
+ return entry.WithField(key, value)
+}
+
+// Adds a struct of fields to the log entry. All it does is call `WithField` for
+// each `Field`.
+func (logger *Logger) WithFields(fields Fields) *Entry {
+ entry := logger.newEntry()
+ defer logger.releaseEntry(entry)
+ return entry.WithFields(fields)
+}
+
+// Add an error as single field to the log entry. All it does is call
+// `WithError` for the given `error`.
+func (logger *Logger) WithError(err error) *Entry {
+ entry := logger.newEntry()
+ defer logger.releaseEntry(entry)
+ return entry.WithError(err)
+}
+
+func (logger *Logger) Debugf(format string, args ...interface{}) {
+ if logger.level() >= DebugLevel {
+ entry := logger.newEntry()
+ entry.Debugf(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Infof(format string, args ...interface{}) {
+ if logger.level() >= InfoLevel {
+ entry := logger.newEntry()
+ entry.Infof(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Printf(format string, args ...interface{}) {
+ entry := logger.newEntry()
+ entry.Printf(format, args...)
+ logger.releaseEntry(entry)
+}
+
+func (logger *Logger) Warnf(format string, args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warnf(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Warningf(format string, args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warnf(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Errorf(format string, args ...interface{}) {
+ if logger.level() >= ErrorLevel {
+ entry := logger.newEntry()
+ entry.Errorf(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Fatalf(format string, args ...interface{}) {
+ if logger.level() >= FatalLevel {
+ entry := logger.newEntry()
+ entry.Fatalf(format, args...)
+ logger.releaseEntry(entry)
+ }
+ Exit(1)
+}
+
+func (logger *Logger) Panicf(format string, args ...interface{}) {
+ if logger.level() >= PanicLevel {
+ entry := logger.newEntry()
+ entry.Panicf(format, args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Debug(args ...interface{}) {
+ if logger.level() >= DebugLevel {
+ entry := logger.newEntry()
+ entry.Debug(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Info(args ...interface{}) {
+ if logger.level() >= InfoLevel {
+ entry := logger.newEntry()
+ entry.Info(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Print(args ...interface{}) {
+ entry := logger.newEntry()
+ entry.Info(args...)
+ logger.releaseEntry(entry)
+}
+
+func (logger *Logger) Warn(args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warn(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Warning(args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warn(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Error(args ...interface{}) {
+ if logger.level() >= ErrorLevel {
+ entry := logger.newEntry()
+ entry.Error(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Fatal(args ...interface{}) {
+ if logger.level() >= FatalLevel {
+ entry := logger.newEntry()
+ entry.Fatal(args...)
+ logger.releaseEntry(entry)
+ }
+ Exit(1)
+}
+
+func (logger *Logger) Panic(args ...interface{}) {
+ if logger.level() >= PanicLevel {
+ entry := logger.newEntry()
+ entry.Panic(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Debugln(args ...interface{}) {
+ if logger.level() >= DebugLevel {
+ entry := logger.newEntry()
+ entry.Debugln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Infoln(args ...interface{}) {
+ if logger.level() >= InfoLevel {
+ entry := logger.newEntry()
+ entry.Infoln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Println(args ...interface{}) {
+ entry := logger.newEntry()
+ entry.Println(args...)
+ logger.releaseEntry(entry)
+}
+
+func (logger *Logger) Warnln(args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warnln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Warningln(args ...interface{}) {
+ if logger.level() >= WarnLevel {
+ entry := logger.newEntry()
+ entry.Warnln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Errorln(args ...interface{}) {
+ if logger.level() >= ErrorLevel {
+ entry := logger.newEntry()
+ entry.Errorln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+func (logger *Logger) Fatalln(args ...interface{}) {
+ if logger.level() >= FatalLevel {
+ entry := logger.newEntry()
+ entry.Fatalln(args...)
+ logger.releaseEntry(entry)
+ }
+ Exit(1)
+}
+
+func (logger *Logger) Panicln(args ...interface{}) {
+ if logger.level() >= PanicLevel {
+ entry := logger.newEntry()
+ entry.Panicln(args...)
+ logger.releaseEntry(entry)
+ }
+}
+
+//When file is opened with appending mode, it's safe to
+//write concurrently to a file (within 4k message on Linux).
+//In these cases user can choose to disable the lock.
+func (logger *Logger) SetNoLock() {
+ logger.mu.Disable()
+}
+
+func (logger *Logger) level() Level {
+ return Level(atomic.LoadUint32((*uint32)(&logger.Level)))
+}
+
+func (logger *Logger) SetLevel(level Level) {
+ atomic.StoreUint32((*uint32)(&logger.Level), uint32(level))
+}
+
+func (logger *Logger) AddHook(hook Hook) {
+ logger.mu.Lock()
+ defer logger.mu.Unlock()
+ logger.Hooks.Add(hook)
+}
diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go
new file mode 100644
index 000000000..dd3899974
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/logrus.go
@@ -0,0 +1,143 @@
+package logrus
+
+import (
+ "fmt"
+ "log"
+ "strings"
+)
+
+// Fields type, used to pass to `WithFields`.
+type Fields map[string]interface{}
+
+// Level type
+type Level uint32
+
+// Convert the Level to a string. E.g. PanicLevel becomes "panic".
+func (level Level) String() string {
+ switch level {
+ case DebugLevel:
+ return "debug"
+ case InfoLevel:
+ return "info"
+ case WarnLevel:
+ return "warning"
+ case ErrorLevel:
+ return "error"
+ case FatalLevel:
+ return "fatal"
+ case PanicLevel:
+ return "panic"
+ }
+
+ return "unknown"
+}
+
+// ParseLevel takes a string level and returns the Logrus log level constant.
+func ParseLevel(lvl string) (Level, error) {
+ switch strings.ToLower(lvl) {
+ case "panic":
+ return PanicLevel, nil
+ case "fatal":
+ return FatalLevel, nil
+ case "error":
+ return ErrorLevel, nil
+ case "warn", "warning":
+ return WarnLevel, nil
+ case "info":
+ return InfoLevel, nil
+ case "debug":
+ return DebugLevel, nil
+ }
+
+ var l Level
+ return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
+}
+
+// A constant exposing all logging levels
+var AllLevels = []Level{
+ PanicLevel,
+ FatalLevel,
+ ErrorLevel,
+ WarnLevel,
+ InfoLevel,
+ DebugLevel,
+}
+
+// These are the different logging levels. You can set the logging level to log
+// on your instance of logger, obtained with `logrus.New()`.
+const (
+ // PanicLevel level, highest level of severity. Logs and then calls panic with the
+ // message passed to Debug, Info, ...
+ PanicLevel Level = iota
+ // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
+ // logging level is set to Panic.
+ FatalLevel
+ // ErrorLevel level. Logs. Used for errors that should definitely be noted.
+ // Commonly used for hooks to send errors to an error tracking service.
+ ErrorLevel
+ // WarnLevel level. Non-critical entries that deserve eyes.
+ WarnLevel
+ // InfoLevel level. General operational entries about what's going on inside the
+ // application.
+ InfoLevel
+ // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
+ DebugLevel
+)
+
+// Won't compile if StdLogger can't be realized by a log.Logger
+var (
+ _ StdLogger = &log.Logger{}
+ _ StdLogger = &Entry{}
+ _ StdLogger = &Logger{}
+)
+
+// StdLogger is what your logrus-enabled library should take, that way
+// it'll accept a stdlib logger and a logrus logger. There's no standard
+// interface, this is the closest we get, unfortunately.
+type StdLogger interface {
+ Print(...interface{})
+ Printf(string, ...interface{})
+ Println(...interface{})
+
+ Fatal(...interface{})
+ Fatalf(string, ...interface{})
+ Fatalln(...interface{})
+
+ Panic(...interface{})
+ Panicf(string, ...interface{})
+ Panicln(...interface{})
+}
+
+// The FieldLogger interface generalizes the Entry and Logger types
+type FieldLogger interface {
+ WithField(key string, value interface{}) *Entry
+ WithFields(fields Fields) *Entry
+ WithError(err error) *Entry
+
+ Debugf(format string, args ...interface{})
+ Infof(format string, args ...interface{})
+ Printf(format string, args ...interface{})
+ Warnf(format string, args ...interface{})
+ Warningf(format string, args ...interface{})
+ Errorf(format string, args ...interface{})
+ Fatalf(format string, args ...interface{})
+ Panicf(format string, args ...interface{})
+
+ Debug(args ...interface{})
+ Info(args ...interface{})
+ Print(args ...interface{})
+ Warn(args ...interface{})
+ Warning(args ...interface{})
+ Error(args ...interface{})
+ Fatal(args ...interface{})
+ Panic(args ...interface{})
+
+ Debugln(args ...interface{})
+ Infoln(args ...interface{})
+ Println(args ...interface{})
+ Warnln(args ...interface{})
+ Warningln(args ...interface{})
+ Errorln(args ...interface{})
+ Fatalln(args ...interface{})
+ Panicln(args ...interface{})
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go
new file mode 100644
index 000000000..4880d13d2
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_bsd.go
@@ -0,0 +1,10 @@
+// +build darwin freebsd openbsd netbsd dragonfly
+// +build !appengine,!gopherjs
+
+package logrus
+
+import "golang.org/x/sys/unix"
+
+const ioctlReadTermios = unix.TIOCGETA
+
+type Termios unix.Termios
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
new file mode 100644
index 000000000..3de08e802
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
@@ -0,0 +1,11 @@
+// +build appengine gopherjs
+
+package logrus
+
+import (
+ "io"
+)
+
+func checkIfTerminal(w io.Writer) bool {
+ return true
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
new file mode 100644
index 000000000..067047a12
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
@@ -0,0 +1,19 @@
+// +build !appengine,!gopherjs
+
+package logrus
+
+import (
+ "io"
+ "os"
+
+ "golang.org/x/crypto/ssh/terminal"
+)
+
+func checkIfTerminal(w io.Writer) bool {
+ switch v := w.(type) {
+ case *os.File:
+ return terminal.IsTerminal(int(v.Fd()))
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go
index 5fadfe8a1..f29a0097c 100644
--- a/vendor/github.com/miekg/dns/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_linux.go
@@ -1,10 +1,14 @@
+// Based on ssh/terminal:
// Copyright 2013 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 file.
-package terminal
+// +build !appengine,!gopherjs
+
+package logrus
import "golang.org/x/sys/unix"
const ioctlReadTermios = unix.TCGETS
-const ioctlWriteTermios = unix.TCSETS
+
+type Termios unix.Termios
diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go
new file mode 100644
index 000000000..61b21caea
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/text_formatter.go
@@ -0,0 +1,178 @@
+package logrus
+
+import (
+ "bytes"
+ "fmt"
+ "sort"
+ "strings"
+ "sync"
+ "time"
+)
+
+const (
+ nocolor = 0
+ red = 31
+ green = 32
+ yellow = 33
+ blue = 36
+ gray = 37
+)
+
+var (
+ baseTimestamp time.Time
+)
+
+func init() {
+ baseTimestamp = time.Now()
+}
+
+// TextFormatter formats logs into text
+type TextFormatter struct {
+ // Set to true to bypass checking for a TTY before outputting colors.
+ ForceColors bool
+
+ // Force disabling colors.
+ DisableColors bool
+
+ // Disable timestamp logging. useful when output is redirected to logging
+ // system that already adds timestamps.
+ DisableTimestamp bool
+
+ // Enable logging the full timestamp when a TTY is attached instead of just
+ // the time passed since beginning of execution.
+ FullTimestamp bool
+
+ // TimestampFormat to use for display when a full timestamp is printed
+ TimestampFormat string
+
+ // The fields are sorted by default for a consistent output. For applications
+ // that log extremely frequently and don't use the JSON formatter this may not
+ // be desired.
+ DisableSorting bool
+
+ // QuoteEmptyFields will wrap empty fields in quotes if true
+ QuoteEmptyFields bool
+
+ // Whether the logger's out is to a terminal
+ isTerminal bool
+
+ sync.Once
+}
+
+func (f *TextFormatter) init(entry *Entry) {
+ if entry.Logger != nil {
+ f.isTerminal = checkIfTerminal(entry.Logger.Out)
+ }
+}
+
+// Format renders a single log entry
+func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
+ var b *bytes.Buffer
+ keys := make([]string, 0, len(entry.Data))
+ for k := range entry.Data {
+ keys = append(keys, k)
+ }
+
+ if !f.DisableSorting {
+ sort.Strings(keys)
+ }
+ if entry.Buffer != nil {
+ b = entry.Buffer
+ } else {
+ b = &bytes.Buffer{}
+ }
+
+ prefixFieldClashes(entry.Data)
+
+ f.Do(func() { f.init(entry) })
+
+ isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
+
+ timestampFormat := f.TimestampFormat
+ if timestampFormat == "" {
+ timestampFormat = defaultTimestampFormat
+ }
+ if isColored {
+ f.printColored(b, entry, keys, timestampFormat)
+ } else {
+ if !f.DisableTimestamp {
+ f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
+ }
+ f.appendKeyValue(b, "level", entry.Level.String())
+ if entry.Message != "" {
+ f.appendKeyValue(b, "msg", entry.Message)
+ }
+ for _, key := range keys {
+ f.appendKeyValue(b, key, entry.Data[key])
+ }
+ }
+
+ b.WriteByte('\n')
+ return b.Bytes(), nil
+}
+
+func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
+ var levelColor int
+ switch entry.Level {
+ case DebugLevel:
+ levelColor = gray
+ case WarnLevel:
+ levelColor = yellow
+ case ErrorLevel, FatalLevel, PanicLevel:
+ levelColor = red
+ default:
+ levelColor = blue
+ }
+
+ levelText := strings.ToUpper(entry.Level.String())[0:4]
+
+ if f.DisableTimestamp {
+ fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
+ } else if !f.FullTimestamp {
+ fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message)
+ } else {
+ fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
+ }
+ for _, k := range keys {
+ v := entry.Data[k]
+ fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
+ f.appendValue(b, v)
+ }
+}
+
+func (f *TextFormatter) needsQuoting(text string) bool {
+ if f.QuoteEmptyFields && len(text) == 0 {
+ return true
+ }
+ for _, ch := range text {
+ if !((ch >= 'a' && ch <= 'z') ||
+ (ch >= 'A' && ch <= 'Z') ||
+ (ch >= '0' && ch <= '9') ||
+ ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') {
+ return true
+ }
+ }
+ return false
+}
+
+func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
+ if b.Len() > 0 {
+ b.WriteByte(' ')
+ }
+ b.WriteString(key)
+ b.WriteByte('=')
+ f.appendValue(b, value)
+}
+
+func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
+ stringVal, ok := value.(string)
+ if !ok {
+ stringVal = fmt.Sprint(value)
+ }
+
+ if !f.needsQuoting(stringVal) {
+ b.WriteString(stringVal)
+ } else {
+ b.WriteString(fmt.Sprintf("%q", stringVal))
+ }
+}
diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go
new file mode 100644
index 000000000..7bdebedc6
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/writer.go
@@ -0,0 +1,62 @@
+package logrus
+
+import (
+ "bufio"
+ "io"
+ "runtime"
+)
+
+func (logger *Logger) Writer() *io.PipeWriter {
+ return logger.WriterLevel(InfoLevel)
+}
+
+func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
+ return NewEntry(logger).WriterLevel(level)
+}
+
+func (entry *Entry) Writer() *io.PipeWriter {
+ return entry.WriterLevel(InfoLevel)
+}
+
+func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
+ reader, writer := io.Pipe()
+
+ var printFunc func(args ...interface{})
+
+ switch level {
+ case DebugLevel:
+ printFunc = entry.Debug
+ case InfoLevel:
+ printFunc = entry.Info
+ case WarnLevel:
+ printFunc = entry.Warn
+ case ErrorLevel:
+ printFunc = entry.Error
+ case FatalLevel:
+ printFunc = entry.Fatal
+ case PanicLevel:
+ printFunc = entry.Panic
+ default:
+ printFunc = entry.Print
+ }
+
+ go entry.writerScanner(reader, printFunc)
+ runtime.SetFinalizer(writer, writerFinalizer)
+
+ return writer
+}
+
+func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
+ scanner := bufio.NewScanner(reader)
+ for scanner.Scan() {
+ printFunc(scanner.Text())
+ }
+ if err := scanner.Err(); err != nil {
+ entry.Errorf("Error while reading from Writer: %s", err)
+ }
+ reader.Close()
+}
+
+func writerFinalizer(writer *io.PipeWriter) {
+ writer.Close()
+}
diff --git a/vendor/github.com/spf13/afero/.travis.yml b/vendor/github.com/spf13/afero/.travis.yml
index e002181fe..0637db726 100644
--- a/vendor/github.com/spf13/afero/.travis.yml
+++ b/vendor/github.com/spf13/afero/.travis.yml
@@ -2,8 +2,8 @@ sudo: false
language: go
go:
- - 1.8
- 1.9
+ - "1.10"
- tip
os:
diff --git a/vendor/github.com/spf13/afero/afero_test.go b/vendor/github.com/spf13/afero/afero_test.go
deleted file mode 100644
index 526afa975..000000000
--- a/vendor/github.com/spf13/afero/afero_test.go
+++ /dev/null
@@ -1,699 +0,0 @@
-// Copyright © 2014 Steve Francia <spf@spf13.com>.
-// Copyright 2009 The Go Authors. All rights reserved.
-//
-// 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.
-
-package afero
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "runtime"
- "strings"
- "syscall"
- "testing"
-)
-
-var testName = "test.txt"
-var Fss = []Fs{&MemMapFs{}, &OsFs{}}
-
-var testRegistry map[Fs][]string = make(map[Fs][]string)
-
-func testDir(fs Fs) string {
- name, err := TempDir(fs, "", "afero")
- if err != nil {
- panic(fmt.Sprint("unable to work with test dir", err))
- }
- testRegistry[fs] = append(testRegistry[fs], name)
-
- return name
-}
-
-func tmpFile(fs Fs) File {
- x, err := TempFile(fs, "", "afero")
-
- if err != nil {
- panic(fmt.Sprint("unable to work with temp file", err))
- }
-
- testRegistry[fs] = append(testRegistry[fs], x.Name())
-
- return x
-}
-
-//Read with length 0 should not return EOF.
-func TestRead0(t *testing.T) {
- for _, fs := range Fss {
- f := tmpFile(fs)
- defer f.Close()
- f.WriteString("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
-
- var b []byte
- // b := make([]byte, 0)
- n, err := f.Read(b)
- if n != 0 || err != nil {
- t.Errorf("%v: Read(0) = %d, %v, want 0, nil", fs.Name(), n, err)
- }
- f.Seek(0, 0)
- b = make([]byte, 100)
- n, err = f.Read(b)
- if n <= 0 || err != nil {
- t.Errorf("%v: Read(100) = %d, %v, want >0, nil", fs.Name(), n, err)
- }
- }
-}
-
-func TestOpenFile(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- tmp := testDir(fs)
- path := filepath.Join(tmp, testName)
-
- f, err := fs.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600)
- if err != nil {
- t.Error(fs.Name(), "OpenFile (O_CREATE) failed:", err)
- continue
- }
- io.WriteString(f, "initial")
- f.Close()
-
- f, err = fs.OpenFile(path, os.O_WRONLY|os.O_APPEND, 0600)
- if err != nil {
- t.Error(fs.Name(), "OpenFile (O_APPEND) failed:", err)
- continue
- }
- io.WriteString(f, "|append")
- f.Close()
-
- f, err = fs.OpenFile(path, os.O_RDONLY, 0600)
- contents, _ := ioutil.ReadAll(f)
- expectedContents := "initial|append"
- if string(contents) != expectedContents {
- t.Errorf("%v: appending, expected '%v', got: '%v'", fs.Name(), expectedContents, string(contents))
- }
- f.Close()
-
- f, err = fs.OpenFile(path, os.O_RDWR|os.O_TRUNC, 0600)
- if err != nil {
- t.Error(fs.Name(), "OpenFile (O_TRUNC) failed:", err)
- continue
- }
- contents, _ = ioutil.ReadAll(f)
- if string(contents) != "" {
- t.Errorf("%v: expected truncated file, got: '%v'", fs.Name(), string(contents))
- }
- f.Close()
- }
-}
-
-func TestCreate(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- tmp := testDir(fs)
- path := filepath.Join(tmp, testName)
-
- f, err := fs.Create(path)
- if err != nil {
- t.Error(fs.Name(), "Create failed:", err)
- f.Close()
- continue
- }
- io.WriteString(f, "initial")
- f.Close()
-
- f, err = fs.Create(path)
- if err != nil {
- t.Error(fs.Name(), "Create failed:", err)
- f.Close()
- continue
- }
- secondContent := "second create"
- io.WriteString(f, secondContent)
- f.Close()
-
- f, err = fs.Open(path)
- if err != nil {
- t.Error(fs.Name(), "Open failed:", err)
- f.Close()
- continue
- }
- buf, err := ReadAll(f)
- if err != nil {
- t.Error(fs.Name(), "ReadAll failed:", err)
- f.Close()
- continue
- }
- if string(buf) != secondContent {
- t.Error(fs.Name(), "Content should be", "\""+secondContent+"\" but is \""+string(buf)+"\"")
- f.Close()
- continue
- }
- f.Close()
- }
-}
-
-func TestMemFileRead(t *testing.T) {
- f := tmpFile(new(MemMapFs))
- // f := MemFileCreate("testfile")
- f.WriteString("abcd")
- f.Seek(0, 0)
- b := make([]byte, 8)
- n, err := f.Read(b)
- if n != 4 {
- t.Errorf("didn't read all bytes: %v %v %v", n, err, b)
- }
- if err != nil {
- t.Errorf("err is not nil: %v %v %v", n, err, b)
- }
- n, err = f.Read(b)
- if n != 0 {
- t.Errorf("read more bytes: %v %v %v", n, err, b)
- }
- if err != io.EOF {
- t.Errorf("error is not EOF: %v %v %v", n, err, b)
- }
-}
-
-func TestRename(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- tDir := testDir(fs)
- from := filepath.Join(tDir, "/renamefrom")
- to := filepath.Join(tDir, "/renameto")
- exists := filepath.Join(tDir, "/renameexists")
- file, err := fs.Create(from)
- if err != nil {
- t.Fatalf("%s: open %q failed: %v", fs.Name(), to, err)
- }
- if err = file.Close(); err != nil {
- t.Errorf("%s: close %q failed: %v", fs.Name(), to, err)
- }
- file, err = fs.Create(exists)
- if err != nil {
- t.Fatalf("%s: open %q failed: %v", fs.Name(), to, err)
- }
- if err = file.Close(); err != nil {
- t.Errorf("%s: close %q failed: %v", fs.Name(), to, err)
- }
- err = fs.Rename(from, to)
- if err != nil {
- t.Fatalf("%s: rename %q, %q failed: %v", fs.Name(), to, from, err)
- }
- file, err = fs.Create(from)
- if err != nil {
- t.Fatalf("%s: open %q failed: %v", fs.Name(), to, err)
- }
- if err = file.Close(); err != nil {
- t.Errorf("%s: close %q failed: %v", fs.Name(), to, err)
- }
- err = fs.Rename(from, exists)
- if err != nil {
- t.Errorf("%s: rename %q, %q failed: %v", fs.Name(), exists, from, err)
- }
- names, err := readDirNames(fs, tDir)
- if err != nil {
- t.Errorf("%s: readDirNames error: %v", fs.Name(), err)
- }
- found := false
- for _, e := range names {
- if e == "renamefrom" {
- t.Error("File is still called renamefrom")
- }
- if e == "renameto" {
- found = true
- }
- }
- if !found {
- t.Error("File was not renamed to renameto")
- }
-
- _, err = fs.Stat(to)
- if err != nil {
- t.Errorf("%s: stat %q failed: %v", fs.Name(), to, err)
- }
- }
-}
-
-func TestRemove(t *testing.T) {
- for _, fs := range Fss {
-
- x, err := TempFile(fs, "", "afero")
- if err != nil {
- t.Error(fmt.Sprint("unable to work with temp file", err))
- }
-
- path := x.Name()
- x.Close()
-
- tDir := filepath.Dir(path)
-
- err = fs.Remove(path)
- if err != nil {
- t.Errorf("%v: Remove() failed: %v", fs.Name(), err)
- continue
- }
-
- _, err = fs.Stat(path)
- if !os.IsNotExist(err) {
- t.Errorf("%v: Remove() didn't remove file", fs.Name())
- continue
- }
-
- // Deleting non-existent file should raise error
- err = fs.Remove(path)
- if !os.IsNotExist(err) {
- t.Errorf("%v: Remove() didn't raise error for non-existent file", fs.Name())
- }
-
- f, err := fs.Open(tDir)
- if err != nil {
- t.Error("TestDir should still exist:", err)
- }
-
- names, err := f.Readdirnames(-1)
- if err != nil {
- t.Error("Readdirnames failed:", err)
- }
-
- for _, e := range names {
- if e == testName {
- t.Error("File was not removed from parent directory")
- }
- }
- }
-}
-
-func TestTruncate(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- f := tmpFile(fs)
- defer f.Close()
-
- checkSize(t, f, 0)
- f.Write([]byte("hello, world\n"))
- checkSize(t, f, 13)
- f.Truncate(10)
- checkSize(t, f, 10)
- f.Truncate(1024)
- checkSize(t, f, 1024)
- f.Truncate(0)
- checkSize(t, f, 0)
- _, err := f.Write([]byte("surprise!"))
- if err == nil {
- checkSize(t, f, 13+9) // wrote at offset past where hello, world was.
- }
- }
-}
-
-func TestSeek(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- f := tmpFile(fs)
- defer f.Close()
-
- const data = "hello, world\n"
- io.WriteString(f, data)
-
- type test struct {
- in int64
- whence int
- out int64
- }
- var tests = []test{
- {0, 1, int64(len(data))},
- {0, 0, 0},
- {5, 0, 5},
- {0, 2, int64(len(data))},
- {0, 0, 0},
- {-1, 2, int64(len(data)) - 1},
- {1 << 33, 0, 1 << 33},
- {1 << 33, 2, 1<<33 + int64(len(data))},
- }
- for i, tt := range tests {
- off, err := f.Seek(tt.in, tt.whence)
- if off != tt.out || err != nil {
- if e, ok := err.(*os.PathError); ok && e.Err == syscall.EINVAL && tt.out > 1<<32 {
- // Reiserfs rejects the big seeks.
- // http://code.google.com/p/go/issues/detail?id=91
- break
- }
- t.Errorf("#%d: Seek(%v, %v) = %v, %v want %v, nil", i, tt.in, tt.whence, off, err, tt.out)
- }
- }
- }
-}
-
-func TestReadAt(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- f := tmpFile(fs)
- defer f.Close()
-
- const data = "hello, world\n"
- io.WriteString(f, data)
-
- b := make([]byte, 5)
- n, err := f.ReadAt(b, 7)
- if err != nil || n != len(b) {
- t.Fatalf("ReadAt 7: %d, %v", n, err)
- }
- if string(b) != "world" {
- t.Fatalf("ReadAt 7: have %q want %q", string(b), "world")
- }
- }
-}
-
-func TestWriteAt(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- f := tmpFile(fs)
- defer f.Close()
-
- const data = "hello, world\n"
- io.WriteString(f, data)
-
- n, err := f.WriteAt([]byte("WORLD"), 7)
- if err != nil || n != 5 {
- t.Fatalf("WriteAt 7: %d, %v", n, err)
- }
-
- f2, err := fs.Open(f.Name())
- if err != nil {
- t.Fatalf("%v: ReadFile %s: %v", fs.Name(), f.Name(), err)
- }
- defer f2.Close()
- buf := new(bytes.Buffer)
- buf.ReadFrom(f2)
- b := buf.Bytes()
- if string(b) != "hello, WORLD\n" {
- t.Fatalf("after write: have %q want %q", string(b), "hello, WORLD\n")
- }
-
- }
-}
-
-func setupTestDir(t *testing.T, fs Fs) string {
- path := testDir(fs)
- return setupTestFiles(t, fs, path)
-}
-
-func setupTestDirRoot(t *testing.T, fs Fs) string {
- path := testDir(fs)
- setupTestFiles(t, fs, path)
- return path
-}
-
-func setupTestDirReusePath(t *testing.T, fs Fs, path string) string {
- testRegistry[fs] = append(testRegistry[fs], path)
- return setupTestFiles(t, fs, path)
-}
-
-func setupTestFiles(t *testing.T, fs Fs, path string) string {
- testSubDir := filepath.Join(path, "more", "subdirectories", "for", "testing", "we")
- err := fs.MkdirAll(testSubDir, 0700)
- if err != nil && !os.IsExist(err) {
- t.Fatal(err)
- }
-
- f, err := fs.Create(filepath.Join(testSubDir, "testfile1"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 1 content")
- f.Close()
-
- f, err = fs.Create(filepath.Join(testSubDir, "testfile2"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 2 content")
- f.Close()
-
- f, err = fs.Create(filepath.Join(testSubDir, "testfile3"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 3 content")
- f.Close()
-
- f, err = fs.Create(filepath.Join(testSubDir, "testfile4"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 4 content")
- f.Close()
- return testSubDir
-}
-
-func TestReaddirnames(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- testSubDir := setupTestDir(t, fs)
- tDir := filepath.Dir(testSubDir)
-
- root, err := fs.Open(tDir)
- if err != nil {
- t.Fatal(fs.Name(), tDir, err)
- }
- defer root.Close()
-
- namesRoot, err := root.Readdirnames(-1)
- if err != nil {
- t.Fatal(fs.Name(), namesRoot, err)
- }
-
- sub, err := fs.Open(testSubDir)
- if err != nil {
- t.Fatal(err)
- }
- defer sub.Close()
-
- namesSub, err := sub.Readdirnames(-1)
- if err != nil {
- t.Fatal(fs.Name(), namesSub, err)
- }
-
- findNames(fs, t, tDir, testSubDir, namesRoot, namesSub)
- }
-}
-
-func TestReaddirSimple(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- testSubDir := setupTestDir(t, fs)
- tDir := filepath.Dir(testSubDir)
-
- root, err := fs.Open(tDir)
- if err != nil {
- t.Fatal(err)
- }
- defer root.Close()
-
- rootInfo, err := root.Readdir(1)
- if err != nil {
- t.Log(myFileInfo(rootInfo))
- t.Error(err)
- }
-
- rootInfo, err = root.Readdir(5)
- if err != io.EOF {
- t.Log(myFileInfo(rootInfo))
- t.Error(err)
- }
-
- sub, err := fs.Open(testSubDir)
- if err != nil {
- t.Fatal(err)
- }
- defer sub.Close()
-
- subInfo, err := sub.Readdir(5)
- if err != nil {
- t.Log(myFileInfo(subInfo))
- t.Error(err)
- }
- }
-}
-
-func TestReaddir(t *testing.T) {
- defer removeAllTestFiles(t)
- for num := 0; num < 6; num++ {
- outputs := make([]string, len(Fss))
- infos := make([]string, len(Fss))
- for i, fs := range Fss {
- testSubDir := setupTestDir(t, fs)
- //tDir := filepath.Dir(testSubDir)
- root, err := fs.Open(testSubDir)
- if err != nil {
- t.Fatal(err)
- }
- defer root.Close()
-
- for j := 0; j < 6; j++ {
- info, err := root.Readdir(num)
- outputs[i] += fmt.Sprintf("%v Error: %v\n", myFileInfo(info), err)
- infos[i] += fmt.Sprintln(len(info), err)
- }
- }
-
- fail := false
- for i, o := range infos {
- if i == 0 {
- continue
- }
- if o != infos[i-1] {
- fail = true
- break
- }
- }
- if fail {
- t.Log("Readdir outputs not equal for Readdir(", num, ")")
- for i, o := range outputs {
- t.Log(Fss[i].Name())
- t.Log(o)
- }
- t.Fail()
- }
- }
-}
-
-type myFileInfo []os.FileInfo
-
-func (m myFileInfo) String() string {
- out := "Fileinfos:\n"
- for _, e := range m {
- out += " " + e.Name() + "\n"
- }
- return out
-}
-
-func TestReaddirAll(t *testing.T) {
- defer removeAllTestFiles(t)
- for _, fs := range Fss {
- testSubDir := setupTestDir(t, fs)
- tDir := filepath.Dir(testSubDir)
-
- root, err := fs.Open(tDir)
- if err != nil {
- t.Fatal(err)
- }
- defer root.Close()
-
- rootInfo, err := root.Readdir(-1)
- if err != nil {
- t.Fatal(err)
- }
- var namesRoot = []string{}
- for _, e := range rootInfo {
- namesRoot = append(namesRoot, e.Name())
- }
-
- sub, err := fs.Open(testSubDir)
- if err != nil {
- t.Fatal(err)
- }
- defer sub.Close()
-
- subInfo, err := sub.Readdir(-1)
- if err != nil {
- t.Fatal(err)
- }
- var namesSub = []string{}
- for _, e := range subInfo {
- namesSub = append(namesSub, e.Name())
- }
-
- findNames(fs, t, tDir, testSubDir, namesRoot, namesSub)
- }
-}
-
-func findNames(fs Fs, t *testing.T, tDir, testSubDir string, root, sub []string) {
- var foundRoot bool
- for _, e := range root {
- f, err := fs.Open(filepath.Join(tDir, e))
- if err != nil {
- t.Error("Open", filepath.Join(tDir, e), ":", err)
- }
- defer f.Close()
-
- if equal(e, "we") {
- foundRoot = true
- }
- }
- if !foundRoot {
- t.Logf("Names root: %v", root)
- t.Logf("Names sub: %v", sub)
- t.Error("Didn't find subdirectory we")
- }
-
- var found1, found2 bool
- for _, e := range sub {
- f, err := fs.Open(filepath.Join(testSubDir, e))
- if err != nil {
- t.Error("Open", filepath.Join(testSubDir, e), ":", err)
- }
- defer f.Close()
-
- if equal(e, "testfile1") {
- found1 = true
- }
- if equal(e, "testfile2") {
- found2 = true
- }
- }
-
- if !found1 {
- t.Logf("Names root: %v", root)
- t.Logf("Names sub: %v", sub)
- t.Error("Didn't find testfile1")
- }
- if !found2 {
- t.Logf("Names root: %v", root)
- t.Logf("Names sub: %v", sub)
- t.Error("Didn't find testfile2")
- }
-}
-
-func removeAllTestFiles(t *testing.T) {
- for fs, list := range testRegistry {
- for _, path := range list {
- if err := fs.RemoveAll(path); err != nil {
- t.Error(fs.Name(), err)
- }
- }
- }
- testRegistry = make(map[Fs][]string)
-}
-
-func equal(name1, name2 string) (r bool) {
- switch runtime.GOOS {
- case "windows":
- r = strings.ToLower(name1) == strings.ToLower(name2)
- default:
- r = name1 == name2
- }
- return
-}
-
-func checkSize(t *testing.T, f File, size int64) {
- dir, err := f.Stat()
- if err != nil {
- t.Fatalf("Stat %q (looking for size %d): %s", f.Name(), size, err)
- }
- if dir.Size() != size {
- t.Errorf("Stat %q: size %d want %d", f.Name(), dir.Size(), size)
- }
-}
diff --git a/vendor/github.com/spf13/afero/basepath.go b/vendor/github.com/spf13/afero/basepath.go
index 5e4fc2ec0..616ff8ff7 100644
--- a/vendor/github.com/spf13/afero/basepath.go
+++ b/vendor/github.com/spf13/afero/basepath.go
@@ -1,7 +1,6 @@
package afero
import (
- "errors"
"os"
"path/filepath"
"runtime"
@@ -9,6 +8,8 @@ import (
"time"
)
+var _ Lstater = (*BasePathFs)(nil)
+
// 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 base Fs.
@@ -22,6 +23,16 @@ type BasePathFs struct {
path string
}
+type BasePathFile struct {
+ File
+ path string
+}
+
+func (f *BasePathFile) Name() string {
+ sourcename := f.File.Name()
+ return strings.TrimPrefix(sourcename, filepath.Clean(f.path))
+}
+
func NewBasePathFs(source Fs, path string) Fs {
return &BasePathFs{source: source, path: path}
}
@@ -30,7 +41,7 @@ func NewBasePathFs(source Fs, path string) Fs {
// else the given file with the base path prepended
func (b *BasePathFs) RealPath(name string) (path string, err error) {
if err := validateBasePathName(name); err != nil {
- return "", err
+ return name, err
}
bpath := filepath.Clean(b.path)
@@ -52,7 +63,7 @@ func validateBasePathName(name string) error {
// On Windows a common mistake would be to provide an absolute OS path
// We could strip out the base part, but that would not be very portable.
if filepath.IsAbs(name) {
- return &os.PathError{Op: "realPath", Path: name, Err: errors.New("got a real OS path instead of a virtual")}
+ return os.ErrNotExist
}
return nil
@@ -111,14 +122,22 @@ func (b *BasePathFs) OpenFile(name string, flag int, mode os.FileMode) (f File,
if name, err = b.RealPath(name); err != nil {
return nil, &os.PathError{Op: "openfile", Path: name, Err: err}
}
- return b.source.OpenFile(name, flag, mode)
+ sourcef, err := b.source.OpenFile(name, flag, mode)
+ if err != nil {
+ return nil, err
+ }
+ return &BasePathFile{sourcef, b.path}, nil
}
func (b *BasePathFs) Open(name string) (f File, err error) {
if name, err = b.RealPath(name); err != nil {
return nil, &os.PathError{Op: "open", Path: name, Err: err}
}
- return b.source.Open(name)
+ sourcef, err := b.source.Open(name)
+ if err != nil {
+ return nil, err
+ }
+ return &BasePathFile{File: sourcef, path: b.path}, nil
}
func (b *BasePathFs) Mkdir(name string, mode os.FileMode) (err error) {
@@ -139,7 +158,23 @@ func (b *BasePathFs) Create(name string) (f File, err error) {
if name, err = b.RealPath(name); err != nil {
return nil, &os.PathError{Op: "create", Path: name, Err: err}
}
- return b.source.Create(name)
+ sourcef, err := b.source.Create(name)
+ if err != nil {
+ return nil, err
+ }
+ return &BasePathFile{File: sourcef, path: b.path}, nil
+}
+
+func (b *BasePathFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
+ name, err := b.RealPath(name)
+ if err != nil {
+ return nil, false, &os.PathError{Op: "lstat", Path: name, Err: err}
+ }
+ if lstater, ok := b.source.(Lstater); ok {
+ return lstater.LstatIfPossible(name)
+ }
+ fi, err := b.source.Stat(name)
+ return fi, false, err
}
// vim: ts=4 sw=4 noexpandtab nolist syn=go
diff --git a/vendor/github.com/spf13/afero/basepath_test.go b/vendor/github.com/spf13/afero/basepath_test.go
deleted file mode 100644
index abc22b9f6..000000000
--- a/vendor/github.com/spf13/afero/basepath_test.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package afero
-
-import (
- "os"
- "path/filepath"
- "runtime"
- "testing"
-)
-
-func TestBasePath(t *testing.T) {
- baseFs := &MemMapFs{}
- baseFs.MkdirAll("/base/path/tmp", 0777)
- bp := NewBasePathFs(baseFs, "/base/path")
-
- if _, err := bp.Create("/tmp/foo"); err != nil {
- t.Errorf("Failed to set real path")
- }
-
- if fh, err := bp.Create("../tmp/bar"); err == nil {
- t.Errorf("succeeded in creating %s ...", fh.Name())
- }
-}
-
-func TestBasePathRoot(t *testing.T) {
- baseFs := &MemMapFs{}
- baseFs.MkdirAll("/base/path/foo/baz", 0777)
- baseFs.MkdirAll("/base/path/boo/", 0777)
- bp := NewBasePathFs(baseFs, "/base/path")
-
- rd, err := ReadDir(bp, string(os.PathSeparator))
-
- if len(rd) != 2 {
- t.Errorf("base path doesn't respect root")
- }
-
- if err != nil {
- t.Error(err)
- }
-}
-
-func TestRealPath(t *testing.T) {
- fs := NewOsFs()
- baseDir, err := TempDir(fs, "", "base")
- if err != nil {
- t.Fatal("error creating tempDir", err)
- }
- defer fs.RemoveAll(baseDir)
- anotherDir, err := TempDir(fs, "", "another")
- if err != nil {
- t.Fatal("error creating tempDir", err)
- }
- defer fs.RemoveAll(anotherDir)
-
- bp := NewBasePathFs(fs, baseDir).(*BasePathFs)
-
- subDir := filepath.Join(baseDir, "s1")
-
- realPath, err := bp.RealPath("/s1")
-
- if err != nil {
- t.Errorf("Got error %s", err)
- }
-
- if realPath != subDir {
- t.Errorf("Expected \n%s got \n%s", subDir, realPath)
- }
-
- if runtime.GOOS == "windows" {
- _, err = bp.RealPath(anotherDir)
-
- if err == nil {
- t.Errorf("Expected error")
- }
-
- } else {
- // on *nix we have no way of just looking at the path and tell that anotherDir
- // is not inside the base file system.
- // The user will receive an os.ErrNotExist later.
- surrealPath, err := bp.RealPath(anotherDir)
-
- if err != nil {
- t.Errorf("Got error %s", err)
- }
-
- excpected := filepath.Join(baseDir, anotherDir)
-
- if surrealPath != excpected {
- t.Errorf("Expected \n%s got \n%s", excpected, surrealPath)
- }
- }
-
-}
-
-func TestNestedBasePaths(t *testing.T) {
- type dirSpec struct {
- Dir1, Dir2, Dir3 string
- }
- dirSpecs := []dirSpec{
- dirSpec{Dir1: "/", Dir2: "/", Dir3: "/"},
- dirSpec{Dir1: "/", Dir2: "/path2", Dir3: "/"},
- dirSpec{Dir1: "/path1/dir", Dir2: "/path2/dir/", Dir3: "/path3/dir"},
- dirSpec{Dir1: "C:/path1", Dir2: "path2/dir", Dir3: "/path3/dir/"},
- }
-
- for _, ds := range dirSpecs {
- memFs := NewMemMapFs()
- level1Fs := NewBasePathFs(memFs, ds.Dir1)
- level2Fs := NewBasePathFs(level1Fs, ds.Dir2)
- level3Fs := NewBasePathFs(level2Fs, ds.Dir3)
-
- type spec struct {
- BaseFs Fs
- FileName string
- }
- specs := []spec{
- spec{BaseFs: level3Fs, FileName: "f.txt"},
- spec{BaseFs: level2Fs, FileName: "f.txt"},
- spec{BaseFs: level1Fs, FileName: "f.txt"},
- }
-
- for _, s := range specs {
- if err := s.BaseFs.MkdirAll(s.FileName, 0755); err != nil {
- t.Errorf("Got error %s", err.Error())
- }
- if _, err := s.BaseFs.Stat(s.FileName); err != nil {
- t.Errorf("Got error %s", err.Error())
- }
-
- if s.BaseFs == level3Fs {
- pathToExist := filepath.Join(ds.Dir3, s.FileName)
- if _, err := level2Fs.Stat(pathToExist); err != nil {
- t.Errorf("Got error %s (path %s)", err.Error(), pathToExist)
- }
- } else if s.BaseFs == level2Fs {
- pathToExist := filepath.Join(ds.Dir2, ds.Dir3, s.FileName)
- if _, err := level1Fs.Stat(pathToExist); err != nil {
- t.Errorf("Got error %s (path %s)", err.Error(), pathToExist)
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/afero/cacheOnReadFs.go b/vendor/github.com/spf13/afero/cacheOnReadFs.go
index b026e0de8..29a26c67d 100644
--- a/vendor/github.com/spf13/afero/cacheOnReadFs.go
+++ b/vendor/github.com/spf13/afero/cacheOnReadFs.go
@@ -205,7 +205,7 @@ func (u *CacheOnReadFs) OpenFile(name string, flag int, perm os.FileMode) (File,
bfi.Close() // oops, what if O_TRUNC was set and file opening in the layer failed...?
return nil, err
}
- return &UnionFile{base: bfi, layer: lfi}, nil
+ return &UnionFile{Base: bfi, Layer: lfi}, nil
}
return u.layer.OpenFile(name, flag, perm)
}
@@ -251,7 +251,7 @@ func (u *CacheOnReadFs) Open(name string) (File, error) {
if err != nil && bfile == nil {
return nil, err
}
- return &UnionFile{base: bfile, layer: lfile}, nil
+ return &UnionFile{Base: bfile, Layer: lfile}, nil
}
func (u *CacheOnReadFs) Mkdir(name string, perm os.FileMode) error {
@@ -286,5 +286,5 @@ func (u *CacheOnReadFs) Create(name string) (File, error) {
bfh.Close()
return nil, err
}
- return &UnionFile{base: bfh, layer: lfh}, nil
+ return &UnionFile{Base: bfh, Layer: lfh}, nil
}
diff --git a/vendor/github.com/spf13/afero/composite_test.go b/vendor/github.com/spf13/afero/composite_test.go
deleted file mode 100644
index 8e44611dc..000000000
--- a/vendor/github.com/spf13/afero/composite_test.go
+++ /dev/null
@@ -1,404 +0,0 @@
-package afero
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "os"
- "testing"
- "time"
-)
-
-var tempDirs []string
-
-func NewTempOsBaseFs(t *testing.T) Fs {
- name, err := TempDir(NewOsFs(), "", "")
- if err != nil {
- t.Error("error creating tempDir", err)
- }
-
- tempDirs = append(tempDirs, name)
-
- return NewBasePathFs(NewOsFs(), name)
-}
-
-func CleanupTempDirs(t *testing.T) {
- osfs := NewOsFs()
- type ev struct {
- path string
- e error
- }
-
- errs := []ev{}
-
- for _, x := range tempDirs {
- err := osfs.RemoveAll(x)
- if err != nil {
- errs = append(errs, ev{path: x, e: err})
- }
- }
-
- for _, e := range errs {
- fmt.Println("error removing tempDir", e.path, e.e)
- }
-
- if len(errs) > 0 {
- t.Error("error cleaning up tempDirs")
- }
- tempDirs = []string{}
-}
-
-func TestUnionCreateExisting(t *testing.T) {
- base := &MemMapFs{}
- roBase := &ReadOnlyFs{source: base}
-
- ufs := NewCopyOnWriteFs(roBase, &MemMapFs{})
-
- base.MkdirAll("/home/test", 0777)
- fh, _ := base.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, err := ufs.OpenFile("/home/test/file.txt", os.O_RDWR, 0666)
- if err != nil {
- t.Errorf("Failed to open file r/w: %s", err)
- }
-
- _, err = fh.Write([]byte("####"))
- if err != nil {
- t.Errorf("Failed to write file: %s", err)
- }
- fh.Seek(0, 0)
- data, err := ioutil.ReadAll(fh)
- if err != nil {
- t.Errorf("Failed to read file: %s", err)
- }
- if string(data) != "#### is a test" {
- t.Errorf("Got wrong data")
- }
- fh.Close()
-
- fh, _ = base.Open("/home/test/file.txt")
- data, err = ioutil.ReadAll(fh)
- if string(data) != "This is a test" {
- t.Errorf("Got wrong data in base file")
- }
- fh.Close()
-
- fh, err = ufs.Create("/home/test/file.txt")
- switch err {
- case nil:
- if fi, _ := fh.Stat(); fi.Size() != 0 {
- t.Errorf("Create did not truncate file")
- }
- fh.Close()
- default:
- t.Errorf("Create failed on existing file")
- }
-
-}
-
-func TestUnionMergeReaddir(t *testing.T) {
- base := &MemMapFs{}
- roBase := &ReadOnlyFs{source: base}
-
- ufs := &CopyOnWriteFs{base: roBase, layer: &MemMapFs{}}
-
- base.MkdirAll("/home/test", 0777)
- fh, _ := base.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Create("/home/test/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Open("/home/test")
- files, err := fh.Readdirnames(-1)
- if err != nil {
- t.Errorf("Readdirnames failed")
- }
- if len(files) != 2 {
- t.Errorf("Got wrong number of files: %v", files)
- }
-}
-
-func TestExistingDirectoryCollisionReaddir(t *testing.T) {
- base := &MemMapFs{}
- roBase := &ReadOnlyFs{source: base}
- overlay := &MemMapFs{}
-
- ufs := &CopyOnWriteFs{base: roBase, layer: overlay}
-
- base.MkdirAll("/home/test", 0777)
- fh, _ := base.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- overlay.MkdirAll("home/test", 0777)
- fh, _ = overlay.Create("/home/test/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Create("/home/test/file3.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Open("/home/test")
- files, err := fh.Readdirnames(-1)
- if err != nil {
- t.Errorf("Readdirnames failed")
- }
- if len(files) != 3 {
- t.Errorf("Got wrong number of files in union: %v", files)
- }
-
- fh, _ = overlay.Open("/home/test")
- files, err = fh.Readdirnames(-1)
- if err != nil {
- t.Errorf("Readdirnames failed")
- }
- if len(files) != 2 {
- t.Errorf("Got wrong number of files in overlay: %v", files)
- }
-}
-
-func TestNestedDirBaseReaddir(t *testing.T) {
- base := &MemMapFs{}
- roBase := &ReadOnlyFs{source: base}
- overlay := &MemMapFs{}
-
- ufs := &CopyOnWriteFs{base: roBase, layer: overlay}
-
- base.MkdirAll("/home/test/foo/bar", 0777)
- fh, _ := base.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = base.Create("/home/test/foo/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
- fh, _ = base.Create("/home/test/foo/bar/file3.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- overlay.MkdirAll("/", 0777)
-
- // Opening something only in the base
- fh, _ = ufs.Open("/home/test/foo")
- list, err := fh.Readdir(-1)
- if err != nil {
- t.Errorf("Readdir failed %s", err)
- }
- if len(list) != 2 {
- for _, x := range list {
- fmt.Println(x.Name())
- }
- t.Errorf("Got wrong number of files in union: %v", len(list))
- }
-}
-
-func TestNestedDirOverlayReaddir(t *testing.T) {
- base := &MemMapFs{}
- roBase := &ReadOnlyFs{source: base}
- overlay := &MemMapFs{}
-
- ufs := &CopyOnWriteFs{base: roBase, layer: overlay}
-
- base.MkdirAll("/", 0777)
- overlay.MkdirAll("/home/test/foo/bar", 0777)
- fh, _ := overlay.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
- fh, _ = overlay.Create("/home/test/foo/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
- fh, _ = overlay.Create("/home/test/foo/bar/file3.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- // Opening nested dir only in the overlay
- fh, _ = ufs.Open("/home/test/foo")
- list, err := fh.Readdir(-1)
- if err != nil {
- t.Errorf("Readdir failed %s", err)
- }
- if len(list) != 2 {
- for _, x := range list {
- fmt.Println(x.Name())
- }
- t.Errorf("Got wrong number of files in union: %v", len(list))
- }
-}
-
-func TestNestedDirOverlayOsFsReaddir(t *testing.T) {
- defer CleanupTempDirs(t)
- base := NewTempOsBaseFs(t)
- roBase := &ReadOnlyFs{source: base}
- overlay := NewTempOsBaseFs(t)
-
- ufs := &CopyOnWriteFs{base: roBase, layer: overlay}
-
- base.MkdirAll("/", 0777)
- overlay.MkdirAll("/home/test/foo/bar", 0777)
- fh, _ := overlay.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
- fh, _ = overlay.Create("/home/test/foo/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
- fh, _ = overlay.Create("/home/test/foo/bar/file3.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- // Opening nested dir only in the overlay
- fh, _ = ufs.Open("/home/test/foo")
- list, err := fh.Readdir(-1)
- fh.Close()
- if err != nil {
- t.Errorf("Readdir failed %s", err)
- }
- if len(list) != 2 {
- for _, x := range list {
- fmt.Println(x.Name())
- }
- t.Errorf("Got wrong number of files in union: %v", len(list))
- }
-}
-
-func TestCopyOnWriteFsWithOsFs(t *testing.T) {
- defer CleanupTempDirs(t)
- base := NewTempOsBaseFs(t)
- roBase := &ReadOnlyFs{source: base}
- overlay := NewTempOsBaseFs(t)
-
- ufs := &CopyOnWriteFs{base: roBase, layer: overlay}
-
- base.MkdirAll("/home/test", 0777)
- fh, _ := base.Create("/home/test/file.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- overlay.MkdirAll("home/test", 0777)
- fh, _ = overlay.Create("/home/test/file2.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Create("/home/test/file3.txt")
- fh.WriteString("This is a test")
- fh.Close()
-
- fh, _ = ufs.Open("/home/test")
- files, err := fh.Readdirnames(-1)
- fh.Close()
- if err != nil {
- t.Errorf("Readdirnames failed")
- }
- if len(files) != 3 {
- t.Errorf("Got wrong number of files in union: %v", files)
- }
-
- fh, _ = overlay.Open("/home/test")
- files, err = fh.Readdirnames(-1)
- fh.Close()
- if err != nil {
- t.Errorf("Readdirnames failed")
- }
- if len(files) != 2 {
- t.Errorf("Got wrong number of files in overlay: %v", files)
- }
-}
-
-func TestUnionCacheWrite(t *testing.T) {
- base := &MemMapFs{}
- layer := &MemMapFs{}
-
- ufs := NewCacheOnReadFs(base, layer, 0)
-
- base.Mkdir("/data", 0777)
-
- fh, err := ufs.Create("/data/file.txt")
- if err != nil {
- t.Errorf("Failed to create file")
- }
- _, err = fh.Write([]byte("This is a test"))
- if err != nil {
- t.Errorf("Failed to write file")
- }
-
- fh.Seek(0, os.SEEK_SET)
- buf := make([]byte, 4)
- _, err = fh.Read(buf)
- fh.Write([]byte(" IS A"))
- fh.Close()
-
- baseData, _ := ReadFile(base, "/data/file.txt")
- layerData, _ := ReadFile(layer, "/data/file.txt")
- if string(baseData) != string(layerData) {
- t.Errorf("Different data: %s <=> %s", baseData, layerData)
- }
-}
-
-func TestUnionCacheExpire(t *testing.T) {
- base := &MemMapFs{}
- layer := &MemMapFs{}
- ufs := &CacheOnReadFs{base: base, layer: layer, cacheTime: 1 * time.Second}
-
- base.Mkdir("/data", 0777)
-
- fh, err := ufs.Create("/data/file.txt")
- if err != nil {
- t.Errorf("Failed to create file")
- }
- _, err = fh.Write([]byte("This is a test"))
- if err != nil {
- t.Errorf("Failed to write file")
- }
- fh.Close()
-
- fh, _ = base.Create("/data/file.txt")
- // sleep some time, so we really get a different time.Now() on write...
- time.Sleep(2 * time.Second)
- fh.WriteString("Another test")
- fh.Close()
-
- data, _ := ReadFile(ufs, "/data/file.txt")
- if string(data) != "Another test" {
- t.Errorf("cache time failed: <%s>", data)
- }
-}
-
-func TestCacheOnReadFsNotInLayer(t *testing.T) {
- base := NewMemMapFs()
- layer := NewMemMapFs()
- fs := NewCacheOnReadFs(base, layer, 0)
-
- fh, err := base.Create("/file.txt")
- if err != nil {
- t.Fatal("unable to create file: ", err)
- }
-
- txt := []byte("This is a test")
- fh.Write(txt)
- fh.Close()
-
- fh, err = fs.Open("/file.txt")
- if err != nil {
- t.Fatal("could not open file: ", err)
- }
-
- b, err := ReadAll(fh)
- fh.Close()
-
- if err != nil {
- t.Fatal("could not read file: ", err)
- } else if !bytes.Equal(txt, b) {
- t.Fatalf("wanted file text %q, got %q", txt, b)
- }
-
- fh, err = layer.Open("/file.txt")
- if err != nil {
- t.Fatal("could not open file from layer: ", err)
- }
- fh.Close()
-}
diff --git a/vendor/github.com/spf13/afero/copyOnWriteFs.go b/vendor/github.com/spf13/afero/copyOnWriteFs.go
index f2ebcd226..9aef39794 100644
--- a/vendor/github.com/spf13/afero/copyOnWriteFs.go
+++ b/vendor/github.com/spf13/afero/copyOnWriteFs.go
@@ -8,6 +8,8 @@ import (
"time"
)
+var _ Lstater = (*CopyOnWriteFs)(nil)
+
// The CopyOnWriteFs is a union filesystem: a read only base file system with
// a possibly writeable layer on top. Changes to the file system will only
// be made in the overlay: Changing an existing file in the base layer which
@@ -76,18 +78,55 @@ func (u *CopyOnWriteFs) Chmod(name string, mode os.FileMode) error {
func (u *CopyOnWriteFs) Stat(name string) (os.FileInfo, error) {
fi, err := u.layer.Stat(name)
if err != nil {
- origErr := err
- if e, ok := err.(*os.PathError); ok {
- err = e.Err
- }
- if err == os.ErrNotExist || err == syscall.ENOENT || err == syscall.ENOTDIR {
+ isNotExist := u.isNotExist(err)
+ if isNotExist {
return u.base.Stat(name)
}
- return nil, origErr
+ return nil, err
}
return fi, nil
}
+func (u *CopyOnWriteFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
+ llayer, ok1 := u.layer.(Lstater)
+ lbase, ok2 := u.base.(Lstater)
+
+ if ok1 {
+ fi, b, err := llayer.LstatIfPossible(name)
+ if err == nil {
+ return fi, b, nil
+ }
+
+ if !u.isNotExist(err) {
+ return nil, b, err
+ }
+ }
+
+ if ok2 {
+ fi, b, err := lbase.LstatIfPossible(name)
+ if err == nil {
+ return fi, b, nil
+ }
+ if !u.isNotExist(err) {
+ return nil, b, err
+ }
+ }
+
+ fi, err := u.Stat(name)
+
+ return fi, false, err
+}
+
+func (u *CopyOnWriteFs) isNotExist(err error) bool {
+ if e, ok := err.(*os.PathError); ok {
+ err = e.Err
+ }
+ if err == os.ErrNotExist || err == syscall.ENOENT || err == syscall.ENOTDIR {
+ return true
+ }
+ return false
+}
+
// Renaming files present only in the base layer is not permitted
func (u *CopyOnWriteFs) Rename(oldname, newname string) error {
b, err := u.isBaseFile(oldname)
@@ -219,7 +258,7 @@ func (u *CopyOnWriteFs) Open(name string) (File, error) {
return nil, fmt.Errorf("BaseErr: %v\nOverlayErr: %v", bErr, lErr)
}
- return &UnionFile{base: bfile, layer: lfile}, nil
+ return &UnionFile{Base: bfile, Layer: lfile}, nil
}
func (u *CopyOnWriteFs) Mkdir(name string, perm os.FileMode) error {
diff --git a/vendor/github.com/spf13/afero/copyOnWriteFs_test.go b/vendor/github.com/spf13/afero/copyOnWriteFs_test.go
deleted file mode 100644
index c6f2c6d62..000000000
--- a/vendor/github.com/spf13/afero/copyOnWriteFs_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package afero
-
-import "testing"
-
-func TestCopyOnWrite(t *testing.T) {
- var fs Fs
- var err error
- base := NewOsFs()
- roBase := NewReadOnlyFs(base)
- ufs := NewCopyOnWriteFs(roBase, NewMemMapFs())
- fs = ufs
- err = fs.MkdirAll("nonexistent/directory/", 0744)
- if err != nil {
- t.Error(err)
- return
- }
- _, err = fs.Create("nonexistent/directory/newfile")
- if err != nil {
- t.Error(err)
- return
- }
-
-}
-
-func TestCopyOnWriteFileInMemMapBase(t *testing.T) {
- base := &MemMapFs{}
- layer := &MemMapFs{}
-
- if err := WriteFile(base, "base.txt", []byte("base"), 0755); err != nil {
- t.Fatalf("Failed to write file: %s", err)
- }
-
- ufs := NewCopyOnWriteFs(base, layer)
-
- _, err := ufs.Stat("base.txt")
- if err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/spf13/afero/ioutil_test.go b/vendor/github.com/spf13/afero/ioutil_test.go
deleted file mode 100644
index e7c9f0698..000000000
--- a/vendor/github.com/spf13/afero/ioutil_test.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// ©2015 The Go Authors
-// Copyright ©2015 Steve Francia <spf@spf13.com>
-//
-// 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.
-
-package afero
-
-import "testing"
-
-func checkSizePath(t *testing.T, path string, size int64) {
- dir, err := testFS.Stat(path)
- if err != nil {
- t.Fatalf("Stat %q (looking for size %d): %s", path, size, err)
- }
- if dir.Size() != size {
- t.Errorf("Stat %q: size %d want %d", path, dir.Size(), size)
- }
-}
-
-func TestReadFile(t *testing.T) {
- testFS = &MemMapFs{}
- fsutil := &Afero{Fs: testFS}
-
- testFS.Create("this_exists.go")
- filename := "rumpelstilzchen"
- contents, err := fsutil.ReadFile(filename)
- if err == nil {
- t.Fatalf("ReadFile %s: error expected, none found", filename)
- }
-
- filename = "this_exists.go"
- contents, err = fsutil.ReadFile(filename)
- if err != nil {
- t.Fatalf("ReadFile %s: %v", filename, err)
- }
-
- checkSizePath(t, filename, int64(len(contents)))
-}
-
-func TestWriteFile(t *testing.T) {
- testFS = &MemMapFs{}
- fsutil := &Afero{Fs: testFS}
- f, err := fsutil.TempFile("", "ioutil-test")
- if err != nil {
- t.Fatal(err)
- }
- filename := f.Name()
- data := "Programming today is a race between software engineers striving to " +
- "build bigger and better idiot-proof programs, and the Universe trying " +
- "to produce bigger and better idiots. So far, the Universe is winning."
-
- if err := fsutil.WriteFile(filename, []byte(data), 0644); err != nil {
- t.Fatalf("WriteFile %s: %v", filename, err)
- }
-
- contents, err := fsutil.ReadFile(filename)
- if err != nil {
- t.Fatalf("ReadFile %s: %v", filename, err)
- }
-
- if string(contents) != data {
- t.Fatalf("contents = %q\nexpected = %q", string(contents), data)
- }
-
- // cleanup
- f.Close()
- testFS.Remove(filename) // ignore error
-}
-
-func TestReadDir(t *testing.T) {
- testFS = &MemMapFs{}
- testFS.Mkdir("/i-am-a-dir", 0777)
- testFS.Create("/this_exists.go")
- dirname := "rumpelstilzchen"
- _, err := ReadDir(testFS, dirname)
- if err == nil {
- t.Fatalf("ReadDir %s: error expected, none found", dirname)
- }
-
- dirname = ".."
- list, err := ReadDir(testFS, dirname)
- if err != nil {
- t.Fatalf("ReadDir %s: %v", dirname, err)
- }
-
- foundFile := false
- foundSubDir := false
- for _, dir := range list {
- switch {
- case !dir.IsDir() && dir.Name() == "this_exists.go":
- foundFile = true
- case dir.IsDir() && dir.Name() == "i-am-a-dir":
- foundSubDir = true
- }
- }
- if !foundFile {
- t.Fatalf("ReadDir %s: this_exists.go file not found", dirname)
- }
- if !foundSubDir {
- t.Fatalf("ReadDir %s: i-am-a-dir directory not found", dirname)
- }
-}
diff --git a/vendor/github.com/prometheus/client_golang/examples/simple/main.go b/vendor/github.com/spf13/afero/lstater.go
index 1fc23249a..89c1bfc0a 100644
--- a/vendor/github.com/prometheus/client_golang/examples/simple/main.go
+++ b/vendor/github.com/spf13/afero/lstater.go
@@ -1,8 +1,8 @@
-// Copyright 2015 The Prometheus Authors
+// Copyright © 2018 Steve Francia <spf@spf13.com>.
+//
// 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
@@ -11,21 +11,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// A minimal example of how to include Prometheus instrumentation.
-package main
+package afero
import (
- "flag"
- "log"
- "net/http"
-
- "github.com/prometheus/client_golang/prometheus/promhttp"
+ "os"
)
-var addr = flag.String("listen-address", ":8080", "The address to listen on for HTTP requests.")
-
-func main() {
- flag.Parse()
- http.Handle("/metrics", promhttp.Handler())
- log.Fatal(http.ListenAndServe(*addr, nil))
+// Lstater is an optional interface in Afero. It is only implemented by the
+// filesystems saying so.
+// It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem.
+// Else it will call Stat.
+// In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not.
+type Lstater interface {
+ LstatIfPossible(name string) (os.FileInfo, bool, error)
}
diff --git a/vendor/github.com/spf13/afero/match.go b/vendor/github.com/spf13/afero/match.go
index 08b3b7e01..c18a87fb7 100644
--- a/vendor/github.com/spf13/afero/match.go
+++ b/vendor/github.com/spf13/afero/match.go
@@ -33,8 +33,8 @@ import (
// built-ins from that package.
func Glob(fs Fs, pattern string) (matches []string, err error) {
if !hasMeta(pattern) {
- // afero does not support Lstat directly.
- if _, err = lstatIfOs(fs, pattern); err != nil {
+ // Lstat not supported by a ll filesystems.
+ if _, err = lstatIfPossible(fs, pattern); err != nil {
return nil, nil
}
return []string{pattern}, nil
diff --git a/vendor/github.com/spf13/afero/match_test.go b/vendor/github.com/spf13/afero/match_test.go
deleted file mode 100644
index 21e1faecd..000000000
--- a/vendor/github.com/spf13/afero/match_test.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright © 2014 Steve Francia <spf@spf13.com>.
-// Copyright 2009 The Go Authors. All rights reserved.
-//
-// 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.
-
-package afero
-
-import (
- "os"
- "path/filepath"
- "runtime"
- "testing"
-)
-
-// contains returns true if vector contains the string s.
-func contains(vector []string, s string) bool {
- for _, elem := range vector {
- if elem == s {
- return true
- }
- }
- return false
-}
-
-func setupGlobDirRoot(t *testing.T, fs Fs) string {
- path := testDir(fs)
- setupGlobFiles(t, fs, path)
- return path
-}
-
-func setupGlobDirReusePath(t *testing.T, fs Fs, path string) string {
- testRegistry[fs] = append(testRegistry[fs], path)
- return setupGlobFiles(t, fs, path)
-}
-
-func setupGlobFiles(t *testing.T, fs Fs, path string) string {
- testSubDir := filepath.Join(path, "globs", "bobs")
- err := fs.MkdirAll(testSubDir, 0700)
- if err != nil && !os.IsExist(err) {
- t.Fatal(err)
- }
-
- f, err := fs.Create(filepath.Join(testSubDir, "/matcher"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 1 content")
- f.Close()
-
- f, err = fs.Create(filepath.Join(testSubDir, "/../submatcher"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 2 content")
- f.Close()
-
- f, err = fs.Create(filepath.Join(testSubDir, "/../../match"))
- if err != nil {
- t.Fatal(err)
- }
- f.WriteString("Testfile 3 content")
- f.Close()
-
- return testSubDir
-}
-
-func TestGlob(t *testing.T) {
- defer removeAllTestFiles(t)
- var testDir string
- for i, fs := range Fss {
- if i == 0 {
- testDir = setupGlobDirRoot(t, fs)
- } else {
- setupGlobDirReusePath(t, fs, testDir)
- }
- }
-
- var globTests = []struct {
- pattern, result string
- }{
- {testDir + "/globs/bobs/matcher", testDir + "/globs/bobs/matcher"},
- {testDir + "/globs/*/mat?her", testDir + "/globs/bobs/matcher"},
- {testDir + "/globs/bobs/../*", testDir + "/globs/submatcher"},
- {testDir + "/match", testDir + "/match"},
- }
-
- for _, fs := range Fss {
-
- for _, tt := range globTests {
- pattern := tt.pattern
- result := tt.result
- if runtime.GOOS == "windows" {
- pattern = filepath.Clean(pattern)
- result = filepath.Clean(result)
- }
- matches, err := Glob(fs, pattern)
- if err != nil {
- t.Errorf("Glob error for %q: %s", pattern, err)
- continue
- }
- if !contains(matches, result) {
- t.Errorf("Glob(%#q) = %#v want %v", pattern, matches, result)
- }
- }
- for _, pattern := range []string{"no_match", "../*/no_match"} {
- matches, err := Glob(fs, pattern)
- if err != nil {
- t.Errorf("Glob error for %q: %s", pattern, err)
- continue
- }
- if len(matches) != 0 {
- t.Errorf("Glob(%#q) = %#v want []", pattern, matches)
- }
- }
-
- }
-}
-
-func TestGlobSymlink(t *testing.T) {
- defer removeAllTestFiles(t)
-
- fs := &OsFs{}
- testDir := setupGlobDirRoot(t, fs)
-
- err := os.Symlink("target", filepath.Join(testDir, "symlink"))
- if err != nil {
- t.Skipf("skipping on %s", runtime.GOOS)
- }
-
- var globSymlinkTests = []struct {
- path, dest string
- brokenLink bool
- }{
- {"test1", "link1", false},
- {"test2", "link2", true},
- }
-
- for _, tt := range globSymlinkTests {
- path := filepath.Join(testDir, tt.path)
- dest := filepath.Join(testDir, tt.dest)
- f, err := fs.Create(path)
- if err != nil {
- t.Fatal(err)
- }
- if err := f.Close(); err != nil {
- t.Fatal(err)
- }
- err = os.Symlink(path, dest)
- if err != nil {
- t.Fatal(err)
- }
- if tt.brokenLink {
- // Break the symlink.
- fs.Remove(path)
- }
- matches, err := Glob(fs, dest)
- if err != nil {
- t.Errorf("GlobSymlink error for %q: %s", dest, err)
- }
- if !contains(matches, dest) {
- t.Errorf("Glob(%#q) = %#v want %v", dest, matches, dest)
- }
- }
-}
-
-
-func TestGlobError(t *testing.T) {
- for _, fs := range Fss {
- _, err := Glob(fs, "[7]")
- if err != nil {
- t.Error("expected error for bad pattern; got none")
- }
- }
-}
diff --git a/vendor/github.com/spf13/afero/mem/file_test.go b/vendor/github.com/spf13/afero/mem/file_test.go
deleted file mode 100644
index 5769067a7..000000000
--- a/vendor/github.com/spf13/afero/mem/file_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package mem
-
-import (
- "testing"
- "time"
-)
-
-func TestFileDataNameRace(t *testing.T) {
- t.Parallel()
- const someName = "someName"
- const someOtherName = "someOtherName"
- d := FileData{
- name: someName,
- }
-
- if d.Name() != someName {
- t.Errorf("Failed to read correct Name, was %v", d.Name())
- }
-
- ChangeFileName(&d, someOtherName)
- if d.Name() != someOtherName {
- t.Errorf("Failed to set Name, was %v", d.Name())
- }
-
- go func() {
- ChangeFileName(&d, someName)
- }()
-
- if d.Name() != someName && d.Name() != someOtherName {
- t.Errorf("Failed to read either Name, was %v", d.Name())
- }
-}
-
-func TestFileDataModTimeRace(t *testing.T) {
- t.Parallel()
- someTime := time.Now()
- someOtherTime := someTime.Add(1 * time.Minute)
-
- d := FileData{
- modtime: someTime,
- }
-
- s := FileInfo{
- FileData: &d,
- }
-
- if s.ModTime() != someTime {
- t.Errorf("Failed to read correct value, was %v", s.ModTime())
- }
-
- SetModTime(&d, someOtherTime)
- if s.ModTime() != someOtherTime {
- t.Errorf("Failed to set ModTime, was %v", s.ModTime())
- }
-
- go func() {
- SetModTime(&d, someTime)
- }()
-
- if s.ModTime() != someTime && s.ModTime() != someOtherTime {
- t.Errorf("Failed to read either modtime, was %v", s.ModTime())
- }
-}
-
-func TestFileDataModeRace(t *testing.T) {
- t.Parallel()
- const someMode = 0777
- const someOtherMode = 0660
-
- d := FileData{
- mode: someMode,
- }
-
- s := FileInfo{
- FileData: &d,
- }
-
- if s.Mode() != someMode {
- t.Errorf("Failed to read correct value, was %v", s.Mode())
- }
-
- SetMode(&d, someOtherMode)
- if s.Mode() != someOtherMode {
- t.Errorf("Failed to set Mode, was %v", s.Mode())
- }
-
- go func() {
- SetMode(&d, someMode)
- }()
-
- if s.Mode() != someMode && s.Mode() != someOtherMode {
- t.Errorf("Failed to read either mode, was %v", s.Mode())
- }
-}
-
-func TestFileDataIsDirRace(t *testing.T) {
- t.Parallel()
-
- d := FileData{
- dir: true,
- }
-
- s := FileInfo{
- FileData: &d,
- }
-
- if s.IsDir() != true {
- t.Errorf("Failed to read correct value, was %v", s.IsDir())
- }
-
- go func() {
- s.Lock()
- d.dir = false
- s.Unlock()
- }()
-
- //just logging the value to trigger a read:
- t.Logf("Value is %v", s.IsDir())
-}
-
-func TestFileDataSizeRace(t *testing.T) {
- t.Parallel()
-
- const someData = "Hello"
- const someOtherDataSize = "Hello World"
-
- d := FileData{
- data: []byte(someData),
- dir: false,
- }
-
- s := FileInfo{
- FileData: &d,
- }
-
- if s.Size() != int64(len(someData)) {
- t.Errorf("Failed to read correct value, was %v", s.Size())
- }
-
- go func() {
- s.Lock()
- d.data = []byte(someOtherDataSize)
- s.Unlock()
- }()
-
- //just logging the value to trigger a read:
- t.Logf("Value is %v", s.Size())
-
- //Testing the Dir size case
- d.dir = true
- if s.Size() != int64(42) {
- t.Errorf("Failed to read correct value for dir, was %v", s.Size())
- }
-}
diff --git a/vendor/github.com/spf13/afero/memmap_test.go b/vendor/github.com/spf13/afero/memmap_test.go
deleted file mode 100644
index 47414ab14..000000000
--- a/vendor/github.com/spf13/afero/memmap_test.go
+++ /dev/null
@@ -1,451 +0,0 @@
-package afero
-
-import (
- "fmt"
- "io"
- "os"
- "path/filepath"
- "runtime"
- "testing"
- "time"
-)
-
-func TestNormalizePath(t *testing.T) {
- type test struct {
- input string
- expected string
- }
-
- data := []test{
- {".", FilePathSeparator},
- {"./", FilePathSeparator},
- {"..", FilePathSeparator},
- {"../", FilePathSeparator},
- {"./..", FilePathSeparator},
- {"./../", FilePathSeparator},
- }
-
- for i, d := range data {
- cpath := normalizePath(d.input)
- if d.expected != cpath {
- t.Errorf("Test %d failed. Expected %q got %q", i, d.expected, cpath)
- }
- }
-}
-
-func TestPathErrors(t *testing.T) {
- path := filepath.Join(".", "some", "path")
- path2 := filepath.Join(".", "different", "path")
- fs := NewMemMapFs()
- perm := os.FileMode(0755)
-
- // relevant functions:
- // func (m *MemMapFs) Chmod(name string, mode os.FileMode) error
- // func (m *MemMapFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- // func (m *MemMapFs) Create(name string) (File, error)
- // func (m *MemMapFs) Mkdir(name string, perm os.FileMode) error
- // func (m *MemMapFs) MkdirAll(path string, perm os.FileMode) error
- // func (m *MemMapFs) Open(name string) (File, error)
- // func (m *MemMapFs) OpenFile(name string, flag int, perm os.FileMode) (File, error)
- // func (m *MemMapFs) Remove(name string) error
- // func (m *MemMapFs) Rename(oldname, newname string) error
- // func (m *MemMapFs) Stat(name string) (os.FileInfo, error)
-
- err := fs.Chmod(path, perm)
- checkPathError(t, err, "Chmod")
-
- err = fs.Chtimes(path, time.Now(), time.Now())
- checkPathError(t, err, "Chtimes")
-
- // fs.Create doesn't return an error
-
- err = fs.Mkdir(path2, perm)
- if err != nil {
- t.Error(err)
- }
- err = fs.Mkdir(path2, perm)
- checkPathError(t, err, "Mkdir")
-
- err = fs.MkdirAll(path2, perm)
- if err != nil {
- t.Error("MkdirAll:", err)
- }
-
- _, err = fs.Open(path)
- checkPathError(t, err, "Open")
-
- _, err = fs.OpenFile(path, os.O_RDWR, perm)
- checkPathError(t, err, "OpenFile")
-
- err = fs.Remove(path)
- checkPathError(t, err, "Remove")
-
- err = fs.RemoveAll(path)
- if err != nil {
- t.Error("RemoveAll:", err)
- }
-
- err = fs.Rename(path, path2)
- checkPathError(t, err, "Rename")
-
- _, err = fs.Stat(path)
- checkPathError(t, err, "Stat")
-}
-
-func checkPathError(t *testing.T, err error, op string) {
- pathErr, ok := err.(*os.PathError)
- if !ok {
- t.Error(op+":", err, "is not a os.PathError")
- return
- }
- _, ok = pathErr.Err.(*os.PathError)
- if ok {
- t.Error(op+":", err, "contains another os.PathError")
- }
-}
-
-// Ensure Permissions are set on OpenFile/Mkdir/MkdirAll
-func TestPermSet(t *testing.T) {
- const fileName = "/myFileTest"
- const dirPath = "/myDirTest"
- const dirPathAll = "/my/path/to/dir"
-
- const fileMode = os.FileMode(0765)
- // directories will also have the directory bit set
- const dirMode = fileMode | os.ModeDir
-
- fs := NewMemMapFs()
-
- // Test Openfile
- f, err := fs.OpenFile(fileName, os.O_CREATE, fileMode)
- if err != nil {
- t.Errorf("OpenFile Create failed: %s", err)
- return
- }
- f.Close()
-
- s, err := fs.Stat(fileName)
- if err != nil {
- t.Errorf("Stat failed: %s", err)
- return
- }
- if s.Mode().String() != fileMode.String() {
- t.Errorf("Permissions Incorrect: %s != %s", s.Mode().String(), fileMode.String())
- return
- }
-
- // Test Mkdir
- err = fs.Mkdir(dirPath, dirMode)
- if err != nil {
- t.Errorf("MkDir Create failed: %s", err)
- return
- }
- s, err = fs.Stat(dirPath)
- if err != nil {
- t.Errorf("Stat failed: %s", err)
- return
- }
- // sets File
- if s.Mode().String() != dirMode.String() {
- t.Errorf("Permissions Incorrect: %s != %s", s.Mode().String(), dirMode.String())
- return
- }
-
- // Test MkdirAll
- err = fs.MkdirAll(dirPathAll, dirMode)
- if err != nil {
- t.Errorf("MkDir Create failed: %s", err)
- return
- }
- s, err = fs.Stat(dirPathAll)
- if err != nil {
- t.Errorf("Stat failed: %s", err)
- return
- }
- if s.Mode().String() != dirMode.String() {
- t.Errorf("Permissions Incorrect: %s != %s", s.Mode().String(), dirMode.String())
- return
- }
-}
-
-// Fails if multiple file objects use the same file.at counter in MemMapFs
-func TestMultipleOpenFiles(t *testing.T) {
- defer removeAllTestFiles(t)
- const fileName = "afero-demo2.txt"
-
- var data = make([][]byte, len(Fss))
-
- for i, fs := range Fss {
- dir := testDir(fs)
- path := filepath.Join(dir, fileName)
- fh1, err := fs.Create(path)
- if err != nil {
- t.Error("fs.Create failed: " + err.Error())
- }
- _, err = fh1.Write([]byte("test"))
- if err != nil {
- t.Error("fh.Write failed: " + err.Error())
- }
- _, err = fh1.Seek(0, os.SEEK_SET)
- if err != nil {
- t.Error(err)
- }
-
- fh2, err := fs.OpenFile(path, os.O_RDWR, 0777)
- if err != nil {
- t.Error("fs.OpenFile failed: " + err.Error())
- }
- _, err = fh2.Seek(0, os.SEEK_END)
- if err != nil {
- t.Error(err)
- }
- _, err = fh2.Write([]byte("data"))
- if err != nil {
- t.Error(err)
- }
- err = fh2.Close()
- if err != nil {
- t.Error(err)
- }
-
- _, err = fh1.Write([]byte("data"))
- if err != nil {
- t.Error(err)
- }
- err = fh1.Close()
- if err != nil {
- t.Error(err)
- }
- // the file now should contain "datadata"
- data[i], err = ReadFile(fs, path)
- if err != nil {
- t.Error(err)
- }
- }
-
- for i, fs := range Fss {
- if i == 0 {
- continue
- }
- if string(data[0]) != string(data[i]) {
- t.Errorf("%s and %s don't behave the same\n"+
- "%s: \"%s\"\n%s: \"%s\"\n",
- Fss[0].Name(), fs.Name(), Fss[0].Name(), data[0], fs.Name(), data[i])
- }
- }
-}
-
-// Test if file.Write() fails when opened as read only
-func TestReadOnly(t *testing.T) {
- defer removeAllTestFiles(t)
- const fileName = "afero-demo.txt"
-
- for _, fs := range Fss {
- dir := testDir(fs)
- path := filepath.Join(dir, fileName)
-
- f, err := fs.Create(path)
- if err != nil {
- t.Error(fs.Name()+":", "fs.Create failed: "+err.Error())
- }
- _, err = f.Write([]byte("test"))
- if err != nil {
- t.Error(fs.Name()+":", "Write failed: "+err.Error())
- }
- f.Close()
-
- f, err = fs.Open(path)
- if err != nil {
- t.Error("fs.Open failed: " + err.Error())
- }
- _, err = f.Write([]byte("data"))
- if err == nil {
- t.Error(fs.Name()+":", "No write error")
- }
- f.Close()
-
- f, err = fs.OpenFile(path, os.O_RDONLY, 0644)
- if err != nil {
- t.Error("fs.Open failed: " + err.Error())
- }
- _, err = f.Write([]byte("data"))
- if err == nil {
- t.Error(fs.Name()+":", "No write error")
- }
- f.Close()
- }
-}
-
-func TestWriteCloseTime(t *testing.T) {
- defer removeAllTestFiles(t)
- const fileName = "afero-demo.txt"
-
- for _, fs := range Fss {
- dir := testDir(fs)
- path := filepath.Join(dir, fileName)
-
- f, err := fs.Create(path)
- if err != nil {
- t.Error(fs.Name()+":", "fs.Create failed: "+err.Error())
- }
- f.Close()
-
- f, err = fs.Create(path)
- if err != nil {
- t.Error(fs.Name()+":", "fs.Create failed: "+err.Error())
- }
- fi, err := f.Stat()
- if err != nil {
- t.Error(fs.Name()+":", "Stat failed: "+err.Error())
- }
- timeBefore := fi.ModTime()
-
- // sorry for the delay, but we have to make sure time advances,
- // also on non Un*x systems...
- switch runtime.GOOS {
- case "windows":
- time.Sleep(2 * time.Second)
- case "darwin":
- time.Sleep(1 * time.Second)
- default: // depending on the FS, this may work with < 1 second, on my old ext3 it does not
- time.Sleep(1 * time.Second)
- }
-
- _, err = f.Write([]byte("test"))
- if err != nil {
- t.Error(fs.Name()+":", "Write failed: "+err.Error())
- }
- f.Close()
- fi, err = fs.Stat(path)
- if err != nil {
- t.Error(fs.Name()+":", "fs.Stat failed: "+err.Error())
- }
- if fi.ModTime().Equal(timeBefore) {
- t.Error(fs.Name()+":", "ModTime was not set on Close()")
- }
- }
-}
-
-// This test should be run with the race detector on:
-// go test -race -v -timeout 10s -run TestRacingDeleteAndClose
-func TestRacingDeleteAndClose(t *testing.T) {
- fs := NewMemMapFs()
- pathname := "testfile"
- f, err := fs.Create(pathname)
- if err != nil {
- t.Fatal(err)
- }
-
- in := make(chan bool)
-
- go func() {
- <-in
- f.Close()
- }()
- go func() {
- <-in
- fs.Remove(pathname)
- }()
- close(in)
-}
-
-// This test should be run with the race detector on:
-// go test -run TestMemFsDataRace -race
-func TestMemFsDataRace(t *testing.T) {
- const dir = "test_dir"
- fs := NewMemMapFs()
-
- if err := fs.MkdirAll(dir, 0777); err != nil {
- t.Fatal(err)
- }
-
- const n = 1000
- done := make(chan struct{})
-
- go func() {
- defer close(done)
- for i := 0; i < n; i++ {
- fname := filepath.Join(dir, fmt.Sprintf("%d.txt", i))
- if err := WriteFile(fs, fname, []byte(""), 0777); err != nil {
- panic(err)
- }
- if err := fs.Remove(fname); err != nil {
- panic(err)
- }
- }
- }()
-
-loop:
- for {
- select {
- case <-done:
- break loop
- default:
- _, err := ReadDir(fs, dir)
- if err != nil {
- t.Fatal(err)
- }
- }
- }
-}
-
-func TestMemFsDirMode(t *testing.T) {
- fs := NewMemMapFs()
- err := fs.Mkdir("/testDir1", 0644)
- if err != nil {
- t.Error(err)
- }
- err = fs.MkdirAll("/sub/testDir2", 0644)
- if err != nil {
- t.Error(err)
- }
- info, err := fs.Stat("/testDir1")
- if err != nil {
- t.Error(err)
- }
- if !info.IsDir() {
- t.Error("should be a directory")
- }
- if !info.Mode().IsDir() {
- t.Error("FileMode is not directory")
- }
- info, err = fs.Stat("/sub/testDir2")
- if err != nil {
- t.Error(err)
- }
- if !info.IsDir() {
- t.Error("should be a directory")
- }
- if !info.Mode().IsDir() {
- t.Error("FileMode is not directory")
- }
-}
-
-func TestMemFsUnexpectedEOF(t *testing.T) {
- t.Parallel()
-
- fs := NewMemMapFs()
-
- if err := WriteFile(fs, "file.txt", []byte("abc"), 0777); err != nil {
- t.Fatal(err)
- }
-
- f, err := fs.Open("file.txt")
- if err != nil {
- t.Fatal(err)
- }
- defer f.Close()
-
- // Seek beyond the end.
- _, err = f.Seek(512, 0)
- if err != nil {
- t.Fatal(err)
- }
-
- buff := make([]byte, 256)
- _, err = io.ReadAtLeast(f, buff, 256)
-
- if err != io.ErrUnexpectedEOF {
- t.Fatal("Expected ErrUnexpectedEOF")
- }
-}
diff --git a/vendor/github.com/spf13/afero/os.go b/vendor/github.com/spf13/afero/os.go
index 6b8bce1c5..13cc1b84c 100644
--- a/vendor/github.com/spf13/afero/os.go
+++ b/vendor/github.com/spf13/afero/os.go
@@ -19,6 +19,8 @@ import (
"time"
)
+var _ Lstater = (*OsFs)(nil)
+
// OsFs is a Fs implementation that uses functions provided by the os package.
//
// For details in any method, check the documentation of the os package
@@ -92,3 +94,8 @@ func (OsFs) Chmod(name string, mode os.FileMode) error {
func (OsFs) Chtimes(name string, atime time.Time, mtime time.Time) error {
return os.Chtimes(name, atime, mtime)
}
+
+func (OsFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
+ fi, err := os.Lstat(name)
+ return fi, true, err
+}
diff --git a/vendor/github.com/spf13/afero/path.go b/vendor/github.com/spf13/afero/path.go
index 1d90e46dd..18f60a0f6 100644
--- a/vendor/github.com/spf13/afero/path.go
+++ b/vendor/github.com/spf13/afero/path.go
@@ -60,7 +60,7 @@ func walk(fs Fs, path string, info os.FileInfo, walkFn filepath.WalkFunc) error
for _, name := range names {
filename := filepath.Join(path, name)
- fileInfo, err := lstatIfOs(fs, filename)
+ fileInfo, err := lstatIfPossible(fs, filename)
if err != nil {
if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir {
return err
@@ -77,15 +77,13 @@ func walk(fs Fs, path string, info os.FileInfo, walkFn filepath.WalkFunc) error
return nil
}
-// if the filesystem is OsFs use Lstat, else use fs.Stat
-func lstatIfOs(fs Fs, path string) (info os.FileInfo, err error) {
- _, ok := fs.(*OsFs)
- if ok {
- info, err = os.Lstat(path)
- } else {
- info, err = fs.Stat(path)
+// if the filesystem supports it, use Lstat, else use fs.Stat
+func lstatIfPossible(fs Fs, path string) (os.FileInfo, error) {
+ if lfs, ok := fs.(Lstater); ok {
+ fi, _, err := lfs.LstatIfPossible(path)
+ return fi, err
}
- return
+ return fs.Stat(path)
}
// Walk walks the file tree rooted at root, calling walkFn for each file or
@@ -100,7 +98,7 @@ func (a Afero) Walk(root string, walkFn filepath.WalkFunc) error {
}
func Walk(fs Fs, root string, walkFn filepath.WalkFunc) error {
- info, err := lstatIfOs(fs, root)
+ info, err := lstatIfPossible(fs, root)
if err != nil {
return walkFn(root, nil, err)
}
diff --git a/vendor/github.com/spf13/afero/path_test.go b/vendor/github.com/spf13/afero/path_test.go
deleted file mode 100644
index 104a6bcbe..000000000
--- a/vendor/github.com/spf13/afero/path_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright © 2014 Steve Francia <spf@spf13.com>.
-// Copyright 2009 The Go Authors. All rights reserved.
-//
-// 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.
-
-package afero
-
-import (
- "fmt"
- "os"
- "testing"
-)
-
-func TestWalk(t *testing.T) {
- defer removeAllTestFiles(t)
- var testDir string
- for i, fs := range Fss {
- if i == 0 {
- testDir = setupTestDirRoot(t, fs)
- } else {
- setupTestDirReusePath(t, fs, testDir)
- }
- }
-
- outputs := make([]string, len(Fss))
- for i, fs := range Fss {
- walkFn := func(path string, info os.FileInfo, err error) error {
- if err != nil {
- t.Error("walkFn err:", err)
- }
- var size int64
- if !info.IsDir() {
- size = info.Size()
- }
- outputs[i] += fmt.Sprintln(path, info.Name(), size, info.IsDir(), err)
- return nil
- }
- err := Walk(fs, testDir, walkFn)
- if err != nil {
- t.Error(err)
- }
- }
- fail := false
- for i, o := range outputs {
- if i == 0 {
- continue
- }
- if o != outputs[i-1] {
- fail = true
- break
- }
- }
- if fail {
- t.Log("Walk outputs not equal!")
- for i, o := range outputs {
- t.Log(Fss[i].Name() + "\n" + o)
- }
- t.Fail()
- }
-}
diff --git a/vendor/github.com/spf13/afero/readonlyfs.go b/vendor/github.com/spf13/afero/readonlyfs.go
index f1fa55bcf..c6376ec37 100644
--- a/vendor/github.com/spf13/afero/readonlyfs.go
+++ b/vendor/github.com/spf13/afero/readonlyfs.go
@@ -6,6 +6,8 @@ import (
"time"
)
+var _ Lstater = (*ReadOnlyFs)(nil)
+
type ReadOnlyFs struct {
source Fs
}
@@ -34,6 +36,14 @@ func (r *ReadOnlyFs) Stat(name string) (os.FileInfo, error) {
return r.source.Stat(name)
}
+func (r *ReadOnlyFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
+ if lsf, ok := r.source.(Lstater); ok {
+ return lsf.LstatIfPossible(name)
+ }
+ fi, err := r.Stat(name)
+ return fi, false, err
+}
+
func (r *ReadOnlyFs) Rename(o, n string) error {
return syscall.EPERM
}
diff --git a/vendor/github.com/spf13/afero/ro_regexp_test.go b/vendor/github.com/spf13/afero/ro_regexp_test.go
deleted file mode 100644
index ef8a35d0d..000000000
--- a/vendor/github.com/spf13/afero/ro_regexp_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package afero
-
-import (
- "regexp"
- "testing"
-)
-
-func TestFilterReadOnly(t *testing.T) {
- fs := &ReadOnlyFs{source: &MemMapFs{}}
- _, err := fs.Create("/file.txt")
- if err == nil {
- t.Errorf("Did not fail to create file")
- }
- // t.Logf("ERR=%s", err)
-}
-
-func TestFilterReadonlyRemoveAndRead(t *testing.T) {
- mfs := &MemMapFs{}
- fh, err := mfs.Create("/file.txt")
- fh.Write([]byte("content here"))
- fh.Close()
-
- fs := NewReadOnlyFs(mfs)
- err = fs.Remove("/file.txt")
- if err == nil {
- t.Errorf("Did not fail to remove file")
- }
-
- fh, err = fs.Open("/file.txt")
- if err != nil {
- t.Errorf("Failed to open file: %s", err)
- }
-
- buf := make([]byte, len("content here"))
- _, err = fh.Read(buf)
- fh.Close()
- if string(buf) != "content here" {
- t.Errorf("Failed to read file: %s", err)
- }
-
- err = mfs.Remove("/file.txt")
- if err != nil {
- t.Errorf("Failed to remove file")
- }
-
- fh, err = fs.Open("/file.txt")
- if err == nil {
- fh.Close()
- t.Errorf("File still present")
- }
-}
-
-func TestFilterRegexp(t *testing.T) {
- fs := NewRegexpFs(&MemMapFs{}, regexp.MustCompile(`\.txt$`))
- _, err := fs.Create("/file.html")
- if err == nil {
-
- t.Errorf("Did not fail to create file")
- }
- // t.Logf("ERR=%s", err)
-}
-
-func TestFilterRORegexpChain(t *testing.T) {
- rofs := &ReadOnlyFs{source: &MemMapFs{}}
- fs := &RegexpFs{re: regexp.MustCompile(`\.txt$`), source: rofs}
- _, err := fs.Create("/file.txt")
- if err == nil {
- t.Errorf("Did not fail to create file")
- }
- // t.Logf("ERR=%s", err)
-}
-
-func TestFilterRegexReadDir(t *testing.T) {
- mfs := &MemMapFs{}
- fs1 := &RegexpFs{re: regexp.MustCompile(`\.txt$`), source: mfs}
- fs := &RegexpFs{re: regexp.MustCompile(`^a`), source: fs1}
-
- mfs.MkdirAll("/dir/sub", 0777)
- for _, name := range []string{"afile.txt", "afile.html", "bfile.txt"} {
- for _, dir := range []string{"/dir/", "/dir/sub/"} {
- fh, _ := mfs.Create(dir + name)
- fh.Close()
- }
- }
-
- files, _ := ReadDir(fs, "/dir")
- if len(files) != 2 { // afile.txt, sub
- t.Errorf("Got wrong number of files: %#v", files)
- }
-
- f, _ := fs.Open("/dir/sub")
- names, _ := f.Readdirnames(-1)
- if len(names) != 1 {
- t.Errorf("Got wrong number of names: %v", names)
- }
-}
diff --git a/vendor/github.com/spf13/afero/sftpfs/file.go b/vendor/github.com/spf13/afero/sftpfs/file.go
deleted file mode 100644
index e4ccb55c0..000000000
--- a/vendor/github.com/spf13/afero/sftpfs/file.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright © 2015 Jerry Jacobs <jerry.jacobs@xor-gate.org>.
-//
-// 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.
-
-package sftpfs
-
-import (
- "github.com/pkg/sftp"
- "os"
-)
-
-type File struct {
- fd *sftp.File
-}
-
-func FileOpen(s *sftp.Client, name string) (*File, error) {
- fd, err := s.Open(name)
- if err != nil {
- return &File{}, err
- }
- return &File{fd: fd}, nil
-}
-
-func FileCreate(s *sftp.Client, name string) (*File, error) {
- fd, err := s.Create(name)
- if err != nil {
- return &File{}, err
- }
- return &File{fd: fd}, nil
-}
-
-func (f *File) Close() error {
- return f.fd.Close()
-}
-
-func (f *File) Name() string {
- return f.fd.Name()
-}
-
-func (f *File) Stat() (os.FileInfo, error) {
- return f.fd.Stat()
-}
-
-func (f *File) Sync() error {
- return nil
-}
-
-func (f *File) Truncate(size int64) error {
- return f.fd.Truncate(size)
-}
-
-func (f *File) Read(b []byte) (n int, err error) {
- return f.fd.Read(b)
-}
-
-// TODO
-func (f *File) ReadAt(b []byte, off int64) (n int, err error) {
- return 0, nil
-}
-
-// TODO
-func (f *File) Readdir(count int) (res []os.FileInfo, err error) {
- return nil, nil
-}
-
-// TODO
-func (f *File) Readdirnames(n int) (names []string, err error) {
- return nil, nil
-}
-
-func (f *File) Seek(offset int64, whence int) (int64, error) {
- return f.fd.Seek(offset, whence)
-}
-
-func (f *File) Write(b []byte) (n int, err error) {
- return f.fd.Write(b)
-}
-
-// TODO
-func (f *File) WriteAt(b []byte, off int64) (n int, err error) {
- return 0, nil
-}
-
-func (f *File) WriteString(s string) (ret int, err error) {
- return f.fd.Write([]byte(s))
-}
diff --git a/vendor/github.com/spf13/afero/sftpfs/sftp.go b/vendor/github.com/spf13/afero/sftpfs/sftp.go
deleted file mode 100644
index 28721da76..000000000
--- a/vendor/github.com/spf13/afero/sftpfs/sftp.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright © 2015 Jerry Jacobs <jerry.jacobs@xor-gate.org>.
-//
-// 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.
-
-package sftpfs
-
-import (
- "os"
- "time"
-
- "github.com/pkg/sftp"
- "github.com/spf13/afero"
-)
-
-// Fs is a afero.Fs implementation that uses functions provided by the sftp package.
-//
-// For details in any method, check the documentation of the sftp package
-// (github.com/pkg/sftp).
-type Fs struct {
- client *sftp.Client
-}
-
-func New(client *sftp.Client) afero.Fs {
- return &Fs{client: client}
-}
-
-func (s Fs) Name() string { return "sftpfs" }
-
-func (s Fs) Create(name string) (afero.File, error) {
- return FileCreate(s.client, name)
-}
-
-func (s Fs) Mkdir(name string, perm os.FileMode) error {
- err := s.client.Mkdir(name)
- if err != nil {
- return err
- }
- return s.client.Chmod(name, perm)
-}
-
-func (s Fs) MkdirAll(path string, perm os.FileMode) error {
- // Fast path: if we can tell whether path is a directory or file, stop with success or error.
- dir, err := s.Stat(path)
- if err == nil {
- if dir.IsDir() {
- return nil
- }
- return err
- }
-
- // Slow path: make sure parent exists and then call Mkdir for path.
- i := len(path)
- for i > 0 && os.IsPathSeparator(path[i-1]) { // Skip trailing path separator.
- i--
- }
-
- j := i
- for j > 0 && !os.IsPathSeparator(path[j-1]) { // Scan backward over element.
- j--
- }
-
- if j > 1 {
- // Create parent
- err = s.MkdirAll(path[0:j-1], perm)
- if err != nil {
- return err
- }
- }
-
- // Parent now exists; invoke Mkdir and use its result.
- err = s.Mkdir(path, perm)
- if err != nil {
- // Handle arguments like "foo/." by
- // double-checking that directory doesn't exist.
- dir, err1 := s.Lstat(path)
- if err1 == nil && dir.IsDir() {
- return nil
- }
- return err
- }
- return nil
-}
-
-func (s Fs) Open(name string) (afero.File, error) {
- return FileOpen(s.client, name)
-}
-
-func (s Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) {
- return nil, nil
-}
-
-func (s Fs) Remove(name string) error {
- return s.client.Remove(name)
-}
-
-func (s Fs) RemoveAll(path string) error {
- // TODO have a look at os.RemoveAll
- // https://github.com/golang/go/blob/master/src/os/path.go#L66
- return nil
-}
-
-func (s Fs) Rename(oldname, newname string) error {
- return s.client.Rename(oldname, newname)
-}
-
-func (s Fs) Stat(name string) (os.FileInfo, error) {
- return s.client.Stat(name)
-}
-
-func (s Fs) Lstat(p string) (os.FileInfo, error) {
- return s.client.Lstat(p)
-}
-
-func (s Fs) Chmod(name string, mode os.FileMode) error {
- return s.client.Chmod(name, mode)
-}
-
-func (s Fs) Chtimes(name string, atime time.Time, mtime time.Time) error {
- return s.client.Chtimes(name, atime, mtime)
-}
diff --git a/vendor/github.com/spf13/afero/sftpfs/sftp_test_go b/vendor/github.com/spf13/afero/sftpfs/sftp_test_go
deleted file mode 100644
index bb00535d8..000000000
--- a/vendor/github.com/spf13/afero/sftpfs/sftp_test_go
+++ /dev/null
@@ -1,286 +0,0 @@
-// Copyright © 2015 Jerry Jacobs <jerry.jacobs@xor-gate.org>.
-//
-// 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.
-
-package afero
-
-import (
- "testing"
- "os"
- "log"
- "fmt"
- "net"
- "flag"
- "time"
- "io/ioutil"
- "crypto/rsa"
- _rand "crypto/rand"
- "encoding/pem"
- "crypto/x509"
-
- "golang.org/x/crypto/ssh"
- "github.com/pkg/sftp"
-)
-
-type SftpFsContext struct {
- sshc *ssh.Client
- sshcfg *ssh.ClientConfig
- sftpc *sftp.Client
-}
-
-// TODO we only connect with hardcoded user+pass for now
-// it should be possible to use $HOME/.ssh/id_rsa to login into the stub sftp server
-func SftpConnect(user, password, host string) (*SftpFsContext, error) {
-/*
- pemBytes, err := ioutil.ReadFile(os.Getenv("HOME") + "/.ssh/id_rsa")
- if err != nil {
- return nil,err
- }
-
- signer, err := ssh.ParsePrivateKey(pemBytes)
- if err != nil {
- return nil,err
- }
-
- sshcfg := &ssh.ClientConfig{
- User: user,
- Auth: []ssh.AuthMethod{
- ssh.Password(password),
- ssh.PublicKeys(signer),
- },
- }
-*/
-
- sshcfg := &ssh.ClientConfig{
- User: user,
- Auth: []ssh.AuthMethod{
- ssh.Password(password),
- },
- }
-
- sshc, err := ssh.Dial("tcp", host, sshcfg)
- if err != nil {
- return nil,err
- }
-
- sftpc, err := sftp.NewClient(sshc)
- if err != nil {
- return nil,err
- }
-
- ctx := &SftpFsContext{
- sshc: sshc,
- sshcfg: sshcfg,
- sftpc: sftpc,
- }
-
- return ctx,nil
-}
-
-func (ctx *SftpFsContext) Disconnect() error {
- ctx.sftpc.Close()
- ctx.sshc.Close()
- return nil
-}
-
-// TODO for such a weird reason rootpath is "." when writing "file1" with afero sftp backend
-func RunSftpServer(rootpath string) {
- var (
- readOnly bool
- debugLevelStr string
- debugLevel int
- debugStderr bool
- rootDir string
- )
-
- flag.BoolVar(&readOnly, "R", false, "read-only server")
- flag.BoolVar(&debugStderr, "e", true, "debug to stderr")
- flag.StringVar(&debugLevelStr, "l", "none", "debug level")
- flag.StringVar(&rootDir, "root", rootpath, "root directory")
- flag.Parse()
-
- debugStream := ioutil.Discard
- if debugStderr {
- debugStream = os.Stderr
- debugLevel = 1
- }
-
- // An SSH server is represented by a ServerConfig, which holds
- // certificate details and handles authentication of ServerConns.
- config := &ssh.ServerConfig{
- PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
- // Should use constant-time compare (or better, salt+hash) in
- // a production setting.
- fmt.Fprintf(debugStream, "Login: %s\n", c.User())
- if c.User() == "test" && string(pass) == "test" {
- return nil, nil
- }
- return nil, fmt.Errorf("password rejected for %q", c.User())
- },
- }
-
- privateBytes, err := ioutil.ReadFile("./test/id_rsa")
- if err != nil {
- log.Fatal("Failed to load private key", err)
- }
-
- private, err := ssh.ParsePrivateKey(privateBytes)
- if err != nil {
- log.Fatal("Failed to parse private key", err)
- }
-
- config.AddHostKey(private)
-
- // Once a ServerConfig has been configured, connections can be
- // accepted.
- listener, err := net.Listen("tcp", "0.0.0.0:2022")
- if err != nil {
- log.Fatal("failed to listen for connection", err)
- }
- fmt.Printf("Listening on %v\n", listener.Addr())
-
- nConn, err := listener.Accept()
- if err != nil {
- log.Fatal("failed to accept incoming connection", err)
- }
-
- // Before use, a handshake must be performed on the incoming
- // net.Conn.
- _, chans, reqs, err := ssh.NewServerConn(nConn, config)
- if err != nil {
- log.Fatal("failed to handshake", err)
- }
- fmt.Fprintf(debugStream, "SSH server established\n")
-
- // The incoming Request channel must be serviced.
- go ssh.DiscardRequests(reqs)
-
- // Service the incoming Channel channel.
- for newChannel := range chans {
- // Channels have a type, depending on the application level
- // protocol intended. In the case of an SFTP session, this is "subsystem"
- // with a payload string of "<length=4>sftp"
- fmt.Fprintf(debugStream, "Incoming channel: %s\n", newChannel.ChannelType())
- if newChannel.ChannelType() != "session" {
- newChannel.Reject(ssh.UnknownChannelType, "unknown channel type")
- fmt.Fprintf(debugStream, "Unknown channel type: %s\n", newChannel.ChannelType())
- continue
- }
- channel, requests, err := newChannel.Accept()
- if err != nil {
- log.Fatal("could not accept channel.", err)
- }
- fmt.Fprintf(debugStream, "Channel accepted\n")
-
- // Sessions have out-of-band requests such as "shell",
- // "pty-req" and "env". Here we handle only the
- // "subsystem" request.
- go func(in <-chan *ssh.Request) {
- for req := range in {
- fmt.Fprintf(debugStream, "Request: %v\n", req.Type)
- ok := false
- switch req.Type {
- case "subsystem":
- fmt.Fprintf(debugStream, "Subsystem: %s\n", req.Payload[4:])
- if string(req.Payload[4:]) == "sftp" {
- ok = true
- }
- }
- fmt.Fprintf(debugStream, " - accepted: %v\n", ok)
- req.Reply(ok, nil)
- }
- }(requests)
-
- server, err := sftp.NewServer(channel, channel, debugStream, debugLevel, readOnly, rootpath)
- if err != nil {
- log.Fatal(err)
- }
- if err := server.Serve(); err != nil {
- log.Fatal("sftp server completed with error:", err)
- }
- }
-}
-
-// MakeSSHKeyPair make a pair of public and private keys for SSH access.
-// Public key is encoded in the format for inclusion in an OpenSSH authorized_keys file.
-// Private Key generated is PEM encoded
-func MakeSSHKeyPair(bits int, pubKeyPath, privateKeyPath string) error {
- privateKey, err := rsa.GenerateKey(_rand.Reader, bits)
- if err != nil {
- return err
- }
-
- // generate and write private key as PEM
- privateKeyFile, err := os.Create(privateKeyPath)
- defer privateKeyFile.Close()
- if err != nil {
- return err
- }
-
- privateKeyPEM := &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(privateKey)}
- if err := pem.Encode(privateKeyFile, privateKeyPEM); err != nil {
- return err
- }
-
- // generate and write public key
- pub, err := ssh.NewPublicKey(&privateKey.PublicKey)
- if err != nil {
- return err
- }
-
- return ioutil.WriteFile(pubKeyPath, ssh.MarshalAuthorizedKey(pub), 0655)
-}
-
-func TestSftpCreate(t *testing.T) {
- os.Mkdir("./test", 0777)
- MakeSSHKeyPair(1024, "./test/id_rsa.pub", "./test/id_rsa")
-
- go RunSftpServer("./test/")
- time.Sleep(5 * time.Second)
-
- ctx, err := SftpConnect("test", "test", "localhost:2022")
- if err != nil {
- t.Fatal(err)
- }
- defer ctx.Disconnect()
-
- var AppFs Fs = SftpFs{
- SftpClient: ctx.sftpc,
- }
-
- AppFs.MkdirAll("test/dir1/dir2/dir3", os.FileMode(0777))
- AppFs.Mkdir("test/foo", os.FileMode(0000))
- AppFs.Chmod("test/foo", os.FileMode(0700))
- AppFs.Mkdir("test/bar", os.FileMode(0777))
-
- file, err := AppFs.Create("file1")
- if err != nil {
- t.Error(err)
- }
- defer file.Close()
-
- file.Write([]byte("hello\t"))
- file.WriteString("world!\n")
-
- f1, err := AppFs.Open("file1")
- if err != nil {
- log.Fatalf("open: %v", err)
- }
- defer f1.Close()
-
- b := make([]byte, 100)
-
- _, err = f1.Read(b)
- fmt.Println(string(b))
-
- // TODO check here if "hello\tworld\n" is in buffer b
-}
diff --git a/vendor/github.com/spf13/afero/unionFile.go b/vendor/github.com/spf13/afero/unionFile.go
index 99f9e5db2..1e78f7d1e 100644
--- a/vendor/github.com/spf13/afero/unionFile.go
+++ b/vendor/github.com/spf13/afero/unionFile.go
@@ -21,32 +21,33 @@ import (
// successful read in the overlay will move the cursor position in the base layer
// by the number of bytes read.
type UnionFile struct {
- base File
- layer File
- off int
- files []os.FileInfo
+ Base File
+ Layer File
+ Merger DirsMerger
+ off int
+ files []os.FileInfo
}
func (f *UnionFile) Close() error {
// first close base, so we have a newer timestamp in the overlay. If we'd close
// the overlay first, we'd get a cacheStale the next time we access this file
// -> cache would be useless ;-)
- if f.base != nil {
- f.base.Close()
+ if f.Base != nil {
+ f.Base.Close()
}
- if f.layer != nil {
- return f.layer.Close()
+ if f.Layer != nil {
+ return f.Layer.Close()
}
return BADFD
}
func (f *UnionFile) Read(s []byte) (int, error) {
- if f.layer != nil {
- n, err := f.layer.Read(s)
- if (err == nil || err == io.EOF) && f.base != nil {
+ if f.Layer != nil {
+ n, err := f.Layer.Read(s)
+ if (err == nil || err == io.EOF) && f.Base != nil {
// advance the file position also in the base file, the next
// call may be a write at this position (or a seek with SEEK_CUR)
- if _, seekErr := f.base.Seek(int64(n), os.SEEK_CUR); seekErr != nil {
+ if _, seekErr := f.Base.Seek(int64(n), os.SEEK_CUR); seekErr != nil {
// only overwrite err in case the seek fails: we need to
// report an eventual io.EOF to the caller
err = seekErr
@@ -54,105 +55,135 @@ func (f *UnionFile) Read(s []byte) (int, error) {
}
return n, err
}
- if f.base != nil {
- return f.base.Read(s)
+ if f.Base != nil {
+ return f.Base.Read(s)
}
return 0, BADFD
}
func (f *UnionFile) ReadAt(s []byte, o int64) (int, error) {
- if f.layer != nil {
- n, err := f.layer.ReadAt(s, o)
- if (err == nil || err == io.EOF) && f.base != nil {
- _, err = f.base.Seek(o+int64(n), os.SEEK_SET)
+ if f.Layer != nil {
+ n, err := f.Layer.ReadAt(s, o)
+ if (err == nil || err == io.EOF) && f.Base != nil {
+ _, err = f.Base.Seek(o+int64(n), os.SEEK_SET)
}
return n, err
}
- if f.base != nil {
- return f.base.ReadAt(s, o)
+ if f.Base != nil {
+ return f.Base.ReadAt(s, o)
}
return 0, BADFD
}
func (f *UnionFile) Seek(o int64, w int) (pos int64, err error) {
- if f.layer != nil {
- pos, err = f.layer.Seek(o, w)
- if (err == nil || err == io.EOF) && f.base != nil {
- _, err = f.base.Seek(o, w)
+ if f.Layer != nil {
+ pos, err = f.Layer.Seek(o, w)
+ if (err == nil || err == io.EOF) && f.Base != nil {
+ _, err = f.Base.Seek(o, w)
}
return pos, err
}
- if f.base != nil {
- return f.base.Seek(o, w)
+ if f.Base != nil {
+ return f.Base.Seek(o, w)
}
return 0, BADFD
}
func (f *UnionFile) Write(s []byte) (n int, err error) {
- if f.layer != nil {
- n, err = f.layer.Write(s)
- if err == nil && f.base != nil { // hmm, do we have fixed size files where a write may hit the EOF mark?
- _, err = f.base.Write(s)
+ if f.Layer != nil {
+ n, err = f.Layer.Write(s)
+ if err == nil && f.Base != nil { // hmm, do we have fixed size files where a write may hit the EOF mark?
+ _, err = f.Base.Write(s)
}
return n, err
}
- if f.base != nil {
- return f.base.Write(s)
+ if f.Base != nil {
+ return f.Base.Write(s)
}
return 0, BADFD
}
func (f *UnionFile) WriteAt(s []byte, o int64) (n int, err error) {
- if f.layer != nil {
- n, err = f.layer.WriteAt(s, o)
- if err == nil && f.base != nil {
- _, err = f.base.WriteAt(s, o)
+ if f.Layer != nil {
+ n, err = f.Layer.WriteAt(s, o)
+ if err == nil && f.Base != nil {
+ _, err = f.Base.WriteAt(s, o)
}
return n, err
}
- if f.base != nil {
- return f.base.WriteAt(s, o)
+ if f.Base != nil {
+ return f.Base.WriteAt(s, o)
}
return 0, BADFD
}
func (f *UnionFile) Name() string {
- if f.layer != nil {
- return f.layer.Name()
+ if f.Layer != nil {
+ return f.Layer.Name()
}
- return f.base.Name()
+ return f.Base.Name()
+}
+
+// DirsMerger is how UnionFile weaves two directories together.
+// It takes the FileInfo slices from the layer and the base and returns a
+// single view.
+type DirsMerger func(lofi, bofi []os.FileInfo) ([]os.FileInfo, error)
+
+var defaultUnionMergeDirsFn = func(lofi, bofi []os.FileInfo) ([]os.FileInfo, error) {
+ var files = make(map[string]os.FileInfo)
+
+ for _, fi := range lofi {
+ files[fi.Name()] = fi
+ }
+
+ for _, fi := range bofi {
+ if _, exists := files[fi.Name()]; !exists {
+ files[fi.Name()] = fi
+ }
+ }
+
+ rfi := make([]os.FileInfo, len(files))
+
+ i := 0
+ for _, fi := range files {
+ rfi[i] = fi
+ i++
+ }
+
+ return rfi, nil
+
}
// Readdir will weave the two directories together and
// return a single view of the overlayed directories
func (f *UnionFile) Readdir(c int) (ofi []os.FileInfo, err error) {
+ var merge DirsMerger = f.Merger
+ if merge == nil {
+ merge = defaultUnionMergeDirsFn
+ }
+
if f.off == 0 {
- var files = make(map[string]os.FileInfo)
- var rfi []os.FileInfo
- if f.layer != nil {
- rfi, err = f.layer.Readdir(-1)
+ var lfi []os.FileInfo
+ if f.Layer != nil {
+ lfi, err = f.Layer.Readdir(-1)
if err != nil {
return nil, err
}
- for _, fi := range rfi {
- files[fi.Name()] = fi
- }
}
- if f.base != nil {
- rfi, err = f.base.Readdir(-1)
+ var bfi []os.FileInfo
+ if f.Base != nil {
+ bfi, err = f.Base.Readdir(-1)
if err != nil {
return nil, err
}
- for _, fi := range rfi {
- if _, exists := files[fi.Name()]; !exists {
- files[fi.Name()] = fi
- }
- }
+
}
- for _, fi := range files {
- f.files = append(f.files, fi)
+ merged, err := merge(lfi, bfi)
+ if err != nil {
+ return nil, err
}
+ f.files = append(f.files, merged...)
}
if c == -1 {
return f.files[f.off:], nil
@@ -174,53 +205,53 @@ func (f *UnionFile) Readdirnames(c int) ([]string, error) {
}
func (f *UnionFile) Stat() (os.FileInfo, error) {
- if f.layer != nil {
- return f.layer.Stat()
+ if f.Layer != nil {
+ return f.Layer.Stat()
}
- if f.base != nil {
- return f.base.Stat()
+ if f.Base != nil {
+ return f.Base.Stat()
}
return nil, BADFD
}
func (f *UnionFile) Sync() (err error) {
- if f.layer != nil {
- err = f.layer.Sync()
- if err == nil && f.base != nil {
- err = f.base.Sync()
+ if f.Layer != nil {
+ err = f.Layer.Sync()
+ if err == nil && f.Base != nil {
+ err = f.Base.Sync()
}
return err
}
- if f.base != nil {
- return f.base.Sync()
+ if f.Base != nil {
+ return f.Base.Sync()
}
return BADFD
}
func (f *UnionFile) Truncate(s int64) (err error) {
- if f.layer != nil {
- err = f.layer.Truncate(s)
- if err == nil && f.base != nil {
- err = f.base.Truncate(s)
+ if f.Layer != nil {
+ err = f.Layer.Truncate(s)
+ if err == nil && f.Base != nil {
+ err = f.Base.Truncate(s)
}
return err
}
- if f.base != nil {
- return f.base.Truncate(s)
+ if f.Base != nil {
+ return f.Base.Truncate(s)
}
return BADFD
}
func (f *UnionFile) WriteString(s string) (n int, err error) {
- if f.layer != nil {
- n, err = f.layer.WriteString(s)
- if err == nil && f.base != nil {
- _, err = f.base.WriteString(s)
+ if f.Layer != nil {
+ n, err = f.Layer.WriteString(s)
+ if err == nil && f.Base != nil {
+ _, err = f.Base.WriteString(s)
}
return n, err
}
- if f.base != nil {
- return f.base.WriteString(s)
+ if f.Base != nil {
+ return f.Base.WriteString(s)
}
return 0, BADFD
}
diff --git a/vendor/github.com/spf13/afero/util_test.go b/vendor/github.com/spf13/afero/util_test.go
deleted file mode 100644
index b5852f184..000000000
--- a/vendor/github.com/spf13/afero/util_test.go
+++ /dev/null
@@ -1,450 +0,0 @@
-// Copyright ©2015 Steve Francia <spf@spf13.com>
-// Portions Copyright ©2015 The Hugo Authors
-//
-//
-// 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.
-//
-
-package afero
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "strconv"
- "strings"
- "testing"
- "time"
-)
-
-var testFS = new(MemMapFs)
-
-func TestDirExists(t *testing.T) {
- type test struct {
- input string
- expected bool
- }
-
- // First create a couple directories so there is something in the filesystem
- //testFS := new(MemMapFs)
- testFS.MkdirAll("/foo/bar", 0777)
-
- data := []test{
- {".", true},
- {"./", true},
- {"..", true},
- {"../", true},
- {"./..", true},
- {"./../", true},
- {"/foo/", true},
- {"/foo", true},
- {"/foo/bar", true},
- {"/foo/bar/", true},
- {"/", true},
- {"/some-really-random-directory-name", false},
- {"/some/really/random/directory/name", false},
- {"./some-really-random-local-directory-name", false},
- {"./some/really/random/local/directory/name", false},
- }
-
- for i, d := range data {
- exists, _ := DirExists(testFS, filepath.FromSlash(d.input))
- if d.expected != exists {
- t.Errorf("Test %d %q failed. Expected %t got %t", i, d.input, d.expected, exists)
- }
- }
-}
-
-func TestIsDir(t *testing.T) {
- testFS = new(MemMapFs)
-
- type test struct {
- input string
- expected bool
- }
- data := []test{
- {"./", true},
- {"/", true},
- {"./this-directory-does-not-existi", false},
- {"/this-absolute-directory/does-not-exist", false},
- }
-
- for i, d := range data {
-
- exists, _ := IsDir(testFS, d.input)
- if d.expected != exists {
- t.Errorf("Test %d failed. Expected %t got %t", i, d.expected, exists)
- }
- }
-}
-
-func TestIsEmpty(t *testing.T) {
- testFS = new(MemMapFs)
-
- zeroSizedFile, _ := createZeroSizedFileInTempDir()
- defer deleteFileInTempDir(zeroSizedFile)
- nonZeroSizedFile, _ := createNonZeroSizedFileInTempDir()
- defer deleteFileInTempDir(nonZeroSizedFile)
- emptyDirectory, _ := createEmptyTempDir()
- defer deleteTempDir(emptyDirectory)
- nonEmptyZeroLengthFilesDirectory, _ := createTempDirWithZeroLengthFiles()
- defer deleteTempDir(nonEmptyZeroLengthFilesDirectory)
- nonEmptyNonZeroLengthFilesDirectory, _ := createTempDirWithNonZeroLengthFiles()
- defer deleteTempDir(nonEmptyNonZeroLengthFilesDirectory)
- nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt"
- nonExistentDir := os.TempDir() + "/this/direcotry/does/not/exist/"
-
- fileDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentFile)
- dirDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentDir)
-
- type test struct {
- input string
- expectedResult bool
- expectedErr error
- }
-
- data := []test{
- {zeroSizedFile.Name(), true, nil},
- {nonZeroSizedFile.Name(), false, nil},
- {emptyDirectory, true, nil},
- {nonEmptyZeroLengthFilesDirectory, false, nil},
- {nonEmptyNonZeroLengthFilesDirectory, false, nil},
- {nonExistentFile, false, fileDoesNotExist},
- {nonExistentDir, false, dirDoesNotExist},
- }
- for i, d := range data {
- exists, err := IsEmpty(testFS, d.input)
- if d.expectedResult != exists {
- t.Errorf("Test %d %q failed exists. Expected result %t got %t", i, d.input, d.expectedResult, exists)
- }
- if d.expectedErr != nil {
- if d.expectedErr.Error() != err.Error() {
- t.Errorf("Test %d failed with err. Expected %q(%#v) got %q(%#v)", i, d.expectedErr, d.expectedErr, err, err)
- }
- } else {
- if d.expectedErr != err {
- t.Errorf("Test %d failed. Expected error %q(%#v) got %q(%#v)", i, d.expectedErr, d.expectedErr, err, err)
- }
- }
- }
-}
-
-func TestReaderContains(t *testing.T) {
- for i, this := range []struct {
- v1 string
- v2 [][]byte
- expect bool
- }{
- {"abc", [][]byte{[]byte("a")}, true},
- {"abc", [][]byte{[]byte("b")}, true},
- {"abcdefg", [][]byte{[]byte("efg")}, true},
- {"abc", [][]byte{[]byte("d")}, false},
- {"abc", [][]byte{[]byte("d"), []byte("e")}, false},
- {"abc", [][]byte{[]byte("d"), []byte("a")}, true},
- {"abc", [][]byte{[]byte("b"), []byte("e")}, true},
- {"", nil, false},
- {"", [][]byte{[]byte("a")}, false},
- {"a", [][]byte{[]byte("")}, false},
- {"", [][]byte{[]byte("")}, false}} {
- result := readerContainsAny(strings.NewReader(this.v1), this.v2...)
- if result != this.expect {
- t.Errorf("[%d] readerContains: got %t but expected %t", i, result, this.expect)
- }
- }
-
- if readerContainsAny(nil, []byte("a")) {
- t.Error("readerContains with nil reader")
- }
-
- if readerContainsAny(nil, nil) {
- t.Error("readerContains with nil arguments")
- }
-}
-
-func createZeroSizedFileInTempDir() (File, error) {
- filePrefix := "_path_test_"
- f, e := TempFile(testFS, "", filePrefix) // dir is os.TempDir()
- if e != nil {
- // if there was an error no file was created.
- // => no requirement to delete the file
- return nil, e
- }
- return f, nil
-}
-
-func createNonZeroSizedFileInTempDir() (File, error) {
- f, err := createZeroSizedFileInTempDir()
- if err != nil {
- // no file ??
- }
- byteString := []byte("byteString")
- err = WriteFile(testFS, f.Name(), byteString, 0644)
- if err != nil {
- // delete the file
- deleteFileInTempDir(f)
- return nil, err
- }
- return f, nil
-}
-
-func deleteFileInTempDir(f File) {
- err := testFS.Remove(f.Name())
- if err != nil {
- // now what?
- }
-}
-
-func createEmptyTempDir() (string, error) {
- dirPrefix := "_dir_prefix_"
- d, e := TempDir(testFS, "", dirPrefix) // will be in os.TempDir()
- if e != nil {
- // no directory to delete - it was never created
- return "", e
- }
- return d, nil
-}
-
-func createTempDirWithZeroLengthFiles() (string, error) {
- d, dirErr := createEmptyTempDir()
- if dirErr != nil {
- //now what?
- }
- filePrefix := "_path_test_"
- _, fileErr := TempFile(testFS, d, filePrefix) // dir is os.TempDir()
- if fileErr != nil {
- // if there was an error no file was created.
- // but we need to remove the directory to clean-up
- deleteTempDir(d)
- return "", fileErr
- }
- // the dir now has one, zero length file in it
- return d, nil
-
-}
-
-func createTempDirWithNonZeroLengthFiles() (string, error) {
- d, dirErr := createEmptyTempDir()
- if dirErr != nil {
- //now what?
- }
- filePrefix := "_path_test_"
- f, fileErr := TempFile(testFS, d, filePrefix) // dir is os.TempDir()
- if fileErr != nil {
- // if there was an error no file was created.
- // but we need to remove the directory to clean-up
- deleteTempDir(d)
- return "", fileErr
- }
- byteString := []byte("byteString")
- fileErr = WriteFile(testFS, f.Name(), byteString, 0644)
- if fileErr != nil {
- // delete the file
- deleteFileInTempDir(f)
- // also delete the directory
- deleteTempDir(d)
- return "", fileErr
- }
-
- // the dir now has one, zero length file in it
- return d, nil
-
-}
-
-func TestExists(t *testing.T) {
- zeroSizedFile, _ := createZeroSizedFileInTempDir()
- defer deleteFileInTempDir(zeroSizedFile)
- nonZeroSizedFile, _ := createNonZeroSizedFileInTempDir()
- defer deleteFileInTempDir(nonZeroSizedFile)
- emptyDirectory, _ := createEmptyTempDir()
- defer deleteTempDir(emptyDirectory)
- nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt"
- nonExistentDir := os.TempDir() + "/this/direcotry/does/not/exist/"
-
- type test struct {
- input string
- expectedResult bool
- expectedErr error
- }
-
- data := []test{
- {zeroSizedFile.Name(), true, nil},
- {nonZeroSizedFile.Name(), true, nil},
- {emptyDirectory, true, nil},
- {nonExistentFile, false, nil},
- {nonExistentDir, false, nil},
- }
- for i, d := range data {
- exists, err := Exists(testFS, d.input)
- if d.expectedResult != exists {
- t.Errorf("Test %d failed. Expected result %t got %t", i, d.expectedResult, exists)
- }
- if d.expectedErr != err {
- t.Errorf("Test %d failed. Expected %q got %q", i, d.expectedErr, err)
- }
- }
-
-}
-
-func TestSafeWriteToDisk(t *testing.T) {
- emptyFile, _ := createZeroSizedFileInTempDir()
- defer deleteFileInTempDir(emptyFile)
- tmpDir, _ := createEmptyTempDir()
- defer deleteTempDir(tmpDir)
-
- randomString := "This is a random string!"
- reader := strings.NewReader(randomString)
-
- fileExists := fmt.Errorf("%v already exists", emptyFile.Name())
-
- type test struct {
- filename string
- expectedErr error
- }
-
- now := time.Now().Unix()
- nowStr := strconv.FormatInt(now, 10)
- data := []test{
- {emptyFile.Name(), fileExists},
- {tmpDir + "/" + nowStr, nil},
- }
-
- for i, d := range data {
- e := SafeWriteReader(testFS, d.filename, reader)
- if d.expectedErr != nil {
- if d.expectedErr.Error() != e.Error() {
- t.Errorf("Test %d failed. Expected error %q but got %q", i, d.expectedErr.Error(), e.Error())
- }
- } else {
- if d.expectedErr != e {
- t.Errorf("Test %d failed. Expected %q but got %q", i, d.expectedErr, e)
- }
- contents, _ := ReadFile(testFS, d.filename)
- if randomString != string(contents) {
- t.Errorf("Test %d failed. Expected contents %q but got %q", i, randomString, string(contents))
- }
- }
- reader.Seek(0, 0)
- }
-}
-
-func TestWriteToDisk(t *testing.T) {
- emptyFile, _ := createZeroSizedFileInTempDir()
- defer deleteFileInTempDir(emptyFile)
- tmpDir, _ := createEmptyTempDir()
- defer deleteTempDir(tmpDir)
-
- randomString := "This is a random string!"
- reader := strings.NewReader(randomString)
-
- type test struct {
- filename string
- expectedErr error
- }
-
- now := time.Now().Unix()
- nowStr := strconv.FormatInt(now, 10)
- data := []test{
- {emptyFile.Name(), nil},
- {tmpDir + "/" + nowStr, nil},
- }
-
- for i, d := range data {
- e := WriteReader(testFS, d.filename, reader)
- if d.expectedErr != e {
- t.Errorf("Test %d failed. WriteToDisk Error Expected %q but got %q", i, d.expectedErr, e)
- }
- contents, e := ReadFile(testFS, d.filename)
- if e != nil {
- t.Errorf("Test %d failed. Could not read file %s. Reason: %s\n", i, d.filename, e)
- }
- if randomString != string(contents) {
- t.Errorf("Test %d failed. Expected contents %q but got %q", i, randomString, string(contents))
- }
- reader.Seek(0, 0)
- }
-}
-
-func TestGetTempDir(t *testing.T) {
- dir := os.TempDir()
- if FilePathSeparator != dir[len(dir)-1:] {
- dir = dir + FilePathSeparator
- }
- testDir := "hugoTestFolder" + FilePathSeparator
- tests := []struct {
- input string
- expected string
- }{
- {"", dir},
- {testDir + " Foo bar ", dir + testDir + " Foo bar " + FilePathSeparator},
- {testDir + "Foo.Bar/foo_Bar-Foo", dir + testDir + "Foo.Bar/foo_Bar-Foo" + FilePathSeparator},
- {testDir + "fOO,bar:foo%bAR", dir + testDir + "fOObarfoo%bAR" + FilePathSeparator},
- {testDir + "FOo/BaR.html", dir + testDir + "FOo/BaR.html" + FilePathSeparator},
- {testDir + "Ñ‚Ñ€Ñм/Ñ‚Ñ€Ñм", dir + testDir + "Ñ‚Ñ€Ñм/Ñ‚Ñ€Ñм" + FilePathSeparator},
- {testDir + "ì€í–‰", dir + testDir + "ì€í–‰" + FilePathSeparator},
- {testDir + "БанковÑкий каÑÑир", dir + testDir + "БанковÑкий каÑÑир" + FilePathSeparator},
- }
-
- for _, test := range tests {
- output := GetTempDir(new(MemMapFs), test.input)
- if output != test.expected {
- t.Errorf("Expected %#v, got %#v\n", test.expected, output)
- }
- }
-}
-
-// This function is very dangerous. Don't use it.
-func deleteTempDir(d string) {
- err := os.RemoveAll(d)
- if err != nil {
- // now what?
- }
-}
-
-func TestFullBaseFsPath(t *testing.T) {
- type dirSpec struct {
- Dir1, Dir2, Dir3 string
- }
- dirSpecs := []dirSpec{
- dirSpec{Dir1: "/", Dir2: "/", Dir3: "/"},
- dirSpec{Dir1: "/", Dir2: "/path2", Dir3: "/"},
- dirSpec{Dir1: "/path1/dir", Dir2: "/path2/dir/", Dir3: "/path3/dir"},
- dirSpec{Dir1: "C:/path1", Dir2: "path2/dir", Dir3: "/path3/dir/"},
- }
-
- for _, ds := range dirSpecs {
- memFs := NewMemMapFs()
- level1Fs := NewBasePathFs(memFs, ds.Dir1)
- level2Fs := NewBasePathFs(level1Fs, ds.Dir2)
- level3Fs := NewBasePathFs(level2Fs, ds.Dir3)
-
- type spec struct {
- BaseFs Fs
- FileName string
- ExpectedPath string
- }
- specs := []spec{
- spec{BaseFs: level3Fs, FileName: "f.txt", ExpectedPath: filepath.Join(ds.Dir1, ds.Dir2, ds.Dir3, "f.txt")},
- spec{BaseFs: level3Fs, FileName: "", ExpectedPath: filepath.Join(ds.Dir1, ds.Dir2, ds.Dir3, "")},
- spec{BaseFs: level2Fs, FileName: "f.txt", ExpectedPath: filepath.Join(ds.Dir1, ds.Dir2, "f.txt")},
- spec{BaseFs: level2Fs, FileName: "", ExpectedPath: filepath.Join(ds.Dir1, ds.Dir2, "")},
- spec{BaseFs: level1Fs, FileName: "f.txt", ExpectedPath: filepath.Join(ds.Dir1, "f.txt")},
- spec{BaseFs: level1Fs, FileName: "", ExpectedPath: filepath.Join(ds.Dir1, "")},
- }
-
- for _, s := range specs {
- if actualPath := FullBaseFsPath(s.BaseFs.(*BasePathFs), s.FileName); actualPath != s.ExpectedPath {
- t.Errorf("Expected \n%s got \n%s", s.ExpectedPath, actualPath)
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/cast/cast_test.go b/vendor/github.com/spf13/cast/cast_test.go
deleted file mode 100644
index d9b0b013d..000000000
--- a/vendor/github.com/spf13/cast/cast_test.go
+++ /dev/null
@@ -1,1208 +0,0 @@
-// Copyright © 2014 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package cast
-
-import (
- "fmt"
- "html/template"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestToUintE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect uint
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {int(-8), 0, true},
- {int8(-8), 0, true},
- {int16(-8), 0, true},
- {int32(-8), 0, true},
- {int64(-8), 0, true},
- {float32(-8.31), 0, true},
- {float64(-8.31), 0, true},
- {"-8", 0, true},
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToUintE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test:
- v = ToUint(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToUint64E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect uint64
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {int(-8), 0, true},
- {int8(-8), 0, true},
- {int16(-8), 0, true},
- {int32(-8), 0, true},
- {int64(-8), 0, true},
- {float32(-8.31), 0, true},
- {float64(-8.31), 0, true},
- {"-8", 0, true},
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToUint64E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test:
- v = ToUint64(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToUint32E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect uint32
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- {int(-8), 0, true},
- {int8(-8), 0, true},
- {int16(-8), 0, true},
- {int32(-8), 0, true},
- {int64(-8), 0, true},
- {float32(-8.31), 0, true},
- {float64(-8.31), 0, true},
- {"-8", 0, true},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToUint32E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test:
- v = ToUint32(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToUint16E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect uint16
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {int(-8), 0, true},
- {int8(-8), 0, true},
- {int16(-8), 0, true},
- {int32(-8), 0, true},
- {int64(-8), 0, true},
- {float32(-8.31), 0, true},
- {float64(-8.31), 0, true},
- {"-8", 0, true},
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToUint16E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToUint16(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToUint8E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect uint8
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {int(-8), 0, true},
- {int8(-8), 0, true},
- {int16(-8), 0, true},
- {int32(-8), 0, true},
- {int64(-8), 0, true},
- {float32(-8.31), 0, true},
- {float64(-8.31), 0, true},
- {"-8", 0, true},
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToUint8E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToUint8(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToIntE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect int
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToIntE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToInt(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToInt64E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect int64
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToInt64E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToInt64(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToInt32E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect int32
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToInt32E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToInt32(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToInt16E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect int16
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToInt16E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToInt16(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToInt8E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect int8
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8, false},
- {float64(8.31), 8, false},
- {true, 1, false},
- {false, 0, false},
- {"8", 8, false},
- {nil, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToInt8E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToInt8(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToFloat64E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect float64
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8), 8, false},
- {float64(8.31), 8.31, false},
- {"8", 8, false},
- {true, 1, false},
- {false, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToFloat64E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToFloat64(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToFloat32E(t *testing.T) {
- tests := []struct {
- input interface{}
- expect float32
- iserr bool
- }{
- {int(8), 8, false},
- {int8(8), 8, false},
- {int16(8), 8, false},
- {int32(8), 8, false},
- {int64(8), 8, false},
- {uint(8), 8, false},
- {uint8(8), 8, false},
- {uint16(8), 8, false},
- {uint32(8), 8, false},
- {uint64(8), 8, false},
- {float32(8.31), 8.31, false},
- {float64(8.31), 8.31, false},
- {"8", 8, false},
- {true, 1, false},
- {false, 0, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToFloat32E(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToFloat32(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToStringE(t *testing.T) {
- type Key struct {
- k string
- }
- key := &Key{"foo"}
-
- tests := []struct {
- input interface{}
- expect string
- iserr bool
- }{
- {int(8), "8", false},
- {int8(8), "8", false},
- {int16(8), "8", false},
- {int32(8), "8", false},
- {int64(8), "8", false},
- {uint(8), "8", false},
- {uint8(8), "8", false},
- {uint16(8), "8", false},
- {uint32(8), "8", false},
- {uint64(8), "8", false},
- {float32(8.31), "8.31", false},
- {float64(8.31), "8.31", false},
- {true, "true", false},
- {false, "false", false},
- {nil, "", false},
- {[]byte("one time"), "one time", false},
- {"one more time", "one more time", false},
- {template.HTML("one time"), "one time", false},
- {template.URL("http://somehost.foo"), "http://somehost.foo", false},
- {template.JS("(1+2)"), "(1+2)", false},
- {template.CSS("a"), "a", false},
- {template.HTMLAttr("a"), "a", false},
- // errors
- {testing.T{}, "", true},
- {key, "", true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToString(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-type foo struct {
- val string
-}
-
-func (x foo) String() string {
- return x.val
-}
-
-func TestStringerToString(t *testing.T) {
- var x foo
- x.val = "bar"
- assert.Equal(t, "bar", ToString(x))
-}
-
-type fu struct {
- val string
-}
-
-func (x fu) Error() string {
- return x.val
-}
-
-func TestErrorToString(t *testing.T) {
- var x fu
- x.val = "bar"
- assert.Equal(t, "bar", ToString(x))
-}
-
-func TestStringMapStringSliceE(t *testing.T) {
- // ToStringMapString inputs/outputs
- var stringMapString = map[string]string{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var stringMapInterface = map[string]interface{}{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var interfaceMapString = map[interface{}]string{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var interfaceMapInterface = map[interface{}]interface{}{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
-
- // ToStringMapStringSlice inputs/outputs
- var stringMapStringSlice = map[string][]string{"key 1": {"value 1", "value 2", "value 3"}, "key 2": {"value 1", "value 2", "value 3"}, "key 3": {"value 1", "value 2", "value 3"}}
- var stringMapInterfaceSlice = map[string][]interface{}{"key 1": {"value 1", "value 2", "value 3"}, "key 2": {"value 1", "value 2", "value 3"}, "key 3": {"value 1", "value 2", "value 3"}}
- var stringMapInterfaceInterfaceSlice = map[string]interface{}{"key 1": []interface{}{"value 1", "value 2", "value 3"}, "key 2": []interface{}{"value 1", "value 2", "value 3"}, "key 3": []interface{}{"value 1", "value 2", "value 3"}}
- var stringMapStringSingleSliceFieldsResult = map[string][]string{"key 1": {"value", "1"}, "key 2": {"value", "2"}, "key 3": {"value", "3"}}
- var interfaceMapStringSlice = map[interface{}][]string{"key 1": {"value 1", "value 2", "value 3"}, "key 2": {"value 1", "value 2", "value 3"}, "key 3": {"value 1", "value 2", "value 3"}}
- var interfaceMapInterfaceSlice = map[interface{}][]interface{}{"key 1": {"value 1", "value 2", "value 3"}, "key 2": {"value 1", "value 2", "value 3"}, "key 3": {"value 1", "value 2", "value 3"}}
-
- var stringMapStringSliceMultiple = map[string][]string{"key 1": {"value 1", "value 2", "value 3"}, "key 2": {"value 1", "value 2", "value 3"}, "key 3": {"value 1", "value 2", "value 3"}}
- var stringMapStringSliceSingle = map[string][]string{"key 1": {"value 1"}, "key 2": {"value 2"}, "key 3": {"value 3"}}
-
- var stringMapInterface1 = map[string]interface{}{"key 1": []string{"value 1"}, "key 2": []string{"value 2"}}
- var stringMapInterfaceResult1 = map[string][]string{"key 1": {"value 1"}, "key 2": {"value 2"}}
-
- var jsonStringMapString = `{"key 1": "value 1", "key 2": "value 2"}`
- var jsonStringMapStringArray = `{"key 1": ["value 1"], "key 2": ["value 2", "value 3"]}`
- var jsonStringMapStringArrayResult = map[string][]string{"key 1": {"value 1"}, "key 2": {"value 2", "value 3"}}
-
- type Key struct {
- k string
- }
-
- tests := []struct {
- input interface{}
- expect map[string][]string
- iserr bool
- }{
- {stringMapStringSlice, stringMapStringSlice, false},
- {stringMapInterfaceSlice, stringMapStringSlice, false},
- {stringMapInterfaceInterfaceSlice, stringMapStringSlice, false},
- {stringMapStringSliceMultiple, stringMapStringSlice, false},
- {stringMapStringSliceMultiple, stringMapStringSlice, false},
- {stringMapString, stringMapStringSliceSingle, false},
- {stringMapInterface, stringMapStringSliceSingle, false},
- {stringMapInterface1, stringMapInterfaceResult1, false},
- {interfaceMapStringSlice, stringMapStringSlice, false},
- {interfaceMapInterfaceSlice, stringMapStringSlice, false},
- {interfaceMapString, stringMapStringSingleSliceFieldsResult, false},
- {interfaceMapInterface, stringMapStringSingleSliceFieldsResult, false},
- {jsonStringMapStringArray, jsonStringMapStringArrayResult, false},
-
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {map[interface{}]interface{}{"foo": testing.T{}}, nil, true},
- {map[interface{}]interface{}{Key{"foo"}: "bar"}, nil, true}, // ToStringE(Key{"foo"}) should fail
- {jsonStringMapString, nil, true},
- {"", nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringMapStringSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToStringMapStringSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToStringMapE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect map[string]interface{}
- iserr bool
- }{
- {map[interface{}]interface{}{"tag": "tags", "group": "groups"}, map[string]interface{}{"tag": "tags", "group": "groups"}, false},
- {map[string]interface{}{"tag": "tags", "group": "groups"}, map[string]interface{}{"tag": "tags", "group": "groups"}, false},
- {`{"tag": "tags", "group": "groups"}`, map[string]interface{}{"tag": "tags", "group": "groups"}, false},
- {`{"tag": "tags", "group": true}`, map[string]interface{}{"tag": "tags", "group": true}, false},
-
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {"", nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringMapE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToStringMap(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToStringMapBoolE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect map[string]bool
- iserr bool
- }{
- {map[interface{}]interface{}{"v1": true, "v2": false}, map[string]bool{"v1": true, "v2": false}, false},
- {map[string]interface{}{"v1": true, "v2": false}, map[string]bool{"v1": true, "v2": false}, false},
- {map[string]bool{"v1": true, "v2": false}, map[string]bool{"v1": true, "v2": false}, false},
- {`{"v1": true, "v2": false}`, map[string]bool{"v1": true, "v2": false}, false},
-
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {"", nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringMapBoolE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToStringMapBool(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToStringMapStringE(t *testing.T) {
- var stringMapString = map[string]string{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var stringMapInterface = map[string]interface{}{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var interfaceMapString = map[interface{}]string{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var interfaceMapInterface = map[interface{}]interface{}{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}
- var jsonString = `{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"}`
- var invalidJsonString = `{"key 1": "value 1", "key 2": "value 2", "key 3": "value 3"`
- var emptyString = ""
-
- tests := []struct {
- input interface{}
- expect map[string]string
- iserr bool
- }{
- {stringMapString, stringMapString, false},
- {stringMapInterface, stringMapString, false},
- {interfaceMapString, stringMapString, false},
- {interfaceMapInterface, stringMapString, false},
- {jsonString, stringMapString, false},
-
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {invalidJsonString, nil, true},
- {emptyString, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringMapStringE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToStringMapString(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToBoolSliceE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect []bool
- iserr bool
- }{
- {[]bool{true, false, true}, []bool{true, false, true}, false},
- {[]interface{}{true, false, true}, []bool{true, false, true}, false},
- {[]int{1, 0, 1}, []bool{true, false, true}, false},
- {[]string{"true", "false", "true"}, []bool{true, false, true}, false},
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {[]string{"foo", "bar"}, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToBoolSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToBoolSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToIntSliceE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect []int
- iserr bool
- }{
- {[]int{1, 3}, []int{1, 3}, false},
- {[]interface{}{1.2, 3.2}, []int{1, 3}, false},
- {[]string{"2", "3"}, []int{2, 3}, false},
- {[2]string{"2", "3"}, []int{2, 3}, false},
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {[]string{"foo", "bar"}, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToIntSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToIntSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToSliceE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect []interface{}
- iserr bool
- }{
- {[]interface{}{1, 3}, []interface{}{1, 3}, false},
- {[]map[string]interface{}{{"k1": 1}, {"k2": 2}}, []interface{}{map[string]interface{}{"k1": 1}, map[string]interface{}{"k2": 2}}, false},
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToStringSliceE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect []string
- iserr bool
- }{
- {[]string{"a", "b"}, []string{"a", "b"}, false},
- {[]interface{}{1, 3}, []string{"1", "3"}, false},
- {interface{}(1), []string{"1"}, false},
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToStringSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToStringSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToDurationSliceE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect []time.Duration
- iserr bool
- }{
- {[]string{"1s", "1m"}, []time.Duration{time.Second, time.Minute}, false},
- {[]int{1, 2}, []time.Duration{1, 2}, false},
- {[]interface{}{1, 3}, []time.Duration{1, 3}, false},
- {[]time.Duration{1, 3}, []time.Duration{1, 3}, false},
-
- // errors
- {nil, nil, true},
- {testing.T{}, nil, true},
- {[]string{"invalid"}, nil, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToDurationSliceE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToDurationSlice(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func TestToBoolE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect bool
- iserr bool
- }{
- {0, false, false},
- {nil, false, false},
- {"false", false, false},
- {"FALSE", false, false},
- {"False", false, false},
- {"f", false, false},
- {"F", false, false},
- {false, false, false},
-
- {"true", true, false},
- {"TRUE", true, false},
- {"True", true, false},
- {"t", true, false},
- {"T", true, false},
- {1, true, false},
- {true, true, false},
- {-1, true, false},
-
- // errors
- {"test", false, true},
- {testing.T{}, false, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToBoolE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToBool(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
-
-func BenchmarkTooBool(b *testing.B) {
- for i := 0; i < b.N; i++ {
- if !ToBool(true) {
- b.Fatal("ToBool returned false")
- }
- }
-}
-
-func TestIndirectPointers(t *testing.T) {
- x := 13
- y := &x
- z := &y
-
- assert.Equal(t, ToInt(y), 13)
- assert.Equal(t, ToInt(z), 13)
-}
-
-func TestToTimeEE(t *testing.T) {
- tests := []struct {
- input interface{}
- expect time.Time
- iserr bool
- }{
- {"2009-11-10 23:00:00 +0000 UTC", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // Time.String()
- {"Tue Nov 10 23:00:00 2009", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // ANSIC
- {"Tue Nov 10 23:00:00 UTC 2009", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // UnixDate
- {"Tue Nov 10 23:00:00 +0000 2009", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RubyDate
- {"10 Nov 09 23:00 UTC", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC822
- {"10 Nov 09 23:00 +0000", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC822Z
- {"Tuesday, 10-Nov-09 23:00:00 UTC", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC850
- {"Tue, 10 Nov 2009 23:00:00 UTC", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC1123
- {"Tue, 10 Nov 2009 23:00:00 +0000", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC1123Z
- {"2009-11-10T23:00:00Z", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC3339
- {"2009-11-10T23:00:00Z", time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), false}, // RFC3339Nano
- {"11:00PM", time.Date(0, 1, 1, 23, 0, 0, 0, time.UTC), false}, // Kitchen
- {"Nov 10 23:00:00", time.Date(0, 11, 10, 23, 0, 0, 0, time.UTC), false}, // Stamp
- {"Nov 10 23:00:00.000", time.Date(0, 11, 10, 23, 0, 0, 0, time.UTC), false}, // StampMilli
- {"Nov 10 23:00:00.000000", time.Date(0, 11, 10, 23, 0, 0, 0, time.UTC), false}, // StampMicro
- {"Nov 10 23:00:00.000000000", time.Date(0, 11, 10, 23, 0, 0, 0, time.UTC), false}, // StampNano
- {"2016-03-06 15:28:01-00:00", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false}, // RFC3339 without T
- {"2016-03-06 15:28:01", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false},
- {"2016-03-06 15:28:01 -0000", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false},
- {"2016-03-06 15:28:01 -00:00", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false},
- {"2006-01-02", time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC), false},
- {"02 Jan 2006", time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC), false},
- {1472574600, time.Date(2016, 8, 30, 16, 30, 0, 0, time.UTC), false},
- {int(1482597504), time.Date(2016, 12, 24, 16, 38, 24, 0, time.UTC), false},
- {int64(1234567890), time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), false},
- {int32(1234567890), time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), false},
- {uint(1482597504), time.Date(2016, 12, 24, 16, 38, 24, 0, time.UTC), false},
- {uint64(1234567890), time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), false},
- {uint32(1234567890), time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), false},
- {time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), time.Date(2009, 2, 13, 23, 31, 30, 0, time.UTC), false},
- // errors
- {"2006", time.Time{}, true},
- {testing.T{}, time.Time{}, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToTimeE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v.UTC(), errmsg)
-
- // Non-E test
- v = ToTime(test.input)
- assert.Equal(t, test.expect, v.UTC(), errmsg)
- }
-}
-
-func TestToDurationE(t *testing.T) {
- var td time.Duration = 5
-
- tests := []struct {
- input interface{}
- expect time.Duration
- iserr bool
- }{
- {time.Duration(5), td, false},
- {int(5), td, false},
- {int64(5), td, false},
- {int32(5), td, false},
- {int16(5), td, false},
- {int8(5), td, false},
- {uint(5), td, false},
- {uint64(5), td, false},
- {uint32(5), td, false},
- {uint16(5), td, false},
- {uint8(5), td, false},
- {float64(5), td, false},
- {float32(5), td, false},
- {string("5"), td, false},
- {string("5ns"), td, false},
- {string("5us"), time.Microsecond * td, false},
- {string("5µs"), time.Microsecond * td, false},
- {string("5ms"), time.Millisecond * td, false},
- {string("5s"), time.Second * td, false},
- {string("5m"), time.Minute * td, false},
- {string("5h"), time.Hour * td, false},
- // errors
- {"test", 0, true},
- {testing.T{}, 0, true},
- }
-
- for i, test := range tests {
- errmsg := fmt.Sprintf("i = %d", i) // assert helper message
-
- v, err := ToDurationE(test.input)
- if test.iserr {
- assert.Error(t, err, errmsg)
- continue
- }
-
- assert.NoError(t, err, errmsg)
- assert.Equal(t, test.expect, v, errmsg)
-
- // Non-E test
- v = ToDuration(test.input)
- assert.Equal(t, test.expect, v, errmsg)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/.circleci/config.yml b/vendor/github.com/spf13/cobra/.circleci/config.yml
deleted file mode 100644
index 136e17f0e..000000000
--- a/vendor/github.com/spf13/cobra/.circleci/config.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-workflows:
- version: 2
- main:
- jobs:
- - go-current
- - go-previous
- - go-latest
-base: &base
- working_directory: /go/src/github.com/spf13/cobra
- steps:
- - checkout
- - run:
- name: "All Commands"
- command: |
- mkdir -p bin
- curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck
- chmod +x bin/shellcheck
- go get -t -v ./...
- PATH=$PATH:$PWD/bin go test -v ./...
- go build
- diff -u <(echo -n) <(gofmt -d -s .)
- if [ -z $NOVET ]; then
- diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
- fi
-version: 2
-jobs:
- go-current:
- docker:
- - image: circleci/golang:1.8.3
- <<: *base
- go-previous:
- docker:
- - image: circleci/golang:1.7.6
- <<: *base
- go-latest:
- docker:
- - image: circleci/golang:latest
- <<: *base
diff --git a/vendor/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml
index 68efa1363..5afcb2096 100644
--- a/vendor/github.com/spf13/cobra/.travis.yml
+++ b/vendor/github.com/spf13/cobra/.travis.yml
@@ -2,8 +2,8 @@ language: go
matrix:
include:
- - go: 1.7.6
- - go: 1.8.3
+ - go: 1.9.4
+ - go: 1.10.0
- go: tip
allow_failures:
- go: tip
diff --git a/vendor/github.com/spf13/cobra/args_test.go b/vendor/github.com/spf13/cobra/args_test.go
deleted file mode 100644
index d797b6f58..000000000
--- a/vendor/github.com/spf13/cobra/args_test.go
+++ /dev/null
@@ -1,241 +0,0 @@
-package cobra
-
-import (
- "strings"
- "testing"
-)
-
-func TestNoArgs(t *testing.T) {
- c := &Command{Use: "c", Args: NoArgs, Run: emptyRun}
-
- output, err := executeCommand(c)
- if output != "" {
- t.Errorf("Unexpected string: %v", output)
- }
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
-}
-
-func TestNoArgsWithArgs(t *testing.T) {
- c := &Command{Use: "c", Args: NoArgs, Run: emptyRun}
-
- _, err := executeCommand(c, "illegal")
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := `unknown command "illegal" for "c"`
- if got != expected {
- t.Errorf("Expected: %q, got: %q", expected, got)
- }
-}
-
-func TestOnlyValidArgs(t *testing.T) {
- c := &Command{
- Use: "c",
- Args: OnlyValidArgs,
- ValidArgs: []string{"one", "two"},
- Run: emptyRun,
- }
-
- output, err := executeCommand(c, "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
-}
-
-func TestOnlyValidArgsWithInvalidArgs(t *testing.T) {
- c := &Command{
- Use: "c",
- Args: OnlyValidArgs,
- ValidArgs: []string{"one", "two"},
- Run: emptyRun,
- }
-
- _, err := executeCommand(c, "three")
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := `invalid argument "three" for "c"`
- if got != expected {
- t.Errorf("Expected: %q, got: %q", expected, got)
- }
-}
-
-func TestArbitraryArgs(t *testing.T) {
- c := &Command{Use: "c", Args: ArbitraryArgs, Run: emptyRun}
- output, err := executeCommand(c, "a", "b")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestMinimumNArgs(t *testing.T) {
- c := &Command{Use: "c", Args: MinimumNArgs(2), Run: emptyRun}
- output, err := executeCommand(c, "a", "b", "c")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestMinimumNArgsWithLessArgs(t *testing.T) {
- c := &Command{Use: "c", Args: MinimumNArgs(2), Run: emptyRun}
- _, err := executeCommand(c, "a")
-
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := "requires at least 2 arg(s), only received 1"
- if got != expected {
- t.Fatalf("Expected %q, got %q", expected, got)
- }
-}
-
-func TestMaximumNArgs(t *testing.T) {
- c := &Command{Use: "c", Args: MaximumNArgs(3), Run: emptyRun}
- output, err := executeCommand(c, "a", "b")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestMaximumNArgsWithMoreArgs(t *testing.T) {
- c := &Command{Use: "c", Args: MaximumNArgs(2), Run: emptyRun}
- _, err := executeCommand(c, "a", "b", "c")
-
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := "accepts at most 2 arg(s), received 3"
- if got != expected {
- t.Fatalf("Expected %q, got %q", expected, got)
- }
-}
-
-func TestExactArgs(t *testing.T) {
- c := &Command{Use: "c", Args: ExactArgs(3), Run: emptyRun}
- output, err := executeCommand(c, "a", "b", "c")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestExactArgsWithInvalidCount(t *testing.T) {
- c := &Command{Use: "c", Args: ExactArgs(2), Run: emptyRun}
- _, err := executeCommand(c, "a", "b", "c")
-
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := "accepts 2 arg(s), received 3"
- if got != expected {
- t.Fatalf("Expected %q, got %q", expected, got)
- }
-}
-
-func TestRangeArgs(t *testing.T) {
- c := &Command{Use: "c", Args: RangeArgs(2, 4), Run: emptyRun}
- output, err := executeCommand(c, "a", "b", "c")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestRangeArgsWithInvalidCount(t *testing.T) {
- c := &Command{Use: "c", Args: RangeArgs(2, 4), Run: emptyRun}
- _, err := executeCommand(c, "a")
-
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := "accepts between 2 and 4 arg(s), received 1"
- if got != expected {
- t.Fatalf("Expected %q, got %q", expected, got)
- }
-}
-
-func TestRootTakesNoArgs(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- _, err := executeCommand(rootCmd, "illegal", "args")
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := `unknown command "illegal" for "root"`
- if !strings.Contains(got, expected) {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func TestRootTakesArgs(t *testing.T) {
- rootCmd := &Command{Use: "root", Args: ArbitraryArgs, Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- _, err := executeCommand(rootCmd, "legal", "args")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-}
-
-func TestChildTakesNoArgs(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Args: NoArgs, Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- _, err := executeCommand(rootCmd, "child", "illegal", "args")
- if err == nil {
- t.Fatal("Expected an error")
- }
-
- got := err.Error()
- expected := `unknown command "illegal" for "root child"`
- if !strings.Contains(got, expected) {
- t.Errorf("expected %q, got %q", expected, got)
- }
-}
-
-func TestChildTakesArgs(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Args: ArbitraryArgs, Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- _, err := executeCommand(rootCmd, "child", "legal", "args")
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go
index 1d955ac25..291eae7d8 100644
--- a/vendor/github.com/spf13/cobra/bash_completions.go
+++ b/vendor/github.com/spf13/cobra/bash_completions.go
@@ -136,6 +136,12 @@ __%[1]s_handle_reply()
if declare -F __ltrim_colon_completions >/dev/null; then
__ltrim_colon_completions "$cur"
fi
+
+ # If there is only 1 completion and it is a flag with an = it will be completed
+ # but we don't want a space after the =
+ if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then
+ compopt -o nospace
+ fi
}
# The arguments should be in the form "ext1|ext2|extn"
@@ -222,7 +228,7 @@ __%[1]s_handle_command()
next_command="_${last_command}_${words[c]//:/__}"
else
if [[ $c -eq 0 ]]; then
- next_command="_$(basename "${words[c]//:/__}")"
+ next_command="_%[1]s_root_command"
else
next_command="_${words[c]//:/__}"
fi
@@ -243,7 +249,7 @@ __%[1]s_handle_word()
__%[1]s_handle_flag
elif __%[1]s_contains_word "${words[c]}" "${commands[@]}"; then
__%[1]s_handle_command
- elif [[ $c -eq 0 ]] && __%[1]s_contains_word "$(basename "${words[c]}")" "${commands[@]}"; then
+ elif [[ $c -eq 0 ]]; then
__%[1]s_handle_command
else
__%[1]s_handle_noun
@@ -311,7 +317,7 @@ func writeFlagHandler(buf *bytes.Buffer, name string, annotations map[string][]s
var ext string
if len(value) > 0 {
- ext = fmt.Sprintf("__%s_handle_filename_extension_flag ", cmd.Name()) + strings.Join(value, "|")
+ ext = fmt.Sprintf("__%s_handle_filename_extension_flag ", cmd.Root().Name()) + strings.Join(value, "|")
} else {
ext = "_filedir"
}
@@ -329,7 +335,7 @@ func writeFlagHandler(buf *bytes.Buffer, name string, annotations map[string][]s
var ext string
if len(value) == 1 {
- ext = fmt.Sprintf("__%s_handle_subdirs_in_dir_flag ", cmd.Name()) + value[0]
+ ext = fmt.Sprintf("__%s_handle_subdirs_in_dir_flag ", cmd.Root().Name()) + value[0]
} else {
ext = "_filedir -d"
}
@@ -455,7 +461,13 @@ func gen(buf *bytes.Buffer, cmd *Command) {
commandName := cmd.CommandPath()
commandName = strings.Replace(commandName, " ", "_", -1)
commandName = strings.Replace(commandName, ":", "__", -1)
- buf.WriteString(fmt.Sprintf("_%s()\n{\n", commandName))
+
+ if cmd.Root() == cmd {
+ buf.WriteString(fmt.Sprintf("_%s_root_command()\n{\n", commandName))
+ } else {
+ buf.WriteString(fmt.Sprintf("_%s()\n{\n", commandName))
+ }
+
buf.WriteString(fmt.Sprintf(" last_command=%q\n", commandName))
writeCommands(buf, cmd)
writeFlags(buf, cmd)
diff --git a/vendor/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md
index 44d777c18..8d01f456f 100644
--- a/vendor/github.com/spf13/cobra/bash_completions.md
+++ b/vendor/github.com/spf13/cobra/bash_completions.md
@@ -6,15 +6,16 @@ Generating bash completions from a cobra command is incredibly easy. An actual p
package main
import (
- "io/ioutil"
- "os"
+ "io/ioutil"
+ "os"
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd"
+ "k8s.io/kubernetes/pkg/kubectl/cmd"
+ "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)
func main() {
- kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
- kubectl.GenBashCompletionFile("out.sh")
+ kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
+ kubectl.GenBashCompletionFile("out.sh")
}
```
@@ -204,3 +205,17 @@ __kubectl_get_namespaces()
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 <tab><tab>
+completion firstcommand secondcommand
+```
diff --git a/vendor/github.com/spf13/cobra/bash_completions_test.go b/vendor/github.com/spf13/cobra/bash_completions_test.go
deleted file mode 100644
index dd3a88efb..000000000
--- a/vendor/github.com/spf13/cobra/bash_completions_test.go
+++ /dev/null
@@ -1,197 +0,0 @@
-package cobra
-
-import (
- "bytes"
- "fmt"
- "os"
- "os/exec"
- "strings"
- "testing"
-)
-
-func checkOmit(t *testing.T, found, unexpected string) {
- if strings.Contains(found, unexpected) {
- t.Errorf("Got: %q\nBut should not have!\n", unexpected)
- }
-}
-
-func check(t *testing.T, found, expected string) {
- if !strings.Contains(found, expected) {
- t.Errorf("Expecting to contain: \n %q\nGot:\n %q\n", expected, found)
- }
-}
-
-func runShellCheck(s string) error {
- excluded := []string{
- "SC2034", // PREFIX appears unused. Verify it or export it.
- }
- cmd := exec.Command("shellcheck", "-s", "bash", "-", "-e", strings.Join(excluded, ","))
- cmd.Stderr = os.Stderr
- cmd.Stdout = os.Stdout
-
- stdin, err := cmd.StdinPipe()
- if err != nil {
- return err
- }
- go func() {
- stdin.Write([]byte(s))
- stdin.Close()
- }()
-
- return cmd.Run()
-}
-
-// World worst custom function, just keep telling you to enter hello!
-const bashCompletionFunc = `__custom_func() {
- COMPREPLY=( "hello" )
-}
-`
-
-func TestBashCompletions(t *testing.T) {
- rootCmd := &Command{
- Use: "root",
- ArgAliases: []string{"pods", "nodes", "services", "replicationcontrollers", "po", "no", "svc", "rc"},
- ValidArgs: []string{"pod", "node", "service", "replicationcontroller"},
- BashCompletionFunction: bashCompletionFunc,
- Run: emptyRun,
- }
- rootCmd.Flags().IntP("introot", "i", -1, "help message for flag introot")
- rootCmd.MarkFlagRequired("introot")
-
- // Filename.
- rootCmd.Flags().String("filename", "", "Enter a filename")
- rootCmd.MarkFlagFilename("filename", "json", "yaml", "yml")
-
- // Persistent filename.
- rootCmd.PersistentFlags().String("persistent-filename", "", "Enter a filename")
- rootCmd.MarkPersistentFlagFilename("persistent-filename")
- rootCmd.MarkPersistentFlagRequired("persistent-filename")
-
- // Filename extensions.
- rootCmd.Flags().String("filename-ext", "", "Enter a filename (extension limited)")
- rootCmd.MarkFlagFilename("filename-ext")
- rootCmd.Flags().String("custom", "", "Enter a filename (extension limited)")
- rootCmd.MarkFlagCustom("custom", "__complete_custom")
-
- // Subdirectories in a given directory.
- rootCmd.Flags().String("theme", "", "theme to use (located in /themes/THEMENAME/)")
- rootCmd.Flags().SetAnnotation("theme", BashCompSubdirsInDir, []string{"themes"})
-
- echoCmd := &Command{
- Use: "echo [string to echo]",
- Aliases: []string{"say"},
- Short: "Echo anything to the screen",
- Long: "an utterly useless command for testing.",
- Example: "Just run cobra-test echo",
- Run: emptyRun,
- }
-
- printCmd := &Command{
- Use: "print [string to print]",
- Args: MinimumNArgs(1),
- Short: "Print anything to the screen",
- Long: "an absolutely utterly useless command for testing.",
- Run: emptyRun,
- }
-
- deprecatedCmd := &Command{
- Use: "deprecated [can't do anything here]",
- Args: NoArgs,
- Short: "A command which is deprecated",
- Long: "an absolutely utterly useless command for testing deprecation!.",
- Deprecated: "Please use echo instead",
- Run: emptyRun,
- }
-
- colonCmd := &Command{
- Use: "cmd:colon",
- Run: emptyRun,
- }
-
- timesCmd := &Command{
- Use: "times [# times] [string to echo]",
- SuggestFor: []string{"counts"},
- Args: OnlyValidArgs,
- ValidArgs: []string{"one", "two", "three", "four"},
- Short: "Echo anything to the screen more times",
- Long: "a slightly useless command for testing.",
- Run: emptyRun,
- }
-
- echoCmd.AddCommand(timesCmd)
- rootCmd.AddCommand(echoCmd, printCmd, deprecatedCmd, colonCmd)
-
- buf := new(bytes.Buffer)
- rootCmd.GenBashCompletion(buf)
- output := buf.String()
-
- check(t, output, "_root")
- check(t, output, "_root_echo")
- check(t, output, "_root_echo_times")
- check(t, output, "_root_print")
- check(t, output, "_root_cmd__colon")
-
- // check for required flags
- check(t, output, `must_have_one_flag+=("--introot=")`)
- check(t, output, `must_have_one_flag+=("--persistent-filename=")`)
- // check for custom completion function
- check(t, output, `COMPREPLY=( "hello" )`)
- // check for required nouns
- check(t, output, `must_have_one_noun+=("pod")`)
- // check for noun aliases
- check(t, output, `noun_aliases+=("pods")`)
- check(t, output, `noun_aliases+=("rc")`)
- checkOmit(t, output, `must_have_one_noun+=("pods")`)
- // check for filename extension flags
- check(t, output, `flags_completion+=("_filedir")`)
- // check for filename extension flags
- check(t, output, `must_have_one_noun+=("three")`)
- // check for filename extension flags
- check(t, output, fmt.Sprintf(`flags_completion+=("__%s_handle_filename_extension_flag json|yaml|yml")`, rootCmd.Name()))
- // check for custom flags
- check(t, output, `flags_completion+=("__complete_custom")`)
- // check for subdirs_in_dir flags
- check(t, output, fmt.Sprintf(`flags_completion+=("__%s_handle_subdirs_in_dir_flag themes")`, rootCmd.Name()))
-
- checkOmit(t, output, deprecatedCmd.Name())
-
- // If available, run shellcheck against the script.
- if err := exec.Command("which", "shellcheck").Run(); err != nil {
- return
- }
- if err := runShellCheck(output); err != nil {
- t.Fatalf("shellcheck failed: %v", err)
- }
-}
-
-func TestBashCompletionHiddenFlag(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
-
- const flagName = "hiddenFlag"
- c.Flags().Bool(flagName, false, "")
- c.Flags().MarkHidden(flagName)
-
- buf := new(bytes.Buffer)
- c.GenBashCompletion(buf)
- output := buf.String()
-
- if strings.Contains(output, flagName) {
- t.Errorf("Expected completion to not include %q flag: Got %v", flagName, output)
- }
-}
-
-func TestBashCompletionDeprecatedFlag(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
-
- const flagName = "deprecated-flag"
- c.Flags().Bool(flagName, false, "")
- c.Flags().MarkDeprecated(flagName, "use --not-deprecated instead")
-
- buf := new(bytes.Buffer)
- c.GenBashCompletion(buf)
- output := buf.String()
-
- if strings.Contains(output, flagName) {
- t.Errorf("expected completion to not include %q flag: Got %v", flagName, output)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/README.md b/vendor/github.com/spf13/cobra/cobra/README.md
deleted file mode 100644
index 6054f95c5..000000000
--- a/vendor/github.com/spf13/cobra/cobra/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# 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.
-
-In order to use the cobra command, compile it using the following command:
-
- go get github.com/spf13/cobra/cobra
-
-This will create the cobra executable under your `$GOPATH/bin` directory.
-
-### cobra init
-
-The `cobra init [app]` command will create your initial application code
-for you. It is a very powerful application that will populate your program with
-the right structure so you can immediately enjoy all the benefits of Cobra. It
-will also automatically apply the license you specify to your application.
-
-Cobra init is pretty smart. You can provide it a full path, or simply a path
-similar to what is expected in the import.
-
-```
-cobra init github.com/spf13/newApp
-```
-
-### cobra add
-
-Once an application is initialized, Cobra can create additional commands for you.
-Let's say you created an app and you wanted the following commands for it:
-
-* app serve
-* app config
-* app config create
-
-In your project directory (where your main.go file is) you would run the following:
-
-```
-cobra add serve
-cobra add config
-cobra add create -p 'configCmd'
-```
-
-*Note: Use camelCase (not snake_case/snake-case) for command names.
-Otherwise, you will encounter errors.
-For example, `cobra add add-user` is incorrect, but `cobra add addUser` is valid.*
-
-Once you have run these three commands you would have an app structure similar to
-the following:
-
-```
- â–¾ app/
- â–¾ cmd/
- serve.go
- config.go
- create.go
- main.go
-```
-
-At this point you can run `go run main.go` and it would run your app. `go run
-main.go serve`, `go run main.go config`, `go run main.go config create` along
-with `go run main.go help serve`, etc. would all work.
-
-Obviously you haven't added your own code to these yet. The commands are ready
-for you to give them their tasks. Have fun!
-
-### Configuring the cobra generator
-
-The Cobra generator will be easier to use if you provide a simple configuration
-file which will help you eliminate providing a bunch of repeated information in
-flags over and over.
-
-An example ~/.cobra.yaml file:
-
-```yaml
-author: Steve Francia <spf@spf13.com>
-license: MIT
-```
-
-You can specify no license by setting `license` to `none` or you can specify
-a custom license:
-
-```yaml
-license:
- header: This file is part of {{ .appName }}.
- text: |
- {{ .copyright }}
-
- This is my license. There are many like it, but this one is mine.
- My license is my best friend. It is my life. I must master it as I must
- master my life.
-```
-
-You can also use built-in licenses. For example, **GPLv2**, **GPLv3**, **LGPL**,
-**AGPL**, **MIT**, **2-Clause BSD** or **3-Clause BSD**.
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/add.go b/vendor/github.com/spf13/cobra/cobra/cmd/add.go
deleted file mode 100644
index fb22096a3..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/add.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// 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.
-
-package cmd
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "unicode"
-
- "github.com/spf13/cobra"
-)
-
-func init() {
- addCmd.Flags().StringVarP(&packageName, "package", "t", "", "target package name (e.g. github.com/spf13/hugo)")
- addCmd.Flags().StringVarP(&parentName, "parent", "p", "rootCmd", "variable name of parent command for this command")
-}
-
-var packageName, parentName string
-
-var addCmd = &cobra.Command{
- Use: "add [command name]",
- Aliases: []string{"command"},
- Short: "Add a command to a Cobra Application",
- Long: `Add (cobra add) will create a new command, with a license and
-the appropriate structure for a Cobra-based CLI application,
-and register it to its parent (default rootCmd).
-
-If you want your command to be public, pass in the command name
-with an initial uppercase letter.
-
-Example: cobra add server -> resulting in a new cmd/server.go`,
-
- Run: func(cmd *cobra.Command, args []string) {
- if len(args) < 1 {
- er("add needs a name for the command")
- }
-
- var project *Project
- if packageName != "" {
- project = NewProject(packageName)
- } else {
- wd, err := os.Getwd()
- if err != nil {
- er(err)
- }
- project = NewProjectFromPath(wd)
- }
-
- cmdName := validateCmdName(args[0])
- cmdPath := filepath.Join(project.CmdPath(), cmdName+".go")
- createCmdFile(project.License(), cmdPath, cmdName)
-
- fmt.Fprintln(cmd.OutOrStdout(), cmdName, "created at", cmdPath)
- },
-}
-
-// validateCmdName returns source without any dashes and underscore.
-// If there will be dash or underscore, next letter will be uppered.
-// It supports only ASCII (1-byte character) strings.
-// https://github.com/spf13/cobra/issues/269
-func validateCmdName(source string) string {
- i := 0
- l := len(source)
- // The output is initialized on demand, then first dash or underscore
- // occurs.
- var output string
-
- for i < l {
- if source[i] == '-' || source[i] == '_' {
- if output == "" {
- output = source[:i]
- }
-
- // If it's last rune and it's dash or underscore,
- // don't add it output and break the loop.
- if i == l-1 {
- break
- }
-
- // If next character is dash or underscore,
- // just skip the current character.
- if source[i+1] == '-' || source[i+1] == '_' {
- i++
- continue
- }
-
- // If the current character is dash or underscore,
- // upper next letter and add to output.
- output += string(unicode.ToUpper(rune(source[i+1])))
- // We know, what source[i] is dash or underscore and source[i+1] is
- // uppered character, so make i = i+2.
- i += 2
- continue
- }
-
- // If the current character isn't dash or underscore,
- // just add it.
- if output != "" {
- output += string(source[i])
- }
- i++
- }
-
- if output == "" {
- return source // source is initially valid name.
- }
- return output
-}
-
-func createCmdFile(license License, path, cmdName string) {
- template := `{{comment .copyright}}
-{{if .license}}{{comment .license}}{{end}}
-
-package {{.cmdPackage}}
-
-import (
- "fmt"
-
- "github.com/spf13/cobra"
-)
-
-// {{.cmdName}}Cmd represents the {{.cmdName}} command
-var {{.cmdName}}Cmd = &cobra.Command{
- Use: "{{.cmdName}}",
- Short: "A brief description of your command",
- Long: ` + "`" + `A longer description that spans multiple lines and likely contains examples
-and usage of using your command. For example:
-
-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.` + "`" + `,
- Run: func(cmd *cobra.Command, args []string) {
- fmt.Println("{{.cmdName}} called")
- },
-}
-
-func init() {
- {{.parentName}}.AddCommand({{.cmdName}}Cmd)
-
- // Here you will define your flags and configuration settings.
-
- // Cobra supports Persistent Flags which will work for this command
- // and all subcommands, e.g.:
- // {{.cmdName}}Cmd.PersistentFlags().String("foo", "", "A help for foo")
-
- // Cobra supports local flags which will only run when this command
- // is called directly, e.g.:
- // {{.cmdName}}Cmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
-}
-`
-
- data := make(map[string]interface{})
- data["copyright"] = copyrightLine()
- data["license"] = license.Header
- data["cmdPackage"] = filepath.Base(filepath.Dir(path)) // last dir of path
- data["parentName"] = parentName
- data["cmdName"] = cmdName
-
- cmdScript, err := executeTemplate(template, data)
- if err != nil {
- er(err)
- }
- err = writeStringToFile(path, cmdScript)
- if err != nil {
- er(err)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go
deleted file mode 100644
index b920e2b9d..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package cmd
-
-import (
- "errors"
- "io/ioutil"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/spf13/viper"
-)
-
-// TestGoldenAddCmd initializes the project "github.com/spf13/testproject"
-// in GOPATH, adds "test" command
-// and compares the content of all files in cmd directory of testproject
-// with appropriate golden files.
-// Use -update to update existing golden files.
-func TestGoldenAddCmd(t *testing.T) {
- projectName := "github.com/spf13/testproject"
- project := NewProject(projectName)
- defer os.RemoveAll(project.AbsPath())
-
- viper.Set("author", "NAME HERE <EMAIL ADDRESS>")
- viper.Set("license", "apache")
- viper.Set("year", 2017)
- defer viper.Set("author", nil)
- defer viper.Set("license", nil)
- defer viper.Set("year", nil)
-
- // Initialize the project first.
- initializeProject(project)
-
- // Then add the "test" command.
- cmdName := "test"
- cmdPath := filepath.Join(project.CmdPath(), cmdName+".go")
- createCmdFile(project.License(), cmdPath, cmdName)
-
- expectedFiles := []string{".", "root.go", "test.go"}
- gotFiles := []string{}
-
- // Check project file hierarchy and compare the content of every single file
- // with appropriate golden file.
- err := filepath.Walk(project.CmdPath(), func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- // Make path relative to project.CmdPath().
- // E.g. path = "/home/user/go/src/github.com/spf13/testproject/cmd/root.go"
- // then it returns just "root.go".
- relPath, err := filepath.Rel(project.CmdPath(), path)
- if err != nil {
- return err
- }
- relPath = filepath.ToSlash(relPath)
- gotFiles = append(gotFiles, relPath)
- goldenPath := filepath.Join("testdata", filepath.Base(path)+".golden")
-
- switch relPath {
- // Known directories.
- case ".":
- return nil
- // Known files.
- case "root.go", "test.go":
- if *update {
- got, err := ioutil.ReadFile(path)
- if err != nil {
- return err
- }
- ioutil.WriteFile(goldenPath, got, 0644)
- }
- return compareFiles(path, goldenPath)
- }
- // Unknown file.
- return errors.New("unknown file: " + path)
- })
- if err != nil {
- t.Fatal(err)
- }
-
- // Check if some files lack.
- if err := checkLackFiles(expectedFiles, gotFiles); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestValidateCmdName(t *testing.T) {
- testCases := []struct {
- input string
- expected string
- }{
- {"cmdName", "cmdName"},
- {"cmd_name", "cmdName"},
- {"cmd-name", "cmdName"},
- {"cmd______Name", "cmdName"},
- {"cmd------Name", "cmdName"},
- {"cmd______name", "cmdName"},
- {"cmd------name", "cmdName"},
- {"cmdName-----", "cmdName"},
- {"cmdname-", "cmdname"},
- }
-
- for _, testCase := range testCases {
- got := validateCmdName(testCase.input)
- if testCase.expected != got {
- t.Errorf("Expected %q, got %q", testCase.expected, got)
- }
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go
deleted file mode 100644
index 59a5a1c9f..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package cmd
-
-import (
- "bytes"
- "errors"
- "flag"
- "fmt"
- "io/ioutil"
- "os/exec"
-)
-
-var update = flag.Bool("update", false, "update .golden files")
-
-func init() {
- // Mute commands.
- addCmd.SetOutput(new(bytes.Buffer))
- initCmd.SetOutput(new(bytes.Buffer))
-}
-
-// compareFiles compares the content of files with pathA and pathB.
-// If contents are equal, it returns nil.
-// If not, it returns which files are not equal
-// and diff (if system has diff command) between these files.
-func compareFiles(pathA, pathB string) error {
- contentA, err := ioutil.ReadFile(pathA)
- if err != nil {
- return err
- }
- contentB, err := ioutil.ReadFile(pathB)
- if err != nil {
- return err
- }
- if !bytes.Equal(contentA, contentB) {
- output := new(bytes.Buffer)
- output.WriteString(fmt.Sprintf("%q and %q are not equal!\n\n", pathA, pathB))
-
- diffPath, err := exec.LookPath("diff")
- if err != nil {
- // Don't execute diff if it can't be found.
- return nil
- }
- diffCmd := exec.Command(diffPath, "-u", pathA, pathB)
- diffCmd.Stdout = output
- diffCmd.Stderr = output
-
- output.WriteString("$ diff -u " + pathA + " " + pathB + "\n")
- if err := diffCmd.Run(); err != nil {
- output.WriteString("\n" + err.Error())
- }
- return errors.New(output.String())
- }
- return nil
-}
-
-// checkLackFiles checks if all elements of expected are in got.
-func checkLackFiles(expected, got []string) error {
- lacks := make([]string, 0, len(expected))
- for _, ev := range expected {
- if !stringInStringSlice(ev, got) {
- lacks = append(lacks, ev)
- }
- }
- if len(lacks) > 0 {
- return fmt.Errorf("Lack %v file(s): %v", len(lacks), lacks)
- }
- return nil
-}
-
-// stringInStringSlice checks if s is an element of slice.
-func stringInStringSlice(s string, slice []string) bool {
- for _, v := range slice {
- if s == v {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go b/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go
deleted file mode 100644
index cd94b3e31..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// 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.
-
-package cmd
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "text/template"
-)
-
-var srcPaths []string
-
-func init() {
- // Initialize srcPaths.
- envGoPath := os.Getenv("GOPATH")
- goPaths := filepath.SplitList(envGoPath)
- if len(goPaths) == 0 {
- // Adapted from https://github.com/Masterminds/glide/pull/798/files.
- // As of Go 1.8 the GOPATH is no longer required to be set. Instead there
- // is a default value. If there is no GOPATH check for the default value.
- // Note, checking the GOPATH first to avoid invoking the go toolchain if
- // possible.
-
- goExecutable := os.Getenv("COBRA_GO_EXECUTABLE")
- if len(goExecutable) <= 0 {
- goExecutable = "go"
- }
-
- out, err := exec.Command(goExecutable, "env", "GOPATH").Output()
- if err != nil {
- er(err)
- }
-
- toolchainGoPath := strings.TrimSpace(string(out))
- goPaths = filepath.SplitList(toolchainGoPath)
- if len(goPaths) == 0 {
- er("$GOPATH is not set")
- }
- }
- srcPaths = make([]string, 0, len(goPaths))
- for _, goPath := range goPaths {
- srcPaths = append(srcPaths, filepath.Join(goPath, "src"))
- }
-}
-
-func er(msg interface{}) {
- fmt.Println("Error:", msg)
- os.Exit(1)
-}
-
-// isEmpty checks if a given path is empty.
-// Hidden files in path are ignored.
-func isEmpty(path string) bool {
- fi, err := os.Stat(path)
- if err != nil {
- er(err)
- }
-
- if !fi.IsDir() {
- return fi.Size() == 0
- }
-
- f, err := os.Open(path)
- if err != nil {
- er(err)
- }
- defer f.Close()
-
- names, err := f.Readdirnames(-1)
- if err != nil && err != io.EOF {
- er(err)
- }
-
- for _, name := range names {
- if len(name) > 0 && name[0] != '.' {
- return false
- }
- }
- return true
-}
-
-// exists checks if a file or directory exists.
-func exists(path string) bool {
- if path == "" {
- return false
- }
- _, err := os.Stat(path)
- if err == nil {
- return true
- }
- if !os.IsNotExist(err) {
- er(err)
- }
- return false
-}
-
-func executeTemplate(tmplStr string, data interface{}) (string, error) {
- tmpl, err := template.New("").Funcs(template.FuncMap{"comment": commentifyString}).Parse(tmplStr)
- if err != nil {
- return "", err
- }
-
- buf := new(bytes.Buffer)
- err = tmpl.Execute(buf, data)
- return buf.String(), err
-}
-
-func writeStringToFile(path string, s string) error {
- return writeToFile(path, strings.NewReader(s))
-}
-
-// writeToFile writes r to file with path only
-// if file/directory on given path doesn't exist.
-func writeToFile(path string, r io.Reader) error {
- if exists(path) {
- return fmt.Errorf("%v already exists", path)
- }
-
- dir := filepath.Dir(path)
- if dir != "" {
- if err := os.MkdirAll(dir, 0777); err != nil {
- return err
- }
- }
-
- file, err := os.Create(path)
- if err != nil {
- return err
- }
- defer file.Close()
-
- _, err = io.Copy(file, r)
- return err
-}
-
-// commentfyString comments every line of in.
-func commentifyString(in string) string {
- var newlines []string
- lines := strings.Split(in, "\n")
- for _, line := range lines {
- if strings.HasPrefix(line, "//") {
- newlines = append(newlines, line)
- } else {
- if line == "" {
- newlines = append(newlines, "//")
- } else {
- newlines = append(newlines, "// "+line)
- }
- }
- }
- return strings.Join(newlines, "\n")
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/init.go b/vendor/github.com/spf13/cobra/cobra/cmd/init.go
deleted file mode 100644
index 244137015..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/init.go
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// 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.
-
-package cmd
-
-import (
- "fmt"
- "os"
- "path"
- "path/filepath"
-
- "github.com/spf13/cobra"
- "github.com/spf13/viper"
-)
-
-var initCmd = &cobra.Command{
- Use: "init [name]",
- Aliases: []string{"initialize", "initialise", "create"},
- Short: "Initialize a Cobra Application",
- Long: `Initialize (cobra init) will create a new application, with a license
-and the appropriate structure for a Cobra-based CLI application.
-
- * If a name is provided, it will be created in the current directory;
- * If no name is provided, the current directory will be assumed;
- * If a relative path is provided, it will be created inside $GOPATH
- (e.g. github.com/spf13/hugo);
- * If an absolute path is provided, it will be created;
- * If the directory already exists but is empty, it will be used.
-
-Init will not use an existing directory with contents.`,
-
- Run: func(cmd *cobra.Command, args []string) {
- wd, err := os.Getwd()
- if err != nil {
- er(err)
- }
-
- var project *Project
- if len(args) == 0 {
- project = NewProjectFromPath(wd)
- } else if len(args) == 1 {
- arg := args[0]
- if arg[0] == '.' {
- arg = filepath.Join(wd, arg)
- }
- if filepath.IsAbs(arg) {
- project = NewProjectFromPath(arg)
- } else {
- project = NewProject(arg)
- }
- } else {
- er("please provide only one argument")
- }
-
- initializeProject(project)
-
- fmt.Fprintln(cmd.OutOrStdout(), `Your Cobra application is ready at
-`+project.AbsPath()+`.
-
-Give it a try by going there and running `+"`go run main.go`."+`
-Add commands to it by running `+"`cobra add [cmdname]`.")
- },
-}
-
-func initializeProject(project *Project) {
- if !exists(project.AbsPath()) { // If path doesn't yet exist, create it
- err := os.MkdirAll(project.AbsPath(), os.ModePerm)
- if err != nil {
- er(err)
- }
- } else if !isEmpty(project.AbsPath()) { // If path exists and is not empty don't use it
- er("Cobra will not create a new project in a non empty directory: " + project.AbsPath())
- }
-
- // We have a directory and it's empty. Time to initialize it.
- createLicenseFile(project.License(), project.AbsPath())
- createMainFile(project)
- createRootCmdFile(project)
-}
-
-func createLicenseFile(license License, path string) {
- data := make(map[string]interface{})
- data["copyright"] = copyrightLine()
-
- // Generate license template from text and data.
- text, err := executeTemplate(license.Text, data)
- if err != nil {
- er(err)
- }
-
- // Write license text to LICENSE file.
- err = writeStringToFile(filepath.Join(path, "LICENSE"), text)
- if err != nil {
- er(err)
- }
-}
-
-func createMainFile(project *Project) {
- mainTemplate := `{{ comment .copyright }}
-{{if .license}}{{ comment .license }}{{end}}
-
-package main
-
-import "{{ .importpath }}"
-
-func main() {
- cmd.Execute()
-}
-`
- data := make(map[string]interface{})
- data["copyright"] = copyrightLine()
- data["license"] = project.License().Header
- data["importpath"] = path.Join(project.Name(), filepath.Base(project.CmdPath()))
-
- mainScript, err := executeTemplate(mainTemplate, data)
- if err != nil {
- er(err)
- }
-
- err = writeStringToFile(filepath.Join(project.AbsPath(), "main.go"), mainScript)
- if err != nil {
- er(err)
- }
-}
-
-func createRootCmdFile(project *Project) {
- template := `{{comment .copyright}}
-{{if .license}}{{comment .license}}{{end}}
-
-package cmd
-
-import (
- "fmt"
- "os"
-{{if .viper}}
- homedir "github.com/mitchellh/go-homedir"{{end}}
- "github.com/spf13/cobra"{{if .viper}}
- "github.com/spf13/viper"{{end}}
-){{if .viper}}
-
-var cfgFile string{{end}}
-
-// rootCmd represents the base command when called without any subcommands
-var rootCmd = &cobra.Command{
- Use: "{{.appName}}",
- Short: "A brief description of your application",
- Long: ` + "`" + `A longer description that spans multiple lines and likely contains
-examples and usage of using your application. For example:
-
-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.` + "`" + `,
- // Uncomment the following line if your bare application
- // has an action associated with it:
- // Run: func(cmd *cobra.Command, args []string) { },
-}
-
-// Execute adds all child commands to the root command and sets flags appropriately.
-// This is called by main.main(). It only needs to happen once to the rootCmd.
-func Execute() {
- if err := rootCmd.Execute(); err != nil {
- fmt.Println(err)
- os.Exit(1)
- }
-}
-
-func init() { {{- if .viper}}
- cobra.OnInitialize(initConfig)
-{{end}}
- // Here you will define your flags and configuration settings.
- // Cobra supports persistent flags, which, if defined here,
- // will be global for your application.{{ if .viper }}
- rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.{{ .appName }}.yaml)"){{ else }}
- // rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.{{ .appName }}.yaml)"){{ end }}
-
- // Cobra also supports local flags, which will only run
- // when this action is called directly.
- rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
-}{{ if .viper }}
-
-// initConfig reads in config file and ENV variables if set.
-func initConfig() {
- 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 ".{{ .appName }}" (without extension).
- viper.AddConfigPath(home)
- viper.SetConfigName(".{{ .appName }}")
- }
-
- viper.AutomaticEnv() // read in environment variables that match
-
- // If a config file is found, read it in.
- if err := viper.ReadInConfig(); err == nil {
- fmt.Println("Using config file:", viper.ConfigFileUsed())
- }
-}{{ end }}
-`
-
- data := make(map[string]interface{})
- data["copyright"] = copyrightLine()
- data["viper"] = viper.GetBool("useViper")
- data["license"] = project.License().Header
- data["appName"] = path.Base(project.Name())
-
- rootCmdScript, err := executeTemplate(template, data)
- if err != nil {
- er(err)
- }
-
- err = writeStringToFile(filepath.Join(project.CmdPath(), "root.go"), rootCmdScript)
- if err != nil {
- er(err)
- }
-
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go
deleted file mode 100644
index 40eb4038e..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package cmd
-
-import (
- "errors"
- "io/ioutil"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/spf13/viper"
-)
-
-// TestGoldenInitCmd initializes the project "github.com/spf13/testproject"
-// in GOPATH and compares the content of files in initialized project with
-// appropriate golden files ("testdata/*.golden").
-// Use -update to update existing golden files.
-func TestGoldenInitCmd(t *testing.T) {
- projectName := "github.com/spf13/testproject"
- project := NewProject(projectName)
- defer os.RemoveAll(project.AbsPath())
-
- viper.Set("author", "NAME HERE <EMAIL ADDRESS>")
- viper.Set("license", "apache")
- viper.Set("year", 2017)
- defer viper.Set("author", nil)
- defer viper.Set("license", nil)
- defer viper.Set("year", nil)
-
- os.Args = []string{"cobra", "init", projectName}
- if err := rootCmd.Execute(); err != nil {
- t.Fatal("Error by execution:", err)
- }
-
- expectedFiles := []string{".", "cmd", "LICENSE", "main.go", "cmd/root.go"}
- gotFiles := []string{}
-
- // Check project file hierarchy and compare the content of every single file
- // with appropriate golden file.
- err := filepath.Walk(project.AbsPath(), func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- // Make path relative to project.AbsPath().
- // E.g. path = "/home/user/go/src/github.com/spf13/testproject/cmd/root.go"
- // then it returns just "cmd/root.go".
- relPath, err := filepath.Rel(project.AbsPath(), path)
- if err != nil {
- return err
- }
- relPath = filepath.ToSlash(relPath)
- gotFiles = append(gotFiles, relPath)
- goldenPath := filepath.Join("testdata", filepath.Base(path)+".golden")
-
- switch relPath {
- // Known directories.
- case ".", "cmd":
- return nil
- // Known files.
- case "LICENSE", "main.go", "cmd/root.go":
- if *update {
- got, err := ioutil.ReadFile(path)
- if err != nil {
- return err
- }
- if err := ioutil.WriteFile(goldenPath, got, 0644); err != nil {
- t.Fatal("Error while updating file:", err)
- }
- }
- return compareFiles(path, goldenPath)
- }
- // Unknown file.
- return errors.New("unknown file: " + path)
- })
- if err != nil {
- t.Fatal(err)
- }
-
- // Check if some files lack.
- if err := checkLackFiles(expectedFiles, gotFiles); err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/project.go b/vendor/github.com/spf13/cobra/cobra/cmd/project.go
deleted file mode 100644
index 7ddb82585..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/project.go
+++ /dev/null
@@ -1,200 +0,0 @@
-package cmd
-
-import (
- "os"
- "path/filepath"
- "runtime"
- "strings"
-)
-
-// Project contains name, license and paths to projects.
-type Project struct {
- absPath string
- cmdPath string
- srcPath string
- license License
- name string
-}
-
-// NewProject returns Project with specified project name.
-func NewProject(projectName string) *Project {
- if projectName == "" {
- er("can't create project with blank name")
- }
-
- p := new(Project)
- p.name = projectName
-
- // 1. Find already created protect.
- p.absPath = findPackage(projectName)
-
- // 2. If there are no created project with this path, and user is in GOPATH,
- // then use GOPATH/src/projectName.
- if p.absPath == "" {
- wd, err := os.Getwd()
- if err != nil {
- er(err)
- }
- for _, srcPath := range srcPaths {
- goPath := filepath.Dir(srcPath)
- if filepathHasPrefix(wd, goPath) {
- p.absPath = filepath.Join(srcPath, projectName)
- break
- }
- }
- }
-
- // 3. If user is not in GOPATH, then use (first GOPATH)/src/projectName.
- if p.absPath == "" {
- p.absPath = filepath.Join(srcPaths[0], projectName)
- }
-
- return p
-}
-
-// findPackage returns full path to existing go package in GOPATHs.
-func findPackage(packageName string) string {
- if packageName == "" {
- return ""
- }
-
- for _, srcPath := range srcPaths {
- packagePath := filepath.Join(srcPath, packageName)
- if exists(packagePath) {
- return packagePath
- }
- }
-
- return ""
-}
-
-// NewProjectFromPath returns Project with specified absolute path to
-// package.
-func NewProjectFromPath(absPath string) *Project {
- if absPath == "" {
- er("can't create project: absPath can't be blank")
- }
- if !filepath.IsAbs(absPath) {
- er("can't create project: absPath is not absolute")
- }
-
- // If absPath is symlink, use its destination.
- fi, err := os.Lstat(absPath)
- if err != nil {
- er("can't read path info: " + err.Error())
- }
- if fi.Mode()&os.ModeSymlink != 0 {
- path, err := os.Readlink(absPath)
- if err != nil {
- er("can't read the destination of symlink: " + err.Error())
- }
- absPath = path
- }
-
- p := new(Project)
- p.absPath = strings.TrimSuffix(absPath, findCmdDir(absPath))
- p.name = filepath.ToSlash(trimSrcPath(p.absPath, p.SrcPath()))
- return p
-}
-
-// trimSrcPath trims at the beginning of absPath the srcPath.
-func trimSrcPath(absPath, srcPath string) string {
- relPath, err := filepath.Rel(srcPath, absPath)
- if err != nil {
- er(err)
- }
- return relPath
-}
-
-// License returns the License object of project.
-func (p *Project) License() License {
- if p.license.Text == "" && p.license.Name != "None" {
- p.license = getLicense()
- }
- return p.license
-}
-
-// Name returns the name of project, e.g. "github.com/spf13/cobra"
-func (p Project) Name() string {
- return p.name
-}
-
-// CmdPath returns absolute path to directory, where all commands are located.
-func (p *Project) CmdPath() string {
- if p.absPath == "" {
- return ""
- }
- if p.cmdPath == "" {
- p.cmdPath = filepath.Join(p.absPath, findCmdDir(p.absPath))
- }
- return p.cmdPath
-}
-
-// findCmdDir checks if base of absPath is cmd dir and returns it or
-// looks for existing cmd dir in absPath.
-func findCmdDir(absPath string) string {
- if !exists(absPath) || isEmpty(absPath) {
- return "cmd"
- }
-
- if isCmdDir(absPath) {
- return filepath.Base(absPath)
- }
-
- files, _ := filepath.Glob(filepath.Join(absPath, "c*"))
- for _, file := range files {
- if isCmdDir(file) {
- return filepath.Base(file)
- }
- }
-
- return "cmd"
-}
-
-// isCmdDir checks if base of name is one of cmdDir.
-func isCmdDir(name string) bool {
- name = filepath.Base(name)
- for _, cmdDir := range []string{"cmd", "cmds", "command", "commands"} {
- if name == cmdDir {
- return true
- }
- }
- return false
-}
-
-// AbsPath returns absolute path of project.
-func (p Project) AbsPath() string {
- return p.absPath
-}
-
-// SrcPath returns absolute path to $GOPATH/src where project is located.
-func (p *Project) SrcPath() string {
- if p.srcPath != "" {
- return p.srcPath
- }
- if p.absPath == "" {
- p.srcPath = srcPaths[0]
- return p.srcPath
- }
-
- for _, srcPath := range srcPaths {
- if filepathHasPrefix(p.absPath, srcPath) {
- p.srcPath = srcPath
- break
- }
- }
-
- return p.srcPath
-}
-
-func filepathHasPrefix(path string, prefix string) bool {
- if len(path) <= len(prefix) {
- return false
- }
- if runtime.GOOS == "windows" {
- // Paths in windows are case-insensitive.
- return strings.EqualFold(path[0:len(prefix)], prefix)
- }
- return path[0:len(prefix)] == prefix
-
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/project_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/project_test.go
deleted file mode 100644
index 037f7c554..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/project_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package cmd
-
-import (
- "testing"
-)
-
-func TestFindExistingPackage(t *testing.T) {
- path := findPackage("github.com/spf13/cobra")
- if path == "" {
- t.Fatal("findPackage didn't find the existing package")
- }
- if !hasGoPathPrefix(path) {
- t.Fatalf("%q is not in GOPATH, but must be", path)
- }
-}
-
-func hasGoPathPrefix(path string) bool {
- for _, srcPath := range srcPaths {
- if filepathHasPrefix(path, srcPath) {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/root.go b/vendor/github.com/spf13/cobra/cobra/cmd/root.go
deleted file mode 100644
index 19568f980..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/root.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// 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.
-
-package cmd
-
-import (
- "fmt"
-
- homedir "github.com/mitchellh/go-homedir"
- "github.com/spf13/cobra"
- "github.com/spf13/viper"
-)
-
-var (
- // Used for flags.
- cfgFile, userLicense string
-
- rootCmd = &cobra.Command{
- Use: "cobra",
- Short: "A generator for Cobra based Applications",
- Long: `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.`,
- }
-)
-
-// Execute executes the root command.
-func Execute() {
- rootCmd.Execute()
-}
-
-func init() {
- cobra.OnInitialize(initConfig)
-
- rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")
- rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution")
- rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "name of license for the project")
- rootCmd.PersistentFlags().Bool("viper", true, "use Viper for configuration")
- viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author"))
- viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper"))
- viper.SetDefault("author", "NAME HERE <EMAIL ADDRESS>")
- viper.SetDefault("license", "apache")
-
- rootCmd.AddCommand(addCmd)
- rootCmd.AddCommand(initCmd)
-}
-
-func initConfig() {
- if cfgFile != "" {
- // Use config file from the flag.
- viper.SetConfigFile(cfgFile)
- } else {
- // Find home directory.
- home, err := homedir.Dir()
- if err != nil {
- er(err)
- }
-
- // Search config in home directory with name ".cobra" (without extension).
- viper.AddConfigPath(home)
- viper.SetConfigName(".cobra")
- }
-
- viper.AutomaticEnv()
-
- if err := viper.ReadInConfig(); err == nil {
- fmt.Println("Using config file:", viper.ConfigFileUsed())
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden
deleted file mode 100644
index cdbe38d70..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
-//
-// 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.
-
-package main
-
-import "github.com/spf13/testproject/cmd"
-
-func main() {
- cmd.Execute()
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden
deleted file mode 100644
index d74f4cd45..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
-//
-// 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.
-
-package cmd
-
-import (
- "fmt"
- "os"
-
- homedir "github.com/mitchellh/go-homedir"
- "github.com/spf13/cobra"
- "github.com/spf13/viper"
-)
-
-var cfgFile string
-
-// rootCmd represents the base command when called without any subcommands
-var rootCmd = &cobra.Command{
- Use: "testproject",
- Short: "A brief description of your application",
- Long: `A longer description that spans multiple lines and likely contains
-examples and usage of using your application. For example:
-
-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.`,
- // Uncomment the following line if your bare application
- // has an action associated with it:
- // Run: func(cmd *cobra.Command, args []string) { },
-}
-
-// Execute adds all child commands to the root command and sets flags appropriately.
-// This is called by main.main(). It only needs to happen once to the rootCmd.
-func Execute() {
- if err := rootCmd.Execute(); err != nil {
- fmt.Println(err)
- os.Exit(1)
- }
-}
-
-func init() {
- cobra.OnInitialize(initConfig)
-
- // Here you will define your flags and configuration settings.
- // Cobra supports persistent flags, which, if defined here,
- // will be global for your application.
- rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.testproject.yaml)")
-
- // Cobra also supports local flags, which will only run
- // when this action is called directly.
- rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
-}
-
-// initConfig reads in config file and ENV variables if set.
-func initConfig() {
- 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 ".testproject" (without extension).
- viper.AddConfigPath(home)
- viper.SetConfigName(".testproject")
- }
-
- viper.AutomaticEnv() // read in environment variables that match
-
- // If a config file is found, read it in.
- if err := viper.ReadInConfig(); err == nil {
- fmt.Println("Using config file:", viper.ConfigFileUsed())
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden
deleted file mode 100644
index ed6442755..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
-//
-// 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.
-
-package cmd
-
-import (
- "fmt"
-
- "github.com/spf13/cobra"
-)
-
-// testCmd represents the test command
-var testCmd = &cobra.Command{
- Use: "test",
- Short: "A brief description of your command",
- Long: `A longer description that spans multiple lines and likely contains examples
-and usage of using your command. For example:
-
-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.`,
- Run: func(cmd *cobra.Command, args []string) {
- fmt.Println("test called")
- },
-}
-
-func init() {
- rootCmd.AddCommand(testCmd)
-
- // Here you will define your flags and configuration settings.
-
- // Cobra supports Persistent Flags which will work for this command
- // and all subcommands, e.g.:
- // testCmd.PersistentFlags().String("foo", "", "A help for foo")
-
- // Cobra supports local flags which will only run when this command
- // is called directly, e.g.:
- // testCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/main.go b/vendor/github.com/spf13/cobra/cobra/main.go
deleted file mode 100644
index c3a9d9cb0..000000000
--- a/vendor/github.com/spf13/cobra/cobra/main.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// 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.
-
-package main
-
-import "github.com/spf13/cobra/cobra/cmd"
-
-func main() {
- cmd.Execute()
-}
diff --git a/vendor/github.com/spf13/cobra/cobra_test.go b/vendor/github.com/spf13/cobra/cobra_test.go
deleted file mode 100644
index 0d1755bdb..000000000
--- a/vendor/github.com/spf13/cobra/cobra_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package cobra
-
-import (
- "testing"
- "text/template"
-)
-
-func TestAddTemplateFunctions(t *testing.T) {
- AddTemplateFunc("t", func() bool { return true })
- AddTemplateFuncs(template.FuncMap{
- "f": func() bool { return false },
- "h": func() string { return "Hello," },
- "w": func() string { return "world." }})
-
- c := &Command{}
- c.SetUsageTemplate(`{{if t}}{{h}}{{end}}{{if f}}{{h}}{{end}} {{w}}`)
-
- const expected = "Hello, world."
- if got := c.UsageString(); got != expected {
- t.Errorf("Expected UsageString: %v\nGot: %v", expected, got)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go
index 29675b336..15b811279 100644
--- a/vendor/github.com/spf13/cobra/command.go
+++ b/vendor/github.com/spf13/cobra/command.go
@@ -475,6 +475,9 @@ Loop:
s := args[0]
args = args[1:]
switch {
+ case s == "--":
+ // "--" terminates the flags
+ break Loop
case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags):
// If '--flag arg' then
// delete arg from args.
diff --git a/vendor/github.com/spf13/cobra/command_test.go b/vendor/github.com/spf13/cobra/command_test.go
deleted file mode 100644
index d874a9a51..000000000
--- a/vendor/github.com/spf13/cobra/command_test.go
+++ /dev/null
@@ -1,1628 +0,0 @@
-package cobra
-
-import (
- "bytes"
- "fmt"
- "os"
- "reflect"
- "strings"
- "testing"
-
- "github.com/spf13/pflag"
-)
-
-func emptyRun(*Command, []string) {}
-
-func executeCommand(root *Command, args ...string) (output string, err error) {
- _, output, err = executeCommandC(root, args...)
- return output, err
-}
-
-func executeCommandC(root *Command, args ...string) (c *Command, output string, err error) {
- buf := new(bytes.Buffer)
- root.SetOutput(buf)
- root.SetArgs(args)
-
- c, err = root.ExecuteC()
-
- return c, buf.String(), err
-}
-
-func resetCommandLineFlagSet() {
- pflag.CommandLine = pflag.NewFlagSet(os.Args[0], pflag.ExitOnError)
-}
-
-func checkStringContains(t *testing.T, got, expected string) {
- if !strings.Contains(got, expected) {
- t.Errorf("Expected to contain: \n %v\nGot:\n %v\n", expected, got)
- }
-}
-
-func checkStringOmits(t *testing.T, got, expected string) {
- if strings.Contains(got, expected) {
- t.Errorf("Expected to not contain: \n %v\nGot: %v", expected, got)
- }
-}
-
-func TestSingleCommand(t *testing.T) {
- var rootCmdArgs []string
- rootCmd := &Command{
- Use: "root",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { rootCmdArgs = args },
- }
- aCmd := &Command{Use: "a", Args: NoArgs, Run: emptyRun}
- bCmd := &Command{Use: "b", Args: NoArgs, Run: emptyRun}
- rootCmd.AddCommand(aCmd, bCmd)
-
- output, err := executeCommand(rootCmd, "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(rootCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("rootCmdArgs expected: %q, got: %q", expected, got)
- }
-}
-
-func TestChildCommand(t *testing.T) {
- var child1CmdArgs []string
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- child1Cmd := &Command{
- Use: "child1",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { child1CmdArgs = args },
- }
- child2Cmd := &Command{Use: "child2", Args: NoArgs, Run: emptyRun}
- rootCmd.AddCommand(child1Cmd, child2Cmd)
-
- output, err := executeCommand(rootCmd, "child1", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(child1CmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("child1CmdArgs expected: %q, got: %q", expected, got)
- }
-}
-
-func TestCallCommandWithoutSubcommands(t *testing.T) {
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- _, err := executeCommand(rootCmd)
- if err != nil {
- t.Errorf("Calling command without subcommands should not have error: %v", err)
- }
-}
-
-func TestRootExecuteUnknownCommand(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- rootCmd.AddCommand(&Command{Use: "child", Run: emptyRun})
-
- output, _ := executeCommand(rootCmd, "unknown")
-
- expected := "Error: unknown command \"unknown\" for \"root\"\nRun 'root --help' for usage.\n"
-
- if output != expected {
- t.Errorf("Expected:\n %q\nGot:\n %q\n", expected, output)
- }
-}
-
-func TestSubcommandExecuteC(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- c, output, err := executeCommandC(rootCmd, "child")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if c.Name() != "child" {
- t.Errorf(`invalid command returned from ExecuteC: expected "child"', got %q`, c.Name())
- }
-}
-
-func TestRootUnknownCommandSilenced(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- rootCmd.SilenceErrors = true
- rootCmd.SilenceUsage = true
- rootCmd.AddCommand(&Command{Use: "child", Run: emptyRun})
-
- output, _ := executeCommand(rootCmd, "unknown")
- if output != "" {
- t.Errorf("Expected blank output, because of silenced usage.\nGot:\n %q\n", output)
- }
-}
-
-func TestCommandAlias(t *testing.T) {
- var timesCmdArgs []string
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- echoCmd := &Command{
- Use: "echo",
- Aliases: []string{"say", "tell"},
- Args: NoArgs,
- Run: emptyRun,
- }
- timesCmd := &Command{
- Use: "times",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { timesCmdArgs = args },
- }
- echoCmd.AddCommand(timesCmd)
- rootCmd.AddCommand(echoCmd)
-
- output, err := executeCommand(rootCmd, "tell", "times", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(timesCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("timesCmdArgs expected: %v, got: %v", expected, got)
- }
-}
-
-func TestEnablePrefixMatching(t *testing.T) {
- EnablePrefixMatching = true
-
- var aCmdArgs []string
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- aCmd := &Command{
- Use: "aCmd",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { aCmdArgs = args },
- }
- bCmd := &Command{Use: "bCmd", Args: NoArgs, Run: emptyRun}
- rootCmd.AddCommand(aCmd, bCmd)
-
- output, err := executeCommand(rootCmd, "a", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(aCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("aCmdArgs expected: %q, got: %q", expected, got)
- }
-
- EnablePrefixMatching = false
-}
-
-func TestAliasPrefixMatching(t *testing.T) {
- EnablePrefixMatching = true
-
- var timesCmdArgs []string
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- echoCmd := &Command{
- Use: "echo",
- Aliases: []string{"say", "tell"},
- Args: NoArgs,
- Run: emptyRun,
- }
- timesCmd := &Command{
- Use: "times",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { timesCmdArgs = args },
- }
- echoCmd.AddCommand(timesCmd)
- rootCmd.AddCommand(echoCmd)
-
- output, err := executeCommand(rootCmd, "sa", "times", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(timesCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("timesCmdArgs expected: %v, got: %v", expected, got)
- }
-
- EnablePrefixMatching = false
-}
-
-// TestChildSameName checks the correct behaviour of cobra in cases,
-// when an application with name "foo" and with subcommand "foo"
-// is executed with args "foo foo".
-func TestChildSameName(t *testing.T) {
- var fooCmdArgs []string
- rootCmd := &Command{Use: "foo", Args: NoArgs, Run: emptyRun}
- fooCmd := &Command{
- Use: "foo",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { fooCmdArgs = args },
- }
- barCmd := &Command{Use: "bar", Args: NoArgs, Run: emptyRun}
- rootCmd.AddCommand(fooCmd, barCmd)
-
- output, err := executeCommand(rootCmd, "foo", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(fooCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("fooCmdArgs expected: %v, got: %v", expected, got)
- }
-}
-
-// TestGrandChildSameName checks the correct behaviour of cobra in cases,
-// when user has a root command and a grand child
-// with the same name.
-func TestGrandChildSameName(t *testing.T) {
- var fooCmdArgs []string
- rootCmd := &Command{Use: "foo", Args: NoArgs, Run: emptyRun}
- barCmd := &Command{Use: "bar", Args: NoArgs, Run: emptyRun}
- fooCmd := &Command{
- Use: "foo",
- Args: ExactArgs(2),
- Run: func(_ *Command, args []string) { fooCmdArgs = args },
- }
- barCmd.AddCommand(fooCmd)
- rootCmd.AddCommand(barCmd)
-
- output, err := executeCommand(rootCmd, "bar", "foo", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(fooCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("fooCmdArgs expected: %v, got: %v", expected, got)
- }
-}
-
-func TestFlagLong(t *testing.T) {
- var cArgs []string
- c := &Command{
- Use: "c",
- Args: ArbitraryArgs,
- Run: func(_ *Command, args []string) { cArgs = args },
- }
-
- var intFlagValue int
- var stringFlagValue string
- c.Flags().IntVar(&intFlagValue, "intf", -1, "")
- c.Flags().StringVar(&stringFlagValue, "sf", "", "")
-
- output, err := executeCommand(c, "--intf=7", "--sf=abc", "one", "--", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", err)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if c.ArgsLenAtDash() != 1 {
- t.Errorf("Expected ArgsLenAtDash: %v but got %v", 1, c.ArgsLenAtDash())
- }
- if intFlagValue != 7 {
- t.Errorf("Expected intFlagValue: %v, got %v", 7, intFlagValue)
- }
- if stringFlagValue != "abc" {
- t.Errorf("Expected stringFlagValue: %q, got %q", "abc", stringFlagValue)
- }
-
- got := strings.Join(cArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("Expected arguments: %q, got %q", expected, got)
- }
-}
-
-func TestFlagShort(t *testing.T) {
- var cArgs []string
- c := &Command{
- Use: "c",
- Args: ArbitraryArgs,
- Run: func(_ *Command, args []string) { cArgs = args },
- }
-
- var intFlagValue int
- var stringFlagValue string
- c.Flags().IntVarP(&intFlagValue, "intf", "i", -1, "")
- c.Flags().StringVarP(&stringFlagValue, "sf", "s", "", "")
-
- output, err := executeCommand(c, "-i", "7", "-sabc", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", err)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if intFlagValue != 7 {
- t.Errorf("Expected flag value: %v, got %v", 7, intFlagValue)
- }
- if stringFlagValue != "abc" {
- t.Errorf("Expected stringFlagValue: %q, got %q", "abc", stringFlagValue)
- }
-
- got := strings.Join(cArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("Expected arguments: %q, got %q", expected, got)
- }
-}
-
-func TestChildFlag(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- var intFlagValue int
- childCmd.Flags().IntVarP(&intFlagValue, "intf", "i", -1, "")
-
- output, err := executeCommand(rootCmd, "child", "-i7")
- if output != "" {
- t.Errorf("Unexpected output: %v", err)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if intFlagValue != 7 {
- t.Errorf("Expected flag value: %v, got %v", 7, intFlagValue)
- }
-}
-
-func TestChildFlagWithParentLocalFlag(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- var intFlagValue int
- rootCmd.Flags().StringP("sf", "s", "", "")
- childCmd.Flags().IntVarP(&intFlagValue, "intf", "i", -1, "")
-
- _, err := executeCommand(rootCmd, "child", "-i7", "-sabc")
- if err == nil {
- t.Errorf("Invalid flag should generate error")
- }
-
- checkStringContains(t, err.Error(), "unknown shorthand")
-
- if intFlagValue != 7 {
- t.Errorf("Expected flag value: %v, got %v", 7, intFlagValue)
- }
-}
-
-func TestFlagInvalidInput(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- rootCmd.Flags().IntP("intf", "i", -1, "")
-
- _, err := executeCommand(rootCmd, "-iabc")
- if err == nil {
- t.Errorf("Invalid flag value should generate error")
- }
-
- checkStringContains(t, err.Error(), "invalid syntax")
-}
-
-func TestFlagBeforeCommand(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- var flagValue int
- childCmd.Flags().IntVarP(&flagValue, "intf", "i", -1, "")
-
- // With short flag.
- _, err := executeCommand(rootCmd, "-i7", "child")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
- if flagValue != 7 {
- t.Errorf("Expected flag value: %v, got %v", 7, flagValue)
- }
-
- // With long flag.
- _, err = executeCommand(rootCmd, "--intf=8", "child")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
- if flagValue != 8 {
- t.Errorf("Expected flag value: %v, got %v", 9, flagValue)
- }
-}
-
-func TestStripFlags(t *testing.T) {
- tests := []struct {
- input []string
- output []string
- }{
- {
- []string{"foo", "bar"},
- []string{"foo", "bar"},
- },
- {
- []string{"foo", "--str", "-s"},
- []string{"foo"},
- },
- {
- []string{"-s", "foo", "--str", "bar"},
- []string{},
- },
- {
- []string{"-i10", "echo"},
- []string{"echo"},
- },
- {
- []string{"-i=10", "echo"},
- []string{"echo"},
- },
- {
- []string{"--int=100", "echo"},
- []string{"echo"},
- },
- {
- []string{"-ib", "echo", "-sfoo", "baz"},
- []string{"echo", "baz"},
- },
- {
- []string{"-i=baz", "bar", "-i", "foo", "blah"},
- []string{"bar", "blah"},
- },
- {
- []string{"--int=baz", "-sbar", "-i", "foo", "blah"},
- []string{"blah"},
- },
- {
- []string{"--bool", "bar", "-i", "foo", "blah"},
- []string{"bar", "blah"},
- },
- {
- []string{"-b", "bar", "-i", "foo", "blah"},
- []string{"bar", "blah"},
- },
- {
- []string{"--persist", "bar"},
- []string{"bar"},
- },
- {
- []string{"-p", "bar"},
- []string{"bar"},
- },
- }
-
- c := &Command{Use: "c", Run: emptyRun}
- c.PersistentFlags().BoolP("persist", "p", false, "")
- c.Flags().IntP("int", "i", -1, "")
- c.Flags().StringP("str", "s", "", "")
- c.Flags().BoolP("bool", "b", false, "")
-
- for i, test := range tests {
- got := stripFlags(test.input, c)
- if !reflect.DeepEqual(test.output, got) {
- t.Errorf("(%v) Expected: %v, got: %v", i, test.output, got)
- }
- }
-}
-
-func TestDisableFlagParsing(t *testing.T) {
- var cArgs []string
- c := &Command{
- Use: "c",
- DisableFlagParsing: true,
- Run: func(_ *Command, args []string) {
- cArgs = args
- },
- }
-
- args := []string{"cmd", "-v", "-race", "-file", "foo.go"}
- output, err := executeCommand(c, args...)
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if !reflect.DeepEqual(args, cArgs) {
- t.Errorf("Expected: %v, got: %v", args, cArgs)
- }
-}
-
-func TestPersistentFlagsOnSameCommand(t *testing.T) {
- var rootCmdArgs []string
- rootCmd := &Command{
- Use: "root",
- Args: ArbitraryArgs,
- Run: func(_ *Command, args []string) { rootCmdArgs = args },
- }
-
- var flagValue int
- rootCmd.PersistentFlags().IntVarP(&flagValue, "intf", "i", -1, "")
-
- output, err := executeCommand(rootCmd, "-i7", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(rootCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("rootCmdArgs expected: %q, got %q", expected, got)
- }
- if flagValue != 7 {
- t.Errorf("flagValue expected: %v, got %v", 7, flagValue)
- }
-}
-
-// TestEmptyInputs checks,
-// if flags correctly parsed with blank strings in args.
-func TestEmptyInputs(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
-
- var flagValue int
- c.Flags().IntVarP(&flagValue, "intf", "i", -1, "")
-
- output, err := executeCommand(c, "", "-i7", "")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if flagValue != 7 {
- t.Errorf("flagValue expected: %v, got %v", 7, flagValue)
- }
-}
-
-func TestOverwrittenFlag(t *testing.T) {
- // TODO: This test fails, but should work.
- t.Skip()
-
- parent := &Command{Use: "parent", Run: emptyRun}
- child := &Command{Use: "child", Run: emptyRun}
-
- parent.PersistentFlags().Bool("boolf", false, "")
- parent.PersistentFlags().Int("intf", -1, "")
- child.Flags().String("strf", "", "")
- child.Flags().Int("intf", -1, "")
-
- parent.AddCommand(child)
-
- childInherited := child.InheritedFlags()
- childLocal := child.LocalFlags()
-
- if childLocal.Lookup("strf") == nil {
- t.Error(`LocalFlags expected to contain "strf", got "nil"`)
- }
- if childInherited.Lookup("boolf") == nil {
- t.Error(`InheritedFlags expected to contain "boolf", got "nil"`)
- }
-
- if childInherited.Lookup("intf") != nil {
- t.Errorf(`InheritedFlags should not contain overwritten flag "intf"`)
- }
- if childLocal.Lookup("intf") == nil {
- t.Error(`LocalFlags expected to contain "intf", got "nil"`)
- }
-}
-
-func TestPersistentFlagsOnChild(t *testing.T) {
- var childCmdArgs []string
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{
- Use: "child",
- Args: ArbitraryArgs,
- Run: func(_ *Command, args []string) { childCmdArgs = args },
- }
- rootCmd.AddCommand(childCmd)
-
- var parentFlagValue int
- var childFlagValue int
- rootCmd.PersistentFlags().IntVarP(&parentFlagValue, "parentf", "p", -1, "")
- childCmd.Flags().IntVarP(&childFlagValue, "childf", "c", -1, "")
-
- output, err := executeCommand(rootCmd, "child", "-c7", "-p8", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- got := strings.Join(childCmdArgs, " ")
- expected := "one two"
- if got != expected {
- t.Errorf("childCmdArgs expected: %q, got %q", expected, got)
- }
- if parentFlagValue != 8 {
- t.Errorf("parentFlagValue expected: %v, got %v", 8, parentFlagValue)
- }
- if childFlagValue != 7 {
- t.Errorf("childFlagValue expected: %v, got %v", 7, childFlagValue)
- }
-}
-
-func TestRequiredFlags(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
- c.Flags().String("foo1", "", "")
- c.MarkFlagRequired("foo1")
- c.Flags().String("foo2", "", "")
- c.MarkFlagRequired("foo2")
- c.Flags().String("bar", "", "")
-
- expected := fmt.Sprintf("required flag(s) %q, %q not set", "foo1", "foo2")
-
- _, err := executeCommand(c)
- got := err.Error()
-
- if got != expected {
- t.Errorf("Expected error: %q, got: %q", expected, got)
- }
-}
-
-func TestPersistentRequiredFlags(t *testing.T) {
- parent := &Command{Use: "parent", Run: emptyRun}
- parent.PersistentFlags().String("foo1", "", "")
- parent.MarkPersistentFlagRequired("foo1")
- parent.PersistentFlags().String("foo2", "", "")
- parent.MarkPersistentFlagRequired("foo2")
- parent.Flags().String("foo3", "", "")
-
- child := &Command{Use: "child", Run: emptyRun}
- child.Flags().String("bar1", "", "")
- child.MarkFlagRequired("bar1")
- child.Flags().String("bar2", "", "")
- child.MarkFlagRequired("bar2")
- child.Flags().String("bar3", "", "")
-
- parent.AddCommand(child)
-
- expected := fmt.Sprintf("required flag(s) %q, %q, %q, %q not set", "bar1", "bar2", "foo1", "foo2")
-
- _, err := executeCommand(parent, "child")
- if err.Error() != expected {
- t.Errorf("Expected %q, got %q", expected, err.Error())
- }
-}
-
-func TestInitHelpFlagMergesFlags(t *testing.T) {
- usage := "custom flag"
- rootCmd := &Command{Use: "root"}
- rootCmd.PersistentFlags().Bool("help", false, "custom flag")
- childCmd := &Command{Use: "child"}
- rootCmd.AddCommand(childCmd)
-
- childCmd.InitDefaultHelpFlag()
- got := childCmd.Flags().Lookup("help").Usage
- if got != usage {
- t.Errorf("Expected the help flag from the root command with usage: %v\nGot the default with usage: %v", usage, got)
- }
-}
-
-func TestHelpCommandExecuted(t *testing.T) {
- rootCmd := &Command{Use: "root", Long: "Long description", Run: emptyRun}
- rootCmd.AddCommand(&Command{Use: "child", Run: emptyRun})
-
- output, err := executeCommand(rootCmd, "help")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, rootCmd.Long)
-}
-
-func TestHelpCommandExecutedOnChild(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Long: "Long description", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- output, err := executeCommand(rootCmd, "help", "child")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, childCmd.Long)
-}
-
-func TestSetHelpCommand(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
- c.AddCommand(&Command{Use: "empty", Run: emptyRun})
-
- expected := "WORKS"
- c.SetHelpCommand(&Command{
- Use: "help [command]",
- Short: "Help about any command",
- Long: `Help provides help for any command in the application.
- Simply type ` + c.Name() + ` help [path to command] for full details.`,
- Run: func(c *Command, _ []string) { c.Print(expected) },
- })
-
- got, err := executeCommand(c, "help")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if got != expected {
- t.Errorf("Expected to contain %q, got %q", expected, got)
- }
-}
-
-func TestHelpFlagExecuted(t *testing.T) {
- rootCmd := &Command{Use: "root", Long: "Long description", Run: emptyRun}
-
- output, err := executeCommand(rootCmd, "--help")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, rootCmd.Long)
-}
-
-func TestHelpFlagExecutedOnChild(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Long: "Long description", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- output, err := executeCommand(rootCmd, "child", "--help")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, childCmd.Long)
-}
-
-// TestHelpFlagInHelp checks,
-// if '--help' flag is shown in help for child (executing `parent help child`),
-// that has no other flags.
-// Related to https://github.com/spf13/cobra/issues/302.
-func TestHelpFlagInHelp(t *testing.T) {
- parentCmd := &Command{Use: "parent", Run: func(*Command, []string) {}}
-
- childCmd := &Command{Use: "child", Run: func(*Command, []string) {}}
- parentCmd.AddCommand(childCmd)
-
- output, err := executeCommand(parentCmd, "help", "child")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, "[flags]")
-}
-
-func TestFlagsInUsage(t *testing.T) {
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: func(*Command, []string) {}}
- output, err := executeCommand(rootCmd, "--help")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, "[flags]")
-}
-
-func TestHelpExecutedOnNonRunnableChild(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Long: "Long description"}
- rootCmd.AddCommand(childCmd)
-
- output, err := executeCommand(rootCmd, "child")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, childCmd.Long)
-}
-
-func TestVersionFlagExecuted(t *testing.T) {
- rootCmd := &Command{Use: "root", Version: "1.0.0", Run: emptyRun}
-
- output, err := executeCommand(rootCmd, "--version", "arg1")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, "root version 1.0.0")
-}
-
-func TestVersionTemplate(t *testing.T) {
- rootCmd := &Command{Use: "root", Version: "1.0.0", Run: emptyRun}
- rootCmd.SetVersionTemplate(`customized version: {{.Version}}`)
-
- output, err := executeCommand(rootCmd, "--version", "arg1")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, "customized version: 1.0.0")
-}
-
-func TestVersionFlagExecutedOnSubcommand(t *testing.T) {
- rootCmd := &Command{Use: "root", Version: "1.0.0"}
- rootCmd.AddCommand(&Command{Use: "sub", Run: emptyRun})
-
- output, err := executeCommand(rootCmd, "--version", "sub")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, "root version 1.0.0")
-}
-
-func TestVersionFlagOnlyAddedToRoot(t *testing.T) {
- rootCmd := &Command{Use: "root", Version: "1.0.0", Run: emptyRun}
- rootCmd.AddCommand(&Command{Use: "sub", Run: emptyRun})
-
- _, err := executeCommand(rootCmd, "sub", "--version")
- if err == nil {
- t.Errorf("Expected error")
- }
-
- checkStringContains(t, err.Error(), "unknown flag: --version")
-}
-
-func TestVersionFlagOnlyExistsIfVersionNonEmpty(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
-
- _, err := executeCommand(rootCmd, "--version")
- if err == nil {
- t.Errorf("Expected error")
- }
- checkStringContains(t, err.Error(), "unknown flag: --version")
-}
-
-func TestUsageIsNotPrintedTwice(t *testing.T) {
- var cmd = &Command{Use: "root"}
- var sub = &Command{Use: "sub"}
- cmd.AddCommand(sub)
-
- output, _ := executeCommand(cmd, "")
- if strings.Count(output, "Usage:") != 1 {
- t.Error("Usage output is not printed exactly once")
- }
-}
-
-func TestVisitParents(t *testing.T) {
- c := &Command{Use: "app"}
- sub := &Command{Use: "sub"}
- dsub := &Command{Use: "dsub"}
- sub.AddCommand(dsub)
- c.AddCommand(sub)
-
- total := 0
- add := func(x *Command) {
- total++
- }
- sub.VisitParents(add)
- if total != 1 {
- t.Errorf("Should have visited 1 parent but visited %d", total)
- }
-
- total = 0
- dsub.VisitParents(add)
- if total != 2 {
- t.Errorf("Should have visited 2 parents but visited %d", total)
- }
-
- total = 0
- c.VisitParents(add)
- if total != 0 {
- t.Errorf("Should have visited no parents but visited %d", total)
- }
-}
-
-func TestSuggestions(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- timesCmd := &Command{
- Use: "times",
- SuggestFor: []string{"counts"},
- Run: emptyRun,
- }
- rootCmd.AddCommand(timesCmd)
-
- templateWithSuggestions := "Error: unknown command \"%s\" for \"root\"\n\nDid you mean this?\n\t%s\n\nRun 'root --help' for usage.\n"
- templateWithoutSuggestions := "Error: unknown command \"%s\" for \"root\"\nRun 'root --help' for usage.\n"
-
- tests := map[string]string{
- "time": "times",
- "tiems": "times",
- "tims": "times",
- "timeS": "times",
- "rimes": "times",
- "ti": "times",
- "t": "times",
- "timely": "times",
- "ri": "",
- "timezone": "",
- "foo": "",
- "counts": "times",
- }
-
- for typo, suggestion := range tests {
- for _, suggestionsDisabled := range []bool{true, false} {
- rootCmd.DisableSuggestions = suggestionsDisabled
-
- var expected string
- output, _ := executeCommand(rootCmd, typo)
-
- if suggestion == "" || suggestionsDisabled {
- expected = fmt.Sprintf(templateWithoutSuggestions, typo)
- } else {
- expected = fmt.Sprintf(templateWithSuggestions, typo, suggestion)
- }
-
- if output != expected {
- t.Errorf("Unexpected response.\nExpected:\n %q\nGot:\n %q\n", expected, output)
- }
- }
- }
-}
-
-func TestRemoveCommand(t *testing.T) {
- rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
- rootCmd.RemoveCommand(childCmd)
-
- _, err := executeCommand(rootCmd, "child")
- if err == nil {
- t.Error("Expected error on calling removed command. Got nil.")
- }
-}
-
-func TestReplaceCommandWithRemove(t *testing.T) {
- childUsed := 0
- rootCmd := &Command{Use: "root", Run: emptyRun}
- child1Cmd := &Command{
- Use: "child",
- Run: func(*Command, []string) { childUsed = 1 },
- }
- child2Cmd := &Command{
- Use: "child",
- Run: func(*Command, []string) { childUsed = 2 },
- }
- rootCmd.AddCommand(child1Cmd)
- rootCmd.RemoveCommand(child1Cmd)
- rootCmd.AddCommand(child2Cmd)
-
- output, err := executeCommand(rootCmd, "child")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if childUsed == 1 {
- t.Error("Removed command shouldn't be called")
- }
- if childUsed != 2 {
- t.Error("Replacing command should have been called but didn't")
- }
-}
-
-func TestDeprecatedCommand(t *testing.T) {
- rootCmd := &Command{Use: "root", Run: emptyRun}
- deprecatedCmd := &Command{
- Use: "deprecated",
- Deprecated: "This command is deprecated",
- Run: emptyRun,
- }
- rootCmd.AddCommand(deprecatedCmd)
-
- output, err := executeCommand(rootCmd, "deprecated")
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- checkStringContains(t, output, deprecatedCmd.Deprecated)
-}
-
-func TestHooks(t *testing.T) {
- var (
- persPreArgs string
- preArgs string
- runArgs string
- postArgs string
- persPostArgs string
- )
-
- c := &Command{
- Use: "c",
- PersistentPreRun: func(_ *Command, args []string) {
- persPreArgs = strings.Join(args, " ")
- },
- PreRun: func(_ *Command, args []string) {
- preArgs = strings.Join(args, " ")
- },
- Run: func(_ *Command, args []string) {
- runArgs = strings.Join(args, " ")
- },
- PostRun: func(_ *Command, args []string) {
- postArgs = strings.Join(args, " ")
- },
- PersistentPostRun: func(_ *Command, args []string) {
- persPostArgs = strings.Join(args, " ")
- },
- }
-
- output, err := executeCommand(c, "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if persPreArgs != "one two" {
- t.Errorf("Expected persPreArgs %q, got %q", "one two", persPreArgs)
- }
- if preArgs != "one two" {
- t.Errorf("Expected preArgs %q, got %q", "one two", preArgs)
- }
- if runArgs != "one two" {
- t.Errorf("Expected runArgs %q, got %q", "one two", runArgs)
- }
- if postArgs != "one two" {
- t.Errorf("Expected postArgs %q, got %q", "one two", postArgs)
- }
- if persPostArgs != "one two" {
- t.Errorf("Expected persPostArgs %q, got %q", "one two", persPostArgs)
- }
-}
-
-func TestPersistentHooks(t *testing.T) {
- var (
- parentPersPreArgs string
- parentPreArgs string
- parentRunArgs string
- parentPostArgs string
- parentPersPostArgs string
- )
-
- var (
- childPersPreArgs string
- childPreArgs string
- childRunArgs string
- childPostArgs string
- childPersPostArgs string
- )
-
- parentCmd := &Command{
- Use: "parent",
- PersistentPreRun: func(_ *Command, args []string) {
- parentPersPreArgs = strings.Join(args, " ")
- },
- PreRun: func(_ *Command, args []string) {
- parentPreArgs = strings.Join(args, " ")
- },
- Run: func(_ *Command, args []string) {
- parentRunArgs = strings.Join(args, " ")
- },
- PostRun: func(_ *Command, args []string) {
- parentPostArgs = strings.Join(args, " ")
- },
- PersistentPostRun: func(_ *Command, args []string) {
- parentPersPostArgs = strings.Join(args, " ")
- },
- }
-
- childCmd := &Command{
- Use: "child",
- PersistentPreRun: func(_ *Command, args []string) {
- childPersPreArgs = strings.Join(args, " ")
- },
- PreRun: func(_ *Command, args []string) {
- childPreArgs = strings.Join(args, " ")
- },
- Run: func(_ *Command, args []string) {
- childRunArgs = strings.Join(args, " ")
- },
- PostRun: func(_ *Command, args []string) {
- childPostArgs = strings.Join(args, " ")
- },
- PersistentPostRun: func(_ *Command, args []string) {
- childPersPostArgs = strings.Join(args, " ")
- },
- }
- parentCmd.AddCommand(childCmd)
-
- output, err := executeCommand(parentCmd, "child", "one", "two")
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- // TODO: This test fails, but should not.
- // Related to https://github.com/spf13/cobra/issues/252.
- //
- // if parentPersPreArgs != "one two" {
- // t.Errorf("Expected parentPersPreArgs %q, got %q", "one two", parentPersPreArgs)
- // }
- if parentPreArgs != "" {
- t.Errorf("Expected blank parentPreArgs, got %q", parentPreArgs)
- }
- if parentRunArgs != "" {
- t.Errorf("Expected blank parentRunArgs, got %q", parentRunArgs)
- }
- if parentPostArgs != "" {
- t.Errorf("Expected blank parentPostArgs, got %q", parentPostArgs)
- }
- // TODO: This test fails, but should not.
- // Related to https://github.com/spf13/cobra/issues/252.
- //
- // if parentPersPostArgs != "one two" {
- // t.Errorf("Expected parentPersPostArgs %q, got %q", "one two", parentPersPostArgs)
- // }
-
- if childPersPreArgs != "one two" {
- t.Errorf("Expected childPersPreArgs %q, got %q", "one two", childPersPreArgs)
- }
- if childPreArgs != "one two" {
- t.Errorf("Expected childPreArgs %q, got %q", "one two", childPreArgs)
- }
- if childRunArgs != "one two" {
- t.Errorf("Expected childRunArgs %q, got %q", "one two", childRunArgs)
- }
- if childPostArgs != "one two" {
- t.Errorf("Expected childPostArgs %q, got %q", "one two", childPostArgs)
- }
- if childPersPostArgs != "one two" {
- t.Errorf("Expected childPersPostArgs %q, got %q", "one two", childPersPostArgs)
- }
-}
-
-// Related to https://github.com/spf13/cobra/issues/521.
-func TestGlobalNormFuncPropagation(t *testing.T) {
- normFunc := func(f *pflag.FlagSet, name string) pflag.NormalizedName {
- return pflag.NormalizedName(name)
- }
-
- rootCmd := &Command{Use: "root", Run: emptyRun}
- childCmd := &Command{Use: "child", Run: emptyRun}
- rootCmd.AddCommand(childCmd)
-
- rootCmd.SetGlobalNormalizationFunc(normFunc)
- if reflect.ValueOf(normFunc).Pointer() != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()).Pointer() {
- t.Error("rootCmd seems to have a wrong normalization function")
- }
-
- if reflect.ValueOf(normFunc).Pointer() != reflect.ValueOf(childCmd.GlobalNormalizationFunc()).Pointer() {
- t.Error("childCmd should have had the normalization function of rootCmd")
- }
-}
-
-// Related to https://github.com/spf13/cobra/issues/521.
-func TestNormPassedOnLocal(t *testing.T) {
- toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName {
- return pflag.NormalizedName(strings.ToUpper(name))
- }
-
- c := &Command{}
- c.Flags().Bool("flagname", true, "this is a dummy flag")
- c.SetGlobalNormalizationFunc(toUpper)
- if c.LocalFlags().Lookup("flagname") != c.LocalFlags().Lookup("FLAGNAME") {
- t.Error("Normalization function should be passed on to Local flag set")
- }
-}
-
-// Related to https://github.com/spf13/cobra/issues/521.
-func TestNormPassedOnInherited(t *testing.T) {
- toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName {
- return pflag.NormalizedName(strings.ToUpper(name))
- }
-
- c := &Command{}
- c.SetGlobalNormalizationFunc(toUpper)
-
- child1 := &Command{}
- c.AddCommand(child1)
-
- c.PersistentFlags().Bool("flagname", true, "")
-
- child2 := &Command{}
- c.AddCommand(child2)
-
- inherited := child1.InheritedFlags()
- if inherited.Lookup("flagname") == nil || inherited.Lookup("flagname") != inherited.Lookup("FLAGNAME") {
- t.Error("Normalization function should be passed on to inherited flag set in command added before flag")
- }
-
- inherited = child2.InheritedFlags()
- if inherited.Lookup("flagname") == nil || inherited.Lookup("flagname") != inherited.Lookup("FLAGNAME") {
- t.Error("Normalization function should be passed on to inherited flag set in command added after flag")
- }
-}
-
-// Related to https://github.com/spf13/cobra/issues/521.
-func TestConsistentNormalizedName(t *testing.T) {
- toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName {
- return pflag.NormalizedName(strings.ToUpper(name))
- }
- n := func(f *pflag.FlagSet, name string) pflag.NormalizedName {
- return pflag.NormalizedName(name)
- }
-
- c := &Command{}
- c.Flags().Bool("flagname", true, "")
- c.SetGlobalNormalizationFunc(toUpper)
- c.SetGlobalNormalizationFunc(n)
-
- if c.LocalFlags().Lookup("flagname") == c.LocalFlags().Lookup("FLAGNAME") {
- t.Error("Normalizing flag names should not result in duplicate flags")
- }
-}
-
-func TestFlagOnPflagCommandLine(t *testing.T) {
- flagName := "flagOnCommandLine"
- pflag.String(flagName, "", "about my flag")
-
- c := &Command{Use: "c", Run: emptyRun}
- c.AddCommand(&Command{Use: "child", Run: emptyRun})
-
- output, _ := executeCommand(c, "--help")
- checkStringContains(t, output, flagName)
-
- resetCommandLineFlagSet()
-}
-
-// TestHiddenCommandExecutes checks,
-// if hidden commands run as intended.
-func TestHiddenCommandExecutes(t *testing.T) {
- executed := false
- c := &Command{
- Use: "c",
- Hidden: true,
- Run: func(*Command, []string) { executed = true },
- }
-
- output, err := executeCommand(c)
- if output != "" {
- t.Errorf("Unexpected output: %v", output)
- }
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
-
- if !executed {
- t.Error("Hidden command should have been executed")
- }
-}
-
-// test to ensure hidden commands do not show up in usage/help text
-func TestHiddenCommandIsHidden(t *testing.T) {
- c := &Command{Use: "c", Hidden: true, Run: emptyRun}
- if c.IsAvailableCommand() {
- t.Errorf("Hidden command should be unavailable")
- }
-}
-
-func TestCommandsAreSorted(t *testing.T) {
- EnableCommandSorting = true
-
- originalNames := []string{"middle", "zlast", "afirst"}
- expectedNames := []string{"afirst", "middle", "zlast"}
-
- var rootCmd = &Command{Use: "root"}
-
- for _, name := range originalNames {
- rootCmd.AddCommand(&Command{Use: name})
- }
-
- for i, c := range rootCmd.Commands() {
- got := c.Name()
- if expectedNames[i] != got {
- t.Errorf("Expected: %s, got: %s", expectedNames[i], got)
- }
- }
-
- EnableCommandSorting = true
-}
-
-func TestEnableCommandSortingIsDisabled(t *testing.T) {
- EnableCommandSorting = false
-
- originalNames := []string{"middle", "zlast", "afirst"}
-
- var rootCmd = &Command{Use: "root"}
-
- for _, name := range originalNames {
- rootCmd.AddCommand(&Command{Use: name})
- }
-
- for i, c := range rootCmd.Commands() {
- got := c.Name()
- if originalNames[i] != got {
- t.Errorf("expected: %s, got: %s", originalNames[i], got)
- }
- }
-
- EnableCommandSorting = true
-}
-
-func TestSetOutput(t *testing.T) {
- c := &Command{}
- c.SetOutput(nil)
- if out := c.OutOrStdout(); out != os.Stdout {
- t.Errorf("Expected setting output to nil to revert back to stdout")
- }
-}
-
-func TestFlagErrorFunc(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
-
- expectedFmt := "This is expected: %v"
- c.SetFlagErrorFunc(func(_ *Command, err error) error {
- return fmt.Errorf(expectedFmt, err)
- })
-
- _, err := executeCommand(c, "--unknown-flag")
-
- got := err.Error()
- expected := fmt.Sprintf(expectedFmt, "unknown flag: --unknown-flag")
- if got != expected {
- t.Errorf("Expected %v, got %v", expected, got)
- }
-}
-
-// TestSortedFlags checks,
-// if cmd.LocalFlags() is unsorted when cmd.Flags().SortFlags set to false.
-// Related to https://github.com/spf13/cobra/issues/404.
-func TestSortedFlags(t *testing.T) {
- c := &Command{}
- c.Flags().SortFlags = false
- names := []string{"C", "B", "A", "D"}
- for _, name := range names {
- c.Flags().Bool(name, false, "")
- }
-
- i := 0
- c.LocalFlags().VisitAll(func(f *pflag.Flag) {
- if i == len(names) {
- return
- }
- if stringInSlice(f.Name, names) {
- if names[i] != f.Name {
- t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name)
- }
- i++
- }
- })
-}
-
-// TestMergeCommandLineToFlags checks,
-// if pflag.CommandLine is correctly merged to c.Flags() after first call
-// of c.mergePersistentFlags.
-// Related to https://github.com/spf13/cobra/issues/443.
-func TestMergeCommandLineToFlags(t *testing.T) {
- pflag.Bool("boolflag", false, "")
- c := &Command{Use: "c", Run: emptyRun}
- c.mergePersistentFlags()
- if c.Flags().Lookup("boolflag") == nil {
- t.Fatal("Expecting to have flag from CommandLine in c.Flags()")
- }
-
- resetCommandLineFlagSet()
-}
-
-// TestUseDeprecatedFlags checks,
-// if cobra.Execute() prints a message, if a deprecated flag is used.
-// Related to https://github.com/spf13/cobra/issues/463.
-func TestUseDeprecatedFlags(t *testing.T) {
- c := &Command{Use: "c", Run: emptyRun}
- c.Flags().BoolP("deprecated", "d", false, "deprecated flag")
- c.Flags().MarkDeprecated("deprecated", "This flag is deprecated")
-
- output, err := executeCommand(c, "c", "-d")
- if err != nil {
- t.Error("Unexpected error:", err)
- }
- checkStringContains(t, output, "This flag is deprecated")
-}
-
-func TestTraverseWithParentFlags(t *testing.T) {
- rootCmd := &Command{Use: "root", TraverseChildren: true}
- rootCmd.Flags().String("str", "", "")
- rootCmd.Flags().BoolP("bool", "b", false, "")
-
- childCmd := &Command{Use: "child"}
- childCmd.Flags().Int("int", -1, "")
-
- rootCmd.AddCommand(childCmd)
-
- c, args, err := rootCmd.Traverse([]string{"-b", "--str", "ok", "child", "--int"})
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
- if len(args) != 1 && args[0] != "--add" {
- t.Errorf("Wrong args: %v", args)
- }
- if c.Name() != childCmd.Name() {
- t.Errorf("Expected command: %q, got: %q", childCmd.Name(), c.Name())
- }
-}
-
-func TestTraverseNoParentFlags(t *testing.T) {
- rootCmd := &Command{Use: "root", TraverseChildren: true}
- rootCmd.Flags().String("foo", "", "foo things")
-
- childCmd := &Command{Use: "child"}
- childCmd.Flags().String("str", "", "")
- rootCmd.AddCommand(childCmd)
-
- c, args, err := rootCmd.Traverse([]string{"child"})
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
- if len(args) != 0 {
- t.Errorf("Wrong args %v", args)
- }
- if c.Name() != childCmd.Name() {
- t.Errorf("Expected command: %q, got: %q", childCmd.Name(), c.Name())
- }
-}
-
-func TestTraverseWithBadParentFlags(t *testing.T) {
- rootCmd := &Command{Use: "root", TraverseChildren: true}
-
- childCmd := &Command{Use: "child"}
- childCmd.Flags().String("str", "", "")
- rootCmd.AddCommand(childCmd)
-
- expected := "unknown flag: --str"
-
- c, _, err := rootCmd.Traverse([]string{"--str", "ok", "child"})
- if err == nil || !strings.Contains(err.Error(), expected) {
- t.Errorf("Expected error, %q, got %q", expected, err)
- }
- if c != nil {
- t.Errorf("Expected nil command")
- }
-}
-
-func TestTraverseWithBadChildFlag(t *testing.T) {
- rootCmd := &Command{Use: "root", TraverseChildren: true}
- rootCmd.Flags().String("str", "", "")
-
- childCmd := &Command{Use: "child"}
- rootCmd.AddCommand(childCmd)
-
- // Expect no error because the last commands args shouldn't be parsed in
- // Traverse.
- c, args, err := rootCmd.Traverse([]string{"child", "--str"})
- if err != nil {
- t.Errorf("Unexpected error: %v", err)
- }
- if len(args) != 1 && args[0] != "--str" {
- t.Errorf("Wrong args: %v", args)
- }
- if c.Name() != childCmd.Name() {
- t.Errorf("Expected command %q, got: %q", childCmd.Name(), c.Name())
- }
-}
-
-func TestTraverseWithTwoSubcommands(t *testing.T) {
- rootCmd := &Command{Use: "root", TraverseChildren: true}
-
- subCmd := &Command{Use: "sub", TraverseChildren: true}
- rootCmd.AddCommand(subCmd)
-
- subsubCmd := &Command{
- Use: "subsub",
- }
- subCmd.AddCommand(subsubCmd)
-
- c, _, err := rootCmd.Traverse([]string{"sub", "subsub"})
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
- if c.Name() != subsubCmd.Name() {
- t.Fatalf("Expected command: %q, got %q", subsubCmd.Name(), c.Name())
- }
-}
-
-// TestUpdateName checks if c.Name() updates on changed c.Use.
-// Related to https://github.com/spf13/cobra/pull/422#discussion_r143918343.
-func TestUpdateName(t *testing.T) {
- c := &Command{Use: "name xyz"}
- originalName := c.Name()
-
- c.Use = "changedName abc"
- if originalName == c.Name() || c.Name() != "changedName" {
- t.Error("c.Name() should be updated on changed c.Use")
- }
-}
-
-type calledAsTestcase struct {
- args []string
- call string
- want string
- epm bool
- tc bool
-}
-
-func (tc *calledAsTestcase) test(t *testing.T) {
- defer func(ov bool) { EnablePrefixMatching = ov }(EnablePrefixMatching)
- EnablePrefixMatching = tc.epm
-
- var called *Command
- run := func(c *Command, _ []string) { t.Logf("called: %q", c.Name()); called = c }
-
- parent := &Command{Use: "parent", Run: run}
- child1 := &Command{Use: "child1", Run: run, Aliases: []string{"this"}}
- child2 := &Command{Use: "child2", Run: run, Aliases: []string{"that"}}
-
- parent.AddCommand(child1)
- parent.AddCommand(child2)
- parent.SetArgs(tc.args)
-
- output := new(bytes.Buffer)
- parent.SetOutput(output)
-
- parent.Execute()
-
- if called == nil {
- if tc.call != "" {
- t.Errorf("missing expected call to command: %s", tc.call)
- }
- return
- }
-
- if called.Name() != tc.call {
- t.Errorf("called command == %q; Wanted %q", called.Name(), tc.call)
- } else if got := called.CalledAs(); got != tc.want {
- t.Errorf("%s.CalledAs() == %q; Wanted: %q", tc.call, got, tc.want)
- }
-}
-
-func TestCalledAs(t *testing.T) {
- tests := map[string]calledAsTestcase{
- "find/no-args": {nil, "parent", "parent", false, false},
- "find/real-name": {[]string{"child1"}, "child1", "child1", false, false},
- "find/full-alias": {[]string{"that"}, "child2", "that", false, false},
- "find/part-no-prefix": {[]string{"thi"}, "", "", false, false},
- "find/part-alias": {[]string{"thi"}, "child1", "this", true, false},
- "find/conflict": {[]string{"th"}, "", "", true, false},
- "traverse/no-args": {nil, "parent", "parent", false, true},
- "traverse/real-name": {[]string{"child1"}, "child1", "child1", false, true},
- "traverse/full-alias": {[]string{"that"}, "child2", "that", false, true},
- "traverse/part-no-prefix": {[]string{"thi"}, "", "", false, true},
- "traverse/part-alias": {[]string{"thi"}, "child1", "this", true, true},
- "traverse/conflict": {[]string{"th"}, "", "", true, true},
- }
-
- for name, tc := range tests {
- t.Run(name, tc.test)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/doc/cmd_test.go b/vendor/github.com/spf13/cobra/doc/cmd_test.go
deleted file mode 100644
index d29c577df..000000000
--- a/vendor/github.com/spf13/cobra/doc/cmd_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package doc
-
-import (
- "strings"
- "testing"
-
- "github.com/spf13/cobra"
-)
-
-func emptyRun(*cobra.Command, []string) {}
-
-func init() {
- rootCmd.PersistentFlags().StringP("rootflag", "r", "two", "")
- rootCmd.PersistentFlags().StringP("strtwo", "t", "two", "help message for parent flag strtwo")
-
- echoCmd.PersistentFlags().StringP("strone", "s", "one", "help message for flag strone")
- echoCmd.PersistentFlags().BoolP("persistentbool", "p", false, "help message for flag persistentbool")
- echoCmd.Flags().IntP("intone", "i", 123, "help message for flag intone")
- echoCmd.Flags().BoolP("boolone", "b", true, "help message for flag boolone")
-
- timesCmd.PersistentFlags().StringP("strtwo", "t", "2", "help message for child flag strtwo")
- timesCmd.Flags().IntP("inttwo", "j", 234, "help message for flag inttwo")
- timesCmd.Flags().BoolP("booltwo", "c", false, "help message for flag booltwo")
-
- printCmd.PersistentFlags().StringP("strthree", "s", "three", "help message for flag strthree")
- printCmd.Flags().IntP("intthree", "i", 345, "help message for flag intthree")
- printCmd.Flags().BoolP("boolthree", "b", true, "help message for flag boolthree")
-
- echoCmd.AddCommand(timesCmd, echoSubCmd, deprecatedCmd)
- rootCmd.AddCommand(printCmd, echoCmd)
-}
-
-var rootCmd = &cobra.Command{
- Use: "root",
- Short: "Root short description",
- Long: "Root long description",
- Run: emptyRun,
-}
-
-var echoCmd = &cobra.Command{
- Use: "echo [string to echo]",
- Aliases: []string{"say"},
- Short: "Echo anything to the screen",
- Long: "an utterly useless command for testing",
- Example: "Just run cobra-test echo",
-}
-
-var echoSubCmd = &cobra.Command{
- Use: "echosub [string to print]",
- Short: "second sub command for echo",
- Long: "an absolutely utterly useless command for testing gendocs!.",
- Run: emptyRun,
-}
-
-var timesCmd = &cobra.Command{
- Use: "times [# times] [string to echo]",
- SuggestFor: []string{"counts"},
- Short: "Echo anything to the screen more times",
- Long: `a slightly useless command for testing.`,
- Run: emptyRun,
-}
-
-var deprecatedCmd = &cobra.Command{
- Use: "deprecated [can't do anything here]",
- Short: "A command which is deprecated",
- Long: `an absolutely utterly useless command for testing deprecation!.`,
- Deprecated: "Please use echo instead",
-}
-
-var printCmd = &cobra.Command{
- Use: "print [string to print]",
- Short: "Print anything to the screen",
- Long: `an absolutely utterly useless command for testing.`,
-}
-
-func checkStringContains(t *testing.T, got, expected string) {
- if !strings.Contains(got, expected) {
- t.Errorf("Expected to contain: \n %v\nGot:\n %v\n", expected, got)
- }
-}
-
-func checkStringOmits(t *testing.T, got, expected string) {
- if strings.Contains(got, expected) {
- t.Errorf("Expected to not contain: \n %v\nGot: %v", expected, got)
- }
-}
diff --git a/vendor/github.com/spf13/cobra/doc/man_docs.go b/vendor/github.com/spf13/cobra/doc/man_docs.go
deleted file mode 100644
index ce92332dd..000000000
--- a/vendor/github.com/spf13/cobra/doc/man_docs.go
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2015 Red Hat Inc. All rights reserved.
-//
-// 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.
-
-package doc
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "time"
-
- "github.com/cpuguy83/go-md2man/md2man"
- "github.com/spf13/cobra"
- "github.com/spf13/pflag"
-)
-
-// GenManTree will generate a man page for this command and all descendants
-// in the directory given. The header may be nil. This function may not work
-// correctly if your command names have `-` in them. If you have `cmd` with two
-// subcmds, `sub` and `sub-third`, and `sub` has a subcommand called `third`
-// it is undefined which help output will be in the file `cmd-sub-third.1`.
-func GenManTree(cmd *cobra.Command, header *GenManHeader, dir string) error {
- return GenManTreeFromOpts(cmd, GenManTreeOptions{
- Header: header,
- Path: dir,
- CommandSeparator: "-",
- })
-}
-
-// GenManTreeFromOpts generates a man page for the command and all descendants.
-// The pages are written to the opts.Path directory.
-func GenManTreeFromOpts(cmd *cobra.Command, opts GenManTreeOptions) error {
- header := opts.Header
- if header == nil {
- header = &GenManHeader{}
- }
- for _, c := range cmd.Commands() {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- if err := GenManTreeFromOpts(c, opts); err != nil {
- return err
- }
- }
- section := "1"
- if header.Section != "" {
- section = header.Section
- }
-
- separator := "_"
- if opts.CommandSeparator != "" {
- separator = opts.CommandSeparator
- }
- basename := strings.Replace(cmd.CommandPath(), " ", separator, -1)
- filename := filepath.Join(opts.Path, basename+"."+section)
- f, err := os.Create(filename)
- if err != nil {
- return err
- }
- defer f.Close()
-
- headerCopy := *header
- return GenMan(cmd, &headerCopy, f)
-}
-
-// GenManTreeOptions is the options for generating the man pages.
-// Used only in GenManTreeFromOpts.
-type GenManTreeOptions struct {
- Header *GenManHeader
- Path string
- CommandSeparator string
-}
-
-// GenManHeader is a lot like the .TH header at the start of man pages. These
-// include the title, section, date, source, and manual. We will use the
-// current time if Date if unset and will use "Auto generated by spf13/cobra"
-// if the Source is unset.
-type GenManHeader struct {
- Title string
- Section string
- Date *time.Time
- date string
- Source string
- Manual string
-}
-
-// GenMan will generate a man page for the given command and write it to
-// w. The header argument may be nil, however obviously w may not.
-func GenMan(cmd *cobra.Command, header *GenManHeader, w io.Writer) error {
- if header == nil {
- header = &GenManHeader{}
- }
- fillHeader(header, cmd.CommandPath())
-
- b := genMan(cmd, header)
- _, err := w.Write(md2man.Render(b))
- return err
-}
-
-func fillHeader(header *GenManHeader, name string) {
- if header.Title == "" {
- header.Title = strings.ToUpper(strings.Replace(name, " ", "\\-", -1))
- }
- if header.Section == "" {
- header.Section = "1"
- }
- if header.Date == nil {
- now := time.Now()
- header.Date = &now
- }
- header.date = (*header.Date).Format("Jan 2006")
- if header.Source == "" {
- header.Source = "Auto generated by spf13/cobra"
- }
-}
-
-func manPreamble(buf *bytes.Buffer, header *GenManHeader, cmd *cobra.Command, dashedName string) {
- description := cmd.Long
- if len(description) == 0 {
- description = cmd.Short
- }
-
- buf.WriteString(fmt.Sprintf(`%% %s(%s)%s
-%% %s
-%% %s
-# NAME
-`, header.Title, header.Section, header.date, header.Source, header.Manual))
- buf.WriteString(fmt.Sprintf("%s \\- %s\n\n", dashedName, cmd.Short))
- buf.WriteString("# SYNOPSIS\n")
- buf.WriteString(fmt.Sprintf("**%s**\n\n", cmd.UseLine()))
- buf.WriteString("# DESCRIPTION\n")
- buf.WriteString(description + "\n\n")
-}
-
-func manPrintFlags(buf *bytes.Buffer, flags *pflag.FlagSet) {
- flags.VisitAll(func(flag *pflag.Flag) {
- if len(flag.Deprecated) > 0 || flag.Hidden {
- return
- }
- format := ""
- if len(flag.Shorthand) > 0 && len(flag.ShorthandDeprecated) == 0 {
- format = fmt.Sprintf("**-%s**, **--%s**", flag.Shorthand, flag.Name)
- } else {
- format = fmt.Sprintf("**--%s**", flag.Name)
- }
- if len(flag.NoOptDefVal) > 0 {
- format += "["
- }
- if flag.Value.Type() == "string" {
- // put quotes on the value
- format += "=%q"
- } else {
- format += "=%s"
- }
- if len(flag.NoOptDefVal) > 0 {
- format += "]"
- }
- format += "\n\t%s\n\n"
- buf.WriteString(fmt.Sprintf(format, flag.DefValue, flag.Usage))
- })
-}
-
-func manPrintOptions(buf *bytes.Buffer, command *cobra.Command) {
- flags := command.NonInheritedFlags()
- if flags.HasFlags() {
- buf.WriteString("# OPTIONS\n")
- manPrintFlags(buf, flags)
- buf.WriteString("\n")
- }
- flags = command.InheritedFlags()
- if flags.HasFlags() {
- buf.WriteString("# OPTIONS INHERITED FROM PARENT COMMANDS\n")
- manPrintFlags(buf, flags)
- buf.WriteString("\n")
- }
-}
-
-func genMan(cmd *cobra.Command, header *GenManHeader) []byte {
- cmd.InitDefaultHelpCmd()
- cmd.InitDefaultHelpFlag()
-
- // something like `rootcmd-subcmd1-subcmd2`
- dashCommandName := strings.Replace(cmd.CommandPath(), " ", "-", -1)
-
- buf := new(bytes.Buffer)
-
- manPreamble(buf, header, cmd, dashCommandName)
- manPrintOptions(buf, cmd)
- if len(cmd.Example) > 0 {
- buf.WriteString("# EXAMPLE\n")
- buf.WriteString(fmt.Sprintf("```\n%s\n```\n", cmd.Example))
- }
- if hasSeeAlso(cmd) {
- buf.WriteString("# SEE ALSO\n")
- seealsos := make([]string, 0)
- if cmd.HasParent() {
- parentPath := cmd.Parent().CommandPath()
- dashParentPath := strings.Replace(parentPath, " ", "-", -1)
- seealso := fmt.Sprintf("**%s(%s)**", dashParentPath, header.Section)
- seealsos = append(seealsos, seealso)
- cmd.VisitParents(func(c *cobra.Command) {
- if c.DisableAutoGenTag {
- cmd.DisableAutoGenTag = c.DisableAutoGenTag
- }
- })
- }
- children := cmd.Commands()
- sort.Sort(byName(children))
- for _, c := range children {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- seealso := fmt.Sprintf("**%s-%s(%s)**", dashCommandName, c.Name(), header.Section)
- seealsos = append(seealsos, seealso)
- }
- buf.WriteString(strings.Join(seealsos, ", ") + "\n")
- }
- if !cmd.DisableAutoGenTag {
- buf.WriteString(fmt.Sprintf("# HISTORY\n%s Auto generated by spf13/cobra\n", header.Date.Format("2-Jan-2006")))
- }
- return buf.Bytes()
-}
diff --git a/vendor/github.com/spf13/cobra/doc/man_docs.md b/vendor/github.com/spf13/cobra/doc/man_docs.md
deleted file mode 100644
index 3709160f3..000000000
--- a/vendor/github.com/spf13/cobra/doc/man_docs.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generating Man Pages For Your Own cobra.Command
-
-Generating man pages from a cobra command is incredibly easy. An example is as follows:
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- header := &doc.GenManHeader{
- Title: "MINE",
- Section: "3",
- }
- err := doc.GenManTree(cmd, header, "/tmp")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-That will get you a man page `/tmp/test.3`
diff --git a/vendor/github.com/spf13/cobra/doc/man_docs_test.go b/vendor/github.com/spf13/cobra/doc/man_docs_test.go
deleted file mode 100644
index 62f85e47f..000000000
--- a/vendor/github.com/spf13/cobra/doc/man_docs_test.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package doc
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "testing"
-
- "github.com/spf13/cobra"
-)
-
-func translate(in string) string {
- return strings.Replace(in, "-", "\\-", -1)
-}
-
-func TestGenManDoc(t *testing.T) {
- header := &GenManHeader{
- Title: "Project",
- Section: "2",
- }
-
- // We generate on a subcommand so we have both subcommands and parents
- buf := new(bytes.Buffer)
- if err := GenMan(echoCmd, header, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- // Make sure parent has - in CommandPath() in SEE ALSO:
- parentPath := echoCmd.Parent().CommandPath()
- dashParentPath := strings.Replace(parentPath, " ", "-", -1)
- expected := translate(dashParentPath)
- expected = expected + "(" + header.Section + ")"
- checkStringContains(t, output, expected)
-
- checkStringContains(t, output, translate(echoCmd.Name()))
- checkStringContains(t, output, translate(echoCmd.Name()))
- checkStringContains(t, output, "boolone")
- checkStringContains(t, output, "rootflag")
- checkStringContains(t, output, translate(rootCmd.Name()))
- checkStringContains(t, output, translate(echoSubCmd.Name()))
- checkStringOmits(t, output, translate(deprecatedCmd.Name()))
- checkStringContains(t, output, translate("Auto generated"))
-}
-
-func TestGenManNoGenTag(t *testing.T) {
- echoCmd.DisableAutoGenTag = true
- defer func() { echoCmd.DisableAutoGenTag = false }()
-
- header := &GenManHeader{
- Title: "Project",
- Section: "2",
- }
-
- // We generate on a subcommand so we have both subcommands and parents
- buf := new(bytes.Buffer)
- if err := GenMan(echoCmd, header, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- unexpected := translate("#HISTORY")
- checkStringOmits(t, output, unexpected)
-}
-
-func TestGenManSeeAlso(t *testing.T) {
- rootCmd := &cobra.Command{Use: "root", Run: emptyRun}
- aCmd := &cobra.Command{Use: "aaa", Run: emptyRun, Hidden: true} // #229
- bCmd := &cobra.Command{Use: "bbb", Run: emptyRun}
- cCmd := &cobra.Command{Use: "ccc", Run: emptyRun}
- rootCmd.AddCommand(aCmd, bCmd, cCmd)
-
- buf := new(bytes.Buffer)
- header := &GenManHeader{}
- if err := GenMan(rootCmd, header, buf); err != nil {
- t.Fatal(err)
- }
- scanner := bufio.NewScanner(buf)
-
- if err := assertLineFound(scanner, ".SH SEE ALSO"); err != nil {
- t.Fatalf("Couldn't find SEE ALSO section header: %v", err)
- }
- if err := assertNextLineEquals(scanner, ".PP"); err != nil {
- t.Fatalf("First line after SEE ALSO wasn't break-indent: %v", err)
- }
- if err := assertNextLineEquals(scanner, `\fBroot\-bbb(1)\fP, \fBroot\-ccc(1)\fP`); err != nil {
- t.Fatalf("Second line after SEE ALSO wasn't correct: %v", err)
- }
-}
-
-func TestManPrintFlagsHidesShortDeperecated(t *testing.T) {
- c := &cobra.Command{}
- c.Flags().StringP("foo", "f", "default", "Foo flag")
- c.Flags().MarkShorthandDeprecated("foo", "don't use it no more")
-
- buf := new(bytes.Buffer)
- manPrintFlags(buf, c.Flags())
-
- got := buf.String()
- expected := "**--foo**=\"default\"\n\tFoo flag\n\n"
- if got != expected {
- t.Errorf("Expected %v, got %v", expected, got)
- }
-}
-
-func TestGenManTree(t *testing.T) {
- c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"}
- header := &GenManHeader{Section: "2"}
- tmpdir, err := ioutil.TempDir("", "test-gen-man-tree")
- if err != nil {
- t.Fatalf("Failed to create tmpdir: %s", err.Error())
- }
- defer os.RemoveAll(tmpdir)
-
- if err := GenManTree(c, header, tmpdir); err != nil {
- t.Fatalf("GenManTree failed: %s", err.Error())
- }
-
- if _, err := os.Stat(filepath.Join(tmpdir, "do.2")); err != nil {
- t.Fatalf("Expected file 'do.2' to exist")
- }
-
- if header.Title != "" {
- t.Fatalf("Expected header.Title to be unmodified")
- }
-}
-
-func assertLineFound(scanner *bufio.Scanner, expectedLine string) error {
- for scanner.Scan() {
- line := scanner.Text()
- if line == expectedLine {
- return nil
- }
- }
-
- if err := scanner.Err(); err != nil {
- return fmt.Errorf("scan failed: %s", err)
- }
-
- return fmt.Errorf("hit EOF before finding %v", expectedLine)
-}
-
-func assertNextLineEquals(scanner *bufio.Scanner, expectedLine string) error {
- if scanner.Scan() {
- line := scanner.Text()
- if line == expectedLine {
- return nil
- }
- return fmt.Errorf("got %v, not %v", line, expectedLine)
- }
-
- if err := scanner.Err(); err != nil {
- return fmt.Errorf("scan failed: %v", err)
- }
-
- return fmt.Errorf("hit EOF before finding %v", expectedLine)
-}
-
-func BenchmarkGenManToFile(b *testing.B) {
- file, err := ioutil.TempFile("", "")
- if err != nil {
- b.Fatal(err)
- }
- defer os.Remove(file.Name())
- defer file.Close()
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if err := GenMan(rootCmd, nil, file); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/spf13/cobra/doc/man_examples_test.go b/vendor/github.com/spf13/cobra/doc/man_examples_test.go
deleted file mode 100644
index db6604268..000000000
--- a/vendor/github.com/spf13/cobra/doc/man_examples_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package doc_test
-
-import (
- "bytes"
- "fmt"
-
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
-)
-
-func ExampleGenManTree() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- header := &doc.GenManHeader{
- Title: "MINE",
- Section: "3",
- }
- doc.GenManTree(cmd, header, "/tmp")
-}
-
-func ExampleGenMan() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- header := &doc.GenManHeader{
- Title: "MINE",
- Section: "3",
- }
- out := new(bytes.Buffer)
- doc.GenMan(cmd, header, out)
- fmt.Print(out.String())
-}
diff --git a/vendor/github.com/spf13/cobra/doc/md_docs.go b/vendor/github.com/spf13/cobra/doc/md_docs.go
deleted file mode 100644
index d7a2c2b62..000000000
--- a/vendor/github.com/spf13/cobra/doc/md_docs.go
+++ /dev/null
@@ -1,159 +0,0 @@
-//Copyright 2015 Red Hat Inc. All rights reserved.
-//
-// 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.
-
-package doc
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "time"
-
- "github.com/spf13/cobra"
-)
-
-func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) error {
- flags := cmd.NonInheritedFlags()
- flags.SetOutput(buf)
- if flags.HasFlags() {
- buf.WriteString("### Options\n\n```\n")
- flags.PrintDefaults()
- buf.WriteString("```\n\n")
- }
-
- parentFlags := cmd.InheritedFlags()
- parentFlags.SetOutput(buf)
- if parentFlags.HasFlags() {
- buf.WriteString("### Options inherited from parent commands\n\n```\n")
- parentFlags.PrintDefaults()
- buf.WriteString("```\n\n")
- }
- return nil
-}
-
-// GenMarkdown creates markdown output.
-func GenMarkdown(cmd *cobra.Command, w io.Writer) error {
- return GenMarkdownCustom(cmd, w, func(s string) string { return s })
-}
-
-// GenMarkdownCustom creates custom markdown output.
-func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error {
- cmd.InitDefaultHelpCmd()
- cmd.InitDefaultHelpFlag()
-
- buf := new(bytes.Buffer)
- name := cmd.CommandPath()
-
- short := cmd.Short
- long := cmd.Long
- if len(long) == 0 {
- long = short
- }
-
- buf.WriteString("## " + name + "\n\n")
- buf.WriteString(short + "\n\n")
- buf.WriteString("### Synopsis\n\n")
- buf.WriteString(long + "\n\n")
-
- if cmd.Runnable() {
- buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.UseLine()))
- }
-
- if len(cmd.Example) > 0 {
- buf.WriteString("### Examples\n\n")
- buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example))
- }
-
- if err := printOptions(buf, cmd, name); err != nil {
- return err
- }
- if hasSeeAlso(cmd) {
- buf.WriteString("### SEE ALSO\n\n")
- if cmd.HasParent() {
- parent := cmd.Parent()
- pname := parent.CommandPath()
- link := pname + ".md"
- link = strings.Replace(link, " ", "_", -1)
- buf.WriteString(fmt.Sprintf("* [%s](%s)\t - %s\n", pname, linkHandler(link), parent.Short))
- cmd.VisitParents(func(c *cobra.Command) {
- if c.DisableAutoGenTag {
- cmd.DisableAutoGenTag = c.DisableAutoGenTag
- }
- })
- }
-
- children := cmd.Commands()
- sort.Sort(byName(children))
-
- for _, child := range children {
- if !child.IsAvailableCommand() || child.IsAdditionalHelpTopicCommand() {
- continue
- }
- cname := name + " " + child.Name()
- link := cname + ".md"
- link = strings.Replace(link, " ", "_", -1)
- buf.WriteString(fmt.Sprintf("* [%s](%s)\t - %s\n", cname, linkHandler(link), child.Short))
- }
- buf.WriteString("\n")
- }
- if !cmd.DisableAutoGenTag {
- buf.WriteString("###### Auto generated by spf13/cobra on " + time.Now().Format("2-Jan-2006") + "\n")
- }
- _, err := buf.WriteTo(w)
- return err
-}
-
-// GenMarkdownTree will generate a markdown page for this command and all
-// descendants in the directory given. The header may be nil.
-// This function may not work correctly if your command names have `-` in them.
-// If you have `cmd` with two subcmds, `sub` and `sub-third`,
-// and `sub` has a subcommand called `third`, it is undefined which
-// help output will be in the file `cmd-sub-third.1`.
-func GenMarkdownTree(cmd *cobra.Command, dir string) error {
- identity := func(s string) string { return s }
- emptyStr := func(s string) string { return "" }
- return GenMarkdownTreeCustom(cmd, dir, emptyStr, identity)
-}
-
-// GenMarkdownTreeCustom is the the same as GenMarkdownTree, but
-// with custom filePrepender and linkHandler.
-func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandler func(string) string) error {
- for _, c := range cmd.Commands() {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- if err := GenMarkdownTreeCustom(c, dir, filePrepender, linkHandler); err != nil {
- return err
- }
- }
-
- basename := strings.Replace(cmd.CommandPath(), " ", "_", -1) + ".md"
- filename := filepath.Join(dir, basename)
- f, err := os.Create(filename)
- if err != nil {
- return err
- }
- defer f.Close()
-
- if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
- return err
- }
- if err := GenMarkdownCustom(cmd, f, linkHandler); err != nil {
- return err
- }
- return nil
-}
diff --git a/vendor/github.com/spf13/cobra/doc/md_docs.md b/vendor/github.com/spf13/cobra/doc/md_docs.md
deleted file mode 100644
index 56ce9fe81..000000000
--- a/vendor/github.com/spf13/cobra/doc/md_docs.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# Generating Markdown Docs For Your Own cobra.Command
-
-Generating man pages from a cobra command is incredibly easy. An example is as follows:
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- err := doc.GenMarkdownTree(cmd, "/tmp")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-That will get you a Markdown document `/tmp/test.md`
-
-## Generate markdown docs for the entire command tree
-
-This program can actually generate docs for the kubectl command in the kubernetes project
-
-```go
-package main
-
-import (
- "log"
- "io/ioutil"
- "os"
-
- "k8s.io/kubernetes/pkg/kubectl/cmd"
- cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
-
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
- err := doc.GenMarkdownTree(kubectl, "./")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-This will generate a whole series of files, one for each command in the tree, in the directory specified (in this case "./")
-
-## Generate markdown docs for a single command
-
-You may wish to have more control over the output, or only generate for a single command, instead of the entire command tree. If this is the case you may prefer to `GenMarkdown` instead of `GenMarkdownTree`
-
-```go
- out := new(bytes.Buffer)
- err := doc.GenMarkdown(cmd, out)
- if err != nil {
- log.Fatal(err)
- }
-```
-
-This will write the markdown doc for ONLY "cmd" into the out, buffer.
-
-## Customize the output
-
-Both `GenMarkdown` and `GenMarkdownTree` have alternate versions with callbacks to get some control of the output:
-
-```go
-func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender, linkHandler func(string) string) error {
- //...
-}
-```
-
-```go
-func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) error {
- //...
-}
-```
-
-The `filePrepender` will prepend the return value given the full filepath to the rendered Markdown file. A common use case is to add front matter to use the generated documentation with [Hugo](http://gohugo.io/):
-
-```go
-const fmTemplate = `---
-date: %s
-title: "%s"
-slug: %s
-url: %s
----
-`
-
-filePrepender := func(filename string) string {
- now := time.Now().Format(time.RFC3339)
- name := filepath.Base(filename)
- base := strings.TrimSuffix(name, path.Ext(name))
- url := "/commands/" + strings.ToLower(base) + "/"
- return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
-}
-```
-
-The `linkHandler` can be used to customize the rendered internal links to the commands, given a filename:
-
-```go
-linkHandler := func(name string) string {
- base := strings.TrimSuffix(name, path.Ext(name))
- return "/commands/" + strings.ToLower(base) + "/"
-}
-```
diff --git a/vendor/github.com/spf13/cobra/doc/md_docs_test.go b/vendor/github.com/spf13/cobra/doc/md_docs_test.go
deleted file mode 100644
index b0fa68c0b..000000000
--- a/vendor/github.com/spf13/cobra/doc/md_docs_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package doc
-
-import (
- "bytes"
- "io/ioutil"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/spf13/cobra"
-)
-
-func TestGenMdDoc(t *testing.T) {
- // We generate on subcommand so we have both subcommands and parents.
- buf := new(bytes.Buffer)
- if err := GenMarkdown(echoCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- checkStringContains(t, output, echoCmd.Long)
- checkStringContains(t, output, echoCmd.Example)
- checkStringContains(t, output, "boolone")
- checkStringContains(t, output, "rootflag")
- checkStringContains(t, output, rootCmd.Short)
- checkStringContains(t, output, echoSubCmd.Short)
- checkStringOmits(t, output, deprecatedCmd.Short)
-}
-
-func TestGenMdNoTag(t *testing.T) {
- rootCmd.DisableAutoGenTag = true
- defer func() { rootCmd.DisableAutoGenTag = false }()
-
- buf := new(bytes.Buffer)
- if err := GenMarkdown(rootCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- checkStringOmits(t, output, "Auto generated")
-}
-
-func TestGenMdTree(t *testing.T) {
- c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"}
- tmpdir, err := ioutil.TempDir("", "test-gen-md-tree")
- if err != nil {
- t.Fatalf("Failed to create tmpdir: %v", err)
- }
- defer os.RemoveAll(tmpdir)
-
- if err := GenMarkdownTree(c, tmpdir); err != nil {
- t.Fatalf("GenMarkdownTree failed: %v", err)
- }
-
- if _, err := os.Stat(filepath.Join(tmpdir, "do.md")); err != nil {
- t.Fatalf("Expected file 'do.md' to exist")
- }
-}
-
-func BenchmarkGenMarkdownToFile(b *testing.B) {
- file, err := ioutil.TempFile("", "")
- if err != nil {
- b.Fatal(err)
- }
- defer os.Remove(file.Name())
- defer file.Close()
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if err := GenMarkdown(rootCmd, file); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/spf13/cobra/doc/rest_docs.go b/vendor/github.com/spf13/cobra/doc/rest_docs.go
deleted file mode 100644
index 4913e3ee2..000000000
--- a/vendor/github.com/spf13/cobra/doc/rest_docs.go
+++ /dev/null
@@ -1,185 +0,0 @@
-//Copyright 2015 Red Hat Inc. All rights reserved.
-//
-// 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.
-
-package doc
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "time"
-
- "github.com/spf13/cobra"
-)
-
-func printOptionsReST(buf *bytes.Buffer, cmd *cobra.Command, name string) error {
- flags := cmd.NonInheritedFlags()
- flags.SetOutput(buf)
- if flags.HasFlags() {
- buf.WriteString("Options\n")
- buf.WriteString("~~~~~~~\n\n::\n\n")
- flags.PrintDefaults()
- buf.WriteString("\n")
- }
-
- parentFlags := cmd.InheritedFlags()
- parentFlags.SetOutput(buf)
- if parentFlags.HasFlags() {
- buf.WriteString("Options inherited from parent commands\n")
- buf.WriteString("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n")
- parentFlags.PrintDefaults()
- buf.WriteString("\n")
- }
- return nil
-}
-
-// linkHandler for default ReST hyperlink markup
-func defaultLinkHandler(name, ref string) string {
- return fmt.Sprintf("`%s <%s.rst>`_", name, ref)
-}
-
-// GenReST creates reStructured Text output.
-func GenReST(cmd *cobra.Command, w io.Writer) error {
- return GenReSTCustom(cmd, w, defaultLinkHandler)
-}
-
-// GenReSTCustom creates custom reStructured Text output.
-func GenReSTCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string, string) string) error {
- cmd.InitDefaultHelpCmd()
- cmd.InitDefaultHelpFlag()
-
- buf := new(bytes.Buffer)
- name := cmd.CommandPath()
-
- short := cmd.Short
- long := cmd.Long
- if len(long) == 0 {
- long = short
- }
- ref := strings.Replace(name, " ", "_", -1)
-
- buf.WriteString(".. _" + ref + ":\n\n")
- buf.WriteString(name + "\n")
- buf.WriteString(strings.Repeat("-", len(name)) + "\n\n")
- buf.WriteString(short + "\n\n")
- buf.WriteString("Synopsis\n")
- buf.WriteString("~~~~~~~~\n\n")
- buf.WriteString("\n" + long + "\n\n")
-
- if cmd.Runnable() {
- buf.WriteString(fmt.Sprintf("::\n\n %s\n\n", cmd.UseLine()))
- }
-
- if len(cmd.Example) > 0 {
- buf.WriteString("Examples\n")
- buf.WriteString("~~~~~~~~\n\n")
- buf.WriteString(fmt.Sprintf("::\n\n%s\n\n", indentString(cmd.Example, " ")))
- }
-
- if err := printOptionsReST(buf, cmd, name); err != nil {
- return err
- }
- if hasSeeAlso(cmd) {
- buf.WriteString("SEE ALSO\n")
- buf.WriteString("~~~~~~~~\n\n")
- if cmd.HasParent() {
- parent := cmd.Parent()
- pname := parent.CommandPath()
- ref = strings.Replace(pname, " ", "_", -1)
- buf.WriteString(fmt.Sprintf("* %s \t - %s\n", linkHandler(pname, ref), parent.Short))
- cmd.VisitParents(func(c *cobra.Command) {
- if c.DisableAutoGenTag {
- cmd.DisableAutoGenTag = c.DisableAutoGenTag
- }
- })
- }
-
- children := cmd.Commands()
- sort.Sort(byName(children))
-
- for _, child := range children {
- if !child.IsAvailableCommand() || child.IsAdditionalHelpTopicCommand() {
- continue
- }
- cname := name + " " + child.Name()
- ref = strings.Replace(cname, " ", "_", -1)
- buf.WriteString(fmt.Sprintf("* %s \t - %s\n", linkHandler(cname, ref), child.Short))
- }
- buf.WriteString("\n")
- }
- if !cmd.DisableAutoGenTag {
- buf.WriteString("*Auto generated by spf13/cobra on " + time.Now().Format("2-Jan-2006") + "*\n")
- }
- _, err := buf.WriteTo(w)
- return err
-}
-
-// GenReSTTree will generate a ReST page for this command and all
-// descendants in the directory given.
-// This function may not work correctly if your command names have `-` in them.
-// If you have `cmd` with two subcmds, `sub` and `sub-third`,
-// and `sub` has a subcommand called `third`, it is undefined which
-// help output will be in the file `cmd-sub-third.1`.
-func GenReSTTree(cmd *cobra.Command, dir string) error {
- emptyStr := func(s string) string { return "" }
- return GenReSTTreeCustom(cmd, dir, emptyStr, defaultLinkHandler)
-}
-
-// GenReSTTreeCustom is the the same as GenReSTTree, but
-// with custom filePrepender and linkHandler.
-func GenReSTTreeCustom(cmd *cobra.Command, dir string, filePrepender func(string) string, linkHandler func(string, string) string) error {
- for _, c := range cmd.Commands() {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- if err := GenReSTTreeCustom(c, dir, filePrepender, linkHandler); err != nil {
- return err
- }
- }
-
- basename := strings.Replace(cmd.CommandPath(), " ", "_", -1) + ".rst"
- filename := filepath.Join(dir, basename)
- f, err := os.Create(filename)
- if err != nil {
- return err
- }
- defer f.Close()
-
- if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
- return err
- }
- if err := GenReSTCustom(cmd, f, linkHandler); err != nil {
- return err
- }
- return nil
-}
-
-// adapted from: https://github.com/kr/text/blob/main/indent.go
-func indentString(s, p string) string {
- var res []byte
- b := []byte(s)
- prefix := []byte(p)
- bol := true
- for _, c := range b {
- if bol && c != '\n' {
- res = append(res, prefix...)
- }
- res = append(res, c)
- bol = c == '\n'
- }
- return string(res)
-}
diff --git a/vendor/github.com/spf13/cobra/doc/rest_docs.md b/vendor/github.com/spf13/cobra/doc/rest_docs.md
deleted file mode 100644
index 6098430ef..000000000
--- a/vendor/github.com/spf13/cobra/doc/rest_docs.md
+++ /dev/null
@@ -1,114 +0,0 @@
-# Generating ReStructured Text Docs For Your Own cobra.Command
-
-Generating ReST pages from a cobra command is incredibly easy. An example is as follows:
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- err := doc.GenReSTTree(cmd, "/tmp")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-That will get you a ReST document `/tmp/test.rst`
-
-## Generate ReST docs for the entire command tree
-
-This program can actually generate docs for the kubectl command in the kubernetes project
-
-```go
-package main
-
-import (
- "log"
- "io/ioutil"
- "os"
-
- "k8s.io/kubernetes/pkg/kubectl/cmd"
- cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
-
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
- err := doc.GenReSTTree(kubectl, "./")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-This will generate a whole series of files, one for each command in the tree, in the directory specified (in this case "./")
-
-## Generate ReST docs for a single command
-
-You may wish to have more control over the output, or only generate for a single command, instead of the entire command tree. If this is the case you may prefer to `GenReST` instead of `GenReSTTree`
-
-```go
- out := new(bytes.Buffer)
- err := doc.GenReST(cmd, out)
- if err != nil {
- log.Fatal(err)
- }
-```
-
-This will write the ReST doc for ONLY "cmd" into the out, buffer.
-
-## Customize the output
-
-Both `GenReST` and `GenReSTTree` have alternate versions with callbacks to get some control of the output:
-
-```go
-func GenReSTTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string, string) string) error {
- //...
-}
-```
-
-```go
-func GenReSTCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string, string) string) error {
- //...
-}
-```
-
-The `filePrepender` will prepend the return value given the full filepath to the rendered ReST file. A common use case is to add front matter to use the generated documentation with [Hugo](http://gohugo.io/):
-
-```go
-const fmTemplate = `---
-date: %s
-title: "%s"
-slug: %s
-url: %s
----
-`
-filePrepender := func(filename string) string {
- now := time.Now().Format(time.RFC3339)
- name := filepath.Base(filename)
- base := strings.TrimSuffix(name, path.Ext(name))
- url := "/commands/" + strings.ToLower(base) + "/"
- return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
-}
-```
-
-The `linkHandler` can be used to customize the rendered links to the commands, given a command name and reference. This is useful while converting rst to html or while generating documentation with tools like Sphinx where `:ref:` is used:
-
-```go
-// Sphinx cross-referencing format
-linkHandler := func(name, ref string) string {
- return fmt.Sprintf(":ref:`%s <%s>`", name, ref)
-}
-```
diff --git a/vendor/github.com/spf13/cobra/doc/rest_docs_test.go b/vendor/github.com/spf13/cobra/doc/rest_docs_test.go
deleted file mode 100644
index aa3186e8f..000000000
--- a/vendor/github.com/spf13/cobra/doc/rest_docs_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package doc
-
-import (
- "bytes"
- "io/ioutil"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/spf13/cobra"
-)
-
-func TestGenRSTDoc(t *testing.T) {
- // We generate on a subcommand so we have both subcommands and parents
- buf := new(bytes.Buffer)
- if err := GenReST(echoCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- checkStringContains(t, output, echoCmd.Long)
- checkStringContains(t, output, echoCmd.Example)
- checkStringContains(t, output, "boolone")
- checkStringContains(t, output, "rootflag")
- checkStringContains(t, output, rootCmd.Short)
- checkStringContains(t, output, echoSubCmd.Short)
- checkStringOmits(t, output, deprecatedCmd.Short)
-}
-
-func TestGenRSTNoTag(t *testing.T) {
- rootCmd.DisableAutoGenTag = true
- defer func() { rootCmd.DisableAutoGenTag = false }()
-
- buf := new(bytes.Buffer)
- if err := GenReST(rootCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- unexpected := "Auto generated"
- checkStringOmits(t, output, unexpected)
-}
-
-func TestGenRSTTree(t *testing.T) {
- c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"}
-
- tmpdir, err := ioutil.TempDir("", "test-gen-rst-tree")
- if err != nil {
- t.Fatalf("Failed to create tmpdir: %s", err.Error())
- }
- defer os.RemoveAll(tmpdir)
-
- if err := GenReSTTree(c, tmpdir); err != nil {
- t.Fatalf("GenReSTTree failed: %s", err.Error())
- }
-
- if _, err := os.Stat(filepath.Join(tmpdir, "do.rst")); err != nil {
- t.Fatalf("Expected file 'do.rst' to exist")
- }
-}
-
-func BenchmarkGenReSTToFile(b *testing.B) {
- file, err := ioutil.TempFile("", "")
- if err != nil {
- b.Fatal(err)
- }
- defer os.Remove(file.Name())
- defer file.Close()
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if err := GenReST(rootCmd, file); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/spf13/cobra/doc/util.go b/vendor/github.com/spf13/cobra/doc/util.go
deleted file mode 100644
index 8d3dbecec..000000000
--- a/vendor/github.com/spf13/cobra/doc/util.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 Red Hat Inc. All rights reserved.
-//
-// 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.
-
-package doc
-
-import (
- "strings"
-
- "github.com/spf13/cobra"
-)
-
-// Test to see if we have a reason to print See Also information in docs
-// Basically this is a test for a parent commend or a subcommand which is
-// both not deprecated and not the autogenerated help command.
-func hasSeeAlso(cmd *cobra.Command) bool {
- if cmd.HasParent() {
- return true
- }
- for _, c := range cmd.Commands() {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- return true
- }
- return false
-}
-
-// Temporary workaround for yaml lib generating incorrect yaml with long strings
-// that do not contain \n.
-func forceMultiLine(s string) string {
- if len(s) > 60 && !strings.Contains(s, "\n") {
- s = s + "\n"
- }
- return s
-}
-
-type byName []*cobra.Command
-
-func (s byName) Len() int { return len(s) }
-func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }
diff --git a/vendor/github.com/spf13/cobra/doc/yaml_docs.go b/vendor/github.com/spf13/cobra/doc/yaml_docs.go
deleted file mode 100644
index ea00af07e..000000000
--- a/vendor/github.com/spf13/cobra/doc/yaml_docs.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2016 French Ben. All rights reserved.
-//
-// 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.
-
-package doc
-
-import (
- "fmt"
- "io"
- "os"
- "path/filepath"
- "sort"
- "strings"
-
- "github.com/spf13/cobra"
- "github.com/spf13/pflag"
- "gopkg.in/yaml.v2"
-)
-
-type cmdOption struct {
- Name string
- Shorthand string `yaml:",omitempty"`
- DefaultValue string `yaml:"default_value,omitempty"`
- Usage string `yaml:",omitempty"`
-}
-
-type cmdDoc struct {
- Name string
- Synopsis string `yaml:",omitempty"`
- Description string `yaml:",omitempty"`
- Options []cmdOption `yaml:",omitempty"`
- InheritedOptions []cmdOption `yaml:"inherited_options,omitempty"`
- Example string `yaml:",omitempty"`
- SeeAlso []string `yaml:"see_also,omitempty"`
-}
-
-// GenYamlTree creates yaml structured ref files for this command and all descendants
-// in the directory given. This function may not work
-// correctly if your command names have `-` in them. If you have `cmd` with two
-// subcmds, `sub` and `sub-third`, and `sub` has a subcommand called `third`
-// it is undefined which help output will be in the file `cmd-sub-third.1`.
-func GenYamlTree(cmd *cobra.Command, dir string) error {
- identity := func(s string) string { return s }
- emptyStr := func(s string) string { return "" }
- return GenYamlTreeCustom(cmd, dir, emptyStr, identity)
-}
-
-// GenYamlTreeCustom creates yaml structured ref files.
-func GenYamlTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandler func(string) string) error {
- for _, c := range cmd.Commands() {
- if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
- continue
- }
- if err := GenYamlTreeCustom(c, dir, filePrepender, linkHandler); err != nil {
- return err
- }
- }
-
- basename := strings.Replace(cmd.CommandPath(), " ", "_", -1) + ".yaml"
- filename := filepath.Join(dir, basename)
- f, err := os.Create(filename)
- if err != nil {
- return err
- }
- defer f.Close()
-
- if _, err := io.WriteString(f, filePrepender(filename)); err != nil {
- return err
- }
- if err := GenYamlCustom(cmd, f, linkHandler); err != nil {
- return err
- }
- return nil
-}
-
-// GenYaml creates yaml output.
-func GenYaml(cmd *cobra.Command, w io.Writer) error {
- return GenYamlCustom(cmd, w, func(s string) string { return s })
-}
-
-// GenYamlCustom creates custom yaml output.
-func GenYamlCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error {
- cmd.InitDefaultHelpCmd()
- cmd.InitDefaultHelpFlag()
-
- yamlDoc := cmdDoc{}
- yamlDoc.Name = cmd.CommandPath()
-
- yamlDoc.Synopsis = forceMultiLine(cmd.Short)
- yamlDoc.Description = forceMultiLine(cmd.Long)
-
- if len(cmd.Example) > 0 {
- yamlDoc.Example = cmd.Example
- }
-
- flags := cmd.NonInheritedFlags()
- if flags.HasFlags() {
- yamlDoc.Options = genFlagResult(flags)
- }
- flags = cmd.InheritedFlags()
- if flags.HasFlags() {
- yamlDoc.InheritedOptions = genFlagResult(flags)
- }
-
- if hasSeeAlso(cmd) {
- result := []string{}
- if cmd.HasParent() {
- parent := cmd.Parent()
- result = append(result, parent.CommandPath()+" - "+parent.Short)
- }
- children := cmd.Commands()
- sort.Sort(byName(children))
- for _, child := range children {
- if !child.IsAvailableCommand() || child.IsAdditionalHelpTopicCommand() {
- continue
- }
- result = append(result, child.Name()+" - "+child.Short)
- }
- yamlDoc.SeeAlso = result
- }
-
- final, err := yaml.Marshal(&yamlDoc)
- if err != nil {
- fmt.Println(err)
- os.Exit(1)
- }
-
- if _, err := w.Write(final); err != nil {
- return err
- }
- return nil
-}
-
-func genFlagResult(flags *pflag.FlagSet) []cmdOption {
- var result []cmdOption
-
- flags.VisitAll(func(flag *pflag.Flag) {
- // Todo, when we mark a shorthand is deprecated, but specify an empty message.
- // The flag.ShorthandDeprecated is empty as the shorthand is deprecated.
- // Using len(flag.ShorthandDeprecated) > 0 can't handle this, others are ok.
- if !(len(flag.ShorthandDeprecated) > 0) && len(flag.Shorthand) > 0 {
- opt := cmdOption{
- flag.Name,
- flag.Shorthand,
- flag.DefValue,
- forceMultiLine(flag.Usage),
- }
- result = append(result, opt)
- } else {
- opt := cmdOption{
- Name: flag.Name,
- DefaultValue: forceMultiLine(flag.DefValue),
- Usage: forceMultiLine(flag.Usage),
- }
- result = append(result, opt)
- }
- })
-
- return result
-}
diff --git a/vendor/github.com/spf13/cobra/doc/yaml_docs.md b/vendor/github.com/spf13/cobra/doc/yaml_docs.md
deleted file mode 100644
index 1a9b7c6a3..000000000
--- a/vendor/github.com/spf13/cobra/doc/yaml_docs.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# Generating Yaml Docs For Your Own cobra.Command
-
-Generating yaml files from a cobra command is incredibly easy. An example is as follows:
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- cmd := &cobra.Command{
- Use: "test",
- Short: "my test program",
- }
- err := doc.GenYamlTree(cmd, "/tmp")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-That will get you a Yaml document `/tmp/test.yaml`
-
-## Generate yaml docs for the entire command tree
-
-This program can actually generate docs for the kubectl command in the kubernetes project
-
-```go
-package main
-
-import (
- "io/ioutil"
- "log"
- "os"
-
- "k8s.io/kubernetes/pkg/kubectl/cmd"
- cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
-
- "github.com/spf13/cobra/doc"
-)
-
-func main() {
- kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
- err := doc.GenYamlTree(kubectl, "./")
- if err != nil {
- log.Fatal(err)
- }
-}
-```
-
-This will generate a whole series of files, one for each command in the tree, in the directory specified (in this case "./")
-
-## Generate yaml docs for a single command
-
-You may wish to have more control over the output, or only generate for a single command, instead of the entire command tree. If this is the case you may prefer to `GenYaml` instead of `GenYamlTree`
-
-```go
- out := new(bytes.Buffer)
- doc.GenYaml(cmd, out)
-```
-
-This will write the yaml doc for ONLY "cmd" into the out, buffer.
-
-## Customize the output
-
-Both `GenYaml` and `GenYamlTree` have alternate versions with callbacks to get some control of the output:
-
-```go
-func GenYamlTreeCustom(cmd *Command, dir string, filePrepender, linkHandler func(string) string) error {
- //...
-}
-```
-
-```go
-func GenYamlCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) error {
- //...
-}
-```
-
-The `filePrepender` will prepend the return value given the full filepath to the rendered Yaml file. A common use case is to add front matter to use the generated documentation with [Hugo](http://gohugo.io/):
-
-```go
-const fmTemplate = `---
-date: %s
-title: "%s"
-slug: %s
-url: %s
----
-`
-
-filePrepender := func(filename string) string {
- now := time.Now().Format(time.RFC3339)
- name := filepath.Base(filename)
- base := strings.TrimSuffix(name, path.Ext(name))
- url := "/commands/" + strings.ToLower(base) + "/"
- return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
-}
-```
-
-The `linkHandler` can be used to customize the rendered internal links to the commands, given a filename:
-
-```go
-linkHandler := func(name string) string {
- base := strings.TrimSuffix(name, path.Ext(name))
- return "/commands/" + strings.ToLower(base) + "/"
-}
-```
diff --git a/vendor/github.com/spf13/cobra/doc/yaml_docs_test.go b/vendor/github.com/spf13/cobra/doc/yaml_docs_test.go
deleted file mode 100644
index c5a63594f..000000000
--- a/vendor/github.com/spf13/cobra/doc/yaml_docs_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package doc
-
-import (
- "bytes"
- "io/ioutil"
- "os"
- "path/filepath"
- "testing"
-
- "github.com/spf13/cobra"
-)
-
-func TestGenYamlDoc(t *testing.T) {
- // We generate on s subcommand so we have both subcommands and parents
- buf := new(bytes.Buffer)
- if err := GenYaml(echoCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- checkStringContains(t, output, echoCmd.Long)
- checkStringContains(t, output, echoCmd.Example)
- checkStringContains(t, output, "boolone")
- checkStringContains(t, output, "rootflag")
- checkStringContains(t, output, rootCmd.Short)
- checkStringContains(t, output, echoSubCmd.Short)
-}
-
-func TestGenYamlNoTag(t *testing.T) {
- rootCmd.DisableAutoGenTag = true
- defer func() { rootCmd.DisableAutoGenTag = false }()
-
- buf := new(bytes.Buffer)
- if err := GenYaml(rootCmd, buf); err != nil {
- t.Fatal(err)
- }
- output := buf.String()
-
- checkStringOmits(t, output, "Auto generated")
-}
-
-func TestGenYamlTree(t *testing.T) {
- c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"}
-
- tmpdir, err := ioutil.TempDir("", "test-gen-yaml-tree")
- if err != nil {
- t.Fatalf("Failed to create tmpdir: %s", err.Error())
- }
- defer os.RemoveAll(tmpdir)
-
- if err := GenYamlTree(c, tmpdir); err != nil {
- t.Fatalf("GenYamlTree failed: %s", err.Error())
- }
-
- if _, err := os.Stat(filepath.Join(tmpdir, "do.yaml")); err != nil {
- t.Fatalf("Expected file 'do.yaml' to exist")
- }
-}
-
-func BenchmarkGenYamlToFile(b *testing.B) {
- file, err := ioutil.TempFile("", "")
- if err != nil {
- b.Fatal(err)
- }
- defer os.Remove(file.Name())
- defer file.Close()
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if err := GenYaml(rootCmd, file); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/vendor/github.com/spf13/cobra/zsh_completions_test.go b/vendor/github.com/spf13/cobra/zsh_completions_test.go
deleted file mode 100644
index 34e69496f..000000000
--- a/vendor/github.com/spf13/cobra/zsh_completions_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package cobra
-
-import (
- "bytes"
- "strings"
- "testing"
-)
-
-func TestZshCompletion(t *testing.T) {
- tcs := []struct {
- name string
- root *Command
- expectedExpressions []string
- }{
- {
- name: "trivial",
- root: &Command{Use: "trivialapp"},
- expectedExpressions: []string{"#compdef trivial"},
- },
- {
- name: "linear",
- root: func() *Command {
- r := &Command{Use: "linear"}
-
- sub1 := &Command{Use: "sub1"}
- r.AddCommand(sub1)
-
- sub2 := &Command{Use: "sub2"}
- sub1.AddCommand(sub2)
-
- sub3 := &Command{Use: "sub3"}
- sub2.AddCommand(sub3)
- return r
- }(),
- expectedExpressions: []string{"sub1", "sub2", "sub3"},
- },
- {
- name: "flat",
- root: func() *Command {
- r := &Command{Use: "flat"}
- r.AddCommand(&Command{Use: "c1"})
- r.AddCommand(&Command{Use: "c2"})
- return r
- }(),
- expectedExpressions: []string{"(c1 c2)"},
- },
- {
- name: "tree",
- root: func() *Command {
- r := &Command{Use: "tree"}
-
- sub1 := &Command{Use: "sub1"}
- r.AddCommand(sub1)
-
- sub11 := &Command{Use: "sub11"}
- sub12 := &Command{Use: "sub12"}
-
- sub1.AddCommand(sub11)
- sub1.AddCommand(sub12)
-
- sub2 := &Command{Use: "sub2"}
- r.AddCommand(sub2)
-
- sub21 := &Command{Use: "sub21"}
- sub22 := &Command{Use: "sub22"}
-
- sub2.AddCommand(sub21)
- sub2.AddCommand(sub22)
-
- return r
- }(),
- expectedExpressions: []string{"(sub11 sub12)", "(sub21 sub22)"},
- },
- }
-
- for _, tc := range tcs {
- t.Run(tc.name, func(t *testing.T) {
- buf := new(bytes.Buffer)
- tc.root.GenZshCompletion(buf)
- output := buf.String()
-
- for _, expectedExpression := range tc.expectedExpressions {
- if !strings.Contains(output, expectedExpression) {
- t.Errorf("Expected completion to contain %q somewhere; got %q", expectedExpression, output)
- }
- }
- })
- }
-}
diff --git a/vendor/github.com/spf13/jwalterweatherman/default_notepad_test.go b/vendor/github.com/spf13/jwalterweatherman/default_notepad_test.go
deleted file mode 100644
index 2670c8d96..000000000
--- a/vendor/github.com/spf13/jwalterweatherman/default_notepad_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright © 2016 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package jwalterweatherman
-
-import (
- "bytes"
- "io/ioutil"
- "sync"
- "testing"
-
- "github.com/stretchr/testify/require"
-)
-
-func TestThresholds(t *testing.T) {
- SetStdoutThreshold(LevelError)
- require.Equal(t, StdoutThreshold(), LevelError)
- SetLogThreshold(LevelCritical)
- require.Equal(t, LogThreshold(), LevelCritical)
- require.NotEqual(t, StdoutThreshold(), LevelCritical)
- SetStdoutThreshold(LevelWarn)
- require.Equal(t, StdoutThreshold(), LevelWarn)
-}
-
-func TestDefaultLogging(t *testing.T) {
- var outputBuf, logBuf bytes.Buffer
-
- defaultNotepad.logHandle = &logBuf
- defaultNotepad.outHandle = &outputBuf
-
- SetLogThreshold(LevelWarn)
- SetStdoutThreshold(LevelError)
-
- FATAL.Println("fatal err")
- CRITICAL.Println("critical err")
- ERROR.Println("an error")
- WARN.Println("a warning")
- INFO.Println("information")
- DEBUG.Println("debugging info")
- TRACE.Println("trace")
-
- require.Contains(t, logBuf.String(), "fatal err")
- require.Contains(t, logBuf.String(), "critical err")
- require.Contains(t, logBuf.String(), "an error")
- require.Contains(t, logBuf.String(), "a warning")
- require.NotContains(t, logBuf.String(), "information")
- require.NotContains(t, logBuf.String(), "debugging info")
- require.NotContains(t, logBuf.String(), "trace")
-
- require.Contains(t, outputBuf.String(), "fatal err")
- require.Contains(t, outputBuf.String(), "critical err")
- require.Contains(t, outputBuf.String(), "an error")
- require.NotContains(t, outputBuf.String(), "a warning")
- require.NotContains(t, outputBuf.String(), "information")
- require.NotContains(t, outputBuf.String(), "debugging info")
- require.NotContains(t, outputBuf.String(), "trace")
-}
-
-func TestLogCounter(t *testing.T) {
- defaultNotepad.logHandle = ioutil.Discard
- defaultNotepad.outHandle = ioutil.Discard
-
- SetLogThreshold(LevelTrace)
- SetStdoutThreshold(LevelTrace)
-
- FATAL.Println("fatal err")
- CRITICAL.Println("critical err")
- WARN.Println("a warning")
- WARN.Println("another warning")
- INFO.Println("information")
- DEBUG.Println("debugging info")
- TRACE.Println("trace")
-
- wg := &sync.WaitGroup{}
-
- for i := 0; i < 10; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
- for j := 0; j < 10; j++ {
- ERROR.Println("error", j)
- // check for data races
- require.True(t, LogCountForLevel(LevelError) > uint64(j))
- require.True(t, LogCountForLevelsGreaterThanorEqualTo(LevelError) > uint64(j))
- }
- }()
-
- }
-
- wg.Wait()
-
- require.Equal(t, uint64(1), LogCountForLevel(LevelFatal))
- require.Equal(t, uint64(1), LogCountForLevel(LevelCritical))
- require.Equal(t, uint64(2), LogCountForLevel(LevelWarn))
- require.Equal(t, uint64(1), LogCountForLevel(LevelInfo))
- require.Equal(t, uint64(1), LogCountForLevel(LevelDebug))
- require.Equal(t, uint64(1), LogCountForLevel(LevelTrace))
- require.Equal(t, uint64(100), LogCountForLevel(LevelError))
- require.Equal(t, uint64(102), LogCountForLevelsGreaterThanorEqualTo(LevelError))
-}
diff --git a/vendor/github.com/spf13/jwalterweatherman/notepad_test.go b/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
deleted file mode 100644
index 69ad6f8fc..000000000
--- a/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright © 2016 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package jwalterweatherman
-
-import (
- "bytes"
- "testing"
-
- "github.com/stretchr/testify/require"
-)
-
-func TestNotepad(t *testing.T) {
- var logHandle, outHandle bytes.Buffer
-
- n := NewNotepad(LevelCritical, LevelError, &outHandle, &logHandle, "TestNotePad", 0)
-
- require.Equal(t, LevelCritical, n.GetStdoutThreshold())
- require.Equal(t, LevelError, n.GetLogThreshold())
-
- n.DEBUG.Println("Some debug")
- n.ERROR.Println("Some error")
- n.CRITICAL.Println("Some critical error")
-
- require.Contains(t, logHandle.String(), "[TestNotePad] ERROR Some error")
- require.NotContains(t, logHandle.String(), "Some debug")
- require.NotContains(t, outHandle.String(), "Some error")
- require.Contains(t, outHandle.String(), "Some critical error")
-
- require.Equal(t, n.LogCountForLevel(LevelError), uint64(1))
- require.Equal(t, n.LogCountForLevel(LevelDebug), uint64(1))
- require.Equal(t, n.LogCountForLevel(LevelTrace), uint64(0))
-}
-
-func TestThresholdString(t *testing.T) {
- require.Equal(t, LevelError.String(), "ERROR")
- require.Equal(t, LevelTrace.String(), "TRACE")
-}
-
-func BenchmarkLogPrintOnlyToCounter(b *testing.B) {
- var logHandle, outHandle bytes.Buffer
- n := NewNotepad(LevelCritical, LevelCritical, &outHandle, &logHandle, "TestNotePad", 0)
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- n.INFO.Print("Test")
- }
-}
diff --git a/vendor/github.com/spf13/pflag/bool_slice_test.go b/vendor/github.com/spf13/pflag/bool_slice_test.go
deleted file mode 100644
index b617dd237..000000000
--- a/vendor/github.com/spf13/pflag/bool_slice_test.go
+++ /dev/null
@@ -1,215 +0,0 @@
-package pflag
-
-import (
- "fmt"
- "strconv"
- "strings"
- "testing"
-)
-
-func setUpBSFlagSet(bsp *[]bool) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.BoolSliceVar(bsp, "bs", []bool{}, "Command separated list!")
- return f
-}
-
-func setUpBSFlagSetWithDefault(bsp *[]bool) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.BoolSliceVar(bsp, "bs", []bool{false, true}, "Command separated list!")
- return f
-}
-
-func TestEmptyBS(t *testing.T) {
- var bs []bool
- f := setUpBSFlagSet(&bs)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getBS, err := f.GetBoolSlice("bs")
- if err != nil {
- t.Fatal("got an error from GetBoolSlice():", err)
- }
- if len(getBS) != 0 {
- t.Fatalf("got bs %v with len=%d but expected length=0", getBS, len(getBS))
- }
-}
-
-func TestBS(t *testing.T) {
- var bs []bool
- f := setUpBSFlagSet(&bs)
-
- vals := []string{"1", "F", "TRUE", "0"}
- arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range bs {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if b != v {
- t.Fatalf("expected is[%d] to be %s but got: %t", i, vals[i], v)
- }
- }
- getBS, err := f.GetBoolSlice("bs")
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- for i, v := range getBS {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if b != v {
- t.Fatalf("expected bs[%d] to be %s but got: %t from GetBoolSlice", i, vals[i], v)
- }
- }
-}
-
-func TestBSDefault(t *testing.T) {
- var bs []bool
- f := setUpBSFlagSetWithDefault(&bs)
-
- vals := []string{"false", "T"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range bs {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if b != v {
- t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v)
- }
- }
-
- getBS, err := f.GetBoolSlice("bs")
- if err != nil {
- t.Fatal("got an error from GetBoolSlice():", err)
- }
- for i, v := range getBS {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatal("got an error from GetBoolSlice():", err)
- }
- if b != v {
- t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v)
- }
- }
-}
-
-func TestBSWithDefault(t *testing.T) {
- var bs []bool
- f := setUpBSFlagSetWithDefault(&bs)
-
- vals := []string{"FALSE", "1"}
- arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range bs {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if b != v {
- t.Fatalf("expected bs[%d] to be %t but got: %t", i, b, v)
- }
- }
-
- getBS, err := f.GetBoolSlice("bs")
- if err != nil {
- t.Fatal("got an error from GetBoolSlice():", err)
- }
- for i, v := range getBS {
- b, err := strconv.ParseBool(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if b != v {
- t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v)
- }
- }
-}
-
-func TestBSCalledTwice(t *testing.T) {
- var bs []bool
- f := setUpBSFlagSet(&bs)
-
- in := []string{"T,F", "T"}
- expected := []bool{true, false, true}
- argfmt := "--bs=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range bs {
- if expected[i] != v {
- t.Fatalf("expected bs[%d] to be %t but got %t", i, expected[i], v)
- }
- }
-}
-
-func TestBSBadQuoting(t *testing.T) {
-
- tests := []struct {
- Want []bool
- FlagArg []string
- }{
- {
- Want: []bool{true, false, true},
- FlagArg: []string{"1", "0", "true"},
- },
- {
- Want: []bool{true, false},
- FlagArg: []string{"True", "F"},
- },
- {
- Want: []bool{true, false},
- FlagArg: []string{"T", "0"},
- },
- {
- Want: []bool{true, false},
- FlagArg: []string{"1", "0"},
- },
- {
- Want: []bool{true, false, false},
- FlagArg: []string{"true,false", "false"},
- },
- {
- Want: []bool{true, false, false, true, false, true, false},
- FlagArg: []string{`"true,false,false,1,0, T"`, " false "},
- },
- {
- Want: []bool{false, false, true, false, true, false, true},
- FlagArg: []string{`"0, False, T,false , true,F"`, "true"},
- },
- }
-
- for i, test := range tests {
-
- var bs []bool
- f := setUpBSFlagSet(&bs)
-
- if err := f.Parse([]string{fmt.Sprintf("--bs=%s", strings.Join(test.FlagArg, ","))}); err != nil {
- t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%#v",
- err, test.FlagArg, test.Want[i])
- }
-
- for j, b := range bs {
- if b != test.Want[j] {
- t.Fatalf("bad value parsed for test %d on bool %d:\nwant:\t%t\ngot:\t%t", i, j, test.Want[j], b)
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/bool_test.go b/vendor/github.com/spf13/pflag/bool_test.go
deleted file mode 100644
index a4319e79f..000000000
--- a/vendor/github.com/spf13/pflag/bool_test.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- "bytes"
- "strconv"
- "testing"
-)
-
-// This value can be a boolean ("true", "false") or "maybe"
-type triStateValue int
-
-const (
- triStateFalse triStateValue = 0
- triStateTrue triStateValue = 1
- triStateMaybe triStateValue = 2
-)
-
-const strTriStateMaybe = "maybe"
-
-func (v *triStateValue) IsBoolFlag() bool {
- return true
-}
-
-func (v *triStateValue) Get() interface{} {
- return triStateValue(*v)
-}
-
-func (v *triStateValue) Set(s string) error {
- if s == strTriStateMaybe {
- *v = triStateMaybe
- return nil
- }
- boolVal, err := strconv.ParseBool(s)
- if boolVal {
- *v = triStateTrue
- } else {
- *v = triStateFalse
- }
- return err
-}
-
-func (v *triStateValue) String() string {
- if *v == triStateMaybe {
- return strTriStateMaybe
- }
- return strconv.FormatBool(*v == triStateTrue)
-}
-
-// The type of the flag as required by the pflag.Value interface
-func (v *triStateValue) Type() string {
- return "version"
-}
-
-func setUpFlagSet(tristate *triStateValue) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- *tristate = triStateFalse
- flag := f.VarPF(tristate, "tristate", "t", "tristate value (true, maybe or false)")
- flag.NoOptDefVal = "true"
- return f
-}
-
-func TestExplicitTrue(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{"--tristate=true"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateTrue {
- t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead")
- }
-}
-
-func TestImplicitTrue(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{"--tristate"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateTrue {
- t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead")
- }
-}
-
-func TestShortFlag(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{"-t"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateTrue {
- t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead")
- }
-}
-
-func TestShortFlagExtraArgument(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- // The"maybe"turns into an arg, since short boolean options will only do true/false
- err := f.Parse([]string{"-t", "maybe"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateTrue {
- t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead")
- }
- args := f.Args()
- if len(args) != 1 || args[0] != "maybe" {
- t.Fatal("expected an extra 'maybe' argument to stick around")
- }
-}
-
-func TestExplicitMaybe(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{"--tristate=maybe"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateMaybe {
- t.Fatal("expected", triStateMaybe, "(triStateMaybe) but got", tristate, "instead")
- }
-}
-
-func TestExplicitFalse(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{"--tristate=false"})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateFalse {
- t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead")
- }
-}
-
-func TestImplicitFalse(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- if tristate != triStateFalse {
- t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead")
- }
-}
-
-func TestInvalidValue(t *testing.T) {
- var tristate triStateValue
- f := setUpFlagSet(&tristate)
- var buf bytes.Buffer
- f.SetOutput(&buf)
- err := f.Parse([]string{"--tristate=invalid"})
- if err == nil {
- t.Fatal("expected an error but did not get any, tristate has value", tristate)
- }
-}
-
-func TestBoolP(t *testing.T) {
- b := BoolP("bool", "b", false, "bool value in CommandLine")
- c := BoolP("c", "c", false, "other bool value")
- args := []string{"--bool"}
- if err := CommandLine.Parse(args); err != nil {
- t.Error("expected no error, got ", err)
- }
- if *b != true {
- t.Errorf("expected b=true got b=%v", *b)
- }
- if *c != false {
- t.Errorf("expect c=false got c=%v", *c)
- }
-}
diff --git a/vendor/github.com/spf13/pflag/bytes.go b/vendor/github.com/spf13/pflag/bytes.go
new file mode 100644
index 000000000..12c58db9f
--- /dev/null
+++ b/vendor/github.com/spf13/pflag/bytes.go
@@ -0,0 +1,105 @@
+package pflag
+
+import (
+ "encoding/hex"
+ "fmt"
+ "strings"
+)
+
+// BytesHex adapts []byte for use as a flag. Value of flag is HEX encoded
+type bytesHexValue []byte
+
+func (bytesHex bytesHexValue) String() string {
+ return fmt.Sprintf("%X", []byte(bytesHex))
+}
+
+func (bytesHex *bytesHexValue) Set(value string) error {
+ bin, err := hex.DecodeString(strings.TrimSpace(value))
+
+ if err != nil {
+ return err
+ }
+
+ *bytesHex = bin
+
+ return nil
+}
+
+func (*bytesHexValue) Type() string {
+ return "bytesHex"
+}
+
+func newBytesHexValue(val []byte, p *[]byte) *bytesHexValue {
+ *p = val
+ return (*bytesHexValue)(p)
+}
+
+func bytesHexConv(sval string) (interface{}, error) {
+
+ bin, err := hex.DecodeString(sval)
+
+ if err == nil {
+ return bin, nil
+ }
+
+ return nil, fmt.Errorf("invalid string being converted to Bytes: %s %s", sval, err)
+}
+
+// GetBytesHex return the []byte value of a flag with the given name
+func (f *FlagSet) GetBytesHex(name string) ([]byte, error) {
+ val, err := f.getFlagType(name, "bytesHex", bytesHexConv)
+
+ if err != nil {
+ return []byte{}, err
+ }
+
+ return val.([]byte), nil
+}
+
+// BytesHexVar defines an []byte flag with specified name, default value, and usage string.
+// The argument p points to an []byte variable in which to store the value of the flag.
+func (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string) {
+ f.VarP(newBytesHexValue(value, p), name, "", usage)
+}
+
+// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash.
+func (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) {
+ f.VarP(newBytesHexValue(value, p), name, shorthand, usage)
+}
+
+// BytesHexVar defines an []byte flag with specified name, default value, and usage string.
+// The argument p points to an []byte variable in which to store the value of the flag.
+func BytesHexVar(p *[]byte, name string, value []byte, usage string) {
+ CommandLine.VarP(newBytesHexValue(value, p), name, "", usage)
+}
+
+// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash.
+func BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) {
+ CommandLine.VarP(newBytesHexValue(value, p), name, shorthand, usage)
+}
+
+// BytesHex defines an []byte flag with specified name, default value, and usage string.
+// The return value is the address of an []byte variable that stores the value of the flag.
+func (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte {
+ p := new([]byte)
+ f.BytesHexVarP(p, name, "", value, usage)
+ return p
+}
+
+// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash.
+func (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte {
+ p := new([]byte)
+ f.BytesHexVarP(p, name, shorthand, value, usage)
+ return p
+}
+
+// BytesHex defines an []byte flag with specified name, default value, and usage string.
+// The return value is the address of an []byte variable that stores the value of the flag.
+func BytesHex(name string, value []byte, usage string) *[]byte {
+ return CommandLine.BytesHexP(name, "", value, usage)
+}
+
+// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash.
+func BytesHexP(name, shorthand string, value []byte, usage string) *[]byte {
+ return CommandLine.BytesHexP(name, shorthand, value, usage)
+}
diff --git a/vendor/github.com/spf13/pflag/count_test.go b/vendor/github.com/spf13/pflag/count_test.go
deleted file mode 100644
index 3785d375a..000000000
--- a/vendor/github.com/spf13/pflag/count_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package pflag
-
-import (
- "os"
- "testing"
-)
-
-func setUpCount(c *int) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.CountVarP(c, "verbose", "v", "a counter")
- return f
-}
-
-func TestCount(t *testing.T) {
- testCases := []struct {
- input []string
- success bool
- expected int
- }{
- {[]string{}, true, 0},
- {[]string{"-v"}, true, 1},
- {[]string{"-vvv"}, true, 3},
- {[]string{"-v", "-v", "-v"}, true, 3},
- {[]string{"-v", "--verbose", "-v"}, true, 3},
- {[]string{"-v=3", "-v"}, true, 4},
- {[]string{"--verbose=0"}, true, 0},
- {[]string{"-v=0"}, true, 0},
- {[]string{"-v=a"}, false, 0},
- }
-
- devnull, _ := os.Open(os.DevNull)
- os.Stderr = devnull
- for i := range testCases {
- var count int
- f := setUpCount(&count)
-
- tc := &testCases[i]
-
- err := f.Parse(tc.input)
- if err != nil && tc.success == true {
- t.Errorf("expected success, got %q", err)
- continue
- } else if err == nil && tc.success == false {
- t.Errorf("expected failure, got success")
- continue
- } else if tc.success {
- c, err := f.GetCount("verbose")
- if err != nil {
- t.Errorf("Got error trying to fetch the counter flag")
- }
- if c != tc.expected {
- t.Errorf("expected %d, got %d", tc.expected, c)
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/duration_slice_test.go b/vendor/github.com/spf13/pflag/duration_slice_test.go
deleted file mode 100644
index 489b012ff..000000000
--- a/vendor/github.com/spf13/pflag/duration_slice_test.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code ds governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package pflag
-
-import (
- "fmt"
- "strings"
- "testing"
- "time"
-)
-
-func setUpDSFlagSet(dsp *[]time.Duration) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.DurationSliceVar(dsp, "ds", []time.Duration{}, "Command separated list!")
- return f
-}
-
-func setUpDSFlagSetWithDefault(dsp *[]time.Duration) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.DurationSliceVar(dsp, "ds", []time.Duration{0, 1}, "Command separated list!")
- return f
-}
-
-func TestEmptyDS(t *testing.T) {
- var ds []time.Duration
- f := setUpDSFlagSet(&ds)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getDS, err := f.GetDurationSlice("ds")
- if err != nil {
- t.Fatal("got an error from GetDurationSlice():", err)
- }
- if len(getDS) != 0 {
- t.Fatalf("got ds %v with len=%d but expected length=0", getDS, len(getDS))
- }
-}
-
-func TestDS(t *testing.T) {
- var ds []time.Duration
- f := setUpDSFlagSet(&ds)
-
- vals := []string{"1ns", "2ms", "3m", "4h"}
- arg := fmt.Sprintf("--ds=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ds {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %s but got: %d", i, vals[i], v)
- }
- }
- getDS, err := f.GetDurationSlice("ds")
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- for i, v := range getDS {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %s but got: %d from GetDurationSlice", i, vals[i], v)
- }
- }
-}
-
-func TestDSDefault(t *testing.T) {
- var ds []time.Duration
- f := setUpDSFlagSetWithDefault(&ds)
-
- vals := []string{"0s", "1ns"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ds {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %d but got: %d", i, d, v)
- }
- }
-
- getDS, err := f.GetDurationSlice("ds")
- if err != nil {
- t.Fatal("got an error from GetDurationSlice():", err)
- }
- for i, v := range getDS {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatal("got an error from GetDurationSlice():", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %d from GetDurationSlice but got: %d", i, d, v)
- }
- }
-}
-
-func TestDSWithDefault(t *testing.T) {
- var ds []time.Duration
- f := setUpDSFlagSetWithDefault(&ds)
-
- vals := []string{"1ns", "2ns"}
- arg := fmt.Sprintf("--ds=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ds {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %d but got: %d", i, d, v)
- }
- }
-
- getDS, err := f.GetDurationSlice("ds")
- if err != nil {
- t.Fatal("got an error from GetDurationSlice():", err)
- }
- for i, v := range getDS {
- d, err := time.ParseDuration(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected ds[%d] to be %d from GetDurationSlice but got: %d", i, d, v)
- }
- }
-}
-
-func TestDSCalledTwice(t *testing.T) {
- var ds []time.Duration
- f := setUpDSFlagSet(&ds)
-
- in := []string{"1ns,2ns", "3ns"}
- expected := []time.Duration{1, 2, 3}
- argfmt := "--ds=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ds {
- if expected[i] != v {
- t.Fatalf("expected ds[%d] to be %d but got: %d", i, expected[i], v)
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/example_test.go b/vendor/github.com/spf13/pflag/example_test.go
deleted file mode 100644
index abd7806fa..000000000
--- a/vendor/github.com/spf13/pflag/example_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2012 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 file.
-
-package pflag_test
-
-import (
- "fmt"
-
- "github.com/spf13/pflag"
-)
-
-func ExampleShorthandLookup() {
- name := "verbose"
- short := name[:1]
-
- pflag.BoolP(name, short, false, "verbose output")
-
- // len(short) must be == 1
- flag := pflag.ShorthandLookup(short)
-
- fmt.Println(flag.Name)
-}
-
-func ExampleFlagSet_ShorthandLookup() {
- name := "verbose"
- short := name[:1]
-
- fs := pflag.NewFlagSet("Example", pflag.ContinueOnError)
- fs.BoolP(name, short, false, "verbose output")
-
- // len(short) must be == 1
- flag := fs.ShorthandLookup(short)
-
- fmt.Println(flag.Name)
-}
diff --git a/vendor/github.com/spf13/pflag/export_test.go b/vendor/github.com/spf13/pflag/export_test.go
deleted file mode 100644
index 9318fee00..000000000
--- a/vendor/github.com/spf13/pflag/export_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2010 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 file.
-
-package pflag
-
-import (
- "io/ioutil"
- "os"
-)
-
-// Additional routines compiled into the package only during testing.
-
-// ResetForTesting clears all flag state and sets the usage function as directed.
-// After calling ResetForTesting, parse errors in flag handling will not
-// exit the program.
-func ResetForTesting(usage func()) {
- CommandLine = &FlagSet{
- name: os.Args[0],
- errorHandling: ContinueOnError,
- output: ioutil.Discard,
- }
- Usage = usage
-}
-
-// GetCommandLine returns the default FlagSet.
-func GetCommandLine() *FlagSet {
- return CommandLine
-}
diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go
index 28538c075..5eadc84e3 100644
--- a/vendor/github.com/spf13/pflag/flag.go
+++ b/vendor/github.com/spf13/pflag/flag.go
@@ -101,6 +101,7 @@ package pflag
import (
"bytes"
"errors"
+ goflag "flag"
"fmt"
"io"
"os"
@@ -123,6 +124,12 @@ const (
PanicOnError
)
+// ParseErrorsWhitelist defines the parsing errors that can be ignored
+type ParseErrorsWhitelist struct {
+ // UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags
+ UnknownFlags bool
+}
+
// NormalizedName is a flag name that has been normalized according to rules
// for the FlagSet (e.g. making '-' and '_' equivalent).
type NormalizedName string
@@ -138,6 +145,9 @@ type FlagSet struct {
// help/usage messages.
SortFlags bool
+ // ParseErrorsWhitelist is used to configure a whitelist of errors
+ ParseErrorsWhitelist ParseErrorsWhitelist
+
name string
parsed bool
actual map[NormalizedName]*Flag
@@ -153,6 +163,8 @@ type FlagSet struct {
output io.Writer // nil means stderr; use out() accessor
interspersed bool // allow interspersed option/non-option args
normalizeNameFunc func(f *FlagSet, name string) NormalizedName
+
+ addedGoFlagSets []*goflag.FlagSet
}
// A Flag represents the state of a flag.
@@ -267,16 +279,16 @@ func (f *FlagSet) VisitAll(fn func(*Flag)) {
}
}
-// HasFlags returns a bool to indicate if the FlagSet has any flags definied.
+// HasFlags returns a bool to indicate if the FlagSet has any flags defined.
func (f *FlagSet) HasFlags() bool {
return len(f.formal) > 0
}
// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags
-// definied that are not hidden or deprecated.
+// that are not hidden.
func (f *FlagSet) HasAvailableFlags() bool {
for _, flag := range f.formal {
- if !flag.Hidden && len(flag.Deprecated) == 0 {
+ if !flag.Hidden {
return true
}
}
@@ -386,6 +398,7 @@ func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error {
return fmt.Errorf("deprecated message for flag %q must be set", name)
}
flag.Deprecated = usageMessage
+ flag.Hidden = true
return nil
}
@@ -586,11 +599,14 @@ func wrapN(i, slop int, s string) (string, string) {
return s, ""
}
- w := strings.LastIndexAny(s[:i], " \t")
+ w := strings.LastIndexAny(s[:i], " \t\n")
if w <= 0 {
return s, ""
}
-
+ nlPos := strings.LastIndex(s[:i], "\n")
+ if nlPos > 0 && nlPos < w {
+ return s[:nlPos], s[nlPos+1:]
+ }
return s[:w], s[w+1:]
}
@@ -599,7 +615,7 @@ func wrapN(i, slop int, s string) (string, string) {
// caller). Pass `w` == 0 to do no wrapping
func wrap(i, w int, s string) string {
if w == 0 {
- return s
+ return strings.Replace(s, "\n", "\n"+strings.Repeat(" ", i), -1)
}
// space between indent i and end of line width w into which
@@ -617,7 +633,7 @@ func wrap(i, w int, s string) string {
}
// If still not enough space then don't even try to wrap.
if wrap < 24 {
- return s
+ return strings.Replace(s, "\n", r, -1)
}
// Try to avoid short orphan words on the final line, by
@@ -629,14 +645,14 @@ func wrap(i, w int, s string) string {
// Handle first line, which is indented by the caller (or the
// special case above)
l, s = wrapN(wrap, slop, s)
- r = r + l
+ r = r + strings.Replace(l, "\n", "\n"+strings.Repeat(" ", i), -1)
// Now wrap the rest
for s != "" {
var t string
t, s = wrapN(wrap, slop, s)
- r = r + "\n" + strings.Repeat(" ", i) + t
+ r = r + "\n" + strings.Repeat(" ", i) + strings.Replace(t, "\n", "\n"+strings.Repeat(" ", i), -1)
}
return r
@@ -653,7 +669,7 @@ func (f *FlagSet) FlagUsagesWrapped(cols int) string {
maxlen := 0
f.VisitAll(func(flag *Flag) {
- if flag.Deprecated != "" || flag.Hidden {
+ if flag.Hidden {
return
}
@@ -700,6 +716,9 @@ func (f *FlagSet) FlagUsagesWrapped(cols int) string {
line += fmt.Sprintf(" (default %s)", flag.DefValue)
}
}
+ if len(flag.Deprecated) != 0 {
+ line += fmt.Sprintf(" (DEPRECATED: %s)", flag.Deprecated)
+ }
lines = append(lines, line)
})
@@ -896,6 +915,25 @@ func (f *FlagSet) usage() {
}
}
+//--unknown (args will be empty)
+//--unknown --next-flag ... (args will be --next-flag ...)
+//--unknown arg ... (args will be arg ...)
+func stripUnknownFlagValue(args []string) []string {
+ if len(args) == 0 {
+ //--unknown
+ return args
+ }
+
+ first := args[0]
+ if first[0] == '-' {
+ //--unknown --next-flag ...
+ return args
+ }
+
+ //--unknown arg ... (args will be arg ...)
+ return args[1:]
+}
+
func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []string, err error) {
a = args
name := s[2:]
@@ -907,13 +945,24 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin
split := strings.SplitN(name, "=", 2)
name = split[0]
flag, exists := f.formal[f.normalizeFlagName(name)]
+
if !exists {
- if name == "help" { // special case for nice help message.
+ switch {
+ case name == "help":
f.usage()
return a, ErrHelp
+ case f.ParseErrorsWhitelist.UnknownFlags:
+ // --unknown=unknownval arg ...
+ // we do not want to lose arg in this case
+ if len(split) >= 2 {
+ return a, nil
+ }
+
+ return stripUnknownFlagValue(a), nil
+ default:
+ err = f.failf("unknown flag: --%s", name)
+ return
}
- err = f.failf("unknown flag: --%s", name)
- return
}
var value string
@@ -951,13 +1000,25 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse
flag, exists := f.shorthands[c]
if !exists {
- if c == 'h' { // special case for nice help message.
+ switch {
+ case c == 'h':
f.usage()
err = ErrHelp
return
+ case f.ParseErrorsWhitelist.UnknownFlags:
+ // '-f=arg arg ...'
+ // we do not want to lose arg in this case
+ if len(shorthands) > 2 && shorthands[1] == '=' {
+ outShorts = ""
+ return
+ }
+
+ outArgs = stripUnknownFlagValue(outArgs)
+ return
+ default:
+ err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands)
+ return
}
- err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands)
- return
}
var value string
@@ -1044,6 +1105,11 @@ func (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) {
// are defined and before flags are accessed by the program.
// The return value will be ErrHelp if -help was set but not defined.
func (f *FlagSet) Parse(arguments []string) error {
+ if f.addedGoFlagSets != nil {
+ for _, goFlagSet := range f.addedGoFlagSets {
+ goFlagSet.Parse(nil)
+ }
+ }
f.parsed = true
if len(arguments) < 0 {
diff --git a/vendor/github.com/spf13/pflag/flag_test.go b/vendor/github.com/spf13/pflag/flag_test.go
deleted file mode 100644
index d587752f3..000000000
--- a/vendor/github.com/spf13/pflag/flag_test.go
+++ /dev/null
@@ -1,1158 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "os"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "testing"
- "time"
-)
-
-var (
- testBool = Bool("test_bool", false, "bool value")
- testInt = Int("test_int", 0, "int value")
- testInt64 = Int64("test_int64", 0, "int64 value")
- testUint = Uint("test_uint", 0, "uint value")
- testUint64 = Uint64("test_uint64", 0, "uint64 value")
- testString = String("test_string", "0", "string value")
- testFloat = Float64("test_float64", 0, "float64 value")
- testDuration = Duration("test_duration", 0, "time.Duration value")
- testOptionalInt = Int("test_optional_int", 0, "optional int value")
- normalizeFlagNameInvocations = 0
-)
-
-func boolString(s string) string {
- if s == "0" {
- return "false"
- }
- return "true"
-}
-
-func TestEverything(t *testing.T) {
- m := make(map[string]*Flag)
- desired := "0"
- visitor := func(f *Flag) {
- if len(f.Name) > 5 && f.Name[0:5] == "test_" {
- m[f.Name] = f
- ok := false
- switch {
- case f.Value.String() == desired:
- ok = true
- case f.Name == "test_bool" && f.Value.String() == boolString(desired):
- ok = true
- case f.Name == "test_duration" && f.Value.String() == desired+"s":
- ok = true
- }
- if !ok {
- t.Error("Visit: bad value", f.Value.String(), "for", f.Name)
- }
- }
- }
- VisitAll(visitor)
- if len(m) != 9 {
- t.Error("VisitAll misses some flags")
- for k, v := range m {
- t.Log(k, *v)
- }
- }
- m = make(map[string]*Flag)
- Visit(visitor)
- if len(m) != 0 {
- t.Errorf("Visit sees unset flags")
- for k, v := range m {
- t.Log(k, *v)
- }
- }
- // Now set all flags
- Set("test_bool", "true")
- Set("test_int", "1")
- Set("test_int64", "1")
- Set("test_uint", "1")
- Set("test_uint64", "1")
- Set("test_string", "1")
- Set("test_float64", "1")
- Set("test_duration", "1s")
- Set("test_optional_int", "1")
- desired = "1"
- Visit(visitor)
- if len(m) != 9 {
- t.Error("Visit fails after set")
- for k, v := range m {
- t.Log(k, *v)
- }
- }
- // Now test they're visited in sort order.
- var flagNames []string
- Visit(func(f *Flag) { flagNames = append(flagNames, f.Name) })
- if !sort.StringsAreSorted(flagNames) {
- t.Errorf("flag names not sorted: %v", flagNames)
- }
-}
-
-func TestUsage(t *testing.T) {
- called := false
- ResetForTesting(func() { called = true })
- if GetCommandLine().Parse([]string{"--x"}) == nil {
- t.Error("parse did not fail for unknown flag")
- }
- if called {
- t.Error("did call Usage while using ContinueOnError")
- }
-}
-
-func TestAddFlagSet(t *testing.T) {
- oldSet := NewFlagSet("old", ContinueOnError)
- newSet := NewFlagSet("new", ContinueOnError)
-
- oldSet.String("flag1", "flag1", "flag1")
- oldSet.String("flag2", "flag2", "flag2")
-
- newSet.String("flag2", "flag2", "flag2")
- newSet.String("flag3", "flag3", "flag3")
-
- oldSet.AddFlagSet(newSet)
-
- if len(oldSet.formal) != 3 {
- t.Errorf("Unexpected result adding a FlagSet to a FlagSet %v", oldSet)
- }
-}
-
-func TestAnnotation(t *testing.T) {
- f := NewFlagSet("shorthand", ContinueOnError)
-
- if err := f.SetAnnotation("missing-flag", "key", nil); err == nil {
- t.Errorf("Expected error setting annotation on non-existent flag")
- }
-
- f.StringP("stringa", "a", "", "string value")
- if err := f.SetAnnotation("stringa", "key", nil); err != nil {
- t.Errorf("Unexpected error setting new nil annotation: %v", err)
- }
- if annotation := f.Lookup("stringa").Annotations["key"]; annotation != nil {
- t.Errorf("Unexpected annotation: %v", annotation)
- }
-
- f.StringP("stringb", "b", "", "string2 value")
- if err := f.SetAnnotation("stringb", "key", []string{"value1"}); err != nil {
- t.Errorf("Unexpected error setting new annotation: %v", err)
- }
- if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value1"}) {
- t.Errorf("Unexpected annotation: %v", annotation)
- }
-
- if err := f.SetAnnotation("stringb", "key", []string{"value2"}); err != nil {
- t.Errorf("Unexpected error updating annotation: %v", err)
- }
- if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value2"}) {
- t.Errorf("Unexpected annotation: %v", annotation)
- }
-}
-
-func testParse(f *FlagSet, t *testing.T) {
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- boolFlag := f.Bool("bool", false, "bool value")
- bool2Flag := f.Bool("bool2", false, "bool2 value")
- bool3Flag := f.Bool("bool3", false, "bool3 value")
- intFlag := f.Int("int", 0, "int value")
- int8Flag := f.Int8("int8", 0, "int value")
- int16Flag := f.Int16("int16", 0, "int value")
- int32Flag := f.Int32("int32", 0, "int value")
- int64Flag := f.Int64("int64", 0, "int64 value")
- uintFlag := f.Uint("uint", 0, "uint value")
- uint8Flag := f.Uint8("uint8", 0, "uint value")
- uint16Flag := f.Uint16("uint16", 0, "uint value")
- uint32Flag := f.Uint32("uint32", 0, "uint value")
- uint64Flag := f.Uint64("uint64", 0, "uint64 value")
- stringFlag := f.String("string", "0", "string value")
- float32Flag := f.Float32("float32", 0, "float32 value")
- float64Flag := f.Float64("float64", 0, "float64 value")
- ipFlag := f.IP("ip", net.ParseIP("127.0.0.1"), "ip value")
- maskFlag := f.IPMask("mask", ParseIPv4Mask("0.0.0.0"), "mask value")
- durationFlag := f.Duration("duration", 5*time.Second, "time.Duration value")
- optionalIntNoValueFlag := f.Int("optional-int-no-value", 0, "int value")
- f.Lookup("optional-int-no-value").NoOptDefVal = "9"
- optionalIntWithValueFlag := f.Int("optional-int-with-value", 0, "int value")
- f.Lookup("optional-int-no-value").NoOptDefVal = "9"
- extra := "one-extra-argument"
- args := []string{
- "--bool",
- "--bool2=true",
- "--bool3=false",
- "--int=22",
- "--int8=-8",
- "--int16=-16",
- "--int32=-32",
- "--int64=0x23",
- "--uint", "24",
- "--uint8=8",
- "--uint16=16",
- "--uint32=32",
- "--uint64=25",
- "--string=hello",
- "--float32=-172e12",
- "--float64=2718e28",
- "--ip=10.11.12.13",
- "--mask=255.255.255.0",
- "--duration=2m",
- "--optional-int-no-value",
- "--optional-int-with-value=42",
- extra,
- }
- if err := f.Parse(args); err != nil {
- t.Fatal(err)
- }
- if !f.Parsed() {
- t.Error("f.Parse() = false after Parse")
- }
- if *boolFlag != true {
- t.Error("bool flag should be true, is ", *boolFlag)
- }
- if v, err := f.GetBool("bool"); err != nil || v != *boolFlag {
- t.Error("GetBool does not work.")
- }
- if *bool2Flag != true {
- t.Error("bool2 flag should be true, is ", *bool2Flag)
- }
- if *bool3Flag != false {
- t.Error("bool3 flag should be false, is ", *bool2Flag)
- }
- if *intFlag != 22 {
- t.Error("int flag should be 22, is ", *intFlag)
- }
- if v, err := f.GetInt("int"); err != nil || v != *intFlag {
- t.Error("GetInt does not work.")
- }
- if *int8Flag != -8 {
- t.Error("int8 flag should be 0x23, is ", *int8Flag)
- }
- if *int16Flag != -16 {
- t.Error("int16 flag should be -16, is ", *int16Flag)
- }
- if v, err := f.GetInt8("int8"); err != nil || v != *int8Flag {
- t.Error("GetInt8 does not work.")
- }
- if v, err := f.GetInt16("int16"); err != nil || v != *int16Flag {
- t.Error("GetInt16 does not work.")
- }
- if *int32Flag != -32 {
- t.Error("int32 flag should be 0x23, is ", *int32Flag)
- }
- if v, err := f.GetInt32("int32"); err != nil || v != *int32Flag {
- t.Error("GetInt32 does not work.")
- }
- if *int64Flag != 0x23 {
- t.Error("int64 flag should be 0x23, is ", *int64Flag)
- }
- if v, err := f.GetInt64("int64"); err != nil || v != *int64Flag {
- t.Error("GetInt64 does not work.")
- }
- if *uintFlag != 24 {
- t.Error("uint flag should be 24, is ", *uintFlag)
- }
- if v, err := f.GetUint("uint"); err != nil || v != *uintFlag {
- t.Error("GetUint does not work.")
- }
- if *uint8Flag != 8 {
- t.Error("uint8 flag should be 8, is ", *uint8Flag)
- }
- if v, err := f.GetUint8("uint8"); err != nil || v != *uint8Flag {
- t.Error("GetUint8 does not work.")
- }
- if *uint16Flag != 16 {
- t.Error("uint16 flag should be 16, is ", *uint16Flag)
- }
- if v, err := f.GetUint16("uint16"); err != nil || v != *uint16Flag {
- t.Error("GetUint16 does not work.")
- }
- if *uint32Flag != 32 {
- t.Error("uint32 flag should be 32, is ", *uint32Flag)
- }
- if v, err := f.GetUint32("uint32"); err != nil || v != *uint32Flag {
- t.Error("GetUint32 does not work.")
- }
- if *uint64Flag != 25 {
- t.Error("uint64 flag should be 25, is ", *uint64Flag)
- }
- if v, err := f.GetUint64("uint64"); err != nil || v != *uint64Flag {
- t.Error("GetUint64 does not work.")
- }
- if *stringFlag != "hello" {
- t.Error("string flag should be `hello`, is ", *stringFlag)
- }
- if v, err := f.GetString("string"); err != nil || v != *stringFlag {
- t.Error("GetString does not work.")
- }
- if *float32Flag != -172e12 {
- t.Error("float32 flag should be -172e12, is ", *float32Flag)
- }
- if v, err := f.GetFloat32("float32"); err != nil || v != *float32Flag {
- t.Errorf("GetFloat32 returned %v but float32Flag was %v", v, *float32Flag)
- }
- if *float64Flag != 2718e28 {
- t.Error("float64 flag should be 2718e28, is ", *float64Flag)
- }
- if v, err := f.GetFloat64("float64"); err != nil || v != *float64Flag {
- t.Errorf("GetFloat64 returned %v but float64Flag was %v", v, *float64Flag)
- }
- if !(*ipFlag).Equal(net.ParseIP("10.11.12.13")) {
- t.Error("ip flag should be 10.11.12.13, is ", *ipFlag)
- }
- if v, err := f.GetIP("ip"); err != nil || !v.Equal(*ipFlag) {
- t.Errorf("GetIP returned %v but ipFlag was %v", v, *ipFlag)
- }
- if (*maskFlag).String() != ParseIPv4Mask("255.255.255.0").String() {
- t.Error("mask flag should be 255.255.255.0, is ", (*maskFlag).String())
- }
- if v, err := f.GetIPv4Mask("mask"); err != nil || v.String() != (*maskFlag).String() {
- t.Errorf("GetIP returned %v maskFlag was %v error was %v", v, *maskFlag, err)
- }
- if *durationFlag != 2*time.Minute {
- t.Error("duration flag should be 2m, is ", *durationFlag)
- }
- if v, err := f.GetDuration("duration"); err != nil || v != *durationFlag {
- t.Error("GetDuration does not work.")
- }
- if _, err := f.GetInt("duration"); err == nil {
- t.Error("GetInt parsed a time.Duration?!?!")
- }
- if *optionalIntNoValueFlag != 9 {
- t.Error("optional int flag should be the default value, is ", *optionalIntNoValueFlag)
- }
- if *optionalIntWithValueFlag != 42 {
- t.Error("optional int flag should be 42, is ", *optionalIntWithValueFlag)
- }
- if len(f.Args()) != 1 {
- t.Error("expected one argument, got", len(f.Args()))
- } else if f.Args()[0] != extra {
- t.Errorf("expected argument %q got %q", extra, f.Args()[0])
- }
-}
-
-func testParseAll(f *FlagSet, t *testing.T) {
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- f.BoolP("boola", "a", false, "bool value")
- f.BoolP("boolb", "b", false, "bool2 value")
- f.BoolP("boolc", "c", false, "bool3 value")
- f.BoolP("boold", "d", false, "bool4 value")
- f.StringP("stringa", "s", "0", "string value")
- f.StringP("stringz", "z", "0", "string value")
- f.StringP("stringx", "x", "0", "string value")
- f.StringP("stringy", "y", "0", "string value")
- f.Lookup("stringx").NoOptDefVal = "1"
- args := []string{
- "-ab",
- "-cs=xx",
- "--stringz=something",
- "-d=true",
- "-x",
- "-y",
- "ee",
- }
- want := []string{
- "boola", "true",
- "boolb", "true",
- "boolc", "true",
- "stringa", "xx",
- "stringz", "something",
- "boold", "true",
- "stringx", "1",
- "stringy", "ee",
- }
- got := []string{}
- store := func(flag *Flag, value string) error {
- got = append(got, flag.Name)
- if len(value) > 0 {
- got = append(got, value)
- }
- return nil
- }
- if err := f.ParseAll(args, store); err != nil {
- t.Errorf("expected no error, got %s", err)
- }
- if !f.Parsed() {
- t.Errorf("f.Parse() = false after Parse")
- }
- if !reflect.DeepEqual(got, want) {
- t.Errorf("f.ParseAll() fail to restore the args")
- t.Errorf("Got: %v", got)
- t.Errorf("Want: %v", want)
- }
-}
-
-func TestShorthand(t *testing.T) {
- f := NewFlagSet("shorthand", ContinueOnError)
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- boolaFlag := f.BoolP("boola", "a", false, "bool value")
- boolbFlag := f.BoolP("boolb", "b", false, "bool2 value")
- boolcFlag := f.BoolP("boolc", "c", false, "bool3 value")
- booldFlag := f.BoolP("boold", "d", false, "bool4 value")
- stringaFlag := f.StringP("stringa", "s", "0", "string value")
- stringzFlag := f.StringP("stringz", "z", "0", "string value")
- extra := "interspersed-argument"
- notaflag := "--i-look-like-a-flag"
- args := []string{
- "-ab",
- extra,
- "-cs",
- "hello",
- "-z=something",
- "-d=true",
- "--",
- notaflag,
- }
- f.SetOutput(ioutil.Discard)
- if err := f.Parse(args); err != nil {
- t.Error("expected no error, got ", err)
- }
- if !f.Parsed() {
- t.Error("f.Parse() = false after Parse")
- }
- if *boolaFlag != true {
- t.Error("boola flag should be true, is ", *boolaFlag)
- }
- if *boolbFlag != true {
- t.Error("boolb flag should be true, is ", *boolbFlag)
- }
- if *boolcFlag != true {
- t.Error("boolc flag should be true, is ", *boolcFlag)
- }
- if *booldFlag != true {
- t.Error("boold flag should be true, is ", *booldFlag)
- }
- if *stringaFlag != "hello" {
- t.Error("stringa flag should be `hello`, is ", *stringaFlag)
- }
- if *stringzFlag != "something" {
- t.Error("stringz flag should be `something`, is ", *stringzFlag)
- }
- if len(f.Args()) != 2 {
- t.Error("expected one argument, got", len(f.Args()))
- } else if f.Args()[0] != extra {
- t.Errorf("expected argument %q got %q", extra, f.Args()[0])
- } else if f.Args()[1] != notaflag {
- t.Errorf("expected argument %q got %q", notaflag, f.Args()[1])
- }
- if f.ArgsLenAtDash() != 1 {
- t.Errorf("expected argsLenAtDash %d got %d", f.ArgsLenAtDash(), 1)
- }
-}
-
-func TestShorthandLookup(t *testing.T) {
- f := NewFlagSet("shorthand", ContinueOnError)
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- f.BoolP("boola", "a", false, "bool value")
- f.BoolP("boolb", "b", false, "bool2 value")
- args := []string{
- "-ab",
- }
- f.SetOutput(ioutil.Discard)
- if err := f.Parse(args); err != nil {
- t.Error("expected no error, got ", err)
- }
- if !f.Parsed() {
- t.Error("f.Parse() = false after Parse")
- }
- flag := f.ShorthandLookup("a")
- if flag == nil {
- t.Errorf("f.ShorthandLookup(\"a\") returned nil")
- }
- if flag.Name != "boola" {
- t.Errorf("f.ShorthandLookup(\"a\") found %q instead of \"boola\"", flag.Name)
- }
- flag = f.ShorthandLookup("")
- if flag != nil {
- t.Errorf("f.ShorthandLookup(\"\") did not return nil")
- }
- defer func() {
- recover()
- }()
- flag = f.ShorthandLookup("ab")
- // should NEVER get here. lookup should panic. defer'd func should recover it.
- t.Errorf("f.ShorthandLookup(\"ab\") did not panic")
-}
-
-func TestParse(t *testing.T) {
- ResetForTesting(func() { t.Error("bad parse") })
- testParse(GetCommandLine(), t)
-}
-
-func TestParseAll(t *testing.T) {
- ResetForTesting(func() { t.Error("bad parse") })
- testParseAll(GetCommandLine(), t)
-}
-
-func TestFlagSetParse(t *testing.T) {
- testParse(NewFlagSet("test", ContinueOnError), t)
-}
-
-func TestChangedHelper(t *testing.T) {
- f := NewFlagSet("changedtest", ContinueOnError)
- f.Bool("changed", false, "changed bool")
- f.Bool("settrue", true, "true to true")
- f.Bool("setfalse", false, "false to false")
- f.Bool("unchanged", false, "unchanged bool")
-
- args := []string{"--changed", "--settrue", "--setfalse=false"}
- if err := f.Parse(args); err != nil {
- t.Error("f.Parse() = false after Parse")
- }
- if !f.Changed("changed") {
- t.Errorf("--changed wasn't changed!")
- }
- if !f.Changed("settrue") {
- t.Errorf("--settrue wasn't changed!")
- }
- if !f.Changed("setfalse") {
- t.Errorf("--setfalse wasn't changed!")
- }
- if f.Changed("unchanged") {
- t.Errorf("--unchanged was changed!")
- }
- if f.Changed("invalid") {
- t.Errorf("--invalid was changed!")
- }
- if f.ArgsLenAtDash() != -1 {
- t.Errorf("Expected argsLenAtDash: %d but got %d", -1, f.ArgsLenAtDash())
- }
-}
-
-func replaceSeparators(name string, from []string, to string) string {
- result := name
- for _, sep := range from {
- result = strings.Replace(result, sep, to, -1)
- }
- // Type convert to indicate normalization has been done.
- return result
-}
-
-func wordSepNormalizeFunc(f *FlagSet, name string) NormalizedName {
- seps := []string{"-", "_"}
- name = replaceSeparators(name, seps, ".")
- normalizeFlagNameInvocations++
-
- return NormalizedName(name)
-}
-
-func testWordSepNormalizedNames(args []string, t *testing.T) {
- f := NewFlagSet("normalized", ContinueOnError)
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- withDashFlag := f.Bool("with-dash-flag", false, "bool value")
- // Set this after some flags have been added and before others.
- f.SetNormalizeFunc(wordSepNormalizeFunc)
- withUnderFlag := f.Bool("with_under_flag", false, "bool value")
- withBothFlag := f.Bool("with-both_flag", false, "bool value")
- if err := f.Parse(args); err != nil {
- t.Fatal(err)
- }
- if !f.Parsed() {
- t.Error("f.Parse() = false after Parse")
- }
- if *withDashFlag != true {
- t.Error("withDashFlag flag should be true, is ", *withDashFlag)
- }
- if *withUnderFlag != true {
- t.Error("withUnderFlag flag should be true, is ", *withUnderFlag)
- }
- if *withBothFlag != true {
- t.Error("withBothFlag flag should be true, is ", *withBothFlag)
- }
-}
-
-func TestWordSepNormalizedNames(t *testing.T) {
- args := []string{
- "--with-dash-flag",
- "--with-under-flag",
- "--with-both-flag",
- }
- testWordSepNormalizedNames(args, t)
-
- args = []string{
- "--with_dash_flag",
- "--with_under_flag",
- "--with_both_flag",
- }
- testWordSepNormalizedNames(args, t)
-
- args = []string{
- "--with-dash_flag",
- "--with-under_flag",
- "--with-both_flag",
- }
- testWordSepNormalizedNames(args, t)
-}
-
-func aliasAndWordSepFlagNames(f *FlagSet, name string) NormalizedName {
- seps := []string{"-", "_"}
-
- oldName := replaceSeparators("old-valid_flag", seps, ".")
- newName := replaceSeparators("valid-flag", seps, ".")
-
- name = replaceSeparators(name, seps, ".")
- switch name {
- case oldName:
- name = newName
- }
-
- return NormalizedName(name)
-}
-
-func TestCustomNormalizedNames(t *testing.T) {
- f := NewFlagSet("normalized", ContinueOnError)
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
-
- validFlag := f.Bool("valid-flag", false, "bool value")
- f.SetNormalizeFunc(aliasAndWordSepFlagNames)
- someOtherFlag := f.Bool("some-other-flag", false, "bool value")
-
- args := []string{"--old_valid_flag", "--some-other_flag"}
- if err := f.Parse(args); err != nil {
- t.Fatal(err)
- }
-
- if *validFlag != true {
- t.Errorf("validFlag is %v even though we set the alias --old_valid_falg", *validFlag)
- }
- if *someOtherFlag != true {
- t.Error("someOtherFlag should be true, is ", *someOtherFlag)
- }
-}
-
-// Every flag we add, the name (displayed also in usage) should normalized
-func TestNormalizationFuncShouldChangeFlagName(t *testing.T) {
- // Test normalization after addition
- f := NewFlagSet("normalized", ContinueOnError)
-
- f.Bool("valid_flag", false, "bool value")
- if f.Lookup("valid_flag").Name != "valid_flag" {
- t.Error("The new flag should have the name 'valid_flag' instead of ", f.Lookup("valid_flag").Name)
- }
-
- f.SetNormalizeFunc(wordSepNormalizeFunc)
- if f.Lookup("valid_flag").Name != "valid.flag" {
- t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name)
- }
-
- // Test normalization before addition
- f = NewFlagSet("normalized", ContinueOnError)
- f.SetNormalizeFunc(wordSepNormalizeFunc)
-
- f.Bool("valid_flag", false, "bool value")
- if f.Lookup("valid_flag").Name != "valid.flag" {
- t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name)
- }
-}
-
-// Related to https://github.com/spf13/cobra/issues/521.
-func TestNormalizationSharedFlags(t *testing.T) {
- f := NewFlagSet("set f", ContinueOnError)
- g := NewFlagSet("set g", ContinueOnError)
- nfunc := wordSepNormalizeFunc
- testName := "valid_flag"
- normName := nfunc(nil, testName)
- if testName == string(normName) {
- t.Error("TestNormalizationSharedFlags meaningless: the original and normalized flag names are identical:", testName)
- }
-
- f.Bool(testName, false, "bool value")
- g.AddFlagSet(f)
-
- f.SetNormalizeFunc(nfunc)
- g.SetNormalizeFunc(nfunc)
-
- if len(f.formal) != 1 {
- t.Error("Normalizing flags should not result in duplications in the flag set:", f.formal)
- }
- if f.orderedFormal[0].Name != string(normName) {
- t.Error("Flag name not normalized")
- }
- for k := range f.formal {
- if k != "valid.flag" {
- t.Errorf("The key in the flag map should have been normalized: wanted \"%s\", got \"%s\" instead", normName, k)
- }
- }
-
- if !reflect.DeepEqual(f.formal, g.formal) || !reflect.DeepEqual(f.orderedFormal, g.orderedFormal) {
- t.Error("Two flag sets sharing the same flags should stay consistent after being normalized. Original set:", f.formal, "Duplicate set:", g.formal)
- }
-}
-
-func TestNormalizationSetFlags(t *testing.T) {
- f := NewFlagSet("normalized", ContinueOnError)
- nfunc := wordSepNormalizeFunc
- testName := "valid_flag"
- normName := nfunc(nil, testName)
- if testName == string(normName) {
- t.Error("TestNormalizationSetFlags meaningless: the original and normalized flag names are identical:", testName)
- }
-
- f.Bool(testName, false, "bool value")
- f.Set(testName, "true")
- f.SetNormalizeFunc(nfunc)
-
- if len(f.formal) != 1 {
- t.Error("Normalizing flags should not result in duplications in the flag set:", f.formal)
- }
- if f.orderedFormal[0].Name != string(normName) {
- t.Error("Flag name not normalized")
- }
- for k := range f.formal {
- if k != "valid.flag" {
- t.Errorf("The key in the flag map should have been normalized: wanted \"%s\", got \"%s\" instead", normName, k)
- }
- }
-
- if !reflect.DeepEqual(f.formal, f.actual) {
- t.Error("The map of set flags should get normalized. Formal:", f.formal, "Actual:", f.actual)
- }
-}
-
-// Declare a user-defined flag type.
-type flagVar []string
-
-func (f *flagVar) String() string {
- return fmt.Sprint([]string(*f))
-}
-
-func (f *flagVar) Set(value string) error {
- *f = append(*f, value)
- return nil
-}
-
-func (f *flagVar) Type() string {
- return "flagVar"
-}
-
-func TestUserDefined(t *testing.T) {
- var flags FlagSet
- flags.Init("test", ContinueOnError)
- var v flagVar
- flags.VarP(&v, "v", "v", "usage")
- if err := flags.Parse([]string{"--v=1", "-v2", "-v", "3"}); err != nil {
- t.Error(err)
- }
- if len(v) != 3 {
- t.Fatal("expected 3 args; got ", len(v))
- }
- expect := "[1 2 3]"
- if v.String() != expect {
- t.Errorf("expected value %q got %q", expect, v.String())
- }
-}
-
-func TestSetOutput(t *testing.T) {
- var flags FlagSet
- var buf bytes.Buffer
- flags.SetOutput(&buf)
- flags.Init("test", ContinueOnError)
- flags.Parse([]string{"--unknown"})
- if out := buf.String(); !strings.Contains(out, "--unknown") {
- t.Logf("expected output mentioning unknown; got %q", out)
- }
-}
-
-// This tests that one can reset the flags. This still works but not well, and is
-// superseded by FlagSet.
-func TestChangingArgs(t *testing.T) {
- ResetForTesting(func() { t.Fatal("bad parse") })
- oldArgs := os.Args
- defer func() { os.Args = oldArgs }()
- os.Args = []string{"cmd", "--before", "subcmd"}
- before := Bool("before", false, "")
- if err := GetCommandLine().Parse(os.Args[1:]); err != nil {
- t.Fatal(err)
- }
- cmd := Arg(0)
- os.Args = []string{"subcmd", "--after", "args"}
- after := Bool("after", false, "")
- Parse()
- args := Args()
-
- if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" {
- t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args)
- }
-}
-
-// Test that -help invokes the usage message and returns ErrHelp.
-func TestHelp(t *testing.T) {
- var helpCalled = false
- fs := NewFlagSet("help test", ContinueOnError)
- fs.Usage = func() { helpCalled = true }
- var flag bool
- fs.BoolVar(&flag, "flag", false, "regular flag")
- // Regular flag invocation should work
- err := fs.Parse([]string{"--flag=true"})
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
- if !flag {
- t.Error("flag was not set by --flag")
- }
- if helpCalled {
- t.Error("help called for regular flag")
- helpCalled = false // reset for next test
- }
- // Help flag should work as expected.
- err = fs.Parse([]string{"--help"})
- if err == nil {
- t.Fatal("error expected")
- }
- if err != ErrHelp {
- t.Fatal("expected ErrHelp; got ", err)
- }
- if !helpCalled {
- t.Fatal("help was not called")
- }
- // If we define a help flag, that should override.
- var help bool
- fs.BoolVar(&help, "help", false, "help flag")
- helpCalled = false
- err = fs.Parse([]string{"--help"})
- if err != nil {
- t.Fatal("expected no error for defined --help; got ", err)
- }
- if helpCalled {
- t.Fatal("help was called; should not have been for defined help flag")
- }
-}
-
-func TestNoInterspersed(t *testing.T) {
- f := NewFlagSet("test", ContinueOnError)
- f.SetInterspersed(false)
- f.Bool("true", true, "always true")
- f.Bool("false", false, "always false")
- err := f.Parse([]string{"--true", "break", "--false"})
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
- args := f.Args()
- if len(args) != 2 || args[0] != "break" || args[1] != "--false" {
- t.Fatal("expected interspersed options/non-options to fail")
- }
-}
-
-func TestTermination(t *testing.T) {
- f := NewFlagSet("termination", ContinueOnError)
- boolFlag := f.BoolP("bool", "l", false, "bool value")
- if f.Parsed() {
- t.Error("f.Parse() = true before Parse")
- }
- arg1 := "ls"
- arg2 := "-l"
- args := []string{
- "--",
- arg1,
- arg2,
- }
- f.SetOutput(ioutil.Discard)
- if err := f.Parse(args); err != nil {
- t.Fatal("expected no error; got ", err)
- }
- if !f.Parsed() {
- t.Error("f.Parse() = false after Parse")
- }
- if *boolFlag {
- t.Error("expected boolFlag=false, got true")
- }
- if len(f.Args()) != 2 {
- t.Errorf("expected 2 arguments, got %d: %v", len(f.Args()), f.Args())
- }
- if f.Args()[0] != arg1 {
- t.Errorf("expected argument %q got %q", arg1, f.Args()[0])
- }
- if f.Args()[1] != arg2 {
- t.Errorf("expected argument %q got %q", arg2, f.Args()[1])
- }
- if f.ArgsLenAtDash() != 0 {
- t.Errorf("expected argsLenAtDash %d got %d", 0, f.ArgsLenAtDash())
- }
-}
-
-func TestDeprecatedFlagInDocs(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- f.Bool("badflag", true, "always true")
- f.MarkDeprecated("badflag", "use --good-flag instead")
-
- out := new(bytes.Buffer)
- f.SetOutput(out)
- f.PrintDefaults()
-
- if strings.Contains(out.String(), "badflag") {
- t.Errorf("found deprecated flag in usage!")
- }
-}
-
-func TestDeprecatedFlagShorthandInDocs(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- name := "noshorthandflag"
- f.BoolP(name, "n", true, "always true")
- f.MarkShorthandDeprecated("noshorthandflag", fmt.Sprintf("use --%s instead", name))
-
- out := new(bytes.Buffer)
- f.SetOutput(out)
- f.PrintDefaults()
-
- if strings.Contains(out.String(), "-n,") {
- t.Errorf("found deprecated flag shorthand in usage!")
- }
-}
-
-func parseReturnStderr(t *testing.T, f *FlagSet, args []string) (string, error) {
- oldStderr := os.Stderr
- r, w, _ := os.Pipe()
- os.Stderr = w
-
- err := f.Parse(args)
-
- outC := make(chan string)
- // copy the output in a separate goroutine so printing can't block indefinitely
- go func() {
- var buf bytes.Buffer
- io.Copy(&buf, r)
- outC <- buf.String()
- }()
-
- w.Close()
- os.Stderr = oldStderr
- out := <-outC
-
- return out, err
-}
-
-func TestDeprecatedFlagUsage(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- f.Bool("badflag", true, "always true")
- usageMsg := "use --good-flag instead"
- f.MarkDeprecated("badflag", usageMsg)
-
- args := []string{"--badflag"}
- out, err := parseReturnStderr(t, f, args)
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
-
- if !strings.Contains(out, usageMsg) {
- t.Errorf("usageMsg not printed when using a deprecated flag!")
- }
-}
-
-func TestDeprecatedFlagShorthandUsage(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- name := "noshorthandflag"
- f.BoolP(name, "n", true, "always true")
- usageMsg := fmt.Sprintf("use --%s instead", name)
- f.MarkShorthandDeprecated(name, usageMsg)
-
- args := []string{"-n"}
- out, err := parseReturnStderr(t, f, args)
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
-
- if !strings.Contains(out, usageMsg) {
- t.Errorf("usageMsg not printed when using a deprecated flag!")
- }
-}
-
-func TestDeprecatedFlagUsageNormalized(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- f.Bool("bad-double_flag", true, "always true")
- f.SetNormalizeFunc(wordSepNormalizeFunc)
- usageMsg := "use --good-flag instead"
- f.MarkDeprecated("bad_double-flag", usageMsg)
-
- args := []string{"--bad_double_flag"}
- out, err := parseReturnStderr(t, f, args)
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
-
- if !strings.Contains(out, usageMsg) {
- t.Errorf("usageMsg not printed when using a deprecated flag!")
- }
-}
-
-// Name normalization function should be called only once on flag addition
-func TestMultipleNormalizeFlagNameInvocations(t *testing.T) {
- normalizeFlagNameInvocations = 0
-
- f := NewFlagSet("normalized", ContinueOnError)
- f.SetNormalizeFunc(wordSepNormalizeFunc)
- f.Bool("with_under_flag", false, "bool value")
-
- if normalizeFlagNameInvocations != 1 {
- t.Fatal("Expected normalizeFlagNameInvocations to be 1; got ", normalizeFlagNameInvocations)
- }
-}
-
-//
-func TestHiddenFlagInUsage(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- f.Bool("secretFlag", true, "shhh")
- f.MarkHidden("secretFlag")
-
- out := new(bytes.Buffer)
- f.SetOutput(out)
- f.PrintDefaults()
-
- if strings.Contains(out.String(), "secretFlag") {
- t.Errorf("found hidden flag in usage!")
- }
-}
-
-//
-func TestHiddenFlagUsage(t *testing.T) {
- f := NewFlagSet("bob", ContinueOnError)
- f.Bool("secretFlag", true, "shhh")
- f.MarkHidden("secretFlag")
-
- args := []string{"--secretFlag"}
- out, err := parseReturnStderr(t, f, args)
- if err != nil {
- t.Fatal("expected no error; got ", err)
- }
-
- if strings.Contains(out, "shhh") {
- t.Errorf("usage message printed when using a hidden flag!")
- }
-}
-
-const defaultOutput = ` --A for bootstrapping, allow 'any' type
- --Alongflagname disable bounds checking
- -C, --CCC a boolean defaulting to true (default true)
- --D path set relative path for local imports
- -E, --EEE num[=1234] a num with NoOptDefVal (default 4321)
- --F number a non-zero number (default 2.7)
- --G float a float that defaults to zero
- --IP ip IP address with no default
- --IPMask ipMask Netmask address with no default
- --IPNet ipNet IP network with no default
- --Ints ints int slice with zero default
- --N int a non-zero int (default 27)
- --ND1 string[="bar"] a string with NoOptDefVal (default "foo")
- --ND2 num[=4321] a num with NoOptDefVal (default 1234)
- --StringArray stringArray string array with zero default
- --StringSlice strings string slice with zero default
- --Z int an int that defaults to zero
- --custom custom custom Value implementation
- --customP custom a VarP with default (default 10)
- --maxT timeout set timeout for dial
- -v, --verbose count verbosity
-`
-
-// Custom value that satisfies the Value interface.
-type customValue int
-
-func (cv *customValue) String() string { return fmt.Sprintf("%v", *cv) }
-
-func (cv *customValue) Set(s string) error {
- v, err := strconv.ParseInt(s, 0, 64)
- *cv = customValue(v)
- return err
-}
-
-func (cv *customValue) Type() string { return "custom" }
-
-func TestPrintDefaults(t *testing.T) {
- fs := NewFlagSet("print defaults test", ContinueOnError)
- var buf bytes.Buffer
- fs.SetOutput(&buf)
- fs.Bool("A", false, "for bootstrapping, allow 'any' type")
- fs.Bool("Alongflagname", false, "disable bounds checking")
- fs.BoolP("CCC", "C", true, "a boolean defaulting to true")
- fs.String("D", "", "set relative `path` for local imports")
- fs.Float64("F", 2.7, "a non-zero `number`")
- fs.Float64("G", 0, "a float that defaults to zero")
- fs.Int("N", 27, "a non-zero int")
- fs.IntSlice("Ints", []int{}, "int slice with zero default")
- fs.IP("IP", nil, "IP address with no default")
- fs.IPMask("IPMask", nil, "Netmask address with no default")
- fs.IPNet("IPNet", net.IPNet{}, "IP network with no default")
- fs.Int("Z", 0, "an int that defaults to zero")
- fs.Duration("maxT", 0, "set `timeout` for dial")
- fs.String("ND1", "foo", "a string with NoOptDefVal")
- fs.Lookup("ND1").NoOptDefVal = "bar"
- fs.Int("ND2", 1234, "a `num` with NoOptDefVal")
- fs.Lookup("ND2").NoOptDefVal = "4321"
- fs.IntP("EEE", "E", 4321, "a `num` with NoOptDefVal")
- fs.ShorthandLookup("E").NoOptDefVal = "1234"
- fs.StringSlice("StringSlice", []string{}, "string slice with zero default")
- fs.StringArray("StringArray", []string{}, "string array with zero default")
- fs.CountP("verbose", "v", "verbosity")
-
- var cv customValue
- fs.Var(&cv, "custom", "custom Value implementation")
-
- cv2 := customValue(10)
- fs.VarP(&cv2, "customP", "", "a VarP with default")
-
- fs.PrintDefaults()
- got := buf.String()
- if got != defaultOutput {
- fmt.Println("\n" + got)
- fmt.Println("\n" + defaultOutput)
- t.Errorf("got %q want %q\n", got, defaultOutput)
- }
-}
-
-func TestVisitAllFlagOrder(t *testing.T) {
- fs := NewFlagSet("TestVisitAllFlagOrder", ContinueOnError)
- fs.SortFlags = false
- // https://github.com/spf13/pflag/issues/120
- fs.SetNormalizeFunc(func(f *FlagSet, name string) NormalizedName {
- return NormalizedName(name)
- })
-
- names := []string{"C", "B", "A", "D"}
- for _, name := range names {
- fs.Bool(name, false, "")
- }
-
- i := 0
- fs.VisitAll(func(f *Flag) {
- if names[i] != f.Name {
- t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name)
- }
- i++
- })
-}
-
-func TestVisitFlagOrder(t *testing.T) {
- fs := NewFlagSet("TestVisitFlagOrder", ContinueOnError)
- fs.SortFlags = false
- names := []string{"C", "B", "A", "D"}
- for _, name := range names {
- fs.Bool(name, false, "")
- fs.Set(name, "true")
- }
-
- i := 0
- fs.Visit(func(f *Flag) {
- if names[i] != f.Name {
- t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name)
- }
- i++
- })
-}
diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go
index c4f47ebe5..d3dd72b7f 100644
--- a/vendor/github.com/spf13/pflag/golangflag.go
+++ b/vendor/github.com/spf13/pflag/golangflag.go
@@ -98,4 +98,8 @@ func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) {
newSet.VisitAll(func(goflag *goflag.Flag) {
f.AddGoFlag(goflag)
})
+ if f.addedGoFlagSets == nil {
+ f.addedGoFlagSets = make([]*goflag.FlagSet, 0)
+ }
+ f.addedGoFlagSets = append(f.addedGoFlagSets, newSet)
}
diff --git a/vendor/github.com/spf13/pflag/golangflag_test.go b/vendor/github.com/spf13/pflag/golangflag_test.go
deleted file mode 100644
index 77e2d7d80..000000000
--- a/vendor/github.com/spf13/pflag/golangflag_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- goflag "flag"
- "testing"
-)
-
-func TestGoflags(t *testing.T) {
- goflag.String("stringFlag", "stringFlag", "stringFlag")
- goflag.Bool("boolFlag", false, "boolFlag")
-
- f := NewFlagSet("test", ContinueOnError)
-
- f.AddGoFlagSet(goflag.CommandLine)
- err := f.Parse([]string{"--stringFlag=bob", "--boolFlag"})
- if err != nil {
- t.Fatal("expected no error; get", err)
- }
-
- getString, err := f.GetString("stringFlag")
- if err != nil {
- t.Fatal("expected no error; get", err)
- }
- if getString != "bob" {
- t.Fatalf("expected getString=bob but got getString=%s", getString)
- }
-
- getBool, err := f.GetBool("boolFlag")
- if err != nil {
- t.Fatal("expected no error; get", err)
- }
- if getBool != true {
- t.Fatalf("expected getBool=true but got getBool=%v", getBool)
- }
-}
diff --git a/vendor/github.com/spf13/pflag/int_slice_test.go b/vendor/github.com/spf13/pflag/int_slice_test.go
deleted file mode 100644
index 745aecb95..000000000
--- a/vendor/github.com/spf13/pflag/int_slice_test.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- "fmt"
- "strconv"
- "strings"
- "testing"
-)
-
-func setUpISFlagSet(isp *[]int) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.IntSliceVar(isp, "is", []int{}, "Command separated list!")
- return f
-}
-
-func setUpISFlagSetWithDefault(isp *[]int) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.IntSliceVar(isp, "is", []int{0, 1}, "Command separated list!")
- return f
-}
-
-func TestEmptyIS(t *testing.T) {
- var is []int
- f := setUpISFlagSet(&is)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getIS, err := f.GetIntSlice("is")
- if err != nil {
- t.Fatal("got an error from GetIntSlice():", err)
- }
- if len(getIS) != 0 {
- t.Fatalf("got is %v with len=%d but expected length=0", getIS, len(getIS))
- }
-}
-
-func TestIS(t *testing.T) {
- var is []int
- f := setUpISFlagSet(&is)
-
- vals := []string{"1", "2", "4", "3"}
- arg := fmt.Sprintf("--is=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range is {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %s but got: %d", i, vals[i], v)
- }
- }
- getIS, err := f.GetIntSlice("is")
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- for i, v := range getIS {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %s but got: %d from GetIntSlice", i, vals[i], v)
- }
- }
-}
-
-func TestISDefault(t *testing.T) {
- var is []int
- f := setUpISFlagSetWithDefault(&is)
-
- vals := []string{"0", "1"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range is {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v)
- }
- }
-
- getIS, err := f.GetIntSlice("is")
- if err != nil {
- t.Fatal("got an error from GetIntSlice():", err)
- }
- for i, v := range getIS {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatal("got an error from GetIntSlice():", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v)
- }
- }
-}
-
-func TestISWithDefault(t *testing.T) {
- var is []int
- f := setUpISFlagSetWithDefault(&is)
-
- vals := []string{"1", "2"}
- arg := fmt.Sprintf("--is=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range is {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v)
- }
- }
-
- getIS, err := f.GetIntSlice("is")
- if err != nil {
- t.Fatal("got an error from GetIntSlice():", err)
- }
- for i, v := range getIS {
- d, err := strconv.Atoi(vals[i])
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if d != v {
- t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v)
- }
- }
-}
-
-func TestISCalledTwice(t *testing.T) {
- var is []int
- f := setUpISFlagSet(&is)
-
- in := []string{"1,2", "3"}
- expected := []int{1, 2, 3}
- argfmt := "--is=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range is {
- if expected[i] != v {
- t.Fatalf("expected is[%d] to be %d but got: %d", i, expected[i], v)
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/ip_slice_test.go b/vendor/github.com/spf13/pflag/ip_slice_test.go
deleted file mode 100644
index b0c681c5b..000000000
--- a/vendor/github.com/spf13/pflag/ip_slice_test.go
+++ /dev/null
@@ -1,222 +0,0 @@
-package pflag
-
-import (
- "fmt"
- "net"
- "strings"
- "testing"
-)
-
-func setUpIPSFlagSet(ipsp *[]net.IP) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.IPSliceVar(ipsp, "ips", []net.IP{}, "Command separated list!")
- return f
-}
-
-func setUpIPSFlagSetWithDefault(ipsp *[]net.IP) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.IPSliceVar(ipsp, "ips",
- []net.IP{
- net.ParseIP("192.168.1.1"),
- net.ParseIP("0:0:0:0:0:0:0:1"),
- },
- "Command separated list!")
- return f
-}
-
-func TestEmptyIP(t *testing.T) {
- var ips []net.IP
- f := setUpIPSFlagSet(&ips)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getIPS, err := f.GetIPSlice("ips")
- if err != nil {
- t.Fatal("got an error from GetIPSlice():", err)
- }
- if len(getIPS) != 0 {
- t.Fatalf("got ips %v with len=%d but expected length=0", getIPS, len(getIPS))
- }
-}
-
-func TestIPS(t *testing.T) {
- var ips []net.IP
- f := setUpIPSFlagSet(&ips)
-
- vals := []string{"192.168.1.1", "10.0.0.1", "0:0:0:0:0:0:0:2"}
- arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ips {
- if ip := net.ParseIP(vals[i]); ip == nil {
- t.Fatalf("invalid string being converted to IP address: %s", vals[i])
- } else if !ip.Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s from GetIPSlice", i, vals[i], v)
- }
- }
-}
-
-func TestIPSDefault(t *testing.T) {
- var ips []net.IP
- f := setUpIPSFlagSetWithDefault(&ips)
-
- vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"}
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ips {
- if ip := net.ParseIP(vals[i]); ip == nil {
- t.Fatalf("invalid string being converted to IP address: %s", vals[i])
- } else if !ip.Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getIPS, err := f.GetIPSlice("ips")
- if err != nil {
- t.Fatal("got an error from GetIPSlice")
- }
- for i, v := range getIPS {
- if ip := net.ParseIP(vals[i]); ip == nil {
- t.Fatalf("invalid string being converted to IP address: %s", vals[i])
- } else if !ip.Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestIPSWithDefault(t *testing.T) {
- var ips []net.IP
- f := setUpIPSFlagSetWithDefault(&ips)
-
- vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"}
- arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ips {
- if ip := net.ParseIP(vals[i]); ip == nil {
- t.Fatalf("invalid string being converted to IP address: %s", vals[i])
- } else if !ip.Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getIPS, err := f.GetIPSlice("ips")
- if err != nil {
- t.Fatal("got an error from GetIPSlice")
- }
- for i, v := range getIPS {
- if ip := net.ParseIP(vals[i]); ip == nil {
- t.Fatalf("invalid string being converted to IP address: %s", vals[i])
- } else if !ip.Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestIPSCalledTwice(t *testing.T) {
- var ips []net.IP
- f := setUpIPSFlagSet(&ips)
-
- in := []string{"192.168.1.2,0:0:0:0:0:0:0:1", "10.0.0.1"}
- expected := []net.IP{net.ParseIP("192.168.1.2"), net.ParseIP("0:0:0:0:0:0:0:1"), net.ParseIP("10.0.0.1")}
- argfmt := "ips=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ips {
- if !expected[i].Equal(v) {
- t.Fatalf("expected ips[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
-
-func TestIPSBadQuoting(t *testing.T) {
-
- tests := []struct {
- Want []net.IP
- FlagArg []string
- }{
- {
- Want: []net.IP{
- net.ParseIP("a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568"),
- net.ParseIP("203.107.49.208"),
- net.ParseIP("14.57.204.90"),
- },
- FlagArg: []string{
- "a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568",
- "203.107.49.208",
- "14.57.204.90",
- },
- },
- {
- Want: []net.IP{
- net.ParseIP("204.228.73.195"),
- net.ParseIP("86.141.15.94"),
- },
- FlagArg: []string{
- "204.228.73.195",
- "86.141.15.94",
- },
- },
- {
- Want: []net.IP{
- net.ParseIP("c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f"),
- net.ParseIP("4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472"),
- },
- FlagArg: []string{
- "c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f",
- "4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472",
- },
- },
- {
- Want: []net.IP{
- net.ParseIP("5170:f971:cfac:7be3:512a:af37:952c:bc33"),
- net.ParseIP("93.21.145.140"),
- net.ParseIP("2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca"),
- },
- FlagArg: []string{
- " 5170:f971:cfac:7be3:512a:af37:952c:bc33 , 93.21.145.140 ",
- "2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca",
- },
- },
- {
- Want: []net.IP{
- net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"),
- net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"),
- net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"),
- net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"),
- },
- FlagArg: []string{
- `"2e5e:66b2:6441:848:5b74:76ea:574c:3a7b, 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b,2e5e:66b2:6441:848:5b74:76ea:574c:3a7b "`,
- " 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"},
- },
- }
-
- for i, test := range tests {
-
- var ips []net.IP
- f := setUpIPSFlagSet(&ips)
-
- if err := f.Parse([]string{fmt.Sprintf("--ips=%s", strings.Join(test.FlagArg, ","))}); err != nil {
- t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%s",
- err, test.FlagArg, test.Want[i])
- }
-
- for j, b := range ips {
- if !b.Equal(test.Want[j]) {
- t.Fatalf("bad value parsed for test %d on net.IP %d:\nwant:\t%s\ngot:\t%s", i, j, test.Want[j], b)
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/ip_test.go b/vendor/github.com/spf13/pflag/ip_test.go
deleted file mode 100644
index 1fec50e42..000000000
--- a/vendor/github.com/spf13/pflag/ip_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package pflag
-
-import (
- "fmt"
- "net"
- "os"
- "testing"
-)
-
-func setUpIP(ip *net.IP) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.IPVar(ip, "address", net.ParseIP("0.0.0.0"), "IP Address")
- return f
-}
-
-func TestIP(t *testing.T) {
- testCases := []struct {
- input string
- success bool
- expected string
- }{
- {"0.0.0.0", true, "0.0.0.0"},
- {" 0.0.0.0 ", true, "0.0.0.0"},
- {"1.2.3.4", true, "1.2.3.4"},
- {"127.0.0.1", true, "127.0.0.1"},
- {"255.255.255.255", true, "255.255.255.255"},
- {"", false, ""},
- {"0", false, ""},
- {"localhost", false, ""},
- {"0.0.0", false, ""},
- {"0.0.0.", false, ""},
- {"0.0.0.0.", false, ""},
- {"0.0.0.256", false, ""},
- {"0 . 0 . 0 . 0", false, ""},
- }
-
- devnull, _ := os.Open(os.DevNull)
- os.Stderr = devnull
- for i := range testCases {
- var addr net.IP
- f := setUpIP(&addr)
-
- tc := &testCases[i]
-
- arg := fmt.Sprintf("--address=%s", tc.input)
- err := f.Parse([]string{arg})
- if err != nil && tc.success == true {
- t.Errorf("expected success, got %q", err)
- continue
- } else if err == nil && tc.success == false {
- t.Errorf("expected failure")
- continue
- } else if tc.success {
- ip, err := f.GetIP("address")
- if err != nil {
- t.Errorf("Got error trying to fetch the IP flag: %v", err)
- }
- if ip.String() != tc.expected {
- t.Errorf("expected %q, got %q", tc.expected, ip.String())
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/ipnet_test.go b/vendor/github.com/spf13/pflag/ipnet_test.go
deleted file mode 100644
index 335b6fa15..000000000
--- a/vendor/github.com/spf13/pflag/ipnet_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package pflag
-
-import (
- "fmt"
- "net"
- "os"
- "testing"
-)
-
-func setUpIPNet(ip *net.IPNet) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- _, def, _ := net.ParseCIDR("0.0.0.0/0")
- f.IPNetVar(ip, "address", *def, "IP Address")
- return f
-}
-
-func TestIPNet(t *testing.T) {
- testCases := []struct {
- input string
- success bool
- expected string
- }{
- {"0.0.0.0/0", true, "0.0.0.0/0"},
- {" 0.0.0.0/0 ", true, "0.0.0.0/0"},
- {"1.2.3.4/8", true, "1.0.0.0/8"},
- {"127.0.0.1/16", true, "127.0.0.0/16"},
- {"255.255.255.255/19", true, "255.255.224.0/19"},
- {"255.255.255.255/32", true, "255.255.255.255/32"},
- {"", false, ""},
- {"/0", false, ""},
- {"0", false, ""},
- {"0/0", false, ""},
- {"localhost/0", false, ""},
- {"0.0.0/4", false, ""},
- {"0.0.0./8", false, ""},
- {"0.0.0.0./12", false, ""},
- {"0.0.0.256/16", false, ""},
- {"0.0.0.0 /20", false, ""},
- {"0.0.0.0/ 24", false, ""},
- {"0 . 0 . 0 . 0 / 28", false, ""},
- {"0.0.0.0/33", false, ""},
- }
-
- devnull, _ := os.Open(os.DevNull)
- os.Stderr = devnull
- for i := range testCases {
- var addr net.IPNet
- f := setUpIPNet(&addr)
-
- tc := &testCases[i]
-
- arg := fmt.Sprintf("--address=%s", tc.input)
- err := f.Parse([]string{arg})
- if err != nil && tc.success == true {
- t.Errorf("expected success, got %q", err)
- continue
- } else if err == nil && tc.success == false {
- t.Errorf("expected failure")
- continue
- } else if tc.success {
- ip, err := f.GetIPNet("address")
- if err != nil {
- t.Errorf("Got error trying to fetch the IP flag: %v", err)
- }
- if ip.String() != tc.expected {
- t.Errorf("expected %q, got %q", tc.expected, ip.String())
- }
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go
index 276b7ed49..fa7bc6018 100644
--- a/vendor/github.com/spf13/pflag/string_array.go
+++ b/vendor/github.com/spf13/pflag/string_array.go
@@ -52,7 +52,7 @@ func (f *FlagSet) GetStringArray(name string) ([]string, error) {
// StringArrayVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a []string variable in which to store the values of the multiple flags.
-// The value of each argument will not try to be separated by comma
+// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) {
f.VarP(newStringArrayValue(value, p), name, "", usage)
}
@@ -64,7 +64,7 @@ func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []s
// StringArrayVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a []string variable in which to store the value of the flag.
-// The value of each argument will not try to be separated by comma
+// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
func StringArrayVar(p *[]string, name string, value []string, usage string) {
CommandLine.VarP(newStringArrayValue(value, p), name, "", usage)
}
@@ -76,7 +76,7 @@ func StringArrayVarP(p *[]string, name, shorthand string, value []string, usage
// StringArray defines a string flag with specified name, default value, and usage string.
// The return value is the address of a []string variable that stores the value of the flag.
-// The value of each argument will not try to be separated by comma
+// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string {
p := []string{}
f.StringArrayVarP(&p, name, "", value, usage)
@@ -92,7 +92,7 @@ func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage str
// StringArray defines a string flag with specified name, default value, and usage string.
// The return value is the address of a []string variable that stores the value of the flag.
-// The value of each argument will not try to be separated by comma
+// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
func StringArray(name string, value []string, usage string) *[]string {
return CommandLine.StringArrayP(name, "", value, usage)
}
diff --git a/vendor/github.com/spf13/pflag/string_array_test.go b/vendor/github.com/spf13/pflag/string_array_test.go
deleted file mode 100644
index 1ceac8c6c..000000000
--- a/vendor/github.com/spf13/pflag/string_array_test.go
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- "fmt"
- "testing"
-)
-
-func setUpSAFlagSet(sap *[]string) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.StringArrayVar(sap, "sa", []string{}, "Command separated list!")
- return f
-}
-
-func setUpSAFlagSetWithDefault(sap *[]string) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.StringArrayVar(sap, "sa", []string{"default", "values"}, "Command separated list!")
- return f
-}
-
-func TestEmptySA(t *testing.T) {
- var sa []string
- f := setUpSAFlagSet(&sa)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getSA, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("got an error from GetStringArray():", err)
- }
- if len(getSA) != 0 {
- t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA))
- }
-}
-
-func TestEmptySAValue(t *testing.T) {
- var sa []string
- f := setUpSAFlagSet(&sa)
- err := f.Parse([]string{"--sa="})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getSA, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("got an error from GetStringArray():", err)
- }
- if len(getSA) != 0 {
- t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA))
- }
-}
-
-func TestSADefault(t *testing.T) {
- var sa []string
- f := setUpSAFlagSetWithDefault(&sa)
-
- vals := []string{"default", "values"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range sa {
- if vals[i] != v {
- t.Fatalf("expected sa[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getSA, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("got an error from GetStringArray():", err)
- }
- for i, v := range getSA {
- if vals[i] != v {
- t.Fatalf("expected sa[%d] to be %s from GetStringArray but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestSAWithDefault(t *testing.T) {
- var sa []string
- f := setUpSAFlagSetWithDefault(&sa)
-
- val := "one"
- arg := fmt.Sprintf("--sa=%s", val)
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(sa) != 1 {
- t.Fatalf("expected number of values to be %d but %d", 1, len(sa))
- }
-
- if sa[0] != val {
- t.Fatalf("expected value to be %s but got: %s", sa[0], val)
- }
-
- getSA, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("got an error from GetStringArray():", err)
- }
-
- if len(getSA) != 1 {
- t.Fatalf("expected number of values to be %d but %d", 1, len(getSA))
- }
-
- if getSA[0] != val {
- t.Fatalf("expected value to be %s but got: %s", getSA[0], val)
- }
-}
-
-func TestSACalledTwice(t *testing.T) {
- var sa []string
- f := setUpSAFlagSet(&sa)
-
- in := []string{"one", "two"}
- expected := []string{"one", "two"}
- argfmt := "--sa=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(sa) {
- t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa))
- }
- for i, v := range sa {
- if expected[i] != v {
- t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(sa))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
-
-func TestSAWithSpecialChar(t *testing.T) {
- var sa []string
- f := setUpSAFlagSet(&sa)
-
- in := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"}
- expected := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"}
- argfmt := "--sa=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- arg3 := fmt.Sprintf(argfmt, in[2])
- arg4 := fmt.Sprintf(argfmt, in[3])
- err := f.Parse([]string{arg1, arg2, arg3, arg4})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(sa) {
- t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa))
- }
- for i, v := range sa {
- if expected[i] != v {
- t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
-
-func TestSAWithSquareBrackets(t *testing.T) {
- var sa []string
- f := setUpSAFlagSet(&sa)
-
- in := []string{"][]-[", "[a-z]", "[a-z]+"}
- expected := []string{"][]-[", "[a-z]", "[a-z]+"}
- argfmt := "--sa=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- arg3 := fmt.Sprintf(argfmt, in[2])
- err := f.Parse([]string{arg1, arg2, arg3})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(sa) {
- t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa))
- }
- for i, v := range sa {
- if expected[i] != v {
- t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringArray("sa")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go
index 05eee7543..0cd3ccc08 100644
--- a/vendor/github.com/spf13/pflag/string_slice.go
+++ b/vendor/github.com/spf13/pflag/string_slice.go
@@ -82,6 +82,11 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) {
// StringSliceVar defines a string flag with specified name, default value, and usage string.
// 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"
+// will result in
+// []string{"v1", "v2", "v3"}
func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) {
f.VarP(newStringSliceValue(value, p), name, "", usage)
}
@@ -93,6 +98,11 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s
// StringSliceVar defines a string flag with specified name, default value, and usage string.
// 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"
+// will result in
+// []string{"v1", "v2", "v3"}
func StringSliceVar(p *[]string, name string, value []string, usage string) {
CommandLine.VarP(newStringSliceValue(value, p), name, "", usage)
}
@@ -104,6 +114,11 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage
// StringSlice defines a string flag with specified name, default value, and usage string.
// 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"
+// will result in
+// []string{"v1", "v2", "v3"}
func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string {
p := []string{}
f.StringSliceVarP(&p, name, "", value, usage)
@@ -119,6 +134,11 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str
// StringSlice defines a string flag with specified name, default value, and usage string.
// 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"
+// will result in
+// []string{"v1", "v2", "v3"}
func StringSlice(name string, value []string, usage string) *[]string {
return CommandLine.StringSliceP(name, "", value, usage)
}
diff --git a/vendor/github.com/spf13/pflag/string_slice_test.go b/vendor/github.com/spf13/pflag/string_slice_test.go
deleted file mode 100644
index c41f3bd66..000000000
--- a/vendor/github.com/spf13/pflag/string_slice_test.go
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright 2009 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 file.
-
-package pflag
-
-import (
- "fmt"
- "strings"
- "testing"
-)
-
-func setUpSSFlagSet(ssp *[]string) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.StringSliceVar(ssp, "ss", []string{}, "Command separated list!")
- return f
-}
-
-func setUpSSFlagSetWithDefault(ssp *[]string) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.StringSliceVar(ssp, "ss", []string{"default", "values"}, "Command separated list!")
- return f
-}
-
-func TestEmptySS(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getSS, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("got an error from GetStringSlice():", err)
- }
- if len(getSS) != 0 {
- t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS))
- }
-}
-
-func TestEmptySSValue(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
- err := f.Parse([]string{"--ss="})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getSS, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("got an error from GetStringSlice():", err)
- }
- if len(getSS) != 0 {
- t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS))
- }
-}
-
-func TestSS(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
-
- vals := []string{"one", "two", "4", "3"}
- arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ss {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getSS, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("got an error from GetStringSlice():", err)
- }
- for i, v := range getSS {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestSSDefault(t *testing.T) {
- var ss []string
- f := setUpSSFlagSetWithDefault(&ss)
-
- vals := []string{"default", "values"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ss {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getSS, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("got an error from GetStringSlice():", err)
- }
- for i, v := range getSS {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestSSWithDefault(t *testing.T) {
- var ss []string
- f := setUpSSFlagSetWithDefault(&ss)
-
- vals := []string{"one", "two", "4", "3"}
- arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range ss {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v)
- }
- }
-
- getSS, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("got an error from GetStringSlice():", err)
- }
- for i, v := range getSS {
- if vals[i] != v {
- t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v)
- }
- }
-}
-
-func TestSSCalledTwice(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
-
- in := []string{"one,two", "three"}
- expected := []string{"one", "two", "three"}
- argfmt := "--ss=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(ss) {
- t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss))
- }
- for i, v := range ss {
- if expected[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(ss))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
-
-func TestSSWithComma(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
-
- in := []string{`"one,two"`, `"three"`, `"four,five",six`}
- expected := []string{"one,two", "three", "four,five", "six"}
- argfmt := "--ss=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- arg3 := fmt.Sprintf(argfmt, in[2])
- err := f.Parse([]string{arg1, arg2, arg3})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(ss) {
- t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss))
- }
- for i, v := range ss {
- if expected[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
-
-func TestSSWithSquareBrackets(t *testing.T) {
- var ss []string
- f := setUpSSFlagSet(&ss)
-
- in := []string{`"[a-z]"`, `"[a-z]+"`}
- expected := []string{"[a-z]", "[a-z]+"}
- argfmt := "--ss=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(ss) {
- t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss))
- }
- for i, v := range ss {
- if expected[i] != v {
- t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-
- values, err := f.GetStringSlice("ss")
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- if len(expected) != len(values) {
- t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values))
- }
- for i, v := range values {
- if expected[i] != v {
- t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v)
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/uint_slice_test.go b/vendor/github.com/spf13/pflag/uint_slice_test.go
deleted file mode 100644
index db1a19dc2..000000000
--- a/vendor/github.com/spf13/pflag/uint_slice_test.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package pflag
-
-import (
- "fmt"
- "strconv"
- "strings"
- "testing"
-)
-
-func setUpUISFlagSet(uisp *[]uint) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.UintSliceVar(uisp, "uis", []uint{}, "Command separated list!")
- return f
-}
-
-func setUpUISFlagSetWithDefault(uisp *[]uint) *FlagSet {
- f := NewFlagSet("test", ContinueOnError)
- f.UintSliceVar(uisp, "uis", []uint{0, 1}, "Command separated list!")
- return f
-}
-
-func TestEmptyUIS(t *testing.T) {
- var uis []uint
- f := setUpUISFlagSet(&uis)
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
-
- getUIS, err := f.GetUintSlice("uis")
- if err != nil {
- t.Fatal("got an error from GetUintSlice():", err)
- }
- if len(getUIS) != 0 {
- t.Fatalf("got is %v with len=%d but expected length=0", getUIS, len(getUIS))
- }
-}
-
-func TestUIS(t *testing.T) {
- var uis []uint
- f := setUpUISFlagSet(&uis)
-
- vals := []string{"1", "2", "4", "3"}
- arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range uis {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if uint(u) != v {
- t.Fatalf("expected uis[%d] to be %s but got %d", i, vals[i], v)
- }
- }
- getUIS, err := f.GetUintSlice("uis")
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- for i, v := range getUIS {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if uint(u) != v {
- t.Fatalf("expected uis[%d] to be %s but got: %d from GetUintSlice", i, vals[i], v)
- }
- }
-}
-
-func TestUISDefault(t *testing.T) {
- var uis []uint
- f := setUpUISFlagSetWithDefault(&uis)
-
- vals := []string{"0", "1"}
-
- err := f.Parse([]string{})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range uis {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if uint(u) != v {
- t.Fatalf("expect uis[%d] to be %d but got: %d", i, u, v)
- }
- }
-
- getUIS, err := f.GetUintSlice("uis")
- if err != nil {
- t.Fatal("got an error from GetUintSlice():", err)
- }
- for i, v := range getUIS {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatal("got an error from GetIntSlice():", err)
- }
- if uint(u) != v {
- t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v)
- }
- }
-}
-
-func TestUISWithDefault(t *testing.T) {
- var uis []uint
- f := setUpUISFlagSetWithDefault(&uis)
-
- vals := []string{"1", "2"}
- arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ","))
- err := f.Parse([]string{arg})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range uis {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if uint(u) != v {
- t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v)
- }
- }
-
- getUIS, err := f.GetUintSlice("uis")
- if err != nil {
- t.Fatal("got an error from GetUintSlice():", err)
- }
- for i, v := range getUIS {
- u, err := strconv.ParseUint(vals[i], 10, 0)
- if err != nil {
- t.Fatalf("got error: %v", err)
- }
- if uint(u) != v {
- t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v)
- }
- }
-}
-
-func TestUISCalledTwice(t *testing.T) {
- var uis []uint
- f := setUpUISFlagSet(&uis)
-
- in := []string{"1,2", "3"}
- expected := []int{1, 2, 3}
- argfmt := "--uis=%s"
- arg1 := fmt.Sprintf(argfmt, in[0])
- arg2 := fmt.Sprintf(argfmt, in[1])
- err := f.Parse([]string{arg1, arg2})
- if err != nil {
- t.Fatal("expected no error; got", err)
- }
- for i, v := range uis {
- if uint(expected[i]) != v {
- t.Fatalf("expected uis[%d] to be %d but got: %d", i, expected[i], v)
- }
- }
-}
diff --git a/vendor/github.com/spf13/pflag/verify/all.sh b/vendor/github.com/spf13/pflag/verify/all.sh
deleted file mode 100755
index 739f89c0b..000000000
--- a/vendor/github.com/spf13/pflag/verify/all.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-ROOT=$(dirname "${BASH_SOURCE}")/..
-
-# Some useful colors.
-if [[ -z "${color_start-}" ]]; then
- declare -r color_start="\033["
- declare -r color_red="${color_start}0;31m"
- declare -r color_yellow="${color_start}0;33m"
- declare -r color_green="${color_start}0;32m"
- declare -r color_norm="${color_start}0m"
-fi
-
-SILENT=true
-
-function is-excluded {
- for e in $EXCLUDE; do
- if [[ $1 -ef ${BASH_SOURCE} ]]; then
- return
- fi
- if [[ $1 -ef "$ROOT/hack/$e" ]]; then
- return
- fi
- done
- return 1
-}
-
-while getopts ":v" opt; do
- case $opt in
- v)
- SILENT=false
- ;;
- \?)
- echo "Invalid flag: -$OPTARG" >&2
- exit 1
- ;;
- esac
-done
-
-if $SILENT ; then
- echo "Running in the silent mode, run with -v if you want to see script logs."
-fi
-
-EXCLUDE="all.sh"
-
-ret=0
-for t in `ls $ROOT/verify/*.sh`
-do
- if is-excluded $t ; then
- echo "Skipping $t"
- continue
- fi
- if $SILENT ; then
- echo -e "Verifying $t"
- if bash "$t" &> /dev/null; then
- echo -e "${color_green}SUCCESS${color_norm}"
- else
- echo -e "${color_red}FAILED${color_norm}"
- ret=1
- fi
- else
- bash "$t" || ret=1
- fi
-done
-exit $ret
diff --git a/vendor/github.com/spf13/pflag/verify/gofmt.sh b/vendor/github.com/spf13/pflag/verify/gofmt.sh
deleted file mode 100755
index f66acf803..000000000
--- a/vendor/github.com/spf13/pflag/verify/gofmt.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-ROOT=$(dirname "${BASH_SOURCE}")/..
-
-pushd "${ROOT}" > /dev/null
-
-GOFMT=${GOFMT:-"gofmt"}
-bad_files=$(find . -name '*.go' | xargs $GOFMT -s -l)
-if [[ -n "${bad_files}" ]]; then
- echo "!!! '$GOFMT' needs to be run on the following files: "
- echo "${bad_files}"
- exit 1
-fi
-
-# ex: ts=2 sw=2 et filetype=sh
diff --git a/vendor/github.com/spf13/pflag/verify/golint.sh b/vendor/github.com/spf13/pflag/verify/golint.sh
deleted file mode 100755
index 685c1778e..000000000
--- a/vendor/github.com/spf13/pflag/verify/golint.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-ROOT=$(dirname "${BASH_SOURCE}")/..
-GOLINT=${GOLINT:-"golint"}
-
-pushd "${ROOT}" > /dev/null
- bad_files=$($GOLINT -min_confidence=0.9 ./...)
- if [[ -n "${bad_files}" ]]; then
- echo "!!! '$GOLINT' problems: "
- echo "${bad_files}"
- exit 1
- fi
-popd > /dev/null
-
-# ex: ts=2 sw=2 et filetype=sh
diff --git a/vendor/github.com/spf13/viper/flags_test.go b/vendor/github.com/spf13/viper/flags_test.go
deleted file mode 100644
index 0b976b605..000000000
--- a/vendor/github.com/spf13/viper/flags_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package viper
-
-import (
- "testing"
-
- "github.com/spf13/pflag"
- "github.com/stretchr/testify/assert"
-)
-
-func TestBindFlagValueSet(t *testing.T) {
- flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
-
- var testValues = map[string]*string{
- "host": nil,
- "port": nil,
- "endpoint": nil,
- }
-
- var mutatedTestValues = map[string]string{
- "host": "localhost",
- "port": "6060",
- "endpoint": "/public",
- }
-
- for name := range testValues {
- testValues[name] = flagSet.String(name, "", "test")
- }
-
- flagValueSet := pflagValueSet{flagSet}
-
- err := BindFlagValues(flagValueSet)
- if err != nil {
- t.Fatalf("error binding flag set, %v", err)
- }
-
- flagSet.VisitAll(func(flag *pflag.Flag) {
- flag.Value.Set(mutatedTestValues[flag.Name])
- flag.Changed = true
- })
-
- for name, expected := range mutatedTestValues {
- assert.Equal(t, Get(name), expected)
- }
-}
-
-func TestBindFlagValue(t *testing.T) {
- var testString = "testing"
- var testValue = newStringValue(testString, &testString)
-
- flag := &pflag.Flag{
- Name: "testflag",
- Value: testValue,
- Changed: false,
- }
-
- flagValue := pflagValue{flag}
- BindFlagValue("testvalue", flagValue)
-
- assert.Equal(t, testString, Get("testvalue"))
-
- flag.Value.Set("testing_mutate")
- flag.Changed = true //hack for pflag usage
-
- assert.Equal(t, "testing_mutate", Get("testvalue"))
-}
diff --git a/vendor/github.com/spf13/viper/overrides_test.go b/vendor/github.com/spf13/viper/overrides_test.go
deleted file mode 100644
index dd2aa9b0d..000000000
--- a/vendor/github.com/spf13/viper/overrides_test.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package viper
-
-import (
- "fmt"
- "strings"
- "testing"
-
- "github.com/spf13/cast"
- "github.com/stretchr/testify/assert"
-)
-
-type layer int
-
-const (
- defaultLayer layer = iota + 1
- overrideLayer
-)
-
-func TestNestedOverrides(t *testing.T) {
- assert := assert.New(t)
- var v *Viper
-
- // Case 0: value overridden by a value
- overrideDefault(assert, "tom", 10, "tom", 20) // "tom" is first given 10 as default value, then overridden by 20
- override(assert, "tom", 10, "tom", 20) // "tom" is first given value 10, then overridden by 20
- overrideDefault(assert, "tom.age", 10, "tom.age", 20)
- override(assert, "tom.age", 10, "tom.age", 20)
- overrideDefault(assert, "sawyer.tom.age", 10, "sawyer.tom.age", 20)
- override(assert, "sawyer.tom.age", 10, "sawyer.tom.age", 20)
-
- // Case 1: key:value overridden by a value
- v = overrideDefault(assert, "tom.age", 10, "tom", "boy") // "tom.age" is first given 10 as default value, then "tom" is overridden by "boy"
- assert.Nil(v.Get("tom.age")) // "tom.age" should not exist anymore
- v = override(assert, "tom.age", 10, "tom", "boy")
- assert.Nil(v.Get("tom.age"))
-
- // Case 2: value overridden by a key:value
- overrideDefault(assert, "tom", "boy", "tom.age", 10) // "tom" is first given "boy" as default value, then "tom" is overridden by map{"age":10}
- override(assert, "tom.age", 10, "tom", "boy")
-
- // Case 3: key:value overridden by a key:value
- v = overrideDefault(assert, "tom.size", 4, "tom.age", 10)
- assert.Equal(4, v.Get("tom.size")) // value should still be reachable
- v = override(assert, "tom.size", 4, "tom.age", 10)
- assert.Equal(4, v.Get("tom.size"))
- deepCheckValue(assert, v, overrideLayer, []string{"tom", "size"}, 4)
-
- // Case 4: key:value overridden by a map
- v = overrideDefault(assert, "tom.size", 4, "tom", map[string]interface{}{"age": 10}) // "tom.size" is first given "4" as default value, then "tom" is overridden by map{"age":10}
- assert.Equal(4, v.Get("tom.size")) // "tom.size" should still be reachable
- assert.Equal(10, v.Get("tom.age")) // new value should be there
- deepCheckValue(assert, v, overrideLayer, []string{"tom", "age"}, 10) // new value should be there
- v = override(assert, "tom.size", 4, "tom", map[string]interface{}{"age": 10})
- assert.Nil(v.Get("tom.size"))
- assert.Equal(10, v.Get("tom.age"))
- deepCheckValue(assert, v, overrideLayer, []string{"tom", "age"}, 10)
-
- // Case 5: array overridden by a value
- overrideDefault(assert, "tom", []int{10, 20}, "tom", 30)
- override(assert, "tom", []int{10, 20}, "tom", 30)
- overrideDefault(assert, "tom.age", []int{10, 20}, "tom.age", 30)
- override(assert, "tom.age", []int{10, 20}, "tom.age", 30)
-
- // Case 6: array overridden by an array
- overrideDefault(assert, "tom", []int{10, 20}, "tom", []int{30, 40})
- override(assert, "tom", []int{10, 20}, "tom", []int{30, 40})
- overrideDefault(assert, "tom.age", []int{10, 20}, "tom.age", []int{30, 40})
- v = override(assert, "tom.age", []int{10, 20}, "tom.age", []int{30, 40})
- // explicit array merge:
- s, ok := v.Get("tom.age").([]int)
- if assert.True(ok, "tom[\"age\"] is not a slice") {
- v.Set("tom.age", append(s, []int{50, 60}...))
- assert.Equal([]int{30, 40, 50, 60}, v.Get("tom.age"))
- deepCheckValue(assert, v, overrideLayer, []string{"tom", "age"}, []int{30, 40, 50, 60})
- }
-}
-
-func overrideDefault(assert *assert.Assertions, firstPath string, firstValue interface{}, secondPath string, secondValue interface{}) *Viper {
- return overrideFromLayer(defaultLayer, assert, firstPath, firstValue, secondPath, secondValue)
-}
-func override(assert *assert.Assertions, firstPath string, firstValue interface{}, secondPath string, secondValue interface{}) *Viper {
- return overrideFromLayer(overrideLayer, assert, firstPath, firstValue, secondPath, secondValue)
-}
-
-// overrideFromLayer performs the sequential override and low-level checks.
-//
-// First assignment is made on layer l for path firstPath with value firstValue,
-// the second one on the override layer (i.e., with the Set() function)
-// for path secondPath with value secondValue.
-//
-// firstPath and secondPath can include an arbitrary number of dots to indicate
-// a nested element.
-//
-// After each assignment, the value is checked, retrieved both by its full path
-// and by its key sequence (successive maps).
-func overrideFromLayer(l layer, assert *assert.Assertions, firstPath string, firstValue interface{}, secondPath string, secondValue interface{}) *Viper {
- v := New()
- firstKeys := strings.Split(firstPath, v.keyDelim)
- if assert == nil ||
- len(firstKeys) == 0 || len(firstKeys[0]) == 0 {
- return v
- }
-
- // Set and check first value
- switch l {
- case defaultLayer:
- v.SetDefault(firstPath, firstValue)
- case overrideLayer:
- v.Set(firstPath, firstValue)
- default:
- return v
- }
- assert.Equal(firstValue, v.Get(firstPath))
- deepCheckValue(assert, v, l, firstKeys, firstValue)
-
- // Override and check new value
- secondKeys := strings.Split(secondPath, v.keyDelim)
- if len(secondKeys) == 0 || len(secondKeys[0]) == 0 {
- return v
- }
- v.Set(secondPath, secondValue)
- assert.Equal(secondValue, v.Get(secondPath))
- deepCheckValue(assert, v, overrideLayer, secondKeys, secondValue)
-
- return v
-}
-
-// deepCheckValue checks that all given keys correspond to a valid path in the
-// configuration map of the given layer, and that the final value equals the one given
-func deepCheckValue(assert *assert.Assertions, v *Viper, l layer, keys []string, value interface{}) {
- if assert == nil || v == nil ||
- len(keys) == 0 || len(keys[0]) == 0 {
- return
- }
-
- // init
- var val interface{}
- var ms string
- switch l {
- case defaultLayer:
- val = v.defaults
- ms = "v.defaults"
- case overrideLayer:
- val = v.override
- ms = "v.override"
- }
-
- // loop through map
- var m map[string]interface{}
- err := false
- for _, k := range keys {
- if val == nil {
- assert.Fail(fmt.Sprintf("%s is not a map[string]interface{}", ms))
- return
- }
-
- // deep scan of the map to get the final value
- switch val.(type) {
- case map[interface{}]interface{}:
- m = cast.ToStringMap(val)
- case map[string]interface{}:
- m = val.(map[string]interface{})
- default:
- assert.Fail(fmt.Sprintf("%s is not a map[string]interface{}", ms))
- return
- }
- ms = ms + "[\"" + k + "\"]"
- val = m[k]
- }
- if !err {
- assert.Equal(value, val)
- }
-}
diff --git a/vendor/github.com/spf13/viper/remote/remote.go b/vendor/github.com/spf13/viper/remote/remote.go
deleted file mode 100644
index 810d0702e..000000000
--- a/vendor/github.com/spf13/viper/remote/remote.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-// Package remote integrates the remote features of Viper.
-package remote
-
-import (
- "bytes"
- "io"
- "os"
-
- "github.com/spf13/viper"
- crypt "github.com/xordataexchange/crypt/config"
-)
-
-type remoteConfigProvider struct{}
-
-func (rc remoteConfigProvider) Get(rp viper.RemoteProvider) (io.Reader, error) {
- cm, err := getConfigManager(rp)
- if err != nil {
- return nil, err
- }
- b, err := cm.Get(rp.Path())
- if err != nil {
- return nil, err
- }
- return bytes.NewReader(b), nil
-}
-
-func (rc remoteConfigProvider) Watch(rp viper.RemoteProvider) (io.Reader, error) {
- cm, err := getConfigManager(rp)
- if err != nil {
- return nil, err
- }
- resp, err := cm.Get(rp.Path())
- if err != nil {
- return nil, err
- }
-
- return bytes.NewReader(resp), nil
-}
-
-func (rc remoteConfigProvider) WatchChannel(rp viper.RemoteProvider) (<-chan *viper.RemoteResponse, chan bool) {
- cm, err := getConfigManager(rp)
- if err != nil {
- return nil, nil
- }
- quit := make(chan bool)
- quitwc := make(chan bool)
- viperResponsCh := make(chan *viper.RemoteResponse)
- cryptoResponseCh := cm.Watch(rp.Path(), quit)
- // need this function to convert the Channel response form crypt.Response to viper.Response
- go func(cr <-chan *crypt.Response, vr chan<- *viper.RemoteResponse, quitwc <-chan bool, quit chan<- bool) {
- for {
- select {
- case <-quitwc:
- quit <- true
- return
- case resp := <-cr:
- vr <- &viper.RemoteResponse{
- Error: resp.Error,
- Value: resp.Value,
- }
-
- }
-
- }
- }(cryptoResponseCh, viperResponsCh, quitwc, quit)
-
- return viperResponsCh, quitwc
-}
-
-func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
- var cm crypt.ConfigManager
- var err error
-
- if rp.SecretKeyring() != "" {
- kr, err := os.Open(rp.SecretKeyring())
- defer kr.Close()
- if err != nil {
- return nil, err
- }
- if rp.Provider() == "etcd" {
- cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
- } else {
- cm, err = crypt.NewConsulConfigManager([]string{rp.Endpoint()}, kr)
- }
- } else {
- if rp.Provider() == "etcd" {
- cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()})
- } else {
- cm, err = crypt.NewStandardConsulConfigManager([]string{rp.Endpoint()})
- }
- }
- if err != nil {
- return nil, err
- }
- return cm, nil
-}
-
-func init() {
- viper.RemoteConfig = &remoteConfigProvider{}
-}
diff --git a/vendor/github.com/spf13/viper/util_test.go b/vendor/github.com/spf13/viper/util_test.go
deleted file mode 100644
index 0af80bb63..000000000
--- a/vendor/github.com/spf13/viper/util_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright © 2016 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-// Viper is a application configuration system.
-// It believes that applications can be configured a variety of ways
-// via flags, ENVIRONMENT variables, configuration files retrieved
-// from the file system, or a remote key/value store.
-
-package viper
-
-import (
- "reflect"
- "testing"
-)
-
-func TestCopyAndInsensitiviseMap(t *testing.T) {
- var (
- given = map[string]interface{}{
- "Foo": 32,
- "Bar": map[interface{}]interface {
- }{
- "ABc": "A",
- "cDE": "B"},
- }
- expected = map[string]interface{}{
- "foo": 32,
- "bar": map[string]interface {
- }{
- "abc": "A",
- "cde": "B"},
- }
- )
-
- got := copyAndInsensitiviseMap(given)
-
- if !reflect.DeepEqual(got, expected) {
- t.Fatalf("Got %q\nexpected\n%q", got, expected)
- }
-
- if _, ok := given["foo"]; ok {
- t.Fatal("Input map changed")
- }
-
- if _, ok := given["bar"]; ok {
- t.Fatal("Input map changed")
- }
-
- m := given["Bar"].(map[interface{}]interface{})
- if _, ok := m["ABc"]; !ok {
- t.Fatal("Input map changed")
- }
-}
diff --git a/vendor/github.com/spf13/viper/viper_test.go b/vendor/github.com/spf13/viper/viper_test.go
deleted file mode 100644
index c93480eab..000000000
--- a/vendor/github.com/spf13/viper/viper_test.go
+++ /dev/null
@@ -1,1406 +0,0 @@
-// Copyright © 2014 Steve Francia <spf@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package viper
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path"
- "reflect"
- "sort"
- "strings"
- "testing"
- "time"
-
- "github.com/spf13/afero"
- "github.com/spf13/cast"
-
- "github.com/spf13/pflag"
- "github.com/stretchr/testify/assert"
-)
-
-var yamlExample = []byte(`Hacker: true
-name: steve
-hobbies:
-- skateboarding
-- snowboarding
-- go
-clothing:
- jacket: leather
- trousers: denim
- pants:
- size: large
-age: 35
-eyes : brown
-beard: true
-`)
-
-var yamlExampleWithExtras = []byte(`Existing: true
-Bogus: true
-`)
-
-type testUnmarshalExtra struct {
- Existing bool
-}
-
-var tomlExample = []byte(`
-title = "TOML Example"
-
-[owner]
-organization = "MongoDB"
-Bio = "MongoDB Chief Developer Advocate & Hacker at Large"
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?`)
-
-var jsonExample = []byte(`{
-"id": "0001",
-"type": "donut",
-"name": "Cake",
-"ppu": 0.55,
-"batters": {
- "batter": [
- { "type": "Regular" },
- { "type": "Chocolate" },
- { "type": "Blueberry" },
- { "type": "Devil's Food" }
- ]
- }
-}`)
-
-var hclExample = []byte(`
-id = "0001"
-type = "donut"
-name = "Cake"
-ppu = 0.55
-foos {
- foo {
- key = 1
- }
- foo {
- key = 2
- }
- foo {
- key = 3
- }
- foo {
- key = 4
- }
-}`)
-
-var propertiesExample = []byte(`
-p_id: 0001
-p_type: donut
-p_name: Cake
-p_ppu: 0.55
-p_batters.batter.type: Regular
-`)
-
-var remoteExample = []byte(`{
-"id":"0002",
-"type":"cronut",
-"newkey":"remote"
-}`)
-
-func initConfigs() {
- Reset()
- var r io.Reader
- SetConfigType("yaml")
- r = bytes.NewReader(yamlExample)
- unmarshalReader(r, v.config)
-
- SetConfigType("json")
- r = bytes.NewReader(jsonExample)
- unmarshalReader(r, v.config)
-
- SetConfigType("hcl")
- r = bytes.NewReader(hclExample)
- unmarshalReader(r, v.config)
-
- SetConfigType("properties")
- r = bytes.NewReader(propertiesExample)
- unmarshalReader(r, v.config)
-
- SetConfigType("toml")
- r = bytes.NewReader(tomlExample)
- unmarshalReader(r, v.config)
-
- SetConfigType("json")
- remote := bytes.NewReader(remoteExample)
- unmarshalReader(remote, v.kvstore)
-}
-
-func initConfig(typ, config string) {
- Reset()
- SetConfigType(typ)
- r := strings.NewReader(config)
-
- if err := unmarshalReader(r, v.config); err != nil {
- panic(err)
- }
-}
-
-func initYAML() {
- initConfig("yaml", string(yamlExample))
-}
-
-func initJSON() {
- Reset()
- SetConfigType("json")
- r := bytes.NewReader(jsonExample)
-
- unmarshalReader(r, v.config)
-}
-
-func initProperties() {
- Reset()
- SetConfigType("properties")
- r := bytes.NewReader(propertiesExample)
-
- unmarshalReader(r, v.config)
-}
-
-func initTOML() {
- Reset()
- SetConfigType("toml")
- r := bytes.NewReader(tomlExample)
-
- unmarshalReader(r, v.config)
-}
-
-func initHcl() {
- Reset()
- SetConfigType("hcl")
- r := bytes.NewReader(hclExample)
-
- unmarshalReader(r, v.config)
-}
-
-// make directories for testing
-func initDirs(t *testing.T) (string, string, func()) {
-
- var (
- testDirs = []string{`a a`, `b`, `c\c`, `D_`}
- config = `improbable`
- )
-
- root, err := ioutil.TempDir("", "")
-
- cleanup := true
- defer func() {
- if cleanup {
- os.Chdir("..")
- os.RemoveAll(root)
- }
- }()
-
- assert.Nil(t, err)
-
- err = os.Chdir(root)
- assert.Nil(t, err)
-
- for _, dir := range testDirs {
- err = os.Mkdir(dir, 0750)
- assert.Nil(t, err)
-
- err = ioutil.WriteFile(
- path.Join(dir, config+".toml"),
- []byte("key = \"value is "+dir+"\"\n"),
- 0640)
- assert.Nil(t, err)
- }
-
- cleanup = false
- return root, config, func() {
- os.Chdir("..")
- os.RemoveAll(root)
- }
-}
-
-//stubs for PFlag Values
-type stringValue string
-
-func newStringValue(val string, p *string) *stringValue {
- *p = val
- return (*stringValue)(p)
-}
-
-func (s *stringValue) Set(val string) error {
- *s = stringValue(val)
- return nil
-}
-
-func (s *stringValue) Type() string {
- return "string"
-}
-
-func (s *stringValue) String() string {
- return fmt.Sprintf("%s", *s)
-}
-
-func TestBasics(t *testing.T) {
- SetConfigFile("/tmp/config.yaml")
- filename, err := v.getConfigFile()
- assert.Equal(t, "/tmp/config.yaml", filename)
- assert.NoError(t, err)
-}
-
-func TestDefault(t *testing.T) {
- SetDefault("age", 45)
- assert.Equal(t, 45, Get("age"))
-
- SetDefault("clothing.jacket", "slacks")
- assert.Equal(t, "slacks", Get("clothing.jacket"))
-
- SetConfigType("yaml")
- err := ReadConfig(bytes.NewBuffer(yamlExample))
-
- assert.NoError(t, err)
- assert.Equal(t, "leather", Get("clothing.jacket"))
-}
-
-func TestUnmarshaling(t *testing.T) {
- SetConfigType("yaml")
- r := bytes.NewReader(yamlExample)
-
- unmarshalReader(r, v.config)
- assert.True(t, InConfig("name"))
- assert.False(t, InConfig("state"))
- assert.Equal(t, "steve", Get("name"))
- assert.Equal(t, []interface{}{"skateboarding", "snowboarding", "go"}, Get("hobbies"))
- assert.Equal(t, map[string]interface{}{"jacket": "leather", "trousers": "denim", "pants": map[string]interface{}{"size": "large"}}, Get("clothing"))
- assert.Equal(t, 35, Get("age"))
-}
-
-func TestUnmarshalExact(t *testing.T) {
- vip := New()
- target := &testUnmarshalExtra{}
- vip.SetConfigType("yaml")
- r := bytes.NewReader(yamlExampleWithExtras)
- vip.ReadConfig(r)
- err := vip.UnmarshalExact(target)
- if err == nil {
- t.Fatal("UnmarshalExact should error when populating a struct from a conf that contains unused fields")
- }
-}
-
-func TestOverrides(t *testing.T) {
- Set("age", 40)
- assert.Equal(t, 40, Get("age"))
-}
-
-func TestDefaultPost(t *testing.T) {
- assert.NotEqual(t, "NYC", Get("state"))
- SetDefault("state", "NYC")
- assert.Equal(t, "NYC", Get("state"))
-}
-
-func TestAliases(t *testing.T) {
- RegisterAlias("years", "age")
- assert.Equal(t, 40, Get("years"))
- Set("years", 45)
- assert.Equal(t, 45, Get("age"))
-}
-
-func TestAliasInConfigFile(t *testing.T) {
- // the config file specifies "beard". If we make this an alias for
- // "hasbeard", we still want the old config file to work with beard.
- RegisterAlias("beard", "hasbeard")
- assert.Equal(t, true, Get("hasbeard"))
- Set("hasbeard", false)
- assert.Equal(t, false, Get("beard"))
-}
-
-func TestYML(t *testing.T) {
- initYAML()
- assert.Equal(t, "steve", Get("name"))
-}
-
-func TestJSON(t *testing.T) {
- initJSON()
- assert.Equal(t, "0001", Get("id"))
-}
-
-func TestProperties(t *testing.T) {
- initProperties()
- assert.Equal(t, "0001", Get("p_id"))
-}
-
-func TestTOML(t *testing.T) {
- initTOML()
- assert.Equal(t, "TOML Example", Get("title"))
-}
-
-func TestHCL(t *testing.T) {
- initHcl()
- assert.Equal(t, "0001", Get("id"))
- assert.Equal(t, 0.55, Get("ppu"))
- assert.Equal(t, "donut", Get("type"))
- assert.Equal(t, "Cake", Get("name"))
- Set("id", "0002")
- assert.Equal(t, "0002", Get("id"))
- assert.NotEqual(t, "cronut", Get("type"))
-}
-
-func TestRemotePrecedence(t *testing.T) {
- initJSON()
-
- remote := bytes.NewReader(remoteExample)
- assert.Equal(t, "0001", Get("id"))
- unmarshalReader(remote, v.kvstore)
- assert.Equal(t, "0001", Get("id"))
- assert.NotEqual(t, "cronut", Get("type"))
- assert.Equal(t, "remote", Get("newkey"))
- Set("newkey", "newvalue")
- assert.NotEqual(t, "remote", Get("newkey"))
- assert.Equal(t, "newvalue", Get("newkey"))
- Set("newkey", "remote")
-}
-
-func TestEnv(t *testing.T) {
- initJSON()
-
- BindEnv("id")
- BindEnv("f", "FOOD")
-
- os.Setenv("ID", "13")
- os.Setenv("FOOD", "apple")
- os.Setenv("NAME", "crunk")
-
- assert.Equal(t, "13", Get("id"))
- assert.Equal(t, "apple", Get("f"))
- assert.Equal(t, "Cake", Get("name"))
-
- AutomaticEnv()
-
- assert.Equal(t, "crunk", Get("name"))
-
-}
-
-func TestEnvPrefix(t *testing.T) {
- initJSON()
-
- SetEnvPrefix("foo") // will be uppercased automatically
- BindEnv("id")
- BindEnv("f", "FOOD") // not using prefix
-
- os.Setenv("FOO_ID", "13")
- os.Setenv("FOOD", "apple")
- os.Setenv("FOO_NAME", "crunk")
-
- assert.Equal(t, "13", Get("id"))
- assert.Equal(t, "apple", Get("f"))
- assert.Equal(t, "Cake", Get("name"))
-
- AutomaticEnv()
-
- assert.Equal(t, "crunk", Get("name"))
-}
-
-func TestAutoEnv(t *testing.T) {
- Reset()
-
- AutomaticEnv()
- os.Setenv("FOO_BAR", "13")
- assert.Equal(t, "13", Get("foo_bar"))
-}
-
-func TestAutoEnvWithPrefix(t *testing.T) {
- Reset()
-
- AutomaticEnv()
- SetEnvPrefix("Baz")
- os.Setenv("BAZ_BAR", "13")
- assert.Equal(t, "13", Get("bar"))
-}
-
-func TestSetEnvKeyReplacer(t *testing.T) {
- Reset()
-
- AutomaticEnv()
- os.Setenv("REFRESH_INTERVAL", "30s")
-
- replacer := strings.NewReplacer("-", "_")
- SetEnvKeyReplacer(replacer)
-
- assert.Equal(t, "30s", Get("refresh-interval"))
-}
-
-func TestAllKeys(t *testing.T) {
- initConfigs()
-
- ks := sort.StringSlice{"title", "newkey", "owner.organization", "owner.dob", "owner.bio", "name", "beard", "ppu", "batters.batter", "hobbies", "clothing.jacket", "clothing.trousers", "clothing.pants.size", "age", "hacker", "id", "type", "eyes", "p_id", "p_ppu", "p_batters.batter.type", "p_type", "p_name", "foos"}
- dob, _ := time.Parse(time.RFC3339, "1979-05-27T07:32:00Z")
- all := map[string]interface{}{"owner": map[string]interface{}{"organization": "MongoDB", "bio": "MongoDB Chief Developer Advocate & Hacker at Large", "dob": dob}, "title": "TOML Example", "ppu": 0.55, "eyes": "brown", "clothing": map[string]interface{}{"trousers": "denim", "jacket": "leather", "pants": map[string]interface{}{"size": "large"}}, "id": "0001", "batters": map[string]interface{}{"batter": []interface{}{map[string]interface{}{"type": "Regular"}, map[string]interface{}{"type": "Chocolate"}, map[string]interface{}{"type": "Blueberry"}, map[string]interface{}{"type": "Devil's Food"}}}, "hacker": true, "beard": true, "hobbies": []interface{}{"skateboarding", "snowboarding", "go"}, "age": 35, "type": "donut", "newkey": "remote", "name": "Cake", "p_id": "0001", "p_ppu": "0.55", "p_name": "Cake", "p_batters": map[string]interface{}{"batter": map[string]interface{}{"type": "Regular"}}, "p_type": "donut", "foos": []map[string]interface{}{map[string]interface{}{"foo": []map[string]interface{}{map[string]interface{}{"key": 1}, map[string]interface{}{"key": 2}, map[string]interface{}{"key": 3}, map[string]interface{}{"key": 4}}}}}
-
- var allkeys sort.StringSlice
- allkeys = AllKeys()
- allkeys.Sort()
- ks.Sort()
-
- assert.Equal(t, ks, allkeys)
- assert.Equal(t, all, AllSettings())
-}
-
-func TestAllKeysWithEnv(t *testing.T) {
- v := New()
-
- // bind and define environment variables (including a nested one)
- v.BindEnv("id")
- v.BindEnv("foo.bar")
- v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
- os.Setenv("ID", "13")
- os.Setenv("FOO_BAR", "baz")
-
- expectedKeys := sort.StringSlice{"id", "foo.bar"}
- expectedKeys.Sort()
- keys := sort.StringSlice(v.AllKeys())
- keys.Sort()
- assert.Equal(t, expectedKeys, keys)
-}
-
-func TestAliasesOfAliases(t *testing.T) {
- Set("Title", "Checking Case")
- RegisterAlias("Foo", "Bar")
- RegisterAlias("Bar", "Title")
- assert.Equal(t, "Checking Case", Get("FOO"))
-}
-
-func TestRecursiveAliases(t *testing.T) {
- RegisterAlias("Baz", "Roo")
- RegisterAlias("Roo", "baz")
-}
-
-func TestUnmarshal(t *testing.T) {
- SetDefault("port", 1313)
- Set("name", "Steve")
- Set("duration", "1s1ms")
-
- type config struct {
- Port int
- Name string
- Duration time.Duration
- }
-
- var C config
-
- err := Unmarshal(&C)
- if err != nil {
- t.Fatalf("unable to decode into struct, %v", err)
- }
-
- assert.Equal(t, &config{Name: "Steve", Port: 1313, Duration: time.Second + time.Millisecond}, &C)
-
- Set("port", 1234)
- err = Unmarshal(&C)
- if err != nil {
- t.Fatalf("unable to decode into struct, %v", err)
- }
- assert.Equal(t, &config{Name: "Steve", Port: 1234, Duration: time.Second + time.Millisecond}, &C)
-}
-
-func TestBindPFlags(t *testing.T) {
- v := New() // create independent Viper object
- flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
-
- var testValues = map[string]*string{
- "host": nil,
- "port": nil,
- "endpoint": nil,
- }
-
- var mutatedTestValues = map[string]string{
- "host": "localhost",
- "port": "6060",
- "endpoint": "/public",
- }
-
- for name := range testValues {
- testValues[name] = flagSet.String(name, "", "test")
- }
-
- err := v.BindPFlags(flagSet)
- if err != nil {
- t.Fatalf("error binding flag set, %v", err)
- }
-
- flagSet.VisitAll(func(flag *pflag.Flag) {
- flag.Value.Set(mutatedTestValues[flag.Name])
- flag.Changed = true
- })
-
- for name, expected := range mutatedTestValues {
- assert.Equal(t, expected, v.Get(name))
- }
-
-}
-
-func TestBindPFlagsStringSlice(t *testing.T) {
- for _, testValue := range []struct {
- Expected []string
- Value string
- }{
- {[]string{}, ""},
- {[]string{"jeden"}, "jeden"},
- {[]string{"dwa", "trzy"}, "dwa,trzy"},
- {[]string{"cztery", "piec , szesc"}, "cztery,\"piec , szesc\""}} {
-
- for _, changed := range []bool{true, false} {
- v := New() // create independent Viper object
- flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
- flagSet.StringSlice("stringslice", testValue.Expected, "test")
- flagSet.Visit(func(f *pflag.Flag) {
- if len(testValue.Value) > 0 {
- f.Value.Set(testValue.Value)
- f.Changed = changed
- }
- })
-
- err := v.BindPFlags(flagSet)
- if err != nil {
- t.Fatalf("error binding flag set, %v", err)
- }
-
- type TestStr struct {
- StringSlice []string
- }
- val := &TestStr{}
- if err := v.Unmarshal(val); err != nil {
- t.Fatalf("%+#v cannot unmarshal: %s", testValue.Value, err)
- }
- assert.Equal(t, testValue.Expected, val.StringSlice)
- }
- }
-}
-
-func TestBindPFlag(t *testing.T) {
- var testString = "testing"
- var testValue = newStringValue(testString, &testString)
-
- flag := &pflag.Flag{
- Name: "testflag",
- Value: testValue,
- Changed: false,
- }
-
- BindPFlag("testvalue", flag)
-
- assert.Equal(t, testString, Get("testvalue"))
-
- flag.Value.Set("testing_mutate")
- flag.Changed = true //hack for pflag usage
-
- assert.Equal(t, "testing_mutate", Get("testvalue"))
-
-}
-
-func TestBoundCaseSensitivity(t *testing.T) {
- assert.Equal(t, "brown", Get("eyes"))
-
- BindEnv("eYEs", "TURTLE_EYES")
- os.Setenv("TURTLE_EYES", "blue")
-
- assert.Equal(t, "blue", Get("eyes"))
-
- var testString = "green"
- var testValue = newStringValue(testString, &testString)
-
- flag := &pflag.Flag{
- Name: "eyeballs",
- Value: testValue,
- Changed: true,
- }
-
- BindPFlag("eYEs", flag)
- assert.Equal(t, "green", Get("eyes"))
-
-}
-
-func TestSizeInBytes(t *testing.T) {
- input := map[string]uint{
- "": 0,
- "b": 0,
- "12 bytes": 0,
- "200000000000gb": 0,
- "12 b": 12,
- "43 MB": 43 * (1 << 20),
- "10mb": 10 * (1 << 20),
- "1gb": 1 << 30,
- }
-
- for str, expected := range input {
- assert.Equal(t, expected, parseSizeInBytes(str), str)
- }
-}
-
-func TestFindsNestedKeys(t *testing.T) {
- initConfigs()
- dob, _ := time.Parse(time.RFC3339, "1979-05-27T07:32:00Z")
-
- Set("super", map[string]interface{}{
- "deep": map[string]interface{}{
- "nested": "value",
- },
- })
-
- expected := map[string]interface{}{
- "super": map[string]interface{}{
- "deep": map[string]interface{}{
- "nested": "value",
- },
- },
- "super.deep": map[string]interface{}{
- "nested": "value",
- },
- "super.deep.nested": "value",
- "owner.organization": "MongoDB",
- "batters.batter": []interface{}{
- map[string]interface{}{
- "type": "Regular",
- },
- map[string]interface{}{
- "type": "Chocolate",
- },
- map[string]interface{}{
- "type": "Blueberry",
- },
- map[string]interface{}{
- "type": "Devil's Food",
- },
- },
- "hobbies": []interface{}{
- "skateboarding", "snowboarding", "go",
- },
- "title": "TOML Example",
- "newkey": "remote",
- "batters": map[string]interface{}{
- "batter": []interface{}{
- map[string]interface{}{
- "type": "Regular",
- },
- map[string]interface{}{
- "type": "Chocolate",
- }, map[string]interface{}{
- "type": "Blueberry",
- }, map[string]interface{}{
- "type": "Devil's Food",
- },
- },
- },
- "eyes": "brown",
- "age": 35,
- "owner": map[string]interface{}{
- "organization": "MongoDB",
- "bio": "MongoDB Chief Developer Advocate & Hacker at Large",
- "dob": dob,
- },
- "owner.bio": "MongoDB Chief Developer Advocate & Hacker at Large",
- "type": "donut",
- "id": "0001",
- "name": "Cake",
- "hacker": true,
- "ppu": 0.55,
- "clothing": map[string]interface{}{
- "jacket": "leather",
- "trousers": "denim",
- "pants": map[string]interface{}{
- "size": "large",
- },
- },
- "clothing.jacket": "leather",
- "clothing.pants.size": "large",
- "clothing.trousers": "denim",
- "owner.dob": dob,
- "beard": true,
- "foos": []map[string]interface{}{
- map[string]interface{}{
- "foo": []map[string]interface{}{
- map[string]interface{}{
- "key": 1,
- },
- map[string]interface{}{
- "key": 2,
- },
- map[string]interface{}{
- "key": 3,
- },
- map[string]interface{}{
- "key": 4,
- },
- },
- },
- },
- }
-
- for key, expectedValue := range expected {
-
- assert.Equal(t, expectedValue, v.Get(key))
- }
-
-}
-
-func TestReadBufConfig(t *testing.T) {
- v := New()
- v.SetConfigType("yaml")
- v.ReadConfig(bytes.NewBuffer(yamlExample))
- t.Log(v.AllKeys())
-
- assert.True(t, v.InConfig("name"))
- assert.False(t, v.InConfig("state"))
- assert.Equal(t, "steve", v.Get("name"))
- assert.Equal(t, []interface{}{"skateboarding", "snowboarding", "go"}, v.Get("hobbies"))
- assert.Equal(t, map[string]interface{}{"jacket": "leather", "trousers": "denim", "pants": map[string]interface{}{"size": "large"}}, v.Get("clothing"))
- assert.Equal(t, 35, v.Get("age"))
-}
-
-func TestIsSet(t *testing.T) {
- v := New()
- v.SetConfigType("yaml")
- v.ReadConfig(bytes.NewBuffer(yamlExample))
- assert.True(t, v.IsSet("clothing.jacket"))
- assert.False(t, v.IsSet("clothing.jackets"))
- assert.False(t, v.IsSet("helloworld"))
- v.Set("helloworld", "fubar")
- assert.True(t, v.IsSet("helloworld"))
-}
-
-func TestDirsSearch(t *testing.T) {
-
- root, config, cleanup := initDirs(t)
- defer cleanup()
-
- v := New()
- v.SetConfigName(config)
- v.SetDefault(`key`, `default`)
-
- entries, err := ioutil.ReadDir(root)
- for _, e := range entries {
- if e.IsDir() {
- v.AddConfigPath(e.Name())
- }
- }
-
- err = v.ReadInConfig()
- assert.Nil(t, err)
-
- assert.Equal(t, `value is `+path.Base(v.configPaths[0]), v.GetString(`key`))
-}
-
-func TestWrongDirsSearchNotFound(t *testing.T) {
-
- _, config, cleanup := initDirs(t)
- defer cleanup()
-
- v := New()
- v.SetConfigName(config)
- v.SetDefault(`key`, `default`)
-
- v.AddConfigPath(`whattayoutalkingbout`)
- v.AddConfigPath(`thispathaintthere`)
-
- err := v.ReadInConfig()
- assert.Equal(t, reflect.TypeOf(ConfigFileNotFoundError{"", ""}), reflect.TypeOf(err))
-
- // Even though config did not load and the error might have
- // been ignored by the client, the default still loads
- assert.Equal(t, `default`, v.GetString(`key`))
-}
-
-func TestWrongDirsSearchNotFoundForMerge(t *testing.T) {
-
- _, config, cleanup := initDirs(t)
- defer cleanup()
-
- v := New()
- v.SetConfigName(config)
- v.SetDefault(`key`, `default`)
-
- v.AddConfigPath(`whattayoutalkingbout`)
- v.AddConfigPath(`thispathaintthere`)
-
- err := v.MergeInConfig()
- assert.Equal(t, reflect.TypeOf(ConfigFileNotFoundError{"", ""}), reflect.TypeOf(err))
-
- // Even though config did not load and the error might have
- // been ignored by the client, the default still loads
- assert.Equal(t, `default`, v.GetString(`key`))
-}
-
-func TestSub(t *testing.T) {
- v := New()
- v.SetConfigType("yaml")
- v.ReadConfig(bytes.NewBuffer(yamlExample))
-
- subv := v.Sub("clothing")
- assert.Equal(t, v.Get("clothing.pants.size"), subv.Get("pants.size"))
-
- subv = v.Sub("clothing.pants")
- assert.Equal(t, v.Get("clothing.pants.size"), subv.Get("size"))
-
- subv = v.Sub("clothing.pants.size")
- assert.Equal(t, (*Viper)(nil), subv)
-
- subv = v.Sub("missing.key")
- assert.Equal(t, (*Viper)(nil), subv)
-}
-
-var hclWriteExpected = []byte(`"foos" = {
- "foo" = {
- "key" = 1
- }
-
- "foo" = {
- "key" = 2
- }
-
- "foo" = {
- "key" = 3
- }
-
- "foo" = {
- "key" = 4
- }
-}
-
-"id" = "0001"
-
-"name" = "Cake"
-
-"ppu" = 0.55
-
-"type" = "donut"`)
-
-func TestWriteConfigHCL(t *testing.T) {
- v := New()
- fs := afero.NewMemMapFs()
- v.SetFs(fs)
- v.SetConfigName("c")
- v.SetConfigType("hcl")
- err := v.ReadConfig(bytes.NewBuffer(hclExample))
- if err != nil {
- t.Fatal(err)
- }
- if err := v.WriteConfigAs("c.hcl"); err != nil {
- t.Fatal(err)
- }
- read, err := afero.ReadFile(fs, "c.hcl")
- if err != nil {
- t.Fatal(err)
- }
- assert.Equal(t, hclWriteExpected, read)
-}
-
-var jsonWriteExpected = []byte(`{
- "batters": {
- "batter": [
- {
- "type": "Regular"
- },
- {
- "type": "Chocolate"
- },
- {
- "type": "Blueberry"
- },
- {
- "type": "Devil's Food"
- }
- ]
- },
- "id": "0001",
- "name": "Cake",
- "ppu": 0.55,
- "type": "donut"
-}`)
-
-func TestWriteConfigJson(t *testing.T) {
- v := New()
- fs := afero.NewMemMapFs()
- v.SetFs(fs)
- v.SetConfigName("c")
- v.SetConfigType("json")
- err := v.ReadConfig(bytes.NewBuffer(jsonExample))
- if err != nil {
- t.Fatal(err)
- }
- if err := v.WriteConfigAs("c.json"); err != nil {
- t.Fatal(err)
- }
- read, err := afero.ReadFile(fs, "c.json")
- if err != nil {
- t.Fatal(err)
- }
- assert.Equal(t, jsonWriteExpected, read)
-}
-
-var propertiesWriteExpected = []byte(`p_id = 0001
-p_type = donut
-p_name = Cake
-p_ppu = 0.55
-p_batters.batter.type = Regular
-`)
-
-func TestWriteConfigProperties(t *testing.T) {
- v := New()
- fs := afero.NewMemMapFs()
- v.SetFs(fs)
- v.SetConfigName("c")
- v.SetConfigType("properties")
- err := v.ReadConfig(bytes.NewBuffer(propertiesExample))
- if err != nil {
- t.Fatal(err)
- }
- if err := v.WriteConfigAs("c.properties"); err != nil {
- t.Fatal(err)
- }
- read, err := afero.ReadFile(fs, "c.properties")
- if err != nil {
- t.Fatal(err)
- }
- assert.Equal(t, propertiesWriteExpected, read)
-}
-
-func TestWriteConfigTOML(t *testing.T) {
- fs := afero.NewMemMapFs()
- v := New()
- v.SetFs(fs)
- v.SetConfigName("c")
- v.SetConfigType("toml")
- err := v.ReadConfig(bytes.NewBuffer(tomlExample))
- if err != nil {
- t.Fatal(err)
- }
- if err := v.WriteConfigAs("c.toml"); err != nil {
- t.Fatal(err)
- }
-
- // The TOML String method does not order the contents.
- // Therefore, we must read the generated file and compare the data.
- v2 := New()
- v2.SetFs(fs)
- v2.SetConfigName("c")
- v2.SetConfigType("toml")
- v2.SetConfigFile("c.toml")
- err = v2.ReadInConfig()
- if err != nil {
- t.Fatal(err)
- }
-
- assert.Equal(t, v.GetString("title"), v2.GetString("title"))
- assert.Equal(t, v.GetString("owner.bio"), v2.GetString("owner.bio"))
- assert.Equal(t, v.GetString("owner.dob"), v2.GetString("owner.dob"))
- assert.Equal(t, v.GetString("owner.organization"), v2.GetString("owner.organization"))
-}
-
-var yamlWriteExpected = []byte(`age: 35
-beard: true
-clothing:
- jacket: leather
- pants:
- size: large
- trousers: denim
-eyes: brown
-hacker: true
-hobbies:
-- skateboarding
-- snowboarding
-- go
-name: steve
-`)
-
-func TestWriteConfigYAML(t *testing.T) {
- v := New()
- fs := afero.NewMemMapFs()
- v.SetFs(fs)
- v.SetConfigName("c")
- v.SetConfigType("yaml")
- err := v.ReadConfig(bytes.NewBuffer(yamlExample))
- if err != nil {
- t.Fatal(err)
- }
- if err := v.WriteConfigAs("c.yaml"); err != nil {
- t.Fatal(err)
- }
- read, err := afero.ReadFile(fs, "c.yaml")
- if err != nil {
- t.Fatal(err)
- }
- assert.Equal(t, yamlWriteExpected, read)
-}
-
-var yamlMergeExampleTgt = []byte(`
-hello:
- pop: 37890
- lagrenum: 765432101234567
- world:
- - us
- - uk
- - fr
- - de
-`)
-
-var yamlMergeExampleSrc = []byte(`
-hello:
- pop: 45000
- lagrenum: 7654321001234567
- universe:
- - mw
- - ad
-fu: bar
-`)
-
-func TestMergeConfig(t *testing.T) {
- v := New()
- v.SetConfigType("yml")
- if err := v.ReadConfig(bytes.NewBuffer(yamlMergeExampleTgt)); err != nil {
- t.Fatal(err)
- }
-
- if pop := v.GetInt("hello.pop"); pop != 37890 {
- t.Fatalf("pop != 37890, = %d", pop)
- }
-
- if pop := v.GetInt("hello.lagrenum"); pop != 765432101234567 {
- t.Fatalf("lagrenum != 765432101234567, = %d", pop)
- }
-
- if pop := v.GetInt64("hello.lagrenum"); pop != int64(765432101234567) {
- t.Fatalf("int64 lagrenum != 765432101234567, = %d", pop)
- }
-
- if world := v.GetStringSlice("hello.world"); len(world) != 4 {
- t.Fatalf("len(world) != 4, = %d", len(world))
- }
-
- if fu := v.GetString("fu"); fu != "" {
- t.Fatalf("fu != \"\", = %s", fu)
- }
-
- if err := v.MergeConfig(bytes.NewBuffer(yamlMergeExampleSrc)); err != nil {
- t.Fatal(err)
- }
-
- if pop := v.GetInt("hello.pop"); pop != 45000 {
- t.Fatalf("pop != 45000, = %d", pop)
- }
-
- if pop := v.GetInt("hello.lagrenum"); pop != 7654321001234567 {
- t.Fatalf("lagrenum != 7654321001234567, = %d", pop)
- }
-
- if pop := v.GetInt64("hello.lagrenum"); pop != int64(7654321001234567) {
- t.Fatalf("int64 lagrenum != 7654321001234567, = %d", pop)
- }
-
- if world := v.GetStringSlice("hello.world"); len(world) != 4 {
- t.Fatalf("len(world) != 4, = %d", len(world))
- }
-
- if universe := v.GetStringSlice("hello.universe"); len(universe) != 2 {
- t.Fatalf("len(universe) != 2, = %d", len(universe))
- }
-
- if fu := v.GetString("fu"); fu != "bar" {
- t.Fatalf("fu != \"bar\", = %s", fu)
- }
-}
-
-func TestMergeConfigNoMerge(t *testing.T) {
- v := New()
- v.SetConfigType("yml")
- if err := v.ReadConfig(bytes.NewBuffer(yamlMergeExampleTgt)); err != nil {
- t.Fatal(err)
- }
-
- if pop := v.GetInt("hello.pop"); pop != 37890 {
- t.Fatalf("pop != 37890, = %d", pop)
- }
-
- if world := v.GetStringSlice("hello.world"); len(world) != 4 {
- t.Fatalf("len(world) != 4, = %d", len(world))
- }
-
- if fu := v.GetString("fu"); fu != "" {
- t.Fatalf("fu != \"\", = %s", fu)
- }
-
- if err := v.ReadConfig(bytes.NewBuffer(yamlMergeExampleSrc)); err != nil {
- t.Fatal(err)
- }
-
- if pop := v.GetInt("hello.pop"); pop != 45000 {
- t.Fatalf("pop != 45000, = %d", pop)
- }
-
- if world := v.GetStringSlice("hello.world"); len(world) != 0 {
- t.Fatalf("len(world) != 0, = %d", len(world))
- }
-
- if universe := v.GetStringSlice("hello.universe"); len(universe) != 2 {
- t.Fatalf("len(universe) != 2, = %d", len(universe))
- }
-
- if fu := v.GetString("fu"); fu != "bar" {
- t.Fatalf("fu != \"bar\", = %s", fu)
- }
-}
-
-func TestUnmarshalingWithAliases(t *testing.T) {
- v := New()
- v.SetDefault("ID", 1)
- v.Set("name", "Steve")
- v.Set("lastname", "Owen")
-
- v.RegisterAlias("UserID", "ID")
- v.RegisterAlias("Firstname", "name")
- v.RegisterAlias("Surname", "lastname")
-
- type config struct {
- ID int
- FirstName string
- Surname string
- }
-
- var C config
- err := v.Unmarshal(&C)
- if err != nil {
- t.Fatalf("unable to decode into struct, %v", err)
- }
-
- assert.Equal(t, &config{ID: 1, FirstName: "Steve", Surname: "Owen"}, &C)
-}
-
-func TestSetConfigNameClearsFileCache(t *testing.T) {
- SetConfigFile("/tmp/config.yaml")
- SetConfigName("default")
- f, err := v.getConfigFile()
- if err == nil {
- t.Fatalf("config file cache should have been cleared")
- }
- assert.Empty(t, f)
-}
-
-func TestShadowedNestedValue(t *testing.T) {
-
- config := `name: steve
-clothing:
- jacket: leather
- trousers: denim
- pants:
- size: large
-`
- initConfig("yaml", config)
-
- assert.Equal(t, "steve", GetString("name"))
-
- polyester := "polyester"
- SetDefault("clothing.shirt", polyester)
- SetDefault("clothing.jacket.price", 100)
-
- assert.Equal(t, "leather", GetString("clothing.jacket"))
- assert.Nil(t, Get("clothing.jacket.price"))
- assert.Equal(t, polyester, GetString("clothing.shirt"))
-
- clothingSettings := AllSettings()["clothing"].(map[string]interface{})
- assert.Equal(t, "leather", clothingSettings["jacket"])
- assert.Equal(t, polyester, clothingSettings["shirt"])
-}
-
-func TestDotParameter(t *testing.T) {
- initJSON()
- // shoud take precedence over batters defined in jsonExample
- r := bytes.NewReader([]byte(`{ "batters.batter": [ { "type": "Small" } ] }`))
- unmarshalReader(r, v.config)
-
- actual := Get("batters.batter")
- expected := []interface{}{map[string]interface{}{"type": "Small"}}
- assert.Equal(t, expected, actual)
-}
-
-func TestCaseInsensitive(t *testing.T) {
- for _, config := range []struct {
- typ string
- content string
- }{
- {"yaml", `
-aBcD: 1
-eF:
- gH: 2
- iJk: 3
- Lm:
- nO: 4
- P:
- Q: 5
- R: 6
-`},
- {"json", `{
- "aBcD": 1,
- "eF": {
- "iJk": 3,
- "Lm": {
- "P": {
- "Q": 5,
- "R": 6
- },
- "nO": 4
- },
- "gH": 2
- }
-}`},
- {"toml", `aBcD = 1
-[eF]
-gH = 2
-iJk = 3
-[eF.Lm]
-nO = 4
-[eF.Lm.P]
-Q = 5
-R = 6
-`},
- } {
- doTestCaseInsensitive(t, config.typ, config.content)
- }
-}
-
-func TestCaseInsensitiveSet(t *testing.T) {
- Reset()
- m1 := map[string]interface{}{
- "Foo": 32,
- "Bar": map[interface{}]interface {
- }{
- "ABc": "A",
- "cDE": "B"},
- }
-
- m2 := map[string]interface{}{
- "Foo": 52,
- "Bar": map[interface{}]interface {
- }{
- "bCd": "A",
- "eFG": "B"},
- }
-
- Set("Given1", m1)
- Set("Number1", 42)
-
- SetDefault("Given2", m2)
- SetDefault("Number2", 52)
-
- // Verify SetDefault
- if v := Get("number2"); v != 52 {
- t.Fatalf("Expected 52 got %q", v)
- }
-
- if v := Get("given2.foo"); v != 52 {
- t.Fatalf("Expected 52 got %q", v)
- }
-
- if v := Get("given2.bar.bcd"); v != "A" {
- t.Fatalf("Expected A got %q", v)
- }
-
- if _, ok := m2["Foo"]; !ok {
- t.Fatal("Input map changed")
- }
-
- // Verify Set
- if v := Get("number1"); v != 42 {
- t.Fatalf("Expected 42 got %q", v)
- }
-
- if v := Get("given1.foo"); v != 32 {
- t.Fatalf("Expected 32 got %q", v)
- }
-
- if v := Get("given1.bar.abc"); v != "A" {
- t.Fatalf("Expected A got %q", v)
- }
-
- if _, ok := m1["Foo"]; !ok {
- t.Fatal("Input map changed")
- }
-}
-
-func TestParseNested(t *testing.T) {
- type duration struct {
- Delay time.Duration
- }
-
- type item struct {
- Name string
- Delay time.Duration
- Nested duration
- }
-
- config := `[[parent]]
- delay="100ms"
- [parent.nested]
- delay="200ms"
-`
- initConfig("toml", config)
-
- var items []item
- err := v.UnmarshalKey("parent", &items)
- if err != nil {
- t.Fatalf("unable to decode into struct, %v", err)
- }
-
- assert.Equal(t, 1, len(items))
- assert.Equal(t, 100*time.Millisecond, items[0].Delay)
- assert.Equal(t, 200*time.Millisecond, items[0].Nested.Delay)
-}
-
-func doTestCaseInsensitive(t *testing.T, typ, config string) {
- initConfig(typ, config)
- Set("RfD", true)
- assert.Equal(t, true, Get("rfd"))
- assert.Equal(t, true, Get("rFD"))
- assert.Equal(t, 1, cast.ToInt(Get("abcd")))
- assert.Equal(t, 1, cast.ToInt(Get("Abcd")))
- assert.Equal(t, 2, cast.ToInt(Get("ef.gh")))
- assert.Equal(t, 3, cast.ToInt(Get("ef.ijk")))
- assert.Equal(t, 4, cast.ToInt(Get("ef.lm.no")))
- assert.Equal(t, 5, cast.ToInt(Get("ef.lm.p.q")))
-
-}
-
-func BenchmarkGetBool(b *testing.B) {
- key := "BenchmarkGetBool"
- v = New()
- v.Set(key, true)
-
- for i := 0; i < b.N; i++ {
- if !v.GetBool(key) {
- b.Fatal("GetBool returned false")
- }
- }
-}
-
-func BenchmarkGet(b *testing.B) {
- key := "BenchmarkGet"
- v = New()
- v.Set(key, true)
-
- for i := 0; i < b.N; i++ {
- if !v.Get(key).(bool) {
- b.Fatal("Get returned false")
- }
- }
-}
-
-// This is the "perfect result" for the above.
-func BenchmarkGetBoolFromMap(b *testing.B) {
- m := make(map[string]bool)
- key := "BenchmarkGetBool"
- m[key] = true
-
- for i := 0; i < b.N; i++ {
- if !m[key] {
- b.Fatal("Map value was false")
- }
- }
-}
diff --git a/vendor/github.com/stretchr/objx/.codeclimate.yml b/vendor/github.com/stretchr/objx/.codeclimate.yml
deleted file mode 100644
index 559fa399c..000000000
--- a/vendor/github.com/stretchr/objx/.codeclimate.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-engines:
- gofmt:
- enabled: true
- golint:
- enabled: true
- govet:
- enabled: true
-
-exclude_patterns:
-- ".github/"
-- "vendor/"
-- "codegen/"
-- "*.yml"
-- ".*.yml"
-- "*.md"
-- "Gopkg.*"
-- "doc.go"
-- "type_specific_codegen_test.go"
-- "type_specific_codegen.go"
-- ".gitignore"
-- "LICENSE"
diff --git a/vendor/github.com/stretchr/objx/.github/CODE_OF_CONDUCT.md b/vendor/github.com/stretchr/objx/.github/CODE_OF_CONDUCT.md
deleted file mode 100644
index 5099d59c9..000000000
--- a/vendor/github.com/stretchr/objx/.github/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hanzei@mailbox.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/stretchr/objx/.gitignore b/vendor/github.com/stretchr/objx/.gitignore
index ea58090bd..e0170a5f9 100644
--- a/vendor/github.com/stretchr/objx/.gitignore
+++ b/vendor/github.com/stretchr/objx/.gitignore
@@ -1,11 +1,4 @@
-# Binaries for programs and plugins
-*.exe
-*.dll
-*.so
-*.dylib
-
-# Test binary, build with `go test -c`
-*.test
-
-# Output of the go coverage tool, specifically when used with LiteIDE
-*.out
+/dep
+/testdep
+/profile.out
+/coverage.txt
diff --git a/vendor/github.com/stretchr/objx/.travis.yml b/vendor/github.com/stretchr/objx/.travis.yml
index df30dbb70..1456363ea 100644
--- a/vendor/github.com/stretchr/objx/.travis.yml
+++ b/vendor/github.com/stretchr/objx/.travis.yml
@@ -1,28 +1,13 @@
language: go
go:
- - 1.6
- - 1.7
- 1.8
- 1.9
-
-env:
- global:
- - CC_TEST_REPORTER_ID=68feaa3410049ce73e145287acbcdacc525087a30627f96f04e579e75bd71c00
-
-before_script:
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- - chmod +x ./cc-test-reporter
- - ./cc-test-reporter before-build
+ - tip
install:
- - wget https://github.com/go-task/task/releases/download/v1.4.4/task_linux_amd64.tar.gz
- - tar xf task_linux_amd64.tar.gz
- - mv task $HOME/gopath/bin
+- go get github.com/go-task/task/cmd/task
script:
- - task dl-deps
- - task lint
- - task test-coverage
-
-after_script:
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
+- task dl-deps
+- task lint
+- task test
diff --git a/vendor/github.com/stretchr/objx/Gopkg.lock b/vendor/github.com/stretchr/objx/Gopkg.lock
index eebe342a9..1f5739c91 100644
--- a/vendor/github.com/stretchr/objx/Gopkg.lock
+++ b/vendor/github.com/stretchr/objx/Gopkg.lock
@@ -15,16 +15,13 @@
[[projects]]
name = "github.com/stretchr/testify"
- packages = [
- "assert",
- "require"
- ]
+ packages = ["assert"]
revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c"
version = "v1.2.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "2d160a7dea4ffd13c6c31dab40373822f9d78c73beba016d662bef8f7a998876"
+ inputs-digest = "50e2495ec1af6e2f7ffb2f3551e4300d30357d7c7fe38ff6056469fa9cfb3673"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/vendor/github.com/stretchr/objx/Gopkg.toml b/vendor/github.com/stretchr/objx/Gopkg.toml
index d70f1570b..f87e18eb5 100644
--- a/vendor/github.com/stretchr/objx/Gopkg.toml
+++ b/vendor/github.com/stretchr/objx/Gopkg.toml
@@ -1,8 +1,3 @@
-[prune]
- unused-packages = true
- non-go = true
- go-tests = true
-
[[constraint]]
name = "github.com/stretchr/testify"
version = "~1.2.0"
diff --git a/vendor/github.com/stretchr/objx/README.md b/vendor/github.com/stretchr/objx/README.md
index 8fc8fa277..4e2400eb1 100644
--- a/vendor/github.com/stretchr/objx/README.md
+++ b/vendor/github.com/stretchr/objx/README.md
@@ -1,8 +1,6 @@
# Objx
[![Build Status](https://travis-ci.org/stretchr/objx.svg?branch=master)](https://travis-ci.org/stretchr/objx)
[![Go Report Card](https://goreportcard.com/badge/github.com/stretchr/objx)](https://goreportcard.com/report/github.com/stretchr/objx)
-[![Maintainability](https://api.codeclimate.com/v1/badges/1d64bc6c8474c2074f2b/maintainability)](https://codeclimate.com/github/stretchr/objx/maintainability)
-[![Test Coverage](https://api.codeclimate.com/v1/badges/1d64bc6c8474c2074f2b/test_coverage)](https://codeclimate.com/github/stretchr/objx/test_coverage)
[![Sourcegraph](https://sourcegraph.com/github.com/stretchr/objx/-/badge.svg)](https://sourcegraph.com/github.com/stretchr/objx)
[![GoDoc](https://godoc.org/github.com/stretchr/objx?status.svg)](https://godoc.org/github.com/stretchr/objx)
@@ -74,7 +72,7 @@ To update Objx to the latest version, run:
go get -u github.com/stretchr/objx
### Supported go versions
-We support the lastest four major Go versions, which are 1.6, 1.7, 1.8 and 1.9 at the moment.
+We support the lastest two major Go versions, which are 1.8 and 1.9 at the moment.
## Contributing
Please feel free to submit issues, fork the repository and send pull requests!
diff --git a/vendor/github.com/stretchr/objx/Taskfile.yml b/vendor/github.com/stretchr/objx/Taskfile.yml
index 7d0199450..403b5f06e 100644
--- a/vendor/github.com/stretchr/objx/Taskfile.yml
+++ b/vendor/github.com/stretchr/objx/Taskfile.yml
@@ -5,18 +5,18 @@ dl-deps:
desc: Downloads cli dependencies
cmds:
- go get -u github.com/golang/lint/golint
+ - go get -u github.com/golang/dep/cmd/dep
update-deps:
desc: Updates dependencies
cmds:
- dep ensure
- dep ensure -update
+ - dep prune
lint:
desc: Runs golint
cmds:
- - go fmt $(go list ./... | grep -v /vendor/)
- - go vet $(go list ./... | grep -v /vendor/)
- golint $(ls *.go | grep -v "doc.go")
silent: true
@@ -24,8 +24,3 @@ test:
desc: Runs go tests
cmds:
- go test -race .
-
-test-coverage:
- desc: Runs go tests and calucates test coverage
- cmds:
- - go test -coverprofile=c.out .
diff --git a/vendor/github.com/stretchr/objx/accessors.go b/vendor/github.com/stretchr/objx/accessors.go
index 78939426d..d95be0ca9 100644
--- a/vendor/github.com/stretchr/objx/accessors.go
+++ b/vendor/github.com/stretchr/objx/accessors.go
@@ -1,22 +1,15 @@
package objx
import (
+ "fmt"
"regexp"
"strconv"
"strings"
)
-const (
- // PathSeparator is the character used to separate the elements
- // of the keypath.
- //
- // For example, `location.address.city`
- PathSeparator string = "."
-
- // arrayAccesRegexString is the regex used to extract the array number
- // from the access path
- arrayAccesRegexString = `^(.+)\[([0-9]+)\]$`
-)
+// arrayAccesRegexString is the regex used to extract the array number
+// from the access path
+const arrayAccesRegexString = `^(.+)\[([0-9]+)\]$`
// arrayAccesRegex is the compiled arrayAccesRegexString
var arrayAccesRegex = regexp.MustCompile(arrayAccesRegexString)
@@ -35,7 +28,7 @@ var arrayAccesRegex = regexp.MustCompile(arrayAccesRegexString)
//
// o.Get("books[1].chapters[2].title")
func (m Map) Get(selector string) *Value {
- rawObj := access(m, selector, nil, false)
+ rawObj := access(m, selector, nil, false, false)
return &Value{data: rawObj}
}
@@ -50,64 +43,129 @@ func (m Map) Get(selector string) *Value {
//
// o.Set("books[1].chapters[2].title","Time to Go")
func (m Map) Set(selector string, value interface{}) Map {
- access(m, selector, value, true)
+ access(m, selector, value, true, false)
return m
}
-// getIndex returns the index, which is hold in s by two braches.
-// It also returns s withour the index part, e.g. name[1] will return (1, name).
-// If no index is found, -1 is returned
-func getIndex(s string) (int, string) {
- arrayMatches := arrayAccesRegex.FindStringSubmatch(s)
- if len(arrayMatches) > 0 {
- // Get the key into the map
- selector := arrayMatches[1]
- // Get the index into the array at the key
- // We know this cannt fail because arrayMatches[2] is an int for sure
- index, _ := strconv.Atoi(arrayMatches[2])
- return index, selector
- }
- return -1, s
-}
-
// access accesses the object using the selector and performs the
// appropriate action.
-func access(current interface{}, selector string, value interface{}, isSet bool) interface{} {
- selSegs := strings.SplitN(selector, PathSeparator, 2)
- thisSel := selSegs[0]
- index := -1
+func access(current, selector, value interface{}, isSet, panics bool) interface{} {
- if strings.Contains(thisSel, "[") {
- index, thisSel = getIndex(thisSel)
- }
+ switch selector.(type) {
+ case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
- if curMap, ok := current.(Map); ok {
- current = map[string]interface{}(curMap)
- }
- // get the object in question
- switch current.(type) {
- case map[string]interface{}:
- curMSI := current.(map[string]interface{})
- if len(selSegs) <= 1 && isSet {
- curMSI[thisSel] = value
- return nil
- }
- current = curMSI[thisSel]
- default:
- current = nil
- }
- // do we need to access the item of an array?
- if index > -1 {
if array, ok := current.([]interface{}); ok {
- if index < len(array) {
- current = array[index]
- } else {
- current = nil
+ index := intFromInterface(selector)
+
+ if index >= len(array) {
+ if panics {
+ panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array)))
+ }
+ return nil
}
+
+ return array[index]
}
- }
- if len(selSegs) > 1 {
- current = access(current, selSegs[1], value, isSet)
+
+ return nil
+
+ case string:
+
+ selStr := selector.(string)
+ selSegs := strings.SplitN(selStr, PathSeparator, 2)
+ thisSel := selSegs[0]
+ index := -1
+ var err error
+
+ if strings.Contains(thisSel, "[") {
+ arrayMatches := arrayAccesRegex.FindStringSubmatch(thisSel)
+
+ if len(arrayMatches) > 0 {
+ // Get the key into the map
+ thisSel = arrayMatches[1]
+
+ // Get the index into the array at the key
+ index, err = strconv.Atoi(arrayMatches[2])
+
+ if err != nil {
+ // This should never happen. If it does, something has gone
+ // seriously wrong. Panic.
+ panic("objx: Array index is not an integer. Must use array[int].")
+ }
+ }
+ }
+
+ if curMap, ok := current.(Map); ok {
+ current = map[string]interface{}(curMap)
+ }
+
+ // get the object in question
+ switch current.(type) {
+ case map[string]interface{}:
+ curMSI := current.(map[string]interface{})
+ if len(selSegs) <= 1 && isSet {
+ curMSI[thisSel] = value
+ return nil
+ }
+ current = curMSI[thisSel]
+ default:
+ current = nil
+ }
+
+ if current == nil && panics {
+ panic(fmt.Sprintf("objx: '%v' invalid on object.", selector))
+ }
+
+ // do we need to access the item of an array?
+ if index > -1 {
+ if array, ok := current.([]interface{}); ok {
+ if index < len(array) {
+ current = array[index]
+ } else {
+ if panics {
+ panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array)))
+ }
+ current = nil
+ }
+ }
+ }
+
+ if len(selSegs) > 1 {
+ current = access(current, selSegs[1], value, isSet, panics)
+ }
+
}
return current
}
+
+// intFromInterface converts an interface object to the largest
+// representation of an unsigned integer using a type switch and
+// assertions
+func intFromInterface(selector interface{}) int {
+ var value int
+ switch selector.(type) {
+ case int:
+ value = selector.(int)
+ case int8:
+ value = int(selector.(int8))
+ case int16:
+ value = int(selector.(int16))
+ case int32:
+ value = int(selector.(int32))
+ case int64:
+ value = int(selector.(int64))
+ case uint:
+ value = int(selector.(uint))
+ case uint8:
+ value = int(selector.(uint8))
+ case uint16:
+ value = int(selector.(uint16))
+ case uint32:
+ value = int(selector.(uint32))
+ case uint64:
+ value = int(selector.(uint64))
+ default:
+ panic("objx: array access argument is not an integer type (this should never happen)")
+ }
+ return value
+}
diff --git a/vendor/github.com/stretchr/objx/accessors_test.go b/vendor/github.com/stretchr/objx/accessors_test.go
deleted file mode 100644
index 965e4e77f..000000000
--- a/vendor/github.com/stretchr/objx/accessors_test.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-func TestAccessorsAccessGetSingleField(t *testing.T) {
- m := objx.Map{"name": "Tyler"}
-
- assert.Equal(t, "Tyler", m.Get("name").Data())
-}
-
-func TestAccessorsAccessGetSingleFieldInt(t *testing.T) {
- m := objx.Map{"name": 10}
-
- assert.Equal(t, 10, m.Get("name").Data())
-}
-
-func TestAccessorsAccessGetDeep(t *testing.T) {
- m := objx.Map{
- "name": objx.Map{
- "first": "Tyler",
- "last": "Bunnell",
- },
- }
-
- assert.Equal(t, "Tyler", m.Get("name.first").Data())
- assert.Equal(t, "Bunnell", m.Get("name.last").Data())
-}
-
-func TestAccessorsAccessGetDeepDeep(t *testing.T) {
- m := objx.Map{
- "one": objx.Map{
- "two": objx.Map{
- "three": objx.Map{
- "four": 4,
- },
- },
- },
- }
-
- assert.Equal(t, 4, m.Get("one.two.three.four").Data())
-}
-
-func TestAccessorsAccessGetInsideArray(t *testing.T) {
- m := objx.Map{
- "names": []interface{}{
- objx.Map{
- "first": "Tyler",
- "last": "Bunnell",
- },
- objx.Map{
- "first": "Capitol",
- "last": "Bollocks",
- },
- },
- }
-
- assert.Equal(t, "Tyler", m.Get("names[0].first").Data())
- assert.Equal(t, "Bunnell", m.Get("names[0].last").Data())
- assert.Equal(t, "Capitol", m.Get("names[1].first").Data())
- assert.Equal(t, "Bollocks", m.Get("names[1].last").Data())
-
- assert.Nil(t, m.Get("names[2]").Data())
- assert.Nil(t, m.Get("names[]").Data())
- assert.Nil(t, m.Get("names1]]").Data())
- assert.Nil(t, m.Get("names[1]]").Data())
- assert.Nil(t, m.Get("names[[1]]").Data())
- assert.Nil(t, m.Get("names[[1]").Data())
- assert.Nil(t, m.Get("names[[1").Data())
-}
-
-func TestAccessorsGet(t *testing.T) {
- m := objx.Map{"name": "Tyler"}
-
- assert.Equal(t, "Tyler", m.Get("name").Data())
-}
-
-func TestAccessorsAccessSetSingleField(t *testing.T) {
- m := objx.Map{"name": "Tyler"}
-
- m.Set("name", "Mat")
- m.Set("age", 29)
-
- assert.Equal(t, m.Get("name").Data(), "Mat")
- assert.Equal(t, m.Get("age").Data(), 29)
-}
-
-func TestAccessorsAccessSetSingleFieldNotExisting(t *testing.T) {
- m := objx.Map{
- "first": "Tyler",
- "last": "Bunnell",
- }
-
- m.Set("name", "Mat")
-
- assert.Equal(t, m.Get("name").Data(), "Mat")
-}
-
-func TestAccessorsAccessSetDeep(t *testing.T) {
- m := objx.Map{
- "name": objx.Map{
- "first": "Tyler",
- "last": "Bunnell",
- },
- }
-
- m.Set("name.first", "Mat")
- m.Set("name.last", "Ryer")
-
- assert.Equal(t, "Mat", m.Get("name.first").Data())
- assert.Equal(t, "Ryer", m.Get("name.last").Data())
-}
-
-func TestAccessorsAccessSetDeepDeep(t *testing.T) {
- m := objx.Map{
- "one": objx.Map{
- "two": objx.Map{
- "three": objx.Map{
- "four": 4,
- },
- },
- },
- }
-
- m.Set("one.two.three.four", 5)
-
- assert.Equal(t, 5, m.Get("one.two.three.four").Data())
-}
-
-func TestAccessorsAccessSetArray(t *testing.T) {
- m := objx.Map{
- "names": []interface{}{"Tyler"},
- }
- m.Set("names[0]", "Mat")
-
- assert.Equal(t, "Mat", m.Get("names[0]").Data())
-}
-
-func TestAccessorsAccessSetInsideArray(t *testing.T) {
- m := objx.Map{
- "names": []interface{}{
- objx.Map{
- "first": "Tyler",
- "last": "Bunnell",
- },
- objx.Map{
- "first": "Capitol",
- "last": "Bollocks",
- },
- },
- }
-
- m.Set("names[0].first", "Mat")
- m.Set("names[0].last", "Ryer")
- m.Set("names[1].first", "Captain")
- m.Set("names[1].last", "Underpants")
-
- assert.Equal(t, "Mat", m.Get("names[0].first").Data())
- assert.Equal(t, "Ryer", m.Get("names[0].last").Data())
- assert.Equal(t, "Captain", m.Get("names[1].first").Data())
- assert.Equal(t, "Underpants", m.Get("names[1].last").Data())
-}
-
-func TestAccessorsSet(t *testing.T) {
- m := objx.Map{"name": "Tyler"}
-
- m.Set("name", "Mat")
-
- assert.Equal(t, "Mat", m.Get("name").Data())
-}
diff --git a/vendor/github.com/stretchr/objx/codegen/array-access.txt b/vendor/github.com/stretchr/objx/codegen/array-access.txt
deleted file mode 100644
index 306023475..000000000
--- a/vendor/github.com/stretchr/objx/codegen/array-access.txt
+++ /dev/null
@@ -1,14 +0,0 @@
- case []{1}:
- a := object.([]{1})
- if isSet {
- a[index] = value.({1})
- } else {
- if index >= len(a) {
- if panics {
- panic(fmt.Sprintf("objx: Index %d is out of range because the []{1} only contains %d items.", index, len(a)))
- }
- return nil
- } else {
- return a[index]
- }
- }
diff --git a/vendor/github.com/stretchr/objx/codegen/index.html b/vendor/github.com/stretchr/objx/codegen/index.html
deleted file mode 100644
index 379ffc3c0..000000000
--- a/vendor/github.com/stretchr/objx/codegen/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<html>
- <head>
- <title>
- Codegen
- </title>
- <style>
- body {
- width: 800px;
- margin: auto;
- }
- textarea {
- width: 100%;
- min-height: 100px;
- font-family: Courier;
- }
- </style>
- </head>
- <body>
-
- <h2>
- Template
- </h2>
- <p>
- Use <code>{x}</code> as a placeholder for each argument.
- </p>
- <textarea id="template"></textarea>
-
- <h2>
- Arguments (comma separated)
- </h2>
- <p>
- One block per line
- </p>
- <textarea id="args"></textarea>
-
- <h2>
- Output
- </h2>
- <input id="go" type="button" value="Generate code" />
-
- <textarea id="output"></textarea>
-
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script>
-
- $(function(){
-
- $("#go").click(function(){
-
- var output = ""
- var template = $("#template").val()
- var args = $("#args").val()
-
- // collect the args
- var argLines = args.split("\n")
- for (var line in argLines) {
-
- var argLine = argLines[line];
- var thisTemp = template
-
- // get individual args
- var args = argLine.split(",")
-
- for (var argI in args) {
- var argText = args[argI];
- var argPlaceholder = "{" + argI + "}";
-
- while (thisTemp.indexOf(argPlaceholder) > -1) {
- thisTemp = thisTemp.replace(argPlaceholder, argText);
- }
-
- }
-
- output += thisTemp
-
- }
-
- $("#output").val(output);
-
- });
-
- });
-
- </script>
- </body>
-</html>
diff --git a/vendor/github.com/stretchr/objx/codegen/template.txt b/vendor/github.com/stretchr/objx/codegen/template.txt
deleted file mode 100644
index 047bfc13f..000000000
--- a/vendor/github.com/stretchr/objx/codegen/template.txt
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- {4} ({1} and []{1})
-*/
-
-// {4} gets the value as a {1}, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) {4}(optionalDefault ...{1}) {1} {
- if s, ok := v.data.({1}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return {3}
-}
-
-// Must{4} gets the value as a {1}.
-//
-// Panics if the object is not a {1}.
-func (v *Value) Must{4}() {1} {
- return v.data.({1})
-}
-
-// {4}Slice gets the value as a []{1}, returns the optionalDefault
-// value or nil if the value is not a []{1}.
-func (v *Value) {4}Slice(optionalDefault ...[]{1}) []{1} {
- if s, ok := v.data.([]{1}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// Must{4}Slice gets the value as a []{1}.
-//
-// Panics if the object is not a []{1}.
-func (v *Value) Must{4}Slice() []{1} {
- return v.data.([]{1})
-}
-
-// Is{4} gets whether the object contained is a {1} or not.
-func (v *Value) Is{4}() bool {
- _, ok := v.data.({1})
- return ok
-}
-
-// Is{4}Slice gets whether the object contained is a []{1} or not.
-func (v *Value) Is{4}Slice() bool {
- _, ok := v.data.([]{1})
- return ok
-}
-
-// Each{4} calls the specified callback for each object
-// in the []{1}.
-//
-// Panics if the object is the wrong type.
-func (v *Value) Each{4}(callback func(int, {1}) bool) *Value {
- for index, val := range v.Must{4}Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// Where{4} uses the specified decider function to select items
-// from the []{1}. The object contained in the result will contain
-// only the selected items.
-func (v *Value) Where{4}(decider func(int, {1}) bool) *Value {
- var selected []{1}
- v.Each{4}(func(index int, val {1}) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data:selected}
-}
-
-// Group{4} uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]{1}.
-func (v *Value) Group{4}(grouper func(int, {1}) string) *Value {
- groups := make(map[string][]{1})
- v.Each{4}(func(index int, val {1}) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]{1}, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data:groups}
-}
-
-// Replace{4} uses the specified function to replace each {1}s
-// by iterating each item. The data in the returned result will be a
-// []{1} containing the replaced items.
-func (v *Value) Replace{4}(replacer func(int, {1}) {1}) *Value {
- arr := v.Must{4}Slice()
- replaced := make([]{1}, len(arr))
- v.Each{4}(func(index int, val {1}) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data:replaced}
-}
-
-// Collect{4} uses the specified collector function to collect a value
-// for each of the {1}s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) Collect{4}(collector func(int, {1}) interface{}) *Value {
- arr := v.Must{4}Slice()
- collected := make([]interface{}, len(arr))
- v.Each{4}(func(index int, val {1}) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data:collected}
-}
diff --git a/vendor/github.com/stretchr/objx/codegen/template_test.txt b/vendor/github.com/stretchr/objx/codegen/template_test.txt
deleted file mode 100644
index 6490cb2df..000000000
--- a/vendor/github.com/stretchr/objx/codegen/template_test.txt
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- Tests for {4} ({1} and []{1})
-*/
-func Test{4}(t *testing.T) {
- val := {1}({2})
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").{4}())
- assert.Equal(t, val, m.Get("value").Must{4}())
- assert.Equal(t, {1}({3}), m.Get("nothing").{4}())
- assert.Equal(t, val, m.Get("nothing").{4}({2}))
- assert.Panics(t, func() {
- m.Get("age").Must{4}()
- })
-}
-
-func Test{4}Slice(t *testing.T) {
- val := {1}({2})
- m := objx.Map{"value": []{1}{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").{4}Slice()[0])
- assert.Equal(t, val, m.Get("value").Must{4}Slice()[0])
- assert.Equal(t, []{1}(nil), m.Get("nothing").{4}Slice())
- assert.Equal(t, val, m.Get("nothing").{4}Slice([]{1}{{1}({2})})[0])
- assert.Panics(t, func() {
- m.Get("nothing").Must{4}Slice()
- })
-}
-
-func TestIs{4}(t *testing.T) {
- m := objx.Map{"data": {1}({2})}
-
- assert.True(t, m.Get("data").Is{4}())
-}
-
-func TestIs{4}Slice(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2})}}
-
- assert.True(t, m.Get("data").Is{4}Slice())
-}
-
-func TestEach{4}(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2})}}
- count := 0
- replacedVals := make([]{1}, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").Each{4}(func(i int, val {1}) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").Must{4}Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").Must{4}Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").Must{4}Slice()[2])
-}
-
-func TestWhere{4}(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2})}}
-
- selected := m.Get("data").Where{4}(func(i int, val {1}) bool {
- return i%2 == 0
- }).Must{4}Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroup{4}(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2})}}
-
- grouped := m.Get("data").Group{4}(func(i int, val {1}) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]{1})
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplace{4}(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2})}}
- rawArr := m.Get("data").Must{4}Slice()
-
- replaced := m.Get("data").Replace{4}(func(index int, val {1}) {1} {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.Must{4}Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollect{4}(t *testing.T) {
- m := objx.Map{"data": []{1}{{1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2}), {1}({2})}}
-
- collected := m.Get("data").Collect{4}(func(index int, val {1}) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
diff --git a/vendor/github.com/stretchr/objx/codegen/types_list.txt b/vendor/github.com/stretchr/objx/codegen/types_list.txt
deleted file mode 100644
index 932139d57..000000000
--- a/vendor/github.com/stretchr/objx/codegen/types_list.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Interface,interface{},"something",nil,Inter
-Map,map[string]interface{},map[string]interface{}{"name":"Tyler"},nil,MSI
-ObjxMap,(objx.Map),objx.New(1),objx.New(nil),ObjxMap
-Bool,bool,true,false,Bool
-String,string,"hello","",Str
-Int,int,1,0,Int
-Int8,int8,1,0,Int8
-Int16,int16,1,0,Int16
-Int32,int32,1,0,Int32
-Int64,int64,1,0,Int64
-Uint,uint,1,0,Uint
-Uint8,uint8,1,0,Uint8
-Uint16,uint16,1,0,Uint16
-Uint32,uint32,1,0,Uint32
-Uint64,uint64,1,0,Uint64
-Uintptr,uintptr,1,0,Uintptr
-Float32,float32,1,0,Float32
-Float64,float64,1,0,Float64
-Complex64,complex64,1,0,Complex64
-Complex128,complex128,1,0,Complex128
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go b/vendor/github.com/stretchr/objx/constants.go
index f9eb42a25..f9eb42a25 100644
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go
+++ b/vendor/github.com/stretchr/objx/constants.go
diff --git a/vendor/github.com/stretchr/objx/conversions.go b/vendor/github.com/stretchr/objx/conversions.go
index ca1c2dec6..5e020f310 100644
--- a/vendor/github.com/stretchr/objx/conversions.go
+++ b/vendor/github.com/stretchr/objx/conversions.go
@@ -9,10 +9,6 @@ import (
"net/url"
)
-// SignatureSeparator is the character that is used to
-// separate the Base64 string from the security signature.
-const SignatureSeparator = "_"
-
// JSON converts the contained object to a JSON string
// representation
func (m Map) JSON() (string, error) {
@@ -44,7 +40,10 @@ func (m Map) Base64() (string, error) {
}
encoder := base64.NewEncoder(base64.StdEncoding, &buf)
- _, _ = encoder.Write([]byte(jsonData))
+ _, err = encoder.Write([]byte(jsonData))
+ if err != nil {
+ return "", err
+ }
_ = encoder.Close()
return buf.String(), nil
diff --git a/vendor/github.com/stretchr/objx/conversions_test.go b/vendor/github.com/stretchr/objx/conversions_test.go
deleted file mode 100644
index 4584208d8..000000000
--- a/vendor/github.com/stretchr/objx/conversions_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package objx_test
-
-import (
- "net/url"
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-func TestConversionJSON(t *testing.T) {
- jsonString := `{"name":"Mat"}`
- o := objx.MustFromJSON(jsonString)
-
- result, err := o.JSON()
-
- require.NoError(t, err)
- assert.Equal(t, jsonString, result)
- assert.Equal(t, jsonString, o.MustJSON())
-}
-
-func TestConversionJSONWithError(t *testing.T) {
- o := objx.MSI()
- o["test"] = func() {}
-
- assert.Panics(t, func() {
- o.MustJSON()
- })
-
- _, err := o.JSON()
-
- assert.Error(t, err)
-}
-
-func TestConversionBase64(t *testing.T) {
- o := objx.Map{"name": "Mat"}
-
- result, err := o.Base64()
-
- require.NoError(t, err)
- assert.Equal(t, "eyJuYW1lIjoiTWF0In0=", result)
- assert.Equal(t, "eyJuYW1lIjoiTWF0In0=", o.MustBase64())
-}
-
-func TestConversionBase64WithError(t *testing.T) {
- o := objx.MSI()
- o["test"] = func() {}
-
- assert.Panics(t, func() {
- o.MustBase64()
- })
-
- _, err := o.Base64()
-
- assert.Error(t, err)
-}
-
-func TestConversionSignedBase64(t *testing.T) {
- o := objx.Map{"name": "Mat"}
-
- result, err := o.SignedBase64("key")
-
- require.NoError(t, err)
- assert.Equal(t, "eyJuYW1lIjoiTWF0In0=_67ee82916f90b2c0d68c903266e8998c9ef0c3d6", result)
- assert.Equal(t, "eyJuYW1lIjoiTWF0In0=_67ee82916f90b2c0d68c903266e8998c9ef0c3d6", o.MustSignedBase64("key"))
-}
-
-func TestConversionSignedBase64WithError(t *testing.T) {
- o := objx.MSI()
- o["test"] = func() {}
-
- assert.Panics(t, func() {
- o.MustSignedBase64("key")
- })
-
- _, err := o.SignedBase64("key")
-
- assert.Error(t, err)
-}
-
-func TestConversionURLValues(t *testing.T) {
- m := objx.Map{"abc": 123, "name": "Mat"}
- u := m.URLValues()
-
- assert.Equal(t, url.Values{"abc": []string{"123"}, "name": []string{"Mat"}}, u)
-}
-
-func TestConversionURLQuery(t *testing.T) {
- m := objx.Map{"abc": 123, "name": "Mat"}
- u, err := m.URLQuery()
-
- assert.Nil(t, err)
- require.NotNil(t, u)
- assert.Equal(t, "abc=123&name=Mat", u)
-}
diff --git a/vendor/github.com/stretchr/objx/fixture_test.go b/vendor/github.com/stretchr/objx/fixture_test.go
deleted file mode 100644
index cefe8cdc6..000000000
--- a/vendor/github.com/stretchr/objx/fixture_test.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-var fixtures = []struct {
- // name is the name of the fixture (used for reporting
- // failures)
- name string
- // data is the JSON data to be worked on
- data string
- // get is the argument(s) to pass to Get
- get interface{}
- // output is the expected output
- output interface{}
-}{
- {
- name: "Simple get",
- data: `{"name": "Mat"}`,
- get: "name",
- output: "Mat",
- },
- {
- name: "Get with dot notation",
- data: `{"address": {"city": "Boulder"}}`,
- get: "address.city",
- output: "Boulder",
- },
- {
- name: "Deep get with dot notation",
- data: `{"one": {"two": {"three": {"four": "hello"}}}}`,
- get: "one.two.three.four",
- output: "hello",
- },
- {
- name: "Get missing with dot notation",
- data: `{"one": {"two": {"three": {"four": "hello"}}}}`,
- get: "one.ten",
- output: nil,
- },
- {
- name: "Get with array notation",
- data: `{"tags": ["one", "two", "three"]}`,
- get: "tags[1]",
- output: "two",
- },
- {
- name: "Get with array and dot notation",
- data: `{"types": { "tags": ["one", "two", "three"]}}`,
- get: "types.tags[1]",
- output: "two",
- },
- {
- name: "Get with array and dot notation - field after array",
- data: `{"tags": [{"name":"one"}, {"name":"two"}, {"name":"three"}]}`,
- get: "tags[1].name",
- output: "two",
- },
- {
- name: "Complex get with array and dot notation",
- data: `{"tags": [{"list": [{"one":"pizza"}]}]}`,
- get: "tags[0].list[0].one",
- output: "pizza",
- },
- {
- name: "Get field from within string should be nil",
- data: `{"name":"Tyler"}`,
- get: "name.something",
- output: nil,
- },
- {
- name: "Get field from within string (using array accessor) should be nil",
- data: `{"numbers":["one", "two", "three"]}`,
- get: "numbers[0].nope",
- output: nil,
- },
-}
-
-func TestFixtures(t *testing.T) {
- for _, fixture := range fixtures {
- m := objx.MustFromJSON(fixture.data)
-
- // get the value
- t.Logf("Running get fixture: \"%s\" (%v)", fixture.name, fixture)
- value := m.Get(fixture.get.(string))
-
- // make sure it matches
- assert.Equal(t, fixture.output, value.Data(),
- "Get fixture \"%s\" failed: %v", fixture.name, fixture,
- )
- }
-}
diff --git a/vendor/github.com/stretchr/objx/map.go b/vendor/github.com/stretchr/objx/map.go
index 95149c06a..7e9389a20 100644
--- a/vendor/github.com/stretchr/objx/map.go
+++ b/vendor/github.com/stretchr/objx/map.go
@@ -47,8 +47,9 @@ func New(data interface{}) Map {
//
// The arguments follow a key, value pattern.
//
+// Panics
//
-// Returns nil if any key argument is non-string or if there are an odd number of arguments.
+// Panics if any key argument is non-string or if there are an odd number of arguments.
//
// Example
//
@@ -57,13 +58,14 @@ func New(data interface{}) Map {
// m := objx.MSI("name", "Mat", "age", 29, "subobj", objx.MSI("active", true))
//
// // creates an Map equivalent to
-// m := objx.Map{"name": "Mat", "age": 29, "subobj": objx.Map{"active": true}}
+// m := objx.New(map[string]interface{}{"name": "Mat", "age": 29, "subobj": map[string]interface{}{"active": true}})
func MSI(keyAndValuePairs ...interface{}) Map {
- newMap := Map{}
+ newMap := make(map[string]interface{})
keyAndValuePairsLen := len(keyAndValuePairs)
if keyAndValuePairsLen%2 != 0 {
- return nil
+ panic("objx: MSI must have an even number of arguments following the 'key, value' pattern.")
}
+
for i := 0; i < keyAndValuePairsLen; i = i + 2 {
key := keyAndValuePairs[i]
value := keyAndValuePairs[i+1]
@@ -71,11 +73,11 @@ func MSI(keyAndValuePairs ...interface{}) Map {
// make sure the key is a string
keyString, keyStringOK := key.(string)
if !keyStringOK {
- return nil
+ panic("objx: MSI must follow 'string, interface{}' pattern. " + keyString + " is not a valid key.")
}
newMap[keyString] = value
}
- return newMap
+ return New(newMap)
}
// ****** Conversion Constructors
@@ -97,50 +99,12 @@ func MustFromJSON(jsonString string) Map {
//
// Returns an error if the JSON is invalid.
func FromJSON(jsonString string) (Map, error) {
- var m Map
- err := json.Unmarshal([]byte(jsonString), &m)
+ var data interface{}
+ err := json.Unmarshal([]byte(jsonString), &data)
if err != nil {
return Nil, err
}
- m.tryConvertFloat64()
- return m, nil
-}
-
-func (m Map) tryConvertFloat64() {
- for k, v := range m {
- switch v.(type) {
- case float64:
- f := v.(float64)
- if float64(int(f)) == f {
- m[k] = int(f)
- }
- case map[string]interface{}:
- t := New(v)
- t.tryConvertFloat64()
- m[k] = t
- case []interface{}:
- m[k] = tryConvertFloat64InSlice(v.([]interface{}))
- }
- }
-}
-
-func tryConvertFloat64InSlice(s []interface{}) []interface{} {
- for k, v := range s {
- switch v.(type) {
- case float64:
- f := v.(float64)
- if float64(int(f)) == f {
- s[k] = int(f)
- }
- case map[string]interface{}:
- t := New(v)
- t.tryConvertFloat64()
- s[k] = t
- case []interface{}:
- s[k] = tryConvertFloat64InSlice(v.([]interface{}))
- }
- }
- return s
+ return New(data), nil
}
// FromBase64 creates a new Obj containing the data specified
@@ -206,11 +170,12 @@ func FromURLQuery(query string) (Map, error) {
if err != nil {
return nil, err
}
- m := Map{}
+
+ m := make(map[string]interface{})
for k, vals := range vals {
m[k] = vals[0]
}
- return m, nil
+ return New(m), nil
}
// MustFromURLQuery generates a new Obj by parsing the specified
diff --git a/vendor/github.com/stretchr/objx/map_test.go b/vendor/github.com/stretchr/objx/map_test.go
deleted file mode 100644
index 5cda629dd..000000000
--- a/vendor/github.com/stretchr/objx/map_test.go
+++ /dev/null
@@ -1,227 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-var TestMap = objx.Map{
- "name": "Tyler",
- "address": objx.Map{
- "city": "Salt Lake City",
- "state": "UT",
- },
- "numbers": []interface{}{"one", "two", "three", "four", "five"},
-}
-
-type Convertable struct {
- name string
-}
-
-type Unconvertable struct {
- name string
-}
-
-func (c *Convertable) MSI() map[string]interface{} {
- return objx.Map{"name": c.name}
-}
-
-func TestMapCreation(t *testing.T) {
- o := objx.New(nil)
- assert.Nil(t, o)
-
- o = objx.New("Tyler")
- assert.Nil(t, o)
-
- unconvertable := &Unconvertable{name: "Tyler"}
- o = objx.New(unconvertable)
- assert.Nil(t, o)
-
- convertable := &Convertable{name: "Tyler"}
- o = objx.New(convertable)
- require.NotNil(t, convertable)
- assert.Equal(t, "Tyler", o["name"])
-
- o = objx.MSI()
- assert.NotNil(t, o)
-
- o = objx.MSI("name", "Tyler")
- require.NotNil(t, o)
- assert.Equal(t, o["name"], "Tyler")
-
- o = objx.MSI(1, "a")
- assert.Nil(t, o)
-
- o = objx.MSI("a")
- assert.Nil(t, o)
-
- o = objx.MSI("a", "b", "c")
- assert.Nil(t, o)
-}
-
-func TestMapValure(t *testing.T) {
- m := objx.Map{
- "a": 1,
- }
- v := m.Value()
-
- assert.Equal(t, m, v.ObjxMap())
-}
-
-func TestMapMustFromJSONWithError(t *testing.T) {
- _, err := objx.FromJSON(`"name":"Mat"}`)
- assert.Error(t, err)
-}
-
-func TestMapFromJSON(t *testing.T) {
- o := objx.MustFromJSON(`{"name":"Mat"}`)
-
- require.NotNil(t, o)
- assert.Equal(t, "Mat", o["name"])
-}
-
-func TestMapFromJSONWithError(t *testing.T) {
- var m objx.Map
-
- assert.Panics(t, func() {
- m = objx.MustFromJSON(`"name":"Mat"}`)
- })
- assert.Nil(t, m)
-}
-
-func TestConversionJSONInt(t *testing.T) {
- jsonString :=
- `{
- "a": 1,
- "b": {
- "data": 1
- },
- "c": [1],
- "d": [[1]]
- }`
- m, err := objx.FromJSON(jsonString)
-
- assert.Nil(t, err)
- require.NotNil(t, m)
- assert.Equal(t, 1, m.Get("a").Int())
- assert.Equal(t, 1, m.Get("b.data").Int())
-
- assert.True(t, m.Get("c").IsInterSlice())
- assert.Equal(t, 1, m.Get("c").InterSlice()[0])
-
- assert.True(t, m.Get("d").IsInterSlice())
- assert.Equal(t, []interface{}{1}, m.Get("d").InterSlice()[0])
-}
-
-func TestJSONSliceInt(t *testing.T) {
- jsonString :=
- `{
- "a": [
- {"b": 1},
- {"c": 2}
- ]
- }`
- m, err := objx.FromJSON(jsonString)
-
- assert.Nil(t, err)
- require.NotNil(t, m)
- assert.Equal(t, []objx.Map{objx.Map{"b": 1}, objx.Map{"c": 2}}, m.Get("a").ObjxMapSlice())
-}
-
-func TestJSONSliceMixed(t *testing.T) {
- jsonString :=
- `{
- "a": [
- {"b": 1},
- "a"
- ]
- }`
- m, err := objx.FromJSON(jsonString)
-
- assert.Nil(t, err)
- require.NotNil(t, m)
-
- assert.Nil(t, m.Get("a").ObjxMapSlice())
-}
-
-func TestMapFromBase64String(t *testing.T) {
- base64String := "eyJuYW1lIjoiTWF0In0="
- o, err := objx.FromBase64(base64String)
-
- require.NoError(t, err)
- assert.Equal(t, o.Get("name").Str(), "Mat")
- assert.Equal(t, objx.MustFromBase64(base64String).Get("name").Str(), "Mat")
-}
-
-func TestMapFromBase64StringWithError(t *testing.T) {
- base64String := "eyJuYW1lIjoiTWFasd0In0="
- _, err := objx.FromBase64(base64String)
-
- assert.Error(t, err)
- assert.Panics(t, func() {
- objx.MustFromBase64(base64String)
- })
-}
-
-func TestMapFromSignedBase64String(t *testing.T) {
- base64String := "eyJuYW1lIjoiTWF0In0=_67ee82916f90b2c0d68c903266e8998c9ef0c3d6"
-
- o, err := objx.FromSignedBase64(base64String, "key")
-
- require.NoError(t, err)
- assert.Equal(t, o.Get("name").Str(), "Mat")
- assert.Equal(t, objx.MustFromSignedBase64(base64String, "key").Get("name").Str(), "Mat")
-}
-
-func TestMapFromSignedBase64StringWithError(t *testing.T) {
- base64String := "eyJuYW1lasdIjoiTWF0In0=_67ee82916f90b2c0d68c903266e8998c9ef0c3d6"
- _, err := objx.FromSignedBase64(base64String, "key")
- assert.Error(t, err)
- assert.Panics(t, func() {
- objx.MustFromSignedBase64(base64String, "key")
- })
-
- base64String = "eyJuYW1lasdIjoiTWF0In0=67ee82916f90b2c0d68c903266e8998c9ef0c3d6"
- _, err = objx.FromSignedBase64(base64String, "key")
- assert.Error(t, err)
- assert.Panics(t, func() {
- objx.MustFromSignedBase64(base64String, "key")
- })
-
- base64String = "eyJuYW1lIjoiTWF0In0=_67ee82916f90b2c0d68c903266e8998c9ef0c3d6_junk"
- _, err = objx.FromSignedBase64(base64String, "key")
- assert.Error(t, err)
- assert.Panics(t, func() {
- objx.MustFromSignedBase64(base64String, "key")
- })
-}
-
-func TestMapFromURLQuery(t *testing.T) {
- m, err := objx.FromURLQuery("name=tyler&state=UT")
-
- assert.NoError(t, err)
- require.NotNil(t, m)
- assert.Equal(t, "tyler", m.Get("name").Str())
- assert.Equal(t, "UT", m.Get("state").Str())
-}
-
-func TestMapMustFromURLQuery(t *testing.T) {
- m := objx.MustFromURLQuery("name=tyler&state=UT")
-
- require.NotNil(t, m)
- assert.Equal(t, "tyler", m.Get("name").Str())
- assert.Equal(t, "UT", m.Get("state").Str())
-}
-
-func TestMapFromURLQueryWithError(t *testing.T) {
- m, err := objx.FromURLQuery("%")
-
- assert.Error(t, err)
- assert.Nil(t, m)
- assert.Panics(t, func() {
- objx.MustFromURLQuery("%")
- })
-}
diff --git a/vendor/github.com/stretchr/objx/mutations.go b/vendor/github.com/stretchr/objx/mutations.go
index c3400a3f7..e7b8eb794 100644
--- a/vendor/github.com/stretchr/objx/mutations.go
+++ b/vendor/github.com/stretchr/objx/mutations.go
@@ -5,7 +5,14 @@ package objx
func (m Map) Exclude(exclude []string) Map {
excluded := make(Map)
for k, v := range m {
- if !contains(exclude, k) {
+ var shouldInclude = true
+ for _, toExclude := range exclude {
+ if k == toExclude {
+ shouldInclude = false
+ break
+ }
+ }
+ if shouldInclude {
excluded[k] = v
}
}
@@ -14,11 +21,11 @@ func (m Map) Exclude(exclude []string) Map {
// Copy creates a shallow copy of the Obj.
func (m Map) Copy() Map {
- copied := Map{}
+ copied := make(map[string]interface{})
for k, v := range m {
copied[k] = v
}
- return copied
+ return New(copied)
}
// Merge blends the specified map with a copy of this map and returns the result.
@@ -45,12 +52,12 @@ func (m Map) MergeHere(merge Map) Map {
// to change the keys and values as it goes. This method requires that
// the wrapped object be a map[string]interface{}
func (m Map) Transform(transformer func(key string, value interface{}) (string, interface{})) Map {
- newMap := Map{}
+ newMap := make(map[string]interface{})
for k, v := range m {
modifiedKey, modifiedVal := transformer(k, v)
newMap[modifiedKey] = modifiedVal
}
- return newMap
+ return New(newMap)
}
// TransformKeys builds a new map using the specified key mapping.
@@ -65,13 +72,3 @@ func (m Map) TransformKeys(mapping map[string]string) Map {
return key, value
})
}
-
-// Checks if a string slice contains a string
-func contains(s []string, e string) bool {
- for _, a := range s {
- if a == e {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/stretchr/objx/mutations_test.go b/vendor/github.com/stretchr/objx/mutations_test.go
deleted file mode 100644
index 40901ceba..000000000
--- a/vendor/github.com/stretchr/objx/mutations_test.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package objx_test
-
-import (
- "strings"
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-func TestExclude(t *testing.T) {
- m := objx.Map{
- "name": "Mat",
- "age": 29,
- "secret": "ABC",
- }
-
- excluded := m.Exclude([]string{"secret"})
-
- assert.Equal(t, m["name"], excluded["name"])
- assert.Equal(t, m["age"], excluded["age"])
- assert.False(t, excluded.Has("secret"), "secret should be excluded")
-}
-
-func TestCopy(t *testing.T) {
- m1 := objx.Map{
- "name": "Tyler",
- "location": "UT",
- }
-
- m2 := m1.Copy()
- require.NotNil(t, m2)
- m2["name"] = "Mat"
-
- assert.Equal(t, m1.Get("name").Str(), "Tyler")
- assert.Equal(t, m2.Get("name").Str(), "Mat")
-
-}
-
-func TestMerge(t *testing.T) {
- m1 := objx.Map{
- "name": "Mat",
- }
- m2 := objx.Map{
- "name": "Tyler",
- "location": "UT",
- }
-
- merged := m1.Merge(m2)
-
- assert.Equal(t, merged.Get("name").Str(), m2.Get("name").Str())
- assert.Equal(t, merged.Get("location").Str(), m2.Get("location").Str())
- assert.Empty(t, m1.Get("location").Str())
-}
-
-func TestMergeHere(t *testing.T) {
- m1 := objx.Map{
- "name": "Mat",
- }
- m2 := objx.Map{
- "name": "Tyler",
- "location": "UT",
- }
-
- merged := m1.MergeHere(m2)
-
- assert.Equal(t, m1, merged, "With MergeHere, it should return the first modified map")
- assert.Equal(t, merged.Get("name").Str(), m2.Get("name").Str())
- assert.Equal(t, merged.Get("location").Str(), m2.Get("location").Str())
- assert.Equal(t, merged.Get("location").Str(), m1.Get("location").Str())
-}
-
-func TestTransform(t *testing.T) {
- m := objx.Map{
- "name": "Mat",
- "location": "UK",
- }
- r := m.Transform(keyToUpper)
- assert.Equal(t, objx.Map{
- "NAME": "Mat",
- "LOCATION": "UK",
- }, r)
-}
-
-func TestTransformKeys(t *testing.T) {
- m := objx.Map{
- "a": "1",
- "b": "2",
- "c": "3",
- }
- mapping := map[string]string{
- "a": "d",
- "b": "e",
- }
- r := m.TransformKeys(mapping)
- assert.Equal(t, objx.Map{
- "c": "3",
- "d": "1",
- "e": "2",
- }, r)
-}
-
-func keyToUpper(s string, v interface{}) (string, interface{}) {
- return strings.ToUpper(s), v
-}
diff --git a/vendor/github.com/stretchr/objx/security.go b/vendor/github.com/stretchr/objx/security.go
index 692be8e2a..e052ff890 100644
--- a/vendor/github.com/stretchr/objx/security.go
+++ b/vendor/github.com/stretchr/objx/security.go
@@ -5,8 +5,13 @@ import (
"encoding/hex"
)
-// HashWithKey hashes the specified string using the security key
+// HashWithKey hashes the specified string using the security
+// key.
func HashWithKey(data, key string) string {
- d := sha1.Sum([]byte(data + ":" + key))
- return hex.EncodeToString(d[:])
+ hash := sha1.New()
+ _, err := hash.Write([]byte(data + ":" + key))
+ if err != nil {
+ return ""
+ }
+ return hex.EncodeToString(hash.Sum(nil))
}
diff --git a/vendor/github.com/stretchr/objx/security_test.go b/vendor/github.com/stretchr/objx/security_test.go
deleted file mode 100644
index 8c623db91..000000000
--- a/vendor/github.com/stretchr/objx/security_test.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-func TestHashWithKey(t *testing.T) {
- assert.Equal(t, "0ce84d8d01f2c7b6e0882b784429c54d280ea2d9", objx.HashWithKey("abc", "def"))
-}
diff --git a/vendor/github.com/stretchr/objx/simple_example_test.go b/vendor/github.com/stretchr/objx/simple_example_test.go
deleted file mode 100644
index 403753d65..000000000
--- a/vendor/github.com/stretchr/objx/simple_example_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-func TestSimpleExample(t *testing.T) {
- // build a map from a JSON object
- o := objx.MustFromJSON(`{"name":"Mat","foods":["indian","chinese"], "location":{"county":"hobbiton","city":"the shire"}}`)
-
- // Map can be used as a straight map[string]interface{}
- assert.Equal(t, o["name"], "Mat")
-
- // Get an Value object
- v := o.Get("name")
- require.NotNil(t, v)
-
- // Test the contained value
- assert.False(t, v.IsInt())
- assert.False(t, v.IsBool())
- assert.True(t, v.IsStr())
-
- // Get the contained value
- assert.Equal(t, v.Str(), "Mat")
-
- // Get a default value if the contained value is not of the expected type or does not exist
- assert.Equal(t, 1, v.Int(1))
-
- // Get a value by using array notation
- assert.Equal(t, "indian", o.Get("foods[0]").Data())
-
- // Set a value by using array notation
- o.Set("foods[0]", "italian")
- assert.Equal(t, "italian", o.Get("foods[0]").Str())
-
- // Get a value by using dot notation
- assert.Equal(t, "hobbiton", o.Get("location.county").Str())
-}
diff --git a/vendor/github.com/stretchr/objx/tests_test.go b/vendor/github.com/stretchr/objx/tests_test.go
deleted file mode 100644
index 94a8adaf6..000000000
--- a/vendor/github.com/stretchr/objx/tests_test.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-func TestHas(t *testing.T) {
- m := objx.Map(TestMap)
-
- assert.True(t, m.Has("name"))
- assert.True(t, m.Has("address.state"))
- assert.True(t, m.Has("numbers[4]"))
-
- assert.False(t, m.Has("address.state.nope"))
- assert.False(t, m.Has("address.nope"))
- assert.False(t, m.Has("nope"))
- assert.False(t, m.Has("numbers[5]"))
-
- m = nil
-
- assert.False(t, m.Has("nothing"))
-}
diff --git a/vendor/github.com/stretchr/objx/type_specific_codegen.go b/vendor/github.com/stretchr/objx/type_specific_codegen.go
index de4240955..202a91f8c 100644
--- a/vendor/github.com/stretchr/objx/type_specific_codegen.go
+++ b/vendor/github.com/stretchr/objx/type_specific_codegen.go
@@ -276,28 +276,13 @@ func (v *Value) MustObjxMap() Map {
// ObjxMapSlice gets the value as a [](Map), returns the optionalDefault
// value or nil if the value is not a [](Map).
func (v *Value) ObjxMapSlice(optionalDefault ...[](Map)) [](Map) {
- if s, ok := v.data.([]Map); ok {
+ if s, ok := v.data.([](Map)); ok {
return s
}
- s, ok := v.data.([]interface{})
- if !ok {
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- } else {
- return nil
- }
- }
-
- result := make([]Map, len(s))
- for i := range s {
- switch s[i].(type) {
- case Map:
- result[i] = s[i].(Map)
- default:
- return nil
- }
+ if len(optionalDefault) == 1 {
+ return optionalDefault[0]
}
- return result
+ return nil
}
// MustObjxMapSlice gets the value as a [](Map).
diff --git a/vendor/github.com/stretchr/objx/type_specific_codegen_test.go b/vendor/github.com/stretchr/objx/type_specific_codegen_test.go
deleted file mode 100644
index 4b7514602..000000000
--- a/vendor/github.com/stretchr/objx/type_specific_codegen_test.go
+++ /dev/null
@@ -1,2350 +0,0 @@
-package objx_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-/*
- Tests for Inter (interface{} and []interface{})
-*/
-func TestInter(t *testing.T) {
- val := interface{}("something")
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Inter())
- assert.Equal(t, val, m.Get("value").MustInter())
- assert.Equal(t, interface{}(nil), m.Get("nothing").Inter())
- assert.Equal(t, val, m.Get("nothing").Inter("something"))
- assert.Panics(t, func() {
- m.Get("age").MustInter()
- })
-}
-
-func TestInterSlice(t *testing.T) {
- val := interface{}("something")
- m := objx.Map{"value": []interface{}{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").InterSlice()[0])
- assert.Equal(t, val, m.Get("value").MustInterSlice()[0])
- assert.Equal(t, []interface{}(nil), m.Get("nothing").InterSlice())
- assert.Equal(t, val, m.Get("nothing").InterSlice([]interface{}{interface{}("something")})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustInterSlice()
- })
-}
-
-func TestIsInter(t *testing.T) {
- m := objx.Map{"data": interface{}("something")}
-
- assert.True(t, m.Get("data").IsInter())
-}
-
-func TestIsInterSlice(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something")}}
-
- assert.True(t, m.Get("data").IsInterSlice())
-}
-
-func TestEachInter(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
- count := 0
- replacedVals := make([]interface{}, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInter(func(i int, val interface{}) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustInterSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustInterSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustInterSlice()[2])
-}
-
-func TestWhereInter(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
- selected := m.Get("data").WhereInter(func(i int, val interface{}) bool {
- return i%2 == 0
- }).MustInterSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInter(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
- grouped := m.Get("data").GroupInter(func(i int, val interface{}) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]interface{})
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInter(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
- rawArr := m.Get("data").MustInterSlice()
- replaced := m.Get("data").ReplaceInter(func(index int, val interface{}) interface{} {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustInterSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInter(t *testing.T) {
- m := objx.Map{"data": []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
- collected := m.Get("data").CollectInter(func(index int, val interface{}) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for MSI (map[string]interface{} and []map[string]interface{})
-*/
-func TestMSI(t *testing.T) {
- val := map[string]interface{}(map[string]interface{}{"name":"Tyler"})
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").MSI())
- assert.Equal(t, val, m.Get("value").MustMSI())
- assert.Equal(t, map[string]interface{}(nil), m.Get("nothing").MSI())
- assert.Equal(t, val, m.Get("nothing").MSI(map[string]interface{}{"name":"Tyler"}))
- assert.Panics(t, func() {
- m.Get("age").MustMSI()
- })
-}
-
-func TestMSISlice(t *testing.T) {
- val := map[string]interface{}(map[string]interface{}{"name":"Tyler"})
- m := objx.Map{"value": []map[string]interface{}{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").MSISlice()[0])
- assert.Equal(t, val, m.Get("value").MustMSISlice()[0])
- assert.Equal(t, []map[string]interface{}(nil), m.Get("nothing").MSISlice())
- assert.Equal(t, val, m.Get("nothing").MSISlice([]map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"})})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustMSISlice()
- })
-}
-
-func TestIsMSI(t *testing.T) {
- m := objx.Map{"data": map[string]interface{}(map[string]interface{}{"name":"Tyler"})}
-
- assert.True(t, m.Get("data").IsMSI())
-}
-
-func TestIsMSISlice(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
-
- assert.True(t, m.Get("data").IsMSISlice())
-}
-
-func TestEachMSI(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
- count := 0
- replacedVals := make([]map[string]interface{}, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachMSI(func(i int, val map[string]interface{}) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustMSISlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustMSISlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustMSISlice()[2])
-}
-
-func TestWhereMSI(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
- selected := m.Get("data").WhereMSI(func(i int, val map[string]interface{}) bool {
- return i%2 == 0
- }).MustMSISlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupMSI(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
- grouped := m.Get("data").GroupMSI(func(i int, val map[string]interface{}) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]map[string]interface{})
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceMSI(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
- rawArr := m.Get("data").MustMSISlice()
- replaced := m.Get("data").ReplaceMSI(func(index int, val map[string]interface{}) map[string]interface{} {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustMSISlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectMSI(t *testing.T) {
- m := objx.Map{"data": []map[string]interface{}{map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"}), map[string]interface{}(map[string]interface{}{"name":"Tyler"})}}
- collected := m.Get("data").CollectMSI(func(index int, val map[string]interface{}) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for ObjxMap ((objx.Map) and [](objx.Map))
-*/
-func TestObjxMap(t *testing.T) {
- val := (objx.Map)(objx.New(1))
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").ObjxMap())
- assert.Equal(t, val, m.Get("value").MustObjxMap())
- assert.Equal(t, (objx.Map)(objx.New(nil)), m.Get("nothing").ObjxMap())
- assert.Equal(t, val, m.Get("nothing").ObjxMap(objx.New(1)))
- assert.Panics(t, func() {
- m.Get("age").MustObjxMap()
- })
-}
-
-func TestObjxMapSlice(t *testing.T) {
- val := (objx.Map)(objx.New(1))
- m := objx.Map{"value": [](objx.Map){ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").ObjxMapSlice()[0])
- assert.Equal(t, val, m.Get("value").MustObjxMapSlice()[0])
- assert.Equal(t, [](objx.Map)(nil), m.Get("nothing").ObjxMapSlice())
- assert.Equal(t, val, m.Get("nothing").ObjxMapSlice([](objx.Map){(objx.Map)(objx.New(1))})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustObjxMapSlice()
- })
-}
-
-func TestIsObjxMap(t *testing.T) {
- m := objx.Map{"data": (objx.Map)(objx.New(1))}
-
- assert.True(t, m.Get("data").IsObjxMap())
-}
-
-func TestIsObjxMapSlice(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1))}}
-
- assert.True(t, m.Get("data").IsObjxMapSlice())
-}
-
-func TestEachObjxMap(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1))}}
- count := 0
- replacedVals := make([](objx.Map), 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachObjxMap(func(i int, val (objx.Map)) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustObjxMapSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustObjxMapSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustObjxMapSlice()[2])
-}
-
-func TestWhereObjxMap(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1))}}
- selected := m.Get("data").WhereObjxMap(func(i int, val (objx.Map)) bool {
- return i%2 == 0
- }).MustObjxMapSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupObjxMap(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1))}}
- grouped := m.Get("data").GroupObjxMap(func(i int, val (objx.Map)) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][](objx.Map))
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceObjxMap(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1))}}
- rawArr := m.Get("data").MustObjxMapSlice()
- replaced := m.Get("data").ReplaceObjxMap(func(index int, val (objx.Map)) (objx.Map) {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustObjxMapSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectObjxMap(t *testing.T) {
- m := objx.Map{"data": [](objx.Map){(objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1)), (objx.Map)(objx.New(1))}}
- collected := m.Get("data").CollectObjxMap(func(index int, val (objx.Map)) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Bool (bool and []bool)
-*/
-func TestBool(t *testing.T) {
- val := bool(true)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Bool())
- assert.Equal(t, val, m.Get("value").MustBool())
- assert.Equal(t, bool(false), m.Get("nothing").Bool())
- assert.Equal(t, val, m.Get("nothing").Bool(true))
- assert.Panics(t, func() {
- m.Get("age").MustBool()
- })
-}
-
-func TestBoolSlice(t *testing.T) {
- val := bool(true)
- m := objx.Map{"value": []bool{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").BoolSlice()[0])
- assert.Equal(t, val, m.Get("value").MustBoolSlice()[0])
- assert.Equal(t, []bool(nil), m.Get("nothing").BoolSlice())
- assert.Equal(t, val, m.Get("nothing").BoolSlice([]bool{bool(true)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustBoolSlice()
- })
-}
-
-func TestIsBool(t *testing.T) {
- m := objx.Map{"data": bool(true)}
-
- assert.True(t, m.Get("data").IsBool())
-}
-
-func TestIsBoolSlice(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true)}}
-
- assert.True(t, m.Get("data").IsBoolSlice())
-}
-
-func TestEachBool(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true), bool(true), bool(true), bool(true), bool(true)}}
- count := 0
- replacedVals := make([]bool, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachBool(func(i int, val bool) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustBoolSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustBoolSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustBoolSlice()[2])
-}
-
-func TestWhereBool(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true), bool(true), bool(true), bool(true), bool(true), bool(true)}}
- selected := m.Get("data").WhereBool(func(i int, val bool) bool {
- return i%2 == 0
- }).MustBoolSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupBool(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true), bool(true), bool(true), bool(true), bool(true), bool(true)}}
- grouped := m.Get("data").GroupBool(func(i int, val bool) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]bool)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceBool(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true), bool(true), bool(true), bool(true), bool(true), bool(true)}}
- rawArr := m.Get("data").MustBoolSlice()
- replaced := m.Get("data").ReplaceBool(func(index int, val bool) bool {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustBoolSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectBool(t *testing.T) {
- m := objx.Map{"data": []bool{bool(true), bool(true), bool(true), bool(true), bool(true), bool(true)}}
- collected := m.Get("data").CollectBool(func(index int, val bool) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Str (string and []string)
-*/
-func TestStr(t *testing.T) {
- val := string("hello")
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Str())
- assert.Equal(t, val, m.Get("value").MustStr())
- assert.Equal(t, string(""), m.Get("nothing").Str())
- assert.Equal(t, val, m.Get("nothing").Str("hello"))
- assert.Panics(t, func() {
- m.Get("age").MustStr()
- })
-}
-
-func TestStrSlice(t *testing.T) {
- val := string("hello")
- m := objx.Map{"value": []string{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").StrSlice()[0])
- assert.Equal(t, val, m.Get("value").MustStrSlice()[0])
- assert.Equal(t, []string(nil), m.Get("nothing").StrSlice())
- assert.Equal(t, val, m.Get("nothing").StrSlice([]string{string("hello")})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustStrSlice()
- })
-}
-
-func TestIsStr(t *testing.T) {
- m := objx.Map{"data": string("hello")}
-
- assert.True(t, m.Get("data").IsStr())
-}
-
-func TestIsStrSlice(t *testing.T) {
- m := objx.Map{"data": []string{string("hello")}}
-
- assert.True(t, m.Get("data").IsStrSlice())
-}
-
-func TestEachStr(t *testing.T) {
- m := objx.Map{"data": []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
- count := 0
- replacedVals := make([]string, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachStr(func(i int, val string) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustStrSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustStrSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustStrSlice()[2])
-}
-
-func TestWhereStr(t *testing.T) {
- m := objx.Map{"data": []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
- selected := m.Get("data").WhereStr(func(i int, val string) bool {
- return i%2 == 0
- }).MustStrSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupStr(t *testing.T) {
- m := objx.Map{"data": []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
- grouped := m.Get("data").GroupStr(func(i int, val string) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]string)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceStr(t *testing.T) {
- m := objx.Map{"data": []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
- rawArr := m.Get("data").MustStrSlice()
- replaced := m.Get("data").ReplaceStr(func(index int, val string) string {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustStrSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectStr(t *testing.T) {
- m := objx.Map{"data": []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
- collected := m.Get("data").CollectStr(func(index int, val string) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Int (int and []int)
-*/
-func TestInt(t *testing.T) {
- val := int(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int())
- assert.Equal(t, val, m.Get("value").MustInt())
- assert.Equal(t, int(0), m.Get("nothing").Int())
- assert.Equal(t, val, m.Get("nothing").Int(1))
- assert.Panics(t, func() {
- m.Get("age").MustInt()
- })
-}
-
-func TestIntSlice(t *testing.T) {
- val := int(1)
- m := objx.Map{"value": []int{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").IntSlice()[0])
- assert.Equal(t, val, m.Get("value").MustIntSlice()[0])
- assert.Equal(t, []int(nil), m.Get("nothing").IntSlice())
- assert.Equal(t, val, m.Get("nothing").IntSlice([]int{int(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustIntSlice()
- })
-}
-
-func TestIsInt(t *testing.T) {
- m := objx.Map{"data": int(1)}
-
- assert.True(t, m.Get("data").IsInt())
-}
-
-func TestIsIntSlice(t *testing.T) {
- m := objx.Map{"data": []int{int(1)}}
-
- assert.True(t, m.Get("data").IsIntSlice())
-}
-
-func TestEachInt(t *testing.T) {
- m := objx.Map{"data": []int{int(1), int(1), int(1), int(1), int(1)}}
- count := 0
- replacedVals := make([]int, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInt(func(i int, val int) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustIntSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustIntSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustIntSlice()[2])
-}
-
-func TestWhereInt(t *testing.T) {
- m := objx.Map{"data": []int{int(1), int(1), int(1), int(1), int(1), int(1)}}
- selected := m.Get("data").WhereInt(func(i int, val int) bool {
- return i%2 == 0
- }).MustIntSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInt(t *testing.T) {
- m := objx.Map{"data": []int{int(1), int(1), int(1), int(1), int(1), int(1)}}
- grouped := m.Get("data").GroupInt(func(i int, val int) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]int)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInt(t *testing.T) {
- m := objx.Map{"data": []int{int(1), int(1), int(1), int(1), int(1), int(1)}}
- rawArr := m.Get("data").MustIntSlice()
- replaced := m.Get("data").ReplaceInt(func(index int, val int) int {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustIntSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInt(t *testing.T) {
- m := objx.Map{"data": []int{int(1), int(1), int(1), int(1), int(1), int(1)}}
- collected := m.Get("data").CollectInt(func(index int, val int) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Int8 (int8 and []int8)
-*/
-func TestInt8(t *testing.T) {
- val := int8(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int8())
- assert.Equal(t, val, m.Get("value").MustInt8())
- assert.Equal(t, int8(0), m.Get("nothing").Int8())
- assert.Equal(t, val, m.Get("nothing").Int8(1))
- assert.Panics(t, func() {
- m.Get("age").MustInt8()
- })
-}
-
-func TestInt8Slice(t *testing.T) {
- val := int8(1)
- m := objx.Map{"value": []int8{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int8Slice()[0])
- assert.Equal(t, val, m.Get("value").MustInt8Slice()[0])
- assert.Equal(t, []int8(nil), m.Get("nothing").Int8Slice())
- assert.Equal(t, val, m.Get("nothing").Int8Slice([]int8{int8(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustInt8Slice()
- })
-}
-
-func TestIsInt8(t *testing.T) {
- m := objx.Map{"data": int8(1)}
-
- assert.True(t, m.Get("data").IsInt8())
-}
-
-func TestIsInt8Slice(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1)}}
-
- assert.True(t, m.Get("data").IsInt8Slice())
-}
-
-func TestEachInt8(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1), int8(1), int8(1), int8(1), int8(1)}}
- count := 0
- replacedVals := make([]int8, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInt8(func(i int, val int8) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustInt8Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustInt8Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustInt8Slice()[2])
-}
-
-func TestWhereInt8(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
- selected := m.Get("data").WhereInt8(func(i int, val int8) bool {
- return i%2 == 0
- }).MustInt8Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInt8(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
- grouped := m.Get("data").GroupInt8(func(i int, val int8) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]int8)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInt8(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
- rawArr := m.Get("data").MustInt8Slice()
- replaced := m.Get("data").ReplaceInt8(func(index int, val int8) int8 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustInt8Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInt8(t *testing.T) {
- m := objx.Map{"data": []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
- collected := m.Get("data").CollectInt8(func(index int, val int8) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Int16 (int16 and []int16)
-*/
-func TestInt16(t *testing.T) {
- val := int16(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int16())
- assert.Equal(t, val, m.Get("value").MustInt16())
- assert.Equal(t, int16(0), m.Get("nothing").Int16())
- assert.Equal(t, val, m.Get("nothing").Int16(1))
- assert.Panics(t, func() {
- m.Get("age").MustInt16()
- })
-}
-
-func TestInt16Slice(t *testing.T) {
- val := int16(1)
- m := objx.Map{"value": []int16{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int16Slice()[0])
- assert.Equal(t, val, m.Get("value").MustInt16Slice()[0])
- assert.Equal(t, []int16(nil), m.Get("nothing").Int16Slice())
- assert.Equal(t, val, m.Get("nothing").Int16Slice([]int16{int16(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustInt16Slice()
- })
-}
-
-func TestIsInt16(t *testing.T) {
- m := objx.Map{"data": int16(1)}
-
- assert.True(t, m.Get("data").IsInt16())
-}
-
-func TestIsInt16Slice(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1)}}
-
- assert.True(t, m.Get("data").IsInt16Slice())
-}
-
-func TestEachInt16(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1), int16(1), int16(1), int16(1), int16(1)}}
- count := 0
- replacedVals := make([]int16, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInt16(func(i int, val int16) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustInt16Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustInt16Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustInt16Slice()[2])
-}
-
-func TestWhereInt16(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1), int16(1), int16(1), int16(1), int16(1), int16(1)}}
- selected := m.Get("data").WhereInt16(func(i int, val int16) bool {
- return i%2 == 0
- }).MustInt16Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInt16(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1), int16(1), int16(1), int16(1), int16(1), int16(1)}}
- grouped := m.Get("data").GroupInt16(func(i int, val int16) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]int16)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInt16(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1), int16(1), int16(1), int16(1), int16(1), int16(1)}}
- rawArr := m.Get("data").MustInt16Slice()
- replaced := m.Get("data").ReplaceInt16(func(index int, val int16) int16 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustInt16Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInt16(t *testing.T) {
- m := objx.Map{"data": []int16{int16(1), int16(1), int16(1), int16(1), int16(1), int16(1)}}
- collected := m.Get("data").CollectInt16(func(index int, val int16) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Int32 (int32 and []int32)
-*/
-func TestInt32(t *testing.T) {
- val := int32(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int32())
- assert.Equal(t, val, m.Get("value").MustInt32())
- assert.Equal(t, int32(0), m.Get("nothing").Int32())
- assert.Equal(t, val, m.Get("nothing").Int32(1))
- assert.Panics(t, func() {
- m.Get("age").MustInt32()
- })
-}
-
-func TestInt32Slice(t *testing.T) {
- val := int32(1)
- m := objx.Map{"value": []int32{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int32Slice()[0])
- assert.Equal(t, val, m.Get("value").MustInt32Slice()[0])
- assert.Equal(t, []int32(nil), m.Get("nothing").Int32Slice())
- assert.Equal(t, val, m.Get("nothing").Int32Slice([]int32{int32(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustInt32Slice()
- })
-}
-
-func TestIsInt32(t *testing.T) {
- m := objx.Map{"data": int32(1)}
-
- assert.True(t, m.Get("data").IsInt32())
-}
-
-func TestIsInt32Slice(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1)}}
-
- assert.True(t, m.Get("data").IsInt32Slice())
-}
-
-func TestEachInt32(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1), int32(1), int32(1), int32(1), int32(1)}}
- count := 0
- replacedVals := make([]int32, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInt32(func(i int, val int32) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustInt32Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustInt32Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustInt32Slice()[2])
-}
-
-func TestWhereInt32(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1), int32(1), int32(1), int32(1), int32(1), int32(1)}}
- selected := m.Get("data").WhereInt32(func(i int, val int32) bool {
- return i%2 == 0
- }).MustInt32Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInt32(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1), int32(1), int32(1), int32(1), int32(1), int32(1)}}
- grouped := m.Get("data").GroupInt32(func(i int, val int32) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]int32)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInt32(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1), int32(1), int32(1), int32(1), int32(1), int32(1)}}
- rawArr := m.Get("data").MustInt32Slice()
- replaced := m.Get("data").ReplaceInt32(func(index int, val int32) int32 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustInt32Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInt32(t *testing.T) {
- m := objx.Map{"data": []int32{int32(1), int32(1), int32(1), int32(1), int32(1), int32(1)}}
- collected := m.Get("data").CollectInt32(func(index int, val int32) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Int64 (int64 and []int64)
-*/
-func TestInt64(t *testing.T) {
- val := int64(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int64())
- assert.Equal(t, val, m.Get("value").MustInt64())
- assert.Equal(t, int64(0), m.Get("nothing").Int64())
- assert.Equal(t, val, m.Get("nothing").Int64(1))
- assert.Panics(t, func() {
- m.Get("age").MustInt64()
- })
-}
-
-func TestInt64Slice(t *testing.T) {
- val := int64(1)
- m := objx.Map{"value": []int64{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Int64Slice()[0])
- assert.Equal(t, val, m.Get("value").MustInt64Slice()[0])
- assert.Equal(t, []int64(nil), m.Get("nothing").Int64Slice())
- assert.Equal(t, val, m.Get("nothing").Int64Slice([]int64{int64(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustInt64Slice()
- })
-}
-
-func TestIsInt64(t *testing.T) {
- m := objx.Map{"data": int64(1)}
-
- assert.True(t, m.Get("data").IsInt64())
-}
-
-func TestIsInt64Slice(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1)}}
-
- assert.True(t, m.Get("data").IsInt64Slice())
-}
-
-func TestEachInt64(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1), int64(1), int64(1), int64(1), int64(1)}}
- count := 0
- replacedVals := make([]int64, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachInt64(func(i int, val int64) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustInt64Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustInt64Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustInt64Slice()[2])
-}
-
-func TestWhereInt64(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1), int64(1), int64(1), int64(1), int64(1), int64(1)}}
- selected := m.Get("data").WhereInt64(func(i int, val int64) bool {
- return i%2 == 0
- }).MustInt64Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupInt64(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1), int64(1), int64(1), int64(1), int64(1), int64(1)}}
- grouped := m.Get("data").GroupInt64(func(i int, val int64) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]int64)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceInt64(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1), int64(1), int64(1), int64(1), int64(1), int64(1)}}
- rawArr := m.Get("data").MustInt64Slice()
- replaced := m.Get("data").ReplaceInt64(func(index int, val int64) int64 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustInt64Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectInt64(t *testing.T) {
- m := objx.Map{"data": []int64{int64(1), int64(1), int64(1), int64(1), int64(1), int64(1)}}
- collected := m.Get("data").CollectInt64(func(index int, val int64) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uint (uint and []uint)
-*/
-func TestUint(t *testing.T) {
- val := uint(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint())
- assert.Equal(t, val, m.Get("value").MustUint())
- assert.Equal(t, uint(0), m.Get("nothing").Uint())
- assert.Equal(t, val, m.Get("nothing").Uint(1))
- assert.Panics(t, func() {
- m.Get("age").MustUint()
- })
-}
-
-func TestUintSlice(t *testing.T) {
- val := uint(1)
- m := objx.Map{"value": []uint{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").UintSlice()[0])
- assert.Equal(t, val, m.Get("value").MustUintSlice()[0])
- assert.Equal(t, []uint(nil), m.Get("nothing").UintSlice())
- assert.Equal(t, val, m.Get("nothing").UintSlice([]uint{uint(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUintSlice()
- })
-}
-
-func TestIsUint(t *testing.T) {
- m := objx.Map{"data": uint(1)}
-
- assert.True(t, m.Get("data").IsUint())
-}
-
-func TestIsUintSlice(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1)}}
-
- assert.True(t, m.Get("data").IsUintSlice())
-}
-
-func TestEachUint(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1), uint(1), uint(1), uint(1), uint(1)}}
- count := 0
- replacedVals := make([]uint, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUint(func(i int, val uint) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUintSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUintSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUintSlice()[2])
-}
-
-func TestWhereUint(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1), uint(1), uint(1), uint(1), uint(1), uint(1)}}
- selected := m.Get("data").WhereUint(func(i int, val uint) bool {
- return i%2 == 0
- }).MustUintSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUint(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1), uint(1), uint(1), uint(1), uint(1), uint(1)}}
- grouped := m.Get("data").GroupUint(func(i int, val uint) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uint)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUint(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1), uint(1), uint(1), uint(1), uint(1), uint(1)}}
- rawArr := m.Get("data").MustUintSlice()
- replaced := m.Get("data").ReplaceUint(func(index int, val uint) uint {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUintSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUint(t *testing.T) {
- m := objx.Map{"data": []uint{uint(1), uint(1), uint(1), uint(1), uint(1), uint(1)}}
- collected := m.Get("data").CollectUint(func(index int, val uint) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uint8 (uint8 and []uint8)
-*/
-func TestUint8(t *testing.T) {
- val := uint8(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint8())
- assert.Equal(t, val, m.Get("value").MustUint8())
- assert.Equal(t, uint8(0), m.Get("nothing").Uint8())
- assert.Equal(t, val, m.Get("nothing").Uint8(1))
- assert.Panics(t, func() {
- m.Get("age").MustUint8()
- })
-}
-
-func TestUint8Slice(t *testing.T) {
- val := uint8(1)
- m := objx.Map{"value": []uint8{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint8Slice()[0])
- assert.Equal(t, val, m.Get("value").MustUint8Slice()[0])
- assert.Equal(t, []uint8(nil), m.Get("nothing").Uint8Slice())
- assert.Equal(t, val, m.Get("nothing").Uint8Slice([]uint8{uint8(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUint8Slice()
- })
-}
-
-func TestIsUint8(t *testing.T) {
- m := objx.Map{"data": uint8(1)}
-
- assert.True(t, m.Get("data").IsUint8())
-}
-
-func TestIsUint8Slice(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1)}}
-
- assert.True(t, m.Get("data").IsUint8Slice())
-}
-
-func TestEachUint8(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1), uint8(1), uint8(1), uint8(1), uint8(1)}}
- count := 0
- replacedVals := make([]uint8, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUint8(func(i int, val uint8) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUint8Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUint8Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUint8Slice()[2])
-}
-
-func TestWhereUint8(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1)}}
- selected := m.Get("data").WhereUint8(func(i int, val uint8) bool {
- return i%2 == 0
- }).MustUint8Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUint8(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1)}}
- grouped := m.Get("data").GroupUint8(func(i int, val uint8) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uint8)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUint8(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1)}}
- rawArr := m.Get("data").MustUint8Slice()
- replaced := m.Get("data").ReplaceUint8(func(index int, val uint8) uint8 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUint8Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUint8(t *testing.T) {
- m := objx.Map{"data": []uint8{uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1)}}
- collected := m.Get("data").CollectUint8(func(index int, val uint8) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uint16 (uint16 and []uint16)
-*/
-func TestUint16(t *testing.T) {
- val := uint16(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint16())
- assert.Equal(t, val, m.Get("value").MustUint16())
- assert.Equal(t, uint16(0), m.Get("nothing").Uint16())
- assert.Equal(t, val, m.Get("nothing").Uint16(1))
- assert.Panics(t, func() {
- m.Get("age").MustUint16()
- })
-}
-
-func TestUint16Slice(t *testing.T) {
- val := uint16(1)
- m := objx.Map{"value": []uint16{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint16Slice()[0])
- assert.Equal(t, val, m.Get("value").MustUint16Slice()[0])
- assert.Equal(t, []uint16(nil), m.Get("nothing").Uint16Slice())
- assert.Equal(t, val, m.Get("nothing").Uint16Slice([]uint16{uint16(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUint16Slice()
- })
-}
-
-func TestIsUint16(t *testing.T) {
- m := objx.Map{"data": uint16(1)}
-
- assert.True(t, m.Get("data").IsUint16())
-}
-
-func TestIsUint16Slice(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1)}}
-
- assert.True(t, m.Get("data").IsUint16Slice())
-}
-
-func TestEachUint16(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1), uint16(1), uint16(1), uint16(1), uint16(1)}}
- count := 0
- replacedVals := make([]uint16, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUint16(func(i int, val uint16) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUint16Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUint16Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUint16Slice()[2])
-}
-
-func TestWhereUint16(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1), uint16(1), uint16(1), uint16(1), uint16(1), uint16(1)}}
- selected := m.Get("data").WhereUint16(func(i int, val uint16) bool {
- return i%2 == 0
- }).MustUint16Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUint16(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1), uint16(1), uint16(1), uint16(1), uint16(1), uint16(1)}}
- grouped := m.Get("data").GroupUint16(func(i int, val uint16) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uint16)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUint16(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1), uint16(1), uint16(1), uint16(1), uint16(1), uint16(1)}}
- rawArr := m.Get("data").MustUint16Slice()
- replaced := m.Get("data").ReplaceUint16(func(index int, val uint16) uint16 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUint16Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUint16(t *testing.T) {
- m := objx.Map{"data": []uint16{uint16(1), uint16(1), uint16(1), uint16(1), uint16(1), uint16(1)}}
- collected := m.Get("data").CollectUint16(func(index int, val uint16) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uint32 (uint32 and []uint32)
-*/
-func TestUint32(t *testing.T) {
- val := uint32(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint32())
- assert.Equal(t, val, m.Get("value").MustUint32())
- assert.Equal(t, uint32(0), m.Get("nothing").Uint32())
- assert.Equal(t, val, m.Get("nothing").Uint32(1))
- assert.Panics(t, func() {
- m.Get("age").MustUint32()
- })
-}
-
-func TestUint32Slice(t *testing.T) {
- val := uint32(1)
- m := objx.Map{"value": []uint32{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint32Slice()[0])
- assert.Equal(t, val, m.Get("value").MustUint32Slice()[0])
- assert.Equal(t, []uint32(nil), m.Get("nothing").Uint32Slice())
- assert.Equal(t, val, m.Get("nothing").Uint32Slice([]uint32{uint32(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUint32Slice()
- })
-}
-
-func TestIsUint32(t *testing.T) {
- m := objx.Map{"data": uint32(1)}
-
- assert.True(t, m.Get("data").IsUint32())
-}
-
-func TestIsUint32Slice(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1)}}
-
- assert.True(t, m.Get("data").IsUint32Slice())
-}
-
-func TestEachUint32(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1), uint32(1), uint32(1), uint32(1), uint32(1)}}
- count := 0
- replacedVals := make([]uint32, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUint32(func(i int, val uint32) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUint32Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUint32Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUint32Slice()[2])
-}
-
-func TestWhereUint32(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1), uint32(1), uint32(1), uint32(1), uint32(1), uint32(1)}}
- selected := m.Get("data").WhereUint32(func(i int, val uint32) bool {
- return i%2 == 0
- }).MustUint32Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUint32(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1), uint32(1), uint32(1), uint32(1), uint32(1), uint32(1)}}
- grouped := m.Get("data").GroupUint32(func(i int, val uint32) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uint32)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUint32(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1), uint32(1), uint32(1), uint32(1), uint32(1), uint32(1)}}
- rawArr := m.Get("data").MustUint32Slice()
- replaced := m.Get("data").ReplaceUint32(func(index int, val uint32) uint32 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUint32Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUint32(t *testing.T) {
- m := objx.Map{"data": []uint32{uint32(1), uint32(1), uint32(1), uint32(1), uint32(1), uint32(1)}}
- collected := m.Get("data").CollectUint32(func(index int, val uint32) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uint64 (uint64 and []uint64)
-*/
-func TestUint64(t *testing.T) {
- val := uint64(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint64())
- assert.Equal(t, val, m.Get("value").MustUint64())
- assert.Equal(t, uint64(0), m.Get("nothing").Uint64())
- assert.Equal(t, val, m.Get("nothing").Uint64(1))
- assert.Panics(t, func() {
- m.Get("age").MustUint64()
- })
-}
-
-func TestUint64Slice(t *testing.T) {
- val := uint64(1)
- m := objx.Map{"value": []uint64{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uint64Slice()[0])
- assert.Equal(t, val, m.Get("value").MustUint64Slice()[0])
- assert.Equal(t, []uint64(nil), m.Get("nothing").Uint64Slice())
- assert.Equal(t, val, m.Get("nothing").Uint64Slice([]uint64{uint64(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUint64Slice()
- })
-}
-
-func TestIsUint64(t *testing.T) {
- m := objx.Map{"data": uint64(1)}
-
- assert.True(t, m.Get("data").IsUint64())
-}
-
-func TestIsUint64Slice(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1)}}
-
- assert.True(t, m.Get("data").IsUint64Slice())
-}
-
-func TestEachUint64(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1), uint64(1), uint64(1), uint64(1), uint64(1)}}
- count := 0
- replacedVals := make([]uint64, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUint64(func(i int, val uint64) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUint64Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUint64Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUint64Slice()[2])
-}
-
-func TestWhereUint64(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1), uint64(1), uint64(1), uint64(1), uint64(1), uint64(1)}}
- selected := m.Get("data").WhereUint64(func(i int, val uint64) bool {
- return i%2 == 0
- }).MustUint64Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUint64(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1), uint64(1), uint64(1), uint64(1), uint64(1), uint64(1)}}
- grouped := m.Get("data").GroupUint64(func(i int, val uint64) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uint64)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUint64(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1), uint64(1), uint64(1), uint64(1), uint64(1), uint64(1)}}
- rawArr := m.Get("data").MustUint64Slice()
- replaced := m.Get("data").ReplaceUint64(func(index int, val uint64) uint64 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUint64Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUint64(t *testing.T) {
- m := objx.Map{"data": []uint64{uint64(1), uint64(1), uint64(1), uint64(1), uint64(1), uint64(1)}}
- collected := m.Get("data").CollectUint64(func(index int, val uint64) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Uintptr (uintptr and []uintptr)
-*/
-func TestUintptr(t *testing.T) {
- val := uintptr(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Uintptr())
- assert.Equal(t, val, m.Get("value").MustUintptr())
- assert.Equal(t, uintptr(0), m.Get("nothing").Uintptr())
- assert.Equal(t, val, m.Get("nothing").Uintptr(1))
- assert.Panics(t, func() {
- m.Get("age").MustUintptr()
- })
-}
-
-func TestUintptrSlice(t *testing.T) {
- val := uintptr(1)
- m := objx.Map{"value": []uintptr{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").UintptrSlice()[0])
- assert.Equal(t, val, m.Get("value").MustUintptrSlice()[0])
- assert.Equal(t, []uintptr(nil), m.Get("nothing").UintptrSlice())
- assert.Equal(t, val, m.Get("nothing").UintptrSlice([]uintptr{uintptr(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustUintptrSlice()
- })
-}
-
-func TestIsUintptr(t *testing.T) {
- m := objx.Map{"data": uintptr(1)}
-
- assert.True(t, m.Get("data").IsUintptr())
-}
-
-func TestIsUintptrSlice(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1)}}
-
- assert.True(t, m.Get("data").IsUintptrSlice())
-}
-
-func TestEachUintptr(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
- count := 0
- replacedVals := make([]uintptr, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachUintptr(func(i int, val uintptr) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustUintptrSlice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustUintptrSlice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustUintptrSlice()[2])
-}
-
-func TestWhereUintptr(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
- selected := m.Get("data").WhereUintptr(func(i int, val uintptr) bool {
- return i%2 == 0
- }).MustUintptrSlice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupUintptr(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
- grouped := m.Get("data").GroupUintptr(func(i int, val uintptr) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]uintptr)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceUintptr(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
- rawArr := m.Get("data").MustUintptrSlice()
- replaced := m.Get("data").ReplaceUintptr(func(index int, val uintptr) uintptr {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustUintptrSlice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectUintptr(t *testing.T) {
- m := objx.Map{"data": []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
- collected := m.Get("data").CollectUintptr(func(index int, val uintptr) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Float32 (float32 and []float32)
-*/
-func TestFloat32(t *testing.T) {
- val := float32(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Float32())
- assert.Equal(t, val, m.Get("value").MustFloat32())
- assert.Equal(t, float32(0), m.Get("nothing").Float32())
- assert.Equal(t, val, m.Get("nothing").Float32(1))
- assert.Panics(t, func() {
- m.Get("age").MustFloat32()
- })
-}
-
-func TestFloat32Slice(t *testing.T) {
- val := float32(1)
- m := objx.Map{"value": []float32{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Float32Slice()[0])
- assert.Equal(t, val, m.Get("value").MustFloat32Slice()[0])
- assert.Equal(t, []float32(nil), m.Get("nothing").Float32Slice())
- assert.Equal(t, val, m.Get("nothing").Float32Slice([]float32{float32(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustFloat32Slice()
- })
-}
-
-func TestIsFloat32(t *testing.T) {
- m := objx.Map{"data": float32(1)}
-
- assert.True(t, m.Get("data").IsFloat32())
-}
-
-func TestIsFloat32Slice(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1)}}
-
- assert.True(t, m.Get("data").IsFloat32Slice())
-}
-
-func TestEachFloat32(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1), float32(1), float32(1), float32(1), float32(1)}}
- count := 0
- replacedVals := make([]float32, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachFloat32(func(i int, val float32) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustFloat32Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustFloat32Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustFloat32Slice()[2])
-}
-
-func TestWhereFloat32(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
- selected := m.Get("data").WhereFloat32(func(i int, val float32) bool {
- return i%2 == 0
- }).MustFloat32Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupFloat32(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
- grouped := m.Get("data").GroupFloat32(func(i int, val float32) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]float32)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceFloat32(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
- rawArr := m.Get("data").MustFloat32Slice()
- replaced := m.Get("data").ReplaceFloat32(func(index int, val float32) float32 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustFloat32Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectFloat32(t *testing.T) {
- m := objx.Map{"data": []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
- collected := m.Get("data").CollectFloat32(func(index int, val float32) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Float64 (float64 and []float64)
-*/
-func TestFloat64(t *testing.T) {
- val := float64(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Float64())
- assert.Equal(t, val, m.Get("value").MustFloat64())
- assert.Equal(t, float64(0), m.Get("nothing").Float64())
- assert.Equal(t, val, m.Get("nothing").Float64(1))
- assert.Panics(t, func() {
- m.Get("age").MustFloat64()
- })
-}
-
-func TestFloat64Slice(t *testing.T) {
- val := float64(1)
- m := objx.Map{"value": []float64{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Float64Slice()[0])
- assert.Equal(t, val, m.Get("value").MustFloat64Slice()[0])
- assert.Equal(t, []float64(nil), m.Get("nothing").Float64Slice())
- assert.Equal(t, val, m.Get("nothing").Float64Slice([]float64{float64(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustFloat64Slice()
- })
-}
-
-func TestIsFloat64(t *testing.T) {
- m := objx.Map{"data": float64(1)}
-
- assert.True(t, m.Get("data").IsFloat64())
-}
-
-func TestIsFloat64Slice(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1)}}
-
- assert.True(t, m.Get("data").IsFloat64Slice())
-}
-
-func TestEachFloat64(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1), float64(1), float64(1), float64(1), float64(1)}}
- count := 0
- replacedVals := make([]float64, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachFloat64(func(i int, val float64) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustFloat64Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustFloat64Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustFloat64Slice()[2])
-}
-
-func TestWhereFloat64(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1), float64(1), float64(1), float64(1), float64(1), float64(1)}}
- selected := m.Get("data").WhereFloat64(func(i int, val float64) bool {
- return i%2 == 0
- }).MustFloat64Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupFloat64(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1), float64(1), float64(1), float64(1), float64(1), float64(1)}}
- grouped := m.Get("data").GroupFloat64(func(i int, val float64) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]float64)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceFloat64(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1), float64(1), float64(1), float64(1), float64(1), float64(1)}}
- rawArr := m.Get("data").MustFloat64Slice()
- replaced := m.Get("data").ReplaceFloat64(func(index int, val float64) float64 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustFloat64Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectFloat64(t *testing.T) {
- m := objx.Map{"data": []float64{float64(1), float64(1), float64(1), float64(1), float64(1), float64(1)}}
- collected := m.Get("data").CollectFloat64(func(index int, val float64) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Complex64 (complex64 and []complex64)
-*/
-func TestComplex64(t *testing.T) {
- val := complex64(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Complex64())
- assert.Equal(t, val, m.Get("value").MustComplex64())
- assert.Equal(t, complex64(0), m.Get("nothing").Complex64())
- assert.Equal(t, val, m.Get("nothing").Complex64(1))
- assert.Panics(t, func() {
- m.Get("age").MustComplex64()
- })
-}
-
-func TestComplex64Slice(t *testing.T) {
- val := complex64(1)
- m := objx.Map{"value": []complex64{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Complex64Slice()[0])
- assert.Equal(t, val, m.Get("value").MustComplex64Slice()[0])
- assert.Equal(t, []complex64(nil), m.Get("nothing").Complex64Slice())
- assert.Equal(t, val, m.Get("nothing").Complex64Slice([]complex64{complex64(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustComplex64Slice()
- })
-}
-
-func TestIsComplex64(t *testing.T) {
- m := objx.Map{"data": complex64(1)}
-
- assert.True(t, m.Get("data").IsComplex64())
-}
-
-func TestIsComplex64Slice(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1)}}
-
- assert.True(t, m.Get("data").IsComplex64Slice())
-}
-
-func TestEachComplex64(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1), complex64(1), complex64(1), complex64(1), complex64(1)}}
- count := 0
- replacedVals := make([]complex64, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachComplex64(func(i int, val complex64) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustComplex64Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustComplex64Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustComplex64Slice()[2])
-}
-
-func TestWhereComplex64(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1), complex64(1), complex64(1), complex64(1), complex64(1), complex64(1)}}
- selected := m.Get("data").WhereComplex64(func(i int, val complex64) bool {
- return i%2 == 0
- }).MustComplex64Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupComplex64(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1), complex64(1), complex64(1), complex64(1), complex64(1), complex64(1)}}
- grouped := m.Get("data").GroupComplex64(func(i int, val complex64) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]complex64)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceComplex64(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1), complex64(1), complex64(1), complex64(1), complex64(1), complex64(1)}}
- rawArr := m.Get("data").MustComplex64Slice()
- replaced := m.Get("data").ReplaceComplex64(func(index int, val complex64) complex64 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustComplex64Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectComplex64(t *testing.T) {
- m := objx.Map{"data": []complex64{complex64(1), complex64(1), complex64(1), complex64(1), complex64(1), complex64(1)}}
- collected := m.Get("data").CollectComplex64(func(index int, val complex64) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
-/*
- Tests for Complex128 (complex128 and []complex128)
-*/
-func TestComplex128(t *testing.T) {
- val := complex128(1)
- m := objx.Map{"value": val, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Complex128())
- assert.Equal(t, val, m.Get("value").MustComplex128())
- assert.Equal(t, complex128(0), m.Get("nothing").Complex128())
- assert.Equal(t, val, m.Get("nothing").Complex128(1))
- assert.Panics(t, func() {
- m.Get("age").MustComplex128()
- })
-}
-
-func TestComplex128Slice(t *testing.T) {
- val := complex128(1)
- m := objx.Map{"value": []complex128{ val }, "nothing": nil}
-
- assert.Equal(t, val, m.Get("value").Complex128Slice()[0])
- assert.Equal(t, val, m.Get("value").MustComplex128Slice()[0])
- assert.Equal(t, []complex128(nil), m.Get("nothing").Complex128Slice())
- assert.Equal(t, val, m.Get("nothing").Complex128Slice([]complex128{complex128(1)})[0])
- assert.Panics(t, func() {
- m.Get("nothing").MustComplex128Slice()
- })
-}
-
-func TestIsComplex128(t *testing.T) {
- m := objx.Map{"data": complex128(1)}
-
- assert.True(t, m.Get("data").IsComplex128())
-}
-
-func TestIsComplex128Slice(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1)}}
-
- assert.True(t, m.Get("data").IsComplex128Slice())
-}
-
-func TestEachComplex128(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1), complex128(1), complex128(1), complex128(1), complex128(1)}}
- count := 0
- replacedVals := make([]complex128, 0)
- assert.Equal(t, m.Get("data"), m.Get("data").EachComplex128(func(i int, val complex128) bool {
- count++
- replacedVals = append(replacedVals, val)
-
- // abort early
- return i != 2
- }))
-
- assert.Equal(t, count, 3)
- assert.Equal(t, replacedVals[0], m.Get("data").MustComplex128Slice()[0])
- assert.Equal(t, replacedVals[1], m.Get("data").MustComplex128Slice()[1])
- assert.Equal(t, replacedVals[2], m.Get("data").MustComplex128Slice()[2])
-}
-
-func TestWhereComplex128(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1), complex128(1), complex128(1), complex128(1), complex128(1), complex128(1)}}
- selected := m.Get("data").WhereComplex128(func(i int, val complex128) bool {
- return i%2 == 0
- }).MustComplex128Slice()
-
- assert.Equal(t, 3, len(selected))
-}
-
-func TestGroupComplex128(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1), complex128(1), complex128(1), complex128(1), complex128(1), complex128(1)}}
- grouped := m.Get("data").GroupComplex128(func(i int, val complex128) string {
- return fmt.Sprintf("%v", i%2==0)
- }).Data().(map[string][]complex128)
-
- assert.Equal(t, 2, len(grouped))
- assert.Equal(t, 3, len(grouped["true"]))
- assert.Equal(t, 3, len(grouped["false"]))
-}
-
-func TestReplaceComplex128(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1), complex128(1), complex128(1), complex128(1), complex128(1), complex128(1)}}
- rawArr := m.Get("data").MustComplex128Slice()
- replaced := m.Get("data").ReplaceComplex128(func(index int, val complex128) complex128 {
- if index < len(rawArr)-1 {
- return rawArr[index+1]
- }
- return rawArr[0]
- })
- replacedArr := replaced.MustComplex128Slice()
-
- if assert.Equal(t, 6, len(replacedArr)) {
- assert.Equal(t, replacedArr[0], rawArr[1])
- assert.Equal(t, replacedArr[1], rawArr[2])
- assert.Equal(t, replacedArr[2], rawArr[3])
- assert.Equal(t, replacedArr[3], rawArr[4])
- assert.Equal(t, replacedArr[4], rawArr[5])
- assert.Equal(t, replacedArr[5], rawArr[0])
- }
-}
-
-func TestCollectComplex128(t *testing.T) {
- m := objx.Map{"data": []complex128{complex128(1), complex128(1), complex128(1), complex128(1), complex128(1), complex128(1)}}
- collected := m.Get("data").CollectComplex128(func(index int, val complex128) interface{} {
- return index
- })
- collectedArr := collected.MustInterSlice()
-
- if assert.Equal(t, 6, len(collectedArr)) {
- assert.Equal(t, collectedArr[0], 0)
- assert.Equal(t, collectedArr[1], 1)
- assert.Equal(t, collectedArr[2], 2)
- assert.Equal(t, collectedArr[3], 3)
- assert.Equal(t, collectedArr[4], 4)
- assert.Equal(t, collectedArr[5], 5)
- }
-}
-
diff --git a/vendor/github.com/stretchr/objx/value.go b/vendor/github.com/stretchr/objx/value.go
index e4b4a1433..956a2211d 100644
--- a/vendor/github.com/stretchr/objx/value.go
+++ b/vendor/github.com/stretchr/objx/value.go
@@ -30,6 +30,8 @@ func (v *Value) String() string {
return strconv.FormatFloat(v.Float64(), 'f', -1, 64)
case v.IsInt():
return strconv.FormatInt(int64(v.Int()), 10)
+ case v.IsInt():
+ return strconv.FormatInt(int64(v.Int()), 10)
case v.IsInt8():
return strconv.FormatInt(int64(v.Int8()), 10)
case v.IsInt16():
@@ -49,5 +51,6 @@ func (v *Value) String() string {
case v.IsUint64():
return strconv.FormatUint(v.Uint64(), 10)
}
+
return fmt.Sprintf("%#v", v.Data())
}
diff --git a/vendor/github.com/stretchr/objx/value_test.go b/vendor/github.com/stretchr/objx/value_test.go
deleted file mode 100644
index 1b1e3091f..000000000
--- a/vendor/github.com/stretchr/objx/value_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package objx_test
-
-import (
- "testing"
-
- "github.com/stretchr/objx"
- "github.com/stretchr/testify/assert"
-)
-
-func TestStringTypeString(t *testing.T) {
- m := objx.Map{
- "string": "foo",
- }
-
- assert.Equal(t, "foo", m.Get("string").String())
-}
-
-func TestStringTypeBool(t *testing.T) {
- m := objx.Map{
- "bool": true,
- }
-
- assert.Equal(t, "true", m.Get("bool").String())
-}
-
-func TestStringTypeInt(t *testing.T) {
- m := objx.Map{
- "int": int(1),
- "int8": int8(8),
- "int16": int16(16),
- "int32": int32(32),
- "int64": int64(64),
- }
-
- assert.Equal(t, "1", m.Get("int").String())
- assert.Equal(t, "8", m.Get("int8").String())
- assert.Equal(t, "16", m.Get("int16").String())
- assert.Equal(t, "32", m.Get("int32").String())
- assert.Equal(t, "64", m.Get("int64").String())
-}
-
-func TestStringTypeUint(t *testing.T) {
- m := objx.Map{
- "uint": uint(1),
- "uint8": uint8(8),
- "uint16": uint16(16),
- "uint32": uint32(32),
- "uint64": uint64(64),
- }
-
- assert.Equal(t, "1", m.Get("uint").String())
- assert.Equal(t, "8", m.Get("uint8").String())
- assert.Equal(t, "16", m.Get("uint16").String())
- assert.Equal(t, "32", m.Get("uint32").String())
- assert.Equal(t, "64", m.Get("uint64").String())
-}
-
-func TestStringTypeFloat(t *testing.T) {
- m := objx.Map{
- "float32": float32(32.32),
- "float64": float64(64.64),
- }
-
- assert.Equal(t, "32.32", m.Get("float32").String())
- assert.Equal(t, "64.64", m.Get("float64").String())
-}
-
-func TestStringTypeOther(t *testing.T) {
- m := objx.Map{
- "other": []string{"foo", "bar"},
- }
-
- assert.Equal(t, "[]string{\"foo\", \"bar\"}", m.Get("other").String())
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/LICENSE
deleted file mode 100644
index c83641619..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-ISC License
-
-Copyright (c) 2012-2016 Dave Collins <dave@davec.name>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypass.go
deleted file mode 100644
index 8a4a6589a..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine, compiled by GopherJS, and
-// "-tags safe" is not added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build !js,!appengine,!safe,!disableunsafe
-
-package spew
-
-import (
- "reflect"
- "unsafe"
-)
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = false
-
- // ptrSize is the size of a pointer on the current arch.
- ptrSize = unsafe.Sizeof((*byte)(nil))
-)
-
-var (
- // offsetPtr, offsetScalar, and offsetFlag are the offsets for the
- // internal reflect.Value fields. These values are valid before golang
- // commit ecccf07e7f9d which changed the format. The are also valid
- // after commit 82f48826c6c7 which changed the format again to mirror
- // the original format. Code in the init function updates these offsets
- // as necessary.
- offsetPtr = uintptr(ptrSize)
- offsetScalar = uintptr(0)
- offsetFlag = uintptr(ptrSize * 2)
-
- // flagKindWidth and flagKindShift indicate various bits that the
- // reflect package uses internally to track kind information.
- //
- // flagRO indicates whether or not the value field of a reflect.Value is
- // read-only.
- //
- // flagIndir indicates whether the value field of a reflect.Value is
- // the actual data or a pointer to the data.
- //
- // These values are valid before golang commit 90a7c3c86944 which
- // changed their positions. Code in the init function updates these
- // flags as necessary.
- flagKindWidth = uintptr(5)
- flagKindShift = uintptr(flagKindWidth - 1)
- flagRO = uintptr(1 << 0)
- flagIndir = uintptr(1 << 1)
-)
-
-func init() {
- // Older versions of reflect.Value stored small integers directly in the
- // ptr field (which is named val in the older versions). Versions
- // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named
- // scalar for this purpose which unfortunately came before the flag
- // field, so the offset of the flag field is different for those
- // versions.
- //
- // This code constructs a new reflect.Value from a known small integer
- // and checks if the size of the reflect.Value struct indicates it has
- // the scalar field. When it does, the offsets are updated accordingly.
- vv := reflect.ValueOf(0xf00)
- if unsafe.Sizeof(vv) == (ptrSize * 4) {
- offsetScalar = ptrSize * 2
- offsetFlag = ptrSize * 3
- }
-
- // Commit 90a7c3c86944 changed the flag positions such that the low
- // order bits are the kind. This code extracts the kind from the flags
- // field and ensures it's the correct type. When it's not, the flag
- // order has been changed to the newer format, so the flags are updated
- // accordingly.
- upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag)
- upfv := *(*uintptr)(upf)
- flagKindMask := uintptr((1<<flagKindWidth - 1) << flagKindShift)
- if (upfv&flagKindMask)>>flagKindShift != uintptr(reflect.Int) {
- flagKindShift = 0
- flagRO = 1 << 5
- flagIndir = 1 << 6
-
- // Commit adf9b30e5594 modified the flags to separate the
- // flagRO flag into two bits which specifies whether or not the
- // field is embedded. This causes flagIndir to move over a bit
- // and means that flagRO is the combination of either of the
- // original flagRO bit and the new bit.
- //
- // This code detects the change by extracting what used to be
- // the indirect bit to ensure it's set. When it's not, the flag
- // order has been changed to the newer format, so the flags are
- // updated accordingly.
- if upfv&flagIndir == 0 {
- flagRO = 3 << 5
- flagIndir = 1 << 7
- }
- }
-}
-
-// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
-// the typical safety restrictions preventing access to unaddressable and
-// unexported data. It works by digging the raw pointer to the underlying
-// value out of the protected value and generating a new unprotected (unsafe)
-// reflect.Value to it.
-//
-// This allows us to check for implementations of the Stringer and error
-// interfaces to be used for pretty printing ordinarily unaddressable and
-// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) (rv reflect.Value) {
- indirects := 1
- vt := v.Type()
- upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr)
- rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag))
- if rvf&flagIndir != 0 {
- vt = reflect.PtrTo(v.Type())
- indirects++
- } else if offsetScalar != 0 {
- // The value is in the scalar field when it's not one of the
- // reference types.
- switch vt.Kind() {
- case reflect.Uintptr:
- case reflect.Chan:
- case reflect.Func:
- case reflect.Map:
- case reflect.Ptr:
- case reflect.UnsafePointer:
- default:
- upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) +
- offsetScalar)
- }
- }
-
- pv := reflect.NewAt(vt, upv)
- rv = pv
- for i := 0; i < indirects; i++ {
- rv = rv.Elem()
- }
- return rv
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
deleted file mode 100644
index 1fe3cf3d5..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is running on Google App Engine, compiled by GopherJS, or
-// "-tags safe" is added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe
-
-package spew
-
-import "reflect"
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = true
-)
-
-// unsafeReflectValue typically converts the passed reflect.Value into a one
-// that bypasses the typical safety restrictions preventing access to
-// unaddressable and unexported data. However, doing this relies on access to
-// the unsafe package. This is a stub version which simply returns the passed
-// reflect.Value when the unsafe package is not available.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- return v
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/common.go
deleted file mode 100644
index 7c519ff47..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/common.go
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
-)
-
-// Some constants in the form of bytes to avoid string overhead. This mirrors
-// the technique used in the fmt package.
-var (
- panicBytes = []byte("(PANIC=")
- plusBytes = []byte("+")
- iBytes = []byte("i")
- trueBytes = []byte("true")
- falseBytes = []byte("false")
- interfaceBytes = []byte("(interface {})")
- commaNewlineBytes = []byte(",\n")
- newlineBytes = []byte("\n")
- openBraceBytes = []byte("{")
- openBraceNewlineBytes = []byte("{\n")
- closeBraceBytes = []byte("}")
- asteriskBytes = []byte("*")
- colonBytes = []byte(":")
- colonSpaceBytes = []byte(": ")
- openParenBytes = []byte("(")
- closeParenBytes = []byte(")")
- spaceBytes = []byte(" ")
- pointerChainBytes = []byte("->")
- nilAngleBytes = []byte("<nil>")
- maxNewlineBytes = []byte("<max depth reached>\n")
- maxShortBytes = []byte("<max>")
- circularBytes = []byte("<already shown>")
- circularShortBytes = []byte("<shown>")
- invalidAngleBytes = []byte("<invalid>")
- openBracketBytes = []byte("[")
- closeBracketBytes = []byte("]")
- percentBytes = []byte("%")
- precisionBytes = []byte(".")
- openAngleBytes = []byte("<")
- closeAngleBytes = []byte(">")
- openMapBytes = []byte("map[")
- closeMapBytes = []byte("]")
- lenEqualsBytes = []byte("len=")
- capEqualsBytes = []byte("cap=")
-)
-
-// hexDigits is used to map a decimal value to a hex digit.
-var hexDigits = "0123456789abcdef"
-
-// catchPanic handles any panics that might occur during the handleMethods
-// calls.
-func catchPanic(w io.Writer, v reflect.Value) {
- if err := recover(); err != nil {
- w.Write(panicBytes)
- fmt.Fprintf(w, "%v", err)
- w.Write(closeParenBytes)
- }
-}
-
-// handleMethods attempts to call the Error and String methods on the underlying
-// type the passed reflect.Value represents and outputes the result to Writer w.
-//
-// It handles panics in any called methods by catching and displaying the error
-// as the formatted value.
-func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) {
- // We need an interface to check if the type implements the error or
- // Stringer interface. However, the reflect package won't give us an
- // interface on certain things like unexported struct fields in order
- // to enforce visibility rules. We use unsafe, when it's available,
- // to bypass these restrictions since this package does not mutate the
- // values.
- if !v.CanInterface() {
- if UnsafeDisabled {
- return false
- }
-
- v = unsafeReflectValue(v)
- }
-
- // Choose whether or not to do error and Stringer interface lookups against
- // the base type or a pointer to the base type depending on settings.
- // Technically calling one of these methods with a pointer receiver can
- // mutate the value, however, types which choose to satisify an error or
- // Stringer interface with a pointer receiver should not be mutating their
- // state inside these interface methods.
- if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() {
- v = unsafeReflectValue(v)
- }
- if v.CanAddr() {
- v = v.Addr()
- }
-
- // Is it an error or Stringer?
- switch iface := v.Interface().(type) {
- case error:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.Error()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
-
- w.Write([]byte(iface.Error()))
- return true
-
- case fmt.Stringer:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.String()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
- w.Write([]byte(iface.String()))
- return true
- }
- return false
-}
-
-// printBool outputs a boolean value as true or false to Writer w.
-func printBool(w io.Writer, val bool) {
- if val {
- w.Write(trueBytes)
- } else {
- w.Write(falseBytes)
- }
-}
-
-// printInt outputs a signed integer value to Writer w.
-func printInt(w io.Writer, val int64, base int) {
- w.Write([]byte(strconv.FormatInt(val, base)))
-}
-
-// printUint outputs an unsigned integer value to Writer w.
-func printUint(w io.Writer, val uint64, base int) {
- w.Write([]byte(strconv.FormatUint(val, base)))
-}
-
-// printFloat outputs a floating point value using the specified precision,
-// which is expected to be 32 or 64bit, to Writer w.
-func printFloat(w io.Writer, val float64, precision int) {
- w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))
-}
-
-// printComplex outputs a complex value using the specified float precision
-// for the real and imaginary parts to Writer w.
-func printComplex(w io.Writer, c complex128, floatPrecision int) {
- r := real(c)
- w.Write(openParenBytes)
- w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision)))
- i := imag(c)
- if i >= 0 {
- w.Write(plusBytes)
- }
- w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision)))
- w.Write(iBytes)
- w.Write(closeParenBytes)
-}
-
-// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x'
-// prefix to Writer w.
-func printHexPtr(w io.Writer, p uintptr) {
- // Null pointer.
- num := uint64(p)
- if num == 0 {
- w.Write(nilAngleBytes)
- return
- }
-
- // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix
- buf := make([]byte, 18)
-
- // It's simpler to construct the hex string right to left.
- base := uint64(16)
- i := len(buf) - 1
- for num >= base {
- buf[i] = hexDigits[num%base]
- num /= base
- i--
- }
- buf[i] = hexDigits[num]
-
- // Add '0x' prefix.
- i--
- buf[i] = 'x'
- i--
- buf[i] = '0'
-
- // Strip unused leading bytes.
- buf = buf[i:]
- w.Write(buf)
-}
-
-// valuesSorter implements sort.Interface to allow a slice of reflect.Value
-// elements to be sorted.
-type valuesSorter struct {
- values []reflect.Value
- strings []string // either nil or same len and values
- cs *ConfigState
-}
-
-// newValuesSorter initializes a valuesSorter instance, which holds a set of
-// surrogate keys on which the data should be sorted. It uses flags in
-// ConfigState to decide if and how to populate those surrogate keys.
-func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface {
- vs := &valuesSorter{values: values, cs: cs}
- if canSortSimply(vs.values[0].Kind()) {
- return vs
- }
- if !cs.DisableMethods {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- b := bytes.Buffer{}
- if !handleMethods(cs, &b, vs.values[i]) {
- vs.strings = nil
- break
- }
- vs.strings[i] = b.String()
- }
- }
- if vs.strings == nil && cs.SpewKeys {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- vs.strings[i] = Sprintf("%#v", vs.values[i].Interface())
- }
- }
- return vs
-}
-
-// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted
-// directly, or whether it should be considered for sorting by surrogate keys
-// (if the ConfigState allows it).
-func canSortSimply(kind reflect.Kind) bool {
- // This switch parallels valueSortLess, except for the default case.
- switch kind {
- case reflect.Bool:
- return true
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return true
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return true
- case reflect.Float32, reflect.Float64:
- return true
- case reflect.String:
- return true
- case reflect.Uintptr:
- return true
- case reflect.Array:
- return true
- }
- return false
-}
-
-// Len returns the number of values in the slice. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Len() int {
- return len(s.values)
-}
-
-// Swap swaps the values at the passed indices. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Swap(i, j int) {
- s.values[i], s.values[j] = s.values[j], s.values[i]
- if s.strings != nil {
- s.strings[i], s.strings[j] = s.strings[j], s.strings[i]
- }
-}
-
-// valueSortLess returns whether the first value should sort before the second
-// value. It is used by valueSorter.Less as part of the sort.Interface
-// implementation.
-func valueSortLess(a, b reflect.Value) bool {
- switch a.Kind() {
- case reflect.Bool:
- return !a.Bool() && b.Bool()
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return a.Int() < b.Int()
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return a.Uint() < b.Uint()
- case reflect.Float32, reflect.Float64:
- return a.Float() < b.Float()
- case reflect.String:
- return a.String() < b.String()
- case reflect.Uintptr:
- return a.Uint() < b.Uint()
- case reflect.Array:
- // Compare the contents of both arrays.
- l := a.Len()
- for i := 0; i < l; i++ {
- av := a.Index(i)
- bv := b.Index(i)
- if av.Interface() == bv.Interface() {
- continue
- }
- return valueSortLess(av, bv)
- }
- }
- return a.String() < b.String()
-}
-
-// Less returns whether the value at index i should sort before the
-// value at index j. It is part of the sort.Interface implementation.
-func (s *valuesSorter) Less(i, j int) bool {
- if s.strings == nil {
- return valueSortLess(s.values[i], s.values[j])
- }
- return s.strings[i] < s.strings[j]
-}
-
-// sortValues is a sort function that handles both native types and any type that
-// can be converted to error or Stringer. Other inputs are sorted according to
-// their Value.String() value to ensure display stability.
-func sortValues(values []reflect.Value, cs *ConfigState) {
- if len(values) == 0 {
- return
- }
- sort.Sort(newValuesSorter(values, cs))
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/config.go
deleted file mode 100644
index 2e3d22f31..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/config.go
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
-)
-
-// ConfigState houses the configuration options used by spew to format and
-// display values. There is a global instance, Config, that is used to control
-// all top-level Formatter and Dump functionality. Each ConfigState instance
-// provides methods equivalent to the top-level functions.
-//
-// The zero value for ConfigState provides no indentation. You would typically
-// want to set it to a space or a tab.
-//
-// Alternatively, you can use NewDefaultConfig to get a ConfigState instance
-// with default settings. See the documentation of NewDefaultConfig for default
-// values.
-type ConfigState struct {
- // Indent specifies the string to use for each indentation level. The
- // global config instance that all top-level functions use set this to a
- // single space by default. If you would like more indentation, you might
- // set this to a tab with "\t" or perhaps two spaces with " ".
- Indent string
-
- // MaxDepth controls the maximum number of levels to descend into nested
- // data structures. The default, 0, means there is no limit.
- //
- // NOTE: Circular data structures are properly detected, so it is not
- // necessary to set this value unless you specifically want to limit deeply
- // nested data structures.
- MaxDepth int
-
- // DisableMethods specifies whether or not error and Stringer interfaces are
- // invoked for types that implement them.
- DisableMethods bool
-
- // DisablePointerMethods specifies whether or not to check for and invoke
- // error and Stringer interfaces on types which only accept a pointer
- // receiver when the current type is not a pointer.
- //
- // NOTE: This might be an unsafe action since calling one of these methods
- // with a pointer receiver could technically mutate the value, however,
- // in practice, types which choose to satisify an error or Stringer
- // interface with a pointer receiver should not be mutating their state
- // inside these interface methods. As a result, this option relies on
- // access to the unsafe package, so it will not have any effect when
- // running in environments without access to the unsafe package such as
- // Google App Engine or with the "safe" build tag specified.
- DisablePointerMethods bool
-
- // DisablePointerAddresses specifies whether to disable the printing of
- // pointer addresses. This is useful when diffing data structures in tests.
- DisablePointerAddresses bool
-
- // DisableCapacities specifies whether to disable the printing of capacities
- // for arrays, slices, maps and channels. This is useful when diffing
- // data structures in tests.
- DisableCapacities bool
-
- // ContinueOnMethod specifies whether or not recursion should continue once
- // a custom error or Stringer interface is invoked. The default, false,
- // means it will print the results of invoking the custom error or Stringer
- // interface and return immediately instead of continuing to recurse into
- // the internals of the data type.
- //
- // NOTE: This flag does not have any effect if method invocation is disabled
- // via the DisableMethods or DisablePointerMethods options.
- ContinueOnMethod bool
-
- // SortKeys specifies map keys should be sorted before being printed. Use
- // this to have a more deterministic, diffable output. Note that only
- // native types (bool, int, uint, floats, uintptr and string) and types
- // that support the error or Stringer interfaces (if methods are
- // enabled) are supported, with other types sorted according to the
- // reflect.Value.String() output which guarantees display stability.
- SortKeys bool
-
- // SpewKeys specifies that, as a last resort attempt, map keys should
- // be spewed to strings and sorted by those strings. This is only
- // considered if SortKeys is true.
- SpewKeys bool
-}
-
-// Config is the active configuration of the top-level functions.
-// The configuration can be changed by modifying the contents of spew.Config.
-var Config = ConfigState{Indent: " "}
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the formatted string as a value that satisfies error. See NewFormatter
-// for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, c.convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, c.convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, c.convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a Formatter interface returned by c.NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, c.convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Print(a ...interface{}) (n int, err error) {
- return fmt.Print(c.convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, c.convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Println(a ...interface{}) (n int, err error) {
- return fmt.Println(c.convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprint(a ...interface{}) string {
- return fmt.Sprint(c.convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, c.convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a Formatter interface returned by c.NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintln(a ...interface{}) string {
- return fmt.Sprintln(c.convertArgs(a)...)
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-c.Printf, c.Println, or c.Printf.
-*/
-func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(c, v)
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {
- fdump(c, w, a...)
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by modifying the public members
-of c. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func (c *ConfigState) Dump(a ...interface{}) {
- fdump(c, os.Stdout, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func (c *ConfigState) Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(c, &buf, a...)
- return buf.String()
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a spew Formatter interface using
-// the ConfigState associated with s.
-func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = newFormatter(c, arg)
- }
- return formatters
-}
-
-// NewDefaultConfig returns a ConfigState with the following default settings.
-//
-// Indent: " "
-// MaxDepth: 0
-// DisableMethods: false
-// DisablePointerMethods: false
-// ContinueOnMethod: false
-// SortKeys: false
-func NewDefaultConfig() *ConfigState {
- return &ConfigState{Indent: " "}
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/doc.go
deleted file mode 100644
index aacaac6f1..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Package spew implements a deep pretty printer for Go data structures to aid in
-debugging.
-
-A quick overview of the additional features spew provides over the built-in
-printing facilities for Go data types are as follows:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output (only when using
- Dump style)
-
-There are two different approaches spew allows for dumping Go data structures:
-
- * Dump style which prints with newlines, customizable indentation,
- and additional debug information such as types and all pointer addresses
- used to indirect to the final value
- * A custom Formatter interface that integrates cleanly with the standard fmt
- package and replaces %v, %+v, %#v, and %#+v to provide inline printing
- similar to the default %v while providing the additional functionality
- outlined above and passing unsupported format verbs such as %x and %q
- along to fmt
-
-Quick Start
-
-This section demonstrates how to quickly get started with spew. See the
-sections below for further details on formatting and configuration options.
-
-To dump a variable with full newlines, indentation, type, and pointer
-information use Dump, Fdump, or Sdump:
- spew.Dump(myVar1, myVar2, ...)
- spew.Fdump(someWriter, myVar1, myVar2, ...)
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Alternatively, if you would prefer to use format strings with a compacted inline
-printing style, use the convenience wrappers Printf, Fprintf, etc with
-%v (most compact), %+v (adds pointer addresses), %#v (adds types), or
-%#+v (adds types and pointer addresses):
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-Configuration Options
-
-Configuration of spew is handled by fields in the ConfigState type. For
-convenience, all of the top-level functions use a global state available
-via the spew.Config global.
-
-It is also possible to create a ConfigState instance that provides methods
-equivalent to the top-level functions. This allows concurrent configuration
-options. See the ConfigState documentation for more details.
-
-The following configuration options are available:
- * Indent
- String to use for each indentation level for Dump functions.
- It is a single space by default. A popular alternative is "\t".
-
- * MaxDepth
- Maximum number of levels to descend into nested data structures.
- There is no limit by default.
-
- * DisableMethods
- Disables invocation of error and Stringer interface methods.
- Method invocation is enabled by default.
-
- * DisablePointerMethods
- Disables invocation of error and Stringer interface methods on types
- which only accept pointer receivers from non-pointer variables.
- Pointer method invocation is enabled by default.
-
- * DisablePointerAddresses
- DisablePointerAddresses specifies whether to disable the printing of
- pointer addresses. This is useful when diffing data structures in tests.
-
- * DisableCapacities
- DisableCapacities specifies whether to disable the printing of
- capacities for arrays, slices, maps and channels. This is useful when
- diffing data structures in tests.
-
- * ContinueOnMethod
- Enables recursion into types after invoking error and Stringer interface
- methods. Recursion after method invocation is disabled by default.
-
- * SortKeys
- Specifies map keys should be sorted before being printed. Use
- this to have a more deterministic, diffable output. Note that
- only native types (bool, int, uint, floats, uintptr and string)
- and types which implement error or Stringer interfaces are
- supported with other types sorted according to the
- reflect.Value.String() output which guarantees display
- stability. Natural map order is used by default.
-
- * SpewKeys
- Specifies that, as a last resort attempt, map keys should be
- spewed to strings and sorted by those strings. This is only
- considered if SortKeys is true.
-
-Dump Usage
-
-Simply call spew.Dump with a list of variables you want to dump:
-
- spew.Dump(myVar1, myVar2, ...)
-
-You may also call spew.Fdump if you would prefer to output to an arbitrary
-io.Writer. For example, to dump to standard error:
-
- spew.Fdump(os.Stderr, myVar1, myVar2, ...)
-
-A third option is to call spew.Sdump to get the formatted output as a string:
-
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Sample Dump Output
-
-See the Dump example for details on the setup of the types and variables being
-shown here.
-
- (main.Foo) {
- unexportedField: (*main.Bar)(0xf84002e210)({
- flag: (main.Flag) flagTwo,
- data: (uintptr) <nil>
- }),
- ExportedField: (map[interface {}]interface {}) (len=1) {
- (string) (len=3) "one": (bool) true
- }
- }
-
-Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C
-command as shown.
- ([]uint8) (len=32 cap=32) {
- 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- 00000020 31 32 |12|
- }
-
-Custom Formatter
-
-Spew provides a custom formatter that implements the fmt.Formatter interface
-so that it integrates cleanly with standard fmt package printing functions. The
-formatter is useful for inline printing of smaller data types similar to the
-standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Custom Formatter Usage
-
-The simplest way to make use of the spew custom formatter is to call one of the
-convenience functions such as spew.Printf, spew.Println, or spew.Printf. The
-functions have syntax you are most likely already familiar with:
-
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Println(myVar, myVar2)
- spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-See the Index for the full list convenience functions.
-
-Sample Formatter Output
-
-Double pointer to a uint8:
- %v: <**>5
- %+v: <**>(0xf8400420d0->0xf8400420c8)5
- %#v: (**uint8)5
- %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
-
-Pointer to circular struct with a uint8 field and a pointer to itself:
- %v: <*>{1 <*><shown>}
- %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}
- %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}
- %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}
-
-See the Printf example for details on the setup of variables being shown
-here.
-
-Errors
-
-Since it is possible for custom Stringer/error interfaces to panic, spew
-detects them and handles them internally by printing the panic information
-inline with the output. Since spew is intended to provide deep pretty printing
-capabilities on structures, it intentionally does not return any errors.
-*/
-package spew
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/dump.go
deleted file mode 100644
index df1d582a7..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "io"
- "os"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-)
-
-var (
- // uint8Type is a reflect.Type representing a uint8. It is used to
- // convert cgo types to uint8 slices for hexdumping.
- uint8Type = reflect.TypeOf(uint8(0))
-
- // cCharRE is a regular expression that matches a cgo char.
- // It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile("^.*\\._Ctype_char$")
-
- // cUnsignedCharRE is a regular expression that matches a cgo unsigned
- // char. It is used to detect unsigned character arrays to hexdump
- // them.
- cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$")
-
- // cUint8tCharRE is a regular expression that matches a cgo uint8_t.
- // It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$")
-)
-
-// dumpState contains information about the state of a dump operation.
-type dumpState struct {
- w io.Writer
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- ignoreNextIndent bool
- cs *ConfigState
-}
-
-// indent performs indentation according to the depth level and cs.Indent
-// option.
-func (d *dumpState) indent() {
- if d.ignoreNextIndent {
- d.ignoreNextIndent = false
- return
- }
- d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth))
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (d *dumpState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface && !v.IsNil() {
- v = v.Elem()
- }
- return v
-}
-
-// dumpPtr handles formatting of pointers by indirecting them as necessary.
-func (d *dumpState) dumpPtr(v reflect.Value) {
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range d.pointers {
- if depth >= d.depth {
- delete(d.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by dereferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := d.pointers[addr]; ok && pd < d.depth {
- cycleFound = true
- indirects--
- break
- }
- d.pointers[addr] = d.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type information.
- d.w.Write(openParenBytes)
- d.w.Write(bytes.Repeat(asteriskBytes, indirects))
- d.w.Write([]byte(ve.Type().String()))
- d.w.Write(closeParenBytes)
-
- // Display pointer information.
- if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
- d.w.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- d.w.Write(pointerChainBytes)
- }
- printHexPtr(d.w, addr)
- }
- d.w.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- d.w.Write(openParenBytes)
- switch {
- case nilFound == true:
- d.w.Write(nilAngleBytes)
-
- case cycleFound == true:
- d.w.Write(circularBytes)
-
- default:
- d.ignoreNextType = true
- d.dump(ve)
- }
- d.w.Write(closeParenBytes)
-}
-
-// dumpSlice handles formatting of arrays and slices. Byte (uint8 under
-// reflection) arrays and slices are dumped in hexdump -C fashion.
-func (d *dumpState) dumpSlice(v reflect.Value) {
- // Determine whether this type should be hex dumped or not. Also,
- // for types which should be hexdumped, try to use the underlying data
- // first, then fall back to trying to convert them to a uint8 slice.
- var buf []uint8
- doConvert := false
- doHexDump := false
- numEntries := v.Len()
- if numEntries > 0 {
- vt := v.Index(0).Type()
- vts := vt.String()
- switch {
- // C types that need to be converted.
- case cCharRE.MatchString(vts):
- fallthrough
- case cUnsignedCharRE.MatchString(vts):
- fallthrough
- case cUint8tCharRE.MatchString(vts):
- doConvert = true
-
- // Try to use existing uint8 slices and fall back to converting
- // and copying if that fails.
- case vt.Kind() == reflect.Uint8:
- // We need an addressable interface to convert the type
- // to a byte slice. However, the reflect package won't
- // give us an interface on certain things like
- // unexported struct fields in order to enforce
- // visibility rules. We use unsafe, when available, to
- // bypass these restrictions since this package does not
- // mutate the values.
- vs := v
- if !vs.CanInterface() || !vs.CanAddr() {
- vs = unsafeReflectValue(vs)
- }
- if !UnsafeDisabled {
- vs = vs.Slice(0, numEntries)
-
- // Use the existing uint8 slice if it can be
- // type asserted.
- iface := vs.Interface()
- if slice, ok := iface.([]uint8); ok {
- buf = slice
- doHexDump = true
- break
- }
- }
-
- // The underlying data needs to be converted if it can't
- // be type asserted to a uint8 slice.
- doConvert = true
- }
-
- // Copy and convert the underlying type if needed.
- if doConvert && vt.ConvertibleTo(uint8Type) {
- // Convert and copy each element into a uint8 byte
- // slice.
- buf = make([]uint8, numEntries)
- for i := 0; i < numEntries; i++ {
- vv := v.Index(i)
- buf[i] = uint8(vv.Convert(uint8Type).Uint())
- }
- doHexDump = true
- }
- }
-
- // Hexdump the entire slice as needed.
- if doHexDump {
- indent := strings.Repeat(d.cs.Indent, d.depth)
- str := indent + hex.Dump(buf)
- str = strings.Replace(str, "\n", "\n"+indent, -1)
- str = strings.TrimRight(str, d.cs.Indent)
- d.w.Write([]byte(str))
- return
- }
-
- // Recursively call dump for each item.
- for i := 0; i < numEntries; i++ {
- d.dump(d.unpackValue(v.Index(i)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
-}
-
-// dump is the main workhorse for dumping a value. It uses the passed reflect
-// value to figure out what kind of object we are dealing with and formats it
-// appropriately. It is a recursive function, however circular data structures
-// are detected and handled properly.
-func (d *dumpState) dump(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- d.w.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- d.indent()
- d.dumpPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !d.ignoreNextType {
- d.indent()
- d.w.Write(openParenBytes)
- d.w.Write([]byte(v.Type().String()))
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
- d.ignoreNextType = false
-
- // Display length and capacity if the built-in len and cap functions
- // work with the value's kind and the len/cap itself is non-zero.
- valueLen, valueCap := 0, 0
- switch v.Kind() {
- case reflect.Array, reflect.Slice, reflect.Chan:
- valueLen, valueCap = v.Len(), v.Cap()
- case reflect.Map, reflect.String:
- valueLen = v.Len()
- }
- if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
- d.w.Write(openParenBytes)
- if valueLen != 0 {
- d.w.Write(lenEqualsBytes)
- printInt(d.w, int64(valueLen), 10)
- }
- if !d.cs.DisableCapacities && valueCap != 0 {
- if valueLen != 0 {
- d.w.Write(spaceBytes)
- }
- d.w.Write(capEqualsBytes)
- printInt(d.w, int64(valueCap), 10)
- }
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
-
- // Call Stringer/error interfaces if they exist and the handle methods flag
- // is enabled
- if !d.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(d.cs, d.w, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(d.w, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(d.w, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(d.w, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(d.w, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(d.w, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(d.w, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(d.w, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- d.dumpSlice(v)
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.String:
- d.w.Write([]byte(strconv.Quote(v.String())))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
-
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- numEntries := v.Len()
- keys := v.MapKeys()
- if d.cs.SortKeys {
- sortValues(keys, d.cs)
- }
- for i, key := range keys {
- d.dump(d.unpackValue(key))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.MapIndex(key)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Struct:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- vt := v.Type()
- numFields := v.NumField()
- for i := 0; i < numFields; i++ {
- d.indent()
- vtf := vt.Field(i)
- d.w.Write([]byte(vtf.Name))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.Field(i)))
- if i < (numFields - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(d.w, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(d.w, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it in case any new
- // types are added.
- default:
- if v.CanInterface() {
- fmt.Fprintf(d.w, "%v", v.Interface())
- } else {
- fmt.Fprintf(d.w, "%v", v.String())
- }
- }
-}
-
-// fdump is a helper function to consolidate the logic from the various public
-// methods which take varying writers and config states.
-func fdump(cs *ConfigState, w io.Writer, a ...interface{}) {
- for _, arg := range a {
- if arg == nil {
- w.Write(interfaceBytes)
- w.Write(spaceBytes)
- w.Write(nilAngleBytes)
- w.Write(newlineBytes)
- continue
- }
-
- d := dumpState{w: w, cs: cs}
- d.pointers = make(map[uintptr]int)
- d.dump(reflect.ValueOf(arg))
- d.w.Write(newlineBytes)
- }
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func Fdump(w io.Writer, a ...interface{}) {
- fdump(&Config, w, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(&Config, &buf, a...)
- return buf.String()
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by an exported package global,
-spew.Config. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func Dump(a ...interface{}) {
- fdump(&Config, os.Stdout, a...)
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/format.go
deleted file mode 100644
index c49875bac..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/format.go
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-)
-
-// supportedFlags is a list of all the character flags supported by fmt package.
-const supportedFlags = "0-+# "
-
-// formatState implements the fmt.Formatter interface and contains information
-// about the state of a formatting operation. The NewFormatter function can
-// be used to get a new Formatter which can be used directly as arguments
-// in standard fmt package printing calls.
-type formatState struct {
- value interface{}
- fs fmt.State
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- cs *ConfigState
-}
-
-// buildDefaultFormat recreates the original format string without precision
-// and width information to pass in to fmt.Sprintf in the case of an
-// unrecognized type. Unless new types are added to the language, this
-// function won't ever be called.
-func (f *formatState) buildDefaultFormat() (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- buf.WriteRune('v')
-
- format = buf.String()
- return format
-}
-
-// constructOrigFormat recreates the original format string including precision
-// and width information to pass along to the standard fmt package. This allows
-// automatic deferral of all format strings this package doesn't support.
-func (f *formatState) constructOrigFormat(verb rune) (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- if width, ok := f.fs.Width(); ok {
- buf.WriteString(strconv.Itoa(width))
- }
-
- if precision, ok := f.fs.Precision(); ok {
- buf.Write(precisionBytes)
- buf.WriteString(strconv.Itoa(precision))
- }
-
- buf.WriteRune(verb)
-
- format = buf.String()
- return format
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible and
-// ensures that types for values which have been unpacked from an interface
-// are displayed when the show types flag is also set.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (f *formatState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface {
- f.ignoreNextType = false
- if !v.IsNil() {
- v = v.Elem()
- }
- }
- return v
-}
-
-// formatPtr handles formatting of pointers by indirecting them as necessary.
-func (f *formatState) formatPtr(v reflect.Value) {
- // Display nil if top level pointer is nil.
- showTypes := f.fs.Flag('#')
- if v.IsNil() && (!showTypes || f.ignoreNextType) {
- f.fs.Write(nilAngleBytes)
- return
- }
-
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range f.pointers {
- if depth >= f.depth {
- delete(f.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to possibly show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by derferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := f.pointers[addr]; ok && pd < f.depth {
- cycleFound = true
- indirects--
- break
- }
- f.pointers[addr] = f.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type or indirection level depending on flags.
- if showTypes && !f.ignoreNextType {
- f.fs.Write(openParenBytes)
- f.fs.Write(bytes.Repeat(asteriskBytes, indirects))
- f.fs.Write([]byte(ve.Type().String()))
- f.fs.Write(closeParenBytes)
- } else {
- if nilFound || cycleFound {
- indirects += strings.Count(ve.Type().String(), "*")
- }
- f.fs.Write(openAngleBytes)
- f.fs.Write([]byte(strings.Repeat("*", indirects)))
- f.fs.Write(closeAngleBytes)
- }
-
- // Display pointer information depending on flags.
- if f.fs.Flag('+') && (len(pointerChain) > 0) {
- f.fs.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- f.fs.Write(pointerChainBytes)
- }
- printHexPtr(f.fs, addr)
- }
- f.fs.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- switch {
- case nilFound == true:
- f.fs.Write(nilAngleBytes)
-
- case cycleFound == true:
- f.fs.Write(circularShortBytes)
-
- default:
- f.ignoreNextType = true
- f.format(ve)
- }
-}
-
-// format is the main workhorse for providing the Formatter interface. It
-// uses the passed reflect value to figure out what kind of object we are
-// dealing with and formats it appropriately. It is a recursive function,
-// however circular data structures are detected and handled properly.
-func (f *formatState) format(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- f.fs.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- f.formatPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !f.ignoreNextType && f.fs.Flag('#') {
- f.fs.Write(openParenBytes)
- f.fs.Write([]byte(v.Type().String()))
- f.fs.Write(closeParenBytes)
- }
- f.ignoreNextType = false
-
- // Call Stringer/error interfaces if they exist and the handle methods
- // flag is enabled.
- if !f.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(f.cs, f.fs, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(f.fs, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(f.fs, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(f.fs, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(f.fs, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(f.fs, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(f.fs, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(f.fs, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- f.fs.Write(openBracketBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- numEntries := v.Len()
- for i := 0; i < numEntries; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(v.Index(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBracketBytes)
-
- case reflect.String:
- f.fs.Write([]byte(v.String()))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
-
- f.fs.Write(openMapBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- keys := v.MapKeys()
- if f.cs.SortKeys {
- sortValues(keys, f.cs)
- }
- for i, key := range keys {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(key))
- f.fs.Write(colonBytes)
- f.ignoreNextType = true
- f.format(f.unpackValue(v.MapIndex(key)))
- }
- }
- f.depth--
- f.fs.Write(closeMapBytes)
-
- case reflect.Struct:
- numFields := v.NumField()
- f.fs.Write(openBraceBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- vt := v.Type()
- for i := 0; i < numFields; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- vtf := vt.Field(i)
- if f.fs.Flag('+') || f.fs.Flag('#') {
- f.fs.Write([]byte(vtf.Name))
- f.fs.Write(colonBytes)
- }
- f.format(f.unpackValue(v.Field(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(f.fs, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(f.fs, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it if any get added.
- default:
- format := f.buildDefaultFormat()
- if v.CanInterface() {
- fmt.Fprintf(f.fs, format, v.Interface())
- } else {
- fmt.Fprintf(f.fs, format, v.String())
- }
- }
-}
-
-// Format satisfies the fmt.Formatter interface. See NewFormatter for usage
-// details.
-func (f *formatState) Format(fs fmt.State, verb rune) {
- f.fs = fs
-
- // Use standard formatting for verbs that are not v.
- if verb != 'v' {
- format := f.constructOrigFormat(verb)
- fmt.Fprintf(fs, format, f.value)
- return
- }
-
- if f.value == nil {
- if fs.Flag('#') {
- fs.Write(interfaceBytes)
- }
- fs.Write(nilAngleBytes)
- return
- }
-
- f.format(reflect.ValueOf(f.value))
-}
-
-// newFormatter is a helper function to consolidate the logic from the various
-// public methods which take varying config states.
-func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter {
- fs := &formatState{value: v, cs: cs}
- fs.pointers = make(map[uintptr]int)
- return fs
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-Printf, Println, or Fprintf.
-*/
-func NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(&Config, v)
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/spew.go
deleted file mode 100644
index 32c0e3388..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "fmt"
- "io"
-)
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the formatted string as a value that satisfies error. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a default Formatter interface returned by NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b))
-func Print(a ...interface{}) (n int, err error) {
- return fmt.Print(convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b))
-func Println(a ...interface{}) (n int, err error) {
- return fmt.Println(convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprint(a ...interface{}) string {
- return fmt.Sprint(convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintln(a ...interface{}) string {
- return fmt.Sprintln(convertArgs(a)...)
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a default spew Formatter interface.
-func convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = NewFormatter(arg)
- }
- return formatters
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/LICENSE
deleted file mode 100644
index c67dad612..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-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/stretchr/objx/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/difflib/difflib.go
deleted file mode 100644
index 003e99fad..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/pmezard/go-difflib/difflib/difflib.go
+++ /dev/null
@@ -1,772 +0,0 @@
-// Package difflib is a partial port of Python difflib module.
-//
-// It provides tools to compare sequences of strings and generate textual diffs.
-//
-// The following class and functions have been ported:
-//
-// - SequenceMatcher
-//
-// - unified_diff
-//
-// - context_diff
-//
-// Getting unified diffs was the main goal of the port. Keep in mind this code
-// is mostly suitable to output text differences in a human friendly way, there
-// are no guarantees generated diffs are consumable by patch(1).
-package difflib
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "strings"
-)
-
-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
-}
-
-func calculateRatio(matches, length int) float64 {
- if length > 0 {
- return 2.0 * float64(matches) / float64(length)
- }
- return 1.0
-}
-
-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 "<P>" lines in HTML files). That may be
-// because this is the only method of the 3 that has a *concept* of
-// "junk" <wink>.
-//
-// 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
-}
-
-func NewMatcherWithJunk(a, b []string, autoJunk bool,
- isJunk func(string) bool) *SequenceMatcher {
-
- m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk}
- 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
-}
-
-// Return a measure of the sequences' similarity (float in [0,1]).
-//
-// Where T is the total number of elements in both sequences, and
-// M is the number of matches, this is 2.0*M / T.
-// Note that this is 1 if the sequences are identical, and 0 if
-// they have nothing in common.
-//
-// .Ratio() is expensive to compute if you haven't already computed
-// .GetMatchingBlocks() or .GetOpCodes(), in which case you may
-// want to try .QuickRatio() or .RealQuickRation() first to get an
-// upper bound.
-func (m *SequenceMatcher) Ratio() float64 {
- matches := 0
- for _, m := range m.GetMatchingBlocks() {
- matches += m.Size
- }
- return calculateRatio(matches, len(m.a)+len(m.b))
-}
-
-// Return an upper bound on ratio() relatively quickly.
-//
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
-// is faster to compute.
-func (m *SequenceMatcher) QuickRatio() float64 {
- // viewing a and b as multisets, set matches to the cardinality
- // of their intersection; this counts the number of matches
- // without regard to order, so is clearly an upper bound
- if m.fullBCount == nil {
- m.fullBCount = map[string]int{}
- for _, s := range m.b {
- m.fullBCount[s] = m.fullBCount[s] + 1
- }
- }
-
- // avail[x] is the number of times x appears in 'b' less the
- // number of times we've seen it in 'a' so far ... kinda
- avail := map[string]int{}
- matches := 0
- for _, s := range m.a {
- n, ok := avail[s]
- if !ok {
- n = m.fullBCount[s]
- }
- avail[s] = n - 1
- if n > 0 {
- matches += 1
- }
- }
- return calculateRatio(matches, len(m.a)+len(m.b))
-}
-
-// Return an upper bound on ratio() very quickly.
-//
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
-// is faster to compute than either .Ratio() or .QuickRatio().
-func (m *SequenceMatcher) RealQuickRatio() float64 {
- la, lb := len(m.a), len(m.b)
- return calculateRatio(min(la, lb), la+lb)
-}
-
-// 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 -= 1 // empty ranges begin at line just before the range
- }
- return fmt.Sprintf("%d,%d", beginning, length)
-}
-
-// Unified diff parameters
-type UnifiedDiff struct {
- A []string // First sequence lines
- FromFile string // First file name
- FromDate string // First file time
- B []string // Second sequence lines
- ToFile string // Second file name
- ToDate string // Second file time
- Eol string // Headers end of line, defaults to LF
- Context int // Number of context lines
-}
-
-// Compare two sequences of lines; generate the delta as a unified diff.
-//
-// Unified diffs are a compact way of showing line changes and a few
-// lines of context. The number of context lines is set by 'n' which
-// defaults to three.
-//
-// By default, the diff control lines (those with ---, +++, or @@) are
-// created with a trailing newline. This is helpful so that inputs
-// created from file.readlines() result in diffs that are suitable for
-// file.writelines() since both the inputs and outputs have trailing
-// newlines.
-//
-// For inputs that do not have trailing newlines, set the lineterm
-// argument to "" so that the output will be uniformly newline free.
-//
-// The unidiff format normally has a header for filenames and modification
-// times. Any or all of these may be specified using strings for
-// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
-// The modification times are normally expressed in the ISO 8601 format.
-func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error {
- buf := bufio.NewWriter(writer)
- defer buf.Flush()
- wf := func(format string, args ...interface{}) error {
- _, err := buf.WriteString(fmt.Sprintf(format, args...))
- return err
- }
- ws := func(s string) error {
- _, err := buf.WriteString(s)
- return err
- }
-
- if len(diff.Eol) == 0 {
- diff.Eol = "\n"
- }
-
- started := false
- m := NewMatcher(diff.A, diff.B)
- for _, g := range m.GetGroupedOpCodes(diff.Context) {
- if !started {
- started = true
- fromDate := ""
- if len(diff.FromDate) > 0 {
- fromDate = "\t" + diff.FromDate
- }
- toDate := ""
- if len(diff.ToDate) > 0 {
- toDate = "\t" + diff.ToDate
- }
- if diff.FromFile != "" || diff.ToFile != "" {
- err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol)
- if err != nil {
- return err
- }
- err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol)
- if err != nil {
- return err
- }
- }
- }
- first, last := g[0], g[len(g)-1]
- range1 := formatRangeUnified(first.I1, last.I2)
- range2 := formatRangeUnified(first.J1, last.J2)
- if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil {
- return err
- }
- for _, c := range g {
- i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
- if c.Tag == 'e' {
- for _, line := range diff.A[i1:i2] {
- if err := ws(" " + line); err != nil {
- return err
- }
- }
- continue
- }
- if c.Tag == 'r' || c.Tag == 'd' {
- for _, line := range diff.A[i1:i2] {
- if err := ws("-" + line); err != nil {
- return err
- }
- }
- }
- if c.Tag == 'r' || c.Tag == 'i' {
- for _, line := range diff.B[j1:j2] {
- if err := ws("+" + line); err != nil {
- return err
- }
- }
- }
- }
- }
- return nil
-}
-
-// Like WriteUnifiedDiff but returns the diff a string.
-func GetUnifiedDiffString(diff UnifiedDiff) (string, error) {
- w := &bytes.Buffer{}
- err := WriteUnifiedDiff(w, diff)
- return string(w.Bytes()), err
-}
-
-// Convert range to the "ed" format.
-func formatRangeContext(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 == 0 {
- beginning -= 1 // empty ranges begin at line just before the range
- }
- if length <= 1 {
- return fmt.Sprintf("%d", beginning)
- }
- return fmt.Sprintf("%d,%d", beginning, beginning+length-1)
-}
-
-type ContextDiff UnifiedDiff
-
-// Compare two sequences of lines; generate the delta as a context diff.
-//
-// Context diffs are a compact way of showing line changes and a few
-// lines of context. The number of context lines is set by diff.Context
-// which defaults to three.
-//
-// By default, the diff control lines (those with *** or ---) are
-// created with a trailing newline.
-//
-// For inputs that do not have trailing newlines, set the diff.Eol
-// argument to "" so that the output will be uniformly newline free.
-//
-// The context diff format normally has a header for filenames and
-// modification times. Any or all of these may be specified using
-// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate.
-// The modification times are normally expressed in the ISO 8601 format.
-// If not specified, the strings default to blanks.
-func WriteContextDiff(writer io.Writer, diff ContextDiff) error {
- buf := bufio.NewWriter(writer)
- defer buf.Flush()
- var diffErr error
- wf := func(format string, args ...interface{}) {
- _, err := buf.WriteString(fmt.Sprintf(format, args...))
- if diffErr == nil && err != nil {
- diffErr = err
- }
- }
- ws := func(s string) {
- _, err := buf.WriteString(s)
- if diffErr == nil && err != nil {
- diffErr = err
- }
- }
-
- if len(diff.Eol) == 0 {
- diff.Eol = "\n"
- }
-
- prefix := map[byte]string{
- 'i': "+ ",
- 'd': "- ",
- 'r': "! ",
- 'e': " ",
- }
-
- started := false
- m := NewMatcher(diff.A, diff.B)
- for _, g := range m.GetGroupedOpCodes(diff.Context) {
- if !started {
- started = true
- fromDate := ""
- if len(diff.FromDate) > 0 {
- fromDate = "\t" + diff.FromDate
- }
- toDate := ""
- if len(diff.ToDate) > 0 {
- toDate = "\t" + diff.ToDate
- }
- if diff.FromFile != "" || diff.ToFile != "" {
- wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol)
- wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol)
- }
- }
-
- first, last := g[0], g[len(g)-1]
- ws("***************" + diff.Eol)
-
- range1 := formatRangeContext(first.I1, last.I2)
- wf("*** %s ****%s", range1, diff.Eol)
- for _, c := range g {
- if c.Tag == 'r' || c.Tag == 'd' {
- for _, cc := range g {
- if cc.Tag == 'i' {
- continue
- }
- for _, line := range diff.A[cc.I1:cc.I2] {
- ws(prefix[cc.Tag] + line)
- }
- }
- break
- }
- }
-
- range2 := formatRangeContext(first.J1, last.J2)
- wf("--- %s ----%s", range2, diff.Eol)
- for _, c := range g {
- if c.Tag == 'r' || c.Tag == 'i' {
- for _, cc := range g {
- if cc.Tag == 'd' {
- continue
- }
- for _, line := range diff.B[cc.J1:cc.J2] {
- ws(prefix[cc.Tag] + line)
- }
- }
- break
- }
- }
- }
- return diffErr
-}
-
-// Like WriteContextDiff but returns the diff a string.
-func GetContextDiffString(diff ContextDiff) (string, error) {
- w := &bytes.Buffer{}
- err := WriteContextDiff(w, diff)
- return string(w.Bytes()), err
-}
-
-// Split a string on "\n" while preserving them. The output can be used
-// as input for UnifiedDiff and ContextDiff structures.
-func SplitLines(s string) []string {
- lines := strings.SplitAfter(s, "\n")
- lines[len(lines)-1] += "\n"
- return lines
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/LICENSE
deleted file mode 100644
index 473b670a7..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell
-
-Please consider promoting this project if you find it useful.
-
-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/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_format.go
deleted file mode 100644
index 3e172f2ce..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_format.go
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
-
-package assert
-
-import (
- http "net/http"
- url "net/url"
- time "time"
-)
-
-// Conditionf uses a Comparison to assert a complex condition.
-func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool {
- return Condition(t, comp, append([]interface{}{msg}, args...)...)
-}
-
-// Containsf asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted")
-// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted")
-// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool {
- return Contains(t, s, contains, append([]interface{}{msg}, args...)...)
-}
-
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
- return DirExists(t, path, append([]interface{}{msg}, args...)...)
-}
-
-// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool {
- return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...)
-}
-
-// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// assert.Emptyf(t, obj, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool {
- return Empty(t, object, append([]interface{}{msg}, args...)...)
-}
-
-// Equalf asserts that two objects are equal.
-//
-// assert.Equalf(t, 123, 123, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return Equal(t, expected, actual, append([]interface{}{msg}, args...)...)
-}
-
-// EqualErrorf asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool {
- return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...)
-}
-
-// EqualValuesf asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...)
-}
-
-// Errorf asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.Errorf(t, err, "error message %s", "formatted") {
-// assert.Equal(t, expectedErrorf, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Errorf(t TestingT, err error, msg string, args ...interface{}) bool {
- return Error(t, err, append([]interface{}{msg}, args...)...)
-}
-
-// Exactlyf asserts that two objects are equal in value and type.
-//
-// assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...)
-}
-
-// Failf reports a failure through
-func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool {
- return Fail(t, failureMessage, append([]interface{}{msg}, args...)...)
-}
-
-// FailNowf fails test
-func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool {
- return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...)
-}
-
-// Falsef asserts that the specified value is false.
-//
-// assert.Falsef(t, myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool {
- return False(t, value, append([]interface{}{msg}, args...)...)
-}
-
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool {
- return FileExists(t, path, append([]interface{}{msg}, args...)...)
-}
-
-// HTTPBodyContainsf asserts that a specified handler returns a
-// body that contains a string.
-//
-// assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
- return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...)
-}
-
-// HTTPBodyNotContainsf asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
- return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...)
-}
-
-// HTTPErrorf asserts that a specified handler returns an error status code.
-//
-// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
-}
-
-// HTTPRedirectf asserts that a specified handler returns a redirect status code.
-//
-// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
-}
-
-// HTTPSuccessf asserts that a specified handler returns a success status code.
-//
-// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
-}
-
-// Implementsf asserts that an object is implemented by the specified interface.
-//
-// assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
-func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
- return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...)
-}
-
-// InDeltaf asserts that the two numerals are within delta of each other.
-//
-// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
-}
-
-// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
-}
-
-// InDeltaSlicef is the same as InDelta, except it compares two slices.
-func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
-}
-
-// InEpsilonf asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {
- return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...)
-}
-
-// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
-func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {
- return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...)
-}
-
-// IsTypef asserts that the specified objects are of the same type.
-func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool {
- return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...)
-}
-
-// JSONEqf asserts that two JSON strings are equivalent.
-//
-// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {
- return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...)
-}
-
-// Lenf asserts that the specified object has specific length.
-// Lenf also fails if the object has a type that len() not accept.
-//
-// assert.Lenf(t, mySlice, 3, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool {
- return Len(t, object, length, append([]interface{}{msg}, args...)...)
-}
-
-// Nilf asserts that the specified object is nil.
-//
-// assert.Nilf(t, err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool {
- return Nil(t, object, append([]interface{}{msg}, args...)...)
-}
-
-// NoErrorf asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.NoErrorf(t, err, "error message %s", "formatted") {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool {
- return NoError(t, err, append([]interface{}{msg}, args...)...)
-}
-
-// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted")
-// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted")
-// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool {
- return NotContains(t, s, contains, append([]interface{}{msg}, args...)...)
-}
-
-// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if assert.NotEmptyf(t, obj, "error message %s", "formatted") {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool {
- return NotEmpty(t, object, append([]interface{}{msg}, args...)...)
-}
-
-// NotEqualf asserts that the specified values are NOT equal.
-//
-// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...)
-}
-
-// NotNilf asserts that the specified object is not nil.
-//
-// assert.NotNilf(t, err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool {
- return NotNil(t, object, append([]interface{}{msg}, args...)...)
-}
-
-// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool {
- return NotPanics(t, f, append([]interface{}{msg}, args...)...)
-}
-
-// NotRegexpf asserts that a specified regexp does not match a string.
-//
-// assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
-// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {
- return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...)
-}
-
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {
- return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...)
-}
-
-// NotZerof asserts that i is not the zero value for its type and returns the truth.
-func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool {
- return NotZero(t, i, append([]interface{}{msg}, args...)...)
-}
-
-// Panicsf asserts that the code inside the specified PanicTestFunc panics.
-//
-// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool {
- return Panics(t, f, append([]interface{}{msg}, args...)...)
-}
-
-// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool {
- return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...)
-}
-
-// Regexpf asserts that a specified regexp matches a string.
-//
-// assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
-// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {
- return Regexp(t, rx, str, append([]interface{}{msg}, args...)...)
-}
-
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {
- return Subset(t, list, subset, append([]interface{}{msg}, args...)...)
-}
-
-// Truef asserts that the specified value is true.
-//
-// assert.Truef(t, myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Truef(t TestingT, value bool, msg string, args ...interface{}) bool {
- return True(t, value, append([]interface{}{msg}, args...)...)
-}
-
-// WithinDurationf asserts that the two times are within duration delta of each other.
-//
-// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {
- return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
-}
-
-// Zerof asserts that i is the zero value for its type and returns the truth.
-func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool {
- return Zero(t, i, append([]interface{}{msg}, args...)...)
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_forward.go
deleted file mode 100644
index 7c4f497bb..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertion_forward.go
+++ /dev/null
@@ -1,798 +0,0 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
-
-package assert
-
-import (
- http "net/http"
- url "net/url"
- time "time"
-)
-
-// Condition uses a Comparison to assert a complex condition.
-func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool {
- return Condition(a.t, comp, msgAndArgs...)
-}
-
-// Conditionf uses a Comparison to assert a complex condition.
-func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool {
- return Conditionf(a.t, comp, msg, args...)
-}
-
-// Contains asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// a.Contains("Hello World", "World")
-// a.Contains(["Hello", "World"], "World")
-// a.Contains({"Hello": "World"}, "Hello")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool {
- return Contains(a.t, s, contains, msgAndArgs...)
-}
-
-// Containsf asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// a.Containsf("Hello World", "World", "error message %s", "formatted")
-// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted")
-// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool {
- return Containsf(a.t, s, contains, msg, args...)
-}
-
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool {
- return DirExists(a.t, path, msgAndArgs...)
-}
-
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool {
- return DirExistsf(a.t, path, msg, args...)
-}
-
-// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool {
- return ElementsMatch(a.t, listA, listB, msgAndArgs...)
-}
-
-// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool {
- return ElementsMatchf(a.t, listA, listB, msg, args...)
-}
-
-// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// a.Empty(obj)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool {
- return Empty(a.t, object, msgAndArgs...)
-}
-
-// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// a.Emptyf(obj, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool {
- return Emptyf(a.t, object, msg, args...)
-}
-
-// Equal asserts that two objects are equal.
-//
-// a.Equal(123, 123)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
- return Equal(a.t, expected, actual, msgAndArgs...)
-}
-
-// EqualError asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// a.EqualError(err, expectedErrorString)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool {
- return EqualError(a.t, theError, errString, msgAndArgs...)
-}
-
-// EqualErrorf asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool {
- return EqualErrorf(a.t, theError, errString, msg, args...)
-}
-
-// EqualValues asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// a.EqualValues(uint32(123), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
- return EqualValues(a.t, expected, actual, msgAndArgs...)
-}
-
-// EqualValuesf asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return EqualValuesf(a.t, expected, actual, msg, args...)
-}
-
-// Equalf asserts that two objects are equal.
-//
-// a.Equalf(123, 123, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return Equalf(a.t, expected, actual, msg, args...)
-}
-
-// Error asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.Error(err) {
-// assert.Equal(t, expectedError, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool {
- return Error(a.t, err, msgAndArgs...)
-}
-
-// Errorf asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.Errorf(err, "error message %s", "formatted") {
-// assert.Equal(t, expectedErrorf, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool {
- return Errorf(a.t, err, msg, args...)
-}
-
-// Exactly asserts that two objects are equal in value and type.
-//
-// a.Exactly(int32(123), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
- return Exactly(a.t, expected, actual, msgAndArgs...)
-}
-
-// Exactlyf asserts that two objects are equal in value and type.
-//
-// a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return Exactlyf(a.t, expected, actual, msg, args...)
-}
-
-// Fail reports a failure through
-func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool {
- return Fail(a.t, failureMessage, msgAndArgs...)
-}
-
-// FailNow fails test
-func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool {
- return FailNow(a.t, failureMessage, msgAndArgs...)
-}
-
-// FailNowf fails test
-func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool {
- return FailNowf(a.t, failureMessage, msg, args...)
-}
-
-// Failf reports a failure through
-func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool {
- return Failf(a.t, failureMessage, msg, args...)
-}
-
-// False asserts that the specified value is false.
-//
-// a.False(myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool {
- return False(a.t, value, msgAndArgs...)
-}
-
-// Falsef asserts that the specified value is false.
-//
-// a.Falsef(myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool {
- return Falsef(a.t, value, msg, args...)
-}
-
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool {
- return FileExists(a.t, path, msgAndArgs...)
-}
-
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool {
- return FileExistsf(a.t, path, msg, args...)
-}
-
-// HTTPBodyContains asserts that a specified handler returns a
-// body that contains a string.
-//
-// a.HTTPBodyContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {
- return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...)
-}
-
-// HTTPBodyContainsf asserts that a specified handler returns a
-// body that contains a string.
-//
-// a.HTTPBodyContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
- return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)
-}
-
-// HTTPBodyNotContains asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// a.HTTPBodyNotContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {
- return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...)
-}
-
-// HTTPBodyNotContainsf asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// a.HTTPBodyNotContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
- return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...)
-}
-
-// HTTPError asserts that a specified handler returns an error status code.
-//
-// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
- return HTTPError(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPErrorf asserts that a specified handler returns an error status code.
-//
-// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPErrorf(a.t, handler, method, url, values, msg, args...)
-}
-
-// HTTPRedirect asserts that a specified handler returns a redirect status code.
-//
-// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
- return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPRedirectf asserts that a specified handler returns a redirect status code.
-//
-// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPRedirectf(a.t, handler, method, url, values, msg, args...)
-}
-
-// HTTPSuccess asserts that a specified handler returns a success status code.
-//
-// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
- return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPSuccessf asserts that a specified handler returns a success status code.
-//
-// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
- return HTTPSuccessf(a.t, handler, method, url, values, msg, args...)
-}
-
-// Implements asserts that an object is implemented by the specified interface.
-//
-// a.Implements((*MyInterface)(nil), new(MyObject))
-func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {
- return Implements(a.t, interfaceObject, object, msgAndArgs...)
-}
-
-// Implementsf asserts that an object is implemented by the specified interface.
-//
-// a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
-func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
- return Implementsf(a.t, interfaceObject, object, msg, args...)
-}
-
-// InDelta asserts that the two numerals are within delta of each other.
-//
-// a.InDelta(math.Pi, (22 / 7.0), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
- return InDelta(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
- return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...)
-}
-
-// InDeltaSlice is the same as InDelta, except it compares two slices.
-func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
- return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaSlicef is the same as InDelta, except it compares two slices.
-func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDeltaSlicef(a.t, expected, actual, delta, msg, args...)
-}
-
-// InDeltaf asserts that the two numerals are within delta of each other.
-//
-// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
- return InDeltaf(a.t, expected, actual, delta, msg, args...)
-}
-
-// InEpsilon asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {
- return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)
-}
-
-// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
-func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {
- return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...)
-}
-
-// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
-func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {
- return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...)
-}
-
-// InEpsilonf asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {
- return InEpsilonf(a.t, expected, actual, epsilon, msg, args...)
-}
-
-// IsType asserts that the specified objects are of the same type.
-func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool {
- return IsType(a.t, expectedType, object, msgAndArgs...)
-}
-
-// IsTypef asserts that the specified objects are of the same type.
-func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool {
- return IsTypef(a.t, expectedType, object, msg, args...)
-}
-
-// JSONEq asserts that two JSON strings are equivalent.
-//
-// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool {
- return JSONEq(a.t, expected, actual, msgAndArgs...)
-}
-
-// JSONEqf asserts that two JSON strings are equivalent.
-//
-// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool {
- return JSONEqf(a.t, expected, actual, msg, args...)
-}
-
-// Len asserts that the specified object has specific length.
-// Len also fails if the object has a type that len() not accept.
-//
-// a.Len(mySlice, 3)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool {
- return Len(a.t, object, length, msgAndArgs...)
-}
-
-// Lenf asserts that the specified object has specific length.
-// Lenf also fails if the object has a type that len() not accept.
-//
-// a.Lenf(mySlice, 3, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool {
- return Lenf(a.t, object, length, msg, args...)
-}
-
-// Nil asserts that the specified object is nil.
-//
-// a.Nil(err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool {
- return Nil(a.t, object, msgAndArgs...)
-}
-
-// Nilf asserts that the specified object is nil.
-//
-// a.Nilf(err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool {
- return Nilf(a.t, object, msg, args...)
-}
-
-// NoError asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.NoError(err) {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool {
- return NoError(a.t, err, msgAndArgs...)
-}
-
-// NoErrorf asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.NoErrorf(err, "error message %s", "formatted") {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool {
- return NoErrorf(a.t, err, msg, args...)
-}
-
-// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// a.NotContains("Hello World", "Earth")
-// a.NotContains(["Hello", "World"], "Earth")
-// a.NotContains({"Hello": "World"}, "Earth")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool {
- return NotContains(a.t, s, contains, msgAndArgs...)
-}
-
-// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted")
-// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted")
-// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool {
- return NotContainsf(a.t, s, contains, msg, args...)
-}
-
-// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if a.NotEmpty(obj) {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool {
- return NotEmpty(a.t, object, msgAndArgs...)
-}
-
-// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if a.NotEmptyf(obj, "error message %s", "formatted") {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool {
- return NotEmptyf(a.t, object, msg, args...)
-}
-
-// NotEqual asserts that the specified values are NOT equal.
-//
-// a.NotEqual(obj1, obj2)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
- return NotEqual(a.t, expected, actual, msgAndArgs...)
-}
-
-// NotEqualf asserts that the specified values are NOT equal.
-//
-// a.NotEqualf(obj1, obj2, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
- return NotEqualf(a.t, expected, actual, msg, args...)
-}
-
-// NotNil asserts that the specified object is not nil.
-//
-// a.NotNil(err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool {
- return NotNil(a.t, object, msgAndArgs...)
-}
-
-// NotNilf asserts that the specified object is not nil.
-//
-// a.NotNilf(err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool {
- return NotNilf(a.t, object, msg, args...)
-}
-
-// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// a.NotPanics(func(){ RemainCalm() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool {
- return NotPanics(a.t, f, msgAndArgs...)
-}
-
-// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool {
- return NotPanicsf(a.t, f, msg, args...)
-}
-
-// NotRegexp asserts that a specified regexp does not match a string.
-//
-// a.NotRegexp(regexp.MustCompile("starts"), "it's starting")
-// a.NotRegexp("^start", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
- return NotRegexp(a.t, rx, str, msgAndArgs...)
-}
-
-// NotRegexpf asserts that a specified regexp does not match a string.
-//
-// a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
-// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {
- return NotRegexpf(a.t, rx, str, msg, args...)
-}
-
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {
- return NotSubset(a.t, list, subset, msgAndArgs...)
-}
-
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {
- return NotSubsetf(a.t, list, subset, msg, args...)
-}
-
-// NotZero asserts that i is not the zero value for its type and returns the truth.
-func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool {
- return NotZero(a.t, i, msgAndArgs...)
-}
-
-// NotZerof asserts that i is not the zero value for its type and returns the truth.
-func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool {
- return NotZerof(a.t, i, msg, args...)
-}
-
-// Panics asserts that the code inside the specified PanicTestFunc panics.
-//
-// a.Panics(func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool {
- return Panics(a.t, f, msgAndArgs...)
-}
-
-// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// a.PanicsWithValue("crazy error", func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool {
- return PanicsWithValue(a.t, expected, f, msgAndArgs...)
-}
-
-// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool {
- return PanicsWithValuef(a.t, expected, f, msg, args...)
-}
-
-// Panicsf asserts that the code inside the specified PanicTestFunc panics.
-//
-// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool {
- return Panicsf(a.t, f, msg, args...)
-}
-
-// Regexp asserts that a specified regexp matches a string.
-//
-// a.Regexp(regexp.MustCompile("start"), "it's starting")
-// a.Regexp("start...$", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
- return Regexp(a.t, rx, str, msgAndArgs...)
-}
-
-// Regexpf asserts that a specified regexp matches a string.
-//
-// a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
-// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {
- return Regexpf(a.t, rx, str, msg, args...)
-}
-
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {
- return Subset(a.t, list, subset, msgAndArgs...)
-}
-
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {
- return Subsetf(a.t, list, subset, msg, args...)
-}
-
-// True asserts that the specified value is true.
-//
-// a.True(myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool {
- return True(a.t, value, msgAndArgs...)
-}
-
-// Truef asserts that the specified value is true.
-//
-// a.Truef(myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool {
- return Truef(a.t, value, msg, args...)
-}
-
-// WithinDuration asserts that the two times are within duration delta of each other.
-//
-// a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool {
- return WithinDuration(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// WithinDurationf asserts that the two times are within duration delta of each other.
-//
-// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {
- return WithinDurationf(a.t, expected, actual, delta, msg, args...)
-}
-
-// Zero asserts that i is the zero value for its type and returns the truth.
-func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool {
- return Zero(a.t, i, msgAndArgs...)
-}
-
-// Zerof asserts that i is the zero value for its type and returns the truth.
-func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool {
- return Zerof(a.t, i, msg, args...)
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertions.go
deleted file mode 100644
index 9d387bc77..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/assertions.go
+++ /dev/null
@@ -1,1312 +0,0 @@
-package assert
-
-import (
- "bufio"
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "math"
- "os"
- "reflect"
- "regexp"
- "runtime"
- "strings"
- "time"
- "unicode"
- "unicode/utf8"
-
- "github.com/davecgh/go-spew/spew"
- "github.com/pmezard/go-difflib/difflib"
-)
-
-//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_format.go.tmpl
-
-// TestingT is an interface wrapper around *testing.T
-type TestingT interface {
- Errorf(format string, args ...interface{})
-}
-
-// Comparison a custom function that returns true on success and false on failure
-type Comparison func() (success bool)
-
-/*
- Helper functions
-*/
-
-// ObjectsAreEqual determines if two objects are considered equal.
-//
-// This function does no assertion of any kind.
-func ObjectsAreEqual(expected, actual interface{}) bool {
-
- if expected == nil || actual == nil {
- return expected == actual
- }
- if exp, ok := expected.([]byte); ok {
- act, ok := actual.([]byte)
- if !ok {
- return false
- } else if exp == nil || act == nil {
- return exp == nil && act == nil
- }
- return bytes.Equal(exp, act)
- }
- return reflect.DeepEqual(expected, actual)
-
-}
-
-// ObjectsAreEqualValues gets whether two objects are equal, or if their
-// values are equal.
-func ObjectsAreEqualValues(expected, actual interface{}) bool {
- if ObjectsAreEqual(expected, actual) {
- return true
- }
-
- actualType := reflect.TypeOf(actual)
- if actualType == nil {
- return false
- }
- expectedValue := reflect.ValueOf(expected)
- if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) {
- // Attempt comparison after type conversion
- return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual)
- }
-
- return false
-}
-
-/* CallerInfo is necessary because the assert functions use the testing object
-internally, causing it to print the file:line of the assert method, rather than where
-the problem actually occurred in calling code.*/
-
-// CallerInfo returns an array of strings containing the file and line number
-// of each stack frame leading from the current test to the assert call that
-// failed.
-func CallerInfo() []string {
-
- pc := uintptr(0)
- file := ""
- line := 0
- ok := false
- name := ""
-
- callers := []string{}
- for i := 0; ; i++ {
- pc, file, line, ok = runtime.Caller(i)
- if !ok {
- // The breaks below failed to terminate the loop, and we ran off the
- // end of the call stack.
- break
- }
-
- // This is a huge edge case, but it will panic if this is the case, see #180
- if file == "<autogenerated>" {
- break
- }
-
- f := runtime.FuncForPC(pc)
- if f == nil {
- break
- }
- name = f.Name()
-
- // testing.tRunner is the standard library function that calls
- // tests. Subtests are called directly by tRunner, without going through
- // the Test/Benchmark/Example function that contains the t.Run calls, so
- // with subtests we should break when we hit tRunner, without adding it
- // to the list of callers.
- if name == "testing.tRunner" {
- break
- }
-
- parts := strings.Split(file, "/")
- file = parts[len(parts)-1]
- if len(parts) > 1 {
- dir := parts[len(parts)-2]
- if (dir != "assert" && dir != "mock" && dir != "require") || file == "mock_test.go" {
- callers = append(callers, fmt.Sprintf("%s:%d", file, line))
- }
- }
-
- // Drop the package
- segments := strings.Split(name, ".")
- name = segments[len(segments)-1]
- if isTest(name, "Test") ||
- isTest(name, "Benchmark") ||
- isTest(name, "Example") {
- break
- }
- }
-
- return callers
-}
-
-// Stolen from the `go test` tool.
-// isTest tells whether name looks like a test (or benchmark, according to prefix).
-// It is a Test (say) if there is a character after Test that is not a lower-case letter.
-// We don't want TesticularCancer.
-func isTest(name, prefix string) bool {
- if !strings.HasPrefix(name, prefix) {
- return false
- }
- if len(name) == len(prefix) { // "Test" is ok
- return true
- }
- rune, _ := utf8.DecodeRuneInString(name[len(prefix):])
- return !unicode.IsLower(rune)
-}
-
-// getWhitespaceString returns a string that is long enough to overwrite the default
-// output from the go testing framework.
-func getWhitespaceString() string {
-
- _, file, line, ok := runtime.Caller(1)
- if !ok {
- return ""
- }
- parts := strings.Split(file, "/")
- file = parts[len(parts)-1]
-
- return strings.Repeat(" ", len(fmt.Sprintf("%s:%d: ", file, line)))
-
-}
-
-func messageFromMsgAndArgs(msgAndArgs ...interface{}) string {
- if len(msgAndArgs) == 0 || msgAndArgs == nil {
- return ""
- }
- if len(msgAndArgs) == 1 {
- return msgAndArgs[0].(string)
- }
- if len(msgAndArgs) > 1 {
- return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)
- }
- return ""
-}
-
-// Aligns the provided message so that all lines after the first line start at the same location as the first line.
-// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab).
-// The longestLabelLen parameter specifies the length of the longest label in the output (required becaues this is the
-// basis on which the alignment occurs).
-func indentMessageLines(message string, longestLabelLen int) string {
- outBuf := new(bytes.Buffer)
-
- for i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ {
- // no need to align first line because it starts at the correct location (after the label)
- if i != 0 {
- // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab
- outBuf.WriteString("\n\r\t" + strings.Repeat(" ", longestLabelLen+1) + "\t")
- }
- outBuf.WriteString(scanner.Text())
- }
-
- return outBuf.String()
-}
-
-type failNower interface {
- FailNow()
-}
-
-// FailNow fails test
-func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
- Fail(t, failureMessage, msgAndArgs...)
-
- // We cannot extend TestingT with FailNow() and
- // maintain backwards compatibility, so we fallback
- // to panicking when FailNow is not available in
- // TestingT.
- // See issue #263
-
- if t, ok := t.(failNower); ok {
- t.FailNow()
- } else {
- panic("test failed and t is missing `FailNow()`")
- }
- return false
-}
-
-// Fail reports a failure through
-func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
- content := []labeledContent{
- {"Error Trace", strings.Join(CallerInfo(), "\n\r\t\t\t")},
- {"Error", failureMessage},
- }
-
- // Add test name if the Go version supports it
- if n, ok := t.(interface {
- Name() string
- }); ok {
- content = append(content, labeledContent{"Test", n.Name()})
- }
-
- message := messageFromMsgAndArgs(msgAndArgs...)
- if len(message) > 0 {
- content = append(content, labeledContent{"Messages", message})
- }
-
- t.Errorf("%s", "\r"+getWhitespaceString()+labeledOutput(content...))
-
- return false
-}
-
-type labeledContent struct {
- label string
- content string
-}
-
-// labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner:
-//
-// \r\t{{label}}:{{align_spaces}}\t{{content}}\n
-//
-// The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label.
-// If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this
-// alignment is achieved, "\t{{content}}\n" is added for the output.
-//
-// If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line.
-func labeledOutput(content ...labeledContent) string {
- longestLabel := 0
- for _, v := range content {
- if len(v.label) > longestLabel {
- longestLabel = len(v.label)
- }
- }
- var output string
- for _, v := range content {
- output += "\r\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n"
- }
- return output
-}
-
-// Implements asserts that an object is implemented by the specified interface.
-//
-// assert.Implements(t, (*MyInterface)(nil), new(MyObject))
-func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {
- interfaceType := reflect.TypeOf(interfaceObject).Elem()
-
- if object == nil {
- return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...)
- }
- if !reflect.TypeOf(object).Implements(interfaceType) {
- return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...)
- }
-
- return true
-}
-
-// IsType asserts that the specified objects are of the same type.
-func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool {
-
- if !ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) {
- return Fail(t, fmt.Sprintf("Object expected to be of type %v, but was %v", reflect.TypeOf(expectedType), reflect.TypeOf(object)), msgAndArgs...)
- }
-
- return true
-}
-
-// Equal asserts that two objects are equal.
-//
-// assert.Equal(t, 123, 123)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
- if err := validateEqualArgs(expected, actual); err != nil {
- return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)",
- expected, actual, err), msgAndArgs...)
- }
-
- if !ObjectsAreEqual(expected, actual) {
- diff := diff(expected, actual)
- expected, actual = formatUnequalValues(expected, actual)
- return Fail(t, fmt.Sprintf("Not equal: \n"+
- "expected: %s\n"+
- "actual : %s%s", expected, actual, diff), msgAndArgs...)
- }
-
- return true
-
-}
-
-// formatUnequalValues takes two values of arbitrary types and returns string
-// representations appropriate to be presented to the user.
-//
-// If the values are not of like type, the returned strings will be prefixed
-// with the type name, and the value will be enclosed in parenthesis similar
-// to a type conversion in the Go grammar.
-func formatUnequalValues(expected, actual interface{}) (e string, a string) {
- if reflect.TypeOf(expected) != reflect.TypeOf(actual) {
- return fmt.Sprintf("%T(%#v)", expected, expected),
- fmt.Sprintf("%T(%#v)", actual, actual)
- }
-
- return fmt.Sprintf("%#v", expected),
- fmt.Sprintf("%#v", actual)
-}
-
-// EqualValues asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// assert.EqualValues(t, uint32(123), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
-
- if !ObjectsAreEqualValues(expected, actual) {
- diff := diff(expected, actual)
- expected, actual = formatUnequalValues(expected, actual)
- return Fail(t, fmt.Sprintf("Not equal: \n"+
- "expected: %s\n"+
- "actual : %s%s", expected, actual, diff), msgAndArgs...)
- }
-
- return true
-
-}
-
-// Exactly asserts that two objects are equal in value and type.
-//
-// assert.Exactly(t, int32(123), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
-
- aType := reflect.TypeOf(expected)
- bType := reflect.TypeOf(actual)
-
- if aType != bType {
- return Fail(t, fmt.Sprintf("Types expected to match exactly\n\r\t%v != %v", aType, bType), msgAndArgs...)
- }
-
- return Equal(t, expected, actual, msgAndArgs...)
-
-}
-
-// NotNil asserts that the specified object is not nil.
-//
-// assert.NotNil(t, err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if !isNil(object) {
- return true
- }
- return Fail(t, "Expected value not to be nil.", msgAndArgs...)
-}
-
-// isNil checks if a specified object is nil or not, without Failing.
-func isNil(object interface{}) bool {
- if object == nil {
- return true
- }
-
- value := reflect.ValueOf(object)
- kind := value.Kind()
- if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() {
- return true
- }
-
- return false
-}
-
-// Nil asserts that the specified object is nil.
-//
-// assert.Nil(t, err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- if isNil(object) {
- return true
- }
- return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...)
-}
-
-// isEmpty gets whether the specified object is considered empty or not.
-func isEmpty(object interface{}) bool {
-
- // get nil case out of the way
- if object == nil {
- return true
- }
-
- objValue := reflect.ValueOf(object)
-
- switch objValue.Kind() {
- // collection types are empty when they have no element
- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
- return objValue.Len() == 0
- // pointers are empty if nil or if the value they point to is empty
- case reflect.Ptr:
- if objValue.IsNil() {
- return true
- }
- deref := objValue.Elem().Interface()
- return isEmpty(deref)
- // for all other types, compare against the zero value
- default:
- zero := reflect.Zero(objValue.Type())
- return reflect.DeepEqual(object, zero.Interface())
- }
-}
-
-// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// assert.Empty(t, obj)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
-
- pass := isEmpty(object)
- if !pass {
- Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...)
- }
-
- return pass
-
-}
-
-// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if assert.NotEmpty(t, obj) {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
-
- pass := !isEmpty(object)
- if !pass {
- Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...)
- }
-
- return pass
-
-}
-
-// getLen try to get length of object.
-// return (false, 0) if impossible.
-func getLen(x interface{}) (ok bool, length int) {
- v := reflect.ValueOf(x)
- defer func() {
- if e := recover(); e != nil {
- ok = false
- }
- }()
- return true, v.Len()
-}
-
-// Len asserts that the specified object has specific length.
-// Len also fails if the object has a type that len() not accept.
-//
-// assert.Len(t, mySlice, 3)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool {
- ok, l := getLen(object)
- if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...)
- }
-
- if l != length {
- return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...)
- }
- return true
-}
-
-// True asserts that the specified value is true.
-//
-// assert.True(t, myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func True(t TestingT, value bool, msgAndArgs ...interface{}) bool {
-
- if value != true {
- return Fail(t, "Should be true", msgAndArgs...)
- }
-
- return true
-
-}
-
-// False asserts that the specified value is false.
-//
-// assert.False(t, myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func False(t TestingT, value bool, msgAndArgs ...interface{}) bool {
-
- if value != false {
- return Fail(t, "Should be false", msgAndArgs...)
- }
-
- return true
-
-}
-
-// NotEqual asserts that the specified values are NOT equal.
-//
-// assert.NotEqual(t, obj1, obj2)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
- if err := validateEqualArgs(expected, actual); err != nil {
- return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)",
- expected, actual, err), msgAndArgs...)
- }
-
- if ObjectsAreEqual(expected, actual) {
- return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...)
- }
-
- return true
-
-}
-
-// containsElement try loop over the list check if the list includes the element.
-// return (false, false) if impossible.
-// return (true, false) if element was not found.
-// return (true, true) if element was found.
-func includeElement(list interface{}, element interface{}) (ok, found bool) {
-
- listValue := reflect.ValueOf(list)
- elementValue := reflect.ValueOf(element)
- defer func() {
- if e := recover(); e != nil {
- ok = false
- found = false
- }
- }()
-
- if reflect.TypeOf(list).Kind() == reflect.String {
- return true, strings.Contains(listValue.String(), elementValue.String())
- }
-
- if reflect.TypeOf(list).Kind() == reflect.Map {
- mapKeys := listValue.MapKeys()
- for i := 0; i < len(mapKeys); i++ {
- if ObjectsAreEqual(mapKeys[i].Interface(), element) {
- return true, true
- }
- }
- return true, false
- }
-
- for i := 0; i < listValue.Len(); i++ {
- if ObjectsAreEqual(listValue.Index(i).Interface(), element) {
- return true, true
- }
- }
- return true, false
-
-}
-
-// Contains asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// assert.Contains(t, "Hello World", "World")
-// assert.Contains(t, ["Hello", "World"], "World")
-// assert.Contains(t, {"Hello": "World"}, "Hello")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool {
-
- ok, found := includeElement(s, contains)
- if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...)
- }
- if !found {
- return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", s, contains), msgAndArgs...)
- }
-
- return true
-
-}
-
-// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// assert.NotContains(t, "Hello World", "Earth")
-// assert.NotContains(t, ["Hello", "World"], "Earth")
-// assert.NotContains(t, {"Hello": "World"}, "Earth")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool {
-
- ok, found := includeElement(s, contains)
- if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...)
- }
- if found {
- return Fail(t, fmt.Sprintf("\"%s\" should not contain \"%s\"", s, contains), msgAndArgs...)
- }
-
- return true
-
-}
-
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {
- if subset == nil {
- return true // we consider nil to be equal to the nil set
- }
-
- subsetValue := reflect.ValueOf(subset)
- defer func() {
- if e := recover(); e != nil {
- ok = false
- }
- }()
-
- listKind := reflect.TypeOf(list).Kind()
- subsetKind := reflect.TypeOf(subset).Kind()
-
- if listKind != reflect.Array && listKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
- }
-
- if subsetKind != reflect.Array && subsetKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
- }
-
- for i := 0; i < subsetValue.Len(); i++ {
- element := subsetValue.Index(i).Interface()
- ok, found := includeElement(list, element)
- if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
- }
- if !found {
- return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, element), msgAndArgs...)
- }
- }
-
- return true
-}
-
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {
- if subset == nil {
- return Fail(t, fmt.Sprintf("nil is the empty set which is a subset of every set"), msgAndArgs...)
- }
-
- subsetValue := reflect.ValueOf(subset)
- defer func() {
- if e := recover(); e != nil {
- ok = false
- }
- }()
-
- listKind := reflect.TypeOf(list).Kind()
- subsetKind := reflect.TypeOf(subset).Kind()
-
- if listKind != reflect.Array && listKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
- }
-
- if subsetKind != reflect.Array && subsetKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
- }
-
- for i := 0; i < subsetValue.Len(); i++ {
- element := subsetValue.Index(i).Interface()
- ok, found := includeElement(list, element)
- if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
- }
- if !found {
- return true
- }
- }
-
- return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...)
-}
-
-// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) {
- if isEmpty(listA) && isEmpty(listB) {
- return true
- }
-
- aKind := reflect.TypeOf(listA).Kind()
- bKind := reflect.TypeOf(listB).Kind()
-
- if aKind != reflect.Array && aKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listA, aKind), msgAndArgs...)
- }
-
- if bKind != reflect.Array && bKind != reflect.Slice {
- return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listB, bKind), msgAndArgs...)
- }
-
- aValue := reflect.ValueOf(listA)
- bValue := reflect.ValueOf(listB)
-
- aLen := aValue.Len()
- bLen := bValue.Len()
-
- if aLen != bLen {
- return Fail(t, fmt.Sprintf("lengths don't match: %d != %d", aLen, bLen), msgAndArgs...)
- }
-
- // Mark indexes in bValue that we already used
- visited := make([]bool, bLen)
- for i := 0; i < aLen; i++ {
- element := aValue.Index(i).Interface()
- found := false
- for j := 0; j < bLen; j++ {
- if visited[j] {
- continue
- }
- if ObjectsAreEqual(bValue.Index(j).Interface(), element) {
- visited[j] = true
- found = true
- break
- }
- }
- if !found {
- return Fail(t, fmt.Sprintf("element %s appears more times in %s than in %s", element, aValue, bValue), msgAndArgs...)
- }
- }
-
- return true
-}
-
-// Condition uses a Comparison to assert a complex condition.
-func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool {
- result := comp()
- if !result {
- Fail(t, "Condition failed!", msgAndArgs...)
- }
- return result
-}
-
-// PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics
-// methods, and represents a simple func that takes no arguments, and returns nothing.
-type PanicTestFunc func()
-
-// didPanic returns true if the function passed to it panics. Otherwise, it returns false.
-func didPanic(f PanicTestFunc) (bool, interface{}) {
-
- didPanic := false
- var message interface{}
- func() {
-
- defer func() {
- if message = recover(); message != nil {
- didPanic = true
- }
- }()
-
- // call the target function
- f()
-
- }()
-
- return didPanic, message
-
-}
-
-// Panics asserts that the code inside the specified PanicTestFunc panics.
-//
-// assert.Panics(t, func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {
-
- if funcDidPanic, panicValue := didPanic(f); !funcDidPanic {
- return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...)
- }
-
- return true
-}
-
-// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool {
-
- funcDidPanic, panicValue := didPanic(f)
- if !funcDidPanic {
- return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...)
- }
- if panicValue != expected {
- return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%v\n\r\tPanic value:\t%v", f, expected, panicValue), msgAndArgs...)
- }
-
- return true
-}
-
-// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// assert.NotPanics(t, func(){ RemainCalm() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {
-
- if funcDidPanic, panicValue := didPanic(f); funcDidPanic {
- return Fail(t, fmt.Sprintf("func %#v should not panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...)
- }
-
- return true
-}
-
-// WithinDuration asserts that the two times are within duration delta of each other.
-//
-// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool {
-
- dt := expected.Sub(actual)
- if dt < -delta || dt > delta {
- return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...)
- }
-
- return true
-}
-
-func toFloat(x interface{}) (float64, bool) {
- var xf float64
- xok := true
-
- switch xn := x.(type) {
- case uint8:
- xf = float64(xn)
- case uint16:
- xf = float64(xn)
- case uint32:
- xf = float64(xn)
- case uint64:
- xf = float64(xn)
- case int:
- xf = float64(xn)
- case int8:
- xf = float64(xn)
- case int16:
- xf = float64(xn)
- case int32:
- xf = float64(xn)
- case int64:
- xf = float64(xn)
- case float32:
- xf = float64(xn)
- case float64:
- xf = float64(xn)
- case time.Duration:
- xf = float64(xn)
- default:
- xok = false
- }
-
- return xf, xok
-}
-
-// InDelta asserts that the two numerals are within delta of each other.
-//
-// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
-
- af, aok := toFloat(expected)
- bf, bok := toFloat(actual)
-
- if !aok || !bok {
- return Fail(t, fmt.Sprintf("Parameters must be numerical"), msgAndArgs...)
- }
-
- if math.IsNaN(af) {
- return Fail(t, fmt.Sprintf("Expected must not be NaN"), msgAndArgs...)
- }
-
- if math.IsNaN(bf) {
- return Fail(t, fmt.Sprintf("Expected %v with delta %v, but was NaN", expected, delta), msgAndArgs...)
- }
-
- dt := af - bf
- if dt < -delta || dt > delta {
- return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...)
- }
-
- return true
-}
-
-// InDeltaSlice is the same as InDelta, except it compares two slices.
-func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
- if expected == nil || actual == nil ||
- reflect.TypeOf(actual).Kind() != reflect.Slice ||
- reflect.TypeOf(expected).Kind() != reflect.Slice {
- return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...)
- }
-
- actualSlice := reflect.ValueOf(actual)
- expectedSlice := reflect.ValueOf(expected)
-
- for i := 0; i < actualSlice.Len(); i++ {
- result := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...)
- if !result {
- return result
- }
- }
-
- return true
-}
-
-// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {
- if expected == nil || actual == nil ||
- reflect.TypeOf(actual).Kind() != reflect.Map ||
- reflect.TypeOf(expected).Kind() != reflect.Map {
- return Fail(t, "Arguments must be maps", msgAndArgs...)
- }
-
- expectedMap := reflect.ValueOf(expected)
- actualMap := reflect.ValueOf(actual)
-
- if expectedMap.Len() != actualMap.Len() {
- return Fail(t, "Arguments must have the same numbe of keys", msgAndArgs...)
- }
-
- for _, k := range expectedMap.MapKeys() {
- ev := expectedMap.MapIndex(k)
- av := actualMap.MapIndex(k)
-
- if !ev.IsValid() {
- return Fail(t, fmt.Sprintf("missing key %q in expected map", k), msgAndArgs...)
- }
-
- if !av.IsValid() {
- return Fail(t, fmt.Sprintf("missing key %q in actual map", k), msgAndArgs...)
- }
-
- if !InDelta(
- t,
- ev.Interface(),
- av.Interface(),
- delta,
- msgAndArgs...,
- ) {
- return false
- }
- }
-
- return true
-}
-
-func calcRelativeError(expected, actual interface{}) (float64, error) {
- af, aok := toFloat(expected)
- if !aok {
- return 0, fmt.Errorf("expected value %q cannot be converted to float", expected)
- }
- if af == 0 {
- return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error")
- }
- bf, bok := toFloat(actual)
- if !bok {
- return 0, fmt.Errorf("actual value %q cannot be converted to float", actual)
- }
-
- return math.Abs(af-bf) / math.Abs(af), nil
-}
-
-// InEpsilon asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {
- actualEpsilon, err := calcRelativeError(expected, actual)
- if err != nil {
- return Fail(t, err.Error(), msgAndArgs...)
- }
- if actualEpsilon > epsilon {
- return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+
- " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...)
- }
-
- return true
-}
-
-// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
-func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {
- if expected == nil || actual == nil ||
- reflect.TypeOf(actual).Kind() != reflect.Slice ||
- reflect.TypeOf(expected).Kind() != reflect.Slice {
- return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...)
- }
-
- actualSlice := reflect.ValueOf(actual)
- expectedSlice := reflect.ValueOf(expected)
-
- for i := 0; i < actualSlice.Len(); i++ {
- result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon)
- if !result {
- return result
- }
- }
-
- return true
-}
-
-/*
- Errors
-*/
-
-// NoError asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.NoError(t, err) {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {
- if err != nil {
- return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...)
- }
-
- return true
-}
-
-// Error asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.Error(t, err) {
-// assert.Equal(t, expectedError, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Error(t TestingT, err error, msgAndArgs ...interface{}) bool {
-
- if err == nil {
- return Fail(t, "An error is expected but got nil.", msgAndArgs...)
- }
-
- return true
-}
-
-// EqualError asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// assert.EqualError(t, err, expectedErrorString)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool {
- if !Error(t, theError, msgAndArgs...) {
- return false
- }
- expected := errString
- actual := theError.Error()
- // don't need to use deep equals here, we know they are both strings
- if expected != actual {
- return Fail(t, fmt.Sprintf("Error message not equal:\n"+
- "expected: %q\n"+
- "actual : %q", expected, actual), msgAndArgs...)
- }
- return true
-}
-
-// matchRegexp return true if a specified regexp matches a string.
-func matchRegexp(rx interface{}, str interface{}) bool {
-
- var r *regexp.Regexp
- if rr, ok := rx.(*regexp.Regexp); ok {
- r = rr
- } else {
- r = regexp.MustCompile(fmt.Sprint(rx))
- }
-
- return (r.FindStringIndex(fmt.Sprint(str)) != nil)
-
-}
-
-// Regexp asserts that a specified regexp matches a string.
-//
-// assert.Regexp(t, regexp.MustCompile("start"), "it's starting")
-// assert.Regexp(t, "start...$", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
-
- match := matchRegexp(rx, str)
-
- if !match {
- Fail(t, fmt.Sprintf("Expect \"%v\" to match \"%v\"", str, rx), msgAndArgs...)
- }
-
- return match
-}
-
-// NotRegexp asserts that a specified regexp does not match a string.
-//
-// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
-// assert.NotRegexp(t, "^start", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
- match := matchRegexp(rx, str)
-
- if match {
- Fail(t, fmt.Sprintf("Expect \"%v\" to NOT match \"%v\"", str, rx), msgAndArgs...)
- }
-
- return !match
-
-}
-
-// Zero asserts that i is the zero value for its type and returns the truth.
-func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {
- if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) {
- return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...)
- }
- return true
-}
-
-// NotZero asserts that i is not the zero value for its type and returns the truth.
-func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {
- if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) {
- return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...)
- }
- return true
-}
-
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
- info, err := os.Lstat(path)
- if err != nil {
- if os.IsNotExist(err) {
- return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...)
- }
- return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...)
- }
- if info.IsDir() {
- return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...)
- }
- return true
-}
-
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
- info, err := os.Lstat(path)
- if err != nil {
- if os.IsNotExist(err) {
- return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...)
- }
- return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...)
- }
- if !info.IsDir() {
- return Fail(t, fmt.Sprintf("%q is a file", path), msgAndArgs...)
- }
- return true
-}
-
-// JSONEq asserts that two JSON strings are equivalent.
-//
-// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool {
- var expectedJSONAsInterface, actualJSONAsInterface interface{}
-
- if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil {
- return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...)
- }
-
- if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil {
- return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...)
- }
-
- return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...)
-}
-
-func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) {
- t := reflect.TypeOf(v)
- k := t.Kind()
-
- if k == reflect.Ptr {
- t = t.Elem()
- k = t.Kind()
- }
- return t, k
-}
-
-// diff returns a diff of both values as long as both are of the same type and
-// are a struct, map, slice or array. Otherwise it returns an empty string.
-func diff(expected interface{}, actual interface{}) string {
- if expected == nil || actual == nil {
- return ""
- }
-
- et, ek := typeAndKind(expected)
- at, _ := typeAndKind(actual)
-
- if et != at {
- return ""
- }
-
- if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array {
- return ""
- }
-
- e := spewConfig.Sdump(expected)
- a := spewConfig.Sdump(actual)
-
- diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{
- A: difflib.SplitLines(e),
- B: difflib.SplitLines(a),
- FromFile: "Expected",
- FromDate: "",
- ToFile: "Actual",
- ToDate: "",
- Context: 1,
- })
-
- return "\n\nDiff:\n" + diff
-}
-
-// validateEqualArgs checks whether provided arguments can be safely used in the
-// Equal/NotEqual functions.
-func validateEqualArgs(expected, actual interface{}) error {
- if isFunction(expected) || isFunction(actual) {
- return errors.New("cannot take func type as argument")
- }
- return nil
-}
-
-func isFunction(arg interface{}) bool {
- if arg == nil {
- return false
- }
- return reflect.TypeOf(arg).Kind() == reflect.Func
-}
-
-var spewConfig = spew.ConfigState{
- Indent: " ",
- DisablePointerAddresses: true,
- DisableCapacities: true,
- SortKeys: true,
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/doc.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/doc.go
deleted file mode 100644
index c9dccc4d6..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/doc.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
-//
-// Example Usage
-//
-// The following is a complete example using assert in a standard test function:
-// import (
-// "testing"
-// "github.com/stretchr/testify/assert"
-// )
-//
-// func TestSomething(t *testing.T) {
-//
-// var a string = "Hello"
-// var b string = "Hello"
-//
-// assert.Equal(t, a, b, "The two words should be the same.")
-//
-// }
-//
-// if you assert many times, use the format below:
-//
-// import (
-// "testing"
-// "github.com/stretchr/testify/assert"
-// )
-//
-// func TestSomething(t *testing.T) {
-// assert := assert.New(t)
-//
-// var a string = "Hello"
-// var b string = "Hello"
-//
-// assert.Equal(a, b, "The two words should be the same.")
-// }
-//
-// Assertions
-//
-// Assertions allow you to easily write test code, and are global funcs in the `assert` package.
-// All assertion functions take, as the first argument, the `*testing.T` object provided by the
-// testing framework. This allows the assertion funcs to write the failings and other details to
-// the correct place.
-//
-// Every assertion function also takes an optional string message as the final argument,
-// allowing custom error messages to be appended to the message the assertion method outputs.
-package assert
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/errors.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/errors.go
deleted file mode 100644
index ac9dc9d1d..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/errors.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package assert
-
-import (
- "errors"
-)
-
-// AnError is an error instance useful for testing. If the code does not care
-// about error specifics, and only needs to return the error for example, this
-// error should be used to make the test code more readable.
-var AnError = errors.New("assert.AnError general error for testing")
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/forward_assertions.go
deleted file mode 100644
index 9ad56851d..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/forward_assertions.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package assert
-
-// Assertions provides assertion methods around the
-// TestingT interface.
-type Assertions struct {
- t TestingT
-}
-
-// New makes a new Assertions object for the specified TestingT.
-func New(t TestingT) *Assertions {
- return &Assertions{
- t: t,
- }
-}
-
-//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/http_assertions.go
deleted file mode 100644
index 3101e78dd..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/assert/http_assertions.go
+++ /dev/null
@@ -1,127 +0,0 @@
-package assert
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strings"
-)
-
-// httpCode is a helper that returns HTTP code of the response. It returns -1 and
-// an error if building a new request fails.
-func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) {
- w := httptest.NewRecorder()
- req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
- if err != nil {
- return -1, err
- }
- handler(w, req)
- return w.Code, nil
-}
-
-// HTTPSuccess asserts that a specified handler returns a success status code.
-//
-// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {
- code, err := httpCode(handler, method, url, values)
- if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
- }
-
- isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent
- if !isSuccessCode {
- Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code))
- }
-
- return isSuccessCode
-}
-
-// HTTPRedirect asserts that a specified handler returns a redirect status code.
-//
-// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {
- code, err := httpCode(handler, method, url, values)
- if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
- }
-
- isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect
- if !isRedirectCode {
- Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code))
- }
-
- return isRedirectCode
-}
-
-// HTTPError asserts that a specified handler returns an error status code.
-//
-// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {
- code, err := httpCode(handler, method, url, values)
- if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
- return false
- }
-
- isErrorCode := code >= http.StatusBadRequest
- if !isErrorCode {
- Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code))
- }
-
- return isErrorCode
-}
-
-// HTTPBody is a helper that returns HTTP body of the response. It returns
-// empty string if building a new request fails.
-func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string {
- w := httptest.NewRecorder()
- req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
- if err != nil {
- return ""
- }
- handler(w, req)
- return w.Body.String()
-}
-
-// HTTPBodyContains asserts that a specified handler returns a
-// body that contains a string.
-//
-// assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {
- body := HTTPBody(handler, method, url, values)
-
- contains := strings.Contains(body, fmt.Sprint(str))
- if !contains {
- Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body))
- }
-
- return contains
-}
-
-// HTTPBodyNotContains asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {
- body := HTTPBody(handler, method, url, values)
-
- contains := strings.Contains(body, fmt.Sprint(str))
- if contains {
- Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body))
- }
-
- return !contains
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/doc.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/doc.go
deleted file mode 100644
index 169de3922..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Package require implements the same assertions as the `assert` package but
-// stops test execution when a test fails.
-//
-// Example Usage
-//
-// The following is a complete example using require in a standard test function:
-// import (
-// "testing"
-// "github.com/stretchr/testify/require"
-// )
-//
-// func TestSomething(t *testing.T) {
-//
-// var a string = "Hello"
-// var b string = "Hello"
-//
-// require.Equal(t, a, b, "The two words should be the same.")
-//
-// }
-//
-// Assertions
-//
-// The `require` package have same global functions as in the `assert` package,
-// but instead of returning a boolean result they call `t.FailNow()`.
-//
-// Every assertion function also takes an optional string message as the final argument,
-// allowing custom error messages to be appended to the message the assertion method outputs.
-package require
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/forward_requirements.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/forward_requirements.go
deleted file mode 100644
index ac71d4058..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/forward_requirements.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package require
-
-// Assertions provides assertion methods around the
-// TestingT interface.
-type Assertions struct {
- t TestingT
-}
-
-// New makes a new Assertions object for the specified TestingT.
-func New(t TestingT) *Assertions {
- return &Assertions{
- t: t,
- }
-}
-
-//go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl -include-format-funcs
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require.go
deleted file mode 100644
index a21d02f81..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require.go
+++ /dev/null
@@ -1,979 +0,0 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
-
-package require
-
-import (
- assert "github.com/stretchr/testify/assert"
- http "net/http"
- url "net/url"
- time "time"
-)
-
-// Condition uses a Comparison to assert a complex condition.
-func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) {
- if !assert.Condition(t, comp, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Conditionf uses a Comparison to assert a complex condition.
-func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) {
- if !assert.Conditionf(t, comp, msg, args...) {
- t.FailNow()
- }
-}
-
-// Contains asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// assert.Contains(t, "Hello World", "World")
-// assert.Contains(t, ["Hello", "World"], "World")
-// assert.Contains(t, {"Hello": "World"}, "Hello")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
- if !assert.Contains(t, s, contains, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Containsf asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted")
-// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted")
-// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {
- if !assert.Containsf(t, s, contains, msg, args...) {
- t.FailNow()
- }
-}
-
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func DirExists(t TestingT, path string, msgAndArgs ...interface{}) {
- if !assert.DirExists(t, path, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func DirExistsf(t TestingT, path string, msg string, args ...interface{}) {
- if !assert.DirExistsf(t, path, msg, args...) {
- t.FailNow()
- }
-}
-
-// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
- if !assert.ElementsMatch(t, listA, listB, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {
- if !assert.ElementsMatchf(t, listA, listB, msg, args...) {
- t.FailNow()
- }
-}
-
-// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// assert.Empty(t, obj)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
- if !assert.Empty(t, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// assert.Emptyf(t, obj, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) {
- if !assert.Emptyf(t, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// Equal asserts that two objects are equal.
-//
-// assert.Equal(t, 123, 123)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- if !assert.Equal(t, expected, actual, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// EqualError asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// assert.EqualError(t, err, expectedErrorString)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) {
- if !assert.EqualError(t, theError, errString, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// EqualErrorf asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) {
- if !assert.EqualErrorf(t, theError, errString, msg, args...) {
- t.FailNow()
- }
-}
-
-// EqualValues asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// assert.EqualValues(t, uint32(123), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- if !assert.EqualValues(t, expected, actual, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// EqualValuesf asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
- if !assert.EqualValuesf(t, expected, actual, msg, args...) {
- t.FailNow()
- }
-}
-
-// Equalf asserts that two objects are equal.
-//
-// assert.Equalf(t, 123, 123, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
- if !assert.Equalf(t, expected, actual, msg, args...) {
- t.FailNow()
- }
-}
-
-// Error asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.Error(t, err) {
-// assert.Equal(t, expectedError, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Error(t TestingT, err error, msgAndArgs ...interface{}) {
- if !assert.Error(t, err, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Errorf asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.Errorf(t, err, "error message %s", "formatted") {
-// assert.Equal(t, expectedErrorf, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Errorf(t TestingT, err error, msg string, args ...interface{}) {
- if !assert.Errorf(t, err, msg, args...) {
- t.FailNow()
- }
-}
-
-// Exactly asserts that two objects are equal in value and type.
-//
-// assert.Exactly(t, int32(123), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- if !assert.Exactly(t, expected, actual, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Exactlyf asserts that two objects are equal in value and type.
-//
-// assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
- if !assert.Exactlyf(t, expected, actual, msg, args...) {
- t.FailNow()
- }
-}
-
-// Fail reports a failure through
-func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
- if !assert.Fail(t, failureMessage, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// FailNow fails test
-func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
- if !assert.FailNow(t, failureMessage, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// FailNowf fails test
-func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) {
- if !assert.FailNowf(t, failureMessage, msg, args...) {
- t.FailNow()
- }
-}
-
-// Failf reports a failure through
-func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) {
- if !assert.Failf(t, failureMessage, msg, args...) {
- t.FailNow()
- }
-}
-
-// False asserts that the specified value is false.
-//
-// assert.False(t, myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func False(t TestingT, value bool, msgAndArgs ...interface{}) {
- if !assert.False(t, value, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Falsef asserts that the specified value is false.
-//
-// assert.Falsef(t, myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Falsef(t TestingT, value bool, msg string, args ...interface{}) {
- if !assert.Falsef(t, value, msg, args...) {
- t.FailNow()
- }
-}
-
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func FileExists(t TestingT, path string, msgAndArgs ...interface{}) {
- if !assert.FileExists(t, path, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func FileExistsf(t TestingT, path string, msg string, args ...interface{}) {
- if !assert.FileExistsf(t, path, msg, args...) {
- t.FailNow()
- }
-}
-
-// HTTPBodyContains asserts that a specified handler returns a
-// body that contains a string.
-//
-// assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
- if !assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// HTTPBodyContainsf asserts that a specified handler returns a
-// body that contains a string.
-//
-// assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
- if !assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) {
- t.FailNow()
- }
-}
-
-// HTTPBodyNotContains asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
- if !assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// HTTPBodyNotContainsf asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
- if !assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) {
- t.FailNow()
- }
-}
-
-// HTTPError asserts that a specified handler returns an error status code.
-//
-// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- if !assert.HTTPError(t, handler, method, url, values, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// HTTPErrorf asserts that a specified handler returns an error status code.
-//
-// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- if !assert.HTTPErrorf(t, handler, method, url, values, msg, args...) {
- t.FailNow()
- }
-}
-
-// HTTPRedirect asserts that a specified handler returns a redirect status code.
-//
-// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- if !assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// HTTPRedirectf asserts that a specified handler returns a redirect status code.
-//
-// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- if !assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) {
- t.FailNow()
- }
-}
-
-// HTTPSuccess asserts that a specified handler returns a success status code.
-//
-// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- if !assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// HTTPSuccessf asserts that a specified handler returns a success status code.
-//
-// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- if !assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) {
- t.FailNow()
- }
-}
-
-// Implements asserts that an object is implemented by the specified interface.
-//
-// assert.Implements(t, (*MyInterface)(nil), new(MyObject))
-func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
- if !assert.Implements(t, interfaceObject, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Implementsf asserts that an object is implemented by the specified interface.
-//
-// assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
-func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
- if !assert.Implementsf(t, interfaceObject, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// InDelta asserts that the two numerals are within delta of each other.
-//
-// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- if !assert.InDelta(t, expected, actual, delta, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- if !assert.InDeltaMapValues(t, expected, actual, delta, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- if !assert.InDeltaMapValuesf(t, expected, actual, delta, msg, args...) {
- t.FailNow()
- }
-}
-
-// InDeltaSlice is the same as InDelta, except it compares two slices.
-func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- if !assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// InDeltaSlicef is the same as InDelta, except it compares two slices.
-func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- if !assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) {
- t.FailNow()
- }
-}
-
-// InDeltaf asserts that the two numerals are within delta of each other.
-//
-// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- if !assert.InDeltaf(t, expected, actual, delta, msg, args...) {
- t.FailNow()
- }
-}
-
-// InEpsilon asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
- if !assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
-func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
- if !assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
-func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
- if !assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) {
- t.FailNow()
- }
-}
-
-// InEpsilonf asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
- if !assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) {
- t.FailNow()
- }
-}
-
-// IsType asserts that the specified objects are of the same type.
-func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
- if !assert.IsType(t, expectedType, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// IsTypef asserts that the specified objects are of the same type.
-func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) {
- if !assert.IsTypef(t, expectedType, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// JSONEq asserts that two JSON strings are equivalent.
-//
-// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {
- if !assert.JSONEq(t, expected, actual, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// JSONEqf asserts that two JSON strings are equivalent.
-//
-// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) {
- if !assert.JSONEqf(t, expected, actual, msg, args...) {
- t.FailNow()
- }
-}
-
-// Len asserts that the specified object has specific length.
-// Len also fails if the object has a type that len() not accept.
-//
-// assert.Len(t, mySlice, 3)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) {
- if !assert.Len(t, object, length, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Lenf asserts that the specified object has specific length.
-// Lenf also fails if the object has a type that len() not accept.
-//
-// assert.Lenf(t, mySlice, 3, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) {
- if !assert.Lenf(t, object, length, msg, args...) {
- t.FailNow()
- }
-}
-
-// Nil asserts that the specified object is nil.
-//
-// assert.Nil(t, err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
- if !assert.Nil(t, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Nilf asserts that the specified object is nil.
-//
-// assert.Nilf(t, err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) {
- if !assert.Nilf(t, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// NoError asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.NoError(t, err) {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NoError(t TestingT, err error, msgAndArgs ...interface{}) {
- if !assert.NoError(t, err, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NoErrorf asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if assert.NoErrorf(t, err, "error message %s", "formatted") {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NoErrorf(t TestingT, err error, msg string, args ...interface{}) {
- if !assert.NoErrorf(t, err, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// assert.NotContains(t, "Hello World", "Earth")
-// assert.NotContains(t, ["Hello", "World"], "Earth")
-// assert.NotContains(t, {"Hello": "World"}, "Earth")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
- if !assert.NotContains(t, s, contains, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted")
-// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted")
-// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {
- if !assert.NotContainsf(t, s, contains, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if assert.NotEmpty(t, obj) {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
- if !assert.NotEmpty(t, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if assert.NotEmptyf(t, obj, "error message %s", "formatted") {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) {
- if !assert.NotEmptyf(t, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotEqual asserts that the specified values are NOT equal.
-//
-// assert.NotEqual(t, obj1, obj2)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- if !assert.NotEqual(t, expected, actual, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotEqualf asserts that the specified values are NOT equal.
-//
-// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
- if !assert.NotEqualf(t, expected, actual, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotNil asserts that the specified object is not nil.
-//
-// assert.NotNil(t, err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
- if !assert.NotNil(t, object, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotNilf asserts that the specified object is not nil.
-//
-// assert.NotNilf(t, err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) {
- if !assert.NotNilf(t, object, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// assert.NotPanics(t, func(){ RemainCalm() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- if !assert.NotPanics(t, f, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {
- if !assert.NotPanicsf(t, f, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotRegexp asserts that a specified regexp does not match a string.
-//
-// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
-// assert.NotRegexp(t, "^start", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
- if !assert.NotRegexp(t, rx, str, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotRegexpf asserts that a specified regexp does not match a string.
-//
-// assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
-// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {
- if !assert.NotRegexpf(t, rx, str, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
- if !assert.NotSubset(t, list, subset, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
- if !assert.NotSubsetf(t, list, subset, msg, args...) {
- t.FailNow()
- }
-}
-
-// NotZero asserts that i is not the zero value for its type and returns the truth.
-func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
- if !assert.NotZero(t, i, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// NotZerof asserts that i is not the zero value for its type and returns the truth.
-func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) {
- if !assert.NotZerof(t, i, msg, args...) {
- t.FailNow()
- }
-}
-
-// Panics asserts that the code inside the specified PanicTestFunc panics.
-//
-// assert.Panics(t, func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- if !assert.Panics(t, f, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- if !assert.PanicsWithValue(t, expected, f, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {
- if !assert.PanicsWithValuef(t, expected, f, msg, args...) {
- t.FailNow()
- }
-}
-
-// Panicsf asserts that the code inside the specified PanicTestFunc panics.
-//
-// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {
- if !assert.Panicsf(t, f, msg, args...) {
- t.FailNow()
- }
-}
-
-// Regexp asserts that a specified regexp matches a string.
-//
-// assert.Regexp(t, regexp.MustCompile("start"), "it's starting")
-// assert.Regexp(t, "start...$", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
- if !assert.Regexp(t, rx, str, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Regexpf asserts that a specified regexp matches a string.
-//
-// assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
-// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {
- if !assert.Regexpf(t, rx, str, msg, args...) {
- t.FailNow()
- }
-}
-
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
- if !assert.Subset(t, list, subset, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
- if !assert.Subsetf(t, list, subset, msg, args...) {
- t.FailNow()
- }
-}
-
-// True asserts that the specified value is true.
-//
-// assert.True(t, myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func True(t TestingT, value bool, msgAndArgs ...interface{}) {
- if !assert.True(t, value, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Truef asserts that the specified value is true.
-//
-// assert.Truef(t, myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func Truef(t TestingT, value bool, msg string, args ...interface{}) {
- if !assert.Truef(t, value, msg, args...) {
- t.FailNow()
- }
-}
-
-// WithinDuration asserts that the two times are within duration delta of each other.
-//
-// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {
- if !assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// WithinDurationf asserts that the two times are within duration delta of each other.
-//
-// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {
- if !assert.WithinDurationf(t, expected, actual, delta, msg, args...) {
- t.FailNow()
- }
-}
-
-// Zero asserts that i is the zero value for its type and returns the truth.
-func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
- if !assert.Zero(t, i, msgAndArgs...) {
- t.FailNow()
- }
-}
-
-// Zerof asserts that i is the zero value for its type and returns the truth.
-func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) {
- if !assert.Zerof(t, i, msg, args...) {
- t.FailNow()
- }
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require_forward.go
deleted file mode 100644
index 769408503..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/require_forward.go
+++ /dev/null
@@ -1,799 +0,0 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
-
-package require
-
-import (
- assert "github.com/stretchr/testify/assert"
- http "net/http"
- url "net/url"
- time "time"
-)
-
-// Condition uses a Comparison to assert a complex condition.
-func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) {
- Condition(a.t, comp, msgAndArgs...)
-}
-
-// Conditionf uses a Comparison to assert a complex condition.
-func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) {
- Conditionf(a.t, comp, msg, args...)
-}
-
-// Contains asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// a.Contains("Hello World", "World")
-// a.Contains(["Hello", "World"], "World")
-// a.Contains({"Hello": "World"}, "Hello")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {
- Contains(a.t, s, contains, msgAndArgs...)
-}
-
-// Containsf asserts that the specified string, list(array, slice...) or map contains the
-// specified substring or element.
-//
-// a.Containsf("Hello World", "World", "error message %s", "formatted")
-// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted")
-// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
- Containsf(a.t, s, contains, msg, args...)
-}
-
-// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) {
- DirExists(a.t, path, msgAndArgs...)
-}
-
-// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
-func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) {
- DirExistsf(a.t, path, msg, args...)
-}
-
-// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
- ElementsMatch(a.t, listA, listB, msgAndArgs...)
-}
-
-// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
-// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,
-// the number of appearances of each of them in both lists should match.
-//
-// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted"))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) {
- ElementsMatchf(a.t, listA, listB, msg, args...)
-}
-
-// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// a.Empty(obj)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) {
- Empty(a.t, object, msgAndArgs...)
-}
-
-// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// a.Emptyf(obj, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) {
- Emptyf(a.t, object, msg, args...)
-}
-
-// Equal asserts that two objects are equal.
-//
-// a.Equal(123, 123)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- Equal(a.t, expected, actual, msgAndArgs...)
-}
-
-// EqualError asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// a.EqualError(err, expectedErrorString)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) {
- EqualError(a.t, theError, errString, msgAndArgs...)
-}
-
-// EqualErrorf asserts that a function returned an error (i.e. not `nil`)
-// and that it is equal to the provided error.
-//
-// actualObj, err := SomeFunction()
-// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) {
- EqualErrorf(a.t, theError, errString, msg, args...)
-}
-
-// EqualValues asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// a.EqualValues(uint32(123), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- EqualValues(a.t, expected, actual, msgAndArgs...)
-}
-
-// EqualValuesf asserts that two objects are equal or convertable to the same types
-// and equal.
-//
-// a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
- EqualValuesf(a.t, expected, actual, msg, args...)
-}
-
-// Equalf asserts that two objects are equal.
-//
-// a.Equalf(123, 123, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses). Function equality
-// cannot be determined and will always fail.
-func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
- Equalf(a.t, expected, actual, msg, args...)
-}
-
-// Error asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.Error(err) {
-// assert.Equal(t, expectedError, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Error(err error, msgAndArgs ...interface{}) {
- Error(a.t, err, msgAndArgs...)
-}
-
-// Errorf asserts that a function returned an error (i.e. not `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.Errorf(err, "error message %s", "formatted") {
-// assert.Equal(t, expectedErrorf, err)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Errorf(err error, msg string, args ...interface{}) {
- Errorf(a.t, err, msg, args...)
-}
-
-// Exactly asserts that two objects are equal in value and type.
-//
-// a.Exactly(int32(123), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- Exactly(a.t, expected, actual, msgAndArgs...)
-}
-
-// Exactlyf asserts that two objects are equal in value and type.
-//
-// a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123))
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
- Exactlyf(a.t, expected, actual, msg, args...)
-}
-
-// Fail reports a failure through
-func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) {
- Fail(a.t, failureMessage, msgAndArgs...)
-}
-
-// FailNow fails test
-func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) {
- FailNow(a.t, failureMessage, msgAndArgs...)
-}
-
-// FailNowf fails test
-func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) {
- FailNowf(a.t, failureMessage, msg, args...)
-}
-
-// Failf reports a failure through
-func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) {
- Failf(a.t, failureMessage, msg, args...)
-}
-
-// False asserts that the specified value is false.
-//
-// a.False(myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) False(value bool, msgAndArgs ...interface{}) {
- False(a.t, value, msgAndArgs...)
-}
-
-// Falsef asserts that the specified value is false.
-//
-// a.Falsef(myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) {
- Falsef(a.t, value, msg, args...)
-}
-
-// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {
- FileExists(a.t, path, msgAndArgs...)
-}
-
-// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
-func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) {
- FileExistsf(a.t, path, msg, args...)
-}
-
-// HTTPBodyContains asserts that a specified handler returns a
-// body that contains a string.
-//
-// a.HTTPBodyContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
- HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...)
-}
-
-// HTTPBodyContainsf asserts that a specified handler returns a
-// body that contains a string.
-//
-// a.HTTPBodyContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
- HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)
-}
-
-// HTTPBodyNotContains asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// a.HTTPBodyNotContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
- HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...)
-}
-
-// HTTPBodyNotContainsf asserts that a specified handler returns a
-// body that does not contain a string.
-//
-// a.HTTPBodyNotContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
- HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...)
-}
-
-// HTTPError asserts that a specified handler returns an error status code.
-//
-// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- HTTPError(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPErrorf asserts that a specified handler returns an error status code.
-//
-// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- HTTPErrorf(a.t, handler, method, url, values, msg, args...)
-}
-
-// HTTPRedirect asserts that a specified handler returns a redirect status code.
-//
-// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPRedirectf asserts that a specified handler returns a redirect status code.
-//
-// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
-//
-// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
-func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- HTTPRedirectf(a.t, handler, method, url, values, msg, args...)
-}
-
-// HTTPSuccess asserts that a specified handler returns a success status code.
-//
-// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
- HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)
-}
-
-// HTTPSuccessf asserts that a specified handler returns a success status code.
-//
-// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
- HTTPSuccessf(a.t, handler, method, url, values, msg, args...)
-}
-
-// Implements asserts that an object is implemented by the specified interface.
-//
-// a.Implements((*MyInterface)(nil), new(MyObject))
-func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
- Implements(a.t, interfaceObject, object, msgAndArgs...)
-}
-
-// Implementsf asserts that an object is implemented by the specified interface.
-//
-// a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
-func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
- Implementsf(a.t, interfaceObject, object, msg, args...)
-}
-
-// InDelta asserts that the two numerals are within delta of each other.
-//
-// a.InDelta(math.Pi, (22 / 7.0), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- InDelta(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
-func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...)
-}
-
-// InDeltaSlice is the same as InDelta, except it compares two slices.
-func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
- InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// InDeltaSlicef is the same as InDelta, except it compares two slices.
-func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- InDeltaSlicef(a.t, expected, actual, delta, msg, args...)
-}
-
-// InDeltaf asserts that the two numerals are within delta of each other.
-//
-// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
- InDeltaf(a.t, expected, actual, delta, msg, args...)
-}
-
-// InEpsilon asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
- InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)
-}
-
-// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
-func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
- InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...)
-}
-
-// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
-func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
- InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...)
-}
-
-// InEpsilonf asserts that expected and actual have a relative error less than epsilon
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
- InEpsilonf(a.t, expected, actual, epsilon, msg, args...)
-}
-
-// IsType asserts that the specified objects are of the same type.
-func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
- IsType(a.t, expectedType, object, msgAndArgs...)
-}
-
-// IsTypef asserts that the specified objects are of the same type.
-func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) {
- IsTypef(a.t, expectedType, object, msg, args...)
-}
-
-// JSONEq asserts that two JSON strings are equivalent.
-//
-// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) {
- JSONEq(a.t, expected, actual, msgAndArgs...)
-}
-
-// JSONEqf asserts that two JSON strings are equivalent.
-//
-// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) {
- JSONEqf(a.t, expected, actual, msg, args...)
-}
-
-// Len asserts that the specified object has specific length.
-// Len also fails if the object has a type that len() not accept.
-//
-// a.Len(mySlice, 3)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) {
- Len(a.t, object, length, msgAndArgs...)
-}
-
-// Lenf asserts that the specified object has specific length.
-// Lenf also fails if the object has a type that len() not accept.
-//
-// a.Lenf(mySlice, 3, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) {
- Lenf(a.t, object, length, msg, args...)
-}
-
-// Nil asserts that the specified object is nil.
-//
-// a.Nil(err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) {
- Nil(a.t, object, msgAndArgs...)
-}
-
-// Nilf asserts that the specified object is nil.
-//
-// a.Nilf(err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) {
- Nilf(a.t, object, msg, args...)
-}
-
-// NoError asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.NoError(err) {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) {
- NoError(a.t, err, msgAndArgs...)
-}
-
-// NoErrorf asserts that a function returned no error (i.e. `nil`).
-//
-// actualObj, err := SomeFunction()
-// if a.NoErrorf(err, "error message %s", "formatted") {
-// assert.Equal(t, expectedObj, actualObj)
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) {
- NoErrorf(a.t, err, msg, args...)
-}
-
-// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// a.NotContains("Hello World", "Earth")
-// a.NotContains(["Hello", "World"], "Earth")
-// a.NotContains({"Hello": "World"}, "Earth")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {
- NotContains(a.t, s, contains, msgAndArgs...)
-}
-
-// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
-// specified substring or element.
-//
-// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted")
-// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted")
-// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
- NotContainsf(a.t, s, contains, msg, args...)
-}
-
-// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if a.NotEmpty(obj) {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) {
- NotEmpty(a.t, object, msgAndArgs...)
-}
-
-// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
-// a slice or a channel with len == 0.
-//
-// if a.NotEmptyf(obj, "error message %s", "formatted") {
-// assert.Equal(t, "two", obj[1])
-// }
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) {
- NotEmptyf(a.t, object, msg, args...)
-}
-
-// NotEqual asserts that the specified values are NOT equal.
-//
-// a.NotEqual(obj1, obj2)
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
- NotEqual(a.t, expected, actual, msgAndArgs...)
-}
-
-// NotEqualf asserts that the specified values are NOT equal.
-//
-// a.NotEqualf(obj1, obj2, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Pointer variable equality is determined based on the equality of the
-// referenced values (as opposed to the memory addresses).
-func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
- NotEqualf(a.t, expected, actual, msg, args...)
-}
-
-// NotNil asserts that the specified object is not nil.
-//
-// a.NotNil(err)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) {
- NotNil(a.t, object, msgAndArgs...)
-}
-
-// NotNilf asserts that the specified object is not nil.
-//
-// a.NotNilf(err, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) {
- NotNilf(a.t, object, msg, args...)
-}
-
-// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// a.NotPanics(func(){ RemainCalm() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- NotPanics(a.t, f, msgAndArgs...)
-}
-
-// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
-//
-// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {
- NotPanicsf(a.t, f, msg, args...)
-}
-
-// NotRegexp asserts that a specified regexp does not match a string.
-//
-// a.NotRegexp(regexp.MustCompile("starts"), "it's starting")
-// a.NotRegexp("^start", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {
- NotRegexp(a.t, rx, str, msgAndArgs...)
-}
-
-// NotRegexpf asserts that a specified regexp does not match a string.
-//
-// a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
-// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
- NotRegexpf(a.t, rx, str, msg, args...)
-}
-
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
- NotSubset(a.t, list, subset, msgAndArgs...)
-}
-
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
-//
-// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
- NotSubsetf(a.t, list, subset, msg, args...)
-}
-
-// NotZero asserts that i is not the zero value for its type and returns the truth.
-func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) {
- NotZero(a.t, i, msgAndArgs...)
-}
-
-// NotZerof asserts that i is not the zero value for its type and returns the truth.
-func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) {
- NotZerof(a.t, i, msg, args...)
-}
-
-// Panics asserts that the code inside the specified PanicTestFunc panics.
-//
-// a.Panics(func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- Panics(a.t, f, msgAndArgs...)
-}
-
-// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// a.PanicsWithValue("crazy error", func(){ GoCrazy() })
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
- PanicsWithValue(a.t, expected, f, msgAndArgs...)
-}
-
-// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
-// the recovered panic value equals the expected panic value.
-//
-// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {
- PanicsWithValuef(a.t, expected, f, msg, args...)
-}
-
-// Panicsf asserts that the code inside the specified PanicTestFunc panics.
-//
-// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {
- Panicsf(a.t, f, msg, args...)
-}
-
-// Regexp asserts that a specified regexp matches a string.
-//
-// a.Regexp(regexp.MustCompile("start"), "it's starting")
-// a.Regexp("start...$", "it's not starting")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {
- Regexp(a.t, rx, str, msgAndArgs...)
-}
-
-// Regexpf asserts that a specified regexp matches a string.
-//
-// a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
-// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
- Regexpf(a.t, rx, str, msg, args...)
-}
-
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
- Subset(a.t, list, subset, msgAndArgs...)
-}
-
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
-//
-// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
- Subsetf(a.t, list, subset, msg, args...)
-}
-
-// True asserts that the specified value is true.
-//
-// a.True(myBool)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) True(value bool, msgAndArgs ...interface{}) {
- True(a.t, value, msgAndArgs...)
-}
-
-// Truef asserts that the specified value is true.
-//
-// a.Truef(myBool, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) Truef(value bool, msg string, args ...interface{}) {
- Truef(a.t, value, msg, args...)
-}
-
-// WithinDuration asserts that the two times are within duration delta of each other.
-//
-// a.WithinDuration(time.Now(), time.Now(), 10*time.Second)
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {
- WithinDuration(a.t, expected, actual, delta, msgAndArgs...)
-}
-
-// WithinDurationf asserts that the two times are within duration delta of each other.
-//
-// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
-//
-// Returns whether the assertion was successful (true) or not (false).
-func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {
- WithinDurationf(a.t, expected, actual, delta, msg, args...)
-}
-
-// Zero asserts that i is the zero value for its type and returns the truth.
-func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) {
- Zero(a.t, i, msgAndArgs...)
-}
-
-// Zerof asserts that i is the zero value for its type and returns the truth.
-func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) {
- Zerof(a.t, i, msg, args...)
-}
diff --git a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/requirements.go b/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/requirements.go
deleted file mode 100644
index e404f016d..000000000
--- a/vendor/github.com/stretchr/objx/vendor/github.com/stretchr/testify/require/requirements.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package require
-
-// TestingT is an interface wrapper around *testing.T
-type TestingT interface {
- Errorf(format string, args ...interface{})
- FailNow()
-}
-
-//go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs
diff --git a/vendor/github.com/stretchr/testify/.gitignore b/vendor/github.com/stretchr/testify/.gitignore
deleted file mode 100644
index 5aacdb7cc..000000000
--- a/vendor/github.com/stretchr/testify/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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
-
-.DS_Store
diff --git a/vendor/github.com/stretchr/testify/.travis.gofmt.sh b/vendor/github.com/stretchr/testify/.travis.gofmt.sh
deleted file mode 100755
index bfffdca8b..000000000
--- a/vendor/github.com/stretchr/testify/.travis.gofmt.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-if [ -n "$(gofmt -l .)" ]; then
- echo "Go code is not formatted:"
- gofmt -d .
- exit 1
-fi
diff --git a/vendor/github.com/stretchr/testify/.travis.gogenerate.sh b/vendor/github.com/stretchr/testify/.travis.gogenerate.sh
deleted file mode 100755
index 161b449cd..000000000
--- a/vendor/github.com/stretchr/testify/.travis.gogenerate.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-if [[ "$TRAVIS_GO_VERSION" =~ ^1\.[45](\..*)?$ ]]; then
- exit 0
-fi
-
-go get github.com/ernesto-jimenez/gogen/imports
-go generate ./...
-if [ -n "$(git diff)" ]; then
- echo "Go generate had not been run"
- git diff
- exit 1
-fi
diff --git a/vendor/github.com/stretchr/testify/.travis.govet.sh b/vendor/github.com/stretchr/testify/.travis.govet.sh
deleted file mode 100755
index f8fbba7a1..000000000
--- a/vendor/github.com/stretchr/testify/.travis.govet.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-cd "$(dirname $0)"
-DIRS=". assert require mock _codegen"
-set -e
-for subdir in $DIRS; do
- pushd $subdir
- go vet
- popd
-done
diff --git a/vendor/github.com/stretchr/testify/.travis.yml b/vendor/github.com/stretchr/testify/.travis.yml
deleted file mode 100644
index 6e51e63c2..000000000
--- a/vendor/github.com/stretchr/testify/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-
-sudo: false
-
-go:
- - 1.7
- - 1.8
- - 1.9
- - tip
-
-script:
- - ./.travis.gogenerate.sh
- - ./.travis.gofmt.sh
- - ./.travis.govet.sh
- - go test -v -race $(go list ./... | grep -v vendor)
diff --git a/vendor/github.com/stretchr/testify/Gopkg.lock b/vendor/github.com/stretchr/testify/Gopkg.lock
deleted file mode 100644
index 294cda093..000000000
--- a/vendor/github.com/stretchr/testify/Gopkg.lock
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- name = "github.com/davecgh/go-spew"
- packages = ["spew"]
- revision = "346938d642f2ec3594ed81d874461961cd0faa76"
- version = "v1.1.0"
-
-[[projects]]
- name = "github.com/pmezard/go-difflib"
- packages = ["difflib"]
- revision = "792786c7400a136282c1664665ae0a8db921c6c2"
- version = "v1.0.0"
-
-[[projects]]
- name = "github.com/stretchr/objx"
- packages = ["."]
- revision = "facf9a85c22f48d2f52f2380e4efce1768749a89"
- version = "v0.1"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- inputs-digest = "448ddae4702c6aded2555faafd390c537789bb1c483f70b0431e6634f73f2090"
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/stretchr/testify/Gopkg.toml b/vendor/github.com/stretchr/testify/Gopkg.toml
deleted file mode 100644
index a16374c8b..000000000
--- a/vendor/github.com/stretchr/testify/Gopkg.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-[prune]
- unused-packages = true
- non-go = true
- go-tests = true
-
-[[constraint]]
- name = "github.com/davecgh/go-spew"
- version = "~1.1.0"
-
-[[constraint]]
- name = "github.com/pmezard/go-difflib"
- version = "~1.0.0"
-
-[[constraint]]
- name = "github.com/stretchr/objx"
- version = "~0.1.0"
diff --git a/vendor/github.com/stretchr/testify/README.md b/vendor/github.com/stretchr/testify/README.md
deleted file mode 100644
index d3b942b7f..000000000
--- a/vendor/github.com/stretchr/testify/README.md
+++ /dev/null
@@ -1,301 +0,0 @@
-Testify - Thou Shalt Write Tests
-================================
-
-[![Build Status](https://travis-ci.org/stretchr/testify.svg)](https://travis-ci.org/stretchr/testify) [![Go Report Card](https://goreportcard.com/badge/github.com/stretchr/testify)](https://goreportcard.com/report/github.com/stretchr/testify) [![GoDoc](https://godoc.org/github.com/stretchr/testify?status.svg)](https://godoc.org/github.com/stretchr/testify)
-
-Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend.
-
-Features include:
-
- * [Easy assertions](#assert-package)
- * [Mocking](#mock-package)
- * [Testing suite interfaces and functions](#suite-package)
-
-Get started:
-
- * Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date)
- * For an introduction to writing test code in Go, see http://golang.org/doc/code.html#Testing
- * Check out the API Documentation http://godoc.org/github.com/stretchr/testify
- * To make your testing life easier, check out our other project, [gorc](http://github.com/stretchr/gorc)
- * A little about [Test-Driven Development (TDD)](http://en.wikipedia.org/wiki/Test-driven_development)
-
-
-
-[`assert`](http://godoc.org/github.com/stretchr/testify/assert "API documentation") package
--------------------------------------------------------------------------------------------
-
-The `assert` package provides some helpful methods that allow you to write better test code in Go.
-
- * Prints friendly, easy to read failure descriptions
- * Allows for very readable code
- * Optionally annotate each assertion with a message
-
-See it in action:
-
-```go
-package yours
-
-import (
- "testing"
- "github.com/stretchr/testify/assert"
-)
-
-func TestSomething(t *testing.T) {
-
- // assert equality
- assert.Equal(t, 123, 123, "they should be equal")
-
- // assert inequality
- assert.NotEqual(t, 123, 456, "they should not be equal")
-
- // assert for nil (good for errors)
- assert.Nil(t, object)
-
- // assert for not nil (good when you expect something)
- if assert.NotNil(t, object) {
-
- // now we know that object isn't nil, we are safe to make
- // further assertions without causing any errors
- assert.Equal(t, "Something", object.Value)
-
- }
-
-}
-```
-
- * Every assert func takes the `testing.T` object as the first argument. This is how it writes the errors out through the normal `go test` capabilities.
- * Every assert func returns a bool indicating whether the assertion was successful or not, this is useful for if you want to go on making further assertions under certain conditions.
-
-if you assert many times, use the below:
-
-```go
-package yours
-
-import (
- "testing"
- "github.com/stretchr/testify/assert"
-)
-
-func TestSomething(t *testing.T) {
- assert := assert.New(t)
-
- // assert equality
- assert.Equal(123, 123, "they should be equal")
-
- // assert inequality
- assert.NotEqual(123, 456, "they should not be equal")
-
- // assert for nil (good for errors)
- assert.Nil(object)
-
- // assert for not nil (good when you expect something)
- if assert.NotNil(object) {
-
- // now we know that object isn't nil, we are safe to make
- // further assertions without causing any errors
- assert.Equal("Something", object.Value)
- }
-}
-```
-
-[`require`](http://godoc.org/github.com/stretchr/testify/require "API documentation") package
----------------------------------------------------------------------------------------------
-
-The `require` package provides same global functions as the `assert` package, but instead of returning a boolean result they terminate current test.
-
-See [t.FailNow](http://golang.org/pkg/testing/#T.FailNow) for details.
-
-[`mock`](http://godoc.org/github.com/stretchr/testify/mock "API documentation") package
-----------------------------------------------------------------------------------------
-
-The `mock` package provides a mechanism for easily writing mock objects that can be used in place of real objects when writing test code.
-
-An example test function that tests a piece of code that relies on an external object `testObj`, can setup expectations (testify) and assert that they indeed happened:
-
-```go
-package yours
-
-import (
- "testing"
- "github.com/stretchr/testify/mock"
-)
-
-/*
- Test objects
-*/
-
-// MyMockedObject is a mocked object that implements an interface
-// that describes an object that the code I am testing relies on.
-type MyMockedObject struct{
- mock.Mock
-}
-
-// DoSomething is a method on MyMockedObject that implements some interface
-// and just records the activity, and returns what the Mock object tells it to.
-//
-// In the real object, this method would do something useful, but since this
-// is a mocked object - we're just going to stub it out.
-//
-// NOTE: This method is not being tested here, code that uses this object is.
-func (m *MyMockedObject) DoSomething(number int) (bool, error) {
-
- args := m.Called(number)
- return args.Bool(0), args.Error(1)
-
-}
-
-/*
- Actual test functions
-*/
-
-// TestSomething is an example of how to use our test object to
-// make assertions about some target code we are testing.
-func TestSomething(t *testing.T) {
-
- // create an instance of our test object
- testObj := new(MyMockedObject)
-
- // setup expectations
- testObj.On("DoSomething", 123).Return(true, nil)
-
- // call the code we are testing
- targetFuncThatDoesSomethingWithObj(testObj)
-
- // assert that the expectations were met
- testObj.AssertExpectations(t)
-
-}
-```
-
-For more information on how to write mock code, check out the [API documentation for the `mock` package](http://godoc.org/github.com/stretchr/testify/mock).
-
-You can use the [mockery tool](http://github.com/vektra/mockery) to autogenerate the mock code against an interface as well, making using mocks much quicker.
-
-[`suite`](http://godoc.org/github.com/stretchr/testify/suite "API documentation") package
------------------------------------------------------------------------------------------
-
-The `suite` package provides functionality that you might be used to from more common object oriented languages. With it, you can build a testing suite as a struct, build setup/teardown methods and testing methods on your struct, and run them with 'go test' as per normal.
-
-An example suite is shown below:
-
-```go
-// Basic imports
-import (
- "testing"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/suite"
-)
-
-// Define the suite, and absorb the built-in basic suite
-// functionality from testify - including a T() method which
-// returns the current testing context
-type ExampleTestSuite struct {
- suite.Suite
- VariableThatShouldStartAtFive int
-}
-
-// Make sure that VariableThatShouldStartAtFive is set to five
-// before each test
-func (suite *ExampleTestSuite) SetupTest() {
- suite.VariableThatShouldStartAtFive = 5
-}
-
-// All methods that begin with "Test" are run as tests within a
-// suite.
-func (suite *ExampleTestSuite) TestExample() {
- assert.Equal(suite.T(), 5, suite.VariableThatShouldStartAtFive)
-}
-
-// In order for 'go test' to run this suite, we need to create
-// a normal test function and pass our suite to suite.Run
-func TestExampleTestSuite(t *testing.T) {
- suite.Run(t, new(ExampleTestSuite))
-}
-```
-
-For a more complete example, using all of the functionality provided by the suite package, look at our [example testing suite](https://github.com/stretchr/testify/blob/master/suite/suite_test.go)
-
-For more information on writing suites, check out the [API documentation for the `suite` package](http://godoc.org/github.com/stretchr/testify/suite).
-
-`Suite` object has assertion methods:
-
-```go
-// Basic imports
-import (
- "testing"
- "github.com/stretchr/testify/suite"
-)
-
-// Define the suite, and absorb the built-in basic suite
-// functionality from testify - including assertion methods.
-type ExampleTestSuite struct {
- suite.Suite
- VariableThatShouldStartAtFive int
-}
-
-// Make sure that VariableThatShouldStartAtFive is set to five
-// before each test
-func (suite *ExampleTestSuite) SetupTest() {
- suite.VariableThatShouldStartAtFive = 5
-}
-
-// All methods that begin with "Test" are run as tests within a
-// suite.
-func (suite *ExampleTestSuite) TestExample() {
- suite.Equal(suite.VariableThatShouldStartAtFive, 5)
-}
-
-// In order for 'go test' to run this suite, we need to create
-// a normal test function and pass our suite to suite.Run
-func TestExampleTestSuite(t *testing.T) {
- suite.Run(t, new(ExampleTestSuite))
-}
-```
-
-------
-
-Installation
-============
-
-To install Testify, use `go get`:
-
- go get github.com/stretchr/testify
-
-This will then make the following packages available to you:
-
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/mock
- github.com/stretchr/testify/http
-
-Import the `testify/assert` package into your code using this template:
-
-```go
-package yours
-
-import (
- "testing"
- "github.com/stretchr/testify/assert"
-)
-
-func TestSomething(t *testing.T) {
-
- assert.True(t, true, "True is true!")
-
-}
-```
-
-------
-
-Staying up to date
-==================
-
-To update Testify to the latest version, use `go get -u github.com/stretchr/testify`.
-
-------
-
-Contributing
-============
-
-Please feel free to submit issues, fork the repository and send pull requests!
-
-When submitting an issue, we ask that you please include a complete test function that demonstrates the issue. Extra credit for those using Testify to write the test code that demonstrates it.
diff --git a/vendor/github.com/stretchr/testify/_codegen/main.go b/vendor/github.com/stretchr/testify/_codegen/main.go
deleted file mode 100644
index 2e5e8124f..000000000
--- a/vendor/github.com/stretchr/testify/_codegen/main.go
+++ /dev/null
@@ -1,316 +0,0 @@
-// This program reads all assertion functions from the assert package and
-// automatically generates the corresponding requires and forwarded assertions
-
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "go/ast"
- "go/build"
- "go/doc"
- "go/format"
- "go/importer"
- "go/parser"
- "go/token"
- "go/types"
- "io"
- "io/ioutil"
- "log"
- "os"
- "path"
- "regexp"
- "strings"
- "text/template"
-
- "github.com/ernesto-jimenez/gogen/imports"
-)
-
-var (
- pkg = flag.String("assert-path", "github.com/stretchr/testify/assert", "Path to the assert package")
- includeF = flag.Bool("include-format-funcs", false, "include format functions such as Errorf and Equalf")
- outputPkg = flag.String("output-package", "", "package for the resulting code")
- tmplFile = flag.String("template", "", "What file to load the function template from")
- out = flag.String("out", "", "What file to write the source code to")
-)
-
-func main() {
- flag.Parse()
-
- scope, docs, err := parsePackageSource(*pkg)
- if err != nil {
- log.Fatal(err)
- }
-
- importer, funcs, err := analyzeCode(scope, docs)
- if err != nil {
- log.Fatal(err)
- }
-
- if err := generateCode(importer, funcs); err != nil {
- log.Fatal(err)
- }
-}
-
-func generateCode(importer imports.Importer, funcs []testFunc) error {
- buff := bytes.NewBuffer(nil)
-
- tmplHead, tmplFunc, err := parseTemplates()
- if err != nil {
- return err
- }
-
- // Generate header
- if err := tmplHead.Execute(buff, struct {
- Name string
- Imports map[string]string
- }{
- *outputPkg,
- importer.Imports(),
- }); err != nil {
- return err
- }
-
- // Generate funcs
- for _, fn := range funcs {
- buff.Write([]byte("\n\n"))
- if err := tmplFunc.Execute(buff, &fn); err != nil {
- return err
- }
- }
-
- code, err := format.Source(buff.Bytes())
- if err != nil {
- return err
- }
-
- // Write file
- output, err := outputFile()
- if err != nil {
- return err
- }
- defer output.Close()
- _, err = io.Copy(output, bytes.NewReader(code))
- return err
-}
-
-func parseTemplates() (*template.Template, *template.Template, error) {
- tmplHead, err := template.New("header").Parse(headerTemplate)
- if err != nil {
- return nil, nil, err
- }
- if *tmplFile != "" {
- f, err := ioutil.ReadFile(*tmplFile)
- if err != nil {
- return nil, nil, err
- }
- funcTemplate = string(f)
- }
- tmpl, err := template.New("function").Parse(funcTemplate)
- if err != nil {
- return nil, nil, err
- }
- return tmplHead, tmpl, nil
-}
-
-func outputFile() (*os.File, error) {
- filename := *out
- if filename == "-" || (filename == "" && *tmplFile == "") {
- return os.Stdout, nil
- }
- if filename == "" {
- filename = strings.TrimSuffix(strings.TrimSuffix(*tmplFile, ".tmpl"), ".go") + ".go"
- }
- return os.Create(filename)
-}
-
-// analyzeCode takes the types scope and the docs and returns the import
-// information and information about all the assertion functions.
-func analyzeCode(scope *types.Scope, docs *doc.Package) (imports.Importer, []testFunc, error) {
- testingT := scope.Lookup("TestingT").Type().Underlying().(*types.Interface)
-
- importer := imports.New(*outputPkg)
- var funcs []testFunc
- // Go through all the top level functions
- for _, fdocs := range docs.Funcs {
- // Find the function
- obj := scope.Lookup(fdocs.Name)
-
- fn, ok := obj.(*types.Func)
- if !ok {
- continue
- }
- // Check function signature has at least two arguments
- sig := fn.Type().(*types.Signature)
- if sig.Params().Len() < 2 {
- continue
- }
- // Check first argument is of type testingT
- first, ok := sig.Params().At(0).Type().(*types.Named)
- if !ok {
- continue
- }
- firstType, ok := first.Underlying().(*types.Interface)
- if !ok {
- continue
- }
- if !types.Implements(firstType, testingT) {
- continue
- }
-
- // Skip functions ending with f
- if strings.HasSuffix(fdocs.Name, "f") && !*includeF {
- continue
- }
-
- funcs = append(funcs, testFunc{*outputPkg, fdocs, fn})
- importer.AddImportsFrom(sig.Params())
- }
- return importer, funcs, nil
-}
-
-// parsePackageSource returns the types scope and the package documentation from the package
-func parsePackageSource(pkg string) (*types.Scope, *doc.Package, error) {
- pd, err := build.Import(pkg, ".", 0)
- if err != nil {
- return nil, nil, err
- }
-
- fset := token.NewFileSet()
- files := make(map[string]*ast.File)
- fileList := make([]*ast.File, len(pd.GoFiles))
- for i, fname := range pd.GoFiles {
- src, err := ioutil.ReadFile(path.Join(pd.SrcRoot, pd.ImportPath, fname))
- if err != nil {
- return nil, nil, err
- }
- f, err := parser.ParseFile(fset, fname, src, parser.ParseComments|parser.AllErrors)
- if err != nil {
- return nil, nil, err
- }
- files[fname] = f
- fileList[i] = f
- }
-
- cfg := types.Config{
- Importer: importer.Default(),
- }
- info := types.Info{
- Defs: make(map[*ast.Ident]types.Object),
- }
- tp, err := cfg.Check(pkg, fset, fileList, &info)
- if err != nil {
- return nil, nil, err
- }
-
- scope := tp.Scope()
-
- ap, _ := ast.NewPackage(fset, files, nil, nil)
- docs := doc.New(ap, pkg, 0)
-
- return scope, docs, nil
-}
-
-type testFunc struct {
- CurrentPkg string
- DocInfo *doc.Func
- TypeInfo *types.Func
-}
-
-func (f *testFunc) Qualifier(p *types.Package) string {
- if p == nil || p.Name() == f.CurrentPkg {
- return ""
- }
- return p.Name()
-}
-
-func (f *testFunc) Params() string {
- sig := f.TypeInfo.Type().(*types.Signature)
- params := sig.Params()
- p := ""
- comma := ""
- to := params.Len()
- var i int
-
- if sig.Variadic() {
- to--
- }
- for i = 1; i < to; i++ {
- param := params.At(i)
- p += fmt.Sprintf("%s%s %s", comma, param.Name(), types.TypeString(param.Type(), f.Qualifier))
- comma = ", "
- }
- if sig.Variadic() {
- param := params.At(params.Len() - 1)
- p += fmt.Sprintf("%s%s ...%s", comma, param.Name(), types.TypeString(param.Type().(*types.Slice).Elem(), f.Qualifier))
- }
- return p
-}
-
-func (f *testFunc) ForwardedParams() string {
- sig := f.TypeInfo.Type().(*types.Signature)
- params := sig.Params()
- p := ""
- comma := ""
- to := params.Len()
- var i int
-
- if sig.Variadic() {
- to--
- }
- for i = 1; i < to; i++ {
- param := params.At(i)
- p += fmt.Sprintf("%s%s", comma, param.Name())
- comma = ", "
- }
- if sig.Variadic() {
- param := params.At(params.Len() - 1)
- p += fmt.Sprintf("%s%s...", comma, param.Name())
- }
- return p
-}
-
-func (f *testFunc) ParamsFormat() string {
- return strings.Replace(f.Params(), "msgAndArgs", "msg string, args", 1)
-}
-
-func (f *testFunc) ForwardedParamsFormat() string {
- return strings.Replace(f.ForwardedParams(), "msgAndArgs", "append([]interface{}{msg}, args...)", 1)
-}
-
-func (f *testFunc) Comment() string {
- return "// " + strings.Replace(strings.TrimSpace(f.DocInfo.Doc), "\n", "\n// ", -1)
-}
-
-func (f *testFunc) CommentFormat() string {
- search := fmt.Sprintf("%s", f.DocInfo.Name)
- replace := fmt.Sprintf("%sf", f.DocInfo.Name)
- comment := strings.Replace(f.Comment(), search, replace, -1)
- exp := regexp.MustCompile(replace + `\(((\(\)|[^)])+)\)`)
- return exp.ReplaceAllString(comment, replace+`($1, "error message %s", "formatted")`)
-}
-
-func (f *testFunc) CommentWithoutT(receiver string) string {
- search := fmt.Sprintf("assert.%s(t, ", f.DocInfo.Name)
- replace := fmt.Sprintf("%s.%s(", receiver, f.DocInfo.Name)
- return strings.Replace(f.Comment(), search, replace, -1)
-}
-
-var headerTemplate = `/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
-*/
-
-package {{.Name}}
-
-import (
-{{range $path, $name := .Imports}}
- {{$name}} "{{$path}}"{{end}}
-)
-`
-
-var funcTemplate = `{{.Comment}}
-func (fwd *AssertionsForwarder) {{.DocInfo.Name}}({{.Params}}) bool {
- return assert.{{.DocInfo.Name}}({{.ForwardedParams}})
-}`
diff --git a/vendor/github.com/stretchr/testify/assert/assertions_test.go b/vendor/github.com/stretchr/testify/assert/assertions_test.go
deleted file mode 100644
index 6757bd138..000000000
--- a/vendor/github.com/stretchr/testify/assert/assertions_test.go
+++ /dev/null
@@ -1,1581 +0,0 @@
-package assert
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "math"
- "os"
- "reflect"
- "regexp"
- "runtime"
- "strings"
- "testing"
- "time"
-)
-
-var (
- i interface{}
- zeros = []interface{}{
- false,
- byte(0),
- complex64(0),
- complex128(0),
- float32(0),
- float64(0),
- int(0),
- int8(0),
- int16(0),
- int32(0),
- int64(0),
- rune(0),
- uint(0),
- uint8(0),
- uint16(0),
- uint32(0),
- uint64(0),
- uintptr(0),
- "",
- [0]interface{}{},
- []interface{}(nil),
- struct{ x int }{},
- (*interface{})(nil),
- (func())(nil),
- nil,
- interface{}(nil),
- map[interface{}]interface{}(nil),
- (chan interface{})(nil),
- (<-chan interface{})(nil),
- (chan<- interface{})(nil),
- }
- nonZeros = []interface{}{
- true,
- byte(1),
- complex64(1),
- complex128(1),
- float32(1),
- float64(1),
- int(1),
- int8(1),
- int16(1),
- int32(1),
- int64(1),
- rune(1),
- uint(1),
- uint8(1),
- uint16(1),
- uint32(1),
- uint64(1),
- uintptr(1),
- "s",
- [1]interface{}{1},
- []interface{}{},
- struct{ x int }{1},
- (*interface{})(&i),
- (func())(func() {}),
- interface{}(1),
- map[interface{}]interface{}{},
- (chan interface{})(make(chan interface{})),
- (<-chan interface{})(make(chan interface{})),
- (chan<- interface{})(make(chan interface{})),
- }
-)
-
-// AssertionTesterInterface defines an interface to be used for testing assertion methods
-type AssertionTesterInterface interface {
- TestMethod()
-}
-
-// AssertionTesterConformingObject is an object that conforms to the AssertionTesterInterface interface
-type AssertionTesterConformingObject struct {
-}
-
-func (a *AssertionTesterConformingObject) TestMethod() {
-}
-
-// AssertionTesterNonConformingObject is an object that does not conform to the AssertionTesterInterface interface
-type AssertionTesterNonConformingObject struct {
-}
-
-func TestObjectsAreEqual(t *testing.T) {
-
- if !ObjectsAreEqual("Hello World", "Hello World") {
- t.Error("objectsAreEqual should return true")
- }
- if !ObjectsAreEqual(123, 123) {
- t.Error("objectsAreEqual should return true")
- }
- if !ObjectsAreEqual(123.5, 123.5) {
- t.Error("objectsAreEqual should return true")
- }
- if !ObjectsAreEqual([]byte("Hello World"), []byte("Hello World")) {
- t.Error("objectsAreEqual should return true")
- }
- if !ObjectsAreEqual(nil, nil) {
- t.Error("objectsAreEqual should return true")
- }
- if ObjectsAreEqual(map[int]int{5: 10}, map[int]int{10: 20}) {
- t.Error("objectsAreEqual should return false")
- }
- if ObjectsAreEqual('x', "x") {
- t.Error("objectsAreEqual should return false")
- }
- if ObjectsAreEqual("x", 'x') {
- t.Error("objectsAreEqual should return false")
- }
- if ObjectsAreEqual(0, 0.1) {
- t.Error("objectsAreEqual should return false")
- }
- if ObjectsAreEqual(0.1, 0) {
- t.Error("objectsAreEqual should return false")
- }
- if ObjectsAreEqual(uint32(10), int32(10)) {
- t.Error("objectsAreEqual should return false")
- }
- if !ObjectsAreEqualValues(uint32(10), int32(10)) {
- t.Error("ObjectsAreEqualValues should return true")
- }
- if ObjectsAreEqualValues(0, nil) {
- t.Fail()
- }
- if ObjectsAreEqualValues(nil, 0) {
- t.Fail()
- }
-
-}
-
-func TestImplements(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !Implements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
- t.Error("Implements method should return true: AssertionTesterConformingObject implements AssertionTesterInterface")
- }
- if Implements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject)) {
- t.Error("Implements method should return false: AssertionTesterNonConformingObject does not implements AssertionTesterInterface")
- }
- if Implements(mockT, (*AssertionTesterInterface)(nil), nil) {
- t.Error("Implements method should return false: nil does not implement AssertionTesterInterface")
- }
-
-}
-
-func TestIsType(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !IsType(mockT, new(AssertionTesterConformingObject), new(AssertionTesterConformingObject)) {
- t.Error("IsType should return true: AssertionTesterConformingObject is the same type as AssertionTesterConformingObject")
- }
- if IsType(mockT, new(AssertionTesterConformingObject), new(AssertionTesterNonConformingObject)) {
- t.Error("IsType should return false: AssertionTesterConformingObject is not the same type as AssertionTesterNonConformingObject")
- }
-
-}
-
-func TestEqual(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !Equal(mockT, "Hello World", "Hello World") {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, 123, 123) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, 123.5, 123.5) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, []byte("Hello World"), []byte("Hello World")) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, nil, nil) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, int32(123), int32(123)) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, uint64(123), uint64(123)) {
- t.Error("Equal should return true")
- }
- if !Equal(mockT, &struct{}{}, &struct{}{}) {
- t.Error("Equal should return true (pointer equality is based on equality of underlying value)")
- }
- var m map[string]interface{}
- if Equal(mockT, m["bar"], "something") {
- t.Error("Equal should return false")
- }
-}
-
-// bufferT implements TestingT. Its implementation of Errorf writes the output that would be produced by
-// testing.T.Errorf to an internal bytes.Buffer.
-type bufferT struct {
- buf bytes.Buffer
-}
-
-func (t *bufferT) Errorf(format string, args ...interface{}) {
- // implementation of decorate is copied from testing.T
- decorate := func(s string) string {
- _, file, line, ok := runtime.Caller(3) // decorate + log + public function.
- if ok {
- // Truncate file name at last file name separator.
- if index := strings.LastIndex(file, "/"); index >= 0 {
- file = file[index+1:]
- } else if index = strings.LastIndex(file, "\\"); index >= 0 {
- file = file[index+1:]
- }
- } else {
- file = "???"
- line = 1
- }
- buf := new(bytes.Buffer)
- // Every line is indented at least one tab.
- buf.WriteByte('\t')
- fmt.Fprintf(buf, "%s:%d: ", file, line)
- lines := strings.Split(s, "\n")
- if l := len(lines); l > 1 && lines[l-1] == "" {
- lines = lines[:l-1]
- }
- for i, line := range lines {
- if i > 0 {
- // Second and subsequent lines are indented an extra tab.
- buf.WriteString("\n\t\t")
- }
- buf.WriteString(line)
- }
- buf.WriteByte('\n')
- return buf.String()
- }
- t.buf.WriteString(decorate(fmt.Sprintf(format, args...)))
-}
-
-func TestEqualFormatting(t *testing.T) {
- for i, currCase := range []struct {
- equalWant string
- equalGot string
- msgAndArgs []interface{}
- want string
- }{
- {equalWant: "want", equalGot: "got", want: "\tassertions.go:[0-9]+: \r \r\tError Trace:\t\n\t\t\r\tError: \tNot equal: \n\t\t\r\t \texpected: \"want\"\n\t\t\r\t \tactual : \"got\"\n"},
- {equalWant: "want", equalGot: "got", msgAndArgs: []interface{}{"hello, %v!", "world"}, want: "\tassertions.go:[0-9]+: \r \r\tError Trace:\t\n\t\t\r\tError: \tNot equal: \n\t\t\r\t \texpected: \"want\"\n\t\t\r\t \tactual : \"got\"\n\t\t\r\tMessages: \thello, world!\n"},
- } {
- mockT := &bufferT{}
- Equal(mockT, currCase.equalWant, currCase.equalGot, currCase.msgAndArgs...)
- Regexp(t, regexp.MustCompile(currCase.want), mockT.buf.String(), "Case %d", i)
- }
-}
-
-func TestFormatUnequalValues(t *testing.T) {
- expected, actual := formatUnequalValues("foo", "bar")
- Equal(t, `"foo"`, expected, "value should not include type")
- Equal(t, `"bar"`, actual, "value should not include type")
-
- expected, actual = formatUnequalValues(123, 123)
- Equal(t, `123`, expected, "value should not include type")
- Equal(t, `123`, actual, "value should not include type")
-
- expected, actual = formatUnequalValues(int64(123), int32(123))
- Equal(t, `int64(123)`, expected, "value should include type")
- Equal(t, `int32(123)`, actual, "value should include type")
-
- expected, actual = formatUnequalValues(int64(123), nil)
- Equal(t, `int64(123)`, expected, "value should include type")
- Equal(t, `<nil>(<nil>)`, actual, "value should include type")
-
- type testStructType struct {
- Val string
- }
-
- expected, actual = formatUnequalValues(&testStructType{Val: "test"}, &testStructType{Val: "test"})
- Equal(t, `&assert.testStructType{Val:"test"}`, expected, "value should not include type annotation")
- Equal(t, `&assert.testStructType{Val:"test"}`, actual, "value should not include type annotation")
-}
-
-func TestNotNil(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !NotNil(mockT, new(AssertionTesterConformingObject)) {
- t.Error("NotNil should return true: object is not nil")
- }
- if NotNil(mockT, nil) {
- t.Error("NotNil should return false: object is nil")
- }
- if NotNil(mockT, (*struct{})(nil)) {
- t.Error("NotNil should return false: object is (*struct{})(nil)")
- }
-
-}
-
-func TestNil(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !Nil(mockT, nil) {
- t.Error("Nil should return true: object is nil")
- }
- if !Nil(mockT, (*struct{})(nil)) {
- t.Error("Nil should return true: object is (*struct{})(nil)")
- }
- if Nil(mockT, new(AssertionTesterConformingObject)) {
- t.Error("Nil should return false: object is not nil")
- }
-
-}
-
-func TestTrue(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !True(mockT, true) {
- t.Error("True should return true")
- }
- if True(mockT, false) {
- t.Error("True should return false")
- }
-
-}
-
-func TestFalse(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !False(mockT, false) {
- t.Error("False should return true")
- }
- if False(mockT, true) {
- t.Error("False should return false")
- }
-
-}
-
-func TestExactly(t *testing.T) {
-
- mockT := new(testing.T)
-
- a := float32(1)
- b := float64(1)
- c := float32(1)
- d := float32(2)
-
- if Exactly(mockT, a, b) {
- t.Error("Exactly should return false")
- }
- if Exactly(mockT, a, d) {
- t.Error("Exactly should return false")
- }
- if !Exactly(mockT, a, c) {
- t.Error("Exactly should return true")
- }
-
- if Exactly(mockT, nil, a) {
- t.Error("Exactly should return false")
- }
- if Exactly(mockT, a, nil) {
- t.Error("Exactly should return false")
- }
-
-}
-
-func TestNotEqual(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !NotEqual(mockT, "Hello World", "Hello World!") {
- t.Error("NotEqual should return true")
- }
- if !NotEqual(mockT, 123, 1234) {
- t.Error("NotEqual should return true")
- }
- if !NotEqual(mockT, 123.5, 123.55) {
- t.Error("NotEqual should return true")
- }
- if !NotEqual(mockT, []byte("Hello World"), []byte("Hello World!")) {
- t.Error("NotEqual should return true")
- }
- if !NotEqual(mockT, nil, new(AssertionTesterConformingObject)) {
- t.Error("NotEqual should return true")
- }
- funcA := func() int { return 23 }
- funcB := func() int { return 42 }
- if NotEqual(mockT, funcA, funcB) {
- t.Error("NotEqual should return false")
- }
-
- if NotEqual(mockT, "Hello World", "Hello World") {
- t.Error("NotEqual should return false")
- }
- if NotEqual(mockT, 123, 123) {
- t.Error("NotEqual should return false")
- }
- if NotEqual(mockT, 123.5, 123.5) {
- t.Error("NotEqual should return false")
- }
- if NotEqual(mockT, []byte("Hello World"), []byte("Hello World")) {
- t.Error("NotEqual should return false")
- }
- if NotEqual(mockT, new(AssertionTesterConformingObject), new(AssertionTesterConformingObject)) {
- t.Error("NotEqual should return false")
- }
- if NotEqual(mockT, &struct{}{}, &struct{}{}) {
- t.Error("NotEqual should return false")
- }
-}
-
-type A struct {
- Name, Value string
-}
-
-func TestContains(t *testing.T) {
-
- mockT := new(testing.T)
- list := []string{"Foo", "Bar"}
- complexList := []*A{
- {"b", "c"},
- {"d", "e"},
- {"g", "h"},
- {"j", "k"},
- }
- simpleMap := map[interface{}]interface{}{"Foo": "Bar"}
-
- if !Contains(mockT, "Hello World", "Hello") {
- t.Error("Contains should return true: \"Hello World\" contains \"Hello\"")
- }
- if Contains(mockT, "Hello World", "Salut") {
- t.Error("Contains should return false: \"Hello World\" does not contain \"Salut\"")
- }
-
- if !Contains(mockT, list, "Bar") {
- t.Error("Contains should return true: \"[\"Foo\", \"Bar\"]\" contains \"Bar\"")
- }
- if Contains(mockT, list, "Salut") {
- t.Error("Contains should return false: \"[\"Foo\", \"Bar\"]\" does not contain \"Salut\"")
- }
- if !Contains(mockT, complexList, &A{"g", "h"}) {
- t.Error("Contains should return true: complexList contains {\"g\", \"h\"}")
- }
- if Contains(mockT, complexList, &A{"g", "e"}) {
- t.Error("Contains should return false: complexList contains {\"g\", \"e\"}")
- }
- if Contains(mockT, complexList, &A{"g", "e"}) {
- t.Error("Contains should return false: complexList contains {\"g\", \"e\"}")
- }
- if !Contains(mockT, simpleMap, "Foo") {
- t.Error("Contains should return true: \"{\"Foo\": \"Bar\"}\" contains \"Foo\"")
- }
- if Contains(mockT, simpleMap, "Bar") {
- t.Error("Contains should return false: \"{\"Foo\": \"Bar\"}\" does not contains \"Bar\"")
- }
-}
-
-func TestNotContains(t *testing.T) {
-
- mockT := new(testing.T)
- list := []string{"Foo", "Bar"}
- simpleMap := map[interface{}]interface{}{"Foo": "Bar"}
-
- if !NotContains(mockT, "Hello World", "Hello!") {
- t.Error("NotContains should return true: \"Hello World\" does not contain \"Hello!\"")
- }
- if NotContains(mockT, "Hello World", "Hello") {
- t.Error("NotContains should return false: \"Hello World\" contains \"Hello\"")
- }
-
- if !NotContains(mockT, list, "Foo!") {
- t.Error("NotContains should return true: \"[\"Foo\", \"Bar\"]\" does not contain \"Foo!\"")
- }
- if NotContains(mockT, list, "Foo") {
- t.Error("NotContains should return false: \"[\"Foo\", \"Bar\"]\" contains \"Foo\"")
- }
- if NotContains(mockT, simpleMap, "Foo") {
- t.Error("Contains should return true: \"{\"Foo\": \"Bar\"}\" contains \"Foo\"")
- }
- if !NotContains(mockT, simpleMap, "Bar") {
- t.Error("Contains should return false: \"{\"Foo\": \"Bar\"}\" does not contains \"Bar\"")
- }
-}
-
-func TestSubset(t *testing.T) {
- mockT := new(testing.T)
-
- if !Subset(mockT, []int{1, 2, 3}, nil) {
- t.Error("Subset should return true: given subset is nil")
- }
- if !Subset(mockT, []int{1, 2, 3}, []int{}) {
- t.Error("Subset should return true: any set contains the nil set")
- }
- if !Subset(mockT, []int{1, 2, 3}, []int{1, 2}) {
- t.Error("Subset should return true: [1, 2, 3] contains [1, 2]")
- }
- if !Subset(mockT, []int{1, 2, 3}, []int{1, 2, 3}) {
- t.Error("Subset should return true: [1, 2, 3] contains [1, 2, 3]")
- }
- if !Subset(mockT, []string{"hello", "world"}, []string{"hello"}) {
- t.Error("Subset should return true: [\"hello\", \"world\"] contains [\"hello\"]")
- }
-
- if Subset(mockT, []string{"hello", "world"}, []string{"hello", "testify"}) {
- t.Error("Subset should return false: [\"hello\", \"world\"] does not contain [\"hello\", \"testify\"]")
- }
- if Subset(mockT, []int{1, 2, 3}, []int{4, 5}) {
- t.Error("Subset should return false: [1, 2, 3] does not contain [4, 5]")
- }
- if Subset(mockT, []int{1, 2, 3}, []int{1, 5}) {
- t.Error("Subset should return false: [1, 2, 3] does not contain [1, 5]")
- }
-}
-
-func TestNotSubset(t *testing.T) {
- mockT := new(testing.T)
-
- if NotSubset(mockT, []int{1, 2, 3}, nil) {
- t.Error("NotSubset should return false: given subset is nil")
- }
- if NotSubset(mockT, []int{1, 2, 3}, []int{}) {
- t.Error("NotSubset should return false: any set contains the nil set")
- }
- if NotSubset(mockT, []int{1, 2, 3}, []int{1, 2}) {
- t.Error("NotSubset should return false: [1, 2, 3] contains [1, 2]")
- }
- if NotSubset(mockT, []int{1, 2, 3}, []int{1, 2, 3}) {
- t.Error("NotSubset should return false: [1, 2, 3] contains [1, 2, 3]")
- }
- if NotSubset(mockT, []string{"hello", "world"}, []string{"hello"}) {
- t.Error("NotSubset should return false: [\"hello\", \"world\"] contains [\"hello\"]")
- }
-
- if !NotSubset(mockT, []string{"hello", "world"}, []string{"hello", "testify"}) {
- t.Error("NotSubset should return true: [\"hello\", \"world\"] does not contain [\"hello\", \"testify\"]")
- }
- if !NotSubset(mockT, []int{1, 2, 3}, []int{4, 5}) {
- t.Error("NotSubset should return true: [1, 2, 3] does not contain [4, 5]")
- }
- if !NotSubset(mockT, []int{1, 2, 3}, []int{1, 5}) {
- t.Error("NotSubset should return true: [1, 2, 3] does not contain [1, 5]")
- }
-}
-
-func TestNotSubsetNil(t *testing.T) {
- mockT := new(testing.T)
- NotSubset(mockT, []string{"foo"}, nil)
- if !mockT.Failed() {
- t.Error("NotSubset on nil set should have failed the test")
- }
-}
-
-func Test_includeElement(t *testing.T) {
-
- list1 := []string{"Foo", "Bar"}
- list2 := []int{1, 2}
- simpleMap := map[interface{}]interface{}{"Foo": "Bar"}
-
- ok, found := includeElement("Hello World", "World")
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(list1, "Foo")
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(list1, "Bar")
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(list2, 1)
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(list2, 2)
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(list1, "Foo!")
- True(t, ok)
- False(t, found)
-
- ok, found = includeElement(list2, 3)
- True(t, ok)
- False(t, found)
-
- ok, found = includeElement(list2, "1")
- True(t, ok)
- False(t, found)
-
- ok, found = includeElement(simpleMap, "Foo")
- True(t, ok)
- True(t, found)
-
- ok, found = includeElement(simpleMap, "Bar")
- True(t, ok)
- False(t, found)
-
- ok, found = includeElement(1433, "1")
- False(t, ok)
- False(t, found)
-}
-
-func TestElementsMatch(t *testing.T) {
- mockT := new(testing.T)
-
- if !ElementsMatch(mockT, nil, nil) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{}, []int{}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{1}, []int{1}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{1, 1}, []int{1, 1}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{1, 2}, []int{1, 2}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{1, 2}, []int{2, 1}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, [2]int{1, 2}, [2]int{2, 1}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []string{"hello", "world"}, []string{"world", "hello"}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []string{"hello", "hello"}, []string{"hello", "hello"}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []string{"hello", "hello", "world"}, []string{"hello", "world", "hello"}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, [3]string{"hello", "hello", "world"}, [3]string{"hello", "world", "hello"}) {
- t.Error("ElementsMatch should return true")
- }
- if !ElementsMatch(mockT, []int{}, nil) {
- t.Error("ElementsMatch should return true")
- }
-
- if ElementsMatch(mockT, []int{1}, []int{1, 1}) {
- t.Error("ElementsMatch should return false")
- }
- if ElementsMatch(mockT, []int{1, 2}, []int{2, 2}) {
- t.Error("ElementsMatch should return false")
- }
- if ElementsMatch(mockT, []string{"hello", "hello"}, []string{"hello"}) {
- t.Error("ElementsMatch should return false")
- }
-}
-
-func TestCondition(t *testing.T) {
- mockT := new(testing.T)
-
- if !Condition(mockT, func() bool { return true }, "Truth") {
- t.Error("Condition should return true")
- }
-
- if Condition(mockT, func() bool { return false }, "Lie") {
- t.Error("Condition should return false")
- }
-
-}
-
-func TestDidPanic(t *testing.T) {
-
- if funcDidPanic, _ := didPanic(func() {
- panic("Panic!")
- }); !funcDidPanic {
- t.Error("didPanic should return true")
- }
-
- if funcDidPanic, _ := didPanic(func() {
- }); funcDidPanic {
- t.Error("didPanic should return false")
- }
-
-}
-
-func TestPanics(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !Panics(mockT, func() {
- panic("Panic!")
- }) {
- t.Error("Panics should return true")
- }
-
- if Panics(mockT, func() {
- }) {
- t.Error("Panics should return false")
- }
-
-}
-
-func TestPanicsWithValue(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !PanicsWithValue(mockT, "Panic!", func() {
- panic("Panic!")
- }) {
- t.Error("PanicsWithValue should return true")
- }
-
- if PanicsWithValue(mockT, "Panic!", func() {
- }) {
- t.Error("PanicsWithValue should return false")
- }
-
- if PanicsWithValue(mockT, "at the disco", func() {
- panic("Panic!")
- }) {
- t.Error("PanicsWithValue should return false")
- }
-}
-
-func TestNotPanics(t *testing.T) {
-
- mockT := new(testing.T)
-
- if !NotPanics(mockT, func() {
- }) {
- t.Error("NotPanics should return true")
- }
-
- if NotPanics(mockT, func() {
- panic("Panic!")
- }) {
- t.Error("NotPanics should return false")
- }
-
-}
-
-func TestNoError(t *testing.T) {
-
- mockT := new(testing.T)
-
- // start with a nil error
- var err error
-
- True(t, NoError(mockT, err), "NoError should return True for nil arg")
-
- // now set an error
- err = errors.New("some error")
-
- False(t, NoError(mockT, err), "NoError with error should return False")
-
- // returning an empty error interface
- err = func() error {
- var err *customError
- if err != nil {
- t.Fatal("err should be nil here")
- }
- return err
- }()
-
- if err == nil { // err is not nil here!
- t.Errorf("Error should be nil due to empty interface: %s", err)
- }
-
- False(t, NoError(mockT, err), "NoError should fail with empty error interface")
-}
-
-type customError struct{}
-
-func (*customError) Error() string { return "fail" }
-
-func TestError(t *testing.T) {
-
- mockT := new(testing.T)
-
- // start with a nil error
- var err error
-
- False(t, Error(mockT, err), "Error should return False for nil arg")
-
- // now set an error
- err = errors.New("some error")
-
- True(t, Error(mockT, err), "Error with error should return True")
-
- // go vet check
- True(t, Errorf(mockT, err, "example with %s", "formatted message"), "Errorf with error should rturn True")
-
- // returning an empty error interface
- err = func() error {
- var err *customError
- if err != nil {
- t.Fatal("err should be nil here")
- }
- return err
- }()
-
- if err == nil { // err is not nil here!
- t.Errorf("Error should be nil due to empty interface: %s", err)
- }
-
- True(t, Error(mockT, err), "Error should pass with empty error interface")
-}
-
-func TestEqualError(t *testing.T) {
- mockT := new(testing.T)
-
- // start with a nil error
- var err error
- False(t, EqualError(mockT, err, ""),
- "EqualError should return false for nil arg")
-
- // now set an error
- err = errors.New("some error")
- False(t, EqualError(mockT, err, "Not some error"),
- "EqualError should return false for different error string")
- True(t, EqualError(mockT, err, "some error"),
- "EqualError should return true")
-}
-
-func Test_isEmpty(t *testing.T) {
-
- chWithValue := make(chan struct{}, 1)
- chWithValue <- struct{}{}
-
- True(t, isEmpty(""))
- True(t, isEmpty(nil))
- True(t, isEmpty([]string{}))
- True(t, isEmpty(0))
- True(t, isEmpty(int32(0)))
- True(t, isEmpty(int64(0)))
- True(t, isEmpty(false))
- True(t, isEmpty(map[string]string{}))
- True(t, isEmpty(new(time.Time)))
- True(t, isEmpty(time.Time{}))
- True(t, isEmpty(make(chan struct{})))
- False(t, isEmpty("something"))
- False(t, isEmpty(errors.New("something")))
- False(t, isEmpty([]string{"something"}))
- False(t, isEmpty(1))
- False(t, isEmpty(true))
- False(t, isEmpty(map[string]string{"Hello": "World"}))
- False(t, isEmpty(chWithValue))
-
-}
-
-func TestEmpty(t *testing.T) {
-
- mockT := new(testing.T)
- chWithValue := make(chan struct{}, 1)
- chWithValue <- struct{}{}
- var tiP *time.Time
- var tiNP time.Time
- var s *string
- var f *os.File
- sP := &s
- x := 1
- xP := &x
-
- type TString string
- type TStruct struct {
- x int
- s []int
- }
-
- True(t, Empty(mockT, ""), "Empty string is empty")
- True(t, Empty(mockT, nil), "Nil is empty")
- True(t, Empty(mockT, []string{}), "Empty string array is empty")
- True(t, Empty(mockT, 0), "Zero int value is empty")
- True(t, Empty(mockT, false), "False value is empty")
- True(t, Empty(mockT, make(chan struct{})), "Channel without values is empty")
- True(t, Empty(mockT, s), "Nil string pointer is empty")
- True(t, Empty(mockT, f), "Nil os.File pointer is empty")
- True(t, Empty(mockT, tiP), "Nil time.Time pointer is empty")
- True(t, Empty(mockT, tiNP), "time.Time is empty")
- True(t, Empty(mockT, TStruct{}), "struct with zero values is empty")
- True(t, Empty(mockT, TString("")), "empty aliased string is empty")
- True(t, Empty(mockT, sP), "ptr to nil value is empty")
-
- False(t, Empty(mockT, "something"), "Non Empty string is not empty")
- False(t, Empty(mockT, errors.New("something")), "Non nil object is not empty")
- False(t, Empty(mockT, []string{"something"}), "Non empty string array is not empty")
- False(t, Empty(mockT, 1), "Non-zero int value is not empty")
- False(t, Empty(mockT, true), "True value is not empty")
- False(t, Empty(mockT, chWithValue), "Channel with values is not empty")
- False(t, Empty(mockT, TStruct{x: 1}), "struct with initialized values is empty")
- False(t, Empty(mockT, TString("abc")), "non-empty aliased string is empty")
- False(t, Empty(mockT, xP), "ptr to non-nil value is not empty")
-}
-
-func TestNotEmpty(t *testing.T) {
-
- mockT := new(testing.T)
- chWithValue := make(chan struct{}, 1)
- chWithValue <- struct{}{}
-
- False(t, NotEmpty(mockT, ""), "Empty string is empty")
- False(t, NotEmpty(mockT, nil), "Nil is empty")
- False(t, NotEmpty(mockT, []string{}), "Empty string array is empty")
- False(t, NotEmpty(mockT, 0), "Zero int value is empty")
- False(t, NotEmpty(mockT, false), "False value is empty")
- False(t, NotEmpty(mockT, make(chan struct{})), "Channel without values is empty")
-
- True(t, NotEmpty(mockT, "something"), "Non Empty string is not empty")
- True(t, NotEmpty(mockT, errors.New("something")), "Non nil object is not empty")
- True(t, NotEmpty(mockT, []string{"something"}), "Non empty string array is not empty")
- True(t, NotEmpty(mockT, 1), "Non-zero int value is not empty")
- True(t, NotEmpty(mockT, true), "True value is not empty")
- True(t, NotEmpty(mockT, chWithValue), "Channel with values is not empty")
-}
-
-func Test_getLen(t *testing.T) {
- falseCases := []interface{}{
- nil,
- 0,
- true,
- false,
- 'A',
- struct{}{},
- }
- for _, v := range falseCases {
- ok, l := getLen(v)
- False(t, ok, "Expected getLen fail to get length of %#v", v)
- Equal(t, 0, l, "getLen should return 0 for %#v", v)
- }
-
- ch := make(chan int, 5)
- ch <- 1
- ch <- 2
- ch <- 3
- trueCases := []struct {
- v interface{}
- l int
- }{
- {[]int{1, 2, 3}, 3},
- {[...]int{1, 2, 3}, 3},
- {"ABC", 3},
- {map[int]int{1: 2, 2: 4, 3: 6}, 3},
- {ch, 3},
-
- {[]int{}, 0},
- {map[int]int{}, 0},
- {make(chan int), 0},
-
- {[]int(nil), 0},
- {map[int]int(nil), 0},
- {(chan int)(nil), 0},
- }
-
- for _, c := range trueCases {
- ok, l := getLen(c.v)
- True(t, ok, "Expected getLen success to get length of %#v", c.v)
- Equal(t, c.l, l)
- }
-}
-
-func TestLen(t *testing.T) {
- mockT := new(testing.T)
-
- False(t, Len(mockT, nil, 0), "nil does not have length")
- False(t, Len(mockT, 0, 0), "int does not have length")
- False(t, Len(mockT, true, 0), "true does not have length")
- False(t, Len(mockT, false, 0), "false does not have length")
- False(t, Len(mockT, 'A', 0), "Rune does not have length")
- False(t, Len(mockT, struct{}{}, 0), "Struct does not have length")
-
- ch := make(chan int, 5)
- ch <- 1
- ch <- 2
- ch <- 3
-
- cases := []struct {
- v interface{}
- l int
- }{
- {[]int{1, 2, 3}, 3},
- {[...]int{1, 2, 3}, 3},
- {"ABC", 3},
- {map[int]int{1: 2, 2: 4, 3: 6}, 3},
- {ch, 3},
-
- {[]int{}, 0},
- {map[int]int{}, 0},
- {make(chan int), 0},
-
- {[]int(nil), 0},
- {map[int]int(nil), 0},
- {(chan int)(nil), 0},
- }
-
- for _, c := range cases {
- True(t, Len(mockT, c.v, c.l), "%#v have %d items", c.v, c.l)
- }
-
- cases = []struct {
- v interface{}
- l int
- }{
- {[]int{1, 2, 3}, 4},
- {[...]int{1, 2, 3}, 2},
- {"ABC", 2},
- {map[int]int{1: 2, 2: 4, 3: 6}, 4},
- {ch, 2},
-
- {[]int{}, 1},
- {map[int]int{}, 1},
- {make(chan int), 1},
-
- {[]int(nil), 1},
- {map[int]int(nil), 1},
- {(chan int)(nil), 1},
- }
-
- for _, c := range cases {
- False(t, Len(mockT, c.v, c.l), "%#v have %d items", c.v, c.l)
- }
-}
-
-func TestWithinDuration(t *testing.T) {
-
- mockT := new(testing.T)
- a := time.Now()
- b := a.Add(10 * time.Second)
-
- True(t, WithinDuration(mockT, a, b, 10*time.Second), "A 10s difference is within a 10s time difference")
- True(t, WithinDuration(mockT, b, a, 10*time.Second), "A 10s difference is within a 10s time difference")
-
- False(t, WithinDuration(mockT, a, b, 9*time.Second), "A 10s difference is not within a 9s time difference")
- False(t, WithinDuration(mockT, b, a, 9*time.Second), "A 10s difference is not within a 9s time difference")
-
- False(t, WithinDuration(mockT, a, b, -9*time.Second), "A 10s difference is not within a 9s time difference")
- False(t, WithinDuration(mockT, b, a, -9*time.Second), "A 10s difference is not within a 9s time difference")
-
- False(t, WithinDuration(mockT, a, b, -11*time.Second), "A 10s difference is not within a 9s time difference")
- False(t, WithinDuration(mockT, b, a, -11*time.Second), "A 10s difference is not within a 9s time difference")
-}
-
-func TestInDelta(t *testing.T) {
- mockT := new(testing.T)
-
- True(t, InDelta(mockT, 1.001, 1, 0.01), "|1.001 - 1| <= 0.01")
- True(t, InDelta(mockT, 1, 1.001, 0.01), "|1 - 1.001| <= 0.01")
- True(t, InDelta(mockT, 1, 2, 1), "|1 - 2| <= 1")
- False(t, InDelta(mockT, 1, 2, 0.5), "Expected |1 - 2| <= 0.5 to fail")
- False(t, InDelta(mockT, 2, 1, 0.5), "Expected |2 - 1| <= 0.5 to fail")
- False(t, InDelta(mockT, "", nil, 1), "Expected non numerals to fail")
- False(t, InDelta(mockT, 42, math.NaN(), 0.01), "Expected NaN for actual to fail")
- False(t, InDelta(mockT, math.NaN(), 42, 0.01), "Expected NaN for expected to fail")
-
- cases := []struct {
- a, b interface{}
- delta float64
- }{
- {uint8(2), uint8(1), 1},
- {uint16(2), uint16(1), 1},
- {uint32(2), uint32(1), 1},
- {uint64(2), uint64(1), 1},
-
- {int(2), int(1), 1},
- {int8(2), int8(1), 1},
- {int16(2), int16(1), 1},
- {int32(2), int32(1), 1},
- {int64(2), int64(1), 1},
-
- {float32(2), float32(1), 1},
- {float64(2), float64(1), 1},
- }
-
- for _, tc := range cases {
- True(t, InDelta(mockT, tc.a, tc.b, tc.delta), "Expected |%V - %V| <= %v", tc.a, tc.b, tc.delta)
- }
-}
-
-func TestInDeltaSlice(t *testing.T) {
- mockT := new(testing.T)
-
- True(t, InDeltaSlice(mockT,
- []float64{1.001, 0.999},
- []float64{1, 1},
- 0.1), "{1.001, 0.009} is element-wise close to {1, 1} in delta=0.1")
-
- True(t, InDeltaSlice(mockT,
- []float64{1, 2},
- []float64{0, 3},
- 1), "{1, 2} is element-wise close to {0, 3} in delta=1")
-
- False(t, InDeltaSlice(mockT,
- []float64{1, 2},
- []float64{0, 3},
- 0.1), "{1, 2} is not element-wise close to {0, 3} in delta=0.1")
-
- False(t, InDeltaSlice(mockT, "", nil, 1), "Expected non numeral slices to fail")
-}
-
-func TestInDeltaMapValues(t *testing.T) {
- mockT := new(testing.T)
-
- for _, tc := range []struct {
- title string
- expect interface{}
- actual interface{}
- f func(TestingT, bool, ...interface{}) bool
- delta float64
- }{
- {
- title: "Within delta",
- expect: map[string]float64{
- "foo": 1.0,
- "bar": 2.0,
- },
- actual: map[string]float64{
- "foo": 1.01,
- "bar": 1.99,
- },
- delta: 0.1,
- f: True,
- },
- {
- title: "Within delta",
- expect: map[int]float64{
- 1: 1.0,
- 2: 2.0,
- },
- actual: map[int]float64{
- 1: 1.0,
- 2: 1.99,
- },
- delta: 0.1,
- f: True,
- },
- {
- title: "Different number of keys",
- expect: map[int]float64{
- 1: 1.0,
- 2: 2.0,
- },
- actual: map[int]float64{
- 1: 1.0,
- },
- delta: 0.1,
- f: False,
- },
- {
- title: "Within delta with zero value",
- expect: map[string]float64{
- "zero": 0.0,
- },
- actual: map[string]float64{
- "zero": 0.0,
- },
- delta: 0.1,
- f: True,
- },
- {
- title: "With missing key with zero value",
- expect: map[string]float64{
- "zero": 0.0,
- "foo": 0.0,
- },
- actual: map[string]float64{
- "zero": 0.0,
- "bar": 0.0,
- },
- f: False,
- },
- } {
- tc.f(t, InDeltaMapValues(mockT, tc.expect, tc.actual, tc.delta), tc.title+"\n"+diff(tc.expect, tc.actual))
- }
-}
-
-func TestInEpsilon(t *testing.T) {
- mockT := new(testing.T)
-
- cases := []struct {
- a, b interface{}
- epsilon float64
- }{
- {uint8(2), uint16(2), .001},
- {2.1, 2.2, 0.1},
- {2.2, 2.1, 0.1},
- {-2.1, -2.2, 0.1},
- {-2.2, -2.1, 0.1},
- {uint64(100), uint8(101), 0.01},
- {0.1, -0.1, 2},
- {0.1, 0, 2},
- {time.Second, time.Second + time.Millisecond, 0.002},
- }
-
- for _, tc := range cases {
- True(t, InEpsilon(t, tc.a, tc.b, tc.epsilon, "Expected %V and %V to have a relative difference of %v", tc.a, tc.b, tc.epsilon), "test: %q", tc)
- }
-
- cases = []struct {
- a, b interface{}
- epsilon float64
- }{
- {uint8(2), int16(-2), .001},
- {uint64(100), uint8(102), 0.01},
- {2.1, 2.2, 0.001},
- {2.2, 2.1, 0.001},
- {2.1, -2.2, 1},
- {2.1, "bla-bla", 0},
- {0.1, -0.1, 1.99},
- {0, 0.1, 2}, // expected must be different to zero
- {time.Second, time.Second + 10*time.Millisecond, 0.002},
- }
-
- for _, tc := range cases {
- False(t, InEpsilon(mockT, tc.a, tc.b, tc.epsilon, "Expected %V and %V to have a relative difference of %v", tc.a, tc.b, tc.epsilon))
- }
-
-}
-
-func TestInEpsilonSlice(t *testing.T) {
- mockT := new(testing.T)
-
- True(t, InEpsilonSlice(mockT,
- []float64{2.2, 2.0},
- []float64{2.1, 2.1},
- 0.06), "{2.2, 2.0} is element-wise close to {2.1, 2.1} in espilon=0.06")
-
- False(t, InEpsilonSlice(mockT,
- []float64{2.2, 2.0},
- []float64{2.1, 2.1},
- 0.04), "{2.2, 2.0} is not element-wise close to {2.1, 2.1} in espilon=0.04")
-
- False(t, InEpsilonSlice(mockT, "", nil, 1), "Expected non numeral slices to fail")
-}
-
-func TestRegexp(t *testing.T) {
- mockT := new(testing.T)
-
- cases := []struct {
- rx, str string
- }{
- {"^start", "start of the line"},
- {"end$", "in the end"},
- {"[0-9]{3}[.-]?[0-9]{2}[.-]?[0-9]{2}", "My phone number is 650.12.34"},
- }
-
- for _, tc := range cases {
- True(t, Regexp(mockT, tc.rx, tc.str))
- True(t, Regexp(mockT, regexp.MustCompile(tc.rx), tc.str))
- False(t, NotRegexp(mockT, tc.rx, tc.str))
- False(t, NotRegexp(mockT, regexp.MustCompile(tc.rx), tc.str))
- }
-
- cases = []struct {
- rx, str string
- }{
- {"^asdfastart", "Not the start of the line"},
- {"end$", "in the end."},
- {"[0-9]{3}[.-]?[0-9]{2}[.-]?[0-9]{2}", "My phone number is 650.12a.34"},
- }
-
- for _, tc := range cases {
- False(t, Regexp(mockT, tc.rx, tc.str), "Expected \"%s\" to not match \"%s\"", tc.rx, tc.str)
- False(t, Regexp(mockT, regexp.MustCompile(tc.rx), tc.str))
- True(t, NotRegexp(mockT, tc.rx, tc.str))
- True(t, NotRegexp(mockT, regexp.MustCompile(tc.rx), tc.str))
- }
-}
-
-func testAutogeneratedFunction() {
- defer func() {
- if err := recover(); err == nil {
- panic("did not panic")
- }
- CallerInfo()
- }()
- t := struct {
- io.Closer
- }{}
- var c io.Closer
- c = t
- c.Close()
-}
-
-func TestCallerInfoWithAutogeneratedFunctions(t *testing.T) {
- NotPanics(t, func() {
- testAutogeneratedFunction()
- })
-}
-
-func TestZero(t *testing.T) {
- mockT := new(testing.T)
-
- for _, test := range zeros {
- True(t, Zero(mockT, test, "%#v is not the %v zero value", test, reflect.TypeOf(test)))
- }
-
- for _, test := range nonZeros {
- False(t, Zero(mockT, test, "%#v is not the %v zero value", test, reflect.TypeOf(test)))
- }
-}
-
-func TestNotZero(t *testing.T) {
- mockT := new(testing.T)
-
- for _, test := range zeros {
- False(t, NotZero(mockT, test, "%#v is not the %v zero value", test, reflect.TypeOf(test)))
- }
-
- for _, test := range nonZeros {
- True(t, NotZero(mockT, test, "%#v is not the %v zero value", test, reflect.TypeOf(test)))
- }
-}
-
-func TestFileExists(t *testing.T) {
- mockT := new(testing.T)
- True(t, FileExists(mockT, "assertions.go"))
-
- mockT = new(testing.T)
- False(t, FileExists(mockT, "random_file"))
-
- mockT = new(testing.T)
- False(t, FileExists(mockT, "../_codegen"))
-}
-
-func TestDirExists(t *testing.T) {
- mockT := new(testing.T)
- False(t, DirExists(mockT, "assertions.go"))
-
- mockT = new(testing.T)
- False(t, DirExists(mockT, "random_dir"))
-
- mockT = new(testing.T)
- True(t, DirExists(mockT, "../_codegen"))
-}
-
-func TestJSONEq_EqualSONString(t *testing.T) {
- mockT := new(testing.T)
- True(t, JSONEq(mockT, `{"hello": "world", "foo": "bar"}`, `{"hello": "world", "foo": "bar"}`))
-}
-
-func TestJSONEq_EquivalentButNotEqual(t *testing.T) {
- mockT := new(testing.T)
- True(t, JSONEq(mockT, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`))
-}
-
-func TestJSONEq_HashOfArraysAndHashes(t *testing.T) {
- mockT := new(testing.T)
- True(t, JSONEq(mockT, "{\r\n\t\"numeric\": 1.5,\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]],\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\"\r\n}",
- "{\r\n\t\"numeric\": 1.5,\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\",\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]]\r\n}"))
-}
-
-func TestJSONEq_Array(t *testing.T) {
- mockT := new(testing.T)
- True(t, JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `["foo", {"nested": "hash", "hello": "world"}]`))
-}
-
-func TestJSONEq_HashAndArrayNotEquivalent(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `{"foo": "bar", {"nested": "hash", "hello": "world"}}`))
-}
-
-func TestJSONEq_HashesNotEquivalent(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, `{"foo": "bar"}`, `{"foo": "bar", "hello": "world"}`))
-}
-
-func TestJSONEq_ActualIsNotJSON(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, `{"foo": "bar"}`, "Not JSON"))
-}
-
-func TestJSONEq_ExpectedIsNotJSON(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, "Not JSON", `{"foo": "bar", "hello": "world"}`))
-}
-
-func TestJSONEq_ExpectedAndActualNotJSON(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, "Not JSON", "Not JSON"))
-}
-
-func TestJSONEq_ArraysOfDifferentOrder(t *testing.T) {
- mockT := new(testing.T)
- False(t, JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `[{ "hello": "world", "nested": "hash"}, "foo"]`))
-}
-
-func TestDiff(t *testing.T) {
- expected := `
-
-Diff:
---- Expected
-+++ Actual
-@@ -1,3 +1,3 @@
- (struct { foo string }) {
-- foo: (string) (len=5) "hello"
-+ foo: (string) (len=3) "bar"
- }
-`
- actual := diff(
- struct{ foo string }{"hello"},
- struct{ foo string }{"bar"},
- )
- Equal(t, expected, actual)
-
- expected = `
-
-Diff:
---- Expected
-+++ Actual
-@@ -2,5 +2,5 @@
- (int) 1,
-- (int) 2,
- (int) 3,
-- (int) 4
-+ (int) 5,
-+ (int) 7
- }
-`
- actual = diff(
- []int{1, 2, 3, 4},
- []int{1, 3, 5, 7},
- )
- Equal(t, expected, actual)
-
- expected = `
-
-Diff:
---- Expected
-+++ Actual
-@@ -2,4 +2,4 @@
- (int) 1,
-- (int) 2,
-- (int) 3
-+ (int) 3,
-+ (int) 5
- }
-`
- actual = diff(
- []int{1, 2, 3, 4}[0:3],
- []int{1, 3, 5, 7}[0:3],
- )
- Equal(t, expected, actual)
-
- expected = `
-
-Diff:
---- Expected
-+++ Actual
-@@ -1,6 +1,6 @@
- (map[string]int) (len=4) {
-- (string) (len=4) "four": (int) 4,
-+ (string) (len=4) "five": (int) 5,
- (string) (len=3) "one": (int) 1,
-- (string) (len=5) "three": (int) 3,
-- (string) (len=3) "two": (int) 2
-+ (string) (len=5) "seven": (int) 7,
-+ (string) (len=5) "three": (int) 3
- }
-`
-
- actual = diff(
- map[string]int{"one": 1, "two": 2, "three": 3, "four": 4},
- map[string]int{"one": 1, "three": 3, "five": 5, "seven": 7},
- )
- Equal(t, expected, actual)
-}
-
-func TestDiffEmptyCases(t *testing.T) {
- Equal(t, "", diff(nil, nil))
- Equal(t, "", diff(struct{ foo string }{}, nil))
- Equal(t, "", diff(nil, struct{ foo string }{}))
- Equal(t, "", diff(1, 2))
- Equal(t, "", diff(1, 2))
- Equal(t, "", diff([]int{1}, []bool{true}))
-}
-
-// Ensure there are no data races
-func TestDiffRace(t *testing.T) {
- t.Parallel()
-
- expected := map[string]string{
- "a": "A",
- "b": "B",
- "c": "C",
- }
-
- actual := map[string]string{
- "d": "D",
- "e": "E",
- "f": "F",
- }
-
- // run diffs in parallel simulating tests with t.Parallel()
- numRoutines := 10
- rChans := make([]chan string, numRoutines)
- for idx := range rChans {
- rChans[idx] = make(chan string)
- go func(ch chan string) {
- defer close(ch)
- ch <- diff(expected, actual)
- }(rChans[idx])
- }
-
- for _, ch := range rChans {
- for msg := range ch {
- NotZero(t, msg) // dummy assert
- }
- }
-}
-
-type mockTestingT struct {
-}
-
-func (m *mockTestingT) Errorf(format string, args ...interface{}) {}
-
-func TestFailNowWithPlainTestingT(t *testing.T) {
- mockT := &mockTestingT{}
-
- Panics(t, func() {
- FailNow(mockT, "failed")
- }, "should panic since mockT is missing FailNow()")
-}
-
-type mockFailNowTestingT struct {
-}
-
-func (m *mockFailNowTestingT) Errorf(format string, args ...interface{}) {}
-
-func (m *mockFailNowTestingT) FailNow() {}
-
-func TestFailNowWithFullTestingT(t *testing.T) {
- mockT := &mockFailNowTestingT{}
-
- NotPanics(t, func() {
- FailNow(mockT, "failed")
- }, "should call mockT.FailNow() rather than panicking")
-}
-
-func TestBytesEqual(t *testing.T) {
- var cases = []struct {
- a, b []byte
- }{
- {make([]byte, 2), make([]byte, 2)},
- {make([]byte, 2), make([]byte, 2, 3)},
- {nil, make([]byte, 0)},
- }
- for i, c := range cases {
- Equal(t, reflect.DeepEqual(c.a, c.b), ObjectsAreEqual(c.a, c.b), "case %d failed", i+1)
- }
-}
-
-func BenchmarkBytesEqual(b *testing.B) {
- const size = 1024 * 8
- s := make([]byte, size)
- for i := range s {
- s[i] = byte(i % 255)
- }
- s2 := make([]byte, size)
- copy(s2, s)
-
- mockT := &mockFailNowTestingT{}
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- Equal(mockT, s, s2)
- }
-}
-
-func TestEqualArgsValidation(t *testing.T) {
- err := validateEqualArgs(time.Now, time.Now)
- EqualError(t, err, "cannot take func type as argument")
-}
diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions_test.go b/vendor/github.com/stretchr/testify/assert/forward_assertions_test.go
deleted file mode 100644
index 22e1df1d9..000000000
--- a/vendor/github.com/stretchr/testify/assert/forward_assertions_test.go
+++ /dev/null
@@ -1,611 +0,0 @@
-package assert
-
-import (
- "errors"
- "regexp"
- "testing"
- "time"
-)
-
-func TestImplementsWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
- t.Error("Implements method should return true: AssertionTesterConformingObject implements AssertionTesterInterface")
- }
- if assert.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject)) {
- t.Error("Implements method should return false: AssertionTesterNonConformingObject does not implements AssertionTesterInterface")
- }
-}
-
-func TestIsTypeWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.IsType(new(AssertionTesterConformingObject), new(AssertionTesterConformingObject)) {
- t.Error("IsType should return true: AssertionTesterConformingObject is the same type as AssertionTesterConformingObject")
- }
- if assert.IsType(new(AssertionTesterConformingObject), new(AssertionTesterNonConformingObject)) {
- t.Error("IsType should return false: AssertionTesterConformingObject is not the same type as AssertionTesterNonConformingObject")
- }
-
-}
-
-func TestEqualWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.Equal("Hello World", "Hello World") {
- t.Error("Equal should return true")
- }
- if !assert.Equal(123, 123) {
- t.Error("Equal should return true")
- }
- if !assert.Equal(123.5, 123.5) {
- t.Error("Equal should return true")
- }
- if !assert.Equal([]byte("Hello World"), []byte("Hello World")) {
- t.Error("Equal should return true")
- }
- if !assert.Equal(nil, nil) {
- t.Error("Equal should return true")
- }
-}
-
-func TestEqualValuesWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.EqualValues(uint32(10), int32(10)) {
- t.Error("EqualValues should return true")
- }
-}
-
-func TestNotNilWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.NotNil(new(AssertionTesterConformingObject)) {
- t.Error("NotNil should return true: object is not nil")
- }
- if assert.NotNil(nil) {
- t.Error("NotNil should return false: object is nil")
- }
-
-}
-
-func TestNilWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.Nil(nil) {
- t.Error("Nil should return true: object is nil")
- }
- if assert.Nil(new(AssertionTesterConformingObject)) {
- t.Error("Nil should return false: object is not nil")
- }
-
-}
-
-func TestTrueWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.True(true) {
- t.Error("True should return true")
- }
- if assert.True(false) {
- t.Error("True should return false")
- }
-
-}
-
-func TestFalseWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- if !assert.False(false) {
- t.Error("False should return true")
- }
- if assert.False(true) {
- t.Error("False should return false")
- }
-
-}
-
-func TestExactlyWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- a := float32(1)
- b := float64(1)
- c := float32(1)
- d := float32(2)
-
- if assert.Exactly(a, b) {
- t.Error("Exactly should return false")
- }
- if assert.Exactly(a, d) {
- t.Error("Exactly should return false")
- }
- if !assert.Exactly(a, c) {
- t.Error("Exactly should return true")
- }
-
- if assert.Exactly(nil, a) {
- t.Error("Exactly should return false")
- }
- if assert.Exactly(a, nil) {
- t.Error("Exactly should return false")
- }
-
-}
-
-func TestNotEqualWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
-
- if !assert.NotEqual("Hello World", "Hello World!") {
- t.Error("NotEqual should return true")
- }
- if !assert.NotEqual(123, 1234) {
- t.Error("NotEqual should return true")
- }
- if !assert.NotEqual(123.5, 123.55) {
- t.Error("NotEqual should return true")
- }
- if !assert.NotEqual([]byte("Hello World"), []byte("Hello World!")) {
- t.Error("NotEqual should return true")
- }
- if !assert.NotEqual(nil, new(AssertionTesterConformingObject)) {
- t.Error("NotEqual should return true")
- }
-}
-
-func TestContainsWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
- list := []string{"Foo", "Bar"}
-
- if !assert.Contains("Hello World", "Hello") {
- t.Error("Contains should return true: \"Hello World\" contains \"Hello\"")
- }
- if assert.Contains("Hello World", "Salut") {
- t.Error("Contains should return false: \"Hello World\" does not contain \"Salut\"")
- }
-
- if !assert.Contains(list, "Foo") {
- t.Error("Contains should return true: \"[\"Foo\", \"Bar\"]\" contains \"Foo\"")
- }
- if assert.Contains(list, "Salut") {
- t.Error("Contains should return false: \"[\"Foo\", \"Bar\"]\" does not contain \"Salut\"")
- }
-
-}
-
-func TestNotContainsWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
- list := []string{"Foo", "Bar"}
-
- if !assert.NotContains("Hello World", "Hello!") {
- t.Error("NotContains should return true: \"Hello World\" does not contain \"Hello!\"")
- }
- if assert.NotContains("Hello World", "Hello") {
- t.Error("NotContains should return false: \"Hello World\" contains \"Hello\"")
- }
-
- if !assert.NotContains(list, "Foo!") {
- t.Error("NotContains should return true: \"[\"Foo\", \"Bar\"]\" does not contain \"Foo!\"")
- }
- if assert.NotContains(list, "Foo") {
- t.Error("NotContains should return false: \"[\"Foo\", \"Bar\"]\" contains \"Foo\"")
- }
-
-}
-
-func TestConditionWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
-
- if !assert.Condition(func() bool { return true }, "Truth") {
- t.Error("Condition should return true")
- }
-
- if assert.Condition(func() bool { return false }, "Lie") {
- t.Error("Condition should return false")
- }
-
-}
-
-func TestDidPanicWrapper(t *testing.T) {
-
- if funcDidPanic, _ := didPanic(func() {
- panic("Panic!")
- }); !funcDidPanic {
- t.Error("didPanic should return true")
- }
-
- if funcDidPanic, _ := didPanic(func() {
- }); funcDidPanic {
- t.Error("didPanic should return false")
- }
-
-}
-
-func TestPanicsWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
-
- if !assert.Panics(func() {
- panic("Panic!")
- }) {
- t.Error("Panics should return true")
- }
-
- if assert.Panics(func() {
- }) {
- t.Error("Panics should return false")
- }
-
-}
-
-func TestNotPanicsWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
-
- if !assert.NotPanics(func() {
- }) {
- t.Error("NotPanics should return true")
- }
-
- if assert.NotPanics(func() {
- panic("Panic!")
- }) {
- t.Error("NotPanics should return false")
- }
-
-}
-
-func TestNoErrorWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- // start with a nil error
- var err error
-
- assert.True(mockAssert.NoError(err), "NoError should return True for nil arg")
-
- // now set an error
- err = errors.New("Some error")
-
- assert.False(mockAssert.NoError(err), "NoError with error should return False")
-
-}
-
-func TestErrorWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- // start with a nil error
- var err error
-
- assert.False(mockAssert.Error(err), "Error should return False for nil arg")
-
- // now set an error
- err = errors.New("Some error")
-
- assert.True(mockAssert.Error(err), "Error with error should return True")
-
-}
-
-func TestEqualErrorWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- // start with a nil error
- var err error
- assert.False(mockAssert.EqualError(err, ""),
- "EqualError should return false for nil arg")
-
- // now set an error
- err = errors.New("some error")
- assert.False(mockAssert.EqualError(err, "Not some error"),
- "EqualError should return false for different error string")
- assert.True(mockAssert.EqualError(err, "some error"),
- "EqualError should return true")
-}
-
-func TestEmptyWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- assert.True(mockAssert.Empty(""), "Empty string is empty")
- assert.True(mockAssert.Empty(nil), "Nil is empty")
- assert.True(mockAssert.Empty([]string{}), "Empty string array is empty")
- assert.True(mockAssert.Empty(0), "Zero int value is empty")
- assert.True(mockAssert.Empty(false), "False value is empty")
-
- assert.False(mockAssert.Empty("something"), "Non Empty string is not empty")
- assert.False(mockAssert.Empty(errors.New("something")), "Non nil object is not empty")
- assert.False(mockAssert.Empty([]string{"something"}), "Non empty string array is not empty")
- assert.False(mockAssert.Empty(1), "Non-zero int value is not empty")
- assert.False(mockAssert.Empty(true), "True value is not empty")
-
-}
-
-func TestNotEmptyWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- assert.False(mockAssert.NotEmpty(""), "Empty string is empty")
- assert.False(mockAssert.NotEmpty(nil), "Nil is empty")
- assert.False(mockAssert.NotEmpty([]string{}), "Empty string array is empty")
- assert.False(mockAssert.NotEmpty(0), "Zero int value is empty")
- assert.False(mockAssert.NotEmpty(false), "False value is empty")
-
- assert.True(mockAssert.NotEmpty("something"), "Non Empty string is not empty")
- assert.True(mockAssert.NotEmpty(errors.New("something")), "Non nil object is not empty")
- assert.True(mockAssert.NotEmpty([]string{"something"}), "Non empty string array is not empty")
- assert.True(mockAssert.NotEmpty(1), "Non-zero int value is not empty")
- assert.True(mockAssert.NotEmpty(true), "True value is not empty")
-
-}
-
-func TestLenWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- assert.False(mockAssert.Len(nil, 0), "nil does not have length")
- assert.False(mockAssert.Len(0, 0), "int does not have length")
- assert.False(mockAssert.Len(true, 0), "true does not have length")
- assert.False(mockAssert.Len(false, 0), "false does not have length")
- assert.False(mockAssert.Len('A', 0), "Rune does not have length")
- assert.False(mockAssert.Len(struct{}{}, 0), "Struct does not have length")
-
- ch := make(chan int, 5)
- ch <- 1
- ch <- 2
- ch <- 3
-
- cases := []struct {
- v interface{}
- l int
- }{
- {[]int{1, 2, 3}, 3},
- {[...]int{1, 2, 3}, 3},
- {"ABC", 3},
- {map[int]int{1: 2, 2: 4, 3: 6}, 3},
- {ch, 3},
-
- {[]int{}, 0},
- {map[int]int{}, 0},
- {make(chan int), 0},
-
- {[]int(nil), 0},
- {map[int]int(nil), 0},
- {(chan int)(nil), 0},
- }
-
- for _, c := range cases {
- assert.True(mockAssert.Len(c.v, c.l), "%#v have %d items", c.v, c.l)
- }
-}
-
-func TestWithinDurationWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
- a := time.Now()
- b := a.Add(10 * time.Second)
-
- assert.True(mockAssert.WithinDuration(a, b, 10*time.Second), "A 10s difference is within a 10s time difference")
- assert.True(mockAssert.WithinDuration(b, a, 10*time.Second), "A 10s difference is within a 10s time difference")
-
- assert.False(mockAssert.WithinDuration(a, b, 9*time.Second), "A 10s difference is not within a 9s time difference")
- assert.False(mockAssert.WithinDuration(b, a, 9*time.Second), "A 10s difference is not within a 9s time difference")
-
- assert.False(mockAssert.WithinDuration(a, b, -9*time.Second), "A 10s difference is not within a 9s time difference")
- assert.False(mockAssert.WithinDuration(b, a, -9*time.Second), "A 10s difference is not within a 9s time difference")
-
- assert.False(mockAssert.WithinDuration(a, b, -11*time.Second), "A 10s difference is not within a 9s time difference")
- assert.False(mockAssert.WithinDuration(b, a, -11*time.Second), "A 10s difference is not within a 9s time difference")
-}
-
-func TestInDeltaWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- True(t, assert.InDelta(1.001, 1, 0.01), "|1.001 - 1| <= 0.01")
- True(t, assert.InDelta(1, 1.001, 0.01), "|1 - 1.001| <= 0.01")
- True(t, assert.InDelta(1, 2, 1), "|1 - 2| <= 1")
- False(t, assert.InDelta(1, 2, 0.5), "Expected |1 - 2| <= 0.5 to fail")
- False(t, assert.InDelta(2, 1, 0.5), "Expected |2 - 1| <= 0.5 to fail")
- False(t, assert.InDelta("", nil, 1), "Expected non numerals to fail")
-
- cases := []struct {
- a, b interface{}
- delta float64
- }{
- {uint8(2), uint8(1), 1},
- {uint16(2), uint16(1), 1},
- {uint32(2), uint32(1), 1},
- {uint64(2), uint64(1), 1},
-
- {int(2), int(1), 1},
- {int8(2), int8(1), 1},
- {int16(2), int16(1), 1},
- {int32(2), int32(1), 1},
- {int64(2), int64(1), 1},
-
- {float32(2), float32(1), 1},
- {float64(2), float64(1), 1},
- }
-
- for _, tc := range cases {
- True(t, assert.InDelta(tc.a, tc.b, tc.delta), "Expected |%V - %V| <= %v", tc.a, tc.b, tc.delta)
- }
-}
-
-func TestInEpsilonWrapper(t *testing.T) {
- assert := New(new(testing.T))
-
- cases := []struct {
- a, b interface{}
- epsilon float64
- }{
- {uint8(2), uint16(2), .001},
- {2.1, 2.2, 0.1},
- {2.2, 2.1, 0.1},
- {-2.1, -2.2, 0.1},
- {-2.2, -2.1, 0.1},
- {uint64(100), uint8(101), 0.01},
- {0.1, -0.1, 2},
- }
-
- for _, tc := range cases {
- True(t, assert.InEpsilon(tc.a, tc.b, tc.epsilon, "Expected %V and %V to have a relative difference of %v", tc.a, tc.b, tc.epsilon))
- }
-
- cases = []struct {
- a, b interface{}
- epsilon float64
- }{
- {uint8(2), int16(-2), .001},
- {uint64(100), uint8(102), 0.01},
- {2.1, 2.2, 0.001},
- {2.2, 2.1, 0.001},
- {2.1, -2.2, 1},
- {2.1, "bla-bla", 0},
- {0.1, -0.1, 1.99},
- }
-
- for _, tc := range cases {
- False(t, assert.InEpsilon(tc.a, tc.b, tc.epsilon, "Expected %V and %V to have a relative difference of %v", tc.a, tc.b, tc.epsilon))
- }
-}
-
-func TestRegexpWrapper(t *testing.T) {
-
- assert := New(new(testing.T))
-
- cases := []struct {
- rx, str string
- }{
- {"^start", "start of the line"},
- {"end$", "in the end"},
- {"[0-9]{3}[.-]?[0-9]{2}[.-]?[0-9]{2}", "My phone number is 650.12.34"},
- }
-
- for _, tc := range cases {
- True(t, assert.Regexp(tc.rx, tc.str))
- True(t, assert.Regexp(regexp.MustCompile(tc.rx), tc.str))
- False(t, assert.NotRegexp(tc.rx, tc.str))
- False(t, assert.NotRegexp(regexp.MustCompile(tc.rx), tc.str))
- }
-
- cases = []struct {
- rx, str string
- }{
- {"^asdfastart", "Not the start of the line"},
- {"end$", "in the end."},
- {"[0-9]{3}[.-]?[0-9]{2}[.-]?[0-9]{2}", "My phone number is 650.12a.34"},
- }
-
- for _, tc := range cases {
- False(t, assert.Regexp(tc.rx, tc.str), "Expected \"%s\" to not match \"%s\"", tc.rx, tc.str)
- False(t, assert.Regexp(regexp.MustCompile(tc.rx), tc.str))
- True(t, assert.NotRegexp(tc.rx, tc.str))
- True(t, assert.NotRegexp(regexp.MustCompile(tc.rx), tc.str))
- }
-}
-
-func TestZeroWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- for _, test := range zeros {
- assert.True(mockAssert.Zero(test), "Zero should return true for %v", test)
- }
-
- for _, test := range nonZeros {
- assert.False(mockAssert.Zero(test), "Zero should return false for %v", test)
- }
-}
-
-func TestNotZeroWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- for _, test := range zeros {
- assert.False(mockAssert.NotZero(test), "Zero should return true for %v", test)
- }
-
- for _, test := range nonZeros {
- assert.True(mockAssert.NotZero(test), "Zero should return false for %v", test)
- }
-}
-
-func TestJSONEqWrapper_EqualSONString(t *testing.T) {
- assert := New(new(testing.T))
- if !assert.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"hello": "world", "foo": "bar"}`) {
- t.Error("JSONEq should return true")
- }
-
-}
-
-func TestJSONEqWrapper_EquivalentButNotEqual(t *testing.T) {
- assert := New(new(testing.T))
- if !assert.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) {
- t.Error("JSONEq should return true")
- }
-
-}
-
-func TestJSONEqWrapper_HashOfArraysAndHashes(t *testing.T) {
- assert := New(new(testing.T))
- if !assert.JSONEq("{\r\n\t\"numeric\": 1.5,\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]],\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\"\r\n}",
- "{\r\n\t\"numeric\": 1.5,\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\",\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]]\r\n}") {
- t.Error("JSONEq should return true")
- }
-}
-
-func TestJSONEqWrapper_Array(t *testing.T) {
- assert := New(new(testing.T))
- if !assert.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `["foo", {"nested": "hash", "hello": "world"}]`) {
- t.Error("JSONEq should return true")
- }
-
-}
-
-func TestJSONEqWrapper_HashAndArrayNotEquivalent(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `{"foo": "bar", {"nested": "hash", "hello": "world"}}`) {
- t.Error("JSONEq should return false")
- }
-}
-
-func TestJSONEqWrapper_HashesNotEquivalent(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq(`{"foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) {
- t.Error("JSONEq should return false")
- }
-}
-
-func TestJSONEqWrapper_ActualIsNotJSON(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq(`{"foo": "bar"}`, "Not JSON") {
- t.Error("JSONEq should return false")
- }
-}
-
-func TestJSONEqWrapper_ExpectedIsNotJSON(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq("Not JSON", `{"foo": "bar", "hello": "world"}`) {
- t.Error("JSONEq should return false")
- }
-}
-
-func TestJSONEqWrapper_ExpectedAndActualNotJSON(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq("Not JSON", "Not JSON") {
- t.Error("JSONEq should return false")
- }
-}
-
-func TestJSONEqWrapper_ArraysOfDifferentOrder(t *testing.T) {
- assert := New(new(testing.T))
- if assert.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `[{ "hello": "world", "nested": "hash"}, "foo"]`) {
- t.Error("JSONEq should return false")
- }
-}
diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions_test.go b/vendor/github.com/stretchr/testify/assert/http_assertions_test.go
deleted file mode 100644
index 3ab76830f..000000000
--- a/vendor/github.com/stretchr/testify/assert/http_assertions_test.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package assert
-
-import (
- "fmt"
- "net/http"
- "net/url"
- "testing"
-)
-
-func httpOK(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
-}
-
-func httpRedirect(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusTemporaryRedirect)
-}
-
-func httpError(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusInternalServerError)
-}
-
-func TestHTTPSuccess(t *testing.T) {
- assert := New(t)
-
- mockT1 := new(testing.T)
- assert.Equal(HTTPSuccess(mockT1, httpOK, "GET", "/", nil), true)
- assert.False(mockT1.Failed())
-
- mockT2 := new(testing.T)
- assert.Equal(HTTPSuccess(mockT2, httpRedirect, "GET", "/", nil), false)
- assert.True(mockT2.Failed())
-
- mockT3 := new(testing.T)
- assert.Equal(HTTPSuccess(mockT3, httpError, "GET", "/", nil), false)
- assert.True(mockT3.Failed())
-}
-
-func TestHTTPRedirect(t *testing.T) {
- assert := New(t)
-
- mockT1 := new(testing.T)
- assert.Equal(HTTPRedirect(mockT1, httpOK, "GET", "/", nil), false)
- assert.True(mockT1.Failed())
-
- mockT2 := new(testing.T)
- assert.Equal(HTTPRedirect(mockT2, httpRedirect, "GET", "/", nil), true)
- assert.False(mockT2.Failed())
-
- mockT3 := new(testing.T)
- assert.Equal(HTTPRedirect(mockT3, httpError, "GET", "/", nil), false)
- assert.True(mockT3.Failed())
-}
-
-func TestHTTPError(t *testing.T) {
- assert := New(t)
-
- mockT1 := new(testing.T)
- assert.Equal(HTTPError(mockT1, httpOK, "GET", "/", nil), false)
- assert.True(mockT1.Failed())
-
- mockT2 := new(testing.T)
- assert.Equal(HTTPError(mockT2, httpRedirect, "GET", "/", nil), false)
- assert.True(mockT2.Failed())
-
- mockT3 := new(testing.T)
- assert.Equal(HTTPError(mockT3, httpError, "GET", "/", nil), true)
- assert.False(mockT3.Failed())
-}
-
-func TestHTTPStatusesWrapper(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- assert.Equal(mockAssert.HTTPSuccess(httpOK, "GET", "/", nil), true)
- assert.Equal(mockAssert.HTTPSuccess(httpRedirect, "GET", "/", nil), false)
- assert.Equal(mockAssert.HTTPSuccess(httpError, "GET", "/", nil), false)
-
- assert.Equal(mockAssert.HTTPRedirect(httpOK, "GET", "/", nil), false)
- assert.Equal(mockAssert.HTTPRedirect(httpRedirect, "GET", "/", nil), true)
- assert.Equal(mockAssert.HTTPRedirect(httpError, "GET", "/", nil), false)
-
- assert.Equal(mockAssert.HTTPError(httpOK, "GET", "/", nil), false)
- assert.Equal(mockAssert.HTTPError(httpRedirect, "GET", "/", nil), false)
- assert.Equal(mockAssert.HTTPError(httpError, "GET", "/", nil), true)
-}
-
-func httpHelloName(w http.ResponseWriter, r *http.Request) {
- name := r.FormValue("name")
- w.Write([]byte(fmt.Sprintf("Hello, %s!", name)))
-}
-
-func TestHttpBody(t *testing.T) {
- assert := New(t)
- mockT := new(testing.T)
-
- assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
- assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
- assert.False(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
-
- assert.False(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
- assert.False(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
- assert.True(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
-}
-
-func TestHttpBodyWrappers(t *testing.T) {
- assert := New(t)
- mockAssert := New(new(testing.T))
-
- assert.True(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
- assert.True(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
- assert.False(mockAssert.HTTPBodyContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
-
- assert.False(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!"))
- assert.False(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World"))
- assert.True(mockAssert.HTTPBodyNotContains(httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world"))
-
-}
diff --git a/vendor/github.com/stretchr/testify/doc.go b/vendor/github.com/stretchr/testify/doc.go
deleted file mode 100644
index 377d5cc56..000000000
--- a/vendor/github.com/stretchr/testify/doc.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend.
-//
-// testify contains the following packages:
-//
-// The assert package provides a comprehensive set of assertion functions that tie in to the Go testing system.
-//
-// The http package contains tools to make it easier to test http activity using the Go testing system.
-//
-// The mock package provides a system by which it is possible to mock your objects and verify calls are happening as expected.
-//
-// The suite package provides a basic structure for using structs as testing suites, and methods on those structs as tests. It includes setup/teardown functionality in the way of interfaces.
-package testify
-
-// blank imports help docs.
-import (
- // assert package
- _ "github.com/stretchr/testify/assert"
- // http package
- _ "github.com/stretchr/testify/http"
- // mock package
- _ "github.com/stretchr/testify/mock"
-)
diff --git a/vendor/github.com/stretchr/testify/http/doc.go b/vendor/github.com/stretchr/testify/http/doc.go
deleted file mode 100644
index 695167c6d..000000000
--- a/vendor/github.com/stretchr/testify/http/doc.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package http DEPRECATED USE net/http/httptest
-package http
diff --git a/vendor/github.com/stretchr/testify/http/test_response_writer.go b/vendor/github.com/stretchr/testify/http/test_response_writer.go
deleted file mode 100644
index 5c3f813fa..000000000
--- a/vendor/github.com/stretchr/testify/http/test_response_writer.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package http
-
-import (
- "net/http"
-)
-
-// TestResponseWriter DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-type TestResponseWriter struct {
-
- // StatusCode is the last int written by the call to WriteHeader(int)
- StatusCode int
-
- // Output is a string containing the written bytes using the Write([]byte) func.
- Output string
-
- // header is the internal storage of the http.Header object
- header http.Header
-}
-
-// Header DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) Header() http.Header {
-
- if rw.header == nil {
- rw.header = make(http.Header)
- }
-
- return rw.header
-}
-
-// Write DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
-
- // assume 200 success if no header has been set
- if rw.StatusCode == 0 {
- rw.WriteHeader(200)
- }
-
- // add these bytes to the output string
- rw.Output = rw.Output + string(bytes)
-
- // return normal values
- return 0, nil
-
-}
-
-// WriteHeader DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
-func (rw *TestResponseWriter) WriteHeader(i int) {
- rw.StatusCode = i
-}
diff --git a/vendor/github.com/stretchr/testify/http/test_round_tripper.go b/vendor/github.com/stretchr/testify/http/test_round_tripper.go
deleted file mode 100644
index b1e32f1d8..000000000
--- a/vendor/github.com/stretchr/testify/http/test_round_tripper.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package http
-
-import (
- "github.com/stretchr/testify/mock"
- "net/http"
-)
-
-// TestRoundTripper DEPRECATED USE net/http/httptest
-type TestRoundTripper struct {
- mock.Mock
-}
-
-// RoundTrip DEPRECATED USE net/http/httptest
-func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
- args := t.Called(req)
- return args.Get(0).(*http.Response), args.Error(1)
-}
diff --git a/vendor/github.com/stretchr/testify/mock/mock_test.go b/vendor/github.com/stretchr/testify/mock/mock_test.go
deleted file mode 100644
index cb245ba59..000000000
--- a/vendor/github.com/stretchr/testify/mock/mock_test.go
+++ /dev/null
@@ -1,1352 +0,0 @@
-package mock
-
-import (
- "errors"
- "fmt"
- "sync"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-/*
- Test objects
-*/
-
-// ExampleInterface represents an example interface.
-type ExampleInterface interface {
- TheExampleMethod(a, b, c int) (int, error)
-}
-
-// TestExampleImplementation is a test implementation of ExampleInterface
-type TestExampleImplementation struct {
- Mock
-}
-
-func (i *TestExampleImplementation) TheExampleMethod(a, b, c int) (int, error) {
- args := i.Called(a, b, c)
- return args.Int(0), errors.New("Whoops")
-}
-
-func (i *TestExampleImplementation) TheExampleMethod2(yesorno bool) {
- i.Called(yesorno)
-}
-
-type ExampleType struct {
- ran bool
-}
-
-func (i *TestExampleImplementation) TheExampleMethod3(et *ExampleType) error {
- args := i.Called(et)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethod4(v ExampleInterface) error {
- args := i.Called(v)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethod5(ch chan struct{}) error {
- args := i.Called(ch)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethod6(m map[string]bool) error {
- args := i.Called(m)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethod7(slice []bool) error {
- args := i.Called(slice)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethodFunc(fn func(string) error) error {
- args := i.Called(fn)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethodVariadic(a ...int) error {
- args := i.Called(a)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethodVariadicInterface(a ...interface{}) error {
- args := i.Called(a)
- return args.Error(0)
-}
-
-func (i *TestExampleImplementation) TheExampleMethodMixedVariadic(a int, b ...int) error {
- args := i.Called(a, b)
- return args.Error(0)
-}
-
-type ExampleFuncType func(string) error
-
-func (i *TestExampleImplementation) TheExampleMethodFuncType(fn ExampleFuncType) error {
- args := i.Called(fn)
- return args.Error(0)
-}
-
-/*
- Mock
-*/
-
-func Test_Mock_TestData(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- if assert.NotNil(t, mockedService.TestData()) {
-
- mockedService.TestData().Set("something", 123)
- assert.Equal(t, 123, mockedService.TestData().Get("something").Data())
- }
-}
-
-func Test_Mock_On(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.On("TheExampleMethod")
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, "TheExampleMethod", c.Method)
-}
-
-func Test_Mock_Chained_On(t *testing.T) {
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- mockedService.
- On("TheExampleMethod", 1, 2, 3).
- Return(0).
- On("TheExampleMethod3", AnythingOfType("*mock.ExampleType")).
- Return(nil)
-
- expectedCalls := []*Call{
- &Call{
- Parent: &mockedService.Mock,
- Method: "TheExampleMethod",
- Arguments: []interface{}{1, 2, 3},
- ReturnArguments: []interface{}{0},
- },
- &Call{
- Parent: &mockedService.Mock,
- Method: "TheExampleMethod3",
- Arguments: []interface{}{AnythingOfType("*mock.ExampleType")},
- ReturnArguments: []interface{}{nil},
- },
- }
- assert.Equal(t, expectedCalls, mockedService.ExpectedCalls)
-}
-
-func Test_Mock_On_WithArgs(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.On("TheExampleMethod", 1, 2, 3, 4)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, "TheExampleMethod", c.Method)
- assert.Equal(t, Arguments{1, 2, 3, 4}, c.Arguments)
-}
-
-func Test_Mock_On_WithFuncArg(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethodFunc", AnythingOfType("func(string) error")).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, "TheExampleMethodFunc", c.Method)
- assert.Equal(t, 1, len(c.Arguments))
- assert.Equal(t, AnythingOfType("func(string) error"), c.Arguments[0])
-
- fn := func(string) error { return nil }
-
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodFunc(fn)
- })
-}
-
-func Test_Mock_On_WithIntArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod",
- MatchedBy(func(a int) bool {
- return a == 1
- }), MatchedBy(func(b int) bool {
- return b == 2
- }), MatchedBy(func(c int) bool {
- return c == 3
- })).Return(0, nil)
-
- assert.Panics(t, func() {
- mockedService.TheExampleMethod(1, 2, 4)
- })
- assert.Panics(t, func() {
- mockedService.TheExampleMethod(2, 2, 3)
- })
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethod(1, 2, 3)
- })
-}
-
-func Test_Mock_On_WithPtrArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod3",
- MatchedBy(func(a *ExampleType) bool { return a != nil && a.ran == true }),
- ).Return(nil)
-
- mockedService.On("TheExampleMethod3",
- MatchedBy(func(a *ExampleType) bool { return a != nil && a.ran == false }),
- ).Return(errors.New("error"))
-
- mockedService.On("TheExampleMethod3",
- MatchedBy(func(a *ExampleType) bool { return a == nil }),
- ).Return(errors.New("error2"))
-
- assert.Equal(t, mockedService.TheExampleMethod3(&ExampleType{true}), nil)
- assert.EqualError(t, mockedService.TheExampleMethod3(&ExampleType{false}), "error")
- assert.EqualError(t, mockedService.TheExampleMethod3(nil), "error2")
-}
-
-func Test_Mock_On_WithFuncArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- fixture1, fixture2 := errors.New("fixture1"), errors.New("fixture2")
-
- mockedService.On("TheExampleMethodFunc",
- MatchedBy(func(a func(string) error) bool { return a != nil && a("string") == fixture1 }),
- ).Return(errors.New("fixture1"))
-
- mockedService.On("TheExampleMethodFunc",
- MatchedBy(func(a func(string) error) bool { return a != nil && a("string") == fixture2 }),
- ).Return(errors.New("fixture2"))
-
- mockedService.On("TheExampleMethodFunc",
- MatchedBy(func(a func(string) error) bool { return a == nil }),
- ).Return(errors.New("fixture3"))
-
- assert.EqualError(t, mockedService.TheExampleMethodFunc(
- func(string) error { return fixture1 }), "fixture1")
- assert.EqualError(t, mockedService.TheExampleMethodFunc(
- func(string) error { return fixture2 }), "fixture2")
- assert.EqualError(t, mockedService.TheExampleMethodFunc(nil), "fixture3")
-}
-
-func Test_Mock_On_WithInterfaceArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod4",
- MatchedBy(func(a ExampleInterface) bool { return a == nil }),
- ).Return(errors.New("fixture1"))
-
- assert.EqualError(t, mockedService.TheExampleMethod4(nil), "fixture1")
-}
-
-func Test_Mock_On_WithChannelArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod5",
- MatchedBy(func(ch chan struct{}) bool { return ch == nil }),
- ).Return(errors.New("fixture1"))
-
- assert.EqualError(t, mockedService.TheExampleMethod5(nil), "fixture1")
-}
-
-func Test_Mock_On_WithMapArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod6",
- MatchedBy(func(m map[string]bool) bool { return m == nil }),
- ).Return(errors.New("fixture1"))
-
- assert.EqualError(t, mockedService.TheExampleMethod6(nil), "fixture1")
-}
-
-func Test_Mock_On_WithSliceArgMatcher(t *testing.T) {
- var mockedService TestExampleImplementation
-
- mockedService.On("TheExampleMethod7",
- MatchedBy(func(slice []bool) bool { return slice == nil }),
- ).Return(errors.New("fixture1"))
-
- assert.EqualError(t, mockedService.TheExampleMethod7(nil), "fixture1")
-}
-
-func Test_Mock_On_WithVariadicFunc(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethodVariadic", []int{1, 2, 3}).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, 1, len(c.Arguments))
- assert.Equal(t, []int{1, 2, 3}, c.Arguments[0])
-
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodVariadic(1, 2, 3)
- })
- assert.Panics(t, func() {
- mockedService.TheExampleMethodVariadic(1, 2)
- })
-
-}
-
-func Test_Mock_On_WithMixedVariadicFunc(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethodMixedVariadic", 1, []int{2, 3, 4}).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, 2, len(c.Arguments))
- assert.Equal(t, 1, c.Arguments[0])
- assert.Equal(t, []int{2, 3, 4}, c.Arguments[1])
-
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodMixedVariadic(1, 2, 3, 4)
- })
- assert.Panics(t, func() {
- mockedService.TheExampleMethodMixedVariadic(1, 2, 3, 5)
- })
-
-}
-
-func Test_Mock_On_WithVariadicFuncWithInterface(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.On("TheExampleMethodVariadicInterface", []interface{}{1, 2, 3}).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, 1, len(c.Arguments))
- assert.Equal(t, []interface{}{1, 2, 3}, c.Arguments[0])
-
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodVariadicInterface(1, 2, 3)
- })
- assert.Panics(t, func() {
- mockedService.TheExampleMethodVariadicInterface(1, 2)
- })
-
-}
-
-func Test_Mock_On_WithVariadicFuncWithEmptyInterfaceArray(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- var expected []interface{}
- c := mockedService.
- On("TheExampleMethodVariadicInterface", expected).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, 1, len(c.Arguments))
- assert.Equal(t, expected, c.Arguments[0])
-
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodVariadicInterface()
- })
- assert.Panics(t, func() {
- mockedService.TheExampleMethodVariadicInterface(1, 2)
- })
-
-}
-
-func Test_Mock_On_WithFuncPanics(t *testing.T) {
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- assert.Panics(t, func() {
- mockedService.On("TheExampleMethodFunc", func(string) error { return nil })
- })
-}
-
-func Test_Mock_On_WithFuncTypeArg(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethodFuncType", AnythingOfType("mock.ExampleFuncType")).
- Return(nil)
-
- assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
- assert.Equal(t, 1, len(c.Arguments))
- assert.Equal(t, AnythingOfType("mock.ExampleFuncType"), c.Arguments[0])
-
- fn := func(string) error { return nil }
- assert.NotPanics(t, func() {
- mockedService.TheExampleMethodFuncType(fn)
- })
-}
-
-func Test_Mock_Return(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethod", "A", "B", true).
- Return(1, "two", true)
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 0, call.Repeatability)
- assert.Nil(t, call.WaitFor)
-}
-
-func Test_Mock_Return_WaitUntil(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
- ch := time.After(time.Second)
-
- c := mockedService.Mock.
- On("TheExampleMethod", "A", "B", true).
- WaitUntil(ch).
- Return(1, "two", true)
-
- // assert that the call was created
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 0, call.Repeatability)
- assert.Equal(t, ch, call.WaitFor)
-}
-
-func Test_Mock_Return_After(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.Mock.
- On("TheExampleMethod", "A", "B", true).
- Return(1, "two", true).
- After(time.Second)
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.Mock.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 0, call.Repeatability)
- assert.NotEqual(t, nil, call.WaitFor)
-
-}
-
-func Test_Mock_Return_Run(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- fn := func(args Arguments) {
- arg := args.Get(0).(*ExampleType)
- arg.ran = true
- }
-
- c := mockedService.Mock.
- On("TheExampleMethod3", AnythingOfType("*mock.ExampleType")).
- Return(nil).
- Run(fn)
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.Mock.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod3", call.Method)
- assert.Equal(t, AnythingOfType("*mock.ExampleType"), call.Arguments[0])
- assert.Equal(t, nil, call.ReturnArguments[0])
- assert.Equal(t, 0, call.Repeatability)
- assert.NotEqual(t, nil, call.WaitFor)
- assert.NotNil(t, call.Run)
-
- et := ExampleType{}
- assert.Equal(t, false, et.ran)
- mockedService.TheExampleMethod3(&et)
- assert.Equal(t, true, et.ran)
-}
-
-func Test_Mock_Return_Run_Out_Of_Order(t *testing.T) {
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
- f := func(args Arguments) {
- arg := args.Get(0).(*ExampleType)
- arg.ran = true
- }
-
- c := mockedService.Mock.
- On("TheExampleMethod3", AnythingOfType("*mock.ExampleType")).
- Run(f).
- Return(nil)
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.Mock.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod3", call.Method)
- assert.Equal(t, AnythingOfType("*mock.ExampleType"), call.Arguments[0])
- assert.Equal(t, nil, call.ReturnArguments[0])
- assert.Equal(t, 0, call.Repeatability)
- assert.NotEqual(t, nil, call.WaitFor)
- assert.NotNil(t, call.Run)
-}
-
-func Test_Mock_Return_Once(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.On("TheExampleMethod", "A", "B", true).
- Return(1, "two", true).
- Once()
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 1, call.Repeatability)
- assert.Nil(t, call.WaitFor)
-}
-
-func Test_Mock_Return_Twice(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethod", "A", "B", true).
- Return(1, "two", true).
- Twice()
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 2, call.Repeatability)
- assert.Nil(t, call.WaitFor)
-}
-
-func Test_Mock_Return_Times(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethod", "A", "B", true).
- Return(1, "two", true).
- Times(5)
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 1, call.ReturnArguments[0])
- assert.Equal(t, "two", call.ReturnArguments[1])
- assert.Equal(t, true, call.ReturnArguments[2])
- assert.Equal(t, 5, call.Repeatability)
- assert.Nil(t, call.WaitFor)
-}
-
-func Test_Mock_Return_Nothing(t *testing.T) {
-
- // make a test impl object
- var mockedService = new(TestExampleImplementation)
-
- c := mockedService.
- On("TheExampleMethod", "A", "B", true).
- Return()
-
- require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
-
- call := mockedService.ExpectedCalls[0]
-
- assert.Equal(t, "TheExampleMethod", call.Method)
- assert.Equal(t, "A", call.Arguments[0])
- assert.Equal(t, "B", call.Arguments[1])
- assert.Equal(t, true, call.Arguments[2])
- assert.Equal(t, 0, len(call.ReturnArguments))
-}
-
-func Test_Mock_findExpectedCall(t *testing.T) {
-
- m := new(Mock)
- m.On("One", 1).Return("one")
- m.On("Two", 2).Return("two")
- m.On("Two", 3).Return("three")
-
- f, c := m.findExpectedCall("Two", 3)
-
- if assert.Equal(t, 2, f) {
- if assert.NotNil(t, c) {
- assert.Equal(t, "Two", c.Method)
- assert.Equal(t, 3, c.Arguments[0])
- assert.Equal(t, "three", c.ReturnArguments[0])
- }
- }
-
-}
-
-func Test_Mock_findExpectedCall_For_Unknown_Method(t *testing.T) {
-
- m := new(Mock)
- m.On("One", 1).Return("one")
- m.On("Two", 2).Return("two")
- m.On("Two", 3).Return("three")
-
- f, _ := m.findExpectedCall("Two")
-
- assert.Equal(t, -1, f)
-
-}
-
-func Test_Mock_findExpectedCall_Respects_Repeatability(t *testing.T) {
-
- m := new(Mock)
- m.On("One", 1).Return("one")
- m.On("Two", 2).Return("two").Once()
- m.On("Two", 3).Return("three").Twice()
- m.On("Two", 3).Return("three").Times(8)
-
- f, c := m.findExpectedCall("Two", 3)
-
- if assert.Equal(t, 2, f) {
- if assert.NotNil(t, c) {
- assert.Equal(t, "Two", c.Method)
- assert.Equal(t, 3, c.Arguments[0])
- assert.Equal(t, "three", c.ReturnArguments[0])
- }
- }
-
-}
-
-func Test_callString(t *testing.T) {
-
- assert.Equal(t, `Method(int,bool,string)`, callString("Method", []interface{}{1, true, "something"}, false))
-
-}
-
-func Test_Mock_Called(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_Called", 1, 2, 3).Return(5, "6", true)
-
- returnArguments := mockedService.Called(1, 2, 3)
-
- if assert.Equal(t, 1, len(mockedService.Calls)) {
- assert.Equal(t, "Test_Mock_Called", mockedService.Calls[0].Method)
- assert.Equal(t, 1, mockedService.Calls[0].Arguments[0])
- assert.Equal(t, 2, mockedService.Calls[0].Arguments[1])
- assert.Equal(t, 3, mockedService.Calls[0].Arguments[2])
- }
-
- if assert.Equal(t, 3, len(returnArguments)) {
- assert.Equal(t, 5, returnArguments[0])
- assert.Equal(t, "6", returnArguments[1])
- assert.Equal(t, true, returnArguments[2])
- }
-
-}
-
-func asyncCall(m *Mock, ch chan Arguments) {
- ch <- m.Called(1, 2, 3)
-}
-
-func Test_Mock_Called_blocks(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.Mock.On("asyncCall", 1, 2, 3).Return(5, "6", true).After(2 * time.Millisecond)
-
- ch := make(chan Arguments)
-
- go asyncCall(&mockedService.Mock, ch)
-
- select {
- case <-ch:
- t.Fatal("should have waited")
- case <-time.After(1 * time.Millisecond):
- }
-
- returnArguments := <-ch
-
- if assert.Equal(t, 1, len(mockedService.Mock.Calls)) {
- assert.Equal(t, "asyncCall", mockedService.Mock.Calls[0].Method)
- assert.Equal(t, 1, mockedService.Mock.Calls[0].Arguments[0])
- assert.Equal(t, 2, mockedService.Mock.Calls[0].Arguments[1])
- assert.Equal(t, 3, mockedService.Mock.Calls[0].Arguments[2])
- }
-
- if assert.Equal(t, 3, len(returnArguments)) {
- assert.Equal(t, 5, returnArguments[0])
- assert.Equal(t, "6", returnArguments[1])
- assert.Equal(t, true, returnArguments[2])
- }
-
-}
-
-func Test_Mock_Called_For_Bounded_Repeatability(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.
- On("Test_Mock_Called_For_Bounded_Repeatability", 1, 2, 3).
- Return(5, "6", true).
- Once()
- mockedService.
- On("Test_Mock_Called_For_Bounded_Repeatability", 1, 2, 3).
- Return(-1, "hi", false)
-
- returnArguments1 := mockedService.Called(1, 2, 3)
- returnArguments2 := mockedService.Called(1, 2, 3)
-
- if assert.Equal(t, 2, len(mockedService.Calls)) {
- assert.Equal(t, "Test_Mock_Called_For_Bounded_Repeatability", mockedService.Calls[0].Method)
- assert.Equal(t, 1, mockedService.Calls[0].Arguments[0])
- assert.Equal(t, 2, mockedService.Calls[0].Arguments[1])
- assert.Equal(t, 3, mockedService.Calls[0].Arguments[2])
-
- assert.Equal(t, "Test_Mock_Called_For_Bounded_Repeatability", mockedService.Calls[1].Method)
- assert.Equal(t, 1, mockedService.Calls[1].Arguments[0])
- assert.Equal(t, 2, mockedService.Calls[1].Arguments[1])
- assert.Equal(t, 3, mockedService.Calls[1].Arguments[2])
- }
-
- if assert.Equal(t, 3, len(returnArguments1)) {
- assert.Equal(t, 5, returnArguments1[0])
- assert.Equal(t, "6", returnArguments1[1])
- assert.Equal(t, true, returnArguments1[2])
- }
-
- if assert.Equal(t, 3, len(returnArguments2)) {
- assert.Equal(t, -1, returnArguments2[0])
- assert.Equal(t, "hi", returnArguments2[1])
- assert.Equal(t, false, returnArguments2[2])
- }
-
-}
-
-func Test_Mock_Called_For_SetTime_Expectation(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("TheExampleMethod", 1, 2, 3).Return(5, "6", true).Times(4)
-
- mockedService.TheExampleMethod(1, 2, 3)
- mockedService.TheExampleMethod(1, 2, 3)
- mockedService.TheExampleMethod(1, 2, 3)
- mockedService.TheExampleMethod(1, 2, 3)
- assert.Panics(t, func() {
- mockedService.TheExampleMethod(1, 2, 3)
- })
-
-}
-
-func Test_Mock_Called_Unexpected(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- // make sure it panics if no expectation was made
- assert.Panics(t, func() {
- mockedService.Called(1, 2, 3)
- }, "Calling unexpected method should panic")
-
-}
-
-func Test_AssertExpectationsForObjects_Helper(t *testing.T) {
-
- var mockedService1 = new(TestExampleImplementation)
- var mockedService2 = new(TestExampleImplementation)
- var mockedService3 = new(TestExampleImplementation)
-
- mockedService1.On("Test_AssertExpectationsForObjects_Helper", 1).Return()
- mockedService2.On("Test_AssertExpectationsForObjects_Helper", 2).Return()
- mockedService3.On("Test_AssertExpectationsForObjects_Helper", 3).Return()
-
- mockedService1.Called(1)
- mockedService2.Called(2)
- mockedService3.Called(3)
-
- assert.True(t, AssertExpectationsForObjects(t, &mockedService1.Mock, &mockedService2.Mock, &mockedService3.Mock))
- assert.True(t, AssertExpectationsForObjects(t, mockedService1, mockedService2, mockedService3))
-
-}
-
-func Test_AssertExpectationsForObjects_Helper_Failed(t *testing.T) {
-
- var mockedService1 = new(TestExampleImplementation)
- var mockedService2 = new(TestExampleImplementation)
- var mockedService3 = new(TestExampleImplementation)
-
- mockedService1.On("Test_AssertExpectationsForObjects_Helper_Failed", 1).Return()
- mockedService2.On("Test_AssertExpectationsForObjects_Helper_Failed", 2).Return()
- mockedService3.On("Test_AssertExpectationsForObjects_Helper_Failed", 3).Return()
-
- mockedService1.Called(1)
- mockedService3.Called(3)
-
- tt := new(testing.T)
- assert.False(t, AssertExpectationsForObjects(tt, &mockedService1.Mock, &mockedService2.Mock, &mockedService3.Mock))
- assert.False(t, AssertExpectationsForObjects(tt, mockedService1, mockedService2, mockedService3))
-
-}
-
-func Test_Mock_AssertExpectations(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertExpectations", 1, 2, 3).Return(5, 6, 7)
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make the call now
- mockedService.Called(1, 2, 3)
-
- // now assert expectations
- assert.True(t, mockedService.AssertExpectations(tt))
-
-}
-
-func Test_Mock_AssertExpectations_Placeholder_NoArgs(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertExpectations_Placeholder_NoArgs").Return(5, 6, 7).Once()
- mockedService.On("Test_Mock_AssertExpectations_Placeholder_NoArgs").Return(7, 6, 5)
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make the call now
- mockedService.Called()
-
- // now assert expectations
- assert.True(t, mockedService.AssertExpectations(tt))
-
-}
-
-func Test_Mock_AssertExpectations_Placeholder(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertExpectations_Placeholder", 1, 2, 3).Return(5, 6, 7).Once()
- mockedService.On("Test_Mock_AssertExpectations_Placeholder", 3, 2, 1).Return(7, 6, 5)
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make the call now
- mockedService.Called(1, 2, 3)
-
- // now assert expectations
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make call to the second expectation
- mockedService.Called(3, 2, 1)
-
- // now assert expectations again
- assert.True(t, mockedService.AssertExpectations(tt))
-}
-
-func Test_Mock_AssertExpectations_With_Pointers(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertExpectations_With_Pointers", &struct{ Foo int }{1}).Return(1)
- mockedService.On("Test_Mock_AssertExpectations_With_Pointers", &struct{ Foo int }{2}).Return(2)
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- s := struct{ Foo int }{1}
- // make the calls now
- mockedService.Called(&s)
- s.Foo = 2
- mockedService.Called(&s)
-
- // now assert expectations
- assert.True(t, mockedService.AssertExpectations(tt))
-
-}
-
-func Test_Mock_AssertExpectationsCustomType(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("TheExampleMethod3", AnythingOfType("*mock.ExampleType")).Return(nil).Once()
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make the call now
- mockedService.TheExampleMethod3(&ExampleType{})
-
- // now assert expectations
- assert.True(t, mockedService.AssertExpectations(tt))
-
-}
-
-func Test_Mock_AssertExpectations_With_Repeatability(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertExpectations_With_Repeatability", 1, 2, 3).Return(5, 6, 7).Twice()
-
- tt := new(testing.T)
- assert.False(t, mockedService.AssertExpectations(tt))
-
- // make the call now
- mockedService.Called(1, 2, 3)
-
- assert.False(t, mockedService.AssertExpectations(tt))
-
- mockedService.Called(1, 2, 3)
-
- // now assert expectations
- assert.True(t, mockedService.AssertExpectations(tt))
-
-}
-
-func Test_Mock_TwoCallsWithDifferentArguments(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_TwoCallsWithDifferentArguments", 1, 2, 3).Return(5, 6, 7)
- mockedService.On("Test_Mock_TwoCallsWithDifferentArguments", 4, 5, 6).Return(5, 6, 7)
-
- args1 := mockedService.Called(1, 2, 3)
- assert.Equal(t, 5, args1.Int(0))
- assert.Equal(t, 6, args1.Int(1))
- assert.Equal(t, 7, args1.Int(2))
-
- args2 := mockedService.Called(4, 5, 6)
- assert.Equal(t, 5, args2.Int(0))
- assert.Equal(t, 6, args2.Int(1))
- assert.Equal(t, 7, args2.Int(2))
-
-}
-
-func Test_Mock_AssertNumberOfCalls(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertNumberOfCalls", 1, 2, 3).Return(5, 6, 7)
-
- mockedService.Called(1, 2, 3)
- assert.True(t, mockedService.AssertNumberOfCalls(t, "Test_Mock_AssertNumberOfCalls", 1))
-
- mockedService.Called(1, 2, 3)
- assert.True(t, mockedService.AssertNumberOfCalls(t, "Test_Mock_AssertNumberOfCalls", 2))
-
-}
-
-func Test_Mock_AssertCalled(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertCalled", 1, 2, 3).Return(5, 6, 7)
-
- mockedService.Called(1, 2, 3)
-
- assert.True(t, mockedService.AssertCalled(t, "Test_Mock_AssertCalled", 1, 2, 3))
-
-}
-
-func Test_Mock_AssertCalled_WithAnythingOfTypeArgument(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.
- On("Test_Mock_AssertCalled_WithAnythingOfTypeArgument", Anything, Anything, Anything).
- Return()
-
- mockedService.Called(1, "two", []uint8("three"))
-
- assert.True(t, mockedService.AssertCalled(t, "Test_Mock_AssertCalled_WithAnythingOfTypeArgument", AnythingOfType("int"), AnythingOfType("string"), AnythingOfType("[]uint8")))
-
-}
-
-func Test_Mock_AssertCalled_WithArguments(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertCalled_WithArguments", 1, 2, 3).Return(5, 6, 7)
-
- mockedService.Called(1, 2, 3)
-
- tt := new(testing.T)
- assert.True(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments", 1, 2, 3))
- assert.False(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments", 2, 3, 4))
-
-}
-
-func Test_Mock_AssertCalled_WithArguments_With_Repeatability(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertCalled_WithArguments_With_Repeatability", 1, 2, 3).Return(5, 6, 7).Once()
- mockedService.On("Test_Mock_AssertCalled_WithArguments_With_Repeatability", 2, 3, 4).Return(5, 6, 7).Once()
-
- mockedService.Called(1, 2, 3)
- mockedService.Called(2, 3, 4)
-
- tt := new(testing.T)
- assert.True(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments_With_Repeatability", 1, 2, 3))
- assert.True(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments_With_Repeatability", 2, 3, 4))
- assert.False(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments_With_Repeatability", 3, 4, 5))
-
-}
-
-func Test_Mock_AssertNotCalled(t *testing.T) {
-
- var mockedService = new(TestExampleImplementation)
-
- mockedService.On("Test_Mock_AssertNotCalled", 1, 2, 3).Return(5, 6, 7)
-
- mockedService.Called(1, 2, 3)
-
- assert.True(t, mockedService.AssertNotCalled(t, "Test_Mock_NotCalled"))
-
-}
-
-func Test_Mock_AssertOptional(t *testing.T) {
- // Optional called
- var ms1 = new(TestExampleImplementation)
- ms1.On("TheExampleMethod", 1, 2, 3).Maybe().Return(4, nil)
- ms1.TheExampleMethod(1, 2, 3)
-
- tt1 := new(testing.T)
- assert.Equal(t, true, ms1.AssertExpectations(tt1))
-
- // Optional not called
- var ms2 = new(TestExampleImplementation)
- ms2.On("TheExampleMethod", 1, 2, 3).Maybe().Return(4, nil)
-
- tt2 := new(testing.T)
- assert.Equal(t, true, ms2.AssertExpectations(tt2))
-
- // Non-optional called
- var ms3 = new(TestExampleImplementation)
- ms3.On("TheExampleMethod", 1, 2, 3).Return(4, nil)
- ms3.TheExampleMethod(1, 2, 3)
-
- tt3 := new(testing.T)
- assert.Equal(t, true, ms3.AssertExpectations(tt3))
-}
-
-/*
- Arguments helper methods
-*/
-func Test_Arguments_Get(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
-
- assert.Equal(t, "string", args.Get(0).(string))
- assert.Equal(t, 123, args.Get(1).(int))
- assert.Equal(t, true, args.Get(2).(bool))
-
-}
-
-func Test_Arguments_Is(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
-
- assert.True(t, args.Is("string", 123, true))
- assert.False(t, args.Is("wrong", 456, false))
-
-}
-
-func Test_Arguments_Diff(t *testing.T) {
-
- var args = Arguments([]interface{}{"Hello World", 123, true})
- var diff string
- var count int
- diff, count = args.Diff([]interface{}{"Hello World", 456, "false"})
-
- assert.Equal(t, 2, count)
- assert.Contains(t, diff, `%!s(int=456) != %!s(int=123)`)
- assert.Contains(t, diff, `false != %!s(bool=true)`)
-
-}
-
-func Test_Arguments_Diff_DifferentNumberOfArgs(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- var diff string
- var count int
- diff, count = args.Diff([]interface{}{"string", 456, "false", "extra"})
-
- assert.Equal(t, 3, count)
- assert.Contains(t, diff, `extra != (Missing)`)
-
-}
-
-func Test_Arguments_Diff_WithAnythingArgument(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- var count int
- _, count = args.Diff([]interface{}{"string", Anything, true})
-
- assert.Equal(t, 0, count)
-
-}
-
-func Test_Arguments_Diff_WithAnythingArgument_InActualToo(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", Anything, true})
- var count int
- _, count = args.Diff([]interface{}{"string", 123, true})
-
- assert.Equal(t, 0, count)
-
-}
-
-func Test_Arguments_Diff_WithAnythingOfTypeArgument(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", AnythingOfType("int"), true})
- var count int
- _, count = args.Diff([]interface{}{"string", 123, true})
-
- assert.Equal(t, 0, count)
-
-}
-
-func Test_Arguments_Diff_WithAnythingOfTypeArgument_Failing(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", AnythingOfType("string"), true})
- var count int
- var diff string
- diff, count = args.Diff([]interface{}{"string", 123, true})
-
- assert.Equal(t, 1, count)
- assert.Contains(t, diff, `string != type int - %!s(int=123)`)
-
-}
-
-func Test_Arguments_Diff_WithArgMatcher(t *testing.T) {
- matchFn := func(a int) bool {
- return a == 123
- }
- var args = Arguments([]interface{}{"string", MatchedBy(matchFn), true})
-
- diff, count := args.Diff([]interface{}{"string", 124, true})
- assert.Equal(t, 1, count)
- assert.Contains(t, diff, `%!s(int=124) not matched by func(int) bool`)
-
- diff, count = args.Diff([]interface{}{"string", false, true})
- assert.Equal(t, 1, count)
- assert.Contains(t, diff, `%!s(bool=false) not matched by func(int) bool`)
-
- diff, count = args.Diff([]interface{}{"string", 123, false})
- assert.Contains(t, diff, `%!s(int=123) matched by func(int) bool`)
-
- diff, count = args.Diff([]interface{}{"string", 123, true})
- assert.Equal(t, 0, count)
- assert.Contains(t, diff, `No differences.`)
-}
-
-func Test_Arguments_Assert(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
-
- assert.True(t, args.Assert(t, "string", 123, true))
-
-}
-
-func Test_Arguments_String_Representation(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- assert.Equal(t, `string,int,bool`, args.String())
-
-}
-
-func Test_Arguments_String(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- assert.Equal(t, "string", args.String(0))
-
-}
-
-func Test_Arguments_Error(t *testing.T) {
-
- var err = errors.New("An Error")
- var args = Arguments([]interface{}{"string", 123, true, err})
- assert.Equal(t, err, args.Error(3))
-
-}
-
-func Test_Arguments_Error_Nil(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true, nil})
- assert.Equal(t, nil, args.Error(3))
-
-}
-
-func Test_Arguments_Int(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- assert.Equal(t, 123, args.Int(1))
-
-}
-
-func Test_Arguments_Bool(t *testing.T) {
-
- var args = Arguments([]interface{}{"string", 123, true})
- assert.Equal(t, true, args.Bool(2))
-
-}
-
-func Test_WaitUntil_Parallel(t *testing.T) {
-
- // make a test impl object
- var mockedService *TestExampleImplementation = new(TestExampleImplementation)
-
- ch1 := make(chan time.Time)
- ch2 := make(chan time.Time)
-
- mockedService.Mock.On("TheExampleMethod2", true).Return().WaitUntil(ch2).Run(func(args Arguments) {
- ch1 <- time.Now()
- })
-
- mockedService.Mock.On("TheExampleMethod2", false).Return().WaitUntil(ch1)
-
- // Lock both goroutines on the .WaitUntil method
- go func() {
- mockedService.TheExampleMethod2(false)
- }()
- go func() {
- mockedService.TheExampleMethod2(true)
- }()
-
- // Allow the first call to execute, so the second one executes afterwards
- ch2 <- time.Now()
-}
-
-func Test_MockMethodCalled(t *testing.T) {
- m := new(Mock)
- m.On("foo", "hello").Return("world")
-
- retArgs := m.MethodCalled("foo", "hello")
- require.True(t, len(retArgs) == 1)
- require.Equal(t, "world", retArgs[0])
- m.AssertExpectations(t)
-}
-
-// Test to validate fix for racy concurrent call access in MethodCalled()
-func Test_MockReturnAndCalledConcurrent(t *testing.T) {
- iterations := 1000
- m := &Mock{}
- call := m.On("ConcurrencyTestMethod")
-
- wg := sync.WaitGroup{}
- wg.Add(2)
-
- go func() {
- for i := 0; i < iterations; i++ {
- call.Return(10)
- }
- wg.Done()
- }()
- go func() {
- for i := 0; i < iterations; i++ {
- ConcurrencyTestMethod(m)
- }
- wg.Done()
- }()
- wg.Wait()
-}
-
-type timer struct{ Mock }
-
-func (s *timer) GetTime(i int) string {
- return s.Called(i).Get(0).(string)
-}
-
-func TestAfterTotalWaitTimeWhileExecution(t *testing.T) {
- waitDuration := 1
- total, waitMs := 5, time.Millisecond*time.Duration(waitDuration)
- aTimer := new(timer)
- for i := 0; i < total; i++ {
- aTimer.On("GetTime", i).After(waitMs).Return(fmt.Sprintf("Time%d", i)).Once()
- }
- time.Sleep(waitMs)
- start := time.Now()
- var results []string
-
- for i := 0; i < total; i++ {
- results = append(results, aTimer.GetTime(i))
- }
-
- end := time.Now()
- elapsedTime := end.Sub(start)
- assert.True(t, elapsedTime > waitMs, fmt.Sprintf("Total elapsed time:%v should be atleast greater than %v", elapsedTime, waitMs))
- assert.Equal(t, total, len(results))
- for i, _ := range results {
- assert.Equal(t, fmt.Sprintf("Time%d", i), results[i], "Return value of method should be same")
- }
-}
-
-func ConcurrencyTestMethod(m *Mock) {
- m.Called()
-}
diff --git a/vendor/github.com/stretchr/testify/package_test.go b/vendor/github.com/stretchr/testify/package_test.go
deleted file mode 100644
index 7ac5d6d8e..000000000
--- a/vendor/github.com/stretchr/testify/package_test.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package testify
-
-import (
- "github.com/stretchr/testify/assert"
- "testing"
-)
-
-func TestImports(t *testing.T) {
- if assert.Equal(t, 1, 1) != true {
- t.Error("Something is wrong.")
- }
-}
diff --git a/vendor/github.com/stretchr/testify/require/forward_requirements_test.go b/vendor/github.com/stretchr/testify/require/forward_requirements_test.go
deleted file mode 100644
index b120ae3b8..000000000
--- a/vendor/github.com/stretchr/testify/require/forward_requirements_test.go
+++ /dev/null
@@ -1,385 +0,0 @@
-package require
-
-import (
- "errors"
- "testing"
- "time"
-)
-
-func TestImplementsWrapper(t *testing.T) {
- require := New(t)
-
- require.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestIsTypeWrapper(t *testing.T) {
- require := New(t)
- require.IsType(new(AssertionTesterConformingObject), new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.IsType(new(AssertionTesterConformingObject), new(AssertionTesterNonConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEqualWrapper(t *testing.T) {
- require := New(t)
- require.Equal(1, 1)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Equal(1, 2)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotEqualWrapper(t *testing.T) {
- require := New(t)
- require.NotEqual(1, 2)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotEqual(2, 2)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestExactlyWrapper(t *testing.T) {
- require := New(t)
-
- a := float32(1)
- b := float32(1)
- c := float64(1)
-
- require.Exactly(a, b)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Exactly(a, c)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotNilWrapper(t *testing.T) {
- require := New(t)
- require.NotNil(t, new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotNil(nil)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNilWrapper(t *testing.T) {
- require := New(t)
- require.Nil(nil)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Nil(new(AssertionTesterConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestTrueWrapper(t *testing.T) {
- require := New(t)
- require.True(true)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.True(false)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestFalseWrapper(t *testing.T) {
- require := New(t)
- require.False(false)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.False(true)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestContainsWrapper(t *testing.T) {
- require := New(t)
- require.Contains("Hello World", "Hello")
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Contains("Hello World", "Salut")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotContainsWrapper(t *testing.T) {
- require := New(t)
- require.NotContains("Hello World", "Hello!")
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotContains("Hello World", "Hello")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestPanicsWrapper(t *testing.T) {
- require := New(t)
- require.Panics(func() {
- panic("Panic!")
- })
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Panics(func() {})
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotPanicsWrapper(t *testing.T) {
- require := New(t)
- require.NotPanics(func() {})
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotPanics(func() {
- panic("Panic!")
- })
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNoErrorWrapper(t *testing.T) {
- require := New(t)
- require.NoError(nil)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NoError(errors.New("some error"))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestErrorWrapper(t *testing.T) {
- require := New(t)
- require.Error(errors.New("some error"))
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Error(nil)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEqualErrorWrapper(t *testing.T) {
- require := New(t)
- require.EqualError(errors.New("some error"), "some error")
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.EqualError(errors.New("some error"), "Not some error")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEmptyWrapper(t *testing.T) {
- require := New(t)
- require.Empty("")
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Empty("x")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotEmptyWrapper(t *testing.T) {
- require := New(t)
- require.NotEmpty("x")
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotEmpty("")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestWithinDurationWrapper(t *testing.T) {
- require := New(t)
- a := time.Now()
- b := a.Add(10 * time.Second)
-
- require.WithinDuration(a, b, 15*time.Second)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.WithinDuration(a, b, 5*time.Second)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestInDeltaWrapper(t *testing.T) {
- require := New(t)
- require.InDelta(1.001, 1, 0.01)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.InDelta(1, 2, 0.5)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestZeroWrapper(t *testing.T) {
- require := New(t)
- require.Zero(0)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.Zero(1)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotZeroWrapper(t *testing.T) {
- require := New(t)
- require.NotZero(1)
-
- mockT := new(MockT)
- mockRequire := New(mockT)
- mockRequire.NotZero(0)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_EqualSONString(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"hello": "world", "foo": "bar"}`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEqWrapper_EquivalentButNotEqual(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEqWrapper_HashOfArraysAndHashes(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq("{\r\n\t\"numeric\": 1.5,\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]],\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\"\r\n}",
- "{\r\n\t\"numeric\": 1.5,\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\",\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]]\r\n}")
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEqWrapper_Array(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `["foo", {"nested": "hash", "hello": "world"}]`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEqWrapper_HashAndArrayNotEquivalent(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `{"foo": "bar", {"nested": "hash", "hello": "world"}}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_HashesNotEquivalent(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`{"foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_ActualIsNotJSON(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`{"foo": "bar"}`, "Not JSON")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_ExpectedIsNotJSON(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq("Not JSON", `{"foo": "bar", "hello": "world"}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_ExpectedAndActualNotJSON(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq("Not JSON", "Not JSON")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEqWrapper_ArraysOfDifferentOrder(t *testing.T) {
- mockT := new(MockT)
- mockRequire := New(mockT)
-
- mockRequire.JSONEq(`["foo", {"hello": "world", "nested": "hash"}]`, `[{ "hello": "world", "nested": "hash"}, "foo"]`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
diff --git a/vendor/github.com/stretchr/testify/require/requirements_test.go b/vendor/github.com/stretchr/testify/require/requirements_test.go
deleted file mode 100644
index d2ccc99c9..000000000
--- a/vendor/github.com/stretchr/testify/require/requirements_test.go
+++ /dev/null
@@ -1,369 +0,0 @@
-package require
-
-import (
- "errors"
- "testing"
- "time"
-)
-
-// AssertionTesterInterface defines an interface to be used for testing assertion methods
-type AssertionTesterInterface interface {
- TestMethod()
-}
-
-// AssertionTesterConformingObject is an object that conforms to the AssertionTesterInterface interface
-type AssertionTesterConformingObject struct {
-}
-
-func (a *AssertionTesterConformingObject) TestMethod() {
-}
-
-// AssertionTesterNonConformingObject is an object that does not conform to the AssertionTesterInterface interface
-type AssertionTesterNonConformingObject struct {
-}
-
-type MockT struct {
- Failed bool
-}
-
-func (t *MockT) FailNow() {
- t.Failed = true
-}
-
-func (t *MockT) Errorf(format string, args ...interface{}) {
- _, _ = format, args
-}
-
-func TestImplements(t *testing.T) {
-
- Implements(t, (*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- Implements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestIsType(t *testing.T) {
-
- IsType(t, new(AssertionTesterConformingObject), new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- IsType(mockT, new(AssertionTesterConformingObject), new(AssertionTesterNonConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEqual(t *testing.T) {
-
- Equal(t, 1, 1)
-
- mockT := new(MockT)
- Equal(mockT, 1, 2)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-
-}
-
-func TestNotEqual(t *testing.T) {
-
- NotEqual(t, 1, 2)
- mockT := new(MockT)
- NotEqual(mockT, 2, 2)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestExactly(t *testing.T) {
-
- a := float32(1)
- b := float32(1)
- c := float64(1)
-
- Exactly(t, a, b)
-
- mockT := new(MockT)
- Exactly(mockT, a, c)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotNil(t *testing.T) {
-
- NotNil(t, new(AssertionTesterConformingObject))
-
- mockT := new(MockT)
- NotNil(mockT, nil)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNil(t *testing.T) {
-
- Nil(t, nil)
-
- mockT := new(MockT)
- Nil(mockT, new(AssertionTesterConformingObject))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestTrue(t *testing.T) {
-
- True(t, true)
-
- mockT := new(MockT)
- True(mockT, false)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestFalse(t *testing.T) {
-
- False(t, false)
-
- mockT := new(MockT)
- False(mockT, true)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestContains(t *testing.T) {
-
- Contains(t, "Hello World", "Hello")
-
- mockT := new(MockT)
- Contains(mockT, "Hello World", "Salut")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotContains(t *testing.T) {
-
- NotContains(t, "Hello World", "Hello!")
-
- mockT := new(MockT)
- NotContains(mockT, "Hello World", "Hello")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestPanics(t *testing.T) {
-
- Panics(t, func() {
- panic("Panic!")
- })
-
- mockT := new(MockT)
- Panics(mockT, func() {})
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotPanics(t *testing.T) {
-
- NotPanics(t, func() {})
-
- mockT := new(MockT)
- NotPanics(mockT, func() {
- panic("Panic!")
- })
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNoError(t *testing.T) {
-
- NoError(t, nil)
-
- mockT := new(MockT)
- NoError(mockT, errors.New("some error"))
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestError(t *testing.T) {
-
- Error(t, errors.New("some error"))
-
- mockT := new(MockT)
- Error(mockT, nil)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEqualError(t *testing.T) {
-
- EqualError(t, errors.New("some error"), "some error")
-
- mockT := new(MockT)
- EqualError(mockT, errors.New("some error"), "Not some error")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestEmpty(t *testing.T) {
-
- Empty(t, "")
-
- mockT := new(MockT)
- Empty(mockT, "x")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotEmpty(t *testing.T) {
-
- NotEmpty(t, "x")
-
- mockT := new(MockT)
- NotEmpty(mockT, "")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestWithinDuration(t *testing.T) {
-
- a := time.Now()
- b := a.Add(10 * time.Second)
-
- WithinDuration(t, a, b, 15*time.Second)
-
- mockT := new(MockT)
- WithinDuration(mockT, a, b, 5*time.Second)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestInDelta(t *testing.T) {
-
- InDelta(t, 1.001, 1, 0.01)
-
- mockT := new(MockT)
- InDelta(mockT, 1, 2, 0.5)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestZero(t *testing.T) {
-
- Zero(t, "")
-
- mockT := new(MockT)
- Zero(mockT, "x")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestNotZero(t *testing.T) {
-
- NotZero(t, "x")
-
- mockT := new(MockT)
- NotZero(mockT, "")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_EqualSONString(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `{"hello": "world", "foo": "bar"}`, `{"hello": "world", "foo": "bar"}`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEq_EquivalentButNotEqual(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEq_HashOfArraysAndHashes(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, "{\r\n\t\"numeric\": 1.5,\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]],\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\"\r\n}",
- "{\r\n\t\"numeric\": 1.5,\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\",\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]]\r\n}")
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEq_Array(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `["foo", {"nested": "hash", "hello": "world"}]`)
- if mockT.Failed {
- t.Error("Check should pass")
- }
-}
-
-func TestJSONEq_HashAndArrayNotEquivalent(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `{"foo": "bar", {"nested": "hash", "hello": "world"}}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_HashesNotEquivalent(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `{"foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_ActualIsNotJSON(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `{"foo": "bar"}`, "Not JSON")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_ExpectedIsNotJSON(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, "Not JSON", `{"foo": "bar", "hello": "world"}`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_ExpectedAndActualNotJSON(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, "Not JSON", "Not JSON")
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
-
-func TestJSONEq_ArraysOfDifferentOrder(t *testing.T) {
- mockT := new(MockT)
- JSONEq(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `[{ "hello": "world", "nested": "hash"}, "foo"]`)
- if !mockT.Failed {
- t.Error("Check should fail")
- }
-}
diff --git a/vendor/github.com/stretchr/testify/suite/suite_test.go b/vendor/github.com/stretchr/testify/suite/suite_test.go
deleted file mode 100644
index b75fa4ac1..000000000
--- a/vendor/github.com/stretchr/testify/suite/suite_test.go
+++ /dev/null
@@ -1,294 +0,0 @@
-package suite
-
-import (
- "errors"
- "io/ioutil"
- "os"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-// SuiteRequireTwice is intended to test the usage of suite.Require in two
-// different tests
-type SuiteRequireTwice struct{ Suite }
-
-// TestSuiteRequireTwice checks for regressions of issue #149 where
-// suite.requirements was not initialised in suite.SetT()
-// A regression would result on these tests panicking rather than failing.
-func TestSuiteRequireTwice(t *testing.T) {
- ok := testing.RunTests(
- allTestsFilter,
- []testing.InternalTest{{
- Name: "TestSuiteRequireTwice",
- F: func(t *testing.T) {
- suite := new(SuiteRequireTwice)
- Run(t, suite)
- },
- }},
- )
- assert.Equal(t, false, ok)
-}
-
-func (s *SuiteRequireTwice) TestRequireOne() {
- r := s.Require()
- r.Equal(1, 2)
-}
-
-func (s *SuiteRequireTwice) TestRequireTwo() {
- r := s.Require()
- r.Equal(1, 2)
-}
-
-// This suite is intended to store values to make sure that only
-// testing-suite-related methods are run. It's also a fully
-// functional example of a testing suite, using setup/teardown methods
-// and a helper method that is ignored by testify. To make this look
-// more like a real world example, all tests in the suite perform some
-// type of assertion.
-type SuiteTester struct {
- // Include our basic suite logic.
- Suite
-
- // Keep counts of how many times each method is run.
- SetupSuiteRunCount int
- TearDownSuiteRunCount int
- SetupTestRunCount int
- TearDownTestRunCount int
- TestOneRunCount int
- TestTwoRunCount int
- NonTestMethodRunCount int
-
- SuiteNameBefore []string
- TestNameBefore []string
-
- SuiteNameAfter []string
- TestNameAfter []string
-
- TimeBefore []time.Time
- TimeAfter []time.Time
-}
-
-type SuiteSkipTester struct {
- // Include our basic suite logic.
- Suite
-
- // Keep counts of how many times each method is run.
- SetupSuiteRunCount int
- TearDownSuiteRunCount int
-}
-
-// The SetupSuite method will be run by testify once, at the very
-// start of the testing suite, before any tests are run.
-func (suite *SuiteTester) SetupSuite() {
- suite.SetupSuiteRunCount++
-}
-
-func (suite *SuiteTester) BeforeTest(suiteName, testName string) {
- suite.SuiteNameBefore = append(suite.SuiteNameBefore, suiteName)
- suite.TestNameBefore = append(suite.TestNameBefore, testName)
- suite.TimeBefore = append(suite.TimeBefore, time.Now())
-}
-
-func (suite *SuiteTester) AfterTest(suiteName, testName string) {
- suite.SuiteNameAfter = append(suite.SuiteNameAfter, suiteName)
- suite.TestNameAfter = append(suite.TestNameAfter, testName)
- suite.TimeAfter = append(suite.TimeAfter, time.Now())
-}
-
-func (suite *SuiteSkipTester) SetupSuite() {
- suite.SetupSuiteRunCount++
- suite.T().Skip()
-}
-
-// The TearDownSuite method will be run by testify once, at the very
-// end of the testing suite, after all tests have been run.
-func (suite *SuiteTester) TearDownSuite() {
- suite.TearDownSuiteRunCount++
-}
-
-func (suite *SuiteSkipTester) TearDownSuite() {
- suite.TearDownSuiteRunCount++
-}
-
-// The SetupTest method will be run before every test in the suite.
-func (suite *SuiteTester) SetupTest() {
- suite.SetupTestRunCount++
-}
-
-// The TearDownTest method will be run after every test in the suite.
-func (suite *SuiteTester) TearDownTest() {
- suite.TearDownTestRunCount++
-}
-
-// Every method in a testing suite that begins with "Test" will be run
-// as a test. TestOne is an example of a test. For the purposes of
-// this example, we've included assertions in the tests, since most
-// tests will issue assertions.
-func (suite *SuiteTester) TestOne() {
- beforeCount := suite.TestOneRunCount
- suite.TestOneRunCount++
- assert.Equal(suite.T(), suite.TestOneRunCount, beforeCount+1)
- suite.Equal(suite.TestOneRunCount, beforeCount+1)
-}
-
-// TestTwo is another example of a test.
-func (suite *SuiteTester) TestTwo() {
- beforeCount := suite.TestTwoRunCount
- suite.TestTwoRunCount++
- assert.NotEqual(suite.T(), suite.TestTwoRunCount, beforeCount)
- suite.NotEqual(suite.TestTwoRunCount, beforeCount)
-}
-
-func (suite *SuiteTester) TestSkip() {
- suite.T().Skip()
-}
-
-// NonTestMethod does not begin with "Test", so it will not be run by
-// testify as a test in the suite. This is useful for creating helper
-// methods for your tests.
-func (suite *SuiteTester) NonTestMethod() {
- suite.NonTestMethodRunCount++
-}
-
-// TestRunSuite will be run by the 'go test' command, so within it, we
-// can run our suite using the Run(*testing.T, TestingSuite) function.
-func TestRunSuite(t *testing.T) {
- suiteTester := new(SuiteTester)
- Run(t, suiteTester)
-
- // Normally, the test would end here. The following are simply
- // some assertions to ensure that the Run function is working as
- // intended - they are not part of the example.
-
- // The suite was only run once, so the SetupSuite and TearDownSuite
- // methods should have each been run only once.
- assert.Equal(t, suiteTester.SetupSuiteRunCount, 1)
- assert.Equal(t, suiteTester.TearDownSuiteRunCount, 1)
-
- assert.Equal(t, len(suiteTester.SuiteNameAfter), 3)
- assert.Equal(t, len(suiteTester.SuiteNameBefore), 3)
- assert.Equal(t, len(suiteTester.TestNameAfter), 3)
- assert.Equal(t, len(suiteTester.TestNameBefore), 3)
-
- assert.Contains(t, suiteTester.TestNameAfter, "TestOne")
- assert.Contains(t, suiteTester.TestNameAfter, "TestTwo")
- assert.Contains(t, suiteTester.TestNameAfter, "TestSkip")
-
- assert.Contains(t, suiteTester.TestNameBefore, "TestOne")
- assert.Contains(t, suiteTester.TestNameBefore, "TestTwo")
- assert.Contains(t, suiteTester.TestNameBefore, "TestSkip")
-
- for _, suiteName := range suiteTester.SuiteNameAfter {
- assert.Equal(t, "SuiteTester", suiteName)
- }
-
- for _, suiteName := range suiteTester.SuiteNameBefore {
- assert.Equal(t, "SuiteTester", suiteName)
- }
-
- for _, when := range suiteTester.TimeAfter {
- assert.False(t, when.IsZero())
- }
-
- for _, when := range suiteTester.TimeBefore {
- assert.False(t, when.IsZero())
- }
-
- // There are three test methods (TestOne, TestTwo, and TestSkip), so
- // the SetupTest and TearDownTest methods (which should be run once for
- // each test) should have been run three times.
- assert.Equal(t, suiteTester.SetupTestRunCount, 3)
- assert.Equal(t, suiteTester.TearDownTestRunCount, 3)
-
- // Each test should have been run once.
- assert.Equal(t, suiteTester.TestOneRunCount, 1)
- assert.Equal(t, suiteTester.TestTwoRunCount, 1)
-
- // Methods that don't match the test method identifier shouldn't
- // have been run at all.
- assert.Equal(t, suiteTester.NonTestMethodRunCount, 0)
-
- suiteSkipTester := new(SuiteSkipTester)
- Run(t, suiteSkipTester)
-
- // The suite was only run once, so the SetupSuite and TearDownSuite
- // methods should have each been run only once, even though SetupSuite
- // called Skip()
- assert.Equal(t, suiteSkipTester.SetupSuiteRunCount, 1)
- assert.Equal(t, suiteSkipTester.TearDownSuiteRunCount, 1)
-
-}
-
-func TestSuiteGetters(t *testing.T) {
- suite := new(SuiteTester)
- suite.SetT(t)
- assert.NotNil(t, suite.Assert())
- assert.Equal(t, suite.Assertions, suite.Assert())
- assert.NotNil(t, suite.Require())
- assert.Equal(t, suite.require, suite.Require())
-}
-
-type SuiteLoggingTester struct {
- Suite
-}
-
-func (s *SuiteLoggingTester) TestLoggingPass() {
- s.T().Log("TESTLOGPASS")
-}
-
-func (s *SuiteLoggingTester) TestLoggingFail() {
- s.T().Log("TESTLOGFAIL")
- assert.NotNil(s.T(), nil) // expected to fail
-}
-
-type StdoutCapture struct {
- oldStdout *os.File
- readPipe *os.File
-}
-
-func (sc *StdoutCapture) StartCapture() {
- sc.oldStdout = os.Stdout
- sc.readPipe, os.Stdout, _ = os.Pipe()
-}
-
-func (sc *StdoutCapture) StopCapture() (string, error) {
- if sc.oldStdout == nil || sc.readPipe == nil {
- return "", errors.New("StartCapture not called before StopCapture")
- }
- os.Stdout.Close()
- os.Stdout = sc.oldStdout
- bytes, err := ioutil.ReadAll(sc.readPipe)
- if err != nil {
- return "", err
- }
- return string(bytes), nil
-}
-
-func TestSuiteLogging(t *testing.T) {
- suiteLoggingTester := new(SuiteLoggingTester)
- capture := StdoutCapture{}
- internalTest := testing.InternalTest{
- Name: "SomeTest",
- F: func(subT *testing.T) {
- Run(subT, suiteLoggingTester)
- },
- }
- capture.StartCapture()
- testing.RunTests(allTestsFilter, []testing.InternalTest{internalTest})
- output, err := capture.StopCapture()
- require.NoError(t, err, "Got an error trying to capture stdout and stderr!")
- require.NotEmpty(t, output, "output content must not be empty")
-
- // Failed tests' output is always printed
- assert.Contains(t, output, "TESTLOGFAIL")
-
- if testing.Verbose() {
- // In verbose mode, output from successful tests is also printed
- assert.Contains(t, output, "TESTLOGPASS")
- } else {
- assert.NotContains(t, output, "TESTLOGPASS")
- }
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE
deleted file mode 100644
index c83641619..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-ISC License
-
-Copyright (c) 2012-2016 Dave Collins <dave@davec.name>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypass.go
deleted file mode 100644
index 8a4a6589a..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine, compiled by GopherJS, and
-// "-tags safe" is not added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build !js,!appengine,!safe,!disableunsafe
-
-package spew
-
-import (
- "reflect"
- "unsafe"
-)
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = false
-
- // ptrSize is the size of a pointer on the current arch.
- ptrSize = unsafe.Sizeof((*byte)(nil))
-)
-
-var (
- // offsetPtr, offsetScalar, and offsetFlag are the offsets for the
- // internal reflect.Value fields. These values are valid before golang
- // commit ecccf07e7f9d which changed the format. The are also valid
- // after commit 82f48826c6c7 which changed the format again to mirror
- // the original format. Code in the init function updates these offsets
- // as necessary.
- offsetPtr = uintptr(ptrSize)
- offsetScalar = uintptr(0)
- offsetFlag = uintptr(ptrSize * 2)
-
- // flagKindWidth and flagKindShift indicate various bits that the
- // reflect package uses internally to track kind information.
- //
- // flagRO indicates whether or not the value field of a reflect.Value is
- // read-only.
- //
- // flagIndir indicates whether the value field of a reflect.Value is
- // the actual data or a pointer to the data.
- //
- // These values are valid before golang commit 90a7c3c86944 which
- // changed their positions. Code in the init function updates these
- // flags as necessary.
- flagKindWidth = uintptr(5)
- flagKindShift = uintptr(flagKindWidth - 1)
- flagRO = uintptr(1 << 0)
- flagIndir = uintptr(1 << 1)
-)
-
-func init() {
- // Older versions of reflect.Value stored small integers directly in the
- // ptr field (which is named val in the older versions). Versions
- // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named
- // scalar for this purpose which unfortunately came before the flag
- // field, so the offset of the flag field is different for those
- // versions.
- //
- // This code constructs a new reflect.Value from a known small integer
- // and checks if the size of the reflect.Value struct indicates it has
- // the scalar field. When it does, the offsets are updated accordingly.
- vv := reflect.ValueOf(0xf00)
- if unsafe.Sizeof(vv) == (ptrSize * 4) {
- offsetScalar = ptrSize * 2
- offsetFlag = ptrSize * 3
- }
-
- // Commit 90a7c3c86944 changed the flag positions such that the low
- // order bits are the kind. This code extracts the kind from the flags
- // field and ensures it's the correct type. When it's not, the flag
- // order has been changed to the newer format, so the flags are updated
- // accordingly.
- upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag)
- upfv := *(*uintptr)(upf)
- flagKindMask := uintptr((1<<flagKindWidth - 1) << flagKindShift)
- if (upfv&flagKindMask)>>flagKindShift != uintptr(reflect.Int) {
- flagKindShift = 0
- flagRO = 1 << 5
- flagIndir = 1 << 6
-
- // Commit adf9b30e5594 modified the flags to separate the
- // flagRO flag into two bits which specifies whether or not the
- // field is embedded. This causes flagIndir to move over a bit
- // and means that flagRO is the combination of either of the
- // original flagRO bit and the new bit.
- //
- // This code detects the change by extracting what used to be
- // the indirect bit to ensure it's set. When it's not, the flag
- // order has been changed to the newer format, so the flags are
- // updated accordingly.
- if upfv&flagIndir == 0 {
- flagRO = 3 << 5
- flagIndir = 1 << 7
- }
- }
-}
-
-// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
-// the typical safety restrictions preventing access to unaddressable and
-// unexported data. It works by digging the raw pointer to the underlying
-// value out of the protected value and generating a new unprotected (unsafe)
-// reflect.Value to it.
-//
-// This allows us to check for implementations of the Stringer and error
-// interfaces to be used for pretty printing ordinarily unaddressable and
-// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) (rv reflect.Value) {
- indirects := 1
- vt := v.Type()
- upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr)
- rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag))
- if rvf&flagIndir != 0 {
- vt = reflect.PtrTo(v.Type())
- indirects++
- } else if offsetScalar != 0 {
- // The value is in the scalar field when it's not one of the
- // reference types.
- switch vt.Kind() {
- case reflect.Uintptr:
- case reflect.Chan:
- case reflect.Func:
- case reflect.Map:
- case reflect.Ptr:
- case reflect.UnsafePointer:
- default:
- upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) +
- offsetScalar)
- }
- }
-
- pv := reflect.NewAt(vt, upv)
- rv = pv
- for i := 0; i < indirects; i++ {
- rv = rv.Elem()
- }
- return rv
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
deleted file mode 100644
index 1fe3cf3d5..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is running on Google App Engine, compiled by GopherJS, or
-// "-tags safe" is added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe
-
-package spew
-
-import "reflect"
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = true
-)
-
-// unsafeReflectValue typically converts the passed reflect.Value into a one
-// that bypasses the typical safety restrictions preventing access to
-// unaddressable and unexported data. However, doing this relies on access to
-// the unsafe package. This is a stub version which simply returns the passed
-// reflect.Value when the unsafe package is not available.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- return v
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/common.go
deleted file mode 100644
index 7c519ff47..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/common.go
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
-)
-
-// Some constants in the form of bytes to avoid string overhead. This mirrors
-// the technique used in the fmt package.
-var (
- panicBytes = []byte("(PANIC=")
- plusBytes = []byte("+")
- iBytes = []byte("i")
- trueBytes = []byte("true")
- falseBytes = []byte("false")
- interfaceBytes = []byte("(interface {})")
- commaNewlineBytes = []byte(",\n")
- newlineBytes = []byte("\n")
- openBraceBytes = []byte("{")
- openBraceNewlineBytes = []byte("{\n")
- closeBraceBytes = []byte("}")
- asteriskBytes = []byte("*")
- colonBytes = []byte(":")
- colonSpaceBytes = []byte(": ")
- openParenBytes = []byte("(")
- closeParenBytes = []byte(")")
- spaceBytes = []byte(" ")
- pointerChainBytes = []byte("->")
- nilAngleBytes = []byte("<nil>")
- maxNewlineBytes = []byte("<max depth reached>\n")
- maxShortBytes = []byte("<max>")
- circularBytes = []byte("<already shown>")
- circularShortBytes = []byte("<shown>")
- invalidAngleBytes = []byte("<invalid>")
- openBracketBytes = []byte("[")
- closeBracketBytes = []byte("]")
- percentBytes = []byte("%")
- precisionBytes = []byte(".")
- openAngleBytes = []byte("<")
- closeAngleBytes = []byte(">")
- openMapBytes = []byte("map[")
- closeMapBytes = []byte("]")
- lenEqualsBytes = []byte("len=")
- capEqualsBytes = []byte("cap=")
-)
-
-// hexDigits is used to map a decimal value to a hex digit.
-var hexDigits = "0123456789abcdef"
-
-// catchPanic handles any panics that might occur during the handleMethods
-// calls.
-func catchPanic(w io.Writer, v reflect.Value) {
- if err := recover(); err != nil {
- w.Write(panicBytes)
- fmt.Fprintf(w, "%v", err)
- w.Write(closeParenBytes)
- }
-}
-
-// handleMethods attempts to call the Error and String methods on the underlying
-// type the passed reflect.Value represents and outputes the result to Writer w.
-//
-// It handles panics in any called methods by catching and displaying the error
-// as the formatted value.
-func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) {
- // We need an interface to check if the type implements the error or
- // Stringer interface. However, the reflect package won't give us an
- // interface on certain things like unexported struct fields in order
- // to enforce visibility rules. We use unsafe, when it's available,
- // to bypass these restrictions since this package does not mutate the
- // values.
- if !v.CanInterface() {
- if UnsafeDisabled {
- return false
- }
-
- v = unsafeReflectValue(v)
- }
-
- // Choose whether or not to do error and Stringer interface lookups against
- // the base type or a pointer to the base type depending on settings.
- // Technically calling one of these methods with a pointer receiver can
- // mutate the value, however, types which choose to satisify an error or
- // Stringer interface with a pointer receiver should not be mutating their
- // state inside these interface methods.
- if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() {
- v = unsafeReflectValue(v)
- }
- if v.CanAddr() {
- v = v.Addr()
- }
-
- // Is it an error or Stringer?
- switch iface := v.Interface().(type) {
- case error:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.Error()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
-
- w.Write([]byte(iface.Error()))
- return true
-
- case fmt.Stringer:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.String()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
- w.Write([]byte(iface.String()))
- return true
- }
- return false
-}
-
-// printBool outputs a boolean value as true or false to Writer w.
-func printBool(w io.Writer, val bool) {
- if val {
- w.Write(trueBytes)
- } else {
- w.Write(falseBytes)
- }
-}
-
-// printInt outputs a signed integer value to Writer w.
-func printInt(w io.Writer, val int64, base int) {
- w.Write([]byte(strconv.FormatInt(val, base)))
-}
-
-// printUint outputs an unsigned integer value to Writer w.
-func printUint(w io.Writer, val uint64, base int) {
- w.Write([]byte(strconv.FormatUint(val, base)))
-}
-
-// printFloat outputs a floating point value using the specified precision,
-// which is expected to be 32 or 64bit, to Writer w.
-func printFloat(w io.Writer, val float64, precision int) {
- w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))
-}
-
-// printComplex outputs a complex value using the specified float precision
-// for the real and imaginary parts to Writer w.
-func printComplex(w io.Writer, c complex128, floatPrecision int) {
- r := real(c)
- w.Write(openParenBytes)
- w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision)))
- i := imag(c)
- if i >= 0 {
- w.Write(plusBytes)
- }
- w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision)))
- w.Write(iBytes)
- w.Write(closeParenBytes)
-}
-
-// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x'
-// prefix to Writer w.
-func printHexPtr(w io.Writer, p uintptr) {
- // Null pointer.
- num := uint64(p)
- if num == 0 {
- w.Write(nilAngleBytes)
- return
- }
-
- // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix
- buf := make([]byte, 18)
-
- // It's simpler to construct the hex string right to left.
- base := uint64(16)
- i := len(buf) - 1
- for num >= base {
- buf[i] = hexDigits[num%base]
- num /= base
- i--
- }
- buf[i] = hexDigits[num]
-
- // Add '0x' prefix.
- i--
- buf[i] = 'x'
- i--
- buf[i] = '0'
-
- // Strip unused leading bytes.
- buf = buf[i:]
- w.Write(buf)
-}
-
-// valuesSorter implements sort.Interface to allow a slice of reflect.Value
-// elements to be sorted.
-type valuesSorter struct {
- values []reflect.Value
- strings []string // either nil or same len and values
- cs *ConfigState
-}
-
-// newValuesSorter initializes a valuesSorter instance, which holds a set of
-// surrogate keys on which the data should be sorted. It uses flags in
-// ConfigState to decide if and how to populate those surrogate keys.
-func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface {
- vs := &valuesSorter{values: values, cs: cs}
- if canSortSimply(vs.values[0].Kind()) {
- return vs
- }
- if !cs.DisableMethods {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- b := bytes.Buffer{}
- if !handleMethods(cs, &b, vs.values[i]) {
- vs.strings = nil
- break
- }
- vs.strings[i] = b.String()
- }
- }
- if vs.strings == nil && cs.SpewKeys {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- vs.strings[i] = Sprintf("%#v", vs.values[i].Interface())
- }
- }
- return vs
-}
-
-// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted
-// directly, or whether it should be considered for sorting by surrogate keys
-// (if the ConfigState allows it).
-func canSortSimply(kind reflect.Kind) bool {
- // This switch parallels valueSortLess, except for the default case.
- switch kind {
- case reflect.Bool:
- return true
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return true
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return true
- case reflect.Float32, reflect.Float64:
- return true
- case reflect.String:
- return true
- case reflect.Uintptr:
- return true
- case reflect.Array:
- return true
- }
- return false
-}
-
-// Len returns the number of values in the slice. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Len() int {
- return len(s.values)
-}
-
-// Swap swaps the values at the passed indices. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Swap(i, j int) {
- s.values[i], s.values[j] = s.values[j], s.values[i]
- if s.strings != nil {
- s.strings[i], s.strings[j] = s.strings[j], s.strings[i]
- }
-}
-
-// valueSortLess returns whether the first value should sort before the second
-// value. It is used by valueSorter.Less as part of the sort.Interface
-// implementation.
-func valueSortLess(a, b reflect.Value) bool {
- switch a.Kind() {
- case reflect.Bool:
- return !a.Bool() && b.Bool()
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return a.Int() < b.Int()
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return a.Uint() < b.Uint()
- case reflect.Float32, reflect.Float64:
- return a.Float() < b.Float()
- case reflect.String:
- return a.String() < b.String()
- case reflect.Uintptr:
- return a.Uint() < b.Uint()
- case reflect.Array:
- // Compare the contents of both arrays.
- l := a.Len()
- for i := 0; i < l; i++ {
- av := a.Index(i)
- bv := b.Index(i)
- if av.Interface() == bv.Interface() {
- continue
- }
- return valueSortLess(av, bv)
- }
- }
- return a.String() < b.String()
-}
-
-// Less returns whether the value at index i should sort before the
-// value at index j. It is part of the sort.Interface implementation.
-func (s *valuesSorter) Less(i, j int) bool {
- if s.strings == nil {
- return valueSortLess(s.values[i], s.values[j])
- }
- return s.strings[i] < s.strings[j]
-}
-
-// sortValues is a sort function that handles both native types and any type that
-// can be converted to error or Stringer. Other inputs are sorted according to
-// their Value.String() value to ensure display stability.
-func sortValues(values []reflect.Value, cs *ConfigState) {
- if len(values) == 0 {
- return
- }
- sort.Sort(newValuesSorter(values, cs))
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/config.go
deleted file mode 100644
index 2e3d22f31..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/config.go
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
-)
-
-// ConfigState houses the configuration options used by spew to format and
-// display values. There is a global instance, Config, that is used to control
-// all top-level Formatter and Dump functionality. Each ConfigState instance
-// provides methods equivalent to the top-level functions.
-//
-// The zero value for ConfigState provides no indentation. You would typically
-// want to set it to a space or a tab.
-//
-// Alternatively, you can use NewDefaultConfig to get a ConfigState instance
-// with default settings. See the documentation of NewDefaultConfig for default
-// values.
-type ConfigState struct {
- // Indent specifies the string to use for each indentation level. The
- // global config instance that all top-level functions use set this to a
- // single space by default. If you would like more indentation, you might
- // set this to a tab with "\t" or perhaps two spaces with " ".
- Indent string
-
- // MaxDepth controls the maximum number of levels to descend into nested
- // data structures. The default, 0, means there is no limit.
- //
- // NOTE: Circular data structures are properly detected, so it is not
- // necessary to set this value unless you specifically want to limit deeply
- // nested data structures.
- MaxDepth int
-
- // DisableMethods specifies whether or not error and Stringer interfaces are
- // invoked for types that implement them.
- DisableMethods bool
-
- // DisablePointerMethods specifies whether or not to check for and invoke
- // error and Stringer interfaces on types which only accept a pointer
- // receiver when the current type is not a pointer.
- //
- // NOTE: This might be an unsafe action since calling one of these methods
- // with a pointer receiver could technically mutate the value, however,
- // in practice, types which choose to satisify an error or Stringer
- // interface with a pointer receiver should not be mutating their state
- // inside these interface methods. As a result, this option relies on
- // access to the unsafe package, so it will not have any effect when
- // running in environments without access to the unsafe package such as
- // Google App Engine or with the "safe" build tag specified.
- DisablePointerMethods bool
-
- // DisablePointerAddresses specifies whether to disable the printing of
- // pointer addresses. This is useful when diffing data structures in tests.
- DisablePointerAddresses bool
-
- // DisableCapacities specifies whether to disable the printing of capacities
- // for arrays, slices, maps and channels. This is useful when diffing
- // data structures in tests.
- DisableCapacities bool
-
- // ContinueOnMethod specifies whether or not recursion should continue once
- // a custom error or Stringer interface is invoked. The default, false,
- // means it will print the results of invoking the custom error or Stringer
- // interface and return immediately instead of continuing to recurse into
- // the internals of the data type.
- //
- // NOTE: This flag does not have any effect if method invocation is disabled
- // via the DisableMethods or DisablePointerMethods options.
- ContinueOnMethod bool
-
- // SortKeys specifies map keys should be sorted before being printed. Use
- // this to have a more deterministic, diffable output. Note that only
- // native types (bool, int, uint, floats, uintptr and string) and types
- // that support the error or Stringer interfaces (if methods are
- // enabled) are supported, with other types sorted according to the
- // reflect.Value.String() output which guarantees display stability.
- SortKeys bool
-
- // SpewKeys specifies that, as a last resort attempt, map keys should
- // be spewed to strings and sorted by those strings. This is only
- // considered if SortKeys is true.
- SpewKeys bool
-}
-
-// Config is the active configuration of the top-level functions.
-// The configuration can be changed by modifying the contents of spew.Config.
-var Config = ConfigState{Indent: " "}
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the formatted string as a value that satisfies error. See NewFormatter
-// for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, c.convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, c.convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, c.convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a Formatter interface returned by c.NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, c.convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Print(a ...interface{}) (n int, err error) {
- return fmt.Print(c.convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, c.convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Println(a ...interface{}) (n int, err error) {
- return fmt.Println(c.convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprint(a ...interface{}) string {
- return fmt.Sprint(c.convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, c.convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a Formatter interface returned by c.NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintln(a ...interface{}) string {
- return fmt.Sprintln(c.convertArgs(a)...)
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-c.Printf, c.Println, or c.Printf.
-*/
-func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(c, v)
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {
- fdump(c, w, a...)
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by modifying the public members
-of c. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func (c *ConfigState) Dump(a ...interface{}) {
- fdump(c, os.Stdout, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func (c *ConfigState) Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(c, &buf, a...)
- return buf.String()
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a spew Formatter interface using
-// the ConfigState associated with s.
-func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = newFormatter(c, arg)
- }
- return formatters
-}
-
-// NewDefaultConfig returns a ConfigState with the following default settings.
-//
-// Indent: " "
-// MaxDepth: 0
-// DisableMethods: false
-// DisablePointerMethods: false
-// ContinueOnMethod: false
-// SortKeys: false
-func NewDefaultConfig() *ConfigState {
- return &ConfigState{Indent: " "}
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/doc.go
deleted file mode 100644
index aacaac6f1..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Package spew implements a deep pretty printer for Go data structures to aid in
-debugging.
-
-A quick overview of the additional features spew provides over the built-in
-printing facilities for Go data types are as follows:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output (only when using
- Dump style)
-
-There are two different approaches spew allows for dumping Go data structures:
-
- * Dump style which prints with newlines, customizable indentation,
- and additional debug information such as types and all pointer addresses
- used to indirect to the final value
- * A custom Formatter interface that integrates cleanly with the standard fmt
- package and replaces %v, %+v, %#v, and %#+v to provide inline printing
- similar to the default %v while providing the additional functionality
- outlined above and passing unsupported format verbs such as %x and %q
- along to fmt
-
-Quick Start
-
-This section demonstrates how to quickly get started with spew. See the
-sections below for further details on formatting and configuration options.
-
-To dump a variable with full newlines, indentation, type, and pointer
-information use Dump, Fdump, or Sdump:
- spew.Dump(myVar1, myVar2, ...)
- spew.Fdump(someWriter, myVar1, myVar2, ...)
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Alternatively, if you would prefer to use format strings with a compacted inline
-printing style, use the convenience wrappers Printf, Fprintf, etc with
-%v (most compact), %+v (adds pointer addresses), %#v (adds types), or
-%#+v (adds types and pointer addresses):
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-Configuration Options
-
-Configuration of spew is handled by fields in the ConfigState type. For
-convenience, all of the top-level functions use a global state available
-via the spew.Config global.
-
-It is also possible to create a ConfigState instance that provides methods
-equivalent to the top-level functions. This allows concurrent configuration
-options. See the ConfigState documentation for more details.
-
-The following configuration options are available:
- * Indent
- String to use for each indentation level for Dump functions.
- It is a single space by default. A popular alternative is "\t".
-
- * MaxDepth
- Maximum number of levels to descend into nested data structures.
- There is no limit by default.
-
- * DisableMethods
- Disables invocation of error and Stringer interface methods.
- Method invocation is enabled by default.
-
- * DisablePointerMethods
- Disables invocation of error and Stringer interface methods on types
- which only accept pointer receivers from non-pointer variables.
- Pointer method invocation is enabled by default.
-
- * DisablePointerAddresses
- DisablePointerAddresses specifies whether to disable the printing of
- pointer addresses. This is useful when diffing data structures in tests.
-
- * DisableCapacities
- DisableCapacities specifies whether to disable the printing of
- capacities for arrays, slices, maps and channels. This is useful when
- diffing data structures in tests.
-
- * ContinueOnMethod
- Enables recursion into types after invoking error and Stringer interface
- methods. Recursion after method invocation is disabled by default.
-
- * SortKeys
- Specifies map keys should be sorted before being printed. Use
- this to have a more deterministic, diffable output. Note that
- only native types (bool, int, uint, floats, uintptr and string)
- and types which implement error or Stringer interfaces are
- supported with other types sorted according to the
- reflect.Value.String() output which guarantees display
- stability. Natural map order is used by default.
-
- * SpewKeys
- Specifies that, as a last resort attempt, map keys should be
- spewed to strings and sorted by those strings. This is only
- considered if SortKeys is true.
-
-Dump Usage
-
-Simply call spew.Dump with a list of variables you want to dump:
-
- spew.Dump(myVar1, myVar2, ...)
-
-You may also call spew.Fdump if you would prefer to output to an arbitrary
-io.Writer. For example, to dump to standard error:
-
- spew.Fdump(os.Stderr, myVar1, myVar2, ...)
-
-A third option is to call spew.Sdump to get the formatted output as a string:
-
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Sample Dump Output
-
-See the Dump example for details on the setup of the types and variables being
-shown here.
-
- (main.Foo) {
- unexportedField: (*main.Bar)(0xf84002e210)({
- flag: (main.Flag) flagTwo,
- data: (uintptr) <nil>
- }),
- ExportedField: (map[interface {}]interface {}) (len=1) {
- (string) (len=3) "one": (bool) true
- }
- }
-
-Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C
-command as shown.
- ([]uint8) (len=32 cap=32) {
- 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- 00000020 31 32 |12|
- }
-
-Custom Formatter
-
-Spew provides a custom formatter that implements the fmt.Formatter interface
-so that it integrates cleanly with standard fmt package printing functions. The
-formatter is useful for inline printing of smaller data types similar to the
-standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Custom Formatter Usage
-
-The simplest way to make use of the spew custom formatter is to call one of the
-convenience functions such as spew.Printf, spew.Println, or spew.Printf. The
-functions have syntax you are most likely already familiar with:
-
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Println(myVar, myVar2)
- spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-See the Index for the full list convenience functions.
-
-Sample Formatter Output
-
-Double pointer to a uint8:
- %v: <**>5
- %+v: <**>(0xf8400420d0->0xf8400420c8)5
- %#v: (**uint8)5
- %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
-
-Pointer to circular struct with a uint8 field and a pointer to itself:
- %v: <*>{1 <*><shown>}
- %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}
- %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}
- %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}
-
-See the Printf example for details on the setup of variables being shown
-here.
-
-Errors
-
-Since it is possible for custom Stringer/error interfaces to panic, spew
-detects them and handles them internally by printing the panic information
-inline with the output. Since spew is intended to provide deep pretty printing
-capabilities on structures, it intentionally does not return any errors.
-*/
-package spew
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/dump.go
deleted file mode 100644
index df1d582a7..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "io"
- "os"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-)
-
-var (
- // uint8Type is a reflect.Type representing a uint8. It is used to
- // convert cgo types to uint8 slices for hexdumping.
- uint8Type = reflect.TypeOf(uint8(0))
-
- // cCharRE is a regular expression that matches a cgo char.
- // It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile("^.*\\._Ctype_char$")
-
- // cUnsignedCharRE is a regular expression that matches a cgo unsigned
- // char. It is used to detect unsigned character arrays to hexdump
- // them.
- cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$")
-
- // cUint8tCharRE is a regular expression that matches a cgo uint8_t.
- // It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$")
-)
-
-// dumpState contains information about the state of a dump operation.
-type dumpState struct {
- w io.Writer
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- ignoreNextIndent bool
- cs *ConfigState
-}
-
-// indent performs indentation according to the depth level and cs.Indent
-// option.
-func (d *dumpState) indent() {
- if d.ignoreNextIndent {
- d.ignoreNextIndent = false
- return
- }
- d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth))
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (d *dumpState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface && !v.IsNil() {
- v = v.Elem()
- }
- return v
-}
-
-// dumpPtr handles formatting of pointers by indirecting them as necessary.
-func (d *dumpState) dumpPtr(v reflect.Value) {
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range d.pointers {
- if depth >= d.depth {
- delete(d.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by dereferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := d.pointers[addr]; ok && pd < d.depth {
- cycleFound = true
- indirects--
- break
- }
- d.pointers[addr] = d.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type information.
- d.w.Write(openParenBytes)
- d.w.Write(bytes.Repeat(asteriskBytes, indirects))
- d.w.Write([]byte(ve.Type().String()))
- d.w.Write(closeParenBytes)
-
- // Display pointer information.
- if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
- d.w.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- d.w.Write(pointerChainBytes)
- }
- printHexPtr(d.w, addr)
- }
- d.w.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- d.w.Write(openParenBytes)
- switch {
- case nilFound == true:
- d.w.Write(nilAngleBytes)
-
- case cycleFound == true:
- d.w.Write(circularBytes)
-
- default:
- d.ignoreNextType = true
- d.dump(ve)
- }
- d.w.Write(closeParenBytes)
-}
-
-// dumpSlice handles formatting of arrays and slices. Byte (uint8 under
-// reflection) arrays and slices are dumped in hexdump -C fashion.
-func (d *dumpState) dumpSlice(v reflect.Value) {
- // Determine whether this type should be hex dumped or not. Also,
- // for types which should be hexdumped, try to use the underlying data
- // first, then fall back to trying to convert them to a uint8 slice.
- var buf []uint8
- doConvert := false
- doHexDump := false
- numEntries := v.Len()
- if numEntries > 0 {
- vt := v.Index(0).Type()
- vts := vt.String()
- switch {
- // C types that need to be converted.
- case cCharRE.MatchString(vts):
- fallthrough
- case cUnsignedCharRE.MatchString(vts):
- fallthrough
- case cUint8tCharRE.MatchString(vts):
- doConvert = true
-
- // Try to use existing uint8 slices and fall back to converting
- // and copying if that fails.
- case vt.Kind() == reflect.Uint8:
- // We need an addressable interface to convert the type
- // to a byte slice. However, the reflect package won't
- // give us an interface on certain things like
- // unexported struct fields in order to enforce
- // visibility rules. We use unsafe, when available, to
- // bypass these restrictions since this package does not
- // mutate the values.
- vs := v
- if !vs.CanInterface() || !vs.CanAddr() {
- vs = unsafeReflectValue(vs)
- }
- if !UnsafeDisabled {
- vs = vs.Slice(0, numEntries)
-
- // Use the existing uint8 slice if it can be
- // type asserted.
- iface := vs.Interface()
- if slice, ok := iface.([]uint8); ok {
- buf = slice
- doHexDump = true
- break
- }
- }
-
- // The underlying data needs to be converted if it can't
- // be type asserted to a uint8 slice.
- doConvert = true
- }
-
- // Copy and convert the underlying type if needed.
- if doConvert && vt.ConvertibleTo(uint8Type) {
- // Convert and copy each element into a uint8 byte
- // slice.
- buf = make([]uint8, numEntries)
- for i := 0; i < numEntries; i++ {
- vv := v.Index(i)
- buf[i] = uint8(vv.Convert(uint8Type).Uint())
- }
- doHexDump = true
- }
- }
-
- // Hexdump the entire slice as needed.
- if doHexDump {
- indent := strings.Repeat(d.cs.Indent, d.depth)
- str := indent + hex.Dump(buf)
- str = strings.Replace(str, "\n", "\n"+indent, -1)
- str = strings.TrimRight(str, d.cs.Indent)
- d.w.Write([]byte(str))
- return
- }
-
- // Recursively call dump for each item.
- for i := 0; i < numEntries; i++ {
- d.dump(d.unpackValue(v.Index(i)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
-}
-
-// dump is the main workhorse for dumping a value. It uses the passed reflect
-// value to figure out what kind of object we are dealing with and formats it
-// appropriately. It is a recursive function, however circular data structures
-// are detected and handled properly.
-func (d *dumpState) dump(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- d.w.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- d.indent()
- d.dumpPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !d.ignoreNextType {
- d.indent()
- d.w.Write(openParenBytes)
- d.w.Write([]byte(v.Type().String()))
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
- d.ignoreNextType = false
-
- // Display length and capacity if the built-in len and cap functions
- // work with the value's kind and the len/cap itself is non-zero.
- valueLen, valueCap := 0, 0
- switch v.Kind() {
- case reflect.Array, reflect.Slice, reflect.Chan:
- valueLen, valueCap = v.Len(), v.Cap()
- case reflect.Map, reflect.String:
- valueLen = v.Len()
- }
- if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
- d.w.Write(openParenBytes)
- if valueLen != 0 {
- d.w.Write(lenEqualsBytes)
- printInt(d.w, int64(valueLen), 10)
- }
- if !d.cs.DisableCapacities && valueCap != 0 {
- if valueLen != 0 {
- d.w.Write(spaceBytes)
- }
- d.w.Write(capEqualsBytes)
- printInt(d.w, int64(valueCap), 10)
- }
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
-
- // Call Stringer/error interfaces if they exist and the handle methods flag
- // is enabled
- if !d.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(d.cs, d.w, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(d.w, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(d.w, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(d.w, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(d.w, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(d.w, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(d.w, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(d.w, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- d.dumpSlice(v)
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.String:
- d.w.Write([]byte(strconv.Quote(v.String())))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
-
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- numEntries := v.Len()
- keys := v.MapKeys()
- if d.cs.SortKeys {
- sortValues(keys, d.cs)
- }
- for i, key := range keys {
- d.dump(d.unpackValue(key))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.MapIndex(key)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Struct:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- vt := v.Type()
- numFields := v.NumField()
- for i := 0; i < numFields; i++ {
- d.indent()
- vtf := vt.Field(i)
- d.w.Write([]byte(vtf.Name))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.Field(i)))
- if i < (numFields - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(d.w, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(d.w, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it in case any new
- // types are added.
- default:
- if v.CanInterface() {
- fmt.Fprintf(d.w, "%v", v.Interface())
- } else {
- fmt.Fprintf(d.w, "%v", v.String())
- }
- }
-}
-
-// fdump is a helper function to consolidate the logic from the various public
-// methods which take varying writers and config states.
-func fdump(cs *ConfigState, w io.Writer, a ...interface{}) {
- for _, arg := range a {
- if arg == nil {
- w.Write(interfaceBytes)
- w.Write(spaceBytes)
- w.Write(nilAngleBytes)
- w.Write(newlineBytes)
- continue
- }
-
- d := dumpState{w: w, cs: cs}
- d.pointers = make(map[uintptr]int)
- d.dump(reflect.ValueOf(arg))
- d.w.Write(newlineBytes)
- }
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func Fdump(w io.Writer, a ...interface{}) {
- fdump(&Config, w, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(&Config, &buf, a...)
- return buf.String()
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by an exported package global,
-spew.Config. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func Dump(a ...interface{}) {
- fdump(&Config, os.Stdout, a...)
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/format.go
deleted file mode 100644
index c49875bac..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/format.go
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-)
-
-// supportedFlags is a list of all the character flags supported by fmt package.
-const supportedFlags = "0-+# "
-
-// formatState implements the fmt.Formatter interface and contains information
-// about the state of a formatting operation. The NewFormatter function can
-// be used to get a new Formatter which can be used directly as arguments
-// in standard fmt package printing calls.
-type formatState struct {
- value interface{}
- fs fmt.State
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- cs *ConfigState
-}
-
-// buildDefaultFormat recreates the original format string without precision
-// and width information to pass in to fmt.Sprintf in the case of an
-// unrecognized type. Unless new types are added to the language, this
-// function won't ever be called.
-func (f *formatState) buildDefaultFormat() (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- buf.WriteRune('v')
-
- format = buf.String()
- return format
-}
-
-// constructOrigFormat recreates the original format string including precision
-// and width information to pass along to the standard fmt package. This allows
-// automatic deferral of all format strings this package doesn't support.
-func (f *formatState) constructOrigFormat(verb rune) (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- if width, ok := f.fs.Width(); ok {
- buf.WriteString(strconv.Itoa(width))
- }
-
- if precision, ok := f.fs.Precision(); ok {
- buf.Write(precisionBytes)
- buf.WriteString(strconv.Itoa(precision))
- }
-
- buf.WriteRune(verb)
-
- format = buf.String()
- return format
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible and
-// ensures that types for values which have been unpacked from an interface
-// are displayed when the show types flag is also set.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (f *formatState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface {
- f.ignoreNextType = false
- if !v.IsNil() {
- v = v.Elem()
- }
- }
- return v
-}
-
-// formatPtr handles formatting of pointers by indirecting them as necessary.
-func (f *formatState) formatPtr(v reflect.Value) {
- // Display nil if top level pointer is nil.
- showTypes := f.fs.Flag('#')
- if v.IsNil() && (!showTypes || f.ignoreNextType) {
- f.fs.Write(nilAngleBytes)
- return
- }
-
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range f.pointers {
- if depth >= f.depth {
- delete(f.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to possibly show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by derferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := f.pointers[addr]; ok && pd < f.depth {
- cycleFound = true
- indirects--
- break
- }
- f.pointers[addr] = f.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type or indirection level depending on flags.
- if showTypes && !f.ignoreNextType {
- f.fs.Write(openParenBytes)
- f.fs.Write(bytes.Repeat(asteriskBytes, indirects))
- f.fs.Write([]byte(ve.Type().String()))
- f.fs.Write(closeParenBytes)
- } else {
- if nilFound || cycleFound {
- indirects += strings.Count(ve.Type().String(), "*")
- }
- f.fs.Write(openAngleBytes)
- f.fs.Write([]byte(strings.Repeat("*", indirects)))
- f.fs.Write(closeAngleBytes)
- }
-
- // Display pointer information depending on flags.
- if f.fs.Flag('+') && (len(pointerChain) > 0) {
- f.fs.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- f.fs.Write(pointerChainBytes)
- }
- printHexPtr(f.fs, addr)
- }
- f.fs.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- switch {
- case nilFound == true:
- f.fs.Write(nilAngleBytes)
-
- case cycleFound == true:
- f.fs.Write(circularShortBytes)
-
- default:
- f.ignoreNextType = true
- f.format(ve)
- }
-}
-
-// format is the main workhorse for providing the Formatter interface. It
-// uses the passed reflect value to figure out what kind of object we are
-// dealing with and formats it appropriately. It is a recursive function,
-// however circular data structures are detected and handled properly.
-func (f *formatState) format(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- f.fs.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- f.formatPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !f.ignoreNextType && f.fs.Flag('#') {
- f.fs.Write(openParenBytes)
- f.fs.Write([]byte(v.Type().String()))
- f.fs.Write(closeParenBytes)
- }
- f.ignoreNextType = false
-
- // Call Stringer/error interfaces if they exist and the handle methods
- // flag is enabled.
- if !f.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(f.cs, f.fs, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(f.fs, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(f.fs, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(f.fs, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(f.fs, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(f.fs, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(f.fs, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(f.fs, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- f.fs.Write(openBracketBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- numEntries := v.Len()
- for i := 0; i < numEntries; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(v.Index(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBracketBytes)
-
- case reflect.String:
- f.fs.Write([]byte(v.String()))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
-
- f.fs.Write(openMapBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- keys := v.MapKeys()
- if f.cs.SortKeys {
- sortValues(keys, f.cs)
- }
- for i, key := range keys {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(key))
- f.fs.Write(colonBytes)
- f.ignoreNextType = true
- f.format(f.unpackValue(v.MapIndex(key)))
- }
- }
- f.depth--
- f.fs.Write(closeMapBytes)
-
- case reflect.Struct:
- numFields := v.NumField()
- f.fs.Write(openBraceBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- vt := v.Type()
- for i := 0; i < numFields; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- vtf := vt.Field(i)
- if f.fs.Flag('+') || f.fs.Flag('#') {
- f.fs.Write([]byte(vtf.Name))
- f.fs.Write(colonBytes)
- }
- f.format(f.unpackValue(v.Field(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(f.fs, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(f.fs, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it if any get added.
- default:
- format := f.buildDefaultFormat()
- if v.CanInterface() {
- fmt.Fprintf(f.fs, format, v.Interface())
- } else {
- fmt.Fprintf(f.fs, format, v.String())
- }
- }
-}
-
-// Format satisfies the fmt.Formatter interface. See NewFormatter for usage
-// details.
-func (f *formatState) Format(fs fmt.State, verb rune) {
- f.fs = fs
-
- // Use standard formatting for verbs that are not v.
- if verb != 'v' {
- format := f.constructOrigFormat(verb)
- fmt.Fprintf(fs, format, f.value)
- return
- }
-
- if f.value == nil {
- if fs.Flag('#') {
- fs.Write(interfaceBytes)
- }
- fs.Write(nilAngleBytes)
- return
- }
-
- f.format(reflect.ValueOf(f.value))
-}
-
-// newFormatter is a helper function to consolidate the logic from the various
-// public methods which take varying config states.
-func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter {
- fs := &formatState{value: v, cs: cs}
- fs.pointers = make(map[uintptr]int)
- return fs
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-Printf, Println, or Fprintf.
-*/
-func NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(&Config, v)
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/spew.go
deleted file mode 100644
index 32c0e3388..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "fmt"
- "io"
-)
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the formatted string as a value that satisfies error. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a default Formatter interface returned by NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b))
-func Print(a ...interface{}) (n int, err error) {
- return fmt.Print(convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b))
-func Println(a ...interface{}) (n int, err error) {
- return fmt.Println(convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprint(a ...interface{}) string {
- return fmt.Sprint(convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintln(a ...interface{}) string {
- return fmt.Sprintln(convertArgs(a)...)
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a default spew Formatter interface.
-func convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = NewFormatter(arg)
- }
- return formatters
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/LICENSE
deleted file mode 100644
index c67dad612..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-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/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib/difflib.go
deleted file mode 100644
index 003e99fad..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib/difflib.go
+++ /dev/null
@@ -1,772 +0,0 @@
-// Package difflib is a partial port of Python difflib module.
-//
-// It provides tools to compare sequences of strings and generate textual diffs.
-//
-// The following class and functions have been ported:
-//
-// - SequenceMatcher
-//
-// - unified_diff
-//
-// - context_diff
-//
-// Getting unified diffs was the main goal of the port. Keep in mind this code
-// is mostly suitable to output text differences in a human friendly way, there
-// are no guarantees generated diffs are consumable by patch(1).
-package difflib
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "strings"
-)
-
-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
-}
-
-func calculateRatio(matches, length int) float64 {
- if length > 0 {
- return 2.0 * float64(matches) / float64(length)
- }
- return 1.0
-}
-
-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 "<P>" lines in HTML files). That may be
-// because this is the only method of the 3 that has a *concept* of
-// "junk" <wink>.
-//
-// 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
-}
-
-func NewMatcherWithJunk(a, b []string, autoJunk bool,
- isJunk func(string) bool) *SequenceMatcher {
-
- m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk}
- 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
-}
-
-// Return a measure of the sequences' similarity (float in [0,1]).
-//
-// Where T is the total number of elements in both sequences, and
-// M is the number of matches, this is 2.0*M / T.
-// Note that this is 1 if the sequences are identical, and 0 if
-// they have nothing in common.
-//
-// .Ratio() is expensive to compute if you haven't already computed
-// .GetMatchingBlocks() or .GetOpCodes(), in which case you may
-// want to try .QuickRatio() or .RealQuickRation() first to get an
-// upper bound.
-func (m *SequenceMatcher) Ratio() float64 {
- matches := 0
- for _, m := range m.GetMatchingBlocks() {
- matches += m.Size
- }
- return calculateRatio(matches, len(m.a)+len(m.b))
-}
-
-// Return an upper bound on ratio() relatively quickly.
-//
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
-// is faster to compute.
-func (m *SequenceMatcher) QuickRatio() float64 {
- // viewing a and b as multisets, set matches to the cardinality
- // of their intersection; this counts the number of matches
- // without regard to order, so is clearly an upper bound
- if m.fullBCount == nil {
- m.fullBCount = map[string]int{}
- for _, s := range m.b {
- m.fullBCount[s] = m.fullBCount[s] + 1
- }
- }
-
- // avail[x] is the number of times x appears in 'b' less the
- // number of times we've seen it in 'a' so far ... kinda
- avail := map[string]int{}
- matches := 0
- for _, s := range m.a {
- n, ok := avail[s]
- if !ok {
- n = m.fullBCount[s]
- }
- avail[s] = n - 1
- if n > 0 {
- matches += 1
- }
- }
- return calculateRatio(matches, len(m.a)+len(m.b))
-}
-
-// Return an upper bound on ratio() very quickly.
-//
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
-// is faster to compute than either .Ratio() or .QuickRatio().
-func (m *SequenceMatcher) RealQuickRatio() float64 {
- la, lb := len(m.a), len(m.b)
- return calculateRatio(min(la, lb), la+lb)
-}
-
-// 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 -= 1 // empty ranges begin at line just before the range
- }
- return fmt.Sprintf("%d,%d", beginning, length)
-}
-
-// Unified diff parameters
-type UnifiedDiff struct {
- A []string // First sequence lines
- FromFile string // First file name
- FromDate string // First file time
- B []string // Second sequence lines
- ToFile string // Second file name
- ToDate string // Second file time
- Eol string // Headers end of line, defaults to LF
- Context int // Number of context lines
-}
-
-// Compare two sequences of lines; generate the delta as a unified diff.
-//
-// Unified diffs are a compact way of showing line changes and a few
-// lines of context. The number of context lines is set by 'n' which
-// defaults to three.
-//
-// By default, the diff control lines (those with ---, +++, or @@) are
-// created with a trailing newline. This is helpful so that inputs
-// created from file.readlines() result in diffs that are suitable for
-// file.writelines() since both the inputs and outputs have trailing
-// newlines.
-//
-// For inputs that do not have trailing newlines, set the lineterm
-// argument to "" so that the output will be uniformly newline free.
-//
-// The unidiff format normally has a header for filenames and modification
-// times. Any or all of these may be specified using strings for
-// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
-// The modification times are normally expressed in the ISO 8601 format.
-func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error {
- buf := bufio.NewWriter(writer)
- defer buf.Flush()
- wf := func(format string, args ...interface{}) error {
- _, err := buf.WriteString(fmt.Sprintf(format, args...))
- return err
- }
- ws := func(s string) error {
- _, err := buf.WriteString(s)
- return err
- }
-
- if len(diff.Eol) == 0 {
- diff.Eol = "\n"
- }
-
- started := false
- m := NewMatcher(diff.A, diff.B)
- for _, g := range m.GetGroupedOpCodes(diff.Context) {
- if !started {
- started = true
- fromDate := ""
- if len(diff.FromDate) > 0 {
- fromDate = "\t" + diff.FromDate
- }
- toDate := ""
- if len(diff.ToDate) > 0 {
- toDate = "\t" + diff.ToDate
- }
- if diff.FromFile != "" || diff.ToFile != "" {
- err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol)
- if err != nil {
- return err
- }
- err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol)
- if err != nil {
- return err
- }
- }
- }
- first, last := g[0], g[len(g)-1]
- range1 := formatRangeUnified(first.I1, last.I2)
- range2 := formatRangeUnified(first.J1, last.J2)
- if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil {
- return err
- }
- for _, c := range g {
- i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
- if c.Tag == 'e' {
- for _, line := range diff.A[i1:i2] {
- if err := ws(" " + line); err != nil {
- return err
- }
- }
- continue
- }
- if c.Tag == 'r' || c.Tag == 'd' {
- for _, line := range diff.A[i1:i2] {
- if err := ws("-" + line); err != nil {
- return err
- }
- }
- }
- if c.Tag == 'r' || c.Tag == 'i' {
- for _, line := range diff.B[j1:j2] {
- if err := ws("+" + line); err != nil {
- return err
- }
- }
- }
- }
- }
- return nil
-}
-
-// Like WriteUnifiedDiff but returns the diff a string.
-func GetUnifiedDiffString(diff UnifiedDiff) (string, error) {
- w := &bytes.Buffer{}
- err := WriteUnifiedDiff(w, diff)
- return string(w.Bytes()), err
-}
-
-// Convert range to the "ed" format.
-func formatRangeContext(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 == 0 {
- beginning -= 1 // empty ranges begin at line just before the range
- }
- if length <= 1 {
- return fmt.Sprintf("%d", beginning)
- }
- return fmt.Sprintf("%d,%d", beginning, beginning+length-1)
-}
-
-type ContextDiff UnifiedDiff
-
-// Compare two sequences of lines; generate the delta as a context diff.
-//
-// Context diffs are a compact way of showing line changes and a few
-// lines of context. The number of context lines is set by diff.Context
-// which defaults to three.
-//
-// By default, the diff control lines (those with *** or ---) are
-// created with a trailing newline.
-//
-// For inputs that do not have trailing newlines, set the diff.Eol
-// argument to "" so that the output will be uniformly newline free.
-//
-// The context diff format normally has a header for filenames and
-// modification times. Any or all of these may be specified using
-// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate.
-// The modification times are normally expressed in the ISO 8601 format.
-// If not specified, the strings default to blanks.
-func WriteContextDiff(writer io.Writer, diff ContextDiff) error {
- buf := bufio.NewWriter(writer)
- defer buf.Flush()
- var diffErr error
- wf := func(format string, args ...interface{}) {
- _, err := buf.WriteString(fmt.Sprintf(format, args...))
- if diffErr == nil && err != nil {
- diffErr = err
- }
- }
- ws := func(s string) {
- _, err := buf.WriteString(s)
- if diffErr == nil && err != nil {
- diffErr = err
- }
- }
-
- if len(diff.Eol) == 0 {
- diff.Eol = "\n"
- }
-
- prefix := map[byte]string{
- 'i': "+ ",
- 'd': "- ",
- 'r': "! ",
- 'e': " ",
- }
-
- started := false
- m := NewMatcher(diff.A, diff.B)
- for _, g := range m.GetGroupedOpCodes(diff.Context) {
- if !started {
- started = true
- fromDate := ""
- if len(diff.FromDate) > 0 {
- fromDate = "\t" + diff.FromDate
- }
- toDate := ""
- if len(diff.ToDate) > 0 {
- toDate = "\t" + diff.ToDate
- }
- if diff.FromFile != "" || diff.ToFile != "" {
- wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol)
- wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol)
- }
- }
-
- first, last := g[0], g[len(g)-1]
- ws("***************" + diff.Eol)
-
- range1 := formatRangeContext(first.I1, last.I2)
- wf("*** %s ****%s", range1, diff.Eol)
- for _, c := range g {
- if c.Tag == 'r' || c.Tag == 'd' {
- for _, cc := range g {
- if cc.Tag == 'i' {
- continue
- }
- for _, line := range diff.A[cc.I1:cc.I2] {
- ws(prefix[cc.Tag] + line)
- }
- }
- break
- }
- }
-
- range2 := formatRangeContext(first.J1, last.J2)
- wf("--- %s ----%s", range2, diff.Eol)
- for _, c := range g {
- if c.Tag == 'r' || c.Tag == 'i' {
- for _, cc := range g {
- if cc.Tag == 'd' {
- continue
- }
- for _, line := range diff.B[cc.J1:cc.J2] {
- ws(prefix[cc.Tag] + line)
- }
- }
- break
- }
- }
- }
- return diffErr
-}
-
-// Like WriteContextDiff but returns the diff a string.
-func GetContextDiffString(diff ContextDiff) (string, error) {
- w := &bytes.Buffer{}
- err := WriteContextDiff(w, diff)
- return string(w.Bytes()), err
-}
-
-// Split a string on "\n" while preserving them. The output can be used
-// as input for UnifiedDiff and ContextDiff structures.
-func SplitLines(s string) []string {
- lines := strings.SplitAfter(s, "\n")
- lines[len(lines)-1] += "\n"
- return lines
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/accessors.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/accessors.go
deleted file mode 100644
index d95be0ca9..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/accessors.go
+++ /dev/null
@@ -1,171 +0,0 @@
-package objx
-
-import (
- "fmt"
- "regexp"
- "strconv"
- "strings"
-)
-
-// arrayAccesRegexString is the regex used to extract the array number
-// from the access path
-const arrayAccesRegexString = `^(.+)\[([0-9]+)\]$`
-
-// arrayAccesRegex is the compiled arrayAccesRegexString
-var arrayAccesRegex = regexp.MustCompile(arrayAccesRegexString)
-
-// Get gets the value using the specified selector and
-// returns it inside a new Obj object.
-//
-// If it cannot find the value, Get will return a nil
-// value inside an instance of Obj.
-//
-// Get can only operate directly on map[string]interface{} and []interface.
-//
-// Example
-//
-// To access the title of the third chapter of the second book, do:
-//
-// o.Get("books[1].chapters[2].title")
-func (m Map) Get(selector string) *Value {
- rawObj := access(m, selector, nil, false, false)
- return &Value{data: rawObj}
-}
-
-// Set sets the value using the specified selector and
-// returns the object on which Set was called.
-//
-// Set can only operate directly on map[string]interface{} and []interface
-//
-// Example
-//
-// To set the title of the third chapter of the second book, do:
-//
-// o.Set("books[1].chapters[2].title","Time to Go")
-func (m Map) Set(selector string, value interface{}) Map {
- access(m, selector, value, true, false)
- return m
-}
-
-// access accesses the object using the selector and performs the
-// appropriate action.
-func access(current, selector, value interface{}, isSet, panics bool) interface{} {
-
- switch selector.(type) {
- case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
-
- if array, ok := current.([]interface{}); ok {
- index := intFromInterface(selector)
-
- if index >= len(array) {
- if panics {
- panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array)))
- }
- return nil
- }
-
- return array[index]
- }
-
- return nil
-
- case string:
-
- selStr := selector.(string)
- selSegs := strings.SplitN(selStr, PathSeparator, 2)
- thisSel := selSegs[0]
- index := -1
- var err error
-
- if strings.Contains(thisSel, "[") {
- arrayMatches := arrayAccesRegex.FindStringSubmatch(thisSel)
-
- if len(arrayMatches) > 0 {
- // Get the key into the map
- thisSel = arrayMatches[1]
-
- // Get the index into the array at the key
- index, err = strconv.Atoi(arrayMatches[2])
-
- if err != nil {
- // This should never happen. If it does, something has gone
- // seriously wrong. Panic.
- panic("objx: Array index is not an integer. Must use array[int].")
- }
- }
- }
-
- if curMap, ok := current.(Map); ok {
- current = map[string]interface{}(curMap)
- }
-
- // get the object in question
- switch current.(type) {
- case map[string]interface{}:
- curMSI := current.(map[string]interface{})
- if len(selSegs) <= 1 && isSet {
- curMSI[thisSel] = value
- return nil
- }
- current = curMSI[thisSel]
- default:
- current = nil
- }
-
- if current == nil && panics {
- panic(fmt.Sprintf("objx: '%v' invalid on object.", selector))
- }
-
- // do we need to access the item of an array?
- if index > -1 {
- if array, ok := current.([]interface{}); ok {
- if index < len(array) {
- current = array[index]
- } else {
- if panics {
- panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array)))
- }
- current = nil
- }
- }
- }
-
- if len(selSegs) > 1 {
- current = access(current, selSegs[1], value, isSet, panics)
- }
-
- }
- return current
-}
-
-// intFromInterface converts an interface object to the largest
-// representation of an unsigned integer using a type switch and
-// assertions
-func intFromInterface(selector interface{}) int {
- var value int
- switch selector.(type) {
- case int:
- value = selector.(int)
- case int8:
- value = int(selector.(int8))
- case int16:
- value = int(selector.(int16))
- case int32:
- value = int(selector.(int32))
- case int64:
- value = int(selector.(int64))
- case uint:
- value = int(selector.(uint))
- case uint8:
- value = int(selector.(uint8))
- case uint16:
- value = int(selector.(uint16))
- case uint32:
- value = int(selector.(uint32))
- case uint64:
- value = int(selector.(uint64))
- default:
- panic("objx: array access argument is not an integer type (this should never happen)")
- }
- return value
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/conversions.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/conversions.go
deleted file mode 100644
index 5e020f310..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/conversions.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package objx
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "errors"
- "fmt"
- "net/url"
-)
-
-// JSON converts the contained object to a JSON string
-// representation
-func (m Map) JSON() (string, error) {
- result, err := json.Marshal(m)
- if err != nil {
- err = errors.New("objx: JSON encode failed with: " + err.Error())
- }
- return string(result), err
-}
-
-// MustJSON converts the contained object to a JSON string
-// representation and panics if there is an error
-func (m Map) MustJSON() string {
- result, err := m.JSON()
- if err != nil {
- panic(err.Error())
- }
- return result
-}
-
-// Base64 converts the contained object to a Base64 string
-// representation of the JSON string representation
-func (m Map) Base64() (string, error) {
- var buf bytes.Buffer
-
- jsonData, err := m.JSON()
- if err != nil {
- return "", err
- }
-
- encoder := base64.NewEncoder(base64.StdEncoding, &buf)
- _, err = encoder.Write([]byte(jsonData))
- if err != nil {
- return "", err
- }
- _ = encoder.Close()
-
- return buf.String(), nil
-}
-
-// MustBase64 converts the contained object to a Base64 string
-// representation of the JSON string representation and panics
-// if there is an error
-func (m Map) MustBase64() string {
- result, err := m.Base64()
- if err != nil {
- panic(err.Error())
- }
- return result
-}
-
-// SignedBase64 converts the contained object to a Base64 string
-// representation of the JSON string representation and signs it
-// using the provided key.
-func (m Map) SignedBase64(key string) (string, error) {
- base64, err := m.Base64()
- if err != nil {
- return "", err
- }
-
- sig := HashWithKey(base64, key)
- return base64 + SignatureSeparator + sig, nil
-}
-
-// MustSignedBase64 converts the contained object to a Base64 string
-// representation of the JSON string representation and signs it
-// using the provided key and panics if there is an error
-func (m Map) MustSignedBase64(key string) string {
- result, err := m.SignedBase64(key)
- if err != nil {
- panic(err.Error())
- }
- return result
-}
-
-/*
- URL Query
- ------------------------------------------------
-*/
-
-// URLValues creates a url.Values object from an Obj. This
-// function requires that the wrapped object be a map[string]interface{}
-func (m Map) URLValues() url.Values {
- vals := make(url.Values)
- for k, v := range m {
- //TODO: can this be done without sprintf?
- vals.Set(k, fmt.Sprintf("%v", v))
- }
- return vals
-}
-
-// URLQuery gets an encoded URL query representing the given
-// Obj. This function requires that the wrapped object be a
-// map[string]interface{}
-func (m Map) URLQuery() (string, error) {
- return m.URLValues().Encode(), nil
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/doc.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/doc.go
deleted file mode 100644
index 6d6af1a83..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/doc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Objx - Go package for dealing with maps, slices, JSON and other data.
-
-Overview
-
-Objx provides the `objx.Map` type, which is a `map[string]interface{}` that exposes
-a powerful `Get` method (among others) that allows you to easily and quickly get
-access to data within the map, without having to worry too much about type assertions,
-missing data, default values etc.
-
-Pattern
-
-Objx uses a preditable pattern to make access data from within `map[string]interface{}` easy.
-Call one of the `objx.` functions to create your `objx.Map` to get going:
-
- m, err := objx.FromJSON(json)
-
-NOTE: Any methods or functions with the `Must` prefix will panic if something goes wrong,
-the rest will be optimistic and try to figure things out without panicking.
-
-Use `Get` to access the value you're interested in. You can use dot and array
-notation too:
-
- m.Get("places[0].latlng")
-
-Once you have sought the `Value` you're interested in, you can use the `Is*` methods to determine its type.
-
- if m.Get("code").IsStr() { // Your code... }
-
-Or you can just assume the type, and use one of the strong type methods to extract the real value:
-
- m.Get("code").Int()
-
-If there's no value there (or if it's the wrong type) then a default value will be returned,
-or you can be explicit about the default value.
-
- Get("code").Int(-1)
-
-If you're dealing with a slice of data as a value, Objx provides many useful methods for iterating,
-manipulating and selecting that data. You can find out more by exploring the index below.
-
-Reading data
-
-A simple example of how to use Objx:
-
- // Use MustFromJSON to make an objx.Map from some JSON
- m := objx.MustFromJSON(`{"name": "Mat", "age": 30}`)
-
- // Get the details
- name := m.Get("name").Str()
- age := m.Get("age").Int()
-
- // Get their nickname (or use their name if they don't have one)
- nickname := m.Get("nickname").Str(name)
-
-Ranging
-
-Since `objx.Map` is a `map[string]interface{}` you can treat it as such.
-For example, to `range` the data, do what you would expect:
-
- m := objx.MustFromJSON(json)
- for key, value := range m {
- // Your code...
- }
-*/
-package objx
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/map.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/map.go
deleted file mode 100644
index 7e9389a20..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/map.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package objx
-
-import (
- "encoding/base64"
- "encoding/json"
- "errors"
- "io/ioutil"
- "net/url"
- "strings"
-)
-
-// MSIConvertable is an interface that defines methods for converting your
-// custom types to a map[string]interface{} representation.
-type MSIConvertable interface {
- // MSI gets a map[string]interface{} (msi) representing the
- // object.
- MSI() map[string]interface{}
-}
-
-// Map provides extended functionality for working with
-// untyped data, in particular map[string]interface (msi).
-type Map map[string]interface{}
-
-// Value returns the internal value instance
-func (m Map) Value() *Value {
- return &Value{data: m}
-}
-
-// Nil represents a nil Map.
-var Nil = New(nil)
-
-// New creates a new Map containing the map[string]interface{} in the data argument.
-// If the data argument is not a map[string]interface, New attempts to call the
-// MSI() method on the MSIConvertable interface to create one.
-func New(data interface{}) Map {
- if _, ok := data.(map[string]interface{}); !ok {
- if converter, ok := data.(MSIConvertable); ok {
- data = converter.MSI()
- } else {
- return nil
- }
- }
- return Map(data.(map[string]interface{}))
-}
-
-// MSI creates a map[string]interface{} and puts it inside a new Map.
-//
-// The arguments follow a key, value pattern.
-//
-// Panics
-//
-// Panics if any key argument is non-string or if there are an odd number of arguments.
-//
-// Example
-//
-// To easily create Maps:
-//
-// m := objx.MSI("name", "Mat", "age", 29, "subobj", objx.MSI("active", true))
-//
-// // creates an Map equivalent to
-// m := objx.New(map[string]interface{}{"name": "Mat", "age": 29, "subobj": map[string]interface{}{"active": true}})
-func MSI(keyAndValuePairs ...interface{}) Map {
- newMap := make(map[string]interface{})
- keyAndValuePairsLen := len(keyAndValuePairs)
- if keyAndValuePairsLen%2 != 0 {
- panic("objx: MSI must have an even number of arguments following the 'key, value' pattern.")
- }
-
- for i := 0; i < keyAndValuePairsLen; i = i + 2 {
- key := keyAndValuePairs[i]
- value := keyAndValuePairs[i+1]
-
- // make sure the key is a string
- keyString, keyStringOK := key.(string)
- if !keyStringOK {
- panic("objx: MSI must follow 'string, interface{}' pattern. " + keyString + " is not a valid key.")
- }
- newMap[keyString] = value
- }
- return New(newMap)
-}
-
-// ****** Conversion Constructors
-
-// MustFromJSON creates a new Map containing the data specified in the
-// jsonString.
-//
-// Panics if the JSON is invalid.
-func MustFromJSON(jsonString string) Map {
- o, err := FromJSON(jsonString)
- if err != nil {
- panic("objx: MustFromJSON failed with error: " + err.Error())
- }
- return o
-}
-
-// FromJSON creates a new Map containing the data specified in the
-// jsonString.
-//
-// Returns an error if the JSON is invalid.
-func FromJSON(jsonString string) (Map, error) {
- var data interface{}
- err := json.Unmarshal([]byte(jsonString), &data)
- if err != nil {
- return Nil, err
- }
- return New(data), nil
-}
-
-// FromBase64 creates a new Obj containing the data specified
-// in the Base64 string.
-//
-// The string is an encoded JSON string returned by Base64
-func FromBase64(base64String string) (Map, error) {
- decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(base64String))
- decoded, err := ioutil.ReadAll(decoder)
- if err != nil {
- return nil, err
- }
- return FromJSON(string(decoded))
-}
-
-// MustFromBase64 creates a new Obj containing the data specified
-// in the Base64 string and panics if there is an error.
-//
-// The string is an encoded JSON string returned by Base64
-func MustFromBase64(base64String string) Map {
- result, err := FromBase64(base64String)
- if err != nil {
- panic("objx: MustFromBase64 failed with error: " + err.Error())
- }
- return result
-}
-
-// FromSignedBase64 creates a new Obj containing the data specified
-// in the Base64 string.
-//
-// The string is an encoded JSON string returned by SignedBase64
-func FromSignedBase64(base64String, key string) (Map, error) {
- parts := strings.Split(base64String, SignatureSeparator)
- if len(parts) != 2 {
- return nil, errors.New("objx: Signed base64 string is malformed")
- }
-
- sig := HashWithKey(parts[0], key)
- if parts[1] != sig {
- return nil, errors.New("objx: Signature for base64 data does not match")
- }
- return FromBase64(parts[0])
-}
-
-// MustFromSignedBase64 creates a new Obj containing the data specified
-// in the Base64 string and panics if there is an error.
-//
-// The string is an encoded JSON string returned by Base64
-func MustFromSignedBase64(base64String, key string) Map {
- result, err := FromSignedBase64(base64String, key)
- if err != nil {
- panic("objx: MustFromSignedBase64 failed with error: " + err.Error())
- }
- return result
-}
-
-// FromURLQuery generates a new Obj by parsing the specified
-// query.
-//
-// For queries with multiple values, the first value is selected.
-func FromURLQuery(query string) (Map, error) {
- vals, err := url.ParseQuery(query)
- if err != nil {
- return nil, err
- }
-
- m := make(map[string]interface{})
- for k, vals := range vals {
- m[k] = vals[0]
- }
- return New(m), nil
-}
-
-// MustFromURLQuery generates a new Obj by parsing the specified
-// query.
-//
-// For queries with multiple values, the first value is selected.
-//
-// Panics if it encounters an error
-func MustFromURLQuery(query string) Map {
- o, err := FromURLQuery(query)
- if err != nil {
- panic("objx: MustFromURLQuery failed with error: " + err.Error())
- }
- return o
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/mutations.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/mutations.go
deleted file mode 100644
index e7b8eb794..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/mutations.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package objx
-
-// Exclude returns a new Map with the keys in the specified []string
-// excluded.
-func (m Map) Exclude(exclude []string) Map {
- excluded := make(Map)
- for k, v := range m {
- var shouldInclude = true
- for _, toExclude := range exclude {
- if k == toExclude {
- shouldInclude = false
- break
- }
- }
- if shouldInclude {
- excluded[k] = v
- }
- }
- return excluded
-}
-
-// Copy creates a shallow copy of the Obj.
-func (m Map) Copy() Map {
- copied := make(map[string]interface{})
- for k, v := range m {
- copied[k] = v
- }
- return New(copied)
-}
-
-// Merge blends the specified map with a copy of this map and returns the result.
-//
-// Keys that appear in both will be selected from the specified map.
-// This method requires that the wrapped object be a map[string]interface{}
-func (m Map) Merge(merge Map) Map {
- return m.Copy().MergeHere(merge)
-}
-
-// MergeHere blends the specified map with this map and returns the current map.
-//
-// Keys that appear in both will be selected from the specified map. The original map
-// will be modified. This method requires that
-// the wrapped object be a map[string]interface{}
-func (m Map) MergeHere(merge Map) Map {
- for k, v := range merge {
- m[k] = v
- }
- return m
-}
-
-// Transform builds a new Obj giving the transformer a chance
-// to change the keys and values as it goes. This method requires that
-// the wrapped object be a map[string]interface{}
-func (m Map) Transform(transformer func(key string, value interface{}) (string, interface{})) Map {
- newMap := make(map[string]interface{})
- for k, v := range m {
- modifiedKey, modifiedVal := transformer(k, v)
- newMap[modifiedKey] = modifiedVal
- }
- return New(newMap)
-}
-
-// TransformKeys builds a new map using the specified key mapping.
-//
-// Unspecified keys will be unaltered.
-// This method requires that the wrapped object be a map[string]interface{}
-func (m Map) TransformKeys(mapping map[string]string) Map {
- return m.Transform(func(key string, value interface{}) (string, interface{}) {
- if newKey, ok := mapping[key]; ok {
- return newKey, value
- }
- return key, value
- })
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go
deleted file mode 100644
index e052ff890..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package objx
-
-import (
- "crypto/sha1"
- "encoding/hex"
-)
-
-// HashWithKey hashes the specified string using the security
-// key.
-func HashWithKey(data, key string) string {
- hash := sha1.New()
- _, err := hash.Write([]byte(data + ":" + key))
- if err != nil {
- return ""
- }
- return hex.EncodeToString(hash.Sum(nil))
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go
deleted file mode 100644
index d9e0b479a..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package objx
-
-// Has gets whether there is something at the specified selector
-// or not.
-//
-// If m is nil, Has will always return false.
-func (m Map) Has(selector string) bool {
- if m == nil {
- return false
- }
- return !m.Get(selector).IsNil()
-}
-
-// IsNil gets whether the data is nil or not.
-func (v *Value) IsNil() bool {
- return v == nil || v.data == nil
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/type_specific_codegen.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/type_specific_codegen.go
deleted file mode 100644
index 202a91f8c..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/type_specific_codegen.go
+++ /dev/null
@@ -1,2501 +0,0 @@
-package objx
-
-/*
- Inter (interface{} and []interface{})
-*/
-
-// Inter gets the value as a interface{}, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Inter(optionalDefault ...interface{}) interface{} {
- if s, ok := v.data.(interface{}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInter gets the value as a interface{}.
-//
-// Panics if the object is not a interface{}.
-func (v *Value) MustInter() interface{} {
- return v.data.(interface{})
-}
-
-// InterSlice gets the value as a []interface{}, returns the optionalDefault
-// value or nil if the value is not a []interface{}.
-func (v *Value) InterSlice(optionalDefault ...[]interface{}) []interface{} {
- if s, ok := v.data.([]interface{}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInterSlice gets the value as a []interface{}.
-//
-// Panics if the object is not a []interface{}.
-func (v *Value) MustInterSlice() []interface{} {
- return v.data.([]interface{})
-}
-
-// IsInter gets whether the object contained is a interface{} or not.
-func (v *Value) IsInter() bool {
- _, ok := v.data.(interface{})
- return ok
-}
-
-// IsInterSlice gets whether the object contained is a []interface{} or not.
-func (v *Value) IsInterSlice() bool {
- _, ok := v.data.([]interface{})
- return ok
-}
-
-// EachInter calls the specified callback for each object
-// in the []interface{}.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInter(callback func(int, interface{}) bool) *Value {
- for index, val := range v.MustInterSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInter uses the specified decider function to select items
-// from the []interface{}. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInter(decider func(int, interface{}) bool) *Value {
- var selected []interface{}
- v.EachInter(func(index int, val interface{}) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInter uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]interface{}.
-func (v *Value) GroupInter(grouper func(int, interface{}) string) *Value {
- groups := make(map[string][]interface{})
- v.EachInter(func(index int, val interface{}) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]interface{}, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInter uses the specified function to replace each interface{}s
-// by iterating each item. The data in the returned result will be a
-// []interface{} containing the replaced items.
-func (v *Value) ReplaceInter(replacer func(int, interface{}) interface{}) *Value {
- arr := v.MustInterSlice()
- replaced := make([]interface{}, len(arr))
- v.EachInter(func(index int, val interface{}) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInter uses the specified collector function to collect a value
-// for each of the interface{}s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInter(collector func(int, interface{}) interface{}) *Value {
- arr := v.MustInterSlice()
- collected := make([]interface{}, len(arr))
- v.EachInter(func(index int, val interface{}) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- MSI (map[string]interface{} and []map[string]interface{})
-*/
-
-// MSI gets the value as a map[string]interface{}, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) MSI(optionalDefault ...map[string]interface{}) map[string]interface{} {
- if s, ok := v.data.(map[string]interface{}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustMSI gets the value as a map[string]interface{}.
-//
-// Panics if the object is not a map[string]interface{}.
-func (v *Value) MustMSI() map[string]interface{} {
- return v.data.(map[string]interface{})
-}
-
-// MSISlice gets the value as a []map[string]interface{}, returns the optionalDefault
-// value or nil if the value is not a []map[string]interface{}.
-func (v *Value) MSISlice(optionalDefault ...[]map[string]interface{}) []map[string]interface{} {
- if s, ok := v.data.([]map[string]interface{}); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustMSISlice gets the value as a []map[string]interface{}.
-//
-// Panics if the object is not a []map[string]interface{}.
-func (v *Value) MustMSISlice() []map[string]interface{} {
- return v.data.([]map[string]interface{})
-}
-
-// IsMSI gets whether the object contained is a map[string]interface{} or not.
-func (v *Value) IsMSI() bool {
- _, ok := v.data.(map[string]interface{})
- return ok
-}
-
-// IsMSISlice gets whether the object contained is a []map[string]interface{} or not.
-func (v *Value) IsMSISlice() bool {
- _, ok := v.data.([]map[string]interface{})
- return ok
-}
-
-// EachMSI calls the specified callback for each object
-// in the []map[string]interface{}.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachMSI(callback func(int, map[string]interface{}) bool) *Value {
- for index, val := range v.MustMSISlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereMSI uses the specified decider function to select items
-// from the []map[string]interface{}. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereMSI(decider func(int, map[string]interface{}) bool) *Value {
- var selected []map[string]interface{}
- v.EachMSI(func(index int, val map[string]interface{}) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupMSI uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]map[string]interface{}.
-func (v *Value) GroupMSI(grouper func(int, map[string]interface{}) string) *Value {
- groups := make(map[string][]map[string]interface{})
- v.EachMSI(func(index int, val map[string]interface{}) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]map[string]interface{}, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceMSI uses the specified function to replace each map[string]interface{}s
-// by iterating each item. The data in the returned result will be a
-// []map[string]interface{} containing the replaced items.
-func (v *Value) ReplaceMSI(replacer func(int, map[string]interface{}) map[string]interface{}) *Value {
- arr := v.MustMSISlice()
- replaced := make([]map[string]interface{}, len(arr))
- v.EachMSI(func(index int, val map[string]interface{}) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectMSI uses the specified collector function to collect a value
-// for each of the map[string]interface{}s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectMSI(collector func(int, map[string]interface{}) interface{}) *Value {
- arr := v.MustMSISlice()
- collected := make([]interface{}, len(arr))
- v.EachMSI(func(index int, val map[string]interface{}) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- ObjxMap ((Map) and [](Map))
-*/
-
-// ObjxMap gets the value as a (Map), returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) ObjxMap(optionalDefault ...(Map)) Map {
- if s, ok := v.data.((Map)); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return New(nil)
-}
-
-// MustObjxMap gets the value as a (Map).
-//
-// Panics if the object is not a (Map).
-func (v *Value) MustObjxMap() Map {
- return v.data.((Map))
-}
-
-// ObjxMapSlice gets the value as a [](Map), returns the optionalDefault
-// value or nil if the value is not a [](Map).
-func (v *Value) ObjxMapSlice(optionalDefault ...[](Map)) [](Map) {
- if s, ok := v.data.([](Map)); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustObjxMapSlice gets the value as a [](Map).
-//
-// Panics if the object is not a [](Map).
-func (v *Value) MustObjxMapSlice() [](Map) {
- return v.data.([](Map))
-}
-
-// IsObjxMap gets whether the object contained is a (Map) or not.
-func (v *Value) IsObjxMap() bool {
- _, ok := v.data.((Map))
- return ok
-}
-
-// IsObjxMapSlice gets whether the object contained is a [](Map) or not.
-func (v *Value) IsObjxMapSlice() bool {
- _, ok := v.data.([](Map))
- return ok
-}
-
-// EachObjxMap calls the specified callback for each object
-// in the [](Map).
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachObjxMap(callback func(int, Map) bool) *Value {
- for index, val := range v.MustObjxMapSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereObjxMap uses the specified decider function to select items
-// from the [](Map). The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereObjxMap(decider func(int, Map) bool) *Value {
- var selected [](Map)
- v.EachObjxMap(func(index int, val Map) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupObjxMap uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][](Map).
-func (v *Value) GroupObjxMap(grouper func(int, Map) string) *Value {
- groups := make(map[string][](Map))
- v.EachObjxMap(func(index int, val Map) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([](Map), 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceObjxMap uses the specified function to replace each (Map)s
-// by iterating each item. The data in the returned result will be a
-// [](Map) containing the replaced items.
-func (v *Value) ReplaceObjxMap(replacer func(int, Map) Map) *Value {
- arr := v.MustObjxMapSlice()
- replaced := make([](Map), len(arr))
- v.EachObjxMap(func(index int, val Map) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectObjxMap uses the specified collector function to collect a value
-// for each of the (Map)s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectObjxMap(collector func(int, Map) interface{}) *Value {
- arr := v.MustObjxMapSlice()
- collected := make([]interface{}, len(arr))
- v.EachObjxMap(func(index int, val Map) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Bool (bool and []bool)
-*/
-
-// Bool gets the value as a bool, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Bool(optionalDefault ...bool) bool {
- if s, ok := v.data.(bool); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return false
-}
-
-// MustBool gets the value as a bool.
-//
-// Panics if the object is not a bool.
-func (v *Value) MustBool() bool {
- return v.data.(bool)
-}
-
-// BoolSlice gets the value as a []bool, returns the optionalDefault
-// value or nil if the value is not a []bool.
-func (v *Value) BoolSlice(optionalDefault ...[]bool) []bool {
- if s, ok := v.data.([]bool); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustBoolSlice gets the value as a []bool.
-//
-// Panics if the object is not a []bool.
-func (v *Value) MustBoolSlice() []bool {
- return v.data.([]bool)
-}
-
-// IsBool gets whether the object contained is a bool or not.
-func (v *Value) IsBool() bool {
- _, ok := v.data.(bool)
- return ok
-}
-
-// IsBoolSlice gets whether the object contained is a []bool or not.
-func (v *Value) IsBoolSlice() bool {
- _, ok := v.data.([]bool)
- return ok
-}
-
-// EachBool calls the specified callback for each object
-// in the []bool.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachBool(callback func(int, bool) bool) *Value {
- for index, val := range v.MustBoolSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereBool uses the specified decider function to select items
-// from the []bool. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereBool(decider func(int, bool) bool) *Value {
- var selected []bool
- v.EachBool(func(index int, val bool) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupBool uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]bool.
-func (v *Value) GroupBool(grouper func(int, bool) string) *Value {
- groups := make(map[string][]bool)
- v.EachBool(func(index int, val bool) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]bool, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceBool uses the specified function to replace each bools
-// by iterating each item. The data in the returned result will be a
-// []bool containing the replaced items.
-func (v *Value) ReplaceBool(replacer func(int, bool) bool) *Value {
- arr := v.MustBoolSlice()
- replaced := make([]bool, len(arr))
- v.EachBool(func(index int, val bool) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectBool uses the specified collector function to collect a value
-// for each of the bools in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectBool(collector func(int, bool) interface{}) *Value {
- arr := v.MustBoolSlice()
- collected := make([]interface{}, len(arr))
- v.EachBool(func(index int, val bool) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Str (string and []string)
-*/
-
-// Str gets the value as a string, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Str(optionalDefault ...string) string {
- if s, ok := v.data.(string); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return ""
-}
-
-// MustStr gets the value as a string.
-//
-// Panics if the object is not a string.
-func (v *Value) MustStr() string {
- return v.data.(string)
-}
-
-// StrSlice gets the value as a []string, returns the optionalDefault
-// value or nil if the value is not a []string.
-func (v *Value) StrSlice(optionalDefault ...[]string) []string {
- if s, ok := v.data.([]string); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustStrSlice gets the value as a []string.
-//
-// Panics if the object is not a []string.
-func (v *Value) MustStrSlice() []string {
- return v.data.([]string)
-}
-
-// IsStr gets whether the object contained is a string or not.
-func (v *Value) IsStr() bool {
- _, ok := v.data.(string)
- return ok
-}
-
-// IsStrSlice gets whether the object contained is a []string or not.
-func (v *Value) IsStrSlice() bool {
- _, ok := v.data.([]string)
- return ok
-}
-
-// EachStr calls the specified callback for each object
-// in the []string.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachStr(callback func(int, string) bool) *Value {
- for index, val := range v.MustStrSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereStr uses the specified decider function to select items
-// from the []string. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereStr(decider func(int, string) bool) *Value {
- var selected []string
- v.EachStr(func(index int, val string) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupStr uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]string.
-func (v *Value) GroupStr(grouper func(int, string) string) *Value {
- groups := make(map[string][]string)
- v.EachStr(func(index int, val string) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]string, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceStr uses the specified function to replace each strings
-// by iterating each item. The data in the returned result will be a
-// []string containing the replaced items.
-func (v *Value) ReplaceStr(replacer func(int, string) string) *Value {
- arr := v.MustStrSlice()
- replaced := make([]string, len(arr))
- v.EachStr(func(index int, val string) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectStr uses the specified collector function to collect a value
-// for each of the strings in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectStr(collector func(int, string) interface{}) *Value {
- arr := v.MustStrSlice()
- collected := make([]interface{}, len(arr))
- v.EachStr(func(index int, val string) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Int (int and []int)
-*/
-
-// Int gets the value as a int, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Int(optionalDefault ...int) int {
- if s, ok := v.data.(int); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustInt gets the value as a int.
-//
-// Panics if the object is not a int.
-func (v *Value) MustInt() int {
- return v.data.(int)
-}
-
-// IntSlice gets the value as a []int, returns the optionalDefault
-// value or nil if the value is not a []int.
-func (v *Value) IntSlice(optionalDefault ...[]int) []int {
- if s, ok := v.data.([]int); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustIntSlice gets the value as a []int.
-//
-// Panics if the object is not a []int.
-func (v *Value) MustIntSlice() []int {
- return v.data.([]int)
-}
-
-// IsInt gets whether the object contained is a int or not.
-func (v *Value) IsInt() bool {
- _, ok := v.data.(int)
- return ok
-}
-
-// IsIntSlice gets whether the object contained is a []int or not.
-func (v *Value) IsIntSlice() bool {
- _, ok := v.data.([]int)
- return ok
-}
-
-// EachInt calls the specified callback for each object
-// in the []int.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInt(callback func(int, int) bool) *Value {
- for index, val := range v.MustIntSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInt uses the specified decider function to select items
-// from the []int. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInt(decider func(int, int) bool) *Value {
- var selected []int
- v.EachInt(func(index int, val int) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInt uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]int.
-func (v *Value) GroupInt(grouper func(int, int) string) *Value {
- groups := make(map[string][]int)
- v.EachInt(func(index int, val int) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]int, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInt uses the specified function to replace each ints
-// by iterating each item. The data in the returned result will be a
-// []int containing the replaced items.
-func (v *Value) ReplaceInt(replacer func(int, int) int) *Value {
- arr := v.MustIntSlice()
- replaced := make([]int, len(arr))
- v.EachInt(func(index int, val int) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInt uses the specified collector function to collect a value
-// for each of the ints in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInt(collector func(int, int) interface{}) *Value {
- arr := v.MustIntSlice()
- collected := make([]interface{}, len(arr))
- v.EachInt(func(index int, val int) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Int8 (int8 and []int8)
-*/
-
-// Int8 gets the value as a int8, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Int8(optionalDefault ...int8) int8 {
- if s, ok := v.data.(int8); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustInt8 gets the value as a int8.
-//
-// Panics if the object is not a int8.
-func (v *Value) MustInt8() int8 {
- return v.data.(int8)
-}
-
-// Int8Slice gets the value as a []int8, returns the optionalDefault
-// value or nil if the value is not a []int8.
-func (v *Value) Int8Slice(optionalDefault ...[]int8) []int8 {
- if s, ok := v.data.([]int8); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInt8Slice gets the value as a []int8.
-//
-// Panics if the object is not a []int8.
-func (v *Value) MustInt8Slice() []int8 {
- return v.data.([]int8)
-}
-
-// IsInt8 gets whether the object contained is a int8 or not.
-func (v *Value) IsInt8() bool {
- _, ok := v.data.(int8)
- return ok
-}
-
-// IsInt8Slice gets whether the object contained is a []int8 or not.
-func (v *Value) IsInt8Slice() bool {
- _, ok := v.data.([]int8)
- return ok
-}
-
-// EachInt8 calls the specified callback for each object
-// in the []int8.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInt8(callback func(int, int8) bool) *Value {
- for index, val := range v.MustInt8Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInt8 uses the specified decider function to select items
-// from the []int8. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInt8(decider func(int, int8) bool) *Value {
- var selected []int8
- v.EachInt8(func(index int, val int8) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInt8 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]int8.
-func (v *Value) GroupInt8(grouper func(int, int8) string) *Value {
- groups := make(map[string][]int8)
- v.EachInt8(func(index int, val int8) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]int8, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInt8 uses the specified function to replace each int8s
-// by iterating each item. The data in the returned result will be a
-// []int8 containing the replaced items.
-func (v *Value) ReplaceInt8(replacer func(int, int8) int8) *Value {
- arr := v.MustInt8Slice()
- replaced := make([]int8, len(arr))
- v.EachInt8(func(index int, val int8) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInt8 uses the specified collector function to collect a value
-// for each of the int8s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInt8(collector func(int, int8) interface{}) *Value {
- arr := v.MustInt8Slice()
- collected := make([]interface{}, len(arr))
- v.EachInt8(func(index int, val int8) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Int16 (int16 and []int16)
-*/
-
-// Int16 gets the value as a int16, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Int16(optionalDefault ...int16) int16 {
- if s, ok := v.data.(int16); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustInt16 gets the value as a int16.
-//
-// Panics if the object is not a int16.
-func (v *Value) MustInt16() int16 {
- return v.data.(int16)
-}
-
-// Int16Slice gets the value as a []int16, returns the optionalDefault
-// value or nil if the value is not a []int16.
-func (v *Value) Int16Slice(optionalDefault ...[]int16) []int16 {
- if s, ok := v.data.([]int16); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInt16Slice gets the value as a []int16.
-//
-// Panics if the object is not a []int16.
-func (v *Value) MustInt16Slice() []int16 {
- return v.data.([]int16)
-}
-
-// IsInt16 gets whether the object contained is a int16 or not.
-func (v *Value) IsInt16() bool {
- _, ok := v.data.(int16)
- return ok
-}
-
-// IsInt16Slice gets whether the object contained is a []int16 or not.
-func (v *Value) IsInt16Slice() bool {
- _, ok := v.data.([]int16)
- return ok
-}
-
-// EachInt16 calls the specified callback for each object
-// in the []int16.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInt16(callback func(int, int16) bool) *Value {
- for index, val := range v.MustInt16Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInt16 uses the specified decider function to select items
-// from the []int16. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInt16(decider func(int, int16) bool) *Value {
- var selected []int16
- v.EachInt16(func(index int, val int16) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInt16 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]int16.
-func (v *Value) GroupInt16(grouper func(int, int16) string) *Value {
- groups := make(map[string][]int16)
- v.EachInt16(func(index int, val int16) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]int16, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInt16 uses the specified function to replace each int16s
-// by iterating each item. The data in the returned result will be a
-// []int16 containing the replaced items.
-func (v *Value) ReplaceInt16(replacer func(int, int16) int16) *Value {
- arr := v.MustInt16Slice()
- replaced := make([]int16, len(arr))
- v.EachInt16(func(index int, val int16) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInt16 uses the specified collector function to collect a value
-// for each of the int16s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInt16(collector func(int, int16) interface{}) *Value {
- arr := v.MustInt16Slice()
- collected := make([]interface{}, len(arr))
- v.EachInt16(func(index int, val int16) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Int32 (int32 and []int32)
-*/
-
-// Int32 gets the value as a int32, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Int32(optionalDefault ...int32) int32 {
- if s, ok := v.data.(int32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustInt32 gets the value as a int32.
-//
-// Panics if the object is not a int32.
-func (v *Value) MustInt32() int32 {
- return v.data.(int32)
-}
-
-// Int32Slice gets the value as a []int32, returns the optionalDefault
-// value or nil if the value is not a []int32.
-func (v *Value) Int32Slice(optionalDefault ...[]int32) []int32 {
- if s, ok := v.data.([]int32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInt32Slice gets the value as a []int32.
-//
-// Panics if the object is not a []int32.
-func (v *Value) MustInt32Slice() []int32 {
- return v.data.([]int32)
-}
-
-// IsInt32 gets whether the object contained is a int32 or not.
-func (v *Value) IsInt32() bool {
- _, ok := v.data.(int32)
- return ok
-}
-
-// IsInt32Slice gets whether the object contained is a []int32 or not.
-func (v *Value) IsInt32Slice() bool {
- _, ok := v.data.([]int32)
- return ok
-}
-
-// EachInt32 calls the specified callback for each object
-// in the []int32.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInt32(callback func(int, int32) bool) *Value {
- for index, val := range v.MustInt32Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInt32 uses the specified decider function to select items
-// from the []int32. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInt32(decider func(int, int32) bool) *Value {
- var selected []int32
- v.EachInt32(func(index int, val int32) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInt32 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]int32.
-func (v *Value) GroupInt32(grouper func(int, int32) string) *Value {
- groups := make(map[string][]int32)
- v.EachInt32(func(index int, val int32) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]int32, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInt32 uses the specified function to replace each int32s
-// by iterating each item. The data in the returned result will be a
-// []int32 containing the replaced items.
-func (v *Value) ReplaceInt32(replacer func(int, int32) int32) *Value {
- arr := v.MustInt32Slice()
- replaced := make([]int32, len(arr))
- v.EachInt32(func(index int, val int32) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInt32 uses the specified collector function to collect a value
-// for each of the int32s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInt32(collector func(int, int32) interface{}) *Value {
- arr := v.MustInt32Slice()
- collected := make([]interface{}, len(arr))
- v.EachInt32(func(index int, val int32) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Int64 (int64 and []int64)
-*/
-
-// Int64 gets the value as a int64, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Int64(optionalDefault ...int64) int64 {
- if s, ok := v.data.(int64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustInt64 gets the value as a int64.
-//
-// Panics if the object is not a int64.
-func (v *Value) MustInt64() int64 {
- return v.data.(int64)
-}
-
-// Int64Slice gets the value as a []int64, returns the optionalDefault
-// value or nil if the value is not a []int64.
-func (v *Value) Int64Slice(optionalDefault ...[]int64) []int64 {
- if s, ok := v.data.([]int64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustInt64Slice gets the value as a []int64.
-//
-// Panics if the object is not a []int64.
-func (v *Value) MustInt64Slice() []int64 {
- return v.data.([]int64)
-}
-
-// IsInt64 gets whether the object contained is a int64 or not.
-func (v *Value) IsInt64() bool {
- _, ok := v.data.(int64)
- return ok
-}
-
-// IsInt64Slice gets whether the object contained is a []int64 or not.
-func (v *Value) IsInt64Slice() bool {
- _, ok := v.data.([]int64)
- return ok
-}
-
-// EachInt64 calls the specified callback for each object
-// in the []int64.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachInt64(callback func(int, int64) bool) *Value {
- for index, val := range v.MustInt64Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereInt64 uses the specified decider function to select items
-// from the []int64. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereInt64(decider func(int, int64) bool) *Value {
- var selected []int64
- v.EachInt64(func(index int, val int64) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupInt64 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]int64.
-func (v *Value) GroupInt64(grouper func(int, int64) string) *Value {
- groups := make(map[string][]int64)
- v.EachInt64(func(index int, val int64) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]int64, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceInt64 uses the specified function to replace each int64s
-// by iterating each item. The data in the returned result will be a
-// []int64 containing the replaced items.
-func (v *Value) ReplaceInt64(replacer func(int, int64) int64) *Value {
- arr := v.MustInt64Slice()
- replaced := make([]int64, len(arr))
- v.EachInt64(func(index int, val int64) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectInt64 uses the specified collector function to collect a value
-// for each of the int64s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectInt64(collector func(int, int64) interface{}) *Value {
- arr := v.MustInt64Slice()
- collected := make([]interface{}, len(arr))
- v.EachInt64(func(index int, val int64) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uint (uint and []uint)
-*/
-
-// Uint gets the value as a uint, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uint(optionalDefault ...uint) uint {
- if s, ok := v.data.(uint); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUint gets the value as a uint.
-//
-// Panics if the object is not a uint.
-func (v *Value) MustUint() uint {
- return v.data.(uint)
-}
-
-// UintSlice gets the value as a []uint, returns the optionalDefault
-// value or nil if the value is not a []uint.
-func (v *Value) UintSlice(optionalDefault ...[]uint) []uint {
- if s, ok := v.data.([]uint); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUintSlice gets the value as a []uint.
-//
-// Panics if the object is not a []uint.
-func (v *Value) MustUintSlice() []uint {
- return v.data.([]uint)
-}
-
-// IsUint gets whether the object contained is a uint or not.
-func (v *Value) IsUint() bool {
- _, ok := v.data.(uint)
- return ok
-}
-
-// IsUintSlice gets whether the object contained is a []uint or not.
-func (v *Value) IsUintSlice() bool {
- _, ok := v.data.([]uint)
- return ok
-}
-
-// EachUint calls the specified callback for each object
-// in the []uint.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUint(callback func(int, uint) bool) *Value {
- for index, val := range v.MustUintSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUint uses the specified decider function to select items
-// from the []uint. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUint(decider func(int, uint) bool) *Value {
- var selected []uint
- v.EachUint(func(index int, val uint) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUint uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uint.
-func (v *Value) GroupUint(grouper func(int, uint) string) *Value {
- groups := make(map[string][]uint)
- v.EachUint(func(index int, val uint) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uint, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUint uses the specified function to replace each uints
-// by iterating each item. The data in the returned result will be a
-// []uint containing the replaced items.
-func (v *Value) ReplaceUint(replacer func(int, uint) uint) *Value {
- arr := v.MustUintSlice()
- replaced := make([]uint, len(arr))
- v.EachUint(func(index int, val uint) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUint uses the specified collector function to collect a value
-// for each of the uints in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUint(collector func(int, uint) interface{}) *Value {
- arr := v.MustUintSlice()
- collected := make([]interface{}, len(arr))
- v.EachUint(func(index int, val uint) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uint8 (uint8 and []uint8)
-*/
-
-// Uint8 gets the value as a uint8, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uint8(optionalDefault ...uint8) uint8 {
- if s, ok := v.data.(uint8); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUint8 gets the value as a uint8.
-//
-// Panics if the object is not a uint8.
-func (v *Value) MustUint8() uint8 {
- return v.data.(uint8)
-}
-
-// Uint8Slice gets the value as a []uint8, returns the optionalDefault
-// value or nil if the value is not a []uint8.
-func (v *Value) Uint8Slice(optionalDefault ...[]uint8) []uint8 {
- if s, ok := v.data.([]uint8); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUint8Slice gets the value as a []uint8.
-//
-// Panics if the object is not a []uint8.
-func (v *Value) MustUint8Slice() []uint8 {
- return v.data.([]uint8)
-}
-
-// IsUint8 gets whether the object contained is a uint8 or not.
-func (v *Value) IsUint8() bool {
- _, ok := v.data.(uint8)
- return ok
-}
-
-// IsUint8Slice gets whether the object contained is a []uint8 or not.
-func (v *Value) IsUint8Slice() bool {
- _, ok := v.data.([]uint8)
- return ok
-}
-
-// EachUint8 calls the specified callback for each object
-// in the []uint8.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUint8(callback func(int, uint8) bool) *Value {
- for index, val := range v.MustUint8Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUint8 uses the specified decider function to select items
-// from the []uint8. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUint8(decider func(int, uint8) bool) *Value {
- var selected []uint8
- v.EachUint8(func(index int, val uint8) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUint8 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uint8.
-func (v *Value) GroupUint8(grouper func(int, uint8) string) *Value {
- groups := make(map[string][]uint8)
- v.EachUint8(func(index int, val uint8) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uint8, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUint8 uses the specified function to replace each uint8s
-// by iterating each item. The data in the returned result will be a
-// []uint8 containing the replaced items.
-func (v *Value) ReplaceUint8(replacer func(int, uint8) uint8) *Value {
- arr := v.MustUint8Slice()
- replaced := make([]uint8, len(arr))
- v.EachUint8(func(index int, val uint8) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUint8 uses the specified collector function to collect a value
-// for each of the uint8s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUint8(collector func(int, uint8) interface{}) *Value {
- arr := v.MustUint8Slice()
- collected := make([]interface{}, len(arr))
- v.EachUint8(func(index int, val uint8) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uint16 (uint16 and []uint16)
-*/
-
-// Uint16 gets the value as a uint16, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uint16(optionalDefault ...uint16) uint16 {
- if s, ok := v.data.(uint16); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUint16 gets the value as a uint16.
-//
-// Panics if the object is not a uint16.
-func (v *Value) MustUint16() uint16 {
- return v.data.(uint16)
-}
-
-// Uint16Slice gets the value as a []uint16, returns the optionalDefault
-// value or nil if the value is not a []uint16.
-func (v *Value) Uint16Slice(optionalDefault ...[]uint16) []uint16 {
- if s, ok := v.data.([]uint16); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUint16Slice gets the value as a []uint16.
-//
-// Panics if the object is not a []uint16.
-func (v *Value) MustUint16Slice() []uint16 {
- return v.data.([]uint16)
-}
-
-// IsUint16 gets whether the object contained is a uint16 or not.
-func (v *Value) IsUint16() bool {
- _, ok := v.data.(uint16)
- return ok
-}
-
-// IsUint16Slice gets whether the object contained is a []uint16 or not.
-func (v *Value) IsUint16Slice() bool {
- _, ok := v.data.([]uint16)
- return ok
-}
-
-// EachUint16 calls the specified callback for each object
-// in the []uint16.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUint16(callback func(int, uint16) bool) *Value {
- for index, val := range v.MustUint16Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUint16 uses the specified decider function to select items
-// from the []uint16. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUint16(decider func(int, uint16) bool) *Value {
- var selected []uint16
- v.EachUint16(func(index int, val uint16) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUint16 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uint16.
-func (v *Value) GroupUint16(grouper func(int, uint16) string) *Value {
- groups := make(map[string][]uint16)
- v.EachUint16(func(index int, val uint16) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uint16, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUint16 uses the specified function to replace each uint16s
-// by iterating each item. The data in the returned result will be a
-// []uint16 containing the replaced items.
-func (v *Value) ReplaceUint16(replacer func(int, uint16) uint16) *Value {
- arr := v.MustUint16Slice()
- replaced := make([]uint16, len(arr))
- v.EachUint16(func(index int, val uint16) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUint16 uses the specified collector function to collect a value
-// for each of the uint16s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUint16(collector func(int, uint16) interface{}) *Value {
- arr := v.MustUint16Slice()
- collected := make([]interface{}, len(arr))
- v.EachUint16(func(index int, val uint16) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uint32 (uint32 and []uint32)
-*/
-
-// Uint32 gets the value as a uint32, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uint32(optionalDefault ...uint32) uint32 {
- if s, ok := v.data.(uint32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUint32 gets the value as a uint32.
-//
-// Panics if the object is not a uint32.
-func (v *Value) MustUint32() uint32 {
- return v.data.(uint32)
-}
-
-// Uint32Slice gets the value as a []uint32, returns the optionalDefault
-// value or nil if the value is not a []uint32.
-func (v *Value) Uint32Slice(optionalDefault ...[]uint32) []uint32 {
- if s, ok := v.data.([]uint32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUint32Slice gets the value as a []uint32.
-//
-// Panics if the object is not a []uint32.
-func (v *Value) MustUint32Slice() []uint32 {
- return v.data.([]uint32)
-}
-
-// IsUint32 gets whether the object contained is a uint32 or not.
-func (v *Value) IsUint32() bool {
- _, ok := v.data.(uint32)
- return ok
-}
-
-// IsUint32Slice gets whether the object contained is a []uint32 or not.
-func (v *Value) IsUint32Slice() bool {
- _, ok := v.data.([]uint32)
- return ok
-}
-
-// EachUint32 calls the specified callback for each object
-// in the []uint32.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUint32(callback func(int, uint32) bool) *Value {
- for index, val := range v.MustUint32Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUint32 uses the specified decider function to select items
-// from the []uint32. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUint32(decider func(int, uint32) bool) *Value {
- var selected []uint32
- v.EachUint32(func(index int, val uint32) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUint32 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uint32.
-func (v *Value) GroupUint32(grouper func(int, uint32) string) *Value {
- groups := make(map[string][]uint32)
- v.EachUint32(func(index int, val uint32) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uint32, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUint32 uses the specified function to replace each uint32s
-// by iterating each item. The data in the returned result will be a
-// []uint32 containing the replaced items.
-func (v *Value) ReplaceUint32(replacer func(int, uint32) uint32) *Value {
- arr := v.MustUint32Slice()
- replaced := make([]uint32, len(arr))
- v.EachUint32(func(index int, val uint32) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUint32 uses the specified collector function to collect a value
-// for each of the uint32s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUint32(collector func(int, uint32) interface{}) *Value {
- arr := v.MustUint32Slice()
- collected := make([]interface{}, len(arr))
- v.EachUint32(func(index int, val uint32) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uint64 (uint64 and []uint64)
-*/
-
-// Uint64 gets the value as a uint64, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uint64(optionalDefault ...uint64) uint64 {
- if s, ok := v.data.(uint64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUint64 gets the value as a uint64.
-//
-// Panics if the object is not a uint64.
-func (v *Value) MustUint64() uint64 {
- return v.data.(uint64)
-}
-
-// Uint64Slice gets the value as a []uint64, returns the optionalDefault
-// value or nil if the value is not a []uint64.
-func (v *Value) Uint64Slice(optionalDefault ...[]uint64) []uint64 {
- if s, ok := v.data.([]uint64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUint64Slice gets the value as a []uint64.
-//
-// Panics if the object is not a []uint64.
-func (v *Value) MustUint64Slice() []uint64 {
- return v.data.([]uint64)
-}
-
-// IsUint64 gets whether the object contained is a uint64 or not.
-func (v *Value) IsUint64() bool {
- _, ok := v.data.(uint64)
- return ok
-}
-
-// IsUint64Slice gets whether the object contained is a []uint64 or not.
-func (v *Value) IsUint64Slice() bool {
- _, ok := v.data.([]uint64)
- return ok
-}
-
-// EachUint64 calls the specified callback for each object
-// in the []uint64.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUint64(callback func(int, uint64) bool) *Value {
- for index, val := range v.MustUint64Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUint64 uses the specified decider function to select items
-// from the []uint64. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUint64(decider func(int, uint64) bool) *Value {
- var selected []uint64
- v.EachUint64(func(index int, val uint64) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUint64 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uint64.
-func (v *Value) GroupUint64(grouper func(int, uint64) string) *Value {
- groups := make(map[string][]uint64)
- v.EachUint64(func(index int, val uint64) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uint64, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUint64 uses the specified function to replace each uint64s
-// by iterating each item. The data in the returned result will be a
-// []uint64 containing the replaced items.
-func (v *Value) ReplaceUint64(replacer func(int, uint64) uint64) *Value {
- arr := v.MustUint64Slice()
- replaced := make([]uint64, len(arr))
- v.EachUint64(func(index int, val uint64) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUint64 uses the specified collector function to collect a value
-// for each of the uint64s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUint64(collector func(int, uint64) interface{}) *Value {
- arr := v.MustUint64Slice()
- collected := make([]interface{}, len(arr))
- v.EachUint64(func(index int, val uint64) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Uintptr (uintptr and []uintptr)
-*/
-
-// Uintptr gets the value as a uintptr, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Uintptr(optionalDefault ...uintptr) uintptr {
- if s, ok := v.data.(uintptr); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustUintptr gets the value as a uintptr.
-//
-// Panics if the object is not a uintptr.
-func (v *Value) MustUintptr() uintptr {
- return v.data.(uintptr)
-}
-
-// UintptrSlice gets the value as a []uintptr, returns the optionalDefault
-// value or nil if the value is not a []uintptr.
-func (v *Value) UintptrSlice(optionalDefault ...[]uintptr) []uintptr {
- if s, ok := v.data.([]uintptr); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustUintptrSlice gets the value as a []uintptr.
-//
-// Panics if the object is not a []uintptr.
-func (v *Value) MustUintptrSlice() []uintptr {
- return v.data.([]uintptr)
-}
-
-// IsUintptr gets whether the object contained is a uintptr or not.
-func (v *Value) IsUintptr() bool {
- _, ok := v.data.(uintptr)
- return ok
-}
-
-// IsUintptrSlice gets whether the object contained is a []uintptr or not.
-func (v *Value) IsUintptrSlice() bool {
- _, ok := v.data.([]uintptr)
- return ok
-}
-
-// EachUintptr calls the specified callback for each object
-// in the []uintptr.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachUintptr(callback func(int, uintptr) bool) *Value {
- for index, val := range v.MustUintptrSlice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereUintptr uses the specified decider function to select items
-// from the []uintptr. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereUintptr(decider func(int, uintptr) bool) *Value {
- var selected []uintptr
- v.EachUintptr(func(index int, val uintptr) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupUintptr uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]uintptr.
-func (v *Value) GroupUintptr(grouper func(int, uintptr) string) *Value {
- groups := make(map[string][]uintptr)
- v.EachUintptr(func(index int, val uintptr) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]uintptr, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceUintptr uses the specified function to replace each uintptrs
-// by iterating each item. The data in the returned result will be a
-// []uintptr containing the replaced items.
-func (v *Value) ReplaceUintptr(replacer func(int, uintptr) uintptr) *Value {
- arr := v.MustUintptrSlice()
- replaced := make([]uintptr, len(arr))
- v.EachUintptr(func(index int, val uintptr) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectUintptr uses the specified collector function to collect a value
-// for each of the uintptrs in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectUintptr(collector func(int, uintptr) interface{}) *Value {
- arr := v.MustUintptrSlice()
- collected := make([]interface{}, len(arr))
- v.EachUintptr(func(index int, val uintptr) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Float32 (float32 and []float32)
-*/
-
-// Float32 gets the value as a float32, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Float32(optionalDefault ...float32) float32 {
- if s, ok := v.data.(float32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustFloat32 gets the value as a float32.
-//
-// Panics if the object is not a float32.
-func (v *Value) MustFloat32() float32 {
- return v.data.(float32)
-}
-
-// Float32Slice gets the value as a []float32, returns the optionalDefault
-// value or nil if the value is not a []float32.
-func (v *Value) Float32Slice(optionalDefault ...[]float32) []float32 {
- if s, ok := v.data.([]float32); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustFloat32Slice gets the value as a []float32.
-//
-// Panics if the object is not a []float32.
-func (v *Value) MustFloat32Slice() []float32 {
- return v.data.([]float32)
-}
-
-// IsFloat32 gets whether the object contained is a float32 or not.
-func (v *Value) IsFloat32() bool {
- _, ok := v.data.(float32)
- return ok
-}
-
-// IsFloat32Slice gets whether the object contained is a []float32 or not.
-func (v *Value) IsFloat32Slice() bool {
- _, ok := v.data.([]float32)
- return ok
-}
-
-// EachFloat32 calls the specified callback for each object
-// in the []float32.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachFloat32(callback func(int, float32) bool) *Value {
- for index, val := range v.MustFloat32Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereFloat32 uses the specified decider function to select items
-// from the []float32. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereFloat32(decider func(int, float32) bool) *Value {
- var selected []float32
- v.EachFloat32(func(index int, val float32) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupFloat32 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]float32.
-func (v *Value) GroupFloat32(grouper func(int, float32) string) *Value {
- groups := make(map[string][]float32)
- v.EachFloat32(func(index int, val float32) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]float32, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceFloat32 uses the specified function to replace each float32s
-// by iterating each item. The data in the returned result will be a
-// []float32 containing the replaced items.
-func (v *Value) ReplaceFloat32(replacer func(int, float32) float32) *Value {
- arr := v.MustFloat32Slice()
- replaced := make([]float32, len(arr))
- v.EachFloat32(func(index int, val float32) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectFloat32 uses the specified collector function to collect a value
-// for each of the float32s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectFloat32(collector func(int, float32) interface{}) *Value {
- arr := v.MustFloat32Slice()
- collected := make([]interface{}, len(arr))
- v.EachFloat32(func(index int, val float32) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Float64 (float64 and []float64)
-*/
-
-// Float64 gets the value as a float64, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Float64(optionalDefault ...float64) float64 {
- if s, ok := v.data.(float64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustFloat64 gets the value as a float64.
-//
-// Panics if the object is not a float64.
-func (v *Value) MustFloat64() float64 {
- return v.data.(float64)
-}
-
-// Float64Slice gets the value as a []float64, returns the optionalDefault
-// value or nil if the value is not a []float64.
-func (v *Value) Float64Slice(optionalDefault ...[]float64) []float64 {
- if s, ok := v.data.([]float64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustFloat64Slice gets the value as a []float64.
-//
-// Panics if the object is not a []float64.
-func (v *Value) MustFloat64Slice() []float64 {
- return v.data.([]float64)
-}
-
-// IsFloat64 gets whether the object contained is a float64 or not.
-func (v *Value) IsFloat64() bool {
- _, ok := v.data.(float64)
- return ok
-}
-
-// IsFloat64Slice gets whether the object contained is a []float64 or not.
-func (v *Value) IsFloat64Slice() bool {
- _, ok := v.data.([]float64)
- return ok
-}
-
-// EachFloat64 calls the specified callback for each object
-// in the []float64.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachFloat64(callback func(int, float64) bool) *Value {
- for index, val := range v.MustFloat64Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereFloat64 uses the specified decider function to select items
-// from the []float64. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereFloat64(decider func(int, float64) bool) *Value {
- var selected []float64
- v.EachFloat64(func(index int, val float64) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupFloat64 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]float64.
-func (v *Value) GroupFloat64(grouper func(int, float64) string) *Value {
- groups := make(map[string][]float64)
- v.EachFloat64(func(index int, val float64) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]float64, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceFloat64 uses the specified function to replace each float64s
-// by iterating each item. The data in the returned result will be a
-// []float64 containing the replaced items.
-func (v *Value) ReplaceFloat64(replacer func(int, float64) float64) *Value {
- arr := v.MustFloat64Slice()
- replaced := make([]float64, len(arr))
- v.EachFloat64(func(index int, val float64) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectFloat64 uses the specified collector function to collect a value
-// for each of the float64s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectFloat64(collector func(int, float64) interface{}) *Value {
- arr := v.MustFloat64Slice()
- collected := make([]interface{}, len(arr))
- v.EachFloat64(func(index int, val float64) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Complex64 (complex64 and []complex64)
-*/
-
-// Complex64 gets the value as a complex64, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Complex64(optionalDefault ...complex64) complex64 {
- if s, ok := v.data.(complex64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustComplex64 gets the value as a complex64.
-//
-// Panics if the object is not a complex64.
-func (v *Value) MustComplex64() complex64 {
- return v.data.(complex64)
-}
-
-// Complex64Slice gets the value as a []complex64, returns the optionalDefault
-// value or nil if the value is not a []complex64.
-func (v *Value) Complex64Slice(optionalDefault ...[]complex64) []complex64 {
- if s, ok := v.data.([]complex64); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustComplex64Slice gets the value as a []complex64.
-//
-// Panics if the object is not a []complex64.
-func (v *Value) MustComplex64Slice() []complex64 {
- return v.data.([]complex64)
-}
-
-// IsComplex64 gets whether the object contained is a complex64 or not.
-func (v *Value) IsComplex64() bool {
- _, ok := v.data.(complex64)
- return ok
-}
-
-// IsComplex64Slice gets whether the object contained is a []complex64 or not.
-func (v *Value) IsComplex64Slice() bool {
- _, ok := v.data.([]complex64)
- return ok
-}
-
-// EachComplex64 calls the specified callback for each object
-// in the []complex64.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachComplex64(callback func(int, complex64) bool) *Value {
- for index, val := range v.MustComplex64Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereComplex64 uses the specified decider function to select items
-// from the []complex64. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereComplex64(decider func(int, complex64) bool) *Value {
- var selected []complex64
- v.EachComplex64(func(index int, val complex64) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupComplex64 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]complex64.
-func (v *Value) GroupComplex64(grouper func(int, complex64) string) *Value {
- groups := make(map[string][]complex64)
- v.EachComplex64(func(index int, val complex64) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]complex64, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceComplex64 uses the specified function to replace each complex64s
-// by iterating each item. The data in the returned result will be a
-// []complex64 containing the replaced items.
-func (v *Value) ReplaceComplex64(replacer func(int, complex64) complex64) *Value {
- arr := v.MustComplex64Slice()
- replaced := make([]complex64, len(arr))
- v.EachComplex64(func(index int, val complex64) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectComplex64 uses the specified collector function to collect a value
-// for each of the complex64s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectComplex64(collector func(int, complex64) interface{}) *Value {
- arr := v.MustComplex64Slice()
- collected := make([]interface{}, len(arr))
- v.EachComplex64(func(index int, val complex64) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
-
-/*
- Complex128 (complex128 and []complex128)
-*/
-
-// Complex128 gets the value as a complex128, returns the optionalDefault
-// value or a system default object if the value is the wrong type.
-func (v *Value) Complex128(optionalDefault ...complex128) complex128 {
- if s, ok := v.data.(complex128); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return 0
-}
-
-// MustComplex128 gets the value as a complex128.
-//
-// Panics if the object is not a complex128.
-func (v *Value) MustComplex128() complex128 {
- return v.data.(complex128)
-}
-
-// Complex128Slice gets the value as a []complex128, returns the optionalDefault
-// value or nil if the value is not a []complex128.
-func (v *Value) Complex128Slice(optionalDefault ...[]complex128) []complex128 {
- if s, ok := v.data.([]complex128); ok {
- return s
- }
- if len(optionalDefault) == 1 {
- return optionalDefault[0]
- }
- return nil
-}
-
-// MustComplex128Slice gets the value as a []complex128.
-//
-// Panics if the object is not a []complex128.
-func (v *Value) MustComplex128Slice() []complex128 {
- return v.data.([]complex128)
-}
-
-// IsComplex128 gets whether the object contained is a complex128 or not.
-func (v *Value) IsComplex128() bool {
- _, ok := v.data.(complex128)
- return ok
-}
-
-// IsComplex128Slice gets whether the object contained is a []complex128 or not.
-func (v *Value) IsComplex128Slice() bool {
- _, ok := v.data.([]complex128)
- return ok
-}
-
-// EachComplex128 calls the specified callback for each object
-// in the []complex128.
-//
-// Panics if the object is the wrong type.
-func (v *Value) EachComplex128(callback func(int, complex128) bool) *Value {
- for index, val := range v.MustComplex128Slice() {
- carryon := callback(index, val)
- if !carryon {
- break
- }
- }
- return v
-}
-
-// WhereComplex128 uses the specified decider function to select items
-// from the []complex128. The object contained in the result will contain
-// only the selected items.
-func (v *Value) WhereComplex128(decider func(int, complex128) bool) *Value {
- var selected []complex128
- v.EachComplex128(func(index int, val complex128) bool {
- shouldSelect := decider(index, val)
- if !shouldSelect {
- selected = append(selected, val)
- }
- return true
- })
- return &Value{data: selected}
-}
-
-// GroupComplex128 uses the specified grouper function to group the items
-// keyed by the return of the grouper. The object contained in the
-// result will contain a map[string][]complex128.
-func (v *Value) GroupComplex128(grouper func(int, complex128) string) *Value {
- groups := make(map[string][]complex128)
- v.EachComplex128(func(index int, val complex128) bool {
- group := grouper(index, val)
- if _, ok := groups[group]; !ok {
- groups[group] = make([]complex128, 0)
- }
- groups[group] = append(groups[group], val)
- return true
- })
- return &Value{data: groups}
-}
-
-// ReplaceComplex128 uses the specified function to replace each complex128s
-// by iterating each item. The data in the returned result will be a
-// []complex128 containing the replaced items.
-func (v *Value) ReplaceComplex128(replacer func(int, complex128) complex128) *Value {
- arr := v.MustComplex128Slice()
- replaced := make([]complex128, len(arr))
- v.EachComplex128(func(index int, val complex128) bool {
- replaced[index] = replacer(index, val)
- return true
- })
- return &Value{data: replaced}
-}
-
-// CollectComplex128 uses the specified collector function to collect a value
-// for each of the complex128s in the slice. The data returned will be a
-// []interface{}.
-func (v *Value) CollectComplex128(collector func(int, complex128) interface{}) *Value {
- arr := v.MustComplex128Slice()
- collected := make([]interface{}, len(arr))
- v.EachComplex128(func(index int, val complex128) bool {
- collected[index] = collector(index, val)
- return true
- })
- return &Value{data: collected}
-}
diff --git a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go b/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go
deleted file mode 100644
index 956a2211d..000000000
--- a/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package objx
-
-import (
- "fmt"
- "strconv"
-)
-
-// Value provides methods for extracting interface{} data in various
-// types.
-type Value struct {
- // data contains the raw data being managed by this Value
- data interface{}
-}
-
-// Data returns the raw data contained by this Value
-func (v *Value) Data() interface{} {
- return v.data
-}
-
-// String returns the value always as a string
-func (v *Value) String() string {
- switch {
- case v.IsStr():
- return v.Str()
- case v.IsBool():
- return strconv.FormatBool(v.Bool())
- case v.IsFloat32():
- return strconv.FormatFloat(float64(v.Float32()), 'f', -1, 32)
- case v.IsFloat64():
- return strconv.FormatFloat(v.Float64(), 'f', -1, 64)
- case v.IsInt():
- return strconv.FormatInt(int64(v.Int()), 10)
- case v.IsInt():
- return strconv.FormatInt(int64(v.Int()), 10)
- case v.IsInt8():
- return strconv.FormatInt(int64(v.Int8()), 10)
- case v.IsInt16():
- return strconv.FormatInt(int64(v.Int16()), 10)
- case v.IsInt32():
- return strconv.FormatInt(int64(v.Int32()), 10)
- case v.IsInt64():
- return strconv.FormatInt(v.Int64(), 10)
- case v.IsUint():
- return strconv.FormatUint(uint64(v.Uint()), 10)
- case v.IsUint8():
- return strconv.FormatUint(uint64(v.Uint8()), 10)
- case v.IsUint16():
- return strconv.FormatUint(uint64(v.Uint16()), 10)
- case v.IsUint32():
- return strconv.FormatUint(uint64(v.Uint32()), 10)
- case v.IsUint64():
- return strconv.FormatUint(v.Uint64(), 10)
- }
-
- return fmt.Sprintf("%#v", v.Data())
-}
diff --git a/vendor/github.com/tylerb/graceful/README.md b/vendor/github.com/tylerb/graceful/README.md
index c641b6e78..328c3acf8 100644
--- a/vendor/github.com/tylerb/graceful/README.md
+++ b/vendor/github.com/tylerb/graceful/README.md
@@ -3,11 +3,6 @@ graceful [![GoDoc](https://godoc.org/github.com/tylerb/graceful?status.png)](htt
Graceful is a Go 1.3+ package enabling graceful shutdown of http.Handler servers.
-## Using Go 1.8?
-
-If you are using Go 1.8, you may not need to use this library! Consider using `http.Server`'s built-in [Shutdown()](https://golang.org/pkg/net/http/#Server.Shutdown)
-method for graceful shutdowns.
-
## Installation
To install, simply execute:
diff --git a/vendor/github.com/tylerb/graceful/graceful_test.go b/vendor/github.com/tylerb/graceful/graceful_test.go
deleted file mode 100644
index b9c49336b..000000000
--- a/vendor/github.com/tylerb/graceful/graceful_test.go
+++ /dev/null
@@ -1,692 +0,0 @@
-package graceful
-
-import (
- "bytes"
- "fmt"
- "io"
- "log"
- "net"
- "net/http"
- "net/url"
- "os"
- "reflect"
- "strings"
- "sync"
- "syscall"
- "testing"
- "time"
-)
-
-const (
- // The tests will run a test server on this port.
- port = 9654
- concurrentRequestN = 8
- killTime = 500 * time.Millisecond
- timeoutTime = 1000 * time.Millisecond
- waitTime = 100 * time.Millisecond
-)
-
-func runQuery(t *testing.T, expected int, shouldErr bool, wg *sync.WaitGroup, once *sync.Once) {
- defer wg.Done()
- client := http.Client{}
- r, err := client.Get(fmt.Sprintf("http://localhost:%d", port))
- if shouldErr && err == nil {
- once.Do(func() {
- t.Error("Expected an error but none was encountered.")
- })
- } else if shouldErr && err != nil {
- if checkErr(t, err, once) {
- return
- }
- }
- if r != nil && r.StatusCode != expected {
- once.Do(func() {
- t.Errorf("Incorrect status code on response. Expected %d. Got %d", expected, r.StatusCode)
- })
- } else if r == nil {
- once.Do(func() {
- t.Error("No response when a response was expected.")
- })
- }
-}
-
-func checkErr(t *testing.T, err error, once *sync.Once) bool {
- if err.(*url.Error).Err == io.EOF {
- return true
- }
- var errno syscall.Errno
- switch oe := err.(*url.Error).Err.(type) {
- case *net.OpError:
- switch e := oe.Err.(type) {
- case syscall.Errno:
- errno = e
- case *os.SyscallError:
- errno = e.Err.(syscall.Errno)
- }
- if errno == syscall.ECONNREFUSED {
- return true
- } else if err != nil {
- once.Do(func() {
- t.Error("Error on Get:", err)
- })
- }
- default:
- if strings.Contains(err.Error(), "transport closed before response was received") {
- return true
- }
- if strings.Contains(err.Error(), "server closed connection") {
- return true
- }
- fmt.Printf("unknown err: %s, %#v\n", err, err)
- }
- return false
-}
-
-func createListener(sleep time.Duration) (*http.Server, net.Listener, error) {
- mux := http.NewServeMux()
- mux.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
- time.Sleep(sleep)
- rw.WriteHeader(http.StatusOK)
- })
-
- server := &http.Server{Addr: fmt.Sprintf(":%d", port), Handler: mux}
- l, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
- return server, l, err
-}
-
-func launchTestQueries(t *testing.T, wg *sync.WaitGroup, c chan os.Signal) {
- defer wg.Done()
- var once sync.Once
-
- for i := 0; i < concurrentRequestN; i++ {
- wg.Add(1)
- go runQuery(t, http.StatusOK, false, wg, &once)
- }
-
- time.Sleep(waitTime)
- c <- os.Interrupt
- time.Sleep(waitTime)
-
- for i := 0; i < concurrentRequestN; i++ {
- wg.Add(1)
- go runQuery(t, 0, true, wg, &once)
- }
-}
-
-func TestGracefulRun(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime / 2)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{Timeout: killTime, Server: server, interrupt: c}
- srv.Serve(l)
- }()
-
- wg.Add(1)
- go launchTestQueries(t, &wg, c)
-}
-
-func TestGracefulRunLimitKeepAliveListener(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime / 2)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{
- Timeout: killTime,
- ListenLimit: concurrentRequestN,
- TCPKeepAlive: 1 * time.Second,
- Server: server,
- interrupt: c,
- }
- srv.Serve(l)
- }()
-
- wg.Add(1)
- go launchTestQueries(t, &wg, c)
-}
-
-func TestGracefulRunTimesOut(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime * 10)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{Timeout: killTime, Server: server, interrupt: c}
- srv.Serve(l)
- }()
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- var once sync.Once
-
- for i := 0; i < concurrentRequestN; i++ {
- wg.Add(1)
- go runQuery(t, 0, true, &wg, &once)
- }
-
- time.Sleep(waitTime)
- c <- os.Interrupt
- time.Sleep(waitTime)
-
- for i := 0; i < concurrentRequestN; i++ {
- wg.Add(1)
- go runQuery(t, 0, true, &wg, &once)
- }
- }()
-}
-
-func TestGracefulRunDoesntTimeOut(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime * 2)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{Timeout: 0, Server: server, interrupt: c}
- srv.Serve(l)
- }()
-
- wg.Add(1)
- go launchTestQueries(t, &wg, c)
-}
-
-func TestGracefulRunDoesntTimeOutAfterConnectionCreated(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{Timeout: 0, Server: server, interrupt: c}
- srv.Serve(l)
- }()
- time.Sleep(waitTime)
-
- // Make a sample first request. The connection will be left idle.
- resp, err := http.Get(fmt.Sprintf("http://localhost:%d", port))
- if err != nil {
- panic(fmt.Sprintf("first request failed: %v", err))
- }
- resp.Body.Close()
-
- wg.Add(1)
- go func() {
- defer wg.Done()
-
- // With idle connections improperly handled, the server doesn't wait for this
- // to complete and the request fails. It should be allowed to complete successfully.
- _, err := http.Get(fmt.Sprintf("http://localhost:%d", port))
- if err != nil {
- t.Errorf("Get failed: %v", err)
- }
- }()
-
- // Ensure the request goes out
- time.Sleep(waitTime)
- c <- os.Interrupt
- wg.Wait()
-}
-
-func TestGracefulRunNoRequests(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime * 2)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{Timeout: 0, Server: server, interrupt: c}
- srv.Serve(l)
- }()
-
- c <- os.Interrupt
-}
-
-func TestGracefulForwardsConnState(t *testing.T) {
- var stateLock sync.Mutex
- states := make(map[http.ConnState]int)
- connState := func(conn net.Conn, state http.ConnState) {
- stateLock.Lock()
- states[state]++
- stateLock.Unlock()
- }
-
- var wg sync.WaitGroup
- defer wg.Wait()
-
- expected := map[http.ConnState]int{
- http.StateNew: concurrentRequestN,
- http.StateActive: concurrentRequestN,
- http.StateClosed: concurrentRequestN,
- }
-
- c := make(chan os.Signal, 1)
- server, l, err := createListener(killTime / 2)
- if err != nil {
- t.Fatal(err)
- }
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv := &Server{
- ConnState: connState,
- Timeout: killTime,
- Server: server,
- interrupt: c,
- }
- srv.Serve(l)
- }()
-
- wg.Add(1)
- go launchTestQueries(t, &wg, c)
- wg.Wait()
-
- stateLock.Lock()
- if !reflect.DeepEqual(states, expected) {
- t.Errorf("Incorrect connection state tracking.\n actual: %v\nexpected: %v\n", states, expected)
- }
- stateLock.Unlock()
-}
-
-func TestGracefulExplicitStop(t *testing.T) {
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- srv := &Server{Timeout: killTime, Server: server}
-
- go func() {
- go srv.Serve(l)
- time.Sleep(waitTime)
- srv.Stop(killTime)
- }()
-
- // block on the stopChan until the server has shut down
- select {
- case <-srv.StopChan():
- case <-time.After(timeoutTime):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-}
-
-func TestGracefulExplicitStopOverride(t *testing.T) {
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- srv := &Server{Timeout: killTime, Server: server}
-
- go func() {
- go srv.Serve(l)
- time.Sleep(waitTime)
- srv.Stop(killTime / 2)
- }()
-
- // block on the stopChan until the server has shut down
- select {
- case <-srv.StopChan():
- case <-time.After(killTime):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-}
-
-func TestBeforeShutdownAndShutdownInitiatedCallbacks(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- beforeShutdownCalled := make(chan struct{})
- cb1 := func() bool { close(beforeShutdownCalled); return true }
- shutdownInitiatedCalled := make(chan struct{})
- cb2 := func() { close(shutdownInitiatedCalled) }
-
- wg.Add(2)
- srv := &Server{Server: server, BeforeShutdown: cb1, ShutdownInitiated: cb2}
- go func() {
- defer wg.Done()
- srv.Serve(l)
- }()
- go func() {
- defer wg.Done()
- time.Sleep(waitTime)
- srv.Stop(killTime)
- }()
-
- beforeShutdown := false
- shutdownInitiated := false
- for i := 0; i < 2; i++ {
- select {
- case <-beforeShutdownCalled:
- beforeShutdownCalled = nil
- beforeShutdown = true
- case <-shutdownInitiatedCalled:
- shutdownInitiatedCalled = nil
- shutdownInitiated = true
- case <-time.After(killTime):
- t.Fatal("Timed out while waiting for ShutdownInitiated callback to be called")
- }
- }
-
- if !beforeShutdown {
- t.Fatal("beforeShutdown should be true")
- }
- if !shutdownInitiated {
- t.Fatal("shutdownInitiated should be true")
- }
-}
-
-func TestBeforeShutdownCanceled(t *testing.T) {
- var wg sync.WaitGroup
- wg.Add(1)
-
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- beforeShutdownCalled := make(chan struct{})
- cb1 := func() bool { close(beforeShutdownCalled); return false }
- shutdownInitiatedCalled := make(chan struct{})
- cb2 := func() { close(shutdownInitiatedCalled) }
-
- srv := &Server{Server: server, BeforeShutdown: cb1, ShutdownInitiated: cb2}
- go func() {
- srv.Serve(l)
- wg.Done()
- }()
- go func() {
- time.Sleep(waitTime)
- srv.Stop(killTime)
- }()
-
- beforeShutdown := false
- shutdownInitiated := false
- timeouted := false
-
- for i := 0; i < 2; i++ {
- select {
- case <-beforeShutdownCalled:
- beforeShutdownCalled = nil
- beforeShutdown = true
- case <-shutdownInitiatedCalled:
- shutdownInitiatedCalled = nil
- shutdownInitiated = true
- case <-time.After(killTime):
- timeouted = true
- }
- }
-
- if !beforeShutdown {
- t.Fatal("beforeShutdown should be true")
- }
- if !timeouted {
- t.Fatal("timeouted should be true")
- }
- if shutdownInitiated {
- t.Fatal("shutdownInitiated shouldn't be true")
- }
-
- srv.BeforeShutdown = func() bool { return true }
- srv.Stop(killTime)
-
- wg.Wait()
-}
-
-func hijackingListener(srv *Server) (*http.Server, net.Listener, error) {
- mux := http.NewServeMux()
- mux.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
- conn, bufrw, err := rw.(http.Hijacker).Hijack()
- if err != nil {
- http.Error(rw, "webserver doesn't support hijacking", http.StatusInternalServerError)
- return
- }
-
- defer conn.Close()
-
- bufrw.WriteString("HTTP/1.1 200 OK\r\n\r\n")
- bufrw.Flush()
- })
-
- server := &http.Server{Addr: fmt.Sprintf(":%d", port), Handler: mux}
- l, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
- return server, l, err
-}
-
-func TestNotifyClosed(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan os.Signal, 1)
- srv := &Server{Timeout: killTime, interrupt: c}
- server, l, err := hijackingListener(srv)
- if err != nil {
- t.Fatal(err)
- }
-
- srv.Server = server
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- srv.Serve(l)
- }()
-
- var once sync.Once
- for i := 0; i < concurrentRequestN; i++ {
- wg.Add(1)
- runQuery(t, http.StatusOK, false, &wg, &once)
- }
-
- srv.Stop(0)
-
- // block on the stopChan until the server has shut down
- select {
- case <-srv.StopChan():
- case <-time.After(timeoutTime):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-
- if len(srv.connections) > 0 {
- t.Fatal("hijacked connections should not be managed")
- }
-
-}
-
-func TestStopDeadlock(t *testing.T) {
- var wg sync.WaitGroup
- defer wg.Wait()
-
- c := make(chan struct{})
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- srv := &Server{Server: server, NoSignalHandling: true}
-
- wg.Add(2)
- go func() {
- defer wg.Done()
- time.Sleep(waitTime)
- srv.Serve(l)
- }()
- go func() {
- defer wg.Done()
- srv.Stop(0)
- close(c)
- }()
-
- select {
- case <-c:
- l.Close()
- case <-time.After(timeoutTime):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-}
-
-// Run with --race
-func TestStopRace(t *testing.T) {
- server, l, err := createListener(1 * time.Millisecond)
- if err != nil {
- t.Fatal(err)
- }
-
- srv := &Server{Timeout: killTime, Server: server}
-
- go func() {
- go srv.Serve(l)
- srv.Stop(killTime)
- }()
- srv.Stop(0)
- select {
- case <-srv.StopChan():
- case <-time.After(timeoutTime):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-}
-
-func TestInterruptLog(t *testing.T) {
- c := make(chan os.Signal, 1)
-
- server, l, err := createListener(killTime * 10)
- if err != nil {
- t.Fatal(err)
- }
-
- var buf bytes.Buffer
- var tbuf bytes.Buffer
- logger := log.New(&buf, "", 0)
- expected := log.New(&tbuf, "", 0)
-
- srv := &Server{Timeout: killTime, Server: server, Logger: logger, interrupt: c}
- go func() { srv.Serve(l) }()
-
- stop := srv.StopChan()
- c <- os.Interrupt
- expected.Print("shutdown initiated")
-
- <-stop
-
- if buf.String() != tbuf.String() {
- t.Fatal("shutdown log incorrect - got '" + buf.String() + "'")
- }
-}
-
-func TestMultiInterrupts(t *testing.T) {
- c := make(chan os.Signal, 1)
-
- server, l, err := createListener(killTime * 10)
- if err != nil {
- t.Fatal(err)
- }
-
- var wg sync.WaitGroup
- var bu bytes.Buffer
- buf := SyncBuffer{&wg, &bu}
- var tbuf bytes.Buffer
- logger := log.New(&buf, "", 0)
- expected := log.New(&tbuf, "", 0)
-
- srv := &Server{Timeout: killTime, Server: server, Logger: logger, interrupt: c}
- go func() { srv.Serve(l) }()
-
- stop := srv.StopChan()
- buf.Add(1 + 10) // Expecting 11 log calls
- c <- os.Interrupt
- expected.Printf("shutdown initiated")
- for i := 0; i < 10; i++ {
- c <- os.Interrupt
- expected.Printf("already shutting down")
- }
-
- <-stop
-
- wg.Wait()
- bb, bt := buf.Bytes(), tbuf.Bytes()
- for i, b := range bb {
- if b != bt[i] {
- t.Fatal(fmt.Sprintf("shutdown log incorrect - got '%s', expected '%s'", buf.String(), tbuf.String()))
- }
- }
-}
-
-func TestLogFunc(t *testing.T) {
- c := make(chan os.Signal, 1)
-
- server, l, err := createListener(killTime * 10)
- if err != nil {
- t.Fatal(err)
- }
- var called bool
- srv := &Server{Timeout: killTime, Server: server,
- LogFunc: func(format string, args ...interface{}) {
- called = true
- }, interrupt: c}
- stop := srv.StopChan()
- go func() { srv.Serve(l) }()
- c <- os.Interrupt
- <-stop
-
- if called != true {
- t.Fatal("Expected LogFunc to be called.")
- }
-}
-
-// SyncBuffer calls Done on the embedded wait group after each call to Write.
-type SyncBuffer struct {
- *sync.WaitGroup
- *bytes.Buffer
-}
-
-func (buf *SyncBuffer) Write(b []byte) (int, error) {
- defer buf.Done()
- return buf.Buffer.Write(b)
-}
diff --git a/vendor/github.com/tylerb/graceful/http2_test.go b/vendor/github.com/tylerb/graceful/http2_test.go
deleted file mode 100644
index 5b2ebbb8f..000000000
--- a/vendor/github.com/tylerb/graceful/http2_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// +build go1.6
-
-package graceful
-
-import (
- "crypto/tls"
- "fmt"
- "net/http"
- "os"
- "sync"
- "testing"
- "time"
-
- "golang.org/x/net/http2"
-)
-
-func createServer() *http.Server {
- mux := http.NewServeMux()
- mux.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
- rw.WriteHeader(http.StatusOK)
- })
-
- server := &http.Server{Addr: fmt.Sprintf(":%d", port), Handler: mux}
-
- return server
-}
-
-func checkIfConnectionToServerIsHTTP2(t *testing.T, wg *sync.WaitGroup, c chan os.Signal) {
-
- defer wg.Done()
-
- tr := &http.Transport{
- TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
- }
-
- err := http2.ConfigureTransport(tr)
-
- if err != nil {
- t.Fatal("Unable to upgrade client transport to HTTP/2")
- }
-
- client := http.Client{Transport: tr}
- r, err := client.Get(fmt.Sprintf("https://localhost:%d", port))
-
- c <- os.Interrupt
-
- if err != nil {
- t.Fatalf("Error encountered while connecting to test server: %s", err)
- }
-
- if !r.ProtoAtLeast(2, 0) {
- t.Fatalf("Expected HTTP/2 connection to server, but connection was using %s", r.Proto)
- }
-}
-
-func TestHTTP2ListenAndServeTLS(t *testing.T) {
-
- c := make(chan os.Signal, 1)
-
- var wg sync.WaitGroup
- wg.Add(1)
-
- server := createServer()
-
- var srv *Server
- go func() {
- // set timeout of 0 to test idle connection closing
- srv = &Server{Timeout: 0, TCPKeepAlive: 1 * time.Minute, Server: server, interrupt: c}
- srv.ListenAndServeTLS("test-fixtures/cert.crt", "test-fixtures/key.pem")
- wg.Done()
- }()
-
- time.Sleep(waitTime) // Wait for the server to start
-
- wg.Add(1)
- go checkIfConnectionToServerIsHTTP2(t, &wg, c)
- wg.Wait()
-
- c <- os.Interrupt // kill the server to close idle connections
-
- // block on the stopChan until the server has shut down
- select {
- case <-srv.StopChan():
- case <-time.After(killTime * 2):
- t.Fatal("Timed out while waiting for explicit stop to complete")
- }
-
-}
-
-func TestHTTP2ListenAndServeTLSConfig(t *testing.T) {
-
- c := make(chan os.Signal, 1)
-
- var wg sync.WaitGroup
-
- wg.Add(1)
-
- server2 := createServer()
-
- go func() {
- srv := &Server{Timeout: killTime, TCPKeepAlive: 1 * time.Minute, Server: server2, interrupt: c}
-
- cert, err := tls.LoadX509KeyPair("test-fixtures/cert.crt", "test-fixtures/key.pem")
-
- if err != nil {
- t.Fatalf("Unexpected error: %s", err)
- }
-
- tlsConf := &tls.Config{
- Certificates: []tls.Certificate{cert},
- NextProtos: []string{"h2"}, // We need to explicitly enable http/2 in Go 1.7+
- }
-
- tlsConf.BuildNameToCertificate()
-
- srv.ListenAndServeTLSConfig(tlsConf)
- wg.Done()
- }()
-
- time.Sleep(waitTime) // Wait for the server to start
-
- wg.Add(1)
- go checkIfConnectionToServerIsHTTP2(t, &wg, c)
- wg.Wait()
-}
diff --git a/vendor/github.com/tylerb/graceful/test-fixtures/cert.crt b/vendor/github.com/tylerb/graceful/test-fixtures/cert.crt
deleted file mode 100644
index 84bd02a3d..000000000
--- a/vendor/github.com/tylerb/graceful/test-fixtures/cert.crt
+++ /dev/null
@@ -1,43 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDhTCCAm2gAwIBAgIUDvdWhjUd/JS+E5bxZlmCM+giGHMwDQYJKoZIhvcNAQEL
-BQAwHzEdMBsGA1UEAxMUVGVzdCBJbnRlcm1lZGlhdGUgQ0EwHhcNMTYwNjAyMDMy
-MjA0WhcNMTkwNjAyMDMyMjM0WjAUMRIwEAYDVQQDEwlsb2NhbGhvc3QwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDDoyMTUK2OSp+XhKRXB/+uO6YAJE/W
-2rzqARahWT6boHZMDhHXRtdwYxWwiUqoxlEeBrEerQ2qPFAqlWkDw8zliE/DWgXg
-BiW+Vq5DAn3F1jZ5WskLWr1iP48oK4/l+BXEsDd44MHZFoSZiWlr2Fi4iaIHJE7+
-LGBqPVQXwBYTyc7Jvi3HY8I4/waaAwXoSo8vDPjRiMCD2wlg24Rimocf4goa/2Xs
-Z0NU76Uf2jPdsZ5MujjKRqwHDEAjiBq0aPvm6igkNGAGoZ6QYEptO+J4t1oFrbdP
-gYRlpqCa3ekr9gc+wg5AO/V9x8/cypbQ8tpwFwvvSYg2TJaUMZ5abc+HAgMBAAGj
-gcMwgcAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB0GA1UdDgQWBBQC
-R0Y69NLOfFCLRiB5N3uoacILXTAfBgNVHSMEGDAWgBRm0fFHSXtDCVHC8UW7/obv
-DLp9tTBJBggrBgEFBQcBAQQ9MDswOQYIKwYBBQUHMAKGLWh0dHA6Ly9sb2NhbGhv
-c3Qvc2VsZi1pc3N1ZWQtaW50ZXJtZWRpYXRlLmNydDAUBgNVHREEDTALgglsb2Nh
-bGhvc3QwDQYJKoZIhvcNAQELBQADggEBALAf/nowwB0NJ7lGGaoVKhmMHxBEQkd1
-K/jBAlJg9Kgmg1IJJ7zLE3SeYF8tGTNYATd4RLmqo1GakrMDaKWNXd74v3p/tWmb
-4vqCh6WzFPHU1dpxDKtbbmaLt9Ije7s6DuQAz9bBXM0mN0vy5F0dORpx/j0h3u1B
-j7B5O8kLejPY2w/8pd+QECCb1Q5A6Xx1EEsJpzTlGXO0SBla/oCg+nvirsBGVpWr
-bGskAIwG9wNKuGfg4m5u1bL87iX80NemeLtWRWVM+Ry/RhfOokH59/EIFRAXeRz6
-gXjIWa0vcXnhW1MOvbD1GFYhO6AJAnDwWes48WfBHysOhq0RycdpGw0=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDjTCCAnWgAwIBAgIUMzpit8+j2dWxdk1PdMqGWYalZyIwDQYJKoZIhvcNAQEL
-BQAwFzEVMBMGA1UEAxMMVGVzdCBSb290IENBMB4XDTE2MDUyOTEwNDYwMFoXDTMx
-MDUyNjEwNDYzMFowHzEdMBsGA1UEAxMUVGVzdCBJbnRlcm1lZGlhdGUgQ0EwggEi
-MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDs6kY6mHJWzupq5dsSavPZHuv6
-0E9PczHbujWLuzv7+qbwzcAgfRvaeR0xgvf7q9pjMgJ7/kNANgneWGpwciLgHtiJ
-rSHii3RZfWlK4gdbCXya9EmHj8zO+9xGBHM0FrqfqA+IA70SimFcwGPrGHyERsdX
-+mqO64Z95yI5uJpoS8OBAUPU8i6xvNLZGmgUEF3CRhDDTYVGcTEtKAPcnnBuZzZU
-Ds+DrHf/MC7HHK0/l0auuRz3p+/GFNePGePG+FFbInS/vwHwrkMW2tzBKG41K+gD
-GfkTjVU8xBSiMYOiEja6YcJ4GuzEPcmu5LS+6BkLlsIbazDW5IM8p+7+8RKjAgMB
-AAGjgcgwgcUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
-BBYEFGbR8UdJe0MJUcLxRbv+hu8Mun21MB8GA1UdIwQYMBaAFKmz0h3CW1HBO9uz
-uCzg+MNPGZtkMEEGCCsGAQUFBwEBBDUwMzAxBggrBgEFBQcwAoYlaHR0cDovL2xv
-Y2FsaG9zdC9zZWxmLWlzc3VlZC1yb290LmNydDAfBgNVHREEGDAWghRUZXN0IElu
-dGVybWVkaWF0ZSBDQTANBgkqhkiG9w0BAQsFAAOCAQEAaYVGqHbaE0c9F/kyIMgu
-S3HuNn4pBh2EwGcKIlPkDe43hqXjhS/+itmWk75rQz+Rw+acevGoxbpDR38abTIS
-RJd9L/3MA644z8F82er3pNjKqvS/vTre/wsvGYwmEM+GrgJw3HUcisc93qLgaWH2
-kjky208k9kOuzJDiY45eu9TfSSmjSHSMCtxk8p5wYKDcfVz+uqlBhVEiHGjQIc2E
-66SituusiwgQv/mdtEW7y48EvMGdzxPfLFcvj06B3vTsZaaYyB6GyKwMcaPFvHRr
-V0yYaKRZgAh4X6LHlgPJqvIv3gjMdJR55durAO7tI9Pos0o5Lv5WJgi0g0KvMsco
-qQ==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/vendor/github.com/tylerb/graceful/test-fixtures/key.pem b/vendor/github.com/tylerb/graceful/test-fixtures/key.pem
deleted file mode 100644
index 78f3232c8..000000000
--- a/vendor/github.com/tylerb/graceful/test-fixtures/key.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAw6MjE1Ctjkqfl4SkVwf/rjumACRP1tq86gEWoVk+m6B2TA4R
-10bXcGMVsIlKqMZRHgaxHq0NqjxQKpVpA8PM5YhPw1oF4AYlvlauQwJ9xdY2eVrJ
-C1q9Yj+PKCuP5fgVxLA3eODB2RaEmYlpa9hYuImiByRO/ixgaj1UF8AWE8nOyb4t
-x2PCOP8GmgMF6EqPLwz40YjAg9sJYNuEYpqHH+IKGv9l7GdDVO+lH9oz3bGeTLo4
-ykasBwxAI4gatGj75uooJDRgBqGekGBKbTvieLdaBa23T4GEZaagmt3pK/YHPsIO
-QDv1fcfP3MqW0PLacBcL70mINkyWlDGeWm3PhwIDAQABAoIBAQC87HWa2XZAyt+D
-OpxZT2ghoYiU6nwPR/zXHWX1OnGzaCnVGGEyOz8hUQ5JBMwMYDdFf8DbltJzavsf
-pFldQWBE6HXeeLjjtgwM2zg9jdJXkp3YY0tyo5XvouFkMW0s735WCrYHDUUllxFG
-E+SyOKK00nSd4PpHiiMxdTgYF286exwOpzjhcJfAkn7oBNeOGc5VLOvcvakrSrdq
-OYBAJ25HSVFnSQbeAAsCzBEBZC0WLyB1BQGcidbtEn8sxyGnV8HWjbXY+MJQWHg+
-q2iK+uvO4wtrE/WC6p4Ty44Myh+AB79s35HWKYd4okwKkpI1QdD543TIiZnkNEVI
-aS/uH13BAoGBAP/psBxKzIft59hw+U9NscH6N9/ze8iAtOtqsWdER/qXCrlUn8+j
-F/xquJR6gDj5GwGBt07asEuoG8CKJMQI0c3AeHF7XBcmUunBStktb9O97Zsp6bNJ
-olsrWlM4yvVuCVizEwIYjHrMBOS3YIPErM1LmAyDHmzx3+yz+3+WxRQLAoGBAMO0
-MaJDPisMC05pvieHRb91HlsiSrASeMkw1FmHI0b/gcC88mEnuXIze1ySoF6FE7B7
-xaEm6Lf5Snl0JgXPDSj6ukd51NdaU2VmpKvDOrvQ5QQE9mXaDkXv/i2B0YkCh+Hy
-bkziW1IKnWT2PTRAAEIJQ22oK51MdQnvCdmtsIP1AoGBAKnMiEl9Z9AZDmgSLZls
-17D5MPGrQEp8+43oMOVv7MJcTYVCnPbMJDIbLXV3AnTK9Bw/0TzE5YyNcjyCbHqV
-z39RYZkKXMQPbZwj4GHRQA2iS3FUkfeft9X+IeRuHlxSMmlkCAyv9SXVELog4i0L
-5gwhSDWlGh73LbiEgy7Y/tKZAoGBALTiMhYGDMoA4dpiBi3G7AKgH6SgN2QyTo22
-oi71pveSZb1dZrHB47fYOadApxV17tLqM6pVqjeRJPLJFfO8gi9kPxSdWMqLZBWP
-H5jaY8kAtQxYAd32A8dEoSwylxcJzcpbJvPNLBbSVNPifIN0vEhNA5OxIk7LQkoi
-NHqL/WCZAoGAPf3kb9Gw/NkBq4Cn86pQfP/xE0h7zcoNmFtLbdKIjId+DDDOPOeX
-9tm33fZzw0SG4KlRQlsqgzFvm8aDD8rpW17341Z/rWlLo8uHNdRkMvbSabc34vPv
-4lrs0rHSYW06MlqkJBNVraySRz7hmU4+n7YMvNI0Due9mVGmE1NU/vI=
------END RSA PRIVATE KEY----- \ No newline at end of file
diff --git a/vendor/github.com/tylerb/graceful/tests/main.go b/vendor/github.com/tylerb/graceful/tests/main.go
deleted file mode 100644
index 9380ae69c..000000000
--- a/vendor/github.com/tylerb/graceful/tests/main.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package main
-
-import (
- "fmt"
- "sync"
-
- "github.com/urfave/negroni"
- "gopkg.in/tylerb/graceful.v1"
-)
-
-func main() {
-
- var wg sync.WaitGroup
-
- wg.Add(3)
- go func() {
- n := negroni.New()
- fmt.Println("Launching server on :3000")
- graceful.Run(":3000", 0, n)
- fmt.Println("Terminated server on :3000")
- wg.Done()
- }()
- go func() {
- n := negroni.New()
- fmt.Println("Launching server on :3001")
- graceful.Run(":3001", 0, n)
- fmt.Println("Terminated server on :3001")
- wg.Done()
- }()
- go func() {
- n := negroni.New()
- fmt.Println("Launching server on :3002")
- graceful.Run(":3002", 0, n)
- fmt.Println("Terminated server on :3002")
- wg.Done()
- }()
- fmt.Println("Press ctrl+c. All servers should terminate.")
- wg.Wait()
-
-}
diff --git a/vendor/github.com/xtgo/uuid/uuid_test.go b/vendor/github.com/xtgo/uuid/uuid_test.go
deleted file mode 100644
index 3cef4a31a..000000000
--- a/vendor/github.com/xtgo/uuid/uuid_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2012 The gocql Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import (
- "bytes"
- "testing"
-)
-
-func TestNil(t *testing.T) {
- var uuid UUID
- want, got := "00000000-0000-0000-0000-000000000000", uuid.String()
- if want != got {
- t.Fatalf("TestNil: expected %q got %q", want, got)
- }
-}
-
-var tests = []struct {
- input string
- variant int
- version int
-}{
- {"b4f00409-cef8-4822-802c-deb20704c365", VariantIETF, 4},
- {"f81d4fae-7dec-11d0-a765-00a0c91e6bf6", VariantIETF, 1},
- {"00000000-7dec-11d0-a765-00a0c91e6bf6", VariantIETF, 1},
- {"3051a8d7-aea7-1801-e0bf-bc539dd60cf3", VariantFuture, 1},
- {"3051a8d7-aea7-2801-e0bf-bc539dd60cf3", VariantFuture, 2},
- {"3051a8d7-aea7-3801-e0bf-bc539dd60cf3", VariantFuture, 3},
- {"3051a8d7-aea7-4801-e0bf-bc539dd60cf3", VariantFuture, 4},
- {"3051a8d7-aea7-3801-e0bf-bc539dd60cf3", VariantFuture, 5},
- {"d0e817e1-e4b1-1801-3fe6-b4b60ccecf9d", VariantNCSCompat, 0},
- {"d0e817e1-e4b1-1801-bfe6-b4b60ccecf9d", VariantIETF, 1},
- {"d0e817e1-e4b1-1801-dfe6-b4b60ccecf9d", VariantMicrosoft, 0},
- {"d0e817e1-e4b1-1801-ffe6-b4b60ccecf9d", VariantFuture, 0},
-}
-
-func TestPredefined(t *testing.T) {
- for i := range tests {
- uuid, err := Parse(tests[i].input)
- if err != nil {
- t.Errorf("Parse #%d: %v", i, err)
- continue
- }
-
- if str := uuid.String(); str != tests[i].input {
- t.Errorf("String #%d: expected %q got %q", i, tests[i].input, str)
- continue
- }
-
- if variant := uuid.Variant(); variant != tests[i].variant {
- t.Errorf("Variant #%d: expected %d got %d", i, tests[i].variant, variant)
- }
-
- if tests[i].variant == VariantIETF {
- if version := uuid.Version(); version != tests[i].version {
- t.Errorf("Version #%d: expected %d got %d", i, tests[i].version, version)
- }
- }
- }
-}
-
-func TestNewRandom(t *testing.T) {
- for i := 0; i < 20; i++ {
- uuid := NewRandom()
-
- if variant := uuid.Variant(); variant != VariantIETF {
- t.Errorf("wrong variant. expected %d got %d", VariantIETF, variant)
- }
- if version := uuid.Version(); version != 4 {
- t.Errorf("wrong version. expected %d got %d", 4, version)
- }
- }
-}
-
-func TestNewTime(t *testing.T) {
- var node []byte
- timestamp := uint64(0)
- for i := 0; i < 20; i++ {
- uuid := NewTime()
-
- if variant := uuid.Variant(); variant != VariantIETF {
- t.Errorf("wrong variant. expected %d got %d", VariantIETF, variant)
- }
- if version := uuid.Version(); version != 1 {
- t.Errorf("wrong version. expected %d got %d", 1, version)
- }
-
- if n := uuid.Node(); !bytes.Equal(n, node) && i > 0 {
- t.Errorf("wrong node. expected %x, got %x", node, n)
- } else if i == 0 {
- node = n
- }
-
- ts := uuid.Timestamp()
- if ts < timestamp {
- t.Errorf("timestamps must grow")
- }
- timestamp = ts
- }
-}